From c6e12bb709a486e964e4231a39c4bb90537f9765 Mon Sep 17 00:00:00 2001 From: armfly Date: Thu, 24 Dec 2020 02:46:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E9=9D=A2=E6=94=AF=E6=8C=81USB?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=89=A7=E8=A1=8Clua=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG | 14 + Doc/待解决问题.txt | 62 +- .../Device/ST/STM32H7xx/Include/stm32h723xx.h | 24126 +++++++++++++++ .../Device/ST/STM32H7xx/Include/stm32h725xx.h | 24138 +++++++++++++++ .../Device/ST/STM32H7xx/Include/stm32h730xx.h | 24617 +++++++++++++++ .../ST/STM32H7xx/Include/stm32h730xxq.h | 24629 ++++++++++++++++ .../Device/ST/STM32H7xx/Include/stm32h733xx.h | 24617 +++++++++++++++ .../Device/ST/STM32H7xx/Include/stm32h735xx.h | 24629 ++++++++++++++++ .../Device/ST/STM32H7xx/Include/stm32h742xx.h | 11 +- .../Device/ST/STM32H7xx/Include/stm32h743xx.h | 11 +- .../Device/ST/STM32H7xx/Include/stm32h745xx.h | 11 +- .../Device/ST/STM32H7xx/Include/stm32h747xx.h | 11 +- .../Device/ST/STM32H7xx/Include/stm32h750xx.h | 11 +- .../Device/ST/STM32H7xx/Include/stm32h753xx.h | 11 +- .../Device/ST/STM32H7xx/Include/stm32h755xx.h | 11 +- .../Device/ST/STM32H7xx/Include/stm32h757xx.h | 11 +- .../Device/ST/STM32H7xx/Include/stm32h7a3xx.h | 11 +- .../ST/STM32H7xx/Include/stm32h7a3xxq.h | 11 +- .../Device/ST/STM32H7xx/Include/stm32h7b0xx.h | 11 +- .../ST/STM32H7xx/Include/stm32h7b0xxq.h | 11 +- .../Device/ST/STM32H7xx/Include/stm32h7b3xx.h | 11 +- .../ST/STM32H7xx/Include/stm32h7b3xxq.h | 11 +- .../Device/ST/STM32H7xx/Include/stm32h7xx.h | 25 +- .../Device/ST/STM32H7xx/Release_Notes.html | 131 +- .../arm/linker/stm32h745xg_flash_CM4.sct | 14 + .../arm/linker/stm32h745xg_flash_CM7.sct | 14 + .../arm/linker/stm32h747xg_flash_CM4.sct | 14 + .../arm/linker/stm32h747xg_flash_CM7.sct | 14 + .../Templates/arm/startup_stm32h723xx.s | 618 + .../Templates/arm/startup_stm32h725xx.s | 618 + .../Templates/arm/startup_stm32h730xx.s | 624 + .../Templates/arm/startup_stm32h730xxq.s | 624 + .../Templates/arm/startup_stm32h733xx.s | 624 + .../Templates/arm/startup_stm32h735xx.s | 624 + .../gcc/linker/stm32h745xg_flash_CM4.ld | 172 + .../gcc/linker/stm32h745xg_flash_CM7.ld | 173 + .../gcc/linker/stm32h747xg_flash_CM4.ld | 172 + .../gcc/linker/stm32h747xg_flash_CM7.ld | 173 + .../Templates/gcc/startup_stm32h723xx.s | 756 + .../Templates/gcc/startup_stm32h725xx.s | 756 + .../Templates/gcc/startup_stm32h730xx.s | 765 + .../Templates/gcc/startup_stm32h730xxq.s | 765 + .../Templates/gcc/startup_stm32h733xx.s | 765 + .../Templates/gcc/startup_stm32h735xx.s | 765 + .../Templates/gcc/startup_stm32h742xx.s | 5 +- .../Templates/gcc/startup_stm32h743xx.s | 5 +- .../Templates/gcc/startup_stm32h745xx.s | 7 +- .../Templates/gcc/startup_stm32h747xx.s | 5 +- .../Templates/gcc/startup_stm32h750xx.s | 5 +- .../Templates/gcc/startup_stm32h753xx.s | 5 +- .../Templates/gcc/startup_stm32h755xx.s | 5 +- .../Templates/gcc/startup_stm32h757xx.s | 5 +- .../Templates/gcc/startup_stm32h7a3xx.s | 5 +- .../Templates/gcc/startup_stm32h7a3xxq.s | 7 +- .../Templates/gcc/startup_stm32h7b0xx.s | 7 +- .../Templates/gcc/startup_stm32h7b0xxq.s | 5 +- .../Templates/gcc/startup_stm32h7b3xx.s | 5 +- .../Templates/gcc/startup_stm32h7b3xxq.s | 5 +- .../iar/linker/stm32h723xe_axisram.icf | 34 + .../iar/linker/stm32h723xe_dtcmram.icf | 34 + .../iar/linker/stm32h723xe_flash.icf | 34 + .../linker/stm32h723xe_flash_rw_ahbsram.icf | 34 + .../linker/stm32h723xe_flash_rw_axisram.icf | 34 + .../iar/linker/stm32h723xe_flash_rw_sram1.icf | 34 + .../iar/linker/stm32h723xe_flash_rw_sram2.icf | 34 + .../iar/linker/stm32h723xe_sram1.icf | 34 + .../iar/linker/stm32h723xx_axisram.icf | 34 + .../iar/linker/stm32h723xx_dtcmram.icf | 34 + .../iar/linker/stm32h723xx_flash.icf | 34 + .../linker/stm32h723xx_flash_rw_ahbsram.icf | 34 + .../linker/stm32h723xx_flash_rw_axisram.icf | 34 + .../iar/linker/stm32h723xx_flash_rw_sram1.icf | 34 + .../iar/linker/stm32h723xx_flash_rw_sram2.icf | 34 + .../iar/linker/stm32h723xx_sram1.icf | 34 + .../iar/linker/stm32h725xe_axisram.icf | 34 + .../iar/linker/stm32h725xe_dtcmram.icf | 34 + .../iar/linker/stm32h725xe_flash.icf | 34 + .../linker/stm32h725xe_flash_rw_ahbsram.icf | 34 + .../linker/stm32h725xe_flash_rw_axisram.icf | 34 + .../iar/linker/stm32h725xe_flash_rw_sram1.icf | 34 + .../iar/linker/stm32h725xe_flash_rw_sram2.icf | 34 + .../iar/linker/stm32h725xe_sram1.icf | 34 + .../iar/linker/stm32h725xx_axisram.icf | 34 + .../iar/linker/stm32h725xx_dtcmram.icf | 34 + .../iar/linker/stm32h725xx_flash.icf | 34 + .../linker/stm32h725xx_flash_rw_ahbsram.icf | 34 + .../linker/stm32h725xx_flash_rw_axisram.icf | 34 + .../iar/linker/stm32h725xx_flash_rw_sram1.icf | 34 + .../iar/linker/stm32h725xx_flash_rw_sram2.icf | 34 + .../iar/linker/stm32h725xx_sram1.icf | 34 + .../iar/linker/stm32h730xx_axisram.icf | 34 + .../iar/linker/stm32h730xx_dtcmram.icf | 34 + .../iar/linker/stm32h730xx_flash.icf | 34 + .../linker/stm32h730xx_flash_rw_ahbsram.icf | 34 + .../linker/stm32h730xx_flash_rw_axisram.icf | 34 + .../iar/linker/stm32h730xx_flash_rw_sram1.icf | 34 + .../iar/linker/stm32h730xx_flash_rw_sram2.icf | 34 + .../iar/linker/stm32h730xx_sram1.icf | 34 + .../iar/linker/stm32h730xxq_axisram.icf | 34 + .../iar/linker/stm32h730xxq_dtcmram.icf | 34 + .../iar/linker/stm32h730xxq_flash.icf | 34 + .../linker/stm32h730xxq_flash_rw_ahbsram.icf | 34 + .../linker/stm32h730xxq_flash_rw_axisram.icf | 34 + .../linker/stm32h730xxq_flash_rw_sram1.icf | 34 + .../linker/stm32h730xxq_flash_rw_sram2.icf | 34 + .../iar/linker/stm32h730xxq_sram1.icf | 34 + .../iar/linker/stm32h733xx_axisram.icf | 34 + .../iar/linker/stm32h733xx_dtcmram.icf | 34 + .../iar/linker/stm32h733xx_flash.icf | 34 + .../linker/stm32h733xx_flash_rw_ahbsram.icf | 34 + .../linker/stm32h733xx_flash_rw_axisram.icf | 34 + .../iar/linker/stm32h733xx_flash_rw_sram1.icf | 34 + .../iar/linker/stm32h733xx_flash_rw_sram2.icf | 34 + .../iar/linker/stm32h733xx_sram1.icf | 34 + .../iar/linker/stm32h735xx_axisram.icf | 34 + .../iar/linker/stm32h735xx_dtcmram.icf | 34 + .../iar/linker/stm32h735xx_flash.icf | 34 + .../linker/stm32h735xx_flash_rw_ahbsram.icf | 34 + .../linker/stm32h735xx_flash_rw_axisram.icf | 34 + .../iar/linker/stm32h735xx_flash_rw_sram1.icf | 34 + .../iar/linker/stm32h735xx_flash_rw_sram2.icf | 34 + .../iar/linker/stm32h735xx_sram1.icf | 34 + .../iar/linker/stm32h742xg_flash.icf | 37 + .../iar/linker/stm32h742xg_flash_rw_sram1.icf | 37 + .../iar/linker/stm32h742xg_flash_rw_sram2.icf | 37 + .../iar/linker/stm32h742xx_flash_rw_sram2.icf | 4 +- .../iar/linker/stm32h743xg_flash.icf | 37 + .../iar/linker/stm32h743xg_flash_rw_sram1.icf | 37 + .../iar/linker/stm32h743xg_flash_rw_sram2.icf | 37 + .../iar/linker/stm32h743xx_flash_rw_sram2.icf | 4 +- .../iar/linker/stm32h745xg_flash_CM4.icf | 31 + .../iar/linker/stm32h745xg_flash_CM7.icf | 34 + .../iar/linker/stm32h747xg_flash_CM4.icf | 31 + .../iar/linker/stm32h747xg_flash_CM7.icf | 34 + .../iar/linker/stm32h750xx_flash_rw_sram2.icf | 4 +- .../iar/linker/stm32h753xx_flash_rw_sram2.icf | 4 +- .../Templates/iar/startup_stm32h723xx.s | 984 + .../Templates/iar/startup_stm32h725xx.s | 984 + .../Templates/iar/startup_stm32h730xx.s | 999 + .../Templates/iar/startup_stm32h730xxq.s | 999 + .../Templates/iar/startup_stm32h733xx.s | 999 + .../Templates/iar/startup_stm32h735xx.s | 999 + .../Source/Templates/system_stm32h7xx.c | 36 +- .../system_stm32h7xx_dualcore_boot_cm4_cm7.c | 37 +- ...stem_stm32h7xx_dualcore_bootcm4_cm7gated.c | 35 +- ...stem_stm32h7xx_dualcore_bootcm7_cm4gated.c | 35 +- .../Templates/system_stm32h7xx_singlecore.c | 34 +- .../Device/ST/STM32H7xx/_htmresc/mini-st.css | 1700 ++ .../Device/ST/STM32H7xx/_htmresc/st_logo.png | Bin 0 -> 18616 bytes Libraries/LwIP/CHANGELOG | 253 + Libraries/LwIP/CMakeLists.txt | 20 + Libraries/LwIP/FEATURES | 11 + Libraries/LwIP/README | 22 +- Libraries/LwIP/UPGRADING | 35 + Libraries/LwIP/doc/NO_SYS_SampleCode.c | 4 +- Libraries/LwIP/doc/ZeroCopyRx.c | 45 + Libraries/LwIP/doc/doxygen/lwip.Doxyfile | 52 +- .../LwIP/doc/doxygen/lwip.Doxyfile.cmake.in | 2531 ++ Libraries/LwIP/doc/doxygen/main_page.h | 281 +- .../doc/doxygen/output/html/altcp_8c.html | 200 + .../LwIP/doc/doxygen/output/html/altcp_8c.js | 27 + .../doc/doxygen/output/html/altcp_8h.html | 176 + .../LwIP/doc/doxygen/output/html/altcp_8h.js | 27 + .../doxygen/output/html/altcp__alloc_8c.html | 121 + .../doxygen/output/html/altcp__alloc_8c.js | 5 + .../doxygen/output/html/altcp__priv_8h.html | 155 + .../doc/doxygen/output/html/altcp__priv_8h.js | 5 + .../output/html/altcp__proxyconnect_8c.html | 296 + .../output/html/altcp__proxyconnect_8c.js | 8 + .../output/html/altcp__proxyconnect_8h.html | 268 + .../output/html/altcp__proxyconnect_8h.js | 7 + .../doxygen/output/html/altcp__tcp_8c.html | 150 + .../doc/doxygen/output/html/altcp__tcp_8c.js | 4 + .../doxygen/output/html/altcp__tcp_8h.html | 145 + .../doc/doxygen/output/html/altcp__tcp_8h.js | 4 + .../doxygen/output/html/altcp__tls_8h.html | 126 + .../doc/doxygen/output/html/altcp__tls_8h.js | 11 + .../output/html/altcp__tls__mbedtls_8c.html | 105 + .../html/altcp__tls__mbedtls__mem_8c.html | 106 + .../html/altcp__tls__mbedtls__mem_8h.html | 109 + .../html/altcp__tls__mbedtls__opts_8h.html | 162 + .../html/altcp__tls__mbedtls__opts_8h.js | 6 + .../html/altcp__tls__mbedtls__structs_8h.html | 105 + .../doc/doxygen/output/html/annotated.html | 228 + .../doc/doxygen/output/html/annotated_dup.js | 123 + .../LwIP/doc/doxygen/output/html/api_8h.html | 861 + .../LwIP/doc/doxygen/output/html/api_8h.js | 66 + .../doc/doxygen/output/html/api__lib_8c.html | 418 + .../doc/doxygen/output/html/api__lib_8c.js | 28 + .../doc/doxygen/output/html/api__msg_8c.html | 626 + .../doc/doxygen/output/html/api__msg_8c.js | 21 + .../doc/doxygen/output/html/api__msg_8h.html | 629 + .../doc/doxygen/output/html/api__msg_8h.js | 23 + .../doxygen/output/html/apps_2snmp_8h.html | 281 + .../doc/doxygen/output/html/apps_2snmp_8h.js | 31 + .../LwIP/doc/doxygen/output/html/arch_8h.html | 168 + .../LwIP/doc/doxygen/output/html/arch_8h.js | 29 + .../doc/doxygen/output/html/autoip_8c.html | 285 + .../LwIP/doc/doxygen/output/html/autoip_8c.js | 12 + .../doc/doxygen/output/html/autoip_8h.html | 276 + .../LwIP/doc/doxygen/output/html/autoip_8h.js | 13 + .../doc/doxygen/output/html/bridgeif_8c.html | 124 + .../doc/doxygen/output/html/bridgeif_8c.js | 7 + .../doc/doxygen/output/html/bridgeif_8h.html | 146 + .../doc/doxygen/output/html/bridgeif_8h.js | 13 + .../doxygen/output/html/bridgeif__fdb_8c.html | 119 + .../doxygen/output/html/bridgeif__fdb_8c.js | 6 + .../output/html/bridgeif__opts_8h.html | 119 + .../doxygen/output/html/bridgeif__opts_8h.js | 8 + .../LwIP/doc/doxygen/output/html/bugs.html | 102 + .../doc/doxygen/output/html/changelog.html | 4657 +++ .../LwIP/doc/doxygen/output/html/classes.html | 154 + .../html/compat_2posix_2arpa_2inet_8h.html | 103 + .../output/html/compat_2posix_2netdb_8h.html | 103 + .../output/html/compat_2stdc_2errno_8h.html | 103 + .../LwIP/doc/doxygen/output/html/contrib.html | 157 + .../doc/doxygen/output/html/debug_8h.html | 153 + .../LwIP/doc/doxygen/output/html/debug_8h.js | 15 + .../LwIP/doc/doxygen/output/html/def_8c.html | 180 + .../LwIP/doc/doxygen/output/html/def_8c.js | 9 + .../LwIP/doc/doxygen/output/html/def_8h.html | 223 + .../LwIP/doc/doxygen/output/html/def_8h.js | 10 + .../doc/doxygen/output/html/deprecated.html | 111 + .../doc/doxygen/output/html/dhcp6_8c.html | 228 + .../LwIP/doc/doxygen/output/html/dhcp6_8c.js | 12 + .../doc/doxygen/output/html/dhcp6_8h.html | 224 + .../LwIP/doc/doxygen/output/html/dhcp6_8h.js | 12 + .../LwIP/doc/doxygen/output/html/dhcp_8c.html | 392 + .../LwIP/doc/doxygen/output/html/dhcp_8c.js | 22 + .../LwIP/doc/doxygen/output/html/dhcp_8h.html | 336 + .../LwIP/doc/doxygen/output/html/dhcp_8h.js | 20 + .../dir_04f2ecc425faf0d475a3caf484e551f3.html | 100 + .../dir_149963277126306875d8bfe8322084f3.html | 106 + .../dir_149963277126306875d8bfe8322084f3.js | 4 + .../dir_1cb496c74bbaf54ecc99133e1c434e0c.html | 112 + .../dir_1cb496c74bbaf54ecc99133e1c434e0c.js | 7 + .../dir_1e445e767c368c70d58af8a0b7552719.html | 104 + .../dir_1e445e767c368c70d58af8a0b7552719.js | 5 + .../dir_34adf996f92d0eef72c45a7167a966e6.html | 113 + .../dir_34adf996f92d0eef72c45a7167a966e6.js | 6 + .../dir_403e202f99dba154c685be932a8e0c34.html | 107 + .../dir_403e202f99dba154c685be932a8e0c34.js | 4 + .../dir_439fcb6f68ea6a3dc0078b338960fd8f.html | 108 + .../dir_439fcb6f68ea6a3dc0078b338960fd8f.js | 5 + .../dir_460c501b2432fc107adcb38111835e48.html | 124 + .../dir_460c501b2432fc107adcb38111835e48.js | 13 + .../dir_4b846c6b6971d2800eff93d75504accd.html | 106 + .../dir_4b846c6b6971d2800eff93d75504accd.js | 4 + .../dir_4e6b3cf33a61b6caac9c8ac30c866f37.html | 209 + .../dir_4e6b3cf33a61b6caac9c8ac30c866f37.js | 57 + .../dir_53adf0b982dc8545998aae3f283a5a58.html | 104 + .../dir_53adf0b982dc8545998aae3f283a5a58.js | 13 + .../dir_56d2b6ddbb44630b0fd661af6321f9c4.html | 106 + .../dir_56d2b6ddbb44630b0fd661af6321f9c4.js | 4 + .../dir_68267d1309a1af8e8297ef4c3efbcdba.html | 108 + .../dir_68267d1309a1af8e8297ef4c3efbcdba.js | 8 + .../dir_6aa605ad180e7b166767bf4f86888ab5.html | 113 + .../dir_6aa605ad180e7b166767bf4f86888ab5.js | 6 + .../dir_6b1b06896a870ebfb9c854c4c71f4ff5.html | 106 + .../dir_6b1b06896a870ebfb9c854c4c71f4ff5.js | 4 + .../dir_8da39adb2a11af660bdd7075b7323870.html | 106 + .../dir_8da39adb2a11af660bdd7075b7323870.js | 4 + .../dir_900e6f7ff90690cb8edb53323dd38d80.html | 123 + .../dir_900e6f7ff90690cb8edb53323dd38d80.js | 12 + .../dir_a32e111ee6805cfc63488fd2d37f2390.html | 120 + .../dir_a32e111ee6805cfc63488fd2d37f2390.js | 11 + .../dir_a840c1e301b5b5eb1d549b1f600a8505.html | 100 + .../dir_aebb8dcc11953d78e620bbef0b9e2183.html | 147 + .../dir_aebb8dcc11953d78e620bbef0b9e2183.js | 25 + .../dir_b0856f6b0d80ccb263b2f415c91f9e17.html | 106 + .../dir_b0856f6b0d80ccb263b2f415c91f9e17.js | 6 + .../dir_b42baff89a1adc9a57da7decb1835b6b.html | 106 + .../dir_b42baff89a1adc9a57da7decb1835b6b.js | 4 + .../dir_c62aba36f6630fea5cd7fe1c941850d4.html | 106 + .../dir_c62aba36f6630fea5cd7fe1c941850d4.js | 4 + .../dir_c9a67764bf8a12cf6b427bb859cbcd0b.html | 127 + .../dir_c9a67764bf8a12cf6b427bb859cbcd0b.js | 14 + .../dir_da61e3e9a357748887e3ca8d7c5a0c16.html | 122 + .../dir_da61e3e9a357748887e3ca8d7c5a0c16.js | 12 + .../dir_da9c6f43d3cd00be3de224bac907a425.html | 122 + .../dir_da9c6f43d3cd00be3de224bac907a425.js | 12 + .../dir_dfacd4b005f6a743295cd1d76eff7420.html | 106 + .../dir_dfacd4b005f6a743295cd1d76eff7420.js | 4 + .../dir_e68e8157741866f444e17edd764ebbae.html | 104 + .../dir_e7856a6aeaebbc124e80ad9550aedba4.html | 106 + .../dir_e7856a6aeaebbc124e80ad9550aedba4.js | 4 + .../dir_ed91d3856030f1b493eca503ef5b96f9.html | 100 + .../dir_f9284811ac594eafdc3134d5f8b945cb.html | 158 + .../dir_f9284811ac594eafdc3134d5f8b945cb.js | 33 + .../dir_fa0f2b7ac208069fc8d28c28af349d8d.html | 140 + .../dir_fa0f2b7ac208069fc8d28c28af349d8d.js | 21 + .../dir_fb3f7e43f39ddb210bd1444e66d055f1.html | 152 + .../dir_fb3f7e43f39ddb210bd1444e66d055f1.js | 27 + .../dir_fe219fca207b878205c0dd92278d118b.html | 109 + .../dir_fe219fca207b878205c0dd92278d118b.js | 7 + .../dir_febe3a637907666e8b25366ae60efc0b.html | 106 + .../dir_febe3a637907666e8b25366ae60efc0b.js | 4 + .../LwIP/doc/doxygen/output/html/dns_8c.html | 239 + .../LwIP/doc/doxygen/output/html/dns_8c.js | 16 + .../LwIP/doc/doxygen/output/html/dns_8h.html | 221 + .../LwIP/doc/doxygen/output/html/dns_8h.js | 11 + .../LwIP/doc/doxygen/output/html/doxygen.css | 1596 + .../doc/doxygen/output/html/dynsections.js | 97 + .../LwIP/doc/doxygen/output/html/err_8c.html | 106 + .../LwIP/doc/doxygen/output/html/err_8h.html | 141 + .../LwIP/doc/doxygen/output/html/err_8h.js | 23 + .../doc/doxygen/output/html/etharp_8c.html | 542 + .../LwIP/doc/doxygen/output/html/etharp_8c.js | 15 + .../doc/doxygen/output/html/ethernet_8c.html | 122 + .../doc/doxygen/output/html/ethernet_8c.js | 5 + .../doc/doxygen/output/html/ethip6_8c.html | 172 + .../LwIP/doc/doxygen/output/html/ethip6_8c.js | 4 + .../doc/doxygen/output/html/ethip6_8h.html | 165 + .../LwIP/doc/doxygen/output/html/ethip6_8h.js | 4 + .../LwIP/doc/doxygen/output/html/files.html | 351 + .../LwIP/doc/doxygen/output/html/files.js | 4 + .../doc/doxygen/output/html/functions.html | 111 + .../doc/doxygen/output/html/functions_a.html | 153 + .../doc/doxygen/output/html/functions_b.html | 117 + .../doc/doxygen/output/html/functions_c.html | 169 + .../doc/doxygen/output/html/functions_d.html | 124 + .../doc/doxygen/output/html/functions_dup.js | 28 + .../doc/doxygen/output/html/functions_e.html | 115 + .../doc/doxygen/output/html/functions_f.html | 113 + .../doc/doxygen/output/html/functions_g.html | 111 + .../doc/doxygen/output/html/functions_h.html | 105 + .../doc/doxygen/output/html/functions_i.html | 186 + .../doc/doxygen/output/html/functions_j.html | 105 + .../doc/doxygen/output/html/functions_k.html | 102 + .../doc/doxygen/output/html/functions_l.html | 149 + .../doc/doxygen/output/html/functions_m.html | 158 + .../doc/doxygen/output/html/functions_n.html | 179 + .../doc/doxygen/output/html/functions_o.html | 129 + .../doc/doxygen/output/html/functions_p.html | 164 + .../doc/doxygen/output/html/functions_q.html | 112 + .../doc/doxygen/output/html/functions_r.html | 154 + .../doc/doxygen/output/html/functions_s.html | 185 + .../doc/doxygen/output/html/functions_t.html | 167 + .../doc/doxygen/output/html/functions_u.html | 118 + .../doc/doxygen/output/html/functions_v.html | 117 + .../doxygen/output/html/functions_vars.html | 111 + .../doc/doxygen/output/html/functions_vars.js | 28 + .../doxygen/output/html/functions_vars_a.html | 153 + .../doxygen/output/html/functions_vars_b.html | 117 + .../doxygen/output/html/functions_vars_c.html | 169 + .../doxygen/output/html/functions_vars_d.html | 124 + .../doxygen/output/html/functions_vars_e.html | 115 + .../doxygen/output/html/functions_vars_f.html | 113 + .../doxygen/output/html/functions_vars_g.html | 111 + .../doxygen/output/html/functions_vars_h.html | 105 + .../doxygen/output/html/functions_vars_i.html | 186 + .../doxygen/output/html/functions_vars_j.html | 105 + .../doxygen/output/html/functions_vars_k.html | 102 + .../doxygen/output/html/functions_vars_l.html | 149 + .../doxygen/output/html/functions_vars_m.html | 158 + .../doxygen/output/html/functions_vars_n.html | 179 + .../doxygen/output/html/functions_vars_o.html | 129 + .../doxygen/output/html/functions_vars_p.html | 164 + .../doxygen/output/html/functions_vars_q.html | 112 + .../doxygen/output/html/functions_vars_r.html | 154 + .../doxygen/output/html/functions_vars_s.html | 185 + .../doxygen/output/html/functions_vars_t.html | 167 + .../doxygen/output/html/functions_vars_u.html | 118 + .../doxygen/output/html/functions_vars_v.html | 117 + .../doxygen/output/html/functions_vars_w.html | 123 + .../doxygen/output/html/functions_vars_z.html | 114 + .../doc/doxygen/output/html/functions_w.html | 123 + .../doc/doxygen/output/html/functions_z.html | 114 + .../LwIP/doc/doxygen/output/html/globals.html | 326 + .../doc/doxygen/output/html/globals_b.html | 161 + .../doc/doxygen/output/html/globals_c.html | 138 + .../doc/doxygen/output/html/globals_d.html | 329 + .../doc/doxygen/output/html/globals_defs.html | 153 + .../doc/doxygen/output/html/globals_defs.js | 22 + .../doxygen/output/html/globals_defs_b.html | 126 + .../doxygen/output/html/globals_defs_c.html | 138 + .../doxygen/output/html/globals_defs_d.html | 207 + .../doxygen/output/html/globals_defs_e.html | 129 + .../doxygen/output/html/globals_defs_f.html | 108 + .../doxygen/output/html/globals_defs_g.html | 117 + .../doxygen/output/html/globals_defs_h.html | 159 + .../doxygen/output/html/globals_defs_i.html | 629 + .../doxygen/output/html/globals_defs_l.html | 876 + .../doxygen/output/html/globals_defs_m.html | 306 + .../doxygen/output/html/globals_defs_n.html | 339 + .../doxygen/output/html/globals_defs_p.html | 183 + .../doxygen/output/html/globals_defs_r.html | 123 + .../doxygen/output/html/globals_defs_s.html | 375 + .../doxygen/output/html/globals_defs_t.html | 267 + .../doxygen/output/html/globals_defs_u.html | 114 + .../doxygen/output/html/globals_defs_w.html | 105 + .../doxygen/output/html/globals_defs_z.html | 102 + .../doc/doxygen/output/html/globals_dup.js | 22 + .../doc/doxygen/output/html/globals_e.html | 288 + .../doc/doxygen/output/html/globals_enum.html | 239 + .../doc/doxygen/output/html/globals_eval.html | 567 + .../doc/doxygen/output/html/globals_f.html | 108 + .../doc/doxygen/output/html/globals_func.html | 269 + .../doc/doxygen/output/html/globals_func.js | 18 + .../doxygen/output/html/globals_func_b.html | 131 + .../doxygen/output/html/globals_func_d.html | 203 + .../doxygen/output/html/globals_func_e.html | 147 + .../doxygen/output/html/globals_func_h.html | 136 + .../doxygen/output/html/globals_func_i.html | 327 + .../doxygen/output/html/globals_func_l.html | 283 + .../doxygen/output/html/globals_func_m.html | 275 + .../doxygen/output/html/globals_func_n.html | 445 + .../doxygen/output/html/globals_func_p.html | 223 + .../doxygen/output/html/globals_func_r.html | 183 + .../doxygen/output/html/globals_func_s.html | 534 + .../doxygen/output/html/globals_func_t.html | 399 + .../doxygen/output/html/globals_func_u.html | 159 + .../doxygen/output/html/globals_func_z.html | 103 + .../doc/doxygen/output/html/globals_g.html | 117 + .../doc/doxygen/output/html/globals_h.html | 239 + .../doc/doxygen/output/html/globals_i.html | 1039 + .../doc/doxygen/output/html/globals_l.html | 1196 + .../doc/doxygen/output/html/globals_m.html | 536 + .../doc/doxygen/output/html/globals_n.html | 771 + .../doc/doxygen/output/html/globals_p.html | 345 + .../doc/doxygen/output/html/globals_r.html | 219 + .../doc/doxygen/output/html/globals_s.html | 847 + .../doc/doxygen/output/html/globals_t.html | 623 + .../doc/doxygen/output/html/globals_type.html | 298 + .../doc/doxygen/output/html/globals_u.html | 177 + .../doc/doxygen/output/html/globals_vars.html | 211 + .../doc/doxygen/output/html/globals_w.html | 105 + .../doc/doxygen/output/html/globals_z.html | 106 + .../doc/doxygen/output/html/group__altcp.html | 824 + .../doc/doxygen/output/html/group__altcp.js | 32 + .../output/html/group__altcp__api.html | 132 + .../doxygen/output/html/group__altcp__api.js | 4 + .../output/html/group__altcp__tls.html | 399 + .../doxygen/output/html/group__altcp__tls.js | 11 + .../doc/doxygen/output/html/group__api.html | 122 + .../doc/doxygen/output/html/group__api.js | 6 + .../doc/doxygen/output/html/group__apps.html | 126 + .../doc/doxygen/output/html/group__apps.js | 13 + .../doxygen/output/html/group__autoip.html | 209 + .../doc/doxygen/output/html/group__autoip.js | 6 + .../doxygen/output/html/group__bridgeif.html | 411 + .../doxygen/output/html/group__bridgeif.js | 18 + .../output/html/group__bridgeif__fdb.html | 198 + .../output/html/group__bridgeif__fdb.js | 6 + .../output/html/group__bridgeif__opts.html | 192 + .../output/html/group__bridgeif__opts.js | 8 + .../html/group__callbackstyle__api.html | 123 + .../output/html/group__callbackstyle__api.js | 11 + .../html/group__compiler__abstraction.html | 681 + .../html/group__compiler__abstraction.js | 29 + .../output/html/group__debugging__levels.html | 281 + .../output/html/group__debugging__levels.js | 13 + .../doc/doxygen/output/html/group__dhcp4.html | 339 + .../doc/doxygen/output/html/group__dhcp4.js | 11 + .../doc/doxygen/output/html/group__dhcp6.html | 251 + .../doc/doxygen/output/html/group__dhcp6.js | 8 + .../doc/doxygen/output/html/group__dns.html | 305 + .../doc/doxygen/output/html/group__dns.js | 7 + .../doxygen/output/html/group__ethernet.html | 168 + .../doxygen/output/html/group__ethernet.js | 4 + .../doc/doxygen/output/html/group__httpc.html | 429 + .../doc/doxygen/output/html/group__httpc.js | 22 + .../doc/doxygen/output/html/group__httpd.html | 507 + .../doc/doxygen/output/html/group__httpd.js | 15 + .../output/html/group__httpd__opts.html | 773 + .../doxygen/output/html/group__httpd__opts.js | 41 + .../doc/doxygen/output/html/group__iana.html | 195 + .../doc/doxygen/output/html/group__iana.js | 22 + .../doc/doxygen/output/html/group__ieee.html | 179 + .../doc/doxygen/output/html/group__ieee.js | 21 + .../doxygen/output/html/group__if__api.html | 172 + .../doc/doxygen/output/html/group__if__api.js | 5 + .../doc/doxygen/output/html/group__igmp.html | 290 + .../doc/doxygen/output/html/group__igmp.js | 8 + .../output/html/group__infrastructure.html | 118 + .../output/html/group__infrastructure.js | 9 + .../html/group__infrastructure__errors.html | 205 + .../html/group__infrastructure__errors.js | 23 + .../doc/doxygen/output/html/group__ip.html | 375 + .../LwIP/doc/doxygen/output/html/group__ip.js | 10 + .../doc/doxygen/output/html/group__ip4.html | 138 + .../doc/doxygen/output/html/group__ip4.js | 7 + .../doxygen/output/html/group__ip4addr.html | 485 + .../doc/doxygen/output/html/group__ip4addr.js | 18 + .../doc/doxygen/output/html/group__ip6.html | 165 + .../doc/doxygen/output/html/group__ip6.js | 7 + .../output/html/group__ip6__zones.html | 583 + .../doxygen/output/html/group__ip6__zones.js | 23 + .../doxygen/output/html/group__ip6addr.html | 471 + .../doc/doxygen/output/html/group__ip6addr.js | 15 + .../doxygen/output/html/group__ipaddr.html | 1004 + .../doc/doxygen/output/html/group__ipaddr.js | 42 + .../doc/doxygen/output/html/group__iperf.html | 293 + .../doc/doxygen/output/html/group__iperf.js | 8 + .../doc/doxygen/output/html/group__lwip.html | 116 + .../doc/doxygen/output/html/group__lwip.js | 8 + .../output/html/group__lwip__assertions.html | 124 + .../output/html/group__lwip__assertions.js | 4 + .../output/html/group__lwip__nosys.html | 261 + .../doxygen/output/html/group__lwip__nosys.js | 8 + .../output/html/group__lwip__opts.html | 122 + .../doxygen/output/html/group__lwip__opts.js | 11 + .../output/html/group__lwip__opts__arp.html | 277 + .../output/html/group__lwip__opts__arp.js | 13 + .../html/group__lwip__opts__autoip.html | 158 + .../output/html/group__lwip__opts__autoip.js | 6 + .../html/group__lwip__opts__callback.html | 114 + .../html/group__lwip__opts__callback.js | 7 + .../html/group__lwip__opts__checksum.html | 311 + .../html/group__lwip__opts__checksum.js | 15 + .../output/html/group__lwip__opts__debug.html | 114 + .../output/html/group__lwip__opts__debug.js | 7 + .../html/group__lwip__opts__debugmsg.html | 708 + .../html/group__lwip__opts__debugmsg.js | 39 + .../output/html/group__lwip__opts__dhcp.html | 209 + .../output/html/group__lwip__opts__dhcp.js | 9 + .../html/group__lwip__opts__dhcpv6.html | 209 + .../output/html/group__lwip__opts__dhcpv6.js | 9 + .../output/html/group__lwip__opts__dns.html | 278 + .../output/html/group__lwip__opts__dns.js | 13 + .../output/html/group__lwip__opts__hooks.html | 1180 + .../output/html/group__lwip__opts__hooks.js | 26 + .../output/html/group__lwip__opts__icmp.html | 175 + .../output/html/group__lwip__opts__icmp.js | 7 + .../output/html/group__lwip__opts__icmp6.html | 158 + .../output/html/group__lwip__opts__icmp6.js | 6 + .../output/html/group__lwip__opts__igmp.html | 124 + .../output/html/group__lwip__opts__igmp.js | 4 + .../group__lwip__opts__infrastructure.html | 128 + .../html/group__lwip__opts__infrastructure.js | 14 + .../output/html/group__lwip__opts__ipv4.html | 308 + .../output/html/group__lwip__opts__ipv4.js | 19 + .../output/html/group__lwip__opts__ipv6.html | 323 + .../output/html/group__lwip__opts__ipv6.js | 19 + .../output/html/group__lwip__opts__lock.html | 221 + .../output/html/group__lwip__opts__lock.js | 9 + .../output/html/group__lwip__opts__loop.html | 192 + .../output/html/group__lwip__opts__loop.js | 8 + .../output/html/group__lwip__opts__mem.html | 333 + .../output/html/group__lwip__opts__mem.js | 16 + .../html/group__lwip__opts__memcpy.html | 218 + .../output/html/group__lwip__opts__memcpy.js | 6 + .../output/html/group__lwip__opts__memp.html | 532 + .../output/html/group__lwip__opts__memp.js | 28 + .../output/html/group__lwip__opts__mib2.html | 124 + .../output/html/group__lwip__opts__mib2.js | 4 + .../output/html/group__lwip__opts__mld6.html | 141 + .../output/html/group__lwip__opts__mld6.js | 5 + .../html/group__lwip__opts__multicast.html | 124 + .../html/group__lwip__opts__multicast.js | 4 + .../output/html/group__lwip__opts__nd6.html | 379 + .../output/html/group__lwip__opts__nd6.js | 19 + .../html/group__lwip__opts__netconn.html | 182 + .../output/html/group__lwip__opts__netconn.js | 7 + .../output/html/group__lwip__opts__netif.html | 284 + .../output/html/group__lwip__opts__netif.js | 14 + .../output/html/group__lwip__opts__nosys.html | 124 + .../output/html/group__lwip__opts__nosys.js | 4 + .../output/html/group__lwip__opts__pbuf.html | 175 + .../output/html/group__lwip__opts__pbuf.js | 7 + .../output/html/group__lwip__opts__perf.html | 125 + .../output/html/group__lwip__opts__perf.js | 4 + .../output/html/group__lwip__opts__raw.html | 141 + .../output/html/group__lwip__opts__raw.js | 5 + .../html/group__lwip__opts__socket.html | 396 + .../output/html/group__lwip__opts__socket.js | 20 + .../output/html/group__lwip__opts__stats.html | 430 + .../output/html/group__lwip__opts__stats.js | 22 + .../output/html/group__lwip__opts__tcp.html | 552 + .../output/html/group__lwip__opts__tcp.js | 29 + .../html/group__lwip__opts__thread.html | 365 + .../output/html/group__lwip__opts__thread.js | 18 + .../group__lwip__opts__threadsafe__apis.html | 110 + .../group__lwip__opts__threadsafe__apis.js | 5 + .../html/group__lwip__opts__timers.html | 141 + .../output/html/group__lwip__opts__timers.js | 5 + .../output/html/group__lwip__opts__udp.html | 175 + .../output/html/group__lwip__opts__udp.js | 7 + .../doxygen/output/html/group__lwip__os.html | 439 + .../doxygen/output/html/group__lwip__os.js | 12 + .../output/html/group__lwip__version.html | 247 + .../output/html/group__lwip__version.js | 11 + .../doc/doxygen/output/html/group__mdns.html | 659 + .../doc/doxygen/output/html/group__mdns.js | 15 + .../output/html/group__mdns__opts.html | 158 + .../doxygen/output/html/group__mdns__opts.js | 6 + .../doxygen/output/html/group__mempool.html | 255 + .../doc/doxygen/output/html/group__mempool.js | 8 + .../doc/doxygen/output/html/group__mld6.html | 295 + .../doc/doxygen/output/html/group__mld6.js | 8 + .../doc/doxygen/output/html/group__mqtt.html | 955 + .../doc/doxygen/output/html/group__mqtt.js | 43 + .../output/html/group__mqtt__opts.html | 209 + .../doxygen/output/html/group__mqtt__opts.js | 9 + .../doxygen/output/html/group__netbiosns.html | 157 + .../doxygen/output/html/group__netbiosns.js | 6 + .../output/html/group__netbiosns__opts.html | 142 + .../output/html/group__netbiosns__opts.js | 5 + .../doxygen/output/html/group__netbuf.html | 409 + .../doc/doxygen/output/html/group__netbuf.js | 12 + .../doxygen/output/html/group__netconn.html | 115 + .../doc/doxygen/output/html/group__netconn.js | 7 + .../output/html/group__netconn__common.html | 619 + .../output/html/group__netconn__common.js | 27 + .../output/html/group__netconn__tcp.html | 482 + .../output/html/group__netconn__tcp.js | 12 + .../output/html/group__netconn__udp.html | 334 + .../output/html/group__netconn__udp.js | 8 + .../doxygen/output/html/group__netdbapi.html | 243 + .../doxygen/output/html/group__netdbapi.js | 7 + .../doc/doxygen/output/html/group__netif.html | 883 + .../doc/doxygen/output/html/group__netif.js | 53 + .../doxygen/output/html/group__netif__cd.html | 202 + .../doxygen/output/html/group__netif__cd.js | 6 + .../output/html/group__netif__flags.html | 226 + .../output/html/group__netif__flags.js | 10 + .../output/html/group__netif__ip4.html | 401 + .../doxygen/output/html/group__netif__ip4.js | 13 + .../output/html/group__netif__ip6.html | 346 + .../doxygen/output/html/group__netif__ip6.js | 9 + .../output/html/group__netif__mib2.html | 258 + .../doxygen/output/html/group__netif__mib2.js | 20 + .../doxygen/output/html/group__netifapi.html | 113 + .../doxygen/output/html/group__netifapi.js | 6 + .../output/html/group__netifapi__autoip.html | 150 + .../output/html/group__netifapi__autoip.js | 5 + .../output/html/group__netifapi__dhcp4.html | 234 + .../output/html/group__netifapi__dhcp4.js | 9 + .../output/html/group__netifapi__netif.html | 423 + .../output/html/group__netifapi__netif.js | 13 + .../doxygen/output/html/group__netifs.html | 118 + .../doc/doxygen/output/html/group__netifs.js | 9 + .../doc/doxygen/output/html/group__pbuf.html | 1187 + .../doc/doxygen/output/html/group__pbuf.js | 38 + .../doc/doxygen/output/html/group__perf.html | 103 + .../doc/doxygen/output/html/group__ppp.html | 628 + .../doxygen/output/html/group__raw__raw.html | 540 + .../doxygen/output/html/group__raw__raw.js | 14 + .../doxygen/output/html/group__rfc7668if.html | 363 + .../doxygen/output/html/group__rfc7668if.js | 9 + .../output/html/group__sequential__api.html | 111 + .../output/html/group__sequential__api.js | 5 + .../doxygen/output/html/group__sixlowpan.html | 307 + .../doxygen/output/html/group__sixlowpan.js | 9 + .../doxygen/output/html/group__slipif.html | 281 + .../doc/doxygen/output/html/group__slipif.js | 8 + .../doc/doxygen/output/html/group__smtp.html | 390 + .../doc/doxygen/output/html/group__smtp.js | 11 + .../output/html/group__smtp__opts.html | 260 + .../doxygen/output/html/group__smtp__opts.js | 12 + .../doc/doxygen/output/html/group__snmp.html | 184 + .../doc/doxygen/output/html/group__snmp.js | 7 + .../output/html/group__snmp__core.html | 329 + .../doxygen/output/html/group__snmp__core.js | 12 + .../output/html/group__snmp__mib2.html | 373 + .../doxygen/output/html/group__snmp__mib2.js | 10 + .../output/html/group__snmp__opts.html | 553 + .../doxygen/output/html/group__snmp__opts.js | 29 + .../output/html/group__snmp__traps.html | 420 + .../doxygen/output/html/group__snmp__traps.js | 14 + .../doc/doxygen/output/html/group__sntp.html | 318 + .../doc/doxygen/output/html/group__sntp.js | 12 + .../output/html/group__sntp__opts.html | 421 + .../doxygen/output/html/group__sntp__opts.js | 20 + .../doxygen/output/html/group__socket.html | 1210 + .../doc/doxygen/output/html/group__socket.js | 34 + .../output/html/group__sys__layer.html | 118 + .../doxygen/output/html/group__sys__layer.js | 9 + .../doxygen/output/html/group__sys__mbox.html | 417 + .../doxygen/output/html/group__sys__mbox.js | 12 + .../doxygen/output/html/group__sys__misc.html | 215 + .../doxygen/output/html/group__sys__misc.js | 6 + .../output/html/group__sys__mutex.html | 256 + .../doxygen/output/html/group__sys__mutex.js | 9 + .../output/html/group__sys__nonstandard.html | 250 + .../output/html/group__sys__nonstandard.js | 7 + .../doxygen/output/html/group__sys__os.html | 121 + .../doc/doxygen/output/html/group__sys__os.js | 7 + .../doxygen/output/html/group__sys__prot.html | 176 + .../doxygen/output/html/group__sys__prot.js | 6 + .../doxygen/output/html/group__sys__sem.html | 281 + .../doxygen/output/html/group__sys__sem.js | 9 + .../doxygen/output/html/group__sys__time.html | 128 + .../doxygen/output/html/group__sys__time.js | 4 + .../doxygen/output/html/group__tcp__raw.html | 1088 + .../doxygen/output/html/group__tcp__raw.js | 32 + .../output/html/group__tcp__raw__extargs.html | 266 + .../output/html/group__tcp__raw__extargs.js | 7 + .../doc/doxygen/output/html/group__tftp.html | 167 + .../doc/doxygen/output/html/group__tftp.js | 12 + .../output/html/group__tftp__opts.html | 226 + .../doxygen/output/html/group__tftp__opts.js | 10 + .../doxygen/output/html/group__udp__raw.html | 627 + .../doxygen/output/html/group__udp__raw.js | 15 + .../doc/doxygen/output/html/group__zepif.html | 129 + .../doc/doxygen/output/html/group__zepif.js | 4 + .../doxygen/output/html/http__client_8c.html | 178 + .../doxygen/output/html/http__client_8c.js | 8 + .../doxygen/output/html/http__client_8h.html | 156 + .../doxygen/output/html/http__client_8h.js | 22 + .../doc/doxygen/output/html/httpd_8c.html | 206 + .../LwIP/doc/doxygen/output/html/httpd_8c.js | 11 + .../doc/doxygen/output/html/httpd_8h.html | 163 + .../LwIP/doc/doxygen/output/html/httpd_8h.js | 14 + .../doxygen/output/html/httpd__opts_8h.html | 186 + .../doc/doxygen/output/html/httpd__opts_8h.js | 41 + .../LwIP/doc/doxygen/output/html/iana_8h.html | 132 + .../LwIP/doc/doxygen/output/html/iana_8h.js | 22 + .../doc/doxygen/output/html/icmp6_8c.html | 377 + .../LwIP/doc/doxygen/output/html/icmp6_8c.js | 9 + .../doc/doxygen/output/html/icmp6_8h.html | 369 + .../LwIP/doc/doxygen/output/html/icmp6_8h.js | 9 + .../LwIP/doc/doxygen/output/html/icmp_8c.html | 254 + .../LwIP/doc/doxygen/output/html/icmp_8c.js | 7 + .../LwIP/doc/doxygen/output/html/icmp_8h.html | 300 + .../LwIP/doc/doxygen/output/html/icmp_8h.js | 18 + .../doxygen/output/html/ieee802154_8h.html | 113 + .../doc/doxygen/output/html/ieee802154_8h.js | 4 + .../LwIP/doc/doxygen/output/html/ieee_8h.html | 131 + .../LwIP/doc/doxygen/output/html/ieee_8h.js | 21 + .../LwIP/doc/doxygen/output/html/if_8h.html | 103 + .../doc/doxygen/output/html/if__api_8c.html | 117 + .../doc/doxygen/output/html/if__api_8c.js | 5 + .../doc/doxygen/output/html/if__api_8h.html | 114 + .../doc/doxygen/output/html/if__api_8h.js | 5 + .../LwIP/doc/doxygen/output/html/igmp_8c.html | 335 + .../LwIP/doc/doxygen/output/html/igmp_8c.js | 14 + .../LwIP/doc/doxygen/output/html/igmp_8h.html | 340 + .../LwIP/doc/doxygen/output/html/igmp_8h.js | 16 + .../LwIP/doc/doxygen/output/html/index.html | 205 + .../doc/doxygen/output/html/inet6_8c.html | 129 + .../LwIP/doc/doxygen/output/html/inet6_8c.js | 4 + .../doxygen/output/html/inet__chksum_8c.html | 272 + .../doxygen/output/html/inet__chksum_8c.js | 6 + .../doxygen/output/html/inet__chksum_8h.html | 314 + .../doxygen/output/html/inet__chksum_8h.js | 8 + .../LwIP/doc/doxygen/output/html/init_8c.html | 135 + .../LwIP/doc/doxygen/output/html/init_8c.js | 4 + .../LwIP/doc/doxygen/output/html/init_8h.html | 131 + .../LwIP/doc/doxygen/output/html/init_8h.js | 12 + .../LwIP/doc/doxygen/output/html/ip4_8c.html | 622 + .../LwIP/doc/doxygen/output/html/ip4_8c.js | 14 + .../LwIP/doc/doxygen/output/html/ip4_8h.html | 590 + .../LwIP/doc/doxygen/output/html/ip4_8h.js | 13 + .../doc/doxygen/output/html/ip4__addr_8c.html | 320 + .../doc/doxygen/output/html/ip4__addr_8c.js | 9 + .../doc/doxygen/output/html/ip4__addr_8h.html | 800 + .../doc/doxygen/output/html/ip4__addr_8h.js | 28 + .../doc/doxygen/output/html/ip4__frag_8c.html | 265 + .../doc/doxygen/output/html/ip4__frag_8c.js | 9 + .../doc/doxygen/output/html/ip4__frag_8h.html | 220 + .../doc/doxygen/output/html/ip4__frag_8h.js | 8 + .../LwIP/doc/doxygen/output/html/ip6_8c.html | 458 + .../LwIP/doc/doxygen/output/html/ip6_8c.js | 10 + .../LwIP/doc/doxygen/output/html/ip6_8h.html | 447 + .../LwIP/doc/doxygen/output/html/ip6_8h.js | 10 + .../doc/doxygen/output/html/ip6__addr_8c.html | 227 + .../doc/doxygen/output/html/ip6__addr_8c.js | 6 + .../doc/doxygen/output/html/ip6__addr_8h.html | 933 + .../doc/doxygen/output/html/ip6__addr_8h.js | 31 + .../doc/doxygen/output/html/ip6__frag_8c.html | 241 + .../doc/doxygen/output/html/ip6__frag_8c.js | 8 + .../doc/doxygen/output/html/ip6__frag_8h.html | 237 + .../doc/doxygen/output/html/ip6__frag_8h.js | 9 + .../doc/doxygen/output/html/ip6__zone_8h.html | 153 + .../doc/doxygen/output/html/ip6__zone_8h.js | 23 + .../LwIP/doc/doxygen/output/html/ip_8c.html | 141 + .../LwIP/doc/doxygen/output/html/ip_8c.js | 8 + .../LwIP/doc/doxygen/output/html/ip_8h.html | 736 + .../LwIP/doc/doxygen/output/html/ip_8h.js | 34 + .../doc/doxygen/output/html/ip__addr_8h.html | 270 + .../doc/doxygen/output/html/ip__addr_8h.js | 65 + .../LwIP/doc/doxygen/output/html/jquery.js | 87 + .../doc/doxygen/output/html/lowpan6_8c.html | 197 + .../doc/doxygen/output/html/lowpan6_8c.js | 13 + .../doc/doxygen/output/html/lowpan6_8h.html | 204 + .../doc/doxygen/output/html/lowpan6_8h.js | 12 + .../doxygen/output/html/lowpan6__ble_8c.html | 331 + .../doxygen/output/html/lowpan6__ble_8c.js | 14 + .../doxygen/output/html/lowpan6__ble_8h.html | 326 + .../doxygen/output/html/lowpan6__ble_8h.js | 14 + .../output/html/lowpan6__common_8c.html | 110 + .../output/html/lowpan6__common_8h.html | 115 + .../doxygen/output/html/lowpan6__common_8h.js | 4 + .../doxygen/output/html/lowpan6__opts_8h.html | 311 + .../doxygen/output/html/lowpan6__opts_8h.js | 14 + .../doxygen/output/html/lwip_2errno_8h.html | 103 + .../doxygen/output/html/lwip_2etharp_8h.html | 508 + .../doxygen/output/html/lwip_2etharp_8h.js | 14 + .../doxygen/output/html/lwip_2inet_8h.html | 240 + .../doc/doxygen/output/html/lwip_2inet_8h.js | 10 + .../doxygen/output/html/lwip_2netdb_8h.html | 341 + .../doc/doxygen/output/html/lwip_2netdb_8h.js | 13 + .../output/html/lwip_2prot_2etharp_8h.html | 183 + .../output/html/lwip_2prot_2etharp_8h.js | 7 + .../output/html/lwip_2prot_2ethernet_8h.html | 212 + .../output/html/lwip_2prot_2ethernet_8h.js | 9 + .../doc/doxygen/output/html/lwiperf_8c.html | 225 + .../doc/doxygen/output/html/lwiperf_8c.js | 15 + .../doc/doxygen/output/html/lwiperf_8h.html | 220 + .../doc/doxygen/output/html/lwiperf_8h.js | 22 + .../LwIP/doc/doxygen/output/html/mdns_8c.html | 349 + .../LwIP/doc/doxygen/output/html/mdns_8c.js | 23 + .../LwIP/doc/doxygen/output/html/mdns_8h.html | 197 + .../LwIP/doc/doxygen/output/html/mdns_8h.js | 17 + .../doxygen/output/html/mdns__opts_8h.html | 115 + .../doc/doxygen/output/html/mdns__opts_8h.js | 6 + .../doxygen/output/html/mdns__priv_8h.html | 284 + .../doc/doxygen/output/html/mdns__priv_8h.js | 7 + .../LwIP/doc/doxygen/output/html/mem_8c.html | 326 + .../LwIP/doc/doxygen/output/html/mem_8c.js | 11 + .../LwIP/doc/doxygen/output/html/mem_8h.html | 266 + .../LwIP/doc/doxygen/output/html/mem_8h.js | 8 + .../doc/doxygen/output/html/mem__priv_8h.html | 104 + .../LwIP/doc/doxygen/output/html/memp_8c.html | 319 + .../LwIP/doc/doxygen/output/html/memp_8c.js | 9 + .../LwIP/doc/doxygen/output/html/memp_8h.html | 238 + .../LwIP/doc/doxygen/output/html/memp_8h.js | 12 + .../doxygen/output/html/memp__priv_8h.html | 211 + .../doc/doxygen/output/html/memp__priv_8h.js | 7 + .../doc/doxygen/output/html/memp__std_8h.html | 102 + .../LwIP/doc/doxygen/output/html/menu.js | 26 + .../LwIP/doc/doxygen/output/html/menudata.js | 160 + .../LwIP/doc/doxygen/output/html/mld6_8c.html | 283 + .../LwIP/doc/doxygen/output/html/mld6_8c.js | 12 + .../LwIP/doc/doxygen/output/html/mld6_8h.html | 285 + .../LwIP/doc/doxygen/output/html/mld6_8h.js | 14 + .../LwIP/doc/doxygen/output/html/modules.html | 238 + .../LwIP/doc/doxygen/output/html/modules.js | 8 + .../LwIP/doc/doxygen/output/html/mqtt_8c.html | 276 + .../LwIP/doc/doxygen/output/html/mqtt_8c.js | 17 + .../LwIP/doc/doxygen/output/html/mqtt_8h.html | 178 + .../LwIP/doc/doxygen/output/html/mqtt_8h.js | 30 + .../doxygen/output/html/mqtt__opts_8h.html | 121 + .../doc/doxygen/output/html/mqtt__opts_8h.js | 9 + .../doxygen/output/html/mqtt__priv_8h.html | 116 + .../doxygen/output/html/multithreading.html | 116 + .../LwIP/doc/doxygen/output/html/navtree.css | 146 + .../LwIP/doc/doxygen/output/html/navtree.js | 517 + .../doc/doxygen/output/html/navtreedata.js | 61 + .../doc/doxygen/output/html/navtreeindex0.js | 253 + .../doc/doxygen/output/html/navtreeindex1.js | 253 + .../doc/doxygen/output/html/navtreeindex10.js | 253 + .../doc/doxygen/output/html/navtreeindex11.js | 253 + .../doc/doxygen/output/html/navtreeindex12.js | 253 + .../doc/doxygen/output/html/navtreeindex13.js | 253 + .../doc/doxygen/output/html/navtreeindex14.js | 253 + .../doc/doxygen/output/html/navtreeindex15.js | 253 + .../doc/doxygen/output/html/navtreeindex16.js | 253 + .../doc/doxygen/output/html/navtreeindex17.js | 157 + .../doc/doxygen/output/html/navtreeindex2.js | 253 + .../doc/doxygen/output/html/navtreeindex3.js | 253 + .../doc/doxygen/output/html/navtreeindex4.js | 253 + .../doc/doxygen/output/html/navtreeindex5.js | 253 + .../doc/doxygen/output/html/navtreeindex6.js | 253 + .../doc/doxygen/output/html/navtreeindex7.js | 253 + .../doc/doxygen/output/html/navtreeindex8.js | 253 + .../doc/doxygen/output/html/navtreeindex9.js | 253 + .../LwIP/doc/doxygen/output/html/nd6_8c.html | 468 + .../LwIP/doc/doxygen/output/html/nd6_8c.js | 13 + .../LwIP/doc/doxygen/output/html/nd6_8h.html | 490 + .../LwIP/doc/doxygen/output/html/nd6_8h.js | 15 + .../doc/doxygen/output/html/nd6__priv_8h.html | 116 + .../doc/doxygen/output/html/nd6__priv_8h.js | 5 + .../doc/doxygen/output/html/netbiosns_8c.html | 208 + .../doc/doxygen/output/html/netbiosns_8c.js | 14 + .../doc/doxygen/output/html/netbiosns_8h.html | 113 + .../doc/doxygen/output/html/netbiosns_8h.js | 5 + .../output/html/netbiosns__opts_8h.html | 113 + .../doxygen/output/html/netbiosns__opts_8h.js | 5 + .../doc/doxygen/output/html/netbuf_8c.html | 130 + .../LwIP/doc/doxygen/output/html/netbuf_8c.js | 12 + .../doc/doxygen/output/html/netbuf_8h.html | 175 + .../LwIP/doc/doxygen/output/html/netbuf_8h.js | 15 + .../doc/doxygen/output/html/netdb_8c.html | 361 + .../LwIP/doc/doxygen/output/html/netdb_8c.js | 11 + .../output/html/netif_2ethernet_8h.html | 138 + .../doxygen/output/html/netif_2ethernet_8h.js | 6 + .../doc/doxygen/output/html/netif_8c.html | 332 + .../LwIP/doc/doxygen/output/html/netif_8c.js | 36 + .../doc/doxygen/output/html/netif_8h.html | 821 + .../LwIP/doc/doxygen/output/html/netif_8h.js | 91 + .../doc/doxygen/output/html/netifapi_8c.html | 246 + .../doc/doxygen/output/html/netifapi_8c.js | 10 + .../doc/doxygen/output/html/netifapi_8h.html | 280 + .../doc/doxygen/output/html/netifapi_8h.js | 24 + .../LwIP/doc/doxygen/output/html/opt_8h.html | 736 + .../LwIP/doc/doxygen/output/html/opt_8h.js | 316 + .../doc/doxygen/output/html/optimization.html | 105 + .../LwIP/doc/doxygen/output/html/pages.html | 113 + .../LwIP/doc/doxygen/output/html/pbuf_8c.html | 483 + .../LwIP/doc/doxygen/output/html/pbuf_8c.js | 33 + .../LwIP/doc/doxygen/output/html/pbuf_8h.html | 788 + .../LwIP/doc/doxygen/output/html/pbuf_8h.js | 66 + .../doc/doxygen/output/html/pitfalls.html | 116 + .../doc/doxygen/output/html/pppapi_8c.html | 103 + .../doc/doxygen/output/html/pppol2tp_8c.html | 103 + .../doc/doxygen/output/html/pppol2tp_8h.html | 103 + .../doc/doxygen/output/html/pppos_8c.html | 103 + .../doc/doxygen/output/html/pppos_8h.html | 103 + .../doxygen/output/html/prot_2autoip_8h.html | 102 + .../doxygen/output/html/prot_2dhcp6_8h.html | 152 + .../doc/doxygen/output/html/prot_2dhcp6_8h.js | 6 + .../doxygen/output/html/prot_2dhcp_8h.html | 137 + .../doc/doxygen/output/html/prot_2dhcp_8h.js | 5 + .../doc/doxygen/output/html/prot_2dns_8h.html | 152 + .../doc/doxygen/output/html/prot_2dns_8h.js | 6 + .../doxygen/output/html/prot_2icmp6_8h.html | 311 + .../doc/doxygen/output/html/prot_2icmp6_8h.js | 48 + .../doxygen/output/html/prot_2icmp_8h.html | 113 + .../doc/doxygen/output/html/prot_2icmp_8h.js | 4 + .../doxygen/output/html/prot_2igmp_8h.html | 114 + .../doc/doxygen/output/html/prot_2igmp_8h.js | 4 + .../doc/doxygen/output/html/prot_2ip4_8h.html | 114 + .../doc/doxygen/output/html/prot_2ip4_8h.js | 4 + .../doc/doxygen/output/html/prot_2ip6_8h.html | 116 + .../doc/doxygen/output/html/prot_2ip6_8h.js | 5 + .../doc/doxygen/output/html/prot_2ip_8h.html | 131 + .../doc/doxygen/output/html/prot_2ip_8h.js | 4 + .../doxygen/output/html/prot_2mld6_8h.html | 114 + .../doc/doxygen/output/html/prot_2mld6_8h.js | 4 + .../doc/doxygen/output/html/prot_2nd6_8h.html | 245 + .../doc/doxygen/output/html/prot_2nd6_8h.js | 14 + .../doc/doxygen/output/html/prot_2tcp_8h.html | 105 + .../doc/doxygen/output/html/prot_2udp_8h.html | 105 + .../LwIP/doc/doxygen/output/html/raw_8c.html | 224 + .../LwIP/doc/doxygen/output/html/raw_8c.js | 16 + .../LwIP/doc/doxygen/output/html/raw_8h.html | 174 + .../LwIP/doc/doxygen/output/html/raw_8h.js | 16 + .../doc/doxygen/output/html/raw__priv_8h.html | 235 + .../doc/doxygen/output/html/raw__priv_8h.js | 7 + .../LwIP/doc/doxygen/output/html/resize.js | 114 + .../doc/doxygen/output/html/search/all_0.html | 26 + .../doc/doxygen/output/html/search/all_0.js | 5 + .../doc/doxygen/output/html/search/all_1.html | 26 + .../doc/doxygen/output/html/search/all_1.js | 9 + .../doxygen/output/html/search/all_10.html | 26 + .../doc/doxygen/output/html/search/all_10.js | 27 + .../doxygen/output/html/search/all_11.html | 26 + .../doc/doxygen/output/html/search/all_11.js | 107 + .../doxygen/output/html/search/all_12.html | 26 + .../doc/doxygen/output/html/search/all_12.js | 7 + .../doxygen/output/html/search/all_13.html | 26 + .../doc/doxygen/output/html/search/all_13.js | 61 + .../doxygen/output/html/search/all_14.html | 26 + .../doc/doxygen/output/html/search/all_14.js | 344 + .../doxygen/output/html/search/all_15.html | 26 + .../doc/doxygen/output/html/search/all_15.js | 201 + .../doxygen/output/html/search/all_16.html | 26 + .../doc/doxygen/output/html/search/all_16.js | 37 + .../doxygen/output/html/search/all_17.html | 26 + .../doc/doxygen/output/html/search/all_17.js | 10 + .../doxygen/output/html/search/all_18.html | 26 + .../doc/doxygen/output/html/search/all_18.js | 12 + .../doxygen/output/html/search/all_19.html | 26 + .../doc/doxygen/output/html/search/all_19.js | 14 + .../doc/doxygen/output/html/search/all_2.html | 26 + .../doc/doxygen/output/html/search/all_2.js | 115 + .../doc/doxygen/output/html/search/all_3.html | 26 + .../doc/doxygen/output/html/search/all_3.js | 32 + .../doc/doxygen/output/html/search/all_4.html | 26 + .../doc/doxygen/output/html/search/all_4.js | 48 + .../doc/doxygen/output/html/search/all_5.html | 26 + .../doc/doxygen/output/html/search/all_5.js | 106 + .../doc/doxygen/output/html/search/all_6.html | 26 + .../doc/doxygen/output/html/search/all_6.js | 83 + .../doc/doxygen/output/html/search/all_7.html | 26 + .../doc/doxygen/output/html/search/all_7.js | 12 + .../doc/doxygen/output/html/search/all_8.html | 26 + .../doc/doxygen/output/html/search/all_8.js | 13 + .../doc/doxygen/output/html/search/all_9.html | 26 + .../doc/doxygen/output/html/search/all_9.js | 59 + .../doc/doxygen/output/html/search/all_a.html | 26 + .../doc/doxygen/output/html/search/all_a.js | 394 + .../doc/doxygen/output/html/search/all_b.html | 26 + .../doc/doxygen/output/html/search/all_b.js | 5 + .../doc/doxygen/output/html/search/all_c.html | 26 + .../doc/doxygen/output/html/search/all_c.js | 4 + .../doc/doxygen/output/html/search/all_d.html | 26 + .../doc/doxygen/output/html/search/all_d.js | 384 + .../doc/doxygen/output/html/search/all_e.html | 26 + .../doc/doxygen/output/html/search/all_e.js | 195 + .../doc/doxygen/output/html/search/all_f.html | 26 + .../doc/doxygen/output/html/search/all_f.js | 255 + .../doxygen/output/html/search/classes_0.html | 26 + .../doxygen/output/html/search/classes_0.js | 5 + .../doxygen/output/html/search/classes_1.html | 26 + .../doxygen/output/html/search/classes_1.js | 6 + .../doxygen/output/html/search/classes_2.html | 26 + .../doxygen/output/html/search/classes_2.js | 4 + .../doxygen/output/html/search/classes_3.html | 26 + .../doxygen/output/html/search/classes_3.js | 11 + .../doxygen/output/html/search/classes_4.html | 26 + .../doxygen/output/html/search/classes_4.js | 8 + .../doxygen/output/html/search/classes_5.html | 26 + .../doxygen/output/html/search/classes_5.js | 4 + .../doxygen/output/html/search/classes_6.html | 26 + .../doxygen/output/html/search/classes_6.js | 24 + .../doxygen/output/html/search/classes_7.html | 26 + .../doxygen/output/html/search/classes_7.js | 10 + .../doxygen/output/html/search/classes_8.html | 26 + .../doxygen/output/html/search/classes_8.js | 16 + .../doxygen/output/html/search/classes_9.html | 26 + .../doxygen/output/html/search/classes_9.js | 17 + .../doxygen/output/html/search/classes_a.html | 26 + .../doxygen/output/html/search/classes_a.js | 7 + .../doxygen/output/html/search/classes_b.html | 26 + .../doxygen/output/html/search/classes_b.js | 6 + .../doxygen/output/html/search/classes_c.html | 26 + .../doxygen/output/html/search/classes_c.js | 38 + .../doxygen/output/html/search/classes_d.html | 26 + .../doxygen/output/html/search/classes_d.js | 9 + .../doxygen/output/html/search/classes_e.html | 26 + .../doxygen/output/html/search/classes_e.js | 4 + .../doxygen/output/html/search/classes_f.html | 26 + .../doxygen/output/html/search/classes_f.js | 4 + .../doxygen/output/html/search/defines_0.html | 26 + .../doxygen/output/html/search/defines_0.js | 12 + .../doxygen/output/html/search/defines_1.html | 26 + .../doxygen/output/html/search/defines_1.js | 21 + .../doxygen/output/html/search/defines_2.html | 26 + .../doxygen/output/html/search/defines_2.js | 7 + .../doxygen/output/html/search/defines_3.html | 26 + .../doxygen/output/html/search/defines_3.js | 4 + .../doxygen/output/html/search/defines_4.html | 26 + .../doxygen/output/html/search/defines_4.js | 10 + .../doxygen/output/html/search/defines_5.html | 26 + .../doxygen/output/html/search/defines_5.js | 79 + .../doxygen/output/html/search/defines_6.html | 26 + .../doxygen/output/html/search/defines_6.js | 46 + .../doxygen/output/html/search/defines_7.html | 26 + .../doxygen/output/html/search/defines_7.js | 10 + .../doxygen/output/html/search/defines_8.html | 26 + .../doxygen/output/html/search/defines_8.js | 34 + .../doxygen/output/html/search/defines_9.html | 26 + .../doxygen/output/html/search/defines_9.js | 17 + .../doxygen/output/html/search/defines_a.html | 26 + .../doxygen/output/html/search/defines_a.js | 32 + .../doxygen/output/html/search/defines_b.html | 26 + .../doxygen/output/html/search/defines_b.js | 11 + .../doxygen/output/html/search/defines_c.html | 26 + .../doxygen/output/html/search/defines_c.js | 4 + .../doxygen/output/html/search/defines_d.html | 26 + .../doxygen/output/html/search/defines_d.js | 4 + .../doxygen/output/html/search/enums_0.html | 26 + .../doc/doxygen/output/html/search/enums_0.js | 5 + .../doxygen/output/html/search/enums_1.html | 26 + .../doc/doxygen/output/html/search/enums_1.js | 6 + .../doxygen/output/html/search/enums_2.html | 26 + .../doc/doxygen/output/html/search/enums_2.js | 9 + .../doxygen/output/html/search/enums_3.html | 26 + .../doc/doxygen/output/html/search/enums_3.js | 11 + .../doxygen/output/html/search/enums_4.html | 26 + .../doc/doxygen/output/html/search/enums_4.js | 7 + .../doxygen/output/html/search/enums_5.html | 26 + .../doc/doxygen/output/html/search/enums_5.js | 8 + .../doxygen/output/html/search/enums_6.html | 26 + .../doc/doxygen/output/html/search/enums_6.js | 5 + .../doxygen/output/html/search/enums_7.html | 26 + .../doc/doxygen/output/html/search/enums_7.js | 4 + .../doxygen/output/html/search/enums_8.html | 26 + .../doc/doxygen/output/html/search/enums_8.js | 8 + .../output/html/search/enumvalues_0.html | 26 + .../output/html/search/enumvalues_0.js | 36 + .../output/html/search/enumvalues_1.html | 26 + .../output/html/search/enumvalues_1.js | 13 + .../output/html/search/enumvalues_2.html | 26 + .../output/html/search/enumvalues_2.js | 52 + .../output/html/search/enumvalues_3.html | 26 + .../output/html/search/enumvalues_3.js | 30 + .../output/html/search/enumvalues_4.html | 26 + .../output/html/search/enumvalues_4.js | 12 + .../output/html/search/enumvalues_5.html | 26 + .../output/html/search/enumvalues_5.js | 14 + .../output/html/search/enumvalues_6.html | 26 + .../output/html/search/enumvalues_6.js | 12 + .../doxygen/output/html/search/files_0.html | 26 + .../doc/doxygen/output/html/search/files_0.js | 24 + .../doxygen/output/html/search/files_1.html | 26 + .../doc/doxygen/output/html/search/files_1.js | 7 + .../doxygen/output/html/search/files_2.html | 26 + .../doc/doxygen/output/html/search/files_2.js | 12 + .../doxygen/output/html/search/files_3.html | 26 + .../doc/doxygen/output/html/search/files_3.js | 12 + .../doxygen/output/html/search/files_4.html | 26 + .../doc/doxygen/output/html/search/files_4.js | 8 + .../doxygen/output/html/search/files_5.html | 26 + .../doc/doxygen/output/html/search/files_5.js | 37 + .../doxygen/output/html/search/files_6.html | 26 + .../doc/doxygen/output/html/search/files_6.js | 12 + .../doxygen/output/html/search/files_7.html | 26 + .../doc/doxygen/output/html/search/files_7.js | 20 + .../doxygen/output/html/search/files_8.html | 26 + .../doc/doxygen/output/html/search/files_8.js | 17 + .../doxygen/output/html/search/files_9.html | 26 + .../doc/doxygen/output/html/search/files_9.js | 4 + .../doxygen/output/html/search/files_a.html | 26 + .../doc/doxygen/output/html/search/files_a.js | 10 + .../doxygen/output/html/search/files_b.html | 26 + .../doc/doxygen/output/html/search/files_b.js | 6 + .../doxygen/output/html/search/files_c.html | 26 + .../doc/doxygen/output/html/search/files_c.js | 49 + .../doxygen/output/html/search/files_d.html | 26 + .../doc/doxygen/output/html/search/files_d.js | 17 + .../doxygen/output/html/search/files_e.html | 26 + .../doc/doxygen/output/html/search/files_e.js | 5 + .../doxygen/output/html/search/files_f.html | 26 + .../doc/doxygen/output/html/search/files_f.js | 5 + .../output/html/search/functions_0.html | 26 + .../doxygen/output/html/search/functions_0.js | 47 + .../output/html/search/functions_1.html | 26 + .../doxygen/output/html/search/functions_1.js | 11 + .../output/html/search/functions_2.html | 26 + .../doxygen/output/html/search/functions_2.js | 29 + .../output/html/search/functions_3.html | 26 + .../doxygen/output/html/search/functions_3.js | 15 + .../output/html/search/functions_4.html | 26 + .../doxygen/output/html/search/functions_4.js | 13 + .../output/html/search/functions_5.html | 26 + .../doxygen/output/html/search/functions_5.js | 60 + .../output/html/search/functions_6.html | 26 + .../doxygen/output/html/search/functions_6.js | 49 + .../output/html/search/functions_7.html | 26 + .../doxygen/output/html/search/functions_7.js | 47 + .../output/html/search/functions_8.html | 26 + .../doxygen/output/html/search/functions_8.js | 90 + .../output/html/search/functions_9.html | 26 + .../doxygen/output/html/search/functions_9.js | 34 + .../output/html/search/functions_a.html | 26 + .../doxygen/output/html/search/functions_a.js | 24 + .../output/html/search/functions_b.html | 26 + .../doxygen/output/html/search/functions_b.js | 120 + .../output/html/search/functions_c.html | 26 + .../doxygen/output/html/search/functions_c.js | 78 + .../output/html/search/functions_d.html | 26 + .../doxygen/output/html/search/functions_d.js | 18 + .../output/html/search/functions_e.html | 26 + .../doxygen/output/html/search/functions_e.js | 4 + .../doxygen/output/html/search/groups_0.html | 26 + .../doxygen/output/html/search/groups_0.js | 5 + .../doxygen/output/html/search/groups_1.html | 26 + .../doxygen/output/html/search/groups_1.js | 12 + .../doxygen/output/html/search/groups_10.html | 26 + .../doxygen/output/html/search/groups_10.js | 6 + .../doxygen/output/html/search/groups_11.html | 26 + .../doxygen/output/html/search/groups_11.js | 4 + .../doxygen/output/html/search/groups_12.html | 26 + .../doxygen/output/html/search/groups_12.js | 4 + .../doxygen/output/html/search/groups_2.html | 26 + .../doxygen/output/html/search/groups_2.js | 11 + .../doxygen/output/html/search/groups_3.html | 26 + .../doxygen/output/html/search/groups_3.js | 12 + .../doxygen/output/html/search/groups_4.html | 26 + .../doxygen/output/html/search/groups_4.js | 6 + .../doxygen/output/html/search/groups_5.html | 26 + .../doxygen/output/html/search/groups_5.js | 5 + .../doxygen/output/html/search/groups_6.html | 26 + .../doxygen/output/html/search/groups_6.js | 7 + .../doxygen/output/html/search/groups_7.html | 26 + .../doxygen/output/html/search/groups_7.js | 26 + .../doxygen/output/html/search/groups_8.html | 26 + .../doxygen/output/html/search/groups_8.js | 6 + .../doxygen/output/html/search/groups_9.html | 26 + .../doxygen/output/html/search/groups_9.js | 16 + .../doxygen/output/html/search/groups_a.html | 26 + .../doxygen/output/html/search/groups_a.js | 16 + .../doxygen/output/html/search/groups_b.html | 26 + .../doxygen/output/html/search/groups_b.js | 15 + .../doxygen/output/html/search/groups_c.html | 26 + .../doxygen/output/html/search/groups_c.js | 9 + .../doxygen/output/html/search/groups_d.html | 26 + .../doxygen/output/html/search/groups_d.js | 5 + .../doxygen/output/html/search/groups_e.html | 26 + .../doxygen/output/html/search/groups_e.js | 13 + .../doxygen/output/html/search/groups_f.html | 26 + .../doxygen/output/html/search/groups_f.js | 13 + .../doxygen/output/html/search/nomatches.html | 12 + .../doxygen/output/html/search/pages_0.html | 26 + .../doc/doxygen/output/html/search/pages_0.js | 5 + .../doxygen/output/html/search/pages_1.html | 26 + .../doc/doxygen/output/html/search/pages_1.js | 4 + .../doxygen/output/html/search/pages_2.html | 26 + .../doc/doxygen/output/html/search/pages_2.js | 4 + .../doxygen/output/html/search/pages_3.html | 26 + .../doc/doxygen/output/html/search/pages_3.js | 4 + .../doxygen/output/html/search/pages_4.html | 26 + .../doc/doxygen/output/html/search/pages_4.js | 5 + .../doxygen/output/html/search/pages_5.html | 26 + .../doc/doxygen/output/html/search/pages_5.js | 4 + .../doxygen/output/html/search/pages_6.html | 26 + .../doc/doxygen/output/html/search/pages_6.js | 4 + .../doxygen/output/html/search/pages_7.html | 26 + .../doc/doxygen/output/html/search/pages_7.js | 4 + .../doxygen/output/html/search/pages_8.html | 26 + .../doc/doxygen/output/html/search/pages_8.js | 4 + .../doc/doxygen/output/html/search/search.css | 271 + .../doc/doxygen/output/html/search/search.js | 791 + .../doxygen/output/html/search/searchdata.js | 45 + .../output/html/search/typedefs_0.html | 26 + .../doxygen/output/html/search/typedefs_0.js | 4 + .../output/html/search/typedefs_1.html | 26 + .../doxygen/output/html/search/typedefs_1.js | 4 + .../output/html/search/typedefs_2.html | 26 + .../doxygen/output/html/search/typedefs_2.js | 4 + .../output/html/search/typedefs_3.html | 26 + .../doxygen/output/html/search/typedefs_3.js | 4 + .../output/html/search/typedefs_4.html | 26 + .../doxygen/output/html/search/typedefs_4.js | 6 + .../output/html/search/typedefs_5.html | 26 + .../doxygen/output/html/search/typedefs_5.js | 6 + .../output/html/search/typedefs_6.html | 26 + .../doxygen/output/html/search/typedefs_6.js | 8 + .../output/html/search/typedefs_7.html | 26 + .../doxygen/output/html/search/typedefs_7.js | 8 + .../output/html/search/typedefs_8.html | 26 + .../doxygen/output/html/search/typedefs_8.js | 14 + .../output/html/search/typedefs_9.html | 26 + .../doxygen/output/html/search/typedefs_9.js | 4 + .../output/html/search/typedefs_a.html | 26 + .../doxygen/output/html/search/typedefs_a.js | 5 + .../output/html/search/typedefs_b.html | 26 + .../doxygen/output/html/search/typedefs_b.js | 5 + .../output/html/search/typedefs_c.html | 26 + .../doxygen/output/html/search/typedefs_c.js | 15 + .../output/html/search/typedefs_d.html | 26 + .../doxygen/output/html/search/typedefs_d.js | 4 + .../output/html/search/variables_0.html | 26 + .../doxygen/output/html/search/variables_0.js | 7 + .../output/html/search/variables_1.html | 26 + .../doxygen/output/html/search/variables_1.js | 20 + .../output/html/search/variables_10.html | 26 + .../output/html/search/variables_10.js | 23 + .../output/html/search/variables_11.html | 26 + .../output/html/search/variables_11.js | 7 + .../output/html/search/variables_12.html | 26 + .../output/html/search/variables_12.js | 22 + .../output/html/search/variables_13.html | 26 + .../output/html/search/variables_13.js | 33 + .../output/html/search/variables_14.html | 26 + .../output/html/search/variables_14.js | 29 + .../output/html/search/variables_15.html | 26 + .../output/html/search/variables_15.js | 9 + .../output/html/search/variables_16.html | 26 + .../output/html/search/variables_16.js | 9 + .../output/html/search/variables_17.html | 26 + .../output/html/search/variables_17.js | 11 + .../output/html/search/variables_18.html | 26 + .../output/html/search/variables_18.js | 8 + .../output/html/search/variables_2.html | 26 + .../doxygen/output/html/search/variables_2.js | 9 + .../output/html/search/variables_3.html | 26 + .../doxygen/output/html/search/variables_3.js | 26 + .../output/html/search/variables_4.html | 26 + .../doxygen/output/html/search/variables_4.js | 14 + .../output/html/search/variables_5.html | 26 + .../doxygen/output/html/search/variables_5.js | 8 + .../output/html/search/variables_6.html | 26 + .../doxygen/output/html/search/variables_6.js | 7 + .../output/html/search/variables_7.html | 26 + .../doxygen/output/html/search/variables_7.js | 6 + .../output/html/search/variables_8.html | 26 + .../doxygen/output/html/search/variables_8.js | 6 + .../output/html/search/variables_9.html | 26 + .../doxygen/output/html/search/variables_9.js | 34 + .../output/html/search/variables_a.html | 26 + .../doxygen/output/html/search/variables_a.js | 5 + .../output/html/search/variables_b.html | 26 + .../doxygen/output/html/search/variables_b.js | 4 + .../output/html/search/variables_c.html | 26 + .../doxygen/output/html/search/variables_c.js | 22 + .../output/html/search/variables_d.html | 26 + .../doxygen/output/html/search/variables_d.js | 22 + .../output/html/search/variables_e.html | 26 + .../doxygen/output/html/search/variables_e.js | 25 + .../output/html/search/variables_f.html | 26 + .../doxygen/output/html/search/variables_f.js | 12 + .../doc/doxygen/output/html/slipif_8c.html | 169 + .../LwIP/doc/doxygen/output/html/slipif_8c.js | 10 + .../doc/doxygen/output/html/slipif_8h.html | 159 + .../LwIP/doc/doxygen/output/html/slipif_8h.js | 10 + .../LwIP/doc/doxygen/output/html/smtp_8c.html | 234 + .../LwIP/doc/doxygen/output/html/smtp_8c.js | 16 + .../LwIP/doc/doxygen/output/html/snmp_8h.html | 144 + .../LwIP/doc/doxygen/output/html/snmp_8h.js | 8 + .../doxygen/output/html/snmp__asn1_8c.html | 750 + .../doc/doxygen/output/html/snmp__asn1_8c.js | 17 + .../doxygen/output/html/snmp__asn1_8h.html | 752 + .../doc/doxygen/output/html/snmp__asn1_8h.js | 17 + .../doxygen/output/html/snmp__core_8c.html | 1087 + .../doc/doxygen/output/html/snmp__core_8c.js | 28 + .../doxygen/output/html/snmp__core_8h.html | 1117 + .../doc/doxygen/output/html/snmp__core_8h.js | 36 + .../doxygen/output/html/snmp__mib2_8c.html | 110 + .../doxygen/output/html/snmp__mib2_8h.html | 125 + .../doc/doxygen/output/html/snmp__mib2_8h.js | 10 + .../output/html/snmp__mib2__icmp_8c.html | 110 + .../html/snmp__mib2__interfaces_8c.html | 111 + .../output/html/snmp__mib2__ip_8c.html | 112 + .../output/html/snmp__mib2__snmp_8c.html | 107 + .../output/html/snmp__mib2__system_8c.html | 130 + .../output/html/snmp__mib2__system_8c.js | 10 + .../output/html/snmp__mib2__tcp_8c.html | 112 + .../output/html/snmp__mib2__udp_8c.html | 111 + .../doc/doxygen/output/html/snmp__msg_8c.html | 217 + .../doc/doxygen/output/html/snmp__msg_8c.js | 14 + .../doc/doxygen/output/html/snmp__msg_8h.html | 210 + .../doc/doxygen/output/html/snmp__msg_8h.js | 8 + .../doxygen/output/html/snmp__netconn_8c.html | 139 + .../doxygen/output/html/snmp__netconn_8c.js | 4 + .../doxygen/output/html/snmp__opts_8h.html | 179 + .../doc/doxygen/output/html/snmp__opts_8h.js | 30 + .../output/html/snmp__pbuf__stream_8c.html | 106 + .../output/html/snmp__pbuf__stream_8h.html | 105 + .../doc/doxygen/output/html/snmp__raw_8c.html | 116 + .../doc/doxygen/output/html/snmp__raw_8c.js | 4 + .../doxygen/output/html/snmp__scalar_8c.html | 105 + .../doxygen/output/html/snmp__scalar_8h.html | 116 + .../doxygen/output/html/snmp__scalar_8h.js | 6 + .../doxygen/output/html/snmp__table_8c.html | 106 + .../doxygen/output/html/snmp__table_8h.html | 138 + .../doc/doxygen/output/html/snmp__table_8h.js | 7 + .../output/html/snmp__threadsync_8c.html | 145 + .../output/html/snmp__threadsync_8c.js | 4 + .../output/html/snmp__threadsync_8h.html | 196 + .../output/html/snmp__threadsync_8h.js | 8 + .../doxygen/output/html/snmp__traps_8c.html | 176 + .../doc/doxygen/output/html/snmp__traps_8c.js | 14 + .../doc/doxygen/output/html/snmpv3_8c.html | 106 + .../doc/doxygen/output/html/snmpv3_8h.html | 104 + .../output/html/snmpv3__mbedtls_8c.html | 108 + .../doxygen/output/html/snmpv3__priv_8h.html | 103 + .../LwIP/doc/doxygen/output/html/sntp_8c.html | 174 + .../LwIP/doc/doxygen/output/html/sntp_8c.js | 16 + .../LwIP/doc/doxygen/output/html/sntp_8h.html | 126 + .../LwIP/doc/doxygen/output/html/sntp_8h.js | 11 + .../doxygen/output/html/sntp__opts_8h.html | 144 + .../doc/doxygen/output/html/sntp__opts_8h.js | 20 + .../doc/doxygen/output/html/socket_8h.html | 103 + .../doc/doxygen/output/html/sockets_8c.html | 313 + .../doc/doxygen/output/html/sockets_8c.js | 14 + .../doc/doxygen/output/html/sockets_8h.html | 345 + .../doc/doxygen/output/html/sockets_8h.js | 38 + .../doxygen/output/html/sockets__priv_8h.html | 138 + .../doxygen/output/html/sockets__priv_8h.js | 6 + .../doc/doxygen/output/html/stats_8c.html | 158 + .../LwIP/doc/doxygen/output/html/stats_8c.js | 5 + .../doc/doxygen/output/html/stats_8h.html | 175 + .../LwIP/doc/doxygen/output/html/stats_8h.js | 12 + .../html/struct__lwiperf__settings.html | 105 + .../html/struct__lwiperf__state__tcp.html | 105 + .../html/structaltcp__allocator__s.html | 145 + .../output/html/structaltcp__allocator__s.js | 5 + .../doxygen/output/html/structapi__msg.html | 394 + .../doc/doxygen/output/html/structapi__msg.js | 19 + .../doc/doxygen/output/html/structautoip.html | 216 + .../doc/doxygen/output/html/structautoip.js | 9 + .../html/structbridgeif__initdata__s.html | 182 + .../html/structbridgeif__initdata__s.js | 7 + .../doxygen/output/html/structdhcp6__msg.html | 107 + .../doxygen/output/html/structdhcp__msg.html | 107 + .../output/html/structdns__answer.html | 105 + .../output/html/structdns__api__msg.html | 199 + .../output/html/structdns__api__msg.js | 8 + .../doxygen/output/html/structdns__hdr.html | 107 + .../doxygen/output/html/structdns__query.html | 105 + .../output/html/structdns__req__entry.html | 105 + .../output/html/structdns__table__entry.html | 105 + .../doxygen/output/html/structeth__addr.html | 107 + .../doxygen/output/html/structeth__hdr.html | 107 + .../output/html/structeth__vlan__hdr.html | 107 + .../output/html/structetharp__hdr.html | 107 + .../output/html/structetharp__q__entry.html | 107 + .../html/structgethostbyname__r__helper.html | 105 + .../output/html/structicmp6__echo__hdr.html | 107 + .../doxygen/output/html/structicmp6__hdr.html | 107 + .../output/html/structicmp__echo__hdr.html | 107 + .../output/html/structieee__802154__hdr.html | 216 + .../output/html/structieee__802154__hdr.js | 9 + .../output/html/structigmp__group.html | 217 + .../doxygen/output/html/structigmp__group.js | 9 + .../doxygen/output/html/structigmp__msg.html | 107 + .../doxygen/output/html/structip4__addr.html | 107 + .../output/html/structip4__addr__packed.html | 107 + .../html/structip4__addr__wordaligned.html | 107 + .../doxygen/output/html/structip6__addr.html | 107 + .../output/html/structip6__addr__packed.html | 107 + .../doxygen/output/html/structip6__hdr.html | 199 + .../doc/doxygen/output/html/structip6__hdr.js | 8 + .../output/html/structip6__reass__helper.html | 105 + .../output/html/structip6__reassdata.html | 107 + .../doxygen/output/html/structip__addr.html | 131 + .../doc/doxygen/output/html/structip__addr.js | 4 + .../output/html/structip__globals.html | 233 + .../doxygen/output/html/structip__globals.js | 10 + .../output/html/structip__reass__helper.html | 105 + .../output/html/structip__reassdata.html | 107 + .../html/structlowpan6__ieee802154__data.html | 197 + .../html/structlowpan6__ieee802154__data.js | 8 + .../html/structlowpan6__link__addr.html | 107 + .../html/structlowpan6__reass__helper.html | 105 + .../html/structlwip__cyclic__timer.html | 107 + .../output/html/structlwip__select__cb.html | 267 + .../output/html/structlwip__select__cb.js | 12 + .../doxygen/output/html/structlwip__sock.html | 216 + .../doxygen/output/html/structlwip__sock.js | 9 + .../doxygen/output/html/structmdns__host.html | 197 + .../doxygen/output/html/structmdns__host.js | 8 + .../output/html/structmdns__outpacket.html | 333 + .../output/html/structmdns__outpacket.js | 16 + .../output/html/structmdns__packet.html | 282 + .../doxygen/output/html/structmdns__packet.js | 13 + .../output/html/structmdns__rr__info.html | 105 + .../output/html/structmdns__service.html | 231 + .../output/html/structmdns__service.js | 10 + .../doc/doxygen/output/html/structmem.html | 163 + .../LwIP/doc/doxygen/output/html/structmem.js | 6 + .../doxygen/output/html/structmemp__desc.html | 199 + .../doxygen/output/html/structmemp__desc.js | 8 + .../doxygen/output/html/structmld__group.html | 216 + .../doxygen/output/html/structmld__group.js | 9 + .../output/html/structmld__header.html | 107 + .../output/html/structmqtt__client__s.html | 267 + .../output/html/structmqtt__client__s.js | 12 + .../structmqtt__connect__client__info__t.html | 267 + .../structmqtt__connect__client__info__t.js | 12 + .../output/html/structmqtt__request__t.html | 182 + .../output/html/structmqtt__request__t.js | 7 + .../output/html/structmqtt__ringbuf__t.html | 107 + .../doxygen/output/html/structna__header.html | 107 + .../structnd6__neighbor__cache__entry.html | 131 + .../html/structnd6__neighbor__cache__entry.js | 4 + .../output/html/structnd6__q__entry.html | 107 + .../output/html/structnetbios__answer.html | 537 + .../output/html/structnetbios__answer.js | 28 + .../output/html/structnetbios__hdr.html | 105 + .../output/html/structnetbios__name__hdr.html | 105 + .../html/structnetbios__question__hdr.html | 105 + .../output/html/structnetbios__resp.html | 105 + .../doc/doxygen/output/html/structnetbuf.html | 107 + .../doxygen/output/html/structnetconn.html | 370 + .../doc/doxygen/output/html/structnetconn.js | 18 + .../doc/doxygen/output/html/structnetif.html | 590 + .../doc/doxygen/output/html/structnetif.js | 31 + ...callback__args__t_1_1ipv4__changed__s.html | 131 + ...__callback__args__t_1_1ipv4__changed__s.js | 4 + ...s__t_1_1ipv6__addr__state__changed__s.html | 165 + ...rgs__t_1_1ipv6__addr__state__changed__s.js | 6 + ...xt__callback__args__t_1_1ipv6__set__s.html | 148 + ..._ext__callback__args__t_1_1ipv6__set__s.js | 5 + ...callback__args__t_1_1link__changed__s.html | 131 + ...__callback__args__t_1_1link__changed__s.js | 4 + ...llback__args__t_1_1status__changed__s.html | 131 + ...callback__args__t_1_1status__changed__s.js | 4 + .../doxygen/output/html/structnetvector.html | 148 + .../doxygen/output/html/structnetvector.js | 5 + .../doxygen/output/html/structns__header.html | 107 + .../doc/doxygen/output/html/structpbuf.html | 251 + .../doc/doxygen/output/html/structpbuf.js | 11 + .../output/html/structpbuf__custom.html | 148 + .../doxygen/output/html/structpbuf__custom.js | 5 + .../output/html/structpbuf__custom__ref.html | 149 + .../output/html/structpbuf__custom__ref.js | 5 + .../doxygen/output/html/structpbuf__rom.html | 148 + .../doxygen/output/html/structpbuf__rom.js | 5 + .../doxygen/output/html/structraw__pcb.html | 165 + .../doc/doxygen/output/html/structraw__pcb.js | 6 + .../output/html/structredirect__header.html | 107 + .../doxygen/output/html/structrs__header.html | 107 + .../html/structsmtp__send__request.html | 132 + .../output/html/structsmtp__send__request.js | 4 + .../output/html/structsmtp__session.html | 418 + .../output/html/structsmtp__session.js | 21 + .../output/html/structsnmp__leaf__node.html | 131 + .../output/html/structsnmp__leaf__node.js | 4 + .../doxygen/output/html/structsnmp__mib.html | 107 + .../html/structsnmp__next__oid__state.html | 107 + .../doxygen/output/html/structsnmp__node.html | 148 + .../doxygen/output/html/structsnmp__node.js | 5 + .../html/structsnmp__node__instance.html | 284 + .../output/html/structsnmp__node__instance.js | 13 + .../output/html/structsnmp__obj__id.html | 107 + .../output/html/structsnmp__oid__range.html | 107 + .../html/structsnmp__scalar__array__node.html | 131 + .../html/structsnmp__scalar__array__node.js | 4 + .../structsnmp__scalar__array__node__def.html | 107 + .../output/html/structsnmp__scalar__node.html | 131 + .../output/html/structsnmp__scalar__node.js | 4 + .../html/structsnmp__table__col__def.html | 107 + .../output/html/structsnmp__table__node.html | 182 + .../output/html/structsnmp__table__node.js | 7 + .../html/structsnmp__table__simple__node.html | 107 + .../structsnmp__threadsync__instance.html | 107 + .../html/structsnmp__threadsync__node.html | 107 + .../output/html/structsnmp__tree__node.html | 131 + .../output/html/structsnmp__tree__node.js | 4 + .../output/html/structsnmp__varbind.html | 216 + .../output/html/structsnmp__varbind.js | 9 + .../output/html/structsnmp__varbind__len.html | 107 + .../doxygen/output/html/structsntp__msg.html | 108 + .../output/html/structsntp__server.html | 129 + .../doxygen/output/html/structsntp__server.js | 4 + .../doxygen/output/html/structsntp__time.html | 105 + .../output/html/structsntp__timestamps.html | 105 + .../doxygen/output/html/structstats__.html | 403 + .../doc/doxygen/output/html/structstats__.js | 20 + .../output/html/structstats__igmp.html | 107 + .../doxygen/output/html/structstats__mem.html | 107 + .../output/html/structstats__mib2.html | 107 + .../html/structstats__mib2__netif__ctrs.html | 301 + .../html/structstats__mib2__netif__ctrs.js | 14 + .../output/html/structstats__proto.html | 107 + .../doxygen/output/html/structstats__sys.html | 107 + .../output/html/structstats__syselem.html | 107 + .../doxygen/output/html/structt_c_g_i.html | 107 + .../html/structtcp__ext__arg__callbacks.html | 148 + .../html/structtcp__ext__arg__callbacks.js | 5 + .../doxygen/output/html/structtcp__pcb.html | 148 + .../doc/doxygen/output/html/structtcp__pcb.js | 5 + .../output/html/structtcp__pcb__listen.html | 148 + .../output/html/structtcp__pcb__listen.js | 5 + .../output/html/structtftp__context.html | 210 + .../output/html/structtftp__context.js | 7 + .../output/html/structthreadsync__data.html | 107 + .../doxygen/output/html/structudp__pcb.html | 250 + .../doc/doxygen/output/html/structudp__pcb.js | 11 + .../output/html/structzepif__init.html | 216 + .../doxygen/output/html/structzepif__init.js | 9 + .../LwIP/doc/doxygen/output/html/sys_8c.html | 112 + .../LwIP/doc/doxygen/output/html/sys_8c.js | 4 + .../LwIP/doc/doxygen/output/html/sys_8h.html | 403 + .../LwIP/doc/doxygen/output/html/sys_8h.js | 42 + .../doc/doxygen/output/html/sys_init.html | 116 + .../LwIP/doc/doxygen/output/html/tabs.css | 1 + .../LwIP/doc/doxygen/output/html/tcp_8c.html | 855 + .../LwIP/doc/doxygen/output/html/tcp_8c.js | 52 + .../LwIP/doc/doxygen/output/html/tcp_8h.html | 501 + .../LwIP/doc/doxygen/output/html/tcp_8h.js | 48 + .../doc/doxygen/output/html/tcp__in_8c.html | 189 + .../doc/doxygen/output/html/tcp__in_8c.js | 5 + .../doc/doxygen/output/html/tcp__out_8c.html | 592 + .../doc/doxygen/output/html/tcp__out_8c.js | 19 + .../doc/doxygen/output/html/tcp__priv_8h.html | 1333 + .../doc/doxygen/output/html/tcp__priv_8h.js | 47 + .../doc/doxygen/output/html/tcpbase_8h.html | 104 + .../doc/doxygen/output/html/tcpip_8c.html | 342 + .../LwIP/doc/doxygen/output/html/tcpip_8c.js | 17 + .../doc/doxygen/output/html/tcpip_8h.html | 338 + .../LwIP/doc/doxygen/output/html/tcpip_8h.js | 20 + .../doxygen/output/html/tcpip__priv_8h.html | 197 + .../doc/doxygen/output/html/tcpip__priv_8h.js | 5 + .../doxygen/output/html/tftp__opts_8h.html | 129 + .../doc/doxygen/output/html/tftp__opts_8h.js | 10 + .../doxygen/output/html/tftp__server_8c.html | 122 + .../doxygen/output/html/tftp__server_8c.js | 5 + .../doxygen/output/html/tftp__server_8h.html | 126 + .../doxygen/output/html/tftp__server_8h.js | 5 + .../doc/doxygen/output/html/timeouts_8c.html | 338 + .../doc/doxygen/output/html/timeouts_8c.js | 12 + .../doc/doxygen/output/html/timeouts_8h.html | 376 + .../doc/doxygen/output/html/timeouts_8h.js | 15 + .../LwIP/doc/doxygen/output/html/udp_8c.html | 248 + .../LwIP/doc/doxygen/output/html/udp_8c.js | 18 + .../LwIP/doc/doxygen/output/html/udp_8h.html | 278 + .../LwIP/doc/doxygen/output/html/udp_8h.js | 20 + .../unionnetif__ext__callback__args__t.html | 123 + .../unionnetif__ext__callback__args__t.js | 8 + .../html/unionsnmp__variant__value.html | 107 + .../output/html/unionsockaddr__aligned.html | 105 + .../doc/doxygen/output/html/upgrading.html | 377 + .../doc/doxygen/output/html/zepif_8c.html | 137 + .../LwIP/doc/doxygen/output/html/zepif_8c.js | 5 + .../doc/doxygen/output/html/zepif_8h.html | 119 + .../LwIP/doc/doxygen/output/html/zepif_8h.js | 5 + .../doc/doxygen/output/html/zerocopyrx.html | 99 + Libraries/LwIP/doc/mdns.txt | 17 +- Libraries/LwIP/doc/mqtt_client.txt | 2 +- Libraries/LwIP/doc/savannah.txt | 4 +- Libraries/LwIP/src/Filelists.cmake | 279 + Libraries/LwIP/src/Filelists.mk | 42 +- Libraries/LwIP/src/api/api_lib.c | 665 +- Libraries/LwIP/src/api/api_msg.c | 1180 +- Libraries/LwIP/src/api/err.c | 34 +- Libraries/LwIP/src/api/if_api.c | 102 + Libraries/LwIP/src/api/netbuf.c | 10 +- Libraries/LwIP/src/api/netdb.c | 47 +- Libraries/LwIP/src/api/netifapi.c | 179 +- Libraries/LwIP/src/api/sockets.c | 3723 ++- Libraries/LwIP/src/api/tcpip.c | 240 +- .../src/apps/altcp_tls/altcp_tls_mbedtls.c | 1178 + .../apps/altcp_tls/altcp_tls_mbedtls_mem.c | 210 + .../apps/altcp_tls/altcp_tls_mbedtls_mem.h | 72 + .../altcp_tls/altcp_tls_mbedtls_structs.h | 83 + .../LwIP/src/apps/http/altcp_proxyconnect.c | 584 + Libraries/LwIP/src/apps/http/fs.c | 178 + Libraries/LwIP/src/apps/http/fs/404.html | 21 + Libraries/LwIP/src/apps/http/fs/img/sics.gif | Bin 0 -> 724 bytes Libraries/LwIP/src/apps/http/fs/index.html | 47 + Libraries/LwIP/src/apps/http/fs_new.c | 174 + Libraries/LwIP/src/apps/http/fsdata.c | 298 + Libraries/LwIP/src/apps/http/fsdata.h | 50 + Libraries/LwIP/src/apps/http/fsdata_new.c | 337 + Libraries/LwIP/src/apps/http/fsdata_new.h | 41 + Libraries/LwIP/src/apps/http/http_client.c | 909 + Libraries/LwIP/src/apps/http/httpd.c | 2746 ++ Libraries/LwIP/src/apps/http/httpd_structs.h | 123 + .../LwIP/src/apps/http/makefsdata/makefsdata | 97 + .../src/apps/http/makefsdata/makefsdata.c | 1251 + .../LwIP/src/apps/http/makefsdata/readme.txt | 13 + .../LwIP/src/apps/http/makefsdata/tinydir.h | 808 + Libraries/LwIP/src/apps/httpd/fsdata.h | 22 +- Libraries/LwIP/src/apps/lwiperf/lwiperf.c | 470 +- Libraries/LwIP/src/apps/mdns/mdns.c | 671 +- Libraries/LwIP/src/apps/mqtt/mqtt.c | 365 +- Libraries/LwIP/src/apps/netbiosns/netbiosns.c | 304 +- Libraries/LwIP/src/apps/smtp/smtp.c | 1555 + Libraries/LwIP/src/apps/snmp/snmp_asn1.c | 273 +- Libraries/LwIP/src/apps/snmp/snmp_asn1.h | 33 +- Libraries/LwIP/src/apps/snmp/snmp_core.c | 230 +- Libraries/LwIP/src/apps/snmp/snmp_core_priv.h | 17 +- Libraries/LwIP/src/apps/snmp/snmp_mib2.c | 6 +- Libraries/LwIP/src/apps/snmp/snmp_mib2_icmp.c | 164 +- .../LwIP/src/apps/snmp/snmp_mib2_interfaces.c | 259 +- Libraries/LwIP/src/apps/snmp/snmp_mib2_ip.c | 462 +- Libraries/LwIP/src/apps/snmp/snmp_mib2_snmp.c | 200 +- .../LwIP/src/apps/snmp/snmp_mib2_system.c | 159 +- Libraries/LwIP/src/apps/snmp/snmp_mib2_tcp.c | 251 +- Libraries/LwIP/src/apps/snmp/snmp_mib2_udp.c | 143 +- Libraries/LwIP/src/apps/snmp/snmp_msg.c | 597 +- Libraries/LwIP/src/apps/snmp/snmp_msg.h | 37 +- Libraries/LwIP/src/apps/snmp/snmp_netconn.c | 26 +- .../LwIP/src/apps/snmp/snmp_pbuf_stream.c | 18 +- .../LwIP/src/apps/snmp/snmp_pbuf_stream.h | 19 +- Libraries/LwIP/src/apps/snmp/snmp_raw.c | 19 +- Libraries/LwIP/src/apps/snmp/snmp_scalar.c | 72 +- .../src/apps/snmp/snmp_snmpv2_framework.c | 90 + .../LwIP/src/apps/snmp/snmp_snmpv2_usm.c | 410 + Libraries/LwIP/src/apps/snmp/snmp_table.c | 79 +- .../LwIP/src/apps/snmp/snmp_threadsync.c | 76 +- Libraries/LwIP/src/apps/snmp/snmp_traps.c | 81 +- Libraries/LwIP/src/apps/snmp/snmpv3.c | 8 +- Libraries/LwIP/src/apps/snmp/snmpv3_mbedtls.c | 91 +- Libraries/LwIP/src/apps/snmp/snmpv3_priv.h | 21 +- Libraries/LwIP/src/apps/sntp/sntp.c | 370 +- Libraries/LwIP/src/apps/tftp/tftp_server.c | 130 +- Libraries/LwIP/src/core/altcp.c | 681 + Libraries/LwIP/src/core/altcp_alloc.c | 87 + Libraries/LwIP/src/core/altcp_tcp.c | 543 + Libraries/LwIP/src/core/def.c | 72 +- Libraries/LwIP/src/core/dns.c | 220 +- Libraries/LwIP/src/core/inet_chksum.c | 71 +- Libraries/LwIP/src/core/init.c | 155 +- Libraries/LwIP/src/core/ip.c | 53 +- Libraries/LwIP/src/core/ipv4/autoip.c | 152 +- Libraries/LwIP/src/core/ipv4/dhcp.c | 917 +- Libraries/LwIP/src/core/ipv4/etharp.c | 304 +- Libraries/LwIP/src/core/ipv4/icmp.c | 311 +- Libraries/LwIP/src/core/ipv4/igmp.c | 223 +- Libraries/LwIP/src/core/ipv4/ip4.c | 402 +- Libraries/LwIP/src/core/ipv4/ip4_addr.c | 106 +- Libraries/LwIP/src/core/ipv4/ip4_frag.c | 184 +- Libraries/LwIP/src/core/ipv6/dhcp6.c | 778 +- Libraries/LwIP/src/core/ipv6/ethip6.c | 5 + Libraries/LwIP/src/core/ipv6/icmp6.c | 171 +- Libraries/LwIP/src/core/ipv6/ip6.c | 826 +- Libraries/LwIP/src/core/ipv6/ip6_addr.c | 93 +- Libraries/LwIP/src/core/ipv6/ip6_frag.c | 229 +- Libraries/LwIP/src/core/ipv6/mld6.c | 96 +- Libraries/LwIP/src/core/ipv6/nd6.c | 878 +- Libraries/LwIP/src/core/mem.c | 436 +- Libraries/LwIP/src/core/memp.c | 125 +- Libraries/LwIP/src/core/netif.c | 1054 +- Libraries/LwIP/src/core/pbuf.c | 820 +- Libraries/LwIP/src/core/raw.c | 294 +- Libraries/LwIP/src/core/stats.c | 30 +- Libraries/LwIP/src/core/sys.c | 44 +- Libraries/LwIP/src/core/tcp.c | 1061 +- Libraries/LwIP/src/core/tcp_in.c | 1277 +- Libraries/LwIP/src/core/tcp_out.c | 1369 +- Libraries/LwIP/src/core/timeouts.c | 320 +- Libraries/LwIP/src/core/udp.c | 405 +- .../LwIP/src/include/compat/posix/arpa/inet.h | 33 + .../LwIP/src/include/compat/posix/net/if.h | 36 + .../LwIP/src/include/compat/posix/netdb.h | 33 + .../src/include/compat/posix/sys/socket.h | 33 + .../LwIP/src/include/compat/stdc/errno.h | 33 + Libraries/LwIP/src/include/lwip/altcp.h | 201 + Libraries/LwIP/src/include/lwip/altcp_tcp.h | 72 + Libraries/LwIP/src/include/lwip/altcp_tls.h | 117 + Libraries/LwIP/src/include/lwip/api.h | 85 +- .../include/lwip/apps/altcp_proxyconnect.h | 79 + .../lwip/apps/altcp_tls_mbedtls_opts.h | 67 + Libraries/LwIP/src/include/lwip/apps/fs.h | 25 +- .../LwIP/src/include/lwip/apps/http_client.h | 160 + Libraries/LwIP/src/include/lwip/apps/httpd.h | 69 +- .../LwIP/src/include/lwip/apps/httpd_opts.h | 102 +- .../LwIP/src/include/lwip/apps/lwiperf.h | 18 +- Libraries/LwIP/src/include/lwip/apps/mdns.h | 46 +- .../LwIP/src/include/lwip/apps/mdns_opts.h | 7 + .../LwIP/src/include/lwip/apps/mdns_priv.h | 8 + Libraries/LwIP/src/include/lwip/apps/mqtt.h | 99 +- .../LwIP/src/include/lwip/apps/mqtt_opts.h | 2 +- .../LwIP/src/include/lwip/apps/mqtt_priv.h | 104 + .../LwIP/src/include/lwip/apps/netbiosns.h | 8 + .../src/include/lwip/apps/netbiosns_opts.h | 7 + Libraries/LwIP/src/include/lwip/apps/smtp.h | 128 + .../LwIP/src/include/lwip/apps/smtp_opts.h | 81 + Libraries/LwIP/src/include/lwip/apps/snmp.h | 7 + .../LwIP/src/include/lwip/apps/snmp_core.h | 19 +- .../LwIP/src/include/lwip/apps/snmp_opts.h | 16 +- .../include/lwip/apps/snmp_snmpv2_framework.h | 32 + .../src/include/lwip/apps/snmp_snmpv2_usm.h | 24 + Libraries/LwIP/src/include/lwip/apps/snmpv3.h | 46 +- Libraries/LwIP/src/include/lwip/apps/sntp.h | 8 +- .../LwIP/src/include/lwip/apps/sntp_opts.h | 64 +- .../LwIP/src/include/lwip/apps/tftp_opts.h | 11 +- .../LwIP/src/include/lwip/apps/tftp_server.h | 5 +- Libraries/LwIP/src/include/lwip/arch.h | 78 +- Libraries/LwIP/src/include/lwip/debug.h | 6 - Libraries/LwIP/src/include/lwip/def.h | 39 +- Libraries/LwIP/src/include/lwip/dhcp.h | 6 +- Libraries/LwIP/src/include/lwip/dhcp6.h | 64 +- Libraries/LwIP/src/include/lwip/dns.h | 1 + Libraries/LwIP/src/include/lwip/err.h | 16 +- Libraries/LwIP/src/include/lwip/errno.h | 7 +- Libraries/LwIP/src/include/lwip/etharp.h | 15 +- Libraries/LwIP/src/include/lwip/icmp6.h | 4 +- Libraries/LwIP/src/include/lwip/if_api.h | 68 + Libraries/LwIP/src/include/lwip/inet.h | 7 +- Libraries/LwIP/src/include/lwip/inet_chksum.h | 2 +- Libraries/LwIP/src/include/lwip/init.h | 8 +- .../LwIP/src/include/lwip/init.h.cmake.in | 100 + Libraries/LwIP/src/include/lwip/ip.h | 75 +- Libraries/LwIP/src/include/lwip/ip4.h | 10 +- Libraries/LwIP/src/include/lwip/ip4_addr.h | 51 +- Libraries/LwIP/src/include/lwip/ip6.h | 6 +- Libraries/LwIP/src/include/lwip/ip6_addr.h | 99 +- Libraries/LwIP/src/include/lwip/ip6_frag.h | 50 +- Libraries/LwIP/src/include/lwip/ip6_zone.h | 304 + Libraries/LwIP/src/include/lwip/ip_addr.h | 81 +- Libraries/LwIP/src/include/lwip/memp.h | 2 +- Libraries/LwIP/src/include/lwip/nd6.h | 6 + Libraries/LwIP/src/include/lwip/netbuf.h | 2 - Libraries/LwIP/src/include/lwip/netif.h | 247 +- Libraries/LwIP/src/include/lwip/netifapi.h | 113 +- Libraries/LwIP/src/include/lwip/opt.h | 831 +- Libraries/LwIP/src/include/lwip/pbuf.h | 83 +- .../LwIP/src/include/lwip/priv/altcp_priv.h | 146 + .../LwIP/src/include/lwip/priv/api_msg.h | 80 +- .../LwIP/src/include/lwip/priv/mem_priv.h | 84 + .../LwIP/src/include/lwip/priv/memp_priv.h | 30 +- .../LwIP/src/include/lwip/priv/memp_std.h | 17 +- .../LwIP/src/include/lwip/priv/nd6_priv.h | 16 +- .../LwIP/src/include/lwip/priv/raw_priv.h | 69 + .../LwIP/src/include/lwip/priv/sockets_priv.h | 175 + .../LwIP/src/include/lwip/priv/tcp_priv.h | 70 +- .../LwIP/src/include/lwip/priv/tcpip_priv.h | 14 +- Libraries/LwIP/src/include/lwip/prot/dhcp.h | 11 +- Libraries/LwIP/src/include/lwip/prot/dhcp6.h | 138 + Libraries/LwIP/src/include/lwip/prot/etharp.h | 41 +- .../LwIP/src/include/lwip/prot/ethernet.h | 55 +- Libraries/LwIP/src/include/lwip/prot/iana.h | 97 + Libraries/LwIP/src/include/lwip/prot/ieee.h | 91 + Libraries/LwIP/src/include/lwip/prot/igmp.h | 2 +- Libraries/LwIP/src/include/lwip/prot/ip.h | 8 + Libraries/LwIP/src/include/lwip/prot/ip4.h | 4 + Libraries/LwIP/src/include/lwip/prot/ip6.h | 126 +- Libraries/LwIP/src/include/lwip/prot/mld6.h | 1 + Libraries/LwIP/src/include/lwip/prot/nd6.h | 9 +- Libraries/LwIP/src/include/lwip/prot/tcp.h | 5 +- Libraries/LwIP/src/include/lwip/raw.h | 33 +- Libraries/LwIP/src/include/lwip/sockets.h | 285 +- Libraries/LwIP/src/include/lwip/stats.h | 12 +- Libraries/LwIP/src/include/lwip/sys.h | 153 +- Libraries/LwIP/src/include/lwip/tcp.h | 137 +- Libraries/LwIP/src/include/lwip/tcpbase.h | 88 + Libraries/LwIP/src/include/lwip/tcpip.h | 19 +- Libraries/LwIP/src/include/lwip/timeouts.h | 17 +- Libraries/LwIP/src/include/lwip/udp.h | 23 +- Libraries/LwIP/src/include/netif/bridgeif.h | 127 + .../LwIP/src/include/netif/bridgeif_opts.h | 90 + Libraries/LwIP/src/include/netif/ieee802154.h | 112 + Libraries/LwIP/src/include/netif/lowpan6.h | 11 +- .../LwIP/src/include/netif/lowpan6_ble.h | 78 + .../LwIP/src/include/netif/lowpan6_common.h | 82 + .../LwIP/src/include/netif/lowpan6_opts.h | 68 +- Libraries/LwIP/src/include/netif/ppp/ccp.h | 88 +- .../LwIP/src/include/netif/ppp/chap-new.h | 98 +- Libraries/LwIP/src/include/netif/ppp/eap.h | 166 +- Libraries/LwIP/src/include/netif/ppp/ecp.h | 16 +- Libraries/LwIP/src/include/netif/ppp/eui64.h | 68 +- Libraries/LwIP/src/include/netif/ppp/fsm.h | 149 +- Libraries/LwIP/src/include/netif/ppp/ipcp.h | 44 +- Libraries/LwIP/src/include/netif/ppp/ipv6cp.h | 16 +- Libraries/LwIP/src/include/netif/ppp/lcp.h | 100 +- Libraries/LwIP/src/include/netif/ppp/magic.h | 10 +- Libraries/LwIP/src/include/netif/ppp/mppe.h | 162 +- Libraries/LwIP/src/include/netif/ppp/ppp.h | 12 +- .../LwIP/src/include/netif/ppp/ppp_impl.h | 351 +- .../LwIP/src/include/netif/ppp/ppp_opts.h | 21 +- .../LwIP/src/include/netif/ppp/pppcrypt.h | 10 +- .../LwIP/src/include/netif/ppp/pppdebug.h | 8 + Libraries/LwIP/src/include/netif/ppp/pppoe.h | 8 + .../LwIP/src/include/netif/ppp/pppol2tp.h | 10 +- Libraries/LwIP/src/include/netif/ppp/pppos.h | 8 + Libraries/LwIP/src/include/netif/ppp/upap.h | 60 +- Libraries/LwIP/src/include/netif/ppp/vj.h | 8 + Libraries/LwIP/src/include/netif/zepif.h | 81 + Libraries/LwIP/src/netif/FILES | 9 +- Libraries/LwIP/src/netif/bridgeif.c | 563 + Libraries/LwIP/src/netif/bridgeif_fdb.c | 212 + Libraries/LwIP/src/netif/ethernet.c | 95 +- Libraries/LwIP/src/netif/lowpan6.c | 1321 +- Libraries/LwIP/src/netif/lowpan6_ble.c | 447 + Libraries/LwIP/src/netif/lowpan6_common.c | 841 + Libraries/LwIP/src/netif/ppp/auth.c | 1452 +- Libraries/LwIP/src/netif/ppp/ccp.c | 1562 +- Libraries/LwIP/src/netif/ppp/chap-md5.c | 116 +- Libraries/LwIP/src/netif/ppp/chap-new.c | 816 +- Libraries/LwIP/src/netif/ppp/chap_ms.c | 758 +- Libraries/LwIP/src/netif/ppp/demand.c | 294 +- Libraries/LwIP/src/netif/ppp/eap.c | 3570 +-- Libraries/LwIP/src/netif/ppp/ecp.c | 12 +- Libraries/LwIP/src/netif/ppp/eui64.c | 4 +- Libraries/LwIP/src/netif/ppp/fsm.c | 598 +- Libraries/LwIP/src/netif/ppp/ipcp.c | 1982 +- Libraries/LwIP/src/netif/ppp/ipv6cp.c | 974 +- Libraries/LwIP/src/netif/ppp/lcp.c | 2324 +- Libraries/LwIP/src/netif/ppp/mppe.c | 526 +- Libraries/LwIP/src/netif/ppp/multilink.c | 828 +- Libraries/LwIP/src/netif/ppp/ppp.c | 83 +- Libraries/LwIP/src/netif/ppp/pppcrypt.c | 26 +- Libraries/LwIP/src/netif/ppp/pppoe.c | 84 +- Libraries/LwIP/src/netif/ppp/pppol2tp.c | 136 +- Libraries/LwIP/src/netif/ppp/pppos.c | 34 +- Libraries/LwIP/src/netif/ppp/upap.c | 264 +- Libraries/LwIP/src/netif/ppp/utils.c | 878 +- Libraries/LwIP/src/netif/ppp/vj.c | 46 +- Libraries/LwIP/src/netif/slipif.c | 139 +- Libraries/LwIP/src/netif/zepif.c | 300 + Libraries/LwIP/st_readme.txt | 12 + Libraries/LwIP/system/OS/sys_arch.c | 264 +- Libraries/LwIP/system/arch/sys_arch.h | 42 +- Libraries/LwIP/test/fuzz/Makefile | 9 +- Libraries/LwIP/test/fuzz/README | 3 + Libraries/LwIP/test/fuzz/fuzz.c | 59 +- Libraries/LwIP/test/fuzz/lwipopts.h | 16 +- .../LwIP/test/sockets/sockets_stresstest.c | 726 + .../LwIP/test/sockets/sockets_stresstest.h | 40 + Libraries/LwIP/test/unit/Filelists.cmake | 31 + Libraries/LwIP/test/unit/Filelists.mk | 51 + Libraries/LwIP/test/unit/api/test_sockets.c | 852 + Libraries/LwIP/test/unit/api/test_sockets.h | 8 + Libraries/LwIP/test/unit/arch/sys_arch.c | 371 + Libraries/LwIP/test/unit/arch/sys_arch.h | 72 + Libraries/LwIP/test/unit/core/test_def.c | 84 + Libraries/LwIP/test/unit/core/test_def.h | 8 + Libraries/LwIP/test/unit/core/test_mem.c | 105 +- Libraries/LwIP/test/unit/core/test_netif.c | 227 + Libraries/LwIP/test/unit/core/test_netif.h | 8 + Libraries/LwIP/test/unit/core/test_pbuf.c | 44 +- Libraries/LwIP/test/unit/core/test_timers.c | 233 + Libraries/LwIP/test/unit/core/test_timers.h | 8 + Libraries/LwIP/test/unit/dhcp/test_dhcp.c | 49 +- Libraries/LwIP/test/unit/etharp/test_etharp.c | 7 +- Libraries/LwIP/test/unit/ip4/test_ip4.c | 6 + Libraries/LwIP/test/unit/ip6/test_ip6.c | 321 + Libraries/LwIP/test/unit/ip6/test_ip6.h | 8 + Libraries/LwIP/test/unit/lwip_check.h | 5 + Libraries/LwIP/test/unit/lwip_unittests.c | 37 +- Libraries/LwIP/test/unit/lwipopts.h | 28 +- Libraries/LwIP/test/unit/mdns/test_mdns.c | 42 +- Libraries/LwIP/test/unit/mqtt/test_mqtt.c | 115 + Libraries/LwIP/test/unit/mqtt/test_mqtt.h | 8 + Libraries/LwIP/test/unit/tcp/tcp_helper.c | 11 +- Libraries/LwIP/test/unit/tcp/tcp_helper.h | 12 +- Libraries/LwIP/test/unit/tcp/test_tcp.c | 1097 +- Libraries/LwIP/test/unit/tcp/test_tcp_oos.c | 83 +- Libraries/LwIP/test/unit/udp/test_udp.c | 279 + .../Inc/Legacy/stm32_hal_legacy.h | 19 +- .../STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal.h | 101 +- .../Inc/stm32h7xx_hal_adc.h | 338 +- .../Inc/stm32h7xx_hal_adc_ex.h | 213 +- .../Inc/stm32h7xx_hal_conf_template.h | 44 +- .../Inc/stm32h7xx_hal_cordic.h | 599 + .../Inc/stm32h7xx_hal_cryp.h | 6 +- .../Inc/stm32h7xx_hal_dfsdm.h | 64 +- .../Inc/stm32h7xx_hal_dma.h | 41 +- .../Inc/stm32h7xx_hal_eth.h | 8 +- .../Inc/stm32h7xx_hal_eth_ex.h | 2 +- .../Inc/stm32h7xx_hal_exti.h | 49 +- .../Inc/stm32h7xx_hal_fdcan.h | 3 + .../Inc/stm32h7xx_hal_flash.h | 57 +- .../Inc/stm32h7xx_hal_flash_ex.h | 148 +- .../Inc/stm32h7xx_hal_fmac.h | 696 + .../Inc/stm32h7xx_hal_gpio_ex.h | 69 +- .../Inc/stm32h7xx_hal_hcd.h | 75 +- .../Inc/stm32h7xx_hal_i2c_ex.h | 6 + .../Inc/stm32h7xx_hal_i2s.h | 56 +- .../Inc/stm32h7xx_hal_i2s_ex.h | 10 +- .../Inc/stm32h7xx_hal_mdma.h | 19 +- .../Inc/stm32h7xx_hal_mmc.h | 50 +- .../Inc/stm32h7xx_hal_mmc_ex.h | 24 +- .../Inc/stm32h7xx_hal_otfdec.h | 43 +- .../Inc/stm32h7xx_hal_pcd.h | 30 +- .../Inc/stm32h7xx_hal_pwr.h | 113 +- .../Inc/stm32h7xx_hal_pwr_ex.h | 156 +- .../Inc/stm32h7xx_hal_rcc.h | 344 +- .../Inc/stm32h7xx_hal_rcc_ex.h | 310 +- .../Inc/stm32h7xx_hal_rtc.h | 5 +- .../Inc/stm32h7xx_hal_rtc_ex.h | 24 +- .../Inc/stm32h7xx_hal_sai.h | 12 +- .../Inc/stm32h7xx_hal_sd.h | 1 - .../Inc/stm32h7xx_hal_sd_ex.h | 26 +- .../Inc/stm32h7xx_hal_smbus.h | 8 +- .../Inc/stm32h7xx_hal_tim.h | 163 +- .../Inc/stm32h7xx_hal_tim_ex.h | 1 + .../Inc/stm32h7xx_hal_uart.h | 12 +- .../Inc/stm32h7xx_ll_adc.h | 1201 +- .../Inc/stm32h7xx_ll_bdma.h | 99 +- .../Inc/stm32h7xx_ll_bus.h | 766 +- .../Inc/stm32h7xx_ll_comp.h | 12 - .../Inc/stm32h7xx_ll_cordic.h | 777 + .../Inc/stm32h7xx_ll_dma.h | 188 +- .../Inc/stm32h7xx_ll_dma2d.h | 1 - .../Inc/stm32h7xx_ll_dmamux.h | 245 +- .../Inc/stm32h7xx_ll_exti.h | 380 +- .../Inc/stm32h7xx_ll_fmac.h | 1049 + .../Inc/stm32h7xx_ll_hrtim.h | 992 +- .../Inc/stm32h7xx_ll_hsem.h | 1 + .../Inc/stm32h7xx_ll_i2c.h | 84 +- .../Inc/stm32h7xx_ll_lpuart.h | 8 +- .../Inc/stm32h7xx_ll_mdma.h | 218 +- .../Inc/stm32h7xx_ll_opamp.h | 10 +- .../Inc/stm32h7xx_ll_pwr.h | 106 +- .../Inc/stm32h7xx_ll_rcc.h | 202 +- .../Inc/stm32h7xx_ll_rng.h | 4 +- .../Inc/stm32h7xx_ll_rtc.h | 40 +- .../Inc/stm32h7xx_ll_sdmmc.h | 3 +- .../Inc/stm32h7xx_ll_spi.h | 4 +- .../Inc/stm32h7xx_ll_system.h | 200 +- .../Inc/stm32h7xx_ll_tim.h | 111 +- .../Inc/stm32h7xx_ll_usart.h | 286 +- .../Inc/stm32h7xx_ll_usb.h | 40 +- .../Inc/stm32h7xx_ll_utils.h | 27 +- .../STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.c | 50 +- .../Src/stm32h7xx_hal_adc.c | 524 +- .../Src/stm32h7xx_hal_adc_ex.c | 239 +- .../Src/stm32h7xx_hal_cordic.c | 1352 + .../Src/stm32h7xx_hal_cryp.c | 16 +- .../Src/stm32h7xx_hal_cryp_ex.c | 6 + .../Src/stm32h7xx_hal_dcmi.c | 4 +- .../Src/stm32h7xx_hal_dfsdm.c | 190 +- .../Src/stm32h7xx_hal_dma.c | 2 + .../Src/stm32h7xx_hal_dts.c | 4 + .../Src/stm32h7xx_hal_eth.c | 79 +- .../Src/stm32h7xx_hal_fdcan.c | 77 +- .../Src/stm32h7xx_hal_flash.c | 124 +- .../Src/stm32h7xx_hal_flash_ex.c | 174 +- .../Src/stm32h7xx_hal_fmac.c | 2520 ++ .../Src/stm32h7xx_hal_hcd.c | 13 + .../Src/stm32h7xx_hal_hrtim.c | 30 +- .../Src/stm32h7xx_hal_hsem.c | 8 + .../Src/stm32h7xx_hal_i2c.c | 15 +- .../Src/stm32h7xx_hal_i2c_ex.c | 4 + .../Src/stm32h7xx_hal_i2s.c | 682 +- .../Src/stm32h7xx_hal_i2s_ex.c | 19 +- .../Src/stm32h7xx_hal_iwdg.c | 44 +- .../Src/stm32h7xx_hal_jpeg.c | 13 +- .../Src/stm32h7xx_hal_mmc.c | 667 +- .../Src/stm32h7xx_hal_mmc_ex.c | 92 +- .../Src/stm32h7xx_hal_otfdec.c | 2 +- .../Src/stm32h7xx_hal_pwr.c | 15 +- .../Src/stm32h7xx_hal_pwr_ex.c | 80 +- .../Src/stm32h7xx_hal_rcc_ex.c | 77 +- .../Src/stm32h7xx_hal_rng.c | 2 +- .../Src/stm32h7xx_hal_rng_ex.c | 4 +- .../Src/stm32h7xx_hal_rtc.c | 309 +- .../Src/stm32h7xx_hal_rtc_ex.c | 255 +- .../Src/stm32h7xx_hal_sai.c | 32 +- .../Src/stm32h7xx_hal_sd.c | 17 +- .../Src/stm32h7xx_hal_sd_ex.c | 1 + .../Src/stm32h7xx_hal_smartcard.c | 180 +- .../Src/stm32h7xx_hal_smartcard_ex.c | 4 +- .../Src/stm32h7xx_hal_smbus.c | 32 +- .../Src/stm32h7xx_hal_spdifrx.c | 8 +- .../Src/stm32h7xx_hal_spi.c | 26 +- .../Src/stm32h7xx_hal_tim.c | 725 +- .../Src/stm32h7xx_hal_tim_ex.c | 375 +- ...tm32h7xx_hal_timebase_rtc_alarm_template.c | 6 +- ...m32h7xx_hal_timebase_rtc_wakeup_template.c | 6 +- .../Src/stm32h7xx_hal_timebase_tim_template.c | 6 +- .../Src/stm32h7xx_hal_uart.c | 155 +- .../Src/stm32h7xx_hal_uart_ex.c | 4 +- .../Src/stm32h7xx_hal_usart.c | 2 +- .../Src/stm32h7xx_hal_usart_ex.c | 4 +- .../Src/stm32h7xx_hal_wwdg.c | 20 +- .../Src/stm32h7xx_ll_adc.c | 52 +- .../Src/stm32h7xx_ll_cordic.c | 105 + .../Src/stm32h7xx_ll_dma.c | 6 +- .../Src/stm32h7xx_ll_fmac.c | 167 + .../Src/stm32h7xx_ll_i2c.c | 14 +- .../Src/stm32h7xx_ll_mdma.c | 31 +- .../Src/stm32h7xx_ll_pwr.c | 6 +- .../Src/stm32h7xx_ll_rcc.c | 75 +- .../Src/stm32h7xx_ll_sdmmc.c | 19 +- .../Src/stm32h7xx_ll_tim.c | 4 +- .../Src/stm32h7xx_ll_usb.c | 26 +- .../Src/stm32h7xx_ll_utils.c | 187 +- Project/H7-BOOT.bin | Bin 0 -> 47088 bytes Project/MDK-ARM(uV5)/project.uvoptx | 837 +- Project/MDK-ARM(uV5)/project.uvprojx | 148 +- Project/MDK-ARM(uV5)/startup_stm32h743xx.s | 2 +- ...pp(V1.43).bin => h7_tool_app(V1.44).bin} | Bin 1326764 -> 1326764 bytes User/app/inc/param.h | 21 +- User/app/src/file_lib.c | 36 +- User/app/src/main.c | 33 +- User/app/src/status_esp32.c | 110 + User/app/src/status_file_mange.c | 639 + User/app/src/status_hard_info.c | 231 + User/app/src/status_link_mode.c | 105 +- User/app/src/status_system_set.c | 969 - User/app/src/status_usb_emmc.c | 81 + User/bsp/bsp.c | 19 +- User/bsp/bsp_msg.h | 2 + User/bsp/nvic_prio_cfg.h | 149 + User/bsp/src/bsp_cpu_adc.c | 21 +- User/bsp/src/bsp_emmc.c | 7 +- User/bsp/src/bsp_qspi_w25q256.c | 5 +- User/bsp/src/bsp_tft_lcd.c | 1 - User/bsp/src/bsp_tft_st7789.c | 5 +- User/bsp/src/bsp_timer.c | 3 +- User/bsp/src/bsp_uart_fifo.c | 17 +- User/lua/if/lua_if.c | 9 +- User/lua/if/lua_if_disp.c | 117 +- User/lua/if/lua_if_swd.c | 7 + User/lwip_http - bak/Fs/404.html | 21 + User/lwip_http - bak/Fs/STM32H7xxADC.shtml | 70 + User/lwip_http - bak/Fs/STM32H7xxLED.html | 74 + .../lwip_http - bak/Fs/STM32H7xx_files/ST.gif | Bin 0 -> 4852 bytes .../Fs/STM32H7xx_files/logo.jpg | Bin 0 -> 2554 bytes .../Fs/STM32H7xx_files/stm32.jpg | Bin 0 -> 40619 bytes User/lwip_http - bak/Fs/index.html | 240 + User/lwip_http - bak/altcp_proxyconnect.c | 584 + User/lwip_http - bak/fs.c | 184 + User/lwip_http - bak/fs_new.c | 174 + User/lwip_http - bak/fsdata.c | 298 + User/lwip_http - bak/fsdata.h | 50 + User/lwip_http - bak/fsdata_custom.c | 4599 +++ User/lwip_http - bak/fsdata_new.c | 337 + User/lwip_http - bak/fsdata_new.h | 41 + User/lwip_http - bak/http_cgi_ssi.h | 43 + User/lwip_http - bak/http_client.c | 909 + User/lwip_http - bak/httpd.c | 2746 ++ User/lwip_http - bak/httpd_cgi_ssi.c | 146 + User/lwip_http - bak/httpd_structs.h | 123 + User/lwip_http - bak/lcd_log_conf.h | 148 + User/lwip_http/altcp_proxyconnect.c | 584 + User/lwip_http/fs.c | 184 + User/lwip_http/fs_new.c | 174 + User/lwip_http/fsdata.c | 298 + User/lwip_http/fsdata.h | 50 + User/lwip_http/fsdata_custom.c | 69 +- User/lwip_http/fsdata_new.c | 337 + User/lwip_http/fsdata_new.h | 41 + User/lwip_http/http_cgi_ssi.h | 36 +- User/lwip_http/http_client.c | 909 + User/lwip_http/httpd.c | 2746 ++ User/lwip_http/httpd_cgi_ssi.c | 36 +- User/lwip_http/httpd_structs.h | 123 + User/lwip_if/app_ethernet.c | 42 +- User/lwip_if/app_ethernet.h | 67 +- User/lwip_if/ethernetif.c | 164 +- User/lwip_if/ethernetif.h | 36 +- User/lwip_if/lwip_http/Fs/404.html | 21 + User/lwip_if/lwip_http/Fs/STM32H7xxADC.shtml | 70 + User/lwip_if/lwip_http/Fs/STM32H7xxLED.html | 74 + .../lwip_http/Fs/STM32H7xx_files/ST.gif | Bin 0 -> 4852 bytes .../lwip_http/Fs/STM32H7xx_files/logo.jpg | Bin 0 -> 2554 bytes .../lwip_http/Fs/STM32H7xx_files/stm32.jpg | Bin 0 -> 40619 bytes User/lwip_if/lwip_http/Fs/index.html | 240 + User/lwip_if/lwip_http/altcp_proxyconnect.c | 584 + User/lwip_if/lwip_http/fs.c | 184 + User/lwip_if/lwip_http/fs_new.c | 174 + User/lwip_if/lwip_http/fsdata.c | 298 + User/lwip_if/lwip_http/fsdata.h | 50 + User/lwip_if/lwip_http/fsdata_custom.c | 4599 +++ User/lwip_if/lwip_http/fsdata_new.c | 337 + User/lwip_if/lwip_http/fsdata_new.h | 41 + User/lwip_if/lwip_http/http_cgi_ssi.h | 43 + User/lwip_if/lwip_http/http_client.c | 909 + User/lwip_if/lwip_http/httpd.c | 2746 ++ User/lwip_if/lwip_http/httpd_cgi_ssi.c | 146 + User/lwip_if/lwip_http/httpd_structs.h | 123 + User/lwip_if/lwip_http/lcd_log_conf.h | 148 + User/lwip_if/lwipopts.h | 208 +- User/lwip_if/net_udp.c | 8 + User/modbus/modbus_file.c | 80 +- User/modbus/modbus_file.h | 2 +- User/modbus/modbus_print.c | 114 +- User/modbus/modbus_reg_addr.h | 3 +- User/modbus/modbus_register.c | 67 +- User/modbus/modbus_slave.c | 4 +- User/modbus/modbus_swd.c | 25 +- User/programmer/w25q_flash.c | 4 +- User/st_usb/usb_if.c | 22 +- .../st_usb/usbd_mass_storage/usbd_mass_desc.c | 8 +- User/st_usb/usbd_mass_storage/usbd_storage.c | 1 + .../usbd_virtual_com/usbd_cdc_interface.c | 91 +- User/st_usb/usbd_virtual_com/usbd_conf.c | 25 +- 2109 files changed, 446064 insertions(+), 26102 deletions(-) create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Include/stm32h723xx.h create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Include/stm32h725xx.h create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Include/stm32h730xx.h create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Include/stm32h730xxq.h create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Include/stm32h733xx.h create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Include/stm32h735xx.h create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/linker/stm32h745xg_flash_CM4.sct create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/linker/stm32h745xg_flash_CM7.sct create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/linker/stm32h747xg_flash_CM4.sct create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/linker/stm32h747xg_flash_CM7.sct create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h723xx.s create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h725xx.s create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h730xx.s create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h730xxq.s create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h733xx.s create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h735xx.s create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/linker/stm32h745xg_flash_CM4.ld create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/linker/stm32h745xg_flash_CM7.ld create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/linker/stm32h747xg_flash_CM4.ld create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/linker/stm32h747xg_flash_CM7.ld create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h723xx.s create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h725xx.s create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h730xx.s create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h730xxq.s create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h733xx.s create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h735xx.s create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_axisram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_dtcmram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_flash.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_flash_rw_ahbsram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_flash_rw_axisram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_flash_rw_sram1.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_flash_rw_sram2.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_sram1.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_axisram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_dtcmram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_flash.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_flash_rw_ahbsram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_flash_rw_axisram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_flash_rw_sram1.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_flash_rw_sram2.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_sram1.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_axisram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_dtcmram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_flash.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_flash_rw_ahbsram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_flash_rw_axisram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_flash_rw_sram1.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_flash_rw_sram2.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_sram1.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_axisram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_dtcmram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_flash.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_flash_rw_ahbsram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_flash_rw_axisram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_flash_rw_sram1.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_flash_rw_sram2.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_sram1.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_axisram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_dtcmram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_flash.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_flash_rw_ahbsram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_flash_rw_axisram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_flash_rw_sram1.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_flash_rw_sram2.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_sram1.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_axisram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_dtcmram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_flash.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_flash_rw_ahbsram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_flash_rw_axisram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_flash_rw_sram1.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_flash_rw_sram2.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_sram1.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_axisram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_dtcmram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_flash.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_flash_rw_ahbsram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_flash_rw_axisram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_flash_rw_sram1.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_flash_rw_sram2.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_sram1.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_axisram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_dtcmram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_flash.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_flash_rw_ahbsram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_flash_rw_axisram.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_flash_rw_sram1.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_flash_rw_sram2.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_sram1.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h742xg_flash.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h742xg_flash_rw_sram1.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h742xg_flash_rw_sram2.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h743xg_flash.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h743xg_flash_rw_sram1.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h743xg_flash_rw_sram2.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h745xg_flash_CM4.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h745xg_flash_CM7.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h747xg_flash_CM4.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h747xg_flash_CM7.icf create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h723xx.s create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h725xx.s create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h730xx.s create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h730xxq.s create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h733xx.s create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h735xx.s create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/_htmresc/mini-st.css create mode 100644 Libraries/CMSIS/Device/ST/STM32H7xx/_htmresc/st_logo.png create mode 100644 Libraries/LwIP/CMakeLists.txt create mode 100644 Libraries/LwIP/FEATURES create mode 100644 Libraries/LwIP/doc/ZeroCopyRx.c create mode 100644 Libraries/LwIP/doc/doxygen/lwip.Doxyfile.cmake.in create mode 100644 Libraries/LwIP/doc/doxygen/output/html/altcp_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/altcp_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/altcp_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/altcp_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/altcp__alloc_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/altcp__alloc_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/altcp__priv_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/altcp__priv_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/altcp__proxyconnect_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/altcp__proxyconnect_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/altcp__proxyconnect_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/altcp__proxyconnect_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/altcp__tcp_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/altcp__tcp_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/altcp__tcp_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/altcp__tcp_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/altcp__tls_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/altcp__tls_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/altcp__tls__mbedtls_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/altcp__tls__mbedtls__mem_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/altcp__tls__mbedtls__mem_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/altcp__tls__mbedtls__opts_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/altcp__tls__mbedtls__opts_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/altcp__tls__mbedtls__structs_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/annotated.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/annotated_dup.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/api_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/api_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/api__lib_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/api__lib_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/api__msg_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/api__msg_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/api__msg_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/api__msg_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/apps_2snmp_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/apps_2snmp_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/arch_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/arch_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/autoip_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/autoip_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/autoip_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/autoip_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/bridgeif_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/bridgeif_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/bridgeif_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/bridgeif_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/bridgeif__fdb_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/bridgeif__fdb_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/bridgeif__opts_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/bridgeif__opts_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/bugs.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/changelog.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/classes.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/compat_2posix_2arpa_2inet_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/compat_2posix_2netdb_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/compat_2stdc_2errno_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/contrib.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/debug_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/debug_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/def_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/def_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/def_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/def_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/deprecated.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dhcp6_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dhcp6_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dhcp6_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dhcp6_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dhcp_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dhcp_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dhcp_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dhcp_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_04f2ecc425faf0d475a3caf484e551f3.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_149963277126306875d8bfe8322084f3.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_149963277126306875d8bfe8322084f3.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_1cb496c74bbaf54ecc99133e1c434e0c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_1cb496c74bbaf54ecc99133e1c434e0c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_1e445e767c368c70d58af8a0b7552719.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_1e445e767c368c70d58af8a0b7552719.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_34adf996f92d0eef72c45a7167a966e6.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_34adf996f92d0eef72c45a7167a966e6.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_403e202f99dba154c685be932a8e0c34.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_403e202f99dba154c685be932a8e0c34.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_439fcb6f68ea6a3dc0078b338960fd8f.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_439fcb6f68ea6a3dc0078b338960fd8f.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_460c501b2432fc107adcb38111835e48.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_460c501b2432fc107adcb38111835e48.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_4b846c6b6971d2800eff93d75504accd.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_4b846c6b6971d2800eff93d75504accd.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_4e6b3cf33a61b6caac9c8ac30c866f37.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_4e6b3cf33a61b6caac9c8ac30c866f37.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_53adf0b982dc8545998aae3f283a5a58.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_53adf0b982dc8545998aae3f283a5a58.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_56d2b6ddbb44630b0fd661af6321f9c4.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_56d2b6ddbb44630b0fd661af6321f9c4.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_68267d1309a1af8e8297ef4c3efbcdba.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_6aa605ad180e7b166767bf4f86888ab5.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_6aa605ad180e7b166767bf4f86888ab5.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_6b1b06896a870ebfb9c854c4c71f4ff5.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_6b1b06896a870ebfb9c854c4c71f4ff5.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_8da39adb2a11af660bdd7075b7323870.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_8da39adb2a11af660bdd7075b7323870.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_900e6f7ff90690cb8edb53323dd38d80.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_900e6f7ff90690cb8edb53323dd38d80.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_a32e111ee6805cfc63488fd2d37f2390.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_a32e111ee6805cfc63488fd2d37f2390.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_a840c1e301b5b5eb1d549b1f600a8505.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_aebb8dcc11953d78e620bbef0b9e2183.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_aebb8dcc11953d78e620bbef0b9e2183.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_b0856f6b0d80ccb263b2f415c91f9e17.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_b0856f6b0d80ccb263b2f415c91f9e17.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_b42baff89a1adc9a57da7decb1835b6b.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_b42baff89a1adc9a57da7decb1835b6b.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_c62aba36f6630fea5cd7fe1c941850d4.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_c62aba36f6630fea5cd7fe1c941850d4.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_c9a67764bf8a12cf6b427bb859cbcd0b.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_c9a67764bf8a12cf6b427bb859cbcd0b.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_da61e3e9a357748887e3ca8d7c5a0c16.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_da61e3e9a357748887e3ca8d7c5a0c16.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_da9c6f43d3cd00be3de224bac907a425.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_da9c6f43d3cd00be3de224bac907a425.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_dfacd4b005f6a743295cd1d76eff7420.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_dfacd4b005f6a743295cd1d76eff7420.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_e68e8157741866f444e17edd764ebbae.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_e7856a6aeaebbc124e80ad9550aedba4.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_e7856a6aeaebbc124e80ad9550aedba4.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_ed91d3856030f1b493eca503ef5b96f9.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_f9284811ac594eafdc3134d5f8b945cb.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_f9284811ac594eafdc3134d5f8b945cb.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_fa0f2b7ac208069fc8d28c28af349d8d.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_fa0f2b7ac208069fc8d28c28af349d8d.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_fb3f7e43f39ddb210bd1444e66d055f1.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_fb3f7e43f39ddb210bd1444e66d055f1.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_fe219fca207b878205c0dd92278d118b.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_fe219fca207b878205c0dd92278d118b.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_febe3a637907666e8b25366ae60efc0b.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dir_febe3a637907666e8b25366ae60efc0b.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dns_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dns_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dns_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dns_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/doxygen.css create mode 100644 Libraries/LwIP/doc/doxygen/output/html/dynsections.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/err_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/err_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/err_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/etharp_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/etharp_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ethernet_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ethernet_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ethip6_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ethip6_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ethip6_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ethip6_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/files.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/files.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_a.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_b.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_d.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_dup.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_e.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_f.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_g.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_i.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_j.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_k.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_l.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_m.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_n.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_o.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_p.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_q.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_r.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_s.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_t.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_u.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_v.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_vars.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_vars.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_vars_a.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_vars_b.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_vars_c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_vars_d.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_vars_e.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_vars_f.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_vars_g.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_vars_h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_vars_i.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_vars_j.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_vars_k.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_vars_l.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_vars_m.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_vars_n.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_vars_o.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_vars_p.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_vars_q.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_vars_r.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_vars_s.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_vars_t.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_vars_u.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_vars_v.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_vars_w.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_vars_z.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_w.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/functions_z.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_b.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_d.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_defs.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_defs.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_defs_b.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_defs_c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_defs_d.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_defs_e.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_defs_f.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_defs_g.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_defs_h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_defs_i.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_defs_l.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_defs_m.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_defs_n.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_defs_p.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_defs_r.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_defs_s.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_defs_t.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_defs_u.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_defs_w.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_defs_z.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_dup.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_e.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_enum.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_eval.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_f.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_func.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_func.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_func_b.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_func_d.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_func_e.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_func_h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_func_i.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_func_l.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_func_m.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_func_n.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_func_p.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_func_r.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_func_s.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_func_t.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_func_u.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_func_z.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_g.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_i.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_l.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_m.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_n.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_p.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_r.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_s.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_t.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_type.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_u.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_vars.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_w.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/globals_z.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__altcp.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__altcp.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__altcp__api.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__altcp__api.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__altcp__tls.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__altcp__tls.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__api.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__api.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__apps.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__apps.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__autoip.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__autoip.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__bridgeif.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__bridgeif.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__bridgeif__fdb.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__bridgeif__fdb.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__bridgeif__opts.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__bridgeif__opts.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__callbackstyle__api.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__callbackstyle__api.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__compiler__abstraction.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__compiler__abstraction.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__debugging__levels.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__debugging__levels.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__dhcp4.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__dhcp4.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__dhcp6.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__dhcp6.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__dns.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__dns.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__ethernet.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__ethernet.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__httpc.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__httpc.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__httpd.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__httpd.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__httpd__opts.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__httpd__opts.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__iana.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__iana.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__ieee.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__ieee.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__if__api.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__if__api.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__igmp.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__igmp.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__infrastructure.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__infrastructure.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__infrastructure__errors.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__infrastructure__errors.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__ip.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__ip.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__ip4.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__ip4.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__ip4addr.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__ip4addr.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__ip6.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__ip6.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__ip6__zones.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__ip6__zones.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__ip6addr.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__ip6addr.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__ipaddr.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__ipaddr.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__iperf.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__iperf.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__assertions.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__assertions.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__nosys.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__nosys.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__arp.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__arp.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__autoip.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__autoip.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__callback.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__callback.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__checksum.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__checksum.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__debug.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__debug.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__debugmsg.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__debugmsg.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__dhcp.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__dhcp.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__dhcpv6.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__dhcpv6.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__dns.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__dns.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__hooks.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__hooks.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__icmp.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__icmp.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__icmp6.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__icmp6.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__igmp.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__igmp.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__infrastructure.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__infrastructure.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__ipv4.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__ipv4.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__ipv6.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__ipv6.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__lock.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__lock.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__loop.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__loop.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__mem.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__mem.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__memcpy.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__memcpy.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__memp.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__memp.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__mib2.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__mib2.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__mld6.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__mld6.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__multicast.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__multicast.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__nd6.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__nd6.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__netconn.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__netconn.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__netif.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__netif.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__nosys.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__nosys.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__pbuf.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__pbuf.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__perf.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__perf.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__raw.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__raw.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__socket.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__socket.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__stats.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__stats.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__tcp.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__tcp.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__thread.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__thread.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__threadsafe__apis.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__threadsafe__apis.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__timers.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__timers.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__udp.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__opts__udp.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__os.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__os.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__version.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__lwip__version.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__mdns.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__mdns.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__mdns__opts.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__mdns__opts.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__mempool.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__mempool.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__mld6.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__mld6.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__mqtt.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__mqtt.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__mqtt__opts.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__mqtt__opts.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netbiosns.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netbiosns.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netbiosns__opts.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netbiosns__opts.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netbuf.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netbuf.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netconn.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netconn.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netconn__common.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netconn__common.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netconn__tcp.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netconn__tcp.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netconn__udp.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netconn__udp.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netdbapi.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netdbapi.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netif.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netif.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netif__cd.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netif__cd.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netif__flags.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netif__flags.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netif__ip4.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netif__ip4.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netif__ip6.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netif__ip6.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netif__mib2.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netif__mib2.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netifapi.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netifapi.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netifapi__autoip.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netifapi__autoip.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netifapi__dhcp4.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netifapi__dhcp4.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netifapi__netif.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netifapi__netif.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netifs.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__netifs.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__pbuf.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__pbuf.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__perf.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__ppp.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__raw__raw.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__raw__raw.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__rfc7668if.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__rfc7668if.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__sequential__api.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__sequential__api.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__sixlowpan.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__sixlowpan.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__slipif.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__slipif.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__smtp.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__smtp.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__smtp__opts.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__smtp__opts.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__snmp.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__snmp.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__snmp__core.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__snmp__core.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__snmp__mib2.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__snmp__mib2.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__snmp__opts.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__snmp__opts.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__snmp__traps.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__snmp__traps.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__sntp.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__sntp.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__sntp__opts.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__sntp__opts.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__socket.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__socket.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__sys__layer.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__sys__layer.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__sys__mbox.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__sys__mbox.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__sys__misc.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__sys__misc.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__sys__mutex.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__sys__mutex.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__sys__nonstandard.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__sys__nonstandard.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__sys__os.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__sys__os.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__sys__prot.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__sys__prot.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__sys__sem.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__sys__sem.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__sys__time.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__sys__time.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__tcp__raw.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__tcp__raw.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__tcp__raw__extargs.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__tcp__raw__extargs.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__tftp.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__tftp.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__tftp__opts.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__tftp__opts.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__udp__raw.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__udp__raw.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__zepif.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/group__zepif.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/http__client_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/http__client_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/http__client_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/http__client_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/httpd_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/httpd_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/httpd_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/httpd_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/httpd__opts_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/httpd__opts_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/iana_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/iana_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/icmp6_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/icmp6_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/icmp6_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/icmp6_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/icmp_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/icmp_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/icmp_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/icmp_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ieee802154_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ieee802154_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ieee_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ieee_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/if_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/if__api_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/if__api_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/if__api_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/if__api_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/igmp_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/igmp_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/igmp_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/igmp_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/index.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/inet6_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/inet6_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/inet__chksum_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/inet__chksum_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/inet__chksum_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/inet__chksum_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/init_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/init_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/init_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/init_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip4_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip4_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip4_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip4_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip4__addr_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip4__addr_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip4__addr_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip4__addr_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip4__frag_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip4__frag_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip4__frag_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip4__frag_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip6_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip6_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip6_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip6_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip6__addr_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip6__addr_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip6__addr_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip6__addr_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip6__frag_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip6__frag_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip6__frag_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip6__frag_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip6__zone_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip6__zone_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip__addr_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/ip__addr_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/jquery.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lowpan6_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lowpan6_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lowpan6_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lowpan6_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lowpan6__ble_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lowpan6__ble_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lowpan6__ble_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lowpan6__ble_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lowpan6__common_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lowpan6__common_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lowpan6__common_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lowpan6__opts_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lowpan6__opts_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lwip_2errno_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lwip_2etharp_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lwip_2etharp_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lwip_2inet_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lwip_2inet_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lwip_2netdb_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lwip_2netdb_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lwip_2prot_2etharp_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lwip_2prot_2etharp_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lwip_2prot_2ethernet_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lwip_2prot_2ethernet_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lwiperf_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lwiperf_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lwiperf_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/lwiperf_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/mdns_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/mdns_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/mdns_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/mdns_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/mdns__opts_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/mdns__opts_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/mdns__priv_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/mdns__priv_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/mem_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/mem_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/mem_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/mem_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/mem__priv_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/memp_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/memp_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/memp_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/memp_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/memp__priv_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/memp__priv_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/memp__std_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/menu.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/menudata.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/mld6_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/mld6_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/mld6_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/mld6_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/modules.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/modules.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/mqtt_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/mqtt_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/mqtt_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/mqtt_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/mqtt__opts_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/mqtt__opts_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/mqtt__priv_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/multithreading.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/navtree.css create mode 100644 Libraries/LwIP/doc/doxygen/output/html/navtree.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/navtreedata.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/navtreeindex0.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/navtreeindex1.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/navtreeindex10.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/navtreeindex11.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/navtreeindex12.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/navtreeindex13.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/navtreeindex14.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/navtreeindex15.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/navtreeindex16.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/navtreeindex17.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/navtreeindex2.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/navtreeindex3.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/navtreeindex4.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/navtreeindex5.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/navtreeindex6.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/navtreeindex7.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/navtreeindex8.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/navtreeindex9.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/nd6_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/nd6_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/nd6_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/nd6_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/nd6__priv_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/nd6__priv_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/netbiosns_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/netbiosns_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/netbiosns_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/netbiosns_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/netbiosns__opts_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/netbiosns__opts_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/netbuf_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/netbuf_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/netbuf_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/netbuf_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/netdb_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/netdb_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/netif_2ethernet_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/netif_2ethernet_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/netif_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/netif_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/netif_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/netif_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/netifapi_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/netifapi_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/netifapi_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/netifapi_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/opt_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/opt_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/optimization.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/pages.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/pbuf_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/pbuf_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/pbuf_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/pbuf_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/pitfalls.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/pppapi_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/pppol2tp_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/pppol2tp_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/pppos_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/pppos_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/prot_2autoip_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/prot_2dhcp6_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/prot_2dhcp6_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/prot_2dhcp_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/prot_2dhcp_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/prot_2dns_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/prot_2dns_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/prot_2icmp6_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/prot_2icmp6_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/prot_2icmp_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/prot_2icmp_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/prot_2igmp_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/prot_2igmp_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/prot_2ip4_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/prot_2ip4_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/prot_2ip6_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/prot_2ip6_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/prot_2ip_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/prot_2ip_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/prot_2mld6_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/prot_2mld6_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/prot_2nd6_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/prot_2nd6_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/prot_2tcp_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/prot_2udp_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/raw_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/raw_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/raw_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/raw_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/raw__priv_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/raw__priv_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/resize.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_0.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_0.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_1.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_1.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_10.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_10.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_11.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_11.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_12.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_12.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_13.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_13.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_14.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_14.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_15.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_15.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_16.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_16.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_17.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_17.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_18.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_18.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_19.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_19.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_2.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_2.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_3.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_3.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_4.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_4.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_5.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_5.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_6.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_6.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_7.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_7.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_8.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_8.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_9.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_9.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_a.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_a.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_b.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_b.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_d.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_d.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_e.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_e.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_f.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/all_f.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_0.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_0.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_1.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_1.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_2.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_2.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_3.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_3.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_4.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_4.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_5.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_5.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_6.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_6.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_7.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_7.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_8.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_8.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_9.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_9.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_a.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_a.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_b.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_b.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_d.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_d.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_e.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_e.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_f.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/classes_f.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_0.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_0.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_1.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_1.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_2.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_2.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_3.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_3.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_4.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_4.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_5.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_5.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_6.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_6.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_7.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_7.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_8.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_8.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_9.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_9.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_a.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_a.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_b.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_b.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_d.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/defines_d.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enums_0.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enums_0.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enums_1.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enums_1.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enums_2.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enums_2.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enums_3.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enums_3.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enums_4.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enums_4.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enums_5.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enums_5.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enums_6.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enums_6.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enums_7.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enums_7.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enums_8.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enums_8.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_0.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_0.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_1.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_1.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_2.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_2.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_3.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_3.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_4.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_4.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_5.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_5.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_6.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_6.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_0.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_0.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_1.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_1.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_2.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_2.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_3.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_3.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_4.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_4.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_5.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_5.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_6.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_6.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_7.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_7.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_8.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_8.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_9.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_9.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_a.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_a.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_b.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_b.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_d.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_d.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_e.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_e.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_f.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/files_f.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_0.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_0.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_1.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_1.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_2.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_2.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_3.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_3.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_4.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_4.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_5.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_5.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_6.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_6.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_7.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_7.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_8.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_8.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_9.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_9.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_a.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_a.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_b.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_b.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_d.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_d.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_e.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/functions_e.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_0.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_0.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_1.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_1.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_10.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_10.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_11.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_11.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_12.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_12.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_2.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_2.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_3.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_3.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_4.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_4.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_5.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_5.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_6.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_6.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_7.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_7.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_8.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_8.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_9.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_9.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_a.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_a.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_b.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_b.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_d.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_d.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_e.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_e.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_f.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/groups_f.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/nomatches.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/pages_0.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/pages_0.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/pages_1.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/pages_1.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/pages_2.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/pages_2.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/pages_3.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/pages_3.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/pages_4.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/pages_4.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/pages_5.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/pages_5.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/pages_6.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/pages_6.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/pages_7.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/pages_7.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/pages_8.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/pages_8.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/search.css create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/search.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/searchdata.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_0.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_0.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_1.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_1.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_2.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_2.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_3.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_3.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_4.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_4.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_5.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_5.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_6.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_6.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_7.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_7.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_8.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_8.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_9.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_9.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_a.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_a.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_b.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_b.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_d.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/typedefs_d.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_0.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_0.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_1.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_1.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_10.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_10.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_11.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_11.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_12.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_12.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_13.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_13.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_14.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_14.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_15.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_15.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_16.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_16.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_17.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_17.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_18.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_18.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_2.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_2.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_3.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_3.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_4.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_4.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_5.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_5.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_6.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_6.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_7.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_7.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_8.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_8.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_9.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_9.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_a.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_a.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_b.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_b.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_d.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_d.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_e.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_e.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_f.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/search/variables_f.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/slipif_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/slipif_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/slipif_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/slipif_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/smtp_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/smtp_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__asn1_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__asn1_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__asn1_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__asn1_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__core_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__core_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__core_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__core_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__mib2_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__mib2_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__mib2_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__icmp_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__interfaces_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__ip_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__snmp_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__system_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__system_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__tcp_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__udp_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__msg_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__msg_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__msg_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__msg_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__netconn_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__netconn_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__opts_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__opts_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__pbuf__stream_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__pbuf__stream_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__raw_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__raw_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__scalar_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__scalar_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__scalar_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__table_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__table_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__table_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__threadsync_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__threadsync_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__threadsync_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__threadsync_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__traps_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmp__traps_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmpv3_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmpv3_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmpv3__mbedtls_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/snmpv3__priv_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/sntp_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/sntp_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/sntp_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/sntp_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/sntp__opts_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/sntp__opts_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/socket_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/sockets_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/sockets_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/sockets_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/sockets_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/sockets__priv_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/sockets__priv_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/stats_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/stats_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/stats_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/stats_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/struct__lwiperf__settings.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/struct__lwiperf__state__tcp.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structaltcp__allocator__s.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structaltcp__allocator__s.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structapi__msg.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structapi__msg.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structautoip.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structautoip.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structbridgeif__initdata__s.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structbridgeif__initdata__s.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structdhcp6__msg.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structdhcp__msg.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structdns__answer.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structdns__api__msg.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structdns__api__msg.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structdns__hdr.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structdns__query.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structdns__req__entry.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structdns__table__entry.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structeth__addr.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structeth__hdr.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structeth__vlan__hdr.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structetharp__hdr.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structetharp__q__entry.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structgethostbyname__r__helper.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structicmp6__echo__hdr.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structicmp6__hdr.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structicmp__echo__hdr.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structieee__802154__hdr.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structieee__802154__hdr.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structigmp__group.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structigmp__group.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structigmp__msg.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structip4__addr.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structip4__addr__packed.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structip4__addr__wordaligned.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structip6__addr.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structip6__addr__packed.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structip6__hdr.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structip6__hdr.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structip6__reass__helper.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structip6__reassdata.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structip__addr.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structip__addr.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structip__globals.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structip__globals.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structip__reass__helper.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structip__reassdata.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structlowpan6__ieee802154__data.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structlowpan6__ieee802154__data.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structlowpan6__link__addr.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structlowpan6__reass__helper.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structlwip__cyclic__timer.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structlwip__select__cb.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structlwip__select__cb.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structlwip__sock.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structlwip__sock.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structmdns__host.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structmdns__host.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structmdns__outpacket.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structmdns__outpacket.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structmdns__packet.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structmdns__packet.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structmdns__rr__info.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structmdns__service.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structmdns__service.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structmem.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structmem.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structmemp__desc.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structmemp__desc.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structmld__group.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structmld__group.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structmld__header.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structmqtt__client__s.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structmqtt__client__s.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structmqtt__connect__client__info__t.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structmqtt__connect__client__info__t.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structmqtt__request__t.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structmqtt__request__t.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structmqtt__ringbuf__t.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structna__header.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structnd6__neighbor__cache__entry.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structnd6__neighbor__cache__entry.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structnd6__q__entry.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structnetbios__answer.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structnetbios__answer.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structnetbios__hdr.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structnetbios__name__hdr.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structnetbios__question__hdr.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structnetbios__resp.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structnetbuf.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structnetconn.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structnetconn.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structnetif.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structnetif.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1ipv4__changed__s.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1ipv4__changed__s.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1ipv6__addr__state__changed__s.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1ipv6__addr__state__changed__s.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1ipv6__set__s.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1ipv6__set__s.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1link__changed__s.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1link__changed__s.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1status__changed__s.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1status__changed__s.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structnetvector.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structnetvector.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structns__header.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structpbuf.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structpbuf.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structpbuf__custom.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structpbuf__custom.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structpbuf__custom__ref.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structpbuf__custom__ref.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structpbuf__rom.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structpbuf__rom.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structraw__pcb.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structraw__pcb.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structredirect__header.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structrs__header.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsmtp__send__request.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsmtp__send__request.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsmtp__session.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsmtp__session.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsnmp__leaf__node.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsnmp__leaf__node.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsnmp__mib.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsnmp__next__oid__state.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsnmp__node.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsnmp__node.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsnmp__node__instance.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsnmp__node__instance.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsnmp__obj__id.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsnmp__oid__range.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsnmp__scalar__array__node.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsnmp__scalar__array__node.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsnmp__scalar__array__node__def.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsnmp__scalar__node.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsnmp__scalar__node.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsnmp__table__col__def.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsnmp__table__node.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsnmp__table__node.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsnmp__table__simple__node.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsnmp__threadsync__instance.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsnmp__threadsync__node.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsnmp__tree__node.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsnmp__tree__node.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsnmp__varbind.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsnmp__varbind.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsnmp__varbind__len.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsntp__msg.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsntp__server.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsntp__server.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsntp__time.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structsntp__timestamps.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structstats__.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structstats__.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structstats__igmp.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structstats__mem.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structstats__mib2.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structstats__mib2__netif__ctrs.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structstats__mib2__netif__ctrs.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structstats__proto.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structstats__sys.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structstats__syselem.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structt_c_g_i.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structtcp__ext__arg__callbacks.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structtcp__ext__arg__callbacks.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structtcp__pcb.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structtcp__pcb.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structtcp__pcb__listen.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structtcp__pcb__listen.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structtftp__context.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structtftp__context.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structthreadsync__data.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structudp__pcb.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structudp__pcb.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structzepif__init.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/structzepif__init.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/sys_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/sys_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/sys_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/sys_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/sys_init.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/tabs.css create mode 100644 Libraries/LwIP/doc/doxygen/output/html/tcp_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/tcp_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/tcp_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/tcp_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/tcp__in_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/tcp__in_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/tcp__out_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/tcp__out_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/tcp__priv_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/tcp__priv_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/tcpbase_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/tcpip_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/tcpip_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/tcpip_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/tcpip_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/tcpip__priv_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/tcpip__priv_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/tftp__opts_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/tftp__opts_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/tftp__server_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/tftp__server_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/tftp__server_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/tftp__server_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/timeouts_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/timeouts_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/timeouts_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/timeouts_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/udp_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/udp_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/udp_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/udp_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/unionnetif__ext__callback__args__t.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/unionnetif__ext__callback__args__t.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/unionsnmp__variant__value.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/unionsockaddr__aligned.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/upgrading.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/zepif_8c.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/zepif_8c.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/zepif_8h.html create mode 100644 Libraries/LwIP/doc/doxygen/output/html/zepif_8h.js create mode 100644 Libraries/LwIP/doc/doxygen/output/html/zerocopyrx.html create mode 100644 Libraries/LwIP/src/Filelists.cmake create mode 100644 Libraries/LwIP/src/api/if_api.c create mode 100644 Libraries/LwIP/src/apps/altcp_tls/altcp_tls_mbedtls.c create mode 100644 Libraries/LwIP/src/apps/altcp_tls/altcp_tls_mbedtls_mem.c create mode 100644 Libraries/LwIP/src/apps/altcp_tls/altcp_tls_mbedtls_mem.h create mode 100644 Libraries/LwIP/src/apps/altcp_tls/altcp_tls_mbedtls_structs.h create mode 100644 Libraries/LwIP/src/apps/http/altcp_proxyconnect.c create mode 100644 Libraries/LwIP/src/apps/http/fs.c create mode 100644 Libraries/LwIP/src/apps/http/fs/404.html create mode 100644 Libraries/LwIP/src/apps/http/fs/img/sics.gif create mode 100644 Libraries/LwIP/src/apps/http/fs/index.html create mode 100644 Libraries/LwIP/src/apps/http/fs_new.c create mode 100644 Libraries/LwIP/src/apps/http/fsdata.c create mode 100644 Libraries/LwIP/src/apps/http/fsdata.h create mode 100644 Libraries/LwIP/src/apps/http/fsdata_new.c create mode 100644 Libraries/LwIP/src/apps/http/fsdata_new.h create mode 100644 Libraries/LwIP/src/apps/http/http_client.c create mode 100644 Libraries/LwIP/src/apps/http/httpd.c create mode 100644 Libraries/LwIP/src/apps/http/httpd_structs.h create mode 100644 Libraries/LwIP/src/apps/http/makefsdata/makefsdata create mode 100644 Libraries/LwIP/src/apps/http/makefsdata/makefsdata.c create mode 100644 Libraries/LwIP/src/apps/http/makefsdata/readme.txt create mode 100644 Libraries/LwIP/src/apps/http/makefsdata/tinydir.h create mode 100644 Libraries/LwIP/src/apps/smtp/smtp.c create mode 100644 Libraries/LwIP/src/apps/snmp/snmp_snmpv2_framework.c create mode 100644 Libraries/LwIP/src/apps/snmp/snmp_snmpv2_usm.c create mode 100644 Libraries/LwIP/src/core/altcp.c create mode 100644 Libraries/LwIP/src/core/altcp_alloc.c create mode 100644 Libraries/LwIP/src/core/altcp_tcp.c create mode 100644 Libraries/LwIP/src/include/compat/posix/arpa/inet.h create mode 100644 Libraries/LwIP/src/include/compat/posix/net/if.h create mode 100644 Libraries/LwIP/src/include/compat/posix/netdb.h create mode 100644 Libraries/LwIP/src/include/compat/posix/sys/socket.h create mode 100644 Libraries/LwIP/src/include/compat/stdc/errno.h create mode 100644 Libraries/LwIP/src/include/lwip/altcp.h create mode 100644 Libraries/LwIP/src/include/lwip/altcp_tcp.h create mode 100644 Libraries/LwIP/src/include/lwip/altcp_tls.h create mode 100644 Libraries/LwIP/src/include/lwip/apps/altcp_proxyconnect.h create mode 100644 Libraries/LwIP/src/include/lwip/apps/altcp_tls_mbedtls_opts.h create mode 100644 Libraries/LwIP/src/include/lwip/apps/http_client.h create mode 100644 Libraries/LwIP/src/include/lwip/apps/mqtt_priv.h create mode 100644 Libraries/LwIP/src/include/lwip/apps/smtp.h create mode 100644 Libraries/LwIP/src/include/lwip/apps/smtp_opts.h create mode 100644 Libraries/LwIP/src/include/lwip/apps/snmp_snmpv2_framework.h create mode 100644 Libraries/LwIP/src/include/lwip/apps/snmp_snmpv2_usm.h create mode 100644 Libraries/LwIP/src/include/lwip/if_api.h create mode 100644 Libraries/LwIP/src/include/lwip/init.h.cmake.in create mode 100644 Libraries/LwIP/src/include/lwip/ip6_zone.h create mode 100644 Libraries/LwIP/src/include/lwip/priv/altcp_priv.h create mode 100644 Libraries/LwIP/src/include/lwip/priv/mem_priv.h create mode 100644 Libraries/LwIP/src/include/lwip/priv/raw_priv.h create mode 100644 Libraries/LwIP/src/include/lwip/priv/sockets_priv.h create mode 100644 Libraries/LwIP/src/include/lwip/prot/dhcp6.h create mode 100644 Libraries/LwIP/src/include/lwip/prot/iana.h create mode 100644 Libraries/LwIP/src/include/lwip/prot/ieee.h create mode 100644 Libraries/LwIP/src/include/lwip/tcpbase.h create mode 100644 Libraries/LwIP/src/include/netif/bridgeif.h create mode 100644 Libraries/LwIP/src/include/netif/bridgeif_opts.h create mode 100644 Libraries/LwIP/src/include/netif/ieee802154.h create mode 100644 Libraries/LwIP/src/include/netif/lowpan6_ble.h create mode 100644 Libraries/LwIP/src/include/netif/lowpan6_common.h create mode 100644 Libraries/LwIP/src/include/netif/zepif.h create mode 100644 Libraries/LwIP/src/netif/bridgeif.c create mode 100644 Libraries/LwIP/src/netif/bridgeif_fdb.c create mode 100644 Libraries/LwIP/src/netif/lowpan6_ble.c create mode 100644 Libraries/LwIP/src/netif/lowpan6_common.c create mode 100644 Libraries/LwIP/src/netif/zepif.c create mode 100644 Libraries/LwIP/test/sockets/sockets_stresstest.c create mode 100644 Libraries/LwIP/test/sockets/sockets_stresstest.h create mode 100644 Libraries/LwIP/test/unit/Filelists.cmake create mode 100644 Libraries/LwIP/test/unit/Filelists.mk create mode 100644 Libraries/LwIP/test/unit/api/test_sockets.c create mode 100644 Libraries/LwIP/test/unit/api/test_sockets.h create mode 100644 Libraries/LwIP/test/unit/arch/sys_arch.c create mode 100644 Libraries/LwIP/test/unit/arch/sys_arch.h create mode 100644 Libraries/LwIP/test/unit/core/test_def.c create mode 100644 Libraries/LwIP/test/unit/core/test_def.h create mode 100644 Libraries/LwIP/test/unit/core/test_netif.c create mode 100644 Libraries/LwIP/test/unit/core/test_netif.h create mode 100644 Libraries/LwIP/test/unit/core/test_timers.c create mode 100644 Libraries/LwIP/test/unit/core/test_timers.h create mode 100644 Libraries/LwIP/test/unit/ip6/test_ip6.c create mode 100644 Libraries/LwIP/test/unit/ip6/test_ip6.h create mode 100644 Libraries/LwIP/test/unit/mqtt/test_mqtt.c create mode 100644 Libraries/LwIP/test/unit/mqtt/test_mqtt.h create mode 100644 Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_cordic.h create mode 100644 Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_fmac.h create mode 100644 Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_cordic.h create mode 100644 Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_fmac.h create mode 100644 Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cordic.c create mode 100644 Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_fmac.c create mode 100644 Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_cordic.c create mode 100644 Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_fmac.c create mode 100644 Project/H7-BOOT.bin rename Project/{h7_tool_app(V1.43).bin => h7_tool_app(V1.44).bin} (74%) create mode 100644 User/app/src/status_esp32.c create mode 100644 User/app/src/status_file_mange.c create mode 100644 User/app/src/status_hard_info.c create mode 100644 User/app/src/status_usb_emmc.c create mode 100644 User/bsp/nvic_prio_cfg.h create mode 100644 User/lwip_http - bak/Fs/404.html create mode 100644 User/lwip_http - bak/Fs/STM32H7xxADC.shtml create mode 100644 User/lwip_http - bak/Fs/STM32H7xxLED.html create mode 100644 User/lwip_http - bak/Fs/STM32H7xx_files/ST.gif create mode 100644 User/lwip_http - bak/Fs/STM32H7xx_files/logo.jpg create mode 100644 User/lwip_http - bak/Fs/STM32H7xx_files/stm32.jpg create mode 100644 User/lwip_http - bak/Fs/index.html create mode 100644 User/lwip_http - bak/altcp_proxyconnect.c create mode 100644 User/lwip_http - bak/fs.c create mode 100644 User/lwip_http - bak/fs_new.c create mode 100644 User/lwip_http - bak/fsdata.c create mode 100644 User/lwip_http - bak/fsdata.h create mode 100644 User/lwip_http - bak/fsdata_custom.c create mode 100644 User/lwip_http - bak/fsdata_new.c create mode 100644 User/lwip_http - bak/fsdata_new.h create mode 100644 User/lwip_http - bak/http_cgi_ssi.h create mode 100644 User/lwip_http - bak/http_client.c create mode 100644 User/lwip_http - bak/httpd.c create mode 100644 User/lwip_http - bak/httpd_cgi_ssi.c create mode 100644 User/lwip_http - bak/httpd_structs.h create mode 100644 User/lwip_http - bak/lcd_log_conf.h create mode 100644 User/lwip_http/altcp_proxyconnect.c create mode 100644 User/lwip_http/fs.c create mode 100644 User/lwip_http/fs_new.c create mode 100644 User/lwip_http/fsdata.c create mode 100644 User/lwip_http/fsdata.h create mode 100644 User/lwip_http/fsdata_new.c create mode 100644 User/lwip_http/fsdata_new.h create mode 100644 User/lwip_http/http_client.c create mode 100644 User/lwip_http/httpd.c create mode 100644 User/lwip_http/httpd_structs.h create mode 100644 User/lwip_if/lwip_http/Fs/404.html create mode 100644 User/lwip_if/lwip_http/Fs/STM32H7xxADC.shtml create mode 100644 User/lwip_if/lwip_http/Fs/STM32H7xxLED.html create mode 100644 User/lwip_if/lwip_http/Fs/STM32H7xx_files/ST.gif create mode 100644 User/lwip_if/lwip_http/Fs/STM32H7xx_files/logo.jpg create mode 100644 User/lwip_if/lwip_http/Fs/STM32H7xx_files/stm32.jpg create mode 100644 User/lwip_if/lwip_http/Fs/index.html create mode 100644 User/lwip_if/lwip_http/altcp_proxyconnect.c create mode 100644 User/lwip_if/lwip_http/fs.c create mode 100644 User/lwip_if/lwip_http/fs_new.c create mode 100644 User/lwip_if/lwip_http/fsdata.c create mode 100644 User/lwip_if/lwip_http/fsdata.h create mode 100644 User/lwip_if/lwip_http/fsdata_custom.c create mode 100644 User/lwip_if/lwip_http/fsdata_new.c create mode 100644 User/lwip_if/lwip_http/fsdata_new.h create mode 100644 User/lwip_if/lwip_http/http_cgi_ssi.h create mode 100644 User/lwip_if/lwip_http/http_client.c create mode 100644 User/lwip_if/lwip_http/httpd.c create mode 100644 User/lwip_if/lwip_http/httpd_cgi_ssi.c create mode 100644 User/lwip_if/lwip_http/httpd_structs.h create mode 100644 User/lwip_if/lwip_http/lcd_log_conf.h diff --git a/CHANGELOG b/CHANGELOG index df89c7f..167e76e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,17 @@ +---------------------------------------------------------------------------- +2020-12-24 V1.44 对应PC软件版本 V1.4.1 +1. 传送脱机烧录的文件增加MD5完整性校验,并解决文件写入不全的BUG +2. USB虚拟串口功能单独做到扩展功能菜单中,其他状态均为PC USB通信模式 +3. 取消上电启动lua时蜂鸣一声. +4. 上位机可以无需下载lua文件,直接执行临时窗口的lua程序 +5. SPI-Flash烧录部分代码,解决几个缓冲区size偏小的bug +6. Modbus解码异常时禁止发送应答:MODS_SendAckErr(ERR_PACKAGE); +7. 新增文件:nvic_prio_cfg.h 全局统一配置每个中断的优先级 +8. 升级STM32H7的HAL库 +9. LwIP由2.0.3 升级到2.1.2 +10.USB上电延迟2秒后再初始化,解决win7下USB使用异常 +11.00界面增加USB,以太网联机状态指示。g_tVar.LinkState 变量表示联机状态 + ---------------------------------------------------------------------------- 2020-12-17 V1.43 对应PC软件版本 V1.4.0 1.脱机烧录增加苏州国芯的2个M4芯片. diff --git a/Doc/待解决问题.txt b/Doc/待解决问题.txt index 64fadec..792b29f 100644 --- a/Doc/待解决问题.txt +++ b/Doc/待解决问题.txt @@ -36,33 +36,65 @@ RS232_TX - RS232串口机台信号扩展 START BUSY OK NG RS232_RX - RS232串口机台信号扩展 - ---中断优先级--- +****************************** +中断优先级--- +****************************** HAL_NVIC_SetPriority(USART1_IRQn, 0, 1); HAL_NVIC_SetPriority(UART4_IRQn, 0, 4); HAL_NVIC_SetPriority(UART8_IRQn, 0, 6); -HAL_NVIC_SetPriority(TIM_HARD_IRQn, 0, 2); + HAL_NVIC_SetPriority(TIM_HARD_IRQn, 0, 2); -tft HAL_NVIC_SetPriority(DMA2_Stream3_IRQn, 1, 1); -tft HAL_NVIC_SetPriority(SPI5_IRQn, 1, 0); + tft HAL_NVIC_SetPriority(DMA2_Stream3_IRQn, 1, 1); + tft HAL_NVIC_SetPriority(SPI5_IRQn, 1, 0); -/* 使能QSPI中断 */ -HAL_NVIC_SetPriority(QUADSPI_IRQn, 0x0F, 0); /* 0x0F --> 0x04, 要高于USB中断 */ + /* 使能QSPI中断 */ + HAL_NVIC_SetPriority(QUADSPI_IRQn, 0x0F, 0); /* 0x0F --> 0x04, 要高于USB中断 */ -/* 使能MDMA中断,并配置优先级 */ -QSPI HAL_NVIC_SetPriority(MDMA_IRQn, 0x02, 0); + /* 使能MDMA中断,并配置优先级 */ + QSPI HAL_NVIC_SetPriority(MDMA_IRQn, 0x02, 0); -HAL_NVIC_SetPriority(OTG_HS_IRQn, 0, 0); -HAL_NVIC_SetPriority(SDMMC1_IRQn, 0, 0); - - HAL_NVIC_SetPriority(ADC_IRQn, 0, 0); + HAL_NVIC_SetPriority(OTG_HS_IRQn, 0, 0); --> HAL_NVIC_SetPriority(OTG_HS_IRQn, 1, 0); + HAL_NVIC_SetPriority(SDMMC1_IRQn, 0, 0); + + HAL_NVIC_SetPriority(ADC_IRQn, 0, 0); HAL_NVIC_SetPriority(ADC3_IRQn, 0, 0); - HAL_NVIC_SetPriority(CH1_DMA_Stream_IRQn, 1, 0); - HAL_NVIC_SetPriority(CH2_DMA_Stream_IRQn, 1, 0); - + HAL_NVIC_SetPriority(CH1_DMA_Stream_IRQn, 1, 0); + HAL_NVIC_SetPriority(CH2_DMA_Stream_IRQn, 1, 0); + + 【通信协议】 功能码 0x61 : H7-TOOL主动发送,比如print信息. 不要求主机应答 + + + /* + 主机发送: 小程序数据 + 01 ; 站号 + 64 ; 功能码 + 0000 ; 子功能, + - 0表示下载lua后复位lua环境再执行, + - 1表示下载lua后,不复位lua环境直接执行 + - 2表示 list目录下的文件 + - 3表示读取文件MD5码 + - 4表示删除文件 del + - 5表示删除目录和文件 + - 6表示读文件数据 + - 7表示覆盖文件(写新文件) + 0100 0000 ; 总长度 4字节 + 0000 0000 : 偏移地址 4字节 + 0020 0000 : 本包数据长度 4字节 + xx ... xx : 程序数据,n个 + CCCC : CRC16 + + 从机应答: + 01 ; 从机地址 + 64 ; 功能码 + 0000 ; 子功能 + + 00 ; 执行结果,0表示OK 1表示错误 + CCCC : CRC16 + */ \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Include/stm32h723xx.h b/Libraries/CMSIS/Device/ST/STM32H7xx/Include/stm32h723xx.h new file mode 100644 index 0000000..4e5a3e0 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Include/stm32h723xx.h @@ -0,0 +1,24126 @@ +/** + ****************************************************************************** + * @file stm32h723xx.h + * @author MCD Application Team + * @brief CMSIS STM32H723xx Device Peripheral Access Layer Header File. + * + * This file contains: + * - Data structures and the address mapping for all peripherals + * - Peripheral's registers declarations and bits definition + * - Macros to access peripheral's registers hardware + * + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2019 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/** @addtogroup CMSIS_Device + * @{ + */ + +/** @addtogroup stm32h723xx + * @{ + */ + +#ifndef STM32H723xx_H +#define STM32H723xx_H + +#ifdef __cplusplus + extern "C" { +#endif /* __cplusplus */ + +/** @addtogroup Peripheral_interrupt_number_definition + * @{ + */ + +/** + * @brief STM32H7XX Interrupt Number Definition, according to the selected device + * in @ref Library_configuration_section + */ +typedef enum +{ +/****** Cortex-M Processor Exceptions Numbers *****************************************************************/ + NonMaskableInt_IRQn = -14, /*!< 2 Non Maskable Interrupt */ + HardFault_IRQn = -13, /*!< 4 Cortex-M Memory Management Interrupt */ + MemoryManagement_IRQn = -12, /*!< 4 Cortex-M Memory Management Interrupt */ + BusFault_IRQn = -11, /*!< 5 Cortex-M Bus Fault Interrupt */ + UsageFault_IRQn = -10, /*!< 6 Cortex-M Usage Fault Interrupt */ + SVCall_IRQn = -5, /*!< 11 Cortex-M SV Call Interrupt */ + DebugMonitor_IRQn = -4, /*!< 12 Cortex-M Debug Monitor Interrupt */ + PendSV_IRQn = -2, /*!< 14 Cortex-M Pend SV Interrupt */ + SysTick_IRQn = -1, /*!< 15 Cortex-M System Tick Interrupt */ +/****** STM32 specific Interrupt Numbers **********************************************************************/ + WWDG_IRQn = 0, /*!< Window WatchDog Interrupt ( wwdg1_it, wwdg2_it) */ + PVD_AVD_IRQn = 1, /*!< PVD/AVD through EXTI Line detection Interrupt */ + TAMP_STAMP_IRQn = 2, /*!< Tamper and TimeStamp interrupts through the EXTI line */ + RTC_WKUP_IRQn = 3, /*!< RTC Wakeup interrupt through the EXTI line */ + FLASH_IRQn = 4, /*!< FLASH global Interrupt */ + RCC_IRQn = 5, /*!< RCC global Interrupt */ + EXTI0_IRQn = 6, /*!< EXTI Line0 Interrupt */ + EXTI1_IRQn = 7, /*!< EXTI Line1 Interrupt */ + EXTI2_IRQn = 8, /*!< EXTI Line2 Interrupt */ + EXTI3_IRQn = 9, /*!< EXTI Line3 Interrupt */ + EXTI4_IRQn = 10, /*!< EXTI Line4 Interrupt */ + DMA1_Stream0_IRQn = 11, /*!< DMA1 Stream 0 global Interrupt */ + DMA1_Stream1_IRQn = 12, /*!< DMA1 Stream 1 global Interrupt */ + DMA1_Stream2_IRQn = 13, /*!< DMA1 Stream 2 global Interrupt */ + DMA1_Stream3_IRQn = 14, /*!< DMA1 Stream 3 global Interrupt */ + DMA1_Stream4_IRQn = 15, /*!< DMA1 Stream 4 global Interrupt */ + DMA1_Stream5_IRQn = 16, /*!< DMA1 Stream 5 global Interrupt */ + DMA1_Stream6_IRQn = 17, /*!< DMA1 Stream 6 global Interrupt */ + ADC_IRQn = 18, /*!< ADC1 and ADC2 global Interrupts */ + FDCAN1_IT0_IRQn = 19, /*!< FDCAN1 Interrupt line 0 */ + FDCAN2_IT0_IRQn = 20, /*!< FDCAN2 Interrupt line 0 */ + FDCAN1_IT1_IRQn = 21, /*!< FDCAN1 Interrupt line 1 */ + FDCAN2_IT1_IRQn = 22, /*!< FDCAN2 Interrupt line 1 */ + EXTI9_5_IRQn = 23, /*!< External Line[9:5] Interrupts */ + TIM1_BRK_IRQn = 24, /*!< TIM1 Break Interrupt */ + TIM1_UP_IRQn = 25, /*!< TIM1 Update Interrupt */ + TIM1_TRG_COM_IRQn = 26, /*!< TIM1 Trigger and Commutation Interrupt */ + TIM1_CC_IRQn = 27, /*!< TIM1 Capture Compare Interrupt */ + TIM2_IRQn = 28, /*!< TIM2 global Interrupt */ + TIM3_IRQn = 29, /*!< TIM3 global Interrupt */ + TIM4_IRQn = 30, /*!< TIM4 global Interrupt */ + I2C1_EV_IRQn = 31, /*!< I2C1 Event Interrupt */ + I2C1_ER_IRQn = 32, /*!< I2C1 Error Interrupt */ + I2C2_EV_IRQn = 33, /*!< I2C2 Event Interrupt */ + I2C2_ER_IRQn = 34, /*!< I2C2 Error Interrupt */ + SPI1_IRQn = 35, /*!< SPI1 global Interrupt */ + SPI2_IRQn = 36, /*!< SPI2 global Interrupt */ + USART1_IRQn = 37, /*!< USART1 global Interrupt */ + USART2_IRQn = 38, /*!< USART2 global Interrupt */ + USART3_IRQn = 39, /*!< USART3 global Interrupt */ + EXTI15_10_IRQn = 40, /*!< External Line[15:10] Interrupts */ + RTC_Alarm_IRQn = 41, /*!< RTC Alarm (A and B) through EXTI Line Interrupt */ + TIM8_BRK_TIM12_IRQn = 43, /*!< TIM8 Break Interrupt and TIM12 global interrupt */ + TIM8_UP_TIM13_IRQn = 44, /*!< TIM8 Update Interrupt and TIM13 global interrupt */ + TIM8_TRG_COM_TIM14_IRQn = 45, /*!< TIM8 Trigger and Commutation Interrupt and TIM14 global interrupt */ + TIM8_CC_IRQn = 46, /*!< TIM8 Capture Compare Interrupt */ + DMA1_Stream7_IRQn = 47, /*!< DMA1 Stream7 Interrupt */ + FMC_IRQn = 48, /*!< FMC global Interrupt */ + SDMMC1_IRQn = 49, /*!< SDMMC1 global Interrupt */ + TIM5_IRQn = 50, /*!< TIM5 global Interrupt */ + SPI3_IRQn = 51, /*!< SPI3 global Interrupt */ + UART4_IRQn = 52, /*!< UART4 global Interrupt */ + UART5_IRQn = 53, /*!< UART5 global Interrupt */ + TIM6_DAC_IRQn = 54, /*!< TIM6 global and DAC1&2 underrun error interrupts */ + TIM7_IRQn = 55, /*!< TIM7 global interrupt */ + DMA2_Stream0_IRQn = 56, /*!< DMA2 Stream 0 global Interrupt */ + DMA2_Stream1_IRQn = 57, /*!< DMA2 Stream 1 global Interrupt */ + DMA2_Stream2_IRQn = 58, /*!< DMA2 Stream 2 global Interrupt */ + DMA2_Stream3_IRQn = 59, /*!< DMA2 Stream 3 global Interrupt */ + DMA2_Stream4_IRQn = 60, /*!< DMA2 Stream 4 global Interrupt */ + ETH_IRQn = 61, /*!< Ethernet global Interrupt */ + ETH_WKUP_IRQn = 62, /*!< Ethernet Wakeup through EXTI line Interrupt */ + FDCAN_CAL_IRQn = 63, /*!< FDCAN Calibration unit Interrupt */ + DMA2_Stream5_IRQn = 68, /*!< DMA2 Stream 5 global interrupt */ + DMA2_Stream6_IRQn = 69, /*!< DMA2 Stream 6 global interrupt */ + DMA2_Stream7_IRQn = 70, /*!< DMA2 Stream 7 global interrupt */ + USART6_IRQn = 71, /*!< USART6 global interrupt */ + I2C3_EV_IRQn = 72, /*!< I2C3 event interrupt */ + I2C3_ER_IRQn = 73, /*!< I2C3 error interrupt */ + OTG_HS_EP1_OUT_IRQn = 74, /*!< USB OTG HS End Point 1 Out global interrupt */ + OTG_HS_EP1_IN_IRQn = 75, /*!< USB OTG HS End Point 1 In global interrupt */ + OTG_HS_WKUP_IRQn = 76, /*!< USB OTG HS Wakeup through EXTI interrupt */ + OTG_HS_IRQn = 77, /*!< USB OTG HS global interrupt */ + DCMI_PSSI_IRQn = 78, /*!< DCMI and PSSI global interrupt */ + RNG_IRQn = 80, /*!< RNG global interrupt */ + FPU_IRQn = 81, /*!< FPU global interrupt */ + UART7_IRQn = 82, /*!< UART7 global interrupt */ + UART8_IRQn = 83, /*!< UART8 global interrupt */ + SPI4_IRQn = 84, /*!< SPI4 global Interrupt */ + SPI5_IRQn = 85, /*!< SPI5 global Interrupt */ + SPI6_IRQn = 86, /*!< SPI6 global Interrupt */ + SAI1_IRQn = 87, /*!< SAI1 global Interrupt */ + LTDC_IRQn = 88, /*!< LTDC global Interrupt */ + LTDC_ER_IRQn = 89, /*!< LTDC Error global Interrupt */ + DMA2D_IRQn = 90, /*!< DMA2D global Interrupt */ + OCTOSPI1_IRQn = 92, /*!< OCTOSPI1 global interrupt */ + LPTIM1_IRQn = 93, /*!< LP TIM1 interrupt */ + CEC_IRQn = 94, /*!< HDMI-CEC global Interrupt */ + I2C4_EV_IRQn = 95, /*!< I2C4 Event Interrupt */ + I2C4_ER_IRQn = 96, /*!< I2C4 Error Interrupt */ + SPDIF_RX_IRQn = 97, /*!< SPDIF-RX global Interrupt */ + DMAMUX1_OVR_IRQn = 102, /*! + +/** @addtogroup Peripheral_registers_structures + * @{ + */ + +/** + * @brief Analog to Digital Converter + */ + +typedef struct +{ + __IO uint32_t ISR; /*!< ADC Interrupt and Status Register, Address offset: 0x00 */ + __IO uint32_t IER; /*!< ADC Interrupt Enable Register, Address offset: 0x04 */ + __IO uint32_t CR; /*!< ADC control register, Address offset: 0x08 */ + __IO uint32_t CFGR; /*!< ADC Configuration register, Address offset: 0x0C */ + __IO uint32_t CFGR2; /*!< ADC Configuration register 2, Address offset: 0x10 */ + __IO uint32_t SMPR1; /*!< ADC sample time register 1, Address offset: 0x14 */ + __IO uint32_t SMPR2; /*!< ADC sample time register 2, Address offset: 0x18 */ + __IO uint32_t PCSEL_RES0; /*!< Rserved for ADC3, ADC1/2 pre-channel selection, Address offset: 0x1C */ + __IO uint32_t LTR1_TR1; /*!< ADC watchdog Lower threshold register 1, Address offset: 0x20 */ + __IO uint32_t HTR1_TR2; /*!< ADC watchdog higher threshold register 1, Address offset: 0x24 */ + __IO uint32_t RES1_TR3; /*!< Rserved for ADC1/2, ADC3 threshold register, Address offset: 0x28 */ + uint32_t RESERVED2; /*!< Reserved, 0x02C */ + __IO uint32_t SQR1; /*!< ADC regular sequence register 1, Address offset: 0x30 */ + __IO uint32_t SQR2; /*!< ADC regular sequence register 2, Address offset: 0x34 */ + __IO uint32_t SQR3; /*!< ADC regular sequence register 3, Address offset: 0x38 */ + __IO uint32_t SQR4; /*!< ADC regular sequence register 4, Address offset: 0x3C */ + __IO uint32_t DR; /*!< ADC regular data register, Address offset: 0x40 */ + uint32_t RESERVED3; /*!< Reserved, 0x044 */ + uint32_t RESERVED4; /*!< Reserved, 0x048 */ + __IO uint32_t JSQR; /*!< ADC injected sequence register, Address offset: 0x4C */ + uint32_t RESERVED5[4]; /*!< Reserved, 0x050 - 0x05C */ + __IO uint32_t OFR1; /*!< ADC offset register 1, Address offset: 0x60 */ + __IO uint32_t OFR2; /*!< ADC offset register 2, Address offset: 0x64 */ + __IO uint32_t OFR3; /*!< ADC offset register 3, Address offset: 0x68 */ + __IO uint32_t OFR4; /*!< ADC offset register 4, Address offset: 0x6C */ + uint32_t RESERVED6[4]; /*!< Reserved, 0x070 - 0x07C */ + __IO uint32_t JDR1; /*!< ADC injected data register 1, Address offset: 0x80 */ + __IO uint32_t JDR2; /*!< ADC injected data register 2, Address offset: 0x84 */ + __IO uint32_t JDR3; /*!< ADC injected data register 3, Address offset: 0x88 */ + __IO uint32_t JDR4; /*!< ADC injected data register 4, Address offset: 0x8C */ + uint32_t RESERVED7[4]; /*!< Reserved, 0x090 - 0x09C */ + __IO uint32_t AWD2CR; /*!< ADC Analog Watchdog 2 Configuration Register, Address offset: 0xA0 */ + __IO uint32_t AWD3CR; /*!< ADC Analog Watchdog 3 Configuration Register, Address offset: 0xA4 */ + uint32_t RESERVED8; /*!< Reserved, 0x0A8 */ + uint32_t RESERVED9; /*!< Reserved, 0x0AC */ + __IO uint32_t LTR2_DIFSEL; /*!< ADC watchdog Lower threshold register 2, Difsel for ADC3, Address offset: 0xB0 */ + __IO uint32_t HTR2_CALFACT; /*!< ADC watchdog Higher threshold register 2, Calfact for ADC3, Address offset: 0xB4 */ + __IO uint32_t LTR3_RES10; /*!< ADC watchdog Lower threshold register 3, specific ADC1/2, Address offset: 0xB8 */ + __IO uint32_t HTR3_RES11; /*!< ADC watchdog Higher threshold register 3, specific ADC1/2, Address offset: 0xBC */ + __IO uint32_t DIFSEL_RES12; /*!< ADC Differential Mode Selection Register specific ADC1/2, Address offset: 0xC0 */ + __IO uint32_t CALFACT_RES13; /*!< ADC Calibration Factors specific ADC1/2, Address offset: 0xC4 */ + __IO uint32_t CALFACT2_RES14; /*!< ADC Linearity Calibration Factors specific ADC1/2, Address offset: 0xC8 */ +} ADC_TypeDef; + + +typedef struct +{ +__IO uint32_t CSR; /*!< ADC Common status register, Address offset: ADC1/3 base address + 0x300 */ +uint32_t RESERVED; /*!< Reserved, ADC1/3 base address + 0x304 */ +__IO uint32_t CCR; /*!< ADC common control register, Address offset: ADC1/3 base address + 0x308 */ +__IO uint32_t CDR; /*!< ADC common regular data register for dual Address offset: ADC1/3 base address + 0x30C */ +__IO uint32_t CDR2; /*!< ADC common regular data register for 32-bit dual mode Address offset: ADC1/3 base address + 0x310 */ + +} ADC_Common_TypeDef; + + +/** + * @brief VREFBUF + */ + +typedef struct +{ + __IO uint32_t CSR; /*!< VREFBUF control and status register, Address offset: 0x00 */ + __IO uint32_t CCR; /*!< VREFBUF calibration and control register, Address offset: 0x04 */ +} VREFBUF_TypeDef; + + +/** + * @brief FD Controller Area Network + */ + +typedef struct +{ + __IO uint32_t CREL; /*!< FDCAN Core Release register, Address offset: 0x000 */ + __IO uint32_t ENDN; /*!< FDCAN Endian register, Address offset: 0x004 */ + __IO uint32_t RESERVED1; /*!< Reserved, 0x008 */ + __IO uint32_t DBTP; /*!< FDCAN Data Bit Timing & Prescaler register, Address offset: 0x00C */ + __IO uint32_t TEST; /*!< FDCAN Test register, Address offset: 0x010 */ + __IO uint32_t RWD; /*!< FDCAN RAM Watchdog register, Address offset: 0x014 */ + __IO uint32_t CCCR; /*!< FDCAN CC Control register, Address offset: 0x018 */ + __IO uint32_t NBTP; /*!< FDCAN Nominal Bit Timing & Prescaler register, Address offset: 0x01C */ + __IO uint32_t TSCC; /*!< FDCAN Timestamp Counter Configuration register, Address offset: 0x020 */ + __IO uint32_t TSCV; /*!< FDCAN Timestamp Counter Value register, Address offset: 0x024 */ + __IO uint32_t TOCC; /*!< FDCAN Timeout Counter Configuration register, Address offset: 0x028 */ + __IO uint32_t TOCV; /*!< FDCAN Timeout Counter Value register, Address offset: 0x02C */ + __IO uint32_t RESERVED2[4]; /*!< Reserved, 0x030 - 0x03C */ + __IO uint32_t ECR; /*!< FDCAN Error Counter register, Address offset: 0x040 */ + __IO uint32_t PSR; /*!< FDCAN Protocol Status register, Address offset: 0x044 */ + __IO uint32_t TDCR; /*!< FDCAN Transmitter Delay Compensation register, Address offset: 0x048 */ + __IO uint32_t RESERVED3; /*!< Reserved, 0x04C */ + __IO uint32_t IR; /*!< FDCAN Interrupt register, Address offset: 0x050 */ + __IO uint32_t IE; /*!< FDCAN Interrupt Enable register, Address offset: 0x054 */ + __IO uint32_t ILS; /*!< FDCAN Interrupt Line Select register, Address offset: 0x058 */ + __IO uint32_t ILE; /*!< FDCAN Interrupt Line Enable register, Address offset: 0x05C */ + __IO uint32_t RESERVED4[8]; /*!< Reserved, 0x060 - 0x07C */ + __IO uint32_t GFC; /*!< FDCAN Global Filter Configuration register, Address offset: 0x080 */ + __IO uint32_t SIDFC; /*!< FDCAN Standard ID Filter Configuration register, Address offset: 0x084 */ + __IO uint32_t XIDFC; /*!< FDCAN Extended ID Filter Configuration register, Address offset: 0x088 */ + __IO uint32_t RESERVED5; /*!< Reserved, 0x08C */ + __IO uint32_t XIDAM; /*!< FDCAN Extended ID AND Mask register, Address offset: 0x090 */ + __IO uint32_t HPMS; /*!< FDCAN High Priority Message Status register, Address offset: 0x094 */ + __IO uint32_t NDAT1; /*!< FDCAN New Data 1 register, Address offset: 0x098 */ + __IO uint32_t NDAT2; /*!< FDCAN New Data 2 register, Address offset: 0x09C */ + __IO uint32_t RXF0C; /*!< FDCAN Rx FIFO 0 Configuration register, Address offset: 0x0A0 */ + __IO uint32_t RXF0S; /*!< FDCAN Rx FIFO 0 Status register, Address offset: 0x0A4 */ + __IO uint32_t RXF0A; /*!< FDCAN Rx FIFO 0 Acknowledge register, Address offset: 0x0A8 */ + __IO uint32_t RXBC; /*!< FDCAN Rx Buffer Configuration register, Address offset: 0x0AC */ + __IO uint32_t RXF1C; /*!< FDCAN Rx FIFO 1 Configuration register, Address offset: 0x0B0 */ + __IO uint32_t RXF1S; /*!< FDCAN Rx FIFO 1 Status register, Address offset: 0x0B4 */ + __IO uint32_t RXF1A; /*!< FDCAN Rx FIFO 1 Acknowledge register, Address offset: 0x0B8 */ + __IO uint32_t RXESC; /*!< FDCAN Rx Buffer/FIFO Element Size Configuration register, Address offset: 0x0BC */ + __IO uint32_t TXBC; /*!< FDCAN Tx Buffer Configuration register, Address offset: 0x0C0 */ + __IO uint32_t TXFQS; /*!< FDCAN Tx FIFO/Queue Status register, Address offset: 0x0C4 */ + __IO uint32_t TXESC; /*!< FDCAN Tx Buffer Element Size Configuration register, Address offset: 0x0C8 */ + __IO uint32_t TXBRP; /*!< FDCAN Tx Buffer Request Pending register, Address offset: 0x0CC */ + __IO uint32_t TXBAR; /*!< FDCAN Tx Buffer Add Request register, Address offset: 0x0D0 */ + __IO uint32_t TXBCR; /*!< FDCAN Tx Buffer Cancellation Request register, Address offset: 0x0D4 */ + __IO uint32_t TXBTO; /*!< FDCAN Tx Buffer Transmission Occurred register, Address offset: 0x0D8 */ + __IO uint32_t TXBCF; /*!< FDCAN Tx Buffer Cancellation Finished register, Address offset: 0x0DC */ + __IO uint32_t TXBTIE; /*!< FDCAN Tx Buffer Transmission Interrupt Enable register, Address offset: 0x0E0 */ + __IO uint32_t TXBCIE; /*!< FDCAN Tx Buffer Cancellation Finished Interrupt Enable register, Address offset: 0x0E4 */ + __IO uint32_t RESERVED6[2]; /*!< Reserved, 0x0E8 - 0x0EC */ + __IO uint32_t TXEFC; /*!< FDCAN Tx Event FIFO Configuration register, Address offset: 0x0F0 */ + __IO uint32_t TXEFS; /*!< FDCAN Tx Event FIFO Status register, Address offset: 0x0F4 */ + __IO uint32_t TXEFA; /*!< FDCAN Tx Event FIFO Acknowledge register, Address offset: 0x0F8 */ + __IO uint32_t RESERVED7; /*!< Reserved, 0x0FC */ +} FDCAN_GlobalTypeDef; + +/** + * @brief TTFD Controller Area Network + */ + +typedef struct +{ + __IO uint32_t TTTMC; /*!< TT Trigger Memory Configuration register, Address offset: 0x100 */ + __IO uint32_t TTRMC; /*!< TT Reference Message Configuration register, Address offset: 0x104 */ + __IO uint32_t TTOCF; /*!< TT Operation Configuration register, Address offset: 0x108 */ + __IO uint32_t TTMLM; /*!< TT Matrix Limits register, Address offset: 0x10C */ + __IO uint32_t TURCF; /*!< TUR Configuration register, Address offset: 0x110 */ + __IO uint32_t TTOCN; /*!< TT Operation Control register, Address offset: 0x114 */ + __IO uint32_t TTGTP; /*!< TT Global Time Preset register, Address offset: 0x118 */ + __IO uint32_t TTTMK; /*!< TT Time Mark register, Address offset: 0x11C */ + __IO uint32_t TTIR; /*!< TT Interrupt register, Address offset: 0x120 */ + __IO uint32_t TTIE; /*!< TT Interrupt Enable register, Address offset: 0x124 */ + __IO uint32_t TTILS; /*!< TT Interrupt Line Select register, Address offset: 0x128 */ + __IO uint32_t TTOST; /*!< TT Operation Status register, Address offset: 0x12C */ + __IO uint32_t TURNA; /*!< TT TUR Numerator Actual register, Address offset: 0x130 */ + __IO uint32_t TTLGT; /*!< TT Local and Global Time register, Address offset: 0x134 */ + __IO uint32_t TTCTC; /*!< TT Cycle Time and Count register, Address offset: 0x138 */ + __IO uint32_t TTCPT; /*!< TT Capture Time register, Address offset: 0x13C */ + __IO uint32_t TTCSM; /*!< TT Cycle Sync Mark register, Address offset: 0x140 */ + __IO uint32_t RESERVED1[111]; /*!< Reserved, 0x144 - 0x2FC */ + __IO uint32_t TTTS; /*!< TT Trigger Select register, Address offset: 0x300 */ +} TTCAN_TypeDef; + +/** + * @brief FD Controller Area Network + */ + +typedef struct +{ + __IO uint32_t CREL; /*!< Clock Calibration Unit Core Release register, Address offset: 0x00 */ + __IO uint32_t CCFG; /*!< Calibration Configuration register, Address offset: 0x04 */ + __IO uint32_t CSTAT; /*!< Calibration Status register, Address offset: 0x08 */ + __IO uint32_t CWD; /*!< Calibration Watchdog register, Address offset: 0x0C */ + __IO uint32_t IR; /*!< CCU Interrupt register, Address offset: 0x10 */ + __IO uint32_t IE; /*!< CCU Interrupt Enable register, Address offset: 0x14 */ +} FDCAN_ClockCalibrationUnit_TypeDef; + + +/** + * @brief Consumer Electronics Control + */ + +typedef struct +{ + __IO uint32_t CR; /*!< CEC control register, Address offset:0x00 */ + __IO uint32_t CFGR; /*!< CEC configuration register, Address offset:0x04 */ + __IO uint32_t TXDR; /*!< CEC Tx data register , Address offset:0x08 */ + __IO uint32_t RXDR; /*!< CEC Rx Data Register, Address offset:0x0C */ + __IO uint32_t ISR; /*!< CEC Interrupt and Status Register, Address offset:0x10 */ + __IO uint32_t IER; /*!< CEC interrupt enable register, Address offset:0x14 */ +}CEC_TypeDef; + +/** + * @brief COordincate Rotation DIgital Computer + */ +typedef struct +{ + __IO uint32_t CSR; /*!< CORDIC control and status register, Address offset: 0x00 */ + __IO uint32_t WDATA; /*!< CORDIC argument register, Address offset: 0x04 */ + __IO uint32_t RDATA; /*!< CORDIC result register, Address offset: 0x08 */ +} CORDIC_TypeDef; + +/** + * @brief CRC calculation unit + */ + +typedef struct +{ + __IO uint32_t DR; /*!< CRC Data register, Address offset: 0x00 */ + __IO uint32_t IDR; /*!< CRC Independent data register, Address offset: 0x04 */ + __IO uint32_t CR; /*!< CRC Control register, Address offset: 0x08 */ + uint32_t RESERVED2; /*!< Reserved, 0x0C */ + __IO uint32_t INIT; /*!< Initial CRC value register, Address offset: 0x10 */ + __IO uint32_t POL; /*!< CRC polynomial register, Address offset: 0x14 */ +} CRC_TypeDef; + + +/** + * @brief Clock Recovery System + */ +typedef struct +{ +__IO uint32_t CR; /*!< CRS ccontrol register, Address offset: 0x00 */ +__IO uint32_t CFGR; /*!< CRS configuration register, Address offset: 0x04 */ +__IO uint32_t ISR; /*!< CRS interrupt and status register, Address offset: 0x08 */ +__IO uint32_t ICR; /*!< CRS interrupt flag clear register, Address offset: 0x0C */ +} CRS_TypeDef; + + +/** + * @brief Digital to Analog Converter + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DAC control register, Address offset: 0x00 */ + __IO uint32_t SWTRIGR; /*!< DAC software trigger register, Address offset: 0x04 */ + __IO uint32_t DHR12R1; /*!< DAC channel1 12-bit right-aligned data holding register, Address offset: 0x08 */ + __IO uint32_t DHR12L1; /*!< DAC channel1 12-bit left aligned data holding register, Address offset: 0x0C */ + __IO uint32_t DHR8R1; /*!< DAC channel1 8-bit right aligned data holding register, Address offset: 0x10 */ + __IO uint32_t DHR12R2; /*!< DAC channel2 12-bit right aligned data holding register, Address offset: 0x14 */ + __IO uint32_t DHR12L2; /*!< DAC channel2 12-bit left aligned data holding register, Address offset: 0x18 */ + __IO uint32_t DHR8R2; /*!< DAC channel2 8-bit right-aligned data holding register, Address offset: 0x1C */ + __IO uint32_t DHR12RD; /*!< Dual DAC 12-bit right-aligned data holding register, Address offset: 0x20 */ + __IO uint32_t DHR12LD; /*!< DUAL DAC 12-bit left aligned data holding register, Address offset: 0x24 */ + __IO uint32_t DHR8RD; /*!< DUAL DAC 8-bit right aligned data holding register, Address offset: 0x28 */ + __IO uint32_t DOR1; /*!< DAC channel1 data output register, Address offset: 0x2C */ + __IO uint32_t DOR2; /*!< DAC channel2 data output register, Address offset: 0x30 */ + __IO uint32_t SR; /*!< DAC status register, Address offset: 0x34 */ + __IO uint32_t CCR; /*!< DAC calibration control register, Address offset: 0x38 */ + __IO uint32_t MCR; /*!< DAC mode control register, Address offset: 0x3C */ + __IO uint32_t SHSR1; /*!< DAC Sample and Hold sample time register 1, Address offset: 0x40 */ + __IO uint32_t SHSR2; /*!< DAC Sample and Hold sample time register 2, Address offset: 0x44 */ + __IO uint32_t SHHR; /*!< DAC Sample and Hold hold time register, Address offset: 0x48 */ + __IO uint32_t SHRR; /*!< DAC Sample and Hold refresh time register, Address offset: 0x4C */ +} DAC_TypeDef; + +/** + * @brief DFSDM module registers + */ +typedef struct +{ + __IO uint32_t FLTCR1; /*!< DFSDM control register1, Address offset: 0x100 */ + __IO uint32_t FLTCR2; /*!< DFSDM control register2, Address offset: 0x104 */ + __IO uint32_t FLTISR; /*!< DFSDM interrupt and status register, Address offset: 0x108 */ + __IO uint32_t FLTICR; /*!< DFSDM interrupt flag clear register, Address offset: 0x10C */ + __IO uint32_t FLTJCHGR; /*!< DFSDM injected channel group selection register, Address offset: 0x110 */ + __IO uint32_t FLTFCR; /*!< DFSDM filter control register, Address offset: 0x114 */ + __IO uint32_t FLTJDATAR; /*!< DFSDM data register for injected group, Address offset: 0x118 */ + __IO uint32_t FLTRDATAR; /*!< DFSDM data register for regular group, Address offset: 0x11C */ + __IO uint32_t FLTAWHTR; /*!< DFSDM analog watchdog high threshold register, Address offset: 0x120 */ + __IO uint32_t FLTAWLTR; /*!< DFSDM analog watchdog low threshold register, Address offset: 0x124 */ + __IO uint32_t FLTAWSR; /*!< DFSDM analog watchdog status register Address offset: 0x128 */ + __IO uint32_t FLTAWCFR; /*!< DFSDM analog watchdog clear flag register Address offset: 0x12C */ + __IO uint32_t FLTEXMAX; /*!< DFSDM extreme detector maximum register, Address offset: 0x130 */ + __IO uint32_t FLTEXMIN; /*!< DFSDM extreme detector minimum register Address offset: 0x134 */ + __IO uint32_t FLTCNVTIMR; /*!< DFSDM conversion timer, Address offset: 0x138 */ +} DFSDM_Filter_TypeDef; + +/** + * @brief DFSDM channel configuration registers + */ +typedef struct +{ + __IO uint32_t CHCFGR1; /*!< DFSDM channel configuration register1, Address offset: 0x00 */ + __IO uint32_t CHCFGR2; /*!< DFSDM channel configuration register2, Address offset: 0x04 */ + __IO uint32_t CHAWSCDR; /*!< DFSDM channel analog watchdog and + short circuit detector register, Address offset: 0x08 */ + __IO uint32_t CHWDATAR; /*!< DFSDM channel watchdog filter data register, Address offset: 0x0C */ + __IO uint32_t CHDATINR; /*!< DFSDM channel data input register, Address offset: 0x10 */ +} DFSDM_Channel_TypeDef; + +/** + * @brief Debug MCU + */ +typedef struct +{ + __IO uint32_t IDCODE; /*!< MCU device ID code, Address offset: 0x00 */ + __IO uint32_t CR; /*!< Debug MCU configuration register, Address offset: 0x04 */ + uint32_t RESERVED4[11]; /*!< Reserved, Address offset: 0x08 */ + __IO uint32_t APB3FZ1; /*!< Debug MCU APB3FZ1 freeze register, Address offset: 0x34 */ + uint32_t RESERVED5; /*!< Reserved, Address offset: 0x38 */ + __IO uint32_t APB1LFZ1; /*!< Debug MCU APB1LFZ1 freeze register, Address offset: 0x3C */ + uint32_t RESERVED6; /*!< Reserved, Address offset: 0x40 */ + __IO uint32_t APB1HFZ1; /*!< Debug MCU APB1LFZ1 freeze register, Address offset: 0x44 */ + uint32_t RESERVED7; /*!< Reserved, Address offset: 0x48 */ + __IO uint32_t APB2FZ1; /*!< Debug MCU APB2FZ1 freeze register, Address offset: 0x4C */ + uint32_t RESERVED8; /*!< Reserved, Address offset: 0x50 */ + __IO uint32_t APB4FZ1; /*!< Debug MCU APB4FZ1 freeze register, Address offset: 0x54 */ + __IO uint32_t RESERVED9[990]; /*!< Reserved, Address offset: 0x58-0xFCC */ + __IO uint32_t PIDR4; /*!< Debug MCU peripheral identity register 4, Address offset: 0xFD0 */ + __IO uint32_t RESERVED10[3];/*!< Reserved, Address offset: 0xFD4-0xFDC */ + __IO uint32_t PIDR0; /*!< Debug MCU peripheral identity register 0, Address offset: 0xFE0 */ + __IO uint32_t PIDR1; /*!< Debug MCU peripheral identity register 1, Address offset: 0xFE4 */ + __IO uint32_t PIDR2; /*!< Debug MCU peripheral identity register 2, Address offset: 0xFE8 */ + __IO uint32_t PIDR3; /*!< Debug MCU peripheral identity register 3, Address offset: 0xFEC */ + __IO uint32_t CIDR0; /*!< Debug MCU component identity register 0, Address offset: 0xFF0 */ + __IO uint32_t CIDR1; /*!< Debug MCU component identity register 1, Address offset: 0xFF4 */ + __IO uint32_t CIDR2; /*!< Debug MCU component identity register 2, Address offset: 0xFF8 */ + __IO uint32_t CIDR3; /*!< Debug MCU component identity register 3, Address offset: 0xFFC */ +}DBGMCU_TypeDef; +/** + * @brief DCMI + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DCMI control register 1, Address offset: 0x00 */ + __IO uint32_t SR; /*!< DCMI status register, Address offset: 0x04 */ + __IO uint32_t RISR; /*!< DCMI raw interrupt status register, Address offset: 0x08 */ + __IO uint32_t IER; /*!< DCMI interrupt enable register, Address offset: 0x0C */ + __IO uint32_t MISR; /*!< DCMI masked interrupt status register, Address offset: 0x10 */ + __IO uint32_t ICR; /*!< DCMI interrupt clear register, Address offset: 0x14 */ + __IO uint32_t ESCR; /*!< DCMI embedded synchronization code register, Address offset: 0x18 */ + __IO uint32_t ESUR; /*!< DCMI embedded synchronization unmask register, Address offset: 0x1C */ + __IO uint32_t CWSTRTR; /*!< DCMI crop window start, Address offset: 0x20 */ + __IO uint32_t CWSIZER; /*!< DCMI crop window size, Address offset: 0x24 */ + __IO uint32_t DR; /*!< DCMI data register, Address offset: 0x28 */ +} DCMI_TypeDef; + +/** + * @brief PSSI + */ + +typedef struct +{ + __IO uint32_t CR; /*!< PSSI control register 1, Address offset: 0x000 */ + __IO uint32_t SR; /*!< PSSI status register, Address offset: 0x004 */ + __IO uint32_t RIS; /*!< PSSI raw interrupt status register, Address offset: 0x008 */ + __IO uint32_t IER; /*!< PSSI interrupt enable register, Address offset: 0x00C */ + __IO uint32_t MIS; /*!< PSSI masked interrupt status register, Address offset: 0x010 */ + __IO uint32_t ICR; /*!< PSSI interrupt clear register, Address offset: 0x014 */ + __IO uint32_t RESERVED1[4]; /*!< Reserved, 0x018 - 0x024 */ + __IO uint32_t DR; /*!< PSSI data register, Address offset: 0x028 */ + __IO uint32_t RESERVED2[241]; /*!< Reserved, 0x02C - 0x3EC */ + __IO uint32_t HWCFGR; /*!< PSSI IP HW configuration register, Address offset: 0x3F0 */ + __IO uint32_t VERR; /*!< PSSI IP version register, Address offset: 0x3F4 */ + __IO uint32_t IPIDR; /*!< PSSI IP ID register, Address offset: 0x3F8 */ + __IO uint32_t SIDR; /*!< PSSI SIZE ID register, Address offset: 0x3FC */ +} PSSI_TypeDef; + +/** + * @brief DMA Controller + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DMA stream x configuration register */ + __IO uint32_t NDTR; /*!< DMA stream x number of data register */ + __IO uint32_t PAR; /*!< DMA stream x peripheral address register */ + __IO uint32_t M0AR; /*!< DMA stream x memory 0 address register */ + __IO uint32_t M1AR; /*!< DMA stream x memory 1 address register */ + __IO uint32_t FCR; /*!< DMA stream x FIFO control register */ +} DMA_Stream_TypeDef; + +typedef struct +{ + __IO uint32_t LISR; /*!< DMA low interrupt status register, Address offset: 0x00 */ + __IO uint32_t HISR; /*!< DMA high interrupt status register, Address offset: 0x04 */ + __IO uint32_t LIFCR; /*!< DMA low interrupt flag clear register, Address offset: 0x08 */ + __IO uint32_t HIFCR; /*!< DMA high interrupt flag clear register, Address offset: 0x0C */ +} DMA_TypeDef; + +typedef struct +{ + __IO uint32_t CCR; /*!< DMA channel x configuration register */ + __IO uint32_t CNDTR; /*!< DMA channel x number of data register */ + __IO uint32_t CPAR; /*!< DMA channel x peripheral address register */ + __IO uint32_t CM0AR; /*!< DMA channel x memory 0 address register */ + __IO uint32_t CM1AR; /*!< DMA channel x memory 1 address register */ +} BDMA_Channel_TypeDef; + +typedef struct +{ + __IO uint32_t ISR; /*!< DMA interrupt status register, Address offset: 0x00 */ + __IO uint32_t IFCR; /*!< DMA interrupt flag clear register, Address offset: 0x04 */ +} BDMA_TypeDef; + +typedef struct +{ + __IO uint32_t CCR; /*!< DMA Multiplexer Channel x Control Register */ +}DMAMUX_Channel_TypeDef; + +typedef struct +{ + __IO uint32_t CSR; /*!< DMA Channel Status Register */ + __IO uint32_t CFR; /*!< DMA Channel Clear Flag Register */ +}DMAMUX_ChannelStatus_TypeDef; + +typedef struct +{ + __IO uint32_t RGCR; /*!< DMA Request Generator x Control Register */ +}DMAMUX_RequestGen_TypeDef; + +typedef struct +{ + __IO uint32_t RGSR; /*!< DMA Request Generator Status Register */ + __IO uint32_t RGCFR; /*!< DMA Request Generator Clear Flag Register */ +}DMAMUX_RequestGenStatus_TypeDef; + +/** + * @brief MDMA Controller + */ +typedef struct +{ + __IO uint32_t GISR0; /*!< MDMA Global Interrupt/Status Register 0, Address offset: 0x00 */ +}MDMA_TypeDef; + +typedef struct +{ + __IO uint32_t CISR; /*!< MDMA channel x interrupt/status register, Address offset: 0x40 */ + __IO uint32_t CIFCR; /*!< MDMA channel x interrupt flag clear register, Address offset: 0x44 */ + __IO uint32_t CESR; /*!< MDMA Channel x error status register, Address offset: 0x48 */ + __IO uint32_t CCR; /*!< MDMA channel x control register, Address offset: 0x4C */ + __IO uint32_t CTCR; /*!< MDMA channel x Transfer Configuration register, Address offset: 0x50 */ + __IO uint32_t CBNDTR; /*!< MDMA Channel x block number of data register, Address offset: 0x54 */ + __IO uint32_t CSAR; /*!< MDMA channel x source address register, Address offset: 0x58 */ + __IO uint32_t CDAR; /*!< MDMA channel x destination address register, Address offset: 0x5C */ + __IO uint32_t CBRUR; /*!< MDMA channel x Block Repeat address Update register, Address offset: 0x60 */ + __IO uint32_t CLAR; /*!< MDMA channel x Link Address register, Address offset: 0x64 */ + __IO uint32_t CTBR; /*!< MDMA channel x Trigger and Bus selection Register, Address offset: 0x68 */ + uint32_t RESERVED0; /*!< Reserved, 0x68 */ + __IO uint32_t CMAR; /*!< MDMA channel x Mask address register, Address offset: 0x70 */ + __IO uint32_t CMDR; /*!< MDMA channel x Mask Data register, Address offset: 0x74 */ +}MDMA_Channel_TypeDef; + +/** + * @brief DMA2D Controller + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DMA2D Control Register, Address offset: 0x00 */ + __IO uint32_t ISR; /*!< DMA2D Interrupt Status Register, Address offset: 0x04 */ + __IO uint32_t IFCR; /*!< DMA2D Interrupt Flag Clear Register, Address offset: 0x08 */ + __IO uint32_t FGMAR; /*!< DMA2D Foreground Memory Address Register, Address offset: 0x0C */ + __IO uint32_t FGOR; /*!< DMA2D Foreground Offset Register, Address offset: 0x10 */ + __IO uint32_t BGMAR; /*!< DMA2D Background Memory Address Register, Address offset: 0x14 */ + __IO uint32_t BGOR; /*!< DMA2D Background Offset Register, Address offset: 0x18 */ + __IO uint32_t FGPFCCR; /*!< DMA2D Foreground PFC Control Register, Address offset: 0x1C */ + __IO uint32_t FGCOLR; /*!< DMA2D Foreground Color Register, Address offset: 0x20 */ + __IO uint32_t BGPFCCR; /*!< DMA2D Background PFC Control Register, Address offset: 0x24 */ + __IO uint32_t BGCOLR; /*!< DMA2D Background Color Register, Address offset: 0x28 */ + __IO uint32_t FGCMAR; /*!< DMA2D Foreground CLUT Memory Address Register, Address offset: 0x2C */ + __IO uint32_t BGCMAR; /*!< DMA2D Background CLUT Memory Address Register, Address offset: 0x30 */ + __IO uint32_t OPFCCR; /*!< DMA2D Output PFC Control Register, Address offset: 0x34 */ + __IO uint32_t OCOLR; /*!< DMA2D Output Color Register, Address offset: 0x38 */ + __IO uint32_t OMAR; /*!< DMA2D Output Memory Address Register, Address offset: 0x3C */ + __IO uint32_t OOR; /*!< DMA2D Output Offset Register, Address offset: 0x40 */ + __IO uint32_t NLR; /*!< DMA2D Number of Line Register, Address offset: 0x44 */ + __IO uint32_t LWR; /*!< DMA2D Line Watermark Register, Address offset: 0x48 */ + __IO uint32_t AMTCR; /*!< DMA2D AHB Master Timer Configuration Register, Address offset: 0x4C */ + uint32_t RESERVED[236]; /*!< Reserved, 0x50-0x3FF */ + __IO uint32_t FGCLUT[256]; /*!< DMA2D Foreground CLUT, Address offset:400-7FF */ + __IO uint32_t BGCLUT[256]; /*!< DMA2D Background CLUT, Address offset:800-BFF */ +} DMA2D_TypeDef; + + +/** + * @brief Ethernet MAC + */ +typedef struct +{ + __IO uint32_t MACCR; + __IO uint32_t MACECR; + __IO uint32_t MACPFR; + __IO uint32_t MACWTR; + __IO uint32_t MACHT0R; + __IO uint32_t MACHT1R; + uint32_t RESERVED1[14]; + __IO uint32_t MACVTR; + uint32_t RESERVED2; + __IO uint32_t MACVHTR; + uint32_t RESERVED3; + __IO uint32_t MACVIR; + __IO uint32_t MACIVIR; + uint32_t RESERVED4[2]; + __IO uint32_t MACTFCR; + uint32_t RESERVED5[7]; + __IO uint32_t MACRFCR; + uint32_t RESERVED6[7]; + __IO uint32_t MACISR; + __IO uint32_t MACIER; + __IO uint32_t MACRXTXSR; + uint32_t RESERVED7; + __IO uint32_t MACPCSR; + __IO uint32_t MACRWKPFR; + uint32_t RESERVED8[2]; + __IO uint32_t MACLCSR; + __IO uint32_t MACLTCR; + __IO uint32_t MACLETR; + __IO uint32_t MAC1USTCR; + uint32_t RESERVED9[12]; + __IO uint32_t MACVR; + __IO uint32_t MACDR; + uint32_t RESERVED10; + __IO uint32_t MACHWF0R; + __IO uint32_t MACHWF1R; + __IO uint32_t MACHWF2R; + uint32_t RESERVED11[54]; + __IO uint32_t MACMDIOAR; + __IO uint32_t MACMDIODR; + uint32_t RESERVED12[2]; + __IO uint32_t MACARPAR; + uint32_t RESERVED13[59]; + __IO uint32_t MACA0HR; + __IO uint32_t MACA0LR; + __IO uint32_t MACA1HR; + __IO uint32_t MACA1LR; + __IO uint32_t MACA2HR; + __IO uint32_t MACA2LR; + __IO uint32_t MACA3HR; + __IO uint32_t MACA3LR; + uint32_t RESERVED14[248]; + __IO uint32_t MMCCR; + __IO uint32_t MMCRIR; + __IO uint32_t MMCTIR; + __IO uint32_t MMCRIMR; + __IO uint32_t MMCTIMR; + uint32_t RESERVED15[14]; + __IO uint32_t MMCTSCGPR; + __IO uint32_t MMCTMCGPR; + uint32_t RESERVED16[5]; + __IO uint32_t MMCTPCGR; + uint32_t RESERVED17[10]; + __IO uint32_t MMCRCRCEPR; + __IO uint32_t MMCRAEPR; + uint32_t RESERVED18[10]; + __IO uint32_t MMCRUPGR; + uint32_t RESERVED19[9]; + __IO uint32_t MMCTLPIMSTR; + __IO uint32_t MMCTLPITCR; + __IO uint32_t MMCRLPIMSTR; + __IO uint32_t MMCRLPITCR; + uint32_t RESERVED20[65]; + __IO uint32_t MACL3L4C0R; + __IO uint32_t MACL4A0R; + uint32_t RESERVED21[2]; + __IO uint32_t MACL3A0R0R; + __IO uint32_t MACL3A1R0R; + __IO uint32_t MACL3A2R0R; + __IO uint32_t MACL3A3R0R; + uint32_t RESERVED22[4]; + __IO uint32_t MACL3L4C1R; + __IO uint32_t MACL4A1R; + uint32_t RESERVED23[2]; + __IO uint32_t MACL3A0R1R; + __IO uint32_t MACL3A1R1R; + __IO uint32_t MACL3A2R1R; + __IO uint32_t MACL3A3R1R; + uint32_t RESERVED24[108]; + __IO uint32_t MACTSCR; + __IO uint32_t MACSSIR; + __IO uint32_t MACSTSR; + __IO uint32_t MACSTNR; + __IO uint32_t MACSTSUR; + __IO uint32_t MACSTNUR; + __IO uint32_t MACTSAR; + uint32_t RESERVED25; + __IO uint32_t MACTSSR; + uint32_t RESERVED26[3]; + __IO uint32_t MACTTSSNR; + __IO uint32_t MACTTSSSR; + uint32_t RESERVED27[2]; + __IO uint32_t MACACR; + uint32_t RESERVED28; + __IO uint32_t MACATSNR; + __IO uint32_t MACATSSR; + __IO uint32_t MACTSIACR; + __IO uint32_t MACTSEACR; + __IO uint32_t MACTSICNR; + __IO uint32_t MACTSECNR; + uint32_t RESERVED29[4]; + __IO uint32_t MACPPSCR; + uint32_t RESERVED30[3]; + __IO uint32_t MACPPSTTSR; + __IO uint32_t MACPPSTTNR; + __IO uint32_t MACPPSIR; + __IO uint32_t MACPPSWR; + uint32_t RESERVED31[12]; + __IO uint32_t MACPOCR; + __IO uint32_t MACSPI0R; + __IO uint32_t MACSPI1R; + __IO uint32_t MACSPI2R; + __IO uint32_t MACLMIR; + uint32_t RESERVED32[11]; + __IO uint32_t MTLOMR; + uint32_t RESERVED33[7]; + __IO uint32_t MTLISR; + uint32_t RESERVED34[55]; + __IO uint32_t MTLTQOMR; + __IO uint32_t MTLTQUR; + __IO uint32_t MTLTQDR; + uint32_t RESERVED35[8]; + __IO uint32_t MTLQICSR; + __IO uint32_t MTLRQOMR; + __IO uint32_t MTLRQMPOCR; + __IO uint32_t MTLRQDR; + uint32_t RESERVED36[177]; + __IO uint32_t DMAMR; + __IO uint32_t DMASBMR; + __IO uint32_t DMAISR; + __IO uint32_t DMADSR; + uint32_t RESERVED37[60]; + __IO uint32_t DMACCR; + __IO uint32_t DMACTCR; + __IO uint32_t DMACRCR; + uint32_t RESERVED38[2]; + __IO uint32_t DMACTDLAR; + uint32_t RESERVED39; + __IO uint32_t DMACRDLAR; + __IO uint32_t DMACTDTPR; + uint32_t RESERVED40; + __IO uint32_t DMACRDTPR; + __IO uint32_t DMACTDRLR; + __IO uint32_t DMACRDRLR; + __IO uint32_t DMACIER; + __IO uint32_t DMACRIWTR; +__IO uint32_t DMACSFCSR; + uint32_t RESERVED41; + __IO uint32_t DMACCATDR; + uint32_t RESERVED42; + __IO uint32_t DMACCARDR; + uint32_t RESERVED43; + __IO uint32_t DMACCATBR; + uint32_t RESERVED44; + __IO uint32_t DMACCARBR; + __IO uint32_t DMACSR; +uint32_t RESERVED45[2]; +__IO uint32_t DMACMFCR; +}ETH_TypeDef; +/** + * @brief External Interrupt/Event Controller + */ + +typedef struct +{ +__IO uint32_t RTSR1; /*!< EXTI Rising trigger selection register, Address offset: 0x00 */ +__IO uint32_t FTSR1; /*!< EXTI Falling trigger selection register, Address offset: 0x04 */ +__IO uint32_t SWIER1; /*!< EXTI Software interrupt event register, Address offset: 0x08 */ +__IO uint32_t D3PMR1; /*!< EXTI D3 Pending mask register, (same register as to SRDPMR1) Address offset: 0x0C */ +__IO uint32_t D3PCR1L; /*!< EXTI D3 Pending clear selection register low, (same register as to SRDPCR1L) Address offset: 0x10 */ +__IO uint32_t D3PCR1H; /*!< EXTI D3 Pending clear selection register High, (same register as to SRDPCR1H) Address offset: 0x14 */ +uint32_t RESERVED1[2]; /*!< Reserved, 0x18 to 0x1C */ +__IO uint32_t RTSR2; /*!< EXTI Rising trigger selection register, Address offset: 0x20 */ +__IO uint32_t FTSR2; /*!< EXTI Falling trigger selection register, Address offset: 0x24 */ +__IO uint32_t SWIER2; /*!< EXTI Software interrupt event register, Address offset: 0x28 */ +__IO uint32_t D3PMR2; /*!< EXTI D3 Pending mask register, (same register as to SRDPMR2) Address offset: 0x2C */ +__IO uint32_t D3PCR2L; /*!< EXTI D3 Pending clear selection register low, (same register as to SRDPCR2L) Address offset: 0x30 */ +__IO uint32_t D3PCR2H; /*!< EXTI D3 Pending clear selection register High, (same register as to SRDPCR2H) Address offset: 0x34 */ +uint32_t RESERVED2[2]; /*!< Reserved, 0x38 to 0x3C */ +__IO uint32_t RTSR3; /*!< EXTI Rising trigger selection register, Address offset: 0x40 */ +__IO uint32_t FTSR3; /*!< EXTI Falling trigger selection register, Address offset: 0x44 */ +__IO uint32_t SWIER3; /*!< EXTI Software interrupt event register, Address offset: 0x48 */ +__IO uint32_t D3PMR3; /*!< EXTI D3 Pending mask register, (same register as to SRDPMR3) Address offset: 0x4C */ +__IO uint32_t D3PCR3L; /*!< EXTI D3 Pending clear selection register low, (same register as to SRDPCR3L) Address offset: 0x50 */ +__IO uint32_t D3PCR3H; /*!< EXTI D3 Pending clear selection register High, (same register as to SRDPCR3H) Address offset: 0x54 */ +uint32_t RESERVED3[10]; /*!< Reserved, 0x58 to 0x7C */ +__IO uint32_t IMR1; /*!< EXTI Interrupt mask register, Address offset: 0x80 */ +__IO uint32_t EMR1; /*!< EXTI Event mask register, Address offset: 0x84 */ +__IO uint32_t PR1; /*!< EXTI Pending register, Address offset: 0x88 */ +uint32_t RESERVED4; /*!< Reserved, 0x8C */ +__IO uint32_t IMR2; /*!< EXTI Interrupt mask register, Address offset: 0x90 */ +__IO uint32_t EMR2; /*!< EXTI Event mask register, Address offset: 0x94 */ +__IO uint32_t PR2; /*!< EXTI Pending register, Address offset: 0x98 */ +uint32_t RESERVED5; /*!< Reserved, 0x9C */ +__IO uint32_t IMR3; /*!< EXTI Interrupt mask register, Address offset: 0xA0 */ +__IO uint32_t EMR3; /*!< EXTI Event mask register, Address offset: 0xA4 */ +__IO uint32_t PR3; /*!< EXTI Pending register, Address offset: 0xA8 */ +}EXTI_TypeDef; + +typedef struct +{ +__IO uint32_t IMR1; /*!< EXTI Interrupt mask register, Address offset: 0x00 */ +__IO uint32_t EMR1; /*!< EXTI Event mask register, Address offset: 0x04 */ +__IO uint32_t PR1; /*!< EXTI Pending register, Address offset: 0x08 */ +uint32_t RESERVED1; /*!< Reserved, 0x0C */ +__IO uint32_t IMR2; /*!< EXTI Interrupt mask register, Address offset: 0x10 */ +__IO uint32_t EMR2; /*!< EXTI Event mask register, Address offset: 0x14 */ +__IO uint32_t PR2; /*!< EXTI Pending register, Address offset: 0x18 */ +uint32_t RESERVED2; /*!< Reserved, 0x1C */ +__IO uint32_t IMR3; /*!< EXTI Interrupt mask register, Address offset: 0x20 */ +__IO uint32_t EMR3; /*!< EXTI Event mask register, Address offset: 0x24 */ +__IO uint32_t PR3; /*!< EXTI Pending register, Address offset: 0x28 */ +}EXTI_Core_TypeDef; + + +/** + * @brief FLASH Registers + */ + +typedef struct +{ + __IO uint32_t ACR; /*!< FLASH access control register, Address offset: 0x00 */ + __IO uint32_t KEYR1; /*!< Flash Key Register for bank1, Address offset: 0x04 */ + __IO uint32_t OPTKEYR; /*!< Flash Option Key Register, Address offset: 0x08 */ + __IO uint32_t CR1; /*!< Flash Control Register for bank1, Address offset: 0x0C */ + __IO uint32_t SR1; /*!< Flash Status Register for bank1, Address offset: 0x10 */ + __IO uint32_t CCR1; /*!< Flash Control Register for bank1, Address offset: 0x14 */ + __IO uint32_t OPTCR; /*!< Flash Option Control Register, Address offset: 0x18 */ + __IO uint32_t OPTSR_CUR; /*!< Flash Option Status Current Register, Address offset: 0x1C */ + __IO uint32_t OPTSR_PRG; /*!< Flash Option Status to Program Register, Address offset: 0x20 */ + __IO uint32_t OPTCCR; /*!< Flash Option Clear Control Register, Address offset: 0x24 */ + __IO uint32_t PRAR_CUR1; /*!< Flash Current Protection Address Register for bank1, Address offset: 0x28 */ + __IO uint32_t PRAR_PRG1; /*!< Flash Protection Address to Program Register for bank1, Address offset: 0x2C */ + __IO uint32_t SCAR_CUR1; /*!< Flash Current Secure Address Register for bank1, Address offset: 0x30 */ + __IO uint32_t SCAR_PRG1; /*!< Flash Secure Address to Program Register for bank1, Address offset: 0x34 */ + __IO uint32_t WPSN_CUR1; /*!< Flash Current Write Protection Register on bank1, Address offset: 0x38 */ + __IO uint32_t WPSN_PRG1; /*!< Flash Write Protection to Program Register on bank1, Address offset: 0x3C */ + __IO uint32_t BOOT_CUR; /*!< Flash Current Boot Address for Pelican Core Register, Address offset: 0x40 */ + __IO uint32_t BOOT_PRG; /*!< Flash Boot Address to Program for Pelican Core Register, Address offset: 0x44 */ + uint32_t RESERVED0[2]; /*!< Reserved, 0x48 to 0x4C */ + __IO uint32_t CRCCR1; /*!< Flash CRC Control register For Bank1 Register , Address offset: 0x50 */ + __IO uint32_t CRCSADD1; /*!< Flash CRC Start Address Register for Bank1 , Address offset: 0x54 */ + __IO uint32_t CRCEADD1; /*!< Flash CRC End Address Register for Bank1 , Address offset: 0x58 */ + __IO uint32_t CRCDATA; /*!< Flash CRC Data Register for Bank1 , Address offset: 0x5C */ + __IO uint32_t ECC_FA1; /*!< Flash ECC Fail Address For Bank1 Register , Address offset: 0x60 */ + uint32_t RESERVED[3]; /*!< Reserved, 0x64 to 0x6C */ + __IO uint32_t OPTSR2_CUR; /*!< Flash Option Status Current Register 2, Address offset: 0x70 */ + __IO uint32_t OPTSR2_PRG; /*!< Flash Option Status to Program Register 2, Address offset: 0x74 */ +} FLASH_TypeDef; + +/** + * @brief Filter and Mathematical ACcelerator + */ +typedef struct +{ + __IO uint32_t X1BUFCFG; /*!< FMAC X1 Buffer Configuration register, Address offset: 0x00 */ + __IO uint32_t X2BUFCFG; /*!< FMAC X2 Buffer Configuration register, Address offset: 0x04 */ + __IO uint32_t YBUFCFG; /*!< FMAC Y Buffer Configuration register, Address offset: 0x08 */ + __IO uint32_t PARAM; /*!< FMAC Parameter register, Address offset: 0x0C */ + __IO uint32_t CR; /*!< FMAC Control register, Address offset: 0x10 */ + __IO uint32_t SR; /*!< FMAC Status register, Address offset: 0x14 */ + __IO uint32_t WDATA; /*!< FMAC Write Data register, Address offset: 0x18 */ + __IO uint32_t RDATA; /*!< FMAC Read Data register, Address offset: 0x1C */ +} FMAC_TypeDef; + +/** + * @brief Flexible Memory Controller + */ + +typedef struct +{ + __IO uint32_t BTCR[8]; /*!< NOR/PSRAM chip-select control register(BCR) and chip-select timing register(BTR), Address offset: 0x00-1C */ +} FMC_Bank1_TypeDef; + +/** + * @brief Flexible Memory Controller Bank1E + */ + +typedef struct +{ + __IO uint32_t BWTR[7]; /*!< NOR/PSRAM write timing registers, Address offset: 0x104-0x11C */ +} FMC_Bank1E_TypeDef; + +/** + * @brief Flexible Memory Controller Bank2 + */ + +typedef struct +{ + __IO uint32_t PCR2; /*!< NAND Flash control register 2, Address offset: 0x60 */ + __IO uint32_t SR2; /*!< NAND Flash FIFO status and interrupt register 2, Address offset: 0x64 */ + __IO uint32_t PMEM2; /*!< NAND Flash Common memory space timing register 2, Address offset: 0x68 */ + __IO uint32_t PATT2; /*!< NAND Flash Attribute memory space timing register 2, Address offset: 0x6C */ + uint32_t RESERVED0; /*!< Reserved, 0x70 */ + __IO uint32_t ECCR2; /*!< NAND Flash ECC result registers 2, Address offset: 0x74 */ +} FMC_Bank2_TypeDef; + +/** + * @brief Flexible Memory Controller Bank3 + */ + +typedef struct +{ + __IO uint32_t PCR; /*!< NAND Flash control register 3, Address offset: 0x80 */ + __IO uint32_t SR; /*!< NAND Flash FIFO status and interrupt register 3, Address offset: 0x84 */ + __IO uint32_t PMEM; /*!< NAND Flash Common memory space timing register 3, Address offset: 0x88 */ + __IO uint32_t PATT; /*!< NAND Flash Attribute memory space timing register 3, Address offset: 0x8C */ + uint32_t RESERVED; /*!< Reserved, 0x90 */ + __IO uint32_t ECCR; /*!< NAND Flash ECC result registers 3, Address offset: 0x94 */ +} FMC_Bank3_TypeDef; + +/** + * @brief Flexible Memory Controller Bank5 and 6 + */ + + +typedef struct +{ + __IO uint32_t SDCR[2]; /*!< SDRAM Control registers , Address offset: 0x140-0x144 */ + __IO uint32_t SDTR[2]; /*!< SDRAM Timing registers , Address offset: 0x148-0x14C */ + __IO uint32_t SDCMR; /*!< SDRAM Command Mode register, Address offset: 0x150 */ + __IO uint32_t SDRTR; /*!< SDRAM Refresh Timer register, Address offset: 0x154 */ + __IO uint32_t SDSR; /*!< SDRAM Status register, Address offset: 0x158 */ +} FMC_Bank5_6_TypeDef; + +/** + * @brief General Purpose I/O + */ + +typedef struct +{ + __IO uint32_t MODER; /*!< GPIO port mode register, Address offset: 0x00 */ + __IO uint32_t OTYPER; /*!< GPIO port output type register, Address offset: 0x04 */ + __IO uint32_t OSPEEDR; /*!< GPIO port output speed register, Address offset: 0x08 */ + __IO uint32_t PUPDR; /*!< GPIO port pull-up/pull-down register, Address offset: 0x0C */ + __IO uint32_t IDR; /*!< GPIO port input data register, Address offset: 0x10 */ + __IO uint32_t ODR; /*!< GPIO port output data register, Address offset: 0x14 */ + __IO uint32_t BSRR; /*!< GPIO port bit set/reset, Address offset: 0x18 */ + __IO uint32_t LCKR; /*!< GPIO port configuration lock register, Address offset: 0x1C */ + __IO uint32_t AFR[2]; /*!< GPIO alternate function registers, Address offset: 0x20-0x24 */ +} GPIO_TypeDef; + +/** + * @brief Operational Amplifier (OPAMP) + */ + +typedef struct +{ + __IO uint32_t CSR; /*!< OPAMP control/status register, Address offset: 0x00 */ + __IO uint32_t OTR; /*!< OPAMP offset trimming register for normal mode, Address offset: 0x04 */ + __IO uint32_t HSOTR; /*!< OPAMP offset trimming register for high speed mode, Address offset: 0x08 */ +} OPAMP_TypeDef; + +/** + * @brief System configuration controller + */ + +typedef struct +{ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x00 */ + __IO uint32_t PMCR; /*!< SYSCFG peripheral mode configuration register, Address offset: 0x04 */ + __IO uint32_t EXTICR[4]; /*!< SYSCFG external interrupt configuration registers, Address offset: 0x08-0x14 */ + __IO uint32_t CFGR; /*!< SYSCFG configuration registers, Address offset: 0x18 */ + uint32_t RESERVED2; /*!< Reserved, Address offset: 0x1C */ + __IO uint32_t CCCSR; /*!< SYSCFG compensation cell control/status register, Address offset: 0x20 */ + __IO uint32_t CCVR; /*!< SYSCFG compensation cell value register, Address offset: 0x24 */ + __IO uint32_t CCCR; /*!< SYSCFG compensation cell code register, Address offset: 0x28 */ + uint32_t RESERVED3; /*!< Reserved, Address offset: 0x2C */ + __IO uint32_t ADC2ALT; /*!< ADC2 internal input alternate connection register, Address offset: 0x30 */ + uint32_t RESERVED4[60]; /*!< Reserved, 0x34-0x120 */ + __IO uint32_t PKGR; /*!< SYSCFG package register, Address offset: 0x124 */ + uint32_t RESERVED5[118]; /*!< Reserved, 0x128-0x2FC */ + __IO uint32_t UR0; /*!< SYSCFG user register 0, Address offset: 0x300 */ + __IO uint32_t UR1; /*!< SYSCFG user register 1, Address offset: 0x304 */ + __IO uint32_t UR2; /*!< SYSCFG user register 2, Address offset: 0x308 */ + __IO uint32_t UR3; /*!< SYSCFG user register 3, Address offset: 0x30C */ + __IO uint32_t UR4; /*!< SYSCFG user register 4, Address offset: 0x310 */ + __IO uint32_t UR5; /*!< SYSCFG user register 5, Address offset: 0x314 */ + __IO uint32_t UR6; /*!< SYSCFG user register 6, Address offset: 0x318 */ + __IO uint32_t UR7; /*!< SYSCFG user register 7, Address offset: 0x31C */ + uint32_t RESERVED6[3]; /*!< Reserved, Address offset: 0x320-0x328 */ + __IO uint32_t UR11; /*!< SYSCFG user register 11, Address offset: 0x32C */ + __IO uint32_t UR12; /*!< SYSCFG user register 12, Address offset: 0x330 */ + __IO uint32_t UR13; /*!< SYSCFG user register 13, Address offset: 0x334 */ + __IO uint32_t UR14; /*!< SYSCFG user register 14, Address offset: 0x338 */ + __IO uint32_t UR15; /*!< SYSCFG user register 15, Address offset: 0x33C */ + __IO uint32_t UR16; /*!< SYSCFG user register 16, Address offset: 0x340 */ + __IO uint32_t UR17; /*!< SYSCFG user register 17, Address offset: 0x344 */ + __IO uint32_t UR18; /*!< SYSCFG user register 18, Address offset: 0x348 */ + +} SYSCFG_TypeDef; + +/** + * @brief Inter-integrated Circuit Interface + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< I2C Control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< I2C Control register 2, Address offset: 0x04 */ + __IO uint32_t OAR1; /*!< I2C Own address 1 register, Address offset: 0x08 */ + __IO uint32_t OAR2; /*!< I2C Own address 2 register, Address offset: 0x0C */ + __IO uint32_t TIMINGR; /*!< I2C Timing register, Address offset: 0x10 */ + __IO uint32_t TIMEOUTR; /*!< I2C Timeout register, Address offset: 0x14 */ + __IO uint32_t ISR; /*!< I2C Interrupt and status register, Address offset: 0x18 */ + __IO uint32_t ICR; /*!< I2C Interrupt clear register, Address offset: 0x1C */ + __IO uint32_t PECR; /*!< I2C PEC register, Address offset: 0x20 */ + __IO uint32_t RXDR; /*!< I2C Receive data register, Address offset: 0x24 */ + __IO uint32_t TXDR; /*!< I2C Transmit data register, Address offset: 0x28 */ +} I2C_TypeDef; + +/** + * @brief Independent WATCHDOG + */ + +typedef struct +{ + __IO uint32_t KR; /*!< IWDG Key register, Address offset: 0x00 */ + __IO uint32_t PR; /*!< IWDG Prescaler register, Address offset: 0x04 */ + __IO uint32_t RLR; /*!< IWDG Reload register, Address offset: 0x08 */ + __IO uint32_t SR; /*!< IWDG Status register, Address offset: 0x0C */ + __IO uint32_t WINR; /*!< IWDG Window register, Address offset: 0x10 */ +} IWDG_TypeDef; + + +/** + * @brief LCD-TFT Display Controller + */ + +typedef struct +{ + uint32_t RESERVED0[2]; /*!< Reserved, 0x00-0x04 */ + __IO uint32_t SSCR; /*!< LTDC Synchronization Size Configuration Register, Address offset: 0x08 */ + __IO uint32_t BPCR; /*!< LTDC Back Porch Configuration Register, Address offset: 0x0C */ + __IO uint32_t AWCR; /*!< LTDC Active Width Configuration Register, Address offset: 0x10 */ + __IO uint32_t TWCR; /*!< LTDC Total Width Configuration Register, Address offset: 0x14 */ + __IO uint32_t GCR; /*!< LTDC Global Control Register, Address offset: 0x18 */ + uint32_t RESERVED1[2]; /*!< Reserved, 0x1C-0x20 */ + __IO uint32_t SRCR; /*!< LTDC Shadow Reload Configuration Register, Address offset: 0x24 */ + uint32_t RESERVED2[1]; /*!< Reserved, 0x28 */ + __IO uint32_t BCCR; /*!< LTDC Background Color Configuration Register, Address offset: 0x2C */ + uint32_t RESERVED3[1]; /*!< Reserved, 0x30 */ + __IO uint32_t IER; /*!< LTDC Interrupt Enable Register, Address offset: 0x34 */ + __IO uint32_t ISR; /*!< LTDC Interrupt Status Register, Address offset: 0x38 */ + __IO uint32_t ICR; /*!< LTDC Interrupt Clear Register, Address offset: 0x3C */ + __IO uint32_t LIPCR; /*!< LTDC Line Interrupt Position Configuration Register, Address offset: 0x40 */ + __IO uint32_t CPSR; /*!< LTDC Current Position Status Register, Address offset: 0x44 */ + __IO uint32_t CDSR; /*!< LTDC Current Display Status Register, Address offset: 0x48 */ +} LTDC_TypeDef; + +/** + * @brief LCD-TFT Display layer x Controller + */ + +typedef struct +{ + __IO uint32_t CR; /*!< LTDC Layerx Control Register Address offset: 0x84 */ + __IO uint32_t WHPCR; /*!< LTDC Layerx Window Horizontal Position Configuration Register Address offset: 0x88 */ + __IO uint32_t WVPCR; /*!< LTDC Layerx Window Vertical Position Configuration Register Address offset: 0x8C */ + __IO uint32_t CKCR; /*!< LTDC Layerx Color Keying Configuration Register Address offset: 0x90 */ + __IO uint32_t PFCR; /*!< LTDC Layerx Pixel Format Configuration Register Address offset: 0x94 */ + __IO uint32_t CACR; /*!< LTDC Layerx Constant Alpha Configuration Register Address offset: 0x98 */ + __IO uint32_t DCCR; /*!< LTDC Layerx Default Color Configuration Register Address offset: 0x9C */ + __IO uint32_t BFCR; /*!< LTDC Layerx Blending Factors Configuration Register Address offset: 0xA0 */ + uint32_t RESERVED0[2]; /*!< Reserved */ + __IO uint32_t CFBAR; /*!< LTDC Layerx Color Frame Buffer Address Register Address offset: 0xAC */ + __IO uint32_t CFBLR; /*!< LTDC Layerx Color Frame Buffer Length Register Address offset: 0xB0 */ + __IO uint32_t CFBLNR; /*!< LTDC Layerx ColorFrame Buffer Line Number Register Address offset: 0xB4 */ + uint32_t RESERVED1[3]; /*!< Reserved */ + __IO uint32_t CLUTWR; /*!< LTDC Layerx CLUT Write Register Address offset: 0x144 */ + +} LTDC_Layer_TypeDef; + +/** + * @brief Power Control + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< PWR power control register 1, Address offset: 0x00 */ + __IO uint32_t CSR1; /*!< PWR power control status register 1, Address offset: 0x04 */ + __IO uint32_t CR2; /*!< PWR power control register 2, Address offset: 0x08 */ + __IO uint32_t CR3; /*!< PWR power control register 3, Address offset: 0x0C */ + __IO uint32_t CPUCR; /*!< PWR CPU control register, Address offset: 0x10 */ + uint32_t RESERVED0; /*!< Reserved, Address offset: 0x14 */ + __IO uint32_t D3CR; /*!< PWR D3 domain control register, Address offset: 0x18 */ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x1C */ + __IO uint32_t WKUPCR; /*!< PWR wakeup clear register, Address offset: 0x20 */ + __IO uint32_t WKUPFR; /*!< PWR wakeup flag register, Address offset: 0x24 */ + __IO uint32_t WKUPEPR; /*!< PWR wakeup enable and polarity register, Address offset: 0x28 */ +} PWR_TypeDef; + +/** + * @brief Reset and Clock Control + */ + +typedef struct +{ + __IO uint32_t CR; /*!< RCC clock control register, Address offset: 0x00 */ + __IO uint32_t HSICFGR; /*!< HSI Clock Calibration Register, Address offset: 0x04 */ + __IO uint32_t CRRCR; /*!< Clock Recovery RC Register, Address offset: 0x08 */ + __IO uint32_t CSICFGR; /*!< CSI Clock Calibration Register, Address offset: 0x0C */ + __IO uint32_t CFGR; /*!< RCC clock configuration register, Address offset: 0x10 */ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x14 */ + __IO uint32_t D1CFGR; /*!< RCC Domain 1 configuration register, Address offset: 0x18 */ + __IO uint32_t D2CFGR; /*!< RCC Domain 2 configuration register, Address offset: 0x1C */ + __IO uint32_t D3CFGR; /*!< RCC Domain 3 configuration register, Address offset: 0x20 */ + uint32_t RESERVED2; /*!< Reserved, Address offset: 0x24 */ + __IO uint32_t PLLCKSELR; /*!< RCC PLLs Clock Source Selection Register, Address offset: 0x28 */ + __IO uint32_t PLLCFGR; /*!< RCC PLLs Configuration Register, Address offset: 0x2C */ + __IO uint32_t PLL1DIVR; /*!< RCC PLL1 Dividers Configuration Register, Address offset: 0x30 */ + __IO uint32_t PLL1FRACR; /*!< RCC PLL1 Fractional Divider Configuration Register, Address offset: 0x34 */ + __IO uint32_t PLL2DIVR; /*!< RCC PLL2 Dividers Configuration Register, Address offset: 0x38 */ + __IO uint32_t PLL2FRACR; /*!< RCC PLL2 Fractional Divider Configuration Register, Address offset: 0x3C */ + __IO uint32_t PLL3DIVR; /*!< RCC PLL3 Dividers Configuration Register, Address offset: 0x40 */ + __IO uint32_t PLL3FRACR; /*!< RCC PLL3 Fractional Divider Configuration Register, Address offset: 0x44 */ + uint32_t RESERVED3; /*!< Reserved, Address offset: 0x48 */ + __IO uint32_t D1CCIPR; /*!< RCC Domain 1 Kernel Clock Configuration Register Address offset: 0x4C */ + __IO uint32_t D2CCIP1R; /*!< RCC Domain 2 Kernel Clock Configuration Register Address offset: 0x50 */ + __IO uint32_t D2CCIP2R; /*!< RCC Domain 2 Kernel Clock Configuration Register Address offset: 0x54 */ + __IO uint32_t D3CCIPR; /*!< RCC Domain 3 Kernel Clock Configuration Register Address offset: 0x58 */ + uint32_t RESERVED4; /*!< Reserved, Address offset: 0x5C */ + __IO uint32_t CIER; /*!< RCC Clock Source Interrupt Enable Register Address offset: 0x60 */ + __IO uint32_t CIFR; /*!< RCC Clock Source Interrupt Flag Register Address offset: 0x64 */ + __IO uint32_t CICR; /*!< RCC Clock Source Interrupt Clear Register Address offset: 0x68 */ + uint32_t RESERVED5; /*!< Reserved, Address offset: 0x6C */ + __IO uint32_t BDCR; /*!< RCC Vswitch Backup Domain Control Register, Address offset: 0x70 */ + __IO uint32_t CSR; /*!< RCC clock control & status register, Address offset: 0x74 */ + uint32_t RESERVED6; /*!< Reserved, Address offset: 0x78 */ + __IO uint32_t AHB3RSTR; /*!< RCC AHB3 peripheral reset register, Address offset: 0x7C */ + __IO uint32_t AHB1RSTR; /*!< RCC AHB1 peripheral reset register, Address offset: 0x80 */ + __IO uint32_t AHB2RSTR; /*!< RCC AHB2 peripheral reset register, Address offset: 0x84 */ + __IO uint32_t AHB4RSTR; /*!< RCC AHB4 peripheral reset register, Address offset: 0x88 */ + __IO uint32_t APB3RSTR; /*!< RCC APB3 peripheral reset register, Address offset: 0x8C */ + __IO uint32_t APB1LRSTR; /*!< RCC APB1 peripheral reset Low Word register, Address offset: 0x90 */ + __IO uint32_t APB1HRSTR; /*!< RCC APB1 peripheral reset High Word register, Address offset: 0x94 */ + __IO uint32_t APB2RSTR; /*!< RCC APB2 peripheral reset register, Address offset: 0x98 */ + __IO uint32_t APB4RSTR; /*!< RCC APB4 peripheral reset register, Address offset: 0x9C */ + __IO uint32_t GCR; /*!< RCC RCC Global Control Register, Address offset: 0xA0 */ + uint32_t RESERVED8; /*!< Reserved, Address offset: 0xA4 */ + __IO uint32_t D3AMR; /*!< RCC Domain 3 Autonomous Mode Register, Address offset: 0xA8 */ + uint32_t RESERVED11[9]; /*!< Reserved, 0xAC-0xCC Address offset: 0xAC */ + __IO uint32_t RSR; /*!< RCC Reset status register, Address offset: 0xD0 */ + __IO uint32_t AHB3ENR; /*!< RCC AHB3 peripheral clock register, Address offset: 0xD4 */ + __IO uint32_t AHB1ENR; /*!< RCC AHB1 peripheral clock register, Address offset: 0xD8 */ + __IO uint32_t AHB2ENR; /*!< RCC AHB2 peripheral clock register, Address offset: 0xDC */ + __IO uint32_t AHB4ENR; /*!< RCC AHB4 peripheral clock register, Address offset: 0xE0 */ + __IO uint32_t APB3ENR; /*!< RCC APB3 peripheral clock register, Address offset: 0xE4 */ + __IO uint32_t APB1LENR; /*!< RCC APB1 peripheral clock Low Word register, Address offset: 0xE8 */ + __IO uint32_t APB1HENR; /*!< RCC APB1 peripheral clock High Word register, Address offset: 0xEC */ + __IO uint32_t APB2ENR; /*!< RCC APB2 peripheral clock register, Address offset: 0xF0 */ + __IO uint32_t APB4ENR; /*!< RCC APB4 peripheral clock register, Address offset: 0xF4 */ + uint32_t RESERVED12; /*!< Reserved, Address offset: 0xF8 */ + __IO uint32_t AHB3LPENR; /*!< RCC AHB3 peripheral sleep clock register, Address offset: 0xFC */ + __IO uint32_t AHB1LPENR; /*!< RCC AHB1 peripheral sleep clock register, Address offset: 0x100 */ + __IO uint32_t AHB2LPENR; /*!< RCC AHB2 peripheral sleep clock register, Address offset: 0x104 */ + __IO uint32_t AHB4LPENR; /*!< RCC AHB4 peripheral sleep clock register, Address offset: 0x108 */ + __IO uint32_t APB3LPENR; /*!< RCC APB3 peripheral sleep clock register, Address offset: 0x10C */ + __IO uint32_t APB1LLPENR; /*!< RCC APB1 peripheral sleep clock Low Word register, Address offset: 0x110 */ + __IO uint32_t APB1HLPENR; /*!< RCC APB1 peripheral sleep clock High Word register, Address offset: 0x114 */ + __IO uint32_t APB2LPENR; /*!< RCC APB2 peripheral sleep clock register, Address offset: 0x118 */ + __IO uint32_t APB4LPENR; /*!< RCC APB4 peripheral sleep clock register, Address offset: 0x11C */ + uint32_t RESERVED13[4]; /*!< Reserved, 0x120-0x12C Address offset: 0x120 */ + +} RCC_TypeDef; + + +/** + * @brief Real-Time Clock + */ +typedef struct +{ + __IO uint32_t TR; /*!< RTC time register, Address offset: 0x00 */ + __IO uint32_t DR; /*!< RTC date register, Address offset: 0x04 */ + __IO uint32_t CR; /*!< RTC control register, Address offset: 0x08 */ + __IO uint32_t ISR; /*!< RTC initialization and status register, Address offset: 0x0C */ + __IO uint32_t PRER; /*!< RTC prescaler register, Address offset: 0x10 */ + __IO uint32_t WUTR; /*!< RTC wakeup timer register, Address offset: 0x14 */ + uint32_t RESERVED; /*!< Reserved, Address offset: 0x18 */ + __IO uint32_t ALRMAR; /*!< RTC alarm A register, Address offset: 0x1C */ + __IO uint32_t ALRMBR; /*!< RTC alarm B register, Address offset: 0x20 */ + __IO uint32_t WPR; /*!< RTC write protection register, Address offset: 0x24 */ + __IO uint32_t SSR; /*!< RTC sub second register, Address offset: 0x28 */ + __IO uint32_t SHIFTR; /*!< RTC shift control register, Address offset: 0x2C */ + __IO uint32_t TSTR; /*!< RTC time stamp time register, Address offset: 0x30 */ + __IO uint32_t TSDR; /*!< RTC time stamp date register, Address offset: 0x34 */ + __IO uint32_t TSSSR; /*!< RTC time-stamp sub second register, Address offset: 0x38 */ + __IO uint32_t CALR; /*!< RTC calibration register, Address offset: 0x3C */ + __IO uint32_t TAMPCR; /*!< RTC tamper configuration register, Address offset: 0x40 */ + __IO uint32_t ALRMASSR; /*!< RTC alarm A sub second register, Address offset: 0x44 */ + __IO uint32_t ALRMBSSR; /*!< RTC alarm B sub second register, Address offset: 0x48 */ + __IO uint32_t OR; /*!< RTC option register, Address offset: 0x4C */ + __IO uint32_t BKP0R; /*!< RTC backup register 0, Address offset: 0x50 */ + __IO uint32_t BKP1R; /*!< RTC backup register 1, Address offset: 0x54 */ + __IO uint32_t BKP2R; /*!< RTC backup register 2, Address offset: 0x58 */ + __IO uint32_t BKP3R; /*!< RTC backup register 3, Address offset: 0x5C */ + __IO uint32_t BKP4R; /*!< RTC backup register 4, Address offset: 0x60 */ + __IO uint32_t BKP5R; /*!< RTC backup register 5, Address offset: 0x64 */ + __IO uint32_t BKP6R; /*!< RTC backup register 6, Address offset: 0x68 */ + __IO uint32_t BKP7R; /*!< RTC backup register 7, Address offset: 0x6C */ + __IO uint32_t BKP8R; /*!< RTC backup register 8, Address offset: 0x70 */ + __IO uint32_t BKP9R; /*!< RTC backup register 9, Address offset: 0x74 */ + __IO uint32_t BKP10R; /*!< RTC backup register 10, Address offset: 0x78 */ + __IO uint32_t BKP11R; /*!< RTC backup register 11, Address offset: 0x7C */ + __IO uint32_t BKP12R; /*!< RTC backup register 12, Address offset: 0x80 */ + __IO uint32_t BKP13R; /*!< RTC backup register 13, Address offset: 0x84 */ + __IO uint32_t BKP14R; /*!< RTC backup register 14, Address offset: 0x88 */ + __IO uint32_t BKP15R; /*!< RTC backup register 15, Address offset: 0x8C */ + __IO uint32_t BKP16R; /*!< RTC backup register 16, Address offset: 0x90 */ + __IO uint32_t BKP17R; /*!< RTC backup register 17, Address offset: 0x94 */ + __IO uint32_t BKP18R; /*!< RTC backup register 18, Address offset: 0x98 */ + __IO uint32_t BKP19R; /*!< RTC backup register 19, Address offset: 0x9C */ + __IO uint32_t BKP20R; /*!< RTC backup register 20, Address offset: 0xA0 */ + __IO uint32_t BKP21R; /*!< RTC backup register 21, Address offset: 0xA4 */ + __IO uint32_t BKP22R; /*!< RTC backup register 22, Address offset: 0xA8 */ + __IO uint32_t BKP23R; /*!< RTC backup register 23, Address offset: 0xAC */ + __IO uint32_t BKP24R; /*!< RTC backup register 24, Address offset: 0xB0 */ + __IO uint32_t BKP25R; /*!< RTC backup register 25, Address offset: 0xB4 */ + __IO uint32_t BKP26R; /*!< RTC backup register 26, Address offset: 0xB8 */ + __IO uint32_t BKP27R; /*!< RTC backup register 27, Address offset: 0xBC */ + __IO uint32_t BKP28R; /*!< RTC backup register 28, Address offset: 0xC0 */ + __IO uint32_t BKP29R; /*!< RTC backup register 29, Address offset: 0xC4 */ + __IO uint32_t BKP30R; /*!< RTC backup register 30, Address offset: 0xC8 */ + __IO uint32_t BKP31R; /*!< RTC backup register 31, Address offset: 0xCC */ +} RTC_TypeDef; + +/** + * @brief Serial Audio Interface + */ + +typedef struct +{ + __IO uint32_t GCR; /*!< SAI global configuration register, Address offset: 0x00 */ + uint32_t RESERVED0[16]; /*!< Reserved, 0x04 - 0x43 */ + __IO uint32_t PDMCR; /*!< SAI PDM control register, Address offset: 0x44 */ + __IO uint32_t PDMDLY; /*!< SAI PDM delay register, Address offset: 0x48 */ +} SAI_TypeDef; + +typedef struct +{ + __IO uint32_t CR1; /*!< SAI block x configuration register 1, Address offset: 0x04 */ + __IO uint32_t CR2; /*!< SAI block x configuration register 2, Address offset: 0x08 */ + __IO uint32_t FRCR; /*!< SAI block x frame configuration register, Address offset: 0x0C */ + __IO uint32_t SLOTR; /*!< SAI block x slot register, Address offset: 0x10 */ + __IO uint32_t IMR; /*!< SAI block x interrupt mask register, Address offset: 0x14 */ + __IO uint32_t SR; /*!< SAI block x status register, Address offset: 0x18 */ + __IO uint32_t CLRFR; /*!< SAI block x clear flag register, Address offset: 0x1C */ + __IO uint32_t DR; /*!< SAI block x data register, Address offset: 0x20 */ +} SAI_Block_TypeDef; + +/** + * @brief SPDIF-RX Interface + */ + +typedef struct +{ + __IO uint32_t CR; /*!< Control register, Address offset: 0x00 */ + __IO uint32_t IMR; /*!< Interrupt mask register, Address offset: 0x04 */ + __IO uint32_t SR; /*!< Status register, Address offset: 0x08 */ + __IO uint32_t IFCR; /*!< Interrupt Flag Clear register, Address offset: 0x0C */ + __IO uint32_t DR; /*!< Data input register, Address offset: 0x10 */ + __IO uint32_t CSR; /*!< Channel Status register, Address offset: 0x14 */ + __IO uint32_t DIR; /*!< Debug Information register, Address offset: 0x18 */ + uint32_t RESERVED2; /*!< Reserved, 0x1A */ +} SPDIFRX_TypeDef; + + +/** + * @brief Secure digital input/output Interface + */ + +typedef struct +{ + __IO uint32_t POWER; /*!< SDMMC power control register, Address offset: 0x00 */ + __IO uint32_t CLKCR; /*!< SDMMC clock control register, Address offset: 0x04 */ + __IO uint32_t ARG; /*!< SDMMC argument register, Address offset: 0x08 */ + __IO uint32_t CMD; /*!< SDMMC command register, Address offset: 0x0C */ + __I uint32_t RESPCMD; /*!< SDMMC command response register, Address offset: 0x10 */ + __I uint32_t RESP1; /*!< SDMMC response 1 register, Address offset: 0x14 */ + __I uint32_t RESP2; /*!< SDMMC response 2 register, Address offset: 0x18 */ + __I uint32_t RESP3; /*!< SDMMC response 3 register, Address offset: 0x1C */ + __I uint32_t RESP4; /*!< SDMMC response 4 register, Address offset: 0x20 */ + __IO uint32_t DTIMER; /*!< SDMMC data timer register, Address offset: 0x24 */ + __IO uint32_t DLEN; /*!< SDMMC data length register, Address offset: 0x28 */ + __IO uint32_t DCTRL; /*!< SDMMC data control register, Address offset: 0x2C */ + __I uint32_t DCOUNT; /*!< SDMMC data counter register, Address offset: 0x30 */ + __I uint32_t STA; /*!< SDMMC status register, Address offset: 0x34 */ + __IO uint32_t ICR; /*!< SDMMC interrupt clear register, Address offset: 0x38 */ + __IO uint32_t MASK; /*!< SDMMC mask register, Address offset: 0x3C */ + __IO uint32_t ACKTIME; /*!< SDMMC Acknowledgement timer register, Address offset: 0x40 */ + uint32_t RESERVED0[3]; /*!< Reserved, 0x44 - 0x4C - 0x4C */ + __IO uint32_t IDMACTRL; /*!< SDMMC DMA control register, Address offset: 0x50 */ + __IO uint32_t IDMABSIZE; /*!< SDMMC DMA buffer size register, Address offset: 0x54 */ + __IO uint32_t IDMABASE0; /*!< SDMMC DMA buffer 0 base address register, Address offset: 0x58 */ + __IO uint32_t IDMABASE1; /*!< SDMMC DMA buffer 1 base address register, Address offset: 0x5C */ + uint32_t RESERVED1[8]; /*!< Reserved, 0x60-0x7C */ + __IO uint32_t FIFO; /*!< SDMMC data FIFO register, Address offset: 0x80 */ + uint32_t RESERVED2[222]; /*!< Reserved, 0x84-0x3F8 */ + __IO uint32_t IPVR; /*!< SDMMC data FIFO register, Address offset: 0x3FC */ +} SDMMC_TypeDef; + + +/** + * @brief Delay Block DLYB + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DELAY BLOCK control register, Address offset: 0x00 */ + __IO uint32_t CFGR; /*!< DELAY BLOCK configuration register, Address offset: 0x04 */ +} DLYB_TypeDef; + +/** + * @brief HW Semaphore HSEM + */ + +typedef struct +{ + __IO uint32_t R[32]; /*!< 2-step write lock and read back registers, Address offset: 00h-7Ch */ + __IO uint32_t RLR[32]; /*!< 1-step read lock registers, Address offset: 80h-FCh */ + __IO uint32_t C1IER; /*!< HSEM Interrupt enable register , Address offset: 100h */ + __IO uint32_t C1ICR; /*!< HSEM Interrupt clear register , Address offset: 104h */ + __IO uint32_t C1ISR; /*!< HSEM Interrupt Status register , Address offset: 108h */ + __IO uint32_t C1MISR; /*!< HSEM Interrupt Masked Status register , Address offset: 10Ch */ + uint32_t Reserved[12]; /* Reserved Address offset: 110h-13Ch */ + __IO uint32_t CR; /*!< HSEM Semaphore clear register , Address offset: 140h */ + __IO uint32_t KEYR; /*!< HSEM Semaphore clear key register , Address offset: 144h */ + +} HSEM_TypeDef; + +typedef struct +{ + __IO uint32_t IER; /*!< HSEM interrupt enable register , Address offset: 0h */ + __IO uint32_t ICR; /*!< HSEM interrupt clear register , Address offset: 4h */ + __IO uint32_t ISR; /*!< HSEM interrupt status register , Address offset: 8h */ + __IO uint32_t MISR; /*!< HSEM masked interrupt status register , Address offset: Ch */ +} HSEM_Common_TypeDef; + +/** + * @brief Serial Peripheral Interface + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< SPI/I2S Control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< SPI Control register 2, Address offset: 0x04 */ + __IO uint32_t CFG1; /*!< SPI Configuration register 1, Address offset: 0x08 */ + __IO uint32_t CFG2; /*!< SPI Configuration register 2, Address offset: 0x0C */ + __IO uint32_t IER; /*!< SPI/I2S Interrupt Enable register, Address offset: 0x10 */ + __IO uint32_t SR; /*!< SPI/I2S Status register, Address offset: 0x14 */ + __IO uint32_t IFCR; /*!< SPI/I2S Interrupt/Status flags clear register, Address offset: 0x18 */ + uint32_t RESERVED0; /*!< Reserved, 0x1C */ + __IO uint32_t TXDR; /*!< SPI/I2S Transmit data register, Address offset: 0x20 */ + uint32_t RESERVED1[3]; /*!< Reserved, 0x24-0x2C */ + __IO uint32_t RXDR; /*!< SPI/I2S Receive data register, Address offset: 0x30 */ + uint32_t RESERVED2[3]; /*!< Reserved, 0x34-0x3C */ + __IO uint32_t CRCPOLY; /*!< SPI CRC Polynomial register, Address offset: 0x40 */ + __IO uint32_t TXCRC; /*!< SPI Transmitter CRC register, Address offset: 0x44 */ + __IO uint32_t RXCRC; /*!< SPI Receiver CRC register, Address offset: 0x48 */ + __IO uint32_t UDRDR; /*!< SPI Underrun data register, Address offset: 0x4C */ + __IO uint32_t I2SCFGR; /*!< I2S Configuration register, Address offset: 0x50 */ + +} SPI_TypeDef; + +/** + * @brief DTS + */ +typedef struct +{ + __IO uint32_t CFGR1; /*!< DTS configuration register, Address offset: 0x00 */ + uint32_t RESERVED0; /*!< Reserved, Address offset: 0x04 */ + __IO uint32_t T0VALR1; /*!< DTS T0 Value register, Address offset: 0x08 */ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x0C */ + __IO uint32_t RAMPVALR; /*!< DTS Ramp value register, Address offset: 0x10 */ + __IO uint32_t ITR1; /*!< DTS Interrupt threshold register, Address offset: 0x14 */ + uint32_t RESERVED2; /*!< Reserved, Address offset: 0x18 */ + __IO uint32_t DR; /*!< DTS data register, Address offset: 0x1C */ + __IO uint32_t SR; /*!< DTS status register Address offset: 0x20 */ + __IO uint32_t ITENR; /*!< DTS Interrupt enable register, Address offset: 0x24 */ + __IO uint32_t ICIFR; /*!< DTS Clear Interrupt flag register, Address offset: 0x28 */ + __IO uint32_t OR; /*!< DTS option register 1, Address offset: 0x2C */ +} +DTS_TypeDef; + +/** + * @brief TIM + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< TIM control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< TIM control register 2, Address offset: 0x04 */ + __IO uint32_t SMCR; /*!< TIM slave mode control register, Address offset: 0x08 */ + __IO uint32_t DIER; /*!< TIM DMA/interrupt enable register, Address offset: 0x0C */ + __IO uint32_t SR; /*!< TIM status register, Address offset: 0x10 */ + __IO uint32_t EGR; /*!< TIM event generation register, Address offset: 0x14 */ + __IO uint32_t CCMR1; /*!< TIM capture/compare mode register 1, Address offset: 0x18 */ + __IO uint32_t CCMR2; /*!< TIM capture/compare mode register 2, Address offset: 0x1C */ + __IO uint32_t CCER; /*!< TIM capture/compare enable register, Address offset: 0x20 */ + __IO uint32_t CNT; /*!< TIM counter register, Address offset: 0x24 */ + __IO uint32_t PSC; /*!< TIM prescaler, Address offset: 0x28 */ + __IO uint32_t ARR; /*!< TIM auto-reload register, Address offset: 0x2C */ + __IO uint32_t RCR; /*!< TIM repetition counter register, Address offset: 0x30 */ + __IO uint32_t CCR1; /*!< TIM capture/compare register 1, Address offset: 0x34 */ + __IO uint32_t CCR2; /*!< TIM capture/compare register 2, Address offset: 0x38 */ + __IO uint32_t CCR3; /*!< TIM capture/compare register 3, Address offset: 0x3C */ + __IO uint32_t CCR4; /*!< TIM capture/compare register 4, Address offset: 0x40 */ + __IO uint32_t BDTR; /*!< TIM break and dead-time register, Address offset: 0x44 */ + __IO uint32_t DCR; /*!< TIM DMA control register, Address offset: 0x48 */ + __IO uint32_t DMAR; /*!< TIM DMA address for full transfer, Address offset: 0x4C */ + uint32_t RESERVED1; /*!< Reserved, 0x50 */ + __IO uint32_t CCMR3; /*!< TIM capture/compare mode register 3, Address offset: 0x54 */ + __IO uint32_t CCR5; /*!< TIM capture/compare register5, Address offset: 0x58 */ + __IO uint32_t CCR6; /*!< TIM capture/compare register6, Address offset: 0x5C */ + __IO uint32_t AF1; /*!< TIM alternate function option register 1, Address offset: 0x60 */ + __IO uint32_t AF2; /*!< TIM alternate function option register 2, Address offset: 0x64 */ + __IO uint32_t TISEL; /*!< TIM Input Selection register, Address offset: 0x68 */ +} TIM_TypeDef; + +/** + * @brief LPTIMIMER + */ +typedef struct +{ + __IO uint32_t ISR; /*!< LPTIM Interrupt and Status register, Address offset: 0x00 */ + __IO uint32_t ICR; /*!< LPTIM Interrupt Clear register, Address offset: 0x04 */ + __IO uint32_t IER; /*!< LPTIM Interrupt Enable register, Address offset: 0x08 */ + __IO uint32_t CFGR; /*!< LPTIM Configuration register, Address offset: 0x0C */ + __IO uint32_t CR; /*!< LPTIM Control register, Address offset: 0x10 */ + __IO uint32_t CMP; /*!< LPTIM Compare register, Address offset: 0x14 */ + __IO uint32_t ARR; /*!< LPTIM Autoreload register, Address offset: 0x18 */ + __IO uint32_t CNT; /*!< LPTIM Counter register, Address offset: 0x1C */ + uint32_t RESERVED1; /*!< Reserved, 0x20 */ + __IO uint32_t CFGR2; /*!< LPTIM Configuration register, Address offset: 0x24 */ +} LPTIM_TypeDef; + +/** + * @brief Comparator + */ +typedef struct +{ + __IO uint32_t SR; /*!< Comparator status register, Address offset: 0x00 */ + __IO uint32_t ICFR; /*!< Comparator interrupt clear flag register, Address offset: 0x04 */ + __IO uint32_t OR; /*!< Comparator option register, Address offset: 0x08 */ +} COMPOPT_TypeDef; + +typedef struct +{ + __IO uint32_t CFGR; /*!< Comparator configuration register , Address offset: 0x00 */ +} COMP_TypeDef; + +typedef struct +{ + __IO uint32_t CFGR; /*!< COMP control and status register, used for bits common to several COMP instances, Address offset: 0x00 */ +} COMP_Common_TypeDef; +/** + * @brief Universal Synchronous Asynchronous Receiver Transmitter + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< USART Control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< USART Control register 2, Address offset: 0x04 */ + __IO uint32_t CR3; /*!< USART Control register 3, Address offset: 0x08 */ + __IO uint32_t BRR; /*!< USART Baud rate register, Address offset: 0x0C */ + __IO uint32_t GTPR; /*!< USART Guard time and prescaler register, Address offset: 0x10 */ + __IO uint32_t RTOR; /*!< USART Receiver Time Out register, Address offset: 0x14 */ + __IO uint32_t RQR; /*!< USART Request register, Address offset: 0x18 */ + __IO uint32_t ISR; /*!< USART Interrupt and status register, Address offset: 0x1C */ + __IO uint32_t ICR; /*!< USART Interrupt flag Clear register, Address offset: 0x20 */ + __IO uint32_t RDR; /*!< USART Receive Data register, Address offset: 0x24 */ + __IO uint32_t TDR; /*!< USART Transmit Data register, Address offset: 0x28 */ + __IO uint32_t PRESC; /*!< USART clock Prescaler register, Address offset: 0x2C */ +} USART_TypeDef; + +/** + * @brief Single Wire Protocol Master Interface SPWMI + */ +typedef struct +{ + __IO uint32_t CR; /*!< SWPMI Configuration/Control register, Address offset: 0x00 */ + __IO uint32_t BRR; /*!< SWPMI bitrate register, Address offset: 0x04 */ + uint32_t RESERVED1; /*!< Reserved, 0x08 */ + __IO uint32_t ISR; /*!< SWPMI Interrupt and Status register, Address offset: 0x0C */ + __IO uint32_t ICR; /*!< SWPMI Interrupt Flag Clear register, Address offset: 0x10 */ + __IO uint32_t IER; /*!< SWPMI Interrupt Enable register, Address offset: 0x14 */ + __IO uint32_t RFL; /*!< SWPMI Receive Frame Length register, Address offset: 0x18 */ + __IO uint32_t TDR; /*!< SWPMI Transmit data register, Address offset: 0x1C */ + __IO uint32_t RDR; /*!< SWPMI Receive data register, Address offset: 0x20 */ + __IO uint32_t OR; /*!< SWPMI Option register, Address offset: 0x24 */ +} SWPMI_TypeDef; + +/** + * @brief Window WATCHDOG + */ + +typedef struct +{ + __IO uint32_t CR; /*!< WWDG Control register, Address offset: 0x00 */ + __IO uint32_t CFR; /*!< WWDG Configuration register, Address offset: 0x04 */ + __IO uint32_t SR; /*!< WWDG Status register, Address offset: 0x08 */ +} WWDG_TypeDef; + + +/** + * @brief RAM_ECC_Specific_Registers + */ +typedef struct +{ + __IO uint32_t CR; /*!< RAMECC monitor configuration register */ + __IO uint32_t SR; /*!< RAMECC monitor status register */ + __IO uint32_t FAR; /*!< RAMECC monitor failing address register */ + __IO uint32_t FDRL; /*!< RAMECC monitor failing data low register */ + __IO uint32_t FDRH; /*!< RAMECC monitor failing data high register */ + __IO uint32_t FECR; /*!< RAMECC monitor failing ECC error code register */ +} RAMECC_MonitorTypeDef; + +typedef struct +{ + __IO uint32_t IER; /*!< RAMECC interrupt enable register */ +} RAMECC_TypeDef; +/** + * @} + */ + + + +/** + * @brief RNG + */ + +typedef struct +{ + __IO uint32_t CR; /*!< RNG control register, Address offset: 0x00 */ + __IO uint32_t SR; /*!< RNG status register, Address offset: 0x04 */ + __IO uint32_t DR; /*!< RNG data register, Address offset: 0x08 */ + uint32_t RESERVED; + __IO uint32_t HTCR; /*!< RNG health test configuration register, Address offset: 0x10 */ +} RNG_TypeDef; + +/** + * @brief MDIOS + */ + +typedef struct +{ + __IO uint32_t CR; + __IO uint32_t WRFR; + __IO uint32_t CWRFR; + __IO uint32_t RDFR; + __IO uint32_t CRDFR; + __IO uint32_t SR; + __IO uint32_t CLRFR; + uint32_t RESERVED[57]; + __IO uint32_t DINR0; + __IO uint32_t DINR1; + __IO uint32_t DINR2; + __IO uint32_t DINR3; + __IO uint32_t DINR4; + __IO uint32_t DINR5; + __IO uint32_t DINR6; + __IO uint32_t DINR7; + __IO uint32_t DINR8; + __IO uint32_t DINR9; + __IO uint32_t DINR10; + __IO uint32_t DINR11; + __IO uint32_t DINR12; + __IO uint32_t DINR13; + __IO uint32_t DINR14; + __IO uint32_t DINR15; + __IO uint32_t DINR16; + __IO uint32_t DINR17; + __IO uint32_t DINR18; + __IO uint32_t DINR19; + __IO uint32_t DINR20; + __IO uint32_t DINR21; + __IO uint32_t DINR22; + __IO uint32_t DINR23; + __IO uint32_t DINR24; + __IO uint32_t DINR25; + __IO uint32_t DINR26; + __IO uint32_t DINR27; + __IO uint32_t DINR28; + __IO uint32_t DINR29; + __IO uint32_t DINR30; + __IO uint32_t DINR31; + __IO uint32_t DOUTR0; + __IO uint32_t DOUTR1; + __IO uint32_t DOUTR2; + __IO uint32_t DOUTR3; + __IO uint32_t DOUTR4; + __IO uint32_t DOUTR5; + __IO uint32_t DOUTR6; + __IO uint32_t DOUTR7; + __IO uint32_t DOUTR8; + __IO uint32_t DOUTR9; + __IO uint32_t DOUTR10; + __IO uint32_t DOUTR11; + __IO uint32_t DOUTR12; + __IO uint32_t DOUTR13; + __IO uint32_t DOUTR14; + __IO uint32_t DOUTR15; + __IO uint32_t DOUTR16; + __IO uint32_t DOUTR17; + __IO uint32_t DOUTR18; + __IO uint32_t DOUTR19; + __IO uint32_t DOUTR20; + __IO uint32_t DOUTR21; + __IO uint32_t DOUTR22; + __IO uint32_t DOUTR23; + __IO uint32_t DOUTR24; + __IO uint32_t DOUTR25; + __IO uint32_t DOUTR26; + __IO uint32_t DOUTR27; + __IO uint32_t DOUTR28; + __IO uint32_t DOUTR29; + __IO uint32_t DOUTR30; + __IO uint32_t DOUTR31; +} MDIOS_TypeDef; + + +/** + * @brief USB_OTG_Core_Registers + */ +typedef struct +{ + __IO uint32_t GOTGCTL; /*!< USB_OTG Control and Status Register 000h */ + __IO uint32_t GOTGINT; /*!< USB_OTG Interrupt Register 004h */ + __IO uint32_t GAHBCFG; /*!< Core AHB Configuration Register 008h */ + __IO uint32_t GUSBCFG; /*!< Core USB Configuration Register 00Ch */ + __IO uint32_t GRSTCTL; /*!< Core Reset Register 010h */ + __IO uint32_t GINTSTS; /*!< Core Interrupt Register 014h */ + __IO uint32_t GINTMSK; /*!< Core Interrupt Mask Register 018h */ + __IO uint32_t GRXSTSR; /*!< Receive Sts Q Read Register 01Ch */ + __IO uint32_t GRXSTSP; /*!< Receive Sts Q Read & POP Register 020h */ + __IO uint32_t GRXFSIZ; /*!< Receive FIFO Size Register 024h */ + __IO uint32_t DIEPTXF0_HNPTXFSIZ; /*!< EP0 / Non Periodic Tx FIFO Size Register 028h */ + __IO uint32_t HNPTXSTS; /*!< Non Periodic Tx FIFO/Queue Sts reg 02Ch */ + uint32_t Reserved30[2]; /*!< Reserved 030h */ + __IO uint32_t GCCFG; /*!< General Purpose IO Register 038h */ + __IO uint32_t CID; /*!< User ID Register 03Ch */ + __IO uint32_t GSNPSID; /* USB_OTG core ID 040h*/ + __IO uint32_t GHWCFG1; /* User HW config1 044h*/ + __IO uint32_t GHWCFG2; /* User HW config2 048h*/ + __IO uint32_t GHWCFG3; /*!< User HW config3 04Ch */ + uint32_t Reserved6; /*!< Reserved 050h */ + __IO uint32_t GLPMCFG; /*!< LPM Register 054h */ + __IO uint32_t GPWRDN; /*!< Power Down Register 058h */ + __IO uint32_t GDFIFOCFG; /*!< DFIFO Software Config Register 05Ch */ + __IO uint32_t GADPCTL; /*!< ADP Timer, Control and Status Register 60Ch */ + uint32_t Reserved43[39]; /*!< Reserved 058h-0FFh */ + __IO uint32_t HPTXFSIZ; /*!< Host Periodic Tx FIFO Size Reg 100h */ + __IO uint32_t DIEPTXF[0x0F]; /*!< dev Periodic Transmit FIFO */ +} USB_OTG_GlobalTypeDef; + + +/** + * @brief USB_OTG_device_Registers + */ +typedef struct +{ + __IO uint32_t DCFG; /*!< dev Configuration Register 800h */ + __IO uint32_t DCTL; /*!< dev Control Register 804h */ + __IO uint32_t DSTS; /*!< dev Status Register (RO) 808h */ + uint32_t Reserved0C; /*!< Reserved 80Ch */ + __IO uint32_t DIEPMSK; /*!< dev IN Endpoint Mask 810h */ + __IO uint32_t DOEPMSK; /*!< dev OUT Endpoint Mask 814h */ + __IO uint32_t DAINT; /*!< dev All Endpoints Itr Reg 818h */ + __IO uint32_t DAINTMSK; /*!< dev All Endpoints Itr Mask 81Ch */ + uint32_t Reserved20; /*!< Reserved 820h */ + uint32_t Reserved9; /*!< Reserved 824h */ + __IO uint32_t DVBUSDIS; /*!< dev VBUS discharge Register 828h */ + __IO uint32_t DVBUSPULSE; /*!< dev VBUS Pulse Register 82Ch */ + __IO uint32_t DTHRCTL; /*!< dev threshold 830h */ + __IO uint32_t DIEPEMPMSK; /*!< dev empty msk 834h */ + __IO uint32_t DEACHINT; /*!< dedicated EP interrupt 838h */ + __IO uint32_t DEACHMSK; /*!< dedicated EP msk 83Ch */ + uint32_t Reserved40; /*!< dedicated EP mask 840h */ + __IO uint32_t DINEP1MSK; /*!< dedicated EP mask 844h */ + uint32_t Reserved44[15]; /*!< Reserved 844-87Ch */ + __IO uint32_t DOUTEP1MSK; /*!< dedicated EP msk 884h */ +} USB_OTG_DeviceTypeDef; + + +/** + * @brief USB_OTG_IN_Endpoint-Specific_Register + */ +typedef struct +{ + __IO uint32_t DIEPCTL; /*!< dev IN Endpoint Control Reg 900h + (ep_num * 20h) + 00h */ + uint32_t Reserved04; /*!< Reserved 900h + (ep_num * 20h) + 04h */ + __IO uint32_t DIEPINT; /*!< dev IN Endpoint Itr Reg 900h + (ep_num * 20h) + 08h */ + uint32_t Reserved0C; /*!< Reserved 900h + (ep_num * 20h) + 0Ch */ + __IO uint32_t DIEPTSIZ; /*!< IN Endpoint Txfer Size 900h + (ep_num * 20h) + 10h */ + __IO uint32_t DIEPDMA; /*!< IN Endpoint DMA Address Reg 900h + (ep_num * 20h) + 14h */ + __IO uint32_t DTXFSTS; /*!< IN Endpoint Tx FIFO Status Reg 900h + (ep_num * 20h) + 18h */ + uint32_t Reserved18; /*!< Reserved 900h+(ep_num*20h)+1Ch-900h+ (ep_num * 20h) + 1Ch */ +} USB_OTG_INEndpointTypeDef; + + +/** + * @brief USB_OTG_OUT_Endpoint-Specific_Registers + */ +typedef struct +{ + __IO uint32_t DOEPCTL; /*!< dev OUT Endpoint Control Reg B00h + (ep_num * 20h) + 00h */ + uint32_t Reserved04; /*!< Reserved B00h + (ep_num * 20h) + 04h */ + __IO uint32_t DOEPINT; /*!< dev OUT Endpoint Itr Reg B00h + (ep_num * 20h) + 08h */ + uint32_t Reserved0C; /*!< Reserved B00h + (ep_num * 20h) + 0Ch */ + __IO uint32_t DOEPTSIZ; /*!< dev OUT Endpoint Txfer Size B00h + (ep_num * 20h) + 10h */ + __IO uint32_t DOEPDMA; /*!< dev OUT Endpoint DMA Address B00h + (ep_num * 20h) + 14h */ + uint32_t Reserved18[2]; /*!< Reserved B00h + (ep_num * 20h) + 18h - B00h + (ep_num * 20h) + 1Ch */ +} USB_OTG_OUTEndpointTypeDef; + + +/** + * @brief USB_OTG_Host_Mode_Register_Structures + */ +typedef struct +{ + __IO uint32_t HCFG; /*!< Host Configuration Register 400h */ + __IO uint32_t HFIR; /*!< Host Frame Interval Register 404h */ + __IO uint32_t HFNUM; /*!< Host Frame Nbr/Frame Remaining 408h */ + uint32_t Reserved40C; /*!< Reserved 40Ch */ + __IO uint32_t HPTXSTS; /*!< Host Periodic Tx FIFO/ Queue Status 410h */ + __IO uint32_t HAINT; /*!< Host All Channels Interrupt Register 414h */ + __IO uint32_t HAINTMSK; /*!< Host All Channels Interrupt Mask 418h */ +} USB_OTG_HostTypeDef; + +/** + * @brief USB_OTG_Host_Channel_Specific_Registers + */ +typedef struct +{ + __IO uint32_t HCCHAR; /*!< Host Channel Characteristics Register 500h */ + __IO uint32_t HCSPLT; /*!< Host Channel Split Control Register 504h */ + __IO uint32_t HCINT; /*!< Host Channel Interrupt Register 508h */ + __IO uint32_t HCINTMSK; /*!< Host Channel Interrupt Mask Register 50Ch */ + __IO uint32_t HCTSIZ; /*!< Host Channel Transfer Size Register 510h */ + __IO uint32_t HCDMA; /*!< Host Channel DMA Address Register 514h */ + uint32_t Reserved[2]; /*!< Reserved */ +} USB_OTG_HostChannelTypeDef; +/** + * @} + */ + +/** + * @brief OCTO Serial Peripheral Interface + */ + +typedef struct +{ + __IO uint32_t CR; /*!< OCTOSPI Control register, Address offset: 0x000 */ + uint32_t RESERVED; /*!< Reserved, Address offset: 0x004 */ + __IO uint32_t DCR1; /*!< OCTOSPI Device Configuration register 1, Address offset: 0x008 */ + __IO uint32_t DCR2; /*!< OCTOSPI Device Configuration register 2, Address offset: 0x00C */ + __IO uint32_t DCR3; /*!< OCTOSPI Device Configuration register 3, Address offset: 0x010 */ + __IO uint32_t DCR4; /*!< OCTOSPI Device Configuration register 4, Address offset: 0x014 */ + uint32_t RESERVED1[2]; /*!< Reserved, Address offset: 0x018-0x01C */ + __IO uint32_t SR; /*!< OCTOSPI Status register, Address offset: 0x020 */ + __IO uint32_t FCR; /*!< OCTOSPI Flag Clear register, Address offset: 0x024 */ + uint32_t RESERVED2[6]; /*!< Reserved, Address offset: 0x028-0x03C */ + __IO uint32_t DLR; /*!< OCTOSPI Data Length register, Address offset: 0x040 */ + uint32_t RESERVED3; /*!< Reserved, Address offset: 0x044 */ + __IO uint32_t AR; /*!< OCTOSPI Address register, Address offset: 0x048 */ + uint32_t RESERVED4; /*!< Reserved, Address offset: 0x04C */ + __IO uint32_t DR; /*!< OCTOSPI Data register, Address offset: 0x050 */ + uint32_t RESERVED5[11]; /*!< Reserved, Address offset: 0x054-0x07C */ + __IO uint32_t PSMKR; /*!< OCTOSPI Polling Status Mask register, Address offset: 0x080 */ + uint32_t RESERVED6; /*!< Reserved, Address offset: 0x084 */ + __IO uint32_t PSMAR; /*!< OCTOSPI Polling Status Match register, Address offset: 0x088 */ + uint32_t RESERVED7; /*!< Reserved, Address offset: 0x08C */ + __IO uint32_t PIR; /*!< OCTOSPI Polling Interval register, Address offset: 0x090 */ + uint32_t RESERVED8[27]; /*!< Reserved, Address offset: 0x094-0x0FC */ + __IO uint32_t CCR; /*!< OCTOSPI Communication Configuration register, Address offset: 0x100 */ + uint32_t RESERVED9; /*!< Reserved, Address offset: 0x104 */ + __IO uint32_t TCR; /*!< OCTOSPI Timing Configuration register, Address offset: 0x108 */ + uint32_t RESERVED10; /*!< Reserved, Address offset: 0x10C */ + __IO uint32_t IR; /*!< OCTOSPI Instruction register, Address offset: 0x110 */ + uint32_t RESERVED11[3]; /*!< Reserved, Address offset: 0x114-0x11C */ + __IO uint32_t ABR; /*!< OCTOSPI Alternate Bytes register, Address offset: 0x120 */ + uint32_t RESERVED12[3]; /*!< Reserved, Address offset: 0x124-0x12C */ + __IO uint32_t LPTR; /*!< OCTOSPI Low Power Timeout register, Address offset: 0x130 */ + uint32_t RESERVED13[3]; /*!< Reserved, Address offset: 0x134-0x13C */ + __IO uint32_t WPCCR; /*!< OCTOSPI Wrap Communication Configuration register, Address offset: 0x140 */ + uint32_t RESERVED14; /*!< Reserved, Address offset: 0x144 */ + __IO uint32_t WPTCR; /*!< OCTOSPI Wrap Timing Configuration register, Address offset: 0x148 */ + uint32_t RESERVED15; /*!< Reserved, Address offset: 0x14C */ + __IO uint32_t WPIR; /*!< OCTOSPI Wrap Instruction register, Address offset: 0x150 */ + uint32_t RESERVED16[3]; /*!< Reserved, Address offset: 0x154-0x15C */ + __IO uint32_t WPABR; /*!< OCTOSPI Wrap Alternate Bytes register, Address offset: 0x160 */ + uint32_t RESERVED17[7]; /*!< Reserved, Address offset: 0x164-0x17C */ + __IO uint32_t WCCR; /*!< OCTOSPI Write Communication Configuration register, Address offset: 0x180 */ + uint32_t RESERVED18; /*!< Reserved, Address offset: 0x184 */ + __IO uint32_t WTCR; /*!< OCTOSPI Write Timing Configuration register, Address offset: 0x188 */ + uint32_t RESERVED19; /*!< Reserved, Address offset: 0x18C */ + __IO uint32_t WIR; /*!< OCTOSPI Write Instruction register, Address offset: 0x190 */ + uint32_t RESERVED20[3]; /*!< Reserved, Address offset: 0x194-0x19C */ + __IO uint32_t WABR; /*!< OCTOSPI Write Alternate Bytes register, Address offset: 0x1A0 */ + uint32_t RESERVED21[23]; /*!< Reserved, Address offset: 0x1A4-0x1FC */ + __IO uint32_t HLCR; /*!< OCTOSPI Hyperbus Latency Configuration register, Address offset: 0x200 */ + uint32_t RESERVED22[122]; /*!< Reserved, Address offset: 0x204-0x3EC */ + __IO uint32_t HWCFGR; /*!< OCTOSPI HW Configuration register, Address offset: 0x3F0 */ + __IO uint32_t VER; /*!< OCTOSPI Version register, Address offset: 0x3F4 */ + __IO uint32_t ID; /*!< OCTOSPI Identification register, Address offset: 0x3F8 */ + __IO uint32_t MID; /*!< OCTOPSI HW Magic ID register, Address offset: 0x3FC */ +} OCTOSPI_TypeDef; + +/** + * @} + */ +/** + * @brief OCTO Serial Peripheral Interface IO Manager + */ + +typedef struct +{ + __IO uint32_t CR; /*!< OCTOSPI IO Manager Control register, Address offset: 0x00 */ + __IO uint32_t PCR[3]; /*!< OCTOSPI IO Manager Port[1:3] Configuration register, Address offset: 0x04-0x20 */ +} OCTOSPIM_TypeDef; + +/** + * @} + */ + +/** @addtogroup Peripheral_memory_map + * @{ + */ +#define D1_ITCMRAM_BASE (0x00000000UL) /*!< Base address of : 64KB RAM reserved for CPU execution/instruction accessible over ITCM */ +#define D1_ITCMICP_BASE (0x00100000UL) /*!< Base address of : (up to 128KB) embedded Test FLASH memory accessible over ITCM */ +#define D1_DTCMRAM_BASE (0x20000000UL) /*!< Base address of : 128KB system data RAM accessible over DTCM */ +#define D1_AXIFLASH_BASE (0x08000000UL) /*!< Base address of : (up to 1 MB) embedded FLASH memory accessible over AXI */ +#define D1_AXIICP_BASE (0x1FF00000UL) /*!< Base address of : (up to 128KB) embedded Test FLASH memory accessible over AXI */ +#define D1_AXISRAM1_BASE (0x24000000UL) /*!< Base address of : (up to 128KB) system data RAM1 accessible over over AXI */ +#define D1_AXISRAM2_BASE (0x24020000UL) /*!< Base address of : (up to 192KB) system data RAM2 accessible over over AXI to be shared with ITCM (64K granularity) */ +#define D1_AXISRAM_BASE D1_AXISRAM1_BASE /*!< Base address of : (up to 320KB) system data RAM1/2 accessible over over AXI */ + +#define D2_AHBSRAM1_BASE (0x30000000UL) /*!< Base address of : (up to 16KB) system data RAM accessible over over AXI->AHB Bridge */ +#define D2_AHBSRAM2_BASE (0x30004000UL) /*!< Base address of : (up to 16KB) system data RAM accessible over over AXI->AHB Bridge */ +#define D2_AHBSRAM_BASE D2_AHBSRAM1_BASE /*!< Base address of : (up to 32KB) system data RAM1/2 accessible over over AXI->AHB Bridge */ + +#define D3_BKPSRAM_BASE (0x38800000UL) /*!< Base address of : Backup SRAM(4 KB) over AXI->AHB Bridge */ +#define D3_SRAM_BASE (0x38000000UL) /*!< Base address of : Backup SRAM(16 KB) over AXI->AHB Bridge */ + +#define PERIPH_BASE (0x40000000UL) /*!< Base address of : AHB/APB Peripherals */ +#define OCTOSPI1_BASE (0x90000000UL) /*!< Base address of : OCTOSPI1 memories accessible over AXI */ +#define OCTOSPI2_BASE (0x70000000UL) /*!< Base address of : OCTOSPI2 memories accessible over AXI */ + +#define FLASH_BANK1_BASE (0x08000000UL) /*!< Base address of : (up to 1 MB) Flash Bank1 accessible over AXI */ +#define FLASH_END (0x080FFFFFUL) /*!< FLASH end address */ + + +/* Legacy define */ +#define FLASH_BASE FLASH_BANK1_BASE + +/*!< Device electronic signature memory map */ +#define UID_BASE (0x1FF1E800UL) /*!< Unique device ID register base address */ +#define FLASHSIZE_BASE (0x1FF1E880UL) /*!< FLASH Size register base address */ + + +/*!< Peripheral memory map */ +#define D2_APB1PERIPH_BASE PERIPH_BASE +#define D2_APB2PERIPH_BASE (PERIPH_BASE + 0x00010000UL) +#define D2_AHB1PERIPH_BASE (PERIPH_BASE + 0x00020000UL) +#define D2_AHB2PERIPH_BASE (PERIPH_BASE + 0x08020000UL) + +#define D1_APB1PERIPH_BASE (PERIPH_BASE + 0x10000000UL) +#define D1_AHB1PERIPH_BASE (PERIPH_BASE + 0x12000000UL) + +#define D3_APB1PERIPH_BASE (PERIPH_BASE + 0x18000000UL) +#define D3_AHB1PERIPH_BASE (PERIPH_BASE + 0x18020000UL) + +/*!< Legacy Peripheral memory map */ +#define APB1PERIPH_BASE PERIPH_BASE +#define APB2PERIPH_BASE (PERIPH_BASE + 0x00010000UL) +#define AHB1PERIPH_BASE (PERIPH_BASE + 0x00020000UL) +#define AHB2PERIPH_BASE (PERIPH_BASE + 0x08000000UL) + + +/*!< D1_AHB1PERIPH peripherals */ + +#define MDMA_BASE (D1_AHB1PERIPH_BASE + 0x0000UL) +#define DMA2D_BASE (D1_AHB1PERIPH_BASE + 0x1000UL) +#define FLASH_R_BASE (D1_AHB1PERIPH_BASE + 0x2000UL) +#define FMC_R_BASE (D1_AHB1PERIPH_BASE + 0x4000UL) +#define OCTOSPI1_R_BASE (D1_AHB1PERIPH_BASE + 0x5000UL) +#define DLYB_OCTOSPI1_BASE (D1_AHB1PERIPH_BASE + 0x6000UL) +#define SDMMC1_BASE (D1_AHB1PERIPH_BASE + 0x7000UL) +#define DLYB_SDMMC1_BASE (D1_AHB1PERIPH_BASE + 0x8000UL) +#define RAMECC1_BASE (D1_AHB1PERIPH_BASE + 0x9000UL) +#define OCTOSPI2_R_BASE (D1_AHB1PERIPH_BASE + 0xA000UL) +#define DLYB_OCTOSPI2_BASE (D1_AHB1PERIPH_BASE + 0xB000UL) +#define OCTOSPIM_BASE (D1_AHB1PERIPH_BASE + 0xB400UL) + +/*!< D2_AHB1PERIPH peripherals */ + +#define DMA1_BASE (D2_AHB1PERIPH_BASE + 0x0000UL) +#define DMA2_BASE (D2_AHB1PERIPH_BASE + 0x0400UL) +#define DMAMUX1_BASE (D2_AHB1PERIPH_BASE + 0x0800UL) +#define ADC1_BASE (D2_AHB1PERIPH_BASE + 0x2000UL) +#define ADC2_BASE (D2_AHB1PERIPH_BASE + 0x2100UL) +#define ADC12_COMMON_BASE (D2_AHB1PERIPH_BASE + 0x2300UL) +#define ETH_BASE (D2_AHB1PERIPH_BASE + 0x8000UL) +#define ETH_MAC_BASE (ETH_BASE) + +/*!< USB registers base address */ +#define USB1_OTG_HS_PERIPH_BASE (0x40040000UL) +#define USB_OTG_GLOBAL_BASE (0x000UL) +#define USB_OTG_DEVICE_BASE (0x800UL) +#define USB_OTG_IN_ENDPOINT_BASE (0x900UL) +#define USB_OTG_OUT_ENDPOINT_BASE (0xB00UL) +#define USB_OTG_EP_REG_SIZE (0x20UL) +#define USB_OTG_HOST_BASE (0x400UL) +#define USB_OTG_HOST_PORT_BASE (0x440UL) +#define USB_OTG_HOST_CHANNEL_BASE (0x500UL) +#define USB_OTG_HOST_CHANNEL_SIZE (0x20UL) +#define USB_OTG_PCGCCTL_BASE (0xE00UL) +#define USB_OTG_FIFO_BASE (0x1000UL) +#define USB_OTG_FIFO_SIZE (0x1000UL) + +/*!< D2_AHB2PERIPH peripherals */ + +#define DCMI_BASE (D2_AHB2PERIPH_BASE + 0x0000UL) +#define PSSI_BASE (D2_AHB2PERIPH_BASE + 0x0400UL) +#define RNG_BASE (D2_AHB2PERIPH_BASE + 0x1800UL) +#define SDMMC2_BASE (D2_AHB2PERIPH_BASE + 0x2400UL) +#define DLYB_SDMMC2_BASE (D2_AHB2PERIPH_BASE + 0x2800UL) +#define RAMECC2_BASE (D2_AHB2PERIPH_BASE + 0x3000UL) +#define FMAC_BASE (D2_AHB2PERIPH_BASE + 0x4000UL) +#define CORDIC_BASE (D2_AHB2PERIPH_BASE + 0x4400UL) + +/*!< D3_AHB1PERIPH peripherals */ +#define GPIOA_BASE (D3_AHB1PERIPH_BASE + 0x0000UL) +#define GPIOB_BASE (D3_AHB1PERIPH_BASE + 0x0400UL) +#define GPIOC_BASE (D3_AHB1PERIPH_BASE + 0x0800UL) +#define GPIOD_BASE (D3_AHB1PERIPH_BASE + 0x0C00UL) +#define GPIOE_BASE (D3_AHB1PERIPH_BASE + 0x1000UL) +#define GPIOF_BASE (D3_AHB1PERIPH_BASE + 0x1400UL) +#define GPIOG_BASE (D3_AHB1PERIPH_BASE + 0x1800UL) +#define GPIOH_BASE (D3_AHB1PERIPH_BASE + 0x1C00UL) +#define GPIOJ_BASE (D3_AHB1PERIPH_BASE + 0x2400UL) +#define GPIOK_BASE (D3_AHB1PERIPH_BASE + 0x2800UL) +#define RCC_BASE (D3_AHB1PERIPH_BASE + 0x4400UL) +#define PWR_BASE (D3_AHB1PERIPH_BASE + 0x4800UL) +#define CRC_BASE (D3_AHB1PERIPH_BASE + 0x4C00UL) +#define BDMA_BASE (D3_AHB1PERIPH_BASE + 0x5400UL) +#define DMAMUX2_BASE (D3_AHB1PERIPH_BASE + 0x5800UL) +#define ADC3_BASE (D3_AHB1PERIPH_BASE + 0x6000UL) +#define ADC3_COMMON_BASE (D3_AHB1PERIPH_BASE + 0x6300UL) +#define HSEM_BASE (D3_AHB1PERIPH_BASE + 0x6400UL) +#define RAMECC3_BASE (D3_AHB1PERIPH_BASE + 0x7000UL) + +/*!< D1_APB1PERIPH peripherals */ +#define LTDC_BASE (D1_APB1PERIPH_BASE + 0x1000UL) +#define LTDC_Layer1_BASE (LTDC_BASE + 0x84UL) +#define LTDC_Layer2_BASE (LTDC_BASE + 0x104UL) +#define WWDG1_BASE (D1_APB1PERIPH_BASE + 0x3000UL) + +/*!< D2_APB1PERIPH peripherals */ +#define TIM2_BASE (D2_APB1PERIPH_BASE + 0x0000UL) +#define TIM3_BASE (D2_APB1PERIPH_BASE + 0x0400UL) +#define TIM4_BASE (D2_APB1PERIPH_BASE + 0x0800UL) +#define TIM5_BASE (D2_APB1PERIPH_BASE + 0x0C00UL) +#define TIM6_BASE (D2_APB1PERIPH_BASE + 0x1000UL) +#define TIM7_BASE (D2_APB1PERIPH_BASE + 0x1400UL) +#define TIM12_BASE (D2_APB1PERIPH_BASE + 0x1800UL) +#define TIM13_BASE (D2_APB1PERIPH_BASE + 0x1C00UL) +#define TIM14_BASE (D2_APB1PERIPH_BASE + 0x2000UL) +#define LPTIM1_BASE (D2_APB1PERIPH_BASE + 0x2400UL) + + +#define SPI2_BASE (D2_APB1PERIPH_BASE + 0x3800UL) +#define SPI3_BASE (D2_APB1PERIPH_BASE + 0x3C00UL) +#define SPDIFRX_BASE (D2_APB1PERIPH_BASE + 0x4000UL) +#define USART2_BASE (D2_APB1PERIPH_BASE + 0x4400UL) +#define USART3_BASE (D2_APB1PERIPH_BASE + 0x4800UL) +#define UART4_BASE (D2_APB1PERIPH_BASE + 0x4C00UL) +#define UART5_BASE (D2_APB1PERIPH_BASE + 0x5000UL) +#define I2C1_BASE (D2_APB1PERIPH_BASE + 0x5400UL) +#define I2C2_BASE (D2_APB1PERIPH_BASE + 0x5800UL) +#define I2C3_BASE (D2_APB1PERIPH_BASE + 0x5C00UL) +#define I2C5_BASE (D2_APB1PERIPH_BASE + 0x6400UL) +#define CEC_BASE (D2_APB1PERIPH_BASE + 0x6C00UL) +#define DAC1_BASE (D2_APB1PERIPH_BASE + 0x7400UL) +#define UART7_BASE (D2_APB1PERIPH_BASE + 0x7800UL) +#define UART8_BASE (D2_APB1PERIPH_BASE + 0x7C00UL) +#define CRS_BASE (D2_APB1PERIPH_BASE + 0x8400UL) +#define SWPMI1_BASE (D2_APB1PERIPH_BASE + 0x8800UL) +#define OPAMP_BASE (D2_APB1PERIPH_BASE + 0x9000UL) +#define OPAMP1_BASE (D2_APB1PERIPH_BASE + 0x9000UL) +#define OPAMP2_BASE (D2_APB1PERIPH_BASE + 0x9010UL) +#define MDIOS_BASE (D2_APB1PERIPH_BASE + 0x9400UL) +#define FDCAN1_BASE (D2_APB1PERIPH_BASE + 0xA000UL) +#define FDCAN2_BASE (D2_APB1PERIPH_BASE + 0xA400UL) +#define FDCAN_CCU_BASE (D2_APB1PERIPH_BASE + 0xA800UL) +#define SRAMCAN_BASE (D2_APB1PERIPH_BASE + 0xAC00UL) +#define FDCAN3_BASE (D2_APB1PERIPH_BASE + 0xD400UL) +#define TIM23_BASE (D2_APB1PERIPH_BASE + 0xE000UL) +#define TIM24_BASE (D2_APB1PERIPH_BASE + 0xE400UL) + +/*!< D2_APB2PERIPH peripherals */ + +#define TIM1_BASE (D2_APB2PERIPH_BASE + 0x0000UL) +#define TIM8_BASE (D2_APB2PERIPH_BASE + 0x0400UL) +#define USART1_BASE (D2_APB2PERIPH_BASE + 0x1000UL) +#define USART6_BASE (D2_APB2PERIPH_BASE + 0x1400UL) +#define UART9_BASE (D2_APB2PERIPH_BASE + 0x1800UL) +#define USART10_BASE (D2_APB2PERIPH_BASE + 0x1C00UL) +#define SPI1_BASE (D2_APB2PERIPH_BASE + 0x3000UL) +#define SPI4_BASE (D2_APB2PERIPH_BASE + 0x3400UL) +#define TIM15_BASE (D2_APB2PERIPH_BASE + 0x4000UL) +#define TIM16_BASE (D2_APB2PERIPH_BASE + 0x4400UL) +#define TIM17_BASE (D2_APB2PERIPH_BASE + 0x4800UL) +#define SPI5_BASE (D2_APB2PERIPH_BASE + 0x5000UL) +#define SAI1_BASE (D2_APB2PERIPH_BASE + 0x5800UL) +#define SAI1_Block_A_BASE (SAI1_BASE + 0x004UL) +#define SAI1_Block_B_BASE (SAI1_BASE + 0x024UL) +#define DFSDM1_BASE (D2_APB2PERIPH_BASE + 0x7800UL) +#define DFSDM1_Channel0_BASE (DFSDM1_BASE + 0x00UL) +#define DFSDM1_Channel1_BASE (DFSDM1_BASE + 0x20UL) +#define DFSDM1_Channel2_BASE (DFSDM1_BASE + 0x40UL) +#define DFSDM1_Channel3_BASE (DFSDM1_BASE + 0x60UL) +#define DFSDM1_Channel4_BASE (DFSDM1_BASE + 0x80UL) +#define DFSDM1_Channel5_BASE (DFSDM1_BASE + 0xA0UL) +#define DFSDM1_Channel6_BASE (DFSDM1_BASE + 0xC0UL) +#define DFSDM1_Channel7_BASE (DFSDM1_BASE + 0xE0UL) +#define DFSDM1_Filter0_BASE (DFSDM1_BASE + 0x100UL) +#define DFSDM1_Filter1_BASE (DFSDM1_BASE + 0x180UL) +#define DFSDM1_Filter2_BASE (DFSDM1_BASE + 0x200UL) +#define DFSDM1_Filter3_BASE (DFSDM1_BASE + 0x280UL) + + +/*!< D3_APB1PERIPH peripherals */ +#define EXTI_BASE (D3_APB1PERIPH_BASE + 0x0000UL) +#define EXTI_D1_BASE (EXTI_BASE + 0x0080UL) +#define EXTI_D2_BASE (EXTI_BASE + 0x00C0UL) +#define SYSCFG_BASE (D3_APB1PERIPH_BASE + 0x0400UL) +#define LPUART1_BASE (D3_APB1PERIPH_BASE + 0x0C00UL) +#define SPI6_BASE (D3_APB1PERIPH_BASE + 0x1400UL) +#define I2C4_BASE (D3_APB1PERIPH_BASE + 0x1C00UL) +#define LPTIM2_BASE (D3_APB1PERIPH_BASE + 0x2400UL) +#define LPTIM3_BASE (D3_APB1PERIPH_BASE + 0x2800UL) +#define LPTIM4_BASE (D3_APB1PERIPH_BASE + 0x2C00UL) +#define LPTIM5_BASE (D3_APB1PERIPH_BASE + 0x3000UL) +#define COMP12_BASE (D3_APB1PERIPH_BASE + 0x3800UL) +#define COMP1_BASE (COMP12_BASE + 0x0CUL) +#define COMP2_BASE (COMP12_BASE + 0x10UL) +#define VREFBUF_BASE (D3_APB1PERIPH_BASE + 0x3C00UL) +#define RTC_BASE (D3_APB1PERIPH_BASE + 0x4000UL) +#define IWDG1_BASE (D3_APB1PERIPH_BASE + 0x4800UL) + + +#define SAI4_BASE (D3_APB1PERIPH_BASE + 0x5400UL) +#define SAI4_Block_A_BASE (SAI4_BASE + 0x004UL) +#define SAI4_Block_B_BASE (SAI4_BASE + 0x024UL) + +#define DTS_BASE (D3_APB1PERIPH_BASE + 0x6800UL) + + + +#define BDMA_Channel0_BASE (BDMA_BASE + 0x0008UL) +#define BDMA_Channel1_BASE (BDMA_BASE + 0x001CUL) +#define BDMA_Channel2_BASE (BDMA_BASE + 0x0030UL) +#define BDMA_Channel3_BASE (BDMA_BASE + 0x0044UL) +#define BDMA_Channel4_BASE (BDMA_BASE + 0x0058UL) +#define BDMA_Channel5_BASE (BDMA_BASE + 0x006CUL) +#define BDMA_Channel6_BASE (BDMA_BASE + 0x0080UL) +#define BDMA_Channel7_BASE (BDMA_BASE + 0x0094UL) + +#define DMAMUX2_Channel0_BASE (DMAMUX2_BASE) +#define DMAMUX2_Channel1_BASE (DMAMUX2_BASE + 0x0004UL) +#define DMAMUX2_Channel2_BASE (DMAMUX2_BASE + 0x0008UL) +#define DMAMUX2_Channel3_BASE (DMAMUX2_BASE + 0x000CUL) +#define DMAMUX2_Channel4_BASE (DMAMUX2_BASE + 0x0010UL) +#define DMAMUX2_Channel5_BASE (DMAMUX2_BASE + 0x0014UL) +#define DMAMUX2_Channel6_BASE (DMAMUX2_BASE + 0x0018UL) +#define DMAMUX2_Channel7_BASE (DMAMUX2_BASE + 0x001CUL) + +#define DMAMUX2_RequestGenerator0_BASE (DMAMUX2_BASE + 0x0100UL) +#define DMAMUX2_RequestGenerator1_BASE (DMAMUX2_BASE + 0x0104UL) +#define DMAMUX2_RequestGenerator2_BASE (DMAMUX2_BASE + 0x0108UL) +#define DMAMUX2_RequestGenerator3_BASE (DMAMUX2_BASE + 0x010CUL) +#define DMAMUX2_RequestGenerator4_BASE (DMAMUX2_BASE + 0x0110UL) +#define DMAMUX2_RequestGenerator5_BASE (DMAMUX2_BASE + 0x0114UL) +#define DMAMUX2_RequestGenerator6_BASE (DMAMUX2_BASE + 0x0118UL) +#define DMAMUX2_RequestGenerator7_BASE (DMAMUX2_BASE + 0x011CUL) + +#define DMAMUX2_ChannelStatus_BASE (DMAMUX2_BASE + 0x0080UL) +#define DMAMUX2_RequestGenStatus_BASE (DMAMUX2_BASE + 0x0140UL) + +#define DMA1_Stream0_BASE (DMA1_BASE + 0x010UL) +#define DMA1_Stream1_BASE (DMA1_BASE + 0x028UL) +#define DMA1_Stream2_BASE (DMA1_BASE + 0x040UL) +#define DMA1_Stream3_BASE (DMA1_BASE + 0x058UL) +#define DMA1_Stream4_BASE (DMA1_BASE + 0x070UL) +#define DMA1_Stream5_BASE (DMA1_BASE + 0x088UL) +#define DMA1_Stream6_BASE (DMA1_BASE + 0x0A0UL) +#define DMA1_Stream7_BASE (DMA1_BASE + 0x0B8UL) + +#define DMA2_Stream0_BASE (DMA2_BASE + 0x010UL) +#define DMA2_Stream1_BASE (DMA2_BASE + 0x028UL) +#define DMA2_Stream2_BASE (DMA2_BASE + 0x040UL) +#define DMA2_Stream3_BASE (DMA2_BASE + 0x058UL) +#define DMA2_Stream4_BASE (DMA2_BASE + 0x070UL) +#define DMA2_Stream5_BASE (DMA2_BASE + 0x088UL) +#define DMA2_Stream6_BASE (DMA2_BASE + 0x0A0UL) +#define DMA2_Stream7_BASE (DMA2_BASE + 0x0B8UL) + +#define DMAMUX1_Channel0_BASE (DMAMUX1_BASE) +#define DMAMUX1_Channel1_BASE (DMAMUX1_BASE + 0x0004UL) +#define DMAMUX1_Channel2_BASE (DMAMUX1_BASE + 0x0008UL) +#define DMAMUX1_Channel3_BASE (DMAMUX1_BASE + 0x000CUL) +#define DMAMUX1_Channel4_BASE (DMAMUX1_BASE + 0x0010UL) +#define DMAMUX1_Channel5_BASE (DMAMUX1_BASE + 0x0014UL) +#define DMAMUX1_Channel6_BASE (DMAMUX1_BASE + 0x0018UL) +#define DMAMUX1_Channel7_BASE (DMAMUX1_BASE + 0x001CUL) +#define DMAMUX1_Channel8_BASE (DMAMUX1_BASE + 0x0020UL) +#define DMAMUX1_Channel9_BASE (DMAMUX1_BASE + 0x0024UL) +#define DMAMUX1_Channel10_BASE (DMAMUX1_BASE + 0x0028UL) +#define DMAMUX1_Channel11_BASE (DMAMUX1_BASE + 0x002CUL) +#define DMAMUX1_Channel12_BASE (DMAMUX1_BASE + 0x0030UL) +#define DMAMUX1_Channel13_BASE (DMAMUX1_BASE + 0x0034UL) +#define DMAMUX1_Channel14_BASE (DMAMUX1_BASE + 0x0038UL) +#define DMAMUX1_Channel15_BASE (DMAMUX1_BASE + 0x003CUL) + +#define DMAMUX1_RequestGenerator0_BASE (DMAMUX1_BASE + 0x0100UL) +#define DMAMUX1_RequestGenerator1_BASE (DMAMUX1_BASE + 0x0104UL) +#define DMAMUX1_RequestGenerator2_BASE (DMAMUX1_BASE + 0x0108UL) +#define DMAMUX1_RequestGenerator3_BASE (DMAMUX1_BASE + 0x010CUL) +#define DMAMUX1_RequestGenerator4_BASE (DMAMUX1_BASE + 0x0110UL) +#define DMAMUX1_RequestGenerator5_BASE (DMAMUX1_BASE + 0x0114UL) +#define DMAMUX1_RequestGenerator6_BASE (DMAMUX1_BASE + 0x0118UL) +#define DMAMUX1_RequestGenerator7_BASE (DMAMUX1_BASE + 0x011CUL) + +#define DMAMUX1_ChannelStatus_BASE (DMAMUX1_BASE + 0x0080UL) +#define DMAMUX1_RequestGenStatus_BASE (DMAMUX1_BASE + 0x0140UL) + +/*!< FMC Banks registers base address */ +#define FMC_Bank1_R_BASE (FMC_R_BASE + 0x0000UL) +#define FMC_Bank1E_R_BASE (FMC_R_BASE + 0x0104UL) +#define FMC_Bank2_R_BASE (FMC_R_BASE + 0x0060UL) +#define FMC_Bank3_R_BASE (FMC_R_BASE + 0x0080UL) +#define FMC_Bank5_6_R_BASE (FMC_R_BASE + 0x0140UL) + +/* Debug MCU registers base address */ +#define DBGMCU_BASE (0x5C001000UL) + +#define MDMA_Channel0_BASE (MDMA_BASE + 0x00000040UL) +#define MDMA_Channel1_BASE (MDMA_BASE + 0x00000080UL) +#define MDMA_Channel2_BASE (MDMA_BASE + 0x000000C0UL) +#define MDMA_Channel3_BASE (MDMA_BASE + 0x00000100UL) +#define MDMA_Channel4_BASE (MDMA_BASE + 0x00000140UL) +#define MDMA_Channel5_BASE (MDMA_BASE + 0x00000180UL) +#define MDMA_Channel6_BASE (MDMA_BASE + 0x000001C0UL) +#define MDMA_Channel7_BASE (MDMA_BASE + 0x00000200UL) +#define MDMA_Channel8_BASE (MDMA_BASE + 0x00000240UL) +#define MDMA_Channel9_BASE (MDMA_BASE + 0x00000280UL) +#define MDMA_Channel10_BASE (MDMA_BASE + 0x000002C0UL) +#define MDMA_Channel11_BASE (MDMA_BASE + 0x00000300UL) +#define MDMA_Channel12_BASE (MDMA_BASE + 0x00000340UL) +#define MDMA_Channel13_BASE (MDMA_BASE + 0x00000380UL) +#define MDMA_Channel14_BASE (MDMA_BASE + 0x000003C0UL) +#define MDMA_Channel15_BASE (MDMA_BASE + 0x00000400UL) + +#define RAMECC1_Monitor1_BASE (RAMECC1_BASE + 0x20UL) +#define RAMECC1_Monitor2_BASE (RAMECC1_BASE + 0x40UL) +#define RAMECC1_Monitor3_BASE (RAMECC1_BASE + 0x60UL) +#define RAMECC1_Monitor4_BASE (RAMECC1_BASE + 0x80UL) +#define RAMECC1_Monitor5_BASE (RAMECC1_BASE + 0xA0UL) +#define RAMECC1_Monitor6_BASE (RAMECC1_BASE + 0xC0UL) + +#define RAMECC2_Monitor1_BASE (RAMECC2_BASE + 0x20UL) +#define RAMECC2_Monitor2_BASE (RAMECC2_BASE + 0x40UL) +#define RAMECC2_Monitor3_BASE (RAMECC2_BASE + 0x60UL) + +#define RAMECC3_Monitor1_BASE (RAMECC3_BASE + 0x20UL) +#define RAMECC3_Monitor2_BASE (RAMECC3_BASE + 0x40UL) + + +/** + * @} + */ + +/** @addtogroup Peripheral_declaration + * @{ + */ +#define TIM2 ((TIM_TypeDef *) TIM2_BASE) +#define TIM3 ((TIM_TypeDef *) TIM3_BASE) +#define TIM4 ((TIM_TypeDef *) TIM4_BASE) +#define TIM5 ((TIM_TypeDef *) TIM5_BASE) +#define TIM6 ((TIM_TypeDef *) TIM6_BASE) +#define TIM7 ((TIM_TypeDef *) TIM7_BASE) +#define TIM13 ((TIM_TypeDef *) TIM13_BASE) +#define TIM14 ((TIM_TypeDef *) TIM14_BASE) +#define VREFBUF ((VREFBUF_TypeDef *) VREFBUF_BASE) +#define RTC ((RTC_TypeDef *) RTC_BASE) +#define WWDG1 ((WWDG_TypeDef *) WWDG1_BASE) + + +#define IWDG1 ((IWDG_TypeDef *) IWDG1_BASE) +#define SPI2 ((SPI_TypeDef *) SPI2_BASE) +#define SPI3 ((SPI_TypeDef *) SPI3_BASE) +#define SPI4 ((SPI_TypeDef *) SPI4_BASE) +#define SPI5 ((SPI_TypeDef *) SPI5_BASE) +#define SPI6 ((SPI_TypeDef *) SPI6_BASE) +#define USART2 ((USART_TypeDef *) USART2_BASE) +#define USART3 ((USART_TypeDef *) USART3_BASE) +#define USART6 ((USART_TypeDef *) USART6_BASE) +#define USART10 ((USART_TypeDef *) USART10_BASE) +#define UART7 ((USART_TypeDef *) UART7_BASE) +#define UART8 ((USART_TypeDef *) UART8_BASE) +#define UART9 ((USART_TypeDef *) UART9_BASE) +#define CRS ((CRS_TypeDef *) CRS_BASE) +#define UART4 ((USART_TypeDef *) UART4_BASE) +#define UART5 ((USART_TypeDef *) UART5_BASE) +#define I2C1 ((I2C_TypeDef *) I2C1_BASE) +#define I2C2 ((I2C_TypeDef *) I2C2_BASE) +#define I2C3 ((I2C_TypeDef *) I2C3_BASE) +#define I2C4 ((I2C_TypeDef *) I2C4_BASE) +#define I2C5 ((I2C_TypeDef *) I2C5_BASE) +#define FDCAN1 ((FDCAN_GlobalTypeDef *) FDCAN1_BASE) +#define FDCAN2 ((FDCAN_GlobalTypeDef *) FDCAN2_BASE) +#define FDCAN_CCU ((FDCAN_ClockCalibrationUnit_TypeDef *) FDCAN_CCU_BASE) +#define FDCAN3 ((FDCAN_GlobalTypeDef *) FDCAN3_BASE) +#define TIM23 ((TIM_TypeDef *) TIM23_BASE) +#define TIM24 ((TIM_TypeDef *) TIM24_BASE) +#define CEC ((CEC_TypeDef *) CEC_BASE) +#define LPTIM1 ((LPTIM_TypeDef *) LPTIM1_BASE) +#define PWR ((PWR_TypeDef *) PWR_BASE) +#define DAC1 ((DAC_TypeDef *) DAC1_BASE) +#define LPUART1 ((USART_TypeDef *) LPUART1_BASE) +#define SWPMI1 ((SWPMI_TypeDef *) SWPMI1_BASE) +#define LPTIM2 ((LPTIM_TypeDef *) LPTIM2_BASE) +#define LPTIM3 ((LPTIM_TypeDef *) LPTIM3_BASE) +#define DTS ((DTS_TypeDef *) DTS_BASE) +#define LPTIM4 ((LPTIM_TypeDef *) LPTIM4_BASE) +#define LPTIM5 ((LPTIM_TypeDef *) LPTIM5_BASE) + +#define SYSCFG ((SYSCFG_TypeDef *) SYSCFG_BASE) +#define COMP12 ((COMPOPT_TypeDef *) COMP12_BASE) +#define COMP1 ((COMP_TypeDef *) COMP1_BASE) +#define COMP2 ((COMP_TypeDef *) COMP2_BASE) +#define COMP12_COMMON ((COMP_Common_TypeDef *) COMP2_BASE) +#define OPAMP ((OPAMP_TypeDef *) OPAMP_BASE) +#define OPAMP1 ((OPAMP_TypeDef *) OPAMP1_BASE) +#define OPAMP2 ((OPAMP_TypeDef *) OPAMP2_BASE) + + +#define EXTI ((EXTI_TypeDef *) EXTI_BASE) +#define EXTI_D1 ((EXTI_Core_TypeDef *) EXTI_D1_BASE) +#define EXTI_D2 ((EXTI_Core_TypeDef *) EXTI_D2_BASE) +#define TIM1 ((TIM_TypeDef *) TIM1_BASE) +#define SPI1 ((SPI_TypeDef *) SPI1_BASE) +#define TIM8 ((TIM_TypeDef *) TIM8_BASE) +#define USART1 ((USART_TypeDef *) USART1_BASE) +#define TIM12 ((TIM_TypeDef *) TIM12_BASE) +#define TIM15 ((TIM_TypeDef *) TIM15_BASE) +#define TIM16 ((TIM_TypeDef *) TIM16_BASE) +#define TIM17 ((TIM_TypeDef *) TIM17_BASE) +#define SAI1 ((SAI_TypeDef *) SAI1_BASE) +#define SAI1_Block_A ((SAI_Block_TypeDef *)SAI1_Block_A_BASE) +#define SAI1_Block_B ((SAI_Block_TypeDef *)SAI1_Block_B_BASE) +#define SAI4 ((SAI_TypeDef *) SAI4_BASE) +#define SAI4_Block_A ((SAI_Block_TypeDef *)SAI4_Block_A_BASE) +#define SAI4_Block_B ((SAI_Block_TypeDef *)SAI4_Block_B_BASE) + +#define SPDIFRX ((SPDIFRX_TypeDef *) SPDIFRX_BASE) +#define DFSDM1_Channel0 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel0_BASE) +#define DFSDM1_Channel1 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel1_BASE) +#define DFSDM1_Channel2 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel2_BASE) +#define DFSDM1_Channel3 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel3_BASE) +#define DFSDM1_Channel4 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel4_BASE) +#define DFSDM1_Channel5 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel5_BASE) +#define DFSDM1_Channel6 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel6_BASE) +#define DFSDM1_Channel7 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel7_BASE) +#define DFSDM1_Filter0 ((DFSDM_Filter_TypeDef *) DFSDM1_Filter0_BASE) +#define DFSDM1_Filter1 ((DFSDM_Filter_TypeDef *) DFSDM1_Filter1_BASE) +#define DFSDM1_Filter2 ((DFSDM_Filter_TypeDef *) DFSDM1_Filter2_BASE) +#define DFSDM1_Filter3 ((DFSDM_Filter_TypeDef *) DFSDM1_Filter3_BASE) +#define DMA2D ((DMA2D_TypeDef *) DMA2D_BASE) +#define DCMI ((DCMI_TypeDef *) DCMI_BASE) +#define PSSI ((PSSI_TypeDef *) PSSI_BASE) +#define RCC ((RCC_TypeDef *) RCC_BASE) +#define FLASH ((FLASH_TypeDef *) FLASH_R_BASE) +#define CRC ((CRC_TypeDef *) CRC_BASE) + +#define GPIOA ((GPIO_TypeDef *) GPIOA_BASE) +#define GPIOB ((GPIO_TypeDef *) GPIOB_BASE) +#define GPIOC ((GPIO_TypeDef *) GPIOC_BASE) +#define GPIOD ((GPIO_TypeDef *) GPIOD_BASE) +#define GPIOE ((GPIO_TypeDef *) GPIOE_BASE) +#define GPIOF ((GPIO_TypeDef *) GPIOF_BASE) +#define GPIOG ((GPIO_TypeDef *) GPIOG_BASE) +#define GPIOH ((GPIO_TypeDef *) GPIOH_BASE) +#define GPIOJ ((GPIO_TypeDef *) GPIOJ_BASE) +#define GPIOK ((GPIO_TypeDef *) GPIOK_BASE) + +#define ADC1 ((ADC_TypeDef *) ADC1_BASE) +#define ADC2 ((ADC_TypeDef *) ADC2_BASE) +#define ADC3 ((ADC_TypeDef *) ADC3_BASE) +#define ADC3_COMMON ((ADC_Common_TypeDef *) ADC3_COMMON_BASE) +#define ADC12_COMMON ((ADC_Common_TypeDef *) ADC12_COMMON_BASE) + +#define RNG ((RNG_TypeDef *) RNG_BASE) +#define SDMMC2 ((SDMMC_TypeDef *) SDMMC2_BASE) +#define DLYB_SDMMC2 ((DLYB_TypeDef *) DLYB_SDMMC2_BASE) +#define FMAC ((FMAC_TypeDef *) FMAC_BASE) +#define CORDIC ((CORDIC_TypeDef *) CORDIC_BASE) + +#define BDMA ((BDMA_TypeDef *) BDMA_BASE) +#define BDMA_Channel0 ((BDMA_Channel_TypeDef *) BDMA_Channel0_BASE) +#define BDMA_Channel1 ((BDMA_Channel_TypeDef *) BDMA_Channel1_BASE) +#define BDMA_Channel2 ((BDMA_Channel_TypeDef *) BDMA_Channel2_BASE) +#define BDMA_Channel3 ((BDMA_Channel_TypeDef *) BDMA_Channel3_BASE) +#define BDMA_Channel4 ((BDMA_Channel_TypeDef *) BDMA_Channel4_BASE) +#define BDMA_Channel5 ((BDMA_Channel_TypeDef *) BDMA_Channel5_BASE) +#define BDMA_Channel6 ((BDMA_Channel_TypeDef *) BDMA_Channel6_BASE) +#define BDMA_Channel7 ((BDMA_Channel_TypeDef *) BDMA_Channel7_BASE) + +#define RAMECC1 ((RAMECC_TypeDef *)RAMECC1_BASE) +#define RAMECC1_Monitor1 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor1_BASE) +#define RAMECC1_Monitor2 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor2_BASE) +#define RAMECC1_Monitor3 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor3_BASE) +#define RAMECC1_Monitor4 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor4_BASE) +#define RAMECC1_Monitor5 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor5_BASE) +#define RAMECC1_Monitor6 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor6_BASE) + +#define RAMECC2 ((RAMECC_TypeDef *)RAMECC2_BASE) +#define RAMECC2_Monitor1 ((RAMECC_MonitorTypeDef *)RAMECC2_Monitor1_BASE) +#define RAMECC2_Monitor2 ((RAMECC_MonitorTypeDef *)RAMECC2_Monitor2_BASE) +#define RAMECC2_Monitor3 ((RAMECC_MonitorTypeDef *)RAMECC2_Monitor3_BASE) + +#define RAMECC3 ((RAMECC_TypeDef *)RAMECC3_BASE) +#define RAMECC3_Monitor1 ((RAMECC_MonitorTypeDef *)RAMECC3_Monitor1_BASE) +#define RAMECC3_Monitor2 ((RAMECC_MonitorTypeDef *)RAMECC3_Monitor2_BASE) + +#define DMAMUX2 ((DMAMUX_Channel_TypeDef *) DMAMUX2_BASE) +#define DMAMUX2_Channel0 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel0_BASE) +#define DMAMUX2_Channel1 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel1_BASE) +#define DMAMUX2_Channel2 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel2_BASE) +#define DMAMUX2_Channel3 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel3_BASE) +#define DMAMUX2_Channel4 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel4_BASE) +#define DMAMUX2_Channel5 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel5_BASE) +#define DMAMUX2_Channel6 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel6_BASE) +#define DMAMUX2_Channel7 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel7_BASE) + + +#define DMAMUX2_RequestGenerator0 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator0_BASE) +#define DMAMUX2_RequestGenerator1 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator1_BASE) +#define DMAMUX2_RequestGenerator2 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator2_BASE) +#define DMAMUX2_RequestGenerator3 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator3_BASE) +#define DMAMUX2_RequestGenerator4 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator4_BASE) +#define DMAMUX2_RequestGenerator5 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator5_BASE) +#define DMAMUX2_RequestGenerator6 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator6_BASE) +#define DMAMUX2_RequestGenerator7 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator7_BASE) + +#define DMAMUX2_ChannelStatus ((DMAMUX_ChannelStatus_TypeDef *) DMAMUX2_ChannelStatus_BASE) +#define DMAMUX2_RequestGenStatus ((DMAMUX_RequestGenStatus_TypeDef *) DMAMUX2_RequestGenStatus_BASE) + +#define DMA2 ((DMA_TypeDef *) DMA2_BASE) +#define DMA2_Stream0 ((DMA_Stream_TypeDef *) DMA2_Stream0_BASE) +#define DMA2_Stream1 ((DMA_Stream_TypeDef *) DMA2_Stream1_BASE) +#define DMA2_Stream2 ((DMA_Stream_TypeDef *) DMA2_Stream2_BASE) +#define DMA2_Stream3 ((DMA_Stream_TypeDef *) DMA2_Stream3_BASE) +#define DMA2_Stream4 ((DMA_Stream_TypeDef *) DMA2_Stream4_BASE) +#define DMA2_Stream5 ((DMA_Stream_TypeDef *) DMA2_Stream5_BASE) +#define DMA2_Stream6 ((DMA_Stream_TypeDef *) DMA2_Stream6_BASE) +#define DMA2_Stream7 ((DMA_Stream_TypeDef *) DMA2_Stream7_BASE) + +#define DMA1 ((DMA_TypeDef *) DMA1_BASE) +#define DMA1_Stream0 ((DMA_Stream_TypeDef *) DMA1_Stream0_BASE) +#define DMA1_Stream1 ((DMA_Stream_TypeDef *) DMA1_Stream1_BASE) +#define DMA1_Stream2 ((DMA_Stream_TypeDef *) DMA1_Stream2_BASE) +#define DMA1_Stream3 ((DMA_Stream_TypeDef *) DMA1_Stream3_BASE) +#define DMA1_Stream4 ((DMA_Stream_TypeDef *) DMA1_Stream4_BASE) +#define DMA1_Stream5 ((DMA_Stream_TypeDef *) DMA1_Stream5_BASE) +#define DMA1_Stream6 ((DMA_Stream_TypeDef *) DMA1_Stream6_BASE) +#define DMA1_Stream7 ((DMA_Stream_TypeDef *) DMA1_Stream7_BASE) + + +#define DMAMUX1 ((DMAMUX_Channel_TypeDef *) DMAMUX1_BASE) +#define DMAMUX1_Channel0 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel0_BASE) +#define DMAMUX1_Channel1 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel1_BASE) +#define DMAMUX1_Channel2 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel2_BASE) +#define DMAMUX1_Channel3 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel3_BASE) +#define DMAMUX1_Channel4 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel4_BASE) +#define DMAMUX1_Channel5 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel5_BASE) +#define DMAMUX1_Channel6 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel6_BASE) +#define DMAMUX1_Channel7 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel7_BASE) +#define DMAMUX1_Channel8 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel8_BASE) +#define DMAMUX1_Channel9 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel9_BASE) +#define DMAMUX1_Channel10 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel10_BASE) +#define DMAMUX1_Channel11 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel11_BASE) +#define DMAMUX1_Channel12 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel12_BASE) +#define DMAMUX1_Channel13 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel13_BASE) +#define DMAMUX1_Channel14 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel14_BASE) +#define DMAMUX1_Channel15 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel15_BASE) + +#define DMAMUX1_RequestGenerator0 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator0_BASE) +#define DMAMUX1_RequestGenerator1 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator1_BASE) +#define DMAMUX1_RequestGenerator2 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator2_BASE) +#define DMAMUX1_RequestGenerator3 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator3_BASE) +#define DMAMUX1_RequestGenerator4 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator4_BASE) +#define DMAMUX1_RequestGenerator5 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator5_BASE) +#define DMAMUX1_RequestGenerator6 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator6_BASE) +#define DMAMUX1_RequestGenerator7 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator7_BASE) + +#define DMAMUX1_ChannelStatus ((DMAMUX_ChannelStatus_TypeDef *) DMAMUX1_ChannelStatus_BASE) +#define DMAMUX1_RequestGenStatus ((DMAMUX_RequestGenStatus_TypeDef *) DMAMUX1_RequestGenStatus_BASE) + + +#define FMC_Bank1_R ((FMC_Bank1_TypeDef *) FMC_Bank1_R_BASE) +#define FMC_Bank1E_R ((FMC_Bank1E_TypeDef *) FMC_Bank1E_R_BASE) +#define FMC_Bank2_R ((FMC_Bank2_TypeDef *) FMC_Bank2_R_BASE) +#define FMC_Bank3_R ((FMC_Bank3_TypeDef *) FMC_Bank3_R_BASE) +#define FMC_Bank5_6_R ((FMC_Bank5_6_TypeDef *) FMC_Bank5_6_R_BASE) + +#define OCTOSPI1 ((OCTOSPI_TypeDef *) OCTOSPI1_R_BASE) +#define DLYB_OCTOSPI1 ((DLYB_TypeDef *) DLYB_OCTOSPI1_BASE) +#define OCTOSPI2 ((OCTOSPI_TypeDef *) OCTOSPI2_R_BASE) +#define DLYB_OCTOSPI2 ((DLYB_TypeDef *) DLYB_OCTOSPI2_BASE) +#define OCTOSPIM ((OCTOSPIM_TypeDef *) OCTOSPIM_BASE) + +#define SDMMC1 ((SDMMC_TypeDef *) SDMMC1_BASE) +#define DLYB_SDMMC1 ((DLYB_TypeDef *) DLYB_SDMMC1_BASE) + +#define DBGMCU ((DBGMCU_TypeDef *) DBGMCU_BASE) + +#define HSEM ((HSEM_TypeDef *) HSEM_BASE) +#define HSEM_COMMON ((HSEM_Common_TypeDef *) (HSEM_BASE + 0x100UL)) + +#define LTDC ((LTDC_TypeDef *)LTDC_BASE) +#define LTDC_Layer1 ((LTDC_Layer_TypeDef *)LTDC_Layer1_BASE) +#define LTDC_Layer2 ((LTDC_Layer_TypeDef *)LTDC_Layer2_BASE) + +#define MDIOS ((MDIOS_TypeDef *) MDIOS_BASE) + +#define ETH ((ETH_TypeDef *)ETH_BASE) +#define MDMA ((MDMA_TypeDef *)MDMA_BASE) +#define MDMA_Channel0 ((MDMA_Channel_TypeDef *)MDMA_Channel0_BASE) +#define MDMA_Channel1 ((MDMA_Channel_TypeDef *)MDMA_Channel1_BASE) +#define MDMA_Channel2 ((MDMA_Channel_TypeDef *)MDMA_Channel2_BASE) +#define MDMA_Channel3 ((MDMA_Channel_TypeDef *)MDMA_Channel3_BASE) +#define MDMA_Channel4 ((MDMA_Channel_TypeDef *)MDMA_Channel4_BASE) +#define MDMA_Channel5 ((MDMA_Channel_TypeDef *)MDMA_Channel5_BASE) +#define MDMA_Channel6 ((MDMA_Channel_TypeDef *)MDMA_Channel6_BASE) +#define MDMA_Channel7 ((MDMA_Channel_TypeDef *)MDMA_Channel7_BASE) +#define MDMA_Channel8 ((MDMA_Channel_TypeDef *)MDMA_Channel8_BASE) +#define MDMA_Channel9 ((MDMA_Channel_TypeDef *)MDMA_Channel9_BASE) +#define MDMA_Channel10 ((MDMA_Channel_TypeDef *)MDMA_Channel10_BASE) +#define MDMA_Channel11 ((MDMA_Channel_TypeDef *)MDMA_Channel11_BASE) +#define MDMA_Channel12 ((MDMA_Channel_TypeDef *)MDMA_Channel12_BASE) +#define MDMA_Channel13 ((MDMA_Channel_TypeDef *)MDMA_Channel13_BASE) +#define MDMA_Channel14 ((MDMA_Channel_TypeDef *)MDMA_Channel14_BASE) +#define MDMA_Channel15 ((MDMA_Channel_TypeDef *)MDMA_Channel15_BASE) + + +#define USB1_OTG_HS ((USB_OTG_GlobalTypeDef *) USB1_OTG_HS_PERIPH_BASE) + +/* Legacy defines */ +#define USB_OTG_HS USB1_OTG_HS +#define USB_OTG_HS_PERIPH_BASE USB1_OTG_HS_PERIPH_BASE + +/** + * @} + */ + +/** @addtogroup Exported_constants + * @{ + */ + + /** @addtogroup Peripheral_Registers_Bits_Definition + * @{ + */ + +/******************************************************************************/ +/* Peripheral Registers_Bits_Definition */ +/******************************************************************************/ + +/******************************************************************************/ +/* */ +/* Analog to Digital Converter */ +/* */ +/******************************************************************************/ +/******************************* ADC VERSION ********************************/ +#define ADC_VER_V5_V90 +/******************** Bit definition for ADC_ISR register ********************/ +#define ADC_ISR_ADRDY_Pos (0U) +#define ADC_ISR_ADRDY_Msk (0x1UL << ADC_ISR_ADRDY_Pos) /*!< 0x00000001 */ +#define ADC_ISR_ADRDY ADC_ISR_ADRDY_Msk /*!< ADC Ready (ADRDY) flag */ +#define ADC_ISR_EOSMP_Pos (1U) +#define ADC_ISR_EOSMP_Msk (0x1UL << ADC_ISR_EOSMP_Pos) /*!< 0x00000002 */ +#define ADC_ISR_EOSMP ADC_ISR_EOSMP_Msk /*!< ADC End of Sampling flag */ +#define ADC_ISR_EOC_Pos (2U) +#define ADC_ISR_EOC_Msk (0x1UL << ADC_ISR_EOC_Pos) /*!< 0x00000004 */ +#define ADC_ISR_EOC ADC_ISR_EOC_Msk /*!< ADC End of Regular Conversion flag */ +#define ADC_ISR_EOS_Pos (3U) +#define ADC_ISR_EOS_Msk (0x1UL << ADC_ISR_EOS_Pos) /*!< 0x00000008 */ +#define ADC_ISR_EOS ADC_ISR_EOS_Msk /*!< ADC End of Regular sequence of Conversions flag */ +#define ADC_ISR_OVR_Pos (4U) +#define ADC_ISR_OVR_Msk (0x1UL << ADC_ISR_OVR_Pos) /*!< 0x00000010 */ +#define ADC_ISR_OVR ADC_ISR_OVR_Msk /*!< ADC overrun flag */ +#define ADC_ISR_JEOC_Pos (5U) +#define ADC_ISR_JEOC_Msk (0x1UL << ADC_ISR_JEOC_Pos) /*!< 0x00000020 */ +#define ADC_ISR_JEOC ADC_ISR_JEOC_Msk /*!< ADC End of Injected Conversion flag */ +#define ADC_ISR_JEOS_Pos (6U) +#define ADC_ISR_JEOS_Msk (0x1UL << ADC_ISR_JEOS_Pos) /*!< 0x00000040 */ +#define ADC_ISR_JEOS ADC_ISR_JEOS_Msk /*!< ADC End of Injected sequence of Conversions flag */ +#define ADC_ISR_AWD1_Pos (7U) +#define ADC_ISR_AWD1_Msk (0x1UL << ADC_ISR_AWD1_Pos) /*!< 0x00000080 */ +#define ADC_ISR_AWD1 ADC_ISR_AWD1_Msk /*!< ADC Analog watchdog 1 flag */ +#define ADC_ISR_AWD2_Pos (8U) +#define ADC_ISR_AWD2_Msk (0x1UL << ADC_ISR_AWD2_Pos) /*!< 0x00000100 */ +#define ADC_ISR_AWD2 ADC_ISR_AWD2_Msk /*!< ADC Analog watchdog 2 flag */ +#define ADC_ISR_AWD3_Pos (9U) +#define ADC_ISR_AWD3_Msk (0x1UL << ADC_ISR_AWD3_Pos) /*!< 0x00000200 */ +#define ADC_ISR_AWD3 ADC_ISR_AWD3_Msk /*!< ADC Analog watchdog 3 flag */ +#define ADC_ISR_JQOVF_Pos (10U) +#define ADC_ISR_JQOVF_Msk (0x1UL << ADC_ISR_JQOVF_Pos) /*!< 0x00000400 */ +#define ADC_ISR_JQOVF ADC_ISR_JQOVF_Msk /*!< ADC Injected Context Queue Overflow flag */ + +/******************** Bit definition for ADC_IER register ********************/ +#define ADC_IER_ADRDYIE_Pos (0U) +#define ADC_IER_ADRDYIE_Msk (0x1UL << ADC_IER_ADRDYIE_Pos) /*!< 0x00000001 */ +#define ADC_IER_ADRDYIE ADC_IER_ADRDYIE_Msk /*!< ADC Ready (ADRDY) interrupt source */ +#define ADC_IER_EOSMPIE_Pos (1U) +#define ADC_IER_EOSMPIE_Msk (0x1UL << ADC_IER_EOSMPIE_Pos) /*!< 0x00000002 */ +#define ADC_IER_EOSMPIE ADC_IER_EOSMPIE_Msk /*!< ADC End of Sampling interrupt source */ +#define ADC_IER_EOCIE_Pos (2U) +#define ADC_IER_EOCIE_Msk (0x1UL << ADC_IER_EOCIE_Pos) /*!< 0x00000004 */ +#define ADC_IER_EOCIE ADC_IER_EOCIE_Msk /*!< ADC End of Regular Conversion interrupt source */ +#define ADC_IER_EOSIE_Pos (3U) +#define ADC_IER_EOSIE_Msk (0x1UL << ADC_IER_EOSIE_Pos) /*!< 0x00000008 */ +#define ADC_IER_EOSIE ADC_IER_EOSIE_Msk /*!< ADC End of Regular sequence of Conversions interrupt source */ +#define ADC_IER_OVRIE_Pos (4U) +#define ADC_IER_OVRIE_Msk (0x1UL << ADC_IER_OVRIE_Pos) /*!< 0x00000010 */ +#define ADC_IER_OVRIE ADC_IER_OVRIE_Msk /*!< ADC overrun interrupt source */ +#define ADC_IER_JEOCIE_Pos (5U) +#define ADC_IER_JEOCIE_Msk (0x1UL << ADC_IER_JEOCIE_Pos) /*!< 0x00000020 */ +#define ADC_IER_JEOCIE ADC_IER_JEOCIE_Msk /*!< ADC End of Injected Conversion interrupt source */ +#define ADC_IER_JEOSIE_Pos (6U) +#define ADC_IER_JEOSIE_Msk (0x1UL << ADC_IER_JEOSIE_Pos) /*!< 0x00000040 */ +#define ADC_IER_JEOSIE ADC_IER_JEOSIE_Msk /*!< ADC End of Injected sequence of Conversions interrupt source */ +#define ADC_IER_AWD1IE_Pos (7U) +#define ADC_IER_AWD1IE_Msk (0x1UL << ADC_IER_AWD1IE_Pos) /*!< 0x00000080 */ +#define ADC_IER_AWD1IE ADC_IER_AWD1IE_Msk /*!< ADC Analog watchdog 1 interrupt source */ +#define ADC_IER_AWD2IE_Pos (8U) +#define ADC_IER_AWD2IE_Msk (0x1UL << ADC_IER_AWD2IE_Pos) /*!< 0x00000100 */ +#define ADC_IER_AWD2IE ADC_IER_AWD2IE_Msk /*!< ADC Analog watchdog 2 interrupt source */ +#define ADC_IER_AWD3IE_Pos (9U) +#define ADC_IER_AWD3IE_Msk (0x1UL << ADC_IER_AWD3IE_Pos) /*!< 0x00000200 */ +#define ADC_IER_AWD3IE ADC_IER_AWD3IE_Msk /*!< ADC Analog watchdog 3 interrupt source */ +#define ADC_IER_JQOVFIE_Pos (10U) +#define ADC_IER_JQOVFIE_Msk (0x1UL << ADC_IER_JQOVFIE_Pos) /*!< 0x00000400 */ +#define ADC_IER_JQOVFIE ADC_IER_JQOVFIE_Msk /*!< ADC Injected Context Queue Overflow interrupt source */ + +/******************** Bit definition for ADC_CR register ********************/ +#define ADC_CR_ADEN_Pos (0U) +#define ADC_CR_ADEN_Msk (0x1UL << ADC_CR_ADEN_Pos) /*!< 0x00000001 */ +#define ADC_CR_ADEN ADC_CR_ADEN_Msk /*!< ADC Enable control */ +#define ADC_CR_ADDIS_Pos (1U) +#define ADC_CR_ADDIS_Msk (0x1UL << ADC_CR_ADDIS_Pos) /*!< 0x00000002 */ +#define ADC_CR_ADDIS ADC_CR_ADDIS_Msk /*!< ADC Disable command */ +#define ADC_CR_ADSTART_Pos (2U) +#define ADC_CR_ADSTART_Msk (0x1UL << ADC_CR_ADSTART_Pos) /*!< 0x00000004 */ +#define ADC_CR_ADSTART ADC_CR_ADSTART_Msk /*!< ADC Start of Regular conversion */ +#define ADC_CR_JADSTART_Pos (3U) +#define ADC_CR_JADSTART_Msk (0x1UL << ADC_CR_JADSTART_Pos) /*!< 0x00000008 */ +#define ADC_CR_JADSTART ADC_CR_JADSTART_Msk /*!< ADC Start of injected conversion */ +#define ADC_CR_ADSTP_Pos (4U) +#define ADC_CR_ADSTP_Msk (0x1UL << ADC_CR_ADSTP_Pos) /*!< 0x00000010 */ +#define ADC_CR_ADSTP ADC_CR_ADSTP_Msk /*!< ADC Stop of Regular conversion */ +#define ADC_CR_JADSTP_Pos (5U) +#define ADC_CR_JADSTP_Msk (0x1UL << ADC_CR_JADSTP_Pos) /*!< 0x00000020 */ +#define ADC_CR_JADSTP ADC_CR_JADSTP_Msk /*!< ADC Stop of injected conversion */ +#define ADC_CR_BOOST_Pos (8U) +#define ADC_CR_BOOST_Msk (0x3UL << ADC_CR_BOOST_Pos) /*!< 0x00000300 */ +#define ADC_CR_BOOST ADC_CR_BOOST_Msk /*!< ADC Boost Mode configuration */ +#define ADC_CR_BOOST_0 (0x1UL << ADC_CR_BOOST_Pos) /*!< 0x00000100 */ +#define ADC_CR_BOOST_1 (0x2UL << ADC_CR_BOOST_Pos) /*!< 0x00000200 */ +#define ADC_CR_ADCALLIN_Pos (16U) +#define ADC_CR_ADCALLIN_Msk (0x1UL << ADC_CR_ADCALLIN_Pos) /*!< 0x00010000 */ +#define ADC_CR_ADCALLIN ADC_CR_ADCALLIN_Msk /*!< ADC Linearity calibration */ +#define ADC_CR_LINCALRDYW1_Pos (22U) +#define ADC_CR_LINCALRDYW1_Msk (0x1UL << ADC_CR_LINCALRDYW1_Pos) /*!< 0x00400000 */ +#define ADC_CR_LINCALRDYW1 ADC_CR_LINCALRDYW1_Msk /*!< ADC Linearity calibration ready Word 1 */ +#define ADC_CR_LINCALRDYW2_Pos (23U) +#define ADC_CR_LINCALRDYW2_Msk (0x1UL << ADC_CR_LINCALRDYW2_Pos) /*!< 0x00800000 */ +#define ADC_CR_LINCALRDYW2 ADC_CR_LINCALRDYW2_Msk /*!< ADC Linearity calibration ready Word 2 */ +#define ADC_CR_LINCALRDYW3_Pos (24U) +#define ADC_CR_LINCALRDYW3_Msk (0x1UL << ADC_CR_LINCALRDYW3_Pos) /*!< 0x01000000 */ +#define ADC_CR_LINCALRDYW3 ADC_CR_LINCALRDYW3_Msk /*!< ADC Linearity calibration ready Word 3 */ +#define ADC_CR_LINCALRDYW4_Pos (25U) +#define ADC_CR_LINCALRDYW4_Msk (0x1UL << ADC_CR_LINCALRDYW4_Pos) /*!< 0x02000000 */ +#define ADC_CR_LINCALRDYW4 ADC_CR_LINCALRDYW4_Msk /*!< ADC Linearity calibration ready Word 4 */ +#define ADC_CR_LINCALRDYW5_Pos (26U) +#define ADC_CR_LINCALRDYW5_Msk (0x1UL << ADC_CR_LINCALRDYW5_Pos) /*!< 0x04000000 */ +#define ADC_CR_LINCALRDYW5 ADC_CR_LINCALRDYW5_Msk /*!< ADC Linearity calibration ready Word 5 */ +#define ADC_CR_LINCALRDYW6_Pos (27U) +#define ADC_CR_LINCALRDYW6_Msk (0x1UL << ADC_CR_LINCALRDYW6_Pos) /*!< 0x08000000 */ +#define ADC_CR_LINCALRDYW6 ADC_CR_LINCALRDYW6_Msk /*!< ADC Linearity calibration ready Word 6 */ +#define ADC_CR_ADVREGEN_Pos (28U) +#define ADC_CR_ADVREGEN_Msk (0x1UL << ADC_CR_ADVREGEN_Pos) /*!< 0x10000000 */ +#define ADC_CR_ADVREGEN ADC_CR_ADVREGEN_Msk /*!< ADC Voltage regulator Enable */ +#define ADC_CR_DEEPPWD_Pos (29U) +#define ADC_CR_DEEPPWD_Msk (0x1UL << ADC_CR_DEEPPWD_Pos) /*!< 0x20000000 */ +#define ADC_CR_DEEPPWD ADC_CR_DEEPPWD_Msk /*!< ADC Deep power down Enable */ +#define ADC_CR_ADCALDIF_Pos (30U) +#define ADC_CR_ADCALDIF_Msk (0x1UL << ADC_CR_ADCALDIF_Pos) /*!< 0x40000000 */ +#define ADC_CR_ADCALDIF ADC_CR_ADCALDIF_Msk /*!< ADC Differential Mode for calibration */ +#define ADC_CR_ADCAL_Pos (31U) +#define ADC_CR_ADCAL_Msk (0x1UL << ADC_CR_ADCAL_Pos) /*!< 0x80000000 */ +#define ADC_CR_ADCAL ADC_CR_ADCAL_Msk /*!< ADC Calibration */ + +/******************** Bit definition for ADC_CFGR register ********************/ +#define ADC_CFGR_DMNGT_Pos (0U) +#define ADC_CFGR_DMNGT_Msk (0x3UL << ADC_CFGR_DMNGT_Pos) /*!< 0x00000003 */ +#define ADC_CFGR_DMNGT ADC_CFGR_DMNGT_Msk /*!< ADC Data Management configuration */ +#define ADC_CFGR_DMNGT_0 (0x1UL << ADC_CFGR_DMNGT_Pos) /*!< 0x00000001 */ +#define ADC_CFGR_DMNGT_1 (0x2UL << ADC_CFGR_DMNGT_Pos) /*!< 0x00000002 */ + +#define ADC_CFGR_RES_Pos (2U) +#define ADC_CFGR_RES_Msk (0x7UL << ADC_CFGR_RES_Pos) /*!< 0x0000001C */ +#define ADC_CFGR_RES ADC_CFGR_RES_Msk /*!< ADC Data resolution */ +#define ADC_CFGR_RES_0 (0x1UL << ADC_CFGR_RES_Pos) /*!< 0x00000004 */ +#define ADC_CFGR_RES_1 (0x2UL << ADC_CFGR_RES_Pos) /*!< 0x00000008 */ +#define ADC_CFGR_RES_2 (0x4UL << ADC_CFGR_RES_Pos) /*!< 0x00000010 */ + +#define ADC_CFGR_EXTSEL_Pos (5U) +#define ADC_CFGR_EXTSEL_Msk (0x1FUL << ADC_CFGR_EXTSEL_Pos) /*!< 0x000003E0 */ +#define ADC_CFGR_EXTSEL ADC_CFGR_EXTSEL_Msk /*!< ADC External trigger selection for regular group */ +#define ADC_CFGR_EXTSEL_0 (0x01UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000020 */ +#define ADC_CFGR_EXTSEL_1 (0x02UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000040 */ +#define ADC_CFGR_EXTSEL_2 (0x04UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000080 */ +#define ADC_CFGR_EXTSEL_3 (0x08UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000100 */ +#define ADC_CFGR_EXTSEL_4 (0x10UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000200 */ + +#define ADC_CFGR_EXTEN_Pos (10U) +#define ADC_CFGR_EXTEN_Msk (0x3UL << ADC_CFGR_EXTEN_Pos) /*!< 0x00000C00 */ +#define ADC_CFGR_EXTEN ADC_CFGR_EXTEN_Msk /*!< ADC External trigger enable and polarity selection for regular channels */ +#define ADC_CFGR_EXTEN_0 (0x1UL << ADC_CFGR_EXTEN_Pos) /*!< 0x00000400 */ +#define ADC_CFGR_EXTEN_1 (0x2UL << ADC_CFGR_EXTEN_Pos) /*!< 0x00000800 */ + +#define ADC_CFGR_OVRMOD_Pos (12U) +#define ADC_CFGR_OVRMOD_Msk (0x1UL << ADC_CFGR_OVRMOD_Pos) /*!< 0x00001000 */ +#define ADC_CFGR_OVRMOD ADC_CFGR_OVRMOD_Msk /*!< ADC overrun mode */ +#define ADC_CFGR_CONT_Pos (13U) +#define ADC_CFGR_CONT_Msk (0x1UL << ADC_CFGR_CONT_Pos) /*!< 0x00002000 */ +#define ADC_CFGR_CONT ADC_CFGR_CONT_Msk /*!< ADC Single/continuous conversion mode for regular conversion */ +#define ADC_CFGR_AUTDLY_Pos (14U) +#define ADC_CFGR_AUTDLY_Msk (0x1UL << ADC_CFGR_AUTDLY_Pos) /*!< 0x00004000 */ +#define ADC_CFGR_AUTDLY ADC_CFGR_AUTDLY_Msk /*!< ADC Delayed conversion mode */ + +#define ADC_CFGR_DISCEN_Pos (16U) +#define ADC_CFGR_DISCEN_Msk (0x1UL << ADC_CFGR_DISCEN_Pos) /*!< 0x00010000 */ +#define ADC_CFGR_DISCEN ADC_CFGR_DISCEN_Msk /*!< ADC Discontinuous mode for regular channels */ + +#define ADC_CFGR_DISCNUM_Pos (17U) +#define ADC_CFGR_DISCNUM_Msk (0x7UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x000E0000 */ +#define ADC_CFGR_DISCNUM ADC_CFGR_DISCNUM_Msk /*!< ADC Discontinuous mode channel count */ +#define ADC_CFGR_DISCNUM_0 (0x1UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x00020000 */ +#define ADC_CFGR_DISCNUM_1 (0x2UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x00040000 */ +#define ADC_CFGR_DISCNUM_2 (0x4UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x00080000 */ + +#define ADC_CFGR_JDISCEN_Pos (20U) +#define ADC_CFGR_JDISCEN_Msk (0x1UL << ADC_CFGR_JDISCEN_Pos) /*!< 0x00100000 */ +#define ADC_CFGR_JDISCEN ADC_CFGR_JDISCEN_Msk /*!< ADC Discontinuous mode on injected channels */ +#define ADC_CFGR_JQM_Pos (21U) +#define ADC_CFGR_JQM_Msk (0x1UL << ADC_CFGR_JQM_Pos) /*!< 0x00200000 */ +#define ADC_CFGR_JQM ADC_CFGR_JQM_Msk /*!< ADC JSQR Queue mode */ +#define ADC_CFGR_AWD1SGL_Pos (22U) +#define ADC_CFGR_AWD1SGL_Msk (0x1UL << ADC_CFGR_AWD1SGL_Pos) /*!< 0x00400000 */ +#define ADC_CFGR_AWD1SGL ADC_CFGR_AWD1SGL_Msk /*!< Enable the watchdog 1 on a single channel or on all channels */ +#define ADC_CFGR_AWD1EN_Pos (23U) +#define ADC_CFGR_AWD1EN_Msk (0x1UL << ADC_CFGR_AWD1EN_Pos) /*!< 0x00800000 */ +#define ADC_CFGR_AWD1EN ADC_CFGR_AWD1EN_Msk /*!< ADC Analog watchdog 1 enable on regular Channels */ +#define ADC_CFGR_JAWD1EN_Pos (24U) +#define ADC_CFGR_JAWD1EN_Msk (0x1UL << ADC_CFGR_JAWD1EN_Pos) /*!< 0x01000000 */ +#define ADC_CFGR_JAWD1EN ADC_CFGR_JAWD1EN_Msk /*!< ADC Analog watchdog 1 enable on injected Channels */ +#define ADC_CFGR_JAUTO_Pos (25U) +#define ADC_CFGR_JAUTO_Msk (0x1UL << ADC_CFGR_JAUTO_Pos) /*!< 0x02000000 */ +#define ADC_CFGR_JAUTO ADC_CFGR_JAUTO_Msk /*!< ADC Automatic injected group conversion */ + +#define ADC_CFGR_AWD1CH_Pos (26U) +#define ADC_CFGR_AWD1CH_Msk (0x1FUL << ADC_CFGR_AWD1CH_Pos) /*!< 0x7C000000 */ +#define ADC_CFGR_AWD1CH ADC_CFGR_AWD1CH_Msk /*!< ADC Analog watchdog 1 Channel selection */ +#define ADC_CFGR_AWD1CH_0 (0x01UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x04000000 */ +#define ADC_CFGR_AWD1CH_1 (0x02UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x08000000 */ +#define ADC_CFGR_AWD1CH_2 (0x04UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x10000000 */ +#define ADC_CFGR_AWD1CH_3 (0x08UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x20000000 */ +#define ADC_CFGR_AWD1CH_4 (0x10UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x40000000 */ + +#define ADC_CFGR_JQDIS_Pos (31U) +#define ADC_CFGR_JQDIS_Msk (0x1UL << ADC_CFGR_JQDIS_Pos) /*!< 0x80000000 */ +#define ADC_CFGR_JQDIS ADC_CFGR_JQDIS_Msk /*!< ADC Injected queue disable */ + +#define ADC3_CFGR_DMAEN_Pos (0U) +#define ADC3_CFGR_DMAEN_Msk (0x1UL << ADC3_CFGR_DMAEN_Pos) /*!< 0x00000001 */ +#define ADC3_CFGR_DMAEN ADC3_CFGR_DMAEN_Msk /*!< ADC DMA transfer enable */ +#define ADC3_CFGR_DMACFG_Pos (1U) +#define ADC3_CFGR_DMACFG_Msk (0x1UL << ADC3_CFGR_DMACFG_Pos) /*!< 0x00000002 */ +#define ADC3_CFGR_DMACFG ADC3_CFGR_DMACFG_Msk /*!< ADC DMA transfer configuration */ + +#define ADC3_CFGR_RES_Pos (3U) +#define ADC3_CFGR_RES_Msk (0x3UL << ADC3_CFGR_RES_Pos) /*!< 0x00000018 */ +#define ADC3_CFGR_RES ADC3_CFGR_RES_Msk /*!< ADC data resolution */ +#define ADC3_CFGR_RES_0 (0x1UL << ADC3_CFGR_RES_Pos) /*!< 0x00000008 */ +#define ADC3_CFGR_RES_1 (0x2UL << ADC3_CFGR_RES_Pos) /*!< 0x00000010 */ + +#define ADC3_CFGR_ALIGN_Pos (15U) +#define ADC3_CFGR_ALIGN_Msk (0x1UL << ADC3_CFGR_ALIGN_Pos) /*!< 0x00008000 */ +#define ADC3_CFGR_ALIGN ADC3_CFGR_ALIGN_Msk /*!< ADC data alignement */ +/******************** Bit definition for ADC_CFGR2 register ********************/ +#define ADC_CFGR2_ROVSE_Pos (0U) +#define ADC_CFGR2_ROVSE_Msk (0x1UL << ADC_CFGR2_ROVSE_Pos) /*!< 0x00000001 */ +#define ADC_CFGR2_ROVSE ADC_CFGR2_ROVSE_Msk /*!< ADC Regular group oversampler enable */ +#define ADC_CFGR2_JOVSE_Pos (1U) +#define ADC_CFGR2_JOVSE_Msk (0x1UL << ADC_CFGR2_JOVSE_Pos) /*!< 0x00000002 */ +#define ADC_CFGR2_JOVSE ADC_CFGR2_JOVSE_Msk /*!< ADC Injected group oversampler enable */ + +#define ADC_CFGR2_OVSS_Pos (5U) +#define ADC_CFGR2_OVSS_Msk (0xFUL << ADC_CFGR2_OVSS_Pos) /*!< 0x000001E0 */ +#define ADC_CFGR2_OVSS ADC_CFGR2_OVSS_Msk /*!< ADC Regular Oversampling shift */ +#define ADC_CFGR2_OVSS_0 (0x1UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000020 */ +#define ADC_CFGR2_OVSS_1 (0x2UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000040 */ +#define ADC_CFGR2_OVSS_2 (0x4UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000080 */ +#define ADC_CFGR2_OVSS_3 (0x8UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000100 */ + +#define ADC_CFGR2_TROVS_Pos (9U) +#define ADC_CFGR2_TROVS_Msk (0x1UL << ADC_CFGR2_TROVS_Pos) /*!< 0x00000200 */ +#define ADC_CFGR2_TROVS ADC_CFGR2_TROVS_Msk /*!< ADC Triggered regular Oversampling */ +#define ADC_CFGR2_ROVSM_Pos (10U) +#define ADC_CFGR2_ROVSM_Msk (0x1UL << ADC_CFGR2_ROVSM_Pos) /*!< 0x00000400 */ +#define ADC_CFGR2_ROVSM ADC_CFGR2_ROVSM_Msk /*!< ADC Regular oversampling mode */ + +#define ADC_CFGR2_RSHIFT1_Pos (11U) +#define ADC_CFGR2_RSHIFT1_Msk (0x1UL << ADC_CFGR2_RSHIFT1_Pos) /*!< 0x00000800 */ +#define ADC_CFGR2_RSHIFT1 ADC_CFGR2_RSHIFT1_Msk /*!< ADC Right-shift data after Offset 1 correction */ +#define ADC_CFGR2_RSHIFT2_Pos (12U) +#define ADC_CFGR2_RSHIFT2_Msk (0x1UL << ADC_CFGR2_RSHIFT2_Pos) /*!< 0x00001000 */ +#define ADC_CFGR2_RSHIFT2 ADC_CFGR2_RSHIFT2_Msk /*!< ADC Right-shift data after Offset 2 correction */ +#define ADC_CFGR2_RSHIFT3_Pos (13U) +#define ADC_CFGR2_RSHIFT3_Msk (0x1UL << ADC_CFGR2_RSHIFT3_Pos) /*!< 0x00002000 */ +#define ADC_CFGR2_RSHIFT3 ADC_CFGR2_RSHIFT3_Msk /*!< ADC Right-shift data after Offset 3 correction */ +#define ADC_CFGR2_RSHIFT4_Pos (14U) +#define ADC_CFGR2_RSHIFT4_Msk (0x1UL << ADC_CFGR2_RSHIFT4_Pos) /*!< 0x00004000 */ +#define ADC_CFGR2_RSHIFT4 ADC_CFGR2_RSHIFT4_Msk /*!< ADC Right-shift data after Offset 4 correction */ + +#define ADC_CFGR2_OVSR_Pos (16U) +#define ADC_CFGR2_OVSR_Msk (0x3FFUL << ADC_CFGR2_OVSR_Pos) /*!< 0x03FF0000 */ +#define ADC_CFGR2_OVSR ADC_CFGR2_OVSR_Msk /*!< ADC oversampling Ratio */ +#define ADC_CFGR2_OVSR_0 (0x001UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00010000 */ +#define ADC_CFGR2_OVSR_1 (0x002UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00020000 */ +#define ADC_CFGR2_OVSR_2 (0x004UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00040000 */ +#define ADC_CFGR2_OVSR_3 (0x008UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00080000 */ +#define ADC_CFGR2_OVSR_4 (0x010UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00100000 */ +#define ADC_CFGR2_OVSR_5 (0x020UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00200000 */ +#define ADC_CFGR2_OVSR_6 (0x040UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00400000 */ +#define ADC_CFGR2_OVSR_7 (0x080UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00800000 */ +#define ADC_CFGR2_OVSR_8 (0x100UL << ADC_CFGR2_OVSR_Pos) /*!< 0x01000000 */ +#define ADC_CFGR2_OVSR_9 (0x200UL << ADC_CFGR2_OVSR_Pos) /*!< 0x02000000 */ + +#define ADC_CFGR2_LSHIFT_Pos (28U) +#define ADC_CFGR2_LSHIFT_Msk (0xFUL << ADC_CFGR2_LSHIFT_Pos) /*!< 0xF0000000 */ +#define ADC_CFGR2_LSHIFT ADC_CFGR2_LSHIFT_Msk /*!< ADC Left shift factor */ +#define ADC_CFGR2_LSHIFT_0 (0x1UL << ADC_CFGR2_LSHIFT_Pos) /*!< 0x10000000 */ +#define ADC_CFGR2_LSHIFT_1 (0x2UL << ADC_CFGR2_LSHIFT_Pos) /*!< 0x20000000 */ +#define ADC_CFGR2_LSHIFT_2 (0x4UL << ADC_CFGR2_LSHIFT_Pos) /*!< 0x40000000 */ +#define ADC_CFGR2_LSHIFT_3 (0x8UL << ADC_CFGR2_LSHIFT_Pos) /*!< 0x80000000 */ + +#define ADC3_CFGR2_OVSR_Pos (2U) +#define ADC3_CFGR2_OVSR_Msk (0x7UL << ADC3_CFGR2_OVSR_Pos) /*!< 0x0000001C */ +#define ADC3_CFGR2_OVSR ADC3_CFGR2_OVSR_Msk /*!< ADC oversampling ratio */ +#define ADC3_CFGR2_OVSR_0 (0x1UL << ADC3_CFGR2_OVSR_Pos) /*!< 0x00000004 */ +#define ADC3_CFGR2_OVSR_1 (0x2UL << ADC3_CFGR2_OVSR_Pos) /*!< 0x00000008 */ +#define ADC3_CFGR2_OVSR_2 (0x4UL << ADC3_CFGR2_OVSR_Pos) /*!< 0x00000010 */ + +#define ADC3_CFGR2_SWTRIG_Pos (25U) +#define ADC3_CFGR2_SWTRIG_Msk (0x1UL << ADC3_CFGR2_SWTRIG_Pos) /*!< 0x02000000 */ +#define ADC3_CFGR2_SWTRIG ADC3_CFGR2_SWTRIG_Msk /*!< ADC Software Trigger Bit for Sample time control trigger mode */ +#define ADC3_CFGR2_BULB_Pos (26U) +#define ADC3_CFGR2_BULB_Msk (0x1UL << ADC3_CFGR2_BULB_Pos) /*!< 0x04000000 */ +#define ADC3_CFGR2_BULB ADC3_CFGR2_BULB_Msk /*!< ADC Bulb sampling mode */ +#define ADC3_CFGR2_SMPTRIG_Pos (27U) +#define ADC3_CFGR2_SMPTRIG_Msk (0x1UL << ADC3_CFGR2_SMPTRIG_Pos) /*!< 0x08000000 */ +#define ADC3_CFGR2_SMPTRIG ADC3_CFGR2_SMPTRIG_Msk /*!< ADC Sample Time Control Trigger mode */ +/******************** Bit definition for ADC_SMPR1 register ********************/ +#define ADC_SMPR1_SMP0_Pos (0U) +#define ADC_SMPR1_SMP0_Msk (0x7UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000007 */ +#define ADC_SMPR1_SMP0 ADC_SMPR1_SMP0_Msk /*!< ADC Channel 0 Sampling time selection */ +#define ADC_SMPR1_SMP0_0 (0x1UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000001 */ +#define ADC_SMPR1_SMP0_1 (0x2UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000002 */ +#define ADC_SMPR1_SMP0_2 (0x4UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000004 */ + +#define ADC_SMPR1_SMP1_Pos (3U) +#define ADC_SMPR1_SMP1_Msk (0x7UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000038 */ +#define ADC_SMPR1_SMP1 ADC_SMPR1_SMP1_Msk /*!< ADC Channel 1 Sampling time selection */ +#define ADC_SMPR1_SMP1_0 (0x1UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000008 */ +#define ADC_SMPR1_SMP1_1 (0x2UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000010 */ +#define ADC_SMPR1_SMP1_2 (0x4UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000020 */ + +#define ADC_SMPR1_SMP2_Pos (6U) +#define ADC_SMPR1_SMP2_Msk (0x7UL << ADC_SMPR1_SMP2_Pos) /*!< 0x000001C0 */ +#define ADC_SMPR1_SMP2 ADC_SMPR1_SMP2_Msk /*!< ADC Channel 2 Sampling time selection */ +#define ADC_SMPR1_SMP2_0 (0x1UL << ADC_SMPR1_SMP2_Pos) /*!< 0x00000040 */ +#define ADC_SMPR1_SMP2_1 (0x2UL << ADC_SMPR1_SMP2_Pos) /*!< 0x00000080 */ +#define ADC_SMPR1_SMP2_2 (0x4UL << ADC_SMPR1_SMP2_Pos) /*!< 0x00000100 */ + +#define ADC_SMPR1_SMP3_Pos (9U) +#define ADC_SMPR1_SMP3_Msk (0x7UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000E00 */ +#define ADC_SMPR1_SMP3 ADC_SMPR1_SMP3_Msk /*!< ADC Channel 3 Sampling time selection */ +#define ADC_SMPR1_SMP3_0 (0x1UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000200 */ +#define ADC_SMPR1_SMP3_1 (0x2UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000400 */ +#define ADC_SMPR1_SMP3_2 (0x4UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000800 */ + +#define ADC_SMPR1_SMP4_Pos (12U) +#define ADC_SMPR1_SMP4_Msk (0x7UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00007000 */ +#define ADC_SMPR1_SMP4 ADC_SMPR1_SMP4_Msk /*!< ADC Channel 4 Sampling time selection */ +#define ADC_SMPR1_SMP4_0 (0x1UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00001000 */ +#define ADC_SMPR1_SMP4_1 (0x2UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00002000 */ +#define ADC_SMPR1_SMP4_2 (0x4UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00004000 */ + +#define ADC_SMPR1_SMP5_Pos (15U) +#define ADC_SMPR1_SMP5_Msk (0x7UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00038000 */ +#define ADC_SMPR1_SMP5 ADC_SMPR1_SMP5_Msk /*!< ADC Channel 5 Sampling time selection */ +#define ADC_SMPR1_SMP5_0 (0x1UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00008000 */ +#define ADC_SMPR1_SMP5_1 (0x2UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00010000 */ +#define ADC_SMPR1_SMP5_2 (0x4UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00020000 */ + +#define ADC_SMPR1_SMP6_Pos (18U) +#define ADC_SMPR1_SMP6_Msk (0x7UL << ADC_SMPR1_SMP6_Pos) /*!< 0x001C0000 */ +#define ADC_SMPR1_SMP6 ADC_SMPR1_SMP6_Msk /*!< ADC Channel 6 Sampling time selection */ +#define ADC_SMPR1_SMP6_0 (0x1UL << ADC_SMPR1_SMP6_Pos) /*!< 0x00040000 */ +#define ADC_SMPR1_SMP6_1 (0x2UL << ADC_SMPR1_SMP6_Pos) /*!< 0x00080000 */ +#define ADC_SMPR1_SMP6_2 (0x4UL << ADC_SMPR1_SMP6_Pos) /*!< 0x00100000 */ + +#define ADC_SMPR1_SMP7_Pos (21U) +#define ADC_SMPR1_SMP7_Msk (0x7UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00E00000 */ +#define ADC_SMPR1_SMP7 ADC_SMPR1_SMP7_Msk /*!< ADC Channel 7 Sampling time selection */ +#define ADC_SMPR1_SMP7_0 (0x1UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00200000 */ +#define ADC_SMPR1_SMP7_1 (0x2UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00400000 */ +#define ADC_SMPR1_SMP7_2 (0x4UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00800000 */ + +#define ADC_SMPR1_SMP8_Pos (24U) +#define ADC_SMPR1_SMP8_Msk (0x7UL << ADC_SMPR1_SMP8_Pos) /*!< 0x07000000 */ +#define ADC_SMPR1_SMP8 ADC_SMPR1_SMP8_Msk /*!< ADC Channel 8 Sampling time selection */ +#define ADC_SMPR1_SMP8_0 (0x1UL << ADC_SMPR1_SMP8_Pos) /*!< 0x01000000 */ +#define ADC_SMPR1_SMP8_1 (0x2UL << ADC_SMPR1_SMP8_Pos) /*!< 0x02000000 */ +#define ADC_SMPR1_SMP8_2 (0x4UL << ADC_SMPR1_SMP8_Pos) /*!< 0x04000000 */ + +#define ADC_SMPR1_SMP9_Pos (27U) +#define ADC_SMPR1_SMP9_Msk (0x7UL << ADC_SMPR1_SMP9_Pos) /*!< 0x38000000 */ +#define ADC_SMPR1_SMP9 ADC_SMPR1_SMP9_Msk /*!< ADC Channel 9 Sampling time selection */ +#define ADC_SMPR1_SMP9_0 (0x1UL << ADC_SMPR1_SMP9_Pos) /*!< 0x08000000 */ +#define ADC_SMPR1_SMP9_1 (0x2UL << ADC_SMPR1_SMP9_Pos) /*!< 0x10000000 */ +#define ADC_SMPR1_SMP9_2 (0x4UL << ADC_SMPR1_SMP9_Pos) /*!< 0x20000000 */ + +/******************** Bit definition for ADC_SMPR2 register ********************/ +#define ADC_SMPR2_SMP10_Pos (0U) +#define ADC_SMPR2_SMP10_Msk (0x7UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000007 */ +#define ADC_SMPR2_SMP10 ADC_SMPR2_SMP10_Msk /*!< ADC Channel 10 Sampling time selection */ +#define ADC_SMPR2_SMP10_0 (0x1UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000001 */ +#define ADC_SMPR2_SMP10_1 (0x2UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000002 */ +#define ADC_SMPR2_SMP10_2 (0x4UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000004 */ + +#define ADC_SMPR2_SMP11_Pos (3U) +#define ADC_SMPR2_SMP11_Msk (0x7UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000038 */ +#define ADC_SMPR2_SMP11 ADC_SMPR2_SMP11_Msk /*!< ADC Channel 11 Sampling time selection */ +#define ADC_SMPR2_SMP11_0 (0x1UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000008 */ +#define ADC_SMPR2_SMP11_1 (0x2UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000010 */ +#define ADC_SMPR2_SMP11_2 (0x4UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000020 */ + +#define ADC_SMPR2_SMP12_Pos (6U) +#define ADC_SMPR2_SMP12_Msk (0x7UL << ADC_SMPR2_SMP12_Pos) /*!< 0x000001C0 */ +#define ADC_SMPR2_SMP12 ADC_SMPR2_SMP12_Msk /*!< ADC Channel 12 Sampling time selection */ +#define ADC_SMPR2_SMP12_0 (0x1UL << ADC_SMPR2_SMP12_Pos) /*!< 0x00000040 */ +#define ADC_SMPR2_SMP12_1 (0x2UL << ADC_SMPR2_SMP12_Pos) /*!< 0x00000080 */ +#define ADC_SMPR2_SMP12_2 (0x4UL << ADC_SMPR2_SMP12_Pos) /*!< 0x00000100 */ + +#define ADC_SMPR2_SMP13_Pos (9U) +#define ADC_SMPR2_SMP13_Msk (0x7UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000E00 */ +#define ADC_SMPR2_SMP13 ADC_SMPR2_SMP13_Msk /*!< ADC Channel 13 Sampling time selection */ +#define ADC_SMPR2_SMP13_0 (0x1UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000200 */ +#define ADC_SMPR2_SMP13_1 (0x2UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000400 */ +#define ADC_SMPR2_SMP13_2 (0x4UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000800 */ + +#define ADC_SMPR2_SMP14_Pos (12U) +#define ADC_SMPR2_SMP14_Msk (0x7UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00007000 */ +#define ADC_SMPR2_SMP14 ADC_SMPR2_SMP14_Msk /*!< ADC Channel 14 Sampling time selection */ +#define ADC_SMPR2_SMP14_0 (0x1UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00001000 */ +#define ADC_SMPR2_SMP14_1 (0x2UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00002000 */ +#define ADC_SMPR2_SMP14_2 (0x4UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00004000 */ + +#define ADC_SMPR2_SMP15_Pos (15U) +#define ADC_SMPR2_SMP15_Msk (0x7UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00038000 */ +#define ADC_SMPR2_SMP15 ADC_SMPR2_SMP15_Msk /*!< ADC Channel 15 Sampling time selection */ +#define ADC_SMPR2_SMP15_0 (0x1UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00008000 */ +#define ADC_SMPR2_SMP15_1 (0x2UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00010000 */ +#define ADC_SMPR2_SMP15_2 (0x4UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00020000 */ + +#define ADC_SMPR2_SMP16_Pos (18U) +#define ADC_SMPR2_SMP16_Msk (0x7UL << ADC_SMPR2_SMP16_Pos) /*!< 0x001C0000 */ +#define ADC_SMPR2_SMP16 ADC_SMPR2_SMP16_Msk /*!< ADC Channel 16 Sampling time selection */ +#define ADC_SMPR2_SMP16_0 (0x1UL << ADC_SMPR2_SMP16_Pos) /*!< 0x00040000 */ +#define ADC_SMPR2_SMP16_1 (0x2UL << ADC_SMPR2_SMP16_Pos) /*!< 0x00080000 */ +#define ADC_SMPR2_SMP16_2 (0x4UL << ADC_SMPR2_SMP16_Pos) /*!< 0x00100000 */ + +#define ADC_SMPR2_SMP17_Pos (21U) +#define ADC_SMPR2_SMP17_Msk (0x7UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00E00000 */ +#define ADC_SMPR2_SMP17 ADC_SMPR2_SMP17_Msk /*!< ADC Channel 17 Sampling time selection */ +#define ADC_SMPR2_SMP17_0 (0x1UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00200000 */ +#define ADC_SMPR2_SMP17_1 (0x2UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00400000 */ +#define ADC_SMPR2_SMP17_2 (0x4UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00800000 */ + +#define ADC_SMPR2_SMP18_Pos (24U) +#define ADC_SMPR2_SMP18_Msk (0x7UL << ADC_SMPR2_SMP18_Pos) /*!< 0x07000000 */ +#define ADC_SMPR2_SMP18 ADC_SMPR2_SMP18_Msk /*!< ADC Channel 18 Sampling time selection */ +#define ADC_SMPR2_SMP18_0 (0x1UL << ADC_SMPR2_SMP18_Pos) /*!< 0x01000000 */ +#define ADC_SMPR2_SMP18_1 (0x2UL << ADC_SMPR2_SMP18_Pos) /*!< 0x02000000 */ +#define ADC_SMPR2_SMP18_2 (0x4UL << ADC_SMPR2_SMP18_Pos) /*!< 0x04000000 */ + +#define ADC_SMPR2_SMP19_Pos (27U) +#define ADC_SMPR2_SMP19_Msk (0x7UL << ADC_SMPR2_SMP19_Pos) /*!< 0x38000000 */ +#define ADC_SMPR2_SMP19 ADC_SMPR2_SMP19_Msk /*!< ADC Channel 19 Sampling time selection */ +#define ADC_SMPR2_SMP19_0 (0x1UL << ADC_SMPR2_SMP19_Pos) /*!< 0x08000000 */ +#define ADC_SMPR2_SMP19_1 (0x2UL << ADC_SMPR2_SMP19_Pos) /*!< 0x10000000 */ +#define ADC_SMPR2_SMP19_2 (0x4UL << ADC_SMPR2_SMP19_Pos) /*!< 0x20000000 */ + +/******************** Bit definition for ADC_PCSEL register ********************/ +#define ADC_PCSEL_PCSEL_Pos (0U) +#define ADC_PCSEL_PCSEL_Msk (0xFFFFFUL << ADC_PCSEL_PCSEL_Pos) /*!< 0x000FFFFF */ +#define ADC_PCSEL_PCSEL ADC_PCSEL_PCSEL_Msk /*!< ADC pre channel selection */ +#define ADC_PCSEL_PCSEL_0 (0x00001UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000001 */ +#define ADC_PCSEL_PCSEL_1 (0x00002UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000002 */ +#define ADC_PCSEL_PCSEL_2 (0x00004UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000004 */ +#define ADC_PCSEL_PCSEL_3 (0x00008UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000008 */ +#define ADC_PCSEL_PCSEL_4 (0x00010UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000010 */ +#define ADC_PCSEL_PCSEL_5 (0x00020UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000020 */ +#define ADC_PCSEL_PCSEL_6 (0x00040UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000040 */ +#define ADC_PCSEL_PCSEL_7 (0x00080UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000080 */ +#define ADC_PCSEL_PCSEL_8 (0x00100UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000100 */ +#define ADC_PCSEL_PCSEL_9 (0x00200UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000200 */ +#define ADC_PCSEL_PCSEL_10 (0x00400UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000400 */ +#define ADC_PCSEL_PCSEL_11 (0x00800UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000800 */ +#define ADC_PCSEL_PCSEL_12 (0x01000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00001000 */ +#define ADC_PCSEL_PCSEL_13 (0x02000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00002000 */ +#define ADC_PCSEL_PCSEL_14 (0x04000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00004000 */ +#define ADC_PCSEL_PCSEL_15 (0x08000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00008000 */ +#define ADC_PCSEL_PCSEL_16 (0x10000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00010000 */ +#define ADC_PCSEL_PCSEL_17 (0x20000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00020000 */ +#define ADC_PCSEL_PCSEL_18 (0x40000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00040000 */ +#define ADC_PCSEL_PCSEL_19 (0x80000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00080000 */ + +/***************** Bit definition for ADC_LTR1, 2, 3 registers *****************/ +#define ADC_LTR_LT_Pos (0U) +#define ADC_LTR_LT_Msk (0x3FFFFFFUL << ADC_LTR_LT_Pos) /*!< 0x03FFFFFF */ +#define ADC_LTR_LT ADC_LTR_LT_Msk /*!< ADC Analog watchdog 1, 2 and 3 lower threshold */ + +/***************** Bit definition for ADC_HTR1, 2, 3 registers ****************/ +#define ADC_HTR_HT_Pos (0U) +#define ADC_HTR_HT_Msk (0x3FFFFFFUL << ADC_HTR_HT_Pos) /*!< 0x03FFFFFF */ +#define ADC_HTR_HT ADC_HTR_HT_Msk /*!< ADC Analog watchdog 1,2 and 3 higher threshold */ + +/******************** Bit definition for ADC3_TR1 register *******************/ +#define ADC3_TR1_LT1_Pos (0U) +#define ADC3_TR1_LT1_Msk (0xFFFUL << ADC3_TR1_LT1_Pos) /*!< 0x00000FFF */ +#define ADC3_TR1_LT1 ADC3_TR1_LT1_Msk /*!< ADC analog watchdog 1 threshold low */ + +#define ADC3_TR1_AWDFILT_Pos (12U) +#define ADC3_TR1_AWDFILT_Msk (0x7UL << ADC3_TR1_AWDFILT_Pos) /*!< 0x00007000 */ +#define ADC3_TR1_AWDFILT ADC3_TR1_AWDFILT_Msk /*!< ADC analog watchdog filtering parameter */ +#define ADC3_TR1_AWDFILT_0 (0x1UL << ADC3_TR1_AWDFILT_Pos) /*!< 0x00001000 */ +#define ADC3_TR1_AWDFILT_1 (0x2UL << ADC3_TR1_AWDFILT_Pos) /*!< 0x00002000 */ +#define ADC3_TR1_AWDFILT_2 (0x4UL << ADC3_TR1_AWDFILT_Pos) /*!< 0x00004000 */ + +#define ADC3_TR1_HT1_Pos (16U) +#define ADC3_TR1_HT1_Msk (0xFFFUL << ADC3_TR1_HT1_Pos) /*!< 0x0FFF0000 */ +#define ADC3_TR1_HT1 ADC3_TR1_HT1_Msk /*!< ADC analog watchdog 1 threshold high */ + +/******************** Bit definition for ADC3_TR2 register *******************/ +#define ADC3_TR2_LT2_Pos (0U) +#define ADC3_TR2_LT2_Msk (0xFFUL << ADC3_TR2_LT2_Pos) /*!< 0x000000FF */ +#define ADC3_TR2_LT2 ADC3_TR2_LT2_Msk /*!< ADC analog watchdog 2 threshold low */ + +#define ADC3_TR2_HT2_Pos (16U) +#define ADC3_TR2_HT2_Msk (0xFFUL << ADC3_TR2_HT2_Pos) /*!< 0x00FF0000 */ +#define ADC3_TR2_HT2 ADC3_TR2_HT2_Msk /*!< ADC analog watchdog 2 threshold high */ + +/******************** Bit definition for ADC3_TR3 register *******************/ +#define ADC3_TR3_LT3_Pos (0U) +#define ADC3_TR3_LT3_Msk (0xFFUL << ADC3_TR3_LT3_Pos) /*!< 0x000000FF */ +#define ADC3_TR3_LT3 ADC3_TR3_LT3_Msk /*!< ADC analog watchdog 3 threshold low */ + +#define ADC3_TR3_HT3_Pos (16U) +#define ADC3_TR3_HT3_Msk (0xFFUL << ADC3_TR3_HT3_Pos) /*!< 0x00FF0000 */ +#define ADC3_TR3_HT3 ADC3_TR3_HT3_Msk /*!< ADC analog watchdog 3 threshold high */ + +/******************** Bit definition for ADC_SQR1 register ********************/ +#define ADC_SQR1_L_Pos (0U) +#define ADC_SQR1_L_Msk (0xFUL << ADC_SQR1_L_Pos) /*!< 0x0000000F */ +#define ADC_SQR1_L ADC_SQR1_L_Msk /*!< ADC regular channel sequence lenght */ +#define ADC_SQR1_L_0 (0x1UL << ADC_SQR1_L_Pos) /*!< 0x00000001 */ +#define ADC_SQR1_L_1 (0x2UL << ADC_SQR1_L_Pos) /*!< 0x00000002 */ +#define ADC_SQR1_L_2 (0x4UL << ADC_SQR1_L_Pos) /*!< 0x00000004 */ +#define ADC_SQR1_L_3 (0x8UL << ADC_SQR1_L_Pos) /*!< 0x00000008 */ + +#define ADC_SQR1_SQ1_Pos (6U) +#define ADC_SQR1_SQ1_Msk (0x1FUL << ADC_SQR1_SQ1_Pos) /*!< 0x000007C0 */ +#define ADC_SQR1_SQ1 ADC_SQR1_SQ1_Msk /*!< ADC 1st conversion in regular sequence */ +#define ADC_SQR1_SQ1_0 (0x01UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000040 */ +#define ADC_SQR1_SQ1_1 (0x02UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000080 */ +#define ADC_SQR1_SQ1_2 (0x04UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000100 */ +#define ADC_SQR1_SQ1_3 (0x08UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000200 */ +#define ADC_SQR1_SQ1_4 (0x10UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000400 */ + +#define ADC_SQR1_SQ2_Pos (12U) +#define ADC_SQR1_SQ2_Msk (0x1FUL << ADC_SQR1_SQ2_Pos) /*!< 0x0001F000 */ +#define ADC_SQR1_SQ2 ADC_SQR1_SQ2_Msk /*!< ADC 2nd conversion in regular sequence */ +#define ADC_SQR1_SQ2_0 (0x01UL << ADC_SQR1_SQ2_Pos) /*!< 0x00001000 */ +#define ADC_SQR1_SQ2_1 (0x02UL << ADC_SQR1_SQ2_Pos) /*!< 0x00002000 */ +#define ADC_SQR1_SQ2_2 (0x04UL << ADC_SQR1_SQ2_Pos) /*!< 0x00004000 */ +#define ADC_SQR1_SQ2_3 (0x08UL << ADC_SQR1_SQ2_Pos) /*!< 0x00008000 */ +#define ADC_SQR1_SQ2_4 (0x10UL << ADC_SQR1_SQ2_Pos) /*!< 0x00010000 */ + +#define ADC_SQR1_SQ3_Pos (18U) +#define ADC_SQR1_SQ3_Msk (0x1FUL << ADC_SQR1_SQ3_Pos) /*!< 0x007C0000 */ +#define ADC_SQR1_SQ3 ADC_SQR1_SQ3_Msk /*!< ADC 3rd conversion in regular sequence */ +#define ADC_SQR1_SQ3_0 (0x01UL << ADC_SQR1_SQ3_Pos) /*!< 0x00040000 */ +#define ADC_SQR1_SQ3_1 (0x02UL << ADC_SQR1_SQ3_Pos) /*!< 0x00080000 */ +#define ADC_SQR1_SQ3_2 (0x04UL << ADC_SQR1_SQ3_Pos) /*!< 0x00100000 */ +#define ADC_SQR1_SQ3_3 (0x08UL << ADC_SQR1_SQ3_Pos) /*!< 0x00200000 */ +#define ADC_SQR1_SQ3_4 (0x10UL << ADC_SQR1_SQ3_Pos) /*!< 0x00400000 */ + +#define ADC_SQR1_SQ4_Pos (24U) +#define ADC_SQR1_SQ4_Msk (0x1FUL << ADC_SQR1_SQ4_Pos) /*!< 0x1F000000 */ +#define ADC_SQR1_SQ4 ADC_SQR1_SQ4_Msk /*!< ADC 4th conversion in regular sequence */ +#define ADC_SQR1_SQ4_0 (0x01UL << ADC_SQR1_SQ4_Pos) /*!< 0x01000000 */ +#define ADC_SQR1_SQ4_1 (0x02UL << ADC_SQR1_SQ4_Pos) /*!< 0x02000000 */ +#define ADC_SQR1_SQ4_2 (0x04UL << ADC_SQR1_SQ4_Pos) /*!< 0x04000000 */ +#define ADC_SQR1_SQ4_3 (0x08UL << ADC_SQR1_SQ4_Pos) /*!< 0x08000000 */ +#define ADC_SQR1_SQ4_4 (0x10UL << ADC_SQR1_SQ4_Pos) /*!< 0x10000000 */ + +/******************** Bit definition for ADC_SQR2 register ********************/ +#define ADC_SQR2_SQ5_Pos (0U) +#define ADC_SQR2_SQ5_Msk (0x1FUL << ADC_SQR2_SQ5_Pos) /*!< 0x0000001F */ +#define ADC_SQR2_SQ5 ADC_SQR2_SQ5_Msk /*!< ADC 5th conversion in regular sequence */ +#define ADC_SQR2_SQ5_0 (0x01UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000001 */ +#define ADC_SQR2_SQ5_1 (0x02UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000002 */ +#define ADC_SQR2_SQ5_2 (0x04UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000004 */ +#define ADC_SQR2_SQ5_3 (0x08UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000008 */ +#define ADC_SQR2_SQ5_4 (0x10UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000010 */ + +#define ADC_SQR2_SQ6_Pos (6U) +#define ADC_SQR2_SQ6_Msk (0x1FUL << ADC_SQR2_SQ6_Pos) /*!< 0x000007C0 */ +#define ADC_SQR2_SQ6 ADC_SQR2_SQ6_Msk /*!< ADC 6th conversion in regular sequence */ +#define ADC_SQR2_SQ6_0 (0x01UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000040 */ +#define ADC_SQR2_SQ6_1 (0x02UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000080 */ +#define ADC_SQR2_SQ6_2 (0x04UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000100 */ +#define ADC_SQR2_SQ6_3 (0x08UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000200 */ +#define ADC_SQR2_SQ6_4 (0x10UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000400 */ + +#define ADC_SQR2_SQ7_Pos (12U) +#define ADC_SQR2_SQ7_Msk (0x1FUL << ADC_SQR2_SQ7_Pos) /*!< 0x0001F000 */ +#define ADC_SQR2_SQ7 ADC_SQR2_SQ7_Msk /*!< ADC 7th conversion in regular sequence */ +#define ADC_SQR2_SQ7_0 (0x01UL << ADC_SQR2_SQ7_Pos) /*!< 0x00001000 */ +#define ADC_SQR2_SQ7_1 (0x02UL << ADC_SQR2_SQ7_Pos) /*!< 0x00002000 */ +#define ADC_SQR2_SQ7_2 (0x04UL << ADC_SQR2_SQ7_Pos) /*!< 0x00004000 */ +#define ADC_SQR2_SQ7_3 (0x08UL << ADC_SQR2_SQ7_Pos) /*!< 0x00008000 */ +#define ADC_SQR2_SQ7_4 (0x10UL << ADC_SQR2_SQ7_Pos) /*!< 0x00010000 */ + +#define ADC_SQR2_SQ8_Pos (18U) +#define ADC_SQR2_SQ8_Msk (0x1FUL << ADC_SQR2_SQ8_Pos) /*!< 0x007C0000 */ +#define ADC_SQR2_SQ8 ADC_SQR2_SQ8_Msk /*!< ADC 8th conversion in regular sequence */ +#define ADC_SQR2_SQ8_0 (0x01UL << ADC_SQR2_SQ8_Pos) /*!< 0x00040000 */ +#define ADC_SQR2_SQ8_1 (0x02UL << ADC_SQR2_SQ8_Pos) /*!< 0x00080000 */ +#define ADC_SQR2_SQ8_2 (0x04UL << ADC_SQR2_SQ8_Pos) /*!< 0x00100000 */ +#define ADC_SQR2_SQ8_3 (0x08UL << ADC_SQR2_SQ8_Pos) /*!< 0x00200000 */ +#define ADC_SQR2_SQ8_4 (0x10UL << ADC_SQR2_SQ8_Pos) /*!< 0x00400000 */ + +#define ADC_SQR2_SQ9_Pos (24U) +#define ADC_SQR2_SQ9_Msk (0x1FUL << ADC_SQR2_SQ9_Pos) /*!< 0x1F000000 */ +#define ADC_SQR2_SQ9 ADC_SQR2_SQ9_Msk /*!< ADC 9th conversion in regular sequence */ +#define ADC_SQR2_SQ9_0 (0x01UL << ADC_SQR2_SQ9_Pos) /*!< 0x01000000 */ +#define ADC_SQR2_SQ9_1 (0x02UL << ADC_SQR2_SQ9_Pos) /*!< 0x02000000 */ +#define ADC_SQR2_SQ9_2 (0x04UL << ADC_SQR2_SQ9_Pos) /*!< 0x04000000 */ +#define ADC_SQR2_SQ9_3 (0x08UL << ADC_SQR2_SQ9_Pos) /*!< 0x08000000 */ +#define ADC_SQR2_SQ9_4 (0x10UL << ADC_SQR2_SQ9_Pos) /*!< 0x10000000 */ + +/******************** Bit definition for ADC_SQR3 register ********************/ +#define ADC_SQR3_SQ10_Pos (0U) +#define ADC_SQR3_SQ10_Msk (0x1FUL << ADC_SQR3_SQ10_Pos) /*!< 0x0000001F */ +#define ADC_SQR3_SQ10 ADC_SQR3_SQ10_Msk /*!< ADC 10th conversion in regular sequence */ +#define ADC_SQR3_SQ10_0 (0x01UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000001 */ +#define ADC_SQR3_SQ10_1 (0x02UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000002 */ +#define ADC_SQR3_SQ10_2 (0x04UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000004 */ +#define ADC_SQR3_SQ10_3 (0x08UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000008 */ +#define ADC_SQR3_SQ10_4 (0x10UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000010 */ + +#define ADC_SQR3_SQ11_Pos (6U) +#define ADC_SQR3_SQ11_Msk (0x1FUL << ADC_SQR3_SQ11_Pos) /*!< 0x000007C0 */ +#define ADC_SQR3_SQ11 ADC_SQR3_SQ11_Msk /*!< ADC 11th conversion in regular sequence */ +#define ADC_SQR3_SQ11_0 (0x01UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000040 */ +#define ADC_SQR3_SQ11_1 (0x02UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000080 */ +#define ADC_SQR3_SQ11_2 (0x04UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000100 */ +#define ADC_SQR3_SQ11_3 (0x08UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000200 */ +#define ADC_SQR3_SQ11_4 (0x10UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000400 */ + +#define ADC_SQR3_SQ12_Pos (12U) +#define ADC_SQR3_SQ12_Msk (0x1FUL << ADC_SQR3_SQ12_Pos) /*!< 0x0001F000 */ +#define ADC_SQR3_SQ12 ADC_SQR3_SQ12_Msk /*!< ADC 12th conversion in regular sequence */ +#define ADC_SQR3_SQ12_0 (0x01UL << ADC_SQR3_SQ12_Pos) /*!< 0x00001000 */ +#define ADC_SQR3_SQ12_1 (0x02UL << ADC_SQR3_SQ12_Pos) /*!< 0x00002000 */ +#define ADC_SQR3_SQ12_2 (0x04UL << ADC_SQR3_SQ12_Pos) /*!< 0x00004000 */ +#define ADC_SQR3_SQ12_3 (0x08UL << ADC_SQR3_SQ12_Pos) /*!< 0x00008000 */ +#define ADC_SQR3_SQ12_4 (0x10UL << ADC_SQR3_SQ12_Pos) /*!< 0x00010000 */ + +#define ADC_SQR3_SQ13_Pos (18U) +#define ADC_SQR3_SQ13_Msk (0x1FUL << ADC_SQR3_SQ13_Pos) /*!< 0x007C0000 */ +#define ADC_SQR3_SQ13 ADC_SQR3_SQ13_Msk /*!< ADC 13th conversion in regular sequence */ +#define ADC_SQR3_SQ13_0 (0x01UL << ADC_SQR3_SQ13_Pos) /*!< 0x00040000 */ +#define ADC_SQR3_SQ13_1 (0x02UL << ADC_SQR3_SQ13_Pos) /*!< 0x00080000 */ +#define ADC_SQR3_SQ13_2 (0x04UL << ADC_SQR3_SQ13_Pos) /*!< 0x00100000 */ +#define ADC_SQR3_SQ13_3 (0x08UL << ADC_SQR3_SQ13_Pos) /*!< 0x00200000 */ +#define ADC_SQR3_SQ13_4 (0x10UL << ADC_SQR3_SQ13_Pos) /*!< 0x00400000 */ + +#define ADC_SQR3_SQ14_Pos (24U) +#define ADC_SQR3_SQ14_Msk (0x1FUL << ADC_SQR3_SQ14_Pos) /*!< 0x1F000000 */ +#define ADC_SQR3_SQ14 ADC_SQR3_SQ14_Msk /*!< ADC 14th conversion in regular sequence */ +#define ADC_SQR3_SQ14_0 (0x01UL << ADC_SQR3_SQ14_Pos) /*!< 0x01000000 */ +#define ADC_SQR3_SQ14_1 (0x02UL << ADC_SQR3_SQ14_Pos) /*!< 0x02000000 */ +#define ADC_SQR3_SQ14_2 (0x04UL << ADC_SQR3_SQ14_Pos) /*!< 0x04000000 */ +#define ADC_SQR3_SQ14_3 (0x08UL << ADC_SQR3_SQ14_Pos) /*!< 0x08000000 */ +#define ADC_SQR3_SQ14_4 (0x10UL << ADC_SQR3_SQ14_Pos) /*!< 0x10000000 */ + +/******************** Bit definition for ADC_SQR4 register ********************/ +#define ADC_SQR4_SQ15_Pos (0U) +#define ADC_SQR4_SQ15_Msk (0x1FUL << ADC_SQR4_SQ15_Pos) /*!< 0x0000001F */ +#define ADC_SQR4_SQ15 ADC_SQR4_SQ15_Msk /*!< ADC 15th conversion in regular sequence */ +#define ADC_SQR4_SQ15_0 (0x01UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000001 */ +#define ADC_SQR4_SQ15_1 (0x02UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000002 */ +#define ADC_SQR4_SQ15_2 (0x04UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000004 */ +#define ADC_SQR4_SQ15_3 (0x08UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000008 */ +#define ADC_SQR4_SQ15_4 (0x10UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000010 */ + +#define ADC_SQR4_SQ16_Pos (6U) +#define ADC_SQR4_SQ16_Msk (0x1FUL << ADC_SQR4_SQ16_Pos) /*!< 0x000007C0 */ +#define ADC_SQR4_SQ16 ADC_SQR4_SQ16_Msk /*!< ADC 16th conversion in regular sequence */ +#define ADC_SQR4_SQ16_0 (0x01UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000040 */ +#define ADC_SQR4_SQ16_1 (0x02UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000080 */ +#define ADC_SQR4_SQ16_2 (0x04UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000100 */ +#define ADC_SQR4_SQ16_3 (0x08UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000200 */ +#define ADC_SQR4_SQ16_4 (0x10UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000400 */ +/******************** Bit definition for ADC_DR register ********************/ +#define ADC_DR_RDATA_Pos (0U) +#define ADC_DR_RDATA_Msk (0xFFFFFFFFUL << ADC_DR_RDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_DR_RDATA ADC_DR_RDATA_Msk /*!< ADC regular Data converted */ + +/******************** Bit definition for ADC_JSQR register ********************/ +#define ADC_JSQR_JL_Pos (0U) +#define ADC_JSQR_JL_Msk (0x3UL << ADC_JSQR_JL_Pos) /*!< 0x00000003 */ +#define ADC_JSQR_JL ADC_JSQR_JL_Msk /*!< ADC injected channel sequence length */ +#define ADC_JSQR_JL_0 (0x1UL << ADC_JSQR_JL_Pos) /*!< 0x00000001 */ +#define ADC_JSQR_JL_1 (0x2UL << ADC_JSQR_JL_Pos) /*!< 0x00000002 */ + +#define ADC_JSQR_JEXTSEL_Pos (2U) +#define ADC_JSQR_JEXTSEL_Msk (0x1FUL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x0000007C */ +#define ADC_JSQR_JEXTSEL ADC_JSQR_JEXTSEL_Msk /*!< ADC external trigger selection for injected group */ +#define ADC_JSQR_JEXTSEL_0 (0x01UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000004 */ +#define ADC_JSQR_JEXTSEL_1 (0x02UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000008 */ +#define ADC_JSQR_JEXTSEL_2 (0x04UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000010 */ +#define ADC_JSQR_JEXTSEL_3 (0x08UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000020 */ +#define ADC_JSQR_JEXTSEL_4 (0x10UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000040 */ + +#define ADC_JSQR_JEXTEN_Pos (7U) +#define ADC_JSQR_JEXTEN_Msk (0x3UL << ADC_JSQR_JEXTEN_Pos) /*!< 0x00000180 */ +#define ADC_JSQR_JEXTEN ADC_JSQR_JEXTEN_Msk /*!< ADC external trigger enable and polarity selection for injected channels */ +#define ADC_JSQR_JEXTEN_0 (0x1UL << ADC_JSQR_JEXTEN_Pos) /*!< 0x00000080 */ +#define ADC_JSQR_JEXTEN_1 (0x2UL << ADC_JSQR_JEXTEN_Pos) /*!< 0x00000100 */ + +#define ADC_JSQR_JSQ1_Pos (9U) +#define ADC_JSQR_JSQ1_Msk (0x1FUL << ADC_JSQR_JSQ1_Pos) /*!< 0x00003E00 */ +#define ADC_JSQR_JSQ1 ADC_JSQR_JSQ1_Msk /*!< ADC 1st conversion in injected sequence */ +#define ADC_JSQR_JSQ1_0 (0x01UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00000200 */ +#define ADC_JSQR_JSQ1_1 (0x02UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00000400 */ +#define ADC_JSQR_JSQ1_2 (0x04UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00000800 */ +#define ADC_JSQR_JSQ1_3 (0x08UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00001000 */ +#define ADC_JSQR_JSQ1_4 (0x10UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00002000 */ + +#define ADC_JSQR_JSQ2_Pos (15U) +#define ADC_JSQR_JSQ2_Msk (0x1FUL << ADC_JSQR_JSQ2_Pos) /*!< 0x000F8000 */ +#define ADC_JSQR_JSQ2 ADC_JSQR_JSQ2_Msk /*!< ADC 2nd conversion in injected sequence */ +#define ADC_JSQR_JSQ2_0 (0x01UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00008000 */ +#define ADC_JSQR_JSQ2_1 (0x02UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00010000 */ +#define ADC_JSQR_JSQ2_2 (0x04UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00020000 */ +#define ADC_JSQR_JSQ2_3 (0x08UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00040000 */ +#define ADC_JSQR_JSQ2_4 (0x10UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00080000 */ + +#define ADC_JSQR_JSQ3_Pos (21U) +#define ADC_JSQR_JSQ3_Msk (0x1FUL << ADC_JSQR_JSQ3_Pos) /*!< 0x03E00000 */ +#define ADC_JSQR_JSQ3 ADC_JSQR_JSQ3_Msk /*!< ADC 3rd conversion in injected sequence */ +#define ADC_JSQR_JSQ3_0 (0x01UL << ADC_JSQR_JSQ3_Pos) /*!< 0x00200000 */ +#define ADC_JSQR_JSQ3_1 (0x02UL << ADC_JSQR_JSQ3_Pos) /*!< 0x00400000 */ +#define ADC_JSQR_JSQ3_2 (0x04UL << ADC_JSQR_JSQ3_Pos) /*!< 0x00800000 */ +#define ADC_JSQR_JSQ3_3 (0x08UL << ADC_JSQR_JSQ3_Pos) /*!< 0x01000000 */ +#define ADC_JSQR_JSQ3_4 (0x10UL << ADC_JSQR_JSQ3_Pos) /*!< 0x02000000 */ + +#define ADC_JSQR_JSQ4_Pos (27U) +#define ADC_JSQR_JSQ4_Msk (0x1FUL << ADC_JSQR_JSQ4_Pos) /*!< 0xF8000000 */ +#define ADC_JSQR_JSQ4 ADC_JSQR_JSQ4_Msk /*!< ADC 4th conversion in injected sequence */ +#define ADC_JSQR_JSQ4_0 (0x01UL << ADC_JSQR_JSQ4_Pos) /*!< 0x08000000 */ +#define ADC_JSQR_JSQ4_1 (0x02UL << ADC_JSQR_JSQ4_Pos) /*!< 0x10000000 */ +#define ADC_JSQR_JSQ4_2 (0x04UL << ADC_JSQR_JSQ4_Pos) /*!< 0x20000000 */ +#define ADC_JSQR_JSQ4_3 (0x08UL << ADC_JSQR_JSQ4_Pos) /*!< 0x40000000 */ +#define ADC_JSQR_JSQ4_4 (0x10UL << ADC_JSQR_JSQ4_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_OFR1 register ********************/ +#define ADC_OFR1_OFFSET1_Pos (0U) +#define ADC_OFR1_OFFSET1_Msk (0x3FFFFFFUL << ADC_OFR1_OFFSET1_Pos) /*!< 0x03FFFFFF */ +#define ADC_OFR1_OFFSET1 ADC_OFR1_OFFSET1_Msk /*!< ADC data offset 1 for channel programmed into bits OFFSET1_CH[4:0] */ +#define ADC_OFR1_OFFSET1_0 (0x0000001UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000001 */ +#define ADC_OFR1_OFFSET1_1 (0x0000002UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000002 */ +#define ADC_OFR1_OFFSET1_2 (0x0000004UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000004 */ +#define ADC_OFR1_OFFSET1_3 (0x0000008UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000008 */ +#define ADC_OFR1_OFFSET1_4 (0x0000010UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000010 */ +#define ADC_OFR1_OFFSET1_5 (0x0000020UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000020 */ +#define ADC_OFR1_OFFSET1_6 (0x0000040UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000040 */ +#define ADC_OFR1_OFFSET1_7 (0x0000080UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000080 */ +#define ADC_OFR1_OFFSET1_8 (0x0000100UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000100 */ +#define ADC_OFR1_OFFSET1_9 (0x0000200UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000200 */ +#define ADC_OFR1_OFFSET1_10 (0x0000400UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000400 */ +#define ADC_OFR1_OFFSET1_11 (0x0000800UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000800 */ +#define ADC_OFR1_OFFSET1_12 (0x0001000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00001000 */ +#define ADC_OFR1_OFFSET1_13 (0x0002000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00002000 */ +#define ADC_OFR1_OFFSET1_14 (0x0004000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00004000 */ +#define ADC_OFR1_OFFSET1_15 (0x0008000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00008000 */ +#define ADC_OFR1_OFFSET1_16 (0x0010000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00010000 */ +#define ADC_OFR1_OFFSET1_17 (0x0020000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00020000 */ +#define ADC_OFR1_OFFSET1_18 (0x0040000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00040000 */ +#define ADC_OFR1_OFFSET1_19 (0x0080000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00080000 */ +#define ADC_OFR1_OFFSET1_20 (0x0100000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00100000 */ +#define ADC_OFR1_OFFSET1_21 (0x0200000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00200000 */ +#define ADC_OFR1_OFFSET1_22 (0x0400000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00400000 */ +#define ADC_OFR1_OFFSET1_23 (0x0800000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00800000 */ +#define ADC_OFR1_OFFSET1_24 (0x1000000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x01000000 */ +#define ADC_OFR1_OFFSET1_25 (0x2000000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x02000000 */ + +#define ADC_OFR1_OFFSET1_CH_Pos (26U) +#define ADC_OFR1_OFFSET1_CH_Msk (0x1FUL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR1_OFFSET1_CH ADC_OFR1_OFFSET1_CH_Msk /*!< ADC Channel selection for the data offset 1 */ +#define ADC_OFR1_OFFSET1_CH_0 (0x01UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR1_OFFSET1_CH_1 (0x02UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR1_OFFSET1_CH_2 (0x04UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR1_OFFSET1_CH_3 (0x08UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR1_OFFSET1_CH_4 (0x10UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR1_SSATE_Pos (31U) +#define ADC_OFR1_SSATE_Msk (0x1UL << ADC_OFR1_SSATE_Pos) /*!< 0x80000000 */ +#define ADC_OFR1_SSATE ADC_OFR1_SSATE_Msk /*!< ADC Signed saturation Enable */ + +#define ADC3_OFR1_OFFSET1_Pos (0U) +#define ADC3_OFR1_OFFSET1_Msk (0xFFFUL << ADC3_OFR1_OFFSET1_Pos) /*!< 0x00000FFF */ +#define ADC3_OFR1_OFFSET1 ADC3_OFR1_OFFSET1_Msk /*!< ADC data offset 1 for channel programmed into bits OFFSET1_CH[4:0] */ + +#define ADC3_OFR1_OFFSETPOS_Pos (24U) +#define ADC3_OFR1_OFFSETPOS_Msk (0x1UL << ADC3_OFR1_OFFSETPOS_Pos) /*!< 0x01000000 */ +#define ADC3_OFR1_OFFSETPOS ADC3_OFR1_OFFSETPOS_Msk /*!< ADC offset number 1 positive */ +#define ADC3_OFR1_SATEN_Pos (25U) +#define ADC3_OFR1_SATEN_Msk (0x1UL << ADC3_OFR1_SATEN_Pos) /*!< 0x02000000 */ +#define ADC3_OFR1_SATEN ADC3_OFR1_SATEN_Msk /*!< ADC offset number 1 saturation enable */ + +#define ADC3_OFR1_OFFSET1_EN_Pos (31U) +#define ADC3_OFR1_OFFSET1_EN_Msk (0x1UL << ADC3_OFR1_OFFSET1_EN_Pos) /*!< 0x80000000 */ +#define ADC3_OFR1_OFFSET1_EN ADC3_OFR1_OFFSET1_EN_Msk /*!< ADC offset number 1 enable */ + +/******************** Bit definition for ADC_OFR2 register ********************/ +#define ADC_OFR2_OFFSET2_Pos (0U) +#define ADC_OFR2_OFFSET2_Msk (0x3FFFFFFUL << ADC_OFR2_OFFSET2_Pos) /*!< 0x03FFFFFF */ +#define ADC_OFR2_OFFSET2 ADC_OFR2_OFFSET2_Msk /*!< ADC data offset 2 for channel programmed into bits OFFSET2_CH[4:0] */ +#define ADC_OFR2_OFFSET2_0 (0x0000001UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000001 */ +#define ADC_OFR2_OFFSET2_1 (0x0000002UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000002 */ +#define ADC_OFR2_OFFSET2_2 (0x0000004UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000004 */ +#define ADC_OFR2_OFFSET2_3 (0x0000008UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000008 */ +#define ADC_OFR2_OFFSET2_4 (0x0000010UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000010 */ +#define ADC_OFR2_OFFSET2_5 (0x0000020UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000020 */ +#define ADC_OFR2_OFFSET2_6 (0x0000040UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000040 */ +#define ADC_OFR2_OFFSET2_7 (0x0000080UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000080 */ +#define ADC_OFR2_OFFSET2_8 (0x0000100UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000100 */ +#define ADC_OFR2_OFFSET2_9 (0x0000200UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000200 */ +#define ADC_OFR2_OFFSET2_10 (0x0000400UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000400 */ +#define ADC_OFR2_OFFSET2_11 (0x0000800UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000800 */ +#define ADC_OFR2_OFFSET2_12 (0x0001000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00001000 */ +#define ADC_OFR2_OFFSET2_13 (0x0002000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00002000 */ +#define ADC_OFR2_OFFSET2_14 (0x0004000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00004000 */ +#define ADC_OFR2_OFFSET2_15 (0x0008000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00008000 */ +#define ADC_OFR2_OFFSET2_16 (0x0010000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00010000 */ +#define ADC_OFR2_OFFSET2_17 (0x0020000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00020000 */ +#define ADC_OFR2_OFFSET2_18 (0x0040000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00040000 */ +#define ADC_OFR2_OFFSET2_19 (0x0080000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00080000 */ +#define ADC_OFR2_OFFSET2_20 (0x0100000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00100000 */ +#define ADC_OFR2_OFFSET2_21 (0x0200000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00200000 */ +#define ADC_OFR2_OFFSET2_22 (0x0400000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00400000 */ +#define ADC_OFR2_OFFSET2_23 (0x0800000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00800000 */ +#define ADC_OFR2_OFFSET2_24 (0x1000000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x01000000 */ +#define ADC_OFR2_OFFSET2_25 (0x2000000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x02000000 */ + +#define ADC_OFR2_OFFSET2_CH_Pos (26U) +#define ADC_OFR2_OFFSET2_CH_Msk (0x1FUL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR2_OFFSET2_CH ADC_OFR2_OFFSET2_CH_Msk /*!< ADC Channel selection for the data offset 2 */ +#define ADC_OFR2_OFFSET2_CH_0 (0x01UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR2_OFFSET2_CH_1 (0x02UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR2_OFFSET2_CH_2 (0x04UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR2_OFFSET2_CH_3 (0x08UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR2_OFFSET2_CH_4 (0x10UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR2_SSATE_Pos (31U) +#define ADC_OFR2_SSATE_Msk (0x1UL << ADC_OFR2_SSATE_Pos) /*!< 0x80000000 */ +#define ADC_OFR2_SSATE ADC_OFR2_SSATE_Msk /*!< ADC Signed saturation Enable */ + +#define ADC3_OFR2_OFFSET2_Pos (0U) +#define ADC3_OFR2_OFFSET2_Msk (0xFFFUL << ADC3_OFR2_OFFSET2_Pos) /*!< 0x00000FFF */ +#define ADC3_OFR2_OFFSET2 ADC3_OFR2_OFFSET2_Msk /*!< ADC data offset 2 for channel programmed into bits OFFSET1_CH[4:0] */ + +#define ADC3_OFR2_OFFSETPOS_Pos (24U) +#define ADC3_OFR2_OFFSETPOS_Msk (0x1UL << ADC3_OFR2_OFFSETPOS_Pos) /*!< 0x01000000 */ +#define ADC3_OFR2_OFFSETPOS ADC3_OFR2_OFFSETPOS_Msk /*!< ADC offset number 2 positive */ +#define ADC3_OFR2_SATEN_Pos (25U) +#define ADC3_OFR2_SATEN_Msk (0x1UL << ADC3_OFR2_SATEN_Pos) /*!< 0x02000000 */ +#define ADC3_OFR2_SATEN ADC3_OFR2_SATEN_Msk /*!< ADC offset number 2 saturation enable */ + +#define ADC3_OFR2_OFFSET2_EN_Pos (31U) +#define ADC3_OFR2_OFFSET2_EN_Msk (0x1UL << ADC3_OFR2_OFFSET2_EN_Pos) /*!< 0x80000000 */ +#define ADC3_OFR2_OFFSET2_EN ADC3_OFR2_OFFSET2_EN_Msk /*!< ADC offset number 2 enable */ + +/******************** Bit definition for ADC_OFR3 register ********************/ +#define ADC_OFR3_OFFSET3_Pos (0U) +#define ADC_OFR3_OFFSET3_Msk (0x3FFFFFFUL << ADC_OFR3_OFFSET3_Pos) /*!< 0x03FFFFFF */ +#define ADC_OFR3_OFFSET3 ADC_OFR3_OFFSET3_Msk /*!< ADC data offset 3 for channel programmed into bits OFFSET3_CH[4:0] */ +#define ADC_OFR3_OFFSET3_0 (0x0000001UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000001 */ +#define ADC_OFR3_OFFSET3_1 (0x0000002UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000002 */ +#define ADC_OFR3_OFFSET3_2 (0x0000004UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000004 */ +#define ADC_OFR3_OFFSET3_3 (0x0000008UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000008 */ +#define ADC_OFR3_OFFSET3_4 (0x0000010UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000010 */ +#define ADC_OFR3_OFFSET3_5 (0x0000020UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000020 */ +#define ADC_OFR3_OFFSET3_6 (0x0000040UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000040 */ +#define ADC_OFR3_OFFSET3_7 (0x0000080UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000080 */ +#define ADC_OFR3_OFFSET3_8 (0x0000100UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000100 */ +#define ADC_OFR3_OFFSET3_9 (0x0000200UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000200 */ +#define ADC_OFR3_OFFSET3_10 (0x0000400UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000400 */ +#define ADC_OFR3_OFFSET3_11 (0x0000800UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000800 */ +#define ADC_OFR3_OFFSET3_12 (0x0001000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00001000 */ +#define ADC_OFR3_OFFSET3_13 (0x0002000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00002000 */ +#define ADC_OFR3_OFFSET3_14 (0x0004000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00004000 */ +#define ADC_OFR3_OFFSET3_15 (0x0008000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00008000 */ +#define ADC_OFR3_OFFSET3_16 (0x0010000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00010000 */ +#define ADC_OFR3_OFFSET3_17 (0x0020000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00020000 */ +#define ADC_OFR3_OFFSET3_18 (0x0040000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00040000 */ +#define ADC_OFR3_OFFSET3_19 (0x0080000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00080000 */ +#define ADC_OFR3_OFFSET3_20 (0x0100000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00100000 */ +#define ADC_OFR3_OFFSET3_21 (0x0200000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00200000 */ +#define ADC_OFR3_OFFSET3_22 (0x0400000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00400000 */ +#define ADC_OFR3_OFFSET3_23 (0x0800000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00800000 */ +#define ADC_OFR3_OFFSET3_24 (0x1000000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x01000000 */ +#define ADC_OFR3_OFFSET3_25 (0x2000000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x02000000 */ + +#define ADC_OFR3_OFFSET3_CH_Pos (26U) +#define ADC_OFR3_OFFSET3_CH_Msk (0x1FUL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR3_OFFSET3_CH ADC_OFR3_OFFSET3_CH_Msk /*!< ADC Channel selection for the data offset 3 */ +#define ADC_OFR3_OFFSET3_CH_0 (0x01UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR3_OFFSET3_CH_1 (0x02UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR3_OFFSET3_CH_2 (0x04UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR3_OFFSET3_CH_3 (0x08UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR3_OFFSET3_CH_4 (0x10UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR3_SSATE_Pos (31U) +#define ADC_OFR3_SSATE_Msk (0x1UL << ADC_OFR3_SSATE_Pos) /*!< 0x80000000 */ +#define ADC_OFR3_SSATE ADC_OFR3_SSATE_Msk /*!< ADC Signed saturation Enable */ + +#define ADC3_OFR3_OFFSET3_Pos (0U) +#define ADC3_OFR3_OFFSET3_Msk (0xFFFUL << ADC3_OFR3_OFFSET3_Pos) /*!< 0x00000FFF */ +#define ADC3_OFR3_OFFSET3 ADC3_OFR3_OFFSET3_Msk /*!< ADC data offset 3 for channel programmed into bits OFFSET1_CH[4:0] */ + +#define ADC3_OFR3_OFFSETPOS_Pos (24U) +#define ADC3_OFR3_OFFSETPOS_Msk (0x1UL << ADC3_OFR3_OFFSETPOS_Pos) /*!< 0x01000000 */ +#define ADC3_OFR3_OFFSETPOS ADC3_OFR3_OFFSETPOS_Msk /*!< ADC offset number 3 positive */ +#define ADC3_OFR3_SATEN_Pos (25U) +#define ADC3_OFR3_SATEN_Msk (0x1UL << ADC3_OFR3_SATEN_Pos) /*!< 0x02000000 */ +#define ADC3_OFR3_SATEN ADC3_OFR3_SATEN_Msk /*!< ADC offset number 3 saturation enable */ + +#define ADC3_OFR3_OFFSET3_EN_Pos (31U) +#define ADC3_OFR3_OFFSET3_EN_Msk (0x1UL << ADC3_OFR3_OFFSET3_EN_Pos) /*!< 0x80000000 */ +#define ADC3_OFR3_OFFSET3_EN ADC3_OFR3_OFFSET3_EN_Msk /*!< ADC offset number 3 enable */ + +/******************** Bit definition for ADC_OFR4 register ********************/ +#define ADC_OFR4_OFFSET4_Pos (0U) +#define ADC_OFR4_OFFSET4_Msk (0x3FFFFFFUL << ADC_OFR4_OFFSET4_Pos) /*!< 0x03FFFFFF */ +#define ADC_OFR4_OFFSET4 ADC_OFR4_OFFSET4_Msk /*!< ADC data offset 4 for channel programmed into bits OFFSET4_CH[4:0] */ +#define ADC_OFR4_OFFSET4_0 (0x0000001UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000001 */ +#define ADC_OFR4_OFFSET4_1 (0x0000002UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000002 */ +#define ADC_OFR4_OFFSET4_2 (0x0000004UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000004 */ +#define ADC_OFR4_OFFSET4_3 (0x0000008UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000008 */ +#define ADC_OFR4_OFFSET4_4 (0x0000010UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000010 */ +#define ADC_OFR4_OFFSET4_5 (0x0000020UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000020 */ +#define ADC_OFR4_OFFSET4_6 (0x0000040UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000040 */ +#define ADC_OFR4_OFFSET4_7 (0x0000080UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000080 */ +#define ADC_OFR4_OFFSET4_8 (0x0000100UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000100 */ +#define ADC_OFR4_OFFSET4_9 (0x0000200UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000200 */ +#define ADC_OFR4_OFFSET4_10 (0x0000400UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000400 */ +#define ADC_OFR4_OFFSET4_11 (0x0000800UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000800 */ +#define ADC_OFR4_OFFSET4_12 (0x0001000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00001000 */ +#define ADC_OFR4_OFFSET4_13 (0x0002000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00002000 */ +#define ADC_OFR4_OFFSET4_14 (0x0004000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00004000 */ +#define ADC_OFR4_OFFSET4_15 (0x0008000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00008000 */ +#define ADC_OFR4_OFFSET4_16 (0x0010000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00010000 */ +#define ADC_OFR4_OFFSET4_17 (0x0020000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00020000 */ +#define ADC_OFR4_OFFSET4_18 (0x0040000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00040000 */ +#define ADC_OFR4_OFFSET4_19 (0x0080000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00080000 */ +#define ADC_OFR4_OFFSET4_20 (0x0100000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00100000 */ +#define ADC_OFR4_OFFSET4_21 (0x0200000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00200000 */ +#define ADC_OFR4_OFFSET4_22 (0x0400000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00400000 */ +#define ADC_OFR4_OFFSET4_23 (0x0800000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00800000 */ +#define ADC_OFR4_OFFSET4_24 (0x1000000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x01000000 */ +#define ADC_OFR4_OFFSET4_25 (0x2000000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x02000000 */ + +#define ADC_OFR4_OFFSET4_CH_Pos (26U) +#define ADC_OFR4_OFFSET4_CH_Msk (0x1FUL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR4_OFFSET4_CH ADC_OFR4_OFFSET4_CH_Msk /*!< ADC Channel selection for the data offset 4 */ +#define ADC_OFR4_OFFSET4_CH_0 (0x01UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR4_OFFSET4_CH_1 (0x02UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR4_OFFSET4_CH_2 (0x04UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR4_OFFSET4_CH_3 (0x08UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR4_OFFSET4_CH_4 (0x10UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR4_SSATE_Pos (31U) +#define ADC_OFR4_SSATE_Msk (0x1UL << ADC_OFR4_SSATE_Pos) /*!< 0x80000000 */ +#define ADC_OFR4_SSATE ADC_OFR4_SSATE_Msk /*!< ADC Signed saturation Enable */ + +#define ADC3_OFR4_OFFSET4_Pos (0U) +#define ADC3_OFR4_OFFSET4_Msk (0xFFFUL << ADC3_OFR4_OFFSET4_Pos) /*!< 0x00000FFF */ +#define ADC3_OFR4_OFFSET4 ADC3_OFR4_OFFSET4_Msk /*!< ADC data offset 4 for channel programmed into bits OFFSET1_CH[4:0] */ + +#define ADC3_OFR4_OFFSETPOS_Pos (24U) +#define ADC3_OFR4_OFFSETPOS_Msk (0x1UL << ADC3_OFR4_OFFSETPOS_Pos) /*!< 0x01000000 */ +#define ADC3_OFR4_OFFSETPOS ADC3_OFR4_OFFSETPOS_Msk /*!< ADC offset number 4 positive */ +#define ADC3_OFR4_SATEN_Pos (25U) +#define ADC3_OFR4_SATEN_Msk (0x1UL << ADC3_OFR4_SATEN_Pos) /*!< 0x02000000 */ +#define ADC3_OFR4_SATEN ADC3_OFR4_SATEN_Msk /*!< ADC offset number 4 saturation enable */ + +#define ADC3_OFR4_OFFSET4_EN_Pos (31U) +#define ADC3_OFR4_OFFSET4_EN_Msk (0x1UL << ADC3_OFR4_OFFSET4_EN_Pos) /*!< 0x80000000 */ +#define ADC3_OFR4_OFFSET4_EN ADC3_OFR4_OFFSET4_EN_Msk /*!< ADC offset number 4 enable */ + +/******************** Bit definition for ADC_JDR1 register ********************/ +#define ADC_JDR1_JDATA_Pos (0U) +#define ADC_JDR1_JDATA_Msk (0xFFFFFFFFUL << ADC_JDR1_JDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_JDR1_JDATA ADC_JDR1_JDATA_Msk /*!< ADC Injected DATA */ +#define ADC_JDR1_JDATA_0 (0x00000001UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR1_JDATA_1 (0x00000002UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR1_JDATA_2 (0x00000004UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR1_JDATA_3 (0x00000008UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR1_JDATA_4 (0x00000010UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR1_JDATA_5 (0x00000020UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR1_JDATA_6 (0x00000040UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR1_JDATA_7 (0x00000080UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR1_JDATA_8 (0x00000100UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR1_JDATA_9 (0x00000200UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR1_JDATA_10 (0x00000400UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR1_JDATA_11 (0x00000800UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR1_JDATA_12 (0x00001000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR1_JDATA_13 (0x00002000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR1_JDATA_14 (0x00004000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR1_JDATA_15 (0x00008000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00008000 */ +#define ADC_JDR1_JDATA_16 (0x00010000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00010000 */ +#define ADC_JDR1_JDATA_17 (0x00020000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00020000 */ +#define ADC_JDR1_JDATA_18 (0x00040000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00040000 */ +#define ADC_JDR1_JDATA_19 (0x00080000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00080000 */ +#define ADC_JDR1_JDATA_20 (0x00100000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00100000 */ +#define ADC_JDR1_JDATA_21 (0x00200000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00200000 */ +#define ADC_JDR1_JDATA_22 (0x00400000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00400000 */ +#define ADC_JDR1_JDATA_23 (0x00800000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00800000 */ +#define ADC_JDR1_JDATA_24 (0x01000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x01000000 */ +#define ADC_JDR1_JDATA_25 (0x02000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x02000000 */ +#define ADC_JDR1_JDATA_26 (0x04000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x04000000 */ +#define ADC_JDR1_JDATA_27 (0x08000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x08000000 */ +#define ADC_JDR1_JDATA_28 (0x10000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x10000000 */ +#define ADC_JDR1_JDATA_29 (0x20000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x20000000 */ +#define ADC_JDR1_JDATA_30 (0x40000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x40000000 */ +#define ADC_JDR1_JDATA_31 (0x80000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_JDR2 register ********************/ +#define ADC_JDR2_JDATA_Pos (0U) +#define ADC_JDR2_JDATA_Msk (0xFFFFFFFFUL << ADC_JDR2_JDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_JDR2_JDATA ADC_JDR2_JDATA_Msk /*!< ADC Injected DATA */ +#define ADC_JDR2_JDATA_0 (0x00000001UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR2_JDATA_1 (0x00000002UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR2_JDATA_2 (0x00000004UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR2_JDATA_3 (0x00000008UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR2_JDATA_4 (0x00000010UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR2_JDATA_5 (0x00000020UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR2_JDATA_6 (0x00000040UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR2_JDATA_7 (0x00000080UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR2_JDATA_8 (0x00000100UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR2_JDATA_9 (0x00000200UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR2_JDATA_10 (0x00000400UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR2_JDATA_11 (0x00000800UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR2_JDATA_12 (0x00001000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR2_JDATA_13 (0x00002000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR2_JDATA_14 (0x00004000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR2_JDATA_15 (0x00008000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00008000 */ +#define ADC_JDR2_JDATA_16 (0x00010000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00010000 */ +#define ADC_JDR2_JDATA_17 (0x00020000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00020000 */ +#define ADC_JDR2_JDATA_18 (0x00040000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00040000 */ +#define ADC_JDR2_JDATA_19 (0x00080000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00080000 */ +#define ADC_JDR2_JDATA_20 (0x00100000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00100000 */ +#define ADC_JDR2_JDATA_21 (0x00200000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00200000 */ +#define ADC_JDR2_JDATA_22 (0x00400000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00400000 */ +#define ADC_JDR2_JDATA_23 (0x00800000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00800000 */ +#define ADC_JDR2_JDATA_24 (0x01000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x01000000 */ +#define ADC_JDR2_JDATA_25 (0x02000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x02000000 */ +#define ADC_JDR2_JDATA_26 (0x04000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x04000000 */ +#define ADC_JDR2_JDATA_27 (0x08000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x08000000 */ +#define ADC_JDR2_JDATA_28 (0x10000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x10000000 */ +#define ADC_JDR2_JDATA_29 (0x20000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x20000000 */ +#define ADC_JDR2_JDATA_30 (0x40000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x40000000 */ +#define ADC_JDR2_JDATA_31 (0x80000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_JDR3 register ********************/ +#define ADC_JDR3_JDATA_Pos (0U) +#define ADC_JDR3_JDATA_Msk (0xFFFFFFFFUL << ADC_JDR3_JDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_JDR3_JDATA ADC_JDR3_JDATA_Msk /*!< ADC Injected DATA */ +#define ADC_JDR3_JDATA_0 (0x00000001UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR3_JDATA_1 (0x00000002UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR3_JDATA_2 (0x00000004UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR3_JDATA_3 (0x00000008UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR3_JDATA_4 (0x00000010UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR3_JDATA_5 (0x00000020UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR3_JDATA_6 (0x00000040UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR3_JDATA_7 (0x00000080UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR3_JDATA_8 (0x00000100UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR3_JDATA_9 (0x00000200UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR3_JDATA_10 (0x00000400UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR3_JDATA_11 (0x00000800UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR3_JDATA_12 (0x00001000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR3_JDATA_13 (0x00002000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR3_JDATA_14 (0x00004000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR3_JDATA_15 (0x00008000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00008000 */ +#define ADC_JDR3_JDATA_16 (0x00010000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00010000 */ +#define ADC_JDR3_JDATA_17 (0x00020000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00020000 */ +#define ADC_JDR3_JDATA_18 (0x00040000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00040000 */ +#define ADC_JDR3_JDATA_19 (0x00080000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00080000 */ +#define ADC_JDR3_JDATA_20 (0x00100000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00100000 */ +#define ADC_JDR3_JDATA_21 (0x00200000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00200000 */ +#define ADC_JDR3_JDATA_22 (0x00400000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00400000 */ +#define ADC_JDR3_JDATA_23 (0x00800000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00800000 */ +#define ADC_JDR3_JDATA_24 (0x01000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x01000000 */ +#define ADC_JDR3_JDATA_25 (0x02000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x02000000 */ +#define ADC_JDR3_JDATA_26 (0x04000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x04000000 */ +#define ADC_JDR3_JDATA_27 (0x08000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x08000000 */ +#define ADC_JDR3_JDATA_28 (0x10000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x10000000 */ +#define ADC_JDR3_JDATA_29 (0x20000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x20000000 */ +#define ADC_JDR3_JDATA_30 (0x40000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x40000000 */ +#define ADC_JDR3_JDATA_31 (0x80000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_JDR4 register ********************/ +#define ADC_JDR4_JDATA_Pos (0U) +#define ADC_JDR4_JDATA_Msk (0xFFFFFFFFUL << ADC_JDR4_JDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_JDR4_JDATA ADC_JDR4_JDATA_Msk /*!< ADC Injected DATA */ +#define ADC_JDR4_JDATA_0 (0x00000001UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR4_JDATA_1 (0x00000002UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR4_JDATA_2 (0x00000004UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR4_JDATA_3 (0x00000008UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR4_JDATA_4 (0x00000010UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR4_JDATA_5 (0x00000020UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR4_JDATA_6 (0x00000040UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR4_JDATA_7 (0x00000080UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR4_JDATA_8 (0x00000100UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR4_JDATA_9 (0x00000200UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR4_JDATA_10 (0x00000400UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR4_JDATA_11 (0x00000800UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR4_JDATA_12 (0x00001000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR4_JDATA_13 (0x00002000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR4_JDATA_14 (0x00004000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR4_JDATA_15 (0x00008000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00008000 */ +#define ADC_JDR4_JDATA_16 (0x00010000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00010000 */ +#define ADC_JDR4_JDATA_17 (0x00020000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00020000 */ +#define ADC_JDR4_JDATA_18 (0x00040000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00040000 */ +#define ADC_JDR4_JDATA_19 (0x00080000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00080000 */ +#define ADC_JDR4_JDATA_20 (0x00100000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00100000 */ +#define ADC_JDR4_JDATA_21 (0x00200000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00200000 */ +#define ADC_JDR4_JDATA_22 (0x00400000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00400000 */ +#define ADC_JDR4_JDATA_23 (0x00800000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00800000 */ +#define ADC_JDR4_JDATA_24 (0x01000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x01000000 */ +#define ADC_JDR4_JDATA_25 (0x02000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x02000000 */ +#define ADC_JDR4_JDATA_26 (0x04000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x04000000 */ +#define ADC_JDR4_JDATA_27 (0x08000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x08000000 */ +#define ADC_JDR4_JDATA_28 (0x10000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x10000000 */ +#define ADC_JDR4_JDATA_29 (0x20000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x20000000 */ +#define ADC_JDR4_JDATA_30 (0x40000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x40000000 */ +#define ADC_JDR4_JDATA_31 (0x80000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_AWD2CR register ********************/ +#define ADC_AWD2CR_AWD2CH_Pos (0U) +#define ADC_AWD2CR_AWD2CH_Msk (0xFFFFFUL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x000FFFFF */ +#define ADC_AWD2CR_AWD2CH ADC_AWD2CR_AWD2CH_Msk /*!< ADC Analog watchdog 2 channel selection */ +#define ADC_AWD2CR_AWD2CH_0 (0x00001UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000001 */ +#define ADC_AWD2CR_AWD2CH_1 (0x00002UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000002 */ +#define ADC_AWD2CR_AWD2CH_2 (0x00004UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000004 */ +#define ADC_AWD2CR_AWD2CH_3 (0x00008UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000008 */ +#define ADC_AWD2CR_AWD2CH_4 (0x00010UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000010 */ +#define ADC_AWD2CR_AWD2CH_5 (0x00020UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000020 */ +#define ADC_AWD2CR_AWD2CH_6 (0x00040UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000040 */ +#define ADC_AWD2CR_AWD2CH_7 (0x00080UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000080 */ +#define ADC_AWD2CR_AWD2CH_8 (0x00100UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000100 */ +#define ADC_AWD2CR_AWD2CH_9 (0x00200UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000200 */ +#define ADC_AWD2CR_AWD2CH_10 (0x00400UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000400 */ +#define ADC_AWD2CR_AWD2CH_11 (0x00800UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000800 */ +#define ADC_AWD2CR_AWD2CH_12 (0x01000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00001000 */ +#define ADC_AWD2CR_AWD2CH_13 (0x02000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00002000 */ +#define ADC_AWD2CR_AWD2CH_14 (0x04000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00004000 */ +#define ADC_AWD2CR_AWD2CH_15 (0x08000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00008000 */ +#define ADC_AWD2CR_AWD2CH_16 (0x10000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00010000 */ +#define ADC_AWD2CR_AWD2CH_17 (0x20000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00020000 */ +#define ADC_AWD2CR_AWD2CH_18 (0x40000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00040000 */ +#define ADC_AWD2CR_AWD2CH_19 (0x80000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00080000 */ + +/******************** Bit definition for ADC_AWD3CR register ********************/ +#define ADC_AWD3CR_AWD3CH_Pos (0U) +#define ADC_AWD3CR_AWD3CH_Msk (0xFFFFFUL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x000FFFFF */ +#define ADC_AWD3CR_AWD3CH ADC_AWD3CR_AWD3CH_Msk /*!< ADC Analog watchdog 2 channel selection */ +#define ADC_AWD3CR_AWD3CH_0 (0x00001UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000001 */ +#define ADC_AWD3CR_AWD3CH_1 (0x00002UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000002 */ +#define ADC_AWD3CR_AWD3CH_2 (0x00004UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000004 */ +#define ADC_AWD3CR_AWD3CH_3 (0x00008UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000008 */ +#define ADC_AWD3CR_AWD3CH_4 (0x00010UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000010 */ +#define ADC_AWD3CR_AWD3CH_5 (0x00020UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000020 */ +#define ADC_AWD3CR_AWD3CH_6 (0x00040UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000040 */ +#define ADC_AWD3CR_AWD3CH_7 (0x00080UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000080 */ +#define ADC_AWD3CR_AWD3CH_8 (0x00100UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000100 */ +#define ADC_AWD3CR_AWD3CH_9 (0x00200UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000200 */ +#define ADC_AWD3CR_AWD3CH_10 (0x00400UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000400 */ +#define ADC_AWD3CR_AWD3CH_11 (0x00800UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000800 */ +#define ADC_AWD3CR_AWD3CH_12 (0x01000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00001000 */ +#define ADC_AWD3CR_AWD3CH_13 (0x02000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00002000 */ +#define ADC_AWD3CR_AWD3CH_14 (0x04000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00004000 */ +#define ADC_AWD3CR_AWD3CH_15 (0x08000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00008000 */ +#define ADC_AWD3CR_AWD3CH_16 (0x10000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00010000 */ +#define ADC_AWD3CR_AWD3CH_17 (0x20000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00020000 */ +#define ADC_AWD3CR_AWD3CH_18 (0x40000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00040000 */ +#define ADC_AWD3CR_AWD3CH_19 (0x80000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00080000 */ + +/******************** Bit definition for ADC_DIFSEL register ********************/ +#define ADC_DIFSEL_DIFSEL_Pos (0U) +#define ADC_DIFSEL_DIFSEL_Msk (0xFFFFFUL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x000FFFFF */ +#define ADC_DIFSEL_DIFSEL ADC_DIFSEL_DIFSEL_Msk /*!< ADC differential modes for channels 1 to 18 */ +#define ADC_DIFSEL_DIFSEL_0 (0x00001UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000001 */ +#define ADC_DIFSEL_DIFSEL_1 (0x00002UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000002 */ +#define ADC_DIFSEL_DIFSEL_2 (0x00004UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000004 */ +#define ADC_DIFSEL_DIFSEL_3 (0x00008UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000008 */ +#define ADC_DIFSEL_DIFSEL_4 (0x00010UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000010 */ +#define ADC_DIFSEL_DIFSEL_5 (0x00020UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000020 */ +#define ADC_DIFSEL_DIFSEL_6 (0x00040UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000040 */ +#define ADC_DIFSEL_DIFSEL_7 (0x00080UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000080 */ +#define ADC_DIFSEL_DIFSEL_8 (0x00100UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000100 */ +#define ADC_DIFSEL_DIFSEL_9 (0x00200UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000200 */ +#define ADC_DIFSEL_DIFSEL_10 (0x00400UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000400 */ +#define ADC_DIFSEL_DIFSEL_11 (0x00800UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000800 */ +#define ADC_DIFSEL_DIFSEL_12 (0x01000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00001000 */ +#define ADC_DIFSEL_DIFSEL_13 (0x02000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00002000 */ +#define ADC_DIFSEL_DIFSEL_14 (0x04000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00004000 */ +#define ADC_DIFSEL_DIFSEL_15 (0x08000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00008000 */ +#define ADC_DIFSEL_DIFSEL_16 (0x10000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00010000 */ +#define ADC_DIFSEL_DIFSEL_17 (0x20000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00020000 */ +#define ADC_DIFSEL_DIFSEL_18 (0x40000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00040000 */ +#define ADC_DIFSEL_DIFSEL_19 (0x80000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00080000 */ + +/******************** Bit definition for ADC_CALFACT register ********************/ +#define ADC_CALFACT_CALFACT_S_Pos (0U) +#define ADC_CALFACT_CALFACT_S_Msk (0x7FFUL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x000007FF */ +#define ADC_CALFACT_CALFACT_S ADC_CALFACT_CALFACT_S_Msk /*!< ADC calibration factors in single-ended mode */ +#define ADC_CALFACT_CALFACT_S_0 (0x001UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000001 */ +#define ADC_CALFACT_CALFACT_S_1 (0x002UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000002 */ +#define ADC_CALFACT_CALFACT_S_2 (0x004UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000004 */ +#define ADC_CALFACT_CALFACT_S_3 (0x008UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000008 */ +#define ADC_CALFACT_CALFACT_S_4 (0x010UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000010 */ +#define ADC_CALFACT_CALFACT_S_5 (0x020UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000020 */ +#define ADC_CALFACT_CALFACT_S_6 (0x040UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000040 */ +#define ADC_CALFACT_CALFACT_S_7 (0x080UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000080 */ +#define ADC_CALFACT_CALFACT_S_8 (0x100UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000100 */ +#define ADC_CALFACT_CALFACT_S_9 (0x200UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000200 */ +#define ADC_CALFACT_CALFACT_S_10 (0x400UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000400 */ +#define ADC_CALFACT_CALFACT_D_Pos (16U) +#define ADC_CALFACT_CALFACT_D_Msk (0x7FFUL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x07FF0000 */ +#define ADC_CALFACT_CALFACT_D ADC_CALFACT_CALFACT_D_Msk /*!< ADC calibration factors in differential mode */ +#define ADC_CALFACT_CALFACT_D_0 (0x001UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00010000 */ +#define ADC_CALFACT_CALFACT_D_1 (0x002UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00020000 */ +#define ADC_CALFACT_CALFACT_D_2 (0x004UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00040000 */ +#define ADC_CALFACT_CALFACT_D_3 (0x008UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00080000 */ +#define ADC_CALFACT_CALFACT_D_4 (0x010UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00100000 */ +#define ADC_CALFACT_CALFACT_D_5 (0x020UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00200000 */ +#define ADC_CALFACT_CALFACT_D_6 (0x040UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00400000 */ +#define ADC_CALFACT_CALFACT_D_7 (0x080UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00800000 */ +#define ADC_CALFACT_CALFACT_D_8 (0x100UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x01000000 */ +#define ADC_CALFACT_CALFACT_D_9 (0x200UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x02000000 */ +#define ADC_CALFACT_CALFACT_D_10 (0x400UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x04000000 */ + +/******************** Bit definition for ADC_CALFACT2 register ********************/ +#define ADC_CALFACT2_LINCALFACT_Pos (0U) +#define ADC_CALFACT2_LINCALFACT_Msk (0x3FFFFFFFUL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x3FFFFFFF */ +#define ADC_CALFACT2_LINCALFACT ADC_CALFACT2_LINCALFACT_Msk /*!< ADC Linearity calibration factors */ +#define ADC_CALFACT2_LINCALFACT_0 (0x00000001UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000001 */ +#define ADC_CALFACT2_LINCALFACT_1 (0x00000002UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000002 */ +#define ADC_CALFACT2_LINCALFACT_2 (0x00000004UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000004 */ +#define ADC_CALFACT2_LINCALFACT_3 (0x00000008UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000008 */ +#define ADC_CALFACT2_LINCALFACT_4 (0x00000010UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000010 */ +#define ADC_CALFACT2_LINCALFACT_5 (0x00000020UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000020 */ +#define ADC_CALFACT2_LINCALFACT_6 (0x00000040UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000040 */ +#define ADC_CALFACT2_LINCALFACT_7 (0x00000080UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000080 */ +#define ADC_CALFACT2_LINCALFACT_8 (0x00000100UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000100 */ +#define ADC_CALFACT2_LINCALFACT_9 (0x00000200UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000200 */ +#define ADC_CALFACT2_LINCALFACT_10 (0x00000400UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000400 */ +#define ADC_CALFACT2_LINCALFACT_11 (0x00000800UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000800 */ +#define ADC_CALFACT2_LINCALFACT_12 (0x00001000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00001000 */ +#define ADC_CALFACT2_LINCALFACT_13 (0x00002000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00002000 */ +#define ADC_CALFACT2_LINCALFACT_14 (0x00004000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00004000 */ +#define ADC_CALFACT2_LINCALFACT_15 (0x00008000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00008000 */ +#define ADC_CALFACT2_LINCALFACT_16 (0x00010000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00010000 */ +#define ADC_CALFACT2_LINCALFACT_17 (0x00020000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00020000 */ +#define ADC_CALFACT2_LINCALFACT_18 (0x00040000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00040000 */ +#define ADC_CALFACT2_LINCALFACT_19 (0x00080000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00080000 */ +#define ADC_CALFACT2_LINCALFACT_20 (0x00100000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00100000 */ +#define ADC_CALFACT2_LINCALFACT_21 (0x00200000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00200000 */ +#define ADC_CALFACT2_LINCALFACT_22 (0x00400000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00400000 */ +#define ADC_CALFACT2_LINCALFACT_23 (0x00800000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00800000 */ +#define ADC_CALFACT2_LINCALFACT_24 (0x01000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x01000000 */ +#define ADC_CALFACT2_LINCALFACT_25 (0x02000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x02000000 */ +#define ADC_CALFACT2_LINCALFACT_26 (0x04000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x04000000 */ +#define ADC_CALFACT2_LINCALFACT_27 (0x08000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x08000000 */ +#define ADC_CALFACT2_LINCALFACT_28 (0x10000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x10000000 */ +#define ADC_CALFACT2_LINCALFACT_29 (0x20000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x20000000 */ + +/************************* ADC Common registers *****************************/ +/******************** Bit definition for ADC_CSR register ********************/ +#define ADC_CSR_ADRDY_MST_Pos (0U) +#define ADC_CSR_ADRDY_MST_Msk (0x1UL << ADC_CSR_ADRDY_MST_Pos) /*!< 0x00000001 */ +#define ADC_CSR_ADRDY_MST ADC_CSR_ADRDY_MST_Msk /*!< Master ADC ready */ +#define ADC_CSR_EOSMP_MST_Pos (1U) +#define ADC_CSR_EOSMP_MST_Msk (0x1UL << ADC_CSR_EOSMP_MST_Pos) /*!< 0x00000002 */ +#define ADC_CSR_EOSMP_MST ADC_CSR_EOSMP_MST_Msk /*!< End of sampling phase flag of the master ADC */ +#define ADC_CSR_EOC_MST_Pos (2U) +#define ADC_CSR_EOC_MST_Msk (0x1UL << ADC_CSR_EOC_MST_Pos) /*!< 0x00000004 */ +#define ADC_CSR_EOC_MST ADC_CSR_EOC_MST_Msk /*!< End of regular conversion of the master ADC */ +#define ADC_CSR_EOS_MST_Pos (3U) +#define ADC_CSR_EOS_MST_Msk (0x1UL << ADC_CSR_EOS_MST_Pos) /*!< 0x00000008 */ +#define ADC_CSR_EOS_MST ADC_CSR_EOS_MST_Msk /*!< End of regular sequence flag of the master ADC */ +#define ADC_CSR_OVR_MST_Pos (4U) +#define ADC_CSR_OVR_MST_Msk (0x1UL << ADC_CSR_OVR_MST_Pos) /*!< 0x00000010 */ +#define ADC_CSR_OVR_MST ADC_CSR_OVR_MST_Msk /*!< Overrun flag of the master ADC */ +#define ADC_CSR_JEOC_MST_Pos (5U) +#define ADC_CSR_JEOC_MST_Msk (0x1UL << ADC_CSR_JEOC_MST_Pos) /*!< 0x00000020 */ +#define ADC_CSR_JEOC_MST ADC_CSR_JEOC_MST_Msk /*!< End of injected conversion of the master ADC */ +#define ADC_CSR_JEOS_MST_Pos (6U) +#define ADC_CSR_JEOS_MST_Msk (0x1UL << ADC_CSR_JEOS_MST_Pos) /*!< 0x00000040 */ +#define ADC_CSR_JEOS_MST ADC_CSR_JEOS_MST_Msk /*!< End of injected sequence flag of the master ADC */ +#define ADC_CSR_AWD1_MST_Pos (7U) +#define ADC_CSR_AWD1_MST_Msk (0x1UL << ADC_CSR_AWD1_MST_Pos) /*!< 0x00000080 */ +#define ADC_CSR_AWD1_MST ADC_CSR_AWD1_MST_Msk /*!< Analog watchdog 1 flag of the master ADC */ +#define ADC_CSR_AWD2_MST_Pos (8U) +#define ADC_CSR_AWD2_MST_Msk (0x1UL << ADC_CSR_AWD2_MST_Pos) /*!< 0x00000100 */ +#define ADC_CSR_AWD2_MST ADC_CSR_AWD2_MST_Msk /*!< Analog watchdog 2 flag of the master ADC */ +#define ADC_CSR_AWD3_MST_Pos (9U) +#define ADC_CSR_AWD3_MST_Msk (0x1UL << ADC_CSR_AWD3_MST_Pos) /*!< 0x00000200 */ +#define ADC_CSR_AWD3_MST ADC_CSR_AWD3_MST_Msk /*!< Analog watchdog 3 flag of the master ADC */ +#define ADC_CSR_JQOVF_MST_Pos (10U) +#define ADC_CSR_JQOVF_MST_Msk (0x1UL << ADC_CSR_JQOVF_MST_Pos) /*!< 0x00000400 */ +#define ADC_CSR_JQOVF_MST ADC_CSR_JQOVF_MST_Msk /*!< Injected context queue overflow flag of the master ADC */ +#define ADC_CSR_ADRDY_SLV_Pos (16U) +#define ADC_CSR_ADRDY_SLV_Msk (0x1UL << ADC_CSR_ADRDY_SLV_Pos) /*!< 0x00010000 */ +#define ADC_CSR_ADRDY_SLV ADC_CSR_ADRDY_SLV_Msk /*!< Slave ADC ready */ +#define ADC_CSR_EOSMP_SLV_Pos (17U) +#define ADC_CSR_EOSMP_SLV_Msk (0x1UL << ADC_CSR_EOSMP_SLV_Pos) /*!< 0x00020000 */ +#define ADC_CSR_EOSMP_SLV ADC_CSR_EOSMP_SLV_Msk /*!< End of sampling phase flag of the slave ADC */ +#define ADC_CSR_EOC_SLV_Pos (18U) +#define ADC_CSR_EOC_SLV_Msk (0x1UL << ADC_CSR_EOC_SLV_Pos) /*!< 0x00040000 */ +#define ADC_CSR_EOC_SLV ADC_CSR_EOC_SLV_Msk /*!< End of regular conversion of the slave ADC */ +#define ADC_CSR_EOS_SLV_Pos (19U) +#define ADC_CSR_EOS_SLV_Msk (0x1UL << ADC_CSR_EOS_SLV_Pos) /*!< 0x00080000 */ +#define ADC_CSR_EOS_SLV ADC_CSR_EOS_SLV_Msk /*!< End of regular sequence flag of the slave ADC */ +#define ADC_CSR_OVR_SLV_Pos (20U) +#define ADC_CSR_OVR_SLV_Msk (0x1UL << ADC_CSR_OVR_SLV_Pos) /*!< 0x00100000 */ +#define ADC_CSR_OVR_SLV ADC_CSR_OVR_SLV_Msk /*!< Overrun flag of the slave ADC */ +#define ADC_CSR_JEOC_SLV_Pos (21U) +#define ADC_CSR_JEOC_SLV_Msk (0x1UL << ADC_CSR_JEOC_SLV_Pos) /*!< 0x00200000 */ +#define ADC_CSR_JEOC_SLV ADC_CSR_JEOC_SLV_Msk /*!< End of injected conversion of the slave ADC */ +#define ADC_CSR_JEOS_SLV_Pos (22U) +#define ADC_CSR_JEOS_SLV_Msk (0x1UL << ADC_CSR_JEOS_SLV_Pos) /*!< 0x00400000 */ +#define ADC_CSR_JEOS_SLV ADC_CSR_JEOS_SLV_Msk /*!< End of injected sequence flag of the slave ADC */ +#define ADC_CSR_AWD1_SLV_Pos (23U) +#define ADC_CSR_AWD1_SLV_Msk (0x1UL << ADC_CSR_AWD1_SLV_Pos) /*!< 0x00800000 */ +#define ADC_CSR_AWD1_SLV ADC_CSR_AWD1_SLV_Msk /*!< Analog watchdog 1 flag of the slave ADC */ +#define ADC_CSR_AWD2_SLV_Pos (24U) +#define ADC_CSR_AWD2_SLV_Msk (0x1UL << ADC_CSR_AWD2_SLV_Pos) /*!< 0x01000000 */ +#define ADC_CSR_AWD2_SLV ADC_CSR_AWD2_SLV_Msk /*!< Analog watchdog 2 flag of the slave ADC */ +#define ADC_CSR_AWD3_SLV_Pos (25U) +#define ADC_CSR_AWD3_SLV_Msk (0x1UL << ADC_CSR_AWD3_SLV_Pos) /*!< 0x02000000 */ +#define ADC_CSR_AWD3_SLV ADC_CSR_AWD3_SLV_Msk /*!< Analog watchdog 3 flag of the slave ADC */ +#define ADC_CSR_JQOVF_SLV_Pos (26U) +#define ADC_CSR_JQOVF_SLV_Msk (0x1UL << ADC_CSR_JQOVF_SLV_Pos) /*!< 0x04000000 */ +#define ADC_CSR_JQOVF_SLV ADC_CSR_JQOVF_SLV_Msk /*!< Injected context queue overflow flag of the slave ADC */ + +/******************** Bit definition for ADC_CCR register ********************/ +#define ADC_CCR_DUAL_Pos (0U) +#define ADC_CCR_DUAL_Msk (0x1FUL << ADC_CCR_DUAL_Pos) /*!< 0x0000001F */ +#define ADC_CCR_DUAL ADC_CCR_DUAL_Msk /*!< Dual ADC mode selection */ +#define ADC_CCR_DUAL_0 (0x01UL << ADC_CCR_DUAL_Pos) /*!< 0x00000001 */ +#define ADC_CCR_DUAL_1 (0x02UL << ADC_CCR_DUAL_Pos) /*!< 0x00000002 */ +#define ADC_CCR_DUAL_2 (0x04UL << ADC_CCR_DUAL_Pos) /*!< 0x00000004 */ +#define ADC_CCR_DUAL_3 (0x08UL << ADC_CCR_DUAL_Pos) /*!< 0x00000008 */ +#define ADC_CCR_DUAL_4 (0x10UL << ADC_CCR_DUAL_Pos) /*!< 0x00000010 */ + +#define ADC_CCR_DELAY_Pos (8U) +#define ADC_CCR_DELAY_Msk (0xFUL << ADC_CCR_DELAY_Pos) /*!< 0x00000F00 */ +#define ADC_CCR_DELAY ADC_CCR_DELAY_Msk /*!< Delay between 2 sampling phases */ +#define ADC_CCR_DELAY_0 (0x1UL << ADC_CCR_DELAY_Pos) /*!< 0x00000100 */ +#define ADC_CCR_DELAY_1 (0x2UL << ADC_CCR_DELAY_Pos) /*!< 0x00000200 */ +#define ADC_CCR_DELAY_2 (0x4UL << ADC_CCR_DELAY_Pos) /*!< 0x00000400 */ +#define ADC_CCR_DELAY_3 (0x8UL << ADC_CCR_DELAY_Pos) /*!< 0x00000800 */ + + +#define ADC_CCR_DAMDF_Pos (14U) +#define ADC_CCR_DAMDF_Msk (0x3UL << ADC_CCR_DAMDF_Pos) /*!< 0x0000C000 */ +#define ADC_CCR_DAMDF ADC_CCR_DAMDF_Msk /*!< Dual ADC mode Data format */ +#define ADC_CCR_DAMDF_0 (0x1UL << ADC_CCR_DAMDF_Pos) /*!< 0x00004000 */ +#define ADC_CCR_DAMDF_1 (0x2UL << ADC_CCR_DAMDF_Pos) /*!< 0x00008000 */ + +#define ADC_CCR_CKMODE_Pos (16U) +#define ADC_CCR_CKMODE_Msk (0x3UL << ADC_CCR_CKMODE_Pos) /*!< 0x00030000 */ +#define ADC_CCR_CKMODE ADC_CCR_CKMODE_Msk /*!< ADC clock mode */ +#define ADC_CCR_CKMODE_0 (0x1UL << ADC_CCR_CKMODE_Pos) /*!< 0x00010000 */ +#define ADC_CCR_CKMODE_1 (0x2UL << ADC_CCR_CKMODE_Pos) /*!< 0x00020000 */ + +#define ADC_CCR_PRESC_Pos (18U) +#define ADC_CCR_PRESC_Msk (0xFUL << ADC_CCR_PRESC_Pos) /*!< 0x003C0000 */ +#define ADC_CCR_PRESC ADC_CCR_PRESC_Msk /*!< ADC prescaler */ +#define ADC_CCR_PRESC_0 (0x1UL << ADC_CCR_PRESC_Pos) /*!< 0x00040000 */ +#define ADC_CCR_PRESC_1 (0x2UL << ADC_CCR_PRESC_Pos) /*!< 0x00080000 */ +#define ADC_CCR_PRESC_2 (0x4UL << ADC_CCR_PRESC_Pos) /*!< 0x00100000 */ +#define ADC_CCR_PRESC_3 (0x8UL << ADC_CCR_PRESC_Pos) /*!< 0x00200000 */ + +#define ADC_CCR_VREFEN_Pos (22U) +#define ADC_CCR_VREFEN_Msk (0x1UL << ADC_CCR_VREFEN_Pos) /*!< 0x00400000 */ +#define ADC_CCR_VREFEN ADC_CCR_VREFEN_Msk /*!< VREFINT enable */ +#define ADC_CCR_TSEN_Pos (23U) +#define ADC_CCR_TSEN_Msk (0x1UL << ADC_CCR_TSEN_Pos) /*!< 0x00800000 */ +#define ADC_CCR_TSEN ADC_CCR_TSEN_Msk /*!< Temperature sensor enable */ +#define ADC_CCR_VBATEN_Pos (24U) +#define ADC_CCR_VBATEN_Msk (0x1UL << ADC_CCR_VBATEN_Pos) /*!< 0x01000000 */ +#define ADC_CCR_VBATEN ADC_CCR_VBATEN_Msk /*!< VBAT enable */ + +/******************** Bit definition for ADC_CDR register *******************/ +#define ADC_CDR_RDATA_MST_Pos (0U) +#define ADC_CDR_RDATA_MST_Msk (0xFFFFUL << ADC_CDR_RDATA_MST_Pos) /*!< 0x0000FFFF */ +#define ADC_CDR_RDATA_MST ADC_CDR_RDATA_MST_Msk /*!< ADC multimode master group regular conversion data */ + +#define ADC_CDR_RDATA_SLV_Pos (16U) +#define ADC_CDR_RDATA_SLV_Msk (0xFFFFUL << ADC_CDR_RDATA_SLV_Pos) /*!< 0xFFFF0000 */ +#define ADC_CDR_RDATA_SLV ADC_CDR_RDATA_SLV_Msk /*!< ADC multimode slave group regular conversion data */ + +/******************** Bit definition for ADC_CDR2 register ******************/ +#define ADC_CDR2_RDATA_ALT_Pos (0U) +#define ADC_CDR2_RDATA_ALT_Msk (0xFFFFFFFFUL << ADC_CDR2_RDATA_ALT_Pos) /*!< 0xFFFFFFFF */ +#define ADC_CDR2_RDATA_ALT ADC_CDR2_RDATA_ALT_Msk /*!< Regular data of the master/slave alternated ADCs */ + + +/******************************************************************************/ +/* */ +/* VREFBUF */ +/* */ +/******************************************************************************/ +/******************* Bit definition for VREFBUF_CSR register ****************/ +#define VREFBUF_CSR_ENVR_Pos (0U) +#define VREFBUF_CSR_ENVR_Msk (0x1UL << VREFBUF_CSR_ENVR_Pos) /*!< 0x00000001 */ +#define VREFBUF_CSR_ENVR VREFBUF_CSR_ENVR_Msk /*!*/ +#define DAC_CR_CEN1_Pos (14U) +#define DAC_CR_CEN1_Msk (0x1UL << DAC_CR_CEN1_Pos) /*!< 0x00004000 */ +#define DAC_CR_CEN1 DAC_CR_CEN1_Msk /*!*/ + +#define DAC_CR_EN2_Pos (16U) +#define DAC_CR_EN2_Msk (0x1UL << DAC_CR_EN2_Pos) /*!< 0x00010000 */ +#define DAC_CR_EN2 DAC_CR_EN2_Msk /*!*/ +#define DAC_CR_CEN2_Pos (30U) +#define DAC_CR_CEN2_Msk (0x1UL << DAC_CR_CEN2_Pos) /*!< 0x40000000 */ +#define DAC_CR_CEN2 DAC_CR_CEN2_Msk /*!*/ + +/***************** Bit definition for DAC_SWTRIGR register ******************/ +#define DAC_SWTRIGR_SWTRIG1_Pos (0U) +#define DAC_SWTRIGR_SWTRIG1_Msk (0x1UL << DAC_SWTRIGR_SWTRIG1_Pos) /*!< 0x00000001 */ +#define DAC_SWTRIGR_SWTRIG1 DAC_SWTRIGR_SWTRIG1_Msk /*!
© Copyright (c) 2019 STMicroelectronics. + * All rights reserved.
+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/** @addtogroup CMSIS_Device + * @{ + */ + +/** @addtogroup stm32h725xx + * @{ + */ + +#ifndef STM32H725xx_H +#define STM32H725xx_H + +#ifdef __cplusplus + extern "C" { +#endif /* __cplusplus */ + +/** @addtogroup Peripheral_interrupt_number_definition + * @{ + */ + +/** + * @brief STM32H7XX Interrupt Number Definition, according to the selected device + * in @ref Library_configuration_section + */ +typedef enum +{ +/****** Cortex-M Processor Exceptions Numbers *****************************************************************/ + NonMaskableInt_IRQn = -14, /*!< 2 Non Maskable Interrupt */ + HardFault_IRQn = -13, /*!< 4 Cortex-M Memory Management Interrupt */ + MemoryManagement_IRQn = -12, /*!< 4 Cortex-M Memory Management Interrupt */ + BusFault_IRQn = -11, /*!< 5 Cortex-M Bus Fault Interrupt */ + UsageFault_IRQn = -10, /*!< 6 Cortex-M Usage Fault Interrupt */ + SVCall_IRQn = -5, /*!< 11 Cortex-M SV Call Interrupt */ + DebugMonitor_IRQn = -4, /*!< 12 Cortex-M Debug Monitor Interrupt */ + PendSV_IRQn = -2, /*!< 14 Cortex-M Pend SV Interrupt */ + SysTick_IRQn = -1, /*!< 15 Cortex-M System Tick Interrupt */ +/****** STM32 specific Interrupt Numbers **********************************************************************/ + WWDG_IRQn = 0, /*!< Window WatchDog Interrupt ( wwdg1_it, wwdg2_it) */ + PVD_AVD_IRQn = 1, /*!< PVD/AVD through EXTI Line detection Interrupt */ + TAMP_STAMP_IRQn = 2, /*!< Tamper and TimeStamp interrupts through the EXTI line */ + RTC_WKUP_IRQn = 3, /*!< RTC Wakeup interrupt through the EXTI line */ + FLASH_IRQn = 4, /*!< FLASH global Interrupt */ + RCC_IRQn = 5, /*!< RCC global Interrupt */ + EXTI0_IRQn = 6, /*!< EXTI Line0 Interrupt */ + EXTI1_IRQn = 7, /*!< EXTI Line1 Interrupt */ + EXTI2_IRQn = 8, /*!< EXTI Line2 Interrupt */ + EXTI3_IRQn = 9, /*!< EXTI Line3 Interrupt */ + EXTI4_IRQn = 10, /*!< EXTI Line4 Interrupt */ + DMA1_Stream0_IRQn = 11, /*!< DMA1 Stream 0 global Interrupt */ + DMA1_Stream1_IRQn = 12, /*!< DMA1 Stream 1 global Interrupt */ + DMA1_Stream2_IRQn = 13, /*!< DMA1 Stream 2 global Interrupt */ + DMA1_Stream3_IRQn = 14, /*!< DMA1 Stream 3 global Interrupt */ + DMA1_Stream4_IRQn = 15, /*!< DMA1 Stream 4 global Interrupt */ + DMA1_Stream5_IRQn = 16, /*!< DMA1 Stream 5 global Interrupt */ + DMA1_Stream6_IRQn = 17, /*!< DMA1 Stream 6 global Interrupt */ + ADC_IRQn = 18, /*!< ADC1 and ADC2 global Interrupts */ + FDCAN1_IT0_IRQn = 19, /*!< FDCAN1 Interrupt line 0 */ + FDCAN2_IT0_IRQn = 20, /*!< FDCAN2 Interrupt line 0 */ + FDCAN1_IT1_IRQn = 21, /*!< FDCAN1 Interrupt line 1 */ + FDCAN2_IT1_IRQn = 22, /*!< FDCAN2 Interrupt line 1 */ + EXTI9_5_IRQn = 23, /*!< External Line[9:5] Interrupts */ + TIM1_BRK_IRQn = 24, /*!< TIM1 Break Interrupt */ + TIM1_UP_IRQn = 25, /*!< TIM1 Update Interrupt */ + TIM1_TRG_COM_IRQn = 26, /*!< TIM1 Trigger and Commutation Interrupt */ + TIM1_CC_IRQn = 27, /*!< TIM1 Capture Compare Interrupt */ + TIM2_IRQn = 28, /*!< TIM2 global Interrupt */ + TIM3_IRQn = 29, /*!< TIM3 global Interrupt */ + TIM4_IRQn = 30, /*!< TIM4 global Interrupt */ + I2C1_EV_IRQn = 31, /*!< I2C1 Event Interrupt */ + I2C1_ER_IRQn = 32, /*!< I2C1 Error Interrupt */ + I2C2_EV_IRQn = 33, /*!< I2C2 Event Interrupt */ + I2C2_ER_IRQn = 34, /*!< I2C2 Error Interrupt */ + SPI1_IRQn = 35, /*!< SPI1 global Interrupt */ + SPI2_IRQn = 36, /*!< SPI2 global Interrupt */ + USART1_IRQn = 37, /*!< USART1 global Interrupt */ + USART2_IRQn = 38, /*!< USART2 global Interrupt */ + USART3_IRQn = 39, /*!< USART3 global Interrupt */ + EXTI15_10_IRQn = 40, /*!< External Line[15:10] Interrupts */ + RTC_Alarm_IRQn = 41, /*!< RTC Alarm (A and B) through EXTI Line Interrupt */ + TIM8_BRK_TIM12_IRQn = 43, /*!< TIM8 Break Interrupt and TIM12 global interrupt */ + TIM8_UP_TIM13_IRQn = 44, /*!< TIM8 Update Interrupt and TIM13 global interrupt */ + TIM8_TRG_COM_TIM14_IRQn = 45, /*!< TIM8 Trigger and Commutation Interrupt and TIM14 global interrupt */ + TIM8_CC_IRQn = 46, /*!< TIM8 Capture Compare Interrupt */ + DMA1_Stream7_IRQn = 47, /*!< DMA1 Stream7 Interrupt */ + FMC_IRQn = 48, /*!< FMC global Interrupt */ + SDMMC1_IRQn = 49, /*!< SDMMC1 global Interrupt */ + TIM5_IRQn = 50, /*!< TIM5 global Interrupt */ + SPI3_IRQn = 51, /*!< SPI3 global Interrupt */ + UART4_IRQn = 52, /*!< UART4 global Interrupt */ + UART5_IRQn = 53, /*!< UART5 global Interrupt */ + TIM6_DAC_IRQn = 54, /*!< TIM6 global and DAC1&2 underrun error interrupts */ + TIM7_IRQn = 55, /*!< TIM7 global interrupt */ + DMA2_Stream0_IRQn = 56, /*!< DMA2 Stream 0 global Interrupt */ + DMA2_Stream1_IRQn = 57, /*!< DMA2 Stream 1 global Interrupt */ + DMA2_Stream2_IRQn = 58, /*!< DMA2 Stream 2 global Interrupt */ + DMA2_Stream3_IRQn = 59, /*!< DMA2 Stream 3 global Interrupt */ + DMA2_Stream4_IRQn = 60, /*!< DMA2 Stream 4 global Interrupt */ + ETH_IRQn = 61, /*!< Ethernet global Interrupt */ + ETH_WKUP_IRQn = 62, /*!< Ethernet Wakeup through EXTI line Interrupt */ + FDCAN_CAL_IRQn = 63, /*!< FDCAN Calibration unit Interrupt */ + DMA2_Stream5_IRQn = 68, /*!< DMA2 Stream 5 global interrupt */ + DMA2_Stream6_IRQn = 69, /*!< DMA2 Stream 6 global interrupt */ + DMA2_Stream7_IRQn = 70, /*!< DMA2 Stream 7 global interrupt */ + USART6_IRQn = 71, /*!< USART6 global interrupt */ + I2C3_EV_IRQn = 72, /*!< I2C3 event interrupt */ + I2C3_ER_IRQn = 73, /*!< I2C3 error interrupt */ + OTG_HS_EP1_OUT_IRQn = 74, /*!< USB OTG HS End Point 1 Out global interrupt */ + OTG_HS_EP1_IN_IRQn = 75, /*!< USB OTG HS End Point 1 In global interrupt */ + OTG_HS_WKUP_IRQn = 76, /*!< USB OTG HS Wakeup through EXTI interrupt */ + OTG_HS_IRQn = 77, /*!< USB OTG HS global interrupt */ + DCMI_PSSI_IRQn = 78, /*!< DCMI and PSSI global interrupt */ + RNG_IRQn = 80, /*!< RNG global interrupt */ + FPU_IRQn = 81, /*!< FPU global interrupt */ + UART7_IRQn = 82, /*!< UART7 global interrupt */ + UART8_IRQn = 83, /*!< UART8 global interrupt */ + SPI4_IRQn = 84, /*!< SPI4 global Interrupt */ + SPI5_IRQn = 85, /*!< SPI5 global Interrupt */ + SPI6_IRQn = 86, /*!< SPI6 global Interrupt */ + SAI1_IRQn = 87, /*!< SAI1 global Interrupt */ + LTDC_IRQn = 88, /*!< LTDC global Interrupt */ + LTDC_ER_IRQn = 89, /*!< LTDC Error global Interrupt */ + DMA2D_IRQn = 90, /*!< DMA2D global Interrupt */ + OCTOSPI1_IRQn = 92, /*!< OCTOSPI1 global interrupt */ + LPTIM1_IRQn = 93, /*!< LP TIM1 interrupt */ + CEC_IRQn = 94, /*!< HDMI-CEC global Interrupt */ + I2C4_EV_IRQn = 95, /*!< I2C4 Event Interrupt */ + I2C4_ER_IRQn = 96, /*!< I2C4 Error Interrupt */ + SPDIF_RX_IRQn = 97, /*!< SPDIF-RX global Interrupt */ + DMAMUX1_OVR_IRQn = 102, /*! + +/** @addtogroup Peripheral_registers_structures + * @{ + */ + +/** + * @brief Analog to Digital Converter + */ + +typedef struct +{ + __IO uint32_t ISR; /*!< ADC Interrupt and Status Register, Address offset: 0x00 */ + __IO uint32_t IER; /*!< ADC Interrupt Enable Register, Address offset: 0x04 */ + __IO uint32_t CR; /*!< ADC control register, Address offset: 0x08 */ + __IO uint32_t CFGR; /*!< ADC Configuration register, Address offset: 0x0C */ + __IO uint32_t CFGR2; /*!< ADC Configuration register 2, Address offset: 0x10 */ + __IO uint32_t SMPR1; /*!< ADC sample time register 1, Address offset: 0x14 */ + __IO uint32_t SMPR2; /*!< ADC sample time register 2, Address offset: 0x18 */ + __IO uint32_t PCSEL_RES0; /*!< Rserved for ADC3, ADC1/2 pre-channel selection, Address offset: 0x1C */ + __IO uint32_t LTR1_TR1; /*!< ADC watchdog Lower threshold register 1, Address offset: 0x20 */ + __IO uint32_t HTR1_TR2; /*!< ADC watchdog higher threshold register 1, Address offset: 0x24 */ + __IO uint32_t RES1_TR3; /*!< Rserved for ADC1/2, ADC3 threshold register, Address offset: 0x28 */ + uint32_t RESERVED2; /*!< Reserved, 0x02C */ + __IO uint32_t SQR1; /*!< ADC regular sequence register 1, Address offset: 0x30 */ + __IO uint32_t SQR2; /*!< ADC regular sequence register 2, Address offset: 0x34 */ + __IO uint32_t SQR3; /*!< ADC regular sequence register 3, Address offset: 0x38 */ + __IO uint32_t SQR4; /*!< ADC regular sequence register 4, Address offset: 0x3C */ + __IO uint32_t DR; /*!< ADC regular data register, Address offset: 0x40 */ + uint32_t RESERVED3; /*!< Reserved, 0x044 */ + uint32_t RESERVED4; /*!< Reserved, 0x048 */ + __IO uint32_t JSQR; /*!< ADC injected sequence register, Address offset: 0x4C */ + uint32_t RESERVED5[4]; /*!< Reserved, 0x050 - 0x05C */ + __IO uint32_t OFR1; /*!< ADC offset register 1, Address offset: 0x60 */ + __IO uint32_t OFR2; /*!< ADC offset register 2, Address offset: 0x64 */ + __IO uint32_t OFR3; /*!< ADC offset register 3, Address offset: 0x68 */ + __IO uint32_t OFR4; /*!< ADC offset register 4, Address offset: 0x6C */ + uint32_t RESERVED6[4]; /*!< Reserved, 0x070 - 0x07C */ + __IO uint32_t JDR1; /*!< ADC injected data register 1, Address offset: 0x80 */ + __IO uint32_t JDR2; /*!< ADC injected data register 2, Address offset: 0x84 */ + __IO uint32_t JDR3; /*!< ADC injected data register 3, Address offset: 0x88 */ + __IO uint32_t JDR4; /*!< ADC injected data register 4, Address offset: 0x8C */ + uint32_t RESERVED7[4]; /*!< Reserved, 0x090 - 0x09C */ + __IO uint32_t AWD2CR; /*!< ADC Analog Watchdog 2 Configuration Register, Address offset: 0xA0 */ + __IO uint32_t AWD3CR; /*!< ADC Analog Watchdog 3 Configuration Register, Address offset: 0xA4 */ + uint32_t RESERVED8; /*!< Reserved, 0x0A8 */ + uint32_t RESERVED9; /*!< Reserved, 0x0AC */ + __IO uint32_t LTR2_DIFSEL; /*!< ADC watchdog Lower threshold register 2, Difsel for ADC3, Address offset: 0xB0 */ + __IO uint32_t HTR2_CALFACT; /*!< ADC watchdog Higher threshold register 2, Calfact for ADC3, Address offset: 0xB4 */ + __IO uint32_t LTR3_RES10; /*!< ADC watchdog Lower threshold register 3, specific ADC1/2, Address offset: 0xB8 */ + __IO uint32_t HTR3_RES11; /*!< ADC watchdog Higher threshold register 3, specific ADC1/2, Address offset: 0xBC */ + __IO uint32_t DIFSEL_RES12; /*!< ADC Differential Mode Selection Register specific ADC1/2, Address offset: 0xC0 */ + __IO uint32_t CALFACT_RES13; /*!< ADC Calibration Factors specific ADC1/2, Address offset: 0xC4 */ + __IO uint32_t CALFACT2_RES14; /*!< ADC Linearity Calibration Factors specific ADC1/2, Address offset: 0xC8 */ +} ADC_TypeDef; + + +typedef struct +{ +__IO uint32_t CSR; /*!< ADC Common status register, Address offset: ADC1/3 base address + 0x300 */ +uint32_t RESERVED; /*!< Reserved, ADC1/3 base address + 0x304 */ +__IO uint32_t CCR; /*!< ADC common control register, Address offset: ADC1/3 base address + 0x308 */ +__IO uint32_t CDR; /*!< ADC common regular data register for dual Address offset: ADC1/3 base address + 0x30C */ +__IO uint32_t CDR2; /*!< ADC common regular data register for 32-bit dual mode Address offset: ADC1/3 base address + 0x310 */ + +} ADC_Common_TypeDef; + + +/** + * @brief VREFBUF + */ + +typedef struct +{ + __IO uint32_t CSR; /*!< VREFBUF control and status register, Address offset: 0x00 */ + __IO uint32_t CCR; /*!< VREFBUF calibration and control register, Address offset: 0x04 */ +} VREFBUF_TypeDef; + + +/** + * @brief FD Controller Area Network + */ + +typedef struct +{ + __IO uint32_t CREL; /*!< FDCAN Core Release register, Address offset: 0x000 */ + __IO uint32_t ENDN; /*!< FDCAN Endian register, Address offset: 0x004 */ + __IO uint32_t RESERVED1; /*!< Reserved, 0x008 */ + __IO uint32_t DBTP; /*!< FDCAN Data Bit Timing & Prescaler register, Address offset: 0x00C */ + __IO uint32_t TEST; /*!< FDCAN Test register, Address offset: 0x010 */ + __IO uint32_t RWD; /*!< FDCAN RAM Watchdog register, Address offset: 0x014 */ + __IO uint32_t CCCR; /*!< FDCAN CC Control register, Address offset: 0x018 */ + __IO uint32_t NBTP; /*!< FDCAN Nominal Bit Timing & Prescaler register, Address offset: 0x01C */ + __IO uint32_t TSCC; /*!< FDCAN Timestamp Counter Configuration register, Address offset: 0x020 */ + __IO uint32_t TSCV; /*!< FDCAN Timestamp Counter Value register, Address offset: 0x024 */ + __IO uint32_t TOCC; /*!< FDCAN Timeout Counter Configuration register, Address offset: 0x028 */ + __IO uint32_t TOCV; /*!< FDCAN Timeout Counter Value register, Address offset: 0x02C */ + __IO uint32_t RESERVED2[4]; /*!< Reserved, 0x030 - 0x03C */ + __IO uint32_t ECR; /*!< FDCAN Error Counter register, Address offset: 0x040 */ + __IO uint32_t PSR; /*!< FDCAN Protocol Status register, Address offset: 0x044 */ + __IO uint32_t TDCR; /*!< FDCAN Transmitter Delay Compensation register, Address offset: 0x048 */ + __IO uint32_t RESERVED3; /*!< Reserved, 0x04C */ + __IO uint32_t IR; /*!< FDCAN Interrupt register, Address offset: 0x050 */ + __IO uint32_t IE; /*!< FDCAN Interrupt Enable register, Address offset: 0x054 */ + __IO uint32_t ILS; /*!< FDCAN Interrupt Line Select register, Address offset: 0x058 */ + __IO uint32_t ILE; /*!< FDCAN Interrupt Line Enable register, Address offset: 0x05C */ + __IO uint32_t RESERVED4[8]; /*!< Reserved, 0x060 - 0x07C */ + __IO uint32_t GFC; /*!< FDCAN Global Filter Configuration register, Address offset: 0x080 */ + __IO uint32_t SIDFC; /*!< FDCAN Standard ID Filter Configuration register, Address offset: 0x084 */ + __IO uint32_t XIDFC; /*!< FDCAN Extended ID Filter Configuration register, Address offset: 0x088 */ + __IO uint32_t RESERVED5; /*!< Reserved, 0x08C */ + __IO uint32_t XIDAM; /*!< FDCAN Extended ID AND Mask register, Address offset: 0x090 */ + __IO uint32_t HPMS; /*!< FDCAN High Priority Message Status register, Address offset: 0x094 */ + __IO uint32_t NDAT1; /*!< FDCAN New Data 1 register, Address offset: 0x098 */ + __IO uint32_t NDAT2; /*!< FDCAN New Data 2 register, Address offset: 0x09C */ + __IO uint32_t RXF0C; /*!< FDCAN Rx FIFO 0 Configuration register, Address offset: 0x0A0 */ + __IO uint32_t RXF0S; /*!< FDCAN Rx FIFO 0 Status register, Address offset: 0x0A4 */ + __IO uint32_t RXF0A; /*!< FDCAN Rx FIFO 0 Acknowledge register, Address offset: 0x0A8 */ + __IO uint32_t RXBC; /*!< FDCAN Rx Buffer Configuration register, Address offset: 0x0AC */ + __IO uint32_t RXF1C; /*!< FDCAN Rx FIFO 1 Configuration register, Address offset: 0x0B0 */ + __IO uint32_t RXF1S; /*!< FDCAN Rx FIFO 1 Status register, Address offset: 0x0B4 */ + __IO uint32_t RXF1A; /*!< FDCAN Rx FIFO 1 Acknowledge register, Address offset: 0x0B8 */ + __IO uint32_t RXESC; /*!< FDCAN Rx Buffer/FIFO Element Size Configuration register, Address offset: 0x0BC */ + __IO uint32_t TXBC; /*!< FDCAN Tx Buffer Configuration register, Address offset: 0x0C0 */ + __IO uint32_t TXFQS; /*!< FDCAN Tx FIFO/Queue Status register, Address offset: 0x0C4 */ + __IO uint32_t TXESC; /*!< FDCAN Tx Buffer Element Size Configuration register, Address offset: 0x0C8 */ + __IO uint32_t TXBRP; /*!< FDCAN Tx Buffer Request Pending register, Address offset: 0x0CC */ + __IO uint32_t TXBAR; /*!< FDCAN Tx Buffer Add Request register, Address offset: 0x0D0 */ + __IO uint32_t TXBCR; /*!< FDCAN Tx Buffer Cancellation Request register, Address offset: 0x0D4 */ + __IO uint32_t TXBTO; /*!< FDCAN Tx Buffer Transmission Occurred register, Address offset: 0x0D8 */ + __IO uint32_t TXBCF; /*!< FDCAN Tx Buffer Cancellation Finished register, Address offset: 0x0DC */ + __IO uint32_t TXBTIE; /*!< FDCAN Tx Buffer Transmission Interrupt Enable register, Address offset: 0x0E0 */ + __IO uint32_t TXBCIE; /*!< FDCAN Tx Buffer Cancellation Finished Interrupt Enable register, Address offset: 0x0E4 */ + __IO uint32_t RESERVED6[2]; /*!< Reserved, 0x0E8 - 0x0EC */ + __IO uint32_t TXEFC; /*!< FDCAN Tx Event FIFO Configuration register, Address offset: 0x0F0 */ + __IO uint32_t TXEFS; /*!< FDCAN Tx Event FIFO Status register, Address offset: 0x0F4 */ + __IO uint32_t TXEFA; /*!< FDCAN Tx Event FIFO Acknowledge register, Address offset: 0x0F8 */ + __IO uint32_t RESERVED7; /*!< Reserved, 0x0FC */ +} FDCAN_GlobalTypeDef; + +/** + * @brief TTFD Controller Area Network + */ + +typedef struct +{ + __IO uint32_t TTTMC; /*!< TT Trigger Memory Configuration register, Address offset: 0x100 */ + __IO uint32_t TTRMC; /*!< TT Reference Message Configuration register, Address offset: 0x104 */ + __IO uint32_t TTOCF; /*!< TT Operation Configuration register, Address offset: 0x108 */ + __IO uint32_t TTMLM; /*!< TT Matrix Limits register, Address offset: 0x10C */ + __IO uint32_t TURCF; /*!< TUR Configuration register, Address offset: 0x110 */ + __IO uint32_t TTOCN; /*!< TT Operation Control register, Address offset: 0x114 */ + __IO uint32_t TTGTP; /*!< TT Global Time Preset register, Address offset: 0x118 */ + __IO uint32_t TTTMK; /*!< TT Time Mark register, Address offset: 0x11C */ + __IO uint32_t TTIR; /*!< TT Interrupt register, Address offset: 0x120 */ + __IO uint32_t TTIE; /*!< TT Interrupt Enable register, Address offset: 0x124 */ + __IO uint32_t TTILS; /*!< TT Interrupt Line Select register, Address offset: 0x128 */ + __IO uint32_t TTOST; /*!< TT Operation Status register, Address offset: 0x12C */ + __IO uint32_t TURNA; /*!< TT TUR Numerator Actual register, Address offset: 0x130 */ + __IO uint32_t TTLGT; /*!< TT Local and Global Time register, Address offset: 0x134 */ + __IO uint32_t TTCTC; /*!< TT Cycle Time and Count register, Address offset: 0x138 */ + __IO uint32_t TTCPT; /*!< TT Capture Time register, Address offset: 0x13C */ + __IO uint32_t TTCSM; /*!< TT Cycle Sync Mark register, Address offset: 0x140 */ + __IO uint32_t RESERVED1[111]; /*!< Reserved, 0x144 - 0x2FC */ + __IO uint32_t TTTS; /*!< TT Trigger Select register, Address offset: 0x300 */ +} TTCAN_TypeDef; + +/** + * @brief FD Controller Area Network + */ + +typedef struct +{ + __IO uint32_t CREL; /*!< Clock Calibration Unit Core Release register, Address offset: 0x00 */ + __IO uint32_t CCFG; /*!< Calibration Configuration register, Address offset: 0x04 */ + __IO uint32_t CSTAT; /*!< Calibration Status register, Address offset: 0x08 */ + __IO uint32_t CWD; /*!< Calibration Watchdog register, Address offset: 0x0C */ + __IO uint32_t IR; /*!< CCU Interrupt register, Address offset: 0x10 */ + __IO uint32_t IE; /*!< CCU Interrupt Enable register, Address offset: 0x14 */ +} FDCAN_ClockCalibrationUnit_TypeDef; + + +/** + * @brief Consumer Electronics Control + */ + +typedef struct +{ + __IO uint32_t CR; /*!< CEC control register, Address offset:0x00 */ + __IO uint32_t CFGR; /*!< CEC configuration register, Address offset:0x04 */ + __IO uint32_t TXDR; /*!< CEC Tx data register , Address offset:0x08 */ + __IO uint32_t RXDR; /*!< CEC Rx Data Register, Address offset:0x0C */ + __IO uint32_t ISR; /*!< CEC Interrupt and Status Register, Address offset:0x10 */ + __IO uint32_t IER; /*!< CEC interrupt enable register, Address offset:0x14 */ +}CEC_TypeDef; + +/** + * @brief COordincate Rotation DIgital Computer + */ +typedef struct +{ + __IO uint32_t CSR; /*!< CORDIC control and status register, Address offset: 0x00 */ + __IO uint32_t WDATA; /*!< CORDIC argument register, Address offset: 0x04 */ + __IO uint32_t RDATA; /*!< CORDIC result register, Address offset: 0x08 */ +} CORDIC_TypeDef; + +/** + * @brief CRC calculation unit + */ + +typedef struct +{ + __IO uint32_t DR; /*!< CRC Data register, Address offset: 0x00 */ + __IO uint32_t IDR; /*!< CRC Independent data register, Address offset: 0x04 */ + __IO uint32_t CR; /*!< CRC Control register, Address offset: 0x08 */ + uint32_t RESERVED2; /*!< Reserved, 0x0C */ + __IO uint32_t INIT; /*!< Initial CRC value register, Address offset: 0x10 */ + __IO uint32_t POL; /*!< CRC polynomial register, Address offset: 0x14 */ +} CRC_TypeDef; + + +/** + * @brief Clock Recovery System + */ +typedef struct +{ +__IO uint32_t CR; /*!< CRS ccontrol register, Address offset: 0x00 */ +__IO uint32_t CFGR; /*!< CRS configuration register, Address offset: 0x04 */ +__IO uint32_t ISR; /*!< CRS interrupt and status register, Address offset: 0x08 */ +__IO uint32_t ICR; /*!< CRS interrupt flag clear register, Address offset: 0x0C */ +} CRS_TypeDef; + + +/** + * @brief Digital to Analog Converter + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DAC control register, Address offset: 0x00 */ + __IO uint32_t SWTRIGR; /*!< DAC software trigger register, Address offset: 0x04 */ + __IO uint32_t DHR12R1; /*!< DAC channel1 12-bit right-aligned data holding register, Address offset: 0x08 */ + __IO uint32_t DHR12L1; /*!< DAC channel1 12-bit left aligned data holding register, Address offset: 0x0C */ + __IO uint32_t DHR8R1; /*!< DAC channel1 8-bit right aligned data holding register, Address offset: 0x10 */ + __IO uint32_t DHR12R2; /*!< DAC channel2 12-bit right aligned data holding register, Address offset: 0x14 */ + __IO uint32_t DHR12L2; /*!< DAC channel2 12-bit left aligned data holding register, Address offset: 0x18 */ + __IO uint32_t DHR8R2; /*!< DAC channel2 8-bit right-aligned data holding register, Address offset: 0x1C */ + __IO uint32_t DHR12RD; /*!< Dual DAC 12-bit right-aligned data holding register, Address offset: 0x20 */ + __IO uint32_t DHR12LD; /*!< DUAL DAC 12-bit left aligned data holding register, Address offset: 0x24 */ + __IO uint32_t DHR8RD; /*!< DUAL DAC 8-bit right aligned data holding register, Address offset: 0x28 */ + __IO uint32_t DOR1; /*!< DAC channel1 data output register, Address offset: 0x2C */ + __IO uint32_t DOR2; /*!< DAC channel2 data output register, Address offset: 0x30 */ + __IO uint32_t SR; /*!< DAC status register, Address offset: 0x34 */ + __IO uint32_t CCR; /*!< DAC calibration control register, Address offset: 0x38 */ + __IO uint32_t MCR; /*!< DAC mode control register, Address offset: 0x3C */ + __IO uint32_t SHSR1; /*!< DAC Sample and Hold sample time register 1, Address offset: 0x40 */ + __IO uint32_t SHSR2; /*!< DAC Sample and Hold sample time register 2, Address offset: 0x44 */ + __IO uint32_t SHHR; /*!< DAC Sample and Hold hold time register, Address offset: 0x48 */ + __IO uint32_t SHRR; /*!< DAC Sample and Hold refresh time register, Address offset: 0x4C */ +} DAC_TypeDef; + +/** + * @brief DFSDM module registers + */ +typedef struct +{ + __IO uint32_t FLTCR1; /*!< DFSDM control register1, Address offset: 0x100 */ + __IO uint32_t FLTCR2; /*!< DFSDM control register2, Address offset: 0x104 */ + __IO uint32_t FLTISR; /*!< DFSDM interrupt and status register, Address offset: 0x108 */ + __IO uint32_t FLTICR; /*!< DFSDM interrupt flag clear register, Address offset: 0x10C */ + __IO uint32_t FLTJCHGR; /*!< DFSDM injected channel group selection register, Address offset: 0x110 */ + __IO uint32_t FLTFCR; /*!< DFSDM filter control register, Address offset: 0x114 */ + __IO uint32_t FLTJDATAR; /*!< DFSDM data register for injected group, Address offset: 0x118 */ + __IO uint32_t FLTRDATAR; /*!< DFSDM data register for regular group, Address offset: 0x11C */ + __IO uint32_t FLTAWHTR; /*!< DFSDM analog watchdog high threshold register, Address offset: 0x120 */ + __IO uint32_t FLTAWLTR; /*!< DFSDM analog watchdog low threshold register, Address offset: 0x124 */ + __IO uint32_t FLTAWSR; /*!< DFSDM analog watchdog status register Address offset: 0x128 */ + __IO uint32_t FLTAWCFR; /*!< DFSDM analog watchdog clear flag register Address offset: 0x12C */ + __IO uint32_t FLTEXMAX; /*!< DFSDM extreme detector maximum register, Address offset: 0x130 */ + __IO uint32_t FLTEXMIN; /*!< DFSDM extreme detector minimum register Address offset: 0x134 */ + __IO uint32_t FLTCNVTIMR; /*!< DFSDM conversion timer, Address offset: 0x138 */ +} DFSDM_Filter_TypeDef; + +/** + * @brief DFSDM channel configuration registers + */ +typedef struct +{ + __IO uint32_t CHCFGR1; /*!< DFSDM channel configuration register1, Address offset: 0x00 */ + __IO uint32_t CHCFGR2; /*!< DFSDM channel configuration register2, Address offset: 0x04 */ + __IO uint32_t CHAWSCDR; /*!< DFSDM channel analog watchdog and + short circuit detector register, Address offset: 0x08 */ + __IO uint32_t CHWDATAR; /*!< DFSDM channel watchdog filter data register, Address offset: 0x0C */ + __IO uint32_t CHDATINR; /*!< DFSDM channel data input register, Address offset: 0x10 */ +} DFSDM_Channel_TypeDef; + +/** + * @brief Debug MCU + */ +typedef struct +{ + __IO uint32_t IDCODE; /*!< MCU device ID code, Address offset: 0x00 */ + __IO uint32_t CR; /*!< Debug MCU configuration register, Address offset: 0x04 */ + uint32_t RESERVED4[11]; /*!< Reserved, Address offset: 0x08 */ + __IO uint32_t APB3FZ1; /*!< Debug MCU APB3FZ1 freeze register, Address offset: 0x34 */ + uint32_t RESERVED5; /*!< Reserved, Address offset: 0x38 */ + __IO uint32_t APB1LFZ1; /*!< Debug MCU APB1LFZ1 freeze register, Address offset: 0x3C */ + uint32_t RESERVED6; /*!< Reserved, Address offset: 0x40 */ + __IO uint32_t APB1HFZ1; /*!< Debug MCU APB1LFZ1 freeze register, Address offset: 0x44 */ + uint32_t RESERVED7; /*!< Reserved, Address offset: 0x48 */ + __IO uint32_t APB2FZ1; /*!< Debug MCU APB2FZ1 freeze register, Address offset: 0x4C */ + uint32_t RESERVED8; /*!< Reserved, Address offset: 0x50 */ + __IO uint32_t APB4FZ1; /*!< Debug MCU APB4FZ1 freeze register, Address offset: 0x54 */ + __IO uint32_t RESERVED9[990]; /*!< Reserved, Address offset: 0x58-0xFCC */ + __IO uint32_t PIDR4; /*!< Debug MCU peripheral identity register 4, Address offset: 0xFD0 */ + __IO uint32_t RESERVED10[3];/*!< Reserved, Address offset: 0xFD4-0xFDC */ + __IO uint32_t PIDR0; /*!< Debug MCU peripheral identity register 0, Address offset: 0xFE0 */ + __IO uint32_t PIDR1; /*!< Debug MCU peripheral identity register 1, Address offset: 0xFE4 */ + __IO uint32_t PIDR2; /*!< Debug MCU peripheral identity register 2, Address offset: 0xFE8 */ + __IO uint32_t PIDR3; /*!< Debug MCU peripheral identity register 3, Address offset: 0xFEC */ + __IO uint32_t CIDR0; /*!< Debug MCU component identity register 0, Address offset: 0xFF0 */ + __IO uint32_t CIDR1; /*!< Debug MCU component identity register 1, Address offset: 0xFF4 */ + __IO uint32_t CIDR2; /*!< Debug MCU component identity register 2, Address offset: 0xFF8 */ + __IO uint32_t CIDR3; /*!< Debug MCU component identity register 3, Address offset: 0xFFC */ +}DBGMCU_TypeDef; +/** + * @brief DCMI + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DCMI control register 1, Address offset: 0x00 */ + __IO uint32_t SR; /*!< DCMI status register, Address offset: 0x04 */ + __IO uint32_t RISR; /*!< DCMI raw interrupt status register, Address offset: 0x08 */ + __IO uint32_t IER; /*!< DCMI interrupt enable register, Address offset: 0x0C */ + __IO uint32_t MISR; /*!< DCMI masked interrupt status register, Address offset: 0x10 */ + __IO uint32_t ICR; /*!< DCMI interrupt clear register, Address offset: 0x14 */ + __IO uint32_t ESCR; /*!< DCMI embedded synchronization code register, Address offset: 0x18 */ + __IO uint32_t ESUR; /*!< DCMI embedded synchronization unmask register, Address offset: 0x1C */ + __IO uint32_t CWSTRTR; /*!< DCMI crop window start, Address offset: 0x20 */ + __IO uint32_t CWSIZER; /*!< DCMI crop window size, Address offset: 0x24 */ + __IO uint32_t DR; /*!< DCMI data register, Address offset: 0x28 */ +} DCMI_TypeDef; + +/** + * @brief PSSI + */ + +typedef struct +{ + __IO uint32_t CR; /*!< PSSI control register 1, Address offset: 0x000 */ + __IO uint32_t SR; /*!< PSSI status register, Address offset: 0x004 */ + __IO uint32_t RIS; /*!< PSSI raw interrupt status register, Address offset: 0x008 */ + __IO uint32_t IER; /*!< PSSI interrupt enable register, Address offset: 0x00C */ + __IO uint32_t MIS; /*!< PSSI masked interrupt status register, Address offset: 0x010 */ + __IO uint32_t ICR; /*!< PSSI interrupt clear register, Address offset: 0x014 */ + __IO uint32_t RESERVED1[4]; /*!< Reserved, 0x018 - 0x024 */ + __IO uint32_t DR; /*!< PSSI data register, Address offset: 0x028 */ + __IO uint32_t RESERVED2[241]; /*!< Reserved, 0x02C - 0x3EC */ + __IO uint32_t HWCFGR; /*!< PSSI IP HW configuration register, Address offset: 0x3F0 */ + __IO uint32_t VERR; /*!< PSSI IP version register, Address offset: 0x3F4 */ + __IO uint32_t IPIDR; /*!< PSSI IP ID register, Address offset: 0x3F8 */ + __IO uint32_t SIDR; /*!< PSSI SIZE ID register, Address offset: 0x3FC */ +} PSSI_TypeDef; + +/** + * @brief DMA Controller + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DMA stream x configuration register */ + __IO uint32_t NDTR; /*!< DMA stream x number of data register */ + __IO uint32_t PAR; /*!< DMA stream x peripheral address register */ + __IO uint32_t M0AR; /*!< DMA stream x memory 0 address register */ + __IO uint32_t M1AR; /*!< DMA stream x memory 1 address register */ + __IO uint32_t FCR; /*!< DMA stream x FIFO control register */ +} DMA_Stream_TypeDef; + +typedef struct +{ + __IO uint32_t LISR; /*!< DMA low interrupt status register, Address offset: 0x00 */ + __IO uint32_t HISR; /*!< DMA high interrupt status register, Address offset: 0x04 */ + __IO uint32_t LIFCR; /*!< DMA low interrupt flag clear register, Address offset: 0x08 */ + __IO uint32_t HIFCR; /*!< DMA high interrupt flag clear register, Address offset: 0x0C */ +} DMA_TypeDef; + +typedef struct +{ + __IO uint32_t CCR; /*!< DMA channel x configuration register */ + __IO uint32_t CNDTR; /*!< DMA channel x number of data register */ + __IO uint32_t CPAR; /*!< DMA channel x peripheral address register */ + __IO uint32_t CM0AR; /*!< DMA channel x memory 0 address register */ + __IO uint32_t CM1AR; /*!< DMA channel x memory 1 address register */ +} BDMA_Channel_TypeDef; + +typedef struct +{ + __IO uint32_t ISR; /*!< DMA interrupt status register, Address offset: 0x00 */ + __IO uint32_t IFCR; /*!< DMA interrupt flag clear register, Address offset: 0x04 */ +} BDMA_TypeDef; + +typedef struct +{ + __IO uint32_t CCR; /*!< DMA Multiplexer Channel x Control Register */ +}DMAMUX_Channel_TypeDef; + +typedef struct +{ + __IO uint32_t CSR; /*!< DMA Channel Status Register */ + __IO uint32_t CFR; /*!< DMA Channel Clear Flag Register */ +}DMAMUX_ChannelStatus_TypeDef; + +typedef struct +{ + __IO uint32_t RGCR; /*!< DMA Request Generator x Control Register */ +}DMAMUX_RequestGen_TypeDef; + +typedef struct +{ + __IO uint32_t RGSR; /*!< DMA Request Generator Status Register */ + __IO uint32_t RGCFR; /*!< DMA Request Generator Clear Flag Register */ +}DMAMUX_RequestGenStatus_TypeDef; + +/** + * @brief MDMA Controller + */ +typedef struct +{ + __IO uint32_t GISR0; /*!< MDMA Global Interrupt/Status Register 0, Address offset: 0x00 */ +}MDMA_TypeDef; + +typedef struct +{ + __IO uint32_t CISR; /*!< MDMA channel x interrupt/status register, Address offset: 0x40 */ + __IO uint32_t CIFCR; /*!< MDMA channel x interrupt flag clear register, Address offset: 0x44 */ + __IO uint32_t CESR; /*!< MDMA Channel x error status register, Address offset: 0x48 */ + __IO uint32_t CCR; /*!< MDMA channel x control register, Address offset: 0x4C */ + __IO uint32_t CTCR; /*!< MDMA channel x Transfer Configuration register, Address offset: 0x50 */ + __IO uint32_t CBNDTR; /*!< MDMA Channel x block number of data register, Address offset: 0x54 */ + __IO uint32_t CSAR; /*!< MDMA channel x source address register, Address offset: 0x58 */ + __IO uint32_t CDAR; /*!< MDMA channel x destination address register, Address offset: 0x5C */ + __IO uint32_t CBRUR; /*!< MDMA channel x Block Repeat address Update register, Address offset: 0x60 */ + __IO uint32_t CLAR; /*!< MDMA channel x Link Address register, Address offset: 0x64 */ + __IO uint32_t CTBR; /*!< MDMA channel x Trigger and Bus selection Register, Address offset: 0x68 */ + uint32_t RESERVED0; /*!< Reserved, 0x68 */ + __IO uint32_t CMAR; /*!< MDMA channel x Mask address register, Address offset: 0x70 */ + __IO uint32_t CMDR; /*!< MDMA channel x Mask Data register, Address offset: 0x74 */ +}MDMA_Channel_TypeDef; + +/** + * @brief DMA2D Controller + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DMA2D Control Register, Address offset: 0x00 */ + __IO uint32_t ISR; /*!< DMA2D Interrupt Status Register, Address offset: 0x04 */ + __IO uint32_t IFCR; /*!< DMA2D Interrupt Flag Clear Register, Address offset: 0x08 */ + __IO uint32_t FGMAR; /*!< DMA2D Foreground Memory Address Register, Address offset: 0x0C */ + __IO uint32_t FGOR; /*!< DMA2D Foreground Offset Register, Address offset: 0x10 */ + __IO uint32_t BGMAR; /*!< DMA2D Background Memory Address Register, Address offset: 0x14 */ + __IO uint32_t BGOR; /*!< DMA2D Background Offset Register, Address offset: 0x18 */ + __IO uint32_t FGPFCCR; /*!< DMA2D Foreground PFC Control Register, Address offset: 0x1C */ + __IO uint32_t FGCOLR; /*!< DMA2D Foreground Color Register, Address offset: 0x20 */ + __IO uint32_t BGPFCCR; /*!< DMA2D Background PFC Control Register, Address offset: 0x24 */ + __IO uint32_t BGCOLR; /*!< DMA2D Background Color Register, Address offset: 0x28 */ + __IO uint32_t FGCMAR; /*!< DMA2D Foreground CLUT Memory Address Register, Address offset: 0x2C */ + __IO uint32_t BGCMAR; /*!< DMA2D Background CLUT Memory Address Register, Address offset: 0x30 */ + __IO uint32_t OPFCCR; /*!< DMA2D Output PFC Control Register, Address offset: 0x34 */ + __IO uint32_t OCOLR; /*!< DMA2D Output Color Register, Address offset: 0x38 */ + __IO uint32_t OMAR; /*!< DMA2D Output Memory Address Register, Address offset: 0x3C */ + __IO uint32_t OOR; /*!< DMA2D Output Offset Register, Address offset: 0x40 */ + __IO uint32_t NLR; /*!< DMA2D Number of Line Register, Address offset: 0x44 */ + __IO uint32_t LWR; /*!< DMA2D Line Watermark Register, Address offset: 0x48 */ + __IO uint32_t AMTCR; /*!< DMA2D AHB Master Timer Configuration Register, Address offset: 0x4C */ + uint32_t RESERVED[236]; /*!< Reserved, 0x50-0x3FF */ + __IO uint32_t FGCLUT[256]; /*!< DMA2D Foreground CLUT, Address offset:400-7FF */ + __IO uint32_t BGCLUT[256]; /*!< DMA2D Background CLUT, Address offset:800-BFF */ +} DMA2D_TypeDef; + + +/** + * @brief Ethernet MAC + */ +typedef struct +{ + __IO uint32_t MACCR; + __IO uint32_t MACECR; + __IO uint32_t MACPFR; + __IO uint32_t MACWTR; + __IO uint32_t MACHT0R; + __IO uint32_t MACHT1R; + uint32_t RESERVED1[14]; + __IO uint32_t MACVTR; + uint32_t RESERVED2; + __IO uint32_t MACVHTR; + uint32_t RESERVED3; + __IO uint32_t MACVIR; + __IO uint32_t MACIVIR; + uint32_t RESERVED4[2]; + __IO uint32_t MACTFCR; + uint32_t RESERVED5[7]; + __IO uint32_t MACRFCR; + uint32_t RESERVED6[7]; + __IO uint32_t MACISR; + __IO uint32_t MACIER; + __IO uint32_t MACRXTXSR; + uint32_t RESERVED7; + __IO uint32_t MACPCSR; + __IO uint32_t MACRWKPFR; + uint32_t RESERVED8[2]; + __IO uint32_t MACLCSR; + __IO uint32_t MACLTCR; + __IO uint32_t MACLETR; + __IO uint32_t MAC1USTCR; + uint32_t RESERVED9[12]; + __IO uint32_t MACVR; + __IO uint32_t MACDR; + uint32_t RESERVED10; + __IO uint32_t MACHWF0R; + __IO uint32_t MACHWF1R; + __IO uint32_t MACHWF2R; + uint32_t RESERVED11[54]; + __IO uint32_t MACMDIOAR; + __IO uint32_t MACMDIODR; + uint32_t RESERVED12[2]; + __IO uint32_t MACARPAR; + uint32_t RESERVED13[59]; + __IO uint32_t MACA0HR; + __IO uint32_t MACA0LR; + __IO uint32_t MACA1HR; + __IO uint32_t MACA1LR; + __IO uint32_t MACA2HR; + __IO uint32_t MACA2LR; + __IO uint32_t MACA3HR; + __IO uint32_t MACA3LR; + uint32_t RESERVED14[248]; + __IO uint32_t MMCCR; + __IO uint32_t MMCRIR; + __IO uint32_t MMCTIR; + __IO uint32_t MMCRIMR; + __IO uint32_t MMCTIMR; + uint32_t RESERVED15[14]; + __IO uint32_t MMCTSCGPR; + __IO uint32_t MMCTMCGPR; + uint32_t RESERVED16[5]; + __IO uint32_t MMCTPCGR; + uint32_t RESERVED17[10]; + __IO uint32_t MMCRCRCEPR; + __IO uint32_t MMCRAEPR; + uint32_t RESERVED18[10]; + __IO uint32_t MMCRUPGR; + uint32_t RESERVED19[9]; + __IO uint32_t MMCTLPIMSTR; + __IO uint32_t MMCTLPITCR; + __IO uint32_t MMCRLPIMSTR; + __IO uint32_t MMCRLPITCR; + uint32_t RESERVED20[65]; + __IO uint32_t MACL3L4C0R; + __IO uint32_t MACL4A0R; + uint32_t RESERVED21[2]; + __IO uint32_t MACL3A0R0R; + __IO uint32_t MACL3A1R0R; + __IO uint32_t MACL3A2R0R; + __IO uint32_t MACL3A3R0R; + uint32_t RESERVED22[4]; + __IO uint32_t MACL3L4C1R; + __IO uint32_t MACL4A1R; + uint32_t RESERVED23[2]; + __IO uint32_t MACL3A0R1R; + __IO uint32_t MACL3A1R1R; + __IO uint32_t MACL3A2R1R; + __IO uint32_t MACL3A3R1R; + uint32_t RESERVED24[108]; + __IO uint32_t MACTSCR; + __IO uint32_t MACSSIR; + __IO uint32_t MACSTSR; + __IO uint32_t MACSTNR; + __IO uint32_t MACSTSUR; + __IO uint32_t MACSTNUR; + __IO uint32_t MACTSAR; + uint32_t RESERVED25; + __IO uint32_t MACTSSR; + uint32_t RESERVED26[3]; + __IO uint32_t MACTTSSNR; + __IO uint32_t MACTTSSSR; + uint32_t RESERVED27[2]; + __IO uint32_t MACACR; + uint32_t RESERVED28; + __IO uint32_t MACATSNR; + __IO uint32_t MACATSSR; + __IO uint32_t MACTSIACR; + __IO uint32_t MACTSEACR; + __IO uint32_t MACTSICNR; + __IO uint32_t MACTSECNR; + uint32_t RESERVED29[4]; + __IO uint32_t MACPPSCR; + uint32_t RESERVED30[3]; + __IO uint32_t MACPPSTTSR; + __IO uint32_t MACPPSTTNR; + __IO uint32_t MACPPSIR; + __IO uint32_t MACPPSWR; + uint32_t RESERVED31[12]; + __IO uint32_t MACPOCR; + __IO uint32_t MACSPI0R; + __IO uint32_t MACSPI1R; + __IO uint32_t MACSPI2R; + __IO uint32_t MACLMIR; + uint32_t RESERVED32[11]; + __IO uint32_t MTLOMR; + uint32_t RESERVED33[7]; + __IO uint32_t MTLISR; + uint32_t RESERVED34[55]; + __IO uint32_t MTLTQOMR; + __IO uint32_t MTLTQUR; + __IO uint32_t MTLTQDR; + uint32_t RESERVED35[8]; + __IO uint32_t MTLQICSR; + __IO uint32_t MTLRQOMR; + __IO uint32_t MTLRQMPOCR; + __IO uint32_t MTLRQDR; + uint32_t RESERVED36[177]; + __IO uint32_t DMAMR; + __IO uint32_t DMASBMR; + __IO uint32_t DMAISR; + __IO uint32_t DMADSR; + uint32_t RESERVED37[60]; + __IO uint32_t DMACCR; + __IO uint32_t DMACTCR; + __IO uint32_t DMACRCR; + uint32_t RESERVED38[2]; + __IO uint32_t DMACTDLAR; + uint32_t RESERVED39; + __IO uint32_t DMACRDLAR; + __IO uint32_t DMACTDTPR; + uint32_t RESERVED40; + __IO uint32_t DMACRDTPR; + __IO uint32_t DMACTDRLR; + __IO uint32_t DMACRDRLR; + __IO uint32_t DMACIER; + __IO uint32_t DMACRIWTR; +__IO uint32_t DMACSFCSR; + uint32_t RESERVED41; + __IO uint32_t DMACCATDR; + uint32_t RESERVED42; + __IO uint32_t DMACCARDR; + uint32_t RESERVED43; + __IO uint32_t DMACCATBR; + uint32_t RESERVED44; + __IO uint32_t DMACCARBR; + __IO uint32_t DMACSR; +uint32_t RESERVED45[2]; +__IO uint32_t DMACMFCR; +}ETH_TypeDef; +/** + * @brief External Interrupt/Event Controller + */ + +typedef struct +{ +__IO uint32_t RTSR1; /*!< EXTI Rising trigger selection register, Address offset: 0x00 */ +__IO uint32_t FTSR1; /*!< EXTI Falling trigger selection register, Address offset: 0x04 */ +__IO uint32_t SWIER1; /*!< EXTI Software interrupt event register, Address offset: 0x08 */ +__IO uint32_t D3PMR1; /*!< EXTI D3 Pending mask register, (same register as to SRDPMR1) Address offset: 0x0C */ +__IO uint32_t D3PCR1L; /*!< EXTI D3 Pending clear selection register low, (same register as to SRDPCR1L) Address offset: 0x10 */ +__IO uint32_t D3PCR1H; /*!< EXTI D3 Pending clear selection register High, (same register as to SRDPCR1H) Address offset: 0x14 */ +uint32_t RESERVED1[2]; /*!< Reserved, 0x18 to 0x1C */ +__IO uint32_t RTSR2; /*!< EXTI Rising trigger selection register, Address offset: 0x20 */ +__IO uint32_t FTSR2; /*!< EXTI Falling trigger selection register, Address offset: 0x24 */ +__IO uint32_t SWIER2; /*!< EXTI Software interrupt event register, Address offset: 0x28 */ +__IO uint32_t D3PMR2; /*!< EXTI D3 Pending mask register, (same register as to SRDPMR2) Address offset: 0x2C */ +__IO uint32_t D3PCR2L; /*!< EXTI D3 Pending clear selection register low, (same register as to SRDPCR2L) Address offset: 0x30 */ +__IO uint32_t D3PCR2H; /*!< EXTI D3 Pending clear selection register High, (same register as to SRDPCR2H) Address offset: 0x34 */ +uint32_t RESERVED2[2]; /*!< Reserved, 0x38 to 0x3C */ +__IO uint32_t RTSR3; /*!< EXTI Rising trigger selection register, Address offset: 0x40 */ +__IO uint32_t FTSR3; /*!< EXTI Falling trigger selection register, Address offset: 0x44 */ +__IO uint32_t SWIER3; /*!< EXTI Software interrupt event register, Address offset: 0x48 */ +__IO uint32_t D3PMR3; /*!< EXTI D3 Pending mask register, (same register as to SRDPMR3) Address offset: 0x4C */ +__IO uint32_t D3PCR3L; /*!< EXTI D3 Pending clear selection register low, (same register as to SRDPCR3L) Address offset: 0x50 */ +__IO uint32_t D3PCR3H; /*!< EXTI D3 Pending clear selection register High, (same register as to SRDPCR3H) Address offset: 0x54 */ +uint32_t RESERVED3[10]; /*!< Reserved, 0x58 to 0x7C */ +__IO uint32_t IMR1; /*!< EXTI Interrupt mask register, Address offset: 0x80 */ +__IO uint32_t EMR1; /*!< EXTI Event mask register, Address offset: 0x84 */ +__IO uint32_t PR1; /*!< EXTI Pending register, Address offset: 0x88 */ +uint32_t RESERVED4; /*!< Reserved, 0x8C */ +__IO uint32_t IMR2; /*!< EXTI Interrupt mask register, Address offset: 0x90 */ +__IO uint32_t EMR2; /*!< EXTI Event mask register, Address offset: 0x94 */ +__IO uint32_t PR2; /*!< EXTI Pending register, Address offset: 0x98 */ +uint32_t RESERVED5; /*!< Reserved, 0x9C */ +__IO uint32_t IMR3; /*!< EXTI Interrupt mask register, Address offset: 0xA0 */ +__IO uint32_t EMR3; /*!< EXTI Event mask register, Address offset: 0xA4 */ +__IO uint32_t PR3; /*!< EXTI Pending register, Address offset: 0xA8 */ +}EXTI_TypeDef; + +typedef struct +{ +__IO uint32_t IMR1; /*!< EXTI Interrupt mask register, Address offset: 0x00 */ +__IO uint32_t EMR1; /*!< EXTI Event mask register, Address offset: 0x04 */ +__IO uint32_t PR1; /*!< EXTI Pending register, Address offset: 0x08 */ +uint32_t RESERVED1; /*!< Reserved, 0x0C */ +__IO uint32_t IMR2; /*!< EXTI Interrupt mask register, Address offset: 0x10 */ +__IO uint32_t EMR2; /*!< EXTI Event mask register, Address offset: 0x14 */ +__IO uint32_t PR2; /*!< EXTI Pending register, Address offset: 0x18 */ +uint32_t RESERVED2; /*!< Reserved, 0x1C */ +__IO uint32_t IMR3; /*!< EXTI Interrupt mask register, Address offset: 0x20 */ +__IO uint32_t EMR3; /*!< EXTI Event mask register, Address offset: 0x24 */ +__IO uint32_t PR3; /*!< EXTI Pending register, Address offset: 0x28 */ +}EXTI_Core_TypeDef; + + +/** + * @brief FLASH Registers + */ + +typedef struct +{ + __IO uint32_t ACR; /*!< FLASH access control register, Address offset: 0x00 */ + __IO uint32_t KEYR1; /*!< Flash Key Register for bank1, Address offset: 0x04 */ + __IO uint32_t OPTKEYR; /*!< Flash Option Key Register, Address offset: 0x08 */ + __IO uint32_t CR1; /*!< Flash Control Register for bank1, Address offset: 0x0C */ + __IO uint32_t SR1; /*!< Flash Status Register for bank1, Address offset: 0x10 */ + __IO uint32_t CCR1; /*!< Flash Control Register for bank1, Address offset: 0x14 */ + __IO uint32_t OPTCR; /*!< Flash Option Control Register, Address offset: 0x18 */ + __IO uint32_t OPTSR_CUR; /*!< Flash Option Status Current Register, Address offset: 0x1C */ + __IO uint32_t OPTSR_PRG; /*!< Flash Option Status to Program Register, Address offset: 0x20 */ + __IO uint32_t OPTCCR; /*!< Flash Option Clear Control Register, Address offset: 0x24 */ + __IO uint32_t PRAR_CUR1; /*!< Flash Current Protection Address Register for bank1, Address offset: 0x28 */ + __IO uint32_t PRAR_PRG1; /*!< Flash Protection Address to Program Register for bank1, Address offset: 0x2C */ + __IO uint32_t SCAR_CUR1; /*!< Flash Current Secure Address Register for bank1, Address offset: 0x30 */ + __IO uint32_t SCAR_PRG1; /*!< Flash Secure Address to Program Register for bank1, Address offset: 0x34 */ + __IO uint32_t WPSN_CUR1; /*!< Flash Current Write Protection Register on bank1, Address offset: 0x38 */ + __IO uint32_t WPSN_PRG1; /*!< Flash Write Protection to Program Register on bank1, Address offset: 0x3C */ + __IO uint32_t BOOT_CUR; /*!< Flash Current Boot Address for Pelican Core Register, Address offset: 0x40 */ + __IO uint32_t BOOT_PRG; /*!< Flash Boot Address to Program for Pelican Core Register, Address offset: 0x44 */ + uint32_t RESERVED0[2]; /*!< Reserved, 0x48 to 0x4C */ + __IO uint32_t CRCCR1; /*!< Flash CRC Control register For Bank1 Register , Address offset: 0x50 */ + __IO uint32_t CRCSADD1; /*!< Flash CRC Start Address Register for Bank1 , Address offset: 0x54 */ + __IO uint32_t CRCEADD1; /*!< Flash CRC End Address Register for Bank1 , Address offset: 0x58 */ + __IO uint32_t CRCDATA; /*!< Flash CRC Data Register for Bank1 , Address offset: 0x5C */ + __IO uint32_t ECC_FA1; /*!< Flash ECC Fail Address For Bank1 Register , Address offset: 0x60 */ + uint32_t RESERVED[3]; /*!< Reserved, 0x64 to 0x6C */ + __IO uint32_t OPTSR2_CUR; /*!< Flash Option Status Current Register 2, Address offset: 0x70 */ + __IO uint32_t OPTSR2_PRG; /*!< Flash Option Status to Program Register 2, Address offset: 0x74 */ +} FLASH_TypeDef; + +/** + * @brief Filter and Mathematical ACcelerator + */ +typedef struct +{ + __IO uint32_t X1BUFCFG; /*!< FMAC X1 Buffer Configuration register, Address offset: 0x00 */ + __IO uint32_t X2BUFCFG; /*!< FMAC X2 Buffer Configuration register, Address offset: 0x04 */ + __IO uint32_t YBUFCFG; /*!< FMAC Y Buffer Configuration register, Address offset: 0x08 */ + __IO uint32_t PARAM; /*!< FMAC Parameter register, Address offset: 0x0C */ + __IO uint32_t CR; /*!< FMAC Control register, Address offset: 0x10 */ + __IO uint32_t SR; /*!< FMAC Status register, Address offset: 0x14 */ + __IO uint32_t WDATA; /*!< FMAC Write Data register, Address offset: 0x18 */ + __IO uint32_t RDATA; /*!< FMAC Read Data register, Address offset: 0x1C */ +} FMAC_TypeDef; + +/** + * @brief Flexible Memory Controller + */ + +typedef struct +{ + __IO uint32_t BTCR[8]; /*!< NOR/PSRAM chip-select control register(BCR) and chip-select timing register(BTR), Address offset: 0x00-1C */ +} FMC_Bank1_TypeDef; + +/** + * @brief Flexible Memory Controller Bank1E + */ + +typedef struct +{ + __IO uint32_t BWTR[7]; /*!< NOR/PSRAM write timing registers, Address offset: 0x104-0x11C */ +} FMC_Bank1E_TypeDef; + +/** + * @brief Flexible Memory Controller Bank2 + */ + +typedef struct +{ + __IO uint32_t PCR2; /*!< NAND Flash control register 2, Address offset: 0x60 */ + __IO uint32_t SR2; /*!< NAND Flash FIFO status and interrupt register 2, Address offset: 0x64 */ + __IO uint32_t PMEM2; /*!< NAND Flash Common memory space timing register 2, Address offset: 0x68 */ + __IO uint32_t PATT2; /*!< NAND Flash Attribute memory space timing register 2, Address offset: 0x6C */ + uint32_t RESERVED0; /*!< Reserved, 0x70 */ + __IO uint32_t ECCR2; /*!< NAND Flash ECC result registers 2, Address offset: 0x74 */ +} FMC_Bank2_TypeDef; + +/** + * @brief Flexible Memory Controller Bank3 + */ + +typedef struct +{ + __IO uint32_t PCR; /*!< NAND Flash control register 3, Address offset: 0x80 */ + __IO uint32_t SR; /*!< NAND Flash FIFO status and interrupt register 3, Address offset: 0x84 */ + __IO uint32_t PMEM; /*!< NAND Flash Common memory space timing register 3, Address offset: 0x88 */ + __IO uint32_t PATT; /*!< NAND Flash Attribute memory space timing register 3, Address offset: 0x8C */ + uint32_t RESERVED; /*!< Reserved, 0x90 */ + __IO uint32_t ECCR; /*!< NAND Flash ECC result registers 3, Address offset: 0x94 */ +} FMC_Bank3_TypeDef; + +/** + * @brief Flexible Memory Controller Bank5 and 6 + */ + + +typedef struct +{ + __IO uint32_t SDCR[2]; /*!< SDRAM Control registers , Address offset: 0x140-0x144 */ + __IO uint32_t SDTR[2]; /*!< SDRAM Timing registers , Address offset: 0x148-0x14C */ + __IO uint32_t SDCMR; /*!< SDRAM Command Mode register, Address offset: 0x150 */ + __IO uint32_t SDRTR; /*!< SDRAM Refresh Timer register, Address offset: 0x154 */ + __IO uint32_t SDSR; /*!< SDRAM Status register, Address offset: 0x158 */ +} FMC_Bank5_6_TypeDef; + +/** + * @brief General Purpose I/O + */ + +typedef struct +{ + __IO uint32_t MODER; /*!< GPIO port mode register, Address offset: 0x00 */ + __IO uint32_t OTYPER; /*!< GPIO port output type register, Address offset: 0x04 */ + __IO uint32_t OSPEEDR; /*!< GPIO port output speed register, Address offset: 0x08 */ + __IO uint32_t PUPDR; /*!< GPIO port pull-up/pull-down register, Address offset: 0x0C */ + __IO uint32_t IDR; /*!< GPIO port input data register, Address offset: 0x10 */ + __IO uint32_t ODR; /*!< GPIO port output data register, Address offset: 0x14 */ + __IO uint32_t BSRR; /*!< GPIO port bit set/reset, Address offset: 0x18 */ + __IO uint32_t LCKR; /*!< GPIO port configuration lock register, Address offset: 0x1C */ + __IO uint32_t AFR[2]; /*!< GPIO alternate function registers, Address offset: 0x20-0x24 */ +} GPIO_TypeDef; + +/** + * @brief Operational Amplifier (OPAMP) + */ + +typedef struct +{ + __IO uint32_t CSR; /*!< OPAMP control/status register, Address offset: 0x00 */ + __IO uint32_t OTR; /*!< OPAMP offset trimming register for normal mode, Address offset: 0x04 */ + __IO uint32_t HSOTR; /*!< OPAMP offset trimming register for high speed mode, Address offset: 0x08 */ +} OPAMP_TypeDef; + +/** + * @brief System configuration controller + */ + +typedef struct +{ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x00 */ + __IO uint32_t PMCR; /*!< SYSCFG peripheral mode configuration register, Address offset: 0x04 */ + __IO uint32_t EXTICR[4]; /*!< SYSCFG external interrupt configuration registers, Address offset: 0x08-0x14 */ + __IO uint32_t CFGR; /*!< SYSCFG configuration registers, Address offset: 0x18 */ + uint32_t RESERVED2; /*!< Reserved, Address offset: 0x1C */ + __IO uint32_t CCCSR; /*!< SYSCFG compensation cell control/status register, Address offset: 0x20 */ + __IO uint32_t CCVR; /*!< SYSCFG compensation cell value register, Address offset: 0x24 */ + __IO uint32_t CCCR; /*!< SYSCFG compensation cell code register, Address offset: 0x28 */ + uint32_t RESERVED3; /*!< Reserved, Address offset: 0x2C */ + __IO uint32_t ADC2ALT; /*!< ADC2 internal input alternate connection register, Address offset: 0x30 */ + uint32_t RESERVED4[60]; /*!< Reserved, 0x34-0x120 */ + __IO uint32_t PKGR; /*!< SYSCFG package register, Address offset: 0x124 */ + uint32_t RESERVED5[118]; /*!< Reserved, 0x128-0x2FC */ + __IO uint32_t UR0; /*!< SYSCFG user register 0, Address offset: 0x300 */ + __IO uint32_t UR1; /*!< SYSCFG user register 1, Address offset: 0x304 */ + __IO uint32_t UR2; /*!< SYSCFG user register 2, Address offset: 0x308 */ + __IO uint32_t UR3; /*!< SYSCFG user register 3, Address offset: 0x30C */ + __IO uint32_t UR4; /*!< SYSCFG user register 4, Address offset: 0x310 */ + __IO uint32_t UR5; /*!< SYSCFG user register 5, Address offset: 0x314 */ + __IO uint32_t UR6; /*!< SYSCFG user register 6, Address offset: 0x318 */ + __IO uint32_t UR7; /*!< SYSCFG user register 7, Address offset: 0x31C */ + uint32_t RESERVED6[3]; /*!< Reserved, Address offset: 0x320-0x328 */ + __IO uint32_t UR11; /*!< SYSCFG user register 11, Address offset: 0x32C */ + __IO uint32_t UR12; /*!< SYSCFG user register 12, Address offset: 0x330 */ + __IO uint32_t UR13; /*!< SYSCFG user register 13, Address offset: 0x334 */ + __IO uint32_t UR14; /*!< SYSCFG user register 14, Address offset: 0x338 */ + __IO uint32_t UR15; /*!< SYSCFG user register 15, Address offset: 0x33C */ + __IO uint32_t UR16; /*!< SYSCFG user register 16, Address offset: 0x340 */ + __IO uint32_t UR17; /*!< SYSCFG user register 17, Address offset: 0x344 */ + __IO uint32_t UR18; /*!< SYSCFG user register 18, Address offset: 0x348 */ + +} SYSCFG_TypeDef; + +/** + * @brief Inter-integrated Circuit Interface + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< I2C Control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< I2C Control register 2, Address offset: 0x04 */ + __IO uint32_t OAR1; /*!< I2C Own address 1 register, Address offset: 0x08 */ + __IO uint32_t OAR2; /*!< I2C Own address 2 register, Address offset: 0x0C */ + __IO uint32_t TIMINGR; /*!< I2C Timing register, Address offset: 0x10 */ + __IO uint32_t TIMEOUTR; /*!< I2C Timeout register, Address offset: 0x14 */ + __IO uint32_t ISR; /*!< I2C Interrupt and status register, Address offset: 0x18 */ + __IO uint32_t ICR; /*!< I2C Interrupt clear register, Address offset: 0x1C */ + __IO uint32_t PECR; /*!< I2C PEC register, Address offset: 0x20 */ + __IO uint32_t RXDR; /*!< I2C Receive data register, Address offset: 0x24 */ + __IO uint32_t TXDR; /*!< I2C Transmit data register, Address offset: 0x28 */ +} I2C_TypeDef; + +/** + * @brief Independent WATCHDOG + */ + +typedef struct +{ + __IO uint32_t KR; /*!< IWDG Key register, Address offset: 0x00 */ + __IO uint32_t PR; /*!< IWDG Prescaler register, Address offset: 0x04 */ + __IO uint32_t RLR; /*!< IWDG Reload register, Address offset: 0x08 */ + __IO uint32_t SR; /*!< IWDG Status register, Address offset: 0x0C */ + __IO uint32_t WINR; /*!< IWDG Window register, Address offset: 0x10 */ +} IWDG_TypeDef; + + +/** + * @brief LCD-TFT Display Controller + */ + +typedef struct +{ + uint32_t RESERVED0[2]; /*!< Reserved, 0x00-0x04 */ + __IO uint32_t SSCR; /*!< LTDC Synchronization Size Configuration Register, Address offset: 0x08 */ + __IO uint32_t BPCR; /*!< LTDC Back Porch Configuration Register, Address offset: 0x0C */ + __IO uint32_t AWCR; /*!< LTDC Active Width Configuration Register, Address offset: 0x10 */ + __IO uint32_t TWCR; /*!< LTDC Total Width Configuration Register, Address offset: 0x14 */ + __IO uint32_t GCR; /*!< LTDC Global Control Register, Address offset: 0x18 */ + uint32_t RESERVED1[2]; /*!< Reserved, 0x1C-0x20 */ + __IO uint32_t SRCR; /*!< LTDC Shadow Reload Configuration Register, Address offset: 0x24 */ + uint32_t RESERVED2[1]; /*!< Reserved, 0x28 */ + __IO uint32_t BCCR; /*!< LTDC Background Color Configuration Register, Address offset: 0x2C */ + uint32_t RESERVED3[1]; /*!< Reserved, 0x30 */ + __IO uint32_t IER; /*!< LTDC Interrupt Enable Register, Address offset: 0x34 */ + __IO uint32_t ISR; /*!< LTDC Interrupt Status Register, Address offset: 0x38 */ + __IO uint32_t ICR; /*!< LTDC Interrupt Clear Register, Address offset: 0x3C */ + __IO uint32_t LIPCR; /*!< LTDC Line Interrupt Position Configuration Register, Address offset: 0x40 */ + __IO uint32_t CPSR; /*!< LTDC Current Position Status Register, Address offset: 0x44 */ + __IO uint32_t CDSR; /*!< LTDC Current Display Status Register, Address offset: 0x48 */ +} LTDC_TypeDef; + +/** + * @brief LCD-TFT Display layer x Controller + */ + +typedef struct +{ + __IO uint32_t CR; /*!< LTDC Layerx Control Register Address offset: 0x84 */ + __IO uint32_t WHPCR; /*!< LTDC Layerx Window Horizontal Position Configuration Register Address offset: 0x88 */ + __IO uint32_t WVPCR; /*!< LTDC Layerx Window Vertical Position Configuration Register Address offset: 0x8C */ + __IO uint32_t CKCR; /*!< LTDC Layerx Color Keying Configuration Register Address offset: 0x90 */ + __IO uint32_t PFCR; /*!< LTDC Layerx Pixel Format Configuration Register Address offset: 0x94 */ + __IO uint32_t CACR; /*!< LTDC Layerx Constant Alpha Configuration Register Address offset: 0x98 */ + __IO uint32_t DCCR; /*!< LTDC Layerx Default Color Configuration Register Address offset: 0x9C */ + __IO uint32_t BFCR; /*!< LTDC Layerx Blending Factors Configuration Register Address offset: 0xA0 */ + uint32_t RESERVED0[2]; /*!< Reserved */ + __IO uint32_t CFBAR; /*!< LTDC Layerx Color Frame Buffer Address Register Address offset: 0xAC */ + __IO uint32_t CFBLR; /*!< LTDC Layerx Color Frame Buffer Length Register Address offset: 0xB0 */ + __IO uint32_t CFBLNR; /*!< LTDC Layerx ColorFrame Buffer Line Number Register Address offset: 0xB4 */ + uint32_t RESERVED1[3]; /*!< Reserved */ + __IO uint32_t CLUTWR; /*!< LTDC Layerx CLUT Write Register Address offset: 0x144 */ + +} LTDC_Layer_TypeDef; + +/** + * @brief Power Control + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< PWR power control register 1, Address offset: 0x00 */ + __IO uint32_t CSR1; /*!< PWR power control status register 1, Address offset: 0x04 */ + __IO uint32_t CR2; /*!< PWR power control register 2, Address offset: 0x08 */ + __IO uint32_t CR3; /*!< PWR power control register 3, Address offset: 0x0C */ + __IO uint32_t CPUCR; /*!< PWR CPU control register, Address offset: 0x10 */ + uint32_t RESERVED0; /*!< Reserved, Address offset: 0x14 */ + __IO uint32_t D3CR; /*!< PWR D3 domain control register, Address offset: 0x18 */ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x1C */ + __IO uint32_t WKUPCR; /*!< PWR wakeup clear register, Address offset: 0x20 */ + __IO uint32_t WKUPFR; /*!< PWR wakeup flag register, Address offset: 0x24 */ + __IO uint32_t WKUPEPR; /*!< PWR wakeup enable and polarity register, Address offset: 0x28 */ +} PWR_TypeDef; + +/** + * @brief Reset and Clock Control + */ + +typedef struct +{ + __IO uint32_t CR; /*!< RCC clock control register, Address offset: 0x00 */ + __IO uint32_t HSICFGR; /*!< HSI Clock Calibration Register, Address offset: 0x04 */ + __IO uint32_t CRRCR; /*!< Clock Recovery RC Register, Address offset: 0x08 */ + __IO uint32_t CSICFGR; /*!< CSI Clock Calibration Register, Address offset: 0x0C */ + __IO uint32_t CFGR; /*!< RCC clock configuration register, Address offset: 0x10 */ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x14 */ + __IO uint32_t D1CFGR; /*!< RCC Domain 1 configuration register, Address offset: 0x18 */ + __IO uint32_t D2CFGR; /*!< RCC Domain 2 configuration register, Address offset: 0x1C */ + __IO uint32_t D3CFGR; /*!< RCC Domain 3 configuration register, Address offset: 0x20 */ + uint32_t RESERVED2; /*!< Reserved, Address offset: 0x24 */ + __IO uint32_t PLLCKSELR; /*!< RCC PLLs Clock Source Selection Register, Address offset: 0x28 */ + __IO uint32_t PLLCFGR; /*!< RCC PLLs Configuration Register, Address offset: 0x2C */ + __IO uint32_t PLL1DIVR; /*!< RCC PLL1 Dividers Configuration Register, Address offset: 0x30 */ + __IO uint32_t PLL1FRACR; /*!< RCC PLL1 Fractional Divider Configuration Register, Address offset: 0x34 */ + __IO uint32_t PLL2DIVR; /*!< RCC PLL2 Dividers Configuration Register, Address offset: 0x38 */ + __IO uint32_t PLL2FRACR; /*!< RCC PLL2 Fractional Divider Configuration Register, Address offset: 0x3C */ + __IO uint32_t PLL3DIVR; /*!< RCC PLL3 Dividers Configuration Register, Address offset: 0x40 */ + __IO uint32_t PLL3FRACR; /*!< RCC PLL3 Fractional Divider Configuration Register, Address offset: 0x44 */ + uint32_t RESERVED3; /*!< Reserved, Address offset: 0x48 */ + __IO uint32_t D1CCIPR; /*!< RCC Domain 1 Kernel Clock Configuration Register Address offset: 0x4C */ + __IO uint32_t D2CCIP1R; /*!< RCC Domain 2 Kernel Clock Configuration Register Address offset: 0x50 */ + __IO uint32_t D2CCIP2R; /*!< RCC Domain 2 Kernel Clock Configuration Register Address offset: 0x54 */ + __IO uint32_t D3CCIPR; /*!< RCC Domain 3 Kernel Clock Configuration Register Address offset: 0x58 */ + uint32_t RESERVED4; /*!< Reserved, Address offset: 0x5C */ + __IO uint32_t CIER; /*!< RCC Clock Source Interrupt Enable Register Address offset: 0x60 */ + __IO uint32_t CIFR; /*!< RCC Clock Source Interrupt Flag Register Address offset: 0x64 */ + __IO uint32_t CICR; /*!< RCC Clock Source Interrupt Clear Register Address offset: 0x68 */ + uint32_t RESERVED5; /*!< Reserved, Address offset: 0x6C */ + __IO uint32_t BDCR; /*!< RCC Vswitch Backup Domain Control Register, Address offset: 0x70 */ + __IO uint32_t CSR; /*!< RCC clock control & status register, Address offset: 0x74 */ + uint32_t RESERVED6; /*!< Reserved, Address offset: 0x78 */ + __IO uint32_t AHB3RSTR; /*!< RCC AHB3 peripheral reset register, Address offset: 0x7C */ + __IO uint32_t AHB1RSTR; /*!< RCC AHB1 peripheral reset register, Address offset: 0x80 */ + __IO uint32_t AHB2RSTR; /*!< RCC AHB2 peripheral reset register, Address offset: 0x84 */ + __IO uint32_t AHB4RSTR; /*!< RCC AHB4 peripheral reset register, Address offset: 0x88 */ + __IO uint32_t APB3RSTR; /*!< RCC APB3 peripheral reset register, Address offset: 0x8C */ + __IO uint32_t APB1LRSTR; /*!< RCC APB1 peripheral reset Low Word register, Address offset: 0x90 */ + __IO uint32_t APB1HRSTR; /*!< RCC APB1 peripheral reset High Word register, Address offset: 0x94 */ + __IO uint32_t APB2RSTR; /*!< RCC APB2 peripheral reset register, Address offset: 0x98 */ + __IO uint32_t APB4RSTR; /*!< RCC APB4 peripheral reset register, Address offset: 0x9C */ + __IO uint32_t GCR; /*!< RCC RCC Global Control Register, Address offset: 0xA0 */ + uint32_t RESERVED8; /*!< Reserved, Address offset: 0xA4 */ + __IO uint32_t D3AMR; /*!< RCC Domain 3 Autonomous Mode Register, Address offset: 0xA8 */ + uint32_t RESERVED11[9]; /*!< Reserved, 0xAC-0xCC Address offset: 0xAC */ + __IO uint32_t RSR; /*!< RCC Reset status register, Address offset: 0xD0 */ + __IO uint32_t AHB3ENR; /*!< RCC AHB3 peripheral clock register, Address offset: 0xD4 */ + __IO uint32_t AHB1ENR; /*!< RCC AHB1 peripheral clock register, Address offset: 0xD8 */ + __IO uint32_t AHB2ENR; /*!< RCC AHB2 peripheral clock register, Address offset: 0xDC */ + __IO uint32_t AHB4ENR; /*!< RCC AHB4 peripheral clock register, Address offset: 0xE0 */ + __IO uint32_t APB3ENR; /*!< RCC APB3 peripheral clock register, Address offset: 0xE4 */ + __IO uint32_t APB1LENR; /*!< RCC APB1 peripheral clock Low Word register, Address offset: 0xE8 */ + __IO uint32_t APB1HENR; /*!< RCC APB1 peripheral clock High Word register, Address offset: 0xEC */ + __IO uint32_t APB2ENR; /*!< RCC APB2 peripheral clock register, Address offset: 0xF0 */ + __IO uint32_t APB4ENR; /*!< RCC APB4 peripheral clock register, Address offset: 0xF4 */ + uint32_t RESERVED12; /*!< Reserved, Address offset: 0xF8 */ + __IO uint32_t AHB3LPENR; /*!< RCC AHB3 peripheral sleep clock register, Address offset: 0xFC */ + __IO uint32_t AHB1LPENR; /*!< RCC AHB1 peripheral sleep clock register, Address offset: 0x100 */ + __IO uint32_t AHB2LPENR; /*!< RCC AHB2 peripheral sleep clock register, Address offset: 0x104 */ + __IO uint32_t AHB4LPENR; /*!< RCC AHB4 peripheral sleep clock register, Address offset: 0x108 */ + __IO uint32_t APB3LPENR; /*!< RCC APB3 peripheral sleep clock register, Address offset: 0x10C */ + __IO uint32_t APB1LLPENR; /*!< RCC APB1 peripheral sleep clock Low Word register, Address offset: 0x110 */ + __IO uint32_t APB1HLPENR; /*!< RCC APB1 peripheral sleep clock High Word register, Address offset: 0x114 */ + __IO uint32_t APB2LPENR; /*!< RCC APB2 peripheral sleep clock register, Address offset: 0x118 */ + __IO uint32_t APB4LPENR; /*!< RCC APB4 peripheral sleep clock register, Address offset: 0x11C */ + uint32_t RESERVED13[4]; /*!< Reserved, 0x120-0x12C Address offset: 0x120 */ + +} RCC_TypeDef; + + +/** + * @brief Real-Time Clock + */ +typedef struct +{ + __IO uint32_t TR; /*!< RTC time register, Address offset: 0x00 */ + __IO uint32_t DR; /*!< RTC date register, Address offset: 0x04 */ + __IO uint32_t CR; /*!< RTC control register, Address offset: 0x08 */ + __IO uint32_t ISR; /*!< RTC initialization and status register, Address offset: 0x0C */ + __IO uint32_t PRER; /*!< RTC prescaler register, Address offset: 0x10 */ + __IO uint32_t WUTR; /*!< RTC wakeup timer register, Address offset: 0x14 */ + uint32_t RESERVED; /*!< Reserved, Address offset: 0x18 */ + __IO uint32_t ALRMAR; /*!< RTC alarm A register, Address offset: 0x1C */ + __IO uint32_t ALRMBR; /*!< RTC alarm B register, Address offset: 0x20 */ + __IO uint32_t WPR; /*!< RTC write protection register, Address offset: 0x24 */ + __IO uint32_t SSR; /*!< RTC sub second register, Address offset: 0x28 */ + __IO uint32_t SHIFTR; /*!< RTC shift control register, Address offset: 0x2C */ + __IO uint32_t TSTR; /*!< RTC time stamp time register, Address offset: 0x30 */ + __IO uint32_t TSDR; /*!< RTC time stamp date register, Address offset: 0x34 */ + __IO uint32_t TSSSR; /*!< RTC time-stamp sub second register, Address offset: 0x38 */ + __IO uint32_t CALR; /*!< RTC calibration register, Address offset: 0x3C */ + __IO uint32_t TAMPCR; /*!< RTC tamper configuration register, Address offset: 0x40 */ + __IO uint32_t ALRMASSR; /*!< RTC alarm A sub second register, Address offset: 0x44 */ + __IO uint32_t ALRMBSSR; /*!< RTC alarm B sub second register, Address offset: 0x48 */ + __IO uint32_t OR; /*!< RTC option register, Address offset: 0x4C */ + __IO uint32_t BKP0R; /*!< RTC backup register 0, Address offset: 0x50 */ + __IO uint32_t BKP1R; /*!< RTC backup register 1, Address offset: 0x54 */ + __IO uint32_t BKP2R; /*!< RTC backup register 2, Address offset: 0x58 */ + __IO uint32_t BKP3R; /*!< RTC backup register 3, Address offset: 0x5C */ + __IO uint32_t BKP4R; /*!< RTC backup register 4, Address offset: 0x60 */ + __IO uint32_t BKP5R; /*!< RTC backup register 5, Address offset: 0x64 */ + __IO uint32_t BKP6R; /*!< RTC backup register 6, Address offset: 0x68 */ + __IO uint32_t BKP7R; /*!< RTC backup register 7, Address offset: 0x6C */ + __IO uint32_t BKP8R; /*!< RTC backup register 8, Address offset: 0x70 */ + __IO uint32_t BKP9R; /*!< RTC backup register 9, Address offset: 0x74 */ + __IO uint32_t BKP10R; /*!< RTC backup register 10, Address offset: 0x78 */ + __IO uint32_t BKP11R; /*!< RTC backup register 11, Address offset: 0x7C */ + __IO uint32_t BKP12R; /*!< RTC backup register 12, Address offset: 0x80 */ + __IO uint32_t BKP13R; /*!< RTC backup register 13, Address offset: 0x84 */ + __IO uint32_t BKP14R; /*!< RTC backup register 14, Address offset: 0x88 */ + __IO uint32_t BKP15R; /*!< RTC backup register 15, Address offset: 0x8C */ + __IO uint32_t BKP16R; /*!< RTC backup register 16, Address offset: 0x90 */ + __IO uint32_t BKP17R; /*!< RTC backup register 17, Address offset: 0x94 */ + __IO uint32_t BKP18R; /*!< RTC backup register 18, Address offset: 0x98 */ + __IO uint32_t BKP19R; /*!< RTC backup register 19, Address offset: 0x9C */ + __IO uint32_t BKP20R; /*!< RTC backup register 20, Address offset: 0xA0 */ + __IO uint32_t BKP21R; /*!< RTC backup register 21, Address offset: 0xA4 */ + __IO uint32_t BKP22R; /*!< RTC backup register 22, Address offset: 0xA8 */ + __IO uint32_t BKP23R; /*!< RTC backup register 23, Address offset: 0xAC */ + __IO uint32_t BKP24R; /*!< RTC backup register 24, Address offset: 0xB0 */ + __IO uint32_t BKP25R; /*!< RTC backup register 25, Address offset: 0xB4 */ + __IO uint32_t BKP26R; /*!< RTC backup register 26, Address offset: 0xB8 */ + __IO uint32_t BKP27R; /*!< RTC backup register 27, Address offset: 0xBC */ + __IO uint32_t BKP28R; /*!< RTC backup register 28, Address offset: 0xC0 */ + __IO uint32_t BKP29R; /*!< RTC backup register 29, Address offset: 0xC4 */ + __IO uint32_t BKP30R; /*!< RTC backup register 30, Address offset: 0xC8 */ + __IO uint32_t BKP31R; /*!< RTC backup register 31, Address offset: 0xCC */ +} RTC_TypeDef; + +/** + * @brief Serial Audio Interface + */ + +typedef struct +{ + __IO uint32_t GCR; /*!< SAI global configuration register, Address offset: 0x00 */ + uint32_t RESERVED0[16]; /*!< Reserved, 0x04 - 0x43 */ + __IO uint32_t PDMCR; /*!< SAI PDM control register, Address offset: 0x44 */ + __IO uint32_t PDMDLY; /*!< SAI PDM delay register, Address offset: 0x48 */ +} SAI_TypeDef; + +typedef struct +{ + __IO uint32_t CR1; /*!< SAI block x configuration register 1, Address offset: 0x04 */ + __IO uint32_t CR2; /*!< SAI block x configuration register 2, Address offset: 0x08 */ + __IO uint32_t FRCR; /*!< SAI block x frame configuration register, Address offset: 0x0C */ + __IO uint32_t SLOTR; /*!< SAI block x slot register, Address offset: 0x10 */ + __IO uint32_t IMR; /*!< SAI block x interrupt mask register, Address offset: 0x14 */ + __IO uint32_t SR; /*!< SAI block x status register, Address offset: 0x18 */ + __IO uint32_t CLRFR; /*!< SAI block x clear flag register, Address offset: 0x1C */ + __IO uint32_t DR; /*!< SAI block x data register, Address offset: 0x20 */ +} SAI_Block_TypeDef; + +/** + * @brief SPDIF-RX Interface + */ + +typedef struct +{ + __IO uint32_t CR; /*!< Control register, Address offset: 0x00 */ + __IO uint32_t IMR; /*!< Interrupt mask register, Address offset: 0x04 */ + __IO uint32_t SR; /*!< Status register, Address offset: 0x08 */ + __IO uint32_t IFCR; /*!< Interrupt Flag Clear register, Address offset: 0x0C */ + __IO uint32_t DR; /*!< Data input register, Address offset: 0x10 */ + __IO uint32_t CSR; /*!< Channel Status register, Address offset: 0x14 */ + __IO uint32_t DIR; /*!< Debug Information register, Address offset: 0x18 */ + uint32_t RESERVED2; /*!< Reserved, 0x1A */ +} SPDIFRX_TypeDef; + + +/** + * @brief Secure digital input/output Interface + */ + +typedef struct +{ + __IO uint32_t POWER; /*!< SDMMC power control register, Address offset: 0x00 */ + __IO uint32_t CLKCR; /*!< SDMMC clock control register, Address offset: 0x04 */ + __IO uint32_t ARG; /*!< SDMMC argument register, Address offset: 0x08 */ + __IO uint32_t CMD; /*!< SDMMC command register, Address offset: 0x0C */ + __I uint32_t RESPCMD; /*!< SDMMC command response register, Address offset: 0x10 */ + __I uint32_t RESP1; /*!< SDMMC response 1 register, Address offset: 0x14 */ + __I uint32_t RESP2; /*!< SDMMC response 2 register, Address offset: 0x18 */ + __I uint32_t RESP3; /*!< SDMMC response 3 register, Address offset: 0x1C */ + __I uint32_t RESP4; /*!< SDMMC response 4 register, Address offset: 0x20 */ + __IO uint32_t DTIMER; /*!< SDMMC data timer register, Address offset: 0x24 */ + __IO uint32_t DLEN; /*!< SDMMC data length register, Address offset: 0x28 */ + __IO uint32_t DCTRL; /*!< SDMMC data control register, Address offset: 0x2C */ + __I uint32_t DCOUNT; /*!< SDMMC data counter register, Address offset: 0x30 */ + __I uint32_t STA; /*!< SDMMC status register, Address offset: 0x34 */ + __IO uint32_t ICR; /*!< SDMMC interrupt clear register, Address offset: 0x38 */ + __IO uint32_t MASK; /*!< SDMMC mask register, Address offset: 0x3C */ + __IO uint32_t ACKTIME; /*!< SDMMC Acknowledgement timer register, Address offset: 0x40 */ + uint32_t RESERVED0[3]; /*!< Reserved, 0x44 - 0x4C - 0x4C */ + __IO uint32_t IDMACTRL; /*!< SDMMC DMA control register, Address offset: 0x50 */ + __IO uint32_t IDMABSIZE; /*!< SDMMC DMA buffer size register, Address offset: 0x54 */ + __IO uint32_t IDMABASE0; /*!< SDMMC DMA buffer 0 base address register, Address offset: 0x58 */ + __IO uint32_t IDMABASE1; /*!< SDMMC DMA buffer 1 base address register, Address offset: 0x5C */ + uint32_t RESERVED1[8]; /*!< Reserved, 0x60-0x7C */ + __IO uint32_t FIFO; /*!< SDMMC data FIFO register, Address offset: 0x80 */ + uint32_t RESERVED2[222]; /*!< Reserved, 0x84-0x3F8 */ + __IO uint32_t IPVR; /*!< SDMMC data FIFO register, Address offset: 0x3FC */ +} SDMMC_TypeDef; + + +/** + * @brief Delay Block DLYB + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DELAY BLOCK control register, Address offset: 0x00 */ + __IO uint32_t CFGR; /*!< DELAY BLOCK configuration register, Address offset: 0x04 */ +} DLYB_TypeDef; + +/** + * @brief HW Semaphore HSEM + */ + +typedef struct +{ + __IO uint32_t R[32]; /*!< 2-step write lock and read back registers, Address offset: 00h-7Ch */ + __IO uint32_t RLR[32]; /*!< 1-step read lock registers, Address offset: 80h-FCh */ + __IO uint32_t C1IER; /*!< HSEM Interrupt enable register , Address offset: 100h */ + __IO uint32_t C1ICR; /*!< HSEM Interrupt clear register , Address offset: 104h */ + __IO uint32_t C1ISR; /*!< HSEM Interrupt Status register , Address offset: 108h */ + __IO uint32_t C1MISR; /*!< HSEM Interrupt Masked Status register , Address offset: 10Ch */ + uint32_t Reserved[12]; /* Reserved Address offset: 110h-13Ch */ + __IO uint32_t CR; /*!< HSEM Semaphore clear register , Address offset: 140h */ + __IO uint32_t KEYR; /*!< HSEM Semaphore clear key register , Address offset: 144h */ + +} HSEM_TypeDef; + +typedef struct +{ + __IO uint32_t IER; /*!< HSEM interrupt enable register , Address offset: 0h */ + __IO uint32_t ICR; /*!< HSEM interrupt clear register , Address offset: 4h */ + __IO uint32_t ISR; /*!< HSEM interrupt status register , Address offset: 8h */ + __IO uint32_t MISR; /*!< HSEM masked interrupt status register , Address offset: Ch */ +} HSEM_Common_TypeDef; + +/** + * @brief Serial Peripheral Interface + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< SPI/I2S Control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< SPI Control register 2, Address offset: 0x04 */ + __IO uint32_t CFG1; /*!< SPI Configuration register 1, Address offset: 0x08 */ + __IO uint32_t CFG2; /*!< SPI Configuration register 2, Address offset: 0x0C */ + __IO uint32_t IER; /*!< SPI/I2S Interrupt Enable register, Address offset: 0x10 */ + __IO uint32_t SR; /*!< SPI/I2S Status register, Address offset: 0x14 */ + __IO uint32_t IFCR; /*!< SPI/I2S Interrupt/Status flags clear register, Address offset: 0x18 */ + uint32_t RESERVED0; /*!< Reserved, 0x1C */ + __IO uint32_t TXDR; /*!< SPI/I2S Transmit data register, Address offset: 0x20 */ + uint32_t RESERVED1[3]; /*!< Reserved, 0x24-0x2C */ + __IO uint32_t RXDR; /*!< SPI/I2S Receive data register, Address offset: 0x30 */ + uint32_t RESERVED2[3]; /*!< Reserved, 0x34-0x3C */ + __IO uint32_t CRCPOLY; /*!< SPI CRC Polynomial register, Address offset: 0x40 */ + __IO uint32_t TXCRC; /*!< SPI Transmitter CRC register, Address offset: 0x44 */ + __IO uint32_t RXCRC; /*!< SPI Receiver CRC register, Address offset: 0x48 */ + __IO uint32_t UDRDR; /*!< SPI Underrun data register, Address offset: 0x4C */ + __IO uint32_t I2SCFGR; /*!< I2S Configuration register, Address offset: 0x50 */ + +} SPI_TypeDef; + +/** + * @brief DTS + */ +typedef struct +{ + __IO uint32_t CFGR1; /*!< DTS configuration register, Address offset: 0x00 */ + uint32_t RESERVED0; /*!< Reserved, Address offset: 0x04 */ + __IO uint32_t T0VALR1; /*!< DTS T0 Value register, Address offset: 0x08 */ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x0C */ + __IO uint32_t RAMPVALR; /*!< DTS Ramp value register, Address offset: 0x10 */ + __IO uint32_t ITR1; /*!< DTS Interrupt threshold register, Address offset: 0x14 */ + uint32_t RESERVED2; /*!< Reserved, Address offset: 0x18 */ + __IO uint32_t DR; /*!< DTS data register, Address offset: 0x1C */ + __IO uint32_t SR; /*!< DTS status register Address offset: 0x20 */ + __IO uint32_t ITENR; /*!< DTS Interrupt enable register, Address offset: 0x24 */ + __IO uint32_t ICIFR; /*!< DTS Clear Interrupt flag register, Address offset: 0x28 */ + __IO uint32_t OR; /*!< DTS option register 1, Address offset: 0x2C */ +} +DTS_TypeDef; + +/** + * @brief TIM + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< TIM control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< TIM control register 2, Address offset: 0x04 */ + __IO uint32_t SMCR; /*!< TIM slave mode control register, Address offset: 0x08 */ + __IO uint32_t DIER; /*!< TIM DMA/interrupt enable register, Address offset: 0x0C */ + __IO uint32_t SR; /*!< TIM status register, Address offset: 0x10 */ + __IO uint32_t EGR; /*!< TIM event generation register, Address offset: 0x14 */ + __IO uint32_t CCMR1; /*!< TIM capture/compare mode register 1, Address offset: 0x18 */ + __IO uint32_t CCMR2; /*!< TIM capture/compare mode register 2, Address offset: 0x1C */ + __IO uint32_t CCER; /*!< TIM capture/compare enable register, Address offset: 0x20 */ + __IO uint32_t CNT; /*!< TIM counter register, Address offset: 0x24 */ + __IO uint32_t PSC; /*!< TIM prescaler, Address offset: 0x28 */ + __IO uint32_t ARR; /*!< TIM auto-reload register, Address offset: 0x2C */ + __IO uint32_t RCR; /*!< TIM repetition counter register, Address offset: 0x30 */ + __IO uint32_t CCR1; /*!< TIM capture/compare register 1, Address offset: 0x34 */ + __IO uint32_t CCR2; /*!< TIM capture/compare register 2, Address offset: 0x38 */ + __IO uint32_t CCR3; /*!< TIM capture/compare register 3, Address offset: 0x3C */ + __IO uint32_t CCR4; /*!< TIM capture/compare register 4, Address offset: 0x40 */ + __IO uint32_t BDTR; /*!< TIM break and dead-time register, Address offset: 0x44 */ + __IO uint32_t DCR; /*!< TIM DMA control register, Address offset: 0x48 */ + __IO uint32_t DMAR; /*!< TIM DMA address for full transfer, Address offset: 0x4C */ + uint32_t RESERVED1; /*!< Reserved, 0x50 */ + __IO uint32_t CCMR3; /*!< TIM capture/compare mode register 3, Address offset: 0x54 */ + __IO uint32_t CCR5; /*!< TIM capture/compare register5, Address offset: 0x58 */ + __IO uint32_t CCR6; /*!< TIM capture/compare register6, Address offset: 0x5C */ + __IO uint32_t AF1; /*!< TIM alternate function option register 1, Address offset: 0x60 */ + __IO uint32_t AF2; /*!< TIM alternate function option register 2, Address offset: 0x64 */ + __IO uint32_t TISEL; /*!< TIM Input Selection register, Address offset: 0x68 */ +} TIM_TypeDef; + +/** + * @brief LPTIMIMER + */ +typedef struct +{ + __IO uint32_t ISR; /*!< LPTIM Interrupt and Status register, Address offset: 0x00 */ + __IO uint32_t ICR; /*!< LPTIM Interrupt Clear register, Address offset: 0x04 */ + __IO uint32_t IER; /*!< LPTIM Interrupt Enable register, Address offset: 0x08 */ + __IO uint32_t CFGR; /*!< LPTIM Configuration register, Address offset: 0x0C */ + __IO uint32_t CR; /*!< LPTIM Control register, Address offset: 0x10 */ + __IO uint32_t CMP; /*!< LPTIM Compare register, Address offset: 0x14 */ + __IO uint32_t ARR; /*!< LPTIM Autoreload register, Address offset: 0x18 */ + __IO uint32_t CNT; /*!< LPTIM Counter register, Address offset: 0x1C */ + uint32_t RESERVED1; /*!< Reserved, 0x20 */ + __IO uint32_t CFGR2; /*!< LPTIM Configuration register, Address offset: 0x24 */ +} LPTIM_TypeDef; + +/** + * @brief Comparator + */ +typedef struct +{ + __IO uint32_t SR; /*!< Comparator status register, Address offset: 0x00 */ + __IO uint32_t ICFR; /*!< Comparator interrupt clear flag register, Address offset: 0x04 */ + __IO uint32_t OR; /*!< Comparator option register, Address offset: 0x08 */ +} COMPOPT_TypeDef; + +typedef struct +{ + __IO uint32_t CFGR; /*!< Comparator configuration register , Address offset: 0x00 */ +} COMP_TypeDef; + +typedef struct +{ + __IO uint32_t CFGR; /*!< COMP control and status register, used for bits common to several COMP instances, Address offset: 0x00 */ +} COMP_Common_TypeDef; +/** + * @brief Universal Synchronous Asynchronous Receiver Transmitter + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< USART Control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< USART Control register 2, Address offset: 0x04 */ + __IO uint32_t CR3; /*!< USART Control register 3, Address offset: 0x08 */ + __IO uint32_t BRR; /*!< USART Baud rate register, Address offset: 0x0C */ + __IO uint32_t GTPR; /*!< USART Guard time and prescaler register, Address offset: 0x10 */ + __IO uint32_t RTOR; /*!< USART Receiver Time Out register, Address offset: 0x14 */ + __IO uint32_t RQR; /*!< USART Request register, Address offset: 0x18 */ + __IO uint32_t ISR; /*!< USART Interrupt and status register, Address offset: 0x1C */ + __IO uint32_t ICR; /*!< USART Interrupt flag Clear register, Address offset: 0x20 */ + __IO uint32_t RDR; /*!< USART Receive Data register, Address offset: 0x24 */ + __IO uint32_t TDR; /*!< USART Transmit Data register, Address offset: 0x28 */ + __IO uint32_t PRESC; /*!< USART clock Prescaler register, Address offset: 0x2C */ +} USART_TypeDef; + +/** + * @brief Single Wire Protocol Master Interface SPWMI + */ +typedef struct +{ + __IO uint32_t CR; /*!< SWPMI Configuration/Control register, Address offset: 0x00 */ + __IO uint32_t BRR; /*!< SWPMI bitrate register, Address offset: 0x04 */ + uint32_t RESERVED1; /*!< Reserved, 0x08 */ + __IO uint32_t ISR; /*!< SWPMI Interrupt and Status register, Address offset: 0x0C */ + __IO uint32_t ICR; /*!< SWPMI Interrupt Flag Clear register, Address offset: 0x10 */ + __IO uint32_t IER; /*!< SWPMI Interrupt Enable register, Address offset: 0x14 */ + __IO uint32_t RFL; /*!< SWPMI Receive Frame Length register, Address offset: 0x18 */ + __IO uint32_t TDR; /*!< SWPMI Transmit data register, Address offset: 0x1C */ + __IO uint32_t RDR; /*!< SWPMI Receive data register, Address offset: 0x20 */ + __IO uint32_t OR; /*!< SWPMI Option register, Address offset: 0x24 */ +} SWPMI_TypeDef; + +/** + * @brief Window WATCHDOG + */ + +typedef struct +{ + __IO uint32_t CR; /*!< WWDG Control register, Address offset: 0x00 */ + __IO uint32_t CFR; /*!< WWDG Configuration register, Address offset: 0x04 */ + __IO uint32_t SR; /*!< WWDG Status register, Address offset: 0x08 */ +} WWDG_TypeDef; + + +/** + * @brief RAM_ECC_Specific_Registers + */ +typedef struct +{ + __IO uint32_t CR; /*!< RAMECC monitor configuration register */ + __IO uint32_t SR; /*!< RAMECC monitor status register */ + __IO uint32_t FAR; /*!< RAMECC monitor failing address register */ + __IO uint32_t FDRL; /*!< RAMECC monitor failing data low register */ + __IO uint32_t FDRH; /*!< RAMECC monitor failing data high register */ + __IO uint32_t FECR; /*!< RAMECC monitor failing ECC error code register */ +} RAMECC_MonitorTypeDef; + +typedef struct +{ + __IO uint32_t IER; /*!< RAMECC interrupt enable register */ +} RAMECC_TypeDef; +/** + * @} + */ + + + +/** + * @brief RNG + */ + +typedef struct +{ + __IO uint32_t CR; /*!< RNG control register, Address offset: 0x00 */ + __IO uint32_t SR; /*!< RNG status register, Address offset: 0x04 */ + __IO uint32_t DR; /*!< RNG data register, Address offset: 0x08 */ + uint32_t RESERVED; + __IO uint32_t HTCR; /*!< RNG health test configuration register, Address offset: 0x10 */ +} RNG_TypeDef; + +/** + * @brief MDIOS + */ + +typedef struct +{ + __IO uint32_t CR; + __IO uint32_t WRFR; + __IO uint32_t CWRFR; + __IO uint32_t RDFR; + __IO uint32_t CRDFR; + __IO uint32_t SR; + __IO uint32_t CLRFR; + uint32_t RESERVED[57]; + __IO uint32_t DINR0; + __IO uint32_t DINR1; + __IO uint32_t DINR2; + __IO uint32_t DINR3; + __IO uint32_t DINR4; + __IO uint32_t DINR5; + __IO uint32_t DINR6; + __IO uint32_t DINR7; + __IO uint32_t DINR8; + __IO uint32_t DINR9; + __IO uint32_t DINR10; + __IO uint32_t DINR11; + __IO uint32_t DINR12; + __IO uint32_t DINR13; + __IO uint32_t DINR14; + __IO uint32_t DINR15; + __IO uint32_t DINR16; + __IO uint32_t DINR17; + __IO uint32_t DINR18; + __IO uint32_t DINR19; + __IO uint32_t DINR20; + __IO uint32_t DINR21; + __IO uint32_t DINR22; + __IO uint32_t DINR23; + __IO uint32_t DINR24; + __IO uint32_t DINR25; + __IO uint32_t DINR26; + __IO uint32_t DINR27; + __IO uint32_t DINR28; + __IO uint32_t DINR29; + __IO uint32_t DINR30; + __IO uint32_t DINR31; + __IO uint32_t DOUTR0; + __IO uint32_t DOUTR1; + __IO uint32_t DOUTR2; + __IO uint32_t DOUTR3; + __IO uint32_t DOUTR4; + __IO uint32_t DOUTR5; + __IO uint32_t DOUTR6; + __IO uint32_t DOUTR7; + __IO uint32_t DOUTR8; + __IO uint32_t DOUTR9; + __IO uint32_t DOUTR10; + __IO uint32_t DOUTR11; + __IO uint32_t DOUTR12; + __IO uint32_t DOUTR13; + __IO uint32_t DOUTR14; + __IO uint32_t DOUTR15; + __IO uint32_t DOUTR16; + __IO uint32_t DOUTR17; + __IO uint32_t DOUTR18; + __IO uint32_t DOUTR19; + __IO uint32_t DOUTR20; + __IO uint32_t DOUTR21; + __IO uint32_t DOUTR22; + __IO uint32_t DOUTR23; + __IO uint32_t DOUTR24; + __IO uint32_t DOUTR25; + __IO uint32_t DOUTR26; + __IO uint32_t DOUTR27; + __IO uint32_t DOUTR28; + __IO uint32_t DOUTR29; + __IO uint32_t DOUTR30; + __IO uint32_t DOUTR31; +} MDIOS_TypeDef; + + +/** + * @brief USB_OTG_Core_Registers + */ +typedef struct +{ + __IO uint32_t GOTGCTL; /*!< USB_OTG Control and Status Register 000h */ + __IO uint32_t GOTGINT; /*!< USB_OTG Interrupt Register 004h */ + __IO uint32_t GAHBCFG; /*!< Core AHB Configuration Register 008h */ + __IO uint32_t GUSBCFG; /*!< Core USB Configuration Register 00Ch */ + __IO uint32_t GRSTCTL; /*!< Core Reset Register 010h */ + __IO uint32_t GINTSTS; /*!< Core Interrupt Register 014h */ + __IO uint32_t GINTMSK; /*!< Core Interrupt Mask Register 018h */ + __IO uint32_t GRXSTSR; /*!< Receive Sts Q Read Register 01Ch */ + __IO uint32_t GRXSTSP; /*!< Receive Sts Q Read & POP Register 020h */ + __IO uint32_t GRXFSIZ; /*!< Receive FIFO Size Register 024h */ + __IO uint32_t DIEPTXF0_HNPTXFSIZ; /*!< EP0 / Non Periodic Tx FIFO Size Register 028h */ + __IO uint32_t HNPTXSTS; /*!< Non Periodic Tx FIFO/Queue Sts reg 02Ch */ + uint32_t Reserved30[2]; /*!< Reserved 030h */ + __IO uint32_t GCCFG; /*!< General Purpose IO Register 038h */ + __IO uint32_t CID; /*!< User ID Register 03Ch */ + __IO uint32_t GSNPSID; /* USB_OTG core ID 040h*/ + __IO uint32_t GHWCFG1; /* User HW config1 044h*/ + __IO uint32_t GHWCFG2; /* User HW config2 048h*/ + __IO uint32_t GHWCFG3; /*!< User HW config3 04Ch */ + uint32_t Reserved6; /*!< Reserved 050h */ + __IO uint32_t GLPMCFG; /*!< LPM Register 054h */ + __IO uint32_t GPWRDN; /*!< Power Down Register 058h */ + __IO uint32_t GDFIFOCFG; /*!< DFIFO Software Config Register 05Ch */ + __IO uint32_t GADPCTL; /*!< ADP Timer, Control and Status Register 60Ch */ + uint32_t Reserved43[39]; /*!< Reserved 058h-0FFh */ + __IO uint32_t HPTXFSIZ; /*!< Host Periodic Tx FIFO Size Reg 100h */ + __IO uint32_t DIEPTXF[0x0F]; /*!< dev Periodic Transmit FIFO */ +} USB_OTG_GlobalTypeDef; + + +/** + * @brief USB_OTG_device_Registers + */ +typedef struct +{ + __IO uint32_t DCFG; /*!< dev Configuration Register 800h */ + __IO uint32_t DCTL; /*!< dev Control Register 804h */ + __IO uint32_t DSTS; /*!< dev Status Register (RO) 808h */ + uint32_t Reserved0C; /*!< Reserved 80Ch */ + __IO uint32_t DIEPMSK; /*!< dev IN Endpoint Mask 810h */ + __IO uint32_t DOEPMSK; /*!< dev OUT Endpoint Mask 814h */ + __IO uint32_t DAINT; /*!< dev All Endpoints Itr Reg 818h */ + __IO uint32_t DAINTMSK; /*!< dev All Endpoints Itr Mask 81Ch */ + uint32_t Reserved20; /*!< Reserved 820h */ + uint32_t Reserved9; /*!< Reserved 824h */ + __IO uint32_t DVBUSDIS; /*!< dev VBUS discharge Register 828h */ + __IO uint32_t DVBUSPULSE; /*!< dev VBUS Pulse Register 82Ch */ + __IO uint32_t DTHRCTL; /*!< dev threshold 830h */ + __IO uint32_t DIEPEMPMSK; /*!< dev empty msk 834h */ + __IO uint32_t DEACHINT; /*!< dedicated EP interrupt 838h */ + __IO uint32_t DEACHMSK; /*!< dedicated EP msk 83Ch */ + uint32_t Reserved40; /*!< dedicated EP mask 840h */ + __IO uint32_t DINEP1MSK; /*!< dedicated EP mask 844h */ + uint32_t Reserved44[15]; /*!< Reserved 844-87Ch */ + __IO uint32_t DOUTEP1MSK; /*!< dedicated EP msk 884h */ +} USB_OTG_DeviceTypeDef; + + +/** + * @brief USB_OTG_IN_Endpoint-Specific_Register + */ +typedef struct +{ + __IO uint32_t DIEPCTL; /*!< dev IN Endpoint Control Reg 900h + (ep_num * 20h) + 00h */ + uint32_t Reserved04; /*!< Reserved 900h + (ep_num * 20h) + 04h */ + __IO uint32_t DIEPINT; /*!< dev IN Endpoint Itr Reg 900h + (ep_num * 20h) + 08h */ + uint32_t Reserved0C; /*!< Reserved 900h + (ep_num * 20h) + 0Ch */ + __IO uint32_t DIEPTSIZ; /*!< IN Endpoint Txfer Size 900h + (ep_num * 20h) + 10h */ + __IO uint32_t DIEPDMA; /*!< IN Endpoint DMA Address Reg 900h + (ep_num * 20h) + 14h */ + __IO uint32_t DTXFSTS; /*!< IN Endpoint Tx FIFO Status Reg 900h + (ep_num * 20h) + 18h */ + uint32_t Reserved18; /*!< Reserved 900h+(ep_num*20h)+1Ch-900h+ (ep_num * 20h) + 1Ch */ +} USB_OTG_INEndpointTypeDef; + + +/** + * @brief USB_OTG_OUT_Endpoint-Specific_Registers + */ +typedef struct +{ + __IO uint32_t DOEPCTL; /*!< dev OUT Endpoint Control Reg B00h + (ep_num * 20h) + 00h */ + uint32_t Reserved04; /*!< Reserved B00h + (ep_num * 20h) + 04h */ + __IO uint32_t DOEPINT; /*!< dev OUT Endpoint Itr Reg B00h + (ep_num * 20h) + 08h */ + uint32_t Reserved0C; /*!< Reserved B00h + (ep_num * 20h) + 0Ch */ + __IO uint32_t DOEPTSIZ; /*!< dev OUT Endpoint Txfer Size B00h + (ep_num * 20h) + 10h */ + __IO uint32_t DOEPDMA; /*!< dev OUT Endpoint DMA Address B00h + (ep_num * 20h) + 14h */ + uint32_t Reserved18[2]; /*!< Reserved B00h + (ep_num * 20h) + 18h - B00h + (ep_num * 20h) + 1Ch */ +} USB_OTG_OUTEndpointTypeDef; + + +/** + * @brief USB_OTG_Host_Mode_Register_Structures + */ +typedef struct +{ + __IO uint32_t HCFG; /*!< Host Configuration Register 400h */ + __IO uint32_t HFIR; /*!< Host Frame Interval Register 404h */ + __IO uint32_t HFNUM; /*!< Host Frame Nbr/Frame Remaining 408h */ + uint32_t Reserved40C; /*!< Reserved 40Ch */ + __IO uint32_t HPTXSTS; /*!< Host Periodic Tx FIFO/ Queue Status 410h */ + __IO uint32_t HAINT; /*!< Host All Channels Interrupt Register 414h */ + __IO uint32_t HAINTMSK; /*!< Host All Channels Interrupt Mask 418h */ +} USB_OTG_HostTypeDef; + +/** + * @brief USB_OTG_Host_Channel_Specific_Registers + */ +typedef struct +{ + __IO uint32_t HCCHAR; /*!< Host Channel Characteristics Register 500h */ + __IO uint32_t HCSPLT; /*!< Host Channel Split Control Register 504h */ + __IO uint32_t HCINT; /*!< Host Channel Interrupt Register 508h */ + __IO uint32_t HCINTMSK; /*!< Host Channel Interrupt Mask Register 50Ch */ + __IO uint32_t HCTSIZ; /*!< Host Channel Transfer Size Register 510h */ + __IO uint32_t HCDMA; /*!< Host Channel DMA Address Register 514h */ + uint32_t Reserved[2]; /*!< Reserved */ +} USB_OTG_HostChannelTypeDef; +/** + * @} + */ + +/** + * @brief OCTO Serial Peripheral Interface + */ + +typedef struct +{ + __IO uint32_t CR; /*!< OCTOSPI Control register, Address offset: 0x000 */ + uint32_t RESERVED; /*!< Reserved, Address offset: 0x004 */ + __IO uint32_t DCR1; /*!< OCTOSPI Device Configuration register 1, Address offset: 0x008 */ + __IO uint32_t DCR2; /*!< OCTOSPI Device Configuration register 2, Address offset: 0x00C */ + __IO uint32_t DCR3; /*!< OCTOSPI Device Configuration register 3, Address offset: 0x010 */ + __IO uint32_t DCR4; /*!< OCTOSPI Device Configuration register 4, Address offset: 0x014 */ + uint32_t RESERVED1[2]; /*!< Reserved, Address offset: 0x018-0x01C */ + __IO uint32_t SR; /*!< OCTOSPI Status register, Address offset: 0x020 */ + __IO uint32_t FCR; /*!< OCTOSPI Flag Clear register, Address offset: 0x024 */ + uint32_t RESERVED2[6]; /*!< Reserved, Address offset: 0x028-0x03C */ + __IO uint32_t DLR; /*!< OCTOSPI Data Length register, Address offset: 0x040 */ + uint32_t RESERVED3; /*!< Reserved, Address offset: 0x044 */ + __IO uint32_t AR; /*!< OCTOSPI Address register, Address offset: 0x048 */ + uint32_t RESERVED4; /*!< Reserved, Address offset: 0x04C */ + __IO uint32_t DR; /*!< OCTOSPI Data register, Address offset: 0x050 */ + uint32_t RESERVED5[11]; /*!< Reserved, Address offset: 0x054-0x07C */ + __IO uint32_t PSMKR; /*!< OCTOSPI Polling Status Mask register, Address offset: 0x080 */ + uint32_t RESERVED6; /*!< Reserved, Address offset: 0x084 */ + __IO uint32_t PSMAR; /*!< OCTOSPI Polling Status Match register, Address offset: 0x088 */ + uint32_t RESERVED7; /*!< Reserved, Address offset: 0x08C */ + __IO uint32_t PIR; /*!< OCTOSPI Polling Interval register, Address offset: 0x090 */ + uint32_t RESERVED8[27]; /*!< Reserved, Address offset: 0x094-0x0FC */ + __IO uint32_t CCR; /*!< OCTOSPI Communication Configuration register, Address offset: 0x100 */ + uint32_t RESERVED9; /*!< Reserved, Address offset: 0x104 */ + __IO uint32_t TCR; /*!< OCTOSPI Timing Configuration register, Address offset: 0x108 */ + uint32_t RESERVED10; /*!< Reserved, Address offset: 0x10C */ + __IO uint32_t IR; /*!< OCTOSPI Instruction register, Address offset: 0x110 */ + uint32_t RESERVED11[3]; /*!< Reserved, Address offset: 0x114-0x11C */ + __IO uint32_t ABR; /*!< OCTOSPI Alternate Bytes register, Address offset: 0x120 */ + uint32_t RESERVED12[3]; /*!< Reserved, Address offset: 0x124-0x12C */ + __IO uint32_t LPTR; /*!< OCTOSPI Low Power Timeout register, Address offset: 0x130 */ + uint32_t RESERVED13[3]; /*!< Reserved, Address offset: 0x134-0x13C */ + __IO uint32_t WPCCR; /*!< OCTOSPI Wrap Communication Configuration register, Address offset: 0x140 */ + uint32_t RESERVED14; /*!< Reserved, Address offset: 0x144 */ + __IO uint32_t WPTCR; /*!< OCTOSPI Wrap Timing Configuration register, Address offset: 0x148 */ + uint32_t RESERVED15; /*!< Reserved, Address offset: 0x14C */ + __IO uint32_t WPIR; /*!< OCTOSPI Wrap Instruction register, Address offset: 0x150 */ + uint32_t RESERVED16[3]; /*!< Reserved, Address offset: 0x154-0x15C */ + __IO uint32_t WPABR; /*!< OCTOSPI Wrap Alternate Bytes register, Address offset: 0x160 */ + uint32_t RESERVED17[7]; /*!< Reserved, Address offset: 0x164-0x17C */ + __IO uint32_t WCCR; /*!< OCTOSPI Write Communication Configuration register, Address offset: 0x180 */ + uint32_t RESERVED18; /*!< Reserved, Address offset: 0x184 */ + __IO uint32_t WTCR; /*!< OCTOSPI Write Timing Configuration register, Address offset: 0x188 */ + uint32_t RESERVED19; /*!< Reserved, Address offset: 0x18C */ + __IO uint32_t WIR; /*!< OCTOSPI Write Instruction register, Address offset: 0x190 */ + uint32_t RESERVED20[3]; /*!< Reserved, Address offset: 0x194-0x19C */ + __IO uint32_t WABR; /*!< OCTOSPI Write Alternate Bytes register, Address offset: 0x1A0 */ + uint32_t RESERVED21[23]; /*!< Reserved, Address offset: 0x1A4-0x1FC */ + __IO uint32_t HLCR; /*!< OCTOSPI Hyperbus Latency Configuration register, Address offset: 0x200 */ + uint32_t RESERVED22[122]; /*!< Reserved, Address offset: 0x204-0x3EC */ + __IO uint32_t HWCFGR; /*!< OCTOSPI HW Configuration register, Address offset: 0x3F0 */ + __IO uint32_t VER; /*!< OCTOSPI Version register, Address offset: 0x3F4 */ + __IO uint32_t ID; /*!< OCTOSPI Identification register, Address offset: 0x3F8 */ + __IO uint32_t MID; /*!< OCTOPSI HW Magic ID register, Address offset: 0x3FC */ +} OCTOSPI_TypeDef; + +/** + * @} + */ +/** + * @brief OCTO Serial Peripheral Interface IO Manager + */ + +typedef struct +{ + __IO uint32_t CR; /*!< OCTOSPI IO Manager Control register, Address offset: 0x00 */ + __IO uint32_t PCR[3]; /*!< OCTOSPI IO Manager Port[1:3] Configuration register, Address offset: 0x04-0x20 */ +} OCTOSPIM_TypeDef; + +/** + * @} + */ + +/** @addtogroup Peripheral_memory_map + * @{ + */ +#define D1_ITCMRAM_BASE (0x00000000UL) /*!< Base address of : 64KB RAM reserved for CPU execution/instruction accessible over ITCM */ +#define D1_ITCMICP_BASE (0x00100000UL) /*!< Base address of : (up to 128KB) embedded Test FLASH memory accessible over ITCM */ +#define D1_DTCMRAM_BASE (0x20000000UL) /*!< Base address of : 128KB system data RAM accessible over DTCM */ +#define D1_AXIFLASH_BASE (0x08000000UL) /*!< Base address of : (up to 1 MB) embedded FLASH memory accessible over AXI */ +#define D1_AXIICP_BASE (0x1FF00000UL) /*!< Base address of : (up to 128KB) embedded Test FLASH memory accessible over AXI */ +#define D1_AXISRAM1_BASE (0x24000000UL) /*!< Base address of : (up to 128KB) system data RAM1 accessible over over AXI */ +#define D1_AXISRAM2_BASE (0x24020000UL) /*!< Base address of : (up to 192KB) system data RAM2 accessible over over AXI to be shared with ITCM (64K granularity) */ +#define D1_AXISRAM_BASE D1_AXISRAM1_BASE /*!< Base address of : (up to 320KB) system data RAM1/2 accessible over over AXI */ + +#define D2_AHBSRAM1_BASE (0x30000000UL) /*!< Base address of : (up to 16KB) system data RAM accessible over over AXI->AHB Bridge */ +#define D2_AHBSRAM2_BASE (0x30004000UL) /*!< Base address of : (up to 16KB) system data RAM accessible over over AXI->AHB Bridge */ +#define D2_AHBSRAM_BASE D2_AHBSRAM1_BASE /*!< Base address of : (up to 32KB) system data RAM1/2 accessible over over AXI->AHB Bridge */ + +#define D3_BKPSRAM_BASE (0x38800000UL) /*!< Base address of : Backup SRAM(4 KB) over AXI->AHB Bridge */ +#define D3_SRAM_BASE (0x38000000UL) /*!< Base address of : Backup SRAM(16 KB) over AXI->AHB Bridge */ + +#define PERIPH_BASE (0x40000000UL) /*!< Base address of : AHB/APB Peripherals */ +#define OCTOSPI1_BASE (0x90000000UL) /*!< Base address of : OCTOSPI1 memories accessible over AXI */ +#define OCTOSPI2_BASE (0x70000000UL) /*!< Base address of : OCTOSPI2 memories accessible over AXI */ + +#define FLASH_BANK1_BASE (0x08000000UL) /*!< Base address of : (up to 1 MB) Flash Bank1 accessible over AXI */ +#define FLASH_END (0x080FFFFFUL) /*!< FLASH end address */ + + +/* Legacy define */ +#define FLASH_BASE FLASH_BANK1_BASE + +/*!< Device electronic signature memory map */ +#define UID_BASE (0x1FF1E800UL) /*!< Unique device ID register base address */ +#define FLASHSIZE_BASE (0x1FF1E880UL) /*!< FLASH Size register base address */ + + +/*!< Peripheral memory map */ +#define D2_APB1PERIPH_BASE PERIPH_BASE +#define D2_APB2PERIPH_BASE (PERIPH_BASE + 0x00010000UL) +#define D2_AHB1PERIPH_BASE (PERIPH_BASE + 0x00020000UL) +#define D2_AHB2PERIPH_BASE (PERIPH_BASE + 0x08020000UL) + +#define D1_APB1PERIPH_BASE (PERIPH_BASE + 0x10000000UL) +#define D1_AHB1PERIPH_BASE (PERIPH_BASE + 0x12000000UL) + +#define D3_APB1PERIPH_BASE (PERIPH_BASE + 0x18000000UL) +#define D3_AHB1PERIPH_BASE (PERIPH_BASE + 0x18020000UL) + +/*!< Legacy Peripheral memory map */ +#define APB1PERIPH_BASE PERIPH_BASE +#define APB2PERIPH_BASE (PERIPH_BASE + 0x00010000UL) +#define AHB1PERIPH_BASE (PERIPH_BASE + 0x00020000UL) +#define AHB2PERIPH_BASE (PERIPH_BASE + 0x08000000UL) + + +/*!< D1_AHB1PERIPH peripherals */ + +#define MDMA_BASE (D1_AHB1PERIPH_BASE + 0x0000UL) +#define DMA2D_BASE (D1_AHB1PERIPH_BASE + 0x1000UL) +#define FLASH_R_BASE (D1_AHB1PERIPH_BASE + 0x2000UL) +#define FMC_R_BASE (D1_AHB1PERIPH_BASE + 0x4000UL) +#define OCTOSPI1_R_BASE (D1_AHB1PERIPH_BASE + 0x5000UL) +#define DLYB_OCTOSPI1_BASE (D1_AHB1PERIPH_BASE + 0x6000UL) +#define SDMMC1_BASE (D1_AHB1PERIPH_BASE + 0x7000UL) +#define DLYB_SDMMC1_BASE (D1_AHB1PERIPH_BASE + 0x8000UL) +#define RAMECC1_BASE (D1_AHB1PERIPH_BASE + 0x9000UL) +#define OCTOSPI2_R_BASE (D1_AHB1PERIPH_BASE + 0xA000UL) +#define DLYB_OCTOSPI2_BASE (D1_AHB1PERIPH_BASE + 0xB000UL) +#define OCTOSPIM_BASE (D1_AHB1PERIPH_BASE + 0xB400UL) + +/*!< D2_AHB1PERIPH peripherals */ + +#define DMA1_BASE (D2_AHB1PERIPH_BASE + 0x0000UL) +#define DMA2_BASE (D2_AHB1PERIPH_BASE + 0x0400UL) +#define DMAMUX1_BASE (D2_AHB1PERIPH_BASE + 0x0800UL) +#define ADC1_BASE (D2_AHB1PERIPH_BASE + 0x2000UL) +#define ADC2_BASE (D2_AHB1PERIPH_BASE + 0x2100UL) +#define ADC12_COMMON_BASE (D2_AHB1PERIPH_BASE + 0x2300UL) +#define ETH_BASE (D2_AHB1PERIPH_BASE + 0x8000UL) +#define ETH_MAC_BASE (ETH_BASE) + +/*!< USB registers base address */ +#define USB1_OTG_HS_PERIPH_BASE (0x40040000UL) +#define USB_OTG_GLOBAL_BASE (0x000UL) +#define USB_OTG_DEVICE_BASE (0x800UL) +#define USB_OTG_IN_ENDPOINT_BASE (0x900UL) +#define USB_OTG_OUT_ENDPOINT_BASE (0xB00UL) +#define USB_OTG_EP_REG_SIZE (0x20UL) +#define USB_OTG_HOST_BASE (0x400UL) +#define USB_OTG_HOST_PORT_BASE (0x440UL) +#define USB_OTG_HOST_CHANNEL_BASE (0x500UL) +#define USB_OTG_HOST_CHANNEL_SIZE (0x20UL) +#define USB_OTG_PCGCCTL_BASE (0xE00UL) +#define USB_OTG_FIFO_BASE (0x1000UL) +#define USB_OTG_FIFO_SIZE (0x1000UL) + +/*!< D2_AHB2PERIPH peripherals */ + +#define DCMI_BASE (D2_AHB2PERIPH_BASE + 0x0000UL) +#define PSSI_BASE (D2_AHB2PERIPH_BASE + 0x0400UL) +#define RNG_BASE (D2_AHB2PERIPH_BASE + 0x1800UL) +#define SDMMC2_BASE (D2_AHB2PERIPH_BASE + 0x2400UL) +#define DLYB_SDMMC2_BASE (D2_AHB2PERIPH_BASE + 0x2800UL) +#define RAMECC2_BASE (D2_AHB2PERIPH_BASE + 0x3000UL) +#define FMAC_BASE (D2_AHB2PERIPH_BASE + 0x4000UL) +#define CORDIC_BASE (D2_AHB2PERIPH_BASE + 0x4400UL) + +/*!< D3_AHB1PERIPH peripherals */ +#define GPIOA_BASE (D3_AHB1PERIPH_BASE + 0x0000UL) +#define GPIOB_BASE (D3_AHB1PERIPH_BASE + 0x0400UL) +#define GPIOC_BASE (D3_AHB1PERIPH_BASE + 0x0800UL) +#define GPIOD_BASE (D3_AHB1PERIPH_BASE + 0x0C00UL) +#define GPIOE_BASE (D3_AHB1PERIPH_BASE + 0x1000UL) +#define GPIOF_BASE (D3_AHB1PERIPH_BASE + 0x1400UL) +#define GPIOG_BASE (D3_AHB1PERIPH_BASE + 0x1800UL) +#define GPIOH_BASE (D3_AHB1PERIPH_BASE + 0x1C00UL) +#define GPIOJ_BASE (D3_AHB1PERIPH_BASE + 0x2400UL) +#define GPIOK_BASE (D3_AHB1PERIPH_BASE + 0x2800UL) +#define RCC_BASE (D3_AHB1PERIPH_BASE + 0x4400UL) +#define PWR_BASE (D3_AHB1PERIPH_BASE + 0x4800UL) +#define CRC_BASE (D3_AHB1PERIPH_BASE + 0x4C00UL) +#define BDMA_BASE (D3_AHB1PERIPH_BASE + 0x5400UL) +#define DMAMUX2_BASE (D3_AHB1PERIPH_BASE + 0x5800UL) +#define ADC3_BASE (D3_AHB1PERIPH_BASE + 0x6000UL) +#define ADC3_COMMON_BASE (D3_AHB1PERIPH_BASE + 0x6300UL) +#define HSEM_BASE (D3_AHB1PERIPH_BASE + 0x6400UL) +#define RAMECC3_BASE (D3_AHB1PERIPH_BASE + 0x7000UL) + +/*!< D1_APB1PERIPH peripherals */ +#define LTDC_BASE (D1_APB1PERIPH_BASE + 0x1000UL) +#define LTDC_Layer1_BASE (LTDC_BASE + 0x84UL) +#define LTDC_Layer2_BASE (LTDC_BASE + 0x104UL) +#define WWDG1_BASE (D1_APB1PERIPH_BASE + 0x3000UL) + +/*!< D2_APB1PERIPH peripherals */ +#define TIM2_BASE (D2_APB1PERIPH_BASE + 0x0000UL) +#define TIM3_BASE (D2_APB1PERIPH_BASE + 0x0400UL) +#define TIM4_BASE (D2_APB1PERIPH_BASE + 0x0800UL) +#define TIM5_BASE (D2_APB1PERIPH_BASE + 0x0C00UL) +#define TIM6_BASE (D2_APB1PERIPH_BASE + 0x1000UL) +#define TIM7_BASE (D2_APB1PERIPH_BASE + 0x1400UL) +#define TIM12_BASE (D2_APB1PERIPH_BASE + 0x1800UL) +#define TIM13_BASE (D2_APB1PERIPH_BASE + 0x1C00UL) +#define TIM14_BASE (D2_APB1PERIPH_BASE + 0x2000UL) +#define LPTIM1_BASE (D2_APB1PERIPH_BASE + 0x2400UL) + + +#define SPI2_BASE (D2_APB1PERIPH_BASE + 0x3800UL) +#define SPI3_BASE (D2_APB1PERIPH_BASE + 0x3C00UL) +#define SPDIFRX_BASE (D2_APB1PERIPH_BASE + 0x4000UL) +#define USART2_BASE (D2_APB1PERIPH_BASE + 0x4400UL) +#define USART3_BASE (D2_APB1PERIPH_BASE + 0x4800UL) +#define UART4_BASE (D2_APB1PERIPH_BASE + 0x4C00UL) +#define UART5_BASE (D2_APB1PERIPH_BASE + 0x5000UL) +#define I2C1_BASE (D2_APB1PERIPH_BASE + 0x5400UL) +#define I2C2_BASE (D2_APB1PERIPH_BASE + 0x5800UL) +#define I2C3_BASE (D2_APB1PERIPH_BASE + 0x5C00UL) +#define I2C5_BASE (D2_APB1PERIPH_BASE + 0x6400UL) +#define CEC_BASE (D2_APB1PERIPH_BASE + 0x6C00UL) +#define DAC1_BASE (D2_APB1PERIPH_BASE + 0x7400UL) +#define UART7_BASE (D2_APB1PERIPH_BASE + 0x7800UL) +#define UART8_BASE (D2_APB1PERIPH_BASE + 0x7C00UL) +#define CRS_BASE (D2_APB1PERIPH_BASE + 0x8400UL) +#define SWPMI1_BASE (D2_APB1PERIPH_BASE + 0x8800UL) +#define OPAMP_BASE (D2_APB1PERIPH_BASE + 0x9000UL) +#define OPAMP1_BASE (D2_APB1PERIPH_BASE + 0x9000UL) +#define OPAMP2_BASE (D2_APB1PERIPH_BASE + 0x9010UL) +#define MDIOS_BASE (D2_APB1PERIPH_BASE + 0x9400UL) +#define FDCAN1_BASE (D2_APB1PERIPH_BASE + 0xA000UL) +#define FDCAN2_BASE (D2_APB1PERIPH_BASE + 0xA400UL) +#define FDCAN_CCU_BASE (D2_APB1PERIPH_BASE + 0xA800UL) +#define SRAMCAN_BASE (D2_APB1PERIPH_BASE + 0xAC00UL) +#define FDCAN3_BASE (D2_APB1PERIPH_BASE + 0xD400UL) +#define TIM23_BASE (D2_APB1PERIPH_BASE + 0xE000UL) +#define TIM24_BASE (D2_APB1PERIPH_BASE + 0xE400UL) + +/*!< D2_APB2PERIPH peripherals */ + +#define TIM1_BASE (D2_APB2PERIPH_BASE + 0x0000UL) +#define TIM8_BASE (D2_APB2PERIPH_BASE + 0x0400UL) +#define USART1_BASE (D2_APB2PERIPH_BASE + 0x1000UL) +#define USART6_BASE (D2_APB2PERIPH_BASE + 0x1400UL) +#define UART9_BASE (D2_APB2PERIPH_BASE + 0x1800UL) +#define USART10_BASE (D2_APB2PERIPH_BASE + 0x1C00UL) +#define SPI1_BASE (D2_APB2PERIPH_BASE + 0x3000UL) +#define SPI4_BASE (D2_APB2PERIPH_BASE + 0x3400UL) +#define TIM15_BASE (D2_APB2PERIPH_BASE + 0x4000UL) +#define TIM16_BASE (D2_APB2PERIPH_BASE + 0x4400UL) +#define TIM17_BASE (D2_APB2PERIPH_BASE + 0x4800UL) +#define SPI5_BASE (D2_APB2PERIPH_BASE + 0x5000UL) +#define SAI1_BASE (D2_APB2PERIPH_BASE + 0x5800UL) +#define SAI1_Block_A_BASE (SAI1_BASE + 0x004UL) +#define SAI1_Block_B_BASE (SAI1_BASE + 0x024UL) +#define DFSDM1_BASE (D2_APB2PERIPH_BASE + 0x7800UL) +#define DFSDM1_Channel0_BASE (DFSDM1_BASE + 0x00UL) +#define DFSDM1_Channel1_BASE (DFSDM1_BASE + 0x20UL) +#define DFSDM1_Channel2_BASE (DFSDM1_BASE + 0x40UL) +#define DFSDM1_Channel3_BASE (DFSDM1_BASE + 0x60UL) +#define DFSDM1_Channel4_BASE (DFSDM1_BASE + 0x80UL) +#define DFSDM1_Channel5_BASE (DFSDM1_BASE + 0xA0UL) +#define DFSDM1_Channel6_BASE (DFSDM1_BASE + 0xC0UL) +#define DFSDM1_Channel7_BASE (DFSDM1_BASE + 0xE0UL) +#define DFSDM1_Filter0_BASE (DFSDM1_BASE + 0x100UL) +#define DFSDM1_Filter1_BASE (DFSDM1_BASE + 0x180UL) +#define DFSDM1_Filter2_BASE (DFSDM1_BASE + 0x200UL) +#define DFSDM1_Filter3_BASE (DFSDM1_BASE + 0x280UL) + + +/*!< D3_APB1PERIPH peripherals */ +#define EXTI_BASE (D3_APB1PERIPH_BASE + 0x0000UL) +#define EXTI_D1_BASE (EXTI_BASE + 0x0080UL) +#define EXTI_D2_BASE (EXTI_BASE + 0x00C0UL) +#define SYSCFG_BASE (D3_APB1PERIPH_BASE + 0x0400UL) +#define LPUART1_BASE (D3_APB1PERIPH_BASE + 0x0C00UL) +#define SPI6_BASE (D3_APB1PERIPH_BASE + 0x1400UL) +#define I2C4_BASE (D3_APB1PERIPH_BASE + 0x1C00UL) +#define LPTIM2_BASE (D3_APB1PERIPH_BASE + 0x2400UL) +#define LPTIM3_BASE (D3_APB1PERIPH_BASE + 0x2800UL) +#define LPTIM4_BASE (D3_APB1PERIPH_BASE + 0x2C00UL) +#define LPTIM5_BASE (D3_APB1PERIPH_BASE + 0x3000UL) +#define COMP12_BASE (D3_APB1PERIPH_BASE + 0x3800UL) +#define COMP1_BASE (COMP12_BASE + 0x0CUL) +#define COMP2_BASE (COMP12_BASE + 0x10UL) +#define VREFBUF_BASE (D3_APB1PERIPH_BASE + 0x3C00UL) +#define RTC_BASE (D3_APB1PERIPH_BASE + 0x4000UL) +#define IWDG1_BASE (D3_APB1PERIPH_BASE + 0x4800UL) + + +#define SAI4_BASE (D3_APB1PERIPH_BASE + 0x5400UL) +#define SAI4_Block_A_BASE (SAI4_BASE + 0x004UL) +#define SAI4_Block_B_BASE (SAI4_BASE + 0x024UL) + +#define DTS_BASE (D3_APB1PERIPH_BASE + 0x6800UL) + + + +#define BDMA_Channel0_BASE (BDMA_BASE + 0x0008UL) +#define BDMA_Channel1_BASE (BDMA_BASE + 0x001CUL) +#define BDMA_Channel2_BASE (BDMA_BASE + 0x0030UL) +#define BDMA_Channel3_BASE (BDMA_BASE + 0x0044UL) +#define BDMA_Channel4_BASE (BDMA_BASE + 0x0058UL) +#define BDMA_Channel5_BASE (BDMA_BASE + 0x006CUL) +#define BDMA_Channel6_BASE (BDMA_BASE + 0x0080UL) +#define BDMA_Channel7_BASE (BDMA_BASE + 0x0094UL) + +#define DMAMUX2_Channel0_BASE (DMAMUX2_BASE) +#define DMAMUX2_Channel1_BASE (DMAMUX2_BASE + 0x0004UL) +#define DMAMUX2_Channel2_BASE (DMAMUX2_BASE + 0x0008UL) +#define DMAMUX2_Channel3_BASE (DMAMUX2_BASE + 0x000CUL) +#define DMAMUX2_Channel4_BASE (DMAMUX2_BASE + 0x0010UL) +#define DMAMUX2_Channel5_BASE (DMAMUX2_BASE + 0x0014UL) +#define DMAMUX2_Channel6_BASE (DMAMUX2_BASE + 0x0018UL) +#define DMAMUX2_Channel7_BASE (DMAMUX2_BASE + 0x001CUL) + +#define DMAMUX2_RequestGenerator0_BASE (DMAMUX2_BASE + 0x0100UL) +#define DMAMUX2_RequestGenerator1_BASE (DMAMUX2_BASE + 0x0104UL) +#define DMAMUX2_RequestGenerator2_BASE (DMAMUX2_BASE + 0x0108UL) +#define DMAMUX2_RequestGenerator3_BASE (DMAMUX2_BASE + 0x010CUL) +#define DMAMUX2_RequestGenerator4_BASE (DMAMUX2_BASE + 0x0110UL) +#define DMAMUX2_RequestGenerator5_BASE (DMAMUX2_BASE + 0x0114UL) +#define DMAMUX2_RequestGenerator6_BASE (DMAMUX2_BASE + 0x0118UL) +#define DMAMUX2_RequestGenerator7_BASE (DMAMUX2_BASE + 0x011CUL) + +#define DMAMUX2_ChannelStatus_BASE (DMAMUX2_BASE + 0x0080UL) +#define DMAMUX2_RequestGenStatus_BASE (DMAMUX2_BASE + 0x0140UL) + +#define DMA1_Stream0_BASE (DMA1_BASE + 0x010UL) +#define DMA1_Stream1_BASE (DMA1_BASE + 0x028UL) +#define DMA1_Stream2_BASE (DMA1_BASE + 0x040UL) +#define DMA1_Stream3_BASE (DMA1_BASE + 0x058UL) +#define DMA1_Stream4_BASE (DMA1_BASE + 0x070UL) +#define DMA1_Stream5_BASE (DMA1_BASE + 0x088UL) +#define DMA1_Stream6_BASE (DMA1_BASE + 0x0A0UL) +#define DMA1_Stream7_BASE (DMA1_BASE + 0x0B8UL) + +#define DMA2_Stream0_BASE (DMA2_BASE + 0x010UL) +#define DMA2_Stream1_BASE (DMA2_BASE + 0x028UL) +#define DMA2_Stream2_BASE (DMA2_BASE + 0x040UL) +#define DMA2_Stream3_BASE (DMA2_BASE + 0x058UL) +#define DMA2_Stream4_BASE (DMA2_BASE + 0x070UL) +#define DMA2_Stream5_BASE (DMA2_BASE + 0x088UL) +#define DMA2_Stream6_BASE (DMA2_BASE + 0x0A0UL) +#define DMA2_Stream7_BASE (DMA2_BASE + 0x0B8UL) + +#define DMAMUX1_Channel0_BASE (DMAMUX1_BASE) +#define DMAMUX1_Channel1_BASE (DMAMUX1_BASE + 0x0004UL) +#define DMAMUX1_Channel2_BASE (DMAMUX1_BASE + 0x0008UL) +#define DMAMUX1_Channel3_BASE (DMAMUX1_BASE + 0x000CUL) +#define DMAMUX1_Channel4_BASE (DMAMUX1_BASE + 0x0010UL) +#define DMAMUX1_Channel5_BASE (DMAMUX1_BASE + 0x0014UL) +#define DMAMUX1_Channel6_BASE (DMAMUX1_BASE + 0x0018UL) +#define DMAMUX1_Channel7_BASE (DMAMUX1_BASE + 0x001CUL) +#define DMAMUX1_Channel8_BASE (DMAMUX1_BASE + 0x0020UL) +#define DMAMUX1_Channel9_BASE (DMAMUX1_BASE + 0x0024UL) +#define DMAMUX1_Channel10_BASE (DMAMUX1_BASE + 0x0028UL) +#define DMAMUX1_Channel11_BASE (DMAMUX1_BASE + 0x002CUL) +#define DMAMUX1_Channel12_BASE (DMAMUX1_BASE + 0x0030UL) +#define DMAMUX1_Channel13_BASE (DMAMUX1_BASE + 0x0034UL) +#define DMAMUX1_Channel14_BASE (DMAMUX1_BASE + 0x0038UL) +#define DMAMUX1_Channel15_BASE (DMAMUX1_BASE + 0x003CUL) + +#define DMAMUX1_RequestGenerator0_BASE (DMAMUX1_BASE + 0x0100UL) +#define DMAMUX1_RequestGenerator1_BASE (DMAMUX1_BASE + 0x0104UL) +#define DMAMUX1_RequestGenerator2_BASE (DMAMUX1_BASE + 0x0108UL) +#define DMAMUX1_RequestGenerator3_BASE (DMAMUX1_BASE + 0x010CUL) +#define DMAMUX1_RequestGenerator4_BASE (DMAMUX1_BASE + 0x0110UL) +#define DMAMUX1_RequestGenerator5_BASE (DMAMUX1_BASE + 0x0114UL) +#define DMAMUX1_RequestGenerator6_BASE (DMAMUX1_BASE + 0x0118UL) +#define DMAMUX1_RequestGenerator7_BASE (DMAMUX1_BASE + 0x011CUL) + +#define DMAMUX1_ChannelStatus_BASE (DMAMUX1_BASE + 0x0080UL) +#define DMAMUX1_RequestGenStatus_BASE (DMAMUX1_BASE + 0x0140UL) + +/*!< FMC Banks registers base address */ +#define FMC_Bank1_R_BASE (FMC_R_BASE + 0x0000UL) +#define FMC_Bank1E_R_BASE (FMC_R_BASE + 0x0104UL) +#define FMC_Bank2_R_BASE (FMC_R_BASE + 0x0060UL) +#define FMC_Bank3_R_BASE (FMC_R_BASE + 0x0080UL) +#define FMC_Bank5_6_R_BASE (FMC_R_BASE + 0x0140UL) + +/* Debug MCU registers base address */ +#define DBGMCU_BASE (0x5C001000UL) + +#define MDMA_Channel0_BASE (MDMA_BASE + 0x00000040UL) +#define MDMA_Channel1_BASE (MDMA_BASE + 0x00000080UL) +#define MDMA_Channel2_BASE (MDMA_BASE + 0x000000C0UL) +#define MDMA_Channel3_BASE (MDMA_BASE + 0x00000100UL) +#define MDMA_Channel4_BASE (MDMA_BASE + 0x00000140UL) +#define MDMA_Channel5_BASE (MDMA_BASE + 0x00000180UL) +#define MDMA_Channel6_BASE (MDMA_BASE + 0x000001C0UL) +#define MDMA_Channel7_BASE (MDMA_BASE + 0x00000200UL) +#define MDMA_Channel8_BASE (MDMA_BASE + 0x00000240UL) +#define MDMA_Channel9_BASE (MDMA_BASE + 0x00000280UL) +#define MDMA_Channel10_BASE (MDMA_BASE + 0x000002C0UL) +#define MDMA_Channel11_BASE (MDMA_BASE + 0x00000300UL) +#define MDMA_Channel12_BASE (MDMA_BASE + 0x00000340UL) +#define MDMA_Channel13_BASE (MDMA_BASE + 0x00000380UL) +#define MDMA_Channel14_BASE (MDMA_BASE + 0x000003C0UL) +#define MDMA_Channel15_BASE (MDMA_BASE + 0x00000400UL) + +#define RAMECC1_Monitor1_BASE (RAMECC1_BASE + 0x20UL) +#define RAMECC1_Monitor2_BASE (RAMECC1_BASE + 0x40UL) +#define RAMECC1_Monitor3_BASE (RAMECC1_BASE + 0x60UL) +#define RAMECC1_Monitor4_BASE (RAMECC1_BASE + 0x80UL) +#define RAMECC1_Monitor5_BASE (RAMECC1_BASE + 0xA0UL) +#define RAMECC1_Monitor6_BASE (RAMECC1_BASE + 0xC0UL) + +#define RAMECC2_Monitor1_BASE (RAMECC2_BASE + 0x20UL) +#define RAMECC2_Monitor2_BASE (RAMECC2_BASE + 0x40UL) +#define RAMECC2_Monitor3_BASE (RAMECC2_BASE + 0x60UL) + +#define RAMECC3_Monitor1_BASE (RAMECC3_BASE + 0x20UL) +#define RAMECC3_Monitor2_BASE (RAMECC3_BASE + 0x40UL) + + +/** + * @} + */ + +/** @addtogroup Peripheral_declaration + * @{ + */ +#define TIM2 ((TIM_TypeDef *) TIM2_BASE) +#define TIM3 ((TIM_TypeDef *) TIM3_BASE) +#define TIM4 ((TIM_TypeDef *) TIM4_BASE) +#define TIM5 ((TIM_TypeDef *) TIM5_BASE) +#define TIM6 ((TIM_TypeDef *) TIM6_BASE) +#define TIM7 ((TIM_TypeDef *) TIM7_BASE) +#define TIM13 ((TIM_TypeDef *) TIM13_BASE) +#define TIM14 ((TIM_TypeDef *) TIM14_BASE) +#define VREFBUF ((VREFBUF_TypeDef *) VREFBUF_BASE) +#define RTC ((RTC_TypeDef *) RTC_BASE) +#define WWDG1 ((WWDG_TypeDef *) WWDG1_BASE) + + +#define IWDG1 ((IWDG_TypeDef *) IWDG1_BASE) +#define SPI2 ((SPI_TypeDef *) SPI2_BASE) +#define SPI3 ((SPI_TypeDef *) SPI3_BASE) +#define SPI4 ((SPI_TypeDef *) SPI4_BASE) +#define SPI5 ((SPI_TypeDef *) SPI5_BASE) +#define SPI6 ((SPI_TypeDef *) SPI6_BASE) +#define USART2 ((USART_TypeDef *) USART2_BASE) +#define USART3 ((USART_TypeDef *) USART3_BASE) +#define USART6 ((USART_TypeDef *) USART6_BASE) +#define USART10 ((USART_TypeDef *) USART10_BASE) +#define UART7 ((USART_TypeDef *) UART7_BASE) +#define UART8 ((USART_TypeDef *) UART8_BASE) +#define UART9 ((USART_TypeDef *) UART9_BASE) +#define CRS ((CRS_TypeDef *) CRS_BASE) +#define UART4 ((USART_TypeDef *) UART4_BASE) +#define UART5 ((USART_TypeDef *) UART5_BASE) +#define I2C1 ((I2C_TypeDef *) I2C1_BASE) +#define I2C2 ((I2C_TypeDef *) I2C2_BASE) +#define I2C3 ((I2C_TypeDef *) I2C3_BASE) +#define I2C4 ((I2C_TypeDef *) I2C4_BASE) +#define I2C5 ((I2C_TypeDef *) I2C5_BASE) +#define FDCAN1 ((FDCAN_GlobalTypeDef *) FDCAN1_BASE) +#define FDCAN2 ((FDCAN_GlobalTypeDef *) FDCAN2_BASE) +#define FDCAN_CCU ((FDCAN_ClockCalibrationUnit_TypeDef *) FDCAN_CCU_BASE) +#define FDCAN3 ((FDCAN_GlobalTypeDef *) FDCAN3_BASE) +#define TIM23 ((TIM_TypeDef *) TIM23_BASE) +#define TIM24 ((TIM_TypeDef *) TIM24_BASE) +#define CEC ((CEC_TypeDef *) CEC_BASE) +#define LPTIM1 ((LPTIM_TypeDef *) LPTIM1_BASE) +#define PWR ((PWR_TypeDef *) PWR_BASE) +#define DAC1 ((DAC_TypeDef *) DAC1_BASE) +#define LPUART1 ((USART_TypeDef *) LPUART1_BASE) +#define SWPMI1 ((SWPMI_TypeDef *) SWPMI1_BASE) +#define LPTIM2 ((LPTIM_TypeDef *) LPTIM2_BASE) +#define LPTIM3 ((LPTIM_TypeDef *) LPTIM3_BASE) +#define DTS ((DTS_TypeDef *) DTS_BASE) +#define LPTIM4 ((LPTIM_TypeDef *) LPTIM4_BASE) +#define LPTIM5 ((LPTIM_TypeDef *) LPTIM5_BASE) + +#define SYSCFG ((SYSCFG_TypeDef *) SYSCFG_BASE) +#define COMP12 ((COMPOPT_TypeDef *) COMP12_BASE) +#define COMP1 ((COMP_TypeDef *) COMP1_BASE) +#define COMP2 ((COMP_TypeDef *) COMP2_BASE) +#define COMP12_COMMON ((COMP_Common_TypeDef *) COMP2_BASE) +#define OPAMP ((OPAMP_TypeDef *) OPAMP_BASE) +#define OPAMP1 ((OPAMP_TypeDef *) OPAMP1_BASE) +#define OPAMP2 ((OPAMP_TypeDef *) OPAMP2_BASE) + + +#define EXTI ((EXTI_TypeDef *) EXTI_BASE) +#define EXTI_D1 ((EXTI_Core_TypeDef *) EXTI_D1_BASE) +#define EXTI_D2 ((EXTI_Core_TypeDef *) EXTI_D2_BASE) +#define TIM1 ((TIM_TypeDef *) TIM1_BASE) +#define SPI1 ((SPI_TypeDef *) SPI1_BASE) +#define TIM8 ((TIM_TypeDef *) TIM8_BASE) +#define USART1 ((USART_TypeDef *) USART1_BASE) +#define TIM12 ((TIM_TypeDef *) TIM12_BASE) +#define TIM15 ((TIM_TypeDef *) TIM15_BASE) +#define TIM16 ((TIM_TypeDef *) TIM16_BASE) +#define TIM17 ((TIM_TypeDef *) TIM17_BASE) +#define SAI1 ((SAI_TypeDef *) SAI1_BASE) +#define SAI1_Block_A ((SAI_Block_TypeDef *)SAI1_Block_A_BASE) +#define SAI1_Block_B ((SAI_Block_TypeDef *)SAI1_Block_B_BASE) +#define SAI4 ((SAI_TypeDef *) SAI4_BASE) +#define SAI4_Block_A ((SAI_Block_TypeDef *)SAI4_Block_A_BASE) +#define SAI4_Block_B ((SAI_Block_TypeDef *)SAI4_Block_B_BASE) + +#define SPDIFRX ((SPDIFRX_TypeDef *) SPDIFRX_BASE) +#define DFSDM1_Channel0 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel0_BASE) +#define DFSDM1_Channel1 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel1_BASE) +#define DFSDM1_Channel2 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel2_BASE) +#define DFSDM1_Channel3 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel3_BASE) +#define DFSDM1_Channel4 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel4_BASE) +#define DFSDM1_Channel5 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel5_BASE) +#define DFSDM1_Channel6 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel6_BASE) +#define DFSDM1_Channel7 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel7_BASE) +#define DFSDM1_Filter0 ((DFSDM_Filter_TypeDef *) DFSDM1_Filter0_BASE) +#define DFSDM1_Filter1 ((DFSDM_Filter_TypeDef *) DFSDM1_Filter1_BASE) +#define DFSDM1_Filter2 ((DFSDM_Filter_TypeDef *) DFSDM1_Filter2_BASE) +#define DFSDM1_Filter3 ((DFSDM_Filter_TypeDef *) DFSDM1_Filter3_BASE) +#define DMA2D ((DMA2D_TypeDef *) DMA2D_BASE) +#define DCMI ((DCMI_TypeDef *) DCMI_BASE) +#define PSSI ((PSSI_TypeDef *) PSSI_BASE) +#define RCC ((RCC_TypeDef *) RCC_BASE) +#define FLASH ((FLASH_TypeDef *) FLASH_R_BASE) +#define CRC ((CRC_TypeDef *) CRC_BASE) + +#define GPIOA ((GPIO_TypeDef *) GPIOA_BASE) +#define GPIOB ((GPIO_TypeDef *) GPIOB_BASE) +#define GPIOC ((GPIO_TypeDef *) GPIOC_BASE) +#define GPIOD ((GPIO_TypeDef *) GPIOD_BASE) +#define GPIOE ((GPIO_TypeDef *) GPIOE_BASE) +#define GPIOF ((GPIO_TypeDef *) GPIOF_BASE) +#define GPIOG ((GPIO_TypeDef *) GPIOG_BASE) +#define GPIOH ((GPIO_TypeDef *) GPIOH_BASE) +#define GPIOJ ((GPIO_TypeDef *) GPIOJ_BASE) +#define GPIOK ((GPIO_TypeDef *) GPIOK_BASE) + +#define ADC1 ((ADC_TypeDef *) ADC1_BASE) +#define ADC2 ((ADC_TypeDef *) ADC2_BASE) +#define ADC3 ((ADC_TypeDef *) ADC3_BASE) +#define ADC3_COMMON ((ADC_Common_TypeDef *) ADC3_COMMON_BASE) +#define ADC12_COMMON ((ADC_Common_TypeDef *) ADC12_COMMON_BASE) + +#define RNG ((RNG_TypeDef *) RNG_BASE) +#define SDMMC2 ((SDMMC_TypeDef *) SDMMC2_BASE) +#define DLYB_SDMMC2 ((DLYB_TypeDef *) DLYB_SDMMC2_BASE) +#define FMAC ((FMAC_TypeDef *) FMAC_BASE) +#define CORDIC ((CORDIC_TypeDef *) CORDIC_BASE) + +#define BDMA ((BDMA_TypeDef *) BDMA_BASE) +#define BDMA_Channel0 ((BDMA_Channel_TypeDef *) BDMA_Channel0_BASE) +#define BDMA_Channel1 ((BDMA_Channel_TypeDef *) BDMA_Channel1_BASE) +#define BDMA_Channel2 ((BDMA_Channel_TypeDef *) BDMA_Channel2_BASE) +#define BDMA_Channel3 ((BDMA_Channel_TypeDef *) BDMA_Channel3_BASE) +#define BDMA_Channel4 ((BDMA_Channel_TypeDef *) BDMA_Channel4_BASE) +#define BDMA_Channel5 ((BDMA_Channel_TypeDef *) BDMA_Channel5_BASE) +#define BDMA_Channel6 ((BDMA_Channel_TypeDef *) BDMA_Channel6_BASE) +#define BDMA_Channel7 ((BDMA_Channel_TypeDef *) BDMA_Channel7_BASE) + +#define RAMECC1 ((RAMECC_TypeDef *)RAMECC1_BASE) +#define RAMECC1_Monitor1 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor1_BASE) +#define RAMECC1_Monitor2 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor2_BASE) +#define RAMECC1_Monitor3 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor3_BASE) +#define RAMECC1_Monitor4 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor4_BASE) +#define RAMECC1_Monitor5 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor5_BASE) +#define RAMECC1_Monitor6 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor6_BASE) + +#define RAMECC2 ((RAMECC_TypeDef *)RAMECC2_BASE) +#define RAMECC2_Monitor1 ((RAMECC_MonitorTypeDef *)RAMECC2_Monitor1_BASE) +#define RAMECC2_Monitor2 ((RAMECC_MonitorTypeDef *)RAMECC2_Monitor2_BASE) +#define RAMECC2_Monitor3 ((RAMECC_MonitorTypeDef *)RAMECC2_Monitor3_BASE) + +#define RAMECC3 ((RAMECC_TypeDef *)RAMECC3_BASE) +#define RAMECC3_Monitor1 ((RAMECC_MonitorTypeDef *)RAMECC3_Monitor1_BASE) +#define RAMECC3_Monitor2 ((RAMECC_MonitorTypeDef *)RAMECC3_Monitor2_BASE) + +#define DMAMUX2 ((DMAMUX_Channel_TypeDef *) DMAMUX2_BASE) +#define DMAMUX2_Channel0 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel0_BASE) +#define DMAMUX2_Channel1 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel1_BASE) +#define DMAMUX2_Channel2 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel2_BASE) +#define DMAMUX2_Channel3 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel3_BASE) +#define DMAMUX2_Channel4 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel4_BASE) +#define DMAMUX2_Channel5 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel5_BASE) +#define DMAMUX2_Channel6 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel6_BASE) +#define DMAMUX2_Channel7 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel7_BASE) + + +#define DMAMUX2_RequestGenerator0 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator0_BASE) +#define DMAMUX2_RequestGenerator1 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator1_BASE) +#define DMAMUX2_RequestGenerator2 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator2_BASE) +#define DMAMUX2_RequestGenerator3 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator3_BASE) +#define DMAMUX2_RequestGenerator4 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator4_BASE) +#define DMAMUX2_RequestGenerator5 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator5_BASE) +#define DMAMUX2_RequestGenerator6 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator6_BASE) +#define DMAMUX2_RequestGenerator7 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator7_BASE) + +#define DMAMUX2_ChannelStatus ((DMAMUX_ChannelStatus_TypeDef *) DMAMUX2_ChannelStatus_BASE) +#define DMAMUX2_RequestGenStatus ((DMAMUX_RequestGenStatus_TypeDef *) DMAMUX2_RequestGenStatus_BASE) + +#define DMA2 ((DMA_TypeDef *) DMA2_BASE) +#define DMA2_Stream0 ((DMA_Stream_TypeDef *) DMA2_Stream0_BASE) +#define DMA2_Stream1 ((DMA_Stream_TypeDef *) DMA2_Stream1_BASE) +#define DMA2_Stream2 ((DMA_Stream_TypeDef *) DMA2_Stream2_BASE) +#define DMA2_Stream3 ((DMA_Stream_TypeDef *) DMA2_Stream3_BASE) +#define DMA2_Stream4 ((DMA_Stream_TypeDef *) DMA2_Stream4_BASE) +#define DMA2_Stream5 ((DMA_Stream_TypeDef *) DMA2_Stream5_BASE) +#define DMA2_Stream6 ((DMA_Stream_TypeDef *) DMA2_Stream6_BASE) +#define DMA2_Stream7 ((DMA_Stream_TypeDef *) DMA2_Stream7_BASE) + +#define DMA1 ((DMA_TypeDef *) DMA1_BASE) +#define DMA1_Stream0 ((DMA_Stream_TypeDef *) DMA1_Stream0_BASE) +#define DMA1_Stream1 ((DMA_Stream_TypeDef *) DMA1_Stream1_BASE) +#define DMA1_Stream2 ((DMA_Stream_TypeDef *) DMA1_Stream2_BASE) +#define DMA1_Stream3 ((DMA_Stream_TypeDef *) DMA1_Stream3_BASE) +#define DMA1_Stream4 ((DMA_Stream_TypeDef *) DMA1_Stream4_BASE) +#define DMA1_Stream5 ((DMA_Stream_TypeDef *) DMA1_Stream5_BASE) +#define DMA1_Stream6 ((DMA_Stream_TypeDef *) DMA1_Stream6_BASE) +#define DMA1_Stream7 ((DMA_Stream_TypeDef *) DMA1_Stream7_BASE) + + +#define DMAMUX1 ((DMAMUX_Channel_TypeDef *) DMAMUX1_BASE) +#define DMAMUX1_Channel0 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel0_BASE) +#define DMAMUX1_Channel1 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel1_BASE) +#define DMAMUX1_Channel2 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel2_BASE) +#define DMAMUX1_Channel3 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel3_BASE) +#define DMAMUX1_Channel4 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel4_BASE) +#define DMAMUX1_Channel5 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel5_BASE) +#define DMAMUX1_Channel6 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel6_BASE) +#define DMAMUX1_Channel7 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel7_BASE) +#define DMAMUX1_Channel8 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel8_BASE) +#define DMAMUX1_Channel9 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel9_BASE) +#define DMAMUX1_Channel10 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel10_BASE) +#define DMAMUX1_Channel11 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel11_BASE) +#define DMAMUX1_Channel12 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel12_BASE) +#define DMAMUX1_Channel13 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel13_BASE) +#define DMAMUX1_Channel14 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel14_BASE) +#define DMAMUX1_Channel15 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel15_BASE) + +#define DMAMUX1_RequestGenerator0 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator0_BASE) +#define DMAMUX1_RequestGenerator1 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator1_BASE) +#define DMAMUX1_RequestGenerator2 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator2_BASE) +#define DMAMUX1_RequestGenerator3 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator3_BASE) +#define DMAMUX1_RequestGenerator4 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator4_BASE) +#define DMAMUX1_RequestGenerator5 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator5_BASE) +#define DMAMUX1_RequestGenerator6 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator6_BASE) +#define DMAMUX1_RequestGenerator7 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator7_BASE) + +#define DMAMUX1_ChannelStatus ((DMAMUX_ChannelStatus_TypeDef *) DMAMUX1_ChannelStatus_BASE) +#define DMAMUX1_RequestGenStatus ((DMAMUX_RequestGenStatus_TypeDef *) DMAMUX1_RequestGenStatus_BASE) + + +#define FMC_Bank1_R ((FMC_Bank1_TypeDef *) FMC_Bank1_R_BASE) +#define FMC_Bank1E_R ((FMC_Bank1E_TypeDef *) FMC_Bank1E_R_BASE) +#define FMC_Bank2_R ((FMC_Bank2_TypeDef *) FMC_Bank2_R_BASE) +#define FMC_Bank3_R ((FMC_Bank3_TypeDef *) FMC_Bank3_R_BASE) +#define FMC_Bank5_6_R ((FMC_Bank5_6_TypeDef *) FMC_Bank5_6_R_BASE) + +#define OCTOSPI1 ((OCTOSPI_TypeDef *) OCTOSPI1_R_BASE) +#define DLYB_OCTOSPI1 ((DLYB_TypeDef *) DLYB_OCTOSPI1_BASE) +#define OCTOSPI2 ((OCTOSPI_TypeDef *) OCTOSPI2_R_BASE) +#define DLYB_OCTOSPI2 ((DLYB_TypeDef *) DLYB_OCTOSPI2_BASE) +#define OCTOSPIM ((OCTOSPIM_TypeDef *) OCTOSPIM_BASE) + +#define SDMMC1 ((SDMMC_TypeDef *) SDMMC1_BASE) +#define DLYB_SDMMC1 ((DLYB_TypeDef *) DLYB_SDMMC1_BASE) + +#define DBGMCU ((DBGMCU_TypeDef *) DBGMCU_BASE) + +#define HSEM ((HSEM_TypeDef *) HSEM_BASE) +#define HSEM_COMMON ((HSEM_Common_TypeDef *) (HSEM_BASE + 0x100UL)) + +#define LTDC ((LTDC_TypeDef *)LTDC_BASE) +#define LTDC_Layer1 ((LTDC_Layer_TypeDef *)LTDC_Layer1_BASE) +#define LTDC_Layer2 ((LTDC_Layer_TypeDef *)LTDC_Layer2_BASE) + +#define MDIOS ((MDIOS_TypeDef *) MDIOS_BASE) + +#define ETH ((ETH_TypeDef *)ETH_BASE) +#define MDMA ((MDMA_TypeDef *)MDMA_BASE) +#define MDMA_Channel0 ((MDMA_Channel_TypeDef *)MDMA_Channel0_BASE) +#define MDMA_Channel1 ((MDMA_Channel_TypeDef *)MDMA_Channel1_BASE) +#define MDMA_Channel2 ((MDMA_Channel_TypeDef *)MDMA_Channel2_BASE) +#define MDMA_Channel3 ((MDMA_Channel_TypeDef *)MDMA_Channel3_BASE) +#define MDMA_Channel4 ((MDMA_Channel_TypeDef *)MDMA_Channel4_BASE) +#define MDMA_Channel5 ((MDMA_Channel_TypeDef *)MDMA_Channel5_BASE) +#define MDMA_Channel6 ((MDMA_Channel_TypeDef *)MDMA_Channel6_BASE) +#define MDMA_Channel7 ((MDMA_Channel_TypeDef *)MDMA_Channel7_BASE) +#define MDMA_Channel8 ((MDMA_Channel_TypeDef *)MDMA_Channel8_BASE) +#define MDMA_Channel9 ((MDMA_Channel_TypeDef *)MDMA_Channel9_BASE) +#define MDMA_Channel10 ((MDMA_Channel_TypeDef *)MDMA_Channel10_BASE) +#define MDMA_Channel11 ((MDMA_Channel_TypeDef *)MDMA_Channel11_BASE) +#define MDMA_Channel12 ((MDMA_Channel_TypeDef *)MDMA_Channel12_BASE) +#define MDMA_Channel13 ((MDMA_Channel_TypeDef *)MDMA_Channel13_BASE) +#define MDMA_Channel14 ((MDMA_Channel_TypeDef *)MDMA_Channel14_BASE) +#define MDMA_Channel15 ((MDMA_Channel_TypeDef *)MDMA_Channel15_BASE) + + +#define USB1_OTG_HS ((USB_OTG_GlobalTypeDef *) USB1_OTG_HS_PERIPH_BASE) + +/* Legacy defines */ +#define USB_OTG_HS USB1_OTG_HS +#define USB_OTG_HS_PERIPH_BASE USB1_OTG_HS_PERIPH_BASE + +/** + * @} + */ + +/** @addtogroup Exported_constants + * @{ + */ + + /** @addtogroup Peripheral_Registers_Bits_Definition + * @{ + */ + +/******************************************************************************/ +/* Peripheral Registers_Bits_Definition */ +/******************************************************************************/ + +/******************************************************************************/ +/* */ +/* Analog to Digital Converter */ +/* */ +/******************************************************************************/ +/******************************* ADC VERSION ********************************/ +#define ADC_VER_V5_V90 +/******************** Bit definition for ADC_ISR register ********************/ +#define ADC_ISR_ADRDY_Pos (0U) +#define ADC_ISR_ADRDY_Msk (0x1UL << ADC_ISR_ADRDY_Pos) /*!< 0x00000001 */ +#define ADC_ISR_ADRDY ADC_ISR_ADRDY_Msk /*!< ADC Ready (ADRDY) flag */ +#define ADC_ISR_EOSMP_Pos (1U) +#define ADC_ISR_EOSMP_Msk (0x1UL << ADC_ISR_EOSMP_Pos) /*!< 0x00000002 */ +#define ADC_ISR_EOSMP ADC_ISR_EOSMP_Msk /*!< ADC End of Sampling flag */ +#define ADC_ISR_EOC_Pos (2U) +#define ADC_ISR_EOC_Msk (0x1UL << ADC_ISR_EOC_Pos) /*!< 0x00000004 */ +#define ADC_ISR_EOC ADC_ISR_EOC_Msk /*!< ADC End of Regular Conversion flag */ +#define ADC_ISR_EOS_Pos (3U) +#define ADC_ISR_EOS_Msk (0x1UL << ADC_ISR_EOS_Pos) /*!< 0x00000008 */ +#define ADC_ISR_EOS ADC_ISR_EOS_Msk /*!< ADC End of Regular sequence of Conversions flag */ +#define ADC_ISR_OVR_Pos (4U) +#define ADC_ISR_OVR_Msk (0x1UL << ADC_ISR_OVR_Pos) /*!< 0x00000010 */ +#define ADC_ISR_OVR ADC_ISR_OVR_Msk /*!< ADC overrun flag */ +#define ADC_ISR_JEOC_Pos (5U) +#define ADC_ISR_JEOC_Msk (0x1UL << ADC_ISR_JEOC_Pos) /*!< 0x00000020 */ +#define ADC_ISR_JEOC ADC_ISR_JEOC_Msk /*!< ADC End of Injected Conversion flag */ +#define ADC_ISR_JEOS_Pos (6U) +#define ADC_ISR_JEOS_Msk (0x1UL << ADC_ISR_JEOS_Pos) /*!< 0x00000040 */ +#define ADC_ISR_JEOS ADC_ISR_JEOS_Msk /*!< ADC End of Injected sequence of Conversions flag */ +#define ADC_ISR_AWD1_Pos (7U) +#define ADC_ISR_AWD1_Msk (0x1UL << ADC_ISR_AWD1_Pos) /*!< 0x00000080 */ +#define ADC_ISR_AWD1 ADC_ISR_AWD1_Msk /*!< ADC Analog watchdog 1 flag */ +#define ADC_ISR_AWD2_Pos (8U) +#define ADC_ISR_AWD2_Msk (0x1UL << ADC_ISR_AWD2_Pos) /*!< 0x00000100 */ +#define ADC_ISR_AWD2 ADC_ISR_AWD2_Msk /*!< ADC Analog watchdog 2 flag */ +#define ADC_ISR_AWD3_Pos (9U) +#define ADC_ISR_AWD3_Msk (0x1UL << ADC_ISR_AWD3_Pos) /*!< 0x00000200 */ +#define ADC_ISR_AWD3 ADC_ISR_AWD3_Msk /*!< ADC Analog watchdog 3 flag */ +#define ADC_ISR_JQOVF_Pos (10U) +#define ADC_ISR_JQOVF_Msk (0x1UL << ADC_ISR_JQOVF_Pos) /*!< 0x00000400 */ +#define ADC_ISR_JQOVF ADC_ISR_JQOVF_Msk /*!< ADC Injected Context Queue Overflow flag */ + +/******************** Bit definition for ADC_IER register ********************/ +#define ADC_IER_ADRDYIE_Pos (0U) +#define ADC_IER_ADRDYIE_Msk (0x1UL << ADC_IER_ADRDYIE_Pos) /*!< 0x00000001 */ +#define ADC_IER_ADRDYIE ADC_IER_ADRDYIE_Msk /*!< ADC Ready (ADRDY) interrupt source */ +#define ADC_IER_EOSMPIE_Pos (1U) +#define ADC_IER_EOSMPIE_Msk (0x1UL << ADC_IER_EOSMPIE_Pos) /*!< 0x00000002 */ +#define ADC_IER_EOSMPIE ADC_IER_EOSMPIE_Msk /*!< ADC End of Sampling interrupt source */ +#define ADC_IER_EOCIE_Pos (2U) +#define ADC_IER_EOCIE_Msk (0x1UL << ADC_IER_EOCIE_Pos) /*!< 0x00000004 */ +#define ADC_IER_EOCIE ADC_IER_EOCIE_Msk /*!< ADC End of Regular Conversion interrupt source */ +#define ADC_IER_EOSIE_Pos (3U) +#define ADC_IER_EOSIE_Msk (0x1UL << ADC_IER_EOSIE_Pos) /*!< 0x00000008 */ +#define ADC_IER_EOSIE ADC_IER_EOSIE_Msk /*!< ADC End of Regular sequence of Conversions interrupt source */ +#define ADC_IER_OVRIE_Pos (4U) +#define ADC_IER_OVRIE_Msk (0x1UL << ADC_IER_OVRIE_Pos) /*!< 0x00000010 */ +#define ADC_IER_OVRIE ADC_IER_OVRIE_Msk /*!< ADC overrun interrupt source */ +#define ADC_IER_JEOCIE_Pos (5U) +#define ADC_IER_JEOCIE_Msk (0x1UL << ADC_IER_JEOCIE_Pos) /*!< 0x00000020 */ +#define ADC_IER_JEOCIE ADC_IER_JEOCIE_Msk /*!< ADC End of Injected Conversion interrupt source */ +#define ADC_IER_JEOSIE_Pos (6U) +#define ADC_IER_JEOSIE_Msk (0x1UL << ADC_IER_JEOSIE_Pos) /*!< 0x00000040 */ +#define ADC_IER_JEOSIE ADC_IER_JEOSIE_Msk /*!< ADC End of Injected sequence of Conversions interrupt source */ +#define ADC_IER_AWD1IE_Pos (7U) +#define ADC_IER_AWD1IE_Msk (0x1UL << ADC_IER_AWD1IE_Pos) /*!< 0x00000080 */ +#define ADC_IER_AWD1IE ADC_IER_AWD1IE_Msk /*!< ADC Analog watchdog 1 interrupt source */ +#define ADC_IER_AWD2IE_Pos (8U) +#define ADC_IER_AWD2IE_Msk (0x1UL << ADC_IER_AWD2IE_Pos) /*!< 0x00000100 */ +#define ADC_IER_AWD2IE ADC_IER_AWD2IE_Msk /*!< ADC Analog watchdog 2 interrupt source */ +#define ADC_IER_AWD3IE_Pos (9U) +#define ADC_IER_AWD3IE_Msk (0x1UL << ADC_IER_AWD3IE_Pos) /*!< 0x00000200 */ +#define ADC_IER_AWD3IE ADC_IER_AWD3IE_Msk /*!< ADC Analog watchdog 3 interrupt source */ +#define ADC_IER_JQOVFIE_Pos (10U) +#define ADC_IER_JQOVFIE_Msk (0x1UL << ADC_IER_JQOVFIE_Pos) /*!< 0x00000400 */ +#define ADC_IER_JQOVFIE ADC_IER_JQOVFIE_Msk /*!< ADC Injected Context Queue Overflow interrupt source */ + +/******************** Bit definition for ADC_CR register ********************/ +#define ADC_CR_ADEN_Pos (0U) +#define ADC_CR_ADEN_Msk (0x1UL << ADC_CR_ADEN_Pos) /*!< 0x00000001 */ +#define ADC_CR_ADEN ADC_CR_ADEN_Msk /*!< ADC Enable control */ +#define ADC_CR_ADDIS_Pos (1U) +#define ADC_CR_ADDIS_Msk (0x1UL << ADC_CR_ADDIS_Pos) /*!< 0x00000002 */ +#define ADC_CR_ADDIS ADC_CR_ADDIS_Msk /*!< ADC Disable command */ +#define ADC_CR_ADSTART_Pos (2U) +#define ADC_CR_ADSTART_Msk (0x1UL << ADC_CR_ADSTART_Pos) /*!< 0x00000004 */ +#define ADC_CR_ADSTART ADC_CR_ADSTART_Msk /*!< ADC Start of Regular conversion */ +#define ADC_CR_JADSTART_Pos (3U) +#define ADC_CR_JADSTART_Msk (0x1UL << ADC_CR_JADSTART_Pos) /*!< 0x00000008 */ +#define ADC_CR_JADSTART ADC_CR_JADSTART_Msk /*!< ADC Start of injected conversion */ +#define ADC_CR_ADSTP_Pos (4U) +#define ADC_CR_ADSTP_Msk (0x1UL << ADC_CR_ADSTP_Pos) /*!< 0x00000010 */ +#define ADC_CR_ADSTP ADC_CR_ADSTP_Msk /*!< ADC Stop of Regular conversion */ +#define ADC_CR_JADSTP_Pos (5U) +#define ADC_CR_JADSTP_Msk (0x1UL << ADC_CR_JADSTP_Pos) /*!< 0x00000020 */ +#define ADC_CR_JADSTP ADC_CR_JADSTP_Msk /*!< ADC Stop of injected conversion */ +#define ADC_CR_BOOST_Pos (8U) +#define ADC_CR_BOOST_Msk (0x3UL << ADC_CR_BOOST_Pos) /*!< 0x00000300 */ +#define ADC_CR_BOOST ADC_CR_BOOST_Msk /*!< ADC Boost Mode configuration */ +#define ADC_CR_BOOST_0 (0x1UL << ADC_CR_BOOST_Pos) /*!< 0x00000100 */ +#define ADC_CR_BOOST_1 (0x2UL << ADC_CR_BOOST_Pos) /*!< 0x00000200 */ +#define ADC_CR_ADCALLIN_Pos (16U) +#define ADC_CR_ADCALLIN_Msk (0x1UL << ADC_CR_ADCALLIN_Pos) /*!< 0x00010000 */ +#define ADC_CR_ADCALLIN ADC_CR_ADCALLIN_Msk /*!< ADC Linearity calibration */ +#define ADC_CR_LINCALRDYW1_Pos (22U) +#define ADC_CR_LINCALRDYW1_Msk (0x1UL << ADC_CR_LINCALRDYW1_Pos) /*!< 0x00400000 */ +#define ADC_CR_LINCALRDYW1 ADC_CR_LINCALRDYW1_Msk /*!< ADC Linearity calibration ready Word 1 */ +#define ADC_CR_LINCALRDYW2_Pos (23U) +#define ADC_CR_LINCALRDYW2_Msk (0x1UL << ADC_CR_LINCALRDYW2_Pos) /*!< 0x00800000 */ +#define ADC_CR_LINCALRDYW2 ADC_CR_LINCALRDYW2_Msk /*!< ADC Linearity calibration ready Word 2 */ +#define ADC_CR_LINCALRDYW3_Pos (24U) +#define ADC_CR_LINCALRDYW3_Msk (0x1UL << ADC_CR_LINCALRDYW3_Pos) /*!< 0x01000000 */ +#define ADC_CR_LINCALRDYW3 ADC_CR_LINCALRDYW3_Msk /*!< ADC Linearity calibration ready Word 3 */ +#define ADC_CR_LINCALRDYW4_Pos (25U) +#define ADC_CR_LINCALRDYW4_Msk (0x1UL << ADC_CR_LINCALRDYW4_Pos) /*!< 0x02000000 */ +#define ADC_CR_LINCALRDYW4 ADC_CR_LINCALRDYW4_Msk /*!< ADC Linearity calibration ready Word 4 */ +#define ADC_CR_LINCALRDYW5_Pos (26U) +#define ADC_CR_LINCALRDYW5_Msk (0x1UL << ADC_CR_LINCALRDYW5_Pos) /*!< 0x04000000 */ +#define ADC_CR_LINCALRDYW5 ADC_CR_LINCALRDYW5_Msk /*!< ADC Linearity calibration ready Word 5 */ +#define ADC_CR_LINCALRDYW6_Pos (27U) +#define ADC_CR_LINCALRDYW6_Msk (0x1UL << ADC_CR_LINCALRDYW6_Pos) /*!< 0x08000000 */ +#define ADC_CR_LINCALRDYW6 ADC_CR_LINCALRDYW6_Msk /*!< ADC Linearity calibration ready Word 6 */ +#define ADC_CR_ADVREGEN_Pos (28U) +#define ADC_CR_ADVREGEN_Msk (0x1UL << ADC_CR_ADVREGEN_Pos) /*!< 0x10000000 */ +#define ADC_CR_ADVREGEN ADC_CR_ADVREGEN_Msk /*!< ADC Voltage regulator Enable */ +#define ADC_CR_DEEPPWD_Pos (29U) +#define ADC_CR_DEEPPWD_Msk (0x1UL << ADC_CR_DEEPPWD_Pos) /*!< 0x20000000 */ +#define ADC_CR_DEEPPWD ADC_CR_DEEPPWD_Msk /*!< ADC Deep power down Enable */ +#define ADC_CR_ADCALDIF_Pos (30U) +#define ADC_CR_ADCALDIF_Msk (0x1UL << ADC_CR_ADCALDIF_Pos) /*!< 0x40000000 */ +#define ADC_CR_ADCALDIF ADC_CR_ADCALDIF_Msk /*!< ADC Differential Mode for calibration */ +#define ADC_CR_ADCAL_Pos (31U) +#define ADC_CR_ADCAL_Msk (0x1UL << ADC_CR_ADCAL_Pos) /*!< 0x80000000 */ +#define ADC_CR_ADCAL ADC_CR_ADCAL_Msk /*!< ADC Calibration */ + +/******************** Bit definition for ADC_CFGR register ********************/ +#define ADC_CFGR_DMNGT_Pos (0U) +#define ADC_CFGR_DMNGT_Msk (0x3UL << ADC_CFGR_DMNGT_Pos) /*!< 0x00000003 */ +#define ADC_CFGR_DMNGT ADC_CFGR_DMNGT_Msk /*!< ADC Data Management configuration */ +#define ADC_CFGR_DMNGT_0 (0x1UL << ADC_CFGR_DMNGT_Pos) /*!< 0x00000001 */ +#define ADC_CFGR_DMNGT_1 (0x2UL << ADC_CFGR_DMNGT_Pos) /*!< 0x00000002 */ + +#define ADC_CFGR_RES_Pos (2U) +#define ADC_CFGR_RES_Msk (0x7UL << ADC_CFGR_RES_Pos) /*!< 0x0000001C */ +#define ADC_CFGR_RES ADC_CFGR_RES_Msk /*!< ADC Data resolution */ +#define ADC_CFGR_RES_0 (0x1UL << ADC_CFGR_RES_Pos) /*!< 0x00000004 */ +#define ADC_CFGR_RES_1 (0x2UL << ADC_CFGR_RES_Pos) /*!< 0x00000008 */ +#define ADC_CFGR_RES_2 (0x4UL << ADC_CFGR_RES_Pos) /*!< 0x00000010 */ + +#define ADC_CFGR_EXTSEL_Pos (5U) +#define ADC_CFGR_EXTSEL_Msk (0x1FUL << ADC_CFGR_EXTSEL_Pos) /*!< 0x000003E0 */ +#define ADC_CFGR_EXTSEL ADC_CFGR_EXTSEL_Msk /*!< ADC External trigger selection for regular group */ +#define ADC_CFGR_EXTSEL_0 (0x01UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000020 */ +#define ADC_CFGR_EXTSEL_1 (0x02UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000040 */ +#define ADC_CFGR_EXTSEL_2 (0x04UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000080 */ +#define ADC_CFGR_EXTSEL_3 (0x08UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000100 */ +#define ADC_CFGR_EXTSEL_4 (0x10UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000200 */ + +#define ADC_CFGR_EXTEN_Pos (10U) +#define ADC_CFGR_EXTEN_Msk (0x3UL << ADC_CFGR_EXTEN_Pos) /*!< 0x00000C00 */ +#define ADC_CFGR_EXTEN ADC_CFGR_EXTEN_Msk /*!< ADC External trigger enable and polarity selection for regular channels */ +#define ADC_CFGR_EXTEN_0 (0x1UL << ADC_CFGR_EXTEN_Pos) /*!< 0x00000400 */ +#define ADC_CFGR_EXTEN_1 (0x2UL << ADC_CFGR_EXTEN_Pos) /*!< 0x00000800 */ + +#define ADC_CFGR_OVRMOD_Pos (12U) +#define ADC_CFGR_OVRMOD_Msk (0x1UL << ADC_CFGR_OVRMOD_Pos) /*!< 0x00001000 */ +#define ADC_CFGR_OVRMOD ADC_CFGR_OVRMOD_Msk /*!< ADC overrun mode */ +#define ADC_CFGR_CONT_Pos (13U) +#define ADC_CFGR_CONT_Msk (0x1UL << ADC_CFGR_CONT_Pos) /*!< 0x00002000 */ +#define ADC_CFGR_CONT ADC_CFGR_CONT_Msk /*!< ADC Single/continuous conversion mode for regular conversion */ +#define ADC_CFGR_AUTDLY_Pos (14U) +#define ADC_CFGR_AUTDLY_Msk (0x1UL << ADC_CFGR_AUTDLY_Pos) /*!< 0x00004000 */ +#define ADC_CFGR_AUTDLY ADC_CFGR_AUTDLY_Msk /*!< ADC Delayed conversion mode */ + +#define ADC_CFGR_DISCEN_Pos (16U) +#define ADC_CFGR_DISCEN_Msk (0x1UL << ADC_CFGR_DISCEN_Pos) /*!< 0x00010000 */ +#define ADC_CFGR_DISCEN ADC_CFGR_DISCEN_Msk /*!< ADC Discontinuous mode for regular channels */ + +#define ADC_CFGR_DISCNUM_Pos (17U) +#define ADC_CFGR_DISCNUM_Msk (0x7UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x000E0000 */ +#define ADC_CFGR_DISCNUM ADC_CFGR_DISCNUM_Msk /*!< ADC Discontinuous mode channel count */ +#define ADC_CFGR_DISCNUM_0 (0x1UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x00020000 */ +#define ADC_CFGR_DISCNUM_1 (0x2UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x00040000 */ +#define ADC_CFGR_DISCNUM_2 (0x4UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x00080000 */ + +#define ADC_CFGR_JDISCEN_Pos (20U) +#define ADC_CFGR_JDISCEN_Msk (0x1UL << ADC_CFGR_JDISCEN_Pos) /*!< 0x00100000 */ +#define ADC_CFGR_JDISCEN ADC_CFGR_JDISCEN_Msk /*!< ADC Discontinuous mode on injected channels */ +#define ADC_CFGR_JQM_Pos (21U) +#define ADC_CFGR_JQM_Msk (0x1UL << ADC_CFGR_JQM_Pos) /*!< 0x00200000 */ +#define ADC_CFGR_JQM ADC_CFGR_JQM_Msk /*!< ADC JSQR Queue mode */ +#define ADC_CFGR_AWD1SGL_Pos (22U) +#define ADC_CFGR_AWD1SGL_Msk (0x1UL << ADC_CFGR_AWD1SGL_Pos) /*!< 0x00400000 */ +#define ADC_CFGR_AWD1SGL ADC_CFGR_AWD1SGL_Msk /*!< Enable the watchdog 1 on a single channel or on all channels */ +#define ADC_CFGR_AWD1EN_Pos (23U) +#define ADC_CFGR_AWD1EN_Msk (0x1UL << ADC_CFGR_AWD1EN_Pos) /*!< 0x00800000 */ +#define ADC_CFGR_AWD1EN ADC_CFGR_AWD1EN_Msk /*!< ADC Analog watchdog 1 enable on regular Channels */ +#define ADC_CFGR_JAWD1EN_Pos (24U) +#define ADC_CFGR_JAWD1EN_Msk (0x1UL << ADC_CFGR_JAWD1EN_Pos) /*!< 0x01000000 */ +#define ADC_CFGR_JAWD1EN ADC_CFGR_JAWD1EN_Msk /*!< ADC Analog watchdog 1 enable on injected Channels */ +#define ADC_CFGR_JAUTO_Pos (25U) +#define ADC_CFGR_JAUTO_Msk (0x1UL << ADC_CFGR_JAUTO_Pos) /*!< 0x02000000 */ +#define ADC_CFGR_JAUTO ADC_CFGR_JAUTO_Msk /*!< ADC Automatic injected group conversion */ + +#define ADC_CFGR_AWD1CH_Pos (26U) +#define ADC_CFGR_AWD1CH_Msk (0x1FUL << ADC_CFGR_AWD1CH_Pos) /*!< 0x7C000000 */ +#define ADC_CFGR_AWD1CH ADC_CFGR_AWD1CH_Msk /*!< ADC Analog watchdog 1 Channel selection */ +#define ADC_CFGR_AWD1CH_0 (0x01UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x04000000 */ +#define ADC_CFGR_AWD1CH_1 (0x02UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x08000000 */ +#define ADC_CFGR_AWD1CH_2 (0x04UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x10000000 */ +#define ADC_CFGR_AWD1CH_3 (0x08UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x20000000 */ +#define ADC_CFGR_AWD1CH_4 (0x10UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x40000000 */ + +#define ADC_CFGR_JQDIS_Pos (31U) +#define ADC_CFGR_JQDIS_Msk (0x1UL << ADC_CFGR_JQDIS_Pos) /*!< 0x80000000 */ +#define ADC_CFGR_JQDIS ADC_CFGR_JQDIS_Msk /*!< ADC Injected queue disable */ + +#define ADC3_CFGR_DMAEN_Pos (0U) +#define ADC3_CFGR_DMAEN_Msk (0x1UL << ADC3_CFGR_DMAEN_Pos) /*!< 0x00000001 */ +#define ADC3_CFGR_DMAEN ADC3_CFGR_DMAEN_Msk /*!< ADC DMA transfer enable */ +#define ADC3_CFGR_DMACFG_Pos (1U) +#define ADC3_CFGR_DMACFG_Msk (0x1UL << ADC3_CFGR_DMACFG_Pos) /*!< 0x00000002 */ +#define ADC3_CFGR_DMACFG ADC3_CFGR_DMACFG_Msk /*!< ADC DMA transfer configuration */ + +#define ADC3_CFGR_RES_Pos (3U) +#define ADC3_CFGR_RES_Msk (0x3UL << ADC3_CFGR_RES_Pos) /*!< 0x00000018 */ +#define ADC3_CFGR_RES ADC3_CFGR_RES_Msk /*!< ADC data resolution */ +#define ADC3_CFGR_RES_0 (0x1UL << ADC3_CFGR_RES_Pos) /*!< 0x00000008 */ +#define ADC3_CFGR_RES_1 (0x2UL << ADC3_CFGR_RES_Pos) /*!< 0x00000010 */ + +#define ADC3_CFGR_ALIGN_Pos (15U) +#define ADC3_CFGR_ALIGN_Msk (0x1UL << ADC3_CFGR_ALIGN_Pos) /*!< 0x00008000 */ +#define ADC3_CFGR_ALIGN ADC3_CFGR_ALIGN_Msk /*!< ADC data alignement */ +/******************** Bit definition for ADC_CFGR2 register ********************/ +#define ADC_CFGR2_ROVSE_Pos (0U) +#define ADC_CFGR2_ROVSE_Msk (0x1UL << ADC_CFGR2_ROVSE_Pos) /*!< 0x00000001 */ +#define ADC_CFGR2_ROVSE ADC_CFGR2_ROVSE_Msk /*!< ADC Regular group oversampler enable */ +#define ADC_CFGR2_JOVSE_Pos (1U) +#define ADC_CFGR2_JOVSE_Msk (0x1UL << ADC_CFGR2_JOVSE_Pos) /*!< 0x00000002 */ +#define ADC_CFGR2_JOVSE ADC_CFGR2_JOVSE_Msk /*!< ADC Injected group oversampler enable */ + +#define ADC_CFGR2_OVSS_Pos (5U) +#define ADC_CFGR2_OVSS_Msk (0xFUL << ADC_CFGR2_OVSS_Pos) /*!< 0x000001E0 */ +#define ADC_CFGR2_OVSS ADC_CFGR2_OVSS_Msk /*!< ADC Regular Oversampling shift */ +#define ADC_CFGR2_OVSS_0 (0x1UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000020 */ +#define ADC_CFGR2_OVSS_1 (0x2UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000040 */ +#define ADC_CFGR2_OVSS_2 (0x4UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000080 */ +#define ADC_CFGR2_OVSS_3 (0x8UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000100 */ + +#define ADC_CFGR2_TROVS_Pos (9U) +#define ADC_CFGR2_TROVS_Msk (0x1UL << ADC_CFGR2_TROVS_Pos) /*!< 0x00000200 */ +#define ADC_CFGR2_TROVS ADC_CFGR2_TROVS_Msk /*!< ADC Triggered regular Oversampling */ +#define ADC_CFGR2_ROVSM_Pos (10U) +#define ADC_CFGR2_ROVSM_Msk (0x1UL << ADC_CFGR2_ROVSM_Pos) /*!< 0x00000400 */ +#define ADC_CFGR2_ROVSM ADC_CFGR2_ROVSM_Msk /*!< ADC Regular oversampling mode */ + +#define ADC_CFGR2_RSHIFT1_Pos (11U) +#define ADC_CFGR2_RSHIFT1_Msk (0x1UL << ADC_CFGR2_RSHIFT1_Pos) /*!< 0x00000800 */ +#define ADC_CFGR2_RSHIFT1 ADC_CFGR2_RSHIFT1_Msk /*!< ADC Right-shift data after Offset 1 correction */ +#define ADC_CFGR2_RSHIFT2_Pos (12U) +#define ADC_CFGR2_RSHIFT2_Msk (0x1UL << ADC_CFGR2_RSHIFT2_Pos) /*!< 0x00001000 */ +#define ADC_CFGR2_RSHIFT2 ADC_CFGR2_RSHIFT2_Msk /*!< ADC Right-shift data after Offset 2 correction */ +#define ADC_CFGR2_RSHIFT3_Pos (13U) +#define ADC_CFGR2_RSHIFT3_Msk (0x1UL << ADC_CFGR2_RSHIFT3_Pos) /*!< 0x00002000 */ +#define ADC_CFGR2_RSHIFT3 ADC_CFGR2_RSHIFT3_Msk /*!< ADC Right-shift data after Offset 3 correction */ +#define ADC_CFGR2_RSHIFT4_Pos (14U) +#define ADC_CFGR2_RSHIFT4_Msk (0x1UL << ADC_CFGR2_RSHIFT4_Pos) /*!< 0x00004000 */ +#define ADC_CFGR2_RSHIFT4 ADC_CFGR2_RSHIFT4_Msk /*!< ADC Right-shift data after Offset 4 correction */ + +#define ADC_CFGR2_OVSR_Pos (16U) +#define ADC_CFGR2_OVSR_Msk (0x3FFUL << ADC_CFGR2_OVSR_Pos) /*!< 0x03FF0000 */ +#define ADC_CFGR2_OVSR ADC_CFGR2_OVSR_Msk /*!< ADC oversampling Ratio */ +#define ADC_CFGR2_OVSR_0 (0x001UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00010000 */ +#define ADC_CFGR2_OVSR_1 (0x002UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00020000 */ +#define ADC_CFGR2_OVSR_2 (0x004UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00040000 */ +#define ADC_CFGR2_OVSR_3 (0x008UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00080000 */ +#define ADC_CFGR2_OVSR_4 (0x010UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00100000 */ +#define ADC_CFGR2_OVSR_5 (0x020UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00200000 */ +#define ADC_CFGR2_OVSR_6 (0x040UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00400000 */ +#define ADC_CFGR2_OVSR_7 (0x080UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00800000 */ +#define ADC_CFGR2_OVSR_8 (0x100UL << ADC_CFGR2_OVSR_Pos) /*!< 0x01000000 */ +#define ADC_CFGR2_OVSR_9 (0x200UL << ADC_CFGR2_OVSR_Pos) /*!< 0x02000000 */ + +#define ADC_CFGR2_LSHIFT_Pos (28U) +#define ADC_CFGR2_LSHIFT_Msk (0xFUL << ADC_CFGR2_LSHIFT_Pos) /*!< 0xF0000000 */ +#define ADC_CFGR2_LSHIFT ADC_CFGR2_LSHIFT_Msk /*!< ADC Left shift factor */ +#define ADC_CFGR2_LSHIFT_0 (0x1UL << ADC_CFGR2_LSHIFT_Pos) /*!< 0x10000000 */ +#define ADC_CFGR2_LSHIFT_1 (0x2UL << ADC_CFGR2_LSHIFT_Pos) /*!< 0x20000000 */ +#define ADC_CFGR2_LSHIFT_2 (0x4UL << ADC_CFGR2_LSHIFT_Pos) /*!< 0x40000000 */ +#define ADC_CFGR2_LSHIFT_3 (0x8UL << ADC_CFGR2_LSHIFT_Pos) /*!< 0x80000000 */ + +#define ADC3_CFGR2_OVSR_Pos (2U) +#define ADC3_CFGR2_OVSR_Msk (0x7UL << ADC3_CFGR2_OVSR_Pos) /*!< 0x0000001C */ +#define ADC3_CFGR2_OVSR ADC3_CFGR2_OVSR_Msk /*!< ADC oversampling ratio */ +#define ADC3_CFGR2_OVSR_0 (0x1UL << ADC3_CFGR2_OVSR_Pos) /*!< 0x00000004 */ +#define ADC3_CFGR2_OVSR_1 (0x2UL << ADC3_CFGR2_OVSR_Pos) /*!< 0x00000008 */ +#define ADC3_CFGR2_OVSR_2 (0x4UL << ADC3_CFGR2_OVSR_Pos) /*!< 0x00000010 */ + +#define ADC3_CFGR2_SWTRIG_Pos (25U) +#define ADC3_CFGR2_SWTRIG_Msk (0x1UL << ADC3_CFGR2_SWTRIG_Pos) /*!< 0x02000000 */ +#define ADC3_CFGR2_SWTRIG ADC3_CFGR2_SWTRIG_Msk /*!< ADC Software Trigger Bit for Sample time control trigger mode */ +#define ADC3_CFGR2_BULB_Pos (26U) +#define ADC3_CFGR2_BULB_Msk (0x1UL << ADC3_CFGR2_BULB_Pos) /*!< 0x04000000 */ +#define ADC3_CFGR2_BULB ADC3_CFGR2_BULB_Msk /*!< ADC Bulb sampling mode */ +#define ADC3_CFGR2_SMPTRIG_Pos (27U) +#define ADC3_CFGR2_SMPTRIG_Msk (0x1UL << ADC3_CFGR2_SMPTRIG_Pos) /*!< 0x08000000 */ +#define ADC3_CFGR2_SMPTRIG ADC3_CFGR2_SMPTRIG_Msk /*!< ADC Sample Time Control Trigger mode */ +/******************** Bit definition for ADC_SMPR1 register ********************/ +#define ADC_SMPR1_SMP0_Pos (0U) +#define ADC_SMPR1_SMP0_Msk (0x7UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000007 */ +#define ADC_SMPR1_SMP0 ADC_SMPR1_SMP0_Msk /*!< ADC Channel 0 Sampling time selection */ +#define ADC_SMPR1_SMP0_0 (0x1UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000001 */ +#define ADC_SMPR1_SMP0_1 (0x2UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000002 */ +#define ADC_SMPR1_SMP0_2 (0x4UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000004 */ + +#define ADC_SMPR1_SMP1_Pos (3U) +#define ADC_SMPR1_SMP1_Msk (0x7UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000038 */ +#define ADC_SMPR1_SMP1 ADC_SMPR1_SMP1_Msk /*!< ADC Channel 1 Sampling time selection */ +#define ADC_SMPR1_SMP1_0 (0x1UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000008 */ +#define ADC_SMPR1_SMP1_1 (0x2UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000010 */ +#define ADC_SMPR1_SMP1_2 (0x4UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000020 */ + +#define ADC_SMPR1_SMP2_Pos (6U) +#define ADC_SMPR1_SMP2_Msk (0x7UL << ADC_SMPR1_SMP2_Pos) /*!< 0x000001C0 */ +#define ADC_SMPR1_SMP2 ADC_SMPR1_SMP2_Msk /*!< ADC Channel 2 Sampling time selection */ +#define ADC_SMPR1_SMP2_0 (0x1UL << ADC_SMPR1_SMP2_Pos) /*!< 0x00000040 */ +#define ADC_SMPR1_SMP2_1 (0x2UL << ADC_SMPR1_SMP2_Pos) /*!< 0x00000080 */ +#define ADC_SMPR1_SMP2_2 (0x4UL << ADC_SMPR1_SMP2_Pos) /*!< 0x00000100 */ + +#define ADC_SMPR1_SMP3_Pos (9U) +#define ADC_SMPR1_SMP3_Msk (0x7UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000E00 */ +#define ADC_SMPR1_SMP3 ADC_SMPR1_SMP3_Msk /*!< ADC Channel 3 Sampling time selection */ +#define ADC_SMPR1_SMP3_0 (0x1UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000200 */ +#define ADC_SMPR1_SMP3_1 (0x2UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000400 */ +#define ADC_SMPR1_SMP3_2 (0x4UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000800 */ + +#define ADC_SMPR1_SMP4_Pos (12U) +#define ADC_SMPR1_SMP4_Msk (0x7UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00007000 */ +#define ADC_SMPR1_SMP4 ADC_SMPR1_SMP4_Msk /*!< ADC Channel 4 Sampling time selection */ +#define ADC_SMPR1_SMP4_0 (0x1UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00001000 */ +#define ADC_SMPR1_SMP4_1 (0x2UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00002000 */ +#define ADC_SMPR1_SMP4_2 (0x4UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00004000 */ + +#define ADC_SMPR1_SMP5_Pos (15U) +#define ADC_SMPR1_SMP5_Msk (0x7UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00038000 */ +#define ADC_SMPR1_SMP5 ADC_SMPR1_SMP5_Msk /*!< ADC Channel 5 Sampling time selection */ +#define ADC_SMPR1_SMP5_0 (0x1UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00008000 */ +#define ADC_SMPR1_SMP5_1 (0x2UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00010000 */ +#define ADC_SMPR1_SMP5_2 (0x4UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00020000 */ + +#define ADC_SMPR1_SMP6_Pos (18U) +#define ADC_SMPR1_SMP6_Msk (0x7UL << ADC_SMPR1_SMP6_Pos) /*!< 0x001C0000 */ +#define ADC_SMPR1_SMP6 ADC_SMPR1_SMP6_Msk /*!< ADC Channel 6 Sampling time selection */ +#define ADC_SMPR1_SMP6_0 (0x1UL << ADC_SMPR1_SMP6_Pos) /*!< 0x00040000 */ +#define ADC_SMPR1_SMP6_1 (0x2UL << ADC_SMPR1_SMP6_Pos) /*!< 0x00080000 */ +#define ADC_SMPR1_SMP6_2 (0x4UL << ADC_SMPR1_SMP6_Pos) /*!< 0x00100000 */ + +#define ADC_SMPR1_SMP7_Pos (21U) +#define ADC_SMPR1_SMP7_Msk (0x7UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00E00000 */ +#define ADC_SMPR1_SMP7 ADC_SMPR1_SMP7_Msk /*!< ADC Channel 7 Sampling time selection */ +#define ADC_SMPR1_SMP7_0 (0x1UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00200000 */ +#define ADC_SMPR1_SMP7_1 (0x2UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00400000 */ +#define ADC_SMPR1_SMP7_2 (0x4UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00800000 */ + +#define ADC_SMPR1_SMP8_Pos (24U) +#define ADC_SMPR1_SMP8_Msk (0x7UL << ADC_SMPR1_SMP8_Pos) /*!< 0x07000000 */ +#define ADC_SMPR1_SMP8 ADC_SMPR1_SMP8_Msk /*!< ADC Channel 8 Sampling time selection */ +#define ADC_SMPR1_SMP8_0 (0x1UL << ADC_SMPR1_SMP8_Pos) /*!< 0x01000000 */ +#define ADC_SMPR1_SMP8_1 (0x2UL << ADC_SMPR1_SMP8_Pos) /*!< 0x02000000 */ +#define ADC_SMPR1_SMP8_2 (0x4UL << ADC_SMPR1_SMP8_Pos) /*!< 0x04000000 */ + +#define ADC_SMPR1_SMP9_Pos (27U) +#define ADC_SMPR1_SMP9_Msk (0x7UL << ADC_SMPR1_SMP9_Pos) /*!< 0x38000000 */ +#define ADC_SMPR1_SMP9 ADC_SMPR1_SMP9_Msk /*!< ADC Channel 9 Sampling time selection */ +#define ADC_SMPR1_SMP9_0 (0x1UL << ADC_SMPR1_SMP9_Pos) /*!< 0x08000000 */ +#define ADC_SMPR1_SMP9_1 (0x2UL << ADC_SMPR1_SMP9_Pos) /*!< 0x10000000 */ +#define ADC_SMPR1_SMP9_2 (0x4UL << ADC_SMPR1_SMP9_Pos) /*!< 0x20000000 */ + +/******************** Bit definition for ADC_SMPR2 register ********************/ +#define ADC_SMPR2_SMP10_Pos (0U) +#define ADC_SMPR2_SMP10_Msk (0x7UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000007 */ +#define ADC_SMPR2_SMP10 ADC_SMPR2_SMP10_Msk /*!< ADC Channel 10 Sampling time selection */ +#define ADC_SMPR2_SMP10_0 (0x1UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000001 */ +#define ADC_SMPR2_SMP10_1 (0x2UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000002 */ +#define ADC_SMPR2_SMP10_2 (0x4UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000004 */ + +#define ADC_SMPR2_SMP11_Pos (3U) +#define ADC_SMPR2_SMP11_Msk (0x7UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000038 */ +#define ADC_SMPR2_SMP11 ADC_SMPR2_SMP11_Msk /*!< ADC Channel 11 Sampling time selection */ +#define ADC_SMPR2_SMP11_0 (0x1UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000008 */ +#define ADC_SMPR2_SMP11_1 (0x2UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000010 */ +#define ADC_SMPR2_SMP11_2 (0x4UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000020 */ + +#define ADC_SMPR2_SMP12_Pos (6U) +#define ADC_SMPR2_SMP12_Msk (0x7UL << ADC_SMPR2_SMP12_Pos) /*!< 0x000001C0 */ +#define ADC_SMPR2_SMP12 ADC_SMPR2_SMP12_Msk /*!< ADC Channel 12 Sampling time selection */ +#define ADC_SMPR2_SMP12_0 (0x1UL << ADC_SMPR2_SMP12_Pos) /*!< 0x00000040 */ +#define ADC_SMPR2_SMP12_1 (0x2UL << ADC_SMPR2_SMP12_Pos) /*!< 0x00000080 */ +#define ADC_SMPR2_SMP12_2 (0x4UL << ADC_SMPR2_SMP12_Pos) /*!< 0x00000100 */ + +#define ADC_SMPR2_SMP13_Pos (9U) +#define ADC_SMPR2_SMP13_Msk (0x7UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000E00 */ +#define ADC_SMPR2_SMP13 ADC_SMPR2_SMP13_Msk /*!< ADC Channel 13 Sampling time selection */ +#define ADC_SMPR2_SMP13_0 (0x1UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000200 */ +#define ADC_SMPR2_SMP13_1 (0x2UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000400 */ +#define ADC_SMPR2_SMP13_2 (0x4UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000800 */ + +#define ADC_SMPR2_SMP14_Pos (12U) +#define ADC_SMPR2_SMP14_Msk (0x7UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00007000 */ +#define ADC_SMPR2_SMP14 ADC_SMPR2_SMP14_Msk /*!< ADC Channel 14 Sampling time selection */ +#define ADC_SMPR2_SMP14_0 (0x1UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00001000 */ +#define ADC_SMPR2_SMP14_1 (0x2UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00002000 */ +#define ADC_SMPR2_SMP14_2 (0x4UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00004000 */ + +#define ADC_SMPR2_SMP15_Pos (15U) +#define ADC_SMPR2_SMP15_Msk (0x7UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00038000 */ +#define ADC_SMPR2_SMP15 ADC_SMPR2_SMP15_Msk /*!< ADC Channel 15 Sampling time selection */ +#define ADC_SMPR2_SMP15_0 (0x1UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00008000 */ +#define ADC_SMPR2_SMP15_1 (0x2UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00010000 */ +#define ADC_SMPR2_SMP15_2 (0x4UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00020000 */ + +#define ADC_SMPR2_SMP16_Pos (18U) +#define ADC_SMPR2_SMP16_Msk (0x7UL << ADC_SMPR2_SMP16_Pos) /*!< 0x001C0000 */ +#define ADC_SMPR2_SMP16 ADC_SMPR2_SMP16_Msk /*!< ADC Channel 16 Sampling time selection */ +#define ADC_SMPR2_SMP16_0 (0x1UL << ADC_SMPR2_SMP16_Pos) /*!< 0x00040000 */ +#define ADC_SMPR2_SMP16_1 (0x2UL << ADC_SMPR2_SMP16_Pos) /*!< 0x00080000 */ +#define ADC_SMPR2_SMP16_2 (0x4UL << ADC_SMPR2_SMP16_Pos) /*!< 0x00100000 */ + +#define ADC_SMPR2_SMP17_Pos (21U) +#define ADC_SMPR2_SMP17_Msk (0x7UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00E00000 */ +#define ADC_SMPR2_SMP17 ADC_SMPR2_SMP17_Msk /*!< ADC Channel 17 Sampling time selection */ +#define ADC_SMPR2_SMP17_0 (0x1UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00200000 */ +#define ADC_SMPR2_SMP17_1 (0x2UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00400000 */ +#define ADC_SMPR2_SMP17_2 (0x4UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00800000 */ + +#define ADC_SMPR2_SMP18_Pos (24U) +#define ADC_SMPR2_SMP18_Msk (0x7UL << ADC_SMPR2_SMP18_Pos) /*!< 0x07000000 */ +#define ADC_SMPR2_SMP18 ADC_SMPR2_SMP18_Msk /*!< ADC Channel 18 Sampling time selection */ +#define ADC_SMPR2_SMP18_0 (0x1UL << ADC_SMPR2_SMP18_Pos) /*!< 0x01000000 */ +#define ADC_SMPR2_SMP18_1 (0x2UL << ADC_SMPR2_SMP18_Pos) /*!< 0x02000000 */ +#define ADC_SMPR2_SMP18_2 (0x4UL << ADC_SMPR2_SMP18_Pos) /*!< 0x04000000 */ + +#define ADC_SMPR2_SMP19_Pos (27U) +#define ADC_SMPR2_SMP19_Msk (0x7UL << ADC_SMPR2_SMP19_Pos) /*!< 0x38000000 */ +#define ADC_SMPR2_SMP19 ADC_SMPR2_SMP19_Msk /*!< ADC Channel 19 Sampling time selection */ +#define ADC_SMPR2_SMP19_0 (0x1UL << ADC_SMPR2_SMP19_Pos) /*!< 0x08000000 */ +#define ADC_SMPR2_SMP19_1 (0x2UL << ADC_SMPR2_SMP19_Pos) /*!< 0x10000000 */ +#define ADC_SMPR2_SMP19_2 (0x4UL << ADC_SMPR2_SMP19_Pos) /*!< 0x20000000 */ + +/******************** Bit definition for ADC_PCSEL register ********************/ +#define ADC_PCSEL_PCSEL_Pos (0U) +#define ADC_PCSEL_PCSEL_Msk (0xFFFFFUL << ADC_PCSEL_PCSEL_Pos) /*!< 0x000FFFFF */ +#define ADC_PCSEL_PCSEL ADC_PCSEL_PCSEL_Msk /*!< ADC pre channel selection */ +#define ADC_PCSEL_PCSEL_0 (0x00001UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000001 */ +#define ADC_PCSEL_PCSEL_1 (0x00002UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000002 */ +#define ADC_PCSEL_PCSEL_2 (0x00004UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000004 */ +#define ADC_PCSEL_PCSEL_3 (0x00008UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000008 */ +#define ADC_PCSEL_PCSEL_4 (0x00010UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000010 */ +#define ADC_PCSEL_PCSEL_5 (0x00020UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000020 */ +#define ADC_PCSEL_PCSEL_6 (0x00040UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000040 */ +#define ADC_PCSEL_PCSEL_7 (0x00080UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000080 */ +#define ADC_PCSEL_PCSEL_8 (0x00100UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000100 */ +#define ADC_PCSEL_PCSEL_9 (0x00200UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000200 */ +#define ADC_PCSEL_PCSEL_10 (0x00400UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000400 */ +#define ADC_PCSEL_PCSEL_11 (0x00800UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000800 */ +#define ADC_PCSEL_PCSEL_12 (0x01000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00001000 */ +#define ADC_PCSEL_PCSEL_13 (0x02000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00002000 */ +#define ADC_PCSEL_PCSEL_14 (0x04000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00004000 */ +#define ADC_PCSEL_PCSEL_15 (0x08000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00008000 */ +#define ADC_PCSEL_PCSEL_16 (0x10000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00010000 */ +#define ADC_PCSEL_PCSEL_17 (0x20000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00020000 */ +#define ADC_PCSEL_PCSEL_18 (0x40000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00040000 */ +#define ADC_PCSEL_PCSEL_19 (0x80000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00080000 */ + +/***************** Bit definition for ADC_LTR1, 2, 3 registers *****************/ +#define ADC_LTR_LT_Pos (0U) +#define ADC_LTR_LT_Msk (0x3FFFFFFUL << ADC_LTR_LT_Pos) /*!< 0x03FFFFFF */ +#define ADC_LTR_LT ADC_LTR_LT_Msk /*!< ADC Analog watchdog 1, 2 and 3 lower threshold */ + +/***************** Bit definition for ADC_HTR1, 2, 3 registers ****************/ +#define ADC_HTR_HT_Pos (0U) +#define ADC_HTR_HT_Msk (0x3FFFFFFUL << ADC_HTR_HT_Pos) /*!< 0x03FFFFFF */ +#define ADC_HTR_HT ADC_HTR_HT_Msk /*!< ADC Analog watchdog 1,2 and 3 higher threshold */ + +/******************** Bit definition for ADC3_TR1 register *******************/ +#define ADC3_TR1_LT1_Pos (0U) +#define ADC3_TR1_LT1_Msk (0xFFFUL << ADC3_TR1_LT1_Pos) /*!< 0x00000FFF */ +#define ADC3_TR1_LT1 ADC3_TR1_LT1_Msk /*!< ADC analog watchdog 1 threshold low */ + +#define ADC3_TR1_AWDFILT_Pos (12U) +#define ADC3_TR1_AWDFILT_Msk (0x7UL << ADC3_TR1_AWDFILT_Pos) /*!< 0x00007000 */ +#define ADC3_TR1_AWDFILT ADC3_TR1_AWDFILT_Msk /*!< ADC analog watchdog filtering parameter */ +#define ADC3_TR1_AWDFILT_0 (0x1UL << ADC3_TR1_AWDFILT_Pos) /*!< 0x00001000 */ +#define ADC3_TR1_AWDFILT_1 (0x2UL << ADC3_TR1_AWDFILT_Pos) /*!< 0x00002000 */ +#define ADC3_TR1_AWDFILT_2 (0x4UL << ADC3_TR1_AWDFILT_Pos) /*!< 0x00004000 */ + +#define ADC3_TR1_HT1_Pos (16U) +#define ADC3_TR1_HT1_Msk (0xFFFUL << ADC3_TR1_HT1_Pos) /*!< 0x0FFF0000 */ +#define ADC3_TR1_HT1 ADC3_TR1_HT1_Msk /*!< ADC analog watchdog 1 threshold high */ + +/******************** Bit definition for ADC3_TR2 register *******************/ +#define ADC3_TR2_LT2_Pos (0U) +#define ADC3_TR2_LT2_Msk (0xFFUL << ADC3_TR2_LT2_Pos) /*!< 0x000000FF */ +#define ADC3_TR2_LT2 ADC3_TR2_LT2_Msk /*!< ADC analog watchdog 2 threshold low */ + +#define ADC3_TR2_HT2_Pos (16U) +#define ADC3_TR2_HT2_Msk (0xFFUL << ADC3_TR2_HT2_Pos) /*!< 0x00FF0000 */ +#define ADC3_TR2_HT2 ADC3_TR2_HT2_Msk /*!< ADC analog watchdog 2 threshold high */ + +/******************** Bit definition for ADC3_TR3 register *******************/ +#define ADC3_TR3_LT3_Pos (0U) +#define ADC3_TR3_LT3_Msk (0xFFUL << ADC3_TR3_LT3_Pos) /*!< 0x000000FF */ +#define ADC3_TR3_LT3 ADC3_TR3_LT3_Msk /*!< ADC analog watchdog 3 threshold low */ + +#define ADC3_TR3_HT3_Pos (16U) +#define ADC3_TR3_HT3_Msk (0xFFUL << ADC3_TR3_HT3_Pos) /*!< 0x00FF0000 */ +#define ADC3_TR3_HT3 ADC3_TR3_HT3_Msk /*!< ADC analog watchdog 3 threshold high */ + +/******************** Bit definition for ADC_SQR1 register ********************/ +#define ADC_SQR1_L_Pos (0U) +#define ADC_SQR1_L_Msk (0xFUL << ADC_SQR1_L_Pos) /*!< 0x0000000F */ +#define ADC_SQR1_L ADC_SQR1_L_Msk /*!< ADC regular channel sequence lenght */ +#define ADC_SQR1_L_0 (0x1UL << ADC_SQR1_L_Pos) /*!< 0x00000001 */ +#define ADC_SQR1_L_1 (0x2UL << ADC_SQR1_L_Pos) /*!< 0x00000002 */ +#define ADC_SQR1_L_2 (0x4UL << ADC_SQR1_L_Pos) /*!< 0x00000004 */ +#define ADC_SQR1_L_3 (0x8UL << ADC_SQR1_L_Pos) /*!< 0x00000008 */ + +#define ADC_SQR1_SQ1_Pos (6U) +#define ADC_SQR1_SQ1_Msk (0x1FUL << ADC_SQR1_SQ1_Pos) /*!< 0x000007C0 */ +#define ADC_SQR1_SQ1 ADC_SQR1_SQ1_Msk /*!< ADC 1st conversion in regular sequence */ +#define ADC_SQR1_SQ1_0 (0x01UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000040 */ +#define ADC_SQR1_SQ1_1 (0x02UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000080 */ +#define ADC_SQR1_SQ1_2 (0x04UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000100 */ +#define ADC_SQR1_SQ1_3 (0x08UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000200 */ +#define ADC_SQR1_SQ1_4 (0x10UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000400 */ + +#define ADC_SQR1_SQ2_Pos (12U) +#define ADC_SQR1_SQ2_Msk (0x1FUL << ADC_SQR1_SQ2_Pos) /*!< 0x0001F000 */ +#define ADC_SQR1_SQ2 ADC_SQR1_SQ2_Msk /*!< ADC 2nd conversion in regular sequence */ +#define ADC_SQR1_SQ2_0 (0x01UL << ADC_SQR1_SQ2_Pos) /*!< 0x00001000 */ +#define ADC_SQR1_SQ2_1 (0x02UL << ADC_SQR1_SQ2_Pos) /*!< 0x00002000 */ +#define ADC_SQR1_SQ2_2 (0x04UL << ADC_SQR1_SQ2_Pos) /*!< 0x00004000 */ +#define ADC_SQR1_SQ2_3 (0x08UL << ADC_SQR1_SQ2_Pos) /*!< 0x00008000 */ +#define ADC_SQR1_SQ2_4 (0x10UL << ADC_SQR1_SQ2_Pos) /*!< 0x00010000 */ + +#define ADC_SQR1_SQ3_Pos (18U) +#define ADC_SQR1_SQ3_Msk (0x1FUL << ADC_SQR1_SQ3_Pos) /*!< 0x007C0000 */ +#define ADC_SQR1_SQ3 ADC_SQR1_SQ3_Msk /*!< ADC 3rd conversion in regular sequence */ +#define ADC_SQR1_SQ3_0 (0x01UL << ADC_SQR1_SQ3_Pos) /*!< 0x00040000 */ +#define ADC_SQR1_SQ3_1 (0x02UL << ADC_SQR1_SQ3_Pos) /*!< 0x00080000 */ +#define ADC_SQR1_SQ3_2 (0x04UL << ADC_SQR1_SQ3_Pos) /*!< 0x00100000 */ +#define ADC_SQR1_SQ3_3 (0x08UL << ADC_SQR1_SQ3_Pos) /*!< 0x00200000 */ +#define ADC_SQR1_SQ3_4 (0x10UL << ADC_SQR1_SQ3_Pos) /*!< 0x00400000 */ + +#define ADC_SQR1_SQ4_Pos (24U) +#define ADC_SQR1_SQ4_Msk (0x1FUL << ADC_SQR1_SQ4_Pos) /*!< 0x1F000000 */ +#define ADC_SQR1_SQ4 ADC_SQR1_SQ4_Msk /*!< ADC 4th conversion in regular sequence */ +#define ADC_SQR1_SQ4_0 (0x01UL << ADC_SQR1_SQ4_Pos) /*!< 0x01000000 */ +#define ADC_SQR1_SQ4_1 (0x02UL << ADC_SQR1_SQ4_Pos) /*!< 0x02000000 */ +#define ADC_SQR1_SQ4_2 (0x04UL << ADC_SQR1_SQ4_Pos) /*!< 0x04000000 */ +#define ADC_SQR1_SQ4_3 (0x08UL << ADC_SQR1_SQ4_Pos) /*!< 0x08000000 */ +#define ADC_SQR1_SQ4_4 (0x10UL << ADC_SQR1_SQ4_Pos) /*!< 0x10000000 */ + +/******************** Bit definition for ADC_SQR2 register ********************/ +#define ADC_SQR2_SQ5_Pos (0U) +#define ADC_SQR2_SQ5_Msk (0x1FUL << ADC_SQR2_SQ5_Pos) /*!< 0x0000001F */ +#define ADC_SQR2_SQ5 ADC_SQR2_SQ5_Msk /*!< ADC 5th conversion in regular sequence */ +#define ADC_SQR2_SQ5_0 (0x01UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000001 */ +#define ADC_SQR2_SQ5_1 (0x02UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000002 */ +#define ADC_SQR2_SQ5_2 (0x04UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000004 */ +#define ADC_SQR2_SQ5_3 (0x08UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000008 */ +#define ADC_SQR2_SQ5_4 (0x10UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000010 */ + +#define ADC_SQR2_SQ6_Pos (6U) +#define ADC_SQR2_SQ6_Msk (0x1FUL << ADC_SQR2_SQ6_Pos) /*!< 0x000007C0 */ +#define ADC_SQR2_SQ6 ADC_SQR2_SQ6_Msk /*!< ADC 6th conversion in regular sequence */ +#define ADC_SQR2_SQ6_0 (0x01UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000040 */ +#define ADC_SQR2_SQ6_1 (0x02UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000080 */ +#define ADC_SQR2_SQ6_2 (0x04UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000100 */ +#define ADC_SQR2_SQ6_3 (0x08UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000200 */ +#define ADC_SQR2_SQ6_4 (0x10UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000400 */ + +#define ADC_SQR2_SQ7_Pos (12U) +#define ADC_SQR2_SQ7_Msk (0x1FUL << ADC_SQR2_SQ7_Pos) /*!< 0x0001F000 */ +#define ADC_SQR2_SQ7 ADC_SQR2_SQ7_Msk /*!< ADC 7th conversion in regular sequence */ +#define ADC_SQR2_SQ7_0 (0x01UL << ADC_SQR2_SQ7_Pos) /*!< 0x00001000 */ +#define ADC_SQR2_SQ7_1 (0x02UL << ADC_SQR2_SQ7_Pos) /*!< 0x00002000 */ +#define ADC_SQR2_SQ7_2 (0x04UL << ADC_SQR2_SQ7_Pos) /*!< 0x00004000 */ +#define ADC_SQR2_SQ7_3 (0x08UL << ADC_SQR2_SQ7_Pos) /*!< 0x00008000 */ +#define ADC_SQR2_SQ7_4 (0x10UL << ADC_SQR2_SQ7_Pos) /*!< 0x00010000 */ + +#define ADC_SQR2_SQ8_Pos (18U) +#define ADC_SQR2_SQ8_Msk (0x1FUL << ADC_SQR2_SQ8_Pos) /*!< 0x007C0000 */ +#define ADC_SQR2_SQ8 ADC_SQR2_SQ8_Msk /*!< ADC 8th conversion in regular sequence */ +#define ADC_SQR2_SQ8_0 (0x01UL << ADC_SQR2_SQ8_Pos) /*!< 0x00040000 */ +#define ADC_SQR2_SQ8_1 (0x02UL << ADC_SQR2_SQ8_Pos) /*!< 0x00080000 */ +#define ADC_SQR2_SQ8_2 (0x04UL << ADC_SQR2_SQ8_Pos) /*!< 0x00100000 */ +#define ADC_SQR2_SQ8_3 (0x08UL << ADC_SQR2_SQ8_Pos) /*!< 0x00200000 */ +#define ADC_SQR2_SQ8_4 (0x10UL << ADC_SQR2_SQ8_Pos) /*!< 0x00400000 */ + +#define ADC_SQR2_SQ9_Pos (24U) +#define ADC_SQR2_SQ9_Msk (0x1FUL << ADC_SQR2_SQ9_Pos) /*!< 0x1F000000 */ +#define ADC_SQR2_SQ9 ADC_SQR2_SQ9_Msk /*!< ADC 9th conversion in regular sequence */ +#define ADC_SQR2_SQ9_0 (0x01UL << ADC_SQR2_SQ9_Pos) /*!< 0x01000000 */ +#define ADC_SQR2_SQ9_1 (0x02UL << ADC_SQR2_SQ9_Pos) /*!< 0x02000000 */ +#define ADC_SQR2_SQ9_2 (0x04UL << ADC_SQR2_SQ9_Pos) /*!< 0x04000000 */ +#define ADC_SQR2_SQ9_3 (0x08UL << ADC_SQR2_SQ9_Pos) /*!< 0x08000000 */ +#define ADC_SQR2_SQ9_4 (0x10UL << ADC_SQR2_SQ9_Pos) /*!< 0x10000000 */ + +/******************** Bit definition for ADC_SQR3 register ********************/ +#define ADC_SQR3_SQ10_Pos (0U) +#define ADC_SQR3_SQ10_Msk (0x1FUL << ADC_SQR3_SQ10_Pos) /*!< 0x0000001F */ +#define ADC_SQR3_SQ10 ADC_SQR3_SQ10_Msk /*!< ADC 10th conversion in regular sequence */ +#define ADC_SQR3_SQ10_0 (0x01UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000001 */ +#define ADC_SQR3_SQ10_1 (0x02UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000002 */ +#define ADC_SQR3_SQ10_2 (0x04UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000004 */ +#define ADC_SQR3_SQ10_3 (0x08UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000008 */ +#define ADC_SQR3_SQ10_4 (0x10UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000010 */ + +#define ADC_SQR3_SQ11_Pos (6U) +#define ADC_SQR3_SQ11_Msk (0x1FUL << ADC_SQR3_SQ11_Pos) /*!< 0x000007C0 */ +#define ADC_SQR3_SQ11 ADC_SQR3_SQ11_Msk /*!< ADC 11th conversion in regular sequence */ +#define ADC_SQR3_SQ11_0 (0x01UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000040 */ +#define ADC_SQR3_SQ11_1 (0x02UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000080 */ +#define ADC_SQR3_SQ11_2 (0x04UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000100 */ +#define ADC_SQR3_SQ11_3 (0x08UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000200 */ +#define ADC_SQR3_SQ11_4 (0x10UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000400 */ + +#define ADC_SQR3_SQ12_Pos (12U) +#define ADC_SQR3_SQ12_Msk (0x1FUL << ADC_SQR3_SQ12_Pos) /*!< 0x0001F000 */ +#define ADC_SQR3_SQ12 ADC_SQR3_SQ12_Msk /*!< ADC 12th conversion in regular sequence */ +#define ADC_SQR3_SQ12_0 (0x01UL << ADC_SQR3_SQ12_Pos) /*!< 0x00001000 */ +#define ADC_SQR3_SQ12_1 (0x02UL << ADC_SQR3_SQ12_Pos) /*!< 0x00002000 */ +#define ADC_SQR3_SQ12_2 (0x04UL << ADC_SQR3_SQ12_Pos) /*!< 0x00004000 */ +#define ADC_SQR3_SQ12_3 (0x08UL << ADC_SQR3_SQ12_Pos) /*!< 0x00008000 */ +#define ADC_SQR3_SQ12_4 (0x10UL << ADC_SQR3_SQ12_Pos) /*!< 0x00010000 */ + +#define ADC_SQR3_SQ13_Pos (18U) +#define ADC_SQR3_SQ13_Msk (0x1FUL << ADC_SQR3_SQ13_Pos) /*!< 0x007C0000 */ +#define ADC_SQR3_SQ13 ADC_SQR3_SQ13_Msk /*!< ADC 13th conversion in regular sequence */ +#define ADC_SQR3_SQ13_0 (0x01UL << ADC_SQR3_SQ13_Pos) /*!< 0x00040000 */ +#define ADC_SQR3_SQ13_1 (0x02UL << ADC_SQR3_SQ13_Pos) /*!< 0x00080000 */ +#define ADC_SQR3_SQ13_2 (0x04UL << ADC_SQR3_SQ13_Pos) /*!< 0x00100000 */ +#define ADC_SQR3_SQ13_3 (0x08UL << ADC_SQR3_SQ13_Pos) /*!< 0x00200000 */ +#define ADC_SQR3_SQ13_4 (0x10UL << ADC_SQR3_SQ13_Pos) /*!< 0x00400000 */ + +#define ADC_SQR3_SQ14_Pos (24U) +#define ADC_SQR3_SQ14_Msk (0x1FUL << ADC_SQR3_SQ14_Pos) /*!< 0x1F000000 */ +#define ADC_SQR3_SQ14 ADC_SQR3_SQ14_Msk /*!< ADC 14th conversion in regular sequence */ +#define ADC_SQR3_SQ14_0 (0x01UL << ADC_SQR3_SQ14_Pos) /*!< 0x01000000 */ +#define ADC_SQR3_SQ14_1 (0x02UL << ADC_SQR3_SQ14_Pos) /*!< 0x02000000 */ +#define ADC_SQR3_SQ14_2 (0x04UL << ADC_SQR3_SQ14_Pos) /*!< 0x04000000 */ +#define ADC_SQR3_SQ14_3 (0x08UL << ADC_SQR3_SQ14_Pos) /*!< 0x08000000 */ +#define ADC_SQR3_SQ14_4 (0x10UL << ADC_SQR3_SQ14_Pos) /*!< 0x10000000 */ + +/******************** Bit definition for ADC_SQR4 register ********************/ +#define ADC_SQR4_SQ15_Pos (0U) +#define ADC_SQR4_SQ15_Msk (0x1FUL << ADC_SQR4_SQ15_Pos) /*!< 0x0000001F */ +#define ADC_SQR4_SQ15 ADC_SQR4_SQ15_Msk /*!< ADC 15th conversion in regular sequence */ +#define ADC_SQR4_SQ15_0 (0x01UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000001 */ +#define ADC_SQR4_SQ15_1 (0x02UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000002 */ +#define ADC_SQR4_SQ15_2 (0x04UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000004 */ +#define ADC_SQR4_SQ15_3 (0x08UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000008 */ +#define ADC_SQR4_SQ15_4 (0x10UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000010 */ + +#define ADC_SQR4_SQ16_Pos (6U) +#define ADC_SQR4_SQ16_Msk (0x1FUL << ADC_SQR4_SQ16_Pos) /*!< 0x000007C0 */ +#define ADC_SQR4_SQ16 ADC_SQR4_SQ16_Msk /*!< ADC 16th conversion in regular sequence */ +#define ADC_SQR4_SQ16_0 (0x01UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000040 */ +#define ADC_SQR4_SQ16_1 (0x02UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000080 */ +#define ADC_SQR4_SQ16_2 (0x04UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000100 */ +#define ADC_SQR4_SQ16_3 (0x08UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000200 */ +#define ADC_SQR4_SQ16_4 (0x10UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000400 */ +/******************** Bit definition for ADC_DR register ********************/ +#define ADC_DR_RDATA_Pos (0U) +#define ADC_DR_RDATA_Msk (0xFFFFFFFFUL << ADC_DR_RDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_DR_RDATA ADC_DR_RDATA_Msk /*!< ADC regular Data converted */ + +/******************** Bit definition for ADC_JSQR register ********************/ +#define ADC_JSQR_JL_Pos (0U) +#define ADC_JSQR_JL_Msk (0x3UL << ADC_JSQR_JL_Pos) /*!< 0x00000003 */ +#define ADC_JSQR_JL ADC_JSQR_JL_Msk /*!< ADC injected channel sequence length */ +#define ADC_JSQR_JL_0 (0x1UL << ADC_JSQR_JL_Pos) /*!< 0x00000001 */ +#define ADC_JSQR_JL_1 (0x2UL << ADC_JSQR_JL_Pos) /*!< 0x00000002 */ + +#define ADC_JSQR_JEXTSEL_Pos (2U) +#define ADC_JSQR_JEXTSEL_Msk (0x1FUL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x0000007C */ +#define ADC_JSQR_JEXTSEL ADC_JSQR_JEXTSEL_Msk /*!< ADC external trigger selection for injected group */ +#define ADC_JSQR_JEXTSEL_0 (0x01UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000004 */ +#define ADC_JSQR_JEXTSEL_1 (0x02UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000008 */ +#define ADC_JSQR_JEXTSEL_2 (0x04UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000010 */ +#define ADC_JSQR_JEXTSEL_3 (0x08UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000020 */ +#define ADC_JSQR_JEXTSEL_4 (0x10UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000040 */ + +#define ADC_JSQR_JEXTEN_Pos (7U) +#define ADC_JSQR_JEXTEN_Msk (0x3UL << ADC_JSQR_JEXTEN_Pos) /*!< 0x00000180 */ +#define ADC_JSQR_JEXTEN ADC_JSQR_JEXTEN_Msk /*!< ADC external trigger enable and polarity selection for injected channels */ +#define ADC_JSQR_JEXTEN_0 (0x1UL << ADC_JSQR_JEXTEN_Pos) /*!< 0x00000080 */ +#define ADC_JSQR_JEXTEN_1 (0x2UL << ADC_JSQR_JEXTEN_Pos) /*!< 0x00000100 */ + +#define ADC_JSQR_JSQ1_Pos (9U) +#define ADC_JSQR_JSQ1_Msk (0x1FUL << ADC_JSQR_JSQ1_Pos) /*!< 0x00003E00 */ +#define ADC_JSQR_JSQ1 ADC_JSQR_JSQ1_Msk /*!< ADC 1st conversion in injected sequence */ +#define ADC_JSQR_JSQ1_0 (0x01UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00000200 */ +#define ADC_JSQR_JSQ1_1 (0x02UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00000400 */ +#define ADC_JSQR_JSQ1_2 (0x04UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00000800 */ +#define ADC_JSQR_JSQ1_3 (0x08UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00001000 */ +#define ADC_JSQR_JSQ1_4 (0x10UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00002000 */ + +#define ADC_JSQR_JSQ2_Pos (15U) +#define ADC_JSQR_JSQ2_Msk (0x1FUL << ADC_JSQR_JSQ2_Pos) /*!< 0x000F8000 */ +#define ADC_JSQR_JSQ2 ADC_JSQR_JSQ2_Msk /*!< ADC 2nd conversion in injected sequence */ +#define ADC_JSQR_JSQ2_0 (0x01UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00008000 */ +#define ADC_JSQR_JSQ2_1 (0x02UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00010000 */ +#define ADC_JSQR_JSQ2_2 (0x04UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00020000 */ +#define ADC_JSQR_JSQ2_3 (0x08UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00040000 */ +#define ADC_JSQR_JSQ2_4 (0x10UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00080000 */ + +#define ADC_JSQR_JSQ3_Pos (21U) +#define ADC_JSQR_JSQ3_Msk (0x1FUL << ADC_JSQR_JSQ3_Pos) /*!< 0x03E00000 */ +#define ADC_JSQR_JSQ3 ADC_JSQR_JSQ3_Msk /*!< ADC 3rd conversion in injected sequence */ +#define ADC_JSQR_JSQ3_0 (0x01UL << ADC_JSQR_JSQ3_Pos) /*!< 0x00200000 */ +#define ADC_JSQR_JSQ3_1 (0x02UL << ADC_JSQR_JSQ3_Pos) /*!< 0x00400000 */ +#define ADC_JSQR_JSQ3_2 (0x04UL << ADC_JSQR_JSQ3_Pos) /*!< 0x00800000 */ +#define ADC_JSQR_JSQ3_3 (0x08UL << ADC_JSQR_JSQ3_Pos) /*!< 0x01000000 */ +#define ADC_JSQR_JSQ3_4 (0x10UL << ADC_JSQR_JSQ3_Pos) /*!< 0x02000000 */ + +#define ADC_JSQR_JSQ4_Pos (27U) +#define ADC_JSQR_JSQ4_Msk (0x1FUL << ADC_JSQR_JSQ4_Pos) /*!< 0xF8000000 */ +#define ADC_JSQR_JSQ4 ADC_JSQR_JSQ4_Msk /*!< ADC 4th conversion in injected sequence */ +#define ADC_JSQR_JSQ4_0 (0x01UL << ADC_JSQR_JSQ4_Pos) /*!< 0x08000000 */ +#define ADC_JSQR_JSQ4_1 (0x02UL << ADC_JSQR_JSQ4_Pos) /*!< 0x10000000 */ +#define ADC_JSQR_JSQ4_2 (0x04UL << ADC_JSQR_JSQ4_Pos) /*!< 0x20000000 */ +#define ADC_JSQR_JSQ4_3 (0x08UL << ADC_JSQR_JSQ4_Pos) /*!< 0x40000000 */ +#define ADC_JSQR_JSQ4_4 (0x10UL << ADC_JSQR_JSQ4_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_OFR1 register ********************/ +#define ADC_OFR1_OFFSET1_Pos (0U) +#define ADC_OFR1_OFFSET1_Msk (0x3FFFFFFUL << ADC_OFR1_OFFSET1_Pos) /*!< 0x03FFFFFF */ +#define ADC_OFR1_OFFSET1 ADC_OFR1_OFFSET1_Msk /*!< ADC data offset 1 for channel programmed into bits OFFSET1_CH[4:0] */ +#define ADC_OFR1_OFFSET1_0 (0x0000001UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000001 */ +#define ADC_OFR1_OFFSET1_1 (0x0000002UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000002 */ +#define ADC_OFR1_OFFSET1_2 (0x0000004UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000004 */ +#define ADC_OFR1_OFFSET1_3 (0x0000008UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000008 */ +#define ADC_OFR1_OFFSET1_4 (0x0000010UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000010 */ +#define ADC_OFR1_OFFSET1_5 (0x0000020UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000020 */ +#define ADC_OFR1_OFFSET1_6 (0x0000040UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000040 */ +#define ADC_OFR1_OFFSET1_7 (0x0000080UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000080 */ +#define ADC_OFR1_OFFSET1_8 (0x0000100UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000100 */ +#define ADC_OFR1_OFFSET1_9 (0x0000200UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000200 */ +#define ADC_OFR1_OFFSET1_10 (0x0000400UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000400 */ +#define ADC_OFR1_OFFSET1_11 (0x0000800UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000800 */ +#define ADC_OFR1_OFFSET1_12 (0x0001000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00001000 */ +#define ADC_OFR1_OFFSET1_13 (0x0002000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00002000 */ +#define ADC_OFR1_OFFSET1_14 (0x0004000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00004000 */ +#define ADC_OFR1_OFFSET1_15 (0x0008000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00008000 */ +#define ADC_OFR1_OFFSET1_16 (0x0010000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00010000 */ +#define ADC_OFR1_OFFSET1_17 (0x0020000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00020000 */ +#define ADC_OFR1_OFFSET1_18 (0x0040000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00040000 */ +#define ADC_OFR1_OFFSET1_19 (0x0080000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00080000 */ +#define ADC_OFR1_OFFSET1_20 (0x0100000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00100000 */ +#define ADC_OFR1_OFFSET1_21 (0x0200000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00200000 */ +#define ADC_OFR1_OFFSET1_22 (0x0400000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00400000 */ +#define ADC_OFR1_OFFSET1_23 (0x0800000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00800000 */ +#define ADC_OFR1_OFFSET1_24 (0x1000000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x01000000 */ +#define ADC_OFR1_OFFSET1_25 (0x2000000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x02000000 */ + +#define ADC_OFR1_OFFSET1_CH_Pos (26U) +#define ADC_OFR1_OFFSET1_CH_Msk (0x1FUL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR1_OFFSET1_CH ADC_OFR1_OFFSET1_CH_Msk /*!< ADC Channel selection for the data offset 1 */ +#define ADC_OFR1_OFFSET1_CH_0 (0x01UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR1_OFFSET1_CH_1 (0x02UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR1_OFFSET1_CH_2 (0x04UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR1_OFFSET1_CH_3 (0x08UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR1_OFFSET1_CH_4 (0x10UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR1_SSATE_Pos (31U) +#define ADC_OFR1_SSATE_Msk (0x1UL << ADC_OFR1_SSATE_Pos) /*!< 0x80000000 */ +#define ADC_OFR1_SSATE ADC_OFR1_SSATE_Msk /*!< ADC Signed saturation Enable */ + +#define ADC3_OFR1_OFFSET1_Pos (0U) +#define ADC3_OFR1_OFFSET1_Msk (0xFFFUL << ADC3_OFR1_OFFSET1_Pos) /*!< 0x00000FFF */ +#define ADC3_OFR1_OFFSET1 ADC3_OFR1_OFFSET1_Msk /*!< ADC data offset 1 for channel programmed into bits OFFSET1_CH[4:0] */ + +#define ADC3_OFR1_OFFSETPOS_Pos (24U) +#define ADC3_OFR1_OFFSETPOS_Msk (0x1UL << ADC3_OFR1_OFFSETPOS_Pos) /*!< 0x01000000 */ +#define ADC3_OFR1_OFFSETPOS ADC3_OFR1_OFFSETPOS_Msk /*!< ADC offset number 1 positive */ +#define ADC3_OFR1_SATEN_Pos (25U) +#define ADC3_OFR1_SATEN_Msk (0x1UL << ADC3_OFR1_SATEN_Pos) /*!< 0x02000000 */ +#define ADC3_OFR1_SATEN ADC3_OFR1_SATEN_Msk /*!< ADC offset number 1 saturation enable */ + +#define ADC3_OFR1_OFFSET1_EN_Pos (31U) +#define ADC3_OFR1_OFFSET1_EN_Msk (0x1UL << ADC3_OFR1_OFFSET1_EN_Pos) /*!< 0x80000000 */ +#define ADC3_OFR1_OFFSET1_EN ADC3_OFR1_OFFSET1_EN_Msk /*!< ADC offset number 1 enable */ + +/******************** Bit definition for ADC_OFR2 register ********************/ +#define ADC_OFR2_OFFSET2_Pos (0U) +#define ADC_OFR2_OFFSET2_Msk (0x3FFFFFFUL << ADC_OFR2_OFFSET2_Pos) /*!< 0x03FFFFFF */ +#define ADC_OFR2_OFFSET2 ADC_OFR2_OFFSET2_Msk /*!< ADC data offset 2 for channel programmed into bits OFFSET2_CH[4:0] */ +#define ADC_OFR2_OFFSET2_0 (0x0000001UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000001 */ +#define ADC_OFR2_OFFSET2_1 (0x0000002UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000002 */ +#define ADC_OFR2_OFFSET2_2 (0x0000004UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000004 */ +#define ADC_OFR2_OFFSET2_3 (0x0000008UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000008 */ +#define ADC_OFR2_OFFSET2_4 (0x0000010UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000010 */ +#define ADC_OFR2_OFFSET2_5 (0x0000020UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000020 */ +#define ADC_OFR2_OFFSET2_6 (0x0000040UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000040 */ +#define ADC_OFR2_OFFSET2_7 (0x0000080UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000080 */ +#define ADC_OFR2_OFFSET2_8 (0x0000100UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000100 */ +#define ADC_OFR2_OFFSET2_9 (0x0000200UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000200 */ +#define ADC_OFR2_OFFSET2_10 (0x0000400UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000400 */ +#define ADC_OFR2_OFFSET2_11 (0x0000800UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000800 */ +#define ADC_OFR2_OFFSET2_12 (0x0001000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00001000 */ +#define ADC_OFR2_OFFSET2_13 (0x0002000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00002000 */ +#define ADC_OFR2_OFFSET2_14 (0x0004000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00004000 */ +#define ADC_OFR2_OFFSET2_15 (0x0008000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00008000 */ +#define ADC_OFR2_OFFSET2_16 (0x0010000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00010000 */ +#define ADC_OFR2_OFFSET2_17 (0x0020000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00020000 */ +#define ADC_OFR2_OFFSET2_18 (0x0040000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00040000 */ +#define ADC_OFR2_OFFSET2_19 (0x0080000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00080000 */ +#define ADC_OFR2_OFFSET2_20 (0x0100000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00100000 */ +#define ADC_OFR2_OFFSET2_21 (0x0200000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00200000 */ +#define ADC_OFR2_OFFSET2_22 (0x0400000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00400000 */ +#define ADC_OFR2_OFFSET2_23 (0x0800000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00800000 */ +#define ADC_OFR2_OFFSET2_24 (0x1000000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x01000000 */ +#define ADC_OFR2_OFFSET2_25 (0x2000000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x02000000 */ + +#define ADC_OFR2_OFFSET2_CH_Pos (26U) +#define ADC_OFR2_OFFSET2_CH_Msk (0x1FUL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR2_OFFSET2_CH ADC_OFR2_OFFSET2_CH_Msk /*!< ADC Channel selection for the data offset 2 */ +#define ADC_OFR2_OFFSET2_CH_0 (0x01UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR2_OFFSET2_CH_1 (0x02UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR2_OFFSET2_CH_2 (0x04UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR2_OFFSET2_CH_3 (0x08UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR2_OFFSET2_CH_4 (0x10UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR2_SSATE_Pos (31U) +#define ADC_OFR2_SSATE_Msk (0x1UL << ADC_OFR2_SSATE_Pos) /*!< 0x80000000 */ +#define ADC_OFR2_SSATE ADC_OFR2_SSATE_Msk /*!< ADC Signed saturation Enable */ + +#define ADC3_OFR2_OFFSET2_Pos (0U) +#define ADC3_OFR2_OFFSET2_Msk (0xFFFUL << ADC3_OFR2_OFFSET2_Pos) /*!< 0x00000FFF */ +#define ADC3_OFR2_OFFSET2 ADC3_OFR2_OFFSET2_Msk /*!< ADC data offset 2 for channel programmed into bits OFFSET1_CH[4:0] */ + +#define ADC3_OFR2_OFFSETPOS_Pos (24U) +#define ADC3_OFR2_OFFSETPOS_Msk (0x1UL << ADC3_OFR2_OFFSETPOS_Pos) /*!< 0x01000000 */ +#define ADC3_OFR2_OFFSETPOS ADC3_OFR2_OFFSETPOS_Msk /*!< ADC offset number 2 positive */ +#define ADC3_OFR2_SATEN_Pos (25U) +#define ADC3_OFR2_SATEN_Msk (0x1UL << ADC3_OFR2_SATEN_Pos) /*!< 0x02000000 */ +#define ADC3_OFR2_SATEN ADC3_OFR2_SATEN_Msk /*!< ADC offset number 2 saturation enable */ + +#define ADC3_OFR2_OFFSET2_EN_Pos (31U) +#define ADC3_OFR2_OFFSET2_EN_Msk (0x1UL << ADC3_OFR2_OFFSET2_EN_Pos) /*!< 0x80000000 */ +#define ADC3_OFR2_OFFSET2_EN ADC3_OFR2_OFFSET2_EN_Msk /*!< ADC offset number 2 enable */ + +/******************** Bit definition for ADC_OFR3 register ********************/ +#define ADC_OFR3_OFFSET3_Pos (0U) +#define ADC_OFR3_OFFSET3_Msk (0x3FFFFFFUL << ADC_OFR3_OFFSET3_Pos) /*!< 0x03FFFFFF */ +#define ADC_OFR3_OFFSET3 ADC_OFR3_OFFSET3_Msk /*!< ADC data offset 3 for channel programmed into bits OFFSET3_CH[4:0] */ +#define ADC_OFR3_OFFSET3_0 (0x0000001UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000001 */ +#define ADC_OFR3_OFFSET3_1 (0x0000002UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000002 */ +#define ADC_OFR3_OFFSET3_2 (0x0000004UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000004 */ +#define ADC_OFR3_OFFSET3_3 (0x0000008UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000008 */ +#define ADC_OFR3_OFFSET3_4 (0x0000010UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000010 */ +#define ADC_OFR3_OFFSET3_5 (0x0000020UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000020 */ +#define ADC_OFR3_OFFSET3_6 (0x0000040UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000040 */ +#define ADC_OFR3_OFFSET3_7 (0x0000080UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000080 */ +#define ADC_OFR3_OFFSET3_8 (0x0000100UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000100 */ +#define ADC_OFR3_OFFSET3_9 (0x0000200UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000200 */ +#define ADC_OFR3_OFFSET3_10 (0x0000400UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000400 */ +#define ADC_OFR3_OFFSET3_11 (0x0000800UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000800 */ +#define ADC_OFR3_OFFSET3_12 (0x0001000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00001000 */ +#define ADC_OFR3_OFFSET3_13 (0x0002000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00002000 */ +#define ADC_OFR3_OFFSET3_14 (0x0004000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00004000 */ +#define ADC_OFR3_OFFSET3_15 (0x0008000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00008000 */ +#define ADC_OFR3_OFFSET3_16 (0x0010000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00010000 */ +#define ADC_OFR3_OFFSET3_17 (0x0020000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00020000 */ +#define ADC_OFR3_OFFSET3_18 (0x0040000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00040000 */ +#define ADC_OFR3_OFFSET3_19 (0x0080000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00080000 */ +#define ADC_OFR3_OFFSET3_20 (0x0100000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00100000 */ +#define ADC_OFR3_OFFSET3_21 (0x0200000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00200000 */ +#define ADC_OFR3_OFFSET3_22 (0x0400000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00400000 */ +#define ADC_OFR3_OFFSET3_23 (0x0800000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00800000 */ +#define ADC_OFR3_OFFSET3_24 (0x1000000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x01000000 */ +#define ADC_OFR3_OFFSET3_25 (0x2000000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x02000000 */ + +#define ADC_OFR3_OFFSET3_CH_Pos (26U) +#define ADC_OFR3_OFFSET3_CH_Msk (0x1FUL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR3_OFFSET3_CH ADC_OFR3_OFFSET3_CH_Msk /*!< ADC Channel selection for the data offset 3 */ +#define ADC_OFR3_OFFSET3_CH_0 (0x01UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR3_OFFSET3_CH_1 (0x02UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR3_OFFSET3_CH_2 (0x04UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR3_OFFSET3_CH_3 (0x08UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR3_OFFSET3_CH_4 (0x10UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR3_SSATE_Pos (31U) +#define ADC_OFR3_SSATE_Msk (0x1UL << ADC_OFR3_SSATE_Pos) /*!< 0x80000000 */ +#define ADC_OFR3_SSATE ADC_OFR3_SSATE_Msk /*!< ADC Signed saturation Enable */ + +#define ADC3_OFR3_OFFSET3_Pos (0U) +#define ADC3_OFR3_OFFSET3_Msk (0xFFFUL << ADC3_OFR3_OFFSET3_Pos) /*!< 0x00000FFF */ +#define ADC3_OFR3_OFFSET3 ADC3_OFR3_OFFSET3_Msk /*!< ADC data offset 3 for channel programmed into bits OFFSET1_CH[4:0] */ + +#define ADC3_OFR3_OFFSETPOS_Pos (24U) +#define ADC3_OFR3_OFFSETPOS_Msk (0x1UL << ADC3_OFR3_OFFSETPOS_Pos) /*!< 0x01000000 */ +#define ADC3_OFR3_OFFSETPOS ADC3_OFR3_OFFSETPOS_Msk /*!< ADC offset number 3 positive */ +#define ADC3_OFR3_SATEN_Pos (25U) +#define ADC3_OFR3_SATEN_Msk (0x1UL << ADC3_OFR3_SATEN_Pos) /*!< 0x02000000 */ +#define ADC3_OFR3_SATEN ADC3_OFR3_SATEN_Msk /*!< ADC offset number 3 saturation enable */ + +#define ADC3_OFR3_OFFSET3_EN_Pos (31U) +#define ADC3_OFR3_OFFSET3_EN_Msk (0x1UL << ADC3_OFR3_OFFSET3_EN_Pos) /*!< 0x80000000 */ +#define ADC3_OFR3_OFFSET3_EN ADC3_OFR3_OFFSET3_EN_Msk /*!< ADC offset number 3 enable */ + +/******************** Bit definition for ADC_OFR4 register ********************/ +#define ADC_OFR4_OFFSET4_Pos (0U) +#define ADC_OFR4_OFFSET4_Msk (0x3FFFFFFUL << ADC_OFR4_OFFSET4_Pos) /*!< 0x03FFFFFF */ +#define ADC_OFR4_OFFSET4 ADC_OFR4_OFFSET4_Msk /*!< ADC data offset 4 for channel programmed into bits OFFSET4_CH[4:0] */ +#define ADC_OFR4_OFFSET4_0 (0x0000001UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000001 */ +#define ADC_OFR4_OFFSET4_1 (0x0000002UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000002 */ +#define ADC_OFR4_OFFSET4_2 (0x0000004UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000004 */ +#define ADC_OFR4_OFFSET4_3 (0x0000008UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000008 */ +#define ADC_OFR4_OFFSET4_4 (0x0000010UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000010 */ +#define ADC_OFR4_OFFSET4_5 (0x0000020UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000020 */ +#define ADC_OFR4_OFFSET4_6 (0x0000040UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000040 */ +#define ADC_OFR4_OFFSET4_7 (0x0000080UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000080 */ +#define ADC_OFR4_OFFSET4_8 (0x0000100UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000100 */ +#define ADC_OFR4_OFFSET4_9 (0x0000200UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000200 */ +#define ADC_OFR4_OFFSET4_10 (0x0000400UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000400 */ +#define ADC_OFR4_OFFSET4_11 (0x0000800UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000800 */ +#define ADC_OFR4_OFFSET4_12 (0x0001000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00001000 */ +#define ADC_OFR4_OFFSET4_13 (0x0002000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00002000 */ +#define ADC_OFR4_OFFSET4_14 (0x0004000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00004000 */ +#define ADC_OFR4_OFFSET4_15 (0x0008000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00008000 */ +#define ADC_OFR4_OFFSET4_16 (0x0010000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00010000 */ +#define ADC_OFR4_OFFSET4_17 (0x0020000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00020000 */ +#define ADC_OFR4_OFFSET4_18 (0x0040000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00040000 */ +#define ADC_OFR4_OFFSET4_19 (0x0080000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00080000 */ +#define ADC_OFR4_OFFSET4_20 (0x0100000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00100000 */ +#define ADC_OFR4_OFFSET4_21 (0x0200000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00200000 */ +#define ADC_OFR4_OFFSET4_22 (0x0400000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00400000 */ +#define ADC_OFR4_OFFSET4_23 (0x0800000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00800000 */ +#define ADC_OFR4_OFFSET4_24 (0x1000000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x01000000 */ +#define ADC_OFR4_OFFSET4_25 (0x2000000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x02000000 */ + +#define ADC_OFR4_OFFSET4_CH_Pos (26U) +#define ADC_OFR4_OFFSET4_CH_Msk (0x1FUL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR4_OFFSET4_CH ADC_OFR4_OFFSET4_CH_Msk /*!< ADC Channel selection for the data offset 4 */ +#define ADC_OFR4_OFFSET4_CH_0 (0x01UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR4_OFFSET4_CH_1 (0x02UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR4_OFFSET4_CH_2 (0x04UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR4_OFFSET4_CH_3 (0x08UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR4_OFFSET4_CH_4 (0x10UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR4_SSATE_Pos (31U) +#define ADC_OFR4_SSATE_Msk (0x1UL << ADC_OFR4_SSATE_Pos) /*!< 0x80000000 */ +#define ADC_OFR4_SSATE ADC_OFR4_SSATE_Msk /*!< ADC Signed saturation Enable */ + +#define ADC3_OFR4_OFFSET4_Pos (0U) +#define ADC3_OFR4_OFFSET4_Msk (0xFFFUL << ADC3_OFR4_OFFSET4_Pos) /*!< 0x00000FFF */ +#define ADC3_OFR4_OFFSET4 ADC3_OFR4_OFFSET4_Msk /*!< ADC data offset 4 for channel programmed into bits OFFSET1_CH[4:0] */ + +#define ADC3_OFR4_OFFSETPOS_Pos (24U) +#define ADC3_OFR4_OFFSETPOS_Msk (0x1UL << ADC3_OFR4_OFFSETPOS_Pos) /*!< 0x01000000 */ +#define ADC3_OFR4_OFFSETPOS ADC3_OFR4_OFFSETPOS_Msk /*!< ADC offset number 4 positive */ +#define ADC3_OFR4_SATEN_Pos (25U) +#define ADC3_OFR4_SATEN_Msk (0x1UL << ADC3_OFR4_SATEN_Pos) /*!< 0x02000000 */ +#define ADC3_OFR4_SATEN ADC3_OFR4_SATEN_Msk /*!< ADC offset number 4 saturation enable */ + +#define ADC3_OFR4_OFFSET4_EN_Pos (31U) +#define ADC3_OFR4_OFFSET4_EN_Msk (0x1UL << ADC3_OFR4_OFFSET4_EN_Pos) /*!< 0x80000000 */ +#define ADC3_OFR4_OFFSET4_EN ADC3_OFR4_OFFSET4_EN_Msk /*!< ADC offset number 4 enable */ + +/******************** Bit definition for ADC_JDR1 register ********************/ +#define ADC_JDR1_JDATA_Pos (0U) +#define ADC_JDR1_JDATA_Msk (0xFFFFFFFFUL << ADC_JDR1_JDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_JDR1_JDATA ADC_JDR1_JDATA_Msk /*!< ADC Injected DATA */ +#define ADC_JDR1_JDATA_0 (0x00000001UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR1_JDATA_1 (0x00000002UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR1_JDATA_2 (0x00000004UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR1_JDATA_3 (0x00000008UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR1_JDATA_4 (0x00000010UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR1_JDATA_5 (0x00000020UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR1_JDATA_6 (0x00000040UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR1_JDATA_7 (0x00000080UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR1_JDATA_8 (0x00000100UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR1_JDATA_9 (0x00000200UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR1_JDATA_10 (0x00000400UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR1_JDATA_11 (0x00000800UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR1_JDATA_12 (0x00001000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR1_JDATA_13 (0x00002000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR1_JDATA_14 (0x00004000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR1_JDATA_15 (0x00008000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00008000 */ +#define ADC_JDR1_JDATA_16 (0x00010000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00010000 */ +#define ADC_JDR1_JDATA_17 (0x00020000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00020000 */ +#define ADC_JDR1_JDATA_18 (0x00040000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00040000 */ +#define ADC_JDR1_JDATA_19 (0x00080000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00080000 */ +#define ADC_JDR1_JDATA_20 (0x00100000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00100000 */ +#define ADC_JDR1_JDATA_21 (0x00200000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00200000 */ +#define ADC_JDR1_JDATA_22 (0x00400000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00400000 */ +#define ADC_JDR1_JDATA_23 (0x00800000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00800000 */ +#define ADC_JDR1_JDATA_24 (0x01000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x01000000 */ +#define ADC_JDR1_JDATA_25 (0x02000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x02000000 */ +#define ADC_JDR1_JDATA_26 (0x04000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x04000000 */ +#define ADC_JDR1_JDATA_27 (0x08000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x08000000 */ +#define ADC_JDR1_JDATA_28 (0x10000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x10000000 */ +#define ADC_JDR1_JDATA_29 (0x20000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x20000000 */ +#define ADC_JDR1_JDATA_30 (0x40000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x40000000 */ +#define ADC_JDR1_JDATA_31 (0x80000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_JDR2 register ********************/ +#define ADC_JDR2_JDATA_Pos (0U) +#define ADC_JDR2_JDATA_Msk (0xFFFFFFFFUL << ADC_JDR2_JDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_JDR2_JDATA ADC_JDR2_JDATA_Msk /*!< ADC Injected DATA */ +#define ADC_JDR2_JDATA_0 (0x00000001UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR2_JDATA_1 (0x00000002UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR2_JDATA_2 (0x00000004UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR2_JDATA_3 (0x00000008UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR2_JDATA_4 (0x00000010UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR2_JDATA_5 (0x00000020UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR2_JDATA_6 (0x00000040UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR2_JDATA_7 (0x00000080UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR2_JDATA_8 (0x00000100UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR2_JDATA_9 (0x00000200UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR2_JDATA_10 (0x00000400UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR2_JDATA_11 (0x00000800UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR2_JDATA_12 (0x00001000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR2_JDATA_13 (0x00002000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR2_JDATA_14 (0x00004000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR2_JDATA_15 (0x00008000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00008000 */ +#define ADC_JDR2_JDATA_16 (0x00010000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00010000 */ +#define ADC_JDR2_JDATA_17 (0x00020000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00020000 */ +#define ADC_JDR2_JDATA_18 (0x00040000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00040000 */ +#define ADC_JDR2_JDATA_19 (0x00080000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00080000 */ +#define ADC_JDR2_JDATA_20 (0x00100000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00100000 */ +#define ADC_JDR2_JDATA_21 (0x00200000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00200000 */ +#define ADC_JDR2_JDATA_22 (0x00400000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00400000 */ +#define ADC_JDR2_JDATA_23 (0x00800000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00800000 */ +#define ADC_JDR2_JDATA_24 (0x01000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x01000000 */ +#define ADC_JDR2_JDATA_25 (0x02000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x02000000 */ +#define ADC_JDR2_JDATA_26 (0x04000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x04000000 */ +#define ADC_JDR2_JDATA_27 (0x08000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x08000000 */ +#define ADC_JDR2_JDATA_28 (0x10000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x10000000 */ +#define ADC_JDR2_JDATA_29 (0x20000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x20000000 */ +#define ADC_JDR2_JDATA_30 (0x40000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x40000000 */ +#define ADC_JDR2_JDATA_31 (0x80000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_JDR3 register ********************/ +#define ADC_JDR3_JDATA_Pos (0U) +#define ADC_JDR3_JDATA_Msk (0xFFFFFFFFUL << ADC_JDR3_JDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_JDR3_JDATA ADC_JDR3_JDATA_Msk /*!< ADC Injected DATA */ +#define ADC_JDR3_JDATA_0 (0x00000001UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR3_JDATA_1 (0x00000002UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR3_JDATA_2 (0x00000004UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR3_JDATA_3 (0x00000008UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR3_JDATA_4 (0x00000010UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR3_JDATA_5 (0x00000020UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR3_JDATA_6 (0x00000040UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR3_JDATA_7 (0x00000080UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR3_JDATA_8 (0x00000100UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR3_JDATA_9 (0x00000200UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR3_JDATA_10 (0x00000400UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR3_JDATA_11 (0x00000800UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR3_JDATA_12 (0x00001000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR3_JDATA_13 (0x00002000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR3_JDATA_14 (0x00004000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR3_JDATA_15 (0x00008000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00008000 */ +#define ADC_JDR3_JDATA_16 (0x00010000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00010000 */ +#define ADC_JDR3_JDATA_17 (0x00020000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00020000 */ +#define ADC_JDR3_JDATA_18 (0x00040000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00040000 */ +#define ADC_JDR3_JDATA_19 (0x00080000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00080000 */ +#define ADC_JDR3_JDATA_20 (0x00100000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00100000 */ +#define ADC_JDR3_JDATA_21 (0x00200000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00200000 */ +#define ADC_JDR3_JDATA_22 (0x00400000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00400000 */ +#define ADC_JDR3_JDATA_23 (0x00800000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00800000 */ +#define ADC_JDR3_JDATA_24 (0x01000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x01000000 */ +#define ADC_JDR3_JDATA_25 (0x02000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x02000000 */ +#define ADC_JDR3_JDATA_26 (0x04000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x04000000 */ +#define ADC_JDR3_JDATA_27 (0x08000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x08000000 */ +#define ADC_JDR3_JDATA_28 (0x10000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x10000000 */ +#define ADC_JDR3_JDATA_29 (0x20000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x20000000 */ +#define ADC_JDR3_JDATA_30 (0x40000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x40000000 */ +#define ADC_JDR3_JDATA_31 (0x80000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_JDR4 register ********************/ +#define ADC_JDR4_JDATA_Pos (0U) +#define ADC_JDR4_JDATA_Msk (0xFFFFFFFFUL << ADC_JDR4_JDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_JDR4_JDATA ADC_JDR4_JDATA_Msk /*!< ADC Injected DATA */ +#define ADC_JDR4_JDATA_0 (0x00000001UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR4_JDATA_1 (0x00000002UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR4_JDATA_2 (0x00000004UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR4_JDATA_3 (0x00000008UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR4_JDATA_4 (0x00000010UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR4_JDATA_5 (0x00000020UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR4_JDATA_6 (0x00000040UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR4_JDATA_7 (0x00000080UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR4_JDATA_8 (0x00000100UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR4_JDATA_9 (0x00000200UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR4_JDATA_10 (0x00000400UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR4_JDATA_11 (0x00000800UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR4_JDATA_12 (0x00001000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR4_JDATA_13 (0x00002000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR4_JDATA_14 (0x00004000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR4_JDATA_15 (0x00008000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00008000 */ +#define ADC_JDR4_JDATA_16 (0x00010000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00010000 */ +#define ADC_JDR4_JDATA_17 (0x00020000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00020000 */ +#define ADC_JDR4_JDATA_18 (0x00040000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00040000 */ +#define ADC_JDR4_JDATA_19 (0x00080000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00080000 */ +#define ADC_JDR4_JDATA_20 (0x00100000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00100000 */ +#define ADC_JDR4_JDATA_21 (0x00200000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00200000 */ +#define ADC_JDR4_JDATA_22 (0x00400000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00400000 */ +#define ADC_JDR4_JDATA_23 (0x00800000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00800000 */ +#define ADC_JDR4_JDATA_24 (0x01000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x01000000 */ +#define ADC_JDR4_JDATA_25 (0x02000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x02000000 */ +#define ADC_JDR4_JDATA_26 (0x04000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x04000000 */ +#define ADC_JDR4_JDATA_27 (0x08000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x08000000 */ +#define ADC_JDR4_JDATA_28 (0x10000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x10000000 */ +#define ADC_JDR4_JDATA_29 (0x20000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x20000000 */ +#define ADC_JDR4_JDATA_30 (0x40000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x40000000 */ +#define ADC_JDR4_JDATA_31 (0x80000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_AWD2CR register ********************/ +#define ADC_AWD2CR_AWD2CH_Pos (0U) +#define ADC_AWD2CR_AWD2CH_Msk (0xFFFFFUL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x000FFFFF */ +#define ADC_AWD2CR_AWD2CH ADC_AWD2CR_AWD2CH_Msk /*!< ADC Analog watchdog 2 channel selection */ +#define ADC_AWD2CR_AWD2CH_0 (0x00001UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000001 */ +#define ADC_AWD2CR_AWD2CH_1 (0x00002UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000002 */ +#define ADC_AWD2CR_AWD2CH_2 (0x00004UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000004 */ +#define ADC_AWD2CR_AWD2CH_3 (0x00008UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000008 */ +#define ADC_AWD2CR_AWD2CH_4 (0x00010UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000010 */ +#define ADC_AWD2CR_AWD2CH_5 (0x00020UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000020 */ +#define ADC_AWD2CR_AWD2CH_6 (0x00040UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000040 */ +#define ADC_AWD2CR_AWD2CH_7 (0x00080UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000080 */ +#define ADC_AWD2CR_AWD2CH_8 (0x00100UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000100 */ +#define ADC_AWD2CR_AWD2CH_9 (0x00200UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000200 */ +#define ADC_AWD2CR_AWD2CH_10 (0x00400UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000400 */ +#define ADC_AWD2CR_AWD2CH_11 (0x00800UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000800 */ +#define ADC_AWD2CR_AWD2CH_12 (0x01000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00001000 */ +#define ADC_AWD2CR_AWD2CH_13 (0x02000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00002000 */ +#define ADC_AWD2CR_AWD2CH_14 (0x04000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00004000 */ +#define ADC_AWD2CR_AWD2CH_15 (0x08000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00008000 */ +#define ADC_AWD2CR_AWD2CH_16 (0x10000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00010000 */ +#define ADC_AWD2CR_AWD2CH_17 (0x20000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00020000 */ +#define ADC_AWD2CR_AWD2CH_18 (0x40000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00040000 */ +#define ADC_AWD2CR_AWD2CH_19 (0x80000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00080000 */ + +/******************** Bit definition for ADC_AWD3CR register ********************/ +#define ADC_AWD3CR_AWD3CH_Pos (0U) +#define ADC_AWD3CR_AWD3CH_Msk (0xFFFFFUL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x000FFFFF */ +#define ADC_AWD3CR_AWD3CH ADC_AWD3CR_AWD3CH_Msk /*!< ADC Analog watchdog 2 channel selection */ +#define ADC_AWD3CR_AWD3CH_0 (0x00001UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000001 */ +#define ADC_AWD3CR_AWD3CH_1 (0x00002UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000002 */ +#define ADC_AWD3CR_AWD3CH_2 (0x00004UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000004 */ +#define ADC_AWD3CR_AWD3CH_3 (0x00008UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000008 */ +#define ADC_AWD3CR_AWD3CH_4 (0x00010UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000010 */ +#define ADC_AWD3CR_AWD3CH_5 (0x00020UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000020 */ +#define ADC_AWD3CR_AWD3CH_6 (0x00040UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000040 */ +#define ADC_AWD3CR_AWD3CH_7 (0x00080UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000080 */ +#define ADC_AWD3CR_AWD3CH_8 (0x00100UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000100 */ +#define ADC_AWD3CR_AWD3CH_9 (0x00200UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000200 */ +#define ADC_AWD3CR_AWD3CH_10 (0x00400UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000400 */ +#define ADC_AWD3CR_AWD3CH_11 (0x00800UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000800 */ +#define ADC_AWD3CR_AWD3CH_12 (0x01000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00001000 */ +#define ADC_AWD3CR_AWD3CH_13 (0x02000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00002000 */ +#define ADC_AWD3CR_AWD3CH_14 (0x04000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00004000 */ +#define ADC_AWD3CR_AWD3CH_15 (0x08000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00008000 */ +#define ADC_AWD3CR_AWD3CH_16 (0x10000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00010000 */ +#define ADC_AWD3CR_AWD3CH_17 (0x20000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00020000 */ +#define ADC_AWD3CR_AWD3CH_18 (0x40000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00040000 */ +#define ADC_AWD3CR_AWD3CH_19 (0x80000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00080000 */ + +/******************** Bit definition for ADC_DIFSEL register ********************/ +#define ADC_DIFSEL_DIFSEL_Pos (0U) +#define ADC_DIFSEL_DIFSEL_Msk (0xFFFFFUL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x000FFFFF */ +#define ADC_DIFSEL_DIFSEL ADC_DIFSEL_DIFSEL_Msk /*!< ADC differential modes for channels 1 to 18 */ +#define ADC_DIFSEL_DIFSEL_0 (0x00001UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000001 */ +#define ADC_DIFSEL_DIFSEL_1 (0x00002UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000002 */ +#define ADC_DIFSEL_DIFSEL_2 (0x00004UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000004 */ +#define ADC_DIFSEL_DIFSEL_3 (0x00008UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000008 */ +#define ADC_DIFSEL_DIFSEL_4 (0x00010UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000010 */ +#define ADC_DIFSEL_DIFSEL_5 (0x00020UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000020 */ +#define ADC_DIFSEL_DIFSEL_6 (0x00040UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000040 */ +#define ADC_DIFSEL_DIFSEL_7 (0x00080UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000080 */ +#define ADC_DIFSEL_DIFSEL_8 (0x00100UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000100 */ +#define ADC_DIFSEL_DIFSEL_9 (0x00200UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000200 */ +#define ADC_DIFSEL_DIFSEL_10 (0x00400UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000400 */ +#define ADC_DIFSEL_DIFSEL_11 (0x00800UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000800 */ +#define ADC_DIFSEL_DIFSEL_12 (0x01000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00001000 */ +#define ADC_DIFSEL_DIFSEL_13 (0x02000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00002000 */ +#define ADC_DIFSEL_DIFSEL_14 (0x04000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00004000 */ +#define ADC_DIFSEL_DIFSEL_15 (0x08000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00008000 */ +#define ADC_DIFSEL_DIFSEL_16 (0x10000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00010000 */ +#define ADC_DIFSEL_DIFSEL_17 (0x20000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00020000 */ +#define ADC_DIFSEL_DIFSEL_18 (0x40000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00040000 */ +#define ADC_DIFSEL_DIFSEL_19 (0x80000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00080000 */ + +/******************** Bit definition for ADC_CALFACT register ********************/ +#define ADC_CALFACT_CALFACT_S_Pos (0U) +#define ADC_CALFACT_CALFACT_S_Msk (0x7FFUL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x000007FF */ +#define ADC_CALFACT_CALFACT_S ADC_CALFACT_CALFACT_S_Msk /*!< ADC calibration factors in single-ended mode */ +#define ADC_CALFACT_CALFACT_S_0 (0x001UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000001 */ +#define ADC_CALFACT_CALFACT_S_1 (0x002UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000002 */ +#define ADC_CALFACT_CALFACT_S_2 (0x004UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000004 */ +#define ADC_CALFACT_CALFACT_S_3 (0x008UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000008 */ +#define ADC_CALFACT_CALFACT_S_4 (0x010UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000010 */ +#define ADC_CALFACT_CALFACT_S_5 (0x020UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000020 */ +#define ADC_CALFACT_CALFACT_S_6 (0x040UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000040 */ +#define ADC_CALFACT_CALFACT_S_7 (0x080UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000080 */ +#define ADC_CALFACT_CALFACT_S_8 (0x100UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000100 */ +#define ADC_CALFACT_CALFACT_S_9 (0x200UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000200 */ +#define ADC_CALFACT_CALFACT_S_10 (0x400UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000400 */ +#define ADC_CALFACT_CALFACT_D_Pos (16U) +#define ADC_CALFACT_CALFACT_D_Msk (0x7FFUL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x07FF0000 */ +#define ADC_CALFACT_CALFACT_D ADC_CALFACT_CALFACT_D_Msk /*!< ADC calibration factors in differential mode */ +#define ADC_CALFACT_CALFACT_D_0 (0x001UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00010000 */ +#define ADC_CALFACT_CALFACT_D_1 (0x002UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00020000 */ +#define ADC_CALFACT_CALFACT_D_2 (0x004UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00040000 */ +#define ADC_CALFACT_CALFACT_D_3 (0x008UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00080000 */ +#define ADC_CALFACT_CALFACT_D_4 (0x010UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00100000 */ +#define ADC_CALFACT_CALFACT_D_5 (0x020UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00200000 */ +#define ADC_CALFACT_CALFACT_D_6 (0x040UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00400000 */ +#define ADC_CALFACT_CALFACT_D_7 (0x080UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00800000 */ +#define ADC_CALFACT_CALFACT_D_8 (0x100UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x01000000 */ +#define ADC_CALFACT_CALFACT_D_9 (0x200UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x02000000 */ +#define ADC_CALFACT_CALFACT_D_10 (0x400UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x04000000 */ + +/******************** Bit definition for ADC_CALFACT2 register ********************/ +#define ADC_CALFACT2_LINCALFACT_Pos (0U) +#define ADC_CALFACT2_LINCALFACT_Msk (0x3FFFFFFFUL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x3FFFFFFF */ +#define ADC_CALFACT2_LINCALFACT ADC_CALFACT2_LINCALFACT_Msk /*!< ADC Linearity calibration factors */ +#define ADC_CALFACT2_LINCALFACT_0 (0x00000001UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000001 */ +#define ADC_CALFACT2_LINCALFACT_1 (0x00000002UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000002 */ +#define ADC_CALFACT2_LINCALFACT_2 (0x00000004UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000004 */ +#define ADC_CALFACT2_LINCALFACT_3 (0x00000008UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000008 */ +#define ADC_CALFACT2_LINCALFACT_4 (0x00000010UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000010 */ +#define ADC_CALFACT2_LINCALFACT_5 (0x00000020UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000020 */ +#define ADC_CALFACT2_LINCALFACT_6 (0x00000040UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000040 */ +#define ADC_CALFACT2_LINCALFACT_7 (0x00000080UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000080 */ +#define ADC_CALFACT2_LINCALFACT_8 (0x00000100UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000100 */ +#define ADC_CALFACT2_LINCALFACT_9 (0x00000200UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000200 */ +#define ADC_CALFACT2_LINCALFACT_10 (0x00000400UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000400 */ +#define ADC_CALFACT2_LINCALFACT_11 (0x00000800UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000800 */ +#define ADC_CALFACT2_LINCALFACT_12 (0x00001000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00001000 */ +#define ADC_CALFACT2_LINCALFACT_13 (0x00002000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00002000 */ +#define ADC_CALFACT2_LINCALFACT_14 (0x00004000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00004000 */ +#define ADC_CALFACT2_LINCALFACT_15 (0x00008000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00008000 */ +#define ADC_CALFACT2_LINCALFACT_16 (0x00010000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00010000 */ +#define ADC_CALFACT2_LINCALFACT_17 (0x00020000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00020000 */ +#define ADC_CALFACT2_LINCALFACT_18 (0x00040000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00040000 */ +#define ADC_CALFACT2_LINCALFACT_19 (0x00080000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00080000 */ +#define ADC_CALFACT2_LINCALFACT_20 (0x00100000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00100000 */ +#define ADC_CALFACT2_LINCALFACT_21 (0x00200000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00200000 */ +#define ADC_CALFACT2_LINCALFACT_22 (0x00400000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00400000 */ +#define ADC_CALFACT2_LINCALFACT_23 (0x00800000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00800000 */ +#define ADC_CALFACT2_LINCALFACT_24 (0x01000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x01000000 */ +#define ADC_CALFACT2_LINCALFACT_25 (0x02000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x02000000 */ +#define ADC_CALFACT2_LINCALFACT_26 (0x04000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x04000000 */ +#define ADC_CALFACT2_LINCALFACT_27 (0x08000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x08000000 */ +#define ADC_CALFACT2_LINCALFACT_28 (0x10000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x10000000 */ +#define ADC_CALFACT2_LINCALFACT_29 (0x20000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x20000000 */ + +/************************* ADC Common registers *****************************/ +/******************** Bit definition for ADC_CSR register ********************/ +#define ADC_CSR_ADRDY_MST_Pos (0U) +#define ADC_CSR_ADRDY_MST_Msk (0x1UL << ADC_CSR_ADRDY_MST_Pos) /*!< 0x00000001 */ +#define ADC_CSR_ADRDY_MST ADC_CSR_ADRDY_MST_Msk /*!< Master ADC ready */ +#define ADC_CSR_EOSMP_MST_Pos (1U) +#define ADC_CSR_EOSMP_MST_Msk (0x1UL << ADC_CSR_EOSMP_MST_Pos) /*!< 0x00000002 */ +#define ADC_CSR_EOSMP_MST ADC_CSR_EOSMP_MST_Msk /*!< End of sampling phase flag of the master ADC */ +#define ADC_CSR_EOC_MST_Pos (2U) +#define ADC_CSR_EOC_MST_Msk (0x1UL << ADC_CSR_EOC_MST_Pos) /*!< 0x00000004 */ +#define ADC_CSR_EOC_MST ADC_CSR_EOC_MST_Msk /*!< End of regular conversion of the master ADC */ +#define ADC_CSR_EOS_MST_Pos (3U) +#define ADC_CSR_EOS_MST_Msk (0x1UL << ADC_CSR_EOS_MST_Pos) /*!< 0x00000008 */ +#define ADC_CSR_EOS_MST ADC_CSR_EOS_MST_Msk /*!< End of regular sequence flag of the master ADC */ +#define ADC_CSR_OVR_MST_Pos (4U) +#define ADC_CSR_OVR_MST_Msk (0x1UL << ADC_CSR_OVR_MST_Pos) /*!< 0x00000010 */ +#define ADC_CSR_OVR_MST ADC_CSR_OVR_MST_Msk /*!< Overrun flag of the master ADC */ +#define ADC_CSR_JEOC_MST_Pos (5U) +#define ADC_CSR_JEOC_MST_Msk (0x1UL << ADC_CSR_JEOC_MST_Pos) /*!< 0x00000020 */ +#define ADC_CSR_JEOC_MST ADC_CSR_JEOC_MST_Msk /*!< End of injected conversion of the master ADC */ +#define ADC_CSR_JEOS_MST_Pos (6U) +#define ADC_CSR_JEOS_MST_Msk (0x1UL << ADC_CSR_JEOS_MST_Pos) /*!< 0x00000040 */ +#define ADC_CSR_JEOS_MST ADC_CSR_JEOS_MST_Msk /*!< End of injected sequence flag of the master ADC */ +#define ADC_CSR_AWD1_MST_Pos (7U) +#define ADC_CSR_AWD1_MST_Msk (0x1UL << ADC_CSR_AWD1_MST_Pos) /*!< 0x00000080 */ +#define ADC_CSR_AWD1_MST ADC_CSR_AWD1_MST_Msk /*!< Analog watchdog 1 flag of the master ADC */ +#define ADC_CSR_AWD2_MST_Pos (8U) +#define ADC_CSR_AWD2_MST_Msk (0x1UL << ADC_CSR_AWD2_MST_Pos) /*!< 0x00000100 */ +#define ADC_CSR_AWD2_MST ADC_CSR_AWD2_MST_Msk /*!< Analog watchdog 2 flag of the master ADC */ +#define ADC_CSR_AWD3_MST_Pos (9U) +#define ADC_CSR_AWD3_MST_Msk (0x1UL << ADC_CSR_AWD3_MST_Pos) /*!< 0x00000200 */ +#define ADC_CSR_AWD3_MST ADC_CSR_AWD3_MST_Msk /*!< Analog watchdog 3 flag of the master ADC */ +#define ADC_CSR_JQOVF_MST_Pos (10U) +#define ADC_CSR_JQOVF_MST_Msk (0x1UL << ADC_CSR_JQOVF_MST_Pos) /*!< 0x00000400 */ +#define ADC_CSR_JQOVF_MST ADC_CSR_JQOVF_MST_Msk /*!< Injected context queue overflow flag of the master ADC */ +#define ADC_CSR_ADRDY_SLV_Pos (16U) +#define ADC_CSR_ADRDY_SLV_Msk (0x1UL << ADC_CSR_ADRDY_SLV_Pos) /*!< 0x00010000 */ +#define ADC_CSR_ADRDY_SLV ADC_CSR_ADRDY_SLV_Msk /*!< Slave ADC ready */ +#define ADC_CSR_EOSMP_SLV_Pos (17U) +#define ADC_CSR_EOSMP_SLV_Msk (0x1UL << ADC_CSR_EOSMP_SLV_Pos) /*!< 0x00020000 */ +#define ADC_CSR_EOSMP_SLV ADC_CSR_EOSMP_SLV_Msk /*!< End of sampling phase flag of the slave ADC */ +#define ADC_CSR_EOC_SLV_Pos (18U) +#define ADC_CSR_EOC_SLV_Msk (0x1UL << ADC_CSR_EOC_SLV_Pos) /*!< 0x00040000 */ +#define ADC_CSR_EOC_SLV ADC_CSR_EOC_SLV_Msk /*!< End of regular conversion of the slave ADC */ +#define ADC_CSR_EOS_SLV_Pos (19U) +#define ADC_CSR_EOS_SLV_Msk (0x1UL << ADC_CSR_EOS_SLV_Pos) /*!< 0x00080000 */ +#define ADC_CSR_EOS_SLV ADC_CSR_EOS_SLV_Msk /*!< End of regular sequence flag of the slave ADC */ +#define ADC_CSR_OVR_SLV_Pos (20U) +#define ADC_CSR_OVR_SLV_Msk (0x1UL << ADC_CSR_OVR_SLV_Pos) /*!< 0x00100000 */ +#define ADC_CSR_OVR_SLV ADC_CSR_OVR_SLV_Msk /*!< Overrun flag of the slave ADC */ +#define ADC_CSR_JEOC_SLV_Pos (21U) +#define ADC_CSR_JEOC_SLV_Msk (0x1UL << ADC_CSR_JEOC_SLV_Pos) /*!< 0x00200000 */ +#define ADC_CSR_JEOC_SLV ADC_CSR_JEOC_SLV_Msk /*!< End of injected conversion of the slave ADC */ +#define ADC_CSR_JEOS_SLV_Pos (22U) +#define ADC_CSR_JEOS_SLV_Msk (0x1UL << ADC_CSR_JEOS_SLV_Pos) /*!< 0x00400000 */ +#define ADC_CSR_JEOS_SLV ADC_CSR_JEOS_SLV_Msk /*!< End of injected sequence flag of the slave ADC */ +#define ADC_CSR_AWD1_SLV_Pos (23U) +#define ADC_CSR_AWD1_SLV_Msk (0x1UL << ADC_CSR_AWD1_SLV_Pos) /*!< 0x00800000 */ +#define ADC_CSR_AWD1_SLV ADC_CSR_AWD1_SLV_Msk /*!< Analog watchdog 1 flag of the slave ADC */ +#define ADC_CSR_AWD2_SLV_Pos (24U) +#define ADC_CSR_AWD2_SLV_Msk (0x1UL << ADC_CSR_AWD2_SLV_Pos) /*!< 0x01000000 */ +#define ADC_CSR_AWD2_SLV ADC_CSR_AWD2_SLV_Msk /*!< Analog watchdog 2 flag of the slave ADC */ +#define ADC_CSR_AWD3_SLV_Pos (25U) +#define ADC_CSR_AWD3_SLV_Msk (0x1UL << ADC_CSR_AWD3_SLV_Pos) /*!< 0x02000000 */ +#define ADC_CSR_AWD3_SLV ADC_CSR_AWD3_SLV_Msk /*!< Analog watchdog 3 flag of the slave ADC */ +#define ADC_CSR_JQOVF_SLV_Pos (26U) +#define ADC_CSR_JQOVF_SLV_Msk (0x1UL << ADC_CSR_JQOVF_SLV_Pos) /*!< 0x04000000 */ +#define ADC_CSR_JQOVF_SLV ADC_CSR_JQOVF_SLV_Msk /*!< Injected context queue overflow flag of the slave ADC */ + +/******************** Bit definition for ADC_CCR register ********************/ +#define ADC_CCR_DUAL_Pos (0U) +#define ADC_CCR_DUAL_Msk (0x1FUL << ADC_CCR_DUAL_Pos) /*!< 0x0000001F */ +#define ADC_CCR_DUAL ADC_CCR_DUAL_Msk /*!< Dual ADC mode selection */ +#define ADC_CCR_DUAL_0 (0x01UL << ADC_CCR_DUAL_Pos) /*!< 0x00000001 */ +#define ADC_CCR_DUAL_1 (0x02UL << ADC_CCR_DUAL_Pos) /*!< 0x00000002 */ +#define ADC_CCR_DUAL_2 (0x04UL << ADC_CCR_DUAL_Pos) /*!< 0x00000004 */ +#define ADC_CCR_DUAL_3 (0x08UL << ADC_CCR_DUAL_Pos) /*!< 0x00000008 */ +#define ADC_CCR_DUAL_4 (0x10UL << ADC_CCR_DUAL_Pos) /*!< 0x00000010 */ + +#define ADC_CCR_DELAY_Pos (8U) +#define ADC_CCR_DELAY_Msk (0xFUL << ADC_CCR_DELAY_Pos) /*!< 0x00000F00 */ +#define ADC_CCR_DELAY ADC_CCR_DELAY_Msk /*!< Delay between 2 sampling phases */ +#define ADC_CCR_DELAY_0 (0x1UL << ADC_CCR_DELAY_Pos) /*!< 0x00000100 */ +#define ADC_CCR_DELAY_1 (0x2UL << ADC_CCR_DELAY_Pos) /*!< 0x00000200 */ +#define ADC_CCR_DELAY_2 (0x4UL << ADC_CCR_DELAY_Pos) /*!< 0x00000400 */ +#define ADC_CCR_DELAY_3 (0x8UL << ADC_CCR_DELAY_Pos) /*!< 0x00000800 */ + + +#define ADC_CCR_DAMDF_Pos (14U) +#define ADC_CCR_DAMDF_Msk (0x3UL << ADC_CCR_DAMDF_Pos) /*!< 0x0000C000 */ +#define ADC_CCR_DAMDF ADC_CCR_DAMDF_Msk /*!< Dual ADC mode Data format */ +#define ADC_CCR_DAMDF_0 (0x1UL << ADC_CCR_DAMDF_Pos) /*!< 0x00004000 */ +#define ADC_CCR_DAMDF_1 (0x2UL << ADC_CCR_DAMDF_Pos) /*!< 0x00008000 */ + +#define ADC_CCR_CKMODE_Pos (16U) +#define ADC_CCR_CKMODE_Msk (0x3UL << ADC_CCR_CKMODE_Pos) /*!< 0x00030000 */ +#define ADC_CCR_CKMODE ADC_CCR_CKMODE_Msk /*!< ADC clock mode */ +#define ADC_CCR_CKMODE_0 (0x1UL << ADC_CCR_CKMODE_Pos) /*!< 0x00010000 */ +#define ADC_CCR_CKMODE_1 (0x2UL << ADC_CCR_CKMODE_Pos) /*!< 0x00020000 */ + +#define ADC_CCR_PRESC_Pos (18U) +#define ADC_CCR_PRESC_Msk (0xFUL << ADC_CCR_PRESC_Pos) /*!< 0x003C0000 */ +#define ADC_CCR_PRESC ADC_CCR_PRESC_Msk /*!< ADC prescaler */ +#define ADC_CCR_PRESC_0 (0x1UL << ADC_CCR_PRESC_Pos) /*!< 0x00040000 */ +#define ADC_CCR_PRESC_1 (0x2UL << ADC_CCR_PRESC_Pos) /*!< 0x00080000 */ +#define ADC_CCR_PRESC_2 (0x4UL << ADC_CCR_PRESC_Pos) /*!< 0x00100000 */ +#define ADC_CCR_PRESC_3 (0x8UL << ADC_CCR_PRESC_Pos) /*!< 0x00200000 */ + +#define ADC_CCR_VREFEN_Pos (22U) +#define ADC_CCR_VREFEN_Msk (0x1UL << ADC_CCR_VREFEN_Pos) /*!< 0x00400000 */ +#define ADC_CCR_VREFEN ADC_CCR_VREFEN_Msk /*!< VREFINT enable */ +#define ADC_CCR_TSEN_Pos (23U) +#define ADC_CCR_TSEN_Msk (0x1UL << ADC_CCR_TSEN_Pos) /*!< 0x00800000 */ +#define ADC_CCR_TSEN ADC_CCR_TSEN_Msk /*!< Temperature sensor enable */ +#define ADC_CCR_VBATEN_Pos (24U) +#define ADC_CCR_VBATEN_Msk (0x1UL << ADC_CCR_VBATEN_Pos) /*!< 0x01000000 */ +#define ADC_CCR_VBATEN ADC_CCR_VBATEN_Msk /*!< VBAT enable */ + +/******************** Bit definition for ADC_CDR register *******************/ +#define ADC_CDR_RDATA_MST_Pos (0U) +#define ADC_CDR_RDATA_MST_Msk (0xFFFFUL << ADC_CDR_RDATA_MST_Pos) /*!< 0x0000FFFF */ +#define ADC_CDR_RDATA_MST ADC_CDR_RDATA_MST_Msk /*!< ADC multimode master group regular conversion data */ + +#define ADC_CDR_RDATA_SLV_Pos (16U) +#define ADC_CDR_RDATA_SLV_Msk (0xFFFFUL << ADC_CDR_RDATA_SLV_Pos) /*!< 0xFFFF0000 */ +#define ADC_CDR_RDATA_SLV ADC_CDR_RDATA_SLV_Msk /*!< ADC multimode slave group regular conversion data */ + +/******************** Bit definition for ADC_CDR2 register ******************/ +#define ADC_CDR2_RDATA_ALT_Pos (0U) +#define ADC_CDR2_RDATA_ALT_Msk (0xFFFFFFFFUL << ADC_CDR2_RDATA_ALT_Pos) /*!< 0xFFFFFFFF */ +#define ADC_CDR2_RDATA_ALT ADC_CDR2_RDATA_ALT_Msk /*!< Regular data of the master/slave alternated ADCs */ + + +/******************************************************************************/ +/* */ +/* VREFBUF */ +/* */ +/******************************************************************************/ +/******************* Bit definition for VREFBUF_CSR register ****************/ +#define VREFBUF_CSR_ENVR_Pos (0U) +#define VREFBUF_CSR_ENVR_Msk (0x1UL << VREFBUF_CSR_ENVR_Pos) /*!< 0x00000001 */ +#define VREFBUF_CSR_ENVR VREFBUF_CSR_ENVR_Msk /*!*/ +#define DAC_CR_CEN1_Pos (14U) +#define DAC_CR_CEN1_Msk (0x1UL << DAC_CR_CEN1_Pos) /*!< 0x00004000 */ +#define DAC_CR_CEN1 DAC_CR_CEN1_Msk /*!*/ + +#define DAC_CR_EN2_Pos (16U) +#define DAC_CR_EN2_Msk (0x1UL << DAC_CR_EN2_Pos) /*!< 0x00010000 */ +#define DAC_CR_EN2 DAC_CR_EN2_Msk /*!*/ +#define DAC_CR_CEN2_Pos (30U) +#define DAC_CR_CEN2_Msk (0x1UL << DAC_CR_CEN2_Pos) /*!< 0x40000000 */ +#define DAC_CR_CEN2 DAC_CR_CEN2_Msk /*!*/ + +/***************** Bit definition for DAC_SWTRIGR register ******************/ +#define DAC_SWTRIGR_SWTRIG1_Pos (0U) +#define DAC_SWTRIGR_SWTRIG1_Msk (0x1UL << DAC_SWTRIGR_SWTRIG1_Pos) /*!< 0x00000001 */ +#define DAC_SWTRIGR_SWTRIG1 DAC_SWTRIGR_SWTRIG1_Msk /*!
© Copyright (c) 2019 STMicroelectronics. + * All rights reserved.
+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/** @addtogroup CMSIS_Device + * @{ + */ + +/** @addtogroup stm32h730xx + * @{ + */ + +#ifndef STM32H730xx_H +#define STM32H730xx_H + +#ifdef __cplusplus + extern "C" { +#endif /* __cplusplus */ + +/** @addtogroup Peripheral_interrupt_number_definition + * @{ + */ + +/** + * @brief STM32H7XX Interrupt Number Definition, according to the selected device + * in @ref Library_configuration_section + */ +typedef enum +{ +/****** Cortex-M Processor Exceptions Numbers *****************************************************************/ + NonMaskableInt_IRQn = -14, /*!< 2 Non Maskable Interrupt */ + HardFault_IRQn = -13, /*!< 4 Cortex-M Memory Management Interrupt */ + MemoryManagement_IRQn = -12, /*!< 4 Cortex-M Memory Management Interrupt */ + BusFault_IRQn = -11, /*!< 5 Cortex-M Bus Fault Interrupt */ + UsageFault_IRQn = -10, /*!< 6 Cortex-M Usage Fault Interrupt */ + SVCall_IRQn = -5, /*!< 11 Cortex-M SV Call Interrupt */ + DebugMonitor_IRQn = -4, /*!< 12 Cortex-M Debug Monitor Interrupt */ + PendSV_IRQn = -2, /*!< 14 Cortex-M Pend SV Interrupt */ + SysTick_IRQn = -1, /*!< 15 Cortex-M System Tick Interrupt */ +/****** STM32 specific Interrupt Numbers **********************************************************************/ + WWDG_IRQn = 0, /*!< Window WatchDog Interrupt ( wwdg1_it, wwdg2_it) */ + PVD_AVD_IRQn = 1, /*!< PVD/AVD through EXTI Line detection Interrupt */ + TAMP_STAMP_IRQn = 2, /*!< Tamper and TimeStamp interrupts through the EXTI line */ + RTC_WKUP_IRQn = 3, /*!< RTC Wakeup interrupt through the EXTI line */ + FLASH_IRQn = 4, /*!< FLASH global Interrupt */ + RCC_IRQn = 5, /*!< RCC global Interrupt */ + EXTI0_IRQn = 6, /*!< EXTI Line0 Interrupt */ + EXTI1_IRQn = 7, /*!< EXTI Line1 Interrupt */ + EXTI2_IRQn = 8, /*!< EXTI Line2 Interrupt */ + EXTI3_IRQn = 9, /*!< EXTI Line3 Interrupt */ + EXTI4_IRQn = 10, /*!< EXTI Line4 Interrupt */ + DMA1_Stream0_IRQn = 11, /*!< DMA1 Stream 0 global Interrupt */ + DMA1_Stream1_IRQn = 12, /*!< DMA1 Stream 1 global Interrupt */ + DMA1_Stream2_IRQn = 13, /*!< DMA1 Stream 2 global Interrupt */ + DMA1_Stream3_IRQn = 14, /*!< DMA1 Stream 3 global Interrupt */ + DMA1_Stream4_IRQn = 15, /*!< DMA1 Stream 4 global Interrupt */ + DMA1_Stream5_IRQn = 16, /*!< DMA1 Stream 5 global Interrupt */ + DMA1_Stream6_IRQn = 17, /*!< DMA1 Stream 6 global Interrupt */ + ADC_IRQn = 18, /*!< ADC1 and ADC2 global Interrupts */ + FDCAN1_IT0_IRQn = 19, /*!< FDCAN1 Interrupt line 0 */ + FDCAN2_IT0_IRQn = 20, /*!< FDCAN2 Interrupt line 0 */ + FDCAN1_IT1_IRQn = 21, /*!< FDCAN1 Interrupt line 1 */ + FDCAN2_IT1_IRQn = 22, /*!< FDCAN2 Interrupt line 1 */ + EXTI9_5_IRQn = 23, /*!< External Line[9:5] Interrupts */ + TIM1_BRK_IRQn = 24, /*!< TIM1 Break Interrupt */ + TIM1_UP_IRQn = 25, /*!< TIM1 Update Interrupt */ + TIM1_TRG_COM_IRQn = 26, /*!< TIM1 Trigger and Commutation Interrupt */ + TIM1_CC_IRQn = 27, /*!< TIM1 Capture Compare Interrupt */ + TIM2_IRQn = 28, /*!< TIM2 global Interrupt */ + TIM3_IRQn = 29, /*!< TIM3 global Interrupt */ + TIM4_IRQn = 30, /*!< TIM4 global Interrupt */ + I2C1_EV_IRQn = 31, /*!< I2C1 Event Interrupt */ + I2C1_ER_IRQn = 32, /*!< I2C1 Error Interrupt */ + I2C2_EV_IRQn = 33, /*!< I2C2 Event Interrupt */ + I2C2_ER_IRQn = 34, /*!< I2C2 Error Interrupt */ + SPI1_IRQn = 35, /*!< SPI1 global Interrupt */ + SPI2_IRQn = 36, /*!< SPI2 global Interrupt */ + USART1_IRQn = 37, /*!< USART1 global Interrupt */ + USART2_IRQn = 38, /*!< USART2 global Interrupt */ + USART3_IRQn = 39, /*!< USART3 global Interrupt */ + EXTI15_10_IRQn = 40, /*!< External Line[15:10] Interrupts */ + RTC_Alarm_IRQn = 41, /*!< RTC Alarm (A and B) through EXTI Line Interrupt */ + TIM8_BRK_TIM12_IRQn = 43, /*!< TIM8 Break Interrupt and TIM12 global interrupt */ + TIM8_UP_TIM13_IRQn = 44, /*!< TIM8 Update Interrupt and TIM13 global interrupt */ + TIM8_TRG_COM_TIM14_IRQn = 45, /*!< TIM8 Trigger and Commutation Interrupt and TIM14 global interrupt */ + TIM8_CC_IRQn = 46, /*!< TIM8 Capture Compare Interrupt */ + DMA1_Stream7_IRQn = 47, /*!< DMA1 Stream7 Interrupt */ + FMC_IRQn = 48, /*!< FMC global Interrupt */ + SDMMC1_IRQn = 49, /*!< SDMMC1 global Interrupt */ + TIM5_IRQn = 50, /*!< TIM5 global Interrupt */ + SPI3_IRQn = 51, /*!< SPI3 global Interrupt */ + UART4_IRQn = 52, /*!< UART4 global Interrupt */ + UART5_IRQn = 53, /*!< UART5 global Interrupt */ + TIM6_DAC_IRQn = 54, /*!< TIM6 global and DAC1&2 underrun error interrupts */ + TIM7_IRQn = 55, /*!< TIM7 global interrupt */ + DMA2_Stream0_IRQn = 56, /*!< DMA2 Stream 0 global Interrupt */ + DMA2_Stream1_IRQn = 57, /*!< DMA2 Stream 1 global Interrupt */ + DMA2_Stream2_IRQn = 58, /*!< DMA2 Stream 2 global Interrupt */ + DMA2_Stream3_IRQn = 59, /*!< DMA2 Stream 3 global Interrupt */ + DMA2_Stream4_IRQn = 60, /*!< DMA2 Stream 4 global Interrupt */ + ETH_IRQn = 61, /*!< Ethernet global Interrupt */ + ETH_WKUP_IRQn = 62, /*!< Ethernet Wakeup through EXTI line Interrupt */ + FDCAN_CAL_IRQn = 63, /*!< FDCAN Calibration unit Interrupt */ + DMA2_Stream5_IRQn = 68, /*!< DMA2 Stream 5 global interrupt */ + DMA2_Stream6_IRQn = 69, /*!< DMA2 Stream 6 global interrupt */ + DMA2_Stream7_IRQn = 70, /*!< DMA2 Stream 7 global interrupt */ + USART6_IRQn = 71, /*!< USART6 global interrupt */ + I2C3_EV_IRQn = 72, /*!< I2C3 event interrupt */ + I2C3_ER_IRQn = 73, /*!< I2C3 error interrupt */ + OTG_HS_EP1_OUT_IRQn = 74, /*!< USB OTG HS End Point 1 Out global interrupt */ + OTG_HS_EP1_IN_IRQn = 75, /*!< USB OTG HS End Point 1 In global interrupt */ + OTG_HS_WKUP_IRQn = 76, /*!< USB OTG HS Wakeup through EXTI interrupt */ + OTG_HS_IRQn = 77, /*!< USB OTG HS global interrupt */ + DCMI_PSSI_IRQn = 78, /*!< DCMI and PSSI global interrupt */ + CRYP_IRQn = 79, /*!< CRYP crypto global interrupt */ + HASH_RNG_IRQn = 80, /*!< HASH and RNG global interrupt */ + FPU_IRQn = 81, /*!< FPU global interrupt */ + UART7_IRQn = 82, /*!< UART7 global interrupt */ + UART8_IRQn = 83, /*!< UART8 global interrupt */ + SPI4_IRQn = 84, /*!< SPI4 global Interrupt */ + SPI5_IRQn = 85, /*!< SPI5 global Interrupt */ + SPI6_IRQn = 86, /*!< SPI6 global Interrupt */ + SAI1_IRQn = 87, /*!< SAI1 global Interrupt */ + LTDC_IRQn = 88, /*!< LTDC global Interrupt */ + LTDC_ER_IRQn = 89, /*!< LTDC Error global Interrupt */ + DMA2D_IRQn = 90, /*!< DMA2D global Interrupt */ + OCTOSPI1_IRQn = 92, /*!< OCTOSPI1 global interrupt */ + LPTIM1_IRQn = 93, /*!< LP TIM1 interrupt */ + CEC_IRQn = 94, /*!< HDMI-CEC global Interrupt */ + I2C4_EV_IRQn = 95, /*!< I2C4 Event Interrupt */ + I2C4_ER_IRQn = 96, /*!< I2C4 Error Interrupt */ + SPDIF_RX_IRQn = 97, /*!< SPDIF-RX global Interrupt */ + DMAMUX1_OVR_IRQn = 102, /*! + +/** @addtogroup Peripheral_registers_structures + * @{ + */ + +/** + * @brief Analog to Digital Converter + */ + +typedef struct +{ + __IO uint32_t ISR; /*!< ADC Interrupt and Status Register, Address offset: 0x00 */ + __IO uint32_t IER; /*!< ADC Interrupt Enable Register, Address offset: 0x04 */ + __IO uint32_t CR; /*!< ADC control register, Address offset: 0x08 */ + __IO uint32_t CFGR; /*!< ADC Configuration register, Address offset: 0x0C */ + __IO uint32_t CFGR2; /*!< ADC Configuration register 2, Address offset: 0x10 */ + __IO uint32_t SMPR1; /*!< ADC sample time register 1, Address offset: 0x14 */ + __IO uint32_t SMPR2; /*!< ADC sample time register 2, Address offset: 0x18 */ + __IO uint32_t PCSEL_RES0; /*!< Rserved for ADC3, ADC1/2 pre-channel selection, Address offset: 0x1C */ + __IO uint32_t LTR1_TR1; /*!< ADC watchdog Lower threshold register 1, Address offset: 0x20 */ + __IO uint32_t HTR1_TR2; /*!< ADC watchdog higher threshold register 1, Address offset: 0x24 */ + __IO uint32_t RES1_TR3; /*!< Rserved for ADC1/2, ADC3 threshold register, Address offset: 0x28 */ + uint32_t RESERVED2; /*!< Reserved, 0x02C */ + __IO uint32_t SQR1; /*!< ADC regular sequence register 1, Address offset: 0x30 */ + __IO uint32_t SQR2; /*!< ADC regular sequence register 2, Address offset: 0x34 */ + __IO uint32_t SQR3; /*!< ADC regular sequence register 3, Address offset: 0x38 */ + __IO uint32_t SQR4; /*!< ADC regular sequence register 4, Address offset: 0x3C */ + __IO uint32_t DR; /*!< ADC regular data register, Address offset: 0x40 */ + uint32_t RESERVED3; /*!< Reserved, 0x044 */ + uint32_t RESERVED4; /*!< Reserved, 0x048 */ + __IO uint32_t JSQR; /*!< ADC injected sequence register, Address offset: 0x4C */ + uint32_t RESERVED5[4]; /*!< Reserved, 0x050 - 0x05C */ + __IO uint32_t OFR1; /*!< ADC offset register 1, Address offset: 0x60 */ + __IO uint32_t OFR2; /*!< ADC offset register 2, Address offset: 0x64 */ + __IO uint32_t OFR3; /*!< ADC offset register 3, Address offset: 0x68 */ + __IO uint32_t OFR4; /*!< ADC offset register 4, Address offset: 0x6C */ + uint32_t RESERVED6[4]; /*!< Reserved, 0x070 - 0x07C */ + __IO uint32_t JDR1; /*!< ADC injected data register 1, Address offset: 0x80 */ + __IO uint32_t JDR2; /*!< ADC injected data register 2, Address offset: 0x84 */ + __IO uint32_t JDR3; /*!< ADC injected data register 3, Address offset: 0x88 */ + __IO uint32_t JDR4; /*!< ADC injected data register 4, Address offset: 0x8C */ + uint32_t RESERVED7[4]; /*!< Reserved, 0x090 - 0x09C */ + __IO uint32_t AWD2CR; /*!< ADC Analog Watchdog 2 Configuration Register, Address offset: 0xA0 */ + __IO uint32_t AWD3CR; /*!< ADC Analog Watchdog 3 Configuration Register, Address offset: 0xA4 */ + uint32_t RESERVED8; /*!< Reserved, 0x0A8 */ + uint32_t RESERVED9; /*!< Reserved, 0x0AC */ + __IO uint32_t LTR2_DIFSEL; /*!< ADC watchdog Lower threshold register 2, Difsel for ADC3, Address offset: 0xB0 */ + __IO uint32_t HTR2_CALFACT; /*!< ADC watchdog Higher threshold register 2, Calfact for ADC3, Address offset: 0xB4 */ + __IO uint32_t LTR3_RES10; /*!< ADC watchdog Lower threshold register 3, specific ADC1/2, Address offset: 0xB8 */ + __IO uint32_t HTR3_RES11; /*!< ADC watchdog Higher threshold register 3, specific ADC1/2, Address offset: 0xBC */ + __IO uint32_t DIFSEL_RES12; /*!< ADC Differential Mode Selection Register specific ADC1/2, Address offset: 0xC0 */ + __IO uint32_t CALFACT_RES13; /*!< ADC Calibration Factors specific ADC1/2, Address offset: 0xC4 */ + __IO uint32_t CALFACT2_RES14; /*!< ADC Linearity Calibration Factors specific ADC1/2, Address offset: 0xC8 */ +} ADC_TypeDef; + + +typedef struct +{ +__IO uint32_t CSR; /*!< ADC Common status register, Address offset: ADC1/3 base address + 0x300 */ +uint32_t RESERVED; /*!< Reserved, ADC1/3 base address + 0x304 */ +__IO uint32_t CCR; /*!< ADC common control register, Address offset: ADC1/3 base address + 0x308 */ +__IO uint32_t CDR; /*!< ADC common regular data register for dual Address offset: ADC1/3 base address + 0x30C */ +__IO uint32_t CDR2; /*!< ADC common regular data register for 32-bit dual mode Address offset: ADC1/3 base address + 0x310 */ + +} ADC_Common_TypeDef; + + +/** + * @brief VREFBUF + */ + +typedef struct +{ + __IO uint32_t CSR; /*!< VREFBUF control and status register, Address offset: 0x00 */ + __IO uint32_t CCR; /*!< VREFBUF calibration and control register, Address offset: 0x04 */ +} VREFBUF_TypeDef; + + +/** + * @brief FD Controller Area Network + */ + +typedef struct +{ + __IO uint32_t CREL; /*!< FDCAN Core Release register, Address offset: 0x000 */ + __IO uint32_t ENDN; /*!< FDCAN Endian register, Address offset: 0x004 */ + __IO uint32_t RESERVED1; /*!< Reserved, 0x008 */ + __IO uint32_t DBTP; /*!< FDCAN Data Bit Timing & Prescaler register, Address offset: 0x00C */ + __IO uint32_t TEST; /*!< FDCAN Test register, Address offset: 0x010 */ + __IO uint32_t RWD; /*!< FDCAN RAM Watchdog register, Address offset: 0x014 */ + __IO uint32_t CCCR; /*!< FDCAN CC Control register, Address offset: 0x018 */ + __IO uint32_t NBTP; /*!< FDCAN Nominal Bit Timing & Prescaler register, Address offset: 0x01C */ + __IO uint32_t TSCC; /*!< FDCAN Timestamp Counter Configuration register, Address offset: 0x020 */ + __IO uint32_t TSCV; /*!< FDCAN Timestamp Counter Value register, Address offset: 0x024 */ + __IO uint32_t TOCC; /*!< FDCAN Timeout Counter Configuration register, Address offset: 0x028 */ + __IO uint32_t TOCV; /*!< FDCAN Timeout Counter Value register, Address offset: 0x02C */ + __IO uint32_t RESERVED2[4]; /*!< Reserved, 0x030 - 0x03C */ + __IO uint32_t ECR; /*!< FDCAN Error Counter register, Address offset: 0x040 */ + __IO uint32_t PSR; /*!< FDCAN Protocol Status register, Address offset: 0x044 */ + __IO uint32_t TDCR; /*!< FDCAN Transmitter Delay Compensation register, Address offset: 0x048 */ + __IO uint32_t RESERVED3; /*!< Reserved, 0x04C */ + __IO uint32_t IR; /*!< FDCAN Interrupt register, Address offset: 0x050 */ + __IO uint32_t IE; /*!< FDCAN Interrupt Enable register, Address offset: 0x054 */ + __IO uint32_t ILS; /*!< FDCAN Interrupt Line Select register, Address offset: 0x058 */ + __IO uint32_t ILE; /*!< FDCAN Interrupt Line Enable register, Address offset: 0x05C */ + __IO uint32_t RESERVED4[8]; /*!< Reserved, 0x060 - 0x07C */ + __IO uint32_t GFC; /*!< FDCAN Global Filter Configuration register, Address offset: 0x080 */ + __IO uint32_t SIDFC; /*!< FDCAN Standard ID Filter Configuration register, Address offset: 0x084 */ + __IO uint32_t XIDFC; /*!< FDCAN Extended ID Filter Configuration register, Address offset: 0x088 */ + __IO uint32_t RESERVED5; /*!< Reserved, 0x08C */ + __IO uint32_t XIDAM; /*!< FDCAN Extended ID AND Mask register, Address offset: 0x090 */ + __IO uint32_t HPMS; /*!< FDCAN High Priority Message Status register, Address offset: 0x094 */ + __IO uint32_t NDAT1; /*!< FDCAN New Data 1 register, Address offset: 0x098 */ + __IO uint32_t NDAT2; /*!< FDCAN New Data 2 register, Address offset: 0x09C */ + __IO uint32_t RXF0C; /*!< FDCAN Rx FIFO 0 Configuration register, Address offset: 0x0A0 */ + __IO uint32_t RXF0S; /*!< FDCAN Rx FIFO 0 Status register, Address offset: 0x0A4 */ + __IO uint32_t RXF0A; /*!< FDCAN Rx FIFO 0 Acknowledge register, Address offset: 0x0A8 */ + __IO uint32_t RXBC; /*!< FDCAN Rx Buffer Configuration register, Address offset: 0x0AC */ + __IO uint32_t RXF1C; /*!< FDCAN Rx FIFO 1 Configuration register, Address offset: 0x0B0 */ + __IO uint32_t RXF1S; /*!< FDCAN Rx FIFO 1 Status register, Address offset: 0x0B4 */ + __IO uint32_t RXF1A; /*!< FDCAN Rx FIFO 1 Acknowledge register, Address offset: 0x0B8 */ + __IO uint32_t RXESC; /*!< FDCAN Rx Buffer/FIFO Element Size Configuration register, Address offset: 0x0BC */ + __IO uint32_t TXBC; /*!< FDCAN Tx Buffer Configuration register, Address offset: 0x0C0 */ + __IO uint32_t TXFQS; /*!< FDCAN Tx FIFO/Queue Status register, Address offset: 0x0C4 */ + __IO uint32_t TXESC; /*!< FDCAN Tx Buffer Element Size Configuration register, Address offset: 0x0C8 */ + __IO uint32_t TXBRP; /*!< FDCAN Tx Buffer Request Pending register, Address offset: 0x0CC */ + __IO uint32_t TXBAR; /*!< FDCAN Tx Buffer Add Request register, Address offset: 0x0D0 */ + __IO uint32_t TXBCR; /*!< FDCAN Tx Buffer Cancellation Request register, Address offset: 0x0D4 */ + __IO uint32_t TXBTO; /*!< FDCAN Tx Buffer Transmission Occurred register, Address offset: 0x0D8 */ + __IO uint32_t TXBCF; /*!< FDCAN Tx Buffer Cancellation Finished register, Address offset: 0x0DC */ + __IO uint32_t TXBTIE; /*!< FDCAN Tx Buffer Transmission Interrupt Enable register, Address offset: 0x0E0 */ + __IO uint32_t TXBCIE; /*!< FDCAN Tx Buffer Cancellation Finished Interrupt Enable register, Address offset: 0x0E4 */ + __IO uint32_t RESERVED6[2]; /*!< Reserved, 0x0E8 - 0x0EC */ + __IO uint32_t TXEFC; /*!< FDCAN Tx Event FIFO Configuration register, Address offset: 0x0F0 */ + __IO uint32_t TXEFS; /*!< FDCAN Tx Event FIFO Status register, Address offset: 0x0F4 */ + __IO uint32_t TXEFA; /*!< FDCAN Tx Event FIFO Acknowledge register, Address offset: 0x0F8 */ + __IO uint32_t RESERVED7; /*!< Reserved, 0x0FC */ +} FDCAN_GlobalTypeDef; + +/** + * @brief TTFD Controller Area Network + */ + +typedef struct +{ + __IO uint32_t TTTMC; /*!< TT Trigger Memory Configuration register, Address offset: 0x100 */ + __IO uint32_t TTRMC; /*!< TT Reference Message Configuration register, Address offset: 0x104 */ + __IO uint32_t TTOCF; /*!< TT Operation Configuration register, Address offset: 0x108 */ + __IO uint32_t TTMLM; /*!< TT Matrix Limits register, Address offset: 0x10C */ + __IO uint32_t TURCF; /*!< TUR Configuration register, Address offset: 0x110 */ + __IO uint32_t TTOCN; /*!< TT Operation Control register, Address offset: 0x114 */ + __IO uint32_t TTGTP; /*!< TT Global Time Preset register, Address offset: 0x118 */ + __IO uint32_t TTTMK; /*!< TT Time Mark register, Address offset: 0x11C */ + __IO uint32_t TTIR; /*!< TT Interrupt register, Address offset: 0x120 */ + __IO uint32_t TTIE; /*!< TT Interrupt Enable register, Address offset: 0x124 */ + __IO uint32_t TTILS; /*!< TT Interrupt Line Select register, Address offset: 0x128 */ + __IO uint32_t TTOST; /*!< TT Operation Status register, Address offset: 0x12C */ + __IO uint32_t TURNA; /*!< TT TUR Numerator Actual register, Address offset: 0x130 */ + __IO uint32_t TTLGT; /*!< TT Local and Global Time register, Address offset: 0x134 */ + __IO uint32_t TTCTC; /*!< TT Cycle Time and Count register, Address offset: 0x138 */ + __IO uint32_t TTCPT; /*!< TT Capture Time register, Address offset: 0x13C */ + __IO uint32_t TTCSM; /*!< TT Cycle Sync Mark register, Address offset: 0x140 */ + __IO uint32_t RESERVED1[111]; /*!< Reserved, 0x144 - 0x2FC */ + __IO uint32_t TTTS; /*!< TT Trigger Select register, Address offset: 0x300 */ +} TTCAN_TypeDef; + +/** + * @brief FD Controller Area Network + */ + +typedef struct +{ + __IO uint32_t CREL; /*!< Clock Calibration Unit Core Release register, Address offset: 0x00 */ + __IO uint32_t CCFG; /*!< Calibration Configuration register, Address offset: 0x04 */ + __IO uint32_t CSTAT; /*!< Calibration Status register, Address offset: 0x08 */ + __IO uint32_t CWD; /*!< Calibration Watchdog register, Address offset: 0x0C */ + __IO uint32_t IR; /*!< CCU Interrupt register, Address offset: 0x10 */ + __IO uint32_t IE; /*!< CCU Interrupt Enable register, Address offset: 0x14 */ +} FDCAN_ClockCalibrationUnit_TypeDef; + + +/** + * @brief Consumer Electronics Control + */ + +typedef struct +{ + __IO uint32_t CR; /*!< CEC control register, Address offset:0x00 */ + __IO uint32_t CFGR; /*!< CEC configuration register, Address offset:0x04 */ + __IO uint32_t TXDR; /*!< CEC Tx data register , Address offset:0x08 */ + __IO uint32_t RXDR; /*!< CEC Rx Data Register, Address offset:0x0C */ + __IO uint32_t ISR; /*!< CEC Interrupt and Status Register, Address offset:0x10 */ + __IO uint32_t IER; /*!< CEC interrupt enable register, Address offset:0x14 */ +}CEC_TypeDef; + +/** + * @brief COordincate Rotation DIgital Computer + */ +typedef struct +{ + __IO uint32_t CSR; /*!< CORDIC control and status register, Address offset: 0x00 */ + __IO uint32_t WDATA; /*!< CORDIC argument register, Address offset: 0x04 */ + __IO uint32_t RDATA; /*!< CORDIC result register, Address offset: 0x08 */ +} CORDIC_TypeDef; + +/** + * @brief CRC calculation unit + */ + +typedef struct +{ + __IO uint32_t DR; /*!< CRC Data register, Address offset: 0x00 */ + __IO uint32_t IDR; /*!< CRC Independent data register, Address offset: 0x04 */ + __IO uint32_t CR; /*!< CRC Control register, Address offset: 0x08 */ + uint32_t RESERVED2; /*!< Reserved, 0x0C */ + __IO uint32_t INIT; /*!< Initial CRC value register, Address offset: 0x10 */ + __IO uint32_t POL; /*!< CRC polynomial register, Address offset: 0x14 */ +} CRC_TypeDef; + + +/** + * @brief Clock Recovery System + */ +typedef struct +{ +__IO uint32_t CR; /*!< CRS ccontrol register, Address offset: 0x00 */ +__IO uint32_t CFGR; /*!< CRS configuration register, Address offset: 0x04 */ +__IO uint32_t ISR; /*!< CRS interrupt and status register, Address offset: 0x08 */ +__IO uint32_t ICR; /*!< CRS interrupt flag clear register, Address offset: 0x0C */ +} CRS_TypeDef; + + +/** + * @brief Digital to Analog Converter + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DAC control register, Address offset: 0x00 */ + __IO uint32_t SWTRIGR; /*!< DAC software trigger register, Address offset: 0x04 */ + __IO uint32_t DHR12R1; /*!< DAC channel1 12-bit right-aligned data holding register, Address offset: 0x08 */ + __IO uint32_t DHR12L1; /*!< DAC channel1 12-bit left aligned data holding register, Address offset: 0x0C */ + __IO uint32_t DHR8R1; /*!< DAC channel1 8-bit right aligned data holding register, Address offset: 0x10 */ + __IO uint32_t DHR12R2; /*!< DAC channel2 12-bit right aligned data holding register, Address offset: 0x14 */ + __IO uint32_t DHR12L2; /*!< DAC channel2 12-bit left aligned data holding register, Address offset: 0x18 */ + __IO uint32_t DHR8R2; /*!< DAC channel2 8-bit right-aligned data holding register, Address offset: 0x1C */ + __IO uint32_t DHR12RD; /*!< Dual DAC 12-bit right-aligned data holding register, Address offset: 0x20 */ + __IO uint32_t DHR12LD; /*!< DUAL DAC 12-bit left aligned data holding register, Address offset: 0x24 */ + __IO uint32_t DHR8RD; /*!< DUAL DAC 8-bit right aligned data holding register, Address offset: 0x28 */ + __IO uint32_t DOR1; /*!< DAC channel1 data output register, Address offset: 0x2C */ + __IO uint32_t DOR2; /*!< DAC channel2 data output register, Address offset: 0x30 */ + __IO uint32_t SR; /*!< DAC status register, Address offset: 0x34 */ + __IO uint32_t CCR; /*!< DAC calibration control register, Address offset: 0x38 */ + __IO uint32_t MCR; /*!< DAC mode control register, Address offset: 0x3C */ + __IO uint32_t SHSR1; /*!< DAC Sample and Hold sample time register 1, Address offset: 0x40 */ + __IO uint32_t SHSR2; /*!< DAC Sample and Hold sample time register 2, Address offset: 0x44 */ + __IO uint32_t SHHR; /*!< DAC Sample and Hold hold time register, Address offset: 0x48 */ + __IO uint32_t SHRR; /*!< DAC Sample and Hold refresh time register, Address offset: 0x4C */ +} DAC_TypeDef; + +/** + * @brief DFSDM module registers + */ +typedef struct +{ + __IO uint32_t FLTCR1; /*!< DFSDM control register1, Address offset: 0x100 */ + __IO uint32_t FLTCR2; /*!< DFSDM control register2, Address offset: 0x104 */ + __IO uint32_t FLTISR; /*!< DFSDM interrupt and status register, Address offset: 0x108 */ + __IO uint32_t FLTICR; /*!< DFSDM interrupt flag clear register, Address offset: 0x10C */ + __IO uint32_t FLTJCHGR; /*!< DFSDM injected channel group selection register, Address offset: 0x110 */ + __IO uint32_t FLTFCR; /*!< DFSDM filter control register, Address offset: 0x114 */ + __IO uint32_t FLTJDATAR; /*!< DFSDM data register for injected group, Address offset: 0x118 */ + __IO uint32_t FLTRDATAR; /*!< DFSDM data register for regular group, Address offset: 0x11C */ + __IO uint32_t FLTAWHTR; /*!< DFSDM analog watchdog high threshold register, Address offset: 0x120 */ + __IO uint32_t FLTAWLTR; /*!< DFSDM analog watchdog low threshold register, Address offset: 0x124 */ + __IO uint32_t FLTAWSR; /*!< DFSDM analog watchdog status register Address offset: 0x128 */ + __IO uint32_t FLTAWCFR; /*!< DFSDM analog watchdog clear flag register Address offset: 0x12C */ + __IO uint32_t FLTEXMAX; /*!< DFSDM extreme detector maximum register, Address offset: 0x130 */ + __IO uint32_t FLTEXMIN; /*!< DFSDM extreme detector minimum register Address offset: 0x134 */ + __IO uint32_t FLTCNVTIMR; /*!< DFSDM conversion timer, Address offset: 0x138 */ +} DFSDM_Filter_TypeDef; + +/** + * @brief DFSDM channel configuration registers + */ +typedef struct +{ + __IO uint32_t CHCFGR1; /*!< DFSDM channel configuration register1, Address offset: 0x00 */ + __IO uint32_t CHCFGR2; /*!< DFSDM channel configuration register2, Address offset: 0x04 */ + __IO uint32_t CHAWSCDR; /*!< DFSDM channel analog watchdog and + short circuit detector register, Address offset: 0x08 */ + __IO uint32_t CHWDATAR; /*!< DFSDM channel watchdog filter data register, Address offset: 0x0C */ + __IO uint32_t CHDATINR; /*!< DFSDM channel data input register, Address offset: 0x10 */ +} DFSDM_Channel_TypeDef; + +/** + * @brief Debug MCU + */ +typedef struct +{ + __IO uint32_t IDCODE; /*!< MCU device ID code, Address offset: 0x00 */ + __IO uint32_t CR; /*!< Debug MCU configuration register, Address offset: 0x04 */ + uint32_t RESERVED4[11]; /*!< Reserved, Address offset: 0x08 */ + __IO uint32_t APB3FZ1; /*!< Debug MCU APB3FZ1 freeze register, Address offset: 0x34 */ + uint32_t RESERVED5; /*!< Reserved, Address offset: 0x38 */ + __IO uint32_t APB1LFZ1; /*!< Debug MCU APB1LFZ1 freeze register, Address offset: 0x3C */ + uint32_t RESERVED6; /*!< Reserved, Address offset: 0x40 */ + __IO uint32_t APB1HFZ1; /*!< Debug MCU APB1LFZ1 freeze register, Address offset: 0x44 */ + uint32_t RESERVED7; /*!< Reserved, Address offset: 0x48 */ + __IO uint32_t APB2FZ1; /*!< Debug MCU APB2FZ1 freeze register, Address offset: 0x4C */ + uint32_t RESERVED8; /*!< Reserved, Address offset: 0x50 */ + __IO uint32_t APB4FZ1; /*!< Debug MCU APB4FZ1 freeze register, Address offset: 0x54 */ + __IO uint32_t RESERVED9[990]; /*!< Reserved, Address offset: 0x58-0xFCC */ + __IO uint32_t PIDR4; /*!< Debug MCU peripheral identity register 4, Address offset: 0xFD0 */ + __IO uint32_t RESERVED10[3];/*!< Reserved, Address offset: 0xFD4-0xFDC */ + __IO uint32_t PIDR0; /*!< Debug MCU peripheral identity register 0, Address offset: 0xFE0 */ + __IO uint32_t PIDR1; /*!< Debug MCU peripheral identity register 1, Address offset: 0xFE4 */ + __IO uint32_t PIDR2; /*!< Debug MCU peripheral identity register 2, Address offset: 0xFE8 */ + __IO uint32_t PIDR3; /*!< Debug MCU peripheral identity register 3, Address offset: 0xFEC */ + __IO uint32_t CIDR0; /*!< Debug MCU component identity register 0, Address offset: 0xFF0 */ + __IO uint32_t CIDR1; /*!< Debug MCU component identity register 1, Address offset: 0xFF4 */ + __IO uint32_t CIDR2; /*!< Debug MCU component identity register 2, Address offset: 0xFF8 */ + __IO uint32_t CIDR3; /*!< Debug MCU component identity register 3, Address offset: 0xFFC */ +}DBGMCU_TypeDef; +/** + * @brief DCMI + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DCMI control register 1, Address offset: 0x00 */ + __IO uint32_t SR; /*!< DCMI status register, Address offset: 0x04 */ + __IO uint32_t RISR; /*!< DCMI raw interrupt status register, Address offset: 0x08 */ + __IO uint32_t IER; /*!< DCMI interrupt enable register, Address offset: 0x0C */ + __IO uint32_t MISR; /*!< DCMI masked interrupt status register, Address offset: 0x10 */ + __IO uint32_t ICR; /*!< DCMI interrupt clear register, Address offset: 0x14 */ + __IO uint32_t ESCR; /*!< DCMI embedded synchronization code register, Address offset: 0x18 */ + __IO uint32_t ESUR; /*!< DCMI embedded synchronization unmask register, Address offset: 0x1C */ + __IO uint32_t CWSTRTR; /*!< DCMI crop window start, Address offset: 0x20 */ + __IO uint32_t CWSIZER; /*!< DCMI crop window size, Address offset: 0x24 */ + __IO uint32_t DR; /*!< DCMI data register, Address offset: 0x28 */ +} DCMI_TypeDef; + +/** + * @brief PSSI + */ + +typedef struct +{ + __IO uint32_t CR; /*!< PSSI control register 1, Address offset: 0x000 */ + __IO uint32_t SR; /*!< PSSI status register, Address offset: 0x004 */ + __IO uint32_t RIS; /*!< PSSI raw interrupt status register, Address offset: 0x008 */ + __IO uint32_t IER; /*!< PSSI interrupt enable register, Address offset: 0x00C */ + __IO uint32_t MIS; /*!< PSSI masked interrupt status register, Address offset: 0x010 */ + __IO uint32_t ICR; /*!< PSSI interrupt clear register, Address offset: 0x014 */ + __IO uint32_t RESERVED1[4]; /*!< Reserved, 0x018 - 0x024 */ + __IO uint32_t DR; /*!< PSSI data register, Address offset: 0x028 */ + __IO uint32_t RESERVED2[241]; /*!< Reserved, 0x02C - 0x3EC */ + __IO uint32_t HWCFGR; /*!< PSSI IP HW configuration register, Address offset: 0x3F0 */ + __IO uint32_t VERR; /*!< PSSI IP version register, Address offset: 0x3F4 */ + __IO uint32_t IPIDR; /*!< PSSI IP ID register, Address offset: 0x3F8 */ + __IO uint32_t SIDR; /*!< PSSI SIZE ID register, Address offset: 0x3FC */ +} PSSI_TypeDef; + +/** + * @brief DMA Controller + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DMA stream x configuration register */ + __IO uint32_t NDTR; /*!< DMA stream x number of data register */ + __IO uint32_t PAR; /*!< DMA stream x peripheral address register */ + __IO uint32_t M0AR; /*!< DMA stream x memory 0 address register */ + __IO uint32_t M1AR; /*!< DMA stream x memory 1 address register */ + __IO uint32_t FCR; /*!< DMA stream x FIFO control register */ +} DMA_Stream_TypeDef; + +typedef struct +{ + __IO uint32_t LISR; /*!< DMA low interrupt status register, Address offset: 0x00 */ + __IO uint32_t HISR; /*!< DMA high interrupt status register, Address offset: 0x04 */ + __IO uint32_t LIFCR; /*!< DMA low interrupt flag clear register, Address offset: 0x08 */ + __IO uint32_t HIFCR; /*!< DMA high interrupt flag clear register, Address offset: 0x0C */ +} DMA_TypeDef; + +typedef struct +{ + __IO uint32_t CCR; /*!< DMA channel x configuration register */ + __IO uint32_t CNDTR; /*!< DMA channel x number of data register */ + __IO uint32_t CPAR; /*!< DMA channel x peripheral address register */ + __IO uint32_t CM0AR; /*!< DMA channel x memory 0 address register */ + __IO uint32_t CM1AR; /*!< DMA channel x memory 1 address register */ +} BDMA_Channel_TypeDef; + +typedef struct +{ + __IO uint32_t ISR; /*!< DMA interrupt status register, Address offset: 0x00 */ + __IO uint32_t IFCR; /*!< DMA interrupt flag clear register, Address offset: 0x04 */ +} BDMA_TypeDef; + +typedef struct +{ + __IO uint32_t CCR; /*!< DMA Multiplexer Channel x Control Register */ +}DMAMUX_Channel_TypeDef; + +typedef struct +{ + __IO uint32_t CSR; /*!< DMA Channel Status Register */ + __IO uint32_t CFR; /*!< DMA Channel Clear Flag Register */ +}DMAMUX_ChannelStatus_TypeDef; + +typedef struct +{ + __IO uint32_t RGCR; /*!< DMA Request Generator x Control Register */ +}DMAMUX_RequestGen_TypeDef; + +typedef struct +{ + __IO uint32_t RGSR; /*!< DMA Request Generator Status Register */ + __IO uint32_t RGCFR; /*!< DMA Request Generator Clear Flag Register */ +}DMAMUX_RequestGenStatus_TypeDef; + +/** + * @brief MDMA Controller + */ +typedef struct +{ + __IO uint32_t GISR0; /*!< MDMA Global Interrupt/Status Register 0, Address offset: 0x00 */ +}MDMA_TypeDef; + +typedef struct +{ + __IO uint32_t CISR; /*!< MDMA channel x interrupt/status register, Address offset: 0x40 */ + __IO uint32_t CIFCR; /*!< MDMA channel x interrupt flag clear register, Address offset: 0x44 */ + __IO uint32_t CESR; /*!< MDMA Channel x error status register, Address offset: 0x48 */ + __IO uint32_t CCR; /*!< MDMA channel x control register, Address offset: 0x4C */ + __IO uint32_t CTCR; /*!< MDMA channel x Transfer Configuration register, Address offset: 0x50 */ + __IO uint32_t CBNDTR; /*!< MDMA Channel x block number of data register, Address offset: 0x54 */ + __IO uint32_t CSAR; /*!< MDMA channel x source address register, Address offset: 0x58 */ + __IO uint32_t CDAR; /*!< MDMA channel x destination address register, Address offset: 0x5C */ + __IO uint32_t CBRUR; /*!< MDMA channel x Block Repeat address Update register, Address offset: 0x60 */ + __IO uint32_t CLAR; /*!< MDMA channel x Link Address register, Address offset: 0x64 */ + __IO uint32_t CTBR; /*!< MDMA channel x Trigger and Bus selection Register, Address offset: 0x68 */ + uint32_t RESERVED0; /*!< Reserved, 0x68 */ + __IO uint32_t CMAR; /*!< MDMA channel x Mask address register, Address offset: 0x70 */ + __IO uint32_t CMDR; /*!< MDMA channel x Mask Data register, Address offset: 0x74 */ +}MDMA_Channel_TypeDef; + +/** + * @brief DMA2D Controller + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DMA2D Control Register, Address offset: 0x00 */ + __IO uint32_t ISR; /*!< DMA2D Interrupt Status Register, Address offset: 0x04 */ + __IO uint32_t IFCR; /*!< DMA2D Interrupt Flag Clear Register, Address offset: 0x08 */ + __IO uint32_t FGMAR; /*!< DMA2D Foreground Memory Address Register, Address offset: 0x0C */ + __IO uint32_t FGOR; /*!< DMA2D Foreground Offset Register, Address offset: 0x10 */ + __IO uint32_t BGMAR; /*!< DMA2D Background Memory Address Register, Address offset: 0x14 */ + __IO uint32_t BGOR; /*!< DMA2D Background Offset Register, Address offset: 0x18 */ + __IO uint32_t FGPFCCR; /*!< DMA2D Foreground PFC Control Register, Address offset: 0x1C */ + __IO uint32_t FGCOLR; /*!< DMA2D Foreground Color Register, Address offset: 0x20 */ + __IO uint32_t BGPFCCR; /*!< DMA2D Background PFC Control Register, Address offset: 0x24 */ + __IO uint32_t BGCOLR; /*!< DMA2D Background Color Register, Address offset: 0x28 */ + __IO uint32_t FGCMAR; /*!< DMA2D Foreground CLUT Memory Address Register, Address offset: 0x2C */ + __IO uint32_t BGCMAR; /*!< DMA2D Background CLUT Memory Address Register, Address offset: 0x30 */ + __IO uint32_t OPFCCR; /*!< DMA2D Output PFC Control Register, Address offset: 0x34 */ + __IO uint32_t OCOLR; /*!< DMA2D Output Color Register, Address offset: 0x38 */ + __IO uint32_t OMAR; /*!< DMA2D Output Memory Address Register, Address offset: 0x3C */ + __IO uint32_t OOR; /*!< DMA2D Output Offset Register, Address offset: 0x40 */ + __IO uint32_t NLR; /*!< DMA2D Number of Line Register, Address offset: 0x44 */ + __IO uint32_t LWR; /*!< DMA2D Line Watermark Register, Address offset: 0x48 */ + __IO uint32_t AMTCR; /*!< DMA2D AHB Master Timer Configuration Register, Address offset: 0x4C */ + uint32_t RESERVED[236]; /*!< Reserved, 0x50-0x3FF */ + __IO uint32_t FGCLUT[256]; /*!< DMA2D Foreground CLUT, Address offset:400-7FF */ + __IO uint32_t BGCLUT[256]; /*!< DMA2D Background CLUT, Address offset:800-BFF */ +} DMA2D_TypeDef; + + +/** + * @brief Ethernet MAC + */ +typedef struct +{ + __IO uint32_t MACCR; + __IO uint32_t MACECR; + __IO uint32_t MACPFR; + __IO uint32_t MACWTR; + __IO uint32_t MACHT0R; + __IO uint32_t MACHT1R; + uint32_t RESERVED1[14]; + __IO uint32_t MACVTR; + uint32_t RESERVED2; + __IO uint32_t MACVHTR; + uint32_t RESERVED3; + __IO uint32_t MACVIR; + __IO uint32_t MACIVIR; + uint32_t RESERVED4[2]; + __IO uint32_t MACTFCR; + uint32_t RESERVED5[7]; + __IO uint32_t MACRFCR; + uint32_t RESERVED6[7]; + __IO uint32_t MACISR; + __IO uint32_t MACIER; + __IO uint32_t MACRXTXSR; + uint32_t RESERVED7; + __IO uint32_t MACPCSR; + __IO uint32_t MACRWKPFR; + uint32_t RESERVED8[2]; + __IO uint32_t MACLCSR; + __IO uint32_t MACLTCR; + __IO uint32_t MACLETR; + __IO uint32_t MAC1USTCR; + uint32_t RESERVED9[12]; + __IO uint32_t MACVR; + __IO uint32_t MACDR; + uint32_t RESERVED10; + __IO uint32_t MACHWF0R; + __IO uint32_t MACHWF1R; + __IO uint32_t MACHWF2R; + uint32_t RESERVED11[54]; + __IO uint32_t MACMDIOAR; + __IO uint32_t MACMDIODR; + uint32_t RESERVED12[2]; + __IO uint32_t MACARPAR; + uint32_t RESERVED13[59]; + __IO uint32_t MACA0HR; + __IO uint32_t MACA0LR; + __IO uint32_t MACA1HR; + __IO uint32_t MACA1LR; + __IO uint32_t MACA2HR; + __IO uint32_t MACA2LR; + __IO uint32_t MACA3HR; + __IO uint32_t MACA3LR; + uint32_t RESERVED14[248]; + __IO uint32_t MMCCR; + __IO uint32_t MMCRIR; + __IO uint32_t MMCTIR; + __IO uint32_t MMCRIMR; + __IO uint32_t MMCTIMR; + uint32_t RESERVED15[14]; + __IO uint32_t MMCTSCGPR; + __IO uint32_t MMCTMCGPR; + uint32_t RESERVED16[5]; + __IO uint32_t MMCTPCGR; + uint32_t RESERVED17[10]; + __IO uint32_t MMCRCRCEPR; + __IO uint32_t MMCRAEPR; + uint32_t RESERVED18[10]; + __IO uint32_t MMCRUPGR; + uint32_t RESERVED19[9]; + __IO uint32_t MMCTLPIMSTR; + __IO uint32_t MMCTLPITCR; + __IO uint32_t MMCRLPIMSTR; + __IO uint32_t MMCRLPITCR; + uint32_t RESERVED20[65]; + __IO uint32_t MACL3L4C0R; + __IO uint32_t MACL4A0R; + uint32_t RESERVED21[2]; + __IO uint32_t MACL3A0R0R; + __IO uint32_t MACL3A1R0R; + __IO uint32_t MACL3A2R0R; + __IO uint32_t MACL3A3R0R; + uint32_t RESERVED22[4]; + __IO uint32_t MACL3L4C1R; + __IO uint32_t MACL4A1R; + uint32_t RESERVED23[2]; + __IO uint32_t MACL3A0R1R; + __IO uint32_t MACL3A1R1R; + __IO uint32_t MACL3A2R1R; + __IO uint32_t MACL3A3R1R; + uint32_t RESERVED24[108]; + __IO uint32_t MACTSCR; + __IO uint32_t MACSSIR; + __IO uint32_t MACSTSR; + __IO uint32_t MACSTNR; + __IO uint32_t MACSTSUR; + __IO uint32_t MACSTNUR; + __IO uint32_t MACTSAR; + uint32_t RESERVED25; + __IO uint32_t MACTSSR; + uint32_t RESERVED26[3]; + __IO uint32_t MACTTSSNR; + __IO uint32_t MACTTSSSR; + uint32_t RESERVED27[2]; + __IO uint32_t MACACR; + uint32_t RESERVED28; + __IO uint32_t MACATSNR; + __IO uint32_t MACATSSR; + __IO uint32_t MACTSIACR; + __IO uint32_t MACTSEACR; + __IO uint32_t MACTSICNR; + __IO uint32_t MACTSECNR; + uint32_t RESERVED29[4]; + __IO uint32_t MACPPSCR; + uint32_t RESERVED30[3]; + __IO uint32_t MACPPSTTSR; + __IO uint32_t MACPPSTTNR; + __IO uint32_t MACPPSIR; + __IO uint32_t MACPPSWR; + uint32_t RESERVED31[12]; + __IO uint32_t MACPOCR; + __IO uint32_t MACSPI0R; + __IO uint32_t MACSPI1R; + __IO uint32_t MACSPI2R; + __IO uint32_t MACLMIR; + uint32_t RESERVED32[11]; + __IO uint32_t MTLOMR; + uint32_t RESERVED33[7]; + __IO uint32_t MTLISR; + uint32_t RESERVED34[55]; + __IO uint32_t MTLTQOMR; + __IO uint32_t MTLTQUR; + __IO uint32_t MTLTQDR; + uint32_t RESERVED35[8]; + __IO uint32_t MTLQICSR; + __IO uint32_t MTLRQOMR; + __IO uint32_t MTLRQMPOCR; + __IO uint32_t MTLRQDR; + uint32_t RESERVED36[177]; + __IO uint32_t DMAMR; + __IO uint32_t DMASBMR; + __IO uint32_t DMAISR; + __IO uint32_t DMADSR; + uint32_t RESERVED37[60]; + __IO uint32_t DMACCR; + __IO uint32_t DMACTCR; + __IO uint32_t DMACRCR; + uint32_t RESERVED38[2]; + __IO uint32_t DMACTDLAR; + uint32_t RESERVED39; + __IO uint32_t DMACRDLAR; + __IO uint32_t DMACTDTPR; + uint32_t RESERVED40; + __IO uint32_t DMACRDTPR; + __IO uint32_t DMACTDRLR; + __IO uint32_t DMACRDRLR; + __IO uint32_t DMACIER; + __IO uint32_t DMACRIWTR; +__IO uint32_t DMACSFCSR; + uint32_t RESERVED41; + __IO uint32_t DMACCATDR; + uint32_t RESERVED42; + __IO uint32_t DMACCARDR; + uint32_t RESERVED43; + __IO uint32_t DMACCATBR; + uint32_t RESERVED44; + __IO uint32_t DMACCARBR; + __IO uint32_t DMACSR; +uint32_t RESERVED45[2]; +__IO uint32_t DMACMFCR; +}ETH_TypeDef; +/** + * @brief External Interrupt/Event Controller + */ + +typedef struct +{ +__IO uint32_t RTSR1; /*!< EXTI Rising trigger selection register, Address offset: 0x00 */ +__IO uint32_t FTSR1; /*!< EXTI Falling trigger selection register, Address offset: 0x04 */ +__IO uint32_t SWIER1; /*!< EXTI Software interrupt event register, Address offset: 0x08 */ +__IO uint32_t D3PMR1; /*!< EXTI D3 Pending mask register, (same register as to SRDPMR1) Address offset: 0x0C */ +__IO uint32_t D3PCR1L; /*!< EXTI D3 Pending clear selection register low, (same register as to SRDPCR1L) Address offset: 0x10 */ +__IO uint32_t D3PCR1H; /*!< EXTI D3 Pending clear selection register High, (same register as to SRDPCR1H) Address offset: 0x14 */ +uint32_t RESERVED1[2]; /*!< Reserved, 0x18 to 0x1C */ +__IO uint32_t RTSR2; /*!< EXTI Rising trigger selection register, Address offset: 0x20 */ +__IO uint32_t FTSR2; /*!< EXTI Falling trigger selection register, Address offset: 0x24 */ +__IO uint32_t SWIER2; /*!< EXTI Software interrupt event register, Address offset: 0x28 */ +__IO uint32_t D3PMR2; /*!< EXTI D3 Pending mask register, (same register as to SRDPMR2) Address offset: 0x2C */ +__IO uint32_t D3PCR2L; /*!< EXTI D3 Pending clear selection register low, (same register as to SRDPCR2L) Address offset: 0x30 */ +__IO uint32_t D3PCR2H; /*!< EXTI D3 Pending clear selection register High, (same register as to SRDPCR2H) Address offset: 0x34 */ +uint32_t RESERVED2[2]; /*!< Reserved, 0x38 to 0x3C */ +__IO uint32_t RTSR3; /*!< EXTI Rising trigger selection register, Address offset: 0x40 */ +__IO uint32_t FTSR3; /*!< EXTI Falling trigger selection register, Address offset: 0x44 */ +__IO uint32_t SWIER3; /*!< EXTI Software interrupt event register, Address offset: 0x48 */ +__IO uint32_t D3PMR3; /*!< EXTI D3 Pending mask register, (same register as to SRDPMR3) Address offset: 0x4C */ +__IO uint32_t D3PCR3L; /*!< EXTI D3 Pending clear selection register low, (same register as to SRDPCR3L) Address offset: 0x50 */ +__IO uint32_t D3PCR3H; /*!< EXTI D3 Pending clear selection register High, (same register as to SRDPCR3H) Address offset: 0x54 */ +uint32_t RESERVED3[10]; /*!< Reserved, 0x58 to 0x7C */ +__IO uint32_t IMR1; /*!< EXTI Interrupt mask register, Address offset: 0x80 */ +__IO uint32_t EMR1; /*!< EXTI Event mask register, Address offset: 0x84 */ +__IO uint32_t PR1; /*!< EXTI Pending register, Address offset: 0x88 */ +uint32_t RESERVED4; /*!< Reserved, 0x8C */ +__IO uint32_t IMR2; /*!< EXTI Interrupt mask register, Address offset: 0x90 */ +__IO uint32_t EMR2; /*!< EXTI Event mask register, Address offset: 0x94 */ +__IO uint32_t PR2; /*!< EXTI Pending register, Address offset: 0x98 */ +uint32_t RESERVED5; /*!< Reserved, 0x9C */ +__IO uint32_t IMR3; /*!< EXTI Interrupt mask register, Address offset: 0xA0 */ +__IO uint32_t EMR3; /*!< EXTI Event mask register, Address offset: 0xA4 */ +__IO uint32_t PR3; /*!< EXTI Pending register, Address offset: 0xA8 */ +}EXTI_TypeDef; + +typedef struct +{ +__IO uint32_t IMR1; /*!< EXTI Interrupt mask register, Address offset: 0x00 */ +__IO uint32_t EMR1; /*!< EXTI Event mask register, Address offset: 0x04 */ +__IO uint32_t PR1; /*!< EXTI Pending register, Address offset: 0x08 */ +uint32_t RESERVED1; /*!< Reserved, 0x0C */ +__IO uint32_t IMR2; /*!< EXTI Interrupt mask register, Address offset: 0x10 */ +__IO uint32_t EMR2; /*!< EXTI Event mask register, Address offset: 0x14 */ +__IO uint32_t PR2; /*!< EXTI Pending register, Address offset: 0x18 */ +uint32_t RESERVED2; /*!< Reserved, 0x1C */ +__IO uint32_t IMR3; /*!< EXTI Interrupt mask register, Address offset: 0x20 */ +__IO uint32_t EMR3; /*!< EXTI Event mask register, Address offset: 0x24 */ +__IO uint32_t PR3; /*!< EXTI Pending register, Address offset: 0x28 */ +}EXTI_Core_TypeDef; + + +/** + * @brief FLASH Registers + */ + +typedef struct +{ + __IO uint32_t ACR; /*!< FLASH access control register, Address offset: 0x00 */ + __IO uint32_t KEYR1; /*!< Flash Key Register for bank1, Address offset: 0x04 */ + __IO uint32_t OPTKEYR; /*!< Flash Option Key Register, Address offset: 0x08 */ + __IO uint32_t CR1; /*!< Flash Control Register for bank1, Address offset: 0x0C */ + __IO uint32_t SR1; /*!< Flash Status Register for bank1, Address offset: 0x10 */ + __IO uint32_t CCR1; /*!< Flash Control Register for bank1, Address offset: 0x14 */ + __IO uint32_t OPTCR; /*!< Flash Option Control Register, Address offset: 0x18 */ + __IO uint32_t OPTSR_CUR; /*!< Flash Option Status Current Register, Address offset: 0x1C */ + __IO uint32_t OPTSR_PRG; /*!< Flash Option Status to Program Register, Address offset: 0x20 */ + __IO uint32_t OPTCCR; /*!< Flash Option Clear Control Register, Address offset: 0x24 */ + __IO uint32_t PRAR_CUR1; /*!< Flash Current Protection Address Register for bank1, Address offset: 0x28 */ + __IO uint32_t PRAR_PRG1; /*!< Flash Protection Address to Program Register for bank1, Address offset: 0x2C */ + __IO uint32_t SCAR_CUR1; /*!< Flash Current Secure Address Register for bank1, Address offset: 0x30 */ + __IO uint32_t SCAR_PRG1; /*!< Flash Secure Address to Program Register for bank1, Address offset: 0x34 */ + __IO uint32_t WPSN_CUR1; /*!< Flash Current Write Protection Register on bank1, Address offset: 0x38 */ + __IO uint32_t WPSN_PRG1; /*!< Flash Write Protection to Program Register on bank1, Address offset: 0x3C */ + __IO uint32_t BOOT_CUR; /*!< Flash Current Boot Address for Pelican Core Register, Address offset: 0x40 */ + __IO uint32_t BOOT_PRG; /*!< Flash Boot Address to Program for Pelican Core Register, Address offset: 0x44 */ + uint32_t RESERVED0[2]; /*!< Reserved, 0x48 to 0x4C */ + __IO uint32_t CRCCR1; /*!< Flash CRC Control register For Bank1 Register , Address offset: 0x50 */ + __IO uint32_t CRCSADD1; /*!< Flash CRC Start Address Register for Bank1 , Address offset: 0x54 */ + __IO uint32_t CRCEADD1; /*!< Flash CRC End Address Register for Bank1 , Address offset: 0x58 */ + __IO uint32_t CRCDATA; /*!< Flash CRC Data Register for Bank1 , Address offset: 0x5C */ + __IO uint32_t ECC_FA1; /*!< Flash ECC Fail Address For Bank1 Register , Address offset: 0x60 */ + uint32_t RESERVED[3]; /*!< Reserved, 0x64 to 0x6C */ + __IO uint32_t OPTSR2_CUR; /*!< Flash Option Status Current Register 2, Address offset: 0x70 */ + __IO uint32_t OPTSR2_PRG; /*!< Flash Option Status to Program Register 2, Address offset: 0x74 */ +} FLASH_TypeDef; + +/** + * @brief Filter and Mathematical ACcelerator + */ +typedef struct +{ + __IO uint32_t X1BUFCFG; /*!< FMAC X1 Buffer Configuration register, Address offset: 0x00 */ + __IO uint32_t X2BUFCFG; /*!< FMAC X2 Buffer Configuration register, Address offset: 0x04 */ + __IO uint32_t YBUFCFG; /*!< FMAC Y Buffer Configuration register, Address offset: 0x08 */ + __IO uint32_t PARAM; /*!< FMAC Parameter register, Address offset: 0x0C */ + __IO uint32_t CR; /*!< FMAC Control register, Address offset: 0x10 */ + __IO uint32_t SR; /*!< FMAC Status register, Address offset: 0x14 */ + __IO uint32_t WDATA; /*!< FMAC Write Data register, Address offset: 0x18 */ + __IO uint32_t RDATA; /*!< FMAC Read Data register, Address offset: 0x1C */ +} FMAC_TypeDef; + +/** + * @brief Flexible Memory Controller + */ + +typedef struct +{ + __IO uint32_t BTCR[8]; /*!< NOR/PSRAM chip-select control register(BCR) and chip-select timing register(BTR), Address offset: 0x00-1C */ +} FMC_Bank1_TypeDef; + +/** + * @brief Flexible Memory Controller Bank1E + */ + +typedef struct +{ + __IO uint32_t BWTR[7]; /*!< NOR/PSRAM write timing registers, Address offset: 0x104-0x11C */ +} FMC_Bank1E_TypeDef; + +/** + * @brief Flexible Memory Controller Bank2 + */ + +typedef struct +{ + __IO uint32_t PCR2; /*!< NAND Flash control register 2, Address offset: 0x60 */ + __IO uint32_t SR2; /*!< NAND Flash FIFO status and interrupt register 2, Address offset: 0x64 */ + __IO uint32_t PMEM2; /*!< NAND Flash Common memory space timing register 2, Address offset: 0x68 */ + __IO uint32_t PATT2; /*!< NAND Flash Attribute memory space timing register 2, Address offset: 0x6C */ + uint32_t RESERVED0; /*!< Reserved, 0x70 */ + __IO uint32_t ECCR2; /*!< NAND Flash ECC result registers 2, Address offset: 0x74 */ +} FMC_Bank2_TypeDef; + +/** + * @brief Flexible Memory Controller Bank3 + */ + +typedef struct +{ + __IO uint32_t PCR; /*!< NAND Flash control register 3, Address offset: 0x80 */ + __IO uint32_t SR; /*!< NAND Flash FIFO status and interrupt register 3, Address offset: 0x84 */ + __IO uint32_t PMEM; /*!< NAND Flash Common memory space timing register 3, Address offset: 0x88 */ + __IO uint32_t PATT; /*!< NAND Flash Attribute memory space timing register 3, Address offset: 0x8C */ + uint32_t RESERVED; /*!< Reserved, 0x90 */ + __IO uint32_t ECCR; /*!< NAND Flash ECC result registers 3, Address offset: 0x94 */ +} FMC_Bank3_TypeDef; + +/** + * @brief Flexible Memory Controller Bank5 and 6 + */ + + +typedef struct +{ + __IO uint32_t SDCR[2]; /*!< SDRAM Control registers , Address offset: 0x140-0x144 */ + __IO uint32_t SDTR[2]; /*!< SDRAM Timing registers , Address offset: 0x148-0x14C */ + __IO uint32_t SDCMR; /*!< SDRAM Command Mode register, Address offset: 0x150 */ + __IO uint32_t SDRTR; /*!< SDRAM Refresh Timer register, Address offset: 0x154 */ + __IO uint32_t SDSR; /*!< SDRAM Status register, Address offset: 0x158 */ +} FMC_Bank5_6_TypeDef; + +/** + * @brief General Purpose I/O + */ + +typedef struct +{ + __IO uint32_t MODER; /*!< GPIO port mode register, Address offset: 0x00 */ + __IO uint32_t OTYPER; /*!< GPIO port output type register, Address offset: 0x04 */ + __IO uint32_t OSPEEDR; /*!< GPIO port output speed register, Address offset: 0x08 */ + __IO uint32_t PUPDR; /*!< GPIO port pull-up/pull-down register, Address offset: 0x0C */ + __IO uint32_t IDR; /*!< GPIO port input data register, Address offset: 0x10 */ + __IO uint32_t ODR; /*!< GPIO port output data register, Address offset: 0x14 */ + __IO uint32_t BSRR; /*!< GPIO port bit set/reset, Address offset: 0x18 */ + __IO uint32_t LCKR; /*!< GPIO port configuration lock register, Address offset: 0x1C */ + __IO uint32_t AFR[2]; /*!< GPIO alternate function registers, Address offset: 0x20-0x24 */ +} GPIO_TypeDef; + +/** + * @brief Operational Amplifier (OPAMP) + */ + +typedef struct +{ + __IO uint32_t CSR; /*!< OPAMP control/status register, Address offset: 0x00 */ + __IO uint32_t OTR; /*!< OPAMP offset trimming register for normal mode, Address offset: 0x04 */ + __IO uint32_t HSOTR; /*!< OPAMP offset trimming register for high speed mode, Address offset: 0x08 */ +} OPAMP_TypeDef; + +/** + * @brief System configuration controller + */ + +typedef struct +{ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x00 */ + __IO uint32_t PMCR; /*!< SYSCFG peripheral mode configuration register, Address offset: 0x04 */ + __IO uint32_t EXTICR[4]; /*!< SYSCFG external interrupt configuration registers, Address offset: 0x08-0x14 */ + __IO uint32_t CFGR; /*!< SYSCFG configuration registers, Address offset: 0x18 */ + uint32_t RESERVED2; /*!< Reserved, Address offset: 0x1C */ + __IO uint32_t CCCSR; /*!< SYSCFG compensation cell control/status register, Address offset: 0x20 */ + __IO uint32_t CCVR; /*!< SYSCFG compensation cell value register, Address offset: 0x24 */ + __IO uint32_t CCCR; /*!< SYSCFG compensation cell code register, Address offset: 0x28 */ + uint32_t RESERVED3; /*!< Reserved, Address offset: 0x2C */ + __IO uint32_t ADC2ALT; /*!< ADC2 internal input alternate connection register, Address offset: 0x30 */ + uint32_t RESERVED4[60]; /*!< Reserved, 0x34-0x120 */ + __IO uint32_t PKGR; /*!< SYSCFG package register, Address offset: 0x124 */ + uint32_t RESERVED5[118]; /*!< Reserved, 0x128-0x2FC */ + __IO uint32_t UR0; /*!< SYSCFG user register 0, Address offset: 0x300 */ + __IO uint32_t UR1; /*!< SYSCFG user register 1, Address offset: 0x304 */ + __IO uint32_t UR2; /*!< SYSCFG user register 2, Address offset: 0x308 */ + __IO uint32_t UR3; /*!< SYSCFG user register 3, Address offset: 0x30C */ + __IO uint32_t UR4; /*!< SYSCFG user register 4, Address offset: 0x310 */ + __IO uint32_t UR5; /*!< SYSCFG user register 5, Address offset: 0x314 */ + __IO uint32_t UR6; /*!< SYSCFG user register 6, Address offset: 0x318 */ + __IO uint32_t UR7; /*!< SYSCFG user register 7, Address offset: 0x31C */ + uint32_t RESERVED6[3]; /*!< Reserved, Address offset: 0x320-0x328 */ + __IO uint32_t UR11; /*!< SYSCFG user register 11, Address offset: 0x32C */ + __IO uint32_t UR12; /*!< SYSCFG user register 12, Address offset: 0x330 */ + __IO uint32_t UR13; /*!< SYSCFG user register 13, Address offset: 0x334 */ + __IO uint32_t UR14; /*!< SYSCFG user register 14, Address offset: 0x338 */ + __IO uint32_t UR15; /*!< SYSCFG user register 15, Address offset: 0x33C */ + __IO uint32_t UR16; /*!< SYSCFG user register 16, Address offset: 0x340 */ + __IO uint32_t UR17; /*!< SYSCFG user register 17, Address offset: 0x344 */ + __IO uint32_t UR18; /*!< SYSCFG user register 18, Address offset: 0x348 */ + +} SYSCFG_TypeDef; + +/** + * @brief Inter-integrated Circuit Interface + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< I2C Control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< I2C Control register 2, Address offset: 0x04 */ + __IO uint32_t OAR1; /*!< I2C Own address 1 register, Address offset: 0x08 */ + __IO uint32_t OAR2; /*!< I2C Own address 2 register, Address offset: 0x0C */ + __IO uint32_t TIMINGR; /*!< I2C Timing register, Address offset: 0x10 */ + __IO uint32_t TIMEOUTR; /*!< I2C Timeout register, Address offset: 0x14 */ + __IO uint32_t ISR; /*!< I2C Interrupt and status register, Address offset: 0x18 */ + __IO uint32_t ICR; /*!< I2C Interrupt clear register, Address offset: 0x1C */ + __IO uint32_t PECR; /*!< I2C PEC register, Address offset: 0x20 */ + __IO uint32_t RXDR; /*!< I2C Receive data register, Address offset: 0x24 */ + __IO uint32_t TXDR; /*!< I2C Transmit data register, Address offset: 0x28 */ +} I2C_TypeDef; + +/** + * @brief Independent WATCHDOG + */ + +typedef struct +{ + __IO uint32_t KR; /*!< IWDG Key register, Address offset: 0x00 */ + __IO uint32_t PR; /*!< IWDG Prescaler register, Address offset: 0x04 */ + __IO uint32_t RLR; /*!< IWDG Reload register, Address offset: 0x08 */ + __IO uint32_t SR; /*!< IWDG Status register, Address offset: 0x0C */ + __IO uint32_t WINR; /*!< IWDG Window register, Address offset: 0x10 */ +} IWDG_TypeDef; + + +/** + * @brief LCD-TFT Display Controller + */ + +typedef struct +{ + uint32_t RESERVED0[2]; /*!< Reserved, 0x00-0x04 */ + __IO uint32_t SSCR; /*!< LTDC Synchronization Size Configuration Register, Address offset: 0x08 */ + __IO uint32_t BPCR; /*!< LTDC Back Porch Configuration Register, Address offset: 0x0C */ + __IO uint32_t AWCR; /*!< LTDC Active Width Configuration Register, Address offset: 0x10 */ + __IO uint32_t TWCR; /*!< LTDC Total Width Configuration Register, Address offset: 0x14 */ + __IO uint32_t GCR; /*!< LTDC Global Control Register, Address offset: 0x18 */ + uint32_t RESERVED1[2]; /*!< Reserved, 0x1C-0x20 */ + __IO uint32_t SRCR; /*!< LTDC Shadow Reload Configuration Register, Address offset: 0x24 */ + uint32_t RESERVED2[1]; /*!< Reserved, 0x28 */ + __IO uint32_t BCCR; /*!< LTDC Background Color Configuration Register, Address offset: 0x2C */ + uint32_t RESERVED3[1]; /*!< Reserved, 0x30 */ + __IO uint32_t IER; /*!< LTDC Interrupt Enable Register, Address offset: 0x34 */ + __IO uint32_t ISR; /*!< LTDC Interrupt Status Register, Address offset: 0x38 */ + __IO uint32_t ICR; /*!< LTDC Interrupt Clear Register, Address offset: 0x3C */ + __IO uint32_t LIPCR; /*!< LTDC Line Interrupt Position Configuration Register, Address offset: 0x40 */ + __IO uint32_t CPSR; /*!< LTDC Current Position Status Register, Address offset: 0x44 */ + __IO uint32_t CDSR; /*!< LTDC Current Display Status Register, Address offset: 0x48 */ +} LTDC_TypeDef; + +/** + * @brief LCD-TFT Display layer x Controller + */ + +typedef struct +{ + __IO uint32_t CR; /*!< LTDC Layerx Control Register Address offset: 0x84 */ + __IO uint32_t WHPCR; /*!< LTDC Layerx Window Horizontal Position Configuration Register Address offset: 0x88 */ + __IO uint32_t WVPCR; /*!< LTDC Layerx Window Vertical Position Configuration Register Address offset: 0x8C */ + __IO uint32_t CKCR; /*!< LTDC Layerx Color Keying Configuration Register Address offset: 0x90 */ + __IO uint32_t PFCR; /*!< LTDC Layerx Pixel Format Configuration Register Address offset: 0x94 */ + __IO uint32_t CACR; /*!< LTDC Layerx Constant Alpha Configuration Register Address offset: 0x98 */ + __IO uint32_t DCCR; /*!< LTDC Layerx Default Color Configuration Register Address offset: 0x9C */ + __IO uint32_t BFCR; /*!< LTDC Layerx Blending Factors Configuration Register Address offset: 0xA0 */ + uint32_t RESERVED0[2]; /*!< Reserved */ + __IO uint32_t CFBAR; /*!< LTDC Layerx Color Frame Buffer Address Register Address offset: 0xAC */ + __IO uint32_t CFBLR; /*!< LTDC Layerx Color Frame Buffer Length Register Address offset: 0xB0 */ + __IO uint32_t CFBLNR; /*!< LTDC Layerx ColorFrame Buffer Line Number Register Address offset: 0xB4 */ + uint32_t RESERVED1[3]; /*!< Reserved */ + __IO uint32_t CLUTWR; /*!< LTDC Layerx CLUT Write Register Address offset: 0x144 */ + +} LTDC_Layer_TypeDef; + +/** + * @brief Power Control + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< PWR power control register 1, Address offset: 0x00 */ + __IO uint32_t CSR1; /*!< PWR power control status register 1, Address offset: 0x04 */ + __IO uint32_t CR2; /*!< PWR power control register 2, Address offset: 0x08 */ + __IO uint32_t CR3; /*!< PWR power control register 3, Address offset: 0x0C */ + __IO uint32_t CPUCR; /*!< PWR CPU control register, Address offset: 0x10 */ + uint32_t RESERVED0; /*!< Reserved, Address offset: 0x14 */ + __IO uint32_t D3CR; /*!< PWR D3 domain control register, Address offset: 0x18 */ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x1C */ + __IO uint32_t WKUPCR; /*!< PWR wakeup clear register, Address offset: 0x20 */ + __IO uint32_t WKUPFR; /*!< PWR wakeup flag register, Address offset: 0x24 */ + __IO uint32_t WKUPEPR; /*!< PWR wakeup enable and polarity register, Address offset: 0x28 */ +} PWR_TypeDef; + +/** + * @brief Reset and Clock Control + */ + +typedef struct +{ + __IO uint32_t CR; /*!< RCC clock control register, Address offset: 0x00 */ + __IO uint32_t HSICFGR; /*!< HSI Clock Calibration Register, Address offset: 0x04 */ + __IO uint32_t CRRCR; /*!< Clock Recovery RC Register, Address offset: 0x08 */ + __IO uint32_t CSICFGR; /*!< CSI Clock Calibration Register, Address offset: 0x0C */ + __IO uint32_t CFGR; /*!< RCC clock configuration register, Address offset: 0x10 */ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x14 */ + __IO uint32_t D1CFGR; /*!< RCC Domain 1 configuration register, Address offset: 0x18 */ + __IO uint32_t D2CFGR; /*!< RCC Domain 2 configuration register, Address offset: 0x1C */ + __IO uint32_t D3CFGR; /*!< RCC Domain 3 configuration register, Address offset: 0x20 */ + uint32_t RESERVED2; /*!< Reserved, Address offset: 0x24 */ + __IO uint32_t PLLCKSELR; /*!< RCC PLLs Clock Source Selection Register, Address offset: 0x28 */ + __IO uint32_t PLLCFGR; /*!< RCC PLLs Configuration Register, Address offset: 0x2C */ + __IO uint32_t PLL1DIVR; /*!< RCC PLL1 Dividers Configuration Register, Address offset: 0x30 */ + __IO uint32_t PLL1FRACR; /*!< RCC PLL1 Fractional Divider Configuration Register, Address offset: 0x34 */ + __IO uint32_t PLL2DIVR; /*!< RCC PLL2 Dividers Configuration Register, Address offset: 0x38 */ + __IO uint32_t PLL2FRACR; /*!< RCC PLL2 Fractional Divider Configuration Register, Address offset: 0x3C */ + __IO uint32_t PLL3DIVR; /*!< RCC PLL3 Dividers Configuration Register, Address offset: 0x40 */ + __IO uint32_t PLL3FRACR; /*!< RCC PLL3 Fractional Divider Configuration Register, Address offset: 0x44 */ + uint32_t RESERVED3; /*!< Reserved, Address offset: 0x48 */ + __IO uint32_t D1CCIPR; /*!< RCC Domain 1 Kernel Clock Configuration Register Address offset: 0x4C */ + __IO uint32_t D2CCIP1R; /*!< RCC Domain 2 Kernel Clock Configuration Register Address offset: 0x50 */ + __IO uint32_t D2CCIP2R; /*!< RCC Domain 2 Kernel Clock Configuration Register Address offset: 0x54 */ + __IO uint32_t D3CCIPR; /*!< RCC Domain 3 Kernel Clock Configuration Register Address offset: 0x58 */ + uint32_t RESERVED4; /*!< Reserved, Address offset: 0x5C */ + __IO uint32_t CIER; /*!< RCC Clock Source Interrupt Enable Register Address offset: 0x60 */ + __IO uint32_t CIFR; /*!< RCC Clock Source Interrupt Flag Register Address offset: 0x64 */ + __IO uint32_t CICR; /*!< RCC Clock Source Interrupt Clear Register Address offset: 0x68 */ + uint32_t RESERVED5; /*!< Reserved, Address offset: 0x6C */ + __IO uint32_t BDCR; /*!< RCC Vswitch Backup Domain Control Register, Address offset: 0x70 */ + __IO uint32_t CSR; /*!< RCC clock control & status register, Address offset: 0x74 */ + uint32_t RESERVED6; /*!< Reserved, Address offset: 0x78 */ + __IO uint32_t AHB3RSTR; /*!< RCC AHB3 peripheral reset register, Address offset: 0x7C */ + __IO uint32_t AHB1RSTR; /*!< RCC AHB1 peripheral reset register, Address offset: 0x80 */ + __IO uint32_t AHB2RSTR; /*!< RCC AHB2 peripheral reset register, Address offset: 0x84 */ + __IO uint32_t AHB4RSTR; /*!< RCC AHB4 peripheral reset register, Address offset: 0x88 */ + __IO uint32_t APB3RSTR; /*!< RCC APB3 peripheral reset register, Address offset: 0x8C */ + __IO uint32_t APB1LRSTR; /*!< RCC APB1 peripheral reset Low Word register, Address offset: 0x90 */ + __IO uint32_t APB1HRSTR; /*!< RCC APB1 peripheral reset High Word register, Address offset: 0x94 */ + __IO uint32_t APB2RSTR; /*!< RCC APB2 peripheral reset register, Address offset: 0x98 */ + __IO uint32_t APB4RSTR; /*!< RCC APB4 peripheral reset register, Address offset: 0x9C */ + __IO uint32_t GCR; /*!< RCC RCC Global Control Register, Address offset: 0xA0 */ + uint32_t RESERVED8; /*!< Reserved, Address offset: 0xA4 */ + __IO uint32_t D3AMR; /*!< RCC Domain 3 Autonomous Mode Register, Address offset: 0xA8 */ + uint32_t RESERVED11[9]; /*!< Reserved, 0xAC-0xCC Address offset: 0xAC */ + __IO uint32_t RSR; /*!< RCC Reset status register, Address offset: 0xD0 */ + __IO uint32_t AHB3ENR; /*!< RCC AHB3 peripheral clock register, Address offset: 0xD4 */ + __IO uint32_t AHB1ENR; /*!< RCC AHB1 peripheral clock register, Address offset: 0xD8 */ + __IO uint32_t AHB2ENR; /*!< RCC AHB2 peripheral clock register, Address offset: 0xDC */ + __IO uint32_t AHB4ENR; /*!< RCC AHB4 peripheral clock register, Address offset: 0xE0 */ + __IO uint32_t APB3ENR; /*!< RCC APB3 peripheral clock register, Address offset: 0xE4 */ + __IO uint32_t APB1LENR; /*!< RCC APB1 peripheral clock Low Word register, Address offset: 0xE8 */ + __IO uint32_t APB1HENR; /*!< RCC APB1 peripheral clock High Word register, Address offset: 0xEC */ + __IO uint32_t APB2ENR; /*!< RCC APB2 peripheral clock register, Address offset: 0xF0 */ + __IO uint32_t APB4ENR; /*!< RCC APB4 peripheral clock register, Address offset: 0xF4 */ + uint32_t RESERVED12; /*!< Reserved, Address offset: 0xF8 */ + __IO uint32_t AHB3LPENR; /*!< RCC AHB3 peripheral sleep clock register, Address offset: 0xFC */ + __IO uint32_t AHB1LPENR; /*!< RCC AHB1 peripheral sleep clock register, Address offset: 0x100 */ + __IO uint32_t AHB2LPENR; /*!< RCC AHB2 peripheral sleep clock register, Address offset: 0x104 */ + __IO uint32_t AHB4LPENR; /*!< RCC AHB4 peripheral sleep clock register, Address offset: 0x108 */ + __IO uint32_t APB3LPENR; /*!< RCC APB3 peripheral sleep clock register, Address offset: 0x10C */ + __IO uint32_t APB1LLPENR; /*!< RCC APB1 peripheral sleep clock Low Word register, Address offset: 0x110 */ + __IO uint32_t APB1HLPENR; /*!< RCC APB1 peripheral sleep clock High Word register, Address offset: 0x114 */ + __IO uint32_t APB2LPENR; /*!< RCC APB2 peripheral sleep clock register, Address offset: 0x118 */ + __IO uint32_t APB4LPENR; /*!< RCC APB4 peripheral sleep clock register, Address offset: 0x11C */ + uint32_t RESERVED13[4]; /*!< Reserved, 0x120-0x12C Address offset: 0x120 */ + +} RCC_TypeDef; + + +/** + * @brief Real-Time Clock + */ +typedef struct +{ + __IO uint32_t TR; /*!< RTC time register, Address offset: 0x00 */ + __IO uint32_t DR; /*!< RTC date register, Address offset: 0x04 */ + __IO uint32_t CR; /*!< RTC control register, Address offset: 0x08 */ + __IO uint32_t ISR; /*!< RTC initialization and status register, Address offset: 0x0C */ + __IO uint32_t PRER; /*!< RTC prescaler register, Address offset: 0x10 */ + __IO uint32_t WUTR; /*!< RTC wakeup timer register, Address offset: 0x14 */ + uint32_t RESERVED; /*!< Reserved, Address offset: 0x18 */ + __IO uint32_t ALRMAR; /*!< RTC alarm A register, Address offset: 0x1C */ + __IO uint32_t ALRMBR; /*!< RTC alarm B register, Address offset: 0x20 */ + __IO uint32_t WPR; /*!< RTC write protection register, Address offset: 0x24 */ + __IO uint32_t SSR; /*!< RTC sub second register, Address offset: 0x28 */ + __IO uint32_t SHIFTR; /*!< RTC shift control register, Address offset: 0x2C */ + __IO uint32_t TSTR; /*!< RTC time stamp time register, Address offset: 0x30 */ + __IO uint32_t TSDR; /*!< RTC time stamp date register, Address offset: 0x34 */ + __IO uint32_t TSSSR; /*!< RTC time-stamp sub second register, Address offset: 0x38 */ + __IO uint32_t CALR; /*!< RTC calibration register, Address offset: 0x3C */ + __IO uint32_t TAMPCR; /*!< RTC tamper configuration register, Address offset: 0x40 */ + __IO uint32_t ALRMASSR; /*!< RTC alarm A sub second register, Address offset: 0x44 */ + __IO uint32_t ALRMBSSR; /*!< RTC alarm B sub second register, Address offset: 0x48 */ + __IO uint32_t OR; /*!< RTC option register, Address offset: 0x4C */ + __IO uint32_t BKP0R; /*!< RTC backup register 0, Address offset: 0x50 */ + __IO uint32_t BKP1R; /*!< RTC backup register 1, Address offset: 0x54 */ + __IO uint32_t BKP2R; /*!< RTC backup register 2, Address offset: 0x58 */ + __IO uint32_t BKP3R; /*!< RTC backup register 3, Address offset: 0x5C */ + __IO uint32_t BKP4R; /*!< RTC backup register 4, Address offset: 0x60 */ + __IO uint32_t BKP5R; /*!< RTC backup register 5, Address offset: 0x64 */ + __IO uint32_t BKP6R; /*!< RTC backup register 6, Address offset: 0x68 */ + __IO uint32_t BKP7R; /*!< RTC backup register 7, Address offset: 0x6C */ + __IO uint32_t BKP8R; /*!< RTC backup register 8, Address offset: 0x70 */ + __IO uint32_t BKP9R; /*!< RTC backup register 9, Address offset: 0x74 */ + __IO uint32_t BKP10R; /*!< RTC backup register 10, Address offset: 0x78 */ + __IO uint32_t BKP11R; /*!< RTC backup register 11, Address offset: 0x7C */ + __IO uint32_t BKP12R; /*!< RTC backup register 12, Address offset: 0x80 */ + __IO uint32_t BKP13R; /*!< RTC backup register 13, Address offset: 0x84 */ + __IO uint32_t BKP14R; /*!< RTC backup register 14, Address offset: 0x88 */ + __IO uint32_t BKP15R; /*!< RTC backup register 15, Address offset: 0x8C */ + __IO uint32_t BKP16R; /*!< RTC backup register 16, Address offset: 0x90 */ + __IO uint32_t BKP17R; /*!< RTC backup register 17, Address offset: 0x94 */ + __IO uint32_t BKP18R; /*!< RTC backup register 18, Address offset: 0x98 */ + __IO uint32_t BKP19R; /*!< RTC backup register 19, Address offset: 0x9C */ + __IO uint32_t BKP20R; /*!< RTC backup register 20, Address offset: 0xA0 */ + __IO uint32_t BKP21R; /*!< RTC backup register 21, Address offset: 0xA4 */ + __IO uint32_t BKP22R; /*!< RTC backup register 22, Address offset: 0xA8 */ + __IO uint32_t BKP23R; /*!< RTC backup register 23, Address offset: 0xAC */ + __IO uint32_t BKP24R; /*!< RTC backup register 24, Address offset: 0xB0 */ + __IO uint32_t BKP25R; /*!< RTC backup register 25, Address offset: 0xB4 */ + __IO uint32_t BKP26R; /*!< RTC backup register 26, Address offset: 0xB8 */ + __IO uint32_t BKP27R; /*!< RTC backup register 27, Address offset: 0xBC */ + __IO uint32_t BKP28R; /*!< RTC backup register 28, Address offset: 0xC0 */ + __IO uint32_t BKP29R; /*!< RTC backup register 29, Address offset: 0xC4 */ + __IO uint32_t BKP30R; /*!< RTC backup register 30, Address offset: 0xC8 */ + __IO uint32_t BKP31R; /*!< RTC backup register 31, Address offset: 0xCC */ +} RTC_TypeDef; + +/** + * @brief Serial Audio Interface + */ + +typedef struct +{ + __IO uint32_t GCR; /*!< SAI global configuration register, Address offset: 0x00 */ + uint32_t RESERVED0[16]; /*!< Reserved, 0x04 - 0x43 */ + __IO uint32_t PDMCR; /*!< SAI PDM control register, Address offset: 0x44 */ + __IO uint32_t PDMDLY; /*!< SAI PDM delay register, Address offset: 0x48 */ +} SAI_TypeDef; + +typedef struct +{ + __IO uint32_t CR1; /*!< SAI block x configuration register 1, Address offset: 0x04 */ + __IO uint32_t CR2; /*!< SAI block x configuration register 2, Address offset: 0x08 */ + __IO uint32_t FRCR; /*!< SAI block x frame configuration register, Address offset: 0x0C */ + __IO uint32_t SLOTR; /*!< SAI block x slot register, Address offset: 0x10 */ + __IO uint32_t IMR; /*!< SAI block x interrupt mask register, Address offset: 0x14 */ + __IO uint32_t SR; /*!< SAI block x status register, Address offset: 0x18 */ + __IO uint32_t CLRFR; /*!< SAI block x clear flag register, Address offset: 0x1C */ + __IO uint32_t DR; /*!< SAI block x data register, Address offset: 0x20 */ +} SAI_Block_TypeDef; + +/** + * @brief SPDIF-RX Interface + */ + +typedef struct +{ + __IO uint32_t CR; /*!< Control register, Address offset: 0x00 */ + __IO uint32_t IMR; /*!< Interrupt mask register, Address offset: 0x04 */ + __IO uint32_t SR; /*!< Status register, Address offset: 0x08 */ + __IO uint32_t IFCR; /*!< Interrupt Flag Clear register, Address offset: 0x0C */ + __IO uint32_t DR; /*!< Data input register, Address offset: 0x10 */ + __IO uint32_t CSR; /*!< Channel Status register, Address offset: 0x14 */ + __IO uint32_t DIR; /*!< Debug Information register, Address offset: 0x18 */ + uint32_t RESERVED2; /*!< Reserved, 0x1A */ +} SPDIFRX_TypeDef; + + +/** + * @brief Secure digital input/output Interface + */ + +typedef struct +{ + __IO uint32_t POWER; /*!< SDMMC power control register, Address offset: 0x00 */ + __IO uint32_t CLKCR; /*!< SDMMC clock control register, Address offset: 0x04 */ + __IO uint32_t ARG; /*!< SDMMC argument register, Address offset: 0x08 */ + __IO uint32_t CMD; /*!< SDMMC command register, Address offset: 0x0C */ + __I uint32_t RESPCMD; /*!< SDMMC command response register, Address offset: 0x10 */ + __I uint32_t RESP1; /*!< SDMMC response 1 register, Address offset: 0x14 */ + __I uint32_t RESP2; /*!< SDMMC response 2 register, Address offset: 0x18 */ + __I uint32_t RESP3; /*!< SDMMC response 3 register, Address offset: 0x1C */ + __I uint32_t RESP4; /*!< SDMMC response 4 register, Address offset: 0x20 */ + __IO uint32_t DTIMER; /*!< SDMMC data timer register, Address offset: 0x24 */ + __IO uint32_t DLEN; /*!< SDMMC data length register, Address offset: 0x28 */ + __IO uint32_t DCTRL; /*!< SDMMC data control register, Address offset: 0x2C */ + __I uint32_t DCOUNT; /*!< SDMMC data counter register, Address offset: 0x30 */ + __I uint32_t STA; /*!< SDMMC status register, Address offset: 0x34 */ + __IO uint32_t ICR; /*!< SDMMC interrupt clear register, Address offset: 0x38 */ + __IO uint32_t MASK; /*!< SDMMC mask register, Address offset: 0x3C */ + __IO uint32_t ACKTIME; /*!< SDMMC Acknowledgement timer register, Address offset: 0x40 */ + uint32_t RESERVED0[3]; /*!< Reserved, 0x44 - 0x4C - 0x4C */ + __IO uint32_t IDMACTRL; /*!< SDMMC DMA control register, Address offset: 0x50 */ + __IO uint32_t IDMABSIZE; /*!< SDMMC DMA buffer size register, Address offset: 0x54 */ + __IO uint32_t IDMABASE0; /*!< SDMMC DMA buffer 0 base address register, Address offset: 0x58 */ + __IO uint32_t IDMABASE1; /*!< SDMMC DMA buffer 1 base address register, Address offset: 0x5C */ + uint32_t RESERVED1[8]; /*!< Reserved, 0x60-0x7C */ + __IO uint32_t FIFO; /*!< SDMMC data FIFO register, Address offset: 0x80 */ + uint32_t RESERVED2[222]; /*!< Reserved, 0x84-0x3F8 */ + __IO uint32_t IPVR; /*!< SDMMC data FIFO register, Address offset: 0x3FC */ +} SDMMC_TypeDef; + + +/** + * @brief Delay Block DLYB + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DELAY BLOCK control register, Address offset: 0x00 */ + __IO uint32_t CFGR; /*!< DELAY BLOCK configuration register, Address offset: 0x04 */ +} DLYB_TypeDef; + +/** + * @brief HW Semaphore HSEM + */ + +typedef struct +{ + __IO uint32_t R[32]; /*!< 2-step write lock and read back registers, Address offset: 00h-7Ch */ + __IO uint32_t RLR[32]; /*!< 1-step read lock registers, Address offset: 80h-FCh */ + __IO uint32_t C1IER; /*!< HSEM Interrupt enable register , Address offset: 100h */ + __IO uint32_t C1ICR; /*!< HSEM Interrupt clear register , Address offset: 104h */ + __IO uint32_t C1ISR; /*!< HSEM Interrupt Status register , Address offset: 108h */ + __IO uint32_t C1MISR; /*!< HSEM Interrupt Masked Status register , Address offset: 10Ch */ + uint32_t Reserved[12]; /* Reserved Address offset: 110h-13Ch */ + __IO uint32_t CR; /*!< HSEM Semaphore clear register , Address offset: 140h */ + __IO uint32_t KEYR; /*!< HSEM Semaphore clear key register , Address offset: 144h */ + +} HSEM_TypeDef; + +typedef struct +{ + __IO uint32_t IER; /*!< HSEM interrupt enable register , Address offset: 0h */ + __IO uint32_t ICR; /*!< HSEM interrupt clear register , Address offset: 4h */ + __IO uint32_t ISR; /*!< HSEM interrupt status register , Address offset: 8h */ + __IO uint32_t MISR; /*!< HSEM masked interrupt status register , Address offset: Ch */ +} HSEM_Common_TypeDef; + +/** + * @brief Serial Peripheral Interface + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< SPI/I2S Control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< SPI Control register 2, Address offset: 0x04 */ + __IO uint32_t CFG1; /*!< SPI Configuration register 1, Address offset: 0x08 */ + __IO uint32_t CFG2; /*!< SPI Configuration register 2, Address offset: 0x0C */ + __IO uint32_t IER; /*!< SPI/I2S Interrupt Enable register, Address offset: 0x10 */ + __IO uint32_t SR; /*!< SPI/I2S Status register, Address offset: 0x14 */ + __IO uint32_t IFCR; /*!< SPI/I2S Interrupt/Status flags clear register, Address offset: 0x18 */ + uint32_t RESERVED0; /*!< Reserved, 0x1C */ + __IO uint32_t TXDR; /*!< SPI/I2S Transmit data register, Address offset: 0x20 */ + uint32_t RESERVED1[3]; /*!< Reserved, 0x24-0x2C */ + __IO uint32_t RXDR; /*!< SPI/I2S Receive data register, Address offset: 0x30 */ + uint32_t RESERVED2[3]; /*!< Reserved, 0x34-0x3C */ + __IO uint32_t CRCPOLY; /*!< SPI CRC Polynomial register, Address offset: 0x40 */ + __IO uint32_t TXCRC; /*!< SPI Transmitter CRC register, Address offset: 0x44 */ + __IO uint32_t RXCRC; /*!< SPI Receiver CRC register, Address offset: 0x48 */ + __IO uint32_t UDRDR; /*!< SPI Underrun data register, Address offset: 0x4C */ + __IO uint32_t I2SCFGR; /*!< I2S Configuration register, Address offset: 0x50 */ + +} SPI_TypeDef; + +/** + * @brief DTS + */ +typedef struct +{ + __IO uint32_t CFGR1; /*!< DTS configuration register, Address offset: 0x00 */ + uint32_t RESERVED0; /*!< Reserved, Address offset: 0x04 */ + __IO uint32_t T0VALR1; /*!< DTS T0 Value register, Address offset: 0x08 */ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x0C */ + __IO uint32_t RAMPVALR; /*!< DTS Ramp value register, Address offset: 0x10 */ + __IO uint32_t ITR1; /*!< DTS Interrupt threshold register, Address offset: 0x14 */ + uint32_t RESERVED2; /*!< Reserved, Address offset: 0x18 */ + __IO uint32_t DR; /*!< DTS data register, Address offset: 0x1C */ + __IO uint32_t SR; /*!< DTS status register Address offset: 0x20 */ + __IO uint32_t ITENR; /*!< DTS Interrupt enable register, Address offset: 0x24 */ + __IO uint32_t ICIFR; /*!< DTS Clear Interrupt flag register, Address offset: 0x28 */ + __IO uint32_t OR; /*!< DTS option register 1, Address offset: 0x2C */ +} +DTS_TypeDef; + +/** + * @brief TIM + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< TIM control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< TIM control register 2, Address offset: 0x04 */ + __IO uint32_t SMCR; /*!< TIM slave mode control register, Address offset: 0x08 */ + __IO uint32_t DIER; /*!< TIM DMA/interrupt enable register, Address offset: 0x0C */ + __IO uint32_t SR; /*!< TIM status register, Address offset: 0x10 */ + __IO uint32_t EGR; /*!< TIM event generation register, Address offset: 0x14 */ + __IO uint32_t CCMR1; /*!< TIM capture/compare mode register 1, Address offset: 0x18 */ + __IO uint32_t CCMR2; /*!< TIM capture/compare mode register 2, Address offset: 0x1C */ + __IO uint32_t CCER; /*!< TIM capture/compare enable register, Address offset: 0x20 */ + __IO uint32_t CNT; /*!< TIM counter register, Address offset: 0x24 */ + __IO uint32_t PSC; /*!< TIM prescaler, Address offset: 0x28 */ + __IO uint32_t ARR; /*!< TIM auto-reload register, Address offset: 0x2C */ + __IO uint32_t RCR; /*!< TIM repetition counter register, Address offset: 0x30 */ + __IO uint32_t CCR1; /*!< TIM capture/compare register 1, Address offset: 0x34 */ + __IO uint32_t CCR2; /*!< TIM capture/compare register 2, Address offset: 0x38 */ + __IO uint32_t CCR3; /*!< TIM capture/compare register 3, Address offset: 0x3C */ + __IO uint32_t CCR4; /*!< TIM capture/compare register 4, Address offset: 0x40 */ + __IO uint32_t BDTR; /*!< TIM break and dead-time register, Address offset: 0x44 */ + __IO uint32_t DCR; /*!< TIM DMA control register, Address offset: 0x48 */ + __IO uint32_t DMAR; /*!< TIM DMA address for full transfer, Address offset: 0x4C */ + uint32_t RESERVED1; /*!< Reserved, 0x50 */ + __IO uint32_t CCMR3; /*!< TIM capture/compare mode register 3, Address offset: 0x54 */ + __IO uint32_t CCR5; /*!< TIM capture/compare register5, Address offset: 0x58 */ + __IO uint32_t CCR6; /*!< TIM capture/compare register6, Address offset: 0x5C */ + __IO uint32_t AF1; /*!< TIM alternate function option register 1, Address offset: 0x60 */ + __IO uint32_t AF2; /*!< TIM alternate function option register 2, Address offset: 0x64 */ + __IO uint32_t TISEL; /*!< TIM Input Selection register, Address offset: 0x68 */ +} TIM_TypeDef; + +/** + * @brief LPTIMIMER + */ +typedef struct +{ + __IO uint32_t ISR; /*!< LPTIM Interrupt and Status register, Address offset: 0x00 */ + __IO uint32_t ICR; /*!< LPTIM Interrupt Clear register, Address offset: 0x04 */ + __IO uint32_t IER; /*!< LPTIM Interrupt Enable register, Address offset: 0x08 */ + __IO uint32_t CFGR; /*!< LPTIM Configuration register, Address offset: 0x0C */ + __IO uint32_t CR; /*!< LPTIM Control register, Address offset: 0x10 */ + __IO uint32_t CMP; /*!< LPTIM Compare register, Address offset: 0x14 */ + __IO uint32_t ARR; /*!< LPTIM Autoreload register, Address offset: 0x18 */ + __IO uint32_t CNT; /*!< LPTIM Counter register, Address offset: 0x1C */ + uint32_t RESERVED1; /*!< Reserved, 0x20 */ + __IO uint32_t CFGR2; /*!< LPTIM Configuration register, Address offset: 0x24 */ +} LPTIM_TypeDef; + +/** + * @brief Comparator + */ +typedef struct +{ + __IO uint32_t SR; /*!< Comparator status register, Address offset: 0x00 */ + __IO uint32_t ICFR; /*!< Comparator interrupt clear flag register, Address offset: 0x04 */ + __IO uint32_t OR; /*!< Comparator option register, Address offset: 0x08 */ +} COMPOPT_TypeDef; + +typedef struct +{ + __IO uint32_t CFGR; /*!< Comparator configuration register , Address offset: 0x00 */ +} COMP_TypeDef; + +typedef struct +{ + __IO uint32_t CFGR; /*!< COMP control and status register, used for bits common to several COMP instances, Address offset: 0x00 */ +} COMP_Common_TypeDef; +/** + * @brief Universal Synchronous Asynchronous Receiver Transmitter + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< USART Control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< USART Control register 2, Address offset: 0x04 */ + __IO uint32_t CR3; /*!< USART Control register 3, Address offset: 0x08 */ + __IO uint32_t BRR; /*!< USART Baud rate register, Address offset: 0x0C */ + __IO uint32_t GTPR; /*!< USART Guard time and prescaler register, Address offset: 0x10 */ + __IO uint32_t RTOR; /*!< USART Receiver Time Out register, Address offset: 0x14 */ + __IO uint32_t RQR; /*!< USART Request register, Address offset: 0x18 */ + __IO uint32_t ISR; /*!< USART Interrupt and status register, Address offset: 0x1C */ + __IO uint32_t ICR; /*!< USART Interrupt flag Clear register, Address offset: 0x20 */ + __IO uint32_t RDR; /*!< USART Receive Data register, Address offset: 0x24 */ + __IO uint32_t TDR; /*!< USART Transmit Data register, Address offset: 0x28 */ + __IO uint32_t PRESC; /*!< USART clock Prescaler register, Address offset: 0x2C */ +} USART_TypeDef; + +/** + * @brief Single Wire Protocol Master Interface SPWMI + */ +typedef struct +{ + __IO uint32_t CR; /*!< SWPMI Configuration/Control register, Address offset: 0x00 */ + __IO uint32_t BRR; /*!< SWPMI bitrate register, Address offset: 0x04 */ + uint32_t RESERVED1; /*!< Reserved, 0x08 */ + __IO uint32_t ISR; /*!< SWPMI Interrupt and Status register, Address offset: 0x0C */ + __IO uint32_t ICR; /*!< SWPMI Interrupt Flag Clear register, Address offset: 0x10 */ + __IO uint32_t IER; /*!< SWPMI Interrupt Enable register, Address offset: 0x14 */ + __IO uint32_t RFL; /*!< SWPMI Receive Frame Length register, Address offset: 0x18 */ + __IO uint32_t TDR; /*!< SWPMI Transmit data register, Address offset: 0x1C */ + __IO uint32_t RDR; /*!< SWPMI Receive data register, Address offset: 0x20 */ + __IO uint32_t OR; /*!< SWPMI Option register, Address offset: 0x24 */ +} SWPMI_TypeDef; + +/** + * @brief Window WATCHDOG + */ + +typedef struct +{ + __IO uint32_t CR; /*!< WWDG Control register, Address offset: 0x00 */ + __IO uint32_t CFR; /*!< WWDG Configuration register, Address offset: 0x04 */ + __IO uint32_t SR; /*!< WWDG Status register, Address offset: 0x08 */ +} WWDG_TypeDef; + + +/** + * @brief RAM_ECC_Specific_Registers + */ +typedef struct +{ + __IO uint32_t CR; /*!< RAMECC monitor configuration register */ + __IO uint32_t SR; /*!< RAMECC monitor status register */ + __IO uint32_t FAR; /*!< RAMECC monitor failing address register */ + __IO uint32_t FDRL; /*!< RAMECC monitor failing data low register */ + __IO uint32_t FDRH; /*!< RAMECC monitor failing data high register */ + __IO uint32_t FECR; /*!< RAMECC monitor failing ECC error code register */ +} RAMECC_MonitorTypeDef; + +typedef struct +{ + __IO uint32_t IER; /*!< RAMECC interrupt enable register */ +} RAMECC_TypeDef; +/** + * @} + */ + + +/** + * @brief Crypto Processor + */ + +typedef struct +{ + __IO uint32_t CR; /*!< CRYP control register, Address offset: 0x00 */ + __IO uint32_t SR; /*!< CRYP status register, Address offset: 0x04 */ + __IO uint32_t DIN; /*!< CRYP data input register, Address offset: 0x08 */ + __IO uint32_t DOUT; /*!< CRYP data output register, Address offset: 0x0C */ + __IO uint32_t DMACR; /*!< CRYP DMA control register, Address offset: 0x10 */ + __IO uint32_t IMSCR; /*!< CRYP interrupt mask set/clear register, Address offset: 0x14 */ + __IO uint32_t RISR; /*!< CRYP raw interrupt status register, Address offset: 0x18 */ + __IO uint32_t MISR; /*!< CRYP masked interrupt status register, Address offset: 0x1C */ + __IO uint32_t K0LR; /*!< CRYP key left register 0, Address offset: 0x20 */ + __IO uint32_t K0RR; /*!< CRYP key right register 0, Address offset: 0x24 */ + __IO uint32_t K1LR; /*!< CRYP key left register 1, Address offset: 0x28 */ + __IO uint32_t K1RR; /*!< CRYP key right register 1, Address offset: 0x2C */ + __IO uint32_t K2LR; /*!< CRYP key left register 2, Address offset: 0x30 */ + __IO uint32_t K2RR; /*!< CRYP key right register 2, Address offset: 0x34 */ + __IO uint32_t K3LR; /*!< CRYP key left register 3, Address offset: 0x38 */ + __IO uint32_t K3RR; /*!< CRYP key right register 3, Address offset: 0x3C */ + __IO uint32_t IV0LR; /*!< CRYP initialization vector left-word register 0, Address offset: 0x40 */ + __IO uint32_t IV0RR; /*!< CRYP initialization vector right-word register 0, Address offset: 0x44 */ + __IO uint32_t IV1LR; /*!< CRYP initialization vector left-word register 1, Address offset: 0x48 */ + __IO uint32_t IV1RR; /*!< CRYP initialization vector right-word register 1, Address offset: 0x4C */ + __IO uint32_t CSGCMCCM0R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 0, Address offset: 0x50 */ + __IO uint32_t CSGCMCCM1R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 1, Address offset: 0x54 */ + __IO uint32_t CSGCMCCM2R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 2, Address offset: 0x58 */ + __IO uint32_t CSGCMCCM3R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 3, Address offset: 0x5C */ + __IO uint32_t CSGCMCCM4R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 4, Address offset: 0x60 */ + __IO uint32_t CSGCMCCM5R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 5, Address offset: 0x64 */ + __IO uint32_t CSGCMCCM6R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 6, Address offset: 0x68 */ + __IO uint32_t CSGCMCCM7R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 7, Address offset: 0x6C */ + __IO uint32_t CSGCM0R; /*!< CRYP GCM/GMAC context swap register 0, Address offset: 0x70 */ + __IO uint32_t CSGCM1R; /*!< CRYP GCM/GMAC context swap register 1, Address offset: 0x74 */ + __IO uint32_t CSGCM2R; /*!< CRYP GCM/GMAC context swap register 2, Address offset: 0x78 */ + __IO uint32_t CSGCM3R; /*!< CRYP GCM/GMAC context swap register 3, Address offset: 0x7C */ + __IO uint32_t CSGCM4R; /*!< CRYP GCM/GMAC context swap register 4, Address offset: 0x80 */ + __IO uint32_t CSGCM5R; /*!< CRYP GCM/GMAC context swap register 5, Address offset: 0x84 */ + __IO uint32_t CSGCM6R; /*!< CRYP GCM/GMAC context swap register 6, Address offset: 0x88 */ + __IO uint32_t CSGCM7R; /*!< CRYP GCM/GMAC context swap register 7, Address offset: 0x8C */ +} CRYP_TypeDef; + +/** + * @brief HASH + */ + +typedef struct +{ + __IO uint32_t CR; /*!< HASH control register, Address offset: 0x00 */ + __IO uint32_t DIN; /*!< HASH data input register, Address offset: 0x04 */ + __IO uint32_t STR; /*!< HASH start register, Address offset: 0x08 */ + __IO uint32_t HR[5]; /*!< HASH digest registers, Address offset: 0x0C-0x1C */ + __IO uint32_t IMR; /*!< HASH interrupt enable register, Address offset: 0x20 */ + __IO uint32_t SR; /*!< HASH status register, Address offset: 0x24 */ + uint32_t RESERVED[52]; /*!< Reserved, 0x28-0xF4 */ + __IO uint32_t CSR[54]; /*!< HASH context swap registers, Address offset: 0x0F8-0x1CC */ +} HASH_TypeDef; + +/** + * @brief HASH_DIGEST + */ + +typedef struct +{ + __IO uint32_t HR[8]; /*!< HASH digest registers, Address offset: 0x310-0x32C */ +} HASH_DIGEST_TypeDef; + + +/** + * @brief RNG + */ + +typedef struct +{ + __IO uint32_t CR; /*!< RNG control register, Address offset: 0x00 */ + __IO uint32_t SR; /*!< RNG status register, Address offset: 0x04 */ + __IO uint32_t DR; /*!< RNG data register, Address offset: 0x08 */ + uint32_t RESERVED; + __IO uint32_t HTCR; /*!< RNG health test configuration register, Address offset: 0x10 */ +} RNG_TypeDef; + +/** + * @brief MDIOS + */ + +typedef struct +{ + __IO uint32_t CR; + __IO uint32_t WRFR; + __IO uint32_t CWRFR; + __IO uint32_t RDFR; + __IO uint32_t CRDFR; + __IO uint32_t SR; + __IO uint32_t CLRFR; + uint32_t RESERVED[57]; + __IO uint32_t DINR0; + __IO uint32_t DINR1; + __IO uint32_t DINR2; + __IO uint32_t DINR3; + __IO uint32_t DINR4; + __IO uint32_t DINR5; + __IO uint32_t DINR6; + __IO uint32_t DINR7; + __IO uint32_t DINR8; + __IO uint32_t DINR9; + __IO uint32_t DINR10; + __IO uint32_t DINR11; + __IO uint32_t DINR12; + __IO uint32_t DINR13; + __IO uint32_t DINR14; + __IO uint32_t DINR15; + __IO uint32_t DINR16; + __IO uint32_t DINR17; + __IO uint32_t DINR18; + __IO uint32_t DINR19; + __IO uint32_t DINR20; + __IO uint32_t DINR21; + __IO uint32_t DINR22; + __IO uint32_t DINR23; + __IO uint32_t DINR24; + __IO uint32_t DINR25; + __IO uint32_t DINR26; + __IO uint32_t DINR27; + __IO uint32_t DINR28; + __IO uint32_t DINR29; + __IO uint32_t DINR30; + __IO uint32_t DINR31; + __IO uint32_t DOUTR0; + __IO uint32_t DOUTR1; + __IO uint32_t DOUTR2; + __IO uint32_t DOUTR3; + __IO uint32_t DOUTR4; + __IO uint32_t DOUTR5; + __IO uint32_t DOUTR6; + __IO uint32_t DOUTR7; + __IO uint32_t DOUTR8; + __IO uint32_t DOUTR9; + __IO uint32_t DOUTR10; + __IO uint32_t DOUTR11; + __IO uint32_t DOUTR12; + __IO uint32_t DOUTR13; + __IO uint32_t DOUTR14; + __IO uint32_t DOUTR15; + __IO uint32_t DOUTR16; + __IO uint32_t DOUTR17; + __IO uint32_t DOUTR18; + __IO uint32_t DOUTR19; + __IO uint32_t DOUTR20; + __IO uint32_t DOUTR21; + __IO uint32_t DOUTR22; + __IO uint32_t DOUTR23; + __IO uint32_t DOUTR24; + __IO uint32_t DOUTR25; + __IO uint32_t DOUTR26; + __IO uint32_t DOUTR27; + __IO uint32_t DOUTR28; + __IO uint32_t DOUTR29; + __IO uint32_t DOUTR30; + __IO uint32_t DOUTR31; +} MDIOS_TypeDef; + + +/** + * @brief USB_OTG_Core_Registers + */ +typedef struct +{ + __IO uint32_t GOTGCTL; /*!< USB_OTG Control and Status Register 000h */ + __IO uint32_t GOTGINT; /*!< USB_OTG Interrupt Register 004h */ + __IO uint32_t GAHBCFG; /*!< Core AHB Configuration Register 008h */ + __IO uint32_t GUSBCFG; /*!< Core USB Configuration Register 00Ch */ + __IO uint32_t GRSTCTL; /*!< Core Reset Register 010h */ + __IO uint32_t GINTSTS; /*!< Core Interrupt Register 014h */ + __IO uint32_t GINTMSK; /*!< Core Interrupt Mask Register 018h */ + __IO uint32_t GRXSTSR; /*!< Receive Sts Q Read Register 01Ch */ + __IO uint32_t GRXSTSP; /*!< Receive Sts Q Read & POP Register 020h */ + __IO uint32_t GRXFSIZ; /*!< Receive FIFO Size Register 024h */ + __IO uint32_t DIEPTXF0_HNPTXFSIZ; /*!< EP0 / Non Periodic Tx FIFO Size Register 028h */ + __IO uint32_t HNPTXSTS; /*!< Non Periodic Tx FIFO/Queue Sts reg 02Ch */ + uint32_t Reserved30[2]; /*!< Reserved 030h */ + __IO uint32_t GCCFG; /*!< General Purpose IO Register 038h */ + __IO uint32_t CID; /*!< User ID Register 03Ch */ + __IO uint32_t GSNPSID; /* USB_OTG core ID 040h*/ + __IO uint32_t GHWCFG1; /* User HW config1 044h*/ + __IO uint32_t GHWCFG2; /* User HW config2 048h*/ + __IO uint32_t GHWCFG3; /*!< User HW config3 04Ch */ + uint32_t Reserved6; /*!< Reserved 050h */ + __IO uint32_t GLPMCFG; /*!< LPM Register 054h */ + __IO uint32_t GPWRDN; /*!< Power Down Register 058h */ + __IO uint32_t GDFIFOCFG; /*!< DFIFO Software Config Register 05Ch */ + __IO uint32_t GADPCTL; /*!< ADP Timer, Control and Status Register 60Ch */ + uint32_t Reserved43[39]; /*!< Reserved 058h-0FFh */ + __IO uint32_t HPTXFSIZ; /*!< Host Periodic Tx FIFO Size Reg 100h */ + __IO uint32_t DIEPTXF[0x0F]; /*!< dev Periodic Transmit FIFO */ +} USB_OTG_GlobalTypeDef; + + +/** + * @brief USB_OTG_device_Registers + */ +typedef struct +{ + __IO uint32_t DCFG; /*!< dev Configuration Register 800h */ + __IO uint32_t DCTL; /*!< dev Control Register 804h */ + __IO uint32_t DSTS; /*!< dev Status Register (RO) 808h */ + uint32_t Reserved0C; /*!< Reserved 80Ch */ + __IO uint32_t DIEPMSK; /*!< dev IN Endpoint Mask 810h */ + __IO uint32_t DOEPMSK; /*!< dev OUT Endpoint Mask 814h */ + __IO uint32_t DAINT; /*!< dev All Endpoints Itr Reg 818h */ + __IO uint32_t DAINTMSK; /*!< dev All Endpoints Itr Mask 81Ch */ + uint32_t Reserved20; /*!< Reserved 820h */ + uint32_t Reserved9; /*!< Reserved 824h */ + __IO uint32_t DVBUSDIS; /*!< dev VBUS discharge Register 828h */ + __IO uint32_t DVBUSPULSE; /*!< dev VBUS Pulse Register 82Ch */ + __IO uint32_t DTHRCTL; /*!< dev threshold 830h */ + __IO uint32_t DIEPEMPMSK; /*!< dev empty msk 834h */ + __IO uint32_t DEACHINT; /*!< dedicated EP interrupt 838h */ + __IO uint32_t DEACHMSK; /*!< dedicated EP msk 83Ch */ + uint32_t Reserved40; /*!< dedicated EP mask 840h */ + __IO uint32_t DINEP1MSK; /*!< dedicated EP mask 844h */ + uint32_t Reserved44[15]; /*!< Reserved 844-87Ch */ + __IO uint32_t DOUTEP1MSK; /*!< dedicated EP msk 884h */ +} USB_OTG_DeviceTypeDef; + + +/** + * @brief USB_OTG_IN_Endpoint-Specific_Register + */ +typedef struct +{ + __IO uint32_t DIEPCTL; /*!< dev IN Endpoint Control Reg 900h + (ep_num * 20h) + 00h */ + uint32_t Reserved04; /*!< Reserved 900h + (ep_num * 20h) + 04h */ + __IO uint32_t DIEPINT; /*!< dev IN Endpoint Itr Reg 900h + (ep_num * 20h) + 08h */ + uint32_t Reserved0C; /*!< Reserved 900h + (ep_num * 20h) + 0Ch */ + __IO uint32_t DIEPTSIZ; /*!< IN Endpoint Txfer Size 900h + (ep_num * 20h) + 10h */ + __IO uint32_t DIEPDMA; /*!< IN Endpoint DMA Address Reg 900h + (ep_num * 20h) + 14h */ + __IO uint32_t DTXFSTS; /*!< IN Endpoint Tx FIFO Status Reg 900h + (ep_num * 20h) + 18h */ + uint32_t Reserved18; /*!< Reserved 900h+(ep_num*20h)+1Ch-900h+ (ep_num * 20h) + 1Ch */ +} USB_OTG_INEndpointTypeDef; + + +/** + * @brief USB_OTG_OUT_Endpoint-Specific_Registers + */ +typedef struct +{ + __IO uint32_t DOEPCTL; /*!< dev OUT Endpoint Control Reg B00h + (ep_num * 20h) + 00h */ + uint32_t Reserved04; /*!< Reserved B00h + (ep_num * 20h) + 04h */ + __IO uint32_t DOEPINT; /*!< dev OUT Endpoint Itr Reg B00h + (ep_num * 20h) + 08h */ + uint32_t Reserved0C; /*!< Reserved B00h + (ep_num * 20h) + 0Ch */ + __IO uint32_t DOEPTSIZ; /*!< dev OUT Endpoint Txfer Size B00h + (ep_num * 20h) + 10h */ + __IO uint32_t DOEPDMA; /*!< dev OUT Endpoint DMA Address B00h + (ep_num * 20h) + 14h */ + uint32_t Reserved18[2]; /*!< Reserved B00h + (ep_num * 20h) + 18h - B00h + (ep_num * 20h) + 1Ch */ +} USB_OTG_OUTEndpointTypeDef; + + +/** + * @brief USB_OTG_Host_Mode_Register_Structures + */ +typedef struct +{ + __IO uint32_t HCFG; /*!< Host Configuration Register 400h */ + __IO uint32_t HFIR; /*!< Host Frame Interval Register 404h */ + __IO uint32_t HFNUM; /*!< Host Frame Nbr/Frame Remaining 408h */ + uint32_t Reserved40C; /*!< Reserved 40Ch */ + __IO uint32_t HPTXSTS; /*!< Host Periodic Tx FIFO/ Queue Status 410h */ + __IO uint32_t HAINT; /*!< Host All Channels Interrupt Register 414h */ + __IO uint32_t HAINTMSK; /*!< Host All Channels Interrupt Mask 418h */ +} USB_OTG_HostTypeDef; + +/** + * @brief USB_OTG_Host_Channel_Specific_Registers + */ +typedef struct +{ + __IO uint32_t HCCHAR; /*!< Host Channel Characteristics Register 500h */ + __IO uint32_t HCSPLT; /*!< Host Channel Split Control Register 504h */ + __IO uint32_t HCINT; /*!< Host Channel Interrupt Register 508h */ + __IO uint32_t HCINTMSK; /*!< Host Channel Interrupt Mask Register 50Ch */ + __IO uint32_t HCTSIZ; /*!< Host Channel Transfer Size Register 510h */ + __IO uint32_t HCDMA; /*!< Host Channel DMA Address Register 514h */ + uint32_t Reserved[2]; /*!< Reserved */ +} USB_OTG_HostChannelTypeDef; +/** + * @} + */ + +/** + * @brief OCTO Serial Peripheral Interface + */ + +typedef struct +{ + __IO uint32_t CR; /*!< OCTOSPI Control register, Address offset: 0x000 */ + uint32_t RESERVED; /*!< Reserved, Address offset: 0x004 */ + __IO uint32_t DCR1; /*!< OCTOSPI Device Configuration register 1, Address offset: 0x008 */ + __IO uint32_t DCR2; /*!< OCTOSPI Device Configuration register 2, Address offset: 0x00C */ + __IO uint32_t DCR3; /*!< OCTOSPI Device Configuration register 3, Address offset: 0x010 */ + __IO uint32_t DCR4; /*!< OCTOSPI Device Configuration register 4, Address offset: 0x014 */ + uint32_t RESERVED1[2]; /*!< Reserved, Address offset: 0x018-0x01C */ + __IO uint32_t SR; /*!< OCTOSPI Status register, Address offset: 0x020 */ + __IO uint32_t FCR; /*!< OCTOSPI Flag Clear register, Address offset: 0x024 */ + uint32_t RESERVED2[6]; /*!< Reserved, Address offset: 0x028-0x03C */ + __IO uint32_t DLR; /*!< OCTOSPI Data Length register, Address offset: 0x040 */ + uint32_t RESERVED3; /*!< Reserved, Address offset: 0x044 */ + __IO uint32_t AR; /*!< OCTOSPI Address register, Address offset: 0x048 */ + uint32_t RESERVED4; /*!< Reserved, Address offset: 0x04C */ + __IO uint32_t DR; /*!< OCTOSPI Data register, Address offset: 0x050 */ + uint32_t RESERVED5[11]; /*!< Reserved, Address offset: 0x054-0x07C */ + __IO uint32_t PSMKR; /*!< OCTOSPI Polling Status Mask register, Address offset: 0x080 */ + uint32_t RESERVED6; /*!< Reserved, Address offset: 0x084 */ + __IO uint32_t PSMAR; /*!< OCTOSPI Polling Status Match register, Address offset: 0x088 */ + uint32_t RESERVED7; /*!< Reserved, Address offset: 0x08C */ + __IO uint32_t PIR; /*!< OCTOSPI Polling Interval register, Address offset: 0x090 */ + uint32_t RESERVED8[27]; /*!< Reserved, Address offset: 0x094-0x0FC */ + __IO uint32_t CCR; /*!< OCTOSPI Communication Configuration register, Address offset: 0x100 */ + uint32_t RESERVED9; /*!< Reserved, Address offset: 0x104 */ + __IO uint32_t TCR; /*!< OCTOSPI Timing Configuration register, Address offset: 0x108 */ + uint32_t RESERVED10; /*!< Reserved, Address offset: 0x10C */ + __IO uint32_t IR; /*!< OCTOSPI Instruction register, Address offset: 0x110 */ + uint32_t RESERVED11[3]; /*!< Reserved, Address offset: 0x114-0x11C */ + __IO uint32_t ABR; /*!< OCTOSPI Alternate Bytes register, Address offset: 0x120 */ + uint32_t RESERVED12[3]; /*!< Reserved, Address offset: 0x124-0x12C */ + __IO uint32_t LPTR; /*!< OCTOSPI Low Power Timeout register, Address offset: 0x130 */ + uint32_t RESERVED13[3]; /*!< Reserved, Address offset: 0x134-0x13C */ + __IO uint32_t WPCCR; /*!< OCTOSPI Wrap Communication Configuration register, Address offset: 0x140 */ + uint32_t RESERVED14; /*!< Reserved, Address offset: 0x144 */ + __IO uint32_t WPTCR; /*!< OCTOSPI Wrap Timing Configuration register, Address offset: 0x148 */ + uint32_t RESERVED15; /*!< Reserved, Address offset: 0x14C */ + __IO uint32_t WPIR; /*!< OCTOSPI Wrap Instruction register, Address offset: 0x150 */ + uint32_t RESERVED16[3]; /*!< Reserved, Address offset: 0x154-0x15C */ + __IO uint32_t WPABR; /*!< OCTOSPI Wrap Alternate Bytes register, Address offset: 0x160 */ + uint32_t RESERVED17[7]; /*!< Reserved, Address offset: 0x164-0x17C */ + __IO uint32_t WCCR; /*!< OCTOSPI Write Communication Configuration register, Address offset: 0x180 */ + uint32_t RESERVED18; /*!< Reserved, Address offset: 0x184 */ + __IO uint32_t WTCR; /*!< OCTOSPI Write Timing Configuration register, Address offset: 0x188 */ + uint32_t RESERVED19; /*!< Reserved, Address offset: 0x18C */ + __IO uint32_t WIR; /*!< OCTOSPI Write Instruction register, Address offset: 0x190 */ + uint32_t RESERVED20[3]; /*!< Reserved, Address offset: 0x194-0x19C */ + __IO uint32_t WABR; /*!< OCTOSPI Write Alternate Bytes register, Address offset: 0x1A0 */ + uint32_t RESERVED21[23]; /*!< Reserved, Address offset: 0x1A4-0x1FC */ + __IO uint32_t HLCR; /*!< OCTOSPI Hyperbus Latency Configuration register, Address offset: 0x200 */ + uint32_t RESERVED22[122]; /*!< Reserved, Address offset: 0x204-0x3EC */ + __IO uint32_t HWCFGR; /*!< OCTOSPI HW Configuration register, Address offset: 0x3F0 */ + __IO uint32_t VER; /*!< OCTOSPI Version register, Address offset: 0x3F4 */ + __IO uint32_t ID; /*!< OCTOSPI Identification register, Address offset: 0x3F8 */ + __IO uint32_t MID; /*!< OCTOPSI HW Magic ID register, Address offset: 0x3FC */ +} OCTOSPI_TypeDef; + +/** + * @} + */ +/** + * @brief OCTO Serial Peripheral Interface IO Manager + */ + +typedef struct +{ + __IO uint32_t CR; /*!< OCTOSPI IO Manager Control register, Address offset: 0x00 */ + __IO uint32_t PCR[3]; /*!< OCTOSPI IO Manager Port[1:3] Configuration register, Address offset: 0x04-0x20 */ +} OCTOSPIM_TypeDef; + +/** + * @} + */ + +/** + * @brief OTFD register + */ +typedef struct +{ + __IO uint32_t REG_CONFIGR; + __IO uint32_t REG_START_ADDR; + __IO uint32_t REG_END_ADDR; + __IO uint32_t REG_NONCER0; + __IO uint32_t REG_NONCER1; + __IO uint32_t REG_KEYR0; + __IO uint32_t REG_KEYR1; + __IO uint32_t REG_KEYR2; + __IO uint32_t REG_KEYR3; +} OTFDEC_Region_TypeDef; + +typedef struct +{ + __IO uint32_t CR; + uint32_t RESERVED1[191]; + __IO uint32_t ISR; + __IO uint32_t ICR; + __IO uint32_t IER; + uint32_t RESERVED2[56]; + __IO uint32_t HWCFGR2; + __IO uint32_t HWCFGR1; + __IO uint32_t VERR; + __IO uint32_t IPIDR; + __IO uint32_t SIDR; +} OTFDEC_TypeDef; +/** + * @} + */ + +/** @addtogroup Peripheral_memory_map + * @{ + */ +#define D1_ITCMRAM_BASE (0x00000000UL) /*!< Base address of : 64KB RAM reserved for CPU execution/instruction accessible over ITCM */ +#define D1_ITCMICP_BASE (0x00100000UL) /*!< Base address of : (up to 128KB) embedded Test FLASH memory accessible over ITCM */ +#define D1_DTCMRAM_BASE (0x20000000UL) /*!< Base address of : 128KB system data RAM accessible over DTCM */ +#define D1_AXIFLASH_BASE (0x08000000UL) /*!< Base address of : (up to 128 KB) embedded FLASH memory accessible over AXI */ +#define D1_AXIICP_BASE (0x1FF00000UL) /*!< Base address of : (up to 128KB) embedded Test FLASH memory accessible over AXI */ +#define D1_AXISRAM1_BASE (0x24000000UL) /*!< Base address of : (up to 128KB) system data RAM1 accessible over over AXI */ +#define D1_AXISRAM2_BASE (0x24020000UL) /*!< Base address of : (up to 192KB) system data RAM2 accessible over over AXI to be shared with ITCM (64K granularity) */ +#define D1_AXISRAM_BASE D1_AXISRAM1_BASE /*!< Base address of : (up to 320KB) system data RAM1/2 accessible over over AXI */ + +#define D2_AHBSRAM1_BASE (0x30000000UL) /*!< Base address of : (up to 16KB) system data RAM accessible over over AXI->AHB Bridge */ +#define D2_AHBSRAM2_BASE (0x30004000UL) /*!< Base address of : (up to 16KB) system data RAM accessible over over AXI->AHB Bridge */ +#define D2_AHBSRAM_BASE D2_AHBSRAM1_BASE /*!< Base address of : (up to 32KB) system data RAM1/2 accessible over over AXI->AHB Bridge */ + +#define D3_BKPSRAM_BASE (0x38800000UL) /*!< Base address of : Backup SRAM(4 KB) over AXI->AHB Bridge */ +#define D3_SRAM_BASE (0x38000000UL) /*!< Base address of : Backup SRAM(16 KB) over AXI->AHB Bridge */ + +#define PERIPH_BASE (0x40000000UL) /*!< Base address of : AHB/APB Peripherals */ +#define OCTOSPI1_BASE (0x90000000UL) /*!< Base address of : OCTOSPI1 memories accessible over AXI */ +#define OCTOSPI2_BASE (0x70000000UL) /*!< Base address of : OCTOSPI2 memories accessible over AXI */ + +#define FLASH_BANK1_BASE (0x08000000UL) /*!< Base address of : (up to 128 KB) Flash Bank1 accessible over AXI */ +#define FLASH_END (0x0801FFFFUL) /*!< FLASH end address */ + + +/* Legacy define */ +#define FLASH_BASE FLASH_BANK1_BASE + +/*!< Device electronic signature memory map */ +#define UID_BASE (0x1FF1E800UL) /*!< Unique device ID register base address */ +#define FLASHSIZE_BASE (0x1FF1E880UL) /*!< FLASH Size register base address */ + + +/*!< Peripheral memory map */ +#define D2_APB1PERIPH_BASE PERIPH_BASE +#define D2_APB2PERIPH_BASE (PERIPH_BASE + 0x00010000UL) +#define D2_AHB1PERIPH_BASE (PERIPH_BASE + 0x00020000UL) +#define D2_AHB2PERIPH_BASE (PERIPH_BASE + 0x08020000UL) + +#define D1_APB1PERIPH_BASE (PERIPH_BASE + 0x10000000UL) +#define D1_AHB1PERIPH_BASE (PERIPH_BASE + 0x12000000UL) + +#define D3_APB1PERIPH_BASE (PERIPH_BASE + 0x18000000UL) +#define D3_AHB1PERIPH_BASE (PERIPH_BASE + 0x18020000UL) + +/*!< Legacy Peripheral memory map */ +#define APB1PERIPH_BASE PERIPH_BASE +#define APB2PERIPH_BASE (PERIPH_BASE + 0x00010000UL) +#define AHB1PERIPH_BASE (PERIPH_BASE + 0x00020000UL) +#define AHB2PERIPH_BASE (PERIPH_BASE + 0x08000000UL) + + +/*!< D1_AHB1PERIPH peripherals */ + +#define MDMA_BASE (D1_AHB1PERIPH_BASE + 0x0000UL) +#define DMA2D_BASE (D1_AHB1PERIPH_BASE + 0x1000UL) +#define FLASH_R_BASE (D1_AHB1PERIPH_BASE + 0x2000UL) +#define FMC_R_BASE (D1_AHB1PERIPH_BASE + 0x4000UL) +#define OCTOSPI1_R_BASE (D1_AHB1PERIPH_BASE + 0x5000UL) +#define DLYB_OCTOSPI1_BASE (D1_AHB1PERIPH_BASE + 0x6000UL) +#define SDMMC1_BASE (D1_AHB1PERIPH_BASE + 0x7000UL) +#define DLYB_SDMMC1_BASE (D1_AHB1PERIPH_BASE + 0x8000UL) +#define RAMECC1_BASE (D1_AHB1PERIPH_BASE + 0x9000UL) +#define OCTOSPI2_R_BASE (D1_AHB1PERIPH_BASE + 0xA000UL) +#define DLYB_OCTOSPI2_BASE (D1_AHB1PERIPH_BASE + 0xB000UL) +#define OCTOSPIM_BASE (D1_AHB1PERIPH_BASE + 0xB400UL) + +#define OTFDEC1_BASE (D1_AHB1PERIPH_BASE + 0xB800UL) +#define OTFDEC1_REGION1_BASE (OTFDEC1_BASE + 0x20UL) +#define OTFDEC1_REGION2_BASE (OTFDEC1_BASE + 0x50UL) +#define OTFDEC1_REGION3_BASE (OTFDEC1_BASE + 0x80UL) +#define OTFDEC1_REGION4_BASE (OTFDEC1_BASE + 0xB0UL) +#define OTFDEC2_BASE (D1_AHB1PERIPH_BASE + 0xBC00UL) +#define OTFDEC2_REGION1_BASE (OTFDEC2_BASE + 0x20UL) +#define OTFDEC2_REGION2_BASE (OTFDEC2_BASE + 0x50UL) +#define OTFDEC2_REGION3_BASE (OTFDEC2_BASE + 0x80UL) +#define OTFDEC2_REGION4_BASE (OTFDEC2_BASE + 0xB0UL) + +/*!< D2_AHB1PERIPH peripherals */ + +#define DMA1_BASE (D2_AHB1PERIPH_BASE + 0x0000UL) +#define DMA2_BASE (D2_AHB1PERIPH_BASE + 0x0400UL) +#define DMAMUX1_BASE (D2_AHB1PERIPH_BASE + 0x0800UL) +#define ADC1_BASE (D2_AHB1PERIPH_BASE + 0x2000UL) +#define ADC2_BASE (D2_AHB1PERIPH_BASE + 0x2100UL) +#define ADC12_COMMON_BASE (D2_AHB1PERIPH_BASE + 0x2300UL) +#define ETH_BASE (D2_AHB1PERIPH_BASE + 0x8000UL) +#define ETH_MAC_BASE (ETH_BASE) + +/*!< USB registers base address */ +#define USB1_OTG_HS_PERIPH_BASE (0x40040000UL) +#define USB_OTG_GLOBAL_BASE (0x000UL) +#define USB_OTG_DEVICE_BASE (0x800UL) +#define USB_OTG_IN_ENDPOINT_BASE (0x900UL) +#define USB_OTG_OUT_ENDPOINT_BASE (0xB00UL) +#define USB_OTG_EP_REG_SIZE (0x20UL) +#define USB_OTG_HOST_BASE (0x400UL) +#define USB_OTG_HOST_PORT_BASE (0x440UL) +#define USB_OTG_HOST_CHANNEL_BASE (0x500UL) +#define USB_OTG_HOST_CHANNEL_SIZE (0x20UL) +#define USB_OTG_PCGCCTL_BASE (0xE00UL) +#define USB_OTG_FIFO_BASE (0x1000UL) +#define USB_OTG_FIFO_SIZE (0x1000UL) + +/*!< D2_AHB2PERIPH peripherals */ + +#define DCMI_BASE (D2_AHB2PERIPH_BASE + 0x0000UL) +#define PSSI_BASE (D2_AHB2PERIPH_BASE + 0x0400UL) +#define CRYP_BASE (D2_AHB2PERIPH_BASE + 0x1000UL) +#define HASH_BASE (D2_AHB2PERIPH_BASE + 0x1400UL) +#define HASH_DIGEST_BASE (D2_AHB2PERIPH_BASE + 0x1710UL) +#define RNG_BASE (D2_AHB2PERIPH_BASE + 0x1800UL) +#define SDMMC2_BASE (D2_AHB2PERIPH_BASE + 0x2400UL) +#define DLYB_SDMMC2_BASE (D2_AHB2PERIPH_BASE + 0x2800UL) +#define RAMECC2_BASE (D2_AHB2PERIPH_BASE + 0x3000UL) +#define FMAC_BASE (D2_AHB2PERIPH_BASE + 0x4000UL) +#define CORDIC_BASE (D2_AHB2PERIPH_BASE + 0x4400UL) + +/*!< D3_AHB1PERIPH peripherals */ +#define GPIOA_BASE (D3_AHB1PERIPH_BASE + 0x0000UL) +#define GPIOB_BASE (D3_AHB1PERIPH_BASE + 0x0400UL) +#define GPIOC_BASE (D3_AHB1PERIPH_BASE + 0x0800UL) +#define GPIOD_BASE (D3_AHB1PERIPH_BASE + 0x0C00UL) +#define GPIOE_BASE (D3_AHB1PERIPH_BASE + 0x1000UL) +#define GPIOF_BASE (D3_AHB1PERIPH_BASE + 0x1400UL) +#define GPIOG_BASE (D3_AHB1PERIPH_BASE + 0x1800UL) +#define GPIOH_BASE (D3_AHB1PERIPH_BASE + 0x1C00UL) +#define GPIOJ_BASE (D3_AHB1PERIPH_BASE + 0x2400UL) +#define GPIOK_BASE (D3_AHB1PERIPH_BASE + 0x2800UL) +#define RCC_BASE (D3_AHB1PERIPH_BASE + 0x4400UL) +#define PWR_BASE (D3_AHB1PERIPH_BASE + 0x4800UL) +#define CRC_BASE (D3_AHB1PERIPH_BASE + 0x4C00UL) +#define BDMA_BASE (D3_AHB1PERIPH_BASE + 0x5400UL) +#define DMAMUX2_BASE (D3_AHB1PERIPH_BASE + 0x5800UL) +#define ADC3_BASE (D3_AHB1PERIPH_BASE + 0x6000UL) +#define ADC3_COMMON_BASE (D3_AHB1PERIPH_BASE + 0x6300UL) +#define HSEM_BASE (D3_AHB1PERIPH_BASE + 0x6400UL) +#define RAMECC3_BASE (D3_AHB1PERIPH_BASE + 0x7000UL) + +/*!< D1_APB1PERIPH peripherals */ +#define LTDC_BASE (D1_APB1PERIPH_BASE + 0x1000UL) +#define LTDC_Layer1_BASE (LTDC_BASE + 0x84UL) +#define LTDC_Layer2_BASE (LTDC_BASE + 0x104UL) +#define WWDG1_BASE (D1_APB1PERIPH_BASE + 0x3000UL) + +/*!< D2_APB1PERIPH peripherals */ +#define TIM2_BASE (D2_APB1PERIPH_BASE + 0x0000UL) +#define TIM3_BASE (D2_APB1PERIPH_BASE + 0x0400UL) +#define TIM4_BASE (D2_APB1PERIPH_BASE + 0x0800UL) +#define TIM5_BASE (D2_APB1PERIPH_BASE + 0x0C00UL) +#define TIM6_BASE (D2_APB1PERIPH_BASE + 0x1000UL) +#define TIM7_BASE (D2_APB1PERIPH_BASE + 0x1400UL) +#define TIM12_BASE (D2_APB1PERIPH_BASE + 0x1800UL) +#define TIM13_BASE (D2_APB1PERIPH_BASE + 0x1C00UL) +#define TIM14_BASE (D2_APB1PERIPH_BASE + 0x2000UL) +#define LPTIM1_BASE (D2_APB1PERIPH_BASE + 0x2400UL) + + +#define SPI2_BASE (D2_APB1PERIPH_BASE + 0x3800UL) +#define SPI3_BASE (D2_APB1PERIPH_BASE + 0x3C00UL) +#define SPDIFRX_BASE (D2_APB1PERIPH_BASE + 0x4000UL) +#define USART2_BASE (D2_APB1PERIPH_BASE + 0x4400UL) +#define USART3_BASE (D2_APB1PERIPH_BASE + 0x4800UL) +#define UART4_BASE (D2_APB1PERIPH_BASE + 0x4C00UL) +#define UART5_BASE (D2_APB1PERIPH_BASE + 0x5000UL) +#define I2C1_BASE (D2_APB1PERIPH_BASE + 0x5400UL) +#define I2C2_BASE (D2_APB1PERIPH_BASE + 0x5800UL) +#define I2C3_BASE (D2_APB1PERIPH_BASE + 0x5C00UL) +#define I2C5_BASE (D2_APB1PERIPH_BASE + 0x6400UL) +#define CEC_BASE (D2_APB1PERIPH_BASE + 0x6C00UL) +#define DAC1_BASE (D2_APB1PERIPH_BASE + 0x7400UL) +#define UART7_BASE (D2_APB1PERIPH_BASE + 0x7800UL) +#define UART8_BASE (D2_APB1PERIPH_BASE + 0x7C00UL) +#define CRS_BASE (D2_APB1PERIPH_BASE + 0x8400UL) +#define SWPMI1_BASE (D2_APB1PERIPH_BASE + 0x8800UL) +#define OPAMP_BASE (D2_APB1PERIPH_BASE + 0x9000UL) +#define OPAMP1_BASE (D2_APB1PERIPH_BASE + 0x9000UL) +#define OPAMP2_BASE (D2_APB1PERIPH_BASE + 0x9010UL) +#define MDIOS_BASE (D2_APB1PERIPH_BASE + 0x9400UL) +#define FDCAN1_BASE (D2_APB1PERIPH_BASE + 0xA000UL) +#define FDCAN2_BASE (D2_APB1PERIPH_BASE + 0xA400UL) +#define FDCAN_CCU_BASE (D2_APB1PERIPH_BASE + 0xA800UL) +#define SRAMCAN_BASE (D2_APB1PERIPH_BASE + 0xAC00UL) +#define FDCAN3_BASE (D2_APB1PERIPH_BASE + 0xD400UL) +#define TIM23_BASE (D2_APB1PERIPH_BASE + 0xE000UL) +#define TIM24_BASE (D2_APB1PERIPH_BASE + 0xE400UL) + +/*!< D2_APB2PERIPH peripherals */ + +#define TIM1_BASE (D2_APB2PERIPH_BASE + 0x0000UL) +#define TIM8_BASE (D2_APB2PERIPH_BASE + 0x0400UL) +#define USART1_BASE (D2_APB2PERIPH_BASE + 0x1000UL) +#define USART6_BASE (D2_APB2PERIPH_BASE + 0x1400UL) +#define UART9_BASE (D2_APB2PERIPH_BASE + 0x1800UL) +#define USART10_BASE (D2_APB2PERIPH_BASE + 0x1C00UL) +#define SPI1_BASE (D2_APB2PERIPH_BASE + 0x3000UL) +#define SPI4_BASE (D2_APB2PERIPH_BASE + 0x3400UL) +#define TIM15_BASE (D2_APB2PERIPH_BASE + 0x4000UL) +#define TIM16_BASE (D2_APB2PERIPH_BASE + 0x4400UL) +#define TIM17_BASE (D2_APB2PERIPH_BASE + 0x4800UL) +#define SPI5_BASE (D2_APB2PERIPH_BASE + 0x5000UL) +#define SAI1_BASE (D2_APB2PERIPH_BASE + 0x5800UL) +#define SAI1_Block_A_BASE (SAI1_BASE + 0x004UL) +#define SAI1_Block_B_BASE (SAI1_BASE + 0x024UL) +#define DFSDM1_BASE (D2_APB2PERIPH_BASE + 0x7800UL) +#define DFSDM1_Channel0_BASE (DFSDM1_BASE + 0x00UL) +#define DFSDM1_Channel1_BASE (DFSDM1_BASE + 0x20UL) +#define DFSDM1_Channel2_BASE (DFSDM1_BASE + 0x40UL) +#define DFSDM1_Channel3_BASE (DFSDM1_BASE + 0x60UL) +#define DFSDM1_Channel4_BASE (DFSDM1_BASE + 0x80UL) +#define DFSDM1_Channel5_BASE (DFSDM1_BASE + 0xA0UL) +#define DFSDM1_Channel6_BASE (DFSDM1_BASE + 0xC0UL) +#define DFSDM1_Channel7_BASE (DFSDM1_BASE + 0xE0UL) +#define DFSDM1_Filter0_BASE (DFSDM1_BASE + 0x100UL) +#define DFSDM1_Filter1_BASE (DFSDM1_BASE + 0x180UL) +#define DFSDM1_Filter2_BASE (DFSDM1_BASE + 0x200UL) +#define DFSDM1_Filter3_BASE (DFSDM1_BASE + 0x280UL) + + +/*!< D3_APB1PERIPH peripherals */ +#define EXTI_BASE (D3_APB1PERIPH_BASE + 0x0000UL) +#define EXTI_D1_BASE (EXTI_BASE + 0x0080UL) +#define EXTI_D2_BASE (EXTI_BASE + 0x00C0UL) +#define SYSCFG_BASE (D3_APB1PERIPH_BASE + 0x0400UL) +#define LPUART1_BASE (D3_APB1PERIPH_BASE + 0x0C00UL) +#define SPI6_BASE (D3_APB1PERIPH_BASE + 0x1400UL) +#define I2C4_BASE (D3_APB1PERIPH_BASE + 0x1C00UL) +#define LPTIM2_BASE (D3_APB1PERIPH_BASE + 0x2400UL) +#define LPTIM3_BASE (D3_APB1PERIPH_BASE + 0x2800UL) +#define LPTIM4_BASE (D3_APB1PERIPH_BASE + 0x2C00UL) +#define LPTIM5_BASE (D3_APB1PERIPH_BASE + 0x3000UL) +#define COMP12_BASE (D3_APB1PERIPH_BASE + 0x3800UL) +#define COMP1_BASE (COMP12_BASE + 0x0CUL) +#define COMP2_BASE (COMP12_BASE + 0x10UL) +#define VREFBUF_BASE (D3_APB1PERIPH_BASE + 0x3C00UL) +#define RTC_BASE (D3_APB1PERIPH_BASE + 0x4000UL) +#define IWDG1_BASE (D3_APB1PERIPH_BASE + 0x4800UL) + + +#define SAI4_BASE (D3_APB1PERIPH_BASE + 0x5400UL) +#define SAI4_Block_A_BASE (SAI4_BASE + 0x004UL) +#define SAI4_Block_B_BASE (SAI4_BASE + 0x024UL) + +#define DTS_BASE (D3_APB1PERIPH_BASE + 0x6800UL) + + + +#define BDMA_Channel0_BASE (BDMA_BASE + 0x0008UL) +#define BDMA_Channel1_BASE (BDMA_BASE + 0x001CUL) +#define BDMA_Channel2_BASE (BDMA_BASE + 0x0030UL) +#define BDMA_Channel3_BASE (BDMA_BASE + 0x0044UL) +#define BDMA_Channel4_BASE (BDMA_BASE + 0x0058UL) +#define BDMA_Channel5_BASE (BDMA_BASE + 0x006CUL) +#define BDMA_Channel6_BASE (BDMA_BASE + 0x0080UL) +#define BDMA_Channel7_BASE (BDMA_BASE + 0x0094UL) + +#define DMAMUX2_Channel0_BASE (DMAMUX2_BASE) +#define DMAMUX2_Channel1_BASE (DMAMUX2_BASE + 0x0004UL) +#define DMAMUX2_Channel2_BASE (DMAMUX2_BASE + 0x0008UL) +#define DMAMUX2_Channel3_BASE (DMAMUX2_BASE + 0x000CUL) +#define DMAMUX2_Channel4_BASE (DMAMUX2_BASE + 0x0010UL) +#define DMAMUX2_Channel5_BASE (DMAMUX2_BASE + 0x0014UL) +#define DMAMUX2_Channel6_BASE (DMAMUX2_BASE + 0x0018UL) +#define DMAMUX2_Channel7_BASE (DMAMUX2_BASE + 0x001CUL) + +#define DMAMUX2_RequestGenerator0_BASE (DMAMUX2_BASE + 0x0100UL) +#define DMAMUX2_RequestGenerator1_BASE (DMAMUX2_BASE + 0x0104UL) +#define DMAMUX2_RequestGenerator2_BASE (DMAMUX2_BASE + 0x0108UL) +#define DMAMUX2_RequestGenerator3_BASE (DMAMUX2_BASE + 0x010CUL) +#define DMAMUX2_RequestGenerator4_BASE (DMAMUX2_BASE + 0x0110UL) +#define DMAMUX2_RequestGenerator5_BASE (DMAMUX2_BASE + 0x0114UL) +#define DMAMUX2_RequestGenerator6_BASE (DMAMUX2_BASE + 0x0118UL) +#define DMAMUX2_RequestGenerator7_BASE (DMAMUX2_BASE + 0x011CUL) + +#define DMAMUX2_ChannelStatus_BASE (DMAMUX2_BASE + 0x0080UL) +#define DMAMUX2_RequestGenStatus_BASE (DMAMUX2_BASE + 0x0140UL) + +#define DMA1_Stream0_BASE (DMA1_BASE + 0x010UL) +#define DMA1_Stream1_BASE (DMA1_BASE + 0x028UL) +#define DMA1_Stream2_BASE (DMA1_BASE + 0x040UL) +#define DMA1_Stream3_BASE (DMA1_BASE + 0x058UL) +#define DMA1_Stream4_BASE (DMA1_BASE + 0x070UL) +#define DMA1_Stream5_BASE (DMA1_BASE + 0x088UL) +#define DMA1_Stream6_BASE (DMA1_BASE + 0x0A0UL) +#define DMA1_Stream7_BASE (DMA1_BASE + 0x0B8UL) + +#define DMA2_Stream0_BASE (DMA2_BASE + 0x010UL) +#define DMA2_Stream1_BASE (DMA2_BASE + 0x028UL) +#define DMA2_Stream2_BASE (DMA2_BASE + 0x040UL) +#define DMA2_Stream3_BASE (DMA2_BASE + 0x058UL) +#define DMA2_Stream4_BASE (DMA2_BASE + 0x070UL) +#define DMA2_Stream5_BASE (DMA2_BASE + 0x088UL) +#define DMA2_Stream6_BASE (DMA2_BASE + 0x0A0UL) +#define DMA2_Stream7_BASE (DMA2_BASE + 0x0B8UL) + +#define DMAMUX1_Channel0_BASE (DMAMUX1_BASE) +#define DMAMUX1_Channel1_BASE (DMAMUX1_BASE + 0x0004UL) +#define DMAMUX1_Channel2_BASE (DMAMUX1_BASE + 0x0008UL) +#define DMAMUX1_Channel3_BASE (DMAMUX1_BASE + 0x000CUL) +#define DMAMUX1_Channel4_BASE (DMAMUX1_BASE + 0x0010UL) +#define DMAMUX1_Channel5_BASE (DMAMUX1_BASE + 0x0014UL) +#define DMAMUX1_Channel6_BASE (DMAMUX1_BASE + 0x0018UL) +#define DMAMUX1_Channel7_BASE (DMAMUX1_BASE + 0x001CUL) +#define DMAMUX1_Channel8_BASE (DMAMUX1_BASE + 0x0020UL) +#define DMAMUX1_Channel9_BASE (DMAMUX1_BASE + 0x0024UL) +#define DMAMUX1_Channel10_BASE (DMAMUX1_BASE + 0x0028UL) +#define DMAMUX1_Channel11_BASE (DMAMUX1_BASE + 0x002CUL) +#define DMAMUX1_Channel12_BASE (DMAMUX1_BASE + 0x0030UL) +#define DMAMUX1_Channel13_BASE (DMAMUX1_BASE + 0x0034UL) +#define DMAMUX1_Channel14_BASE (DMAMUX1_BASE + 0x0038UL) +#define DMAMUX1_Channel15_BASE (DMAMUX1_BASE + 0x003CUL) + +#define DMAMUX1_RequestGenerator0_BASE (DMAMUX1_BASE + 0x0100UL) +#define DMAMUX1_RequestGenerator1_BASE (DMAMUX1_BASE + 0x0104UL) +#define DMAMUX1_RequestGenerator2_BASE (DMAMUX1_BASE + 0x0108UL) +#define DMAMUX1_RequestGenerator3_BASE (DMAMUX1_BASE + 0x010CUL) +#define DMAMUX1_RequestGenerator4_BASE (DMAMUX1_BASE + 0x0110UL) +#define DMAMUX1_RequestGenerator5_BASE (DMAMUX1_BASE + 0x0114UL) +#define DMAMUX1_RequestGenerator6_BASE (DMAMUX1_BASE + 0x0118UL) +#define DMAMUX1_RequestGenerator7_BASE (DMAMUX1_BASE + 0x011CUL) + +#define DMAMUX1_ChannelStatus_BASE (DMAMUX1_BASE + 0x0080UL) +#define DMAMUX1_RequestGenStatus_BASE (DMAMUX1_BASE + 0x0140UL) + +/*!< FMC Banks registers base address */ +#define FMC_Bank1_R_BASE (FMC_R_BASE + 0x0000UL) +#define FMC_Bank1E_R_BASE (FMC_R_BASE + 0x0104UL) +#define FMC_Bank2_R_BASE (FMC_R_BASE + 0x0060UL) +#define FMC_Bank3_R_BASE (FMC_R_BASE + 0x0080UL) +#define FMC_Bank5_6_R_BASE (FMC_R_BASE + 0x0140UL) + +/* Debug MCU registers base address */ +#define DBGMCU_BASE (0x5C001000UL) + +#define MDMA_Channel0_BASE (MDMA_BASE + 0x00000040UL) +#define MDMA_Channel1_BASE (MDMA_BASE + 0x00000080UL) +#define MDMA_Channel2_BASE (MDMA_BASE + 0x000000C0UL) +#define MDMA_Channel3_BASE (MDMA_BASE + 0x00000100UL) +#define MDMA_Channel4_BASE (MDMA_BASE + 0x00000140UL) +#define MDMA_Channel5_BASE (MDMA_BASE + 0x00000180UL) +#define MDMA_Channel6_BASE (MDMA_BASE + 0x000001C0UL) +#define MDMA_Channel7_BASE (MDMA_BASE + 0x00000200UL) +#define MDMA_Channel8_BASE (MDMA_BASE + 0x00000240UL) +#define MDMA_Channel9_BASE (MDMA_BASE + 0x00000280UL) +#define MDMA_Channel10_BASE (MDMA_BASE + 0x000002C0UL) +#define MDMA_Channel11_BASE (MDMA_BASE + 0x00000300UL) +#define MDMA_Channel12_BASE (MDMA_BASE + 0x00000340UL) +#define MDMA_Channel13_BASE (MDMA_BASE + 0x00000380UL) +#define MDMA_Channel14_BASE (MDMA_BASE + 0x000003C0UL) +#define MDMA_Channel15_BASE (MDMA_BASE + 0x00000400UL) + +#define RAMECC1_Monitor1_BASE (RAMECC1_BASE + 0x20UL) +#define RAMECC1_Monitor2_BASE (RAMECC1_BASE + 0x40UL) +#define RAMECC1_Monitor3_BASE (RAMECC1_BASE + 0x60UL) +#define RAMECC1_Monitor4_BASE (RAMECC1_BASE + 0x80UL) +#define RAMECC1_Monitor5_BASE (RAMECC1_BASE + 0xA0UL) +#define RAMECC1_Monitor6_BASE (RAMECC1_BASE + 0xC0UL) + +#define RAMECC2_Monitor1_BASE (RAMECC2_BASE + 0x20UL) +#define RAMECC2_Monitor2_BASE (RAMECC2_BASE + 0x40UL) +#define RAMECC2_Monitor3_BASE (RAMECC2_BASE + 0x60UL) + +#define RAMECC3_Monitor1_BASE (RAMECC3_BASE + 0x20UL) +#define RAMECC3_Monitor2_BASE (RAMECC3_BASE + 0x40UL) + + +/** + * @} + */ + +/** @addtogroup Peripheral_declaration + * @{ + */ +#define TIM2 ((TIM_TypeDef *) TIM2_BASE) +#define TIM3 ((TIM_TypeDef *) TIM3_BASE) +#define TIM4 ((TIM_TypeDef *) TIM4_BASE) +#define TIM5 ((TIM_TypeDef *) TIM5_BASE) +#define TIM6 ((TIM_TypeDef *) TIM6_BASE) +#define TIM7 ((TIM_TypeDef *) TIM7_BASE) +#define TIM13 ((TIM_TypeDef *) TIM13_BASE) +#define TIM14 ((TIM_TypeDef *) TIM14_BASE) +#define VREFBUF ((VREFBUF_TypeDef *) VREFBUF_BASE) +#define RTC ((RTC_TypeDef *) RTC_BASE) +#define WWDG1 ((WWDG_TypeDef *) WWDG1_BASE) + + +#define IWDG1 ((IWDG_TypeDef *) IWDG1_BASE) +#define SPI2 ((SPI_TypeDef *) SPI2_BASE) +#define SPI3 ((SPI_TypeDef *) SPI3_BASE) +#define SPI4 ((SPI_TypeDef *) SPI4_BASE) +#define SPI5 ((SPI_TypeDef *) SPI5_BASE) +#define SPI6 ((SPI_TypeDef *) SPI6_BASE) +#define USART2 ((USART_TypeDef *) USART2_BASE) +#define USART3 ((USART_TypeDef *) USART3_BASE) +#define USART6 ((USART_TypeDef *) USART6_BASE) +#define USART10 ((USART_TypeDef *) USART10_BASE) +#define UART7 ((USART_TypeDef *) UART7_BASE) +#define UART8 ((USART_TypeDef *) UART8_BASE) +#define UART9 ((USART_TypeDef *) UART9_BASE) +#define CRS ((CRS_TypeDef *) CRS_BASE) +#define UART4 ((USART_TypeDef *) UART4_BASE) +#define UART5 ((USART_TypeDef *) UART5_BASE) +#define I2C1 ((I2C_TypeDef *) I2C1_BASE) +#define I2C2 ((I2C_TypeDef *) I2C2_BASE) +#define I2C3 ((I2C_TypeDef *) I2C3_BASE) +#define I2C4 ((I2C_TypeDef *) I2C4_BASE) +#define I2C5 ((I2C_TypeDef *) I2C5_BASE) +#define FDCAN1 ((FDCAN_GlobalTypeDef *) FDCAN1_BASE) +#define FDCAN2 ((FDCAN_GlobalTypeDef *) FDCAN2_BASE) +#define FDCAN_CCU ((FDCAN_ClockCalibrationUnit_TypeDef *) FDCAN_CCU_BASE) +#define FDCAN3 ((FDCAN_GlobalTypeDef *) FDCAN3_BASE) +#define TIM23 ((TIM_TypeDef *) TIM23_BASE) +#define TIM24 ((TIM_TypeDef *) TIM24_BASE) +#define CEC ((CEC_TypeDef *) CEC_BASE) +#define LPTIM1 ((LPTIM_TypeDef *) LPTIM1_BASE) +#define PWR ((PWR_TypeDef *) PWR_BASE) +#define DAC1 ((DAC_TypeDef *) DAC1_BASE) +#define LPUART1 ((USART_TypeDef *) LPUART1_BASE) +#define SWPMI1 ((SWPMI_TypeDef *) SWPMI1_BASE) +#define LPTIM2 ((LPTIM_TypeDef *) LPTIM2_BASE) +#define LPTIM3 ((LPTIM_TypeDef *) LPTIM3_BASE) +#define DTS ((DTS_TypeDef *) DTS_BASE) +#define LPTIM4 ((LPTIM_TypeDef *) LPTIM4_BASE) +#define LPTIM5 ((LPTIM_TypeDef *) LPTIM5_BASE) + +#define SYSCFG ((SYSCFG_TypeDef *) SYSCFG_BASE) +#define COMP12 ((COMPOPT_TypeDef *) COMP12_BASE) +#define COMP1 ((COMP_TypeDef *) COMP1_BASE) +#define COMP2 ((COMP_TypeDef *) COMP2_BASE) +#define COMP12_COMMON ((COMP_Common_TypeDef *) COMP2_BASE) +#define OPAMP ((OPAMP_TypeDef *) OPAMP_BASE) +#define OPAMP1 ((OPAMP_TypeDef *) OPAMP1_BASE) +#define OPAMP2 ((OPAMP_TypeDef *) OPAMP2_BASE) + + +#define EXTI ((EXTI_TypeDef *) EXTI_BASE) +#define EXTI_D1 ((EXTI_Core_TypeDef *) EXTI_D1_BASE) +#define EXTI_D2 ((EXTI_Core_TypeDef *) EXTI_D2_BASE) +#define TIM1 ((TIM_TypeDef *) TIM1_BASE) +#define SPI1 ((SPI_TypeDef *) SPI1_BASE) +#define TIM8 ((TIM_TypeDef *) TIM8_BASE) +#define USART1 ((USART_TypeDef *) USART1_BASE) +#define TIM12 ((TIM_TypeDef *) TIM12_BASE) +#define TIM15 ((TIM_TypeDef *) TIM15_BASE) +#define TIM16 ((TIM_TypeDef *) TIM16_BASE) +#define TIM17 ((TIM_TypeDef *) TIM17_BASE) +#define SAI1 ((SAI_TypeDef *) SAI1_BASE) +#define SAI1_Block_A ((SAI_Block_TypeDef *)SAI1_Block_A_BASE) +#define SAI1_Block_B ((SAI_Block_TypeDef *)SAI1_Block_B_BASE) +#define SAI4 ((SAI_TypeDef *) SAI4_BASE) +#define SAI4_Block_A ((SAI_Block_TypeDef *)SAI4_Block_A_BASE) +#define SAI4_Block_B ((SAI_Block_TypeDef *)SAI4_Block_B_BASE) + +#define SPDIFRX ((SPDIFRX_TypeDef *) SPDIFRX_BASE) +#define DFSDM1_Channel0 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel0_BASE) +#define DFSDM1_Channel1 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel1_BASE) +#define DFSDM1_Channel2 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel2_BASE) +#define DFSDM1_Channel3 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel3_BASE) +#define DFSDM1_Channel4 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel4_BASE) +#define DFSDM1_Channel5 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel5_BASE) +#define DFSDM1_Channel6 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel6_BASE) +#define DFSDM1_Channel7 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel7_BASE) +#define DFSDM1_Filter0 ((DFSDM_Filter_TypeDef *) DFSDM1_Filter0_BASE) +#define DFSDM1_Filter1 ((DFSDM_Filter_TypeDef *) DFSDM1_Filter1_BASE) +#define DFSDM1_Filter2 ((DFSDM_Filter_TypeDef *) DFSDM1_Filter2_BASE) +#define DFSDM1_Filter3 ((DFSDM_Filter_TypeDef *) DFSDM1_Filter3_BASE) +#define DMA2D ((DMA2D_TypeDef *) DMA2D_BASE) +#define DCMI ((DCMI_TypeDef *) DCMI_BASE) +#define PSSI ((PSSI_TypeDef *) PSSI_BASE) +#define RCC ((RCC_TypeDef *) RCC_BASE) +#define FLASH ((FLASH_TypeDef *) FLASH_R_BASE) +#define CRC ((CRC_TypeDef *) CRC_BASE) + +#define GPIOA ((GPIO_TypeDef *) GPIOA_BASE) +#define GPIOB ((GPIO_TypeDef *) GPIOB_BASE) +#define GPIOC ((GPIO_TypeDef *) GPIOC_BASE) +#define GPIOD ((GPIO_TypeDef *) GPIOD_BASE) +#define GPIOE ((GPIO_TypeDef *) GPIOE_BASE) +#define GPIOF ((GPIO_TypeDef *) GPIOF_BASE) +#define GPIOG ((GPIO_TypeDef *) GPIOG_BASE) +#define GPIOH ((GPIO_TypeDef *) GPIOH_BASE) +#define GPIOJ ((GPIO_TypeDef *) GPIOJ_BASE) +#define GPIOK ((GPIO_TypeDef *) GPIOK_BASE) + +#define ADC1 ((ADC_TypeDef *) ADC1_BASE) +#define ADC2 ((ADC_TypeDef *) ADC2_BASE) +#define ADC3 ((ADC_TypeDef *) ADC3_BASE) +#define ADC3_COMMON ((ADC_Common_TypeDef *) ADC3_COMMON_BASE) +#define ADC12_COMMON ((ADC_Common_TypeDef *) ADC12_COMMON_BASE) + +#define CRYP ((CRYP_TypeDef *) CRYP_BASE) +#define HASH ((HASH_TypeDef *) HASH_BASE) +#define HASH_DIGEST ((HASH_DIGEST_TypeDef *) HASH_DIGEST_BASE) +#define RNG ((RNG_TypeDef *) RNG_BASE) +#define SDMMC2 ((SDMMC_TypeDef *) SDMMC2_BASE) +#define DLYB_SDMMC2 ((DLYB_TypeDef *) DLYB_SDMMC2_BASE) +#define FMAC ((FMAC_TypeDef *) FMAC_BASE) +#define CORDIC ((CORDIC_TypeDef *) CORDIC_BASE) + +#define BDMA ((BDMA_TypeDef *) BDMA_BASE) +#define BDMA_Channel0 ((BDMA_Channel_TypeDef *) BDMA_Channel0_BASE) +#define BDMA_Channel1 ((BDMA_Channel_TypeDef *) BDMA_Channel1_BASE) +#define BDMA_Channel2 ((BDMA_Channel_TypeDef *) BDMA_Channel2_BASE) +#define BDMA_Channel3 ((BDMA_Channel_TypeDef *) BDMA_Channel3_BASE) +#define BDMA_Channel4 ((BDMA_Channel_TypeDef *) BDMA_Channel4_BASE) +#define BDMA_Channel5 ((BDMA_Channel_TypeDef *) BDMA_Channel5_BASE) +#define BDMA_Channel6 ((BDMA_Channel_TypeDef *) BDMA_Channel6_BASE) +#define BDMA_Channel7 ((BDMA_Channel_TypeDef *) BDMA_Channel7_BASE) + +#define RAMECC1 ((RAMECC_TypeDef *)RAMECC1_BASE) +#define RAMECC1_Monitor1 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor1_BASE) +#define RAMECC1_Monitor2 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor2_BASE) +#define RAMECC1_Monitor3 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor3_BASE) +#define RAMECC1_Monitor4 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor4_BASE) +#define RAMECC1_Monitor5 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor5_BASE) +#define RAMECC1_Monitor6 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor6_BASE) + +#define RAMECC2 ((RAMECC_TypeDef *)RAMECC2_BASE) +#define RAMECC2_Monitor1 ((RAMECC_MonitorTypeDef *)RAMECC2_Monitor1_BASE) +#define RAMECC2_Monitor2 ((RAMECC_MonitorTypeDef *)RAMECC2_Monitor2_BASE) +#define RAMECC2_Monitor3 ((RAMECC_MonitorTypeDef *)RAMECC2_Monitor3_BASE) + +#define RAMECC3 ((RAMECC_TypeDef *)RAMECC3_BASE) +#define RAMECC3_Monitor1 ((RAMECC_MonitorTypeDef *)RAMECC3_Monitor1_BASE) +#define RAMECC3_Monitor2 ((RAMECC_MonitorTypeDef *)RAMECC3_Monitor2_BASE) + +#define DMAMUX2 ((DMAMUX_Channel_TypeDef *) DMAMUX2_BASE) +#define DMAMUX2_Channel0 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel0_BASE) +#define DMAMUX2_Channel1 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel1_BASE) +#define DMAMUX2_Channel2 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel2_BASE) +#define DMAMUX2_Channel3 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel3_BASE) +#define DMAMUX2_Channel4 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel4_BASE) +#define DMAMUX2_Channel5 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel5_BASE) +#define DMAMUX2_Channel6 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel6_BASE) +#define DMAMUX2_Channel7 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel7_BASE) + + +#define DMAMUX2_RequestGenerator0 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator0_BASE) +#define DMAMUX2_RequestGenerator1 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator1_BASE) +#define DMAMUX2_RequestGenerator2 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator2_BASE) +#define DMAMUX2_RequestGenerator3 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator3_BASE) +#define DMAMUX2_RequestGenerator4 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator4_BASE) +#define DMAMUX2_RequestGenerator5 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator5_BASE) +#define DMAMUX2_RequestGenerator6 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator6_BASE) +#define DMAMUX2_RequestGenerator7 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator7_BASE) + +#define DMAMUX2_ChannelStatus ((DMAMUX_ChannelStatus_TypeDef *) DMAMUX2_ChannelStatus_BASE) +#define DMAMUX2_RequestGenStatus ((DMAMUX_RequestGenStatus_TypeDef *) DMAMUX2_RequestGenStatus_BASE) + +#define DMA2 ((DMA_TypeDef *) DMA2_BASE) +#define DMA2_Stream0 ((DMA_Stream_TypeDef *) DMA2_Stream0_BASE) +#define DMA2_Stream1 ((DMA_Stream_TypeDef *) DMA2_Stream1_BASE) +#define DMA2_Stream2 ((DMA_Stream_TypeDef *) DMA2_Stream2_BASE) +#define DMA2_Stream3 ((DMA_Stream_TypeDef *) DMA2_Stream3_BASE) +#define DMA2_Stream4 ((DMA_Stream_TypeDef *) DMA2_Stream4_BASE) +#define DMA2_Stream5 ((DMA_Stream_TypeDef *) DMA2_Stream5_BASE) +#define DMA2_Stream6 ((DMA_Stream_TypeDef *) DMA2_Stream6_BASE) +#define DMA2_Stream7 ((DMA_Stream_TypeDef *) DMA2_Stream7_BASE) + +#define DMA1 ((DMA_TypeDef *) DMA1_BASE) +#define DMA1_Stream0 ((DMA_Stream_TypeDef *) DMA1_Stream0_BASE) +#define DMA1_Stream1 ((DMA_Stream_TypeDef *) DMA1_Stream1_BASE) +#define DMA1_Stream2 ((DMA_Stream_TypeDef *) DMA1_Stream2_BASE) +#define DMA1_Stream3 ((DMA_Stream_TypeDef *) DMA1_Stream3_BASE) +#define DMA1_Stream4 ((DMA_Stream_TypeDef *) DMA1_Stream4_BASE) +#define DMA1_Stream5 ((DMA_Stream_TypeDef *) DMA1_Stream5_BASE) +#define DMA1_Stream6 ((DMA_Stream_TypeDef *) DMA1_Stream6_BASE) +#define DMA1_Stream7 ((DMA_Stream_TypeDef *) DMA1_Stream7_BASE) + + +#define DMAMUX1 ((DMAMUX_Channel_TypeDef *) DMAMUX1_BASE) +#define DMAMUX1_Channel0 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel0_BASE) +#define DMAMUX1_Channel1 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel1_BASE) +#define DMAMUX1_Channel2 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel2_BASE) +#define DMAMUX1_Channel3 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel3_BASE) +#define DMAMUX1_Channel4 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel4_BASE) +#define DMAMUX1_Channel5 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel5_BASE) +#define DMAMUX1_Channel6 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel6_BASE) +#define DMAMUX1_Channel7 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel7_BASE) +#define DMAMUX1_Channel8 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel8_BASE) +#define DMAMUX1_Channel9 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel9_BASE) +#define DMAMUX1_Channel10 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel10_BASE) +#define DMAMUX1_Channel11 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel11_BASE) +#define DMAMUX1_Channel12 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel12_BASE) +#define DMAMUX1_Channel13 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel13_BASE) +#define DMAMUX1_Channel14 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel14_BASE) +#define DMAMUX1_Channel15 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel15_BASE) + +#define DMAMUX1_RequestGenerator0 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator0_BASE) +#define DMAMUX1_RequestGenerator1 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator1_BASE) +#define DMAMUX1_RequestGenerator2 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator2_BASE) +#define DMAMUX1_RequestGenerator3 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator3_BASE) +#define DMAMUX1_RequestGenerator4 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator4_BASE) +#define DMAMUX1_RequestGenerator5 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator5_BASE) +#define DMAMUX1_RequestGenerator6 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator6_BASE) +#define DMAMUX1_RequestGenerator7 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator7_BASE) + +#define DMAMUX1_ChannelStatus ((DMAMUX_ChannelStatus_TypeDef *) DMAMUX1_ChannelStatus_BASE) +#define DMAMUX1_RequestGenStatus ((DMAMUX_RequestGenStatus_TypeDef *) DMAMUX1_RequestGenStatus_BASE) + + +#define FMC_Bank1_R ((FMC_Bank1_TypeDef *) FMC_Bank1_R_BASE) +#define FMC_Bank1E_R ((FMC_Bank1E_TypeDef *) FMC_Bank1E_R_BASE) +#define FMC_Bank2_R ((FMC_Bank2_TypeDef *) FMC_Bank2_R_BASE) +#define FMC_Bank3_R ((FMC_Bank3_TypeDef *) FMC_Bank3_R_BASE) +#define FMC_Bank5_6_R ((FMC_Bank5_6_TypeDef *) FMC_Bank5_6_R_BASE) + +#define OCTOSPI1 ((OCTOSPI_TypeDef *) OCTOSPI1_R_BASE) +#define DLYB_OCTOSPI1 ((DLYB_TypeDef *) DLYB_OCTOSPI1_BASE) +#define OCTOSPI2 ((OCTOSPI_TypeDef *) OCTOSPI2_R_BASE) +#define DLYB_OCTOSPI2 ((DLYB_TypeDef *) DLYB_OCTOSPI2_BASE) +#define OCTOSPIM ((OCTOSPIM_TypeDef *) OCTOSPIM_BASE) + +#define OTFDEC1 ((OTFDEC_TypeDef *) OTFDEC1_BASE) +#define OTFDEC1_REGION1 ((OTFDEC_Region_TypeDef *) OTFDEC1_REGION1_BASE) +#define OTFDEC1_REGION2 ((OTFDEC_Region_TypeDef *) OTFDEC1_REGION2_BASE) +#define OTFDEC1_REGION3 ((OTFDEC_Region_TypeDef *) OTFDEC1_REGION3_BASE) +#define OTFDEC1_REGION4 ((OTFDEC_Region_TypeDef *) OTFDEC1_REGION4_BASE) + +#define OTFDEC2 ((OTFDEC_TypeDef *) OTFDEC2_BASE) +#define OTFDEC2_REGION1 ((OTFDEC_Region_TypeDef *) OTFDEC2_REGION1_BASE) +#define OTFDEC2_REGION2 ((OTFDEC_Region_TypeDef *) OTFDEC2_REGION2_BASE) +#define OTFDEC2_REGION3 ((OTFDEC_Region_TypeDef *) OTFDEC2_REGION3_BASE) +#define OTFDEC2_REGION4 ((OTFDEC_Region_TypeDef *) OTFDEC2_REGION4_BASE) + +#define SDMMC1 ((SDMMC_TypeDef *) SDMMC1_BASE) +#define DLYB_SDMMC1 ((DLYB_TypeDef *) DLYB_SDMMC1_BASE) + +#define DBGMCU ((DBGMCU_TypeDef *) DBGMCU_BASE) + +#define HSEM ((HSEM_TypeDef *) HSEM_BASE) +#define HSEM_COMMON ((HSEM_Common_TypeDef *) (HSEM_BASE + 0x100UL)) + +#define LTDC ((LTDC_TypeDef *)LTDC_BASE) +#define LTDC_Layer1 ((LTDC_Layer_TypeDef *)LTDC_Layer1_BASE) +#define LTDC_Layer2 ((LTDC_Layer_TypeDef *)LTDC_Layer2_BASE) + +#define MDIOS ((MDIOS_TypeDef *) MDIOS_BASE) + +#define ETH ((ETH_TypeDef *)ETH_BASE) +#define MDMA ((MDMA_TypeDef *)MDMA_BASE) +#define MDMA_Channel0 ((MDMA_Channel_TypeDef *)MDMA_Channel0_BASE) +#define MDMA_Channel1 ((MDMA_Channel_TypeDef *)MDMA_Channel1_BASE) +#define MDMA_Channel2 ((MDMA_Channel_TypeDef *)MDMA_Channel2_BASE) +#define MDMA_Channel3 ((MDMA_Channel_TypeDef *)MDMA_Channel3_BASE) +#define MDMA_Channel4 ((MDMA_Channel_TypeDef *)MDMA_Channel4_BASE) +#define MDMA_Channel5 ((MDMA_Channel_TypeDef *)MDMA_Channel5_BASE) +#define MDMA_Channel6 ((MDMA_Channel_TypeDef *)MDMA_Channel6_BASE) +#define MDMA_Channel7 ((MDMA_Channel_TypeDef *)MDMA_Channel7_BASE) +#define MDMA_Channel8 ((MDMA_Channel_TypeDef *)MDMA_Channel8_BASE) +#define MDMA_Channel9 ((MDMA_Channel_TypeDef *)MDMA_Channel9_BASE) +#define MDMA_Channel10 ((MDMA_Channel_TypeDef *)MDMA_Channel10_BASE) +#define MDMA_Channel11 ((MDMA_Channel_TypeDef *)MDMA_Channel11_BASE) +#define MDMA_Channel12 ((MDMA_Channel_TypeDef *)MDMA_Channel12_BASE) +#define MDMA_Channel13 ((MDMA_Channel_TypeDef *)MDMA_Channel13_BASE) +#define MDMA_Channel14 ((MDMA_Channel_TypeDef *)MDMA_Channel14_BASE) +#define MDMA_Channel15 ((MDMA_Channel_TypeDef *)MDMA_Channel15_BASE) + + +#define USB1_OTG_HS ((USB_OTG_GlobalTypeDef *) USB1_OTG_HS_PERIPH_BASE) + +/* Legacy defines */ +#define USB_OTG_HS USB1_OTG_HS +#define USB_OTG_HS_PERIPH_BASE USB1_OTG_HS_PERIPH_BASE + +/** + * @} + */ + +/** @addtogroup Exported_constants + * @{ + */ + + /** @addtogroup Peripheral_Registers_Bits_Definition + * @{ + */ + +/******************************************************************************/ +/* Peripheral Registers_Bits_Definition */ +/******************************************************************************/ + +/******************************************************************************/ +/* */ +/* Analog to Digital Converter */ +/* */ +/******************************************************************************/ +/******************************* ADC VERSION ********************************/ +#define ADC_VER_V5_V90 +/******************** Bit definition for ADC_ISR register ********************/ +#define ADC_ISR_ADRDY_Pos (0U) +#define ADC_ISR_ADRDY_Msk (0x1UL << ADC_ISR_ADRDY_Pos) /*!< 0x00000001 */ +#define ADC_ISR_ADRDY ADC_ISR_ADRDY_Msk /*!< ADC Ready (ADRDY) flag */ +#define ADC_ISR_EOSMP_Pos (1U) +#define ADC_ISR_EOSMP_Msk (0x1UL << ADC_ISR_EOSMP_Pos) /*!< 0x00000002 */ +#define ADC_ISR_EOSMP ADC_ISR_EOSMP_Msk /*!< ADC End of Sampling flag */ +#define ADC_ISR_EOC_Pos (2U) +#define ADC_ISR_EOC_Msk (0x1UL << ADC_ISR_EOC_Pos) /*!< 0x00000004 */ +#define ADC_ISR_EOC ADC_ISR_EOC_Msk /*!< ADC End of Regular Conversion flag */ +#define ADC_ISR_EOS_Pos (3U) +#define ADC_ISR_EOS_Msk (0x1UL << ADC_ISR_EOS_Pos) /*!< 0x00000008 */ +#define ADC_ISR_EOS ADC_ISR_EOS_Msk /*!< ADC End of Regular sequence of Conversions flag */ +#define ADC_ISR_OVR_Pos (4U) +#define ADC_ISR_OVR_Msk (0x1UL << ADC_ISR_OVR_Pos) /*!< 0x00000010 */ +#define ADC_ISR_OVR ADC_ISR_OVR_Msk /*!< ADC overrun flag */ +#define ADC_ISR_JEOC_Pos (5U) +#define ADC_ISR_JEOC_Msk (0x1UL << ADC_ISR_JEOC_Pos) /*!< 0x00000020 */ +#define ADC_ISR_JEOC ADC_ISR_JEOC_Msk /*!< ADC End of Injected Conversion flag */ +#define ADC_ISR_JEOS_Pos (6U) +#define ADC_ISR_JEOS_Msk (0x1UL << ADC_ISR_JEOS_Pos) /*!< 0x00000040 */ +#define ADC_ISR_JEOS ADC_ISR_JEOS_Msk /*!< ADC End of Injected sequence of Conversions flag */ +#define ADC_ISR_AWD1_Pos (7U) +#define ADC_ISR_AWD1_Msk (0x1UL << ADC_ISR_AWD1_Pos) /*!< 0x00000080 */ +#define ADC_ISR_AWD1 ADC_ISR_AWD1_Msk /*!< ADC Analog watchdog 1 flag */ +#define ADC_ISR_AWD2_Pos (8U) +#define ADC_ISR_AWD2_Msk (0x1UL << ADC_ISR_AWD2_Pos) /*!< 0x00000100 */ +#define ADC_ISR_AWD2 ADC_ISR_AWD2_Msk /*!< ADC Analog watchdog 2 flag */ +#define ADC_ISR_AWD3_Pos (9U) +#define ADC_ISR_AWD3_Msk (0x1UL << ADC_ISR_AWD3_Pos) /*!< 0x00000200 */ +#define ADC_ISR_AWD3 ADC_ISR_AWD3_Msk /*!< ADC Analog watchdog 3 flag */ +#define ADC_ISR_JQOVF_Pos (10U) +#define ADC_ISR_JQOVF_Msk (0x1UL << ADC_ISR_JQOVF_Pos) /*!< 0x00000400 */ +#define ADC_ISR_JQOVF ADC_ISR_JQOVF_Msk /*!< ADC Injected Context Queue Overflow flag */ + +/******************** Bit definition for ADC_IER register ********************/ +#define ADC_IER_ADRDYIE_Pos (0U) +#define ADC_IER_ADRDYIE_Msk (0x1UL << ADC_IER_ADRDYIE_Pos) /*!< 0x00000001 */ +#define ADC_IER_ADRDYIE ADC_IER_ADRDYIE_Msk /*!< ADC Ready (ADRDY) interrupt source */ +#define ADC_IER_EOSMPIE_Pos (1U) +#define ADC_IER_EOSMPIE_Msk (0x1UL << ADC_IER_EOSMPIE_Pos) /*!< 0x00000002 */ +#define ADC_IER_EOSMPIE ADC_IER_EOSMPIE_Msk /*!< ADC End of Sampling interrupt source */ +#define ADC_IER_EOCIE_Pos (2U) +#define ADC_IER_EOCIE_Msk (0x1UL << ADC_IER_EOCIE_Pos) /*!< 0x00000004 */ +#define ADC_IER_EOCIE ADC_IER_EOCIE_Msk /*!< ADC End of Regular Conversion interrupt source */ +#define ADC_IER_EOSIE_Pos (3U) +#define ADC_IER_EOSIE_Msk (0x1UL << ADC_IER_EOSIE_Pos) /*!< 0x00000008 */ +#define ADC_IER_EOSIE ADC_IER_EOSIE_Msk /*!< ADC End of Regular sequence of Conversions interrupt source */ +#define ADC_IER_OVRIE_Pos (4U) +#define ADC_IER_OVRIE_Msk (0x1UL << ADC_IER_OVRIE_Pos) /*!< 0x00000010 */ +#define ADC_IER_OVRIE ADC_IER_OVRIE_Msk /*!< ADC overrun interrupt source */ +#define ADC_IER_JEOCIE_Pos (5U) +#define ADC_IER_JEOCIE_Msk (0x1UL << ADC_IER_JEOCIE_Pos) /*!< 0x00000020 */ +#define ADC_IER_JEOCIE ADC_IER_JEOCIE_Msk /*!< ADC End of Injected Conversion interrupt source */ +#define ADC_IER_JEOSIE_Pos (6U) +#define ADC_IER_JEOSIE_Msk (0x1UL << ADC_IER_JEOSIE_Pos) /*!< 0x00000040 */ +#define ADC_IER_JEOSIE ADC_IER_JEOSIE_Msk /*!< ADC End of Injected sequence of Conversions interrupt source */ +#define ADC_IER_AWD1IE_Pos (7U) +#define ADC_IER_AWD1IE_Msk (0x1UL << ADC_IER_AWD1IE_Pos) /*!< 0x00000080 */ +#define ADC_IER_AWD1IE ADC_IER_AWD1IE_Msk /*!< ADC Analog watchdog 1 interrupt source */ +#define ADC_IER_AWD2IE_Pos (8U) +#define ADC_IER_AWD2IE_Msk (0x1UL << ADC_IER_AWD2IE_Pos) /*!< 0x00000100 */ +#define ADC_IER_AWD2IE ADC_IER_AWD2IE_Msk /*!< ADC Analog watchdog 2 interrupt source */ +#define ADC_IER_AWD3IE_Pos (9U) +#define ADC_IER_AWD3IE_Msk (0x1UL << ADC_IER_AWD3IE_Pos) /*!< 0x00000200 */ +#define ADC_IER_AWD3IE ADC_IER_AWD3IE_Msk /*!< ADC Analog watchdog 3 interrupt source */ +#define ADC_IER_JQOVFIE_Pos (10U) +#define ADC_IER_JQOVFIE_Msk (0x1UL << ADC_IER_JQOVFIE_Pos) /*!< 0x00000400 */ +#define ADC_IER_JQOVFIE ADC_IER_JQOVFIE_Msk /*!< ADC Injected Context Queue Overflow interrupt source */ + +/******************** Bit definition for ADC_CR register ********************/ +#define ADC_CR_ADEN_Pos (0U) +#define ADC_CR_ADEN_Msk (0x1UL << ADC_CR_ADEN_Pos) /*!< 0x00000001 */ +#define ADC_CR_ADEN ADC_CR_ADEN_Msk /*!< ADC Enable control */ +#define ADC_CR_ADDIS_Pos (1U) +#define ADC_CR_ADDIS_Msk (0x1UL << ADC_CR_ADDIS_Pos) /*!< 0x00000002 */ +#define ADC_CR_ADDIS ADC_CR_ADDIS_Msk /*!< ADC Disable command */ +#define ADC_CR_ADSTART_Pos (2U) +#define ADC_CR_ADSTART_Msk (0x1UL << ADC_CR_ADSTART_Pos) /*!< 0x00000004 */ +#define ADC_CR_ADSTART ADC_CR_ADSTART_Msk /*!< ADC Start of Regular conversion */ +#define ADC_CR_JADSTART_Pos (3U) +#define ADC_CR_JADSTART_Msk (0x1UL << ADC_CR_JADSTART_Pos) /*!< 0x00000008 */ +#define ADC_CR_JADSTART ADC_CR_JADSTART_Msk /*!< ADC Start of injected conversion */ +#define ADC_CR_ADSTP_Pos (4U) +#define ADC_CR_ADSTP_Msk (0x1UL << ADC_CR_ADSTP_Pos) /*!< 0x00000010 */ +#define ADC_CR_ADSTP ADC_CR_ADSTP_Msk /*!< ADC Stop of Regular conversion */ +#define ADC_CR_JADSTP_Pos (5U) +#define ADC_CR_JADSTP_Msk (0x1UL << ADC_CR_JADSTP_Pos) /*!< 0x00000020 */ +#define ADC_CR_JADSTP ADC_CR_JADSTP_Msk /*!< ADC Stop of injected conversion */ +#define ADC_CR_BOOST_Pos (8U) +#define ADC_CR_BOOST_Msk (0x3UL << ADC_CR_BOOST_Pos) /*!< 0x00000300 */ +#define ADC_CR_BOOST ADC_CR_BOOST_Msk /*!< ADC Boost Mode configuration */ +#define ADC_CR_BOOST_0 (0x1UL << ADC_CR_BOOST_Pos) /*!< 0x00000100 */ +#define ADC_CR_BOOST_1 (0x2UL << ADC_CR_BOOST_Pos) /*!< 0x00000200 */ +#define ADC_CR_ADCALLIN_Pos (16U) +#define ADC_CR_ADCALLIN_Msk (0x1UL << ADC_CR_ADCALLIN_Pos) /*!< 0x00010000 */ +#define ADC_CR_ADCALLIN ADC_CR_ADCALLIN_Msk /*!< ADC Linearity calibration */ +#define ADC_CR_LINCALRDYW1_Pos (22U) +#define ADC_CR_LINCALRDYW1_Msk (0x1UL << ADC_CR_LINCALRDYW1_Pos) /*!< 0x00400000 */ +#define ADC_CR_LINCALRDYW1 ADC_CR_LINCALRDYW1_Msk /*!< ADC Linearity calibration ready Word 1 */ +#define ADC_CR_LINCALRDYW2_Pos (23U) +#define ADC_CR_LINCALRDYW2_Msk (0x1UL << ADC_CR_LINCALRDYW2_Pos) /*!< 0x00800000 */ +#define ADC_CR_LINCALRDYW2 ADC_CR_LINCALRDYW2_Msk /*!< ADC Linearity calibration ready Word 2 */ +#define ADC_CR_LINCALRDYW3_Pos (24U) +#define ADC_CR_LINCALRDYW3_Msk (0x1UL << ADC_CR_LINCALRDYW3_Pos) /*!< 0x01000000 */ +#define ADC_CR_LINCALRDYW3 ADC_CR_LINCALRDYW3_Msk /*!< ADC Linearity calibration ready Word 3 */ +#define ADC_CR_LINCALRDYW4_Pos (25U) +#define ADC_CR_LINCALRDYW4_Msk (0x1UL << ADC_CR_LINCALRDYW4_Pos) /*!< 0x02000000 */ +#define ADC_CR_LINCALRDYW4 ADC_CR_LINCALRDYW4_Msk /*!< ADC Linearity calibration ready Word 4 */ +#define ADC_CR_LINCALRDYW5_Pos (26U) +#define ADC_CR_LINCALRDYW5_Msk (0x1UL << ADC_CR_LINCALRDYW5_Pos) /*!< 0x04000000 */ +#define ADC_CR_LINCALRDYW5 ADC_CR_LINCALRDYW5_Msk /*!< ADC Linearity calibration ready Word 5 */ +#define ADC_CR_LINCALRDYW6_Pos (27U) +#define ADC_CR_LINCALRDYW6_Msk (0x1UL << ADC_CR_LINCALRDYW6_Pos) /*!< 0x08000000 */ +#define ADC_CR_LINCALRDYW6 ADC_CR_LINCALRDYW6_Msk /*!< ADC Linearity calibration ready Word 6 */ +#define ADC_CR_ADVREGEN_Pos (28U) +#define ADC_CR_ADVREGEN_Msk (0x1UL << ADC_CR_ADVREGEN_Pos) /*!< 0x10000000 */ +#define ADC_CR_ADVREGEN ADC_CR_ADVREGEN_Msk /*!< ADC Voltage regulator Enable */ +#define ADC_CR_DEEPPWD_Pos (29U) +#define ADC_CR_DEEPPWD_Msk (0x1UL << ADC_CR_DEEPPWD_Pos) /*!< 0x20000000 */ +#define ADC_CR_DEEPPWD ADC_CR_DEEPPWD_Msk /*!< ADC Deep power down Enable */ +#define ADC_CR_ADCALDIF_Pos (30U) +#define ADC_CR_ADCALDIF_Msk (0x1UL << ADC_CR_ADCALDIF_Pos) /*!< 0x40000000 */ +#define ADC_CR_ADCALDIF ADC_CR_ADCALDIF_Msk /*!< ADC Differential Mode for calibration */ +#define ADC_CR_ADCAL_Pos (31U) +#define ADC_CR_ADCAL_Msk (0x1UL << ADC_CR_ADCAL_Pos) /*!< 0x80000000 */ +#define ADC_CR_ADCAL ADC_CR_ADCAL_Msk /*!< ADC Calibration */ + +/******************** Bit definition for ADC_CFGR register ********************/ +#define ADC_CFGR_DMNGT_Pos (0U) +#define ADC_CFGR_DMNGT_Msk (0x3UL << ADC_CFGR_DMNGT_Pos) /*!< 0x00000003 */ +#define ADC_CFGR_DMNGT ADC_CFGR_DMNGT_Msk /*!< ADC Data Management configuration */ +#define ADC_CFGR_DMNGT_0 (0x1UL << ADC_CFGR_DMNGT_Pos) /*!< 0x00000001 */ +#define ADC_CFGR_DMNGT_1 (0x2UL << ADC_CFGR_DMNGT_Pos) /*!< 0x00000002 */ + +#define ADC_CFGR_RES_Pos (2U) +#define ADC_CFGR_RES_Msk (0x7UL << ADC_CFGR_RES_Pos) /*!< 0x0000001C */ +#define ADC_CFGR_RES ADC_CFGR_RES_Msk /*!< ADC Data resolution */ +#define ADC_CFGR_RES_0 (0x1UL << ADC_CFGR_RES_Pos) /*!< 0x00000004 */ +#define ADC_CFGR_RES_1 (0x2UL << ADC_CFGR_RES_Pos) /*!< 0x00000008 */ +#define ADC_CFGR_RES_2 (0x4UL << ADC_CFGR_RES_Pos) /*!< 0x00000010 */ + +#define ADC_CFGR_EXTSEL_Pos (5U) +#define ADC_CFGR_EXTSEL_Msk (0x1FUL << ADC_CFGR_EXTSEL_Pos) /*!< 0x000003E0 */ +#define ADC_CFGR_EXTSEL ADC_CFGR_EXTSEL_Msk /*!< ADC External trigger selection for regular group */ +#define ADC_CFGR_EXTSEL_0 (0x01UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000020 */ +#define ADC_CFGR_EXTSEL_1 (0x02UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000040 */ +#define ADC_CFGR_EXTSEL_2 (0x04UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000080 */ +#define ADC_CFGR_EXTSEL_3 (0x08UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000100 */ +#define ADC_CFGR_EXTSEL_4 (0x10UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000200 */ + +#define ADC_CFGR_EXTEN_Pos (10U) +#define ADC_CFGR_EXTEN_Msk (0x3UL << ADC_CFGR_EXTEN_Pos) /*!< 0x00000C00 */ +#define ADC_CFGR_EXTEN ADC_CFGR_EXTEN_Msk /*!< ADC External trigger enable and polarity selection for regular channels */ +#define ADC_CFGR_EXTEN_0 (0x1UL << ADC_CFGR_EXTEN_Pos) /*!< 0x00000400 */ +#define ADC_CFGR_EXTEN_1 (0x2UL << ADC_CFGR_EXTEN_Pos) /*!< 0x00000800 */ + +#define ADC_CFGR_OVRMOD_Pos (12U) +#define ADC_CFGR_OVRMOD_Msk (0x1UL << ADC_CFGR_OVRMOD_Pos) /*!< 0x00001000 */ +#define ADC_CFGR_OVRMOD ADC_CFGR_OVRMOD_Msk /*!< ADC overrun mode */ +#define ADC_CFGR_CONT_Pos (13U) +#define ADC_CFGR_CONT_Msk (0x1UL << ADC_CFGR_CONT_Pos) /*!< 0x00002000 */ +#define ADC_CFGR_CONT ADC_CFGR_CONT_Msk /*!< ADC Single/continuous conversion mode for regular conversion */ +#define ADC_CFGR_AUTDLY_Pos (14U) +#define ADC_CFGR_AUTDLY_Msk (0x1UL << ADC_CFGR_AUTDLY_Pos) /*!< 0x00004000 */ +#define ADC_CFGR_AUTDLY ADC_CFGR_AUTDLY_Msk /*!< ADC Delayed conversion mode */ + +#define ADC_CFGR_DISCEN_Pos (16U) +#define ADC_CFGR_DISCEN_Msk (0x1UL << ADC_CFGR_DISCEN_Pos) /*!< 0x00010000 */ +#define ADC_CFGR_DISCEN ADC_CFGR_DISCEN_Msk /*!< ADC Discontinuous mode for regular channels */ + +#define ADC_CFGR_DISCNUM_Pos (17U) +#define ADC_CFGR_DISCNUM_Msk (0x7UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x000E0000 */ +#define ADC_CFGR_DISCNUM ADC_CFGR_DISCNUM_Msk /*!< ADC Discontinuous mode channel count */ +#define ADC_CFGR_DISCNUM_0 (0x1UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x00020000 */ +#define ADC_CFGR_DISCNUM_1 (0x2UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x00040000 */ +#define ADC_CFGR_DISCNUM_2 (0x4UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x00080000 */ + +#define ADC_CFGR_JDISCEN_Pos (20U) +#define ADC_CFGR_JDISCEN_Msk (0x1UL << ADC_CFGR_JDISCEN_Pos) /*!< 0x00100000 */ +#define ADC_CFGR_JDISCEN ADC_CFGR_JDISCEN_Msk /*!< ADC Discontinuous mode on injected channels */ +#define ADC_CFGR_JQM_Pos (21U) +#define ADC_CFGR_JQM_Msk (0x1UL << ADC_CFGR_JQM_Pos) /*!< 0x00200000 */ +#define ADC_CFGR_JQM ADC_CFGR_JQM_Msk /*!< ADC JSQR Queue mode */ +#define ADC_CFGR_AWD1SGL_Pos (22U) +#define ADC_CFGR_AWD1SGL_Msk (0x1UL << ADC_CFGR_AWD1SGL_Pos) /*!< 0x00400000 */ +#define ADC_CFGR_AWD1SGL ADC_CFGR_AWD1SGL_Msk /*!< Enable the watchdog 1 on a single channel or on all channels */ +#define ADC_CFGR_AWD1EN_Pos (23U) +#define ADC_CFGR_AWD1EN_Msk (0x1UL << ADC_CFGR_AWD1EN_Pos) /*!< 0x00800000 */ +#define ADC_CFGR_AWD1EN ADC_CFGR_AWD1EN_Msk /*!< ADC Analog watchdog 1 enable on regular Channels */ +#define ADC_CFGR_JAWD1EN_Pos (24U) +#define ADC_CFGR_JAWD1EN_Msk (0x1UL << ADC_CFGR_JAWD1EN_Pos) /*!< 0x01000000 */ +#define ADC_CFGR_JAWD1EN ADC_CFGR_JAWD1EN_Msk /*!< ADC Analog watchdog 1 enable on injected Channels */ +#define ADC_CFGR_JAUTO_Pos (25U) +#define ADC_CFGR_JAUTO_Msk (0x1UL << ADC_CFGR_JAUTO_Pos) /*!< 0x02000000 */ +#define ADC_CFGR_JAUTO ADC_CFGR_JAUTO_Msk /*!< ADC Automatic injected group conversion */ + +#define ADC_CFGR_AWD1CH_Pos (26U) +#define ADC_CFGR_AWD1CH_Msk (0x1FUL << ADC_CFGR_AWD1CH_Pos) /*!< 0x7C000000 */ +#define ADC_CFGR_AWD1CH ADC_CFGR_AWD1CH_Msk /*!< ADC Analog watchdog 1 Channel selection */ +#define ADC_CFGR_AWD1CH_0 (0x01UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x04000000 */ +#define ADC_CFGR_AWD1CH_1 (0x02UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x08000000 */ +#define ADC_CFGR_AWD1CH_2 (0x04UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x10000000 */ +#define ADC_CFGR_AWD1CH_3 (0x08UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x20000000 */ +#define ADC_CFGR_AWD1CH_4 (0x10UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x40000000 */ + +#define ADC_CFGR_JQDIS_Pos (31U) +#define ADC_CFGR_JQDIS_Msk (0x1UL << ADC_CFGR_JQDIS_Pos) /*!< 0x80000000 */ +#define ADC_CFGR_JQDIS ADC_CFGR_JQDIS_Msk /*!< ADC Injected queue disable */ + +#define ADC3_CFGR_DMAEN_Pos (0U) +#define ADC3_CFGR_DMAEN_Msk (0x1UL << ADC3_CFGR_DMAEN_Pos) /*!< 0x00000001 */ +#define ADC3_CFGR_DMAEN ADC3_CFGR_DMAEN_Msk /*!< ADC DMA transfer enable */ +#define ADC3_CFGR_DMACFG_Pos (1U) +#define ADC3_CFGR_DMACFG_Msk (0x1UL << ADC3_CFGR_DMACFG_Pos) /*!< 0x00000002 */ +#define ADC3_CFGR_DMACFG ADC3_CFGR_DMACFG_Msk /*!< ADC DMA transfer configuration */ + +#define ADC3_CFGR_RES_Pos (3U) +#define ADC3_CFGR_RES_Msk (0x3UL << ADC3_CFGR_RES_Pos) /*!< 0x00000018 */ +#define ADC3_CFGR_RES ADC3_CFGR_RES_Msk /*!< ADC data resolution */ +#define ADC3_CFGR_RES_0 (0x1UL << ADC3_CFGR_RES_Pos) /*!< 0x00000008 */ +#define ADC3_CFGR_RES_1 (0x2UL << ADC3_CFGR_RES_Pos) /*!< 0x00000010 */ + +#define ADC3_CFGR_ALIGN_Pos (15U) +#define ADC3_CFGR_ALIGN_Msk (0x1UL << ADC3_CFGR_ALIGN_Pos) /*!< 0x00008000 */ +#define ADC3_CFGR_ALIGN ADC3_CFGR_ALIGN_Msk /*!< ADC data alignement */ +/******************** Bit definition for ADC_CFGR2 register ********************/ +#define ADC_CFGR2_ROVSE_Pos (0U) +#define ADC_CFGR2_ROVSE_Msk (0x1UL << ADC_CFGR2_ROVSE_Pos) /*!< 0x00000001 */ +#define ADC_CFGR2_ROVSE ADC_CFGR2_ROVSE_Msk /*!< ADC Regular group oversampler enable */ +#define ADC_CFGR2_JOVSE_Pos (1U) +#define ADC_CFGR2_JOVSE_Msk (0x1UL << ADC_CFGR2_JOVSE_Pos) /*!< 0x00000002 */ +#define ADC_CFGR2_JOVSE ADC_CFGR2_JOVSE_Msk /*!< ADC Injected group oversampler enable */ + +#define ADC_CFGR2_OVSS_Pos (5U) +#define ADC_CFGR2_OVSS_Msk (0xFUL << ADC_CFGR2_OVSS_Pos) /*!< 0x000001E0 */ +#define ADC_CFGR2_OVSS ADC_CFGR2_OVSS_Msk /*!< ADC Regular Oversampling shift */ +#define ADC_CFGR2_OVSS_0 (0x1UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000020 */ +#define ADC_CFGR2_OVSS_1 (0x2UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000040 */ +#define ADC_CFGR2_OVSS_2 (0x4UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000080 */ +#define ADC_CFGR2_OVSS_3 (0x8UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000100 */ + +#define ADC_CFGR2_TROVS_Pos (9U) +#define ADC_CFGR2_TROVS_Msk (0x1UL << ADC_CFGR2_TROVS_Pos) /*!< 0x00000200 */ +#define ADC_CFGR2_TROVS ADC_CFGR2_TROVS_Msk /*!< ADC Triggered regular Oversampling */ +#define ADC_CFGR2_ROVSM_Pos (10U) +#define ADC_CFGR2_ROVSM_Msk (0x1UL << ADC_CFGR2_ROVSM_Pos) /*!< 0x00000400 */ +#define ADC_CFGR2_ROVSM ADC_CFGR2_ROVSM_Msk /*!< ADC Regular oversampling mode */ + +#define ADC_CFGR2_RSHIFT1_Pos (11U) +#define ADC_CFGR2_RSHIFT1_Msk (0x1UL << ADC_CFGR2_RSHIFT1_Pos) /*!< 0x00000800 */ +#define ADC_CFGR2_RSHIFT1 ADC_CFGR2_RSHIFT1_Msk /*!< ADC Right-shift data after Offset 1 correction */ +#define ADC_CFGR2_RSHIFT2_Pos (12U) +#define ADC_CFGR2_RSHIFT2_Msk (0x1UL << ADC_CFGR2_RSHIFT2_Pos) /*!< 0x00001000 */ +#define ADC_CFGR2_RSHIFT2 ADC_CFGR2_RSHIFT2_Msk /*!< ADC Right-shift data after Offset 2 correction */ +#define ADC_CFGR2_RSHIFT3_Pos (13U) +#define ADC_CFGR2_RSHIFT3_Msk (0x1UL << ADC_CFGR2_RSHIFT3_Pos) /*!< 0x00002000 */ +#define ADC_CFGR2_RSHIFT3 ADC_CFGR2_RSHIFT3_Msk /*!< ADC Right-shift data after Offset 3 correction */ +#define ADC_CFGR2_RSHIFT4_Pos (14U) +#define ADC_CFGR2_RSHIFT4_Msk (0x1UL << ADC_CFGR2_RSHIFT4_Pos) /*!< 0x00004000 */ +#define ADC_CFGR2_RSHIFT4 ADC_CFGR2_RSHIFT4_Msk /*!< ADC Right-shift data after Offset 4 correction */ + +#define ADC_CFGR2_OVSR_Pos (16U) +#define ADC_CFGR2_OVSR_Msk (0x3FFUL << ADC_CFGR2_OVSR_Pos) /*!< 0x03FF0000 */ +#define ADC_CFGR2_OVSR ADC_CFGR2_OVSR_Msk /*!< ADC oversampling Ratio */ +#define ADC_CFGR2_OVSR_0 (0x001UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00010000 */ +#define ADC_CFGR2_OVSR_1 (0x002UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00020000 */ +#define ADC_CFGR2_OVSR_2 (0x004UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00040000 */ +#define ADC_CFGR2_OVSR_3 (0x008UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00080000 */ +#define ADC_CFGR2_OVSR_4 (0x010UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00100000 */ +#define ADC_CFGR2_OVSR_5 (0x020UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00200000 */ +#define ADC_CFGR2_OVSR_6 (0x040UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00400000 */ +#define ADC_CFGR2_OVSR_7 (0x080UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00800000 */ +#define ADC_CFGR2_OVSR_8 (0x100UL << ADC_CFGR2_OVSR_Pos) /*!< 0x01000000 */ +#define ADC_CFGR2_OVSR_9 (0x200UL << ADC_CFGR2_OVSR_Pos) /*!< 0x02000000 */ + +#define ADC_CFGR2_LSHIFT_Pos (28U) +#define ADC_CFGR2_LSHIFT_Msk (0xFUL << ADC_CFGR2_LSHIFT_Pos) /*!< 0xF0000000 */ +#define ADC_CFGR2_LSHIFT ADC_CFGR2_LSHIFT_Msk /*!< ADC Left shift factor */ +#define ADC_CFGR2_LSHIFT_0 (0x1UL << ADC_CFGR2_LSHIFT_Pos) /*!< 0x10000000 */ +#define ADC_CFGR2_LSHIFT_1 (0x2UL << ADC_CFGR2_LSHIFT_Pos) /*!< 0x20000000 */ +#define ADC_CFGR2_LSHIFT_2 (0x4UL << ADC_CFGR2_LSHIFT_Pos) /*!< 0x40000000 */ +#define ADC_CFGR2_LSHIFT_3 (0x8UL << ADC_CFGR2_LSHIFT_Pos) /*!< 0x80000000 */ + +#define ADC3_CFGR2_OVSR_Pos (2U) +#define ADC3_CFGR2_OVSR_Msk (0x7UL << ADC3_CFGR2_OVSR_Pos) /*!< 0x0000001C */ +#define ADC3_CFGR2_OVSR ADC3_CFGR2_OVSR_Msk /*!< ADC oversampling ratio */ +#define ADC3_CFGR2_OVSR_0 (0x1UL << ADC3_CFGR2_OVSR_Pos) /*!< 0x00000004 */ +#define ADC3_CFGR2_OVSR_1 (0x2UL << ADC3_CFGR2_OVSR_Pos) /*!< 0x00000008 */ +#define ADC3_CFGR2_OVSR_2 (0x4UL << ADC3_CFGR2_OVSR_Pos) /*!< 0x00000010 */ + +#define ADC3_CFGR2_SWTRIG_Pos (25U) +#define ADC3_CFGR2_SWTRIG_Msk (0x1UL << ADC3_CFGR2_SWTRIG_Pos) /*!< 0x02000000 */ +#define ADC3_CFGR2_SWTRIG ADC3_CFGR2_SWTRIG_Msk /*!< ADC Software Trigger Bit for Sample time control trigger mode */ +#define ADC3_CFGR2_BULB_Pos (26U) +#define ADC3_CFGR2_BULB_Msk (0x1UL << ADC3_CFGR2_BULB_Pos) /*!< 0x04000000 */ +#define ADC3_CFGR2_BULB ADC3_CFGR2_BULB_Msk /*!< ADC Bulb sampling mode */ +#define ADC3_CFGR2_SMPTRIG_Pos (27U) +#define ADC3_CFGR2_SMPTRIG_Msk (0x1UL << ADC3_CFGR2_SMPTRIG_Pos) /*!< 0x08000000 */ +#define ADC3_CFGR2_SMPTRIG ADC3_CFGR2_SMPTRIG_Msk /*!< ADC Sample Time Control Trigger mode */ +/******************** Bit definition for ADC_SMPR1 register ********************/ +#define ADC_SMPR1_SMP0_Pos (0U) +#define ADC_SMPR1_SMP0_Msk (0x7UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000007 */ +#define ADC_SMPR1_SMP0 ADC_SMPR1_SMP0_Msk /*!< ADC Channel 0 Sampling time selection */ +#define ADC_SMPR1_SMP0_0 (0x1UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000001 */ +#define ADC_SMPR1_SMP0_1 (0x2UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000002 */ +#define ADC_SMPR1_SMP0_2 (0x4UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000004 */ + +#define ADC_SMPR1_SMP1_Pos (3U) +#define ADC_SMPR1_SMP1_Msk (0x7UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000038 */ +#define ADC_SMPR1_SMP1 ADC_SMPR1_SMP1_Msk /*!< ADC Channel 1 Sampling time selection */ +#define ADC_SMPR1_SMP1_0 (0x1UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000008 */ +#define ADC_SMPR1_SMP1_1 (0x2UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000010 */ +#define ADC_SMPR1_SMP1_2 (0x4UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000020 */ + +#define ADC_SMPR1_SMP2_Pos (6U) +#define ADC_SMPR1_SMP2_Msk (0x7UL << ADC_SMPR1_SMP2_Pos) /*!< 0x000001C0 */ +#define ADC_SMPR1_SMP2 ADC_SMPR1_SMP2_Msk /*!< ADC Channel 2 Sampling time selection */ +#define ADC_SMPR1_SMP2_0 (0x1UL << ADC_SMPR1_SMP2_Pos) /*!< 0x00000040 */ +#define ADC_SMPR1_SMP2_1 (0x2UL << ADC_SMPR1_SMP2_Pos) /*!< 0x00000080 */ +#define ADC_SMPR1_SMP2_2 (0x4UL << ADC_SMPR1_SMP2_Pos) /*!< 0x00000100 */ + +#define ADC_SMPR1_SMP3_Pos (9U) +#define ADC_SMPR1_SMP3_Msk (0x7UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000E00 */ +#define ADC_SMPR1_SMP3 ADC_SMPR1_SMP3_Msk /*!< ADC Channel 3 Sampling time selection */ +#define ADC_SMPR1_SMP3_0 (0x1UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000200 */ +#define ADC_SMPR1_SMP3_1 (0x2UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000400 */ +#define ADC_SMPR1_SMP3_2 (0x4UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000800 */ + +#define ADC_SMPR1_SMP4_Pos (12U) +#define ADC_SMPR1_SMP4_Msk (0x7UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00007000 */ +#define ADC_SMPR1_SMP4 ADC_SMPR1_SMP4_Msk /*!< ADC Channel 4 Sampling time selection */ +#define ADC_SMPR1_SMP4_0 (0x1UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00001000 */ +#define ADC_SMPR1_SMP4_1 (0x2UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00002000 */ +#define ADC_SMPR1_SMP4_2 (0x4UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00004000 */ + +#define ADC_SMPR1_SMP5_Pos (15U) +#define ADC_SMPR1_SMP5_Msk (0x7UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00038000 */ +#define ADC_SMPR1_SMP5 ADC_SMPR1_SMP5_Msk /*!< ADC Channel 5 Sampling time selection */ +#define ADC_SMPR1_SMP5_0 (0x1UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00008000 */ +#define ADC_SMPR1_SMP5_1 (0x2UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00010000 */ +#define ADC_SMPR1_SMP5_2 (0x4UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00020000 */ + +#define ADC_SMPR1_SMP6_Pos (18U) +#define ADC_SMPR1_SMP6_Msk (0x7UL << ADC_SMPR1_SMP6_Pos) /*!< 0x001C0000 */ +#define ADC_SMPR1_SMP6 ADC_SMPR1_SMP6_Msk /*!< ADC Channel 6 Sampling time selection */ +#define ADC_SMPR1_SMP6_0 (0x1UL << ADC_SMPR1_SMP6_Pos) /*!< 0x00040000 */ +#define ADC_SMPR1_SMP6_1 (0x2UL << ADC_SMPR1_SMP6_Pos) /*!< 0x00080000 */ +#define ADC_SMPR1_SMP6_2 (0x4UL << ADC_SMPR1_SMP6_Pos) /*!< 0x00100000 */ + +#define ADC_SMPR1_SMP7_Pos (21U) +#define ADC_SMPR1_SMP7_Msk (0x7UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00E00000 */ +#define ADC_SMPR1_SMP7 ADC_SMPR1_SMP7_Msk /*!< ADC Channel 7 Sampling time selection */ +#define ADC_SMPR1_SMP7_0 (0x1UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00200000 */ +#define ADC_SMPR1_SMP7_1 (0x2UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00400000 */ +#define ADC_SMPR1_SMP7_2 (0x4UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00800000 */ + +#define ADC_SMPR1_SMP8_Pos (24U) +#define ADC_SMPR1_SMP8_Msk (0x7UL << ADC_SMPR1_SMP8_Pos) /*!< 0x07000000 */ +#define ADC_SMPR1_SMP8 ADC_SMPR1_SMP8_Msk /*!< ADC Channel 8 Sampling time selection */ +#define ADC_SMPR1_SMP8_0 (0x1UL << ADC_SMPR1_SMP8_Pos) /*!< 0x01000000 */ +#define ADC_SMPR1_SMP8_1 (0x2UL << ADC_SMPR1_SMP8_Pos) /*!< 0x02000000 */ +#define ADC_SMPR1_SMP8_2 (0x4UL << ADC_SMPR1_SMP8_Pos) /*!< 0x04000000 */ + +#define ADC_SMPR1_SMP9_Pos (27U) +#define ADC_SMPR1_SMP9_Msk (0x7UL << ADC_SMPR1_SMP9_Pos) /*!< 0x38000000 */ +#define ADC_SMPR1_SMP9 ADC_SMPR1_SMP9_Msk /*!< ADC Channel 9 Sampling time selection */ +#define ADC_SMPR1_SMP9_0 (0x1UL << ADC_SMPR1_SMP9_Pos) /*!< 0x08000000 */ +#define ADC_SMPR1_SMP9_1 (0x2UL << ADC_SMPR1_SMP9_Pos) /*!< 0x10000000 */ +#define ADC_SMPR1_SMP9_2 (0x4UL << ADC_SMPR1_SMP9_Pos) /*!< 0x20000000 */ + +/******************** Bit definition for ADC_SMPR2 register ********************/ +#define ADC_SMPR2_SMP10_Pos (0U) +#define ADC_SMPR2_SMP10_Msk (0x7UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000007 */ +#define ADC_SMPR2_SMP10 ADC_SMPR2_SMP10_Msk /*!< ADC Channel 10 Sampling time selection */ +#define ADC_SMPR2_SMP10_0 (0x1UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000001 */ +#define ADC_SMPR2_SMP10_1 (0x2UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000002 */ +#define ADC_SMPR2_SMP10_2 (0x4UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000004 */ + +#define ADC_SMPR2_SMP11_Pos (3U) +#define ADC_SMPR2_SMP11_Msk (0x7UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000038 */ +#define ADC_SMPR2_SMP11 ADC_SMPR2_SMP11_Msk /*!< ADC Channel 11 Sampling time selection */ +#define ADC_SMPR2_SMP11_0 (0x1UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000008 */ +#define ADC_SMPR2_SMP11_1 (0x2UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000010 */ +#define ADC_SMPR2_SMP11_2 (0x4UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000020 */ + +#define ADC_SMPR2_SMP12_Pos (6U) +#define ADC_SMPR2_SMP12_Msk (0x7UL << ADC_SMPR2_SMP12_Pos) /*!< 0x000001C0 */ +#define ADC_SMPR2_SMP12 ADC_SMPR2_SMP12_Msk /*!< ADC Channel 12 Sampling time selection */ +#define ADC_SMPR2_SMP12_0 (0x1UL << ADC_SMPR2_SMP12_Pos) /*!< 0x00000040 */ +#define ADC_SMPR2_SMP12_1 (0x2UL << ADC_SMPR2_SMP12_Pos) /*!< 0x00000080 */ +#define ADC_SMPR2_SMP12_2 (0x4UL << ADC_SMPR2_SMP12_Pos) /*!< 0x00000100 */ + +#define ADC_SMPR2_SMP13_Pos (9U) +#define ADC_SMPR2_SMP13_Msk (0x7UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000E00 */ +#define ADC_SMPR2_SMP13 ADC_SMPR2_SMP13_Msk /*!< ADC Channel 13 Sampling time selection */ +#define ADC_SMPR2_SMP13_0 (0x1UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000200 */ +#define ADC_SMPR2_SMP13_1 (0x2UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000400 */ +#define ADC_SMPR2_SMP13_2 (0x4UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000800 */ + +#define ADC_SMPR2_SMP14_Pos (12U) +#define ADC_SMPR2_SMP14_Msk (0x7UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00007000 */ +#define ADC_SMPR2_SMP14 ADC_SMPR2_SMP14_Msk /*!< ADC Channel 14 Sampling time selection */ +#define ADC_SMPR2_SMP14_0 (0x1UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00001000 */ +#define ADC_SMPR2_SMP14_1 (0x2UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00002000 */ +#define ADC_SMPR2_SMP14_2 (0x4UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00004000 */ + +#define ADC_SMPR2_SMP15_Pos (15U) +#define ADC_SMPR2_SMP15_Msk (0x7UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00038000 */ +#define ADC_SMPR2_SMP15 ADC_SMPR2_SMP15_Msk /*!< ADC Channel 15 Sampling time selection */ +#define ADC_SMPR2_SMP15_0 (0x1UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00008000 */ +#define ADC_SMPR2_SMP15_1 (0x2UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00010000 */ +#define ADC_SMPR2_SMP15_2 (0x4UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00020000 */ + +#define ADC_SMPR2_SMP16_Pos (18U) +#define ADC_SMPR2_SMP16_Msk (0x7UL << ADC_SMPR2_SMP16_Pos) /*!< 0x001C0000 */ +#define ADC_SMPR2_SMP16 ADC_SMPR2_SMP16_Msk /*!< ADC Channel 16 Sampling time selection */ +#define ADC_SMPR2_SMP16_0 (0x1UL << ADC_SMPR2_SMP16_Pos) /*!< 0x00040000 */ +#define ADC_SMPR2_SMP16_1 (0x2UL << ADC_SMPR2_SMP16_Pos) /*!< 0x00080000 */ +#define ADC_SMPR2_SMP16_2 (0x4UL << ADC_SMPR2_SMP16_Pos) /*!< 0x00100000 */ + +#define ADC_SMPR2_SMP17_Pos (21U) +#define ADC_SMPR2_SMP17_Msk (0x7UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00E00000 */ +#define ADC_SMPR2_SMP17 ADC_SMPR2_SMP17_Msk /*!< ADC Channel 17 Sampling time selection */ +#define ADC_SMPR2_SMP17_0 (0x1UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00200000 */ +#define ADC_SMPR2_SMP17_1 (0x2UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00400000 */ +#define ADC_SMPR2_SMP17_2 (0x4UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00800000 */ + +#define ADC_SMPR2_SMP18_Pos (24U) +#define ADC_SMPR2_SMP18_Msk (0x7UL << ADC_SMPR2_SMP18_Pos) /*!< 0x07000000 */ +#define ADC_SMPR2_SMP18 ADC_SMPR2_SMP18_Msk /*!< ADC Channel 18 Sampling time selection */ +#define ADC_SMPR2_SMP18_0 (0x1UL << ADC_SMPR2_SMP18_Pos) /*!< 0x01000000 */ +#define ADC_SMPR2_SMP18_1 (0x2UL << ADC_SMPR2_SMP18_Pos) /*!< 0x02000000 */ +#define ADC_SMPR2_SMP18_2 (0x4UL << ADC_SMPR2_SMP18_Pos) /*!< 0x04000000 */ + +#define ADC_SMPR2_SMP19_Pos (27U) +#define ADC_SMPR2_SMP19_Msk (0x7UL << ADC_SMPR2_SMP19_Pos) /*!< 0x38000000 */ +#define ADC_SMPR2_SMP19 ADC_SMPR2_SMP19_Msk /*!< ADC Channel 19 Sampling time selection */ +#define ADC_SMPR2_SMP19_0 (0x1UL << ADC_SMPR2_SMP19_Pos) /*!< 0x08000000 */ +#define ADC_SMPR2_SMP19_1 (0x2UL << ADC_SMPR2_SMP19_Pos) /*!< 0x10000000 */ +#define ADC_SMPR2_SMP19_2 (0x4UL << ADC_SMPR2_SMP19_Pos) /*!< 0x20000000 */ + +/******************** Bit definition for ADC_PCSEL register ********************/ +#define ADC_PCSEL_PCSEL_Pos (0U) +#define ADC_PCSEL_PCSEL_Msk (0xFFFFFUL << ADC_PCSEL_PCSEL_Pos) /*!< 0x000FFFFF */ +#define ADC_PCSEL_PCSEL ADC_PCSEL_PCSEL_Msk /*!< ADC pre channel selection */ +#define ADC_PCSEL_PCSEL_0 (0x00001UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000001 */ +#define ADC_PCSEL_PCSEL_1 (0x00002UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000002 */ +#define ADC_PCSEL_PCSEL_2 (0x00004UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000004 */ +#define ADC_PCSEL_PCSEL_3 (0x00008UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000008 */ +#define ADC_PCSEL_PCSEL_4 (0x00010UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000010 */ +#define ADC_PCSEL_PCSEL_5 (0x00020UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000020 */ +#define ADC_PCSEL_PCSEL_6 (0x00040UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000040 */ +#define ADC_PCSEL_PCSEL_7 (0x00080UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000080 */ +#define ADC_PCSEL_PCSEL_8 (0x00100UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000100 */ +#define ADC_PCSEL_PCSEL_9 (0x00200UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000200 */ +#define ADC_PCSEL_PCSEL_10 (0x00400UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000400 */ +#define ADC_PCSEL_PCSEL_11 (0x00800UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000800 */ +#define ADC_PCSEL_PCSEL_12 (0x01000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00001000 */ +#define ADC_PCSEL_PCSEL_13 (0x02000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00002000 */ +#define ADC_PCSEL_PCSEL_14 (0x04000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00004000 */ +#define ADC_PCSEL_PCSEL_15 (0x08000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00008000 */ +#define ADC_PCSEL_PCSEL_16 (0x10000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00010000 */ +#define ADC_PCSEL_PCSEL_17 (0x20000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00020000 */ +#define ADC_PCSEL_PCSEL_18 (0x40000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00040000 */ +#define ADC_PCSEL_PCSEL_19 (0x80000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00080000 */ + +/***************** Bit definition for ADC_LTR1, 2, 3 registers *****************/ +#define ADC_LTR_LT_Pos (0U) +#define ADC_LTR_LT_Msk (0x3FFFFFFUL << ADC_LTR_LT_Pos) /*!< 0x03FFFFFF */ +#define ADC_LTR_LT ADC_LTR_LT_Msk /*!< ADC Analog watchdog 1, 2 and 3 lower threshold */ + +/***************** Bit definition for ADC_HTR1, 2, 3 registers ****************/ +#define ADC_HTR_HT_Pos (0U) +#define ADC_HTR_HT_Msk (0x3FFFFFFUL << ADC_HTR_HT_Pos) /*!< 0x03FFFFFF */ +#define ADC_HTR_HT ADC_HTR_HT_Msk /*!< ADC Analog watchdog 1,2 and 3 higher threshold */ + +/******************** Bit definition for ADC3_TR1 register *******************/ +#define ADC3_TR1_LT1_Pos (0U) +#define ADC3_TR1_LT1_Msk (0xFFFUL << ADC3_TR1_LT1_Pos) /*!< 0x00000FFF */ +#define ADC3_TR1_LT1 ADC3_TR1_LT1_Msk /*!< ADC analog watchdog 1 threshold low */ + +#define ADC3_TR1_AWDFILT_Pos (12U) +#define ADC3_TR1_AWDFILT_Msk (0x7UL << ADC3_TR1_AWDFILT_Pos) /*!< 0x00007000 */ +#define ADC3_TR1_AWDFILT ADC3_TR1_AWDFILT_Msk /*!< ADC analog watchdog filtering parameter */ +#define ADC3_TR1_AWDFILT_0 (0x1UL << ADC3_TR1_AWDFILT_Pos) /*!< 0x00001000 */ +#define ADC3_TR1_AWDFILT_1 (0x2UL << ADC3_TR1_AWDFILT_Pos) /*!< 0x00002000 */ +#define ADC3_TR1_AWDFILT_2 (0x4UL << ADC3_TR1_AWDFILT_Pos) /*!< 0x00004000 */ + +#define ADC3_TR1_HT1_Pos (16U) +#define ADC3_TR1_HT1_Msk (0xFFFUL << ADC3_TR1_HT1_Pos) /*!< 0x0FFF0000 */ +#define ADC3_TR1_HT1 ADC3_TR1_HT1_Msk /*!< ADC analog watchdog 1 threshold high */ + +/******************** Bit definition for ADC3_TR2 register *******************/ +#define ADC3_TR2_LT2_Pos (0U) +#define ADC3_TR2_LT2_Msk (0xFFUL << ADC3_TR2_LT2_Pos) /*!< 0x000000FF */ +#define ADC3_TR2_LT2 ADC3_TR2_LT2_Msk /*!< ADC analog watchdog 2 threshold low */ + +#define ADC3_TR2_HT2_Pos (16U) +#define ADC3_TR2_HT2_Msk (0xFFUL << ADC3_TR2_HT2_Pos) /*!< 0x00FF0000 */ +#define ADC3_TR2_HT2 ADC3_TR2_HT2_Msk /*!< ADC analog watchdog 2 threshold high */ + +/******************** Bit definition for ADC3_TR3 register *******************/ +#define ADC3_TR3_LT3_Pos (0U) +#define ADC3_TR3_LT3_Msk (0xFFUL << ADC3_TR3_LT3_Pos) /*!< 0x000000FF */ +#define ADC3_TR3_LT3 ADC3_TR3_LT3_Msk /*!< ADC analog watchdog 3 threshold low */ + +#define ADC3_TR3_HT3_Pos (16U) +#define ADC3_TR3_HT3_Msk (0xFFUL << ADC3_TR3_HT3_Pos) /*!< 0x00FF0000 */ +#define ADC3_TR3_HT3 ADC3_TR3_HT3_Msk /*!< ADC analog watchdog 3 threshold high */ + +/******************** Bit definition for ADC_SQR1 register ********************/ +#define ADC_SQR1_L_Pos (0U) +#define ADC_SQR1_L_Msk (0xFUL << ADC_SQR1_L_Pos) /*!< 0x0000000F */ +#define ADC_SQR1_L ADC_SQR1_L_Msk /*!< ADC regular channel sequence lenght */ +#define ADC_SQR1_L_0 (0x1UL << ADC_SQR1_L_Pos) /*!< 0x00000001 */ +#define ADC_SQR1_L_1 (0x2UL << ADC_SQR1_L_Pos) /*!< 0x00000002 */ +#define ADC_SQR1_L_2 (0x4UL << ADC_SQR1_L_Pos) /*!< 0x00000004 */ +#define ADC_SQR1_L_3 (0x8UL << ADC_SQR1_L_Pos) /*!< 0x00000008 */ + +#define ADC_SQR1_SQ1_Pos (6U) +#define ADC_SQR1_SQ1_Msk (0x1FUL << ADC_SQR1_SQ1_Pos) /*!< 0x000007C0 */ +#define ADC_SQR1_SQ1 ADC_SQR1_SQ1_Msk /*!< ADC 1st conversion in regular sequence */ +#define ADC_SQR1_SQ1_0 (0x01UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000040 */ +#define ADC_SQR1_SQ1_1 (0x02UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000080 */ +#define ADC_SQR1_SQ1_2 (0x04UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000100 */ +#define ADC_SQR1_SQ1_3 (0x08UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000200 */ +#define ADC_SQR1_SQ1_4 (0x10UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000400 */ + +#define ADC_SQR1_SQ2_Pos (12U) +#define ADC_SQR1_SQ2_Msk (0x1FUL << ADC_SQR1_SQ2_Pos) /*!< 0x0001F000 */ +#define ADC_SQR1_SQ2 ADC_SQR1_SQ2_Msk /*!< ADC 2nd conversion in regular sequence */ +#define ADC_SQR1_SQ2_0 (0x01UL << ADC_SQR1_SQ2_Pos) /*!< 0x00001000 */ +#define ADC_SQR1_SQ2_1 (0x02UL << ADC_SQR1_SQ2_Pos) /*!< 0x00002000 */ +#define ADC_SQR1_SQ2_2 (0x04UL << ADC_SQR1_SQ2_Pos) /*!< 0x00004000 */ +#define ADC_SQR1_SQ2_3 (0x08UL << ADC_SQR1_SQ2_Pos) /*!< 0x00008000 */ +#define ADC_SQR1_SQ2_4 (0x10UL << ADC_SQR1_SQ2_Pos) /*!< 0x00010000 */ + +#define ADC_SQR1_SQ3_Pos (18U) +#define ADC_SQR1_SQ3_Msk (0x1FUL << ADC_SQR1_SQ3_Pos) /*!< 0x007C0000 */ +#define ADC_SQR1_SQ3 ADC_SQR1_SQ3_Msk /*!< ADC 3rd conversion in regular sequence */ +#define ADC_SQR1_SQ3_0 (0x01UL << ADC_SQR1_SQ3_Pos) /*!< 0x00040000 */ +#define ADC_SQR1_SQ3_1 (0x02UL << ADC_SQR1_SQ3_Pos) /*!< 0x00080000 */ +#define ADC_SQR1_SQ3_2 (0x04UL << ADC_SQR1_SQ3_Pos) /*!< 0x00100000 */ +#define ADC_SQR1_SQ3_3 (0x08UL << ADC_SQR1_SQ3_Pos) /*!< 0x00200000 */ +#define ADC_SQR1_SQ3_4 (0x10UL << ADC_SQR1_SQ3_Pos) /*!< 0x00400000 */ + +#define ADC_SQR1_SQ4_Pos (24U) +#define ADC_SQR1_SQ4_Msk (0x1FUL << ADC_SQR1_SQ4_Pos) /*!< 0x1F000000 */ +#define ADC_SQR1_SQ4 ADC_SQR1_SQ4_Msk /*!< ADC 4th conversion in regular sequence */ +#define ADC_SQR1_SQ4_0 (0x01UL << ADC_SQR1_SQ4_Pos) /*!< 0x01000000 */ +#define ADC_SQR1_SQ4_1 (0x02UL << ADC_SQR1_SQ4_Pos) /*!< 0x02000000 */ +#define ADC_SQR1_SQ4_2 (0x04UL << ADC_SQR1_SQ4_Pos) /*!< 0x04000000 */ +#define ADC_SQR1_SQ4_3 (0x08UL << ADC_SQR1_SQ4_Pos) /*!< 0x08000000 */ +#define ADC_SQR1_SQ4_4 (0x10UL << ADC_SQR1_SQ4_Pos) /*!< 0x10000000 */ + +/******************** Bit definition for ADC_SQR2 register ********************/ +#define ADC_SQR2_SQ5_Pos (0U) +#define ADC_SQR2_SQ5_Msk (0x1FUL << ADC_SQR2_SQ5_Pos) /*!< 0x0000001F */ +#define ADC_SQR2_SQ5 ADC_SQR2_SQ5_Msk /*!< ADC 5th conversion in regular sequence */ +#define ADC_SQR2_SQ5_0 (0x01UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000001 */ +#define ADC_SQR2_SQ5_1 (0x02UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000002 */ +#define ADC_SQR2_SQ5_2 (0x04UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000004 */ +#define ADC_SQR2_SQ5_3 (0x08UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000008 */ +#define ADC_SQR2_SQ5_4 (0x10UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000010 */ + +#define ADC_SQR2_SQ6_Pos (6U) +#define ADC_SQR2_SQ6_Msk (0x1FUL << ADC_SQR2_SQ6_Pos) /*!< 0x000007C0 */ +#define ADC_SQR2_SQ6 ADC_SQR2_SQ6_Msk /*!< ADC 6th conversion in regular sequence */ +#define ADC_SQR2_SQ6_0 (0x01UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000040 */ +#define ADC_SQR2_SQ6_1 (0x02UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000080 */ +#define ADC_SQR2_SQ6_2 (0x04UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000100 */ +#define ADC_SQR2_SQ6_3 (0x08UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000200 */ +#define ADC_SQR2_SQ6_4 (0x10UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000400 */ + +#define ADC_SQR2_SQ7_Pos (12U) +#define ADC_SQR2_SQ7_Msk (0x1FUL << ADC_SQR2_SQ7_Pos) /*!< 0x0001F000 */ +#define ADC_SQR2_SQ7 ADC_SQR2_SQ7_Msk /*!< ADC 7th conversion in regular sequence */ +#define ADC_SQR2_SQ7_0 (0x01UL << ADC_SQR2_SQ7_Pos) /*!< 0x00001000 */ +#define ADC_SQR2_SQ7_1 (0x02UL << ADC_SQR2_SQ7_Pos) /*!< 0x00002000 */ +#define ADC_SQR2_SQ7_2 (0x04UL << ADC_SQR2_SQ7_Pos) /*!< 0x00004000 */ +#define ADC_SQR2_SQ7_3 (0x08UL << ADC_SQR2_SQ7_Pos) /*!< 0x00008000 */ +#define ADC_SQR2_SQ7_4 (0x10UL << ADC_SQR2_SQ7_Pos) /*!< 0x00010000 */ + +#define ADC_SQR2_SQ8_Pos (18U) +#define ADC_SQR2_SQ8_Msk (0x1FUL << ADC_SQR2_SQ8_Pos) /*!< 0x007C0000 */ +#define ADC_SQR2_SQ8 ADC_SQR2_SQ8_Msk /*!< ADC 8th conversion in regular sequence */ +#define ADC_SQR2_SQ8_0 (0x01UL << ADC_SQR2_SQ8_Pos) /*!< 0x00040000 */ +#define ADC_SQR2_SQ8_1 (0x02UL << ADC_SQR2_SQ8_Pos) /*!< 0x00080000 */ +#define ADC_SQR2_SQ8_2 (0x04UL << ADC_SQR2_SQ8_Pos) /*!< 0x00100000 */ +#define ADC_SQR2_SQ8_3 (0x08UL << ADC_SQR2_SQ8_Pos) /*!< 0x00200000 */ +#define ADC_SQR2_SQ8_4 (0x10UL << ADC_SQR2_SQ8_Pos) /*!< 0x00400000 */ + +#define ADC_SQR2_SQ9_Pos (24U) +#define ADC_SQR2_SQ9_Msk (0x1FUL << ADC_SQR2_SQ9_Pos) /*!< 0x1F000000 */ +#define ADC_SQR2_SQ9 ADC_SQR2_SQ9_Msk /*!< ADC 9th conversion in regular sequence */ +#define ADC_SQR2_SQ9_0 (0x01UL << ADC_SQR2_SQ9_Pos) /*!< 0x01000000 */ +#define ADC_SQR2_SQ9_1 (0x02UL << ADC_SQR2_SQ9_Pos) /*!< 0x02000000 */ +#define ADC_SQR2_SQ9_2 (0x04UL << ADC_SQR2_SQ9_Pos) /*!< 0x04000000 */ +#define ADC_SQR2_SQ9_3 (0x08UL << ADC_SQR2_SQ9_Pos) /*!< 0x08000000 */ +#define ADC_SQR2_SQ9_4 (0x10UL << ADC_SQR2_SQ9_Pos) /*!< 0x10000000 */ + +/******************** Bit definition for ADC_SQR3 register ********************/ +#define ADC_SQR3_SQ10_Pos (0U) +#define ADC_SQR3_SQ10_Msk (0x1FUL << ADC_SQR3_SQ10_Pos) /*!< 0x0000001F */ +#define ADC_SQR3_SQ10 ADC_SQR3_SQ10_Msk /*!< ADC 10th conversion in regular sequence */ +#define ADC_SQR3_SQ10_0 (0x01UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000001 */ +#define ADC_SQR3_SQ10_1 (0x02UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000002 */ +#define ADC_SQR3_SQ10_2 (0x04UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000004 */ +#define ADC_SQR3_SQ10_3 (0x08UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000008 */ +#define ADC_SQR3_SQ10_4 (0x10UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000010 */ + +#define ADC_SQR3_SQ11_Pos (6U) +#define ADC_SQR3_SQ11_Msk (0x1FUL << ADC_SQR3_SQ11_Pos) /*!< 0x000007C0 */ +#define ADC_SQR3_SQ11 ADC_SQR3_SQ11_Msk /*!< ADC 11th conversion in regular sequence */ +#define ADC_SQR3_SQ11_0 (0x01UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000040 */ +#define ADC_SQR3_SQ11_1 (0x02UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000080 */ +#define ADC_SQR3_SQ11_2 (0x04UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000100 */ +#define ADC_SQR3_SQ11_3 (0x08UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000200 */ +#define ADC_SQR3_SQ11_4 (0x10UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000400 */ + +#define ADC_SQR3_SQ12_Pos (12U) +#define ADC_SQR3_SQ12_Msk (0x1FUL << ADC_SQR3_SQ12_Pos) /*!< 0x0001F000 */ +#define ADC_SQR3_SQ12 ADC_SQR3_SQ12_Msk /*!< ADC 12th conversion in regular sequence */ +#define ADC_SQR3_SQ12_0 (0x01UL << ADC_SQR3_SQ12_Pos) /*!< 0x00001000 */ +#define ADC_SQR3_SQ12_1 (0x02UL << ADC_SQR3_SQ12_Pos) /*!< 0x00002000 */ +#define ADC_SQR3_SQ12_2 (0x04UL << ADC_SQR3_SQ12_Pos) /*!< 0x00004000 */ +#define ADC_SQR3_SQ12_3 (0x08UL << ADC_SQR3_SQ12_Pos) /*!< 0x00008000 */ +#define ADC_SQR3_SQ12_4 (0x10UL << ADC_SQR3_SQ12_Pos) /*!< 0x00010000 */ + +#define ADC_SQR3_SQ13_Pos (18U) +#define ADC_SQR3_SQ13_Msk (0x1FUL << ADC_SQR3_SQ13_Pos) /*!< 0x007C0000 */ +#define ADC_SQR3_SQ13 ADC_SQR3_SQ13_Msk /*!< ADC 13th conversion in regular sequence */ +#define ADC_SQR3_SQ13_0 (0x01UL << ADC_SQR3_SQ13_Pos) /*!< 0x00040000 */ +#define ADC_SQR3_SQ13_1 (0x02UL << ADC_SQR3_SQ13_Pos) /*!< 0x00080000 */ +#define ADC_SQR3_SQ13_2 (0x04UL << ADC_SQR3_SQ13_Pos) /*!< 0x00100000 */ +#define ADC_SQR3_SQ13_3 (0x08UL << ADC_SQR3_SQ13_Pos) /*!< 0x00200000 */ +#define ADC_SQR3_SQ13_4 (0x10UL << ADC_SQR3_SQ13_Pos) /*!< 0x00400000 */ + +#define ADC_SQR3_SQ14_Pos (24U) +#define ADC_SQR3_SQ14_Msk (0x1FUL << ADC_SQR3_SQ14_Pos) /*!< 0x1F000000 */ +#define ADC_SQR3_SQ14 ADC_SQR3_SQ14_Msk /*!< ADC 14th conversion in regular sequence */ +#define ADC_SQR3_SQ14_0 (0x01UL << ADC_SQR3_SQ14_Pos) /*!< 0x01000000 */ +#define ADC_SQR3_SQ14_1 (0x02UL << ADC_SQR3_SQ14_Pos) /*!< 0x02000000 */ +#define ADC_SQR3_SQ14_2 (0x04UL << ADC_SQR3_SQ14_Pos) /*!< 0x04000000 */ +#define ADC_SQR3_SQ14_3 (0x08UL << ADC_SQR3_SQ14_Pos) /*!< 0x08000000 */ +#define ADC_SQR3_SQ14_4 (0x10UL << ADC_SQR3_SQ14_Pos) /*!< 0x10000000 */ + +/******************** Bit definition for ADC_SQR4 register ********************/ +#define ADC_SQR4_SQ15_Pos (0U) +#define ADC_SQR4_SQ15_Msk (0x1FUL << ADC_SQR4_SQ15_Pos) /*!< 0x0000001F */ +#define ADC_SQR4_SQ15 ADC_SQR4_SQ15_Msk /*!< ADC 15th conversion in regular sequence */ +#define ADC_SQR4_SQ15_0 (0x01UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000001 */ +#define ADC_SQR4_SQ15_1 (0x02UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000002 */ +#define ADC_SQR4_SQ15_2 (0x04UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000004 */ +#define ADC_SQR4_SQ15_3 (0x08UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000008 */ +#define ADC_SQR4_SQ15_4 (0x10UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000010 */ + +#define ADC_SQR4_SQ16_Pos (6U) +#define ADC_SQR4_SQ16_Msk (0x1FUL << ADC_SQR4_SQ16_Pos) /*!< 0x000007C0 */ +#define ADC_SQR4_SQ16 ADC_SQR4_SQ16_Msk /*!< ADC 16th conversion in regular sequence */ +#define ADC_SQR4_SQ16_0 (0x01UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000040 */ +#define ADC_SQR4_SQ16_1 (0x02UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000080 */ +#define ADC_SQR4_SQ16_2 (0x04UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000100 */ +#define ADC_SQR4_SQ16_3 (0x08UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000200 */ +#define ADC_SQR4_SQ16_4 (0x10UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000400 */ +/******************** Bit definition for ADC_DR register ********************/ +#define ADC_DR_RDATA_Pos (0U) +#define ADC_DR_RDATA_Msk (0xFFFFFFFFUL << ADC_DR_RDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_DR_RDATA ADC_DR_RDATA_Msk /*!< ADC regular Data converted */ + +/******************** Bit definition for ADC_JSQR register ********************/ +#define ADC_JSQR_JL_Pos (0U) +#define ADC_JSQR_JL_Msk (0x3UL << ADC_JSQR_JL_Pos) /*!< 0x00000003 */ +#define ADC_JSQR_JL ADC_JSQR_JL_Msk /*!< ADC injected channel sequence length */ +#define ADC_JSQR_JL_0 (0x1UL << ADC_JSQR_JL_Pos) /*!< 0x00000001 */ +#define ADC_JSQR_JL_1 (0x2UL << ADC_JSQR_JL_Pos) /*!< 0x00000002 */ + +#define ADC_JSQR_JEXTSEL_Pos (2U) +#define ADC_JSQR_JEXTSEL_Msk (0x1FUL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x0000007C */ +#define ADC_JSQR_JEXTSEL ADC_JSQR_JEXTSEL_Msk /*!< ADC external trigger selection for injected group */ +#define ADC_JSQR_JEXTSEL_0 (0x01UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000004 */ +#define ADC_JSQR_JEXTSEL_1 (0x02UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000008 */ +#define ADC_JSQR_JEXTSEL_2 (0x04UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000010 */ +#define ADC_JSQR_JEXTSEL_3 (0x08UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000020 */ +#define ADC_JSQR_JEXTSEL_4 (0x10UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000040 */ + +#define ADC_JSQR_JEXTEN_Pos (7U) +#define ADC_JSQR_JEXTEN_Msk (0x3UL << ADC_JSQR_JEXTEN_Pos) /*!< 0x00000180 */ +#define ADC_JSQR_JEXTEN ADC_JSQR_JEXTEN_Msk /*!< ADC external trigger enable and polarity selection for injected channels */ +#define ADC_JSQR_JEXTEN_0 (0x1UL << ADC_JSQR_JEXTEN_Pos) /*!< 0x00000080 */ +#define ADC_JSQR_JEXTEN_1 (0x2UL << ADC_JSQR_JEXTEN_Pos) /*!< 0x00000100 */ + +#define ADC_JSQR_JSQ1_Pos (9U) +#define ADC_JSQR_JSQ1_Msk (0x1FUL << ADC_JSQR_JSQ1_Pos) /*!< 0x00003E00 */ +#define ADC_JSQR_JSQ1 ADC_JSQR_JSQ1_Msk /*!< ADC 1st conversion in injected sequence */ +#define ADC_JSQR_JSQ1_0 (0x01UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00000200 */ +#define ADC_JSQR_JSQ1_1 (0x02UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00000400 */ +#define ADC_JSQR_JSQ1_2 (0x04UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00000800 */ +#define ADC_JSQR_JSQ1_3 (0x08UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00001000 */ +#define ADC_JSQR_JSQ1_4 (0x10UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00002000 */ + +#define ADC_JSQR_JSQ2_Pos (15U) +#define ADC_JSQR_JSQ2_Msk (0x1FUL << ADC_JSQR_JSQ2_Pos) /*!< 0x000F8000 */ +#define ADC_JSQR_JSQ2 ADC_JSQR_JSQ2_Msk /*!< ADC 2nd conversion in injected sequence */ +#define ADC_JSQR_JSQ2_0 (0x01UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00008000 */ +#define ADC_JSQR_JSQ2_1 (0x02UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00010000 */ +#define ADC_JSQR_JSQ2_2 (0x04UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00020000 */ +#define ADC_JSQR_JSQ2_3 (0x08UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00040000 */ +#define ADC_JSQR_JSQ2_4 (0x10UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00080000 */ + +#define ADC_JSQR_JSQ3_Pos (21U) +#define ADC_JSQR_JSQ3_Msk (0x1FUL << ADC_JSQR_JSQ3_Pos) /*!< 0x03E00000 */ +#define ADC_JSQR_JSQ3 ADC_JSQR_JSQ3_Msk /*!< ADC 3rd conversion in injected sequence */ +#define ADC_JSQR_JSQ3_0 (0x01UL << ADC_JSQR_JSQ3_Pos) /*!< 0x00200000 */ +#define ADC_JSQR_JSQ3_1 (0x02UL << ADC_JSQR_JSQ3_Pos) /*!< 0x00400000 */ +#define ADC_JSQR_JSQ3_2 (0x04UL << ADC_JSQR_JSQ3_Pos) /*!< 0x00800000 */ +#define ADC_JSQR_JSQ3_3 (0x08UL << ADC_JSQR_JSQ3_Pos) /*!< 0x01000000 */ +#define ADC_JSQR_JSQ3_4 (0x10UL << ADC_JSQR_JSQ3_Pos) /*!< 0x02000000 */ + +#define ADC_JSQR_JSQ4_Pos (27U) +#define ADC_JSQR_JSQ4_Msk (0x1FUL << ADC_JSQR_JSQ4_Pos) /*!< 0xF8000000 */ +#define ADC_JSQR_JSQ4 ADC_JSQR_JSQ4_Msk /*!< ADC 4th conversion in injected sequence */ +#define ADC_JSQR_JSQ4_0 (0x01UL << ADC_JSQR_JSQ4_Pos) /*!< 0x08000000 */ +#define ADC_JSQR_JSQ4_1 (0x02UL << ADC_JSQR_JSQ4_Pos) /*!< 0x10000000 */ +#define ADC_JSQR_JSQ4_2 (0x04UL << ADC_JSQR_JSQ4_Pos) /*!< 0x20000000 */ +#define ADC_JSQR_JSQ4_3 (0x08UL << ADC_JSQR_JSQ4_Pos) /*!< 0x40000000 */ +#define ADC_JSQR_JSQ4_4 (0x10UL << ADC_JSQR_JSQ4_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_OFR1 register ********************/ +#define ADC_OFR1_OFFSET1_Pos (0U) +#define ADC_OFR1_OFFSET1_Msk (0x3FFFFFFUL << ADC_OFR1_OFFSET1_Pos) /*!< 0x03FFFFFF */ +#define ADC_OFR1_OFFSET1 ADC_OFR1_OFFSET1_Msk /*!< ADC data offset 1 for channel programmed into bits OFFSET1_CH[4:0] */ +#define ADC_OFR1_OFFSET1_0 (0x0000001UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000001 */ +#define ADC_OFR1_OFFSET1_1 (0x0000002UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000002 */ +#define ADC_OFR1_OFFSET1_2 (0x0000004UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000004 */ +#define ADC_OFR1_OFFSET1_3 (0x0000008UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000008 */ +#define ADC_OFR1_OFFSET1_4 (0x0000010UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000010 */ +#define ADC_OFR1_OFFSET1_5 (0x0000020UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000020 */ +#define ADC_OFR1_OFFSET1_6 (0x0000040UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000040 */ +#define ADC_OFR1_OFFSET1_7 (0x0000080UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000080 */ +#define ADC_OFR1_OFFSET1_8 (0x0000100UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000100 */ +#define ADC_OFR1_OFFSET1_9 (0x0000200UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000200 */ +#define ADC_OFR1_OFFSET1_10 (0x0000400UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000400 */ +#define ADC_OFR1_OFFSET1_11 (0x0000800UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000800 */ +#define ADC_OFR1_OFFSET1_12 (0x0001000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00001000 */ +#define ADC_OFR1_OFFSET1_13 (0x0002000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00002000 */ +#define ADC_OFR1_OFFSET1_14 (0x0004000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00004000 */ +#define ADC_OFR1_OFFSET1_15 (0x0008000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00008000 */ +#define ADC_OFR1_OFFSET1_16 (0x0010000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00010000 */ +#define ADC_OFR1_OFFSET1_17 (0x0020000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00020000 */ +#define ADC_OFR1_OFFSET1_18 (0x0040000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00040000 */ +#define ADC_OFR1_OFFSET1_19 (0x0080000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00080000 */ +#define ADC_OFR1_OFFSET1_20 (0x0100000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00100000 */ +#define ADC_OFR1_OFFSET1_21 (0x0200000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00200000 */ +#define ADC_OFR1_OFFSET1_22 (0x0400000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00400000 */ +#define ADC_OFR1_OFFSET1_23 (0x0800000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00800000 */ +#define ADC_OFR1_OFFSET1_24 (0x1000000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x01000000 */ +#define ADC_OFR1_OFFSET1_25 (0x2000000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x02000000 */ + +#define ADC_OFR1_OFFSET1_CH_Pos (26U) +#define ADC_OFR1_OFFSET1_CH_Msk (0x1FUL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR1_OFFSET1_CH ADC_OFR1_OFFSET1_CH_Msk /*!< ADC Channel selection for the data offset 1 */ +#define ADC_OFR1_OFFSET1_CH_0 (0x01UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR1_OFFSET1_CH_1 (0x02UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR1_OFFSET1_CH_2 (0x04UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR1_OFFSET1_CH_3 (0x08UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR1_OFFSET1_CH_4 (0x10UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR1_SSATE_Pos (31U) +#define ADC_OFR1_SSATE_Msk (0x1UL << ADC_OFR1_SSATE_Pos) /*!< 0x80000000 */ +#define ADC_OFR1_SSATE ADC_OFR1_SSATE_Msk /*!< ADC Signed saturation Enable */ + +#define ADC3_OFR1_OFFSET1_Pos (0U) +#define ADC3_OFR1_OFFSET1_Msk (0xFFFUL << ADC3_OFR1_OFFSET1_Pos) /*!< 0x00000FFF */ +#define ADC3_OFR1_OFFSET1 ADC3_OFR1_OFFSET1_Msk /*!< ADC data offset 1 for channel programmed into bits OFFSET1_CH[4:0] */ + +#define ADC3_OFR1_OFFSETPOS_Pos (24U) +#define ADC3_OFR1_OFFSETPOS_Msk (0x1UL << ADC3_OFR1_OFFSETPOS_Pos) /*!< 0x01000000 */ +#define ADC3_OFR1_OFFSETPOS ADC3_OFR1_OFFSETPOS_Msk /*!< ADC offset number 1 positive */ +#define ADC3_OFR1_SATEN_Pos (25U) +#define ADC3_OFR1_SATEN_Msk (0x1UL << ADC3_OFR1_SATEN_Pos) /*!< 0x02000000 */ +#define ADC3_OFR1_SATEN ADC3_OFR1_SATEN_Msk /*!< ADC offset number 1 saturation enable */ + +#define ADC3_OFR1_OFFSET1_EN_Pos (31U) +#define ADC3_OFR1_OFFSET1_EN_Msk (0x1UL << ADC3_OFR1_OFFSET1_EN_Pos) /*!< 0x80000000 */ +#define ADC3_OFR1_OFFSET1_EN ADC3_OFR1_OFFSET1_EN_Msk /*!< ADC offset number 1 enable */ + +/******************** Bit definition for ADC_OFR2 register ********************/ +#define ADC_OFR2_OFFSET2_Pos (0U) +#define ADC_OFR2_OFFSET2_Msk (0x3FFFFFFUL << ADC_OFR2_OFFSET2_Pos) /*!< 0x03FFFFFF */ +#define ADC_OFR2_OFFSET2 ADC_OFR2_OFFSET2_Msk /*!< ADC data offset 2 for channel programmed into bits OFFSET2_CH[4:0] */ +#define ADC_OFR2_OFFSET2_0 (0x0000001UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000001 */ +#define ADC_OFR2_OFFSET2_1 (0x0000002UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000002 */ +#define ADC_OFR2_OFFSET2_2 (0x0000004UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000004 */ +#define ADC_OFR2_OFFSET2_3 (0x0000008UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000008 */ +#define ADC_OFR2_OFFSET2_4 (0x0000010UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000010 */ +#define ADC_OFR2_OFFSET2_5 (0x0000020UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000020 */ +#define ADC_OFR2_OFFSET2_6 (0x0000040UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000040 */ +#define ADC_OFR2_OFFSET2_7 (0x0000080UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000080 */ +#define ADC_OFR2_OFFSET2_8 (0x0000100UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000100 */ +#define ADC_OFR2_OFFSET2_9 (0x0000200UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000200 */ +#define ADC_OFR2_OFFSET2_10 (0x0000400UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000400 */ +#define ADC_OFR2_OFFSET2_11 (0x0000800UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000800 */ +#define ADC_OFR2_OFFSET2_12 (0x0001000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00001000 */ +#define ADC_OFR2_OFFSET2_13 (0x0002000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00002000 */ +#define ADC_OFR2_OFFSET2_14 (0x0004000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00004000 */ +#define ADC_OFR2_OFFSET2_15 (0x0008000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00008000 */ +#define ADC_OFR2_OFFSET2_16 (0x0010000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00010000 */ +#define ADC_OFR2_OFFSET2_17 (0x0020000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00020000 */ +#define ADC_OFR2_OFFSET2_18 (0x0040000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00040000 */ +#define ADC_OFR2_OFFSET2_19 (0x0080000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00080000 */ +#define ADC_OFR2_OFFSET2_20 (0x0100000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00100000 */ +#define ADC_OFR2_OFFSET2_21 (0x0200000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00200000 */ +#define ADC_OFR2_OFFSET2_22 (0x0400000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00400000 */ +#define ADC_OFR2_OFFSET2_23 (0x0800000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00800000 */ +#define ADC_OFR2_OFFSET2_24 (0x1000000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x01000000 */ +#define ADC_OFR2_OFFSET2_25 (0x2000000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x02000000 */ + +#define ADC_OFR2_OFFSET2_CH_Pos (26U) +#define ADC_OFR2_OFFSET2_CH_Msk (0x1FUL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR2_OFFSET2_CH ADC_OFR2_OFFSET2_CH_Msk /*!< ADC Channel selection for the data offset 2 */ +#define ADC_OFR2_OFFSET2_CH_0 (0x01UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR2_OFFSET2_CH_1 (0x02UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR2_OFFSET2_CH_2 (0x04UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR2_OFFSET2_CH_3 (0x08UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR2_OFFSET2_CH_4 (0x10UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR2_SSATE_Pos (31U) +#define ADC_OFR2_SSATE_Msk (0x1UL << ADC_OFR2_SSATE_Pos) /*!< 0x80000000 */ +#define ADC_OFR2_SSATE ADC_OFR2_SSATE_Msk /*!< ADC Signed saturation Enable */ + +#define ADC3_OFR2_OFFSET2_Pos (0U) +#define ADC3_OFR2_OFFSET2_Msk (0xFFFUL << ADC3_OFR2_OFFSET2_Pos) /*!< 0x00000FFF */ +#define ADC3_OFR2_OFFSET2 ADC3_OFR2_OFFSET2_Msk /*!< ADC data offset 2 for channel programmed into bits OFFSET1_CH[4:0] */ + +#define ADC3_OFR2_OFFSETPOS_Pos (24U) +#define ADC3_OFR2_OFFSETPOS_Msk (0x1UL << ADC3_OFR2_OFFSETPOS_Pos) /*!< 0x01000000 */ +#define ADC3_OFR2_OFFSETPOS ADC3_OFR2_OFFSETPOS_Msk /*!< ADC offset number 2 positive */ +#define ADC3_OFR2_SATEN_Pos (25U) +#define ADC3_OFR2_SATEN_Msk (0x1UL << ADC3_OFR2_SATEN_Pos) /*!< 0x02000000 */ +#define ADC3_OFR2_SATEN ADC3_OFR2_SATEN_Msk /*!< ADC offset number 2 saturation enable */ + +#define ADC3_OFR2_OFFSET2_EN_Pos (31U) +#define ADC3_OFR2_OFFSET2_EN_Msk (0x1UL << ADC3_OFR2_OFFSET2_EN_Pos) /*!< 0x80000000 */ +#define ADC3_OFR2_OFFSET2_EN ADC3_OFR2_OFFSET2_EN_Msk /*!< ADC offset number 2 enable */ + +/******************** Bit definition for ADC_OFR3 register ********************/ +#define ADC_OFR3_OFFSET3_Pos (0U) +#define ADC_OFR3_OFFSET3_Msk (0x3FFFFFFUL << ADC_OFR3_OFFSET3_Pos) /*!< 0x03FFFFFF */ +#define ADC_OFR3_OFFSET3 ADC_OFR3_OFFSET3_Msk /*!< ADC data offset 3 for channel programmed into bits OFFSET3_CH[4:0] */ +#define ADC_OFR3_OFFSET3_0 (0x0000001UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000001 */ +#define ADC_OFR3_OFFSET3_1 (0x0000002UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000002 */ +#define ADC_OFR3_OFFSET3_2 (0x0000004UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000004 */ +#define ADC_OFR3_OFFSET3_3 (0x0000008UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000008 */ +#define ADC_OFR3_OFFSET3_4 (0x0000010UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000010 */ +#define ADC_OFR3_OFFSET3_5 (0x0000020UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000020 */ +#define ADC_OFR3_OFFSET3_6 (0x0000040UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000040 */ +#define ADC_OFR3_OFFSET3_7 (0x0000080UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000080 */ +#define ADC_OFR3_OFFSET3_8 (0x0000100UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000100 */ +#define ADC_OFR3_OFFSET3_9 (0x0000200UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000200 */ +#define ADC_OFR3_OFFSET3_10 (0x0000400UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000400 */ +#define ADC_OFR3_OFFSET3_11 (0x0000800UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000800 */ +#define ADC_OFR3_OFFSET3_12 (0x0001000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00001000 */ +#define ADC_OFR3_OFFSET3_13 (0x0002000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00002000 */ +#define ADC_OFR3_OFFSET3_14 (0x0004000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00004000 */ +#define ADC_OFR3_OFFSET3_15 (0x0008000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00008000 */ +#define ADC_OFR3_OFFSET3_16 (0x0010000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00010000 */ +#define ADC_OFR3_OFFSET3_17 (0x0020000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00020000 */ +#define ADC_OFR3_OFFSET3_18 (0x0040000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00040000 */ +#define ADC_OFR3_OFFSET3_19 (0x0080000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00080000 */ +#define ADC_OFR3_OFFSET3_20 (0x0100000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00100000 */ +#define ADC_OFR3_OFFSET3_21 (0x0200000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00200000 */ +#define ADC_OFR3_OFFSET3_22 (0x0400000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00400000 */ +#define ADC_OFR3_OFFSET3_23 (0x0800000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00800000 */ +#define ADC_OFR3_OFFSET3_24 (0x1000000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x01000000 */ +#define ADC_OFR3_OFFSET3_25 (0x2000000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x02000000 */ + +#define ADC_OFR3_OFFSET3_CH_Pos (26U) +#define ADC_OFR3_OFFSET3_CH_Msk (0x1FUL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR3_OFFSET3_CH ADC_OFR3_OFFSET3_CH_Msk /*!< ADC Channel selection for the data offset 3 */ +#define ADC_OFR3_OFFSET3_CH_0 (0x01UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR3_OFFSET3_CH_1 (0x02UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR3_OFFSET3_CH_2 (0x04UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR3_OFFSET3_CH_3 (0x08UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR3_OFFSET3_CH_4 (0x10UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR3_SSATE_Pos (31U) +#define ADC_OFR3_SSATE_Msk (0x1UL << ADC_OFR3_SSATE_Pos) /*!< 0x80000000 */ +#define ADC_OFR3_SSATE ADC_OFR3_SSATE_Msk /*!< ADC Signed saturation Enable */ + +#define ADC3_OFR3_OFFSET3_Pos (0U) +#define ADC3_OFR3_OFFSET3_Msk (0xFFFUL << ADC3_OFR3_OFFSET3_Pos) /*!< 0x00000FFF */ +#define ADC3_OFR3_OFFSET3 ADC3_OFR3_OFFSET3_Msk /*!< ADC data offset 3 for channel programmed into bits OFFSET1_CH[4:0] */ + +#define ADC3_OFR3_OFFSETPOS_Pos (24U) +#define ADC3_OFR3_OFFSETPOS_Msk (0x1UL << ADC3_OFR3_OFFSETPOS_Pos) /*!< 0x01000000 */ +#define ADC3_OFR3_OFFSETPOS ADC3_OFR3_OFFSETPOS_Msk /*!< ADC offset number 3 positive */ +#define ADC3_OFR3_SATEN_Pos (25U) +#define ADC3_OFR3_SATEN_Msk (0x1UL << ADC3_OFR3_SATEN_Pos) /*!< 0x02000000 */ +#define ADC3_OFR3_SATEN ADC3_OFR3_SATEN_Msk /*!< ADC offset number 3 saturation enable */ + +#define ADC3_OFR3_OFFSET3_EN_Pos (31U) +#define ADC3_OFR3_OFFSET3_EN_Msk (0x1UL << ADC3_OFR3_OFFSET3_EN_Pos) /*!< 0x80000000 */ +#define ADC3_OFR3_OFFSET3_EN ADC3_OFR3_OFFSET3_EN_Msk /*!< ADC offset number 3 enable */ + +/******************** Bit definition for ADC_OFR4 register ********************/ +#define ADC_OFR4_OFFSET4_Pos (0U) +#define ADC_OFR4_OFFSET4_Msk (0x3FFFFFFUL << ADC_OFR4_OFFSET4_Pos) /*!< 0x03FFFFFF */ +#define ADC_OFR4_OFFSET4 ADC_OFR4_OFFSET4_Msk /*!< ADC data offset 4 for channel programmed into bits OFFSET4_CH[4:0] */ +#define ADC_OFR4_OFFSET4_0 (0x0000001UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000001 */ +#define ADC_OFR4_OFFSET4_1 (0x0000002UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000002 */ +#define ADC_OFR4_OFFSET4_2 (0x0000004UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000004 */ +#define ADC_OFR4_OFFSET4_3 (0x0000008UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000008 */ +#define ADC_OFR4_OFFSET4_4 (0x0000010UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000010 */ +#define ADC_OFR4_OFFSET4_5 (0x0000020UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000020 */ +#define ADC_OFR4_OFFSET4_6 (0x0000040UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000040 */ +#define ADC_OFR4_OFFSET4_7 (0x0000080UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000080 */ +#define ADC_OFR4_OFFSET4_8 (0x0000100UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000100 */ +#define ADC_OFR4_OFFSET4_9 (0x0000200UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000200 */ +#define ADC_OFR4_OFFSET4_10 (0x0000400UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000400 */ +#define ADC_OFR4_OFFSET4_11 (0x0000800UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000800 */ +#define ADC_OFR4_OFFSET4_12 (0x0001000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00001000 */ +#define ADC_OFR4_OFFSET4_13 (0x0002000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00002000 */ +#define ADC_OFR4_OFFSET4_14 (0x0004000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00004000 */ +#define ADC_OFR4_OFFSET4_15 (0x0008000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00008000 */ +#define ADC_OFR4_OFFSET4_16 (0x0010000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00010000 */ +#define ADC_OFR4_OFFSET4_17 (0x0020000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00020000 */ +#define ADC_OFR4_OFFSET4_18 (0x0040000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00040000 */ +#define ADC_OFR4_OFFSET4_19 (0x0080000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00080000 */ +#define ADC_OFR4_OFFSET4_20 (0x0100000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00100000 */ +#define ADC_OFR4_OFFSET4_21 (0x0200000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00200000 */ +#define ADC_OFR4_OFFSET4_22 (0x0400000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00400000 */ +#define ADC_OFR4_OFFSET4_23 (0x0800000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00800000 */ +#define ADC_OFR4_OFFSET4_24 (0x1000000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x01000000 */ +#define ADC_OFR4_OFFSET4_25 (0x2000000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x02000000 */ + +#define ADC_OFR4_OFFSET4_CH_Pos (26U) +#define ADC_OFR4_OFFSET4_CH_Msk (0x1FUL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR4_OFFSET4_CH ADC_OFR4_OFFSET4_CH_Msk /*!< ADC Channel selection for the data offset 4 */ +#define ADC_OFR4_OFFSET4_CH_0 (0x01UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR4_OFFSET4_CH_1 (0x02UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR4_OFFSET4_CH_2 (0x04UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR4_OFFSET4_CH_3 (0x08UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR4_OFFSET4_CH_4 (0x10UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR4_SSATE_Pos (31U) +#define ADC_OFR4_SSATE_Msk (0x1UL << ADC_OFR4_SSATE_Pos) /*!< 0x80000000 */ +#define ADC_OFR4_SSATE ADC_OFR4_SSATE_Msk /*!< ADC Signed saturation Enable */ + +#define ADC3_OFR4_OFFSET4_Pos (0U) +#define ADC3_OFR4_OFFSET4_Msk (0xFFFUL << ADC3_OFR4_OFFSET4_Pos) /*!< 0x00000FFF */ +#define ADC3_OFR4_OFFSET4 ADC3_OFR4_OFFSET4_Msk /*!< ADC data offset 4 for channel programmed into bits OFFSET1_CH[4:0] */ + +#define ADC3_OFR4_OFFSETPOS_Pos (24U) +#define ADC3_OFR4_OFFSETPOS_Msk (0x1UL << ADC3_OFR4_OFFSETPOS_Pos) /*!< 0x01000000 */ +#define ADC3_OFR4_OFFSETPOS ADC3_OFR4_OFFSETPOS_Msk /*!< ADC offset number 4 positive */ +#define ADC3_OFR4_SATEN_Pos (25U) +#define ADC3_OFR4_SATEN_Msk (0x1UL << ADC3_OFR4_SATEN_Pos) /*!< 0x02000000 */ +#define ADC3_OFR4_SATEN ADC3_OFR4_SATEN_Msk /*!< ADC offset number 4 saturation enable */ + +#define ADC3_OFR4_OFFSET4_EN_Pos (31U) +#define ADC3_OFR4_OFFSET4_EN_Msk (0x1UL << ADC3_OFR4_OFFSET4_EN_Pos) /*!< 0x80000000 */ +#define ADC3_OFR4_OFFSET4_EN ADC3_OFR4_OFFSET4_EN_Msk /*!< ADC offset number 4 enable */ + +/******************** Bit definition for ADC_JDR1 register ********************/ +#define ADC_JDR1_JDATA_Pos (0U) +#define ADC_JDR1_JDATA_Msk (0xFFFFFFFFUL << ADC_JDR1_JDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_JDR1_JDATA ADC_JDR1_JDATA_Msk /*!< ADC Injected DATA */ +#define ADC_JDR1_JDATA_0 (0x00000001UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR1_JDATA_1 (0x00000002UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR1_JDATA_2 (0x00000004UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR1_JDATA_3 (0x00000008UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR1_JDATA_4 (0x00000010UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR1_JDATA_5 (0x00000020UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR1_JDATA_6 (0x00000040UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR1_JDATA_7 (0x00000080UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR1_JDATA_8 (0x00000100UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR1_JDATA_9 (0x00000200UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR1_JDATA_10 (0x00000400UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR1_JDATA_11 (0x00000800UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR1_JDATA_12 (0x00001000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR1_JDATA_13 (0x00002000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR1_JDATA_14 (0x00004000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR1_JDATA_15 (0x00008000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00008000 */ +#define ADC_JDR1_JDATA_16 (0x00010000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00010000 */ +#define ADC_JDR1_JDATA_17 (0x00020000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00020000 */ +#define ADC_JDR1_JDATA_18 (0x00040000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00040000 */ +#define ADC_JDR1_JDATA_19 (0x00080000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00080000 */ +#define ADC_JDR1_JDATA_20 (0x00100000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00100000 */ +#define ADC_JDR1_JDATA_21 (0x00200000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00200000 */ +#define ADC_JDR1_JDATA_22 (0x00400000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00400000 */ +#define ADC_JDR1_JDATA_23 (0x00800000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00800000 */ +#define ADC_JDR1_JDATA_24 (0x01000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x01000000 */ +#define ADC_JDR1_JDATA_25 (0x02000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x02000000 */ +#define ADC_JDR1_JDATA_26 (0x04000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x04000000 */ +#define ADC_JDR1_JDATA_27 (0x08000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x08000000 */ +#define ADC_JDR1_JDATA_28 (0x10000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x10000000 */ +#define ADC_JDR1_JDATA_29 (0x20000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x20000000 */ +#define ADC_JDR1_JDATA_30 (0x40000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x40000000 */ +#define ADC_JDR1_JDATA_31 (0x80000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_JDR2 register ********************/ +#define ADC_JDR2_JDATA_Pos (0U) +#define ADC_JDR2_JDATA_Msk (0xFFFFFFFFUL << ADC_JDR2_JDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_JDR2_JDATA ADC_JDR2_JDATA_Msk /*!< ADC Injected DATA */ +#define ADC_JDR2_JDATA_0 (0x00000001UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR2_JDATA_1 (0x00000002UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR2_JDATA_2 (0x00000004UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR2_JDATA_3 (0x00000008UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR2_JDATA_4 (0x00000010UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR2_JDATA_5 (0x00000020UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR2_JDATA_6 (0x00000040UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR2_JDATA_7 (0x00000080UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR2_JDATA_8 (0x00000100UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR2_JDATA_9 (0x00000200UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR2_JDATA_10 (0x00000400UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR2_JDATA_11 (0x00000800UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR2_JDATA_12 (0x00001000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR2_JDATA_13 (0x00002000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR2_JDATA_14 (0x00004000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR2_JDATA_15 (0x00008000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00008000 */ +#define ADC_JDR2_JDATA_16 (0x00010000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00010000 */ +#define ADC_JDR2_JDATA_17 (0x00020000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00020000 */ +#define ADC_JDR2_JDATA_18 (0x00040000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00040000 */ +#define ADC_JDR2_JDATA_19 (0x00080000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00080000 */ +#define ADC_JDR2_JDATA_20 (0x00100000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00100000 */ +#define ADC_JDR2_JDATA_21 (0x00200000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00200000 */ +#define ADC_JDR2_JDATA_22 (0x00400000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00400000 */ +#define ADC_JDR2_JDATA_23 (0x00800000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00800000 */ +#define ADC_JDR2_JDATA_24 (0x01000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x01000000 */ +#define ADC_JDR2_JDATA_25 (0x02000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x02000000 */ +#define ADC_JDR2_JDATA_26 (0x04000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x04000000 */ +#define ADC_JDR2_JDATA_27 (0x08000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x08000000 */ +#define ADC_JDR2_JDATA_28 (0x10000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x10000000 */ +#define ADC_JDR2_JDATA_29 (0x20000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x20000000 */ +#define ADC_JDR2_JDATA_30 (0x40000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x40000000 */ +#define ADC_JDR2_JDATA_31 (0x80000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_JDR3 register ********************/ +#define ADC_JDR3_JDATA_Pos (0U) +#define ADC_JDR3_JDATA_Msk (0xFFFFFFFFUL << ADC_JDR3_JDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_JDR3_JDATA ADC_JDR3_JDATA_Msk /*!< ADC Injected DATA */ +#define ADC_JDR3_JDATA_0 (0x00000001UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR3_JDATA_1 (0x00000002UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR3_JDATA_2 (0x00000004UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR3_JDATA_3 (0x00000008UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR3_JDATA_4 (0x00000010UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR3_JDATA_5 (0x00000020UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR3_JDATA_6 (0x00000040UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR3_JDATA_7 (0x00000080UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR3_JDATA_8 (0x00000100UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR3_JDATA_9 (0x00000200UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR3_JDATA_10 (0x00000400UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR3_JDATA_11 (0x00000800UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR3_JDATA_12 (0x00001000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR3_JDATA_13 (0x00002000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR3_JDATA_14 (0x00004000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR3_JDATA_15 (0x00008000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00008000 */ +#define ADC_JDR3_JDATA_16 (0x00010000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00010000 */ +#define ADC_JDR3_JDATA_17 (0x00020000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00020000 */ +#define ADC_JDR3_JDATA_18 (0x00040000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00040000 */ +#define ADC_JDR3_JDATA_19 (0x00080000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00080000 */ +#define ADC_JDR3_JDATA_20 (0x00100000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00100000 */ +#define ADC_JDR3_JDATA_21 (0x00200000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00200000 */ +#define ADC_JDR3_JDATA_22 (0x00400000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00400000 */ +#define ADC_JDR3_JDATA_23 (0x00800000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00800000 */ +#define ADC_JDR3_JDATA_24 (0x01000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x01000000 */ +#define ADC_JDR3_JDATA_25 (0x02000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x02000000 */ +#define ADC_JDR3_JDATA_26 (0x04000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x04000000 */ +#define ADC_JDR3_JDATA_27 (0x08000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x08000000 */ +#define ADC_JDR3_JDATA_28 (0x10000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x10000000 */ +#define ADC_JDR3_JDATA_29 (0x20000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x20000000 */ +#define ADC_JDR3_JDATA_30 (0x40000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x40000000 */ +#define ADC_JDR3_JDATA_31 (0x80000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_JDR4 register ********************/ +#define ADC_JDR4_JDATA_Pos (0U) +#define ADC_JDR4_JDATA_Msk (0xFFFFFFFFUL << ADC_JDR4_JDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_JDR4_JDATA ADC_JDR4_JDATA_Msk /*!< ADC Injected DATA */ +#define ADC_JDR4_JDATA_0 (0x00000001UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR4_JDATA_1 (0x00000002UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR4_JDATA_2 (0x00000004UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR4_JDATA_3 (0x00000008UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR4_JDATA_4 (0x00000010UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR4_JDATA_5 (0x00000020UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR4_JDATA_6 (0x00000040UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR4_JDATA_7 (0x00000080UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR4_JDATA_8 (0x00000100UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR4_JDATA_9 (0x00000200UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR4_JDATA_10 (0x00000400UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR4_JDATA_11 (0x00000800UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR4_JDATA_12 (0x00001000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR4_JDATA_13 (0x00002000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR4_JDATA_14 (0x00004000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR4_JDATA_15 (0x00008000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00008000 */ +#define ADC_JDR4_JDATA_16 (0x00010000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00010000 */ +#define ADC_JDR4_JDATA_17 (0x00020000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00020000 */ +#define ADC_JDR4_JDATA_18 (0x00040000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00040000 */ +#define ADC_JDR4_JDATA_19 (0x00080000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00080000 */ +#define ADC_JDR4_JDATA_20 (0x00100000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00100000 */ +#define ADC_JDR4_JDATA_21 (0x00200000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00200000 */ +#define ADC_JDR4_JDATA_22 (0x00400000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00400000 */ +#define ADC_JDR4_JDATA_23 (0x00800000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00800000 */ +#define ADC_JDR4_JDATA_24 (0x01000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x01000000 */ +#define ADC_JDR4_JDATA_25 (0x02000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x02000000 */ +#define ADC_JDR4_JDATA_26 (0x04000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x04000000 */ +#define ADC_JDR4_JDATA_27 (0x08000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x08000000 */ +#define ADC_JDR4_JDATA_28 (0x10000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x10000000 */ +#define ADC_JDR4_JDATA_29 (0x20000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x20000000 */ +#define ADC_JDR4_JDATA_30 (0x40000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x40000000 */ +#define ADC_JDR4_JDATA_31 (0x80000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_AWD2CR register ********************/ +#define ADC_AWD2CR_AWD2CH_Pos (0U) +#define ADC_AWD2CR_AWD2CH_Msk (0xFFFFFUL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x000FFFFF */ +#define ADC_AWD2CR_AWD2CH ADC_AWD2CR_AWD2CH_Msk /*!< ADC Analog watchdog 2 channel selection */ +#define ADC_AWD2CR_AWD2CH_0 (0x00001UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000001 */ +#define ADC_AWD2CR_AWD2CH_1 (0x00002UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000002 */ +#define ADC_AWD2CR_AWD2CH_2 (0x00004UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000004 */ +#define ADC_AWD2CR_AWD2CH_3 (0x00008UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000008 */ +#define ADC_AWD2CR_AWD2CH_4 (0x00010UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000010 */ +#define ADC_AWD2CR_AWD2CH_5 (0x00020UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000020 */ +#define ADC_AWD2CR_AWD2CH_6 (0x00040UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000040 */ +#define ADC_AWD2CR_AWD2CH_7 (0x00080UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000080 */ +#define ADC_AWD2CR_AWD2CH_8 (0x00100UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000100 */ +#define ADC_AWD2CR_AWD2CH_9 (0x00200UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000200 */ +#define ADC_AWD2CR_AWD2CH_10 (0x00400UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000400 */ +#define ADC_AWD2CR_AWD2CH_11 (0x00800UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000800 */ +#define ADC_AWD2CR_AWD2CH_12 (0x01000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00001000 */ +#define ADC_AWD2CR_AWD2CH_13 (0x02000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00002000 */ +#define ADC_AWD2CR_AWD2CH_14 (0x04000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00004000 */ +#define ADC_AWD2CR_AWD2CH_15 (0x08000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00008000 */ +#define ADC_AWD2CR_AWD2CH_16 (0x10000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00010000 */ +#define ADC_AWD2CR_AWD2CH_17 (0x20000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00020000 */ +#define ADC_AWD2CR_AWD2CH_18 (0x40000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00040000 */ +#define ADC_AWD2CR_AWD2CH_19 (0x80000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00080000 */ + +/******************** Bit definition for ADC_AWD3CR register ********************/ +#define ADC_AWD3CR_AWD3CH_Pos (0U) +#define ADC_AWD3CR_AWD3CH_Msk (0xFFFFFUL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x000FFFFF */ +#define ADC_AWD3CR_AWD3CH ADC_AWD3CR_AWD3CH_Msk /*!< ADC Analog watchdog 2 channel selection */ +#define ADC_AWD3CR_AWD3CH_0 (0x00001UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000001 */ +#define ADC_AWD3CR_AWD3CH_1 (0x00002UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000002 */ +#define ADC_AWD3CR_AWD3CH_2 (0x00004UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000004 */ +#define ADC_AWD3CR_AWD3CH_3 (0x00008UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000008 */ +#define ADC_AWD3CR_AWD3CH_4 (0x00010UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000010 */ +#define ADC_AWD3CR_AWD3CH_5 (0x00020UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000020 */ +#define ADC_AWD3CR_AWD3CH_6 (0x00040UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000040 */ +#define ADC_AWD3CR_AWD3CH_7 (0x00080UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000080 */ +#define ADC_AWD3CR_AWD3CH_8 (0x00100UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000100 */ +#define ADC_AWD3CR_AWD3CH_9 (0x00200UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000200 */ +#define ADC_AWD3CR_AWD3CH_10 (0x00400UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000400 */ +#define ADC_AWD3CR_AWD3CH_11 (0x00800UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000800 */ +#define ADC_AWD3CR_AWD3CH_12 (0x01000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00001000 */ +#define ADC_AWD3CR_AWD3CH_13 (0x02000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00002000 */ +#define ADC_AWD3CR_AWD3CH_14 (0x04000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00004000 */ +#define ADC_AWD3CR_AWD3CH_15 (0x08000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00008000 */ +#define ADC_AWD3CR_AWD3CH_16 (0x10000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00010000 */ +#define ADC_AWD3CR_AWD3CH_17 (0x20000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00020000 */ +#define ADC_AWD3CR_AWD3CH_18 (0x40000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00040000 */ +#define ADC_AWD3CR_AWD3CH_19 (0x80000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00080000 */ + +/******************** Bit definition for ADC_DIFSEL register ********************/ +#define ADC_DIFSEL_DIFSEL_Pos (0U) +#define ADC_DIFSEL_DIFSEL_Msk (0xFFFFFUL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x000FFFFF */ +#define ADC_DIFSEL_DIFSEL ADC_DIFSEL_DIFSEL_Msk /*!< ADC differential modes for channels 1 to 18 */ +#define ADC_DIFSEL_DIFSEL_0 (0x00001UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000001 */ +#define ADC_DIFSEL_DIFSEL_1 (0x00002UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000002 */ +#define ADC_DIFSEL_DIFSEL_2 (0x00004UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000004 */ +#define ADC_DIFSEL_DIFSEL_3 (0x00008UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000008 */ +#define ADC_DIFSEL_DIFSEL_4 (0x00010UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000010 */ +#define ADC_DIFSEL_DIFSEL_5 (0x00020UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000020 */ +#define ADC_DIFSEL_DIFSEL_6 (0x00040UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000040 */ +#define ADC_DIFSEL_DIFSEL_7 (0x00080UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000080 */ +#define ADC_DIFSEL_DIFSEL_8 (0x00100UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000100 */ +#define ADC_DIFSEL_DIFSEL_9 (0x00200UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000200 */ +#define ADC_DIFSEL_DIFSEL_10 (0x00400UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000400 */ +#define ADC_DIFSEL_DIFSEL_11 (0x00800UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000800 */ +#define ADC_DIFSEL_DIFSEL_12 (0x01000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00001000 */ +#define ADC_DIFSEL_DIFSEL_13 (0x02000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00002000 */ +#define ADC_DIFSEL_DIFSEL_14 (0x04000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00004000 */ +#define ADC_DIFSEL_DIFSEL_15 (0x08000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00008000 */ +#define ADC_DIFSEL_DIFSEL_16 (0x10000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00010000 */ +#define ADC_DIFSEL_DIFSEL_17 (0x20000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00020000 */ +#define ADC_DIFSEL_DIFSEL_18 (0x40000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00040000 */ +#define ADC_DIFSEL_DIFSEL_19 (0x80000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00080000 */ + +/******************** Bit definition for ADC_CALFACT register ********************/ +#define ADC_CALFACT_CALFACT_S_Pos (0U) +#define ADC_CALFACT_CALFACT_S_Msk (0x7FFUL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x000007FF */ +#define ADC_CALFACT_CALFACT_S ADC_CALFACT_CALFACT_S_Msk /*!< ADC calibration factors in single-ended mode */ +#define ADC_CALFACT_CALFACT_S_0 (0x001UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000001 */ +#define ADC_CALFACT_CALFACT_S_1 (0x002UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000002 */ +#define ADC_CALFACT_CALFACT_S_2 (0x004UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000004 */ +#define ADC_CALFACT_CALFACT_S_3 (0x008UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000008 */ +#define ADC_CALFACT_CALFACT_S_4 (0x010UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000010 */ +#define ADC_CALFACT_CALFACT_S_5 (0x020UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000020 */ +#define ADC_CALFACT_CALFACT_S_6 (0x040UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000040 */ +#define ADC_CALFACT_CALFACT_S_7 (0x080UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000080 */ +#define ADC_CALFACT_CALFACT_S_8 (0x100UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000100 */ +#define ADC_CALFACT_CALFACT_S_9 (0x200UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000200 */ +#define ADC_CALFACT_CALFACT_S_10 (0x400UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000400 */ +#define ADC_CALFACT_CALFACT_D_Pos (16U) +#define ADC_CALFACT_CALFACT_D_Msk (0x7FFUL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x07FF0000 */ +#define ADC_CALFACT_CALFACT_D ADC_CALFACT_CALFACT_D_Msk /*!< ADC calibration factors in differential mode */ +#define ADC_CALFACT_CALFACT_D_0 (0x001UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00010000 */ +#define ADC_CALFACT_CALFACT_D_1 (0x002UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00020000 */ +#define ADC_CALFACT_CALFACT_D_2 (0x004UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00040000 */ +#define ADC_CALFACT_CALFACT_D_3 (0x008UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00080000 */ +#define ADC_CALFACT_CALFACT_D_4 (0x010UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00100000 */ +#define ADC_CALFACT_CALFACT_D_5 (0x020UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00200000 */ +#define ADC_CALFACT_CALFACT_D_6 (0x040UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00400000 */ +#define ADC_CALFACT_CALFACT_D_7 (0x080UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00800000 */ +#define ADC_CALFACT_CALFACT_D_8 (0x100UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x01000000 */ +#define ADC_CALFACT_CALFACT_D_9 (0x200UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x02000000 */ +#define ADC_CALFACT_CALFACT_D_10 (0x400UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x04000000 */ + +/******************** Bit definition for ADC_CALFACT2 register ********************/ +#define ADC_CALFACT2_LINCALFACT_Pos (0U) +#define ADC_CALFACT2_LINCALFACT_Msk (0x3FFFFFFFUL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x3FFFFFFF */ +#define ADC_CALFACT2_LINCALFACT ADC_CALFACT2_LINCALFACT_Msk /*!< ADC Linearity calibration factors */ +#define ADC_CALFACT2_LINCALFACT_0 (0x00000001UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000001 */ +#define ADC_CALFACT2_LINCALFACT_1 (0x00000002UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000002 */ +#define ADC_CALFACT2_LINCALFACT_2 (0x00000004UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000004 */ +#define ADC_CALFACT2_LINCALFACT_3 (0x00000008UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000008 */ +#define ADC_CALFACT2_LINCALFACT_4 (0x00000010UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000010 */ +#define ADC_CALFACT2_LINCALFACT_5 (0x00000020UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000020 */ +#define ADC_CALFACT2_LINCALFACT_6 (0x00000040UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000040 */ +#define ADC_CALFACT2_LINCALFACT_7 (0x00000080UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000080 */ +#define ADC_CALFACT2_LINCALFACT_8 (0x00000100UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000100 */ +#define ADC_CALFACT2_LINCALFACT_9 (0x00000200UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000200 */ +#define ADC_CALFACT2_LINCALFACT_10 (0x00000400UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000400 */ +#define ADC_CALFACT2_LINCALFACT_11 (0x00000800UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000800 */ +#define ADC_CALFACT2_LINCALFACT_12 (0x00001000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00001000 */ +#define ADC_CALFACT2_LINCALFACT_13 (0x00002000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00002000 */ +#define ADC_CALFACT2_LINCALFACT_14 (0x00004000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00004000 */ +#define ADC_CALFACT2_LINCALFACT_15 (0x00008000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00008000 */ +#define ADC_CALFACT2_LINCALFACT_16 (0x00010000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00010000 */ +#define ADC_CALFACT2_LINCALFACT_17 (0x00020000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00020000 */ +#define ADC_CALFACT2_LINCALFACT_18 (0x00040000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00040000 */ +#define ADC_CALFACT2_LINCALFACT_19 (0x00080000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00080000 */ +#define ADC_CALFACT2_LINCALFACT_20 (0x00100000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00100000 */ +#define ADC_CALFACT2_LINCALFACT_21 (0x00200000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00200000 */ +#define ADC_CALFACT2_LINCALFACT_22 (0x00400000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00400000 */ +#define ADC_CALFACT2_LINCALFACT_23 (0x00800000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00800000 */ +#define ADC_CALFACT2_LINCALFACT_24 (0x01000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x01000000 */ +#define ADC_CALFACT2_LINCALFACT_25 (0x02000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x02000000 */ +#define ADC_CALFACT2_LINCALFACT_26 (0x04000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x04000000 */ +#define ADC_CALFACT2_LINCALFACT_27 (0x08000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x08000000 */ +#define ADC_CALFACT2_LINCALFACT_28 (0x10000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x10000000 */ +#define ADC_CALFACT2_LINCALFACT_29 (0x20000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x20000000 */ + +/************************* ADC Common registers *****************************/ +/******************** Bit definition for ADC_CSR register ********************/ +#define ADC_CSR_ADRDY_MST_Pos (0U) +#define ADC_CSR_ADRDY_MST_Msk (0x1UL << ADC_CSR_ADRDY_MST_Pos) /*!< 0x00000001 */ +#define ADC_CSR_ADRDY_MST ADC_CSR_ADRDY_MST_Msk /*!< Master ADC ready */ +#define ADC_CSR_EOSMP_MST_Pos (1U) +#define ADC_CSR_EOSMP_MST_Msk (0x1UL << ADC_CSR_EOSMP_MST_Pos) /*!< 0x00000002 */ +#define ADC_CSR_EOSMP_MST ADC_CSR_EOSMP_MST_Msk /*!< End of sampling phase flag of the master ADC */ +#define ADC_CSR_EOC_MST_Pos (2U) +#define ADC_CSR_EOC_MST_Msk (0x1UL << ADC_CSR_EOC_MST_Pos) /*!< 0x00000004 */ +#define ADC_CSR_EOC_MST ADC_CSR_EOC_MST_Msk /*!< End of regular conversion of the master ADC */ +#define ADC_CSR_EOS_MST_Pos (3U) +#define ADC_CSR_EOS_MST_Msk (0x1UL << ADC_CSR_EOS_MST_Pos) /*!< 0x00000008 */ +#define ADC_CSR_EOS_MST ADC_CSR_EOS_MST_Msk /*!< End of regular sequence flag of the master ADC */ +#define ADC_CSR_OVR_MST_Pos (4U) +#define ADC_CSR_OVR_MST_Msk (0x1UL << ADC_CSR_OVR_MST_Pos) /*!< 0x00000010 */ +#define ADC_CSR_OVR_MST ADC_CSR_OVR_MST_Msk /*!< Overrun flag of the master ADC */ +#define ADC_CSR_JEOC_MST_Pos (5U) +#define ADC_CSR_JEOC_MST_Msk (0x1UL << ADC_CSR_JEOC_MST_Pos) /*!< 0x00000020 */ +#define ADC_CSR_JEOC_MST ADC_CSR_JEOC_MST_Msk /*!< End of injected conversion of the master ADC */ +#define ADC_CSR_JEOS_MST_Pos (6U) +#define ADC_CSR_JEOS_MST_Msk (0x1UL << ADC_CSR_JEOS_MST_Pos) /*!< 0x00000040 */ +#define ADC_CSR_JEOS_MST ADC_CSR_JEOS_MST_Msk /*!< End of injected sequence flag of the master ADC */ +#define ADC_CSR_AWD1_MST_Pos (7U) +#define ADC_CSR_AWD1_MST_Msk (0x1UL << ADC_CSR_AWD1_MST_Pos) /*!< 0x00000080 */ +#define ADC_CSR_AWD1_MST ADC_CSR_AWD1_MST_Msk /*!< Analog watchdog 1 flag of the master ADC */ +#define ADC_CSR_AWD2_MST_Pos (8U) +#define ADC_CSR_AWD2_MST_Msk (0x1UL << ADC_CSR_AWD2_MST_Pos) /*!< 0x00000100 */ +#define ADC_CSR_AWD2_MST ADC_CSR_AWD2_MST_Msk /*!< Analog watchdog 2 flag of the master ADC */ +#define ADC_CSR_AWD3_MST_Pos (9U) +#define ADC_CSR_AWD3_MST_Msk (0x1UL << ADC_CSR_AWD3_MST_Pos) /*!< 0x00000200 */ +#define ADC_CSR_AWD3_MST ADC_CSR_AWD3_MST_Msk /*!< Analog watchdog 3 flag of the master ADC */ +#define ADC_CSR_JQOVF_MST_Pos (10U) +#define ADC_CSR_JQOVF_MST_Msk (0x1UL << ADC_CSR_JQOVF_MST_Pos) /*!< 0x00000400 */ +#define ADC_CSR_JQOVF_MST ADC_CSR_JQOVF_MST_Msk /*!< Injected context queue overflow flag of the master ADC */ +#define ADC_CSR_ADRDY_SLV_Pos (16U) +#define ADC_CSR_ADRDY_SLV_Msk (0x1UL << ADC_CSR_ADRDY_SLV_Pos) /*!< 0x00010000 */ +#define ADC_CSR_ADRDY_SLV ADC_CSR_ADRDY_SLV_Msk /*!< Slave ADC ready */ +#define ADC_CSR_EOSMP_SLV_Pos (17U) +#define ADC_CSR_EOSMP_SLV_Msk (0x1UL << ADC_CSR_EOSMP_SLV_Pos) /*!< 0x00020000 */ +#define ADC_CSR_EOSMP_SLV ADC_CSR_EOSMP_SLV_Msk /*!< End of sampling phase flag of the slave ADC */ +#define ADC_CSR_EOC_SLV_Pos (18U) +#define ADC_CSR_EOC_SLV_Msk (0x1UL << ADC_CSR_EOC_SLV_Pos) /*!< 0x00040000 */ +#define ADC_CSR_EOC_SLV ADC_CSR_EOC_SLV_Msk /*!< End of regular conversion of the slave ADC */ +#define ADC_CSR_EOS_SLV_Pos (19U) +#define ADC_CSR_EOS_SLV_Msk (0x1UL << ADC_CSR_EOS_SLV_Pos) /*!< 0x00080000 */ +#define ADC_CSR_EOS_SLV ADC_CSR_EOS_SLV_Msk /*!< End of regular sequence flag of the slave ADC */ +#define ADC_CSR_OVR_SLV_Pos (20U) +#define ADC_CSR_OVR_SLV_Msk (0x1UL << ADC_CSR_OVR_SLV_Pos) /*!< 0x00100000 */ +#define ADC_CSR_OVR_SLV ADC_CSR_OVR_SLV_Msk /*!< Overrun flag of the slave ADC */ +#define ADC_CSR_JEOC_SLV_Pos (21U) +#define ADC_CSR_JEOC_SLV_Msk (0x1UL << ADC_CSR_JEOC_SLV_Pos) /*!< 0x00200000 */ +#define ADC_CSR_JEOC_SLV ADC_CSR_JEOC_SLV_Msk /*!< End of injected conversion of the slave ADC */ +#define ADC_CSR_JEOS_SLV_Pos (22U) +#define ADC_CSR_JEOS_SLV_Msk (0x1UL << ADC_CSR_JEOS_SLV_Pos) /*!< 0x00400000 */ +#define ADC_CSR_JEOS_SLV ADC_CSR_JEOS_SLV_Msk /*!< End of injected sequence flag of the slave ADC */ +#define ADC_CSR_AWD1_SLV_Pos (23U) +#define ADC_CSR_AWD1_SLV_Msk (0x1UL << ADC_CSR_AWD1_SLV_Pos) /*!< 0x00800000 */ +#define ADC_CSR_AWD1_SLV ADC_CSR_AWD1_SLV_Msk /*!< Analog watchdog 1 flag of the slave ADC */ +#define ADC_CSR_AWD2_SLV_Pos (24U) +#define ADC_CSR_AWD2_SLV_Msk (0x1UL << ADC_CSR_AWD2_SLV_Pos) /*!< 0x01000000 */ +#define ADC_CSR_AWD2_SLV ADC_CSR_AWD2_SLV_Msk /*!< Analog watchdog 2 flag of the slave ADC */ +#define ADC_CSR_AWD3_SLV_Pos (25U) +#define ADC_CSR_AWD3_SLV_Msk (0x1UL << ADC_CSR_AWD3_SLV_Pos) /*!< 0x02000000 */ +#define ADC_CSR_AWD3_SLV ADC_CSR_AWD3_SLV_Msk /*!< Analog watchdog 3 flag of the slave ADC */ +#define ADC_CSR_JQOVF_SLV_Pos (26U) +#define ADC_CSR_JQOVF_SLV_Msk (0x1UL << ADC_CSR_JQOVF_SLV_Pos) /*!< 0x04000000 */ +#define ADC_CSR_JQOVF_SLV ADC_CSR_JQOVF_SLV_Msk /*!< Injected context queue overflow flag of the slave ADC */ + +/******************** Bit definition for ADC_CCR register ********************/ +#define ADC_CCR_DUAL_Pos (0U) +#define ADC_CCR_DUAL_Msk (0x1FUL << ADC_CCR_DUAL_Pos) /*!< 0x0000001F */ +#define ADC_CCR_DUAL ADC_CCR_DUAL_Msk /*!< Dual ADC mode selection */ +#define ADC_CCR_DUAL_0 (0x01UL << ADC_CCR_DUAL_Pos) /*!< 0x00000001 */ +#define ADC_CCR_DUAL_1 (0x02UL << ADC_CCR_DUAL_Pos) /*!< 0x00000002 */ +#define ADC_CCR_DUAL_2 (0x04UL << ADC_CCR_DUAL_Pos) /*!< 0x00000004 */ +#define ADC_CCR_DUAL_3 (0x08UL << ADC_CCR_DUAL_Pos) /*!< 0x00000008 */ +#define ADC_CCR_DUAL_4 (0x10UL << ADC_CCR_DUAL_Pos) /*!< 0x00000010 */ + +#define ADC_CCR_DELAY_Pos (8U) +#define ADC_CCR_DELAY_Msk (0xFUL << ADC_CCR_DELAY_Pos) /*!< 0x00000F00 */ +#define ADC_CCR_DELAY ADC_CCR_DELAY_Msk /*!< Delay between 2 sampling phases */ +#define ADC_CCR_DELAY_0 (0x1UL << ADC_CCR_DELAY_Pos) /*!< 0x00000100 */ +#define ADC_CCR_DELAY_1 (0x2UL << ADC_CCR_DELAY_Pos) /*!< 0x00000200 */ +#define ADC_CCR_DELAY_2 (0x4UL << ADC_CCR_DELAY_Pos) /*!< 0x00000400 */ +#define ADC_CCR_DELAY_3 (0x8UL << ADC_CCR_DELAY_Pos) /*!< 0x00000800 */ + + +#define ADC_CCR_DAMDF_Pos (14U) +#define ADC_CCR_DAMDF_Msk (0x3UL << ADC_CCR_DAMDF_Pos) /*!< 0x0000C000 */ +#define ADC_CCR_DAMDF ADC_CCR_DAMDF_Msk /*!< Dual ADC mode Data format */ +#define ADC_CCR_DAMDF_0 (0x1UL << ADC_CCR_DAMDF_Pos) /*!< 0x00004000 */ +#define ADC_CCR_DAMDF_1 (0x2UL << ADC_CCR_DAMDF_Pos) /*!< 0x00008000 */ + +#define ADC_CCR_CKMODE_Pos (16U) +#define ADC_CCR_CKMODE_Msk (0x3UL << ADC_CCR_CKMODE_Pos) /*!< 0x00030000 */ +#define ADC_CCR_CKMODE ADC_CCR_CKMODE_Msk /*!< ADC clock mode */ +#define ADC_CCR_CKMODE_0 (0x1UL << ADC_CCR_CKMODE_Pos) /*!< 0x00010000 */ +#define ADC_CCR_CKMODE_1 (0x2UL << ADC_CCR_CKMODE_Pos) /*!< 0x00020000 */ + +#define ADC_CCR_PRESC_Pos (18U) +#define ADC_CCR_PRESC_Msk (0xFUL << ADC_CCR_PRESC_Pos) /*!< 0x003C0000 */ +#define ADC_CCR_PRESC ADC_CCR_PRESC_Msk /*!< ADC prescaler */ +#define ADC_CCR_PRESC_0 (0x1UL << ADC_CCR_PRESC_Pos) /*!< 0x00040000 */ +#define ADC_CCR_PRESC_1 (0x2UL << ADC_CCR_PRESC_Pos) /*!< 0x00080000 */ +#define ADC_CCR_PRESC_2 (0x4UL << ADC_CCR_PRESC_Pos) /*!< 0x00100000 */ +#define ADC_CCR_PRESC_3 (0x8UL << ADC_CCR_PRESC_Pos) /*!< 0x00200000 */ + +#define ADC_CCR_VREFEN_Pos (22U) +#define ADC_CCR_VREFEN_Msk (0x1UL << ADC_CCR_VREFEN_Pos) /*!< 0x00400000 */ +#define ADC_CCR_VREFEN ADC_CCR_VREFEN_Msk /*!< VREFINT enable */ +#define ADC_CCR_TSEN_Pos (23U) +#define ADC_CCR_TSEN_Msk (0x1UL << ADC_CCR_TSEN_Pos) /*!< 0x00800000 */ +#define ADC_CCR_TSEN ADC_CCR_TSEN_Msk /*!< Temperature sensor enable */ +#define ADC_CCR_VBATEN_Pos (24U) +#define ADC_CCR_VBATEN_Msk (0x1UL << ADC_CCR_VBATEN_Pos) /*!< 0x01000000 */ +#define ADC_CCR_VBATEN ADC_CCR_VBATEN_Msk /*!< VBAT enable */ + +/******************** Bit definition for ADC_CDR register *******************/ +#define ADC_CDR_RDATA_MST_Pos (0U) +#define ADC_CDR_RDATA_MST_Msk (0xFFFFUL << ADC_CDR_RDATA_MST_Pos) /*!< 0x0000FFFF */ +#define ADC_CDR_RDATA_MST ADC_CDR_RDATA_MST_Msk /*!< ADC multimode master group regular conversion data */ + +#define ADC_CDR_RDATA_SLV_Pos (16U) +#define ADC_CDR_RDATA_SLV_Msk (0xFFFFUL << ADC_CDR_RDATA_SLV_Pos) /*!< 0xFFFF0000 */ +#define ADC_CDR_RDATA_SLV ADC_CDR_RDATA_SLV_Msk /*!< ADC multimode slave group regular conversion data */ + +/******************** Bit definition for ADC_CDR2 register ******************/ +#define ADC_CDR2_RDATA_ALT_Pos (0U) +#define ADC_CDR2_RDATA_ALT_Msk (0xFFFFFFFFUL << ADC_CDR2_RDATA_ALT_Pos) /*!< 0xFFFFFFFF */ +#define ADC_CDR2_RDATA_ALT ADC_CDR2_RDATA_ALT_Msk /*!< Regular data of the master/slave alternated ADCs */ + + +/******************************************************************************/ +/* */ +/* VREFBUF */ +/* */ +/******************************************************************************/ +/******************* Bit definition for VREFBUF_CSR register ****************/ +#define VREFBUF_CSR_ENVR_Pos (0U) +#define VREFBUF_CSR_ENVR_Msk (0x1UL << VREFBUF_CSR_ENVR_Pos) /*!< 0x00000001 */ +#define VREFBUF_CSR_ENVR VREFBUF_CSR_ENVR_Msk /*!*/ +#define DAC_CR_CEN1_Pos (14U) +#define DAC_CR_CEN1_Msk (0x1UL << DAC_CR_CEN1_Pos) /*!< 0x00004000 */ +#define DAC_CR_CEN1 DAC_CR_CEN1_Msk /*!*/ + +#define DAC_CR_EN2_Pos (16U) +#define DAC_CR_EN2_Msk (0x1UL << DAC_CR_EN2_Pos) /*!< 0x00010000 */ +#define DAC_CR_EN2 DAC_CR_EN2_Msk /*!*/ +#define DAC_CR_CEN2_Pos (30U) +#define DAC_CR_CEN2_Msk (0x1UL << DAC_CR_CEN2_Pos) /*!< 0x40000000 */ +#define DAC_CR_CEN2 DAC_CR_CEN2_Msk /*!*/ + +/***************** Bit definition for DAC_SWTRIGR register ******************/ +#define DAC_SWTRIGR_SWTRIG1_Pos (0U) +#define DAC_SWTRIGR_SWTRIG1_Msk (0x1UL << DAC_SWTRIGR_SWTRIG1_Pos) /*!< 0x00000001 */ +#define DAC_SWTRIGR_SWTRIG1 DAC_SWTRIGR_SWTRIG1_Msk /*!
© Copyright (c) 2019 STMicroelectronics. + * All rights reserved.
+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/** @addtogroup CMSIS_Device + * @{ + */ + +/** @addtogroup stm32h730xxQ + * @{ + */ + +#ifndef STM32H730xxQ_H +#define STM32H730xxQ_H + +#ifdef __cplusplus + extern "C" { +#endif /* __cplusplus */ + +/** @addtogroup Peripheral_interrupt_number_definition + * @{ + */ + +/** + * @brief STM32H7XX Interrupt Number Definition, according to the selected device + * in @ref Library_configuration_section + */ +typedef enum +{ +/****** Cortex-M Processor Exceptions Numbers *****************************************************************/ + NonMaskableInt_IRQn = -14, /*!< 2 Non Maskable Interrupt */ + HardFault_IRQn = -13, /*!< 4 Cortex-M Memory Management Interrupt */ + MemoryManagement_IRQn = -12, /*!< 4 Cortex-M Memory Management Interrupt */ + BusFault_IRQn = -11, /*!< 5 Cortex-M Bus Fault Interrupt */ + UsageFault_IRQn = -10, /*!< 6 Cortex-M Usage Fault Interrupt */ + SVCall_IRQn = -5, /*!< 11 Cortex-M SV Call Interrupt */ + DebugMonitor_IRQn = -4, /*!< 12 Cortex-M Debug Monitor Interrupt */ + PendSV_IRQn = -2, /*!< 14 Cortex-M Pend SV Interrupt */ + SysTick_IRQn = -1, /*!< 15 Cortex-M System Tick Interrupt */ +/****** STM32 specific Interrupt Numbers **********************************************************************/ + WWDG_IRQn = 0, /*!< Window WatchDog Interrupt ( wwdg1_it, wwdg2_it) */ + PVD_AVD_IRQn = 1, /*!< PVD/AVD through EXTI Line detection Interrupt */ + TAMP_STAMP_IRQn = 2, /*!< Tamper and TimeStamp interrupts through the EXTI line */ + RTC_WKUP_IRQn = 3, /*!< RTC Wakeup interrupt through the EXTI line */ + FLASH_IRQn = 4, /*!< FLASH global Interrupt */ + RCC_IRQn = 5, /*!< RCC global Interrupt */ + EXTI0_IRQn = 6, /*!< EXTI Line0 Interrupt */ + EXTI1_IRQn = 7, /*!< EXTI Line1 Interrupt */ + EXTI2_IRQn = 8, /*!< EXTI Line2 Interrupt */ + EXTI3_IRQn = 9, /*!< EXTI Line3 Interrupt */ + EXTI4_IRQn = 10, /*!< EXTI Line4 Interrupt */ + DMA1_Stream0_IRQn = 11, /*!< DMA1 Stream 0 global Interrupt */ + DMA1_Stream1_IRQn = 12, /*!< DMA1 Stream 1 global Interrupt */ + DMA1_Stream2_IRQn = 13, /*!< DMA1 Stream 2 global Interrupt */ + DMA1_Stream3_IRQn = 14, /*!< DMA1 Stream 3 global Interrupt */ + DMA1_Stream4_IRQn = 15, /*!< DMA1 Stream 4 global Interrupt */ + DMA1_Stream5_IRQn = 16, /*!< DMA1 Stream 5 global Interrupt */ + DMA1_Stream6_IRQn = 17, /*!< DMA1 Stream 6 global Interrupt */ + ADC_IRQn = 18, /*!< ADC1 and ADC2 global Interrupts */ + FDCAN1_IT0_IRQn = 19, /*!< FDCAN1 Interrupt line 0 */ + FDCAN2_IT0_IRQn = 20, /*!< FDCAN2 Interrupt line 0 */ + FDCAN1_IT1_IRQn = 21, /*!< FDCAN1 Interrupt line 1 */ + FDCAN2_IT1_IRQn = 22, /*!< FDCAN2 Interrupt line 1 */ + EXTI9_5_IRQn = 23, /*!< External Line[9:5] Interrupts */ + TIM1_BRK_IRQn = 24, /*!< TIM1 Break Interrupt */ + TIM1_UP_IRQn = 25, /*!< TIM1 Update Interrupt */ + TIM1_TRG_COM_IRQn = 26, /*!< TIM1 Trigger and Commutation Interrupt */ + TIM1_CC_IRQn = 27, /*!< TIM1 Capture Compare Interrupt */ + TIM2_IRQn = 28, /*!< TIM2 global Interrupt */ + TIM3_IRQn = 29, /*!< TIM3 global Interrupt */ + TIM4_IRQn = 30, /*!< TIM4 global Interrupt */ + I2C1_EV_IRQn = 31, /*!< I2C1 Event Interrupt */ + I2C1_ER_IRQn = 32, /*!< I2C1 Error Interrupt */ + I2C2_EV_IRQn = 33, /*!< I2C2 Event Interrupt */ + I2C2_ER_IRQn = 34, /*!< I2C2 Error Interrupt */ + SPI1_IRQn = 35, /*!< SPI1 global Interrupt */ + SPI2_IRQn = 36, /*!< SPI2 global Interrupt */ + USART1_IRQn = 37, /*!< USART1 global Interrupt */ + USART2_IRQn = 38, /*!< USART2 global Interrupt */ + USART3_IRQn = 39, /*!< USART3 global Interrupt */ + EXTI15_10_IRQn = 40, /*!< External Line[15:10] Interrupts */ + RTC_Alarm_IRQn = 41, /*!< RTC Alarm (A and B) through EXTI Line Interrupt */ + TIM8_BRK_TIM12_IRQn = 43, /*!< TIM8 Break Interrupt and TIM12 global interrupt */ + TIM8_UP_TIM13_IRQn = 44, /*!< TIM8 Update Interrupt and TIM13 global interrupt */ + TIM8_TRG_COM_TIM14_IRQn = 45, /*!< TIM8 Trigger and Commutation Interrupt and TIM14 global interrupt */ + TIM8_CC_IRQn = 46, /*!< TIM8 Capture Compare Interrupt */ + DMA1_Stream7_IRQn = 47, /*!< DMA1 Stream7 Interrupt */ + FMC_IRQn = 48, /*!< FMC global Interrupt */ + SDMMC1_IRQn = 49, /*!< SDMMC1 global Interrupt */ + TIM5_IRQn = 50, /*!< TIM5 global Interrupt */ + SPI3_IRQn = 51, /*!< SPI3 global Interrupt */ + UART4_IRQn = 52, /*!< UART4 global Interrupt */ + UART5_IRQn = 53, /*!< UART5 global Interrupt */ + TIM6_DAC_IRQn = 54, /*!< TIM6 global and DAC1&2 underrun error interrupts */ + TIM7_IRQn = 55, /*!< TIM7 global interrupt */ + DMA2_Stream0_IRQn = 56, /*!< DMA2 Stream 0 global Interrupt */ + DMA2_Stream1_IRQn = 57, /*!< DMA2 Stream 1 global Interrupt */ + DMA2_Stream2_IRQn = 58, /*!< DMA2 Stream 2 global Interrupt */ + DMA2_Stream3_IRQn = 59, /*!< DMA2 Stream 3 global Interrupt */ + DMA2_Stream4_IRQn = 60, /*!< DMA2 Stream 4 global Interrupt */ + ETH_IRQn = 61, /*!< Ethernet global Interrupt */ + ETH_WKUP_IRQn = 62, /*!< Ethernet Wakeup through EXTI line Interrupt */ + FDCAN_CAL_IRQn = 63, /*!< FDCAN Calibration unit Interrupt */ + DMA2_Stream5_IRQn = 68, /*!< DMA2 Stream 5 global interrupt */ + DMA2_Stream6_IRQn = 69, /*!< DMA2 Stream 6 global interrupt */ + DMA2_Stream7_IRQn = 70, /*!< DMA2 Stream 7 global interrupt */ + USART6_IRQn = 71, /*!< USART6 global interrupt */ + I2C3_EV_IRQn = 72, /*!< I2C3 event interrupt */ + I2C3_ER_IRQn = 73, /*!< I2C3 error interrupt */ + OTG_HS_EP1_OUT_IRQn = 74, /*!< USB OTG HS End Point 1 Out global interrupt */ + OTG_HS_EP1_IN_IRQn = 75, /*!< USB OTG HS End Point 1 In global interrupt */ + OTG_HS_WKUP_IRQn = 76, /*!< USB OTG HS Wakeup through EXTI interrupt */ + OTG_HS_IRQn = 77, /*!< USB OTG HS global interrupt */ + DCMI_PSSI_IRQn = 78, /*!< DCMI and PSSI global interrupt */ + CRYP_IRQn = 79, /*!< CRYP crypto global interrupt */ + HASH_RNG_IRQn = 80, /*!< HASH and RNG global interrupt */ + FPU_IRQn = 81, /*!< FPU global interrupt */ + UART7_IRQn = 82, /*!< UART7 global interrupt */ + UART8_IRQn = 83, /*!< UART8 global interrupt */ + SPI4_IRQn = 84, /*!< SPI4 global Interrupt */ + SPI5_IRQn = 85, /*!< SPI5 global Interrupt */ + SPI6_IRQn = 86, /*!< SPI6 global Interrupt */ + SAI1_IRQn = 87, /*!< SAI1 global Interrupt */ + LTDC_IRQn = 88, /*!< LTDC global Interrupt */ + LTDC_ER_IRQn = 89, /*!< LTDC Error global Interrupt */ + DMA2D_IRQn = 90, /*!< DMA2D global Interrupt */ + OCTOSPI1_IRQn = 92, /*!< OCTOSPI1 global interrupt */ + LPTIM1_IRQn = 93, /*!< LP TIM1 interrupt */ + CEC_IRQn = 94, /*!< HDMI-CEC global Interrupt */ + I2C4_EV_IRQn = 95, /*!< I2C4 Event Interrupt */ + I2C4_ER_IRQn = 96, /*!< I2C4 Error Interrupt */ + SPDIF_RX_IRQn = 97, /*!< SPDIF-RX global Interrupt */ + DMAMUX1_OVR_IRQn = 102, /*! + +/** @addtogroup Peripheral_registers_structures + * @{ + */ + +/** + * @brief Analog to Digital Converter + */ + +typedef struct +{ + __IO uint32_t ISR; /*!< ADC Interrupt and Status Register, Address offset: 0x00 */ + __IO uint32_t IER; /*!< ADC Interrupt Enable Register, Address offset: 0x04 */ + __IO uint32_t CR; /*!< ADC control register, Address offset: 0x08 */ + __IO uint32_t CFGR; /*!< ADC Configuration register, Address offset: 0x0C */ + __IO uint32_t CFGR2; /*!< ADC Configuration register 2, Address offset: 0x10 */ + __IO uint32_t SMPR1; /*!< ADC sample time register 1, Address offset: 0x14 */ + __IO uint32_t SMPR2; /*!< ADC sample time register 2, Address offset: 0x18 */ + __IO uint32_t PCSEL_RES0; /*!< Rserved for ADC3, ADC1/2 pre-channel selection, Address offset: 0x1C */ + __IO uint32_t LTR1_TR1; /*!< ADC watchdog Lower threshold register 1, Address offset: 0x20 */ + __IO uint32_t HTR1_TR2; /*!< ADC watchdog higher threshold register 1, Address offset: 0x24 */ + __IO uint32_t RES1_TR3; /*!< Rserved for ADC1/2, ADC3 threshold register, Address offset: 0x28 */ + uint32_t RESERVED2; /*!< Reserved, 0x02C */ + __IO uint32_t SQR1; /*!< ADC regular sequence register 1, Address offset: 0x30 */ + __IO uint32_t SQR2; /*!< ADC regular sequence register 2, Address offset: 0x34 */ + __IO uint32_t SQR3; /*!< ADC regular sequence register 3, Address offset: 0x38 */ + __IO uint32_t SQR4; /*!< ADC regular sequence register 4, Address offset: 0x3C */ + __IO uint32_t DR; /*!< ADC regular data register, Address offset: 0x40 */ + uint32_t RESERVED3; /*!< Reserved, 0x044 */ + uint32_t RESERVED4; /*!< Reserved, 0x048 */ + __IO uint32_t JSQR; /*!< ADC injected sequence register, Address offset: 0x4C */ + uint32_t RESERVED5[4]; /*!< Reserved, 0x050 - 0x05C */ + __IO uint32_t OFR1; /*!< ADC offset register 1, Address offset: 0x60 */ + __IO uint32_t OFR2; /*!< ADC offset register 2, Address offset: 0x64 */ + __IO uint32_t OFR3; /*!< ADC offset register 3, Address offset: 0x68 */ + __IO uint32_t OFR4; /*!< ADC offset register 4, Address offset: 0x6C */ + uint32_t RESERVED6[4]; /*!< Reserved, 0x070 - 0x07C */ + __IO uint32_t JDR1; /*!< ADC injected data register 1, Address offset: 0x80 */ + __IO uint32_t JDR2; /*!< ADC injected data register 2, Address offset: 0x84 */ + __IO uint32_t JDR3; /*!< ADC injected data register 3, Address offset: 0x88 */ + __IO uint32_t JDR4; /*!< ADC injected data register 4, Address offset: 0x8C */ + uint32_t RESERVED7[4]; /*!< Reserved, 0x090 - 0x09C */ + __IO uint32_t AWD2CR; /*!< ADC Analog Watchdog 2 Configuration Register, Address offset: 0xA0 */ + __IO uint32_t AWD3CR; /*!< ADC Analog Watchdog 3 Configuration Register, Address offset: 0xA4 */ + uint32_t RESERVED8; /*!< Reserved, 0x0A8 */ + uint32_t RESERVED9; /*!< Reserved, 0x0AC */ + __IO uint32_t LTR2_DIFSEL; /*!< ADC watchdog Lower threshold register 2, Difsel for ADC3, Address offset: 0xB0 */ + __IO uint32_t HTR2_CALFACT; /*!< ADC watchdog Higher threshold register 2, Calfact for ADC3, Address offset: 0xB4 */ + __IO uint32_t LTR3_RES10; /*!< ADC watchdog Lower threshold register 3, specific ADC1/2, Address offset: 0xB8 */ + __IO uint32_t HTR3_RES11; /*!< ADC watchdog Higher threshold register 3, specific ADC1/2, Address offset: 0xBC */ + __IO uint32_t DIFSEL_RES12; /*!< ADC Differential Mode Selection Register specific ADC1/2, Address offset: 0xC0 */ + __IO uint32_t CALFACT_RES13; /*!< ADC Calibration Factors specific ADC1/2, Address offset: 0xC4 */ + __IO uint32_t CALFACT2_RES14; /*!< ADC Linearity Calibration Factors specific ADC1/2, Address offset: 0xC8 */ +} ADC_TypeDef; + + +typedef struct +{ +__IO uint32_t CSR; /*!< ADC Common status register, Address offset: ADC1/3 base address + 0x300 */ +uint32_t RESERVED; /*!< Reserved, ADC1/3 base address + 0x304 */ +__IO uint32_t CCR; /*!< ADC common control register, Address offset: ADC1/3 base address + 0x308 */ +__IO uint32_t CDR; /*!< ADC common regular data register for dual Address offset: ADC1/3 base address + 0x30C */ +__IO uint32_t CDR2; /*!< ADC common regular data register for 32-bit dual mode Address offset: ADC1/3 base address + 0x310 */ + +} ADC_Common_TypeDef; + + +/** + * @brief VREFBUF + */ + +typedef struct +{ + __IO uint32_t CSR; /*!< VREFBUF control and status register, Address offset: 0x00 */ + __IO uint32_t CCR; /*!< VREFBUF calibration and control register, Address offset: 0x04 */ +} VREFBUF_TypeDef; + + +/** + * @brief FD Controller Area Network + */ + +typedef struct +{ + __IO uint32_t CREL; /*!< FDCAN Core Release register, Address offset: 0x000 */ + __IO uint32_t ENDN; /*!< FDCAN Endian register, Address offset: 0x004 */ + __IO uint32_t RESERVED1; /*!< Reserved, 0x008 */ + __IO uint32_t DBTP; /*!< FDCAN Data Bit Timing & Prescaler register, Address offset: 0x00C */ + __IO uint32_t TEST; /*!< FDCAN Test register, Address offset: 0x010 */ + __IO uint32_t RWD; /*!< FDCAN RAM Watchdog register, Address offset: 0x014 */ + __IO uint32_t CCCR; /*!< FDCAN CC Control register, Address offset: 0x018 */ + __IO uint32_t NBTP; /*!< FDCAN Nominal Bit Timing & Prescaler register, Address offset: 0x01C */ + __IO uint32_t TSCC; /*!< FDCAN Timestamp Counter Configuration register, Address offset: 0x020 */ + __IO uint32_t TSCV; /*!< FDCAN Timestamp Counter Value register, Address offset: 0x024 */ + __IO uint32_t TOCC; /*!< FDCAN Timeout Counter Configuration register, Address offset: 0x028 */ + __IO uint32_t TOCV; /*!< FDCAN Timeout Counter Value register, Address offset: 0x02C */ + __IO uint32_t RESERVED2[4]; /*!< Reserved, 0x030 - 0x03C */ + __IO uint32_t ECR; /*!< FDCAN Error Counter register, Address offset: 0x040 */ + __IO uint32_t PSR; /*!< FDCAN Protocol Status register, Address offset: 0x044 */ + __IO uint32_t TDCR; /*!< FDCAN Transmitter Delay Compensation register, Address offset: 0x048 */ + __IO uint32_t RESERVED3; /*!< Reserved, 0x04C */ + __IO uint32_t IR; /*!< FDCAN Interrupt register, Address offset: 0x050 */ + __IO uint32_t IE; /*!< FDCAN Interrupt Enable register, Address offset: 0x054 */ + __IO uint32_t ILS; /*!< FDCAN Interrupt Line Select register, Address offset: 0x058 */ + __IO uint32_t ILE; /*!< FDCAN Interrupt Line Enable register, Address offset: 0x05C */ + __IO uint32_t RESERVED4[8]; /*!< Reserved, 0x060 - 0x07C */ + __IO uint32_t GFC; /*!< FDCAN Global Filter Configuration register, Address offset: 0x080 */ + __IO uint32_t SIDFC; /*!< FDCAN Standard ID Filter Configuration register, Address offset: 0x084 */ + __IO uint32_t XIDFC; /*!< FDCAN Extended ID Filter Configuration register, Address offset: 0x088 */ + __IO uint32_t RESERVED5; /*!< Reserved, 0x08C */ + __IO uint32_t XIDAM; /*!< FDCAN Extended ID AND Mask register, Address offset: 0x090 */ + __IO uint32_t HPMS; /*!< FDCAN High Priority Message Status register, Address offset: 0x094 */ + __IO uint32_t NDAT1; /*!< FDCAN New Data 1 register, Address offset: 0x098 */ + __IO uint32_t NDAT2; /*!< FDCAN New Data 2 register, Address offset: 0x09C */ + __IO uint32_t RXF0C; /*!< FDCAN Rx FIFO 0 Configuration register, Address offset: 0x0A0 */ + __IO uint32_t RXF0S; /*!< FDCAN Rx FIFO 0 Status register, Address offset: 0x0A4 */ + __IO uint32_t RXF0A; /*!< FDCAN Rx FIFO 0 Acknowledge register, Address offset: 0x0A8 */ + __IO uint32_t RXBC; /*!< FDCAN Rx Buffer Configuration register, Address offset: 0x0AC */ + __IO uint32_t RXF1C; /*!< FDCAN Rx FIFO 1 Configuration register, Address offset: 0x0B0 */ + __IO uint32_t RXF1S; /*!< FDCAN Rx FIFO 1 Status register, Address offset: 0x0B4 */ + __IO uint32_t RXF1A; /*!< FDCAN Rx FIFO 1 Acknowledge register, Address offset: 0x0B8 */ + __IO uint32_t RXESC; /*!< FDCAN Rx Buffer/FIFO Element Size Configuration register, Address offset: 0x0BC */ + __IO uint32_t TXBC; /*!< FDCAN Tx Buffer Configuration register, Address offset: 0x0C0 */ + __IO uint32_t TXFQS; /*!< FDCAN Tx FIFO/Queue Status register, Address offset: 0x0C4 */ + __IO uint32_t TXESC; /*!< FDCAN Tx Buffer Element Size Configuration register, Address offset: 0x0C8 */ + __IO uint32_t TXBRP; /*!< FDCAN Tx Buffer Request Pending register, Address offset: 0x0CC */ + __IO uint32_t TXBAR; /*!< FDCAN Tx Buffer Add Request register, Address offset: 0x0D0 */ + __IO uint32_t TXBCR; /*!< FDCAN Tx Buffer Cancellation Request register, Address offset: 0x0D4 */ + __IO uint32_t TXBTO; /*!< FDCAN Tx Buffer Transmission Occurred register, Address offset: 0x0D8 */ + __IO uint32_t TXBCF; /*!< FDCAN Tx Buffer Cancellation Finished register, Address offset: 0x0DC */ + __IO uint32_t TXBTIE; /*!< FDCAN Tx Buffer Transmission Interrupt Enable register, Address offset: 0x0E0 */ + __IO uint32_t TXBCIE; /*!< FDCAN Tx Buffer Cancellation Finished Interrupt Enable register, Address offset: 0x0E4 */ + __IO uint32_t RESERVED6[2]; /*!< Reserved, 0x0E8 - 0x0EC */ + __IO uint32_t TXEFC; /*!< FDCAN Tx Event FIFO Configuration register, Address offset: 0x0F0 */ + __IO uint32_t TXEFS; /*!< FDCAN Tx Event FIFO Status register, Address offset: 0x0F4 */ + __IO uint32_t TXEFA; /*!< FDCAN Tx Event FIFO Acknowledge register, Address offset: 0x0F8 */ + __IO uint32_t RESERVED7; /*!< Reserved, 0x0FC */ +} FDCAN_GlobalTypeDef; + +/** + * @brief TTFD Controller Area Network + */ + +typedef struct +{ + __IO uint32_t TTTMC; /*!< TT Trigger Memory Configuration register, Address offset: 0x100 */ + __IO uint32_t TTRMC; /*!< TT Reference Message Configuration register, Address offset: 0x104 */ + __IO uint32_t TTOCF; /*!< TT Operation Configuration register, Address offset: 0x108 */ + __IO uint32_t TTMLM; /*!< TT Matrix Limits register, Address offset: 0x10C */ + __IO uint32_t TURCF; /*!< TUR Configuration register, Address offset: 0x110 */ + __IO uint32_t TTOCN; /*!< TT Operation Control register, Address offset: 0x114 */ + __IO uint32_t TTGTP; /*!< TT Global Time Preset register, Address offset: 0x118 */ + __IO uint32_t TTTMK; /*!< TT Time Mark register, Address offset: 0x11C */ + __IO uint32_t TTIR; /*!< TT Interrupt register, Address offset: 0x120 */ + __IO uint32_t TTIE; /*!< TT Interrupt Enable register, Address offset: 0x124 */ + __IO uint32_t TTILS; /*!< TT Interrupt Line Select register, Address offset: 0x128 */ + __IO uint32_t TTOST; /*!< TT Operation Status register, Address offset: 0x12C */ + __IO uint32_t TURNA; /*!< TT TUR Numerator Actual register, Address offset: 0x130 */ + __IO uint32_t TTLGT; /*!< TT Local and Global Time register, Address offset: 0x134 */ + __IO uint32_t TTCTC; /*!< TT Cycle Time and Count register, Address offset: 0x138 */ + __IO uint32_t TTCPT; /*!< TT Capture Time register, Address offset: 0x13C */ + __IO uint32_t TTCSM; /*!< TT Cycle Sync Mark register, Address offset: 0x140 */ + __IO uint32_t RESERVED1[111]; /*!< Reserved, 0x144 - 0x2FC */ + __IO uint32_t TTTS; /*!< TT Trigger Select register, Address offset: 0x300 */ +} TTCAN_TypeDef; + +/** + * @brief FD Controller Area Network + */ + +typedef struct +{ + __IO uint32_t CREL; /*!< Clock Calibration Unit Core Release register, Address offset: 0x00 */ + __IO uint32_t CCFG; /*!< Calibration Configuration register, Address offset: 0x04 */ + __IO uint32_t CSTAT; /*!< Calibration Status register, Address offset: 0x08 */ + __IO uint32_t CWD; /*!< Calibration Watchdog register, Address offset: 0x0C */ + __IO uint32_t IR; /*!< CCU Interrupt register, Address offset: 0x10 */ + __IO uint32_t IE; /*!< CCU Interrupt Enable register, Address offset: 0x14 */ +} FDCAN_ClockCalibrationUnit_TypeDef; + + +/** + * @brief Consumer Electronics Control + */ + +typedef struct +{ + __IO uint32_t CR; /*!< CEC control register, Address offset:0x00 */ + __IO uint32_t CFGR; /*!< CEC configuration register, Address offset:0x04 */ + __IO uint32_t TXDR; /*!< CEC Tx data register , Address offset:0x08 */ + __IO uint32_t RXDR; /*!< CEC Rx Data Register, Address offset:0x0C */ + __IO uint32_t ISR; /*!< CEC Interrupt and Status Register, Address offset:0x10 */ + __IO uint32_t IER; /*!< CEC interrupt enable register, Address offset:0x14 */ +}CEC_TypeDef; + +/** + * @brief COordincate Rotation DIgital Computer + */ +typedef struct +{ + __IO uint32_t CSR; /*!< CORDIC control and status register, Address offset: 0x00 */ + __IO uint32_t WDATA; /*!< CORDIC argument register, Address offset: 0x04 */ + __IO uint32_t RDATA; /*!< CORDIC result register, Address offset: 0x08 */ +} CORDIC_TypeDef; + +/** + * @brief CRC calculation unit + */ + +typedef struct +{ + __IO uint32_t DR; /*!< CRC Data register, Address offset: 0x00 */ + __IO uint32_t IDR; /*!< CRC Independent data register, Address offset: 0x04 */ + __IO uint32_t CR; /*!< CRC Control register, Address offset: 0x08 */ + uint32_t RESERVED2; /*!< Reserved, 0x0C */ + __IO uint32_t INIT; /*!< Initial CRC value register, Address offset: 0x10 */ + __IO uint32_t POL; /*!< CRC polynomial register, Address offset: 0x14 */ +} CRC_TypeDef; + + +/** + * @brief Clock Recovery System + */ +typedef struct +{ +__IO uint32_t CR; /*!< CRS ccontrol register, Address offset: 0x00 */ +__IO uint32_t CFGR; /*!< CRS configuration register, Address offset: 0x04 */ +__IO uint32_t ISR; /*!< CRS interrupt and status register, Address offset: 0x08 */ +__IO uint32_t ICR; /*!< CRS interrupt flag clear register, Address offset: 0x0C */ +} CRS_TypeDef; + + +/** + * @brief Digital to Analog Converter + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DAC control register, Address offset: 0x00 */ + __IO uint32_t SWTRIGR; /*!< DAC software trigger register, Address offset: 0x04 */ + __IO uint32_t DHR12R1; /*!< DAC channel1 12-bit right-aligned data holding register, Address offset: 0x08 */ + __IO uint32_t DHR12L1; /*!< DAC channel1 12-bit left aligned data holding register, Address offset: 0x0C */ + __IO uint32_t DHR8R1; /*!< DAC channel1 8-bit right aligned data holding register, Address offset: 0x10 */ + __IO uint32_t DHR12R2; /*!< DAC channel2 12-bit right aligned data holding register, Address offset: 0x14 */ + __IO uint32_t DHR12L2; /*!< DAC channel2 12-bit left aligned data holding register, Address offset: 0x18 */ + __IO uint32_t DHR8R2; /*!< DAC channel2 8-bit right-aligned data holding register, Address offset: 0x1C */ + __IO uint32_t DHR12RD; /*!< Dual DAC 12-bit right-aligned data holding register, Address offset: 0x20 */ + __IO uint32_t DHR12LD; /*!< DUAL DAC 12-bit left aligned data holding register, Address offset: 0x24 */ + __IO uint32_t DHR8RD; /*!< DUAL DAC 8-bit right aligned data holding register, Address offset: 0x28 */ + __IO uint32_t DOR1; /*!< DAC channel1 data output register, Address offset: 0x2C */ + __IO uint32_t DOR2; /*!< DAC channel2 data output register, Address offset: 0x30 */ + __IO uint32_t SR; /*!< DAC status register, Address offset: 0x34 */ + __IO uint32_t CCR; /*!< DAC calibration control register, Address offset: 0x38 */ + __IO uint32_t MCR; /*!< DAC mode control register, Address offset: 0x3C */ + __IO uint32_t SHSR1; /*!< DAC Sample and Hold sample time register 1, Address offset: 0x40 */ + __IO uint32_t SHSR2; /*!< DAC Sample and Hold sample time register 2, Address offset: 0x44 */ + __IO uint32_t SHHR; /*!< DAC Sample and Hold hold time register, Address offset: 0x48 */ + __IO uint32_t SHRR; /*!< DAC Sample and Hold refresh time register, Address offset: 0x4C */ +} DAC_TypeDef; + +/** + * @brief DFSDM module registers + */ +typedef struct +{ + __IO uint32_t FLTCR1; /*!< DFSDM control register1, Address offset: 0x100 */ + __IO uint32_t FLTCR2; /*!< DFSDM control register2, Address offset: 0x104 */ + __IO uint32_t FLTISR; /*!< DFSDM interrupt and status register, Address offset: 0x108 */ + __IO uint32_t FLTICR; /*!< DFSDM interrupt flag clear register, Address offset: 0x10C */ + __IO uint32_t FLTJCHGR; /*!< DFSDM injected channel group selection register, Address offset: 0x110 */ + __IO uint32_t FLTFCR; /*!< DFSDM filter control register, Address offset: 0x114 */ + __IO uint32_t FLTJDATAR; /*!< DFSDM data register for injected group, Address offset: 0x118 */ + __IO uint32_t FLTRDATAR; /*!< DFSDM data register for regular group, Address offset: 0x11C */ + __IO uint32_t FLTAWHTR; /*!< DFSDM analog watchdog high threshold register, Address offset: 0x120 */ + __IO uint32_t FLTAWLTR; /*!< DFSDM analog watchdog low threshold register, Address offset: 0x124 */ + __IO uint32_t FLTAWSR; /*!< DFSDM analog watchdog status register Address offset: 0x128 */ + __IO uint32_t FLTAWCFR; /*!< DFSDM analog watchdog clear flag register Address offset: 0x12C */ + __IO uint32_t FLTEXMAX; /*!< DFSDM extreme detector maximum register, Address offset: 0x130 */ + __IO uint32_t FLTEXMIN; /*!< DFSDM extreme detector minimum register Address offset: 0x134 */ + __IO uint32_t FLTCNVTIMR; /*!< DFSDM conversion timer, Address offset: 0x138 */ +} DFSDM_Filter_TypeDef; + +/** + * @brief DFSDM channel configuration registers + */ +typedef struct +{ + __IO uint32_t CHCFGR1; /*!< DFSDM channel configuration register1, Address offset: 0x00 */ + __IO uint32_t CHCFGR2; /*!< DFSDM channel configuration register2, Address offset: 0x04 */ + __IO uint32_t CHAWSCDR; /*!< DFSDM channel analog watchdog and + short circuit detector register, Address offset: 0x08 */ + __IO uint32_t CHWDATAR; /*!< DFSDM channel watchdog filter data register, Address offset: 0x0C */ + __IO uint32_t CHDATINR; /*!< DFSDM channel data input register, Address offset: 0x10 */ +} DFSDM_Channel_TypeDef; + +/** + * @brief Debug MCU + */ +typedef struct +{ + __IO uint32_t IDCODE; /*!< MCU device ID code, Address offset: 0x00 */ + __IO uint32_t CR; /*!< Debug MCU configuration register, Address offset: 0x04 */ + uint32_t RESERVED4[11]; /*!< Reserved, Address offset: 0x08 */ + __IO uint32_t APB3FZ1; /*!< Debug MCU APB3FZ1 freeze register, Address offset: 0x34 */ + uint32_t RESERVED5; /*!< Reserved, Address offset: 0x38 */ + __IO uint32_t APB1LFZ1; /*!< Debug MCU APB1LFZ1 freeze register, Address offset: 0x3C */ + uint32_t RESERVED6; /*!< Reserved, Address offset: 0x40 */ + __IO uint32_t APB1HFZ1; /*!< Debug MCU APB1LFZ1 freeze register, Address offset: 0x44 */ + uint32_t RESERVED7; /*!< Reserved, Address offset: 0x48 */ + __IO uint32_t APB2FZ1; /*!< Debug MCU APB2FZ1 freeze register, Address offset: 0x4C */ + uint32_t RESERVED8; /*!< Reserved, Address offset: 0x50 */ + __IO uint32_t APB4FZ1; /*!< Debug MCU APB4FZ1 freeze register, Address offset: 0x54 */ + __IO uint32_t RESERVED9[990]; /*!< Reserved, Address offset: 0x58-0xFCC */ + __IO uint32_t PIDR4; /*!< Debug MCU peripheral identity register 4, Address offset: 0xFD0 */ + __IO uint32_t RESERVED10[3];/*!< Reserved, Address offset: 0xFD4-0xFDC */ + __IO uint32_t PIDR0; /*!< Debug MCU peripheral identity register 0, Address offset: 0xFE0 */ + __IO uint32_t PIDR1; /*!< Debug MCU peripheral identity register 1, Address offset: 0xFE4 */ + __IO uint32_t PIDR2; /*!< Debug MCU peripheral identity register 2, Address offset: 0xFE8 */ + __IO uint32_t PIDR3; /*!< Debug MCU peripheral identity register 3, Address offset: 0xFEC */ + __IO uint32_t CIDR0; /*!< Debug MCU component identity register 0, Address offset: 0xFF0 */ + __IO uint32_t CIDR1; /*!< Debug MCU component identity register 1, Address offset: 0xFF4 */ + __IO uint32_t CIDR2; /*!< Debug MCU component identity register 2, Address offset: 0xFF8 */ + __IO uint32_t CIDR3; /*!< Debug MCU component identity register 3, Address offset: 0xFFC */ +}DBGMCU_TypeDef; +/** + * @brief DCMI + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DCMI control register 1, Address offset: 0x00 */ + __IO uint32_t SR; /*!< DCMI status register, Address offset: 0x04 */ + __IO uint32_t RISR; /*!< DCMI raw interrupt status register, Address offset: 0x08 */ + __IO uint32_t IER; /*!< DCMI interrupt enable register, Address offset: 0x0C */ + __IO uint32_t MISR; /*!< DCMI masked interrupt status register, Address offset: 0x10 */ + __IO uint32_t ICR; /*!< DCMI interrupt clear register, Address offset: 0x14 */ + __IO uint32_t ESCR; /*!< DCMI embedded synchronization code register, Address offset: 0x18 */ + __IO uint32_t ESUR; /*!< DCMI embedded synchronization unmask register, Address offset: 0x1C */ + __IO uint32_t CWSTRTR; /*!< DCMI crop window start, Address offset: 0x20 */ + __IO uint32_t CWSIZER; /*!< DCMI crop window size, Address offset: 0x24 */ + __IO uint32_t DR; /*!< DCMI data register, Address offset: 0x28 */ +} DCMI_TypeDef; + +/** + * @brief PSSI + */ + +typedef struct +{ + __IO uint32_t CR; /*!< PSSI control register 1, Address offset: 0x000 */ + __IO uint32_t SR; /*!< PSSI status register, Address offset: 0x004 */ + __IO uint32_t RIS; /*!< PSSI raw interrupt status register, Address offset: 0x008 */ + __IO uint32_t IER; /*!< PSSI interrupt enable register, Address offset: 0x00C */ + __IO uint32_t MIS; /*!< PSSI masked interrupt status register, Address offset: 0x010 */ + __IO uint32_t ICR; /*!< PSSI interrupt clear register, Address offset: 0x014 */ + __IO uint32_t RESERVED1[4]; /*!< Reserved, 0x018 - 0x024 */ + __IO uint32_t DR; /*!< PSSI data register, Address offset: 0x028 */ + __IO uint32_t RESERVED2[241]; /*!< Reserved, 0x02C - 0x3EC */ + __IO uint32_t HWCFGR; /*!< PSSI IP HW configuration register, Address offset: 0x3F0 */ + __IO uint32_t VERR; /*!< PSSI IP version register, Address offset: 0x3F4 */ + __IO uint32_t IPIDR; /*!< PSSI IP ID register, Address offset: 0x3F8 */ + __IO uint32_t SIDR; /*!< PSSI SIZE ID register, Address offset: 0x3FC */ +} PSSI_TypeDef; + +/** + * @brief DMA Controller + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DMA stream x configuration register */ + __IO uint32_t NDTR; /*!< DMA stream x number of data register */ + __IO uint32_t PAR; /*!< DMA stream x peripheral address register */ + __IO uint32_t M0AR; /*!< DMA stream x memory 0 address register */ + __IO uint32_t M1AR; /*!< DMA stream x memory 1 address register */ + __IO uint32_t FCR; /*!< DMA stream x FIFO control register */ +} DMA_Stream_TypeDef; + +typedef struct +{ + __IO uint32_t LISR; /*!< DMA low interrupt status register, Address offset: 0x00 */ + __IO uint32_t HISR; /*!< DMA high interrupt status register, Address offset: 0x04 */ + __IO uint32_t LIFCR; /*!< DMA low interrupt flag clear register, Address offset: 0x08 */ + __IO uint32_t HIFCR; /*!< DMA high interrupt flag clear register, Address offset: 0x0C */ +} DMA_TypeDef; + +typedef struct +{ + __IO uint32_t CCR; /*!< DMA channel x configuration register */ + __IO uint32_t CNDTR; /*!< DMA channel x number of data register */ + __IO uint32_t CPAR; /*!< DMA channel x peripheral address register */ + __IO uint32_t CM0AR; /*!< DMA channel x memory 0 address register */ + __IO uint32_t CM1AR; /*!< DMA channel x memory 1 address register */ +} BDMA_Channel_TypeDef; + +typedef struct +{ + __IO uint32_t ISR; /*!< DMA interrupt status register, Address offset: 0x00 */ + __IO uint32_t IFCR; /*!< DMA interrupt flag clear register, Address offset: 0x04 */ +} BDMA_TypeDef; + +typedef struct +{ + __IO uint32_t CCR; /*!< DMA Multiplexer Channel x Control Register */ +}DMAMUX_Channel_TypeDef; + +typedef struct +{ + __IO uint32_t CSR; /*!< DMA Channel Status Register */ + __IO uint32_t CFR; /*!< DMA Channel Clear Flag Register */ +}DMAMUX_ChannelStatus_TypeDef; + +typedef struct +{ + __IO uint32_t RGCR; /*!< DMA Request Generator x Control Register */ +}DMAMUX_RequestGen_TypeDef; + +typedef struct +{ + __IO uint32_t RGSR; /*!< DMA Request Generator Status Register */ + __IO uint32_t RGCFR; /*!< DMA Request Generator Clear Flag Register */ +}DMAMUX_RequestGenStatus_TypeDef; + +/** + * @brief MDMA Controller + */ +typedef struct +{ + __IO uint32_t GISR0; /*!< MDMA Global Interrupt/Status Register 0, Address offset: 0x00 */ +}MDMA_TypeDef; + +typedef struct +{ + __IO uint32_t CISR; /*!< MDMA channel x interrupt/status register, Address offset: 0x40 */ + __IO uint32_t CIFCR; /*!< MDMA channel x interrupt flag clear register, Address offset: 0x44 */ + __IO uint32_t CESR; /*!< MDMA Channel x error status register, Address offset: 0x48 */ + __IO uint32_t CCR; /*!< MDMA channel x control register, Address offset: 0x4C */ + __IO uint32_t CTCR; /*!< MDMA channel x Transfer Configuration register, Address offset: 0x50 */ + __IO uint32_t CBNDTR; /*!< MDMA Channel x block number of data register, Address offset: 0x54 */ + __IO uint32_t CSAR; /*!< MDMA channel x source address register, Address offset: 0x58 */ + __IO uint32_t CDAR; /*!< MDMA channel x destination address register, Address offset: 0x5C */ + __IO uint32_t CBRUR; /*!< MDMA channel x Block Repeat address Update register, Address offset: 0x60 */ + __IO uint32_t CLAR; /*!< MDMA channel x Link Address register, Address offset: 0x64 */ + __IO uint32_t CTBR; /*!< MDMA channel x Trigger and Bus selection Register, Address offset: 0x68 */ + uint32_t RESERVED0; /*!< Reserved, 0x68 */ + __IO uint32_t CMAR; /*!< MDMA channel x Mask address register, Address offset: 0x70 */ + __IO uint32_t CMDR; /*!< MDMA channel x Mask Data register, Address offset: 0x74 */ +}MDMA_Channel_TypeDef; + +/** + * @brief DMA2D Controller + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DMA2D Control Register, Address offset: 0x00 */ + __IO uint32_t ISR; /*!< DMA2D Interrupt Status Register, Address offset: 0x04 */ + __IO uint32_t IFCR; /*!< DMA2D Interrupt Flag Clear Register, Address offset: 0x08 */ + __IO uint32_t FGMAR; /*!< DMA2D Foreground Memory Address Register, Address offset: 0x0C */ + __IO uint32_t FGOR; /*!< DMA2D Foreground Offset Register, Address offset: 0x10 */ + __IO uint32_t BGMAR; /*!< DMA2D Background Memory Address Register, Address offset: 0x14 */ + __IO uint32_t BGOR; /*!< DMA2D Background Offset Register, Address offset: 0x18 */ + __IO uint32_t FGPFCCR; /*!< DMA2D Foreground PFC Control Register, Address offset: 0x1C */ + __IO uint32_t FGCOLR; /*!< DMA2D Foreground Color Register, Address offset: 0x20 */ + __IO uint32_t BGPFCCR; /*!< DMA2D Background PFC Control Register, Address offset: 0x24 */ + __IO uint32_t BGCOLR; /*!< DMA2D Background Color Register, Address offset: 0x28 */ + __IO uint32_t FGCMAR; /*!< DMA2D Foreground CLUT Memory Address Register, Address offset: 0x2C */ + __IO uint32_t BGCMAR; /*!< DMA2D Background CLUT Memory Address Register, Address offset: 0x30 */ + __IO uint32_t OPFCCR; /*!< DMA2D Output PFC Control Register, Address offset: 0x34 */ + __IO uint32_t OCOLR; /*!< DMA2D Output Color Register, Address offset: 0x38 */ + __IO uint32_t OMAR; /*!< DMA2D Output Memory Address Register, Address offset: 0x3C */ + __IO uint32_t OOR; /*!< DMA2D Output Offset Register, Address offset: 0x40 */ + __IO uint32_t NLR; /*!< DMA2D Number of Line Register, Address offset: 0x44 */ + __IO uint32_t LWR; /*!< DMA2D Line Watermark Register, Address offset: 0x48 */ + __IO uint32_t AMTCR; /*!< DMA2D AHB Master Timer Configuration Register, Address offset: 0x4C */ + uint32_t RESERVED[236]; /*!< Reserved, 0x50-0x3FF */ + __IO uint32_t FGCLUT[256]; /*!< DMA2D Foreground CLUT, Address offset:400-7FF */ + __IO uint32_t BGCLUT[256]; /*!< DMA2D Background CLUT, Address offset:800-BFF */ +} DMA2D_TypeDef; + + +/** + * @brief Ethernet MAC + */ +typedef struct +{ + __IO uint32_t MACCR; + __IO uint32_t MACECR; + __IO uint32_t MACPFR; + __IO uint32_t MACWTR; + __IO uint32_t MACHT0R; + __IO uint32_t MACHT1R; + uint32_t RESERVED1[14]; + __IO uint32_t MACVTR; + uint32_t RESERVED2; + __IO uint32_t MACVHTR; + uint32_t RESERVED3; + __IO uint32_t MACVIR; + __IO uint32_t MACIVIR; + uint32_t RESERVED4[2]; + __IO uint32_t MACTFCR; + uint32_t RESERVED5[7]; + __IO uint32_t MACRFCR; + uint32_t RESERVED6[7]; + __IO uint32_t MACISR; + __IO uint32_t MACIER; + __IO uint32_t MACRXTXSR; + uint32_t RESERVED7; + __IO uint32_t MACPCSR; + __IO uint32_t MACRWKPFR; + uint32_t RESERVED8[2]; + __IO uint32_t MACLCSR; + __IO uint32_t MACLTCR; + __IO uint32_t MACLETR; + __IO uint32_t MAC1USTCR; + uint32_t RESERVED9[12]; + __IO uint32_t MACVR; + __IO uint32_t MACDR; + uint32_t RESERVED10; + __IO uint32_t MACHWF0R; + __IO uint32_t MACHWF1R; + __IO uint32_t MACHWF2R; + uint32_t RESERVED11[54]; + __IO uint32_t MACMDIOAR; + __IO uint32_t MACMDIODR; + uint32_t RESERVED12[2]; + __IO uint32_t MACARPAR; + uint32_t RESERVED13[59]; + __IO uint32_t MACA0HR; + __IO uint32_t MACA0LR; + __IO uint32_t MACA1HR; + __IO uint32_t MACA1LR; + __IO uint32_t MACA2HR; + __IO uint32_t MACA2LR; + __IO uint32_t MACA3HR; + __IO uint32_t MACA3LR; + uint32_t RESERVED14[248]; + __IO uint32_t MMCCR; + __IO uint32_t MMCRIR; + __IO uint32_t MMCTIR; + __IO uint32_t MMCRIMR; + __IO uint32_t MMCTIMR; + uint32_t RESERVED15[14]; + __IO uint32_t MMCTSCGPR; + __IO uint32_t MMCTMCGPR; + uint32_t RESERVED16[5]; + __IO uint32_t MMCTPCGR; + uint32_t RESERVED17[10]; + __IO uint32_t MMCRCRCEPR; + __IO uint32_t MMCRAEPR; + uint32_t RESERVED18[10]; + __IO uint32_t MMCRUPGR; + uint32_t RESERVED19[9]; + __IO uint32_t MMCTLPIMSTR; + __IO uint32_t MMCTLPITCR; + __IO uint32_t MMCRLPIMSTR; + __IO uint32_t MMCRLPITCR; + uint32_t RESERVED20[65]; + __IO uint32_t MACL3L4C0R; + __IO uint32_t MACL4A0R; + uint32_t RESERVED21[2]; + __IO uint32_t MACL3A0R0R; + __IO uint32_t MACL3A1R0R; + __IO uint32_t MACL3A2R0R; + __IO uint32_t MACL3A3R0R; + uint32_t RESERVED22[4]; + __IO uint32_t MACL3L4C1R; + __IO uint32_t MACL4A1R; + uint32_t RESERVED23[2]; + __IO uint32_t MACL3A0R1R; + __IO uint32_t MACL3A1R1R; + __IO uint32_t MACL3A2R1R; + __IO uint32_t MACL3A3R1R; + uint32_t RESERVED24[108]; + __IO uint32_t MACTSCR; + __IO uint32_t MACSSIR; + __IO uint32_t MACSTSR; + __IO uint32_t MACSTNR; + __IO uint32_t MACSTSUR; + __IO uint32_t MACSTNUR; + __IO uint32_t MACTSAR; + uint32_t RESERVED25; + __IO uint32_t MACTSSR; + uint32_t RESERVED26[3]; + __IO uint32_t MACTTSSNR; + __IO uint32_t MACTTSSSR; + uint32_t RESERVED27[2]; + __IO uint32_t MACACR; + uint32_t RESERVED28; + __IO uint32_t MACATSNR; + __IO uint32_t MACATSSR; + __IO uint32_t MACTSIACR; + __IO uint32_t MACTSEACR; + __IO uint32_t MACTSICNR; + __IO uint32_t MACTSECNR; + uint32_t RESERVED29[4]; + __IO uint32_t MACPPSCR; + uint32_t RESERVED30[3]; + __IO uint32_t MACPPSTTSR; + __IO uint32_t MACPPSTTNR; + __IO uint32_t MACPPSIR; + __IO uint32_t MACPPSWR; + uint32_t RESERVED31[12]; + __IO uint32_t MACPOCR; + __IO uint32_t MACSPI0R; + __IO uint32_t MACSPI1R; + __IO uint32_t MACSPI2R; + __IO uint32_t MACLMIR; + uint32_t RESERVED32[11]; + __IO uint32_t MTLOMR; + uint32_t RESERVED33[7]; + __IO uint32_t MTLISR; + uint32_t RESERVED34[55]; + __IO uint32_t MTLTQOMR; + __IO uint32_t MTLTQUR; + __IO uint32_t MTLTQDR; + uint32_t RESERVED35[8]; + __IO uint32_t MTLQICSR; + __IO uint32_t MTLRQOMR; + __IO uint32_t MTLRQMPOCR; + __IO uint32_t MTLRQDR; + uint32_t RESERVED36[177]; + __IO uint32_t DMAMR; + __IO uint32_t DMASBMR; + __IO uint32_t DMAISR; + __IO uint32_t DMADSR; + uint32_t RESERVED37[60]; + __IO uint32_t DMACCR; + __IO uint32_t DMACTCR; + __IO uint32_t DMACRCR; + uint32_t RESERVED38[2]; + __IO uint32_t DMACTDLAR; + uint32_t RESERVED39; + __IO uint32_t DMACRDLAR; + __IO uint32_t DMACTDTPR; + uint32_t RESERVED40; + __IO uint32_t DMACRDTPR; + __IO uint32_t DMACTDRLR; + __IO uint32_t DMACRDRLR; + __IO uint32_t DMACIER; + __IO uint32_t DMACRIWTR; +__IO uint32_t DMACSFCSR; + uint32_t RESERVED41; + __IO uint32_t DMACCATDR; + uint32_t RESERVED42; + __IO uint32_t DMACCARDR; + uint32_t RESERVED43; + __IO uint32_t DMACCATBR; + uint32_t RESERVED44; + __IO uint32_t DMACCARBR; + __IO uint32_t DMACSR; +uint32_t RESERVED45[2]; +__IO uint32_t DMACMFCR; +}ETH_TypeDef; +/** + * @brief External Interrupt/Event Controller + */ + +typedef struct +{ +__IO uint32_t RTSR1; /*!< EXTI Rising trigger selection register, Address offset: 0x00 */ +__IO uint32_t FTSR1; /*!< EXTI Falling trigger selection register, Address offset: 0x04 */ +__IO uint32_t SWIER1; /*!< EXTI Software interrupt event register, Address offset: 0x08 */ +__IO uint32_t D3PMR1; /*!< EXTI D3 Pending mask register, (same register as to SRDPMR1) Address offset: 0x0C */ +__IO uint32_t D3PCR1L; /*!< EXTI D3 Pending clear selection register low, (same register as to SRDPCR1L) Address offset: 0x10 */ +__IO uint32_t D3PCR1H; /*!< EXTI D3 Pending clear selection register High, (same register as to SRDPCR1H) Address offset: 0x14 */ +uint32_t RESERVED1[2]; /*!< Reserved, 0x18 to 0x1C */ +__IO uint32_t RTSR2; /*!< EXTI Rising trigger selection register, Address offset: 0x20 */ +__IO uint32_t FTSR2; /*!< EXTI Falling trigger selection register, Address offset: 0x24 */ +__IO uint32_t SWIER2; /*!< EXTI Software interrupt event register, Address offset: 0x28 */ +__IO uint32_t D3PMR2; /*!< EXTI D3 Pending mask register, (same register as to SRDPMR2) Address offset: 0x2C */ +__IO uint32_t D3PCR2L; /*!< EXTI D3 Pending clear selection register low, (same register as to SRDPCR2L) Address offset: 0x30 */ +__IO uint32_t D3PCR2H; /*!< EXTI D3 Pending clear selection register High, (same register as to SRDPCR2H) Address offset: 0x34 */ +uint32_t RESERVED2[2]; /*!< Reserved, 0x38 to 0x3C */ +__IO uint32_t RTSR3; /*!< EXTI Rising trigger selection register, Address offset: 0x40 */ +__IO uint32_t FTSR3; /*!< EXTI Falling trigger selection register, Address offset: 0x44 */ +__IO uint32_t SWIER3; /*!< EXTI Software interrupt event register, Address offset: 0x48 */ +__IO uint32_t D3PMR3; /*!< EXTI D3 Pending mask register, (same register as to SRDPMR3) Address offset: 0x4C */ +__IO uint32_t D3PCR3L; /*!< EXTI D3 Pending clear selection register low, (same register as to SRDPCR3L) Address offset: 0x50 */ +__IO uint32_t D3PCR3H; /*!< EXTI D3 Pending clear selection register High, (same register as to SRDPCR3H) Address offset: 0x54 */ +uint32_t RESERVED3[10]; /*!< Reserved, 0x58 to 0x7C */ +__IO uint32_t IMR1; /*!< EXTI Interrupt mask register, Address offset: 0x80 */ +__IO uint32_t EMR1; /*!< EXTI Event mask register, Address offset: 0x84 */ +__IO uint32_t PR1; /*!< EXTI Pending register, Address offset: 0x88 */ +uint32_t RESERVED4; /*!< Reserved, 0x8C */ +__IO uint32_t IMR2; /*!< EXTI Interrupt mask register, Address offset: 0x90 */ +__IO uint32_t EMR2; /*!< EXTI Event mask register, Address offset: 0x94 */ +__IO uint32_t PR2; /*!< EXTI Pending register, Address offset: 0x98 */ +uint32_t RESERVED5; /*!< Reserved, 0x9C */ +__IO uint32_t IMR3; /*!< EXTI Interrupt mask register, Address offset: 0xA0 */ +__IO uint32_t EMR3; /*!< EXTI Event mask register, Address offset: 0xA4 */ +__IO uint32_t PR3; /*!< EXTI Pending register, Address offset: 0xA8 */ +}EXTI_TypeDef; + +typedef struct +{ +__IO uint32_t IMR1; /*!< EXTI Interrupt mask register, Address offset: 0x00 */ +__IO uint32_t EMR1; /*!< EXTI Event mask register, Address offset: 0x04 */ +__IO uint32_t PR1; /*!< EXTI Pending register, Address offset: 0x08 */ +uint32_t RESERVED1; /*!< Reserved, 0x0C */ +__IO uint32_t IMR2; /*!< EXTI Interrupt mask register, Address offset: 0x10 */ +__IO uint32_t EMR2; /*!< EXTI Event mask register, Address offset: 0x14 */ +__IO uint32_t PR2; /*!< EXTI Pending register, Address offset: 0x18 */ +uint32_t RESERVED2; /*!< Reserved, 0x1C */ +__IO uint32_t IMR3; /*!< EXTI Interrupt mask register, Address offset: 0x20 */ +__IO uint32_t EMR3; /*!< EXTI Event mask register, Address offset: 0x24 */ +__IO uint32_t PR3; /*!< EXTI Pending register, Address offset: 0x28 */ +}EXTI_Core_TypeDef; + + +/** + * @brief FLASH Registers + */ + +typedef struct +{ + __IO uint32_t ACR; /*!< FLASH access control register, Address offset: 0x00 */ + __IO uint32_t KEYR1; /*!< Flash Key Register for bank1, Address offset: 0x04 */ + __IO uint32_t OPTKEYR; /*!< Flash Option Key Register, Address offset: 0x08 */ + __IO uint32_t CR1; /*!< Flash Control Register for bank1, Address offset: 0x0C */ + __IO uint32_t SR1; /*!< Flash Status Register for bank1, Address offset: 0x10 */ + __IO uint32_t CCR1; /*!< Flash Control Register for bank1, Address offset: 0x14 */ + __IO uint32_t OPTCR; /*!< Flash Option Control Register, Address offset: 0x18 */ + __IO uint32_t OPTSR_CUR; /*!< Flash Option Status Current Register, Address offset: 0x1C */ + __IO uint32_t OPTSR_PRG; /*!< Flash Option Status to Program Register, Address offset: 0x20 */ + __IO uint32_t OPTCCR; /*!< Flash Option Clear Control Register, Address offset: 0x24 */ + __IO uint32_t PRAR_CUR1; /*!< Flash Current Protection Address Register for bank1, Address offset: 0x28 */ + __IO uint32_t PRAR_PRG1; /*!< Flash Protection Address to Program Register for bank1, Address offset: 0x2C */ + __IO uint32_t SCAR_CUR1; /*!< Flash Current Secure Address Register for bank1, Address offset: 0x30 */ + __IO uint32_t SCAR_PRG1; /*!< Flash Secure Address to Program Register for bank1, Address offset: 0x34 */ + __IO uint32_t WPSN_CUR1; /*!< Flash Current Write Protection Register on bank1, Address offset: 0x38 */ + __IO uint32_t WPSN_PRG1; /*!< Flash Write Protection to Program Register on bank1, Address offset: 0x3C */ + __IO uint32_t BOOT_CUR; /*!< Flash Current Boot Address for Pelican Core Register, Address offset: 0x40 */ + __IO uint32_t BOOT_PRG; /*!< Flash Boot Address to Program for Pelican Core Register, Address offset: 0x44 */ + uint32_t RESERVED0[2]; /*!< Reserved, 0x48 to 0x4C */ + __IO uint32_t CRCCR1; /*!< Flash CRC Control register For Bank1 Register , Address offset: 0x50 */ + __IO uint32_t CRCSADD1; /*!< Flash CRC Start Address Register for Bank1 , Address offset: 0x54 */ + __IO uint32_t CRCEADD1; /*!< Flash CRC End Address Register for Bank1 , Address offset: 0x58 */ + __IO uint32_t CRCDATA; /*!< Flash CRC Data Register for Bank1 , Address offset: 0x5C */ + __IO uint32_t ECC_FA1; /*!< Flash ECC Fail Address For Bank1 Register , Address offset: 0x60 */ + uint32_t RESERVED[3]; /*!< Reserved, 0x64 to 0x6C */ + __IO uint32_t OPTSR2_CUR; /*!< Flash Option Status Current Register 2, Address offset: 0x70 */ + __IO uint32_t OPTSR2_PRG; /*!< Flash Option Status to Program Register 2, Address offset: 0x74 */ +} FLASH_TypeDef; + +/** + * @brief Filter and Mathematical ACcelerator + */ +typedef struct +{ + __IO uint32_t X1BUFCFG; /*!< FMAC X1 Buffer Configuration register, Address offset: 0x00 */ + __IO uint32_t X2BUFCFG; /*!< FMAC X2 Buffer Configuration register, Address offset: 0x04 */ + __IO uint32_t YBUFCFG; /*!< FMAC Y Buffer Configuration register, Address offset: 0x08 */ + __IO uint32_t PARAM; /*!< FMAC Parameter register, Address offset: 0x0C */ + __IO uint32_t CR; /*!< FMAC Control register, Address offset: 0x10 */ + __IO uint32_t SR; /*!< FMAC Status register, Address offset: 0x14 */ + __IO uint32_t WDATA; /*!< FMAC Write Data register, Address offset: 0x18 */ + __IO uint32_t RDATA; /*!< FMAC Read Data register, Address offset: 0x1C */ +} FMAC_TypeDef; + +/** + * @brief Flexible Memory Controller + */ + +typedef struct +{ + __IO uint32_t BTCR[8]; /*!< NOR/PSRAM chip-select control register(BCR) and chip-select timing register(BTR), Address offset: 0x00-1C */ +} FMC_Bank1_TypeDef; + +/** + * @brief Flexible Memory Controller Bank1E + */ + +typedef struct +{ + __IO uint32_t BWTR[7]; /*!< NOR/PSRAM write timing registers, Address offset: 0x104-0x11C */ +} FMC_Bank1E_TypeDef; + +/** + * @brief Flexible Memory Controller Bank2 + */ + +typedef struct +{ + __IO uint32_t PCR2; /*!< NAND Flash control register 2, Address offset: 0x60 */ + __IO uint32_t SR2; /*!< NAND Flash FIFO status and interrupt register 2, Address offset: 0x64 */ + __IO uint32_t PMEM2; /*!< NAND Flash Common memory space timing register 2, Address offset: 0x68 */ + __IO uint32_t PATT2; /*!< NAND Flash Attribute memory space timing register 2, Address offset: 0x6C */ + uint32_t RESERVED0; /*!< Reserved, 0x70 */ + __IO uint32_t ECCR2; /*!< NAND Flash ECC result registers 2, Address offset: 0x74 */ +} FMC_Bank2_TypeDef; + +/** + * @brief Flexible Memory Controller Bank3 + */ + +typedef struct +{ + __IO uint32_t PCR; /*!< NAND Flash control register 3, Address offset: 0x80 */ + __IO uint32_t SR; /*!< NAND Flash FIFO status and interrupt register 3, Address offset: 0x84 */ + __IO uint32_t PMEM; /*!< NAND Flash Common memory space timing register 3, Address offset: 0x88 */ + __IO uint32_t PATT; /*!< NAND Flash Attribute memory space timing register 3, Address offset: 0x8C */ + uint32_t RESERVED; /*!< Reserved, 0x90 */ + __IO uint32_t ECCR; /*!< NAND Flash ECC result registers 3, Address offset: 0x94 */ +} FMC_Bank3_TypeDef; + +/** + * @brief Flexible Memory Controller Bank5 and 6 + */ + + +typedef struct +{ + __IO uint32_t SDCR[2]; /*!< SDRAM Control registers , Address offset: 0x140-0x144 */ + __IO uint32_t SDTR[2]; /*!< SDRAM Timing registers , Address offset: 0x148-0x14C */ + __IO uint32_t SDCMR; /*!< SDRAM Command Mode register, Address offset: 0x150 */ + __IO uint32_t SDRTR; /*!< SDRAM Refresh Timer register, Address offset: 0x154 */ + __IO uint32_t SDSR; /*!< SDRAM Status register, Address offset: 0x158 */ +} FMC_Bank5_6_TypeDef; + +/** + * @brief General Purpose I/O + */ + +typedef struct +{ + __IO uint32_t MODER; /*!< GPIO port mode register, Address offset: 0x00 */ + __IO uint32_t OTYPER; /*!< GPIO port output type register, Address offset: 0x04 */ + __IO uint32_t OSPEEDR; /*!< GPIO port output speed register, Address offset: 0x08 */ + __IO uint32_t PUPDR; /*!< GPIO port pull-up/pull-down register, Address offset: 0x0C */ + __IO uint32_t IDR; /*!< GPIO port input data register, Address offset: 0x10 */ + __IO uint32_t ODR; /*!< GPIO port output data register, Address offset: 0x14 */ + __IO uint32_t BSRR; /*!< GPIO port bit set/reset, Address offset: 0x18 */ + __IO uint32_t LCKR; /*!< GPIO port configuration lock register, Address offset: 0x1C */ + __IO uint32_t AFR[2]; /*!< GPIO alternate function registers, Address offset: 0x20-0x24 */ +} GPIO_TypeDef; + +/** + * @brief Operational Amplifier (OPAMP) + */ + +typedef struct +{ + __IO uint32_t CSR; /*!< OPAMP control/status register, Address offset: 0x00 */ + __IO uint32_t OTR; /*!< OPAMP offset trimming register for normal mode, Address offset: 0x04 */ + __IO uint32_t HSOTR; /*!< OPAMP offset trimming register for high speed mode, Address offset: 0x08 */ +} OPAMP_TypeDef; + +/** + * @brief System configuration controller + */ + +typedef struct +{ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x00 */ + __IO uint32_t PMCR; /*!< SYSCFG peripheral mode configuration register, Address offset: 0x04 */ + __IO uint32_t EXTICR[4]; /*!< SYSCFG external interrupt configuration registers, Address offset: 0x08-0x14 */ + __IO uint32_t CFGR; /*!< SYSCFG configuration registers, Address offset: 0x18 */ + uint32_t RESERVED2; /*!< Reserved, Address offset: 0x1C */ + __IO uint32_t CCCSR; /*!< SYSCFG compensation cell control/status register, Address offset: 0x20 */ + __IO uint32_t CCVR; /*!< SYSCFG compensation cell value register, Address offset: 0x24 */ + __IO uint32_t CCCR; /*!< SYSCFG compensation cell code register, Address offset: 0x28 */ + uint32_t RESERVED3; /*!< Reserved, Address offset: 0x2C */ + __IO uint32_t ADC2ALT; /*!< ADC2 internal input alternate connection register, Address offset: 0x30 */ + uint32_t RESERVED4[60]; /*!< Reserved, 0x34-0x120 */ + __IO uint32_t PKGR; /*!< SYSCFG package register, Address offset: 0x124 */ + uint32_t RESERVED5[118]; /*!< Reserved, 0x128-0x2FC */ + __IO uint32_t UR0; /*!< SYSCFG user register 0, Address offset: 0x300 */ + __IO uint32_t UR1; /*!< SYSCFG user register 1, Address offset: 0x304 */ + __IO uint32_t UR2; /*!< SYSCFG user register 2, Address offset: 0x308 */ + __IO uint32_t UR3; /*!< SYSCFG user register 3, Address offset: 0x30C */ + __IO uint32_t UR4; /*!< SYSCFG user register 4, Address offset: 0x310 */ + __IO uint32_t UR5; /*!< SYSCFG user register 5, Address offset: 0x314 */ + __IO uint32_t UR6; /*!< SYSCFG user register 6, Address offset: 0x318 */ + __IO uint32_t UR7; /*!< SYSCFG user register 7, Address offset: 0x31C */ + uint32_t RESERVED6[3]; /*!< Reserved, Address offset: 0x320-0x328 */ + __IO uint32_t UR11; /*!< SYSCFG user register 11, Address offset: 0x32C */ + __IO uint32_t UR12; /*!< SYSCFG user register 12, Address offset: 0x330 */ + __IO uint32_t UR13; /*!< SYSCFG user register 13, Address offset: 0x334 */ + __IO uint32_t UR14; /*!< SYSCFG user register 14, Address offset: 0x338 */ + __IO uint32_t UR15; /*!< SYSCFG user register 15, Address offset: 0x33C */ + __IO uint32_t UR16; /*!< SYSCFG user register 16, Address offset: 0x340 */ + __IO uint32_t UR17; /*!< SYSCFG user register 17, Address offset: 0x344 */ + __IO uint32_t UR18; /*!< SYSCFG user register 18, Address offset: 0x348 */ + +} SYSCFG_TypeDef; + +/** + * @brief Inter-integrated Circuit Interface + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< I2C Control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< I2C Control register 2, Address offset: 0x04 */ + __IO uint32_t OAR1; /*!< I2C Own address 1 register, Address offset: 0x08 */ + __IO uint32_t OAR2; /*!< I2C Own address 2 register, Address offset: 0x0C */ + __IO uint32_t TIMINGR; /*!< I2C Timing register, Address offset: 0x10 */ + __IO uint32_t TIMEOUTR; /*!< I2C Timeout register, Address offset: 0x14 */ + __IO uint32_t ISR; /*!< I2C Interrupt and status register, Address offset: 0x18 */ + __IO uint32_t ICR; /*!< I2C Interrupt clear register, Address offset: 0x1C */ + __IO uint32_t PECR; /*!< I2C PEC register, Address offset: 0x20 */ + __IO uint32_t RXDR; /*!< I2C Receive data register, Address offset: 0x24 */ + __IO uint32_t TXDR; /*!< I2C Transmit data register, Address offset: 0x28 */ +} I2C_TypeDef; + +/** + * @brief Independent WATCHDOG + */ + +typedef struct +{ + __IO uint32_t KR; /*!< IWDG Key register, Address offset: 0x00 */ + __IO uint32_t PR; /*!< IWDG Prescaler register, Address offset: 0x04 */ + __IO uint32_t RLR; /*!< IWDG Reload register, Address offset: 0x08 */ + __IO uint32_t SR; /*!< IWDG Status register, Address offset: 0x0C */ + __IO uint32_t WINR; /*!< IWDG Window register, Address offset: 0x10 */ +} IWDG_TypeDef; + + +/** + * @brief LCD-TFT Display Controller + */ + +typedef struct +{ + uint32_t RESERVED0[2]; /*!< Reserved, 0x00-0x04 */ + __IO uint32_t SSCR; /*!< LTDC Synchronization Size Configuration Register, Address offset: 0x08 */ + __IO uint32_t BPCR; /*!< LTDC Back Porch Configuration Register, Address offset: 0x0C */ + __IO uint32_t AWCR; /*!< LTDC Active Width Configuration Register, Address offset: 0x10 */ + __IO uint32_t TWCR; /*!< LTDC Total Width Configuration Register, Address offset: 0x14 */ + __IO uint32_t GCR; /*!< LTDC Global Control Register, Address offset: 0x18 */ + uint32_t RESERVED1[2]; /*!< Reserved, 0x1C-0x20 */ + __IO uint32_t SRCR; /*!< LTDC Shadow Reload Configuration Register, Address offset: 0x24 */ + uint32_t RESERVED2[1]; /*!< Reserved, 0x28 */ + __IO uint32_t BCCR; /*!< LTDC Background Color Configuration Register, Address offset: 0x2C */ + uint32_t RESERVED3[1]; /*!< Reserved, 0x30 */ + __IO uint32_t IER; /*!< LTDC Interrupt Enable Register, Address offset: 0x34 */ + __IO uint32_t ISR; /*!< LTDC Interrupt Status Register, Address offset: 0x38 */ + __IO uint32_t ICR; /*!< LTDC Interrupt Clear Register, Address offset: 0x3C */ + __IO uint32_t LIPCR; /*!< LTDC Line Interrupt Position Configuration Register, Address offset: 0x40 */ + __IO uint32_t CPSR; /*!< LTDC Current Position Status Register, Address offset: 0x44 */ + __IO uint32_t CDSR; /*!< LTDC Current Display Status Register, Address offset: 0x48 */ +} LTDC_TypeDef; + +/** + * @brief LCD-TFT Display layer x Controller + */ + +typedef struct +{ + __IO uint32_t CR; /*!< LTDC Layerx Control Register Address offset: 0x84 */ + __IO uint32_t WHPCR; /*!< LTDC Layerx Window Horizontal Position Configuration Register Address offset: 0x88 */ + __IO uint32_t WVPCR; /*!< LTDC Layerx Window Vertical Position Configuration Register Address offset: 0x8C */ + __IO uint32_t CKCR; /*!< LTDC Layerx Color Keying Configuration Register Address offset: 0x90 */ + __IO uint32_t PFCR; /*!< LTDC Layerx Pixel Format Configuration Register Address offset: 0x94 */ + __IO uint32_t CACR; /*!< LTDC Layerx Constant Alpha Configuration Register Address offset: 0x98 */ + __IO uint32_t DCCR; /*!< LTDC Layerx Default Color Configuration Register Address offset: 0x9C */ + __IO uint32_t BFCR; /*!< LTDC Layerx Blending Factors Configuration Register Address offset: 0xA0 */ + uint32_t RESERVED0[2]; /*!< Reserved */ + __IO uint32_t CFBAR; /*!< LTDC Layerx Color Frame Buffer Address Register Address offset: 0xAC */ + __IO uint32_t CFBLR; /*!< LTDC Layerx Color Frame Buffer Length Register Address offset: 0xB0 */ + __IO uint32_t CFBLNR; /*!< LTDC Layerx ColorFrame Buffer Line Number Register Address offset: 0xB4 */ + uint32_t RESERVED1[3]; /*!< Reserved */ + __IO uint32_t CLUTWR; /*!< LTDC Layerx CLUT Write Register Address offset: 0x144 */ + +} LTDC_Layer_TypeDef; + +/** + * @brief Power Control + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< PWR power control register 1, Address offset: 0x00 */ + __IO uint32_t CSR1; /*!< PWR power control status register 1, Address offset: 0x04 */ + __IO uint32_t CR2; /*!< PWR power control register 2, Address offset: 0x08 */ + __IO uint32_t CR3; /*!< PWR power control register 3, Address offset: 0x0C */ + __IO uint32_t CPUCR; /*!< PWR CPU control register, Address offset: 0x10 */ + uint32_t RESERVED0; /*!< Reserved, Address offset: 0x14 */ + __IO uint32_t D3CR; /*!< PWR D3 domain control register, Address offset: 0x18 */ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x1C */ + __IO uint32_t WKUPCR; /*!< PWR wakeup clear register, Address offset: 0x20 */ + __IO uint32_t WKUPFR; /*!< PWR wakeup flag register, Address offset: 0x24 */ + __IO uint32_t WKUPEPR; /*!< PWR wakeup enable and polarity register, Address offset: 0x28 */ +} PWR_TypeDef; + +/** + * @brief Reset and Clock Control + */ + +typedef struct +{ + __IO uint32_t CR; /*!< RCC clock control register, Address offset: 0x00 */ + __IO uint32_t HSICFGR; /*!< HSI Clock Calibration Register, Address offset: 0x04 */ + __IO uint32_t CRRCR; /*!< Clock Recovery RC Register, Address offset: 0x08 */ + __IO uint32_t CSICFGR; /*!< CSI Clock Calibration Register, Address offset: 0x0C */ + __IO uint32_t CFGR; /*!< RCC clock configuration register, Address offset: 0x10 */ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x14 */ + __IO uint32_t D1CFGR; /*!< RCC Domain 1 configuration register, Address offset: 0x18 */ + __IO uint32_t D2CFGR; /*!< RCC Domain 2 configuration register, Address offset: 0x1C */ + __IO uint32_t D3CFGR; /*!< RCC Domain 3 configuration register, Address offset: 0x20 */ + uint32_t RESERVED2; /*!< Reserved, Address offset: 0x24 */ + __IO uint32_t PLLCKSELR; /*!< RCC PLLs Clock Source Selection Register, Address offset: 0x28 */ + __IO uint32_t PLLCFGR; /*!< RCC PLLs Configuration Register, Address offset: 0x2C */ + __IO uint32_t PLL1DIVR; /*!< RCC PLL1 Dividers Configuration Register, Address offset: 0x30 */ + __IO uint32_t PLL1FRACR; /*!< RCC PLL1 Fractional Divider Configuration Register, Address offset: 0x34 */ + __IO uint32_t PLL2DIVR; /*!< RCC PLL2 Dividers Configuration Register, Address offset: 0x38 */ + __IO uint32_t PLL2FRACR; /*!< RCC PLL2 Fractional Divider Configuration Register, Address offset: 0x3C */ + __IO uint32_t PLL3DIVR; /*!< RCC PLL3 Dividers Configuration Register, Address offset: 0x40 */ + __IO uint32_t PLL3FRACR; /*!< RCC PLL3 Fractional Divider Configuration Register, Address offset: 0x44 */ + uint32_t RESERVED3; /*!< Reserved, Address offset: 0x48 */ + __IO uint32_t D1CCIPR; /*!< RCC Domain 1 Kernel Clock Configuration Register Address offset: 0x4C */ + __IO uint32_t D2CCIP1R; /*!< RCC Domain 2 Kernel Clock Configuration Register Address offset: 0x50 */ + __IO uint32_t D2CCIP2R; /*!< RCC Domain 2 Kernel Clock Configuration Register Address offset: 0x54 */ + __IO uint32_t D3CCIPR; /*!< RCC Domain 3 Kernel Clock Configuration Register Address offset: 0x58 */ + uint32_t RESERVED4; /*!< Reserved, Address offset: 0x5C */ + __IO uint32_t CIER; /*!< RCC Clock Source Interrupt Enable Register Address offset: 0x60 */ + __IO uint32_t CIFR; /*!< RCC Clock Source Interrupt Flag Register Address offset: 0x64 */ + __IO uint32_t CICR; /*!< RCC Clock Source Interrupt Clear Register Address offset: 0x68 */ + uint32_t RESERVED5; /*!< Reserved, Address offset: 0x6C */ + __IO uint32_t BDCR; /*!< RCC Vswitch Backup Domain Control Register, Address offset: 0x70 */ + __IO uint32_t CSR; /*!< RCC clock control & status register, Address offset: 0x74 */ + uint32_t RESERVED6; /*!< Reserved, Address offset: 0x78 */ + __IO uint32_t AHB3RSTR; /*!< RCC AHB3 peripheral reset register, Address offset: 0x7C */ + __IO uint32_t AHB1RSTR; /*!< RCC AHB1 peripheral reset register, Address offset: 0x80 */ + __IO uint32_t AHB2RSTR; /*!< RCC AHB2 peripheral reset register, Address offset: 0x84 */ + __IO uint32_t AHB4RSTR; /*!< RCC AHB4 peripheral reset register, Address offset: 0x88 */ + __IO uint32_t APB3RSTR; /*!< RCC APB3 peripheral reset register, Address offset: 0x8C */ + __IO uint32_t APB1LRSTR; /*!< RCC APB1 peripheral reset Low Word register, Address offset: 0x90 */ + __IO uint32_t APB1HRSTR; /*!< RCC APB1 peripheral reset High Word register, Address offset: 0x94 */ + __IO uint32_t APB2RSTR; /*!< RCC APB2 peripheral reset register, Address offset: 0x98 */ + __IO uint32_t APB4RSTR; /*!< RCC APB4 peripheral reset register, Address offset: 0x9C */ + __IO uint32_t GCR; /*!< RCC RCC Global Control Register, Address offset: 0xA0 */ + uint32_t RESERVED8; /*!< Reserved, Address offset: 0xA4 */ + __IO uint32_t D3AMR; /*!< RCC Domain 3 Autonomous Mode Register, Address offset: 0xA8 */ + uint32_t RESERVED11[9]; /*!< Reserved, 0xAC-0xCC Address offset: 0xAC */ + __IO uint32_t RSR; /*!< RCC Reset status register, Address offset: 0xD0 */ + __IO uint32_t AHB3ENR; /*!< RCC AHB3 peripheral clock register, Address offset: 0xD4 */ + __IO uint32_t AHB1ENR; /*!< RCC AHB1 peripheral clock register, Address offset: 0xD8 */ + __IO uint32_t AHB2ENR; /*!< RCC AHB2 peripheral clock register, Address offset: 0xDC */ + __IO uint32_t AHB4ENR; /*!< RCC AHB4 peripheral clock register, Address offset: 0xE0 */ + __IO uint32_t APB3ENR; /*!< RCC APB3 peripheral clock register, Address offset: 0xE4 */ + __IO uint32_t APB1LENR; /*!< RCC APB1 peripheral clock Low Word register, Address offset: 0xE8 */ + __IO uint32_t APB1HENR; /*!< RCC APB1 peripheral clock High Word register, Address offset: 0xEC */ + __IO uint32_t APB2ENR; /*!< RCC APB2 peripheral clock register, Address offset: 0xF0 */ + __IO uint32_t APB4ENR; /*!< RCC APB4 peripheral clock register, Address offset: 0xF4 */ + uint32_t RESERVED12; /*!< Reserved, Address offset: 0xF8 */ + __IO uint32_t AHB3LPENR; /*!< RCC AHB3 peripheral sleep clock register, Address offset: 0xFC */ + __IO uint32_t AHB1LPENR; /*!< RCC AHB1 peripheral sleep clock register, Address offset: 0x100 */ + __IO uint32_t AHB2LPENR; /*!< RCC AHB2 peripheral sleep clock register, Address offset: 0x104 */ + __IO uint32_t AHB4LPENR; /*!< RCC AHB4 peripheral sleep clock register, Address offset: 0x108 */ + __IO uint32_t APB3LPENR; /*!< RCC APB3 peripheral sleep clock register, Address offset: 0x10C */ + __IO uint32_t APB1LLPENR; /*!< RCC APB1 peripheral sleep clock Low Word register, Address offset: 0x110 */ + __IO uint32_t APB1HLPENR; /*!< RCC APB1 peripheral sleep clock High Word register, Address offset: 0x114 */ + __IO uint32_t APB2LPENR; /*!< RCC APB2 peripheral sleep clock register, Address offset: 0x118 */ + __IO uint32_t APB4LPENR; /*!< RCC APB4 peripheral sleep clock register, Address offset: 0x11C */ + uint32_t RESERVED13[4]; /*!< Reserved, 0x120-0x12C Address offset: 0x120 */ + +} RCC_TypeDef; + + +/** + * @brief Real-Time Clock + */ +typedef struct +{ + __IO uint32_t TR; /*!< RTC time register, Address offset: 0x00 */ + __IO uint32_t DR; /*!< RTC date register, Address offset: 0x04 */ + __IO uint32_t CR; /*!< RTC control register, Address offset: 0x08 */ + __IO uint32_t ISR; /*!< RTC initialization and status register, Address offset: 0x0C */ + __IO uint32_t PRER; /*!< RTC prescaler register, Address offset: 0x10 */ + __IO uint32_t WUTR; /*!< RTC wakeup timer register, Address offset: 0x14 */ + uint32_t RESERVED; /*!< Reserved, Address offset: 0x18 */ + __IO uint32_t ALRMAR; /*!< RTC alarm A register, Address offset: 0x1C */ + __IO uint32_t ALRMBR; /*!< RTC alarm B register, Address offset: 0x20 */ + __IO uint32_t WPR; /*!< RTC write protection register, Address offset: 0x24 */ + __IO uint32_t SSR; /*!< RTC sub second register, Address offset: 0x28 */ + __IO uint32_t SHIFTR; /*!< RTC shift control register, Address offset: 0x2C */ + __IO uint32_t TSTR; /*!< RTC time stamp time register, Address offset: 0x30 */ + __IO uint32_t TSDR; /*!< RTC time stamp date register, Address offset: 0x34 */ + __IO uint32_t TSSSR; /*!< RTC time-stamp sub second register, Address offset: 0x38 */ + __IO uint32_t CALR; /*!< RTC calibration register, Address offset: 0x3C */ + __IO uint32_t TAMPCR; /*!< RTC tamper configuration register, Address offset: 0x40 */ + __IO uint32_t ALRMASSR; /*!< RTC alarm A sub second register, Address offset: 0x44 */ + __IO uint32_t ALRMBSSR; /*!< RTC alarm B sub second register, Address offset: 0x48 */ + __IO uint32_t OR; /*!< RTC option register, Address offset: 0x4C */ + __IO uint32_t BKP0R; /*!< RTC backup register 0, Address offset: 0x50 */ + __IO uint32_t BKP1R; /*!< RTC backup register 1, Address offset: 0x54 */ + __IO uint32_t BKP2R; /*!< RTC backup register 2, Address offset: 0x58 */ + __IO uint32_t BKP3R; /*!< RTC backup register 3, Address offset: 0x5C */ + __IO uint32_t BKP4R; /*!< RTC backup register 4, Address offset: 0x60 */ + __IO uint32_t BKP5R; /*!< RTC backup register 5, Address offset: 0x64 */ + __IO uint32_t BKP6R; /*!< RTC backup register 6, Address offset: 0x68 */ + __IO uint32_t BKP7R; /*!< RTC backup register 7, Address offset: 0x6C */ + __IO uint32_t BKP8R; /*!< RTC backup register 8, Address offset: 0x70 */ + __IO uint32_t BKP9R; /*!< RTC backup register 9, Address offset: 0x74 */ + __IO uint32_t BKP10R; /*!< RTC backup register 10, Address offset: 0x78 */ + __IO uint32_t BKP11R; /*!< RTC backup register 11, Address offset: 0x7C */ + __IO uint32_t BKP12R; /*!< RTC backup register 12, Address offset: 0x80 */ + __IO uint32_t BKP13R; /*!< RTC backup register 13, Address offset: 0x84 */ + __IO uint32_t BKP14R; /*!< RTC backup register 14, Address offset: 0x88 */ + __IO uint32_t BKP15R; /*!< RTC backup register 15, Address offset: 0x8C */ + __IO uint32_t BKP16R; /*!< RTC backup register 16, Address offset: 0x90 */ + __IO uint32_t BKP17R; /*!< RTC backup register 17, Address offset: 0x94 */ + __IO uint32_t BKP18R; /*!< RTC backup register 18, Address offset: 0x98 */ + __IO uint32_t BKP19R; /*!< RTC backup register 19, Address offset: 0x9C */ + __IO uint32_t BKP20R; /*!< RTC backup register 20, Address offset: 0xA0 */ + __IO uint32_t BKP21R; /*!< RTC backup register 21, Address offset: 0xA4 */ + __IO uint32_t BKP22R; /*!< RTC backup register 22, Address offset: 0xA8 */ + __IO uint32_t BKP23R; /*!< RTC backup register 23, Address offset: 0xAC */ + __IO uint32_t BKP24R; /*!< RTC backup register 24, Address offset: 0xB0 */ + __IO uint32_t BKP25R; /*!< RTC backup register 25, Address offset: 0xB4 */ + __IO uint32_t BKP26R; /*!< RTC backup register 26, Address offset: 0xB8 */ + __IO uint32_t BKP27R; /*!< RTC backup register 27, Address offset: 0xBC */ + __IO uint32_t BKP28R; /*!< RTC backup register 28, Address offset: 0xC0 */ + __IO uint32_t BKP29R; /*!< RTC backup register 29, Address offset: 0xC4 */ + __IO uint32_t BKP30R; /*!< RTC backup register 30, Address offset: 0xC8 */ + __IO uint32_t BKP31R; /*!< RTC backup register 31, Address offset: 0xCC */ +} RTC_TypeDef; + +/** + * @brief Serial Audio Interface + */ + +typedef struct +{ + __IO uint32_t GCR; /*!< SAI global configuration register, Address offset: 0x00 */ + uint32_t RESERVED0[16]; /*!< Reserved, 0x04 - 0x43 */ + __IO uint32_t PDMCR; /*!< SAI PDM control register, Address offset: 0x44 */ + __IO uint32_t PDMDLY; /*!< SAI PDM delay register, Address offset: 0x48 */ +} SAI_TypeDef; + +typedef struct +{ + __IO uint32_t CR1; /*!< SAI block x configuration register 1, Address offset: 0x04 */ + __IO uint32_t CR2; /*!< SAI block x configuration register 2, Address offset: 0x08 */ + __IO uint32_t FRCR; /*!< SAI block x frame configuration register, Address offset: 0x0C */ + __IO uint32_t SLOTR; /*!< SAI block x slot register, Address offset: 0x10 */ + __IO uint32_t IMR; /*!< SAI block x interrupt mask register, Address offset: 0x14 */ + __IO uint32_t SR; /*!< SAI block x status register, Address offset: 0x18 */ + __IO uint32_t CLRFR; /*!< SAI block x clear flag register, Address offset: 0x1C */ + __IO uint32_t DR; /*!< SAI block x data register, Address offset: 0x20 */ +} SAI_Block_TypeDef; + +/** + * @brief SPDIF-RX Interface + */ + +typedef struct +{ + __IO uint32_t CR; /*!< Control register, Address offset: 0x00 */ + __IO uint32_t IMR; /*!< Interrupt mask register, Address offset: 0x04 */ + __IO uint32_t SR; /*!< Status register, Address offset: 0x08 */ + __IO uint32_t IFCR; /*!< Interrupt Flag Clear register, Address offset: 0x0C */ + __IO uint32_t DR; /*!< Data input register, Address offset: 0x10 */ + __IO uint32_t CSR; /*!< Channel Status register, Address offset: 0x14 */ + __IO uint32_t DIR; /*!< Debug Information register, Address offset: 0x18 */ + uint32_t RESERVED2; /*!< Reserved, 0x1A */ +} SPDIFRX_TypeDef; + + +/** + * @brief Secure digital input/output Interface + */ + +typedef struct +{ + __IO uint32_t POWER; /*!< SDMMC power control register, Address offset: 0x00 */ + __IO uint32_t CLKCR; /*!< SDMMC clock control register, Address offset: 0x04 */ + __IO uint32_t ARG; /*!< SDMMC argument register, Address offset: 0x08 */ + __IO uint32_t CMD; /*!< SDMMC command register, Address offset: 0x0C */ + __I uint32_t RESPCMD; /*!< SDMMC command response register, Address offset: 0x10 */ + __I uint32_t RESP1; /*!< SDMMC response 1 register, Address offset: 0x14 */ + __I uint32_t RESP2; /*!< SDMMC response 2 register, Address offset: 0x18 */ + __I uint32_t RESP3; /*!< SDMMC response 3 register, Address offset: 0x1C */ + __I uint32_t RESP4; /*!< SDMMC response 4 register, Address offset: 0x20 */ + __IO uint32_t DTIMER; /*!< SDMMC data timer register, Address offset: 0x24 */ + __IO uint32_t DLEN; /*!< SDMMC data length register, Address offset: 0x28 */ + __IO uint32_t DCTRL; /*!< SDMMC data control register, Address offset: 0x2C */ + __I uint32_t DCOUNT; /*!< SDMMC data counter register, Address offset: 0x30 */ + __I uint32_t STA; /*!< SDMMC status register, Address offset: 0x34 */ + __IO uint32_t ICR; /*!< SDMMC interrupt clear register, Address offset: 0x38 */ + __IO uint32_t MASK; /*!< SDMMC mask register, Address offset: 0x3C */ + __IO uint32_t ACKTIME; /*!< SDMMC Acknowledgement timer register, Address offset: 0x40 */ + uint32_t RESERVED0[3]; /*!< Reserved, 0x44 - 0x4C - 0x4C */ + __IO uint32_t IDMACTRL; /*!< SDMMC DMA control register, Address offset: 0x50 */ + __IO uint32_t IDMABSIZE; /*!< SDMMC DMA buffer size register, Address offset: 0x54 */ + __IO uint32_t IDMABASE0; /*!< SDMMC DMA buffer 0 base address register, Address offset: 0x58 */ + __IO uint32_t IDMABASE1; /*!< SDMMC DMA buffer 1 base address register, Address offset: 0x5C */ + uint32_t RESERVED1[8]; /*!< Reserved, 0x60-0x7C */ + __IO uint32_t FIFO; /*!< SDMMC data FIFO register, Address offset: 0x80 */ + uint32_t RESERVED2[222]; /*!< Reserved, 0x84-0x3F8 */ + __IO uint32_t IPVR; /*!< SDMMC data FIFO register, Address offset: 0x3FC */ +} SDMMC_TypeDef; + + +/** + * @brief Delay Block DLYB + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DELAY BLOCK control register, Address offset: 0x00 */ + __IO uint32_t CFGR; /*!< DELAY BLOCK configuration register, Address offset: 0x04 */ +} DLYB_TypeDef; + +/** + * @brief HW Semaphore HSEM + */ + +typedef struct +{ + __IO uint32_t R[32]; /*!< 2-step write lock and read back registers, Address offset: 00h-7Ch */ + __IO uint32_t RLR[32]; /*!< 1-step read lock registers, Address offset: 80h-FCh */ + __IO uint32_t C1IER; /*!< HSEM Interrupt enable register , Address offset: 100h */ + __IO uint32_t C1ICR; /*!< HSEM Interrupt clear register , Address offset: 104h */ + __IO uint32_t C1ISR; /*!< HSEM Interrupt Status register , Address offset: 108h */ + __IO uint32_t C1MISR; /*!< HSEM Interrupt Masked Status register , Address offset: 10Ch */ + uint32_t Reserved[12]; /* Reserved Address offset: 110h-13Ch */ + __IO uint32_t CR; /*!< HSEM Semaphore clear register , Address offset: 140h */ + __IO uint32_t KEYR; /*!< HSEM Semaphore clear key register , Address offset: 144h */ + +} HSEM_TypeDef; + +typedef struct +{ + __IO uint32_t IER; /*!< HSEM interrupt enable register , Address offset: 0h */ + __IO uint32_t ICR; /*!< HSEM interrupt clear register , Address offset: 4h */ + __IO uint32_t ISR; /*!< HSEM interrupt status register , Address offset: 8h */ + __IO uint32_t MISR; /*!< HSEM masked interrupt status register , Address offset: Ch */ +} HSEM_Common_TypeDef; + +/** + * @brief Serial Peripheral Interface + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< SPI/I2S Control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< SPI Control register 2, Address offset: 0x04 */ + __IO uint32_t CFG1; /*!< SPI Configuration register 1, Address offset: 0x08 */ + __IO uint32_t CFG2; /*!< SPI Configuration register 2, Address offset: 0x0C */ + __IO uint32_t IER; /*!< SPI/I2S Interrupt Enable register, Address offset: 0x10 */ + __IO uint32_t SR; /*!< SPI/I2S Status register, Address offset: 0x14 */ + __IO uint32_t IFCR; /*!< SPI/I2S Interrupt/Status flags clear register, Address offset: 0x18 */ + uint32_t RESERVED0; /*!< Reserved, 0x1C */ + __IO uint32_t TXDR; /*!< SPI/I2S Transmit data register, Address offset: 0x20 */ + uint32_t RESERVED1[3]; /*!< Reserved, 0x24-0x2C */ + __IO uint32_t RXDR; /*!< SPI/I2S Receive data register, Address offset: 0x30 */ + uint32_t RESERVED2[3]; /*!< Reserved, 0x34-0x3C */ + __IO uint32_t CRCPOLY; /*!< SPI CRC Polynomial register, Address offset: 0x40 */ + __IO uint32_t TXCRC; /*!< SPI Transmitter CRC register, Address offset: 0x44 */ + __IO uint32_t RXCRC; /*!< SPI Receiver CRC register, Address offset: 0x48 */ + __IO uint32_t UDRDR; /*!< SPI Underrun data register, Address offset: 0x4C */ + __IO uint32_t I2SCFGR; /*!< I2S Configuration register, Address offset: 0x50 */ + +} SPI_TypeDef; + +/** + * @brief DTS + */ +typedef struct +{ + __IO uint32_t CFGR1; /*!< DTS configuration register, Address offset: 0x00 */ + uint32_t RESERVED0; /*!< Reserved, Address offset: 0x04 */ + __IO uint32_t T0VALR1; /*!< DTS T0 Value register, Address offset: 0x08 */ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x0C */ + __IO uint32_t RAMPVALR; /*!< DTS Ramp value register, Address offset: 0x10 */ + __IO uint32_t ITR1; /*!< DTS Interrupt threshold register, Address offset: 0x14 */ + uint32_t RESERVED2; /*!< Reserved, Address offset: 0x18 */ + __IO uint32_t DR; /*!< DTS data register, Address offset: 0x1C */ + __IO uint32_t SR; /*!< DTS status register Address offset: 0x20 */ + __IO uint32_t ITENR; /*!< DTS Interrupt enable register, Address offset: 0x24 */ + __IO uint32_t ICIFR; /*!< DTS Clear Interrupt flag register, Address offset: 0x28 */ + __IO uint32_t OR; /*!< DTS option register 1, Address offset: 0x2C */ +} +DTS_TypeDef; + +/** + * @brief TIM + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< TIM control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< TIM control register 2, Address offset: 0x04 */ + __IO uint32_t SMCR; /*!< TIM slave mode control register, Address offset: 0x08 */ + __IO uint32_t DIER; /*!< TIM DMA/interrupt enable register, Address offset: 0x0C */ + __IO uint32_t SR; /*!< TIM status register, Address offset: 0x10 */ + __IO uint32_t EGR; /*!< TIM event generation register, Address offset: 0x14 */ + __IO uint32_t CCMR1; /*!< TIM capture/compare mode register 1, Address offset: 0x18 */ + __IO uint32_t CCMR2; /*!< TIM capture/compare mode register 2, Address offset: 0x1C */ + __IO uint32_t CCER; /*!< TIM capture/compare enable register, Address offset: 0x20 */ + __IO uint32_t CNT; /*!< TIM counter register, Address offset: 0x24 */ + __IO uint32_t PSC; /*!< TIM prescaler, Address offset: 0x28 */ + __IO uint32_t ARR; /*!< TIM auto-reload register, Address offset: 0x2C */ + __IO uint32_t RCR; /*!< TIM repetition counter register, Address offset: 0x30 */ + __IO uint32_t CCR1; /*!< TIM capture/compare register 1, Address offset: 0x34 */ + __IO uint32_t CCR2; /*!< TIM capture/compare register 2, Address offset: 0x38 */ + __IO uint32_t CCR3; /*!< TIM capture/compare register 3, Address offset: 0x3C */ + __IO uint32_t CCR4; /*!< TIM capture/compare register 4, Address offset: 0x40 */ + __IO uint32_t BDTR; /*!< TIM break and dead-time register, Address offset: 0x44 */ + __IO uint32_t DCR; /*!< TIM DMA control register, Address offset: 0x48 */ + __IO uint32_t DMAR; /*!< TIM DMA address for full transfer, Address offset: 0x4C */ + uint32_t RESERVED1; /*!< Reserved, 0x50 */ + __IO uint32_t CCMR3; /*!< TIM capture/compare mode register 3, Address offset: 0x54 */ + __IO uint32_t CCR5; /*!< TIM capture/compare register5, Address offset: 0x58 */ + __IO uint32_t CCR6; /*!< TIM capture/compare register6, Address offset: 0x5C */ + __IO uint32_t AF1; /*!< TIM alternate function option register 1, Address offset: 0x60 */ + __IO uint32_t AF2; /*!< TIM alternate function option register 2, Address offset: 0x64 */ + __IO uint32_t TISEL; /*!< TIM Input Selection register, Address offset: 0x68 */ +} TIM_TypeDef; + +/** + * @brief LPTIMIMER + */ +typedef struct +{ + __IO uint32_t ISR; /*!< LPTIM Interrupt and Status register, Address offset: 0x00 */ + __IO uint32_t ICR; /*!< LPTIM Interrupt Clear register, Address offset: 0x04 */ + __IO uint32_t IER; /*!< LPTIM Interrupt Enable register, Address offset: 0x08 */ + __IO uint32_t CFGR; /*!< LPTIM Configuration register, Address offset: 0x0C */ + __IO uint32_t CR; /*!< LPTIM Control register, Address offset: 0x10 */ + __IO uint32_t CMP; /*!< LPTIM Compare register, Address offset: 0x14 */ + __IO uint32_t ARR; /*!< LPTIM Autoreload register, Address offset: 0x18 */ + __IO uint32_t CNT; /*!< LPTIM Counter register, Address offset: 0x1C */ + uint32_t RESERVED1; /*!< Reserved, 0x20 */ + __IO uint32_t CFGR2; /*!< LPTIM Configuration register, Address offset: 0x24 */ +} LPTIM_TypeDef; + +/** + * @brief Comparator + */ +typedef struct +{ + __IO uint32_t SR; /*!< Comparator status register, Address offset: 0x00 */ + __IO uint32_t ICFR; /*!< Comparator interrupt clear flag register, Address offset: 0x04 */ + __IO uint32_t OR; /*!< Comparator option register, Address offset: 0x08 */ +} COMPOPT_TypeDef; + +typedef struct +{ + __IO uint32_t CFGR; /*!< Comparator configuration register , Address offset: 0x00 */ +} COMP_TypeDef; + +typedef struct +{ + __IO uint32_t CFGR; /*!< COMP control and status register, used for bits common to several COMP instances, Address offset: 0x00 */ +} COMP_Common_TypeDef; +/** + * @brief Universal Synchronous Asynchronous Receiver Transmitter + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< USART Control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< USART Control register 2, Address offset: 0x04 */ + __IO uint32_t CR3; /*!< USART Control register 3, Address offset: 0x08 */ + __IO uint32_t BRR; /*!< USART Baud rate register, Address offset: 0x0C */ + __IO uint32_t GTPR; /*!< USART Guard time and prescaler register, Address offset: 0x10 */ + __IO uint32_t RTOR; /*!< USART Receiver Time Out register, Address offset: 0x14 */ + __IO uint32_t RQR; /*!< USART Request register, Address offset: 0x18 */ + __IO uint32_t ISR; /*!< USART Interrupt and status register, Address offset: 0x1C */ + __IO uint32_t ICR; /*!< USART Interrupt flag Clear register, Address offset: 0x20 */ + __IO uint32_t RDR; /*!< USART Receive Data register, Address offset: 0x24 */ + __IO uint32_t TDR; /*!< USART Transmit Data register, Address offset: 0x28 */ + __IO uint32_t PRESC; /*!< USART clock Prescaler register, Address offset: 0x2C */ +} USART_TypeDef; + +/** + * @brief Single Wire Protocol Master Interface SPWMI + */ +typedef struct +{ + __IO uint32_t CR; /*!< SWPMI Configuration/Control register, Address offset: 0x00 */ + __IO uint32_t BRR; /*!< SWPMI bitrate register, Address offset: 0x04 */ + uint32_t RESERVED1; /*!< Reserved, 0x08 */ + __IO uint32_t ISR; /*!< SWPMI Interrupt and Status register, Address offset: 0x0C */ + __IO uint32_t ICR; /*!< SWPMI Interrupt Flag Clear register, Address offset: 0x10 */ + __IO uint32_t IER; /*!< SWPMI Interrupt Enable register, Address offset: 0x14 */ + __IO uint32_t RFL; /*!< SWPMI Receive Frame Length register, Address offset: 0x18 */ + __IO uint32_t TDR; /*!< SWPMI Transmit data register, Address offset: 0x1C */ + __IO uint32_t RDR; /*!< SWPMI Receive data register, Address offset: 0x20 */ + __IO uint32_t OR; /*!< SWPMI Option register, Address offset: 0x24 */ +} SWPMI_TypeDef; + +/** + * @brief Window WATCHDOG + */ + +typedef struct +{ + __IO uint32_t CR; /*!< WWDG Control register, Address offset: 0x00 */ + __IO uint32_t CFR; /*!< WWDG Configuration register, Address offset: 0x04 */ + __IO uint32_t SR; /*!< WWDG Status register, Address offset: 0x08 */ +} WWDG_TypeDef; + + +/** + * @brief RAM_ECC_Specific_Registers + */ +typedef struct +{ + __IO uint32_t CR; /*!< RAMECC monitor configuration register */ + __IO uint32_t SR; /*!< RAMECC monitor status register */ + __IO uint32_t FAR; /*!< RAMECC monitor failing address register */ + __IO uint32_t FDRL; /*!< RAMECC monitor failing data low register */ + __IO uint32_t FDRH; /*!< RAMECC monitor failing data high register */ + __IO uint32_t FECR; /*!< RAMECC monitor failing ECC error code register */ +} RAMECC_MonitorTypeDef; + +typedef struct +{ + __IO uint32_t IER; /*!< RAMECC interrupt enable register */ +} RAMECC_TypeDef; +/** + * @} + */ + + +/** + * @brief Crypto Processor + */ + +typedef struct +{ + __IO uint32_t CR; /*!< CRYP control register, Address offset: 0x00 */ + __IO uint32_t SR; /*!< CRYP status register, Address offset: 0x04 */ + __IO uint32_t DIN; /*!< CRYP data input register, Address offset: 0x08 */ + __IO uint32_t DOUT; /*!< CRYP data output register, Address offset: 0x0C */ + __IO uint32_t DMACR; /*!< CRYP DMA control register, Address offset: 0x10 */ + __IO uint32_t IMSCR; /*!< CRYP interrupt mask set/clear register, Address offset: 0x14 */ + __IO uint32_t RISR; /*!< CRYP raw interrupt status register, Address offset: 0x18 */ + __IO uint32_t MISR; /*!< CRYP masked interrupt status register, Address offset: 0x1C */ + __IO uint32_t K0LR; /*!< CRYP key left register 0, Address offset: 0x20 */ + __IO uint32_t K0RR; /*!< CRYP key right register 0, Address offset: 0x24 */ + __IO uint32_t K1LR; /*!< CRYP key left register 1, Address offset: 0x28 */ + __IO uint32_t K1RR; /*!< CRYP key right register 1, Address offset: 0x2C */ + __IO uint32_t K2LR; /*!< CRYP key left register 2, Address offset: 0x30 */ + __IO uint32_t K2RR; /*!< CRYP key right register 2, Address offset: 0x34 */ + __IO uint32_t K3LR; /*!< CRYP key left register 3, Address offset: 0x38 */ + __IO uint32_t K3RR; /*!< CRYP key right register 3, Address offset: 0x3C */ + __IO uint32_t IV0LR; /*!< CRYP initialization vector left-word register 0, Address offset: 0x40 */ + __IO uint32_t IV0RR; /*!< CRYP initialization vector right-word register 0, Address offset: 0x44 */ + __IO uint32_t IV1LR; /*!< CRYP initialization vector left-word register 1, Address offset: 0x48 */ + __IO uint32_t IV1RR; /*!< CRYP initialization vector right-word register 1, Address offset: 0x4C */ + __IO uint32_t CSGCMCCM0R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 0, Address offset: 0x50 */ + __IO uint32_t CSGCMCCM1R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 1, Address offset: 0x54 */ + __IO uint32_t CSGCMCCM2R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 2, Address offset: 0x58 */ + __IO uint32_t CSGCMCCM3R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 3, Address offset: 0x5C */ + __IO uint32_t CSGCMCCM4R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 4, Address offset: 0x60 */ + __IO uint32_t CSGCMCCM5R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 5, Address offset: 0x64 */ + __IO uint32_t CSGCMCCM6R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 6, Address offset: 0x68 */ + __IO uint32_t CSGCMCCM7R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 7, Address offset: 0x6C */ + __IO uint32_t CSGCM0R; /*!< CRYP GCM/GMAC context swap register 0, Address offset: 0x70 */ + __IO uint32_t CSGCM1R; /*!< CRYP GCM/GMAC context swap register 1, Address offset: 0x74 */ + __IO uint32_t CSGCM2R; /*!< CRYP GCM/GMAC context swap register 2, Address offset: 0x78 */ + __IO uint32_t CSGCM3R; /*!< CRYP GCM/GMAC context swap register 3, Address offset: 0x7C */ + __IO uint32_t CSGCM4R; /*!< CRYP GCM/GMAC context swap register 4, Address offset: 0x80 */ + __IO uint32_t CSGCM5R; /*!< CRYP GCM/GMAC context swap register 5, Address offset: 0x84 */ + __IO uint32_t CSGCM6R; /*!< CRYP GCM/GMAC context swap register 6, Address offset: 0x88 */ + __IO uint32_t CSGCM7R; /*!< CRYP GCM/GMAC context swap register 7, Address offset: 0x8C */ +} CRYP_TypeDef; + +/** + * @brief HASH + */ + +typedef struct +{ + __IO uint32_t CR; /*!< HASH control register, Address offset: 0x00 */ + __IO uint32_t DIN; /*!< HASH data input register, Address offset: 0x04 */ + __IO uint32_t STR; /*!< HASH start register, Address offset: 0x08 */ + __IO uint32_t HR[5]; /*!< HASH digest registers, Address offset: 0x0C-0x1C */ + __IO uint32_t IMR; /*!< HASH interrupt enable register, Address offset: 0x20 */ + __IO uint32_t SR; /*!< HASH status register, Address offset: 0x24 */ + uint32_t RESERVED[52]; /*!< Reserved, 0x28-0xF4 */ + __IO uint32_t CSR[54]; /*!< HASH context swap registers, Address offset: 0x0F8-0x1CC */ +} HASH_TypeDef; + +/** + * @brief HASH_DIGEST + */ + +typedef struct +{ + __IO uint32_t HR[8]; /*!< HASH digest registers, Address offset: 0x310-0x32C */ +} HASH_DIGEST_TypeDef; + + +/** + * @brief RNG + */ + +typedef struct +{ + __IO uint32_t CR; /*!< RNG control register, Address offset: 0x00 */ + __IO uint32_t SR; /*!< RNG status register, Address offset: 0x04 */ + __IO uint32_t DR; /*!< RNG data register, Address offset: 0x08 */ + uint32_t RESERVED; + __IO uint32_t HTCR; /*!< RNG health test configuration register, Address offset: 0x10 */ +} RNG_TypeDef; + +/** + * @brief MDIOS + */ + +typedef struct +{ + __IO uint32_t CR; + __IO uint32_t WRFR; + __IO uint32_t CWRFR; + __IO uint32_t RDFR; + __IO uint32_t CRDFR; + __IO uint32_t SR; + __IO uint32_t CLRFR; + uint32_t RESERVED[57]; + __IO uint32_t DINR0; + __IO uint32_t DINR1; + __IO uint32_t DINR2; + __IO uint32_t DINR3; + __IO uint32_t DINR4; + __IO uint32_t DINR5; + __IO uint32_t DINR6; + __IO uint32_t DINR7; + __IO uint32_t DINR8; + __IO uint32_t DINR9; + __IO uint32_t DINR10; + __IO uint32_t DINR11; + __IO uint32_t DINR12; + __IO uint32_t DINR13; + __IO uint32_t DINR14; + __IO uint32_t DINR15; + __IO uint32_t DINR16; + __IO uint32_t DINR17; + __IO uint32_t DINR18; + __IO uint32_t DINR19; + __IO uint32_t DINR20; + __IO uint32_t DINR21; + __IO uint32_t DINR22; + __IO uint32_t DINR23; + __IO uint32_t DINR24; + __IO uint32_t DINR25; + __IO uint32_t DINR26; + __IO uint32_t DINR27; + __IO uint32_t DINR28; + __IO uint32_t DINR29; + __IO uint32_t DINR30; + __IO uint32_t DINR31; + __IO uint32_t DOUTR0; + __IO uint32_t DOUTR1; + __IO uint32_t DOUTR2; + __IO uint32_t DOUTR3; + __IO uint32_t DOUTR4; + __IO uint32_t DOUTR5; + __IO uint32_t DOUTR6; + __IO uint32_t DOUTR7; + __IO uint32_t DOUTR8; + __IO uint32_t DOUTR9; + __IO uint32_t DOUTR10; + __IO uint32_t DOUTR11; + __IO uint32_t DOUTR12; + __IO uint32_t DOUTR13; + __IO uint32_t DOUTR14; + __IO uint32_t DOUTR15; + __IO uint32_t DOUTR16; + __IO uint32_t DOUTR17; + __IO uint32_t DOUTR18; + __IO uint32_t DOUTR19; + __IO uint32_t DOUTR20; + __IO uint32_t DOUTR21; + __IO uint32_t DOUTR22; + __IO uint32_t DOUTR23; + __IO uint32_t DOUTR24; + __IO uint32_t DOUTR25; + __IO uint32_t DOUTR26; + __IO uint32_t DOUTR27; + __IO uint32_t DOUTR28; + __IO uint32_t DOUTR29; + __IO uint32_t DOUTR30; + __IO uint32_t DOUTR31; +} MDIOS_TypeDef; + + +/** + * @brief USB_OTG_Core_Registers + */ +typedef struct +{ + __IO uint32_t GOTGCTL; /*!< USB_OTG Control and Status Register 000h */ + __IO uint32_t GOTGINT; /*!< USB_OTG Interrupt Register 004h */ + __IO uint32_t GAHBCFG; /*!< Core AHB Configuration Register 008h */ + __IO uint32_t GUSBCFG; /*!< Core USB Configuration Register 00Ch */ + __IO uint32_t GRSTCTL; /*!< Core Reset Register 010h */ + __IO uint32_t GINTSTS; /*!< Core Interrupt Register 014h */ + __IO uint32_t GINTMSK; /*!< Core Interrupt Mask Register 018h */ + __IO uint32_t GRXSTSR; /*!< Receive Sts Q Read Register 01Ch */ + __IO uint32_t GRXSTSP; /*!< Receive Sts Q Read & POP Register 020h */ + __IO uint32_t GRXFSIZ; /*!< Receive FIFO Size Register 024h */ + __IO uint32_t DIEPTXF0_HNPTXFSIZ; /*!< EP0 / Non Periodic Tx FIFO Size Register 028h */ + __IO uint32_t HNPTXSTS; /*!< Non Periodic Tx FIFO/Queue Sts reg 02Ch */ + uint32_t Reserved30[2]; /*!< Reserved 030h */ + __IO uint32_t GCCFG; /*!< General Purpose IO Register 038h */ + __IO uint32_t CID; /*!< User ID Register 03Ch */ + __IO uint32_t GSNPSID; /* USB_OTG core ID 040h*/ + __IO uint32_t GHWCFG1; /* User HW config1 044h*/ + __IO uint32_t GHWCFG2; /* User HW config2 048h*/ + __IO uint32_t GHWCFG3; /*!< User HW config3 04Ch */ + uint32_t Reserved6; /*!< Reserved 050h */ + __IO uint32_t GLPMCFG; /*!< LPM Register 054h */ + __IO uint32_t GPWRDN; /*!< Power Down Register 058h */ + __IO uint32_t GDFIFOCFG; /*!< DFIFO Software Config Register 05Ch */ + __IO uint32_t GADPCTL; /*!< ADP Timer, Control and Status Register 60Ch */ + uint32_t Reserved43[39]; /*!< Reserved 058h-0FFh */ + __IO uint32_t HPTXFSIZ; /*!< Host Periodic Tx FIFO Size Reg 100h */ + __IO uint32_t DIEPTXF[0x0F]; /*!< dev Periodic Transmit FIFO */ +} USB_OTG_GlobalTypeDef; + + +/** + * @brief USB_OTG_device_Registers + */ +typedef struct +{ + __IO uint32_t DCFG; /*!< dev Configuration Register 800h */ + __IO uint32_t DCTL; /*!< dev Control Register 804h */ + __IO uint32_t DSTS; /*!< dev Status Register (RO) 808h */ + uint32_t Reserved0C; /*!< Reserved 80Ch */ + __IO uint32_t DIEPMSK; /*!< dev IN Endpoint Mask 810h */ + __IO uint32_t DOEPMSK; /*!< dev OUT Endpoint Mask 814h */ + __IO uint32_t DAINT; /*!< dev All Endpoints Itr Reg 818h */ + __IO uint32_t DAINTMSK; /*!< dev All Endpoints Itr Mask 81Ch */ + uint32_t Reserved20; /*!< Reserved 820h */ + uint32_t Reserved9; /*!< Reserved 824h */ + __IO uint32_t DVBUSDIS; /*!< dev VBUS discharge Register 828h */ + __IO uint32_t DVBUSPULSE; /*!< dev VBUS Pulse Register 82Ch */ + __IO uint32_t DTHRCTL; /*!< dev threshold 830h */ + __IO uint32_t DIEPEMPMSK; /*!< dev empty msk 834h */ + __IO uint32_t DEACHINT; /*!< dedicated EP interrupt 838h */ + __IO uint32_t DEACHMSK; /*!< dedicated EP msk 83Ch */ + uint32_t Reserved40; /*!< dedicated EP mask 840h */ + __IO uint32_t DINEP1MSK; /*!< dedicated EP mask 844h */ + uint32_t Reserved44[15]; /*!< Reserved 844-87Ch */ + __IO uint32_t DOUTEP1MSK; /*!< dedicated EP msk 884h */ +} USB_OTG_DeviceTypeDef; + + +/** + * @brief USB_OTG_IN_Endpoint-Specific_Register + */ +typedef struct +{ + __IO uint32_t DIEPCTL; /*!< dev IN Endpoint Control Reg 900h + (ep_num * 20h) + 00h */ + uint32_t Reserved04; /*!< Reserved 900h + (ep_num * 20h) + 04h */ + __IO uint32_t DIEPINT; /*!< dev IN Endpoint Itr Reg 900h + (ep_num * 20h) + 08h */ + uint32_t Reserved0C; /*!< Reserved 900h + (ep_num * 20h) + 0Ch */ + __IO uint32_t DIEPTSIZ; /*!< IN Endpoint Txfer Size 900h + (ep_num * 20h) + 10h */ + __IO uint32_t DIEPDMA; /*!< IN Endpoint DMA Address Reg 900h + (ep_num * 20h) + 14h */ + __IO uint32_t DTXFSTS; /*!< IN Endpoint Tx FIFO Status Reg 900h + (ep_num * 20h) + 18h */ + uint32_t Reserved18; /*!< Reserved 900h+(ep_num*20h)+1Ch-900h+ (ep_num * 20h) + 1Ch */ +} USB_OTG_INEndpointTypeDef; + + +/** + * @brief USB_OTG_OUT_Endpoint-Specific_Registers + */ +typedef struct +{ + __IO uint32_t DOEPCTL; /*!< dev OUT Endpoint Control Reg B00h + (ep_num * 20h) + 00h */ + uint32_t Reserved04; /*!< Reserved B00h + (ep_num * 20h) + 04h */ + __IO uint32_t DOEPINT; /*!< dev OUT Endpoint Itr Reg B00h + (ep_num * 20h) + 08h */ + uint32_t Reserved0C; /*!< Reserved B00h + (ep_num * 20h) + 0Ch */ + __IO uint32_t DOEPTSIZ; /*!< dev OUT Endpoint Txfer Size B00h + (ep_num * 20h) + 10h */ + __IO uint32_t DOEPDMA; /*!< dev OUT Endpoint DMA Address B00h + (ep_num * 20h) + 14h */ + uint32_t Reserved18[2]; /*!< Reserved B00h + (ep_num * 20h) + 18h - B00h + (ep_num * 20h) + 1Ch */ +} USB_OTG_OUTEndpointTypeDef; + + +/** + * @brief USB_OTG_Host_Mode_Register_Structures + */ +typedef struct +{ + __IO uint32_t HCFG; /*!< Host Configuration Register 400h */ + __IO uint32_t HFIR; /*!< Host Frame Interval Register 404h */ + __IO uint32_t HFNUM; /*!< Host Frame Nbr/Frame Remaining 408h */ + uint32_t Reserved40C; /*!< Reserved 40Ch */ + __IO uint32_t HPTXSTS; /*!< Host Periodic Tx FIFO/ Queue Status 410h */ + __IO uint32_t HAINT; /*!< Host All Channels Interrupt Register 414h */ + __IO uint32_t HAINTMSK; /*!< Host All Channels Interrupt Mask 418h */ +} USB_OTG_HostTypeDef; + +/** + * @brief USB_OTG_Host_Channel_Specific_Registers + */ +typedef struct +{ + __IO uint32_t HCCHAR; /*!< Host Channel Characteristics Register 500h */ + __IO uint32_t HCSPLT; /*!< Host Channel Split Control Register 504h */ + __IO uint32_t HCINT; /*!< Host Channel Interrupt Register 508h */ + __IO uint32_t HCINTMSK; /*!< Host Channel Interrupt Mask Register 50Ch */ + __IO uint32_t HCTSIZ; /*!< Host Channel Transfer Size Register 510h */ + __IO uint32_t HCDMA; /*!< Host Channel DMA Address Register 514h */ + uint32_t Reserved[2]; /*!< Reserved */ +} USB_OTG_HostChannelTypeDef; +/** + * @} + */ + +/** + * @brief OCTO Serial Peripheral Interface + */ + +typedef struct +{ + __IO uint32_t CR; /*!< OCTOSPI Control register, Address offset: 0x000 */ + uint32_t RESERVED; /*!< Reserved, Address offset: 0x004 */ + __IO uint32_t DCR1; /*!< OCTOSPI Device Configuration register 1, Address offset: 0x008 */ + __IO uint32_t DCR2; /*!< OCTOSPI Device Configuration register 2, Address offset: 0x00C */ + __IO uint32_t DCR3; /*!< OCTOSPI Device Configuration register 3, Address offset: 0x010 */ + __IO uint32_t DCR4; /*!< OCTOSPI Device Configuration register 4, Address offset: 0x014 */ + uint32_t RESERVED1[2]; /*!< Reserved, Address offset: 0x018-0x01C */ + __IO uint32_t SR; /*!< OCTOSPI Status register, Address offset: 0x020 */ + __IO uint32_t FCR; /*!< OCTOSPI Flag Clear register, Address offset: 0x024 */ + uint32_t RESERVED2[6]; /*!< Reserved, Address offset: 0x028-0x03C */ + __IO uint32_t DLR; /*!< OCTOSPI Data Length register, Address offset: 0x040 */ + uint32_t RESERVED3; /*!< Reserved, Address offset: 0x044 */ + __IO uint32_t AR; /*!< OCTOSPI Address register, Address offset: 0x048 */ + uint32_t RESERVED4; /*!< Reserved, Address offset: 0x04C */ + __IO uint32_t DR; /*!< OCTOSPI Data register, Address offset: 0x050 */ + uint32_t RESERVED5[11]; /*!< Reserved, Address offset: 0x054-0x07C */ + __IO uint32_t PSMKR; /*!< OCTOSPI Polling Status Mask register, Address offset: 0x080 */ + uint32_t RESERVED6; /*!< Reserved, Address offset: 0x084 */ + __IO uint32_t PSMAR; /*!< OCTOSPI Polling Status Match register, Address offset: 0x088 */ + uint32_t RESERVED7; /*!< Reserved, Address offset: 0x08C */ + __IO uint32_t PIR; /*!< OCTOSPI Polling Interval register, Address offset: 0x090 */ + uint32_t RESERVED8[27]; /*!< Reserved, Address offset: 0x094-0x0FC */ + __IO uint32_t CCR; /*!< OCTOSPI Communication Configuration register, Address offset: 0x100 */ + uint32_t RESERVED9; /*!< Reserved, Address offset: 0x104 */ + __IO uint32_t TCR; /*!< OCTOSPI Timing Configuration register, Address offset: 0x108 */ + uint32_t RESERVED10; /*!< Reserved, Address offset: 0x10C */ + __IO uint32_t IR; /*!< OCTOSPI Instruction register, Address offset: 0x110 */ + uint32_t RESERVED11[3]; /*!< Reserved, Address offset: 0x114-0x11C */ + __IO uint32_t ABR; /*!< OCTOSPI Alternate Bytes register, Address offset: 0x120 */ + uint32_t RESERVED12[3]; /*!< Reserved, Address offset: 0x124-0x12C */ + __IO uint32_t LPTR; /*!< OCTOSPI Low Power Timeout register, Address offset: 0x130 */ + uint32_t RESERVED13[3]; /*!< Reserved, Address offset: 0x134-0x13C */ + __IO uint32_t WPCCR; /*!< OCTOSPI Wrap Communication Configuration register, Address offset: 0x140 */ + uint32_t RESERVED14; /*!< Reserved, Address offset: 0x144 */ + __IO uint32_t WPTCR; /*!< OCTOSPI Wrap Timing Configuration register, Address offset: 0x148 */ + uint32_t RESERVED15; /*!< Reserved, Address offset: 0x14C */ + __IO uint32_t WPIR; /*!< OCTOSPI Wrap Instruction register, Address offset: 0x150 */ + uint32_t RESERVED16[3]; /*!< Reserved, Address offset: 0x154-0x15C */ + __IO uint32_t WPABR; /*!< OCTOSPI Wrap Alternate Bytes register, Address offset: 0x160 */ + uint32_t RESERVED17[7]; /*!< Reserved, Address offset: 0x164-0x17C */ + __IO uint32_t WCCR; /*!< OCTOSPI Write Communication Configuration register, Address offset: 0x180 */ + uint32_t RESERVED18; /*!< Reserved, Address offset: 0x184 */ + __IO uint32_t WTCR; /*!< OCTOSPI Write Timing Configuration register, Address offset: 0x188 */ + uint32_t RESERVED19; /*!< Reserved, Address offset: 0x18C */ + __IO uint32_t WIR; /*!< OCTOSPI Write Instruction register, Address offset: 0x190 */ + uint32_t RESERVED20[3]; /*!< Reserved, Address offset: 0x194-0x19C */ + __IO uint32_t WABR; /*!< OCTOSPI Write Alternate Bytes register, Address offset: 0x1A0 */ + uint32_t RESERVED21[23]; /*!< Reserved, Address offset: 0x1A4-0x1FC */ + __IO uint32_t HLCR; /*!< OCTOSPI Hyperbus Latency Configuration register, Address offset: 0x200 */ + uint32_t RESERVED22[122]; /*!< Reserved, Address offset: 0x204-0x3EC */ + __IO uint32_t HWCFGR; /*!< OCTOSPI HW Configuration register, Address offset: 0x3F0 */ + __IO uint32_t VER; /*!< OCTOSPI Version register, Address offset: 0x3F4 */ + __IO uint32_t ID; /*!< OCTOSPI Identification register, Address offset: 0x3F8 */ + __IO uint32_t MID; /*!< OCTOPSI HW Magic ID register, Address offset: 0x3FC */ +} OCTOSPI_TypeDef; + +/** + * @} + */ +/** + * @brief OCTO Serial Peripheral Interface IO Manager + */ + +typedef struct +{ + __IO uint32_t CR; /*!< OCTOSPI IO Manager Control register, Address offset: 0x00 */ + __IO uint32_t PCR[3]; /*!< OCTOSPI IO Manager Port[1:3] Configuration register, Address offset: 0x04-0x20 */ +} OCTOSPIM_TypeDef; + +/** + * @} + */ + +/** + * @brief OTFD register + */ +typedef struct +{ + __IO uint32_t REG_CONFIGR; + __IO uint32_t REG_START_ADDR; + __IO uint32_t REG_END_ADDR; + __IO uint32_t REG_NONCER0; + __IO uint32_t REG_NONCER1; + __IO uint32_t REG_KEYR0; + __IO uint32_t REG_KEYR1; + __IO uint32_t REG_KEYR2; + __IO uint32_t REG_KEYR3; +} OTFDEC_Region_TypeDef; + +typedef struct +{ + __IO uint32_t CR; + uint32_t RESERVED1[191]; + __IO uint32_t ISR; + __IO uint32_t ICR; + __IO uint32_t IER; + uint32_t RESERVED2[56]; + __IO uint32_t HWCFGR2; + __IO uint32_t HWCFGR1; + __IO uint32_t VERR; + __IO uint32_t IPIDR; + __IO uint32_t SIDR; +} OTFDEC_TypeDef; +/** + * @} + */ + +/** @addtogroup Peripheral_memory_map + * @{ + */ +#define D1_ITCMRAM_BASE (0x00000000UL) /*!< Base address of : 64KB RAM reserved for CPU execution/instruction accessible over ITCM */ +#define D1_ITCMICP_BASE (0x00100000UL) /*!< Base address of : (up to 128KB) embedded Test FLASH memory accessible over ITCM */ +#define D1_DTCMRAM_BASE (0x20000000UL) /*!< Base address of : 128KB system data RAM accessible over DTCM */ +#define D1_AXIFLASH_BASE (0x08000000UL) /*!< Base address of : (up to 128 KB) embedded FLASH memory accessible over AXI */ +#define D1_AXIICP_BASE (0x1FF00000UL) /*!< Base address of : (up to 128KB) embedded Test FLASH memory accessible over AXI */ +#define D1_AXISRAM1_BASE (0x24000000UL) /*!< Base address of : (up to 128KB) system data RAM1 accessible over over AXI */ +#define D1_AXISRAM2_BASE (0x24020000UL) /*!< Base address of : (up to 192KB) system data RAM2 accessible over over AXI to be shared with ITCM (64K granularity) */ +#define D1_AXISRAM_BASE D1_AXISRAM1_BASE /*!< Base address of : (up to 320KB) system data RAM1/2 accessible over over AXI */ + +#define D2_AHBSRAM1_BASE (0x30000000UL) /*!< Base address of : (up to 16KB) system data RAM accessible over over AXI->AHB Bridge */ +#define D2_AHBSRAM2_BASE (0x30004000UL) /*!< Base address of : (up to 16KB) system data RAM accessible over over AXI->AHB Bridge */ +#define D2_AHBSRAM_BASE D2_AHBSRAM1_BASE /*!< Base address of : (up to 32KB) system data RAM1/2 accessible over over AXI->AHB Bridge */ + +#define D3_BKPSRAM_BASE (0x38800000UL) /*!< Base address of : Backup SRAM(4 KB) over AXI->AHB Bridge */ +#define D3_SRAM_BASE (0x38000000UL) /*!< Base address of : Backup SRAM(16 KB) over AXI->AHB Bridge */ + +#define PERIPH_BASE (0x40000000UL) /*!< Base address of : AHB/APB Peripherals */ +#define OCTOSPI1_BASE (0x90000000UL) /*!< Base address of : OCTOSPI1 memories accessible over AXI */ +#define OCTOSPI2_BASE (0x70000000UL) /*!< Base address of : OCTOSPI2 memories accessible over AXI */ + +#define FLASH_BANK1_BASE (0x08000000UL) /*!< Base address of : (up to 128 KB) Flash Bank1 accessible over AXI */ +#define FLASH_END (0x0801FFFFUL) /*!< FLASH end address */ + + +/* Legacy define */ +#define FLASH_BASE FLASH_BANK1_BASE + +/*!< Device electronic signature memory map */ +#define UID_BASE (0x1FF1E800UL) /*!< Unique device ID register base address */ +#define FLASHSIZE_BASE (0x1FF1E880UL) /*!< FLASH Size register base address */ + + +/*!< Peripheral memory map */ +#define D2_APB1PERIPH_BASE PERIPH_BASE +#define D2_APB2PERIPH_BASE (PERIPH_BASE + 0x00010000UL) +#define D2_AHB1PERIPH_BASE (PERIPH_BASE + 0x00020000UL) +#define D2_AHB2PERIPH_BASE (PERIPH_BASE + 0x08020000UL) + +#define D1_APB1PERIPH_BASE (PERIPH_BASE + 0x10000000UL) +#define D1_AHB1PERIPH_BASE (PERIPH_BASE + 0x12000000UL) + +#define D3_APB1PERIPH_BASE (PERIPH_BASE + 0x18000000UL) +#define D3_AHB1PERIPH_BASE (PERIPH_BASE + 0x18020000UL) + +/*!< Legacy Peripheral memory map */ +#define APB1PERIPH_BASE PERIPH_BASE +#define APB2PERIPH_BASE (PERIPH_BASE + 0x00010000UL) +#define AHB1PERIPH_BASE (PERIPH_BASE + 0x00020000UL) +#define AHB2PERIPH_BASE (PERIPH_BASE + 0x08000000UL) + + +/*!< D1_AHB1PERIPH peripherals */ + +#define MDMA_BASE (D1_AHB1PERIPH_BASE + 0x0000UL) +#define DMA2D_BASE (D1_AHB1PERIPH_BASE + 0x1000UL) +#define FLASH_R_BASE (D1_AHB1PERIPH_BASE + 0x2000UL) +#define FMC_R_BASE (D1_AHB1PERIPH_BASE + 0x4000UL) +#define OCTOSPI1_R_BASE (D1_AHB1PERIPH_BASE + 0x5000UL) +#define DLYB_OCTOSPI1_BASE (D1_AHB1PERIPH_BASE + 0x6000UL) +#define SDMMC1_BASE (D1_AHB1PERIPH_BASE + 0x7000UL) +#define DLYB_SDMMC1_BASE (D1_AHB1PERIPH_BASE + 0x8000UL) +#define RAMECC1_BASE (D1_AHB1PERIPH_BASE + 0x9000UL) +#define OCTOSPI2_R_BASE (D1_AHB1PERIPH_BASE + 0xA000UL) +#define DLYB_OCTOSPI2_BASE (D1_AHB1PERIPH_BASE + 0xB000UL) +#define OCTOSPIM_BASE (D1_AHB1PERIPH_BASE + 0xB400UL) + +#define OTFDEC1_BASE (D1_AHB1PERIPH_BASE + 0xB800UL) +#define OTFDEC1_REGION1_BASE (OTFDEC1_BASE + 0x20UL) +#define OTFDEC1_REGION2_BASE (OTFDEC1_BASE + 0x50UL) +#define OTFDEC1_REGION3_BASE (OTFDEC1_BASE + 0x80UL) +#define OTFDEC1_REGION4_BASE (OTFDEC1_BASE + 0xB0UL) +#define OTFDEC2_BASE (D1_AHB1PERIPH_BASE + 0xBC00UL) +#define OTFDEC2_REGION1_BASE (OTFDEC2_BASE + 0x20UL) +#define OTFDEC2_REGION2_BASE (OTFDEC2_BASE + 0x50UL) +#define OTFDEC2_REGION3_BASE (OTFDEC2_BASE + 0x80UL) +#define OTFDEC2_REGION4_BASE (OTFDEC2_BASE + 0xB0UL) + +/*!< D2_AHB1PERIPH peripherals */ + +#define DMA1_BASE (D2_AHB1PERIPH_BASE + 0x0000UL) +#define DMA2_BASE (D2_AHB1PERIPH_BASE + 0x0400UL) +#define DMAMUX1_BASE (D2_AHB1PERIPH_BASE + 0x0800UL) +#define ADC1_BASE (D2_AHB1PERIPH_BASE + 0x2000UL) +#define ADC2_BASE (D2_AHB1PERIPH_BASE + 0x2100UL) +#define ADC12_COMMON_BASE (D2_AHB1PERIPH_BASE + 0x2300UL) +#define ETH_BASE (D2_AHB1PERIPH_BASE + 0x8000UL) +#define ETH_MAC_BASE (ETH_BASE) + +/*!< USB registers base address */ +#define USB1_OTG_HS_PERIPH_BASE (0x40040000UL) +#define USB_OTG_GLOBAL_BASE (0x000UL) +#define USB_OTG_DEVICE_BASE (0x800UL) +#define USB_OTG_IN_ENDPOINT_BASE (0x900UL) +#define USB_OTG_OUT_ENDPOINT_BASE (0xB00UL) +#define USB_OTG_EP_REG_SIZE (0x20UL) +#define USB_OTG_HOST_BASE (0x400UL) +#define USB_OTG_HOST_PORT_BASE (0x440UL) +#define USB_OTG_HOST_CHANNEL_BASE (0x500UL) +#define USB_OTG_HOST_CHANNEL_SIZE (0x20UL) +#define USB_OTG_PCGCCTL_BASE (0xE00UL) +#define USB_OTG_FIFO_BASE (0x1000UL) +#define USB_OTG_FIFO_SIZE (0x1000UL) + +/*!< D2_AHB2PERIPH peripherals */ + +#define DCMI_BASE (D2_AHB2PERIPH_BASE + 0x0000UL) +#define PSSI_BASE (D2_AHB2PERIPH_BASE + 0x0400UL) +#define CRYP_BASE (D2_AHB2PERIPH_BASE + 0x1000UL) +#define HASH_BASE (D2_AHB2PERIPH_BASE + 0x1400UL) +#define HASH_DIGEST_BASE (D2_AHB2PERIPH_BASE + 0x1710UL) +#define RNG_BASE (D2_AHB2PERIPH_BASE + 0x1800UL) +#define SDMMC2_BASE (D2_AHB2PERIPH_BASE + 0x2400UL) +#define DLYB_SDMMC2_BASE (D2_AHB2PERIPH_BASE + 0x2800UL) +#define RAMECC2_BASE (D2_AHB2PERIPH_BASE + 0x3000UL) +#define FMAC_BASE (D2_AHB2PERIPH_BASE + 0x4000UL) +#define CORDIC_BASE (D2_AHB2PERIPH_BASE + 0x4400UL) + +/*!< D3_AHB1PERIPH peripherals */ +#define GPIOA_BASE (D3_AHB1PERIPH_BASE + 0x0000UL) +#define GPIOB_BASE (D3_AHB1PERIPH_BASE + 0x0400UL) +#define GPIOC_BASE (D3_AHB1PERIPH_BASE + 0x0800UL) +#define GPIOD_BASE (D3_AHB1PERIPH_BASE + 0x0C00UL) +#define GPIOE_BASE (D3_AHB1PERIPH_BASE + 0x1000UL) +#define GPIOF_BASE (D3_AHB1PERIPH_BASE + 0x1400UL) +#define GPIOG_BASE (D3_AHB1PERIPH_BASE + 0x1800UL) +#define GPIOH_BASE (D3_AHB1PERIPH_BASE + 0x1C00UL) +#define GPIOJ_BASE (D3_AHB1PERIPH_BASE + 0x2400UL) +#define GPIOK_BASE (D3_AHB1PERIPH_BASE + 0x2800UL) +#define RCC_BASE (D3_AHB1PERIPH_BASE + 0x4400UL) +#define PWR_BASE (D3_AHB1PERIPH_BASE + 0x4800UL) +#define CRC_BASE (D3_AHB1PERIPH_BASE + 0x4C00UL) +#define BDMA_BASE (D3_AHB1PERIPH_BASE + 0x5400UL) +#define DMAMUX2_BASE (D3_AHB1PERIPH_BASE + 0x5800UL) +#define ADC3_BASE (D3_AHB1PERIPH_BASE + 0x6000UL) +#define ADC3_COMMON_BASE (D3_AHB1PERIPH_BASE + 0x6300UL) +#define HSEM_BASE (D3_AHB1PERIPH_BASE + 0x6400UL) +#define RAMECC3_BASE (D3_AHB1PERIPH_BASE + 0x7000UL) + +/*!< D1_APB1PERIPH peripherals */ +#define LTDC_BASE (D1_APB1PERIPH_BASE + 0x1000UL) +#define LTDC_Layer1_BASE (LTDC_BASE + 0x84UL) +#define LTDC_Layer2_BASE (LTDC_BASE + 0x104UL) +#define WWDG1_BASE (D1_APB1PERIPH_BASE + 0x3000UL) + +/*!< D2_APB1PERIPH peripherals */ +#define TIM2_BASE (D2_APB1PERIPH_BASE + 0x0000UL) +#define TIM3_BASE (D2_APB1PERIPH_BASE + 0x0400UL) +#define TIM4_BASE (D2_APB1PERIPH_BASE + 0x0800UL) +#define TIM5_BASE (D2_APB1PERIPH_BASE + 0x0C00UL) +#define TIM6_BASE (D2_APB1PERIPH_BASE + 0x1000UL) +#define TIM7_BASE (D2_APB1PERIPH_BASE + 0x1400UL) +#define TIM12_BASE (D2_APB1PERIPH_BASE + 0x1800UL) +#define TIM13_BASE (D2_APB1PERIPH_BASE + 0x1C00UL) +#define TIM14_BASE (D2_APB1PERIPH_BASE + 0x2000UL) +#define LPTIM1_BASE (D2_APB1PERIPH_BASE + 0x2400UL) + + +#define SPI2_BASE (D2_APB1PERIPH_BASE + 0x3800UL) +#define SPI3_BASE (D2_APB1PERIPH_BASE + 0x3C00UL) +#define SPDIFRX_BASE (D2_APB1PERIPH_BASE + 0x4000UL) +#define USART2_BASE (D2_APB1PERIPH_BASE + 0x4400UL) +#define USART3_BASE (D2_APB1PERIPH_BASE + 0x4800UL) +#define UART4_BASE (D2_APB1PERIPH_BASE + 0x4C00UL) +#define UART5_BASE (D2_APB1PERIPH_BASE + 0x5000UL) +#define I2C1_BASE (D2_APB1PERIPH_BASE + 0x5400UL) +#define I2C2_BASE (D2_APB1PERIPH_BASE + 0x5800UL) +#define I2C3_BASE (D2_APB1PERIPH_BASE + 0x5C00UL) +#define I2C5_BASE (D2_APB1PERIPH_BASE + 0x6400UL) +#define CEC_BASE (D2_APB1PERIPH_BASE + 0x6C00UL) +#define DAC1_BASE (D2_APB1PERIPH_BASE + 0x7400UL) +#define UART7_BASE (D2_APB1PERIPH_BASE + 0x7800UL) +#define UART8_BASE (D2_APB1PERIPH_BASE + 0x7C00UL) +#define CRS_BASE (D2_APB1PERIPH_BASE + 0x8400UL) +#define SWPMI1_BASE (D2_APB1PERIPH_BASE + 0x8800UL) +#define OPAMP_BASE (D2_APB1PERIPH_BASE + 0x9000UL) +#define OPAMP1_BASE (D2_APB1PERIPH_BASE + 0x9000UL) +#define OPAMP2_BASE (D2_APB1PERIPH_BASE + 0x9010UL) +#define MDIOS_BASE (D2_APB1PERIPH_BASE + 0x9400UL) +#define FDCAN1_BASE (D2_APB1PERIPH_BASE + 0xA000UL) +#define FDCAN2_BASE (D2_APB1PERIPH_BASE + 0xA400UL) +#define FDCAN_CCU_BASE (D2_APB1PERIPH_BASE + 0xA800UL) +#define SRAMCAN_BASE (D2_APB1PERIPH_BASE + 0xAC00UL) +#define FDCAN3_BASE (D2_APB1PERIPH_BASE + 0xD400UL) +#define TIM23_BASE (D2_APB1PERIPH_BASE + 0xE000UL) +#define TIM24_BASE (D2_APB1PERIPH_BASE + 0xE400UL) + +/*!< D2_APB2PERIPH peripherals */ + +#define TIM1_BASE (D2_APB2PERIPH_BASE + 0x0000UL) +#define TIM8_BASE (D2_APB2PERIPH_BASE + 0x0400UL) +#define USART1_BASE (D2_APB2PERIPH_BASE + 0x1000UL) +#define USART6_BASE (D2_APB2PERIPH_BASE + 0x1400UL) +#define UART9_BASE (D2_APB2PERIPH_BASE + 0x1800UL) +#define USART10_BASE (D2_APB2PERIPH_BASE + 0x1C00UL) +#define SPI1_BASE (D2_APB2PERIPH_BASE + 0x3000UL) +#define SPI4_BASE (D2_APB2PERIPH_BASE + 0x3400UL) +#define TIM15_BASE (D2_APB2PERIPH_BASE + 0x4000UL) +#define TIM16_BASE (D2_APB2PERIPH_BASE + 0x4400UL) +#define TIM17_BASE (D2_APB2PERIPH_BASE + 0x4800UL) +#define SPI5_BASE (D2_APB2PERIPH_BASE + 0x5000UL) +#define SAI1_BASE (D2_APB2PERIPH_BASE + 0x5800UL) +#define SAI1_Block_A_BASE (SAI1_BASE + 0x004UL) +#define SAI1_Block_B_BASE (SAI1_BASE + 0x024UL) +#define DFSDM1_BASE (D2_APB2PERIPH_BASE + 0x7800UL) +#define DFSDM1_Channel0_BASE (DFSDM1_BASE + 0x00UL) +#define DFSDM1_Channel1_BASE (DFSDM1_BASE + 0x20UL) +#define DFSDM1_Channel2_BASE (DFSDM1_BASE + 0x40UL) +#define DFSDM1_Channel3_BASE (DFSDM1_BASE + 0x60UL) +#define DFSDM1_Channel4_BASE (DFSDM1_BASE + 0x80UL) +#define DFSDM1_Channel5_BASE (DFSDM1_BASE + 0xA0UL) +#define DFSDM1_Channel6_BASE (DFSDM1_BASE + 0xC0UL) +#define DFSDM1_Channel7_BASE (DFSDM1_BASE + 0xE0UL) +#define DFSDM1_Filter0_BASE (DFSDM1_BASE + 0x100UL) +#define DFSDM1_Filter1_BASE (DFSDM1_BASE + 0x180UL) +#define DFSDM1_Filter2_BASE (DFSDM1_BASE + 0x200UL) +#define DFSDM1_Filter3_BASE (DFSDM1_BASE + 0x280UL) + + +/*!< D3_APB1PERIPH peripherals */ +#define EXTI_BASE (D3_APB1PERIPH_BASE + 0x0000UL) +#define EXTI_D1_BASE (EXTI_BASE + 0x0080UL) +#define EXTI_D2_BASE (EXTI_BASE + 0x00C0UL) +#define SYSCFG_BASE (D3_APB1PERIPH_BASE + 0x0400UL) +#define LPUART1_BASE (D3_APB1PERIPH_BASE + 0x0C00UL) +#define SPI6_BASE (D3_APB1PERIPH_BASE + 0x1400UL) +#define I2C4_BASE (D3_APB1PERIPH_BASE + 0x1C00UL) +#define LPTIM2_BASE (D3_APB1PERIPH_BASE + 0x2400UL) +#define LPTIM3_BASE (D3_APB1PERIPH_BASE + 0x2800UL) +#define LPTIM4_BASE (D3_APB1PERIPH_BASE + 0x2C00UL) +#define LPTIM5_BASE (D3_APB1PERIPH_BASE + 0x3000UL) +#define COMP12_BASE (D3_APB1PERIPH_BASE + 0x3800UL) +#define COMP1_BASE (COMP12_BASE + 0x0CUL) +#define COMP2_BASE (COMP12_BASE + 0x10UL) +#define VREFBUF_BASE (D3_APB1PERIPH_BASE + 0x3C00UL) +#define RTC_BASE (D3_APB1PERIPH_BASE + 0x4000UL) +#define IWDG1_BASE (D3_APB1PERIPH_BASE + 0x4800UL) + + +#define SAI4_BASE (D3_APB1PERIPH_BASE + 0x5400UL) +#define SAI4_Block_A_BASE (SAI4_BASE + 0x004UL) +#define SAI4_Block_B_BASE (SAI4_BASE + 0x024UL) + +#define DTS_BASE (D3_APB1PERIPH_BASE + 0x6800UL) + + + +#define BDMA_Channel0_BASE (BDMA_BASE + 0x0008UL) +#define BDMA_Channel1_BASE (BDMA_BASE + 0x001CUL) +#define BDMA_Channel2_BASE (BDMA_BASE + 0x0030UL) +#define BDMA_Channel3_BASE (BDMA_BASE + 0x0044UL) +#define BDMA_Channel4_BASE (BDMA_BASE + 0x0058UL) +#define BDMA_Channel5_BASE (BDMA_BASE + 0x006CUL) +#define BDMA_Channel6_BASE (BDMA_BASE + 0x0080UL) +#define BDMA_Channel7_BASE (BDMA_BASE + 0x0094UL) + +#define DMAMUX2_Channel0_BASE (DMAMUX2_BASE) +#define DMAMUX2_Channel1_BASE (DMAMUX2_BASE + 0x0004UL) +#define DMAMUX2_Channel2_BASE (DMAMUX2_BASE + 0x0008UL) +#define DMAMUX2_Channel3_BASE (DMAMUX2_BASE + 0x000CUL) +#define DMAMUX2_Channel4_BASE (DMAMUX2_BASE + 0x0010UL) +#define DMAMUX2_Channel5_BASE (DMAMUX2_BASE + 0x0014UL) +#define DMAMUX2_Channel6_BASE (DMAMUX2_BASE + 0x0018UL) +#define DMAMUX2_Channel7_BASE (DMAMUX2_BASE + 0x001CUL) + +#define DMAMUX2_RequestGenerator0_BASE (DMAMUX2_BASE + 0x0100UL) +#define DMAMUX2_RequestGenerator1_BASE (DMAMUX2_BASE + 0x0104UL) +#define DMAMUX2_RequestGenerator2_BASE (DMAMUX2_BASE + 0x0108UL) +#define DMAMUX2_RequestGenerator3_BASE (DMAMUX2_BASE + 0x010CUL) +#define DMAMUX2_RequestGenerator4_BASE (DMAMUX2_BASE + 0x0110UL) +#define DMAMUX2_RequestGenerator5_BASE (DMAMUX2_BASE + 0x0114UL) +#define DMAMUX2_RequestGenerator6_BASE (DMAMUX2_BASE + 0x0118UL) +#define DMAMUX2_RequestGenerator7_BASE (DMAMUX2_BASE + 0x011CUL) + +#define DMAMUX2_ChannelStatus_BASE (DMAMUX2_BASE + 0x0080UL) +#define DMAMUX2_RequestGenStatus_BASE (DMAMUX2_BASE + 0x0140UL) + +#define DMA1_Stream0_BASE (DMA1_BASE + 0x010UL) +#define DMA1_Stream1_BASE (DMA1_BASE + 0x028UL) +#define DMA1_Stream2_BASE (DMA1_BASE + 0x040UL) +#define DMA1_Stream3_BASE (DMA1_BASE + 0x058UL) +#define DMA1_Stream4_BASE (DMA1_BASE + 0x070UL) +#define DMA1_Stream5_BASE (DMA1_BASE + 0x088UL) +#define DMA1_Stream6_BASE (DMA1_BASE + 0x0A0UL) +#define DMA1_Stream7_BASE (DMA1_BASE + 0x0B8UL) + +#define DMA2_Stream0_BASE (DMA2_BASE + 0x010UL) +#define DMA2_Stream1_BASE (DMA2_BASE + 0x028UL) +#define DMA2_Stream2_BASE (DMA2_BASE + 0x040UL) +#define DMA2_Stream3_BASE (DMA2_BASE + 0x058UL) +#define DMA2_Stream4_BASE (DMA2_BASE + 0x070UL) +#define DMA2_Stream5_BASE (DMA2_BASE + 0x088UL) +#define DMA2_Stream6_BASE (DMA2_BASE + 0x0A0UL) +#define DMA2_Stream7_BASE (DMA2_BASE + 0x0B8UL) + +#define DMAMUX1_Channel0_BASE (DMAMUX1_BASE) +#define DMAMUX1_Channel1_BASE (DMAMUX1_BASE + 0x0004UL) +#define DMAMUX1_Channel2_BASE (DMAMUX1_BASE + 0x0008UL) +#define DMAMUX1_Channel3_BASE (DMAMUX1_BASE + 0x000CUL) +#define DMAMUX1_Channel4_BASE (DMAMUX1_BASE + 0x0010UL) +#define DMAMUX1_Channel5_BASE (DMAMUX1_BASE + 0x0014UL) +#define DMAMUX1_Channel6_BASE (DMAMUX1_BASE + 0x0018UL) +#define DMAMUX1_Channel7_BASE (DMAMUX1_BASE + 0x001CUL) +#define DMAMUX1_Channel8_BASE (DMAMUX1_BASE + 0x0020UL) +#define DMAMUX1_Channel9_BASE (DMAMUX1_BASE + 0x0024UL) +#define DMAMUX1_Channel10_BASE (DMAMUX1_BASE + 0x0028UL) +#define DMAMUX1_Channel11_BASE (DMAMUX1_BASE + 0x002CUL) +#define DMAMUX1_Channel12_BASE (DMAMUX1_BASE + 0x0030UL) +#define DMAMUX1_Channel13_BASE (DMAMUX1_BASE + 0x0034UL) +#define DMAMUX1_Channel14_BASE (DMAMUX1_BASE + 0x0038UL) +#define DMAMUX1_Channel15_BASE (DMAMUX1_BASE + 0x003CUL) + +#define DMAMUX1_RequestGenerator0_BASE (DMAMUX1_BASE + 0x0100UL) +#define DMAMUX1_RequestGenerator1_BASE (DMAMUX1_BASE + 0x0104UL) +#define DMAMUX1_RequestGenerator2_BASE (DMAMUX1_BASE + 0x0108UL) +#define DMAMUX1_RequestGenerator3_BASE (DMAMUX1_BASE + 0x010CUL) +#define DMAMUX1_RequestGenerator4_BASE (DMAMUX1_BASE + 0x0110UL) +#define DMAMUX1_RequestGenerator5_BASE (DMAMUX1_BASE + 0x0114UL) +#define DMAMUX1_RequestGenerator6_BASE (DMAMUX1_BASE + 0x0118UL) +#define DMAMUX1_RequestGenerator7_BASE (DMAMUX1_BASE + 0x011CUL) + +#define DMAMUX1_ChannelStatus_BASE (DMAMUX1_BASE + 0x0080UL) +#define DMAMUX1_RequestGenStatus_BASE (DMAMUX1_BASE + 0x0140UL) + +/*!< FMC Banks registers base address */ +#define FMC_Bank1_R_BASE (FMC_R_BASE + 0x0000UL) +#define FMC_Bank1E_R_BASE (FMC_R_BASE + 0x0104UL) +#define FMC_Bank2_R_BASE (FMC_R_BASE + 0x0060UL) +#define FMC_Bank3_R_BASE (FMC_R_BASE + 0x0080UL) +#define FMC_Bank5_6_R_BASE (FMC_R_BASE + 0x0140UL) + +/* Debug MCU registers base address */ +#define DBGMCU_BASE (0x5C001000UL) + +#define MDMA_Channel0_BASE (MDMA_BASE + 0x00000040UL) +#define MDMA_Channel1_BASE (MDMA_BASE + 0x00000080UL) +#define MDMA_Channel2_BASE (MDMA_BASE + 0x000000C0UL) +#define MDMA_Channel3_BASE (MDMA_BASE + 0x00000100UL) +#define MDMA_Channel4_BASE (MDMA_BASE + 0x00000140UL) +#define MDMA_Channel5_BASE (MDMA_BASE + 0x00000180UL) +#define MDMA_Channel6_BASE (MDMA_BASE + 0x000001C0UL) +#define MDMA_Channel7_BASE (MDMA_BASE + 0x00000200UL) +#define MDMA_Channel8_BASE (MDMA_BASE + 0x00000240UL) +#define MDMA_Channel9_BASE (MDMA_BASE + 0x00000280UL) +#define MDMA_Channel10_BASE (MDMA_BASE + 0x000002C0UL) +#define MDMA_Channel11_BASE (MDMA_BASE + 0x00000300UL) +#define MDMA_Channel12_BASE (MDMA_BASE + 0x00000340UL) +#define MDMA_Channel13_BASE (MDMA_BASE + 0x00000380UL) +#define MDMA_Channel14_BASE (MDMA_BASE + 0x000003C0UL) +#define MDMA_Channel15_BASE (MDMA_BASE + 0x00000400UL) + +#define RAMECC1_Monitor1_BASE (RAMECC1_BASE + 0x20UL) +#define RAMECC1_Monitor2_BASE (RAMECC1_BASE + 0x40UL) +#define RAMECC1_Monitor3_BASE (RAMECC1_BASE + 0x60UL) +#define RAMECC1_Monitor4_BASE (RAMECC1_BASE + 0x80UL) +#define RAMECC1_Monitor5_BASE (RAMECC1_BASE + 0xA0UL) +#define RAMECC1_Monitor6_BASE (RAMECC1_BASE + 0xC0UL) + +#define RAMECC2_Monitor1_BASE (RAMECC2_BASE + 0x20UL) +#define RAMECC2_Monitor2_BASE (RAMECC2_BASE + 0x40UL) +#define RAMECC2_Monitor3_BASE (RAMECC2_BASE + 0x60UL) + +#define RAMECC3_Monitor1_BASE (RAMECC3_BASE + 0x20UL) +#define RAMECC3_Monitor2_BASE (RAMECC3_BASE + 0x40UL) + + +/** + * @} + */ + +/** @addtogroup Peripheral_declaration + * @{ + */ +#define TIM2 ((TIM_TypeDef *) TIM2_BASE) +#define TIM3 ((TIM_TypeDef *) TIM3_BASE) +#define TIM4 ((TIM_TypeDef *) TIM4_BASE) +#define TIM5 ((TIM_TypeDef *) TIM5_BASE) +#define TIM6 ((TIM_TypeDef *) TIM6_BASE) +#define TIM7 ((TIM_TypeDef *) TIM7_BASE) +#define TIM13 ((TIM_TypeDef *) TIM13_BASE) +#define TIM14 ((TIM_TypeDef *) TIM14_BASE) +#define VREFBUF ((VREFBUF_TypeDef *) VREFBUF_BASE) +#define RTC ((RTC_TypeDef *) RTC_BASE) +#define WWDG1 ((WWDG_TypeDef *) WWDG1_BASE) + + +#define IWDG1 ((IWDG_TypeDef *) IWDG1_BASE) +#define SPI2 ((SPI_TypeDef *) SPI2_BASE) +#define SPI3 ((SPI_TypeDef *) SPI3_BASE) +#define SPI4 ((SPI_TypeDef *) SPI4_BASE) +#define SPI5 ((SPI_TypeDef *) SPI5_BASE) +#define SPI6 ((SPI_TypeDef *) SPI6_BASE) +#define USART2 ((USART_TypeDef *) USART2_BASE) +#define USART3 ((USART_TypeDef *) USART3_BASE) +#define USART6 ((USART_TypeDef *) USART6_BASE) +#define USART10 ((USART_TypeDef *) USART10_BASE) +#define UART7 ((USART_TypeDef *) UART7_BASE) +#define UART8 ((USART_TypeDef *) UART8_BASE) +#define UART9 ((USART_TypeDef *) UART9_BASE) +#define CRS ((CRS_TypeDef *) CRS_BASE) +#define UART4 ((USART_TypeDef *) UART4_BASE) +#define UART5 ((USART_TypeDef *) UART5_BASE) +#define I2C1 ((I2C_TypeDef *) I2C1_BASE) +#define I2C2 ((I2C_TypeDef *) I2C2_BASE) +#define I2C3 ((I2C_TypeDef *) I2C3_BASE) +#define I2C4 ((I2C_TypeDef *) I2C4_BASE) +#define I2C5 ((I2C_TypeDef *) I2C5_BASE) +#define FDCAN1 ((FDCAN_GlobalTypeDef *) FDCAN1_BASE) +#define FDCAN2 ((FDCAN_GlobalTypeDef *) FDCAN2_BASE) +#define FDCAN_CCU ((FDCAN_ClockCalibrationUnit_TypeDef *) FDCAN_CCU_BASE) +#define FDCAN3 ((FDCAN_GlobalTypeDef *) FDCAN3_BASE) +#define TIM23 ((TIM_TypeDef *) TIM23_BASE) +#define TIM24 ((TIM_TypeDef *) TIM24_BASE) +#define CEC ((CEC_TypeDef *) CEC_BASE) +#define LPTIM1 ((LPTIM_TypeDef *) LPTIM1_BASE) +#define PWR ((PWR_TypeDef *) PWR_BASE) +#define DAC1 ((DAC_TypeDef *) DAC1_BASE) +#define LPUART1 ((USART_TypeDef *) LPUART1_BASE) +#define SWPMI1 ((SWPMI_TypeDef *) SWPMI1_BASE) +#define LPTIM2 ((LPTIM_TypeDef *) LPTIM2_BASE) +#define LPTIM3 ((LPTIM_TypeDef *) LPTIM3_BASE) +#define DTS ((DTS_TypeDef *) DTS_BASE) +#define LPTIM4 ((LPTIM_TypeDef *) LPTIM4_BASE) +#define LPTIM5 ((LPTIM_TypeDef *) LPTIM5_BASE) + +#define SYSCFG ((SYSCFG_TypeDef *) SYSCFG_BASE) +#define COMP12 ((COMPOPT_TypeDef *) COMP12_BASE) +#define COMP1 ((COMP_TypeDef *) COMP1_BASE) +#define COMP2 ((COMP_TypeDef *) COMP2_BASE) +#define COMP12_COMMON ((COMP_Common_TypeDef *) COMP2_BASE) +#define OPAMP ((OPAMP_TypeDef *) OPAMP_BASE) +#define OPAMP1 ((OPAMP_TypeDef *) OPAMP1_BASE) +#define OPAMP2 ((OPAMP_TypeDef *) OPAMP2_BASE) + + +#define EXTI ((EXTI_TypeDef *) EXTI_BASE) +#define EXTI_D1 ((EXTI_Core_TypeDef *) EXTI_D1_BASE) +#define EXTI_D2 ((EXTI_Core_TypeDef *) EXTI_D2_BASE) +#define TIM1 ((TIM_TypeDef *) TIM1_BASE) +#define SPI1 ((SPI_TypeDef *) SPI1_BASE) +#define TIM8 ((TIM_TypeDef *) TIM8_BASE) +#define USART1 ((USART_TypeDef *) USART1_BASE) +#define TIM12 ((TIM_TypeDef *) TIM12_BASE) +#define TIM15 ((TIM_TypeDef *) TIM15_BASE) +#define TIM16 ((TIM_TypeDef *) TIM16_BASE) +#define TIM17 ((TIM_TypeDef *) TIM17_BASE) +#define SAI1 ((SAI_TypeDef *) SAI1_BASE) +#define SAI1_Block_A ((SAI_Block_TypeDef *)SAI1_Block_A_BASE) +#define SAI1_Block_B ((SAI_Block_TypeDef *)SAI1_Block_B_BASE) +#define SAI4 ((SAI_TypeDef *) SAI4_BASE) +#define SAI4_Block_A ((SAI_Block_TypeDef *)SAI4_Block_A_BASE) +#define SAI4_Block_B ((SAI_Block_TypeDef *)SAI4_Block_B_BASE) + +#define SPDIFRX ((SPDIFRX_TypeDef *) SPDIFRX_BASE) +#define DFSDM1_Channel0 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel0_BASE) +#define DFSDM1_Channel1 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel1_BASE) +#define DFSDM1_Channel2 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel2_BASE) +#define DFSDM1_Channel3 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel3_BASE) +#define DFSDM1_Channel4 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel4_BASE) +#define DFSDM1_Channel5 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel5_BASE) +#define DFSDM1_Channel6 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel6_BASE) +#define DFSDM1_Channel7 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel7_BASE) +#define DFSDM1_Filter0 ((DFSDM_Filter_TypeDef *) DFSDM1_Filter0_BASE) +#define DFSDM1_Filter1 ((DFSDM_Filter_TypeDef *) DFSDM1_Filter1_BASE) +#define DFSDM1_Filter2 ((DFSDM_Filter_TypeDef *) DFSDM1_Filter2_BASE) +#define DFSDM1_Filter3 ((DFSDM_Filter_TypeDef *) DFSDM1_Filter3_BASE) +#define DMA2D ((DMA2D_TypeDef *) DMA2D_BASE) +#define DCMI ((DCMI_TypeDef *) DCMI_BASE) +#define PSSI ((PSSI_TypeDef *) PSSI_BASE) +#define RCC ((RCC_TypeDef *) RCC_BASE) +#define FLASH ((FLASH_TypeDef *) FLASH_R_BASE) +#define CRC ((CRC_TypeDef *) CRC_BASE) + +#define GPIOA ((GPIO_TypeDef *) GPIOA_BASE) +#define GPIOB ((GPIO_TypeDef *) GPIOB_BASE) +#define GPIOC ((GPIO_TypeDef *) GPIOC_BASE) +#define GPIOD ((GPIO_TypeDef *) GPIOD_BASE) +#define GPIOE ((GPIO_TypeDef *) GPIOE_BASE) +#define GPIOF ((GPIO_TypeDef *) GPIOF_BASE) +#define GPIOG ((GPIO_TypeDef *) GPIOG_BASE) +#define GPIOH ((GPIO_TypeDef *) GPIOH_BASE) +#define GPIOJ ((GPIO_TypeDef *) GPIOJ_BASE) +#define GPIOK ((GPIO_TypeDef *) GPIOK_BASE) + +#define ADC1 ((ADC_TypeDef *) ADC1_BASE) +#define ADC2 ((ADC_TypeDef *) ADC2_BASE) +#define ADC3 ((ADC_TypeDef *) ADC3_BASE) +#define ADC3_COMMON ((ADC_Common_TypeDef *) ADC3_COMMON_BASE) +#define ADC12_COMMON ((ADC_Common_TypeDef *) ADC12_COMMON_BASE) + +#define CRYP ((CRYP_TypeDef *) CRYP_BASE) +#define HASH ((HASH_TypeDef *) HASH_BASE) +#define HASH_DIGEST ((HASH_DIGEST_TypeDef *) HASH_DIGEST_BASE) +#define RNG ((RNG_TypeDef *) RNG_BASE) +#define SDMMC2 ((SDMMC_TypeDef *) SDMMC2_BASE) +#define DLYB_SDMMC2 ((DLYB_TypeDef *) DLYB_SDMMC2_BASE) +#define FMAC ((FMAC_TypeDef *) FMAC_BASE) +#define CORDIC ((CORDIC_TypeDef *) CORDIC_BASE) + +#define BDMA ((BDMA_TypeDef *) BDMA_BASE) +#define BDMA_Channel0 ((BDMA_Channel_TypeDef *) BDMA_Channel0_BASE) +#define BDMA_Channel1 ((BDMA_Channel_TypeDef *) BDMA_Channel1_BASE) +#define BDMA_Channel2 ((BDMA_Channel_TypeDef *) BDMA_Channel2_BASE) +#define BDMA_Channel3 ((BDMA_Channel_TypeDef *) BDMA_Channel3_BASE) +#define BDMA_Channel4 ((BDMA_Channel_TypeDef *) BDMA_Channel4_BASE) +#define BDMA_Channel5 ((BDMA_Channel_TypeDef *) BDMA_Channel5_BASE) +#define BDMA_Channel6 ((BDMA_Channel_TypeDef *) BDMA_Channel6_BASE) +#define BDMA_Channel7 ((BDMA_Channel_TypeDef *) BDMA_Channel7_BASE) + +#define RAMECC1 ((RAMECC_TypeDef *)RAMECC1_BASE) +#define RAMECC1_Monitor1 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor1_BASE) +#define RAMECC1_Monitor2 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor2_BASE) +#define RAMECC1_Monitor3 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor3_BASE) +#define RAMECC1_Monitor4 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor4_BASE) +#define RAMECC1_Monitor5 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor5_BASE) +#define RAMECC1_Monitor6 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor6_BASE) + +#define RAMECC2 ((RAMECC_TypeDef *)RAMECC2_BASE) +#define RAMECC2_Monitor1 ((RAMECC_MonitorTypeDef *)RAMECC2_Monitor1_BASE) +#define RAMECC2_Monitor2 ((RAMECC_MonitorTypeDef *)RAMECC2_Monitor2_BASE) +#define RAMECC2_Monitor3 ((RAMECC_MonitorTypeDef *)RAMECC2_Monitor3_BASE) + +#define RAMECC3 ((RAMECC_TypeDef *)RAMECC3_BASE) +#define RAMECC3_Monitor1 ((RAMECC_MonitorTypeDef *)RAMECC3_Monitor1_BASE) +#define RAMECC3_Monitor2 ((RAMECC_MonitorTypeDef *)RAMECC3_Monitor2_BASE) + +#define DMAMUX2 ((DMAMUX_Channel_TypeDef *) DMAMUX2_BASE) +#define DMAMUX2_Channel0 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel0_BASE) +#define DMAMUX2_Channel1 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel1_BASE) +#define DMAMUX2_Channel2 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel2_BASE) +#define DMAMUX2_Channel3 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel3_BASE) +#define DMAMUX2_Channel4 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel4_BASE) +#define DMAMUX2_Channel5 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel5_BASE) +#define DMAMUX2_Channel6 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel6_BASE) +#define DMAMUX2_Channel7 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel7_BASE) + + +#define DMAMUX2_RequestGenerator0 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator0_BASE) +#define DMAMUX2_RequestGenerator1 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator1_BASE) +#define DMAMUX2_RequestGenerator2 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator2_BASE) +#define DMAMUX2_RequestGenerator3 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator3_BASE) +#define DMAMUX2_RequestGenerator4 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator4_BASE) +#define DMAMUX2_RequestGenerator5 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator5_BASE) +#define DMAMUX2_RequestGenerator6 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator6_BASE) +#define DMAMUX2_RequestGenerator7 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator7_BASE) + +#define DMAMUX2_ChannelStatus ((DMAMUX_ChannelStatus_TypeDef *) DMAMUX2_ChannelStatus_BASE) +#define DMAMUX2_RequestGenStatus ((DMAMUX_RequestGenStatus_TypeDef *) DMAMUX2_RequestGenStatus_BASE) + +#define DMA2 ((DMA_TypeDef *) DMA2_BASE) +#define DMA2_Stream0 ((DMA_Stream_TypeDef *) DMA2_Stream0_BASE) +#define DMA2_Stream1 ((DMA_Stream_TypeDef *) DMA2_Stream1_BASE) +#define DMA2_Stream2 ((DMA_Stream_TypeDef *) DMA2_Stream2_BASE) +#define DMA2_Stream3 ((DMA_Stream_TypeDef *) DMA2_Stream3_BASE) +#define DMA2_Stream4 ((DMA_Stream_TypeDef *) DMA2_Stream4_BASE) +#define DMA2_Stream5 ((DMA_Stream_TypeDef *) DMA2_Stream5_BASE) +#define DMA2_Stream6 ((DMA_Stream_TypeDef *) DMA2_Stream6_BASE) +#define DMA2_Stream7 ((DMA_Stream_TypeDef *) DMA2_Stream7_BASE) + +#define DMA1 ((DMA_TypeDef *) DMA1_BASE) +#define DMA1_Stream0 ((DMA_Stream_TypeDef *) DMA1_Stream0_BASE) +#define DMA1_Stream1 ((DMA_Stream_TypeDef *) DMA1_Stream1_BASE) +#define DMA1_Stream2 ((DMA_Stream_TypeDef *) DMA1_Stream2_BASE) +#define DMA1_Stream3 ((DMA_Stream_TypeDef *) DMA1_Stream3_BASE) +#define DMA1_Stream4 ((DMA_Stream_TypeDef *) DMA1_Stream4_BASE) +#define DMA1_Stream5 ((DMA_Stream_TypeDef *) DMA1_Stream5_BASE) +#define DMA1_Stream6 ((DMA_Stream_TypeDef *) DMA1_Stream6_BASE) +#define DMA1_Stream7 ((DMA_Stream_TypeDef *) DMA1_Stream7_BASE) + + +#define DMAMUX1 ((DMAMUX_Channel_TypeDef *) DMAMUX1_BASE) +#define DMAMUX1_Channel0 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel0_BASE) +#define DMAMUX1_Channel1 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel1_BASE) +#define DMAMUX1_Channel2 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel2_BASE) +#define DMAMUX1_Channel3 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel3_BASE) +#define DMAMUX1_Channel4 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel4_BASE) +#define DMAMUX1_Channel5 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel5_BASE) +#define DMAMUX1_Channel6 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel6_BASE) +#define DMAMUX1_Channel7 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel7_BASE) +#define DMAMUX1_Channel8 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel8_BASE) +#define DMAMUX1_Channel9 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel9_BASE) +#define DMAMUX1_Channel10 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel10_BASE) +#define DMAMUX1_Channel11 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel11_BASE) +#define DMAMUX1_Channel12 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel12_BASE) +#define DMAMUX1_Channel13 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel13_BASE) +#define DMAMUX1_Channel14 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel14_BASE) +#define DMAMUX1_Channel15 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel15_BASE) + +#define DMAMUX1_RequestGenerator0 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator0_BASE) +#define DMAMUX1_RequestGenerator1 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator1_BASE) +#define DMAMUX1_RequestGenerator2 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator2_BASE) +#define DMAMUX1_RequestGenerator3 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator3_BASE) +#define DMAMUX1_RequestGenerator4 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator4_BASE) +#define DMAMUX1_RequestGenerator5 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator5_BASE) +#define DMAMUX1_RequestGenerator6 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator6_BASE) +#define DMAMUX1_RequestGenerator7 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator7_BASE) + +#define DMAMUX1_ChannelStatus ((DMAMUX_ChannelStatus_TypeDef *) DMAMUX1_ChannelStatus_BASE) +#define DMAMUX1_RequestGenStatus ((DMAMUX_RequestGenStatus_TypeDef *) DMAMUX1_RequestGenStatus_BASE) + + +#define FMC_Bank1_R ((FMC_Bank1_TypeDef *) FMC_Bank1_R_BASE) +#define FMC_Bank1E_R ((FMC_Bank1E_TypeDef *) FMC_Bank1E_R_BASE) +#define FMC_Bank2_R ((FMC_Bank2_TypeDef *) FMC_Bank2_R_BASE) +#define FMC_Bank3_R ((FMC_Bank3_TypeDef *) FMC_Bank3_R_BASE) +#define FMC_Bank5_6_R ((FMC_Bank5_6_TypeDef *) FMC_Bank5_6_R_BASE) + +#define OCTOSPI1 ((OCTOSPI_TypeDef *) OCTOSPI1_R_BASE) +#define DLYB_OCTOSPI1 ((DLYB_TypeDef *) DLYB_OCTOSPI1_BASE) +#define OCTOSPI2 ((OCTOSPI_TypeDef *) OCTOSPI2_R_BASE) +#define DLYB_OCTOSPI2 ((DLYB_TypeDef *) DLYB_OCTOSPI2_BASE) +#define OCTOSPIM ((OCTOSPIM_TypeDef *) OCTOSPIM_BASE) + +#define OTFDEC1 ((OTFDEC_TypeDef *) OTFDEC1_BASE) +#define OTFDEC1_REGION1 ((OTFDEC_Region_TypeDef *) OTFDEC1_REGION1_BASE) +#define OTFDEC1_REGION2 ((OTFDEC_Region_TypeDef *) OTFDEC1_REGION2_BASE) +#define OTFDEC1_REGION3 ((OTFDEC_Region_TypeDef *) OTFDEC1_REGION3_BASE) +#define OTFDEC1_REGION4 ((OTFDEC_Region_TypeDef *) OTFDEC1_REGION4_BASE) + +#define OTFDEC2 ((OTFDEC_TypeDef *) OTFDEC2_BASE) +#define OTFDEC2_REGION1 ((OTFDEC_Region_TypeDef *) OTFDEC2_REGION1_BASE) +#define OTFDEC2_REGION2 ((OTFDEC_Region_TypeDef *) OTFDEC2_REGION2_BASE) +#define OTFDEC2_REGION3 ((OTFDEC_Region_TypeDef *) OTFDEC2_REGION3_BASE) +#define OTFDEC2_REGION4 ((OTFDEC_Region_TypeDef *) OTFDEC2_REGION4_BASE) + +#define SDMMC1 ((SDMMC_TypeDef *) SDMMC1_BASE) +#define DLYB_SDMMC1 ((DLYB_TypeDef *) DLYB_SDMMC1_BASE) + +#define DBGMCU ((DBGMCU_TypeDef *) DBGMCU_BASE) + +#define HSEM ((HSEM_TypeDef *) HSEM_BASE) +#define HSEM_COMMON ((HSEM_Common_TypeDef *) (HSEM_BASE + 0x100UL)) + +#define LTDC ((LTDC_TypeDef *)LTDC_BASE) +#define LTDC_Layer1 ((LTDC_Layer_TypeDef *)LTDC_Layer1_BASE) +#define LTDC_Layer2 ((LTDC_Layer_TypeDef *)LTDC_Layer2_BASE) + +#define MDIOS ((MDIOS_TypeDef *) MDIOS_BASE) + +#define ETH ((ETH_TypeDef *)ETH_BASE) +#define MDMA ((MDMA_TypeDef *)MDMA_BASE) +#define MDMA_Channel0 ((MDMA_Channel_TypeDef *)MDMA_Channel0_BASE) +#define MDMA_Channel1 ((MDMA_Channel_TypeDef *)MDMA_Channel1_BASE) +#define MDMA_Channel2 ((MDMA_Channel_TypeDef *)MDMA_Channel2_BASE) +#define MDMA_Channel3 ((MDMA_Channel_TypeDef *)MDMA_Channel3_BASE) +#define MDMA_Channel4 ((MDMA_Channel_TypeDef *)MDMA_Channel4_BASE) +#define MDMA_Channel5 ((MDMA_Channel_TypeDef *)MDMA_Channel5_BASE) +#define MDMA_Channel6 ((MDMA_Channel_TypeDef *)MDMA_Channel6_BASE) +#define MDMA_Channel7 ((MDMA_Channel_TypeDef *)MDMA_Channel7_BASE) +#define MDMA_Channel8 ((MDMA_Channel_TypeDef *)MDMA_Channel8_BASE) +#define MDMA_Channel9 ((MDMA_Channel_TypeDef *)MDMA_Channel9_BASE) +#define MDMA_Channel10 ((MDMA_Channel_TypeDef *)MDMA_Channel10_BASE) +#define MDMA_Channel11 ((MDMA_Channel_TypeDef *)MDMA_Channel11_BASE) +#define MDMA_Channel12 ((MDMA_Channel_TypeDef *)MDMA_Channel12_BASE) +#define MDMA_Channel13 ((MDMA_Channel_TypeDef *)MDMA_Channel13_BASE) +#define MDMA_Channel14 ((MDMA_Channel_TypeDef *)MDMA_Channel14_BASE) +#define MDMA_Channel15 ((MDMA_Channel_TypeDef *)MDMA_Channel15_BASE) + + +#define USB1_OTG_HS ((USB_OTG_GlobalTypeDef *) USB1_OTG_HS_PERIPH_BASE) + +/* Legacy defines */ +#define USB_OTG_HS USB1_OTG_HS +#define USB_OTG_HS_PERIPH_BASE USB1_OTG_HS_PERIPH_BASE + +/** + * @} + */ + +/** @addtogroup Exported_constants + * @{ + */ + + /** @addtogroup Peripheral_Registers_Bits_Definition + * @{ + */ + +/******************************************************************************/ +/* Peripheral Registers_Bits_Definition */ +/******************************************************************************/ + +/******************************************************************************/ +/* */ +/* Analog to Digital Converter */ +/* */ +/******************************************************************************/ +/******************************* ADC VERSION ********************************/ +#define ADC_VER_V5_V90 +/******************** Bit definition for ADC_ISR register ********************/ +#define ADC_ISR_ADRDY_Pos (0U) +#define ADC_ISR_ADRDY_Msk (0x1UL << ADC_ISR_ADRDY_Pos) /*!< 0x00000001 */ +#define ADC_ISR_ADRDY ADC_ISR_ADRDY_Msk /*!< ADC Ready (ADRDY) flag */ +#define ADC_ISR_EOSMP_Pos (1U) +#define ADC_ISR_EOSMP_Msk (0x1UL << ADC_ISR_EOSMP_Pos) /*!< 0x00000002 */ +#define ADC_ISR_EOSMP ADC_ISR_EOSMP_Msk /*!< ADC End of Sampling flag */ +#define ADC_ISR_EOC_Pos (2U) +#define ADC_ISR_EOC_Msk (0x1UL << ADC_ISR_EOC_Pos) /*!< 0x00000004 */ +#define ADC_ISR_EOC ADC_ISR_EOC_Msk /*!< ADC End of Regular Conversion flag */ +#define ADC_ISR_EOS_Pos (3U) +#define ADC_ISR_EOS_Msk (0x1UL << ADC_ISR_EOS_Pos) /*!< 0x00000008 */ +#define ADC_ISR_EOS ADC_ISR_EOS_Msk /*!< ADC End of Regular sequence of Conversions flag */ +#define ADC_ISR_OVR_Pos (4U) +#define ADC_ISR_OVR_Msk (0x1UL << ADC_ISR_OVR_Pos) /*!< 0x00000010 */ +#define ADC_ISR_OVR ADC_ISR_OVR_Msk /*!< ADC overrun flag */ +#define ADC_ISR_JEOC_Pos (5U) +#define ADC_ISR_JEOC_Msk (0x1UL << ADC_ISR_JEOC_Pos) /*!< 0x00000020 */ +#define ADC_ISR_JEOC ADC_ISR_JEOC_Msk /*!< ADC End of Injected Conversion flag */ +#define ADC_ISR_JEOS_Pos (6U) +#define ADC_ISR_JEOS_Msk (0x1UL << ADC_ISR_JEOS_Pos) /*!< 0x00000040 */ +#define ADC_ISR_JEOS ADC_ISR_JEOS_Msk /*!< ADC End of Injected sequence of Conversions flag */ +#define ADC_ISR_AWD1_Pos (7U) +#define ADC_ISR_AWD1_Msk (0x1UL << ADC_ISR_AWD1_Pos) /*!< 0x00000080 */ +#define ADC_ISR_AWD1 ADC_ISR_AWD1_Msk /*!< ADC Analog watchdog 1 flag */ +#define ADC_ISR_AWD2_Pos (8U) +#define ADC_ISR_AWD2_Msk (0x1UL << ADC_ISR_AWD2_Pos) /*!< 0x00000100 */ +#define ADC_ISR_AWD2 ADC_ISR_AWD2_Msk /*!< ADC Analog watchdog 2 flag */ +#define ADC_ISR_AWD3_Pos (9U) +#define ADC_ISR_AWD3_Msk (0x1UL << ADC_ISR_AWD3_Pos) /*!< 0x00000200 */ +#define ADC_ISR_AWD3 ADC_ISR_AWD3_Msk /*!< ADC Analog watchdog 3 flag */ +#define ADC_ISR_JQOVF_Pos (10U) +#define ADC_ISR_JQOVF_Msk (0x1UL << ADC_ISR_JQOVF_Pos) /*!< 0x00000400 */ +#define ADC_ISR_JQOVF ADC_ISR_JQOVF_Msk /*!< ADC Injected Context Queue Overflow flag */ + +/******************** Bit definition for ADC_IER register ********************/ +#define ADC_IER_ADRDYIE_Pos (0U) +#define ADC_IER_ADRDYIE_Msk (0x1UL << ADC_IER_ADRDYIE_Pos) /*!< 0x00000001 */ +#define ADC_IER_ADRDYIE ADC_IER_ADRDYIE_Msk /*!< ADC Ready (ADRDY) interrupt source */ +#define ADC_IER_EOSMPIE_Pos (1U) +#define ADC_IER_EOSMPIE_Msk (0x1UL << ADC_IER_EOSMPIE_Pos) /*!< 0x00000002 */ +#define ADC_IER_EOSMPIE ADC_IER_EOSMPIE_Msk /*!< ADC End of Sampling interrupt source */ +#define ADC_IER_EOCIE_Pos (2U) +#define ADC_IER_EOCIE_Msk (0x1UL << ADC_IER_EOCIE_Pos) /*!< 0x00000004 */ +#define ADC_IER_EOCIE ADC_IER_EOCIE_Msk /*!< ADC End of Regular Conversion interrupt source */ +#define ADC_IER_EOSIE_Pos (3U) +#define ADC_IER_EOSIE_Msk (0x1UL << ADC_IER_EOSIE_Pos) /*!< 0x00000008 */ +#define ADC_IER_EOSIE ADC_IER_EOSIE_Msk /*!< ADC End of Regular sequence of Conversions interrupt source */ +#define ADC_IER_OVRIE_Pos (4U) +#define ADC_IER_OVRIE_Msk (0x1UL << ADC_IER_OVRIE_Pos) /*!< 0x00000010 */ +#define ADC_IER_OVRIE ADC_IER_OVRIE_Msk /*!< ADC overrun interrupt source */ +#define ADC_IER_JEOCIE_Pos (5U) +#define ADC_IER_JEOCIE_Msk (0x1UL << ADC_IER_JEOCIE_Pos) /*!< 0x00000020 */ +#define ADC_IER_JEOCIE ADC_IER_JEOCIE_Msk /*!< ADC End of Injected Conversion interrupt source */ +#define ADC_IER_JEOSIE_Pos (6U) +#define ADC_IER_JEOSIE_Msk (0x1UL << ADC_IER_JEOSIE_Pos) /*!< 0x00000040 */ +#define ADC_IER_JEOSIE ADC_IER_JEOSIE_Msk /*!< ADC End of Injected sequence of Conversions interrupt source */ +#define ADC_IER_AWD1IE_Pos (7U) +#define ADC_IER_AWD1IE_Msk (0x1UL << ADC_IER_AWD1IE_Pos) /*!< 0x00000080 */ +#define ADC_IER_AWD1IE ADC_IER_AWD1IE_Msk /*!< ADC Analog watchdog 1 interrupt source */ +#define ADC_IER_AWD2IE_Pos (8U) +#define ADC_IER_AWD2IE_Msk (0x1UL << ADC_IER_AWD2IE_Pos) /*!< 0x00000100 */ +#define ADC_IER_AWD2IE ADC_IER_AWD2IE_Msk /*!< ADC Analog watchdog 2 interrupt source */ +#define ADC_IER_AWD3IE_Pos (9U) +#define ADC_IER_AWD3IE_Msk (0x1UL << ADC_IER_AWD3IE_Pos) /*!< 0x00000200 */ +#define ADC_IER_AWD3IE ADC_IER_AWD3IE_Msk /*!< ADC Analog watchdog 3 interrupt source */ +#define ADC_IER_JQOVFIE_Pos (10U) +#define ADC_IER_JQOVFIE_Msk (0x1UL << ADC_IER_JQOVFIE_Pos) /*!< 0x00000400 */ +#define ADC_IER_JQOVFIE ADC_IER_JQOVFIE_Msk /*!< ADC Injected Context Queue Overflow interrupt source */ + +/******************** Bit definition for ADC_CR register ********************/ +#define ADC_CR_ADEN_Pos (0U) +#define ADC_CR_ADEN_Msk (0x1UL << ADC_CR_ADEN_Pos) /*!< 0x00000001 */ +#define ADC_CR_ADEN ADC_CR_ADEN_Msk /*!< ADC Enable control */ +#define ADC_CR_ADDIS_Pos (1U) +#define ADC_CR_ADDIS_Msk (0x1UL << ADC_CR_ADDIS_Pos) /*!< 0x00000002 */ +#define ADC_CR_ADDIS ADC_CR_ADDIS_Msk /*!< ADC Disable command */ +#define ADC_CR_ADSTART_Pos (2U) +#define ADC_CR_ADSTART_Msk (0x1UL << ADC_CR_ADSTART_Pos) /*!< 0x00000004 */ +#define ADC_CR_ADSTART ADC_CR_ADSTART_Msk /*!< ADC Start of Regular conversion */ +#define ADC_CR_JADSTART_Pos (3U) +#define ADC_CR_JADSTART_Msk (0x1UL << ADC_CR_JADSTART_Pos) /*!< 0x00000008 */ +#define ADC_CR_JADSTART ADC_CR_JADSTART_Msk /*!< ADC Start of injected conversion */ +#define ADC_CR_ADSTP_Pos (4U) +#define ADC_CR_ADSTP_Msk (0x1UL << ADC_CR_ADSTP_Pos) /*!< 0x00000010 */ +#define ADC_CR_ADSTP ADC_CR_ADSTP_Msk /*!< ADC Stop of Regular conversion */ +#define ADC_CR_JADSTP_Pos (5U) +#define ADC_CR_JADSTP_Msk (0x1UL << ADC_CR_JADSTP_Pos) /*!< 0x00000020 */ +#define ADC_CR_JADSTP ADC_CR_JADSTP_Msk /*!< ADC Stop of injected conversion */ +#define ADC_CR_BOOST_Pos (8U) +#define ADC_CR_BOOST_Msk (0x3UL << ADC_CR_BOOST_Pos) /*!< 0x00000300 */ +#define ADC_CR_BOOST ADC_CR_BOOST_Msk /*!< ADC Boost Mode configuration */ +#define ADC_CR_BOOST_0 (0x1UL << ADC_CR_BOOST_Pos) /*!< 0x00000100 */ +#define ADC_CR_BOOST_1 (0x2UL << ADC_CR_BOOST_Pos) /*!< 0x00000200 */ +#define ADC_CR_ADCALLIN_Pos (16U) +#define ADC_CR_ADCALLIN_Msk (0x1UL << ADC_CR_ADCALLIN_Pos) /*!< 0x00010000 */ +#define ADC_CR_ADCALLIN ADC_CR_ADCALLIN_Msk /*!< ADC Linearity calibration */ +#define ADC_CR_LINCALRDYW1_Pos (22U) +#define ADC_CR_LINCALRDYW1_Msk (0x1UL << ADC_CR_LINCALRDYW1_Pos) /*!< 0x00400000 */ +#define ADC_CR_LINCALRDYW1 ADC_CR_LINCALRDYW1_Msk /*!< ADC Linearity calibration ready Word 1 */ +#define ADC_CR_LINCALRDYW2_Pos (23U) +#define ADC_CR_LINCALRDYW2_Msk (0x1UL << ADC_CR_LINCALRDYW2_Pos) /*!< 0x00800000 */ +#define ADC_CR_LINCALRDYW2 ADC_CR_LINCALRDYW2_Msk /*!< ADC Linearity calibration ready Word 2 */ +#define ADC_CR_LINCALRDYW3_Pos (24U) +#define ADC_CR_LINCALRDYW3_Msk (0x1UL << ADC_CR_LINCALRDYW3_Pos) /*!< 0x01000000 */ +#define ADC_CR_LINCALRDYW3 ADC_CR_LINCALRDYW3_Msk /*!< ADC Linearity calibration ready Word 3 */ +#define ADC_CR_LINCALRDYW4_Pos (25U) +#define ADC_CR_LINCALRDYW4_Msk (0x1UL << ADC_CR_LINCALRDYW4_Pos) /*!< 0x02000000 */ +#define ADC_CR_LINCALRDYW4 ADC_CR_LINCALRDYW4_Msk /*!< ADC Linearity calibration ready Word 4 */ +#define ADC_CR_LINCALRDYW5_Pos (26U) +#define ADC_CR_LINCALRDYW5_Msk (0x1UL << ADC_CR_LINCALRDYW5_Pos) /*!< 0x04000000 */ +#define ADC_CR_LINCALRDYW5 ADC_CR_LINCALRDYW5_Msk /*!< ADC Linearity calibration ready Word 5 */ +#define ADC_CR_LINCALRDYW6_Pos (27U) +#define ADC_CR_LINCALRDYW6_Msk (0x1UL << ADC_CR_LINCALRDYW6_Pos) /*!< 0x08000000 */ +#define ADC_CR_LINCALRDYW6 ADC_CR_LINCALRDYW6_Msk /*!< ADC Linearity calibration ready Word 6 */ +#define ADC_CR_ADVREGEN_Pos (28U) +#define ADC_CR_ADVREGEN_Msk (0x1UL << ADC_CR_ADVREGEN_Pos) /*!< 0x10000000 */ +#define ADC_CR_ADVREGEN ADC_CR_ADVREGEN_Msk /*!< ADC Voltage regulator Enable */ +#define ADC_CR_DEEPPWD_Pos (29U) +#define ADC_CR_DEEPPWD_Msk (0x1UL << ADC_CR_DEEPPWD_Pos) /*!< 0x20000000 */ +#define ADC_CR_DEEPPWD ADC_CR_DEEPPWD_Msk /*!< ADC Deep power down Enable */ +#define ADC_CR_ADCALDIF_Pos (30U) +#define ADC_CR_ADCALDIF_Msk (0x1UL << ADC_CR_ADCALDIF_Pos) /*!< 0x40000000 */ +#define ADC_CR_ADCALDIF ADC_CR_ADCALDIF_Msk /*!< ADC Differential Mode for calibration */ +#define ADC_CR_ADCAL_Pos (31U) +#define ADC_CR_ADCAL_Msk (0x1UL << ADC_CR_ADCAL_Pos) /*!< 0x80000000 */ +#define ADC_CR_ADCAL ADC_CR_ADCAL_Msk /*!< ADC Calibration */ + +/******************** Bit definition for ADC_CFGR register ********************/ +#define ADC_CFGR_DMNGT_Pos (0U) +#define ADC_CFGR_DMNGT_Msk (0x3UL << ADC_CFGR_DMNGT_Pos) /*!< 0x00000003 */ +#define ADC_CFGR_DMNGT ADC_CFGR_DMNGT_Msk /*!< ADC Data Management configuration */ +#define ADC_CFGR_DMNGT_0 (0x1UL << ADC_CFGR_DMNGT_Pos) /*!< 0x00000001 */ +#define ADC_CFGR_DMNGT_1 (0x2UL << ADC_CFGR_DMNGT_Pos) /*!< 0x00000002 */ + +#define ADC_CFGR_RES_Pos (2U) +#define ADC_CFGR_RES_Msk (0x7UL << ADC_CFGR_RES_Pos) /*!< 0x0000001C */ +#define ADC_CFGR_RES ADC_CFGR_RES_Msk /*!< ADC Data resolution */ +#define ADC_CFGR_RES_0 (0x1UL << ADC_CFGR_RES_Pos) /*!< 0x00000004 */ +#define ADC_CFGR_RES_1 (0x2UL << ADC_CFGR_RES_Pos) /*!< 0x00000008 */ +#define ADC_CFGR_RES_2 (0x4UL << ADC_CFGR_RES_Pos) /*!< 0x00000010 */ + +#define ADC_CFGR_EXTSEL_Pos (5U) +#define ADC_CFGR_EXTSEL_Msk (0x1FUL << ADC_CFGR_EXTSEL_Pos) /*!< 0x000003E0 */ +#define ADC_CFGR_EXTSEL ADC_CFGR_EXTSEL_Msk /*!< ADC External trigger selection for regular group */ +#define ADC_CFGR_EXTSEL_0 (0x01UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000020 */ +#define ADC_CFGR_EXTSEL_1 (0x02UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000040 */ +#define ADC_CFGR_EXTSEL_2 (0x04UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000080 */ +#define ADC_CFGR_EXTSEL_3 (0x08UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000100 */ +#define ADC_CFGR_EXTSEL_4 (0x10UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000200 */ + +#define ADC_CFGR_EXTEN_Pos (10U) +#define ADC_CFGR_EXTEN_Msk (0x3UL << ADC_CFGR_EXTEN_Pos) /*!< 0x00000C00 */ +#define ADC_CFGR_EXTEN ADC_CFGR_EXTEN_Msk /*!< ADC External trigger enable and polarity selection for regular channels */ +#define ADC_CFGR_EXTEN_0 (0x1UL << ADC_CFGR_EXTEN_Pos) /*!< 0x00000400 */ +#define ADC_CFGR_EXTEN_1 (0x2UL << ADC_CFGR_EXTEN_Pos) /*!< 0x00000800 */ + +#define ADC_CFGR_OVRMOD_Pos (12U) +#define ADC_CFGR_OVRMOD_Msk (0x1UL << ADC_CFGR_OVRMOD_Pos) /*!< 0x00001000 */ +#define ADC_CFGR_OVRMOD ADC_CFGR_OVRMOD_Msk /*!< ADC overrun mode */ +#define ADC_CFGR_CONT_Pos (13U) +#define ADC_CFGR_CONT_Msk (0x1UL << ADC_CFGR_CONT_Pos) /*!< 0x00002000 */ +#define ADC_CFGR_CONT ADC_CFGR_CONT_Msk /*!< ADC Single/continuous conversion mode for regular conversion */ +#define ADC_CFGR_AUTDLY_Pos (14U) +#define ADC_CFGR_AUTDLY_Msk (0x1UL << ADC_CFGR_AUTDLY_Pos) /*!< 0x00004000 */ +#define ADC_CFGR_AUTDLY ADC_CFGR_AUTDLY_Msk /*!< ADC Delayed conversion mode */ + +#define ADC_CFGR_DISCEN_Pos (16U) +#define ADC_CFGR_DISCEN_Msk (0x1UL << ADC_CFGR_DISCEN_Pos) /*!< 0x00010000 */ +#define ADC_CFGR_DISCEN ADC_CFGR_DISCEN_Msk /*!< ADC Discontinuous mode for regular channels */ + +#define ADC_CFGR_DISCNUM_Pos (17U) +#define ADC_CFGR_DISCNUM_Msk (0x7UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x000E0000 */ +#define ADC_CFGR_DISCNUM ADC_CFGR_DISCNUM_Msk /*!< ADC Discontinuous mode channel count */ +#define ADC_CFGR_DISCNUM_0 (0x1UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x00020000 */ +#define ADC_CFGR_DISCNUM_1 (0x2UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x00040000 */ +#define ADC_CFGR_DISCNUM_2 (0x4UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x00080000 */ + +#define ADC_CFGR_JDISCEN_Pos (20U) +#define ADC_CFGR_JDISCEN_Msk (0x1UL << ADC_CFGR_JDISCEN_Pos) /*!< 0x00100000 */ +#define ADC_CFGR_JDISCEN ADC_CFGR_JDISCEN_Msk /*!< ADC Discontinuous mode on injected channels */ +#define ADC_CFGR_JQM_Pos (21U) +#define ADC_CFGR_JQM_Msk (0x1UL << ADC_CFGR_JQM_Pos) /*!< 0x00200000 */ +#define ADC_CFGR_JQM ADC_CFGR_JQM_Msk /*!< ADC JSQR Queue mode */ +#define ADC_CFGR_AWD1SGL_Pos (22U) +#define ADC_CFGR_AWD1SGL_Msk (0x1UL << ADC_CFGR_AWD1SGL_Pos) /*!< 0x00400000 */ +#define ADC_CFGR_AWD1SGL ADC_CFGR_AWD1SGL_Msk /*!< Enable the watchdog 1 on a single channel or on all channels */ +#define ADC_CFGR_AWD1EN_Pos (23U) +#define ADC_CFGR_AWD1EN_Msk (0x1UL << ADC_CFGR_AWD1EN_Pos) /*!< 0x00800000 */ +#define ADC_CFGR_AWD1EN ADC_CFGR_AWD1EN_Msk /*!< ADC Analog watchdog 1 enable on regular Channels */ +#define ADC_CFGR_JAWD1EN_Pos (24U) +#define ADC_CFGR_JAWD1EN_Msk (0x1UL << ADC_CFGR_JAWD1EN_Pos) /*!< 0x01000000 */ +#define ADC_CFGR_JAWD1EN ADC_CFGR_JAWD1EN_Msk /*!< ADC Analog watchdog 1 enable on injected Channels */ +#define ADC_CFGR_JAUTO_Pos (25U) +#define ADC_CFGR_JAUTO_Msk (0x1UL << ADC_CFGR_JAUTO_Pos) /*!< 0x02000000 */ +#define ADC_CFGR_JAUTO ADC_CFGR_JAUTO_Msk /*!< ADC Automatic injected group conversion */ + +#define ADC_CFGR_AWD1CH_Pos (26U) +#define ADC_CFGR_AWD1CH_Msk (0x1FUL << ADC_CFGR_AWD1CH_Pos) /*!< 0x7C000000 */ +#define ADC_CFGR_AWD1CH ADC_CFGR_AWD1CH_Msk /*!< ADC Analog watchdog 1 Channel selection */ +#define ADC_CFGR_AWD1CH_0 (0x01UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x04000000 */ +#define ADC_CFGR_AWD1CH_1 (0x02UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x08000000 */ +#define ADC_CFGR_AWD1CH_2 (0x04UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x10000000 */ +#define ADC_CFGR_AWD1CH_3 (0x08UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x20000000 */ +#define ADC_CFGR_AWD1CH_4 (0x10UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x40000000 */ + +#define ADC_CFGR_JQDIS_Pos (31U) +#define ADC_CFGR_JQDIS_Msk (0x1UL << ADC_CFGR_JQDIS_Pos) /*!< 0x80000000 */ +#define ADC_CFGR_JQDIS ADC_CFGR_JQDIS_Msk /*!< ADC Injected queue disable */ + +#define ADC3_CFGR_DMAEN_Pos (0U) +#define ADC3_CFGR_DMAEN_Msk (0x1UL << ADC3_CFGR_DMAEN_Pos) /*!< 0x00000001 */ +#define ADC3_CFGR_DMAEN ADC3_CFGR_DMAEN_Msk /*!< ADC DMA transfer enable */ +#define ADC3_CFGR_DMACFG_Pos (1U) +#define ADC3_CFGR_DMACFG_Msk (0x1UL << ADC3_CFGR_DMACFG_Pos) /*!< 0x00000002 */ +#define ADC3_CFGR_DMACFG ADC3_CFGR_DMACFG_Msk /*!< ADC DMA transfer configuration */ + +#define ADC3_CFGR_RES_Pos (3U) +#define ADC3_CFGR_RES_Msk (0x3UL << ADC3_CFGR_RES_Pos) /*!< 0x00000018 */ +#define ADC3_CFGR_RES ADC3_CFGR_RES_Msk /*!< ADC data resolution */ +#define ADC3_CFGR_RES_0 (0x1UL << ADC3_CFGR_RES_Pos) /*!< 0x00000008 */ +#define ADC3_CFGR_RES_1 (0x2UL << ADC3_CFGR_RES_Pos) /*!< 0x00000010 */ + +#define ADC3_CFGR_ALIGN_Pos (15U) +#define ADC3_CFGR_ALIGN_Msk (0x1UL << ADC3_CFGR_ALIGN_Pos) /*!< 0x00008000 */ +#define ADC3_CFGR_ALIGN ADC3_CFGR_ALIGN_Msk /*!< ADC data alignement */ +/******************** Bit definition for ADC_CFGR2 register ********************/ +#define ADC_CFGR2_ROVSE_Pos (0U) +#define ADC_CFGR2_ROVSE_Msk (0x1UL << ADC_CFGR2_ROVSE_Pos) /*!< 0x00000001 */ +#define ADC_CFGR2_ROVSE ADC_CFGR2_ROVSE_Msk /*!< ADC Regular group oversampler enable */ +#define ADC_CFGR2_JOVSE_Pos (1U) +#define ADC_CFGR2_JOVSE_Msk (0x1UL << ADC_CFGR2_JOVSE_Pos) /*!< 0x00000002 */ +#define ADC_CFGR2_JOVSE ADC_CFGR2_JOVSE_Msk /*!< ADC Injected group oversampler enable */ + +#define ADC_CFGR2_OVSS_Pos (5U) +#define ADC_CFGR2_OVSS_Msk (0xFUL << ADC_CFGR2_OVSS_Pos) /*!< 0x000001E0 */ +#define ADC_CFGR2_OVSS ADC_CFGR2_OVSS_Msk /*!< ADC Regular Oversampling shift */ +#define ADC_CFGR2_OVSS_0 (0x1UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000020 */ +#define ADC_CFGR2_OVSS_1 (0x2UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000040 */ +#define ADC_CFGR2_OVSS_2 (0x4UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000080 */ +#define ADC_CFGR2_OVSS_3 (0x8UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000100 */ + +#define ADC_CFGR2_TROVS_Pos (9U) +#define ADC_CFGR2_TROVS_Msk (0x1UL << ADC_CFGR2_TROVS_Pos) /*!< 0x00000200 */ +#define ADC_CFGR2_TROVS ADC_CFGR2_TROVS_Msk /*!< ADC Triggered regular Oversampling */ +#define ADC_CFGR2_ROVSM_Pos (10U) +#define ADC_CFGR2_ROVSM_Msk (0x1UL << ADC_CFGR2_ROVSM_Pos) /*!< 0x00000400 */ +#define ADC_CFGR2_ROVSM ADC_CFGR2_ROVSM_Msk /*!< ADC Regular oversampling mode */ + +#define ADC_CFGR2_RSHIFT1_Pos (11U) +#define ADC_CFGR2_RSHIFT1_Msk (0x1UL << ADC_CFGR2_RSHIFT1_Pos) /*!< 0x00000800 */ +#define ADC_CFGR2_RSHIFT1 ADC_CFGR2_RSHIFT1_Msk /*!< ADC Right-shift data after Offset 1 correction */ +#define ADC_CFGR2_RSHIFT2_Pos (12U) +#define ADC_CFGR2_RSHIFT2_Msk (0x1UL << ADC_CFGR2_RSHIFT2_Pos) /*!< 0x00001000 */ +#define ADC_CFGR2_RSHIFT2 ADC_CFGR2_RSHIFT2_Msk /*!< ADC Right-shift data after Offset 2 correction */ +#define ADC_CFGR2_RSHIFT3_Pos (13U) +#define ADC_CFGR2_RSHIFT3_Msk (0x1UL << ADC_CFGR2_RSHIFT3_Pos) /*!< 0x00002000 */ +#define ADC_CFGR2_RSHIFT3 ADC_CFGR2_RSHIFT3_Msk /*!< ADC Right-shift data after Offset 3 correction */ +#define ADC_CFGR2_RSHIFT4_Pos (14U) +#define ADC_CFGR2_RSHIFT4_Msk (0x1UL << ADC_CFGR2_RSHIFT4_Pos) /*!< 0x00004000 */ +#define ADC_CFGR2_RSHIFT4 ADC_CFGR2_RSHIFT4_Msk /*!< ADC Right-shift data after Offset 4 correction */ + +#define ADC_CFGR2_OVSR_Pos (16U) +#define ADC_CFGR2_OVSR_Msk (0x3FFUL << ADC_CFGR2_OVSR_Pos) /*!< 0x03FF0000 */ +#define ADC_CFGR2_OVSR ADC_CFGR2_OVSR_Msk /*!< ADC oversampling Ratio */ +#define ADC_CFGR2_OVSR_0 (0x001UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00010000 */ +#define ADC_CFGR2_OVSR_1 (0x002UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00020000 */ +#define ADC_CFGR2_OVSR_2 (0x004UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00040000 */ +#define ADC_CFGR2_OVSR_3 (0x008UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00080000 */ +#define ADC_CFGR2_OVSR_4 (0x010UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00100000 */ +#define ADC_CFGR2_OVSR_5 (0x020UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00200000 */ +#define ADC_CFGR2_OVSR_6 (0x040UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00400000 */ +#define ADC_CFGR2_OVSR_7 (0x080UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00800000 */ +#define ADC_CFGR2_OVSR_8 (0x100UL << ADC_CFGR2_OVSR_Pos) /*!< 0x01000000 */ +#define ADC_CFGR2_OVSR_9 (0x200UL << ADC_CFGR2_OVSR_Pos) /*!< 0x02000000 */ + +#define ADC_CFGR2_LSHIFT_Pos (28U) +#define ADC_CFGR2_LSHIFT_Msk (0xFUL << ADC_CFGR2_LSHIFT_Pos) /*!< 0xF0000000 */ +#define ADC_CFGR2_LSHIFT ADC_CFGR2_LSHIFT_Msk /*!< ADC Left shift factor */ +#define ADC_CFGR2_LSHIFT_0 (0x1UL << ADC_CFGR2_LSHIFT_Pos) /*!< 0x10000000 */ +#define ADC_CFGR2_LSHIFT_1 (0x2UL << ADC_CFGR2_LSHIFT_Pos) /*!< 0x20000000 */ +#define ADC_CFGR2_LSHIFT_2 (0x4UL << ADC_CFGR2_LSHIFT_Pos) /*!< 0x40000000 */ +#define ADC_CFGR2_LSHIFT_3 (0x8UL << ADC_CFGR2_LSHIFT_Pos) /*!< 0x80000000 */ + +#define ADC3_CFGR2_OVSR_Pos (2U) +#define ADC3_CFGR2_OVSR_Msk (0x7UL << ADC3_CFGR2_OVSR_Pos) /*!< 0x0000001C */ +#define ADC3_CFGR2_OVSR ADC3_CFGR2_OVSR_Msk /*!< ADC oversampling ratio */ +#define ADC3_CFGR2_OVSR_0 (0x1UL << ADC3_CFGR2_OVSR_Pos) /*!< 0x00000004 */ +#define ADC3_CFGR2_OVSR_1 (0x2UL << ADC3_CFGR2_OVSR_Pos) /*!< 0x00000008 */ +#define ADC3_CFGR2_OVSR_2 (0x4UL << ADC3_CFGR2_OVSR_Pos) /*!< 0x00000010 */ + +#define ADC3_CFGR2_SWTRIG_Pos (25U) +#define ADC3_CFGR2_SWTRIG_Msk (0x1UL << ADC3_CFGR2_SWTRIG_Pos) /*!< 0x02000000 */ +#define ADC3_CFGR2_SWTRIG ADC3_CFGR2_SWTRIG_Msk /*!< ADC Software Trigger Bit for Sample time control trigger mode */ +#define ADC3_CFGR2_BULB_Pos (26U) +#define ADC3_CFGR2_BULB_Msk (0x1UL << ADC3_CFGR2_BULB_Pos) /*!< 0x04000000 */ +#define ADC3_CFGR2_BULB ADC3_CFGR2_BULB_Msk /*!< ADC Bulb sampling mode */ +#define ADC3_CFGR2_SMPTRIG_Pos (27U) +#define ADC3_CFGR2_SMPTRIG_Msk (0x1UL << ADC3_CFGR2_SMPTRIG_Pos) /*!< 0x08000000 */ +#define ADC3_CFGR2_SMPTRIG ADC3_CFGR2_SMPTRIG_Msk /*!< ADC Sample Time Control Trigger mode */ +/******************** Bit definition for ADC_SMPR1 register ********************/ +#define ADC_SMPR1_SMP0_Pos (0U) +#define ADC_SMPR1_SMP0_Msk (0x7UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000007 */ +#define ADC_SMPR1_SMP0 ADC_SMPR1_SMP0_Msk /*!< ADC Channel 0 Sampling time selection */ +#define ADC_SMPR1_SMP0_0 (0x1UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000001 */ +#define ADC_SMPR1_SMP0_1 (0x2UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000002 */ +#define ADC_SMPR1_SMP0_2 (0x4UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000004 */ + +#define ADC_SMPR1_SMP1_Pos (3U) +#define ADC_SMPR1_SMP1_Msk (0x7UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000038 */ +#define ADC_SMPR1_SMP1 ADC_SMPR1_SMP1_Msk /*!< ADC Channel 1 Sampling time selection */ +#define ADC_SMPR1_SMP1_0 (0x1UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000008 */ +#define ADC_SMPR1_SMP1_1 (0x2UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000010 */ +#define ADC_SMPR1_SMP1_2 (0x4UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000020 */ + +#define ADC_SMPR1_SMP2_Pos (6U) +#define ADC_SMPR1_SMP2_Msk (0x7UL << ADC_SMPR1_SMP2_Pos) /*!< 0x000001C0 */ +#define ADC_SMPR1_SMP2 ADC_SMPR1_SMP2_Msk /*!< ADC Channel 2 Sampling time selection */ +#define ADC_SMPR1_SMP2_0 (0x1UL << ADC_SMPR1_SMP2_Pos) /*!< 0x00000040 */ +#define ADC_SMPR1_SMP2_1 (0x2UL << ADC_SMPR1_SMP2_Pos) /*!< 0x00000080 */ +#define ADC_SMPR1_SMP2_2 (0x4UL << ADC_SMPR1_SMP2_Pos) /*!< 0x00000100 */ + +#define ADC_SMPR1_SMP3_Pos (9U) +#define ADC_SMPR1_SMP3_Msk (0x7UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000E00 */ +#define ADC_SMPR1_SMP3 ADC_SMPR1_SMP3_Msk /*!< ADC Channel 3 Sampling time selection */ +#define ADC_SMPR1_SMP3_0 (0x1UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000200 */ +#define ADC_SMPR1_SMP3_1 (0x2UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000400 */ +#define ADC_SMPR1_SMP3_2 (0x4UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000800 */ + +#define ADC_SMPR1_SMP4_Pos (12U) +#define ADC_SMPR1_SMP4_Msk (0x7UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00007000 */ +#define ADC_SMPR1_SMP4 ADC_SMPR1_SMP4_Msk /*!< ADC Channel 4 Sampling time selection */ +#define ADC_SMPR1_SMP4_0 (0x1UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00001000 */ +#define ADC_SMPR1_SMP4_1 (0x2UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00002000 */ +#define ADC_SMPR1_SMP4_2 (0x4UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00004000 */ + +#define ADC_SMPR1_SMP5_Pos (15U) +#define ADC_SMPR1_SMP5_Msk (0x7UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00038000 */ +#define ADC_SMPR1_SMP5 ADC_SMPR1_SMP5_Msk /*!< ADC Channel 5 Sampling time selection */ +#define ADC_SMPR1_SMP5_0 (0x1UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00008000 */ +#define ADC_SMPR1_SMP5_1 (0x2UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00010000 */ +#define ADC_SMPR1_SMP5_2 (0x4UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00020000 */ + +#define ADC_SMPR1_SMP6_Pos (18U) +#define ADC_SMPR1_SMP6_Msk (0x7UL << ADC_SMPR1_SMP6_Pos) /*!< 0x001C0000 */ +#define ADC_SMPR1_SMP6 ADC_SMPR1_SMP6_Msk /*!< ADC Channel 6 Sampling time selection */ +#define ADC_SMPR1_SMP6_0 (0x1UL << ADC_SMPR1_SMP6_Pos) /*!< 0x00040000 */ +#define ADC_SMPR1_SMP6_1 (0x2UL << ADC_SMPR1_SMP6_Pos) /*!< 0x00080000 */ +#define ADC_SMPR1_SMP6_2 (0x4UL << ADC_SMPR1_SMP6_Pos) /*!< 0x00100000 */ + +#define ADC_SMPR1_SMP7_Pos (21U) +#define ADC_SMPR1_SMP7_Msk (0x7UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00E00000 */ +#define ADC_SMPR1_SMP7 ADC_SMPR1_SMP7_Msk /*!< ADC Channel 7 Sampling time selection */ +#define ADC_SMPR1_SMP7_0 (0x1UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00200000 */ +#define ADC_SMPR1_SMP7_1 (0x2UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00400000 */ +#define ADC_SMPR1_SMP7_2 (0x4UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00800000 */ + +#define ADC_SMPR1_SMP8_Pos (24U) +#define ADC_SMPR1_SMP8_Msk (0x7UL << ADC_SMPR1_SMP8_Pos) /*!< 0x07000000 */ +#define ADC_SMPR1_SMP8 ADC_SMPR1_SMP8_Msk /*!< ADC Channel 8 Sampling time selection */ +#define ADC_SMPR1_SMP8_0 (0x1UL << ADC_SMPR1_SMP8_Pos) /*!< 0x01000000 */ +#define ADC_SMPR1_SMP8_1 (0x2UL << ADC_SMPR1_SMP8_Pos) /*!< 0x02000000 */ +#define ADC_SMPR1_SMP8_2 (0x4UL << ADC_SMPR1_SMP8_Pos) /*!< 0x04000000 */ + +#define ADC_SMPR1_SMP9_Pos (27U) +#define ADC_SMPR1_SMP9_Msk (0x7UL << ADC_SMPR1_SMP9_Pos) /*!< 0x38000000 */ +#define ADC_SMPR1_SMP9 ADC_SMPR1_SMP9_Msk /*!< ADC Channel 9 Sampling time selection */ +#define ADC_SMPR1_SMP9_0 (0x1UL << ADC_SMPR1_SMP9_Pos) /*!< 0x08000000 */ +#define ADC_SMPR1_SMP9_1 (0x2UL << ADC_SMPR1_SMP9_Pos) /*!< 0x10000000 */ +#define ADC_SMPR1_SMP9_2 (0x4UL << ADC_SMPR1_SMP9_Pos) /*!< 0x20000000 */ + +/******************** Bit definition for ADC_SMPR2 register ********************/ +#define ADC_SMPR2_SMP10_Pos (0U) +#define ADC_SMPR2_SMP10_Msk (0x7UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000007 */ +#define ADC_SMPR2_SMP10 ADC_SMPR2_SMP10_Msk /*!< ADC Channel 10 Sampling time selection */ +#define ADC_SMPR2_SMP10_0 (0x1UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000001 */ +#define ADC_SMPR2_SMP10_1 (0x2UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000002 */ +#define ADC_SMPR2_SMP10_2 (0x4UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000004 */ + +#define ADC_SMPR2_SMP11_Pos (3U) +#define ADC_SMPR2_SMP11_Msk (0x7UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000038 */ +#define ADC_SMPR2_SMP11 ADC_SMPR2_SMP11_Msk /*!< ADC Channel 11 Sampling time selection */ +#define ADC_SMPR2_SMP11_0 (0x1UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000008 */ +#define ADC_SMPR2_SMP11_1 (0x2UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000010 */ +#define ADC_SMPR2_SMP11_2 (0x4UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000020 */ + +#define ADC_SMPR2_SMP12_Pos (6U) +#define ADC_SMPR2_SMP12_Msk (0x7UL << ADC_SMPR2_SMP12_Pos) /*!< 0x000001C0 */ +#define ADC_SMPR2_SMP12 ADC_SMPR2_SMP12_Msk /*!< ADC Channel 12 Sampling time selection */ +#define ADC_SMPR2_SMP12_0 (0x1UL << ADC_SMPR2_SMP12_Pos) /*!< 0x00000040 */ +#define ADC_SMPR2_SMP12_1 (0x2UL << ADC_SMPR2_SMP12_Pos) /*!< 0x00000080 */ +#define ADC_SMPR2_SMP12_2 (0x4UL << ADC_SMPR2_SMP12_Pos) /*!< 0x00000100 */ + +#define ADC_SMPR2_SMP13_Pos (9U) +#define ADC_SMPR2_SMP13_Msk (0x7UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000E00 */ +#define ADC_SMPR2_SMP13 ADC_SMPR2_SMP13_Msk /*!< ADC Channel 13 Sampling time selection */ +#define ADC_SMPR2_SMP13_0 (0x1UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000200 */ +#define ADC_SMPR2_SMP13_1 (0x2UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000400 */ +#define ADC_SMPR2_SMP13_2 (0x4UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000800 */ + +#define ADC_SMPR2_SMP14_Pos (12U) +#define ADC_SMPR2_SMP14_Msk (0x7UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00007000 */ +#define ADC_SMPR2_SMP14 ADC_SMPR2_SMP14_Msk /*!< ADC Channel 14 Sampling time selection */ +#define ADC_SMPR2_SMP14_0 (0x1UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00001000 */ +#define ADC_SMPR2_SMP14_1 (0x2UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00002000 */ +#define ADC_SMPR2_SMP14_2 (0x4UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00004000 */ + +#define ADC_SMPR2_SMP15_Pos (15U) +#define ADC_SMPR2_SMP15_Msk (0x7UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00038000 */ +#define ADC_SMPR2_SMP15 ADC_SMPR2_SMP15_Msk /*!< ADC Channel 15 Sampling time selection */ +#define ADC_SMPR2_SMP15_0 (0x1UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00008000 */ +#define ADC_SMPR2_SMP15_1 (0x2UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00010000 */ +#define ADC_SMPR2_SMP15_2 (0x4UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00020000 */ + +#define ADC_SMPR2_SMP16_Pos (18U) +#define ADC_SMPR2_SMP16_Msk (0x7UL << ADC_SMPR2_SMP16_Pos) /*!< 0x001C0000 */ +#define ADC_SMPR2_SMP16 ADC_SMPR2_SMP16_Msk /*!< ADC Channel 16 Sampling time selection */ +#define ADC_SMPR2_SMP16_0 (0x1UL << ADC_SMPR2_SMP16_Pos) /*!< 0x00040000 */ +#define ADC_SMPR2_SMP16_1 (0x2UL << ADC_SMPR2_SMP16_Pos) /*!< 0x00080000 */ +#define ADC_SMPR2_SMP16_2 (0x4UL << ADC_SMPR2_SMP16_Pos) /*!< 0x00100000 */ + +#define ADC_SMPR2_SMP17_Pos (21U) +#define ADC_SMPR2_SMP17_Msk (0x7UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00E00000 */ +#define ADC_SMPR2_SMP17 ADC_SMPR2_SMP17_Msk /*!< ADC Channel 17 Sampling time selection */ +#define ADC_SMPR2_SMP17_0 (0x1UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00200000 */ +#define ADC_SMPR2_SMP17_1 (0x2UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00400000 */ +#define ADC_SMPR2_SMP17_2 (0x4UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00800000 */ + +#define ADC_SMPR2_SMP18_Pos (24U) +#define ADC_SMPR2_SMP18_Msk (0x7UL << ADC_SMPR2_SMP18_Pos) /*!< 0x07000000 */ +#define ADC_SMPR2_SMP18 ADC_SMPR2_SMP18_Msk /*!< ADC Channel 18 Sampling time selection */ +#define ADC_SMPR2_SMP18_0 (0x1UL << ADC_SMPR2_SMP18_Pos) /*!< 0x01000000 */ +#define ADC_SMPR2_SMP18_1 (0x2UL << ADC_SMPR2_SMP18_Pos) /*!< 0x02000000 */ +#define ADC_SMPR2_SMP18_2 (0x4UL << ADC_SMPR2_SMP18_Pos) /*!< 0x04000000 */ + +#define ADC_SMPR2_SMP19_Pos (27U) +#define ADC_SMPR2_SMP19_Msk (0x7UL << ADC_SMPR2_SMP19_Pos) /*!< 0x38000000 */ +#define ADC_SMPR2_SMP19 ADC_SMPR2_SMP19_Msk /*!< ADC Channel 19 Sampling time selection */ +#define ADC_SMPR2_SMP19_0 (0x1UL << ADC_SMPR2_SMP19_Pos) /*!< 0x08000000 */ +#define ADC_SMPR2_SMP19_1 (0x2UL << ADC_SMPR2_SMP19_Pos) /*!< 0x10000000 */ +#define ADC_SMPR2_SMP19_2 (0x4UL << ADC_SMPR2_SMP19_Pos) /*!< 0x20000000 */ + +/******************** Bit definition for ADC_PCSEL register ********************/ +#define ADC_PCSEL_PCSEL_Pos (0U) +#define ADC_PCSEL_PCSEL_Msk (0xFFFFFUL << ADC_PCSEL_PCSEL_Pos) /*!< 0x000FFFFF */ +#define ADC_PCSEL_PCSEL ADC_PCSEL_PCSEL_Msk /*!< ADC pre channel selection */ +#define ADC_PCSEL_PCSEL_0 (0x00001UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000001 */ +#define ADC_PCSEL_PCSEL_1 (0x00002UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000002 */ +#define ADC_PCSEL_PCSEL_2 (0x00004UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000004 */ +#define ADC_PCSEL_PCSEL_3 (0x00008UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000008 */ +#define ADC_PCSEL_PCSEL_4 (0x00010UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000010 */ +#define ADC_PCSEL_PCSEL_5 (0x00020UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000020 */ +#define ADC_PCSEL_PCSEL_6 (0x00040UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000040 */ +#define ADC_PCSEL_PCSEL_7 (0x00080UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000080 */ +#define ADC_PCSEL_PCSEL_8 (0x00100UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000100 */ +#define ADC_PCSEL_PCSEL_9 (0x00200UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000200 */ +#define ADC_PCSEL_PCSEL_10 (0x00400UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000400 */ +#define ADC_PCSEL_PCSEL_11 (0x00800UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000800 */ +#define ADC_PCSEL_PCSEL_12 (0x01000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00001000 */ +#define ADC_PCSEL_PCSEL_13 (0x02000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00002000 */ +#define ADC_PCSEL_PCSEL_14 (0x04000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00004000 */ +#define ADC_PCSEL_PCSEL_15 (0x08000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00008000 */ +#define ADC_PCSEL_PCSEL_16 (0x10000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00010000 */ +#define ADC_PCSEL_PCSEL_17 (0x20000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00020000 */ +#define ADC_PCSEL_PCSEL_18 (0x40000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00040000 */ +#define ADC_PCSEL_PCSEL_19 (0x80000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00080000 */ + +/***************** Bit definition for ADC_LTR1, 2, 3 registers *****************/ +#define ADC_LTR_LT_Pos (0U) +#define ADC_LTR_LT_Msk (0x3FFFFFFUL << ADC_LTR_LT_Pos) /*!< 0x03FFFFFF */ +#define ADC_LTR_LT ADC_LTR_LT_Msk /*!< ADC Analog watchdog 1, 2 and 3 lower threshold */ + +/***************** Bit definition for ADC_HTR1, 2, 3 registers ****************/ +#define ADC_HTR_HT_Pos (0U) +#define ADC_HTR_HT_Msk (0x3FFFFFFUL << ADC_HTR_HT_Pos) /*!< 0x03FFFFFF */ +#define ADC_HTR_HT ADC_HTR_HT_Msk /*!< ADC Analog watchdog 1,2 and 3 higher threshold */ + +/******************** Bit definition for ADC3_TR1 register *******************/ +#define ADC3_TR1_LT1_Pos (0U) +#define ADC3_TR1_LT1_Msk (0xFFFUL << ADC3_TR1_LT1_Pos) /*!< 0x00000FFF */ +#define ADC3_TR1_LT1 ADC3_TR1_LT1_Msk /*!< ADC analog watchdog 1 threshold low */ + +#define ADC3_TR1_AWDFILT_Pos (12U) +#define ADC3_TR1_AWDFILT_Msk (0x7UL << ADC3_TR1_AWDFILT_Pos) /*!< 0x00007000 */ +#define ADC3_TR1_AWDFILT ADC3_TR1_AWDFILT_Msk /*!< ADC analog watchdog filtering parameter */ +#define ADC3_TR1_AWDFILT_0 (0x1UL << ADC3_TR1_AWDFILT_Pos) /*!< 0x00001000 */ +#define ADC3_TR1_AWDFILT_1 (0x2UL << ADC3_TR1_AWDFILT_Pos) /*!< 0x00002000 */ +#define ADC3_TR1_AWDFILT_2 (0x4UL << ADC3_TR1_AWDFILT_Pos) /*!< 0x00004000 */ + +#define ADC3_TR1_HT1_Pos (16U) +#define ADC3_TR1_HT1_Msk (0xFFFUL << ADC3_TR1_HT1_Pos) /*!< 0x0FFF0000 */ +#define ADC3_TR1_HT1 ADC3_TR1_HT1_Msk /*!< ADC analog watchdog 1 threshold high */ + +/******************** Bit definition for ADC3_TR2 register *******************/ +#define ADC3_TR2_LT2_Pos (0U) +#define ADC3_TR2_LT2_Msk (0xFFUL << ADC3_TR2_LT2_Pos) /*!< 0x000000FF */ +#define ADC3_TR2_LT2 ADC3_TR2_LT2_Msk /*!< ADC analog watchdog 2 threshold low */ + +#define ADC3_TR2_HT2_Pos (16U) +#define ADC3_TR2_HT2_Msk (0xFFUL << ADC3_TR2_HT2_Pos) /*!< 0x00FF0000 */ +#define ADC3_TR2_HT2 ADC3_TR2_HT2_Msk /*!< ADC analog watchdog 2 threshold high */ + +/******************** Bit definition for ADC3_TR3 register *******************/ +#define ADC3_TR3_LT3_Pos (0U) +#define ADC3_TR3_LT3_Msk (0xFFUL << ADC3_TR3_LT3_Pos) /*!< 0x000000FF */ +#define ADC3_TR3_LT3 ADC3_TR3_LT3_Msk /*!< ADC analog watchdog 3 threshold low */ + +#define ADC3_TR3_HT3_Pos (16U) +#define ADC3_TR3_HT3_Msk (0xFFUL << ADC3_TR3_HT3_Pos) /*!< 0x00FF0000 */ +#define ADC3_TR3_HT3 ADC3_TR3_HT3_Msk /*!< ADC analog watchdog 3 threshold high */ + +/******************** Bit definition for ADC_SQR1 register ********************/ +#define ADC_SQR1_L_Pos (0U) +#define ADC_SQR1_L_Msk (0xFUL << ADC_SQR1_L_Pos) /*!< 0x0000000F */ +#define ADC_SQR1_L ADC_SQR1_L_Msk /*!< ADC regular channel sequence lenght */ +#define ADC_SQR1_L_0 (0x1UL << ADC_SQR1_L_Pos) /*!< 0x00000001 */ +#define ADC_SQR1_L_1 (0x2UL << ADC_SQR1_L_Pos) /*!< 0x00000002 */ +#define ADC_SQR1_L_2 (0x4UL << ADC_SQR1_L_Pos) /*!< 0x00000004 */ +#define ADC_SQR1_L_3 (0x8UL << ADC_SQR1_L_Pos) /*!< 0x00000008 */ + +#define ADC_SQR1_SQ1_Pos (6U) +#define ADC_SQR1_SQ1_Msk (0x1FUL << ADC_SQR1_SQ1_Pos) /*!< 0x000007C0 */ +#define ADC_SQR1_SQ1 ADC_SQR1_SQ1_Msk /*!< ADC 1st conversion in regular sequence */ +#define ADC_SQR1_SQ1_0 (0x01UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000040 */ +#define ADC_SQR1_SQ1_1 (0x02UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000080 */ +#define ADC_SQR1_SQ1_2 (0x04UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000100 */ +#define ADC_SQR1_SQ1_3 (0x08UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000200 */ +#define ADC_SQR1_SQ1_4 (0x10UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000400 */ + +#define ADC_SQR1_SQ2_Pos (12U) +#define ADC_SQR1_SQ2_Msk (0x1FUL << ADC_SQR1_SQ2_Pos) /*!< 0x0001F000 */ +#define ADC_SQR1_SQ2 ADC_SQR1_SQ2_Msk /*!< ADC 2nd conversion in regular sequence */ +#define ADC_SQR1_SQ2_0 (0x01UL << ADC_SQR1_SQ2_Pos) /*!< 0x00001000 */ +#define ADC_SQR1_SQ2_1 (0x02UL << ADC_SQR1_SQ2_Pos) /*!< 0x00002000 */ +#define ADC_SQR1_SQ2_2 (0x04UL << ADC_SQR1_SQ2_Pos) /*!< 0x00004000 */ +#define ADC_SQR1_SQ2_3 (0x08UL << ADC_SQR1_SQ2_Pos) /*!< 0x00008000 */ +#define ADC_SQR1_SQ2_4 (0x10UL << ADC_SQR1_SQ2_Pos) /*!< 0x00010000 */ + +#define ADC_SQR1_SQ3_Pos (18U) +#define ADC_SQR1_SQ3_Msk (0x1FUL << ADC_SQR1_SQ3_Pos) /*!< 0x007C0000 */ +#define ADC_SQR1_SQ3 ADC_SQR1_SQ3_Msk /*!< ADC 3rd conversion in regular sequence */ +#define ADC_SQR1_SQ3_0 (0x01UL << ADC_SQR1_SQ3_Pos) /*!< 0x00040000 */ +#define ADC_SQR1_SQ3_1 (0x02UL << ADC_SQR1_SQ3_Pos) /*!< 0x00080000 */ +#define ADC_SQR1_SQ3_2 (0x04UL << ADC_SQR1_SQ3_Pos) /*!< 0x00100000 */ +#define ADC_SQR1_SQ3_3 (0x08UL << ADC_SQR1_SQ3_Pos) /*!< 0x00200000 */ +#define ADC_SQR1_SQ3_4 (0x10UL << ADC_SQR1_SQ3_Pos) /*!< 0x00400000 */ + +#define ADC_SQR1_SQ4_Pos (24U) +#define ADC_SQR1_SQ4_Msk (0x1FUL << ADC_SQR1_SQ4_Pos) /*!< 0x1F000000 */ +#define ADC_SQR1_SQ4 ADC_SQR1_SQ4_Msk /*!< ADC 4th conversion in regular sequence */ +#define ADC_SQR1_SQ4_0 (0x01UL << ADC_SQR1_SQ4_Pos) /*!< 0x01000000 */ +#define ADC_SQR1_SQ4_1 (0x02UL << ADC_SQR1_SQ4_Pos) /*!< 0x02000000 */ +#define ADC_SQR1_SQ4_2 (0x04UL << ADC_SQR1_SQ4_Pos) /*!< 0x04000000 */ +#define ADC_SQR1_SQ4_3 (0x08UL << ADC_SQR1_SQ4_Pos) /*!< 0x08000000 */ +#define ADC_SQR1_SQ4_4 (0x10UL << ADC_SQR1_SQ4_Pos) /*!< 0x10000000 */ + +/******************** Bit definition for ADC_SQR2 register ********************/ +#define ADC_SQR2_SQ5_Pos (0U) +#define ADC_SQR2_SQ5_Msk (0x1FUL << ADC_SQR2_SQ5_Pos) /*!< 0x0000001F */ +#define ADC_SQR2_SQ5 ADC_SQR2_SQ5_Msk /*!< ADC 5th conversion in regular sequence */ +#define ADC_SQR2_SQ5_0 (0x01UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000001 */ +#define ADC_SQR2_SQ5_1 (0x02UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000002 */ +#define ADC_SQR2_SQ5_2 (0x04UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000004 */ +#define ADC_SQR2_SQ5_3 (0x08UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000008 */ +#define ADC_SQR2_SQ5_4 (0x10UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000010 */ + +#define ADC_SQR2_SQ6_Pos (6U) +#define ADC_SQR2_SQ6_Msk (0x1FUL << ADC_SQR2_SQ6_Pos) /*!< 0x000007C0 */ +#define ADC_SQR2_SQ6 ADC_SQR2_SQ6_Msk /*!< ADC 6th conversion in regular sequence */ +#define ADC_SQR2_SQ6_0 (0x01UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000040 */ +#define ADC_SQR2_SQ6_1 (0x02UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000080 */ +#define ADC_SQR2_SQ6_2 (0x04UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000100 */ +#define ADC_SQR2_SQ6_3 (0x08UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000200 */ +#define ADC_SQR2_SQ6_4 (0x10UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000400 */ + +#define ADC_SQR2_SQ7_Pos (12U) +#define ADC_SQR2_SQ7_Msk (0x1FUL << ADC_SQR2_SQ7_Pos) /*!< 0x0001F000 */ +#define ADC_SQR2_SQ7 ADC_SQR2_SQ7_Msk /*!< ADC 7th conversion in regular sequence */ +#define ADC_SQR2_SQ7_0 (0x01UL << ADC_SQR2_SQ7_Pos) /*!< 0x00001000 */ +#define ADC_SQR2_SQ7_1 (0x02UL << ADC_SQR2_SQ7_Pos) /*!< 0x00002000 */ +#define ADC_SQR2_SQ7_2 (0x04UL << ADC_SQR2_SQ7_Pos) /*!< 0x00004000 */ +#define ADC_SQR2_SQ7_3 (0x08UL << ADC_SQR2_SQ7_Pos) /*!< 0x00008000 */ +#define ADC_SQR2_SQ7_4 (0x10UL << ADC_SQR2_SQ7_Pos) /*!< 0x00010000 */ + +#define ADC_SQR2_SQ8_Pos (18U) +#define ADC_SQR2_SQ8_Msk (0x1FUL << ADC_SQR2_SQ8_Pos) /*!< 0x007C0000 */ +#define ADC_SQR2_SQ8 ADC_SQR2_SQ8_Msk /*!< ADC 8th conversion in regular sequence */ +#define ADC_SQR2_SQ8_0 (0x01UL << ADC_SQR2_SQ8_Pos) /*!< 0x00040000 */ +#define ADC_SQR2_SQ8_1 (0x02UL << ADC_SQR2_SQ8_Pos) /*!< 0x00080000 */ +#define ADC_SQR2_SQ8_2 (0x04UL << ADC_SQR2_SQ8_Pos) /*!< 0x00100000 */ +#define ADC_SQR2_SQ8_3 (0x08UL << ADC_SQR2_SQ8_Pos) /*!< 0x00200000 */ +#define ADC_SQR2_SQ8_4 (0x10UL << ADC_SQR2_SQ8_Pos) /*!< 0x00400000 */ + +#define ADC_SQR2_SQ9_Pos (24U) +#define ADC_SQR2_SQ9_Msk (0x1FUL << ADC_SQR2_SQ9_Pos) /*!< 0x1F000000 */ +#define ADC_SQR2_SQ9 ADC_SQR2_SQ9_Msk /*!< ADC 9th conversion in regular sequence */ +#define ADC_SQR2_SQ9_0 (0x01UL << ADC_SQR2_SQ9_Pos) /*!< 0x01000000 */ +#define ADC_SQR2_SQ9_1 (0x02UL << ADC_SQR2_SQ9_Pos) /*!< 0x02000000 */ +#define ADC_SQR2_SQ9_2 (0x04UL << ADC_SQR2_SQ9_Pos) /*!< 0x04000000 */ +#define ADC_SQR2_SQ9_3 (0x08UL << ADC_SQR2_SQ9_Pos) /*!< 0x08000000 */ +#define ADC_SQR2_SQ9_4 (0x10UL << ADC_SQR2_SQ9_Pos) /*!< 0x10000000 */ + +/******************** Bit definition for ADC_SQR3 register ********************/ +#define ADC_SQR3_SQ10_Pos (0U) +#define ADC_SQR3_SQ10_Msk (0x1FUL << ADC_SQR3_SQ10_Pos) /*!< 0x0000001F */ +#define ADC_SQR3_SQ10 ADC_SQR3_SQ10_Msk /*!< ADC 10th conversion in regular sequence */ +#define ADC_SQR3_SQ10_0 (0x01UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000001 */ +#define ADC_SQR3_SQ10_1 (0x02UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000002 */ +#define ADC_SQR3_SQ10_2 (0x04UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000004 */ +#define ADC_SQR3_SQ10_3 (0x08UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000008 */ +#define ADC_SQR3_SQ10_4 (0x10UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000010 */ + +#define ADC_SQR3_SQ11_Pos (6U) +#define ADC_SQR3_SQ11_Msk (0x1FUL << ADC_SQR3_SQ11_Pos) /*!< 0x000007C0 */ +#define ADC_SQR3_SQ11 ADC_SQR3_SQ11_Msk /*!< ADC 11th conversion in regular sequence */ +#define ADC_SQR3_SQ11_0 (0x01UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000040 */ +#define ADC_SQR3_SQ11_1 (0x02UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000080 */ +#define ADC_SQR3_SQ11_2 (0x04UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000100 */ +#define ADC_SQR3_SQ11_3 (0x08UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000200 */ +#define ADC_SQR3_SQ11_4 (0x10UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000400 */ + +#define ADC_SQR3_SQ12_Pos (12U) +#define ADC_SQR3_SQ12_Msk (0x1FUL << ADC_SQR3_SQ12_Pos) /*!< 0x0001F000 */ +#define ADC_SQR3_SQ12 ADC_SQR3_SQ12_Msk /*!< ADC 12th conversion in regular sequence */ +#define ADC_SQR3_SQ12_0 (0x01UL << ADC_SQR3_SQ12_Pos) /*!< 0x00001000 */ +#define ADC_SQR3_SQ12_1 (0x02UL << ADC_SQR3_SQ12_Pos) /*!< 0x00002000 */ +#define ADC_SQR3_SQ12_2 (0x04UL << ADC_SQR3_SQ12_Pos) /*!< 0x00004000 */ +#define ADC_SQR3_SQ12_3 (0x08UL << ADC_SQR3_SQ12_Pos) /*!< 0x00008000 */ +#define ADC_SQR3_SQ12_4 (0x10UL << ADC_SQR3_SQ12_Pos) /*!< 0x00010000 */ + +#define ADC_SQR3_SQ13_Pos (18U) +#define ADC_SQR3_SQ13_Msk (0x1FUL << ADC_SQR3_SQ13_Pos) /*!< 0x007C0000 */ +#define ADC_SQR3_SQ13 ADC_SQR3_SQ13_Msk /*!< ADC 13th conversion in regular sequence */ +#define ADC_SQR3_SQ13_0 (0x01UL << ADC_SQR3_SQ13_Pos) /*!< 0x00040000 */ +#define ADC_SQR3_SQ13_1 (0x02UL << ADC_SQR3_SQ13_Pos) /*!< 0x00080000 */ +#define ADC_SQR3_SQ13_2 (0x04UL << ADC_SQR3_SQ13_Pos) /*!< 0x00100000 */ +#define ADC_SQR3_SQ13_3 (0x08UL << ADC_SQR3_SQ13_Pos) /*!< 0x00200000 */ +#define ADC_SQR3_SQ13_4 (0x10UL << ADC_SQR3_SQ13_Pos) /*!< 0x00400000 */ + +#define ADC_SQR3_SQ14_Pos (24U) +#define ADC_SQR3_SQ14_Msk (0x1FUL << ADC_SQR3_SQ14_Pos) /*!< 0x1F000000 */ +#define ADC_SQR3_SQ14 ADC_SQR3_SQ14_Msk /*!< ADC 14th conversion in regular sequence */ +#define ADC_SQR3_SQ14_0 (0x01UL << ADC_SQR3_SQ14_Pos) /*!< 0x01000000 */ +#define ADC_SQR3_SQ14_1 (0x02UL << ADC_SQR3_SQ14_Pos) /*!< 0x02000000 */ +#define ADC_SQR3_SQ14_2 (0x04UL << ADC_SQR3_SQ14_Pos) /*!< 0x04000000 */ +#define ADC_SQR3_SQ14_3 (0x08UL << ADC_SQR3_SQ14_Pos) /*!< 0x08000000 */ +#define ADC_SQR3_SQ14_4 (0x10UL << ADC_SQR3_SQ14_Pos) /*!< 0x10000000 */ + +/******************** Bit definition for ADC_SQR4 register ********************/ +#define ADC_SQR4_SQ15_Pos (0U) +#define ADC_SQR4_SQ15_Msk (0x1FUL << ADC_SQR4_SQ15_Pos) /*!< 0x0000001F */ +#define ADC_SQR4_SQ15 ADC_SQR4_SQ15_Msk /*!< ADC 15th conversion in regular sequence */ +#define ADC_SQR4_SQ15_0 (0x01UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000001 */ +#define ADC_SQR4_SQ15_1 (0x02UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000002 */ +#define ADC_SQR4_SQ15_2 (0x04UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000004 */ +#define ADC_SQR4_SQ15_3 (0x08UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000008 */ +#define ADC_SQR4_SQ15_4 (0x10UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000010 */ + +#define ADC_SQR4_SQ16_Pos (6U) +#define ADC_SQR4_SQ16_Msk (0x1FUL << ADC_SQR4_SQ16_Pos) /*!< 0x000007C0 */ +#define ADC_SQR4_SQ16 ADC_SQR4_SQ16_Msk /*!< ADC 16th conversion in regular sequence */ +#define ADC_SQR4_SQ16_0 (0x01UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000040 */ +#define ADC_SQR4_SQ16_1 (0x02UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000080 */ +#define ADC_SQR4_SQ16_2 (0x04UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000100 */ +#define ADC_SQR4_SQ16_3 (0x08UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000200 */ +#define ADC_SQR4_SQ16_4 (0x10UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000400 */ +/******************** Bit definition for ADC_DR register ********************/ +#define ADC_DR_RDATA_Pos (0U) +#define ADC_DR_RDATA_Msk (0xFFFFFFFFUL << ADC_DR_RDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_DR_RDATA ADC_DR_RDATA_Msk /*!< ADC regular Data converted */ + +/******************** Bit definition for ADC_JSQR register ********************/ +#define ADC_JSQR_JL_Pos (0U) +#define ADC_JSQR_JL_Msk (0x3UL << ADC_JSQR_JL_Pos) /*!< 0x00000003 */ +#define ADC_JSQR_JL ADC_JSQR_JL_Msk /*!< ADC injected channel sequence length */ +#define ADC_JSQR_JL_0 (0x1UL << ADC_JSQR_JL_Pos) /*!< 0x00000001 */ +#define ADC_JSQR_JL_1 (0x2UL << ADC_JSQR_JL_Pos) /*!< 0x00000002 */ + +#define ADC_JSQR_JEXTSEL_Pos (2U) +#define ADC_JSQR_JEXTSEL_Msk (0x1FUL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x0000007C */ +#define ADC_JSQR_JEXTSEL ADC_JSQR_JEXTSEL_Msk /*!< ADC external trigger selection for injected group */ +#define ADC_JSQR_JEXTSEL_0 (0x01UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000004 */ +#define ADC_JSQR_JEXTSEL_1 (0x02UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000008 */ +#define ADC_JSQR_JEXTSEL_2 (0x04UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000010 */ +#define ADC_JSQR_JEXTSEL_3 (0x08UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000020 */ +#define ADC_JSQR_JEXTSEL_4 (0x10UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000040 */ + +#define ADC_JSQR_JEXTEN_Pos (7U) +#define ADC_JSQR_JEXTEN_Msk (0x3UL << ADC_JSQR_JEXTEN_Pos) /*!< 0x00000180 */ +#define ADC_JSQR_JEXTEN ADC_JSQR_JEXTEN_Msk /*!< ADC external trigger enable and polarity selection for injected channels */ +#define ADC_JSQR_JEXTEN_0 (0x1UL << ADC_JSQR_JEXTEN_Pos) /*!< 0x00000080 */ +#define ADC_JSQR_JEXTEN_1 (0x2UL << ADC_JSQR_JEXTEN_Pos) /*!< 0x00000100 */ + +#define ADC_JSQR_JSQ1_Pos (9U) +#define ADC_JSQR_JSQ1_Msk (0x1FUL << ADC_JSQR_JSQ1_Pos) /*!< 0x00003E00 */ +#define ADC_JSQR_JSQ1 ADC_JSQR_JSQ1_Msk /*!< ADC 1st conversion in injected sequence */ +#define ADC_JSQR_JSQ1_0 (0x01UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00000200 */ +#define ADC_JSQR_JSQ1_1 (0x02UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00000400 */ +#define ADC_JSQR_JSQ1_2 (0x04UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00000800 */ +#define ADC_JSQR_JSQ1_3 (0x08UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00001000 */ +#define ADC_JSQR_JSQ1_4 (0x10UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00002000 */ + +#define ADC_JSQR_JSQ2_Pos (15U) +#define ADC_JSQR_JSQ2_Msk (0x1FUL << ADC_JSQR_JSQ2_Pos) /*!< 0x000F8000 */ +#define ADC_JSQR_JSQ2 ADC_JSQR_JSQ2_Msk /*!< ADC 2nd conversion in injected sequence */ +#define ADC_JSQR_JSQ2_0 (0x01UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00008000 */ +#define ADC_JSQR_JSQ2_1 (0x02UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00010000 */ +#define ADC_JSQR_JSQ2_2 (0x04UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00020000 */ +#define ADC_JSQR_JSQ2_3 (0x08UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00040000 */ +#define ADC_JSQR_JSQ2_4 (0x10UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00080000 */ + +#define ADC_JSQR_JSQ3_Pos (21U) +#define ADC_JSQR_JSQ3_Msk (0x1FUL << ADC_JSQR_JSQ3_Pos) /*!< 0x03E00000 */ +#define ADC_JSQR_JSQ3 ADC_JSQR_JSQ3_Msk /*!< ADC 3rd conversion in injected sequence */ +#define ADC_JSQR_JSQ3_0 (0x01UL << ADC_JSQR_JSQ3_Pos) /*!< 0x00200000 */ +#define ADC_JSQR_JSQ3_1 (0x02UL << ADC_JSQR_JSQ3_Pos) /*!< 0x00400000 */ +#define ADC_JSQR_JSQ3_2 (0x04UL << ADC_JSQR_JSQ3_Pos) /*!< 0x00800000 */ +#define ADC_JSQR_JSQ3_3 (0x08UL << ADC_JSQR_JSQ3_Pos) /*!< 0x01000000 */ +#define ADC_JSQR_JSQ3_4 (0x10UL << ADC_JSQR_JSQ3_Pos) /*!< 0x02000000 */ + +#define ADC_JSQR_JSQ4_Pos (27U) +#define ADC_JSQR_JSQ4_Msk (0x1FUL << ADC_JSQR_JSQ4_Pos) /*!< 0xF8000000 */ +#define ADC_JSQR_JSQ4 ADC_JSQR_JSQ4_Msk /*!< ADC 4th conversion in injected sequence */ +#define ADC_JSQR_JSQ4_0 (0x01UL << ADC_JSQR_JSQ4_Pos) /*!< 0x08000000 */ +#define ADC_JSQR_JSQ4_1 (0x02UL << ADC_JSQR_JSQ4_Pos) /*!< 0x10000000 */ +#define ADC_JSQR_JSQ4_2 (0x04UL << ADC_JSQR_JSQ4_Pos) /*!< 0x20000000 */ +#define ADC_JSQR_JSQ4_3 (0x08UL << ADC_JSQR_JSQ4_Pos) /*!< 0x40000000 */ +#define ADC_JSQR_JSQ4_4 (0x10UL << ADC_JSQR_JSQ4_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_OFR1 register ********************/ +#define ADC_OFR1_OFFSET1_Pos (0U) +#define ADC_OFR1_OFFSET1_Msk (0x3FFFFFFUL << ADC_OFR1_OFFSET1_Pos) /*!< 0x03FFFFFF */ +#define ADC_OFR1_OFFSET1 ADC_OFR1_OFFSET1_Msk /*!< ADC data offset 1 for channel programmed into bits OFFSET1_CH[4:0] */ +#define ADC_OFR1_OFFSET1_0 (0x0000001UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000001 */ +#define ADC_OFR1_OFFSET1_1 (0x0000002UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000002 */ +#define ADC_OFR1_OFFSET1_2 (0x0000004UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000004 */ +#define ADC_OFR1_OFFSET1_3 (0x0000008UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000008 */ +#define ADC_OFR1_OFFSET1_4 (0x0000010UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000010 */ +#define ADC_OFR1_OFFSET1_5 (0x0000020UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000020 */ +#define ADC_OFR1_OFFSET1_6 (0x0000040UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000040 */ +#define ADC_OFR1_OFFSET1_7 (0x0000080UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000080 */ +#define ADC_OFR1_OFFSET1_8 (0x0000100UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000100 */ +#define ADC_OFR1_OFFSET1_9 (0x0000200UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000200 */ +#define ADC_OFR1_OFFSET1_10 (0x0000400UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000400 */ +#define ADC_OFR1_OFFSET1_11 (0x0000800UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000800 */ +#define ADC_OFR1_OFFSET1_12 (0x0001000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00001000 */ +#define ADC_OFR1_OFFSET1_13 (0x0002000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00002000 */ +#define ADC_OFR1_OFFSET1_14 (0x0004000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00004000 */ +#define ADC_OFR1_OFFSET1_15 (0x0008000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00008000 */ +#define ADC_OFR1_OFFSET1_16 (0x0010000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00010000 */ +#define ADC_OFR1_OFFSET1_17 (0x0020000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00020000 */ +#define ADC_OFR1_OFFSET1_18 (0x0040000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00040000 */ +#define ADC_OFR1_OFFSET1_19 (0x0080000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00080000 */ +#define ADC_OFR1_OFFSET1_20 (0x0100000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00100000 */ +#define ADC_OFR1_OFFSET1_21 (0x0200000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00200000 */ +#define ADC_OFR1_OFFSET1_22 (0x0400000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00400000 */ +#define ADC_OFR1_OFFSET1_23 (0x0800000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00800000 */ +#define ADC_OFR1_OFFSET1_24 (0x1000000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x01000000 */ +#define ADC_OFR1_OFFSET1_25 (0x2000000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x02000000 */ + +#define ADC_OFR1_OFFSET1_CH_Pos (26U) +#define ADC_OFR1_OFFSET1_CH_Msk (0x1FUL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR1_OFFSET1_CH ADC_OFR1_OFFSET1_CH_Msk /*!< ADC Channel selection for the data offset 1 */ +#define ADC_OFR1_OFFSET1_CH_0 (0x01UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR1_OFFSET1_CH_1 (0x02UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR1_OFFSET1_CH_2 (0x04UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR1_OFFSET1_CH_3 (0x08UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR1_OFFSET1_CH_4 (0x10UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR1_SSATE_Pos (31U) +#define ADC_OFR1_SSATE_Msk (0x1UL << ADC_OFR1_SSATE_Pos) /*!< 0x80000000 */ +#define ADC_OFR1_SSATE ADC_OFR1_SSATE_Msk /*!< ADC Signed saturation Enable */ + +#define ADC3_OFR1_OFFSET1_Pos (0U) +#define ADC3_OFR1_OFFSET1_Msk (0xFFFUL << ADC3_OFR1_OFFSET1_Pos) /*!< 0x00000FFF */ +#define ADC3_OFR1_OFFSET1 ADC3_OFR1_OFFSET1_Msk /*!< ADC data offset 1 for channel programmed into bits OFFSET1_CH[4:0] */ + +#define ADC3_OFR1_OFFSETPOS_Pos (24U) +#define ADC3_OFR1_OFFSETPOS_Msk (0x1UL << ADC3_OFR1_OFFSETPOS_Pos) /*!< 0x01000000 */ +#define ADC3_OFR1_OFFSETPOS ADC3_OFR1_OFFSETPOS_Msk /*!< ADC offset number 1 positive */ +#define ADC3_OFR1_SATEN_Pos (25U) +#define ADC3_OFR1_SATEN_Msk (0x1UL << ADC3_OFR1_SATEN_Pos) /*!< 0x02000000 */ +#define ADC3_OFR1_SATEN ADC3_OFR1_SATEN_Msk /*!< ADC offset number 1 saturation enable */ + +#define ADC3_OFR1_OFFSET1_EN_Pos (31U) +#define ADC3_OFR1_OFFSET1_EN_Msk (0x1UL << ADC3_OFR1_OFFSET1_EN_Pos) /*!< 0x80000000 */ +#define ADC3_OFR1_OFFSET1_EN ADC3_OFR1_OFFSET1_EN_Msk /*!< ADC offset number 1 enable */ + +/******************** Bit definition for ADC_OFR2 register ********************/ +#define ADC_OFR2_OFFSET2_Pos (0U) +#define ADC_OFR2_OFFSET2_Msk (0x3FFFFFFUL << ADC_OFR2_OFFSET2_Pos) /*!< 0x03FFFFFF */ +#define ADC_OFR2_OFFSET2 ADC_OFR2_OFFSET2_Msk /*!< ADC data offset 2 for channel programmed into bits OFFSET2_CH[4:0] */ +#define ADC_OFR2_OFFSET2_0 (0x0000001UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000001 */ +#define ADC_OFR2_OFFSET2_1 (0x0000002UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000002 */ +#define ADC_OFR2_OFFSET2_2 (0x0000004UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000004 */ +#define ADC_OFR2_OFFSET2_3 (0x0000008UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000008 */ +#define ADC_OFR2_OFFSET2_4 (0x0000010UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000010 */ +#define ADC_OFR2_OFFSET2_5 (0x0000020UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000020 */ +#define ADC_OFR2_OFFSET2_6 (0x0000040UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000040 */ +#define ADC_OFR2_OFFSET2_7 (0x0000080UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000080 */ +#define ADC_OFR2_OFFSET2_8 (0x0000100UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000100 */ +#define ADC_OFR2_OFFSET2_9 (0x0000200UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000200 */ +#define ADC_OFR2_OFFSET2_10 (0x0000400UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000400 */ +#define ADC_OFR2_OFFSET2_11 (0x0000800UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000800 */ +#define ADC_OFR2_OFFSET2_12 (0x0001000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00001000 */ +#define ADC_OFR2_OFFSET2_13 (0x0002000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00002000 */ +#define ADC_OFR2_OFFSET2_14 (0x0004000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00004000 */ +#define ADC_OFR2_OFFSET2_15 (0x0008000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00008000 */ +#define ADC_OFR2_OFFSET2_16 (0x0010000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00010000 */ +#define ADC_OFR2_OFFSET2_17 (0x0020000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00020000 */ +#define ADC_OFR2_OFFSET2_18 (0x0040000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00040000 */ +#define ADC_OFR2_OFFSET2_19 (0x0080000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00080000 */ +#define ADC_OFR2_OFFSET2_20 (0x0100000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00100000 */ +#define ADC_OFR2_OFFSET2_21 (0x0200000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00200000 */ +#define ADC_OFR2_OFFSET2_22 (0x0400000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00400000 */ +#define ADC_OFR2_OFFSET2_23 (0x0800000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00800000 */ +#define ADC_OFR2_OFFSET2_24 (0x1000000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x01000000 */ +#define ADC_OFR2_OFFSET2_25 (0x2000000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x02000000 */ + +#define ADC_OFR2_OFFSET2_CH_Pos (26U) +#define ADC_OFR2_OFFSET2_CH_Msk (0x1FUL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR2_OFFSET2_CH ADC_OFR2_OFFSET2_CH_Msk /*!< ADC Channel selection for the data offset 2 */ +#define ADC_OFR2_OFFSET2_CH_0 (0x01UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR2_OFFSET2_CH_1 (0x02UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR2_OFFSET2_CH_2 (0x04UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR2_OFFSET2_CH_3 (0x08UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR2_OFFSET2_CH_4 (0x10UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR2_SSATE_Pos (31U) +#define ADC_OFR2_SSATE_Msk (0x1UL << ADC_OFR2_SSATE_Pos) /*!< 0x80000000 */ +#define ADC_OFR2_SSATE ADC_OFR2_SSATE_Msk /*!< ADC Signed saturation Enable */ + +#define ADC3_OFR2_OFFSET2_Pos (0U) +#define ADC3_OFR2_OFFSET2_Msk (0xFFFUL << ADC3_OFR2_OFFSET2_Pos) /*!< 0x00000FFF */ +#define ADC3_OFR2_OFFSET2 ADC3_OFR2_OFFSET2_Msk /*!< ADC data offset 2 for channel programmed into bits OFFSET1_CH[4:0] */ + +#define ADC3_OFR2_OFFSETPOS_Pos (24U) +#define ADC3_OFR2_OFFSETPOS_Msk (0x1UL << ADC3_OFR2_OFFSETPOS_Pos) /*!< 0x01000000 */ +#define ADC3_OFR2_OFFSETPOS ADC3_OFR2_OFFSETPOS_Msk /*!< ADC offset number 2 positive */ +#define ADC3_OFR2_SATEN_Pos (25U) +#define ADC3_OFR2_SATEN_Msk (0x1UL << ADC3_OFR2_SATEN_Pos) /*!< 0x02000000 */ +#define ADC3_OFR2_SATEN ADC3_OFR2_SATEN_Msk /*!< ADC offset number 2 saturation enable */ + +#define ADC3_OFR2_OFFSET2_EN_Pos (31U) +#define ADC3_OFR2_OFFSET2_EN_Msk (0x1UL << ADC3_OFR2_OFFSET2_EN_Pos) /*!< 0x80000000 */ +#define ADC3_OFR2_OFFSET2_EN ADC3_OFR2_OFFSET2_EN_Msk /*!< ADC offset number 2 enable */ + +/******************** Bit definition for ADC_OFR3 register ********************/ +#define ADC_OFR3_OFFSET3_Pos (0U) +#define ADC_OFR3_OFFSET3_Msk (0x3FFFFFFUL << ADC_OFR3_OFFSET3_Pos) /*!< 0x03FFFFFF */ +#define ADC_OFR3_OFFSET3 ADC_OFR3_OFFSET3_Msk /*!< ADC data offset 3 for channel programmed into bits OFFSET3_CH[4:0] */ +#define ADC_OFR3_OFFSET3_0 (0x0000001UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000001 */ +#define ADC_OFR3_OFFSET3_1 (0x0000002UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000002 */ +#define ADC_OFR3_OFFSET3_2 (0x0000004UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000004 */ +#define ADC_OFR3_OFFSET3_3 (0x0000008UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000008 */ +#define ADC_OFR3_OFFSET3_4 (0x0000010UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000010 */ +#define ADC_OFR3_OFFSET3_5 (0x0000020UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000020 */ +#define ADC_OFR3_OFFSET3_6 (0x0000040UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000040 */ +#define ADC_OFR3_OFFSET3_7 (0x0000080UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000080 */ +#define ADC_OFR3_OFFSET3_8 (0x0000100UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000100 */ +#define ADC_OFR3_OFFSET3_9 (0x0000200UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000200 */ +#define ADC_OFR3_OFFSET3_10 (0x0000400UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000400 */ +#define ADC_OFR3_OFFSET3_11 (0x0000800UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000800 */ +#define ADC_OFR3_OFFSET3_12 (0x0001000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00001000 */ +#define ADC_OFR3_OFFSET3_13 (0x0002000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00002000 */ +#define ADC_OFR3_OFFSET3_14 (0x0004000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00004000 */ +#define ADC_OFR3_OFFSET3_15 (0x0008000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00008000 */ +#define ADC_OFR3_OFFSET3_16 (0x0010000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00010000 */ +#define ADC_OFR3_OFFSET3_17 (0x0020000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00020000 */ +#define ADC_OFR3_OFFSET3_18 (0x0040000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00040000 */ +#define ADC_OFR3_OFFSET3_19 (0x0080000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00080000 */ +#define ADC_OFR3_OFFSET3_20 (0x0100000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00100000 */ +#define ADC_OFR3_OFFSET3_21 (0x0200000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00200000 */ +#define ADC_OFR3_OFFSET3_22 (0x0400000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00400000 */ +#define ADC_OFR3_OFFSET3_23 (0x0800000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00800000 */ +#define ADC_OFR3_OFFSET3_24 (0x1000000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x01000000 */ +#define ADC_OFR3_OFFSET3_25 (0x2000000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x02000000 */ + +#define ADC_OFR3_OFFSET3_CH_Pos (26U) +#define ADC_OFR3_OFFSET3_CH_Msk (0x1FUL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR3_OFFSET3_CH ADC_OFR3_OFFSET3_CH_Msk /*!< ADC Channel selection for the data offset 3 */ +#define ADC_OFR3_OFFSET3_CH_0 (0x01UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR3_OFFSET3_CH_1 (0x02UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR3_OFFSET3_CH_2 (0x04UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR3_OFFSET3_CH_3 (0x08UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR3_OFFSET3_CH_4 (0x10UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR3_SSATE_Pos (31U) +#define ADC_OFR3_SSATE_Msk (0x1UL << ADC_OFR3_SSATE_Pos) /*!< 0x80000000 */ +#define ADC_OFR3_SSATE ADC_OFR3_SSATE_Msk /*!< ADC Signed saturation Enable */ + +#define ADC3_OFR3_OFFSET3_Pos (0U) +#define ADC3_OFR3_OFFSET3_Msk (0xFFFUL << ADC3_OFR3_OFFSET3_Pos) /*!< 0x00000FFF */ +#define ADC3_OFR3_OFFSET3 ADC3_OFR3_OFFSET3_Msk /*!< ADC data offset 3 for channel programmed into bits OFFSET1_CH[4:0] */ + +#define ADC3_OFR3_OFFSETPOS_Pos (24U) +#define ADC3_OFR3_OFFSETPOS_Msk (0x1UL << ADC3_OFR3_OFFSETPOS_Pos) /*!< 0x01000000 */ +#define ADC3_OFR3_OFFSETPOS ADC3_OFR3_OFFSETPOS_Msk /*!< ADC offset number 3 positive */ +#define ADC3_OFR3_SATEN_Pos (25U) +#define ADC3_OFR3_SATEN_Msk (0x1UL << ADC3_OFR3_SATEN_Pos) /*!< 0x02000000 */ +#define ADC3_OFR3_SATEN ADC3_OFR3_SATEN_Msk /*!< ADC offset number 3 saturation enable */ + +#define ADC3_OFR3_OFFSET3_EN_Pos (31U) +#define ADC3_OFR3_OFFSET3_EN_Msk (0x1UL << ADC3_OFR3_OFFSET3_EN_Pos) /*!< 0x80000000 */ +#define ADC3_OFR3_OFFSET3_EN ADC3_OFR3_OFFSET3_EN_Msk /*!< ADC offset number 3 enable */ + +/******************** Bit definition for ADC_OFR4 register ********************/ +#define ADC_OFR4_OFFSET4_Pos (0U) +#define ADC_OFR4_OFFSET4_Msk (0x3FFFFFFUL << ADC_OFR4_OFFSET4_Pos) /*!< 0x03FFFFFF */ +#define ADC_OFR4_OFFSET4 ADC_OFR4_OFFSET4_Msk /*!< ADC data offset 4 for channel programmed into bits OFFSET4_CH[4:0] */ +#define ADC_OFR4_OFFSET4_0 (0x0000001UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000001 */ +#define ADC_OFR4_OFFSET4_1 (0x0000002UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000002 */ +#define ADC_OFR4_OFFSET4_2 (0x0000004UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000004 */ +#define ADC_OFR4_OFFSET4_3 (0x0000008UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000008 */ +#define ADC_OFR4_OFFSET4_4 (0x0000010UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000010 */ +#define ADC_OFR4_OFFSET4_5 (0x0000020UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000020 */ +#define ADC_OFR4_OFFSET4_6 (0x0000040UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000040 */ +#define ADC_OFR4_OFFSET4_7 (0x0000080UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000080 */ +#define ADC_OFR4_OFFSET4_8 (0x0000100UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000100 */ +#define ADC_OFR4_OFFSET4_9 (0x0000200UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000200 */ +#define ADC_OFR4_OFFSET4_10 (0x0000400UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000400 */ +#define ADC_OFR4_OFFSET4_11 (0x0000800UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000800 */ +#define ADC_OFR4_OFFSET4_12 (0x0001000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00001000 */ +#define ADC_OFR4_OFFSET4_13 (0x0002000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00002000 */ +#define ADC_OFR4_OFFSET4_14 (0x0004000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00004000 */ +#define ADC_OFR4_OFFSET4_15 (0x0008000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00008000 */ +#define ADC_OFR4_OFFSET4_16 (0x0010000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00010000 */ +#define ADC_OFR4_OFFSET4_17 (0x0020000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00020000 */ +#define ADC_OFR4_OFFSET4_18 (0x0040000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00040000 */ +#define ADC_OFR4_OFFSET4_19 (0x0080000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00080000 */ +#define ADC_OFR4_OFFSET4_20 (0x0100000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00100000 */ +#define ADC_OFR4_OFFSET4_21 (0x0200000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00200000 */ +#define ADC_OFR4_OFFSET4_22 (0x0400000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00400000 */ +#define ADC_OFR4_OFFSET4_23 (0x0800000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00800000 */ +#define ADC_OFR4_OFFSET4_24 (0x1000000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x01000000 */ +#define ADC_OFR4_OFFSET4_25 (0x2000000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x02000000 */ + +#define ADC_OFR4_OFFSET4_CH_Pos (26U) +#define ADC_OFR4_OFFSET4_CH_Msk (0x1FUL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR4_OFFSET4_CH ADC_OFR4_OFFSET4_CH_Msk /*!< ADC Channel selection for the data offset 4 */ +#define ADC_OFR4_OFFSET4_CH_0 (0x01UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR4_OFFSET4_CH_1 (0x02UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR4_OFFSET4_CH_2 (0x04UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR4_OFFSET4_CH_3 (0x08UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR4_OFFSET4_CH_4 (0x10UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR4_SSATE_Pos (31U) +#define ADC_OFR4_SSATE_Msk (0x1UL << ADC_OFR4_SSATE_Pos) /*!< 0x80000000 */ +#define ADC_OFR4_SSATE ADC_OFR4_SSATE_Msk /*!< ADC Signed saturation Enable */ + +#define ADC3_OFR4_OFFSET4_Pos (0U) +#define ADC3_OFR4_OFFSET4_Msk (0xFFFUL << ADC3_OFR4_OFFSET4_Pos) /*!< 0x00000FFF */ +#define ADC3_OFR4_OFFSET4 ADC3_OFR4_OFFSET4_Msk /*!< ADC data offset 4 for channel programmed into bits OFFSET1_CH[4:0] */ + +#define ADC3_OFR4_OFFSETPOS_Pos (24U) +#define ADC3_OFR4_OFFSETPOS_Msk (0x1UL << ADC3_OFR4_OFFSETPOS_Pos) /*!< 0x01000000 */ +#define ADC3_OFR4_OFFSETPOS ADC3_OFR4_OFFSETPOS_Msk /*!< ADC offset number 4 positive */ +#define ADC3_OFR4_SATEN_Pos (25U) +#define ADC3_OFR4_SATEN_Msk (0x1UL << ADC3_OFR4_SATEN_Pos) /*!< 0x02000000 */ +#define ADC3_OFR4_SATEN ADC3_OFR4_SATEN_Msk /*!< ADC offset number 4 saturation enable */ + +#define ADC3_OFR4_OFFSET4_EN_Pos (31U) +#define ADC3_OFR4_OFFSET4_EN_Msk (0x1UL << ADC3_OFR4_OFFSET4_EN_Pos) /*!< 0x80000000 */ +#define ADC3_OFR4_OFFSET4_EN ADC3_OFR4_OFFSET4_EN_Msk /*!< ADC offset number 4 enable */ + +/******************** Bit definition for ADC_JDR1 register ********************/ +#define ADC_JDR1_JDATA_Pos (0U) +#define ADC_JDR1_JDATA_Msk (0xFFFFFFFFUL << ADC_JDR1_JDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_JDR1_JDATA ADC_JDR1_JDATA_Msk /*!< ADC Injected DATA */ +#define ADC_JDR1_JDATA_0 (0x00000001UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR1_JDATA_1 (0x00000002UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR1_JDATA_2 (0x00000004UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR1_JDATA_3 (0x00000008UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR1_JDATA_4 (0x00000010UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR1_JDATA_5 (0x00000020UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR1_JDATA_6 (0x00000040UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR1_JDATA_7 (0x00000080UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR1_JDATA_8 (0x00000100UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR1_JDATA_9 (0x00000200UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR1_JDATA_10 (0x00000400UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR1_JDATA_11 (0x00000800UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR1_JDATA_12 (0x00001000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR1_JDATA_13 (0x00002000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR1_JDATA_14 (0x00004000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR1_JDATA_15 (0x00008000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00008000 */ +#define ADC_JDR1_JDATA_16 (0x00010000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00010000 */ +#define ADC_JDR1_JDATA_17 (0x00020000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00020000 */ +#define ADC_JDR1_JDATA_18 (0x00040000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00040000 */ +#define ADC_JDR1_JDATA_19 (0x00080000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00080000 */ +#define ADC_JDR1_JDATA_20 (0x00100000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00100000 */ +#define ADC_JDR1_JDATA_21 (0x00200000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00200000 */ +#define ADC_JDR1_JDATA_22 (0x00400000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00400000 */ +#define ADC_JDR1_JDATA_23 (0x00800000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00800000 */ +#define ADC_JDR1_JDATA_24 (0x01000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x01000000 */ +#define ADC_JDR1_JDATA_25 (0x02000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x02000000 */ +#define ADC_JDR1_JDATA_26 (0x04000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x04000000 */ +#define ADC_JDR1_JDATA_27 (0x08000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x08000000 */ +#define ADC_JDR1_JDATA_28 (0x10000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x10000000 */ +#define ADC_JDR1_JDATA_29 (0x20000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x20000000 */ +#define ADC_JDR1_JDATA_30 (0x40000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x40000000 */ +#define ADC_JDR1_JDATA_31 (0x80000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_JDR2 register ********************/ +#define ADC_JDR2_JDATA_Pos (0U) +#define ADC_JDR2_JDATA_Msk (0xFFFFFFFFUL << ADC_JDR2_JDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_JDR2_JDATA ADC_JDR2_JDATA_Msk /*!< ADC Injected DATA */ +#define ADC_JDR2_JDATA_0 (0x00000001UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR2_JDATA_1 (0x00000002UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR2_JDATA_2 (0x00000004UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR2_JDATA_3 (0x00000008UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR2_JDATA_4 (0x00000010UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR2_JDATA_5 (0x00000020UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR2_JDATA_6 (0x00000040UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR2_JDATA_7 (0x00000080UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR2_JDATA_8 (0x00000100UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR2_JDATA_9 (0x00000200UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR2_JDATA_10 (0x00000400UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR2_JDATA_11 (0x00000800UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR2_JDATA_12 (0x00001000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR2_JDATA_13 (0x00002000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR2_JDATA_14 (0x00004000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR2_JDATA_15 (0x00008000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00008000 */ +#define ADC_JDR2_JDATA_16 (0x00010000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00010000 */ +#define ADC_JDR2_JDATA_17 (0x00020000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00020000 */ +#define ADC_JDR2_JDATA_18 (0x00040000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00040000 */ +#define ADC_JDR2_JDATA_19 (0x00080000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00080000 */ +#define ADC_JDR2_JDATA_20 (0x00100000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00100000 */ +#define ADC_JDR2_JDATA_21 (0x00200000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00200000 */ +#define ADC_JDR2_JDATA_22 (0x00400000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00400000 */ +#define ADC_JDR2_JDATA_23 (0x00800000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00800000 */ +#define ADC_JDR2_JDATA_24 (0x01000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x01000000 */ +#define ADC_JDR2_JDATA_25 (0x02000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x02000000 */ +#define ADC_JDR2_JDATA_26 (0x04000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x04000000 */ +#define ADC_JDR2_JDATA_27 (0x08000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x08000000 */ +#define ADC_JDR2_JDATA_28 (0x10000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x10000000 */ +#define ADC_JDR2_JDATA_29 (0x20000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x20000000 */ +#define ADC_JDR2_JDATA_30 (0x40000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x40000000 */ +#define ADC_JDR2_JDATA_31 (0x80000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_JDR3 register ********************/ +#define ADC_JDR3_JDATA_Pos (0U) +#define ADC_JDR3_JDATA_Msk (0xFFFFFFFFUL << ADC_JDR3_JDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_JDR3_JDATA ADC_JDR3_JDATA_Msk /*!< ADC Injected DATA */ +#define ADC_JDR3_JDATA_0 (0x00000001UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR3_JDATA_1 (0x00000002UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR3_JDATA_2 (0x00000004UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR3_JDATA_3 (0x00000008UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR3_JDATA_4 (0x00000010UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR3_JDATA_5 (0x00000020UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR3_JDATA_6 (0x00000040UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR3_JDATA_7 (0x00000080UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR3_JDATA_8 (0x00000100UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR3_JDATA_9 (0x00000200UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR3_JDATA_10 (0x00000400UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR3_JDATA_11 (0x00000800UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR3_JDATA_12 (0x00001000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR3_JDATA_13 (0x00002000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR3_JDATA_14 (0x00004000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR3_JDATA_15 (0x00008000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00008000 */ +#define ADC_JDR3_JDATA_16 (0x00010000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00010000 */ +#define ADC_JDR3_JDATA_17 (0x00020000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00020000 */ +#define ADC_JDR3_JDATA_18 (0x00040000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00040000 */ +#define ADC_JDR3_JDATA_19 (0x00080000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00080000 */ +#define ADC_JDR3_JDATA_20 (0x00100000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00100000 */ +#define ADC_JDR3_JDATA_21 (0x00200000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00200000 */ +#define ADC_JDR3_JDATA_22 (0x00400000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00400000 */ +#define ADC_JDR3_JDATA_23 (0x00800000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00800000 */ +#define ADC_JDR3_JDATA_24 (0x01000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x01000000 */ +#define ADC_JDR3_JDATA_25 (0x02000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x02000000 */ +#define ADC_JDR3_JDATA_26 (0x04000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x04000000 */ +#define ADC_JDR3_JDATA_27 (0x08000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x08000000 */ +#define ADC_JDR3_JDATA_28 (0x10000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x10000000 */ +#define ADC_JDR3_JDATA_29 (0x20000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x20000000 */ +#define ADC_JDR3_JDATA_30 (0x40000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x40000000 */ +#define ADC_JDR3_JDATA_31 (0x80000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_JDR4 register ********************/ +#define ADC_JDR4_JDATA_Pos (0U) +#define ADC_JDR4_JDATA_Msk (0xFFFFFFFFUL << ADC_JDR4_JDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_JDR4_JDATA ADC_JDR4_JDATA_Msk /*!< ADC Injected DATA */ +#define ADC_JDR4_JDATA_0 (0x00000001UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR4_JDATA_1 (0x00000002UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR4_JDATA_2 (0x00000004UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR4_JDATA_3 (0x00000008UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR4_JDATA_4 (0x00000010UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR4_JDATA_5 (0x00000020UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR4_JDATA_6 (0x00000040UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR4_JDATA_7 (0x00000080UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR4_JDATA_8 (0x00000100UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR4_JDATA_9 (0x00000200UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR4_JDATA_10 (0x00000400UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR4_JDATA_11 (0x00000800UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR4_JDATA_12 (0x00001000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR4_JDATA_13 (0x00002000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR4_JDATA_14 (0x00004000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR4_JDATA_15 (0x00008000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00008000 */ +#define ADC_JDR4_JDATA_16 (0x00010000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00010000 */ +#define ADC_JDR4_JDATA_17 (0x00020000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00020000 */ +#define ADC_JDR4_JDATA_18 (0x00040000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00040000 */ +#define ADC_JDR4_JDATA_19 (0x00080000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00080000 */ +#define ADC_JDR4_JDATA_20 (0x00100000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00100000 */ +#define ADC_JDR4_JDATA_21 (0x00200000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00200000 */ +#define ADC_JDR4_JDATA_22 (0x00400000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00400000 */ +#define ADC_JDR4_JDATA_23 (0x00800000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00800000 */ +#define ADC_JDR4_JDATA_24 (0x01000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x01000000 */ +#define ADC_JDR4_JDATA_25 (0x02000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x02000000 */ +#define ADC_JDR4_JDATA_26 (0x04000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x04000000 */ +#define ADC_JDR4_JDATA_27 (0x08000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x08000000 */ +#define ADC_JDR4_JDATA_28 (0x10000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x10000000 */ +#define ADC_JDR4_JDATA_29 (0x20000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x20000000 */ +#define ADC_JDR4_JDATA_30 (0x40000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x40000000 */ +#define ADC_JDR4_JDATA_31 (0x80000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_AWD2CR register ********************/ +#define ADC_AWD2CR_AWD2CH_Pos (0U) +#define ADC_AWD2CR_AWD2CH_Msk (0xFFFFFUL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x000FFFFF */ +#define ADC_AWD2CR_AWD2CH ADC_AWD2CR_AWD2CH_Msk /*!< ADC Analog watchdog 2 channel selection */ +#define ADC_AWD2CR_AWD2CH_0 (0x00001UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000001 */ +#define ADC_AWD2CR_AWD2CH_1 (0x00002UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000002 */ +#define ADC_AWD2CR_AWD2CH_2 (0x00004UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000004 */ +#define ADC_AWD2CR_AWD2CH_3 (0x00008UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000008 */ +#define ADC_AWD2CR_AWD2CH_4 (0x00010UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000010 */ +#define ADC_AWD2CR_AWD2CH_5 (0x00020UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000020 */ +#define ADC_AWD2CR_AWD2CH_6 (0x00040UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000040 */ +#define ADC_AWD2CR_AWD2CH_7 (0x00080UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000080 */ +#define ADC_AWD2CR_AWD2CH_8 (0x00100UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000100 */ +#define ADC_AWD2CR_AWD2CH_9 (0x00200UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000200 */ +#define ADC_AWD2CR_AWD2CH_10 (0x00400UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000400 */ +#define ADC_AWD2CR_AWD2CH_11 (0x00800UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000800 */ +#define ADC_AWD2CR_AWD2CH_12 (0x01000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00001000 */ +#define ADC_AWD2CR_AWD2CH_13 (0x02000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00002000 */ +#define ADC_AWD2CR_AWD2CH_14 (0x04000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00004000 */ +#define ADC_AWD2CR_AWD2CH_15 (0x08000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00008000 */ +#define ADC_AWD2CR_AWD2CH_16 (0x10000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00010000 */ +#define ADC_AWD2CR_AWD2CH_17 (0x20000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00020000 */ +#define ADC_AWD2CR_AWD2CH_18 (0x40000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00040000 */ +#define ADC_AWD2CR_AWD2CH_19 (0x80000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00080000 */ + +/******************** Bit definition for ADC_AWD3CR register ********************/ +#define ADC_AWD3CR_AWD3CH_Pos (0U) +#define ADC_AWD3CR_AWD3CH_Msk (0xFFFFFUL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x000FFFFF */ +#define ADC_AWD3CR_AWD3CH ADC_AWD3CR_AWD3CH_Msk /*!< ADC Analog watchdog 2 channel selection */ +#define ADC_AWD3CR_AWD3CH_0 (0x00001UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000001 */ +#define ADC_AWD3CR_AWD3CH_1 (0x00002UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000002 */ +#define ADC_AWD3CR_AWD3CH_2 (0x00004UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000004 */ +#define ADC_AWD3CR_AWD3CH_3 (0x00008UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000008 */ +#define ADC_AWD3CR_AWD3CH_4 (0x00010UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000010 */ +#define ADC_AWD3CR_AWD3CH_5 (0x00020UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000020 */ +#define ADC_AWD3CR_AWD3CH_6 (0x00040UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000040 */ +#define ADC_AWD3CR_AWD3CH_7 (0x00080UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000080 */ +#define ADC_AWD3CR_AWD3CH_8 (0x00100UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000100 */ +#define ADC_AWD3CR_AWD3CH_9 (0x00200UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000200 */ +#define ADC_AWD3CR_AWD3CH_10 (0x00400UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000400 */ +#define ADC_AWD3CR_AWD3CH_11 (0x00800UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000800 */ +#define ADC_AWD3CR_AWD3CH_12 (0x01000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00001000 */ +#define ADC_AWD3CR_AWD3CH_13 (0x02000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00002000 */ +#define ADC_AWD3CR_AWD3CH_14 (0x04000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00004000 */ +#define ADC_AWD3CR_AWD3CH_15 (0x08000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00008000 */ +#define ADC_AWD3CR_AWD3CH_16 (0x10000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00010000 */ +#define ADC_AWD3CR_AWD3CH_17 (0x20000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00020000 */ +#define ADC_AWD3CR_AWD3CH_18 (0x40000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00040000 */ +#define ADC_AWD3CR_AWD3CH_19 (0x80000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00080000 */ + +/******************** Bit definition for ADC_DIFSEL register ********************/ +#define ADC_DIFSEL_DIFSEL_Pos (0U) +#define ADC_DIFSEL_DIFSEL_Msk (0xFFFFFUL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x000FFFFF */ +#define ADC_DIFSEL_DIFSEL ADC_DIFSEL_DIFSEL_Msk /*!< ADC differential modes for channels 1 to 18 */ +#define ADC_DIFSEL_DIFSEL_0 (0x00001UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000001 */ +#define ADC_DIFSEL_DIFSEL_1 (0x00002UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000002 */ +#define ADC_DIFSEL_DIFSEL_2 (0x00004UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000004 */ +#define ADC_DIFSEL_DIFSEL_3 (0x00008UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000008 */ +#define ADC_DIFSEL_DIFSEL_4 (0x00010UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000010 */ +#define ADC_DIFSEL_DIFSEL_5 (0x00020UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000020 */ +#define ADC_DIFSEL_DIFSEL_6 (0x00040UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000040 */ +#define ADC_DIFSEL_DIFSEL_7 (0x00080UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000080 */ +#define ADC_DIFSEL_DIFSEL_8 (0x00100UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000100 */ +#define ADC_DIFSEL_DIFSEL_9 (0x00200UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000200 */ +#define ADC_DIFSEL_DIFSEL_10 (0x00400UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000400 */ +#define ADC_DIFSEL_DIFSEL_11 (0x00800UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000800 */ +#define ADC_DIFSEL_DIFSEL_12 (0x01000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00001000 */ +#define ADC_DIFSEL_DIFSEL_13 (0x02000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00002000 */ +#define ADC_DIFSEL_DIFSEL_14 (0x04000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00004000 */ +#define ADC_DIFSEL_DIFSEL_15 (0x08000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00008000 */ +#define ADC_DIFSEL_DIFSEL_16 (0x10000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00010000 */ +#define ADC_DIFSEL_DIFSEL_17 (0x20000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00020000 */ +#define ADC_DIFSEL_DIFSEL_18 (0x40000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00040000 */ +#define ADC_DIFSEL_DIFSEL_19 (0x80000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00080000 */ + +/******************** Bit definition for ADC_CALFACT register ********************/ +#define ADC_CALFACT_CALFACT_S_Pos (0U) +#define ADC_CALFACT_CALFACT_S_Msk (0x7FFUL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x000007FF */ +#define ADC_CALFACT_CALFACT_S ADC_CALFACT_CALFACT_S_Msk /*!< ADC calibration factors in single-ended mode */ +#define ADC_CALFACT_CALFACT_S_0 (0x001UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000001 */ +#define ADC_CALFACT_CALFACT_S_1 (0x002UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000002 */ +#define ADC_CALFACT_CALFACT_S_2 (0x004UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000004 */ +#define ADC_CALFACT_CALFACT_S_3 (0x008UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000008 */ +#define ADC_CALFACT_CALFACT_S_4 (0x010UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000010 */ +#define ADC_CALFACT_CALFACT_S_5 (0x020UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000020 */ +#define ADC_CALFACT_CALFACT_S_6 (0x040UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000040 */ +#define ADC_CALFACT_CALFACT_S_7 (0x080UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000080 */ +#define ADC_CALFACT_CALFACT_S_8 (0x100UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000100 */ +#define ADC_CALFACT_CALFACT_S_9 (0x200UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000200 */ +#define ADC_CALFACT_CALFACT_S_10 (0x400UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000400 */ +#define ADC_CALFACT_CALFACT_D_Pos (16U) +#define ADC_CALFACT_CALFACT_D_Msk (0x7FFUL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x07FF0000 */ +#define ADC_CALFACT_CALFACT_D ADC_CALFACT_CALFACT_D_Msk /*!< ADC calibration factors in differential mode */ +#define ADC_CALFACT_CALFACT_D_0 (0x001UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00010000 */ +#define ADC_CALFACT_CALFACT_D_1 (0x002UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00020000 */ +#define ADC_CALFACT_CALFACT_D_2 (0x004UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00040000 */ +#define ADC_CALFACT_CALFACT_D_3 (0x008UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00080000 */ +#define ADC_CALFACT_CALFACT_D_4 (0x010UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00100000 */ +#define ADC_CALFACT_CALFACT_D_5 (0x020UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00200000 */ +#define ADC_CALFACT_CALFACT_D_6 (0x040UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00400000 */ +#define ADC_CALFACT_CALFACT_D_7 (0x080UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00800000 */ +#define ADC_CALFACT_CALFACT_D_8 (0x100UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x01000000 */ +#define ADC_CALFACT_CALFACT_D_9 (0x200UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x02000000 */ +#define ADC_CALFACT_CALFACT_D_10 (0x400UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x04000000 */ + +/******************** Bit definition for ADC_CALFACT2 register ********************/ +#define ADC_CALFACT2_LINCALFACT_Pos (0U) +#define ADC_CALFACT2_LINCALFACT_Msk (0x3FFFFFFFUL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x3FFFFFFF */ +#define ADC_CALFACT2_LINCALFACT ADC_CALFACT2_LINCALFACT_Msk /*!< ADC Linearity calibration factors */ +#define ADC_CALFACT2_LINCALFACT_0 (0x00000001UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000001 */ +#define ADC_CALFACT2_LINCALFACT_1 (0x00000002UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000002 */ +#define ADC_CALFACT2_LINCALFACT_2 (0x00000004UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000004 */ +#define ADC_CALFACT2_LINCALFACT_3 (0x00000008UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000008 */ +#define ADC_CALFACT2_LINCALFACT_4 (0x00000010UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000010 */ +#define ADC_CALFACT2_LINCALFACT_5 (0x00000020UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000020 */ +#define ADC_CALFACT2_LINCALFACT_6 (0x00000040UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000040 */ +#define ADC_CALFACT2_LINCALFACT_7 (0x00000080UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000080 */ +#define ADC_CALFACT2_LINCALFACT_8 (0x00000100UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000100 */ +#define ADC_CALFACT2_LINCALFACT_9 (0x00000200UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000200 */ +#define ADC_CALFACT2_LINCALFACT_10 (0x00000400UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000400 */ +#define ADC_CALFACT2_LINCALFACT_11 (0x00000800UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000800 */ +#define ADC_CALFACT2_LINCALFACT_12 (0x00001000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00001000 */ +#define ADC_CALFACT2_LINCALFACT_13 (0x00002000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00002000 */ +#define ADC_CALFACT2_LINCALFACT_14 (0x00004000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00004000 */ +#define ADC_CALFACT2_LINCALFACT_15 (0x00008000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00008000 */ +#define ADC_CALFACT2_LINCALFACT_16 (0x00010000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00010000 */ +#define ADC_CALFACT2_LINCALFACT_17 (0x00020000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00020000 */ +#define ADC_CALFACT2_LINCALFACT_18 (0x00040000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00040000 */ +#define ADC_CALFACT2_LINCALFACT_19 (0x00080000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00080000 */ +#define ADC_CALFACT2_LINCALFACT_20 (0x00100000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00100000 */ +#define ADC_CALFACT2_LINCALFACT_21 (0x00200000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00200000 */ +#define ADC_CALFACT2_LINCALFACT_22 (0x00400000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00400000 */ +#define ADC_CALFACT2_LINCALFACT_23 (0x00800000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00800000 */ +#define ADC_CALFACT2_LINCALFACT_24 (0x01000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x01000000 */ +#define ADC_CALFACT2_LINCALFACT_25 (0x02000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x02000000 */ +#define ADC_CALFACT2_LINCALFACT_26 (0x04000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x04000000 */ +#define ADC_CALFACT2_LINCALFACT_27 (0x08000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x08000000 */ +#define ADC_CALFACT2_LINCALFACT_28 (0x10000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x10000000 */ +#define ADC_CALFACT2_LINCALFACT_29 (0x20000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x20000000 */ + +/************************* ADC Common registers *****************************/ +/******************** Bit definition for ADC_CSR register ********************/ +#define ADC_CSR_ADRDY_MST_Pos (0U) +#define ADC_CSR_ADRDY_MST_Msk (0x1UL << ADC_CSR_ADRDY_MST_Pos) /*!< 0x00000001 */ +#define ADC_CSR_ADRDY_MST ADC_CSR_ADRDY_MST_Msk /*!< Master ADC ready */ +#define ADC_CSR_EOSMP_MST_Pos (1U) +#define ADC_CSR_EOSMP_MST_Msk (0x1UL << ADC_CSR_EOSMP_MST_Pos) /*!< 0x00000002 */ +#define ADC_CSR_EOSMP_MST ADC_CSR_EOSMP_MST_Msk /*!< End of sampling phase flag of the master ADC */ +#define ADC_CSR_EOC_MST_Pos (2U) +#define ADC_CSR_EOC_MST_Msk (0x1UL << ADC_CSR_EOC_MST_Pos) /*!< 0x00000004 */ +#define ADC_CSR_EOC_MST ADC_CSR_EOC_MST_Msk /*!< End of regular conversion of the master ADC */ +#define ADC_CSR_EOS_MST_Pos (3U) +#define ADC_CSR_EOS_MST_Msk (0x1UL << ADC_CSR_EOS_MST_Pos) /*!< 0x00000008 */ +#define ADC_CSR_EOS_MST ADC_CSR_EOS_MST_Msk /*!< End of regular sequence flag of the master ADC */ +#define ADC_CSR_OVR_MST_Pos (4U) +#define ADC_CSR_OVR_MST_Msk (0x1UL << ADC_CSR_OVR_MST_Pos) /*!< 0x00000010 */ +#define ADC_CSR_OVR_MST ADC_CSR_OVR_MST_Msk /*!< Overrun flag of the master ADC */ +#define ADC_CSR_JEOC_MST_Pos (5U) +#define ADC_CSR_JEOC_MST_Msk (0x1UL << ADC_CSR_JEOC_MST_Pos) /*!< 0x00000020 */ +#define ADC_CSR_JEOC_MST ADC_CSR_JEOC_MST_Msk /*!< End of injected conversion of the master ADC */ +#define ADC_CSR_JEOS_MST_Pos (6U) +#define ADC_CSR_JEOS_MST_Msk (0x1UL << ADC_CSR_JEOS_MST_Pos) /*!< 0x00000040 */ +#define ADC_CSR_JEOS_MST ADC_CSR_JEOS_MST_Msk /*!< End of injected sequence flag of the master ADC */ +#define ADC_CSR_AWD1_MST_Pos (7U) +#define ADC_CSR_AWD1_MST_Msk (0x1UL << ADC_CSR_AWD1_MST_Pos) /*!< 0x00000080 */ +#define ADC_CSR_AWD1_MST ADC_CSR_AWD1_MST_Msk /*!< Analog watchdog 1 flag of the master ADC */ +#define ADC_CSR_AWD2_MST_Pos (8U) +#define ADC_CSR_AWD2_MST_Msk (0x1UL << ADC_CSR_AWD2_MST_Pos) /*!< 0x00000100 */ +#define ADC_CSR_AWD2_MST ADC_CSR_AWD2_MST_Msk /*!< Analog watchdog 2 flag of the master ADC */ +#define ADC_CSR_AWD3_MST_Pos (9U) +#define ADC_CSR_AWD3_MST_Msk (0x1UL << ADC_CSR_AWD3_MST_Pos) /*!< 0x00000200 */ +#define ADC_CSR_AWD3_MST ADC_CSR_AWD3_MST_Msk /*!< Analog watchdog 3 flag of the master ADC */ +#define ADC_CSR_JQOVF_MST_Pos (10U) +#define ADC_CSR_JQOVF_MST_Msk (0x1UL << ADC_CSR_JQOVF_MST_Pos) /*!< 0x00000400 */ +#define ADC_CSR_JQOVF_MST ADC_CSR_JQOVF_MST_Msk /*!< Injected context queue overflow flag of the master ADC */ +#define ADC_CSR_ADRDY_SLV_Pos (16U) +#define ADC_CSR_ADRDY_SLV_Msk (0x1UL << ADC_CSR_ADRDY_SLV_Pos) /*!< 0x00010000 */ +#define ADC_CSR_ADRDY_SLV ADC_CSR_ADRDY_SLV_Msk /*!< Slave ADC ready */ +#define ADC_CSR_EOSMP_SLV_Pos (17U) +#define ADC_CSR_EOSMP_SLV_Msk (0x1UL << ADC_CSR_EOSMP_SLV_Pos) /*!< 0x00020000 */ +#define ADC_CSR_EOSMP_SLV ADC_CSR_EOSMP_SLV_Msk /*!< End of sampling phase flag of the slave ADC */ +#define ADC_CSR_EOC_SLV_Pos (18U) +#define ADC_CSR_EOC_SLV_Msk (0x1UL << ADC_CSR_EOC_SLV_Pos) /*!< 0x00040000 */ +#define ADC_CSR_EOC_SLV ADC_CSR_EOC_SLV_Msk /*!< End of regular conversion of the slave ADC */ +#define ADC_CSR_EOS_SLV_Pos (19U) +#define ADC_CSR_EOS_SLV_Msk (0x1UL << ADC_CSR_EOS_SLV_Pos) /*!< 0x00080000 */ +#define ADC_CSR_EOS_SLV ADC_CSR_EOS_SLV_Msk /*!< End of regular sequence flag of the slave ADC */ +#define ADC_CSR_OVR_SLV_Pos (20U) +#define ADC_CSR_OVR_SLV_Msk (0x1UL << ADC_CSR_OVR_SLV_Pos) /*!< 0x00100000 */ +#define ADC_CSR_OVR_SLV ADC_CSR_OVR_SLV_Msk /*!< Overrun flag of the slave ADC */ +#define ADC_CSR_JEOC_SLV_Pos (21U) +#define ADC_CSR_JEOC_SLV_Msk (0x1UL << ADC_CSR_JEOC_SLV_Pos) /*!< 0x00200000 */ +#define ADC_CSR_JEOC_SLV ADC_CSR_JEOC_SLV_Msk /*!< End of injected conversion of the slave ADC */ +#define ADC_CSR_JEOS_SLV_Pos (22U) +#define ADC_CSR_JEOS_SLV_Msk (0x1UL << ADC_CSR_JEOS_SLV_Pos) /*!< 0x00400000 */ +#define ADC_CSR_JEOS_SLV ADC_CSR_JEOS_SLV_Msk /*!< End of injected sequence flag of the slave ADC */ +#define ADC_CSR_AWD1_SLV_Pos (23U) +#define ADC_CSR_AWD1_SLV_Msk (0x1UL << ADC_CSR_AWD1_SLV_Pos) /*!< 0x00800000 */ +#define ADC_CSR_AWD1_SLV ADC_CSR_AWD1_SLV_Msk /*!< Analog watchdog 1 flag of the slave ADC */ +#define ADC_CSR_AWD2_SLV_Pos (24U) +#define ADC_CSR_AWD2_SLV_Msk (0x1UL << ADC_CSR_AWD2_SLV_Pos) /*!< 0x01000000 */ +#define ADC_CSR_AWD2_SLV ADC_CSR_AWD2_SLV_Msk /*!< Analog watchdog 2 flag of the slave ADC */ +#define ADC_CSR_AWD3_SLV_Pos (25U) +#define ADC_CSR_AWD3_SLV_Msk (0x1UL << ADC_CSR_AWD3_SLV_Pos) /*!< 0x02000000 */ +#define ADC_CSR_AWD3_SLV ADC_CSR_AWD3_SLV_Msk /*!< Analog watchdog 3 flag of the slave ADC */ +#define ADC_CSR_JQOVF_SLV_Pos (26U) +#define ADC_CSR_JQOVF_SLV_Msk (0x1UL << ADC_CSR_JQOVF_SLV_Pos) /*!< 0x04000000 */ +#define ADC_CSR_JQOVF_SLV ADC_CSR_JQOVF_SLV_Msk /*!< Injected context queue overflow flag of the slave ADC */ + +/******************** Bit definition for ADC_CCR register ********************/ +#define ADC_CCR_DUAL_Pos (0U) +#define ADC_CCR_DUAL_Msk (0x1FUL << ADC_CCR_DUAL_Pos) /*!< 0x0000001F */ +#define ADC_CCR_DUAL ADC_CCR_DUAL_Msk /*!< Dual ADC mode selection */ +#define ADC_CCR_DUAL_0 (0x01UL << ADC_CCR_DUAL_Pos) /*!< 0x00000001 */ +#define ADC_CCR_DUAL_1 (0x02UL << ADC_CCR_DUAL_Pos) /*!< 0x00000002 */ +#define ADC_CCR_DUAL_2 (0x04UL << ADC_CCR_DUAL_Pos) /*!< 0x00000004 */ +#define ADC_CCR_DUAL_3 (0x08UL << ADC_CCR_DUAL_Pos) /*!< 0x00000008 */ +#define ADC_CCR_DUAL_4 (0x10UL << ADC_CCR_DUAL_Pos) /*!< 0x00000010 */ + +#define ADC_CCR_DELAY_Pos (8U) +#define ADC_CCR_DELAY_Msk (0xFUL << ADC_CCR_DELAY_Pos) /*!< 0x00000F00 */ +#define ADC_CCR_DELAY ADC_CCR_DELAY_Msk /*!< Delay between 2 sampling phases */ +#define ADC_CCR_DELAY_0 (0x1UL << ADC_CCR_DELAY_Pos) /*!< 0x00000100 */ +#define ADC_CCR_DELAY_1 (0x2UL << ADC_CCR_DELAY_Pos) /*!< 0x00000200 */ +#define ADC_CCR_DELAY_2 (0x4UL << ADC_CCR_DELAY_Pos) /*!< 0x00000400 */ +#define ADC_CCR_DELAY_3 (0x8UL << ADC_CCR_DELAY_Pos) /*!< 0x00000800 */ + + +#define ADC_CCR_DAMDF_Pos (14U) +#define ADC_CCR_DAMDF_Msk (0x3UL << ADC_CCR_DAMDF_Pos) /*!< 0x0000C000 */ +#define ADC_CCR_DAMDF ADC_CCR_DAMDF_Msk /*!< Dual ADC mode Data format */ +#define ADC_CCR_DAMDF_0 (0x1UL << ADC_CCR_DAMDF_Pos) /*!< 0x00004000 */ +#define ADC_CCR_DAMDF_1 (0x2UL << ADC_CCR_DAMDF_Pos) /*!< 0x00008000 */ + +#define ADC_CCR_CKMODE_Pos (16U) +#define ADC_CCR_CKMODE_Msk (0x3UL << ADC_CCR_CKMODE_Pos) /*!< 0x00030000 */ +#define ADC_CCR_CKMODE ADC_CCR_CKMODE_Msk /*!< ADC clock mode */ +#define ADC_CCR_CKMODE_0 (0x1UL << ADC_CCR_CKMODE_Pos) /*!< 0x00010000 */ +#define ADC_CCR_CKMODE_1 (0x2UL << ADC_CCR_CKMODE_Pos) /*!< 0x00020000 */ + +#define ADC_CCR_PRESC_Pos (18U) +#define ADC_CCR_PRESC_Msk (0xFUL << ADC_CCR_PRESC_Pos) /*!< 0x003C0000 */ +#define ADC_CCR_PRESC ADC_CCR_PRESC_Msk /*!< ADC prescaler */ +#define ADC_CCR_PRESC_0 (0x1UL << ADC_CCR_PRESC_Pos) /*!< 0x00040000 */ +#define ADC_CCR_PRESC_1 (0x2UL << ADC_CCR_PRESC_Pos) /*!< 0x00080000 */ +#define ADC_CCR_PRESC_2 (0x4UL << ADC_CCR_PRESC_Pos) /*!< 0x00100000 */ +#define ADC_CCR_PRESC_3 (0x8UL << ADC_CCR_PRESC_Pos) /*!< 0x00200000 */ + +#define ADC_CCR_VREFEN_Pos (22U) +#define ADC_CCR_VREFEN_Msk (0x1UL << ADC_CCR_VREFEN_Pos) /*!< 0x00400000 */ +#define ADC_CCR_VREFEN ADC_CCR_VREFEN_Msk /*!< VREFINT enable */ +#define ADC_CCR_TSEN_Pos (23U) +#define ADC_CCR_TSEN_Msk (0x1UL << ADC_CCR_TSEN_Pos) /*!< 0x00800000 */ +#define ADC_CCR_TSEN ADC_CCR_TSEN_Msk /*!< Temperature sensor enable */ +#define ADC_CCR_VBATEN_Pos (24U) +#define ADC_CCR_VBATEN_Msk (0x1UL << ADC_CCR_VBATEN_Pos) /*!< 0x01000000 */ +#define ADC_CCR_VBATEN ADC_CCR_VBATEN_Msk /*!< VBAT enable */ + +/******************** Bit definition for ADC_CDR register *******************/ +#define ADC_CDR_RDATA_MST_Pos (0U) +#define ADC_CDR_RDATA_MST_Msk (0xFFFFUL << ADC_CDR_RDATA_MST_Pos) /*!< 0x0000FFFF */ +#define ADC_CDR_RDATA_MST ADC_CDR_RDATA_MST_Msk /*!< ADC multimode master group regular conversion data */ + +#define ADC_CDR_RDATA_SLV_Pos (16U) +#define ADC_CDR_RDATA_SLV_Msk (0xFFFFUL << ADC_CDR_RDATA_SLV_Pos) /*!< 0xFFFF0000 */ +#define ADC_CDR_RDATA_SLV ADC_CDR_RDATA_SLV_Msk /*!< ADC multimode slave group regular conversion data */ + +/******************** Bit definition for ADC_CDR2 register ******************/ +#define ADC_CDR2_RDATA_ALT_Pos (0U) +#define ADC_CDR2_RDATA_ALT_Msk (0xFFFFFFFFUL << ADC_CDR2_RDATA_ALT_Pos) /*!< 0xFFFFFFFF */ +#define ADC_CDR2_RDATA_ALT ADC_CDR2_RDATA_ALT_Msk /*!< Regular data of the master/slave alternated ADCs */ + + +/******************************************************************************/ +/* */ +/* VREFBUF */ +/* */ +/******************************************************************************/ +/******************* Bit definition for VREFBUF_CSR register ****************/ +#define VREFBUF_CSR_ENVR_Pos (0U) +#define VREFBUF_CSR_ENVR_Msk (0x1UL << VREFBUF_CSR_ENVR_Pos) /*!< 0x00000001 */ +#define VREFBUF_CSR_ENVR VREFBUF_CSR_ENVR_Msk /*!*/ +#define DAC_CR_CEN1_Pos (14U) +#define DAC_CR_CEN1_Msk (0x1UL << DAC_CR_CEN1_Pos) /*!< 0x00004000 */ +#define DAC_CR_CEN1 DAC_CR_CEN1_Msk /*!*/ + +#define DAC_CR_EN2_Pos (16U) +#define DAC_CR_EN2_Msk (0x1UL << DAC_CR_EN2_Pos) /*!< 0x00010000 */ +#define DAC_CR_EN2 DAC_CR_EN2_Msk /*!*/ +#define DAC_CR_CEN2_Pos (30U) +#define DAC_CR_CEN2_Msk (0x1UL << DAC_CR_CEN2_Pos) /*!< 0x40000000 */ +#define DAC_CR_CEN2 DAC_CR_CEN2_Msk /*!*/ + +/***************** Bit definition for DAC_SWTRIGR register ******************/ +#define DAC_SWTRIGR_SWTRIG1_Pos (0U) +#define DAC_SWTRIGR_SWTRIG1_Msk (0x1UL << DAC_SWTRIGR_SWTRIG1_Pos) /*!< 0x00000001 */ +#define DAC_SWTRIGR_SWTRIG1 DAC_SWTRIGR_SWTRIG1_Msk /*!
© Copyright (c) 2019 STMicroelectronics. + * All rights reserved.
+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/** @addtogroup CMSIS_Device + * @{ + */ + +/** @addtogroup stm32h733xx + * @{ + */ + +#ifndef STM32H733xx_H +#define STM32H733xx_H + +#ifdef __cplusplus + extern "C" { +#endif /* __cplusplus */ + +/** @addtogroup Peripheral_interrupt_number_definition + * @{ + */ + +/** + * @brief STM32H7XX Interrupt Number Definition, according to the selected device + * in @ref Library_configuration_section + */ +typedef enum +{ +/****** Cortex-M Processor Exceptions Numbers *****************************************************************/ + NonMaskableInt_IRQn = -14, /*!< 2 Non Maskable Interrupt */ + HardFault_IRQn = -13, /*!< 4 Cortex-M Memory Management Interrupt */ + MemoryManagement_IRQn = -12, /*!< 4 Cortex-M Memory Management Interrupt */ + BusFault_IRQn = -11, /*!< 5 Cortex-M Bus Fault Interrupt */ + UsageFault_IRQn = -10, /*!< 6 Cortex-M Usage Fault Interrupt */ + SVCall_IRQn = -5, /*!< 11 Cortex-M SV Call Interrupt */ + DebugMonitor_IRQn = -4, /*!< 12 Cortex-M Debug Monitor Interrupt */ + PendSV_IRQn = -2, /*!< 14 Cortex-M Pend SV Interrupt */ + SysTick_IRQn = -1, /*!< 15 Cortex-M System Tick Interrupt */ +/****** STM32 specific Interrupt Numbers **********************************************************************/ + WWDG_IRQn = 0, /*!< Window WatchDog Interrupt ( wwdg1_it, wwdg2_it) */ + PVD_AVD_IRQn = 1, /*!< PVD/AVD through EXTI Line detection Interrupt */ + TAMP_STAMP_IRQn = 2, /*!< Tamper and TimeStamp interrupts through the EXTI line */ + RTC_WKUP_IRQn = 3, /*!< RTC Wakeup interrupt through the EXTI line */ + FLASH_IRQn = 4, /*!< FLASH global Interrupt */ + RCC_IRQn = 5, /*!< RCC global Interrupt */ + EXTI0_IRQn = 6, /*!< EXTI Line0 Interrupt */ + EXTI1_IRQn = 7, /*!< EXTI Line1 Interrupt */ + EXTI2_IRQn = 8, /*!< EXTI Line2 Interrupt */ + EXTI3_IRQn = 9, /*!< EXTI Line3 Interrupt */ + EXTI4_IRQn = 10, /*!< EXTI Line4 Interrupt */ + DMA1_Stream0_IRQn = 11, /*!< DMA1 Stream 0 global Interrupt */ + DMA1_Stream1_IRQn = 12, /*!< DMA1 Stream 1 global Interrupt */ + DMA1_Stream2_IRQn = 13, /*!< DMA1 Stream 2 global Interrupt */ + DMA1_Stream3_IRQn = 14, /*!< DMA1 Stream 3 global Interrupt */ + DMA1_Stream4_IRQn = 15, /*!< DMA1 Stream 4 global Interrupt */ + DMA1_Stream5_IRQn = 16, /*!< DMA1 Stream 5 global Interrupt */ + DMA1_Stream6_IRQn = 17, /*!< DMA1 Stream 6 global Interrupt */ + ADC_IRQn = 18, /*!< ADC1 and ADC2 global Interrupts */ + FDCAN1_IT0_IRQn = 19, /*!< FDCAN1 Interrupt line 0 */ + FDCAN2_IT0_IRQn = 20, /*!< FDCAN2 Interrupt line 0 */ + FDCAN1_IT1_IRQn = 21, /*!< FDCAN1 Interrupt line 1 */ + FDCAN2_IT1_IRQn = 22, /*!< FDCAN2 Interrupt line 1 */ + EXTI9_5_IRQn = 23, /*!< External Line[9:5] Interrupts */ + TIM1_BRK_IRQn = 24, /*!< TIM1 Break Interrupt */ + TIM1_UP_IRQn = 25, /*!< TIM1 Update Interrupt */ + TIM1_TRG_COM_IRQn = 26, /*!< TIM1 Trigger and Commutation Interrupt */ + TIM1_CC_IRQn = 27, /*!< TIM1 Capture Compare Interrupt */ + TIM2_IRQn = 28, /*!< TIM2 global Interrupt */ + TIM3_IRQn = 29, /*!< TIM3 global Interrupt */ + TIM4_IRQn = 30, /*!< TIM4 global Interrupt */ + I2C1_EV_IRQn = 31, /*!< I2C1 Event Interrupt */ + I2C1_ER_IRQn = 32, /*!< I2C1 Error Interrupt */ + I2C2_EV_IRQn = 33, /*!< I2C2 Event Interrupt */ + I2C2_ER_IRQn = 34, /*!< I2C2 Error Interrupt */ + SPI1_IRQn = 35, /*!< SPI1 global Interrupt */ + SPI2_IRQn = 36, /*!< SPI2 global Interrupt */ + USART1_IRQn = 37, /*!< USART1 global Interrupt */ + USART2_IRQn = 38, /*!< USART2 global Interrupt */ + USART3_IRQn = 39, /*!< USART3 global Interrupt */ + EXTI15_10_IRQn = 40, /*!< External Line[15:10] Interrupts */ + RTC_Alarm_IRQn = 41, /*!< RTC Alarm (A and B) through EXTI Line Interrupt */ + TIM8_BRK_TIM12_IRQn = 43, /*!< TIM8 Break Interrupt and TIM12 global interrupt */ + TIM8_UP_TIM13_IRQn = 44, /*!< TIM8 Update Interrupt and TIM13 global interrupt */ + TIM8_TRG_COM_TIM14_IRQn = 45, /*!< TIM8 Trigger and Commutation Interrupt and TIM14 global interrupt */ + TIM8_CC_IRQn = 46, /*!< TIM8 Capture Compare Interrupt */ + DMA1_Stream7_IRQn = 47, /*!< DMA1 Stream7 Interrupt */ + FMC_IRQn = 48, /*!< FMC global Interrupt */ + SDMMC1_IRQn = 49, /*!< SDMMC1 global Interrupt */ + TIM5_IRQn = 50, /*!< TIM5 global Interrupt */ + SPI3_IRQn = 51, /*!< SPI3 global Interrupt */ + UART4_IRQn = 52, /*!< UART4 global Interrupt */ + UART5_IRQn = 53, /*!< UART5 global Interrupt */ + TIM6_DAC_IRQn = 54, /*!< TIM6 global and DAC1&2 underrun error interrupts */ + TIM7_IRQn = 55, /*!< TIM7 global interrupt */ + DMA2_Stream0_IRQn = 56, /*!< DMA2 Stream 0 global Interrupt */ + DMA2_Stream1_IRQn = 57, /*!< DMA2 Stream 1 global Interrupt */ + DMA2_Stream2_IRQn = 58, /*!< DMA2 Stream 2 global Interrupt */ + DMA2_Stream3_IRQn = 59, /*!< DMA2 Stream 3 global Interrupt */ + DMA2_Stream4_IRQn = 60, /*!< DMA2 Stream 4 global Interrupt */ + ETH_IRQn = 61, /*!< Ethernet global Interrupt */ + ETH_WKUP_IRQn = 62, /*!< Ethernet Wakeup through EXTI line Interrupt */ + FDCAN_CAL_IRQn = 63, /*!< FDCAN Calibration unit Interrupt */ + DMA2_Stream5_IRQn = 68, /*!< DMA2 Stream 5 global interrupt */ + DMA2_Stream6_IRQn = 69, /*!< DMA2 Stream 6 global interrupt */ + DMA2_Stream7_IRQn = 70, /*!< DMA2 Stream 7 global interrupt */ + USART6_IRQn = 71, /*!< USART6 global interrupt */ + I2C3_EV_IRQn = 72, /*!< I2C3 event interrupt */ + I2C3_ER_IRQn = 73, /*!< I2C3 error interrupt */ + OTG_HS_EP1_OUT_IRQn = 74, /*!< USB OTG HS End Point 1 Out global interrupt */ + OTG_HS_EP1_IN_IRQn = 75, /*!< USB OTG HS End Point 1 In global interrupt */ + OTG_HS_WKUP_IRQn = 76, /*!< USB OTG HS Wakeup through EXTI interrupt */ + OTG_HS_IRQn = 77, /*!< USB OTG HS global interrupt */ + DCMI_PSSI_IRQn = 78, /*!< DCMI and PSSI global interrupt */ + CRYP_IRQn = 79, /*!< CRYP crypto global interrupt */ + HASH_RNG_IRQn = 80, /*!< HASH and RNG global interrupt */ + FPU_IRQn = 81, /*!< FPU global interrupt */ + UART7_IRQn = 82, /*!< UART7 global interrupt */ + UART8_IRQn = 83, /*!< UART8 global interrupt */ + SPI4_IRQn = 84, /*!< SPI4 global Interrupt */ + SPI5_IRQn = 85, /*!< SPI5 global Interrupt */ + SPI6_IRQn = 86, /*!< SPI6 global Interrupt */ + SAI1_IRQn = 87, /*!< SAI1 global Interrupt */ + LTDC_IRQn = 88, /*!< LTDC global Interrupt */ + LTDC_ER_IRQn = 89, /*!< LTDC Error global Interrupt */ + DMA2D_IRQn = 90, /*!< DMA2D global Interrupt */ + OCTOSPI1_IRQn = 92, /*!< OCTOSPI1 global interrupt */ + LPTIM1_IRQn = 93, /*!< LP TIM1 interrupt */ + CEC_IRQn = 94, /*!< HDMI-CEC global Interrupt */ + I2C4_EV_IRQn = 95, /*!< I2C4 Event Interrupt */ + I2C4_ER_IRQn = 96, /*!< I2C4 Error Interrupt */ + SPDIF_RX_IRQn = 97, /*!< SPDIF-RX global Interrupt */ + DMAMUX1_OVR_IRQn = 102, /*! + +/** @addtogroup Peripheral_registers_structures + * @{ + */ + +/** + * @brief Analog to Digital Converter + */ + +typedef struct +{ + __IO uint32_t ISR; /*!< ADC Interrupt and Status Register, Address offset: 0x00 */ + __IO uint32_t IER; /*!< ADC Interrupt Enable Register, Address offset: 0x04 */ + __IO uint32_t CR; /*!< ADC control register, Address offset: 0x08 */ + __IO uint32_t CFGR; /*!< ADC Configuration register, Address offset: 0x0C */ + __IO uint32_t CFGR2; /*!< ADC Configuration register 2, Address offset: 0x10 */ + __IO uint32_t SMPR1; /*!< ADC sample time register 1, Address offset: 0x14 */ + __IO uint32_t SMPR2; /*!< ADC sample time register 2, Address offset: 0x18 */ + __IO uint32_t PCSEL_RES0; /*!< Rserved for ADC3, ADC1/2 pre-channel selection, Address offset: 0x1C */ + __IO uint32_t LTR1_TR1; /*!< ADC watchdog Lower threshold register 1, Address offset: 0x20 */ + __IO uint32_t HTR1_TR2; /*!< ADC watchdog higher threshold register 1, Address offset: 0x24 */ + __IO uint32_t RES1_TR3; /*!< Rserved for ADC1/2, ADC3 threshold register, Address offset: 0x28 */ + uint32_t RESERVED2; /*!< Reserved, 0x02C */ + __IO uint32_t SQR1; /*!< ADC regular sequence register 1, Address offset: 0x30 */ + __IO uint32_t SQR2; /*!< ADC regular sequence register 2, Address offset: 0x34 */ + __IO uint32_t SQR3; /*!< ADC regular sequence register 3, Address offset: 0x38 */ + __IO uint32_t SQR4; /*!< ADC regular sequence register 4, Address offset: 0x3C */ + __IO uint32_t DR; /*!< ADC regular data register, Address offset: 0x40 */ + uint32_t RESERVED3; /*!< Reserved, 0x044 */ + uint32_t RESERVED4; /*!< Reserved, 0x048 */ + __IO uint32_t JSQR; /*!< ADC injected sequence register, Address offset: 0x4C */ + uint32_t RESERVED5[4]; /*!< Reserved, 0x050 - 0x05C */ + __IO uint32_t OFR1; /*!< ADC offset register 1, Address offset: 0x60 */ + __IO uint32_t OFR2; /*!< ADC offset register 2, Address offset: 0x64 */ + __IO uint32_t OFR3; /*!< ADC offset register 3, Address offset: 0x68 */ + __IO uint32_t OFR4; /*!< ADC offset register 4, Address offset: 0x6C */ + uint32_t RESERVED6[4]; /*!< Reserved, 0x070 - 0x07C */ + __IO uint32_t JDR1; /*!< ADC injected data register 1, Address offset: 0x80 */ + __IO uint32_t JDR2; /*!< ADC injected data register 2, Address offset: 0x84 */ + __IO uint32_t JDR3; /*!< ADC injected data register 3, Address offset: 0x88 */ + __IO uint32_t JDR4; /*!< ADC injected data register 4, Address offset: 0x8C */ + uint32_t RESERVED7[4]; /*!< Reserved, 0x090 - 0x09C */ + __IO uint32_t AWD2CR; /*!< ADC Analog Watchdog 2 Configuration Register, Address offset: 0xA0 */ + __IO uint32_t AWD3CR; /*!< ADC Analog Watchdog 3 Configuration Register, Address offset: 0xA4 */ + uint32_t RESERVED8; /*!< Reserved, 0x0A8 */ + uint32_t RESERVED9; /*!< Reserved, 0x0AC */ + __IO uint32_t LTR2_DIFSEL; /*!< ADC watchdog Lower threshold register 2, Difsel for ADC3, Address offset: 0xB0 */ + __IO uint32_t HTR2_CALFACT; /*!< ADC watchdog Higher threshold register 2, Calfact for ADC3, Address offset: 0xB4 */ + __IO uint32_t LTR3_RES10; /*!< ADC watchdog Lower threshold register 3, specific ADC1/2, Address offset: 0xB8 */ + __IO uint32_t HTR3_RES11; /*!< ADC watchdog Higher threshold register 3, specific ADC1/2, Address offset: 0xBC */ + __IO uint32_t DIFSEL_RES12; /*!< ADC Differential Mode Selection Register specific ADC1/2, Address offset: 0xC0 */ + __IO uint32_t CALFACT_RES13; /*!< ADC Calibration Factors specific ADC1/2, Address offset: 0xC4 */ + __IO uint32_t CALFACT2_RES14; /*!< ADC Linearity Calibration Factors specific ADC1/2, Address offset: 0xC8 */ +} ADC_TypeDef; + + +typedef struct +{ +__IO uint32_t CSR; /*!< ADC Common status register, Address offset: ADC1/3 base address + 0x300 */ +uint32_t RESERVED; /*!< Reserved, ADC1/3 base address + 0x304 */ +__IO uint32_t CCR; /*!< ADC common control register, Address offset: ADC1/3 base address + 0x308 */ +__IO uint32_t CDR; /*!< ADC common regular data register for dual Address offset: ADC1/3 base address + 0x30C */ +__IO uint32_t CDR2; /*!< ADC common regular data register for 32-bit dual mode Address offset: ADC1/3 base address + 0x310 */ + +} ADC_Common_TypeDef; + + +/** + * @brief VREFBUF + */ + +typedef struct +{ + __IO uint32_t CSR; /*!< VREFBUF control and status register, Address offset: 0x00 */ + __IO uint32_t CCR; /*!< VREFBUF calibration and control register, Address offset: 0x04 */ +} VREFBUF_TypeDef; + + +/** + * @brief FD Controller Area Network + */ + +typedef struct +{ + __IO uint32_t CREL; /*!< FDCAN Core Release register, Address offset: 0x000 */ + __IO uint32_t ENDN; /*!< FDCAN Endian register, Address offset: 0x004 */ + __IO uint32_t RESERVED1; /*!< Reserved, 0x008 */ + __IO uint32_t DBTP; /*!< FDCAN Data Bit Timing & Prescaler register, Address offset: 0x00C */ + __IO uint32_t TEST; /*!< FDCAN Test register, Address offset: 0x010 */ + __IO uint32_t RWD; /*!< FDCAN RAM Watchdog register, Address offset: 0x014 */ + __IO uint32_t CCCR; /*!< FDCAN CC Control register, Address offset: 0x018 */ + __IO uint32_t NBTP; /*!< FDCAN Nominal Bit Timing & Prescaler register, Address offset: 0x01C */ + __IO uint32_t TSCC; /*!< FDCAN Timestamp Counter Configuration register, Address offset: 0x020 */ + __IO uint32_t TSCV; /*!< FDCAN Timestamp Counter Value register, Address offset: 0x024 */ + __IO uint32_t TOCC; /*!< FDCAN Timeout Counter Configuration register, Address offset: 0x028 */ + __IO uint32_t TOCV; /*!< FDCAN Timeout Counter Value register, Address offset: 0x02C */ + __IO uint32_t RESERVED2[4]; /*!< Reserved, 0x030 - 0x03C */ + __IO uint32_t ECR; /*!< FDCAN Error Counter register, Address offset: 0x040 */ + __IO uint32_t PSR; /*!< FDCAN Protocol Status register, Address offset: 0x044 */ + __IO uint32_t TDCR; /*!< FDCAN Transmitter Delay Compensation register, Address offset: 0x048 */ + __IO uint32_t RESERVED3; /*!< Reserved, 0x04C */ + __IO uint32_t IR; /*!< FDCAN Interrupt register, Address offset: 0x050 */ + __IO uint32_t IE; /*!< FDCAN Interrupt Enable register, Address offset: 0x054 */ + __IO uint32_t ILS; /*!< FDCAN Interrupt Line Select register, Address offset: 0x058 */ + __IO uint32_t ILE; /*!< FDCAN Interrupt Line Enable register, Address offset: 0x05C */ + __IO uint32_t RESERVED4[8]; /*!< Reserved, 0x060 - 0x07C */ + __IO uint32_t GFC; /*!< FDCAN Global Filter Configuration register, Address offset: 0x080 */ + __IO uint32_t SIDFC; /*!< FDCAN Standard ID Filter Configuration register, Address offset: 0x084 */ + __IO uint32_t XIDFC; /*!< FDCAN Extended ID Filter Configuration register, Address offset: 0x088 */ + __IO uint32_t RESERVED5; /*!< Reserved, 0x08C */ + __IO uint32_t XIDAM; /*!< FDCAN Extended ID AND Mask register, Address offset: 0x090 */ + __IO uint32_t HPMS; /*!< FDCAN High Priority Message Status register, Address offset: 0x094 */ + __IO uint32_t NDAT1; /*!< FDCAN New Data 1 register, Address offset: 0x098 */ + __IO uint32_t NDAT2; /*!< FDCAN New Data 2 register, Address offset: 0x09C */ + __IO uint32_t RXF0C; /*!< FDCAN Rx FIFO 0 Configuration register, Address offset: 0x0A0 */ + __IO uint32_t RXF0S; /*!< FDCAN Rx FIFO 0 Status register, Address offset: 0x0A4 */ + __IO uint32_t RXF0A; /*!< FDCAN Rx FIFO 0 Acknowledge register, Address offset: 0x0A8 */ + __IO uint32_t RXBC; /*!< FDCAN Rx Buffer Configuration register, Address offset: 0x0AC */ + __IO uint32_t RXF1C; /*!< FDCAN Rx FIFO 1 Configuration register, Address offset: 0x0B0 */ + __IO uint32_t RXF1S; /*!< FDCAN Rx FIFO 1 Status register, Address offset: 0x0B4 */ + __IO uint32_t RXF1A; /*!< FDCAN Rx FIFO 1 Acknowledge register, Address offset: 0x0B8 */ + __IO uint32_t RXESC; /*!< FDCAN Rx Buffer/FIFO Element Size Configuration register, Address offset: 0x0BC */ + __IO uint32_t TXBC; /*!< FDCAN Tx Buffer Configuration register, Address offset: 0x0C0 */ + __IO uint32_t TXFQS; /*!< FDCAN Tx FIFO/Queue Status register, Address offset: 0x0C4 */ + __IO uint32_t TXESC; /*!< FDCAN Tx Buffer Element Size Configuration register, Address offset: 0x0C8 */ + __IO uint32_t TXBRP; /*!< FDCAN Tx Buffer Request Pending register, Address offset: 0x0CC */ + __IO uint32_t TXBAR; /*!< FDCAN Tx Buffer Add Request register, Address offset: 0x0D0 */ + __IO uint32_t TXBCR; /*!< FDCAN Tx Buffer Cancellation Request register, Address offset: 0x0D4 */ + __IO uint32_t TXBTO; /*!< FDCAN Tx Buffer Transmission Occurred register, Address offset: 0x0D8 */ + __IO uint32_t TXBCF; /*!< FDCAN Tx Buffer Cancellation Finished register, Address offset: 0x0DC */ + __IO uint32_t TXBTIE; /*!< FDCAN Tx Buffer Transmission Interrupt Enable register, Address offset: 0x0E0 */ + __IO uint32_t TXBCIE; /*!< FDCAN Tx Buffer Cancellation Finished Interrupt Enable register, Address offset: 0x0E4 */ + __IO uint32_t RESERVED6[2]; /*!< Reserved, 0x0E8 - 0x0EC */ + __IO uint32_t TXEFC; /*!< FDCAN Tx Event FIFO Configuration register, Address offset: 0x0F0 */ + __IO uint32_t TXEFS; /*!< FDCAN Tx Event FIFO Status register, Address offset: 0x0F4 */ + __IO uint32_t TXEFA; /*!< FDCAN Tx Event FIFO Acknowledge register, Address offset: 0x0F8 */ + __IO uint32_t RESERVED7; /*!< Reserved, 0x0FC */ +} FDCAN_GlobalTypeDef; + +/** + * @brief TTFD Controller Area Network + */ + +typedef struct +{ + __IO uint32_t TTTMC; /*!< TT Trigger Memory Configuration register, Address offset: 0x100 */ + __IO uint32_t TTRMC; /*!< TT Reference Message Configuration register, Address offset: 0x104 */ + __IO uint32_t TTOCF; /*!< TT Operation Configuration register, Address offset: 0x108 */ + __IO uint32_t TTMLM; /*!< TT Matrix Limits register, Address offset: 0x10C */ + __IO uint32_t TURCF; /*!< TUR Configuration register, Address offset: 0x110 */ + __IO uint32_t TTOCN; /*!< TT Operation Control register, Address offset: 0x114 */ + __IO uint32_t TTGTP; /*!< TT Global Time Preset register, Address offset: 0x118 */ + __IO uint32_t TTTMK; /*!< TT Time Mark register, Address offset: 0x11C */ + __IO uint32_t TTIR; /*!< TT Interrupt register, Address offset: 0x120 */ + __IO uint32_t TTIE; /*!< TT Interrupt Enable register, Address offset: 0x124 */ + __IO uint32_t TTILS; /*!< TT Interrupt Line Select register, Address offset: 0x128 */ + __IO uint32_t TTOST; /*!< TT Operation Status register, Address offset: 0x12C */ + __IO uint32_t TURNA; /*!< TT TUR Numerator Actual register, Address offset: 0x130 */ + __IO uint32_t TTLGT; /*!< TT Local and Global Time register, Address offset: 0x134 */ + __IO uint32_t TTCTC; /*!< TT Cycle Time and Count register, Address offset: 0x138 */ + __IO uint32_t TTCPT; /*!< TT Capture Time register, Address offset: 0x13C */ + __IO uint32_t TTCSM; /*!< TT Cycle Sync Mark register, Address offset: 0x140 */ + __IO uint32_t RESERVED1[111]; /*!< Reserved, 0x144 - 0x2FC */ + __IO uint32_t TTTS; /*!< TT Trigger Select register, Address offset: 0x300 */ +} TTCAN_TypeDef; + +/** + * @brief FD Controller Area Network + */ + +typedef struct +{ + __IO uint32_t CREL; /*!< Clock Calibration Unit Core Release register, Address offset: 0x00 */ + __IO uint32_t CCFG; /*!< Calibration Configuration register, Address offset: 0x04 */ + __IO uint32_t CSTAT; /*!< Calibration Status register, Address offset: 0x08 */ + __IO uint32_t CWD; /*!< Calibration Watchdog register, Address offset: 0x0C */ + __IO uint32_t IR; /*!< CCU Interrupt register, Address offset: 0x10 */ + __IO uint32_t IE; /*!< CCU Interrupt Enable register, Address offset: 0x14 */ +} FDCAN_ClockCalibrationUnit_TypeDef; + + +/** + * @brief Consumer Electronics Control + */ + +typedef struct +{ + __IO uint32_t CR; /*!< CEC control register, Address offset:0x00 */ + __IO uint32_t CFGR; /*!< CEC configuration register, Address offset:0x04 */ + __IO uint32_t TXDR; /*!< CEC Tx data register , Address offset:0x08 */ + __IO uint32_t RXDR; /*!< CEC Rx Data Register, Address offset:0x0C */ + __IO uint32_t ISR; /*!< CEC Interrupt and Status Register, Address offset:0x10 */ + __IO uint32_t IER; /*!< CEC interrupt enable register, Address offset:0x14 */ +}CEC_TypeDef; + +/** + * @brief COordincate Rotation DIgital Computer + */ +typedef struct +{ + __IO uint32_t CSR; /*!< CORDIC control and status register, Address offset: 0x00 */ + __IO uint32_t WDATA; /*!< CORDIC argument register, Address offset: 0x04 */ + __IO uint32_t RDATA; /*!< CORDIC result register, Address offset: 0x08 */ +} CORDIC_TypeDef; + +/** + * @brief CRC calculation unit + */ + +typedef struct +{ + __IO uint32_t DR; /*!< CRC Data register, Address offset: 0x00 */ + __IO uint32_t IDR; /*!< CRC Independent data register, Address offset: 0x04 */ + __IO uint32_t CR; /*!< CRC Control register, Address offset: 0x08 */ + uint32_t RESERVED2; /*!< Reserved, 0x0C */ + __IO uint32_t INIT; /*!< Initial CRC value register, Address offset: 0x10 */ + __IO uint32_t POL; /*!< CRC polynomial register, Address offset: 0x14 */ +} CRC_TypeDef; + + +/** + * @brief Clock Recovery System + */ +typedef struct +{ +__IO uint32_t CR; /*!< CRS ccontrol register, Address offset: 0x00 */ +__IO uint32_t CFGR; /*!< CRS configuration register, Address offset: 0x04 */ +__IO uint32_t ISR; /*!< CRS interrupt and status register, Address offset: 0x08 */ +__IO uint32_t ICR; /*!< CRS interrupt flag clear register, Address offset: 0x0C */ +} CRS_TypeDef; + + +/** + * @brief Digital to Analog Converter + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DAC control register, Address offset: 0x00 */ + __IO uint32_t SWTRIGR; /*!< DAC software trigger register, Address offset: 0x04 */ + __IO uint32_t DHR12R1; /*!< DAC channel1 12-bit right-aligned data holding register, Address offset: 0x08 */ + __IO uint32_t DHR12L1; /*!< DAC channel1 12-bit left aligned data holding register, Address offset: 0x0C */ + __IO uint32_t DHR8R1; /*!< DAC channel1 8-bit right aligned data holding register, Address offset: 0x10 */ + __IO uint32_t DHR12R2; /*!< DAC channel2 12-bit right aligned data holding register, Address offset: 0x14 */ + __IO uint32_t DHR12L2; /*!< DAC channel2 12-bit left aligned data holding register, Address offset: 0x18 */ + __IO uint32_t DHR8R2; /*!< DAC channel2 8-bit right-aligned data holding register, Address offset: 0x1C */ + __IO uint32_t DHR12RD; /*!< Dual DAC 12-bit right-aligned data holding register, Address offset: 0x20 */ + __IO uint32_t DHR12LD; /*!< DUAL DAC 12-bit left aligned data holding register, Address offset: 0x24 */ + __IO uint32_t DHR8RD; /*!< DUAL DAC 8-bit right aligned data holding register, Address offset: 0x28 */ + __IO uint32_t DOR1; /*!< DAC channel1 data output register, Address offset: 0x2C */ + __IO uint32_t DOR2; /*!< DAC channel2 data output register, Address offset: 0x30 */ + __IO uint32_t SR; /*!< DAC status register, Address offset: 0x34 */ + __IO uint32_t CCR; /*!< DAC calibration control register, Address offset: 0x38 */ + __IO uint32_t MCR; /*!< DAC mode control register, Address offset: 0x3C */ + __IO uint32_t SHSR1; /*!< DAC Sample and Hold sample time register 1, Address offset: 0x40 */ + __IO uint32_t SHSR2; /*!< DAC Sample and Hold sample time register 2, Address offset: 0x44 */ + __IO uint32_t SHHR; /*!< DAC Sample and Hold hold time register, Address offset: 0x48 */ + __IO uint32_t SHRR; /*!< DAC Sample and Hold refresh time register, Address offset: 0x4C */ +} DAC_TypeDef; + +/** + * @brief DFSDM module registers + */ +typedef struct +{ + __IO uint32_t FLTCR1; /*!< DFSDM control register1, Address offset: 0x100 */ + __IO uint32_t FLTCR2; /*!< DFSDM control register2, Address offset: 0x104 */ + __IO uint32_t FLTISR; /*!< DFSDM interrupt and status register, Address offset: 0x108 */ + __IO uint32_t FLTICR; /*!< DFSDM interrupt flag clear register, Address offset: 0x10C */ + __IO uint32_t FLTJCHGR; /*!< DFSDM injected channel group selection register, Address offset: 0x110 */ + __IO uint32_t FLTFCR; /*!< DFSDM filter control register, Address offset: 0x114 */ + __IO uint32_t FLTJDATAR; /*!< DFSDM data register for injected group, Address offset: 0x118 */ + __IO uint32_t FLTRDATAR; /*!< DFSDM data register for regular group, Address offset: 0x11C */ + __IO uint32_t FLTAWHTR; /*!< DFSDM analog watchdog high threshold register, Address offset: 0x120 */ + __IO uint32_t FLTAWLTR; /*!< DFSDM analog watchdog low threshold register, Address offset: 0x124 */ + __IO uint32_t FLTAWSR; /*!< DFSDM analog watchdog status register Address offset: 0x128 */ + __IO uint32_t FLTAWCFR; /*!< DFSDM analog watchdog clear flag register Address offset: 0x12C */ + __IO uint32_t FLTEXMAX; /*!< DFSDM extreme detector maximum register, Address offset: 0x130 */ + __IO uint32_t FLTEXMIN; /*!< DFSDM extreme detector minimum register Address offset: 0x134 */ + __IO uint32_t FLTCNVTIMR; /*!< DFSDM conversion timer, Address offset: 0x138 */ +} DFSDM_Filter_TypeDef; + +/** + * @brief DFSDM channel configuration registers + */ +typedef struct +{ + __IO uint32_t CHCFGR1; /*!< DFSDM channel configuration register1, Address offset: 0x00 */ + __IO uint32_t CHCFGR2; /*!< DFSDM channel configuration register2, Address offset: 0x04 */ + __IO uint32_t CHAWSCDR; /*!< DFSDM channel analog watchdog and + short circuit detector register, Address offset: 0x08 */ + __IO uint32_t CHWDATAR; /*!< DFSDM channel watchdog filter data register, Address offset: 0x0C */ + __IO uint32_t CHDATINR; /*!< DFSDM channel data input register, Address offset: 0x10 */ +} DFSDM_Channel_TypeDef; + +/** + * @brief Debug MCU + */ +typedef struct +{ + __IO uint32_t IDCODE; /*!< MCU device ID code, Address offset: 0x00 */ + __IO uint32_t CR; /*!< Debug MCU configuration register, Address offset: 0x04 */ + uint32_t RESERVED4[11]; /*!< Reserved, Address offset: 0x08 */ + __IO uint32_t APB3FZ1; /*!< Debug MCU APB3FZ1 freeze register, Address offset: 0x34 */ + uint32_t RESERVED5; /*!< Reserved, Address offset: 0x38 */ + __IO uint32_t APB1LFZ1; /*!< Debug MCU APB1LFZ1 freeze register, Address offset: 0x3C */ + uint32_t RESERVED6; /*!< Reserved, Address offset: 0x40 */ + __IO uint32_t APB1HFZ1; /*!< Debug MCU APB1LFZ1 freeze register, Address offset: 0x44 */ + uint32_t RESERVED7; /*!< Reserved, Address offset: 0x48 */ + __IO uint32_t APB2FZ1; /*!< Debug MCU APB2FZ1 freeze register, Address offset: 0x4C */ + uint32_t RESERVED8; /*!< Reserved, Address offset: 0x50 */ + __IO uint32_t APB4FZ1; /*!< Debug MCU APB4FZ1 freeze register, Address offset: 0x54 */ + __IO uint32_t RESERVED9[990]; /*!< Reserved, Address offset: 0x58-0xFCC */ + __IO uint32_t PIDR4; /*!< Debug MCU peripheral identity register 4, Address offset: 0xFD0 */ + __IO uint32_t RESERVED10[3];/*!< Reserved, Address offset: 0xFD4-0xFDC */ + __IO uint32_t PIDR0; /*!< Debug MCU peripheral identity register 0, Address offset: 0xFE0 */ + __IO uint32_t PIDR1; /*!< Debug MCU peripheral identity register 1, Address offset: 0xFE4 */ + __IO uint32_t PIDR2; /*!< Debug MCU peripheral identity register 2, Address offset: 0xFE8 */ + __IO uint32_t PIDR3; /*!< Debug MCU peripheral identity register 3, Address offset: 0xFEC */ + __IO uint32_t CIDR0; /*!< Debug MCU component identity register 0, Address offset: 0xFF0 */ + __IO uint32_t CIDR1; /*!< Debug MCU component identity register 1, Address offset: 0xFF4 */ + __IO uint32_t CIDR2; /*!< Debug MCU component identity register 2, Address offset: 0xFF8 */ + __IO uint32_t CIDR3; /*!< Debug MCU component identity register 3, Address offset: 0xFFC */ +}DBGMCU_TypeDef; +/** + * @brief DCMI + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DCMI control register 1, Address offset: 0x00 */ + __IO uint32_t SR; /*!< DCMI status register, Address offset: 0x04 */ + __IO uint32_t RISR; /*!< DCMI raw interrupt status register, Address offset: 0x08 */ + __IO uint32_t IER; /*!< DCMI interrupt enable register, Address offset: 0x0C */ + __IO uint32_t MISR; /*!< DCMI masked interrupt status register, Address offset: 0x10 */ + __IO uint32_t ICR; /*!< DCMI interrupt clear register, Address offset: 0x14 */ + __IO uint32_t ESCR; /*!< DCMI embedded synchronization code register, Address offset: 0x18 */ + __IO uint32_t ESUR; /*!< DCMI embedded synchronization unmask register, Address offset: 0x1C */ + __IO uint32_t CWSTRTR; /*!< DCMI crop window start, Address offset: 0x20 */ + __IO uint32_t CWSIZER; /*!< DCMI crop window size, Address offset: 0x24 */ + __IO uint32_t DR; /*!< DCMI data register, Address offset: 0x28 */ +} DCMI_TypeDef; + +/** + * @brief PSSI + */ + +typedef struct +{ + __IO uint32_t CR; /*!< PSSI control register 1, Address offset: 0x000 */ + __IO uint32_t SR; /*!< PSSI status register, Address offset: 0x004 */ + __IO uint32_t RIS; /*!< PSSI raw interrupt status register, Address offset: 0x008 */ + __IO uint32_t IER; /*!< PSSI interrupt enable register, Address offset: 0x00C */ + __IO uint32_t MIS; /*!< PSSI masked interrupt status register, Address offset: 0x010 */ + __IO uint32_t ICR; /*!< PSSI interrupt clear register, Address offset: 0x014 */ + __IO uint32_t RESERVED1[4]; /*!< Reserved, 0x018 - 0x024 */ + __IO uint32_t DR; /*!< PSSI data register, Address offset: 0x028 */ + __IO uint32_t RESERVED2[241]; /*!< Reserved, 0x02C - 0x3EC */ + __IO uint32_t HWCFGR; /*!< PSSI IP HW configuration register, Address offset: 0x3F0 */ + __IO uint32_t VERR; /*!< PSSI IP version register, Address offset: 0x3F4 */ + __IO uint32_t IPIDR; /*!< PSSI IP ID register, Address offset: 0x3F8 */ + __IO uint32_t SIDR; /*!< PSSI SIZE ID register, Address offset: 0x3FC */ +} PSSI_TypeDef; + +/** + * @brief DMA Controller + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DMA stream x configuration register */ + __IO uint32_t NDTR; /*!< DMA stream x number of data register */ + __IO uint32_t PAR; /*!< DMA stream x peripheral address register */ + __IO uint32_t M0AR; /*!< DMA stream x memory 0 address register */ + __IO uint32_t M1AR; /*!< DMA stream x memory 1 address register */ + __IO uint32_t FCR; /*!< DMA stream x FIFO control register */ +} DMA_Stream_TypeDef; + +typedef struct +{ + __IO uint32_t LISR; /*!< DMA low interrupt status register, Address offset: 0x00 */ + __IO uint32_t HISR; /*!< DMA high interrupt status register, Address offset: 0x04 */ + __IO uint32_t LIFCR; /*!< DMA low interrupt flag clear register, Address offset: 0x08 */ + __IO uint32_t HIFCR; /*!< DMA high interrupt flag clear register, Address offset: 0x0C */ +} DMA_TypeDef; + +typedef struct +{ + __IO uint32_t CCR; /*!< DMA channel x configuration register */ + __IO uint32_t CNDTR; /*!< DMA channel x number of data register */ + __IO uint32_t CPAR; /*!< DMA channel x peripheral address register */ + __IO uint32_t CM0AR; /*!< DMA channel x memory 0 address register */ + __IO uint32_t CM1AR; /*!< DMA channel x memory 1 address register */ +} BDMA_Channel_TypeDef; + +typedef struct +{ + __IO uint32_t ISR; /*!< DMA interrupt status register, Address offset: 0x00 */ + __IO uint32_t IFCR; /*!< DMA interrupt flag clear register, Address offset: 0x04 */ +} BDMA_TypeDef; + +typedef struct +{ + __IO uint32_t CCR; /*!< DMA Multiplexer Channel x Control Register */ +}DMAMUX_Channel_TypeDef; + +typedef struct +{ + __IO uint32_t CSR; /*!< DMA Channel Status Register */ + __IO uint32_t CFR; /*!< DMA Channel Clear Flag Register */ +}DMAMUX_ChannelStatus_TypeDef; + +typedef struct +{ + __IO uint32_t RGCR; /*!< DMA Request Generator x Control Register */ +}DMAMUX_RequestGen_TypeDef; + +typedef struct +{ + __IO uint32_t RGSR; /*!< DMA Request Generator Status Register */ + __IO uint32_t RGCFR; /*!< DMA Request Generator Clear Flag Register */ +}DMAMUX_RequestGenStatus_TypeDef; + +/** + * @brief MDMA Controller + */ +typedef struct +{ + __IO uint32_t GISR0; /*!< MDMA Global Interrupt/Status Register 0, Address offset: 0x00 */ +}MDMA_TypeDef; + +typedef struct +{ + __IO uint32_t CISR; /*!< MDMA channel x interrupt/status register, Address offset: 0x40 */ + __IO uint32_t CIFCR; /*!< MDMA channel x interrupt flag clear register, Address offset: 0x44 */ + __IO uint32_t CESR; /*!< MDMA Channel x error status register, Address offset: 0x48 */ + __IO uint32_t CCR; /*!< MDMA channel x control register, Address offset: 0x4C */ + __IO uint32_t CTCR; /*!< MDMA channel x Transfer Configuration register, Address offset: 0x50 */ + __IO uint32_t CBNDTR; /*!< MDMA Channel x block number of data register, Address offset: 0x54 */ + __IO uint32_t CSAR; /*!< MDMA channel x source address register, Address offset: 0x58 */ + __IO uint32_t CDAR; /*!< MDMA channel x destination address register, Address offset: 0x5C */ + __IO uint32_t CBRUR; /*!< MDMA channel x Block Repeat address Update register, Address offset: 0x60 */ + __IO uint32_t CLAR; /*!< MDMA channel x Link Address register, Address offset: 0x64 */ + __IO uint32_t CTBR; /*!< MDMA channel x Trigger and Bus selection Register, Address offset: 0x68 */ + uint32_t RESERVED0; /*!< Reserved, 0x68 */ + __IO uint32_t CMAR; /*!< MDMA channel x Mask address register, Address offset: 0x70 */ + __IO uint32_t CMDR; /*!< MDMA channel x Mask Data register, Address offset: 0x74 */ +}MDMA_Channel_TypeDef; + +/** + * @brief DMA2D Controller + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DMA2D Control Register, Address offset: 0x00 */ + __IO uint32_t ISR; /*!< DMA2D Interrupt Status Register, Address offset: 0x04 */ + __IO uint32_t IFCR; /*!< DMA2D Interrupt Flag Clear Register, Address offset: 0x08 */ + __IO uint32_t FGMAR; /*!< DMA2D Foreground Memory Address Register, Address offset: 0x0C */ + __IO uint32_t FGOR; /*!< DMA2D Foreground Offset Register, Address offset: 0x10 */ + __IO uint32_t BGMAR; /*!< DMA2D Background Memory Address Register, Address offset: 0x14 */ + __IO uint32_t BGOR; /*!< DMA2D Background Offset Register, Address offset: 0x18 */ + __IO uint32_t FGPFCCR; /*!< DMA2D Foreground PFC Control Register, Address offset: 0x1C */ + __IO uint32_t FGCOLR; /*!< DMA2D Foreground Color Register, Address offset: 0x20 */ + __IO uint32_t BGPFCCR; /*!< DMA2D Background PFC Control Register, Address offset: 0x24 */ + __IO uint32_t BGCOLR; /*!< DMA2D Background Color Register, Address offset: 0x28 */ + __IO uint32_t FGCMAR; /*!< DMA2D Foreground CLUT Memory Address Register, Address offset: 0x2C */ + __IO uint32_t BGCMAR; /*!< DMA2D Background CLUT Memory Address Register, Address offset: 0x30 */ + __IO uint32_t OPFCCR; /*!< DMA2D Output PFC Control Register, Address offset: 0x34 */ + __IO uint32_t OCOLR; /*!< DMA2D Output Color Register, Address offset: 0x38 */ + __IO uint32_t OMAR; /*!< DMA2D Output Memory Address Register, Address offset: 0x3C */ + __IO uint32_t OOR; /*!< DMA2D Output Offset Register, Address offset: 0x40 */ + __IO uint32_t NLR; /*!< DMA2D Number of Line Register, Address offset: 0x44 */ + __IO uint32_t LWR; /*!< DMA2D Line Watermark Register, Address offset: 0x48 */ + __IO uint32_t AMTCR; /*!< DMA2D AHB Master Timer Configuration Register, Address offset: 0x4C */ + uint32_t RESERVED[236]; /*!< Reserved, 0x50-0x3FF */ + __IO uint32_t FGCLUT[256]; /*!< DMA2D Foreground CLUT, Address offset:400-7FF */ + __IO uint32_t BGCLUT[256]; /*!< DMA2D Background CLUT, Address offset:800-BFF */ +} DMA2D_TypeDef; + + +/** + * @brief Ethernet MAC + */ +typedef struct +{ + __IO uint32_t MACCR; + __IO uint32_t MACECR; + __IO uint32_t MACPFR; + __IO uint32_t MACWTR; + __IO uint32_t MACHT0R; + __IO uint32_t MACHT1R; + uint32_t RESERVED1[14]; + __IO uint32_t MACVTR; + uint32_t RESERVED2; + __IO uint32_t MACVHTR; + uint32_t RESERVED3; + __IO uint32_t MACVIR; + __IO uint32_t MACIVIR; + uint32_t RESERVED4[2]; + __IO uint32_t MACTFCR; + uint32_t RESERVED5[7]; + __IO uint32_t MACRFCR; + uint32_t RESERVED6[7]; + __IO uint32_t MACISR; + __IO uint32_t MACIER; + __IO uint32_t MACRXTXSR; + uint32_t RESERVED7; + __IO uint32_t MACPCSR; + __IO uint32_t MACRWKPFR; + uint32_t RESERVED8[2]; + __IO uint32_t MACLCSR; + __IO uint32_t MACLTCR; + __IO uint32_t MACLETR; + __IO uint32_t MAC1USTCR; + uint32_t RESERVED9[12]; + __IO uint32_t MACVR; + __IO uint32_t MACDR; + uint32_t RESERVED10; + __IO uint32_t MACHWF0R; + __IO uint32_t MACHWF1R; + __IO uint32_t MACHWF2R; + uint32_t RESERVED11[54]; + __IO uint32_t MACMDIOAR; + __IO uint32_t MACMDIODR; + uint32_t RESERVED12[2]; + __IO uint32_t MACARPAR; + uint32_t RESERVED13[59]; + __IO uint32_t MACA0HR; + __IO uint32_t MACA0LR; + __IO uint32_t MACA1HR; + __IO uint32_t MACA1LR; + __IO uint32_t MACA2HR; + __IO uint32_t MACA2LR; + __IO uint32_t MACA3HR; + __IO uint32_t MACA3LR; + uint32_t RESERVED14[248]; + __IO uint32_t MMCCR; + __IO uint32_t MMCRIR; + __IO uint32_t MMCTIR; + __IO uint32_t MMCRIMR; + __IO uint32_t MMCTIMR; + uint32_t RESERVED15[14]; + __IO uint32_t MMCTSCGPR; + __IO uint32_t MMCTMCGPR; + uint32_t RESERVED16[5]; + __IO uint32_t MMCTPCGR; + uint32_t RESERVED17[10]; + __IO uint32_t MMCRCRCEPR; + __IO uint32_t MMCRAEPR; + uint32_t RESERVED18[10]; + __IO uint32_t MMCRUPGR; + uint32_t RESERVED19[9]; + __IO uint32_t MMCTLPIMSTR; + __IO uint32_t MMCTLPITCR; + __IO uint32_t MMCRLPIMSTR; + __IO uint32_t MMCRLPITCR; + uint32_t RESERVED20[65]; + __IO uint32_t MACL3L4C0R; + __IO uint32_t MACL4A0R; + uint32_t RESERVED21[2]; + __IO uint32_t MACL3A0R0R; + __IO uint32_t MACL3A1R0R; + __IO uint32_t MACL3A2R0R; + __IO uint32_t MACL3A3R0R; + uint32_t RESERVED22[4]; + __IO uint32_t MACL3L4C1R; + __IO uint32_t MACL4A1R; + uint32_t RESERVED23[2]; + __IO uint32_t MACL3A0R1R; + __IO uint32_t MACL3A1R1R; + __IO uint32_t MACL3A2R1R; + __IO uint32_t MACL3A3R1R; + uint32_t RESERVED24[108]; + __IO uint32_t MACTSCR; + __IO uint32_t MACSSIR; + __IO uint32_t MACSTSR; + __IO uint32_t MACSTNR; + __IO uint32_t MACSTSUR; + __IO uint32_t MACSTNUR; + __IO uint32_t MACTSAR; + uint32_t RESERVED25; + __IO uint32_t MACTSSR; + uint32_t RESERVED26[3]; + __IO uint32_t MACTTSSNR; + __IO uint32_t MACTTSSSR; + uint32_t RESERVED27[2]; + __IO uint32_t MACACR; + uint32_t RESERVED28; + __IO uint32_t MACATSNR; + __IO uint32_t MACATSSR; + __IO uint32_t MACTSIACR; + __IO uint32_t MACTSEACR; + __IO uint32_t MACTSICNR; + __IO uint32_t MACTSECNR; + uint32_t RESERVED29[4]; + __IO uint32_t MACPPSCR; + uint32_t RESERVED30[3]; + __IO uint32_t MACPPSTTSR; + __IO uint32_t MACPPSTTNR; + __IO uint32_t MACPPSIR; + __IO uint32_t MACPPSWR; + uint32_t RESERVED31[12]; + __IO uint32_t MACPOCR; + __IO uint32_t MACSPI0R; + __IO uint32_t MACSPI1R; + __IO uint32_t MACSPI2R; + __IO uint32_t MACLMIR; + uint32_t RESERVED32[11]; + __IO uint32_t MTLOMR; + uint32_t RESERVED33[7]; + __IO uint32_t MTLISR; + uint32_t RESERVED34[55]; + __IO uint32_t MTLTQOMR; + __IO uint32_t MTLTQUR; + __IO uint32_t MTLTQDR; + uint32_t RESERVED35[8]; + __IO uint32_t MTLQICSR; + __IO uint32_t MTLRQOMR; + __IO uint32_t MTLRQMPOCR; + __IO uint32_t MTLRQDR; + uint32_t RESERVED36[177]; + __IO uint32_t DMAMR; + __IO uint32_t DMASBMR; + __IO uint32_t DMAISR; + __IO uint32_t DMADSR; + uint32_t RESERVED37[60]; + __IO uint32_t DMACCR; + __IO uint32_t DMACTCR; + __IO uint32_t DMACRCR; + uint32_t RESERVED38[2]; + __IO uint32_t DMACTDLAR; + uint32_t RESERVED39; + __IO uint32_t DMACRDLAR; + __IO uint32_t DMACTDTPR; + uint32_t RESERVED40; + __IO uint32_t DMACRDTPR; + __IO uint32_t DMACTDRLR; + __IO uint32_t DMACRDRLR; + __IO uint32_t DMACIER; + __IO uint32_t DMACRIWTR; +__IO uint32_t DMACSFCSR; + uint32_t RESERVED41; + __IO uint32_t DMACCATDR; + uint32_t RESERVED42; + __IO uint32_t DMACCARDR; + uint32_t RESERVED43; + __IO uint32_t DMACCATBR; + uint32_t RESERVED44; + __IO uint32_t DMACCARBR; + __IO uint32_t DMACSR; +uint32_t RESERVED45[2]; +__IO uint32_t DMACMFCR; +}ETH_TypeDef; +/** + * @brief External Interrupt/Event Controller + */ + +typedef struct +{ +__IO uint32_t RTSR1; /*!< EXTI Rising trigger selection register, Address offset: 0x00 */ +__IO uint32_t FTSR1; /*!< EXTI Falling trigger selection register, Address offset: 0x04 */ +__IO uint32_t SWIER1; /*!< EXTI Software interrupt event register, Address offset: 0x08 */ +__IO uint32_t D3PMR1; /*!< EXTI D3 Pending mask register, (same register as to SRDPMR1) Address offset: 0x0C */ +__IO uint32_t D3PCR1L; /*!< EXTI D3 Pending clear selection register low, (same register as to SRDPCR1L) Address offset: 0x10 */ +__IO uint32_t D3PCR1H; /*!< EXTI D3 Pending clear selection register High, (same register as to SRDPCR1H) Address offset: 0x14 */ +uint32_t RESERVED1[2]; /*!< Reserved, 0x18 to 0x1C */ +__IO uint32_t RTSR2; /*!< EXTI Rising trigger selection register, Address offset: 0x20 */ +__IO uint32_t FTSR2; /*!< EXTI Falling trigger selection register, Address offset: 0x24 */ +__IO uint32_t SWIER2; /*!< EXTI Software interrupt event register, Address offset: 0x28 */ +__IO uint32_t D3PMR2; /*!< EXTI D3 Pending mask register, (same register as to SRDPMR2) Address offset: 0x2C */ +__IO uint32_t D3PCR2L; /*!< EXTI D3 Pending clear selection register low, (same register as to SRDPCR2L) Address offset: 0x30 */ +__IO uint32_t D3PCR2H; /*!< EXTI D3 Pending clear selection register High, (same register as to SRDPCR2H) Address offset: 0x34 */ +uint32_t RESERVED2[2]; /*!< Reserved, 0x38 to 0x3C */ +__IO uint32_t RTSR3; /*!< EXTI Rising trigger selection register, Address offset: 0x40 */ +__IO uint32_t FTSR3; /*!< EXTI Falling trigger selection register, Address offset: 0x44 */ +__IO uint32_t SWIER3; /*!< EXTI Software interrupt event register, Address offset: 0x48 */ +__IO uint32_t D3PMR3; /*!< EXTI D3 Pending mask register, (same register as to SRDPMR3) Address offset: 0x4C */ +__IO uint32_t D3PCR3L; /*!< EXTI D3 Pending clear selection register low, (same register as to SRDPCR3L) Address offset: 0x50 */ +__IO uint32_t D3PCR3H; /*!< EXTI D3 Pending clear selection register High, (same register as to SRDPCR3H) Address offset: 0x54 */ +uint32_t RESERVED3[10]; /*!< Reserved, 0x58 to 0x7C */ +__IO uint32_t IMR1; /*!< EXTI Interrupt mask register, Address offset: 0x80 */ +__IO uint32_t EMR1; /*!< EXTI Event mask register, Address offset: 0x84 */ +__IO uint32_t PR1; /*!< EXTI Pending register, Address offset: 0x88 */ +uint32_t RESERVED4; /*!< Reserved, 0x8C */ +__IO uint32_t IMR2; /*!< EXTI Interrupt mask register, Address offset: 0x90 */ +__IO uint32_t EMR2; /*!< EXTI Event mask register, Address offset: 0x94 */ +__IO uint32_t PR2; /*!< EXTI Pending register, Address offset: 0x98 */ +uint32_t RESERVED5; /*!< Reserved, 0x9C */ +__IO uint32_t IMR3; /*!< EXTI Interrupt mask register, Address offset: 0xA0 */ +__IO uint32_t EMR3; /*!< EXTI Event mask register, Address offset: 0xA4 */ +__IO uint32_t PR3; /*!< EXTI Pending register, Address offset: 0xA8 */ +}EXTI_TypeDef; + +typedef struct +{ +__IO uint32_t IMR1; /*!< EXTI Interrupt mask register, Address offset: 0x00 */ +__IO uint32_t EMR1; /*!< EXTI Event mask register, Address offset: 0x04 */ +__IO uint32_t PR1; /*!< EXTI Pending register, Address offset: 0x08 */ +uint32_t RESERVED1; /*!< Reserved, 0x0C */ +__IO uint32_t IMR2; /*!< EXTI Interrupt mask register, Address offset: 0x10 */ +__IO uint32_t EMR2; /*!< EXTI Event mask register, Address offset: 0x14 */ +__IO uint32_t PR2; /*!< EXTI Pending register, Address offset: 0x18 */ +uint32_t RESERVED2; /*!< Reserved, 0x1C */ +__IO uint32_t IMR3; /*!< EXTI Interrupt mask register, Address offset: 0x20 */ +__IO uint32_t EMR3; /*!< EXTI Event mask register, Address offset: 0x24 */ +__IO uint32_t PR3; /*!< EXTI Pending register, Address offset: 0x28 */ +}EXTI_Core_TypeDef; + + +/** + * @brief FLASH Registers + */ + +typedef struct +{ + __IO uint32_t ACR; /*!< FLASH access control register, Address offset: 0x00 */ + __IO uint32_t KEYR1; /*!< Flash Key Register for bank1, Address offset: 0x04 */ + __IO uint32_t OPTKEYR; /*!< Flash Option Key Register, Address offset: 0x08 */ + __IO uint32_t CR1; /*!< Flash Control Register for bank1, Address offset: 0x0C */ + __IO uint32_t SR1; /*!< Flash Status Register for bank1, Address offset: 0x10 */ + __IO uint32_t CCR1; /*!< Flash Control Register for bank1, Address offset: 0x14 */ + __IO uint32_t OPTCR; /*!< Flash Option Control Register, Address offset: 0x18 */ + __IO uint32_t OPTSR_CUR; /*!< Flash Option Status Current Register, Address offset: 0x1C */ + __IO uint32_t OPTSR_PRG; /*!< Flash Option Status to Program Register, Address offset: 0x20 */ + __IO uint32_t OPTCCR; /*!< Flash Option Clear Control Register, Address offset: 0x24 */ + __IO uint32_t PRAR_CUR1; /*!< Flash Current Protection Address Register for bank1, Address offset: 0x28 */ + __IO uint32_t PRAR_PRG1; /*!< Flash Protection Address to Program Register for bank1, Address offset: 0x2C */ + __IO uint32_t SCAR_CUR1; /*!< Flash Current Secure Address Register for bank1, Address offset: 0x30 */ + __IO uint32_t SCAR_PRG1; /*!< Flash Secure Address to Program Register for bank1, Address offset: 0x34 */ + __IO uint32_t WPSN_CUR1; /*!< Flash Current Write Protection Register on bank1, Address offset: 0x38 */ + __IO uint32_t WPSN_PRG1; /*!< Flash Write Protection to Program Register on bank1, Address offset: 0x3C */ + __IO uint32_t BOOT_CUR; /*!< Flash Current Boot Address for Pelican Core Register, Address offset: 0x40 */ + __IO uint32_t BOOT_PRG; /*!< Flash Boot Address to Program for Pelican Core Register, Address offset: 0x44 */ + uint32_t RESERVED0[2]; /*!< Reserved, 0x48 to 0x4C */ + __IO uint32_t CRCCR1; /*!< Flash CRC Control register For Bank1 Register , Address offset: 0x50 */ + __IO uint32_t CRCSADD1; /*!< Flash CRC Start Address Register for Bank1 , Address offset: 0x54 */ + __IO uint32_t CRCEADD1; /*!< Flash CRC End Address Register for Bank1 , Address offset: 0x58 */ + __IO uint32_t CRCDATA; /*!< Flash CRC Data Register for Bank1 , Address offset: 0x5C */ + __IO uint32_t ECC_FA1; /*!< Flash ECC Fail Address For Bank1 Register , Address offset: 0x60 */ + uint32_t RESERVED[3]; /*!< Reserved, 0x64 to 0x6C */ + __IO uint32_t OPTSR2_CUR; /*!< Flash Option Status Current Register 2, Address offset: 0x70 */ + __IO uint32_t OPTSR2_PRG; /*!< Flash Option Status to Program Register 2, Address offset: 0x74 */ +} FLASH_TypeDef; + +/** + * @brief Filter and Mathematical ACcelerator + */ +typedef struct +{ + __IO uint32_t X1BUFCFG; /*!< FMAC X1 Buffer Configuration register, Address offset: 0x00 */ + __IO uint32_t X2BUFCFG; /*!< FMAC X2 Buffer Configuration register, Address offset: 0x04 */ + __IO uint32_t YBUFCFG; /*!< FMAC Y Buffer Configuration register, Address offset: 0x08 */ + __IO uint32_t PARAM; /*!< FMAC Parameter register, Address offset: 0x0C */ + __IO uint32_t CR; /*!< FMAC Control register, Address offset: 0x10 */ + __IO uint32_t SR; /*!< FMAC Status register, Address offset: 0x14 */ + __IO uint32_t WDATA; /*!< FMAC Write Data register, Address offset: 0x18 */ + __IO uint32_t RDATA; /*!< FMAC Read Data register, Address offset: 0x1C */ +} FMAC_TypeDef; + +/** + * @brief Flexible Memory Controller + */ + +typedef struct +{ + __IO uint32_t BTCR[8]; /*!< NOR/PSRAM chip-select control register(BCR) and chip-select timing register(BTR), Address offset: 0x00-1C */ +} FMC_Bank1_TypeDef; + +/** + * @brief Flexible Memory Controller Bank1E + */ + +typedef struct +{ + __IO uint32_t BWTR[7]; /*!< NOR/PSRAM write timing registers, Address offset: 0x104-0x11C */ +} FMC_Bank1E_TypeDef; + +/** + * @brief Flexible Memory Controller Bank2 + */ + +typedef struct +{ + __IO uint32_t PCR2; /*!< NAND Flash control register 2, Address offset: 0x60 */ + __IO uint32_t SR2; /*!< NAND Flash FIFO status and interrupt register 2, Address offset: 0x64 */ + __IO uint32_t PMEM2; /*!< NAND Flash Common memory space timing register 2, Address offset: 0x68 */ + __IO uint32_t PATT2; /*!< NAND Flash Attribute memory space timing register 2, Address offset: 0x6C */ + uint32_t RESERVED0; /*!< Reserved, 0x70 */ + __IO uint32_t ECCR2; /*!< NAND Flash ECC result registers 2, Address offset: 0x74 */ +} FMC_Bank2_TypeDef; + +/** + * @brief Flexible Memory Controller Bank3 + */ + +typedef struct +{ + __IO uint32_t PCR; /*!< NAND Flash control register 3, Address offset: 0x80 */ + __IO uint32_t SR; /*!< NAND Flash FIFO status and interrupt register 3, Address offset: 0x84 */ + __IO uint32_t PMEM; /*!< NAND Flash Common memory space timing register 3, Address offset: 0x88 */ + __IO uint32_t PATT; /*!< NAND Flash Attribute memory space timing register 3, Address offset: 0x8C */ + uint32_t RESERVED; /*!< Reserved, 0x90 */ + __IO uint32_t ECCR; /*!< NAND Flash ECC result registers 3, Address offset: 0x94 */ +} FMC_Bank3_TypeDef; + +/** + * @brief Flexible Memory Controller Bank5 and 6 + */ + + +typedef struct +{ + __IO uint32_t SDCR[2]; /*!< SDRAM Control registers , Address offset: 0x140-0x144 */ + __IO uint32_t SDTR[2]; /*!< SDRAM Timing registers , Address offset: 0x148-0x14C */ + __IO uint32_t SDCMR; /*!< SDRAM Command Mode register, Address offset: 0x150 */ + __IO uint32_t SDRTR; /*!< SDRAM Refresh Timer register, Address offset: 0x154 */ + __IO uint32_t SDSR; /*!< SDRAM Status register, Address offset: 0x158 */ +} FMC_Bank5_6_TypeDef; + +/** + * @brief General Purpose I/O + */ + +typedef struct +{ + __IO uint32_t MODER; /*!< GPIO port mode register, Address offset: 0x00 */ + __IO uint32_t OTYPER; /*!< GPIO port output type register, Address offset: 0x04 */ + __IO uint32_t OSPEEDR; /*!< GPIO port output speed register, Address offset: 0x08 */ + __IO uint32_t PUPDR; /*!< GPIO port pull-up/pull-down register, Address offset: 0x0C */ + __IO uint32_t IDR; /*!< GPIO port input data register, Address offset: 0x10 */ + __IO uint32_t ODR; /*!< GPIO port output data register, Address offset: 0x14 */ + __IO uint32_t BSRR; /*!< GPIO port bit set/reset, Address offset: 0x18 */ + __IO uint32_t LCKR; /*!< GPIO port configuration lock register, Address offset: 0x1C */ + __IO uint32_t AFR[2]; /*!< GPIO alternate function registers, Address offset: 0x20-0x24 */ +} GPIO_TypeDef; + +/** + * @brief Operational Amplifier (OPAMP) + */ + +typedef struct +{ + __IO uint32_t CSR; /*!< OPAMP control/status register, Address offset: 0x00 */ + __IO uint32_t OTR; /*!< OPAMP offset trimming register for normal mode, Address offset: 0x04 */ + __IO uint32_t HSOTR; /*!< OPAMP offset trimming register for high speed mode, Address offset: 0x08 */ +} OPAMP_TypeDef; + +/** + * @brief System configuration controller + */ + +typedef struct +{ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x00 */ + __IO uint32_t PMCR; /*!< SYSCFG peripheral mode configuration register, Address offset: 0x04 */ + __IO uint32_t EXTICR[4]; /*!< SYSCFG external interrupt configuration registers, Address offset: 0x08-0x14 */ + __IO uint32_t CFGR; /*!< SYSCFG configuration registers, Address offset: 0x18 */ + uint32_t RESERVED2; /*!< Reserved, Address offset: 0x1C */ + __IO uint32_t CCCSR; /*!< SYSCFG compensation cell control/status register, Address offset: 0x20 */ + __IO uint32_t CCVR; /*!< SYSCFG compensation cell value register, Address offset: 0x24 */ + __IO uint32_t CCCR; /*!< SYSCFG compensation cell code register, Address offset: 0x28 */ + uint32_t RESERVED3; /*!< Reserved, Address offset: 0x2C */ + __IO uint32_t ADC2ALT; /*!< ADC2 internal input alternate connection register, Address offset: 0x30 */ + uint32_t RESERVED4[60]; /*!< Reserved, 0x34-0x120 */ + __IO uint32_t PKGR; /*!< SYSCFG package register, Address offset: 0x124 */ + uint32_t RESERVED5[118]; /*!< Reserved, 0x128-0x2FC */ + __IO uint32_t UR0; /*!< SYSCFG user register 0, Address offset: 0x300 */ + __IO uint32_t UR1; /*!< SYSCFG user register 1, Address offset: 0x304 */ + __IO uint32_t UR2; /*!< SYSCFG user register 2, Address offset: 0x308 */ + __IO uint32_t UR3; /*!< SYSCFG user register 3, Address offset: 0x30C */ + __IO uint32_t UR4; /*!< SYSCFG user register 4, Address offset: 0x310 */ + __IO uint32_t UR5; /*!< SYSCFG user register 5, Address offset: 0x314 */ + __IO uint32_t UR6; /*!< SYSCFG user register 6, Address offset: 0x318 */ + __IO uint32_t UR7; /*!< SYSCFG user register 7, Address offset: 0x31C */ + uint32_t RESERVED6[3]; /*!< Reserved, Address offset: 0x320-0x328 */ + __IO uint32_t UR11; /*!< SYSCFG user register 11, Address offset: 0x32C */ + __IO uint32_t UR12; /*!< SYSCFG user register 12, Address offset: 0x330 */ + __IO uint32_t UR13; /*!< SYSCFG user register 13, Address offset: 0x334 */ + __IO uint32_t UR14; /*!< SYSCFG user register 14, Address offset: 0x338 */ + __IO uint32_t UR15; /*!< SYSCFG user register 15, Address offset: 0x33C */ + __IO uint32_t UR16; /*!< SYSCFG user register 16, Address offset: 0x340 */ + __IO uint32_t UR17; /*!< SYSCFG user register 17, Address offset: 0x344 */ + __IO uint32_t UR18; /*!< SYSCFG user register 18, Address offset: 0x348 */ + +} SYSCFG_TypeDef; + +/** + * @brief Inter-integrated Circuit Interface + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< I2C Control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< I2C Control register 2, Address offset: 0x04 */ + __IO uint32_t OAR1; /*!< I2C Own address 1 register, Address offset: 0x08 */ + __IO uint32_t OAR2; /*!< I2C Own address 2 register, Address offset: 0x0C */ + __IO uint32_t TIMINGR; /*!< I2C Timing register, Address offset: 0x10 */ + __IO uint32_t TIMEOUTR; /*!< I2C Timeout register, Address offset: 0x14 */ + __IO uint32_t ISR; /*!< I2C Interrupt and status register, Address offset: 0x18 */ + __IO uint32_t ICR; /*!< I2C Interrupt clear register, Address offset: 0x1C */ + __IO uint32_t PECR; /*!< I2C PEC register, Address offset: 0x20 */ + __IO uint32_t RXDR; /*!< I2C Receive data register, Address offset: 0x24 */ + __IO uint32_t TXDR; /*!< I2C Transmit data register, Address offset: 0x28 */ +} I2C_TypeDef; + +/** + * @brief Independent WATCHDOG + */ + +typedef struct +{ + __IO uint32_t KR; /*!< IWDG Key register, Address offset: 0x00 */ + __IO uint32_t PR; /*!< IWDG Prescaler register, Address offset: 0x04 */ + __IO uint32_t RLR; /*!< IWDG Reload register, Address offset: 0x08 */ + __IO uint32_t SR; /*!< IWDG Status register, Address offset: 0x0C */ + __IO uint32_t WINR; /*!< IWDG Window register, Address offset: 0x10 */ +} IWDG_TypeDef; + + +/** + * @brief LCD-TFT Display Controller + */ + +typedef struct +{ + uint32_t RESERVED0[2]; /*!< Reserved, 0x00-0x04 */ + __IO uint32_t SSCR; /*!< LTDC Synchronization Size Configuration Register, Address offset: 0x08 */ + __IO uint32_t BPCR; /*!< LTDC Back Porch Configuration Register, Address offset: 0x0C */ + __IO uint32_t AWCR; /*!< LTDC Active Width Configuration Register, Address offset: 0x10 */ + __IO uint32_t TWCR; /*!< LTDC Total Width Configuration Register, Address offset: 0x14 */ + __IO uint32_t GCR; /*!< LTDC Global Control Register, Address offset: 0x18 */ + uint32_t RESERVED1[2]; /*!< Reserved, 0x1C-0x20 */ + __IO uint32_t SRCR; /*!< LTDC Shadow Reload Configuration Register, Address offset: 0x24 */ + uint32_t RESERVED2[1]; /*!< Reserved, 0x28 */ + __IO uint32_t BCCR; /*!< LTDC Background Color Configuration Register, Address offset: 0x2C */ + uint32_t RESERVED3[1]; /*!< Reserved, 0x30 */ + __IO uint32_t IER; /*!< LTDC Interrupt Enable Register, Address offset: 0x34 */ + __IO uint32_t ISR; /*!< LTDC Interrupt Status Register, Address offset: 0x38 */ + __IO uint32_t ICR; /*!< LTDC Interrupt Clear Register, Address offset: 0x3C */ + __IO uint32_t LIPCR; /*!< LTDC Line Interrupt Position Configuration Register, Address offset: 0x40 */ + __IO uint32_t CPSR; /*!< LTDC Current Position Status Register, Address offset: 0x44 */ + __IO uint32_t CDSR; /*!< LTDC Current Display Status Register, Address offset: 0x48 */ +} LTDC_TypeDef; + +/** + * @brief LCD-TFT Display layer x Controller + */ + +typedef struct +{ + __IO uint32_t CR; /*!< LTDC Layerx Control Register Address offset: 0x84 */ + __IO uint32_t WHPCR; /*!< LTDC Layerx Window Horizontal Position Configuration Register Address offset: 0x88 */ + __IO uint32_t WVPCR; /*!< LTDC Layerx Window Vertical Position Configuration Register Address offset: 0x8C */ + __IO uint32_t CKCR; /*!< LTDC Layerx Color Keying Configuration Register Address offset: 0x90 */ + __IO uint32_t PFCR; /*!< LTDC Layerx Pixel Format Configuration Register Address offset: 0x94 */ + __IO uint32_t CACR; /*!< LTDC Layerx Constant Alpha Configuration Register Address offset: 0x98 */ + __IO uint32_t DCCR; /*!< LTDC Layerx Default Color Configuration Register Address offset: 0x9C */ + __IO uint32_t BFCR; /*!< LTDC Layerx Blending Factors Configuration Register Address offset: 0xA0 */ + uint32_t RESERVED0[2]; /*!< Reserved */ + __IO uint32_t CFBAR; /*!< LTDC Layerx Color Frame Buffer Address Register Address offset: 0xAC */ + __IO uint32_t CFBLR; /*!< LTDC Layerx Color Frame Buffer Length Register Address offset: 0xB0 */ + __IO uint32_t CFBLNR; /*!< LTDC Layerx ColorFrame Buffer Line Number Register Address offset: 0xB4 */ + uint32_t RESERVED1[3]; /*!< Reserved */ + __IO uint32_t CLUTWR; /*!< LTDC Layerx CLUT Write Register Address offset: 0x144 */ + +} LTDC_Layer_TypeDef; + +/** + * @brief Power Control + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< PWR power control register 1, Address offset: 0x00 */ + __IO uint32_t CSR1; /*!< PWR power control status register 1, Address offset: 0x04 */ + __IO uint32_t CR2; /*!< PWR power control register 2, Address offset: 0x08 */ + __IO uint32_t CR3; /*!< PWR power control register 3, Address offset: 0x0C */ + __IO uint32_t CPUCR; /*!< PWR CPU control register, Address offset: 0x10 */ + uint32_t RESERVED0; /*!< Reserved, Address offset: 0x14 */ + __IO uint32_t D3CR; /*!< PWR D3 domain control register, Address offset: 0x18 */ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x1C */ + __IO uint32_t WKUPCR; /*!< PWR wakeup clear register, Address offset: 0x20 */ + __IO uint32_t WKUPFR; /*!< PWR wakeup flag register, Address offset: 0x24 */ + __IO uint32_t WKUPEPR; /*!< PWR wakeup enable and polarity register, Address offset: 0x28 */ +} PWR_TypeDef; + +/** + * @brief Reset and Clock Control + */ + +typedef struct +{ + __IO uint32_t CR; /*!< RCC clock control register, Address offset: 0x00 */ + __IO uint32_t HSICFGR; /*!< HSI Clock Calibration Register, Address offset: 0x04 */ + __IO uint32_t CRRCR; /*!< Clock Recovery RC Register, Address offset: 0x08 */ + __IO uint32_t CSICFGR; /*!< CSI Clock Calibration Register, Address offset: 0x0C */ + __IO uint32_t CFGR; /*!< RCC clock configuration register, Address offset: 0x10 */ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x14 */ + __IO uint32_t D1CFGR; /*!< RCC Domain 1 configuration register, Address offset: 0x18 */ + __IO uint32_t D2CFGR; /*!< RCC Domain 2 configuration register, Address offset: 0x1C */ + __IO uint32_t D3CFGR; /*!< RCC Domain 3 configuration register, Address offset: 0x20 */ + uint32_t RESERVED2; /*!< Reserved, Address offset: 0x24 */ + __IO uint32_t PLLCKSELR; /*!< RCC PLLs Clock Source Selection Register, Address offset: 0x28 */ + __IO uint32_t PLLCFGR; /*!< RCC PLLs Configuration Register, Address offset: 0x2C */ + __IO uint32_t PLL1DIVR; /*!< RCC PLL1 Dividers Configuration Register, Address offset: 0x30 */ + __IO uint32_t PLL1FRACR; /*!< RCC PLL1 Fractional Divider Configuration Register, Address offset: 0x34 */ + __IO uint32_t PLL2DIVR; /*!< RCC PLL2 Dividers Configuration Register, Address offset: 0x38 */ + __IO uint32_t PLL2FRACR; /*!< RCC PLL2 Fractional Divider Configuration Register, Address offset: 0x3C */ + __IO uint32_t PLL3DIVR; /*!< RCC PLL3 Dividers Configuration Register, Address offset: 0x40 */ + __IO uint32_t PLL3FRACR; /*!< RCC PLL3 Fractional Divider Configuration Register, Address offset: 0x44 */ + uint32_t RESERVED3; /*!< Reserved, Address offset: 0x48 */ + __IO uint32_t D1CCIPR; /*!< RCC Domain 1 Kernel Clock Configuration Register Address offset: 0x4C */ + __IO uint32_t D2CCIP1R; /*!< RCC Domain 2 Kernel Clock Configuration Register Address offset: 0x50 */ + __IO uint32_t D2CCIP2R; /*!< RCC Domain 2 Kernel Clock Configuration Register Address offset: 0x54 */ + __IO uint32_t D3CCIPR; /*!< RCC Domain 3 Kernel Clock Configuration Register Address offset: 0x58 */ + uint32_t RESERVED4; /*!< Reserved, Address offset: 0x5C */ + __IO uint32_t CIER; /*!< RCC Clock Source Interrupt Enable Register Address offset: 0x60 */ + __IO uint32_t CIFR; /*!< RCC Clock Source Interrupt Flag Register Address offset: 0x64 */ + __IO uint32_t CICR; /*!< RCC Clock Source Interrupt Clear Register Address offset: 0x68 */ + uint32_t RESERVED5; /*!< Reserved, Address offset: 0x6C */ + __IO uint32_t BDCR; /*!< RCC Vswitch Backup Domain Control Register, Address offset: 0x70 */ + __IO uint32_t CSR; /*!< RCC clock control & status register, Address offset: 0x74 */ + uint32_t RESERVED6; /*!< Reserved, Address offset: 0x78 */ + __IO uint32_t AHB3RSTR; /*!< RCC AHB3 peripheral reset register, Address offset: 0x7C */ + __IO uint32_t AHB1RSTR; /*!< RCC AHB1 peripheral reset register, Address offset: 0x80 */ + __IO uint32_t AHB2RSTR; /*!< RCC AHB2 peripheral reset register, Address offset: 0x84 */ + __IO uint32_t AHB4RSTR; /*!< RCC AHB4 peripheral reset register, Address offset: 0x88 */ + __IO uint32_t APB3RSTR; /*!< RCC APB3 peripheral reset register, Address offset: 0x8C */ + __IO uint32_t APB1LRSTR; /*!< RCC APB1 peripheral reset Low Word register, Address offset: 0x90 */ + __IO uint32_t APB1HRSTR; /*!< RCC APB1 peripheral reset High Word register, Address offset: 0x94 */ + __IO uint32_t APB2RSTR; /*!< RCC APB2 peripheral reset register, Address offset: 0x98 */ + __IO uint32_t APB4RSTR; /*!< RCC APB4 peripheral reset register, Address offset: 0x9C */ + __IO uint32_t GCR; /*!< RCC RCC Global Control Register, Address offset: 0xA0 */ + uint32_t RESERVED8; /*!< Reserved, Address offset: 0xA4 */ + __IO uint32_t D3AMR; /*!< RCC Domain 3 Autonomous Mode Register, Address offset: 0xA8 */ + uint32_t RESERVED11[9]; /*!< Reserved, 0xAC-0xCC Address offset: 0xAC */ + __IO uint32_t RSR; /*!< RCC Reset status register, Address offset: 0xD0 */ + __IO uint32_t AHB3ENR; /*!< RCC AHB3 peripheral clock register, Address offset: 0xD4 */ + __IO uint32_t AHB1ENR; /*!< RCC AHB1 peripheral clock register, Address offset: 0xD8 */ + __IO uint32_t AHB2ENR; /*!< RCC AHB2 peripheral clock register, Address offset: 0xDC */ + __IO uint32_t AHB4ENR; /*!< RCC AHB4 peripheral clock register, Address offset: 0xE0 */ + __IO uint32_t APB3ENR; /*!< RCC APB3 peripheral clock register, Address offset: 0xE4 */ + __IO uint32_t APB1LENR; /*!< RCC APB1 peripheral clock Low Word register, Address offset: 0xE8 */ + __IO uint32_t APB1HENR; /*!< RCC APB1 peripheral clock High Word register, Address offset: 0xEC */ + __IO uint32_t APB2ENR; /*!< RCC APB2 peripheral clock register, Address offset: 0xF0 */ + __IO uint32_t APB4ENR; /*!< RCC APB4 peripheral clock register, Address offset: 0xF4 */ + uint32_t RESERVED12; /*!< Reserved, Address offset: 0xF8 */ + __IO uint32_t AHB3LPENR; /*!< RCC AHB3 peripheral sleep clock register, Address offset: 0xFC */ + __IO uint32_t AHB1LPENR; /*!< RCC AHB1 peripheral sleep clock register, Address offset: 0x100 */ + __IO uint32_t AHB2LPENR; /*!< RCC AHB2 peripheral sleep clock register, Address offset: 0x104 */ + __IO uint32_t AHB4LPENR; /*!< RCC AHB4 peripheral sleep clock register, Address offset: 0x108 */ + __IO uint32_t APB3LPENR; /*!< RCC APB3 peripheral sleep clock register, Address offset: 0x10C */ + __IO uint32_t APB1LLPENR; /*!< RCC APB1 peripheral sleep clock Low Word register, Address offset: 0x110 */ + __IO uint32_t APB1HLPENR; /*!< RCC APB1 peripheral sleep clock High Word register, Address offset: 0x114 */ + __IO uint32_t APB2LPENR; /*!< RCC APB2 peripheral sleep clock register, Address offset: 0x118 */ + __IO uint32_t APB4LPENR; /*!< RCC APB4 peripheral sleep clock register, Address offset: 0x11C */ + uint32_t RESERVED13[4]; /*!< Reserved, 0x120-0x12C Address offset: 0x120 */ + +} RCC_TypeDef; + + +/** + * @brief Real-Time Clock + */ +typedef struct +{ + __IO uint32_t TR; /*!< RTC time register, Address offset: 0x00 */ + __IO uint32_t DR; /*!< RTC date register, Address offset: 0x04 */ + __IO uint32_t CR; /*!< RTC control register, Address offset: 0x08 */ + __IO uint32_t ISR; /*!< RTC initialization and status register, Address offset: 0x0C */ + __IO uint32_t PRER; /*!< RTC prescaler register, Address offset: 0x10 */ + __IO uint32_t WUTR; /*!< RTC wakeup timer register, Address offset: 0x14 */ + uint32_t RESERVED; /*!< Reserved, Address offset: 0x18 */ + __IO uint32_t ALRMAR; /*!< RTC alarm A register, Address offset: 0x1C */ + __IO uint32_t ALRMBR; /*!< RTC alarm B register, Address offset: 0x20 */ + __IO uint32_t WPR; /*!< RTC write protection register, Address offset: 0x24 */ + __IO uint32_t SSR; /*!< RTC sub second register, Address offset: 0x28 */ + __IO uint32_t SHIFTR; /*!< RTC shift control register, Address offset: 0x2C */ + __IO uint32_t TSTR; /*!< RTC time stamp time register, Address offset: 0x30 */ + __IO uint32_t TSDR; /*!< RTC time stamp date register, Address offset: 0x34 */ + __IO uint32_t TSSSR; /*!< RTC time-stamp sub second register, Address offset: 0x38 */ + __IO uint32_t CALR; /*!< RTC calibration register, Address offset: 0x3C */ + __IO uint32_t TAMPCR; /*!< RTC tamper configuration register, Address offset: 0x40 */ + __IO uint32_t ALRMASSR; /*!< RTC alarm A sub second register, Address offset: 0x44 */ + __IO uint32_t ALRMBSSR; /*!< RTC alarm B sub second register, Address offset: 0x48 */ + __IO uint32_t OR; /*!< RTC option register, Address offset: 0x4C */ + __IO uint32_t BKP0R; /*!< RTC backup register 0, Address offset: 0x50 */ + __IO uint32_t BKP1R; /*!< RTC backup register 1, Address offset: 0x54 */ + __IO uint32_t BKP2R; /*!< RTC backup register 2, Address offset: 0x58 */ + __IO uint32_t BKP3R; /*!< RTC backup register 3, Address offset: 0x5C */ + __IO uint32_t BKP4R; /*!< RTC backup register 4, Address offset: 0x60 */ + __IO uint32_t BKP5R; /*!< RTC backup register 5, Address offset: 0x64 */ + __IO uint32_t BKP6R; /*!< RTC backup register 6, Address offset: 0x68 */ + __IO uint32_t BKP7R; /*!< RTC backup register 7, Address offset: 0x6C */ + __IO uint32_t BKP8R; /*!< RTC backup register 8, Address offset: 0x70 */ + __IO uint32_t BKP9R; /*!< RTC backup register 9, Address offset: 0x74 */ + __IO uint32_t BKP10R; /*!< RTC backup register 10, Address offset: 0x78 */ + __IO uint32_t BKP11R; /*!< RTC backup register 11, Address offset: 0x7C */ + __IO uint32_t BKP12R; /*!< RTC backup register 12, Address offset: 0x80 */ + __IO uint32_t BKP13R; /*!< RTC backup register 13, Address offset: 0x84 */ + __IO uint32_t BKP14R; /*!< RTC backup register 14, Address offset: 0x88 */ + __IO uint32_t BKP15R; /*!< RTC backup register 15, Address offset: 0x8C */ + __IO uint32_t BKP16R; /*!< RTC backup register 16, Address offset: 0x90 */ + __IO uint32_t BKP17R; /*!< RTC backup register 17, Address offset: 0x94 */ + __IO uint32_t BKP18R; /*!< RTC backup register 18, Address offset: 0x98 */ + __IO uint32_t BKP19R; /*!< RTC backup register 19, Address offset: 0x9C */ + __IO uint32_t BKP20R; /*!< RTC backup register 20, Address offset: 0xA0 */ + __IO uint32_t BKP21R; /*!< RTC backup register 21, Address offset: 0xA4 */ + __IO uint32_t BKP22R; /*!< RTC backup register 22, Address offset: 0xA8 */ + __IO uint32_t BKP23R; /*!< RTC backup register 23, Address offset: 0xAC */ + __IO uint32_t BKP24R; /*!< RTC backup register 24, Address offset: 0xB0 */ + __IO uint32_t BKP25R; /*!< RTC backup register 25, Address offset: 0xB4 */ + __IO uint32_t BKP26R; /*!< RTC backup register 26, Address offset: 0xB8 */ + __IO uint32_t BKP27R; /*!< RTC backup register 27, Address offset: 0xBC */ + __IO uint32_t BKP28R; /*!< RTC backup register 28, Address offset: 0xC0 */ + __IO uint32_t BKP29R; /*!< RTC backup register 29, Address offset: 0xC4 */ + __IO uint32_t BKP30R; /*!< RTC backup register 30, Address offset: 0xC8 */ + __IO uint32_t BKP31R; /*!< RTC backup register 31, Address offset: 0xCC */ +} RTC_TypeDef; + +/** + * @brief Serial Audio Interface + */ + +typedef struct +{ + __IO uint32_t GCR; /*!< SAI global configuration register, Address offset: 0x00 */ + uint32_t RESERVED0[16]; /*!< Reserved, 0x04 - 0x43 */ + __IO uint32_t PDMCR; /*!< SAI PDM control register, Address offset: 0x44 */ + __IO uint32_t PDMDLY; /*!< SAI PDM delay register, Address offset: 0x48 */ +} SAI_TypeDef; + +typedef struct +{ + __IO uint32_t CR1; /*!< SAI block x configuration register 1, Address offset: 0x04 */ + __IO uint32_t CR2; /*!< SAI block x configuration register 2, Address offset: 0x08 */ + __IO uint32_t FRCR; /*!< SAI block x frame configuration register, Address offset: 0x0C */ + __IO uint32_t SLOTR; /*!< SAI block x slot register, Address offset: 0x10 */ + __IO uint32_t IMR; /*!< SAI block x interrupt mask register, Address offset: 0x14 */ + __IO uint32_t SR; /*!< SAI block x status register, Address offset: 0x18 */ + __IO uint32_t CLRFR; /*!< SAI block x clear flag register, Address offset: 0x1C */ + __IO uint32_t DR; /*!< SAI block x data register, Address offset: 0x20 */ +} SAI_Block_TypeDef; + +/** + * @brief SPDIF-RX Interface + */ + +typedef struct +{ + __IO uint32_t CR; /*!< Control register, Address offset: 0x00 */ + __IO uint32_t IMR; /*!< Interrupt mask register, Address offset: 0x04 */ + __IO uint32_t SR; /*!< Status register, Address offset: 0x08 */ + __IO uint32_t IFCR; /*!< Interrupt Flag Clear register, Address offset: 0x0C */ + __IO uint32_t DR; /*!< Data input register, Address offset: 0x10 */ + __IO uint32_t CSR; /*!< Channel Status register, Address offset: 0x14 */ + __IO uint32_t DIR; /*!< Debug Information register, Address offset: 0x18 */ + uint32_t RESERVED2; /*!< Reserved, 0x1A */ +} SPDIFRX_TypeDef; + + +/** + * @brief Secure digital input/output Interface + */ + +typedef struct +{ + __IO uint32_t POWER; /*!< SDMMC power control register, Address offset: 0x00 */ + __IO uint32_t CLKCR; /*!< SDMMC clock control register, Address offset: 0x04 */ + __IO uint32_t ARG; /*!< SDMMC argument register, Address offset: 0x08 */ + __IO uint32_t CMD; /*!< SDMMC command register, Address offset: 0x0C */ + __I uint32_t RESPCMD; /*!< SDMMC command response register, Address offset: 0x10 */ + __I uint32_t RESP1; /*!< SDMMC response 1 register, Address offset: 0x14 */ + __I uint32_t RESP2; /*!< SDMMC response 2 register, Address offset: 0x18 */ + __I uint32_t RESP3; /*!< SDMMC response 3 register, Address offset: 0x1C */ + __I uint32_t RESP4; /*!< SDMMC response 4 register, Address offset: 0x20 */ + __IO uint32_t DTIMER; /*!< SDMMC data timer register, Address offset: 0x24 */ + __IO uint32_t DLEN; /*!< SDMMC data length register, Address offset: 0x28 */ + __IO uint32_t DCTRL; /*!< SDMMC data control register, Address offset: 0x2C */ + __I uint32_t DCOUNT; /*!< SDMMC data counter register, Address offset: 0x30 */ + __I uint32_t STA; /*!< SDMMC status register, Address offset: 0x34 */ + __IO uint32_t ICR; /*!< SDMMC interrupt clear register, Address offset: 0x38 */ + __IO uint32_t MASK; /*!< SDMMC mask register, Address offset: 0x3C */ + __IO uint32_t ACKTIME; /*!< SDMMC Acknowledgement timer register, Address offset: 0x40 */ + uint32_t RESERVED0[3]; /*!< Reserved, 0x44 - 0x4C - 0x4C */ + __IO uint32_t IDMACTRL; /*!< SDMMC DMA control register, Address offset: 0x50 */ + __IO uint32_t IDMABSIZE; /*!< SDMMC DMA buffer size register, Address offset: 0x54 */ + __IO uint32_t IDMABASE0; /*!< SDMMC DMA buffer 0 base address register, Address offset: 0x58 */ + __IO uint32_t IDMABASE1; /*!< SDMMC DMA buffer 1 base address register, Address offset: 0x5C */ + uint32_t RESERVED1[8]; /*!< Reserved, 0x60-0x7C */ + __IO uint32_t FIFO; /*!< SDMMC data FIFO register, Address offset: 0x80 */ + uint32_t RESERVED2[222]; /*!< Reserved, 0x84-0x3F8 */ + __IO uint32_t IPVR; /*!< SDMMC data FIFO register, Address offset: 0x3FC */ +} SDMMC_TypeDef; + + +/** + * @brief Delay Block DLYB + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DELAY BLOCK control register, Address offset: 0x00 */ + __IO uint32_t CFGR; /*!< DELAY BLOCK configuration register, Address offset: 0x04 */ +} DLYB_TypeDef; + +/** + * @brief HW Semaphore HSEM + */ + +typedef struct +{ + __IO uint32_t R[32]; /*!< 2-step write lock and read back registers, Address offset: 00h-7Ch */ + __IO uint32_t RLR[32]; /*!< 1-step read lock registers, Address offset: 80h-FCh */ + __IO uint32_t C1IER; /*!< HSEM Interrupt enable register , Address offset: 100h */ + __IO uint32_t C1ICR; /*!< HSEM Interrupt clear register , Address offset: 104h */ + __IO uint32_t C1ISR; /*!< HSEM Interrupt Status register , Address offset: 108h */ + __IO uint32_t C1MISR; /*!< HSEM Interrupt Masked Status register , Address offset: 10Ch */ + uint32_t Reserved[12]; /* Reserved Address offset: 110h-13Ch */ + __IO uint32_t CR; /*!< HSEM Semaphore clear register , Address offset: 140h */ + __IO uint32_t KEYR; /*!< HSEM Semaphore clear key register , Address offset: 144h */ + +} HSEM_TypeDef; + +typedef struct +{ + __IO uint32_t IER; /*!< HSEM interrupt enable register , Address offset: 0h */ + __IO uint32_t ICR; /*!< HSEM interrupt clear register , Address offset: 4h */ + __IO uint32_t ISR; /*!< HSEM interrupt status register , Address offset: 8h */ + __IO uint32_t MISR; /*!< HSEM masked interrupt status register , Address offset: Ch */ +} HSEM_Common_TypeDef; + +/** + * @brief Serial Peripheral Interface + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< SPI/I2S Control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< SPI Control register 2, Address offset: 0x04 */ + __IO uint32_t CFG1; /*!< SPI Configuration register 1, Address offset: 0x08 */ + __IO uint32_t CFG2; /*!< SPI Configuration register 2, Address offset: 0x0C */ + __IO uint32_t IER; /*!< SPI/I2S Interrupt Enable register, Address offset: 0x10 */ + __IO uint32_t SR; /*!< SPI/I2S Status register, Address offset: 0x14 */ + __IO uint32_t IFCR; /*!< SPI/I2S Interrupt/Status flags clear register, Address offset: 0x18 */ + uint32_t RESERVED0; /*!< Reserved, 0x1C */ + __IO uint32_t TXDR; /*!< SPI/I2S Transmit data register, Address offset: 0x20 */ + uint32_t RESERVED1[3]; /*!< Reserved, 0x24-0x2C */ + __IO uint32_t RXDR; /*!< SPI/I2S Receive data register, Address offset: 0x30 */ + uint32_t RESERVED2[3]; /*!< Reserved, 0x34-0x3C */ + __IO uint32_t CRCPOLY; /*!< SPI CRC Polynomial register, Address offset: 0x40 */ + __IO uint32_t TXCRC; /*!< SPI Transmitter CRC register, Address offset: 0x44 */ + __IO uint32_t RXCRC; /*!< SPI Receiver CRC register, Address offset: 0x48 */ + __IO uint32_t UDRDR; /*!< SPI Underrun data register, Address offset: 0x4C */ + __IO uint32_t I2SCFGR; /*!< I2S Configuration register, Address offset: 0x50 */ + +} SPI_TypeDef; + +/** + * @brief DTS + */ +typedef struct +{ + __IO uint32_t CFGR1; /*!< DTS configuration register, Address offset: 0x00 */ + uint32_t RESERVED0; /*!< Reserved, Address offset: 0x04 */ + __IO uint32_t T0VALR1; /*!< DTS T0 Value register, Address offset: 0x08 */ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x0C */ + __IO uint32_t RAMPVALR; /*!< DTS Ramp value register, Address offset: 0x10 */ + __IO uint32_t ITR1; /*!< DTS Interrupt threshold register, Address offset: 0x14 */ + uint32_t RESERVED2; /*!< Reserved, Address offset: 0x18 */ + __IO uint32_t DR; /*!< DTS data register, Address offset: 0x1C */ + __IO uint32_t SR; /*!< DTS status register Address offset: 0x20 */ + __IO uint32_t ITENR; /*!< DTS Interrupt enable register, Address offset: 0x24 */ + __IO uint32_t ICIFR; /*!< DTS Clear Interrupt flag register, Address offset: 0x28 */ + __IO uint32_t OR; /*!< DTS option register 1, Address offset: 0x2C */ +} +DTS_TypeDef; + +/** + * @brief TIM + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< TIM control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< TIM control register 2, Address offset: 0x04 */ + __IO uint32_t SMCR; /*!< TIM slave mode control register, Address offset: 0x08 */ + __IO uint32_t DIER; /*!< TIM DMA/interrupt enable register, Address offset: 0x0C */ + __IO uint32_t SR; /*!< TIM status register, Address offset: 0x10 */ + __IO uint32_t EGR; /*!< TIM event generation register, Address offset: 0x14 */ + __IO uint32_t CCMR1; /*!< TIM capture/compare mode register 1, Address offset: 0x18 */ + __IO uint32_t CCMR2; /*!< TIM capture/compare mode register 2, Address offset: 0x1C */ + __IO uint32_t CCER; /*!< TIM capture/compare enable register, Address offset: 0x20 */ + __IO uint32_t CNT; /*!< TIM counter register, Address offset: 0x24 */ + __IO uint32_t PSC; /*!< TIM prescaler, Address offset: 0x28 */ + __IO uint32_t ARR; /*!< TIM auto-reload register, Address offset: 0x2C */ + __IO uint32_t RCR; /*!< TIM repetition counter register, Address offset: 0x30 */ + __IO uint32_t CCR1; /*!< TIM capture/compare register 1, Address offset: 0x34 */ + __IO uint32_t CCR2; /*!< TIM capture/compare register 2, Address offset: 0x38 */ + __IO uint32_t CCR3; /*!< TIM capture/compare register 3, Address offset: 0x3C */ + __IO uint32_t CCR4; /*!< TIM capture/compare register 4, Address offset: 0x40 */ + __IO uint32_t BDTR; /*!< TIM break and dead-time register, Address offset: 0x44 */ + __IO uint32_t DCR; /*!< TIM DMA control register, Address offset: 0x48 */ + __IO uint32_t DMAR; /*!< TIM DMA address for full transfer, Address offset: 0x4C */ + uint32_t RESERVED1; /*!< Reserved, 0x50 */ + __IO uint32_t CCMR3; /*!< TIM capture/compare mode register 3, Address offset: 0x54 */ + __IO uint32_t CCR5; /*!< TIM capture/compare register5, Address offset: 0x58 */ + __IO uint32_t CCR6; /*!< TIM capture/compare register6, Address offset: 0x5C */ + __IO uint32_t AF1; /*!< TIM alternate function option register 1, Address offset: 0x60 */ + __IO uint32_t AF2; /*!< TIM alternate function option register 2, Address offset: 0x64 */ + __IO uint32_t TISEL; /*!< TIM Input Selection register, Address offset: 0x68 */ +} TIM_TypeDef; + +/** + * @brief LPTIMIMER + */ +typedef struct +{ + __IO uint32_t ISR; /*!< LPTIM Interrupt and Status register, Address offset: 0x00 */ + __IO uint32_t ICR; /*!< LPTIM Interrupt Clear register, Address offset: 0x04 */ + __IO uint32_t IER; /*!< LPTIM Interrupt Enable register, Address offset: 0x08 */ + __IO uint32_t CFGR; /*!< LPTIM Configuration register, Address offset: 0x0C */ + __IO uint32_t CR; /*!< LPTIM Control register, Address offset: 0x10 */ + __IO uint32_t CMP; /*!< LPTIM Compare register, Address offset: 0x14 */ + __IO uint32_t ARR; /*!< LPTIM Autoreload register, Address offset: 0x18 */ + __IO uint32_t CNT; /*!< LPTIM Counter register, Address offset: 0x1C */ + uint32_t RESERVED1; /*!< Reserved, 0x20 */ + __IO uint32_t CFGR2; /*!< LPTIM Configuration register, Address offset: 0x24 */ +} LPTIM_TypeDef; + +/** + * @brief Comparator + */ +typedef struct +{ + __IO uint32_t SR; /*!< Comparator status register, Address offset: 0x00 */ + __IO uint32_t ICFR; /*!< Comparator interrupt clear flag register, Address offset: 0x04 */ + __IO uint32_t OR; /*!< Comparator option register, Address offset: 0x08 */ +} COMPOPT_TypeDef; + +typedef struct +{ + __IO uint32_t CFGR; /*!< Comparator configuration register , Address offset: 0x00 */ +} COMP_TypeDef; + +typedef struct +{ + __IO uint32_t CFGR; /*!< COMP control and status register, used for bits common to several COMP instances, Address offset: 0x00 */ +} COMP_Common_TypeDef; +/** + * @brief Universal Synchronous Asynchronous Receiver Transmitter + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< USART Control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< USART Control register 2, Address offset: 0x04 */ + __IO uint32_t CR3; /*!< USART Control register 3, Address offset: 0x08 */ + __IO uint32_t BRR; /*!< USART Baud rate register, Address offset: 0x0C */ + __IO uint32_t GTPR; /*!< USART Guard time and prescaler register, Address offset: 0x10 */ + __IO uint32_t RTOR; /*!< USART Receiver Time Out register, Address offset: 0x14 */ + __IO uint32_t RQR; /*!< USART Request register, Address offset: 0x18 */ + __IO uint32_t ISR; /*!< USART Interrupt and status register, Address offset: 0x1C */ + __IO uint32_t ICR; /*!< USART Interrupt flag Clear register, Address offset: 0x20 */ + __IO uint32_t RDR; /*!< USART Receive Data register, Address offset: 0x24 */ + __IO uint32_t TDR; /*!< USART Transmit Data register, Address offset: 0x28 */ + __IO uint32_t PRESC; /*!< USART clock Prescaler register, Address offset: 0x2C */ +} USART_TypeDef; + +/** + * @brief Single Wire Protocol Master Interface SPWMI + */ +typedef struct +{ + __IO uint32_t CR; /*!< SWPMI Configuration/Control register, Address offset: 0x00 */ + __IO uint32_t BRR; /*!< SWPMI bitrate register, Address offset: 0x04 */ + uint32_t RESERVED1; /*!< Reserved, 0x08 */ + __IO uint32_t ISR; /*!< SWPMI Interrupt and Status register, Address offset: 0x0C */ + __IO uint32_t ICR; /*!< SWPMI Interrupt Flag Clear register, Address offset: 0x10 */ + __IO uint32_t IER; /*!< SWPMI Interrupt Enable register, Address offset: 0x14 */ + __IO uint32_t RFL; /*!< SWPMI Receive Frame Length register, Address offset: 0x18 */ + __IO uint32_t TDR; /*!< SWPMI Transmit data register, Address offset: 0x1C */ + __IO uint32_t RDR; /*!< SWPMI Receive data register, Address offset: 0x20 */ + __IO uint32_t OR; /*!< SWPMI Option register, Address offset: 0x24 */ +} SWPMI_TypeDef; + +/** + * @brief Window WATCHDOG + */ + +typedef struct +{ + __IO uint32_t CR; /*!< WWDG Control register, Address offset: 0x00 */ + __IO uint32_t CFR; /*!< WWDG Configuration register, Address offset: 0x04 */ + __IO uint32_t SR; /*!< WWDG Status register, Address offset: 0x08 */ +} WWDG_TypeDef; + + +/** + * @brief RAM_ECC_Specific_Registers + */ +typedef struct +{ + __IO uint32_t CR; /*!< RAMECC monitor configuration register */ + __IO uint32_t SR; /*!< RAMECC monitor status register */ + __IO uint32_t FAR; /*!< RAMECC monitor failing address register */ + __IO uint32_t FDRL; /*!< RAMECC monitor failing data low register */ + __IO uint32_t FDRH; /*!< RAMECC monitor failing data high register */ + __IO uint32_t FECR; /*!< RAMECC monitor failing ECC error code register */ +} RAMECC_MonitorTypeDef; + +typedef struct +{ + __IO uint32_t IER; /*!< RAMECC interrupt enable register */ +} RAMECC_TypeDef; +/** + * @} + */ + + +/** + * @brief Crypto Processor + */ + +typedef struct +{ + __IO uint32_t CR; /*!< CRYP control register, Address offset: 0x00 */ + __IO uint32_t SR; /*!< CRYP status register, Address offset: 0x04 */ + __IO uint32_t DIN; /*!< CRYP data input register, Address offset: 0x08 */ + __IO uint32_t DOUT; /*!< CRYP data output register, Address offset: 0x0C */ + __IO uint32_t DMACR; /*!< CRYP DMA control register, Address offset: 0x10 */ + __IO uint32_t IMSCR; /*!< CRYP interrupt mask set/clear register, Address offset: 0x14 */ + __IO uint32_t RISR; /*!< CRYP raw interrupt status register, Address offset: 0x18 */ + __IO uint32_t MISR; /*!< CRYP masked interrupt status register, Address offset: 0x1C */ + __IO uint32_t K0LR; /*!< CRYP key left register 0, Address offset: 0x20 */ + __IO uint32_t K0RR; /*!< CRYP key right register 0, Address offset: 0x24 */ + __IO uint32_t K1LR; /*!< CRYP key left register 1, Address offset: 0x28 */ + __IO uint32_t K1RR; /*!< CRYP key right register 1, Address offset: 0x2C */ + __IO uint32_t K2LR; /*!< CRYP key left register 2, Address offset: 0x30 */ + __IO uint32_t K2RR; /*!< CRYP key right register 2, Address offset: 0x34 */ + __IO uint32_t K3LR; /*!< CRYP key left register 3, Address offset: 0x38 */ + __IO uint32_t K3RR; /*!< CRYP key right register 3, Address offset: 0x3C */ + __IO uint32_t IV0LR; /*!< CRYP initialization vector left-word register 0, Address offset: 0x40 */ + __IO uint32_t IV0RR; /*!< CRYP initialization vector right-word register 0, Address offset: 0x44 */ + __IO uint32_t IV1LR; /*!< CRYP initialization vector left-word register 1, Address offset: 0x48 */ + __IO uint32_t IV1RR; /*!< CRYP initialization vector right-word register 1, Address offset: 0x4C */ + __IO uint32_t CSGCMCCM0R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 0, Address offset: 0x50 */ + __IO uint32_t CSGCMCCM1R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 1, Address offset: 0x54 */ + __IO uint32_t CSGCMCCM2R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 2, Address offset: 0x58 */ + __IO uint32_t CSGCMCCM3R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 3, Address offset: 0x5C */ + __IO uint32_t CSGCMCCM4R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 4, Address offset: 0x60 */ + __IO uint32_t CSGCMCCM5R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 5, Address offset: 0x64 */ + __IO uint32_t CSGCMCCM6R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 6, Address offset: 0x68 */ + __IO uint32_t CSGCMCCM7R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 7, Address offset: 0x6C */ + __IO uint32_t CSGCM0R; /*!< CRYP GCM/GMAC context swap register 0, Address offset: 0x70 */ + __IO uint32_t CSGCM1R; /*!< CRYP GCM/GMAC context swap register 1, Address offset: 0x74 */ + __IO uint32_t CSGCM2R; /*!< CRYP GCM/GMAC context swap register 2, Address offset: 0x78 */ + __IO uint32_t CSGCM3R; /*!< CRYP GCM/GMAC context swap register 3, Address offset: 0x7C */ + __IO uint32_t CSGCM4R; /*!< CRYP GCM/GMAC context swap register 4, Address offset: 0x80 */ + __IO uint32_t CSGCM5R; /*!< CRYP GCM/GMAC context swap register 5, Address offset: 0x84 */ + __IO uint32_t CSGCM6R; /*!< CRYP GCM/GMAC context swap register 6, Address offset: 0x88 */ + __IO uint32_t CSGCM7R; /*!< CRYP GCM/GMAC context swap register 7, Address offset: 0x8C */ +} CRYP_TypeDef; + +/** + * @brief HASH + */ + +typedef struct +{ + __IO uint32_t CR; /*!< HASH control register, Address offset: 0x00 */ + __IO uint32_t DIN; /*!< HASH data input register, Address offset: 0x04 */ + __IO uint32_t STR; /*!< HASH start register, Address offset: 0x08 */ + __IO uint32_t HR[5]; /*!< HASH digest registers, Address offset: 0x0C-0x1C */ + __IO uint32_t IMR; /*!< HASH interrupt enable register, Address offset: 0x20 */ + __IO uint32_t SR; /*!< HASH status register, Address offset: 0x24 */ + uint32_t RESERVED[52]; /*!< Reserved, 0x28-0xF4 */ + __IO uint32_t CSR[54]; /*!< HASH context swap registers, Address offset: 0x0F8-0x1CC */ +} HASH_TypeDef; + +/** + * @brief HASH_DIGEST + */ + +typedef struct +{ + __IO uint32_t HR[8]; /*!< HASH digest registers, Address offset: 0x310-0x32C */ +} HASH_DIGEST_TypeDef; + + +/** + * @brief RNG + */ + +typedef struct +{ + __IO uint32_t CR; /*!< RNG control register, Address offset: 0x00 */ + __IO uint32_t SR; /*!< RNG status register, Address offset: 0x04 */ + __IO uint32_t DR; /*!< RNG data register, Address offset: 0x08 */ + uint32_t RESERVED; + __IO uint32_t HTCR; /*!< RNG health test configuration register, Address offset: 0x10 */ +} RNG_TypeDef; + +/** + * @brief MDIOS + */ + +typedef struct +{ + __IO uint32_t CR; + __IO uint32_t WRFR; + __IO uint32_t CWRFR; + __IO uint32_t RDFR; + __IO uint32_t CRDFR; + __IO uint32_t SR; + __IO uint32_t CLRFR; + uint32_t RESERVED[57]; + __IO uint32_t DINR0; + __IO uint32_t DINR1; + __IO uint32_t DINR2; + __IO uint32_t DINR3; + __IO uint32_t DINR4; + __IO uint32_t DINR5; + __IO uint32_t DINR6; + __IO uint32_t DINR7; + __IO uint32_t DINR8; + __IO uint32_t DINR9; + __IO uint32_t DINR10; + __IO uint32_t DINR11; + __IO uint32_t DINR12; + __IO uint32_t DINR13; + __IO uint32_t DINR14; + __IO uint32_t DINR15; + __IO uint32_t DINR16; + __IO uint32_t DINR17; + __IO uint32_t DINR18; + __IO uint32_t DINR19; + __IO uint32_t DINR20; + __IO uint32_t DINR21; + __IO uint32_t DINR22; + __IO uint32_t DINR23; + __IO uint32_t DINR24; + __IO uint32_t DINR25; + __IO uint32_t DINR26; + __IO uint32_t DINR27; + __IO uint32_t DINR28; + __IO uint32_t DINR29; + __IO uint32_t DINR30; + __IO uint32_t DINR31; + __IO uint32_t DOUTR0; + __IO uint32_t DOUTR1; + __IO uint32_t DOUTR2; + __IO uint32_t DOUTR3; + __IO uint32_t DOUTR4; + __IO uint32_t DOUTR5; + __IO uint32_t DOUTR6; + __IO uint32_t DOUTR7; + __IO uint32_t DOUTR8; + __IO uint32_t DOUTR9; + __IO uint32_t DOUTR10; + __IO uint32_t DOUTR11; + __IO uint32_t DOUTR12; + __IO uint32_t DOUTR13; + __IO uint32_t DOUTR14; + __IO uint32_t DOUTR15; + __IO uint32_t DOUTR16; + __IO uint32_t DOUTR17; + __IO uint32_t DOUTR18; + __IO uint32_t DOUTR19; + __IO uint32_t DOUTR20; + __IO uint32_t DOUTR21; + __IO uint32_t DOUTR22; + __IO uint32_t DOUTR23; + __IO uint32_t DOUTR24; + __IO uint32_t DOUTR25; + __IO uint32_t DOUTR26; + __IO uint32_t DOUTR27; + __IO uint32_t DOUTR28; + __IO uint32_t DOUTR29; + __IO uint32_t DOUTR30; + __IO uint32_t DOUTR31; +} MDIOS_TypeDef; + + +/** + * @brief USB_OTG_Core_Registers + */ +typedef struct +{ + __IO uint32_t GOTGCTL; /*!< USB_OTG Control and Status Register 000h */ + __IO uint32_t GOTGINT; /*!< USB_OTG Interrupt Register 004h */ + __IO uint32_t GAHBCFG; /*!< Core AHB Configuration Register 008h */ + __IO uint32_t GUSBCFG; /*!< Core USB Configuration Register 00Ch */ + __IO uint32_t GRSTCTL; /*!< Core Reset Register 010h */ + __IO uint32_t GINTSTS; /*!< Core Interrupt Register 014h */ + __IO uint32_t GINTMSK; /*!< Core Interrupt Mask Register 018h */ + __IO uint32_t GRXSTSR; /*!< Receive Sts Q Read Register 01Ch */ + __IO uint32_t GRXSTSP; /*!< Receive Sts Q Read & POP Register 020h */ + __IO uint32_t GRXFSIZ; /*!< Receive FIFO Size Register 024h */ + __IO uint32_t DIEPTXF0_HNPTXFSIZ; /*!< EP0 / Non Periodic Tx FIFO Size Register 028h */ + __IO uint32_t HNPTXSTS; /*!< Non Periodic Tx FIFO/Queue Sts reg 02Ch */ + uint32_t Reserved30[2]; /*!< Reserved 030h */ + __IO uint32_t GCCFG; /*!< General Purpose IO Register 038h */ + __IO uint32_t CID; /*!< User ID Register 03Ch */ + __IO uint32_t GSNPSID; /* USB_OTG core ID 040h*/ + __IO uint32_t GHWCFG1; /* User HW config1 044h*/ + __IO uint32_t GHWCFG2; /* User HW config2 048h*/ + __IO uint32_t GHWCFG3; /*!< User HW config3 04Ch */ + uint32_t Reserved6; /*!< Reserved 050h */ + __IO uint32_t GLPMCFG; /*!< LPM Register 054h */ + __IO uint32_t GPWRDN; /*!< Power Down Register 058h */ + __IO uint32_t GDFIFOCFG; /*!< DFIFO Software Config Register 05Ch */ + __IO uint32_t GADPCTL; /*!< ADP Timer, Control and Status Register 60Ch */ + uint32_t Reserved43[39]; /*!< Reserved 058h-0FFh */ + __IO uint32_t HPTXFSIZ; /*!< Host Periodic Tx FIFO Size Reg 100h */ + __IO uint32_t DIEPTXF[0x0F]; /*!< dev Periodic Transmit FIFO */ +} USB_OTG_GlobalTypeDef; + + +/** + * @brief USB_OTG_device_Registers + */ +typedef struct +{ + __IO uint32_t DCFG; /*!< dev Configuration Register 800h */ + __IO uint32_t DCTL; /*!< dev Control Register 804h */ + __IO uint32_t DSTS; /*!< dev Status Register (RO) 808h */ + uint32_t Reserved0C; /*!< Reserved 80Ch */ + __IO uint32_t DIEPMSK; /*!< dev IN Endpoint Mask 810h */ + __IO uint32_t DOEPMSK; /*!< dev OUT Endpoint Mask 814h */ + __IO uint32_t DAINT; /*!< dev All Endpoints Itr Reg 818h */ + __IO uint32_t DAINTMSK; /*!< dev All Endpoints Itr Mask 81Ch */ + uint32_t Reserved20; /*!< Reserved 820h */ + uint32_t Reserved9; /*!< Reserved 824h */ + __IO uint32_t DVBUSDIS; /*!< dev VBUS discharge Register 828h */ + __IO uint32_t DVBUSPULSE; /*!< dev VBUS Pulse Register 82Ch */ + __IO uint32_t DTHRCTL; /*!< dev threshold 830h */ + __IO uint32_t DIEPEMPMSK; /*!< dev empty msk 834h */ + __IO uint32_t DEACHINT; /*!< dedicated EP interrupt 838h */ + __IO uint32_t DEACHMSK; /*!< dedicated EP msk 83Ch */ + uint32_t Reserved40; /*!< dedicated EP mask 840h */ + __IO uint32_t DINEP1MSK; /*!< dedicated EP mask 844h */ + uint32_t Reserved44[15]; /*!< Reserved 844-87Ch */ + __IO uint32_t DOUTEP1MSK; /*!< dedicated EP msk 884h */ +} USB_OTG_DeviceTypeDef; + + +/** + * @brief USB_OTG_IN_Endpoint-Specific_Register + */ +typedef struct +{ + __IO uint32_t DIEPCTL; /*!< dev IN Endpoint Control Reg 900h + (ep_num * 20h) + 00h */ + uint32_t Reserved04; /*!< Reserved 900h + (ep_num * 20h) + 04h */ + __IO uint32_t DIEPINT; /*!< dev IN Endpoint Itr Reg 900h + (ep_num * 20h) + 08h */ + uint32_t Reserved0C; /*!< Reserved 900h + (ep_num * 20h) + 0Ch */ + __IO uint32_t DIEPTSIZ; /*!< IN Endpoint Txfer Size 900h + (ep_num * 20h) + 10h */ + __IO uint32_t DIEPDMA; /*!< IN Endpoint DMA Address Reg 900h + (ep_num * 20h) + 14h */ + __IO uint32_t DTXFSTS; /*!< IN Endpoint Tx FIFO Status Reg 900h + (ep_num * 20h) + 18h */ + uint32_t Reserved18; /*!< Reserved 900h+(ep_num*20h)+1Ch-900h+ (ep_num * 20h) + 1Ch */ +} USB_OTG_INEndpointTypeDef; + + +/** + * @brief USB_OTG_OUT_Endpoint-Specific_Registers + */ +typedef struct +{ + __IO uint32_t DOEPCTL; /*!< dev OUT Endpoint Control Reg B00h + (ep_num * 20h) + 00h */ + uint32_t Reserved04; /*!< Reserved B00h + (ep_num * 20h) + 04h */ + __IO uint32_t DOEPINT; /*!< dev OUT Endpoint Itr Reg B00h + (ep_num * 20h) + 08h */ + uint32_t Reserved0C; /*!< Reserved B00h + (ep_num * 20h) + 0Ch */ + __IO uint32_t DOEPTSIZ; /*!< dev OUT Endpoint Txfer Size B00h + (ep_num * 20h) + 10h */ + __IO uint32_t DOEPDMA; /*!< dev OUT Endpoint DMA Address B00h + (ep_num * 20h) + 14h */ + uint32_t Reserved18[2]; /*!< Reserved B00h + (ep_num * 20h) + 18h - B00h + (ep_num * 20h) + 1Ch */ +} USB_OTG_OUTEndpointTypeDef; + + +/** + * @brief USB_OTG_Host_Mode_Register_Structures + */ +typedef struct +{ + __IO uint32_t HCFG; /*!< Host Configuration Register 400h */ + __IO uint32_t HFIR; /*!< Host Frame Interval Register 404h */ + __IO uint32_t HFNUM; /*!< Host Frame Nbr/Frame Remaining 408h */ + uint32_t Reserved40C; /*!< Reserved 40Ch */ + __IO uint32_t HPTXSTS; /*!< Host Periodic Tx FIFO/ Queue Status 410h */ + __IO uint32_t HAINT; /*!< Host All Channels Interrupt Register 414h */ + __IO uint32_t HAINTMSK; /*!< Host All Channels Interrupt Mask 418h */ +} USB_OTG_HostTypeDef; + +/** + * @brief USB_OTG_Host_Channel_Specific_Registers + */ +typedef struct +{ + __IO uint32_t HCCHAR; /*!< Host Channel Characteristics Register 500h */ + __IO uint32_t HCSPLT; /*!< Host Channel Split Control Register 504h */ + __IO uint32_t HCINT; /*!< Host Channel Interrupt Register 508h */ + __IO uint32_t HCINTMSK; /*!< Host Channel Interrupt Mask Register 50Ch */ + __IO uint32_t HCTSIZ; /*!< Host Channel Transfer Size Register 510h */ + __IO uint32_t HCDMA; /*!< Host Channel DMA Address Register 514h */ + uint32_t Reserved[2]; /*!< Reserved */ +} USB_OTG_HostChannelTypeDef; +/** + * @} + */ + +/** + * @brief OCTO Serial Peripheral Interface + */ + +typedef struct +{ + __IO uint32_t CR; /*!< OCTOSPI Control register, Address offset: 0x000 */ + uint32_t RESERVED; /*!< Reserved, Address offset: 0x004 */ + __IO uint32_t DCR1; /*!< OCTOSPI Device Configuration register 1, Address offset: 0x008 */ + __IO uint32_t DCR2; /*!< OCTOSPI Device Configuration register 2, Address offset: 0x00C */ + __IO uint32_t DCR3; /*!< OCTOSPI Device Configuration register 3, Address offset: 0x010 */ + __IO uint32_t DCR4; /*!< OCTOSPI Device Configuration register 4, Address offset: 0x014 */ + uint32_t RESERVED1[2]; /*!< Reserved, Address offset: 0x018-0x01C */ + __IO uint32_t SR; /*!< OCTOSPI Status register, Address offset: 0x020 */ + __IO uint32_t FCR; /*!< OCTOSPI Flag Clear register, Address offset: 0x024 */ + uint32_t RESERVED2[6]; /*!< Reserved, Address offset: 0x028-0x03C */ + __IO uint32_t DLR; /*!< OCTOSPI Data Length register, Address offset: 0x040 */ + uint32_t RESERVED3; /*!< Reserved, Address offset: 0x044 */ + __IO uint32_t AR; /*!< OCTOSPI Address register, Address offset: 0x048 */ + uint32_t RESERVED4; /*!< Reserved, Address offset: 0x04C */ + __IO uint32_t DR; /*!< OCTOSPI Data register, Address offset: 0x050 */ + uint32_t RESERVED5[11]; /*!< Reserved, Address offset: 0x054-0x07C */ + __IO uint32_t PSMKR; /*!< OCTOSPI Polling Status Mask register, Address offset: 0x080 */ + uint32_t RESERVED6; /*!< Reserved, Address offset: 0x084 */ + __IO uint32_t PSMAR; /*!< OCTOSPI Polling Status Match register, Address offset: 0x088 */ + uint32_t RESERVED7; /*!< Reserved, Address offset: 0x08C */ + __IO uint32_t PIR; /*!< OCTOSPI Polling Interval register, Address offset: 0x090 */ + uint32_t RESERVED8[27]; /*!< Reserved, Address offset: 0x094-0x0FC */ + __IO uint32_t CCR; /*!< OCTOSPI Communication Configuration register, Address offset: 0x100 */ + uint32_t RESERVED9; /*!< Reserved, Address offset: 0x104 */ + __IO uint32_t TCR; /*!< OCTOSPI Timing Configuration register, Address offset: 0x108 */ + uint32_t RESERVED10; /*!< Reserved, Address offset: 0x10C */ + __IO uint32_t IR; /*!< OCTOSPI Instruction register, Address offset: 0x110 */ + uint32_t RESERVED11[3]; /*!< Reserved, Address offset: 0x114-0x11C */ + __IO uint32_t ABR; /*!< OCTOSPI Alternate Bytes register, Address offset: 0x120 */ + uint32_t RESERVED12[3]; /*!< Reserved, Address offset: 0x124-0x12C */ + __IO uint32_t LPTR; /*!< OCTOSPI Low Power Timeout register, Address offset: 0x130 */ + uint32_t RESERVED13[3]; /*!< Reserved, Address offset: 0x134-0x13C */ + __IO uint32_t WPCCR; /*!< OCTOSPI Wrap Communication Configuration register, Address offset: 0x140 */ + uint32_t RESERVED14; /*!< Reserved, Address offset: 0x144 */ + __IO uint32_t WPTCR; /*!< OCTOSPI Wrap Timing Configuration register, Address offset: 0x148 */ + uint32_t RESERVED15; /*!< Reserved, Address offset: 0x14C */ + __IO uint32_t WPIR; /*!< OCTOSPI Wrap Instruction register, Address offset: 0x150 */ + uint32_t RESERVED16[3]; /*!< Reserved, Address offset: 0x154-0x15C */ + __IO uint32_t WPABR; /*!< OCTOSPI Wrap Alternate Bytes register, Address offset: 0x160 */ + uint32_t RESERVED17[7]; /*!< Reserved, Address offset: 0x164-0x17C */ + __IO uint32_t WCCR; /*!< OCTOSPI Write Communication Configuration register, Address offset: 0x180 */ + uint32_t RESERVED18; /*!< Reserved, Address offset: 0x184 */ + __IO uint32_t WTCR; /*!< OCTOSPI Write Timing Configuration register, Address offset: 0x188 */ + uint32_t RESERVED19; /*!< Reserved, Address offset: 0x18C */ + __IO uint32_t WIR; /*!< OCTOSPI Write Instruction register, Address offset: 0x190 */ + uint32_t RESERVED20[3]; /*!< Reserved, Address offset: 0x194-0x19C */ + __IO uint32_t WABR; /*!< OCTOSPI Write Alternate Bytes register, Address offset: 0x1A0 */ + uint32_t RESERVED21[23]; /*!< Reserved, Address offset: 0x1A4-0x1FC */ + __IO uint32_t HLCR; /*!< OCTOSPI Hyperbus Latency Configuration register, Address offset: 0x200 */ + uint32_t RESERVED22[122]; /*!< Reserved, Address offset: 0x204-0x3EC */ + __IO uint32_t HWCFGR; /*!< OCTOSPI HW Configuration register, Address offset: 0x3F0 */ + __IO uint32_t VER; /*!< OCTOSPI Version register, Address offset: 0x3F4 */ + __IO uint32_t ID; /*!< OCTOSPI Identification register, Address offset: 0x3F8 */ + __IO uint32_t MID; /*!< OCTOPSI HW Magic ID register, Address offset: 0x3FC */ +} OCTOSPI_TypeDef; + +/** + * @} + */ +/** + * @brief OCTO Serial Peripheral Interface IO Manager + */ + +typedef struct +{ + __IO uint32_t CR; /*!< OCTOSPI IO Manager Control register, Address offset: 0x00 */ + __IO uint32_t PCR[3]; /*!< OCTOSPI IO Manager Port[1:3] Configuration register, Address offset: 0x04-0x20 */ +} OCTOSPIM_TypeDef; + +/** + * @} + */ + +/** + * @brief OTFD register + */ +typedef struct +{ + __IO uint32_t REG_CONFIGR; + __IO uint32_t REG_START_ADDR; + __IO uint32_t REG_END_ADDR; + __IO uint32_t REG_NONCER0; + __IO uint32_t REG_NONCER1; + __IO uint32_t REG_KEYR0; + __IO uint32_t REG_KEYR1; + __IO uint32_t REG_KEYR2; + __IO uint32_t REG_KEYR3; +} OTFDEC_Region_TypeDef; + +typedef struct +{ + __IO uint32_t CR; + uint32_t RESERVED1[191]; + __IO uint32_t ISR; + __IO uint32_t ICR; + __IO uint32_t IER; + uint32_t RESERVED2[56]; + __IO uint32_t HWCFGR2; + __IO uint32_t HWCFGR1; + __IO uint32_t VERR; + __IO uint32_t IPIDR; + __IO uint32_t SIDR; +} OTFDEC_TypeDef; +/** + * @} + */ + +/** @addtogroup Peripheral_memory_map + * @{ + */ +#define D1_ITCMRAM_BASE (0x00000000UL) /*!< Base address of : 64KB RAM reserved for CPU execution/instruction accessible over ITCM */ +#define D1_ITCMICP_BASE (0x00100000UL) /*!< Base address of : (up to 128KB) embedded Test FLASH memory accessible over ITCM */ +#define D1_DTCMRAM_BASE (0x20000000UL) /*!< Base address of : 128KB system data RAM accessible over DTCM */ +#define D1_AXIFLASH_BASE (0x08000000UL) /*!< Base address of : (up to 1 MB) embedded FLASH memory accessible over AXI */ +#define D1_AXIICP_BASE (0x1FF00000UL) /*!< Base address of : (up to 128KB) embedded Test FLASH memory accessible over AXI */ +#define D1_AXISRAM1_BASE (0x24000000UL) /*!< Base address of : (up to 128KB) system data RAM1 accessible over over AXI */ +#define D1_AXISRAM2_BASE (0x24020000UL) /*!< Base address of : (up to 192KB) system data RAM2 accessible over over AXI to be shared with ITCM (64K granularity) */ +#define D1_AXISRAM_BASE D1_AXISRAM1_BASE /*!< Base address of : (up to 320KB) system data RAM1/2 accessible over over AXI */ + +#define D2_AHBSRAM1_BASE (0x30000000UL) /*!< Base address of : (up to 16KB) system data RAM accessible over over AXI->AHB Bridge */ +#define D2_AHBSRAM2_BASE (0x30004000UL) /*!< Base address of : (up to 16KB) system data RAM accessible over over AXI->AHB Bridge */ +#define D2_AHBSRAM_BASE D2_AHBSRAM1_BASE /*!< Base address of : (up to 32KB) system data RAM1/2 accessible over over AXI->AHB Bridge */ + +#define D3_BKPSRAM_BASE (0x38800000UL) /*!< Base address of : Backup SRAM(4 KB) over AXI->AHB Bridge */ +#define D3_SRAM_BASE (0x38000000UL) /*!< Base address of : Backup SRAM(16 KB) over AXI->AHB Bridge */ + +#define PERIPH_BASE (0x40000000UL) /*!< Base address of : AHB/APB Peripherals */ +#define OCTOSPI1_BASE (0x90000000UL) /*!< Base address of : OCTOSPI1 memories accessible over AXI */ +#define OCTOSPI2_BASE (0x70000000UL) /*!< Base address of : OCTOSPI2 memories accessible over AXI */ + +#define FLASH_BANK1_BASE (0x08000000UL) /*!< Base address of : (up to 1 MB) Flash Bank1 accessible over AXI */ +#define FLASH_END (0x080FFFFFUL) /*!< FLASH end address */ + + +/* Legacy define */ +#define FLASH_BASE FLASH_BANK1_BASE + +/*!< Device electronic signature memory map */ +#define UID_BASE (0x1FF1E800UL) /*!< Unique device ID register base address */ +#define FLASHSIZE_BASE (0x1FF1E880UL) /*!< FLASH Size register base address */ + + +/*!< Peripheral memory map */ +#define D2_APB1PERIPH_BASE PERIPH_BASE +#define D2_APB2PERIPH_BASE (PERIPH_BASE + 0x00010000UL) +#define D2_AHB1PERIPH_BASE (PERIPH_BASE + 0x00020000UL) +#define D2_AHB2PERIPH_BASE (PERIPH_BASE + 0x08020000UL) + +#define D1_APB1PERIPH_BASE (PERIPH_BASE + 0x10000000UL) +#define D1_AHB1PERIPH_BASE (PERIPH_BASE + 0x12000000UL) + +#define D3_APB1PERIPH_BASE (PERIPH_BASE + 0x18000000UL) +#define D3_AHB1PERIPH_BASE (PERIPH_BASE + 0x18020000UL) + +/*!< Legacy Peripheral memory map */ +#define APB1PERIPH_BASE PERIPH_BASE +#define APB2PERIPH_BASE (PERIPH_BASE + 0x00010000UL) +#define AHB1PERIPH_BASE (PERIPH_BASE + 0x00020000UL) +#define AHB2PERIPH_BASE (PERIPH_BASE + 0x08000000UL) + + +/*!< D1_AHB1PERIPH peripherals */ + +#define MDMA_BASE (D1_AHB1PERIPH_BASE + 0x0000UL) +#define DMA2D_BASE (D1_AHB1PERIPH_BASE + 0x1000UL) +#define FLASH_R_BASE (D1_AHB1PERIPH_BASE + 0x2000UL) +#define FMC_R_BASE (D1_AHB1PERIPH_BASE + 0x4000UL) +#define OCTOSPI1_R_BASE (D1_AHB1PERIPH_BASE + 0x5000UL) +#define DLYB_OCTOSPI1_BASE (D1_AHB1PERIPH_BASE + 0x6000UL) +#define SDMMC1_BASE (D1_AHB1PERIPH_BASE + 0x7000UL) +#define DLYB_SDMMC1_BASE (D1_AHB1PERIPH_BASE + 0x8000UL) +#define RAMECC1_BASE (D1_AHB1PERIPH_BASE + 0x9000UL) +#define OCTOSPI2_R_BASE (D1_AHB1PERIPH_BASE + 0xA000UL) +#define DLYB_OCTOSPI2_BASE (D1_AHB1PERIPH_BASE + 0xB000UL) +#define OCTOSPIM_BASE (D1_AHB1PERIPH_BASE + 0xB400UL) + +#define OTFDEC1_BASE (D1_AHB1PERIPH_BASE + 0xB800UL) +#define OTFDEC1_REGION1_BASE (OTFDEC1_BASE + 0x20UL) +#define OTFDEC1_REGION2_BASE (OTFDEC1_BASE + 0x50UL) +#define OTFDEC1_REGION3_BASE (OTFDEC1_BASE + 0x80UL) +#define OTFDEC1_REGION4_BASE (OTFDEC1_BASE + 0xB0UL) +#define OTFDEC2_BASE (D1_AHB1PERIPH_BASE + 0xBC00UL) +#define OTFDEC2_REGION1_BASE (OTFDEC2_BASE + 0x20UL) +#define OTFDEC2_REGION2_BASE (OTFDEC2_BASE + 0x50UL) +#define OTFDEC2_REGION3_BASE (OTFDEC2_BASE + 0x80UL) +#define OTFDEC2_REGION4_BASE (OTFDEC2_BASE + 0xB0UL) + +/*!< D2_AHB1PERIPH peripherals */ + +#define DMA1_BASE (D2_AHB1PERIPH_BASE + 0x0000UL) +#define DMA2_BASE (D2_AHB1PERIPH_BASE + 0x0400UL) +#define DMAMUX1_BASE (D2_AHB1PERIPH_BASE + 0x0800UL) +#define ADC1_BASE (D2_AHB1PERIPH_BASE + 0x2000UL) +#define ADC2_BASE (D2_AHB1PERIPH_BASE + 0x2100UL) +#define ADC12_COMMON_BASE (D2_AHB1PERIPH_BASE + 0x2300UL) +#define ETH_BASE (D2_AHB1PERIPH_BASE + 0x8000UL) +#define ETH_MAC_BASE (ETH_BASE) + +/*!< USB registers base address */ +#define USB1_OTG_HS_PERIPH_BASE (0x40040000UL) +#define USB_OTG_GLOBAL_BASE (0x000UL) +#define USB_OTG_DEVICE_BASE (0x800UL) +#define USB_OTG_IN_ENDPOINT_BASE (0x900UL) +#define USB_OTG_OUT_ENDPOINT_BASE (0xB00UL) +#define USB_OTG_EP_REG_SIZE (0x20UL) +#define USB_OTG_HOST_BASE (0x400UL) +#define USB_OTG_HOST_PORT_BASE (0x440UL) +#define USB_OTG_HOST_CHANNEL_BASE (0x500UL) +#define USB_OTG_HOST_CHANNEL_SIZE (0x20UL) +#define USB_OTG_PCGCCTL_BASE (0xE00UL) +#define USB_OTG_FIFO_BASE (0x1000UL) +#define USB_OTG_FIFO_SIZE (0x1000UL) + +/*!< D2_AHB2PERIPH peripherals */ + +#define DCMI_BASE (D2_AHB2PERIPH_BASE + 0x0000UL) +#define PSSI_BASE (D2_AHB2PERIPH_BASE + 0x0400UL) +#define CRYP_BASE (D2_AHB2PERIPH_BASE + 0x1000UL) +#define HASH_BASE (D2_AHB2PERIPH_BASE + 0x1400UL) +#define HASH_DIGEST_BASE (D2_AHB2PERIPH_BASE + 0x1710UL) +#define RNG_BASE (D2_AHB2PERIPH_BASE + 0x1800UL) +#define SDMMC2_BASE (D2_AHB2PERIPH_BASE + 0x2400UL) +#define DLYB_SDMMC2_BASE (D2_AHB2PERIPH_BASE + 0x2800UL) +#define RAMECC2_BASE (D2_AHB2PERIPH_BASE + 0x3000UL) +#define FMAC_BASE (D2_AHB2PERIPH_BASE + 0x4000UL) +#define CORDIC_BASE (D2_AHB2PERIPH_BASE + 0x4400UL) + +/*!< D3_AHB1PERIPH peripherals */ +#define GPIOA_BASE (D3_AHB1PERIPH_BASE + 0x0000UL) +#define GPIOB_BASE (D3_AHB1PERIPH_BASE + 0x0400UL) +#define GPIOC_BASE (D3_AHB1PERIPH_BASE + 0x0800UL) +#define GPIOD_BASE (D3_AHB1PERIPH_BASE + 0x0C00UL) +#define GPIOE_BASE (D3_AHB1PERIPH_BASE + 0x1000UL) +#define GPIOF_BASE (D3_AHB1PERIPH_BASE + 0x1400UL) +#define GPIOG_BASE (D3_AHB1PERIPH_BASE + 0x1800UL) +#define GPIOH_BASE (D3_AHB1PERIPH_BASE + 0x1C00UL) +#define GPIOJ_BASE (D3_AHB1PERIPH_BASE + 0x2400UL) +#define GPIOK_BASE (D3_AHB1PERIPH_BASE + 0x2800UL) +#define RCC_BASE (D3_AHB1PERIPH_BASE + 0x4400UL) +#define PWR_BASE (D3_AHB1PERIPH_BASE + 0x4800UL) +#define CRC_BASE (D3_AHB1PERIPH_BASE + 0x4C00UL) +#define BDMA_BASE (D3_AHB1PERIPH_BASE + 0x5400UL) +#define DMAMUX2_BASE (D3_AHB1PERIPH_BASE + 0x5800UL) +#define ADC3_BASE (D3_AHB1PERIPH_BASE + 0x6000UL) +#define ADC3_COMMON_BASE (D3_AHB1PERIPH_BASE + 0x6300UL) +#define HSEM_BASE (D3_AHB1PERIPH_BASE + 0x6400UL) +#define RAMECC3_BASE (D3_AHB1PERIPH_BASE + 0x7000UL) + +/*!< D1_APB1PERIPH peripherals */ +#define LTDC_BASE (D1_APB1PERIPH_BASE + 0x1000UL) +#define LTDC_Layer1_BASE (LTDC_BASE + 0x84UL) +#define LTDC_Layer2_BASE (LTDC_BASE + 0x104UL) +#define WWDG1_BASE (D1_APB1PERIPH_BASE + 0x3000UL) + +/*!< D2_APB1PERIPH peripherals */ +#define TIM2_BASE (D2_APB1PERIPH_BASE + 0x0000UL) +#define TIM3_BASE (D2_APB1PERIPH_BASE + 0x0400UL) +#define TIM4_BASE (D2_APB1PERIPH_BASE + 0x0800UL) +#define TIM5_BASE (D2_APB1PERIPH_BASE + 0x0C00UL) +#define TIM6_BASE (D2_APB1PERIPH_BASE + 0x1000UL) +#define TIM7_BASE (D2_APB1PERIPH_BASE + 0x1400UL) +#define TIM12_BASE (D2_APB1PERIPH_BASE + 0x1800UL) +#define TIM13_BASE (D2_APB1PERIPH_BASE + 0x1C00UL) +#define TIM14_BASE (D2_APB1PERIPH_BASE + 0x2000UL) +#define LPTIM1_BASE (D2_APB1PERIPH_BASE + 0x2400UL) + + +#define SPI2_BASE (D2_APB1PERIPH_BASE + 0x3800UL) +#define SPI3_BASE (D2_APB1PERIPH_BASE + 0x3C00UL) +#define SPDIFRX_BASE (D2_APB1PERIPH_BASE + 0x4000UL) +#define USART2_BASE (D2_APB1PERIPH_BASE + 0x4400UL) +#define USART3_BASE (D2_APB1PERIPH_BASE + 0x4800UL) +#define UART4_BASE (D2_APB1PERIPH_BASE + 0x4C00UL) +#define UART5_BASE (D2_APB1PERIPH_BASE + 0x5000UL) +#define I2C1_BASE (D2_APB1PERIPH_BASE + 0x5400UL) +#define I2C2_BASE (D2_APB1PERIPH_BASE + 0x5800UL) +#define I2C3_BASE (D2_APB1PERIPH_BASE + 0x5C00UL) +#define I2C5_BASE (D2_APB1PERIPH_BASE + 0x6400UL) +#define CEC_BASE (D2_APB1PERIPH_BASE + 0x6C00UL) +#define DAC1_BASE (D2_APB1PERIPH_BASE + 0x7400UL) +#define UART7_BASE (D2_APB1PERIPH_BASE + 0x7800UL) +#define UART8_BASE (D2_APB1PERIPH_BASE + 0x7C00UL) +#define CRS_BASE (D2_APB1PERIPH_BASE + 0x8400UL) +#define SWPMI1_BASE (D2_APB1PERIPH_BASE + 0x8800UL) +#define OPAMP_BASE (D2_APB1PERIPH_BASE + 0x9000UL) +#define OPAMP1_BASE (D2_APB1PERIPH_BASE + 0x9000UL) +#define OPAMP2_BASE (D2_APB1PERIPH_BASE + 0x9010UL) +#define MDIOS_BASE (D2_APB1PERIPH_BASE + 0x9400UL) +#define FDCAN1_BASE (D2_APB1PERIPH_BASE + 0xA000UL) +#define FDCAN2_BASE (D2_APB1PERIPH_BASE + 0xA400UL) +#define FDCAN_CCU_BASE (D2_APB1PERIPH_BASE + 0xA800UL) +#define SRAMCAN_BASE (D2_APB1PERIPH_BASE + 0xAC00UL) +#define FDCAN3_BASE (D2_APB1PERIPH_BASE + 0xD400UL) +#define TIM23_BASE (D2_APB1PERIPH_BASE + 0xE000UL) +#define TIM24_BASE (D2_APB1PERIPH_BASE + 0xE400UL) + +/*!< D2_APB2PERIPH peripherals */ + +#define TIM1_BASE (D2_APB2PERIPH_BASE + 0x0000UL) +#define TIM8_BASE (D2_APB2PERIPH_BASE + 0x0400UL) +#define USART1_BASE (D2_APB2PERIPH_BASE + 0x1000UL) +#define USART6_BASE (D2_APB2PERIPH_BASE + 0x1400UL) +#define UART9_BASE (D2_APB2PERIPH_BASE + 0x1800UL) +#define USART10_BASE (D2_APB2PERIPH_BASE + 0x1C00UL) +#define SPI1_BASE (D2_APB2PERIPH_BASE + 0x3000UL) +#define SPI4_BASE (D2_APB2PERIPH_BASE + 0x3400UL) +#define TIM15_BASE (D2_APB2PERIPH_BASE + 0x4000UL) +#define TIM16_BASE (D2_APB2PERIPH_BASE + 0x4400UL) +#define TIM17_BASE (D2_APB2PERIPH_BASE + 0x4800UL) +#define SPI5_BASE (D2_APB2PERIPH_BASE + 0x5000UL) +#define SAI1_BASE (D2_APB2PERIPH_BASE + 0x5800UL) +#define SAI1_Block_A_BASE (SAI1_BASE + 0x004UL) +#define SAI1_Block_B_BASE (SAI1_BASE + 0x024UL) +#define DFSDM1_BASE (D2_APB2PERIPH_BASE + 0x7800UL) +#define DFSDM1_Channel0_BASE (DFSDM1_BASE + 0x00UL) +#define DFSDM1_Channel1_BASE (DFSDM1_BASE + 0x20UL) +#define DFSDM1_Channel2_BASE (DFSDM1_BASE + 0x40UL) +#define DFSDM1_Channel3_BASE (DFSDM1_BASE + 0x60UL) +#define DFSDM1_Channel4_BASE (DFSDM1_BASE + 0x80UL) +#define DFSDM1_Channel5_BASE (DFSDM1_BASE + 0xA0UL) +#define DFSDM1_Channel6_BASE (DFSDM1_BASE + 0xC0UL) +#define DFSDM1_Channel7_BASE (DFSDM1_BASE + 0xE0UL) +#define DFSDM1_Filter0_BASE (DFSDM1_BASE + 0x100UL) +#define DFSDM1_Filter1_BASE (DFSDM1_BASE + 0x180UL) +#define DFSDM1_Filter2_BASE (DFSDM1_BASE + 0x200UL) +#define DFSDM1_Filter3_BASE (DFSDM1_BASE + 0x280UL) + + +/*!< D3_APB1PERIPH peripherals */ +#define EXTI_BASE (D3_APB1PERIPH_BASE + 0x0000UL) +#define EXTI_D1_BASE (EXTI_BASE + 0x0080UL) +#define EXTI_D2_BASE (EXTI_BASE + 0x00C0UL) +#define SYSCFG_BASE (D3_APB1PERIPH_BASE + 0x0400UL) +#define LPUART1_BASE (D3_APB1PERIPH_BASE + 0x0C00UL) +#define SPI6_BASE (D3_APB1PERIPH_BASE + 0x1400UL) +#define I2C4_BASE (D3_APB1PERIPH_BASE + 0x1C00UL) +#define LPTIM2_BASE (D3_APB1PERIPH_BASE + 0x2400UL) +#define LPTIM3_BASE (D3_APB1PERIPH_BASE + 0x2800UL) +#define LPTIM4_BASE (D3_APB1PERIPH_BASE + 0x2C00UL) +#define LPTIM5_BASE (D3_APB1PERIPH_BASE + 0x3000UL) +#define COMP12_BASE (D3_APB1PERIPH_BASE + 0x3800UL) +#define COMP1_BASE (COMP12_BASE + 0x0CUL) +#define COMP2_BASE (COMP12_BASE + 0x10UL) +#define VREFBUF_BASE (D3_APB1PERIPH_BASE + 0x3C00UL) +#define RTC_BASE (D3_APB1PERIPH_BASE + 0x4000UL) +#define IWDG1_BASE (D3_APB1PERIPH_BASE + 0x4800UL) + + +#define SAI4_BASE (D3_APB1PERIPH_BASE + 0x5400UL) +#define SAI4_Block_A_BASE (SAI4_BASE + 0x004UL) +#define SAI4_Block_B_BASE (SAI4_BASE + 0x024UL) + +#define DTS_BASE (D3_APB1PERIPH_BASE + 0x6800UL) + + + +#define BDMA_Channel0_BASE (BDMA_BASE + 0x0008UL) +#define BDMA_Channel1_BASE (BDMA_BASE + 0x001CUL) +#define BDMA_Channel2_BASE (BDMA_BASE + 0x0030UL) +#define BDMA_Channel3_BASE (BDMA_BASE + 0x0044UL) +#define BDMA_Channel4_BASE (BDMA_BASE + 0x0058UL) +#define BDMA_Channel5_BASE (BDMA_BASE + 0x006CUL) +#define BDMA_Channel6_BASE (BDMA_BASE + 0x0080UL) +#define BDMA_Channel7_BASE (BDMA_BASE + 0x0094UL) + +#define DMAMUX2_Channel0_BASE (DMAMUX2_BASE) +#define DMAMUX2_Channel1_BASE (DMAMUX2_BASE + 0x0004UL) +#define DMAMUX2_Channel2_BASE (DMAMUX2_BASE + 0x0008UL) +#define DMAMUX2_Channel3_BASE (DMAMUX2_BASE + 0x000CUL) +#define DMAMUX2_Channel4_BASE (DMAMUX2_BASE + 0x0010UL) +#define DMAMUX2_Channel5_BASE (DMAMUX2_BASE + 0x0014UL) +#define DMAMUX2_Channel6_BASE (DMAMUX2_BASE + 0x0018UL) +#define DMAMUX2_Channel7_BASE (DMAMUX2_BASE + 0x001CUL) + +#define DMAMUX2_RequestGenerator0_BASE (DMAMUX2_BASE + 0x0100UL) +#define DMAMUX2_RequestGenerator1_BASE (DMAMUX2_BASE + 0x0104UL) +#define DMAMUX2_RequestGenerator2_BASE (DMAMUX2_BASE + 0x0108UL) +#define DMAMUX2_RequestGenerator3_BASE (DMAMUX2_BASE + 0x010CUL) +#define DMAMUX2_RequestGenerator4_BASE (DMAMUX2_BASE + 0x0110UL) +#define DMAMUX2_RequestGenerator5_BASE (DMAMUX2_BASE + 0x0114UL) +#define DMAMUX2_RequestGenerator6_BASE (DMAMUX2_BASE + 0x0118UL) +#define DMAMUX2_RequestGenerator7_BASE (DMAMUX2_BASE + 0x011CUL) + +#define DMAMUX2_ChannelStatus_BASE (DMAMUX2_BASE + 0x0080UL) +#define DMAMUX2_RequestGenStatus_BASE (DMAMUX2_BASE + 0x0140UL) + +#define DMA1_Stream0_BASE (DMA1_BASE + 0x010UL) +#define DMA1_Stream1_BASE (DMA1_BASE + 0x028UL) +#define DMA1_Stream2_BASE (DMA1_BASE + 0x040UL) +#define DMA1_Stream3_BASE (DMA1_BASE + 0x058UL) +#define DMA1_Stream4_BASE (DMA1_BASE + 0x070UL) +#define DMA1_Stream5_BASE (DMA1_BASE + 0x088UL) +#define DMA1_Stream6_BASE (DMA1_BASE + 0x0A0UL) +#define DMA1_Stream7_BASE (DMA1_BASE + 0x0B8UL) + +#define DMA2_Stream0_BASE (DMA2_BASE + 0x010UL) +#define DMA2_Stream1_BASE (DMA2_BASE + 0x028UL) +#define DMA2_Stream2_BASE (DMA2_BASE + 0x040UL) +#define DMA2_Stream3_BASE (DMA2_BASE + 0x058UL) +#define DMA2_Stream4_BASE (DMA2_BASE + 0x070UL) +#define DMA2_Stream5_BASE (DMA2_BASE + 0x088UL) +#define DMA2_Stream6_BASE (DMA2_BASE + 0x0A0UL) +#define DMA2_Stream7_BASE (DMA2_BASE + 0x0B8UL) + +#define DMAMUX1_Channel0_BASE (DMAMUX1_BASE) +#define DMAMUX1_Channel1_BASE (DMAMUX1_BASE + 0x0004UL) +#define DMAMUX1_Channel2_BASE (DMAMUX1_BASE + 0x0008UL) +#define DMAMUX1_Channel3_BASE (DMAMUX1_BASE + 0x000CUL) +#define DMAMUX1_Channel4_BASE (DMAMUX1_BASE + 0x0010UL) +#define DMAMUX1_Channel5_BASE (DMAMUX1_BASE + 0x0014UL) +#define DMAMUX1_Channel6_BASE (DMAMUX1_BASE + 0x0018UL) +#define DMAMUX1_Channel7_BASE (DMAMUX1_BASE + 0x001CUL) +#define DMAMUX1_Channel8_BASE (DMAMUX1_BASE + 0x0020UL) +#define DMAMUX1_Channel9_BASE (DMAMUX1_BASE + 0x0024UL) +#define DMAMUX1_Channel10_BASE (DMAMUX1_BASE + 0x0028UL) +#define DMAMUX1_Channel11_BASE (DMAMUX1_BASE + 0x002CUL) +#define DMAMUX1_Channel12_BASE (DMAMUX1_BASE + 0x0030UL) +#define DMAMUX1_Channel13_BASE (DMAMUX1_BASE + 0x0034UL) +#define DMAMUX1_Channel14_BASE (DMAMUX1_BASE + 0x0038UL) +#define DMAMUX1_Channel15_BASE (DMAMUX1_BASE + 0x003CUL) + +#define DMAMUX1_RequestGenerator0_BASE (DMAMUX1_BASE + 0x0100UL) +#define DMAMUX1_RequestGenerator1_BASE (DMAMUX1_BASE + 0x0104UL) +#define DMAMUX1_RequestGenerator2_BASE (DMAMUX1_BASE + 0x0108UL) +#define DMAMUX1_RequestGenerator3_BASE (DMAMUX1_BASE + 0x010CUL) +#define DMAMUX1_RequestGenerator4_BASE (DMAMUX1_BASE + 0x0110UL) +#define DMAMUX1_RequestGenerator5_BASE (DMAMUX1_BASE + 0x0114UL) +#define DMAMUX1_RequestGenerator6_BASE (DMAMUX1_BASE + 0x0118UL) +#define DMAMUX1_RequestGenerator7_BASE (DMAMUX1_BASE + 0x011CUL) + +#define DMAMUX1_ChannelStatus_BASE (DMAMUX1_BASE + 0x0080UL) +#define DMAMUX1_RequestGenStatus_BASE (DMAMUX1_BASE + 0x0140UL) + +/*!< FMC Banks registers base address */ +#define FMC_Bank1_R_BASE (FMC_R_BASE + 0x0000UL) +#define FMC_Bank1E_R_BASE (FMC_R_BASE + 0x0104UL) +#define FMC_Bank2_R_BASE (FMC_R_BASE + 0x0060UL) +#define FMC_Bank3_R_BASE (FMC_R_BASE + 0x0080UL) +#define FMC_Bank5_6_R_BASE (FMC_R_BASE + 0x0140UL) + +/* Debug MCU registers base address */ +#define DBGMCU_BASE (0x5C001000UL) + +#define MDMA_Channel0_BASE (MDMA_BASE + 0x00000040UL) +#define MDMA_Channel1_BASE (MDMA_BASE + 0x00000080UL) +#define MDMA_Channel2_BASE (MDMA_BASE + 0x000000C0UL) +#define MDMA_Channel3_BASE (MDMA_BASE + 0x00000100UL) +#define MDMA_Channel4_BASE (MDMA_BASE + 0x00000140UL) +#define MDMA_Channel5_BASE (MDMA_BASE + 0x00000180UL) +#define MDMA_Channel6_BASE (MDMA_BASE + 0x000001C0UL) +#define MDMA_Channel7_BASE (MDMA_BASE + 0x00000200UL) +#define MDMA_Channel8_BASE (MDMA_BASE + 0x00000240UL) +#define MDMA_Channel9_BASE (MDMA_BASE + 0x00000280UL) +#define MDMA_Channel10_BASE (MDMA_BASE + 0x000002C0UL) +#define MDMA_Channel11_BASE (MDMA_BASE + 0x00000300UL) +#define MDMA_Channel12_BASE (MDMA_BASE + 0x00000340UL) +#define MDMA_Channel13_BASE (MDMA_BASE + 0x00000380UL) +#define MDMA_Channel14_BASE (MDMA_BASE + 0x000003C0UL) +#define MDMA_Channel15_BASE (MDMA_BASE + 0x00000400UL) + +#define RAMECC1_Monitor1_BASE (RAMECC1_BASE + 0x20UL) +#define RAMECC1_Monitor2_BASE (RAMECC1_BASE + 0x40UL) +#define RAMECC1_Monitor3_BASE (RAMECC1_BASE + 0x60UL) +#define RAMECC1_Monitor4_BASE (RAMECC1_BASE + 0x80UL) +#define RAMECC1_Monitor5_BASE (RAMECC1_BASE + 0xA0UL) +#define RAMECC1_Monitor6_BASE (RAMECC1_BASE + 0xC0UL) + +#define RAMECC2_Monitor1_BASE (RAMECC2_BASE + 0x20UL) +#define RAMECC2_Monitor2_BASE (RAMECC2_BASE + 0x40UL) +#define RAMECC2_Monitor3_BASE (RAMECC2_BASE + 0x60UL) + +#define RAMECC3_Monitor1_BASE (RAMECC3_BASE + 0x20UL) +#define RAMECC3_Monitor2_BASE (RAMECC3_BASE + 0x40UL) + + +/** + * @} + */ + +/** @addtogroup Peripheral_declaration + * @{ + */ +#define TIM2 ((TIM_TypeDef *) TIM2_BASE) +#define TIM3 ((TIM_TypeDef *) TIM3_BASE) +#define TIM4 ((TIM_TypeDef *) TIM4_BASE) +#define TIM5 ((TIM_TypeDef *) TIM5_BASE) +#define TIM6 ((TIM_TypeDef *) TIM6_BASE) +#define TIM7 ((TIM_TypeDef *) TIM7_BASE) +#define TIM13 ((TIM_TypeDef *) TIM13_BASE) +#define TIM14 ((TIM_TypeDef *) TIM14_BASE) +#define VREFBUF ((VREFBUF_TypeDef *) VREFBUF_BASE) +#define RTC ((RTC_TypeDef *) RTC_BASE) +#define WWDG1 ((WWDG_TypeDef *) WWDG1_BASE) + + +#define IWDG1 ((IWDG_TypeDef *) IWDG1_BASE) +#define SPI2 ((SPI_TypeDef *) SPI2_BASE) +#define SPI3 ((SPI_TypeDef *) SPI3_BASE) +#define SPI4 ((SPI_TypeDef *) SPI4_BASE) +#define SPI5 ((SPI_TypeDef *) SPI5_BASE) +#define SPI6 ((SPI_TypeDef *) SPI6_BASE) +#define USART2 ((USART_TypeDef *) USART2_BASE) +#define USART3 ((USART_TypeDef *) USART3_BASE) +#define USART6 ((USART_TypeDef *) USART6_BASE) +#define USART10 ((USART_TypeDef *) USART10_BASE) +#define UART7 ((USART_TypeDef *) UART7_BASE) +#define UART8 ((USART_TypeDef *) UART8_BASE) +#define UART9 ((USART_TypeDef *) UART9_BASE) +#define CRS ((CRS_TypeDef *) CRS_BASE) +#define UART4 ((USART_TypeDef *) UART4_BASE) +#define UART5 ((USART_TypeDef *) UART5_BASE) +#define I2C1 ((I2C_TypeDef *) I2C1_BASE) +#define I2C2 ((I2C_TypeDef *) I2C2_BASE) +#define I2C3 ((I2C_TypeDef *) I2C3_BASE) +#define I2C4 ((I2C_TypeDef *) I2C4_BASE) +#define I2C5 ((I2C_TypeDef *) I2C5_BASE) +#define FDCAN1 ((FDCAN_GlobalTypeDef *) FDCAN1_BASE) +#define FDCAN2 ((FDCAN_GlobalTypeDef *) FDCAN2_BASE) +#define FDCAN_CCU ((FDCAN_ClockCalibrationUnit_TypeDef *) FDCAN_CCU_BASE) +#define FDCAN3 ((FDCAN_GlobalTypeDef *) FDCAN3_BASE) +#define TIM23 ((TIM_TypeDef *) TIM23_BASE) +#define TIM24 ((TIM_TypeDef *) TIM24_BASE) +#define CEC ((CEC_TypeDef *) CEC_BASE) +#define LPTIM1 ((LPTIM_TypeDef *) LPTIM1_BASE) +#define PWR ((PWR_TypeDef *) PWR_BASE) +#define DAC1 ((DAC_TypeDef *) DAC1_BASE) +#define LPUART1 ((USART_TypeDef *) LPUART1_BASE) +#define SWPMI1 ((SWPMI_TypeDef *) SWPMI1_BASE) +#define LPTIM2 ((LPTIM_TypeDef *) LPTIM2_BASE) +#define LPTIM3 ((LPTIM_TypeDef *) LPTIM3_BASE) +#define DTS ((DTS_TypeDef *) DTS_BASE) +#define LPTIM4 ((LPTIM_TypeDef *) LPTIM4_BASE) +#define LPTIM5 ((LPTIM_TypeDef *) LPTIM5_BASE) + +#define SYSCFG ((SYSCFG_TypeDef *) SYSCFG_BASE) +#define COMP12 ((COMPOPT_TypeDef *) COMP12_BASE) +#define COMP1 ((COMP_TypeDef *) COMP1_BASE) +#define COMP2 ((COMP_TypeDef *) COMP2_BASE) +#define COMP12_COMMON ((COMP_Common_TypeDef *) COMP2_BASE) +#define OPAMP ((OPAMP_TypeDef *) OPAMP_BASE) +#define OPAMP1 ((OPAMP_TypeDef *) OPAMP1_BASE) +#define OPAMP2 ((OPAMP_TypeDef *) OPAMP2_BASE) + + +#define EXTI ((EXTI_TypeDef *) EXTI_BASE) +#define EXTI_D1 ((EXTI_Core_TypeDef *) EXTI_D1_BASE) +#define EXTI_D2 ((EXTI_Core_TypeDef *) EXTI_D2_BASE) +#define TIM1 ((TIM_TypeDef *) TIM1_BASE) +#define SPI1 ((SPI_TypeDef *) SPI1_BASE) +#define TIM8 ((TIM_TypeDef *) TIM8_BASE) +#define USART1 ((USART_TypeDef *) USART1_BASE) +#define TIM12 ((TIM_TypeDef *) TIM12_BASE) +#define TIM15 ((TIM_TypeDef *) TIM15_BASE) +#define TIM16 ((TIM_TypeDef *) TIM16_BASE) +#define TIM17 ((TIM_TypeDef *) TIM17_BASE) +#define SAI1 ((SAI_TypeDef *) SAI1_BASE) +#define SAI1_Block_A ((SAI_Block_TypeDef *)SAI1_Block_A_BASE) +#define SAI1_Block_B ((SAI_Block_TypeDef *)SAI1_Block_B_BASE) +#define SAI4 ((SAI_TypeDef *) SAI4_BASE) +#define SAI4_Block_A ((SAI_Block_TypeDef *)SAI4_Block_A_BASE) +#define SAI4_Block_B ((SAI_Block_TypeDef *)SAI4_Block_B_BASE) + +#define SPDIFRX ((SPDIFRX_TypeDef *) SPDIFRX_BASE) +#define DFSDM1_Channel0 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel0_BASE) +#define DFSDM1_Channel1 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel1_BASE) +#define DFSDM1_Channel2 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel2_BASE) +#define DFSDM1_Channel3 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel3_BASE) +#define DFSDM1_Channel4 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel4_BASE) +#define DFSDM1_Channel5 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel5_BASE) +#define DFSDM1_Channel6 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel6_BASE) +#define DFSDM1_Channel7 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel7_BASE) +#define DFSDM1_Filter0 ((DFSDM_Filter_TypeDef *) DFSDM1_Filter0_BASE) +#define DFSDM1_Filter1 ((DFSDM_Filter_TypeDef *) DFSDM1_Filter1_BASE) +#define DFSDM1_Filter2 ((DFSDM_Filter_TypeDef *) DFSDM1_Filter2_BASE) +#define DFSDM1_Filter3 ((DFSDM_Filter_TypeDef *) DFSDM1_Filter3_BASE) +#define DMA2D ((DMA2D_TypeDef *) DMA2D_BASE) +#define DCMI ((DCMI_TypeDef *) DCMI_BASE) +#define PSSI ((PSSI_TypeDef *) PSSI_BASE) +#define RCC ((RCC_TypeDef *) RCC_BASE) +#define FLASH ((FLASH_TypeDef *) FLASH_R_BASE) +#define CRC ((CRC_TypeDef *) CRC_BASE) + +#define GPIOA ((GPIO_TypeDef *) GPIOA_BASE) +#define GPIOB ((GPIO_TypeDef *) GPIOB_BASE) +#define GPIOC ((GPIO_TypeDef *) GPIOC_BASE) +#define GPIOD ((GPIO_TypeDef *) GPIOD_BASE) +#define GPIOE ((GPIO_TypeDef *) GPIOE_BASE) +#define GPIOF ((GPIO_TypeDef *) GPIOF_BASE) +#define GPIOG ((GPIO_TypeDef *) GPIOG_BASE) +#define GPIOH ((GPIO_TypeDef *) GPIOH_BASE) +#define GPIOJ ((GPIO_TypeDef *) GPIOJ_BASE) +#define GPIOK ((GPIO_TypeDef *) GPIOK_BASE) + +#define ADC1 ((ADC_TypeDef *) ADC1_BASE) +#define ADC2 ((ADC_TypeDef *) ADC2_BASE) +#define ADC3 ((ADC_TypeDef *) ADC3_BASE) +#define ADC3_COMMON ((ADC_Common_TypeDef *) ADC3_COMMON_BASE) +#define ADC12_COMMON ((ADC_Common_TypeDef *) ADC12_COMMON_BASE) + +#define CRYP ((CRYP_TypeDef *) CRYP_BASE) +#define HASH ((HASH_TypeDef *) HASH_BASE) +#define HASH_DIGEST ((HASH_DIGEST_TypeDef *) HASH_DIGEST_BASE) +#define RNG ((RNG_TypeDef *) RNG_BASE) +#define SDMMC2 ((SDMMC_TypeDef *) SDMMC2_BASE) +#define DLYB_SDMMC2 ((DLYB_TypeDef *) DLYB_SDMMC2_BASE) +#define FMAC ((FMAC_TypeDef *) FMAC_BASE) +#define CORDIC ((CORDIC_TypeDef *) CORDIC_BASE) + +#define BDMA ((BDMA_TypeDef *) BDMA_BASE) +#define BDMA_Channel0 ((BDMA_Channel_TypeDef *) BDMA_Channel0_BASE) +#define BDMA_Channel1 ((BDMA_Channel_TypeDef *) BDMA_Channel1_BASE) +#define BDMA_Channel2 ((BDMA_Channel_TypeDef *) BDMA_Channel2_BASE) +#define BDMA_Channel3 ((BDMA_Channel_TypeDef *) BDMA_Channel3_BASE) +#define BDMA_Channel4 ((BDMA_Channel_TypeDef *) BDMA_Channel4_BASE) +#define BDMA_Channel5 ((BDMA_Channel_TypeDef *) BDMA_Channel5_BASE) +#define BDMA_Channel6 ((BDMA_Channel_TypeDef *) BDMA_Channel6_BASE) +#define BDMA_Channel7 ((BDMA_Channel_TypeDef *) BDMA_Channel7_BASE) + +#define RAMECC1 ((RAMECC_TypeDef *)RAMECC1_BASE) +#define RAMECC1_Monitor1 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor1_BASE) +#define RAMECC1_Monitor2 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor2_BASE) +#define RAMECC1_Monitor3 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor3_BASE) +#define RAMECC1_Monitor4 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor4_BASE) +#define RAMECC1_Monitor5 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor5_BASE) +#define RAMECC1_Monitor6 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor6_BASE) + +#define RAMECC2 ((RAMECC_TypeDef *)RAMECC2_BASE) +#define RAMECC2_Monitor1 ((RAMECC_MonitorTypeDef *)RAMECC2_Monitor1_BASE) +#define RAMECC2_Monitor2 ((RAMECC_MonitorTypeDef *)RAMECC2_Monitor2_BASE) +#define RAMECC2_Monitor3 ((RAMECC_MonitorTypeDef *)RAMECC2_Monitor3_BASE) + +#define RAMECC3 ((RAMECC_TypeDef *)RAMECC3_BASE) +#define RAMECC3_Monitor1 ((RAMECC_MonitorTypeDef *)RAMECC3_Monitor1_BASE) +#define RAMECC3_Monitor2 ((RAMECC_MonitorTypeDef *)RAMECC3_Monitor2_BASE) + +#define DMAMUX2 ((DMAMUX_Channel_TypeDef *) DMAMUX2_BASE) +#define DMAMUX2_Channel0 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel0_BASE) +#define DMAMUX2_Channel1 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel1_BASE) +#define DMAMUX2_Channel2 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel2_BASE) +#define DMAMUX2_Channel3 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel3_BASE) +#define DMAMUX2_Channel4 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel4_BASE) +#define DMAMUX2_Channel5 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel5_BASE) +#define DMAMUX2_Channel6 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel6_BASE) +#define DMAMUX2_Channel7 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel7_BASE) + + +#define DMAMUX2_RequestGenerator0 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator0_BASE) +#define DMAMUX2_RequestGenerator1 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator1_BASE) +#define DMAMUX2_RequestGenerator2 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator2_BASE) +#define DMAMUX2_RequestGenerator3 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator3_BASE) +#define DMAMUX2_RequestGenerator4 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator4_BASE) +#define DMAMUX2_RequestGenerator5 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator5_BASE) +#define DMAMUX2_RequestGenerator6 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator6_BASE) +#define DMAMUX2_RequestGenerator7 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator7_BASE) + +#define DMAMUX2_ChannelStatus ((DMAMUX_ChannelStatus_TypeDef *) DMAMUX2_ChannelStatus_BASE) +#define DMAMUX2_RequestGenStatus ((DMAMUX_RequestGenStatus_TypeDef *) DMAMUX2_RequestGenStatus_BASE) + +#define DMA2 ((DMA_TypeDef *) DMA2_BASE) +#define DMA2_Stream0 ((DMA_Stream_TypeDef *) DMA2_Stream0_BASE) +#define DMA2_Stream1 ((DMA_Stream_TypeDef *) DMA2_Stream1_BASE) +#define DMA2_Stream2 ((DMA_Stream_TypeDef *) DMA2_Stream2_BASE) +#define DMA2_Stream3 ((DMA_Stream_TypeDef *) DMA2_Stream3_BASE) +#define DMA2_Stream4 ((DMA_Stream_TypeDef *) DMA2_Stream4_BASE) +#define DMA2_Stream5 ((DMA_Stream_TypeDef *) DMA2_Stream5_BASE) +#define DMA2_Stream6 ((DMA_Stream_TypeDef *) DMA2_Stream6_BASE) +#define DMA2_Stream7 ((DMA_Stream_TypeDef *) DMA2_Stream7_BASE) + +#define DMA1 ((DMA_TypeDef *) DMA1_BASE) +#define DMA1_Stream0 ((DMA_Stream_TypeDef *) DMA1_Stream0_BASE) +#define DMA1_Stream1 ((DMA_Stream_TypeDef *) DMA1_Stream1_BASE) +#define DMA1_Stream2 ((DMA_Stream_TypeDef *) DMA1_Stream2_BASE) +#define DMA1_Stream3 ((DMA_Stream_TypeDef *) DMA1_Stream3_BASE) +#define DMA1_Stream4 ((DMA_Stream_TypeDef *) DMA1_Stream4_BASE) +#define DMA1_Stream5 ((DMA_Stream_TypeDef *) DMA1_Stream5_BASE) +#define DMA1_Stream6 ((DMA_Stream_TypeDef *) DMA1_Stream6_BASE) +#define DMA1_Stream7 ((DMA_Stream_TypeDef *) DMA1_Stream7_BASE) + + +#define DMAMUX1 ((DMAMUX_Channel_TypeDef *) DMAMUX1_BASE) +#define DMAMUX1_Channel0 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel0_BASE) +#define DMAMUX1_Channel1 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel1_BASE) +#define DMAMUX1_Channel2 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel2_BASE) +#define DMAMUX1_Channel3 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel3_BASE) +#define DMAMUX1_Channel4 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel4_BASE) +#define DMAMUX1_Channel5 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel5_BASE) +#define DMAMUX1_Channel6 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel6_BASE) +#define DMAMUX1_Channel7 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel7_BASE) +#define DMAMUX1_Channel8 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel8_BASE) +#define DMAMUX1_Channel9 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel9_BASE) +#define DMAMUX1_Channel10 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel10_BASE) +#define DMAMUX1_Channel11 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel11_BASE) +#define DMAMUX1_Channel12 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel12_BASE) +#define DMAMUX1_Channel13 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel13_BASE) +#define DMAMUX1_Channel14 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel14_BASE) +#define DMAMUX1_Channel15 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel15_BASE) + +#define DMAMUX1_RequestGenerator0 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator0_BASE) +#define DMAMUX1_RequestGenerator1 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator1_BASE) +#define DMAMUX1_RequestGenerator2 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator2_BASE) +#define DMAMUX1_RequestGenerator3 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator3_BASE) +#define DMAMUX1_RequestGenerator4 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator4_BASE) +#define DMAMUX1_RequestGenerator5 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator5_BASE) +#define DMAMUX1_RequestGenerator6 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator6_BASE) +#define DMAMUX1_RequestGenerator7 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator7_BASE) + +#define DMAMUX1_ChannelStatus ((DMAMUX_ChannelStatus_TypeDef *) DMAMUX1_ChannelStatus_BASE) +#define DMAMUX1_RequestGenStatus ((DMAMUX_RequestGenStatus_TypeDef *) DMAMUX1_RequestGenStatus_BASE) + + +#define FMC_Bank1_R ((FMC_Bank1_TypeDef *) FMC_Bank1_R_BASE) +#define FMC_Bank1E_R ((FMC_Bank1E_TypeDef *) FMC_Bank1E_R_BASE) +#define FMC_Bank2_R ((FMC_Bank2_TypeDef *) FMC_Bank2_R_BASE) +#define FMC_Bank3_R ((FMC_Bank3_TypeDef *) FMC_Bank3_R_BASE) +#define FMC_Bank5_6_R ((FMC_Bank5_6_TypeDef *) FMC_Bank5_6_R_BASE) + +#define OCTOSPI1 ((OCTOSPI_TypeDef *) OCTOSPI1_R_BASE) +#define DLYB_OCTOSPI1 ((DLYB_TypeDef *) DLYB_OCTOSPI1_BASE) +#define OCTOSPI2 ((OCTOSPI_TypeDef *) OCTOSPI2_R_BASE) +#define DLYB_OCTOSPI2 ((DLYB_TypeDef *) DLYB_OCTOSPI2_BASE) +#define OCTOSPIM ((OCTOSPIM_TypeDef *) OCTOSPIM_BASE) + +#define OTFDEC1 ((OTFDEC_TypeDef *) OTFDEC1_BASE) +#define OTFDEC1_REGION1 ((OTFDEC_Region_TypeDef *) OTFDEC1_REGION1_BASE) +#define OTFDEC1_REGION2 ((OTFDEC_Region_TypeDef *) OTFDEC1_REGION2_BASE) +#define OTFDEC1_REGION3 ((OTFDEC_Region_TypeDef *) OTFDEC1_REGION3_BASE) +#define OTFDEC1_REGION4 ((OTFDEC_Region_TypeDef *) OTFDEC1_REGION4_BASE) + +#define OTFDEC2 ((OTFDEC_TypeDef *) OTFDEC2_BASE) +#define OTFDEC2_REGION1 ((OTFDEC_Region_TypeDef *) OTFDEC2_REGION1_BASE) +#define OTFDEC2_REGION2 ((OTFDEC_Region_TypeDef *) OTFDEC2_REGION2_BASE) +#define OTFDEC2_REGION3 ((OTFDEC_Region_TypeDef *) OTFDEC2_REGION3_BASE) +#define OTFDEC2_REGION4 ((OTFDEC_Region_TypeDef *) OTFDEC2_REGION4_BASE) + +#define SDMMC1 ((SDMMC_TypeDef *) SDMMC1_BASE) +#define DLYB_SDMMC1 ((DLYB_TypeDef *) DLYB_SDMMC1_BASE) + +#define DBGMCU ((DBGMCU_TypeDef *) DBGMCU_BASE) + +#define HSEM ((HSEM_TypeDef *) HSEM_BASE) +#define HSEM_COMMON ((HSEM_Common_TypeDef *) (HSEM_BASE + 0x100UL)) + +#define LTDC ((LTDC_TypeDef *)LTDC_BASE) +#define LTDC_Layer1 ((LTDC_Layer_TypeDef *)LTDC_Layer1_BASE) +#define LTDC_Layer2 ((LTDC_Layer_TypeDef *)LTDC_Layer2_BASE) + +#define MDIOS ((MDIOS_TypeDef *) MDIOS_BASE) + +#define ETH ((ETH_TypeDef *)ETH_BASE) +#define MDMA ((MDMA_TypeDef *)MDMA_BASE) +#define MDMA_Channel0 ((MDMA_Channel_TypeDef *)MDMA_Channel0_BASE) +#define MDMA_Channel1 ((MDMA_Channel_TypeDef *)MDMA_Channel1_BASE) +#define MDMA_Channel2 ((MDMA_Channel_TypeDef *)MDMA_Channel2_BASE) +#define MDMA_Channel3 ((MDMA_Channel_TypeDef *)MDMA_Channel3_BASE) +#define MDMA_Channel4 ((MDMA_Channel_TypeDef *)MDMA_Channel4_BASE) +#define MDMA_Channel5 ((MDMA_Channel_TypeDef *)MDMA_Channel5_BASE) +#define MDMA_Channel6 ((MDMA_Channel_TypeDef *)MDMA_Channel6_BASE) +#define MDMA_Channel7 ((MDMA_Channel_TypeDef *)MDMA_Channel7_BASE) +#define MDMA_Channel8 ((MDMA_Channel_TypeDef *)MDMA_Channel8_BASE) +#define MDMA_Channel9 ((MDMA_Channel_TypeDef *)MDMA_Channel9_BASE) +#define MDMA_Channel10 ((MDMA_Channel_TypeDef *)MDMA_Channel10_BASE) +#define MDMA_Channel11 ((MDMA_Channel_TypeDef *)MDMA_Channel11_BASE) +#define MDMA_Channel12 ((MDMA_Channel_TypeDef *)MDMA_Channel12_BASE) +#define MDMA_Channel13 ((MDMA_Channel_TypeDef *)MDMA_Channel13_BASE) +#define MDMA_Channel14 ((MDMA_Channel_TypeDef *)MDMA_Channel14_BASE) +#define MDMA_Channel15 ((MDMA_Channel_TypeDef *)MDMA_Channel15_BASE) + + +#define USB1_OTG_HS ((USB_OTG_GlobalTypeDef *) USB1_OTG_HS_PERIPH_BASE) + +/* Legacy defines */ +#define USB_OTG_HS USB1_OTG_HS +#define USB_OTG_HS_PERIPH_BASE USB1_OTG_HS_PERIPH_BASE + +/** + * @} + */ + +/** @addtogroup Exported_constants + * @{ + */ + + /** @addtogroup Peripheral_Registers_Bits_Definition + * @{ + */ + +/******************************************************************************/ +/* Peripheral Registers_Bits_Definition */ +/******************************************************************************/ + +/******************************************************************************/ +/* */ +/* Analog to Digital Converter */ +/* */ +/******************************************************************************/ +/******************************* ADC VERSION ********************************/ +#define ADC_VER_V5_V90 +/******************** Bit definition for ADC_ISR register ********************/ +#define ADC_ISR_ADRDY_Pos (0U) +#define ADC_ISR_ADRDY_Msk (0x1UL << ADC_ISR_ADRDY_Pos) /*!< 0x00000001 */ +#define ADC_ISR_ADRDY ADC_ISR_ADRDY_Msk /*!< ADC Ready (ADRDY) flag */ +#define ADC_ISR_EOSMP_Pos (1U) +#define ADC_ISR_EOSMP_Msk (0x1UL << ADC_ISR_EOSMP_Pos) /*!< 0x00000002 */ +#define ADC_ISR_EOSMP ADC_ISR_EOSMP_Msk /*!< ADC End of Sampling flag */ +#define ADC_ISR_EOC_Pos (2U) +#define ADC_ISR_EOC_Msk (0x1UL << ADC_ISR_EOC_Pos) /*!< 0x00000004 */ +#define ADC_ISR_EOC ADC_ISR_EOC_Msk /*!< ADC End of Regular Conversion flag */ +#define ADC_ISR_EOS_Pos (3U) +#define ADC_ISR_EOS_Msk (0x1UL << ADC_ISR_EOS_Pos) /*!< 0x00000008 */ +#define ADC_ISR_EOS ADC_ISR_EOS_Msk /*!< ADC End of Regular sequence of Conversions flag */ +#define ADC_ISR_OVR_Pos (4U) +#define ADC_ISR_OVR_Msk (0x1UL << ADC_ISR_OVR_Pos) /*!< 0x00000010 */ +#define ADC_ISR_OVR ADC_ISR_OVR_Msk /*!< ADC overrun flag */ +#define ADC_ISR_JEOC_Pos (5U) +#define ADC_ISR_JEOC_Msk (0x1UL << ADC_ISR_JEOC_Pos) /*!< 0x00000020 */ +#define ADC_ISR_JEOC ADC_ISR_JEOC_Msk /*!< ADC End of Injected Conversion flag */ +#define ADC_ISR_JEOS_Pos (6U) +#define ADC_ISR_JEOS_Msk (0x1UL << ADC_ISR_JEOS_Pos) /*!< 0x00000040 */ +#define ADC_ISR_JEOS ADC_ISR_JEOS_Msk /*!< ADC End of Injected sequence of Conversions flag */ +#define ADC_ISR_AWD1_Pos (7U) +#define ADC_ISR_AWD1_Msk (0x1UL << ADC_ISR_AWD1_Pos) /*!< 0x00000080 */ +#define ADC_ISR_AWD1 ADC_ISR_AWD1_Msk /*!< ADC Analog watchdog 1 flag */ +#define ADC_ISR_AWD2_Pos (8U) +#define ADC_ISR_AWD2_Msk (0x1UL << ADC_ISR_AWD2_Pos) /*!< 0x00000100 */ +#define ADC_ISR_AWD2 ADC_ISR_AWD2_Msk /*!< ADC Analog watchdog 2 flag */ +#define ADC_ISR_AWD3_Pos (9U) +#define ADC_ISR_AWD3_Msk (0x1UL << ADC_ISR_AWD3_Pos) /*!< 0x00000200 */ +#define ADC_ISR_AWD3 ADC_ISR_AWD3_Msk /*!< ADC Analog watchdog 3 flag */ +#define ADC_ISR_JQOVF_Pos (10U) +#define ADC_ISR_JQOVF_Msk (0x1UL << ADC_ISR_JQOVF_Pos) /*!< 0x00000400 */ +#define ADC_ISR_JQOVF ADC_ISR_JQOVF_Msk /*!< ADC Injected Context Queue Overflow flag */ + +/******************** Bit definition for ADC_IER register ********************/ +#define ADC_IER_ADRDYIE_Pos (0U) +#define ADC_IER_ADRDYIE_Msk (0x1UL << ADC_IER_ADRDYIE_Pos) /*!< 0x00000001 */ +#define ADC_IER_ADRDYIE ADC_IER_ADRDYIE_Msk /*!< ADC Ready (ADRDY) interrupt source */ +#define ADC_IER_EOSMPIE_Pos (1U) +#define ADC_IER_EOSMPIE_Msk (0x1UL << ADC_IER_EOSMPIE_Pos) /*!< 0x00000002 */ +#define ADC_IER_EOSMPIE ADC_IER_EOSMPIE_Msk /*!< ADC End of Sampling interrupt source */ +#define ADC_IER_EOCIE_Pos (2U) +#define ADC_IER_EOCIE_Msk (0x1UL << ADC_IER_EOCIE_Pos) /*!< 0x00000004 */ +#define ADC_IER_EOCIE ADC_IER_EOCIE_Msk /*!< ADC End of Regular Conversion interrupt source */ +#define ADC_IER_EOSIE_Pos (3U) +#define ADC_IER_EOSIE_Msk (0x1UL << ADC_IER_EOSIE_Pos) /*!< 0x00000008 */ +#define ADC_IER_EOSIE ADC_IER_EOSIE_Msk /*!< ADC End of Regular sequence of Conversions interrupt source */ +#define ADC_IER_OVRIE_Pos (4U) +#define ADC_IER_OVRIE_Msk (0x1UL << ADC_IER_OVRIE_Pos) /*!< 0x00000010 */ +#define ADC_IER_OVRIE ADC_IER_OVRIE_Msk /*!< ADC overrun interrupt source */ +#define ADC_IER_JEOCIE_Pos (5U) +#define ADC_IER_JEOCIE_Msk (0x1UL << ADC_IER_JEOCIE_Pos) /*!< 0x00000020 */ +#define ADC_IER_JEOCIE ADC_IER_JEOCIE_Msk /*!< ADC End of Injected Conversion interrupt source */ +#define ADC_IER_JEOSIE_Pos (6U) +#define ADC_IER_JEOSIE_Msk (0x1UL << ADC_IER_JEOSIE_Pos) /*!< 0x00000040 */ +#define ADC_IER_JEOSIE ADC_IER_JEOSIE_Msk /*!< ADC End of Injected sequence of Conversions interrupt source */ +#define ADC_IER_AWD1IE_Pos (7U) +#define ADC_IER_AWD1IE_Msk (0x1UL << ADC_IER_AWD1IE_Pos) /*!< 0x00000080 */ +#define ADC_IER_AWD1IE ADC_IER_AWD1IE_Msk /*!< ADC Analog watchdog 1 interrupt source */ +#define ADC_IER_AWD2IE_Pos (8U) +#define ADC_IER_AWD2IE_Msk (0x1UL << ADC_IER_AWD2IE_Pos) /*!< 0x00000100 */ +#define ADC_IER_AWD2IE ADC_IER_AWD2IE_Msk /*!< ADC Analog watchdog 2 interrupt source */ +#define ADC_IER_AWD3IE_Pos (9U) +#define ADC_IER_AWD3IE_Msk (0x1UL << ADC_IER_AWD3IE_Pos) /*!< 0x00000200 */ +#define ADC_IER_AWD3IE ADC_IER_AWD3IE_Msk /*!< ADC Analog watchdog 3 interrupt source */ +#define ADC_IER_JQOVFIE_Pos (10U) +#define ADC_IER_JQOVFIE_Msk (0x1UL << ADC_IER_JQOVFIE_Pos) /*!< 0x00000400 */ +#define ADC_IER_JQOVFIE ADC_IER_JQOVFIE_Msk /*!< ADC Injected Context Queue Overflow interrupt source */ + +/******************** Bit definition for ADC_CR register ********************/ +#define ADC_CR_ADEN_Pos (0U) +#define ADC_CR_ADEN_Msk (0x1UL << ADC_CR_ADEN_Pos) /*!< 0x00000001 */ +#define ADC_CR_ADEN ADC_CR_ADEN_Msk /*!< ADC Enable control */ +#define ADC_CR_ADDIS_Pos (1U) +#define ADC_CR_ADDIS_Msk (0x1UL << ADC_CR_ADDIS_Pos) /*!< 0x00000002 */ +#define ADC_CR_ADDIS ADC_CR_ADDIS_Msk /*!< ADC Disable command */ +#define ADC_CR_ADSTART_Pos (2U) +#define ADC_CR_ADSTART_Msk (0x1UL << ADC_CR_ADSTART_Pos) /*!< 0x00000004 */ +#define ADC_CR_ADSTART ADC_CR_ADSTART_Msk /*!< ADC Start of Regular conversion */ +#define ADC_CR_JADSTART_Pos (3U) +#define ADC_CR_JADSTART_Msk (0x1UL << ADC_CR_JADSTART_Pos) /*!< 0x00000008 */ +#define ADC_CR_JADSTART ADC_CR_JADSTART_Msk /*!< ADC Start of injected conversion */ +#define ADC_CR_ADSTP_Pos (4U) +#define ADC_CR_ADSTP_Msk (0x1UL << ADC_CR_ADSTP_Pos) /*!< 0x00000010 */ +#define ADC_CR_ADSTP ADC_CR_ADSTP_Msk /*!< ADC Stop of Regular conversion */ +#define ADC_CR_JADSTP_Pos (5U) +#define ADC_CR_JADSTP_Msk (0x1UL << ADC_CR_JADSTP_Pos) /*!< 0x00000020 */ +#define ADC_CR_JADSTP ADC_CR_JADSTP_Msk /*!< ADC Stop of injected conversion */ +#define ADC_CR_BOOST_Pos (8U) +#define ADC_CR_BOOST_Msk (0x3UL << ADC_CR_BOOST_Pos) /*!< 0x00000300 */ +#define ADC_CR_BOOST ADC_CR_BOOST_Msk /*!< ADC Boost Mode configuration */ +#define ADC_CR_BOOST_0 (0x1UL << ADC_CR_BOOST_Pos) /*!< 0x00000100 */ +#define ADC_CR_BOOST_1 (0x2UL << ADC_CR_BOOST_Pos) /*!< 0x00000200 */ +#define ADC_CR_ADCALLIN_Pos (16U) +#define ADC_CR_ADCALLIN_Msk (0x1UL << ADC_CR_ADCALLIN_Pos) /*!< 0x00010000 */ +#define ADC_CR_ADCALLIN ADC_CR_ADCALLIN_Msk /*!< ADC Linearity calibration */ +#define ADC_CR_LINCALRDYW1_Pos (22U) +#define ADC_CR_LINCALRDYW1_Msk (0x1UL << ADC_CR_LINCALRDYW1_Pos) /*!< 0x00400000 */ +#define ADC_CR_LINCALRDYW1 ADC_CR_LINCALRDYW1_Msk /*!< ADC Linearity calibration ready Word 1 */ +#define ADC_CR_LINCALRDYW2_Pos (23U) +#define ADC_CR_LINCALRDYW2_Msk (0x1UL << ADC_CR_LINCALRDYW2_Pos) /*!< 0x00800000 */ +#define ADC_CR_LINCALRDYW2 ADC_CR_LINCALRDYW2_Msk /*!< ADC Linearity calibration ready Word 2 */ +#define ADC_CR_LINCALRDYW3_Pos (24U) +#define ADC_CR_LINCALRDYW3_Msk (0x1UL << ADC_CR_LINCALRDYW3_Pos) /*!< 0x01000000 */ +#define ADC_CR_LINCALRDYW3 ADC_CR_LINCALRDYW3_Msk /*!< ADC Linearity calibration ready Word 3 */ +#define ADC_CR_LINCALRDYW4_Pos (25U) +#define ADC_CR_LINCALRDYW4_Msk (0x1UL << ADC_CR_LINCALRDYW4_Pos) /*!< 0x02000000 */ +#define ADC_CR_LINCALRDYW4 ADC_CR_LINCALRDYW4_Msk /*!< ADC Linearity calibration ready Word 4 */ +#define ADC_CR_LINCALRDYW5_Pos (26U) +#define ADC_CR_LINCALRDYW5_Msk (0x1UL << ADC_CR_LINCALRDYW5_Pos) /*!< 0x04000000 */ +#define ADC_CR_LINCALRDYW5 ADC_CR_LINCALRDYW5_Msk /*!< ADC Linearity calibration ready Word 5 */ +#define ADC_CR_LINCALRDYW6_Pos (27U) +#define ADC_CR_LINCALRDYW6_Msk (0x1UL << ADC_CR_LINCALRDYW6_Pos) /*!< 0x08000000 */ +#define ADC_CR_LINCALRDYW6 ADC_CR_LINCALRDYW6_Msk /*!< ADC Linearity calibration ready Word 6 */ +#define ADC_CR_ADVREGEN_Pos (28U) +#define ADC_CR_ADVREGEN_Msk (0x1UL << ADC_CR_ADVREGEN_Pos) /*!< 0x10000000 */ +#define ADC_CR_ADVREGEN ADC_CR_ADVREGEN_Msk /*!< ADC Voltage regulator Enable */ +#define ADC_CR_DEEPPWD_Pos (29U) +#define ADC_CR_DEEPPWD_Msk (0x1UL << ADC_CR_DEEPPWD_Pos) /*!< 0x20000000 */ +#define ADC_CR_DEEPPWD ADC_CR_DEEPPWD_Msk /*!< ADC Deep power down Enable */ +#define ADC_CR_ADCALDIF_Pos (30U) +#define ADC_CR_ADCALDIF_Msk (0x1UL << ADC_CR_ADCALDIF_Pos) /*!< 0x40000000 */ +#define ADC_CR_ADCALDIF ADC_CR_ADCALDIF_Msk /*!< ADC Differential Mode for calibration */ +#define ADC_CR_ADCAL_Pos (31U) +#define ADC_CR_ADCAL_Msk (0x1UL << ADC_CR_ADCAL_Pos) /*!< 0x80000000 */ +#define ADC_CR_ADCAL ADC_CR_ADCAL_Msk /*!< ADC Calibration */ + +/******************** Bit definition for ADC_CFGR register ********************/ +#define ADC_CFGR_DMNGT_Pos (0U) +#define ADC_CFGR_DMNGT_Msk (0x3UL << ADC_CFGR_DMNGT_Pos) /*!< 0x00000003 */ +#define ADC_CFGR_DMNGT ADC_CFGR_DMNGT_Msk /*!< ADC Data Management configuration */ +#define ADC_CFGR_DMNGT_0 (0x1UL << ADC_CFGR_DMNGT_Pos) /*!< 0x00000001 */ +#define ADC_CFGR_DMNGT_1 (0x2UL << ADC_CFGR_DMNGT_Pos) /*!< 0x00000002 */ + +#define ADC_CFGR_RES_Pos (2U) +#define ADC_CFGR_RES_Msk (0x7UL << ADC_CFGR_RES_Pos) /*!< 0x0000001C */ +#define ADC_CFGR_RES ADC_CFGR_RES_Msk /*!< ADC Data resolution */ +#define ADC_CFGR_RES_0 (0x1UL << ADC_CFGR_RES_Pos) /*!< 0x00000004 */ +#define ADC_CFGR_RES_1 (0x2UL << ADC_CFGR_RES_Pos) /*!< 0x00000008 */ +#define ADC_CFGR_RES_2 (0x4UL << ADC_CFGR_RES_Pos) /*!< 0x00000010 */ + +#define ADC_CFGR_EXTSEL_Pos (5U) +#define ADC_CFGR_EXTSEL_Msk (0x1FUL << ADC_CFGR_EXTSEL_Pos) /*!< 0x000003E0 */ +#define ADC_CFGR_EXTSEL ADC_CFGR_EXTSEL_Msk /*!< ADC External trigger selection for regular group */ +#define ADC_CFGR_EXTSEL_0 (0x01UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000020 */ +#define ADC_CFGR_EXTSEL_1 (0x02UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000040 */ +#define ADC_CFGR_EXTSEL_2 (0x04UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000080 */ +#define ADC_CFGR_EXTSEL_3 (0x08UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000100 */ +#define ADC_CFGR_EXTSEL_4 (0x10UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000200 */ + +#define ADC_CFGR_EXTEN_Pos (10U) +#define ADC_CFGR_EXTEN_Msk (0x3UL << ADC_CFGR_EXTEN_Pos) /*!< 0x00000C00 */ +#define ADC_CFGR_EXTEN ADC_CFGR_EXTEN_Msk /*!< ADC External trigger enable and polarity selection for regular channels */ +#define ADC_CFGR_EXTEN_0 (0x1UL << ADC_CFGR_EXTEN_Pos) /*!< 0x00000400 */ +#define ADC_CFGR_EXTEN_1 (0x2UL << ADC_CFGR_EXTEN_Pos) /*!< 0x00000800 */ + +#define ADC_CFGR_OVRMOD_Pos (12U) +#define ADC_CFGR_OVRMOD_Msk (0x1UL << ADC_CFGR_OVRMOD_Pos) /*!< 0x00001000 */ +#define ADC_CFGR_OVRMOD ADC_CFGR_OVRMOD_Msk /*!< ADC overrun mode */ +#define ADC_CFGR_CONT_Pos (13U) +#define ADC_CFGR_CONT_Msk (0x1UL << ADC_CFGR_CONT_Pos) /*!< 0x00002000 */ +#define ADC_CFGR_CONT ADC_CFGR_CONT_Msk /*!< ADC Single/continuous conversion mode for regular conversion */ +#define ADC_CFGR_AUTDLY_Pos (14U) +#define ADC_CFGR_AUTDLY_Msk (0x1UL << ADC_CFGR_AUTDLY_Pos) /*!< 0x00004000 */ +#define ADC_CFGR_AUTDLY ADC_CFGR_AUTDLY_Msk /*!< ADC Delayed conversion mode */ + +#define ADC_CFGR_DISCEN_Pos (16U) +#define ADC_CFGR_DISCEN_Msk (0x1UL << ADC_CFGR_DISCEN_Pos) /*!< 0x00010000 */ +#define ADC_CFGR_DISCEN ADC_CFGR_DISCEN_Msk /*!< ADC Discontinuous mode for regular channels */ + +#define ADC_CFGR_DISCNUM_Pos (17U) +#define ADC_CFGR_DISCNUM_Msk (0x7UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x000E0000 */ +#define ADC_CFGR_DISCNUM ADC_CFGR_DISCNUM_Msk /*!< ADC Discontinuous mode channel count */ +#define ADC_CFGR_DISCNUM_0 (0x1UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x00020000 */ +#define ADC_CFGR_DISCNUM_1 (0x2UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x00040000 */ +#define ADC_CFGR_DISCNUM_2 (0x4UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x00080000 */ + +#define ADC_CFGR_JDISCEN_Pos (20U) +#define ADC_CFGR_JDISCEN_Msk (0x1UL << ADC_CFGR_JDISCEN_Pos) /*!< 0x00100000 */ +#define ADC_CFGR_JDISCEN ADC_CFGR_JDISCEN_Msk /*!< ADC Discontinuous mode on injected channels */ +#define ADC_CFGR_JQM_Pos (21U) +#define ADC_CFGR_JQM_Msk (0x1UL << ADC_CFGR_JQM_Pos) /*!< 0x00200000 */ +#define ADC_CFGR_JQM ADC_CFGR_JQM_Msk /*!< ADC JSQR Queue mode */ +#define ADC_CFGR_AWD1SGL_Pos (22U) +#define ADC_CFGR_AWD1SGL_Msk (0x1UL << ADC_CFGR_AWD1SGL_Pos) /*!< 0x00400000 */ +#define ADC_CFGR_AWD1SGL ADC_CFGR_AWD1SGL_Msk /*!< Enable the watchdog 1 on a single channel or on all channels */ +#define ADC_CFGR_AWD1EN_Pos (23U) +#define ADC_CFGR_AWD1EN_Msk (0x1UL << ADC_CFGR_AWD1EN_Pos) /*!< 0x00800000 */ +#define ADC_CFGR_AWD1EN ADC_CFGR_AWD1EN_Msk /*!< ADC Analog watchdog 1 enable on regular Channels */ +#define ADC_CFGR_JAWD1EN_Pos (24U) +#define ADC_CFGR_JAWD1EN_Msk (0x1UL << ADC_CFGR_JAWD1EN_Pos) /*!< 0x01000000 */ +#define ADC_CFGR_JAWD1EN ADC_CFGR_JAWD1EN_Msk /*!< ADC Analog watchdog 1 enable on injected Channels */ +#define ADC_CFGR_JAUTO_Pos (25U) +#define ADC_CFGR_JAUTO_Msk (0x1UL << ADC_CFGR_JAUTO_Pos) /*!< 0x02000000 */ +#define ADC_CFGR_JAUTO ADC_CFGR_JAUTO_Msk /*!< ADC Automatic injected group conversion */ + +#define ADC_CFGR_AWD1CH_Pos (26U) +#define ADC_CFGR_AWD1CH_Msk (0x1FUL << ADC_CFGR_AWD1CH_Pos) /*!< 0x7C000000 */ +#define ADC_CFGR_AWD1CH ADC_CFGR_AWD1CH_Msk /*!< ADC Analog watchdog 1 Channel selection */ +#define ADC_CFGR_AWD1CH_0 (0x01UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x04000000 */ +#define ADC_CFGR_AWD1CH_1 (0x02UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x08000000 */ +#define ADC_CFGR_AWD1CH_2 (0x04UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x10000000 */ +#define ADC_CFGR_AWD1CH_3 (0x08UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x20000000 */ +#define ADC_CFGR_AWD1CH_4 (0x10UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x40000000 */ + +#define ADC_CFGR_JQDIS_Pos (31U) +#define ADC_CFGR_JQDIS_Msk (0x1UL << ADC_CFGR_JQDIS_Pos) /*!< 0x80000000 */ +#define ADC_CFGR_JQDIS ADC_CFGR_JQDIS_Msk /*!< ADC Injected queue disable */ + +#define ADC3_CFGR_DMAEN_Pos (0U) +#define ADC3_CFGR_DMAEN_Msk (0x1UL << ADC3_CFGR_DMAEN_Pos) /*!< 0x00000001 */ +#define ADC3_CFGR_DMAEN ADC3_CFGR_DMAEN_Msk /*!< ADC DMA transfer enable */ +#define ADC3_CFGR_DMACFG_Pos (1U) +#define ADC3_CFGR_DMACFG_Msk (0x1UL << ADC3_CFGR_DMACFG_Pos) /*!< 0x00000002 */ +#define ADC3_CFGR_DMACFG ADC3_CFGR_DMACFG_Msk /*!< ADC DMA transfer configuration */ + +#define ADC3_CFGR_RES_Pos (3U) +#define ADC3_CFGR_RES_Msk (0x3UL << ADC3_CFGR_RES_Pos) /*!< 0x00000018 */ +#define ADC3_CFGR_RES ADC3_CFGR_RES_Msk /*!< ADC data resolution */ +#define ADC3_CFGR_RES_0 (0x1UL << ADC3_CFGR_RES_Pos) /*!< 0x00000008 */ +#define ADC3_CFGR_RES_1 (0x2UL << ADC3_CFGR_RES_Pos) /*!< 0x00000010 */ + +#define ADC3_CFGR_ALIGN_Pos (15U) +#define ADC3_CFGR_ALIGN_Msk (0x1UL << ADC3_CFGR_ALIGN_Pos) /*!< 0x00008000 */ +#define ADC3_CFGR_ALIGN ADC3_CFGR_ALIGN_Msk /*!< ADC data alignement */ +/******************** Bit definition for ADC_CFGR2 register ********************/ +#define ADC_CFGR2_ROVSE_Pos (0U) +#define ADC_CFGR2_ROVSE_Msk (0x1UL << ADC_CFGR2_ROVSE_Pos) /*!< 0x00000001 */ +#define ADC_CFGR2_ROVSE ADC_CFGR2_ROVSE_Msk /*!< ADC Regular group oversampler enable */ +#define ADC_CFGR2_JOVSE_Pos (1U) +#define ADC_CFGR2_JOVSE_Msk (0x1UL << ADC_CFGR2_JOVSE_Pos) /*!< 0x00000002 */ +#define ADC_CFGR2_JOVSE ADC_CFGR2_JOVSE_Msk /*!< ADC Injected group oversampler enable */ + +#define ADC_CFGR2_OVSS_Pos (5U) +#define ADC_CFGR2_OVSS_Msk (0xFUL << ADC_CFGR2_OVSS_Pos) /*!< 0x000001E0 */ +#define ADC_CFGR2_OVSS ADC_CFGR2_OVSS_Msk /*!< ADC Regular Oversampling shift */ +#define ADC_CFGR2_OVSS_0 (0x1UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000020 */ +#define ADC_CFGR2_OVSS_1 (0x2UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000040 */ +#define ADC_CFGR2_OVSS_2 (0x4UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000080 */ +#define ADC_CFGR2_OVSS_3 (0x8UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000100 */ + +#define ADC_CFGR2_TROVS_Pos (9U) +#define ADC_CFGR2_TROVS_Msk (0x1UL << ADC_CFGR2_TROVS_Pos) /*!< 0x00000200 */ +#define ADC_CFGR2_TROVS ADC_CFGR2_TROVS_Msk /*!< ADC Triggered regular Oversampling */ +#define ADC_CFGR2_ROVSM_Pos (10U) +#define ADC_CFGR2_ROVSM_Msk (0x1UL << ADC_CFGR2_ROVSM_Pos) /*!< 0x00000400 */ +#define ADC_CFGR2_ROVSM ADC_CFGR2_ROVSM_Msk /*!< ADC Regular oversampling mode */ + +#define ADC_CFGR2_RSHIFT1_Pos (11U) +#define ADC_CFGR2_RSHIFT1_Msk (0x1UL << ADC_CFGR2_RSHIFT1_Pos) /*!< 0x00000800 */ +#define ADC_CFGR2_RSHIFT1 ADC_CFGR2_RSHIFT1_Msk /*!< ADC Right-shift data after Offset 1 correction */ +#define ADC_CFGR2_RSHIFT2_Pos (12U) +#define ADC_CFGR2_RSHIFT2_Msk (0x1UL << ADC_CFGR2_RSHIFT2_Pos) /*!< 0x00001000 */ +#define ADC_CFGR2_RSHIFT2 ADC_CFGR2_RSHIFT2_Msk /*!< ADC Right-shift data after Offset 2 correction */ +#define ADC_CFGR2_RSHIFT3_Pos (13U) +#define ADC_CFGR2_RSHIFT3_Msk (0x1UL << ADC_CFGR2_RSHIFT3_Pos) /*!< 0x00002000 */ +#define ADC_CFGR2_RSHIFT3 ADC_CFGR2_RSHIFT3_Msk /*!< ADC Right-shift data after Offset 3 correction */ +#define ADC_CFGR2_RSHIFT4_Pos (14U) +#define ADC_CFGR2_RSHIFT4_Msk (0x1UL << ADC_CFGR2_RSHIFT4_Pos) /*!< 0x00004000 */ +#define ADC_CFGR2_RSHIFT4 ADC_CFGR2_RSHIFT4_Msk /*!< ADC Right-shift data after Offset 4 correction */ + +#define ADC_CFGR2_OVSR_Pos (16U) +#define ADC_CFGR2_OVSR_Msk (0x3FFUL << ADC_CFGR2_OVSR_Pos) /*!< 0x03FF0000 */ +#define ADC_CFGR2_OVSR ADC_CFGR2_OVSR_Msk /*!< ADC oversampling Ratio */ +#define ADC_CFGR2_OVSR_0 (0x001UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00010000 */ +#define ADC_CFGR2_OVSR_1 (0x002UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00020000 */ +#define ADC_CFGR2_OVSR_2 (0x004UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00040000 */ +#define ADC_CFGR2_OVSR_3 (0x008UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00080000 */ +#define ADC_CFGR2_OVSR_4 (0x010UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00100000 */ +#define ADC_CFGR2_OVSR_5 (0x020UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00200000 */ +#define ADC_CFGR2_OVSR_6 (0x040UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00400000 */ +#define ADC_CFGR2_OVSR_7 (0x080UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00800000 */ +#define ADC_CFGR2_OVSR_8 (0x100UL << ADC_CFGR2_OVSR_Pos) /*!< 0x01000000 */ +#define ADC_CFGR2_OVSR_9 (0x200UL << ADC_CFGR2_OVSR_Pos) /*!< 0x02000000 */ + +#define ADC_CFGR2_LSHIFT_Pos (28U) +#define ADC_CFGR2_LSHIFT_Msk (0xFUL << ADC_CFGR2_LSHIFT_Pos) /*!< 0xF0000000 */ +#define ADC_CFGR2_LSHIFT ADC_CFGR2_LSHIFT_Msk /*!< ADC Left shift factor */ +#define ADC_CFGR2_LSHIFT_0 (0x1UL << ADC_CFGR2_LSHIFT_Pos) /*!< 0x10000000 */ +#define ADC_CFGR2_LSHIFT_1 (0x2UL << ADC_CFGR2_LSHIFT_Pos) /*!< 0x20000000 */ +#define ADC_CFGR2_LSHIFT_2 (0x4UL << ADC_CFGR2_LSHIFT_Pos) /*!< 0x40000000 */ +#define ADC_CFGR2_LSHIFT_3 (0x8UL << ADC_CFGR2_LSHIFT_Pos) /*!< 0x80000000 */ + +#define ADC3_CFGR2_OVSR_Pos (2U) +#define ADC3_CFGR2_OVSR_Msk (0x7UL << ADC3_CFGR2_OVSR_Pos) /*!< 0x0000001C */ +#define ADC3_CFGR2_OVSR ADC3_CFGR2_OVSR_Msk /*!< ADC oversampling ratio */ +#define ADC3_CFGR2_OVSR_0 (0x1UL << ADC3_CFGR2_OVSR_Pos) /*!< 0x00000004 */ +#define ADC3_CFGR2_OVSR_1 (0x2UL << ADC3_CFGR2_OVSR_Pos) /*!< 0x00000008 */ +#define ADC3_CFGR2_OVSR_2 (0x4UL << ADC3_CFGR2_OVSR_Pos) /*!< 0x00000010 */ + +#define ADC3_CFGR2_SWTRIG_Pos (25U) +#define ADC3_CFGR2_SWTRIG_Msk (0x1UL << ADC3_CFGR2_SWTRIG_Pos) /*!< 0x02000000 */ +#define ADC3_CFGR2_SWTRIG ADC3_CFGR2_SWTRIG_Msk /*!< ADC Software Trigger Bit for Sample time control trigger mode */ +#define ADC3_CFGR2_BULB_Pos (26U) +#define ADC3_CFGR2_BULB_Msk (0x1UL << ADC3_CFGR2_BULB_Pos) /*!< 0x04000000 */ +#define ADC3_CFGR2_BULB ADC3_CFGR2_BULB_Msk /*!< ADC Bulb sampling mode */ +#define ADC3_CFGR2_SMPTRIG_Pos (27U) +#define ADC3_CFGR2_SMPTRIG_Msk (0x1UL << ADC3_CFGR2_SMPTRIG_Pos) /*!< 0x08000000 */ +#define ADC3_CFGR2_SMPTRIG ADC3_CFGR2_SMPTRIG_Msk /*!< ADC Sample Time Control Trigger mode */ +/******************** Bit definition for ADC_SMPR1 register ********************/ +#define ADC_SMPR1_SMP0_Pos (0U) +#define ADC_SMPR1_SMP0_Msk (0x7UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000007 */ +#define ADC_SMPR1_SMP0 ADC_SMPR1_SMP0_Msk /*!< ADC Channel 0 Sampling time selection */ +#define ADC_SMPR1_SMP0_0 (0x1UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000001 */ +#define ADC_SMPR1_SMP0_1 (0x2UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000002 */ +#define ADC_SMPR1_SMP0_2 (0x4UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000004 */ + +#define ADC_SMPR1_SMP1_Pos (3U) +#define ADC_SMPR1_SMP1_Msk (0x7UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000038 */ +#define ADC_SMPR1_SMP1 ADC_SMPR1_SMP1_Msk /*!< ADC Channel 1 Sampling time selection */ +#define ADC_SMPR1_SMP1_0 (0x1UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000008 */ +#define ADC_SMPR1_SMP1_1 (0x2UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000010 */ +#define ADC_SMPR1_SMP1_2 (0x4UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000020 */ + +#define ADC_SMPR1_SMP2_Pos (6U) +#define ADC_SMPR1_SMP2_Msk (0x7UL << ADC_SMPR1_SMP2_Pos) /*!< 0x000001C0 */ +#define ADC_SMPR1_SMP2 ADC_SMPR1_SMP2_Msk /*!< ADC Channel 2 Sampling time selection */ +#define ADC_SMPR1_SMP2_0 (0x1UL << ADC_SMPR1_SMP2_Pos) /*!< 0x00000040 */ +#define ADC_SMPR1_SMP2_1 (0x2UL << ADC_SMPR1_SMP2_Pos) /*!< 0x00000080 */ +#define ADC_SMPR1_SMP2_2 (0x4UL << ADC_SMPR1_SMP2_Pos) /*!< 0x00000100 */ + +#define ADC_SMPR1_SMP3_Pos (9U) +#define ADC_SMPR1_SMP3_Msk (0x7UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000E00 */ +#define ADC_SMPR1_SMP3 ADC_SMPR1_SMP3_Msk /*!< ADC Channel 3 Sampling time selection */ +#define ADC_SMPR1_SMP3_0 (0x1UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000200 */ +#define ADC_SMPR1_SMP3_1 (0x2UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000400 */ +#define ADC_SMPR1_SMP3_2 (0x4UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000800 */ + +#define ADC_SMPR1_SMP4_Pos (12U) +#define ADC_SMPR1_SMP4_Msk (0x7UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00007000 */ +#define ADC_SMPR1_SMP4 ADC_SMPR1_SMP4_Msk /*!< ADC Channel 4 Sampling time selection */ +#define ADC_SMPR1_SMP4_0 (0x1UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00001000 */ +#define ADC_SMPR1_SMP4_1 (0x2UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00002000 */ +#define ADC_SMPR1_SMP4_2 (0x4UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00004000 */ + +#define ADC_SMPR1_SMP5_Pos (15U) +#define ADC_SMPR1_SMP5_Msk (0x7UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00038000 */ +#define ADC_SMPR1_SMP5 ADC_SMPR1_SMP5_Msk /*!< ADC Channel 5 Sampling time selection */ +#define ADC_SMPR1_SMP5_0 (0x1UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00008000 */ +#define ADC_SMPR1_SMP5_1 (0x2UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00010000 */ +#define ADC_SMPR1_SMP5_2 (0x4UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00020000 */ + +#define ADC_SMPR1_SMP6_Pos (18U) +#define ADC_SMPR1_SMP6_Msk (0x7UL << ADC_SMPR1_SMP6_Pos) /*!< 0x001C0000 */ +#define ADC_SMPR1_SMP6 ADC_SMPR1_SMP6_Msk /*!< ADC Channel 6 Sampling time selection */ +#define ADC_SMPR1_SMP6_0 (0x1UL << ADC_SMPR1_SMP6_Pos) /*!< 0x00040000 */ +#define ADC_SMPR1_SMP6_1 (0x2UL << ADC_SMPR1_SMP6_Pos) /*!< 0x00080000 */ +#define ADC_SMPR1_SMP6_2 (0x4UL << ADC_SMPR1_SMP6_Pos) /*!< 0x00100000 */ + +#define ADC_SMPR1_SMP7_Pos (21U) +#define ADC_SMPR1_SMP7_Msk (0x7UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00E00000 */ +#define ADC_SMPR1_SMP7 ADC_SMPR1_SMP7_Msk /*!< ADC Channel 7 Sampling time selection */ +#define ADC_SMPR1_SMP7_0 (0x1UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00200000 */ +#define ADC_SMPR1_SMP7_1 (0x2UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00400000 */ +#define ADC_SMPR1_SMP7_2 (0x4UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00800000 */ + +#define ADC_SMPR1_SMP8_Pos (24U) +#define ADC_SMPR1_SMP8_Msk (0x7UL << ADC_SMPR1_SMP8_Pos) /*!< 0x07000000 */ +#define ADC_SMPR1_SMP8 ADC_SMPR1_SMP8_Msk /*!< ADC Channel 8 Sampling time selection */ +#define ADC_SMPR1_SMP8_0 (0x1UL << ADC_SMPR1_SMP8_Pos) /*!< 0x01000000 */ +#define ADC_SMPR1_SMP8_1 (0x2UL << ADC_SMPR1_SMP8_Pos) /*!< 0x02000000 */ +#define ADC_SMPR1_SMP8_2 (0x4UL << ADC_SMPR1_SMP8_Pos) /*!< 0x04000000 */ + +#define ADC_SMPR1_SMP9_Pos (27U) +#define ADC_SMPR1_SMP9_Msk (0x7UL << ADC_SMPR1_SMP9_Pos) /*!< 0x38000000 */ +#define ADC_SMPR1_SMP9 ADC_SMPR1_SMP9_Msk /*!< ADC Channel 9 Sampling time selection */ +#define ADC_SMPR1_SMP9_0 (0x1UL << ADC_SMPR1_SMP9_Pos) /*!< 0x08000000 */ +#define ADC_SMPR1_SMP9_1 (0x2UL << ADC_SMPR1_SMP9_Pos) /*!< 0x10000000 */ +#define ADC_SMPR1_SMP9_2 (0x4UL << ADC_SMPR1_SMP9_Pos) /*!< 0x20000000 */ + +/******************** Bit definition for ADC_SMPR2 register ********************/ +#define ADC_SMPR2_SMP10_Pos (0U) +#define ADC_SMPR2_SMP10_Msk (0x7UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000007 */ +#define ADC_SMPR2_SMP10 ADC_SMPR2_SMP10_Msk /*!< ADC Channel 10 Sampling time selection */ +#define ADC_SMPR2_SMP10_0 (0x1UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000001 */ +#define ADC_SMPR2_SMP10_1 (0x2UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000002 */ +#define ADC_SMPR2_SMP10_2 (0x4UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000004 */ + +#define ADC_SMPR2_SMP11_Pos (3U) +#define ADC_SMPR2_SMP11_Msk (0x7UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000038 */ +#define ADC_SMPR2_SMP11 ADC_SMPR2_SMP11_Msk /*!< ADC Channel 11 Sampling time selection */ +#define ADC_SMPR2_SMP11_0 (0x1UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000008 */ +#define ADC_SMPR2_SMP11_1 (0x2UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000010 */ +#define ADC_SMPR2_SMP11_2 (0x4UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000020 */ + +#define ADC_SMPR2_SMP12_Pos (6U) +#define ADC_SMPR2_SMP12_Msk (0x7UL << ADC_SMPR2_SMP12_Pos) /*!< 0x000001C0 */ +#define ADC_SMPR2_SMP12 ADC_SMPR2_SMP12_Msk /*!< ADC Channel 12 Sampling time selection */ +#define ADC_SMPR2_SMP12_0 (0x1UL << ADC_SMPR2_SMP12_Pos) /*!< 0x00000040 */ +#define ADC_SMPR2_SMP12_1 (0x2UL << ADC_SMPR2_SMP12_Pos) /*!< 0x00000080 */ +#define ADC_SMPR2_SMP12_2 (0x4UL << ADC_SMPR2_SMP12_Pos) /*!< 0x00000100 */ + +#define ADC_SMPR2_SMP13_Pos (9U) +#define ADC_SMPR2_SMP13_Msk (0x7UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000E00 */ +#define ADC_SMPR2_SMP13 ADC_SMPR2_SMP13_Msk /*!< ADC Channel 13 Sampling time selection */ +#define ADC_SMPR2_SMP13_0 (0x1UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000200 */ +#define ADC_SMPR2_SMP13_1 (0x2UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000400 */ +#define ADC_SMPR2_SMP13_2 (0x4UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000800 */ + +#define ADC_SMPR2_SMP14_Pos (12U) +#define ADC_SMPR2_SMP14_Msk (0x7UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00007000 */ +#define ADC_SMPR2_SMP14 ADC_SMPR2_SMP14_Msk /*!< ADC Channel 14 Sampling time selection */ +#define ADC_SMPR2_SMP14_0 (0x1UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00001000 */ +#define ADC_SMPR2_SMP14_1 (0x2UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00002000 */ +#define ADC_SMPR2_SMP14_2 (0x4UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00004000 */ + +#define ADC_SMPR2_SMP15_Pos (15U) +#define ADC_SMPR2_SMP15_Msk (0x7UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00038000 */ +#define ADC_SMPR2_SMP15 ADC_SMPR2_SMP15_Msk /*!< ADC Channel 15 Sampling time selection */ +#define ADC_SMPR2_SMP15_0 (0x1UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00008000 */ +#define ADC_SMPR2_SMP15_1 (0x2UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00010000 */ +#define ADC_SMPR2_SMP15_2 (0x4UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00020000 */ + +#define ADC_SMPR2_SMP16_Pos (18U) +#define ADC_SMPR2_SMP16_Msk (0x7UL << ADC_SMPR2_SMP16_Pos) /*!< 0x001C0000 */ +#define ADC_SMPR2_SMP16 ADC_SMPR2_SMP16_Msk /*!< ADC Channel 16 Sampling time selection */ +#define ADC_SMPR2_SMP16_0 (0x1UL << ADC_SMPR2_SMP16_Pos) /*!< 0x00040000 */ +#define ADC_SMPR2_SMP16_1 (0x2UL << ADC_SMPR2_SMP16_Pos) /*!< 0x00080000 */ +#define ADC_SMPR2_SMP16_2 (0x4UL << ADC_SMPR2_SMP16_Pos) /*!< 0x00100000 */ + +#define ADC_SMPR2_SMP17_Pos (21U) +#define ADC_SMPR2_SMP17_Msk (0x7UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00E00000 */ +#define ADC_SMPR2_SMP17 ADC_SMPR2_SMP17_Msk /*!< ADC Channel 17 Sampling time selection */ +#define ADC_SMPR2_SMP17_0 (0x1UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00200000 */ +#define ADC_SMPR2_SMP17_1 (0x2UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00400000 */ +#define ADC_SMPR2_SMP17_2 (0x4UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00800000 */ + +#define ADC_SMPR2_SMP18_Pos (24U) +#define ADC_SMPR2_SMP18_Msk (0x7UL << ADC_SMPR2_SMP18_Pos) /*!< 0x07000000 */ +#define ADC_SMPR2_SMP18 ADC_SMPR2_SMP18_Msk /*!< ADC Channel 18 Sampling time selection */ +#define ADC_SMPR2_SMP18_0 (0x1UL << ADC_SMPR2_SMP18_Pos) /*!< 0x01000000 */ +#define ADC_SMPR2_SMP18_1 (0x2UL << ADC_SMPR2_SMP18_Pos) /*!< 0x02000000 */ +#define ADC_SMPR2_SMP18_2 (0x4UL << ADC_SMPR2_SMP18_Pos) /*!< 0x04000000 */ + +#define ADC_SMPR2_SMP19_Pos (27U) +#define ADC_SMPR2_SMP19_Msk (0x7UL << ADC_SMPR2_SMP19_Pos) /*!< 0x38000000 */ +#define ADC_SMPR2_SMP19 ADC_SMPR2_SMP19_Msk /*!< ADC Channel 19 Sampling time selection */ +#define ADC_SMPR2_SMP19_0 (0x1UL << ADC_SMPR2_SMP19_Pos) /*!< 0x08000000 */ +#define ADC_SMPR2_SMP19_1 (0x2UL << ADC_SMPR2_SMP19_Pos) /*!< 0x10000000 */ +#define ADC_SMPR2_SMP19_2 (0x4UL << ADC_SMPR2_SMP19_Pos) /*!< 0x20000000 */ + +/******************** Bit definition for ADC_PCSEL register ********************/ +#define ADC_PCSEL_PCSEL_Pos (0U) +#define ADC_PCSEL_PCSEL_Msk (0xFFFFFUL << ADC_PCSEL_PCSEL_Pos) /*!< 0x000FFFFF */ +#define ADC_PCSEL_PCSEL ADC_PCSEL_PCSEL_Msk /*!< ADC pre channel selection */ +#define ADC_PCSEL_PCSEL_0 (0x00001UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000001 */ +#define ADC_PCSEL_PCSEL_1 (0x00002UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000002 */ +#define ADC_PCSEL_PCSEL_2 (0x00004UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000004 */ +#define ADC_PCSEL_PCSEL_3 (0x00008UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000008 */ +#define ADC_PCSEL_PCSEL_4 (0x00010UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000010 */ +#define ADC_PCSEL_PCSEL_5 (0x00020UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000020 */ +#define ADC_PCSEL_PCSEL_6 (0x00040UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000040 */ +#define ADC_PCSEL_PCSEL_7 (0x00080UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000080 */ +#define ADC_PCSEL_PCSEL_8 (0x00100UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000100 */ +#define ADC_PCSEL_PCSEL_9 (0x00200UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000200 */ +#define ADC_PCSEL_PCSEL_10 (0x00400UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000400 */ +#define ADC_PCSEL_PCSEL_11 (0x00800UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000800 */ +#define ADC_PCSEL_PCSEL_12 (0x01000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00001000 */ +#define ADC_PCSEL_PCSEL_13 (0x02000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00002000 */ +#define ADC_PCSEL_PCSEL_14 (0x04000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00004000 */ +#define ADC_PCSEL_PCSEL_15 (0x08000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00008000 */ +#define ADC_PCSEL_PCSEL_16 (0x10000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00010000 */ +#define ADC_PCSEL_PCSEL_17 (0x20000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00020000 */ +#define ADC_PCSEL_PCSEL_18 (0x40000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00040000 */ +#define ADC_PCSEL_PCSEL_19 (0x80000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00080000 */ + +/***************** Bit definition for ADC_LTR1, 2, 3 registers *****************/ +#define ADC_LTR_LT_Pos (0U) +#define ADC_LTR_LT_Msk (0x3FFFFFFUL << ADC_LTR_LT_Pos) /*!< 0x03FFFFFF */ +#define ADC_LTR_LT ADC_LTR_LT_Msk /*!< ADC Analog watchdog 1, 2 and 3 lower threshold */ + +/***************** Bit definition for ADC_HTR1, 2, 3 registers ****************/ +#define ADC_HTR_HT_Pos (0U) +#define ADC_HTR_HT_Msk (0x3FFFFFFUL << ADC_HTR_HT_Pos) /*!< 0x03FFFFFF */ +#define ADC_HTR_HT ADC_HTR_HT_Msk /*!< ADC Analog watchdog 1,2 and 3 higher threshold */ + +/******************** Bit definition for ADC3_TR1 register *******************/ +#define ADC3_TR1_LT1_Pos (0U) +#define ADC3_TR1_LT1_Msk (0xFFFUL << ADC3_TR1_LT1_Pos) /*!< 0x00000FFF */ +#define ADC3_TR1_LT1 ADC3_TR1_LT1_Msk /*!< ADC analog watchdog 1 threshold low */ + +#define ADC3_TR1_AWDFILT_Pos (12U) +#define ADC3_TR1_AWDFILT_Msk (0x7UL << ADC3_TR1_AWDFILT_Pos) /*!< 0x00007000 */ +#define ADC3_TR1_AWDFILT ADC3_TR1_AWDFILT_Msk /*!< ADC analog watchdog filtering parameter */ +#define ADC3_TR1_AWDFILT_0 (0x1UL << ADC3_TR1_AWDFILT_Pos) /*!< 0x00001000 */ +#define ADC3_TR1_AWDFILT_1 (0x2UL << ADC3_TR1_AWDFILT_Pos) /*!< 0x00002000 */ +#define ADC3_TR1_AWDFILT_2 (0x4UL << ADC3_TR1_AWDFILT_Pos) /*!< 0x00004000 */ + +#define ADC3_TR1_HT1_Pos (16U) +#define ADC3_TR1_HT1_Msk (0xFFFUL << ADC3_TR1_HT1_Pos) /*!< 0x0FFF0000 */ +#define ADC3_TR1_HT1 ADC3_TR1_HT1_Msk /*!< ADC analog watchdog 1 threshold high */ + +/******************** Bit definition for ADC3_TR2 register *******************/ +#define ADC3_TR2_LT2_Pos (0U) +#define ADC3_TR2_LT2_Msk (0xFFUL << ADC3_TR2_LT2_Pos) /*!< 0x000000FF */ +#define ADC3_TR2_LT2 ADC3_TR2_LT2_Msk /*!< ADC analog watchdog 2 threshold low */ + +#define ADC3_TR2_HT2_Pos (16U) +#define ADC3_TR2_HT2_Msk (0xFFUL << ADC3_TR2_HT2_Pos) /*!< 0x00FF0000 */ +#define ADC3_TR2_HT2 ADC3_TR2_HT2_Msk /*!< ADC analog watchdog 2 threshold high */ + +/******************** Bit definition for ADC3_TR3 register *******************/ +#define ADC3_TR3_LT3_Pos (0U) +#define ADC3_TR3_LT3_Msk (0xFFUL << ADC3_TR3_LT3_Pos) /*!< 0x000000FF */ +#define ADC3_TR3_LT3 ADC3_TR3_LT3_Msk /*!< ADC analog watchdog 3 threshold low */ + +#define ADC3_TR3_HT3_Pos (16U) +#define ADC3_TR3_HT3_Msk (0xFFUL << ADC3_TR3_HT3_Pos) /*!< 0x00FF0000 */ +#define ADC3_TR3_HT3 ADC3_TR3_HT3_Msk /*!< ADC analog watchdog 3 threshold high */ + +/******************** Bit definition for ADC_SQR1 register ********************/ +#define ADC_SQR1_L_Pos (0U) +#define ADC_SQR1_L_Msk (0xFUL << ADC_SQR1_L_Pos) /*!< 0x0000000F */ +#define ADC_SQR1_L ADC_SQR1_L_Msk /*!< ADC regular channel sequence lenght */ +#define ADC_SQR1_L_0 (0x1UL << ADC_SQR1_L_Pos) /*!< 0x00000001 */ +#define ADC_SQR1_L_1 (0x2UL << ADC_SQR1_L_Pos) /*!< 0x00000002 */ +#define ADC_SQR1_L_2 (0x4UL << ADC_SQR1_L_Pos) /*!< 0x00000004 */ +#define ADC_SQR1_L_3 (0x8UL << ADC_SQR1_L_Pos) /*!< 0x00000008 */ + +#define ADC_SQR1_SQ1_Pos (6U) +#define ADC_SQR1_SQ1_Msk (0x1FUL << ADC_SQR1_SQ1_Pos) /*!< 0x000007C0 */ +#define ADC_SQR1_SQ1 ADC_SQR1_SQ1_Msk /*!< ADC 1st conversion in regular sequence */ +#define ADC_SQR1_SQ1_0 (0x01UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000040 */ +#define ADC_SQR1_SQ1_1 (0x02UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000080 */ +#define ADC_SQR1_SQ1_2 (0x04UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000100 */ +#define ADC_SQR1_SQ1_3 (0x08UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000200 */ +#define ADC_SQR1_SQ1_4 (0x10UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000400 */ + +#define ADC_SQR1_SQ2_Pos (12U) +#define ADC_SQR1_SQ2_Msk (0x1FUL << ADC_SQR1_SQ2_Pos) /*!< 0x0001F000 */ +#define ADC_SQR1_SQ2 ADC_SQR1_SQ2_Msk /*!< ADC 2nd conversion in regular sequence */ +#define ADC_SQR1_SQ2_0 (0x01UL << ADC_SQR1_SQ2_Pos) /*!< 0x00001000 */ +#define ADC_SQR1_SQ2_1 (0x02UL << ADC_SQR1_SQ2_Pos) /*!< 0x00002000 */ +#define ADC_SQR1_SQ2_2 (0x04UL << ADC_SQR1_SQ2_Pos) /*!< 0x00004000 */ +#define ADC_SQR1_SQ2_3 (0x08UL << ADC_SQR1_SQ2_Pos) /*!< 0x00008000 */ +#define ADC_SQR1_SQ2_4 (0x10UL << ADC_SQR1_SQ2_Pos) /*!< 0x00010000 */ + +#define ADC_SQR1_SQ3_Pos (18U) +#define ADC_SQR1_SQ3_Msk (0x1FUL << ADC_SQR1_SQ3_Pos) /*!< 0x007C0000 */ +#define ADC_SQR1_SQ3 ADC_SQR1_SQ3_Msk /*!< ADC 3rd conversion in regular sequence */ +#define ADC_SQR1_SQ3_0 (0x01UL << ADC_SQR1_SQ3_Pos) /*!< 0x00040000 */ +#define ADC_SQR1_SQ3_1 (0x02UL << ADC_SQR1_SQ3_Pos) /*!< 0x00080000 */ +#define ADC_SQR1_SQ3_2 (0x04UL << ADC_SQR1_SQ3_Pos) /*!< 0x00100000 */ +#define ADC_SQR1_SQ3_3 (0x08UL << ADC_SQR1_SQ3_Pos) /*!< 0x00200000 */ +#define ADC_SQR1_SQ3_4 (0x10UL << ADC_SQR1_SQ3_Pos) /*!< 0x00400000 */ + +#define ADC_SQR1_SQ4_Pos (24U) +#define ADC_SQR1_SQ4_Msk (0x1FUL << ADC_SQR1_SQ4_Pos) /*!< 0x1F000000 */ +#define ADC_SQR1_SQ4 ADC_SQR1_SQ4_Msk /*!< ADC 4th conversion in regular sequence */ +#define ADC_SQR1_SQ4_0 (0x01UL << ADC_SQR1_SQ4_Pos) /*!< 0x01000000 */ +#define ADC_SQR1_SQ4_1 (0x02UL << ADC_SQR1_SQ4_Pos) /*!< 0x02000000 */ +#define ADC_SQR1_SQ4_2 (0x04UL << ADC_SQR1_SQ4_Pos) /*!< 0x04000000 */ +#define ADC_SQR1_SQ4_3 (0x08UL << ADC_SQR1_SQ4_Pos) /*!< 0x08000000 */ +#define ADC_SQR1_SQ4_4 (0x10UL << ADC_SQR1_SQ4_Pos) /*!< 0x10000000 */ + +/******************** Bit definition for ADC_SQR2 register ********************/ +#define ADC_SQR2_SQ5_Pos (0U) +#define ADC_SQR2_SQ5_Msk (0x1FUL << ADC_SQR2_SQ5_Pos) /*!< 0x0000001F */ +#define ADC_SQR2_SQ5 ADC_SQR2_SQ5_Msk /*!< ADC 5th conversion in regular sequence */ +#define ADC_SQR2_SQ5_0 (0x01UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000001 */ +#define ADC_SQR2_SQ5_1 (0x02UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000002 */ +#define ADC_SQR2_SQ5_2 (0x04UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000004 */ +#define ADC_SQR2_SQ5_3 (0x08UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000008 */ +#define ADC_SQR2_SQ5_4 (0x10UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000010 */ + +#define ADC_SQR2_SQ6_Pos (6U) +#define ADC_SQR2_SQ6_Msk (0x1FUL << ADC_SQR2_SQ6_Pos) /*!< 0x000007C0 */ +#define ADC_SQR2_SQ6 ADC_SQR2_SQ6_Msk /*!< ADC 6th conversion in regular sequence */ +#define ADC_SQR2_SQ6_0 (0x01UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000040 */ +#define ADC_SQR2_SQ6_1 (0x02UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000080 */ +#define ADC_SQR2_SQ6_2 (0x04UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000100 */ +#define ADC_SQR2_SQ6_3 (0x08UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000200 */ +#define ADC_SQR2_SQ6_4 (0x10UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000400 */ + +#define ADC_SQR2_SQ7_Pos (12U) +#define ADC_SQR2_SQ7_Msk (0x1FUL << ADC_SQR2_SQ7_Pos) /*!< 0x0001F000 */ +#define ADC_SQR2_SQ7 ADC_SQR2_SQ7_Msk /*!< ADC 7th conversion in regular sequence */ +#define ADC_SQR2_SQ7_0 (0x01UL << ADC_SQR2_SQ7_Pos) /*!< 0x00001000 */ +#define ADC_SQR2_SQ7_1 (0x02UL << ADC_SQR2_SQ7_Pos) /*!< 0x00002000 */ +#define ADC_SQR2_SQ7_2 (0x04UL << ADC_SQR2_SQ7_Pos) /*!< 0x00004000 */ +#define ADC_SQR2_SQ7_3 (0x08UL << ADC_SQR2_SQ7_Pos) /*!< 0x00008000 */ +#define ADC_SQR2_SQ7_4 (0x10UL << ADC_SQR2_SQ7_Pos) /*!< 0x00010000 */ + +#define ADC_SQR2_SQ8_Pos (18U) +#define ADC_SQR2_SQ8_Msk (0x1FUL << ADC_SQR2_SQ8_Pos) /*!< 0x007C0000 */ +#define ADC_SQR2_SQ8 ADC_SQR2_SQ8_Msk /*!< ADC 8th conversion in regular sequence */ +#define ADC_SQR2_SQ8_0 (0x01UL << ADC_SQR2_SQ8_Pos) /*!< 0x00040000 */ +#define ADC_SQR2_SQ8_1 (0x02UL << ADC_SQR2_SQ8_Pos) /*!< 0x00080000 */ +#define ADC_SQR2_SQ8_2 (0x04UL << ADC_SQR2_SQ8_Pos) /*!< 0x00100000 */ +#define ADC_SQR2_SQ8_3 (0x08UL << ADC_SQR2_SQ8_Pos) /*!< 0x00200000 */ +#define ADC_SQR2_SQ8_4 (0x10UL << ADC_SQR2_SQ8_Pos) /*!< 0x00400000 */ + +#define ADC_SQR2_SQ9_Pos (24U) +#define ADC_SQR2_SQ9_Msk (0x1FUL << ADC_SQR2_SQ9_Pos) /*!< 0x1F000000 */ +#define ADC_SQR2_SQ9 ADC_SQR2_SQ9_Msk /*!< ADC 9th conversion in regular sequence */ +#define ADC_SQR2_SQ9_0 (0x01UL << ADC_SQR2_SQ9_Pos) /*!< 0x01000000 */ +#define ADC_SQR2_SQ9_1 (0x02UL << ADC_SQR2_SQ9_Pos) /*!< 0x02000000 */ +#define ADC_SQR2_SQ9_2 (0x04UL << ADC_SQR2_SQ9_Pos) /*!< 0x04000000 */ +#define ADC_SQR2_SQ9_3 (0x08UL << ADC_SQR2_SQ9_Pos) /*!< 0x08000000 */ +#define ADC_SQR2_SQ9_4 (0x10UL << ADC_SQR2_SQ9_Pos) /*!< 0x10000000 */ + +/******************** Bit definition for ADC_SQR3 register ********************/ +#define ADC_SQR3_SQ10_Pos (0U) +#define ADC_SQR3_SQ10_Msk (0x1FUL << ADC_SQR3_SQ10_Pos) /*!< 0x0000001F */ +#define ADC_SQR3_SQ10 ADC_SQR3_SQ10_Msk /*!< ADC 10th conversion in regular sequence */ +#define ADC_SQR3_SQ10_0 (0x01UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000001 */ +#define ADC_SQR3_SQ10_1 (0x02UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000002 */ +#define ADC_SQR3_SQ10_2 (0x04UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000004 */ +#define ADC_SQR3_SQ10_3 (0x08UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000008 */ +#define ADC_SQR3_SQ10_4 (0x10UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000010 */ + +#define ADC_SQR3_SQ11_Pos (6U) +#define ADC_SQR3_SQ11_Msk (0x1FUL << ADC_SQR3_SQ11_Pos) /*!< 0x000007C0 */ +#define ADC_SQR3_SQ11 ADC_SQR3_SQ11_Msk /*!< ADC 11th conversion in regular sequence */ +#define ADC_SQR3_SQ11_0 (0x01UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000040 */ +#define ADC_SQR3_SQ11_1 (0x02UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000080 */ +#define ADC_SQR3_SQ11_2 (0x04UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000100 */ +#define ADC_SQR3_SQ11_3 (0x08UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000200 */ +#define ADC_SQR3_SQ11_4 (0x10UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000400 */ + +#define ADC_SQR3_SQ12_Pos (12U) +#define ADC_SQR3_SQ12_Msk (0x1FUL << ADC_SQR3_SQ12_Pos) /*!< 0x0001F000 */ +#define ADC_SQR3_SQ12 ADC_SQR3_SQ12_Msk /*!< ADC 12th conversion in regular sequence */ +#define ADC_SQR3_SQ12_0 (0x01UL << ADC_SQR3_SQ12_Pos) /*!< 0x00001000 */ +#define ADC_SQR3_SQ12_1 (0x02UL << ADC_SQR3_SQ12_Pos) /*!< 0x00002000 */ +#define ADC_SQR3_SQ12_2 (0x04UL << ADC_SQR3_SQ12_Pos) /*!< 0x00004000 */ +#define ADC_SQR3_SQ12_3 (0x08UL << ADC_SQR3_SQ12_Pos) /*!< 0x00008000 */ +#define ADC_SQR3_SQ12_4 (0x10UL << ADC_SQR3_SQ12_Pos) /*!< 0x00010000 */ + +#define ADC_SQR3_SQ13_Pos (18U) +#define ADC_SQR3_SQ13_Msk (0x1FUL << ADC_SQR3_SQ13_Pos) /*!< 0x007C0000 */ +#define ADC_SQR3_SQ13 ADC_SQR3_SQ13_Msk /*!< ADC 13th conversion in regular sequence */ +#define ADC_SQR3_SQ13_0 (0x01UL << ADC_SQR3_SQ13_Pos) /*!< 0x00040000 */ +#define ADC_SQR3_SQ13_1 (0x02UL << ADC_SQR3_SQ13_Pos) /*!< 0x00080000 */ +#define ADC_SQR3_SQ13_2 (0x04UL << ADC_SQR3_SQ13_Pos) /*!< 0x00100000 */ +#define ADC_SQR3_SQ13_3 (0x08UL << ADC_SQR3_SQ13_Pos) /*!< 0x00200000 */ +#define ADC_SQR3_SQ13_4 (0x10UL << ADC_SQR3_SQ13_Pos) /*!< 0x00400000 */ + +#define ADC_SQR3_SQ14_Pos (24U) +#define ADC_SQR3_SQ14_Msk (0x1FUL << ADC_SQR3_SQ14_Pos) /*!< 0x1F000000 */ +#define ADC_SQR3_SQ14 ADC_SQR3_SQ14_Msk /*!< ADC 14th conversion in regular sequence */ +#define ADC_SQR3_SQ14_0 (0x01UL << ADC_SQR3_SQ14_Pos) /*!< 0x01000000 */ +#define ADC_SQR3_SQ14_1 (0x02UL << ADC_SQR3_SQ14_Pos) /*!< 0x02000000 */ +#define ADC_SQR3_SQ14_2 (0x04UL << ADC_SQR3_SQ14_Pos) /*!< 0x04000000 */ +#define ADC_SQR3_SQ14_3 (0x08UL << ADC_SQR3_SQ14_Pos) /*!< 0x08000000 */ +#define ADC_SQR3_SQ14_4 (0x10UL << ADC_SQR3_SQ14_Pos) /*!< 0x10000000 */ + +/******************** Bit definition for ADC_SQR4 register ********************/ +#define ADC_SQR4_SQ15_Pos (0U) +#define ADC_SQR4_SQ15_Msk (0x1FUL << ADC_SQR4_SQ15_Pos) /*!< 0x0000001F */ +#define ADC_SQR4_SQ15 ADC_SQR4_SQ15_Msk /*!< ADC 15th conversion in regular sequence */ +#define ADC_SQR4_SQ15_0 (0x01UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000001 */ +#define ADC_SQR4_SQ15_1 (0x02UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000002 */ +#define ADC_SQR4_SQ15_2 (0x04UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000004 */ +#define ADC_SQR4_SQ15_3 (0x08UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000008 */ +#define ADC_SQR4_SQ15_4 (0x10UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000010 */ + +#define ADC_SQR4_SQ16_Pos (6U) +#define ADC_SQR4_SQ16_Msk (0x1FUL << ADC_SQR4_SQ16_Pos) /*!< 0x000007C0 */ +#define ADC_SQR4_SQ16 ADC_SQR4_SQ16_Msk /*!< ADC 16th conversion in regular sequence */ +#define ADC_SQR4_SQ16_0 (0x01UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000040 */ +#define ADC_SQR4_SQ16_1 (0x02UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000080 */ +#define ADC_SQR4_SQ16_2 (0x04UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000100 */ +#define ADC_SQR4_SQ16_3 (0x08UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000200 */ +#define ADC_SQR4_SQ16_4 (0x10UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000400 */ +/******************** Bit definition for ADC_DR register ********************/ +#define ADC_DR_RDATA_Pos (0U) +#define ADC_DR_RDATA_Msk (0xFFFFFFFFUL << ADC_DR_RDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_DR_RDATA ADC_DR_RDATA_Msk /*!< ADC regular Data converted */ + +/******************** Bit definition for ADC_JSQR register ********************/ +#define ADC_JSQR_JL_Pos (0U) +#define ADC_JSQR_JL_Msk (0x3UL << ADC_JSQR_JL_Pos) /*!< 0x00000003 */ +#define ADC_JSQR_JL ADC_JSQR_JL_Msk /*!< ADC injected channel sequence length */ +#define ADC_JSQR_JL_0 (0x1UL << ADC_JSQR_JL_Pos) /*!< 0x00000001 */ +#define ADC_JSQR_JL_1 (0x2UL << ADC_JSQR_JL_Pos) /*!< 0x00000002 */ + +#define ADC_JSQR_JEXTSEL_Pos (2U) +#define ADC_JSQR_JEXTSEL_Msk (0x1FUL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x0000007C */ +#define ADC_JSQR_JEXTSEL ADC_JSQR_JEXTSEL_Msk /*!< ADC external trigger selection for injected group */ +#define ADC_JSQR_JEXTSEL_0 (0x01UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000004 */ +#define ADC_JSQR_JEXTSEL_1 (0x02UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000008 */ +#define ADC_JSQR_JEXTSEL_2 (0x04UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000010 */ +#define ADC_JSQR_JEXTSEL_3 (0x08UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000020 */ +#define ADC_JSQR_JEXTSEL_4 (0x10UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000040 */ + +#define ADC_JSQR_JEXTEN_Pos (7U) +#define ADC_JSQR_JEXTEN_Msk (0x3UL << ADC_JSQR_JEXTEN_Pos) /*!< 0x00000180 */ +#define ADC_JSQR_JEXTEN ADC_JSQR_JEXTEN_Msk /*!< ADC external trigger enable and polarity selection for injected channels */ +#define ADC_JSQR_JEXTEN_0 (0x1UL << ADC_JSQR_JEXTEN_Pos) /*!< 0x00000080 */ +#define ADC_JSQR_JEXTEN_1 (0x2UL << ADC_JSQR_JEXTEN_Pos) /*!< 0x00000100 */ + +#define ADC_JSQR_JSQ1_Pos (9U) +#define ADC_JSQR_JSQ1_Msk (0x1FUL << ADC_JSQR_JSQ1_Pos) /*!< 0x00003E00 */ +#define ADC_JSQR_JSQ1 ADC_JSQR_JSQ1_Msk /*!< ADC 1st conversion in injected sequence */ +#define ADC_JSQR_JSQ1_0 (0x01UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00000200 */ +#define ADC_JSQR_JSQ1_1 (0x02UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00000400 */ +#define ADC_JSQR_JSQ1_2 (0x04UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00000800 */ +#define ADC_JSQR_JSQ1_3 (0x08UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00001000 */ +#define ADC_JSQR_JSQ1_4 (0x10UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00002000 */ + +#define ADC_JSQR_JSQ2_Pos (15U) +#define ADC_JSQR_JSQ2_Msk (0x1FUL << ADC_JSQR_JSQ2_Pos) /*!< 0x000F8000 */ +#define ADC_JSQR_JSQ2 ADC_JSQR_JSQ2_Msk /*!< ADC 2nd conversion in injected sequence */ +#define ADC_JSQR_JSQ2_0 (0x01UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00008000 */ +#define ADC_JSQR_JSQ2_1 (0x02UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00010000 */ +#define ADC_JSQR_JSQ2_2 (0x04UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00020000 */ +#define ADC_JSQR_JSQ2_3 (0x08UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00040000 */ +#define ADC_JSQR_JSQ2_4 (0x10UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00080000 */ + +#define ADC_JSQR_JSQ3_Pos (21U) +#define ADC_JSQR_JSQ3_Msk (0x1FUL << ADC_JSQR_JSQ3_Pos) /*!< 0x03E00000 */ +#define ADC_JSQR_JSQ3 ADC_JSQR_JSQ3_Msk /*!< ADC 3rd conversion in injected sequence */ +#define ADC_JSQR_JSQ3_0 (0x01UL << ADC_JSQR_JSQ3_Pos) /*!< 0x00200000 */ +#define ADC_JSQR_JSQ3_1 (0x02UL << ADC_JSQR_JSQ3_Pos) /*!< 0x00400000 */ +#define ADC_JSQR_JSQ3_2 (0x04UL << ADC_JSQR_JSQ3_Pos) /*!< 0x00800000 */ +#define ADC_JSQR_JSQ3_3 (0x08UL << ADC_JSQR_JSQ3_Pos) /*!< 0x01000000 */ +#define ADC_JSQR_JSQ3_4 (0x10UL << ADC_JSQR_JSQ3_Pos) /*!< 0x02000000 */ + +#define ADC_JSQR_JSQ4_Pos (27U) +#define ADC_JSQR_JSQ4_Msk (0x1FUL << ADC_JSQR_JSQ4_Pos) /*!< 0xF8000000 */ +#define ADC_JSQR_JSQ4 ADC_JSQR_JSQ4_Msk /*!< ADC 4th conversion in injected sequence */ +#define ADC_JSQR_JSQ4_0 (0x01UL << ADC_JSQR_JSQ4_Pos) /*!< 0x08000000 */ +#define ADC_JSQR_JSQ4_1 (0x02UL << ADC_JSQR_JSQ4_Pos) /*!< 0x10000000 */ +#define ADC_JSQR_JSQ4_2 (0x04UL << ADC_JSQR_JSQ4_Pos) /*!< 0x20000000 */ +#define ADC_JSQR_JSQ4_3 (0x08UL << ADC_JSQR_JSQ4_Pos) /*!< 0x40000000 */ +#define ADC_JSQR_JSQ4_4 (0x10UL << ADC_JSQR_JSQ4_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_OFR1 register ********************/ +#define ADC_OFR1_OFFSET1_Pos (0U) +#define ADC_OFR1_OFFSET1_Msk (0x3FFFFFFUL << ADC_OFR1_OFFSET1_Pos) /*!< 0x03FFFFFF */ +#define ADC_OFR1_OFFSET1 ADC_OFR1_OFFSET1_Msk /*!< ADC data offset 1 for channel programmed into bits OFFSET1_CH[4:0] */ +#define ADC_OFR1_OFFSET1_0 (0x0000001UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000001 */ +#define ADC_OFR1_OFFSET1_1 (0x0000002UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000002 */ +#define ADC_OFR1_OFFSET1_2 (0x0000004UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000004 */ +#define ADC_OFR1_OFFSET1_3 (0x0000008UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000008 */ +#define ADC_OFR1_OFFSET1_4 (0x0000010UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000010 */ +#define ADC_OFR1_OFFSET1_5 (0x0000020UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000020 */ +#define ADC_OFR1_OFFSET1_6 (0x0000040UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000040 */ +#define ADC_OFR1_OFFSET1_7 (0x0000080UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000080 */ +#define ADC_OFR1_OFFSET1_8 (0x0000100UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000100 */ +#define ADC_OFR1_OFFSET1_9 (0x0000200UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000200 */ +#define ADC_OFR1_OFFSET1_10 (0x0000400UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000400 */ +#define ADC_OFR1_OFFSET1_11 (0x0000800UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000800 */ +#define ADC_OFR1_OFFSET1_12 (0x0001000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00001000 */ +#define ADC_OFR1_OFFSET1_13 (0x0002000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00002000 */ +#define ADC_OFR1_OFFSET1_14 (0x0004000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00004000 */ +#define ADC_OFR1_OFFSET1_15 (0x0008000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00008000 */ +#define ADC_OFR1_OFFSET1_16 (0x0010000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00010000 */ +#define ADC_OFR1_OFFSET1_17 (0x0020000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00020000 */ +#define ADC_OFR1_OFFSET1_18 (0x0040000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00040000 */ +#define ADC_OFR1_OFFSET1_19 (0x0080000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00080000 */ +#define ADC_OFR1_OFFSET1_20 (0x0100000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00100000 */ +#define ADC_OFR1_OFFSET1_21 (0x0200000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00200000 */ +#define ADC_OFR1_OFFSET1_22 (0x0400000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00400000 */ +#define ADC_OFR1_OFFSET1_23 (0x0800000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00800000 */ +#define ADC_OFR1_OFFSET1_24 (0x1000000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x01000000 */ +#define ADC_OFR1_OFFSET1_25 (0x2000000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x02000000 */ + +#define ADC_OFR1_OFFSET1_CH_Pos (26U) +#define ADC_OFR1_OFFSET1_CH_Msk (0x1FUL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR1_OFFSET1_CH ADC_OFR1_OFFSET1_CH_Msk /*!< ADC Channel selection for the data offset 1 */ +#define ADC_OFR1_OFFSET1_CH_0 (0x01UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR1_OFFSET1_CH_1 (0x02UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR1_OFFSET1_CH_2 (0x04UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR1_OFFSET1_CH_3 (0x08UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR1_OFFSET1_CH_4 (0x10UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR1_SSATE_Pos (31U) +#define ADC_OFR1_SSATE_Msk (0x1UL << ADC_OFR1_SSATE_Pos) /*!< 0x80000000 */ +#define ADC_OFR1_SSATE ADC_OFR1_SSATE_Msk /*!< ADC Signed saturation Enable */ + +#define ADC3_OFR1_OFFSET1_Pos (0U) +#define ADC3_OFR1_OFFSET1_Msk (0xFFFUL << ADC3_OFR1_OFFSET1_Pos) /*!< 0x00000FFF */ +#define ADC3_OFR1_OFFSET1 ADC3_OFR1_OFFSET1_Msk /*!< ADC data offset 1 for channel programmed into bits OFFSET1_CH[4:0] */ + +#define ADC3_OFR1_OFFSETPOS_Pos (24U) +#define ADC3_OFR1_OFFSETPOS_Msk (0x1UL << ADC3_OFR1_OFFSETPOS_Pos) /*!< 0x01000000 */ +#define ADC3_OFR1_OFFSETPOS ADC3_OFR1_OFFSETPOS_Msk /*!< ADC offset number 1 positive */ +#define ADC3_OFR1_SATEN_Pos (25U) +#define ADC3_OFR1_SATEN_Msk (0x1UL << ADC3_OFR1_SATEN_Pos) /*!< 0x02000000 */ +#define ADC3_OFR1_SATEN ADC3_OFR1_SATEN_Msk /*!< ADC offset number 1 saturation enable */ + +#define ADC3_OFR1_OFFSET1_EN_Pos (31U) +#define ADC3_OFR1_OFFSET1_EN_Msk (0x1UL << ADC3_OFR1_OFFSET1_EN_Pos) /*!< 0x80000000 */ +#define ADC3_OFR1_OFFSET1_EN ADC3_OFR1_OFFSET1_EN_Msk /*!< ADC offset number 1 enable */ + +/******************** Bit definition for ADC_OFR2 register ********************/ +#define ADC_OFR2_OFFSET2_Pos (0U) +#define ADC_OFR2_OFFSET2_Msk (0x3FFFFFFUL << ADC_OFR2_OFFSET2_Pos) /*!< 0x03FFFFFF */ +#define ADC_OFR2_OFFSET2 ADC_OFR2_OFFSET2_Msk /*!< ADC data offset 2 for channel programmed into bits OFFSET2_CH[4:0] */ +#define ADC_OFR2_OFFSET2_0 (0x0000001UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000001 */ +#define ADC_OFR2_OFFSET2_1 (0x0000002UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000002 */ +#define ADC_OFR2_OFFSET2_2 (0x0000004UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000004 */ +#define ADC_OFR2_OFFSET2_3 (0x0000008UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000008 */ +#define ADC_OFR2_OFFSET2_4 (0x0000010UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000010 */ +#define ADC_OFR2_OFFSET2_5 (0x0000020UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000020 */ +#define ADC_OFR2_OFFSET2_6 (0x0000040UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000040 */ +#define ADC_OFR2_OFFSET2_7 (0x0000080UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000080 */ +#define ADC_OFR2_OFFSET2_8 (0x0000100UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000100 */ +#define ADC_OFR2_OFFSET2_9 (0x0000200UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000200 */ +#define ADC_OFR2_OFFSET2_10 (0x0000400UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000400 */ +#define ADC_OFR2_OFFSET2_11 (0x0000800UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000800 */ +#define ADC_OFR2_OFFSET2_12 (0x0001000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00001000 */ +#define ADC_OFR2_OFFSET2_13 (0x0002000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00002000 */ +#define ADC_OFR2_OFFSET2_14 (0x0004000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00004000 */ +#define ADC_OFR2_OFFSET2_15 (0x0008000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00008000 */ +#define ADC_OFR2_OFFSET2_16 (0x0010000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00010000 */ +#define ADC_OFR2_OFFSET2_17 (0x0020000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00020000 */ +#define ADC_OFR2_OFFSET2_18 (0x0040000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00040000 */ +#define ADC_OFR2_OFFSET2_19 (0x0080000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00080000 */ +#define ADC_OFR2_OFFSET2_20 (0x0100000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00100000 */ +#define ADC_OFR2_OFFSET2_21 (0x0200000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00200000 */ +#define ADC_OFR2_OFFSET2_22 (0x0400000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00400000 */ +#define ADC_OFR2_OFFSET2_23 (0x0800000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00800000 */ +#define ADC_OFR2_OFFSET2_24 (0x1000000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x01000000 */ +#define ADC_OFR2_OFFSET2_25 (0x2000000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x02000000 */ + +#define ADC_OFR2_OFFSET2_CH_Pos (26U) +#define ADC_OFR2_OFFSET2_CH_Msk (0x1FUL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR2_OFFSET2_CH ADC_OFR2_OFFSET2_CH_Msk /*!< ADC Channel selection for the data offset 2 */ +#define ADC_OFR2_OFFSET2_CH_0 (0x01UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR2_OFFSET2_CH_1 (0x02UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR2_OFFSET2_CH_2 (0x04UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR2_OFFSET2_CH_3 (0x08UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR2_OFFSET2_CH_4 (0x10UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR2_SSATE_Pos (31U) +#define ADC_OFR2_SSATE_Msk (0x1UL << ADC_OFR2_SSATE_Pos) /*!< 0x80000000 */ +#define ADC_OFR2_SSATE ADC_OFR2_SSATE_Msk /*!< ADC Signed saturation Enable */ + +#define ADC3_OFR2_OFFSET2_Pos (0U) +#define ADC3_OFR2_OFFSET2_Msk (0xFFFUL << ADC3_OFR2_OFFSET2_Pos) /*!< 0x00000FFF */ +#define ADC3_OFR2_OFFSET2 ADC3_OFR2_OFFSET2_Msk /*!< ADC data offset 2 for channel programmed into bits OFFSET1_CH[4:0] */ + +#define ADC3_OFR2_OFFSETPOS_Pos (24U) +#define ADC3_OFR2_OFFSETPOS_Msk (0x1UL << ADC3_OFR2_OFFSETPOS_Pos) /*!< 0x01000000 */ +#define ADC3_OFR2_OFFSETPOS ADC3_OFR2_OFFSETPOS_Msk /*!< ADC offset number 2 positive */ +#define ADC3_OFR2_SATEN_Pos (25U) +#define ADC3_OFR2_SATEN_Msk (0x1UL << ADC3_OFR2_SATEN_Pos) /*!< 0x02000000 */ +#define ADC3_OFR2_SATEN ADC3_OFR2_SATEN_Msk /*!< ADC offset number 2 saturation enable */ + +#define ADC3_OFR2_OFFSET2_EN_Pos (31U) +#define ADC3_OFR2_OFFSET2_EN_Msk (0x1UL << ADC3_OFR2_OFFSET2_EN_Pos) /*!< 0x80000000 */ +#define ADC3_OFR2_OFFSET2_EN ADC3_OFR2_OFFSET2_EN_Msk /*!< ADC offset number 2 enable */ + +/******************** Bit definition for ADC_OFR3 register ********************/ +#define ADC_OFR3_OFFSET3_Pos (0U) +#define ADC_OFR3_OFFSET3_Msk (0x3FFFFFFUL << ADC_OFR3_OFFSET3_Pos) /*!< 0x03FFFFFF */ +#define ADC_OFR3_OFFSET3 ADC_OFR3_OFFSET3_Msk /*!< ADC data offset 3 for channel programmed into bits OFFSET3_CH[4:0] */ +#define ADC_OFR3_OFFSET3_0 (0x0000001UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000001 */ +#define ADC_OFR3_OFFSET3_1 (0x0000002UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000002 */ +#define ADC_OFR3_OFFSET3_2 (0x0000004UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000004 */ +#define ADC_OFR3_OFFSET3_3 (0x0000008UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000008 */ +#define ADC_OFR3_OFFSET3_4 (0x0000010UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000010 */ +#define ADC_OFR3_OFFSET3_5 (0x0000020UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000020 */ +#define ADC_OFR3_OFFSET3_6 (0x0000040UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000040 */ +#define ADC_OFR3_OFFSET3_7 (0x0000080UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000080 */ +#define ADC_OFR3_OFFSET3_8 (0x0000100UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000100 */ +#define ADC_OFR3_OFFSET3_9 (0x0000200UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000200 */ +#define ADC_OFR3_OFFSET3_10 (0x0000400UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000400 */ +#define ADC_OFR3_OFFSET3_11 (0x0000800UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000800 */ +#define ADC_OFR3_OFFSET3_12 (0x0001000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00001000 */ +#define ADC_OFR3_OFFSET3_13 (0x0002000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00002000 */ +#define ADC_OFR3_OFFSET3_14 (0x0004000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00004000 */ +#define ADC_OFR3_OFFSET3_15 (0x0008000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00008000 */ +#define ADC_OFR3_OFFSET3_16 (0x0010000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00010000 */ +#define ADC_OFR3_OFFSET3_17 (0x0020000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00020000 */ +#define ADC_OFR3_OFFSET3_18 (0x0040000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00040000 */ +#define ADC_OFR3_OFFSET3_19 (0x0080000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00080000 */ +#define ADC_OFR3_OFFSET3_20 (0x0100000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00100000 */ +#define ADC_OFR3_OFFSET3_21 (0x0200000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00200000 */ +#define ADC_OFR3_OFFSET3_22 (0x0400000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00400000 */ +#define ADC_OFR3_OFFSET3_23 (0x0800000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00800000 */ +#define ADC_OFR3_OFFSET3_24 (0x1000000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x01000000 */ +#define ADC_OFR3_OFFSET3_25 (0x2000000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x02000000 */ + +#define ADC_OFR3_OFFSET3_CH_Pos (26U) +#define ADC_OFR3_OFFSET3_CH_Msk (0x1FUL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR3_OFFSET3_CH ADC_OFR3_OFFSET3_CH_Msk /*!< ADC Channel selection for the data offset 3 */ +#define ADC_OFR3_OFFSET3_CH_0 (0x01UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR3_OFFSET3_CH_1 (0x02UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR3_OFFSET3_CH_2 (0x04UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR3_OFFSET3_CH_3 (0x08UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR3_OFFSET3_CH_4 (0x10UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR3_SSATE_Pos (31U) +#define ADC_OFR3_SSATE_Msk (0x1UL << ADC_OFR3_SSATE_Pos) /*!< 0x80000000 */ +#define ADC_OFR3_SSATE ADC_OFR3_SSATE_Msk /*!< ADC Signed saturation Enable */ + +#define ADC3_OFR3_OFFSET3_Pos (0U) +#define ADC3_OFR3_OFFSET3_Msk (0xFFFUL << ADC3_OFR3_OFFSET3_Pos) /*!< 0x00000FFF */ +#define ADC3_OFR3_OFFSET3 ADC3_OFR3_OFFSET3_Msk /*!< ADC data offset 3 for channel programmed into bits OFFSET1_CH[4:0] */ + +#define ADC3_OFR3_OFFSETPOS_Pos (24U) +#define ADC3_OFR3_OFFSETPOS_Msk (0x1UL << ADC3_OFR3_OFFSETPOS_Pos) /*!< 0x01000000 */ +#define ADC3_OFR3_OFFSETPOS ADC3_OFR3_OFFSETPOS_Msk /*!< ADC offset number 3 positive */ +#define ADC3_OFR3_SATEN_Pos (25U) +#define ADC3_OFR3_SATEN_Msk (0x1UL << ADC3_OFR3_SATEN_Pos) /*!< 0x02000000 */ +#define ADC3_OFR3_SATEN ADC3_OFR3_SATEN_Msk /*!< ADC offset number 3 saturation enable */ + +#define ADC3_OFR3_OFFSET3_EN_Pos (31U) +#define ADC3_OFR3_OFFSET3_EN_Msk (0x1UL << ADC3_OFR3_OFFSET3_EN_Pos) /*!< 0x80000000 */ +#define ADC3_OFR3_OFFSET3_EN ADC3_OFR3_OFFSET3_EN_Msk /*!< ADC offset number 3 enable */ + +/******************** Bit definition for ADC_OFR4 register ********************/ +#define ADC_OFR4_OFFSET4_Pos (0U) +#define ADC_OFR4_OFFSET4_Msk (0x3FFFFFFUL << ADC_OFR4_OFFSET4_Pos) /*!< 0x03FFFFFF */ +#define ADC_OFR4_OFFSET4 ADC_OFR4_OFFSET4_Msk /*!< ADC data offset 4 for channel programmed into bits OFFSET4_CH[4:0] */ +#define ADC_OFR4_OFFSET4_0 (0x0000001UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000001 */ +#define ADC_OFR4_OFFSET4_1 (0x0000002UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000002 */ +#define ADC_OFR4_OFFSET4_2 (0x0000004UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000004 */ +#define ADC_OFR4_OFFSET4_3 (0x0000008UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000008 */ +#define ADC_OFR4_OFFSET4_4 (0x0000010UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000010 */ +#define ADC_OFR4_OFFSET4_5 (0x0000020UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000020 */ +#define ADC_OFR4_OFFSET4_6 (0x0000040UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000040 */ +#define ADC_OFR4_OFFSET4_7 (0x0000080UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000080 */ +#define ADC_OFR4_OFFSET4_8 (0x0000100UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000100 */ +#define ADC_OFR4_OFFSET4_9 (0x0000200UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000200 */ +#define ADC_OFR4_OFFSET4_10 (0x0000400UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000400 */ +#define ADC_OFR4_OFFSET4_11 (0x0000800UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000800 */ +#define ADC_OFR4_OFFSET4_12 (0x0001000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00001000 */ +#define ADC_OFR4_OFFSET4_13 (0x0002000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00002000 */ +#define ADC_OFR4_OFFSET4_14 (0x0004000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00004000 */ +#define ADC_OFR4_OFFSET4_15 (0x0008000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00008000 */ +#define ADC_OFR4_OFFSET4_16 (0x0010000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00010000 */ +#define ADC_OFR4_OFFSET4_17 (0x0020000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00020000 */ +#define ADC_OFR4_OFFSET4_18 (0x0040000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00040000 */ +#define ADC_OFR4_OFFSET4_19 (0x0080000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00080000 */ +#define ADC_OFR4_OFFSET4_20 (0x0100000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00100000 */ +#define ADC_OFR4_OFFSET4_21 (0x0200000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00200000 */ +#define ADC_OFR4_OFFSET4_22 (0x0400000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00400000 */ +#define ADC_OFR4_OFFSET4_23 (0x0800000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00800000 */ +#define ADC_OFR4_OFFSET4_24 (0x1000000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x01000000 */ +#define ADC_OFR4_OFFSET4_25 (0x2000000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x02000000 */ + +#define ADC_OFR4_OFFSET4_CH_Pos (26U) +#define ADC_OFR4_OFFSET4_CH_Msk (0x1FUL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR4_OFFSET4_CH ADC_OFR4_OFFSET4_CH_Msk /*!< ADC Channel selection for the data offset 4 */ +#define ADC_OFR4_OFFSET4_CH_0 (0x01UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR4_OFFSET4_CH_1 (0x02UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR4_OFFSET4_CH_2 (0x04UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR4_OFFSET4_CH_3 (0x08UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR4_OFFSET4_CH_4 (0x10UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR4_SSATE_Pos (31U) +#define ADC_OFR4_SSATE_Msk (0x1UL << ADC_OFR4_SSATE_Pos) /*!< 0x80000000 */ +#define ADC_OFR4_SSATE ADC_OFR4_SSATE_Msk /*!< ADC Signed saturation Enable */ + +#define ADC3_OFR4_OFFSET4_Pos (0U) +#define ADC3_OFR4_OFFSET4_Msk (0xFFFUL << ADC3_OFR4_OFFSET4_Pos) /*!< 0x00000FFF */ +#define ADC3_OFR4_OFFSET4 ADC3_OFR4_OFFSET4_Msk /*!< ADC data offset 4 for channel programmed into bits OFFSET1_CH[4:0] */ + +#define ADC3_OFR4_OFFSETPOS_Pos (24U) +#define ADC3_OFR4_OFFSETPOS_Msk (0x1UL << ADC3_OFR4_OFFSETPOS_Pos) /*!< 0x01000000 */ +#define ADC3_OFR4_OFFSETPOS ADC3_OFR4_OFFSETPOS_Msk /*!< ADC offset number 4 positive */ +#define ADC3_OFR4_SATEN_Pos (25U) +#define ADC3_OFR4_SATEN_Msk (0x1UL << ADC3_OFR4_SATEN_Pos) /*!< 0x02000000 */ +#define ADC3_OFR4_SATEN ADC3_OFR4_SATEN_Msk /*!< ADC offset number 4 saturation enable */ + +#define ADC3_OFR4_OFFSET4_EN_Pos (31U) +#define ADC3_OFR4_OFFSET4_EN_Msk (0x1UL << ADC3_OFR4_OFFSET4_EN_Pos) /*!< 0x80000000 */ +#define ADC3_OFR4_OFFSET4_EN ADC3_OFR4_OFFSET4_EN_Msk /*!< ADC offset number 4 enable */ + +/******************** Bit definition for ADC_JDR1 register ********************/ +#define ADC_JDR1_JDATA_Pos (0U) +#define ADC_JDR1_JDATA_Msk (0xFFFFFFFFUL << ADC_JDR1_JDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_JDR1_JDATA ADC_JDR1_JDATA_Msk /*!< ADC Injected DATA */ +#define ADC_JDR1_JDATA_0 (0x00000001UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR1_JDATA_1 (0x00000002UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR1_JDATA_2 (0x00000004UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR1_JDATA_3 (0x00000008UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR1_JDATA_4 (0x00000010UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR1_JDATA_5 (0x00000020UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR1_JDATA_6 (0x00000040UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR1_JDATA_7 (0x00000080UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR1_JDATA_8 (0x00000100UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR1_JDATA_9 (0x00000200UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR1_JDATA_10 (0x00000400UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR1_JDATA_11 (0x00000800UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR1_JDATA_12 (0x00001000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR1_JDATA_13 (0x00002000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR1_JDATA_14 (0x00004000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR1_JDATA_15 (0x00008000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00008000 */ +#define ADC_JDR1_JDATA_16 (0x00010000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00010000 */ +#define ADC_JDR1_JDATA_17 (0x00020000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00020000 */ +#define ADC_JDR1_JDATA_18 (0x00040000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00040000 */ +#define ADC_JDR1_JDATA_19 (0x00080000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00080000 */ +#define ADC_JDR1_JDATA_20 (0x00100000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00100000 */ +#define ADC_JDR1_JDATA_21 (0x00200000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00200000 */ +#define ADC_JDR1_JDATA_22 (0x00400000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00400000 */ +#define ADC_JDR1_JDATA_23 (0x00800000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00800000 */ +#define ADC_JDR1_JDATA_24 (0x01000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x01000000 */ +#define ADC_JDR1_JDATA_25 (0x02000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x02000000 */ +#define ADC_JDR1_JDATA_26 (0x04000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x04000000 */ +#define ADC_JDR1_JDATA_27 (0x08000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x08000000 */ +#define ADC_JDR1_JDATA_28 (0x10000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x10000000 */ +#define ADC_JDR1_JDATA_29 (0x20000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x20000000 */ +#define ADC_JDR1_JDATA_30 (0x40000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x40000000 */ +#define ADC_JDR1_JDATA_31 (0x80000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_JDR2 register ********************/ +#define ADC_JDR2_JDATA_Pos (0U) +#define ADC_JDR2_JDATA_Msk (0xFFFFFFFFUL << ADC_JDR2_JDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_JDR2_JDATA ADC_JDR2_JDATA_Msk /*!< ADC Injected DATA */ +#define ADC_JDR2_JDATA_0 (0x00000001UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR2_JDATA_1 (0x00000002UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR2_JDATA_2 (0x00000004UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR2_JDATA_3 (0x00000008UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR2_JDATA_4 (0x00000010UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR2_JDATA_5 (0x00000020UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR2_JDATA_6 (0x00000040UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR2_JDATA_7 (0x00000080UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR2_JDATA_8 (0x00000100UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR2_JDATA_9 (0x00000200UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR2_JDATA_10 (0x00000400UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR2_JDATA_11 (0x00000800UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR2_JDATA_12 (0x00001000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR2_JDATA_13 (0x00002000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR2_JDATA_14 (0x00004000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR2_JDATA_15 (0x00008000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00008000 */ +#define ADC_JDR2_JDATA_16 (0x00010000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00010000 */ +#define ADC_JDR2_JDATA_17 (0x00020000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00020000 */ +#define ADC_JDR2_JDATA_18 (0x00040000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00040000 */ +#define ADC_JDR2_JDATA_19 (0x00080000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00080000 */ +#define ADC_JDR2_JDATA_20 (0x00100000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00100000 */ +#define ADC_JDR2_JDATA_21 (0x00200000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00200000 */ +#define ADC_JDR2_JDATA_22 (0x00400000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00400000 */ +#define ADC_JDR2_JDATA_23 (0x00800000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00800000 */ +#define ADC_JDR2_JDATA_24 (0x01000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x01000000 */ +#define ADC_JDR2_JDATA_25 (0x02000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x02000000 */ +#define ADC_JDR2_JDATA_26 (0x04000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x04000000 */ +#define ADC_JDR2_JDATA_27 (0x08000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x08000000 */ +#define ADC_JDR2_JDATA_28 (0x10000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x10000000 */ +#define ADC_JDR2_JDATA_29 (0x20000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x20000000 */ +#define ADC_JDR2_JDATA_30 (0x40000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x40000000 */ +#define ADC_JDR2_JDATA_31 (0x80000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_JDR3 register ********************/ +#define ADC_JDR3_JDATA_Pos (0U) +#define ADC_JDR3_JDATA_Msk (0xFFFFFFFFUL << ADC_JDR3_JDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_JDR3_JDATA ADC_JDR3_JDATA_Msk /*!< ADC Injected DATA */ +#define ADC_JDR3_JDATA_0 (0x00000001UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR3_JDATA_1 (0x00000002UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR3_JDATA_2 (0x00000004UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR3_JDATA_3 (0x00000008UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR3_JDATA_4 (0x00000010UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR3_JDATA_5 (0x00000020UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR3_JDATA_6 (0x00000040UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR3_JDATA_7 (0x00000080UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR3_JDATA_8 (0x00000100UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR3_JDATA_9 (0x00000200UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR3_JDATA_10 (0x00000400UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR3_JDATA_11 (0x00000800UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR3_JDATA_12 (0x00001000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR3_JDATA_13 (0x00002000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR3_JDATA_14 (0x00004000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR3_JDATA_15 (0x00008000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00008000 */ +#define ADC_JDR3_JDATA_16 (0x00010000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00010000 */ +#define ADC_JDR3_JDATA_17 (0x00020000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00020000 */ +#define ADC_JDR3_JDATA_18 (0x00040000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00040000 */ +#define ADC_JDR3_JDATA_19 (0x00080000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00080000 */ +#define ADC_JDR3_JDATA_20 (0x00100000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00100000 */ +#define ADC_JDR3_JDATA_21 (0x00200000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00200000 */ +#define ADC_JDR3_JDATA_22 (0x00400000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00400000 */ +#define ADC_JDR3_JDATA_23 (0x00800000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00800000 */ +#define ADC_JDR3_JDATA_24 (0x01000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x01000000 */ +#define ADC_JDR3_JDATA_25 (0x02000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x02000000 */ +#define ADC_JDR3_JDATA_26 (0x04000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x04000000 */ +#define ADC_JDR3_JDATA_27 (0x08000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x08000000 */ +#define ADC_JDR3_JDATA_28 (0x10000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x10000000 */ +#define ADC_JDR3_JDATA_29 (0x20000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x20000000 */ +#define ADC_JDR3_JDATA_30 (0x40000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x40000000 */ +#define ADC_JDR3_JDATA_31 (0x80000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_JDR4 register ********************/ +#define ADC_JDR4_JDATA_Pos (0U) +#define ADC_JDR4_JDATA_Msk (0xFFFFFFFFUL << ADC_JDR4_JDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_JDR4_JDATA ADC_JDR4_JDATA_Msk /*!< ADC Injected DATA */ +#define ADC_JDR4_JDATA_0 (0x00000001UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR4_JDATA_1 (0x00000002UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR4_JDATA_2 (0x00000004UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR4_JDATA_3 (0x00000008UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR4_JDATA_4 (0x00000010UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR4_JDATA_5 (0x00000020UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR4_JDATA_6 (0x00000040UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR4_JDATA_7 (0x00000080UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR4_JDATA_8 (0x00000100UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR4_JDATA_9 (0x00000200UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR4_JDATA_10 (0x00000400UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR4_JDATA_11 (0x00000800UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR4_JDATA_12 (0x00001000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR4_JDATA_13 (0x00002000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR4_JDATA_14 (0x00004000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR4_JDATA_15 (0x00008000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00008000 */ +#define ADC_JDR4_JDATA_16 (0x00010000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00010000 */ +#define ADC_JDR4_JDATA_17 (0x00020000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00020000 */ +#define ADC_JDR4_JDATA_18 (0x00040000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00040000 */ +#define ADC_JDR4_JDATA_19 (0x00080000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00080000 */ +#define ADC_JDR4_JDATA_20 (0x00100000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00100000 */ +#define ADC_JDR4_JDATA_21 (0x00200000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00200000 */ +#define ADC_JDR4_JDATA_22 (0x00400000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00400000 */ +#define ADC_JDR4_JDATA_23 (0x00800000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00800000 */ +#define ADC_JDR4_JDATA_24 (0x01000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x01000000 */ +#define ADC_JDR4_JDATA_25 (0x02000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x02000000 */ +#define ADC_JDR4_JDATA_26 (0x04000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x04000000 */ +#define ADC_JDR4_JDATA_27 (0x08000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x08000000 */ +#define ADC_JDR4_JDATA_28 (0x10000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x10000000 */ +#define ADC_JDR4_JDATA_29 (0x20000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x20000000 */ +#define ADC_JDR4_JDATA_30 (0x40000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x40000000 */ +#define ADC_JDR4_JDATA_31 (0x80000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_AWD2CR register ********************/ +#define ADC_AWD2CR_AWD2CH_Pos (0U) +#define ADC_AWD2CR_AWD2CH_Msk (0xFFFFFUL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x000FFFFF */ +#define ADC_AWD2CR_AWD2CH ADC_AWD2CR_AWD2CH_Msk /*!< ADC Analog watchdog 2 channel selection */ +#define ADC_AWD2CR_AWD2CH_0 (0x00001UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000001 */ +#define ADC_AWD2CR_AWD2CH_1 (0x00002UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000002 */ +#define ADC_AWD2CR_AWD2CH_2 (0x00004UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000004 */ +#define ADC_AWD2CR_AWD2CH_3 (0x00008UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000008 */ +#define ADC_AWD2CR_AWD2CH_4 (0x00010UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000010 */ +#define ADC_AWD2CR_AWD2CH_5 (0x00020UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000020 */ +#define ADC_AWD2CR_AWD2CH_6 (0x00040UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000040 */ +#define ADC_AWD2CR_AWD2CH_7 (0x00080UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000080 */ +#define ADC_AWD2CR_AWD2CH_8 (0x00100UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000100 */ +#define ADC_AWD2CR_AWD2CH_9 (0x00200UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000200 */ +#define ADC_AWD2CR_AWD2CH_10 (0x00400UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000400 */ +#define ADC_AWD2CR_AWD2CH_11 (0x00800UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000800 */ +#define ADC_AWD2CR_AWD2CH_12 (0x01000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00001000 */ +#define ADC_AWD2CR_AWD2CH_13 (0x02000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00002000 */ +#define ADC_AWD2CR_AWD2CH_14 (0x04000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00004000 */ +#define ADC_AWD2CR_AWD2CH_15 (0x08000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00008000 */ +#define ADC_AWD2CR_AWD2CH_16 (0x10000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00010000 */ +#define ADC_AWD2CR_AWD2CH_17 (0x20000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00020000 */ +#define ADC_AWD2CR_AWD2CH_18 (0x40000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00040000 */ +#define ADC_AWD2CR_AWD2CH_19 (0x80000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00080000 */ + +/******************** Bit definition for ADC_AWD3CR register ********************/ +#define ADC_AWD3CR_AWD3CH_Pos (0U) +#define ADC_AWD3CR_AWD3CH_Msk (0xFFFFFUL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x000FFFFF */ +#define ADC_AWD3CR_AWD3CH ADC_AWD3CR_AWD3CH_Msk /*!< ADC Analog watchdog 2 channel selection */ +#define ADC_AWD3CR_AWD3CH_0 (0x00001UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000001 */ +#define ADC_AWD3CR_AWD3CH_1 (0x00002UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000002 */ +#define ADC_AWD3CR_AWD3CH_2 (0x00004UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000004 */ +#define ADC_AWD3CR_AWD3CH_3 (0x00008UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000008 */ +#define ADC_AWD3CR_AWD3CH_4 (0x00010UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000010 */ +#define ADC_AWD3CR_AWD3CH_5 (0x00020UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000020 */ +#define ADC_AWD3CR_AWD3CH_6 (0x00040UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000040 */ +#define ADC_AWD3CR_AWD3CH_7 (0x00080UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000080 */ +#define ADC_AWD3CR_AWD3CH_8 (0x00100UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000100 */ +#define ADC_AWD3CR_AWD3CH_9 (0x00200UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000200 */ +#define ADC_AWD3CR_AWD3CH_10 (0x00400UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000400 */ +#define ADC_AWD3CR_AWD3CH_11 (0x00800UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000800 */ +#define ADC_AWD3CR_AWD3CH_12 (0x01000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00001000 */ +#define ADC_AWD3CR_AWD3CH_13 (0x02000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00002000 */ +#define ADC_AWD3CR_AWD3CH_14 (0x04000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00004000 */ +#define ADC_AWD3CR_AWD3CH_15 (0x08000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00008000 */ +#define ADC_AWD3CR_AWD3CH_16 (0x10000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00010000 */ +#define ADC_AWD3CR_AWD3CH_17 (0x20000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00020000 */ +#define ADC_AWD3CR_AWD3CH_18 (0x40000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00040000 */ +#define ADC_AWD3CR_AWD3CH_19 (0x80000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00080000 */ + +/******************** Bit definition for ADC_DIFSEL register ********************/ +#define ADC_DIFSEL_DIFSEL_Pos (0U) +#define ADC_DIFSEL_DIFSEL_Msk (0xFFFFFUL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x000FFFFF */ +#define ADC_DIFSEL_DIFSEL ADC_DIFSEL_DIFSEL_Msk /*!< ADC differential modes for channels 1 to 18 */ +#define ADC_DIFSEL_DIFSEL_0 (0x00001UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000001 */ +#define ADC_DIFSEL_DIFSEL_1 (0x00002UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000002 */ +#define ADC_DIFSEL_DIFSEL_2 (0x00004UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000004 */ +#define ADC_DIFSEL_DIFSEL_3 (0x00008UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000008 */ +#define ADC_DIFSEL_DIFSEL_4 (0x00010UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000010 */ +#define ADC_DIFSEL_DIFSEL_5 (0x00020UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000020 */ +#define ADC_DIFSEL_DIFSEL_6 (0x00040UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000040 */ +#define ADC_DIFSEL_DIFSEL_7 (0x00080UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000080 */ +#define ADC_DIFSEL_DIFSEL_8 (0x00100UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000100 */ +#define ADC_DIFSEL_DIFSEL_9 (0x00200UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000200 */ +#define ADC_DIFSEL_DIFSEL_10 (0x00400UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000400 */ +#define ADC_DIFSEL_DIFSEL_11 (0x00800UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000800 */ +#define ADC_DIFSEL_DIFSEL_12 (0x01000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00001000 */ +#define ADC_DIFSEL_DIFSEL_13 (0x02000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00002000 */ +#define ADC_DIFSEL_DIFSEL_14 (0x04000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00004000 */ +#define ADC_DIFSEL_DIFSEL_15 (0x08000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00008000 */ +#define ADC_DIFSEL_DIFSEL_16 (0x10000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00010000 */ +#define ADC_DIFSEL_DIFSEL_17 (0x20000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00020000 */ +#define ADC_DIFSEL_DIFSEL_18 (0x40000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00040000 */ +#define ADC_DIFSEL_DIFSEL_19 (0x80000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00080000 */ + +/******************** Bit definition for ADC_CALFACT register ********************/ +#define ADC_CALFACT_CALFACT_S_Pos (0U) +#define ADC_CALFACT_CALFACT_S_Msk (0x7FFUL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x000007FF */ +#define ADC_CALFACT_CALFACT_S ADC_CALFACT_CALFACT_S_Msk /*!< ADC calibration factors in single-ended mode */ +#define ADC_CALFACT_CALFACT_S_0 (0x001UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000001 */ +#define ADC_CALFACT_CALFACT_S_1 (0x002UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000002 */ +#define ADC_CALFACT_CALFACT_S_2 (0x004UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000004 */ +#define ADC_CALFACT_CALFACT_S_3 (0x008UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000008 */ +#define ADC_CALFACT_CALFACT_S_4 (0x010UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000010 */ +#define ADC_CALFACT_CALFACT_S_5 (0x020UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000020 */ +#define ADC_CALFACT_CALFACT_S_6 (0x040UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000040 */ +#define ADC_CALFACT_CALFACT_S_7 (0x080UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000080 */ +#define ADC_CALFACT_CALFACT_S_8 (0x100UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000100 */ +#define ADC_CALFACT_CALFACT_S_9 (0x200UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000200 */ +#define ADC_CALFACT_CALFACT_S_10 (0x400UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000400 */ +#define ADC_CALFACT_CALFACT_D_Pos (16U) +#define ADC_CALFACT_CALFACT_D_Msk (0x7FFUL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x07FF0000 */ +#define ADC_CALFACT_CALFACT_D ADC_CALFACT_CALFACT_D_Msk /*!< ADC calibration factors in differential mode */ +#define ADC_CALFACT_CALFACT_D_0 (0x001UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00010000 */ +#define ADC_CALFACT_CALFACT_D_1 (0x002UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00020000 */ +#define ADC_CALFACT_CALFACT_D_2 (0x004UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00040000 */ +#define ADC_CALFACT_CALFACT_D_3 (0x008UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00080000 */ +#define ADC_CALFACT_CALFACT_D_4 (0x010UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00100000 */ +#define ADC_CALFACT_CALFACT_D_5 (0x020UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00200000 */ +#define ADC_CALFACT_CALFACT_D_6 (0x040UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00400000 */ +#define ADC_CALFACT_CALFACT_D_7 (0x080UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00800000 */ +#define ADC_CALFACT_CALFACT_D_8 (0x100UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x01000000 */ +#define ADC_CALFACT_CALFACT_D_9 (0x200UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x02000000 */ +#define ADC_CALFACT_CALFACT_D_10 (0x400UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x04000000 */ + +/******************** Bit definition for ADC_CALFACT2 register ********************/ +#define ADC_CALFACT2_LINCALFACT_Pos (0U) +#define ADC_CALFACT2_LINCALFACT_Msk (0x3FFFFFFFUL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x3FFFFFFF */ +#define ADC_CALFACT2_LINCALFACT ADC_CALFACT2_LINCALFACT_Msk /*!< ADC Linearity calibration factors */ +#define ADC_CALFACT2_LINCALFACT_0 (0x00000001UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000001 */ +#define ADC_CALFACT2_LINCALFACT_1 (0x00000002UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000002 */ +#define ADC_CALFACT2_LINCALFACT_2 (0x00000004UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000004 */ +#define ADC_CALFACT2_LINCALFACT_3 (0x00000008UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000008 */ +#define ADC_CALFACT2_LINCALFACT_4 (0x00000010UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000010 */ +#define ADC_CALFACT2_LINCALFACT_5 (0x00000020UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000020 */ +#define ADC_CALFACT2_LINCALFACT_6 (0x00000040UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000040 */ +#define ADC_CALFACT2_LINCALFACT_7 (0x00000080UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000080 */ +#define ADC_CALFACT2_LINCALFACT_8 (0x00000100UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000100 */ +#define ADC_CALFACT2_LINCALFACT_9 (0x00000200UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000200 */ +#define ADC_CALFACT2_LINCALFACT_10 (0x00000400UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000400 */ +#define ADC_CALFACT2_LINCALFACT_11 (0x00000800UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000800 */ +#define ADC_CALFACT2_LINCALFACT_12 (0x00001000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00001000 */ +#define ADC_CALFACT2_LINCALFACT_13 (0x00002000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00002000 */ +#define ADC_CALFACT2_LINCALFACT_14 (0x00004000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00004000 */ +#define ADC_CALFACT2_LINCALFACT_15 (0x00008000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00008000 */ +#define ADC_CALFACT2_LINCALFACT_16 (0x00010000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00010000 */ +#define ADC_CALFACT2_LINCALFACT_17 (0x00020000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00020000 */ +#define ADC_CALFACT2_LINCALFACT_18 (0x00040000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00040000 */ +#define ADC_CALFACT2_LINCALFACT_19 (0x00080000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00080000 */ +#define ADC_CALFACT2_LINCALFACT_20 (0x00100000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00100000 */ +#define ADC_CALFACT2_LINCALFACT_21 (0x00200000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00200000 */ +#define ADC_CALFACT2_LINCALFACT_22 (0x00400000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00400000 */ +#define ADC_CALFACT2_LINCALFACT_23 (0x00800000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00800000 */ +#define ADC_CALFACT2_LINCALFACT_24 (0x01000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x01000000 */ +#define ADC_CALFACT2_LINCALFACT_25 (0x02000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x02000000 */ +#define ADC_CALFACT2_LINCALFACT_26 (0x04000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x04000000 */ +#define ADC_CALFACT2_LINCALFACT_27 (0x08000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x08000000 */ +#define ADC_CALFACT2_LINCALFACT_28 (0x10000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x10000000 */ +#define ADC_CALFACT2_LINCALFACT_29 (0x20000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x20000000 */ + +/************************* ADC Common registers *****************************/ +/******************** Bit definition for ADC_CSR register ********************/ +#define ADC_CSR_ADRDY_MST_Pos (0U) +#define ADC_CSR_ADRDY_MST_Msk (0x1UL << ADC_CSR_ADRDY_MST_Pos) /*!< 0x00000001 */ +#define ADC_CSR_ADRDY_MST ADC_CSR_ADRDY_MST_Msk /*!< Master ADC ready */ +#define ADC_CSR_EOSMP_MST_Pos (1U) +#define ADC_CSR_EOSMP_MST_Msk (0x1UL << ADC_CSR_EOSMP_MST_Pos) /*!< 0x00000002 */ +#define ADC_CSR_EOSMP_MST ADC_CSR_EOSMP_MST_Msk /*!< End of sampling phase flag of the master ADC */ +#define ADC_CSR_EOC_MST_Pos (2U) +#define ADC_CSR_EOC_MST_Msk (0x1UL << ADC_CSR_EOC_MST_Pos) /*!< 0x00000004 */ +#define ADC_CSR_EOC_MST ADC_CSR_EOC_MST_Msk /*!< End of regular conversion of the master ADC */ +#define ADC_CSR_EOS_MST_Pos (3U) +#define ADC_CSR_EOS_MST_Msk (0x1UL << ADC_CSR_EOS_MST_Pos) /*!< 0x00000008 */ +#define ADC_CSR_EOS_MST ADC_CSR_EOS_MST_Msk /*!< End of regular sequence flag of the master ADC */ +#define ADC_CSR_OVR_MST_Pos (4U) +#define ADC_CSR_OVR_MST_Msk (0x1UL << ADC_CSR_OVR_MST_Pos) /*!< 0x00000010 */ +#define ADC_CSR_OVR_MST ADC_CSR_OVR_MST_Msk /*!< Overrun flag of the master ADC */ +#define ADC_CSR_JEOC_MST_Pos (5U) +#define ADC_CSR_JEOC_MST_Msk (0x1UL << ADC_CSR_JEOC_MST_Pos) /*!< 0x00000020 */ +#define ADC_CSR_JEOC_MST ADC_CSR_JEOC_MST_Msk /*!< End of injected conversion of the master ADC */ +#define ADC_CSR_JEOS_MST_Pos (6U) +#define ADC_CSR_JEOS_MST_Msk (0x1UL << ADC_CSR_JEOS_MST_Pos) /*!< 0x00000040 */ +#define ADC_CSR_JEOS_MST ADC_CSR_JEOS_MST_Msk /*!< End of injected sequence flag of the master ADC */ +#define ADC_CSR_AWD1_MST_Pos (7U) +#define ADC_CSR_AWD1_MST_Msk (0x1UL << ADC_CSR_AWD1_MST_Pos) /*!< 0x00000080 */ +#define ADC_CSR_AWD1_MST ADC_CSR_AWD1_MST_Msk /*!< Analog watchdog 1 flag of the master ADC */ +#define ADC_CSR_AWD2_MST_Pos (8U) +#define ADC_CSR_AWD2_MST_Msk (0x1UL << ADC_CSR_AWD2_MST_Pos) /*!< 0x00000100 */ +#define ADC_CSR_AWD2_MST ADC_CSR_AWD2_MST_Msk /*!< Analog watchdog 2 flag of the master ADC */ +#define ADC_CSR_AWD3_MST_Pos (9U) +#define ADC_CSR_AWD3_MST_Msk (0x1UL << ADC_CSR_AWD3_MST_Pos) /*!< 0x00000200 */ +#define ADC_CSR_AWD3_MST ADC_CSR_AWD3_MST_Msk /*!< Analog watchdog 3 flag of the master ADC */ +#define ADC_CSR_JQOVF_MST_Pos (10U) +#define ADC_CSR_JQOVF_MST_Msk (0x1UL << ADC_CSR_JQOVF_MST_Pos) /*!< 0x00000400 */ +#define ADC_CSR_JQOVF_MST ADC_CSR_JQOVF_MST_Msk /*!< Injected context queue overflow flag of the master ADC */ +#define ADC_CSR_ADRDY_SLV_Pos (16U) +#define ADC_CSR_ADRDY_SLV_Msk (0x1UL << ADC_CSR_ADRDY_SLV_Pos) /*!< 0x00010000 */ +#define ADC_CSR_ADRDY_SLV ADC_CSR_ADRDY_SLV_Msk /*!< Slave ADC ready */ +#define ADC_CSR_EOSMP_SLV_Pos (17U) +#define ADC_CSR_EOSMP_SLV_Msk (0x1UL << ADC_CSR_EOSMP_SLV_Pos) /*!< 0x00020000 */ +#define ADC_CSR_EOSMP_SLV ADC_CSR_EOSMP_SLV_Msk /*!< End of sampling phase flag of the slave ADC */ +#define ADC_CSR_EOC_SLV_Pos (18U) +#define ADC_CSR_EOC_SLV_Msk (0x1UL << ADC_CSR_EOC_SLV_Pos) /*!< 0x00040000 */ +#define ADC_CSR_EOC_SLV ADC_CSR_EOC_SLV_Msk /*!< End of regular conversion of the slave ADC */ +#define ADC_CSR_EOS_SLV_Pos (19U) +#define ADC_CSR_EOS_SLV_Msk (0x1UL << ADC_CSR_EOS_SLV_Pos) /*!< 0x00080000 */ +#define ADC_CSR_EOS_SLV ADC_CSR_EOS_SLV_Msk /*!< End of regular sequence flag of the slave ADC */ +#define ADC_CSR_OVR_SLV_Pos (20U) +#define ADC_CSR_OVR_SLV_Msk (0x1UL << ADC_CSR_OVR_SLV_Pos) /*!< 0x00100000 */ +#define ADC_CSR_OVR_SLV ADC_CSR_OVR_SLV_Msk /*!< Overrun flag of the slave ADC */ +#define ADC_CSR_JEOC_SLV_Pos (21U) +#define ADC_CSR_JEOC_SLV_Msk (0x1UL << ADC_CSR_JEOC_SLV_Pos) /*!< 0x00200000 */ +#define ADC_CSR_JEOC_SLV ADC_CSR_JEOC_SLV_Msk /*!< End of injected conversion of the slave ADC */ +#define ADC_CSR_JEOS_SLV_Pos (22U) +#define ADC_CSR_JEOS_SLV_Msk (0x1UL << ADC_CSR_JEOS_SLV_Pos) /*!< 0x00400000 */ +#define ADC_CSR_JEOS_SLV ADC_CSR_JEOS_SLV_Msk /*!< End of injected sequence flag of the slave ADC */ +#define ADC_CSR_AWD1_SLV_Pos (23U) +#define ADC_CSR_AWD1_SLV_Msk (0x1UL << ADC_CSR_AWD1_SLV_Pos) /*!< 0x00800000 */ +#define ADC_CSR_AWD1_SLV ADC_CSR_AWD1_SLV_Msk /*!< Analog watchdog 1 flag of the slave ADC */ +#define ADC_CSR_AWD2_SLV_Pos (24U) +#define ADC_CSR_AWD2_SLV_Msk (0x1UL << ADC_CSR_AWD2_SLV_Pos) /*!< 0x01000000 */ +#define ADC_CSR_AWD2_SLV ADC_CSR_AWD2_SLV_Msk /*!< Analog watchdog 2 flag of the slave ADC */ +#define ADC_CSR_AWD3_SLV_Pos (25U) +#define ADC_CSR_AWD3_SLV_Msk (0x1UL << ADC_CSR_AWD3_SLV_Pos) /*!< 0x02000000 */ +#define ADC_CSR_AWD3_SLV ADC_CSR_AWD3_SLV_Msk /*!< Analog watchdog 3 flag of the slave ADC */ +#define ADC_CSR_JQOVF_SLV_Pos (26U) +#define ADC_CSR_JQOVF_SLV_Msk (0x1UL << ADC_CSR_JQOVF_SLV_Pos) /*!< 0x04000000 */ +#define ADC_CSR_JQOVF_SLV ADC_CSR_JQOVF_SLV_Msk /*!< Injected context queue overflow flag of the slave ADC */ + +/******************** Bit definition for ADC_CCR register ********************/ +#define ADC_CCR_DUAL_Pos (0U) +#define ADC_CCR_DUAL_Msk (0x1FUL << ADC_CCR_DUAL_Pos) /*!< 0x0000001F */ +#define ADC_CCR_DUAL ADC_CCR_DUAL_Msk /*!< Dual ADC mode selection */ +#define ADC_CCR_DUAL_0 (0x01UL << ADC_CCR_DUAL_Pos) /*!< 0x00000001 */ +#define ADC_CCR_DUAL_1 (0x02UL << ADC_CCR_DUAL_Pos) /*!< 0x00000002 */ +#define ADC_CCR_DUAL_2 (0x04UL << ADC_CCR_DUAL_Pos) /*!< 0x00000004 */ +#define ADC_CCR_DUAL_3 (0x08UL << ADC_CCR_DUAL_Pos) /*!< 0x00000008 */ +#define ADC_CCR_DUAL_4 (0x10UL << ADC_CCR_DUAL_Pos) /*!< 0x00000010 */ + +#define ADC_CCR_DELAY_Pos (8U) +#define ADC_CCR_DELAY_Msk (0xFUL << ADC_CCR_DELAY_Pos) /*!< 0x00000F00 */ +#define ADC_CCR_DELAY ADC_CCR_DELAY_Msk /*!< Delay between 2 sampling phases */ +#define ADC_CCR_DELAY_0 (0x1UL << ADC_CCR_DELAY_Pos) /*!< 0x00000100 */ +#define ADC_CCR_DELAY_1 (0x2UL << ADC_CCR_DELAY_Pos) /*!< 0x00000200 */ +#define ADC_CCR_DELAY_2 (0x4UL << ADC_CCR_DELAY_Pos) /*!< 0x00000400 */ +#define ADC_CCR_DELAY_3 (0x8UL << ADC_CCR_DELAY_Pos) /*!< 0x00000800 */ + + +#define ADC_CCR_DAMDF_Pos (14U) +#define ADC_CCR_DAMDF_Msk (0x3UL << ADC_CCR_DAMDF_Pos) /*!< 0x0000C000 */ +#define ADC_CCR_DAMDF ADC_CCR_DAMDF_Msk /*!< Dual ADC mode Data format */ +#define ADC_CCR_DAMDF_0 (0x1UL << ADC_CCR_DAMDF_Pos) /*!< 0x00004000 */ +#define ADC_CCR_DAMDF_1 (0x2UL << ADC_CCR_DAMDF_Pos) /*!< 0x00008000 */ + +#define ADC_CCR_CKMODE_Pos (16U) +#define ADC_CCR_CKMODE_Msk (0x3UL << ADC_CCR_CKMODE_Pos) /*!< 0x00030000 */ +#define ADC_CCR_CKMODE ADC_CCR_CKMODE_Msk /*!< ADC clock mode */ +#define ADC_CCR_CKMODE_0 (0x1UL << ADC_CCR_CKMODE_Pos) /*!< 0x00010000 */ +#define ADC_CCR_CKMODE_1 (0x2UL << ADC_CCR_CKMODE_Pos) /*!< 0x00020000 */ + +#define ADC_CCR_PRESC_Pos (18U) +#define ADC_CCR_PRESC_Msk (0xFUL << ADC_CCR_PRESC_Pos) /*!< 0x003C0000 */ +#define ADC_CCR_PRESC ADC_CCR_PRESC_Msk /*!< ADC prescaler */ +#define ADC_CCR_PRESC_0 (0x1UL << ADC_CCR_PRESC_Pos) /*!< 0x00040000 */ +#define ADC_CCR_PRESC_1 (0x2UL << ADC_CCR_PRESC_Pos) /*!< 0x00080000 */ +#define ADC_CCR_PRESC_2 (0x4UL << ADC_CCR_PRESC_Pos) /*!< 0x00100000 */ +#define ADC_CCR_PRESC_3 (0x8UL << ADC_CCR_PRESC_Pos) /*!< 0x00200000 */ + +#define ADC_CCR_VREFEN_Pos (22U) +#define ADC_CCR_VREFEN_Msk (0x1UL << ADC_CCR_VREFEN_Pos) /*!< 0x00400000 */ +#define ADC_CCR_VREFEN ADC_CCR_VREFEN_Msk /*!< VREFINT enable */ +#define ADC_CCR_TSEN_Pos (23U) +#define ADC_CCR_TSEN_Msk (0x1UL << ADC_CCR_TSEN_Pos) /*!< 0x00800000 */ +#define ADC_CCR_TSEN ADC_CCR_TSEN_Msk /*!< Temperature sensor enable */ +#define ADC_CCR_VBATEN_Pos (24U) +#define ADC_CCR_VBATEN_Msk (0x1UL << ADC_CCR_VBATEN_Pos) /*!< 0x01000000 */ +#define ADC_CCR_VBATEN ADC_CCR_VBATEN_Msk /*!< VBAT enable */ + +/******************** Bit definition for ADC_CDR register *******************/ +#define ADC_CDR_RDATA_MST_Pos (0U) +#define ADC_CDR_RDATA_MST_Msk (0xFFFFUL << ADC_CDR_RDATA_MST_Pos) /*!< 0x0000FFFF */ +#define ADC_CDR_RDATA_MST ADC_CDR_RDATA_MST_Msk /*!< ADC multimode master group regular conversion data */ + +#define ADC_CDR_RDATA_SLV_Pos (16U) +#define ADC_CDR_RDATA_SLV_Msk (0xFFFFUL << ADC_CDR_RDATA_SLV_Pos) /*!< 0xFFFF0000 */ +#define ADC_CDR_RDATA_SLV ADC_CDR_RDATA_SLV_Msk /*!< ADC multimode slave group regular conversion data */ + +/******************** Bit definition for ADC_CDR2 register ******************/ +#define ADC_CDR2_RDATA_ALT_Pos (0U) +#define ADC_CDR2_RDATA_ALT_Msk (0xFFFFFFFFUL << ADC_CDR2_RDATA_ALT_Pos) /*!< 0xFFFFFFFF */ +#define ADC_CDR2_RDATA_ALT ADC_CDR2_RDATA_ALT_Msk /*!< Regular data of the master/slave alternated ADCs */ + + +/******************************************************************************/ +/* */ +/* VREFBUF */ +/* */ +/******************************************************************************/ +/******************* Bit definition for VREFBUF_CSR register ****************/ +#define VREFBUF_CSR_ENVR_Pos (0U) +#define VREFBUF_CSR_ENVR_Msk (0x1UL << VREFBUF_CSR_ENVR_Pos) /*!< 0x00000001 */ +#define VREFBUF_CSR_ENVR VREFBUF_CSR_ENVR_Msk /*!*/ +#define DAC_CR_CEN1_Pos (14U) +#define DAC_CR_CEN1_Msk (0x1UL << DAC_CR_CEN1_Pos) /*!< 0x00004000 */ +#define DAC_CR_CEN1 DAC_CR_CEN1_Msk /*!*/ + +#define DAC_CR_EN2_Pos (16U) +#define DAC_CR_EN2_Msk (0x1UL << DAC_CR_EN2_Pos) /*!< 0x00010000 */ +#define DAC_CR_EN2 DAC_CR_EN2_Msk /*!*/ +#define DAC_CR_CEN2_Pos (30U) +#define DAC_CR_CEN2_Msk (0x1UL << DAC_CR_CEN2_Pos) /*!< 0x40000000 */ +#define DAC_CR_CEN2 DAC_CR_CEN2_Msk /*!*/ + +/***************** Bit definition for DAC_SWTRIGR register ******************/ +#define DAC_SWTRIGR_SWTRIG1_Pos (0U) +#define DAC_SWTRIGR_SWTRIG1_Msk (0x1UL << DAC_SWTRIGR_SWTRIG1_Pos) /*!< 0x00000001 */ +#define DAC_SWTRIGR_SWTRIG1 DAC_SWTRIGR_SWTRIG1_Msk /*!
© Copyright (c) 2019 STMicroelectronics. + * All rights reserved.
+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/** @addtogroup CMSIS_Device + * @{ + */ + +/** @addtogroup stm32h735xx + * @{ + */ + +#ifndef STM32H735xx_H +#define STM32H735xx_H + +#ifdef __cplusplus + extern "C" { +#endif /* __cplusplus */ + +/** @addtogroup Peripheral_interrupt_number_definition + * @{ + */ + +/** + * @brief STM32H7XX Interrupt Number Definition, according to the selected device + * in @ref Library_configuration_section + */ +typedef enum +{ +/****** Cortex-M Processor Exceptions Numbers *****************************************************************/ + NonMaskableInt_IRQn = -14, /*!< 2 Non Maskable Interrupt */ + HardFault_IRQn = -13, /*!< 4 Cortex-M Memory Management Interrupt */ + MemoryManagement_IRQn = -12, /*!< 4 Cortex-M Memory Management Interrupt */ + BusFault_IRQn = -11, /*!< 5 Cortex-M Bus Fault Interrupt */ + UsageFault_IRQn = -10, /*!< 6 Cortex-M Usage Fault Interrupt */ + SVCall_IRQn = -5, /*!< 11 Cortex-M SV Call Interrupt */ + DebugMonitor_IRQn = -4, /*!< 12 Cortex-M Debug Monitor Interrupt */ + PendSV_IRQn = -2, /*!< 14 Cortex-M Pend SV Interrupt */ + SysTick_IRQn = -1, /*!< 15 Cortex-M System Tick Interrupt */ +/****** STM32 specific Interrupt Numbers **********************************************************************/ + WWDG_IRQn = 0, /*!< Window WatchDog Interrupt ( wwdg1_it, wwdg2_it) */ + PVD_AVD_IRQn = 1, /*!< PVD/AVD through EXTI Line detection Interrupt */ + TAMP_STAMP_IRQn = 2, /*!< Tamper and TimeStamp interrupts through the EXTI line */ + RTC_WKUP_IRQn = 3, /*!< RTC Wakeup interrupt through the EXTI line */ + FLASH_IRQn = 4, /*!< FLASH global Interrupt */ + RCC_IRQn = 5, /*!< RCC global Interrupt */ + EXTI0_IRQn = 6, /*!< EXTI Line0 Interrupt */ + EXTI1_IRQn = 7, /*!< EXTI Line1 Interrupt */ + EXTI2_IRQn = 8, /*!< EXTI Line2 Interrupt */ + EXTI3_IRQn = 9, /*!< EXTI Line3 Interrupt */ + EXTI4_IRQn = 10, /*!< EXTI Line4 Interrupt */ + DMA1_Stream0_IRQn = 11, /*!< DMA1 Stream 0 global Interrupt */ + DMA1_Stream1_IRQn = 12, /*!< DMA1 Stream 1 global Interrupt */ + DMA1_Stream2_IRQn = 13, /*!< DMA1 Stream 2 global Interrupt */ + DMA1_Stream3_IRQn = 14, /*!< DMA1 Stream 3 global Interrupt */ + DMA1_Stream4_IRQn = 15, /*!< DMA1 Stream 4 global Interrupt */ + DMA1_Stream5_IRQn = 16, /*!< DMA1 Stream 5 global Interrupt */ + DMA1_Stream6_IRQn = 17, /*!< DMA1 Stream 6 global Interrupt */ + ADC_IRQn = 18, /*!< ADC1 and ADC2 global Interrupts */ + FDCAN1_IT0_IRQn = 19, /*!< FDCAN1 Interrupt line 0 */ + FDCAN2_IT0_IRQn = 20, /*!< FDCAN2 Interrupt line 0 */ + FDCAN1_IT1_IRQn = 21, /*!< FDCAN1 Interrupt line 1 */ + FDCAN2_IT1_IRQn = 22, /*!< FDCAN2 Interrupt line 1 */ + EXTI9_5_IRQn = 23, /*!< External Line[9:5] Interrupts */ + TIM1_BRK_IRQn = 24, /*!< TIM1 Break Interrupt */ + TIM1_UP_IRQn = 25, /*!< TIM1 Update Interrupt */ + TIM1_TRG_COM_IRQn = 26, /*!< TIM1 Trigger and Commutation Interrupt */ + TIM1_CC_IRQn = 27, /*!< TIM1 Capture Compare Interrupt */ + TIM2_IRQn = 28, /*!< TIM2 global Interrupt */ + TIM3_IRQn = 29, /*!< TIM3 global Interrupt */ + TIM4_IRQn = 30, /*!< TIM4 global Interrupt */ + I2C1_EV_IRQn = 31, /*!< I2C1 Event Interrupt */ + I2C1_ER_IRQn = 32, /*!< I2C1 Error Interrupt */ + I2C2_EV_IRQn = 33, /*!< I2C2 Event Interrupt */ + I2C2_ER_IRQn = 34, /*!< I2C2 Error Interrupt */ + SPI1_IRQn = 35, /*!< SPI1 global Interrupt */ + SPI2_IRQn = 36, /*!< SPI2 global Interrupt */ + USART1_IRQn = 37, /*!< USART1 global Interrupt */ + USART2_IRQn = 38, /*!< USART2 global Interrupt */ + USART3_IRQn = 39, /*!< USART3 global Interrupt */ + EXTI15_10_IRQn = 40, /*!< External Line[15:10] Interrupts */ + RTC_Alarm_IRQn = 41, /*!< RTC Alarm (A and B) through EXTI Line Interrupt */ + TIM8_BRK_TIM12_IRQn = 43, /*!< TIM8 Break Interrupt and TIM12 global interrupt */ + TIM8_UP_TIM13_IRQn = 44, /*!< TIM8 Update Interrupt and TIM13 global interrupt */ + TIM8_TRG_COM_TIM14_IRQn = 45, /*!< TIM8 Trigger and Commutation Interrupt and TIM14 global interrupt */ + TIM8_CC_IRQn = 46, /*!< TIM8 Capture Compare Interrupt */ + DMA1_Stream7_IRQn = 47, /*!< DMA1 Stream7 Interrupt */ + FMC_IRQn = 48, /*!< FMC global Interrupt */ + SDMMC1_IRQn = 49, /*!< SDMMC1 global Interrupt */ + TIM5_IRQn = 50, /*!< TIM5 global Interrupt */ + SPI3_IRQn = 51, /*!< SPI3 global Interrupt */ + UART4_IRQn = 52, /*!< UART4 global Interrupt */ + UART5_IRQn = 53, /*!< UART5 global Interrupt */ + TIM6_DAC_IRQn = 54, /*!< TIM6 global and DAC1&2 underrun error interrupts */ + TIM7_IRQn = 55, /*!< TIM7 global interrupt */ + DMA2_Stream0_IRQn = 56, /*!< DMA2 Stream 0 global Interrupt */ + DMA2_Stream1_IRQn = 57, /*!< DMA2 Stream 1 global Interrupt */ + DMA2_Stream2_IRQn = 58, /*!< DMA2 Stream 2 global Interrupt */ + DMA2_Stream3_IRQn = 59, /*!< DMA2 Stream 3 global Interrupt */ + DMA2_Stream4_IRQn = 60, /*!< DMA2 Stream 4 global Interrupt */ + ETH_IRQn = 61, /*!< Ethernet global Interrupt */ + ETH_WKUP_IRQn = 62, /*!< Ethernet Wakeup through EXTI line Interrupt */ + FDCAN_CAL_IRQn = 63, /*!< FDCAN Calibration unit Interrupt */ + DMA2_Stream5_IRQn = 68, /*!< DMA2 Stream 5 global interrupt */ + DMA2_Stream6_IRQn = 69, /*!< DMA2 Stream 6 global interrupt */ + DMA2_Stream7_IRQn = 70, /*!< DMA2 Stream 7 global interrupt */ + USART6_IRQn = 71, /*!< USART6 global interrupt */ + I2C3_EV_IRQn = 72, /*!< I2C3 event interrupt */ + I2C3_ER_IRQn = 73, /*!< I2C3 error interrupt */ + OTG_HS_EP1_OUT_IRQn = 74, /*!< USB OTG HS End Point 1 Out global interrupt */ + OTG_HS_EP1_IN_IRQn = 75, /*!< USB OTG HS End Point 1 In global interrupt */ + OTG_HS_WKUP_IRQn = 76, /*!< USB OTG HS Wakeup through EXTI interrupt */ + OTG_HS_IRQn = 77, /*!< USB OTG HS global interrupt */ + DCMI_PSSI_IRQn = 78, /*!< DCMI and PSSI global interrupt */ + CRYP_IRQn = 79, /*!< CRYP crypto global interrupt */ + HASH_RNG_IRQn = 80, /*!< HASH and RNG global interrupt */ + FPU_IRQn = 81, /*!< FPU global interrupt */ + UART7_IRQn = 82, /*!< UART7 global interrupt */ + UART8_IRQn = 83, /*!< UART8 global interrupt */ + SPI4_IRQn = 84, /*!< SPI4 global Interrupt */ + SPI5_IRQn = 85, /*!< SPI5 global Interrupt */ + SPI6_IRQn = 86, /*!< SPI6 global Interrupt */ + SAI1_IRQn = 87, /*!< SAI1 global Interrupt */ + LTDC_IRQn = 88, /*!< LTDC global Interrupt */ + LTDC_ER_IRQn = 89, /*!< LTDC Error global Interrupt */ + DMA2D_IRQn = 90, /*!< DMA2D global Interrupt */ + OCTOSPI1_IRQn = 92, /*!< OCTOSPI1 global interrupt */ + LPTIM1_IRQn = 93, /*!< LP TIM1 interrupt */ + CEC_IRQn = 94, /*!< HDMI-CEC global Interrupt */ + I2C4_EV_IRQn = 95, /*!< I2C4 Event Interrupt */ + I2C4_ER_IRQn = 96, /*!< I2C4 Error Interrupt */ + SPDIF_RX_IRQn = 97, /*!< SPDIF-RX global Interrupt */ + DMAMUX1_OVR_IRQn = 102, /*! + +/** @addtogroup Peripheral_registers_structures + * @{ + */ + +/** + * @brief Analog to Digital Converter + */ + +typedef struct +{ + __IO uint32_t ISR; /*!< ADC Interrupt and Status Register, Address offset: 0x00 */ + __IO uint32_t IER; /*!< ADC Interrupt Enable Register, Address offset: 0x04 */ + __IO uint32_t CR; /*!< ADC control register, Address offset: 0x08 */ + __IO uint32_t CFGR; /*!< ADC Configuration register, Address offset: 0x0C */ + __IO uint32_t CFGR2; /*!< ADC Configuration register 2, Address offset: 0x10 */ + __IO uint32_t SMPR1; /*!< ADC sample time register 1, Address offset: 0x14 */ + __IO uint32_t SMPR2; /*!< ADC sample time register 2, Address offset: 0x18 */ + __IO uint32_t PCSEL_RES0; /*!< Rserved for ADC3, ADC1/2 pre-channel selection, Address offset: 0x1C */ + __IO uint32_t LTR1_TR1; /*!< ADC watchdog Lower threshold register 1, Address offset: 0x20 */ + __IO uint32_t HTR1_TR2; /*!< ADC watchdog higher threshold register 1, Address offset: 0x24 */ + __IO uint32_t RES1_TR3; /*!< Rserved for ADC1/2, ADC3 threshold register, Address offset: 0x28 */ + uint32_t RESERVED2; /*!< Reserved, 0x02C */ + __IO uint32_t SQR1; /*!< ADC regular sequence register 1, Address offset: 0x30 */ + __IO uint32_t SQR2; /*!< ADC regular sequence register 2, Address offset: 0x34 */ + __IO uint32_t SQR3; /*!< ADC regular sequence register 3, Address offset: 0x38 */ + __IO uint32_t SQR4; /*!< ADC regular sequence register 4, Address offset: 0x3C */ + __IO uint32_t DR; /*!< ADC regular data register, Address offset: 0x40 */ + uint32_t RESERVED3; /*!< Reserved, 0x044 */ + uint32_t RESERVED4; /*!< Reserved, 0x048 */ + __IO uint32_t JSQR; /*!< ADC injected sequence register, Address offset: 0x4C */ + uint32_t RESERVED5[4]; /*!< Reserved, 0x050 - 0x05C */ + __IO uint32_t OFR1; /*!< ADC offset register 1, Address offset: 0x60 */ + __IO uint32_t OFR2; /*!< ADC offset register 2, Address offset: 0x64 */ + __IO uint32_t OFR3; /*!< ADC offset register 3, Address offset: 0x68 */ + __IO uint32_t OFR4; /*!< ADC offset register 4, Address offset: 0x6C */ + uint32_t RESERVED6[4]; /*!< Reserved, 0x070 - 0x07C */ + __IO uint32_t JDR1; /*!< ADC injected data register 1, Address offset: 0x80 */ + __IO uint32_t JDR2; /*!< ADC injected data register 2, Address offset: 0x84 */ + __IO uint32_t JDR3; /*!< ADC injected data register 3, Address offset: 0x88 */ + __IO uint32_t JDR4; /*!< ADC injected data register 4, Address offset: 0x8C */ + uint32_t RESERVED7[4]; /*!< Reserved, 0x090 - 0x09C */ + __IO uint32_t AWD2CR; /*!< ADC Analog Watchdog 2 Configuration Register, Address offset: 0xA0 */ + __IO uint32_t AWD3CR; /*!< ADC Analog Watchdog 3 Configuration Register, Address offset: 0xA4 */ + uint32_t RESERVED8; /*!< Reserved, 0x0A8 */ + uint32_t RESERVED9; /*!< Reserved, 0x0AC */ + __IO uint32_t LTR2_DIFSEL; /*!< ADC watchdog Lower threshold register 2, Difsel for ADC3, Address offset: 0xB0 */ + __IO uint32_t HTR2_CALFACT; /*!< ADC watchdog Higher threshold register 2, Calfact for ADC3, Address offset: 0xB4 */ + __IO uint32_t LTR3_RES10; /*!< ADC watchdog Lower threshold register 3, specific ADC1/2, Address offset: 0xB8 */ + __IO uint32_t HTR3_RES11; /*!< ADC watchdog Higher threshold register 3, specific ADC1/2, Address offset: 0xBC */ + __IO uint32_t DIFSEL_RES12; /*!< ADC Differential Mode Selection Register specific ADC1/2, Address offset: 0xC0 */ + __IO uint32_t CALFACT_RES13; /*!< ADC Calibration Factors specific ADC1/2, Address offset: 0xC4 */ + __IO uint32_t CALFACT2_RES14; /*!< ADC Linearity Calibration Factors specific ADC1/2, Address offset: 0xC8 */ +} ADC_TypeDef; + + +typedef struct +{ +__IO uint32_t CSR; /*!< ADC Common status register, Address offset: ADC1/3 base address + 0x300 */ +uint32_t RESERVED; /*!< Reserved, ADC1/3 base address + 0x304 */ +__IO uint32_t CCR; /*!< ADC common control register, Address offset: ADC1/3 base address + 0x308 */ +__IO uint32_t CDR; /*!< ADC common regular data register for dual Address offset: ADC1/3 base address + 0x30C */ +__IO uint32_t CDR2; /*!< ADC common regular data register for 32-bit dual mode Address offset: ADC1/3 base address + 0x310 */ + +} ADC_Common_TypeDef; + + +/** + * @brief VREFBUF + */ + +typedef struct +{ + __IO uint32_t CSR; /*!< VREFBUF control and status register, Address offset: 0x00 */ + __IO uint32_t CCR; /*!< VREFBUF calibration and control register, Address offset: 0x04 */ +} VREFBUF_TypeDef; + + +/** + * @brief FD Controller Area Network + */ + +typedef struct +{ + __IO uint32_t CREL; /*!< FDCAN Core Release register, Address offset: 0x000 */ + __IO uint32_t ENDN; /*!< FDCAN Endian register, Address offset: 0x004 */ + __IO uint32_t RESERVED1; /*!< Reserved, 0x008 */ + __IO uint32_t DBTP; /*!< FDCAN Data Bit Timing & Prescaler register, Address offset: 0x00C */ + __IO uint32_t TEST; /*!< FDCAN Test register, Address offset: 0x010 */ + __IO uint32_t RWD; /*!< FDCAN RAM Watchdog register, Address offset: 0x014 */ + __IO uint32_t CCCR; /*!< FDCAN CC Control register, Address offset: 0x018 */ + __IO uint32_t NBTP; /*!< FDCAN Nominal Bit Timing & Prescaler register, Address offset: 0x01C */ + __IO uint32_t TSCC; /*!< FDCAN Timestamp Counter Configuration register, Address offset: 0x020 */ + __IO uint32_t TSCV; /*!< FDCAN Timestamp Counter Value register, Address offset: 0x024 */ + __IO uint32_t TOCC; /*!< FDCAN Timeout Counter Configuration register, Address offset: 0x028 */ + __IO uint32_t TOCV; /*!< FDCAN Timeout Counter Value register, Address offset: 0x02C */ + __IO uint32_t RESERVED2[4]; /*!< Reserved, 0x030 - 0x03C */ + __IO uint32_t ECR; /*!< FDCAN Error Counter register, Address offset: 0x040 */ + __IO uint32_t PSR; /*!< FDCAN Protocol Status register, Address offset: 0x044 */ + __IO uint32_t TDCR; /*!< FDCAN Transmitter Delay Compensation register, Address offset: 0x048 */ + __IO uint32_t RESERVED3; /*!< Reserved, 0x04C */ + __IO uint32_t IR; /*!< FDCAN Interrupt register, Address offset: 0x050 */ + __IO uint32_t IE; /*!< FDCAN Interrupt Enable register, Address offset: 0x054 */ + __IO uint32_t ILS; /*!< FDCAN Interrupt Line Select register, Address offset: 0x058 */ + __IO uint32_t ILE; /*!< FDCAN Interrupt Line Enable register, Address offset: 0x05C */ + __IO uint32_t RESERVED4[8]; /*!< Reserved, 0x060 - 0x07C */ + __IO uint32_t GFC; /*!< FDCAN Global Filter Configuration register, Address offset: 0x080 */ + __IO uint32_t SIDFC; /*!< FDCAN Standard ID Filter Configuration register, Address offset: 0x084 */ + __IO uint32_t XIDFC; /*!< FDCAN Extended ID Filter Configuration register, Address offset: 0x088 */ + __IO uint32_t RESERVED5; /*!< Reserved, 0x08C */ + __IO uint32_t XIDAM; /*!< FDCAN Extended ID AND Mask register, Address offset: 0x090 */ + __IO uint32_t HPMS; /*!< FDCAN High Priority Message Status register, Address offset: 0x094 */ + __IO uint32_t NDAT1; /*!< FDCAN New Data 1 register, Address offset: 0x098 */ + __IO uint32_t NDAT2; /*!< FDCAN New Data 2 register, Address offset: 0x09C */ + __IO uint32_t RXF0C; /*!< FDCAN Rx FIFO 0 Configuration register, Address offset: 0x0A0 */ + __IO uint32_t RXF0S; /*!< FDCAN Rx FIFO 0 Status register, Address offset: 0x0A4 */ + __IO uint32_t RXF0A; /*!< FDCAN Rx FIFO 0 Acknowledge register, Address offset: 0x0A8 */ + __IO uint32_t RXBC; /*!< FDCAN Rx Buffer Configuration register, Address offset: 0x0AC */ + __IO uint32_t RXF1C; /*!< FDCAN Rx FIFO 1 Configuration register, Address offset: 0x0B0 */ + __IO uint32_t RXF1S; /*!< FDCAN Rx FIFO 1 Status register, Address offset: 0x0B4 */ + __IO uint32_t RXF1A; /*!< FDCAN Rx FIFO 1 Acknowledge register, Address offset: 0x0B8 */ + __IO uint32_t RXESC; /*!< FDCAN Rx Buffer/FIFO Element Size Configuration register, Address offset: 0x0BC */ + __IO uint32_t TXBC; /*!< FDCAN Tx Buffer Configuration register, Address offset: 0x0C0 */ + __IO uint32_t TXFQS; /*!< FDCAN Tx FIFO/Queue Status register, Address offset: 0x0C4 */ + __IO uint32_t TXESC; /*!< FDCAN Tx Buffer Element Size Configuration register, Address offset: 0x0C8 */ + __IO uint32_t TXBRP; /*!< FDCAN Tx Buffer Request Pending register, Address offset: 0x0CC */ + __IO uint32_t TXBAR; /*!< FDCAN Tx Buffer Add Request register, Address offset: 0x0D0 */ + __IO uint32_t TXBCR; /*!< FDCAN Tx Buffer Cancellation Request register, Address offset: 0x0D4 */ + __IO uint32_t TXBTO; /*!< FDCAN Tx Buffer Transmission Occurred register, Address offset: 0x0D8 */ + __IO uint32_t TXBCF; /*!< FDCAN Tx Buffer Cancellation Finished register, Address offset: 0x0DC */ + __IO uint32_t TXBTIE; /*!< FDCAN Tx Buffer Transmission Interrupt Enable register, Address offset: 0x0E0 */ + __IO uint32_t TXBCIE; /*!< FDCAN Tx Buffer Cancellation Finished Interrupt Enable register, Address offset: 0x0E4 */ + __IO uint32_t RESERVED6[2]; /*!< Reserved, 0x0E8 - 0x0EC */ + __IO uint32_t TXEFC; /*!< FDCAN Tx Event FIFO Configuration register, Address offset: 0x0F0 */ + __IO uint32_t TXEFS; /*!< FDCAN Tx Event FIFO Status register, Address offset: 0x0F4 */ + __IO uint32_t TXEFA; /*!< FDCAN Tx Event FIFO Acknowledge register, Address offset: 0x0F8 */ + __IO uint32_t RESERVED7; /*!< Reserved, 0x0FC */ +} FDCAN_GlobalTypeDef; + +/** + * @brief TTFD Controller Area Network + */ + +typedef struct +{ + __IO uint32_t TTTMC; /*!< TT Trigger Memory Configuration register, Address offset: 0x100 */ + __IO uint32_t TTRMC; /*!< TT Reference Message Configuration register, Address offset: 0x104 */ + __IO uint32_t TTOCF; /*!< TT Operation Configuration register, Address offset: 0x108 */ + __IO uint32_t TTMLM; /*!< TT Matrix Limits register, Address offset: 0x10C */ + __IO uint32_t TURCF; /*!< TUR Configuration register, Address offset: 0x110 */ + __IO uint32_t TTOCN; /*!< TT Operation Control register, Address offset: 0x114 */ + __IO uint32_t TTGTP; /*!< TT Global Time Preset register, Address offset: 0x118 */ + __IO uint32_t TTTMK; /*!< TT Time Mark register, Address offset: 0x11C */ + __IO uint32_t TTIR; /*!< TT Interrupt register, Address offset: 0x120 */ + __IO uint32_t TTIE; /*!< TT Interrupt Enable register, Address offset: 0x124 */ + __IO uint32_t TTILS; /*!< TT Interrupt Line Select register, Address offset: 0x128 */ + __IO uint32_t TTOST; /*!< TT Operation Status register, Address offset: 0x12C */ + __IO uint32_t TURNA; /*!< TT TUR Numerator Actual register, Address offset: 0x130 */ + __IO uint32_t TTLGT; /*!< TT Local and Global Time register, Address offset: 0x134 */ + __IO uint32_t TTCTC; /*!< TT Cycle Time and Count register, Address offset: 0x138 */ + __IO uint32_t TTCPT; /*!< TT Capture Time register, Address offset: 0x13C */ + __IO uint32_t TTCSM; /*!< TT Cycle Sync Mark register, Address offset: 0x140 */ + __IO uint32_t RESERVED1[111]; /*!< Reserved, 0x144 - 0x2FC */ + __IO uint32_t TTTS; /*!< TT Trigger Select register, Address offset: 0x300 */ +} TTCAN_TypeDef; + +/** + * @brief FD Controller Area Network + */ + +typedef struct +{ + __IO uint32_t CREL; /*!< Clock Calibration Unit Core Release register, Address offset: 0x00 */ + __IO uint32_t CCFG; /*!< Calibration Configuration register, Address offset: 0x04 */ + __IO uint32_t CSTAT; /*!< Calibration Status register, Address offset: 0x08 */ + __IO uint32_t CWD; /*!< Calibration Watchdog register, Address offset: 0x0C */ + __IO uint32_t IR; /*!< CCU Interrupt register, Address offset: 0x10 */ + __IO uint32_t IE; /*!< CCU Interrupt Enable register, Address offset: 0x14 */ +} FDCAN_ClockCalibrationUnit_TypeDef; + + +/** + * @brief Consumer Electronics Control + */ + +typedef struct +{ + __IO uint32_t CR; /*!< CEC control register, Address offset:0x00 */ + __IO uint32_t CFGR; /*!< CEC configuration register, Address offset:0x04 */ + __IO uint32_t TXDR; /*!< CEC Tx data register , Address offset:0x08 */ + __IO uint32_t RXDR; /*!< CEC Rx Data Register, Address offset:0x0C */ + __IO uint32_t ISR; /*!< CEC Interrupt and Status Register, Address offset:0x10 */ + __IO uint32_t IER; /*!< CEC interrupt enable register, Address offset:0x14 */ +}CEC_TypeDef; + +/** + * @brief COordincate Rotation DIgital Computer + */ +typedef struct +{ + __IO uint32_t CSR; /*!< CORDIC control and status register, Address offset: 0x00 */ + __IO uint32_t WDATA; /*!< CORDIC argument register, Address offset: 0x04 */ + __IO uint32_t RDATA; /*!< CORDIC result register, Address offset: 0x08 */ +} CORDIC_TypeDef; + +/** + * @brief CRC calculation unit + */ + +typedef struct +{ + __IO uint32_t DR; /*!< CRC Data register, Address offset: 0x00 */ + __IO uint32_t IDR; /*!< CRC Independent data register, Address offset: 0x04 */ + __IO uint32_t CR; /*!< CRC Control register, Address offset: 0x08 */ + uint32_t RESERVED2; /*!< Reserved, 0x0C */ + __IO uint32_t INIT; /*!< Initial CRC value register, Address offset: 0x10 */ + __IO uint32_t POL; /*!< CRC polynomial register, Address offset: 0x14 */ +} CRC_TypeDef; + + +/** + * @brief Clock Recovery System + */ +typedef struct +{ +__IO uint32_t CR; /*!< CRS ccontrol register, Address offset: 0x00 */ +__IO uint32_t CFGR; /*!< CRS configuration register, Address offset: 0x04 */ +__IO uint32_t ISR; /*!< CRS interrupt and status register, Address offset: 0x08 */ +__IO uint32_t ICR; /*!< CRS interrupt flag clear register, Address offset: 0x0C */ +} CRS_TypeDef; + + +/** + * @brief Digital to Analog Converter + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DAC control register, Address offset: 0x00 */ + __IO uint32_t SWTRIGR; /*!< DAC software trigger register, Address offset: 0x04 */ + __IO uint32_t DHR12R1; /*!< DAC channel1 12-bit right-aligned data holding register, Address offset: 0x08 */ + __IO uint32_t DHR12L1; /*!< DAC channel1 12-bit left aligned data holding register, Address offset: 0x0C */ + __IO uint32_t DHR8R1; /*!< DAC channel1 8-bit right aligned data holding register, Address offset: 0x10 */ + __IO uint32_t DHR12R2; /*!< DAC channel2 12-bit right aligned data holding register, Address offset: 0x14 */ + __IO uint32_t DHR12L2; /*!< DAC channel2 12-bit left aligned data holding register, Address offset: 0x18 */ + __IO uint32_t DHR8R2; /*!< DAC channel2 8-bit right-aligned data holding register, Address offset: 0x1C */ + __IO uint32_t DHR12RD; /*!< Dual DAC 12-bit right-aligned data holding register, Address offset: 0x20 */ + __IO uint32_t DHR12LD; /*!< DUAL DAC 12-bit left aligned data holding register, Address offset: 0x24 */ + __IO uint32_t DHR8RD; /*!< DUAL DAC 8-bit right aligned data holding register, Address offset: 0x28 */ + __IO uint32_t DOR1; /*!< DAC channel1 data output register, Address offset: 0x2C */ + __IO uint32_t DOR2; /*!< DAC channel2 data output register, Address offset: 0x30 */ + __IO uint32_t SR; /*!< DAC status register, Address offset: 0x34 */ + __IO uint32_t CCR; /*!< DAC calibration control register, Address offset: 0x38 */ + __IO uint32_t MCR; /*!< DAC mode control register, Address offset: 0x3C */ + __IO uint32_t SHSR1; /*!< DAC Sample and Hold sample time register 1, Address offset: 0x40 */ + __IO uint32_t SHSR2; /*!< DAC Sample and Hold sample time register 2, Address offset: 0x44 */ + __IO uint32_t SHHR; /*!< DAC Sample and Hold hold time register, Address offset: 0x48 */ + __IO uint32_t SHRR; /*!< DAC Sample and Hold refresh time register, Address offset: 0x4C */ +} DAC_TypeDef; + +/** + * @brief DFSDM module registers + */ +typedef struct +{ + __IO uint32_t FLTCR1; /*!< DFSDM control register1, Address offset: 0x100 */ + __IO uint32_t FLTCR2; /*!< DFSDM control register2, Address offset: 0x104 */ + __IO uint32_t FLTISR; /*!< DFSDM interrupt and status register, Address offset: 0x108 */ + __IO uint32_t FLTICR; /*!< DFSDM interrupt flag clear register, Address offset: 0x10C */ + __IO uint32_t FLTJCHGR; /*!< DFSDM injected channel group selection register, Address offset: 0x110 */ + __IO uint32_t FLTFCR; /*!< DFSDM filter control register, Address offset: 0x114 */ + __IO uint32_t FLTJDATAR; /*!< DFSDM data register for injected group, Address offset: 0x118 */ + __IO uint32_t FLTRDATAR; /*!< DFSDM data register for regular group, Address offset: 0x11C */ + __IO uint32_t FLTAWHTR; /*!< DFSDM analog watchdog high threshold register, Address offset: 0x120 */ + __IO uint32_t FLTAWLTR; /*!< DFSDM analog watchdog low threshold register, Address offset: 0x124 */ + __IO uint32_t FLTAWSR; /*!< DFSDM analog watchdog status register Address offset: 0x128 */ + __IO uint32_t FLTAWCFR; /*!< DFSDM analog watchdog clear flag register Address offset: 0x12C */ + __IO uint32_t FLTEXMAX; /*!< DFSDM extreme detector maximum register, Address offset: 0x130 */ + __IO uint32_t FLTEXMIN; /*!< DFSDM extreme detector minimum register Address offset: 0x134 */ + __IO uint32_t FLTCNVTIMR; /*!< DFSDM conversion timer, Address offset: 0x138 */ +} DFSDM_Filter_TypeDef; + +/** + * @brief DFSDM channel configuration registers + */ +typedef struct +{ + __IO uint32_t CHCFGR1; /*!< DFSDM channel configuration register1, Address offset: 0x00 */ + __IO uint32_t CHCFGR2; /*!< DFSDM channel configuration register2, Address offset: 0x04 */ + __IO uint32_t CHAWSCDR; /*!< DFSDM channel analog watchdog and + short circuit detector register, Address offset: 0x08 */ + __IO uint32_t CHWDATAR; /*!< DFSDM channel watchdog filter data register, Address offset: 0x0C */ + __IO uint32_t CHDATINR; /*!< DFSDM channel data input register, Address offset: 0x10 */ +} DFSDM_Channel_TypeDef; + +/** + * @brief Debug MCU + */ +typedef struct +{ + __IO uint32_t IDCODE; /*!< MCU device ID code, Address offset: 0x00 */ + __IO uint32_t CR; /*!< Debug MCU configuration register, Address offset: 0x04 */ + uint32_t RESERVED4[11]; /*!< Reserved, Address offset: 0x08 */ + __IO uint32_t APB3FZ1; /*!< Debug MCU APB3FZ1 freeze register, Address offset: 0x34 */ + uint32_t RESERVED5; /*!< Reserved, Address offset: 0x38 */ + __IO uint32_t APB1LFZ1; /*!< Debug MCU APB1LFZ1 freeze register, Address offset: 0x3C */ + uint32_t RESERVED6; /*!< Reserved, Address offset: 0x40 */ + __IO uint32_t APB1HFZ1; /*!< Debug MCU APB1LFZ1 freeze register, Address offset: 0x44 */ + uint32_t RESERVED7; /*!< Reserved, Address offset: 0x48 */ + __IO uint32_t APB2FZ1; /*!< Debug MCU APB2FZ1 freeze register, Address offset: 0x4C */ + uint32_t RESERVED8; /*!< Reserved, Address offset: 0x50 */ + __IO uint32_t APB4FZ1; /*!< Debug MCU APB4FZ1 freeze register, Address offset: 0x54 */ + __IO uint32_t RESERVED9[990]; /*!< Reserved, Address offset: 0x58-0xFCC */ + __IO uint32_t PIDR4; /*!< Debug MCU peripheral identity register 4, Address offset: 0xFD0 */ + __IO uint32_t RESERVED10[3];/*!< Reserved, Address offset: 0xFD4-0xFDC */ + __IO uint32_t PIDR0; /*!< Debug MCU peripheral identity register 0, Address offset: 0xFE0 */ + __IO uint32_t PIDR1; /*!< Debug MCU peripheral identity register 1, Address offset: 0xFE4 */ + __IO uint32_t PIDR2; /*!< Debug MCU peripheral identity register 2, Address offset: 0xFE8 */ + __IO uint32_t PIDR3; /*!< Debug MCU peripheral identity register 3, Address offset: 0xFEC */ + __IO uint32_t CIDR0; /*!< Debug MCU component identity register 0, Address offset: 0xFF0 */ + __IO uint32_t CIDR1; /*!< Debug MCU component identity register 1, Address offset: 0xFF4 */ + __IO uint32_t CIDR2; /*!< Debug MCU component identity register 2, Address offset: 0xFF8 */ + __IO uint32_t CIDR3; /*!< Debug MCU component identity register 3, Address offset: 0xFFC */ +}DBGMCU_TypeDef; +/** + * @brief DCMI + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DCMI control register 1, Address offset: 0x00 */ + __IO uint32_t SR; /*!< DCMI status register, Address offset: 0x04 */ + __IO uint32_t RISR; /*!< DCMI raw interrupt status register, Address offset: 0x08 */ + __IO uint32_t IER; /*!< DCMI interrupt enable register, Address offset: 0x0C */ + __IO uint32_t MISR; /*!< DCMI masked interrupt status register, Address offset: 0x10 */ + __IO uint32_t ICR; /*!< DCMI interrupt clear register, Address offset: 0x14 */ + __IO uint32_t ESCR; /*!< DCMI embedded synchronization code register, Address offset: 0x18 */ + __IO uint32_t ESUR; /*!< DCMI embedded synchronization unmask register, Address offset: 0x1C */ + __IO uint32_t CWSTRTR; /*!< DCMI crop window start, Address offset: 0x20 */ + __IO uint32_t CWSIZER; /*!< DCMI crop window size, Address offset: 0x24 */ + __IO uint32_t DR; /*!< DCMI data register, Address offset: 0x28 */ +} DCMI_TypeDef; + +/** + * @brief PSSI + */ + +typedef struct +{ + __IO uint32_t CR; /*!< PSSI control register 1, Address offset: 0x000 */ + __IO uint32_t SR; /*!< PSSI status register, Address offset: 0x004 */ + __IO uint32_t RIS; /*!< PSSI raw interrupt status register, Address offset: 0x008 */ + __IO uint32_t IER; /*!< PSSI interrupt enable register, Address offset: 0x00C */ + __IO uint32_t MIS; /*!< PSSI masked interrupt status register, Address offset: 0x010 */ + __IO uint32_t ICR; /*!< PSSI interrupt clear register, Address offset: 0x014 */ + __IO uint32_t RESERVED1[4]; /*!< Reserved, 0x018 - 0x024 */ + __IO uint32_t DR; /*!< PSSI data register, Address offset: 0x028 */ + __IO uint32_t RESERVED2[241]; /*!< Reserved, 0x02C - 0x3EC */ + __IO uint32_t HWCFGR; /*!< PSSI IP HW configuration register, Address offset: 0x3F0 */ + __IO uint32_t VERR; /*!< PSSI IP version register, Address offset: 0x3F4 */ + __IO uint32_t IPIDR; /*!< PSSI IP ID register, Address offset: 0x3F8 */ + __IO uint32_t SIDR; /*!< PSSI SIZE ID register, Address offset: 0x3FC */ +} PSSI_TypeDef; + +/** + * @brief DMA Controller + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DMA stream x configuration register */ + __IO uint32_t NDTR; /*!< DMA stream x number of data register */ + __IO uint32_t PAR; /*!< DMA stream x peripheral address register */ + __IO uint32_t M0AR; /*!< DMA stream x memory 0 address register */ + __IO uint32_t M1AR; /*!< DMA stream x memory 1 address register */ + __IO uint32_t FCR; /*!< DMA stream x FIFO control register */ +} DMA_Stream_TypeDef; + +typedef struct +{ + __IO uint32_t LISR; /*!< DMA low interrupt status register, Address offset: 0x00 */ + __IO uint32_t HISR; /*!< DMA high interrupt status register, Address offset: 0x04 */ + __IO uint32_t LIFCR; /*!< DMA low interrupt flag clear register, Address offset: 0x08 */ + __IO uint32_t HIFCR; /*!< DMA high interrupt flag clear register, Address offset: 0x0C */ +} DMA_TypeDef; + +typedef struct +{ + __IO uint32_t CCR; /*!< DMA channel x configuration register */ + __IO uint32_t CNDTR; /*!< DMA channel x number of data register */ + __IO uint32_t CPAR; /*!< DMA channel x peripheral address register */ + __IO uint32_t CM0AR; /*!< DMA channel x memory 0 address register */ + __IO uint32_t CM1AR; /*!< DMA channel x memory 1 address register */ +} BDMA_Channel_TypeDef; + +typedef struct +{ + __IO uint32_t ISR; /*!< DMA interrupt status register, Address offset: 0x00 */ + __IO uint32_t IFCR; /*!< DMA interrupt flag clear register, Address offset: 0x04 */ +} BDMA_TypeDef; + +typedef struct +{ + __IO uint32_t CCR; /*!< DMA Multiplexer Channel x Control Register */ +}DMAMUX_Channel_TypeDef; + +typedef struct +{ + __IO uint32_t CSR; /*!< DMA Channel Status Register */ + __IO uint32_t CFR; /*!< DMA Channel Clear Flag Register */ +}DMAMUX_ChannelStatus_TypeDef; + +typedef struct +{ + __IO uint32_t RGCR; /*!< DMA Request Generator x Control Register */ +}DMAMUX_RequestGen_TypeDef; + +typedef struct +{ + __IO uint32_t RGSR; /*!< DMA Request Generator Status Register */ + __IO uint32_t RGCFR; /*!< DMA Request Generator Clear Flag Register */ +}DMAMUX_RequestGenStatus_TypeDef; + +/** + * @brief MDMA Controller + */ +typedef struct +{ + __IO uint32_t GISR0; /*!< MDMA Global Interrupt/Status Register 0, Address offset: 0x00 */ +}MDMA_TypeDef; + +typedef struct +{ + __IO uint32_t CISR; /*!< MDMA channel x interrupt/status register, Address offset: 0x40 */ + __IO uint32_t CIFCR; /*!< MDMA channel x interrupt flag clear register, Address offset: 0x44 */ + __IO uint32_t CESR; /*!< MDMA Channel x error status register, Address offset: 0x48 */ + __IO uint32_t CCR; /*!< MDMA channel x control register, Address offset: 0x4C */ + __IO uint32_t CTCR; /*!< MDMA channel x Transfer Configuration register, Address offset: 0x50 */ + __IO uint32_t CBNDTR; /*!< MDMA Channel x block number of data register, Address offset: 0x54 */ + __IO uint32_t CSAR; /*!< MDMA channel x source address register, Address offset: 0x58 */ + __IO uint32_t CDAR; /*!< MDMA channel x destination address register, Address offset: 0x5C */ + __IO uint32_t CBRUR; /*!< MDMA channel x Block Repeat address Update register, Address offset: 0x60 */ + __IO uint32_t CLAR; /*!< MDMA channel x Link Address register, Address offset: 0x64 */ + __IO uint32_t CTBR; /*!< MDMA channel x Trigger and Bus selection Register, Address offset: 0x68 */ + uint32_t RESERVED0; /*!< Reserved, 0x68 */ + __IO uint32_t CMAR; /*!< MDMA channel x Mask address register, Address offset: 0x70 */ + __IO uint32_t CMDR; /*!< MDMA channel x Mask Data register, Address offset: 0x74 */ +}MDMA_Channel_TypeDef; + +/** + * @brief DMA2D Controller + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DMA2D Control Register, Address offset: 0x00 */ + __IO uint32_t ISR; /*!< DMA2D Interrupt Status Register, Address offset: 0x04 */ + __IO uint32_t IFCR; /*!< DMA2D Interrupt Flag Clear Register, Address offset: 0x08 */ + __IO uint32_t FGMAR; /*!< DMA2D Foreground Memory Address Register, Address offset: 0x0C */ + __IO uint32_t FGOR; /*!< DMA2D Foreground Offset Register, Address offset: 0x10 */ + __IO uint32_t BGMAR; /*!< DMA2D Background Memory Address Register, Address offset: 0x14 */ + __IO uint32_t BGOR; /*!< DMA2D Background Offset Register, Address offset: 0x18 */ + __IO uint32_t FGPFCCR; /*!< DMA2D Foreground PFC Control Register, Address offset: 0x1C */ + __IO uint32_t FGCOLR; /*!< DMA2D Foreground Color Register, Address offset: 0x20 */ + __IO uint32_t BGPFCCR; /*!< DMA2D Background PFC Control Register, Address offset: 0x24 */ + __IO uint32_t BGCOLR; /*!< DMA2D Background Color Register, Address offset: 0x28 */ + __IO uint32_t FGCMAR; /*!< DMA2D Foreground CLUT Memory Address Register, Address offset: 0x2C */ + __IO uint32_t BGCMAR; /*!< DMA2D Background CLUT Memory Address Register, Address offset: 0x30 */ + __IO uint32_t OPFCCR; /*!< DMA2D Output PFC Control Register, Address offset: 0x34 */ + __IO uint32_t OCOLR; /*!< DMA2D Output Color Register, Address offset: 0x38 */ + __IO uint32_t OMAR; /*!< DMA2D Output Memory Address Register, Address offset: 0x3C */ + __IO uint32_t OOR; /*!< DMA2D Output Offset Register, Address offset: 0x40 */ + __IO uint32_t NLR; /*!< DMA2D Number of Line Register, Address offset: 0x44 */ + __IO uint32_t LWR; /*!< DMA2D Line Watermark Register, Address offset: 0x48 */ + __IO uint32_t AMTCR; /*!< DMA2D AHB Master Timer Configuration Register, Address offset: 0x4C */ + uint32_t RESERVED[236]; /*!< Reserved, 0x50-0x3FF */ + __IO uint32_t FGCLUT[256]; /*!< DMA2D Foreground CLUT, Address offset:400-7FF */ + __IO uint32_t BGCLUT[256]; /*!< DMA2D Background CLUT, Address offset:800-BFF */ +} DMA2D_TypeDef; + + +/** + * @brief Ethernet MAC + */ +typedef struct +{ + __IO uint32_t MACCR; + __IO uint32_t MACECR; + __IO uint32_t MACPFR; + __IO uint32_t MACWTR; + __IO uint32_t MACHT0R; + __IO uint32_t MACHT1R; + uint32_t RESERVED1[14]; + __IO uint32_t MACVTR; + uint32_t RESERVED2; + __IO uint32_t MACVHTR; + uint32_t RESERVED3; + __IO uint32_t MACVIR; + __IO uint32_t MACIVIR; + uint32_t RESERVED4[2]; + __IO uint32_t MACTFCR; + uint32_t RESERVED5[7]; + __IO uint32_t MACRFCR; + uint32_t RESERVED6[7]; + __IO uint32_t MACISR; + __IO uint32_t MACIER; + __IO uint32_t MACRXTXSR; + uint32_t RESERVED7; + __IO uint32_t MACPCSR; + __IO uint32_t MACRWKPFR; + uint32_t RESERVED8[2]; + __IO uint32_t MACLCSR; + __IO uint32_t MACLTCR; + __IO uint32_t MACLETR; + __IO uint32_t MAC1USTCR; + uint32_t RESERVED9[12]; + __IO uint32_t MACVR; + __IO uint32_t MACDR; + uint32_t RESERVED10; + __IO uint32_t MACHWF0R; + __IO uint32_t MACHWF1R; + __IO uint32_t MACHWF2R; + uint32_t RESERVED11[54]; + __IO uint32_t MACMDIOAR; + __IO uint32_t MACMDIODR; + uint32_t RESERVED12[2]; + __IO uint32_t MACARPAR; + uint32_t RESERVED13[59]; + __IO uint32_t MACA0HR; + __IO uint32_t MACA0LR; + __IO uint32_t MACA1HR; + __IO uint32_t MACA1LR; + __IO uint32_t MACA2HR; + __IO uint32_t MACA2LR; + __IO uint32_t MACA3HR; + __IO uint32_t MACA3LR; + uint32_t RESERVED14[248]; + __IO uint32_t MMCCR; + __IO uint32_t MMCRIR; + __IO uint32_t MMCTIR; + __IO uint32_t MMCRIMR; + __IO uint32_t MMCTIMR; + uint32_t RESERVED15[14]; + __IO uint32_t MMCTSCGPR; + __IO uint32_t MMCTMCGPR; + uint32_t RESERVED16[5]; + __IO uint32_t MMCTPCGR; + uint32_t RESERVED17[10]; + __IO uint32_t MMCRCRCEPR; + __IO uint32_t MMCRAEPR; + uint32_t RESERVED18[10]; + __IO uint32_t MMCRUPGR; + uint32_t RESERVED19[9]; + __IO uint32_t MMCTLPIMSTR; + __IO uint32_t MMCTLPITCR; + __IO uint32_t MMCRLPIMSTR; + __IO uint32_t MMCRLPITCR; + uint32_t RESERVED20[65]; + __IO uint32_t MACL3L4C0R; + __IO uint32_t MACL4A0R; + uint32_t RESERVED21[2]; + __IO uint32_t MACL3A0R0R; + __IO uint32_t MACL3A1R0R; + __IO uint32_t MACL3A2R0R; + __IO uint32_t MACL3A3R0R; + uint32_t RESERVED22[4]; + __IO uint32_t MACL3L4C1R; + __IO uint32_t MACL4A1R; + uint32_t RESERVED23[2]; + __IO uint32_t MACL3A0R1R; + __IO uint32_t MACL3A1R1R; + __IO uint32_t MACL3A2R1R; + __IO uint32_t MACL3A3R1R; + uint32_t RESERVED24[108]; + __IO uint32_t MACTSCR; + __IO uint32_t MACSSIR; + __IO uint32_t MACSTSR; + __IO uint32_t MACSTNR; + __IO uint32_t MACSTSUR; + __IO uint32_t MACSTNUR; + __IO uint32_t MACTSAR; + uint32_t RESERVED25; + __IO uint32_t MACTSSR; + uint32_t RESERVED26[3]; + __IO uint32_t MACTTSSNR; + __IO uint32_t MACTTSSSR; + uint32_t RESERVED27[2]; + __IO uint32_t MACACR; + uint32_t RESERVED28; + __IO uint32_t MACATSNR; + __IO uint32_t MACATSSR; + __IO uint32_t MACTSIACR; + __IO uint32_t MACTSEACR; + __IO uint32_t MACTSICNR; + __IO uint32_t MACTSECNR; + uint32_t RESERVED29[4]; + __IO uint32_t MACPPSCR; + uint32_t RESERVED30[3]; + __IO uint32_t MACPPSTTSR; + __IO uint32_t MACPPSTTNR; + __IO uint32_t MACPPSIR; + __IO uint32_t MACPPSWR; + uint32_t RESERVED31[12]; + __IO uint32_t MACPOCR; + __IO uint32_t MACSPI0R; + __IO uint32_t MACSPI1R; + __IO uint32_t MACSPI2R; + __IO uint32_t MACLMIR; + uint32_t RESERVED32[11]; + __IO uint32_t MTLOMR; + uint32_t RESERVED33[7]; + __IO uint32_t MTLISR; + uint32_t RESERVED34[55]; + __IO uint32_t MTLTQOMR; + __IO uint32_t MTLTQUR; + __IO uint32_t MTLTQDR; + uint32_t RESERVED35[8]; + __IO uint32_t MTLQICSR; + __IO uint32_t MTLRQOMR; + __IO uint32_t MTLRQMPOCR; + __IO uint32_t MTLRQDR; + uint32_t RESERVED36[177]; + __IO uint32_t DMAMR; + __IO uint32_t DMASBMR; + __IO uint32_t DMAISR; + __IO uint32_t DMADSR; + uint32_t RESERVED37[60]; + __IO uint32_t DMACCR; + __IO uint32_t DMACTCR; + __IO uint32_t DMACRCR; + uint32_t RESERVED38[2]; + __IO uint32_t DMACTDLAR; + uint32_t RESERVED39; + __IO uint32_t DMACRDLAR; + __IO uint32_t DMACTDTPR; + uint32_t RESERVED40; + __IO uint32_t DMACRDTPR; + __IO uint32_t DMACTDRLR; + __IO uint32_t DMACRDRLR; + __IO uint32_t DMACIER; + __IO uint32_t DMACRIWTR; +__IO uint32_t DMACSFCSR; + uint32_t RESERVED41; + __IO uint32_t DMACCATDR; + uint32_t RESERVED42; + __IO uint32_t DMACCARDR; + uint32_t RESERVED43; + __IO uint32_t DMACCATBR; + uint32_t RESERVED44; + __IO uint32_t DMACCARBR; + __IO uint32_t DMACSR; +uint32_t RESERVED45[2]; +__IO uint32_t DMACMFCR; +}ETH_TypeDef; +/** + * @brief External Interrupt/Event Controller + */ + +typedef struct +{ +__IO uint32_t RTSR1; /*!< EXTI Rising trigger selection register, Address offset: 0x00 */ +__IO uint32_t FTSR1; /*!< EXTI Falling trigger selection register, Address offset: 0x04 */ +__IO uint32_t SWIER1; /*!< EXTI Software interrupt event register, Address offset: 0x08 */ +__IO uint32_t D3PMR1; /*!< EXTI D3 Pending mask register, (same register as to SRDPMR1) Address offset: 0x0C */ +__IO uint32_t D3PCR1L; /*!< EXTI D3 Pending clear selection register low, (same register as to SRDPCR1L) Address offset: 0x10 */ +__IO uint32_t D3PCR1H; /*!< EXTI D3 Pending clear selection register High, (same register as to SRDPCR1H) Address offset: 0x14 */ +uint32_t RESERVED1[2]; /*!< Reserved, 0x18 to 0x1C */ +__IO uint32_t RTSR2; /*!< EXTI Rising trigger selection register, Address offset: 0x20 */ +__IO uint32_t FTSR2; /*!< EXTI Falling trigger selection register, Address offset: 0x24 */ +__IO uint32_t SWIER2; /*!< EXTI Software interrupt event register, Address offset: 0x28 */ +__IO uint32_t D3PMR2; /*!< EXTI D3 Pending mask register, (same register as to SRDPMR2) Address offset: 0x2C */ +__IO uint32_t D3PCR2L; /*!< EXTI D3 Pending clear selection register low, (same register as to SRDPCR2L) Address offset: 0x30 */ +__IO uint32_t D3PCR2H; /*!< EXTI D3 Pending clear selection register High, (same register as to SRDPCR2H) Address offset: 0x34 */ +uint32_t RESERVED2[2]; /*!< Reserved, 0x38 to 0x3C */ +__IO uint32_t RTSR3; /*!< EXTI Rising trigger selection register, Address offset: 0x40 */ +__IO uint32_t FTSR3; /*!< EXTI Falling trigger selection register, Address offset: 0x44 */ +__IO uint32_t SWIER3; /*!< EXTI Software interrupt event register, Address offset: 0x48 */ +__IO uint32_t D3PMR3; /*!< EXTI D3 Pending mask register, (same register as to SRDPMR3) Address offset: 0x4C */ +__IO uint32_t D3PCR3L; /*!< EXTI D3 Pending clear selection register low, (same register as to SRDPCR3L) Address offset: 0x50 */ +__IO uint32_t D3PCR3H; /*!< EXTI D3 Pending clear selection register High, (same register as to SRDPCR3H) Address offset: 0x54 */ +uint32_t RESERVED3[10]; /*!< Reserved, 0x58 to 0x7C */ +__IO uint32_t IMR1; /*!< EXTI Interrupt mask register, Address offset: 0x80 */ +__IO uint32_t EMR1; /*!< EXTI Event mask register, Address offset: 0x84 */ +__IO uint32_t PR1; /*!< EXTI Pending register, Address offset: 0x88 */ +uint32_t RESERVED4; /*!< Reserved, 0x8C */ +__IO uint32_t IMR2; /*!< EXTI Interrupt mask register, Address offset: 0x90 */ +__IO uint32_t EMR2; /*!< EXTI Event mask register, Address offset: 0x94 */ +__IO uint32_t PR2; /*!< EXTI Pending register, Address offset: 0x98 */ +uint32_t RESERVED5; /*!< Reserved, 0x9C */ +__IO uint32_t IMR3; /*!< EXTI Interrupt mask register, Address offset: 0xA0 */ +__IO uint32_t EMR3; /*!< EXTI Event mask register, Address offset: 0xA4 */ +__IO uint32_t PR3; /*!< EXTI Pending register, Address offset: 0xA8 */ +}EXTI_TypeDef; + +typedef struct +{ +__IO uint32_t IMR1; /*!< EXTI Interrupt mask register, Address offset: 0x00 */ +__IO uint32_t EMR1; /*!< EXTI Event mask register, Address offset: 0x04 */ +__IO uint32_t PR1; /*!< EXTI Pending register, Address offset: 0x08 */ +uint32_t RESERVED1; /*!< Reserved, 0x0C */ +__IO uint32_t IMR2; /*!< EXTI Interrupt mask register, Address offset: 0x10 */ +__IO uint32_t EMR2; /*!< EXTI Event mask register, Address offset: 0x14 */ +__IO uint32_t PR2; /*!< EXTI Pending register, Address offset: 0x18 */ +uint32_t RESERVED2; /*!< Reserved, 0x1C */ +__IO uint32_t IMR3; /*!< EXTI Interrupt mask register, Address offset: 0x20 */ +__IO uint32_t EMR3; /*!< EXTI Event mask register, Address offset: 0x24 */ +__IO uint32_t PR3; /*!< EXTI Pending register, Address offset: 0x28 */ +}EXTI_Core_TypeDef; + + +/** + * @brief FLASH Registers + */ + +typedef struct +{ + __IO uint32_t ACR; /*!< FLASH access control register, Address offset: 0x00 */ + __IO uint32_t KEYR1; /*!< Flash Key Register for bank1, Address offset: 0x04 */ + __IO uint32_t OPTKEYR; /*!< Flash Option Key Register, Address offset: 0x08 */ + __IO uint32_t CR1; /*!< Flash Control Register for bank1, Address offset: 0x0C */ + __IO uint32_t SR1; /*!< Flash Status Register for bank1, Address offset: 0x10 */ + __IO uint32_t CCR1; /*!< Flash Control Register for bank1, Address offset: 0x14 */ + __IO uint32_t OPTCR; /*!< Flash Option Control Register, Address offset: 0x18 */ + __IO uint32_t OPTSR_CUR; /*!< Flash Option Status Current Register, Address offset: 0x1C */ + __IO uint32_t OPTSR_PRG; /*!< Flash Option Status to Program Register, Address offset: 0x20 */ + __IO uint32_t OPTCCR; /*!< Flash Option Clear Control Register, Address offset: 0x24 */ + __IO uint32_t PRAR_CUR1; /*!< Flash Current Protection Address Register for bank1, Address offset: 0x28 */ + __IO uint32_t PRAR_PRG1; /*!< Flash Protection Address to Program Register for bank1, Address offset: 0x2C */ + __IO uint32_t SCAR_CUR1; /*!< Flash Current Secure Address Register for bank1, Address offset: 0x30 */ + __IO uint32_t SCAR_PRG1; /*!< Flash Secure Address to Program Register for bank1, Address offset: 0x34 */ + __IO uint32_t WPSN_CUR1; /*!< Flash Current Write Protection Register on bank1, Address offset: 0x38 */ + __IO uint32_t WPSN_PRG1; /*!< Flash Write Protection to Program Register on bank1, Address offset: 0x3C */ + __IO uint32_t BOOT_CUR; /*!< Flash Current Boot Address for Pelican Core Register, Address offset: 0x40 */ + __IO uint32_t BOOT_PRG; /*!< Flash Boot Address to Program for Pelican Core Register, Address offset: 0x44 */ + uint32_t RESERVED0[2]; /*!< Reserved, 0x48 to 0x4C */ + __IO uint32_t CRCCR1; /*!< Flash CRC Control register For Bank1 Register , Address offset: 0x50 */ + __IO uint32_t CRCSADD1; /*!< Flash CRC Start Address Register for Bank1 , Address offset: 0x54 */ + __IO uint32_t CRCEADD1; /*!< Flash CRC End Address Register for Bank1 , Address offset: 0x58 */ + __IO uint32_t CRCDATA; /*!< Flash CRC Data Register for Bank1 , Address offset: 0x5C */ + __IO uint32_t ECC_FA1; /*!< Flash ECC Fail Address For Bank1 Register , Address offset: 0x60 */ + uint32_t RESERVED[3]; /*!< Reserved, 0x64 to 0x6C */ + __IO uint32_t OPTSR2_CUR; /*!< Flash Option Status Current Register 2, Address offset: 0x70 */ + __IO uint32_t OPTSR2_PRG; /*!< Flash Option Status to Program Register 2, Address offset: 0x74 */ +} FLASH_TypeDef; + +/** + * @brief Filter and Mathematical ACcelerator + */ +typedef struct +{ + __IO uint32_t X1BUFCFG; /*!< FMAC X1 Buffer Configuration register, Address offset: 0x00 */ + __IO uint32_t X2BUFCFG; /*!< FMAC X2 Buffer Configuration register, Address offset: 0x04 */ + __IO uint32_t YBUFCFG; /*!< FMAC Y Buffer Configuration register, Address offset: 0x08 */ + __IO uint32_t PARAM; /*!< FMAC Parameter register, Address offset: 0x0C */ + __IO uint32_t CR; /*!< FMAC Control register, Address offset: 0x10 */ + __IO uint32_t SR; /*!< FMAC Status register, Address offset: 0x14 */ + __IO uint32_t WDATA; /*!< FMAC Write Data register, Address offset: 0x18 */ + __IO uint32_t RDATA; /*!< FMAC Read Data register, Address offset: 0x1C */ +} FMAC_TypeDef; + +/** + * @brief Flexible Memory Controller + */ + +typedef struct +{ + __IO uint32_t BTCR[8]; /*!< NOR/PSRAM chip-select control register(BCR) and chip-select timing register(BTR), Address offset: 0x00-1C */ +} FMC_Bank1_TypeDef; + +/** + * @brief Flexible Memory Controller Bank1E + */ + +typedef struct +{ + __IO uint32_t BWTR[7]; /*!< NOR/PSRAM write timing registers, Address offset: 0x104-0x11C */ +} FMC_Bank1E_TypeDef; + +/** + * @brief Flexible Memory Controller Bank2 + */ + +typedef struct +{ + __IO uint32_t PCR2; /*!< NAND Flash control register 2, Address offset: 0x60 */ + __IO uint32_t SR2; /*!< NAND Flash FIFO status and interrupt register 2, Address offset: 0x64 */ + __IO uint32_t PMEM2; /*!< NAND Flash Common memory space timing register 2, Address offset: 0x68 */ + __IO uint32_t PATT2; /*!< NAND Flash Attribute memory space timing register 2, Address offset: 0x6C */ + uint32_t RESERVED0; /*!< Reserved, 0x70 */ + __IO uint32_t ECCR2; /*!< NAND Flash ECC result registers 2, Address offset: 0x74 */ +} FMC_Bank2_TypeDef; + +/** + * @brief Flexible Memory Controller Bank3 + */ + +typedef struct +{ + __IO uint32_t PCR; /*!< NAND Flash control register 3, Address offset: 0x80 */ + __IO uint32_t SR; /*!< NAND Flash FIFO status and interrupt register 3, Address offset: 0x84 */ + __IO uint32_t PMEM; /*!< NAND Flash Common memory space timing register 3, Address offset: 0x88 */ + __IO uint32_t PATT; /*!< NAND Flash Attribute memory space timing register 3, Address offset: 0x8C */ + uint32_t RESERVED; /*!< Reserved, 0x90 */ + __IO uint32_t ECCR; /*!< NAND Flash ECC result registers 3, Address offset: 0x94 */ +} FMC_Bank3_TypeDef; + +/** + * @brief Flexible Memory Controller Bank5 and 6 + */ + + +typedef struct +{ + __IO uint32_t SDCR[2]; /*!< SDRAM Control registers , Address offset: 0x140-0x144 */ + __IO uint32_t SDTR[2]; /*!< SDRAM Timing registers , Address offset: 0x148-0x14C */ + __IO uint32_t SDCMR; /*!< SDRAM Command Mode register, Address offset: 0x150 */ + __IO uint32_t SDRTR; /*!< SDRAM Refresh Timer register, Address offset: 0x154 */ + __IO uint32_t SDSR; /*!< SDRAM Status register, Address offset: 0x158 */ +} FMC_Bank5_6_TypeDef; + +/** + * @brief General Purpose I/O + */ + +typedef struct +{ + __IO uint32_t MODER; /*!< GPIO port mode register, Address offset: 0x00 */ + __IO uint32_t OTYPER; /*!< GPIO port output type register, Address offset: 0x04 */ + __IO uint32_t OSPEEDR; /*!< GPIO port output speed register, Address offset: 0x08 */ + __IO uint32_t PUPDR; /*!< GPIO port pull-up/pull-down register, Address offset: 0x0C */ + __IO uint32_t IDR; /*!< GPIO port input data register, Address offset: 0x10 */ + __IO uint32_t ODR; /*!< GPIO port output data register, Address offset: 0x14 */ + __IO uint32_t BSRR; /*!< GPIO port bit set/reset, Address offset: 0x18 */ + __IO uint32_t LCKR; /*!< GPIO port configuration lock register, Address offset: 0x1C */ + __IO uint32_t AFR[2]; /*!< GPIO alternate function registers, Address offset: 0x20-0x24 */ +} GPIO_TypeDef; + +/** + * @brief Operational Amplifier (OPAMP) + */ + +typedef struct +{ + __IO uint32_t CSR; /*!< OPAMP control/status register, Address offset: 0x00 */ + __IO uint32_t OTR; /*!< OPAMP offset trimming register for normal mode, Address offset: 0x04 */ + __IO uint32_t HSOTR; /*!< OPAMP offset trimming register for high speed mode, Address offset: 0x08 */ +} OPAMP_TypeDef; + +/** + * @brief System configuration controller + */ + +typedef struct +{ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x00 */ + __IO uint32_t PMCR; /*!< SYSCFG peripheral mode configuration register, Address offset: 0x04 */ + __IO uint32_t EXTICR[4]; /*!< SYSCFG external interrupt configuration registers, Address offset: 0x08-0x14 */ + __IO uint32_t CFGR; /*!< SYSCFG configuration registers, Address offset: 0x18 */ + uint32_t RESERVED2; /*!< Reserved, Address offset: 0x1C */ + __IO uint32_t CCCSR; /*!< SYSCFG compensation cell control/status register, Address offset: 0x20 */ + __IO uint32_t CCVR; /*!< SYSCFG compensation cell value register, Address offset: 0x24 */ + __IO uint32_t CCCR; /*!< SYSCFG compensation cell code register, Address offset: 0x28 */ + uint32_t RESERVED3; /*!< Reserved, Address offset: 0x2C */ + __IO uint32_t ADC2ALT; /*!< ADC2 internal input alternate connection register, Address offset: 0x30 */ + uint32_t RESERVED4[60]; /*!< Reserved, 0x34-0x120 */ + __IO uint32_t PKGR; /*!< SYSCFG package register, Address offset: 0x124 */ + uint32_t RESERVED5[118]; /*!< Reserved, 0x128-0x2FC */ + __IO uint32_t UR0; /*!< SYSCFG user register 0, Address offset: 0x300 */ + __IO uint32_t UR1; /*!< SYSCFG user register 1, Address offset: 0x304 */ + __IO uint32_t UR2; /*!< SYSCFG user register 2, Address offset: 0x308 */ + __IO uint32_t UR3; /*!< SYSCFG user register 3, Address offset: 0x30C */ + __IO uint32_t UR4; /*!< SYSCFG user register 4, Address offset: 0x310 */ + __IO uint32_t UR5; /*!< SYSCFG user register 5, Address offset: 0x314 */ + __IO uint32_t UR6; /*!< SYSCFG user register 6, Address offset: 0x318 */ + __IO uint32_t UR7; /*!< SYSCFG user register 7, Address offset: 0x31C */ + uint32_t RESERVED6[3]; /*!< Reserved, Address offset: 0x320-0x328 */ + __IO uint32_t UR11; /*!< SYSCFG user register 11, Address offset: 0x32C */ + __IO uint32_t UR12; /*!< SYSCFG user register 12, Address offset: 0x330 */ + __IO uint32_t UR13; /*!< SYSCFG user register 13, Address offset: 0x334 */ + __IO uint32_t UR14; /*!< SYSCFG user register 14, Address offset: 0x338 */ + __IO uint32_t UR15; /*!< SYSCFG user register 15, Address offset: 0x33C */ + __IO uint32_t UR16; /*!< SYSCFG user register 16, Address offset: 0x340 */ + __IO uint32_t UR17; /*!< SYSCFG user register 17, Address offset: 0x344 */ + __IO uint32_t UR18; /*!< SYSCFG user register 18, Address offset: 0x348 */ + +} SYSCFG_TypeDef; + +/** + * @brief Inter-integrated Circuit Interface + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< I2C Control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< I2C Control register 2, Address offset: 0x04 */ + __IO uint32_t OAR1; /*!< I2C Own address 1 register, Address offset: 0x08 */ + __IO uint32_t OAR2; /*!< I2C Own address 2 register, Address offset: 0x0C */ + __IO uint32_t TIMINGR; /*!< I2C Timing register, Address offset: 0x10 */ + __IO uint32_t TIMEOUTR; /*!< I2C Timeout register, Address offset: 0x14 */ + __IO uint32_t ISR; /*!< I2C Interrupt and status register, Address offset: 0x18 */ + __IO uint32_t ICR; /*!< I2C Interrupt clear register, Address offset: 0x1C */ + __IO uint32_t PECR; /*!< I2C PEC register, Address offset: 0x20 */ + __IO uint32_t RXDR; /*!< I2C Receive data register, Address offset: 0x24 */ + __IO uint32_t TXDR; /*!< I2C Transmit data register, Address offset: 0x28 */ +} I2C_TypeDef; + +/** + * @brief Independent WATCHDOG + */ + +typedef struct +{ + __IO uint32_t KR; /*!< IWDG Key register, Address offset: 0x00 */ + __IO uint32_t PR; /*!< IWDG Prescaler register, Address offset: 0x04 */ + __IO uint32_t RLR; /*!< IWDG Reload register, Address offset: 0x08 */ + __IO uint32_t SR; /*!< IWDG Status register, Address offset: 0x0C */ + __IO uint32_t WINR; /*!< IWDG Window register, Address offset: 0x10 */ +} IWDG_TypeDef; + + +/** + * @brief LCD-TFT Display Controller + */ + +typedef struct +{ + uint32_t RESERVED0[2]; /*!< Reserved, 0x00-0x04 */ + __IO uint32_t SSCR; /*!< LTDC Synchronization Size Configuration Register, Address offset: 0x08 */ + __IO uint32_t BPCR; /*!< LTDC Back Porch Configuration Register, Address offset: 0x0C */ + __IO uint32_t AWCR; /*!< LTDC Active Width Configuration Register, Address offset: 0x10 */ + __IO uint32_t TWCR; /*!< LTDC Total Width Configuration Register, Address offset: 0x14 */ + __IO uint32_t GCR; /*!< LTDC Global Control Register, Address offset: 0x18 */ + uint32_t RESERVED1[2]; /*!< Reserved, 0x1C-0x20 */ + __IO uint32_t SRCR; /*!< LTDC Shadow Reload Configuration Register, Address offset: 0x24 */ + uint32_t RESERVED2[1]; /*!< Reserved, 0x28 */ + __IO uint32_t BCCR; /*!< LTDC Background Color Configuration Register, Address offset: 0x2C */ + uint32_t RESERVED3[1]; /*!< Reserved, 0x30 */ + __IO uint32_t IER; /*!< LTDC Interrupt Enable Register, Address offset: 0x34 */ + __IO uint32_t ISR; /*!< LTDC Interrupt Status Register, Address offset: 0x38 */ + __IO uint32_t ICR; /*!< LTDC Interrupt Clear Register, Address offset: 0x3C */ + __IO uint32_t LIPCR; /*!< LTDC Line Interrupt Position Configuration Register, Address offset: 0x40 */ + __IO uint32_t CPSR; /*!< LTDC Current Position Status Register, Address offset: 0x44 */ + __IO uint32_t CDSR; /*!< LTDC Current Display Status Register, Address offset: 0x48 */ +} LTDC_TypeDef; + +/** + * @brief LCD-TFT Display layer x Controller + */ + +typedef struct +{ + __IO uint32_t CR; /*!< LTDC Layerx Control Register Address offset: 0x84 */ + __IO uint32_t WHPCR; /*!< LTDC Layerx Window Horizontal Position Configuration Register Address offset: 0x88 */ + __IO uint32_t WVPCR; /*!< LTDC Layerx Window Vertical Position Configuration Register Address offset: 0x8C */ + __IO uint32_t CKCR; /*!< LTDC Layerx Color Keying Configuration Register Address offset: 0x90 */ + __IO uint32_t PFCR; /*!< LTDC Layerx Pixel Format Configuration Register Address offset: 0x94 */ + __IO uint32_t CACR; /*!< LTDC Layerx Constant Alpha Configuration Register Address offset: 0x98 */ + __IO uint32_t DCCR; /*!< LTDC Layerx Default Color Configuration Register Address offset: 0x9C */ + __IO uint32_t BFCR; /*!< LTDC Layerx Blending Factors Configuration Register Address offset: 0xA0 */ + uint32_t RESERVED0[2]; /*!< Reserved */ + __IO uint32_t CFBAR; /*!< LTDC Layerx Color Frame Buffer Address Register Address offset: 0xAC */ + __IO uint32_t CFBLR; /*!< LTDC Layerx Color Frame Buffer Length Register Address offset: 0xB0 */ + __IO uint32_t CFBLNR; /*!< LTDC Layerx ColorFrame Buffer Line Number Register Address offset: 0xB4 */ + uint32_t RESERVED1[3]; /*!< Reserved */ + __IO uint32_t CLUTWR; /*!< LTDC Layerx CLUT Write Register Address offset: 0x144 */ + +} LTDC_Layer_TypeDef; + +/** + * @brief Power Control + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< PWR power control register 1, Address offset: 0x00 */ + __IO uint32_t CSR1; /*!< PWR power control status register 1, Address offset: 0x04 */ + __IO uint32_t CR2; /*!< PWR power control register 2, Address offset: 0x08 */ + __IO uint32_t CR3; /*!< PWR power control register 3, Address offset: 0x0C */ + __IO uint32_t CPUCR; /*!< PWR CPU control register, Address offset: 0x10 */ + uint32_t RESERVED0; /*!< Reserved, Address offset: 0x14 */ + __IO uint32_t D3CR; /*!< PWR D3 domain control register, Address offset: 0x18 */ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x1C */ + __IO uint32_t WKUPCR; /*!< PWR wakeup clear register, Address offset: 0x20 */ + __IO uint32_t WKUPFR; /*!< PWR wakeup flag register, Address offset: 0x24 */ + __IO uint32_t WKUPEPR; /*!< PWR wakeup enable and polarity register, Address offset: 0x28 */ +} PWR_TypeDef; + +/** + * @brief Reset and Clock Control + */ + +typedef struct +{ + __IO uint32_t CR; /*!< RCC clock control register, Address offset: 0x00 */ + __IO uint32_t HSICFGR; /*!< HSI Clock Calibration Register, Address offset: 0x04 */ + __IO uint32_t CRRCR; /*!< Clock Recovery RC Register, Address offset: 0x08 */ + __IO uint32_t CSICFGR; /*!< CSI Clock Calibration Register, Address offset: 0x0C */ + __IO uint32_t CFGR; /*!< RCC clock configuration register, Address offset: 0x10 */ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x14 */ + __IO uint32_t D1CFGR; /*!< RCC Domain 1 configuration register, Address offset: 0x18 */ + __IO uint32_t D2CFGR; /*!< RCC Domain 2 configuration register, Address offset: 0x1C */ + __IO uint32_t D3CFGR; /*!< RCC Domain 3 configuration register, Address offset: 0x20 */ + uint32_t RESERVED2; /*!< Reserved, Address offset: 0x24 */ + __IO uint32_t PLLCKSELR; /*!< RCC PLLs Clock Source Selection Register, Address offset: 0x28 */ + __IO uint32_t PLLCFGR; /*!< RCC PLLs Configuration Register, Address offset: 0x2C */ + __IO uint32_t PLL1DIVR; /*!< RCC PLL1 Dividers Configuration Register, Address offset: 0x30 */ + __IO uint32_t PLL1FRACR; /*!< RCC PLL1 Fractional Divider Configuration Register, Address offset: 0x34 */ + __IO uint32_t PLL2DIVR; /*!< RCC PLL2 Dividers Configuration Register, Address offset: 0x38 */ + __IO uint32_t PLL2FRACR; /*!< RCC PLL2 Fractional Divider Configuration Register, Address offset: 0x3C */ + __IO uint32_t PLL3DIVR; /*!< RCC PLL3 Dividers Configuration Register, Address offset: 0x40 */ + __IO uint32_t PLL3FRACR; /*!< RCC PLL3 Fractional Divider Configuration Register, Address offset: 0x44 */ + uint32_t RESERVED3; /*!< Reserved, Address offset: 0x48 */ + __IO uint32_t D1CCIPR; /*!< RCC Domain 1 Kernel Clock Configuration Register Address offset: 0x4C */ + __IO uint32_t D2CCIP1R; /*!< RCC Domain 2 Kernel Clock Configuration Register Address offset: 0x50 */ + __IO uint32_t D2CCIP2R; /*!< RCC Domain 2 Kernel Clock Configuration Register Address offset: 0x54 */ + __IO uint32_t D3CCIPR; /*!< RCC Domain 3 Kernel Clock Configuration Register Address offset: 0x58 */ + uint32_t RESERVED4; /*!< Reserved, Address offset: 0x5C */ + __IO uint32_t CIER; /*!< RCC Clock Source Interrupt Enable Register Address offset: 0x60 */ + __IO uint32_t CIFR; /*!< RCC Clock Source Interrupt Flag Register Address offset: 0x64 */ + __IO uint32_t CICR; /*!< RCC Clock Source Interrupt Clear Register Address offset: 0x68 */ + uint32_t RESERVED5; /*!< Reserved, Address offset: 0x6C */ + __IO uint32_t BDCR; /*!< RCC Vswitch Backup Domain Control Register, Address offset: 0x70 */ + __IO uint32_t CSR; /*!< RCC clock control & status register, Address offset: 0x74 */ + uint32_t RESERVED6; /*!< Reserved, Address offset: 0x78 */ + __IO uint32_t AHB3RSTR; /*!< RCC AHB3 peripheral reset register, Address offset: 0x7C */ + __IO uint32_t AHB1RSTR; /*!< RCC AHB1 peripheral reset register, Address offset: 0x80 */ + __IO uint32_t AHB2RSTR; /*!< RCC AHB2 peripheral reset register, Address offset: 0x84 */ + __IO uint32_t AHB4RSTR; /*!< RCC AHB4 peripheral reset register, Address offset: 0x88 */ + __IO uint32_t APB3RSTR; /*!< RCC APB3 peripheral reset register, Address offset: 0x8C */ + __IO uint32_t APB1LRSTR; /*!< RCC APB1 peripheral reset Low Word register, Address offset: 0x90 */ + __IO uint32_t APB1HRSTR; /*!< RCC APB1 peripheral reset High Word register, Address offset: 0x94 */ + __IO uint32_t APB2RSTR; /*!< RCC APB2 peripheral reset register, Address offset: 0x98 */ + __IO uint32_t APB4RSTR; /*!< RCC APB4 peripheral reset register, Address offset: 0x9C */ + __IO uint32_t GCR; /*!< RCC RCC Global Control Register, Address offset: 0xA0 */ + uint32_t RESERVED8; /*!< Reserved, Address offset: 0xA4 */ + __IO uint32_t D3AMR; /*!< RCC Domain 3 Autonomous Mode Register, Address offset: 0xA8 */ + uint32_t RESERVED11[9]; /*!< Reserved, 0xAC-0xCC Address offset: 0xAC */ + __IO uint32_t RSR; /*!< RCC Reset status register, Address offset: 0xD0 */ + __IO uint32_t AHB3ENR; /*!< RCC AHB3 peripheral clock register, Address offset: 0xD4 */ + __IO uint32_t AHB1ENR; /*!< RCC AHB1 peripheral clock register, Address offset: 0xD8 */ + __IO uint32_t AHB2ENR; /*!< RCC AHB2 peripheral clock register, Address offset: 0xDC */ + __IO uint32_t AHB4ENR; /*!< RCC AHB4 peripheral clock register, Address offset: 0xE0 */ + __IO uint32_t APB3ENR; /*!< RCC APB3 peripheral clock register, Address offset: 0xE4 */ + __IO uint32_t APB1LENR; /*!< RCC APB1 peripheral clock Low Word register, Address offset: 0xE8 */ + __IO uint32_t APB1HENR; /*!< RCC APB1 peripheral clock High Word register, Address offset: 0xEC */ + __IO uint32_t APB2ENR; /*!< RCC APB2 peripheral clock register, Address offset: 0xF0 */ + __IO uint32_t APB4ENR; /*!< RCC APB4 peripheral clock register, Address offset: 0xF4 */ + uint32_t RESERVED12; /*!< Reserved, Address offset: 0xF8 */ + __IO uint32_t AHB3LPENR; /*!< RCC AHB3 peripheral sleep clock register, Address offset: 0xFC */ + __IO uint32_t AHB1LPENR; /*!< RCC AHB1 peripheral sleep clock register, Address offset: 0x100 */ + __IO uint32_t AHB2LPENR; /*!< RCC AHB2 peripheral sleep clock register, Address offset: 0x104 */ + __IO uint32_t AHB4LPENR; /*!< RCC AHB4 peripheral sleep clock register, Address offset: 0x108 */ + __IO uint32_t APB3LPENR; /*!< RCC APB3 peripheral sleep clock register, Address offset: 0x10C */ + __IO uint32_t APB1LLPENR; /*!< RCC APB1 peripheral sleep clock Low Word register, Address offset: 0x110 */ + __IO uint32_t APB1HLPENR; /*!< RCC APB1 peripheral sleep clock High Word register, Address offset: 0x114 */ + __IO uint32_t APB2LPENR; /*!< RCC APB2 peripheral sleep clock register, Address offset: 0x118 */ + __IO uint32_t APB4LPENR; /*!< RCC APB4 peripheral sleep clock register, Address offset: 0x11C */ + uint32_t RESERVED13[4]; /*!< Reserved, 0x120-0x12C Address offset: 0x120 */ + +} RCC_TypeDef; + + +/** + * @brief Real-Time Clock + */ +typedef struct +{ + __IO uint32_t TR; /*!< RTC time register, Address offset: 0x00 */ + __IO uint32_t DR; /*!< RTC date register, Address offset: 0x04 */ + __IO uint32_t CR; /*!< RTC control register, Address offset: 0x08 */ + __IO uint32_t ISR; /*!< RTC initialization and status register, Address offset: 0x0C */ + __IO uint32_t PRER; /*!< RTC prescaler register, Address offset: 0x10 */ + __IO uint32_t WUTR; /*!< RTC wakeup timer register, Address offset: 0x14 */ + uint32_t RESERVED; /*!< Reserved, Address offset: 0x18 */ + __IO uint32_t ALRMAR; /*!< RTC alarm A register, Address offset: 0x1C */ + __IO uint32_t ALRMBR; /*!< RTC alarm B register, Address offset: 0x20 */ + __IO uint32_t WPR; /*!< RTC write protection register, Address offset: 0x24 */ + __IO uint32_t SSR; /*!< RTC sub second register, Address offset: 0x28 */ + __IO uint32_t SHIFTR; /*!< RTC shift control register, Address offset: 0x2C */ + __IO uint32_t TSTR; /*!< RTC time stamp time register, Address offset: 0x30 */ + __IO uint32_t TSDR; /*!< RTC time stamp date register, Address offset: 0x34 */ + __IO uint32_t TSSSR; /*!< RTC time-stamp sub second register, Address offset: 0x38 */ + __IO uint32_t CALR; /*!< RTC calibration register, Address offset: 0x3C */ + __IO uint32_t TAMPCR; /*!< RTC tamper configuration register, Address offset: 0x40 */ + __IO uint32_t ALRMASSR; /*!< RTC alarm A sub second register, Address offset: 0x44 */ + __IO uint32_t ALRMBSSR; /*!< RTC alarm B sub second register, Address offset: 0x48 */ + __IO uint32_t OR; /*!< RTC option register, Address offset: 0x4C */ + __IO uint32_t BKP0R; /*!< RTC backup register 0, Address offset: 0x50 */ + __IO uint32_t BKP1R; /*!< RTC backup register 1, Address offset: 0x54 */ + __IO uint32_t BKP2R; /*!< RTC backup register 2, Address offset: 0x58 */ + __IO uint32_t BKP3R; /*!< RTC backup register 3, Address offset: 0x5C */ + __IO uint32_t BKP4R; /*!< RTC backup register 4, Address offset: 0x60 */ + __IO uint32_t BKP5R; /*!< RTC backup register 5, Address offset: 0x64 */ + __IO uint32_t BKP6R; /*!< RTC backup register 6, Address offset: 0x68 */ + __IO uint32_t BKP7R; /*!< RTC backup register 7, Address offset: 0x6C */ + __IO uint32_t BKP8R; /*!< RTC backup register 8, Address offset: 0x70 */ + __IO uint32_t BKP9R; /*!< RTC backup register 9, Address offset: 0x74 */ + __IO uint32_t BKP10R; /*!< RTC backup register 10, Address offset: 0x78 */ + __IO uint32_t BKP11R; /*!< RTC backup register 11, Address offset: 0x7C */ + __IO uint32_t BKP12R; /*!< RTC backup register 12, Address offset: 0x80 */ + __IO uint32_t BKP13R; /*!< RTC backup register 13, Address offset: 0x84 */ + __IO uint32_t BKP14R; /*!< RTC backup register 14, Address offset: 0x88 */ + __IO uint32_t BKP15R; /*!< RTC backup register 15, Address offset: 0x8C */ + __IO uint32_t BKP16R; /*!< RTC backup register 16, Address offset: 0x90 */ + __IO uint32_t BKP17R; /*!< RTC backup register 17, Address offset: 0x94 */ + __IO uint32_t BKP18R; /*!< RTC backup register 18, Address offset: 0x98 */ + __IO uint32_t BKP19R; /*!< RTC backup register 19, Address offset: 0x9C */ + __IO uint32_t BKP20R; /*!< RTC backup register 20, Address offset: 0xA0 */ + __IO uint32_t BKP21R; /*!< RTC backup register 21, Address offset: 0xA4 */ + __IO uint32_t BKP22R; /*!< RTC backup register 22, Address offset: 0xA8 */ + __IO uint32_t BKP23R; /*!< RTC backup register 23, Address offset: 0xAC */ + __IO uint32_t BKP24R; /*!< RTC backup register 24, Address offset: 0xB0 */ + __IO uint32_t BKP25R; /*!< RTC backup register 25, Address offset: 0xB4 */ + __IO uint32_t BKP26R; /*!< RTC backup register 26, Address offset: 0xB8 */ + __IO uint32_t BKP27R; /*!< RTC backup register 27, Address offset: 0xBC */ + __IO uint32_t BKP28R; /*!< RTC backup register 28, Address offset: 0xC0 */ + __IO uint32_t BKP29R; /*!< RTC backup register 29, Address offset: 0xC4 */ + __IO uint32_t BKP30R; /*!< RTC backup register 30, Address offset: 0xC8 */ + __IO uint32_t BKP31R; /*!< RTC backup register 31, Address offset: 0xCC */ +} RTC_TypeDef; + +/** + * @brief Serial Audio Interface + */ + +typedef struct +{ + __IO uint32_t GCR; /*!< SAI global configuration register, Address offset: 0x00 */ + uint32_t RESERVED0[16]; /*!< Reserved, 0x04 - 0x43 */ + __IO uint32_t PDMCR; /*!< SAI PDM control register, Address offset: 0x44 */ + __IO uint32_t PDMDLY; /*!< SAI PDM delay register, Address offset: 0x48 */ +} SAI_TypeDef; + +typedef struct +{ + __IO uint32_t CR1; /*!< SAI block x configuration register 1, Address offset: 0x04 */ + __IO uint32_t CR2; /*!< SAI block x configuration register 2, Address offset: 0x08 */ + __IO uint32_t FRCR; /*!< SAI block x frame configuration register, Address offset: 0x0C */ + __IO uint32_t SLOTR; /*!< SAI block x slot register, Address offset: 0x10 */ + __IO uint32_t IMR; /*!< SAI block x interrupt mask register, Address offset: 0x14 */ + __IO uint32_t SR; /*!< SAI block x status register, Address offset: 0x18 */ + __IO uint32_t CLRFR; /*!< SAI block x clear flag register, Address offset: 0x1C */ + __IO uint32_t DR; /*!< SAI block x data register, Address offset: 0x20 */ +} SAI_Block_TypeDef; + +/** + * @brief SPDIF-RX Interface + */ + +typedef struct +{ + __IO uint32_t CR; /*!< Control register, Address offset: 0x00 */ + __IO uint32_t IMR; /*!< Interrupt mask register, Address offset: 0x04 */ + __IO uint32_t SR; /*!< Status register, Address offset: 0x08 */ + __IO uint32_t IFCR; /*!< Interrupt Flag Clear register, Address offset: 0x0C */ + __IO uint32_t DR; /*!< Data input register, Address offset: 0x10 */ + __IO uint32_t CSR; /*!< Channel Status register, Address offset: 0x14 */ + __IO uint32_t DIR; /*!< Debug Information register, Address offset: 0x18 */ + uint32_t RESERVED2; /*!< Reserved, 0x1A */ +} SPDIFRX_TypeDef; + + +/** + * @brief Secure digital input/output Interface + */ + +typedef struct +{ + __IO uint32_t POWER; /*!< SDMMC power control register, Address offset: 0x00 */ + __IO uint32_t CLKCR; /*!< SDMMC clock control register, Address offset: 0x04 */ + __IO uint32_t ARG; /*!< SDMMC argument register, Address offset: 0x08 */ + __IO uint32_t CMD; /*!< SDMMC command register, Address offset: 0x0C */ + __I uint32_t RESPCMD; /*!< SDMMC command response register, Address offset: 0x10 */ + __I uint32_t RESP1; /*!< SDMMC response 1 register, Address offset: 0x14 */ + __I uint32_t RESP2; /*!< SDMMC response 2 register, Address offset: 0x18 */ + __I uint32_t RESP3; /*!< SDMMC response 3 register, Address offset: 0x1C */ + __I uint32_t RESP4; /*!< SDMMC response 4 register, Address offset: 0x20 */ + __IO uint32_t DTIMER; /*!< SDMMC data timer register, Address offset: 0x24 */ + __IO uint32_t DLEN; /*!< SDMMC data length register, Address offset: 0x28 */ + __IO uint32_t DCTRL; /*!< SDMMC data control register, Address offset: 0x2C */ + __I uint32_t DCOUNT; /*!< SDMMC data counter register, Address offset: 0x30 */ + __I uint32_t STA; /*!< SDMMC status register, Address offset: 0x34 */ + __IO uint32_t ICR; /*!< SDMMC interrupt clear register, Address offset: 0x38 */ + __IO uint32_t MASK; /*!< SDMMC mask register, Address offset: 0x3C */ + __IO uint32_t ACKTIME; /*!< SDMMC Acknowledgement timer register, Address offset: 0x40 */ + uint32_t RESERVED0[3]; /*!< Reserved, 0x44 - 0x4C - 0x4C */ + __IO uint32_t IDMACTRL; /*!< SDMMC DMA control register, Address offset: 0x50 */ + __IO uint32_t IDMABSIZE; /*!< SDMMC DMA buffer size register, Address offset: 0x54 */ + __IO uint32_t IDMABASE0; /*!< SDMMC DMA buffer 0 base address register, Address offset: 0x58 */ + __IO uint32_t IDMABASE1; /*!< SDMMC DMA buffer 1 base address register, Address offset: 0x5C */ + uint32_t RESERVED1[8]; /*!< Reserved, 0x60-0x7C */ + __IO uint32_t FIFO; /*!< SDMMC data FIFO register, Address offset: 0x80 */ + uint32_t RESERVED2[222]; /*!< Reserved, 0x84-0x3F8 */ + __IO uint32_t IPVR; /*!< SDMMC data FIFO register, Address offset: 0x3FC */ +} SDMMC_TypeDef; + + +/** + * @brief Delay Block DLYB + */ + +typedef struct +{ + __IO uint32_t CR; /*!< DELAY BLOCK control register, Address offset: 0x00 */ + __IO uint32_t CFGR; /*!< DELAY BLOCK configuration register, Address offset: 0x04 */ +} DLYB_TypeDef; + +/** + * @brief HW Semaphore HSEM + */ + +typedef struct +{ + __IO uint32_t R[32]; /*!< 2-step write lock and read back registers, Address offset: 00h-7Ch */ + __IO uint32_t RLR[32]; /*!< 1-step read lock registers, Address offset: 80h-FCh */ + __IO uint32_t C1IER; /*!< HSEM Interrupt enable register , Address offset: 100h */ + __IO uint32_t C1ICR; /*!< HSEM Interrupt clear register , Address offset: 104h */ + __IO uint32_t C1ISR; /*!< HSEM Interrupt Status register , Address offset: 108h */ + __IO uint32_t C1MISR; /*!< HSEM Interrupt Masked Status register , Address offset: 10Ch */ + uint32_t Reserved[12]; /* Reserved Address offset: 110h-13Ch */ + __IO uint32_t CR; /*!< HSEM Semaphore clear register , Address offset: 140h */ + __IO uint32_t KEYR; /*!< HSEM Semaphore clear key register , Address offset: 144h */ + +} HSEM_TypeDef; + +typedef struct +{ + __IO uint32_t IER; /*!< HSEM interrupt enable register , Address offset: 0h */ + __IO uint32_t ICR; /*!< HSEM interrupt clear register , Address offset: 4h */ + __IO uint32_t ISR; /*!< HSEM interrupt status register , Address offset: 8h */ + __IO uint32_t MISR; /*!< HSEM masked interrupt status register , Address offset: Ch */ +} HSEM_Common_TypeDef; + +/** + * @brief Serial Peripheral Interface + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< SPI/I2S Control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< SPI Control register 2, Address offset: 0x04 */ + __IO uint32_t CFG1; /*!< SPI Configuration register 1, Address offset: 0x08 */ + __IO uint32_t CFG2; /*!< SPI Configuration register 2, Address offset: 0x0C */ + __IO uint32_t IER; /*!< SPI/I2S Interrupt Enable register, Address offset: 0x10 */ + __IO uint32_t SR; /*!< SPI/I2S Status register, Address offset: 0x14 */ + __IO uint32_t IFCR; /*!< SPI/I2S Interrupt/Status flags clear register, Address offset: 0x18 */ + uint32_t RESERVED0; /*!< Reserved, 0x1C */ + __IO uint32_t TXDR; /*!< SPI/I2S Transmit data register, Address offset: 0x20 */ + uint32_t RESERVED1[3]; /*!< Reserved, 0x24-0x2C */ + __IO uint32_t RXDR; /*!< SPI/I2S Receive data register, Address offset: 0x30 */ + uint32_t RESERVED2[3]; /*!< Reserved, 0x34-0x3C */ + __IO uint32_t CRCPOLY; /*!< SPI CRC Polynomial register, Address offset: 0x40 */ + __IO uint32_t TXCRC; /*!< SPI Transmitter CRC register, Address offset: 0x44 */ + __IO uint32_t RXCRC; /*!< SPI Receiver CRC register, Address offset: 0x48 */ + __IO uint32_t UDRDR; /*!< SPI Underrun data register, Address offset: 0x4C */ + __IO uint32_t I2SCFGR; /*!< I2S Configuration register, Address offset: 0x50 */ + +} SPI_TypeDef; + +/** + * @brief DTS + */ +typedef struct +{ + __IO uint32_t CFGR1; /*!< DTS configuration register, Address offset: 0x00 */ + uint32_t RESERVED0; /*!< Reserved, Address offset: 0x04 */ + __IO uint32_t T0VALR1; /*!< DTS T0 Value register, Address offset: 0x08 */ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x0C */ + __IO uint32_t RAMPVALR; /*!< DTS Ramp value register, Address offset: 0x10 */ + __IO uint32_t ITR1; /*!< DTS Interrupt threshold register, Address offset: 0x14 */ + uint32_t RESERVED2; /*!< Reserved, Address offset: 0x18 */ + __IO uint32_t DR; /*!< DTS data register, Address offset: 0x1C */ + __IO uint32_t SR; /*!< DTS status register Address offset: 0x20 */ + __IO uint32_t ITENR; /*!< DTS Interrupt enable register, Address offset: 0x24 */ + __IO uint32_t ICIFR; /*!< DTS Clear Interrupt flag register, Address offset: 0x28 */ + __IO uint32_t OR; /*!< DTS option register 1, Address offset: 0x2C */ +} +DTS_TypeDef; + +/** + * @brief TIM + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< TIM control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< TIM control register 2, Address offset: 0x04 */ + __IO uint32_t SMCR; /*!< TIM slave mode control register, Address offset: 0x08 */ + __IO uint32_t DIER; /*!< TIM DMA/interrupt enable register, Address offset: 0x0C */ + __IO uint32_t SR; /*!< TIM status register, Address offset: 0x10 */ + __IO uint32_t EGR; /*!< TIM event generation register, Address offset: 0x14 */ + __IO uint32_t CCMR1; /*!< TIM capture/compare mode register 1, Address offset: 0x18 */ + __IO uint32_t CCMR2; /*!< TIM capture/compare mode register 2, Address offset: 0x1C */ + __IO uint32_t CCER; /*!< TIM capture/compare enable register, Address offset: 0x20 */ + __IO uint32_t CNT; /*!< TIM counter register, Address offset: 0x24 */ + __IO uint32_t PSC; /*!< TIM prescaler, Address offset: 0x28 */ + __IO uint32_t ARR; /*!< TIM auto-reload register, Address offset: 0x2C */ + __IO uint32_t RCR; /*!< TIM repetition counter register, Address offset: 0x30 */ + __IO uint32_t CCR1; /*!< TIM capture/compare register 1, Address offset: 0x34 */ + __IO uint32_t CCR2; /*!< TIM capture/compare register 2, Address offset: 0x38 */ + __IO uint32_t CCR3; /*!< TIM capture/compare register 3, Address offset: 0x3C */ + __IO uint32_t CCR4; /*!< TIM capture/compare register 4, Address offset: 0x40 */ + __IO uint32_t BDTR; /*!< TIM break and dead-time register, Address offset: 0x44 */ + __IO uint32_t DCR; /*!< TIM DMA control register, Address offset: 0x48 */ + __IO uint32_t DMAR; /*!< TIM DMA address for full transfer, Address offset: 0x4C */ + uint32_t RESERVED1; /*!< Reserved, 0x50 */ + __IO uint32_t CCMR3; /*!< TIM capture/compare mode register 3, Address offset: 0x54 */ + __IO uint32_t CCR5; /*!< TIM capture/compare register5, Address offset: 0x58 */ + __IO uint32_t CCR6; /*!< TIM capture/compare register6, Address offset: 0x5C */ + __IO uint32_t AF1; /*!< TIM alternate function option register 1, Address offset: 0x60 */ + __IO uint32_t AF2; /*!< TIM alternate function option register 2, Address offset: 0x64 */ + __IO uint32_t TISEL; /*!< TIM Input Selection register, Address offset: 0x68 */ +} TIM_TypeDef; + +/** + * @brief LPTIMIMER + */ +typedef struct +{ + __IO uint32_t ISR; /*!< LPTIM Interrupt and Status register, Address offset: 0x00 */ + __IO uint32_t ICR; /*!< LPTIM Interrupt Clear register, Address offset: 0x04 */ + __IO uint32_t IER; /*!< LPTIM Interrupt Enable register, Address offset: 0x08 */ + __IO uint32_t CFGR; /*!< LPTIM Configuration register, Address offset: 0x0C */ + __IO uint32_t CR; /*!< LPTIM Control register, Address offset: 0x10 */ + __IO uint32_t CMP; /*!< LPTIM Compare register, Address offset: 0x14 */ + __IO uint32_t ARR; /*!< LPTIM Autoreload register, Address offset: 0x18 */ + __IO uint32_t CNT; /*!< LPTIM Counter register, Address offset: 0x1C */ + uint32_t RESERVED1; /*!< Reserved, 0x20 */ + __IO uint32_t CFGR2; /*!< LPTIM Configuration register, Address offset: 0x24 */ +} LPTIM_TypeDef; + +/** + * @brief Comparator + */ +typedef struct +{ + __IO uint32_t SR; /*!< Comparator status register, Address offset: 0x00 */ + __IO uint32_t ICFR; /*!< Comparator interrupt clear flag register, Address offset: 0x04 */ + __IO uint32_t OR; /*!< Comparator option register, Address offset: 0x08 */ +} COMPOPT_TypeDef; + +typedef struct +{ + __IO uint32_t CFGR; /*!< Comparator configuration register , Address offset: 0x00 */ +} COMP_TypeDef; + +typedef struct +{ + __IO uint32_t CFGR; /*!< COMP control and status register, used for bits common to several COMP instances, Address offset: 0x00 */ +} COMP_Common_TypeDef; +/** + * @brief Universal Synchronous Asynchronous Receiver Transmitter + */ + +typedef struct +{ + __IO uint32_t CR1; /*!< USART Control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< USART Control register 2, Address offset: 0x04 */ + __IO uint32_t CR3; /*!< USART Control register 3, Address offset: 0x08 */ + __IO uint32_t BRR; /*!< USART Baud rate register, Address offset: 0x0C */ + __IO uint32_t GTPR; /*!< USART Guard time and prescaler register, Address offset: 0x10 */ + __IO uint32_t RTOR; /*!< USART Receiver Time Out register, Address offset: 0x14 */ + __IO uint32_t RQR; /*!< USART Request register, Address offset: 0x18 */ + __IO uint32_t ISR; /*!< USART Interrupt and status register, Address offset: 0x1C */ + __IO uint32_t ICR; /*!< USART Interrupt flag Clear register, Address offset: 0x20 */ + __IO uint32_t RDR; /*!< USART Receive Data register, Address offset: 0x24 */ + __IO uint32_t TDR; /*!< USART Transmit Data register, Address offset: 0x28 */ + __IO uint32_t PRESC; /*!< USART clock Prescaler register, Address offset: 0x2C */ +} USART_TypeDef; + +/** + * @brief Single Wire Protocol Master Interface SPWMI + */ +typedef struct +{ + __IO uint32_t CR; /*!< SWPMI Configuration/Control register, Address offset: 0x00 */ + __IO uint32_t BRR; /*!< SWPMI bitrate register, Address offset: 0x04 */ + uint32_t RESERVED1; /*!< Reserved, 0x08 */ + __IO uint32_t ISR; /*!< SWPMI Interrupt and Status register, Address offset: 0x0C */ + __IO uint32_t ICR; /*!< SWPMI Interrupt Flag Clear register, Address offset: 0x10 */ + __IO uint32_t IER; /*!< SWPMI Interrupt Enable register, Address offset: 0x14 */ + __IO uint32_t RFL; /*!< SWPMI Receive Frame Length register, Address offset: 0x18 */ + __IO uint32_t TDR; /*!< SWPMI Transmit data register, Address offset: 0x1C */ + __IO uint32_t RDR; /*!< SWPMI Receive data register, Address offset: 0x20 */ + __IO uint32_t OR; /*!< SWPMI Option register, Address offset: 0x24 */ +} SWPMI_TypeDef; + +/** + * @brief Window WATCHDOG + */ + +typedef struct +{ + __IO uint32_t CR; /*!< WWDG Control register, Address offset: 0x00 */ + __IO uint32_t CFR; /*!< WWDG Configuration register, Address offset: 0x04 */ + __IO uint32_t SR; /*!< WWDG Status register, Address offset: 0x08 */ +} WWDG_TypeDef; + + +/** + * @brief RAM_ECC_Specific_Registers + */ +typedef struct +{ + __IO uint32_t CR; /*!< RAMECC monitor configuration register */ + __IO uint32_t SR; /*!< RAMECC monitor status register */ + __IO uint32_t FAR; /*!< RAMECC monitor failing address register */ + __IO uint32_t FDRL; /*!< RAMECC monitor failing data low register */ + __IO uint32_t FDRH; /*!< RAMECC monitor failing data high register */ + __IO uint32_t FECR; /*!< RAMECC monitor failing ECC error code register */ +} RAMECC_MonitorTypeDef; + +typedef struct +{ + __IO uint32_t IER; /*!< RAMECC interrupt enable register */ +} RAMECC_TypeDef; +/** + * @} + */ + + +/** + * @brief Crypto Processor + */ + +typedef struct +{ + __IO uint32_t CR; /*!< CRYP control register, Address offset: 0x00 */ + __IO uint32_t SR; /*!< CRYP status register, Address offset: 0x04 */ + __IO uint32_t DIN; /*!< CRYP data input register, Address offset: 0x08 */ + __IO uint32_t DOUT; /*!< CRYP data output register, Address offset: 0x0C */ + __IO uint32_t DMACR; /*!< CRYP DMA control register, Address offset: 0x10 */ + __IO uint32_t IMSCR; /*!< CRYP interrupt mask set/clear register, Address offset: 0x14 */ + __IO uint32_t RISR; /*!< CRYP raw interrupt status register, Address offset: 0x18 */ + __IO uint32_t MISR; /*!< CRYP masked interrupt status register, Address offset: 0x1C */ + __IO uint32_t K0LR; /*!< CRYP key left register 0, Address offset: 0x20 */ + __IO uint32_t K0RR; /*!< CRYP key right register 0, Address offset: 0x24 */ + __IO uint32_t K1LR; /*!< CRYP key left register 1, Address offset: 0x28 */ + __IO uint32_t K1RR; /*!< CRYP key right register 1, Address offset: 0x2C */ + __IO uint32_t K2LR; /*!< CRYP key left register 2, Address offset: 0x30 */ + __IO uint32_t K2RR; /*!< CRYP key right register 2, Address offset: 0x34 */ + __IO uint32_t K3LR; /*!< CRYP key left register 3, Address offset: 0x38 */ + __IO uint32_t K3RR; /*!< CRYP key right register 3, Address offset: 0x3C */ + __IO uint32_t IV0LR; /*!< CRYP initialization vector left-word register 0, Address offset: 0x40 */ + __IO uint32_t IV0RR; /*!< CRYP initialization vector right-word register 0, Address offset: 0x44 */ + __IO uint32_t IV1LR; /*!< CRYP initialization vector left-word register 1, Address offset: 0x48 */ + __IO uint32_t IV1RR; /*!< CRYP initialization vector right-word register 1, Address offset: 0x4C */ + __IO uint32_t CSGCMCCM0R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 0, Address offset: 0x50 */ + __IO uint32_t CSGCMCCM1R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 1, Address offset: 0x54 */ + __IO uint32_t CSGCMCCM2R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 2, Address offset: 0x58 */ + __IO uint32_t CSGCMCCM3R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 3, Address offset: 0x5C */ + __IO uint32_t CSGCMCCM4R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 4, Address offset: 0x60 */ + __IO uint32_t CSGCMCCM5R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 5, Address offset: 0x64 */ + __IO uint32_t CSGCMCCM6R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 6, Address offset: 0x68 */ + __IO uint32_t CSGCMCCM7R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 7, Address offset: 0x6C */ + __IO uint32_t CSGCM0R; /*!< CRYP GCM/GMAC context swap register 0, Address offset: 0x70 */ + __IO uint32_t CSGCM1R; /*!< CRYP GCM/GMAC context swap register 1, Address offset: 0x74 */ + __IO uint32_t CSGCM2R; /*!< CRYP GCM/GMAC context swap register 2, Address offset: 0x78 */ + __IO uint32_t CSGCM3R; /*!< CRYP GCM/GMAC context swap register 3, Address offset: 0x7C */ + __IO uint32_t CSGCM4R; /*!< CRYP GCM/GMAC context swap register 4, Address offset: 0x80 */ + __IO uint32_t CSGCM5R; /*!< CRYP GCM/GMAC context swap register 5, Address offset: 0x84 */ + __IO uint32_t CSGCM6R; /*!< CRYP GCM/GMAC context swap register 6, Address offset: 0x88 */ + __IO uint32_t CSGCM7R; /*!< CRYP GCM/GMAC context swap register 7, Address offset: 0x8C */ +} CRYP_TypeDef; + +/** + * @brief HASH + */ + +typedef struct +{ + __IO uint32_t CR; /*!< HASH control register, Address offset: 0x00 */ + __IO uint32_t DIN; /*!< HASH data input register, Address offset: 0x04 */ + __IO uint32_t STR; /*!< HASH start register, Address offset: 0x08 */ + __IO uint32_t HR[5]; /*!< HASH digest registers, Address offset: 0x0C-0x1C */ + __IO uint32_t IMR; /*!< HASH interrupt enable register, Address offset: 0x20 */ + __IO uint32_t SR; /*!< HASH status register, Address offset: 0x24 */ + uint32_t RESERVED[52]; /*!< Reserved, 0x28-0xF4 */ + __IO uint32_t CSR[54]; /*!< HASH context swap registers, Address offset: 0x0F8-0x1CC */ +} HASH_TypeDef; + +/** + * @brief HASH_DIGEST + */ + +typedef struct +{ + __IO uint32_t HR[8]; /*!< HASH digest registers, Address offset: 0x310-0x32C */ +} HASH_DIGEST_TypeDef; + + +/** + * @brief RNG + */ + +typedef struct +{ + __IO uint32_t CR; /*!< RNG control register, Address offset: 0x00 */ + __IO uint32_t SR; /*!< RNG status register, Address offset: 0x04 */ + __IO uint32_t DR; /*!< RNG data register, Address offset: 0x08 */ + uint32_t RESERVED; + __IO uint32_t HTCR; /*!< RNG health test configuration register, Address offset: 0x10 */ +} RNG_TypeDef; + +/** + * @brief MDIOS + */ + +typedef struct +{ + __IO uint32_t CR; + __IO uint32_t WRFR; + __IO uint32_t CWRFR; + __IO uint32_t RDFR; + __IO uint32_t CRDFR; + __IO uint32_t SR; + __IO uint32_t CLRFR; + uint32_t RESERVED[57]; + __IO uint32_t DINR0; + __IO uint32_t DINR1; + __IO uint32_t DINR2; + __IO uint32_t DINR3; + __IO uint32_t DINR4; + __IO uint32_t DINR5; + __IO uint32_t DINR6; + __IO uint32_t DINR7; + __IO uint32_t DINR8; + __IO uint32_t DINR9; + __IO uint32_t DINR10; + __IO uint32_t DINR11; + __IO uint32_t DINR12; + __IO uint32_t DINR13; + __IO uint32_t DINR14; + __IO uint32_t DINR15; + __IO uint32_t DINR16; + __IO uint32_t DINR17; + __IO uint32_t DINR18; + __IO uint32_t DINR19; + __IO uint32_t DINR20; + __IO uint32_t DINR21; + __IO uint32_t DINR22; + __IO uint32_t DINR23; + __IO uint32_t DINR24; + __IO uint32_t DINR25; + __IO uint32_t DINR26; + __IO uint32_t DINR27; + __IO uint32_t DINR28; + __IO uint32_t DINR29; + __IO uint32_t DINR30; + __IO uint32_t DINR31; + __IO uint32_t DOUTR0; + __IO uint32_t DOUTR1; + __IO uint32_t DOUTR2; + __IO uint32_t DOUTR3; + __IO uint32_t DOUTR4; + __IO uint32_t DOUTR5; + __IO uint32_t DOUTR6; + __IO uint32_t DOUTR7; + __IO uint32_t DOUTR8; + __IO uint32_t DOUTR9; + __IO uint32_t DOUTR10; + __IO uint32_t DOUTR11; + __IO uint32_t DOUTR12; + __IO uint32_t DOUTR13; + __IO uint32_t DOUTR14; + __IO uint32_t DOUTR15; + __IO uint32_t DOUTR16; + __IO uint32_t DOUTR17; + __IO uint32_t DOUTR18; + __IO uint32_t DOUTR19; + __IO uint32_t DOUTR20; + __IO uint32_t DOUTR21; + __IO uint32_t DOUTR22; + __IO uint32_t DOUTR23; + __IO uint32_t DOUTR24; + __IO uint32_t DOUTR25; + __IO uint32_t DOUTR26; + __IO uint32_t DOUTR27; + __IO uint32_t DOUTR28; + __IO uint32_t DOUTR29; + __IO uint32_t DOUTR30; + __IO uint32_t DOUTR31; +} MDIOS_TypeDef; + + +/** + * @brief USB_OTG_Core_Registers + */ +typedef struct +{ + __IO uint32_t GOTGCTL; /*!< USB_OTG Control and Status Register 000h */ + __IO uint32_t GOTGINT; /*!< USB_OTG Interrupt Register 004h */ + __IO uint32_t GAHBCFG; /*!< Core AHB Configuration Register 008h */ + __IO uint32_t GUSBCFG; /*!< Core USB Configuration Register 00Ch */ + __IO uint32_t GRSTCTL; /*!< Core Reset Register 010h */ + __IO uint32_t GINTSTS; /*!< Core Interrupt Register 014h */ + __IO uint32_t GINTMSK; /*!< Core Interrupt Mask Register 018h */ + __IO uint32_t GRXSTSR; /*!< Receive Sts Q Read Register 01Ch */ + __IO uint32_t GRXSTSP; /*!< Receive Sts Q Read & POP Register 020h */ + __IO uint32_t GRXFSIZ; /*!< Receive FIFO Size Register 024h */ + __IO uint32_t DIEPTXF0_HNPTXFSIZ; /*!< EP0 / Non Periodic Tx FIFO Size Register 028h */ + __IO uint32_t HNPTXSTS; /*!< Non Periodic Tx FIFO/Queue Sts reg 02Ch */ + uint32_t Reserved30[2]; /*!< Reserved 030h */ + __IO uint32_t GCCFG; /*!< General Purpose IO Register 038h */ + __IO uint32_t CID; /*!< User ID Register 03Ch */ + __IO uint32_t GSNPSID; /* USB_OTG core ID 040h*/ + __IO uint32_t GHWCFG1; /* User HW config1 044h*/ + __IO uint32_t GHWCFG2; /* User HW config2 048h*/ + __IO uint32_t GHWCFG3; /*!< User HW config3 04Ch */ + uint32_t Reserved6; /*!< Reserved 050h */ + __IO uint32_t GLPMCFG; /*!< LPM Register 054h */ + __IO uint32_t GPWRDN; /*!< Power Down Register 058h */ + __IO uint32_t GDFIFOCFG; /*!< DFIFO Software Config Register 05Ch */ + __IO uint32_t GADPCTL; /*!< ADP Timer, Control and Status Register 60Ch */ + uint32_t Reserved43[39]; /*!< Reserved 058h-0FFh */ + __IO uint32_t HPTXFSIZ; /*!< Host Periodic Tx FIFO Size Reg 100h */ + __IO uint32_t DIEPTXF[0x0F]; /*!< dev Periodic Transmit FIFO */ +} USB_OTG_GlobalTypeDef; + + +/** + * @brief USB_OTG_device_Registers + */ +typedef struct +{ + __IO uint32_t DCFG; /*!< dev Configuration Register 800h */ + __IO uint32_t DCTL; /*!< dev Control Register 804h */ + __IO uint32_t DSTS; /*!< dev Status Register (RO) 808h */ + uint32_t Reserved0C; /*!< Reserved 80Ch */ + __IO uint32_t DIEPMSK; /*!< dev IN Endpoint Mask 810h */ + __IO uint32_t DOEPMSK; /*!< dev OUT Endpoint Mask 814h */ + __IO uint32_t DAINT; /*!< dev All Endpoints Itr Reg 818h */ + __IO uint32_t DAINTMSK; /*!< dev All Endpoints Itr Mask 81Ch */ + uint32_t Reserved20; /*!< Reserved 820h */ + uint32_t Reserved9; /*!< Reserved 824h */ + __IO uint32_t DVBUSDIS; /*!< dev VBUS discharge Register 828h */ + __IO uint32_t DVBUSPULSE; /*!< dev VBUS Pulse Register 82Ch */ + __IO uint32_t DTHRCTL; /*!< dev threshold 830h */ + __IO uint32_t DIEPEMPMSK; /*!< dev empty msk 834h */ + __IO uint32_t DEACHINT; /*!< dedicated EP interrupt 838h */ + __IO uint32_t DEACHMSK; /*!< dedicated EP msk 83Ch */ + uint32_t Reserved40; /*!< dedicated EP mask 840h */ + __IO uint32_t DINEP1MSK; /*!< dedicated EP mask 844h */ + uint32_t Reserved44[15]; /*!< Reserved 844-87Ch */ + __IO uint32_t DOUTEP1MSK; /*!< dedicated EP msk 884h */ +} USB_OTG_DeviceTypeDef; + + +/** + * @brief USB_OTG_IN_Endpoint-Specific_Register + */ +typedef struct +{ + __IO uint32_t DIEPCTL; /*!< dev IN Endpoint Control Reg 900h + (ep_num * 20h) + 00h */ + uint32_t Reserved04; /*!< Reserved 900h + (ep_num * 20h) + 04h */ + __IO uint32_t DIEPINT; /*!< dev IN Endpoint Itr Reg 900h + (ep_num * 20h) + 08h */ + uint32_t Reserved0C; /*!< Reserved 900h + (ep_num * 20h) + 0Ch */ + __IO uint32_t DIEPTSIZ; /*!< IN Endpoint Txfer Size 900h + (ep_num * 20h) + 10h */ + __IO uint32_t DIEPDMA; /*!< IN Endpoint DMA Address Reg 900h + (ep_num * 20h) + 14h */ + __IO uint32_t DTXFSTS; /*!< IN Endpoint Tx FIFO Status Reg 900h + (ep_num * 20h) + 18h */ + uint32_t Reserved18; /*!< Reserved 900h+(ep_num*20h)+1Ch-900h+ (ep_num * 20h) + 1Ch */ +} USB_OTG_INEndpointTypeDef; + + +/** + * @brief USB_OTG_OUT_Endpoint-Specific_Registers + */ +typedef struct +{ + __IO uint32_t DOEPCTL; /*!< dev OUT Endpoint Control Reg B00h + (ep_num * 20h) + 00h */ + uint32_t Reserved04; /*!< Reserved B00h + (ep_num * 20h) + 04h */ + __IO uint32_t DOEPINT; /*!< dev OUT Endpoint Itr Reg B00h + (ep_num * 20h) + 08h */ + uint32_t Reserved0C; /*!< Reserved B00h + (ep_num * 20h) + 0Ch */ + __IO uint32_t DOEPTSIZ; /*!< dev OUT Endpoint Txfer Size B00h + (ep_num * 20h) + 10h */ + __IO uint32_t DOEPDMA; /*!< dev OUT Endpoint DMA Address B00h + (ep_num * 20h) + 14h */ + uint32_t Reserved18[2]; /*!< Reserved B00h + (ep_num * 20h) + 18h - B00h + (ep_num * 20h) + 1Ch */ +} USB_OTG_OUTEndpointTypeDef; + + +/** + * @brief USB_OTG_Host_Mode_Register_Structures + */ +typedef struct +{ + __IO uint32_t HCFG; /*!< Host Configuration Register 400h */ + __IO uint32_t HFIR; /*!< Host Frame Interval Register 404h */ + __IO uint32_t HFNUM; /*!< Host Frame Nbr/Frame Remaining 408h */ + uint32_t Reserved40C; /*!< Reserved 40Ch */ + __IO uint32_t HPTXSTS; /*!< Host Periodic Tx FIFO/ Queue Status 410h */ + __IO uint32_t HAINT; /*!< Host All Channels Interrupt Register 414h */ + __IO uint32_t HAINTMSK; /*!< Host All Channels Interrupt Mask 418h */ +} USB_OTG_HostTypeDef; + +/** + * @brief USB_OTG_Host_Channel_Specific_Registers + */ +typedef struct +{ + __IO uint32_t HCCHAR; /*!< Host Channel Characteristics Register 500h */ + __IO uint32_t HCSPLT; /*!< Host Channel Split Control Register 504h */ + __IO uint32_t HCINT; /*!< Host Channel Interrupt Register 508h */ + __IO uint32_t HCINTMSK; /*!< Host Channel Interrupt Mask Register 50Ch */ + __IO uint32_t HCTSIZ; /*!< Host Channel Transfer Size Register 510h */ + __IO uint32_t HCDMA; /*!< Host Channel DMA Address Register 514h */ + uint32_t Reserved[2]; /*!< Reserved */ +} USB_OTG_HostChannelTypeDef; +/** + * @} + */ + +/** + * @brief OCTO Serial Peripheral Interface + */ + +typedef struct +{ + __IO uint32_t CR; /*!< OCTOSPI Control register, Address offset: 0x000 */ + uint32_t RESERVED; /*!< Reserved, Address offset: 0x004 */ + __IO uint32_t DCR1; /*!< OCTOSPI Device Configuration register 1, Address offset: 0x008 */ + __IO uint32_t DCR2; /*!< OCTOSPI Device Configuration register 2, Address offset: 0x00C */ + __IO uint32_t DCR3; /*!< OCTOSPI Device Configuration register 3, Address offset: 0x010 */ + __IO uint32_t DCR4; /*!< OCTOSPI Device Configuration register 4, Address offset: 0x014 */ + uint32_t RESERVED1[2]; /*!< Reserved, Address offset: 0x018-0x01C */ + __IO uint32_t SR; /*!< OCTOSPI Status register, Address offset: 0x020 */ + __IO uint32_t FCR; /*!< OCTOSPI Flag Clear register, Address offset: 0x024 */ + uint32_t RESERVED2[6]; /*!< Reserved, Address offset: 0x028-0x03C */ + __IO uint32_t DLR; /*!< OCTOSPI Data Length register, Address offset: 0x040 */ + uint32_t RESERVED3; /*!< Reserved, Address offset: 0x044 */ + __IO uint32_t AR; /*!< OCTOSPI Address register, Address offset: 0x048 */ + uint32_t RESERVED4; /*!< Reserved, Address offset: 0x04C */ + __IO uint32_t DR; /*!< OCTOSPI Data register, Address offset: 0x050 */ + uint32_t RESERVED5[11]; /*!< Reserved, Address offset: 0x054-0x07C */ + __IO uint32_t PSMKR; /*!< OCTOSPI Polling Status Mask register, Address offset: 0x080 */ + uint32_t RESERVED6; /*!< Reserved, Address offset: 0x084 */ + __IO uint32_t PSMAR; /*!< OCTOSPI Polling Status Match register, Address offset: 0x088 */ + uint32_t RESERVED7; /*!< Reserved, Address offset: 0x08C */ + __IO uint32_t PIR; /*!< OCTOSPI Polling Interval register, Address offset: 0x090 */ + uint32_t RESERVED8[27]; /*!< Reserved, Address offset: 0x094-0x0FC */ + __IO uint32_t CCR; /*!< OCTOSPI Communication Configuration register, Address offset: 0x100 */ + uint32_t RESERVED9; /*!< Reserved, Address offset: 0x104 */ + __IO uint32_t TCR; /*!< OCTOSPI Timing Configuration register, Address offset: 0x108 */ + uint32_t RESERVED10; /*!< Reserved, Address offset: 0x10C */ + __IO uint32_t IR; /*!< OCTOSPI Instruction register, Address offset: 0x110 */ + uint32_t RESERVED11[3]; /*!< Reserved, Address offset: 0x114-0x11C */ + __IO uint32_t ABR; /*!< OCTOSPI Alternate Bytes register, Address offset: 0x120 */ + uint32_t RESERVED12[3]; /*!< Reserved, Address offset: 0x124-0x12C */ + __IO uint32_t LPTR; /*!< OCTOSPI Low Power Timeout register, Address offset: 0x130 */ + uint32_t RESERVED13[3]; /*!< Reserved, Address offset: 0x134-0x13C */ + __IO uint32_t WPCCR; /*!< OCTOSPI Wrap Communication Configuration register, Address offset: 0x140 */ + uint32_t RESERVED14; /*!< Reserved, Address offset: 0x144 */ + __IO uint32_t WPTCR; /*!< OCTOSPI Wrap Timing Configuration register, Address offset: 0x148 */ + uint32_t RESERVED15; /*!< Reserved, Address offset: 0x14C */ + __IO uint32_t WPIR; /*!< OCTOSPI Wrap Instruction register, Address offset: 0x150 */ + uint32_t RESERVED16[3]; /*!< Reserved, Address offset: 0x154-0x15C */ + __IO uint32_t WPABR; /*!< OCTOSPI Wrap Alternate Bytes register, Address offset: 0x160 */ + uint32_t RESERVED17[7]; /*!< Reserved, Address offset: 0x164-0x17C */ + __IO uint32_t WCCR; /*!< OCTOSPI Write Communication Configuration register, Address offset: 0x180 */ + uint32_t RESERVED18; /*!< Reserved, Address offset: 0x184 */ + __IO uint32_t WTCR; /*!< OCTOSPI Write Timing Configuration register, Address offset: 0x188 */ + uint32_t RESERVED19; /*!< Reserved, Address offset: 0x18C */ + __IO uint32_t WIR; /*!< OCTOSPI Write Instruction register, Address offset: 0x190 */ + uint32_t RESERVED20[3]; /*!< Reserved, Address offset: 0x194-0x19C */ + __IO uint32_t WABR; /*!< OCTOSPI Write Alternate Bytes register, Address offset: 0x1A0 */ + uint32_t RESERVED21[23]; /*!< Reserved, Address offset: 0x1A4-0x1FC */ + __IO uint32_t HLCR; /*!< OCTOSPI Hyperbus Latency Configuration register, Address offset: 0x200 */ + uint32_t RESERVED22[122]; /*!< Reserved, Address offset: 0x204-0x3EC */ + __IO uint32_t HWCFGR; /*!< OCTOSPI HW Configuration register, Address offset: 0x3F0 */ + __IO uint32_t VER; /*!< OCTOSPI Version register, Address offset: 0x3F4 */ + __IO uint32_t ID; /*!< OCTOSPI Identification register, Address offset: 0x3F8 */ + __IO uint32_t MID; /*!< OCTOPSI HW Magic ID register, Address offset: 0x3FC */ +} OCTOSPI_TypeDef; + +/** + * @} + */ +/** + * @brief OCTO Serial Peripheral Interface IO Manager + */ + +typedef struct +{ + __IO uint32_t CR; /*!< OCTOSPI IO Manager Control register, Address offset: 0x00 */ + __IO uint32_t PCR[3]; /*!< OCTOSPI IO Manager Port[1:3] Configuration register, Address offset: 0x04-0x20 */ +} OCTOSPIM_TypeDef; + +/** + * @} + */ + +/** + * @brief OTFD register + */ +typedef struct +{ + __IO uint32_t REG_CONFIGR; + __IO uint32_t REG_START_ADDR; + __IO uint32_t REG_END_ADDR; + __IO uint32_t REG_NONCER0; + __IO uint32_t REG_NONCER1; + __IO uint32_t REG_KEYR0; + __IO uint32_t REG_KEYR1; + __IO uint32_t REG_KEYR2; + __IO uint32_t REG_KEYR3; +} OTFDEC_Region_TypeDef; + +typedef struct +{ + __IO uint32_t CR; + uint32_t RESERVED1[191]; + __IO uint32_t ISR; + __IO uint32_t ICR; + __IO uint32_t IER; + uint32_t RESERVED2[56]; + __IO uint32_t HWCFGR2; + __IO uint32_t HWCFGR1; + __IO uint32_t VERR; + __IO uint32_t IPIDR; + __IO uint32_t SIDR; +} OTFDEC_TypeDef; +/** + * @} + */ + +/** @addtogroup Peripheral_memory_map + * @{ + */ +#define D1_ITCMRAM_BASE (0x00000000UL) /*!< Base address of : 64KB RAM reserved for CPU execution/instruction accessible over ITCM */ +#define D1_ITCMICP_BASE (0x00100000UL) /*!< Base address of : (up to 128KB) embedded Test FLASH memory accessible over ITCM */ +#define D1_DTCMRAM_BASE (0x20000000UL) /*!< Base address of : 128KB system data RAM accessible over DTCM */ +#define D1_AXIFLASH_BASE (0x08000000UL) /*!< Base address of : (up to 1 MB) embedded FLASH memory accessible over AXI */ +#define D1_AXIICP_BASE (0x1FF00000UL) /*!< Base address of : (up to 128KB) embedded Test FLASH memory accessible over AXI */ +#define D1_AXISRAM1_BASE (0x24000000UL) /*!< Base address of : (up to 128KB) system data RAM1 accessible over over AXI */ +#define D1_AXISRAM2_BASE (0x24020000UL) /*!< Base address of : (up to 192KB) system data RAM2 accessible over over AXI to be shared with ITCM (64K granularity) */ +#define D1_AXISRAM_BASE D1_AXISRAM1_BASE /*!< Base address of : (up to 320KB) system data RAM1/2 accessible over over AXI */ + +#define D2_AHBSRAM1_BASE (0x30000000UL) /*!< Base address of : (up to 16KB) system data RAM accessible over over AXI->AHB Bridge */ +#define D2_AHBSRAM2_BASE (0x30004000UL) /*!< Base address of : (up to 16KB) system data RAM accessible over over AXI->AHB Bridge */ +#define D2_AHBSRAM_BASE D2_AHBSRAM1_BASE /*!< Base address of : (up to 32KB) system data RAM1/2 accessible over over AXI->AHB Bridge */ + +#define D3_BKPSRAM_BASE (0x38800000UL) /*!< Base address of : Backup SRAM(4 KB) over AXI->AHB Bridge */ +#define D3_SRAM_BASE (0x38000000UL) /*!< Base address of : Backup SRAM(16 KB) over AXI->AHB Bridge */ + +#define PERIPH_BASE (0x40000000UL) /*!< Base address of : AHB/APB Peripherals */ +#define OCTOSPI1_BASE (0x90000000UL) /*!< Base address of : OCTOSPI1 memories accessible over AXI */ +#define OCTOSPI2_BASE (0x70000000UL) /*!< Base address of : OCTOSPI2 memories accessible over AXI */ + +#define FLASH_BANK1_BASE (0x08000000UL) /*!< Base address of : (up to 1 MB) Flash Bank1 accessible over AXI */ +#define FLASH_END (0x080FFFFFUL) /*!< FLASH end address */ + + +/* Legacy define */ +#define FLASH_BASE FLASH_BANK1_BASE + +/*!< Device electronic signature memory map */ +#define UID_BASE (0x1FF1E800UL) /*!< Unique device ID register base address */ +#define FLASHSIZE_BASE (0x1FF1E880UL) /*!< FLASH Size register base address */ + + +/*!< Peripheral memory map */ +#define D2_APB1PERIPH_BASE PERIPH_BASE +#define D2_APB2PERIPH_BASE (PERIPH_BASE + 0x00010000UL) +#define D2_AHB1PERIPH_BASE (PERIPH_BASE + 0x00020000UL) +#define D2_AHB2PERIPH_BASE (PERIPH_BASE + 0x08020000UL) + +#define D1_APB1PERIPH_BASE (PERIPH_BASE + 0x10000000UL) +#define D1_AHB1PERIPH_BASE (PERIPH_BASE + 0x12000000UL) + +#define D3_APB1PERIPH_BASE (PERIPH_BASE + 0x18000000UL) +#define D3_AHB1PERIPH_BASE (PERIPH_BASE + 0x18020000UL) + +/*!< Legacy Peripheral memory map */ +#define APB1PERIPH_BASE PERIPH_BASE +#define APB2PERIPH_BASE (PERIPH_BASE + 0x00010000UL) +#define AHB1PERIPH_BASE (PERIPH_BASE + 0x00020000UL) +#define AHB2PERIPH_BASE (PERIPH_BASE + 0x08000000UL) + + +/*!< D1_AHB1PERIPH peripherals */ + +#define MDMA_BASE (D1_AHB1PERIPH_BASE + 0x0000UL) +#define DMA2D_BASE (D1_AHB1PERIPH_BASE + 0x1000UL) +#define FLASH_R_BASE (D1_AHB1PERIPH_BASE + 0x2000UL) +#define FMC_R_BASE (D1_AHB1PERIPH_BASE + 0x4000UL) +#define OCTOSPI1_R_BASE (D1_AHB1PERIPH_BASE + 0x5000UL) +#define DLYB_OCTOSPI1_BASE (D1_AHB1PERIPH_BASE + 0x6000UL) +#define SDMMC1_BASE (D1_AHB1PERIPH_BASE + 0x7000UL) +#define DLYB_SDMMC1_BASE (D1_AHB1PERIPH_BASE + 0x8000UL) +#define RAMECC1_BASE (D1_AHB1PERIPH_BASE + 0x9000UL) +#define OCTOSPI2_R_BASE (D1_AHB1PERIPH_BASE + 0xA000UL) +#define DLYB_OCTOSPI2_BASE (D1_AHB1PERIPH_BASE + 0xB000UL) +#define OCTOSPIM_BASE (D1_AHB1PERIPH_BASE + 0xB400UL) + +#define OTFDEC1_BASE (D1_AHB1PERIPH_BASE + 0xB800UL) +#define OTFDEC1_REGION1_BASE (OTFDEC1_BASE + 0x20UL) +#define OTFDEC1_REGION2_BASE (OTFDEC1_BASE + 0x50UL) +#define OTFDEC1_REGION3_BASE (OTFDEC1_BASE + 0x80UL) +#define OTFDEC1_REGION4_BASE (OTFDEC1_BASE + 0xB0UL) +#define OTFDEC2_BASE (D1_AHB1PERIPH_BASE + 0xBC00UL) +#define OTFDEC2_REGION1_BASE (OTFDEC2_BASE + 0x20UL) +#define OTFDEC2_REGION2_BASE (OTFDEC2_BASE + 0x50UL) +#define OTFDEC2_REGION3_BASE (OTFDEC2_BASE + 0x80UL) +#define OTFDEC2_REGION4_BASE (OTFDEC2_BASE + 0xB0UL) + +/*!< D2_AHB1PERIPH peripherals */ + +#define DMA1_BASE (D2_AHB1PERIPH_BASE + 0x0000UL) +#define DMA2_BASE (D2_AHB1PERIPH_BASE + 0x0400UL) +#define DMAMUX1_BASE (D2_AHB1PERIPH_BASE + 0x0800UL) +#define ADC1_BASE (D2_AHB1PERIPH_BASE + 0x2000UL) +#define ADC2_BASE (D2_AHB1PERIPH_BASE + 0x2100UL) +#define ADC12_COMMON_BASE (D2_AHB1PERIPH_BASE + 0x2300UL) +#define ETH_BASE (D2_AHB1PERIPH_BASE + 0x8000UL) +#define ETH_MAC_BASE (ETH_BASE) + +/*!< USB registers base address */ +#define USB1_OTG_HS_PERIPH_BASE (0x40040000UL) +#define USB_OTG_GLOBAL_BASE (0x000UL) +#define USB_OTG_DEVICE_BASE (0x800UL) +#define USB_OTG_IN_ENDPOINT_BASE (0x900UL) +#define USB_OTG_OUT_ENDPOINT_BASE (0xB00UL) +#define USB_OTG_EP_REG_SIZE (0x20UL) +#define USB_OTG_HOST_BASE (0x400UL) +#define USB_OTG_HOST_PORT_BASE (0x440UL) +#define USB_OTG_HOST_CHANNEL_BASE (0x500UL) +#define USB_OTG_HOST_CHANNEL_SIZE (0x20UL) +#define USB_OTG_PCGCCTL_BASE (0xE00UL) +#define USB_OTG_FIFO_BASE (0x1000UL) +#define USB_OTG_FIFO_SIZE (0x1000UL) + +/*!< D2_AHB2PERIPH peripherals */ + +#define DCMI_BASE (D2_AHB2PERIPH_BASE + 0x0000UL) +#define PSSI_BASE (D2_AHB2PERIPH_BASE + 0x0400UL) +#define CRYP_BASE (D2_AHB2PERIPH_BASE + 0x1000UL) +#define HASH_BASE (D2_AHB2PERIPH_BASE + 0x1400UL) +#define HASH_DIGEST_BASE (D2_AHB2PERIPH_BASE + 0x1710UL) +#define RNG_BASE (D2_AHB2PERIPH_BASE + 0x1800UL) +#define SDMMC2_BASE (D2_AHB2PERIPH_BASE + 0x2400UL) +#define DLYB_SDMMC2_BASE (D2_AHB2PERIPH_BASE + 0x2800UL) +#define RAMECC2_BASE (D2_AHB2PERIPH_BASE + 0x3000UL) +#define FMAC_BASE (D2_AHB2PERIPH_BASE + 0x4000UL) +#define CORDIC_BASE (D2_AHB2PERIPH_BASE + 0x4400UL) + +/*!< D3_AHB1PERIPH peripherals */ +#define GPIOA_BASE (D3_AHB1PERIPH_BASE + 0x0000UL) +#define GPIOB_BASE (D3_AHB1PERIPH_BASE + 0x0400UL) +#define GPIOC_BASE (D3_AHB1PERIPH_BASE + 0x0800UL) +#define GPIOD_BASE (D3_AHB1PERIPH_BASE + 0x0C00UL) +#define GPIOE_BASE (D3_AHB1PERIPH_BASE + 0x1000UL) +#define GPIOF_BASE (D3_AHB1PERIPH_BASE + 0x1400UL) +#define GPIOG_BASE (D3_AHB1PERIPH_BASE + 0x1800UL) +#define GPIOH_BASE (D3_AHB1PERIPH_BASE + 0x1C00UL) +#define GPIOJ_BASE (D3_AHB1PERIPH_BASE + 0x2400UL) +#define GPIOK_BASE (D3_AHB1PERIPH_BASE + 0x2800UL) +#define RCC_BASE (D3_AHB1PERIPH_BASE + 0x4400UL) +#define PWR_BASE (D3_AHB1PERIPH_BASE + 0x4800UL) +#define CRC_BASE (D3_AHB1PERIPH_BASE + 0x4C00UL) +#define BDMA_BASE (D3_AHB1PERIPH_BASE + 0x5400UL) +#define DMAMUX2_BASE (D3_AHB1PERIPH_BASE + 0x5800UL) +#define ADC3_BASE (D3_AHB1PERIPH_BASE + 0x6000UL) +#define ADC3_COMMON_BASE (D3_AHB1PERIPH_BASE + 0x6300UL) +#define HSEM_BASE (D3_AHB1PERIPH_BASE + 0x6400UL) +#define RAMECC3_BASE (D3_AHB1PERIPH_BASE + 0x7000UL) + +/*!< D1_APB1PERIPH peripherals */ +#define LTDC_BASE (D1_APB1PERIPH_BASE + 0x1000UL) +#define LTDC_Layer1_BASE (LTDC_BASE + 0x84UL) +#define LTDC_Layer2_BASE (LTDC_BASE + 0x104UL) +#define WWDG1_BASE (D1_APB1PERIPH_BASE + 0x3000UL) + +/*!< D2_APB1PERIPH peripherals */ +#define TIM2_BASE (D2_APB1PERIPH_BASE + 0x0000UL) +#define TIM3_BASE (D2_APB1PERIPH_BASE + 0x0400UL) +#define TIM4_BASE (D2_APB1PERIPH_BASE + 0x0800UL) +#define TIM5_BASE (D2_APB1PERIPH_BASE + 0x0C00UL) +#define TIM6_BASE (D2_APB1PERIPH_BASE + 0x1000UL) +#define TIM7_BASE (D2_APB1PERIPH_BASE + 0x1400UL) +#define TIM12_BASE (D2_APB1PERIPH_BASE + 0x1800UL) +#define TIM13_BASE (D2_APB1PERIPH_BASE + 0x1C00UL) +#define TIM14_BASE (D2_APB1PERIPH_BASE + 0x2000UL) +#define LPTIM1_BASE (D2_APB1PERIPH_BASE + 0x2400UL) + + +#define SPI2_BASE (D2_APB1PERIPH_BASE + 0x3800UL) +#define SPI3_BASE (D2_APB1PERIPH_BASE + 0x3C00UL) +#define SPDIFRX_BASE (D2_APB1PERIPH_BASE + 0x4000UL) +#define USART2_BASE (D2_APB1PERIPH_BASE + 0x4400UL) +#define USART3_BASE (D2_APB1PERIPH_BASE + 0x4800UL) +#define UART4_BASE (D2_APB1PERIPH_BASE + 0x4C00UL) +#define UART5_BASE (D2_APB1PERIPH_BASE + 0x5000UL) +#define I2C1_BASE (D2_APB1PERIPH_BASE + 0x5400UL) +#define I2C2_BASE (D2_APB1PERIPH_BASE + 0x5800UL) +#define I2C3_BASE (D2_APB1PERIPH_BASE + 0x5C00UL) +#define I2C5_BASE (D2_APB1PERIPH_BASE + 0x6400UL) +#define CEC_BASE (D2_APB1PERIPH_BASE + 0x6C00UL) +#define DAC1_BASE (D2_APB1PERIPH_BASE + 0x7400UL) +#define UART7_BASE (D2_APB1PERIPH_BASE + 0x7800UL) +#define UART8_BASE (D2_APB1PERIPH_BASE + 0x7C00UL) +#define CRS_BASE (D2_APB1PERIPH_BASE + 0x8400UL) +#define SWPMI1_BASE (D2_APB1PERIPH_BASE + 0x8800UL) +#define OPAMP_BASE (D2_APB1PERIPH_BASE + 0x9000UL) +#define OPAMP1_BASE (D2_APB1PERIPH_BASE + 0x9000UL) +#define OPAMP2_BASE (D2_APB1PERIPH_BASE + 0x9010UL) +#define MDIOS_BASE (D2_APB1PERIPH_BASE + 0x9400UL) +#define FDCAN1_BASE (D2_APB1PERIPH_BASE + 0xA000UL) +#define FDCAN2_BASE (D2_APB1PERIPH_BASE + 0xA400UL) +#define FDCAN_CCU_BASE (D2_APB1PERIPH_BASE + 0xA800UL) +#define SRAMCAN_BASE (D2_APB1PERIPH_BASE + 0xAC00UL) +#define FDCAN3_BASE (D2_APB1PERIPH_BASE + 0xD400UL) +#define TIM23_BASE (D2_APB1PERIPH_BASE + 0xE000UL) +#define TIM24_BASE (D2_APB1PERIPH_BASE + 0xE400UL) + +/*!< D2_APB2PERIPH peripherals */ + +#define TIM1_BASE (D2_APB2PERIPH_BASE + 0x0000UL) +#define TIM8_BASE (D2_APB2PERIPH_BASE + 0x0400UL) +#define USART1_BASE (D2_APB2PERIPH_BASE + 0x1000UL) +#define USART6_BASE (D2_APB2PERIPH_BASE + 0x1400UL) +#define UART9_BASE (D2_APB2PERIPH_BASE + 0x1800UL) +#define USART10_BASE (D2_APB2PERIPH_BASE + 0x1C00UL) +#define SPI1_BASE (D2_APB2PERIPH_BASE + 0x3000UL) +#define SPI4_BASE (D2_APB2PERIPH_BASE + 0x3400UL) +#define TIM15_BASE (D2_APB2PERIPH_BASE + 0x4000UL) +#define TIM16_BASE (D2_APB2PERIPH_BASE + 0x4400UL) +#define TIM17_BASE (D2_APB2PERIPH_BASE + 0x4800UL) +#define SPI5_BASE (D2_APB2PERIPH_BASE + 0x5000UL) +#define SAI1_BASE (D2_APB2PERIPH_BASE + 0x5800UL) +#define SAI1_Block_A_BASE (SAI1_BASE + 0x004UL) +#define SAI1_Block_B_BASE (SAI1_BASE + 0x024UL) +#define DFSDM1_BASE (D2_APB2PERIPH_BASE + 0x7800UL) +#define DFSDM1_Channel0_BASE (DFSDM1_BASE + 0x00UL) +#define DFSDM1_Channel1_BASE (DFSDM1_BASE + 0x20UL) +#define DFSDM1_Channel2_BASE (DFSDM1_BASE + 0x40UL) +#define DFSDM1_Channel3_BASE (DFSDM1_BASE + 0x60UL) +#define DFSDM1_Channel4_BASE (DFSDM1_BASE + 0x80UL) +#define DFSDM1_Channel5_BASE (DFSDM1_BASE + 0xA0UL) +#define DFSDM1_Channel6_BASE (DFSDM1_BASE + 0xC0UL) +#define DFSDM1_Channel7_BASE (DFSDM1_BASE + 0xE0UL) +#define DFSDM1_Filter0_BASE (DFSDM1_BASE + 0x100UL) +#define DFSDM1_Filter1_BASE (DFSDM1_BASE + 0x180UL) +#define DFSDM1_Filter2_BASE (DFSDM1_BASE + 0x200UL) +#define DFSDM1_Filter3_BASE (DFSDM1_BASE + 0x280UL) + + +/*!< D3_APB1PERIPH peripherals */ +#define EXTI_BASE (D3_APB1PERIPH_BASE + 0x0000UL) +#define EXTI_D1_BASE (EXTI_BASE + 0x0080UL) +#define EXTI_D2_BASE (EXTI_BASE + 0x00C0UL) +#define SYSCFG_BASE (D3_APB1PERIPH_BASE + 0x0400UL) +#define LPUART1_BASE (D3_APB1PERIPH_BASE + 0x0C00UL) +#define SPI6_BASE (D3_APB1PERIPH_BASE + 0x1400UL) +#define I2C4_BASE (D3_APB1PERIPH_BASE + 0x1C00UL) +#define LPTIM2_BASE (D3_APB1PERIPH_BASE + 0x2400UL) +#define LPTIM3_BASE (D3_APB1PERIPH_BASE + 0x2800UL) +#define LPTIM4_BASE (D3_APB1PERIPH_BASE + 0x2C00UL) +#define LPTIM5_BASE (D3_APB1PERIPH_BASE + 0x3000UL) +#define COMP12_BASE (D3_APB1PERIPH_BASE + 0x3800UL) +#define COMP1_BASE (COMP12_BASE + 0x0CUL) +#define COMP2_BASE (COMP12_BASE + 0x10UL) +#define VREFBUF_BASE (D3_APB1PERIPH_BASE + 0x3C00UL) +#define RTC_BASE (D3_APB1PERIPH_BASE + 0x4000UL) +#define IWDG1_BASE (D3_APB1PERIPH_BASE + 0x4800UL) + + +#define SAI4_BASE (D3_APB1PERIPH_BASE + 0x5400UL) +#define SAI4_Block_A_BASE (SAI4_BASE + 0x004UL) +#define SAI4_Block_B_BASE (SAI4_BASE + 0x024UL) + +#define DTS_BASE (D3_APB1PERIPH_BASE + 0x6800UL) + + + +#define BDMA_Channel0_BASE (BDMA_BASE + 0x0008UL) +#define BDMA_Channel1_BASE (BDMA_BASE + 0x001CUL) +#define BDMA_Channel2_BASE (BDMA_BASE + 0x0030UL) +#define BDMA_Channel3_BASE (BDMA_BASE + 0x0044UL) +#define BDMA_Channel4_BASE (BDMA_BASE + 0x0058UL) +#define BDMA_Channel5_BASE (BDMA_BASE + 0x006CUL) +#define BDMA_Channel6_BASE (BDMA_BASE + 0x0080UL) +#define BDMA_Channel7_BASE (BDMA_BASE + 0x0094UL) + +#define DMAMUX2_Channel0_BASE (DMAMUX2_BASE) +#define DMAMUX2_Channel1_BASE (DMAMUX2_BASE + 0x0004UL) +#define DMAMUX2_Channel2_BASE (DMAMUX2_BASE + 0x0008UL) +#define DMAMUX2_Channel3_BASE (DMAMUX2_BASE + 0x000CUL) +#define DMAMUX2_Channel4_BASE (DMAMUX2_BASE + 0x0010UL) +#define DMAMUX2_Channel5_BASE (DMAMUX2_BASE + 0x0014UL) +#define DMAMUX2_Channel6_BASE (DMAMUX2_BASE + 0x0018UL) +#define DMAMUX2_Channel7_BASE (DMAMUX2_BASE + 0x001CUL) + +#define DMAMUX2_RequestGenerator0_BASE (DMAMUX2_BASE + 0x0100UL) +#define DMAMUX2_RequestGenerator1_BASE (DMAMUX2_BASE + 0x0104UL) +#define DMAMUX2_RequestGenerator2_BASE (DMAMUX2_BASE + 0x0108UL) +#define DMAMUX2_RequestGenerator3_BASE (DMAMUX2_BASE + 0x010CUL) +#define DMAMUX2_RequestGenerator4_BASE (DMAMUX2_BASE + 0x0110UL) +#define DMAMUX2_RequestGenerator5_BASE (DMAMUX2_BASE + 0x0114UL) +#define DMAMUX2_RequestGenerator6_BASE (DMAMUX2_BASE + 0x0118UL) +#define DMAMUX2_RequestGenerator7_BASE (DMAMUX2_BASE + 0x011CUL) + +#define DMAMUX2_ChannelStatus_BASE (DMAMUX2_BASE + 0x0080UL) +#define DMAMUX2_RequestGenStatus_BASE (DMAMUX2_BASE + 0x0140UL) + +#define DMA1_Stream0_BASE (DMA1_BASE + 0x010UL) +#define DMA1_Stream1_BASE (DMA1_BASE + 0x028UL) +#define DMA1_Stream2_BASE (DMA1_BASE + 0x040UL) +#define DMA1_Stream3_BASE (DMA1_BASE + 0x058UL) +#define DMA1_Stream4_BASE (DMA1_BASE + 0x070UL) +#define DMA1_Stream5_BASE (DMA1_BASE + 0x088UL) +#define DMA1_Stream6_BASE (DMA1_BASE + 0x0A0UL) +#define DMA1_Stream7_BASE (DMA1_BASE + 0x0B8UL) + +#define DMA2_Stream0_BASE (DMA2_BASE + 0x010UL) +#define DMA2_Stream1_BASE (DMA2_BASE + 0x028UL) +#define DMA2_Stream2_BASE (DMA2_BASE + 0x040UL) +#define DMA2_Stream3_BASE (DMA2_BASE + 0x058UL) +#define DMA2_Stream4_BASE (DMA2_BASE + 0x070UL) +#define DMA2_Stream5_BASE (DMA2_BASE + 0x088UL) +#define DMA2_Stream6_BASE (DMA2_BASE + 0x0A0UL) +#define DMA2_Stream7_BASE (DMA2_BASE + 0x0B8UL) + +#define DMAMUX1_Channel0_BASE (DMAMUX1_BASE) +#define DMAMUX1_Channel1_BASE (DMAMUX1_BASE + 0x0004UL) +#define DMAMUX1_Channel2_BASE (DMAMUX1_BASE + 0x0008UL) +#define DMAMUX1_Channel3_BASE (DMAMUX1_BASE + 0x000CUL) +#define DMAMUX1_Channel4_BASE (DMAMUX1_BASE + 0x0010UL) +#define DMAMUX1_Channel5_BASE (DMAMUX1_BASE + 0x0014UL) +#define DMAMUX1_Channel6_BASE (DMAMUX1_BASE + 0x0018UL) +#define DMAMUX1_Channel7_BASE (DMAMUX1_BASE + 0x001CUL) +#define DMAMUX1_Channel8_BASE (DMAMUX1_BASE + 0x0020UL) +#define DMAMUX1_Channel9_BASE (DMAMUX1_BASE + 0x0024UL) +#define DMAMUX1_Channel10_BASE (DMAMUX1_BASE + 0x0028UL) +#define DMAMUX1_Channel11_BASE (DMAMUX1_BASE + 0x002CUL) +#define DMAMUX1_Channel12_BASE (DMAMUX1_BASE + 0x0030UL) +#define DMAMUX1_Channel13_BASE (DMAMUX1_BASE + 0x0034UL) +#define DMAMUX1_Channel14_BASE (DMAMUX1_BASE + 0x0038UL) +#define DMAMUX1_Channel15_BASE (DMAMUX1_BASE + 0x003CUL) + +#define DMAMUX1_RequestGenerator0_BASE (DMAMUX1_BASE + 0x0100UL) +#define DMAMUX1_RequestGenerator1_BASE (DMAMUX1_BASE + 0x0104UL) +#define DMAMUX1_RequestGenerator2_BASE (DMAMUX1_BASE + 0x0108UL) +#define DMAMUX1_RequestGenerator3_BASE (DMAMUX1_BASE + 0x010CUL) +#define DMAMUX1_RequestGenerator4_BASE (DMAMUX1_BASE + 0x0110UL) +#define DMAMUX1_RequestGenerator5_BASE (DMAMUX1_BASE + 0x0114UL) +#define DMAMUX1_RequestGenerator6_BASE (DMAMUX1_BASE + 0x0118UL) +#define DMAMUX1_RequestGenerator7_BASE (DMAMUX1_BASE + 0x011CUL) + +#define DMAMUX1_ChannelStatus_BASE (DMAMUX1_BASE + 0x0080UL) +#define DMAMUX1_RequestGenStatus_BASE (DMAMUX1_BASE + 0x0140UL) + +/*!< FMC Banks registers base address */ +#define FMC_Bank1_R_BASE (FMC_R_BASE + 0x0000UL) +#define FMC_Bank1E_R_BASE (FMC_R_BASE + 0x0104UL) +#define FMC_Bank2_R_BASE (FMC_R_BASE + 0x0060UL) +#define FMC_Bank3_R_BASE (FMC_R_BASE + 0x0080UL) +#define FMC_Bank5_6_R_BASE (FMC_R_BASE + 0x0140UL) + +/* Debug MCU registers base address */ +#define DBGMCU_BASE (0x5C001000UL) + +#define MDMA_Channel0_BASE (MDMA_BASE + 0x00000040UL) +#define MDMA_Channel1_BASE (MDMA_BASE + 0x00000080UL) +#define MDMA_Channel2_BASE (MDMA_BASE + 0x000000C0UL) +#define MDMA_Channel3_BASE (MDMA_BASE + 0x00000100UL) +#define MDMA_Channel4_BASE (MDMA_BASE + 0x00000140UL) +#define MDMA_Channel5_BASE (MDMA_BASE + 0x00000180UL) +#define MDMA_Channel6_BASE (MDMA_BASE + 0x000001C0UL) +#define MDMA_Channel7_BASE (MDMA_BASE + 0x00000200UL) +#define MDMA_Channel8_BASE (MDMA_BASE + 0x00000240UL) +#define MDMA_Channel9_BASE (MDMA_BASE + 0x00000280UL) +#define MDMA_Channel10_BASE (MDMA_BASE + 0x000002C0UL) +#define MDMA_Channel11_BASE (MDMA_BASE + 0x00000300UL) +#define MDMA_Channel12_BASE (MDMA_BASE + 0x00000340UL) +#define MDMA_Channel13_BASE (MDMA_BASE + 0x00000380UL) +#define MDMA_Channel14_BASE (MDMA_BASE + 0x000003C0UL) +#define MDMA_Channel15_BASE (MDMA_BASE + 0x00000400UL) + +#define RAMECC1_Monitor1_BASE (RAMECC1_BASE + 0x20UL) +#define RAMECC1_Monitor2_BASE (RAMECC1_BASE + 0x40UL) +#define RAMECC1_Monitor3_BASE (RAMECC1_BASE + 0x60UL) +#define RAMECC1_Monitor4_BASE (RAMECC1_BASE + 0x80UL) +#define RAMECC1_Monitor5_BASE (RAMECC1_BASE + 0xA0UL) +#define RAMECC1_Monitor6_BASE (RAMECC1_BASE + 0xC0UL) + +#define RAMECC2_Monitor1_BASE (RAMECC2_BASE + 0x20UL) +#define RAMECC2_Monitor2_BASE (RAMECC2_BASE + 0x40UL) +#define RAMECC2_Monitor3_BASE (RAMECC2_BASE + 0x60UL) + +#define RAMECC3_Monitor1_BASE (RAMECC3_BASE + 0x20UL) +#define RAMECC3_Monitor2_BASE (RAMECC3_BASE + 0x40UL) + + +/** + * @} + */ + +/** @addtogroup Peripheral_declaration + * @{ + */ +#define TIM2 ((TIM_TypeDef *) TIM2_BASE) +#define TIM3 ((TIM_TypeDef *) TIM3_BASE) +#define TIM4 ((TIM_TypeDef *) TIM4_BASE) +#define TIM5 ((TIM_TypeDef *) TIM5_BASE) +#define TIM6 ((TIM_TypeDef *) TIM6_BASE) +#define TIM7 ((TIM_TypeDef *) TIM7_BASE) +#define TIM13 ((TIM_TypeDef *) TIM13_BASE) +#define TIM14 ((TIM_TypeDef *) TIM14_BASE) +#define VREFBUF ((VREFBUF_TypeDef *) VREFBUF_BASE) +#define RTC ((RTC_TypeDef *) RTC_BASE) +#define WWDG1 ((WWDG_TypeDef *) WWDG1_BASE) + + +#define IWDG1 ((IWDG_TypeDef *) IWDG1_BASE) +#define SPI2 ((SPI_TypeDef *) SPI2_BASE) +#define SPI3 ((SPI_TypeDef *) SPI3_BASE) +#define SPI4 ((SPI_TypeDef *) SPI4_BASE) +#define SPI5 ((SPI_TypeDef *) SPI5_BASE) +#define SPI6 ((SPI_TypeDef *) SPI6_BASE) +#define USART2 ((USART_TypeDef *) USART2_BASE) +#define USART3 ((USART_TypeDef *) USART3_BASE) +#define USART6 ((USART_TypeDef *) USART6_BASE) +#define USART10 ((USART_TypeDef *) USART10_BASE) +#define UART7 ((USART_TypeDef *) UART7_BASE) +#define UART8 ((USART_TypeDef *) UART8_BASE) +#define UART9 ((USART_TypeDef *) UART9_BASE) +#define CRS ((CRS_TypeDef *) CRS_BASE) +#define UART4 ((USART_TypeDef *) UART4_BASE) +#define UART5 ((USART_TypeDef *) UART5_BASE) +#define I2C1 ((I2C_TypeDef *) I2C1_BASE) +#define I2C2 ((I2C_TypeDef *) I2C2_BASE) +#define I2C3 ((I2C_TypeDef *) I2C3_BASE) +#define I2C4 ((I2C_TypeDef *) I2C4_BASE) +#define I2C5 ((I2C_TypeDef *) I2C5_BASE) +#define FDCAN1 ((FDCAN_GlobalTypeDef *) FDCAN1_BASE) +#define FDCAN2 ((FDCAN_GlobalTypeDef *) FDCAN2_BASE) +#define FDCAN_CCU ((FDCAN_ClockCalibrationUnit_TypeDef *) FDCAN_CCU_BASE) +#define FDCAN3 ((FDCAN_GlobalTypeDef *) FDCAN3_BASE) +#define TIM23 ((TIM_TypeDef *) TIM23_BASE) +#define TIM24 ((TIM_TypeDef *) TIM24_BASE) +#define CEC ((CEC_TypeDef *) CEC_BASE) +#define LPTIM1 ((LPTIM_TypeDef *) LPTIM1_BASE) +#define PWR ((PWR_TypeDef *) PWR_BASE) +#define DAC1 ((DAC_TypeDef *) DAC1_BASE) +#define LPUART1 ((USART_TypeDef *) LPUART1_BASE) +#define SWPMI1 ((SWPMI_TypeDef *) SWPMI1_BASE) +#define LPTIM2 ((LPTIM_TypeDef *) LPTIM2_BASE) +#define LPTIM3 ((LPTIM_TypeDef *) LPTIM3_BASE) +#define DTS ((DTS_TypeDef *) DTS_BASE) +#define LPTIM4 ((LPTIM_TypeDef *) LPTIM4_BASE) +#define LPTIM5 ((LPTIM_TypeDef *) LPTIM5_BASE) + +#define SYSCFG ((SYSCFG_TypeDef *) SYSCFG_BASE) +#define COMP12 ((COMPOPT_TypeDef *) COMP12_BASE) +#define COMP1 ((COMP_TypeDef *) COMP1_BASE) +#define COMP2 ((COMP_TypeDef *) COMP2_BASE) +#define COMP12_COMMON ((COMP_Common_TypeDef *) COMP2_BASE) +#define OPAMP ((OPAMP_TypeDef *) OPAMP_BASE) +#define OPAMP1 ((OPAMP_TypeDef *) OPAMP1_BASE) +#define OPAMP2 ((OPAMP_TypeDef *) OPAMP2_BASE) + + +#define EXTI ((EXTI_TypeDef *) EXTI_BASE) +#define EXTI_D1 ((EXTI_Core_TypeDef *) EXTI_D1_BASE) +#define EXTI_D2 ((EXTI_Core_TypeDef *) EXTI_D2_BASE) +#define TIM1 ((TIM_TypeDef *) TIM1_BASE) +#define SPI1 ((SPI_TypeDef *) SPI1_BASE) +#define TIM8 ((TIM_TypeDef *) TIM8_BASE) +#define USART1 ((USART_TypeDef *) USART1_BASE) +#define TIM12 ((TIM_TypeDef *) TIM12_BASE) +#define TIM15 ((TIM_TypeDef *) TIM15_BASE) +#define TIM16 ((TIM_TypeDef *) TIM16_BASE) +#define TIM17 ((TIM_TypeDef *) TIM17_BASE) +#define SAI1 ((SAI_TypeDef *) SAI1_BASE) +#define SAI1_Block_A ((SAI_Block_TypeDef *)SAI1_Block_A_BASE) +#define SAI1_Block_B ((SAI_Block_TypeDef *)SAI1_Block_B_BASE) +#define SAI4 ((SAI_TypeDef *) SAI4_BASE) +#define SAI4_Block_A ((SAI_Block_TypeDef *)SAI4_Block_A_BASE) +#define SAI4_Block_B ((SAI_Block_TypeDef *)SAI4_Block_B_BASE) + +#define SPDIFRX ((SPDIFRX_TypeDef *) SPDIFRX_BASE) +#define DFSDM1_Channel0 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel0_BASE) +#define DFSDM1_Channel1 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel1_BASE) +#define DFSDM1_Channel2 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel2_BASE) +#define DFSDM1_Channel3 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel3_BASE) +#define DFSDM1_Channel4 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel4_BASE) +#define DFSDM1_Channel5 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel5_BASE) +#define DFSDM1_Channel6 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel6_BASE) +#define DFSDM1_Channel7 ((DFSDM_Channel_TypeDef *) DFSDM1_Channel7_BASE) +#define DFSDM1_Filter0 ((DFSDM_Filter_TypeDef *) DFSDM1_Filter0_BASE) +#define DFSDM1_Filter1 ((DFSDM_Filter_TypeDef *) DFSDM1_Filter1_BASE) +#define DFSDM1_Filter2 ((DFSDM_Filter_TypeDef *) DFSDM1_Filter2_BASE) +#define DFSDM1_Filter3 ((DFSDM_Filter_TypeDef *) DFSDM1_Filter3_BASE) +#define DMA2D ((DMA2D_TypeDef *) DMA2D_BASE) +#define DCMI ((DCMI_TypeDef *) DCMI_BASE) +#define PSSI ((PSSI_TypeDef *) PSSI_BASE) +#define RCC ((RCC_TypeDef *) RCC_BASE) +#define FLASH ((FLASH_TypeDef *) FLASH_R_BASE) +#define CRC ((CRC_TypeDef *) CRC_BASE) + +#define GPIOA ((GPIO_TypeDef *) GPIOA_BASE) +#define GPIOB ((GPIO_TypeDef *) GPIOB_BASE) +#define GPIOC ((GPIO_TypeDef *) GPIOC_BASE) +#define GPIOD ((GPIO_TypeDef *) GPIOD_BASE) +#define GPIOE ((GPIO_TypeDef *) GPIOE_BASE) +#define GPIOF ((GPIO_TypeDef *) GPIOF_BASE) +#define GPIOG ((GPIO_TypeDef *) GPIOG_BASE) +#define GPIOH ((GPIO_TypeDef *) GPIOH_BASE) +#define GPIOJ ((GPIO_TypeDef *) GPIOJ_BASE) +#define GPIOK ((GPIO_TypeDef *) GPIOK_BASE) + +#define ADC1 ((ADC_TypeDef *) ADC1_BASE) +#define ADC2 ((ADC_TypeDef *) ADC2_BASE) +#define ADC3 ((ADC_TypeDef *) ADC3_BASE) +#define ADC3_COMMON ((ADC_Common_TypeDef *) ADC3_COMMON_BASE) +#define ADC12_COMMON ((ADC_Common_TypeDef *) ADC12_COMMON_BASE) + +#define CRYP ((CRYP_TypeDef *) CRYP_BASE) +#define HASH ((HASH_TypeDef *) HASH_BASE) +#define HASH_DIGEST ((HASH_DIGEST_TypeDef *) HASH_DIGEST_BASE) +#define RNG ((RNG_TypeDef *) RNG_BASE) +#define SDMMC2 ((SDMMC_TypeDef *) SDMMC2_BASE) +#define DLYB_SDMMC2 ((DLYB_TypeDef *) DLYB_SDMMC2_BASE) +#define FMAC ((FMAC_TypeDef *) FMAC_BASE) +#define CORDIC ((CORDIC_TypeDef *) CORDIC_BASE) + +#define BDMA ((BDMA_TypeDef *) BDMA_BASE) +#define BDMA_Channel0 ((BDMA_Channel_TypeDef *) BDMA_Channel0_BASE) +#define BDMA_Channel1 ((BDMA_Channel_TypeDef *) BDMA_Channel1_BASE) +#define BDMA_Channel2 ((BDMA_Channel_TypeDef *) BDMA_Channel2_BASE) +#define BDMA_Channel3 ((BDMA_Channel_TypeDef *) BDMA_Channel3_BASE) +#define BDMA_Channel4 ((BDMA_Channel_TypeDef *) BDMA_Channel4_BASE) +#define BDMA_Channel5 ((BDMA_Channel_TypeDef *) BDMA_Channel5_BASE) +#define BDMA_Channel6 ((BDMA_Channel_TypeDef *) BDMA_Channel6_BASE) +#define BDMA_Channel7 ((BDMA_Channel_TypeDef *) BDMA_Channel7_BASE) + +#define RAMECC1 ((RAMECC_TypeDef *)RAMECC1_BASE) +#define RAMECC1_Monitor1 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor1_BASE) +#define RAMECC1_Monitor2 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor2_BASE) +#define RAMECC1_Monitor3 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor3_BASE) +#define RAMECC1_Monitor4 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor4_BASE) +#define RAMECC1_Monitor5 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor5_BASE) +#define RAMECC1_Monitor6 ((RAMECC_MonitorTypeDef *)RAMECC1_Monitor6_BASE) + +#define RAMECC2 ((RAMECC_TypeDef *)RAMECC2_BASE) +#define RAMECC2_Monitor1 ((RAMECC_MonitorTypeDef *)RAMECC2_Monitor1_BASE) +#define RAMECC2_Monitor2 ((RAMECC_MonitorTypeDef *)RAMECC2_Monitor2_BASE) +#define RAMECC2_Monitor3 ((RAMECC_MonitorTypeDef *)RAMECC2_Monitor3_BASE) + +#define RAMECC3 ((RAMECC_TypeDef *)RAMECC3_BASE) +#define RAMECC3_Monitor1 ((RAMECC_MonitorTypeDef *)RAMECC3_Monitor1_BASE) +#define RAMECC3_Monitor2 ((RAMECC_MonitorTypeDef *)RAMECC3_Monitor2_BASE) + +#define DMAMUX2 ((DMAMUX_Channel_TypeDef *) DMAMUX2_BASE) +#define DMAMUX2_Channel0 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel0_BASE) +#define DMAMUX2_Channel1 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel1_BASE) +#define DMAMUX2_Channel2 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel2_BASE) +#define DMAMUX2_Channel3 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel3_BASE) +#define DMAMUX2_Channel4 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel4_BASE) +#define DMAMUX2_Channel5 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel5_BASE) +#define DMAMUX2_Channel6 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel6_BASE) +#define DMAMUX2_Channel7 ((DMAMUX_Channel_TypeDef *) DMAMUX2_Channel7_BASE) + + +#define DMAMUX2_RequestGenerator0 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator0_BASE) +#define DMAMUX2_RequestGenerator1 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator1_BASE) +#define DMAMUX2_RequestGenerator2 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator2_BASE) +#define DMAMUX2_RequestGenerator3 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator3_BASE) +#define DMAMUX2_RequestGenerator4 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator4_BASE) +#define DMAMUX2_RequestGenerator5 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator5_BASE) +#define DMAMUX2_RequestGenerator6 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator6_BASE) +#define DMAMUX2_RequestGenerator7 ((DMAMUX_RequestGen_TypeDef *) DMAMUX2_RequestGenerator7_BASE) + +#define DMAMUX2_ChannelStatus ((DMAMUX_ChannelStatus_TypeDef *) DMAMUX2_ChannelStatus_BASE) +#define DMAMUX2_RequestGenStatus ((DMAMUX_RequestGenStatus_TypeDef *) DMAMUX2_RequestGenStatus_BASE) + +#define DMA2 ((DMA_TypeDef *) DMA2_BASE) +#define DMA2_Stream0 ((DMA_Stream_TypeDef *) DMA2_Stream0_BASE) +#define DMA2_Stream1 ((DMA_Stream_TypeDef *) DMA2_Stream1_BASE) +#define DMA2_Stream2 ((DMA_Stream_TypeDef *) DMA2_Stream2_BASE) +#define DMA2_Stream3 ((DMA_Stream_TypeDef *) DMA2_Stream3_BASE) +#define DMA2_Stream4 ((DMA_Stream_TypeDef *) DMA2_Stream4_BASE) +#define DMA2_Stream5 ((DMA_Stream_TypeDef *) DMA2_Stream5_BASE) +#define DMA2_Stream6 ((DMA_Stream_TypeDef *) DMA2_Stream6_BASE) +#define DMA2_Stream7 ((DMA_Stream_TypeDef *) DMA2_Stream7_BASE) + +#define DMA1 ((DMA_TypeDef *) DMA1_BASE) +#define DMA1_Stream0 ((DMA_Stream_TypeDef *) DMA1_Stream0_BASE) +#define DMA1_Stream1 ((DMA_Stream_TypeDef *) DMA1_Stream1_BASE) +#define DMA1_Stream2 ((DMA_Stream_TypeDef *) DMA1_Stream2_BASE) +#define DMA1_Stream3 ((DMA_Stream_TypeDef *) DMA1_Stream3_BASE) +#define DMA1_Stream4 ((DMA_Stream_TypeDef *) DMA1_Stream4_BASE) +#define DMA1_Stream5 ((DMA_Stream_TypeDef *) DMA1_Stream5_BASE) +#define DMA1_Stream6 ((DMA_Stream_TypeDef *) DMA1_Stream6_BASE) +#define DMA1_Stream7 ((DMA_Stream_TypeDef *) DMA1_Stream7_BASE) + + +#define DMAMUX1 ((DMAMUX_Channel_TypeDef *) DMAMUX1_BASE) +#define DMAMUX1_Channel0 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel0_BASE) +#define DMAMUX1_Channel1 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel1_BASE) +#define DMAMUX1_Channel2 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel2_BASE) +#define DMAMUX1_Channel3 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel3_BASE) +#define DMAMUX1_Channel4 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel4_BASE) +#define DMAMUX1_Channel5 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel5_BASE) +#define DMAMUX1_Channel6 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel6_BASE) +#define DMAMUX1_Channel7 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel7_BASE) +#define DMAMUX1_Channel8 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel8_BASE) +#define DMAMUX1_Channel9 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel9_BASE) +#define DMAMUX1_Channel10 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel10_BASE) +#define DMAMUX1_Channel11 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel11_BASE) +#define DMAMUX1_Channel12 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel12_BASE) +#define DMAMUX1_Channel13 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel13_BASE) +#define DMAMUX1_Channel14 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel14_BASE) +#define DMAMUX1_Channel15 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel15_BASE) + +#define DMAMUX1_RequestGenerator0 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator0_BASE) +#define DMAMUX1_RequestGenerator1 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator1_BASE) +#define DMAMUX1_RequestGenerator2 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator2_BASE) +#define DMAMUX1_RequestGenerator3 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator3_BASE) +#define DMAMUX1_RequestGenerator4 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator4_BASE) +#define DMAMUX1_RequestGenerator5 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator5_BASE) +#define DMAMUX1_RequestGenerator6 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator6_BASE) +#define DMAMUX1_RequestGenerator7 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator7_BASE) + +#define DMAMUX1_ChannelStatus ((DMAMUX_ChannelStatus_TypeDef *) DMAMUX1_ChannelStatus_BASE) +#define DMAMUX1_RequestGenStatus ((DMAMUX_RequestGenStatus_TypeDef *) DMAMUX1_RequestGenStatus_BASE) + + +#define FMC_Bank1_R ((FMC_Bank1_TypeDef *) FMC_Bank1_R_BASE) +#define FMC_Bank1E_R ((FMC_Bank1E_TypeDef *) FMC_Bank1E_R_BASE) +#define FMC_Bank2_R ((FMC_Bank2_TypeDef *) FMC_Bank2_R_BASE) +#define FMC_Bank3_R ((FMC_Bank3_TypeDef *) FMC_Bank3_R_BASE) +#define FMC_Bank5_6_R ((FMC_Bank5_6_TypeDef *) FMC_Bank5_6_R_BASE) + +#define OCTOSPI1 ((OCTOSPI_TypeDef *) OCTOSPI1_R_BASE) +#define DLYB_OCTOSPI1 ((DLYB_TypeDef *) DLYB_OCTOSPI1_BASE) +#define OCTOSPI2 ((OCTOSPI_TypeDef *) OCTOSPI2_R_BASE) +#define DLYB_OCTOSPI2 ((DLYB_TypeDef *) DLYB_OCTOSPI2_BASE) +#define OCTOSPIM ((OCTOSPIM_TypeDef *) OCTOSPIM_BASE) + +#define OTFDEC1 ((OTFDEC_TypeDef *) OTFDEC1_BASE) +#define OTFDEC1_REGION1 ((OTFDEC_Region_TypeDef *) OTFDEC1_REGION1_BASE) +#define OTFDEC1_REGION2 ((OTFDEC_Region_TypeDef *) OTFDEC1_REGION2_BASE) +#define OTFDEC1_REGION3 ((OTFDEC_Region_TypeDef *) OTFDEC1_REGION3_BASE) +#define OTFDEC1_REGION4 ((OTFDEC_Region_TypeDef *) OTFDEC1_REGION4_BASE) + +#define OTFDEC2 ((OTFDEC_TypeDef *) OTFDEC2_BASE) +#define OTFDEC2_REGION1 ((OTFDEC_Region_TypeDef *) OTFDEC2_REGION1_BASE) +#define OTFDEC2_REGION2 ((OTFDEC_Region_TypeDef *) OTFDEC2_REGION2_BASE) +#define OTFDEC2_REGION3 ((OTFDEC_Region_TypeDef *) OTFDEC2_REGION3_BASE) +#define OTFDEC2_REGION4 ((OTFDEC_Region_TypeDef *) OTFDEC2_REGION4_BASE) + +#define SDMMC1 ((SDMMC_TypeDef *) SDMMC1_BASE) +#define DLYB_SDMMC1 ((DLYB_TypeDef *) DLYB_SDMMC1_BASE) + +#define DBGMCU ((DBGMCU_TypeDef *) DBGMCU_BASE) + +#define HSEM ((HSEM_TypeDef *) HSEM_BASE) +#define HSEM_COMMON ((HSEM_Common_TypeDef *) (HSEM_BASE + 0x100UL)) + +#define LTDC ((LTDC_TypeDef *)LTDC_BASE) +#define LTDC_Layer1 ((LTDC_Layer_TypeDef *)LTDC_Layer1_BASE) +#define LTDC_Layer2 ((LTDC_Layer_TypeDef *)LTDC_Layer2_BASE) + +#define MDIOS ((MDIOS_TypeDef *) MDIOS_BASE) + +#define ETH ((ETH_TypeDef *)ETH_BASE) +#define MDMA ((MDMA_TypeDef *)MDMA_BASE) +#define MDMA_Channel0 ((MDMA_Channel_TypeDef *)MDMA_Channel0_BASE) +#define MDMA_Channel1 ((MDMA_Channel_TypeDef *)MDMA_Channel1_BASE) +#define MDMA_Channel2 ((MDMA_Channel_TypeDef *)MDMA_Channel2_BASE) +#define MDMA_Channel3 ((MDMA_Channel_TypeDef *)MDMA_Channel3_BASE) +#define MDMA_Channel4 ((MDMA_Channel_TypeDef *)MDMA_Channel4_BASE) +#define MDMA_Channel5 ((MDMA_Channel_TypeDef *)MDMA_Channel5_BASE) +#define MDMA_Channel6 ((MDMA_Channel_TypeDef *)MDMA_Channel6_BASE) +#define MDMA_Channel7 ((MDMA_Channel_TypeDef *)MDMA_Channel7_BASE) +#define MDMA_Channel8 ((MDMA_Channel_TypeDef *)MDMA_Channel8_BASE) +#define MDMA_Channel9 ((MDMA_Channel_TypeDef *)MDMA_Channel9_BASE) +#define MDMA_Channel10 ((MDMA_Channel_TypeDef *)MDMA_Channel10_BASE) +#define MDMA_Channel11 ((MDMA_Channel_TypeDef *)MDMA_Channel11_BASE) +#define MDMA_Channel12 ((MDMA_Channel_TypeDef *)MDMA_Channel12_BASE) +#define MDMA_Channel13 ((MDMA_Channel_TypeDef *)MDMA_Channel13_BASE) +#define MDMA_Channel14 ((MDMA_Channel_TypeDef *)MDMA_Channel14_BASE) +#define MDMA_Channel15 ((MDMA_Channel_TypeDef *)MDMA_Channel15_BASE) + + +#define USB1_OTG_HS ((USB_OTG_GlobalTypeDef *) USB1_OTG_HS_PERIPH_BASE) + +/* Legacy defines */ +#define USB_OTG_HS USB1_OTG_HS +#define USB_OTG_HS_PERIPH_BASE USB1_OTG_HS_PERIPH_BASE + +/** + * @} + */ + +/** @addtogroup Exported_constants + * @{ + */ + + /** @addtogroup Peripheral_Registers_Bits_Definition + * @{ + */ + +/******************************************************************************/ +/* Peripheral Registers_Bits_Definition */ +/******************************************************************************/ + +/******************************************************************************/ +/* */ +/* Analog to Digital Converter */ +/* */ +/******************************************************************************/ +/******************************* ADC VERSION ********************************/ +#define ADC_VER_V5_V90 +/******************** Bit definition for ADC_ISR register ********************/ +#define ADC_ISR_ADRDY_Pos (0U) +#define ADC_ISR_ADRDY_Msk (0x1UL << ADC_ISR_ADRDY_Pos) /*!< 0x00000001 */ +#define ADC_ISR_ADRDY ADC_ISR_ADRDY_Msk /*!< ADC Ready (ADRDY) flag */ +#define ADC_ISR_EOSMP_Pos (1U) +#define ADC_ISR_EOSMP_Msk (0x1UL << ADC_ISR_EOSMP_Pos) /*!< 0x00000002 */ +#define ADC_ISR_EOSMP ADC_ISR_EOSMP_Msk /*!< ADC End of Sampling flag */ +#define ADC_ISR_EOC_Pos (2U) +#define ADC_ISR_EOC_Msk (0x1UL << ADC_ISR_EOC_Pos) /*!< 0x00000004 */ +#define ADC_ISR_EOC ADC_ISR_EOC_Msk /*!< ADC End of Regular Conversion flag */ +#define ADC_ISR_EOS_Pos (3U) +#define ADC_ISR_EOS_Msk (0x1UL << ADC_ISR_EOS_Pos) /*!< 0x00000008 */ +#define ADC_ISR_EOS ADC_ISR_EOS_Msk /*!< ADC End of Regular sequence of Conversions flag */ +#define ADC_ISR_OVR_Pos (4U) +#define ADC_ISR_OVR_Msk (0x1UL << ADC_ISR_OVR_Pos) /*!< 0x00000010 */ +#define ADC_ISR_OVR ADC_ISR_OVR_Msk /*!< ADC overrun flag */ +#define ADC_ISR_JEOC_Pos (5U) +#define ADC_ISR_JEOC_Msk (0x1UL << ADC_ISR_JEOC_Pos) /*!< 0x00000020 */ +#define ADC_ISR_JEOC ADC_ISR_JEOC_Msk /*!< ADC End of Injected Conversion flag */ +#define ADC_ISR_JEOS_Pos (6U) +#define ADC_ISR_JEOS_Msk (0x1UL << ADC_ISR_JEOS_Pos) /*!< 0x00000040 */ +#define ADC_ISR_JEOS ADC_ISR_JEOS_Msk /*!< ADC End of Injected sequence of Conversions flag */ +#define ADC_ISR_AWD1_Pos (7U) +#define ADC_ISR_AWD1_Msk (0x1UL << ADC_ISR_AWD1_Pos) /*!< 0x00000080 */ +#define ADC_ISR_AWD1 ADC_ISR_AWD1_Msk /*!< ADC Analog watchdog 1 flag */ +#define ADC_ISR_AWD2_Pos (8U) +#define ADC_ISR_AWD2_Msk (0x1UL << ADC_ISR_AWD2_Pos) /*!< 0x00000100 */ +#define ADC_ISR_AWD2 ADC_ISR_AWD2_Msk /*!< ADC Analog watchdog 2 flag */ +#define ADC_ISR_AWD3_Pos (9U) +#define ADC_ISR_AWD3_Msk (0x1UL << ADC_ISR_AWD3_Pos) /*!< 0x00000200 */ +#define ADC_ISR_AWD3 ADC_ISR_AWD3_Msk /*!< ADC Analog watchdog 3 flag */ +#define ADC_ISR_JQOVF_Pos (10U) +#define ADC_ISR_JQOVF_Msk (0x1UL << ADC_ISR_JQOVF_Pos) /*!< 0x00000400 */ +#define ADC_ISR_JQOVF ADC_ISR_JQOVF_Msk /*!< ADC Injected Context Queue Overflow flag */ + +/******************** Bit definition for ADC_IER register ********************/ +#define ADC_IER_ADRDYIE_Pos (0U) +#define ADC_IER_ADRDYIE_Msk (0x1UL << ADC_IER_ADRDYIE_Pos) /*!< 0x00000001 */ +#define ADC_IER_ADRDYIE ADC_IER_ADRDYIE_Msk /*!< ADC Ready (ADRDY) interrupt source */ +#define ADC_IER_EOSMPIE_Pos (1U) +#define ADC_IER_EOSMPIE_Msk (0x1UL << ADC_IER_EOSMPIE_Pos) /*!< 0x00000002 */ +#define ADC_IER_EOSMPIE ADC_IER_EOSMPIE_Msk /*!< ADC End of Sampling interrupt source */ +#define ADC_IER_EOCIE_Pos (2U) +#define ADC_IER_EOCIE_Msk (0x1UL << ADC_IER_EOCIE_Pos) /*!< 0x00000004 */ +#define ADC_IER_EOCIE ADC_IER_EOCIE_Msk /*!< ADC End of Regular Conversion interrupt source */ +#define ADC_IER_EOSIE_Pos (3U) +#define ADC_IER_EOSIE_Msk (0x1UL << ADC_IER_EOSIE_Pos) /*!< 0x00000008 */ +#define ADC_IER_EOSIE ADC_IER_EOSIE_Msk /*!< ADC End of Regular sequence of Conversions interrupt source */ +#define ADC_IER_OVRIE_Pos (4U) +#define ADC_IER_OVRIE_Msk (0x1UL << ADC_IER_OVRIE_Pos) /*!< 0x00000010 */ +#define ADC_IER_OVRIE ADC_IER_OVRIE_Msk /*!< ADC overrun interrupt source */ +#define ADC_IER_JEOCIE_Pos (5U) +#define ADC_IER_JEOCIE_Msk (0x1UL << ADC_IER_JEOCIE_Pos) /*!< 0x00000020 */ +#define ADC_IER_JEOCIE ADC_IER_JEOCIE_Msk /*!< ADC End of Injected Conversion interrupt source */ +#define ADC_IER_JEOSIE_Pos (6U) +#define ADC_IER_JEOSIE_Msk (0x1UL << ADC_IER_JEOSIE_Pos) /*!< 0x00000040 */ +#define ADC_IER_JEOSIE ADC_IER_JEOSIE_Msk /*!< ADC End of Injected sequence of Conversions interrupt source */ +#define ADC_IER_AWD1IE_Pos (7U) +#define ADC_IER_AWD1IE_Msk (0x1UL << ADC_IER_AWD1IE_Pos) /*!< 0x00000080 */ +#define ADC_IER_AWD1IE ADC_IER_AWD1IE_Msk /*!< ADC Analog watchdog 1 interrupt source */ +#define ADC_IER_AWD2IE_Pos (8U) +#define ADC_IER_AWD2IE_Msk (0x1UL << ADC_IER_AWD2IE_Pos) /*!< 0x00000100 */ +#define ADC_IER_AWD2IE ADC_IER_AWD2IE_Msk /*!< ADC Analog watchdog 2 interrupt source */ +#define ADC_IER_AWD3IE_Pos (9U) +#define ADC_IER_AWD3IE_Msk (0x1UL << ADC_IER_AWD3IE_Pos) /*!< 0x00000200 */ +#define ADC_IER_AWD3IE ADC_IER_AWD3IE_Msk /*!< ADC Analog watchdog 3 interrupt source */ +#define ADC_IER_JQOVFIE_Pos (10U) +#define ADC_IER_JQOVFIE_Msk (0x1UL << ADC_IER_JQOVFIE_Pos) /*!< 0x00000400 */ +#define ADC_IER_JQOVFIE ADC_IER_JQOVFIE_Msk /*!< ADC Injected Context Queue Overflow interrupt source */ + +/******************** Bit definition for ADC_CR register ********************/ +#define ADC_CR_ADEN_Pos (0U) +#define ADC_CR_ADEN_Msk (0x1UL << ADC_CR_ADEN_Pos) /*!< 0x00000001 */ +#define ADC_CR_ADEN ADC_CR_ADEN_Msk /*!< ADC Enable control */ +#define ADC_CR_ADDIS_Pos (1U) +#define ADC_CR_ADDIS_Msk (0x1UL << ADC_CR_ADDIS_Pos) /*!< 0x00000002 */ +#define ADC_CR_ADDIS ADC_CR_ADDIS_Msk /*!< ADC Disable command */ +#define ADC_CR_ADSTART_Pos (2U) +#define ADC_CR_ADSTART_Msk (0x1UL << ADC_CR_ADSTART_Pos) /*!< 0x00000004 */ +#define ADC_CR_ADSTART ADC_CR_ADSTART_Msk /*!< ADC Start of Regular conversion */ +#define ADC_CR_JADSTART_Pos (3U) +#define ADC_CR_JADSTART_Msk (0x1UL << ADC_CR_JADSTART_Pos) /*!< 0x00000008 */ +#define ADC_CR_JADSTART ADC_CR_JADSTART_Msk /*!< ADC Start of injected conversion */ +#define ADC_CR_ADSTP_Pos (4U) +#define ADC_CR_ADSTP_Msk (0x1UL << ADC_CR_ADSTP_Pos) /*!< 0x00000010 */ +#define ADC_CR_ADSTP ADC_CR_ADSTP_Msk /*!< ADC Stop of Regular conversion */ +#define ADC_CR_JADSTP_Pos (5U) +#define ADC_CR_JADSTP_Msk (0x1UL << ADC_CR_JADSTP_Pos) /*!< 0x00000020 */ +#define ADC_CR_JADSTP ADC_CR_JADSTP_Msk /*!< ADC Stop of injected conversion */ +#define ADC_CR_BOOST_Pos (8U) +#define ADC_CR_BOOST_Msk (0x3UL << ADC_CR_BOOST_Pos) /*!< 0x00000300 */ +#define ADC_CR_BOOST ADC_CR_BOOST_Msk /*!< ADC Boost Mode configuration */ +#define ADC_CR_BOOST_0 (0x1UL << ADC_CR_BOOST_Pos) /*!< 0x00000100 */ +#define ADC_CR_BOOST_1 (0x2UL << ADC_CR_BOOST_Pos) /*!< 0x00000200 */ +#define ADC_CR_ADCALLIN_Pos (16U) +#define ADC_CR_ADCALLIN_Msk (0x1UL << ADC_CR_ADCALLIN_Pos) /*!< 0x00010000 */ +#define ADC_CR_ADCALLIN ADC_CR_ADCALLIN_Msk /*!< ADC Linearity calibration */ +#define ADC_CR_LINCALRDYW1_Pos (22U) +#define ADC_CR_LINCALRDYW1_Msk (0x1UL << ADC_CR_LINCALRDYW1_Pos) /*!< 0x00400000 */ +#define ADC_CR_LINCALRDYW1 ADC_CR_LINCALRDYW1_Msk /*!< ADC Linearity calibration ready Word 1 */ +#define ADC_CR_LINCALRDYW2_Pos (23U) +#define ADC_CR_LINCALRDYW2_Msk (0x1UL << ADC_CR_LINCALRDYW2_Pos) /*!< 0x00800000 */ +#define ADC_CR_LINCALRDYW2 ADC_CR_LINCALRDYW2_Msk /*!< ADC Linearity calibration ready Word 2 */ +#define ADC_CR_LINCALRDYW3_Pos (24U) +#define ADC_CR_LINCALRDYW3_Msk (0x1UL << ADC_CR_LINCALRDYW3_Pos) /*!< 0x01000000 */ +#define ADC_CR_LINCALRDYW3 ADC_CR_LINCALRDYW3_Msk /*!< ADC Linearity calibration ready Word 3 */ +#define ADC_CR_LINCALRDYW4_Pos (25U) +#define ADC_CR_LINCALRDYW4_Msk (0x1UL << ADC_CR_LINCALRDYW4_Pos) /*!< 0x02000000 */ +#define ADC_CR_LINCALRDYW4 ADC_CR_LINCALRDYW4_Msk /*!< ADC Linearity calibration ready Word 4 */ +#define ADC_CR_LINCALRDYW5_Pos (26U) +#define ADC_CR_LINCALRDYW5_Msk (0x1UL << ADC_CR_LINCALRDYW5_Pos) /*!< 0x04000000 */ +#define ADC_CR_LINCALRDYW5 ADC_CR_LINCALRDYW5_Msk /*!< ADC Linearity calibration ready Word 5 */ +#define ADC_CR_LINCALRDYW6_Pos (27U) +#define ADC_CR_LINCALRDYW6_Msk (0x1UL << ADC_CR_LINCALRDYW6_Pos) /*!< 0x08000000 */ +#define ADC_CR_LINCALRDYW6 ADC_CR_LINCALRDYW6_Msk /*!< ADC Linearity calibration ready Word 6 */ +#define ADC_CR_ADVREGEN_Pos (28U) +#define ADC_CR_ADVREGEN_Msk (0x1UL << ADC_CR_ADVREGEN_Pos) /*!< 0x10000000 */ +#define ADC_CR_ADVREGEN ADC_CR_ADVREGEN_Msk /*!< ADC Voltage regulator Enable */ +#define ADC_CR_DEEPPWD_Pos (29U) +#define ADC_CR_DEEPPWD_Msk (0x1UL << ADC_CR_DEEPPWD_Pos) /*!< 0x20000000 */ +#define ADC_CR_DEEPPWD ADC_CR_DEEPPWD_Msk /*!< ADC Deep power down Enable */ +#define ADC_CR_ADCALDIF_Pos (30U) +#define ADC_CR_ADCALDIF_Msk (0x1UL << ADC_CR_ADCALDIF_Pos) /*!< 0x40000000 */ +#define ADC_CR_ADCALDIF ADC_CR_ADCALDIF_Msk /*!< ADC Differential Mode for calibration */ +#define ADC_CR_ADCAL_Pos (31U) +#define ADC_CR_ADCAL_Msk (0x1UL << ADC_CR_ADCAL_Pos) /*!< 0x80000000 */ +#define ADC_CR_ADCAL ADC_CR_ADCAL_Msk /*!< ADC Calibration */ + +/******************** Bit definition for ADC_CFGR register ********************/ +#define ADC_CFGR_DMNGT_Pos (0U) +#define ADC_CFGR_DMNGT_Msk (0x3UL << ADC_CFGR_DMNGT_Pos) /*!< 0x00000003 */ +#define ADC_CFGR_DMNGT ADC_CFGR_DMNGT_Msk /*!< ADC Data Management configuration */ +#define ADC_CFGR_DMNGT_0 (0x1UL << ADC_CFGR_DMNGT_Pos) /*!< 0x00000001 */ +#define ADC_CFGR_DMNGT_1 (0x2UL << ADC_CFGR_DMNGT_Pos) /*!< 0x00000002 */ + +#define ADC_CFGR_RES_Pos (2U) +#define ADC_CFGR_RES_Msk (0x7UL << ADC_CFGR_RES_Pos) /*!< 0x0000001C */ +#define ADC_CFGR_RES ADC_CFGR_RES_Msk /*!< ADC Data resolution */ +#define ADC_CFGR_RES_0 (0x1UL << ADC_CFGR_RES_Pos) /*!< 0x00000004 */ +#define ADC_CFGR_RES_1 (0x2UL << ADC_CFGR_RES_Pos) /*!< 0x00000008 */ +#define ADC_CFGR_RES_2 (0x4UL << ADC_CFGR_RES_Pos) /*!< 0x00000010 */ + +#define ADC_CFGR_EXTSEL_Pos (5U) +#define ADC_CFGR_EXTSEL_Msk (0x1FUL << ADC_CFGR_EXTSEL_Pos) /*!< 0x000003E0 */ +#define ADC_CFGR_EXTSEL ADC_CFGR_EXTSEL_Msk /*!< ADC External trigger selection for regular group */ +#define ADC_CFGR_EXTSEL_0 (0x01UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000020 */ +#define ADC_CFGR_EXTSEL_1 (0x02UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000040 */ +#define ADC_CFGR_EXTSEL_2 (0x04UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000080 */ +#define ADC_CFGR_EXTSEL_3 (0x08UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000100 */ +#define ADC_CFGR_EXTSEL_4 (0x10UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000200 */ + +#define ADC_CFGR_EXTEN_Pos (10U) +#define ADC_CFGR_EXTEN_Msk (0x3UL << ADC_CFGR_EXTEN_Pos) /*!< 0x00000C00 */ +#define ADC_CFGR_EXTEN ADC_CFGR_EXTEN_Msk /*!< ADC External trigger enable and polarity selection for regular channels */ +#define ADC_CFGR_EXTEN_0 (0x1UL << ADC_CFGR_EXTEN_Pos) /*!< 0x00000400 */ +#define ADC_CFGR_EXTEN_1 (0x2UL << ADC_CFGR_EXTEN_Pos) /*!< 0x00000800 */ + +#define ADC_CFGR_OVRMOD_Pos (12U) +#define ADC_CFGR_OVRMOD_Msk (0x1UL << ADC_CFGR_OVRMOD_Pos) /*!< 0x00001000 */ +#define ADC_CFGR_OVRMOD ADC_CFGR_OVRMOD_Msk /*!< ADC overrun mode */ +#define ADC_CFGR_CONT_Pos (13U) +#define ADC_CFGR_CONT_Msk (0x1UL << ADC_CFGR_CONT_Pos) /*!< 0x00002000 */ +#define ADC_CFGR_CONT ADC_CFGR_CONT_Msk /*!< ADC Single/continuous conversion mode for regular conversion */ +#define ADC_CFGR_AUTDLY_Pos (14U) +#define ADC_CFGR_AUTDLY_Msk (0x1UL << ADC_CFGR_AUTDLY_Pos) /*!< 0x00004000 */ +#define ADC_CFGR_AUTDLY ADC_CFGR_AUTDLY_Msk /*!< ADC Delayed conversion mode */ + +#define ADC_CFGR_DISCEN_Pos (16U) +#define ADC_CFGR_DISCEN_Msk (0x1UL << ADC_CFGR_DISCEN_Pos) /*!< 0x00010000 */ +#define ADC_CFGR_DISCEN ADC_CFGR_DISCEN_Msk /*!< ADC Discontinuous mode for regular channels */ + +#define ADC_CFGR_DISCNUM_Pos (17U) +#define ADC_CFGR_DISCNUM_Msk (0x7UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x000E0000 */ +#define ADC_CFGR_DISCNUM ADC_CFGR_DISCNUM_Msk /*!< ADC Discontinuous mode channel count */ +#define ADC_CFGR_DISCNUM_0 (0x1UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x00020000 */ +#define ADC_CFGR_DISCNUM_1 (0x2UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x00040000 */ +#define ADC_CFGR_DISCNUM_2 (0x4UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x00080000 */ + +#define ADC_CFGR_JDISCEN_Pos (20U) +#define ADC_CFGR_JDISCEN_Msk (0x1UL << ADC_CFGR_JDISCEN_Pos) /*!< 0x00100000 */ +#define ADC_CFGR_JDISCEN ADC_CFGR_JDISCEN_Msk /*!< ADC Discontinuous mode on injected channels */ +#define ADC_CFGR_JQM_Pos (21U) +#define ADC_CFGR_JQM_Msk (0x1UL << ADC_CFGR_JQM_Pos) /*!< 0x00200000 */ +#define ADC_CFGR_JQM ADC_CFGR_JQM_Msk /*!< ADC JSQR Queue mode */ +#define ADC_CFGR_AWD1SGL_Pos (22U) +#define ADC_CFGR_AWD1SGL_Msk (0x1UL << ADC_CFGR_AWD1SGL_Pos) /*!< 0x00400000 */ +#define ADC_CFGR_AWD1SGL ADC_CFGR_AWD1SGL_Msk /*!< Enable the watchdog 1 on a single channel or on all channels */ +#define ADC_CFGR_AWD1EN_Pos (23U) +#define ADC_CFGR_AWD1EN_Msk (0x1UL << ADC_CFGR_AWD1EN_Pos) /*!< 0x00800000 */ +#define ADC_CFGR_AWD1EN ADC_CFGR_AWD1EN_Msk /*!< ADC Analog watchdog 1 enable on regular Channels */ +#define ADC_CFGR_JAWD1EN_Pos (24U) +#define ADC_CFGR_JAWD1EN_Msk (0x1UL << ADC_CFGR_JAWD1EN_Pos) /*!< 0x01000000 */ +#define ADC_CFGR_JAWD1EN ADC_CFGR_JAWD1EN_Msk /*!< ADC Analog watchdog 1 enable on injected Channels */ +#define ADC_CFGR_JAUTO_Pos (25U) +#define ADC_CFGR_JAUTO_Msk (0x1UL << ADC_CFGR_JAUTO_Pos) /*!< 0x02000000 */ +#define ADC_CFGR_JAUTO ADC_CFGR_JAUTO_Msk /*!< ADC Automatic injected group conversion */ + +#define ADC_CFGR_AWD1CH_Pos (26U) +#define ADC_CFGR_AWD1CH_Msk (0x1FUL << ADC_CFGR_AWD1CH_Pos) /*!< 0x7C000000 */ +#define ADC_CFGR_AWD1CH ADC_CFGR_AWD1CH_Msk /*!< ADC Analog watchdog 1 Channel selection */ +#define ADC_CFGR_AWD1CH_0 (0x01UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x04000000 */ +#define ADC_CFGR_AWD1CH_1 (0x02UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x08000000 */ +#define ADC_CFGR_AWD1CH_2 (0x04UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x10000000 */ +#define ADC_CFGR_AWD1CH_3 (0x08UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x20000000 */ +#define ADC_CFGR_AWD1CH_4 (0x10UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x40000000 */ + +#define ADC_CFGR_JQDIS_Pos (31U) +#define ADC_CFGR_JQDIS_Msk (0x1UL << ADC_CFGR_JQDIS_Pos) /*!< 0x80000000 */ +#define ADC_CFGR_JQDIS ADC_CFGR_JQDIS_Msk /*!< ADC Injected queue disable */ + +#define ADC3_CFGR_DMAEN_Pos (0U) +#define ADC3_CFGR_DMAEN_Msk (0x1UL << ADC3_CFGR_DMAEN_Pos) /*!< 0x00000001 */ +#define ADC3_CFGR_DMAEN ADC3_CFGR_DMAEN_Msk /*!< ADC DMA transfer enable */ +#define ADC3_CFGR_DMACFG_Pos (1U) +#define ADC3_CFGR_DMACFG_Msk (0x1UL << ADC3_CFGR_DMACFG_Pos) /*!< 0x00000002 */ +#define ADC3_CFGR_DMACFG ADC3_CFGR_DMACFG_Msk /*!< ADC DMA transfer configuration */ + +#define ADC3_CFGR_RES_Pos (3U) +#define ADC3_CFGR_RES_Msk (0x3UL << ADC3_CFGR_RES_Pos) /*!< 0x00000018 */ +#define ADC3_CFGR_RES ADC3_CFGR_RES_Msk /*!< ADC data resolution */ +#define ADC3_CFGR_RES_0 (0x1UL << ADC3_CFGR_RES_Pos) /*!< 0x00000008 */ +#define ADC3_CFGR_RES_1 (0x2UL << ADC3_CFGR_RES_Pos) /*!< 0x00000010 */ + +#define ADC3_CFGR_ALIGN_Pos (15U) +#define ADC3_CFGR_ALIGN_Msk (0x1UL << ADC3_CFGR_ALIGN_Pos) /*!< 0x00008000 */ +#define ADC3_CFGR_ALIGN ADC3_CFGR_ALIGN_Msk /*!< ADC data alignement */ +/******************** Bit definition for ADC_CFGR2 register ********************/ +#define ADC_CFGR2_ROVSE_Pos (0U) +#define ADC_CFGR2_ROVSE_Msk (0x1UL << ADC_CFGR2_ROVSE_Pos) /*!< 0x00000001 */ +#define ADC_CFGR2_ROVSE ADC_CFGR2_ROVSE_Msk /*!< ADC Regular group oversampler enable */ +#define ADC_CFGR2_JOVSE_Pos (1U) +#define ADC_CFGR2_JOVSE_Msk (0x1UL << ADC_CFGR2_JOVSE_Pos) /*!< 0x00000002 */ +#define ADC_CFGR2_JOVSE ADC_CFGR2_JOVSE_Msk /*!< ADC Injected group oversampler enable */ + +#define ADC_CFGR2_OVSS_Pos (5U) +#define ADC_CFGR2_OVSS_Msk (0xFUL << ADC_CFGR2_OVSS_Pos) /*!< 0x000001E0 */ +#define ADC_CFGR2_OVSS ADC_CFGR2_OVSS_Msk /*!< ADC Regular Oversampling shift */ +#define ADC_CFGR2_OVSS_0 (0x1UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000020 */ +#define ADC_CFGR2_OVSS_1 (0x2UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000040 */ +#define ADC_CFGR2_OVSS_2 (0x4UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000080 */ +#define ADC_CFGR2_OVSS_3 (0x8UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000100 */ + +#define ADC_CFGR2_TROVS_Pos (9U) +#define ADC_CFGR2_TROVS_Msk (0x1UL << ADC_CFGR2_TROVS_Pos) /*!< 0x00000200 */ +#define ADC_CFGR2_TROVS ADC_CFGR2_TROVS_Msk /*!< ADC Triggered regular Oversampling */ +#define ADC_CFGR2_ROVSM_Pos (10U) +#define ADC_CFGR2_ROVSM_Msk (0x1UL << ADC_CFGR2_ROVSM_Pos) /*!< 0x00000400 */ +#define ADC_CFGR2_ROVSM ADC_CFGR2_ROVSM_Msk /*!< ADC Regular oversampling mode */ + +#define ADC_CFGR2_RSHIFT1_Pos (11U) +#define ADC_CFGR2_RSHIFT1_Msk (0x1UL << ADC_CFGR2_RSHIFT1_Pos) /*!< 0x00000800 */ +#define ADC_CFGR2_RSHIFT1 ADC_CFGR2_RSHIFT1_Msk /*!< ADC Right-shift data after Offset 1 correction */ +#define ADC_CFGR2_RSHIFT2_Pos (12U) +#define ADC_CFGR2_RSHIFT2_Msk (0x1UL << ADC_CFGR2_RSHIFT2_Pos) /*!< 0x00001000 */ +#define ADC_CFGR2_RSHIFT2 ADC_CFGR2_RSHIFT2_Msk /*!< ADC Right-shift data after Offset 2 correction */ +#define ADC_CFGR2_RSHIFT3_Pos (13U) +#define ADC_CFGR2_RSHIFT3_Msk (0x1UL << ADC_CFGR2_RSHIFT3_Pos) /*!< 0x00002000 */ +#define ADC_CFGR2_RSHIFT3 ADC_CFGR2_RSHIFT3_Msk /*!< ADC Right-shift data after Offset 3 correction */ +#define ADC_CFGR2_RSHIFT4_Pos (14U) +#define ADC_CFGR2_RSHIFT4_Msk (0x1UL << ADC_CFGR2_RSHIFT4_Pos) /*!< 0x00004000 */ +#define ADC_CFGR2_RSHIFT4 ADC_CFGR2_RSHIFT4_Msk /*!< ADC Right-shift data after Offset 4 correction */ + +#define ADC_CFGR2_OVSR_Pos (16U) +#define ADC_CFGR2_OVSR_Msk (0x3FFUL << ADC_CFGR2_OVSR_Pos) /*!< 0x03FF0000 */ +#define ADC_CFGR2_OVSR ADC_CFGR2_OVSR_Msk /*!< ADC oversampling Ratio */ +#define ADC_CFGR2_OVSR_0 (0x001UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00010000 */ +#define ADC_CFGR2_OVSR_1 (0x002UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00020000 */ +#define ADC_CFGR2_OVSR_2 (0x004UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00040000 */ +#define ADC_CFGR2_OVSR_3 (0x008UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00080000 */ +#define ADC_CFGR2_OVSR_4 (0x010UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00100000 */ +#define ADC_CFGR2_OVSR_5 (0x020UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00200000 */ +#define ADC_CFGR2_OVSR_6 (0x040UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00400000 */ +#define ADC_CFGR2_OVSR_7 (0x080UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00800000 */ +#define ADC_CFGR2_OVSR_8 (0x100UL << ADC_CFGR2_OVSR_Pos) /*!< 0x01000000 */ +#define ADC_CFGR2_OVSR_9 (0x200UL << ADC_CFGR2_OVSR_Pos) /*!< 0x02000000 */ + +#define ADC_CFGR2_LSHIFT_Pos (28U) +#define ADC_CFGR2_LSHIFT_Msk (0xFUL << ADC_CFGR2_LSHIFT_Pos) /*!< 0xF0000000 */ +#define ADC_CFGR2_LSHIFT ADC_CFGR2_LSHIFT_Msk /*!< ADC Left shift factor */ +#define ADC_CFGR2_LSHIFT_0 (0x1UL << ADC_CFGR2_LSHIFT_Pos) /*!< 0x10000000 */ +#define ADC_CFGR2_LSHIFT_1 (0x2UL << ADC_CFGR2_LSHIFT_Pos) /*!< 0x20000000 */ +#define ADC_CFGR2_LSHIFT_2 (0x4UL << ADC_CFGR2_LSHIFT_Pos) /*!< 0x40000000 */ +#define ADC_CFGR2_LSHIFT_3 (0x8UL << ADC_CFGR2_LSHIFT_Pos) /*!< 0x80000000 */ + +#define ADC3_CFGR2_OVSR_Pos (2U) +#define ADC3_CFGR2_OVSR_Msk (0x7UL << ADC3_CFGR2_OVSR_Pos) /*!< 0x0000001C */ +#define ADC3_CFGR2_OVSR ADC3_CFGR2_OVSR_Msk /*!< ADC oversampling ratio */ +#define ADC3_CFGR2_OVSR_0 (0x1UL << ADC3_CFGR2_OVSR_Pos) /*!< 0x00000004 */ +#define ADC3_CFGR2_OVSR_1 (0x2UL << ADC3_CFGR2_OVSR_Pos) /*!< 0x00000008 */ +#define ADC3_CFGR2_OVSR_2 (0x4UL << ADC3_CFGR2_OVSR_Pos) /*!< 0x00000010 */ + +#define ADC3_CFGR2_SWTRIG_Pos (25U) +#define ADC3_CFGR2_SWTRIG_Msk (0x1UL << ADC3_CFGR2_SWTRIG_Pos) /*!< 0x02000000 */ +#define ADC3_CFGR2_SWTRIG ADC3_CFGR2_SWTRIG_Msk /*!< ADC Software Trigger Bit for Sample time control trigger mode */ +#define ADC3_CFGR2_BULB_Pos (26U) +#define ADC3_CFGR2_BULB_Msk (0x1UL << ADC3_CFGR2_BULB_Pos) /*!< 0x04000000 */ +#define ADC3_CFGR2_BULB ADC3_CFGR2_BULB_Msk /*!< ADC Bulb sampling mode */ +#define ADC3_CFGR2_SMPTRIG_Pos (27U) +#define ADC3_CFGR2_SMPTRIG_Msk (0x1UL << ADC3_CFGR2_SMPTRIG_Pos) /*!< 0x08000000 */ +#define ADC3_CFGR2_SMPTRIG ADC3_CFGR2_SMPTRIG_Msk /*!< ADC Sample Time Control Trigger mode */ +/******************** Bit definition for ADC_SMPR1 register ********************/ +#define ADC_SMPR1_SMP0_Pos (0U) +#define ADC_SMPR1_SMP0_Msk (0x7UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000007 */ +#define ADC_SMPR1_SMP0 ADC_SMPR1_SMP0_Msk /*!< ADC Channel 0 Sampling time selection */ +#define ADC_SMPR1_SMP0_0 (0x1UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000001 */ +#define ADC_SMPR1_SMP0_1 (0x2UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000002 */ +#define ADC_SMPR1_SMP0_2 (0x4UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000004 */ + +#define ADC_SMPR1_SMP1_Pos (3U) +#define ADC_SMPR1_SMP1_Msk (0x7UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000038 */ +#define ADC_SMPR1_SMP1 ADC_SMPR1_SMP1_Msk /*!< ADC Channel 1 Sampling time selection */ +#define ADC_SMPR1_SMP1_0 (0x1UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000008 */ +#define ADC_SMPR1_SMP1_1 (0x2UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000010 */ +#define ADC_SMPR1_SMP1_2 (0x4UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000020 */ + +#define ADC_SMPR1_SMP2_Pos (6U) +#define ADC_SMPR1_SMP2_Msk (0x7UL << ADC_SMPR1_SMP2_Pos) /*!< 0x000001C0 */ +#define ADC_SMPR1_SMP2 ADC_SMPR1_SMP2_Msk /*!< ADC Channel 2 Sampling time selection */ +#define ADC_SMPR1_SMP2_0 (0x1UL << ADC_SMPR1_SMP2_Pos) /*!< 0x00000040 */ +#define ADC_SMPR1_SMP2_1 (0x2UL << ADC_SMPR1_SMP2_Pos) /*!< 0x00000080 */ +#define ADC_SMPR1_SMP2_2 (0x4UL << ADC_SMPR1_SMP2_Pos) /*!< 0x00000100 */ + +#define ADC_SMPR1_SMP3_Pos (9U) +#define ADC_SMPR1_SMP3_Msk (0x7UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000E00 */ +#define ADC_SMPR1_SMP3 ADC_SMPR1_SMP3_Msk /*!< ADC Channel 3 Sampling time selection */ +#define ADC_SMPR1_SMP3_0 (0x1UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000200 */ +#define ADC_SMPR1_SMP3_1 (0x2UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000400 */ +#define ADC_SMPR1_SMP3_2 (0x4UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000800 */ + +#define ADC_SMPR1_SMP4_Pos (12U) +#define ADC_SMPR1_SMP4_Msk (0x7UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00007000 */ +#define ADC_SMPR1_SMP4 ADC_SMPR1_SMP4_Msk /*!< ADC Channel 4 Sampling time selection */ +#define ADC_SMPR1_SMP4_0 (0x1UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00001000 */ +#define ADC_SMPR1_SMP4_1 (0x2UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00002000 */ +#define ADC_SMPR1_SMP4_2 (0x4UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00004000 */ + +#define ADC_SMPR1_SMP5_Pos (15U) +#define ADC_SMPR1_SMP5_Msk (0x7UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00038000 */ +#define ADC_SMPR1_SMP5 ADC_SMPR1_SMP5_Msk /*!< ADC Channel 5 Sampling time selection */ +#define ADC_SMPR1_SMP5_0 (0x1UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00008000 */ +#define ADC_SMPR1_SMP5_1 (0x2UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00010000 */ +#define ADC_SMPR1_SMP5_2 (0x4UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00020000 */ + +#define ADC_SMPR1_SMP6_Pos (18U) +#define ADC_SMPR1_SMP6_Msk (0x7UL << ADC_SMPR1_SMP6_Pos) /*!< 0x001C0000 */ +#define ADC_SMPR1_SMP6 ADC_SMPR1_SMP6_Msk /*!< ADC Channel 6 Sampling time selection */ +#define ADC_SMPR1_SMP6_0 (0x1UL << ADC_SMPR1_SMP6_Pos) /*!< 0x00040000 */ +#define ADC_SMPR1_SMP6_1 (0x2UL << ADC_SMPR1_SMP6_Pos) /*!< 0x00080000 */ +#define ADC_SMPR1_SMP6_2 (0x4UL << ADC_SMPR1_SMP6_Pos) /*!< 0x00100000 */ + +#define ADC_SMPR1_SMP7_Pos (21U) +#define ADC_SMPR1_SMP7_Msk (0x7UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00E00000 */ +#define ADC_SMPR1_SMP7 ADC_SMPR1_SMP7_Msk /*!< ADC Channel 7 Sampling time selection */ +#define ADC_SMPR1_SMP7_0 (0x1UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00200000 */ +#define ADC_SMPR1_SMP7_1 (0x2UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00400000 */ +#define ADC_SMPR1_SMP7_2 (0x4UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00800000 */ + +#define ADC_SMPR1_SMP8_Pos (24U) +#define ADC_SMPR1_SMP8_Msk (0x7UL << ADC_SMPR1_SMP8_Pos) /*!< 0x07000000 */ +#define ADC_SMPR1_SMP8 ADC_SMPR1_SMP8_Msk /*!< ADC Channel 8 Sampling time selection */ +#define ADC_SMPR1_SMP8_0 (0x1UL << ADC_SMPR1_SMP8_Pos) /*!< 0x01000000 */ +#define ADC_SMPR1_SMP8_1 (0x2UL << ADC_SMPR1_SMP8_Pos) /*!< 0x02000000 */ +#define ADC_SMPR1_SMP8_2 (0x4UL << ADC_SMPR1_SMP8_Pos) /*!< 0x04000000 */ + +#define ADC_SMPR1_SMP9_Pos (27U) +#define ADC_SMPR1_SMP9_Msk (0x7UL << ADC_SMPR1_SMP9_Pos) /*!< 0x38000000 */ +#define ADC_SMPR1_SMP9 ADC_SMPR1_SMP9_Msk /*!< ADC Channel 9 Sampling time selection */ +#define ADC_SMPR1_SMP9_0 (0x1UL << ADC_SMPR1_SMP9_Pos) /*!< 0x08000000 */ +#define ADC_SMPR1_SMP9_1 (0x2UL << ADC_SMPR1_SMP9_Pos) /*!< 0x10000000 */ +#define ADC_SMPR1_SMP9_2 (0x4UL << ADC_SMPR1_SMP9_Pos) /*!< 0x20000000 */ + +/******************** Bit definition for ADC_SMPR2 register ********************/ +#define ADC_SMPR2_SMP10_Pos (0U) +#define ADC_SMPR2_SMP10_Msk (0x7UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000007 */ +#define ADC_SMPR2_SMP10 ADC_SMPR2_SMP10_Msk /*!< ADC Channel 10 Sampling time selection */ +#define ADC_SMPR2_SMP10_0 (0x1UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000001 */ +#define ADC_SMPR2_SMP10_1 (0x2UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000002 */ +#define ADC_SMPR2_SMP10_2 (0x4UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000004 */ + +#define ADC_SMPR2_SMP11_Pos (3U) +#define ADC_SMPR2_SMP11_Msk (0x7UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000038 */ +#define ADC_SMPR2_SMP11 ADC_SMPR2_SMP11_Msk /*!< ADC Channel 11 Sampling time selection */ +#define ADC_SMPR2_SMP11_0 (0x1UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000008 */ +#define ADC_SMPR2_SMP11_1 (0x2UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000010 */ +#define ADC_SMPR2_SMP11_2 (0x4UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000020 */ + +#define ADC_SMPR2_SMP12_Pos (6U) +#define ADC_SMPR2_SMP12_Msk (0x7UL << ADC_SMPR2_SMP12_Pos) /*!< 0x000001C0 */ +#define ADC_SMPR2_SMP12 ADC_SMPR2_SMP12_Msk /*!< ADC Channel 12 Sampling time selection */ +#define ADC_SMPR2_SMP12_0 (0x1UL << ADC_SMPR2_SMP12_Pos) /*!< 0x00000040 */ +#define ADC_SMPR2_SMP12_1 (0x2UL << ADC_SMPR2_SMP12_Pos) /*!< 0x00000080 */ +#define ADC_SMPR2_SMP12_2 (0x4UL << ADC_SMPR2_SMP12_Pos) /*!< 0x00000100 */ + +#define ADC_SMPR2_SMP13_Pos (9U) +#define ADC_SMPR2_SMP13_Msk (0x7UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000E00 */ +#define ADC_SMPR2_SMP13 ADC_SMPR2_SMP13_Msk /*!< ADC Channel 13 Sampling time selection */ +#define ADC_SMPR2_SMP13_0 (0x1UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000200 */ +#define ADC_SMPR2_SMP13_1 (0x2UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000400 */ +#define ADC_SMPR2_SMP13_2 (0x4UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000800 */ + +#define ADC_SMPR2_SMP14_Pos (12U) +#define ADC_SMPR2_SMP14_Msk (0x7UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00007000 */ +#define ADC_SMPR2_SMP14 ADC_SMPR2_SMP14_Msk /*!< ADC Channel 14 Sampling time selection */ +#define ADC_SMPR2_SMP14_0 (0x1UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00001000 */ +#define ADC_SMPR2_SMP14_1 (0x2UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00002000 */ +#define ADC_SMPR2_SMP14_2 (0x4UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00004000 */ + +#define ADC_SMPR2_SMP15_Pos (15U) +#define ADC_SMPR2_SMP15_Msk (0x7UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00038000 */ +#define ADC_SMPR2_SMP15 ADC_SMPR2_SMP15_Msk /*!< ADC Channel 15 Sampling time selection */ +#define ADC_SMPR2_SMP15_0 (0x1UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00008000 */ +#define ADC_SMPR2_SMP15_1 (0x2UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00010000 */ +#define ADC_SMPR2_SMP15_2 (0x4UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00020000 */ + +#define ADC_SMPR2_SMP16_Pos (18U) +#define ADC_SMPR2_SMP16_Msk (0x7UL << ADC_SMPR2_SMP16_Pos) /*!< 0x001C0000 */ +#define ADC_SMPR2_SMP16 ADC_SMPR2_SMP16_Msk /*!< ADC Channel 16 Sampling time selection */ +#define ADC_SMPR2_SMP16_0 (0x1UL << ADC_SMPR2_SMP16_Pos) /*!< 0x00040000 */ +#define ADC_SMPR2_SMP16_1 (0x2UL << ADC_SMPR2_SMP16_Pos) /*!< 0x00080000 */ +#define ADC_SMPR2_SMP16_2 (0x4UL << ADC_SMPR2_SMP16_Pos) /*!< 0x00100000 */ + +#define ADC_SMPR2_SMP17_Pos (21U) +#define ADC_SMPR2_SMP17_Msk (0x7UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00E00000 */ +#define ADC_SMPR2_SMP17 ADC_SMPR2_SMP17_Msk /*!< ADC Channel 17 Sampling time selection */ +#define ADC_SMPR2_SMP17_0 (0x1UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00200000 */ +#define ADC_SMPR2_SMP17_1 (0x2UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00400000 */ +#define ADC_SMPR2_SMP17_2 (0x4UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00800000 */ + +#define ADC_SMPR2_SMP18_Pos (24U) +#define ADC_SMPR2_SMP18_Msk (0x7UL << ADC_SMPR2_SMP18_Pos) /*!< 0x07000000 */ +#define ADC_SMPR2_SMP18 ADC_SMPR2_SMP18_Msk /*!< ADC Channel 18 Sampling time selection */ +#define ADC_SMPR2_SMP18_0 (0x1UL << ADC_SMPR2_SMP18_Pos) /*!< 0x01000000 */ +#define ADC_SMPR2_SMP18_1 (0x2UL << ADC_SMPR2_SMP18_Pos) /*!< 0x02000000 */ +#define ADC_SMPR2_SMP18_2 (0x4UL << ADC_SMPR2_SMP18_Pos) /*!< 0x04000000 */ + +#define ADC_SMPR2_SMP19_Pos (27U) +#define ADC_SMPR2_SMP19_Msk (0x7UL << ADC_SMPR2_SMP19_Pos) /*!< 0x38000000 */ +#define ADC_SMPR2_SMP19 ADC_SMPR2_SMP19_Msk /*!< ADC Channel 19 Sampling time selection */ +#define ADC_SMPR2_SMP19_0 (0x1UL << ADC_SMPR2_SMP19_Pos) /*!< 0x08000000 */ +#define ADC_SMPR2_SMP19_1 (0x2UL << ADC_SMPR2_SMP19_Pos) /*!< 0x10000000 */ +#define ADC_SMPR2_SMP19_2 (0x4UL << ADC_SMPR2_SMP19_Pos) /*!< 0x20000000 */ + +/******************** Bit definition for ADC_PCSEL register ********************/ +#define ADC_PCSEL_PCSEL_Pos (0U) +#define ADC_PCSEL_PCSEL_Msk (0xFFFFFUL << ADC_PCSEL_PCSEL_Pos) /*!< 0x000FFFFF */ +#define ADC_PCSEL_PCSEL ADC_PCSEL_PCSEL_Msk /*!< ADC pre channel selection */ +#define ADC_PCSEL_PCSEL_0 (0x00001UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000001 */ +#define ADC_PCSEL_PCSEL_1 (0x00002UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000002 */ +#define ADC_PCSEL_PCSEL_2 (0x00004UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000004 */ +#define ADC_PCSEL_PCSEL_3 (0x00008UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000008 */ +#define ADC_PCSEL_PCSEL_4 (0x00010UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000010 */ +#define ADC_PCSEL_PCSEL_5 (0x00020UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000020 */ +#define ADC_PCSEL_PCSEL_6 (0x00040UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000040 */ +#define ADC_PCSEL_PCSEL_7 (0x00080UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000080 */ +#define ADC_PCSEL_PCSEL_8 (0x00100UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000100 */ +#define ADC_PCSEL_PCSEL_9 (0x00200UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000200 */ +#define ADC_PCSEL_PCSEL_10 (0x00400UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000400 */ +#define ADC_PCSEL_PCSEL_11 (0x00800UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00000800 */ +#define ADC_PCSEL_PCSEL_12 (0x01000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00001000 */ +#define ADC_PCSEL_PCSEL_13 (0x02000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00002000 */ +#define ADC_PCSEL_PCSEL_14 (0x04000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00004000 */ +#define ADC_PCSEL_PCSEL_15 (0x08000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00008000 */ +#define ADC_PCSEL_PCSEL_16 (0x10000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00010000 */ +#define ADC_PCSEL_PCSEL_17 (0x20000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00020000 */ +#define ADC_PCSEL_PCSEL_18 (0x40000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00040000 */ +#define ADC_PCSEL_PCSEL_19 (0x80000UL << ADC_PCSEL_PCSEL_Pos) /*!< 0x00080000 */ + +/***************** Bit definition for ADC_LTR1, 2, 3 registers *****************/ +#define ADC_LTR_LT_Pos (0U) +#define ADC_LTR_LT_Msk (0x3FFFFFFUL << ADC_LTR_LT_Pos) /*!< 0x03FFFFFF */ +#define ADC_LTR_LT ADC_LTR_LT_Msk /*!< ADC Analog watchdog 1, 2 and 3 lower threshold */ + +/***************** Bit definition for ADC_HTR1, 2, 3 registers ****************/ +#define ADC_HTR_HT_Pos (0U) +#define ADC_HTR_HT_Msk (0x3FFFFFFUL << ADC_HTR_HT_Pos) /*!< 0x03FFFFFF */ +#define ADC_HTR_HT ADC_HTR_HT_Msk /*!< ADC Analog watchdog 1,2 and 3 higher threshold */ + +/******************** Bit definition for ADC3_TR1 register *******************/ +#define ADC3_TR1_LT1_Pos (0U) +#define ADC3_TR1_LT1_Msk (0xFFFUL << ADC3_TR1_LT1_Pos) /*!< 0x00000FFF */ +#define ADC3_TR1_LT1 ADC3_TR1_LT1_Msk /*!< ADC analog watchdog 1 threshold low */ + +#define ADC3_TR1_AWDFILT_Pos (12U) +#define ADC3_TR1_AWDFILT_Msk (0x7UL << ADC3_TR1_AWDFILT_Pos) /*!< 0x00007000 */ +#define ADC3_TR1_AWDFILT ADC3_TR1_AWDFILT_Msk /*!< ADC analog watchdog filtering parameter */ +#define ADC3_TR1_AWDFILT_0 (0x1UL << ADC3_TR1_AWDFILT_Pos) /*!< 0x00001000 */ +#define ADC3_TR1_AWDFILT_1 (0x2UL << ADC3_TR1_AWDFILT_Pos) /*!< 0x00002000 */ +#define ADC3_TR1_AWDFILT_2 (0x4UL << ADC3_TR1_AWDFILT_Pos) /*!< 0x00004000 */ + +#define ADC3_TR1_HT1_Pos (16U) +#define ADC3_TR1_HT1_Msk (0xFFFUL << ADC3_TR1_HT1_Pos) /*!< 0x0FFF0000 */ +#define ADC3_TR1_HT1 ADC3_TR1_HT1_Msk /*!< ADC analog watchdog 1 threshold high */ + +/******************** Bit definition for ADC3_TR2 register *******************/ +#define ADC3_TR2_LT2_Pos (0U) +#define ADC3_TR2_LT2_Msk (0xFFUL << ADC3_TR2_LT2_Pos) /*!< 0x000000FF */ +#define ADC3_TR2_LT2 ADC3_TR2_LT2_Msk /*!< ADC analog watchdog 2 threshold low */ + +#define ADC3_TR2_HT2_Pos (16U) +#define ADC3_TR2_HT2_Msk (0xFFUL << ADC3_TR2_HT2_Pos) /*!< 0x00FF0000 */ +#define ADC3_TR2_HT2 ADC3_TR2_HT2_Msk /*!< ADC analog watchdog 2 threshold high */ + +/******************** Bit definition for ADC3_TR3 register *******************/ +#define ADC3_TR3_LT3_Pos (0U) +#define ADC3_TR3_LT3_Msk (0xFFUL << ADC3_TR3_LT3_Pos) /*!< 0x000000FF */ +#define ADC3_TR3_LT3 ADC3_TR3_LT3_Msk /*!< ADC analog watchdog 3 threshold low */ + +#define ADC3_TR3_HT3_Pos (16U) +#define ADC3_TR3_HT3_Msk (0xFFUL << ADC3_TR3_HT3_Pos) /*!< 0x00FF0000 */ +#define ADC3_TR3_HT3 ADC3_TR3_HT3_Msk /*!< ADC analog watchdog 3 threshold high */ + +/******************** Bit definition for ADC_SQR1 register ********************/ +#define ADC_SQR1_L_Pos (0U) +#define ADC_SQR1_L_Msk (0xFUL << ADC_SQR1_L_Pos) /*!< 0x0000000F */ +#define ADC_SQR1_L ADC_SQR1_L_Msk /*!< ADC regular channel sequence lenght */ +#define ADC_SQR1_L_0 (0x1UL << ADC_SQR1_L_Pos) /*!< 0x00000001 */ +#define ADC_SQR1_L_1 (0x2UL << ADC_SQR1_L_Pos) /*!< 0x00000002 */ +#define ADC_SQR1_L_2 (0x4UL << ADC_SQR1_L_Pos) /*!< 0x00000004 */ +#define ADC_SQR1_L_3 (0x8UL << ADC_SQR1_L_Pos) /*!< 0x00000008 */ + +#define ADC_SQR1_SQ1_Pos (6U) +#define ADC_SQR1_SQ1_Msk (0x1FUL << ADC_SQR1_SQ1_Pos) /*!< 0x000007C0 */ +#define ADC_SQR1_SQ1 ADC_SQR1_SQ1_Msk /*!< ADC 1st conversion in regular sequence */ +#define ADC_SQR1_SQ1_0 (0x01UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000040 */ +#define ADC_SQR1_SQ1_1 (0x02UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000080 */ +#define ADC_SQR1_SQ1_2 (0x04UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000100 */ +#define ADC_SQR1_SQ1_3 (0x08UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000200 */ +#define ADC_SQR1_SQ1_4 (0x10UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000400 */ + +#define ADC_SQR1_SQ2_Pos (12U) +#define ADC_SQR1_SQ2_Msk (0x1FUL << ADC_SQR1_SQ2_Pos) /*!< 0x0001F000 */ +#define ADC_SQR1_SQ2 ADC_SQR1_SQ2_Msk /*!< ADC 2nd conversion in regular sequence */ +#define ADC_SQR1_SQ2_0 (0x01UL << ADC_SQR1_SQ2_Pos) /*!< 0x00001000 */ +#define ADC_SQR1_SQ2_1 (0x02UL << ADC_SQR1_SQ2_Pos) /*!< 0x00002000 */ +#define ADC_SQR1_SQ2_2 (0x04UL << ADC_SQR1_SQ2_Pos) /*!< 0x00004000 */ +#define ADC_SQR1_SQ2_3 (0x08UL << ADC_SQR1_SQ2_Pos) /*!< 0x00008000 */ +#define ADC_SQR1_SQ2_4 (0x10UL << ADC_SQR1_SQ2_Pos) /*!< 0x00010000 */ + +#define ADC_SQR1_SQ3_Pos (18U) +#define ADC_SQR1_SQ3_Msk (0x1FUL << ADC_SQR1_SQ3_Pos) /*!< 0x007C0000 */ +#define ADC_SQR1_SQ3 ADC_SQR1_SQ3_Msk /*!< ADC 3rd conversion in regular sequence */ +#define ADC_SQR1_SQ3_0 (0x01UL << ADC_SQR1_SQ3_Pos) /*!< 0x00040000 */ +#define ADC_SQR1_SQ3_1 (0x02UL << ADC_SQR1_SQ3_Pos) /*!< 0x00080000 */ +#define ADC_SQR1_SQ3_2 (0x04UL << ADC_SQR1_SQ3_Pos) /*!< 0x00100000 */ +#define ADC_SQR1_SQ3_3 (0x08UL << ADC_SQR1_SQ3_Pos) /*!< 0x00200000 */ +#define ADC_SQR1_SQ3_4 (0x10UL << ADC_SQR1_SQ3_Pos) /*!< 0x00400000 */ + +#define ADC_SQR1_SQ4_Pos (24U) +#define ADC_SQR1_SQ4_Msk (0x1FUL << ADC_SQR1_SQ4_Pos) /*!< 0x1F000000 */ +#define ADC_SQR1_SQ4 ADC_SQR1_SQ4_Msk /*!< ADC 4th conversion in regular sequence */ +#define ADC_SQR1_SQ4_0 (0x01UL << ADC_SQR1_SQ4_Pos) /*!< 0x01000000 */ +#define ADC_SQR1_SQ4_1 (0x02UL << ADC_SQR1_SQ4_Pos) /*!< 0x02000000 */ +#define ADC_SQR1_SQ4_2 (0x04UL << ADC_SQR1_SQ4_Pos) /*!< 0x04000000 */ +#define ADC_SQR1_SQ4_3 (0x08UL << ADC_SQR1_SQ4_Pos) /*!< 0x08000000 */ +#define ADC_SQR1_SQ4_4 (0x10UL << ADC_SQR1_SQ4_Pos) /*!< 0x10000000 */ + +/******************** Bit definition for ADC_SQR2 register ********************/ +#define ADC_SQR2_SQ5_Pos (0U) +#define ADC_SQR2_SQ5_Msk (0x1FUL << ADC_SQR2_SQ5_Pos) /*!< 0x0000001F */ +#define ADC_SQR2_SQ5 ADC_SQR2_SQ5_Msk /*!< ADC 5th conversion in regular sequence */ +#define ADC_SQR2_SQ5_0 (0x01UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000001 */ +#define ADC_SQR2_SQ5_1 (0x02UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000002 */ +#define ADC_SQR2_SQ5_2 (0x04UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000004 */ +#define ADC_SQR2_SQ5_3 (0x08UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000008 */ +#define ADC_SQR2_SQ5_4 (0x10UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000010 */ + +#define ADC_SQR2_SQ6_Pos (6U) +#define ADC_SQR2_SQ6_Msk (0x1FUL << ADC_SQR2_SQ6_Pos) /*!< 0x000007C0 */ +#define ADC_SQR2_SQ6 ADC_SQR2_SQ6_Msk /*!< ADC 6th conversion in regular sequence */ +#define ADC_SQR2_SQ6_0 (0x01UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000040 */ +#define ADC_SQR2_SQ6_1 (0x02UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000080 */ +#define ADC_SQR2_SQ6_2 (0x04UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000100 */ +#define ADC_SQR2_SQ6_3 (0x08UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000200 */ +#define ADC_SQR2_SQ6_4 (0x10UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000400 */ + +#define ADC_SQR2_SQ7_Pos (12U) +#define ADC_SQR2_SQ7_Msk (0x1FUL << ADC_SQR2_SQ7_Pos) /*!< 0x0001F000 */ +#define ADC_SQR2_SQ7 ADC_SQR2_SQ7_Msk /*!< ADC 7th conversion in regular sequence */ +#define ADC_SQR2_SQ7_0 (0x01UL << ADC_SQR2_SQ7_Pos) /*!< 0x00001000 */ +#define ADC_SQR2_SQ7_1 (0x02UL << ADC_SQR2_SQ7_Pos) /*!< 0x00002000 */ +#define ADC_SQR2_SQ7_2 (0x04UL << ADC_SQR2_SQ7_Pos) /*!< 0x00004000 */ +#define ADC_SQR2_SQ7_3 (0x08UL << ADC_SQR2_SQ7_Pos) /*!< 0x00008000 */ +#define ADC_SQR2_SQ7_4 (0x10UL << ADC_SQR2_SQ7_Pos) /*!< 0x00010000 */ + +#define ADC_SQR2_SQ8_Pos (18U) +#define ADC_SQR2_SQ8_Msk (0x1FUL << ADC_SQR2_SQ8_Pos) /*!< 0x007C0000 */ +#define ADC_SQR2_SQ8 ADC_SQR2_SQ8_Msk /*!< ADC 8th conversion in regular sequence */ +#define ADC_SQR2_SQ8_0 (0x01UL << ADC_SQR2_SQ8_Pos) /*!< 0x00040000 */ +#define ADC_SQR2_SQ8_1 (0x02UL << ADC_SQR2_SQ8_Pos) /*!< 0x00080000 */ +#define ADC_SQR2_SQ8_2 (0x04UL << ADC_SQR2_SQ8_Pos) /*!< 0x00100000 */ +#define ADC_SQR2_SQ8_3 (0x08UL << ADC_SQR2_SQ8_Pos) /*!< 0x00200000 */ +#define ADC_SQR2_SQ8_4 (0x10UL << ADC_SQR2_SQ8_Pos) /*!< 0x00400000 */ + +#define ADC_SQR2_SQ9_Pos (24U) +#define ADC_SQR2_SQ9_Msk (0x1FUL << ADC_SQR2_SQ9_Pos) /*!< 0x1F000000 */ +#define ADC_SQR2_SQ9 ADC_SQR2_SQ9_Msk /*!< ADC 9th conversion in regular sequence */ +#define ADC_SQR2_SQ9_0 (0x01UL << ADC_SQR2_SQ9_Pos) /*!< 0x01000000 */ +#define ADC_SQR2_SQ9_1 (0x02UL << ADC_SQR2_SQ9_Pos) /*!< 0x02000000 */ +#define ADC_SQR2_SQ9_2 (0x04UL << ADC_SQR2_SQ9_Pos) /*!< 0x04000000 */ +#define ADC_SQR2_SQ9_3 (0x08UL << ADC_SQR2_SQ9_Pos) /*!< 0x08000000 */ +#define ADC_SQR2_SQ9_4 (0x10UL << ADC_SQR2_SQ9_Pos) /*!< 0x10000000 */ + +/******************** Bit definition for ADC_SQR3 register ********************/ +#define ADC_SQR3_SQ10_Pos (0U) +#define ADC_SQR3_SQ10_Msk (0x1FUL << ADC_SQR3_SQ10_Pos) /*!< 0x0000001F */ +#define ADC_SQR3_SQ10 ADC_SQR3_SQ10_Msk /*!< ADC 10th conversion in regular sequence */ +#define ADC_SQR3_SQ10_0 (0x01UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000001 */ +#define ADC_SQR3_SQ10_1 (0x02UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000002 */ +#define ADC_SQR3_SQ10_2 (0x04UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000004 */ +#define ADC_SQR3_SQ10_3 (0x08UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000008 */ +#define ADC_SQR3_SQ10_4 (0x10UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000010 */ + +#define ADC_SQR3_SQ11_Pos (6U) +#define ADC_SQR3_SQ11_Msk (0x1FUL << ADC_SQR3_SQ11_Pos) /*!< 0x000007C0 */ +#define ADC_SQR3_SQ11 ADC_SQR3_SQ11_Msk /*!< ADC 11th conversion in regular sequence */ +#define ADC_SQR3_SQ11_0 (0x01UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000040 */ +#define ADC_SQR3_SQ11_1 (0x02UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000080 */ +#define ADC_SQR3_SQ11_2 (0x04UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000100 */ +#define ADC_SQR3_SQ11_3 (0x08UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000200 */ +#define ADC_SQR3_SQ11_4 (0x10UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000400 */ + +#define ADC_SQR3_SQ12_Pos (12U) +#define ADC_SQR3_SQ12_Msk (0x1FUL << ADC_SQR3_SQ12_Pos) /*!< 0x0001F000 */ +#define ADC_SQR3_SQ12 ADC_SQR3_SQ12_Msk /*!< ADC 12th conversion in regular sequence */ +#define ADC_SQR3_SQ12_0 (0x01UL << ADC_SQR3_SQ12_Pos) /*!< 0x00001000 */ +#define ADC_SQR3_SQ12_1 (0x02UL << ADC_SQR3_SQ12_Pos) /*!< 0x00002000 */ +#define ADC_SQR3_SQ12_2 (0x04UL << ADC_SQR3_SQ12_Pos) /*!< 0x00004000 */ +#define ADC_SQR3_SQ12_3 (0x08UL << ADC_SQR3_SQ12_Pos) /*!< 0x00008000 */ +#define ADC_SQR3_SQ12_4 (0x10UL << ADC_SQR3_SQ12_Pos) /*!< 0x00010000 */ + +#define ADC_SQR3_SQ13_Pos (18U) +#define ADC_SQR3_SQ13_Msk (0x1FUL << ADC_SQR3_SQ13_Pos) /*!< 0x007C0000 */ +#define ADC_SQR3_SQ13 ADC_SQR3_SQ13_Msk /*!< ADC 13th conversion in regular sequence */ +#define ADC_SQR3_SQ13_0 (0x01UL << ADC_SQR3_SQ13_Pos) /*!< 0x00040000 */ +#define ADC_SQR3_SQ13_1 (0x02UL << ADC_SQR3_SQ13_Pos) /*!< 0x00080000 */ +#define ADC_SQR3_SQ13_2 (0x04UL << ADC_SQR3_SQ13_Pos) /*!< 0x00100000 */ +#define ADC_SQR3_SQ13_3 (0x08UL << ADC_SQR3_SQ13_Pos) /*!< 0x00200000 */ +#define ADC_SQR3_SQ13_4 (0x10UL << ADC_SQR3_SQ13_Pos) /*!< 0x00400000 */ + +#define ADC_SQR3_SQ14_Pos (24U) +#define ADC_SQR3_SQ14_Msk (0x1FUL << ADC_SQR3_SQ14_Pos) /*!< 0x1F000000 */ +#define ADC_SQR3_SQ14 ADC_SQR3_SQ14_Msk /*!< ADC 14th conversion in regular sequence */ +#define ADC_SQR3_SQ14_0 (0x01UL << ADC_SQR3_SQ14_Pos) /*!< 0x01000000 */ +#define ADC_SQR3_SQ14_1 (0x02UL << ADC_SQR3_SQ14_Pos) /*!< 0x02000000 */ +#define ADC_SQR3_SQ14_2 (0x04UL << ADC_SQR3_SQ14_Pos) /*!< 0x04000000 */ +#define ADC_SQR3_SQ14_3 (0x08UL << ADC_SQR3_SQ14_Pos) /*!< 0x08000000 */ +#define ADC_SQR3_SQ14_4 (0x10UL << ADC_SQR3_SQ14_Pos) /*!< 0x10000000 */ + +/******************** Bit definition for ADC_SQR4 register ********************/ +#define ADC_SQR4_SQ15_Pos (0U) +#define ADC_SQR4_SQ15_Msk (0x1FUL << ADC_SQR4_SQ15_Pos) /*!< 0x0000001F */ +#define ADC_SQR4_SQ15 ADC_SQR4_SQ15_Msk /*!< ADC 15th conversion in regular sequence */ +#define ADC_SQR4_SQ15_0 (0x01UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000001 */ +#define ADC_SQR4_SQ15_1 (0x02UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000002 */ +#define ADC_SQR4_SQ15_2 (0x04UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000004 */ +#define ADC_SQR4_SQ15_3 (0x08UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000008 */ +#define ADC_SQR4_SQ15_4 (0x10UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000010 */ + +#define ADC_SQR4_SQ16_Pos (6U) +#define ADC_SQR4_SQ16_Msk (0x1FUL << ADC_SQR4_SQ16_Pos) /*!< 0x000007C0 */ +#define ADC_SQR4_SQ16 ADC_SQR4_SQ16_Msk /*!< ADC 16th conversion in regular sequence */ +#define ADC_SQR4_SQ16_0 (0x01UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000040 */ +#define ADC_SQR4_SQ16_1 (0x02UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000080 */ +#define ADC_SQR4_SQ16_2 (0x04UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000100 */ +#define ADC_SQR4_SQ16_3 (0x08UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000200 */ +#define ADC_SQR4_SQ16_4 (0x10UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000400 */ +/******************** Bit definition for ADC_DR register ********************/ +#define ADC_DR_RDATA_Pos (0U) +#define ADC_DR_RDATA_Msk (0xFFFFFFFFUL << ADC_DR_RDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_DR_RDATA ADC_DR_RDATA_Msk /*!< ADC regular Data converted */ + +/******************** Bit definition for ADC_JSQR register ********************/ +#define ADC_JSQR_JL_Pos (0U) +#define ADC_JSQR_JL_Msk (0x3UL << ADC_JSQR_JL_Pos) /*!< 0x00000003 */ +#define ADC_JSQR_JL ADC_JSQR_JL_Msk /*!< ADC injected channel sequence length */ +#define ADC_JSQR_JL_0 (0x1UL << ADC_JSQR_JL_Pos) /*!< 0x00000001 */ +#define ADC_JSQR_JL_1 (0x2UL << ADC_JSQR_JL_Pos) /*!< 0x00000002 */ + +#define ADC_JSQR_JEXTSEL_Pos (2U) +#define ADC_JSQR_JEXTSEL_Msk (0x1FUL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x0000007C */ +#define ADC_JSQR_JEXTSEL ADC_JSQR_JEXTSEL_Msk /*!< ADC external trigger selection for injected group */ +#define ADC_JSQR_JEXTSEL_0 (0x01UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000004 */ +#define ADC_JSQR_JEXTSEL_1 (0x02UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000008 */ +#define ADC_JSQR_JEXTSEL_2 (0x04UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000010 */ +#define ADC_JSQR_JEXTSEL_3 (0x08UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000020 */ +#define ADC_JSQR_JEXTSEL_4 (0x10UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000040 */ + +#define ADC_JSQR_JEXTEN_Pos (7U) +#define ADC_JSQR_JEXTEN_Msk (0x3UL << ADC_JSQR_JEXTEN_Pos) /*!< 0x00000180 */ +#define ADC_JSQR_JEXTEN ADC_JSQR_JEXTEN_Msk /*!< ADC external trigger enable and polarity selection for injected channels */ +#define ADC_JSQR_JEXTEN_0 (0x1UL << ADC_JSQR_JEXTEN_Pos) /*!< 0x00000080 */ +#define ADC_JSQR_JEXTEN_1 (0x2UL << ADC_JSQR_JEXTEN_Pos) /*!< 0x00000100 */ + +#define ADC_JSQR_JSQ1_Pos (9U) +#define ADC_JSQR_JSQ1_Msk (0x1FUL << ADC_JSQR_JSQ1_Pos) /*!< 0x00003E00 */ +#define ADC_JSQR_JSQ1 ADC_JSQR_JSQ1_Msk /*!< ADC 1st conversion in injected sequence */ +#define ADC_JSQR_JSQ1_0 (0x01UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00000200 */ +#define ADC_JSQR_JSQ1_1 (0x02UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00000400 */ +#define ADC_JSQR_JSQ1_2 (0x04UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00000800 */ +#define ADC_JSQR_JSQ1_3 (0x08UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00001000 */ +#define ADC_JSQR_JSQ1_4 (0x10UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00002000 */ + +#define ADC_JSQR_JSQ2_Pos (15U) +#define ADC_JSQR_JSQ2_Msk (0x1FUL << ADC_JSQR_JSQ2_Pos) /*!< 0x000F8000 */ +#define ADC_JSQR_JSQ2 ADC_JSQR_JSQ2_Msk /*!< ADC 2nd conversion in injected sequence */ +#define ADC_JSQR_JSQ2_0 (0x01UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00008000 */ +#define ADC_JSQR_JSQ2_1 (0x02UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00010000 */ +#define ADC_JSQR_JSQ2_2 (0x04UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00020000 */ +#define ADC_JSQR_JSQ2_3 (0x08UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00040000 */ +#define ADC_JSQR_JSQ2_4 (0x10UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00080000 */ + +#define ADC_JSQR_JSQ3_Pos (21U) +#define ADC_JSQR_JSQ3_Msk (0x1FUL << ADC_JSQR_JSQ3_Pos) /*!< 0x03E00000 */ +#define ADC_JSQR_JSQ3 ADC_JSQR_JSQ3_Msk /*!< ADC 3rd conversion in injected sequence */ +#define ADC_JSQR_JSQ3_0 (0x01UL << ADC_JSQR_JSQ3_Pos) /*!< 0x00200000 */ +#define ADC_JSQR_JSQ3_1 (0x02UL << ADC_JSQR_JSQ3_Pos) /*!< 0x00400000 */ +#define ADC_JSQR_JSQ3_2 (0x04UL << ADC_JSQR_JSQ3_Pos) /*!< 0x00800000 */ +#define ADC_JSQR_JSQ3_3 (0x08UL << ADC_JSQR_JSQ3_Pos) /*!< 0x01000000 */ +#define ADC_JSQR_JSQ3_4 (0x10UL << ADC_JSQR_JSQ3_Pos) /*!< 0x02000000 */ + +#define ADC_JSQR_JSQ4_Pos (27U) +#define ADC_JSQR_JSQ4_Msk (0x1FUL << ADC_JSQR_JSQ4_Pos) /*!< 0xF8000000 */ +#define ADC_JSQR_JSQ4 ADC_JSQR_JSQ4_Msk /*!< ADC 4th conversion in injected sequence */ +#define ADC_JSQR_JSQ4_0 (0x01UL << ADC_JSQR_JSQ4_Pos) /*!< 0x08000000 */ +#define ADC_JSQR_JSQ4_1 (0x02UL << ADC_JSQR_JSQ4_Pos) /*!< 0x10000000 */ +#define ADC_JSQR_JSQ4_2 (0x04UL << ADC_JSQR_JSQ4_Pos) /*!< 0x20000000 */ +#define ADC_JSQR_JSQ4_3 (0x08UL << ADC_JSQR_JSQ4_Pos) /*!< 0x40000000 */ +#define ADC_JSQR_JSQ4_4 (0x10UL << ADC_JSQR_JSQ4_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_OFR1 register ********************/ +#define ADC_OFR1_OFFSET1_Pos (0U) +#define ADC_OFR1_OFFSET1_Msk (0x3FFFFFFUL << ADC_OFR1_OFFSET1_Pos) /*!< 0x03FFFFFF */ +#define ADC_OFR1_OFFSET1 ADC_OFR1_OFFSET1_Msk /*!< ADC data offset 1 for channel programmed into bits OFFSET1_CH[4:0] */ +#define ADC_OFR1_OFFSET1_0 (0x0000001UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000001 */ +#define ADC_OFR1_OFFSET1_1 (0x0000002UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000002 */ +#define ADC_OFR1_OFFSET1_2 (0x0000004UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000004 */ +#define ADC_OFR1_OFFSET1_3 (0x0000008UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000008 */ +#define ADC_OFR1_OFFSET1_4 (0x0000010UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000010 */ +#define ADC_OFR1_OFFSET1_5 (0x0000020UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000020 */ +#define ADC_OFR1_OFFSET1_6 (0x0000040UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000040 */ +#define ADC_OFR1_OFFSET1_7 (0x0000080UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000080 */ +#define ADC_OFR1_OFFSET1_8 (0x0000100UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000100 */ +#define ADC_OFR1_OFFSET1_9 (0x0000200UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000200 */ +#define ADC_OFR1_OFFSET1_10 (0x0000400UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000400 */ +#define ADC_OFR1_OFFSET1_11 (0x0000800UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000800 */ +#define ADC_OFR1_OFFSET1_12 (0x0001000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00001000 */ +#define ADC_OFR1_OFFSET1_13 (0x0002000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00002000 */ +#define ADC_OFR1_OFFSET1_14 (0x0004000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00004000 */ +#define ADC_OFR1_OFFSET1_15 (0x0008000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00008000 */ +#define ADC_OFR1_OFFSET1_16 (0x0010000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00010000 */ +#define ADC_OFR1_OFFSET1_17 (0x0020000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00020000 */ +#define ADC_OFR1_OFFSET1_18 (0x0040000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00040000 */ +#define ADC_OFR1_OFFSET1_19 (0x0080000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00080000 */ +#define ADC_OFR1_OFFSET1_20 (0x0100000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00100000 */ +#define ADC_OFR1_OFFSET1_21 (0x0200000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00200000 */ +#define ADC_OFR1_OFFSET1_22 (0x0400000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00400000 */ +#define ADC_OFR1_OFFSET1_23 (0x0800000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00800000 */ +#define ADC_OFR1_OFFSET1_24 (0x1000000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x01000000 */ +#define ADC_OFR1_OFFSET1_25 (0x2000000UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x02000000 */ + +#define ADC_OFR1_OFFSET1_CH_Pos (26U) +#define ADC_OFR1_OFFSET1_CH_Msk (0x1FUL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR1_OFFSET1_CH ADC_OFR1_OFFSET1_CH_Msk /*!< ADC Channel selection for the data offset 1 */ +#define ADC_OFR1_OFFSET1_CH_0 (0x01UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR1_OFFSET1_CH_1 (0x02UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR1_OFFSET1_CH_2 (0x04UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR1_OFFSET1_CH_3 (0x08UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR1_OFFSET1_CH_4 (0x10UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR1_SSATE_Pos (31U) +#define ADC_OFR1_SSATE_Msk (0x1UL << ADC_OFR1_SSATE_Pos) /*!< 0x80000000 */ +#define ADC_OFR1_SSATE ADC_OFR1_SSATE_Msk /*!< ADC Signed saturation Enable */ + +#define ADC3_OFR1_OFFSET1_Pos (0U) +#define ADC3_OFR1_OFFSET1_Msk (0xFFFUL << ADC3_OFR1_OFFSET1_Pos) /*!< 0x00000FFF */ +#define ADC3_OFR1_OFFSET1 ADC3_OFR1_OFFSET1_Msk /*!< ADC data offset 1 for channel programmed into bits OFFSET1_CH[4:0] */ + +#define ADC3_OFR1_OFFSETPOS_Pos (24U) +#define ADC3_OFR1_OFFSETPOS_Msk (0x1UL << ADC3_OFR1_OFFSETPOS_Pos) /*!< 0x01000000 */ +#define ADC3_OFR1_OFFSETPOS ADC3_OFR1_OFFSETPOS_Msk /*!< ADC offset number 1 positive */ +#define ADC3_OFR1_SATEN_Pos (25U) +#define ADC3_OFR1_SATEN_Msk (0x1UL << ADC3_OFR1_SATEN_Pos) /*!< 0x02000000 */ +#define ADC3_OFR1_SATEN ADC3_OFR1_SATEN_Msk /*!< ADC offset number 1 saturation enable */ + +#define ADC3_OFR1_OFFSET1_EN_Pos (31U) +#define ADC3_OFR1_OFFSET1_EN_Msk (0x1UL << ADC3_OFR1_OFFSET1_EN_Pos) /*!< 0x80000000 */ +#define ADC3_OFR1_OFFSET1_EN ADC3_OFR1_OFFSET1_EN_Msk /*!< ADC offset number 1 enable */ + +/******************** Bit definition for ADC_OFR2 register ********************/ +#define ADC_OFR2_OFFSET2_Pos (0U) +#define ADC_OFR2_OFFSET2_Msk (0x3FFFFFFUL << ADC_OFR2_OFFSET2_Pos) /*!< 0x03FFFFFF */ +#define ADC_OFR2_OFFSET2 ADC_OFR2_OFFSET2_Msk /*!< ADC data offset 2 for channel programmed into bits OFFSET2_CH[4:0] */ +#define ADC_OFR2_OFFSET2_0 (0x0000001UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000001 */ +#define ADC_OFR2_OFFSET2_1 (0x0000002UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000002 */ +#define ADC_OFR2_OFFSET2_2 (0x0000004UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000004 */ +#define ADC_OFR2_OFFSET2_3 (0x0000008UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000008 */ +#define ADC_OFR2_OFFSET2_4 (0x0000010UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000010 */ +#define ADC_OFR2_OFFSET2_5 (0x0000020UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000020 */ +#define ADC_OFR2_OFFSET2_6 (0x0000040UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000040 */ +#define ADC_OFR2_OFFSET2_7 (0x0000080UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000080 */ +#define ADC_OFR2_OFFSET2_8 (0x0000100UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000100 */ +#define ADC_OFR2_OFFSET2_9 (0x0000200UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000200 */ +#define ADC_OFR2_OFFSET2_10 (0x0000400UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000400 */ +#define ADC_OFR2_OFFSET2_11 (0x0000800UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000800 */ +#define ADC_OFR2_OFFSET2_12 (0x0001000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00001000 */ +#define ADC_OFR2_OFFSET2_13 (0x0002000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00002000 */ +#define ADC_OFR2_OFFSET2_14 (0x0004000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00004000 */ +#define ADC_OFR2_OFFSET2_15 (0x0008000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00008000 */ +#define ADC_OFR2_OFFSET2_16 (0x0010000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00010000 */ +#define ADC_OFR2_OFFSET2_17 (0x0020000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00020000 */ +#define ADC_OFR2_OFFSET2_18 (0x0040000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00040000 */ +#define ADC_OFR2_OFFSET2_19 (0x0080000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00080000 */ +#define ADC_OFR2_OFFSET2_20 (0x0100000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00100000 */ +#define ADC_OFR2_OFFSET2_21 (0x0200000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00200000 */ +#define ADC_OFR2_OFFSET2_22 (0x0400000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00400000 */ +#define ADC_OFR2_OFFSET2_23 (0x0800000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00800000 */ +#define ADC_OFR2_OFFSET2_24 (0x1000000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x01000000 */ +#define ADC_OFR2_OFFSET2_25 (0x2000000UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x02000000 */ + +#define ADC_OFR2_OFFSET2_CH_Pos (26U) +#define ADC_OFR2_OFFSET2_CH_Msk (0x1FUL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR2_OFFSET2_CH ADC_OFR2_OFFSET2_CH_Msk /*!< ADC Channel selection for the data offset 2 */ +#define ADC_OFR2_OFFSET2_CH_0 (0x01UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR2_OFFSET2_CH_1 (0x02UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR2_OFFSET2_CH_2 (0x04UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR2_OFFSET2_CH_3 (0x08UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR2_OFFSET2_CH_4 (0x10UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR2_SSATE_Pos (31U) +#define ADC_OFR2_SSATE_Msk (0x1UL << ADC_OFR2_SSATE_Pos) /*!< 0x80000000 */ +#define ADC_OFR2_SSATE ADC_OFR2_SSATE_Msk /*!< ADC Signed saturation Enable */ + +#define ADC3_OFR2_OFFSET2_Pos (0U) +#define ADC3_OFR2_OFFSET2_Msk (0xFFFUL << ADC3_OFR2_OFFSET2_Pos) /*!< 0x00000FFF */ +#define ADC3_OFR2_OFFSET2 ADC3_OFR2_OFFSET2_Msk /*!< ADC data offset 2 for channel programmed into bits OFFSET1_CH[4:0] */ + +#define ADC3_OFR2_OFFSETPOS_Pos (24U) +#define ADC3_OFR2_OFFSETPOS_Msk (0x1UL << ADC3_OFR2_OFFSETPOS_Pos) /*!< 0x01000000 */ +#define ADC3_OFR2_OFFSETPOS ADC3_OFR2_OFFSETPOS_Msk /*!< ADC offset number 2 positive */ +#define ADC3_OFR2_SATEN_Pos (25U) +#define ADC3_OFR2_SATEN_Msk (0x1UL << ADC3_OFR2_SATEN_Pos) /*!< 0x02000000 */ +#define ADC3_OFR2_SATEN ADC3_OFR2_SATEN_Msk /*!< ADC offset number 2 saturation enable */ + +#define ADC3_OFR2_OFFSET2_EN_Pos (31U) +#define ADC3_OFR2_OFFSET2_EN_Msk (0x1UL << ADC3_OFR2_OFFSET2_EN_Pos) /*!< 0x80000000 */ +#define ADC3_OFR2_OFFSET2_EN ADC3_OFR2_OFFSET2_EN_Msk /*!< ADC offset number 2 enable */ + +/******************** Bit definition for ADC_OFR3 register ********************/ +#define ADC_OFR3_OFFSET3_Pos (0U) +#define ADC_OFR3_OFFSET3_Msk (0x3FFFFFFUL << ADC_OFR3_OFFSET3_Pos) /*!< 0x03FFFFFF */ +#define ADC_OFR3_OFFSET3 ADC_OFR3_OFFSET3_Msk /*!< ADC data offset 3 for channel programmed into bits OFFSET3_CH[4:0] */ +#define ADC_OFR3_OFFSET3_0 (0x0000001UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000001 */ +#define ADC_OFR3_OFFSET3_1 (0x0000002UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000002 */ +#define ADC_OFR3_OFFSET3_2 (0x0000004UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000004 */ +#define ADC_OFR3_OFFSET3_3 (0x0000008UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000008 */ +#define ADC_OFR3_OFFSET3_4 (0x0000010UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000010 */ +#define ADC_OFR3_OFFSET3_5 (0x0000020UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000020 */ +#define ADC_OFR3_OFFSET3_6 (0x0000040UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000040 */ +#define ADC_OFR3_OFFSET3_7 (0x0000080UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000080 */ +#define ADC_OFR3_OFFSET3_8 (0x0000100UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000100 */ +#define ADC_OFR3_OFFSET3_9 (0x0000200UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000200 */ +#define ADC_OFR3_OFFSET3_10 (0x0000400UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000400 */ +#define ADC_OFR3_OFFSET3_11 (0x0000800UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000800 */ +#define ADC_OFR3_OFFSET3_12 (0x0001000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00001000 */ +#define ADC_OFR3_OFFSET3_13 (0x0002000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00002000 */ +#define ADC_OFR3_OFFSET3_14 (0x0004000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00004000 */ +#define ADC_OFR3_OFFSET3_15 (0x0008000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00008000 */ +#define ADC_OFR3_OFFSET3_16 (0x0010000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00010000 */ +#define ADC_OFR3_OFFSET3_17 (0x0020000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00020000 */ +#define ADC_OFR3_OFFSET3_18 (0x0040000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00040000 */ +#define ADC_OFR3_OFFSET3_19 (0x0080000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00080000 */ +#define ADC_OFR3_OFFSET3_20 (0x0100000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00100000 */ +#define ADC_OFR3_OFFSET3_21 (0x0200000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00200000 */ +#define ADC_OFR3_OFFSET3_22 (0x0400000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00400000 */ +#define ADC_OFR3_OFFSET3_23 (0x0800000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00800000 */ +#define ADC_OFR3_OFFSET3_24 (0x1000000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x01000000 */ +#define ADC_OFR3_OFFSET3_25 (0x2000000UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x02000000 */ + +#define ADC_OFR3_OFFSET3_CH_Pos (26U) +#define ADC_OFR3_OFFSET3_CH_Msk (0x1FUL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR3_OFFSET3_CH ADC_OFR3_OFFSET3_CH_Msk /*!< ADC Channel selection for the data offset 3 */ +#define ADC_OFR3_OFFSET3_CH_0 (0x01UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR3_OFFSET3_CH_1 (0x02UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR3_OFFSET3_CH_2 (0x04UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR3_OFFSET3_CH_3 (0x08UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR3_OFFSET3_CH_4 (0x10UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR3_SSATE_Pos (31U) +#define ADC_OFR3_SSATE_Msk (0x1UL << ADC_OFR3_SSATE_Pos) /*!< 0x80000000 */ +#define ADC_OFR3_SSATE ADC_OFR3_SSATE_Msk /*!< ADC Signed saturation Enable */ + +#define ADC3_OFR3_OFFSET3_Pos (0U) +#define ADC3_OFR3_OFFSET3_Msk (0xFFFUL << ADC3_OFR3_OFFSET3_Pos) /*!< 0x00000FFF */ +#define ADC3_OFR3_OFFSET3 ADC3_OFR3_OFFSET3_Msk /*!< ADC data offset 3 for channel programmed into bits OFFSET1_CH[4:0] */ + +#define ADC3_OFR3_OFFSETPOS_Pos (24U) +#define ADC3_OFR3_OFFSETPOS_Msk (0x1UL << ADC3_OFR3_OFFSETPOS_Pos) /*!< 0x01000000 */ +#define ADC3_OFR3_OFFSETPOS ADC3_OFR3_OFFSETPOS_Msk /*!< ADC offset number 3 positive */ +#define ADC3_OFR3_SATEN_Pos (25U) +#define ADC3_OFR3_SATEN_Msk (0x1UL << ADC3_OFR3_SATEN_Pos) /*!< 0x02000000 */ +#define ADC3_OFR3_SATEN ADC3_OFR3_SATEN_Msk /*!< ADC offset number 3 saturation enable */ + +#define ADC3_OFR3_OFFSET3_EN_Pos (31U) +#define ADC3_OFR3_OFFSET3_EN_Msk (0x1UL << ADC3_OFR3_OFFSET3_EN_Pos) /*!< 0x80000000 */ +#define ADC3_OFR3_OFFSET3_EN ADC3_OFR3_OFFSET3_EN_Msk /*!< ADC offset number 3 enable */ + +/******************** Bit definition for ADC_OFR4 register ********************/ +#define ADC_OFR4_OFFSET4_Pos (0U) +#define ADC_OFR4_OFFSET4_Msk (0x3FFFFFFUL << ADC_OFR4_OFFSET4_Pos) /*!< 0x03FFFFFF */ +#define ADC_OFR4_OFFSET4 ADC_OFR4_OFFSET4_Msk /*!< ADC data offset 4 for channel programmed into bits OFFSET4_CH[4:0] */ +#define ADC_OFR4_OFFSET4_0 (0x0000001UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000001 */ +#define ADC_OFR4_OFFSET4_1 (0x0000002UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000002 */ +#define ADC_OFR4_OFFSET4_2 (0x0000004UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000004 */ +#define ADC_OFR4_OFFSET4_3 (0x0000008UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000008 */ +#define ADC_OFR4_OFFSET4_4 (0x0000010UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000010 */ +#define ADC_OFR4_OFFSET4_5 (0x0000020UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000020 */ +#define ADC_OFR4_OFFSET4_6 (0x0000040UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000040 */ +#define ADC_OFR4_OFFSET4_7 (0x0000080UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000080 */ +#define ADC_OFR4_OFFSET4_8 (0x0000100UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000100 */ +#define ADC_OFR4_OFFSET4_9 (0x0000200UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000200 */ +#define ADC_OFR4_OFFSET4_10 (0x0000400UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000400 */ +#define ADC_OFR4_OFFSET4_11 (0x0000800UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000800 */ +#define ADC_OFR4_OFFSET4_12 (0x0001000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00001000 */ +#define ADC_OFR4_OFFSET4_13 (0x0002000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00002000 */ +#define ADC_OFR4_OFFSET4_14 (0x0004000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00004000 */ +#define ADC_OFR4_OFFSET4_15 (0x0008000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00008000 */ +#define ADC_OFR4_OFFSET4_16 (0x0010000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00010000 */ +#define ADC_OFR4_OFFSET4_17 (0x0020000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00020000 */ +#define ADC_OFR4_OFFSET4_18 (0x0040000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00040000 */ +#define ADC_OFR4_OFFSET4_19 (0x0080000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00080000 */ +#define ADC_OFR4_OFFSET4_20 (0x0100000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00100000 */ +#define ADC_OFR4_OFFSET4_21 (0x0200000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00200000 */ +#define ADC_OFR4_OFFSET4_22 (0x0400000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00400000 */ +#define ADC_OFR4_OFFSET4_23 (0x0800000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00800000 */ +#define ADC_OFR4_OFFSET4_24 (0x1000000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x01000000 */ +#define ADC_OFR4_OFFSET4_25 (0x2000000UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x02000000 */ + +#define ADC_OFR4_OFFSET4_CH_Pos (26U) +#define ADC_OFR4_OFFSET4_CH_Msk (0x1FUL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR4_OFFSET4_CH ADC_OFR4_OFFSET4_CH_Msk /*!< ADC Channel selection for the data offset 4 */ +#define ADC_OFR4_OFFSET4_CH_0 (0x01UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR4_OFFSET4_CH_1 (0x02UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR4_OFFSET4_CH_2 (0x04UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR4_OFFSET4_CH_3 (0x08UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR4_OFFSET4_CH_4 (0x10UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR4_SSATE_Pos (31U) +#define ADC_OFR4_SSATE_Msk (0x1UL << ADC_OFR4_SSATE_Pos) /*!< 0x80000000 */ +#define ADC_OFR4_SSATE ADC_OFR4_SSATE_Msk /*!< ADC Signed saturation Enable */ + +#define ADC3_OFR4_OFFSET4_Pos (0U) +#define ADC3_OFR4_OFFSET4_Msk (0xFFFUL << ADC3_OFR4_OFFSET4_Pos) /*!< 0x00000FFF */ +#define ADC3_OFR4_OFFSET4 ADC3_OFR4_OFFSET4_Msk /*!< ADC data offset 4 for channel programmed into bits OFFSET1_CH[4:0] */ + +#define ADC3_OFR4_OFFSETPOS_Pos (24U) +#define ADC3_OFR4_OFFSETPOS_Msk (0x1UL << ADC3_OFR4_OFFSETPOS_Pos) /*!< 0x01000000 */ +#define ADC3_OFR4_OFFSETPOS ADC3_OFR4_OFFSETPOS_Msk /*!< ADC offset number 4 positive */ +#define ADC3_OFR4_SATEN_Pos (25U) +#define ADC3_OFR4_SATEN_Msk (0x1UL << ADC3_OFR4_SATEN_Pos) /*!< 0x02000000 */ +#define ADC3_OFR4_SATEN ADC3_OFR4_SATEN_Msk /*!< ADC offset number 4 saturation enable */ + +#define ADC3_OFR4_OFFSET4_EN_Pos (31U) +#define ADC3_OFR4_OFFSET4_EN_Msk (0x1UL << ADC3_OFR4_OFFSET4_EN_Pos) /*!< 0x80000000 */ +#define ADC3_OFR4_OFFSET4_EN ADC3_OFR4_OFFSET4_EN_Msk /*!< ADC offset number 4 enable */ + +/******************** Bit definition for ADC_JDR1 register ********************/ +#define ADC_JDR1_JDATA_Pos (0U) +#define ADC_JDR1_JDATA_Msk (0xFFFFFFFFUL << ADC_JDR1_JDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_JDR1_JDATA ADC_JDR1_JDATA_Msk /*!< ADC Injected DATA */ +#define ADC_JDR1_JDATA_0 (0x00000001UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR1_JDATA_1 (0x00000002UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR1_JDATA_2 (0x00000004UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR1_JDATA_3 (0x00000008UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR1_JDATA_4 (0x00000010UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR1_JDATA_5 (0x00000020UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR1_JDATA_6 (0x00000040UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR1_JDATA_7 (0x00000080UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR1_JDATA_8 (0x00000100UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR1_JDATA_9 (0x00000200UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR1_JDATA_10 (0x00000400UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR1_JDATA_11 (0x00000800UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR1_JDATA_12 (0x00001000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR1_JDATA_13 (0x00002000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR1_JDATA_14 (0x00004000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR1_JDATA_15 (0x00008000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00008000 */ +#define ADC_JDR1_JDATA_16 (0x00010000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00010000 */ +#define ADC_JDR1_JDATA_17 (0x00020000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00020000 */ +#define ADC_JDR1_JDATA_18 (0x00040000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00040000 */ +#define ADC_JDR1_JDATA_19 (0x00080000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00080000 */ +#define ADC_JDR1_JDATA_20 (0x00100000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00100000 */ +#define ADC_JDR1_JDATA_21 (0x00200000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00200000 */ +#define ADC_JDR1_JDATA_22 (0x00400000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00400000 */ +#define ADC_JDR1_JDATA_23 (0x00800000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00800000 */ +#define ADC_JDR1_JDATA_24 (0x01000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x01000000 */ +#define ADC_JDR1_JDATA_25 (0x02000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x02000000 */ +#define ADC_JDR1_JDATA_26 (0x04000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x04000000 */ +#define ADC_JDR1_JDATA_27 (0x08000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x08000000 */ +#define ADC_JDR1_JDATA_28 (0x10000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x10000000 */ +#define ADC_JDR1_JDATA_29 (0x20000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x20000000 */ +#define ADC_JDR1_JDATA_30 (0x40000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x40000000 */ +#define ADC_JDR1_JDATA_31 (0x80000000UL << ADC_JDR1_JDATA_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_JDR2 register ********************/ +#define ADC_JDR2_JDATA_Pos (0U) +#define ADC_JDR2_JDATA_Msk (0xFFFFFFFFUL << ADC_JDR2_JDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_JDR2_JDATA ADC_JDR2_JDATA_Msk /*!< ADC Injected DATA */ +#define ADC_JDR2_JDATA_0 (0x00000001UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR2_JDATA_1 (0x00000002UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR2_JDATA_2 (0x00000004UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR2_JDATA_3 (0x00000008UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR2_JDATA_4 (0x00000010UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR2_JDATA_5 (0x00000020UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR2_JDATA_6 (0x00000040UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR2_JDATA_7 (0x00000080UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR2_JDATA_8 (0x00000100UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR2_JDATA_9 (0x00000200UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR2_JDATA_10 (0x00000400UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR2_JDATA_11 (0x00000800UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR2_JDATA_12 (0x00001000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR2_JDATA_13 (0x00002000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR2_JDATA_14 (0x00004000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR2_JDATA_15 (0x00008000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00008000 */ +#define ADC_JDR2_JDATA_16 (0x00010000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00010000 */ +#define ADC_JDR2_JDATA_17 (0x00020000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00020000 */ +#define ADC_JDR2_JDATA_18 (0x00040000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00040000 */ +#define ADC_JDR2_JDATA_19 (0x00080000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00080000 */ +#define ADC_JDR2_JDATA_20 (0x00100000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00100000 */ +#define ADC_JDR2_JDATA_21 (0x00200000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00200000 */ +#define ADC_JDR2_JDATA_22 (0x00400000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00400000 */ +#define ADC_JDR2_JDATA_23 (0x00800000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00800000 */ +#define ADC_JDR2_JDATA_24 (0x01000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x01000000 */ +#define ADC_JDR2_JDATA_25 (0x02000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x02000000 */ +#define ADC_JDR2_JDATA_26 (0x04000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x04000000 */ +#define ADC_JDR2_JDATA_27 (0x08000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x08000000 */ +#define ADC_JDR2_JDATA_28 (0x10000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x10000000 */ +#define ADC_JDR2_JDATA_29 (0x20000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x20000000 */ +#define ADC_JDR2_JDATA_30 (0x40000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x40000000 */ +#define ADC_JDR2_JDATA_31 (0x80000000UL << ADC_JDR2_JDATA_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_JDR3 register ********************/ +#define ADC_JDR3_JDATA_Pos (0U) +#define ADC_JDR3_JDATA_Msk (0xFFFFFFFFUL << ADC_JDR3_JDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_JDR3_JDATA ADC_JDR3_JDATA_Msk /*!< ADC Injected DATA */ +#define ADC_JDR3_JDATA_0 (0x00000001UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR3_JDATA_1 (0x00000002UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR3_JDATA_2 (0x00000004UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR3_JDATA_3 (0x00000008UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR3_JDATA_4 (0x00000010UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR3_JDATA_5 (0x00000020UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR3_JDATA_6 (0x00000040UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR3_JDATA_7 (0x00000080UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR3_JDATA_8 (0x00000100UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR3_JDATA_9 (0x00000200UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR3_JDATA_10 (0x00000400UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR3_JDATA_11 (0x00000800UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR3_JDATA_12 (0x00001000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR3_JDATA_13 (0x00002000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR3_JDATA_14 (0x00004000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR3_JDATA_15 (0x00008000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00008000 */ +#define ADC_JDR3_JDATA_16 (0x00010000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00010000 */ +#define ADC_JDR3_JDATA_17 (0x00020000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00020000 */ +#define ADC_JDR3_JDATA_18 (0x00040000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00040000 */ +#define ADC_JDR3_JDATA_19 (0x00080000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00080000 */ +#define ADC_JDR3_JDATA_20 (0x00100000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00100000 */ +#define ADC_JDR3_JDATA_21 (0x00200000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00200000 */ +#define ADC_JDR3_JDATA_22 (0x00400000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00400000 */ +#define ADC_JDR3_JDATA_23 (0x00800000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00800000 */ +#define ADC_JDR3_JDATA_24 (0x01000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x01000000 */ +#define ADC_JDR3_JDATA_25 (0x02000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x02000000 */ +#define ADC_JDR3_JDATA_26 (0x04000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x04000000 */ +#define ADC_JDR3_JDATA_27 (0x08000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x08000000 */ +#define ADC_JDR3_JDATA_28 (0x10000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x10000000 */ +#define ADC_JDR3_JDATA_29 (0x20000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x20000000 */ +#define ADC_JDR3_JDATA_30 (0x40000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x40000000 */ +#define ADC_JDR3_JDATA_31 (0x80000000UL << ADC_JDR3_JDATA_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_JDR4 register ********************/ +#define ADC_JDR4_JDATA_Pos (0U) +#define ADC_JDR4_JDATA_Msk (0xFFFFFFFFUL << ADC_JDR4_JDATA_Pos) /*!< 0xFFFFFFFF */ +#define ADC_JDR4_JDATA ADC_JDR4_JDATA_Msk /*!< ADC Injected DATA */ +#define ADC_JDR4_JDATA_0 (0x00000001UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR4_JDATA_1 (0x00000002UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR4_JDATA_2 (0x00000004UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR4_JDATA_3 (0x00000008UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR4_JDATA_4 (0x00000010UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR4_JDATA_5 (0x00000020UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR4_JDATA_6 (0x00000040UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR4_JDATA_7 (0x00000080UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR4_JDATA_8 (0x00000100UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR4_JDATA_9 (0x00000200UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR4_JDATA_10 (0x00000400UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR4_JDATA_11 (0x00000800UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR4_JDATA_12 (0x00001000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR4_JDATA_13 (0x00002000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR4_JDATA_14 (0x00004000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR4_JDATA_15 (0x00008000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00008000 */ +#define ADC_JDR4_JDATA_16 (0x00010000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00010000 */ +#define ADC_JDR4_JDATA_17 (0x00020000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00020000 */ +#define ADC_JDR4_JDATA_18 (0x00040000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00040000 */ +#define ADC_JDR4_JDATA_19 (0x00080000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00080000 */ +#define ADC_JDR4_JDATA_20 (0x00100000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00100000 */ +#define ADC_JDR4_JDATA_21 (0x00200000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00200000 */ +#define ADC_JDR4_JDATA_22 (0x00400000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00400000 */ +#define ADC_JDR4_JDATA_23 (0x00800000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00800000 */ +#define ADC_JDR4_JDATA_24 (0x01000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x01000000 */ +#define ADC_JDR4_JDATA_25 (0x02000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x02000000 */ +#define ADC_JDR4_JDATA_26 (0x04000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x04000000 */ +#define ADC_JDR4_JDATA_27 (0x08000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x08000000 */ +#define ADC_JDR4_JDATA_28 (0x10000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x10000000 */ +#define ADC_JDR4_JDATA_29 (0x20000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x20000000 */ +#define ADC_JDR4_JDATA_30 (0x40000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x40000000 */ +#define ADC_JDR4_JDATA_31 (0x80000000UL << ADC_JDR4_JDATA_Pos) /*!< 0x80000000 */ + +/******************** Bit definition for ADC_AWD2CR register ********************/ +#define ADC_AWD2CR_AWD2CH_Pos (0U) +#define ADC_AWD2CR_AWD2CH_Msk (0xFFFFFUL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x000FFFFF */ +#define ADC_AWD2CR_AWD2CH ADC_AWD2CR_AWD2CH_Msk /*!< ADC Analog watchdog 2 channel selection */ +#define ADC_AWD2CR_AWD2CH_0 (0x00001UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000001 */ +#define ADC_AWD2CR_AWD2CH_1 (0x00002UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000002 */ +#define ADC_AWD2CR_AWD2CH_2 (0x00004UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000004 */ +#define ADC_AWD2CR_AWD2CH_3 (0x00008UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000008 */ +#define ADC_AWD2CR_AWD2CH_4 (0x00010UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000010 */ +#define ADC_AWD2CR_AWD2CH_5 (0x00020UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000020 */ +#define ADC_AWD2CR_AWD2CH_6 (0x00040UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000040 */ +#define ADC_AWD2CR_AWD2CH_7 (0x00080UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000080 */ +#define ADC_AWD2CR_AWD2CH_8 (0x00100UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000100 */ +#define ADC_AWD2CR_AWD2CH_9 (0x00200UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000200 */ +#define ADC_AWD2CR_AWD2CH_10 (0x00400UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000400 */ +#define ADC_AWD2CR_AWD2CH_11 (0x00800UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000800 */ +#define ADC_AWD2CR_AWD2CH_12 (0x01000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00001000 */ +#define ADC_AWD2CR_AWD2CH_13 (0x02000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00002000 */ +#define ADC_AWD2CR_AWD2CH_14 (0x04000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00004000 */ +#define ADC_AWD2CR_AWD2CH_15 (0x08000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00008000 */ +#define ADC_AWD2CR_AWD2CH_16 (0x10000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00010000 */ +#define ADC_AWD2CR_AWD2CH_17 (0x20000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00020000 */ +#define ADC_AWD2CR_AWD2CH_18 (0x40000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00040000 */ +#define ADC_AWD2CR_AWD2CH_19 (0x80000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00080000 */ + +/******************** Bit definition for ADC_AWD3CR register ********************/ +#define ADC_AWD3CR_AWD3CH_Pos (0U) +#define ADC_AWD3CR_AWD3CH_Msk (0xFFFFFUL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x000FFFFF */ +#define ADC_AWD3CR_AWD3CH ADC_AWD3CR_AWD3CH_Msk /*!< ADC Analog watchdog 2 channel selection */ +#define ADC_AWD3CR_AWD3CH_0 (0x00001UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000001 */ +#define ADC_AWD3CR_AWD3CH_1 (0x00002UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000002 */ +#define ADC_AWD3CR_AWD3CH_2 (0x00004UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000004 */ +#define ADC_AWD3CR_AWD3CH_3 (0x00008UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000008 */ +#define ADC_AWD3CR_AWD3CH_4 (0x00010UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000010 */ +#define ADC_AWD3CR_AWD3CH_5 (0x00020UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000020 */ +#define ADC_AWD3CR_AWD3CH_6 (0x00040UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000040 */ +#define ADC_AWD3CR_AWD3CH_7 (0x00080UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000080 */ +#define ADC_AWD3CR_AWD3CH_8 (0x00100UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000100 */ +#define ADC_AWD3CR_AWD3CH_9 (0x00200UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000200 */ +#define ADC_AWD3CR_AWD3CH_10 (0x00400UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000400 */ +#define ADC_AWD3CR_AWD3CH_11 (0x00800UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000800 */ +#define ADC_AWD3CR_AWD3CH_12 (0x01000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00001000 */ +#define ADC_AWD3CR_AWD3CH_13 (0x02000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00002000 */ +#define ADC_AWD3CR_AWD3CH_14 (0x04000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00004000 */ +#define ADC_AWD3CR_AWD3CH_15 (0x08000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00008000 */ +#define ADC_AWD3CR_AWD3CH_16 (0x10000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00010000 */ +#define ADC_AWD3CR_AWD3CH_17 (0x20000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00020000 */ +#define ADC_AWD3CR_AWD3CH_18 (0x40000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00040000 */ +#define ADC_AWD3CR_AWD3CH_19 (0x80000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00080000 */ + +/******************** Bit definition for ADC_DIFSEL register ********************/ +#define ADC_DIFSEL_DIFSEL_Pos (0U) +#define ADC_DIFSEL_DIFSEL_Msk (0xFFFFFUL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x000FFFFF */ +#define ADC_DIFSEL_DIFSEL ADC_DIFSEL_DIFSEL_Msk /*!< ADC differential modes for channels 1 to 18 */ +#define ADC_DIFSEL_DIFSEL_0 (0x00001UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000001 */ +#define ADC_DIFSEL_DIFSEL_1 (0x00002UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000002 */ +#define ADC_DIFSEL_DIFSEL_2 (0x00004UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000004 */ +#define ADC_DIFSEL_DIFSEL_3 (0x00008UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000008 */ +#define ADC_DIFSEL_DIFSEL_4 (0x00010UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000010 */ +#define ADC_DIFSEL_DIFSEL_5 (0x00020UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000020 */ +#define ADC_DIFSEL_DIFSEL_6 (0x00040UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000040 */ +#define ADC_DIFSEL_DIFSEL_7 (0x00080UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000080 */ +#define ADC_DIFSEL_DIFSEL_8 (0x00100UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000100 */ +#define ADC_DIFSEL_DIFSEL_9 (0x00200UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000200 */ +#define ADC_DIFSEL_DIFSEL_10 (0x00400UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000400 */ +#define ADC_DIFSEL_DIFSEL_11 (0x00800UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000800 */ +#define ADC_DIFSEL_DIFSEL_12 (0x01000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00001000 */ +#define ADC_DIFSEL_DIFSEL_13 (0x02000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00002000 */ +#define ADC_DIFSEL_DIFSEL_14 (0x04000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00004000 */ +#define ADC_DIFSEL_DIFSEL_15 (0x08000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00008000 */ +#define ADC_DIFSEL_DIFSEL_16 (0x10000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00010000 */ +#define ADC_DIFSEL_DIFSEL_17 (0x20000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00020000 */ +#define ADC_DIFSEL_DIFSEL_18 (0x40000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00040000 */ +#define ADC_DIFSEL_DIFSEL_19 (0x80000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00080000 */ + +/******************** Bit definition for ADC_CALFACT register ********************/ +#define ADC_CALFACT_CALFACT_S_Pos (0U) +#define ADC_CALFACT_CALFACT_S_Msk (0x7FFUL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x000007FF */ +#define ADC_CALFACT_CALFACT_S ADC_CALFACT_CALFACT_S_Msk /*!< ADC calibration factors in single-ended mode */ +#define ADC_CALFACT_CALFACT_S_0 (0x001UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000001 */ +#define ADC_CALFACT_CALFACT_S_1 (0x002UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000002 */ +#define ADC_CALFACT_CALFACT_S_2 (0x004UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000004 */ +#define ADC_CALFACT_CALFACT_S_3 (0x008UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000008 */ +#define ADC_CALFACT_CALFACT_S_4 (0x010UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000010 */ +#define ADC_CALFACT_CALFACT_S_5 (0x020UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000020 */ +#define ADC_CALFACT_CALFACT_S_6 (0x040UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000040 */ +#define ADC_CALFACT_CALFACT_S_7 (0x080UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000080 */ +#define ADC_CALFACT_CALFACT_S_8 (0x100UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000100 */ +#define ADC_CALFACT_CALFACT_S_9 (0x200UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000200 */ +#define ADC_CALFACT_CALFACT_S_10 (0x400UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000400 */ +#define ADC_CALFACT_CALFACT_D_Pos (16U) +#define ADC_CALFACT_CALFACT_D_Msk (0x7FFUL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x07FF0000 */ +#define ADC_CALFACT_CALFACT_D ADC_CALFACT_CALFACT_D_Msk /*!< ADC calibration factors in differential mode */ +#define ADC_CALFACT_CALFACT_D_0 (0x001UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00010000 */ +#define ADC_CALFACT_CALFACT_D_1 (0x002UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00020000 */ +#define ADC_CALFACT_CALFACT_D_2 (0x004UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00040000 */ +#define ADC_CALFACT_CALFACT_D_3 (0x008UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00080000 */ +#define ADC_CALFACT_CALFACT_D_4 (0x010UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00100000 */ +#define ADC_CALFACT_CALFACT_D_5 (0x020UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00200000 */ +#define ADC_CALFACT_CALFACT_D_6 (0x040UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00400000 */ +#define ADC_CALFACT_CALFACT_D_7 (0x080UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00800000 */ +#define ADC_CALFACT_CALFACT_D_8 (0x100UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x01000000 */ +#define ADC_CALFACT_CALFACT_D_9 (0x200UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x02000000 */ +#define ADC_CALFACT_CALFACT_D_10 (0x400UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x04000000 */ + +/******************** Bit definition for ADC_CALFACT2 register ********************/ +#define ADC_CALFACT2_LINCALFACT_Pos (0U) +#define ADC_CALFACT2_LINCALFACT_Msk (0x3FFFFFFFUL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x3FFFFFFF */ +#define ADC_CALFACT2_LINCALFACT ADC_CALFACT2_LINCALFACT_Msk /*!< ADC Linearity calibration factors */ +#define ADC_CALFACT2_LINCALFACT_0 (0x00000001UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000001 */ +#define ADC_CALFACT2_LINCALFACT_1 (0x00000002UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000002 */ +#define ADC_CALFACT2_LINCALFACT_2 (0x00000004UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000004 */ +#define ADC_CALFACT2_LINCALFACT_3 (0x00000008UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000008 */ +#define ADC_CALFACT2_LINCALFACT_4 (0x00000010UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000010 */ +#define ADC_CALFACT2_LINCALFACT_5 (0x00000020UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000020 */ +#define ADC_CALFACT2_LINCALFACT_6 (0x00000040UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000040 */ +#define ADC_CALFACT2_LINCALFACT_7 (0x00000080UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000080 */ +#define ADC_CALFACT2_LINCALFACT_8 (0x00000100UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000100 */ +#define ADC_CALFACT2_LINCALFACT_9 (0x00000200UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000200 */ +#define ADC_CALFACT2_LINCALFACT_10 (0x00000400UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000400 */ +#define ADC_CALFACT2_LINCALFACT_11 (0x00000800UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00000800 */ +#define ADC_CALFACT2_LINCALFACT_12 (0x00001000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00001000 */ +#define ADC_CALFACT2_LINCALFACT_13 (0x00002000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00002000 */ +#define ADC_CALFACT2_LINCALFACT_14 (0x00004000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00004000 */ +#define ADC_CALFACT2_LINCALFACT_15 (0x00008000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00008000 */ +#define ADC_CALFACT2_LINCALFACT_16 (0x00010000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00010000 */ +#define ADC_CALFACT2_LINCALFACT_17 (0x00020000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00020000 */ +#define ADC_CALFACT2_LINCALFACT_18 (0x00040000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00040000 */ +#define ADC_CALFACT2_LINCALFACT_19 (0x00080000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00080000 */ +#define ADC_CALFACT2_LINCALFACT_20 (0x00100000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00100000 */ +#define ADC_CALFACT2_LINCALFACT_21 (0x00200000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00200000 */ +#define ADC_CALFACT2_LINCALFACT_22 (0x00400000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00400000 */ +#define ADC_CALFACT2_LINCALFACT_23 (0x00800000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x00800000 */ +#define ADC_CALFACT2_LINCALFACT_24 (0x01000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x01000000 */ +#define ADC_CALFACT2_LINCALFACT_25 (0x02000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x02000000 */ +#define ADC_CALFACT2_LINCALFACT_26 (0x04000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x04000000 */ +#define ADC_CALFACT2_LINCALFACT_27 (0x08000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x08000000 */ +#define ADC_CALFACT2_LINCALFACT_28 (0x10000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x10000000 */ +#define ADC_CALFACT2_LINCALFACT_29 (0x20000000UL << ADC_CALFACT2_LINCALFACT_Pos) /*!< 0x20000000 */ + +/************************* ADC Common registers *****************************/ +/******************** Bit definition for ADC_CSR register ********************/ +#define ADC_CSR_ADRDY_MST_Pos (0U) +#define ADC_CSR_ADRDY_MST_Msk (0x1UL << ADC_CSR_ADRDY_MST_Pos) /*!< 0x00000001 */ +#define ADC_CSR_ADRDY_MST ADC_CSR_ADRDY_MST_Msk /*!< Master ADC ready */ +#define ADC_CSR_EOSMP_MST_Pos (1U) +#define ADC_CSR_EOSMP_MST_Msk (0x1UL << ADC_CSR_EOSMP_MST_Pos) /*!< 0x00000002 */ +#define ADC_CSR_EOSMP_MST ADC_CSR_EOSMP_MST_Msk /*!< End of sampling phase flag of the master ADC */ +#define ADC_CSR_EOC_MST_Pos (2U) +#define ADC_CSR_EOC_MST_Msk (0x1UL << ADC_CSR_EOC_MST_Pos) /*!< 0x00000004 */ +#define ADC_CSR_EOC_MST ADC_CSR_EOC_MST_Msk /*!< End of regular conversion of the master ADC */ +#define ADC_CSR_EOS_MST_Pos (3U) +#define ADC_CSR_EOS_MST_Msk (0x1UL << ADC_CSR_EOS_MST_Pos) /*!< 0x00000008 */ +#define ADC_CSR_EOS_MST ADC_CSR_EOS_MST_Msk /*!< End of regular sequence flag of the master ADC */ +#define ADC_CSR_OVR_MST_Pos (4U) +#define ADC_CSR_OVR_MST_Msk (0x1UL << ADC_CSR_OVR_MST_Pos) /*!< 0x00000010 */ +#define ADC_CSR_OVR_MST ADC_CSR_OVR_MST_Msk /*!< Overrun flag of the master ADC */ +#define ADC_CSR_JEOC_MST_Pos (5U) +#define ADC_CSR_JEOC_MST_Msk (0x1UL << ADC_CSR_JEOC_MST_Pos) /*!< 0x00000020 */ +#define ADC_CSR_JEOC_MST ADC_CSR_JEOC_MST_Msk /*!< End of injected conversion of the master ADC */ +#define ADC_CSR_JEOS_MST_Pos (6U) +#define ADC_CSR_JEOS_MST_Msk (0x1UL << ADC_CSR_JEOS_MST_Pos) /*!< 0x00000040 */ +#define ADC_CSR_JEOS_MST ADC_CSR_JEOS_MST_Msk /*!< End of injected sequence flag of the master ADC */ +#define ADC_CSR_AWD1_MST_Pos (7U) +#define ADC_CSR_AWD1_MST_Msk (0x1UL << ADC_CSR_AWD1_MST_Pos) /*!< 0x00000080 */ +#define ADC_CSR_AWD1_MST ADC_CSR_AWD1_MST_Msk /*!< Analog watchdog 1 flag of the master ADC */ +#define ADC_CSR_AWD2_MST_Pos (8U) +#define ADC_CSR_AWD2_MST_Msk (0x1UL << ADC_CSR_AWD2_MST_Pos) /*!< 0x00000100 */ +#define ADC_CSR_AWD2_MST ADC_CSR_AWD2_MST_Msk /*!< Analog watchdog 2 flag of the master ADC */ +#define ADC_CSR_AWD3_MST_Pos (9U) +#define ADC_CSR_AWD3_MST_Msk (0x1UL << ADC_CSR_AWD3_MST_Pos) /*!< 0x00000200 */ +#define ADC_CSR_AWD3_MST ADC_CSR_AWD3_MST_Msk /*!< Analog watchdog 3 flag of the master ADC */ +#define ADC_CSR_JQOVF_MST_Pos (10U) +#define ADC_CSR_JQOVF_MST_Msk (0x1UL << ADC_CSR_JQOVF_MST_Pos) /*!< 0x00000400 */ +#define ADC_CSR_JQOVF_MST ADC_CSR_JQOVF_MST_Msk /*!< Injected context queue overflow flag of the master ADC */ +#define ADC_CSR_ADRDY_SLV_Pos (16U) +#define ADC_CSR_ADRDY_SLV_Msk (0x1UL << ADC_CSR_ADRDY_SLV_Pos) /*!< 0x00010000 */ +#define ADC_CSR_ADRDY_SLV ADC_CSR_ADRDY_SLV_Msk /*!< Slave ADC ready */ +#define ADC_CSR_EOSMP_SLV_Pos (17U) +#define ADC_CSR_EOSMP_SLV_Msk (0x1UL << ADC_CSR_EOSMP_SLV_Pos) /*!< 0x00020000 */ +#define ADC_CSR_EOSMP_SLV ADC_CSR_EOSMP_SLV_Msk /*!< End of sampling phase flag of the slave ADC */ +#define ADC_CSR_EOC_SLV_Pos (18U) +#define ADC_CSR_EOC_SLV_Msk (0x1UL << ADC_CSR_EOC_SLV_Pos) /*!< 0x00040000 */ +#define ADC_CSR_EOC_SLV ADC_CSR_EOC_SLV_Msk /*!< End of regular conversion of the slave ADC */ +#define ADC_CSR_EOS_SLV_Pos (19U) +#define ADC_CSR_EOS_SLV_Msk (0x1UL << ADC_CSR_EOS_SLV_Pos) /*!< 0x00080000 */ +#define ADC_CSR_EOS_SLV ADC_CSR_EOS_SLV_Msk /*!< End of regular sequence flag of the slave ADC */ +#define ADC_CSR_OVR_SLV_Pos (20U) +#define ADC_CSR_OVR_SLV_Msk (0x1UL << ADC_CSR_OVR_SLV_Pos) /*!< 0x00100000 */ +#define ADC_CSR_OVR_SLV ADC_CSR_OVR_SLV_Msk /*!< Overrun flag of the slave ADC */ +#define ADC_CSR_JEOC_SLV_Pos (21U) +#define ADC_CSR_JEOC_SLV_Msk (0x1UL << ADC_CSR_JEOC_SLV_Pos) /*!< 0x00200000 */ +#define ADC_CSR_JEOC_SLV ADC_CSR_JEOC_SLV_Msk /*!< End of injected conversion of the slave ADC */ +#define ADC_CSR_JEOS_SLV_Pos (22U) +#define ADC_CSR_JEOS_SLV_Msk (0x1UL << ADC_CSR_JEOS_SLV_Pos) /*!< 0x00400000 */ +#define ADC_CSR_JEOS_SLV ADC_CSR_JEOS_SLV_Msk /*!< End of injected sequence flag of the slave ADC */ +#define ADC_CSR_AWD1_SLV_Pos (23U) +#define ADC_CSR_AWD1_SLV_Msk (0x1UL << ADC_CSR_AWD1_SLV_Pos) /*!< 0x00800000 */ +#define ADC_CSR_AWD1_SLV ADC_CSR_AWD1_SLV_Msk /*!< Analog watchdog 1 flag of the slave ADC */ +#define ADC_CSR_AWD2_SLV_Pos (24U) +#define ADC_CSR_AWD2_SLV_Msk (0x1UL << ADC_CSR_AWD2_SLV_Pos) /*!< 0x01000000 */ +#define ADC_CSR_AWD2_SLV ADC_CSR_AWD2_SLV_Msk /*!< Analog watchdog 2 flag of the slave ADC */ +#define ADC_CSR_AWD3_SLV_Pos (25U) +#define ADC_CSR_AWD3_SLV_Msk (0x1UL << ADC_CSR_AWD3_SLV_Pos) /*!< 0x02000000 */ +#define ADC_CSR_AWD3_SLV ADC_CSR_AWD3_SLV_Msk /*!< Analog watchdog 3 flag of the slave ADC */ +#define ADC_CSR_JQOVF_SLV_Pos (26U) +#define ADC_CSR_JQOVF_SLV_Msk (0x1UL << ADC_CSR_JQOVF_SLV_Pos) /*!< 0x04000000 */ +#define ADC_CSR_JQOVF_SLV ADC_CSR_JQOVF_SLV_Msk /*!< Injected context queue overflow flag of the slave ADC */ + +/******************** Bit definition for ADC_CCR register ********************/ +#define ADC_CCR_DUAL_Pos (0U) +#define ADC_CCR_DUAL_Msk (0x1FUL << ADC_CCR_DUAL_Pos) /*!< 0x0000001F */ +#define ADC_CCR_DUAL ADC_CCR_DUAL_Msk /*!< Dual ADC mode selection */ +#define ADC_CCR_DUAL_0 (0x01UL << ADC_CCR_DUAL_Pos) /*!< 0x00000001 */ +#define ADC_CCR_DUAL_1 (0x02UL << ADC_CCR_DUAL_Pos) /*!< 0x00000002 */ +#define ADC_CCR_DUAL_2 (0x04UL << ADC_CCR_DUAL_Pos) /*!< 0x00000004 */ +#define ADC_CCR_DUAL_3 (0x08UL << ADC_CCR_DUAL_Pos) /*!< 0x00000008 */ +#define ADC_CCR_DUAL_4 (0x10UL << ADC_CCR_DUAL_Pos) /*!< 0x00000010 */ + +#define ADC_CCR_DELAY_Pos (8U) +#define ADC_CCR_DELAY_Msk (0xFUL << ADC_CCR_DELAY_Pos) /*!< 0x00000F00 */ +#define ADC_CCR_DELAY ADC_CCR_DELAY_Msk /*!< Delay between 2 sampling phases */ +#define ADC_CCR_DELAY_0 (0x1UL << ADC_CCR_DELAY_Pos) /*!< 0x00000100 */ +#define ADC_CCR_DELAY_1 (0x2UL << ADC_CCR_DELAY_Pos) /*!< 0x00000200 */ +#define ADC_CCR_DELAY_2 (0x4UL << ADC_CCR_DELAY_Pos) /*!< 0x00000400 */ +#define ADC_CCR_DELAY_3 (0x8UL << ADC_CCR_DELAY_Pos) /*!< 0x00000800 */ + + +#define ADC_CCR_DAMDF_Pos (14U) +#define ADC_CCR_DAMDF_Msk (0x3UL << ADC_CCR_DAMDF_Pos) /*!< 0x0000C000 */ +#define ADC_CCR_DAMDF ADC_CCR_DAMDF_Msk /*!< Dual ADC mode Data format */ +#define ADC_CCR_DAMDF_0 (0x1UL << ADC_CCR_DAMDF_Pos) /*!< 0x00004000 */ +#define ADC_CCR_DAMDF_1 (0x2UL << ADC_CCR_DAMDF_Pos) /*!< 0x00008000 */ + +#define ADC_CCR_CKMODE_Pos (16U) +#define ADC_CCR_CKMODE_Msk (0x3UL << ADC_CCR_CKMODE_Pos) /*!< 0x00030000 */ +#define ADC_CCR_CKMODE ADC_CCR_CKMODE_Msk /*!< ADC clock mode */ +#define ADC_CCR_CKMODE_0 (0x1UL << ADC_CCR_CKMODE_Pos) /*!< 0x00010000 */ +#define ADC_CCR_CKMODE_1 (0x2UL << ADC_CCR_CKMODE_Pos) /*!< 0x00020000 */ + +#define ADC_CCR_PRESC_Pos (18U) +#define ADC_CCR_PRESC_Msk (0xFUL << ADC_CCR_PRESC_Pos) /*!< 0x003C0000 */ +#define ADC_CCR_PRESC ADC_CCR_PRESC_Msk /*!< ADC prescaler */ +#define ADC_CCR_PRESC_0 (0x1UL << ADC_CCR_PRESC_Pos) /*!< 0x00040000 */ +#define ADC_CCR_PRESC_1 (0x2UL << ADC_CCR_PRESC_Pos) /*!< 0x00080000 */ +#define ADC_CCR_PRESC_2 (0x4UL << ADC_CCR_PRESC_Pos) /*!< 0x00100000 */ +#define ADC_CCR_PRESC_3 (0x8UL << ADC_CCR_PRESC_Pos) /*!< 0x00200000 */ + +#define ADC_CCR_VREFEN_Pos (22U) +#define ADC_CCR_VREFEN_Msk (0x1UL << ADC_CCR_VREFEN_Pos) /*!< 0x00400000 */ +#define ADC_CCR_VREFEN ADC_CCR_VREFEN_Msk /*!< VREFINT enable */ +#define ADC_CCR_TSEN_Pos (23U) +#define ADC_CCR_TSEN_Msk (0x1UL << ADC_CCR_TSEN_Pos) /*!< 0x00800000 */ +#define ADC_CCR_TSEN ADC_CCR_TSEN_Msk /*!< Temperature sensor enable */ +#define ADC_CCR_VBATEN_Pos (24U) +#define ADC_CCR_VBATEN_Msk (0x1UL << ADC_CCR_VBATEN_Pos) /*!< 0x01000000 */ +#define ADC_CCR_VBATEN ADC_CCR_VBATEN_Msk /*!< VBAT enable */ + +/******************** Bit definition for ADC_CDR register *******************/ +#define ADC_CDR_RDATA_MST_Pos (0U) +#define ADC_CDR_RDATA_MST_Msk (0xFFFFUL << ADC_CDR_RDATA_MST_Pos) /*!< 0x0000FFFF */ +#define ADC_CDR_RDATA_MST ADC_CDR_RDATA_MST_Msk /*!< ADC multimode master group regular conversion data */ + +#define ADC_CDR_RDATA_SLV_Pos (16U) +#define ADC_CDR_RDATA_SLV_Msk (0xFFFFUL << ADC_CDR_RDATA_SLV_Pos) /*!< 0xFFFF0000 */ +#define ADC_CDR_RDATA_SLV ADC_CDR_RDATA_SLV_Msk /*!< ADC multimode slave group regular conversion data */ + +/******************** Bit definition for ADC_CDR2 register ******************/ +#define ADC_CDR2_RDATA_ALT_Pos (0U) +#define ADC_CDR2_RDATA_ALT_Msk (0xFFFFFFFFUL << ADC_CDR2_RDATA_ALT_Pos) /*!< 0xFFFFFFFF */ +#define ADC_CDR2_RDATA_ALT ADC_CDR2_RDATA_ALT_Msk /*!< Regular data of the master/slave alternated ADCs */ + + +/******************************************************************************/ +/* */ +/* VREFBUF */ +/* */ +/******************************************************************************/ +/******************* Bit definition for VREFBUF_CSR register ****************/ +#define VREFBUF_CSR_ENVR_Pos (0U) +#define VREFBUF_CSR_ENVR_Msk (0x1UL << VREFBUF_CSR_ENVR_Pos) /*!< 0x00000001 */ +#define VREFBUF_CSR_ENVR VREFBUF_CSR_ENVR_Msk /*!*/ +#define DAC_CR_CEN1_Pos (14U) +#define DAC_CR_CEN1_Msk (0x1UL << DAC_CR_CEN1_Pos) /*!< 0x00004000 */ +#define DAC_CR_CEN1 DAC_CR_CEN1_Msk /*!*/ + +#define DAC_CR_EN2_Pos (16U) +#define DAC_CR_EN2_Msk (0x1UL << DAC_CR_EN2_Pos) /*!< 0x00010000 */ +#define DAC_CR_EN2 DAC_CR_EN2_Msk /*!*/ +#define DAC_CR_CEN2_Pos (30U) +#define DAC_CR_CEN2_Msk (0x1UL << DAC_CR_CEN2_Pos) /*!< 0x40000000 */ +#define DAC_CR_CEN2 DAC_CR_CEN2_Msk /*!*/ + +/***************** Bit definition for DAC_SWTRIGR register ******************/ +#define DAC_SWTRIGR_SWTRIG1_Pos (0U) +#define DAC_SWTRIGR_SWTRIG1_Msk (0x1UL << DAC_SWTRIGR_SWTRIG1_Pos) /*!< 0x00000001 */ +#define DAC_SWTRIGR_SWTRIG1 DAC_SWTRIGR_SWTRIG1_Msk /*! - + @@ -25,7 +25,7 @@

Release Notes for STM32H7xx CMSIS

Copyright © 2017 STMicroelectronics

- + @@ -38,10 +38,119 @@ This software component is licensed by ST under BSD 3-Clause license, the “Lic

Update History

- +

Main Changes

    +
  • Add support of stm32h723xx, stm32h725xx, stm32h733xx, stm32h735xx, stm32h730xx and stm32h730xxQ devices: +
      +
    • Add “stm32h723xx.h” , “stm32h725xx.h”, “stm32h733xx.h”, “stm32h735xx.h”, “stm32h730xx.h” and “stm32h730xxq.h” files
    • +
    • Add startup files “startup_stm32h723xx.s”, “startup_stm32h725xx.s”, “startup_stm32h733xx.s”, “startup_stm32h735xx.s”, “startup_stm32h730xx.s” and “startup_stm32h730xxq.s” for EWARM , MDK-ARM and GCC toolchains
    • +
    • Add part numbers list to stm32h7xx.h header file: +
        +
      • STM32H723xx: STM32H723VGH6, STM32H723VGT6, STM32H723ZGI6, STM32H723ZGT6, STM32H723VET6, STM32H723VEH6, STM32H723ZET6, STM32H723ZEI6 Devices
      • +
      • STM32H725xx: STM32H725AGI6, STM32H725IGK6, STM32H725IGT6, STM32H725RGV6, STM32H725VGT6, STM32H725VGY6, STM32H725ZGT6, STM32H725REV6, SM32H725VET6, STM32H725ZET6, STM32H725AEI6, STM32H725IET6, STM32H725IEK6 Devices
      • +
      • STM32H733xx: STM32H733VGH6, STM32H733VGT6, STM32H733ZGI6, STM32H733ZGT6, Devices
      • +
      • STM32H735xx: STM32H735AGI6, STM32H735IGK6, STM32H735RGV6, STM32H735VGT6, STM32H735VGY6, STM32H735ZGT6 Devices
      • +
      • STM32H730xx: STM32H730VBH6, STM32H730VBT6, STM32H730ZBT6, STM32H730ZBI6 Devices
      • +
      • STM32H730xxQ: STM32H730IBT6Q, STM32H730ABI6Q, STM32H730IBK6Q Devices

      • +
      • Add EWARM STM32H723xx, STM32H725xx, STM32H733xx, STM32H735xx, STM32H730xx and STM32H730xxQ devices linker files (1MB flash) for EWARM toolchain
      • +
      • Add EWARM STM32H723xE and STM32H725xE devices linker files (Subset 512KB flash) for EWARM toolchain

      • +
    • +
    • Note : stm32h730xx and stm32h730xxQ are Value line devices with 128KB flash:
    • +
  • +
  • Update STM32H7 devices header files: +
      +
    • Fix FDCAN_ECR_TEC_Msk definition (8 bits bit field instead of 4)
    • +
    • Fix IS_SMBUS_INSTANCE macro definition with the right instances list for each STM32H7 line
    • +
  • +
  • Update system_stm32h7xx.c, system_stm32h7xx_dualcore_boot_cm4_cm7.c, system_stm32h7xx_dualcore_bootcm4_cm7gated.c, system_stm32h7xx_dualcore_bootcm7_cm4gated.c and system_stm32h7xx_singlecore.c files to: +
      +
    • Add Flash latency settings depending of the previous CPU frequency (Increasing or decreasing the CPU frequency)
      +
    • +
    • Fix RCC registers reset values settings
    • +
    • Disable the FMC bank1 (enabled after reset) +
        +
      • This prevents CPU speculation access on this bank which blocks the use of FMC during 24us. During this time the others FMC master (such as LTDC) cannot use it
        +
      • +
    • +
  • +
  • Update system_stm32h7xx.c, system_stm32h7xx_dualcore_boot_cm4_cm7.c, system_stm32h7xx_dualcore_bootcm4_cm7gated.c and system_stm32h7xx_dualcore_bootcm7_cm4gated.c to: +
      +
    • Use D2_AXISRAM_BASE for Coretx-M4 VTOR when executing from RAM instead of D2_AHBSRAM_BASE +
        +
      • Note: both addresses are aliases to the same D2 domain physical RAM. D2_AXISRAM_BASE (@0x10000000) gives access to the RAM with access using Instruction bus (I), where D2_AHBSRAM_BASE(@0x30000000) gives access to the RAM with access using Data bus. thus when executing from this D2 RAM it is recommended to use D2_AXISRAM_BASE alias so the execution scheme respects the Harvard architecture (One bus for data and one bus for instructions).
      • +
    • +
  • +
  • Update system_stm32h7xx.c and system_stm32h7xx_dualcore_boot_cm4_cm7.c to: +
      +
    • Fix usage of SCB->SCR register: SEVONPEND enabled so that an interrupt generated by the other CPU triggers an event and wakes up the current CPU after a WFI/WFE instruction even if the interrupt is disabled
    • +
  • +
  • Add EWARM, linker files for STM32H742xG and STM32H743xG devices coming with 1MB flash: 512KB for each bank
  • +
  • Add EWARM, MDK-ARM and GCC linker files for STM32H745xG and STM32H747xG devices coming with 1MB flash: 512KB for each bank

  • +
  • Update GCC startup files for all devices to align sequence to EWARM/MDK-ARM by calling “SystemInit” prior to any memory access +
      +
    • Allowing to avoid issues when using external memories
    • +
  • +
+
+
+
+ +
+

Main Changes

+
    +
  • General updates to align Bits and registers definitions with the STM32H7 reference manual
  • +
  • Update “ErrorStatus” enumeration definition in stm32h7xx.h file with SUCCESS set to numerical value zero
  • +
  • Add definition of DMA_SxCR_TRBUFF bit field of DMA SxCR register allowing to enabled/disable bufferable transfers
  • +
  • Remove RCC_AHB2ENR_CRYPEN/RCC_AHB2RSTR_CRYPRST/RCC_AHB2LPENR_CRYPLPEN and RCC_AHB2ENR_HASHEN/RCC_AHB2RSTR_HASHRST/RCC_AHB2LPENR_HASHLPEN from H7 devices that doesn’t support CRYP/HASH (STM32H742/43/45/47/A3)
  • +
  • Add STM32H7_DEV_ID define allowing to identify the H7 Device ID
  • +
  • Update OCTOSPIM_TypeDef structure definition with 3 PCR registers instead of 8 (on STM32H7A3/B3/B0 devices supporting OctoSPI)
  • +
  • Add definition for OCTOSPIM_CR_MUXEN and OCTOSPIM_CR_REQ2ACK_TIME in order to support OctoSPI IO Manager multiplexed mode feature (on STM32H7A3/B3/B0 devices supporting OctoSPI)
  • +
  • Update system_stm32h7xx.c to reflect the current core clock in SystemCoreClock global variable (Corex-M7 or Corext-M4 clock depending of the current context in case of Dual Core)
  • +
  • Add EWARM linker files for STM32H7A3 devices with reduced Flash size to 1MB: +
      +
    • stm32h7a3xg_flash.icf, stm32h7a3xg_flash_rw_sram1.icf, stm32h7a3xg_flash_rw_sram2.icf.
    • +
    • stm32h7a3xgq_flash.icf, stm32h7a3xgq_flash_rw_sram1.icf, stm32h7a3xgq_flash_rw_sram2.icf.
    • +
  • +
+
+
+
+ +
+

Main Changes

+
    +
  • General updates to align Bit and registers definition with the STM32H7 reference manual

  • +
  • Add support of stm32h7A3xx, stm32h7A3xxQ, stm32h7B3xx, stm32h7B3xxQ, stm32h7B0xx and stm32h7B0xxQ devices: +
      +
    • Add “stm32h7a3xx.h”, “stm32h7a3xxq.h”, “stm32h7b3xx.h”, “stm32h7b3xxq.h”, “stm32h7b0xx.h” and “stm32h7b0xxq.h” files
    • +
    • Add startup files “startup_stm32h7a3xx.s”, “startup_stm32h7a3xxq.s”, “startup_stm32h7b3xx.s”, “startup_stm32h7b3xxq.s”, “startup_stm32h7b0xx.s” and “startup_stm32h7b0xxq.s” for EWARM , MDK-ARM and STM32CubeIDE toolchains
    • +
    • Add part numbers list to stm32h7xx.h header file: +
        +
      • STM32H7A3xx : STM32H7A3IIK6, STM32H7A3IIT6, STM32H7A3NIH6, STM32H7A3RIT6, STM32H7A3VIH6, STM32H7A3VIT6, STM32H7A3ZIT6
      • +
      • STM32H7A3xxQ : STM32H7A3QIY6Q, STM32H7A3IIK6Q, STM32H7A3IIT6Q, STM32H7A3LIH6Q, STM32H7A3VIH6Q, STM32H7A3VIT6Q, STM32H7A3AII6Q, STM32H7A3ZIT6Q
      • +
      • STM32H7B3xx : STM32H7B3IIK6, STM32H7B3IIT6, STM32H7B3NIH6, STM32H7B3RIT6, STM32H7B3VIH6, STM32H7B3VIT6, STM32H7B3ZIT6
      • +
      • STM32H7B3xxQ : STM32H7B3QIY6Q, STM32H7B3IIK6Q, STM32H7B3IIT6Q, STM32H7B3LIH6Q, STM32H7B3VIH6Q, STM32H7B3VIT6Q, STM32H7B3AII6Q, STM32H7B3ZIT6Q
      • +
      • STM32H7B0xx : STM32H7B0ABIxQ, STM32H7B0IBTx, STM32H7B0RBTx, STM32H7B0VBTx, STM32H7B0ZBTx, STM32H7B0IBKxQ
      • +
    • +
  • +
  • Update DMA2D bits definitions: Update to support Line offset mode and swap bytes features +
      +
    • Add CR_LOM (Line Ofset Mode) bit definition, Add OPFCCR_SB (Swap Bytes) bit definition
    • +
    • Update CR_MODE, FGOR_LO, BGOR_LO and OOR_LO bit definition
    • +
  • +
  • Update USB_OTG_GAHBCFG bit definition: to be aligned with LL_USB usage
  • +
  • Add USB_OTG_DOEPMSK_AHBERRM, USB_OTG_DOEPMSK_BERRM, USB_OTG_DOEPMSK_NAKM, USB_OTG_DOEPMSK_NYETM, USB_OTG_DIEPINT_AHBERR, USB_OTG_DIEPINT_INEPNM, USB_OTG_DOEPINT_AHBERR, USB_OTG_DOEPINT_OUTPKTERR, USB_OTG_DOEPINT_BERR, USB_OTG_DOEPINT_NAK and USB_OTG_DOEPINT_STPKTRX bit definitions

  • +
  • Update IS_TIM_REMAP_INSTANCE and IS_TIM_SYNCHRO_INSTANCE macro implemenation

  • +
+
+
+
+ +
+

Main Changes

+
  • Add definition of “ART_TypeDef” structure: ART accelerator for Cortex-M4 available in Dual Core devices
  • Add definition of “ART” instance: pointer to “ART_TypeDef” structure
  • Add definition of “ART” bit fields: ART_CTR_EN and ART_CTR_PCACHEADDR
    @@ -53,9 +162,9 @@ This software component is licensed by ST under BSD 3-Clause license, the “Lic
- +
-

Main Changes

+

Main Changes

  • General updates to align Bit and registers definition with the STM32H7 reference manual
  • Updates to aligned with STM32H7xx rev.V devices
  • @@ -119,7 +228,7 @@ This software component is licensed by ST under BSD 3-Clause license, the “Lic
    -

    Main Changes

    +

    Main Changes

    • Patch Release on top of V1.3.0
    • Add Definition of UID_BASE ( Unique device ID register base address) to the STM32H7xx include files: @@ -132,7 +241,7 @@ This software component is licensed by ST under BSD 3-Clause license, the “Lic
      -

      Main Changes

      +

      Main Changes

      • STM32H7xx include files:
          @@ -177,7 +286,7 @@ This software component is licensed by ST under BSD 3-Clause license, the “Lic
          -

          Main Changes

          +

          Main Changes

          • Add support for stm32h750xx value line devices:
              @@ -190,7 +299,7 @@ This software component is licensed by ST under BSD 3-Clause license, the “Lic
              -

              Main Changes

              +

              Main Changes

              • Update FDCAN bit definition
              • Update SystemCoreClockUpdate() function in system_stm32h7xx.c file to use direct register access
              • @@ -200,7 +309,7 @@ This software component is licensed by ST under BSD 3-Clause license, the “Lic
                -

                Main Changes

                +

                Main Changes

                • Update USB OTG bit definition
                • Adjust PLL fractional computation
                • @@ -210,7 +319,7 @@ This software component is licensed by ST under BSD 3-Clause license, the “Lic
                  -

                  Main Changes

                  +

                  Main Changes

                  • First official release for STM32H743xx/753xx devices
                  diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/linker/stm32h745xg_flash_CM4.sct b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/linker/stm32h745xg_flash_CM4.sct new file mode 100644 index 0000000..36c6cf9 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/linker/stm32h745xg_flash_CM4.sct @@ -0,0 +1,14 @@ +; ************************************************************* +; *** Scatter-Loading Description File generated by uVision *** +; ************************************************************* + +LR_IROM1 0x08100000 0x00080000 { ; load region size_region + ER_IROM1 0x08100000 0x00080000 { ; load address = execution address + *.o (RESET, +First) + *(InRoot$$Sections) + .ANY (+RO) + } + RW_IRAM1 0x10000000 0x10048000{ ; RW data + .ANY (+RW +ZI) + } +} diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/linker/stm32h745xg_flash_CM7.sct b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/linker/stm32h745xg_flash_CM7.sct new file mode 100644 index 0000000..76a91ad --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/linker/stm32h745xg_flash_CM7.sct @@ -0,0 +1,14 @@ +; ************************************************************* +; *** Scatter-Loading Description File generated by uVision *** +; ************************************************************* + +LR_IROM1 0x08000000 0x00080000 { ; load region size_region + ER_IROM1 0x08000000 0x00080000 { ; load address = execution address + *.o (RESET, +First) + *(InRoot$$Sections) + .ANY (+RO) + } + RW_IRAM1 0x20000000 0x20020000{ ; RW data + .ANY (+RW +ZI) + } +} diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/linker/stm32h747xg_flash_CM4.sct b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/linker/stm32h747xg_flash_CM4.sct new file mode 100644 index 0000000..36c6cf9 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/linker/stm32h747xg_flash_CM4.sct @@ -0,0 +1,14 @@ +; ************************************************************* +; *** Scatter-Loading Description File generated by uVision *** +; ************************************************************* + +LR_IROM1 0x08100000 0x00080000 { ; load region size_region + ER_IROM1 0x08100000 0x00080000 { ; load address = execution address + *.o (RESET, +First) + *(InRoot$$Sections) + .ANY (+RO) + } + RW_IRAM1 0x10000000 0x10048000{ ; RW data + .ANY (+RW +ZI) + } +} diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/linker/stm32h747xg_flash_CM7.sct b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/linker/stm32h747xg_flash_CM7.sct new file mode 100644 index 0000000..76a91ad --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/linker/stm32h747xg_flash_CM7.sct @@ -0,0 +1,14 @@ +; ************************************************************* +; *** Scatter-Loading Description File generated by uVision *** +; ************************************************************* + +LR_IROM1 0x08000000 0x00080000 { ; load region size_region + ER_IROM1 0x08000000 0x00080000 { ; load address = execution address + *.o (RESET, +First) + *(InRoot$$Sections) + .ANY (+RO) + } + RW_IRAM1 0x20000000 0x20020000{ ; RW data + .ANY (+RW +ZI) + } +} diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h723xx.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h723xx.s new file mode 100644 index 0000000..3432f6a --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h723xx.s @@ -0,0 +1,618 @@ +;******************** (C) COPYRIGHT 2019 STMicroelectronics ******************** +;* File Name : startup_stm32h723xx.s +;* @author MCD Application Team +;* Description : STM32H7xx devices vector table for MDK-ARM toolchain. +;* This module performs: +;* - Set the initial SP +;* - Set the initial PC == Reset_Handler +;* - Set the vector table entries with the exceptions ISR address +;* - Branches to __main in the C library (which eventually +;* calls main()). +;* After Reset the Cortex-M processor is in Thread mode, +;* priority is Privileged, and the Stack is set to Main. +;* <<< Use Configuration Wizard in Context Menu >>> +;****************************************************************************** +;* @attention +;* +;* Copyright (c) 2019 STMicroelectronics. +;* All rights reserved. +;* +;* This software component is licensed by ST under BSD 3-Clause license, +;* the "License"; You may not use this file except in compliance with the +;* License. You may obtain a copy of the License at: +;* opensource.org/licenses/BSD-3-Clause +;* +;****************************************************************************** + +; Amount of memory (in bytes) allocated for Stack +; Tailor this value to your application needs +; Stack Configuration +; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Stack_Size EQU 0x00000400 + + AREA STACK, NOINIT, READWRITE, ALIGN=3 +Stack_Mem SPACE Stack_Size +__initial_sp + + +; Heap Configuration +; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Heap_Size EQU 0x00000200 + + AREA HEAP, NOINIT, READWRITE, ALIGN=3 +__heap_base +Heap_Mem SPACE Heap_Size +__heap_limit + + PRESERVE8 + THUMB + + +; Vector Table Mapped to Address 0 at Reset + AREA RESET, DATA, READONLY + EXPORT __Vectors + EXPORT __Vectors_End + EXPORT __Vectors_Size + +__Vectors DCD __initial_sp ; Top of Stack + DCD Reset_Handler ; Reset Handler + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD MemManage_Handler ; MPU Fault Handler + DCD BusFault_Handler ; Bus Fault Handler + DCD UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WWDG_IRQHandler ; Window WatchDog interrupt ( wwdg1_it) + DCD PVD_AVD_IRQHandler ; PVD/AVD through EXTI Line detection + DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line + DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line + DCD FLASH_IRQHandler ; FLASH + DCD RCC_IRQHandler ; RCC + DCD EXTI0_IRQHandler ; EXTI Line0 + DCD EXTI1_IRQHandler ; EXTI Line1 + DCD EXTI2_IRQHandler ; EXTI Line2 + DCD EXTI3_IRQHandler ; EXTI Line3 + DCD EXTI4_IRQHandler ; EXTI Line4 + DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 + DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 + DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 + DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 + DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 + DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 + DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 + DCD ADC_IRQHandler ; ADC1, ADC2 + DCD FDCAN1_IT0_IRQHandler ; FDCAN1 interrupt line 0 + DCD FDCAN2_IT0_IRQHandler ; FDCAN2 interrupt line 0 + DCD FDCAN1_IT1_IRQHandler ; FDCAN1 interrupt line 1 + DCD FDCAN2_IT1_IRQHandler ; FDCAN2 interrupt line 1 + DCD EXTI9_5_IRQHandler ; External Line[9:5]s + DCD TIM1_BRK_IRQHandler ; TIM1 Break interrupt + DCD TIM1_UP_IRQHandler ; TIM1 Update Interrupt + DCD TIM1_TRG_COM_IRQHandler ; TIM1 Trigger and Commutation Interrupt + DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare + DCD TIM2_IRQHandler ; TIM2 + DCD TIM3_IRQHandler ; TIM3 + DCD TIM4_IRQHandler ; TIM4 + DCD I2C1_EV_IRQHandler ; I2C1 Event + DCD I2C1_ER_IRQHandler ; I2C1 Error + DCD I2C2_EV_IRQHandler ; I2C2 Event + DCD I2C2_ER_IRQHandler ; I2C2 Error + DCD SPI1_IRQHandler ; SPI1 + DCD SPI2_IRQHandler ; SPI2 + DCD USART1_IRQHandler ; USART1 + DCD USART2_IRQHandler ; USART2 + DCD USART3_IRQHandler ; USART3 + DCD EXTI15_10_IRQHandler ; External Line[15:10] + DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line + DCD 0 ; Reserved + DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break Interrupt and TIM12 global interrupt + DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update Interrupt and TIM13 global interrupt + DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation Interrupt and TIM14 global interrupt + DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare Interrupt + DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 + DCD FMC_IRQHandler ; FMC + DCD SDMMC1_IRQHandler ; SDMMC1 + DCD TIM5_IRQHandler ; TIM5 + DCD SPI3_IRQHandler ; SPI3 + DCD UART4_IRQHandler ; UART4 + DCD UART5_IRQHandler ; UART5 + DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors + DCD TIM7_IRQHandler ; TIM7 + DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 + DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 + DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 + DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 + DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 + DCD ETH_IRQHandler ; Ethernet + DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line + DCD FDCAN_CAL_IRQHandler ; FDCAN calibration unit interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 + DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 + DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 + DCD USART6_IRQHandler ; USART6 + DCD I2C3_EV_IRQHandler ; I2C3 event + DCD I2C3_ER_IRQHandler ; I2C3 error + DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out + DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In + DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI + DCD OTG_HS_IRQHandler ; USB OTG HS + DCD DCMI_PSSI_IRQHandler ; DCMI, PSSI + DCD 0 ; Reserved + DCD RNG_IRQHandler ; Rng + DCD FPU_IRQHandler ; FPU + DCD UART7_IRQHandler ; UART7 + DCD UART8_IRQHandler ; UART8 + DCD SPI4_IRQHandler ; SPI4 + DCD SPI5_IRQHandler ; SPI5 + DCD SPI6_IRQHandler ; SPI6 + DCD SAI1_IRQHandler ; SAI1 + DCD LTDC_IRQHandler ; LTDC + DCD LTDC_ER_IRQHandler ; LTDC error + DCD DMA2D_IRQHandler ; DMA2D + DCD 0 ; Reserved + DCD OCTOSPI1_IRQHandler ; OCTOSPI1 + DCD LPTIM1_IRQHandler ; LPTIM1 + DCD CEC_IRQHandler ; HDMI_CEC + DCD I2C4_EV_IRQHandler ; I2C4 Event + DCD I2C4_ER_IRQHandler ; I2C4 Error + DCD SPDIF_RX_IRQHandler ; SPDIF_RX + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DMAMUX1_OVR_IRQHandler ; DMAMUX1 Overrun interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DFSDM1_FLT0_IRQHandler ; DFSDM Filter0 Interrupt + DCD DFSDM1_FLT1_IRQHandler ; DFSDM Filter1 Interrupt + DCD DFSDM1_FLT2_IRQHandler ; DFSDM Filter2 Interrupt + DCD DFSDM1_FLT3_IRQHandler ; DFSDM Filter3 Interrupt + DCD 0 ; Reserved + DCD SWPMI1_IRQHandler ; Serial Wire Interface 1 global interrupt + DCD TIM15_IRQHandler ; TIM15 global Interrupt + DCD TIM16_IRQHandler ; TIM16 global Interrupt + DCD TIM17_IRQHandler ; TIM17 global Interrupt + DCD MDIOS_WKUP_IRQHandler ; MDIOS Wakeup Interrupt + DCD MDIOS_IRQHandler ; MDIOS global Interrupt + DCD 0 ; Reserved + DCD MDMA_IRQHandler ; MDMA global Interrupt + DCD 0 ; Reserved + DCD SDMMC2_IRQHandler ; SDMMC2 global Interrupt + DCD HSEM1_IRQHandler ; HSEM1 global Interrupt + DCD 0 ; Reserved + DCD ADC3_IRQHandler ; ADC3 global Interrupt + DCD DMAMUX2_OVR_IRQHandler ; DMAMUX Overrun interrupt + DCD BDMA_Channel0_IRQHandler ; BDMA Channel 0 global Interrupt + DCD BDMA_Channel1_IRQHandler ; BDMA Channel 1 global Interrupt + DCD BDMA_Channel2_IRQHandler ; BDMA Channel 2 global Interrupt + DCD BDMA_Channel3_IRQHandler ; BDMA Channel 3 global Interrupt + DCD BDMA_Channel4_IRQHandler ; BDMA Channel 4 global Interrupt + DCD BDMA_Channel5_IRQHandler ; BDMA Channel 5 global Interrupt + DCD BDMA_Channel6_IRQHandler ; BDMA Channel 6 global Interrupt + DCD BDMA_Channel7_IRQHandler ; BDMA Channel 7 global Interrupt + DCD COMP1_IRQHandler ; COMP1 global Interrupt + DCD LPTIM2_IRQHandler ; LP TIM2 global interrupt + DCD LPTIM3_IRQHandler ; LP TIM3 global interrupt + DCD LPTIM4_IRQHandler ; LP TIM4 global interrupt + DCD LPTIM5_IRQHandler ; LP TIM5 global interrupt + DCD LPUART1_IRQHandler ; LP UART1 interrupt + DCD 0 ; Reserved + DCD CRS_IRQHandler ; Clock Recovery Global Interrupt + DCD ECC_IRQHandler ; ECC diagnostic Global Interrupt + DCD SAI4_IRQHandler ; SAI4 global interrupt + DCD DTS_IRQHandler ; DTS interrupt + DCD 0 ; Reserved + DCD WAKEUP_PIN_IRQHandler ; Interrupt for all 6 wake-up pins + DCD OCTOSPI2_IRQHandler ; OCTOSPI2 Interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD FMAC_IRQHandler ; FMAC Interrupt + DCD CORDIC_IRQHandler ; CORDIC Interrupt + DCD UART9_IRQHandler ; UART9 Interrupt + DCD USART10_IRQHandler ; UART10 Interrupt + DCD I2C5_EV_IRQHandler ; I2C5 Event Interrupt + DCD I2C5_ER_IRQHandler ; I2C5 Error Interrupt + DCD FDCAN3_IT0_IRQHandler ; FDCAN3 interrupt line 0 + DCD FDCAN3_IT1_IRQHandler ; FDCAN3 interrupt line 1 + DCD TIM23_IRQHandler ; TIM23 global interrup + DCD TIM24_IRQHandler ; TIM24 global interrup + +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + + AREA |.text|, CODE, READONLY + +; Reset handler +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT SystemInit + IMPORT __main + + LDR R0, =SystemInit + BLX R0 + LDR R0, =__main + BX R0 + ENDP + +; Dummy Exception Handlers (infinite loops which can be modified) + +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP +HardFault_Handler\ + PROC + EXPORT HardFault_Handler [WEAK] + B . + ENDP +MemManage_Handler\ + PROC + EXPORT MemManage_Handler [WEAK] + B . + ENDP +BusFault_Handler\ + PROC + EXPORT BusFault_Handler [WEAK] + B . + ENDP +UsageFault_Handler\ + PROC + EXPORT UsageFault_Handler [WEAK] + B . + ENDP +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +DebugMon_Handler\ + PROC + EXPORT DebugMon_Handler [WEAK] + B . + ENDP +PendSV_Handler PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC + + EXPORT WWDG_IRQHandler [WEAK] + EXPORT PVD_AVD_IRQHandler [WEAK] + EXPORT TAMP_STAMP_IRQHandler [WEAK] + EXPORT RTC_WKUP_IRQHandler [WEAK] + EXPORT FLASH_IRQHandler [WEAK] + EXPORT RCC_IRQHandler [WEAK] + EXPORT EXTI0_IRQHandler [WEAK] + EXPORT EXTI1_IRQHandler [WEAK] + EXPORT EXTI2_IRQHandler [WEAK] + EXPORT EXTI3_IRQHandler [WEAK] + EXPORT EXTI4_IRQHandler [WEAK] + EXPORT DMA1_Stream0_IRQHandler [WEAK] + EXPORT DMA1_Stream1_IRQHandler [WEAK] + EXPORT DMA1_Stream2_IRQHandler [WEAK] + EXPORT DMA1_Stream3_IRQHandler [WEAK] + EXPORT DMA1_Stream4_IRQHandler [WEAK] + EXPORT DMA1_Stream5_IRQHandler [WEAK] + EXPORT DMA1_Stream6_IRQHandler [WEAK] + EXPORT DMA1_Stream7_IRQHandler [WEAK] + EXPORT ADC_IRQHandler [WEAK] + EXPORT FDCAN1_IT0_IRQHandler [WEAK] + EXPORT FDCAN2_IT0_IRQHandler [WEAK] + EXPORT FDCAN1_IT1_IRQHandler [WEAK] + EXPORT FDCAN2_IT1_IRQHandler [WEAK] + EXPORT EXTI9_5_IRQHandler [WEAK] + EXPORT TIM1_BRK_IRQHandler [WEAK] + EXPORT TIM1_UP_IRQHandler [WEAK] + EXPORT TIM1_TRG_COM_IRQHandler [WEAK] + EXPORT TIM1_CC_IRQHandler [WEAK] + EXPORT TIM2_IRQHandler [WEAK] + EXPORT TIM3_IRQHandler [WEAK] + EXPORT TIM4_IRQHandler [WEAK] + EXPORT I2C1_EV_IRQHandler [WEAK] + EXPORT I2C1_ER_IRQHandler [WEAK] + EXPORT I2C2_EV_IRQHandler [WEAK] + EXPORT I2C2_ER_IRQHandler [WEAK] + EXPORT SPI1_IRQHandler [WEAK] + EXPORT SPI2_IRQHandler [WEAK] + EXPORT USART1_IRQHandler [WEAK] + EXPORT USART2_IRQHandler [WEAK] + EXPORT USART3_IRQHandler [WEAK] + EXPORT EXTI15_10_IRQHandler [WEAK] + EXPORT RTC_Alarm_IRQHandler [WEAK] + EXPORT TIM8_BRK_TIM12_IRQHandler [WEAK] + EXPORT TIM8_UP_TIM13_IRQHandler [WEAK] + EXPORT TIM8_TRG_COM_TIM14_IRQHandler [WEAK] + EXPORT TIM8_CC_IRQHandler [WEAK] + EXPORT DMA1_Stream7_IRQHandler [WEAK] + EXPORT FMC_IRQHandler [WEAK] + EXPORT SDMMC1_IRQHandler [WEAK] + EXPORT TIM5_IRQHandler [WEAK] + EXPORT SPI3_IRQHandler [WEAK] + EXPORT UART4_IRQHandler [WEAK] + EXPORT UART5_IRQHandler [WEAK] + EXPORT TIM6_DAC_IRQHandler [WEAK] + EXPORT TIM7_IRQHandler [WEAK] + EXPORT DMA2_Stream0_IRQHandler [WEAK] + EXPORT DMA2_Stream1_IRQHandler [WEAK] + EXPORT DMA2_Stream2_IRQHandler [WEAK] + EXPORT DMA2_Stream3_IRQHandler [WEAK] + EXPORT DMA2_Stream4_IRQHandler [WEAK] + EXPORT ETH_IRQHandler [WEAK] + EXPORT ETH_WKUP_IRQHandler [WEAK] + EXPORT FDCAN_CAL_IRQHandler [WEAK] + EXPORT DMA2_Stream5_IRQHandler [WEAK] + EXPORT DMA2_Stream6_IRQHandler [WEAK] + EXPORT DMA2_Stream7_IRQHandler [WEAK] + EXPORT USART6_IRQHandler [WEAK] + EXPORT I2C3_EV_IRQHandler [WEAK] + EXPORT I2C3_ER_IRQHandler [WEAK] + EXPORT OTG_HS_EP1_OUT_IRQHandler [WEAK] + EXPORT OTG_HS_EP1_IN_IRQHandler [WEAK] + EXPORT OTG_HS_WKUP_IRQHandler [WEAK] + EXPORT OTG_HS_IRQHandler [WEAK] + EXPORT DCMI_PSSI_IRQHandler [WEAK] + EXPORT RNG_IRQHandler [WEAK] + EXPORT FPU_IRQHandler [WEAK] + EXPORT UART7_IRQHandler [WEAK] + EXPORT UART8_IRQHandler [WEAK] + EXPORT SPI4_IRQHandler [WEAK] + EXPORT SPI5_IRQHandler [WEAK] + EXPORT SPI6_IRQHandler [WEAK] + EXPORT SAI1_IRQHandler [WEAK] + EXPORT LTDC_IRQHandler [WEAK] + EXPORT LTDC_ER_IRQHandler [WEAK] + EXPORT DMA2D_IRQHandler [WEAK] + EXPORT OCTOSPI1_IRQHandler [WEAK] + EXPORT LPTIM1_IRQHandler [WEAK] + EXPORT CEC_IRQHandler [WEAK] + EXPORT I2C4_EV_IRQHandler [WEAK] + EXPORT I2C4_ER_IRQHandler [WEAK] + EXPORT SPDIF_RX_IRQHandler [WEAK] + EXPORT DMAMUX1_OVR_IRQHandler [WEAK] + EXPORT DFSDM1_FLT0_IRQHandler [WEAK] + EXPORT DFSDM1_FLT1_IRQHandler [WEAK] + EXPORT DFSDM1_FLT2_IRQHandler [WEAK] + EXPORT DFSDM1_FLT3_IRQHandler [WEAK] + EXPORT SWPMI1_IRQHandler [WEAK] + EXPORT TIM15_IRQHandler [WEAK] + EXPORT TIM16_IRQHandler [WEAK] + EXPORT TIM17_IRQHandler [WEAK] + EXPORT MDIOS_WKUP_IRQHandler [WEAK] + EXPORT MDIOS_IRQHandler [WEAK] + EXPORT MDMA_IRQHandler [WEAK] + EXPORT SDMMC2_IRQHandler [WEAK] + EXPORT HSEM1_IRQHandler [WEAK] + EXPORT ADC3_IRQHandler [WEAK] + EXPORT DMAMUX2_OVR_IRQHandler [WEAK] + EXPORT BDMA_Channel0_IRQHandler [WEAK] + EXPORT BDMA_Channel1_IRQHandler [WEAK] + EXPORT BDMA_Channel2_IRQHandler [WEAK] + EXPORT BDMA_Channel3_IRQHandler [WEAK] + EXPORT BDMA_Channel4_IRQHandler [WEAK] + EXPORT BDMA_Channel5_IRQHandler [WEAK] + EXPORT BDMA_Channel6_IRQHandler [WEAK] + EXPORT BDMA_Channel7_IRQHandler [WEAK] + EXPORT COMP1_IRQHandler [WEAK] + EXPORT LPTIM2_IRQHandler [WEAK] + EXPORT LPTIM3_IRQHandler [WEAK] + EXPORT LPTIM4_IRQHandler [WEAK] + EXPORT LPTIM5_IRQHandler [WEAK] + EXPORT LPUART1_IRQHandler [WEAK] + EXPORT CRS_IRQHandler [WEAK] + EXPORT ECC_IRQHandler [WEAK] + EXPORT SAI4_IRQHandler [WEAK] + EXPORT DTS_IRQHandler [WEAK] + EXPORT WAKEUP_PIN_IRQHandler [WEAK] + EXPORT OCTOSPI2_IRQHandler [WEAK] + EXPORT FMAC_IRQHandler [WEAK] + EXPORT CORDIC_IRQHandler [WEAK] + EXPORT UART9_IRQHandler [WEAK] + EXPORT USART10_IRQHandler [WEAK] + EXPORT I2C5_EV_IRQHandler [WEAK] + EXPORT I2C5_ER_IRQHandler [WEAK] + EXPORT FDCAN3_IT0_IRQHandler [WEAK] + EXPORT FDCAN3_IT1_IRQHandler [WEAK] + EXPORT TIM23_IRQHandler [WEAK] + EXPORT TIM24_IRQHandler [WEAK] + +WWDG_IRQHandler +PVD_AVD_IRQHandler +TAMP_STAMP_IRQHandler +RTC_WKUP_IRQHandler +FLASH_IRQHandler +RCC_IRQHandler +EXTI0_IRQHandler +EXTI1_IRQHandler +EXTI2_IRQHandler +EXTI3_IRQHandler +EXTI4_IRQHandler +DMA1_Stream0_IRQHandler +DMA1_Stream1_IRQHandler +DMA1_Stream2_IRQHandler +DMA1_Stream3_IRQHandler +DMA1_Stream4_IRQHandler +DMA1_Stream5_IRQHandler +DMA1_Stream6_IRQHandler +ADC_IRQHandler +FDCAN1_IT0_IRQHandler +FDCAN2_IT0_IRQHandler +FDCAN1_IT1_IRQHandler +FDCAN2_IT1_IRQHandler +EXTI9_5_IRQHandler +TIM1_BRK_IRQHandler +TIM1_UP_IRQHandler +TIM1_TRG_COM_IRQHandler +TIM1_CC_IRQHandler +TIM2_IRQHandler +TIM3_IRQHandler +TIM4_IRQHandler +I2C1_EV_IRQHandler +I2C1_ER_IRQHandler +I2C2_EV_IRQHandler +I2C2_ER_IRQHandler +SPI1_IRQHandler +SPI2_IRQHandler +USART1_IRQHandler +USART2_IRQHandler +USART3_IRQHandler +EXTI15_10_IRQHandler +RTC_Alarm_IRQHandler +TIM8_BRK_TIM12_IRQHandler +TIM8_UP_TIM13_IRQHandler +TIM8_TRG_COM_TIM14_IRQHandler +TIM8_CC_IRQHandler +DMA1_Stream7_IRQHandler +FMC_IRQHandler +SDMMC1_IRQHandler +TIM5_IRQHandler +SPI3_IRQHandler +UART4_IRQHandler +UART5_IRQHandler +TIM6_DAC_IRQHandler +TIM7_IRQHandler +DMA2_Stream0_IRQHandler +DMA2_Stream1_IRQHandler +DMA2_Stream2_IRQHandler +DMA2_Stream3_IRQHandler +DMA2_Stream4_IRQHandler +ETH_IRQHandler +ETH_WKUP_IRQHandler +FDCAN_CAL_IRQHandler +DMA2_Stream5_IRQHandler +DMA2_Stream6_IRQHandler +DMA2_Stream7_IRQHandler +USART6_IRQHandler +I2C3_EV_IRQHandler +I2C3_ER_IRQHandler +OTG_HS_EP1_OUT_IRQHandler +OTG_HS_EP1_IN_IRQHandler +OTG_HS_WKUP_IRQHandler +OTG_HS_IRQHandler +DCMI_PSSI_IRQHandler +RNG_IRQHandler +FPU_IRQHandler +UART7_IRQHandler +UART8_IRQHandler +SPI4_IRQHandler +SPI5_IRQHandler +SPI6_IRQHandler +SAI1_IRQHandler +LTDC_IRQHandler +LTDC_ER_IRQHandler +DMA2D_IRQHandler +OCTOSPI1_IRQHandler +LPTIM1_IRQHandler +CEC_IRQHandler +I2C4_EV_IRQHandler +I2C4_ER_IRQHandler +SPDIF_RX_IRQHandler +DMAMUX1_OVR_IRQHandler +DFSDM1_FLT0_IRQHandler +DFSDM1_FLT1_IRQHandler +DFSDM1_FLT2_IRQHandler +DFSDM1_FLT3_IRQHandler +SWPMI1_IRQHandler +TIM15_IRQHandler +TIM16_IRQHandler +TIM17_IRQHandler +MDIOS_WKUP_IRQHandler +MDIOS_IRQHandler +MDMA_IRQHandler +SDMMC2_IRQHandler +HSEM1_IRQHandler +ADC3_IRQHandler +DMAMUX2_OVR_IRQHandler +BDMA_Channel0_IRQHandler +BDMA_Channel1_IRQHandler +BDMA_Channel2_IRQHandler +BDMA_Channel3_IRQHandler +BDMA_Channel4_IRQHandler +BDMA_Channel5_IRQHandler +BDMA_Channel6_IRQHandler +BDMA_Channel7_IRQHandler +COMP1_IRQHandler +LPTIM2_IRQHandler +LPTIM3_IRQHandler +LPTIM4_IRQHandler +LPTIM5_IRQHandler +LPUART1_IRQHandler +CRS_IRQHandler +ECC_IRQHandler +SAI4_IRQHandler +DTS_IRQHandler +WAKEUP_PIN_IRQHandler +OCTOSPI2_IRQHandler +FMAC_IRQHandler +CORDIC_IRQHandler +UART9_IRQHandler +USART10_IRQHandler +I2C5_EV_IRQHandler +I2C5_ER_IRQHandler +FDCAN3_IT0_IRQHandler +FDCAN3_IT1_IRQHandler +TIM23_IRQHandler +TIM24_IRQHandler + + B . + + ENDP + + ALIGN + +;******************************************************************************* +; User Stack and Heap initialization +;******************************************************************************* + IF :DEF:__MICROLIB + + EXPORT __initial_sp + EXPORT __heap_base + EXPORT __heap_limit + + ELSE + + IMPORT __use_two_region_memory + EXPORT __user_initial_stackheap + +__user_initial_stackheap + + LDR R0, = Heap_Mem + LDR R1, =(Stack_Mem + Stack_Size) + LDR R2, = (Heap_Mem + Heap_Size) + LDR R3, = Stack_Mem + BX LR + + ALIGN + + ENDIF + + END + +;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE***** diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h725xx.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h725xx.s new file mode 100644 index 0000000..b4a1881 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h725xx.s @@ -0,0 +1,618 @@ +;******************** (C) COPYRIGHT 2019 STMicroelectronics ******************** +;* File Name : startup_stm32h725xx.s +;* @author MCD Application Team +;* Description : STM32H7xx devices vector table for MDK-ARM toolchain. +;* This module performs: +;* - Set the initial SP +;* - Set the initial PC == Reset_Handler +;* - Set the vector table entries with the exceptions ISR address +;* - Branches to __main in the C library (which eventually +;* calls main()). +;* After Reset the Cortex-M processor is in Thread mode, +;* priority is Privileged, and the Stack is set to Main. +;* <<< Use Configuration Wizard in Context Menu >>> +;****************************************************************************** +;* @attention +;* +;* Copyright (c) 2019 STMicroelectronics. +;* All rights reserved. +;* +;* This software component is licensed by ST under BSD 3-Clause license, +;* the "License"; You may not use this file except in compliance with the +;* License. You may obtain a copy of the License at: +;* opensource.org/licenses/BSD-3-Clause +;* +;****************************************************************************** + +; Amount of memory (in bytes) allocated for Stack +; Tailor this value to your application needs +; Stack Configuration +; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Stack_Size EQU 0x00000400 + + AREA STACK, NOINIT, READWRITE, ALIGN=3 +Stack_Mem SPACE Stack_Size +__initial_sp + + +; Heap Configuration +; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Heap_Size EQU 0x00000200 + + AREA HEAP, NOINIT, READWRITE, ALIGN=3 +__heap_base +Heap_Mem SPACE Heap_Size +__heap_limit + + PRESERVE8 + THUMB + + +; Vector Table Mapped to Address 0 at Reset + AREA RESET, DATA, READONLY + EXPORT __Vectors + EXPORT __Vectors_End + EXPORT __Vectors_Size + +__Vectors DCD __initial_sp ; Top of Stack + DCD Reset_Handler ; Reset Handler + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD MemManage_Handler ; MPU Fault Handler + DCD BusFault_Handler ; Bus Fault Handler + DCD UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WWDG_IRQHandler ; Window WatchDog interrupt ( wwdg1_it) + DCD PVD_AVD_IRQHandler ; PVD/AVD through EXTI Line detection + DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line + DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line + DCD FLASH_IRQHandler ; FLASH + DCD RCC_IRQHandler ; RCC + DCD EXTI0_IRQHandler ; EXTI Line0 + DCD EXTI1_IRQHandler ; EXTI Line1 + DCD EXTI2_IRQHandler ; EXTI Line2 + DCD EXTI3_IRQHandler ; EXTI Line3 + DCD EXTI4_IRQHandler ; EXTI Line4 + DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 + DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 + DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 + DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 + DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 + DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 + DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 + DCD ADC_IRQHandler ; ADC1, ADC2 + DCD FDCAN1_IT0_IRQHandler ; FDCAN1 interrupt line 0 + DCD FDCAN2_IT0_IRQHandler ; FDCAN2 interrupt line 0 + DCD FDCAN1_IT1_IRQHandler ; FDCAN1 interrupt line 1 + DCD FDCAN2_IT1_IRQHandler ; FDCAN2 interrupt line 1 + DCD EXTI9_5_IRQHandler ; External Line[9:5]s + DCD TIM1_BRK_IRQHandler ; TIM1 Break interrupt + DCD TIM1_UP_IRQHandler ; TIM1 Update Interrupt + DCD TIM1_TRG_COM_IRQHandler ; TIM1 Trigger and Commutation Interrupt + DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare + DCD TIM2_IRQHandler ; TIM2 + DCD TIM3_IRQHandler ; TIM3 + DCD TIM4_IRQHandler ; TIM4 + DCD I2C1_EV_IRQHandler ; I2C1 Event + DCD I2C1_ER_IRQHandler ; I2C1 Error + DCD I2C2_EV_IRQHandler ; I2C2 Event + DCD I2C2_ER_IRQHandler ; I2C2 Error + DCD SPI1_IRQHandler ; SPI1 + DCD SPI2_IRQHandler ; SPI2 + DCD USART1_IRQHandler ; USART1 + DCD USART2_IRQHandler ; USART2 + DCD USART3_IRQHandler ; USART3 + DCD EXTI15_10_IRQHandler ; External Line[15:10] + DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line + DCD 0 ; Reserved + DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break Interrupt and TIM12 global interrupt + DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update Interrupt and TIM13 global interrupt + DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation Interrupt and TIM14 global interrupt + DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare Interrupt + DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 + DCD FMC_IRQHandler ; FMC + DCD SDMMC1_IRQHandler ; SDMMC1 + DCD TIM5_IRQHandler ; TIM5 + DCD SPI3_IRQHandler ; SPI3 + DCD UART4_IRQHandler ; UART4 + DCD UART5_IRQHandler ; UART5 + DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors + DCD TIM7_IRQHandler ; TIM7 + DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 + DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 + DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 + DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 + DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 + DCD ETH_IRQHandler ; Ethernet + DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line + DCD FDCAN_CAL_IRQHandler ; FDCAN calibration unit interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 + DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 + DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 + DCD USART6_IRQHandler ; USART6 + DCD I2C3_EV_IRQHandler ; I2C3 event + DCD I2C3_ER_IRQHandler ; I2C3 error + DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out + DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In + DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI + DCD OTG_HS_IRQHandler ; USB OTG HS + DCD DCMI_PSSI_IRQHandler ; DCMI, PSSI + DCD 0 ; Reserved + DCD RNG_IRQHandler ; Rng + DCD FPU_IRQHandler ; FPU + DCD UART7_IRQHandler ; UART7 + DCD UART8_IRQHandler ; UART8 + DCD SPI4_IRQHandler ; SPI4 + DCD SPI5_IRQHandler ; SPI5 + DCD SPI6_IRQHandler ; SPI6 + DCD SAI1_IRQHandler ; SAI1 + DCD LTDC_IRQHandler ; LTDC + DCD LTDC_ER_IRQHandler ; LTDC error + DCD DMA2D_IRQHandler ; DMA2D + DCD 0 ; Reserved + DCD OCTOSPI1_IRQHandler ; OCTOSPI1 + DCD LPTIM1_IRQHandler ; LPTIM1 + DCD CEC_IRQHandler ; HDMI_CEC + DCD I2C4_EV_IRQHandler ; I2C4 Event + DCD I2C4_ER_IRQHandler ; I2C4 Error + DCD SPDIF_RX_IRQHandler ; SPDIF_RX + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DMAMUX1_OVR_IRQHandler ; DMAMUX1 Overrun interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DFSDM1_FLT0_IRQHandler ; DFSDM Filter0 Interrupt + DCD DFSDM1_FLT1_IRQHandler ; DFSDM Filter1 Interrupt + DCD DFSDM1_FLT2_IRQHandler ; DFSDM Filter2 Interrupt + DCD DFSDM1_FLT3_IRQHandler ; DFSDM Filter3 Interrupt + DCD 0 ; Reserved + DCD SWPMI1_IRQHandler ; Serial Wire Interface 1 global interrupt + DCD TIM15_IRQHandler ; TIM15 global Interrupt + DCD TIM16_IRQHandler ; TIM16 global Interrupt + DCD TIM17_IRQHandler ; TIM17 global Interrupt + DCD MDIOS_WKUP_IRQHandler ; MDIOS Wakeup Interrupt + DCD MDIOS_IRQHandler ; MDIOS global Interrupt + DCD 0 ; Reserved + DCD MDMA_IRQHandler ; MDMA global Interrupt + DCD 0 ; Reserved + DCD SDMMC2_IRQHandler ; SDMMC2 global Interrupt + DCD HSEM1_IRQHandler ; HSEM1 global Interrupt + DCD 0 ; Reserved + DCD ADC3_IRQHandler ; ADC3 global Interrupt + DCD DMAMUX2_OVR_IRQHandler ; DMAMUX Overrun interrupt + DCD BDMA_Channel0_IRQHandler ; BDMA Channel 0 global Interrupt + DCD BDMA_Channel1_IRQHandler ; BDMA Channel 1 global Interrupt + DCD BDMA_Channel2_IRQHandler ; BDMA Channel 2 global Interrupt + DCD BDMA_Channel3_IRQHandler ; BDMA Channel 3 global Interrupt + DCD BDMA_Channel4_IRQHandler ; BDMA Channel 4 global Interrupt + DCD BDMA_Channel5_IRQHandler ; BDMA Channel 5 global Interrupt + DCD BDMA_Channel6_IRQHandler ; BDMA Channel 6 global Interrupt + DCD BDMA_Channel7_IRQHandler ; BDMA Channel 7 global Interrupt + DCD COMP1_IRQHandler ; COMP1 global Interrupt + DCD LPTIM2_IRQHandler ; LP TIM2 global interrupt + DCD LPTIM3_IRQHandler ; LP TIM3 global interrupt + DCD LPTIM4_IRQHandler ; LP TIM4 global interrupt + DCD LPTIM5_IRQHandler ; LP TIM5 global interrupt + DCD LPUART1_IRQHandler ; LP UART1 interrupt + DCD 0 ; Reserved + DCD CRS_IRQHandler ; Clock Recovery Global Interrupt + DCD ECC_IRQHandler ; ECC diagnostic Global Interrupt + DCD SAI4_IRQHandler ; SAI4 global interrupt + DCD DTS_IRQHandler ; DTS interrupt + DCD 0 ; Reserved + DCD WAKEUP_PIN_IRQHandler ; Interrupt for all 6 wake-up pins + DCD OCTOSPI2_IRQHandler ; OCTOSPI2 Interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD FMAC_IRQHandler ; FMAC Interrupt + DCD CORDIC_IRQHandler ; CORDIC Interrupt + DCD UART9_IRQHandler ; UART9 Interrupt + DCD USART10_IRQHandler ; UART10 Interrupt + DCD I2C5_EV_IRQHandler ; I2C5 Event Interrupt + DCD I2C5_ER_IRQHandler ; I2C5 Error Interrupt + DCD FDCAN3_IT0_IRQHandler ; FDCAN3 interrupt line 0 + DCD FDCAN3_IT1_IRQHandler ; FDCAN3 interrupt line 1 + DCD TIM23_IRQHandler ; TIM23 global interrup + DCD TIM24_IRQHandler ; TIM24 global interrup + +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + + AREA |.text|, CODE, READONLY + +; Reset handler +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT SystemInit + IMPORT __main + + LDR R0, =SystemInit + BLX R0 + LDR R0, =__main + BX R0 + ENDP + +; Dummy Exception Handlers (infinite loops which can be modified) + +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP +HardFault_Handler\ + PROC + EXPORT HardFault_Handler [WEAK] + B . + ENDP +MemManage_Handler\ + PROC + EXPORT MemManage_Handler [WEAK] + B . + ENDP +BusFault_Handler\ + PROC + EXPORT BusFault_Handler [WEAK] + B . + ENDP +UsageFault_Handler\ + PROC + EXPORT UsageFault_Handler [WEAK] + B . + ENDP +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +DebugMon_Handler\ + PROC + EXPORT DebugMon_Handler [WEAK] + B . + ENDP +PendSV_Handler PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC + + EXPORT WWDG_IRQHandler [WEAK] + EXPORT PVD_AVD_IRQHandler [WEAK] + EXPORT TAMP_STAMP_IRQHandler [WEAK] + EXPORT RTC_WKUP_IRQHandler [WEAK] + EXPORT FLASH_IRQHandler [WEAK] + EXPORT RCC_IRQHandler [WEAK] + EXPORT EXTI0_IRQHandler [WEAK] + EXPORT EXTI1_IRQHandler [WEAK] + EXPORT EXTI2_IRQHandler [WEAK] + EXPORT EXTI3_IRQHandler [WEAK] + EXPORT EXTI4_IRQHandler [WEAK] + EXPORT DMA1_Stream0_IRQHandler [WEAK] + EXPORT DMA1_Stream1_IRQHandler [WEAK] + EXPORT DMA1_Stream2_IRQHandler [WEAK] + EXPORT DMA1_Stream3_IRQHandler [WEAK] + EXPORT DMA1_Stream4_IRQHandler [WEAK] + EXPORT DMA1_Stream5_IRQHandler [WEAK] + EXPORT DMA1_Stream6_IRQHandler [WEAK] + EXPORT DMA1_Stream7_IRQHandler [WEAK] + EXPORT ADC_IRQHandler [WEAK] + EXPORT FDCAN1_IT0_IRQHandler [WEAK] + EXPORT FDCAN2_IT0_IRQHandler [WEAK] + EXPORT FDCAN1_IT1_IRQHandler [WEAK] + EXPORT FDCAN2_IT1_IRQHandler [WEAK] + EXPORT EXTI9_5_IRQHandler [WEAK] + EXPORT TIM1_BRK_IRQHandler [WEAK] + EXPORT TIM1_UP_IRQHandler [WEAK] + EXPORT TIM1_TRG_COM_IRQHandler [WEAK] + EXPORT TIM1_CC_IRQHandler [WEAK] + EXPORT TIM2_IRQHandler [WEAK] + EXPORT TIM3_IRQHandler [WEAK] + EXPORT TIM4_IRQHandler [WEAK] + EXPORT I2C1_EV_IRQHandler [WEAK] + EXPORT I2C1_ER_IRQHandler [WEAK] + EXPORT I2C2_EV_IRQHandler [WEAK] + EXPORT I2C2_ER_IRQHandler [WEAK] + EXPORT SPI1_IRQHandler [WEAK] + EXPORT SPI2_IRQHandler [WEAK] + EXPORT USART1_IRQHandler [WEAK] + EXPORT USART2_IRQHandler [WEAK] + EXPORT USART3_IRQHandler [WEAK] + EXPORT EXTI15_10_IRQHandler [WEAK] + EXPORT RTC_Alarm_IRQHandler [WEAK] + EXPORT TIM8_BRK_TIM12_IRQHandler [WEAK] + EXPORT TIM8_UP_TIM13_IRQHandler [WEAK] + EXPORT TIM8_TRG_COM_TIM14_IRQHandler [WEAK] + EXPORT TIM8_CC_IRQHandler [WEAK] + EXPORT DMA1_Stream7_IRQHandler [WEAK] + EXPORT FMC_IRQHandler [WEAK] + EXPORT SDMMC1_IRQHandler [WEAK] + EXPORT TIM5_IRQHandler [WEAK] + EXPORT SPI3_IRQHandler [WEAK] + EXPORT UART4_IRQHandler [WEAK] + EXPORT UART5_IRQHandler [WEAK] + EXPORT TIM6_DAC_IRQHandler [WEAK] + EXPORT TIM7_IRQHandler [WEAK] + EXPORT DMA2_Stream0_IRQHandler [WEAK] + EXPORT DMA2_Stream1_IRQHandler [WEAK] + EXPORT DMA2_Stream2_IRQHandler [WEAK] + EXPORT DMA2_Stream3_IRQHandler [WEAK] + EXPORT DMA2_Stream4_IRQHandler [WEAK] + EXPORT ETH_IRQHandler [WEAK] + EXPORT ETH_WKUP_IRQHandler [WEAK] + EXPORT FDCAN_CAL_IRQHandler [WEAK] + EXPORT DMA2_Stream5_IRQHandler [WEAK] + EXPORT DMA2_Stream6_IRQHandler [WEAK] + EXPORT DMA2_Stream7_IRQHandler [WEAK] + EXPORT USART6_IRQHandler [WEAK] + EXPORT I2C3_EV_IRQHandler [WEAK] + EXPORT I2C3_ER_IRQHandler [WEAK] + EXPORT OTG_HS_EP1_OUT_IRQHandler [WEAK] + EXPORT OTG_HS_EP1_IN_IRQHandler [WEAK] + EXPORT OTG_HS_WKUP_IRQHandler [WEAK] + EXPORT OTG_HS_IRQHandler [WEAK] + EXPORT DCMI_PSSI_IRQHandler [WEAK] + EXPORT RNG_IRQHandler [WEAK] + EXPORT FPU_IRQHandler [WEAK] + EXPORT UART7_IRQHandler [WEAK] + EXPORT UART8_IRQHandler [WEAK] + EXPORT SPI4_IRQHandler [WEAK] + EXPORT SPI5_IRQHandler [WEAK] + EXPORT SPI6_IRQHandler [WEAK] + EXPORT SAI1_IRQHandler [WEAK] + EXPORT LTDC_IRQHandler [WEAK] + EXPORT LTDC_ER_IRQHandler [WEAK] + EXPORT DMA2D_IRQHandler [WEAK] + EXPORT OCTOSPI1_IRQHandler [WEAK] + EXPORT LPTIM1_IRQHandler [WEAK] + EXPORT CEC_IRQHandler [WEAK] + EXPORT I2C4_EV_IRQHandler [WEAK] + EXPORT I2C4_ER_IRQHandler [WEAK] + EXPORT SPDIF_RX_IRQHandler [WEAK] + EXPORT DMAMUX1_OVR_IRQHandler [WEAK] + EXPORT DFSDM1_FLT0_IRQHandler [WEAK] + EXPORT DFSDM1_FLT1_IRQHandler [WEAK] + EXPORT DFSDM1_FLT2_IRQHandler [WEAK] + EXPORT DFSDM1_FLT3_IRQHandler [WEAK] + EXPORT SWPMI1_IRQHandler [WEAK] + EXPORT TIM15_IRQHandler [WEAK] + EXPORT TIM16_IRQHandler [WEAK] + EXPORT TIM17_IRQHandler [WEAK] + EXPORT MDIOS_WKUP_IRQHandler [WEAK] + EXPORT MDIOS_IRQHandler [WEAK] + EXPORT MDMA_IRQHandler [WEAK] + EXPORT SDMMC2_IRQHandler [WEAK] + EXPORT HSEM1_IRQHandler [WEAK] + EXPORT ADC3_IRQHandler [WEAK] + EXPORT DMAMUX2_OVR_IRQHandler [WEAK] + EXPORT BDMA_Channel0_IRQHandler [WEAK] + EXPORT BDMA_Channel1_IRQHandler [WEAK] + EXPORT BDMA_Channel2_IRQHandler [WEAK] + EXPORT BDMA_Channel3_IRQHandler [WEAK] + EXPORT BDMA_Channel4_IRQHandler [WEAK] + EXPORT BDMA_Channel5_IRQHandler [WEAK] + EXPORT BDMA_Channel6_IRQHandler [WEAK] + EXPORT BDMA_Channel7_IRQHandler [WEAK] + EXPORT COMP1_IRQHandler [WEAK] + EXPORT LPTIM2_IRQHandler [WEAK] + EXPORT LPTIM3_IRQHandler [WEAK] + EXPORT LPTIM4_IRQHandler [WEAK] + EXPORT LPTIM5_IRQHandler [WEAK] + EXPORT LPUART1_IRQHandler [WEAK] + EXPORT CRS_IRQHandler [WEAK] + EXPORT ECC_IRQHandler [WEAK] + EXPORT SAI4_IRQHandler [WEAK] + EXPORT DTS_IRQHandler [WEAK] + EXPORT WAKEUP_PIN_IRQHandler [WEAK] + EXPORT OCTOSPI2_IRQHandler [WEAK] + EXPORT FMAC_IRQHandler [WEAK] + EXPORT CORDIC_IRQHandler [WEAK] + EXPORT UART9_IRQHandler [WEAK] + EXPORT USART10_IRQHandler [WEAK] + EXPORT I2C5_EV_IRQHandler [WEAK] + EXPORT I2C5_ER_IRQHandler [WEAK] + EXPORT FDCAN3_IT0_IRQHandler [WEAK] + EXPORT FDCAN3_IT1_IRQHandler [WEAK] + EXPORT TIM23_IRQHandler [WEAK] + EXPORT TIM24_IRQHandler [WEAK] + +WWDG_IRQHandler +PVD_AVD_IRQHandler +TAMP_STAMP_IRQHandler +RTC_WKUP_IRQHandler +FLASH_IRQHandler +RCC_IRQHandler +EXTI0_IRQHandler +EXTI1_IRQHandler +EXTI2_IRQHandler +EXTI3_IRQHandler +EXTI4_IRQHandler +DMA1_Stream0_IRQHandler +DMA1_Stream1_IRQHandler +DMA1_Stream2_IRQHandler +DMA1_Stream3_IRQHandler +DMA1_Stream4_IRQHandler +DMA1_Stream5_IRQHandler +DMA1_Stream6_IRQHandler +ADC_IRQHandler +FDCAN1_IT0_IRQHandler +FDCAN2_IT0_IRQHandler +FDCAN1_IT1_IRQHandler +FDCAN2_IT1_IRQHandler +EXTI9_5_IRQHandler +TIM1_BRK_IRQHandler +TIM1_UP_IRQHandler +TIM1_TRG_COM_IRQHandler +TIM1_CC_IRQHandler +TIM2_IRQHandler +TIM3_IRQHandler +TIM4_IRQHandler +I2C1_EV_IRQHandler +I2C1_ER_IRQHandler +I2C2_EV_IRQHandler +I2C2_ER_IRQHandler +SPI1_IRQHandler +SPI2_IRQHandler +USART1_IRQHandler +USART2_IRQHandler +USART3_IRQHandler +EXTI15_10_IRQHandler +RTC_Alarm_IRQHandler +TIM8_BRK_TIM12_IRQHandler +TIM8_UP_TIM13_IRQHandler +TIM8_TRG_COM_TIM14_IRQHandler +TIM8_CC_IRQHandler +DMA1_Stream7_IRQHandler +FMC_IRQHandler +SDMMC1_IRQHandler +TIM5_IRQHandler +SPI3_IRQHandler +UART4_IRQHandler +UART5_IRQHandler +TIM6_DAC_IRQHandler +TIM7_IRQHandler +DMA2_Stream0_IRQHandler +DMA2_Stream1_IRQHandler +DMA2_Stream2_IRQHandler +DMA2_Stream3_IRQHandler +DMA2_Stream4_IRQHandler +ETH_IRQHandler +ETH_WKUP_IRQHandler +FDCAN_CAL_IRQHandler +DMA2_Stream5_IRQHandler +DMA2_Stream6_IRQHandler +DMA2_Stream7_IRQHandler +USART6_IRQHandler +I2C3_EV_IRQHandler +I2C3_ER_IRQHandler +OTG_HS_EP1_OUT_IRQHandler +OTG_HS_EP1_IN_IRQHandler +OTG_HS_WKUP_IRQHandler +OTG_HS_IRQHandler +DCMI_PSSI_IRQHandler +RNG_IRQHandler +FPU_IRQHandler +UART7_IRQHandler +UART8_IRQHandler +SPI4_IRQHandler +SPI5_IRQHandler +SPI6_IRQHandler +SAI1_IRQHandler +LTDC_IRQHandler +LTDC_ER_IRQHandler +DMA2D_IRQHandler +OCTOSPI1_IRQHandler +LPTIM1_IRQHandler +CEC_IRQHandler +I2C4_EV_IRQHandler +I2C4_ER_IRQHandler +SPDIF_RX_IRQHandler +DMAMUX1_OVR_IRQHandler +DFSDM1_FLT0_IRQHandler +DFSDM1_FLT1_IRQHandler +DFSDM1_FLT2_IRQHandler +DFSDM1_FLT3_IRQHandler +SWPMI1_IRQHandler +TIM15_IRQHandler +TIM16_IRQHandler +TIM17_IRQHandler +MDIOS_WKUP_IRQHandler +MDIOS_IRQHandler +MDMA_IRQHandler +SDMMC2_IRQHandler +HSEM1_IRQHandler +ADC3_IRQHandler +DMAMUX2_OVR_IRQHandler +BDMA_Channel0_IRQHandler +BDMA_Channel1_IRQHandler +BDMA_Channel2_IRQHandler +BDMA_Channel3_IRQHandler +BDMA_Channel4_IRQHandler +BDMA_Channel5_IRQHandler +BDMA_Channel6_IRQHandler +BDMA_Channel7_IRQHandler +COMP1_IRQHandler +LPTIM2_IRQHandler +LPTIM3_IRQHandler +LPTIM4_IRQHandler +LPTIM5_IRQHandler +LPUART1_IRQHandler +CRS_IRQHandler +ECC_IRQHandler +SAI4_IRQHandler +DTS_IRQHandler +WAKEUP_PIN_IRQHandler +OCTOSPI2_IRQHandler +FMAC_IRQHandler +CORDIC_IRQHandler +UART9_IRQHandler +USART10_IRQHandler +I2C5_EV_IRQHandler +I2C5_ER_IRQHandler +FDCAN3_IT0_IRQHandler +FDCAN3_IT1_IRQHandler +TIM23_IRQHandler +TIM24_IRQHandler + + B . + + ENDP + + ALIGN + +;******************************************************************************* +; User Stack and Heap initialization +;******************************************************************************* + IF :DEF:__MICROLIB + + EXPORT __initial_sp + EXPORT __heap_base + EXPORT __heap_limit + + ELSE + + IMPORT __use_two_region_memory + EXPORT __user_initial_stackheap + +__user_initial_stackheap + + LDR R0, = Heap_Mem + LDR R1, =(Stack_Mem + Stack_Size) + LDR R2, = (Heap_Mem + Heap_Size) + LDR R3, = Stack_Mem + BX LR + + ALIGN + + ENDIF + + END + +;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE***** diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h730xx.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h730xx.s new file mode 100644 index 0000000..03814d7 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h730xx.s @@ -0,0 +1,624 @@ +;******************** (C) COPYRIGHT 2019 STMicroelectronics ******************** +;* File Name : startup_stm32h730xx.s +;* @author MCD Application Team +;* Description : STM32H7xx devices vector table for MDK-ARM toolchain. +;* This module performs: +;* - Set the initial SP +;* - Set the initial PC == Reset_Handler +;* - Set the vector table entries with the exceptions ISR address +;* - Branches to __main in the C library (which eventually +;* calls main()). +;* After Reset the Cortex-M processor is in Thread mode, +;* priority is Privileged, and the Stack is set to Main. +;* <<< Use Configuration Wizard in Context Menu >>> +;****************************************************************************** +;* @attention +;* +;* Copyright (c) 2019 STMicroelectronics. +;* All rights reserved. +;* +;* This software component is licensed by ST under BSD 3-Clause license, +;* the "License"; You may not use this file except in compliance with the +;* License. You may obtain a copy of the License at: +;* opensource.org/licenses/BSD-3-Clause +;* +;****************************************************************************** + +; Amount of memory (in bytes) allocated for Stack +; Tailor this value to your application needs +; Stack Configuration +; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Stack_Size EQU 0x00000400 + + AREA STACK, NOINIT, READWRITE, ALIGN=3 +Stack_Mem SPACE Stack_Size +__initial_sp + + +; Heap Configuration +; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Heap_Size EQU 0x00000200 + + AREA HEAP, NOINIT, READWRITE, ALIGN=3 +__heap_base +Heap_Mem SPACE Heap_Size +__heap_limit + + PRESERVE8 + THUMB + + +; Vector Table Mapped to Address 0 at Reset + AREA RESET, DATA, READONLY + EXPORT __Vectors + EXPORT __Vectors_End + EXPORT __Vectors_Size + +__Vectors DCD __initial_sp ; Top of Stack + DCD Reset_Handler ; Reset Handler + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD MemManage_Handler ; MPU Fault Handler + DCD BusFault_Handler ; Bus Fault Handler + DCD UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WWDG_IRQHandler ; Window WatchDog interrupt ( wwdg1_it) + DCD PVD_AVD_IRQHandler ; PVD/AVD through EXTI Line detection + DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line + DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line + DCD FLASH_IRQHandler ; FLASH + DCD RCC_IRQHandler ; RCC + DCD EXTI0_IRQHandler ; EXTI Line0 + DCD EXTI1_IRQHandler ; EXTI Line1 + DCD EXTI2_IRQHandler ; EXTI Line2 + DCD EXTI3_IRQHandler ; EXTI Line3 + DCD EXTI4_IRQHandler ; EXTI Line4 + DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 + DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 + DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 + DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 + DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 + DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 + DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 + DCD ADC_IRQHandler ; ADC1, ADC2 + DCD FDCAN1_IT0_IRQHandler ; FDCAN1 interrupt line 0 + DCD FDCAN2_IT0_IRQHandler ; FDCAN2 interrupt line 0 + DCD FDCAN1_IT1_IRQHandler ; FDCAN1 interrupt line 1 + DCD FDCAN2_IT1_IRQHandler ; FDCAN2 interrupt line 1 + DCD EXTI9_5_IRQHandler ; External Line[9:5]s + DCD TIM1_BRK_IRQHandler ; TIM1 Break interrupt + DCD TIM1_UP_IRQHandler ; TIM1 Update Interrupt + DCD TIM1_TRG_COM_IRQHandler ; TIM1 Trigger and Commutation Interrupt + DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare + DCD TIM2_IRQHandler ; TIM2 + DCD TIM3_IRQHandler ; TIM3 + DCD TIM4_IRQHandler ; TIM4 + DCD I2C1_EV_IRQHandler ; I2C1 Event + DCD I2C1_ER_IRQHandler ; I2C1 Error + DCD I2C2_EV_IRQHandler ; I2C2 Event + DCD I2C2_ER_IRQHandler ; I2C2 Error + DCD SPI1_IRQHandler ; SPI1 + DCD SPI2_IRQHandler ; SPI2 + DCD USART1_IRQHandler ; USART1 + DCD USART2_IRQHandler ; USART2 + DCD USART3_IRQHandler ; USART3 + DCD EXTI15_10_IRQHandler ; External Line[15:10] + DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line + DCD 0 ; Reserved + DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break Interrupt and TIM12 global interrupt + DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update Interrupt and TIM13 global interrupt + DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation Interrupt and TIM14 global interrupt + DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare Interrupt + DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 + DCD FMC_IRQHandler ; FMC + DCD SDMMC1_IRQHandler ; SDMMC1 + DCD TIM5_IRQHandler ; TIM5 + DCD SPI3_IRQHandler ; SPI3 + DCD UART4_IRQHandler ; UART4 + DCD UART5_IRQHandler ; UART5 + DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors + DCD TIM7_IRQHandler ; TIM7 + DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 + DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 + DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 + DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 + DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 + DCD ETH_IRQHandler ; Ethernet + DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line + DCD FDCAN_CAL_IRQHandler ; FDCAN calibration unit interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 + DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 + DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 + DCD USART6_IRQHandler ; USART6 + DCD I2C3_EV_IRQHandler ; I2C3 event + DCD I2C3_ER_IRQHandler ; I2C3 error + DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out + DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In + DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI + DCD OTG_HS_IRQHandler ; USB OTG HS + DCD DCMI_PSSI_IRQHandler ; DCMI, PSSI + DCD CRYP_IRQHandler ; CRYP + DCD HASH_RNG_IRQHandler ; Hash and Rng + DCD FPU_IRQHandler ; FPU + DCD UART7_IRQHandler ; UART7 + DCD UART8_IRQHandler ; UART8 + DCD SPI4_IRQHandler ; SPI4 + DCD SPI5_IRQHandler ; SPI5 + DCD SPI6_IRQHandler ; SPI6 + DCD SAI1_IRQHandler ; SAI1 + DCD LTDC_IRQHandler ; LTDC + DCD LTDC_ER_IRQHandler ; LTDC error + DCD DMA2D_IRQHandler ; DMA2D + DCD 0 ; Reserved + DCD OCTOSPI1_IRQHandler ; OCTOSPI1 + DCD LPTIM1_IRQHandler ; LPTIM1 + DCD CEC_IRQHandler ; HDMI_CEC + DCD I2C4_EV_IRQHandler ; I2C4 Event + DCD I2C4_ER_IRQHandler ; I2C4 Error + DCD SPDIF_RX_IRQHandler ; SPDIF_RX + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DMAMUX1_OVR_IRQHandler ; DMAMUX1 Overrun interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DFSDM1_FLT0_IRQHandler ; DFSDM Filter0 Interrupt + DCD DFSDM1_FLT1_IRQHandler ; DFSDM Filter1 Interrupt + DCD DFSDM1_FLT2_IRQHandler ; DFSDM Filter2 Interrupt + DCD DFSDM1_FLT3_IRQHandler ; DFSDM Filter3 Interrupt + DCD 0 ; Reserved + DCD SWPMI1_IRQHandler ; Serial Wire Interface 1 global interrupt + DCD TIM15_IRQHandler ; TIM15 global Interrupt + DCD TIM16_IRQHandler ; TIM16 global Interrupt + DCD TIM17_IRQHandler ; TIM17 global Interrupt + DCD MDIOS_WKUP_IRQHandler ; MDIOS Wakeup Interrupt + DCD MDIOS_IRQHandler ; MDIOS global Interrupt + DCD 0 ; Reserved + DCD MDMA_IRQHandler ; MDMA global Interrupt + DCD 0 ; Reserved + DCD SDMMC2_IRQHandler ; SDMMC2 global Interrupt + DCD HSEM1_IRQHandler ; HSEM1 global Interrupt + DCD 0 ; Reserved + DCD ADC3_IRQHandler ; ADC3 global Interrupt + DCD DMAMUX2_OVR_IRQHandler ; DMAMUX Overrun interrupt + DCD BDMA_Channel0_IRQHandler ; BDMA Channel 0 global Interrupt + DCD BDMA_Channel1_IRQHandler ; BDMA Channel 1 global Interrupt + DCD BDMA_Channel2_IRQHandler ; BDMA Channel 2 global Interrupt + DCD BDMA_Channel3_IRQHandler ; BDMA Channel 3 global Interrupt + DCD BDMA_Channel4_IRQHandler ; BDMA Channel 4 global Interrupt + DCD BDMA_Channel5_IRQHandler ; BDMA Channel 5 global Interrupt + DCD BDMA_Channel6_IRQHandler ; BDMA Channel 6 global Interrupt + DCD BDMA_Channel7_IRQHandler ; BDMA Channel 7 global Interrupt + DCD COMP1_IRQHandler ; COMP1 global Interrupt + DCD LPTIM2_IRQHandler ; LP TIM2 global interrupt + DCD LPTIM3_IRQHandler ; LP TIM3 global interrupt + DCD LPTIM4_IRQHandler ; LP TIM4 global interrupt + DCD LPTIM5_IRQHandler ; LP TIM5 global interrupt + DCD LPUART1_IRQHandler ; LP UART1 interrupt + DCD 0 ; Reserved + DCD CRS_IRQHandler ; Clock Recovery Global Interrupt + DCD ECC_IRQHandler ; ECC diagnostic Global Interrupt + DCD SAI4_IRQHandler ; SAI4 global interrupt + DCD DTS_IRQHandler ; DTS interrupt + DCD 0 ; Reserved + DCD WAKEUP_PIN_IRQHandler ; Interrupt for all 6 wake-up pins + DCD OCTOSPI2_IRQHandler ; OCTOSPI2 Interrupt + DCD OTFDEC1_IRQHandler ; OTFDEC1 Interrupt + DCD OTFDEC2_IRQHandler ; OTFDEC2 Interrupt + DCD FMAC_IRQHandler ; FMAC Interrupt + DCD CORDIC_IRQHandler ; CORDIC Interrupt + DCD UART9_IRQHandler ; UART9 Interrupt + DCD USART10_IRQHandler ; UART10 Interrupt + DCD I2C5_EV_IRQHandler ; I2C5 Event Interrupt + DCD I2C5_ER_IRQHandler ; I2C5 Error Interrupt + DCD FDCAN3_IT0_IRQHandler ; FDCAN3 interrupt line 0 + DCD FDCAN3_IT1_IRQHandler ; FDCAN3 interrupt line 1 + DCD TIM23_IRQHandler ; TIM23 global interrup + DCD TIM24_IRQHandler ; TIM24 global interrup + +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + + AREA |.text|, CODE, READONLY + +; Reset handler +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT SystemInit + IMPORT __main + + LDR R0, =SystemInit + BLX R0 + LDR R0, =__main + BX R0 + ENDP + +; Dummy Exception Handlers (infinite loops which can be modified) + +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP +HardFault_Handler\ + PROC + EXPORT HardFault_Handler [WEAK] + B . + ENDP +MemManage_Handler\ + PROC + EXPORT MemManage_Handler [WEAK] + B . + ENDP +BusFault_Handler\ + PROC + EXPORT BusFault_Handler [WEAK] + B . + ENDP +UsageFault_Handler\ + PROC + EXPORT UsageFault_Handler [WEAK] + B . + ENDP +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +DebugMon_Handler\ + PROC + EXPORT DebugMon_Handler [WEAK] + B . + ENDP +PendSV_Handler PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC + + EXPORT WWDG_IRQHandler [WEAK] + EXPORT PVD_AVD_IRQHandler [WEAK] + EXPORT TAMP_STAMP_IRQHandler [WEAK] + EXPORT RTC_WKUP_IRQHandler [WEAK] + EXPORT FLASH_IRQHandler [WEAK] + EXPORT RCC_IRQHandler [WEAK] + EXPORT EXTI0_IRQHandler [WEAK] + EXPORT EXTI1_IRQHandler [WEAK] + EXPORT EXTI2_IRQHandler [WEAK] + EXPORT EXTI3_IRQHandler [WEAK] + EXPORT EXTI4_IRQHandler [WEAK] + EXPORT DMA1_Stream0_IRQHandler [WEAK] + EXPORT DMA1_Stream1_IRQHandler [WEAK] + EXPORT DMA1_Stream2_IRQHandler [WEAK] + EXPORT DMA1_Stream3_IRQHandler [WEAK] + EXPORT DMA1_Stream4_IRQHandler [WEAK] + EXPORT DMA1_Stream5_IRQHandler [WEAK] + EXPORT DMA1_Stream6_IRQHandler [WEAK] + EXPORT DMA1_Stream7_IRQHandler [WEAK] + EXPORT ADC_IRQHandler [WEAK] + EXPORT FDCAN1_IT0_IRQHandler [WEAK] + EXPORT FDCAN2_IT0_IRQHandler [WEAK] + EXPORT FDCAN1_IT1_IRQHandler [WEAK] + EXPORT FDCAN2_IT1_IRQHandler [WEAK] + EXPORT EXTI9_5_IRQHandler [WEAK] + EXPORT TIM1_BRK_IRQHandler [WEAK] + EXPORT TIM1_UP_IRQHandler [WEAK] + EXPORT TIM1_TRG_COM_IRQHandler [WEAK] + EXPORT TIM1_CC_IRQHandler [WEAK] + EXPORT TIM2_IRQHandler [WEAK] + EXPORT TIM3_IRQHandler [WEAK] + EXPORT TIM4_IRQHandler [WEAK] + EXPORT I2C1_EV_IRQHandler [WEAK] + EXPORT I2C1_ER_IRQHandler [WEAK] + EXPORT I2C2_EV_IRQHandler [WEAK] + EXPORT I2C2_ER_IRQHandler [WEAK] + EXPORT SPI1_IRQHandler [WEAK] + EXPORT SPI2_IRQHandler [WEAK] + EXPORT USART1_IRQHandler [WEAK] + EXPORT USART2_IRQHandler [WEAK] + EXPORT USART3_IRQHandler [WEAK] + EXPORT EXTI15_10_IRQHandler [WEAK] + EXPORT RTC_Alarm_IRQHandler [WEAK] + EXPORT TIM8_BRK_TIM12_IRQHandler [WEAK] + EXPORT TIM8_UP_TIM13_IRQHandler [WEAK] + EXPORT TIM8_TRG_COM_TIM14_IRQHandler [WEAK] + EXPORT TIM8_CC_IRQHandler [WEAK] + EXPORT DMA1_Stream7_IRQHandler [WEAK] + EXPORT FMC_IRQHandler [WEAK] + EXPORT SDMMC1_IRQHandler [WEAK] + EXPORT TIM5_IRQHandler [WEAK] + EXPORT SPI3_IRQHandler [WEAK] + EXPORT UART4_IRQHandler [WEAK] + EXPORT UART5_IRQHandler [WEAK] + EXPORT TIM6_DAC_IRQHandler [WEAK] + EXPORT TIM7_IRQHandler [WEAK] + EXPORT DMA2_Stream0_IRQHandler [WEAK] + EXPORT DMA2_Stream1_IRQHandler [WEAK] + EXPORT DMA2_Stream2_IRQHandler [WEAK] + EXPORT DMA2_Stream3_IRQHandler [WEAK] + EXPORT DMA2_Stream4_IRQHandler [WEAK] + EXPORT ETH_IRQHandler [WEAK] + EXPORT ETH_WKUP_IRQHandler [WEAK] + EXPORT FDCAN_CAL_IRQHandler [WEAK] + EXPORT DMA2_Stream5_IRQHandler [WEAK] + EXPORT DMA2_Stream6_IRQHandler [WEAK] + EXPORT DMA2_Stream7_IRQHandler [WEAK] + EXPORT USART6_IRQHandler [WEAK] + EXPORT I2C3_EV_IRQHandler [WEAK] + EXPORT I2C3_ER_IRQHandler [WEAK] + EXPORT OTG_HS_EP1_OUT_IRQHandler [WEAK] + EXPORT OTG_HS_EP1_IN_IRQHandler [WEAK] + EXPORT OTG_HS_WKUP_IRQHandler [WEAK] + EXPORT OTG_HS_IRQHandler [WEAK] + EXPORT DCMI_PSSI_IRQHandler [WEAK] + EXPORT CRYP_IRQHandler [WEAK] + EXPORT HASH_RNG_IRQHandler [WEAK] + EXPORT FPU_IRQHandler [WEAK] + EXPORT UART7_IRQHandler [WEAK] + EXPORT UART8_IRQHandler [WEAK] + EXPORT SPI4_IRQHandler [WEAK] + EXPORT SPI5_IRQHandler [WEAK] + EXPORT SPI6_IRQHandler [WEAK] + EXPORT SAI1_IRQHandler [WEAK] + EXPORT LTDC_IRQHandler [WEAK] + EXPORT LTDC_ER_IRQHandler [WEAK] + EXPORT DMA2D_IRQHandler [WEAK] + EXPORT OCTOSPI1_IRQHandler [WEAK] + EXPORT LPTIM1_IRQHandler [WEAK] + EXPORT CEC_IRQHandler [WEAK] + EXPORT I2C4_EV_IRQHandler [WEAK] + EXPORT I2C4_ER_IRQHandler [WEAK] + EXPORT SPDIF_RX_IRQHandler [WEAK] + EXPORT DMAMUX1_OVR_IRQHandler [WEAK] + EXPORT DFSDM1_FLT0_IRQHandler [WEAK] + EXPORT DFSDM1_FLT1_IRQHandler [WEAK] + EXPORT DFSDM1_FLT2_IRQHandler [WEAK] + EXPORT DFSDM1_FLT3_IRQHandler [WEAK] + EXPORT SWPMI1_IRQHandler [WEAK] + EXPORT TIM15_IRQHandler [WEAK] + EXPORT TIM16_IRQHandler [WEAK] + EXPORT TIM17_IRQHandler [WEAK] + EXPORT MDIOS_WKUP_IRQHandler [WEAK] + EXPORT MDIOS_IRQHandler [WEAK] + EXPORT MDMA_IRQHandler [WEAK] + EXPORT SDMMC2_IRQHandler [WEAK] + EXPORT HSEM1_IRQHandler [WEAK] + EXPORT ADC3_IRQHandler [WEAK] + EXPORT DMAMUX2_OVR_IRQHandler [WEAK] + EXPORT BDMA_Channel0_IRQHandler [WEAK] + EXPORT BDMA_Channel1_IRQHandler [WEAK] + EXPORT BDMA_Channel2_IRQHandler [WEAK] + EXPORT BDMA_Channel3_IRQHandler [WEAK] + EXPORT BDMA_Channel4_IRQHandler [WEAK] + EXPORT BDMA_Channel5_IRQHandler [WEAK] + EXPORT BDMA_Channel6_IRQHandler [WEAK] + EXPORT BDMA_Channel7_IRQHandler [WEAK] + EXPORT COMP1_IRQHandler [WEAK] + EXPORT LPTIM2_IRQHandler [WEAK] + EXPORT LPTIM3_IRQHandler [WEAK] + EXPORT LPTIM4_IRQHandler [WEAK] + EXPORT LPTIM5_IRQHandler [WEAK] + EXPORT LPUART1_IRQHandler [WEAK] + EXPORT CRS_IRQHandler [WEAK] + EXPORT ECC_IRQHandler [WEAK] + EXPORT SAI4_IRQHandler [WEAK] + EXPORT DTS_IRQHandler [WEAK] + EXPORT WAKEUP_PIN_IRQHandler [WEAK] + EXPORT OCTOSPI2_IRQHandler [WEAK] + EXPORT OTFDEC1_IRQHandler [WEAK] + EXPORT OTFDEC2_IRQHandler [WEAK] + EXPORT FMAC_IRQHandler [WEAK] + EXPORT CORDIC_IRQHandler [WEAK] + EXPORT UART9_IRQHandler [WEAK] + EXPORT USART10_IRQHandler [WEAK] + EXPORT I2C5_EV_IRQHandler [WEAK] + EXPORT I2C5_ER_IRQHandler [WEAK] + EXPORT FDCAN3_IT0_IRQHandler [WEAK] + EXPORT FDCAN3_IT1_IRQHandler [WEAK] + EXPORT TIM23_IRQHandler [WEAK] + EXPORT TIM24_IRQHandler [WEAK] + +WWDG_IRQHandler +PVD_AVD_IRQHandler +TAMP_STAMP_IRQHandler +RTC_WKUP_IRQHandler +FLASH_IRQHandler +RCC_IRQHandler +EXTI0_IRQHandler +EXTI1_IRQHandler +EXTI2_IRQHandler +EXTI3_IRQHandler +EXTI4_IRQHandler +DMA1_Stream0_IRQHandler +DMA1_Stream1_IRQHandler +DMA1_Stream2_IRQHandler +DMA1_Stream3_IRQHandler +DMA1_Stream4_IRQHandler +DMA1_Stream5_IRQHandler +DMA1_Stream6_IRQHandler +ADC_IRQHandler +FDCAN1_IT0_IRQHandler +FDCAN2_IT0_IRQHandler +FDCAN1_IT1_IRQHandler +FDCAN2_IT1_IRQHandler +EXTI9_5_IRQHandler +TIM1_BRK_IRQHandler +TIM1_UP_IRQHandler +TIM1_TRG_COM_IRQHandler +TIM1_CC_IRQHandler +TIM2_IRQHandler +TIM3_IRQHandler +TIM4_IRQHandler +I2C1_EV_IRQHandler +I2C1_ER_IRQHandler +I2C2_EV_IRQHandler +I2C2_ER_IRQHandler +SPI1_IRQHandler +SPI2_IRQHandler +USART1_IRQHandler +USART2_IRQHandler +USART3_IRQHandler +EXTI15_10_IRQHandler +RTC_Alarm_IRQHandler +TIM8_BRK_TIM12_IRQHandler +TIM8_UP_TIM13_IRQHandler +TIM8_TRG_COM_TIM14_IRQHandler +TIM8_CC_IRQHandler +DMA1_Stream7_IRQHandler +FMC_IRQHandler +SDMMC1_IRQHandler +TIM5_IRQHandler +SPI3_IRQHandler +UART4_IRQHandler +UART5_IRQHandler +TIM6_DAC_IRQHandler +TIM7_IRQHandler +DMA2_Stream0_IRQHandler +DMA2_Stream1_IRQHandler +DMA2_Stream2_IRQHandler +DMA2_Stream3_IRQHandler +DMA2_Stream4_IRQHandler +ETH_IRQHandler +ETH_WKUP_IRQHandler +FDCAN_CAL_IRQHandler +DMA2_Stream5_IRQHandler +DMA2_Stream6_IRQHandler +DMA2_Stream7_IRQHandler +USART6_IRQHandler +I2C3_EV_IRQHandler +I2C3_ER_IRQHandler +OTG_HS_EP1_OUT_IRQHandler +OTG_HS_EP1_IN_IRQHandler +OTG_HS_WKUP_IRQHandler +OTG_HS_IRQHandler +DCMI_PSSI_IRQHandler +CRYP_IRQHandler +HASH_RNG_IRQHandler +FPU_IRQHandler +UART7_IRQHandler +UART8_IRQHandler +SPI4_IRQHandler +SPI5_IRQHandler +SPI6_IRQHandler +SAI1_IRQHandler +LTDC_IRQHandler +LTDC_ER_IRQHandler +DMA2D_IRQHandler +OCTOSPI1_IRQHandler +LPTIM1_IRQHandler +CEC_IRQHandler +I2C4_EV_IRQHandler +I2C4_ER_IRQHandler +SPDIF_RX_IRQHandler +DMAMUX1_OVR_IRQHandler +DFSDM1_FLT0_IRQHandler +DFSDM1_FLT1_IRQHandler +DFSDM1_FLT2_IRQHandler +DFSDM1_FLT3_IRQHandler +SWPMI1_IRQHandler +TIM15_IRQHandler +TIM16_IRQHandler +TIM17_IRQHandler +MDIOS_WKUP_IRQHandler +MDIOS_IRQHandler +MDMA_IRQHandler +SDMMC2_IRQHandler +HSEM1_IRQHandler +ADC3_IRQHandler +DMAMUX2_OVR_IRQHandler +BDMA_Channel0_IRQHandler +BDMA_Channel1_IRQHandler +BDMA_Channel2_IRQHandler +BDMA_Channel3_IRQHandler +BDMA_Channel4_IRQHandler +BDMA_Channel5_IRQHandler +BDMA_Channel6_IRQHandler +BDMA_Channel7_IRQHandler +COMP1_IRQHandler +LPTIM2_IRQHandler +LPTIM3_IRQHandler +LPTIM4_IRQHandler +LPTIM5_IRQHandler +LPUART1_IRQHandler +CRS_IRQHandler +ECC_IRQHandler +SAI4_IRQHandler +DTS_IRQHandler +WAKEUP_PIN_IRQHandler +OCTOSPI2_IRQHandler +OTFDEC1_IRQHandler +OTFDEC2_IRQHandler +FMAC_IRQHandler +CORDIC_IRQHandler +UART9_IRQHandler +USART10_IRQHandler +I2C5_EV_IRQHandler +I2C5_ER_IRQHandler +FDCAN3_IT0_IRQHandler +FDCAN3_IT1_IRQHandler +TIM23_IRQHandler +TIM24_IRQHandler + + B . + + ENDP + + ALIGN + +;******************************************************************************* +; User Stack and Heap initialization +;******************************************************************************* + IF :DEF:__MICROLIB + + EXPORT __initial_sp + EXPORT __heap_base + EXPORT __heap_limit + + ELSE + + IMPORT __use_two_region_memory + EXPORT __user_initial_stackheap + +__user_initial_stackheap + + LDR R0, = Heap_Mem + LDR R1, =(Stack_Mem + Stack_Size) + LDR R2, = (Heap_Mem + Heap_Size) + LDR R3, = Stack_Mem + BX LR + + ALIGN + + ENDIF + + END + +;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE***** diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h730xxq.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h730xxq.s new file mode 100644 index 0000000..0480345 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h730xxq.s @@ -0,0 +1,624 @@ +;******************** (C) COPYRIGHT 2019 STMicroelectronics ******************** +;* File Name : startup_stm32h730xxq.s +;* @author MCD Application Team +;* Description : STM32H7xx devices vector table for MDK-ARM toolchain. +;* This module performs: +;* - Set the initial SP +;* - Set the initial PC == Reset_Handler +;* - Set the vector table entries with the exceptions ISR address +;* - Branches to __main in the C library (which eventually +;* calls main()). +;* After Reset the Cortex-M processor is in Thread mode, +;* priority is Privileged, and the Stack is set to Main. +;* <<< Use Configuration Wizard in Context Menu >>> +;****************************************************************************** +;* @attention +;* +;* Copyright (c) 2019 STMicroelectronics. +;* All rights reserved. +;* +;* This software component is licensed by ST under BSD 3-Clause license, +;* the "License"; You may not use this file except in compliance with the +;* License. You may obtain a copy of the License at: +;* opensource.org/licenses/BSD-3-Clause +;* +;****************************************************************************** + +; Amount of memory (in bytes) allocated for Stack +; Tailor this value to your application needs +; Stack Configuration +; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Stack_Size EQU 0x00000400 + + AREA STACK, NOINIT, READWRITE, ALIGN=3 +Stack_Mem SPACE Stack_Size +__initial_sp + + +; Heap Configuration +; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Heap_Size EQU 0x00000200 + + AREA HEAP, NOINIT, READWRITE, ALIGN=3 +__heap_base +Heap_Mem SPACE Heap_Size +__heap_limit + + PRESERVE8 + THUMB + + +; Vector Table Mapped to Address 0 at Reset + AREA RESET, DATA, READONLY + EXPORT __Vectors + EXPORT __Vectors_End + EXPORT __Vectors_Size + +__Vectors DCD __initial_sp ; Top of Stack + DCD Reset_Handler ; Reset Handler + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD MemManage_Handler ; MPU Fault Handler + DCD BusFault_Handler ; Bus Fault Handler + DCD UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WWDG_IRQHandler ; Window WatchDog interrupt ( wwdg1_it) + DCD PVD_AVD_IRQHandler ; PVD/AVD through EXTI Line detection + DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line + DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line + DCD FLASH_IRQHandler ; FLASH + DCD RCC_IRQHandler ; RCC + DCD EXTI0_IRQHandler ; EXTI Line0 + DCD EXTI1_IRQHandler ; EXTI Line1 + DCD EXTI2_IRQHandler ; EXTI Line2 + DCD EXTI3_IRQHandler ; EXTI Line3 + DCD EXTI4_IRQHandler ; EXTI Line4 + DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 + DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 + DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 + DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 + DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 + DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 + DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 + DCD ADC_IRQHandler ; ADC1, ADC2 + DCD FDCAN1_IT0_IRQHandler ; FDCAN1 interrupt line 0 + DCD FDCAN2_IT0_IRQHandler ; FDCAN2 interrupt line 0 + DCD FDCAN1_IT1_IRQHandler ; FDCAN1 interrupt line 1 + DCD FDCAN2_IT1_IRQHandler ; FDCAN2 interrupt line 1 + DCD EXTI9_5_IRQHandler ; External Line[9:5]s + DCD TIM1_BRK_IRQHandler ; TIM1 Break interrupt + DCD TIM1_UP_IRQHandler ; TIM1 Update Interrupt + DCD TIM1_TRG_COM_IRQHandler ; TIM1 Trigger and Commutation Interrupt + DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare + DCD TIM2_IRQHandler ; TIM2 + DCD TIM3_IRQHandler ; TIM3 + DCD TIM4_IRQHandler ; TIM4 + DCD I2C1_EV_IRQHandler ; I2C1 Event + DCD I2C1_ER_IRQHandler ; I2C1 Error + DCD I2C2_EV_IRQHandler ; I2C2 Event + DCD I2C2_ER_IRQHandler ; I2C2 Error + DCD SPI1_IRQHandler ; SPI1 + DCD SPI2_IRQHandler ; SPI2 + DCD USART1_IRQHandler ; USART1 + DCD USART2_IRQHandler ; USART2 + DCD USART3_IRQHandler ; USART3 + DCD EXTI15_10_IRQHandler ; External Line[15:10] + DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line + DCD 0 ; Reserved + DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break Interrupt and TIM12 global interrupt + DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update Interrupt and TIM13 global interrupt + DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation Interrupt and TIM14 global interrupt + DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare Interrupt + DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 + DCD FMC_IRQHandler ; FMC + DCD SDMMC1_IRQHandler ; SDMMC1 + DCD TIM5_IRQHandler ; TIM5 + DCD SPI3_IRQHandler ; SPI3 + DCD UART4_IRQHandler ; UART4 + DCD UART5_IRQHandler ; UART5 + DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors + DCD TIM7_IRQHandler ; TIM7 + DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 + DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 + DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 + DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 + DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 + DCD ETH_IRQHandler ; Ethernet + DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line + DCD FDCAN_CAL_IRQHandler ; FDCAN calibration unit interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 + DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 + DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 + DCD USART6_IRQHandler ; USART6 + DCD I2C3_EV_IRQHandler ; I2C3 event + DCD I2C3_ER_IRQHandler ; I2C3 error + DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out + DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In + DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI + DCD OTG_HS_IRQHandler ; USB OTG HS + DCD DCMI_PSSI_IRQHandler ; DCMI, PSSI + DCD CRYP_IRQHandler ; CRYP + DCD HASH_RNG_IRQHandler ; Hash and Rng + DCD FPU_IRQHandler ; FPU + DCD UART7_IRQHandler ; UART7 + DCD UART8_IRQHandler ; UART8 + DCD SPI4_IRQHandler ; SPI4 + DCD SPI5_IRQHandler ; SPI5 + DCD SPI6_IRQHandler ; SPI6 + DCD SAI1_IRQHandler ; SAI1 + DCD LTDC_IRQHandler ; LTDC + DCD LTDC_ER_IRQHandler ; LTDC error + DCD DMA2D_IRQHandler ; DMA2D + DCD 0 ; Reserved + DCD OCTOSPI1_IRQHandler ; OCTOSPI1 + DCD LPTIM1_IRQHandler ; LPTIM1 + DCD CEC_IRQHandler ; HDMI_CEC + DCD I2C4_EV_IRQHandler ; I2C4 Event + DCD I2C4_ER_IRQHandler ; I2C4 Error + DCD SPDIF_RX_IRQHandler ; SPDIF_RX + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DMAMUX1_OVR_IRQHandler ; DMAMUX1 Overrun interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DFSDM1_FLT0_IRQHandler ; DFSDM Filter0 Interrupt + DCD DFSDM1_FLT1_IRQHandler ; DFSDM Filter1 Interrupt + DCD DFSDM1_FLT2_IRQHandler ; DFSDM Filter2 Interrupt + DCD DFSDM1_FLT3_IRQHandler ; DFSDM Filter3 Interrupt + DCD 0 ; Reserved + DCD SWPMI1_IRQHandler ; Serial Wire Interface 1 global interrupt + DCD TIM15_IRQHandler ; TIM15 global Interrupt + DCD TIM16_IRQHandler ; TIM16 global Interrupt + DCD TIM17_IRQHandler ; TIM17 global Interrupt + DCD MDIOS_WKUP_IRQHandler ; MDIOS Wakeup Interrupt + DCD MDIOS_IRQHandler ; MDIOS global Interrupt + DCD 0 ; Reserved + DCD MDMA_IRQHandler ; MDMA global Interrupt + DCD 0 ; Reserved + DCD SDMMC2_IRQHandler ; SDMMC2 global Interrupt + DCD HSEM1_IRQHandler ; HSEM1 global Interrupt + DCD 0 ; Reserved + DCD ADC3_IRQHandler ; ADC3 global Interrupt + DCD DMAMUX2_OVR_IRQHandler ; DMAMUX Overrun interrupt + DCD BDMA_Channel0_IRQHandler ; BDMA Channel 0 global Interrupt + DCD BDMA_Channel1_IRQHandler ; BDMA Channel 1 global Interrupt + DCD BDMA_Channel2_IRQHandler ; BDMA Channel 2 global Interrupt + DCD BDMA_Channel3_IRQHandler ; BDMA Channel 3 global Interrupt + DCD BDMA_Channel4_IRQHandler ; BDMA Channel 4 global Interrupt + DCD BDMA_Channel5_IRQHandler ; BDMA Channel 5 global Interrupt + DCD BDMA_Channel6_IRQHandler ; BDMA Channel 6 global Interrupt + DCD BDMA_Channel7_IRQHandler ; BDMA Channel 7 global Interrupt + DCD COMP1_IRQHandler ; COMP1 global Interrupt + DCD LPTIM2_IRQHandler ; LP TIM2 global interrupt + DCD LPTIM3_IRQHandler ; LP TIM3 global interrupt + DCD LPTIM4_IRQHandler ; LP TIM4 global interrupt + DCD LPTIM5_IRQHandler ; LP TIM5 global interrupt + DCD LPUART1_IRQHandler ; LP UART1 interrupt + DCD 0 ; Reserved + DCD CRS_IRQHandler ; Clock Recovery Global Interrupt + DCD ECC_IRQHandler ; ECC diagnostic Global Interrupt + DCD SAI4_IRQHandler ; SAI4 global interrupt + DCD DTS_IRQHandler ; DTS interrupt + DCD 0 ; Reserved + DCD WAKEUP_PIN_IRQHandler ; Interrupt for all 6 wake-up pins + DCD OCTOSPI2_IRQHandler ; OCTOSPI2 Interrupt + DCD OTFDEC1_IRQHandler ; OTFDEC1 Interrupt + DCD OTFDEC2_IRQHandler ; OTFDEC2 Interrupt + DCD FMAC_IRQHandler ; FMAC Interrupt + DCD CORDIC_IRQHandler ; CORDIC Interrupt + DCD UART9_IRQHandler ; UART9 Interrupt + DCD USART10_IRQHandler ; UART10 Interrupt + DCD I2C5_EV_IRQHandler ; I2C5 Event Interrupt + DCD I2C5_ER_IRQHandler ; I2C5 Error Interrupt + DCD FDCAN3_IT0_IRQHandler ; FDCAN3 interrupt line 0 + DCD FDCAN3_IT1_IRQHandler ; FDCAN3 interrupt line 1 + DCD TIM23_IRQHandler ; TIM23 global interrup + DCD TIM24_IRQHandler ; TIM24 global interrup + +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + + AREA |.text|, CODE, READONLY + +; Reset handler +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT SystemInit + IMPORT __main + + LDR R0, =SystemInit + BLX R0 + LDR R0, =__main + BX R0 + ENDP + +; Dummy Exception Handlers (infinite loops which can be modified) + +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP +HardFault_Handler\ + PROC + EXPORT HardFault_Handler [WEAK] + B . + ENDP +MemManage_Handler\ + PROC + EXPORT MemManage_Handler [WEAK] + B . + ENDP +BusFault_Handler\ + PROC + EXPORT BusFault_Handler [WEAK] + B . + ENDP +UsageFault_Handler\ + PROC + EXPORT UsageFault_Handler [WEAK] + B . + ENDP +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +DebugMon_Handler\ + PROC + EXPORT DebugMon_Handler [WEAK] + B . + ENDP +PendSV_Handler PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC + + EXPORT WWDG_IRQHandler [WEAK] + EXPORT PVD_AVD_IRQHandler [WEAK] + EXPORT TAMP_STAMP_IRQHandler [WEAK] + EXPORT RTC_WKUP_IRQHandler [WEAK] + EXPORT FLASH_IRQHandler [WEAK] + EXPORT RCC_IRQHandler [WEAK] + EXPORT EXTI0_IRQHandler [WEAK] + EXPORT EXTI1_IRQHandler [WEAK] + EXPORT EXTI2_IRQHandler [WEAK] + EXPORT EXTI3_IRQHandler [WEAK] + EXPORT EXTI4_IRQHandler [WEAK] + EXPORT DMA1_Stream0_IRQHandler [WEAK] + EXPORT DMA1_Stream1_IRQHandler [WEAK] + EXPORT DMA1_Stream2_IRQHandler [WEAK] + EXPORT DMA1_Stream3_IRQHandler [WEAK] + EXPORT DMA1_Stream4_IRQHandler [WEAK] + EXPORT DMA1_Stream5_IRQHandler [WEAK] + EXPORT DMA1_Stream6_IRQHandler [WEAK] + EXPORT DMA1_Stream7_IRQHandler [WEAK] + EXPORT ADC_IRQHandler [WEAK] + EXPORT FDCAN1_IT0_IRQHandler [WEAK] + EXPORT FDCAN2_IT0_IRQHandler [WEAK] + EXPORT FDCAN1_IT1_IRQHandler [WEAK] + EXPORT FDCAN2_IT1_IRQHandler [WEAK] + EXPORT EXTI9_5_IRQHandler [WEAK] + EXPORT TIM1_BRK_IRQHandler [WEAK] + EXPORT TIM1_UP_IRQHandler [WEAK] + EXPORT TIM1_TRG_COM_IRQHandler [WEAK] + EXPORT TIM1_CC_IRQHandler [WEAK] + EXPORT TIM2_IRQHandler [WEAK] + EXPORT TIM3_IRQHandler [WEAK] + EXPORT TIM4_IRQHandler [WEAK] + EXPORT I2C1_EV_IRQHandler [WEAK] + EXPORT I2C1_ER_IRQHandler [WEAK] + EXPORT I2C2_EV_IRQHandler [WEAK] + EXPORT I2C2_ER_IRQHandler [WEAK] + EXPORT SPI1_IRQHandler [WEAK] + EXPORT SPI2_IRQHandler [WEAK] + EXPORT USART1_IRQHandler [WEAK] + EXPORT USART2_IRQHandler [WEAK] + EXPORT USART3_IRQHandler [WEAK] + EXPORT EXTI15_10_IRQHandler [WEAK] + EXPORT RTC_Alarm_IRQHandler [WEAK] + EXPORT TIM8_BRK_TIM12_IRQHandler [WEAK] + EXPORT TIM8_UP_TIM13_IRQHandler [WEAK] + EXPORT TIM8_TRG_COM_TIM14_IRQHandler [WEAK] + EXPORT TIM8_CC_IRQHandler [WEAK] + EXPORT DMA1_Stream7_IRQHandler [WEAK] + EXPORT FMC_IRQHandler [WEAK] + EXPORT SDMMC1_IRQHandler [WEAK] + EXPORT TIM5_IRQHandler [WEAK] + EXPORT SPI3_IRQHandler [WEAK] + EXPORT UART4_IRQHandler [WEAK] + EXPORT UART5_IRQHandler [WEAK] + EXPORT TIM6_DAC_IRQHandler [WEAK] + EXPORT TIM7_IRQHandler [WEAK] + EXPORT DMA2_Stream0_IRQHandler [WEAK] + EXPORT DMA2_Stream1_IRQHandler [WEAK] + EXPORT DMA2_Stream2_IRQHandler [WEAK] + EXPORT DMA2_Stream3_IRQHandler [WEAK] + EXPORT DMA2_Stream4_IRQHandler [WEAK] + EXPORT ETH_IRQHandler [WEAK] + EXPORT ETH_WKUP_IRQHandler [WEAK] + EXPORT FDCAN_CAL_IRQHandler [WEAK] + EXPORT DMA2_Stream5_IRQHandler [WEAK] + EXPORT DMA2_Stream6_IRQHandler [WEAK] + EXPORT DMA2_Stream7_IRQHandler [WEAK] + EXPORT USART6_IRQHandler [WEAK] + EXPORT I2C3_EV_IRQHandler [WEAK] + EXPORT I2C3_ER_IRQHandler [WEAK] + EXPORT OTG_HS_EP1_OUT_IRQHandler [WEAK] + EXPORT OTG_HS_EP1_IN_IRQHandler [WEAK] + EXPORT OTG_HS_WKUP_IRQHandler [WEAK] + EXPORT OTG_HS_IRQHandler [WEAK] + EXPORT DCMI_PSSI_IRQHandler [WEAK] + EXPORT CRYP_IRQHandler [WEAK] + EXPORT HASH_RNG_IRQHandler [WEAK] + EXPORT FPU_IRQHandler [WEAK] + EXPORT UART7_IRQHandler [WEAK] + EXPORT UART8_IRQHandler [WEAK] + EXPORT SPI4_IRQHandler [WEAK] + EXPORT SPI5_IRQHandler [WEAK] + EXPORT SPI6_IRQHandler [WEAK] + EXPORT SAI1_IRQHandler [WEAK] + EXPORT LTDC_IRQHandler [WEAK] + EXPORT LTDC_ER_IRQHandler [WEAK] + EXPORT DMA2D_IRQHandler [WEAK] + EXPORT OCTOSPI1_IRQHandler [WEAK] + EXPORT LPTIM1_IRQHandler [WEAK] + EXPORT CEC_IRQHandler [WEAK] + EXPORT I2C4_EV_IRQHandler [WEAK] + EXPORT I2C4_ER_IRQHandler [WEAK] + EXPORT SPDIF_RX_IRQHandler [WEAK] + EXPORT DMAMUX1_OVR_IRQHandler [WEAK] + EXPORT DFSDM1_FLT0_IRQHandler [WEAK] + EXPORT DFSDM1_FLT1_IRQHandler [WEAK] + EXPORT DFSDM1_FLT2_IRQHandler [WEAK] + EXPORT DFSDM1_FLT3_IRQHandler [WEAK] + EXPORT SWPMI1_IRQHandler [WEAK] + EXPORT TIM15_IRQHandler [WEAK] + EXPORT TIM16_IRQHandler [WEAK] + EXPORT TIM17_IRQHandler [WEAK] + EXPORT MDIOS_WKUP_IRQHandler [WEAK] + EXPORT MDIOS_IRQHandler [WEAK] + EXPORT MDMA_IRQHandler [WEAK] + EXPORT SDMMC2_IRQHandler [WEAK] + EXPORT HSEM1_IRQHandler [WEAK] + EXPORT ADC3_IRQHandler [WEAK] + EXPORT DMAMUX2_OVR_IRQHandler [WEAK] + EXPORT BDMA_Channel0_IRQHandler [WEAK] + EXPORT BDMA_Channel1_IRQHandler [WEAK] + EXPORT BDMA_Channel2_IRQHandler [WEAK] + EXPORT BDMA_Channel3_IRQHandler [WEAK] + EXPORT BDMA_Channel4_IRQHandler [WEAK] + EXPORT BDMA_Channel5_IRQHandler [WEAK] + EXPORT BDMA_Channel6_IRQHandler [WEAK] + EXPORT BDMA_Channel7_IRQHandler [WEAK] + EXPORT COMP1_IRQHandler [WEAK] + EXPORT LPTIM2_IRQHandler [WEAK] + EXPORT LPTIM3_IRQHandler [WEAK] + EXPORT LPTIM4_IRQHandler [WEAK] + EXPORT LPTIM5_IRQHandler [WEAK] + EXPORT LPUART1_IRQHandler [WEAK] + EXPORT CRS_IRQHandler [WEAK] + EXPORT ECC_IRQHandler [WEAK] + EXPORT SAI4_IRQHandler [WEAK] + EXPORT DTS_IRQHandler [WEAK] + EXPORT WAKEUP_PIN_IRQHandler [WEAK] + EXPORT OCTOSPI2_IRQHandler [WEAK] + EXPORT OTFDEC1_IRQHandler [WEAK] + EXPORT OTFDEC2_IRQHandler [WEAK] + EXPORT FMAC_IRQHandler [WEAK] + EXPORT CORDIC_IRQHandler [WEAK] + EXPORT UART9_IRQHandler [WEAK] + EXPORT USART10_IRQHandler [WEAK] + EXPORT I2C5_EV_IRQHandler [WEAK] + EXPORT I2C5_ER_IRQHandler [WEAK] + EXPORT FDCAN3_IT0_IRQHandler [WEAK] + EXPORT FDCAN3_IT1_IRQHandler [WEAK] + EXPORT TIM23_IRQHandler [WEAK] + EXPORT TIM24_IRQHandler [WEAK] + +WWDG_IRQHandler +PVD_AVD_IRQHandler +TAMP_STAMP_IRQHandler +RTC_WKUP_IRQHandler +FLASH_IRQHandler +RCC_IRQHandler +EXTI0_IRQHandler +EXTI1_IRQHandler +EXTI2_IRQHandler +EXTI3_IRQHandler +EXTI4_IRQHandler +DMA1_Stream0_IRQHandler +DMA1_Stream1_IRQHandler +DMA1_Stream2_IRQHandler +DMA1_Stream3_IRQHandler +DMA1_Stream4_IRQHandler +DMA1_Stream5_IRQHandler +DMA1_Stream6_IRQHandler +ADC_IRQHandler +FDCAN1_IT0_IRQHandler +FDCAN2_IT0_IRQHandler +FDCAN1_IT1_IRQHandler +FDCAN2_IT1_IRQHandler +EXTI9_5_IRQHandler +TIM1_BRK_IRQHandler +TIM1_UP_IRQHandler +TIM1_TRG_COM_IRQHandler +TIM1_CC_IRQHandler +TIM2_IRQHandler +TIM3_IRQHandler +TIM4_IRQHandler +I2C1_EV_IRQHandler +I2C1_ER_IRQHandler +I2C2_EV_IRQHandler +I2C2_ER_IRQHandler +SPI1_IRQHandler +SPI2_IRQHandler +USART1_IRQHandler +USART2_IRQHandler +USART3_IRQHandler +EXTI15_10_IRQHandler +RTC_Alarm_IRQHandler +TIM8_BRK_TIM12_IRQHandler +TIM8_UP_TIM13_IRQHandler +TIM8_TRG_COM_TIM14_IRQHandler +TIM8_CC_IRQHandler +DMA1_Stream7_IRQHandler +FMC_IRQHandler +SDMMC1_IRQHandler +TIM5_IRQHandler +SPI3_IRQHandler +UART4_IRQHandler +UART5_IRQHandler +TIM6_DAC_IRQHandler +TIM7_IRQHandler +DMA2_Stream0_IRQHandler +DMA2_Stream1_IRQHandler +DMA2_Stream2_IRQHandler +DMA2_Stream3_IRQHandler +DMA2_Stream4_IRQHandler +ETH_IRQHandler +ETH_WKUP_IRQHandler +FDCAN_CAL_IRQHandler +DMA2_Stream5_IRQHandler +DMA2_Stream6_IRQHandler +DMA2_Stream7_IRQHandler +USART6_IRQHandler +I2C3_EV_IRQHandler +I2C3_ER_IRQHandler +OTG_HS_EP1_OUT_IRQHandler +OTG_HS_EP1_IN_IRQHandler +OTG_HS_WKUP_IRQHandler +OTG_HS_IRQHandler +DCMI_PSSI_IRQHandler +CRYP_IRQHandler +HASH_RNG_IRQHandler +FPU_IRQHandler +UART7_IRQHandler +UART8_IRQHandler +SPI4_IRQHandler +SPI5_IRQHandler +SPI6_IRQHandler +SAI1_IRQHandler +LTDC_IRQHandler +LTDC_ER_IRQHandler +DMA2D_IRQHandler +OCTOSPI1_IRQHandler +LPTIM1_IRQHandler +CEC_IRQHandler +I2C4_EV_IRQHandler +I2C4_ER_IRQHandler +SPDIF_RX_IRQHandler +DMAMUX1_OVR_IRQHandler +DFSDM1_FLT0_IRQHandler +DFSDM1_FLT1_IRQHandler +DFSDM1_FLT2_IRQHandler +DFSDM1_FLT3_IRQHandler +SWPMI1_IRQHandler +TIM15_IRQHandler +TIM16_IRQHandler +TIM17_IRQHandler +MDIOS_WKUP_IRQHandler +MDIOS_IRQHandler +MDMA_IRQHandler +SDMMC2_IRQHandler +HSEM1_IRQHandler +ADC3_IRQHandler +DMAMUX2_OVR_IRQHandler +BDMA_Channel0_IRQHandler +BDMA_Channel1_IRQHandler +BDMA_Channel2_IRQHandler +BDMA_Channel3_IRQHandler +BDMA_Channel4_IRQHandler +BDMA_Channel5_IRQHandler +BDMA_Channel6_IRQHandler +BDMA_Channel7_IRQHandler +COMP1_IRQHandler +LPTIM2_IRQHandler +LPTIM3_IRQHandler +LPTIM4_IRQHandler +LPTIM5_IRQHandler +LPUART1_IRQHandler +CRS_IRQHandler +ECC_IRQHandler +SAI4_IRQHandler +DTS_IRQHandler +WAKEUP_PIN_IRQHandler +OCTOSPI2_IRQHandler +OTFDEC1_IRQHandler +OTFDEC2_IRQHandler +FMAC_IRQHandler +CORDIC_IRQHandler +UART9_IRQHandler +USART10_IRQHandler +I2C5_EV_IRQHandler +I2C5_ER_IRQHandler +FDCAN3_IT0_IRQHandler +FDCAN3_IT1_IRQHandler +TIM23_IRQHandler +TIM24_IRQHandler + + B . + + ENDP + + ALIGN + +;******************************************************************************* +; User Stack and Heap initialization +;******************************************************************************* + IF :DEF:__MICROLIB + + EXPORT __initial_sp + EXPORT __heap_base + EXPORT __heap_limit + + ELSE + + IMPORT __use_two_region_memory + EXPORT __user_initial_stackheap + +__user_initial_stackheap + + LDR R0, = Heap_Mem + LDR R1, =(Stack_Mem + Stack_Size) + LDR R2, = (Heap_Mem + Heap_Size) + LDR R3, = Stack_Mem + BX LR + + ALIGN + + ENDIF + + END + +;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE***** diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h733xx.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h733xx.s new file mode 100644 index 0000000..8327db3 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h733xx.s @@ -0,0 +1,624 @@ +;******************** (C) COPYRIGHT 2019 STMicroelectronics ******************** +;* File Name : startup_stm32h733xx.s +;* @author MCD Application Team +;* Description : STM32H7xx devices vector table for MDK-ARM toolchain. +;* This module performs: +;* - Set the initial SP +;* - Set the initial PC == Reset_Handler +;* - Set the vector table entries with the exceptions ISR address +;* - Branches to __main in the C library (which eventually +;* calls main()). +;* After Reset the Cortex-M processor is in Thread mode, +;* priority is Privileged, and the Stack is set to Main. +;* <<< Use Configuration Wizard in Context Menu >>> +;****************************************************************************** +;* @attention +;* +;* Copyright (c) 2019 STMicroelectronics. +;* All rights reserved. +;* +;* This software component is licensed by ST under BSD 3-Clause license, +;* the "License"; You may not use this file except in compliance with the +;* License. You may obtain a copy of the License at: +;* opensource.org/licenses/BSD-3-Clause +;* +;****************************************************************************** + +; Amount of memory (in bytes) allocated for Stack +; Tailor this value to your application needs +; Stack Configuration +; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Stack_Size EQU 0x00000400 + + AREA STACK, NOINIT, READWRITE, ALIGN=3 +Stack_Mem SPACE Stack_Size +__initial_sp + + +; Heap Configuration +; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Heap_Size EQU 0x00000200 + + AREA HEAP, NOINIT, READWRITE, ALIGN=3 +__heap_base +Heap_Mem SPACE Heap_Size +__heap_limit + + PRESERVE8 + THUMB + + +; Vector Table Mapped to Address 0 at Reset + AREA RESET, DATA, READONLY + EXPORT __Vectors + EXPORT __Vectors_End + EXPORT __Vectors_Size + +__Vectors DCD __initial_sp ; Top of Stack + DCD Reset_Handler ; Reset Handler + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD MemManage_Handler ; MPU Fault Handler + DCD BusFault_Handler ; Bus Fault Handler + DCD UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WWDG_IRQHandler ; Window WatchDog interrupt ( wwdg1_it) + DCD PVD_AVD_IRQHandler ; PVD/AVD through EXTI Line detection + DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line + DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line + DCD FLASH_IRQHandler ; FLASH + DCD RCC_IRQHandler ; RCC + DCD EXTI0_IRQHandler ; EXTI Line0 + DCD EXTI1_IRQHandler ; EXTI Line1 + DCD EXTI2_IRQHandler ; EXTI Line2 + DCD EXTI3_IRQHandler ; EXTI Line3 + DCD EXTI4_IRQHandler ; EXTI Line4 + DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 + DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 + DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 + DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 + DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 + DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 + DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 + DCD ADC_IRQHandler ; ADC1, ADC2 + DCD FDCAN1_IT0_IRQHandler ; FDCAN1 interrupt line 0 + DCD FDCAN2_IT0_IRQHandler ; FDCAN2 interrupt line 0 + DCD FDCAN1_IT1_IRQHandler ; FDCAN1 interrupt line 1 + DCD FDCAN2_IT1_IRQHandler ; FDCAN2 interrupt line 1 + DCD EXTI9_5_IRQHandler ; External Line[9:5]s + DCD TIM1_BRK_IRQHandler ; TIM1 Break interrupt + DCD TIM1_UP_IRQHandler ; TIM1 Update Interrupt + DCD TIM1_TRG_COM_IRQHandler ; TIM1 Trigger and Commutation Interrupt + DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare + DCD TIM2_IRQHandler ; TIM2 + DCD TIM3_IRQHandler ; TIM3 + DCD TIM4_IRQHandler ; TIM4 + DCD I2C1_EV_IRQHandler ; I2C1 Event + DCD I2C1_ER_IRQHandler ; I2C1 Error + DCD I2C2_EV_IRQHandler ; I2C2 Event + DCD I2C2_ER_IRQHandler ; I2C2 Error + DCD SPI1_IRQHandler ; SPI1 + DCD SPI2_IRQHandler ; SPI2 + DCD USART1_IRQHandler ; USART1 + DCD USART2_IRQHandler ; USART2 + DCD USART3_IRQHandler ; USART3 + DCD EXTI15_10_IRQHandler ; External Line[15:10] + DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line + DCD 0 ; Reserved + DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break Interrupt and TIM12 global interrupt + DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update Interrupt and TIM13 global interrupt + DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation Interrupt and TIM14 global interrupt + DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare Interrupt + DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 + DCD FMC_IRQHandler ; FMC + DCD SDMMC1_IRQHandler ; SDMMC1 + DCD TIM5_IRQHandler ; TIM5 + DCD SPI3_IRQHandler ; SPI3 + DCD UART4_IRQHandler ; UART4 + DCD UART5_IRQHandler ; UART5 + DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors + DCD TIM7_IRQHandler ; TIM7 + DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 + DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 + DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 + DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 + DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 + DCD ETH_IRQHandler ; Ethernet + DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line + DCD FDCAN_CAL_IRQHandler ; FDCAN calibration unit interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 + DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 + DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 + DCD USART6_IRQHandler ; USART6 + DCD I2C3_EV_IRQHandler ; I2C3 event + DCD I2C3_ER_IRQHandler ; I2C3 error + DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out + DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In + DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI + DCD OTG_HS_IRQHandler ; USB OTG HS + DCD DCMI_PSSI_IRQHandler ; DCMI, PSSI + DCD CRYP_IRQHandler ; CRYP + DCD HASH_RNG_IRQHandler ; Hash and Rng + DCD FPU_IRQHandler ; FPU + DCD UART7_IRQHandler ; UART7 + DCD UART8_IRQHandler ; UART8 + DCD SPI4_IRQHandler ; SPI4 + DCD SPI5_IRQHandler ; SPI5 + DCD SPI6_IRQHandler ; SPI6 + DCD SAI1_IRQHandler ; SAI1 + DCD LTDC_IRQHandler ; LTDC + DCD LTDC_ER_IRQHandler ; LTDC error + DCD DMA2D_IRQHandler ; DMA2D + DCD 0 ; Reserved + DCD OCTOSPI1_IRQHandler ; OCTOSPI1 + DCD LPTIM1_IRQHandler ; LPTIM1 + DCD CEC_IRQHandler ; HDMI_CEC + DCD I2C4_EV_IRQHandler ; I2C4 Event + DCD I2C4_ER_IRQHandler ; I2C4 Error + DCD SPDIF_RX_IRQHandler ; SPDIF_RX + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DMAMUX1_OVR_IRQHandler ; DMAMUX1 Overrun interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DFSDM1_FLT0_IRQHandler ; DFSDM Filter0 Interrupt + DCD DFSDM1_FLT1_IRQHandler ; DFSDM Filter1 Interrupt + DCD DFSDM1_FLT2_IRQHandler ; DFSDM Filter2 Interrupt + DCD DFSDM1_FLT3_IRQHandler ; DFSDM Filter3 Interrupt + DCD 0 ; Reserved + DCD SWPMI1_IRQHandler ; Serial Wire Interface 1 global interrupt + DCD TIM15_IRQHandler ; TIM15 global Interrupt + DCD TIM16_IRQHandler ; TIM16 global Interrupt + DCD TIM17_IRQHandler ; TIM17 global Interrupt + DCD MDIOS_WKUP_IRQHandler ; MDIOS Wakeup Interrupt + DCD MDIOS_IRQHandler ; MDIOS global Interrupt + DCD 0 ; Reserved + DCD MDMA_IRQHandler ; MDMA global Interrupt + DCD 0 ; Reserved + DCD SDMMC2_IRQHandler ; SDMMC2 global Interrupt + DCD HSEM1_IRQHandler ; HSEM1 global Interrupt + DCD 0 ; Reserved + DCD ADC3_IRQHandler ; ADC3 global Interrupt + DCD DMAMUX2_OVR_IRQHandler ; DMAMUX Overrun interrupt + DCD BDMA_Channel0_IRQHandler ; BDMA Channel 0 global Interrupt + DCD BDMA_Channel1_IRQHandler ; BDMA Channel 1 global Interrupt + DCD BDMA_Channel2_IRQHandler ; BDMA Channel 2 global Interrupt + DCD BDMA_Channel3_IRQHandler ; BDMA Channel 3 global Interrupt + DCD BDMA_Channel4_IRQHandler ; BDMA Channel 4 global Interrupt + DCD BDMA_Channel5_IRQHandler ; BDMA Channel 5 global Interrupt + DCD BDMA_Channel6_IRQHandler ; BDMA Channel 6 global Interrupt + DCD BDMA_Channel7_IRQHandler ; BDMA Channel 7 global Interrupt + DCD COMP1_IRQHandler ; COMP1 global Interrupt + DCD LPTIM2_IRQHandler ; LP TIM2 global interrupt + DCD LPTIM3_IRQHandler ; LP TIM3 global interrupt + DCD LPTIM4_IRQHandler ; LP TIM4 global interrupt + DCD LPTIM5_IRQHandler ; LP TIM5 global interrupt + DCD LPUART1_IRQHandler ; LP UART1 interrupt + DCD 0 ; Reserved + DCD CRS_IRQHandler ; Clock Recovery Global Interrupt + DCD ECC_IRQHandler ; ECC diagnostic Global Interrupt + DCD SAI4_IRQHandler ; SAI4 global interrupt + DCD DTS_IRQHandler ; DTS interrupt + DCD 0 ; Reserved + DCD WAKEUP_PIN_IRQHandler ; Interrupt for all 6 wake-up pins + DCD OCTOSPI2_IRQHandler ; OCTOSPI2 Interrupt + DCD OTFDEC1_IRQHandler ; OTFDEC1 Interrupt + DCD OTFDEC2_IRQHandler ; OTFDEC2 Interrupt + DCD FMAC_IRQHandler ; FMAC Interrupt + DCD CORDIC_IRQHandler ; CORDIC Interrupt + DCD UART9_IRQHandler ; UART9 Interrupt + DCD USART10_IRQHandler ; UART10 Interrupt + DCD I2C5_EV_IRQHandler ; I2C5 Event Interrupt + DCD I2C5_ER_IRQHandler ; I2C5 Error Interrupt + DCD FDCAN3_IT0_IRQHandler ; FDCAN3 interrupt line 0 + DCD FDCAN3_IT1_IRQHandler ; FDCAN3 interrupt line 1 + DCD TIM23_IRQHandler ; TIM23 global interrup + DCD TIM24_IRQHandler ; TIM24 global interrup + +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + + AREA |.text|, CODE, READONLY + +; Reset handler +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT SystemInit + IMPORT __main + + LDR R0, =SystemInit + BLX R0 + LDR R0, =__main + BX R0 + ENDP + +; Dummy Exception Handlers (infinite loops which can be modified) + +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP +HardFault_Handler\ + PROC + EXPORT HardFault_Handler [WEAK] + B . + ENDP +MemManage_Handler\ + PROC + EXPORT MemManage_Handler [WEAK] + B . + ENDP +BusFault_Handler\ + PROC + EXPORT BusFault_Handler [WEAK] + B . + ENDP +UsageFault_Handler\ + PROC + EXPORT UsageFault_Handler [WEAK] + B . + ENDP +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +DebugMon_Handler\ + PROC + EXPORT DebugMon_Handler [WEAK] + B . + ENDP +PendSV_Handler PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC + + EXPORT WWDG_IRQHandler [WEAK] + EXPORT PVD_AVD_IRQHandler [WEAK] + EXPORT TAMP_STAMP_IRQHandler [WEAK] + EXPORT RTC_WKUP_IRQHandler [WEAK] + EXPORT FLASH_IRQHandler [WEAK] + EXPORT RCC_IRQHandler [WEAK] + EXPORT EXTI0_IRQHandler [WEAK] + EXPORT EXTI1_IRQHandler [WEAK] + EXPORT EXTI2_IRQHandler [WEAK] + EXPORT EXTI3_IRQHandler [WEAK] + EXPORT EXTI4_IRQHandler [WEAK] + EXPORT DMA1_Stream0_IRQHandler [WEAK] + EXPORT DMA1_Stream1_IRQHandler [WEAK] + EXPORT DMA1_Stream2_IRQHandler [WEAK] + EXPORT DMA1_Stream3_IRQHandler [WEAK] + EXPORT DMA1_Stream4_IRQHandler [WEAK] + EXPORT DMA1_Stream5_IRQHandler [WEAK] + EXPORT DMA1_Stream6_IRQHandler [WEAK] + EXPORT DMA1_Stream7_IRQHandler [WEAK] + EXPORT ADC_IRQHandler [WEAK] + EXPORT FDCAN1_IT0_IRQHandler [WEAK] + EXPORT FDCAN2_IT0_IRQHandler [WEAK] + EXPORT FDCAN1_IT1_IRQHandler [WEAK] + EXPORT FDCAN2_IT1_IRQHandler [WEAK] + EXPORT EXTI9_5_IRQHandler [WEAK] + EXPORT TIM1_BRK_IRQHandler [WEAK] + EXPORT TIM1_UP_IRQHandler [WEAK] + EXPORT TIM1_TRG_COM_IRQHandler [WEAK] + EXPORT TIM1_CC_IRQHandler [WEAK] + EXPORT TIM2_IRQHandler [WEAK] + EXPORT TIM3_IRQHandler [WEAK] + EXPORT TIM4_IRQHandler [WEAK] + EXPORT I2C1_EV_IRQHandler [WEAK] + EXPORT I2C1_ER_IRQHandler [WEAK] + EXPORT I2C2_EV_IRQHandler [WEAK] + EXPORT I2C2_ER_IRQHandler [WEAK] + EXPORT SPI1_IRQHandler [WEAK] + EXPORT SPI2_IRQHandler [WEAK] + EXPORT USART1_IRQHandler [WEAK] + EXPORT USART2_IRQHandler [WEAK] + EXPORT USART3_IRQHandler [WEAK] + EXPORT EXTI15_10_IRQHandler [WEAK] + EXPORT RTC_Alarm_IRQHandler [WEAK] + EXPORT TIM8_BRK_TIM12_IRQHandler [WEAK] + EXPORT TIM8_UP_TIM13_IRQHandler [WEAK] + EXPORT TIM8_TRG_COM_TIM14_IRQHandler [WEAK] + EXPORT TIM8_CC_IRQHandler [WEAK] + EXPORT DMA1_Stream7_IRQHandler [WEAK] + EXPORT FMC_IRQHandler [WEAK] + EXPORT SDMMC1_IRQHandler [WEAK] + EXPORT TIM5_IRQHandler [WEAK] + EXPORT SPI3_IRQHandler [WEAK] + EXPORT UART4_IRQHandler [WEAK] + EXPORT UART5_IRQHandler [WEAK] + EXPORT TIM6_DAC_IRQHandler [WEAK] + EXPORT TIM7_IRQHandler [WEAK] + EXPORT DMA2_Stream0_IRQHandler [WEAK] + EXPORT DMA2_Stream1_IRQHandler [WEAK] + EXPORT DMA2_Stream2_IRQHandler [WEAK] + EXPORT DMA2_Stream3_IRQHandler [WEAK] + EXPORT DMA2_Stream4_IRQHandler [WEAK] + EXPORT ETH_IRQHandler [WEAK] + EXPORT ETH_WKUP_IRQHandler [WEAK] + EXPORT FDCAN_CAL_IRQHandler [WEAK] + EXPORT DMA2_Stream5_IRQHandler [WEAK] + EXPORT DMA2_Stream6_IRQHandler [WEAK] + EXPORT DMA2_Stream7_IRQHandler [WEAK] + EXPORT USART6_IRQHandler [WEAK] + EXPORT I2C3_EV_IRQHandler [WEAK] + EXPORT I2C3_ER_IRQHandler [WEAK] + EXPORT OTG_HS_EP1_OUT_IRQHandler [WEAK] + EXPORT OTG_HS_EP1_IN_IRQHandler [WEAK] + EXPORT OTG_HS_WKUP_IRQHandler [WEAK] + EXPORT OTG_HS_IRQHandler [WEAK] + EXPORT DCMI_PSSI_IRQHandler [WEAK] + EXPORT CRYP_IRQHandler [WEAK] + EXPORT HASH_RNG_IRQHandler [WEAK] + EXPORT FPU_IRQHandler [WEAK] + EXPORT UART7_IRQHandler [WEAK] + EXPORT UART8_IRQHandler [WEAK] + EXPORT SPI4_IRQHandler [WEAK] + EXPORT SPI5_IRQHandler [WEAK] + EXPORT SPI6_IRQHandler [WEAK] + EXPORT SAI1_IRQHandler [WEAK] + EXPORT LTDC_IRQHandler [WEAK] + EXPORT LTDC_ER_IRQHandler [WEAK] + EXPORT DMA2D_IRQHandler [WEAK] + EXPORT OCTOSPI1_IRQHandler [WEAK] + EXPORT LPTIM1_IRQHandler [WEAK] + EXPORT CEC_IRQHandler [WEAK] + EXPORT I2C4_EV_IRQHandler [WEAK] + EXPORT I2C4_ER_IRQHandler [WEAK] + EXPORT SPDIF_RX_IRQHandler [WEAK] + EXPORT DMAMUX1_OVR_IRQHandler [WEAK] + EXPORT DFSDM1_FLT0_IRQHandler [WEAK] + EXPORT DFSDM1_FLT1_IRQHandler [WEAK] + EXPORT DFSDM1_FLT2_IRQHandler [WEAK] + EXPORT DFSDM1_FLT3_IRQHandler [WEAK] + EXPORT SWPMI1_IRQHandler [WEAK] + EXPORT TIM15_IRQHandler [WEAK] + EXPORT TIM16_IRQHandler [WEAK] + EXPORT TIM17_IRQHandler [WEAK] + EXPORT MDIOS_WKUP_IRQHandler [WEAK] + EXPORT MDIOS_IRQHandler [WEAK] + EXPORT MDMA_IRQHandler [WEAK] + EXPORT SDMMC2_IRQHandler [WEAK] + EXPORT HSEM1_IRQHandler [WEAK] + EXPORT ADC3_IRQHandler [WEAK] + EXPORT DMAMUX2_OVR_IRQHandler [WEAK] + EXPORT BDMA_Channel0_IRQHandler [WEAK] + EXPORT BDMA_Channel1_IRQHandler [WEAK] + EXPORT BDMA_Channel2_IRQHandler [WEAK] + EXPORT BDMA_Channel3_IRQHandler [WEAK] + EXPORT BDMA_Channel4_IRQHandler [WEAK] + EXPORT BDMA_Channel5_IRQHandler [WEAK] + EXPORT BDMA_Channel6_IRQHandler [WEAK] + EXPORT BDMA_Channel7_IRQHandler [WEAK] + EXPORT COMP1_IRQHandler [WEAK] + EXPORT LPTIM2_IRQHandler [WEAK] + EXPORT LPTIM3_IRQHandler [WEAK] + EXPORT LPTIM4_IRQHandler [WEAK] + EXPORT LPTIM5_IRQHandler [WEAK] + EXPORT LPUART1_IRQHandler [WEAK] + EXPORT CRS_IRQHandler [WEAK] + EXPORT ECC_IRQHandler [WEAK] + EXPORT SAI4_IRQHandler [WEAK] + EXPORT DTS_IRQHandler [WEAK] + EXPORT WAKEUP_PIN_IRQHandler [WEAK] + EXPORT OCTOSPI2_IRQHandler [WEAK] + EXPORT OTFDEC1_IRQHandler [WEAK] + EXPORT OTFDEC2_IRQHandler [WEAK] + EXPORT FMAC_IRQHandler [WEAK] + EXPORT CORDIC_IRQHandler [WEAK] + EXPORT UART9_IRQHandler [WEAK] + EXPORT USART10_IRQHandler [WEAK] + EXPORT I2C5_EV_IRQHandler [WEAK] + EXPORT I2C5_ER_IRQHandler [WEAK] + EXPORT FDCAN3_IT0_IRQHandler [WEAK] + EXPORT FDCAN3_IT1_IRQHandler [WEAK] + EXPORT TIM23_IRQHandler [WEAK] + EXPORT TIM24_IRQHandler [WEAK] + +WWDG_IRQHandler +PVD_AVD_IRQHandler +TAMP_STAMP_IRQHandler +RTC_WKUP_IRQHandler +FLASH_IRQHandler +RCC_IRQHandler +EXTI0_IRQHandler +EXTI1_IRQHandler +EXTI2_IRQHandler +EXTI3_IRQHandler +EXTI4_IRQHandler +DMA1_Stream0_IRQHandler +DMA1_Stream1_IRQHandler +DMA1_Stream2_IRQHandler +DMA1_Stream3_IRQHandler +DMA1_Stream4_IRQHandler +DMA1_Stream5_IRQHandler +DMA1_Stream6_IRQHandler +ADC_IRQHandler +FDCAN1_IT0_IRQHandler +FDCAN2_IT0_IRQHandler +FDCAN1_IT1_IRQHandler +FDCAN2_IT1_IRQHandler +EXTI9_5_IRQHandler +TIM1_BRK_IRQHandler +TIM1_UP_IRQHandler +TIM1_TRG_COM_IRQHandler +TIM1_CC_IRQHandler +TIM2_IRQHandler +TIM3_IRQHandler +TIM4_IRQHandler +I2C1_EV_IRQHandler +I2C1_ER_IRQHandler +I2C2_EV_IRQHandler +I2C2_ER_IRQHandler +SPI1_IRQHandler +SPI2_IRQHandler +USART1_IRQHandler +USART2_IRQHandler +USART3_IRQHandler +EXTI15_10_IRQHandler +RTC_Alarm_IRQHandler +TIM8_BRK_TIM12_IRQHandler +TIM8_UP_TIM13_IRQHandler +TIM8_TRG_COM_TIM14_IRQHandler +TIM8_CC_IRQHandler +DMA1_Stream7_IRQHandler +FMC_IRQHandler +SDMMC1_IRQHandler +TIM5_IRQHandler +SPI3_IRQHandler +UART4_IRQHandler +UART5_IRQHandler +TIM6_DAC_IRQHandler +TIM7_IRQHandler +DMA2_Stream0_IRQHandler +DMA2_Stream1_IRQHandler +DMA2_Stream2_IRQHandler +DMA2_Stream3_IRQHandler +DMA2_Stream4_IRQHandler +ETH_IRQHandler +ETH_WKUP_IRQHandler +FDCAN_CAL_IRQHandler +DMA2_Stream5_IRQHandler +DMA2_Stream6_IRQHandler +DMA2_Stream7_IRQHandler +USART6_IRQHandler +I2C3_EV_IRQHandler +I2C3_ER_IRQHandler +OTG_HS_EP1_OUT_IRQHandler +OTG_HS_EP1_IN_IRQHandler +OTG_HS_WKUP_IRQHandler +OTG_HS_IRQHandler +DCMI_PSSI_IRQHandler +CRYP_IRQHandler +HASH_RNG_IRQHandler +FPU_IRQHandler +UART7_IRQHandler +UART8_IRQHandler +SPI4_IRQHandler +SPI5_IRQHandler +SPI6_IRQHandler +SAI1_IRQHandler +LTDC_IRQHandler +LTDC_ER_IRQHandler +DMA2D_IRQHandler +OCTOSPI1_IRQHandler +LPTIM1_IRQHandler +CEC_IRQHandler +I2C4_EV_IRQHandler +I2C4_ER_IRQHandler +SPDIF_RX_IRQHandler +DMAMUX1_OVR_IRQHandler +DFSDM1_FLT0_IRQHandler +DFSDM1_FLT1_IRQHandler +DFSDM1_FLT2_IRQHandler +DFSDM1_FLT3_IRQHandler +SWPMI1_IRQHandler +TIM15_IRQHandler +TIM16_IRQHandler +TIM17_IRQHandler +MDIOS_WKUP_IRQHandler +MDIOS_IRQHandler +MDMA_IRQHandler +SDMMC2_IRQHandler +HSEM1_IRQHandler +ADC3_IRQHandler +DMAMUX2_OVR_IRQHandler +BDMA_Channel0_IRQHandler +BDMA_Channel1_IRQHandler +BDMA_Channel2_IRQHandler +BDMA_Channel3_IRQHandler +BDMA_Channel4_IRQHandler +BDMA_Channel5_IRQHandler +BDMA_Channel6_IRQHandler +BDMA_Channel7_IRQHandler +COMP1_IRQHandler +LPTIM2_IRQHandler +LPTIM3_IRQHandler +LPTIM4_IRQHandler +LPTIM5_IRQHandler +LPUART1_IRQHandler +CRS_IRQHandler +ECC_IRQHandler +SAI4_IRQHandler +DTS_IRQHandler +WAKEUP_PIN_IRQHandler +OCTOSPI2_IRQHandler +OTFDEC1_IRQHandler +OTFDEC2_IRQHandler +FMAC_IRQHandler +CORDIC_IRQHandler +UART9_IRQHandler +USART10_IRQHandler +I2C5_EV_IRQHandler +I2C5_ER_IRQHandler +FDCAN3_IT0_IRQHandler +FDCAN3_IT1_IRQHandler +TIM23_IRQHandler +TIM24_IRQHandler + + B . + + ENDP + + ALIGN + +;******************************************************************************* +; User Stack and Heap initialization +;******************************************************************************* + IF :DEF:__MICROLIB + + EXPORT __initial_sp + EXPORT __heap_base + EXPORT __heap_limit + + ELSE + + IMPORT __use_two_region_memory + EXPORT __user_initial_stackheap + +__user_initial_stackheap + + LDR R0, = Heap_Mem + LDR R1, =(Stack_Mem + Stack_Size) + LDR R2, = (Heap_Mem + Heap_Size) + LDR R3, = Stack_Mem + BX LR + + ALIGN + + ENDIF + + END + +;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE***** diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h735xx.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h735xx.s new file mode 100644 index 0000000..eb83129 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h735xx.s @@ -0,0 +1,624 @@ +;******************** (C) COPYRIGHT 2019 STMicroelectronics ******************** +;* File Name : startup_stm32h735xx.s +;* @author MCD Application Team +;* Description : STM32H7xx devices vector table for MDK-ARM toolchain. +;* This module performs: +;* - Set the initial SP +;* - Set the initial PC == Reset_Handler +;* - Set the vector table entries with the exceptions ISR address +;* - Branches to __main in the C library (which eventually +;* calls main()). +;* After Reset the Cortex-M processor is in Thread mode, +;* priority is Privileged, and the Stack is set to Main. +;* <<< Use Configuration Wizard in Context Menu >>> +;****************************************************************************** +;* @attention +;* +;* Copyright (c) 2019 STMicroelectronics. +;* All rights reserved. +;* +;* This software component is licensed by ST under BSD 3-Clause license, +;* the "License"; You may not use this file except in compliance with the +;* License. You may obtain a copy of the License at: +;* opensource.org/licenses/BSD-3-Clause +;* +;****************************************************************************** + +; Amount of memory (in bytes) allocated for Stack +; Tailor this value to your application needs +; Stack Configuration +; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Stack_Size EQU 0x00000400 + + AREA STACK, NOINIT, READWRITE, ALIGN=3 +Stack_Mem SPACE Stack_Size +__initial_sp + + +; Heap Configuration +; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Heap_Size EQU 0x00000200 + + AREA HEAP, NOINIT, READWRITE, ALIGN=3 +__heap_base +Heap_Mem SPACE Heap_Size +__heap_limit + + PRESERVE8 + THUMB + + +; Vector Table Mapped to Address 0 at Reset + AREA RESET, DATA, READONLY + EXPORT __Vectors + EXPORT __Vectors_End + EXPORT __Vectors_Size + +__Vectors DCD __initial_sp ; Top of Stack + DCD Reset_Handler ; Reset Handler + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD MemManage_Handler ; MPU Fault Handler + DCD BusFault_Handler ; Bus Fault Handler + DCD UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WWDG_IRQHandler ; Window WatchDog interrupt ( wwdg1_it) + DCD PVD_AVD_IRQHandler ; PVD/AVD through EXTI Line detection + DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line + DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line + DCD FLASH_IRQHandler ; FLASH + DCD RCC_IRQHandler ; RCC + DCD EXTI0_IRQHandler ; EXTI Line0 + DCD EXTI1_IRQHandler ; EXTI Line1 + DCD EXTI2_IRQHandler ; EXTI Line2 + DCD EXTI3_IRQHandler ; EXTI Line3 + DCD EXTI4_IRQHandler ; EXTI Line4 + DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 + DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 + DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 + DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 + DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 + DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 + DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 + DCD ADC_IRQHandler ; ADC1, ADC2 + DCD FDCAN1_IT0_IRQHandler ; FDCAN1 interrupt line 0 + DCD FDCAN2_IT0_IRQHandler ; FDCAN2 interrupt line 0 + DCD FDCAN1_IT1_IRQHandler ; FDCAN1 interrupt line 1 + DCD FDCAN2_IT1_IRQHandler ; FDCAN2 interrupt line 1 + DCD EXTI9_5_IRQHandler ; External Line[9:5]s + DCD TIM1_BRK_IRQHandler ; TIM1 Break interrupt + DCD TIM1_UP_IRQHandler ; TIM1 Update Interrupt + DCD TIM1_TRG_COM_IRQHandler ; TIM1 Trigger and Commutation Interrupt + DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare + DCD TIM2_IRQHandler ; TIM2 + DCD TIM3_IRQHandler ; TIM3 + DCD TIM4_IRQHandler ; TIM4 + DCD I2C1_EV_IRQHandler ; I2C1 Event + DCD I2C1_ER_IRQHandler ; I2C1 Error + DCD I2C2_EV_IRQHandler ; I2C2 Event + DCD I2C2_ER_IRQHandler ; I2C2 Error + DCD SPI1_IRQHandler ; SPI1 + DCD SPI2_IRQHandler ; SPI2 + DCD USART1_IRQHandler ; USART1 + DCD USART2_IRQHandler ; USART2 + DCD USART3_IRQHandler ; USART3 + DCD EXTI15_10_IRQHandler ; External Line[15:10] + DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line + DCD 0 ; Reserved + DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break Interrupt and TIM12 global interrupt + DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update Interrupt and TIM13 global interrupt + DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation Interrupt and TIM14 global interrupt + DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare Interrupt + DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 + DCD FMC_IRQHandler ; FMC + DCD SDMMC1_IRQHandler ; SDMMC1 + DCD TIM5_IRQHandler ; TIM5 + DCD SPI3_IRQHandler ; SPI3 + DCD UART4_IRQHandler ; UART4 + DCD UART5_IRQHandler ; UART5 + DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors + DCD TIM7_IRQHandler ; TIM7 + DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 + DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 + DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 + DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 + DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 + DCD ETH_IRQHandler ; Ethernet + DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line + DCD FDCAN_CAL_IRQHandler ; FDCAN calibration unit interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 + DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 + DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 + DCD USART6_IRQHandler ; USART6 + DCD I2C3_EV_IRQHandler ; I2C3 event + DCD I2C3_ER_IRQHandler ; I2C3 error + DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out + DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In + DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI + DCD OTG_HS_IRQHandler ; USB OTG HS + DCD DCMI_PSSI_IRQHandler ; DCMI, PSSI + DCD CRYP_IRQHandler ; CRYP + DCD HASH_RNG_IRQHandler ; Hash and Rng + DCD FPU_IRQHandler ; FPU + DCD UART7_IRQHandler ; UART7 + DCD UART8_IRQHandler ; UART8 + DCD SPI4_IRQHandler ; SPI4 + DCD SPI5_IRQHandler ; SPI5 + DCD SPI6_IRQHandler ; SPI6 + DCD SAI1_IRQHandler ; SAI1 + DCD LTDC_IRQHandler ; LTDC + DCD LTDC_ER_IRQHandler ; LTDC error + DCD DMA2D_IRQHandler ; DMA2D + DCD 0 ; Reserved + DCD OCTOSPI1_IRQHandler ; OCTOSPI1 + DCD LPTIM1_IRQHandler ; LPTIM1 + DCD CEC_IRQHandler ; HDMI_CEC + DCD I2C4_EV_IRQHandler ; I2C4 Event + DCD I2C4_ER_IRQHandler ; I2C4 Error + DCD SPDIF_RX_IRQHandler ; SPDIF_RX + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DMAMUX1_OVR_IRQHandler ; DMAMUX1 Overrun interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DFSDM1_FLT0_IRQHandler ; DFSDM Filter0 Interrupt + DCD DFSDM1_FLT1_IRQHandler ; DFSDM Filter1 Interrupt + DCD DFSDM1_FLT2_IRQHandler ; DFSDM Filter2 Interrupt + DCD DFSDM1_FLT3_IRQHandler ; DFSDM Filter3 Interrupt + DCD 0 ; Reserved + DCD SWPMI1_IRQHandler ; Serial Wire Interface 1 global interrupt + DCD TIM15_IRQHandler ; TIM15 global Interrupt + DCD TIM16_IRQHandler ; TIM16 global Interrupt + DCD TIM17_IRQHandler ; TIM17 global Interrupt + DCD MDIOS_WKUP_IRQHandler ; MDIOS Wakeup Interrupt + DCD MDIOS_IRQHandler ; MDIOS global Interrupt + DCD 0 ; Reserved + DCD MDMA_IRQHandler ; MDMA global Interrupt + DCD 0 ; Reserved + DCD SDMMC2_IRQHandler ; SDMMC2 global Interrupt + DCD HSEM1_IRQHandler ; HSEM1 global Interrupt + DCD 0 ; Reserved + DCD ADC3_IRQHandler ; ADC3 global Interrupt + DCD DMAMUX2_OVR_IRQHandler ; DMAMUX Overrun interrupt + DCD BDMA_Channel0_IRQHandler ; BDMA Channel 0 global Interrupt + DCD BDMA_Channel1_IRQHandler ; BDMA Channel 1 global Interrupt + DCD BDMA_Channel2_IRQHandler ; BDMA Channel 2 global Interrupt + DCD BDMA_Channel3_IRQHandler ; BDMA Channel 3 global Interrupt + DCD BDMA_Channel4_IRQHandler ; BDMA Channel 4 global Interrupt + DCD BDMA_Channel5_IRQHandler ; BDMA Channel 5 global Interrupt + DCD BDMA_Channel6_IRQHandler ; BDMA Channel 6 global Interrupt + DCD BDMA_Channel7_IRQHandler ; BDMA Channel 7 global Interrupt + DCD COMP1_IRQHandler ; COMP1 global Interrupt + DCD LPTIM2_IRQHandler ; LP TIM2 global interrupt + DCD LPTIM3_IRQHandler ; LP TIM3 global interrupt + DCD LPTIM4_IRQHandler ; LP TIM4 global interrupt + DCD LPTIM5_IRQHandler ; LP TIM5 global interrupt + DCD LPUART1_IRQHandler ; LP UART1 interrupt + DCD 0 ; Reserved + DCD CRS_IRQHandler ; Clock Recovery Global Interrupt + DCD ECC_IRQHandler ; ECC diagnostic Global Interrupt + DCD SAI4_IRQHandler ; SAI4 global interrupt + DCD DTS_IRQHandler ; DTS interrupt + DCD 0 ; Reserved + DCD WAKEUP_PIN_IRQHandler ; Interrupt for all 6 wake-up pins + DCD OCTOSPI2_IRQHandler ; OCTOSPI2 Interrupt + DCD OTFDEC1_IRQHandler ; OTFDEC1 Interrupt + DCD OTFDEC2_IRQHandler ; OTFDEC2 Interrupt + DCD FMAC_IRQHandler ; FMAC Interrupt + DCD CORDIC_IRQHandler ; CORDIC Interrupt + DCD UART9_IRQHandler ; UART9 Interrupt + DCD USART10_IRQHandler ; UART10 Interrupt + DCD I2C5_EV_IRQHandler ; I2C5 Event Interrupt + DCD I2C5_ER_IRQHandler ; I2C5 Error Interrupt + DCD FDCAN3_IT0_IRQHandler ; FDCAN3 interrupt line 0 + DCD FDCAN3_IT1_IRQHandler ; FDCAN3 interrupt line 1 + DCD TIM23_IRQHandler ; TIM23 global interrup + DCD TIM24_IRQHandler ; TIM24 global interrup + +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + + AREA |.text|, CODE, READONLY + +; Reset handler +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT SystemInit + IMPORT __main + + LDR R0, =SystemInit + BLX R0 + LDR R0, =__main + BX R0 + ENDP + +; Dummy Exception Handlers (infinite loops which can be modified) + +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP +HardFault_Handler\ + PROC + EXPORT HardFault_Handler [WEAK] + B . + ENDP +MemManage_Handler\ + PROC + EXPORT MemManage_Handler [WEAK] + B . + ENDP +BusFault_Handler\ + PROC + EXPORT BusFault_Handler [WEAK] + B . + ENDP +UsageFault_Handler\ + PROC + EXPORT UsageFault_Handler [WEAK] + B . + ENDP +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +DebugMon_Handler\ + PROC + EXPORT DebugMon_Handler [WEAK] + B . + ENDP +PendSV_Handler PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC + + EXPORT WWDG_IRQHandler [WEAK] + EXPORT PVD_AVD_IRQHandler [WEAK] + EXPORT TAMP_STAMP_IRQHandler [WEAK] + EXPORT RTC_WKUP_IRQHandler [WEAK] + EXPORT FLASH_IRQHandler [WEAK] + EXPORT RCC_IRQHandler [WEAK] + EXPORT EXTI0_IRQHandler [WEAK] + EXPORT EXTI1_IRQHandler [WEAK] + EXPORT EXTI2_IRQHandler [WEAK] + EXPORT EXTI3_IRQHandler [WEAK] + EXPORT EXTI4_IRQHandler [WEAK] + EXPORT DMA1_Stream0_IRQHandler [WEAK] + EXPORT DMA1_Stream1_IRQHandler [WEAK] + EXPORT DMA1_Stream2_IRQHandler [WEAK] + EXPORT DMA1_Stream3_IRQHandler [WEAK] + EXPORT DMA1_Stream4_IRQHandler [WEAK] + EXPORT DMA1_Stream5_IRQHandler [WEAK] + EXPORT DMA1_Stream6_IRQHandler [WEAK] + EXPORT DMA1_Stream7_IRQHandler [WEAK] + EXPORT ADC_IRQHandler [WEAK] + EXPORT FDCAN1_IT0_IRQHandler [WEAK] + EXPORT FDCAN2_IT0_IRQHandler [WEAK] + EXPORT FDCAN1_IT1_IRQHandler [WEAK] + EXPORT FDCAN2_IT1_IRQHandler [WEAK] + EXPORT EXTI9_5_IRQHandler [WEAK] + EXPORT TIM1_BRK_IRQHandler [WEAK] + EXPORT TIM1_UP_IRQHandler [WEAK] + EXPORT TIM1_TRG_COM_IRQHandler [WEAK] + EXPORT TIM1_CC_IRQHandler [WEAK] + EXPORT TIM2_IRQHandler [WEAK] + EXPORT TIM3_IRQHandler [WEAK] + EXPORT TIM4_IRQHandler [WEAK] + EXPORT I2C1_EV_IRQHandler [WEAK] + EXPORT I2C1_ER_IRQHandler [WEAK] + EXPORT I2C2_EV_IRQHandler [WEAK] + EXPORT I2C2_ER_IRQHandler [WEAK] + EXPORT SPI1_IRQHandler [WEAK] + EXPORT SPI2_IRQHandler [WEAK] + EXPORT USART1_IRQHandler [WEAK] + EXPORT USART2_IRQHandler [WEAK] + EXPORT USART3_IRQHandler [WEAK] + EXPORT EXTI15_10_IRQHandler [WEAK] + EXPORT RTC_Alarm_IRQHandler [WEAK] + EXPORT TIM8_BRK_TIM12_IRQHandler [WEAK] + EXPORT TIM8_UP_TIM13_IRQHandler [WEAK] + EXPORT TIM8_TRG_COM_TIM14_IRQHandler [WEAK] + EXPORT TIM8_CC_IRQHandler [WEAK] + EXPORT DMA1_Stream7_IRQHandler [WEAK] + EXPORT FMC_IRQHandler [WEAK] + EXPORT SDMMC1_IRQHandler [WEAK] + EXPORT TIM5_IRQHandler [WEAK] + EXPORT SPI3_IRQHandler [WEAK] + EXPORT UART4_IRQHandler [WEAK] + EXPORT UART5_IRQHandler [WEAK] + EXPORT TIM6_DAC_IRQHandler [WEAK] + EXPORT TIM7_IRQHandler [WEAK] + EXPORT DMA2_Stream0_IRQHandler [WEAK] + EXPORT DMA2_Stream1_IRQHandler [WEAK] + EXPORT DMA2_Stream2_IRQHandler [WEAK] + EXPORT DMA2_Stream3_IRQHandler [WEAK] + EXPORT DMA2_Stream4_IRQHandler [WEAK] + EXPORT ETH_IRQHandler [WEAK] + EXPORT ETH_WKUP_IRQHandler [WEAK] + EXPORT FDCAN_CAL_IRQHandler [WEAK] + EXPORT DMA2_Stream5_IRQHandler [WEAK] + EXPORT DMA2_Stream6_IRQHandler [WEAK] + EXPORT DMA2_Stream7_IRQHandler [WEAK] + EXPORT USART6_IRQHandler [WEAK] + EXPORT I2C3_EV_IRQHandler [WEAK] + EXPORT I2C3_ER_IRQHandler [WEAK] + EXPORT OTG_HS_EP1_OUT_IRQHandler [WEAK] + EXPORT OTG_HS_EP1_IN_IRQHandler [WEAK] + EXPORT OTG_HS_WKUP_IRQHandler [WEAK] + EXPORT OTG_HS_IRQHandler [WEAK] + EXPORT DCMI_PSSI_IRQHandler [WEAK] + EXPORT CRYP_IRQHandler [WEAK] + EXPORT HASH_RNG_IRQHandler [WEAK] + EXPORT FPU_IRQHandler [WEAK] + EXPORT UART7_IRQHandler [WEAK] + EXPORT UART8_IRQHandler [WEAK] + EXPORT SPI4_IRQHandler [WEAK] + EXPORT SPI5_IRQHandler [WEAK] + EXPORT SPI6_IRQHandler [WEAK] + EXPORT SAI1_IRQHandler [WEAK] + EXPORT LTDC_IRQHandler [WEAK] + EXPORT LTDC_ER_IRQHandler [WEAK] + EXPORT DMA2D_IRQHandler [WEAK] + EXPORT OCTOSPI1_IRQHandler [WEAK] + EXPORT LPTIM1_IRQHandler [WEAK] + EXPORT CEC_IRQHandler [WEAK] + EXPORT I2C4_EV_IRQHandler [WEAK] + EXPORT I2C4_ER_IRQHandler [WEAK] + EXPORT SPDIF_RX_IRQHandler [WEAK] + EXPORT DMAMUX1_OVR_IRQHandler [WEAK] + EXPORT DFSDM1_FLT0_IRQHandler [WEAK] + EXPORT DFSDM1_FLT1_IRQHandler [WEAK] + EXPORT DFSDM1_FLT2_IRQHandler [WEAK] + EXPORT DFSDM1_FLT3_IRQHandler [WEAK] + EXPORT SWPMI1_IRQHandler [WEAK] + EXPORT TIM15_IRQHandler [WEAK] + EXPORT TIM16_IRQHandler [WEAK] + EXPORT TIM17_IRQHandler [WEAK] + EXPORT MDIOS_WKUP_IRQHandler [WEAK] + EXPORT MDIOS_IRQHandler [WEAK] + EXPORT MDMA_IRQHandler [WEAK] + EXPORT SDMMC2_IRQHandler [WEAK] + EXPORT HSEM1_IRQHandler [WEAK] + EXPORT ADC3_IRQHandler [WEAK] + EXPORT DMAMUX2_OVR_IRQHandler [WEAK] + EXPORT BDMA_Channel0_IRQHandler [WEAK] + EXPORT BDMA_Channel1_IRQHandler [WEAK] + EXPORT BDMA_Channel2_IRQHandler [WEAK] + EXPORT BDMA_Channel3_IRQHandler [WEAK] + EXPORT BDMA_Channel4_IRQHandler [WEAK] + EXPORT BDMA_Channel5_IRQHandler [WEAK] + EXPORT BDMA_Channel6_IRQHandler [WEAK] + EXPORT BDMA_Channel7_IRQHandler [WEAK] + EXPORT COMP1_IRQHandler [WEAK] + EXPORT LPTIM2_IRQHandler [WEAK] + EXPORT LPTIM3_IRQHandler [WEAK] + EXPORT LPTIM4_IRQHandler [WEAK] + EXPORT LPTIM5_IRQHandler [WEAK] + EXPORT LPUART1_IRQHandler [WEAK] + EXPORT CRS_IRQHandler [WEAK] + EXPORT ECC_IRQHandler [WEAK] + EXPORT SAI4_IRQHandler [WEAK] + EXPORT DTS_IRQHandler [WEAK] + EXPORT WAKEUP_PIN_IRQHandler [WEAK] + EXPORT OCTOSPI2_IRQHandler [WEAK] + EXPORT OTFDEC1_IRQHandler [WEAK] + EXPORT OTFDEC2_IRQHandler [WEAK] + EXPORT FMAC_IRQHandler [WEAK] + EXPORT CORDIC_IRQHandler [WEAK] + EXPORT UART9_IRQHandler [WEAK] + EXPORT USART10_IRQHandler [WEAK] + EXPORT I2C5_EV_IRQHandler [WEAK] + EXPORT I2C5_ER_IRQHandler [WEAK] + EXPORT FDCAN3_IT0_IRQHandler [WEAK] + EXPORT FDCAN3_IT1_IRQHandler [WEAK] + EXPORT TIM23_IRQHandler [WEAK] + EXPORT TIM24_IRQHandler [WEAK] + +WWDG_IRQHandler +PVD_AVD_IRQHandler +TAMP_STAMP_IRQHandler +RTC_WKUP_IRQHandler +FLASH_IRQHandler +RCC_IRQHandler +EXTI0_IRQHandler +EXTI1_IRQHandler +EXTI2_IRQHandler +EXTI3_IRQHandler +EXTI4_IRQHandler +DMA1_Stream0_IRQHandler +DMA1_Stream1_IRQHandler +DMA1_Stream2_IRQHandler +DMA1_Stream3_IRQHandler +DMA1_Stream4_IRQHandler +DMA1_Stream5_IRQHandler +DMA1_Stream6_IRQHandler +ADC_IRQHandler +FDCAN1_IT0_IRQHandler +FDCAN2_IT0_IRQHandler +FDCAN1_IT1_IRQHandler +FDCAN2_IT1_IRQHandler +EXTI9_5_IRQHandler +TIM1_BRK_IRQHandler +TIM1_UP_IRQHandler +TIM1_TRG_COM_IRQHandler +TIM1_CC_IRQHandler +TIM2_IRQHandler +TIM3_IRQHandler +TIM4_IRQHandler +I2C1_EV_IRQHandler +I2C1_ER_IRQHandler +I2C2_EV_IRQHandler +I2C2_ER_IRQHandler +SPI1_IRQHandler +SPI2_IRQHandler +USART1_IRQHandler +USART2_IRQHandler +USART3_IRQHandler +EXTI15_10_IRQHandler +RTC_Alarm_IRQHandler +TIM8_BRK_TIM12_IRQHandler +TIM8_UP_TIM13_IRQHandler +TIM8_TRG_COM_TIM14_IRQHandler +TIM8_CC_IRQHandler +DMA1_Stream7_IRQHandler +FMC_IRQHandler +SDMMC1_IRQHandler +TIM5_IRQHandler +SPI3_IRQHandler +UART4_IRQHandler +UART5_IRQHandler +TIM6_DAC_IRQHandler +TIM7_IRQHandler +DMA2_Stream0_IRQHandler +DMA2_Stream1_IRQHandler +DMA2_Stream2_IRQHandler +DMA2_Stream3_IRQHandler +DMA2_Stream4_IRQHandler +ETH_IRQHandler +ETH_WKUP_IRQHandler +FDCAN_CAL_IRQHandler +DMA2_Stream5_IRQHandler +DMA2_Stream6_IRQHandler +DMA2_Stream7_IRQHandler +USART6_IRQHandler +I2C3_EV_IRQHandler +I2C3_ER_IRQHandler +OTG_HS_EP1_OUT_IRQHandler +OTG_HS_EP1_IN_IRQHandler +OTG_HS_WKUP_IRQHandler +OTG_HS_IRQHandler +DCMI_PSSI_IRQHandler +CRYP_IRQHandler +HASH_RNG_IRQHandler +FPU_IRQHandler +UART7_IRQHandler +UART8_IRQHandler +SPI4_IRQHandler +SPI5_IRQHandler +SPI6_IRQHandler +SAI1_IRQHandler +LTDC_IRQHandler +LTDC_ER_IRQHandler +DMA2D_IRQHandler +OCTOSPI1_IRQHandler +LPTIM1_IRQHandler +CEC_IRQHandler +I2C4_EV_IRQHandler +I2C4_ER_IRQHandler +SPDIF_RX_IRQHandler +DMAMUX1_OVR_IRQHandler +DFSDM1_FLT0_IRQHandler +DFSDM1_FLT1_IRQHandler +DFSDM1_FLT2_IRQHandler +DFSDM1_FLT3_IRQHandler +SWPMI1_IRQHandler +TIM15_IRQHandler +TIM16_IRQHandler +TIM17_IRQHandler +MDIOS_WKUP_IRQHandler +MDIOS_IRQHandler +MDMA_IRQHandler +SDMMC2_IRQHandler +HSEM1_IRQHandler +ADC3_IRQHandler +DMAMUX2_OVR_IRQHandler +BDMA_Channel0_IRQHandler +BDMA_Channel1_IRQHandler +BDMA_Channel2_IRQHandler +BDMA_Channel3_IRQHandler +BDMA_Channel4_IRQHandler +BDMA_Channel5_IRQHandler +BDMA_Channel6_IRQHandler +BDMA_Channel7_IRQHandler +COMP1_IRQHandler +LPTIM2_IRQHandler +LPTIM3_IRQHandler +LPTIM4_IRQHandler +LPTIM5_IRQHandler +LPUART1_IRQHandler +CRS_IRQHandler +ECC_IRQHandler +SAI4_IRQHandler +DTS_IRQHandler +WAKEUP_PIN_IRQHandler +OCTOSPI2_IRQHandler +OTFDEC1_IRQHandler +OTFDEC2_IRQHandler +FMAC_IRQHandler +CORDIC_IRQHandler +UART9_IRQHandler +USART10_IRQHandler +I2C5_EV_IRQHandler +I2C5_ER_IRQHandler +FDCAN3_IT0_IRQHandler +FDCAN3_IT1_IRQHandler +TIM23_IRQHandler +TIM24_IRQHandler + + B . + + ENDP + + ALIGN + +;******************************************************************************* +; User Stack and Heap initialization +;******************************************************************************* + IF :DEF:__MICROLIB + + EXPORT __initial_sp + EXPORT __heap_base + EXPORT __heap_limit + + ELSE + + IMPORT __use_two_region_memory + EXPORT __user_initial_stackheap + +__user_initial_stackheap + + LDR R0, = Heap_Mem + LDR R1, =(Stack_Mem + Stack_Size) + LDR R2, = (Heap_Mem + Heap_Size) + LDR R3, = Stack_Mem + BX LR + + ALIGN + + ENDIF + + END + +;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE***** diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/linker/stm32h745xg_flash_CM4.ld b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/linker/stm32h745xg_flash_CM4.ld new file mode 100644 index 0000000..a1491f5 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/linker/stm32h745xg_flash_CM4.ld @@ -0,0 +1,172 @@ +/* +****************************************************************************** +** + +** File : LinkerScript.ld +** +** +** Abstract : Linker script for STM32H7 series +** 512Kbytes FLASH and 288Kbytes RAM +** +** Set heap size, stack size and stack location according +** to application requirements. +** +** Set memory bank area and size if external memory is used. +** +** Target : STMicroelectronics STM32 +** +** Distribution: The file is distributed as is, without any warranty +** of any kind. +** +***************************************************************************** +** @attention +** +** Copyright (c) 2020 STMicroelectronics. +** All rights reserved. +** +** This software component is licensed by ST under BSD 3-Clause license, +** the "License"; You may not use this file except in compliance with the +** License. You may obtain a copy of the License at: +** opensource.org/licenses/BSD-3-Clause +** +**************************************************************************** +*/ + +/* Entry Point */ +ENTRY(Reset_Handler) + +/* Highest address of the user mode stack */ +_estack = 0x10048000; /* end of RAM */ +/* Generate a link error if heap and stack don't fit into RAM */ +_Min_Heap_Size = 0x200; /* required amount of heap */ +_Min_Stack_Size = 0x400; /* required amount of stack */ + +/* Specify the memory areas */ +MEMORY +{ +FLASH (rx) : ORIGIN = 0x08100000, LENGTH = 512K +RAM (xrw) : ORIGIN = 0x10000000, LENGTH = 288K +} + +/* Define output sections */ +SECTIONS +{ + /* The startup code goes first into FLASH */ + .isr_vector : + { + . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ + . = ALIGN(4); + } >FLASH + + /* The program code and other data goes into FLASH */ + .text : + { + . = ALIGN(4); + *(.text) /* .text sections (code) */ + *(.text*) /* .text* sections (code) */ + *(.glue_7) /* glue arm to thumb code */ + *(.glue_7t) /* glue thumb to arm code */ + *(.eh_frame) + + KEEP (*(.init)) + KEEP (*(.fini)) + + . = ALIGN(4); + _etext = .; /* define a global symbols at end of code */ + } >FLASH + + /* Constant data goes into FLASH */ + .rodata : + { + . = ALIGN(4); + *(.rodata) /* .rodata sections (constants, strings, etc.) */ + *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ + . = ALIGN(4); + } >FLASH + + .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH + .ARM : { + __exidx_start = .; + *(.ARM.exidx*) + __exidx_end = .; + } >FLASH + + .preinit_array : + { + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array*)) + PROVIDE_HIDDEN (__preinit_array_end = .); + } >FLASH + .init_array : + { + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array*)) + PROVIDE_HIDDEN (__init_array_end = .); + } >FLASH + .fini_array : + { + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT(.fini_array.*))) + KEEP (*(.fini_array*)) + PROVIDE_HIDDEN (__fini_array_end = .); + } >FLASH + + /* used by the startup to initialize data */ + _sidata = LOADADDR(.data); + + /* Initialized data sections goes into RAM, load LMA copy after code */ + .data : + { + . = ALIGN(4); + _sdata = .; /* create a global symbol at data start */ + *(.data) /* .data sections */ + *(.data*) /* .data* sections */ + + . = ALIGN(4); + _edata = .; /* define a global symbol at data end */ + } >RAM AT> FLASH + + + /* Uninitialized data section */ + . = ALIGN(4); + .bss : + { + /* This is used by the startup in order to initialize the .bss secion */ + _sbss = .; /* define a global symbol at bss start */ + __bss_start__ = _sbss; + *(.bss) + *(.bss*) + *(COMMON) + + . = ALIGN(4); + _ebss = .; /* define a global symbol at bss end */ + __bss_end__ = _ebss; + } >RAM + + /* User_heap_stack section, used to check that there is enough RAM left */ + ._user_heap_stack : + { + . = ALIGN(8); + PROVIDE ( end = . ); + PROVIDE ( _end = . ); + . = . + _Min_Heap_Size; + . = . + _Min_Stack_Size; + . = ALIGN(8); + } >RAM + + + + /* Remove information from the standard libraries */ + /DISCARD/ : + { + libc.a ( * ) + libm.a ( * ) + libgcc.a ( * ) + } + + .ARM.attributes 0 : { *(.ARM.attributes) } +} + + diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/linker/stm32h745xg_flash_CM7.ld b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/linker/stm32h745xg_flash_CM7.ld new file mode 100644 index 0000000..42dc6d2 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/linker/stm32h745xg_flash_CM7.ld @@ -0,0 +1,173 @@ +/* +****************************************************************************** +** + +** File : LinkerScript.ld +** +** +** Abstract : Linker script for STM32H7 series +** 512Kbytes FLASH and 192Kbytes RAM +** +** Set heap size, stack size and stack location according +** to application requirements. +** +** Set memory bank area and size if external memory is used. +** +** Target : STMicroelectronics STM32 +** +** Distribution: The file is distributed as is, without any warranty +** of any kind. +** +***************************************************************************** +** @attention +** +** Copyright (c) 2020 STMicroelectronics. +** All rights reserved. +** +** This software component is licensed by ST under BSD 3-Clause license, +** the "License"; You may not use this file except in compliance with the +** License. You may obtain a copy of the License at: +** opensource.org/licenses/BSD-3-Clause +** +**************************************************************************** +*/ + +/* Entry Point */ +ENTRY(Reset_Handler) + +/* Highest address of the user mode stack */ +_estack = 0x20020000; /* end of RAM */ +/* Generate a link error if heap and stack don't fit into RAM */ +_Min_Heap_Size = 0x200; /* required amount of heap */ +_Min_Stack_Size = 0x400; /* required amount of stack */ + +/* Specify the memory areas */ +MEMORY +{ +FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K +RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K +ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K +} + +/* Define output sections */ +SECTIONS +{ + /* The startup code goes first into FLASH */ + .isr_vector : + { + . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ + . = ALIGN(4); + } >FLASH + + /* The program code and other data goes into FLASH */ + .text : + { + . = ALIGN(4); + *(.text) /* .text sections (code) */ + *(.text*) /* .text* sections (code) */ + *(.glue_7) /* glue arm to thumb code */ + *(.glue_7t) /* glue thumb to arm code */ + *(.eh_frame) + + KEEP (*(.init)) + KEEP (*(.fini)) + + . = ALIGN(4); + _etext = .; /* define a global symbols at end of code */ + } >FLASH + + /* Constant data goes into FLASH */ + .rodata : + { + . = ALIGN(4); + *(.rodata) /* .rodata sections (constants, strings, etc.) */ + *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ + . = ALIGN(4); + } >FLASH + + .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH + .ARM : { + __exidx_start = .; + *(.ARM.exidx*) + __exidx_end = .; + } >FLASH + + .preinit_array : + { + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array*)) + PROVIDE_HIDDEN (__preinit_array_end = .); + } >FLASH + .init_array : + { + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array*)) + PROVIDE_HIDDEN (__init_array_end = .); + } >FLASH + .fini_array : + { + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT(.fini_array.*))) + KEEP (*(.fini_array*)) + PROVIDE_HIDDEN (__fini_array_end = .); + } >FLASH + + /* used by the startup to initialize data */ + _sidata = LOADADDR(.data); + + /* Initialized data sections goes into RAM, load LMA copy after code */ + .data : + { + . = ALIGN(4); + _sdata = .; /* create a global symbol at data start */ + *(.data) /* .data sections */ + *(.data*) /* .data* sections */ + + . = ALIGN(4); + _edata = .; /* define a global symbol at data end */ + } >RAM AT> FLASH + + + /* Uninitialized data section */ + . = ALIGN(4); + .bss : + { + /* This is used by the startup in order to initialize the .bss secion */ + _sbss = .; /* define a global symbol at bss start */ + __bss_start__ = _sbss; + *(.bss) + *(.bss*) + *(COMMON) + + . = ALIGN(4); + _ebss = .; /* define a global symbol at bss end */ + __bss_end__ = _ebss; + } >RAM + + /* User_heap_stack section, used to check that there is enough RAM left */ + ._user_heap_stack : + { + . = ALIGN(8); + PROVIDE ( end = . ); + PROVIDE ( _end = . ); + . = . + _Min_Heap_Size; + . = . + _Min_Stack_Size; + . = ALIGN(8); + } >RAM + + + + /* Remove information from the standard libraries */ + /DISCARD/ : + { + libc.a ( * ) + libm.a ( * ) + libgcc.a ( * ) + } + + .ARM.attributes 0 : { *(.ARM.attributes) } +} + + diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/linker/stm32h747xg_flash_CM4.ld b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/linker/stm32h747xg_flash_CM4.ld new file mode 100644 index 0000000..a1491f5 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/linker/stm32h747xg_flash_CM4.ld @@ -0,0 +1,172 @@ +/* +****************************************************************************** +** + +** File : LinkerScript.ld +** +** +** Abstract : Linker script for STM32H7 series +** 512Kbytes FLASH and 288Kbytes RAM +** +** Set heap size, stack size and stack location according +** to application requirements. +** +** Set memory bank area and size if external memory is used. +** +** Target : STMicroelectronics STM32 +** +** Distribution: The file is distributed as is, without any warranty +** of any kind. +** +***************************************************************************** +** @attention +** +** Copyright (c) 2020 STMicroelectronics. +** All rights reserved. +** +** This software component is licensed by ST under BSD 3-Clause license, +** the "License"; You may not use this file except in compliance with the +** License. You may obtain a copy of the License at: +** opensource.org/licenses/BSD-3-Clause +** +**************************************************************************** +*/ + +/* Entry Point */ +ENTRY(Reset_Handler) + +/* Highest address of the user mode stack */ +_estack = 0x10048000; /* end of RAM */ +/* Generate a link error if heap and stack don't fit into RAM */ +_Min_Heap_Size = 0x200; /* required amount of heap */ +_Min_Stack_Size = 0x400; /* required amount of stack */ + +/* Specify the memory areas */ +MEMORY +{ +FLASH (rx) : ORIGIN = 0x08100000, LENGTH = 512K +RAM (xrw) : ORIGIN = 0x10000000, LENGTH = 288K +} + +/* Define output sections */ +SECTIONS +{ + /* The startup code goes first into FLASH */ + .isr_vector : + { + . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ + . = ALIGN(4); + } >FLASH + + /* The program code and other data goes into FLASH */ + .text : + { + . = ALIGN(4); + *(.text) /* .text sections (code) */ + *(.text*) /* .text* sections (code) */ + *(.glue_7) /* glue arm to thumb code */ + *(.glue_7t) /* glue thumb to arm code */ + *(.eh_frame) + + KEEP (*(.init)) + KEEP (*(.fini)) + + . = ALIGN(4); + _etext = .; /* define a global symbols at end of code */ + } >FLASH + + /* Constant data goes into FLASH */ + .rodata : + { + . = ALIGN(4); + *(.rodata) /* .rodata sections (constants, strings, etc.) */ + *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ + . = ALIGN(4); + } >FLASH + + .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH + .ARM : { + __exidx_start = .; + *(.ARM.exidx*) + __exidx_end = .; + } >FLASH + + .preinit_array : + { + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array*)) + PROVIDE_HIDDEN (__preinit_array_end = .); + } >FLASH + .init_array : + { + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array*)) + PROVIDE_HIDDEN (__init_array_end = .); + } >FLASH + .fini_array : + { + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT(.fini_array.*))) + KEEP (*(.fini_array*)) + PROVIDE_HIDDEN (__fini_array_end = .); + } >FLASH + + /* used by the startup to initialize data */ + _sidata = LOADADDR(.data); + + /* Initialized data sections goes into RAM, load LMA copy after code */ + .data : + { + . = ALIGN(4); + _sdata = .; /* create a global symbol at data start */ + *(.data) /* .data sections */ + *(.data*) /* .data* sections */ + + . = ALIGN(4); + _edata = .; /* define a global symbol at data end */ + } >RAM AT> FLASH + + + /* Uninitialized data section */ + . = ALIGN(4); + .bss : + { + /* This is used by the startup in order to initialize the .bss secion */ + _sbss = .; /* define a global symbol at bss start */ + __bss_start__ = _sbss; + *(.bss) + *(.bss*) + *(COMMON) + + . = ALIGN(4); + _ebss = .; /* define a global symbol at bss end */ + __bss_end__ = _ebss; + } >RAM + + /* User_heap_stack section, used to check that there is enough RAM left */ + ._user_heap_stack : + { + . = ALIGN(8); + PROVIDE ( end = . ); + PROVIDE ( _end = . ); + . = . + _Min_Heap_Size; + . = . + _Min_Stack_Size; + . = ALIGN(8); + } >RAM + + + + /* Remove information from the standard libraries */ + /DISCARD/ : + { + libc.a ( * ) + libm.a ( * ) + libgcc.a ( * ) + } + + .ARM.attributes 0 : { *(.ARM.attributes) } +} + + diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/linker/stm32h747xg_flash_CM7.ld b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/linker/stm32h747xg_flash_CM7.ld new file mode 100644 index 0000000..42dc6d2 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/linker/stm32h747xg_flash_CM7.ld @@ -0,0 +1,173 @@ +/* +****************************************************************************** +** + +** File : LinkerScript.ld +** +** +** Abstract : Linker script for STM32H7 series +** 512Kbytes FLASH and 192Kbytes RAM +** +** Set heap size, stack size and stack location according +** to application requirements. +** +** Set memory bank area and size if external memory is used. +** +** Target : STMicroelectronics STM32 +** +** Distribution: The file is distributed as is, without any warranty +** of any kind. +** +***************************************************************************** +** @attention +** +** Copyright (c) 2020 STMicroelectronics. +** All rights reserved. +** +** This software component is licensed by ST under BSD 3-Clause license, +** the "License"; You may not use this file except in compliance with the +** License. You may obtain a copy of the License at: +** opensource.org/licenses/BSD-3-Clause +** +**************************************************************************** +*/ + +/* Entry Point */ +ENTRY(Reset_Handler) + +/* Highest address of the user mode stack */ +_estack = 0x20020000; /* end of RAM */ +/* Generate a link error if heap and stack don't fit into RAM */ +_Min_Heap_Size = 0x200; /* required amount of heap */ +_Min_Stack_Size = 0x400; /* required amount of stack */ + +/* Specify the memory areas */ +MEMORY +{ +FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K +RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K +ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K +} + +/* Define output sections */ +SECTIONS +{ + /* The startup code goes first into FLASH */ + .isr_vector : + { + . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ + . = ALIGN(4); + } >FLASH + + /* The program code and other data goes into FLASH */ + .text : + { + . = ALIGN(4); + *(.text) /* .text sections (code) */ + *(.text*) /* .text* sections (code) */ + *(.glue_7) /* glue arm to thumb code */ + *(.glue_7t) /* glue thumb to arm code */ + *(.eh_frame) + + KEEP (*(.init)) + KEEP (*(.fini)) + + . = ALIGN(4); + _etext = .; /* define a global symbols at end of code */ + } >FLASH + + /* Constant data goes into FLASH */ + .rodata : + { + . = ALIGN(4); + *(.rodata) /* .rodata sections (constants, strings, etc.) */ + *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ + . = ALIGN(4); + } >FLASH + + .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH + .ARM : { + __exidx_start = .; + *(.ARM.exidx*) + __exidx_end = .; + } >FLASH + + .preinit_array : + { + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array*)) + PROVIDE_HIDDEN (__preinit_array_end = .); + } >FLASH + .init_array : + { + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array*)) + PROVIDE_HIDDEN (__init_array_end = .); + } >FLASH + .fini_array : + { + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT(.fini_array.*))) + KEEP (*(.fini_array*)) + PROVIDE_HIDDEN (__fini_array_end = .); + } >FLASH + + /* used by the startup to initialize data */ + _sidata = LOADADDR(.data); + + /* Initialized data sections goes into RAM, load LMA copy after code */ + .data : + { + . = ALIGN(4); + _sdata = .; /* create a global symbol at data start */ + *(.data) /* .data sections */ + *(.data*) /* .data* sections */ + + . = ALIGN(4); + _edata = .; /* define a global symbol at data end */ + } >RAM AT> FLASH + + + /* Uninitialized data section */ + . = ALIGN(4); + .bss : + { + /* This is used by the startup in order to initialize the .bss secion */ + _sbss = .; /* define a global symbol at bss start */ + __bss_start__ = _sbss; + *(.bss) + *(.bss*) + *(COMMON) + + . = ALIGN(4); + _ebss = .; /* define a global symbol at bss end */ + __bss_end__ = _ebss; + } >RAM + + /* User_heap_stack section, used to check that there is enough RAM left */ + ._user_heap_stack : + { + . = ALIGN(8); + PROVIDE ( end = . ); + PROVIDE ( _end = . ); + . = . + _Min_Heap_Size; + . = . + _Min_Stack_Size; + . = ALIGN(8); + } >RAM + + + + /* Remove information from the standard libraries */ + /DISCARD/ : + { + libc.a ( * ) + libm.a ( * ) + libgcc.a ( * ) + } + + .ARM.attributes 0 : { *(.ARM.attributes) } +} + + diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h723xx.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h723xx.s new file mode 100644 index 0000000..1398aca --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h723xx.s @@ -0,0 +1,756 @@ +/** + ****************************************************************************** + * @file startup_stm32h723xx.s + * @author MCD Application Team + * @brief STM32H723xx Devices vector table for GCC based toolchain. + * This module performs: + * - Set the initial SP + * - Set the initial PC == Reset_Handler, + * - Set the vector table entries with the exceptions ISR address + * - Branches to main in the C library (which eventually + * calls main()). + * After Reset the Cortex-M processor is in Thread mode, + * priority is Privileged, and the Stack is set to Main. + ****************************************************************************** + * @attention + * + *

                  © Copyright (c) 2019 STMicroelectronics. + * All rights reserved.

                  + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + + .syntax unified + .cpu cortex-m7 + .fpu softvfp + .thumb + +.global g_pfnVectors +.global Default_Handler + +/* start address for the initialization values of the .data section. +defined in linker script */ +.word _sidata +/* start address for the .data section. defined in linker script */ +.word _sdata +/* end address for the .data section. defined in linker script */ +.word _edata +/* start address for the .bss section. defined in linker script */ +.word _sbss +/* end address for the .bss section. defined in linker script */ +.word _ebss +/* stack used for SystemInit_ExtMemCtl; always internal RAM used */ + +/** + * @brief This is the code that gets called when the processor first + * starts execution following a reset event. Only the absolutely + * necessary set is performed, after which the application + * supplied main() routine is called. + * @param None + * @retval : None +*/ + + .section .text.Reset_Handler + .weak Reset_Handler + .type Reset_Handler, %function +Reset_Handler: + ldr sp, =_estack /* set stack pointer */ + +/* Call the clock system intitialization function.*/ + bl SystemInit + +/* Copy the data segment initializers from flash to SRAM */ + movs r1, #0 + b LoopCopyDataInit + +CopyDataInit: + ldr r3, =_sidata + ldr r3, [r3, r1] + str r3, [r0, r1] + adds r1, r1, #4 + +LoopCopyDataInit: + ldr r0, =_sdata + ldr r3, =_edata + adds r2, r0, r1 + cmp r2, r3 + bcc CopyDataInit + ldr r2, =_sbss + b LoopFillZerobss +/* Zero fill the bss segment. */ +FillZerobss: + movs r3, #0 + str r3, [r2], #4 + +LoopFillZerobss: + ldr r3, = _ebss + cmp r2, r3 + bcc FillZerobss + +/* Call static constructors */ + bl __libc_init_array +/* Call the application's entry point.*/ + bl main + bx lr +.size Reset_Handler, .-Reset_Handler + +/** + * @brief This is the code that gets called when the processor receives an + * unexpected interrupt. This simply enters an infinite loop, preserving + * the system state for examination by a debugger. + * @param None + * @retval None +*/ + .section .text.Default_Handler,"ax",%progbits +Default_Handler: +Infinite_Loop: + b Infinite_Loop + .size Default_Handler, .-Default_Handler +/****************************************************************************** +* +* The minimal vector table for a Cortex M. Note that the proper constructs +* must be placed on this to ensure that it ends up at physical address +* 0x0000.0000. +* +*******************************************************************************/ + .section .isr_vector,"a",%progbits + .type g_pfnVectors, %object + .size g_pfnVectors, .-g_pfnVectors + + +g_pfnVectors: + .word _estack + .word Reset_Handler + + .word NMI_Handler + .word HardFault_Handler + .word MemManage_Handler + .word BusFault_Handler + .word UsageFault_Handler + .word 0 + .word 0 + .word 0 + .word 0 + .word SVC_Handler + .word DebugMon_Handler + .word 0 + .word PendSV_Handler + .word SysTick_Handler + + /* External Interrupts */ + .word WWDG_IRQHandler /* Window WatchDog */ + .word PVD_AVD_IRQHandler /* PVD/AVD through EXTI Line detection */ + .word TAMP_STAMP_IRQHandler /* Tamper and TimeStamps through the EXTI line */ + .word RTC_WKUP_IRQHandler /* RTC Wakeup through the EXTI line */ + .word FLASH_IRQHandler /* FLASH */ + .word RCC_IRQHandler /* RCC */ + .word EXTI0_IRQHandler /* EXTI Line0 */ + .word EXTI1_IRQHandler /* EXTI Line1 */ + .word EXTI2_IRQHandler /* EXTI Line2 */ + .word EXTI3_IRQHandler /* EXTI Line3 */ + .word EXTI4_IRQHandler /* EXTI Line4 */ + .word DMA1_Stream0_IRQHandler /* DMA1 Stream 0 */ + .word DMA1_Stream1_IRQHandler /* DMA1 Stream 1 */ + .word DMA1_Stream2_IRQHandler /* DMA1 Stream 2 */ + .word DMA1_Stream3_IRQHandler /* DMA1 Stream 3 */ + .word DMA1_Stream4_IRQHandler /* DMA1 Stream 4 */ + .word DMA1_Stream5_IRQHandler /* DMA1 Stream 5 */ + .word DMA1_Stream6_IRQHandler /* DMA1 Stream 6 */ + .word ADC_IRQHandler /* ADC1, ADC2 and ADC3s */ + .word FDCAN1_IT0_IRQHandler /* FDCAN1 interrupt line 0 */ + .word FDCAN2_IT0_IRQHandler /* FDCAN2 interrupt line 0 */ + .word FDCAN1_IT1_IRQHandler /* FDCAN1 interrupt line 1 */ + .word FDCAN2_IT1_IRQHandler /* FDCAN2 interrupt line 1 */ + .word EXTI9_5_IRQHandler /* External Line[9:5]s */ + .word TIM1_BRK_IRQHandler /* TIM1 Break interrupt */ + .word TIM1_UP_IRQHandler /* TIM1 Update interrupt */ + .word TIM1_TRG_COM_IRQHandler /* TIM1 Trigger and Commutation interrupt */ + .word TIM1_CC_IRQHandler /* TIM1 Capture Compare */ + .word TIM2_IRQHandler /* TIM2 */ + .word TIM3_IRQHandler /* TIM3 */ + .word TIM4_IRQHandler /* TIM4 */ + .word I2C1_EV_IRQHandler /* I2C1 Event */ + .word I2C1_ER_IRQHandler /* I2C1 Error */ + .word I2C2_EV_IRQHandler /* I2C2 Event */ + .word I2C2_ER_IRQHandler /* I2C2 Error */ + .word SPI1_IRQHandler /* SPI1 */ + .word SPI2_IRQHandler /* SPI2 */ + .word USART1_IRQHandler /* USART1 */ + .word USART2_IRQHandler /* USART2 */ + .word USART3_IRQHandler /* USART3 */ + .word EXTI15_10_IRQHandler /* External Line[15:10]s */ + .word RTC_Alarm_IRQHandler /* RTC Alarm (A and B) through EXTI Line */ + .word 0 /* Reserved */ + .word TIM8_BRK_TIM12_IRQHandler /* TIM8 Break and TIM12 */ + .word TIM8_UP_TIM13_IRQHandler /* TIM8 Update and TIM13 */ + .word TIM8_TRG_COM_TIM14_IRQHandler /* TIM8 Trigger and Commutation and TIM14 */ + .word TIM8_CC_IRQHandler /* TIM8 Capture Compare */ + .word DMA1_Stream7_IRQHandler /* DMA1 Stream7 */ + .word FMC_IRQHandler /* FMC */ + .word SDMMC1_IRQHandler /* SDMMC1 */ + .word TIM5_IRQHandler /* TIM5 */ + .word SPI3_IRQHandler /* SPI3 */ + .word UART4_IRQHandler /* UART4 */ + .word UART5_IRQHandler /* UART5 */ + .word TIM6_DAC_IRQHandler /* TIM6 and DAC1&2 underrun errors */ + .word TIM7_IRQHandler /* TIM7 */ + .word DMA2_Stream0_IRQHandler /* DMA2 Stream 0 */ + .word DMA2_Stream1_IRQHandler /* DMA2 Stream 1 */ + .word DMA2_Stream2_IRQHandler /* DMA2 Stream 2 */ + .word DMA2_Stream3_IRQHandler /* DMA2 Stream 3 */ + .word DMA2_Stream4_IRQHandler /* DMA2 Stream 4 */ + .word ETH_IRQHandler /* Ethernet */ + .word ETH_WKUP_IRQHandler /* Ethernet Wakeup through EXTI line */ + .word FDCAN_CAL_IRQHandler /* FDCAN calibration unit interrupt*/ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word DMA2_Stream5_IRQHandler /* DMA2 Stream 5 */ + .word DMA2_Stream6_IRQHandler /* DMA2 Stream 6 */ + .word DMA2_Stream7_IRQHandler /* DMA2 Stream 7 */ + .word USART6_IRQHandler /* USART6 */ + .word I2C3_EV_IRQHandler /* I2C3 event */ + .word I2C3_ER_IRQHandler /* I2C3 error */ + .word OTG_HS_EP1_OUT_IRQHandler /* USB OTG HS End Point 1 Out */ + .word OTG_HS_EP1_IN_IRQHandler /* USB OTG HS End Point 1 In */ + .word OTG_HS_WKUP_IRQHandler /* USB OTG HS Wakeup through EXTI */ + .word OTG_HS_IRQHandler /* USB OTG HS */ + .word DCMI_PSSI_IRQHandler /* DCMI, PSSI */ + .word 0 /* Reserved */ + .word RNG_IRQHandler /* Rng */ + .word FPU_IRQHandler /* FPU */ + .word UART7_IRQHandler /* UART7 */ + .word UART8_IRQHandler /* UART8 */ + .word SPI4_IRQHandler /* SPI4 */ + .word SPI5_IRQHandler /* SPI5 */ + .word SPI6_IRQHandler /* SPI6 */ + .word SAI1_IRQHandler /* SAI1 */ + .word LTDC_IRQHandler /* LTDC */ + .word LTDC_ER_IRQHandler /* LTDC error */ + .word DMA2D_IRQHandler /* DMA2D */ + .word 0 /* Reserved */ + .word OCTOSPI1_IRQHandler /* OCTOSPI1 */ + .word LPTIM1_IRQHandler /* LPTIM1 */ + .word CEC_IRQHandler /* HDMI_CEC */ + .word I2C4_EV_IRQHandler /* I2C4 Event */ + .word I2C4_ER_IRQHandler /* I2C4 Error */ + .word SPDIF_RX_IRQHandler /* SPDIF_RX */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word DMAMUX1_OVR_IRQHandler /* DMAMUX1 Overrun interrupt */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word DFSDM1_FLT0_IRQHandler /* DFSDM Filter0 Interrupt */ + .word DFSDM1_FLT1_IRQHandler /* DFSDM Filter1 Interrupt */ + .word DFSDM1_FLT2_IRQHandler /* DFSDM Filter2 Interrupt */ + .word DFSDM1_FLT3_IRQHandler /* DFSDM Filter3 Interrupt */ + .word 0 /* Reserved */ + .word SWPMI1_IRQHandler /* Serial Wire Interface 1 global interrupt */ + .word TIM15_IRQHandler /* TIM15 global Interrupt */ + .word TIM16_IRQHandler /* TIM16 global Interrupt */ + .word TIM17_IRQHandler /* TIM17 global Interrupt */ + .word MDIOS_WKUP_IRQHandler /* MDIOS Wakeup Interrupt */ + .word MDIOS_IRQHandler /* MDIOS global Interrupt */ + .word 0 /* Reserved */ + .word MDMA_IRQHandler /* MDMA global Interrupt */ + .word 0 /* Reserved */ + .word SDMMC2_IRQHandler /* SDMMC2 global Interrupt */ + .word HSEM1_IRQHandler /* HSEM1 global Interrupt */ + .word 0 /* Reserved */ + .word ADC3_IRQHandler /* ADC3 global Interrupt */ + .word DMAMUX2_OVR_IRQHandler /* DMAMUX Overrun interrupt */ + .word BDMA_Channel0_IRQHandler /* BDMA Channel 0 global Interrupt */ + .word BDMA_Channel1_IRQHandler /* BDMA Channel 1 global Interrupt */ + .word BDMA_Channel2_IRQHandler /* BDMA Channel 2 global Interrupt */ + .word BDMA_Channel3_IRQHandler /* BDMA Channel 3 global Interrupt */ + .word BDMA_Channel4_IRQHandler /* BDMA Channel 4 global Interrupt */ + .word BDMA_Channel5_IRQHandler /* BDMA Channel 5 global Interrupt */ + .word BDMA_Channel6_IRQHandler /* BDMA Channel 6 global Interrupt */ + .word BDMA_Channel7_IRQHandler /* BDMA Channel 7 global Interrupt */ + .word COMP1_IRQHandler /* COMP1 global Interrupt */ + .word LPTIM2_IRQHandler /* LP TIM2 global interrupt */ + .word LPTIM3_IRQHandler /* LP TIM3 global interrupt */ + .word LPTIM4_IRQHandler /* LP TIM4 global interrupt */ + .word LPTIM5_IRQHandler /* LP TIM5 global interrupt */ + .word LPUART1_IRQHandler /* LP UART1 interrupt */ + .word 0 /* Reserved */ + .word CRS_IRQHandler /* Clock Recovery Global Interrupt */ + .word ECC_IRQHandler /* ECC diagnostic Global Interrupt */ + .word SAI4_IRQHandler /* SAI4 global interrupt */ + .word DTS_IRQHandler /* Digital Temperature Sensor interrupt */ + .word 0 /* Reserved */ + .word WAKEUP_PIN_IRQHandler /* Interrupt for all 6 wake-up pins */ + .word OCTOSPI2_IRQHandler /* OCTOSPI2 Interrupt */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word FMAC_IRQHandler /* FMAC Interrupt */ + .word CORDIC_IRQHandler /* CORDIC Interrupt */ + .word UART9_IRQHandler /* UART9 Interrupt */ + .word USART10_IRQHandler /* UART10 Interrupt */ + .word I2C5_EV_IRQHandler /* I2C5 Event Interrupt */ + .word I2C5_ER_IRQHandler /* I2C5 Error Interrupt */ + .word FDCAN3_IT0_IRQHandler /* FDCAN3 interrupt line 0 */ + .word FDCAN3_IT1_IRQHandler /* FDCAN3 interrupt line 1 */ + .word TIM23_IRQHandler /* TIM23 global interrupt */ + .word TIM24_IRQHandler /* TIM24 global interrupt */ + +/******************************************************************************* +* +* Provide weak aliases for each Exception handler to the Default_Handler. +* As they are weak aliases, any function with the same name will override +* this definition. +* +*******************************************************************************/ + .weak NMI_Handler + .thumb_set NMI_Handler,Default_Handler + + .weak HardFault_Handler + .thumb_set HardFault_Handler,Default_Handler + + .weak MemManage_Handler + .thumb_set MemManage_Handler,Default_Handler + + .weak BusFault_Handler + .thumb_set BusFault_Handler,Default_Handler + + .weak UsageFault_Handler + .thumb_set UsageFault_Handler,Default_Handler + + .weak SVC_Handler + .thumb_set SVC_Handler,Default_Handler + + .weak DebugMon_Handler + .thumb_set DebugMon_Handler,Default_Handler + + .weak PendSV_Handler + .thumb_set PendSV_Handler,Default_Handler + + .weak SysTick_Handler + .thumb_set SysTick_Handler,Default_Handler + + .weak WWDG_IRQHandler + .thumb_set WWDG_IRQHandler,Default_Handler + + .weak PVD_AVD_IRQHandler + .thumb_set PVD_AVD_IRQHandler,Default_Handler + + .weak TAMP_STAMP_IRQHandler + .thumb_set TAMP_STAMP_IRQHandler,Default_Handler + + .weak RTC_WKUP_IRQHandler + .thumb_set RTC_WKUP_IRQHandler,Default_Handler + + .weak FLASH_IRQHandler + .thumb_set FLASH_IRQHandler,Default_Handler + + .weak RCC_IRQHandler + .thumb_set RCC_IRQHandler,Default_Handler + + .weak EXTI0_IRQHandler + .thumb_set EXTI0_IRQHandler,Default_Handler + + .weak EXTI1_IRQHandler + .thumb_set EXTI1_IRQHandler,Default_Handler + + .weak EXTI2_IRQHandler + .thumb_set EXTI2_IRQHandler,Default_Handler + + .weak EXTI3_IRQHandler + .thumb_set EXTI3_IRQHandler,Default_Handler + + .weak EXTI4_IRQHandler + .thumb_set EXTI4_IRQHandler,Default_Handler + + .weak DMA1_Stream0_IRQHandler + .thumb_set DMA1_Stream0_IRQHandler,Default_Handler + + .weak DMA1_Stream1_IRQHandler + .thumb_set DMA1_Stream1_IRQHandler,Default_Handler + + .weak DMA1_Stream2_IRQHandler + .thumb_set DMA1_Stream2_IRQHandler,Default_Handler + + .weak DMA1_Stream3_IRQHandler + .thumb_set DMA1_Stream3_IRQHandler,Default_Handler + + .weak DMA1_Stream4_IRQHandler + .thumb_set DMA1_Stream4_IRQHandler,Default_Handler + + .weak DMA1_Stream5_IRQHandler + .thumb_set DMA1_Stream5_IRQHandler,Default_Handler + + .weak DMA1_Stream6_IRQHandler + .thumb_set DMA1_Stream6_IRQHandler,Default_Handler + + .weak ADC_IRQHandler + .thumb_set ADC_IRQHandler,Default_Handler + + .weak FDCAN1_IT0_IRQHandler + .thumb_set FDCAN1_IT0_IRQHandler,Default_Handler + + .weak FDCAN2_IT0_IRQHandler + .thumb_set FDCAN2_IT0_IRQHandler,Default_Handler + + .weak FDCAN1_IT1_IRQHandler + .thumb_set FDCAN1_IT1_IRQHandler,Default_Handler + + .weak FDCAN2_IT1_IRQHandler + .thumb_set FDCAN2_IT1_IRQHandler,Default_Handler + + .weak EXTI9_5_IRQHandler + .thumb_set EXTI9_5_IRQHandler,Default_Handler + + .weak TIM1_BRK_IRQHandler + .thumb_set TIM1_BRK_IRQHandler,Default_Handler + + .weak TIM1_UP_IRQHandler + .thumb_set TIM1_UP_IRQHandler,Default_Handler + + .weak TIM1_TRG_COM_IRQHandler + .thumb_set TIM1_TRG_COM_IRQHandler,Default_Handler + + .weak TIM1_CC_IRQHandler + .thumb_set TIM1_CC_IRQHandler,Default_Handler + + .weak TIM2_IRQHandler + .thumb_set TIM2_IRQHandler,Default_Handler + + .weak TIM3_IRQHandler + .thumb_set TIM3_IRQHandler,Default_Handler + + .weak TIM4_IRQHandler + .thumb_set TIM4_IRQHandler,Default_Handler + + .weak I2C1_EV_IRQHandler + .thumb_set I2C1_EV_IRQHandler,Default_Handler + + .weak I2C1_ER_IRQHandler + .thumb_set I2C1_ER_IRQHandler,Default_Handler + + .weak I2C2_EV_IRQHandler + .thumb_set I2C2_EV_IRQHandler,Default_Handler + + .weak I2C2_ER_IRQHandler + .thumb_set I2C2_ER_IRQHandler,Default_Handler + + .weak SPI1_IRQHandler + .thumb_set SPI1_IRQHandler,Default_Handler + + .weak SPI2_IRQHandler + .thumb_set SPI2_IRQHandler,Default_Handler + + .weak USART1_IRQHandler + .thumb_set USART1_IRQHandler,Default_Handler + + .weak USART2_IRQHandler + .thumb_set USART2_IRQHandler,Default_Handler + + .weak USART3_IRQHandler + .thumb_set USART3_IRQHandler,Default_Handler + + .weak EXTI15_10_IRQHandler + .thumb_set EXTI15_10_IRQHandler,Default_Handler + + .weak RTC_Alarm_IRQHandler + .thumb_set RTC_Alarm_IRQHandler,Default_Handler + + .weak TIM8_BRK_TIM12_IRQHandler + .thumb_set TIM8_BRK_TIM12_IRQHandler,Default_Handler + + .weak TIM8_UP_TIM13_IRQHandler + .thumb_set TIM8_UP_TIM13_IRQHandler,Default_Handler + + .weak TIM8_TRG_COM_TIM14_IRQHandler + .thumb_set TIM8_TRG_COM_TIM14_IRQHandler,Default_Handler + + .weak TIM8_CC_IRQHandler + .thumb_set TIM8_CC_IRQHandler,Default_Handler + + .weak DMA1_Stream7_IRQHandler + .thumb_set DMA1_Stream7_IRQHandler,Default_Handler + + .weak FMC_IRQHandler + .thumb_set FMC_IRQHandler,Default_Handler + + .weak SDMMC1_IRQHandler + .thumb_set SDMMC1_IRQHandler,Default_Handler + + .weak TIM5_IRQHandler + .thumb_set TIM5_IRQHandler,Default_Handler + + .weak SPI3_IRQHandler + .thumb_set SPI3_IRQHandler,Default_Handler + + .weak UART4_IRQHandler + .thumb_set UART4_IRQHandler,Default_Handler + + .weak UART5_IRQHandler + .thumb_set UART5_IRQHandler,Default_Handler + + .weak TIM6_DAC_IRQHandler + .thumb_set TIM6_DAC_IRQHandler,Default_Handler + + .weak TIM7_IRQHandler + .thumb_set TIM7_IRQHandler,Default_Handler + + .weak DMA2_Stream0_IRQHandler + .thumb_set DMA2_Stream0_IRQHandler,Default_Handler + + .weak DMA2_Stream1_IRQHandler + .thumb_set DMA2_Stream1_IRQHandler,Default_Handler + + .weak DMA2_Stream2_IRQHandler + .thumb_set DMA2_Stream2_IRQHandler,Default_Handler + + .weak DMA2_Stream3_IRQHandler + .thumb_set DMA2_Stream3_IRQHandler,Default_Handler + + .weak DMA2_Stream4_IRQHandler + .thumb_set DMA2_Stream4_IRQHandler,Default_Handler + + .weak ETH_IRQHandler + .thumb_set ETH_IRQHandler,Default_Handler + + .weak ETH_WKUP_IRQHandler + .thumb_set ETH_WKUP_IRQHandler,Default_Handler + + .weak FDCAN_CAL_IRQHandler + .thumb_set FDCAN_CAL_IRQHandler,Default_Handler + + .weak DMA2_Stream5_IRQHandler + .thumb_set DMA2_Stream5_IRQHandler,Default_Handler + + .weak DMA2_Stream6_IRQHandler + .thumb_set DMA2_Stream6_IRQHandler,Default_Handler + + .weak DMA2_Stream7_IRQHandler + .thumb_set DMA2_Stream7_IRQHandler,Default_Handler + + .weak USART6_IRQHandler + .thumb_set USART6_IRQHandler,Default_Handler + + .weak I2C3_EV_IRQHandler + .thumb_set I2C3_EV_IRQHandler,Default_Handler + + .weak I2C3_ER_IRQHandler + .thumb_set I2C3_ER_IRQHandler,Default_Handler + + .weak OTG_HS_EP1_OUT_IRQHandler + .thumb_set OTG_HS_EP1_OUT_IRQHandler,Default_Handler + + .weak OTG_HS_EP1_IN_IRQHandler + .thumb_set OTG_HS_EP1_IN_IRQHandler,Default_Handler + + .weak OTG_HS_WKUP_IRQHandler + .thumb_set OTG_HS_WKUP_IRQHandler,Default_Handler + + .weak OTG_HS_IRQHandler + .thumb_set OTG_HS_IRQHandler,Default_Handler + + .weak DCMI_PSSI_IRQHandler + .thumb_set DCMI_PSSI_IRQHandler,Default_Handler + + .weak RNG_IRQHandler + .thumb_set RNG_IRQHandler,Default_Handler + + .weak FPU_IRQHandler + .thumb_set FPU_IRQHandler,Default_Handler + + .weak UART7_IRQHandler + .thumb_set UART7_IRQHandler,Default_Handler + + .weak UART8_IRQHandler + .thumb_set UART8_IRQHandler,Default_Handler + + .weak SPI4_IRQHandler + .thumb_set SPI4_IRQHandler,Default_Handler + + .weak SPI5_IRQHandler + .thumb_set SPI5_IRQHandler,Default_Handler + + .weak SPI6_IRQHandler + .thumb_set SPI6_IRQHandler,Default_Handler + + .weak SAI1_IRQHandler + .thumb_set SAI1_IRQHandler,Default_Handler + + .weak LTDC_IRQHandler + .thumb_set LTDC_IRQHandler,Default_Handler + + .weak LTDC_ER_IRQHandler + .thumb_set LTDC_ER_IRQHandler,Default_Handler + + .weak DMA2D_IRQHandler + .thumb_set DMA2D_IRQHandler,Default_Handler + + .weak OCTOSPI1_IRQHandler + .thumb_set OCTOSPI1_IRQHandler,Default_Handler + + .weak LPTIM1_IRQHandler + .thumb_set LPTIM1_IRQHandler,Default_Handler + + .weak CEC_IRQHandler + .thumb_set CEC_IRQHandler,Default_Handler + + .weak I2C4_EV_IRQHandler + .thumb_set I2C4_EV_IRQHandler,Default_Handler + + .weak I2C4_ER_IRQHandler + .thumb_set I2C4_ER_IRQHandler,Default_Handler + + .weak SPDIF_RX_IRQHandler + .thumb_set SPDIF_RX_IRQHandler,Default_Handler + + .weak DMAMUX1_OVR_IRQHandler + .thumb_set DMAMUX1_OVR_IRQHandler,Default_Handler + + .weak DFSDM1_FLT0_IRQHandler + .thumb_set DFSDM1_FLT0_IRQHandler,Default_Handler + + .weak DFSDM1_FLT1_IRQHandler + .thumb_set DFSDM1_FLT1_IRQHandler,Default_Handler + + .weak DFSDM1_FLT2_IRQHandler + .thumb_set DFSDM1_FLT2_IRQHandler,Default_Handler + + .weak DFSDM1_FLT3_IRQHandler + .thumb_set DFSDM1_FLT3_IRQHandler,Default_Handler + + .weak SWPMI1_IRQHandler + .thumb_set SWPMI1_IRQHandler,Default_Handler + + .weak TIM15_IRQHandler + .thumb_set TIM15_IRQHandler,Default_Handler + + .weak TIM16_IRQHandler + .thumb_set TIM16_IRQHandler,Default_Handler + + .weak TIM17_IRQHandler + .thumb_set TIM17_IRQHandler,Default_Handler + + .weak MDIOS_WKUP_IRQHandler + .thumb_set MDIOS_WKUP_IRQHandler,Default_Handler + + .weak MDIOS_IRQHandler + .thumb_set MDIOS_IRQHandler,Default_Handler + + .weak MDMA_IRQHandler + .thumb_set MDMA_IRQHandler,Default_Handler + + .weak SDMMC2_IRQHandler + .thumb_set SDMMC2_IRQHandler,Default_Handler + + .weak HSEM1_IRQHandler + .thumb_set HSEM1_IRQHandler,Default_Handler + + .weak ADC3_IRQHandler + .thumb_set ADC3_IRQHandler,Default_Handler + + .weak DMAMUX2_OVR_IRQHandler + .thumb_set DMAMUX2_OVR_IRQHandler,Default_Handler + + .weak BDMA_Channel0_IRQHandler + .thumb_set BDMA_Channel0_IRQHandler,Default_Handler + + .weak BDMA_Channel1_IRQHandler + .thumb_set BDMA_Channel1_IRQHandler,Default_Handler + + .weak BDMA_Channel2_IRQHandler + .thumb_set BDMA_Channel2_IRQHandler,Default_Handler + + .weak BDMA_Channel3_IRQHandler + .thumb_set BDMA_Channel3_IRQHandler,Default_Handler + + .weak BDMA_Channel4_IRQHandler + .thumb_set BDMA_Channel4_IRQHandler,Default_Handler + + .weak BDMA_Channel5_IRQHandler + .thumb_set BDMA_Channel5_IRQHandler,Default_Handler + + .weak BDMA_Channel6_IRQHandler + .thumb_set BDMA_Channel6_IRQHandler,Default_Handler + + .weak BDMA_Channel7_IRQHandler + .thumb_set BDMA_Channel7_IRQHandler,Default_Handler + + .weak COMP1_IRQHandler + .thumb_set COMP1_IRQHandler,Default_Handler + + .weak LPTIM2_IRQHandler + .thumb_set LPTIM2_IRQHandler,Default_Handler + + .weak LPTIM3_IRQHandler + .thumb_set LPTIM3_IRQHandler,Default_Handler + + .weak LPTIM4_IRQHandler + .thumb_set LPTIM4_IRQHandler,Default_Handler + + .weak LPTIM5_IRQHandler + .thumb_set LPTIM5_IRQHandler,Default_Handler + + .weak LPUART1_IRQHandler + .thumb_set LPUART1_IRQHandler,Default_Handler + + .weak CRS_IRQHandler + .thumb_set CRS_IRQHandler,Default_Handler + + .weak ECC_IRQHandler + .thumb_set ECC_IRQHandler,Default_Handler + + .weak SAI4_IRQHandler + .thumb_set SAI4_IRQHandler,Default_Handler + + .weak DTS_IRQHandler + .thumb_set DTS_IRQHandler,Default_Handler + + .weak WAKEUP_PIN_IRQHandler + .thumb_set WAKEUP_PIN_IRQHandler,Default_Handler + + .weak OCTOSPI2_IRQHandler + .thumb_set OCTOSPI2_IRQHandler,Default_Handler + + .weak FMAC_IRQHandler + .thumb_set FMAC_IRQHandler,Default_Handler + + .weak CORDIC_IRQHandler + .thumb_set CORDIC_IRQHandler,Default_Handler + + .weak UART9_IRQHandler + .thumb_set UART9_IRQHandler,Default_Handler + + .weak USART10_IRQHandler + .thumb_set USART10_IRQHandler,Default_Handler + + .weak I2C5_EV_IRQHandler + .thumb_set I2C5_EV_IRQHandler,Default_Handler + + .weak I2C5_ER_IRQHandler + .thumb_set I2C5_ER_IRQHandler,Default_Handler + + .weak FDCAN3_IT0_IRQHandler + .thumb_set FDCAN3_IT0_IRQHandler,Default_Handler + + .weak FDCAN3_IT1_IRQHandler + .thumb_set FDCAN3_IT1_IRQHandler,Default_Handler + + .weak TIM23_IRQHandler + .thumb_set TIM23_IRQHandler,Default_Handler + + .weak TIM24_IRQHandler + .thumb_set TIM24_IRQHandler,Default_Handler + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ + diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h725xx.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h725xx.s new file mode 100644 index 0000000..3958e7c --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h725xx.s @@ -0,0 +1,756 @@ +/** + ****************************************************************************** + * @file startup_stm32h725xx.s + * @author MCD Application Team + * @brief STM32H725xx Devices vector table for GCC based toolchain. + * This module performs: + * - Set the initial SP + * - Set the initial PC == Reset_Handler, + * - Set the vector table entries with the exceptions ISR address + * - Branches to main in the C library (which eventually + * calls main()). + * After Reset the Cortex-M processor is in Thread mode, + * priority is Privileged, and the Stack is set to Main. + ****************************************************************************** + * @attention + * + *

                  © Copyright (c) 2019 STMicroelectronics. + * All rights reserved.

                  + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + + .syntax unified + .cpu cortex-m7 + .fpu softvfp + .thumb + +.global g_pfnVectors +.global Default_Handler + +/* start address for the initialization values of the .data section. +defined in linker script */ +.word _sidata +/* start address for the .data section. defined in linker script */ +.word _sdata +/* end address for the .data section. defined in linker script */ +.word _edata +/* start address for the .bss section. defined in linker script */ +.word _sbss +/* end address for the .bss section. defined in linker script */ +.word _ebss +/* stack used for SystemInit_ExtMemCtl; always internal RAM used */ + +/** + * @brief This is the code that gets called when the processor first + * starts execution following a reset event. Only the absolutely + * necessary set is performed, after which the application + * supplied main() routine is called. + * @param None + * @retval : None +*/ + + .section .text.Reset_Handler + .weak Reset_Handler + .type Reset_Handler, %function +Reset_Handler: + ldr sp, =_estack /* set stack pointer */ + +/* Call the clock system intitialization function.*/ + bl SystemInit + +/* Copy the data segment initializers from flash to SRAM */ + movs r1, #0 + b LoopCopyDataInit + +CopyDataInit: + ldr r3, =_sidata + ldr r3, [r3, r1] + str r3, [r0, r1] + adds r1, r1, #4 + +LoopCopyDataInit: + ldr r0, =_sdata + ldr r3, =_edata + adds r2, r0, r1 + cmp r2, r3 + bcc CopyDataInit + ldr r2, =_sbss + b LoopFillZerobss +/* Zero fill the bss segment. */ +FillZerobss: + movs r3, #0 + str r3, [r2], #4 + +LoopFillZerobss: + ldr r3, = _ebss + cmp r2, r3 + bcc FillZerobss + +/* Call static constructors */ + bl __libc_init_array +/* Call the application's entry point.*/ + bl main + bx lr +.size Reset_Handler, .-Reset_Handler + +/** + * @brief This is the code that gets called when the processor receives an + * unexpected interrupt. This simply enters an infinite loop, preserving + * the system state for examination by a debugger. + * @param None + * @retval None +*/ + .section .text.Default_Handler,"ax",%progbits +Default_Handler: +Infinite_Loop: + b Infinite_Loop + .size Default_Handler, .-Default_Handler +/****************************************************************************** +* +* The minimal vector table for a Cortex M. Note that the proper constructs +* must be placed on this to ensure that it ends up at physical address +* 0x0000.0000. +* +*******************************************************************************/ + .section .isr_vector,"a",%progbits + .type g_pfnVectors, %object + .size g_pfnVectors, .-g_pfnVectors + + +g_pfnVectors: + .word _estack + .word Reset_Handler + + .word NMI_Handler + .word HardFault_Handler + .word MemManage_Handler + .word BusFault_Handler + .word UsageFault_Handler + .word 0 + .word 0 + .word 0 + .word 0 + .word SVC_Handler + .word DebugMon_Handler + .word 0 + .word PendSV_Handler + .word SysTick_Handler + + /* External Interrupts */ + .word WWDG_IRQHandler /* Window WatchDog */ + .word PVD_AVD_IRQHandler /* PVD/AVD through EXTI Line detection */ + .word TAMP_STAMP_IRQHandler /* Tamper and TimeStamps through the EXTI line */ + .word RTC_WKUP_IRQHandler /* RTC Wakeup through the EXTI line */ + .word FLASH_IRQHandler /* FLASH */ + .word RCC_IRQHandler /* RCC */ + .word EXTI0_IRQHandler /* EXTI Line0 */ + .word EXTI1_IRQHandler /* EXTI Line1 */ + .word EXTI2_IRQHandler /* EXTI Line2 */ + .word EXTI3_IRQHandler /* EXTI Line3 */ + .word EXTI4_IRQHandler /* EXTI Line4 */ + .word DMA1_Stream0_IRQHandler /* DMA1 Stream 0 */ + .word DMA1_Stream1_IRQHandler /* DMA1 Stream 1 */ + .word DMA1_Stream2_IRQHandler /* DMA1 Stream 2 */ + .word DMA1_Stream3_IRQHandler /* DMA1 Stream 3 */ + .word DMA1_Stream4_IRQHandler /* DMA1 Stream 4 */ + .word DMA1_Stream5_IRQHandler /* DMA1 Stream 5 */ + .word DMA1_Stream6_IRQHandler /* DMA1 Stream 6 */ + .word ADC_IRQHandler /* ADC1, ADC2 and ADC3s */ + .word FDCAN1_IT0_IRQHandler /* FDCAN1 interrupt line 0 */ + .word FDCAN2_IT0_IRQHandler /* FDCAN2 interrupt line 0 */ + .word FDCAN1_IT1_IRQHandler /* FDCAN1 interrupt line 1 */ + .word FDCAN2_IT1_IRQHandler /* FDCAN2 interrupt line 1 */ + .word EXTI9_5_IRQHandler /* External Line[9:5]s */ + .word TIM1_BRK_IRQHandler /* TIM1 Break interrupt */ + .word TIM1_UP_IRQHandler /* TIM1 Update interrupt */ + .word TIM1_TRG_COM_IRQHandler /* TIM1 Trigger and Commutation interrupt */ + .word TIM1_CC_IRQHandler /* TIM1 Capture Compare */ + .word TIM2_IRQHandler /* TIM2 */ + .word TIM3_IRQHandler /* TIM3 */ + .word TIM4_IRQHandler /* TIM4 */ + .word I2C1_EV_IRQHandler /* I2C1 Event */ + .word I2C1_ER_IRQHandler /* I2C1 Error */ + .word I2C2_EV_IRQHandler /* I2C2 Event */ + .word I2C2_ER_IRQHandler /* I2C2 Error */ + .word SPI1_IRQHandler /* SPI1 */ + .word SPI2_IRQHandler /* SPI2 */ + .word USART1_IRQHandler /* USART1 */ + .word USART2_IRQHandler /* USART2 */ + .word USART3_IRQHandler /* USART3 */ + .word EXTI15_10_IRQHandler /* External Line[15:10]s */ + .word RTC_Alarm_IRQHandler /* RTC Alarm (A and B) through EXTI Line */ + .word 0 /* Reserved */ + .word TIM8_BRK_TIM12_IRQHandler /* TIM8 Break and TIM12 */ + .word TIM8_UP_TIM13_IRQHandler /* TIM8 Update and TIM13 */ + .word TIM8_TRG_COM_TIM14_IRQHandler /* TIM8 Trigger and Commutation and TIM14 */ + .word TIM8_CC_IRQHandler /* TIM8 Capture Compare */ + .word DMA1_Stream7_IRQHandler /* DMA1 Stream7 */ + .word FMC_IRQHandler /* FMC */ + .word SDMMC1_IRQHandler /* SDMMC1 */ + .word TIM5_IRQHandler /* TIM5 */ + .word SPI3_IRQHandler /* SPI3 */ + .word UART4_IRQHandler /* UART4 */ + .word UART5_IRQHandler /* UART5 */ + .word TIM6_DAC_IRQHandler /* TIM6 and DAC1&2 underrun errors */ + .word TIM7_IRQHandler /* TIM7 */ + .word DMA2_Stream0_IRQHandler /* DMA2 Stream 0 */ + .word DMA2_Stream1_IRQHandler /* DMA2 Stream 1 */ + .word DMA2_Stream2_IRQHandler /* DMA2 Stream 2 */ + .word DMA2_Stream3_IRQHandler /* DMA2 Stream 3 */ + .word DMA2_Stream4_IRQHandler /* DMA2 Stream 4 */ + .word ETH_IRQHandler /* Ethernet */ + .word ETH_WKUP_IRQHandler /* Ethernet Wakeup through EXTI line */ + .word FDCAN_CAL_IRQHandler /* FDCAN calibration unit interrupt*/ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word DMA2_Stream5_IRQHandler /* DMA2 Stream 5 */ + .word DMA2_Stream6_IRQHandler /* DMA2 Stream 6 */ + .word DMA2_Stream7_IRQHandler /* DMA2 Stream 7 */ + .word USART6_IRQHandler /* USART6 */ + .word I2C3_EV_IRQHandler /* I2C3 event */ + .word I2C3_ER_IRQHandler /* I2C3 error */ + .word OTG_HS_EP1_OUT_IRQHandler /* USB OTG HS End Point 1 Out */ + .word OTG_HS_EP1_IN_IRQHandler /* USB OTG HS End Point 1 In */ + .word OTG_HS_WKUP_IRQHandler /* USB OTG HS Wakeup through EXTI */ + .word OTG_HS_IRQHandler /* USB OTG HS */ + .word DCMI_PSSI_IRQHandler /* DCMI, PSSI */ + .word 0 /* Reserved */ + .word RNG_IRQHandler /* Rng */ + .word FPU_IRQHandler /* FPU */ + .word UART7_IRQHandler /* UART7 */ + .word UART8_IRQHandler /* UART8 */ + .word SPI4_IRQHandler /* SPI4 */ + .word SPI5_IRQHandler /* SPI5 */ + .word SPI6_IRQHandler /* SPI6 */ + .word SAI1_IRQHandler /* SAI1 */ + .word LTDC_IRQHandler /* LTDC */ + .word LTDC_ER_IRQHandler /* LTDC error */ + .word DMA2D_IRQHandler /* DMA2D */ + .word 0 /* Reserved */ + .word OCTOSPI1_IRQHandler /* OCTOSPI1 */ + .word LPTIM1_IRQHandler /* LPTIM1 */ + .word CEC_IRQHandler /* HDMI_CEC */ + .word I2C4_EV_IRQHandler /* I2C4 Event */ + .word I2C4_ER_IRQHandler /* I2C4 Error */ + .word SPDIF_RX_IRQHandler /* SPDIF_RX */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word DMAMUX1_OVR_IRQHandler /* DMAMUX1 Overrun interrupt */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word DFSDM1_FLT0_IRQHandler /* DFSDM Filter0 Interrupt */ + .word DFSDM1_FLT1_IRQHandler /* DFSDM Filter1 Interrupt */ + .word DFSDM1_FLT2_IRQHandler /* DFSDM Filter2 Interrupt */ + .word DFSDM1_FLT3_IRQHandler /* DFSDM Filter3 Interrupt */ + .word 0 /* Reserved */ + .word SWPMI1_IRQHandler /* Serial Wire Interface 1 global interrupt */ + .word TIM15_IRQHandler /* TIM15 global Interrupt */ + .word TIM16_IRQHandler /* TIM16 global Interrupt */ + .word TIM17_IRQHandler /* TIM17 global Interrupt */ + .word MDIOS_WKUP_IRQHandler /* MDIOS Wakeup Interrupt */ + .word MDIOS_IRQHandler /* MDIOS global Interrupt */ + .word 0 /* Reserved */ + .word MDMA_IRQHandler /* MDMA global Interrupt */ + .word 0 /* Reserved */ + .word SDMMC2_IRQHandler /* SDMMC2 global Interrupt */ + .word HSEM1_IRQHandler /* HSEM1 global Interrupt */ + .word 0 /* Reserved */ + .word ADC3_IRQHandler /* ADC3 global Interrupt */ + .word DMAMUX2_OVR_IRQHandler /* DMAMUX Overrun interrupt */ + .word BDMA_Channel0_IRQHandler /* BDMA Channel 0 global Interrupt */ + .word BDMA_Channel1_IRQHandler /* BDMA Channel 1 global Interrupt */ + .word BDMA_Channel2_IRQHandler /* BDMA Channel 2 global Interrupt */ + .word BDMA_Channel3_IRQHandler /* BDMA Channel 3 global Interrupt */ + .word BDMA_Channel4_IRQHandler /* BDMA Channel 4 global Interrupt */ + .word BDMA_Channel5_IRQHandler /* BDMA Channel 5 global Interrupt */ + .word BDMA_Channel6_IRQHandler /* BDMA Channel 6 global Interrupt */ + .word BDMA_Channel7_IRQHandler /* BDMA Channel 7 global Interrupt */ + .word COMP1_IRQHandler /* COMP1 global Interrupt */ + .word LPTIM2_IRQHandler /* LP TIM2 global interrupt */ + .word LPTIM3_IRQHandler /* LP TIM3 global interrupt */ + .word LPTIM4_IRQHandler /* LP TIM4 global interrupt */ + .word LPTIM5_IRQHandler /* LP TIM5 global interrupt */ + .word LPUART1_IRQHandler /* LP UART1 interrupt */ + .word 0 /* Reserved */ + .word CRS_IRQHandler /* Clock Recovery Global Interrupt */ + .word ECC_IRQHandler /* ECC diagnostic Global Interrupt */ + .word SAI4_IRQHandler /* SAI4 global interrupt */ + .word DTS_IRQHandler /* Digital Temperature Sensor interrupt */ + .word 0 /* Reserved */ + .word WAKEUP_PIN_IRQHandler /* Interrupt for all 6 wake-up pins */ + .word OCTOSPI2_IRQHandler /* OCTOSPI2 Interrupt */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word FMAC_IRQHandler /* FMAC Interrupt */ + .word CORDIC_IRQHandler /* CORDIC Interrupt */ + .word UART9_IRQHandler /* UART9 Interrupt */ + .word USART10_IRQHandler /* UART10 Interrupt */ + .word I2C5_EV_IRQHandler /* I2C5 Event Interrupt */ + .word I2C5_ER_IRQHandler /* I2C5 Error Interrupt */ + .word FDCAN3_IT0_IRQHandler /* FDCAN3 interrupt line 0 */ + .word FDCAN3_IT1_IRQHandler /* FDCAN3 interrupt line 1 */ + .word TIM23_IRQHandler /* TIM23 global interrupt */ + .word TIM24_IRQHandler /* TIM24 global interrupt */ + +/******************************************************************************* +* +* Provide weak aliases for each Exception handler to the Default_Handler. +* As they are weak aliases, any function with the same name will override +* this definition. +* +*******************************************************************************/ + .weak NMI_Handler + .thumb_set NMI_Handler,Default_Handler + + .weak HardFault_Handler + .thumb_set HardFault_Handler,Default_Handler + + .weak MemManage_Handler + .thumb_set MemManage_Handler,Default_Handler + + .weak BusFault_Handler + .thumb_set BusFault_Handler,Default_Handler + + .weak UsageFault_Handler + .thumb_set UsageFault_Handler,Default_Handler + + .weak SVC_Handler + .thumb_set SVC_Handler,Default_Handler + + .weak DebugMon_Handler + .thumb_set DebugMon_Handler,Default_Handler + + .weak PendSV_Handler + .thumb_set PendSV_Handler,Default_Handler + + .weak SysTick_Handler + .thumb_set SysTick_Handler,Default_Handler + + .weak WWDG_IRQHandler + .thumb_set WWDG_IRQHandler,Default_Handler + + .weak PVD_AVD_IRQHandler + .thumb_set PVD_AVD_IRQHandler,Default_Handler + + .weak TAMP_STAMP_IRQHandler + .thumb_set TAMP_STAMP_IRQHandler,Default_Handler + + .weak RTC_WKUP_IRQHandler + .thumb_set RTC_WKUP_IRQHandler,Default_Handler + + .weak FLASH_IRQHandler + .thumb_set FLASH_IRQHandler,Default_Handler + + .weak RCC_IRQHandler + .thumb_set RCC_IRQHandler,Default_Handler + + .weak EXTI0_IRQHandler + .thumb_set EXTI0_IRQHandler,Default_Handler + + .weak EXTI1_IRQHandler + .thumb_set EXTI1_IRQHandler,Default_Handler + + .weak EXTI2_IRQHandler + .thumb_set EXTI2_IRQHandler,Default_Handler + + .weak EXTI3_IRQHandler + .thumb_set EXTI3_IRQHandler,Default_Handler + + .weak EXTI4_IRQHandler + .thumb_set EXTI4_IRQHandler,Default_Handler + + .weak DMA1_Stream0_IRQHandler + .thumb_set DMA1_Stream0_IRQHandler,Default_Handler + + .weak DMA1_Stream1_IRQHandler + .thumb_set DMA1_Stream1_IRQHandler,Default_Handler + + .weak DMA1_Stream2_IRQHandler + .thumb_set DMA1_Stream2_IRQHandler,Default_Handler + + .weak DMA1_Stream3_IRQHandler + .thumb_set DMA1_Stream3_IRQHandler,Default_Handler + + .weak DMA1_Stream4_IRQHandler + .thumb_set DMA1_Stream4_IRQHandler,Default_Handler + + .weak DMA1_Stream5_IRQHandler + .thumb_set DMA1_Stream5_IRQHandler,Default_Handler + + .weak DMA1_Stream6_IRQHandler + .thumb_set DMA1_Stream6_IRQHandler,Default_Handler + + .weak ADC_IRQHandler + .thumb_set ADC_IRQHandler,Default_Handler + + .weak FDCAN1_IT0_IRQHandler + .thumb_set FDCAN1_IT0_IRQHandler,Default_Handler + + .weak FDCAN2_IT0_IRQHandler + .thumb_set FDCAN2_IT0_IRQHandler,Default_Handler + + .weak FDCAN1_IT1_IRQHandler + .thumb_set FDCAN1_IT1_IRQHandler,Default_Handler + + .weak FDCAN2_IT1_IRQHandler + .thumb_set FDCAN2_IT1_IRQHandler,Default_Handler + + .weak EXTI9_5_IRQHandler + .thumb_set EXTI9_5_IRQHandler,Default_Handler + + .weak TIM1_BRK_IRQHandler + .thumb_set TIM1_BRK_IRQHandler,Default_Handler + + .weak TIM1_UP_IRQHandler + .thumb_set TIM1_UP_IRQHandler,Default_Handler + + .weak TIM1_TRG_COM_IRQHandler + .thumb_set TIM1_TRG_COM_IRQHandler,Default_Handler + + .weak TIM1_CC_IRQHandler + .thumb_set TIM1_CC_IRQHandler,Default_Handler + + .weak TIM2_IRQHandler + .thumb_set TIM2_IRQHandler,Default_Handler + + .weak TIM3_IRQHandler + .thumb_set TIM3_IRQHandler,Default_Handler + + .weak TIM4_IRQHandler + .thumb_set TIM4_IRQHandler,Default_Handler + + .weak I2C1_EV_IRQHandler + .thumb_set I2C1_EV_IRQHandler,Default_Handler + + .weak I2C1_ER_IRQHandler + .thumb_set I2C1_ER_IRQHandler,Default_Handler + + .weak I2C2_EV_IRQHandler + .thumb_set I2C2_EV_IRQHandler,Default_Handler + + .weak I2C2_ER_IRQHandler + .thumb_set I2C2_ER_IRQHandler,Default_Handler + + .weak SPI1_IRQHandler + .thumb_set SPI1_IRQHandler,Default_Handler + + .weak SPI2_IRQHandler + .thumb_set SPI2_IRQHandler,Default_Handler + + .weak USART1_IRQHandler + .thumb_set USART1_IRQHandler,Default_Handler + + .weak USART2_IRQHandler + .thumb_set USART2_IRQHandler,Default_Handler + + .weak USART3_IRQHandler + .thumb_set USART3_IRQHandler,Default_Handler + + .weak EXTI15_10_IRQHandler + .thumb_set EXTI15_10_IRQHandler,Default_Handler + + .weak RTC_Alarm_IRQHandler + .thumb_set RTC_Alarm_IRQHandler,Default_Handler + + .weak TIM8_BRK_TIM12_IRQHandler + .thumb_set TIM8_BRK_TIM12_IRQHandler,Default_Handler + + .weak TIM8_UP_TIM13_IRQHandler + .thumb_set TIM8_UP_TIM13_IRQHandler,Default_Handler + + .weak TIM8_TRG_COM_TIM14_IRQHandler + .thumb_set TIM8_TRG_COM_TIM14_IRQHandler,Default_Handler + + .weak TIM8_CC_IRQHandler + .thumb_set TIM8_CC_IRQHandler,Default_Handler + + .weak DMA1_Stream7_IRQHandler + .thumb_set DMA1_Stream7_IRQHandler,Default_Handler + + .weak FMC_IRQHandler + .thumb_set FMC_IRQHandler,Default_Handler + + .weak SDMMC1_IRQHandler + .thumb_set SDMMC1_IRQHandler,Default_Handler + + .weak TIM5_IRQHandler + .thumb_set TIM5_IRQHandler,Default_Handler + + .weak SPI3_IRQHandler + .thumb_set SPI3_IRQHandler,Default_Handler + + .weak UART4_IRQHandler + .thumb_set UART4_IRQHandler,Default_Handler + + .weak UART5_IRQHandler + .thumb_set UART5_IRQHandler,Default_Handler + + .weak TIM6_DAC_IRQHandler + .thumb_set TIM6_DAC_IRQHandler,Default_Handler + + .weak TIM7_IRQHandler + .thumb_set TIM7_IRQHandler,Default_Handler + + .weak DMA2_Stream0_IRQHandler + .thumb_set DMA2_Stream0_IRQHandler,Default_Handler + + .weak DMA2_Stream1_IRQHandler + .thumb_set DMA2_Stream1_IRQHandler,Default_Handler + + .weak DMA2_Stream2_IRQHandler + .thumb_set DMA2_Stream2_IRQHandler,Default_Handler + + .weak DMA2_Stream3_IRQHandler + .thumb_set DMA2_Stream3_IRQHandler,Default_Handler + + .weak DMA2_Stream4_IRQHandler + .thumb_set DMA2_Stream4_IRQHandler,Default_Handler + + .weak ETH_IRQHandler + .thumb_set ETH_IRQHandler,Default_Handler + + .weak ETH_WKUP_IRQHandler + .thumb_set ETH_WKUP_IRQHandler,Default_Handler + + .weak FDCAN_CAL_IRQHandler + .thumb_set FDCAN_CAL_IRQHandler,Default_Handler + + .weak DMA2_Stream5_IRQHandler + .thumb_set DMA2_Stream5_IRQHandler,Default_Handler + + .weak DMA2_Stream6_IRQHandler + .thumb_set DMA2_Stream6_IRQHandler,Default_Handler + + .weak DMA2_Stream7_IRQHandler + .thumb_set DMA2_Stream7_IRQHandler,Default_Handler + + .weak USART6_IRQHandler + .thumb_set USART6_IRQHandler,Default_Handler + + .weak I2C3_EV_IRQHandler + .thumb_set I2C3_EV_IRQHandler,Default_Handler + + .weak I2C3_ER_IRQHandler + .thumb_set I2C3_ER_IRQHandler,Default_Handler + + .weak OTG_HS_EP1_OUT_IRQHandler + .thumb_set OTG_HS_EP1_OUT_IRQHandler,Default_Handler + + .weak OTG_HS_EP1_IN_IRQHandler + .thumb_set OTG_HS_EP1_IN_IRQHandler,Default_Handler + + .weak OTG_HS_WKUP_IRQHandler + .thumb_set OTG_HS_WKUP_IRQHandler,Default_Handler + + .weak OTG_HS_IRQHandler + .thumb_set OTG_HS_IRQHandler,Default_Handler + + .weak DCMI_PSSI_IRQHandler + .thumb_set DCMI_PSSI_IRQHandler,Default_Handler + + .weak RNG_IRQHandler + .thumb_set RNG_IRQHandler,Default_Handler + + .weak FPU_IRQHandler + .thumb_set FPU_IRQHandler,Default_Handler + + .weak UART7_IRQHandler + .thumb_set UART7_IRQHandler,Default_Handler + + .weak UART8_IRQHandler + .thumb_set UART8_IRQHandler,Default_Handler + + .weak SPI4_IRQHandler + .thumb_set SPI4_IRQHandler,Default_Handler + + .weak SPI5_IRQHandler + .thumb_set SPI5_IRQHandler,Default_Handler + + .weak SPI6_IRQHandler + .thumb_set SPI6_IRQHandler,Default_Handler + + .weak SAI1_IRQHandler + .thumb_set SAI1_IRQHandler,Default_Handler + + .weak LTDC_IRQHandler + .thumb_set LTDC_IRQHandler,Default_Handler + + .weak LTDC_ER_IRQHandler + .thumb_set LTDC_ER_IRQHandler,Default_Handler + + .weak DMA2D_IRQHandler + .thumb_set DMA2D_IRQHandler,Default_Handler + + .weak OCTOSPI1_IRQHandler + .thumb_set OCTOSPI1_IRQHandler,Default_Handler + + .weak LPTIM1_IRQHandler + .thumb_set LPTIM1_IRQHandler,Default_Handler + + .weak CEC_IRQHandler + .thumb_set CEC_IRQHandler,Default_Handler + + .weak I2C4_EV_IRQHandler + .thumb_set I2C4_EV_IRQHandler,Default_Handler + + .weak I2C4_ER_IRQHandler + .thumb_set I2C4_ER_IRQHandler,Default_Handler + + .weak SPDIF_RX_IRQHandler + .thumb_set SPDIF_RX_IRQHandler,Default_Handler + + .weak DMAMUX1_OVR_IRQHandler + .thumb_set DMAMUX1_OVR_IRQHandler,Default_Handler + + .weak DFSDM1_FLT0_IRQHandler + .thumb_set DFSDM1_FLT0_IRQHandler,Default_Handler + + .weak DFSDM1_FLT1_IRQHandler + .thumb_set DFSDM1_FLT1_IRQHandler,Default_Handler + + .weak DFSDM1_FLT2_IRQHandler + .thumb_set DFSDM1_FLT2_IRQHandler,Default_Handler + + .weak DFSDM1_FLT3_IRQHandler + .thumb_set DFSDM1_FLT3_IRQHandler,Default_Handler + + .weak SWPMI1_IRQHandler + .thumb_set SWPMI1_IRQHandler,Default_Handler + + .weak TIM15_IRQHandler + .thumb_set TIM15_IRQHandler,Default_Handler + + .weak TIM16_IRQHandler + .thumb_set TIM16_IRQHandler,Default_Handler + + .weak TIM17_IRQHandler + .thumb_set TIM17_IRQHandler,Default_Handler + + .weak MDIOS_WKUP_IRQHandler + .thumb_set MDIOS_WKUP_IRQHandler,Default_Handler + + .weak MDIOS_IRQHandler + .thumb_set MDIOS_IRQHandler,Default_Handler + + .weak MDMA_IRQHandler + .thumb_set MDMA_IRQHandler,Default_Handler + + .weak SDMMC2_IRQHandler + .thumb_set SDMMC2_IRQHandler,Default_Handler + + .weak HSEM1_IRQHandler + .thumb_set HSEM1_IRQHandler,Default_Handler + + .weak ADC3_IRQHandler + .thumb_set ADC3_IRQHandler,Default_Handler + + .weak DMAMUX2_OVR_IRQHandler + .thumb_set DMAMUX2_OVR_IRQHandler,Default_Handler + + .weak BDMA_Channel0_IRQHandler + .thumb_set BDMA_Channel0_IRQHandler,Default_Handler + + .weak BDMA_Channel1_IRQHandler + .thumb_set BDMA_Channel1_IRQHandler,Default_Handler + + .weak BDMA_Channel2_IRQHandler + .thumb_set BDMA_Channel2_IRQHandler,Default_Handler + + .weak BDMA_Channel3_IRQHandler + .thumb_set BDMA_Channel3_IRQHandler,Default_Handler + + .weak BDMA_Channel4_IRQHandler + .thumb_set BDMA_Channel4_IRQHandler,Default_Handler + + .weak BDMA_Channel5_IRQHandler + .thumb_set BDMA_Channel5_IRQHandler,Default_Handler + + .weak BDMA_Channel6_IRQHandler + .thumb_set BDMA_Channel6_IRQHandler,Default_Handler + + .weak BDMA_Channel7_IRQHandler + .thumb_set BDMA_Channel7_IRQHandler,Default_Handler + + .weak COMP1_IRQHandler + .thumb_set COMP1_IRQHandler,Default_Handler + + .weak LPTIM2_IRQHandler + .thumb_set LPTIM2_IRQHandler,Default_Handler + + .weak LPTIM3_IRQHandler + .thumb_set LPTIM3_IRQHandler,Default_Handler + + .weak LPTIM4_IRQHandler + .thumb_set LPTIM4_IRQHandler,Default_Handler + + .weak LPTIM5_IRQHandler + .thumb_set LPTIM5_IRQHandler,Default_Handler + + .weak LPUART1_IRQHandler + .thumb_set LPUART1_IRQHandler,Default_Handler + + .weak CRS_IRQHandler + .thumb_set CRS_IRQHandler,Default_Handler + + .weak ECC_IRQHandler + .thumb_set ECC_IRQHandler,Default_Handler + + .weak SAI4_IRQHandler + .thumb_set SAI4_IRQHandler,Default_Handler + + .weak DTS_IRQHandler + .thumb_set DTS_IRQHandler,Default_Handler + + .weak WAKEUP_PIN_IRQHandler + .thumb_set WAKEUP_PIN_IRQHandler,Default_Handler + + .weak OCTOSPI2_IRQHandler + .thumb_set OCTOSPI2_IRQHandler,Default_Handler + + .weak FMAC_IRQHandler + .thumb_set FMAC_IRQHandler,Default_Handler + + .weak CORDIC_IRQHandler + .thumb_set CORDIC_IRQHandler,Default_Handler + + .weak UART9_IRQHandler + .thumb_set UART9_IRQHandler,Default_Handler + + .weak USART10_IRQHandler + .thumb_set USART10_IRQHandler,Default_Handler + + .weak I2C5_EV_IRQHandler + .thumb_set I2C5_EV_IRQHandler,Default_Handler + + .weak I2C5_ER_IRQHandler + .thumb_set I2C5_ER_IRQHandler,Default_Handler + + .weak FDCAN3_IT0_IRQHandler + .thumb_set FDCAN3_IT0_IRQHandler,Default_Handler + + .weak FDCAN3_IT1_IRQHandler + .thumb_set FDCAN3_IT1_IRQHandler,Default_Handler + + .weak TIM23_IRQHandler + .thumb_set TIM23_IRQHandler,Default_Handler + + .weak TIM24_IRQHandler + .thumb_set TIM24_IRQHandler,Default_Handler + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ + diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h730xx.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h730xx.s new file mode 100644 index 0000000..b252312 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h730xx.s @@ -0,0 +1,765 @@ +/** + ****************************************************************************** + * @file startup_stm32h730xx.s + * @author MCD Application Team + * @brief STM32H730xx Devices vector table for GCC based toolchain. + * This module performs: + * - Set the initial SP + * - Set the initial PC == Reset_Handler, + * - Set the vector table entries with the exceptions ISR address + * - Branches to main in the C library (which eventually + * calls main()). + * After Reset the Cortex-M processor is in Thread mode, + * priority is Privileged, and the Stack is set to Main. + ****************************************************************************** + * @attention + * + *

                  © Copyright (c) 2019 STMicroelectronics. + * All rights reserved.

                  + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + + .syntax unified + .cpu cortex-m7 + .fpu softvfp + .thumb + +.global g_pfnVectors +.global Default_Handler + +/* start address for the initialization values of the .data section. +defined in linker script */ +.word _sidata +/* start address for the .data section. defined in linker script */ +.word _sdata +/* end address for the .data section. defined in linker script */ +.word _edata +/* start address for the .bss section. defined in linker script */ +.word _sbss +/* end address for the .bss section. defined in linker script */ +.word _ebss +/* stack used for SystemInit_ExtMemCtl; always internal RAM used */ + +/** + * @brief This is the code that gets called when the processor first + * starts execution following a reset event. Only the absolutely + * necessary set is performed, after which the application + * supplied main() routine is called. + * @param None + * @retval : None +*/ + + .section .text.Reset_Handler + .weak Reset_Handler + .type Reset_Handler, %function +Reset_Handler: + ldr sp, =_estack /* set stack pointer */ + +/* Call the clock system intitialization function.*/ + bl SystemInit + +/* Copy the data segment initializers from flash to SRAM */ + movs r1, #0 + b LoopCopyDataInit + +CopyDataInit: + ldr r3, =_sidata + ldr r3, [r3, r1] + str r3, [r0, r1] + adds r1, r1, #4 + +LoopCopyDataInit: + ldr r0, =_sdata + ldr r3, =_edata + adds r2, r0, r1 + cmp r2, r3 + bcc CopyDataInit + ldr r2, =_sbss + b LoopFillZerobss +/* Zero fill the bss segment. */ +FillZerobss: + movs r3, #0 + str r3, [r2], #4 + +LoopFillZerobss: + ldr r3, = _ebss + cmp r2, r3 + bcc FillZerobss + +/* Call static constructors */ + bl __libc_init_array +/* Call the application's entry point.*/ + bl main + bx lr +.size Reset_Handler, .-Reset_Handler + +/** + * @brief This is the code that gets called when the processor receives an + * unexpected interrupt. This simply enters an infinite loop, preserving + * the system state for examination by a debugger. + * @param None + * @retval None +*/ + .section .text.Default_Handler,"ax",%progbits +Default_Handler: +Infinite_Loop: + b Infinite_Loop + .size Default_Handler, .-Default_Handler +/****************************************************************************** +* +* The minimal vector table for a Cortex M. Note that the proper constructs +* must be placed on this to ensure that it ends up at physical address +* 0x0000.0000. +* +*******************************************************************************/ + .section .isr_vector,"a",%progbits + .type g_pfnVectors, %object + .size g_pfnVectors, .-g_pfnVectors + + +g_pfnVectors: + .word _estack + .word Reset_Handler + + .word NMI_Handler + .word HardFault_Handler + .word MemManage_Handler + .word BusFault_Handler + .word UsageFault_Handler + .word 0 + .word 0 + .word 0 + .word 0 + .word SVC_Handler + .word DebugMon_Handler + .word 0 + .word PendSV_Handler + .word SysTick_Handler + + /* External Interrupts */ + .word WWDG_IRQHandler /* Window WatchDog */ + .word PVD_AVD_IRQHandler /* PVD/AVD through EXTI Line detection */ + .word TAMP_STAMP_IRQHandler /* Tamper and TimeStamps through the EXTI line */ + .word RTC_WKUP_IRQHandler /* RTC Wakeup through the EXTI line */ + .word FLASH_IRQHandler /* FLASH */ + .word RCC_IRQHandler /* RCC */ + .word EXTI0_IRQHandler /* EXTI Line0 */ + .word EXTI1_IRQHandler /* EXTI Line1 */ + .word EXTI2_IRQHandler /* EXTI Line2 */ + .word EXTI3_IRQHandler /* EXTI Line3 */ + .word EXTI4_IRQHandler /* EXTI Line4 */ + .word DMA1_Stream0_IRQHandler /* DMA1 Stream 0 */ + .word DMA1_Stream1_IRQHandler /* DMA1 Stream 1 */ + .word DMA1_Stream2_IRQHandler /* DMA1 Stream 2 */ + .word DMA1_Stream3_IRQHandler /* DMA1 Stream 3 */ + .word DMA1_Stream4_IRQHandler /* DMA1 Stream 4 */ + .word DMA1_Stream5_IRQHandler /* DMA1 Stream 5 */ + .word DMA1_Stream6_IRQHandler /* DMA1 Stream 6 */ + .word ADC_IRQHandler /* ADC1, ADC2 and ADC3s */ + .word FDCAN1_IT0_IRQHandler /* FDCAN1 interrupt line 0 */ + .word FDCAN2_IT0_IRQHandler /* FDCAN2 interrupt line 0 */ + .word FDCAN1_IT1_IRQHandler /* FDCAN1 interrupt line 1 */ + .word FDCAN2_IT1_IRQHandler /* FDCAN2 interrupt line 1 */ + .word EXTI9_5_IRQHandler /* External Line[9:5]s */ + .word TIM1_BRK_IRQHandler /* TIM1 Break interrupt */ + .word TIM1_UP_IRQHandler /* TIM1 Update interrupt */ + .word TIM1_TRG_COM_IRQHandler /* TIM1 Trigger and Commutation interrupt */ + .word TIM1_CC_IRQHandler /* TIM1 Capture Compare */ + .word TIM2_IRQHandler /* TIM2 */ + .word TIM3_IRQHandler /* TIM3 */ + .word TIM4_IRQHandler /* TIM4 */ + .word I2C1_EV_IRQHandler /* I2C1 Event */ + .word I2C1_ER_IRQHandler /* I2C1 Error */ + .word I2C2_EV_IRQHandler /* I2C2 Event */ + .word I2C2_ER_IRQHandler /* I2C2 Error */ + .word SPI1_IRQHandler /* SPI1 */ + .word SPI2_IRQHandler /* SPI2 */ + .word USART1_IRQHandler /* USART1 */ + .word USART2_IRQHandler /* USART2 */ + .word USART3_IRQHandler /* USART3 */ + .word EXTI15_10_IRQHandler /* External Line[15:10]s */ + .word RTC_Alarm_IRQHandler /* RTC Alarm (A and B) through EXTI Line */ + .word 0 /* Reserved */ + .word TIM8_BRK_TIM12_IRQHandler /* TIM8 Break and TIM12 */ + .word TIM8_UP_TIM13_IRQHandler /* TIM8 Update and TIM13 */ + .word TIM8_TRG_COM_TIM14_IRQHandler /* TIM8 Trigger and Commutation and TIM14 */ + .word TIM8_CC_IRQHandler /* TIM8 Capture Compare */ + .word DMA1_Stream7_IRQHandler /* DMA1 Stream7 */ + .word FMC_IRQHandler /* FMC */ + .word SDMMC1_IRQHandler /* SDMMC1 */ + .word TIM5_IRQHandler /* TIM5 */ + .word SPI3_IRQHandler /* SPI3 */ + .word UART4_IRQHandler /* UART4 */ + .word UART5_IRQHandler /* UART5 */ + .word TIM6_DAC_IRQHandler /* TIM6 and DAC1&2 underrun errors */ + .word TIM7_IRQHandler /* TIM7 */ + .word DMA2_Stream0_IRQHandler /* DMA2 Stream 0 */ + .word DMA2_Stream1_IRQHandler /* DMA2 Stream 1 */ + .word DMA2_Stream2_IRQHandler /* DMA2 Stream 2 */ + .word DMA2_Stream3_IRQHandler /* DMA2 Stream 3 */ + .word DMA2_Stream4_IRQHandler /* DMA2 Stream 4 */ + .word ETH_IRQHandler /* Ethernet */ + .word ETH_WKUP_IRQHandler /* Ethernet Wakeup through EXTI line */ + .word FDCAN_CAL_IRQHandler /* FDCAN calibration unit interrupt*/ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word DMA2_Stream5_IRQHandler /* DMA2 Stream 5 */ + .word DMA2_Stream6_IRQHandler /* DMA2 Stream 6 */ + .word DMA2_Stream7_IRQHandler /* DMA2 Stream 7 */ + .word USART6_IRQHandler /* USART6 */ + .word I2C3_EV_IRQHandler /* I2C3 event */ + .word I2C3_ER_IRQHandler /* I2C3 error */ + .word OTG_HS_EP1_OUT_IRQHandler /* USB OTG HS End Point 1 Out */ + .word OTG_HS_EP1_IN_IRQHandler /* USB OTG HS End Point 1 In */ + .word OTG_HS_WKUP_IRQHandler /* USB OTG HS Wakeup through EXTI */ + .word OTG_HS_IRQHandler /* USB OTG HS */ + .word DCMI_PSSI_IRQHandler /* DCMI, PSSI */ + .word CRYP_IRQHandler /* CRYP */ + .word HASH_RNG_IRQHandler /* Hash and Rng */ + .word FPU_IRQHandler /* FPU */ + .word UART7_IRQHandler /* UART7 */ + .word UART8_IRQHandler /* UART8 */ + .word SPI4_IRQHandler /* SPI4 */ + .word SPI5_IRQHandler /* SPI5 */ + .word SPI6_IRQHandler /* SPI6 */ + .word SAI1_IRQHandler /* SAI1 */ + .word LTDC_IRQHandler /* LTDC */ + .word LTDC_ER_IRQHandler /* LTDC error */ + .word DMA2D_IRQHandler /* DMA2D */ + .word 0 /* Reserved */ + .word OCTOSPI1_IRQHandler /* OCTOSPI1 */ + .word LPTIM1_IRQHandler /* LPTIM1 */ + .word CEC_IRQHandler /* HDMI_CEC */ + .word I2C4_EV_IRQHandler /* I2C4 Event */ + .word I2C4_ER_IRQHandler /* I2C4 Error */ + .word SPDIF_RX_IRQHandler /* SPDIF_RX */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word DMAMUX1_OVR_IRQHandler /* DMAMUX1 Overrun interrupt */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word DFSDM1_FLT0_IRQHandler /* DFSDM Filter0 Interrupt */ + .word DFSDM1_FLT1_IRQHandler /* DFSDM Filter1 Interrupt */ + .word DFSDM1_FLT2_IRQHandler /* DFSDM Filter2 Interrupt */ + .word DFSDM1_FLT3_IRQHandler /* DFSDM Filter3 Interrupt */ + .word 0 /* Reserved */ + .word SWPMI1_IRQHandler /* Serial Wire Interface 1 global interrupt */ + .word TIM15_IRQHandler /* TIM15 global Interrupt */ + .word TIM16_IRQHandler /* TIM16 global Interrupt */ + .word TIM17_IRQHandler /* TIM17 global Interrupt */ + .word MDIOS_WKUP_IRQHandler /* MDIOS Wakeup Interrupt */ + .word MDIOS_IRQHandler /* MDIOS global Interrupt */ + .word 0 /* Reserved */ + .word MDMA_IRQHandler /* MDMA global Interrupt */ + .word 0 /* Reserved */ + .word SDMMC2_IRQHandler /* SDMMC2 global Interrupt */ + .word HSEM1_IRQHandler /* HSEM1 global Interrupt */ + .word 0 /* Reserved */ + .word ADC3_IRQHandler /* ADC3 global Interrupt */ + .word DMAMUX2_OVR_IRQHandler /* DMAMUX Overrun interrupt */ + .word BDMA_Channel0_IRQHandler /* BDMA Channel 0 global Interrupt */ + .word BDMA_Channel1_IRQHandler /* BDMA Channel 1 global Interrupt */ + .word BDMA_Channel2_IRQHandler /* BDMA Channel 2 global Interrupt */ + .word BDMA_Channel3_IRQHandler /* BDMA Channel 3 global Interrupt */ + .word BDMA_Channel4_IRQHandler /* BDMA Channel 4 global Interrupt */ + .word BDMA_Channel5_IRQHandler /* BDMA Channel 5 global Interrupt */ + .word BDMA_Channel6_IRQHandler /* BDMA Channel 6 global Interrupt */ + .word BDMA_Channel7_IRQHandler /* BDMA Channel 7 global Interrupt */ + .word COMP1_IRQHandler /* COMP1 global Interrupt */ + .word LPTIM2_IRQHandler /* LP TIM2 global interrupt */ + .word LPTIM3_IRQHandler /* LP TIM3 global interrupt */ + .word LPTIM4_IRQHandler /* LP TIM4 global interrupt */ + .word LPTIM5_IRQHandler /* LP TIM5 global interrupt */ + .word LPUART1_IRQHandler /* LP UART1 interrupt */ + .word 0 /* Reserved */ + .word CRS_IRQHandler /* Clock Recovery Global Interrupt */ + .word ECC_IRQHandler /* ECC diagnostic Global Interrupt */ + .word SAI4_IRQHandler /* SAI4 global interrupt */ + .word DTS_IRQHandler /* Digital Temperature Sensor interrupt */ + .word 0 /* Reserved */ + .word WAKEUP_PIN_IRQHandler /* Interrupt for all 6 wake-up pins */ + .word OCTOSPI2_IRQHandler /* OCTOSPI2 Interrupt */ + .word OTFDEC1_IRQHandler /* OTFDEC1 Interrupt */ + .word OTFDEC2_IRQHandler /* OTFDEC2 Interrupt */ + .word FMAC_IRQHandler /* FMAC Interrupt */ + .word CORDIC_IRQHandler /* CORDIC Interrupt */ + .word UART9_IRQHandler /* UART9 Interrupt */ + .word USART10_IRQHandler /* UART10 Interrupt */ + .word I2C5_EV_IRQHandler /* I2C5 Event Interrupt */ + .word I2C5_ER_IRQHandler /* I2C5 Error Interrupt */ + .word FDCAN3_IT0_IRQHandler /* FDCAN3 interrupt line 0 */ + .word FDCAN3_IT1_IRQHandler /* FDCAN3 interrupt line 1 */ + .word TIM23_IRQHandler /* TIM23 global interrupt */ + .word TIM24_IRQHandler /* TIM24 global interrupt */ + +/******************************************************************************* +* +* Provide weak aliases for each Exception handler to the Default_Handler. +* As they are weak aliases, any function with the same name will override +* this definition. +* +*******************************************************************************/ + .weak NMI_Handler + .thumb_set NMI_Handler,Default_Handler + + .weak HardFault_Handler + .thumb_set HardFault_Handler,Default_Handler + + .weak MemManage_Handler + .thumb_set MemManage_Handler,Default_Handler + + .weak BusFault_Handler + .thumb_set BusFault_Handler,Default_Handler + + .weak UsageFault_Handler + .thumb_set UsageFault_Handler,Default_Handler + + .weak SVC_Handler + .thumb_set SVC_Handler,Default_Handler + + .weak DebugMon_Handler + .thumb_set DebugMon_Handler,Default_Handler + + .weak PendSV_Handler + .thumb_set PendSV_Handler,Default_Handler + + .weak SysTick_Handler + .thumb_set SysTick_Handler,Default_Handler + + .weak WWDG_IRQHandler + .thumb_set WWDG_IRQHandler,Default_Handler + + .weak PVD_AVD_IRQHandler + .thumb_set PVD_AVD_IRQHandler,Default_Handler + + .weak TAMP_STAMP_IRQHandler + .thumb_set TAMP_STAMP_IRQHandler,Default_Handler + + .weak RTC_WKUP_IRQHandler + .thumb_set RTC_WKUP_IRQHandler,Default_Handler + + .weak FLASH_IRQHandler + .thumb_set FLASH_IRQHandler,Default_Handler + + .weak RCC_IRQHandler + .thumb_set RCC_IRQHandler,Default_Handler + + .weak EXTI0_IRQHandler + .thumb_set EXTI0_IRQHandler,Default_Handler + + .weak EXTI1_IRQHandler + .thumb_set EXTI1_IRQHandler,Default_Handler + + .weak EXTI2_IRQHandler + .thumb_set EXTI2_IRQHandler,Default_Handler + + .weak EXTI3_IRQHandler + .thumb_set EXTI3_IRQHandler,Default_Handler + + .weak EXTI4_IRQHandler + .thumb_set EXTI4_IRQHandler,Default_Handler + + .weak DMA1_Stream0_IRQHandler + .thumb_set DMA1_Stream0_IRQHandler,Default_Handler + + .weak DMA1_Stream1_IRQHandler + .thumb_set DMA1_Stream1_IRQHandler,Default_Handler + + .weak DMA1_Stream2_IRQHandler + .thumb_set DMA1_Stream2_IRQHandler,Default_Handler + + .weak DMA1_Stream3_IRQHandler + .thumb_set DMA1_Stream3_IRQHandler,Default_Handler + + .weak DMA1_Stream4_IRQHandler + .thumb_set DMA1_Stream4_IRQHandler,Default_Handler + + .weak DMA1_Stream5_IRQHandler + .thumb_set DMA1_Stream5_IRQHandler,Default_Handler + + .weak DMA1_Stream6_IRQHandler + .thumb_set DMA1_Stream6_IRQHandler,Default_Handler + + .weak ADC_IRQHandler + .thumb_set ADC_IRQHandler,Default_Handler + + .weak FDCAN1_IT0_IRQHandler + .thumb_set FDCAN1_IT0_IRQHandler,Default_Handler + + .weak FDCAN2_IT0_IRQHandler + .thumb_set FDCAN2_IT0_IRQHandler,Default_Handler + + .weak FDCAN1_IT1_IRQHandler + .thumb_set FDCAN1_IT1_IRQHandler,Default_Handler + + .weak FDCAN2_IT1_IRQHandler + .thumb_set FDCAN2_IT1_IRQHandler,Default_Handler + + .weak EXTI9_5_IRQHandler + .thumb_set EXTI9_5_IRQHandler,Default_Handler + + .weak TIM1_BRK_IRQHandler + .thumb_set TIM1_BRK_IRQHandler,Default_Handler + + .weak TIM1_UP_IRQHandler + .thumb_set TIM1_UP_IRQHandler,Default_Handler + + .weak TIM1_TRG_COM_IRQHandler + .thumb_set TIM1_TRG_COM_IRQHandler,Default_Handler + + .weak TIM1_CC_IRQHandler + .thumb_set TIM1_CC_IRQHandler,Default_Handler + + .weak TIM2_IRQHandler + .thumb_set TIM2_IRQHandler,Default_Handler + + .weak TIM3_IRQHandler + .thumb_set TIM3_IRQHandler,Default_Handler + + .weak TIM4_IRQHandler + .thumb_set TIM4_IRQHandler,Default_Handler + + .weak I2C1_EV_IRQHandler + .thumb_set I2C1_EV_IRQHandler,Default_Handler + + .weak I2C1_ER_IRQHandler + .thumb_set I2C1_ER_IRQHandler,Default_Handler + + .weak I2C2_EV_IRQHandler + .thumb_set I2C2_EV_IRQHandler,Default_Handler + + .weak I2C2_ER_IRQHandler + .thumb_set I2C2_ER_IRQHandler,Default_Handler + + .weak SPI1_IRQHandler + .thumb_set SPI1_IRQHandler,Default_Handler + + .weak SPI2_IRQHandler + .thumb_set SPI2_IRQHandler,Default_Handler + + .weak USART1_IRQHandler + .thumb_set USART1_IRQHandler,Default_Handler + + .weak USART2_IRQHandler + .thumb_set USART2_IRQHandler,Default_Handler + + .weak USART3_IRQHandler + .thumb_set USART3_IRQHandler,Default_Handler + + .weak EXTI15_10_IRQHandler + .thumb_set EXTI15_10_IRQHandler,Default_Handler + + .weak RTC_Alarm_IRQHandler + .thumb_set RTC_Alarm_IRQHandler,Default_Handler + + .weak TIM8_BRK_TIM12_IRQHandler + .thumb_set TIM8_BRK_TIM12_IRQHandler,Default_Handler + + .weak TIM8_UP_TIM13_IRQHandler + .thumb_set TIM8_UP_TIM13_IRQHandler,Default_Handler + + .weak TIM8_TRG_COM_TIM14_IRQHandler + .thumb_set TIM8_TRG_COM_TIM14_IRQHandler,Default_Handler + + .weak TIM8_CC_IRQHandler + .thumb_set TIM8_CC_IRQHandler,Default_Handler + + .weak DMA1_Stream7_IRQHandler + .thumb_set DMA1_Stream7_IRQHandler,Default_Handler + + .weak FMC_IRQHandler + .thumb_set FMC_IRQHandler,Default_Handler + + .weak SDMMC1_IRQHandler + .thumb_set SDMMC1_IRQHandler,Default_Handler + + .weak TIM5_IRQHandler + .thumb_set TIM5_IRQHandler,Default_Handler + + .weak SPI3_IRQHandler + .thumb_set SPI3_IRQHandler,Default_Handler + + .weak UART4_IRQHandler + .thumb_set UART4_IRQHandler,Default_Handler + + .weak UART5_IRQHandler + .thumb_set UART5_IRQHandler,Default_Handler + + .weak TIM6_DAC_IRQHandler + .thumb_set TIM6_DAC_IRQHandler,Default_Handler + + .weak TIM7_IRQHandler + .thumb_set TIM7_IRQHandler,Default_Handler + + .weak DMA2_Stream0_IRQHandler + .thumb_set DMA2_Stream0_IRQHandler,Default_Handler + + .weak DMA2_Stream1_IRQHandler + .thumb_set DMA2_Stream1_IRQHandler,Default_Handler + + .weak DMA2_Stream2_IRQHandler + .thumb_set DMA2_Stream2_IRQHandler,Default_Handler + + .weak DMA2_Stream3_IRQHandler + .thumb_set DMA2_Stream3_IRQHandler,Default_Handler + + .weak DMA2_Stream4_IRQHandler + .thumb_set DMA2_Stream4_IRQHandler,Default_Handler + + .weak ETH_IRQHandler + .thumb_set ETH_IRQHandler,Default_Handler + + .weak ETH_WKUP_IRQHandler + .thumb_set ETH_WKUP_IRQHandler,Default_Handler + + .weak FDCAN_CAL_IRQHandler + .thumb_set FDCAN_CAL_IRQHandler,Default_Handler + + .weak DMA2_Stream5_IRQHandler + .thumb_set DMA2_Stream5_IRQHandler,Default_Handler + + .weak DMA2_Stream6_IRQHandler + .thumb_set DMA2_Stream6_IRQHandler,Default_Handler + + .weak DMA2_Stream7_IRQHandler + .thumb_set DMA2_Stream7_IRQHandler,Default_Handler + + .weak USART6_IRQHandler + .thumb_set USART6_IRQHandler,Default_Handler + + .weak I2C3_EV_IRQHandler + .thumb_set I2C3_EV_IRQHandler,Default_Handler + + .weak I2C3_ER_IRQHandler + .thumb_set I2C3_ER_IRQHandler,Default_Handler + + .weak OTG_HS_EP1_OUT_IRQHandler + .thumb_set OTG_HS_EP1_OUT_IRQHandler,Default_Handler + + .weak OTG_HS_EP1_IN_IRQHandler + .thumb_set OTG_HS_EP1_IN_IRQHandler,Default_Handler + + .weak OTG_HS_WKUP_IRQHandler + .thumb_set OTG_HS_WKUP_IRQHandler,Default_Handler + + .weak OTG_HS_IRQHandler + .thumb_set OTG_HS_IRQHandler,Default_Handler + + .weak DCMI_PSSI_IRQHandler + .thumb_set DCMI_PSSI_IRQHandler,Default_Handler + + .weak CRYP_IRQHandler + .thumb_set CRYP_IRQHandler,Default_Handler + + .weak HASH_RNG_IRQHandler + .thumb_set HASH_RNG_IRQHandler,Default_Handler + + .weak FPU_IRQHandler + .thumb_set FPU_IRQHandler,Default_Handler + + .weak UART7_IRQHandler + .thumb_set UART7_IRQHandler,Default_Handler + + .weak UART8_IRQHandler + .thumb_set UART8_IRQHandler,Default_Handler + + .weak SPI4_IRQHandler + .thumb_set SPI4_IRQHandler,Default_Handler + + .weak SPI5_IRQHandler + .thumb_set SPI5_IRQHandler,Default_Handler + + .weak SPI6_IRQHandler + .thumb_set SPI6_IRQHandler,Default_Handler + + .weak SAI1_IRQHandler + .thumb_set SAI1_IRQHandler,Default_Handler + + .weak LTDC_IRQHandler + .thumb_set LTDC_IRQHandler,Default_Handler + + .weak LTDC_ER_IRQHandler + .thumb_set LTDC_ER_IRQHandler,Default_Handler + + .weak DMA2D_IRQHandler + .thumb_set DMA2D_IRQHandler,Default_Handler + + .weak OCTOSPI1_IRQHandler + .thumb_set OCTOSPI1_IRQHandler,Default_Handler + + .weak LPTIM1_IRQHandler + .thumb_set LPTIM1_IRQHandler,Default_Handler + + .weak CEC_IRQHandler + .thumb_set CEC_IRQHandler,Default_Handler + + .weak I2C4_EV_IRQHandler + .thumb_set I2C4_EV_IRQHandler,Default_Handler + + .weak I2C4_ER_IRQHandler + .thumb_set I2C4_ER_IRQHandler,Default_Handler + + .weak SPDIF_RX_IRQHandler + .thumb_set SPDIF_RX_IRQHandler,Default_Handler + + .weak DMAMUX1_OVR_IRQHandler + .thumb_set DMAMUX1_OVR_IRQHandler,Default_Handler + + .weak DFSDM1_FLT0_IRQHandler + .thumb_set DFSDM1_FLT0_IRQHandler,Default_Handler + + .weak DFSDM1_FLT1_IRQHandler + .thumb_set DFSDM1_FLT1_IRQHandler,Default_Handler + + .weak DFSDM1_FLT2_IRQHandler + .thumb_set DFSDM1_FLT2_IRQHandler,Default_Handler + + .weak DFSDM1_FLT3_IRQHandler + .thumb_set DFSDM1_FLT3_IRQHandler,Default_Handler + + .weak SWPMI1_IRQHandler + .thumb_set SWPMI1_IRQHandler,Default_Handler + + .weak TIM15_IRQHandler + .thumb_set TIM15_IRQHandler,Default_Handler + + .weak TIM16_IRQHandler + .thumb_set TIM16_IRQHandler,Default_Handler + + .weak TIM17_IRQHandler + .thumb_set TIM17_IRQHandler,Default_Handler + + .weak MDIOS_WKUP_IRQHandler + .thumb_set MDIOS_WKUP_IRQHandler,Default_Handler + + .weak MDIOS_IRQHandler + .thumb_set MDIOS_IRQHandler,Default_Handler + + .weak MDMA_IRQHandler + .thumb_set MDMA_IRQHandler,Default_Handler + + .weak SDMMC2_IRQHandler + .thumb_set SDMMC2_IRQHandler,Default_Handler + + .weak HSEM1_IRQHandler + .thumb_set HSEM1_IRQHandler,Default_Handler + + .weak ADC3_IRQHandler + .thumb_set ADC3_IRQHandler,Default_Handler + + .weak DMAMUX2_OVR_IRQHandler + .thumb_set DMAMUX2_OVR_IRQHandler,Default_Handler + + .weak BDMA_Channel0_IRQHandler + .thumb_set BDMA_Channel0_IRQHandler,Default_Handler + + .weak BDMA_Channel1_IRQHandler + .thumb_set BDMA_Channel1_IRQHandler,Default_Handler + + .weak BDMA_Channel2_IRQHandler + .thumb_set BDMA_Channel2_IRQHandler,Default_Handler + + .weak BDMA_Channel3_IRQHandler + .thumb_set BDMA_Channel3_IRQHandler,Default_Handler + + .weak BDMA_Channel4_IRQHandler + .thumb_set BDMA_Channel4_IRQHandler,Default_Handler + + .weak BDMA_Channel5_IRQHandler + .thumb_set BDMA_Channel5_IRQHandler,Default_Handler + + .weak BDMA_Channel6_IRQHandler + .thumb_set BDMA_Channel6_IRQHandler,Default_Handler + + .weak BDMA_Channel7_IRQHandler + .thumb_set BDMA_Channel7_IRQHandler,Default_Handler + + .weak COMP1_IRQHandler + .thumb_set COMP1_IRQHandler,Default_Handler + + .weak LPTIM2_IRQHandler + .thumb_set LPTIM2_IRQHandler,Default_Handler + + .weak LPTIM3_IRQHandler + .thumb_set LPTIM3_IRQHandler,Default_Handler + + .weak LPTIM4_IRQHandler + .thumb_set LPTIM4_IRQHandler,Default_Handler + + .weak LPTIM5_IRQHandler + .thumb_set LPTIM5_IRQHandler,Default_Handler + + .weak LPUART1_IRQHandler + .thumb_set LPUART1_IRQHandler,Default_Handler + + .weak CRS_IRQHandler + .thumb_set CRS_IRQHandler,Default_Handler + + .weak ECC_IRQHandler + .thumb_set ECC_IRQHandler,Default_Handler + + .weak SAI4_IRQHandler + .thumb_set SAI4_IRQHandler,Default_Handler + + .weak DTS_IRQHandler + .thumb_set DTS_IRQHandler,Default_Handler + + .weak WAKEUP_PIN_IRQHandler + .thumb_set WAKEUP_PIN_IRQHandler,Default_Handler + + .weak OCTOSPI2_IRQHandler + .thumb_set OCTOSPI2_IRQHandler,Default_Handler + + .weak OTFDEC1_IRQHandler + .thumb_set OTFDEC1_IRQHandler,Default_Handler + + .weak OTFDEC2_IRQHandler + .thumb_set OTFDEC2_IRQHandler,Default_Handler + + .weak FMAC_IRQHandler + .thumb_set FMAC_IRQHandler,Default_Handler + + .weak CORDIC_IRQHandler + .thumb_set CORDIC_IRQHandler,Default_Handler + + .weak UART9_IRQHandler + .thumb_set UART9_IRQHandler,Default_Handler + + .weak USART10_IRQHandler + .thumb_set USART10_IRQHandler,Default_Handler + + .weak I2C5_EV_IRQHandler + .thumb_set I2C5_EV_IRQHandler,Default_Handler + + .weak I2C5_ER_IRQHandler + .thumb_set I2C5_ER_IRQHandler,Default_Handler + + .weak FDCAN3_IT0_IRQHandler + .thumb_set FDCAN3_IT0_IRQHandler,Default_Handler + + .weak FDCAN3_IT1_IRQHandler + .thumb_set FDCAN3_IT1_IRQHandler,Default_Handler + + .weak TIM23_IRQHandler + .thumb_set TIM23_IRQHandler,Default_Handler + + .weak TIM24_IRQHandler + .thumb_set TIM24_IRQHandler,Default_Handler + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ + diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h730xxq.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h730xxq.s new file mode 100644 index 0000000..d2b8588 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h730xxq.s @@ -0,0 +1,765 @@ +/** + ****************************************************************************** + * @file startup_stm32h730xxq.s + * @author MCD Application Team + * @brief STM32H730xxQ Devices vector table for GCC based toolchain. + * This module performs: + * - Set the initial SP + * - Set the initial PC == Reset_Handler, + * - Set the vector table entries with the exceptions ISR address + * - Branches to main in the C library (which eventually + * calls main()). + * After Reset the Cortex-M processor is in Thread mode, + * priority is Privileged, and the Stack is set to Main. + ****************************************************************************** + * @attention + * + *

                  © Copyright (c) 2019 STMicroelectronics. + * All rights reserved.

                  + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + + .syntax unified + .cpu cortex-m7 + .fpu softvfp + .thumb + +.global g_pfnVectors +.global Default_Handler + +/* start address for the initialization values of the .data section. +defined in linker script */ +.word _sidata +/* start address for the .data section. defined in linker script */ +.word _sdata +/* end address for the .data section. defined in linker script */ +.word _edata +/* start address for the .bss section. defined in linker script */ +.word _sbss +/* end address for the .bss section. defined in linker script */ +.word _ebss +/* stack used for SystemInit_ExtMemCtl; always internal RAM used */ + +/** + * @brief This is the code that gets called when the processor first + * starts execution following a reset event. Only the absolutely + * necessary set is performed, after which the application + * supplied main() routine is called. + * @param None + * @retval : None +*/ + + .section .text.Reset_Handler + .weak Reset_Handler + .type Reset_Handler, %function +Reset_Handler: + ldr sp, =_estack /* set stack pointer */ + +/* Call the clock system intitialization function.*/ + bl SystemInit + +/* Copy the data segment initializers from flash to SRAM */ + movs r1, #0 + b LoopCopyDataInit + +CopyDataInit: + ldr r3, =_sidata + ldr r3, [r3, r1] + str r3, [r0, r1] + adds r1, r1, #4 + +LoopCopyDataInit: + ldr r0, =_sdata + ldr r3, =_edata + adds r2, r0, r1 + cmp r2, r3 + bcc CopyDataInit + ldr r2, =_sbss + b LoopFillZerobss +/* Zero fill the bss segment. */ +FillZerobss: + movs r3, #0 + str r3, [r2], #4 + +LoopFillZerobss: + ldr r3, = _ebss + cmp r2, r3 + bcc FillZerobss + +/* Call static constructors */ + bl __libc_init_array +/* Call the application's entry point.*/ + bl main + bx lr +.size Reset_Handler, .-Reset_Handler + +/** + * @brief This is the code that gets called when the processor receives an + * unexpected interrupt. This simply enters an infinite loop, preserving + * the system state for examination by a debugger. + * @param None + * @retval None +*/ + .section .text.Default_Handler,"ax",%progbits +Default_Handler: +Infinite_Loop: + b Infinite_Loop + .size Default_Handler, .-Default_Handler +/****************************************************************************** +* +* The minimal vector table for a Cortex M. Note that the proper constructs +* must be placed on this to ensure that it ends up at physical address +* 0x0000.0000. +* +*******************************************************************************/ + .section .isr_vector,"a",%progbits + .type g_pfnVectors, %object + .size g_pfnVectors, .-g_pfnVectors + + +g_pfnVectors: + .word _estack + .word Reset_Handler + + .word NMI_Handler + .word HardFault_Handler + .word MemManage_Handler + .word BusFault_Handler + .word UsageFault_Handler + .word 0 + .word 0 + .word 0 + .word 0 + .word SVC_Handler + .word DebugMon_Handler + .word 0 + .word PendSV_Handler + .word SysTick_Handler + + /* External Interrupts */ + .word WWDG_IRQHandler /* Window WatchDog */ + .word PVD_AVD_IRQHandler /* PVD/AVD through EXTI Line detection */ + .word TAMP_STAMP_IRQHandler /* Tamper and TimeStamps through the EXTI line */ + .word RTC_WKUP_IRQHandler /* RTC Wakeup through the EXTI line */ + .word FLASH_IRQHandler /* FLASH */ + .word RCC_IRQHandler /* RCC */ + .word EXTI0_IRQHandler /* EXTI Line0 */ + .word EXTI1_IRQHandler /* EXTI Line1 */ + .word EXTI2_IRQHandler /* EXTI Line2 */ + .word EXTI3_IRQHandler /* EXTI Line3 */ + .word EXTI4_IRQHandler /* EXTI Line4 */ + .word DMA1_Stream0_IRQHandler /* DMA1 Stream 0 */ + .word DMA1_Stream1_IRQHandler /* DMA1 Stream 1 */ + .word DMA1_Stream2_IRQHandler /* DMA1 Stream 2 */ + .word DMA1_Stream3_IRQHandler /* DMA1 Stream 3 */ + .word DMA1_Stream4_IRQHandler /* DMA1 Stream 4 */ + .word DMA1_Stream5_IRQHandler /* DMA1 Stream 5 */ + .word DMA1_Stream6_IRQHandler /* DMA1 Stream 6 */ + .word ADC_IRQHandler /* ADC1, ADC2 and ADC3s */ + .word FDCAN1_IT0_IRQHandler /* FDCAN1 interrupt line 0 */ + .word FDCAN2_IT0_IRQHandler /* FDCAN2 interrupt line 0 */ + .word FDCAN1_IT1_IRQHandler /* FDCAN1 interrupt line 1 */ + .word FDCAN2_IT1_IRQHandler /* FDCAN2 interrupt line 1 */ + .word EXTI9_5_IRQHandler /* External Line[9:5]s */ + .word TIM1_BRK_IRQHandler /* TIM1 Break interrupt */ + .word TIM1_UP_IRQHandler /* TIM1 Update interrupt */ + .word TIM1_TRG_COM_IRQHandler /* TIM1 Trigger and Commutation interrupt */ + .word TIM1_CC_IRQHandler /* TIM1 Capture Compare */ + .word TIM2_IRQHandler /* TIM2 */ + .word TIM3_IRQHandler /* TIM3 */ + .word TIM4_IRQHandler /* TIM4 */ + .word I2C1_EV_IRQHandler /* I2C1 Event */ + .word I2C1_ER_IRQHandler /* I2C1 Error */ + .word I2C2_EV_IRQHandler /* I2C2 Event */ + .word I2C2_ER_IRQHandler /* I2C2 Error */ + .word SPI1_IRQHandler /* SPI1 */ + .word SPI2_IRQHandler /* SPI2 */ + .word USART1_IRQHandler /* USART1 */ + .word USART2_IRQHandler /* USART2 */ + .word USART3_IRQHandler /* USART3 */ + .word EXTI15_10_IRQHandler /* External Line[15:10]s */ + .word RTC_Alarm_IRQHandler /* RTC Alarm (A and B) through EXTI Line */ + .word 0 /* Reserved */ + .word TIM8_BRK_TIM12_IRQHandler /* TIM8 Break and TIM12 */ + .word TIM8_UP_TIM13_IRQHandler /* TIM8 Update and TIM13 */ + .word TIM8_TRG_COM_TIM14_IRQHandler /* TIM8 Trigger and Commutation and TIM14 */ + .word TIM8_CC_IRQHandler /* TIM8 Capture Compare */ + .word DMA1_Stream7_IRQHandler /* DMA1 Stream7 */ + .word FMC_IRQHandler /* FMC */ + .word SDMMC1_IRQHandler /* SDMMC1 */ + .word TIM5_IRQHandler /* TIM5 */ + .word SPI3_IRQHandler /* SPI3 */ + .word UART4_IRQHandler /* UART4 */ + .word UART5_IRQHandler /* UART5 */ + .word TIM6_DAC_IRQHandler /* TIM6 and DAC1&2 underrun errors */ + .word TIM7_IRQHandler /* TIM7 */ + .word DMA2_Stream0_IRQHandler /* DMA2 Stream 0 */ + .word DMA2_Stream1_IRQHandler /* DMA2 Stream 1 */ + .word DMA2_Stream2_IRQHandler /* DMA2 Stream 2 */ + .word DMA2_Stream3_IRQHandler /* DMA2 Stream 3 */ + .word DMA2_Stream4_IRQHandler /* DMA2 Stream 4 */ + .word ETH_IRQHandler /* Ethernet */ + .word ETH_WKUP_IRQHandler /* Ethernet Wakeup through EXTI line */ + .word FDCAN_CAL_IRQHandler /* FDCAN calibration unit interrupt*/ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word DMA2_Stream5_IRQHandler /* DMA2 Stream 5 */ + .word DMA2_Stream6_IRQHandler /* DMA2 Stream 6 */ + .word DMA2_Stream7_IRQHandler /* DMA2 Stream 7 */ + .word USART6_IRQHandler /* USART6 */ + .word I2C3_EV_IRQHandler /* I2C3 event */ + .word I2C3_ER_IRQHandler /* I2C3 error */ + .word OTG_HS_EP1_OUT_IRQHandler /* USB OTG HS End Point 1 Out */ + .word OTG_HS_EP1_IN_IRQHandler /* USB OTG HS End Point 1 In */ + .word OTG_HS_WKUP_IRQHandler /* USB OTG HS Wakeup through EXTI */ + .word OTG_HS_IRQHandler /* USB OTG HS */ + .word DCMI_PSSI_IRQHandler /* DCMI, PSSI */ + .word CRYP_IRQHandler /* CRYP */ + .word HASH_RNG_IRQHandler /* Hash and Rng */ + .word FPU_IRQHandler /* FPU */ + .word UART7_IRQHandler /* UART7 */ + .word UART8_IRQHandler /* UART8 */ + .word SPI4_IRQHandler /* SPI4 */ + .word SPI5_IRQHandler /* SPI5 */ + .word SPI6_IRQHandler /* SPI6 */ + .word SAI1_IRQHandler /* SAI1 */ + .word LTDC_IRQHandler /* LTDC */ + .word LTDC_ER_IRQHandler /* LTDC error */ + .word DMA2D_IRQHandler /* DMA2D */ + .word 0 /* Reserved */ + .word OCTOSPI1_IRQHandler /* OCTOSPI1 */ + .word LPTIM1_IRQHandler /* LPTIM1 */ + .word CEC_IRQHandler /* HDMI_CEC */ + .word I2C4_EV_IRQHandler /* I2C4 Event */ + .word I2C4_ER_IRQHandler /* I2C4 Error */ + .word SPDIF_RX_IRQHandler /* SPDIF_RX */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word DMAMUX1_OVR_IRQHandler /* DMAMUX1 Overrun interrupt */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word DFSDM1_FLT0_IRQHandler /* DFSDM Filter0 Interrupt */ + .word DFSDM1_FLT1_IRQHandler /* DFSDM Filter1 Interrupt */ + .word DFSDM1_FLT2_IRQHandler /* DFSDM Filter2 Interrupt */ + .word DFSDM1_FLT3_IRQHandler /* DFSDM Filter3 Interrupt */ + .word 0 /* Reserved */ + .word SWPMI1_IRQHandler /* Serial Wire Interface 1 global interrupt */ + .word TIM15_IRQHandler /* TIM15 global Interrupt */ + .word TIM16_IRQHandler /* TIM16 global Interrupt */ + .word TIM17_IRQHandler /* TIM17 global Interrupt */ + .word MDIOS_WKUP_IRQHandler /* MDIOS Wakeup Interrupt */ + .word MDIOS_IRQHandler /* MDIOS global Interrupt */ + .word 0 /* Reserved */ + .word MDMA_IRQHandler /* MDMA global Interrupt */ + .word 0 /* Reserved */ + .word SDMMC2_IRQHandler /* SDMMC2 global Interrupt */ + .word HSEM1_IRQHandler /* HSEM1 global Interrupt */ + .word 0 /* Reserved */ + .word ADC3_IRQHandler /* ADC3 global Interrupt */ + .word DMAMUX2_OVR_IRQHandler /* DMAMUX Overrun interrupt */ + .word BDMA_Channel0_IRQHandler /* BDMA Channel 0 global Interrupt */ + .word BDMA_Channel1_IRQHandler /* BDMA Channel 1 global Interrupt */ + .word BDMA_Channel2_IRQHandler /* BDMA Channel 2 global Interrupt */ + .word BDMA_Channel3_IRQHandler /* BDMA Channel 3 global Interrupt */ + .word BDMA_Channel4_IRQHandler /* BDMA Channel 4 global Interrupt */ + .word BDMA_Channel5_IRQHandler /* BDMA Channel 5 global Interrupt */ + .word BDMA_Channel6_IRQHandler /* BDMA Channel 6 global Interrupt */ + .word BDMA_Channel7_IRQHandler /* BDMA Channel 7 global Interrupt */ + .word COMP1_IRQHandler /* COMP1 global Interrupt */ + .word LPTIM2_IRQHandler /* LP TIM2 global interrupt */ + .word LPTIM3_IRQHandler /* LP TIM3 global interrupt */ + .word LPTIM4_IRQHandler /* LP TIM4 global interrupt */ + .word LPTIM5_IRQHandler /* LP TIM5 global interrupt */ + .word LPUART1_IRQHandler /* LP UART1 interrupt */ + .word 0 /* Reserved */ + .word CRS_IRQHandler /* Clock Recovery Global Interrupt */ + .word ECC_IRQHandler /* ECC diagnostic Global Interrupt */ + .word SAI4_IRQHandler /* SAI4 global interrupt */ + .word DTS_IRQHandler /* Digital Temperature Sensor interrupt */ + .word 0 /* Reserved */ + .word WAKEUP_PIN_IRQHandler /* Interrupt for all 6 wake-up pins */ + .word OCTOSPI2_IRQHandler /* OCTOSPI2 Interrupt */ + .word OTFDEC1_IRQHandler /* OTFDEC1 Interrupt */ + .word OTFDEC2_IRQHandler /* OTFDEC2 Interrupt */ + .word FMAC_IRQHandler /* FMAC Interrupt */ + .word CORDIC_IRQHandler /* CORDIC Interrupt */ + .word UART9_IRQHandler /* UART9 Interrupt */ + .word USART10_IRQHandler /* UART10 Interrupt */ + .word I2C5_EV_IRQHandler /* I2C5 Event Interrupt */ + .word I2C5_ER_IRQHandler /* I2C5 Error Interrupt */ + .word FDCAN3_IT0_IRQHandler /* FDCAN3 interrupt line 0 */ + .word FDCAN3_IT1_IRQHandler /* FDCAN3 interrupt line 1 */ + .word TIM23_IRQHandler /* TIM23 global interrupt */ + .word TIM24_IRQHandler /* TIM24 global interrupt */ + +/******************************************************************************* +* +* Provide weak aliases for each Exception handler to the Default_Handler. +* As they are weak aliases, any function with the same name will override +* this definition. +* +*******************************************************************************/ + .weak NMI_Handler + .thumb_set NMI_Handler,Default_Handler + + .weak HardFault_Handler + .thumb_set HardFault_Handler,Default_Handler + + .weak MemManage_Handler + .thumb_set MemManage_Handler,Default_Handler + + .weak BusFault_Handler + .thumb_set BusFault_Handler,Default_Handler + + .weak UsageFault_Handler + .thumb_set UsageFault_Handler,Default_Handler + + .weak SVC_Handler + .thumb_set SVC_Handler,Default_Handler + + .weak DebugMon_Handler + .thumb_set DebugMon_Handler,Default_Handler + + .weak PendSV_Handler + .thumb_set PendSV_Handler,Default_Handler + + .weak SysTick_Handler + .thumb_set SysTick_Handler,Default_Handler + + .weak WWDG_IRQHandler + .thumb_set WWDG_IRQHandler,Default_Handler + + .weak PVD_AVD_IRQHandler + .thumb_set PVD_AVD_IRQHandler,Default_Handler + + .weak TAMP_STAMP_IRQHandler + .thumb_set TAMP_STAMP_IRQHandler,Default_Handler + + .weak RTC_WKUP_IRQHandler + .thumb_set RTC_WKUP_IRQHandler,Default_Handler + + .weak FLASH_IRQHandler + .thumb_set FLASH_IRQHandler,Default_Handler + + .weak RCC_IRQHandler + .thumb_set RCC_IRQHandler,Default_Handler + + .weak EXTI0_IRQHandler + .thumb_set EXTI0_IRQHandler,Default_Handler + + .weak EXTI1_IRQHandler + .thumb_set EXTI1_IRQHandler,Default_Handler + + .weak EXTI2_IRQHandler + .thumb_set EXTI2_IRQHandler,Default_Handler + + .weak EXTI3_IRQHandler + .thumb_set EXTI3_IRQHandler,Default_Handler + + .weak EXTI4_IRQHandler + .thumb_set EXTI4_IRQHandler,Default_Handler + + .weak DMA1_Stream0_IRQHandler + .thumb_set DMA1_Stream0_IRQHandler,Default_Handler + + .weak DMA1_Stream1_IRQHandler + .thumb_set DMA1_Stream1_IRQHandler,Default_Handler + + .weak DMA1_Stream2_IRQHandler + .thumb_set DMA1_Stream2_IRQHandler,Default_Handler + + .weak DMA1_Stream3_IRQHandler + .thumb_set DMA1_Stream3_IRQHandler,Default_Handler + + .weak DMA1_Stream4_IRQHandler + .thumb_set DMA1_Stream4_IRQHandler,Default_Handler + + .weak DMA1_Stream5_IRQHandler + .thumb_set DMA1_Stream5_IRQHandler,Default_Handler + + .weak DMA1_Stream6_IRQHandler + .thumb_set DMA1_Stream6_IRQHandler,Default_Handler + + .weak ADC_IRQHandler + .thumb_set ADC_IRQHandler,Default_Handler + + .weak FDCAN1_IT0_IRQHandler + .thumb_set FDCAN1_IT0_IRQHandler,Default_Handler + + .weak FDCAN2_IT0_IRQHandler + .thumb_set FDCAN2_IT0_IRQHandler,Default_Handler + + .weak FDCAN1_IT1_IRQHandler + .thumb_set FDCAN1_IT1_IRQHandler,Default_Handler + + .weak FDCAN2_IT1_IRQHandler + .thumb_set FDCAN2_IT1_IRQHandler,Default_Handler + + .weak EXTI9_5_IRQHandler + .thumb_set EXTI9_5_IRQHandler,Default_Handler + + .weak TIM1_BRK_IRQHandler + .thumb_set TIM1_BRK_IRQHandler,Default_Handler + + .weak TIM1_UP_IRQHandler + .thumb_set TIM1_UP_IRQHandler,Default_Handler + + .weak TIM1_TRG_COM_IRQHandler + .thumb_set TIM1_TRG_COM_IRQHandler,Default_Handler + + .weak TIM1_CC_IRQHandler + .thumb_set TIM1_CC_IRQHandler,Default_Handler + + .weak TIM2_IRQHandler + .thumb_set TIM2_IRQHandler,Default_Handler + + .weak TIM3_IRQHandler + .thumb_set TIM3_IRQHandler,Default_Handler + + .weak TIM4_IRQHandler + .thumb_set TIM4_IRQHandler,Default_Handler + + .weak I2C1_EV_IRQHandler + .thumb_set I2C1_EV_IRQHandler,Default_Handler + + .weak I2C1_ER_IRQHandler + .thumb_set I2C1_ER_IRQHandler,Default_Handler + + .weak I2C2_EV_IRQHandler + .thumb_set I2C2_EV_IRQHandler,Default_Handler + + .weak I2C2_ER_IRQHandler + .thumb_set I2C2_ER_IRQHandler,Default_Handler + + .weak SPI1_IRQHandler + .thumb_set SPI1_IRQHandler,Default_Handler + + .weak SPI2_IRQHandler + .thumb_set SPI2_IRQHandler,Default_Handler + + .weak USART1_IRQHandler + .thumb_set USART1_IRQHandler,Default_Handler + + .weak USART2_IRQHandler + .thumb_set USART2_IRQHandler,Default_Handler + + .weak USART3_IRQHandler + .thumb_set USART3_IRQHandler,Default_Handler + + .weak EXTI15_10_IRQHandler + .thumb_set EXTI15_10_IRQHandler,Default_Handler + + .weak RTC_Alarm_IRQHandler + .thumb_set RTC_Alarm_IRQHandler,Default_Handler + + .weak TIM8_BRK_TIM12_IRQHandler + .thumb_set TIM8_BRK_TIM12_IRQHandler,Default_Handler + + .weak TIM8_UP_TIM13_IRQHandler + .thumb_set TIM8_UP_TIM13_IRQHandler,Default_Handler + + .weak TIM8_TRG_COM_TIM14_IRQHandler + .thumb_set TIM8_TRG_COM_TIM14_IRQHandler,Default_Handler + + .weak TIM8_CC_IRQHandler + .thumb_set TIM8_CC_IRQHandler,Default_Handler + + .weak DMA1_Stream7_IRQHandler + .thumb_set DMA1_Stream7_IRQHandler,Default_Handler + + .weak FMC_IRQHandler + .thumb_set FMC_IRQHandler,Default_Handler + + .weak SDMMC1_IRQHandler + .thumb_set SDMMC1_IRQHandler,Default_Handler + + .weak TIM5_IRQHandler + .thumb_set TIM5_IRQHandler,Default_Handler + + .weak SPI3_IRQHandler + .thumb_set SPI3_IRQHandler,Default_Handler + + .weak UART4_IRQHandler + .thumb_set UART4_IRQHandler,Default_Handler + + .weak UART5_IRQHandler + .thumb_set UART5_IRQHandler,Default_Handler + + .weak TIM6_DAC_IRQHandler + .thumb_set TIM6_DAC_IRQHandler,Default_Handler + + .weak TIM7_IRQHandler + .thumb_set TIM7_IRQHandler,Default_Handler + + .weak DMA2_Stream0_IRQHandler + .thumb_set DMA2_Stream0_IRQHandler,Default_Handler + + .weak DMA2_Stream1_IRQHandler + .thumb_set DMA2_Stream1_IRQHandler,Default_Handler + + .weak DMA2_Stream2_IRQHandler + .thumb_set DMA2_Stream2_IRQHandler,Default_Handler + + .weak DMA2_Stream3_IRQHandler + .thumb_set DMA2_Stream3_IRQHandler,Default_Handler + + .weak DMA2_Stream4_IRQHandler + .thumb_set DMA2_Stream4_IRQHandler,Default_Handler + + .weak ETH_IRQHandler + .thumb_set ETH_IRQHandler,Default_Handler + + .weak ETH_WKUP_IRQHandler + .thumb_set ETH_WKUP_IRQHandler,Default_Handler + + .weak FDCAN_CAL_IRQHandler + .thumb_set FDCAN_CAL_IRQHandler,Default_Handler + + .weak DMA2_Stream5_IRQHandler + .thumb_set DMA2_Stream5_IRQHandler,Default_Handler + + .weak DMA2_Stream6_IRQHandler + .thumb_set DMA2_Stream6_IRQHandler,Default_Handler + + .weak DMA2_Stream7_IRQHandler + .thumb_set DMA2_Stream7_IRQHandler,Default_Handler + + .weak USART6_IRQHandler + .thumb_set USART6_IRQHandler,Default_Handler + + .weak I2C3_EV_IRQHandler + .thumb_set I2C3_EV_IRQHandler,Default_Handler + + .weak I2C3_ER_IRQHandler + .thumb_set I2C3_ER_IRQHandler,Default_Handler + + .weak OTG_HS_EP1_OUT_IRQHandler + .thumb_set OTG_HS_EP1_OUT_IRQHandler,Default_Handler + + .weak OTG_HS_EP1_IN_IRQHandler + .thumb_set OTG_HS_EP1_IN_IRQHandler,Default_Handler + + .weak OTG_HS_WKUP_IRQHandler + .thumb_set OTG_HS_WKUP_IRQHandler,Default_Handler + + .weak OTG_HS_IRQHandler + .thumb_set OTG_HS_IRQHandler,Default_Handler + + .weak DCMI_PSSI_IRQHandler + .thumb_set DCMI_PSSI_IRQHandler,Default_Handler + + .weak CRYP_IRQHandler + .thumb_set CRYP_IRQHandler,Default_Handler + + .weak HASH_RNG_IRQHandler + .thumb_set HASH_RNG_IRQHandler,Default_Handler + + .weak FPU_IRQHandler + .thumb_set FPU_IRQHandler,Default_Handler + + .weak UART7_IRQHandler + .thumb_set UART7_IRQHandler,Default_Handler + + .weak UART8_IRQHandler + .thumb_set UART8_IRQHandler,Default_Handler + + .weak SPI4_IRQHandler + .thumb_set SPI4_IRQHandler,Default_Handler + + .weak SPI5_IRQHandler + .thumb_set SPI5_IRQHandler,Default_Handler + + .weak SPI6_IRQHandler + .thumb_set SPI6_IRQHandler,Default_Handler + + .weak SAI1_IRQHandler + .thumb_set SAI1_IRQHandler,Default_Handler + + .weak LTDC_IRQHandler + .thumb_set LTDC_IRQHandler,Default_Handler + + .weak LTDC_ER_IRQHandler + .thumb_set LTDC_ER_IRQHandler,Default_Handler + + .weak DMA2D_IRQHandler + .thumb_set DMA2D_IRQHandler,Default_Handler + + .weak OCTOSPI1_IRQHandler + .thumb_set OCTOSPI1_IRQHandler,Default_Handler + + .weak LPTIM1_IRQHandler + .thumb_set LPTIM1_IRQHandler,Default_Handler + + .weak CEC_IRQHandler + .thumb_set CEC_IRQHandler,Default_Handler + + .weak I2C4_EV_IRQHandler + .thumb_set I2C4_EV_IRQHandler,Default_Handler + + .weak I2C4_ER_IRQHandler + .thumb_set I2C4_ER_IRQHandler,Default_Handler + + .weak SPDIF_RX_IRQHandler + .thumb_set SPDIF_RX_IRQHandler,Default_Handler + + .weak DMAMUX1_OVR_IRQHandler + .thumb_set DMAMUX1_OVR_IRQHandler,Default_Handler + + .weak DFSDM1_FLT0_IRQHandler + .thumb_set DFSDM1_FLT0_IRQHandler,Default_Handler + + .weak DFSDM1_FLT1_IRQHandler + .thumb_set DFSDM1_FLT1_IRQHandler,Default_Handler + + .weak DFSDM1_FLT2_IRQHandler + .thumb_set DFSDM1_FLT2_IRQHandler,Default_Handler + + .weak DFSDM1_FLT3_IRQHandler + .thumb_set DFSDM1_FLT3_IRQHandler,Default_Handler + + .weak SWPMI1_IRQHandler + .thumb_set SWPMI1_IRQHandler,Default_Handler + + .weak TIM15_IRQHandler + .thumb_set TIM15_IRQHandler,Default_Handler + + .weak TIM16_IRQHandler + .thumb_set TIM16_IRQHandler,Default_Handler + + .weak TIM17_IRQHandler + .thumb_set TIM17_IRQHandler,Default_Handler + + .weak MDIOS_WKUP_IRQHandler + .thumb_set MDIOS_WKUP_IRQHandler,Default_Handler + + .weak MDIOS_IRQHandler + .thumb_set MDIOS_IRQHandler,Default_Handler + + .weak MDMA_IRQHandler + .thumb_set MDMA_IRQHandler,Default_Handler + + .weak SDMMC2_IRQHandler + .thumb_set SDMMC2_IRQHandler,Default_Handler + + .weak HSEM1_IRQHandler + .thumb_set HSEM1_IRQHandler,Default_Handler + + .weak ADC3_IRQHandler + .thumb_set ADC3_IRQHandler,Default_Handler + + .weak DMAMUX2_OVR_IRQHandler + .thumb_set DMAMUX2_OVR_IRQHandler,Default_Handler + + .weak BDMA_Channel0_IRQHandler + .thumb_set BDMA_Channel0_IRQHandler,Default_Handler + + .weak BDMA_Channel1_IRQHandler + .thumb_set BDMA_Channel1_IRQHandler,Default_Handler + + .weak BDMA_Channel2_IRQHandler + .thumb_set BDMA_Channel2_IRQHandler,Default_Handler + + .weak BDMA_Channel3_IRQHandler + .thumb_set BDMA_Channel3_IRQHandler,Default_Handler + + .weak BDMA_Channel4_IRQHandler + .thumb_set BDMA_Channel4_IRQHandler,Default_Handler + + .weak BDMA_Channel5_IRQHandler + .thumb_set BDMA_Channel5_IRQHandler,Default_Handler + + .weak BDMA_Channel6_IRQHandler + .thumb_set BDMA_Channel6_IRQHandler,Default_Handler + + .weak BDMA_Channel7_IRQHandler + .thumb_set BDMA_Channel7_IRQHandler,Default_Handler + + .weak COMP1_IRQHandler + .thumb_set COMP1_IRQHandler,Default_Handler + + .weak LPTIM2_IRQHandler + .thumb_set LPTIM2_IRQHandler,Default_Handler + + .weak LPTIM3_IRQHandler + .thumb_set LPTIM3_IRQHandler,Default_Handler + + .weak LPTIM4_IRQHandler + .thumb_set LPTIM4_IRQHandler,Default_Handler + + .weak LPTIM5_IRQHandler + .thumb_set LPTIM5_IRQHandler,Default_Handler + + .weak LPUART1_IRQHandler + .thumb_set LPUART1_IRQHandler,Default_Handler + + .weak CRS_IRQHandler + .thumb_set CRS_IRQHandler,Default_Handler + + .weak ECC_IRQHandler + .thumb_set ECC_IRQHandler,Default_Handler + + .weak SAI4_IRQHandler + .thumb_set SAI4_IRQHandler,Default_Handler + + .weak DTS_IRQHandler + .thumb_set DTS_IRQHandler,Default_Handler + + .weak WAKEUP_PIN_IRQHandler + .thumb_set WAKEUP_PIN_IRQHandler,Default_Handler + + .weak OCTOSPI2_IRQHandler + .thumb_set OCTOSPI2_IRQHandler,Default_Handler + + .weak OTFDEC1_IRQHandler + .thumb_set OTFDEC1_IRQHandler,Default_Handler + + .weak OTFDEC2_IRQHandler + .thumb_set OTFDEC2_IRQHandler,Default_Handler + + .weak FMAC_IRQHandler + .thumb_set FMAC_IRQHandler,Default_Handler + + .weak CORDIC_IRQHandler + .thumb_set CORDIC_IRQHandler,Default_Handler + + .weak UART9_IRQHandler + .thumb_set UART9_IRQHandler,Default_Handler + + .weak USART10_IRQHandler + .thumb_set USART10_IRQHandler,Default_Handler + + .weak I2C5_EV_IRQHandler + .thumb_set I2C5_EV_IRQHandler,Default_Handler + + .weak I2C5_ER_IRQHandler + .thumb_set I2C5_ER_IRQHandler,Default_Handler + + .weak FDCAN3_IT0_IRQHandler + .thumb_set FDCAN3_IT0_IRQHandler,Default_Handler + + .weak FDCAN3_IT1_IRQHandler + .thumb_set FDCAN3_IT1_IRQHandler,Default_Handler + + .weak TIM23_IRQHandler + .thumb_set TIM23_IRQHandler,Default_Handler + + .weak TIM24_IRQHandler + .thumb_set TIM24_IRQHandler,Default_Handler + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ + diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h733xx.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h733xx.s new file mode 100644 index 0000000..6765bc1 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h733xx.s @@ -0,0 +1,765 @@ +/** + ****************************************************************************** + * @file startup_stm32h733xx.s + * @author MCD Application Team + * @brief STM32H733xx Devices vector table for GCC based toolchain. + * This module performs: + * - Set the initial SP + * - Set the initial PC == Reset_Handler, + * - Set the vector table entries with the exceptions ISR address + * - Branches to main in the C library (which eventually + * calls main()). + * After Reset the Cortex-M processor is in Thread mode, + * priority is Privileged, and the Stack is set to Main. + ****************************************************************************** + * @attention + * + *

                  © Copyright (c) 2019 STMicroelectronics. + * All rights reserved.

                  + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + + .syntax unified + .cpu cortex-m7 + .fpu softvfp + .thumb + +.global g_pfnVectors +.global Default_Handler + +/* start address for the initialization values of the .data section. +defined in linker script */ +.word _sidata +/* start address for the .data section. defined in linker script */ +.word _sdata +/* end address for the .data section. defined in linker script */ +.word _edata +/* start address for the .bss section. defined in linker script */ +.word _sbss +/* end address for the .bss section. defined in linker script */ +.word _ebss +/* stack used for SystemInit_ExtMemCtl; always internal RAM used */ + +/** + * @brief This is the code that gets called when the processor first + * starts execution following a reset event. Only the absolutely + * necessary set is performed, after which the application + * supplied main() routine is called. + * @param None + * @retval : None +*/ + + .section .text.Reset_Handler + .weak Reset_Handler + .type Reset_Handler, %function +Reset_Handler: + ldr sp, =_estack /* set stack pointer */ + +/* Call the clock system intitialization function.*/ + bl SystemInit + +/* Copy the data segment initializers from flash to SRAM */ + movs r1, #0 + b LoopCopyDataInit + +CopyDataInit: + ldr r3, =_sidata + ldr r3, [r3, r1] + str r3, [r0, r1] + adds r1, r1, #4 + +LoopCopyDataInit: + ldr r0, =_sdata + ldr r3, =_edata + adds r2, r0, r1 + cmp r2, r3 + bcc CopyDataInit + ldr r2, =_sbss + b LoopFillZerobss +/* Zero fill the bss segment. */ +FillZerobss: + movs r3, #0 + str r3, [r2], #4 + +LoopFillZerobss: + ldr r3, = _ebss + cmp r2, r3 + bcc FillZerobss + +/* Call static constructors */ + bl __libc_init_array +/* Call the application's entry point.*/ + bl main + bx lr +.size Reset_Handler, .-Reset_Handler + +/** + * @brief This is the code that gets called when the processor receives an + * unexpected interrupt. This simply enters an infinite loop, preserving + * the system state for examination by a debugger. + * @param None + * @retval None +*/ + .section .text.Default_Handler,"ax",%progbits +Default_Handler: +Infinite_Loop: + b Infinite_Loop + .size Default_Handler, .-Default_Handler +/****************************************************************************** +* +* The minimal vector table for a Cortex M. Note that the proper constructs +* must be placed on this to ensure that it ends up at physical address +* 0x0000.0000. +* +*******************************************************************************/ + .section .isr_vector,"a",%progbits + .type g_pfnVectors, %object + .size g_pfnVectors, .-g_pfnVectors + + +g_pfnVectors: + .word _estack + .word Reset_Handler + + .word NMI_Handler + .word HardFault_Handler + .word MemManage_Handler + .word BusFault_Handler + .word UsageFault_Handler + .word 0 + .word 0 + .word 0 + .word 0 + .word SVC_Handler + .word DebugMon_Handler + .word 0 + .word PendSV_Handler + .word SysTick_Handler + + /* External Interrupts */ + .word WWDG_IRQHandler /* Window WatchDog */ + .word PVD_AVD_IRQHandler /* PVD/AVD through EXTI Line detection */ + .word TAMP_STAMP_IRQHandler /* Tamper and TimeStamps through the EXTI line */ + .word RTC_WKUP_IRQHandler /* RTC Wakeup through the EXTI line */ + .word FLASH_IRQHandler /* FLASH */ + .word RCC_IRQHandler /* RCC */ + .word EXTI0_IRQHandler /* EXTI Line0 */ + .word EXTI1_IRQHandler /* EXTI Line1 */ + .word EXTI2_IRQHandler /* EXTI Line2 */ + .word EXTI3_IRQHandler /* EXTI Line3 */ + .word EXTI4_IRQHandler /* EXTI Line4 */ + .word DMA1_Stream0_IRQHandler /* DMA1 Stream 0 */ + .word DMA1_Stream1_IRQHandler /* DMA1 Stream 1 */ + .word DMA1_Stream2_IRQHandler /* DMA1 Stream 2 */ + .word DMA1_Stream3_IRQHandler /* DMA1 Stream 3 */ + .word DMA1_Stream4_IRQHandler /* DMA1 Stream 4 */ + .word DMA1_Stream5_IRQHandler /* DMA1 Stream 5 */ + .word DMA1_Stream6_IRQHandler /* DMA1 Stream 6 */ + .word ADC_IRQHandler /* ADC1, ADC2 and ADC3s */ + .word FDCAN1_IT0_IRQHandler /* FDCAN1 interrupt line 0 */ + .word FDCAN2_IT0_IRQHandler /* FDCAN2 interrupt line 0 */ + .word FDCAN1_IT1_IRQHandler /* FDCAN1 interrupt line 1 */ + .word FDCAN2_IT1_IRQHandler /* FDCAN2 interrupt line 1 */ + .word EXTI9_5_IRQHandler /* External Line[9:5]s */ + .word TIM1_BRK_IRQHandler /* TIM1 Break interrupt */ + .word TIM1_UP_IRQHandler /* TIM1 Update interrupt */ + .word TIM1_TRG_COM_IRQHandler /* TIM1 Trigger and Commutation interrupt */ + .word TIM1_CC_IRQHandler /* TIM1 Capture Compare */ + .word TIM2_IRQHandler /* TIM2 */ + .word TIM3_IRQHandler /* TIM3 */ + .word TIM4_IRQHandler /* TIM4 */ + .word I2C1_EV_IRQHandler /* I2C1 Event */ + .word I2C1_ER_IRQHandler /* I2C1 Error */ + .word I2C2_EV_IRQHandler /* I2C2 Event */ + .word I2C2_ER_IRQHandler /* I2C2 Error */ + .word SPI1_IRQHandler /* SPI1 */ + .word SPI2_IRQHandler /* SPI2 */ + .word USART1_IRQHandler /* USART1 */ + .word USART2_IRQHandler /* USART2 */ + .word USART3_IRQHandler /* USART3 */ + .word EXTI15_10_IRQHandler /* External Line[15:10]s */ + .word RTC_Alarm_IRQHandler /* RTC Alarm (A and B) through EXTI Line */ + .word 0 /* Reserved */ + .word TIM8_BRK_TIM12_IRQHandler /* TIM8 Break and TIM12 */ + .word TIM8_UP_TIM13_IRQHandler /* TIM8 Update and TIM13 */ + .word TIM8_TRG_COM_TIM14_IRQHandler /* TIM8 Trigger and Commutation and TIM14 */ + .word TIM8_CC_IRQHandler /* TIM8 Capture Compare */ + .word DMA1_Stream7_IRQHandler /* DMA1 Stream7 */ + .word FMC_IRQHandler /* FMC */ + .word SDMMC1_IRQHandler /* SDMMC1 */ + .word TIM5_IRQHandler /* TIM5 */ + .word SPI3_IRQHandler /* SPI3 */ + .word UART4_IRQHandler /* UART4 */ + .word UART5_IRQHandler /* UART5 */ + .word TIM6_DAC_IRQHandler /* TIM6 and DAC1&2 underrun errors */ + .word TIM7_IRQHandler /* TIM7 */ + .word DMA2_Stream0_IRQHandler /* DMA2 Stream 0 */ + .word DMA2_Stream1_IRQHandler /* DMA2 Stream 1 */ + .word DMA2_Stream2_IRQHandler /* DMA2 Stream 2 */ + .word DMA2_Stream3_IRQHandler /* DMA2 Stream 3 */ + .word DMA2_Stream4_IRQHandler /* DMA2 Stream 4 */ + .word ETH_IRQHandler /* Ethernet */ + .word ETH_WKUP_IRQHandler /* Ethernet Wakeup through EXTI line */ + .word FDCAN_CAL_IRQHandler /* FDCAN calibration unit interrupt*/ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word DMA2_Stream5_IRQHandler /* DMA2 Stream 5 */ + .word DMA2_Stream6_IRQHandler /* DMA2 Stream 6 */ + .word DMA2_Stream7_IRQHandler /* DMA2 Stream 7 */ + .word USART6_IRQHandler /* USART6 */ + .word I2C3_EV_IRQHandler /* I2C3 event */ + .word I2C3_ER_IRQHandler /* I2C3 error */ + .word OTG_HS_EP1_OUT_IRQHandler /* USB OTG HS End Point 1 Out */ + .word OTG_HS_EP1_IN_IRQHandler /* USB OTG HS End Point 1 In */ + .word OTG_HS_WKUP_IRQHandler /* USB OTG HS Wakeup through EXTI */ + .word OTG_HS_IRQHandler /* USB OTG HS */ + .word DCMI_PSSI_IRQHandler /* DCMI, PSSI */ + .word CRYP_IRQHandler /* CRYP */ + .word HASH_RNG_IRQHandler /* Hash and Rng */ + .word FPU_IRQHandler /* FPU */ + .word UART7_IRQHandler /* UART7 */ + .word UART8_IRQHandler /* UART8 */ + .word SPI4_IRQHandler /* SPI4 */ + .word SPI5_IRQHandler /* SPI5 */ + .word SPI6_IRQHandler /* SPI6 */ + .word SAI1_IRQHandler /* SAI1 */ + .word LTDC_IRQHandler /* LTDC */ + .word LTDC_ER_IRQHandler /* LTDC error */ + .word DMA2D_IRQHandler /* DMA2D */ + .word 0 /* Reserved */ + .word OCTOSPI1_IRQHandler /* OCTOSPI1 */ + .word LPTIM1_IRQHandler /* LPTIM1 */ + .word CEC_IRQHandler /* HDMI_CEC */ + .word I2C4_EV_IRQHandler /* I2C4 Event */ + .word I2C4_ER_IRQHandler /* I2C4 Error */ + .word SPDIF_RX_IRQHandler /* SPDIF_RX */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word DMAMUX1_OVR_IRQHandler /* DMAMUX1 Overrun interrupt */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word DFSDM1_FLT0_IRQHandler /* DFSDM Filter0 Interrupt */ + .word DFSDM1_FLT1_IRQHandler /* DFSDM Filter1 Interrupt */ + .word DFSDM1_FLT2_IRQHandler /* DFSDM Filter2 Interrupt */ + .word DFSDM1_FLT3_IRQHandler /* DFSDM Filter3 Interrupt */ + .word 0 /* Reserved */ + .word SWPMI1_IRQHandler /* Serial Wire Interface 1 global interrupt */ + .word TIM15_IRQHandler /* TIM15 global Interrupt */ + .word TIM16_IRQHandler /* TIM16 global Interrupt */ + .word TIM17_IRQHandler /* TIM17 global Interrupt */ + .word MDIOS_WKUP_IRQHandler /* MDIOS Wakeup Interrupt */ + .word MDIOS_IRQHandler /* MDIOS global Interrupt */ + .word 0 /* Reserved */ + .word MDMA_IRQHandler /* MDMA global Interrupt */ + .word 0 /* Reserved */ + .word SDMMC2_IRQHandler /* SDMMC2 global Interrupt */ + .word HSEM1_IRQHandler /* HSEM1 global Interrupt */ + .word 0 /* Reserved */ + .word ADC3_IRQHandler /* ADC3 global Interrupt */ + .word DMAMUX2_OVR_IRQHandler /* DMAMUX Overrun interrupt */ + .word BDMA_Channel0_IRQHandler /* BDMA Channel 0 global Interrupt */ + .word BDMA_Channel1_IRQHandler /* BDMA Channel 1 global Interrupt */ + .word BDMA_Channel2_IRQHandler /* BDMA Channel 2 global Interrupt */ + .word BDMA_Channel3_IRQHandler /* BDMA Channel 3 global Interrupt */ + .word BDMA_Channel4_IRQHandler /* BDMA Channel 4 global Interrupt */ + .word BDMA_Channel5_IRQHandler /* BDMA Channel 5 global Interrupt */ + .word BDMA_Channel6_IRQHandler /* BDMA Channel 6 global Interrupt */ + .word BDMA_Channel7_IRQHandler /* BDMA Channel 7 global Interrupt */ + .word COMP1_IRQHandler /* COMP1 global Interrupt */ + .word LPTIM2_IRQHandler /* LP TIM2 global interrupt */ + .word LPTIM3_IRQHandler /* LP TIM3 global interrupt */ + .word LPTIM4_IRQHandler /* LP TIM4 global interrupt */ + .word LPTIM5_IRQHandler /* LP TIM5 global interrupt */ + .word LPUART1_IRQHandler /* LP UART1 interrupt */ + .word 0 /* Reserved */ + .word CRS_IRQHandler /* Clock Recovery Global Interrupt */ + .word ECC_IRQHandler /* ECC diagnostic Global Interrupt */ + .word SAI4_IRQHandler /* SAI4 global interrupt */ + .word DTS_IRQHandler /* Digital Temperature Sensor interrupt */ + .word 0 /* Reserved */ + .word WAKEUP_PIN_IRQHandler /* Interrupt for all 6 wake-up pins */ + .word OCTOSPI2_IRQHandler /* OCTOSPI2 Interrupt */ + .word OTFDEC1_IRQHandler /* OTFDEC1 Interrupt */ + .word OTFDEC2_IRQHandler /* OTFDEC2 Interrupt */ + .word FMAC_IRQHandler /* FMAC Interrupt */ + .word CORDIC_IRQHandler /* CORDIC Interrupt */ + .word UART9_IRQHandler /* UART9 Interrupt */ + .word USART10_IRQHandler /* UART10 Interrupt */ + .word I2C5_EV_IRQHandler /* I2C5 Event Interrupt */ + .word I2C5_ER_IRQHandler /* I2C5 Error Interrupt */ + .word FDCAN3_IT0_IRQHandler /* FDCAN3 interrupt line 0 */ + .word FDCAN3_IT1_IRQHandler /* FDCAN3 interrupt line 1 */ + .word TIM23_IRQHandler /* TIM23 global interrupt */ + .word TIM24_IRQHandler /* TIM24 global interrupt */ + +/******************************************************************************* +* +* Provide weak aliases for each Exception handler to the Default_Handler. +* As they are weak aliases, any function with the same name will override +* this definition. +* +*******************************************************************************/ + .weak NMI_Handler + .thumb_set NMI_Handler,Default_Handler + + .weak HardFault_Handler + .thumb_set HardFault_Handler,Default_Handler + + .weak MemManage_Handler + .thumb_set MemManage_Handler,Default_Handler + + .weak BusFault_Handler + .thumb_set BusFault_Handler,Default_Handler + + .weak UsageFault_Handler + .thumb_set UsageFault_Handler,Default_Handler + + .weak SVC_Handler + .thumb_set SVC_Handler,Default_Handler + + .weak DebugMon_Handler + .thumb_set DebugMon_Handler,Default_Handler + + .weak PendSV_Handler + .thumb_set PendSV_Handler,Default_Handler + + .weak SysTick_Handler + .thumb_set SysTick_Handler,Default_Handler + + .weak WWDG_IRQHandler + .thumb_set WWDG_IRQHandler,Default_Handler + + .weak PVD_AVD_IRQHandler + .thumb_set PVD_AVD_IRQHandler,Default_Handler + + .weak TAMP_STAMP_IRQHandler + .thumb_set TAMP_STAMP_IRQHandler,Default_Handler + + .weak RTC_WKUP_IRQHandler + .thumb_set RTC_WKUP_IRQHandler,Default_Handler + + .weak FLASH_IRQHandler + .thumb_set FLASH_IRQHandler,Default_Handler + + .weak RCC_IRQHandler + .thumb_set RCC_IRQHandler,Default_Handler + + .weak EXTI0_IRQHandler + .thumb_set EXTI0_IRQHandler,Default_Handler + + .weak EXTI1_IRQHandler + .thumb_set EXTI1_IRQHandler,Default_Handler + + .weak EXTI2_IRQHandler + .thumb_set EXTI2_IRQHandler,Default_Handler + + .weak EXTI3_IRQHandler + .thumb_set EXTI3_IRQHandler,Default_Handler + + .weak EXTI4_IRQHandler + .thumb_set EXTI4_IRQHandler,Default_Handler + + .weak DMA1_Stream0_IRQHandler + .thumb_set DMA1_Stream0_IRQHandler,Default_Handler + + .weak DMA1_Stream1_IRQHandler + .thumb_set DMA1_Stream1_IRQHandler,Default_Handler + + .weak DMA1_Stream2_IRQHandler + .thumb_set DMA1_Stream2_IRQHandler,Default_Handler + + .weak DMA1_Stream3_IRQHandler + .thumb_set DMA1_Stream3_IRQHandler,Default_Handler + + .weak DMA1_Stream4_IRQHandler + .thumb_set DMA1_Stream4_IRQHandler,Default_Handler + + .weak DMA1_Stream5_IRQHandler + .thumb_set DMA1_Stream5_IRQHandler,Default_Handler + + .weak DMA1_Stream6_IRQHandler + .thumb_set DMA1_Stream6_IRQHandler,Default_Handler + + .weak ADC_IRQHandler + .thumb_set ADC_IRQHandler,Default_Handler + + .weak FDCAN1_IT0_IRQHandler + .thumb_set FDCAN1_IT0_IRQHandler,Default_Handler + + .weak FDCAN2_IT0_IRQHandler + .thumb_set FDCAN2_IT0_IRQHandler,Default_Handler + + .weak FDCAN1_IT1_IRQHandler + .thumb_set FDCAN1_IT1_IRQHandler,Default_Handler + + .weak FDCAN2_IT1_IRQHandler + .thumb_set FDCAN2_IT1_IRQHandler,Default_Handler + + .weak EXTI9_5_IRQHandler + .thumb_set EXTI9_5_IRQHandler,Default_Handler + + .weak TIM1_BRK_IRQHandler + .thumb_set TIM1_BRK_IRQHandler,Default_Handler + + .weak TIM1_UP_IRQHandler + .thumb_set TIM1_UP_IRQHandler,Default_Handler + + .weak TIM1_TRG_COM_IRQHandler + .thumb_set TIM1_TRG_COM_IRQHandler,Default_Handler + + .weak TIM1_CC_IRQHandler + .thumb_set TIM1_CC_IRQHandler,Default_Handler + + .weak TIM2_IRQHandler + .thumb_set TIM2_IRQHandler,Default_Handler + + .weak TIM3_IRQHandler + .thumb_set TIM3_IRQHandler,Default_Handler + + .weak TIM4_IRQHandler + .thumb_set TIM4_IRQHandler,Default_Handler + + .weak I2C1_EV_IRQHandler + .thumb_set I2C1_EV_IRQHandler,Default_Handler + + .weak I2C1_ER_IRQHandler + .thumb_set I2C1_ER_IRQHandler,Default_Handler + + .weak I2C2_EV_IRQHandler + .thumb_set I2C2_EV_IRQHandler,Default_Handler + + .weak I2C2_ER_IRQHandler + .thumb_set I2C2_ER_IRQHandler,Default_Handler + + .weak SPI1_IRQHandler + .thumb_set SPI1_IRQHandler,Default_Handler + + .weak SPI2_IRQHandler + .thumb_set SPI2_IRQHandler,Default_Handler + + .weak USART1_IRQHandler + .thumb_set USART1_IRQHandler,Default_Handler + + .weak USART2_IRQHandler + .thumb_set USART2_IRQHandler,Default_Handler + + .weak USART3_IRQHandler + .thumb_set USART3_IRQHandler,Default_Handler + + .weak EXTI15_10_IRQHandler + .thumb_set EXTI15_10_IRQHandler,Default_Handler + + .weak RTC_Alarm_IRQHandler + .thumb_set RTC_Alarm_IRQHandler,Default_Handler + + .weak TIM8_BRK_TIM12_IRQHandler + .thumb_set TIM8_BRK_TIM12_IRQHandler,Default_Handler + + .weak TIM8_UP_TIM13_IRQHandler + .thumb_set TIM8_UP_TIM13_IRQHandler,Default_Handler + + .weak TIM8_TRG_COM_TIM14_IRQHandler + .thumb_set TIM8_TRG_COM_TIM14_IRQHandler,Default_Handler + + .weak TIM8_CC_IRQHandler + .thumb_set TIM8_CC_IRQHandler,Default_Handler + + .weak DMA1_Stream7_IRQHandler + .thumb_set DMA1_Stream7_IRQHandler,Default_Handler + + .weak FMC_IRQHandler + .thumb_set FMC_IRQHandler,Default_Handler + + .weak SDMMC1_IRQHandler + .thumb_set SDMMC1_IRQHandler,Default_Handler + + .weak TIM5_IRQHandler + .thumb_set TIM5_IRQHandler,Default_Handler + + .weak SPI3_IRQHandler + .thumb_set SPI3_IRQHandler,Default_Handler + + .weak UART4_IRQHandler + .thumb_set UART4_IRQHandler,Default_Handler + + .weak UART5_IRQHandler + .thumb_set UART5_IRQHandler,Default_Handler + + .weak TIM6_DAC_IRQHandler + .thumb_set TIM6_DAC_IRQHandler,Default_Handler + + .weak TIM7_IRQHandler + .thumb_set TIM7_IRQHandler,Default_Handler + + .weak DMA2_Stream0_IRQHandler + .thumb_set DMA2_Stream0_IRQHandler,Default_Handler + + .weak DMA2_Stream1_IRQHandler + .thumb_set DMA2_Stream1_IRQHandler,Default_Handler + + .weak DMA2_Stream2_IRQHandler + .thumb_set DMA2_Stream2_IRQHandler,Default_Handler + + .weak DMA2_Stream3_IRQHandler + .thumb_set DMA2_Stream3_IRQHandler,Default_Handler + + .weak DMA2_Stream4_IRQHandler + .thumb_set DMA2_Stream4_IRQHandler,Default_Handler + + .weak ETH_IRQHandler + .thumb_set ETH_IRQHandler,Default_Handler + + .weak ETH_WKUP_IRQHandler + .thumb_set ETH_WKUP_IRQHandler,Default_Handler + + .weak FDCAN_CAL_IRQHandler + .thumb_set FDCAN_CAL_IRQHandler,Default_Handler + + .weak DMA2_Stream5_IRQHandler + .thumb_set DMA2_Stream5_IRQHandler,Default_Handler + + .weak DMA2_Stream6_IRQHandler + .thumb_set DMA2_Stream6_IRQHandler,Default_Handler + + .weak DMA2_Stream7_IRQHandler + .thumb_set DMA2_Stream7_IRQHandler,Default_Handler + + .weak USART6_IRQHandler + .thumb_set USART6_IRQHandler,Default_Handler + + .weak I2C3_EV_IRQHandler + .thumb_set I2C3_EV_IRQHandler,Default_Handler + + .weak I2C3_ER_IRQHandler + .thumb_set I2C3_ER_IRQHandler,Default_Handler + + .weak OTG_HS_EP1_OUT_IRQHandler + .thumb_set OTG_HS_EP1_OUT_IRQHandler,Default_Handler + + .weak OTG_HS_EP1_IN_IRQHandler + .thumb_set OTG_HS_EP1_IN_IRQHandler,Default_Handler + + .weak OTG_HS_WKUP_IRQHandler + .thumb_set OTG_HS_WKUP_IRQHandler,Default_Handler + + .weak OTG_HS_IRQHandler + .thumb_set OTG_HS_IRQHandler,Default_Handler + + .weak DCMI_PSSI_IRQHandler + .thumb_set DCMI_PSSI_IRQHandler,Default_Handler + + .weak CRYP_IRQHandler + .thumb_set CRYP_IRQHandler,Default_Handler + + .weak HASH_RNG_IRQHandler + .thumb_set HASH_RNG_IRQHandler,Default_Handler + + .weak FPU_IRQHandler + .thumb_set FPU_IRQHandler,Default_Handler + + .weak UART7_IRQHandler + .thumb_set UART7_IRQHandler,Default_Handler + + .weak UART8_IRQHandler + .thumb_set UART8_IRQHandler,Default_Handler + + .weak SPI4_IRQHandler + .thumb_set SPI4_IRQHandler,Default_Handler + + .weak SPI5_IRQHandler + .thumb_set SPI5_IRQHandler,Default_Handler + + .weak SPI6_IRQHandler + .thumb_set SPI6_IRQHandler,Default_Handler + + .weak SAI1_IRQHandler + .thumb_set SAI1_IRQHandler,Default_Handler + + .weak LTDC_IRQHandler + .thumb_set LTDC_IRQHandler,Default_Handler + + .weak LTDC_ER_IRQHandler + .thumb_set LTDC_ER_IRQHandler,Default_Handler + + .weak DMA2D_IRQHandler + .thumb_set DMA2D_IRQHandler,Default_Handler + + .weak OCTOSPI1_IRQHandler + .thumb_set OCTOSPI1_IRQHandler,Default_Handler + + .weak LPTIM1_IRQHandler + .thumb_set LPTIM1_IRQHandler,Default_Handler + + .weak CEC_IRQHandler + .thumb_set CEC_IRQHandler,Default_Handler + + .weak I2C4_EV_IRQHandler + .thumb_set I2C4_EV_IRQHandler,Default_Handler + + .weak I2C4_ER_IRQHandler + .thumb_set I2C4_ER_IRQHandler,Default_Handler + + .weak SPDIF_RX_IRQHandler + .thumb_set SPDIF_RX_IRQHandler,Default_Handler + + .weak DMAMUX1_OVR_IRQHandler + .thumb_set DMAMUX1_OVR_IRQHandler,Default_Handler + + .weak DFSDM1_FLT0_IRQHandler + .thumb_set DFSDM1_FLT0_IRQHandler,Default_Handler + + .weak DFSDM1_FLT1_IRQHandler + .thumb_set DFSDM1_FLT1_IRQHandler,Default_Handler + + .weak DFSDM1_FLT2_IRQHandler + .thumb_set DFSDM1_FLT2_IRQHandler,Default_Handler + + .weak DFSDM1_FLT3_IRQHandler + .thumb_set DFSDM1_FLT3_IRQHandler,Default_Handler + + .weak SWPMI1_IRQHandler + .thumb_set SWPMI1_IRQHandler,Default_Handler + + .weak TIM15_IRQHandler + .thumb_set TIM15_IRQHandler,Default_Handler + + .weak TIM16_IRQHandler + .thumb_set TIM16_IRQHandler,Default_Handler + + .weak TIM17_IRQHandler + .thumb_set TIM17_IRQHandler,Default_Handler + + .weak MDIOS_WKUP_IRQHandler + .thumb_set MDIOS_WKUP_IRQHandler,Default_Handler + + .weak MDIOS_IRQHandler + .thumb_set MDIOS_IRQHandler,Default_Handler + + .weak MDMA_IRQHandler + .thumb_set MDMA_IRQHandler,Default_Handler + + .weak SDMMC2_IRQHandler + .thumb_set SDMMC2_IRQHandler,Default_Handler + + .weak HSEM1_IRQHandler + .thumb_set HSEM1_IRQHandler,Default_Handler + + .weak ADC3_IRQHandler + .thumb_set ADC3_IRQHandler,Default_Handler + + .weak DMAMUX2_OVR_IRQHandler + .thumb_set DMAMUX2_OVR_IRQHandler,Default_Handler + + .weak BDMA_Channel0_IRQHandler + .thumb_set BDMA_Channel0_IRQHandler,Default_Handler + + .weak BDMA_Channel1_IRQHandler + .thumb_set BDMA_Channel1_IRQHandler,Default_Handler + + .weak BDMA_Channel2_IRQHandler + .thumb_set BDMA_Channel2_IRQHandler,Default_Handler + + .weak BDMA_Channel3_IRQHandler + .thumb_set BDMA_Channel3_IRQHandler,Default_Handler + + .weak BDMA_Channel4_IRQHandler + .thumb_set BDMA_Channel4_IRQHandler,Default_Handler + + .weak BDMA_Channel5_IRQHandler + .thumb_set BDMA_Channel5_IRQHandler,Default_Handler + + .weak BDMA_Channel6_IRQHandler + .thumb_set BDMA_Channel6_IRQHandler,Default_Handler + + .weak BDMA_Channel7_IRQHandler + .thumb_set BDMA_Channel7_IRQHandler,Default_Handler + + .weak COMP1_IRQHandler + .thumb_set COMP1_IRQHandler,Default_Handler + + .weak LPTIM2_IRQHandler + .thumb_set LPTIM2_IRQHandler,Default_Handler + + .weak LPTIM3_IRQHandler + .thumb_set LPTIM3_IRQHandler,Default_Handler + + .weak LPTIM4_IRQHandler + .thumb_set LPTIM4_IRQHandler,Default_Handler + + .weak LPTIM5_IRQHandler + .thumb_set LPTIM5_IRQHandler,Default_Handler + + .weak LPUART1_IRQHandler + .thumb_set LPUART1_IRQHandler,Default_Handler + + .weak CRS_IRQHandler + .thumb_set CRS_IRQHandler,Default_Handler + + .weak ECC_IRQHandler + .thumb_set ECC_IRQHandler,Default_Handler + + .weak SAI4_IRQHandler + .thumb_set SAI4_IRQHandler,Default_Handler + + .weak DTS_IRQHandler + .thumb_set DTS_IRQHandler,Default_Handler + + .weak WAKEUP_PIN_IRQHandler + .thumb_set WAKEUP_PIN_IRQHandler,Default_Handler + + .weak OCTOSPI2_IRQHandler + .thumb_set OCTOSPI2_IRQHandler,Default_Handler + + .weak OTFDEC1_IRQHandler + .thumb_set OTFDEC1_IRQHandler,Default_Handler + + .weak OTFDEC2_IRQHandler + .thumb_set OTFDEC2_IRQHandler,Default_Handler + + .weak FMAC_IRQHandler + .thumb_set FMAC_IRQHandler,Default_Handler + + .weak CORDIC_IRQHandler + .thumb_set CORDIC_IRQHandler,Default_Handler + + .weak UART9_IRQHandler + .thumb_set UART9_IRQHandler,Default_Handler + + .weak USART10_IRQHandler + .thumb_set USART10_IRQHandler,Default_Handler + + .weak I2C5_EV_IRQHandler + .thumb_set I2C5_EV_IRQHandler,Default_Handler + + .weak I2C5_ER_IRQHandler + .thumb_set I2C5_ER_IRQHandler,Default_Handler + + .weak FDCAN3_IT0_IRQHandler + .thumb_set FDCAN3_IT0_IRQHandler,Default_Handler + + .weak FDCAN3_IT1_IRQHandler + .thumb_set FDCAN3_IT1_IRQHandler,Default_Handler + + .weak TIM23_IRQHandler + .thumb_set TIM23_IRQHandler,Default_Handler + + .weak TIM24_IRQHandler + .thumb_set TIM24_IRQHandler,Default_Handler + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ + diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h735xx.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h735xx.s new file mode 100644 index 0000000..0cd6da3 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h735xx.s @@ -0,0 +1,765 @@ +/** + ****************************************************************************** + * @file startup_stm32h735xx.s + * @author MCD Application Team + * @brief STM32H735xx Devices vector table for GCC based toolchain. + * This module performs: + * - Set the initial SP + * - Set the initial PC == Reset_Handler, + * - Set the vector table entries with the exceptions ISR address + * - Branches to main in the C library (which eventually + * calls main()). + * After Reset the Cortex-M processor is in Thread mode, + * priority is Privileged, and the Stack is set to Main. + ****************************************************************************** + * @attention + * + *

                  © Copyright (c) 2019 STMicroelectronics. + * All rights reserved.

                  + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + + .syntax unified + .cpu cortex-m7 + .fpu softvfp + .thumb + +.global g_pfnVectors +.global Default_Handler + +/* start address for the initialization values of the .data section. +defined in linker script */ +.word _sidata +/* start address for the .data section. defined in linker script */ +.word _sdata +/* end address for the .data section. defined in linker script */ +.word _edata +/* start address for the .bss section. defined in linker script */ +.word _sbss +/* end address for the .bss section. defined in linker script */ +.word _ebss +/* stack used for SystemInit_ExtMemCtl; always internal RAM used */ + +/** + * @brief This is the code that gets called when the processor first + * starts execution following a reset event. Only the absolutely + * necessary set is performed, after which the application + * supplied main() routine is called. + * @param None + * @retval : None +*/ + + .section .text.Reset_Handler + .weak Reset_Handler + .type Reset_Handler, %function +Reset_Handler: + ldr sp, =_estack /* set stack pointer */ + +/* Call the clock system intitialization function.*/ + bl SystemInit + +/* Copy the data segment initializers from flash to SRAM */ + movs r1, #0 + b LoopCopyDataInit + +CopyDataInit: + ldr r3, =_sidata + ldr r3, [r3, r1] + str r3, [r0, r1] + adds r1, r1, #4 + +LoopCopyDataInit: + ldr r0, =_sdata + ldr r3, =_edata + adds r2, r0, r1 + cmp r2, r3 + bcc CopyDataInit + ldr r2, =_sbss + b LoopFillZerobss +/* Zero fill the bss segment. */ +FillZerobss: + movs r3, #0 + str r3, [r2], #4 + +LoopFillZerobss: + ldr r3, = _ebss + cmp r2, r3 + bcc FillZerobss + +/* Call static constructors */ + bl __libc_init_array +/* Call the application's entry point.*/ + bl main + bx lr +.size Reset_Handler, .-Reset_Handler + +/** + * @brief This is the code that gets called when the processor receives an + * unexpected interrupt. This simply enters an infinite loop, preserving + * the system state for examination by a debugger. + * @param None + * @retval None +*/ + .section .text.Default_Handler,"ax",%progbits +Default_Handler: +Infinite_Loop: + b Infinite_Loop + .size Default_Handler, .-Default_Handler +/****************************************************************************** +* +* The minimal vector table for a Cortex M. Note that the proper constructs +* must be placed on this to ensure that it ends up at physical address +* 0x0000.0000. +* +*******************************************************************************/ + .section .isr_vector,"a",%progbits + .type g_pfnVectors, %object + .size g_pfnVectors, .-g_pfnVectors + + +g_pfnVectors: + .word _estack + .word Reset_Handler + + .word NMI_Handler + .word HardFault_Handler + .word MemManage_Handler + .word BusFault_Handler + .word UsageFault_Handler + .word 0 + .word 0 + .word 0 + .word 0 + .word SVC_Handler + .word DebugMon_Handler + .word 0 + .word PendSV_Handler + .word SysTick_Handler + + /* External Interrupts */ + .word WWDG_IRQHandler /* Window WatchDog */ + .word PVD_AVD_IRQHandler /* PVD/AVD through EXTI Line detection */ + .word TAMP_STAMP_IRQHandler /* Tamper and TimeStamps through the EXTI line */ + .word RTC_WKUP_IRQHandler /* RTC Wakeup through the EXTI line */ + .word FLASH_IRQHandler /* FLASH */ + .word RCC_IRQHandler /* RCC */ + .word EXTI0_IRQHandler /* EXTI Line0 */ + .word EXTI1_IRQHandler /* EXTI Line1 */ + .word EXTI2_IRQHandler /* EXTI Line2 */ + .word EXTI3_IRQHandler /* EXTI Line3 */ + .word EXTI4_IRQHandler /* EXTI Line4 */ + .word DMA1_Stream0_IRQHandler /* DMA1 Stream 0 */ + .word DMA1_Stream1_IRQHandler /* DMA1 Stream 1 */ + .word DMA1_Stream2_IRQHandler /* DMA1 Stream 2 */ + .word DMA1_Stream3_IRQHandler /* DMA1 Stream 3 */ + .word DMA1_Stream4_IRQHandler /* DMA1 Stream 4 */ + .word DMA1_Stream5_IRQHandler /* DMA1 Stream 5 */ + .word DMA1_Stream6_IRQHandler /* DMA1 Stream 6 */ + .word ADC_IRQHandler /* ADC1, ADC2 and ADC3s */ + .word FDCAN1_IT0_IRQHandler /* FDCAN1 interrupt line 0 */ + .word FDCAN2_IT0_IRQHandler /* FDCAN2 interrupt line 0 */ + .word FDCAN1_IT1_IRQHandler /* FDCAN1 interrupt line 1 */ + .word FDCAN2_IT1_IRQHandler /* FDCAN2 interrupt line 1 */ + .word EXTI9_5_IRQHandler /* External Line[9:5]s */ + .word TIM1_BRK_IRQHandler /* TIM1 Break interrupt */ + .word TIM1_UP_IRQHandler /* TIM1 Update interrupt */ + .word TIM1_TRG_COM_IRQHandler /* TIM1 Trigger and Commutation interrupt */ + .word TIM1_CC_IRQHandler /* TIM1 Capture Compare */ + .word TIM2_IRQHandler /* TIM2 */ + .word TIM3_IRQHandler /* TIM3 */ + .word TIM4_IRQHandler /* TIM4 */ + .word I2C1_EV_IRQHandler /* I2C1 Event */ + .word I2C1_ER_IRQHandler /* I2C1 Error */ + .word I2C2_EV_IRQHandler /* I2C2 Event */ + .word I2C2_ER_IRQHandler /* I2C2 Error */ + .word SPI1_IRQHandler /* SPI1 */ + .word SPI2_IRQHandler /* SPI2 */ + .word USART1_IRQHandler /* USART1 */ + .word USART2_IRQHandler /* USART2 */ + .word USART3_IRQHandler /* USART3 */ + .word EXTI15_10_IRQHandler /* External Line[15:10]s */ + .word RTC_Alarm_IRQHandler /* RTC Alarm (A and B) through EXTI Line */ + .word 0 /* Reserved */ + .word TIM8_BRK_TIM12_IRQHandler /* TIM8 Break and TIM12 */ + .word TIM8_UP_TIM13_IRQHandler /* TIM8 Update and TIM13 */ + .word TIM8_TRG_COM_TIM14_IRQHandler /* TIM8 Trigger and Commutation and TIM14 */ + .word TIM8_CC_IRQHandler /* TIM8 Capture Compare */ + .word DMA1_Stream7_IRQHandler /* DMA1 Stream7 */ + .word FMC_IRQHandler /* FMC */ + .word SDMMC1_IRQHandler /* SDMMC1 */ + .word TIM5_IRQHandler /* TIM5 */ + .word SPI3_IRQHandler /* SPI3 */ + .word UART4_IRQHandler /* UART4 */ + .word UART5_IRQHandler /* UART5 */ + .word TIM6_DAC_IRQHandler /* TIM6 and DAC1&2 underrun errors */ + .word TIM7_IRQHandler /* TIM7 */ + .word DMA2_Stream0_IRQHandler /* DMA2 Stream 0 */ + .word DMA2_Stream1_IRQHandler /* DMA2 Stream 1 */ + .word DMA2_Stream2_IRQHandler /* DMA2 Stream 2 */ + .word DMA2_Stream3_IRQHandler /* DMA2 Stream 3 */ + .word DMA2_Stream4_IRQHandler /* DMA2 Stream 4 */ + .word ETH_IRQHandler /* Ethernet */ + .word ETH_WKUP_IRQHandler /* Ethernet Wakeup through EXTI line */ + .word FDCAN_CAL_IRQHandler /* FDCAN calibration unit interrupt*/ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word DMA2_Stream5_IRQHandler /* DMA2 Stream 5 */ + .word DMA2_Stream6_IRQHandler /* DMA2 Stream 6 */ + .word DMA2_Stream7_IRQHandler /* DMA2 Stream 7 */ + .word USART6_IRQHandler /* USART6 */ + .word I2C3_EV_IRQHandler /* I2C3 event */ + .word I2C3_ER_IRQHandler /* I2C3 error */ + .word OTG_HS_EP1_OUT_IRQHandler /* USB OTG HS End Point 1 Out */ + .word OTG_HS_EP1_IN_IRQHandler /* USB OTG HS End Point 1 In */ + .word OTG_HS_WKUP_IRQHandler /* USB OTG HS Wakeup through EXTI */ + .word OTG_HS_IRQHandler /* USB OTG HS */ + .word DCMI_PSSI_IRQHandler /* DCMI, PSSI */ + .word CRYP_IRQHandler /* CRYP */ + .word HASH_RNG_IRQHandler /* Hash and Rng */ + .word FPU_IRQHandler /* FPU */ + .word UART7_IRQHandler /* UART7 */ + .word UART8_IRQHandler /* UART8 */ + .word SPI4_IRQHandler /* SPI4 */ + .word SPI5_IRQHandler /* SPI5 */ + .word SPI6_IRQHandler /* SPI6 */ + .word SAI1_IRQHandler /* SAI1 */ + .word LTDC_IRQHandler /* LTDC */ + .word LTDC_ER_IRQHandler /* LTDC error */ + .word DMA2D_IRQHandler /* DMA2D */ + .word 0 /* Reserved */ + .word OCTOSPI1_IRQHandler /* OCTOSPI1 */ + .word LPTIM1_IRQHandler /* LPTIM1 */ + .word CEC_IRQHandler /* HDMI_CEC */ + .word I2C4_EV_IRQHandler /* I2C4 Event */ + .word I2C4_ER_IRQHandler /* I2C4 Error */ + .word SPDIF_RX_IRQHandler /* SPDIF_RX */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word DMAMUX1_OVR_IRQHandler /* DMAMUX1 Overrun interrupt */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word 0 /* Reserved */ + .word DFSDM1_FLT0_IRQHandler /* DFSDM Filter0 Interrupt */ + .word DFSDM1_FLT1_IRQHandler /* DFSDM Filter1 Interrupt */ + .word DFSDM1_FLT2_IRQHandler /* DFSDM Filter2 Interrupt */ + .word DFSDM1_FLT3_IRQHandler /* DFSDM Filter3 Interrupt */ + .word 0 /* Reserved */ + .word SWPMI1_IRQHandler /* Serial Wire Interface 1 global interrupt */ + .word TIM15_IRQHandler /* TIM15 global Interrupt */ + .word TIM16_IRQHandler /* TIM16 global Interrupt */ + .word TIM17_IRQHandler /* TIM17 global Interrupt */ + .word MDIOS_WKUP_IRQHandler /* MDIOS Wakeup Interrupt */ + .word MDIOS_IRQHandler /* MDIOS global Interrupt */ + .word 0 /* Reserved */ + .word MDMA_IRQHandler /* MDMA global Interrupt */ + .word 0 /* Reserved */ + .word SDMMC2_IRQHandler /* SDMMC2 global Interrupt */ + .word HSEM1_IRQHandler /* HSEM1 global Interrupt */ + .word 0 /* Reserved */ + .word ADC3_IRQHandler /* ADC3 global Interrupt */ + .word DMAMUX2_OVR_IRQHandler /* DMAMUX Overrun interrupt */ + .word BDMA_Channel0_IRQHandler /* BDMA Channel 0 global Interrupt */ + .word BDMA_Channel1_IRQHandler /* BDMA Channel 1 global Interrupt */ + .word BDMA_Channel2_IRQHandler /* BDMA Channel 2 global Interrupt */ + .word BDMA_Channel3_IRQHandler /* BDMA Channel 3 global Interrupt */ + .word BDMA_Channel4_IRQHandler /* BDMA Channel 4 global Interrupt */ + .word BDMA_Channel5_IRQHandler /* BDMA Channel 5 global Interrupt */ + .word BDMA_Channel6_IRQHandler /* BDMA Channel 6 global Interrupt */ + .word BDMA_Channel7_IRQHandler /* BDMA Channel 7 global Interrupt */ + .word COMP1_IRQHandler /* COMP1 global Interrupt */ + .word LPTIM2_IRQHandler /* LP TIM2 global interrupt */ + .word LPTIM3_IRQHandler /* LP TIM3 global interrupt */ + .word LPTIM4_IRQHandler /* LP TIM4 global interrupt */ + .word LPTIM5_IRQHandler /* LP TIM5 global interrupt */ + .word LPUART1_IRQHandler /* LP UART1 interrupt */ + .word 0 /* Reserved */ + .word CRS_IRQHandler /* Clock Recovery Global Interrupt */ + .word ECC_IRQHandler /* ECC diagnostic Global Interrupt */ + .word SAI4_IRQHandler /* SAI4 global interrupt */ + .word DTS_IRQHandler /* Digital Temperature Sensor interrupt */ + .word 0 /* Reserved */ + .word WAKEUP_PIN_IRQHandler /* Interrupt for all 6 wake-up pins */ + .word OCTOSPI2_IRQHandler /* OCTOSPI2 Interrupt */ + .word OTFDEC1_IRQHandler /* OTFDEC1 Interrupt */ + .word OTFDEC2_IRQHandler /* OTFDEC2 Interrupt */ + .word FMAC_IRQHandler /* FMAC Interrupt */ + .word CORDIC_IRQHandler /* CORDIC Interrupt */ + .word UART9_IRQHandler /* UART9 Interrupt */ + .word USART10_IRQHandler /* UART10 Interrupt */ + .word I2C5_EV_IRQHandler /* I2C5 Event Interrupt */ + .word I2C5_ER_IRQHandler /* I2C5 Error Interrupt */ + .word FDCAN3_IT0_IRQHandler /* FDCAN3 interrupt line 0 */ + .word FDCAN3_IT1_IRQHandler /* FDCAN3 interrupt line 1 */ + .word TIM23_IRQHandler /* TIM23 global interrupt */ + .word TIM24_IRQHandler /* TIM24 global interrupt */ + +/******************************************************************************* +* +* Provide weak aliases for each Exception handler to the Default_Handler. +* As they are weak aliases, any function with the same name will override +* this definition. +* +*******************************************************************************/ + .weak NMI_Handler + .thumb_set NMI_Handler,Default_Handler + + .weak HardFault_Handler + .thumb_set HardFault_Handler,Default_Handler + + .weak MemManage_Handler + .thumb_set MemManage_Handler,Default_Handler + + .weak BusFault_Handler + .thumb_set BusFault_Handler,Default_Handler + + .weak UsageFault_Handler + .thumb_set UsageFault_Handler,Default_Handler + + .weak SVC_Handler + .thumb_set SVC_Handler,Default_Handler + + .weak DebugMon_Handler + .thumb_set DebugMon_Handler,Default_Handler + + .weak PendSV_Handler + .thumb_set PendSV_Handler,Default_Handler + + .weak SysTick_Handler + .thumb_set SysTick_Handler,Default_Handler + + .weak WWDG_IRQHandler + .thumb_set WWDG_IRQHandler,Default_Handler + + .weak PVD_AVD_IRQHandler + .thumb_set PVD_AVD_IRQHandler,Default_Handler + + .weak TAMP_STAMP_IRQHandler + .thumb_set TAMP_STAMP_IRQHandler,Default_Handler + + .weak RTC_WKUP_IRQHandler + .thumb_set RTC_WKUP_IRQHandler,Default_Handler + + .weak FLASH_IRQHandler + .thumb_set FLASH_IRQHandler,Default_Handler + + .weak RCC_IRQHandler + .thumb_set RCC_IRQHandler,Default_Handler + + .weak EXTI0_IRQHandler + .thumb_set EXTI0_IRQHandler,Default_Handler + + .weak EXTI1_IRQHandler + .thumb_set EXTI1_IRQHandler,Default_Handler + + .weak EXTI2_IRQHandler + .thumb_set EXTI2_IRQHandler,Default_Handler + + .weak EXTI3_IRQHandler + .thumb_set EXTI3_IRQHandler,Default_Handler + + .weak EXTI4_IRQHandler + .thumb_set EXTI4_IRQHandler,Default_Handler + + .weak DMA1_Stream0_IRQHandler + .thumb_set DMA1_Stream0_IRQHandler,Default_Handler + + .weak DMA1_Stream1_IRQHandler + .thumb_set DMA1_Stream1_IRQHandler,Default_Handler + + .weak DMA1_Stream2_IRQHandler + .thumb_set DMA1_Stream2_IRQHandler,Default_Handler + + .weak DMA1_Stream3_IRQHandler + .thumb_set DMA1_Stream3_IRQHandler,Default_Handler + + .weak DMA1_Stream4_IRQHandler + .thumb_set DMA1_Stream4_IRQHandler,Default_Handler + + .weak DMA1_Stream5_IRQHandler + .thumb_set DMA1_Stream5_IRQHandler,Default_Handler + + .weak DMA1_Stream6_IRQHandler + .thumb_set DMA1_Stream6_IRQHandler,Default_Handler + + .weak ADC_IRQHandler + .thumb_set ADC_IRQHandler,Default_Handler + + .weak FDCAN1_IT0_IRQHandler + .thumb_set FDCAN1_IT0_IRQHandler,Default_Handler + + .weak FDCAN2_IT0_IRQHandler + .thumb_set FDCAN2_IT0_IRQHandler,Default_Handler + + .weak FDCAN1_IT1_IRQHandler + .thumb_set FDCAN1_IT1_IRQHandler,Default_Handler + + .weak FDCAN2_IT1_IRQHandler + .thumb_set FDCAN2_IT1_IRQHandler,Default_Handler + + .weak EXTI9_5_IRQHandler + .thumb_set EXTI9_5_IRQHandler,Default_Handler + + .weak TIM1_BRK_IRQHandler + .thumb_set TIM1_BRK_IRQHandler,Default_Handler + + .weak TIM1_UP_IRQHandler + .thumb_set TIM1_UP_IRQHandler,Default_Handler + + .weak TIM1_TRG_COM_IRQHandler + .thumb_set TIM1_TRG_COM_IRQHandler,Default_Handler + + .weak TIM1_CC_IRQHandler + .thumb_set TIM1_CC_IRQHandler,Default_Handler + + .weak TIM2_IRQHandler + .thumb_set TIM2_IRQHandler,Default_Handler + + .weak TIM3_IRQHandler + .thumb_set TIM3_IRQHandler,Default_Handler + + .weak TIM4_IRQHandler + .thumb_set TIM4_IRQHandler,Default_Handler + + .weak I2C1_EV_IRQHandler + .thumb_set I2C1_EV_IRQHandler,Default_Handler + + .weak I2C1_ER_IRQHandler + .thumb_set I2C1_ER_IRQHandler,Default_Handler + + .weak I2C2_EV_IRQHandler + .thumb_set I2C2_EV_IRQHandler,Default_Handler + + .weak I2C2_ER_IRQHandler + .thumb_set I2C2_ER_IRQHandler,Default_Handler + + .weak SPI1_IRQHandler + .thumb_set SPI1_IRQHandler,Default_Handler + + .weak SPI2_IRQHandler + .thumb_set SPI2_IRQHandler,Default_Handler + + .weak USART1_IRQHandler + .thumb_set USART1_IRQHandler,Default_Handler + + .weak USART2_IRQHandler + .thumb_set USART2_IRQHandler,Default_Handler + + .weak USART3_IRQHandler + .thumb_set USART3_IRQHandler,Default_Handler + + .weak EXTI15_10_IRQHandler + .thumb_set EXTI15_10_IRQHandler,Default_Handler + + .weak RTC_Alarm_IRQHandler + .thumb_set RTC_Alarm_IRQHandler,Default_Handler + + .weak TIM8_BRK_TIM12_IRQHandler + .thumb_set TIM8_BRK_TIM12_IRQHandler,Default_Handler + + .weak TIM8_UP_TIM13_IRQHandler + .thumb_set TIM8_UP_TIM13_IRQHandler,Default_Handler + + .weak TIM8_TRG_COM_TIM14_IRQHandler + .thumb_set TIM8_TRG_COM_TIM14_IRQHandler,Default_Handler + + .weak TIM8_CC_IRQHandler + .thumb_set TIM8_CC_IRQHandler,Default_Handler + + .weak DMA1_Stream7_IRQHandler + .thumb_set DMA1_Stream7_IRQHandler,Default_Handler + + .weak FMC_IRQHandler + .thumb_set FMC_IRQHandler,Default_Handler + + .weak SDMMC1_IRQHandler + .thumb_set SDMMC1_IRQHandler,Default_Handler + + .weak TIM5_IRQHandler + .thumb_set TIM5_IRQHandler,Default_Handler + + .weak SPI3_IRQHandler + .thumb_set SPI3_IRQHandler,Default_Handler + + .weak UART4_IRQHandler + .thumb_set UART4_IRQHandler,Default_Handler + + .weak UART5_IRQHandler + .thumb_set UART5_IRQHandler,Default_Handler + + .weak TIM6_DAC_IRQHandler + .thumb_set TIM6_DAC_IRQHandler,Default_Handler + + .weak TIM7_IRQHandler + .thumb_set TIM7_IRQHandler,Default_Handler + + .weak DMA2_Stream0_IRQHandler + .thumb_set DMA2_Stream0_IRQHandler,Default_Handler + + .weak DMA2_Stream1_IRQHandler + .thumb_set DMA2_Stream1_IRQHandler,Default_Handler + + .weak DMA2_Stream2_IRQHandler + .thumb_set DMA2_Stream2_IRQHandler,Default_Handler + + .weak DMA2_Stream3_IRQHandler + .thumb_set DMA2_Stream3_IRQHandler,Default_Handler + + .weak DMA2_Stream4_IRQHandler + .thumb_set DMA2_Stream4_IRQHandler,Default_Handler + + .weak ETH_IRQHandler + .thumb_set ETH_IRQHandler,Default_Handler + + .weak ETH_WKUP_IRQHandler + .thumb_set ETH_WKUP_IRQHandler,Default_Handler + + .weak FDCAN_CAL_IRQHandler + .thumb_set FDCAN_CAL_IRQHandler,Default_Handler + + .weak DMA2_Stream5_IRQHandler + .thumb_set DMA2_Stream5_IRQHandler,Default_Handler + + .weak DMA2_Stream6_IRQHandler + .thumb_set DMA2_Stream6_IRQHandler,Default_Handler + + .weak DMA2_Stream7_IRQHandler + .thumb_set DMA2_Stream7_IRQHandler,Default_Handler + + .weak USART6_IRQHandler + .thumb_set USART6_IRQHandler,Default_Handler + + .weak I2C3_EV_IRQHandler + .thumb_set I2C3_EV_IRQHandler,Default_Handler + + .weak I2C3_ER_IRQHandler + .thumb_set I2C3_ER_IRQHandler,Default_Handler + + .weak OTG_HS_EP1_OUT_IRQHandler + .thumb_set OTG_HS_EP1_OUT_IRQHandler,Default_Handler + + .weak OTG_HS_EP1_IN_IRQHandler + .thumb_set OTG_HS_EP1_IN_IRQHandler,Default_Handler + + .weak OTG_HS_WKUP_IRQHandler + .thumb_set OTG_HS_WKUP_IRQHandler,Default_Handler + + .weak OTG_HS_IRQHandler + .thumb_set OTG_HS_IRQHandler,Default_Handler + + .weak DCMI_PSSI_IRQHandler + .thumb_set DCMI_PSSI_IRQHandler,Default_Handler + + .weak CRYP_IRQHandler + .thumb_set CRYP_IRQHandler,Default_Handler + + .weak HASH_RNG_IRQHandler + .thumb_set HASH_RNG_IRQHandler,Default_Handler + + .weak FPU_IRQHandler + .thumb_set FPU_IRQHandler,Default_Handler + + .weak UART7_IRQHandler + .thumb_set UART7_IRQHandler,Default_Handler + + .weak UART8_IRQHandler + .thumb_set UART8_IRQHandler,Default_Handler + + .weak SPI4_IRQHandler + .thumb_set SPI4_IRQHandler,Default_Handler + + .weak SPI5_IRQHandler + .thumb_set SPI5_IRQHandler,Default_Handler + + .weak SPI6_IRQHandler + .thumb_set SPI6_IRQHandler,Default_Handler + + .weak SAI1_IRQHandler + .thumb_set SAI1_IRQHandler,Default_Handler + + .weak LTDC_IRQHandler + .thumb_set LTDC_IRQHandler,Default_Handler + + .weak LTDC_ER_IRQHandler + .thumb_set LTDC_ER_IRQHandler,Default_Handler + + .weak DMA2D_IRQHandler + .thumb_set DMA2D_IRQHandler,Default_Handler + + .weak OCTOSPI1_IRQHandler + .thumb_set OCTOSPI1_IRQHandler,Default_Handler + + .weak LPTIM1_IRQHandler + .thumb_set LPTIM1_IRQHandler,Default_Handler + + .weak CEC_IRQHandler + .thumb_set CEC_IRQHandler,Default_Handler + + .weak I2C4_EV_IRQHandler + .thumb_set I2C4_EV_IRQHandler,Default_Handler + + .weak I2C4_ER_IRQHandler + .thumb_set I2C4_ER_IRQHandler,Default_Handler + + .weak SPDIF_RX_IRQHandler + .thumb_set SPDIF_RX_IRQHandler,Default_Handler + + .weak DMAMUX1_OVR_IRQHandler + .thumb_set DMAMUX1_OVR_IRQHandler,Default_Handler + + .weak DFSDM1_FLT0_IRQHandler + .thumb_set DFSDM1_FLT0_IRQHandler,Default_Handler + + .weak DFSDM1_FLT1_IRQHandler + .thumb_set DFSDM1_FLT1_IRQHandler,Default_Handler + + .weak DFSDM1_FLT2_IRQHandler + .thumb_set DFSDM1_FLT2_IRQHandler,Default_Handler + + .weak DFSDM1_FLT3_IRQHandler + .thumb_set DFSDM1_FLT3_IRQHandler,Default_Handler + + .weak SWPMI1_IRQHandler + .thumb_set SWPMI1_IRQHandler,Default_Handler + + .weak TIM15_IRQHandler + .thumb_set TIM15_IRQHandler,Default_Handler + + .weak TIM16_IRQHandler + .thumb_set TIM16_IRQHandler,Default_Handler + + .weak TIM17_IRQHandler + .thumb_set TIM17_IRQHandler,Default_Handler + + .weak MDIOS_WKUP_IRQHandler + .thumb_set MDIOS_WKUP_IRQHandler,Default_Handler + + .weak MDIOS_IRQHandler + .thumb_set MDIOS_IRQHandler,Default_Handler + + .weak MDMA_IRQHandler + .thumb_set MDMA_IRQHandler,Default_Handler + + .weak SDMMC2_IRQHandler + .thumb_set SDMMC2_IRQHandler,Default_Handler + + .weak HSEM1_IRQHandler + .thumb_set HSEM1_IRQHandler,Default_Handler + + .weak ADC3_IRQHandler + .thumb_set ADC3_IRQHandler,Default_Handler + + .weak DMAMUX2_OVR_IRQHandler + .thumb_set DMAMUX2_OVR_IRQHandler,Default_Handler + + .weak BDMA_Channel0_IRQHandler + .thumb_set BDMA_Channel0_IRQHandler,Default_Handler + + .weak BDMA_Channel1_IRQHandler + .thumb_set BDMA_Channel1_IRQHandler,Default_Handler + + .weak BDMA_Channel2_IRQHandler + .thumb_set BDMA_Channel2_IRQHandler,Default_Handler + + .weak BDMA_Channel3_IRQHandler + .thumb_set BDMA_Channel3_IRQHandler,Default_Handler + + .weak BDMA_Channel4_IRQHandler + .thumb_set BDMA_Channel4_IRQHandler,Default_Handler + + .weak BDMA_Channel5_IRQHandler + .thumb_set BDMA_Channel5_IRQHandler,Default_Handler + + .weak BDMA_Channel6_IRQHandler + .thumb_set BDMA_Channel6_IRQHandler,Default_Handler + + .weak BDMA_Channel7_IRQHandler + .thumb_set BDMA_Channel7_IRQHandler,Default_Handler + + .weak COMP1_IRQHandler + .thumb_set COMP1_IRQHandler,Default_Handler + + .weak LPTIM2_IRQHandler + .thumb_set LPTIM2_IRQHandler,Default_Handler + + .weak LPTIM3_IRQHandler + .thumb_set LPTIM3_IRQHandler,Default_Handler + + .weak LPTIM4_IRQHandler + .thumb_set LPTIM4_IRQHandler,Default_Handler + + .weak LPTIM5_IRQHandler + .thumb_set LPTIM5_IRQHandler,Default_Handler + + .weak LPUART1_IRQHandler + .thumb_set LPUART1_IRQHandler,Default_Handler + + .weak CRS_IRQHandler + .thumb_set CRS_IRQHandler,Default_Handler + + .weak ECC_IRQHandler + .thumb_set ECC_IRQHandler,Default_Handler + + .weak SAI4_IRQHandler + .thumb_set SAI4_IRQHandler,Default_Handler + + .weak DTS_IRQHandler + .thumb_set DTS_IRQHandler,Default_Handler + + .weak WAKEUP_PIN_IRQHandler + .thumb_set WAKEUP_PIN_IRQHandler,Default_Handler + + .weak OCTOSPI2_IRQHandler + .thumb_set OCTOSPI2_IRQHandler,Default_Handler + + .weak OTFDEC1_IRQHandler + .thumb_set OTFDEC1_IRQHandler,Default_Handler + + .weak OTFDEC2_IRQHandler + .thumb_set OTFDEC2_IRQHandler,Default_Handler + + .weak FMAC_IRQHandler + .thumb_set FMAC_IRQHandler,Default_Handler + + .weak CORDIC_IRQHandler + .thumb_set CORDIC_IRQHandler,Default_Handler + + .weak UART9_IRQHandler + .thumb_set UART9_IRQHandler,Default_Handler + + .weak USART10_IRQHandler + .thumb_set USART10_IRQHandler,Default_Handler + + .weak I2C5_EV_IRQHandler + .thumb_set I2C5_EV_IRQHandler,Default_Handler + + .weak I2C5_ER_IRQHandler + .thumb_set I2C5_ER_IRQHandler,Default_Handler + + .weak FDCAN3_IT0_IRQHandler + .thumb_set FDCAN3_IT0_IRQHandler,Default_Handler + + .weak FDCAN3_IT1_IRQHandler + .thumb_set FDCAN3_IT1_IRQHandler,Default_Handler + + .weak TIM23_IRQHandler + .thumb_set TIM23_IRQHandler,Default_Handler + + .weak TIM24_IRQHandler + .thumb_set TIM24_IRQHandler,Default_Handler + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ + diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h742xx.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h742xx.s index d0bfa82..49a4165 100644 --- a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h742xx.s +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h742xx.s @@ -61,6 +61,9 @@ defined in linker script */ Reset_Handler: ldr sp, =_estack /* set stack pointer */ +/* Call the clock system intitialization function.*/ + bl SystemInit + /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 b LoopCopyDataInit @@ -89,8 +92,6 @@ LoopFillZerobss: cmp r2, r3 bcc FillZerobss -/* Call the clock system intitialization function.*/ - bl SystemInit /* Call static constructors */ bl __libc_init_array /* Call the application's entry point.*/ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h743xx.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h743xx.s index 5725d78..2b1034a 100755 --- a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h743xx.s +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h743xx.s @@ -61,6 +61,9 @@ defined in linker script */ Reset_Handler: ldr sp, =_estack /* set stack pointer */ +/* Call the clock system intitialization function.*/ + bl SystemInit + /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 b LoopCopyDataInit @@ -89,8 +92,6 @@ LoopFillZerobss: cmp r2, r3 bcc FillZerobss -/* Call the clock system intitialization function.*/ - bl SystemInit /* Call static constructors */ bl __libc_init_array /* Call the application's entry point.*/ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h745xx.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h745xx.s index 2189a87..78409d8 100644 --- a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h745xx.s +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h745xx.s @@ -61,6 +61,9 @@ defined in linker script */ Reset_Handler: ldr sp, =_estack /* set stack pointer */ +/* Call the clock system intitialization function.*/ + bl SystemInit + /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 b LoopCopyDataInit @@ -88,9 +91,7 @@ LoopFillZerobss: ldr r3, = _ebss cmp r2, r3 bcc FillZerobss - -/* Call the clock system intitialization function.*/ - bl SystemInit + /* Call static constructors */ bl __libc_init_array /* Call the application's entry point.*/ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h747xx.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h747xx.s index ee72a95..39cc45d 100644 --- a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h747xx.s +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h747xx.s @@ -61,6 +61,9 @@ defined in linker script */ Reset_Handler: ldr sp, =_estack /* set stack pointer */ +/* Call the clock system intitialization function.*/ + bl SystemInit + /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 b LoopCopyDataInit @@ -89,8 +92,6 @@ LoopFillZerobss: cmp r2, r3 bcc FillZerobss -/* Call the clock system intitialization function.*/ - bl SystemInit /* Call static constructors */ bl __libc_init_array /* Call the application's entry point.*/ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h750xx.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h750xx.s index eee67da..fae2960 100755 --- a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h750xx.s +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h750xx.s @@ -61,6 +61,9 @@ defined in linker script */ Reset_Handler: ldr sp, =_estack /* set stack pointer */ +/* Call the clock system intitialization function.*/ + bl SystemInit + /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 b LoopCopyDataInit @@ -89,8 +92,6 @@ LoopFillZerobss: cmp r2, r3 bcc FillZerobss -/* Call the clock system intitialization function.*/ - bl SystemInit /* Call static constructors */ bl __libc_init_array /* Call the application's entry point.*/ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h753xx.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h753xx.s index 75c9cae..ac5bf65 100755 --- a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h753xx.s +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h753xx.s @@ -61,6 +61,9 @@ defined in linker script */ Reset_Handler: ldr sp, =_estack /* set stack pointer */ +/* Call the clock system intitialization function.*/ + bl SystemInit + /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 b LoopCopyDataInit @@ -89,8 +92,6 @@ LoopFillZerobss: cmp r2, r3 bcc FillZerobss -/* Call the clock system intitialization function.*/ - bl SystemInit /* Call static constructors */ bl __libc_init_array /* Call the application's entry point.*/ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h755xx.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h755xx.s index 700f80e..1f3e8c7 100644 --- a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h755xx.s +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h755xx.s @@ -61,6 +61,9 @@ defined in linker script */ Reset_Handler: ldr sp, =_estack /* set stack pointer */ +/* Call the clock system intitialization function.*/ + bl SystemInit + /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 b LoopCopyDataInit @@ -89,8 +92,6 @@ LoopFillZerobss: cmp r2, r3 bcc FillZerobss -/* Call the clock system intitialization function.*/ - bl SystemInit /* Call static constructors */ bl __libc_init_array /* Call the application's entry point.*/ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h757xx.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h757xx.s index b0b690c..8af9472 100644 --- a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h757xx.s +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h757xx.s @@ -61,6 +61,9 @@ defined in linker script */ Reset_Handler: ldr sp, =_estack /* set stack pointer */ +/* Call the clock system intitialization function.*/ + bl SystemInit + /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 b LoopCopyDataInit @@ -89,8 +92,6 @@ LoopFillZerobss: cmp r2, r3 bcc FillZerobss -/* Call the clock system intitialization function.*/ - bl SystemInit /* Call static constructors */ bl __libc_init_array /* Call the application's entry point.*/ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h7a3xx.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h7a3xx.s index c121dde..815f6de 100644 --- a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h7a3xx.s +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h7a3xx.s @@ -61,6 +61,9 @@ defined in linker script */ Reset_Handler: ldr sp, =_estack /* set stack pointer */ +/* Call the clock system intitialization function.*/ + bl SystemInit + /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 b LoopCopyDataInit @@ -89,8 +92,6 @@ LoopFillZerobss: cmp r2, r3 bcc FillZerobss -/* Call the clock system intitialization function.*/ - bl SystemInit /* Call static constructors */ bl __libc_init_array /* Call the application's entry point.*/ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h7a3xxq.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h7a3xxq.s index 5b8de8a..ce2c99d 100644 --- a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h7a3xxq.s +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h7a3xxq.s @@ -61,6 +61,9 @@ defined in linker script */ Reset_Handler: ldr sp, =_estack /* set stack pointer */ +/* Call the clock system intitialization function.*/ + bl SystemInit + /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 b LoopCopyDataInit @@ -88,9 +91,7 @@ LoopFillZerobss: ldr r3, = _ebss cmp r2, r3 bcc FillZerobss - -/* Call the clock system intitialization function.*/ - bl SystemInit + /* Call static constructors */ bl __libc_init_array /* Call the application's entry point.*/ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h7b0xx.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h7b0xx.s index a49fe61..5366acd 100644 --- a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h7b0xx.s +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h7b0xx.s @@ -61,6 +61,9 @@ defined in linker script */ Reset_Handler: ldr sp, =_estack /* set stack pointer */ +/* Call the clock system intitialization function.*/ + bl SystemInit + /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 b LoopCopyDataInit @@ -88,9 +91,7 @@ LoopFillZerobss: ldr r3, = _ebss cmp r2, r3 bcc FillZerobss - -/* Call the clock system intitialization function.*/ - bl SystemInit + /* Call static constructors */ bl __libc_init_array /* Call the application's entry point.*/ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h7b0xxq.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h7b0xxq.s index 6f089f9..33d71c6 100644 --- a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h7b0xxq.s +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h7b0xxq.s @@ -61,6 +61,9 @@ defined in linker script */ Reset_Handler: ldr sp, =_estack /* set stack pointer */ +/* Call the clock system intitialization function.*/ + bl SystemInit + /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 b LoopCopyDataInit @@ -89,8 +92,6 @@ LoopFillZerobss: cmp r2, r3 bcc FillZerobss -/* Call the clock system intitialization function.*/ - bl SystemInit /* Call static constructors */ bl __libc_init_array /* Call the application's entry point.*/ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h7b3xx.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h7b3xx.s index 4ab6e86..01d0cdd 100644 --- a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h7b3xx.s +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h7b3xx.s @@ -61,6 +61,9 @@ defined in linker script */ Reset_Handler: ldr sp, =_estack /* set stack pointer */ +/* Call the clock system intitialization function.*/ + bl SystemInit + /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 b LoopCopyDataInit @@ -89,8 +92,6 @@ LoopFillZerobss: cmp r2, r3 bcc FillZerobss -/* Call the clock system intitialization function.*/ - bl SystemInit /* Call static constructors */ bl __libc_init_array /* Call the application's entry point.*/ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h7b3xxq.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h7b3xxq.s index 27fc367..afac7bd 100644 --- a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h7b3xxq.s +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h7b3xxq.s @@ -61,6 +61,9 @@ defined in linker script */ Reset_Handler: ldr sp, =_estack /* set stack pointer */ +/* Call the clock system intitialization function.*/ + bl SystemInit + /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 b LoopCopyDataInit @@ -89,8 +92,6 @@ LoopFillZerobss: cmp r2, r3 bcc FillZerobss -/* Call the clock system intitialization function.*/ - bl SystemInit /* Call static constructors */ bl __libc_init_array /* Call the application's entry point.*/ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_axisram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_axisram.icf new file mode 100644 index 0000000..f4e63eb --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_axisram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x24000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x24000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x2401FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24020000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_dtcmram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_dtcmram.icf new file mode 100644 index 0000000..f011c3f --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_dtcmram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x20000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x20000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x2000FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20010000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_flash.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_flash.icf new file mode 100644 index 0000000..1a3f213 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_flash.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_flash_rw_ahbsram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_flash_rw_ahbsram.icf new file mode 100644 index 0000000..7749c72 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_flash_rw_ahbsram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x30000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x30007FFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_flash_rw_axisram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_flash_rw_axisram.icf new file mode 100644 index 0000000..0307674 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_flash_rw_axisram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_flash_rw_sram1.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_flash_rw_sram1.icf new file mode 100644 index 0000000..0307674 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_flash_rw_sram1.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_flash_rw_sram2.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_flash_rw_sram2.icf new file mode 100644 index 0000000..7749c72 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_flash_rw_sram2.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x30000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x30007FFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_sram1.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_sram1.icf new file mode 100644 index 0000000..f4e63eb --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xe_sram1.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x24000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x24000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x2401FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24020000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_axisram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_axisram.icf new file mode 100644 index 0000000..f4e63eb --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_axisram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x24000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x24000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x2401FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24020000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_dtcmram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_dtcmram.icf new file mode 100644 index 0000000..f011c3f --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_dtcmram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x20000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x20000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x2000FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20010000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_flash.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_flash.icf new file mode 100644 index 0000000..0881392 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_flash.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_flash_rw_ahbsram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_flash_rw_ahbsram.icf new file mode 100644 index 0000000..1671afa --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_flash_rw_ahbsram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x30000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x30007FFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_flash_rw_axisram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_flash_rw_axisram.icf new file mode 100644 index 0000000..d3fc57b --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_flash_rw_axisram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_flash_rw_sram1.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_flash_rw_sram1.icf new file mode 100644 index 0000000..d3fc57b --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_flash_rw_sram1.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_flash_rw_sram2.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_flash_rw_sram2.icf new file mode 100644 index 0000000..1671afa --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_flash_rw_sram2.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x30000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x30007FFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_sram1.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_sram1.icf new file mode 100644 index 0000000..f4e63eb --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h723xx_sram1.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x24000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x24000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x2401FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24020000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_axisram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_axisram.icf new file mode 100644 index 0000000..f4e63eb --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_axisram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x24000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x24000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x2401FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24020000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_dtcmram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_dtcmram.icf new file mode 100644 index 0000000..f011c3f --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_dtcmram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x20000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x20000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x2000FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20010000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_flash.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_flash.icf new file mode 100644 index 0000000..1a3f213 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_flash.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_flash_rw_ahbsram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_flash_rw_ahbsram.icf new file mode 100644 index 0000000..7749c72 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_flash_rw_ahbsram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x30000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x30007FFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_flash_rw_axisram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_flash_rw_axisram.icf new file mode 100644 index 0000000..0307674 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_flash_rw_axisram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_flash_rw_sram1.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_flash_rw_sram1.icf new file mode 100644 index 0000000..0307674 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_flash_rw_sram1.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_flash_rw_sram2.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_flash_rw_sram2.icf new file mode 100644 index 0000000..7749c72 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_flash_rw_sram2.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x30000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x30007FFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_sram1.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_sram1.icf new file mode 100644 index 0000000..f4e63eb --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xe_sram1.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x24000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x24000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x2401FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24020000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_axisram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_axisram.icf new file mode 100644 index 0000000..f4e63eb --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_axisram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x24000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x24000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x2401FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24020000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_dtcmram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_dtcmram.icf new file mode 100644 index 0000000..f011c3f --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_dtcmram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x20000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x20000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x2000FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20010000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_flash.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_flash.icf new file mode 100644 index 0000000..0881392 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_flash.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_flash_rw_ahbsram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_flash_rw_ahbsram.icf new file mode 100644 index 0000000..1671afa --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_flash_rw_ahbsram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x30000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x30007FFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_flash_rw_axisram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_flash_rw_axisram.icf new file mode 100644 index 0000000..d3fc57b --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_flash_rw_axisram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_flash_rw_sram1.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_flash_rw_sram1.icf new file mode 100644 index 0000000..d3fc57b --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_flash_rw_sram1.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_flash_rw_sram2.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_flash_rw_sram2.icf new file mode 100644 index 0000000..1671afa --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_flash_rw_sram2.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x30000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x30007FFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_sram1.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_sram1.icf new file mode 100644 index 0000000..f4e63eb --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h725xx_sram1.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x24000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x24000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x2401FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24020000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_axisram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_axisram.icf new file mode 100644 index 0000000..f4e63eb --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_axisram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x24000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x24000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x2401FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24020000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_dtcmram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_dtcmram.icf new file mode 100644 index 0000000..f011c3f --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_dtcmram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x20000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x20000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x2000FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20010000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_flash.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_flash.icf new file mode 100644 index 0000000..0822bd0 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_flash.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_flash_rw_ahbsram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_flash_rw_ahbsram.icf new file mode 100644 index 0000000..04b8e18 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_flash_rw_ahbsram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x30000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x30007FFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_flash_rw_axisram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_flash_rw_axisram.icf new file mode 100644 index 0000000..05fe33a --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_flash_rw_axisram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_flash_rw_sram1.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_flash_rw_sram1.icf new file mode 100644 index 0000000..05fe33a --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_flash_rw_sram1.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_flash_rw_sram2.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_flash_rw_sram2.icf new file mode 100644 index 0000000..04b8e18 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_flash_rw_sram2.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x30000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x30007FFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_sram1.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_sram1.icf new file mode 100644 index 0000000..f4e63eb --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xx_sram1.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x24000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x24000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x2401FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24020000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_axisram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_axisram.icf new file mode 100644 index 0000000..f4e63eb --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_axisram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x24000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x24000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x2401FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24020000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_dtcmram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_dtcmram.icf new file mode 100644 index 0000000..f011c3f --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_dtcmram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x20000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x20000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x2000FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20010000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_flash.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_flash.icf new file mode 100644 index 0000000..0822bd0 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_flash.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_flash_rw_ahbsram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_flash_rw_ahbsram.icf new file mode 100644 index 0000000..04b8e18 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_flash_rw_ahbsram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x30000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x30007FFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_flash_rw_axisram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_flash_rw_axisram.icf new file mode 100644 index 0000000..05fe33a --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_flash_rw_axisram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_flash_rw_sram1.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_flash_rw_sram1.icf new file mode 100644 index 0000000..05fe33a --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_flash_rw_sram1.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_flash_rw_sram2.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_flash_rw_sram2.icf new file mode 100644 index 0000000..04b8e18 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_flash_rw_sram2.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x30000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x30007FFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_sram1.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_sram1.icf new file mode 100644 index 0000000..f4e63eb --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h730xxq_sram1.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x24000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x24000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x2401FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24020000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_axisram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_axisram.icf new file mode 100644 index 0000000..f4e63eb --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_axisram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x24000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x24000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x2401FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24020000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_dtcmram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_dtcmram.icf new file mode 100644 index 0000000..f011c3f --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_dtcmram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x20000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x20000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x2000FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20010000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_flash.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_flash.icf new file mode 100644 index 0000000..0881392 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_flash.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_flash_rw_ahbsram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_flash_rw_ahbsram.icf new file mode 100644 index 0000000..1671afa --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_flash_rw_ahbsram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x30000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x30007FFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_flash_rw_axisram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_flash_rw_axisram.icf new file mode 100644 index 0000000..d3fc57b --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_flash_rw_axisram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_flash_rw_sram1.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_flash_rw_sram1.icf new file mode 100644 index 0000000..d3fc57b --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_flash_rw_sram1.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_flash_rw_sram2.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_flash_rw_sram2.icf new file mode 100644 index 0000000..1671afa --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_flash_rw_sram2.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x30000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x30007FFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_sram1.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_sram1.icf new file mode 100644 index 0000000..f4e63eb --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h733xx_sram1.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x24000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x24000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x2401FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24020000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_axisram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_axisram.icf new file mode 100644 index 0000000..f4e63eb --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_axisram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x24000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x24000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x2401FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24020000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_dtcmram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_dtcmram.icf new file mode 100644 index 0000000..f011c3f --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_dtcmram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x20000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x20000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x2000FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20010000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_flash.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_flash.icf new file mode 100644 index 0000000..0881392 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_flash.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_flash_rw_ahbsram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_flash_rw_ahbsram.icf new file mode 100644 index 0000000..1671afa --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_flash_rw_ahbsram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x30000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x30007FFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_flash_rw_axisram.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_flash_rw_axisram.icf new file mode 100644 index 0000000..d3fc57b --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_flash_rw_axisram.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_flash_rw_sram1.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_flash_rw_sram1.icf new file mode 100644 index 0000000..d3fc57b --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_flash_rw_sram1.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_flash_rw_sram2.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_flash_rw_sram2.icf new file mode 100644 index 0000000..1671afa --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_flash_rw_sram2.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x30000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x30007FFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_sram1.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_sram1.icf new file mode 100644 index 0000000..f4e63eb --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h735xx_sram1.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x24000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x24000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x2401FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x24020000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2404FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h742xg_flash.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h742xg_flash.icf new file mode 100644 index 0000000..d33d67d --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h742xg_flash.icf @@ -0,0 +1,37 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_bank1_start__ = 0x08000000; +define symbol __ICFEDIT_region_bank1_end__ = 0x0807FFFF; +define symbol __ICFEDIT_region_bank2_start__ = 0x08100000; +define symbol __ICFEDIT_region_bank2_end__ = 0x0817FFFF; + +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_bank1_start__ to __ICFEDIT_region_bank1_end__] | mem:[ from __ICFEDIT_region_bank2_start__ to __ICFEDIT_region_bank2_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h742xg_flash_rw_sram1.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h742xg_flash_rw_sram1.icf new file mode 100644 index 0000000..647214c --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h742xg_flash_rw_sram1.icf @@ -0,0 +1,37 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_bank1_start__ = 0x08000000; +define symbol __ICFEDIT_region_bank1_end__ = 0x0807FFFF; +define symbol __ICFEDIT_region_bank2_start__ = 0x08100000; +define symbol __ICFEDIT_region_bank2_end__ = 0x0817FFFF; + +define symbol __ICFEDIT_region_RAM_start__ = 0x24000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2405FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_bank1_start__ to __ICFEDIT_region_bank1_end__] | mem:[ from __ICFEDIT_region_bank2_start__ to __ICFEDIT_region_bank2_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h742xg_flash_rw_sram2.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h742xg_flash_rw_sram2.icf new file mode 100644 index 0000000..8cbbc9b --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h742xg_flash_rw_sram2.icf @@ -0,0 +1,37 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_bank1_start__ = 0x08000000; +define symbol __ICFEDIT_region_bank1_end__ = 0x0807FFFF; +define symbol __ICFEDIT_region_bank2_start__ = 0x08100000; +define symbol __ICFEDIT_region_bank2_end__ = 0x0817FFFF; + +define symbol __ICFEDIT_region_RAM_start__ = 0x30000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x30007FFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_bank1_start__ to __ICFEDIT_region_bank1_end__] | mem:[ from __ICFEDIT_region_bank2_start__ to __ICFEDIT_region_bank2_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h742xx_flash_rw_sram2.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h742xx_flash_rw_sram2.icf index df1f1b3..d48aaab 100644 --- a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h742xx_flash_rw_sram2.icf +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h742xx_flash_rw_sram2.icf @@ -6,8 +6,8 @@ define symbol __ICFEDIT_intvec_start__ = 0x08000000; /*-Memory Regions-*/ define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; define symbol __ICFEDIT_region_ROM_end__ = 0x081FFFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x10000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x10007FFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x30000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x30007FFF; define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; /*-Sizes-*/ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h743xg_flash.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h743xg_flash.icf new file mode 100644 index 0000000..d33d67d --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h743xg_flash.icf @@ -0,0 +1,37 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_bank1_start__ = 0x08000000; +define symbol __ICFEDIT_region_bank1_end__ = 0x0807FFFF; +define symbol __ICFEDIT_region_bank2_start__ = 0x08100000; +define symbol __ICFEDIT_region_bank2_end__ = 0x0817FFFF; + +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_bank1_start__ to __ICFEDIT_region_bank1_end__] | mem:[ from __ICFEDIT_region_bank2_start__ to __ICFEDIT_region_bank2_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h743xg_flash_rw_sram1.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h743xg_flash_rw_sram1.icf new file mode 100644 index 0000000..1223bd2 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h743xg_flash_rw_sram1.icf @@ -0,0 +1,37 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_bank1_start__ = 0x08000000; +define symbol __ICFEDIT_region_bank1_end__ = 0x0807FFFF; +define symbol __ICFEDIT_region_bank2_start__ = 0x08100000; +define symbol __ICFEDIT_region_bank2_end__ = 0x0817FFFF; + +define symbol __ICFEDIT_region_RAM_start__ = 0x24000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2407FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_bank1_start__ to __ICFEDIT_region_bank1_end__] | mem:[ from __ICFEDIT_region_bank2_start__ to __ICFEDIT_region_bank2_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h743xg_flash_rw_sram2.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h743xg_flash_rw_sram2.icf new file mode 100644 index 0000000..5059f4b --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h743xg_flash_rw_sram2.icf @@ -0,0 +1,37 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_bank1_start__ = 0x08000000; +define symbol __ICFEDIT_region_bank1_end__ = 0x0807FFFF; +define symbol __ICFEDIT_region_bank2_start__ = 0x08100000; +define symbol __ICFEDIT_region_bank2_end__ = 0x0817FFFF; + +define symbol __ICFEDIT_region_RAM_start__ = 0x30000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x30047FFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_bank1_start__ to __ICFEDIT_region_bank1_end__] | mem:[ from __ICFEDIT_region_bank2_start__ to __ICFEDIT_region_bank2_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h743xx_flash_rw_sram2.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h743xx_flash_rw_sram2.icf index bce111d..d5b3748 100755 --- a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h743xx_flash_rw_sram2.icf +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h743xx_flash_rw_sram2.icf @@ -6,8 +6,8 @@ define symbol __ICFEDIT_intvec_start__ = 0x08000000; /*-Memory Regions-*/ define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; define symbol __ICFEDIT_region_ROM_end__ = 0x081FFFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x10000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x10047FFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x30000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x30047FFF; define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; /*-Sizes-*/ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h745xg_flash_CM4.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h745xg_flash_CM4.icf new file mode 100644 index 0000000..ef83cc8 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h745xg_flash_CM4.icf @@ -0,0 +1,31 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08100000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08100000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0817FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x10000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x10047FFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h745xg_flash_CM7.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h745xg_flash_CM7.icf new file mode 100644 index 0000000..1a3f213 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h745xg_flash_CM7.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h747xg_flash_CM4.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h747xg_flash_CM4.icf new file mode 100644 index 0000000..ef83cc8 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h747xg_flash_CM4.icf @@ -0,0 +1,31 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08100000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08100000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0817FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x10000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x10047FFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h747xg_flash_CM7.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h747xg_flash_CM7.icf new file mode 100644 index 0000000..1a3f213 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h747xg_flash_CM7.icf @@ -0,0 +1,34 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; +define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x400; +define symbol __ICFEDIT_size_heap__ = 0x200; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; \ No newline at end of file diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h750xx_flash_rw_sram2.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h750xx_flash_rw_sram2.icf index 3498276..2f3ab60 100755 --- a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h750xx_flash_rw_sram2.icf +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h750xx_flash_rw_sram2.icf @@ -6,8 +6,8 @@ define symbol __ICFEDIT_intvec_start__ = 0x08000000; /*-Memory Regions-*/ define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x10000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x10047FFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x30000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x30047FFF; define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; /*-Sizes-*/ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h753xx_flash_rw_sram2.icf b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h753xx_flash_rw_sram2.icf index bce111d..d5b3748 100755 --- a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h753xx_flash_rw_sram2.icf +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/linker/stm32h753xx_flash_rw_sram2.icf @@ -6,8 +6,8 @@ define symbol __ICFEDIT_intvec_start__ = 0x08000000; /*-Memory Regions-*/ define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; define symbol __ICFEDIT_region_ROM_end__ = 0x081FFFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x10000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x10047FFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x30000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x30047FFF; define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF; /*-Sizes-*/ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h723xx.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h723xx.s new file mode 100644 index 0000000..d643720 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h723xx.s @@ -0,0 +1,984 @@ +;/******************** (C) COPYRIGHT 2019 STMicroelectronics ******************** +;* File Name : startup_stm32h723xx.s +;* Author : MCD Application Team +;* Description : STM32H723xx devices vector table for EWARM toolchain. +;* This module performs: +;* - Set the initial SP +;* - Set the initial PC == _iar_program_start, +;* - Set the vector table entries with the exceptions ISR +;* address. +;* - Branches to main in the C library (which eventually +;* calls main()). +;* After Reset the Cortex-M processor is in Thread mode, +;* priority is Privileged, and the Stack is set to Main. +;******************************************************************************* +;* @attention +;* +;*

                  © Copyright (c) 2019 STMicroelectronics. +;* All rights reserved.

                  +;* +;* This software component is licensed by ST under BSD 3-Clause license, +;* the "License"; You may not use this file except in compliance with the +;* License. You may obtain a copy of the License at: +;* opensource.org/licenses/BSD-3-Clause +;* +;******************************************************************************* +; +; +; The modules in this file are included in the libraries, and may be replaced +; by any user-defined modules that define the PUBLIC symbol _program_start or +; a user defined start symbol. +; To override the cstartup defined in the library, simply add your modified +; version to the workbench project. +; +; The vector table is normally located at address 0. +; When debugging in RAM, it can be located in RAM, aligned to at least 2^6. +; The name "__vector_table" has special meaning for C-SPY: +; it is where the SP start value is found, and the NVIC vector +; table register (VTOR) is initialized to this address if != 0. +; +; Cortex-M version +; + + MODULE ?cstartup + + ;; Forward declaration of sections. + SECTION CSTACK:DATA:NOROOT(3) + + SECTION .intvec:CODE:NOROOT(2) + + EXTERN __iar_program_start + EXTERN SystemInit + PUBLIC __vector_table + + DATA +__vector_table + DCD sfe(CSTACK) + DCD Reset_Handler ; Reset Handler + + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD MemManage_Handler ; MPU Fault Handler + DCD BusFault_Handler ; Bus Fault Handler + DCD UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WWDG_IRQHandler ; Window WatchDog Interrupt ( wwdg1_it) + DCD PVD_AVD_IRQHandler ; PVD/AVD through EXTI Line detection + DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line + DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line + DCD FLASH_IRQHandler ; FLASH + DCD RCC_IRQHandler ; RCC + DCD EXTI0_IRQHandler ; EXTI Line0 + DCD EXTI1_IRQHandler ; EXTI Line1 + DCD EXTI2_IRQHandler ; EXTI Line2 + DCD EXTI3_IRQHandler ; EXTI Line3 + DCD EXTI4_IRQHandler ; EXTI Line4 + DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 + DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 + DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 + DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 + DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 + DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 + DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 + DCD ADC_IRQHandler ; ADC1, ADC2 + DCD FDCAN1_IT0_IRQHandler ; FDCAN1 interrupt line 0 + DCD FDCAN2_IT0_IRQHandler ; FDCAN2 interrupt line 0 + DCD FDCAN1_IT1_IRQHandler ; FDCAN1 interrupt line 1 + DCD FDCAN2_IT1_IRQHandler ; FDCAN2 interrupt line 1 + DCD EXTI9_5_IRQHandler ; External Line[9:5]s + DCD TIM1_BRK_IRQHandler ; TIM1 Break interrupt + DCD TIM1_UP_IRQHandler ; TIM1 Update + DCD TIM1_TRG_COM_IRQHandler ; TIM1 Trigger and Commutation Interrupt + DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare + DCD TIM2_IRQHandler ; TIM2 + DCD TIM3_IRQHandler ; TIM3 + DCD TIM4_IRQHandler ; TIM4 + DCD I2C1_EV_IRQHandler ; I2C1 Event + DCD I2C1_ER_IRQHandler ; I2C1 Error + DCD I2C2_EV_IRQHandler ; I2C2 Event + DCD I2C2_ER_IRQHandler ; I2C2 Error + DCD SPI1_IRQHandler ; SPI1 + DCD SPI2_IRQHandler ; SPI2 + DCD USART1_IRQHandler ; USART1 + DCD USART2_IRQHandler ; USART2 + DCD USART3_IRQHandler ; USART3 + DCD EXTI15_10_IRQHandler ; External Line[15:10] + DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line + DCD 0 ; Reserved + DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break Interrupt and TIM12 global interrupt + DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update Interrupt and TIM13 global interrupt + DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation Interrupt and TIM14 glob + DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare Interrupt + DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 + DCD FMC_IRQHandler ; FMC + DCD SDMMC1_IRQHandler ; SDMMC1 + DCD TIM5_IRQHandler ; TIM5 + DCD SPI3_IRQHandler ; SPI3 + DCD UART4_IRQHandler ; UART4 + DCD UART5_IRQHandler ; UART5 + DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors + DCD TIM7_IRQHandler ; TIM7 + DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 + DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 + DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 + DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 + DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 + DCD ETH_IRQHandler ; Ethernet + DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line + DCD FDCAN_CAL_IRQHandler ; FDCAN calibration unit interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 + DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 + DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 + DCD USART6_IRQHandler ; USART6 + DCD I2C3_EV_IRQHandler ; I2C3 event + DCD I2C3_ER_IRQHandler ; I2C3 error + DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out + DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In + DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI + DCD OTG_HS_IRQHandler ; USB OTG HS + DCD DCMI_PSSI_IRQHandler ; DCMI, PSSI + DCD 0 ; Reserved + DCD RNG_IRQHandler ; Rng + DCD FPU_IRQHandler ; FPU + DCD UART7_IRQHandler ; UART7 + DCD UART8_IRQHandler ; UART8 + DCD SPI4_IRQHandler ; SPI4 + DCD SPI5_IRQHandler ; SPI5 + DCD SPI6_IRQHandler ; SPI6 + DCD SAI1_IRQHandler ; SAI1 + DCD LTDC_IRQHandler ; LTDC + DCD LTDC_ER_IRQHandler ; LTDC error + DCD DMA2D_IRQHandler ; DMA2D + DCD 0 ; Reserved + DCD OCTOSPI1_IRQHandler ; OCTOSPI1 + DCD LPTIM1_IRQHandler ; LPTIM1 + DCD CEC_IRQHandler ; HDMI_CEC + DCD I2C4_EV_IRQHandler ; I2C4 Event + DCD I2C4_ER_IRQHandler ; I2C4 Error + DCD SPDIF_RX_IRQHandler ; SPDIF_RX + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DMAMUX1_OVR_IRQHandler ; DMAMUX1 Overrun interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DFSDM1_FLT0_IRQHandler ; DFSDM Filter0 Interrupt + DCD DFSDM1_FLT1_IRQHandler ; DFSDM Filter1 Interrupt + DCD DFSDM1_FLT2_IRQHandler ; DFSDM Filter2 Interrupt + DCD DFSDM1_FLT3_IRQHandler ; DFSDM Filter3 Interrupt + DCD 0 ; Reserved + DCD SWPMI1_IRQHandler ; Serial Wire Interface 1 global interrupt + DCD TIM15_IRQHandler ; TIM15 global Interrupt + DCD TIM16_IRQHandler ; TIM16 global Interrupt + DCD TIM17_IRQHandler ; TIM17 global Interrupt + DCD MDIOS_WKUP_IRQHandler ; MDIOS Wakeup Interrupt + DCD MDIOS_IRQHandler ; MDIOS global Interrupt + DCD 0 ; Reserved + DCD MDMA_IRQHandler ; MDMA global Interrupt + DCD 0 ; Reserved + DCD SDMMC2_IRQHandler ; SDMMC2 global Interrupt + DCD HSEM1_IRQHandler ; HSEM1 global Interrupt + DCD 0 ; Reserved + DCD ADC3_IRQHandler ; ADC3 global Interrupt + DCD DMAMUX2_OVR_IRQHandler ; DMAMUX Overrun interrupt + DCD BDMA_Channel0_IRQHandler ; BDMA Channel 0 global Interrupt + DCD BDMA_Channel1_IRQHandler ; BDMA Channel 1 global Interrupt + DCD BDMA_Channel2_IRQHandler ; BDMA Channel 2 global Interrupt + DCD BDMA_Channel3_IRQHandler ; BDMA Channel 3 global Interrupt + DCD BDMA_Channel4_IRQHandler ; BDMA Channel 4 global Interrupt + DCD BDMA_Channel5_IRQHandler ; BDMA Channel 5 global Interrupt + DCD BDMA_Channel6_IRQHandler ; BDMA Channel 6 global Interrupt + DCD BDMA_Channel7_IRQHandler ; BDMA Channel 7 global Interrupt + DCD COMP1_IRQHandler ; COMP1 global Interrupt + DCD LPTIM2_IRQHandler ; LP TIM2 global interrupt + DCD LPTIM3_IRQHandler ; LP TIM3 global interrupt + DCD LPTIM4_IRQHandler ; LP TIM4 global interrupt + DCD LPTIM5_IRQHandler ; LP TIM5 global interrupt + DCD LPUART1_IRQHandler ; LP UART1 interrupt + DCD 0 ; Reserved + DCD CRS_IRQHandler ; Clock Recovery Global Interrupt + DCD ECC_IRQHandler ; ECC diagnostic Global Interrupt + DCD SAI4_IRQHandler ; SAI4 global interrupt + DCD DTS_IRQHandler ; Digital Temperature Sensor + DCD 0 ; Reserved + DCD WAKEUP_PIN_IRQHandler ; Interrupt for all 6 wake-up pins + DCD OCTOSPI2_IRQHandler ; OCTOSPI2 Interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD FMAC_IRQHandler ; FMAC Interrupt + DCD CORDIC_IRQHandler ; CORDIC Interrupt + DCD UART9_IRQHandler ; UART9 Interrupt + DCD USART10_IRQHandler ; USART10 Interrupt + DCD I2C5_EV_IRQHandler ; I2C5 Event Interrupt + DCD I2C5_ER_IRQHandler ; I2C5 Error Interrupt + DCD FDCAN3_IT0_IRQHandler ; FDCAN3 interrupt line 0 + DCD FDCAN3_IT1_IRQHandler ; FDCAN3 interrupt line 1 + DCD TIM23_IRQHandler ; TIM23 global interrup + DCD TIM24_IRQHandler ; TIM24 global interrup + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Default interrupt handlers. +;; + THUMB + PUBWEAK Reset_Handler + SECTION .text:CODE:NOROOT:REORDER(2) +Reset_Handler + + LDR R0, =SystemInit + BLX R0 + LDR R0, =__iar_program_start + BX R0 + + PUBWEAK NMI_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +NMI_Handler + B NMI_Handler + + PUBWEAK HardFault_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +HardFault_Handler + B HardFault_Handler + + PUBWEAK MemManage_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +MemManage_Handler + B MemManage_Handler + + PUBWEAK BusFault_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +BusFault_Handler + B BusFault_Handler + + PUBWEAK UsageFault_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +UsageFault_Handler + B UsageFault_Handler + + PUBWEAK SVC_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +SVC_Handler + B SVC_Handler + + PUBWEAK DebugMon_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +DebugMon_Handler + B DebugMon_Handler + + PUBWEAK PendSV_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +PendSV_Handler + B PendSV_Handler + + PUBWEAK SysTick_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +SysTick_Handler + B SysTick_Handler + + PUBWEAK WWDG_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +WWDG_IRQHandler + B WWDG_IRQHandler + + PUBWEAK PVD_AVD_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +PVD_AVD_IRQHandler + B PVD_AVD_IRQHandler + + PUBWEAK TAMP_STAMP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TAMP_STAMP_IRQHandler + B TAMP_STAMP_IRQHandler + + PUBWEAK RTC_WKUP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +RTC_WKUP_IRQHandler + B RTC_WKUP_IRQHandler + + PUBWEAK FLASH_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FLASH_IRQHandler + B FLASH_IRQHandler + + PUBWEAK RCC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +RCC_IRQHandler + B RCC_IRQHandler + + PUBWEAK EXTI0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI0_IRQHandler + B EXTI0_IRQHandler + + PUBWEAK EXTI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI1_IRQHandler + B EXTI1_IRQHandler + + PUBWEAK EXTI2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI2_IRQHandler + B EXTI2_IRQHandler + + PUBWEAK EXTI3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI3_IRQHandler + B EXTI3_IRQHandler + + PUBWEAK EXTI4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI4_IRQHandler + B EXTI4_IRQHandler + + PUBWEAK DMA1_Stream0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream0_IRQHandler + B DMA1_Stream0_IRQHandler + + PUBWEAK DMA1_Stream1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream1_IRQHandler + B DMA1_Stream1_IRQHandler + + PUBWEAK DMA1_Stream2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream2_IRQHandler + B DMA1_Stream2_IRQHandler + + PUBWEAK DMA1_Stream3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream3_IRQHandler + B DMA1_Stream3_IRQHandler + + PUBWEAK DMA1_Stream4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream4_IRQHandler + B DMA1_Stream4_IRQHandler + + PUBWEAK DMA1_Stream5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream5_IRQHandler + B DMA1_Stream5_IRQHandler + + PUBWEAK DMA1_Stream6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream6_IRQHandler + B DMA1_Stream6_IRQHandler + + PUBWEAK ADC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ADC_IRQHandler + B ADC_IRQHandler + + PUBWEAK FDCAN1_IT0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN1_IT0_IRQHandler + B FDCAN1_IT0_IRQHandler + + PUBWEAK FDCAN2_IT0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN2_IT0_IRQHandler + B FDCAN2_IT0_IRQHandler + + PUBWEAK FDCAN1_IT1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN1_IT1_IRQHandler + B FDCAN1_IT1_IRQHandler + + PUBWEAK FDCAN2_IT1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN2_IT1_IRQHandler + B FDCAN2_IT1_IRQHandler + + PUBWEAK EXTI9_5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI9_5_IRQHandler + B EXTI9_5_IRQHandler + + PUBWEAK TIM1_BRK_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM1_BRK_IRQHandler + B TIM1_BRK_IRQHandler + + PUBWEAK TIM1_UP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM1_UP_IRQHandler + B TIM1_UP_IRQHandler + + PUBWEAK TIM1_TRG_COM_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM1_TRG_COM_IRQHandler + B TIM1_TRG_COM_IRQHandler + + PUBWEAK TIM1_CC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM1_CC_IRQHandler + B TIM1_CC_IRQHandler + + PUBWEAK TIM2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM2_IRQHandler + B TIM2_IRQHandler + + PUBWEAK TIM3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM3_IRQHandler + B TIM3_IRQHandler + + PUBWEAK TIM4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM4_IRQHandler + B TIM4_IRQHandler + + PUBWEAK I2C1_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C1_EV_IRQHandler + B I2C1_EV_IRQHandler + + PUBWEAK I2C1_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C1_ER_IRQHandler + B I2C1_ER_IRQHandler + + PUBWEAK I2C2_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C2_EV_IRQHandler + B I2C2_EV_IRQHandler + + PUBWEAK I2C2_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C2_ER_IRQHandler + B I2C2_ER_IRQHandler + + PUBWEAK SPI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI1_IRQHandler + B SPI1_IRQHandler + + PUBWEAK SPI2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI2_IRQHandler + B SPI2_IRQHandler + + PUBWEAK USART1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART1_IRQHandler + B USART1_IRQHandler + + PUBWEAK USART2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART2_IRQHandler + B USART2_IRQHandler + + PUBWEAK USART3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART3_IRQHandler + B USART3_IRQHandler + + PUBWEAK EXTI15_10_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI15_10_IRQHandler + B EXTI15_10_IRQHandler + + PUBWEAK RTC_Alarm_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +RTC_Alarm_IRQHandler + B RTC_Alarm_IRQHandler + + PUBWEAK TIM8_BRK_TIM12_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM8_BRK_TIM12_IRQHandler + B TIM8_BRK_TIM12_IRQHandler + + PUBWEAK TIM8_UP_TIM13_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM8_UP_TIM13_IRQHandler + B TIM8_UP_TIM13_IRQHandler + + PUBWEAK TIM8_TRG_COM_TIM14_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM8_TRG_COM_TIM14_IRQHandler + B TIM8_TRG_COM_TIM14_IRQHandler + + PUBWEAK TIM8_CC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM8_CC_IRQHandler + B TIM8_CC_IRQHandler + + PUBWEAK DMA1_Stream7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream7_IRQHandler + B DMA1_Stream7_IRQHandler + + PUBWEAK FMC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FMC_IRQHandler + B FMC_IRQHandler + + PUBWEAK SDMMC1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SDMMC1_IRQHandler + B SDMMC1_IRQHandler + + PUBWEAK TIM5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM5_IRQHandler + B TIM5_IRQHandler + + PUBWEAK SPI3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI3_IRQHandler + B SPI3_IRQHandler + + PUBWEAK UART4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART4_IRQHandler + B UART4_IRQHandler + + PUBWEAK UART5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART5_IRQHandler + B UART5_IRQHandler + + PUBWEAK TIM6_DAC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM6_DAC_IRQHandler + B TIM6_DAC_IRQHandler + + PUBWEAK TIM7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM7_IRQHandler + B TIM7_IRQHandler + + PUBWEAK DMA2_Stream0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream0_IRQHandler + B DMA2_Stream0_IRQHandler + + PUBWEAK DMA2_Stream1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream1_IRQHandler + B DMA2_Stream1_IRQHandler + + PUBWEAK DMA2_Stream2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream2_IRQHandler + B DMA2_Stream2_IRQHandler + + PUBWEAK DMA2_Stream3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream3_IRQHandler + B DMA2_Stream3_IRQHandler + + PUBWEAK DMA2_Stream4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream4_IRQHandler + B DMA2_Stream4_IRQHandler + + PUBWEAK ETH_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ETH_IRQHandler + B ETH_IRQHandler + + PUBWEAK ETH_WKUP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ETH_WKUP_IRQHandler + B ETH_WKUP_IRQHandler + + PUBWEAK FDCAN_CAL_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN_CAL_IRQHandler + B FDCAN_CAL_IRQHandler + + PUBWEAK DMA2_Stream5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream5_IRQHandler + B DMA2_Stream5_IRQHandler + + PUBWEAK DMA2_Stream6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream6_IRQHandler + B DMA2_Stream6_IRQHandler + + PUBWEAK DMA2_Stream7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream7_IRQHandler + B DMA2_Stream7_IRQHandler + + PUBWEAK USART6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART6_IRQHandler + B USART6_IRQHandler + + PUBWEAK I2C3_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C3_EV_IRQHandler + B I2C3_EV_IRQHandler + + PUBWEAK I2C3_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C3_ER_IRQHandler + B I2C3_ER_IRQHandler + + PUBWEAK OTG_HS_EP1_OUT_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTG_HS_EP1_OUT_IRQHandler + B OTG_HS_EP1_OUT_IRQHandler + + PUBWEAK OTG_HS_EP1_IN_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTG_HS_EP1_IN_IRQHandler + B OTG_HS_EP1_IN_IRQHandler + + PUBWEAK OTG_HS_WKUP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTG_HS_WKUP_IRQHandler + B OTG_HS_WKUP_IRQHandler + + PUBWEAK OTG_HS_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTG_HS_IRQHandler + B OTG_HS_IRQHandler + + PUBWEAK DCMI_PSSI_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DCMI_PSSI_IRQHandler + B DCMI_PSSI_IRQHandler + + PUBWEAK RNG_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +RNG_IRQHandler + B RNG_IRQHandler + + PUBWEAK FPU_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FPU_IRQHandler + B FPU_IRQHandler + + PUBWEAK UART7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART7_IRQHandler + B UART7_IRQHandler + + PUBWEAK UART8_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART8_IRQHandler + B UART8_IRQHandler + + PUBWEAK SPI4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI4_IRQHandler + B SPI4_IRQHandler + + PUBWEAK SPI5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI5_IRQHandler + B SPI5_IRQHandler + + PUBWEAK SPI6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI6_IRQHandler + B SPI6_IRQHandler + + PUBWEAK SAI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SAI1_IRQHandler + B SAI1_IRQHandler + + PUBWEAK LTDC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LTDC_IRQHandler + B LTDC_IRQHandler + + PUBWEAK LTDC_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LTDC_ER_IRQHandler + B LTDC_ER_IRQHandler + + PUBWEAK DMA2D_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2D_IRQHandler + B DMA2D_IRQHandler + + PUBWEAK OCTOSPI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OCTOSPI1_IRQHandler + B OCTOSPI1_IRQHandler + + PUBWEAK LPTIM1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM1_IRQHandler + B LPTIM1_IRQHandler + + PUBWEAK CEC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +CEC_IRQHandler + B CEC_IRQHandler + + PUBWEAK I2C4_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C4_EV_IRQHandler + B I2C4_EV_IRQHandler + + PUBWEAK I2C4_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C4_ER_IRQHandler + B I2C4_ER_IRQHandler + + PUBWEAK SPDIF_RX_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPDIF_RX_IRQHandler + B SPDIF_RX_IRQHandler + + PUBWEAK DMAMUX1_OVR_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMAMUX1_OVR_IRQHandler + B DMAMUX1_OVR_IRQHandler + + PUBWEAK DFSDM1_FLT0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DFSDM1_FLT0_IRQHandler + B DFSDM1_FLT0_IRQHandler + + PUBWEAK DFSDM1_FLT1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DFSDM1_FLT1_IRQHandler + B DFSDM1_FLT1_IRQHandler + + PUBWEAK DFSDM1_FLT2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DFSDM1_FLT2_IRQHandler + B DFSDM1_FLT2_IRQHandler + + PUBWEAK DFSDM1_FLT3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DFSDM1_FLT3_IRQHandler + B DFSDM1_FLT3_IRQHandler + + PUBWEAK SWPMI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SWPMI1_IRQHandler + B SWPMI1_IRQHandler + + PUBWEAK TIM15_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM15_IRQHandler + B TIM15_IRQHandler + + PUBWEAK TIM16_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM16_IRQHandler + B TIM16_IRQHandler + + PUBWEAK TIM17_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM17_IRQHandler + B TIM17_IRQHandler + + PUBWEAK MDIOS_WKUP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +MDIOS_WKUP_IRQHandler + B MDIOS_WKUP_IRQHandler + + PUBWEAK MDIOS_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +MDIOS_IRQHandler + B MDIOS_IRQHandler + + PUBWEAK MDMA_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +MDMA_IRQHandler + B MDMA_IRQHandler + + PUBWEAK SDMMC2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SDMMC2_IRQHandler + B SDMMC2_IRQHandler + + PUBWEAK HSEM1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +HSEM1_IRQHandler + B HSEM1_IRQHandler + + PUBWEAK ADC3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ADC3_IRQHandler + B ADC3_IRQHandler + + PUBWEAK DMAMUX2_OVR_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMAMUX2_OVR_IRQHandler + B DMAMUX2_OVR_IRQHandler + + PUBWEAK BDMA_Channel0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel0_IRQHandler + B BDMA_Channel0_IRQHandler + + PUBWEAK BDMA_Channel1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel1_IRQHandler + B BDMA_Channel1_IRQHandler + + PUBWEAK BDMA_Channel2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel2_IRQHandler + B BDMA_Channel2_IRQHandler + + PUBWEAK BDMA_Channel3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel3_IRQHandler + B BDMA_Channel3_IRQHandler + + PUBWEAK BDMA_Channel4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel4_IRQHandler + B BDMA_Channel4_IRQHandler + + PUBWEAK BDMA_Channel5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel5_IRQHandler + B BDMA_Channel5_IRQHandler + + PUBWEAK BDMA_Channel6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel6_IRQHandler + B BDMA_Channel6_IRQHandler + + PUBWEAK BDMA_Channel7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel7_IRQHandler + B BDMA_Channel7_IRQHandler + + PUBWEAK COMP1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +COMP1_IRQHandler + B COMP1_IRQHandler + + PUBWEAK LPTIM2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM2_IRQHandler + B LPTIM2_IRQHandler + + PUBWEAK LPTIM3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM3_IRQHandler + B LPTIM3_IRQHandler + + PUBWEAK LPTIM4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM4_IRQHandler + B LPTIM4_IRQHandler + + PUBWEAK LPTIM5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM5_IRQHandler + B LPTIM5_IRQHandler + + PUBWEAK LPUART1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPUART1_IRQHandler + B LPUART1_IRQHandler + + PUBWEAK CRS_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +CRS_IRQHandler + B CRS_IRQHandler + + PUBWEAK ECC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ECC_IRQHandler + B ECC_IRQHandler + + PUBWEAK SAI4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SAI4_IRQHandler + B SAI4_IRQHandler + + PUBWEAK DTS_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DTS_IRQHandler + B DTS_IRQHandler + + PUBWEAK WAKEUP_PIN_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +WAKEUP_PIN_IRQHandler + B WAKEUP_PIN_IRQHandler + + PUBWEAK OCTOSPI2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OCTOSPI2_IRQHandler + B OCTOSPI2_IRQHandler + + PUBWEAK FMAC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FMAC_IRQHandler + B FMAC_IRQHandler + + PUBWEAK CORDIC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +CORDIC_IRQHandler + B CORDIC_IRQHandler + + PUBWEAK UART9_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART9_IRQHandler + B UART9_IRQHandler + + PUBWEAK USART10_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART10_IRQHandler + B USART10_IRQHandler + + PUBWEAK I2C5_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C5_EV_IRQHandler + B I2C5_EV_IRQHandler + + PUBWEAK I2C5_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C5_ER_IRQHandler + B I2C5_ER_IRQHandler + + PUBWEAK FDCAN3_IT0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN3_IT0_IRQHandler + B FDCAN3_IT0_IRQHandler + + PUBWEAK FDCAN3_IT1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN3_IT1_IRQHandler + B FDCAN3_IT1_IRQHandler + + PUBWEAK TIM23_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM23_IRQHandler + B TIM23_IRQHandler + + PUBWEAK TIM24_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM24_IRQHandler + B TIM24_IRQHandler + + END +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h725xx.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h725xx.s new file mode 100644 index 0000000..2b33c11 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h725xx.s @@ -0,0 +1,984 @@ +;/******************** (C) COPYRIGHT 2019 STMicroelectronics ******************** +;* File Name : startup_stm32h725xx.s +;* Author : MCD Application Team +;* Description : STM32H725xx devices vector table for EWARM toolchain. +;* This module performs: +;* - Set the initial SP +;* - Set the initial PC == _iar_program_start, +;* - Set the vector table entries with the exceptions ISR +;* address. +;* - Branches to main in the C library (which eventually +;* calls main()). +;* After Reset the Cortex-M processor is in Thread mode, +;* priority is Privileged, and the Stack is set to Main. +;******************************************************************************* +;* @attention +;* +;*

                  © Copyright (c) 2019 STMicroelectronics. +;* All rights reserved.

                  +;* +;* This software component is licensed by ST under BSD 3-Clause license, +;* the "License"; You may not use this file except in compliance with the +;* License. You may obtain a copy of the License at: +;* opensource.org/licenses/BSD-3-Clause +;* +;******************************************************************************* +; +; +; The modules in this file are included in the libraries, and may be replaced +; by any user-defined modules that define the PUBLIC symbol _program_start or +; a user defined start symbol. +; To override the cstartup defined in the library, simply add your modified +; version to the workbench project. +; +; The vector table is normally located at address 0. +; When debugging in RAM, it can be located in RAM, aligned to at least 2^6. +; The name "__vector_table" has special meaning for C-SPY: +; it is where the SP start value is found, and the NVIC vector +; table register (VTOR) is initialized to this address if != 0. +; +; Cortex-M version +; + + MODULE ?cstartup + + ;; Forward declaration of sections. + SECTION CSTACK:DATA:NOROOT(3) + + SECTION .intvec:CODE:NOROOT(2) + + EXTERN __iar_program_start + EXTERN SystemInit + PUBLIC __vector_table + + DATA +__vector_table + DCD sfe(CSTACK) + DCD Reset_Handler ; Reset Handler + + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD MemManage_Handler ; MPU Fault Handler + DCD BusFault_Handler ; Bus Fault Handler + DCD UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WWDG_IRQHandler ; Window WatchDog Interrupt ( wwdg1_it) + DCD PVD_AVD_IRQHandler ; PVD/AVD through EXTI Line detection + DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line + DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line + DCD FLASH_IRQHandler ; FLASH + DCD RCC_IRQHandler ; RCC + DCD EXTI0_IRQHandler ; EXTI Line0 + DCD EXTI1_IRQHandler ; EXTI Line1 + DCD EXTI2_IRQHandler ; EXTI Line2 + DCD EXTI3_IRQHandler ; EXTI Line3 + DCD EXTI4_IRQHandler ; EXTI Line4 + DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 + DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 + DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 + DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 + DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 + DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 + DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 + DCD ADC_IRQHandler ; ADC1, ADC2 + DCD FDCAN1_IT0_IRQHandler ; FDCAN1 interrupt line 0 + DCD FDCAN2_IT0_IRQHandler ; FDCAN2 interrupt line 0 + DCD FDCAN1_IT1_IRQHandler ; FDCAN1 interrupt line 1 + DCD FDCAN2_IT1_IRQHandler ; FDCAN2 interrupt line 1 + DCD EXTI9_5_IRQHandler ; External Line[9:5]s + DCD TIM1_BRK_IRQHandler ; TIM1 Break interrupt + DCD TIM1_UP_IRQHandler ; TIM1 Update + DCD TIM1_TRG_COM_IRQHandler ; TIM1 Trigger and Commutation Interrupt + DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare + DCD TIM2_IRQHandler ; TIM2 + DCD TIM3_IRQHandler ; TIM3 + DCD TIM4_IRQHandler ; TIM4 + DCD I2C1_EV_IRQHandler ; I2C1 Event + DCD I2C1_ER_IRQHandler ; I2C1 Error + DCD I2C2_EV_IRQHandler ; I2C2 Event + DCD I2C2_ER_IRQHandler ; I2C2 Error + DCD SPI1_IRQHandler ; SPI1 + DCD SPI2_IRQHandler ; SPI2 + DCD USART1_IRQHandler ; USART1 + DCD USART2_IRQHandler ; USART2 + DCD USART3_IRQHandler ; USART3 + DCD EXTI15_10_IRQHandler ; External Line[15:10] + DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line + DCD 0 ; Reserved + DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break Interrupt and TIM12 global interrupt + DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update Interrupt and TIM13 global interrupt + DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation Interrupt and TIM14 glob + DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare Interrupt + DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 + DCD FMC_IRQHandler ; FMC + DCD SDMMC1_IRQHandler ; SDMMC1 + DCD TIM5_IRQHandler ; TIM5 + DCD SPI3_IRQHandler ; SPI3 + DCD UART4_IRQHandler ; UART4 + DCD UART5_IRQHandler ; UART5 + DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors + DCD TIM7_IRQHandler ; TIM7 + DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 + DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 + DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 + DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 + DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 + DCD ETH_IRQHandler ; Ethernet + DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line + DCD FDCAN_CAL_IRQHandler ; FDCAN calibration unit interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 + DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 + DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 + DCD USART6_IRQHandler ; USART6 + DCD I2C3_EV_IRQHandler ; I2C3 event + DCD I2C3_ER_IRQHandler ; I2C3 error + DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out + DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In + DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI + DCD OTG_HS_IRQHandler ; USB OTG HS + DCD DCMI_PSSI_IRQHandler ; DCMI, PSSI + DCD 0 ; Reserved + DCD RNG_IRQHandler ; Rng + DCD FPU_IRQHandler ; FPU + DCD UART7_IRQHandler ; UART7 + DCD UART8_IRQHandler ; UART8 + DCD SPI4_IRQHandler ; SPI4 + DCD SPI5_IRQHandler ; SPI5 + DCD SPI6_IRQHandler ; SPI6 + DCD SAI1_IRQHandler ; SAI1 + DCD LTDC_IRQHandler ; LTDC + DCD LTDC_ER_IRQHandler ; LTDC error + DCD DMA2D_IRQHandler ; DMA2D + DCD 0 ; Reserved + DCD OCTOSPI1_IRQHandler ; OCTOSPI1 + DCD LPTIM1_IRQHandler ; LPTIM1 + DCD CEC_IRQHandler ; HDMI_CEC + DCD I2C4_EV_IRQHandler ; I2C4 Event + DCD I2C4_ER_IRQHandler ; I2C4 Error + DCD SPDIF_RX_IRQHandler ; SPDIF_RX + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DMAMUX1_OVR_IRQHandler ; DMAMUX1 Overrun interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DFSDM1_FLT0_IRQHandler ; DFSDM Filter0 Interrupt + DCD DFSDM1_FLT1_IRQHandler ; DFSDM Filter1 Interrupt + DCD DFSDM1_FLT2_IRQHandler ; DFSDM Filter2 Interrupt + DCD DFSDM1_FLT3_IRQHandler ; DFSDM Filter3 Interrupt + DCD 0 ; Reserved + DCD SWPMI1_IRQHandler ; Serial Wire Interface 1 global interrupt + DCD TIM15_IRQHandler ; TIM15 global Interrupt + DCD TIM16_IRQHandler ; TIM16 global Interrupt + DCD TIM17_IRQHandler ; TIM17 global Interrupt + DCD MDIOS_WKUP_IRQHandler ; MDIOS Wakeup Interrupt + DCD MDIOS_IRQHandler ; MDIOS global Interrupt + DCD 0 ; Reserved + DCD MDMA_IRQHandler ; MDMA global Interrupt + DCD 0 ; Reserved + DCD SDMMC2_IRQHandler ; SDMMC2 global Interrupt + DCD HSEM1_IRQHandler ; HSEM1 global Interrupt + DCD 0 ; Reserved + DCD ADC3_IRQHandler ; ADC3 global Interrupt + DCD DMAMUX2_OVR_IRQHandler ; DMAMUX Overrun interrupt + DCD BDMA_Channel0_IRQHandler ; BDMA Channel 0 global Interrupt + DCD BDMA_Channel1_IRQHandler ; BDMA Channel 1 global Interrupt + DCD BDMA_Channel2_IRQHandler ; BDMA Channel 2 global Interrupt + DCD BDMA_Channel3_IRQHandler ; BDMA Channel 3 global Interrupt + DCD BDMA_Channel4_IRQHandler ; BDMA Channel 4 global Interrupt + DCD BDMA_Channel5_IRQHandler ; BDMA Channel 5 global Interrupt + DCD BDMA_Channel6_IRQHandler ; BDMA Channel 6 global Interrupt + DCD BDMA_Channel7_IRQHandler ; BDMA Channel 7 global Interrupt + DCD COMP1_IRQHandler ; COMP1 global Interrupt + DCD LPTIM2_IRQHandler ; LP TIM2 global interrupt + DCD LPTIM3_IRQHandler ; LP TIM3 global interrupt + DCD LPTIM4_IRQHandler ; LP TIM4 global interrupt + DCD LPTIM5_IRQHandler ; LP TIM5 global interrupt + DCD LPUART1_IRQHandler ; LP UART1 interrupt + DCD 0 ; Reserved + DCD CRS_IRQHandler ; Clock Recovery Global Interrupt + DCD ECC_IRQHandler ; ECC diagnostic Global Interrupt + DCD SAI4_IRQHandler ; SAI4 global interrupt + DCD DTS_IRQHandler ; Digital Temperature Sensor + DCD 0 ; Reserved + DCD WAKEUP_PIN_IRQHandler ; Interrupt for all 6 wake-up pins + DCD OCTOSPI2_IRQHandler ; OCTOSPI2 Interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD FMAC_IRQHandler ; FMAC Interrupt + DCD CORDIC_IRQHandler ; CORDIC Interrupt + DCD UART9_IRQHandler ; UART9 Interrupt + DCD USART10_IRQHandler ; USART10 Interrupt + DCD I2C5_EV_IRQHandler ; I2C5 Event Interrupt + DCD I2C5_ER_IRQHandler ; I2C5 Error Interrupt + DCD FDCAN3_IT0_IRQHandler ; FDCAN3 interrupt line 0 + DCD FDCAN3_IT1_IRQHandler ; FDCAN3 interrupt line 1 + DCD TIM23_IRQHandler ; TIM23 global interrup + DCD TIM24_IRQHandler ; TIM24 global interrup + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Default interrupt handlers. +;; + THUMB + PUBWEAK Reset_Handler + SECTION .text:CODE:NOROOT:REORDER(2) +Reset_Handler + + LDR R0, =SystemInit + BLX R0 + LDR R0, =__iar_program_start + BX R0 + + PUBWEAK NMI_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +NMI_Handler + B NMI_Handler + + PUBWEAK HardFault_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +HardFault_Handler + B HardFault_Handler + + PUBWEAK MemManage_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +MemManage_Handler + B MemManage_Handler + + PUBWEAK BusFault_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +BusFault_Handler + B BusFault_Handler + + PUBWEAK UsageFault_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +UsageFault_Handler + B UsageFault_Handler + + PUBWEAK SVC_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +SVC_Handler + B SVC_Handler + + PUBWEAK DebugMon_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +DebugMon_Handler + B DebugMon_Handler + + PUBWEAK PendSV_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +PendSV_Handler + B PendSV_Handler + + PUBWEAK SysTick_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +SysTick_Handler + B SysTick_Handler + + PUBWEAK WWDG_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +WWDG_IRQHandler + B WWDG_IRQHandler + + PUBWEAK PVD_AVD_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +PVD_AVD_IRQHandler + B PVD_AVD_IRQHandler + + PUBWEAK TAMP_STAMP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TAMP_STAMP_IRQHandler + B TAMP_STAMP_IRQHandler + + PUBWEAK RTC_WKUP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +RTC_WKUP_IRQHandler + B RTC_WKUP_IRQHandler + + PUBWEAK FLASH_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FLASH_IRQHandler + B FLASH_IRQHandler + + PUBWEAK RCC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +RCC_IRQHandler + B RCC_IRQHandler + + PUBWEAK EXTI0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI0_IRQHandler + B EXTI0_IRQHandler + + PUBWEAK EXTI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI1_IRQHandler + B EXTI1_IRQHandler + + PUBWEAK EXTI2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI2_IRQHandler + B EXTI2_IRQHandler + + PUBWEAK EXTI3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI3_IRQHandler + B EXTI3_IRQHandler + + PUBWEAK EXTI4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI4_IRQHandler + B EXTI4_IRQHandler + + PUBWEAK DMA1_Stream0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream0_IRQHandler + B DMA1_Stream0_IRQHandler + + PUBWEAK DMA1_Stream1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream1_IRQHandler + B DMA1_Stream1_IRQHandler + + PUBWEAK DMA1_Stream2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream2_IRQHandler + B DMA1_Stream2_IRQHandler + + PUBWEAK DMA1_Stream3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream3_IRQHandler + B DMA1_Stream3_IRQHandler + + PUBWEAK DMA1_Stream4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream4_IRQHandler + B DMA1_Stream4_IRQHandler + + PUBWEAK DMA1_Stream5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream5_IRQHandler + B DMA1_Stream5_IRQHandler + + PUBWEAK DMA1_Stream6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream6_IRQHandler + B DMA1_Stream6_IRQHandler + + PUBWEAK ADC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ADC_IRQHandler + B ADC_IRQHandler + + PUBWEAK FDCAN1_IT0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN1_IT0_IRQHandler + B FDCAN1_IT0_IRQHandler + + PUBWEAK FDCAN2_IT0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN2_IT0_IRQHandler + B FDCAN2_IT0_IRQHandler + + PUBWEAK FDCAN1_IT1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN1_IT1_IRQHandler + B FDCAN1_IT1_IRQHandler + + PUBWEAK FDCAN2_IT1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN2_IT1_IRQHandler + B FDCAN2_IT1_IRQHandler + + PUBWEAK EXTI9_5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI9_5_IRQHandler + B EXTI9_5_IRQHandler + + PUBWEAK TIM1_BRK_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM1_BRK_IRQHandler + B TIM1_BRK_IRQHandler + + PUBWEAK TIM1_UP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM1_UP_IRQHandler + B TIM1_UP_IRQHandler + + PUBWEAK TIM1_TRG_COM_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM1_TRG_COM_IRQHandler + B TIM1_TRG_COM_IRQHandler + + PUBWEAK TIM1_CC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM1_CC_IRQHandler + B TIM1_CC_IRQHandler + + PUBWEAK TIM2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM2_IRQHandler + B TIM2_IRQHandler + + PUBWEAK TIM3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM3_IRQHandler + B TIM3_IRQHandler + + PUBWEAK TIM4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM4_IRQHandler + B TIM4_IRQHandler + + PUBWEAK I2C1_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C1_EV_IRQHandler + B I2C1_EV_IRQHandler + + PUBWEAK I2C1_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C1_ER_IRQHandler + B I2C1_ER_IRQHandler + + PUBWEAK I2C2_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C2_EV_IRQHandler + B I2C2_EV_IRQHandler + + PUBWEAK I2C2_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C2_ER_IRQHandler + B I2C2_ER_IRQHandler + + PUBWEAK SPI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI1_IRQHandler + B SPI1_IRQHandler + + PUBWEAK SPI2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI2_IRQHandler + B SPI2_IRQHandler + + PUBWEAK USART1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART1_IRQHandler + B USART1_IRQHandler + + PUBWEAK USART2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART2_IRQHandler + B USART2_IRQHandler + + PUBWEAK USART3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART3_IRQHandler + B USART3_IRQHandler + + PUBWEAK EXTI15_10_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI15_10_IRQHandler + B EXTI15_10_IRQHandler + + PUBWEAK RTC_Alarm_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +RTC_Alarm_IRQHandler + B RTC_Alarm_IRQHandler + + PUBWEAK TIM8_BRK_TIM12_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM8_BRK_TIM12_IRQHandler + B TIM8_BRK_TIM12_IRQHandler + + PUBWEAK TIM8_UP_TIM13_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM8_UP_TIM13_IRQHandler + B TIM8_UP_TIM13_IRQHandler + + PUBWEAK TIM8_TRG_COM_TIM14_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM8_TRG_COM_TIM14_IRQHandler + B TIM8_TRG_COM_TIM14_IRQHandler + + PUBWEAK TIM8_CC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM8_CC_IRQHandler + B TIM8_CC_IRQHandler + + PUBWEAK DMA1_Stream7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream7_IRQHandler + B DMA1_Stream7_IRQHandler + + PUBWEAK FMC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FMC_IRQHandler + B FMC_IRQHandler + + PUBWEAK SDMMC1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SDMMC1_IRQHandler + B SDMMC1_IRQHandler + + PUBWEAK TIM5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM5_IRQHandler + B TIM5_IRQHandler + + PUBWEAK SPI3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI3_IRQHandler + B SPI3_IRQHandler + + PUBWEAK UART4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART4_IRQHandler + B UART4_IRQHandler + + PUBWEAK UART5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART5_IRQHandler + B UART5_IRQHandler + + PUBWEAK TIM6_DAC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM6_DAC_IRQHandler + B TIM6_DAC_IRQHandler + + PUBWEAK TIM7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM7_IRQHandler + B TIM7_IRQHandler + + PUBWEAK DMA2_Stream0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream0_IRQHandler + B DMA2_Stream0_IRQHandler + + PUBWEAK DMA2_Stream1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream1_IRQHandler + B DMA2_Stream1_IRQHandler + + PUBWEAK DMA2_Stream2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream2_IRQHandler + B DMA2_Stream2_IRQHandler + + PUBWEAK DMA2_Stream3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream3_IRQHandler + B DMA2_Stream3_IRQHandler + + PUBWEAK DMA2_Stream4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream4_IRQHandler + B DMA2_Stream4_IRQHandler + + PUBWEAK ETH_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ETH_IRQHandler + B ETH_IRQHandler + + PUBWEAK ETH_WKUP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ETH_WKUP_IRQHandler + B ETH_WKUP_IRQHandler + + PUBWEAK FDCAN_CAL_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN_CAL_IRQHandler + B FDCAN_CAL_IRQHandler + + PUBWEAK DMA2_Stream5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream5_IRQHandler + B DMA2_Stream5_IRQHandler + + PUBWEAK DMA2_Stream6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream6_IRQHandler + B DMA2_Stream6_IRQHandler + + PUBWEAK DMA2_Stream7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream7_IRQHandler + B DMA2_Stream7_IRQHandler + + PUBWEAK USART6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART6_IRQHandler + B USART6_IRQHandler + + PUBWEAK I2C3_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C3_EV_IRQHandler + B I2C3_EV_IRQHandler + + PUBWEAK I2C3_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C3_ER_IRQHandler + B I2C3_ER_IRQHandler + + PUBWEAK OTG_HS_EP1_OUT_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTG_HS_EP1_OUT_IRQHandler + B OTG_HS_EP1_OUT_IRQHandler + + PUBWEAK OTG_HS_EP1_IN_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTG_HS_EP1_IN_IRQHandler + B OTG_HS_EP1_IN_IRQHandler + + PUBWEAK OTG_HS_WKUP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTG_HS_WKUP_IRQHandler + B OTG_HS_WKUP_IRQHandler + + PUBWEAK OTG_HS_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTG_HS_IRQHandler + B OTG_HS_IRQHandler + + PUBWEAK DCMI_PSSI_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DCMI_PSSI_IRQHandler + B DCMI_PSSI_IRQHandler + + PUBWEAK RNG_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +RNG_IRQHandler + B RNG_IRQHandler + + PUBWEAK FPU_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FPU_IRQHandler + B FPU_IRQHandler + + PUBWEAK UART7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART7_IRQHandler + B UART7_IRQHandler + + PUBWEAK UART8_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART8_IRQHandler + B UART8_IRQHandler + + PUBWEAK SPI4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI4_IRQHandler + B SPI4_IRQHandler + + PUBWEAK SPI5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI5_IRQHandler + B SPI5_IRQHandler + + PUBWEAK SPI6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI6_IRQHandler + B SPI6_IRQHandler + + PUBWEAK SAI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SAI1_IRQHandler + B SAI1_IRQHandler + + PUBWEAK LTDC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LTDC_IRQHandler + B LTDC_IRQHandler + + PUBWEAK LTDC_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LTDC_ER_IRQHandler + B LTDC_ER_IRQHandler + + PUBWEAK DMA2D_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2D_IRQHandler + B DMA2D_IRQHandler + + PUBWEAK OCTOSPI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OCTOSPI1_IRQHandler + B OCTOSPI1_IRQHandler + + PUBWEAK LPTIM1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM1_IRQHandler + B LPTIM1_IRQHandler + + PUBWEAK CEC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +CEC_IRQHandler + B CEC_IRQHandler + + PUBWEAK I2C4_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C4_EV_IRQHandler + B I2C4_EV_IRQHandler + + PUBWEAK I2C4_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C4_ER_IRQHandler + B I2C4_ER_IRQHandler + + PUBWEAK SPDIF_RX_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPDIF_RX_IRQHandler + B SPDIF_RX_IRQHandler + + PUBWEAK DMAMUX1_OVR_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMAMUX1_OVR_IRQHandler + B DMAMUX1_OVR_IRQHandler + + PUBWEAK DFSDM1_FLT0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DFSDM1_FLT0_IRQHandler + B DFSDM1_FLT0_IRQHandler + + PUBWEAK DFSDM1_FLT1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DFSDM1_FLT1_IRQHandler + B DFSDM1_FLT1_IRQHandler + + PUBWEAK DFSDM1_FLT2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DFSDM1_FLT2_IRQHandler + B DFSDM1_FLT2_IRQHandler + + PUBWEAK DFSDM1_FLT3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DFSDM1_FLT3_IRQHandler + B DFSDM1_FLT3_IRQHandler + + PUBWEAK SWPMI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SWPMI1_IRQHandler + B SWPMI1_IRQHandler + + PUBWEAK TIM15_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM15_IRQHandler + B TIM15_IRQHandler + + PUBWEAK TIM16_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM16_IRQHandler + B TIM16_IRQHandler + + PUBWEAK TIM17_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM17_IRQHandler + B TIM17_IRQHandler + + PUBWEAK MDIOS_WKUP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +MDIOS_WKUP_IRQHandler + B MDIOS_WKUP_IRQHandler + + PUBWEAK MDIOS_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +MDIOS_IRQHandler + B MDIOS_IRQHandler + + PUBWEAK MDMA_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +MDMA_IRQHandler + B MDMA_IRQHandler + + PUBWEAK SDMMC2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SDMMC2_IRQHandler + B SDMMC2_IRQHandler + + PUBWEAK HSEM1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +HSEM1_IRQHandler + B HSEM1_IRQHandler + + PUBWEAK ADC3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ADC3_IRQHandler + B ADC3_IRQHandler + + PUBWEAK DMAMUX2_OVR_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMAMUX2_OVR_IRQHandler + B DMAMUX2_OVR_IRQHandler + + PUBWEAK BDMA_Channel0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel0_IRQHandler + B BDMA_Channel0_IRQHandler + + PUBWEAK BDMA_Channel1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel1_IRQHandler + B BDMA_Channel1_IRQHandler + + PUBWEAK BDMA_Channel2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel2_IRQHandler + B BDMA_Channel2_IRQHandler + + PUBWEAK BDMA_Channel3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel3_IRQHandler + B BDMA_Channel3_IRQHandler + + PUBWEAK BDMA_Channel4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel4_IRQHandler + B BDMA_Channel4_IRQHandler + + PUBWEAK BDMA_Channel5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel5_IRQHandler + B BDMA_Channel5_IRQHandler + + PUBWEAK BDMA_Channel6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel6_IRQHandler + B BDMA_Channel6_IRQHandler + + PUBWEAK BDMA_Channel7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel7_IRQHandler + B BDMA_Channel7_IRQHandler + + PUBWEAK COMP1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +COMP1_IRQHandler + B COMP1_IRQHandler + + PUBWEAK LPTIM2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM2_IRQHandler + B LPTIM2_IRQHandler + + PUBWEAK LPTIM3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM3_IRQHandler + B LPTIM3_IRQHandler + + PUBWEAK LPTIM4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM4_IRQHandler + B LPTIM4_IRQHandler + + PUBWEAK LPTIM5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM5_IRQHandler + B LPTIM5_IRQHandler + + PUBWEAK LPUART1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPUART1_IRQHandler + B LPUART1_IRQHandler + + PUBWEAK CRS_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +CRS_IRQHandler + B CRS_IRQHandler + + PUBWEAK ECC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ECC_IRQHandler + B ECC_IRQHandler + + PUBWEAK SAI4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SAI4_IRQHandler + B SAI4_IRQHandler + + PUBWEAK DTS_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DTS_IRQHandler + B DTS_IRQHandler + + PUBWEAK WAKEUP_PIN_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +WAKEUP_PIN_IRQHandler + B WAKEUP_PIN_IRQHandler + + PUBWEAK OCTOSPI2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OCTOSPI2_IRQHandler + B OCTOSPI2_IRQHandler + + PUBWEAK FMAC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FMAC_IRQHandler + B FMAC_IRQHandler + + PUBWEAK CORDIC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +CORDIC_IRQHandler + B CORDIC_IRQHandler + + PUBWEAK UART9_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART9_IRQHandler + B UART9_IRQHandler + + PUBWEAK USART10_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART10_IRQHandler + B USART10_IRQHandler + + PUBWEAK I2C5_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C5_EV_IRQHandler + B I2C5_EV_IRQHandler + + PUBWEAK I2C5_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C5_ER_IRQHandler + B I2C5_ER_IRQHandler + + PUBWEAK FDCAN3_IT0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN3_IT0_IRQHandler + B FDCAN3_IT0_IRQHandler + + PUBWEAK FDCAN3_IT1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN3_IT1_IRQHandler + B FDCAN3_IT1_IRQHandler + + PUBWEAK TIM23_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM23_IRQHandler + B TIM23_IRQHandler + + PUBWEAK TIM24_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM24_IRQHandler + B TIM24_IRQHandler + + END +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h730xx.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h730xx.s new file mode 100644 index 0000000..51aa961 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h730xx.s @@ -0,0 +1,999 @@ +;/******************** (C) COPYRIGHT 2019 STMicroelectronics ******************** +;* File Name : startup_stm32h730xx.s +;* Author : MCD Application Team +;* Description : STM32H730xx devices vector table for EWARM toolchain. +;* This module performs: +;* - Set the initial SP +;* - Set the initial PC == _iar_program_start, +;* - Set the vector table entries with the exceptions ISR +;* address. +;* - Branches to main in the C library (which eventually +;* calls main()). +;* After Reset the Cortex-M processor is in Thread mode, +;* priority is Privileged, and the Stack is set to Main. +;******************************************************************************* +;* @attention +;* +;*

                  © Copyright (c) 2019 STMicroelectronics. +;* All rights reserved.

                  +;* +;* This software component is licensed by ST under BSD 3-Clause license, +;* the "License"; You may not use this file except in compliance with the +;* License. You may obtain a copy of the License at: +;* opensource.org/licenses/BSD-3-Clause +;* +;******************************************************************************* +; +; +; The modules in this file are included in the libraries, and may be replaced +; by any user-defined modules that define the PUBLIC symbol _program_start or +; a user defined start symbol. +; To override the cstartup defined in the library, simply add your modified +; version to the workbench project. +; +; The vector table is normally located at address 0. +; When debugging in RAM, it can be located in RAM, aligned to at least 2^6. +; The name "__vector_table" has special meaning for C-SPY: +; it is where the SP start value is found, and the NVIC vector +; table register (VTOR) is initialized to this address if != 0. +; +; Cortex-M version +; + + MODULE ?cstartup + + ;; Forward declaration of sections. + SECTION CSTACK:DATA:NOROOT(3) + + SECTION .intvec:CODE:NOROOT(2) + + EXTERN __iar_program_start + EXTERN SystemInit + PUBLIC __vector_table + + DATA +__vector_table + DCD sfe(CSTACK) + DCD Reset_Handler ; Reset Handler + + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD MemManage_Handler ; MPU Fault Handler + DCD BusFault_Handler ; Bus Fault Handler + DCD UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WWDG_IRQHandler ; Window WatchDog Interrupt ( wwdg1_it) + DCD PVD_AVD_IRQHandler ; PVD/AVD through EXTI Line detection + DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line + DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line + DCD FLASH_IRQHandler ; FLASH + DCD RCC_IRQHandler ; RCC + DCD EXTI0_IRQHandler ; EXTI Line0 + DCD EXTI1_IRQHandler ; EXTI Line1 + DCD EXTI2_IRQHandler ; EXTI Line2 + DCD EXTI3_IRQHandler ; EXTI Line3 + DCD EXTI4_IRQHandler ; EXTI Line4 + DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 + DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 + DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 + DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 + DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 + DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 + DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 + DCD ADC_IRQHandler ; ADC1, ADC2 + DCD FDCAN1_IT0_IRQHandler ; FDCAN1 interrupt line 0 + DCD FDCAN2_IT0_IRQHandler ; FDCAN2 interrupt line 0 + DCD FDCAN1_IT1_IRQHandler ; FDCAN1 interrupt line 1 + DCD FDCAN2_IT1_IRQHandler ; FDCAN2 interrupt line 1 + DCD EXTI9_5_IRQHandler ; External Line[9:5]s + DCD TIM1_BRK_IRQHandler ; TIM1 Break interrupt + DCD TIM1_UP_IRQHandler ; TIM1 Update + DCD TIM1_TRG_COM_IRQHandler ; TIM1 Trigger and Commutation Interrupt + DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare + DCD TIM2_IRQHandler ; TIM2 + DCD TIM3_IRQHandler ; TIM3 + DCD TIM4_IRQHandler ; TIM4 + DCD I2C1_EV_IRQHandler ; I2C1 Event + DCD I2C1_ER_IRQHandler ; I2C1 Error + DCD I2C2_EV_IRQHandler ; I2C2 Event + DCD I2C2_ER_IRQHandler ; I2C2 Error + DCD SPI1_IRQHandler ; SPI1 + DCD SPI2_IRQHandler ; SPI2 + DCD USART1_IRQHandler ; USART1 + DCD USART2_IRQHandler ; USART2 + DCD USART3_IRQHandler ; USART3 + DCD EXTI15_10_IRQHandler ; External Line[15:10] + DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line + DCD 0 ; Reserved + DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break Interrupt and TIM12 global interrupt + DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update Interrupt and TIM13 global interrupt + DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation Interrupt and TIM14 glob + DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare Interrupt + DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 + DCD FMC_IRQHandler ; FMC + DCD SDMMC1_IRQHandler ; SDMMC1 + DCD TIM5_IRQHandler ; TIM5 + DCD SPI3_IRQHandler ; SPI3 + DCD UART4_IRQHandler ; UART4 + DCD UART5_IRQHandler ; UART5 + DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors + DCD TIM7_IRQHandler ; TIM7 + DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 + DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 + DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 + DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 + DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 + DCD ETH_IRQHandler ; Ethernet + DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line + DCD FDCAN_CAL_IRQHandler ; FDCAN calibration unit interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 + DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 + DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 + DCD USART6_IRQHandler ; USART6 + DCD I2C3_EV_IRQHandler ; I2C3 event + DCD I2C3_ER_IRQHandler ; I2C3 error + DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out + DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In + DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI + DCD OTG_HS_IRQHandler ; USB OTG HS + DCD DCMI_PSSI_IRQHandler ; DCMI, PSSI + DCD CRYP_IRQHandler ; CRYP crypto + DCD HASH_RNG_IRQHandler ; Hash and Rng + DCD FPU_IRQHandler ; FPU + DCD UART7_IRQHandler ; UART7 + DCD UART8_IRQHandler ; UART8 + DCD SPI4_IRQHandler ; SPI4 + DCD SPI5_IRQHandler ; SPI5 + DCD SPI6_IRQHandler ; SPI6 + DCD SAI1_IRQHandler ; SAI1 + DCD LTDC_IRQHandler ; LTDC + DCD LTDC_ER_IRQHandler ; LTDC error + DCD DMA2D_IRQHandler ; DMA2D + DCD 0 ; Reserved + DCD OCTOSPI1_IRQHandler ; OCTOSPI1 + DCD LPTIM1_IRQHandler ; LPTIM1 + DCD CEC_IRQHandler ; HDMI_CEC + DCD I2C4_EV_IRQHandler ; I2C4 Event + DCD I2C4_ER_IRQHandler ; I2C4 Error + DCD SPDIF_RX_IRQHandler ; SPDIF_RX + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DMAMUX1_OVR_IRQHandler ; DMAMUX1 Overrun interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DFSDM1_FLT0_IRQHandler ; DFSDM Filter0 Interrupt + DCD DFSDM1_FLT1_IRQHandler ; DFSDM Filter1 Interrupt + DCD DFSDM1_FLT2_IRQHandler ; DFSDM Filter2 Interrupt + DCD DFSDM1_FLT3_IRQHandler ; DFSDM Filter3 Interrupt + DCD 0 ; Reserved + DCD SWPMI1_IRQHandler ; Serial Wire Interface 1 global interrupt + DCD TIM15_IRQHandler ; TIM15 global Interrupt + DCD TIM16_IRQHandler ; TIM16 global Interrupt + DCD TIM17_IRQHandler ; TIM17 global Interrupt + DCD MDIOS_WKUP_IRQHandler ; MDIOS Wakeup Interrupt + DCD MDIOS_IRQHandler ; MDIOS global Interrupt + DCD 0 ; Reserved + DCD MDMA_IRQHandler ; MDMA global Interrupt + DCD 0 ; Reserved + DCD SDMMC2_IRQHandler ; SDMMC2 global Interrupt + DCD HSEM1_IRQHandler ; HSEM1 global Interrupt + DCD 0 ; Reserved + DCD ADC3_IRQHandler ; ADC3 global Interrupt + DCD DMAMUX2_OVR_IRQHandler ; DMAMUX Overrun interrupt + DCD BDMA_Channel0_IRQHandler ; BDMA Channel 0 global Interrupt + DCD BDMA_Channel1_IRQHandler ; BDMA Channel 1 global Interrupt + DCD BDMA_Channel2_IRQHandler ; BDMA Channel 2 global Interrupt + DCD BDMA_Channel3_IRQHandler ; BDMA Channel 3 global Interrupt + DCD BDMA_Channel4_IRQHandler ; BDMA Channel 4 global Interrupt + DCD BDMA_Channel5_IRQHandler ; BDMA Channel 5 global Interrupt + DCD BDMA_Channel6_IRQHandler ; BDMA Channel 6 global Interrupt + DCD BDMA_Channel7_IRQHandler ; BDMA Channel 7 global Interrupt + DCD COMP1_IRQHandler ; COMP1 global Interrupt + DCD LPTIM2_IRQHandler ; LP TIM2 global interrupt + DCD LPTIM3_IRQHandler ; LP TIM3 global interrupt + DCD LPTIM4_IRQHandler ; LP TIM4 global interrupt + DCD LPTIM5_IRQHandler ; LP TIM5 global interrupt + DCD LPUART1_IRQHandler ; LP UART1 interrupt + DCD 0 ; Reserved + DCD CRS_IRQHandler ; Clock Recovery Global Interrupt + DCD ECC_IRQHandler ; ECC diagnostic Global Interrupt + DCD SAI4_IRQHandler ; SAI4 global interrupt + DCD DTS_IRQHandler ; Digital Temperature Sensor + DCD 0 ; Reserved + DCD WAKEUP_PIN_IRQHandler ; Interrupt for all 6 wake-up pins + DCD OCTOSPI2_IRQHandler ; OCTOSPI2 Interrupt + DCD OTFDEC1_IRQHandler ; OTFDEC1 Interrupt + DCD OTFDEC2_IRQHandler ; OTFDEC2 Interrupt + DCD FMAC_IRQHandler ; FMAC Interrupt + DCD CORDIC_IRQHandler ; CORDIC Interrupt + DCD UART9_IRQHandler ; UART9 Interrupt + DCD USART10_IRQHandler ; USART10 Interrupt + DCD I2C5_EV_IRQHandler ; I2C5 Event Interrupt + DCD I2C5_ER_IRQHandler ; I2C5 Error Interrupt + DCD FDCAN3_IT0_IRQHandler ; FDCAN3 interrupt line 0 + DCD FDCAN3_IT1_IRQHandler ; FDCAN3 interrupt line 1 + DCD TIM23_IRQHandler ; TIM23 global interrup + DCD TIM24_IRQHandler ; TIM24 global interrup + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Default interrupt handlers. +;; + THUMB + PUBWEAK Reset_Handler + SECTION .text:CODE:NOROOT:REORDER(2) +Reset_Handler + + LDR R0, =SystemInit + BLX R0 + LDR R0, =__iar_program_start + BX R0 + + PUBWEAK NMI_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +NMI_Handler + B NMI_Handler + + PUBWEAK HardFault_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +HardFault_Handler + B HardFault_Handler + + PUBWEAK MemManage_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +MemManage_Handler + B MemManage_Handler + + PUBWEAK BusFault_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +BusFault_Handler + B BusFault_Handler + + PUBWEAK UsageFault_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +UsageFault_Handler + B UsageFault_Handler + + PUBWEAK SVC_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +SVC_Handler + B SVC_Handler + + PUBWEAK DebugMon_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +DebugMon_Handler + B DebugMon_Handler + + PUBWEAK PendSV_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +PendSV_Handler + B PendSV_Handler + + PUBWEAK SysTick_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +SysTick_Handler + B SysTick_Handler + + PUBWEAK WWDG_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +WWDG_IRQHandler + B WWDG_IRQHandler + + PUBWEAK PVD_AVD_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +PVD_AVD_IRQHandler + B PVD_AVD_IRQHandler + + PUBWEAK TAMP_STAMP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TAMP_STAMP_IRQHandler + B TAMP_STAMP_IRQHandler + + PUBWEAK RTC_WKUP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +RTC_WKUP_IRQHandler + B RTC_WKUP_IRQHandler + + PUBWEAK FLASH_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FLASH_IRQHandler + B FLASH_IRQHandler + + PUBWEAK RCC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +RCC_IRQHandler + B RCC_IRQHandler + + PUBWEAK EXTI0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI0_IRQHandler + B EXTI0_IRQHandler + + PUBWEAK EXTI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI1_IRQHandler + B EXTI1_IRQHandler + + PUBWEAK EXTI2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI2_IRQHandler + B EXTI2_IRQHandler + + PUBWEAK EXTI3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI3_IRQHandler + B EXTI3_IRQHandler + + PUBWEAK EXTI4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI4_IRQHandler + B EXTI4_IRQHandler + + PUBWEAK DMA1_Stream0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream0_IRQHandler + B DMA1_Stream0_IRQHandler + + PUBWEAK DMA1_Stream1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream1_IRQHandler + B DMA1_Stream1_IRQHandler + + PUBWEAK DMA1_Stream2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream2_IRQHandler + B DMA1_Stream2_IRQHandler + + PUBWEAK DMA1_Stream3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream3_IRQHandler + B DMA1_Stream3_IRQHandler + + PUBWEAK DMA1_Stream4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream4_IRQHandler + B DMA1_Stream4_IRQHandler + + PUBWEAK DMA1_Stream5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream5_IRQHandler + B DMA1_Stream5_IRQHandler + + PUBWEAK DMA1_Stream6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream6_IRQHandler + B DMA1_Stream6_IRQHandler + + PUBWEAK ADC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ADC_IRQHandler + B ADC_IRQHandler + + PUBWEAK FDCAN1_IT0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN1_IT0_IRQHandler + B FDCAN1_IT0_IRQHandler + + PUBWEAK FDCAN2_IT0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN2_IT0_IRQHandler + B FDCAN2_IT0_IRQHandler + + PUBWEAK FDCAN1_IT1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN1_IT1_IRQHandler + B FDCAN1_IT1_IRQHandler + + PUBWEAK FDCAN2_IT1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN2_IT1_IRQHandler + B FDCAN2_IT1_IRQHandler + + PUBWEAK EXTI9_5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI9_5_IRQHandler + B EXTI9_5_IRQHandler + + PUBWEAK TIM1_BRK_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM1_BRK_IRQHandler + B TIM1_BRK_IRQHandler + + PUBWEAK TIM1_UP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM1_UP_IRQHandler + B TIM1_UP_IRQHandler + + PUBWEAK TIM1_TRG_COM_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM1_TRG_COM_IRQHandler + B TIM1_TRG_COM_IRQHandler + + PUBWEAK TIM1_CC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM1_CC_IRQHandler + B TIM1_CC_IRQHandler + + PUBWEAK TIM2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM2_IRQHandler + B TIM2_IRQHandler + + PUBWEAK TIM3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM3_IRQHandler + B TIM3_IRQHandler + + PUBWEAK TIM4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM4_IRQHandler + B TIM4_IRQHandler + + PUBWEAK I2C1_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C1_EV_IRQHandler + B I2C1_EV_IRQHandler + + PUBWEAK I2C1_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C1_ER_IRQHandler + B I2C1_ER_IRQHandler + + PUBWEAK I2C2_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C2_EV_IRQHandler + B I2C2_EV_IRQHandler + + PUBWEAK I2C2_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C2_ER_IRQHandler + B I2C2_ER_IRQHandler + + PUBWEAK SPI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI1_IRQHandler + B SPI1_IRQHandler + + PUBWEAK SPI2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI2_IRQHandler + B SPI2_IRQHandler + + PUBWEAK USART1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART1_IRQHandler + B USART1_IRQHandler + + PUBWEAK USART2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART2_IRQHandler + B USART2_IRQHandler + + PUBWEAK USART3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART3_IRQHandler + B USART3_IRQHandler + + PUBWEAK EXTI15_10_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI15_10_IRQHandler + B EXTI15_10_IRQHandler + + PUBWEAK RTC_Alarm_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +RTC_Alarm_IRQHandler + B RTC_Alarm_IRQHandler + + PUBWEAK TIM8_BRK_TIM12_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM8_BRK_TIM12_IRQHandler + B TIM8_BRK_TIM12_IRQHandler + + PUBWEAK TIM8_UP_TIM13_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM8_UP_TIM13_IRQHandler + B TIM8_UP_TIM13_IRQHandler + + PUBWEAK TIM8_TRG_COM_TIM14_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM8_TRG_COM_TIM14_IRQHandler + B TIM8_TRG_COM_TIM14_IRQHandler + + PUBWEAK TIM8_CC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM8_CC_IRQHandler + B TIM8_CC_IRQHandler + + PUBWEAK DMA1_Stream7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream7_IRQHandler + B DMA1_Stream7_IRQHandler + + PUBWEAK FMC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FMC_IRQHandler + B FMC_IRQHandler + + PUBWEAK SDMMC1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SDMMC1_IRQHandler + B SDMMC1_IRQHandler + + PUBWEAK TIM5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM5_IRQHandler + B TIM5_IRQHandler + + PUBWEAK SPI3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI3_IRQHandler + B SPI3_IRQHandler + + PUBWEAK UART4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART4_IRQHandler + B UART4_IRQHandler + + PUBWEAK UART5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART5_IRQHandler + B UART5_IRQHandler + + PUBWEAK TIM6_DAC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM6_DAC_IRQHandler + B TIM6_DAC_IRQHandler + + PUBWEAK TIM7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM7_IRQHandler + B TIM7_IRQHandler + + PUBWEAK DMA2_Stream0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream0_IRQHandler + B DMA2_Stream0_IRQHandler + + PUBWEAK DMA2_Stream1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream1_IRQHandler + B DMA2_Stream1_IRQHandler + + PUBWEAK DMA2_Stream2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream2_IRQHandler + B DMA2_Stream2_IRQHandler + + PUBWEAK DMA2_Stream3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream3_IRQHandler + B DMA2_Stream3_IRQHandler + + PUBWEAK DMA2_Stream4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream4_IRQHandler + B DMA2_Stream4_IRQHandler + + PUBWEAK ETH_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ETH_IRQHandler + B ETH_IRQHandler + + PUBWEAK ETH_WKUP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ETH_WKUP_IRQHandler + B ETH_WKUP_IRQHandler + + PUBWEAK FDCAN_CAL_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN_CAL_IRQHandler + B FDCAN_CAL_IRQHandler + + PUBWEAK DMA2_Stream5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream5_IRQHandler + B DMA2_Stream5_IRQHandler + + PUBWEAK DMA2_Stream6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream6_IRQHandler + B DMA2_Stream6_IRQHandler + + PUBWEAK DMA2_Stream7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream7_IRQHandler + B DMA2_Stream7_IRQHandler + + PUBWEAK USART6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART6_IRQHandler + B USART6_IRQHandler + + PUBWEAK I2C3_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C3_EV_IRQHandler + B I2C3_EV_IRQHandler + + PUBWEAK I2C3_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C3_ER_IRQHandler + B I2C3_ER_IRQHandler + + PUBWEAK OTG_HS_EP1_OUT_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTG_HS_EP1_OUT_IRQHandler + B OTG_HS_EP1_OUT_IRQHandler + + PUBWEAK OTG_HS_EP1_IN_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTG_HS_EP1_IN_IRQHandler + B OTG_HS_EP1_IN_IRQHandler + + PUBWEAK OTG_HS_WKUP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTG_HS_WKUP_IRQHandler + B OTG_HS_WKUP_IRQHandler + + PUBWEAK OTG_HS_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTG_HS_IRQHandler + B OTG_HS_IRQHandler + + PUBWEAK DCMI_PSSI_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DCMI_PSSI_IRQHandler + B DCMI_PSSI_IRQHandler + + PUBWEAK CRYP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +CRYP_IRQHandler + B CRYP_IRQHandler + + PUBWEAK HASH_RNG_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +HASH_RNG_IRQHandler + B HASH_RNG_IRQHandler + + PUBWEAK FPU_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FPU_IRQHandler + B FPU_IRQHandler + + PUBWEAK UART7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART7_IRQHandler + B UART7_IRQHandler + + PUBWEAK UART8_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART8_IRQHandler + B UART8_IRQHandler + + PUBWEAK SPI4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI4_IRQHandler + B SPI4_IRQHandler + + PUBWEAK SPI5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI5_IRQHandler + B SPI5_IRQHandler + + PUBWEAK SPI6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI6_IRQHandler + B SPI6_IRQHandler + + PUBWEAK SAI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SAI1_IRQHandler + B SAI1_IRQHandler + + PUBWEAK LTDC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LTDC_IRQHandler + B LTDC_IRQHandler + + PUBWEAK LTDC_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LTDC_ER_IRQHandler + B LTDC_ER_IRQHandler + + PUBWEAK DMA2D_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2D_IRQHandler + B DMA2D_IRQHandler + + PUBWEAK OCTOSPI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OCTOSPI1_IRQHandler + B OCTOSPI1_IRQHandler + + PUBWEAK LPTIM1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM1_IRQHandler + B LPTIM1_IRQHandler + + PUBWEAK CEC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +CEC_IRQHandler + B CEC_IRQHandler + + PUBWEAK I2C4_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C4_EV_IRQHandler + B I2C4_EV_IRQHandler + + PUBWEAK I2C4_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C4_ER_IRQHandler + B I2C4_ER_IRQHandler + + PUBWEAK SPDIF_RX_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPDIF_RX_IRQHandler + B SPDIF_RX_IRQHandler + + PUBWEAK DMAMUX1_OVR_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMAMUX1_OVR_IRQHandler + B DMAMUX1_OVR_IRQHandler + + PUBWEAK DFSDM1_FLT0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DFSDM1_FLT0_IRQHandler + B DFSDM1_FLT0_IRQHandler + + PUBWEAK DFSDM1_FLT1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DFSDM1_FLT1_IRQHandler + B DFSDM1_FLT1_IRQHandler + + PUBWEAK DFSDM1_FLT2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DFSDM1_FLT2_IRQHandler + B DFSDM1_FLT2_IRQHandler + + PUBWEAK DFSDM1_FLT3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DFSDM1_FLT3_IRQHandler + B DFSDM1_FLT3_IRQHandler + + PUBWEAK SWPMI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SWPMI1_IRQHandler + B SWPMI1_IRQHandler + + PUBWEAK TIM15_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM15_IRQHandler + B TIM15_IRQHandler + + PUBWEAK TIM16_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM16_IRQHandler + B TIM16_IRQHandler + + PUBWEAK TIM17_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM17_IRQHandler + B TIM17_IRQHandler + + PUBWEAK MDIOS_WKUP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +MDIOS_WKUP_IRQHandler + B MDIOS_WKUP_IRQHandler + + PUBWEAK MDIOS_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +MDIOS_IRQHandler + B MDIOS_IRQHandler + + PUBWEAK MDMA_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +MDMA_IRQHandler + B MDMA_IRQHandler + + PUBWEAK SDMMC2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SDMMC2_IRQHandler + B SDMMC2_IRQHandler + + PUBWEAK HSEM1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +HSEM1_IRQHandler + B HSEM1_IRQHandler + + PUBWEAK ADC3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ADC3_IRQHandler + B ADC3_IRQHandler + + PUBWEAK DMAMUX2_OVR_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMAMUX2_OVR_IRQHandler + B DMAMUX2_OVR_IRQHandler + + PUBWEAK BDMA_Channel0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel0_IRQHandler + B BDMA_Channel0_IRQHandler + + PUBWEAK BDMA_Channel1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel1_IRQHandler + B BDMA_Channel1_IRQHandler + + PUBWEAK BDMA_Channel2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel2_IRQHandler + B BDMA_Channel2_IRQHandler + + PUBWEAK BDMA_Channel3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel3_IRQHandler + B BDMA_Channel3_IRQHandler + + PUBWEAK BDMA_Channel4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel4_IRQHandler + B BDMA_Channel4_IRQHandler + + PUBWEAK BDMA_Channel5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel5_IRQHandler + B BDMA_Channel5_IRQHandler + + PUBWEAK BDMA_Channel6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel6_IRQHandler + B BDMA_Channel6_IRQHandler + + PUBWEAK BDMA_Channel7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel7_IRQHandler + B BDMA_Channel7_IRQHandler + + PUBWEAK COMP1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +COMP1_IRQHandler + B COMP1_IRQHandler + + PUBWEAK LPTIM2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM2_IRQHandler + B LPTIM2_IRQHandler + + PUBWEAK LPTIM3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM3_IRQHandler + B LPTIM3_IRQHandler + + PUBWEAK LPTIM4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM4_IRQHandler + B LPTIM4_IRQHandler + + PUBWEAK LPTIM5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM5_IRQHandler + B LPTIM5_IRQHandler + + PUBWEAK LPUART1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPUART1_IRQHandler + B LPUART1_IRQHandler + + PUBWEAK CRS_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +CRS_IRQHandler + B CRS_IRQHandler + + PUBWEAK ECC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ECC_IRQHandler + B ECC_IRQHandler + + PUBWEAK SAI4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SAI4_IRQHandler + B SAI4_IRQHandler + + PUBWEAK DTS_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DTS_IRQHandler + B DTS_IRQHandler + + PUBWEAK WAKEUP_PIN_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +WAKEUP_PIN_IRQHandler + B WAKEUP_PIN_IRQHandler + + PUBWEAK OCTOSPI2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OCTOSPI2_IRQHandler + B OCTOSPI2_IRQHandler + + PUBWEAK OTFDEC1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTFDEC1_IRQHandler + B OTFDEC1_IRQHandler + + PUBWEAK OTFDEC2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTFDEC2_IRQHandler + B OTFDEC2_IRQHandler + + PUBWEAK FMAC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FMAC_IRQHandler + B FMAC_IRQHandler + + PUBWEAK CORDIC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +CORDIC_IRQHandler + B CORDIC_IRQHandler + + PUBWEAK UART9_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART9_IRQHandler + B UART9_IRQHandler + + PUBWEAK USART10_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART10_IRQHandler + B USART10_IRQHandler + + PUBWEAK I2C5_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C5_EV_IRQHandler + B I2C5_EV_IRQHandler + + PUBWEAK I2C5_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C5_ER_IRQHandler + B I2C5_ER_IRQHandler + + PUBWEAK FDCAN3_IT0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN3_IT0_IRQHandler + B FDCAN3_IT0_IRQHandler + + PUBWEAK FDCAN3_IT1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN3_IT1_IRQHandler + B FDCAN3_IT1_IRQHandler + + PUBWEAK TIM23_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM23_IRQHandler + B TIM23_IRQHandler + + PUBWEAK TIM24_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM24_IRQHandler + B TIM24_IRQHandler + + END +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h730xxq.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h730xxq.s new file mode 100644 index 0000000..fcd3d78 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h730xxq.s @@ -0,0 +1,999 @@ +;/******************** (C) COPYRIGHT 2019 STMicroelectronics ******************** +;* File Name : startup_stm32h730xxq.s +;* Author : MCD Application Team +;* Description : STM32H730xxQ devices vector table for EWARM toolchain. +;* This module performs: +;* - Set the initial SP +;* - Set the initial PC == _iar_program_start, +;* - Set the vector table entries with the exceptions ISR +;* address. +;* - Branches to main in the C library (which eventually +;* calls main()). +;* After Reset the Cortex-M processor is in Thread mode, +;* priority is Privileged, and the Stack is set to Main. +;******************************************************************************* +;* @attention +;* +;*

                  © Copyright (c) 2019 STMicroelectronics. +;* All rights reserved.

                  +;* +;* This software component is licensed by ST under BSD 3-Clause license, +;* the "License"; You may not use this file except in compliance with the +;* License. You may obtain a copy of the License at: +;* opensource.org/licenses/BSD-3-Clause +;* +;******************************************************************************* +; +; +; The modules in this file are included in the libraries, and may be replaced +; by any user-defined modules that define the PUBLIC symbol _program_start or +; a user defined start symbol. +; To override the cstartup defined in the library, simply add your modified +; version to the workbench project. +; +; The vector table is normally located at address 0. +; When debugging in RAM, it can be located in RAM, aligned to at least 2^6. +; The name "__vector_table" has special meaning for C-SPY: +; it is where the SP start value is found, and the NVIC vector +; table register (VTOR) is initialized to this address if != 0. +; +; Cortex-M version +; + + MODULE ?cstartup + + ;; Forward declaration of sections. + SECTION CSTACK:DATA:NOROOT(3) + + SECTION .intvec:CODE:NOROOT(2) + + EXTERN __iar_program_start + EXTERN SystemInit + PUBLIC __vector_table + + DATA +__vector_table + DCD sfe(CSTACK) + DCD Reset_Handler ; Reset Handler + + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD MemManage_Handler ; MPU Fault Handler + DCD BusFault_Handler ; Bus Fault Handler + DCD UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WWDG_IRQHandler ; Window WatchDog Interrupt ( wwdg1_it) + DCD PVD_AVD_IRQHandler ; PVD/AVD through EXTI Line detection + DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line + DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line + DCD FLASH_IRQHandler ; FLASH + DCD RCC_IRQHandler ; RCC + DCD EXTI0_IRQHandler ; EXTI Line0 + DCD EXTI1_IRQHandler ; EXTI Line1 + DCD EXTI2_IRQHandler ; EXTI Line2 + DCD EXTI3_IRQHandler ; EXTI Line3 + DCD EXTI4_IRQHandler ; EXTI Line4 + DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 + DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 + DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 + DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 + DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 + DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 + DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 + DCD ADC_IRQHandler ; ADC1, ADC2 + DCD FDCAN1_IT0_IRQHandler ; FDCAN1 interrupt line 0 + DCD FDCAN2_IT0_IRQHandler ; FDCAN2 interrupt line 0 + DCD FDCAN1_IT1_IRQHandler ; FDCAN1 interrupt line 1 + DCD FDCAN2_IT1_IRQHandler ; FDCAN2 interrupt line 1 + DCD EXTI9_5_IRQHandler ; External Line[9:5]s + DCD TIM1_BRK_IRQHandler ; TIM1 Break interrupt + DCD TIM1_UP_IRQHandler ; TIM1 Update + DCD TIM1_TRG_COM_IRQHandler ; TIM1 Trigger and Commutation Interrupt + DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare + DCD TIM2_IRQHandler ; TIM2 + DCD TIM3_IRQHandler ; TIM3 + DCD TIM4_IRQHandler ; TIM4 + DCD I2C1_EV_IRQHandler ; I2C1 Event + DCD I2C1_ER_IRQHandler ; I2C1 Error + DCD I2C2_EV_IRQHandler ; I2C2 Event + DCD I2C2_ER_IRQHandler ; I2C2 Error + DCD SPI1_IRQHandler ; SPI1 + DCD SPI2_IRQHandler ; SPI2 + DCD USART1_IRQHandler ; USART1 + DCD USART2_IRQHandler ; USART2 + DCD USART3_IRQHandler ; USART3 + DCD EXTI15_10_IRQHandler ; External Line[15:10] + DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line + DCD 0 ; Reserved + DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break Interrupt and TIM12 global interrupt + DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update Interrupt and TIM13 global interrupt + DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation Interrupt and TIM14 glob + DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare Interrupt + DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 + DCD FMC_IRQHandler ; FMC + DCD SDMMC1_IRQHandler ; SDMMC1 + DCD TIM5_IRQHandler ; TIM5 + DCD SPI3_IRQHandler ; SPI3 + DCD UART4_IRQHandler ; UART4 + DCD UART5_IRQHandler ; UART5 + DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors + DCD TIM7_IRQHandler ; TIM7 + DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 + DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 + DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 + DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 + DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 + DCD ETH_IRQHandler ; Ethernet + DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line + DCD FDCAN_CAL_IRQHandler ; FDCAN calibration unit interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 + DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 + DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 + DCD USART6_IRQHandler ; USART6 + DCD I2C3_EV_IRQHandler ; I2C3 event + DCD I2C3_ER_IRQHandler ; I2C3 error + DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out + DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In + DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI + DCD OTG_HS_IRQHandler ; USB OTG HS + DCD DCMI_PSSI_IRQHandler ; DCMI, PSSI + DCD CRYP_IRQHandler ; CRYP crypto + DCD HASH_RNG_IRQHandler ; Hash and Rng + DCD FPU_IRQHandler ; FPU + DCD UART7_IRQHandler ; UART7 + DCD UART8_IRQHandler ; UART8 + DCD SPI4_IRQHandler ; SPI4 + DCD SPI5_IRQHandler ; SPI5 + DCD SPI6_IRQHandler ; SPI6 + DCD SAI1_IRQHandler ; SAI1 + DCD LTDC_IRQHandler ; LTDC + DCD LTDC_ER_IRQHandler ; LTDC error + DCD DMA2D_IRQHandler ; DMA2D + DCD 0 ; Reserved + DCD OCTOSPI1_IRQHandler ; OCTOSPI1 + DCD LPTIM1_IRQHandler ; LPTIM1 + DCD CEC_IRQHandler ; HDMI_CEC + DCD I2C4_EV_IRQHandler ; I2C4 Event + DCD I2C4_ER_IRQHandler ; I2C4 Error + DCD SPDIF_RX_IRQHandler ; SPDIF_RX + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DMAMUX1_OVR_IRQHandler ; DMAMUX1 Overrun interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DFSDM1_FLT0_IRQHandler ; DFSDM Filter0 Interrupt + DCD DFSDM1_FLT1_IRQHandler ; DFSDM Filter1 Interrupt + DCD DFSDM1_FLT2_IRQHandler ; DFSDM Filter2 Interrupt + DCD DFSDM1_FLT3_IRQHandler ; DFSDM Filter3 Interrupt + DCD 0 ; Reserved + DCD SWPMI1_IRQHandler ; Serial Wire Interface 1 global interrupt + DCD TIM15_IRQHandler ; TIM15 global Interrupt + DCD TIM16_IRQHandler ; TIM16 global Interrupt + DCD TIM17_IRQHandler ; TIM17 global Interrupt + DCD MDIOS_WKUP_IRQHandler ; MDIOS Wakeup Interrupt + DCD MDIOS_IRQHandler ; MDIOS global Interrupt + DCD 0 ; Reserved + DCD MDMA_IRQHandler ; MDMA global Interrupt + DCD 0 ; Reserved + DCD SDMMC2_IRQHandler ; SDMMC2 global Interrupt + DCD HSEM1_IRQHandler ; HSEM1 global Interrupt + DCD 0 ; Reserved + DCD ADC3_IRQHandler ; ADC3 global Interrupt + DCD DMAMUX2_OVR_IRQHandler ; DMAMUX Overrun interrupt + DCD BDMA_Channel0_IRQHandler ; BDMA Channel 0 global Interrupt + DCD BDMA_Channel1_IRQHandler ; BDMA Channel 1 global Interrupt + DCD BDMA_Channel2_IRQHandler ; BDMA Channel 2 global Interrupt + DCD BDMA_Channel3_IRQHandler ; BDMA Channel 3 global Interrupt + DCD BDMA_Channel4_IRQHandler ; BDMA Channel 4 global Interrupt + DCD BDMA_Channel5_IRQHandler ; BDMA Channel 5 global Interrupt + DCD BDMA_Channel6_IRQHandler ; BDMA Channel 6 global Interrupt + DCD BDMA_Channel7_IRQHandler ; BDMA Channel 7 global Interrupt + DCD COMP1_IRQHandler ; COMP1 global Interrupt + DCD LPTIM2_IRQHandler ; LP TIM2 global interrupt + DCD LPTIM3_IRQHandler ; LP TIM3 global interrupt + DCD LPTIM4_IRQHandler ; LP TIM4 global interrupt + DCD LPTIM5_IRQHandler ; LP TIM5 global interrupt + DCD LPUART1_IRQHandler ; LP UART1 interrupt + DCD 0 ; Reserved + DCD CRS_IRQHandler ; Clock Recovery Global Interrupt + DCD ECC_IRQHandler ; ECC diagnostic Global Interrupt + DCD SAI4_IRQHandler ; SAI4 global interrupt + DCD DTS_IRQHandler ; Digital Temperature Sensor + DCD 0 ; Reserved + DCD WAKEUP_PIN_IRQHandler ; Interrupt for all 6 wake-up pins + DCD OCTOSPI2_IRQHandler ; OCTOSPI2 Interrupt + DCD OTFDEC1_IRQHandler ; OTFDEC1 Interrupt + DCD OTFDEC2_IRQHandler ; OTFDEC2 Interrupt + DCD FMAC_IRQHandler ; FMAC Interrupt + DCD CORDIC_IRQHandler ; CORDIC Interrupt + DCD UART9_IRQHandler ; UART9 Interrupt + DCD USART10_IRQHandler ; USART10 Interrupt + DCD I2C5_EV_IRQHandler ; I2C5 Event Interrupt + DCD I2C5_ER_IRQHandler ; I2C5 Error Interrupt + DCD FDCAN3_IT0_IRQHandler ; FDCAN3 interrupt line 0 + DCD FDCAN3_IT1_IRQHandler ; FDCAN3 interrupt line 1 + DCD TIM23_IRQHandler ; TIM23 global interrup + DCD TIM24_IRQHandler ; TIM24 global interrup + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Default interrupt handlers. +;; + THUMB + PUBWEAK Reset_Handler + SECTION .text:CODE:NOROOT:REORDER(2) +Reset_Handler + + LDR R0, =SystemInit + BLX R0 + LDR R0, =__iar_program_start + BX R0 + + PUBWEAK NMI_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +NMI_Handler + B NMI_Handler + + PUBWEAK HardFault_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +HardFault_Handler + B HardFault_Handler + + PUBWEAK MemManage_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +MemManage_Handler + B MemManage_Handler + + PUBWEAK BusFault_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +BusFault_Handler + B BusFault_Handler + + PUBWEAK UsageFault_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +UsageFault_Handler + B UsageFault_Handler + + PUBWEAK SVC_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +SVC_Handler + B SVC_Handler + + PUBWEAK DebugMon_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +DebugMon_Handler + B DebugMon_Handler + + PUBWEAK PendSV_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +PendSV_Handler + B PendSV_Handler + + PUBWEAK SysTick_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +SysTick_Handler + B SysTick_Handler + + PUBWEAK WWDG_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +WWDG_IRQHandler + B WWDG_IRQHandler + + PUBWEAK PVD_AVD_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +PVD_AVD_IRQHandler + B PVD_AVD_IRQHandler + + PUBWEAK TAMP_STAMP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TAMP_STAMP_IRQHandler + B TAMP_STAMP_IRQHandler + + PUBWEAK RTC_WKUP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +RTC_WKUP_IRQHandler + B RTC_WKUP_IRQHandler + + PUBWEAK FLASH_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FLASH_IRQHandler + B FLASH_IRQHandler + + PUBWEAK RCC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +RCC_IRQHandler + B RCC_IRQHandler + + PUBWEAK EXTI0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI0_IRQHandler + B EXTI0_IRQHandler + + PUBWEAK EXTI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI1_IRQHandler + B EXTI1_IRQHandler + + PUBWEAK EXTI2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI2_IRQHandler + B EXTI2_IRQHandler + + PUBWEAK EXTI3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI3_IRQHandler + B EXTI3_IRQHandler + + PUBWEAK EXTI4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI4_IRQHandler + B EXTI4_IRQHandler + + PUBWEAK DMA1_Stream0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream0_IRQHandler + B DMA1_Stream0_IRQHandler + + PUBWEAK DMA1_Stream1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream1_IRQHandler + B DMA1_Stream1_IRQHandler + + PUBWEAK DMA1_Stream2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream2_IRQHandler + B DMA1_Stream2_IRQHandler + + PUBWEAK DMA1_Stream3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream3_IRQHandler + B DMA1_Stream3_IRQHandler + + PUBWEAK DMA1_Stream4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream4_IRQHandler + B DMA1_Stream4_IRQHandler + + PUBWEAK DMA1_Stream5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream5_IRQHandler + B DMA1_Stream5_IRQHandler + + PUBWEAK DMA1_Stream6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream6_IRQHandler + B DMA1_Stream6_IRQHandler + + PUBWEAK ADC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ADC_IRQHandler + B ADC_IRQHandler + + PUBWEAK FDCAN1_IT0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN1_IT0_IRQHandler + B FDCAN1_IT0_IRQHandler + + PUBWEAK FDCAN2_IT0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN2_IT0_IRQHandler + B FDCAN2_IT0_IRQHandler + + PUBWEAK FDCAN1_IT1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN1_IT1_IRQHandler + B FDCAN1_IT1_IRQHandler + + PUBWEAK FDCAN2_IT1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN2_IT1_IRQHandler + B FDCAN2_IT1_IRQHandler + + PUBWEAK EXTI9_5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI9_5_IRQHandler + B EXTI9_5_IRQHandler + + PUBWEAK TIM1_BRK_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM1_BRK_IRQHandler + B TIM1_BRK_IRQHandler + + PUBWEAK TIM1_UP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM1_UP_IRQHandler + B TIM1_UP_IRQHandler + + PUBWEAK TIM1_TRG_COM_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM1_TRG_COM_IRQHandler + B TIM1_TRG_COM_IRQHandler + + PUBWEAK TIM1_CC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM1_CC_IRQHandler + B TIM1_CC_IRQHandler + + PUBWEAK TIM2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM2_IRQHandler + B TIM2_IRQHandler + + PUBWEAK TIM3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM3_IRQHandler + B TIM3_IRQHandler + + PUBWEAK TIM4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM4_IRQHandler + B TIM4_IRQHandler + + PUBWEAK I2C1_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C1_EV_IRQHandler + B I2C1_EV_IRQHandler + + PUBWEAK I2C1_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C1_ER_IRQHandler + B I2C1_ER_IRQHandler + + PUBWEAK I2C2_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C2_EV_IRQHandler + B I2C2_EV_IRQHandler + + PUBWEAK I2C2_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C2_ER_IRQHandler + B I2C2_ER_IRQHandler + + PUBWEAK SPI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI1_IRQHandler + B SPI1_IRQHandler + + PUBWEAK SPI2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI2_IRQHandler + B SPI2_IRQHandler + + PUBWEAK USART1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART1_IRQHandler + B USART1_IRQHandler + + PUBWEAK USART2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART2_IRQHandler + B USART2_IRQHandler + + PUBWEAK USART3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART3_IRQHandler + B USART3_IRQHandler + + PUBWEAK EXTI15_10_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI15_10_IRQHandler + B EXTI15_10_IRQHandler + + PUBWEAK RTC_Alarm_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +RTC_Alarm_IRQHandler + B RTC_Alarm_IRQHandler + + PUBWEAK TIM8_BRK_TIM12_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM8_BRK_TIM12_IRQHandler + B TIM8_BRK_TIM12_IRQHandler + + PUBWEAK TIM8_UP_TIM13_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM8_UP_TIM13_IRQHandler + B TIM8_UP_TIM13_IRQHandler + + PUBWEAK TIM8_TRG_COM_TIM14_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM8_TRG_COM_TIM14_IRQHandler + B TIM8_TRG_COM_TIM14_IRQHandler + + PUBWEAK TIM8_CC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM8_CC_IRQHandler + B TIM8_CC_IRQHandler + + PUBWEAK DMA1_Stream7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream7_IRQHandler + B DMA1_Stream7_IRQHandler + + PUBWEAK FMC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FMC_IRQHandler + B FMC_IRQHandler + + PUBWEAK SDMMC1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SDMMC1_IRQHandler + B SDMMC1_IRQHandler + + PUBWEAK TIM5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM5_IRQHandler + B TIM5_IRQHandler + + PUBWEAK SPI3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI3_IRQHandler + B SPI3_IRQHandler + + PUBWEAK UART4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART4_IRQHandler + B UART4_IRQHandler + + PUBWEAK UART5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART5_IRQHandler + B UART5_IRQHandler + + PUBWEAK TIM6_DAC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM6_DAC_IRQHandler + B TIM6_DAC_IRQHandler + + PUBWEAK TIM7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM7_IRQHandler + B TIM7_IRQHandler + + PUBWEAK DMA2_Stream0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream0_IRQHandler + B DMA2_Stream0_IRQHandler + + PUBWEAK DMA2_Stream1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream1_IRQHandler + B DMA2_Stream1_IRQHandler + + PUBWEAK DMA2_Stream2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream2_IRQHandler + B DMA2_Stream2_IRQHandler + + PUBWEAK DMA2_Stream3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream3_IRQHandler + B DMA2_Stream3_IRQHandler + + PUBWEAK DMA2_Stream4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream4_IRQHandler + B DMA2_Stream4_IRQHandler + + PUBWEAK ETH_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ETH_IRQHandler + B ETH_IRQHandler + + PUBWEAK ETH_WKUP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ETH_WKUP_IRQHandler + B ETH_WKUP_IRQHandler + + PUBWEAK FDCAN_CAL_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN_CAL_IRQHandler + B FDCAN_CAL_IRQHandler + + PUBWEAK DMA2_Stream5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream5_IRQHandler + B DMA2_Stream5_IRQHandler + + PUBWEAK DMA2_Stream6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream6_IRQHandler + B DMA2_Stream6_IRQHandler + + PUBWEAK DMA2_Stream7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream7_IRQHandler + B DMA2_Stream7_IRQHandler + + PUBWEAK USART6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART6_IRQHandler + B USART6_IRQHandler + + PUBWEAK I2C3_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C3_EV_IRQHandler + B I2C3_EV_IRQHandler + + PUBWEAK I2C3_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C3_ER_IRQHandler + B I2C3_ER_IRQHandler + + PUBWEAK OTG_HS_EP1_OUT_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTG_HS_EP1_OUT_IRQHandler + B OTG_HS_EP1_OUT_IRQHandler + + PUBWEAK OTG_HS_EP1_IN_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTG_HS_EP1_IN_IRQHandler + B OTG_HS_EP1_IN_IRQHandler + + PUBWEAK OTG_HS_WKUP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTG_HS_WKUP_IRQHandler + B OTG_HS_WKUP_IRQHandler + + PUBWEAK OTG_HS_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTG_HS_IRQHandler + B OTG_HS_IRQHandler + + PUBWEAK DCMI_PSSI_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DCMI_PSSI_IRQHandler + B DCMI_PSSI_IRQHandler + + PUBWEAK CRYP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +CRYP_IRQHandler + B CRYP_IRQHandler + + PUBWEAK HASH_RNG_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +HASH_RNG_IRQHandler + B HASH_RNG_IRQHandler + + PUBWEAK FPU_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FPU_IRQHandler + B FPU_IRQHandler + + PUBWEAK UART7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART7_IRQHandler + B UART7_IRQHandler + + PUBWEAK UART8_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART8_IRQHandler + B UART8_IRQHandler + + PUBWEAK SPI4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI4_IRQHandler + B SPI4_IRQHandler + + PUBWEAK SPI5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI5_IRQHandler + B SPI5_IRQHandler + + PUBWEAK SPI6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI6_IRQHandler + B SPI6_IRQHandler + + PUBWEAK SAI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SAI1_IRQHandler + B SAI1_IRQHandler + + PUBWEAK LTDC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LTDC_IRQHandler + B LTDC_IRQHandler + + PUBWEAK LTDC_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LTDC_ER_IRQHandler + B LTDC_ER_IRQHandler + + PUBWEAK DMA2D_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2D_IRQHandler + B DMA2D_IRQHandler + + PUBWEAK OCTOSPI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OCTOSPI1_IRQHandler + B OCTOSPI1_IRQHandler + + PUBWEAK LPTIM1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM1_IRQHandler + B LPTIM1_IRQHandler + + PUBWEAK CEC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +CEC_IRQHandler + B CEC_IRQHandler + + PUBWEAK I2C4_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C4_EV_IRQHandler + B I2C4_EV_IRQHandler + + PUBWEAK I2C4_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C4_ER_IRQHandler + B I2C4_ER_IRQHandler + + PUBWEAK SPDIF_RX_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPDIF_RX_IRQHandler + B SPDIF_RX_IRQHandler + + PUBWEAK DMAMUX1_OVR_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMAMUX1_OVR_IRQHandler + B DMAMUX1_OVR_IRQHandler + + PUBWEAK DFSDM1_FLT0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DFSDM1_FLT0_IRQHandler + B DFSDM1_FLT0_IRQHandler + + PUBWEAK DFSDM1_FLT1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DFSDM1_FLT1_IRQHandler + B DFSDM1_FLT1_IRQHandler + + PUBWEAK DFSDM1_FLT2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DFSDM1_FLT2_IRQHandler + B DFSDM1_FLT2_IRQHandler + + PUBWEAK DFSDM1_FLT3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DFSDM1_FLT3_IRQHandler + B DFSDM1_FLT3_IRQHandler + + PUBWEAK SWPMI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SWPMI1_IRQHandler + B SWPMI1_IRQHandler + + PUBWEAK TIM15_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM15_IRQHandler + B TIM15_IRQHandler + + PUBWEAK TIM16_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM16_IRQHandler + B TIM16_IRQHandler + + PUBWEAK TIM17_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM17_IRQHandler + B TIM17_IRQHandler + + PUBWEAK MDIOS_WKUP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +MDIOS_WKUP_IRQHandler + B MDIOS_WKUP_IRQHandler + + PUBWEAK MDIOS_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +MDIOS_IRQHandler + B MDIOS_IRQHandler + + PUBWEAK MDMA_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +MDMA_IRQHandler + B MDMA_IRQHandler + + PUBWEAK SDMMC2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SDMMC2_IRQHandler + B SDMMC2_IRQHandler + + PUBWEAK HSEM1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +HSEM1_IRQHandler + B HSEM1_IRQHandler + + PUBWEAK ADC3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ADC3_IRQHandler + B ADC3_IRQHandler + + PUBWEAK DMAMUX2_OVR_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMAMUX2_OVR_IRQHandler + B DMAMUX2_OVR_IRQHandler + + PUBWEAK BDMA_Channel0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel0_IRQHandler + B BDMA_Channel0_IRQHandler + + PUBWEAK BDMA_Channel1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel1_IRQHandler + B BDMA_Channel1_IRQHandler + + PUBWEAK BDMA_Channel2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel2_IRQHandler + B BDMA_Channel2_IRQHandler + + PUBWEAK BDMA_Channel3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel3_IRQHandler + B BDMA_Channel3_IRQHandler + + PUBWEAK BDMA_Channel4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel4_IRQHandler + B BDMA_Channel4_IRQHandler + + PUBWEAK BDMA_Channel5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel5_IRQHandler + B BDMA_Channel5_IRQHandler + + PUBWEAK BDMA_Channel6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel6_IRQHandler + B BDMA_Channel6_IRQHandler + + PUBWEAK BDMA_Channel7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel7_IRQHandler + B BDMA_Channel7_IRQHandler + + PUBWEAK COMP1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +COMP1_IRQHandler + B COMP1_IRQHandler + + PUBWEAK LPTIM2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM2_IRQHandler + B LPTIM2_IRQHandler + + PUBWEAK LPTIM3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM3_IRQHandler + B LPTIM3_IRQHandler + + PUBWEAK LPTIM4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM4_IRQHandler + B LPTIM4_IRQHandler + + PUBWEAK LPTIM5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM5_IRQHandler + B LPTIM5_IRQHandler + + PUBWEAK LPUART1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPUART1_IRQHandler + B LPUART1_IRQHandler + + PUBWEAK CRS_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +CRS_IRQHandler + B CRS_IRQHandler + + PUBWEAK ECC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ECC_IRQHandler + B ECC_IRQHandler + + PUBWEAK SAI4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SAI4_IRQHandler + B SAI4_IRQHandler + + PUBWEAK DTS_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DTS_IRQHandler + B DTS_IRQHandler + + PUBWEAK WAKEUP_PIN_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +WAKEUP_PIN_IRQHandler + B WAKEUP_PIN_IRQHandler + + PUBWEAK OCTOSPI2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OCTOSPI2_IRQHandler + B OCTOSPI2_IRQHandler + + PUBWEAK OTFDEC1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTFDEC1_IRQHandler + B OTFDEC1_IRQHandler + + PUBWEAK OTFDEC2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTFDEC2_IRQHandler + B OTFDEC2_IRQHandler + + PUBWEAK FMAC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FMAC_IRQHandler + B FMAC_IRQHandler + + PUBWEAK CORDIC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +CORDIC_IRQHandler + B CORDIC_IRQHandler + + PUBWEAK UART9_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART9_IRQHandler + B UART9_IRQHandler + + PUBWEAK USART10_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART10_IRQHandler + B USART10_IRQHandler + + PUBWEAK I2C5_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C5_EV_IRQHandler + B I2C5_EV_IRQHandler + + PUBWEAK I2C5_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C5_ER_IRQHandler + B I2C5_ER_IRQHandler + + PUBWEAK FDCAN3_IT0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN3_IT0_IRQHandler + B FDCAN3_IT0_IRQHandler + + PUBWEAK FDCAN3_IT1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN3_IT1_IRQHandler + B FDCAN3_IT1_IRQHandler + + PUBWEAK TIM23_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM23_IRQHandler + B TIM23_IRQHandler + + PUBWEAK TIM24_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM24_IRQHandler + B TIM24_IRQHandler + + END +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h733xx.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h733xx.s new file mode 100644 index 0000000..83594e9 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h733xx.s @@ -0,0 +1,999 @@ +;/******************** (C) COPYRIGHT 2019 STMicroelectronics ******************** +;* File Name : startup_stm32h733xx.s +;* Author : MCD Application Team +;* Description : STM32H733xx devices vector table for EWARM toolchain. +;* This module performs: +;* - Set the initial SP +;* - Set the initial PC == _iar_program_start, +;* - Set the vector table entries with the exceptions ISR +;* address. +;* - Branches to main in the C library (which eventually +;* calls main()). +;* After Reset the Cortex-M processor is in Thread mode, +;* priority is Privileged, and the Stack is set to Main. +;******************************************************************************* +;* @attention +;* +;*

                  © Copyright (c) 2019 STMicroelectronics. +;* All rights reserved.

                  +;* +;* This software component is licensed by ST under BSD 3-Clause license, +;* the "License"; You may not use this file except in compliance with the +;* License. You may obtain a copy of the License at: +;* opensource.org/licenses/BSD-3-Clause +;* +;******************************************************************************* +; +; +; The modules in this file are included in the libraries, and may be replaced +; by any user-defined modules that define the PUBLIC symbol _program_start or +; a user defined start symbol. +; To override the cstartup defined in the library, simply add your modified +; version to the workbench project. +; +; The vector table is normally located at address 0. +; When debugging in RAM, it can be located in RAM, aligned to at least 2^6. +; The name "__vector_table" has special meaning for C-SPY: +; it is where the SP start value is found, and the NVIC vector +; table register (VTOR) is initialized to this address if != 0. +; +; Cortex-M version +; + + MODULE ?cstartup + + ;; Forward declaration of sections. + SECTION CSTACK:DATA:NOROOT(3) + + SECTION .intvec:CODE:NOROOT(2) + + EXTERN __iar_program_start + EXTERN SystemInit + PUBLIC __vector_table + + DATA +__vector_table + DCD sfe(CSTACK) + DCD Reset_Handler ; Reset Handler + + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD MemManage_Handler ; MPU Fault Handler + DCD BusFault_Handler ; Bus Fault Handler + DCD UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WWDG_IRQHandler ; Window WatchDog Interrupt ( wwdg1_it) + DCD PVD_AVD_IRQHandler ; PVD/AVD through EXTI Line detection + DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line + DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line + DCD FLASH_IRQHandler ; FLASH + DCD RCC_IRQHandler ; RCC + DCD EXTI0_IRQHandler ; EXTI Line0 + DCD EXTI1_IRQHandler ; EXTI Line1 + DCD EXTI2_IRQHandler ; EXTI Line2 + DCD EXTI3_IRQHandler ; EXTI Line3 + DCD EXTI4_IRQHandler ; EXTI Line4 + DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 + DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 + DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 + DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 + DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 + DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 + DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 + DCD ADC_IRQHandler ; ADC1, ADC2 + DCD FDCAN1_IT0_IRQHandler ; FDCAN1 interrupt line 0 + DCD FDCAN2_IT0_IRQHandler ; FDCAN2 interrupt line 0 + DCD FDCAN1_IT1_IRQHandler ; FDCAN1 interrupt line 1 + DCD FDCAN2_IT1_IRQHandler ; FDCAN2 interrupt line 1 + DCD EXTI9_5_IRQHandler ; External Line[9:5]s + DCD TIM1_BRK_IRQHandler ; TIM1 Break interrupt + DCD TIM1_UP_IRQHandler ; TIM1 Update + DCD TIM1_TRG_COM_IRQHandler ; TIM1 Trigger and Commutation Interrupt + DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare + DCD TIM2_IRQHandler ; TIM2 + DCD TIM3_IRQHandler ; TIM3 + DCD TIM4_IRQHandler ; TIM4 + DCD I2C1_EV_IRQHandler ; I2C1 Event + DCD I2C1_ER_IRQHandler ; I2C1 Error + DCD I2C2_EV_IRQHandler ; I2C2 Event + DCD I2C2_ER_IRQHandler ; I2C2 Error + DCD SPI1_IRQHandler ; SPI1 + DCD SPI2_IRQHandler ; SPI2 + DCD USART1_IRQHandler ; USART1 + DCD USART2_IRQHandler ; USART2 + DCD USART3_IRQHandler ; USART3 + DCD EXTI15_10_IRQHandler ; External Line[15:10] + DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line + DCD 0 ; Reserved + DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break Interrupt and TIM12 global interrupt + DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update Interrupt and TIM13 global interrupt + DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation Interrupt and TIM14 glob + DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare Interrupt + DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 + DCD FMC_IRQHandler ; FMC + DCD SDMMC1_IRQHandler ; SDMMC1 + DCD TIM5_IRQHandler ; TIM5 + DCD SPI3_IRQHandler ; SPI3 + DCD UART4_IRQHandler ; UART4 + DCD UART5_IRQHandler ; UART5 + DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors + DCD TIM7_IRQHandler ; TIM7 + DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 + DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 + DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 + DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 + DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 + DCD ETH_IRQHandler ; Ethernet + DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line + DCD FDCAN_CAL_IRQHandler ; FDCAN calibration unit interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 + DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 + DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 + DCD USART6_IRQHandler ; USART6 + DCD I2C3_EV_IRQHandler ; I2C3 event + DCD I2C3_ER_IRQHandler ; I2C3 error + DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out + DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In + DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI + DCD OTG_HS_IRQHandler ; USB OTG HS + DCD DCMI_PSSI_IRQHandler ; DCMI, PSSI + DCD CRYP_IRQHandler ; CRYP crypto + DCD HASH_RNG_IRQHandler ; Hash and Rng + DCD FPU_IRQHandler ; FPU + DCD UART7_IRQHandler ; UART7 + DCD UART8_IRQHandler ; UART8 + DCD SPI4_IRQHandler ; SPI4 + DCD SPI5_IRQHandler ; SPI5 + DCD SPI6_IRQHandler ; SPI6 + DCD SAI1_IRQHandler ; SAI1 + DCD LTDC_IRQHandler ; LTDC + DCD LTDC_ER_IRQHandler ; LTDC error + DCD DMA2D_IRQHandler ; DMA2D + DCD 0 ; Reserved + DCD OCTOSPI1_IRQHandler ; OCTOSPI1 + DCD LPTIM1_IRQHandler ; LPTIM1 + DCD CEC_IRQHandler ; HDMI_CEC + DCD I2C4_EV_IRQHandler ; I2C4 Event + DCD I2C4_ER_IRQHandler ; I2C4 Error + DCD SPDIF_RX_IRQHandler ; SPDIF_RX + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DMAMUX1_OVR_IRQHandler ; DMAMUX1 Overrun interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DFSDM1_FLT0_IRQHandler ; DFSDM Filter0 Interrupt + DCD DFSDM1_FLT1_IRQHandler ; DFSDM Filter1 Interrupt + DCD DFSDM1_FLT2_IRQHandler ; DFSDM Filter2 Interrupt + DCD DFSDM1_FLT3_IRQHandler ; DFSDM Filter3 Interrupt + DCD 0 ; Reserved + DCD SWPMI1_IRQHandler ; Serial Wire Interface 1 global interrupt + DCD TIM15_IRQHandler ; TIM15 global Interrupt + DCD TIM16_IRQHandler ; TIM16 global Interrupt + DCD TIM17_IRQHandler ; TIM17 global Interrupt + DCD MDIOS_WKUP_IRQHandler ; MDIOS Wakeup Interrupt + DCD MDIOS_IRQHandler ; MDIOS global Interrupt + DCD 0 ; Reserved + DCD MDMA_IRQHandler ; MDMA global Interrupt + DCD 0 ; Reserved + DCD SDMMC2_IRQHandler ; SDMMC2 global Interrupt + DCD HSEM1_IRQHandler ; HSEM1 global Interrupt + DCD 0 ; Reserved + DCD ADC3_IRQHandler ; ADC3 global Interrupt + DCD DMAMUX2_OVR_IRQHandler ; DMAMUX Overrun interrupt + DCD BDMA_Channel0_IRQHandler ; BDMA Channel 0 global Interrupt + DCD BDMA_Channel1_IRQHandler ; BDMA Channel 1 global Interrupt + DCD BDMA_Channel2_IRQHandler ; BDMA Channel 2 global Interrupt + DCD BDMA_Channel3_IRQHandler ; BDMA Channel 3 global Interrupt + DCD BDMA_Channel4_IRQHandler ; BDMA Channel 4 global Interrupt + DCD BDMA_Channel5_IRQHandler ; BDMA Channel 5 global Interrupt + DCD BDMA_Channel6_IRQHandler ; BDMA Channel 6 global Interrupt + DCD BDMA_Channel7_IRQHandler ; BDMA Channel 7 global Interrupt + DCD COMP1_IRQHandler ; COMP1 global Interrupt + DCD LPTIM2_IRQHandler ; LP TIM2 global interrupt + DCD LPTIM3_IRQHandler ; LP TIM3 global interrupt + DCD LPTIM4_IRQHandler ; LP TIM4 global interrupt + DCD LPTIM5_IRQHandler ; LP TIM5 global interrupt + DCD LPUART1_IRQHandler ; LP UART1 interrupt + DCD 0 ; Reserved + DCD CRS_IRQHandler ; Clock Recovery Global Interrupt + DCD ECC_IRQHandler ; ECC diagnostic Global Interrupt + DCD SAI4_IRQHandler ; SAI4 global interrupt + DCD DTS_IRQHandler ; Digital Temperature Sensor + DCD 0 ; Reserved + DCD WAKEUP_PIN_IRQHandler ; Interrupt for all 6 wake-up pins + DCD OCTOSPI2_IRQHandler ; OCTOSPI2 Interrupt + DCD OTFDEC1_IRQHandler ; OTFDEC1 Interrupt + DCD OTFDEC2_IRQHandler ; OTFDEC2 Interrupt + DCD FMAC_IRQHandler ; FMAC Interrupt + DCD CORDIC_IRQHandler ; CORDIC Interrupt + DCD UART9_IRQHandler ; UART9 Interrupt + DCD USART10_IRQHandler ; USART10 Interrupt + DCD I2C5_EV_IRQHandler ; I2C5 Event Interrupt + DCD I2C5_ER_IRQHandler ; I2C5 Error Interrupt + DCD FDCAN3_IT0_IRQHandler ; FDCAN3 interrupt line 0 + DCD FDCAN3_IT1_IRQHandler ; FDCAN3 interrupt line 1 + DCD TIM23_IRQHandler ; TIM23 global interrup + DCD TIM24_IRQHandler ; TIM24 global interrup + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Default interrupt handlers. +;; + THUMB + PUBWEAK Reset_Handler + SECTION .text:CODE:NOROOT:REORDER(2) +Reset_Handler + + LDR R0, =SystemInit + BLX R0 + LDR R0, =__iar_program_start + BX R0 + + PUBWEAK NMI_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +NMI_Handler + B NMI_Handler + + PUBWEAK HardFault_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +HardFault_Handler + B HardFault_Handler + + PUBWEAK MemManage_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +MemManage_Handler + B MemManage_Handler + + PUBWEAK BusFault_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +BusFault_Handler + B BusFault_Handler + + PUBWEAK UsageFault_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +UsageFault_Handler + B UsageFault_Handler + + PUBWEAK SVC_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +SVC_Handler + B SVC_Handler + + PUBWEAK DebugMon_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +DebugMon_Handler + B DebugMon_Handler + + PUBWEAK PendSV_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +PendSV_Handler + B PendSV_Handler + + PUBWEAK SysTick_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +SysTick_Handler + B SysTick_Handler + + PUBWEAK WWDG_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +WWDG_IRQHandler + B WWDG_IRQHandler + + PUBWEAK PVD_AVD_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +PVD_AVD_IRQHandler + B PVD_AVD_IRQHandler + + PUBWEAK TAMP_STAMP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TAMP_STAMP_IRQHandler + B TAMP_STAMP_IRQHandler + + PUBWEAK RTC_WKUP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +RTC_WKUP_IRQHandler + B RTC_WKUP_IRQHandler + + PUBWEAK FLASH_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FLASH_IRQHandler + B FLASH_IRQHandler + + PUBWEAK RCC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +RCC_IRQHandler + B RCC_IRQHandler + + PUBWEAK EXTI0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI0_IRQHandler + B EXTI0_IRQHandler + + PUBWEAK EXTI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI1_IRQHandler + B EXTI1_IRQHandler + + PUBWEAK EXTI2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI2_IRQHandler + B EXTI2_IRQHandler + + PUBWEAK EXTI3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI3_IRQHandler + B EXTI3_IRQHandler + + PUBWEAK EXTI4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI4_IRQHandler + B EXTI4_IRQHandler + + PUBWEAK DMA1_Stream0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream0_IRQHandler + B DMA1_Stream0_IRQHandler + + PUBWEAK DMA1_Stream1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream1_IRQHandler + B DMA1_Stream1_IRQHandler + + PUBWEAK DMA1_Stream2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream2_IRQHandler + B DMA1_Stream2_IRQHandler + + PUBWEAK DMA1_Stream3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream3_IRQHandler + B DMA1_Stream3_IRQHandler + + PUBWEAK DMA1_Stream4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream4_IRQHandler + B DMA1_Stream4_IRQHandler + + PUBWEAK DMA1_Stream5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream5_IRQHandler + B DMA1_Stream5_IRQHandler + + PUBWEAK DMA1_Stream6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream6_IRQHandler + B DMA1_Stream6_IRQHandler + + PUBWEAK ADC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ADC_IRQHandler + B ADC_IRQHandler + + PUBWEAK FDCAN1_IT0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN1_IT0_IRQHandler + B FDCAN1_IT0_IRQHandler + + PUBWEAK FDCAN2_IT0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN2_IT0_IRQHandler + B FDCAN2_IT0_IRQHandler + + PUBWEAK FDCAN1_IT1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN1_IT1_IRQHandler + B FDCAN1_IT1_IRQHandler + + PUBWEAK FDCAN2_IT1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN2_IT1_IRQHandler + B FDCAN2_IT1_IRQHandler + + PUBWEAK EXTI9_5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI9_5_IRQHandler + B EXTI9_5_IRQHandler + + PUBWEAK TIM1_BRK_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM1_BRK_IRQHandler + B TIM1_BRK_IRQHandler + + PUBWEAK TIM1_UP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM1_UP_IRQHandler + B TIM1_UP_IRQHandler + + PUBWEAK TIM1_TRG_COM_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM1_TRG_COM_IRQHandler + B TIM1_TRG_COM_IRQHandler + + PUBWEAK TIM1_CC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM1_CC_IRQHandler + B TIM1_CC_IRQHandler + + PUBWEAK TIM2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM2_IRQHandler + B TIM2_IRQHandler + + PUBWEAK TIM3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM3_IRQHandler + B TIM3_IRQHandler + + PUBWEAK TIM4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM4_IRQHandler + B TIM4_IRQHandler + + PUBWEAK I2C1_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C1_EV_IRQHandler + B I2C1_EV_IRQHandler + + PUBWEAK I2C1_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C1_ER_IRQHandler + B I2C1_ER_IRQHandler + + PUBWEAK I2C2_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C2_EV_IRQHandler + B I2C2_EV_IRQHandler + + PUBWEAK I2C2_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C2_ER_IRQHandler + B I2C2_ER_IRQHandler + + PUBWEAK SPI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI1_IRQHandler + B SPI1_IRQHandler + + PUBWEAK SPI2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI2_IRQHandler + B SPI2_IRQHandler + + PUBWEAK USART1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART1_IRQHandler + B USART1_IRQHandler + + PUBWEAK USART2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART2_IRQHandler + B USART2_IRQHandler + + PUBWEAK USART3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART3_IRQHandler + B USART3_IRQHandler + + PUBWEAK EXTI15_10_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI15_10_IRQHandler + B EXTI15_10_IRQHandler + + PUBWEAK RTC_Alarm_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +RTC_Alarm_IRQHandler + B RTC_Alarm_IRQHandler + + PUBWEAK TIM8_BRK_TIM12_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM8_BRK_TIM12_IRQHandler + B TIM8_BRK_TIM12_IRQHandler + + PUBWEAK TIM8_UP_TIM13_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM8_UP_TIM13_IRQHandler + B TIM8_UP_TIM13_IRQHandler + + PUBWEAK TIM8_TRG_COM_TIM14_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM8_TRG_COM_TIM14_IRQHandler + B TIM8_TRG_COM_TIM14_IRQHandler + + PUBWEAK TIM8_CC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM8_CC_IRQHandler + B TIM8_CC_IRQHandler + + PUBWEAK DMA1_Stream7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream7_IRQHandler + B DMA1_Stream7_IRQHandler + + PUBWEAK FMC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FMC_IRQHandler + B FMC_IRQHandler + + PUBWEAK SDMMC1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SDMMC1_IRQHandler + B SDMMC1_IRQHandler + + PUBWEAK TIM5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM5_IRQHandler + B TIM5_IRQHandler + + PUBWEAK SPI3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI3_IRQHandler + B SPI3_IRQHandler + + PUBWEAK UART4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART4_IRQHandler + B UART4_IRQHandler + + PUBWEAK UART5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART5_IRQHandler + B UART5_IRQHandler + + PUBWEAK TIM6_DAC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM6_DAC_IRQHandler + B TIM6_DAC_IRQHandler + + PUBWEAK TIM7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM7_IRQHandler + B TIM7_IRQHandler + + PUBWEAK DMA2_Stream0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream0_IRQHandler + B DMA2_Stream0_IRQHandler + + PUBWEAK DMA2_Stream1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream1_IRQHandler + B DMA2_Stream1_IRQHandler + + PUBWEAK DMA2_Stream2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream2_IRQHandler + B DMA2_Stream2_IRQHandler + + PUBWEAK DMA2_Stream3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream3_IRQHandler + B DMA2_Stream3_IRQHandler + + PUBWEAK DMA2_Stream4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream4_IRQHandler + B DMA2_Stream4_IRQHandler + + PUBWEAK ETH_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ETH_IRQHandler + B ETH_IRQHandler + + PUBWEAK ETH_WKUP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ETH_WKUP_IRQHandler + B ETH_WKUP_IRQHandler + + PUBWEAK FDCAN_CAL_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN_CAL_IRQHandler + B FDCAN_CAL_IRQHandler + + PUBWEAK DMA2_Stream5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream5_IRQHandler + B DMA2_Stream5_IRQHandler + + PUBWEAK DMA2_Stream6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream6_IRQHandler + B DMA2_Stream6_IRQHandler + + PUBWEAK DMA2_Stream7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream7_IRQHandler + B DMA2_Stream7_IRQHandler + + PUBWEAK USART6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART6_IRQHandler + B USART6_IRQHandler + + PUBWEAK I2C3_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C3_EV_IRQHandler + B I2C3_EV_IRQHandler + + PUBWEAK I2C3_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C3_ER_IRQHandler + B I2C3_ER_IRQHandler + + PUBWEAK OTG_HS_EP1_OUT_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTG_HS_EP1_OUT_IRQHandler + B OTG_HS_EP1_OUT_IRQHandler + + PUBWEAK OTG_HS_EP1_IN_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTG_HS_EP1_IN_IRQHandler + B OTG_HS_EP1_IN_IRQHandler + + PUBWEAK OTG_HS_WKUP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTG_HS_WKUP_IRQHandler + B OTG_HS_WKUP_IRQHandler + + PUBWEAK OTG_HS_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTG_HS_IRQHandler + B OTG_HS_IRQHandler + + PUBWEAK DCMI_PSSI_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DCMI_PSSI_IRQHandler + B DCMI_PSSI_IRQHandler + + PUBWEAK CRYP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +CRYP_IRQHandler + B CRYP_IRQHandler + + PUBWEAK HASH_RNG_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +HASH_RNG_IRQHandler + B HASH_RNG_IRQHandler + + PUBWEAK FPU_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FPU_IRQHandler + B FPU_IRQHandler + + PUBWEAK UART7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART7_IRQHandler + B UART7_IRQHandler + + PUBWEAK UART8_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART8_IRQHandler + B UART8_IRQHandler + + PUBWEAK SPI4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI4_IRQHandler + B SPI4_IRQHandler + + PUBWEAK SPI5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI5_IRQHandler + B SPI5_IRQHandler + + PUBWEAK SPI6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI6_IRQHandler + B SPI6_IRQHandler + + PUBWEAK SAI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SAI1_IRQHandler + B SAI1_IRQHandler + + PUBWEAK LTDC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LTDC_IRQHandler + B LTDC_IRQHandler + + PUBWEAK LTDC_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LTDC_ER_IRQHandler + B LTDC_ER_IRQHandler + + PUBWEAK DMA2D_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2D_IRQHandler + B DMA2D_IRQHandler + + PUBWEAK OCTOSPI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OCTOSPI1_IRQHandler + B OCTOSPI1_IRQHandler + + PUBWEAK LPTIM1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM1_IRQHandler + B LPTIM1_IRQHandler + + PUBWEAK CEC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +CEC_IRQHandler + B CEC_IRQHandler + + PUBWEAK I2C4_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C4_EV_IRQHandler + B I2C4_EV_IRQHandler + + PUBWEAK I2C4_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C4_ER_IRQHandler + B I2C4_ER_IRQHandler + + PUBWEAK SPDIF_RX_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPDIF_RX_IRQHandler + B SPDIF_RX_IRQHandler + + PUBWEAK DMAMUX1_OVR_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMAMUX1_OVR_IRQHandler + B DMAMUX1_OVR_IRQHandler + + PUBWEAK DFSDM1_FLT0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DFSDM1_FLT0_IRQHandler + B DFSDM1_FLT0_IRQHandler + + PUBWEAK DFSDM1_FLT1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DFSDM1_FLT1_IRQHandler + B DFSDM1_FLT1_IRQHandler + + PUBWEAK DFSDM1_FLT2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DFSDM1_FLT2_IRQHandler + B DFSDM1_FLT2_IRQHandler + + PUBWEAK DFSDM1_FLT3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DFSDM1_FLT3_IRQHandler + B DFSDM1_FLT3_IRQHandler + + PUBWEAK SWPMI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SWPMI1_IRQHandler + B SWPMI1_IRQHandler + + PUBWEAK TIM15_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM15_IRQHandler + B TIM15_IRQHandler + + PUBWEAK TIM16_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM16_IRQHandler + B TIM16_IRQHandler + + PUBWEAK TIM17_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM17_IRQHandler + B TIM17_IRQHandler + + PUBWEAK MDIOS_WKUP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +MDIOS_WKUP_IRQHandler + B MDIOS_WKUP_IRQHandler + + PUBWEAK MDIOS_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +MDIOS_IRQHandler + B MDIOS_IRQHandler + + PUBWEAK MDMA_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +MDMA_IRQHandler + B MDMA_IRQHandler + + PUBWEAK SDMMC2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SDMMC2_IRQHandler + B SDMMC2_IRQHandler + + PUBWEAK HSEM1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +HSEM1_IRQHandler + B HSEM1_IRQHandler + + PUBWEAK ADC3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ADC3_IRQHandler + B ADC3_IRQHandler + + PUBWEAK DMAMUX2_OVR_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMAMUX2_OVR_IRQHandler + B DMAMUX2_OVR_IRQHandler + + PUBWEAK BDMA_Channel0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel0_IRQHandler + B BDMA_Channel0_IRQHandler + + PUBWEAK BDMA_Channel1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel1_IRQHandler + B BDMA_Channel1_IRQHandler + + PUBWEAK BDMA_Channel2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel2_IRQHandler + B BDMA_Channel2_IRQHandler + + PUBWEAK BDMA_Channel3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel3_IRQHandler + B BDMA_Channel3_IRQHandler + + PUBWEAK BDMA_Channel4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel4_IRQHandler + B BDMA_Channel4_IRQHandler + + PUBWEAK BDMA_Channel5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel5_IRQHandler + B BDMA_Channel5_IRQHandler + + PUBWEAK BDMA_Channel6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel6_IRQHandler + B BDMA_Channel6_IRQHandler + + PUBWEAK BDMA_Channel7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel7_IRQHandler + B BDMA_Channel7_IRQHandler + + PUBWEAK COMP1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +COMP1_IRQHandler + B COMP1_IRQHandler + + PUBWEAK LPTIM2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM2_IRQHandler + B LPTIM2_IRQHandler + + PUBWEAK LPTIM3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM3_IRQHandler + B LPTIM3_IRQHandler + + PUBWEAK LPTIM4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM4_IRQHandler + B LPTIM4_IRQHandler + + PUBWEAK LPTIM5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM5_IRQHandler + B LPTIM5_IRQHandler + + PUBWEAK LPUART1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPUART1_IRQHandler + B LPUART1_IRQHandler + + PUBWEAK CRS_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +CRS_IRQHandler + B CRS_IRQHandler + + PUBWEAK ECC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ECC_IRQHandler + B ECC_IRQHandler + + PUBWEAK SAI4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SAI4_IRQHandler + B SAI4_IRQHandler + + PUBWEAK DTS_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DTS_IRQHandler + B DTS_IRQHandler + + PUBWEAK WAKEUP_PIN_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +WAKEUP_PIN_IRQHandler + B WAKEUP_PIN_IRQHandler + + PUBWEAK OCTOSPI2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OCTOSPI2_IRQHandler + B OCTOSPI2_IRQHandler + + PUBWEAK OTFDEC1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTFDEC1_IRQHandler + B OTFDEC1_IRQHandler + + PUBWEAK OTFDEC2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTFDEC2_IRQHandler + B OTFDEC2_IRQHandler + + PUBWEAK FMAC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FMAC_IRQHandler + B FMAC_IRQHandler + + PUBWEAK CORDIC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +CORDIC_IRQHandler + B CORDIC_IRQHandler + + PUBWEAK UART9_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART9_IRQHandler + B UART9_IRQHandler + + PUBWEAK USART10_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART10_IRQHandler + B USART10_IRQHandler + + PUBWEAK I2C5_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C5_EV_IRQHandler + B I2C5_EV_IRQHandler + + PUBWEAK I2C5_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C5_ER_IRQHandler + B I2C5_ER_IRQHandler + + PUBWEAK FDCAN3_IT0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN3_IT0_IRQHandler + B FDCAN3_IT0_IRQHandler + + PUBWEAK FDCAN3_IT1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN3_IT1_IRQHandler + B FDCAN3_IT1_IRQHandler + + PUBWEAK TIM23_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM23_IRQHandler + B TIM23_IRQHandler + + PUBWEAK TIM24_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM24_IRQHandler + B TIM24_IRQHandler + + END +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h735xx.s b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h735xx.s new file mode 100644 index 0000000..f9e770c --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h735xx.s @@ -0,0 +1,999 @@ +;/******************** (C) COPYRIGHT 2019 STMicroelectronics ******************** +;* File Name : startup_stm32h735xx.s +;* Author : MCD Application Team +;* Description : STM32H735xx devices vector table for EWARM toolchain. +;* This module performs: +;* - Set the initial SP +;* - Set the initial PC == _iar_program_start, +;* - Set the vector table entries with the exceptions ISR +;* address. +;* - Branches to main in the C library (which eventually +;* calls main()). +;* After Reset the Cortex-M processor is in Thread mode, +;* priority is Privileged, and the Stack is set to Main. +;******************************************************************************* +;* @attention +;* +;*

                  © Copyright (c) 2019 STMicroelectronics. +;* All rights reserved.

                  +;* +;* This software component is licensed by ST under BSD 3-Clause license, +;* the "License"; You may not use this file except in compliance with the +;* License. You may obtain a copy of the License at: +;* opensource.org/licenses/BSD-3-Clause +;* +;******************************************************************************* +; +; +; The modules in this file are included in the libraries, and may be replaced +; by any user-defined modules that define the PUBLIC symbol _program_start or +; a user defined start symbol. +; To override the cstartup defined in the library, simply add your modified +; version to the workbench project. +; +; The vector table is normally located at address 0. +; When debugging in RAM, it can be located in RAM, aligned to at least 2^6. +; The name "__vector_table" has special meaning for C-SPY: +; it is where the SP start value is found, and the NVIC vector +; table register (VTOR) is initialized to this address if != 0. +; +; Cortex-M version +; + + MODULE ?cstartup + + ;; Forward declaration of sections. + SECTION CSTACK:DATA:NOROOT(3) + + SECTION .intvec:CODE:NOROOT(2) + + EXTERN __iar_program_start + EXTERN SystemInit + PUBLIC __vector_table + + DATA +__vector_table + DCD sfe(CSTACK) + DCD Reset_Handler ; Reset Handler + + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD MemManage_Handler ; MPU Fault Handler + DCD BusFault_Handler ; Bus Fault Handler + DCD UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WWDG_IRQHandler ; Window WatchDog Interrupt ( wwdg1_it) + DCD PVD_AVD_IRQHandler ; PVD/AVD through EXTI Line detection + DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line + DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line + DCD FLASH_IRQHandler ; FLASH + DCD RCC_IRQHandler ; RCC + DCD EXTI0_IRQHandler ; EXTI Line0 + DCD EXTI1_IRQHandler ; EXTI Line1 + DCD EXTI2_IRQHandler ; EXTI Line2 + DCD EXTI3_IRQHandler ; EXTI Line3 + DCD EXTI4_IRQHandler ; EXTI Line4 + DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 + DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 + DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 + DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 + DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 + DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 + DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 + DCD ADC_IRQHandler ; ADC1, ADC2 + DCD FDCAN1_IT0_IRQHandler ; FDCAN1 interrupt line 0 + DCD FDCAN2_IT0_IRQHandler ; FDCAN2 interrupt line 0 + DCD FDCAN1_IT1_IRQHandler ; FDCAN1 interrupt line 1 + DCD FDCAN2_IT1_IRQHandler ; FDCAN2 interrupt line 1 + DCD EXTI9_5_IRQHandler ; External Line[9:5]s + DCD TIM1_BRK_IRQHandler ; TIM1 Break interrupt + DCD TIM1_UP_IRQHandler ; TIM1 Update + DCD TIM1_TRG_COM_IRQHandler ; TIM1 Trigger and Commutation Interrupt + DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare + DCD TIM2_IRQHandler ; TIM2 + DCD TIM3_IRQHandler ; TIM3 + DCD TIM4_IRQHandler ; TIM4 + DCD I2C1_EV_IRQHandler ; I2C1 Event + DCD I2C1_ER_IRQHandler ; I2C1 Error + DCD I2C2_EV_IRQHandler ; I2C2 Event + DCD I2C2_ER_IRQHandler ; I2C2 Error + DCD SPI1_IRQHandler ; SPI1 + DCD SPI2_IRQHandler ; SPI2 + DCD USART1_IRQHandler ; USART1 + DCD USART2_IRQHandler ; USART2 + DCD USART3_IRQHandler ; USART3 + DCD EXTI15_10_IRQHandler ; External Line[15:10] + DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line + DCD 0 ; Reserved + DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break Interrupt and TIM12 global interrupt + DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update Interrupt and TIM13 global interrupt + DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation Interrupt and TIM14 glob + DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare Interrupt + DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 + DCD FMC_IRQHandler ; FMC + DCD SDMMC1_IRQHandler ; SDMMC1 + DCD TIM5_IRQHandler ; TIM5 + DCD SPI3_IRQHandler ; SPI3 + DCD UART4_IRQHandler ; UART4 + DCD UART5_IRQHandler ; UART5 + DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors + DCD TIM7_IRQHandler ; TIM7 + DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 + DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 + DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 + DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 + DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 + DCD ETH_IRQHandler ; Ethernet + DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line + DCD FDCAN_CAL_IRQHandler ; FDCAN calibration unit interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 + DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 + DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 + DCD USART6_IRQHandler ; USART6 + DCD I2C3_EV_IRQHandler ; I2C3 event + DCD I2C3_ER_IRQHandler ; I2C3 error + DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out + DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In + DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI + DCD OTG_HS_IRQHandler ; USB OTG HS + DCD DCMI_PSSI_IRQHandler ; DCMI, PSSI + DCD CRYP_IRQHandler ; CRYP crypto + DCD HASH_RNG_IRQHandler ; Hash and Rng + DCD FPU_IRQHandler ; FPU + DCD UART7_IRQHandler ; UART7 + DCD UART8_IRQHandler ; UART8 + DCD SPI4_IRQHandler ; SPI4 + DCD SPI5_IRQHandler ; SPI5 + DCD SPI6_IRQHandler ; SPI6 + DCD SAI1_IRQHandler ; SAI1 + DCD LTDC_IRQHandler ; LTDC + DCD LTDC_ER_IRQHandler ; LTDC error + DCD DMA2D_IRQHandler ; DMA2D + DCD 0 ; Reserved + DCD OCTOSPI1_IRQHandler ; OCTOSPI1 + DCD LPTIM1_IRQHandler ; LPTIM1 + DCD CEC_IRQHandler ; HDMI_CEC + DCD I2C4_EV_IRQHandler ; I2C4 Event + DCD I2C4_ER_IRQHandler ; I2C4 Error + DCD SPDIF_RX_IRQHandler ; SPDIF_RX + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DMAMUX1_OVR_IRQHandler ; DMAMUX1 Overrun interrupt + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD DFSDM1_FLT0_IRQHandler ; DFSDM Filter0 Interrupt + DCD DFSDM1_FLT1_IRQHandler ; DFSDM Filter1 Interrupt + DCD DFSDM1_FLT2_IRQHandler ; DFSDM Filter2 Interrupt + DCD DFSDM1_FLT3_IRQHandler ; DFSDM Filter3 Interrupt + DCD 0 ; Reserved + DCD SWPMI1_IRQHandler ; Serial Wire Interface 1 global interrupt + DCD TIM15_IRQHandler ; TIM15 global Interrupt + DCD TIM16_IRQHandler ; TIM16 global Interrupt + DCD TIM17_IRQHandler ; TIM17 global Interrupt + DCD MDIOS_WKUP_IRQHandler ; MDIOS Wakeup Interrupt + DCD MDIOS_IRQHandler ; MDIOS global Interrupt + DCD 0 ; Reserved + DCD MDMA_IRQHandler ; MDMA global Interrupt + DCD 0 ; Reserved + DCD SDMMC2_IRQHandler ; SDMMC2 global Interrupt + DCD HSEM1_IRQHandler ; HSEM1 global Interrupt + DCD 0 ; Reserved + DCD ADC3_IRQHandler ; ADC3 global Interrupt + DCD DMAMUX2_OVR_IRQHandler ; DMAMUX Overrun interrupt + DCD BDMA_Channel0_IRQHandler ; BDMA Channel 0 global Interrupt + DCD BDMA_Channel1_IRQHandler ; BDMA Channel 1 global Interrupt + DCD BDMA_Channel2_IRQHandler ; BDMA Channel 2 global Interrupt + DCD BDMA_Channel3_IRQHandler ; BDMA Channel 3 global Interrupt + DCD BDMA_Channel4_IRQHandler ; BDMA Channel 4 global Interrupt + DCD BDMA_Channel5_IRQHandler ; BDMA Channel 5 global Interrupt + DCD BDMA_Channel6_IRQHandler ; BDMA Channel 6 global Interrupt + DCD BDMA_Channel7_IRQHandler ; BDMA Channel 7 global Interrupt + DCD COMP1_IRQHandler ; COMP1 global Interrupt + DCD LPTIM2_IRQHandler ; LP TIM2 global interrupt + DCD LPTIM3_IRQHandler ; LP TIM3 global interrupt + DCD LPTIM4_IRQHandler ; LP TIM4 global interrupt + DCD LPTIM5_IRQHandler ; LP TIM5 global interrupt + DCD LPUART1_IRQHandler ; LP UART1 interrupt + DCD 0 ; Reserved + DCD CRS_IRQHandler ; Clock Recovery Global Interrupt + DCD ECC_IRQHandler ; ECC diagnostic Global Interrupt + DCD SAI4_IRQHandler ; SAI4 global interrupt + DCD DTS_IRQHandler ; Digital Temperature Sensor + DCD 0 ; Reserved + DCD WAKEUP_PIN_IRQHandler ; Interrupt for all 6 wake-up pins + DCD OCTOSPI2_IRQHandler ; OCTOSPI2 Interrupt + DCD OTFDEC1_IRQHandler ; OTFDEC1 Interrupt + DCD OTFDEC2_IRQHandler ; OTFDEC2 Interrupt + DCD FMAC_IRQHandler ; FMAC Interrupt + DCD CORDIC_IRQHandler ; CORDIC Interrupt + DCD UART9_IRQHandler ; UART9 Interrupt + DCD USART10_IRQHandler ; USART10 Interrupt + DCD I2C5_EV_IRQHandler ; I2C5 Event Interrupt + DCD I2C5_ER_IRQHandler ; I2C5 Error Interrupt + DCD FDCAN3_IT0_IRQHandler ; FDCAN3 interrupt line 0 + DCD FDCAN3_IT1_IRQHandler ; FDCAN3 interrupt line 1 + DCD TIM23_IRQHandler ; TIM23 global interrup + DCD TIM24_IRQHandler ; TIM24 global interrup + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Default interrupt handlers. +;; + THUMB + PUBWEAK Reset_Handler + SECTION .text:CODE:NOROOT:REORDER(2) +Reset_Handler + + LDR R0, =SystemInit + BLX R0 + LDR R0, =__iar_program_start + BX R0 + + PUBWEAK NMI_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +NMI_Handler + B NMI_Handler + + PUBWEAK HardFault_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +HardFault_Handler + B HardFault_Handler + + PUBWEAK MemManage_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +MemManage_Handler + B MemManage_Handler + + PUBWEAK BusFault_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +BusFault_Handler + B BusFault_Handler + + PUBWEAK UsageFault_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +UsageFault_Handler + B UsageFault_Handler + + PUBWEAK SVC_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +SVC_Handler + B SVC_Handler + + PUBWEAK DebugMon_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +DebugMon_Handler + B DebugMon_Handler + + PUBWEAK PendSV_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +PendSV_Handler + B PendSV_Handler + + PUBWEAK SysTick_Handler + SECTION .text:CODE:NOROOT:REORDER(1) +SysTick_Handler + B SysTick_Handler + + PUBWEAK WWDG_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +WWDG_IRQHandler + B WWDG_IRQHandler + + PUBWEAK PVD_AVD_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +PVD_AVD_IRQHandler + B PVD_AVD_IRQHandler + + PUBWEAK TAMP_STAMP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TAMP_STAMP_IRQHandler + B TAMP_STAMP_IRQHandler + + PUBWEAK RTC_WKUP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +RTC_WKUP_IRQHandler + B RTC_WKUP_IRQHandler + + PUBWEAK FLASH_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FLASH_IRQHandler + B FLASH_IRQHandler + + PUBWEAK RCC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +RCC_IRQHandler + B RCC_IRQHandler + + PUBWEAK EXTI0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI0_IRQHandler + B EXTI0_IRQHandler + + PUBWEAK EXTI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI1_IRQHandler + B EXTI1_IRQHandler + + PUBWEAK EXTI2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI2_IRQHandler + B EXTI2_IRQHandler + + PUBWEAK EXTI3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI3_IRQHandler + B EXTI3_IRQHandler + + PUBWEAK EXTI4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI4_IRQHandler + B EXTI4_IRQHandler + + PUBWEAK DMA1_Stream0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream0_IRQHandler + B DMA1_Stream0_IRQHandler + + PUBWEAK DMA1_Stream1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream1_IRQHandler + B DMA1_Stream1_IRQHandler + + PUBWEAK DMA1_Stream2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream2_IRQHandler + B DMA1_Stream2_IRQHandler + + PUBWEAK DMA1_Stream3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream3_IRQHandler + B DMA1_Stream3_IRQHandler + + PUBWEAK DMA1_Stream4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream4_IRQHandler + B DMA1_Stream4_IRQHandler + + PUBWEAK DMA1_Stream5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream5_IRQHandler + B DMA1_Stream5_IRQHandler + + PUBWEAK DMA1_Stream6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream6_IRQHandler + B DMA1_Stream6_IRQHandler + + PUBWEAK ADC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ADC_IRQHandler + B ADC_IRQHandler + + PUBWEAK FDCAN1_IT0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN1_IT0_IRQHandler + B FDCAN1_IT0_IRQHandler + + PUBWEAK FDCAN2_IT0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN2_IT0_IRQHandler + B FDCAN2_IT0_IRQHandler + + PUBWEAK FDCAN1_IT1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN1_IT1_IRQHandler + B FDCAN1_IT1_IRQHandler + + PUBWEAK FDCAN2_IT1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN2_IT1_IRQHandler + B FDCAN2_IT1_IRQHandler + + PUBWEAK EXTI9_5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI9_5_IRQHandler + B EXTI9_5_IRQHandler + + PUBWEAK TIM1_BRK_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM1_BRK_IRQHandler + B TIM1_BRK_IRQHandler + + PUBWEAK TIM1_UP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM1_UP_IRQHandler + B TIM1_UP_IRQHandler + + PUBWEAK TIM1_TRG_COM_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM1_TRG_COM_IRQHandler + B TIM1_TRG_COM_IRQHandler + + PUBWEAK TIM1_CC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM1_CC_IRQHandler + B TIM1_CC_IRQHandler + + PUBWEAK TIM2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM2_IRQHandler + B TIM2_IRQHandler + + PUBWEAK TIM3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM3_IRQHandler + B TIM3_IRQHandler + + PUBWEAK TIM4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM4_IRQHandler + B TIM4_IRQHandler + + PUBWEAK I2C1_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C1_EV_IRQHandler + B I2C1_EV_IRQHandler + + PUBWEAK I2C1_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C1_ER_IRQHandler + B I2C1_ER_IRQHandler + + PUBWEAK I2C2_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C2_EV_IRQHandler + B I2C2_EV_IRQHandler + + PUBWEAK I2C2_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C2_ER_IRQHandler + B I2C2_ER_IRQHandler + + PUBWEAK SPI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI1_IRQHandler + B SPI1_IRQHandler + + PUBWEAK SPI2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI2_IRQHandler + B SPI2_IRQHandler + + PUBWEAK USART1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART1_IRQHandler + B USART1_IRQHandler + + PUBWEAK USART2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART2_IRQHandler + B USART2_IRQHandler + + PUBWEAK USART3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART3_IRQHandler + B USART3_IRQHandler + + PUBWEAK EXTI15_10_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +EXTI15_10_IRQHandler + B EXTI15_10_IRQHandler + + PUBWEAK RTC_Alarm_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +RTC_Alarm_IRQHandler + B RTC_Alarm_IRQHandler + + PUBWEAK TIM8_BRK_TIM12_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM8_BRK_TIM12_IRQHandler + B TIM8_BRK_TIM12_IRQHandler + + PUBWEAK TIM8_UP_TIM13_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM8_UP_TIM13_IRQHandler + B TIM8_UP_TIM13_IRQHandler + + PUBWEAK TIM8_TRG_COM_TIM14_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM8_TRG_COM_TIM14_IRQHandler + B TIM8_TRG_COM_TIM14_IRQHandler + + PUBWEAK TIM8_CC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM8_CC_IRQHandler + B TIM8_CC_IRQHandler + + PUBWEAK DMA1_Stream7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA1_Stream7_IRQHandler + B DMA1_Stream7_IRQHandler + + PUBWEAK FMC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FMC_IRQHandler + B FMC_IRQHandler + + PUBWEAK SDMMC1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SDMMC1_IRQHandler + B SDMMC1_IRQHandler + + PUBWEAK TIM5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM5_IRQHandler + B TIM5_IRQHandler + + PUBWEAK SPI3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI3_IRQHandler + B SPI3_IRQHandler + + PUBWEAK UART4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART4_IRQHandler + B UART4_IRQHandler + + PUBWEAK UART5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART5_IRQHandler + B UART5_IRQHandler + + PUBWEAK TIM6_DAC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM6_DAC_IRQHandler + B TIM6_DAC_IRQHandler + + PUBWEAK TIM7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM7_IRQHandler + B TIM7_IRQHandler + + PUBWEAK DMA2_Stream0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream0_IRQHandler + B DMA2_Stream0_IRQHandler + + PUBWEAK DMA2_Stream1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream1_IRQHandler + B DMA2_Stream1_IRQHandler + + PUBWEAK DMA2_Stream2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream2_IRQHandler + B DMA2_Stream2_IRQHandler + + PUBWEAK DMA2_Stream3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream3_IRQHandler + B DMA2_Stream3_IRQHandler + + PUBWEAK DMA2_Stream4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream4_IRQHandler + B DMA2_Stream4_IRQHandler + + PUBWEAK ETH_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ETH_IRQHandler + B ETH_IRQHandler + + PUBWEAK ETH_WKUP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ETH_WKUP_IRQHandler + B ETH_WKUP_IRQHandler + + PUBWEAK FDCAN_CAL_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN_CAL_IRQHandler + B FDCAN_CAL_IRQHandler + + PUBWEAK DMA2_Stream5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream5_IRQHandler + B DMA2_Stream5_IRQHandler + + PUBWEAK DMA2_Stream6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream6_IRQHandler + B DMA2_Stream6_IRQHandler + + PUBWEAK DMA2_Stream7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2_Stream7_IRQHandler + B DMA2_Stream7_IRQHandler + + PUBWEAK USART6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART6_IRQHandler + B USART6_IRQHandler + + PUBWEAK I2C3_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C3_EV_IRQHandler + B I2C3_EV_IRQHandler + + PUBWEAK I2C3_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C3_ER_IRQHandler + B I2C3_ER_IRQHandler + + PUBWEAK OTG_HS_EP1_OUT_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTG_HS_EP1_OUT_IRQHandler + B OTG_HS_EP1_OUT_IRQHandler + + PUBWEAK OTG_HS_EP1_IN_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTG_HS_EP1_IN_IRQHandler + B OTG_HS_EP1_IN_IRQHandler + + PUBWEAK OTG_HS_WKUP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTG_HS_WKUP_IRQHandler + B OTG_HS_WKUP_IRQHandler + + PUBWEAK OTG_HS_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTG_HS_IRQHandler + B OTG_HS_IRQHandler + + PUBWEAK DCMI_PSSI_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DCMI_PSSI_IRQHandler + B DCMI_PSSI_IRQHandler + + PUBWEAK CRYP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +CRYP_IRQHandler + B CRYP_IRQHandler + + PUBWEAK HASH_RNG_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +HASH_RNG_IRQHandler + B HASH_RNG_IRQHandler + + PUBWEAK FPU_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FPU_IRQHandler + B FPU_IRQHandler + + PUBWEAK UART7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART7_IRQHandler + B UART7_IRQHandler + + PUBWEAK UART8_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART8_IRQHandler + B UART8_IRQHandler + + PUBWEAK SPI4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI4_IRQHandler + B SPI4_IRQHandler + + PUBWEAK SPI5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI5_IRQHandler + B SPI5_IRQHandler + + PUBWEAK SPI6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPI6_IRQHandler + B SPI6_IRQHandler + + PUBWEAK SAI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SAI1_IRQHandler + B SAI1_IRQHandler + + PUBWEAK LTDC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LTDC_IRQHandler + B LTDC_IRQHandler + + PUBWEAK LTDC_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LTDC_ER_IRQHandler + B LTDC_ER_IRQHandler + + PUBWEAK DMA2D_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMA2D_IRQHandler + B DMA2D_IRQHandler + + PUBWEAK OCTOSPI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OCTOSPI1_IRQHandler + B OCTOSPI1_IRQHandler + + PUBWEAK LPTIM1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM1_IRQHandler + B LPTIM1_IRQHandler + + PUBWEAK CEC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +CEC_IRQHandler + B CEC_IRQHandler + + PUBWEAK I2C4_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C4_EV_IRQHandler + B I2C4_EV_IRQHandler + + PUBWEAK I2C4_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C4_ER_IRQHandler + B I2C4_ER_IRQHandler + + PUBWEAK SPDIF_RX_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SPDIF_RX_IRQHandler + B SPDIF_RX_IRQHandler + + PUBWEAK DMAMUX1_OVR_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMAMUX1_OVR_IRQHandler + B DMAMUX1_OVR_IRQHandler + + PUBWEAK DFSDM1_FLT0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DFSDM1_FLT0_IRQHandler + B DFSDM1_FLT0_IRQHandler + + PUBWEAK DFSDM1_FLT1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DFSDM1_FLT1_IRQHandler + B DFSDM1_FLT1_IRQHandler + + PUBWEAK DFSDM1_FLT2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DFSDM1_FLT2_IRQHandler + B DFSDM1_FLT2_IRQHandler + + PUBWEAK DFSDM1_FLT3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DFSDM1_FLT3_IRQHandler + B DFSDM1_FLT3_IRQHandler + + PUBWEAK SWPMI1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SWPMI1_IRQHandler + B SWPMI1_IRQHandler + + PUBWEAK TIM15_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM15_IRQHandler + B TIM15_IRQHandler + + PUBWEAK TIM16_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM16_IRQHandler + B TIM16_IRQHandler + + PUBWEAK TIM17_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM17_IRQHandler + B TIM17_IRQHandler + + PUBWEAK MDIOS_WKUP_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +MDIOS_WKUP_IRQHandler + B MDIOS_WKUP_IRQHandler + + PUBWEAK MDIOS_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +MDIOS_IRQHandler + B MDIOS_IRQHandler + + PUBWEAK MDMA_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +MDMA_IRQHandler + B MDMA_IRQHandler + + PUBWEAK SDMMC2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SDMMC2_IRQHandler + B SDMMC2_IRQHandler + + PUBWEAK HSEM1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +HSEM1_IRQHandler + B HSEM1_IRQHandler + + PUBWEAK ADC3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ADC3_IRQHandler + B ADC3_IRQHandler + + PUBWEAK DMAMUX2_OVR_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DMAMUX2_OVR_IRQHandler + B DMAMUX2_OVR_IRQHandler + + PUBWEAK BDMA_Channel0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel0_IRQHandler + B BDMA_Channel0_IRQHandler + + PUBWEAK BDMA_Channel1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel1_IRQHandler + B BDMA_Channel1_IRQHandler + + PUBWEAK BDMA_Channel2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel2_IRQHandler + B BDMA_Channel2_IRQHandler + + PUBWEAK BDMA_Channel3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel3_IRQHandler + B BDMA_Channel3_IRQHandler + + PUBWEAK BDMA_Channel4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel4_IRQHandler + B BDMA_Channel4_IRQHandler + + PUBWEAK BDMA_Channel5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel5_IRQHandler + B BDMA_Channel5_IRQHandler + + PUBWEAK BDMA_Channel6_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel6_IRQHandler + B BDMA_Channel6_IRQHandler + + PUBWEAK BDMA_Channel7_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +BDMA_Channel7_IRQHandler + B BDMA_Channel7_IRQHandler + + PUBWEAK COMP1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +COMP1_IRQHandler + B COMP1_IRQHandler + + PUBWEAK LPTIM2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM2_IRQHandler + B LPTIM2_IRQHandler + + PUBWEAK LPTIM3_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM3_IRQHandler + B LPTIM3_IRQHandler + + PUBWEAK LPTIM4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM4_IRQHandler + B LPTIM4_IRQHandler + + PUBWEAK LPTIM5_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPTIM5_IRQHandler + B LPTIM5_IRQHandler + + PUBWEAK LPUART1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +LPUART1_IRQHandler + B LPUART1_IRQHandler + + PUBWEAK CRS_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +CRS_IRQHandler + B CRS_IRQHandler + + PUBWEAK ECC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +ECC_IRQHandler + B ECC_IRQHandler + + PUBWEAK SAI4_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +SAI4_IRQHandler + B SAI4_IRQHandler + + PUBWEAK DTS_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +DTS_IRQHandler + B DTS_IRQHandler + + PUBWEAK WAKEUP_PIN_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +WAKEUP_PIN_IRQHandler + B WAKEUP_PIN_IRQHandler + + PUBWEAK OCTOSPI2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OCTOSPI2_IRQHandler + B OCTOSPI2_IRQHandler + + PUBWEAK OTFDEC1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTFDEC1_IRQHandler + B OTFDEC1_IRQHandler + + PUBWEAK OTFDEC2_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +OTFDEC2_IRQHandler + B OTFDEC2_IRQHandler + + PUBWEAK FMAC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FMAC_IRQHandler + B FMAC_IRQHandler + + PUBWEAK CORDIC_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +CORDIC_IRQHandler + B CORDIC_IRQHandler + + PUBWEAK UART9_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +UART9_IRQHandler + B UART9_IRQHandler + + PUBWEAK USART10_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +USART10_IRQHandler + B USART10_IRQHandler + + PUBWEAK I2C5_EV_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C5_EV_IRQHandler + B I2C5_EV_IRQHandler + + PUBWEAK I2C5_ER_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +I2C5_ER_IRQHandler + B I2C5_ER_IRQHandler + + PUBWEAK FDCAN3_IT0_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN3_IT0_IRQHandler + B FDCAN3_IT0_IRQHandler + + PUBWEAK FDCAN3_IT1_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +FDCAN3_IT1_IRQHandler + B FDCAN3_IT1_IRQHandler + + PUBWEAK TIM23_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM23_IRQHandler + B TIM23_IRQHandler + + PUBWEAK TIM24_IRQHandler + SECTION .text:CODE:NOROOT:REORDER(1) +TIM24_IRQHandler + B TIM24_IRQHandler + + END +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/system_stm32h7xx.c b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/system_stm32h7xx.c index 58da4c8..c8ccdcc 100755 --- a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/system_stm32h7xx.c +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/system_stm32h7xx.c @@ -148,14 +148,29 @@ void SystemInit (void) SCB->CPACR |= ((3UL << (10*2))|(3UL << (11*2))); /* set CP10 and CP11 Full Access */ #endif /* Reset the RCC clock configuration to the default reset state ------------*/ + + /* Increasing the CPU frequency */ + if(FLASH_LATENCY_DEFAULT > (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY))) + { + /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ + MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, (uint32_t)(FLASH_LATENCY_DEFAULT)); + } + /* Set HSION bit */ RCC->CR |= RCC_CR_HSION; /* Reset CFGR register */ RCC->CFGR = 0x00000000; - /* Reset HSEON, CSSON , CSION,RC48ON, CSIKERON PLL1ON, PLL2ON and PLL3ON bits */ + /* Reset HSEON, HSECSSON, CSION, HSI48ON, CSIKERON, PLL1ON, PLL2ON and PLL3ON bits */ RCC->CR &= 0xEAF6ED7FU; + + /* Decreasing the number of wait states because of lower CPU frequency */ + if(FLASH_LATENCY_DEFAULT < (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY))) + { + /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ + MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, (uint32_t)(FLASH_LATENCY_DEFAULT)); + } #if defined(D3_SRAM_BASE) /* Reset D1CFGR register */ @@ -177,23 +192,23 @@ void SystemInit (void) RCC->SRDCFGR = 0x00000000; #endif /* Reset PLLCKSELR register */ - RCC->PLLCKSELR = 0x00000000; + RCC->PLLCKSELR = 0x02020200; /* Reset PLLCFGR register */ - RCC->PLLCFGR = 0x00000000; + RCC->PLLCFGR = 0x01FF0000; /* Reset PLL1DIVR register */ - RCC->PLL1DIVR = 0x00000000; + RCC->PLL1DIVR = 0x01010280; /* Reset PLL1FRACR register */ RCC->PLL1FRACR = 0x00000000; /* Reset PLL2DIVR register */ - RCC->PLL2DIVR = 0x00000000; + RCC->PLL2DIVR = 0x01010280; /* Reset PLL2FRACR register */ RCC->PLL2FRACR = 0x00000000; /* Reset PLL3DIVR register */ - RCC->PLL3DIVR = 0x00000000; + RCC->PLL3DIVR = 0x01010280; /* Reset PLL3FRACR register */ RCC->PLL3FRACR = 0x00000000; @@ -231,13 +246,20 @@ void SystemInit (void) #if defined(DUAL_CORE) && defined(CORE_CM4) /* Configure the Vector Table location add offset address for cortex-M4 ------------------*/ #ifdef VECT_TAB_SRAM - SCB->VTOR = D2_AHBSRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ + SCB->VTOR = D2_AXISRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ #else SCB->VTOR = FLASH_BANK2_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ #endif /* VECT_TAB_SRAM */ #else + /* + * Disable the FMC bank1 (enabled after reset). + * This, prevents CPU speculation access on this bank which blocks the use of FMC during + * 24us. During this time the others FMC master (such as LTDC) cannot use it! + */ + FMC_Bank1_R->BTCR[0] = 0x000030D2; + /* Configure the Vector Table location add offset address for cortex-M7 ------------------*/ #ifdef VECT_TAB_SRAM SCB->VTOR = D1_AXISRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal AXI-RAM */ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/system_stm32h7xx_dualcore_boot_cm4_cm7.c b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/system_stm32h7xx_dualcore_boot_cm4_cm7.c index 69b6b5d..447ce83 100644 --- a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/system_stm32h7xx_dualcore_boot_cm4_cm7.c +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/system_stm32h7xx_dualcore_boot_cm4_cm7.c @@ -147,19 +147,33 @@ void SystemInit (void) /*SEVONPEND enabled so that an interrupt coming from the CPU(n) interrupt signal is detectable by the CPU after a WFI/WFE instruction.*/ - SCB->SCR |= SCB_SCR_SEVONPEND_Pos; + SCB->SCR |= SCB_SCR_SEVONPEND_Msk; #ifdef CORE_CM7 /* Reset the RCC clock configuration to the default reset state ------------*/ + /* Increasing the CPU frequency */ + if(FLASH_LATENCY_DEFAULT > (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY))) + { + /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ + MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, (uint32_t)(FLASH_LATENCY_DEFAULT)); + } + /* Set HSION bit */ RCC->CR |= RCC_CR_HSION; /* Reset CFGR register */ RCC->CFGR = 0x00000000; - /* Reset HSEON, CSSON , CSION,RC48ON, CSIKERON PLL1ON, PLL2ON and PLL3ON bits */ + /* Reset HSEON, HSECSSON, CSION, RC48ON, CSIKERON, PLL1ON, PLL2ON and PLL3ON bits */ RCC->CR &= 0xEAF6ED7FU; + /* Decreasing the number of wait states because of lower CPU frequency */ + if(FLASH_LATENCY_DEFAULT < (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY))) + { + /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ + MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, (uint32_t)(FLASH_LATENCY_DEFAULT)); + } + /* Reset D1CFGR register */ RCC->D1CFGR = 0x00000000; @@ -170,23 +184,23 @@ void SystemInit (void) RCC->D3CFGR = 0x00000000; /* Reset PLLCKSELR register */ - RCC->PLLCKSELR = 0x00000000; + RCC->PLLCKSELR = 0x02020200; /* Reset PLLCFGR register */ - RCC->PLLCFGR = 0x00000000; + RCC->PLLCFGR = 0x01FF0000; /* Reset PLL1DIVR register */ - RCC->PLL1DIVR = 0x00000000; + RCC->PLL1DIVR = 0x01010280; /* Reset PLL1FRACR register */ RCC->PLL1FRACR = 0x00000000; /* Reset PLL2DIVR register */ - RCC->PLL2DIVR = 0x00000000; + RCC->PLL2DIVR = 0x01010280; /* Reset PLL2FRACR register */ RCC->PLL2FRACR = 0x00000000; /* Reset PLL3DIVR register */ - RCC->PLL3DIVR = 0x00000000; + RCC->PLL3DIVR = 0x01010280; /* Reset PLL3FRACR register */ RCC->PLL3FRACR = 0x00000000; @@ -214,7 +228,7 @@ void SystemInit (void) /* Configure the Vector Table location add offset address ------------------*/ #ifdef VECT_TAB_SRAM - SCB->VTOR = D2_AHBSRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ + SCB->VTOR = D2_AXISRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ #else SCB->VTOR = FLASH_BANK2_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ #endif @@ -222,6 +236,13 @@ void SystemInit (void) #else #ifdef CORE_CM7 + /* + * Disable the FMC bank1 (enabled after reset). + * This, prevents CPU speculation access on this bank which blocks the use of FMC during + * 24us. During this time the others FMC master (such as LTDC) cannot use it! + */ + FMC_Bank1_R->BTCR[0] = 0x000030D2; + /* Configure the Vector Table location add offset address ------------------*/ #ifdef VECT_TAB_SRAM SCB->VTOR = D1_AXISRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal D1 AXI-RAM */ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/system_stm32h7xx_dualcore_bootcm4_cm7gated.c b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/system_stm32h7xx_dualcore_bootcm4_cm7gated.c index 1f78560..79d1133 100644 --- a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/system_stm32h7xx_dualcore_bootcm4_cm7gated.c +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/system_stm32h7xx_dualcore_bootcm4_cm7gated.c @@ -150,15 +150,29 @@ void SystemInit (void) #ifdef CORE_CM4 /* Reset the RCC clock configuration to the default reset state ------------*/ + /* Increasing the CPU frequency */ + if(FLASH_LATENCY_DEFAULT > (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY))) + { + /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ + MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, (uint32_t)(FLASH_LATENCY_DEFAULT)); + } + /* Set HSION bit */ RCC->CR |= RCC_CR_HSION; /* Reset CFGR register */ RCC->CFGR = 0x00000000; - /* Reset HSEON, CSSON , CSION,RC48ON, CSIKERON PLL1ON, PLL2ON and PLL3ON bits */ + /* Reset HSEON, HSECSSON, CSION, HSI48ON, CSIKERON, PLL1ON, PLL2ON and PLL3ON bits */ RCC->CR &= 0xEAF6ED7FU; + /* Decreasing the number of wait states because of lower CPU frequency */ + if(FLASH_LATENCY_DEFAULT < (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY))) + { + /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ + MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, (uint32_t)(FLASH_LATENCY_DEFAULT)); + } + /* Reset D1CFGR register */ RCC->D1CFGR = 0x00000000; @@ -169,23 +183,23 @@ void SystemInit (void) RCC->D3CFGR = 0x00000000; /* Reset PLLCKSELR register */ - RCC->PLLCKSELR = 0x00000000; + RCC->PLLCKSELR = 0x02020200; /* Reset PLLCFGR register */ - RCC->PLLCFGR = 0x00000000; + RCC->PLLCFGR = 0x01FF0000; /* Reset PLL1DIVR register */ - RCC->PLL1DIVR = 0x00000000; + RCC->PLL1DIVR = 0x01010280; /* Reset PLL1FRACR register */ RCC->PLL1FRACR = 0x00000000; /* Reset PLL2DIVR register */ - RCC->PLL2DIVR = 0x00000000; + RCC->PLL2DIVR = 0x01010280; /* Reset PLL2FRACR register */ RCC->PLL2FRACR = 0x00000000; /* Reset PLL3DIVR register */ - RCC->PLL3DIVR = 0x00000000; + RCC->PLL3DIVR = 0x01010280; /* Reset PLL3FRACR register */ RCC->PLL3FRACR = 0x00000000; @@ -204,7 +218,7 @@ void SystemInit (void) /* Configure the Vector Table location add offset address ------------------*/ #ifdef VECT_TAB_SRAM - SCB->VTOR = D2_AHBSRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ + SCB->VTOR = D2_AXISRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ #else SCB->VTOR = FLASH_BANK2_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ #endif @@ -220,6 +234,13 @@ void SystemInit (void) *((__IO uint32_t*)0x51008108) = 0x000000001U; } + /* + * Disable the FMC bank1 (enabled after reset). + * This, prevents CPU speculation access on this bank which blocks the use of FMC during + * 24us. During this time the others FMC master (such as LTDC) cannot use it! + */ + FMC_Bank1_R->BTCR[0] = 0x000030D2; + /* Configure the Vector Table location add offset address ------------------*/ #ifdef VECT_TAB_SRAM SCB->VTOR = D1_AXISRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/system_stm32h7xx_dualcore_bootcm7_cm4gated.c b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/system_stm32h7xx_dualcore_bootcm7_cm4gated.c index a4d65ce..780859d 100644 --- a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/system_stm32h7xx_dualcore_bootcm7_cm4gated.c +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/system_stm32h7xx_dualcore_bootcm7_cm4gated.c @@ -150,15 +150,29 @@ void SystemInit (void) #ifdef CORE_CM7 /* Reset the RCC clock configuration to the default reset state ------------*/ + /* Increasing the CPU frequency */ + if(FLASH_LATENCY_DEFAULT > (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY))) + { + /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ + MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, (uint32_t)(FLASH_LATENCY_DEFAULT)); + } + /* Set HSION bit */ RCC->CR |= RCC_CR_HSION; /* Reset CFGR register */ RCC->CFGR = 0x00000000; - /* Reset HSEON, CSSON , CSION,RC48ON, CSIKERON PLL1ON, PLL2ON and PLL3ON bits */ + /* Reset HSEON, HSECSSON, CSION, HSI48ON, CSIKERON, PLL1ON, PLL2ON and PLL3ON bits */ RCC->CR &= 0xEAF6ED7FU; + /* Decreasing the number of wait states because of lower CPU frequency */ + if(FLASH_LATENCY_DEFAULT < (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY))) + { + /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ + MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, (uint32_t)(FLASH_LATENCY_DEFAULT)); + } + /* Reset D1CFGR register */ RCC->D1CFGR = 0x00000000; @@ -169,23 +183,23 @@ void SystemInit (void) RCC->D3CFGR = 0x00000000; /* Reset PLLCKSELR register */ - RCC->PLLCKSELR = 0x00000000; + RCC->PLLCKSELR = 0x02020200; /* Reset PLLCFGR register */ - RCC->PLLCFGR = 0x00000000; + RCC->PLLCFGR = 0x01FF0000; /* Reset PLL1DIVR register */ - RCC->PLL1DIVR = 0x00000000; + RCC->PLL1DIVR = 0x01010280; /* Reset PLL1FRACR register */ RCC->PLL1FRACR = 0x00000000; /* Reset PLL2DIVR register */ - RCC->PLL2DIVR = 0x00000000; + RCC->PLL2DIVR = 0x01010280; /* Reset PLL2FRACR register */ RCC->PLL2FRACR = 0x00000000; /* Reset PLL3DIVR register */ - RCC->PLL3DIVR = 0x00000000; + RCC->PLL3DIVR = 0x01010280; /* Reset PLL3FRACR register */ RCC->PLL3FRACR = 0x00000000; @@ -210,7 +224,7 @@ void SystemInit (void) /* Configure the Vector Table location add offset address ------------------*/ #ifdef VECT_TAB_SRAM - SCB->VTOR = D2_AHBSRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ + SCB->VTOR = D2_AXISRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ #else SCB->VTOR = FLASH_BANK2_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ #endif @@ -218,6 +232,13 @@ void SystemInit (void) #else #ifdef CORE_CM7 + /* + * Disable the FMC bank1 (enabled after reset). + * This, prevents CPU speculation access on this bank which blocks the use of FMC during + * 24us. During this time the others FMC master (such as LTDC) cannot use it! + */ + FMC_Bank1_R->BTCR[0] = 0x000030D2; + /* Configure the Vector Table location add offset address ------------------*/ #ifdef VECT_TAB_SRAM SCB->VTOR = D1_AXISRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/system_stm32h7xx_singlecore.c b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/system_stm32h7xx_singlecore.c index b8e2af1..df3d494 100644 --- a/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/system_stm32h7xx_singlecore.c +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/Source/Templates/system_stm32h7xx_singlecore.c @@ -151,15 +151,30 @@ void SystemInit (void) SCB->CPACR |= ((3UL << (10*2))|(3UL << (11*2))); /* set CP10 and CP11 Full Access */ #endif /* Reset the RCC clock configuration to the default reset state ------------*/ + + /* Increasing the CPU frequency */ + if(FLASH_LATENCY_DEFAULT > (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY))) + { + /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ + MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, (uint32_t)(FLASH_LATENCY_DEFAULT)); + } + /* Set HSION bit */ RCC->CR |= RCC_CR_HSION; /* Reset CFGR register */ RCC->CFGR = 0x00000000; - /* Reset HSEON, CSSON , CSION,RC48ON, CSIKERON PLL1ON, PLL2ON and PLL3ON bits */ + /* Reset HSEON, HSECSSON, CSION, HSI48ON, CSIKERON, PLL1ON, PLL2ON and PLL3ON bits */ RCC->CR &= 0xEAF6ED7FU; + /* Decreasing the number of wait states because of lower CPU frequency */ + if(FLASH_LATENCY_DEFAULT < (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY))) + { + /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ + MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, (uint32_t)(FLASH_LATENCY_DEFAULT)); + } + #if defined(D3_SRAM_BASE) /* Reset D1CFGR register */ RCC->D1CFGR = 0x00000000; @@ -180,23 +195,23 @@ void SystemInit (void) RCC->SRDCFGR = 0x00000000; #endif /* Reset PLLCKSELR register */ - RCC->PLLCKSELR = 0x00000000; + RCC->PLLCKSELR = 0x02020200; /* Reset PLLCFGR register */ - RCC->PLLCFGR = 0x00000000; + RCC->PLLCFGR = 0x01FF0000; /* Reset PLL1DIVR register */ - RCC->PLL1DIVR = 0x00000000; + RCC->PLL1DIVR = 0x01010280; /* Reset PLL1FRACR register */ RCC->PLL1FRACR = 0x00000000; /* Reset PLL2DIVR register */ - RCC->PLL2DIVR = 0x00000000; + RCC->PLL2DIVR = 0x01010280; /* Reset PLL2FRACR register */ RCC->PLL2FRACR = 0x00000000; /* Reset PLL3DIVR register */ - RCC->PLL3DIVR = 0x00000000; + RCC->PLL3DIVR = 0x01010280; /* Reset PLL3FRACR register */ RCC->PLL3FRACR = 0x00000000; @@ -230,6 +245,13 @@ void SystemInit (void) (void) tmpreg; #endif /* DATA_IN_D2_SRAM */ + /* + * Disable the FMC bank1 (enabled after reset). + * This, prevents CPU speculation access on this bank which blocks the use of FMC during + * 24us. During this time the others FMC master (such as LTDC) cannot use it! + */ + FMC_Bank1_R->BTCR[0] = 0x000030D2; + /* Configure the Vector Table location add offset address ------------------*/ #ifdef VECT_TAB_SRAM SCB->VTOR = D1_AXISRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal AXI-RAM */ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/_htmresc/mini-st.css b/Libraries/CMSIS/Device/ST/STM32H7xx/_htmresc/mini-st.css new file mode 100644 index 0000000..71fbc14 --- /dev/null +++ b/Libraries/CMSIS/Device/ST/STM32H7xx/_htmresc/mini-st.css @@ -0,0 +1,1700 @@ +@charset "UTF-8"; +/* + Flavor name: Default (mini-default) + Author: Angelos Chalaris (chalarangelo@gmail.com) + Maintainers: Angelos Chalaris + mini.css version: v3.0.0-alpha.3 +*/ +/* + Browsers resets and base typography. +*/ +/* Core module CSS variable definitions */ +:root { + --fore-color: #111; + --secondary-fore-color: #444; + --back-color: #f8f8f8; + --secondary-back-color: #f0f0f0; + --blockquote-color: #f57c00; + --pre-color: #1565c0; + --border-color: #aaa; + --secondary-border-color: #ddd; + --heading-ratio: 1.19; + --universal-margin: 0.5rem; + --universal-padding: 0.125rem; + --universal-border-radius: 0.125rem; + --a-link-color: #0277bd; + --a-visited-color: #01579b; } + +html { + font-size: 14px; } + +a, b, del, em, i, ins, q, span, strong, u { + font-size: 1em; } + +html, * { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Helvetica, sans-serif; + line-height: 1.4; + -webkit-text-size-adjust: 100%; } + +* { + font-size: 1rem; } + +body { + margin: 0; + color: var(--fore-color); + background: var(--back-color); } + +details { + display: block; } + +summary { + display: list-item; } + +abbr[title] { + border-bottom: none; + text-decoration: underline dotted; } + +input { + overflow: visible; } + +img { + max-width: 100%; + height: auto; } + +h1, h2, h3, h4, h5, h6 { + line-height: 1.2; + margin: calc(1.5 * var(--universal-margin)) var(--universal-margin); + font-weight: 500; } + h1 small, h2 small, h3 small, h4 small, h5 small, h6 small { + color: var(--secondary-fore-color); + display: block; + margin-top: -0.25rem; } + +h1 { + font-size: calc(1rem * var(--heading-ratio) * var(--heading-ratio) * var(--heading-ratio)); } + +h2 { + font-size: calc(1rem * var(--heading-ratio) * var(--heading-ratio); ); + background: var(--mark-back-color); + font-weight: 600; + padding: 0.1em 0.5em 0.2em 0.5em; + color: var(--mark-fore-color); } + +h3 { + font-size: calc(1rem * var(--heading-ratio)); + padding-left: calc(2 * var(--universal-margin)); + /* background: var(--border-color); */ + } + +h4 { + font-size: 1rem;); + padding-left: calc(4 * var(--universal-margin)); } + +h5 { + font-size: 1rem; } + +h6 { + font-size: calc(1rem / var(--heading-ratio)); } + +p { + margin: var(--universal-margin); } + +ol, ul { + margin: var(--universal-margin); + padding-left: calc(6 * var(--universal-margin)); } + +b, strong { + font-weight: 700; } + +hr { + box-sizing: content-box; + border: 0; + line-height: 1.25em; + margin: var(--universal-margin); + height: 0.0625rem; + background: linear-gradient(to right, transparent, var(--border-color) 20%, var(--border-color) 80%, transparent); } + +blockquote { + display: block; + position: relative; + font-style: italic; + color: var(--secondary-fore-color); + margin: var(--universal-margin); + padding: calc(3 * var(--universal-padding)); + border: 0.0625rem solid var(--secondary-border-color); + border-left: 0.375rem solid var(--blockquote-color); + border-radius: 0 var(--universal-border-radius) var(--universal-border-radius) 0; } + blockquote:before { + position: absolute; + top: calc(0rem - var(--universal-padding)); + left: 0; + font-family: sans-serif; + font-size: 3rem; + font-weight: 700; + content: "\201c"; + color: var(--blockquote-color); } + blockquote[cite]:after { + font-style: normal; + font-size: 0.75em; + font-weight: 700; + content: "\a— " attr(cite); + white-space: pre; } + +code, kbd, pre, samp { + font-family: Menlo, Consolas, monospace; + font-size: 0.85em; } + +code { + background: var(--secondary-back-color); + border-radius: var(--universal-border-radius); + padding: calc(var(--universal-padding) / 4) calc(var(--universal-padding) / 2); } + +kbd { + background: var(--fore-color); + color: var(--back-color); + border-radius: var(--universal-border-radius); + padding: calc(var(--universal-padding) / 4) calc(var(--universal-padding) / 2); } + +pre { + overflow: auto; + background: var(--secondary-back-color); + padding: calc(1.5 * var(--universal-padding)); + margin: var(--universal-margin); + border: 0.0625rem solid var(--secondary-border-color); + border-left: 0.25rem solid var(--pre-color); + border-radius: 0 var(--universal-border-radius) var(--universal-border-radius) 0; } + +sup, sub, code, kbd { + line-height: 0; + position: relative; + vertical-align: baseline; } + +small, sup, sub, figcaption { + font-size: 0.75em; } + +sup { + top: -0.5em; } + +sub { + bottom: -0.25em; } + +figure { + margin: var(--universal-margin); } + +figcaption { + color: var(--secondary-fore-color); } + +a { + text-decoration: none; } + a:link { + color: var(--a-link-color); } + a:visited { + color: var(--a-visited-color); } + a:hover, a:focus { + text-decoration: underline; } + +/* + Definitions for the grid system, cards and containers. +*/ +.container { + margin: 0 auto; + padding: 0 calc(1.5 * var(--universal-padding)); } + +.row { + box-sizing: border-box; + display: flex; + flex: 0 1 auto; + flex-flow: row wrap; } + +.col-sm, +[class^='col-sm-'], +[class^='col-sm-offset-'], +.row[class*='cols-sm-'] > * { + box-sizing: border-box; + flex: 0 0 auto; + padding: 0 calc(var(--universal-padding) / 2); } + +.col-sm, +.row.cols-sm > * { + max-width: 100%; + flex-grow: 1; + flex-basis: 0; } + +.col-sm-1, +.row.cols-sm-1 > * { + max-width: 8.3333333333%; + flex-basis: 8.3333333333%; } + +.col-sm-offset-0 { + margin-left: 0; } + +.col-sm-2, +.row.cols-sm-2 > * { + max-width: 16.6666666667%; + flex-basis: 16.6666666667%; } + +.col-sm-offset-1 { + margin-left: 8.3333333333%; } + +.col-sm-3, +.row.cols-sm-3 > * { + max-width: 25%; + flex-basis: 25%; } + +.col-sm-offset-2 { + margin-left: 16.6666666667%; } + +.col-sm-4, +.row.cols-sm-4 > * { + max-width: 33.3333333333%; + flex-basis: 33.3333333333%; } + +.col-sm-offset-3 { + margin-left: 25%; } + +.col-sm-5, +.row.cols-sm-5 > * { + max-width: 41.6666666667%; + flex-basis: 41.6666666667%; } + +.col-sm-offset-4 { + margin-left: 33.3333333333%; } + +.col-sm-6, +.row.cols-sm-6 > * { + max-width: 50%; + flex-basis: 50%; } + +.col-sm-offset-5 { + margin-left: 41.6666666667%; } + +.col-sm-7, +.row.cols-sm-7 > * { + max-width: 58.3333333333%; + flex-basis: 58.3333333333%; } + +.col-sm-offset-6 { + margin-left: 50%; } + +.col-sm-8, +.row.cols-sm-8 > * { + max-width: 66.6666666667%; + flex-basis: 66.6666666667%; } + +.col-sm-offset-7 { + margin-left: 58.3333333333%; } + +.col-sm-9, +.row.cols-sm-9 > * { + max-width: 75%; + flex-basis: 75%; } + +.col-sm-offset-8 { + margin-left: 66.6666666667%; } + +.col-sm-10, +.row.cols-sm-10 > * { + max-width: 83.3333333333%; + flex-basis: 83.3333333333%; } + +.col-sm-offset-9 { + margin-left: 75%; } + +.col-sm-11, +.row.cols-sm-11 > * { + max-width: 91.6666666667%; + flex-basis: 91.6666666667%; } + +.col-sm-offset-10 { + margin-left: 83.3333333333%; } + +.col-sm-12, +.row.cols-sm-12 > * { + max-width: 100%; + flex-basis: 100%; } + +.col-sm-offset-11 { + margin-left: 91.6666666667%; } + +.col-sm-normal { + order: initial; } + +.col-sm-first { + order: -999; } + +.col-sm-last { + order: 999; } + +@media screen and (min-width: 500px) { + .col-md, + [class^='col-md-'], + [class^='col-md-offset-'], + .row[class*='cols-md-'] > * { + box-sizing: border-box; + flex: 0 0 auto; + padding: 0 calc(var(--universal-padding) / 2); } + + .col-md, + .row.cols-md > * { + max-width: 100%; + flex-grow: 1; + flex-basis: 0; } + + .col-md-1, + .row.cols-md-1 > * { + max-width: 8.3333333333%; + flex-basis: 8.3333333333%; } + + .col-md-offset-0 { + margin-left: 0; } + + .col-md-2, + .row.cols-md-2 > * { + max-width: 16.6666666667%; + flex-basis: 16.6666666667%; } + + .col-md-offset-1 { + margin-left: 8.3333333333%; } + + .col-md-3, + .row.cols-md-3 > * { + max-width: 25%; + flex-basis: 25%; } + + .col-md-offset-2 { + margin-left: 16.6666666667%; } + + .col-md-4, + .row.cols-md-4 > * { + max-width: 33.3333333333%; + flex-basis: 33.3333333333%; } + + .col-md-offset-3 { + margin-left: 25%; } + + .col-md-5, + .row.cols-md-5 > * { + max-width: 41.6666666667%; + flex-basis: 41.6666666667%; } + + .col-md-offset-4 { + margin-left: 33.3333333333%; } + + .col-md-6, + .row.cols-md-6 > * { + max-width: 50%; + flex-basis: 50%; } + + .col-md-offset-5 { + margin-left: 41.6666666667%; } + + .col-md-7, + .row.cols-md-7 > * { + max-width: 58.3333333333%; + flex-basis: 58.3333333333%; } + + .col-md-offset-6 { + margin-left: 50%; } + + .col-md-8, + .row.cols-md-8 > * { + max-width: 66.6666666667%; + flex-basis: 66.6666666667%; } + + .col-md-offset-7 { + margin-left: 58.3333333333%; } + + .col-md-9, + .row.cols-md-9 > * { + max-width: 75%; + flex-basis: 75%; } + + .col-md-offset-8 { + margin-left: 66.6666666667%; } + + .col-md-10, + .row.cols-md-10 > * { + max-width: 83.3333333333%; + flex-basis: 83.3333333333%; } + + .col-md-offset-9 { + margin-left: 75%; } + + .col-md-11, + .row.cols-md-11 > * { + max-width: 91.6666666667%; + flex-basis: 91.6666666667%; } + + .col-md-offset-10 { + margin-left: 83.3333333333%; } + + .col-md-12, + .row.cols-md-12 > * { + max-width: 100%; + flex-basis: 100%; } + + .col-md-offset-11 { + margin-left: 91.6666666667%; } + + .col-md-normal { + order: initial; } + + .col-md-first { + order: -999; } + + .col-md-last { + order: 999; } } +@media screen and (min-width: 1280px) { + .col-lg, + [class^='col-lg-'], + [class^='col-lg-offset-'], + .row[class*='cols-lg-'] > * { + box-sizing: border-box; + flex: 0 0 auto; + padding: 0 calc(var(--universal-padding) / 2); } + + .col-lg, + .row.cols-lg > * { + max-width: 100%; + flex-grow: 1; + flex-basis: 0; } + + .col-lg-1, + .row.cols-lg-1 > * { + max-width: 8.3333333333%; + flex-basis: 8.3333333333%; } + + .col-lg-offset-0 { + margin-left: 0; } + + .col-lg-2, + .row.cols-lg-2 > * { + max-width: 16.6666666667%; + flex-basis: 16.6666666667%; } + + .col-lg-offset-1 { + margin-left: 8.3333333333%; } + + .col-lg-3, + .row.cols-lg-3 > * { + max-width: 25%; + flex-basis: 25%; } + + .col-lg-offset-2 { + margin-left: 16.6666666667%; } + + .col-lg-4, + .row.cols-lg-4 > * { + max-width: 33.3333333333%; + flex-basis: 33.3333333333%; } + + .col-lg-offset-3 { + margin-left: 25%; } + + .col-lg-5, + .row.cols-lg-5 > * { + max-width: 41.6666666667%; + flex-basis: 41.6666666667%; } + + .col-lg-offset-4 { + margin-left: 33.3333333333%; } + + .col-lg-6, + .row.cols-lg-6 > * { + max-width: 50%; + flex-basis: 50%; } + + .col-lg-offset-5 { + margin-left: 41.6666666667%; } + + .col-lg-7, + .row.cols-lg-7 > * { + max-width: 58.3333333333%; + flex-basis: 58.3333333333%; } + + .col-lg-offset-6 { + margin-left: 50%; } + + .col-lg-8, + .row.cols-lg-8 > * { + max-width: 66.6666666667%; + flex-basis: 66.6666666667%; } + + .col-lg-offset-7 { + margin-left: 58.3333333333%; } + + .col-lg-9, + .row.cols-lg-9 > * { + max-width: 75%; + flex-basis: 75%; } + + .col-lg-offset-8 { + margin-left: 66.6666666667%; } + + .col-lg-10, + .row.cols-lg-10 > * { + max-width: 83.3333333333%; + flex-basis: 83.3333333333%; } + + .col-lg-offset-9 { + margin-left: 75%; } + + .col-lg-11, + .row.cols-lg-11 > * { + max-width: 91.6666666667%; + flex-basis: 91.6666666667%; } + + .col-lg-offset-10 { + margin-left: 83.3333333333%; } + + .col-lg-12, + .row.cols-lg-12 > * { + max-width: 100%; + flex-basis: 100%; } + + .col-lg-offset-11 { + margin-left: 91.6666666667%; } + + .col-lg-normal { + order: initial; } + + .col-lg-first { + order: -999; } + + .col-lg-last { + order: 999; } } +/* Card component CSS variable definitions */ +:root { + --card-back-color: #f8f8f8; + --card-fore-color: #111; + --card-border-color: #ddd; } + +.card { + display: flex; + flex-direction: column; + justify-content: space-between; + align-self: center; + position: relative; + width: 100%; + background: var(--card-back-color); + color: var(--card-fore-color); + border: 0.0625rem solid var(--card-border-color); + border-radius: var(--universal-border-radius); + margin: var(--universal-margin); + overflow: hidden; } + @media screen and (min-width: 320px) { + .card { + max-width: 320px; } } + .card > .sectione { + background: var(--card-back-color); + color: var(--card-fore-color); + box-sizing: border-box; + margin: 0; + border: 0; + border-radius: 0; + border-bottom: 0.0625rem solid var(--card-border-color); + padding: var(--universal-padding); + width: 100%; } + .card > .sectione.media { + height: 200px; + padding: 0; + -o-object-fit: cover; + object-fit: cover; } + .card > .sectione:last-child { + border-bottom: 0; } + +/* + Custom elements for card elements. +*/ +@media screen and (min-width: 240px) { + .card.small { + max-width: 240px; } } +@media screen and (min-width: 480px) { + .card.large { + max-width: 480px; } } +.card.fluid { + max-width: 100%; + width: auto; } + +.card.warning { +/* --card-back-color: #ffca28; */ + --card-back-color: #e5b8b7; + --card-border-color: #e8b825; } + +.card.error { + --card-back-color: #b71c1c; + --card-fore-color: #f8f8f8; + --card-border-color: #a71a1a; } + +.card > .sectione.dark { + --card-back-color: #e0e0e0; } + +.card > .sectione.double-padded { + padding: calc(1.5 * var(--universal-padding)); } + +/* + Definitions for forms and input elements. +*/ +/* Input_control module CSS variable definitions */ +:root { + --form-back-color: #f0f0f0; + --form-fore-color: #111; + --form-border-color: #ddd; + --input-back-color: #f8f8f8; + --input-fore-color: #111; + --input-border-color: #ddd; + --input-focus-color: #0288d1; + --input-invalid-color: #d32f2f; + --button-back-color: #e2e2e2; + --button-hover-back-color: #dcdcdc; + --button-fore-color: #212121; + --button-border-color: transparent; + --button-hover-border-color: transparent; + --button-group-border-color: rgba(124, 124, 124, 0.54); } + +form { + background: var(--form-back-color); + color: var(--form-fore-color); + border: 0.0625rem solid var(--form-border-color); + border-radius: var(--universal-border-radius); + margin: var(--universal-margin); + padding: calc(2 * var(--universal-padding)) var(--universal-padding); } + +fieldset { + border: 0.0625rem solid var(--form-border-color); + border-radius: var(--universal-border-radius); + margin: calc(var(--universal-margin) / 4); + padding: var(--universal-padding); } + +legend { + box-sizing: border-box; + display: table; + max-width: 100%; + white-space: normal; + font-weight: 700; + padding: calc(var(--universal-padding) / 2); } + +label { + padding: calc(var(--universal-padding) / 2) var(--universal-padding); } + +.input-group { + display: inline-block; } + .input-group.fluid { + display: flex; + align-items: center; + justify-content: center; } + .input-group.fluid > input { + max-width: 100%; + flex-grow: 1; + flex-basis: 0px; } + @media screen and (max-width: 499px) { + .input-group.fluid { + align-items: stretch; + flex-direction: column; } } + .input-group.vertical { + display: flex; + align-items: stretch; + flex-direction: column; } + .input-group.vertical > input { + max-width: 100%; + flex-grow: 1; + flex-basis: 0px; } + +[type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button { + height: auto; } + +[type="search"] { + -webkit-appearance: textfield; + outline-offset: -2px; } + +[type="search"]::-webkit-search-cancel-button, +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; } + +input:not([type]), [type="text"], [type="email"], [type="number"], [type="search"], +[type="password"], [type="url"], [type="tel"], [type="checkbox"], [type="radio"], textarea, select { + box-sizing: border-box; + background: var(--input-back-color); + color: var(--input-fore-color); + border: 0.0625rem solid var(--input-border-color); + border-radius: var(--universal-border-radius); + margin: calc(var(--universal-margin) / 2); + padding: var(--universal-padding) calc(1.5 * var(--universal-padding)); } + +input:not([type="button"]):not([type="submit"]):not([type="reset"]):hover, input:not([type="button"]):not([type="submit"]):not([type="reset"]):focus, textarea:hover, textarea:focus, select:hover, select:focus { + border-color: var(--input-focus-color); + box-shadow: none; } +input:not([type="button"]):not([type="submit"]):not([type="reset"]):invalid, input:not([type="button"]):not([type="submit"]):not([type="reset"]):focus:invalid, textarea:invalid, textarea:focus:invalid, select:invalid, select:focus:invalid { + border-color: var(--input-invalid-color); + box-shadow: none; } +input:not([type="button"]):not([type="submit"]):not([type="reset"])[readonly], textarea[readonly], select[readonly] { + background: var(--secondary-back-color); } + +select { + max-width: 100%; } + +option { + overflow: hidden; + text-overflow: ellipsis; } + +[type="checkbox"], [type="radio"] { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + position: relative; + height: calc(1rem + var(--universal-padding) / 2); + width: calc(1rem + var(--universal-padding) / 2); + vertical-align: text-bottom; + padding: 0; + flex-basis: calc(1rem + var(--universal-padding) / 2) !important; + flex-grow: 0 !important; } + [type="checkbox"]:checked:before, [type="radio"]:checked:before { + position: absolute; } + +[type="checkbox"]:checked:before { + content: '\2713'; + font-family: sans-serif; + font-size: calc(1rem + var(--universal-padding) / 2); + top: calc(0rem - var(--universal-padding)); + left: calc(var(--universal-padding) / 4); } + +[type="radio"] { + border-radius: 100%; } + [type="radio"]:checked:before { + border-radius: 100%; + content: ''; + top: calc(0.0625rem + var(--universal-padding) / 2); + left: calc(0.0625rem + var(--universal-padding) / 2); + background: var(--input-fore-color); + width: 0.5rem; + height: 0.5rem; } + +:placeholder-shown { + color: var(--input-fore-color); } + +::-ms-placeholder { + color: var(--input-fore-color); + opacity: 0.54; } + +button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; } + +button, html [type="button"], [type="reset"], [type="submit"] { + -webkit-appearance: button; } + +button { + overflow: visible; + text-transform: none; } + +button, [type="button"], [type="submit"], [type="reset"], +a.button, label.button, .button, +a[role="button"], label[role="button"], [role="button"] { + display: inline-block; + background: var(--button-back-color); + color: var(--button-fore-color); + border: 0.0625rem solid var(--button-border-color); + border-radius: var(--universal-border-radius); + padding: var(--universal-padding) calc(1.5 * var(--universal-padding)); + margin: var(--universal-margin); + text-decoration: none; + cursor: pointer; + transition: background 0.3s; } + button:hover, button:focus, [type="button"]:hover, [type="button"]:focus, [type="submit"]:hover, [type="submit"]:focus, [type="reset"]:hover, [type="reset"]:focus, + a.button:hover, + a.button:focus, label.button:hover, label.button:focus, .button:hover, .button:focus, + a[role="button"]:hover, + a[role="button"]:focus, label[role="button"]:hover, label[role="button"]:focus, [role="button"]:hover, [role="button"]:focus { + background: var(--button-hover-back-color); + border-color: var(--button-hover-border-color); } + +input:disabled, input[disabled], textarea:disabled, textarea[disabled], select:disabled, select[disabled], button:disabled, button[disabled], .button:disabled, .button[disabled], [role="button"]:disabled, [role="button"][disabled] { + cursor: not-allowed; + opacity: 0.75; } + +.button-group { + display: flex; + border: 0.0625rem solid var(--button-group-border-color); + border-radius: var(--universal-border-radius); + margin: var(--universal-margin); } + .button-group > button, .button-group [type="button"], .button-group > [type="submit"], .button-group > [type="reset"], .button-group > .button, .button-group > [role="button"] { + margin: 0; + max-width: 100%; + flex: 1 1 auto; + text-align: center; + border: 0; + border-radius: 0; + box-shadow: none; } + .button-group > :not(:first-child) { + border-left: 0.0625rem solid var(--button-group-border-color); } + @media screen and (max-width: 499px) { + .button-group { + flex-direction: column; } + .button-group > :not(:first-child) { + border: 0; + border-top: 0.0625rem solid var(--button-group-border-color); } } + +/* + Custom elements for forms and input elements. +*/ +button.primary, [type="button"].primary, [type="submit"].primary, [type="reset"].primary, .button.primary, [role="button"].primary { + --button-back-color: #1976d2; + --button-fore-color: #f8f8f8; } + button.primary:hover, button.primary:focus, [type="button"].primary:hover, [type="button"].primary:focus, [type="submit"].primary:hover, [type="submit"].primary:focus, [type="reset"].primary:hover, [type="reset"].primary:focus, .button.primary:hover, .button.primary:focus, [role="button"].primary:hover, [role="button"].primary:focus { + --button-hover-back-color: #1565c0; } + +button.secondary, [type="button"].secondary, [type="submit"].secondary, [type="reset"].secondary, .button.secondary, [role="button"].secondary { + --button-back-color: #d32f2f; + --button-fore-color: #f8f8f8; } + button.secondary:hover, button.secondary:focus, [type="button"].secondary:hover, [type="button"].secondary:focus, [type="submit"].secondary:hover, [type="submit"].secondary:focus, [type="reset"].secondary:hover, [type="reset"].secondary:focus, .button.secondary:hover, .button.secondary:focus, [role="button"].secondary:hover, [role="button"].secondary:focus { + --button-hover-back-color: #c62828; } + +button.tertiary, [type="button"].tertiary, [type="submit"].tertiary, [type="reset"].tertiary, .button.tertiary, [role="button"].tertiary { + --button-back-color: #308732; + --button-fore-color: #f8f8f8; } + button.tertiary:hover, button.tertiary:focus, [type="button"].tertiary:hover, [type="button"].tertiary:focus, [type="submit"].tertiary:hover, [type="submit"].tertiary:focus, [type="reset"].tertiary:hover, [type="reset"].tertiary:focus, .button.tertiary:hover, .button.tertiary:focus, [role="button"].tertiary:hover, [role="button"].tertiary:focus { + --button-hover-back-color: #277529; } + +button.inverse, [type="button"].inverse, [type="submit"].inverse, [type="reset"].inverse, .button.inverse, [role="button"].inverse { + --button-back-color: #212121; + --button-fore-color: #f8f8f8; } + button.inverse:hover, button.inverse:focus, [type="button"].inverse:hover, [type="button"].inverse:focus, [type="submit"].inverse:hover, [type="submit"].inverse:focus, [type="reset"].inverse:hover, [type="reset"].inverse:focus, .button.inverse:hover, .button.inverse:focus, [role="button"].inverse:hover, [role="button"].inverse:focus { + --button-hover-back-color: #111; } + +button.small, [type="button"].small, [type="submit"].small, [type="reset"].small, .button.small, [role="button"].small { + padding: calc(0.5 * var(--universal-padding)) calc(0.75 * var(--universal-padding)); + margin: var(--universal-margin); } + +button.large, [type="button"].large, [type="submit"].large, [type="reset"].large, .button.large, [role="button"].large { + padding: calc(1.5 * var(--universal-padding)) calc(2 * var(--universal-padding)); + margin: var(--universal-margin); } + +/* + Definitions for navigation elements. +*/ +/* Navigation module CSS variable definitions */ +:root { + --header-back-color: #f8f8f8; + --header-hover-back-color: #f0f0f0; + --header-fore-color: #444; + --header-border-color: #ddd; + --nav-back-color: #f8f8f8; + --nav-hover-back-color: #f0f0f0; + --nav-fore-color: #444; + --nav-border-color: #ddd; + --nav-link-color: #0277bd; + --footer-fore-color: #444; + --footer-back-color: #f8f8f8; + --footer-border-color: #ddd; + --footer-link-color: #0277bd; + --drawer-back-color: #f8f8f8; + --drawer-hover-back-color: #f0f0f0; + --drawer-border-color: #ddd; + --drawer-close-color: #444; } + +header { + height: 3.1875rem; + background: var(--header-back-color); + color: var(--header-fore-color); + border-bottom: 0.0625rem solid var(--header-border-color); + padding: calc(var(--universal-padding) / 4) 0; + white-space: nowrap; + overflow-x: auto; + overflow-y: hidden; } + header.row { + box-sizing: content-box; } + header .logo { + color: var(--header-fore-color); + font-size: 1.75rem; + padding: var(--universal-padding) calc(2 * var(--universal-padding)); + text-decoration: none; } + header button, header [type="button"], header .button, header [role="button"] { + box-sizing: border-box; + position: relative; + top: calc(0rem - var(--universal-padding) / 4); + height: calc(3.1875rem + var(--universal-padding) / 2); + background: var(--header-back-color); + line-height: calc(3.1875rem - var(--universal-padding) * 1.5); + text-align: center; + color: var(--header-fore-color); + border: 0; + border-radius: 0; + margin: 0; + text-transform: uppercase; } + header button:hover, header button:focus, header [type="button"]:hover, header [type="button"]:focus, header .button:hover, header .button:focus, header [role="button"]:hover, header [role="button"]:focus { + background: var(--header-hover-back-color); } + +nav { + background: var(--nav-back-color); + color: var(--nav-fore-color); + border: 0.0625rem solid var(--nav-border-color); + border-radius: var(--universal-border-radius); + margin: var(--universal-margin); } + nav * { + padding: var(--universal-padding) calc(1.5 * var(--universal-padding)); } + nav a, nav a:visited { + display: block; + color: var(--nav-link-color); + border-radius: var(--universal-border-radius); + transition: background 0.3s; } + nav a:hover, nav a:focus, nav a:visited:hover, nav a:visited:focus { + text-decoration: none; + background: var(--nav-hover-back-color); } + nav .sublink-1 { + position: relative; + margin-left: calc(2 * var(--universal-padding)); } + nav .sublink-1:before { + position: absolute; + left: calc(var(--universal-padding) - 1 * var(--universal-padding)); + top: -0.0625rem; + content: ''; + height: 100%; + border: 0.0625rem solid var(--nav-border-color); + border-left: 0; } + nav .sublink-2 { + position: relative; + margin-left: calc(4 * var(--universal-padding)); } + nav .sublink-2:before { + position: absolute; + left: calc(var(--universal-padding) - 3 * var(--universal-padding)); + top: -0.0625rem; + content: ''; + height: 100%; + border: 0.0625rem solid var(--nav-border-color); + border-left: 0; } + +footer { + background: var(--footer-back-color); + color: var(--footer-fore-color); + border-top: 0.0625rem solid var(--footer-border-color); + padding: calc(2 * var(--universal-padding)) var(--universal-padding); + font-size: 0.875rem; } + footer a, footer a:visited { + color: var(--footer-link-color); } + +header.sticky { + position: -webkit-sticky; + position: sticky; + z-index: 1101; + top: 0; } + +footer.sticky { + position: -webkit-sticky; + position: sticky; + z-index: 1101; + bottom: 0; } + +.drawer-toggle:before { + display: inline-block; + position: relative; + vertical-align: bottom; + content: '\00a0\2261\00a0'; + font-family: sans-serif; + font-size: 1.5em; } +@media screen and (min-width: 500px) { + .drawer-toggle:not(.persistent) { + display: none; } } + +[type="checkbox"].drawer { + height: 1px; + width: 1px; + margin: -1px; + overflow: hidden; + position: absolute; + clip: rect(0 0 0 0); + -webkit-clip-path: inset(100%); + clip-path: inset(100%); } + [type="checkbox"].drawer + * { + display: block; + box-sizing: border-box; + position: fixed; + top: 0; + width: 320px; + height: 100vh; + overflow-y: auto; + background: var(--drawer-back-color); + border: 0.0625rem solid var(--drawer-border-color); + border-radius: 0; + margin: 0; + z-index: 1110; + right: -320px; + transition: right 0.3s; } + [type="checkbox"].drawer + * .drawer-close { + position: absolute; + top: var(--universal-margin); + right: var(--universal-margin); + z-index: 1111; + width: 2rem; + height: 2rem; + border-radius: var(--universal-border-radius); + padding: var(--universal-padding); + margin: 0; + cursor: pointer; + transition: background 0.3s; } + [type="checkbox"].drawer + * .drawer-close:before { + display: block; + content: '\00D7'; + color: var(--drawer-close-color); + position: relative; + font-family: sans-serif; + font-size: 2rem; + line-height: 1; + text-align: center; } + [type="checkbox"].drawer + * .drawer-close:hover, [type="checkbox"].drawer + * .drawer-close:focus { + background: var(--drawer-hover-back-color); } + @media screen and (max-width: 320px) { + [type="checkbox"].drawer + * { + width: 100%; } } + [type="checkbox"].drawer:checked + * { + right: 0; } + @media screen and (min-width: 500px) { + [type="checkbox"].drawer:not(.persistent) + * { + position: static; + height: 100%; + z-index: 1100; } + [type="checkbox"].drawer:not(.persistent) + * .drawer-close { + display: none; } } + +/* + Definitions for the responsive table component. +*/ +/* Table module CSS variable definitions. */ +:root { + --table-border-color: #aaa; + --table-border-separator-color: #666; + --table-head-back-color: #e6e6e6; + --table-head-fore-color: #111; + --table-body-back-color: #f8f8f8; + --table-body-fore-color: #111; + --table-body-alt-back-color: #eee; } + +table { + border-collapse: separate; + border-spacing: 0; + : margin: calc(1.5 * var(--universal-margin)) var(--universal-margin); + display: flex; + flex: 0 1 auto; + flex-flow: row wrap; + padding: var(--universal-padding); + padding-top: 0; + margin: calc(1.5 * var(--universal-margin)) var(--universal-margin); } + table caption { + font-size: 1.25 * rem; + margin: calc(2 * var(--universal-margin)) 0; + max-width: 100%; + flex: 0 0 100%; + text-align: left;} + table thead, table tbody { + display: flex; + flex-flow: row wrap; + border: 0.0625rem solid var(--table-border-color); } + table thead { + z-index: 999; + border-radius: var(--universal-border-radius) var(--universal-border-radius) 0 0; + border-bottom: 0.0625rem solid var(--table-border-separator-color); } + table tbody { + border-top: 0; + margin-top: calc(0 - var(--universal-margin)); + border-radius: 0 0 var(--universal-border-radius) var(--universal-border-radius); } + table tr { + display: flex; + padding: 0; } + table th, table td { + padding: calc(0.5 * var(--universal-padding)); + font-size: 0.9rem; } + table th { + text-align: left; + background: var(--table-head-back-color); + color: var(--table-head-fore-color); } + table td { + background: var(--table-body-back-color); + color: var(--table-body-fore-color); + border-top: 0.0625rem solid var(--table-border-color); } + +table:not(.horizontal) { + overflow: auto; + max-height: 850px; } + table:not(.horizontal) thead, table:not(.horizontal) tbody { + max-width: 100%; + flex: 0 0 100%; } + table:not(.horizontal) tr { + flex-flow: row wrap; + flex: 0 0 100%; } + table:not(.horizontal) th, table:not(.horizontal) td { + flex: 1 0 0%; + overflow: hidden; + text-overflow: ellipsis; } + table:not(.horizontal) thead { + position: sticky; + top: 0; } + table:not(.horizontal) tbody tr:first-child td { + border-top: 0; } + +table.horizontal { + border: 0; } + table.horizontal thead, table.horizontal tbody { + border: 0; + flex-flow: row nowrap; } + table.horizontal tbody { + overflow: auto; + justify-content: space-between; + flex: 1 0 0; + margin-left: calc( 4 * var(--universal-margin)); + padding-bottom: calc(var(--universal-padding) / 4); } + table.horizontal tr { + flex-direction: column; + flex: 1 0 auto; } + table.horizontal th, table.horizontal td { + width: 100%; + border: 0; + border-bottom: 0.0625rem solid var(--table-border-color); } + table.horizontal th:not(:first-child), table.horizontal td:not(:first-child) { + border-top: 0; } + table.horizontal th { + text-align: right; + border-left: 0.0625rem solid var(--table-border-color); + border-right: 0.0625rem solid var(--table-border-separator-color); } + table.horizontal thead tr:first-child { + padding-left: 0; } + table.horizontal th:first-child, table.horizontal td:first-child { + border-top: 0.0625rem solid var(--table-border-color); } + table.horizontal tbody tr:last-child td { + border-right: 0.0625rem solid var(--table-border-color); } + table.horizontal tbody tr:last-child td:first-child { + border-top-right-radius: 0.25rem; } + table.horizontal tbody tr:last-child td:last-child { + border-bottom-right-radius: 0.25rem; } + table.horizontal thead tr:first-child th:first-child { + border-top-left-radius: 0.25rem; } + table.horizontal thead tr:first-child th:last-child { + border-bottom-left-radius: 0.25rem; } + +@media screen and (max-width: 499px) { + table, table.horizontal { + border-collapse: collapse; + border: 0; + width: 100%; + display: table; } + table thead, table th, table.horizontal thead, table.horizontal th { + border: 0; + height: 1px; + width: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + clip: rect(0 0 0 0); + -webkit-clip-path: inset(100%); + clip-path: inset(100%); } + table tbody, table.horizontal tbody { + border: 0; + display: table-row-group; } + table tr, table.horizontal tr { + display: block; + border: 0.0625rem solid var(--table-border-color); + border-radius: var(--universal-border-radius); + background: #fafafa; + padding: var(--universal-padding); + margin: var(--universal-margin); + margin-bottom: calc(2 * var(--universal-margin)); } + table th, table td, table.horizontal th, table.horizontal td { + width: auto; } + table td, table.horizontal td { + display: block; + border: 0; + text-align: right; } + table td:before, table.horizontal td:before { + content: attr(data-label); + float: left; + font-weight: 600; } + table th:first-child, table td:first-child, table.horizontal th:first-child, table.horizontal td:first-child { + border-top: 0; } + table tbody tr:last-child td, table.horizontal tbody tr:last-child td { + border-right: 0; } } +:root { + --table-body-alt-back-color: #eee; } + +table tr:nth-of-type(2n) > td { + background: var(--table-body-alt-back-color); } + +@media screen and (max-width: 500px) { + table tr:nth-of-type(2n) { + background: var(--table-body-alt-back-color); } } +:root { + --table-body-hover-back-color: #90caf9; } + +table.hoverable tr:hover, table.hoverable tr:hover > td, table.hoverable tr:focus, table.hoverable tr:focus > td { + background: var(--table-body-hover-back-color); } + +@media screen and (max-width: 500px) { + table.hoverable tr:hover, table.hoverable tr:hover > td, table.hoverable tr:focus, table.hoverable tr:focus > td { + background: var(--table-body-hover-back-color); } } +/* + Definitions for contextual background elements, toasts and tooltips. +*/ +/* Contextual module CSS variable definitions */ +:root { + --mark-back-color: #0277bd; + --mark-fore-color: #fafafa; } + +mark { + background: var(--mark-back-color); + color: var(--mark-fore-color); + font-size: 0.95em; + line-height: 1em; + border-radius: var(--universal-border-radius); + padding: calc(var(--universal-padding) / 4) calc(var(--universal-padding) / 2); } + mark.inline-block { + display: inline-block; + font-size: 1em; + line-height: 1.5; + padding: calc(var(--universal-padding) / 2) var(--universal-padding); } + +:root { + --toast-back-color: #424242; + --toast-fore-color: #fafafa; } + +.toast { + position: fixed; + bottom: calc(var(--universal-margin) * 3); + left: 50%; + transform: translate(-50%, -50%); + z-index: 1111; + color: var(--toast-fore-color); + background: var(--toast-back-color); + border-radius: calc(var(--universal-border-radius) * 16); + padding: var(--universal-padding) calc(var(--universal-padding) * 3); } + +:root { + --tooltip-back-color: #212121; + --tooltip-fore-color: #fafafa; } + +.tooltip { + position: relative; + display: inline-block; } + .tooltip:before, .tooltip:after { + position: absolute; + opacity: 0; + clip: rect(0 0 0 0); + -webkit-clip-path: inset(100%); + clip-path: inset(100%); + transition: all 0.3s; + z-index: 1010; + left: 50%; } + .tooltip:not(.bottom):before, .tooltip:not(.bottom):after { + bottom: 75%; } + .tooltip.bottom:before, .tooltip.bottom:after { + top: 75%; } + .tooltip:hover:before, .tooltip:hover:after, .tooltip:focus:before, .tooltip:focus:after { + opacity: 1; + clip: auto; + -webkit-clip-path: inset(0%); + clip-path: inset(0%); } + .tooltip:before { + content: ''; + background: transparent; + border: var(--universal-margin) solid transparent; + left: calc(50% - var(--universal-margin)); } + .tooltip:not(.bottom):before { + border-top-color: #212121; } + .tooltip.bottom:before { + border-bottom-color: #212121; } + .tooltip:after { + content: attr(aria-label); + color: var(--tooltip-fore-color); + background: var(--tooltip-back-color); + border-radius: var(--universal-border-radius); + padding: var(--universal-padding); + white-space: nowrap; + transform: translateX(-50%); } + .tooltip:not(.bottom):after { + margin-bottom: calc(2 * var(--universal-margin)); } + .tooltip.bottom:after { + margin-top: calc(2 * var(--universal-margin)); } + +:root { + --modal-overlay-color: rgba(0, 0, 0, 0.45); + --modal-close-color: #444; + --modal-close-hover-color: #f0f0f0; } + +[type="checkbox"].modal { + height: 1px; + width: 1px; + margin: -1px; + overflow: hidden; + position: absolute; + clip: rect(0 0 0 0); + -webkit-clip-path: inset(100%); + clip-path: inset(100%); } + [type="checkbox"].modal + div { + position: fixed; + top: 0; + left: 0; + display: none; + width: 100vw; + height: 100vh; + background: var(--modal-overlay-color); } + [type="checkbox"].modal + div .card { + margin: 0 auto; + max-height: 50vh; + overflow: auto; } + [type="checkbox"].modal + div .card .modal-close { + position: absolute; + top: 0; + right: 0; + width: 1.75rem; + height: 1.75rem; + border-radius: var(--universal-border-radius); + padding: var(--universal-padding); + margin: 0; + cursor: pointer; + transition: background 0.3s; } + [type="checkbox"].modal + div .card .modal-close:before { + display: block; + content: '\00D7'; + color: var(--modal-close-color); + position: relative; + font-family: sans-serif; + font-size: 1.75rem; + line-height: 1; + text-align: center; } + [type="checkbox"].modal + div .card .modal-close:hover, [type="checkbox"].modal + div .card .modal-close:focus { + background: var(--modal-close-hover-color); } + [type="checkbox"].modal:checked + div { + display: flex; + flex: 0 1 auto; + z-index: 1200; } + [type="checkbox"].modal:checked + div .card .modal-close { + z-index: 1211; } + +:root { + --collapse-label-back-color: #e8e8e8; + --collapse-label-fore-color: #212121; + --collapse-label-hover-back-color: #f0f0f0; + --collapse-selected-label-back-color: #ececec; + --collapse-border-color: #ddd; + --collapse-content-back-color: #fafafa; + --collapse-selected-label-border-color: #0277bd; } + +.collapse { + width: calc(100% - 2 * var(--universal-margin)); + opacity: 1; + display: flex; + flex-direction: column; + margin: var(--universal-margin); + border-radius: var(--universal-border-radius); } + .collapse > [type="radio"], .collapse > [type="checkbox"] { + height: 1px; + width: 1px; + margin: -1px; + overflow: hidden; + position: absolute; + clip: rect(0 0 0 0); + -webkit-clip-path: inset(100%); + clip-path: inset(100%); } + .collapse > label { + flex-grow: 1; + display: inline-block; + height: 1.5rem; + cursor: pointer; + transition: background 0.3s; + color: var(--collapse-label-fore-color); + background: var(--collapse-label-back-color); + border: 0.0625rem solid var(--collapse-border-color); + padding: calc(1.5 * var(--universal-padding)); } + .collapse > label:hover, .collapse > label:focus { + background: var(--collapse-label-hover-back-color); } + .collapse > label + div { + flex-basis: auto; + height: 1px; + width: 1px; + margin: -1px; + overflow: hidden; + position: absolute; + clip: rect(0 0 0 0); + -webkit-clip-path: inset(100%); + clip-path: inset(100%); + transition: max-height 0.3s; + max-height: 1px; } + .collapse > :checked + label { + background: var(--collapse-selected-label-back-color); + border-bottom-color: var(--collapse-selected-label-border-color); } + .collapse > :checked + label + div { + box-sizing: border-box; + position: relative; + width: 100%; + height: auto; + overflow: auto; + margin: 0; + background: var(--collapse-content-back-color); + border: 0.0625rem solid var(--collapse-border-color); + border-top: 0; + padding: var(--universal-padding); + clip: auto; + -webkit-clip-path: inset(0%); + clip-path: inset(0%); + max-height: 850px; } + .collapse > label:not(:first-of-type) { + border-top: 0; } + .collapse > label:first-of-type { + border-radius: var(--universal-border-radius) var(--universal-border-radius) 0 0; } + .collapse > label:last-of-type:not(:first-of-type) { + border-radius: 0 0 var(--universal-border-radius) var(--universal-border-radius); } + .collapse > label:last-of-type:first-of-type { + border-radius: var(--universal-border-radius); } + .collapse > :checked:last-of-type:not(:first-of-type) + label { + border-radius: 0; } + .collapse > :checked:last-of-type + label + div { + border-radius: 0 0 var(--universal-border-radius) var(--universal-border-radius); } + +/* + Custom elements for contextual background elements, toasts and tooltips. +*/ +mark.secondary { + --mark-back-color: #d32f2f; } + +mark.tertiary { + --mark-back-color: #308732; } + +mark.tag { + padding: calc(var(--universal-padding)/2) var(--universal-padding); + border-radius: 1em; } + +/* + Definitions for progress elements and spinners. +*/ +/* Progess module CSS variable definitions */ +:root { + --progress-back-color: #ddd; + --progress-fore-color: #555; } + +progress { + display: block; + vertical-align: baseline; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + height: 0.75rem; + width: calc(100% - 2 * var(--universal-margin)); + margin: var(--universal-margin); + border: 0; + border-radius: calc(2 * var(--universal-border-radius)); + background: var(--progress-back-color); + color: var(--progress-fore-color); } + progress::-webkit-progress-value { + background: var(--progress-fore-color); + border-top-left-radius: calc(2 * var(--universal-border-radius)); + border-bottom-left-radius: calc(2 * var(--universal-border-radius)); } + progress::-webkit-progress-bar { + background: var(--progress-back-color); } + progress::-moz-progress-bar { + background: var(--progress-fore-color); + border-top-left-radius: calc(2 * var(--universal-border-radius)); + border-bottom-left-radius: calc(2 * var(--universal-border-radius)); } + progress[value="1000"]::-webkit-progress-value { + border-radius: calc(2 * var(--universal-border-radius)); } + progress[value="1000"]::-moz-progress-bar { + border-radius: calc(2 * var(--universal-border-radius)); } + progress.inline { + display: inline-block; + vertical-align: middle; + width: 60%; } + +:root { + --spinner-back-color: #ddd; + --spinner-fore-color: #555; } + +@keyframes spinner-donut-anim { + 0% { + transform: rotate(0deg); } + 100% { + transform: rotate(360deg); } } +.spinner { + display: inline-block; + margin: var(--universal-margin); + border: 0.25rem solid var(--spinner-back-color); + border-left: 0.25rem solid var(--spinner-fore-color); + border-radius: 50%; + width: 1.25rem; + height: 1.25rem; + animation: spinner-donut-anim 1.2s linear infinite; } + +/* + Custom elements for progress bars and spinners. +*/ +progress.primary { + --progress-fore-color: #1976d2; } + +progress.secondary { + --progress-fore-color: #d32f2f; } + +progress.tertiary { + --progress-fore-color: #308732; } + +.spinner.primary { + --spinner-fore-color: #1976d2; } + +.spinner.secondary { + --spinner-fore-color: #d32f2f; } + +.spinner.tertiary { + --spinner-fore-color: #308732; } + +/* + Definitions for icons - powered by Feather (https://feathericons.com/). +*/ +span[class^='icon-'] { + display: inline-block; + height: 1em; + width: 1em; + vertical-align: -0.125em; + background-size: contain; + margin: 0 calc(var(--universal-margin) / 4); } + span[class^='icon-'].secondary { + -webkit-filter: invert(25%); + filter: invert(25%); } + span[class^='icon-'].inverse { + -webkit-filter: invert(100%); + filter: invert(100%); } + +span.icon-alert { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12' y2='16'%3E%3C/line%3E%3C/svg%3E"); } +span.icon-bookmark { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'%3E%3C/path%3E%3C/svg%3E"); } +span.icon-calendar { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E"); } +span.icon-credit { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='4' width='22' height='16' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='1' y1='10' x2='23' y2='10'%3E%3C/line%3E%3C/svg%3E"); } +span.icon-edit { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 14.66V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.34'%3E%3C/path%3E%3Cpolygon points='18 2 22 6 12 16 8 16 8 12 18 2'%3E%3C/polygon%3E%3C/svg%3E"); } +span.icon-link { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'%3E%3C/path%3E%3Cpolyline points='15 3 21 3 21 9'%3E%3C/polyline%3E%3Cline x1='10' y1='14' x2='21' y2='3'%3E%3C/line%3E%3C/svg%3E"); } +span.icon-help { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3'%3E%3C/path%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='17' x2='12' y2='17'%3E%3C/line%3E%3C/svg%3E"); } +span.icon-home { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'%3E%3C/path%3E%3Cpolyline points='9 22 9 12 15 12 15 22'%3E%3C/polyline%3E%3C/svg%3E"); } +span.icon-info { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='16' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='8' x2='12' y2='8'%3E%3C/line%3E%3C/svg%3E"); } +span.icon-lock { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'%3E%3C/path%3E%3C/svg%3E"); } +span.icon-mail { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'%3E%3C/path%3E%3Cpolyline points='22,6 12,13 2,6'%3E%3C/polyline%3E%3C/svg%3E"); } +span.icon-location { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'%3E%3C/path%3E%3Ccircle cx='12' cy='10' r='3'%3E%3C/circle%3E%3C/svg%3E"); } +span.icon-phone { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'%3E%3C/path%3E%3C/svg%3E"); } +span.icon-rss { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11a9 9 0 0 1 9 9'%3E%3C/path%3E%3Cpath d='M4 4a16 16 0 0 1 16 16'%3E%3C/path%3E%3Ccircle cx='5' cy='19' r='1'%3E%3C/circle%3E%3C/svg%3E"); } +span.icon-search { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E"); } +span.icon-settings { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'%3E%3C/circle%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z'%3E%3C/path%3E%3C/svg%3E"); } +span.icon-share { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18' cy='5' r='3'%3E%3C/circle%3E%3Ccircle cx='6' cy='12' r='3'%3E%3C/circle%3E%3Ccircle cx='18' cy='19' r='3'%3E%3C/circle%3E%3Cline x1='8.59' y1='13.51' x2='15.42' y2='17.49'%3E%3C/line%3E%3Cline x1='15.41' y1='6.51' x2='8.59' y2='10.49'%3E%3C/line%3E%3C/svg%3E"); } +span.icon-cart { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'%3E%3C/circle%3E%3Ccircle cx='20' cy='21' r='1'%3E%3C/circle%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'%3E%3C/path%3E%3C/svg%3E"); } +span.icon-upload { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'%3E%3C/path%3E%3Cpolyline points='17 8 12 3 7 8'%3E%3C/polyline%3E%3Cline x1='12' y1='3' x2='12' y2='15'%3E%3C/line%3E%3C/svg%3E"); } +span.icon-user { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E"); } + +/* + Definitions for utilities and helper classes. +*/ +/* Utility module CSS variable definitions */ +:root { + --generic-border-color: rgba(0, 0, 0, 0.3); + --generic-box-shadow: 0 0.25rem 0.25rem 0 rgba(0, 0, 0, 0.125), 0 0.125rem 0.125rem -0.125rem rgba(0, 0, 0, 0.25); } + +.hidden { + display: none !important; } + +.visually-hidden { + position: absolute !important; + width: 1px !important; + height: 1px !important; + margin: -1px !important; + border: 0 !important; + padding: 0 !important; + clip: rect(0 0 0 0) !important; + -webkit-clip-path: inset(100%) !important; + clip-path: inset(100%) !important; + overflow: hidden !important; } + +.bordered { + border: 0.0625rem solid var(--generic-border-color) !important; } + +.rounded { + border-radius: var(--universal-border-radius) !important; } + +.circular { + border-radius: 50% !important; } + +.shadowed { + box-shadow: var(--generic-box-shadow) !important; } + +.responsive-margin { + margin: calc(var(--universal-margin) / 4) !important; } + @media screen and (min-width: 500px) { + .responsive-margin { + margin: calc(var(--universal-margin) / 2) !important; } } + @media screen and (min-width: 1280px) { + .responsive-margin { + margin: var(--universal-margin) !important; } } + +.responsive-padding { + padding: calc(var(--universal-padding) / 4) !important; } + @media screen and (min-width: 500px) { + .responsive-padding { + padding: calc(var(--universal-padding) / 2) !important; } } + @media screen and (min-width: 1280px) { + .responsive-padding { + padding: var(--universal-padding) !important; } } + +@media screen and (max-width: 499px) { + .hidden-sm { + display: none !important; } } +@media screen and (min-width: 500px) and (max-width: 1279px) { + .hidden-md { + display: none !important; } } +@media screen and (min-width: 1280px) { + .hidden-lg { + display: none !important; } } +@media screen and (max-width: 499px) { + .visually-hidden-sm { + position: absolute !important; + width: 1px !important; + height: 1px !important; + margin: -1px !important; + border: 0 !important; + padding: 0 !important; + clip: rect(0 0 0 0) !important; + -webkit-clip-path: inset(100%) !important; + clip-path: inset(100%) !important; + overflow: hidden !important; } } +@media screen and (min-width: 500px) and (max-width: 1279px) { + .visually-hidden-md { + position: absolute !important; + width: 1px !important; + height: 1px !important; + margin: -1px !important; + border: 0 !important; + padding: 0 !important; + clip: rect(0 0 0 0) !important; + -webkit-clip-path: inset(100%) !important; + clip-path: inset(100%) !important; + overflow: hidden !important; } } +@media screen and (min-width: 1280px) { + .visually-hidden-lg { + position: absolute !important; + width: 1px !important; + height: 1px !important; + margin: -1px !important; + border: 0 !important; + padding: 0 !important; + clip: rect(0 0 0 0) !important; + -webkit-clip-path: inset(100%) !important; + clip-path: inset(100%) !important; + overflow: hidden !important; } } + +/*# sourceMappingURL=mini-default.css.map */ diff --git a/Libraries/CMSIS/Device/ST/STM32H7xx/_htmresc/st_logo.png b/Libraries/CMSIS/Device/ST/STM32H7xx/_htmresc/st_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..8b80057fd3a454a97de1c9d732b7fede82c83227 GIT binary patch literal 18616 zcmbTd^-~<*6D~X~?jgaQV8LAj0X_tm1Ydk1xVy{Z3GPmS;IP2r4oh%%cMl#Qcz~Pl zz5l>lZ`GVRHB&V|boY7A^z(F|Z=Y4=aIwg-006*MkpHOuZ?5<^0x;12-SsK9!v0Mt zmQpHG08kT${nrHb-!rC@ysj$%ki7ceKq56ESOEZeJ%x`_nqEey{^(v>eK${gL>pJ% zX8+KBAR_W-jhDrs{egi|sP<73DP`UFoa(>xj;8qknEx2bL~2@t%3k>}hnl@CWQrW@ zqfK>@e3$sL-m%ftg0YAkk!@=P!Ognuz(zhb|Tux{FeX<<7(5oLVU8=W*sUZ*$TqlSb6o1O0a zzeP#ZW!;?#>0N5v?0D|q?mzD8-<^@1V0FH{fY}2A9ooXbylcB6Y>PVo4nMxLi|AWA z8M(b#9`j|%0v7ktATOSzsh-T7%Wqa>t*x!29M*iDetE6#^`?iEoQW5F*w7rjcWYw>-UyKyDHetK@Im)qdu0o-zudq@gQN3)r z=(%XIh|%7(Y}2mODA6--)=u;7mi|lUCki50L@QOyZN@2N`Bwwn9et)BF?yQr9`Sn# ze!a;09%cuNiCJ+Hwx|5Sw&L`0rJvq<$7D5j#Y=O^YcW)1x!+MVRWRVHrXDj~g@40Q zBvp_niE6-dasJKX&t@%;X`7_R9QhT$w_Dv~zW73kCM;9WC z#^@^R#^^HZ#`rQ5ZjC*^uYUMgw=ae5*IV2JyEL@LlJ1k!yA8p=fmyQ={`Pjq&sK}Y>k9r>*Y-3njDRLc8z*D?su--n+y(fpV8FB zwS%vLw=L>F9>rMJzXaXgg5NRvaHPKO=qdV`%ecKE^q=CNs6^=Vl)5QG9h0>AKM-1F zvU-S)!Vnz~yg}XNmnaKSqm&}<1}#nOBCWZsLvn3_pkm8Z)~*KF8yv=yRk*!4rf$7T zT*ey^g`%>`O82HoVNPMCaM^5e_Eeop`^`Wsro=Q9SzJ-{LW5j1QdRH>Oq5bEX({TJ-TNGPvNBrk5{my=8FEQ%0fftv4 z)$FK)-usf%cyd|Y@=r@u!~HI3-5_Q=E%R!AkEqtv$Yv%Zit4K`i*n5tM!wdwLFM?% z@N0D&tLS9%TD>`41R~`%HzXtZS6pjo$}fsAA6cq`&Llq^TE@#ID4eU}(xZH$-0oa>g$RMe)N_S(=w@nXEL&?{|e zd%-=H@Ei^9kz3up?3!?QYr2O7^M9)q_E2E@^vESGQ&5WzDh<(QgQEd3BICrRm8O)S!fPO#z(h0}Vk) zolMw(Ecl!UD7xMUH0>?+9qzTMCMQxcM+Od*!L7F!tiwSSG>D@|J~*c~gu?`RewztA z1cO8*h9GGR{``zPp9t6vZJ81Ar<-bz38Jv-ro`wI#Mq&-k$*5tL<>Pk=)T1H_z8YhPJDWCuq5c#f&iDRo3$~XHhc-#T3{whJvB?;N^IKpX^H#=oYNa@u&^9He20t za7qlYKRH^S(Tj2{XC=lPI|MVMOVVX4V8cbx(9Ix%YK__iyN9E(k)118*aO-OzZNT# zbhE^f=Cze>bdhX>8xBFW70+=Tb@QnIyKKmQGt`}ZHXrVVWgxIT1k&eFDonM5iFh{^ z;FtT_qYo%x6$`ChDD~;i`c>h@T~X~pZ&-v==wrV4)ra@?=39Z}7c)OR&&9#@9uxU( z?hh)jyY_o}tH;1B>v%95XoGM@gDYB{I@;aJAn;N$2z~uDX|IL`uf-*Mm1ic21|E8c zQZWw`gvb==bz|iv=774j$zii$vlW@T4LDFEfea$Z+frqVA{<)qP_mhp2AbFqEE(0z zfCJgi{n&vKxpSY#-W)(E-Y3u@1KQGcnWN=qz;Nz2-6>bIL8wZk?oy8xe49zo9Evpm zI>QVA&&4C5*aCjxksX%9lfPpQNw|#TzMQ;YvC%Rx=uA#dmU{e@tzaW&rq}9N5VXBw z6Mff^1He^5U}j4TZD};Z7u2!LZ@OjGIPgR|MLZ*9%)E@0nE%K=W5s+NOT~n_{fBc9 z8DlU6un9om`MN~!FtpPXkJSq(+KPHqF&N23_vGeqphc*cEAF=okHGoFWHHWTm&R zAZXR)=q}Jv`jsvKCoL27h?ylNq0fz5xasR{P`5RW_7kzL^b_#T@e?r5nGKuMX?!lz zcEq|hYJscWj{YtO1of8Xi0jH z6s+!rS0;ag(Cml~|NKB+tNwwq9kl+8wc0!T$L$CFw95drNPiuZ3jOf4G_NXoM$sQj zZn*2v3^ISC(OoqO%W>m};%SHDOcD)D7%f&?jnrI9&1_u;6m(x2g#=wb zH$Cl!I6f#QI6iFo2i^nPy^8_Rt0g@Gzv3FoK629)r#wPie#!P^T*B)9JDi>Qta-Ee zyLS}t0#vL+3WcNfUo47o=g+h7Q(waq$0Fo`#^t+!ugP{n=lV`j6a9^vBl)I!L&VaI zK(10FWw?KM*=_ynJ3HIwyD^##=aKUk4u|yIYk$&C>^B?x{I5c+Il`m3RQ%_=Tq`!D zQw3HQ7dw%VR~rkqeqr+THi``YT){njI8j~%3VNWBl3EUyQ zx>y&BaDTkwjg$12&1?kD`IcCB_?j~8XMfHm4iQ(TCj7-)DOn-+%UzP)ab?nnNlfTA zh(FmGsK1tl`G8>eb=1j~9lDZPh<*?zhjW@Gx5%UjcH4 zbrrd<#%%JyFrW`_Loz= zP30^V%kIB;=&%K@{YbXT6@(|c>dXlNk~?15SVEmMX6`Mjv>+MN2M$^N?ju|1T-qoW zJQV;x5rIpTc>eCM*`;fq^U3U2uW>l1RVxe^4B$CEub2J}+bN)$=(gE92((ah@ar_) z+I|k<9;iL6@Dyhc+LX|pTR>r3{P!==s^guY!a#cZ5Ry6QtTzvk zUh~+ICB=TnC(!+~G1}X`=zKbJF=VNy60Le=gO@j5lEJet5>jc!PbM+D!ZlS$KuYx&pkm{S?k)BU1<65@ z({=ySGqzCiV-vc5qOJ z48y)rR(Ys{uWIjyQX*o`4?xK$K9nE1K!t$coI~(ku$IzWaVM`ocnY1)=&_o_R%I_2 zZ_{Cs>@7#7ktZS)0EENs++_HHh39c*#7z#Pyifk3+e!lsET`nm%a#Zp{hflp4Vw$+ zOju*)#0tN99xzE1;G}_c;Oj@<_%Z8;SCB3P74uOYE__wpp<3HB0g0wsxZ1toEwg)5 z23F}NQwRV%3UQi)GQQt^$a%zzV8w>aIl;CkQ!6h%=n!jXPZ;sfULBWNTi1QT%V~R| zdrjBQt+%&EcrjOO0&pO(SR|R1%nis?Q}KUl75Q=`bI5TGenEMls+QNXGp;Grr-EZVy`f(ovFSmI(u6D90n zU}rWOG+9F)ioe9yO)lx~AD<~|_xP=uVs4I z6w+kccIU+(Ltf0bDM$mvJrBdPzjnQ4w#L-qTZ+S6V5l=pqj|%(!m@K!R(Sm5G<;5V zXK~r#d34;M-;>*+VXbyWbw`4vdOanA^uK`Ag&w)G;7}_OpATxWe^GjFe%&*Ocx)w7 zwt4Bs4luF3C-9V+n~E!?(W3d6$CtEn7OZ{~I`6iW|1x;QzkF49GF&d=Wg#fC2^Vn?KLfW@n~pFc4gBpg!U$uFR0 z6`f||PCJat3glNlwW|z^j;^p%9oQc82S&N+!L>xWR*UT~JbFCj)0}2J6c-rV3iVO! z`IdFp zB0H{SvHRu;zx(EM(0%j9fA`HVZ|@5Oo0EGok@w*1K*{Sg3QERYynQ|7kzI{t_?~>T zQGQ|?TPR(EZYAFen;>d7>k zc`O4jwao>J?dp~fG@8l|SBHzOE5h7?Ba_OYs%93|;KP${8}j%VGb?LRi<;yffk06& zmc)TH`g@-+zt@fG!z|MO3057>Y}ppB{w8IS2o68)NnHSA-jKa+X$k+&Klw{5Ksly#ye_HBKV&h1zbIsIT-|0XRq)zWf_~s9{=n3BOfpPy7{f5RZzL^9tdzjj zr)R?-SV}4UX;&dWNKq={6q|g;FEbIjXC}?$K%uY_ur_MF+MkJ>-c@8l1|6F7^BR4N zf%t(1oJ!m zg^z<^ddW{6+A~!=F*1he)s`5=HR&3O@tjq)pn!{ zodn}X=d$=iUh-ibxQ>PQw|#fHTLppRwXG}*HyUkLKB?Vxf>#@2_z&V#B0Cjvmfka$ znI~k?Pp)A)OXy(kdOeH7nbmp9bNb|>|e%T7Dg>BKo&y=JzU)v zs{+P#O$)wko3MOQY!bv_78@Q%uABK!ZPIi<~iCxyQ>J*D53j_;0vks;+?UxqO^ z8)9k;>&t3F)oFofc_t(0cdCn(OIM;4fePgKSw+PKcigoQR9JV_C-y`&%By+|aMjTd z;$iN6>#`KNXtG+yNhfl+PYn(#cr;Nf>DZ1mRU`A-PFI}Scq~0EgRR31c4LZcz_w!3 zU&-x*oGPQoz`-m#bYEC;V<7tHiC(wn395M}YNU9p|6@2$$6(9N_DyMjuOwT6X&Cu> zXg1{_^+%NsBhDf;)3V~J5%bl|^XVjqRgu^moR2288%NOgcLoNBkN6t5F&l2`tPvao zfAbQy!&*Ln*uWc{tVDqwT1{Q>{s19S6+;c@2e$2eZd>zL~I~M}G^8w4Y2bnyq)>=S+L6j%|@%XWqbYm%+}R z%Jg=|X7Y&0*lujN6>tzy)?{CBuT|FT#I=sU+569+)8oyIH?8?{Y{Im(PMHAGs5_GI z>1wLl+yiE$+I28-c2!jx)_?k2nIm}7iH=O{X#yL$s@}hUPf^xece9Vi{DUPRKm%@= zI4q=C$Qla?I0{;1W!^-Bt)o=r>#KNZnZPW3piq_&q`~HLF~1_^MHlt66*62}BJqzu zM;g!LlycVJ?1ohPMvFHu3^-`<`sR(iyLG`EB|;bk%3GG!#?x`m5gx zWnZm7bb@UTrR9OXVs1t)?(5a%Yqq>?ivrob2S7W|CH$C|Kscw z=5hgFRsHTTA{lDQ(a0VW8vk$By+wL4Ao<5{Br)oU$x2pMfJKrlPqr@4P$Y9Nt_7R| zCx>hhMeHtjM0mJ|?T<(EIY{^^cAiA&R=2C=g&o@6vm!E&&86BrLOf18fr==x77OBH zdyOvB1fjqxDMa5;G9@=qu?tN_vB?)=#H^qB;g*jHrr^*ISGt+pLXyWcu+bAWNk&IG zl?zGxV&+)tmQ@d~T5Yypa4*^P5t*t6C($W-Y9zknsGLXPPDR^RF~`>QcV4iB%ltJg#%JgzSOl!L!d<7;Gfa5FAv zjVdBTD(TpZ3>zF8@VbIAM{aYtDv8fh>oAmOoV`*>G_abe#aOPM+6b%!IzPP2K{>A5U*>>2+^+79)a z;+jQ03qhGCNA7Yx7^lX9Ba9FuFHNen`s{buqNeEv)$x#QoePK6M~soRL17NVafu`4RB%F$`Pl z5~X9X{(zDkw(=x-=6pOllhfSrJCozywriAokKZ^VZ?epc?F2YfOmC=V98gW?oL=*# zC!4VJtdyAXwE6cHlNoijVy3KiZxeTrjL5AO4?|IT4#6gV63bUTC!(fd*MK@3^J@F! zOg&Y}^l`KyT>$RnH8O17_%?_PVh?o(+5L|_R7c|c+R_PRXb26L8QM&z+5MaH{wtOk zn}L=^TXs*WwrBLOJ6hDKim{LKAa3?WEiRefh;#TMZ3y1zA%QAUYh={Ux!GU!o~ zQNH$+pUp$BPoB27%q zF^6BflF{;t=SZSz+GrMJ3q~ti7gQ;5SbjS`5!DFxQB8KOt1OQ(G%_V;vcdj>K_dXjNxb}0M?HyjDs(afDCVx%>+I2GAO;jMfy0Iwh$=Utfm z5snMAm4|C3O1?MDEQ%I@RL1I{SrN67(Q)b*7k&Ip+-THJr%-;ILx=v!SaW75@EH3` zUhVOn4CYZ>iZ!iaGNBq9Be`Mcq5Opf?{HZfcJM-VDr$qSCy^3Lij|O&UW{&ffZ&!( zaA9$H9_5lFs;vRx6|mmn{Ic~u%y*(_t~*m12^>%iUOQ9Ap<@`U;!iRpBZ5y=p}@B6 zSP;R6QS{hs7)q75Mgj7814d~Bae=<{A1Z5>;LN66N?m?;5pl?`*_wW1l4a8IBb4tyR6@^@^BOm`{tD6YyAv};)Te2G+K}4;<~T9 ztiHbWTlGjD1=omQ_viT9PJOR7GjZ^{`7u?a_$hGpx54G9Z4Uj-NJ+>3SA0ZSx1vXw zLxYWusP2Sm*#o~_#B)vb&lTfmtsonTnPHIvx!#}HYvp=bPcZe zcHOCWuo0{MxR+#P#Pz1PSlaT$g-HbB!hTlHpV_F!Ay^U-vb1-6W)!xh?3imeOv*Z3 z=D=Ij-4e>!J=_Q#nqT5Fkomgv(@3uQo!?=8R9Sw(0)&ni z2jsV8*xm^OAO91C)$^*!X=%ZHvh_G35URQ9mZ|{A0)E?gJcL0T$H-NA92s6VF$CYW z9RHBse3R!V%B}9#+)P1_9L@j@2VcH-GZ=N2{$k05r?kj$KxpvthW zd7m|F4Ka%sEOHJC`oN z{Q9h2$S$VYkMHBEw7ybMx&7`nIaMLI5n~s)u5f7_tg^|2p4eFF&|6C45|-}T zY2bbCicJ7u0b>nvzMSvbBTOChoOAKvC$b5)Y}lT;{a-@oZBJ!oQNfsC36M4qtjvVR zX;Qkn$Pw56!sOMyw2f6>a4-#^ zy$1D*lt}-KofQ^atUig?;uYP;un=4nq7RPpS6+7^7eT`a+9Hs&(5Wu`IyLv0kJINP zH{2$kHb`Me^3C!975F7KG!qcJ%Ot-tp1f*bJffu1KR9B1lQ=XYBq15?hlJ33*QN-~ z25i$#OI}x{k+-P3EKo3v2XVk4?t;KE4nj1dk!Zo@w6D?!o#k^~T|3?;an*{_dc}rZ zWWWrKbdBu0k$7Zn5A%~0$lei$vU1P?CE&!L*!t%`ziuxu= z$+Xt=qUvFYn;a&JSK-D!mWnDWtF|5q!R|hT$Hv!*O-Hv$ zFMd5*W#~$3AJN-2|IVd@2bWN6TIfD_0uz(~vS50vn&4k2seimRF5`Q+1IS}!NNHN| zuWuQz50#5kO>f(wTSg+{VKXLrOZR$Gm~DhS1f%%-9{FGG$s*ZrqKZL|g5VaRU11N3WB;tGWJx5jj1rPZ1}$YE7~gsu zE25FmauDeN0tjmI!T8LA_@Jktp-r4gQRI3~pz@ext*^u56U%RNNACtB2^N&i&Zkq_ z`%gV|mr`$f?Rog-De|tRlA$9w&gIG-7Zqk}`K~S#ez0!r0TA4$*?1vW^S1eRHim+x~x!Fuo?ZZGGykdj`C(v!pIX!M7^#v%t*g zcznI+6jSi4g8knZOJ2XD^*-Nu8++1xNL67@Dpa}id>w3=oC<2l|TauHqSGbyr z9Lb=M3fe$ymZM2IcIy2$WhWPLfA8YEy!~$2XHICgk})!EbwTa@re-=DC1|8#7fNFq6gJ2K}GKAX`f_@q32jY5x4yTSxUH;`}j*L?c8b@JA9D(4X1n>r5 zmjA{5zUzqX9?77@2f4TGSC#Gv z>RXD%m8Sx#GLz`?10nyLA3f`rKtm)2mp8 z2WUMD#ZK*6rx@tHUO&Z&$15&*p$9S&RarVs7nI?jWCTx!i z0n`(39&^Y>ScN)8+_K-B#JBi}jEM2qqgbCqWKx*4*ll_rs)9n)b|4=f&23 zGJ5Ub{5j_`P?1;gHXtz{3VvNPjI4v63M z7VR-O|JQRM-E&ZagmZ6Y#+`oTU{Zdpg*T>rA?e2lXyimlx-MsB_vpS!^2jDQhm%@q z{n8XwoaYQc8y7Itb%2)$a=$~0tev`)%-s+AXZ8I@XV4DuPx#4Z3^R?1Q&1e*!{+@j zwy0-{m|^s)xqlSU>jQk{owo@5+inF)-p_24DlAw`pUe~G8ATB<-h>G97|FK_kfkQlN-!Xir7CB=dF)cJj`)++W>CeZ z0KpG5Ul%&-7q_N%mRtvtM37+jS>A#7p`RadxDFCIFsAEA)28 zRc#)^^3Z1>`W_P8_n+_5l5pGfayTk_=7^k}d#ir!c>8mR4k$J+> z7$;sN^3k#e1A<-CaO6F6V7^1u(puc4hVnfPK2u$wSE_XF>^Bp?OAv{2Y8)b{(a(2LFQfe!w)T1x>k{ZpuhTF(Y6rhpZbrH!ElxM! z5seXw{2(-vFEyNn8P2QzldxYgR;$=9Va+n>oR-HQXL;u7|E|m|OuX!t) z=Y4P{a-kdSJHXaCvpi=8=DW$Bomevgq&Ys4T71MX_~k_QpcOJ7j|>5e z8fKax8KCNY#00?1+;-F_`mYl6?wiA0M9-%AWH7g{~~uALu>r1q7;w|*!aJIeE{mR8WtR@KBhs8TcC2jA=CW|Xy-ycIi>d)c7Okmo?_;IS6kWJ z(`FLRj~hxiQw>hGi`}`RB+q+jpRWZ9z114q7dyj#>yMG?n=NfcSz}CGOi5Bt#D4u( zFREX`PCs3=cqxne=H=$udT;=|-YI7ij;hPlH)3oXm z`Zikh-OIS^*V9YKw;%r4iW?YA#ppM%LKP=jnMYQ)JEBqy1t4U@E<8VwMW2U*KvaS5 zNDwVyHjTg6hvcbS>{N7lJu=~^Ut)S#sq~v9%#hIV2H~>o^9=!kEGypac0E4e6TQIW zr~+Bn`Sb4k*0*Zts;f;Vq@fsZn1hLBQyIO8W(13u0211vHK)RMC5neH4xx7?6jMVOl3i-ENH1NU{ z-FW1hXwfmWi;TOg`k_dSL1ckNlukjE5IiKg=2DaEcWG#qTCd+ts`vavz;Wye>fPE6 zy5Y~H#6~R#r29XgZcKEUWF`#TkPjT0Tb$nr`$rM*rO!0=z{AwY-%*%Y>1iy07;xo= zlqRRR7Oc25bnNStf}IG@3`}b^k0oTD!zg(19YJjRnXs}9jracK>Fw6_hgpNk9M$d_ zY;%@p@*94vn6~^S;rS|c_SBN9%41Y5CNDz~xgJ>zs5bOlC^*0Hm`3d+UdEAQlhAJ~ z9rS!JpiEjf-g5TxWc*_}=Uu;kRBG#hg)R{HVt_KfnWZwXW)vK%qN^F`Uk1yRWlJX^%Xv zrk4pFBKoY0c4V8}-7;k5jeHn#no6bE=CpUiQ*YjAXr&^e4Ji=kd5l#`F`6lq$7V{v z3HxGM@4$C!_rCJ0-}}J#b+>i@#M5T@ zDq!my3QKfc?}%tQt*O2KZN233YvPN6nJ}^KNmAv>Z%4u&!~ecZRVXA}Vl6Juc1QC% z^+u0V1RbM%wwc6J;|v%G|8k{t}#XaV3b2aS>;{E0?a{QN?D zjap1}Foj*+4gOfLe03+j+-fGX6EVmh%q%{kCs18^=Y$ttM`Ru~Sih(@mxvo*(|OHJwq(zE2(ex%#gkzo*Y14gL&0 zb&R`Soa5K^wB%jo6cc>zQGL@J1IWOVy&G6nrZ5tClv8t|5cv^+Gb2^+T0kC3kdVb= zzt>d9Y8%qhJjVP{A;^*2E;@stxE=CCM8#hlN3jEzVQ}z~l*fFX-3jF?-%dnrKMp>* z+*ojsjy{>@Jvb5ZmHokSc4fmUNZRBEvkDd^(WV&AoGicLZM&xx+F?MzT8H=FtNK9| zS}XSejv}P(R*P5=IL)L^{d8bx{SC>9DDxXj4@z-n^Hya-p}k%LC>kvh2A}eK-{n8P z{ymeI^r5$}WuJ`hTT7y&m(wGugFoqC45jML$-|3L7JDo`mbG@4AeOa9^F5Xfc~AdJ z6z*HExRMYeE;qZsGE(eCPFCa$fMk$Uzn)5Lqpt$(K3(+J)whl&sJ0{&+hDO7rV zmH=Vx#~{t)BZI;GL9NP4eoCJAPi}V8s2_pM0^Qn!dLjeT+!j52$p%MSaS9-1=VIXE zZZI?CV3-Z~UNNk|?P_bEXiaFvcS$(=j(imNA_Txz*qk*3Zt> zNTsgN3vU6G(NEuWibkSSE-gZ&wr@}`tuvHEIJGFQY)vT7_Sn%Zf>;noCdR{II*9Uy zi1DPT!QZt9edc?XCO_%vF)Vha6tK-jiPV+wdZr2-8Z+moIE4fA9Um2wrmprd`ujDw zA4$!<#8*6C%(UP!wX!r@9XeCS{UX~rhBT6- z&m5@`REID~K)qRRLN40)>Fz=?P=C-jXZA1}lMo#Lic@|(zYtC?Sr$}gjz;wX-)dH; z>kQvsjFQ|FEvL5r4GE`Vi>HJ+qxMkQH`jx)M#C81t{fBmVaUEu2p_>}$^Lp*OiKYZg_C_ycw2+?0OT`)la$oyQwx zn_edD@HInp4-Gny;i{I~SnCp_RpFSS_!Eo_CI3DYHotlBCu`)~d17BV58M;K#oqAY zMpX+Xw9;xj#wpOozs(lT<+Th^5&14m(|Q*%;z`vKh4SNgAVBe}N~g2sLPrFC2|fE< zFpnnM-xp>{8@7DssTYKd@0S%KXilVkqrjiHGyiM<4X=4ToUoPe$O?bRyn$W!y*w+D z6&Dp2t9Ct*jrJO53Vv$UzniUP=-;pr=_NhmXKlFLRkmbSfW7QwHhvWb87Y|_ zx8ovSSXKm9h{zGnW$Hh-iI?ZMHSbjn*3Sh{-$#hX$;rQovTb9bL)q_$Wc zZmKiDhCM5p5vXSn($(MVPz`Tl^8Dq9O!MXzxdIh}Yi;I?zh>o(TXxwNlF}fbbJWC- z#GcWxTx796z)2UUjk&XWZFb3^oh-r)7Kkx{urkexT2D1!HLjPN~zvz2X#hz4#kSWLV*CW#DJu#do;exLU5E*Yb2H*HhXE&}5w)`L0O>xl{F?nRCT2 z*sv_q70&aZdR}eGSdA;#MccWyIlME%-v<$!Uv*^qnA&%(krwShZthK$iyit6H#l;> zK-^@!-w;mtEMfj7rnxx}?MKV=JHn^z-cHiGPN(d-mV0j(9hnwwg#l4%su_AWn&D=e zjR-cx9)55a@TwJcUi!8R@A2vD&T99g^diZcn-!n?8)u3269>8(cQRcMciiUGO^eip z5B)0E8kXbcz#sx*&|^TUl$Lb)lb&Ip>#TdtDfUcwzE~nzmuQ7EmTjAgdgUiGuSuNa zpCb6rE6(O5o(^pW-+RuE)g@nrZK=PFeQcL58r8o>9J$FQ<9+2A1d*DBdQ!b*dT;;4 z$Xo4EWN=S2^E$tAy9hSL=6Vn#bHD2g;0=sNhjJ6d)KUocZ)+A6o6_A*qTK}$*h#RS zyk#XkuOO@^1ht8v-%9N{Y9oewzu$e7L(scb^mXW2_TiW*-y)vNyH`OadIrI^Y>*Zd zp?=ROXFoq0Kk^tpwCFt$B)QKsZPM$&nJ*fs2;Xd)FtPd@FMUTnfVUp;sJHFaw;TuBTKR%BOW_}ClL_Bhz{A0l{Qgc%@tjIWj2ys8T z-56z(;=%E*LE!6!#2)6$>Eq4>1p;7`)Z_NSc1X=l%@0`gB7usIOR#p2{Cap%H#@u+ z`w+GL;VMer0DCjGMC|TGF_;&EgwZvSq=Q8@4}X7rF+n51h%CM@hl5WX$J z1a?I~km{+qh|RA-3+BNxgHjmg>KA!Bo!rA$QbB?cckI}KdkcLRox3JZd`fkXjx#A+ z_&En<1xc&Qmnoz0c*OV_guW?$J#uUHP(jS@beks0sZ#) z21ebzv6U?Wp@^S4Wn-$u_zmK3cE*C1Mlc5xAi|J_lu9>vY@H z+=VfBpk=&5g2V=pY;m2PHSN1`4hDAzs43VInEYm~-~S`AxRI%f?TU84wXtx z=s<1xk#OUIW)~ZG_2?E}ncAz?RlZ%Nu{wqJtc71aL~G>$Y^@Cl^I zh)|w&6EwGxERMm32{6|adN{lmCnO=?!|jUP3Ws1;e!SWGzjeq)Lvs!ZTTq&ie5vo- z`1p%Yqwt8KsRfc+Zbj`#L-1}(Bwi~Ax5qO&ZU@{ejQ+Hp4mt4VPoV_VeCr(6zF z9UR1ae&+2iX+s6E2V}Lxc6ZM+-8S6$a@?&Cn^C~=sPX~d#JLm;5Qw1n%IW*&PBV?q z09O(5{}gEc5xG_jOowcjF=x4y(&YamY5r}Y`?S#80Bh&J&-}>XgL{roRVEZo{x*i~ ziq&;TCj2%^Ju@%&4lTnyhe)5-5PDrQb*+9kAHW!EOaiu61g8cl_=CS1bA@HjhP}H5 zEBJUSKy2WF;ua_T{{-d-8TdvHidCA`BXq&j4cFtL z^yXVy20#nD1@%y@Y5U4sF1MvXa8K;F7B|Z;gH>tspveGY5S|}@U_A#|Imi?6GS1f%=ROP|BEkV#WqVG3b_;n2 z;H#;^adfh%ovD>w5Gs4>tI$7iJW3x%2mWus`fl%IFZf2qhN?JgWZYM_WBdsAyZ9Ln zRkEUt($@b`?c4fgl`7mn2lzu)}t zF)QPs=rMRr?Dp9+=yMv@`)?NKswHtVMS+34S>A@W)D9NFirDEhF)P8UhG0LzO-*O0 zw~iYtAHX;-bhAs~r#R<26~a<=Te-BB1z_}yavF7s_X>@Au~8kI-fv?*ch&2-MEDeRpn$| zQs#J6{sP}E#c@zKLH{=n*1NNgxp^;34)cyq+y$_nMaXHdPefdQB&ZYuaBF&F+#jI) z5iI(HZ*=0~V#^Xg^oqt{LGBS3`Mzzz-b6=qrl1#6B|u? z)MRjg9LIM9!?@uFajP;=#Ssg@2~wUs91pUhTWF1+X;!z;#!7zZ!HA3(S&VVh0-H-7)D5Ez?jhb5*13LRK%!y+ z0JbakM=Tfr@d$}P-7SM{#QqrU2pOeg#laPR_u*ECoxGxwD+5qp7mJFAC4KD`kx<@y z!H-TwF(`nXfja!2zxynS|Kfw?Nv{=+iYwx~iR_4 zsDFPJT72Tn&;L~mWIpqIHR?q6{H5=03xogjIQ00LT=Sm?Yu??dTo^X%GTU3y3 z5U%wt^lQ~lI;@oqpCR=JSG?o&&sGC)JkTBL$iPQn)gVhj=u1Ww=)nAbnfA|CTF1W} zHDFT%X57(fTIQ+HQ=ZLM-4b?z)=H^8gSHr jqXrx`;HZHtT?79Qd=?ufS>7*000000NkvXXu0mjfyH5ns literal 0 HcmV?d00001 diff --git a/Libraries/LwIP/CHANGELOG b/Libraries/LwIP/CHANGELOG index 3b47ec2..4061027 100755 --- a/Libraries/LwIP/CHANGELOG +++ b/Libraries/LwIP/CHANGELOG @@ -1,9 +1,262 @@ HISTORY + * These are only the most important changes. For a full list, use git log: + http://git.savannah.nongnu.org/cgit/lwip.git (git master) * [Enter new changes just after this line - do not remove this line] +(STABLE-2.1.2): + + ++ Bugfixes: + + 2018-11-21: Jens Nielsen + * netbiosns.c: fix expecting too large packet (bug #55069) + + 2018-11-19: Dirk Ziegelmeier + * smtp.c: fix compiling with strict C compatibility because of strnlen (bug #55034) + + 2018-11-12: Simon Goldschmidt + * tcp.c: fix overflow check in tcp_recved triggering invalid assertion (bug #55015) + + 2018-11-12: Simon Goldschmidt + * tcp.c: fix a bug in sending RST segments (sent from port 0) + +(STABLE-2.1.1): + + ++ Bugfixes: + + 2018-11-01: Joan Lledó + * sockets.c: fix bad assertion in lwip_poll_dec_sockets_used() (bug #54933) + + 2018-11-01: Dirk Ziegelmeier + * ip4.c: don't send 127.* to default netif (bug #54670) + + 2018-10-23: David Girault + * altcp_tls_mbedtls.c: fix use-after free (bug #54774) + + 2018-10-23: Ognjen Bjelica, Dirk Ziegelmeier + * snmp_scalar.c: Avoid NULL pointer dereference (bug #54886) + + 2018-10-23: Simon Goldschmidt + * Fix missing standard includes in multiple files + + 2018-10-17: Ivan Warren + * def.h: fix casting htonX and ntohX to u16_t (bug #54850) + + 2018-10-12: Simon Goldschmidt + * Revert "tcp_abandon: no need to buffer pcb->local_port" (fix that source port was 0 for RST + called when aborting a connection) + + 2018-10-11: Jonas Rabenstein + * tcp.c: tcp_recved: check for overflow and warn about too big values (patch #9699) + + 2018-10-06: Joan Lledó + * sockets.c: alloc_socket(): Check for LWIP_SOCKET_POLL when setting select- + related variables (patch #9696) + + 2018-10-04: Spencer + * tcp.c: Update prev pointer when skipping entries in tcp_slowtmr (patch #9694) + + 2018-09-27: Martine Lenders + * lowpan6.c: Fix IEEE 802.15.4 address setting (bug #54749) + +(STABLE-2.1.0): + + ++ New features: + + 2018-06-17: Simon Goldschmidt + * lwiperf: implemented iPerf client mode + + 2018-04-23: Dirk Ziegelmeier + * added cmake build files + + 2018-03-04: Ray Abram + * netbios responder: respond to '*' queries + + 2018-02-23: Benjamin Aigner + * 6lowpan: add 6lowpan-over-BLE netif (based on existing 6lowpan netif) + + 2018-02-22: Simon Goldschmidt + * ipv6: add support for stateless DHCPv6 (to get DNS servers in SLAAC nets) + + 2018-02-16: Simon Goldschmidt + * add raw API http(s) client (with proxy support) + + 2018-02-01: Simon Goldschmidt + * tcp: add hooks to implement additional socket options + + 2018-02-01: Simon Goldschmidt + * tcp: add hooks to implement tcp md5 signatures or similar (see contrib/addons for an example) + + 2018-01-05: Simon Goldschmidt + * Added sys_mbox_trypost_fromisr() and tcpip_callbackmsg_trycallback_fromisr() + These can be used to post preallocated messages from an ISR to the tcpip thread + (e.g. when using FreeRTOS) + + 2018-01-02: Dirk Ziegelmeier + * task #14780: Add debug helper asserts to ensure threading/locking requirements are met + + 2017-11-21: Simon Goldschmidt + * task #14600: tcp_alloc(): kill TF_CLOSEPEND connections before other ESTABLISHED + + 2017-11-21: Simon Goldschmidt + * makefsdata: added option "-ssi:" to control SSI tag checking/insertion + through a list of filenames, not by checking the file extension at runtime + + 2017-11-20: Joel Cunningham + * netconn: add LWIP_HOOK_NETCONN_EXTERNAL_RESOLVE to use external DNS resolver (patch #9427) + + 2017-11-14: Joel Cunningham + * netifapi: Add thread safe ARP cache APIs (task #14724) + + 2017-11-06: Axel Lin + * TCP: kill existing connections with a LOWER priority than the one currently being opened. + Previous implementations also kill existing connections of the SAME priority. + + 2017-09-21: Kalle Olavi Niemitalo + * sockets: add poll() implementation (patch #9450) + + 2017-09-10: Joel Cunningham + * sockets: add readv() implementation (task #14610) + + 2017-08-04: Simon Goldschmidt + * Clean up DHCP a bit: no need keep msg_out and msg_in as members in struct + dhcp - they are used in a call stack only (p_out and options_out_len as well) + + 2017-08-04: Simon Goldschmidt + * pbuf: split pbuf_header(s16_t) into pbuf_add_header(size_t) and + pbuf_remove_header(size_t) + + 2017-07-20: Douglas + * sys: deprecate sys_arch_sem_wait and sys_arch_mbox_fetch returning the + time waited rather they are now defined to return != SYS_ARCH_TIMEOUT + on success. + + 2017-07-03: Jakub Schmidtke + * tcp: added support for sending TCP SACKs + + 2017-06-20: Joel Cunningham + * netconn/netdb: added core locking support to netconn_gethostbyname (task #14523) + + 2017-04-25: Simon Goldschmidt + * dhcp: added two hooks for adding and parsing user defined DHCP options + + 2017-04-25: Joel Cunningham + * sockets: added recvmsg for UDP (together with CMSG and IP_PKTINFO) (task #14247) + + 2017-04-20: Joel Cunningham + * tcp: added Appropriate Byte Counting support (task #14128) + + 2017-04-11: Simon Goldschmidt + * netconn/sockets: remove fatal error handling, fix asynchronous error handling, + ensure data before RST can be received + + 2017-03-30: Simon Goldschmidt + * added "application layered TCP" connection API (altcp) for seamless integration + of TLS or proxy connections + + 2017-03-09: Simon Goldschmidt + * sockets: add recvmsg for TCP + + 2017-03-02: Joel Cunningham + * netconn/sockets: vectorize netconn_write for TCP, treating a vectored I/O write + atomically in regards to TCP segmentation (patch #8882) + + 2017-03-02: Simon Goldschmidt + * netconn: added nonblocking accept/recv to netconn API (task #14396) + + 2017-02-28: Simon Goldschmidt + * Added LWIP_SINGLE_NETIF for small targets with only one netif + + 2017-02-10: David van Moolenbroek + * Implement UDP and RAW multicast support for IPv6 (core API, not netconn/sockets) + + 2017-02-04: David van Moolenbroek + * IPv6 scopes support + + 2017-01-20: Joel Cunningham + * sockets: add interface name/index APIs (task #14314) + + 2017-01-08: David van Moolenbroek + * Extensions to RAW API (patch #9208) + - Connected RAW PCBs + - Add raw_sendto_if_src() + - Support IP_HDRINCL socket option + + ++ Bugfixes: + + 2018-06-19: Simon Goldschmidt + * tcp: fix RTO timer not working if link is down + + 2018-06-15: Sylvain Rochet + * ppp: multiple smaller bugfixes + + 2018-05-17: Simon Goldschmidt + * etharp: arp table can now be bigger than 127 entries + + 2018-04-25: Jens Nielsen + * tftp server: correctly handle retransmissions + + 2018-04-18: Simon Goldschmidt + sockets: fix race conditions when closing full-duplex sockets + + 2018-03-09: Simon Goldschmidt + * 6lowpan: fix to work against contiki; added ZigBee encapsulation netif for tests + + 2018-02-04: Simon Goldschmidt + * sockets: fix inconsistencies on close (inconsistent error codes, double FIN) + + 2018-01-05: Dirk Ziegelmeier + * Fix bug #52748: the bug in timeouts.c by reimplementing timer logic to use + absolute instead of relative timeout values + + 2017-12-31: Dirk Ziegelmeier + * Fix bug #52704: DHCP and bad OFFER: Stop timeout only if offer is accepted + + 2017-11-08: Joel Cunningham + * netif: ensure link and admin states are up in issue reports (bug #52353) + + 2017-09-12: David Lockyer + * select: allocate select_cb from memp for LWIP_MPU_COMPATIBLE = 1 (bug #51990) + + 2017-09-11: Simon Goldschmidt + * tcp_in.c: fix bug #51937 (leaking tcp_pcbs on passive close with unacked data) + + 2017-08-11: Joel Cunningham + * lwip_itoa: fix converting the number 0 (previously converted to '\0') (bug #51729) + + 2017-08-08: Dirk Ziegelmeier + * ip4_route_src: parameter order is reversed: ip4_route_src(dest, src) -> ip4_route_src(src, dest) + to make parameter order consistent with other ip*_route*() functions + Same also applies to LWIP_HOOK_IP4_ROUTE_SRC() parameter order. + + 2017-08-04: Joel Cunningham + * tcp: re-work persist timer to fully close window (details in bug #50837) + + 2017-07-26: Simon Goldschmidt + * snmp_msg.c: fix bug #51578 (SNMP failed to decode some values on non 32bit platforms) + + 2017-07-20: Simon Goldschmidt + * compatibility headers: moved from 'src/include/posix' to 'src/include/compat/posix', + 'src/include/compat/stdc' etc. + + 2017-05-09: Joel Cunningham + * tcp: add zero-window probe timeout (bug #50837) + + 2017-04-11: Simon Goldschmidt + * sockets.c: task #14420 (Remove sys_sem_signal from inside SYS_ARCH_PROTECT + crit section) done for LWIP_TCPIP_CORE_LOCKING==1 + + 2017-02-24: Simon Goldschmidt + * sockets.c: fixed close race conditions in lwip_select (for LWIP_NETCONN_FULLDUPLEX) + + 2017-02-24: Simon Goldschmidt + * sockets.c: fixed that select ignored invalid/not open sockets in the fd_sets (bug #50392) + + 2017-01-11: David van Moolenbroek + * Lots of IPv6 related fixes and improvements + (STABLE-2.0.3) ++ Bugfixes: diff --git a/Libraries/LwIP/CMakeLists.txt b/Libraries/LwIP/CMakeLists.txt new file mode 100644 index 0000000..f05c0f6 --- /dev/null +++ b/Libraries/LwIP/CMakeLists.txt @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 3.7) + +project(lwIP) + +set(LWIP_DIR ${CMAKE_CURRENT_SOURCE_DIR}) +include(src/Filelists.cmake) + +# Package generation +set(CPACK_SOURCE_GENERATOR "ZIP") +set(CPACK_SOURCE_PACKAGE_DESCRIPTION_SUMMARY "lwIP lightweight IP stack") +set(CPACK_PACKAGE_VERSION_MAJOR "${LWIP_VERSION_MAJOR}") +set(CPACK_PACKAGE_VERSION_MINOR "${LWIP_VERSION_MINOR}") +set(CPACK_PACKAGE_VERSION_PATCH "${LWIP_VERSION_REVISION}") +set(CPACK_SOURCE_IGNORE_FILES "/build/;${CPACK_SOURCE_IGNORE_FILES};.git") +set(CPACK_SOURCE_PACKAGE_FILE_NAME "lwip-${LWIP_VERSION_MAJOR}.${LWIP_VERSION_MINOR}.${LWIP_VERSION_REVISION}") +include(CPack) + +# Target for package generation +add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source) +add_dependencies(dist lwipdocs) diff --git a/Libraries/LwIP/FEATURES b/Libraries/LwIP/FEATURES new file mode 100644 index 0000000..a50c5a5 --- /dev/null +++ b/Libraries/LwIP/FEATURES @@ -0,0 +1,11 @@ +lwIP is a small independent implementation of the TCP/IP protocol suite targeted at embedded systems. + +The focus of the lwIP TCP/IP implementation is to reduce resource usage while still having a full scale TCP. This makes lwIP suitable for use in embedded systems with tens of kilobytes of free RAM and room for around 40 kilobytes of code ROM. + +Main features include: +- Protocols: IP, IPv6, ICMP, ND, MLD, UDP, TCP, IGMP, ARP, PPPoS, PPPoE, 6LowPAN (via IEEE 802.15.4, BLE or ZEP; since v2.1.0) +- DHCP client, stateless DHCPv6 (since v2.1.0), DNS client (incl. mDNS hostname resolver), AutoIP/APIPA (Zeroconf), SNMP agent (v1, v2c, v3 (since v2.1.0), private MIB support & MIB compiler) +- APIs: specialized APIs for enhanced performance & zero copy, optional Berkeley-alike socket API +- Extended features: IP forwarding over multiple network interfaces +- Extended TCP features: congestion control, RTT estimation and fast recovery/fast retransmit, sending SACKs (since v2.1.0), "altcp": nearly transparent TLS for any tcp pcb (since v2.1.0) +- Addon applications: HTTP server (HTTPS via altcp), HTTP(S) client (since v2.1.0), SNTP client, SMTP client (SMTPS via altcp), ping, NetBIOS nameserver, mDNS responder, MQTT client (TLS support since v2.1.0), TFTP server, iPerf2 counterpart diff --git a/Libraries/LwIP/README b/Libraries/LwIP/README index dba5c47..016827b 100755 --- a/Libraries/LwIP/README +++ b/Libraries/LwIP/README @@ -1,15 +1,15 @@ INTRODUCTION -lwIP is a small independent implementation of the TCP/IP protocol -suite that has been developed by Adam Dunkels at the Computer and -Networks Architectures (CNA) lab at the Swedish Institute of Computer -Science (SICS). +lwIP is a small independent implementation of the TCP/IP protocol suite. The focus of the lwIP TCP/IP implementation is to reduce the RAM usage while still having a full scale TCP. This making lwIP suitable for use in embedded systems with tens of kilobytes of free RAM and room for around 40 kilobytes of code ROM. +lwIP was originally developed by Adam Dunkels at the Computer and Networks +Architectures (CNA) lab at the Swedish Institute of Computer Science (SICS) +and is now developed and maintained by a worldwide network of developers. FEATURES @@ -22,22 +22,28 @@ FEATURES * ND (Neighbor discovery and stateless address autoconfiguration for IPv6). Aims to be compliant with RFC 4861 (Neighbor discovery) and RFC 4862 (Address autoconfiguration) + * DHCP, AutoIP/APIPA (Zeroconf) and (stateless) DHCPv6 * UDP (User Datagram Protocol) including experimental UDP-lite extensions * TCP (Transmission Control Protocol) with congestion control, RTT estimation - and fast recovery/fast retransmit + fast recovery/fast retransmit and sending SACKs * raw/native API for enhanced performance * Optional Berkeley-like socket API - * DNS (Domain names resolver) + * TLS: optional layered TCP ("altcp") for nearly transparent TLS for any + TCP-based protocol (ported to mbedTLS) (see changelog for more info) + * PPPoS and PPPoE (Point-to-point protocol over Serial/Ethernet) + * DNS (Domain name resolver incl. mDNS) + * 6LoWPAN (via IEEE 802.15.4, BLE or ZEP) APPLICATIONS - * HTTP server with SSI and CGI - * SNMPv2c agent with MIB compiler (Simple Network Management Protocol) + * HTTP server with SSI and CGI (HTTPS via altcp) + * SNMPv2c agent with MIB compiler (Simple Network Management Protocol), v3 via altcp * SNTP (Simple network time protocol) * NetBIOS name service responder * MDNS (Multicast DNS) responder * iPerf server implementation + * MQTT client (TLS support via altcp) LICENSE diff --git a/Libraries/LwIP/UPGRADING b/Libraries/LwIP/UPGRADING index 4d6d969..acb8836 100755 --- a/Libraries/LwIP/UPGRADING +++ b/Libraries/LwIP/UPGRADING @@ -8,6 +8,41 @@ with newer versions. * [Enter new changes just after this line - do not remove this line] +(2.1.0) + + ++ Application changes: + + * Use the new altcp API for seamless TLS integration into existing TCP applications (see changelog) + * TCP only kills existing connections with a LOWER priority than the one currently being opened. + Previous implementations also kill existing connections of the SAME priority. + * ip4_route_src: parameter order is reversed: ip4_route_src(dest, src) -> ip4_route_src(src, dest) + to make parameter order consistent with other ip*_route*() functions. + Same also applies to LWIP_HOOK_IP4_ROUTE_SRC() parameter order. + * pbuf API: pbuf->type (an u8_t holding the enum 'pbuf_type') has changed to only hold a + description of the pbuf (e.g. data following pbuf struct, data volatile, allocation + source heap/pool/etc.). As a consequence, applications can't test pbuf->type any more. + Use pbuf_match_type(pbuf, type) instead. + * socket API: according to the standard, SO_ERROR now only returns asynchronous errors. + All other/normal/synchronous errors are (and always were) available via 'errno'. + LWIP_SOCKET_SET_ERRNO has been removed - 'errno' is always set - and required! + * httpd LWIP_HTTPD_CGI_SSI: httpd_cgi_handler() has an additional parameter "struct fs_file *" + + ++ Port changes: + + * tcpip_trycallback() was renamed to tcpip_callbackmsg_trycallback() to avoid confusion + with tcpip_try_callback() + * compatibility headers: moved from 'src/include/posix' to 'src/include/compat/posix', + 'src/include/compat/stdc' etc. + * The IPv6 implementation now supports address scopes. (See LWIP_IPV6_SCOPES documentation + and ip6_zone.h for more documentation) + * LWIP_HOOK_DHCP_APPEND_OPTIONS() has changed, see description in opt.h (options_out_len is not + available in struct dhcp any more) + * Added debug helper asserts to ensure threading/locking requirements are met (define + LWIP_MARK_TCPIP_THREAD() and LWIP_ASSERT_CORE_LOCKED()). + * Added sys_mbox_trypost_fromisr() and tcpip_callbackmsg_trycallback_fromisr() + These can be used to post preallocated messages from an ISR to the tcpip thread + (e.g. when using FreeRTOS) + (2.0.2) ++ Application changes: diff --git a/Libraries/LwIP/doc/NO_SYS_SampleCode.c b/Libraries/LwIP/doc/NO_SYS_SampleCode.c index fcc22c5..44ecc88 100755 --- a/Libraries/LwIP/doc/NO_SYS_SampleCode.c +++ b/Libraries/LwIP/doc/NO_SYS_SampleCode.c @@ -56,8 +56,8 @@ netif_init(struct netif *netif) netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET | NETIF_FLAG_IGMP | NETIF_FLAG_MLD6; MIB2_INIT_NETIF(netif, snmp_ifType_ethernet_csmacd, 100000000); - SMEMCPY(netif->hwaddr, your_mac_address_goes_here, sizeof(netif->hwaddr)); - netif->hwaddr_len = sizeof(netif->hwaddr); + SMEMCPY(netif->hwaddr, your_mac_address_goes_here, ETH_HWADDR_LEN); + netif->hwaddr_len = ETH_HWADDR_LEN; return ERR_OK; } diff --git a/Libraries/LwIP/doc/ZeroCopyRx.c b/Libraries/LwIP/doc/ZeroCopyRx.c new file mode 100644 index 0000000..0e8219b --- /dev/null +++ b/Libraries/LwIP/doc/ZeroCopyRx.c @@ -0,0 +1,45 @@ +typedef struct my_custom_pbuf +{ + struct pbuf_custom p; + void* dma_descriptor; +} my_custom_pbuf_t; + +LWIP_MEMPOOL_DECLARE(RX_POOL, 10, sizeof(my_custom_pbuf_t), "Zero-copy RX PBUF pool"); + +void my_pbuf_free_custom(void* p) +{ + SYS_ARCH_DECL_PROTECT(old_level); + + my_custom_pbuf_t* my_puf = (my_custom_pbuf_t*)p; + + // invalidate data cache here - lwIP and/or application may have written into buffer! + // (invalidate is faster than flushing, and noone needs the correct data in the buffer) + invalidate_cpu_cache(p->payload, p->tot_len); + + SYS_ARCH_PROTECT(old_level); + free_rx_dma_descriptor(my_pbuf->dma_descriptor); + LWIP_MEMPOOL_FREE(RX_POOL, my_pbuf); + SYS_ARCH_UNPROTECT(old_level); +} + +void eth_rx_irq() +{ + dma_descriptor* dma_desc = get_RX_DMA_descriptor_from_ethernet(); + my_custom_pbuf_t* my_pbuf = (my_custom_pbuf_t*)LWIP_MEMPOOL_ALLOC(RX_POOL); + + my_pbuf->p.custom_free_function = my_pbuf_free_custom; + my_pbuf->dma_descriptor = dma_desc; + + invalidate_cpu_cache(dma_desc->rx_data, dma_desc->rx_length); + + struct pbuf* p = pbuf_alloced_custom(PBUF_RAW, + dma_desc->rx_length, + PBUF_REF, + &my_pbuf->p, + dma_desc->rx_data, + dma_desc->max_buffer_size); + + if(netif->input(p, netif) != ERR_OK) { + pbuf_free(p); + } +} diff --git a/Libraries/LwIP/doc/doxygen/lwip.Doxyfile b/Libraries/LwIP/doc/doxygen/lwip.Doxyfile index 8d07dfb..929fb4c 100755 --- a/Libraries/LwIP/doc/doxygen/lwip.Doxyfile +++ b/Libraries/LwIP/doc/doxygen/lwip.Doxyfile @@ -1,4 +1,4 @@ -# Doxyfile 1.8.11 +# Doxyfile 1.8.13 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. @@ -38,7 +38,7 @@ PROJECT_NAME = "lwIP" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "2.0.3" +PROJECT_NUMBER = "2.1.2" # 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 viewer a @@ -58,7 +58,7 @@ PROJECT_LOGO = # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. -OUTPUT_DIRECTORY = output +OUTPUT_DIRECTORY = "output" # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and @@ -303,6 +303,15 @@ EXTENSION_MAPPING = 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: 0. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 0 + # 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 @@ -781,7 +790,8 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = main_page.h ../../src +INPUT = main_page.h \ + ../../src # 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 @@ -803,8 +813,8 @@ INPUT_ENCODING = UTF-8 # If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, # *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, # *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, -# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f, *.for, *.tcl, -# *.vhd, *.vhdl, *.ucf, *.qsf, *.as and *.js. +# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, +# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf. FILE_PATTERNS = *.c \ *.cc \ @@ -875,7 +885,8 @@ EXCLUDE_SYMBOLS = # that contain example code fragments that are included (see the \include # command). -EXAMPLE_PATH = ../ ../../ +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 @@ -2077,16 +2088,26 @@ PREDEFINED = __DOXYGEN__=1 \ LWIP_ICMP=1 \ LWIP_RAW=1 \ LWIP_DHCP=1 \ + LWIP_IPV6_DHCP6=1 \ LWIP_UDPLITE=1 \ LWIP_UDP=1 \ LWIP_IGMP=1 \ LWIP_TCP=1 \ + LWIP_ALTCP=1 \ + LWIP_ALTCP_TLS=1 \ + LWIP_IPV6_SCOPES=1 \ TCP_LISTEN_BACKLOG=1 \ LWIP_SNMP=1 \ SNMP_USE_NETCONN=1 \ SNMP_USE_RAW=1 \ MIB2_STATS=1 \ LWIP_MDNS_RESPONDER=1 \ + HTTPD_ENABLE_HTTPS=1 \ + LWIP_HTTPD_CGI=1 \ + LWIP_HTTPD_SSI=1 \ + LWIP_HTTPD_SSI_RAW=1 \ + LWIP_HTTPD_SUPPORT_POST=1 \ + LWIP_HTTPD_POST_MANUAL_WND=1 \ MEMP_OVERFLOW_CHECK=0 \ MEMP_SANITY_CHECK=1 \ LWIP_ARP=1 \ @@ -2097,6 +2118,7 @@ PREDEFINED = __DOXYGEN__=1 \ LWIP_NETIF_STATUS_CALLBACK=1 \ LWIP_NETIF_REMOVE_CALLBACK=1 \ LWIP_NETIF_LINK_CALLBACK=1 \ + LWIP_NETIF_EXT_STATUS_CALLBACK=1 \ LWIP_NUM_NETIF_CLIENT_DATA=1 \ ENABLE_LOOPBACK=1 \ LWIP_AUTOIP=1 \ @@ -2115,8 +2137,9 @@ PREDEFINED = __DOXYGEN__=1 \ SO_REUSE=1 \ SO_REUSE_RXTOALL=1 \ LWIP_HAVE_SLIPIF=1 \ - LWIP_6LOWPAN=1 - + SLIP_RX_FROM_ISR=1 \ + LWIP_TCP_PCB_NUM_EXT_ARGS=1 + # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The # macro definition that is found in the sources will be used. Use the PREDEFINED @@ -2228,7 +2251,7 @@ HIDE_UNDOC_RELATIONS = YES # http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent # Bell Labs. The other options in this section have no effect if this option is # set to NO -# The default value is: YES. +# The default value is: NO. HAVE_DOT = NO @@ -2384,9 +2407,7 @@ DIRECTORY_GRAPH = YES # Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order # to make the SVG files visible in IE 9+ (other browsers do not have this # requirement). -# Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd, -# png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo, -# gif:cairo:gd, gif:gd, gif:gd:gd, svg, png:gd, png:gd:gd, png:cairo, +# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo, # png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and # png:gdiplus:gdiplus. # The default value is: png. @@ -2439,6 +2460,11 @@ DIAFILE_DIRS = PLANTUML_JAR_PATH = +# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a +# configuration file for plantuml. + +PLANTUML_CFG_FILE = + # When using plantuml, the specified paths are searched for files specified by # the !include statement in a plantuml block. diff --git a/Libraries/LwIP/doc/doxygen/lwip.Doxyfile.cmake.in b/Libraries/LwIP/doc/doxygen/lwip.Doxyfile.cmake.in new file mode 100644 index 0000000..063c288 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/lwip.Doxyfile.cmake.in @@ -0,0 +1,2531 @@ +# Doxyfile 1.8.13 + +# 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 (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config 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 http://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 = "lwIP" + +# 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 = "${LWIP_VERSION_STRING}" + +# 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 viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = "Lightweight IP stack" + +# 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 = + +# 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 = "${DOXYGEN_OUTPUT_DIR}" + +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 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 causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# 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, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, 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 is your file systems 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) 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 QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) 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 + +# 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 = 8 + +# 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:\n" +# 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:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# 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 = YES + +# 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 + +# 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, +# C#, C, C++, D, PHP, Objective-C, Python, 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), VHDL. 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. + +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 http://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: 0. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 0 + +# 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. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# 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 make 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: +# http://www.riverbankcomputing.co.uk/software/sip/intro) 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 + +#--------------------------------------------------------------------------- +# 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_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 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 = YES + +# 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 +# has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = YES + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) 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 + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES, upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = NO + +# 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_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 = NO + +# 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. +# +# 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 http://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 = + +#--------------------------------------------------------------------------- +# 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 not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = 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 or incomplete +# parameter documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. +# 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) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text " + +# 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). + +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 = main_page.h \ + ../../src + +# 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: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# 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. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, +# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf. + +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.idl \ + *.odl \ + *.inc \ + *.m \ + *.mm \ + *.dox + +# 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 = YES + +# 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 = ../../src/include/netif/ppp/polarssl + +# 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, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */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 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 = main_page.h + +#--------------------------------------------------------------------------- +# 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, +# classes and enums 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 +# function 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 http://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 config 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 = NO + +# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the +# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the +# cost of reduced performance. This can be particularly helpful with template +# rich C++ code for which doxygen's built-in parser lacks the necessary type +# information. +# Note: The availability of this option depends on whether or not doxygen was +# generated with the -Duse-libclang=ON option for CMake. +# The default value is: NO. + +CLANG_ASSISTED_PARSING = NO + +# If clang assisted parsing is enabled you can provide the compiler with command +# line options that you would normally use when invoking the compiler. Note that +# the include paths will already be set by doxygen for the files and directories +# specified with INPUT and INCLUDE_PATH. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. + +CLANG_OPTIONS = + +#--------------------------------------------------------------------------- +# 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 = NO + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. 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. +# 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). 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_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 colorwheel, see +# http://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 grayscales 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_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = NO + +# 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 + +# 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: http://developer.apple.com/tools/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 http://developer.apple.com/tools/creatingdocsetswithdoxygen.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 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 +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# 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 = lwip.chm + +# 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 master .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 + +# 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: http://qt-project.org/doc/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: http://qt-project.org/doc/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: http://qt-project.org/doc/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: http://qt-project.org/doc/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: +# http://qt-project.org/doc/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 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: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# 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. 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: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = YES + +# 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 + +# 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 + +# 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 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://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 + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) 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 http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# 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/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 +# , /
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/lowpan6_8c.js b/Libraries/LwIP/doc/doxygen/output/html/lowpan6_8c.js new file mode 100644 index 0000000..30abcf7 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lowpan6_8c.js @@ -0,0 +1,13 @@ +var lowpan6_8c = +[ + [ "lowpan6_reass_helper", "structlowpan6__reass__helper.html", null ], + [ "lowpan6_ieee802154_data", "structlowpan6__ieee802154__data.html", "structlowpan6__ieee802154__data" ], + [ "lowpan6_calc_crc", "lowpan6_8c.html#ab33dc87f30aeda871845854511de9931", null ], + [ "lowpan6_input", "group__sixlowpan.html#ga3c943da6f9d3f1096bdcebe3e19d38b7", null ], + [ "lowpan6_output", "group__sixlowpan.html#ga9e650551777ededccf035ef9aaee247b", null ], + [ "lowpan6_set_context", "group__sixlowpan.html#ga94c6d289bc25a14fd0fee9230ae3af94", null ], + [ "lowpan6_set_pan_id", "group__sixlowpan.html#gade00524e85d37a3521ea85359f801df3", null ], + [ "lowpan6_set_short_addr", "group__sixlowpan.html#gafee5495843dfb36cb77ba2f16ea6a625", null ], + [ "lowpan6_tmr", "lowpan6_8c.html#ac8c3a4612aeb23f65e55c18faf5ad7d7", null ], + [ "tcpip_6lowpan_input", "group__sixlowpan.html#ga9d9b93c47dd138fd84a503ffecb9336b", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/lowpan6_8h.html b/Libraries/LwIP/doc/doxygen/output/html/lowpan6_8h.html new file mode 100644 index 0000000..af1b3a5 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lowpan6_8h.html @@ -0,0 +1,204 @@ + + + + + + + +lwIP: src/include/netif/lowpan6.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  lowpan6.h File Reference
                  +
                  +
                  +
                  #include "netif/lowpan6_opts.h"
                  +#include "netif/lowpan6_common.h"
                  +#include "lwip/pbuf.h"
                  +#include "lwip/ip.h"
                  +#include "lwip/ip_addr.h"
                  +#include "lwip/netif.h"
                  +
                  + + + +

                  +Macros

                  #define LOWPAN6_TMR_INTERVAL   1000
                   
                  + + + + + + + + + + + + + + + + + +

                  +Functions

                  void lowpan6_tmr (void)
                   
                  err_t lowpan6_set_context (u8_t idx, const ip6_addr_t *context)
                   
                  err_t lowpan6_set_short_addr (u8_t addr_high, u8_t addr_low)
                   
                  err_t lowpan6_output (struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr)
                   
                  err_t lowpan6_input (struct pbuf *p, struct netif *netif)
                   
                  err_t lowpan6_set_pan_id (u16_t pan_id)
                   
                  u16_t lowpan6_calc_crc (const void *buf, u16_t len)
                   
                  err_t tcpip_6lowpan_input (struct pbuf *p, struct netif *inp)
                   
                  +

                  Detailed Description

                  +

                  6LowPAN output for IPv6. Uses ND tables for link-layer addressing. Fragments packets to 6LowPAN units.

                  +

                  Macro Definition Documentation

                  + +

                  ◆ LOWPAN6_TMR_INTERVAL

                  + +
                  +
                  + + + + +
                  #define LOWPAN6_TMR_INTERVAL   1000
                  +
                  +

                  1 second period for reassembly

                  + +
                  +
                  +

                  Function Documentation

                  + +

                  ◆ lowpan6_calc_crc()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  u16_t lowpan6_calc_crc (const void * buf,
                  u16_t len 
                  )
                  +
                  +

                  Calculate the 16-bit CRC as required by IEEE 802.15.4

                  + +
                  +
                  + +

                  ◆ lowpan6_tmr()

                  + +
                  +
                  + + + + + + + + +
                  void lowpan6_tmr (void )
                  +
                  +

                  Periodic timer for 6LowPAN functions:

                  +
                    +
                  • Remove incomplete/old packets
                  • +
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/lowpan6_8h.js b/Libraries/LwIP/doc/doxygen/output/html/lowpan6_8h.js new file mode 100644 index 0000000..e5667d6 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lowpan6_8h.js @@ -0,0 +1,12 @@ +var lowpan6_8h = +[ + [ "LOWPAN6_TMR_INTERVAL", "lowpan6_8h.html#aa258ae16a937c40333c8f97a7f236797", null ], + [ "lowpan6_calc_crc", "lowpan6_8h.html#ab33dc87f30aeda871845854511de9931", null ], + [ "lowpan6_input", "group__sixlowpan.html#ga3c943da6f9d3f1096bdcebe3e19d38b7", null ], + [ "lowpan6_output", "group__sixlowpan.html#ga9e650551777ededccf035ef9aaee247b", null ], + [ "lowpan6_set_context", "group__sixlowpan.html#ga94c6d289bc25a14fd0fee9230ae3af94", null ], + [ "lowpan6_set_pan_id", "group__sixlowpan.html#gade00524e85d37a3521ea85359f801df3", null ], + [ "lowpan6_set_short_addr", "group__sixlowpan.html#gafee5495843dfb36cb77ba2f16ea6a625", null ], + [ "lowpan6_tmr", "lowpan6_8h.html#ac8c3a4612aeb23f65e55c18faf5ad7d7", null ], + [ "tcpip_6lowpan_input", "group__sixlowpan.html#ga9d9b93c47dd138fd84a503ffecb9336b", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/lowpan6__ble_8c.html b/Libraries/LwIP/doc/doxygen/output/html/lowpan6__ble_8c.html new file mode 100644 index 0000000..6ef651c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lowpan6__ble_8c.html @@ -0,0 +1,331 @@ + + + + + + + +lwIP: src/netif/lowpan6_ble.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  lowpan6_ble.c File Reference
                  +
                  +
                  +
                  #include "netif/lowpan6_ble.h"
                  +#include "lwip/ip.h"
                  +#include "lwip/pbuf.h"
                  +#include "lwip/ip_addr.h"
                  +#include "lwip/netif.h"
                  +#include "lwip/nd6.h"
                  +#include "lwip/mem.h"
                  +#include "lwip/udp.h"
                  +#include "lwip/tcpip.h"
                  +#include "lwip/snmp.h"
                  +#include <string.h>
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  void ble_addr_to_eui64 (uint8_t *dst, const uint8_t *src, int public_addr)
                   
                  void eui64_to_ble_addr (uint8_t *dst, const uint8_t *src)
                   
                  err_t rfc7668_set_local_addr_eui64 (struct netif *netif, const u8_t *local_addr, size_t local_addr_len)
                   
                  err_t rfc7668_set_local_addr_mac48 (struct netif *netif, const u8_t *local_addr, size_t local_addr_len, int is_public_addr)
                   
                  err_t rfc7668_set_peer_addr_eui64 (struct netif *netif, const u8_t *peer_addr, size_t peer_addr_len)
                   
                  err_t rfc7668_set_peer_addr_mac48 (struct netif *netif, const u8_t *peer_addr, size_t peer_addr_len, int is_public_addr)
                   
                  err_t rfc7668_set_context (u8_t idx, const ip6_addr_t *context)
                   
                  err_t rfc7668_output (struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr)
                   
                  err_t rfc7668_input (struct pbuf *p, struct netif *netif)
                   
                  err_t rfc7668_if_init (struct netif *netif)
                   
                  err_t tcpip_rfc7668_input (struct pbuf *p, struct netif *inp)
                   
                  +

                  Detailed Description

                  +

                  6LowPAN over BLE output for IPv6 (RFC7668).

                  +

                  Function Documentation

                  + +

                  ◆ rfc7668_set_local_addr_eui64()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t rfc7668_set_local_addr_eui64 (struct netifnetif,
                  const u8_t * local_addr,
                  size_t local_addr_len 
                  )
                  +
                  +

                  Set the local address used for stateful compression. This expects an address of 8 bytes.

                  + +
                  +
                  + +

                  ◆ rfc7668_set_local_addr_mac48()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t rfc7668_set_local_addr_mac48 (struct netifnetif,
                  const u8_t * local_addr,
                  size_t local_addr_len,
                  int is_public_addr 
                  )
                  +
                  +

                  Set the local address used for stateful compression. This expects an address of 6 bytes.

                  + +
                  +
                  + +

                  ◆ rfc7668_set_peer_addr_eui64()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t rfc7668_set_peer_addr_eui64 (struct netifnetif,
                  const u8_t * peer_addr,
                  size_t peer_addr_len 
                  )
                  +
                  +

                  Set the peer address used for stateful compression. This expects an address of 8 bytes.

                  + +
                  +
                  + +

                  ◆ rfc7668_set_peer_addr_mac48()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t rfc7668_set_peer_addr_mac48 (struct netifnetif,
                  const u8_t * peer_addr,
                  size_t peer_addr_len,
                  int is_public_addr 
                  )
                  +
                  +

                  Set the peer address used for stateful compression. This expects an address of 6 bytes.

                  + +
                  +
                  + +

                  ◆ tcpip_rfc7668_input()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  err_t tcpip_rfc7668_input (struct pbufp,
                  struct netifinp 
                  )
                  +
                  +

                  Pass a received packet to tcpip_thread for input processing

                  +
                  Parameters
                  + + + +
                  pthe received packet, p->payload pointing to the IEEE 802.15.4 header.
                  inpthe network interface on which the packet was received
                  +
                  +
                  +
                  Returns
                  see tcpip_inpkt, same return values
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/lowpan6__ble_8c.js b/Libraries/LwIP/doc/doxygen/output/html/lowpan6__ble_8c.js new file mode 100644 index 0000000..388eeb7 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lowpan6__ble_8c.js @@ -0,0 +1,14 @@ +var lowpan6__ble_8c = +[ + [ "ble_addr_to_eui64", "group__rfc7668if.html#gaa5b1823c2509b8816ef98dcac67e037c", null ], + [ "eui64_to_ble_addr", "group__rfc7668if.html#ga3e245a85f9edddca93ddd2967209881d", null ], + [ "rfc7668_if_init", "group__rfc7668if.html#ga3d940376bd983c14ffcc8d2580f3bdde", null ], + [ "rfc7668_input", "group__rfc7668if.html#ga1d9d7aff9f2f0515f761be0802178197", null ], + [ "rfc7668_output", "group__rfc7668if.html#ga22930ade4e77b3195fe59949834d85f0", null ], + [ "rfc7668_set_context", "group__rfc7668if.html#ga29dc0ebb8e640b64a57008b940fbca1e", null ], + [ "rfc7668_set_local_addr_eui64", "lowpan6__ble_8c.html#a9c5b721f6fb28b4c999baab56a65d8e2", null ], + [ "rfc7668_set_local_addr_mac48", "lowpan6__ble_8c.html#a53d4e8096dd714f94c69d67a6cd49ac2", null ], + [ "rfc7668_set_peer_addr_eui64", "lowpan6__ble_8c.html#a01b797f4fde59dfb803f0299e6a49593", null ], + [ "rfc7668_set_peer_addr_mac48", "lowpan6__ble_8c.html#a437b9f9e85be644bd7b939413e3c81d0", null ], + [ "tcpip_rfc7668_input", "lowpan6__ble_8c.html#a6ae90ad69f5d901eb44cf87b9120cd9a", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/lowpan6__ble_8h.html b/Libraries/LwIP/doc/doxygen/output/html/lowpan6__ble_8h.html new file mode 100644 index 0000000..619d401 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lowpan6__ble_8h.html @@ -0,0 +1,326 @@ + + + + + + + +lwIP: src/include/netif/lowpan6_ble.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  lowpan6_ble.h File Reference
                  +
                  +
                  +
                  #include "netif/lowpan6_opts.h"
                  +#include "netif/lowpan6_common.h"
                  +#include "lwip/pbuf.h"
                  +#include "lwip/ip.h"
                  +#include "lwip/ip_addr.h"
                  +#include "lwip/netif.h"
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  err_t rfc7668_output (struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr)
                   
                  err_t rfc7668_input (struct pbuf *p, struct netif *netif)
                   
                  err_t rfc7668_set_local_addr_eui64 (struct netif *netif, const u8_t *local_addr, size_t local_addr_len)
                   
                  err_t rfc7668_set_local_addr_mac48 (struct netif *netif, const u8_t *local_addr, size_t local_addr_len, int is_public_addr)
                   
                  err_t rfc7668_set_peer_addr_eui64 (struct netif *netif, const u8_t *peer_addr, size_t peer_addr_len)
                   
                  err_t rfc7668_set_peer_addr_mac48 (struct netif *netif, const u8_t *peer_addr, size_t peer_addr_len, int is_public_addr)
                   
                  err_t rfc7668_set_context (u8_t index, const ip6_addr_t *context)
                   
                  err_t rfc7668_if_init (struct netif *netif)
                   
                  err_t tcpip_rfc7668_input (struct pbuf *p, struct netif *inp)
                   
                  void ble_addr_to_eui64 (uint8_t *dst, const uint8_t *src, int public_addr)
                   
                  void eui64_to_ble_addr (uint8_t *dst, const uint8_t *src)
                   
                  +

                  Detailed Description

                  +

                  6LowPAN over BLE for IPv6 (RFC7668).

                  +

                  Function Documentation

                  + +

                  ◆ rfc7668_set_local_addr_eui64()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t rfc7668_set_local_addr_eui64 (struct netifnetif,
                  const u8_t * local_addr,
                  size_t local_addr_len 
                  )
                  +
                  +

                  Set the local address used for stateful compression. This expects an address of 8 bytes.

                  + +
                  +
                  + +

                  ◆ rfc7668_set_local_addr_mac48()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t rfc7668_set_local_addr_mac48 (struct netifnetif,
                  const u8_t * local_addr,
                  size_t local_addr_len,
                  int is_public_addr 
                  )
                  +
                  +

                  Set the local address used for stateful compression. This expects an address of 6 bytes.

                  + +
                  +
                  + +

                  ◆ rfc7668_set_peer_addr_eui64()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t rfc7668_set_peer_addr_eui64 (struct netifnetif,
                  const u8_t * peer_addr,
                  size_t peer_addr_len 
                  )
                  +
                  +

                  Set the peer address used for stateful compression. This expects an address of 8 bytes.

                  + +
                  +
                  + +

                  ◆ rfc7668_set_peer_addr_mac48()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t rfc7668_set_peer_addr_mac48 (struct netifnetif,
                  const u8_t * peer_addr,
                  size_t peer_addr_len,
                  int is_public_addr 
                  )
                  +
                  +

                  Set the peer address used for stateful compression. This expects an address of 6 bytes.

                  + +
                  +
                  + +

                  ◆ tcpip_rfc7668_input()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  err_t tcpip_rfc7668_input (struct pbufp,
                  struct netifinp 
                  )
                  +
                  +

                  Pass a received packet to tcpip_thread for input processing

                  +
                  Parameters
                  + + + +
                  pthe received packet, p->payload pointing to the IEEE 802.15.4 header.
                  inpthe network interface on which the packet was received
                  +
                  +
                  +
                  Returns
                  see tcpip_inpkt, same return values
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/lowpan6__ble_8h.js b/Libraries/LwIP/doc/doxygen/output/html/lowpan6__ble_8h.js new file mode 100644 index 0000000..93fa2ef --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lowpan6__ble_8h.js @@ -0,0 +1,14 @@ +var lowpan6__ble_8h = +[ + [ "ble_addr_to_eui64", "group__rfc7668if.html#gaa5b1823c2509b8816ef98dcac67e037c", null ], + [ "eui64_to_ble_addr", "group__rfc7668if.html#ga3e245a85f9edddca93ddd2967209881d", null ], + [ "rfc7668_if_init", "group__rfc7668if.html#ga3d940376bd983c14ffcc8d2580f3bdde", null ], + [ "rfc7668_input", "group__rfc7668if.html#ga1d9d7aff9f2f0515f761be0802178197", null ], + [ "rfc7668_output", "group__rfc7668if.html#ga22930ade4e77b3195fe59949834d85f0", null ], + [ "rfc7668_set_context", "group__rfc7668if.html#ga29dc0ebb8e640b64a57008b940fbca1e", null ], + [ "rfc7668_set_local_addr_eui64", "lowpan6__ble_8h.html#a9c5b721f6fb28b4c999baab56a65d8e2", null ], + [ "rfc7668_set_local_addr_mac48", "lowpan6__ble_8h.html#a53d4e8096dd714f94c69d67a6cd49ac2", null ], + [ "rfc7668_set_peer_addr_eui64", "lowpan6__ble_8h.html#a01b797f4fde59dfb803f0299e6a49593", null ], + [ "rfc7668_set_peer_addr_mac48", "lowpan6__ble_8h.html#a437b9f9e85be644bd7b939413e3c81d0", null ], + [ "tcpip_rfc7668_input", "lowpan6__ble_8h.html#a6ae90ad69f5d901eb44cf87b9120cd9a", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/lowpan6__common_8c.html b/Libraries/LwIP/doc/doxygen/output/html/lowpan6__common_8c.html new file mode 100644 index 0000000..29fe9fa --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lowpan6__common_8c.html @@ -0,0 +1,110 @@ + + + + + + + +lwIP: src/netif/lowpan6_common.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  lowpan6_common.c File Reference
                  +
                  +
                  +
                  #include "netif/lowpan6_common.h"
                  +#include "lwip/ip.h"
                  +#include "lwip/pbuf.h"
                  +#include "lwip/ip_addr.h"
                  +#include "lwip/netif.h"
                  +#include "lwip/udp.h"
                  +#include <string.h>
                  +

                  Detailed Description

                  +

                  Common 6LowPAN routines for IPv6. Uses ND tables for link-layer addressing. Fragments packets to 6LowPAN units.

                  +

                  This implementation aims to conform to IEEE 802.15.4(-2015), RFC 4944 and RFC 6282.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/lowpan6__common_8h.html b/Libraries/LwIP/doc/doxygen/output/html/lowpan6__common_8h.html new file mode 100644 index 0000000..8f06ef4 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lowpan6__common_8h.html @@ -0,0 +1,115 @@ + + + + + + + +lwIP: src/include/netif/lowpan6_common.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  lowpan6_common.h File Reference
                  +
                  +
                  +
                  #include "netif/lowpan6_opts.h"
                  +#include "lwip/pbuf.h"
                  +#include "lwip/ip.h"
                  +#include "lwip/ip6_addr.h"
                  +#include "lwip/netif.h"
                  +
                  + + + +

                  +Data Structures

                  struct  lowpan6_link_addr
                   
                  +

                  Detailed Description

                  +

                  Common 6LowPAN routines for IPv6. Uses ND tables for link-layer addressing. Fragments packets to 6LowPAN units.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/lowpan6__common_8h.js b/Libraries/LwIP/doc/doxygen/output/html/lowpan6__common_8h.js new file mode 100644 index 0000000..d3e1b82 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lowpan6__common_8h.js @@ -0,0 +1,4 @@ +var lowpan6__common_8h = +[ + [ "lowpan6_link_addr", "structlowpan6__link__addr.html", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/lowpan6__opts_8h.html b/Libraries/LwIP/doc/doxygen/output/html/lowpan6__opts_8h.html new file mode 100644 index 0000000..ffe2902 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lowpan6__opts_8h.html @@ -0,0 +1,311 @@ + + + + + + + +lwIP: src/include/netif/lowpan6_opts.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  lowpan6_opts.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + +

                  +Macros

                  #define LWIP_6LOWPAN_NUM_CONTEXTS   10
                   
                  #define LWIP_6LOWPAN_INFER_SHORT_ADDRESS   1
                   
                  #define LWIP_6LOWPAN_IPHC   1
                   
                  #define LWIP_6LOWPAN_802154_HW_CRC   0
                   
                  #define LWIP_6LOWPAN_CALC_CRC(buf, len)   lowpan6_calc_crc(buf, len)
                   
                  #define LWIP_LOWPAN6_DEBUG   LWIP_DBG_OFF
                   
                  #define LWIP_LOWPAN6_802154_DEBUG   LWIP_DBG_OFF
                   
                  #define LWIP_LOWPAN6_IP_COMPRESSED_DEBUG   LWIP_DBG_OFF
                   
                  #define LWIP_LOWPAN6_DECOMPRESSION_DEBUG   LWIP_DBG_OFF
                   
                  #define LWIP_RFC7668_IP_UNCOMPRESSED_DEBUG   LWIP_DBG_OFF
                   
                  #define LWIP_RFC7668_LINUX_WORKAROUND_PUBLIC_ADDRESS   1
                   
                  +

                  Detailed Description

                  +

                  6LowPAN options list

                  +

                  Macro Definition Documentation

                  + +

                  ◆ LWIP_6LOWPAN_802154_HW_CRC

                  + +
                  +
                  + + + + +
                  #define LWIP_6LOWPAN_802154_HW_CRC   0
                  +
                  +

                  Set this to 1 if your IEEE 802.15.4 interface can calculate and check the CRC in hardware. This means TX packets get 2 zero bytes added on transmission which are to be filled with the CRC.

                  + +
                  +
                  + +

                  ◆ LWIP_6LOWPAN_CALC_CRC

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  #define LWIP_6LOWPAN_CALC_CRC( buf,
                   len 
                  )   lowpan6_calc_crc(buf, len)
                  +
                  +

                  If LWIP_6LOWPAN_802154_HW_CRC==0, this can override the default slow implementation of the CRC used for 6LoWPAN over IEEE 802.15.4 (which uses a shift register).

                  + +
                  +
                  + +

                  ◆ LWIP_6LOWPAN_INFER_SHORT_ADDRESS

                  + +
                  +
                  + + + + +
                  #define LWIP_6LOWPAN_INFER_SHORT_ADDRESS   1
                  +
                  +

                  LWIP_6LOWPAN_INFER_SHORT_ADDRESS: set this to 0 to disable creating short addresses for matching addresses (debug only)

                  + +
                  +
                  + +

                  ◆ LWIP_6LOWPAN_IPHC

                  + +
                  +
                  + + + + +
                  #define LWIP_6LOWPAN_IPHC   1
                  +
                  +

                  LWIP_6LOWPAN_IPHC: set this to 0 to disable IP header compression as per RFC 6282 (which is mandatory for BLE)

                  + +
                  +
                  + +

                  ◆ LWIP_6LOWPAN_NUM_CONTEXTS

                  + +
                  +
                  + + + + +
                  #define LWIP_6LOWPAN_NUM_CONTEXTS   10
                  +
                  +

                  LWIP_6LOWPAN_NUM_CONTEXTS: define the number of compression contexts per netif type

                  + +
                  +
                  + +

                  ◆ LWIP_LOWPAN6_802154_DEBUG

                  + +
                  +
                  + + + + +
                  #define LWIP_LOWPAN6_802154_DEBUG   LWIP_DBG_OFF
                  +
                  +

                  Debug level for 6LoWPAN over IEEE 802.15.4

                  + +
                  +
                  + +

                  ◆ LWIP_LOWPAN6_DEBUG

                  + +
                  +
                  + + + + +
                  #define LWIP_LOWPAN6_DEBUG   LWIP_DBG_OFF
                  +
                  +

                  Debug level for 6LoWPAN in general

                  + +
                  +
                  + +

                  ◆ LWIP_LOWPAN6_DECOMPRESSION_DEBUG

                  + +
                  +
                  + + + + +
                  #define LWIP_LOWPAN6_DECOMPRESSION_DEBUG   LWIP_DBG_OFF
                  +
                  +

                  LWIP_LOWPAN6_DECOMPRESSION_DEBUG: enable decompression debug output

                  + +
                  +
                  + +

                  ◆ LWIP_LOWPAN6_IP_COMPRESSED_DEBUG

                  + +
                  +
                  + + + + +
                  #define LWIP_LOWPAN6_IP_COMPRESSED_DEBUG   LWIP_DBG_OFF
                  +
                  +

                  LWIP_LOWPAN6_IP_COMPRESSED_DEBUG: enable compressed IP frame output debugging

                  + +
                  +
                  + +

                  ◆ LWIP_RFC7668_IP_UNCOMPRESSED_DEBUG

                  + +
                  +
                  + + + + +
                  #define LWIP_RFC7668_IP_UNCOMPRESSED_DEBUG   LWIP_DBG_OFF
                  +
                  +

                  LWIP_RFC7668_IP_UNCOMPRESSED_DEBUG: enable decompressed IP frame output debugging

                  + +
                  +
                  + +

                  ◆ LWIP_RFC7668_LINUX_WORKAROUND_PUBLIC_ADDRESS

                  + +
                  +
                  + + + + +
                  #define LWIP_RFC7668_LINUX_WORKAROUND_PUBLIC_ADDRESS   1
                  +
                  +

                  LWIP_RFC7668_LINUX_WORKAROUND_PUBLIC_ADDRESS: Currently, the linux kernel driver for 6lowpan sets/clears a bit in the address, depending on the BD address (either public or not). Might not be RFC7668 conform, so you may select to do that (=1) or not (=0)

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/lowpan6__opts_8h.js b/Libraries/LwIP/doc/doxygen/output/html/lowpan6__opts_8h.js new file mode 100644 index 0000000..4514c5a --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lowpan6__opts_8h.js @@ -0,0 +1,14 @@ +var lowpan6__opts_8h = +[ + [ "LWIP_6LOWPAN_802154_HW_CRC", "lowpan6__opts_8h.html#ae5bb9b8d695caec08930073edc7c6175", null ], + [ "LWIP_6LOWPAN_CALC_CRC", "lowpan6__opts_8h.html#ad20840e31a0a6eeec8666e4d4a979f43", null ], + [ "LWIP_6LOWPAN_INFER_SHORT_ADDRESS", "lowpan6__opts_8h.html#a6a542cd72a6270b7231b8b93f8041207", null ], + [ "LWIP_6LOWPAN_IPHC", "lowpan6__opts_8h.html#a0f178a86d02e0ba4168cafe3de5f3afa", null ], + [ "LWIP_6LOWPAN_NUM_CONTEXTS", "lowpan6__opts_8h.html#a4ffa89f39abf93cc599f78c5a8bb0a4a", null ], + [ "LWIP_LOWPAN6_802154_DEBUG", "lowpan6__opts_8h.html#acf9a44be56d5dca9e45f644571d66f58", null ], + [ "LWIP_LOWPAN6_DEBUG", "lowpan6__opts_8h.html#ae90ebb32999c6df5cc83705e133e1754", null ], + [ "LWIP_LOWPAN6_DECOMPRESSION_DEBUG", "lowpan6__opts_8h.html#a7f4db0bd3dbe36a19efbd24cd8b7fcf0", null ], + [ "LWIP_LOWPAN6_IP_COMPRESSED_DEBUG", "lowpan6__opts_8h.html#a231bc758484376dfd2ded6931c462df8", null ], + [ "LWIP_RFC7668_IP_UNCOMPRESSED_DEBUG", "lowpan6__opts_8h.html#a5b7a3e204d2edde5552ca3c8694419c1", null ], + [ "LWIP_RFC7668_LINUX_WORKAROUND_PUBLIC_ADDRESS", "lowpan6__opts_8h.html#af4a4d962af3439b111a8e72e5eeaccf8", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/lwip_2errno_8h.html b/Libraries/LwIP/doc/doxygen/output/html/lwip_2errno_8h.html new file mode 100644 index 0000000..f081905 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lwip_2errno_8h.html @@ -0,0 +1,103 @@ + + + + + + + +lwIP: src/include/lwip/errno.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  errno.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +

                  Detailed Description

                  +

                  Posix Errno defines

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/lwip_2etharp_8h.html b/Libraries/LwIP/doc/doxygen/output/html/lwip_2etharp_8h.html new file mode 100644 index 0000000..4f1b50c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lwip_2etharp_8h.html @@ -0,0 +1,508 @@ + + + + + + + +lwIP: src/include/lwip/etharp.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  etharp.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/pbuf.h"
                  +#include "lwip/ip4_addr.h"
                  +#include "lwip/netif.h"
                  +#include "lwip/ip4.h"
                  +#include "lwip/prot/ethernet.h"
                  +#include "lwip/prot/etharp.h"
                  +
                  + + + +

                  +Data Structures

                  struct  etharp_q_entry
                   
                  + + + + + +

                  +Macros

                  #define ARP_TMR_INTERVAL   1000
                   
                  #define etharp_gratuitous(netif)   etharp_request((netif), netif_ip4_addr(netif))
                   
                  + + + + + + + + + + + + + + + + + +

                  +Functions

                  void etharp_tmr (void)
                   
                  ssize_t etharp_find_addr (struct netif *netif, const ip4_addr_t *ipaddr, struct eth_addr **eth_ret, const ip4_addr_t **ip_ret)
                   
                  int etharp_get_entry (size_t i, ip4_addr_t **ipaddr, struct netif **netif, struct eth_addr **eth_ret)
                   
                  err_t etharp_output (struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr)
                   
                  err_t etharp_query (struct netif *netif, const ip4_addr_t *ipaddr, struct pbuf *q)
                   
                  err_t etharp_request (struct netif *netif, const ip4_addr_t *ipaddr)
                   
                  void etharp_cleanup_netif (struct netif *netif)
                   
                  void etharp_input (struct pbuf *p, struct netif *netif)
                   
                  +

                  Detailed Description

                  +

                  Ethernet output function - handles OUTGOING ethernet level traffic, implements ARP resolving. To be used in most low-level netif implementations

                  +

                  Macro Definition Documentation

                  + +

                  ◆ ARP_TMR_INTERVAL

                  + +
                  +
                  + + + + +
                  #define ARP_TMR_INTERVAL   1000
                  +
                  +

                  1 seconds period

                  + +
                  +
                  + +

                  ◆ etharp_gratuitous

                  + +
                  +
                  + + + + + + + + +
                  #define etharp_gratuitous( netif)   etharp_request((netif), netif_ip4_addr(netif))
                  +
                  +

                  For Ethernet network interfaces, we might want to send "gratuitous ARP"; this is an ARP packet sent by a node in order to spontaneously cause other nodes to update an entry in their ARP cache. From RFC 3220 "IP Mobility Support for IPv4" section 4.6.

                  + +
                  +
                  +

                  Function Documentation

                  + +

                  ◆ etharp_cleanup_netif()

                  + +
                  +
                  + + + + + + + + +
                  void etharp_cleanup_netif (struct netifnetif)
                  +
                  +

                  Remove all ARP table entries of the specified netif.

                  +
                  Parameters
                  + + +
                  netifpoints to a network interface
                  +
                  +
                  + +
                  +
                  + +

                  ◆ etharp_find_addr()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  ssize_t etharp_find_addr (struct netifnetif,
                  const ip4_addr_tipaddr,
                  struct eth_addr ** eth_ret,
                  const ip4_addr_t ** ip_ret 
                  )
                  +
                  +

                  Finds (stable) ethernet/IP address pair from ARP table using interface and IP address index.

                  Note
                  the addresses in the ARP table are in network order!
                  +
                  Parameters
                  + + + + + +
                  netifpoints to interface index
                  ipaddrpoints to the (network order) IP address index
                  eth_retpoints to return pointer
                  ip_retpoints to return pointer
                  +
                  +
                  +
                  Returns
                  table index if found, -1 otherwise
                  + +
                  +
                  + +

                  ◆ etharp_get_entry()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  int etharp_get_entry (size_t i,
                  ip4_addr_t ** ipaddr,
                  struct netif ** netif,
                  struct eth_addr ** eth_ret 
                  )
                  +
                  +

                  Possibility to iterate over stable ARP table entries

                  +
                  Parameters
                  + + + + + +
                  ientry number, 0 to ARP_TABLE_SIZE
                  ipaddrreturn value: IP address
                  netifreturn value: points to interface
                  eth_retreturn value: ETH address
                  +
                  +
                  +
                  Returns
                  1 on valid index, 0 otherwise
                  + +
                  +
                  + +

                  ◆ etharp_input()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void etharp_input (struct pbufp,
                  struct netifnetif 
                  )
                  +
                  +

                  Responds to ARP requests to us. Upon ARP replies to us, add entry to cache send out queued IP packets. Updates cache with snooped address pairs.

                  +

                  Should be called for incoming ARP packets. The pbuf in the argument is freed by this function.

                  +
                  Parameters
                  + + + +
                  pThe ARP packet that arrived on netif. Is freed by this function.
                  netifThe lwIP network interface on which the ARP packet pbuf arrived.
                  +
                  +
                  +
                  See also
                  pbuf_free()
                  + +
                  +
                  + +

                  ◆ etharp_output()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t etharp_output (struct netifnetif,
                  struct pbufq,
                  const ip4_addr_tipaddr 
                  )
                  +
                  +

                  Resolve and fill-in Ethernet address header for outgoing IP packet.

                  +

                  For IP multicast and broadcast, corresponding Ethernet addresses are selected and the packet is transmitted on the link.

                  +

                  For unicast addresses, the packet is submitted to etharp_query(). In case the IP address is outside the local network, the IP address of the gateway is used.

                  +
                  Parameters
                  + + + + +
                  netifThe lwIP network interface which the IP packet will be sent on.
                  qThe pbuf(s) containing the IP packet to be sent.
                  ipaddrThe IP address of the packet destination.
                  +
                  +
                  +
                  Returns
                  +
                  + +
                  +
                  + +

                  ◆ etharp_query()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t etharp_query (struct netifnetif,
                  const ip4_addr_tipaddr,
                  struct pbufq 
                  )
                  +
                  +

                  Send an ARP request for the given IP address and/or queue a packet.

                  +

                  If the IP address was not yet in the cache, a pending ARP cache entry is added and an ARP request is sent for the given address. The packet is queued on this entry.

                  +

                  If the IP address was already pending in the cache, a new ARP request is sent for the given address. The packet is queued on this entry.

                  +

                  If the IP address was already stable in the cache, and a packet is given, it is directly sent and no ARP request is sent out.

                  +

                  If the IP address was already stable in the cache, and no packet is given, an ARP request is sent out.

                  +
                  Parameters
                  + + + + +
                  netifThe lwIP network interface on which ipaddr must be queried for.
                  ipaddrThe IP address to be resolved.
                  qIf non-NULL, a pbuf that must be delivered to the IP address. q is not freed by this function.
                  +
                  +
                  +
                  Note
                  q must only be ONE packet, not a packet queue!
                  +
                  Returns
                    +
                  • ERR_BUF Could not make room for Ethernet header.
                  • +
                  • ERR_MEM Hardware address unknown, and no more ARP entries available to query for address or queue the packet.
                  • +
                  • ERR_MEM Could not queue packet due to memory shortage.
                  • +
                  • ERR_RTE No route to destination (no gateway to external networks).
                  • +
                  • ERR_ARG Non-unicast address given, those will not appear in ARP cache.
                  • +
                  +
                  + +
                  +
                  + +

                  ◆ etharp_request()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  err_t etharp_request (struct netifnetif,
                  const ip4_addr_tipaddr 
                  )
                  +
                  +

                  Send an ARP request packet asking for ipaddr.

                  +
                  Parameters
                  + + + +
                  netifthe lwip network interface on which to send the request
                  ipaddrthe IP address for which to ask
                  +
                  +
                  +
                  Returns
                  ERR_OK if the request has been sent ERR_MEM if the ARP packet couldn't be allocated any other err_t on failure
                  + +
                  +
                  + +

                  ◆ etharp_tmr()

                  + +
                  +
                  + + + + + + + + +
                  void etharp_tmr (void )
                  +
                  +

                  Clears expired entries in the ARP table.

                  +

                  This function should be called every ARP_TMR_INTERVAL milliseconds (1 second), in order to expire entries in the ARP table.

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/lwip_2etharp_8h.js b/Libraries/LwIP/doc/doxygen/output/html/lwip_2etharp_8h.js new file mode 100644 index 0000000..bdd938a --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lwip_2etharp_8h.js @@ -0,0 +1,14 @@ +var lwip_2etharp_8h = +[ + [ "etharp_q_entry", "structetharp__q__entry.html", null ], + [ "ARP_TMR_INTERVAL", "lwip_2etharp_8h.html#aaa3d8ed1eb1129f518345e37b38cfc37", null ], + [ "etharp_gratuitous", "lwip_2etharp_8h.html#a83947dea159baf3420922084072e631e", null ], + [ "etharp_cleanup_netif", "lwip_2etharp_8h.html#ae94677a2a5f3698276027c7475f6ca05", null ], + [ "etharp_find_addr", "lwip_2etharp_8h.html#a0f8ca87c5472fa165763c8c38b76174c", null ], + [ "etharp_get_entry", "lwip_2etharp_8h.html#ab93df7ccb26496100d45137541e863c8", null ], + [ "etharp_input", "lwip_2etharp_8h.html#a540a5506979693ef9ac4496db9bfa7d6", null ], + [ "etharp_output", "lwip_2etharp_8h.html#a19258c75a3778b6ed0c82f63a419502d", null ], + [ "etharp_query", "lwip_2etharp_8h.html#ae180772e31346a0afeb707ad172dd19c", null ], + [ "etharp_request", "lwip_2etharp_8h.html#a3e56faced96841e615f88dd57d1b2b15", null ], + [ "etharp_tmr", "lwip_2etharp_8h.html#a654f4dad71f7e2bc4820094648f37a26", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/lwip_2inet_8h.html b/Libraries/LwIP/doc/doxygen/output/html/lwip_2inet_8h.html new file mode 100644 index 0000000..8bc3b02 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lwip_2inet_8h.html @@ -0,0 +1,240 @@ + + + + + + + +lwIP: src/include/lwip/inet.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  inet.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/def.h"
                  +#include "lwip/ip_addr.h"
                  +#include "lwip/ip6_addr.h"
                  +
                  + + + + + + + + + + + + + +

                  +Macros

                  #define INADDR_NONE   IPADDR_NONE
                   
                  #define INADDR_LOOPBACK   IPADDR_LOOPBACK
                   
                  #define INADDR_ANY   IPADDR_ANY
                   
                  #define INADDR_BROADCAST   IPADDR_BROADCAST
                   
                  #define IN6ADDR_ANY_INIT   {{{0,0,0,0}}}
                   
                  #define IN6ADDR_LOOPBACK_INIT   {{{0,0,0,PP_HTONL(1)}}}
                   
                  + + + +

                  +Variables

                  const struct in6_addr in6addr_any
                   
                  +

                  Detailed Description

                  +

                  This file (together with sockets.h) aims to provide structs and functions from

                  +

                  Macro Definition Documentation

                  + +

                  ◆ IN6ADDR_ANY_INIT

                  + +
                  +
                  + + + + +
                  #define IN6ADDR_ANY_INIT   {{{0,0,0,0}}}
                  +
                  +

                  This macro can be used to initialize a variable of type struct in6_addr to the IPv6 wildcard address.

                  + +
                  +
                  + +

                  ◆ IN6ADDR_LOOPBACK_INIT

                  + +
                  +
                  + + + + +
                  #define IN6ADDR_LOOPBACK_INIT   {{{0,0,0,PP_HTONL(1)}}}
                  +
                  +

                  This macro can be used to initialize a variable of type struct in6_addr to the IPv6 loopback address.

                  + +
                  +
                  + +

                  ◆ INADDR_ANY

                  + +
                  +
                  + + + + +
                  #define INADDR_ANY   IPADDR_ANY
                  +
                  +

                  0.0.0.0

                  + +
                  +
                  + +

                  ◆ INADDR_BROADCAST

                  + +
                  +
                  + + + + +
                  #define INADDR_BROADCAST   IPADDR_BROADCAST
                  +
                  +

                  255.255.255.255

                  + +
                  +
                  + +

                  ◆ INADDR_LOOPBACK

                  + +
                  +
                  + + + + +
                  #define INADDR_LOOPBACK   IPADDR_LOOPBACK
                  +
                  +

                  127.0.0.1

                  + +
                  +
                  + +

                  ◆ INADDR_NONE

                  + +
                  +
                  + + + + +
                  #define INADDR_NONE   IPADDR_NONE
                  +
                  +

                  255.255.255.255

                  + +
                  +
                  +

                  Variable Documentation

                  + +

                  ◆ in6addr_any

                  + +
                  +
                  + + + + +
                  const struct in6_addr in6addr_any
                  +
                  +

                  This variable is initialized by the system to contain the wildcard IPv6 address.

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/lwip_2inet_8h.js b/Libraries/LwIP/doc/doxygen/output/html/lwip_2inet_8h.js new file mode 100644 index 0000000..f49cd10 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lwip_2inet_8h.js @@ -0,0 +1,10 @@ +var lwip_2inet_8h = +[ + [ "IN6ADDR_ANY_INIT", "lwip_2inet_8h.html#a1de876a356ee05a2e9427b741f99f49c", null ], + [ "IN6ADDR_LOOPBACK_INIT", "lwip_2inet_8h.html#a5562c81af19ee5988ddc5a5c6153cf37", null ], + [ "INADDR_ANY", "lwip_2inet_8h.html#a5d1940045dc2e7de552f3d4ff13a74ab", null ], + [ "INADDR_BROADCAST", "lwip_2inet_8h.html#a4a725f61ded23ce8a7dff8e82ed51986", null ], + [ "INADDR_LOOPBACK", "lwip_2inet_8h.html#ae1ac25d7797666cff6d01d6c795c2378", null ], + [ "INADDR_NONE", "lwip_2inet_8h.html#a3d2472d6cf31b73eeb829110dd0fffea", null ], + [ "in6addr_any", "lwip_2inet_8h.html#af8c97553060738d9edd6bfeab13ef7c3", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/lwip_2netdb_8h.html b/Libraries/LwIP/doc/doxygen/output/html/lwip_2netdb_8h.html new file mode 100644 index 0000000..e1d463a --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lwip_2netdb_8h.html @@ -0,0 +1,341 @@ + + + + + + + +lwIP: src/include/lwip/netdb.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  netdb.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/arch.h"
                  +#include "lwip/inet.h"
                  +#include "lwip/sockets.h"
                  +
                  + + + + + + + + + + + +

                  +Macros

                  #define EAI_NONAME   200
                   
                  #define gethostbyname(name)   lwip_gethostbyname(name)
                   
                  #define gethostbyname_r(name, ret, buf, buflen, result, h_errnop)   lwip_gethostbyname_r(name, ret, buf, buflen, result, h_errnop)
                   
                  #define freeaddrinfo(addrinfo)   lwip_freeaddrinfo(addrinfo)
                   
                  #define getaddrinfo(nodname, servname, hints, res)   lwip_getaddrinfo(nodname, servname, hints, res)
                   
                  + + + + + + + + + +

                  +Functions

                  struct hostent * lwip_gethostbyname (const char *name)
                   
                  int lwip_gethostbyname_r (const char *name, struct hostent *ret, char *buf, size_t buflen, struct hostent **result, int *h_errnop)
                   
                  void lwip_freeaddrinfo (struct addrinfo *ai)
                   
                  int lwip_getaddrinfo (const char *nodename, const char *servname, const struct addrinfo *hints, struct addrinfo **res)
                   
                  + + + +

                  +Variables

                  int h_errno
                   
                  +

                  Detailed Description

                  +

                  NETDB API (sockets)

                  +

                  Macro Definition Documentation

                  + +

                  ◆ EAI_NONAME

                  + +
                  +
                  + + + + +
                  #define EAI_NONAME   200
                  +
                  +

                  Errors used by the DNS API functions, h_errno can be one of them

                  + +
                  +
                  +

                  Function Documentation

                  + +

                  ◆ lwip_freeaddrinfo()

                  + +
                  +
                  + + + + + + + + +
                  void lwip_freeaddrinfo (struct addrinfo * ai)
                  +
                  +

                  Frees one or more addrinfo structures returned by getaddrinfo(), along with any additional storage associated with those structures. If the ai_next field of the structure is not null, the entire list of structures is freed.

                  +
                  Parameters
                  + + +
                  aistruct addrinfo to free
                  +
                  +
                  + +
                  +
                  + +

                  ◆ lwip_getaddrinfo()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  int lwip_getaddrinfo (const char * nodename,
                  const char * servname,
                  const struct addrinfo * hints,
                  struct addrinfo ** res 
                  )
                  +
                  +

                  Translates the name of a service location (for example, a host name) and/or a service name and returns a set of socket addresses and associated information to be used in creating a socket with which to address the specified service. Memory for the result is allocated internally and must be freed by calling lwip_freeaddrinfo()!

                  +

                  Due to a limitation in dns_gethostbyname, only the first address of a host is returned. Also, service names are not supported (only port numbers)!

                  +
                  Parameters
                  + + + + + +
                  nodenamedescriptive name or address string of the host (may be NULL -> local address)
                  servnameport number as string of NULL
                  hintsstructure containing input values that set socktype and protocol
                  respointer to a pointer where to store the result (set to NULL on failure)
                  +
                  +
                  +
                  Returns
                  0 on success, non-zero on failure
                  + +
                  +
                  + +

                  ◆ lwip_gethostbyname()

                  + +
                  +
                  + + + + + + + + +
                  struct hostent* lwip_gethostbyname (const char * name)
                  +
                  +

                  Returns an entry containing addresses of address family AF_INET for the host with name name. Due to dns_gethostbyname limitations, only one address is returned.

                  +
                  Parameters
                  + + +
                  namethe hostname to resolve
                  +
                  +
                  +
                  Returns
                  an entry containing addresses of address family AF_INET for the host with name name
                  + +
                  +
                  + +

                  ◆ lwip_gethostbyname_r()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  int lwip_gethostbyname_r (const char * name,
                  struct hostent * ret,
                  char * buf,
                  size_t buflen,
                  struct hostent ** result,
                  int * h_errnop 
                  )
                  +
                  +

                  Thread-safe variant of lwip_gethostbyname: instead of using a static buffer, this function takes buffer and errno pointers as arguments and uses these for the result.

                  +
                  Parameters
                  + + + + + + + +
                  namethe hostname to resolve
                  retpre-allocated struct where to store the result
                  bufpre-allocated buffer where to store additional data
                  buflenthe size of buf
                  resultpointer to a hostent pointer that is set to ret on success and set to zero on error
                  h_errnoppointer to an int where to store errors (instead of modifying the global h_errno)
                  +
                  +
                  +
                  Returns
                  0 on success, non-zero on error, additional error information is stored in *h_errnop instead of h_errno to be thread-safe
                  + +
                  +
                  +

                  Variable Documentation

                  + +

                  ◆ h_errno

                  + +
                  +
                  + + + + +
                  int h_errno
                  +
                  +

                  h_errno is exported in netdb.h for access by applications.

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/lwip_2netdb_8h.js b/Libraries/LwIP/doc/doxygen/output/html/lwip_2netdb_8h.js new file mode 100644 index 0000000..53a96af --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lwip_2netdb_8h.js @@ -0,0 +1,13 @@ +var lwip_2netdb_8h = +[ + [ "EAI_NONAME", "lwip_2netdb_8h.html#a0bb00f48d6ba1e8c55b7d85c8e3a19a7", null ], + [ "freeaddrinfo", "group__netdbapi.html#gab28cd3049bcf6e2bc3a71e968a64a92d", null ], + [ "getaddrinfo", "group__netdbapi.html#ga558191530d91c101621b49e43bd5bbf5", null ], + [ "gethostbyname", "group__netdbapi.html#ga39746b4b096060ca3e8c6ee7a7560b1d", null ], + [ "gethostbyname_r", "group__netdbapi.html#ga76204a4d646dba393f88aa9b0980fc07", null ], + [ "lwip_freeaddrinfo", "lwip_2netdb_8h.html#a7f65ff5982a0743849a644ef2cd15ef5", null ], + [ "lwip_getaddrinfo", "lwip_2netdb_8h.html#af356989c172a51187e22b557f22d4165", null ], + [ "lwip_gethostbyname", "lwip_2netdb_8h.html#a8adc6d35c068a073369edde71c678cbc", null ], + [ "lwip_gethostbyname_r", "lwip_2netdb_8h.html#afa229e90916f6c8d6308828f45351d2d", null ], + [ "h_errno", "lwip_2netdb_8h.html#a2a1ce3f2040007303d36c0b682b5ac10", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/lwip_2prot_2etharp_8h.html b/Libraries/LwIP/doc/doxygen/output/html/lwip_2prot_2etharp_8h.html new file mode 100644 index 0000000..a477cf5 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lwip_2prot_2etharp_8h.html @@ -0,0 +1,183 @@ + + + + + + + +lwIP: src/include/lwip/prot/etharp.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  etharp.h File Reference
                  +
                  +
                  +
                  #include "lwip/arch.h"
                  +#include "lwip/prot/ethernet.h"
                  +#include "arch/bpstruct.h"
                  +#include "arch/epstruct.h"
                  +
                  + + + + + +

                  +Data Structures

                  struct  ip4_addr_wordaligned
                   
                  struct  etharp_hdr
                   
                  + + + + + +

                  +Macros

                  #define IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T(dest, src)   SMEMCPY(dest, src, sizeof(ip4_addr_t))
                   
                  #define IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T(dest, src)   SMEMCPY(dest, src, sizeof(ip4_addr_t))
                   
                  +

                  Detailed Description

                  +

                  ARP protocol definitions

                  +

                  Macro Definition Documentation

                  + +

                  ◆ IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  #define IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T( dest,
                   src 
                  )   SMEMCPY(dest, src, sizeof(ip4_addr_t))
                  +
                  +

                  MEMCPY-like copying of IP addresses where addresses are known to be 16-bit-aligned if the port is correctly configured (so a port could define this to copying 2 u16_t's) - no NULL-pointer-checking needed.

                  + +
                  +
                  + +

                  ◆ IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  #define IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T( dest,
                   src 
                  )   SMEMCPY(dest, src, sizeof(ip4_addr_t))
                  +
                  +

                  MEMCPY-like copying of IP addresses where addresses are known to be 16-bit-aligned if the port is correctly configured (so a port could define this to copying 2 u16_t's) - no NULL-pointer-checking needed.

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/lwip_2prot_2etharp_8h.js b/Libraries/LwIP/doc/doxygen/output/html/lwip_2prot_2etharp_8h.js new file mode 100644 index 0000000..a70af41 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lwip_2prot_2etharp_8h.js @@ -0,0 +1,7 @@ +var lwip_2prot_2etharp_8h = +[ + [ "ip4_addr_wordaligned", "structip4__addr__wordaligned.html", null ], + [ "etharp_hdr", "structetharp__hdr.html", null ], + [ "IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T", "lwip_2prot_2etharp_8h.html#a7dff02ff186f844b731cecbe614b7419", null ], + [ "IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T", "lwip_2prot_2etharp_8h.html#a94f1c2a6ad7cecdfe759c0490ba7f030", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/lwip_2prot_2ethernet_8h.html b/Libraries/LwIP/doc/doxygen/output/html/lwip_2prot_2ethernet_8h.html new file mode 100644 index 0000000..ee862b4 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lwip_2prot_2ethernet_8h.html @@ -0,0 +1,212 @@ + + + + + + + +lwIP: src/include/lwip/prot/ethernet.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  ethernet.h File Reference
                  +
                  +
                  +
                  #include "lwip/arch.h"
                  +#include "lwip/prot/ieee.h"
                  +#include "arch/bpstruct.h"
                  +#include "arch/epstruct.h"
                  +
                  + + + + + + + +

                  +Data Structures

                  struct  eth_addr
                   
                  struct  eth_hdr
                   
                  struct  eth_vlan_hdr
                   
                  + + + + + + + +

                  +Macros

                  #define ETH_ADDR(b0, b1, b2, b3, b4, b5)   {{b0, b1, b2, b3, b4, b5}}
                   
                  #define LL_IP4_MULTICAST_ADDR_0   0x01
                   
                  #define LL_IP6_MULTICAST_ADDR_0   0x33
                   
                  +

                  Detailed Description

                  +

                  Ethernet protocol definitions

                  +

                  Macro Definition Documentation

                  + +

                  ◆ ETH_ADDR

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  #define ETH_ADDR( b0,
                   b1,
                   b2,
                   b3,
                   b4,
                   b5 
                  )   {{b0, b1, b2, b3, b4, b5}}
                  +
                  +

                  Initialize a struct eth_addr with its 6 bytes (takes care of correct braces)

                  + +
                  +
                  + +

                  ◆ LL_IP4_MULTICAST_ADDR_0

                  + +
                  +
                  + + + + +
                  #define LL_IP4_MULTICAST_ADDR_0   0x01
                  +
                  +

                  The 24-bit IANA IPv4-multicast OUI is 01-00-5e:

                  + +
                  +
                  + +

                  ◆ LL_IP6_MULTICAST_ADDR_0

                  + +
                  +
                  + + + + +
                  #define LL_IP6_MULTICAST_ADDR_0   0x33
                  +
                  +

                  IPv6 multicast uses this prefix

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/lwip_2prot_2ethernet_8h.js b/Libraries/LwIP/doc/doxygen/output/html/lwip_2prot_2ethernet_8h.js new file mode 100644 index 0000000..5df242d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lwip_2prot_2ethernet_8h.js @@ -0,0 +1,9 @@ +var lwip_2prot_2ethernet_8h = +[ + [ "eth_addr", "structeth__addr.html", null ], + [ "eth_hdr", "structeth__hdr.html", null ], + [ "eth_vlan_hdr", "structeth__vlan__hdr.html", null ], + [ "ETH_ADDR", "lwip_2prot_2ethernet_8h.html#a19c72ce98569e0fb55948a7587d704ee", null ], + [ "LL_IP4_MULTICAST_ADDR_0", "lwip_2prot_2ethernet_8h.html#afaf6cbccf9477c3505660e3a17860e07", null ], + [ "LL_IP6_MULTICAST_ADDR_0", "lwip_2prot_2ethernet_8h.html#a8ebe93c6ad2d743e6c952539257679b6", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/lwiperf_8c.html b/Libraries/LwIP/doc/doxygen/output/html/lwiperf_8c.html new file mode 100644 index 0000000..d54d3d8 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lwiperf_8c.html @@ -0,0 +1,225 @@ + + + + + + + +lwIP: src/apps/lwiperf/lwiperf.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  lwiperf.c File Reference
                  +
                  +
                  +
                  #include "lwip/apps/lwiperf.h"
                  +#include "lwip/tcp.h"
                  +#include "lwip/sys.h"
                  +#include <string.h>
                  +
                  + + + + + +

                  +Data Structures

                  struct  _lwiperf_settings
                   
                  struct  _lwiperf_state_tcp
                   
                  + + + + + + + +

                  +Macros

                  #define LWIPERF_TCP_MAX_IDLE_SEC   10U
                   
                  #define LWIPERF_SERVER_IP_TYPE   IPADDR_TYPE_ANY
                   
                  #define LWIPERF_CHECK_RX_DATA   0
                   
                  + + + + + +

                  +Typedefs

                  typedef struct _lwiperf_settings lwiperf_settings_t
                   
                  typedef struct _lwiperf_state_tcp lwiperf_state_tcp_t
                   
                  + + + + + + + + + + + +

                  +Functions

                  void * lwiperf_start_tcp_server_default (lwiperf_report_fn report_fn, void *report_arg)
                   
                  void * lwiperf_start_tcp_server (const ip_addr_t *local_addr, u16_t local_port, lwiperf_report_fn report_fn, void *report_arg)
                   
                  void * lwiperf_start_tcp_client_default (const ip_addr_t *remote_addr, lwiperf_report_fn report_fn, void *report_arg)
                   
                  void * lwiperf_start_tcp_client (const ip_addr_t *remote_addr, u16_t remote_port, enum lwiperf_client_type type, lwiperf_report_fn report_fn, void *report_arg)
                   
                  void lwiperf_abort (void *lwiperf_session)
                   
                  +

                  Detailed Description

                  +

                  lwIP iPerf server implementation

                  +

                  Macro Definition Documentation

                  + +

                  ◆ LWIPERF_CHECK_RX_DATA

                  + +
                  +
                  + + + + +
                  #define LWIPERF_CHECK_RX_DATA   0
                  +
                  +

                  If this is 1, check that received data has the correct format

                  + +
                  +
                  + +

                  ◆ LWIPERF_SERVER_IP_TYPE

                  + +
                  +
                  + + + + +
                  #define LWIPERF_SERVER_IP_TYPE   IPADDR_TYPE_ANY
                  +
                  +

                  Change this if you don't want to lwiperf to listen to any IP version

                  + +
                  +
                  + +

                  ◆ LWIPERF_TCP_MAX_IDLE_SEC

                  + +
                  +
                  + + + + +
                  #define LWIPERF_TCP_MAX_IDLE_SEC   10U
                  +
                  +

                  Specify the idle timeout (in seconds) after that the test fails

                  + +
                  +
                  +

                  Typedef Documentation

                  + +

                  ◆ lwiperf_settings_t

                  + +
                  +
                  + + + + +
                  typedef struct _lwiperf_settings lwiperf_settings_t
                  +
                  +

                  This is the Iperf settings struct sent from the client

                  + +
                  +
                  + +

                  ◆ lwiperf_state_tcp_t

                  + +
                  +
                  + + + + +
                  typedef struct _lwiperf_state_tcp lwiperf_state_tcp_t
                  +
                  +

                  Connection handle for a TCP iperf session

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/lwiperf_8c.js b/Libraries/LwIP/doc/doxygen/output/html/lwiperf_8c.js new file mode 100644 index 0000000..24c805f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lwiperf_8c.js @@ -0,0 +1,15 @@ +var lwiperf_8c = +[ + [ "_lwiperf_settings", "struct__lwiperf__settings.html", null ], + [ "_lwiperf_state_tcp", "struct__lwiperf__state__tcp.html", null ], + [ "LWIPERF_CHECK_RX_DATA", "lwiperf_8c.html#af51dcfc53fe575411c26e18963f1b902", null ], + [ "LWIPERF_SERVER_IP_TYPE", "lwiperf_8c.html#a1351e47d0bdb7d0fe0efaf9f1b2b0f7a", null ], + [ "LWIPERF_TCP_MAX_IDLE_SEC", "lwiperf_8c.html#a646d7e0b37c5cefdd6eef38a3fba4673", null ], + [ "lwiperf_settings_t", "lwiperf_8c.html#a4a794a0c1a90b889d54b1dacbce923f4", null ], + [ "lwiperf_state_tcp_t", "lwiperf_8c.html#a06db7abdf1d4864ca2b367d9c89e3e2d", null ], + [ "lwiperf_abort", "group__iperf.html#gac51c9c44a38bfa1140bd44b793a0a004", null ], + [ "lwiperf_start_tcp_client", "group__iperf.html#gad8317f52289d8bb12a14627cd177a565", null ], + [ "lwiperf_start_tcp_client_default", "group__iperf.html#ga85a487cf8ecbd0999382c9bff375d0da", null ], + [ "lwiperf_start_tcp_server", "group__iperf.html#gad97bf77057e7f96d6d8def812deea202", null ], + [ "lwiperf_start_tcp_server_default", "group__iperf.html#gae1f30a02b86c4dd3d47810cd493baf26", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/lwiperf_8h.html b/Libraries/LwIP/doc/doxygen/output/html/lwiperf_8h.html new file mode 100644 index 0000000..be55c55 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lwiperf_8h.html @@ -0,0 +1,220 @@ + + + + + + + +lwIP: src/include/lwip/apps/lwiperf.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  lwiperf.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/ip_addr.h"
                  +
                  + + + +

                  +Typedefs

                  typedef void(* lwiperf_report_fn) (void *arg, enum lwiperf_report_type report_type, const ip_addr_t *local_addr, u16_t local_port, const ip_addr_t *remote_addr, u16_t remote_port, u32_t bytes_transferred, u32_t ms_duration, u32_t bandwidth_kbitpsec)
                   
                  + + + + + +

                  +Enumerations

                  enum  lwiperf_report_type {
                  +  LWIPERF_TCP_DONE_SERVER, +LWIPERF_TCP_DONE_CLIENT, +LWIPERF_TCP_ABORTED_LOCAL, +LWIPERF_TCP_ABORTED_LOCAL_DATAERROR, +
                  +  LWIPERF_TCP_ABORTED_LOCAL_TXERROR, +LWIPERF_TCP_ABORTED_REMOTE +
                  + }
                   
                  enum  lwiperf_client_type { LWIPERF_CLIENT, +LWIPERF_DUAL, +LWIPERF_TRADEOFF + }
                   
                  + + + + + + + + + + + +

                  +Functions

                  void * lwiperf_start_tcp_server (const ip_addr_t *local_addr, u16_t local_port, lwiperf_report_fn report_fn, void *report_arg)
                   
                  void * lwiperf_start_tcp_server_default (lwiperf_report_fn report_fn, void *report_arg)
                   
                  void * lwiperf_start_tcp_client (const ip_addr_t *remote_addr, u16_t remote_port, enum lwiperf_client_type type, lwiperf_report_fn report_fn, void *report_arg)
                   
                  void * lwiperf_start_tcp_client_default (const ip_addr_t *remote_addr, lwiperf_report_fn report_fn, void *report_arg)
                   
                  void lwiperf_abort (void *lwiperf_session)
                   
                  +

                  Detailed Description

                  +

                  lwIP iPerf server implementation

                  +

                  Typedef Documentation

                  + +

                  ◆ lwiperf_report_fn

                  + +
                  +
                  + + + + +
                  typedef void(* lwiperf_report_fn) (void *arg, enum lwiperf_report_type report_type, const ip_addr_t *local_addr, u16_t local_port, const ip_addr_t *remote_addr, u16_t remote_port, u32_t bytes_transferred, u32_t ms_duration, u32_t bandwidth_kbitpsec)
                  +
                  +

                  Prototype of a report function that is called when a session is finished. This report function can show the test results.

                  Parameters
                  + + +
                  report_typecontains the test result
                  +
                  +
                  + +
                  +
                  +

                  Enumeration Type Documentation

                  + +

                  ◆ lwiperf_client_type

                  + +
                  +
                  + + + + +
                  enum lwiperf_client_type
                  +
                  +

                  Control

                  + + + + +
                  Enumerator
                  LWIPERF_CLIENT 

                  Unidirectional tx only test

                  +
                  LWIPERF_DUAL 

                  Do a bidirectional test simultaneously

                  +
                  LWIPERF_TRADEOFF 

                  Do a bidirectional test individually

                  +
                  + +
                  +
                  + +

                  ◆ lwiperf_report_type

                  + +
                  +
                  + + + + +
                  enum lwiperf_report_type
                  +
                  +

                  lwIPerf test results

                  + + + + + + + +
                  Enumerator
                  LWIPERF_TCP_DONE_SERVER 

                  The server side test is done

                  +
                  LWIPERF_TCP_DONE_CLIENT 

                  The client side test is done

                  +
                  LWIPERF_TCP_ABORTED_LOCAL 

                  Local error lead to test abort

                  +
                  LWIPERF_TCP_ABORTED_LOCAL_DATAERROR 

                  Data check error lead to test abort

                  +
                  LWIPERF_TCP_ABORTED_LOCAL_TXERROR 

                  Transmit error lead to test abort

                  +
                  LWIPERF_TCP_ABORTED_REMOTE 

                  Remote side aborted the test

                  +
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/lwiperf_8h.js b/Libraries/LwIP/doc/doxygen/output/html/lwiperf_8h.js new file mode 100644 index 0000000..a8406f5 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/lwiperf_8h.js @@ -0,0 +1,22 @@ +var lwiperf_8h = +[ + [ "lwiperf_report_fn", "lwiperf_8h.html#a248ea47a58a14c6aecf6525217a812fd", null ], + [ "lwiperf_client_type", "lwiperf_8h.html#ab3280e56eb41bd6f698a20843573f76c", [ + [ "LWIPERF_CLIENT", "lwiperf_8h.html#ab3280e56eb41bd6f698a20843573f76cae1862655ebaaea2e7e0261dff0173110", null ], + [ "LWIPERF_DUAL", "lwiperf_8h.html#ab3280e56eb41bd6f698a20843573f76cab0381feca6655968e7380622e7a63ede", null ], + [ "LWIPERF_TRADEOFF", "lwiperf_8h.html#ab3280e56eb41bd6f698a20843573f76caccdab7ee6e1b0981861e66f0755f7964", null ] + ] ], + [ "lwiperf_report_type", "lwiperf_8h.html#ab72a2d205e43d5243a291f937bbc24d6", [ + [ "LWIPERF_TCP_DONE_SERVER", "lwiperf_8h.html#ab72a2d205e43d5243a291f937bbc24d6aa52255236ad2983346311ce7f28210e5", null ], + [ "LWIPERF_TCP_DONE_CLIENT", "lwiperf_8h.html#ab72a2d205e43d5243a291f937bbc24d6a4f9bde0cad305eaab25d2c1d0196677b", null ], + [ "LWIPERF_TCP_ABORTED_LOCAL", "lwiperf_8h.html#ab72a2d205e43d5243a291f937bbc24d6abee2bf6da51a0845c15ac52b280203cb", null ], + [ "LWIPERF_TCP_ABORTED_LOCAL_DATAERROR", "lwiperf_8h.html#ab72a2d205e43d5243a291f937bbc24d6adda7e5dbaf1e04eb04ec0fd2b05584a5", null ], + [ "LWIPERF_TCP_ABORTED_LOCAL_TXERROR", "lwiperf_8h.html#ab72a2d205e43d5243a291f937bbc24d6a3d4e1f5742d80aeafb6b22aa74d93e40", null ], + [ "LWIPERF_TCP_ABORTED_REMOTE", "lwiperf_8h.html#ab72a2d205e43d5243a291f937bbc24d6ae664c0f987584f07fb0f6f8896aada0d", null ] + ] ], + [ "lwiperf_abort", "group__iperf.html#gac51c9c44a38bfa1140bd44b793a0a004", null ], + [ "lwiperf_start_tcp_client", "group__iperf.html#gad8317f52289d8bb12a14627cd177a565", null ], + [ "lwiperf_start_tcp_client_default", "group__iperf.html#ga85a487cf8ecbd0999382c9bff375d0da", null ], + [ "lwiperf_start_tcp_server", "group__iperf.html#gad97bf77057e7f96d6d8def812deea202", null ], + [ "lwiperf_start_tcp_server_default", "group__iperf.html#gae1f30a02b86c4dd3d47810cd493baf26", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/mdns_8c.html b/Libraries/LwIP/doc/doxygen/output/html/mdns_8c.html new file mode 100644 index 0000000..cf4857a --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/mdns_8c.html @@ -0,0 +1,349 @@ + + + + + + + +lwIP: src/apps/mdns/mdns.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  mdns.c File Reference
                  +
                  +
                  +
                  #include "lwip/apps/mdns.h"
                  +#include "lwip/apps/mdns_priv.h"
                  +#include "lwip/netif.h"
                  +#include "lwip/udp.h"
                  +#include "lwip/ip_addr.h"
                  +#include "lwip/mem.h"
                  +#include "lwip/prot/dns.h"
                  +#include "lwip/prot/iana.h"
                  +#include "lwip/timeouts.h"
                  +#include <string.h>
                  +#include "lwip/igmp.h"
                  +#include "lwip/mld6.h"
                  +
                  + + + + + + + + + + + +

                  +Data Structures

                  struct  mdns_service
                   
                  struct  mdns_host
                   
                  struct  mdns_packet
                   
                  struct  mdns_outpacket
                   
                  struct  mdns_rr_info
                   
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  err_t mdns_domain_add_label (struct mdns_domain *domain, const char *label, u8_t len)
                   
                  u16_t mdns_readname (struct pbuf *p, u16_t offset, struct mdns_domain *domain)
                   
                  int mdns_domain_eq (struct mdns_domain *a, struct mdns_domain *b)
                   
                  u16_t mdns_compress_domain (struct pbuf *pbuf, u16_t *offset, struct mdns_domain *domain)
                   
                  err_t mdns_resp_add_netif (struct netif *netif, const char *hostname, u32_t dns_ttl)
                   
                  err_t mdns_resp_remove_netif (struct netif *netif)
                   
                  err_t mdns_resp_rename_netif (struct netif *netif, const char *hostname)
                   
                  s8_t mdns_resp_add_service (struct netif *netif, const char *name, const char *service, enum mdns_sd_proto proto, u16_t port, u32_t dns_ttl, service_get_txt_fn_t txt_fn, void *txt_data)
                   
                  err_t mdns_resp_del_service (struct netif *netif, s8_t slot)
                   
                  err_t mdns_resp_rename_service (struct netif *netif, s8_t slot, const char *name)
                   
                  err_t mdns_resp_add_service_txtitem (struct mdns_service *service, const char *txt, u8_t txt_len)
                   
                  void mdns_resp_announce (struct netif *netif)
                   
                  void mdns_resp_register_name_result_cb (mdns_name_result_cb_t cb)
                   
                  void mdns_resp_restart (struct netif *netif)
                   
                  void mdns_resp_init (void)
                   
                  +

                  Detailed Description

                  +

                  MDNS responder implementation

                  +

                  Function Documentation

                  + +

                  ◆ mdns_compress_domain()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  u16_t mdns_compress_domain (struct pbufpbuf,
                  u16_t * offset,
                  struct mdns_domain * domain 
                  )
                  +
                  +

                  Return bytes needed to write before jump for best result of compressing supplied domain against domain in outpacket starting at specified offset. If a match is found, offset is updated to where to jump to

                  Parameters
                  + + + + +
                  pbufPointer to pbuf with the partially constructed DNS packet
                  offsetStart position of a domain written earlier. If this location is suitable for compression, the pointer is updated to where in the domain to jump to.
                  domainThe domain to write
                  +
                  +
                  +
                  Returns
                  Number of bytes to write of the new domain before writing a jump to the offset. If compression can not be done against this previous domain name, the full new domain length is returned.
                  + +
                  +
                  + +

                  ◆ mdns_domain_add_label()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t mdns_domain_add_label (struct mdns_domain * domain,
                  const char * label,
                  u8_t len 
                  )
                  +
                  +

                  Add a label part to a domain

                  Parameters
                  + + + + +
                  domainThe domain to add a label to
                  labelThe label to add, like <hostname>, 'local', 'com' or ''
                  lenThe length of the label
                  +
                  +
                  +
                  Returns
                  ERR_OK on success, an err_t otherwise if label too long
                  + +
                  +
                  + +

                  ◆ mdns_domain_eq()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  int mdns_domain_eq (struct mdns_domain * a,
                  struct mdns_domain * b 
                  )
                  +
                  +

                  Return 1 if contents of domains match (case-insensitive)

                  Parameters
                  + + + +
                  aDomain name to compare 1
                  bDomain name to compare 2
                  +
                  +
                  +
                  Returns
                  1 if domains are equal ignoring case, 0 otherwise
                  + +
                  +
                  + +

                  ◆ mdns_readname()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  u16_t mdns_readname (struct pbufp,
                  u16_t offset,
                  struct mdns_domain * domain 
                  )
                  +
                  +

                  Read possibly compressed domain name from packet buffer

                  Parameters
                  + + + + +
                  pThe packet
                  offsetstart position of domain name in packet
                  domainThe domain name destination
                  +
                  +
                  +
                  Returns
                  The new offset after the domain, or MDNS_READNAME_ERROR if reading failed
                  + +
                  +
                  + +

                  ◆ mdns_resp_register_name_result_cb()

                  + +
                  +
                  + + + + + + + + +
                  void mdns_resp_register_name_result_cb (mdns_name_result_cb_t cb)
                  +
                  +

                  Register a callback function that is called if probing is completed successfully or with a conflict.

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/mdns_8c.js b/Libraries/LwIP/doc/doxygen/output/html/mdns_8c.js new file mode 100644 index 0000000..6fe4187 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/mdns_8c.js @@ -0,0 +1,23 @@ +var mdns_8c = +[ + [ "mdns_service", "structmdns__service.html", "structmdns__service" ], + [ "mdns_host", "structmdns__host.html", "structmdns__host" ], + [ "mdns_packet", "structmdns__packet.html", "structmdns__packet" ], + [ "mdns_outpacket", "structmdns__outpacket.html", "structmdns__outpacket" ], + [ "mdns_rr_info", "structmdns__rr__info.html", null ], + [ "mdns_compress_domain", "mdns_8c.html#ab72e48cf076afd1e3a08030d1d0bff9e", null ], + [ "mdns_domain_add_label", "mdns_8c.html#a17db69fa887515374452b945e959bbf9", null ], + [ "mdns_domain_eq", "mdns_8c.html#a52d8f70432ae998814f16b18431213cd", null ], + [ "mdns_readname", "mdns_8c.html#ab5f49d9356a76879e0e6a14eb0643b23", null ], + [ "mdns_resp_add_netif", "group__mdns.html#gaa619ac8f46a4b4021195720f0355cbeb", null ], + [ "mdns_resp_add_service", "group__mdns.html#ga824e992e94be216c8e059f48f49a59ce", null ], + [ "mdns_resp_add_service_txtitem", "group__mdns.html#ga01c85202f4b85edc8b571f2f419db576", null ], + [ "mdns_resp_announce", "group__mdns.html#ga0f462fb91a9d0323bb4636bd725f0e85", null ], + [ "mdns_resp_del_service", "group__mdns.html#ga3df2ae751cdfdffb0a567390940eb8ad", null ], + [ "mdns_resp_init", "group__mdns.html#ga5fa15978a398dae1a8d7620ae169bdd3", null ], + [ "mdns_resp_register_name_result_cb", "mdns_8c.html#a01f8850b9c2d2cd40ed77a1438c85bf1", null ], + [ "mdns_resp_remove_netif", "group__mdns.html#gaa8144e3c77a92c4043e6214ff6b6010c", null ], + [ "mdns_resp_rename_netif", "group__mdns.html#ga7b1473e595eb0c185bab293f3ec2e50e", null ], + [ "mdns_resp_rename_service", "group__mdns.html#gaf273897059f1bbddc74cfcb820777dd9", null ], + [ "mdns_resp_restart", "group__mdns.html#ga93eccdc0d9afff0f24160d31c70e2c9a", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/mdns_8h.html b/Libraries/LwIP/doc/doxygen/output/html/mdns_8h.html new file mode 100644 index 0000000..c0f269d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/mdns_8h.html @@ -0,0 +1,197 @@ + + + + + + + +lwIP: src/include/lwip/apps/mdns.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  mdns.h File Reference
                  +
                  +
                  +
                  #include "lwip/apps/mdns_opts.h"
                  +#include "lwip/netif.h"
                  +
                  + + + +

                  +Macros

                  #define mdns_resp_netif_settings_changed(netif)   mdns_resp_announce(netif)
                   
                  + + + + + +

                  +Typedefs

                  typedef void(* service_get_txt_fn_t) (struct mdns_service *service, void *txt_userdata)
                   
                  typedef void(* mdns_name_result_cb_t) (struct netif *netif, u8_t result)
                   
                  + + + + + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  void mdns_resp_init (void)
                   
                  void mdns_resp_register_name_result_cb (mdns_name_result_cb_t cb)
                   
                  err_t mdns_resp_add_netif (struct netif *netif, const char *hostname, u32_t dns_ttl)
                   
                  err_t mdns_resp_remove_netif (struct netif *netif)
                   
                  err_t mdns_resp_rename_netif (struct netif *netif, const char *hostname)
                   
                  s8_t mdns_resp_add_service (struct netif *netif, const char *name, const char *service, enum mdns_sd_proto proto, u16_t port, u32_t dns_ttl, service_get_txt_fn_t txt_fn, void *txt_userdata)
                   
                  err_t mdns_resp_del_service (struct netif *netif, s8_t slot)
                   
                  err_t mdns_resp_rename_service (struct netif *netif, s8_t slot, const char *name)
                   
                  err_t mdns_resp_add_service_txtitem (struct mdns_service *service, const char *txt, u8_t txt_len)
                   
                  void mdns_resp_restart (struct netif *netif)
                   
                  void mdns_resp_announce (struct netif *netif)
                   
                  +

                  Detailed Description

                  +

                  MDNS responder

                  +

                  Typedef Documentation

                  + +

                  ◆ mdns_name_result_cb_t

                  + +
                  +
                  + + + + +
                  typedef void(* mdns_name_result_cb_t) (struct netif *netif, u8_t result)
                  +
                  +

                  Callback function to let application know the result of probing network for name uniqueness, called with result MDNS_PROBING_SUCCESSFUL if no other node claimed use for the name for the netif or a service and is safe to use, or MDNS_PROBING_CONFLICT if another node is already using it and mdns is disabled on this interface

                  + +
                  +
                  + +

                  ◆ service_get_txt_fn_t

                  + +
                  +
                  + + + + +
                  typedef void(* service_get_txt_fn_t) (struct mdns_service *service, void *txt_userdata)
                  +
                  +

                  Callback function to add text to a reply, called when generating the reply

                  + +
                  +
                  +

                  Function Documentation

                  + +

                  ◆ mdns_resp_register_name_result_cb()

                  + +
                  +
                  + + + + + + + + +
                  void mdns_resp_register_name_result_cb (mdns_name_result_cb_t cb)
                  +
                  +

                  Register a callback function that is called if probing is completed successfully or with a conflict.

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/mdns_8h.js b/Libraries/LwIP/doc/doxygen/output/html/mdns_8h.js new file mode 100644 index 0000000..55f98e0 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/mdns_8h.js @@ -0,0 +1,17 @@ +var mdns_8h = +[ + [ "mdns_resp_netif_settings_changed", "group__mdns.html#gab2edba12d5cad1949f7ca040ae12beec", null ], + [ "mdns_name_result_cb_t", "mdns_8h.html#a19f12d7092de6fe90d5843e4ef8d4536", null ], + [ "service_get_txt_fn_t", "mdns_8h.html#a3b9ee5953214665e585e5bcaf6b8ea83", null ], + [ "mdns_resp_add_netif", "group__mdns.html#gaa619ac8f46a4b4021195720f0355cbeb", null ], + [ "mdns_resp_add_service", "group__mdns.html#ga824e992e94be216c8e059f48f49a59ce", null ], + [ "mdns_resp_add_service_txtitem", "group__mdns.html#ga01c85202f4b85edc8b571f2f419db576", null ], + [ "mdns_resp_announce", "group__mdns.html#ga0f462fb91a9d0323bb4636bd725f0e85", null ], + [ "mdns_resp_del_service", "group__mdns.html#ga3df2ae751cdfdffb0a567390940eb8ad", null ], + [ "mdns_resp_init", "group__mdns.html#ga5fa15978a398dae1a8d7620ae169bdd3", null ], + [ "mdns_resp_register_name_result_cb", "mdns_8h.html#a01f8850b9c2d2cd40ed77a1438c85bf1", null ], + [ "mdns_resp_remove_netif", "group__mdns.html#gaa8144e3c77a92c4043e6214ff6b6010c", null ], + [ "mdns_resp_rename_netif", "group__mdns.html#ga7b1473e595eb0c185bab293f3ec2e50e", null ], + [ "mdns_resp_rename_service", "group__mdns.html#gaf273897059f1bbddc74cfcb820777dd9", null ], + [ "mdns_resp_restart", "group__mdns.html#ga93eccdc0d9afff0f24160d31c70e2c9a", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/mdns__opts_8h.html b/Libraries/LwIP/doc/doxygen/output/html/mdns__opts_8h.html new file mode 100644 index 0000000..18393d6 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/mdns__opts_8h.html @@ -0,0 +1,115 @@ + + + + + + + +lwIP: src/include/lwip/apps/mdns_opts.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  mdns_opts.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +
                  + + + + + + + +

                  +Macros

                  #define MDNS_MAX_SERVICES   1
                   
                  #define MDNS_RESP_USENETIF_EXTCALLBACK   LWIP_NETIF_EXT_STATUS_CALLBACK
                   
                  #define MDNS_DEBUG   LWIP_DBG_OFF
                   
                  +

                  Detailed Description

                  +

                  MDNS responder

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/mdns__opts_8h.js b/Libraries/LwIP/doc/doxygen/output/html/mdns__opts_8h.js new file mode 100644 index 0000000..2205be4 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/mdns__opts_8h.js @@ -0,0 +1,6 @@ +var mdns__opts_8h = +[ + [ "MDNS_DEBUG", "group__mdns__opts.html#ga53a97502efdcf1214cab4078f93a6dc9", null ], + [ "MDNS_MAX_SERVICES", "group__mdns__opts.html#ga82749ee08be21967b6daf577b9710ac6", null ], + [ "MDNS_RESP_USENETIF_EXTCALLBACK", "group__mdns__opts.html#ga172e579cd09a1db51cf224319c012396", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/mdns__priv_8h.html b/Libraries/LwIP/doc/doxygen/output/html/mdns__priv_8h.html new file mode 100644 index 0000000..adb9c5b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/mdns__priv_8h.html @@ -0,0 +1,284 @@ + + + + + + + +lwIP: src/include/lwip/apps/mdns_priv.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  mdns_priv.h File Reference
                  +
                  +
                  +
                  #include "lwip/apps/mdns_opts.h"
                  +#include "lwip/pbuf.h"
                  +
                  + + + + + + + + + +

                  +Functions

                  err_t mdns_domain_add_label (struct mdns_domain *domain, const char *label, u8_t len)
                   
                  u16_t mdns_readname (struct pbuf *p, u16_t offset, struct mdns_domain *domain)
                   
                  int mdns_domain_eq (struct mdns_domain *a, struct mdns_domain *b)
                   
                  u16_t mdns_compress_domain (struct pbuf *pbuf, u16_t *offset, struct mdns_domain *domain)
                   
                  +

                  Detailed Description

                  +

                  MDNS responder private definitions

                  +

                  Function Documentation

                  + +

                  ◆ mdns_compress_domain()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  u16_t mdns_compress_domain (struct pbufpbuf,
                  u16_t * offset,
                  struct mdns_domain * domain 
                  )
                  +
                  +

                  Return bytes needed to write before jump for best result of compressing supplied domain against domain in outpacket starting at specified offset. If a match is found, offset is updated to where to jump to

                  Parameters
                  + + + + +
                  pbufPointer to pbuf with the partially constructed DNS packet
                  offsetStart position of a domain written earlier. If this location is suitable for compression, the pointer is updated to where in the domain to jump to.
                  domainThe domain to write
                  +
                  +
                  +
                  Returns
                  Number of bytes to write of the new domain before writing a jump to the offset. If compression can not be done against this previous domain name, the full new domain length is returned.
                  + +
                  +
                  + +

                  ◆ mdns_domain_add_label()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t mdns_domain_add_label (struct mdns_domain * domain,
                  const char * label,
                  u8_t len 
                  )
                  +
                  +

                  Add a label part to a domain

                  Parameters
                  + + + + +
                  domainThe domain to add a label to
                  labelThe label to add, like <hostname>, 'local', 'com' or ''
                  lenThe length of the label
                  +
                  +
                  +
                  Returns
                  ERR_OK on success, an err_t otherwise if label too long
                  + +
                  +
                  + +

                  ◆ mdns_domain_eq()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  int mdns_domain_eq (struct mdns_domain * a,
                  struct mdns_domain * b 
                  )
                  +
                  +

                  Return 1 if contents of domains match (case-insensitive)

                  Parameters
                  + + + +
                  aDomain name to compare 1
                  bDomain name to compare 2
                  +
                  +
                  +
                  Returns
                  1 if domains are equal ignoring case, 0 otherwise
                  + +
                  +
                  + +

                  ◆ mdns_readname()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  u16_t mdns_readname (struct pbufp,
                  u16_t offset,
                  struct mdns_domain * domain 
                  )
                  +
                  +

                  Read possibly compressed domain name from packet buffer

                  Parameters
                  + + + + +
                  pThe packet
                  offsetstart position of domain name in packet
                  domainThe domain name destination
                  +
                  +
                  +
                  Returns
                  The new offset after the domain, or MDNS_READNAME_ERROR if reading failed
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/mdns__priv_8h.js b/Libraries/LwIP/doc/doxygen/output/html/mdns__priv_8h.js new file mode 100644 index 0000000..0b24da8 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/mdns__priv_8h.js @@ -0,0 +1,7 @@ +var mdns__priv_8h = +[ + [ "mdns_compress_domain", "mdns__priv_8h.html#ab72e48cf076afd1e3a08030d1d0bff9e", null ], + [ "mdns_domain_add_label", "mdns__priv_8h.html#a17db69fa887515374452b945e959bbf9", null ], + [ "mdns_domain_eq", "mdns__priv_8h.html#a52d8f70432ae998814f16b18431213cd", null ], + [ "mdns_readname", "mdns__priv_8h.html#ab5f49d9356a76879e0e6a14eb0643b23", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/mem_8c.html b/Libraries/LwIP/doc/doxygen/output/html/mem_8c.html new file mode 100644 index 0000000..39fc49d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/mem_8c.html @@ -0,0 +1,326 @@ + + + + + + + +lwIP: src/core/mem.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  mem.c File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/mem.h"
                  +#include "lwip/def.h"
                  +#include "lwip/sys.h"
                  +#include "lwip/stats.h"
                  +#include "lwip/err.h"
                  +#include <string.h>
                  +
                  + + + +

                  +Data Structures

                  struct  mem
                   
                  + + + +

                  +Macros

                  #define MIN_SIZE   12
                   
                  + + + + + + + + + + + +

                  +Functions

                  void mem_init (void)
                   
                  void mem_free (void *rmem)
                   
                  void * mem_trim (void *rmem, mem_size_t new_size)
                   
                  void * mem_malloc (mem_size_t size_in)
                   
                  void * mem_calloc (mem_size_t count, mem_size_t size)
                   
                  + + + +

                  +Variables

                  u8_t ram_heap [((((((1600)+1 - 1U) &~(1 -1U))+(2U *(((sizeof(struct mem))+1 - 1U) &~(1 -1U))))+1 - 1U))]
                   
                  +

                  Detailed Description

                  +

                  Dynamic memory manager

                  +

                  This is a lightweight replacement for the standard C library malloc().

                  +

                  If you want to use the standard C library malloc() instead, define MEM_LIBC_MALLOC to 1 in your lwipopts.h

                  +

                  To let mem_malloc() use pools (prevents fragmentation and is much faster than a heap but might waste some memory), define MEM_USE_POOLS to 1, define MEMP_USE_CUSTOM_POOLS to 1 and create a file "lwippools.h" that includes a list of pools like this (more pools can be added between _START and _END):

                  +

                  Define three pools with sizes 256, 512, and 1512 bytes LWIP_MALLOC_MEMPOOL_START LWIP_MALLOC_MEMPOOL(20, 256) LWIP_MALLOC_MEMPOOL(10, 512) LWIP_MALLOC_MEMPOOL(5, 1512) LWIP_MALLOC_MEMPOOL_END

                  +

                  Macro Definition Documentation

                  + +

                  ◆ MIN_SIZE

                  + +
                  +
                  + + + + +
                  #define MIN_SIZE   12
                  +
                  +

                  All allocated blocks will be MIN_SIZE bytes big, at least! MIN_SIZE can be overridden to suit your needs. Smaller values save space, larger values could prevent too small blocks to fragment the RAM too much.

                  + +
                  +
                  +

                  Function Documentation

                  + +

                  ◆ mem_calloc()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void* mem_calloc (mem_size_t count,
                  mem_size_t size 
                  )
                  +
                  +

                  Contiguously allocates enough space for count objects that are size bytes of memory each and returns a pointer to the allocated memory.

                  +

                  The allocated memory is filled with bytes of value zero.

                  +
                  Parameters
                  + + + +
                  countnumber of objects to allocate
                  sizesize of the objects to allocate
                  +
                  +
                  +
                  Returns
                  pointer to allocated memory / NULL pointer if there is an error
                  + +
                  +
                  + +

                  ◆ mem_free()

                  + +
                  +
                  + + + + + + + + +
                  void mem_free (void * rmem)
                  +
                  +

                  Put a struct mem back on the heap

                  +
                  Parameters
                  + + +
                  rmemis the data portion of a struct mem as returned by a previous call to mem_malloc()
                  +
                  +
                  + +
                  +
                  + +

                  ◆ mem_init()

                  + +
                  +
                  + + + + + + + + +
                  void mem_init (void )
                  +
                  +

                  Zero the heap and initialize start, end and lowest-free

                  + +
                  +
                  + +

                  ◆ mem_malloc()

                  + +
                  +
                  + + + + + + + + +
                  void* mem_malloc (mem_size_t size_in)
                  +
                  +

                  Allocate a block of memory with a minimum of 'size' bytes.

                  +
                  Parameters
                  + + +
                  size_inis the minimum size of the requested block in bytes.
                  +
                  +
                  +
                  Returns
                  pointer to allocated memory or NULL if no free memory was found.
                  +

                  Note that the returned value will always be aligned (as defined by MEM_ALIGNMENT).

                  + +
                  +
                  + +

                  ◆ mem_trim()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void* mem_trim (void * rmem,
                  mem_size_t new_size 
                  )
                  +
                  +

                  Shrink memory returned by mem_malloc().

                  +
                  Parameters
                  + + + +
                  rmempointer to memory allocated by mem_malloc the is to be shrinked
                  new_sizerequired size after shrinking (needs to be smaller than or equal to the previous size)
                  +
                  +
                  +
                  Returns
                  for compatibility reasons: is always == rmem, at the moment or NULL if newsize is > old size, in which case rmem is NOT touched or freed!
                  + +
                  +
                  +

                  Variable Documentation

                  + +

                  ◆ ram_heap

                  + +
                  +
                  + + + + +
                  u8_t ram_heap[(((((( 1600)+ 1 - 1U) &~(1 -1U))+(2U *(((sizeof(struct mem))+ 1 - 1U) &~(1 -1U))))+ 1 - 1U))]
                  +
                  +

                  If you want to relocate the heap to external memory, simply define LWIP_RAM_HEAP_POINTER as a void-pointer to that location. If so, make sure the memory at that location is big enough (see below on how that space is calculated). the heap. we need one struct mem at the end and some room for alignment

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/mem_8c.js b/Libraries/LwIP/doc/doxygen/output/html/mem_8c.js new file mode 100644 index 0000000..3e21d62 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/mem_8c.js @@ -0,0 +1,11 @@ +var mem_8c = +[ + [ "mem", "structmem.html", "structmem" ], + [ "MIN_SIZE", "mem_8c.html#a278694c2333c9826f21ddd2c2d220f66", null ], + [ "mem_calloc", "mem_8c.html#ab0bdc525971701883f2065e7fb257a24", null ], + [ "mem_free", "mem_8c.html#a65169147c44e9db60d997819af9b455c", null ], + [ "mem_init", "mem_8c.html#a44a136e3b70c36abb6f8dc060c778113", null ], + [ "mem_malloc", "mem_8c.html#af418ade27d91d41e6143dba2cc246b0f", null ], + [ "mem_trim", "mem_8c.html#a7e6b7f11bb50bead9b35515d9a517124", null ], + [ "ram_heap", "mem_8c.html#a6da602f2bbf1d555556f9260b3b8ad5f", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/mem_8h.html b/Libraries/LwIP/doc/doxygen/output/html/mem_8h.html new file mode 100644 index 0000000..98cf2cd --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/mem_8h.html @@ -0,0 +1,266 @@ + + + + + + + +lwIP: src/include/lwip/mem.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  mem.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +
                  + + + + + + + + + + + +

                  +Functions

                  void mem_init (void)
                   
                  void * mem_trim (void *mem, mem_size_t size)
                   
                  void * mem_malloc (mem_size_t size)
                   
                  void * mem_calloc (mem_size_t count, mem_size_t size)
                   
                  void mem_free (void *mem)
                   
                  +

                  Detailed Description

                  +

                  Heap API

                  +

                  Function Documentation

                  + +

                  ◆ mem_calloc()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void* mem_calloc (mem_size_t count,
                  mem_size_t size 
                  )
                  +
                  +

                  Contiguously allocates enough space for count objects that are size bytes of memory each and returns a pointer to the allocated memory.

                  +

                  The allocated memory is filled with bytes of value zero.

                  +
                  Parameters
                  + + + +
                  countnumber of objects to allocate
                  sizesize of the objects to allocate
                  +
                  +
                  +
                  Returns
                  pointer to allocated memory / NULL pointer if there is an error
                  + +
                  +
                  + +

                  ◆ mem_free()

                  + +
                  +
                  + + + + + + + + +
                  void mem_free (void * rmem)
                  +
                  +

                  Put a struct mem back on the heap

                  +
                  Parameters
                  + + +
                  rmemis the data portion of a struct mem as returned by a previous call to mem_malloc()
                  +
                  +
                  + +
                  +
                  + +

                  ◆ mem_init()

                  + +
                  +
                  + + + + + + + + +
                  void mem_init (void )
                  +
                  +

                  Zero the heap and initialize start, end and lowest-free

                  + +
                  +
                  + +

                  ◆ mem_malloc()

                  + +
                  +
                  + + + + + + + + +
                  void* mem_malloc (mem_size_t size_in)
                  +
                  +

                  Allocate a block of memory with a minimum of 'size' bytes.

                  +
                  Parameters
                  + + +
                  size_inis the minimum size of the requested block in bytes.
                  +
                  +
                  +
                  Returns
                  pointer to allocated memory or NULL if no free memory was found.
                  +

                  Note that the returned value will always be aligned (as defined by MEM_ALIGNMENT).

                  + +
                  +
                  + +

                  ◆ mem_trim()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void* mem_trim (void * rmem,
                  mem_size_t new_size 
                  )
                  +
                  +

                  Shrink memory returned by mem_malloc().

                  +
                  Parameters
                  + + + +
                  rmempointer to memory allocated by mem_malloc the is to be shrinked
                  new_sizerequired size after shrinking (needs to be smaller than or equal to the previous size)
                  +
                  +
                  +
                  Returns
                  for compatibility reasons: is always == rmem, at the moment or NULL if newsize is > old size, in which case rmem is NOT touched or freed!
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/mem_8h.js b/Libraries/LwIP/doc/doxygen/output/html/mem_8h.js new file mode 100644 index 0000000..c692acf --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/mem_8h.js @@ -0,0 +1,8 @@ +var mem_8h = +[ + [ "mem_calloc", "mem_8h.html#ab0bdc525971701883f2065e7fb257a24", null ], + [ "mem_free", "mem_8h.html#a2fd7aa1adf6e394d3be7c7734e7df41a", null ], + [ "mem_init", "mem_8h.html#a44a136e3b70c36abb6f8dc060c778113", null ], + [ "mem_malloc", "mem_8h.html#a932aa40d85b14cb7331625e012d12335", null ], + [ "mem_trim", "mem_8h.html#a5e39a108c44d8a72df0b30a117cb62e4", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/mem__priv_8h.html b/Libraries/LwIP/doc/doxygen/output/html/mem__priv_8h.html new file mode 100644 index 0000000..cf90dbf --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/mem__priv_8h.html @@ -0,0 +1,104 @@ + + + + + + + +lwIP: src/include/lwip/priv/mem_priv.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  mem_priv.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/mem.h"
                  +

                  Detailed Description

                  +

                  lwIP internal memory implementations (do not use in application code)

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/memp_8c.html b/Libraries/LwIP/doc/doxygen/output/html/memp_8c.html new file mode 100644 index 0000000..5e875f9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/memp_8c.html @@ -0,0 +1,319 @@ + + + + + + + +lwIP: src/core/memp.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  memp.c File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/memp.h"
                  +#include "lwip/sys.h"
                  +#include "lwip/stats.h"
                  +#include <string.h>
                  +#include "lwip/pbuf.h"
                  +#include "lwip/raw.h"
                  +#include "lwip/udp.h"
                  +#include "lwip/tcp.h"
                  +#include "lwip/priv/tcp_priv.h"
                  +#include "lwip/altcp.h"
                  +#include "lwip/ip4_frag.h"
                  +#include "lwip/netbuf.h"
                  +#include "lwip/api.h"
                  +#include "lwip/priv/tcpip_priv.h"
                  +#include "lwip/priv/api_msg.h"
                  +#include "lwip/priv/sockets_priv.h"
                  +#include "lwip/etharp.h"
                  +#include "lwip/igmp.h"
                  +#include "lwip/timeouts.h"
                  +#include "netif/ppp/ppp_opts.h"
                  +#include "lwip/netdb.h"
                  +#include "lwip/dns.h"
                  +#include "lwip/priv/nd6_priv.h"
                  +#include "lwip/ip6_frag.h"
                  +#include "lwip/mld6.h"
                  +#include "lwip/priv/memp_std.h"
                  +#include "path/to/my/lwip_hooks.h"
                  +
                  + + + + + + + + + + + + + +

                  +Functions

                  void memp_init_pool (const struct memp_desc *desc)
                   
                  void memp_init (void)
                   
                  void * memp_malloc_pool (const struct memp_desc *desc)
                   
                  void * memp_malloc (memp_t type)
                   
                  void memp_free_pool (const struct memp_desc *desc, void *mem)
                   
                  void memp_free (memp_t type, void *mem)
                   
                  +

                  Detailed Description

                  +

                  Dynamic pool memory manager

                  +

                  lwIP has dedicated pools for many structures (netconn, protocol control blocks, packet buffers, ...). All these pools are managed here.

                  +

                  Function Documentation

                  + +

                  ◆ memp_free()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void memp_free (memp_t type,
                  void * mem 
                  )
                  +
                  +

                  Put an element back into its pool.

                  +
                  Parameters
                  + + + +
                  typethe pool where to put mem
                  memthe memp element to free
                  +
                  +
                  + +
                  +
                  + +

                  ◆ memp_free_pool()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void memp_free_pool (const struct memp_descdesc,
                  void * mem 
                  )
                  +
                  +

                  Put a custom pool element back into its pool.

                  +
                  Parameters
                  + + + +
                  descthe pool where to put mem
                  memthe memp element to free
                  +
                  +
                  + +
                  +
                  + +

                  ◆ memp_init()

                  + +
                  +
                  + + + + + + + + +
                  void memp_init (void )
                  +
                  +

                  Initializes lwIP built-in pools. Related functions: memp_malloc, memp_free

                  +

                  Carves out memp_memory into linked lists for each pool-type.

                  + +
                  +
                  + +

                  ◆ memp_init_pool()

                  + +
                  +
                  + + + + + + + + +
                  void memp_init_pool (const struct memp_descdesc)
                  +
                  +

                  Initialize custom memory pool. Related functions: memp_malloc_pool, memp_free_pool

                  +
                  Parameters
                  + + +
                  descpool to initialize
                  +
                  +
                  + +
                  +
                  + +

                  ◆ memp_malloc()

                  + +
                  +
                  + + + + + + + + +
                  void* memp_malloc (memp_t type)
                  +
                  +

                  Get an element from a specific pool.

                  +
                  Parameters
                  + + +
                  typethe pool to get an element from
                  +
                  +
                  +
                  Returns
                  a pointer to the allocated memory or a NULL pointer on error
                  + +
                  +
                  + +

                  ◆ memp_malloc_pool()

                  + +
                  +
                  + + + + + + + + +
                  void* memp_malloc_pool (const struct memp_descdesc)
                  +
                  +

                  Get an element from a custom pool.

                  +
                  Parameters
                  + + +
                  descthe pool to get an element from
                  +
                  +
                  +
                  Returns
                  a pointer to the allocated memory or a NULL pointer on error
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/memp_8c.js b/Libraries/LwIP/doc/doxygen/output/html/memp_8c.js new file mode 100644 index 0000000..ccad34d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/memp_8c.js @@ -0,0 +1,9 @@ +var memp_8c = +[ + [ "memp_free", "memp_8c.html#aecd94926b7c2a0e23ae195f4ae97581f", null ], + [ "memp_free_pool", "memp_8c.html#a62f8c3c907743e34eee3cdac7fa1eaa5", null ], + [ "memp_init", "memp_8c.html#a9693e5b1ac2c6b9c0e7870522d45efa2", null ], + [ "memp_init_pool", "memp_8c.html#a6416303426d05526bed33f241fa6ecd7", null ], + [ "memp_malloc", "memp_8c.html#a2b00593d086313c267b54a976bf67aa5", null ], + [ "memp_malloc_pool", "memp_8c.html#a348c83ee972f1edf7296a1cdf1d75f22", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/memp_8h.html b/Libraries/LwIP/doc/doxygen/output/html/memp_8h.html new file mode 100644 index 0000000..650c397 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/memp_8h.html @@ -0,0 +1,238 @@ + + + + + + + +lwIP: src/include/lwip/memp.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  memp.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/priv/memp_std.h"
                  +#include "lwip/priv/memp_priv.h"
                  +#include "lwip/stats.h"
                  +
                  + + + + + + + + + + + +

                  +Macros

                  #define LWIP_MEMPOOL_PROTOTYPE(name)   extern const struct memp_desc memp_ ## name
                   
                  #define LWIP_MEMPOOL_DECLARE(name, num, size, desc)
                   
                  #define LWIP_MEMPOOL_INIT(name)   memp_init_pool(&memp_ ## name)
                   
                  #define LWIP_MEMPOOL_ALLOC(name)   memp_malloc_pool(&memp_ ## name)
                   
                  #define LWIP_MEMPOOL_FREE(name, x)   memp_free_pool(&memp_ ## name, (x))
                   
                  + + + +

                  +Enumerations

                  enum  memp_t
                   
                  + + + + + + + +

                  +Functions

                  void memp_init (void)
                   
                  void * memp_malloc (memp_t type)
                   
                  void memp_free (memp_t type, void *mem)
                   
                  +

                  Detailed Description

                  +

                  Memory pool API

                  +

                  lwIP internal memory pools (do not use in application code) This file is deliberately included multiple times: once with empty definition of LWIP_MEMPOOL() to handle all includes and multiple times to build up various lists of mem pools.

                  +

                  Enumeration Type Documentation

                  + +

                  ◆ memp_t

                  + +
                  +
                  + + + + +
                  enum memp_t
                  +
                  +

                  Create the list of all memory pools managed by memp. MEMP_MAX represents a NULL pool at the end

                  + +
                  +
                  +

                  Function Documentation

                  + +

                  ◆ memp_free()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void memp_free (memp_t type,
                  void * mem 
                  )
                  +
                  +

                  Put an element back into its pool.

                  +
                  Parameters
                  + + + +
                  typethe pool where to put mem
                  memthe memp element to free
                  +
                  +
                  + +
                  +
                  + +

                  ◆ memp_init()

                  + +
                  +
                  + + + + + + + + +
                  void memp_init (void )
                  +
                  +

                  Initializes lwIP built-in pools. Related functions: memp_malloc, memp_free

                  +

                  Carves out memp_memory into linked lists for each pool-type.

                  + +
                  +
                  + +

                  ◆ memp_malloc()

                  + +
                  +
                  + + + + + + + + +
                  void* memp_malloc (memp_t type)
                  +
                  +

                  Get an element from a specific pool.

                  +
                  Parameters
                  + + +
                  typethe pool to get an element from
                  +
                  +
                  +
                  Returns
                  a pointer to the allocated memory or a NULL pointer on error
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/memp_8h.js b/Libraries/LwIP/doc/doxygen/output/html/memp_8h.js new file mode 100644 index 0000000..0425ca6 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/memp_8h.js @@ -0,0 +1,12 @@ +var memp_8h = +[ + [ "LWIP_MEMPOOL_ALLOC", "group__mempool.html#ga5e2498f6c17746c1fe7153de5f7f275a", null ], + [ "LWIP_MEMPOOL_DECLARE", "group__mempool.html#ga5b1fb3ce7942432d87cc948b1c5ed6cb", null ], + [ "LWIP_MEMPOOL_FREE", "group__mempool.html#gaa43d114dd702fbd8f1db18474ea93a04", null ], + [ "LWIP_MEMPOOL_INIT", "group__mempool.html#ga60b51c06d276f525b35d8b7abd4dcb41", null ], + [ "LWIP_MEMPOOL_PROTOTYPE", "group__mempool.html#ga92fc8c29d0e2654f2a2ecc43b2b7fb13", null ], + [ "memp_t", "memp_8h.html#a85a164b1f7764951cc685ea525114e57", null ], + [ "memp_free", "memp_8h.html#aecd94926b7c2a0e23ae195f4ae97581f", null ], + [ "memp_init", "memp_8h.html#a9693e5b1ac2c6b9c0e7870522d45efa2", null ], + [ "memp_malloc", "memp_8h.html#a2b00593d086313c267b54a976bf67aa5", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/memp__priv_8h.html b/Libraries/LwIP/doc/doxygen/output/html/memp__priv_8h.html new file mode 100644 index 0000000..950904e --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/memp__priv_8h.html @@ -0,0 +1,211 @@ + + + + + + + +lwIP: src/include/lwip/priv/memp_priv.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  memp_priv.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/mem.h"
                  +#include "lwip/priv/mem_priv.h"
                  +
                  + + + +

                  +Data Structures

                  struct  memp_desc
                   
                  + + + + + + + +

                  +Functions

                  void memp_init_pool (const struct memp_desc *desc)
                   
                  void * memp_malloc_pool (const struct memp_desc *desc)
                   
                  void memp_free_pool (const struct memp_desc *desc, void *mem)
                   
                  +

                  Detailed Description

                  +

                  memory pools lwIP internal implementations (do not use in application code)

                  +

                  Function Documentation

                  + +

                  ◆ memp_free_pool()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void memp_free_pool (const struct memp_descdesc,
                  void * mem 
                  )
                  +
                  +

                  Put a custom pool element back into its pool.

                  +
                  Parameters
                  + + + +
                  descthe pool where to put mem
                  memthe memp element to free
                  +
                  +
                  + +
                  +
                  + +

                  ◆ memp_init_pool()

                  + +
                  +
                  + + + + + + + + +
                  void memp_init_pool (const struct memp_descdesc)
                  +
                  +

                  Initialize custom memory pool. Related functions: memp_malloc_pool, memp_free_pool

                  +
                  Parameters
                  + + +
                  descpool to initialize
                  +
                  +
                  + +
                  +
                  + +

                  ◆ memp_malloc_pool()

                  + +
                  +
                  + + + + + + + + +
                  void* memp_malloc_pool (const struct memp_descdesc)
                  +
                  +

                  Get an element from a custom pool.

                  +
                  Parameters
                  + + +
                  descthe pool to get an element from
                  +
                  +
                  +
                  Returns
                  a pointer to the allocated memory or a NULL pointer on error
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/memp__priv_8h.js b/Libraries/LwIP/doc/doxygen/output/html/memp__priv_8h.js new file mode 100644 index 0000000..1a32a1c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/memp__priv_8h.js @@ -0,0 +1,7 @@ +var memp__priv_8h = +[ + [ "memp_desc", "structmemp__desc.html", "structmemp__desc" ], + [ "memp_free_pool", "memp__priv_8h.html#a62f8c3c907743e34eee3cdac7fa1eaa5", null ], + [ "memp_init_pool", "memp__priv_8h.html#a6416303426d05526bed33f241fa6ecd7", null ], + [ "memp_malloc_pool", "memp__priv_8h.html#a348c83ee972f1edf7296a1cdf1d75f22", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/memp__std_8h.html b/Libraries/LwIP/doc/doxygen/output/html/memp__std_8h.html new file mode 100644 index 0000000..5de0c32 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/memp__std_8h.html @@ -0,0 +1,102 @@ + + + + + + + +lwIP: src/include/lwip/priv/memp_std.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  memp_std.h File Reference
                  +
                  +
                  +

                  Detailed Description

                  +

                  lwIP internal memory pools (do not use in application code) This file is deliberately included multiple times: once with empty definition of LWIP_MEMPOOL() to handle all includes and multiple times to build up various lists of mem pools.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/menu.js b/Libraries/LwIP/doc/doxygen/output/html/menu.js new file mode 100644 index 0000000..97db4c2 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/menu.js @@ -0,0 +1,26 @@ +function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { + function makeTree(data,relPath) { + var result=''; + if ('children' in data) { + result+=''; + } + return result; + } + + $('#main-nav').append(makeTree(menudata,relPath)); + $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); + if (searchEnabled) { + if (serverSide) { + $('#main-menu').append('
                • '); + } else { + $('#main-menu').append('
                • '); + } + } + $('#main-menu').smartmenus(); +} diff --git a/Libraries/LwIP/doc/doxygen/output/html/menudata.js b/Libraries/LwIP/doc/doxygen/output/html/menudata.js new file mode 100644 index 0000000..965ee24 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/menudata.js @@ -0,0 +1,160 @@ +var menudata={children:[ +{text:"Main Page",url:"index.html"}, +{text:"Related Pages",url:"pages.html"}, +{text:"Modules",url:"modules.html"}, +{text:"Data Structures",url:"annotated.html",children:[ +{text:"Data Structures",url:"annotated.html"}, +{text:"Data Fields",url:"functions.html",children:[ +{text:"All",url:"functions.html",children:[ +{text:"_",url:"functions.html#index__"}, +{text:"a",url:"functions_a.html#index_a"}, +{text:"b",url:"functions_b.html#index_b"}, +{text:"c",url:"functions_c.html#index_c"}, +{text:"d",url:"functions_d.html#index_d"}, +{text:"e",url:"functions_e.html#index_e"}, +{text:"f",url:"functions_f.html#index_f"}, +{text:"g",url:"functions_g.html#index_g"}, +{text:"h",url:"functions_h.html#index_h"}, +{text:"i",url:"functions_i.html#index_i"}, +{text:"j",url:"functions_j.html#index_j"}, +{text:"k",url:"functions_k.html#index_k"}, +{text:"l",url:"functions_l.html#index_l"}, +{text:"m",url:"functions_m.html#index_m"}, +{text:"n",url:"functions_n.html#index_n"}, +{text:"o",url:"functions_o.html#index_o"}, +{text:"p",url:"functions_p.html#index_p"}, +{text:"q",url:"functions_q.html#index_q"}, +{text:"r",url:"functions_r.html#index_r"}, +{text:"s",url:"functions_s.html#index_s"}, +{text:"t",url:"functions_t.html#index_t"}, +{text:"u",url:"functions_u.html#index_u"}, +{text:"v",url:"functions_v.html#index_v"}, +{text:"w",url:"functions_w.html#index_w"}, +{text:"z",url:"functions_z.html#index_z"}]}, +{text:"Variables",url:"functions_vars.html",children:[ +{text:"_",url:"functions_vars.html#index__"}, +{text:"a",url:"functions_vars_a.html#index_a"}, +{text:"b",url:"functions_vars_b.html#index_b"}, +{text:"c",url:"functions_vars_c.html#index_c"}, +{text:"d",url:"functions_vars_d.html#index_d"}, +{text:"e",url:"functions_vars_e.html#index_e"}, +{text:"f",url:"functions_vars_f.html#index_f"}, +{text:"g",url:"functions_vars_g.html#index_g"}, +{text:"h",url:"functions_vars_h.html#index_h"}, +{text:"i",url:"functions_vars_i.html#index_i"}, +{text:"j",url:"functions_vars_j.html#index_j"}, +{text:"k",url:"functions_vars_k.html#index_k"}, +{text:"l",url:"functions_vars_l.html#index_l"}, +{text:"m",url:"functions_vars_m.html#index_m"}, +{text:"n",url:"functions_vars_n.html#index_n"}, +{text:"o",url:"functions_vars_o.html#index_o"}, +{text:"p",url:"functions_vars_p.html#index_p"}, +{text:"q",url:"functions_vars_q.html#index_q"}, +{text:"r",url:"functions_vars_r.html#index_r"}, +{text:"s",url:"functions_vars_s.html#index_s"}, +{text:"t",url:"functions_vars_t.html#index_t"}, +{text:"u",url:"functions_vars_u.html#index_u"}, +{text:"v",url:"functions_vars_v.html#index_v"}, +{text:"w",url:"functions_vars_w.html#index_w"}, +{text:"z",url:"functions_vars_z.html#index_z"}]}]}]}, +{text:"Files",url:"files.html",children:[ +{text:"File List",url:"files.html"}, +{text:"Globals",url:"globals.html",children:[ +{text:"All",url:"globals.html",children:[ +{text:"a",url:"globals.html#index_a"}, +{text:"b",url:"globals_b.html#index_b"}, +{text:"c",url:"globals_c.html#index_c"}, +{text:"d",url:"globals_d.html#index_d"}, +{text:"e",url:"globals_e.html#index_e"}, +{text:"f",url:"globals_f.html#index_f"}, +{text:"g",url:"globals_g.html#index_g"}, +{text:"h",url:"globals_h.html#index_h"}, +{text:"i",url:"globals_i.html#index_i"}, +{text:"l",url:"globals_l.html#index_l"}, +{text:"m",url:"globals_m.html#index_m"}, +{text:"n",url:"globals_n.html#index_n"}, +{text:"p",url:"globals_p.html#index_p"}, +{text:"r",url:"globals_r.html#index_r"}, +{text:"s",url:"globals_s.html#index_s"}, +{text:"t",url:"globals_t.html#index_t"}, +{text:"u",url:"globals_u.html#index_u"}, +{text:"w",url:"globals_w.html#index_w"}, +{text:"z",url:"globals_z.html#index_z"}]}, +{text:"Functions",url:"globals_func.html",children:[ +{text:"a",url:"globals_func.html#index_a"}, +{text:"b",url:"globals_func_b.html#index_b"}, +{text:"d",url:"globals_func_d.html#index_d"}, +{text:"e",url:"globals_func_e.html#index_e"}, +{text:"h",url:"globals_func_h.html#index_h"}, +{text:"i",url:"globals_func_i.html#index_i"}, +{text:"l",url:"globals_func_l.html#index_l"}, +{text:"m",url:"globals_func_m.html#index_m"}, +{text:"n",url:"globals_func_n.html#index_n"}, +{text:"p",url:"globals_func_p.html#index_p"}, +{text:"r",url:"globals_func_r.html#index_r"}, +{text:"s",url:"globals_func_s.html#index_s"}, +{text:"t",url:"globals_func_t.html#index_t"}, +{text:"u",url:"globals_func_u.html#index_u"}, +{text:"z",url:"globals_func_z.html#index_z"}]}, +{text:"Variables",url:"globals_vars.html",children:[ +{text:"d",url:"globals_vars.html#index_d"}, +{text:"h",url:"globals_vars.html#index_h"}, +{text:"i",url:"globals_vars.html#index_i"}, +{text:"l",url:"globals_vars.html#index_l"}, +{text:"n",url:"globals_vars.html#index_n"}, +{text:"r",url:"globals_vars.html#index_r"}, +{text:"s",url:"globals_vars.html#index_s"}, +{text:"t",url:"globals_vars.html#index_t"}]}, +{text:"Typedefs",url:"globals_type.html",children:[ +{text:"a",url:"globals_type.html#index_a"}, +{text:"b",url:"globals_type.html#index_b"}, +{text:"d",url:"globals_type.html#index_d"}, +{text:"e",url:"globals_type.html#index_e"}, +{text:"h",url:"globals_type.html#index_h"}, +{text:"i",url:"globals_type.html#index_i"}, +{text:"l",url:"globals_type.html#index_l"}, +{text:"m",url:"globals_type.html#index_m"}, +{text:"n",url:"globals_type.html#index_n"}, +{text:"p",url:"globals_type.html#index_p"}, +{text:"r",url:"globals_type.html#index_r"}, +{text:"s",url:"globals_type.html#index_s"}, +{text:"t",url:"globals_type.html#index_t"}, +{text:"u",url:"globals_type.html#index_u"}]}, +{text:"Enumerations",url:"globals_enum.html",children:[ +{text:"d",url:"globals_enum.html#index_d"}, +{text:"e",url:"globals_enum.html#index_e"}, +{text:"i",url:"globals_enum.html#index_i"}, +{text:"l",url:"globals_enum.html#index_l"}, +{text:"m",url:"globals_enum.html#index_m"}, +{text:"n",url:"globals_enum.html#index_n"}, +{text:"p",url:"globals_enum.html#index_p"}, +{text:"r",url:"globals_enum.html#index_r"}, +{text:"s",url:"globals_enum.html#index_s"}]}, +{text:"Enumerator",url:"globals_eval.html",children:[ +{text:"e",url:"globals_eval.html#index_e"}, +{text:"h",url:"globals_eval.html#index_h"}, +{text:"i",url:"globals_eval.html#index_i"}, +{text:"l",url:"globals_eval.html#index_l"}, +{text:"m",url:"globals_eval.html#index_m"}, +{text:"n",url:"globals_eval.html#index_n"}, +{text:"p",url:"globals_eval.html#index_p"}]}, +{text:"Macros",url:"globals_defs.html",children:[ +{text:"a",url:"globals_defs.html#index_a"}, +{text:"b",url:"globals_defs_b.html#index_b"}, +{text:"c",url:"globals_defs_c.html#index_c"}, +{text:"d",url:"globals_defs_d.html#index_d"}, +{text:"e",url:"globals_defs_e.html#index_e"}, +{text:"f",url:"globals_defs_f.html#index_f"}, +{text:"g",url:"globals_defs_g.html#index_g"}, +{text:"h",url:"globals_defs_h.html#index_h"}, +{text:"i",url:"globals_defs_i.html#index_i"}, +{text:"l",url:"globals_defs_l.html#index_l"}, +{text:"m",url:"globals_defs_m.html#index_m"}, +{text:"n",url:"globals_defs_n.html#index_n"}, +{text:"p",url:"globals_defs_p.html#index_p"}, +{text:"r",url:"globals_defs_r.html#index_r"}, +{text:"s",url:"globals_defs_s.html#index_s"}, +{text:"t",url:"globals_defs_t.html#index_t"}, +{text:"u",url:"globals_defs_u.html#index_u"}, +{text:"w",url:"globals_defs_w.html#index_w"}, +{text:"z",url:"globals_defs_z.html#index_z"}]}]}]}]} diff --git a/Libraries/LwIP/doc/doxygen/output/html/mld6_8c.html b/Libraries/LwIP/doc/doxygen/output/html/mld6_8c.html new file mode 100644 index 0000000..01b5685 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/mld6_8c.html @@ -0,0 +1,283 @@ + + + + + + + +lwIP: src/core/ipv6/mld6.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  mld6.c File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/mld6.h"
                  +#include "lwip/prot/mld6.h"
                  +#include "lwip/icmp6.h"
                  +#include "lwip/ip6.h"
                  +#include "lwip/ip6_addr.h"
                  +#include "lwip/ip.h"
                  +#include "lwip/inet_chksum.h"
                  +#include "lwip/pbuf.h"
                  +#include "lwip/netif.h"
                  +#include "lwip/memp.h"
                  +#include "lwip/stats.h"
                  +#include <string.h>
                  +
                  + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  err_t mld6_stop (struct netif *netif)
                   
                  void mld6_report_groups (struct netif *netif)
                   
                  struct mld_groupmld6_lookfor_group (struct netif *ifp, const ip6_addr_t *addr)
                   
                  void mld6_input (struct pbuf *p, struct netif *inp)
                   
                  err_t mld6_joingroup (const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr)
                   
                  err_t mld6_joingroup_netif (struct netif *netif, const ip6_addr_t *groupaddr)
                   
                  err_t mld6_leavegroup (const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr)
                   
                  err_t mld6_leavegroup_netif (struct netif *netif, const ip6_addr_t *groupaddr)
                   
                  void mld6_tmr (void)
                   
                  +

                  Detailed Description

                  +

                  Multicast listener discovery

                  +

                  Function Documentation

                  + +

                  ◆ mld6_input()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void mld6_input (struct pbufp,
                  struct netifinp 
                  )
                  +
                  +

                  Process an input MLD message. Called by icmp6_input.

                  +
                  Parameters
                  + + + +
                  pthe mld packet, p->payload pointing to the icmpv6 header
                  inpthe netif on which this packet was received
                  +
                  +
                  + +
                  +
                  + +

                  ◆ mld6_lookfor_group()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  struct mld_group* mld6_lookfor_group (struct netififp,
                  const ip6_addr_taddr 
                  )
                  +
                  +

                  Search for a group that is joined on a netif

                  +
                  Parameters
                  + + + +
                  ifpthe network interface for which to look
                  addrthe group ipv6 address to search for
                  +
                  +
                  +
                  Returns
                  a struct mld_group* if the group has been found, NULL if the group wasn't found.
                  + +
                  +
                  + +

                  ◆ mld6_report_groups()

                  + +
                  +
                  + + + + + + + + +
                  void mld6_report_groups (struct netifnetif)
                  +
                  +

                  Report MLD memberships for this interface

                  +
                  Parameters
                  + + +
                  netifnetwork interface on which report MLD memberships
                  +
                  +
                  + +
                  +
                  + +

                  ◆ mld6_stop()

                  + +
                  +
                  + + + + + + + + +
                  err_t mld6_stop (struct netifnetif)
                  +
                  +

                  Stop MLD processing on interface

                  +
                  Parameters
                  + + +
                  netifnetwork interface on which stop MLD processing
                  +
                  +
                  + +
                  +
                  + +

                  ◆ mld6_tmr()

                  + +
                  +
                  + + + + + + + + +
                  void mld6_tmr (void )
                  +
                  +

                  Periodic timer for mld processing. Must be called every MLD6_TMR_INTERVAL milliseconds (100).

                  +

                  When a delaying member expires, a membership report is sent.

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/mld6_8c.js b/Libraries/LwIP/doc/doxygen/output/html/mld6_8c.js new file mode 100644 index 0000000..2d711e1 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/mld6_8c.js @@ -0,0 +1,12 @@ +var mld6_8c = +[ + [ "mld6_input", "mld6_8c.html#a7c190ca25432d466b28f607c3574a841", null ], + [ "mld6_joingroup", "group__mld6.html#ga53560ab6e47163e4888070830bf912a8", null ], + [ "mld6_joingroup_netif", "group__mld6.html#ga2ba41d575a56d27c0af0a08fb8724940", null ], + [ "mld6_leavegroup", "group__mld6.html#ga946b830efc6fd795b07a0964dc7940e5", null ], + [ "mld6_leavegroup_netif", "group__mld6.html#gab664062a15a3ae3e05282eacf4dc0a22", null ], + [ "mld6_lookfor_group", "mld6_8c.html#ad2fbba6bc543dbf994961656d7431eb5", null ], + [ "mld6_report_groups", "mld6_8c.html#a2a08b95a7b3c82da05df1a3b50629686", null ], + [ "mld6_stop", "mld6_8c.html#ab7197d123f21a8863b56cc3871fd5198", null ], + [ "mld6_tmr", "mld6_8c.html#a4ddb496d0a6a466df5665dbed8bd6274", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/mld6_8h.html b/Libraries/LwIP/doc/doxygen/output/html/mld6_8h.html new file mode 100644 index 0000000..8acb6a7 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/mld6_8h.html @@ -0,0 +1,285 @@ + + + + + + + +lwIP: src/include/lwip/mld6.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  mld6.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/pbuf.h"
                  +#include "lwip/netif.h"
                  +
                  + + + +

                  +Data Structures

                  struct  mld_group
                   
                  + + + +

                  +Macros

                  #define netif_mld6_data(netif)   ((struct mld_group *)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_MLD6))
                   
                  + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  err_t mld6_stop (struct netif *netif)
                   
                  void mld6_report_groups (struct netif *netif)
                   
                  void mld6_tmr (void)
                   
                  struct mld_groupmld6_lookfor_group (struct netif *ifp, const ip6_addr_t *addr)
                   
                  void mld6_input (struct pbuf *p, struct netif *inp)
                   
                  err_t mld6_joingroup (const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr)
                   
                  err_t mld6_joingroup_netif (struct netif *netif, const ip6_addr_t *groupaddr)
                   
                  err_t mld6_leavegroup (const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr)
                   
                  err_t mld6_leavegroup_netif (struct netif *netif, const ip6_addr_t *groupaddr)
                   
                  +

                  Detailed Description

                  +

                  Multicast listener discovery for IPv6. Aims to be compliant with RFC 2710. No support for MLDv2.

                  +

                  Function Documentation

                  + +

                  ◆ mld6_input()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void mld6_input (struct pbufp,
                  struct netifinp 
                  )
                  +
                  +

                  Process an input MLD message. Called by icmp6_input.

                  +
                  Parameters
                  + + + +
                  pthe mld packet, p->payload pointing to the icmpv6 header
                  inpthe netif on which this packet was received
                  +
                  +
                  + +
                  +
                  + +

                  ◆ mld6_lookfor_group()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  struct mld_group* mld6_lookfor_group (struct netififp,
                  const ip6_addr_taddr 
                  )
                  +
                  +

                  Search for a group that is joined on a netif

                  +
                  Parameters
                  + + + +
                  ifpthe network interface for which to look
                  addrthe group ipv6 address to search for
                  +
                  +
                  +
                  Returns
                  a struct mld_group* if the group has been found, NULL if the group wasn't found.
                  + +
                  +
                  + +

                  ◆ mld6_report_groups()

                  + +
                  +
                  + + + + + + + + +
                  void mld6_report_groups (struct netifnetif)
                  +
                  +

                  Report MLD memberships for this interface

                  +
                  Parameters
                  + + +
                  netifnetwork interface on which report MLD memberships
                  +
                  +
                  + +
                  +
                  + +

                  ◆ mld6_stop()

                  + +
                  +
                  + + + + + + + + +
                  err_t mld6_stop (struct netifnetif)
                  +
                  +

                  Stop MLD processing on interface

                  +
                  Parameters
                  + + +
                  netifnetwork interface on which stop MLD processing
                  +
                  +
                  + +
                  +
                  + +

                  ◆ mld6_tmr()

                  + +
                  +
                  + + + + + + + + +
                  void mld6_tmr (void )
                  +
                  +

                  Periodic timer for mld processing. Must be called every MLD6_TMR_INTERVAL milliseconds (100).

                  +

                  When a delaying member expires, a membership report is sent.

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/mld6_8h.js b/Libraries/LwIP/doc/doxygen/output/html/mld6_8h.js new file mode 100644 index 0000000..25e5575 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/mld6_8h.js @@ -0,0 +1,14 @@ +var mld6_8h = +[ + [ "mld_group", "structmld__group.html", "structmld__group" ], + [ "netif_mld6_data", "group__mld6.html#ga02a2259082f22c5989a3c929be95e641", null ], + [ "mld6_input", "mld6_8h.html#a7c190ca25432d466b28f607c3574a841", null ], + [ "mld6_joingroup", "group__mld6.html#ga53560ab6e47163e4888070830bf912a8", null ], + [ "mld6_joingroup_netif", "group__mld6.html#ga2ba41d575a56d27c0af0a08fb8724940", null ], + [ "mld6_leavegroup", "group__mld6.html#ga946b830efc6fd795b07a0964dc7940e5", null ], + [ "mld6_leavegroup_netif", "group__mld6.html#gab664062a15a3ae3e05282eacf4dc0a22", null ], + [ "mld6_lookfor_group", "mld6_8h.html#ad2fbba6bc543dbf994961656d7431eb5", null ], + [ "mld6_report_groups", "mld6_8h.html#a2a08b95a7b3c82da05df1a3b50629686", null ], + [ "mld6_stop", "mld6_8h.html#ab7197d123f21a8863b56cc3871fd5198", null ], + [ "mld6_tmr", "mld6_8h.html#a4ddb496d0a6a466df5665dbed8bd6274", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/modules.html b/Libraries/LwIP/doc/doxygen/output/html/modules.html new file mode 100644 index 0000000..766f4ac --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/modules.html @@ -0,0 +1,238 @@ + + + + + + + +lwIP: Modules + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  Modules
                  +
                  +
                  +
                  Here is a list of all modules:
                  +
                  [detail level 12345]
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                   lwIP
                   Mainloop mode ("NO_SYS")
                   OS mode (TCPIP thread)
                   Porting (system abstraction layer)
                   Non-standard functions
                   OS abstraction layer
                   Time
                   Critical sections
                   Compiler/platform abstraction
                   Performance measurement
                   Version
                   Options (lwipopts.h)
                   Debugging
                   Infrastructure
                   Callback-style APIs
                   Thread-safe APIs
                   IPv4
                   PBUF
                   NETIF
                   IPv6
                   Infrastructure
                   IP address handling
                   IPv4 only
                   IPv6 only
                   Memory pools
                   Packet buffers (PBUF)
                   Error codes
                   IANA assigned numbers
                   IEEE assigned numbers
                   APIs
                   "raw" APIs
                   Application layered TCP Introduction
                   DNS
                   IP
                   Network interface (NETIF)
                   RAW
                   TCP
                   UDP
                   Ethernet
                   Sequential-style APIs
                   Netconn API
                   NETIF API
                   Socket API
                   Interface Identification API
                   NETDB API
                   NETIFs
                   IEEE 802.1D bridge
                   Options
                   FDB example code
                   6LoWPAN (RFC4944)
                   6LoWPAN over BLE (RFC7668)
                   PPP
                   SLIP
                   ZEP - ZigBee Encapsulation Protocol
                   Applications
                   HTTP client
                   HTTP server
                   Options
                   Iperf server
                   MDNS
                   Options
                   MQTT client
                   Options
                   NETBIOS responder
                   Options
                   SMTP client
                   Options
                   SNMPv2c/v3 agent
                   Core
                   Traps
                   MIB2
                   Options
                   SNTP
                   Options
                   TFTP server
                   Options
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/modules.js b/Libraries/LwIP/doc/doxygen/output/html/modules.js new file mode 100644 index 0000000..f2152ac --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/modules.js @@ -0,0 +1,8 @@ +var modules = +[ + [ "lwIP", "group__lwip.html", "group__lwip" ], + [ "Infrastructure", "group__infrastructure.html", "group__infrastructure" ], + [ "APIs", "group__api.html", "group__api" ], + [ "NETIFs", "group__netifs.html", "group__netifs" ], + [ "Applications", "group__apps.html", "group__apps" ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/mqtt_8c.html b/Libraries/LwIP/doc/doxygen/output/html/mqtt_8c.html new file mode 100644 index 0000000..ef3a476 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/mqtt_8c.html @@ -0,0 +1,276 @@ + + + + + + + +lwIP: src/apps/mqtt/mqtt.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  mqtt.c File Reference
                  +
                  +
                  +
                  #include "lwip/apps/mqtt.h"
                  +#include "lwip/apps/mqtt_priv.h"
                  +#include "lwip/timeouts.h"
                  +#include "lwip/ip_addr.h"
                  +#include "lwip/mem.h"
                  +#include "lwip/err.h"
                  +#include "lwip/pbuf.h"
                  +#include "lwip/altcp.h"
                  +#include "lwip/altcp_tcp.h"
                  +#include "lwip/altcp_tls.h"
                  +#include <string.h>
                  +
                  + + + + + + + + + +

                  +Macros

                  #define MQTT_DEBUG   LWIP_DBG_OFF
                   
                  #define MQTT_CTL_PACKET_TYPE(fixed_hdr_byte0)   ((fixed_hdr_byte0 & 0xf0) >> 4)
                   
                  #define mqtt_ringbuf_free(rb)   (MQTT_OUTPUT_RINGBUF_SIZE - mqtt_ringbuf_len(rb))
                   
                  #define mqtt_ringbuf_linear_read_length(rb)   LWIP_MIN(mqtt_ringbuf_len(rb), (MQTT_OUTPUT_RINGBUF_SIZE - (rb)->get))
                   
                  + + + + + + + +

                  +Enumerations

                  enum  
                   
                  enum  mqtt_message_type
                   
                  enum  mqtt_connect_flag
                   
                  + + + + + + + + + + + + + + + + + +

                  +Functions

                  err_t mqtt_publish (mqtt_client_t *client, const char *topic, const void *payload, u16_t payload_length, u8_t qos, u8_t retain, mqtt_request_cb_t cb, void *arg)
                   
                  err_t mqtt_sub_unsub (mqtt_client_t *client, const char *topic, u8_t qos, mqtt_request_cb_t cb, void *arg, u8_t sub)
                   
                  void mqtt_set_inpub_callback (mqtt_client_t *client, mqtt_incoming_publish_cb_t pub_cb, mqtt_incoming_data_cb_t data_cb, void *arg)
                   
                  mqtt_client_tmqtt_client_new (void)
                   
                  void mqtt_client_free (mqtt_client_t *client)
                   
                  err_t mqtt_client_connect (mqtt_client_t *client, const ip_addr_t *ip_addr, u16_t port, mqtt_connection_cb_t cb, void *arg, const struct mqtt_connect_client_info_t *client_info)
                   
                  void mqtt_disconnect (mqtt_client_t *client)
                   
                  u8_t mqtt_client_is_connected (mqtt_client_t *client)
                   
                  +

                  Detailed Description

                  +

                  MQTT client

                  +

                  Macro Definition Documentation

                  + +

                  ◆ MQTT_CTL_PACKET_TYPE

                  + +
                  +
                  + + + + + + + + +
                  #define MQTT_CTL_PACKET_TYPE( fixed_hdr_byte0)   ((fixed_hdr_byte0 & 0xf0) >> 4)
                  +
                  +

                  Helpers to extract control packet type and qos from first byte in fixed header

                  + +
                  +
                  + +

                  ◆ MQTT_DEBUG

                  + +
                  +
                  + + + + +
                  #define MQTT_DEBUG   LWIP_DBG_OFF
                  +
                  +

                  MQTT_DEBUG: Default is off.

                  + +
                  +
                  + +

                  ◆ mqtt_ringbuf_free

                  + +
                  +
                  + + + + + + + + +
                  #define mqtt_ringbuf_free( rb)   (MQTT_OUTPUT_RINGBUF_SIZE - mqtt_ringbuf_len(rb))
                  +
                  +

                  Return number of bytes free in ring buffer

                  + +
                  +
                  + +

                  ◆ mqtt_ringbuf_linear_read_length

                  + +
                  +
                  + + + + + + + + +
                  #define mqtt_ringbuf_linear_read_length( rb)   LWIP_MIN(mqtt_ringbuf_len(rb), (MQTT_OUTPUT_RINGBUF_SIZE - (rb)->get))
                  +
                  +

                  Return number of bytes possible to read without wrapping around

                  + +
                  +
                  +

                  Enumeration Type Documentation

                  + +

                  ◆ anonymous enum

                  + +
                  +
                  + + + + +
                  anonymous enum
                  +
                  +

                  MQTT client connection states

                  + +
                  +
                  + +

                  ◆ mqtt_connect_flag

                  + +
                  +
                  + + + + +
                  enum mqtt_connect_flag
                  +
                  +

                  MQTT connect flags, only used in CONNECT message

                  + +
                  +
                  + +

                  ◆ mqtt_message_type

                  + +
                  +
                  + + + + +
                  enum mqtt_message_type
                  +
                  +

                  MQTT control message types

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/mqtt_8c.js b/Libraries/LwIP/doc/doxygen/output/html/mqtt_8c.js new file mode 100644 index 0000000..8048e26 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/mqtt_8c.js @@ -0,0 +1,17 @@ +var mqtt_8c = +[ + [ "MQTT_CTL_PACKET_TYPE", "mqtt_8c.html#a45c57ebd31832f1c128d847067c4688b", null ], + [ "MQTT_DEBUG", "mqtt_8c.html#a99c325e06cc17ee24e09dab251606f9d", null ], + [ "mqtt_ringbuf_free", "mqtt_8c.html#afba101fbf26b556c869060d3d013c8fa", null ], + [ "mqtt_ringbuf_linear_read_length", "mqtt_8c.html#ad82b4039213ab3f1d9e4bcd3aa0c88a3", null ], + [ "mqtt_connect_flag", "mqtt_8c.html#a4f6c42ed730546ff755e3bb99989dd12", null ], + [ "mqtt_message_type", "mqtt_8c.html#ac243cf15beb51b2206e36da86c2f95f1", null ], + [ "mqtt_client_connect", "group__mqtt.html#gadf4d2a3f1b12fb6cbc020b126f3125f0", null ], + [ "mqtt_client_free", "group__mqtt.html#gaa0fa1d985c322a9c91a51322db254882", null ], + [ "mqtt_client_is_connected", "group__mqtt.html#ga98f0fd168112b8b7db59bcd7a325a5c5", null ], + [ "mqtt_client_new", "group__mqtt.html#gae7e19e236eb6122c8c39e93db6f5f53f", null ], + [ "mqtt_disconnect", "group__mqtt.html#ga73d8dd718bce09bfaab452770b4f76e6", null ], + [ "mqtt_publish", "group__mqtt.html#gade9850d716e81fde572cb012be795d2f", null ], + [ "mqtt_set_inpub_callback", "group__mqtt.html#gafdfa0e65b217e92835d35858924565cf", null ], + [ "mqtt_sub_unsub", "group__mqtt.html#gafdb39d4a9758f98c02451aaa9a9b3103", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/mqtt_8h.html b/Libraries/LwIP/doc/doxygen/output/html/mqtt_8h.html new file mode 100644 index 0000000..3e4391b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/mqtt_8h.html @@ -0,0 +1,178 @@ + + + + + + + +lwIP: src/include/lwip/apps/mqtt.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  mqtt.h File Reference
                  +
                  +
                  +
                  #include "lwip/apps/mqtt_opts.h"
                  +#include "lwip/err.h"
                  +#include "lwip/ip_addr.h"
                  +#include "lwip/prot/iana.h"
                  +
                  + + + +

                  +Data Structures

                  struct  mqtt_connect_client_info_t
                   
                  + + + + + + + + + +

                  +Macros

                  #define MQTT_PORT   LWIP_IANA_PORT_MQTT
                   
                  #define MQTT_TLS_PORT   LWIP_IANA_PORT_SECURE_MQTT
                   
                  #define mqtt_subscribe(client, topic, qos, cb, arg)   mqtt_sub_unsub(client, topic, qos, cb, arg, 1)
                   
                  #define mqtt_unsubscribe(client, topic, cb, arg)   mqtt_sub_unsub(client, topic, 0, cb, arg, 0)
                   
                  + + + + + + + + + +

                  +Typedefs

                  typedef void(* mqtt_connection_cb_t) (mqtt_client_t *client, void *arg, mqtt_connection_status_t status)
                   
                  typedef void(* mqtt_incoming_data_cb_t) (void *arg, const u8_t *data, u16_t len, u8_t flags)
                   
                  typedef void(* mqtt_incoming_publish_cb_t) (void *arg, const char *topic, u32_t tot_len)
                   
                  typedef void(* mqtt_request_cb_t) (void *arg, err_t err)
                   
                  + + + + + +

                  +Enumerations

                  enum  mqtt_connection_status_t {
                  +  MQTT_CONNECT_ACCEPTED = 0, +MQTT_CONNECT_REFUSED_PROTOCOL_VERSION = 1, +MQTT_CONNECT_REFUSED_IDENTIFIER = 2, +MQTT_CONNECT_REFUSED_SERVER = 3, +
                  +  MQTT_CONNECT_REFUSED_USERNAME_PASS = 4, +MQTT_CONNECT_REFUSED_NOT_AUTHORIZED_ = 5, +MQTT_CONNECT_DISCONNECTED = 256, +MQTT_CONNECT_TIMEOUT = 257 +
                  + }
                   
                  enum  { MQTT_DATA_FLAG_LAST = 1 + }
                   
                  + + + + + + + + + + + + + + + + + +

                  +Functions

                  err_t mqtt_client_connect (mqtt_client_t *client, const ip_addr_t *ipaddr, u16_t port, mqtt_connection_cb_t cb, void *arg, const struct mqtt_connect_client_info_t *client_info)
                   
                  void mqtt_disconnect (mqtt_client_t *client)
                   
                  mqtt_client_tmqtt_client_new (void)
                   
                  void mqtt_client_free (mqtt_client_t *client)
                   
                  u8_t mqtt_client_is_connected (mqtt_client_t *client)
                   
                  void mqtt_set_inpub_callback (mqtt_client_t *client, mqtt_incoming_publish_cb_t, mqtt_incoming_data_cb_t data_cb, void *arg)
                   
                  err_t mqtt_sub_unsub (mqtt_client_t *client, const char *topic, u8_t qos, mqtt_request_cb_t cb, void *arg, u8_t sub)
                   
                  err_t mqtt_publish (mqtt_client_t *client, const char *topic, const void *payload, u16_t payload_length, u8_t qos, u8_t retain, mqtt_request_cb_t cb, void *arg)
                   
                  +

                  Detailed Description

                  +

                  MQTT client

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/mqtt_8h.js b/Libraries/LwIP/doc/doxygen/output/html/mqtt_8h.js new file mode 100644 index 0000000..666829a --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/mqtt_8h.js @@ -0,0 +1,30 @@ +var mqtt_8h = +[ + [ "MQTT_PORT", "group__mqtt.html#gaa8632baff6bbb5004385998918f1e6bd", null ], + [ "mqtt_subscribe", "group__mqtt.html#ga83d6a6d811b201a74d793bc1b5d4e029", null ], + [ "MQTT_TLS_PORT", "group__mqtt.html#ga6610174f17b9ecbcf2bc66a4fd5a6b0f", null ], + [ "mqtt_unsubscribe", "group__mqtt.html#ga0f133ef09cbe56c46ebe2cc21afccf3f", null ], + [ "mqtt_connection_cb_t", "group__mqtt.html#ga8558743bdb7d599a93844fbc56c9029f", null ], + [ "mqtt_incoming_data_cb_t", "group__mqtt.html#gafec7e75fe6a746eef9ca411463446c81", null ], + [ "mqtt_incoming_publish_cb_t", "group__mqtt.html#ga7116bb85255394cec4b1d9fa38842c29", null ], + [ "mqtt_request_cb_t", "group__mqtt.html#gacad2bbe2cee76eaa120cc63e2f6094fd", null ], + [ "MQTT_DATA_FLAG_LAST", "group__mqtt.html#gga99fb83031ce9923c84392b4e92f956b5a79cd00d0a5a8df13207e0c49447df87f", null ], + [ "mqtt_connection_status_t", "group__mqtt.html#ga8cf0f360ab20343af37e1d124395a77d", [ + [ "MQTT_CONNECT_ACCEPTED", "group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77da074dc1d289b8e8d4aad91f6a2cb93dc1", null ], + [ "MQTT_CONNECT_REFUSED_PROTOCOL_VERSION", "group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77da41f8aa97142be337cb639f94d9145190", null ], + [ "MQTT_CONNECT_REFUSED_IDENTIFIER", "group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77da28ffe49b0175adaa2b9a27cb4873224a", null ], + [ "MQTT_CONNECT_REFUSED_SERVER", "group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77dade28ec1c2ce3d874e91251d683c92b2a", null ], + [ "MQTT_CONNECT_REFUSED_USERNAME_PASS", "group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77da290cf9037054c42022cc864cfade896a", null ], + [ "MQTT_CONNECT_REFUSED_NOT_AUTHORIZED_", "group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77dafc4888158dd6ee84269a5f0bfdc12b17", null ], + [ "MQTT_CONNECT_DISCONNECTED", "group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77da321f5ce31b173f235de1a517fcfd00dd", null ], + [ "MQTT_CONNECT_TIMEOUT", "group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77da57153f2ab4331c6f76a9ee74e1bcfc62", null ] + ] ], + [ "mqtt_client_connect", "group__mqtt.html#gadf4d2a3f1b12fb6cbc020b126f3125f0", null ], + [ "mqtt_client_free", "group__mqtt.html#gaa0fa1d985c322a9c91a51322db254882", null ], + [ "mqtt_client_is_connected", "group__mqtt.html#ga98f0fd168112b8b7db59bcd7a325a5c5", null ], + [ "mqtt_client_new", "group__mqtt.html#gae7e19e236eb6122c8c39e93db6f5f53f", null ], + [ "mqtt_disconnect", "group__mqtt.html#ga73d8dd718bce09bfaab452770b4f76e6", null ], + [ "mqtt_publish", "group__mqtt.html#gade9850d716e81fde572cb012be795d2f", null ], + [ "mqtt_set_inpub_callback", "group__mqtt.html#gafdfa0e65b217e92835d35858924565cf", null ], + [ "mqtt_sub_unsub", "group__mqtt.html#gafdb39d4a9758f98c02451aaa9a9b3103", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/mqtt__opts_8h.html b/Libraries/LwIP/doc/doxygen/output/html/mqtt__opts_8h.html new file mode 100644 index 0000000..a42a992 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/mqtt__opts_8h.html @@ -0,0 +1,121 @@ + + + + + + + +lwIP: src/include/lwip/apps/mqtt_opts.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  mqtt_opts.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +
                  + + + + + + + + + + + + + +

                  +Macros

                  #define MQTT_OUTPUT_RINGBUF_SIZE   256
                   
                  #define MQTT_VAR_HEADER_BUFFER_LEN   128
                   
                  #define MQTT_REQ_MAX_IN_FLIGHT   4
                   
                  #define MQTT_CYCLIC_TIMER_INTERVAL   5
                   
                  #define MQTT_REQ_TIMEOUT   30
                   
                  #define MQTT_CONNECT_TIMOUT   100
                   
                  +

                  Detailed Description

                  +

                  MQTT client options

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/mqtt__opts_8h.js b/Libraries/LwIP/doc/doxygen/output/html/mqtt__opts_8h.js new file mode 100644 index 0000000..58667a0 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/mqtt__opts_8h.js @@ -0,0 +1,9 @@ +var mqtt__opts_8h = +[ + [ "MQTT_CONNECT_TIMOUT", "group__mqtt__opts.html#gac5d0580d1caf57dac1cb56662e5d9f7b", null ], + [ "MQTT_CYCLIC_TIMER_INTERVAL", "group__mqtt__opts.html#ga1d89fda808c7047eab7a67d3785aea8e", null ], + [ "MQTT_OUTPUT_RINGBUF_SIZE", "group__mqtt__opts.html#ga70627bafaffa071875cee9edc38d942b", null ], + [ "MQTT_REQ_MAX_IN_FLIGHT", "group__mqtt__opts.html#gae82460b35de2291e9661e440c3458e8f", null ], + [ "MQTT_REQ_TIMEOUT", "group__mqtt__opts.html#ga262639f2b45f6e064fb53156396d6d0a", null ], + [ "MQTT_VAR_HEADER_BUFFER_LEN", "group__mqtt__opts.html#ga8275ef78a85fb14c3ac1423c70e45805", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/mqtt__priv_8h.html b/Libraries/LwIP/doc/doxygen/output/html/mqtt__priv_8h.html new file mode 100644 index 0000000..039298b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/mqtt__priv_8h.html @@ -0,0 +1,116 @@ + + + + + + + +lwIP: src/include/lwip/apps/mqtt_priv.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  mqtt_priv.h File Reference
                  +
                  +
                  +
                  #include "lwip/apps/mqtt.h"
                  +#include "lwip/altcp.h"
                  +
                  + + + + + + + +

                  +Data Structures

                  struct  mqtt_request_t
                   
                  struct  mqtt_ringbuf_t
                   
                  struct  mqtt_client_s
                   
                  +

                  Detailed Description

                  +

                  MQTT client (private interface)

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/multithreading.html b/Libraries/LwIP/doc/doxygen/output/html/multithreading.html new file mode 100644 index 0000000..6231c06 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/multithreading.html @@ -0,0 +1,116 @@ + + + + + + + +lwIP: Multithreading + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  Multithreading
                  +
                  +
                  +

                  lwIP started targeting single-threaded environments. When adding multi- threading support, instead of making the core thread-safe, another approach was chosen: there is one main thread running the lwIP core (also known as the "tcpip_thread"). When running in a multithreaded environment, raw API functions MUST only be called from the core thread since raw API functions are not protected from concurrent access (aside from pbuf- and memory management functions). Application threads using the sequential- or socket API communicate with this main thread through message passing.

                  +

                  As such, the list of functions that may be called from other threads or an ISR is very limited! Only functions from these API header files are thread-safe:

                  +

                  Additionaly, memory (de-)allocation functions may be called from multiple threads (not ISR!) with NO_SYS=0 since they are protected by SYS_LIGHTWEIGHT_PROT and/or semaphores.

                  +

                  Netconn or Socket API functions are thread safe against the core thread but they are not reentrant at the control block granularity level. That is, a UDP or TCP control block must not be shared among multiple threads without proper locking.

                  +

                  If SYS_LIGHTWEIGHT_PROT is set to 1 and LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT is set to 1, pbuf_free() may also be called from another thread or an ISR (since only then, mem_free - for PBUF_RAM - may be called from an ISR: otherwise, the HEAP is only protected by semaphores).

                  +

                  How to get threading done right

                  +

                  It is strongly recommended to implement the LWIP_ASSERT_CORE_LOCKED() macro in an application that uses multithreading. lwIP code has several places where a check for a correct thread context is implemented which greatly helps the user to get threading done right. See the example sys_arch.c files in unix and Win32 port in the contrib repository.

                  +

                  In short: Copy the functions sys_mark_tcpip_thread() and sys_check_core_locking() to your port and modify them to work with your OS. Then let LWIP_ASSERT_CORE_LOCKED() and LWIP_MARK_TCPIP_THREAD() point to these functions.

                  +

                  If you use LWIP_TCPIP_CORE_LOCKING, you also need to copy and adapt the functions sys_lock_tcpip_core() and sys_unlock_tcpip_core(). Let LOCK_TCPIP_CORE() and UNLOCK_TCPIP_CORE() point to these functions.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/navtree.css b/Libraries/LwIP/doc/doxygen/output/html/navtree.css new file mode 100644 index 0000000..0cc7e77 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/navtree.css @@ -0,0 +1,146 @@ +#nav-tree .children_ul { + margin:0; + padding:4px; +} + +#nav-tree ul { + list-style:none outside none; + margin:0px; + padding:0px; +} + +#nav-tree li { + white-space:nowrap; + margin:0px; + padding:0px; +} + +#nav-tree .plus { + margin:0px; +} + +#nav-tree .selected { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} + +#nav-tree img { + margin:0px; + padding:0px; + border:0px; + vertical-align: middle; +} + +#nav-tree a { + text-decoration:none; + padding:0px; + margin:0px; + outline:none; +} + +#nav-tree .label { + margin:0px; + padding:0px; + font: 12px 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +} + +#nav-tree .label a { + padding:2px; +} + +#nav-tree .selected a { + text-decoration:none; + color:#fff; +} + +#nav-tree .children_ul { + margin:0px; + padding:0px; +} + +#nav-tree .item { + margin:0px; + padding:0px; +} + +#nav-tree { + padding: 0px 0px; + background-color: #FAFAFF; + font-size:14px; + overflow:auto; +} + +#doc-content { + overflow:auto; + display:block; + padding:0px; + margin:0px; + -webkit-overflow-scrolling : touch; /* iOS 5+ */ +} + +#side-nav { + padding:0 6px 0 0; + margin: 0px; + display:block; + position: absolute; + left: 0px; + width: 250px; +} + +.ui-resizable .ui-resizable-handle { + display:block; +} + +.ui-resizable-e { + background-image:url("splitbar.png"); + background-size:100%; + background-repeat:no-repeat; + background-attachment: scroll; + cursor:ew-resize; + height:100%; + right:0; + top:0; + width:6px; +} + +.ui-resizable-handle { + display:none; + font-size:0.1px; + position:absolute; + z-index:1; +} + +#nav-tree-contents { + margin: 6px 0px 0px 0px; +} + +#nav-tree { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + -webkit-overflow-scrolling : touch; /* iOS 5+ */ +} + +#nav-sync { + position:absolute; + top:5px; + right:24px; + z-index:0; +} + +#nav-sync img { + opacity:0.3; +} + +#nav-sync img:hover { + opacity:0.9; +} + +@media print +{ + #nav-tree { display: none; } + div.ui-resizable-handle { display: none; position: relative; } +} + diff --git a/Libraries/LwIP/doc/doxygen/output/html/navtree.js b/Libraries/LwIP/doc/doxygen/output/html/navtree.js new file mode 100644 index 0000000..e6d31b0 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/navtree.js @@ -0,0 +1,517 @@ +var navTreeSubIndices = new Array(); +var arrowDown = '▼'; +var arrowRight = '►'; + +function getData(varName) +{ + var i = varName.lastIndexOf('/'); + var n = i>=0 ? varName.substring(i+1) : varName; + return eval(n.replace(/\-/g,'_')); +} + +function stripPath(uri) +{ + return uri.substring(uri.lastIndexOf('/')+1); +} + +function stripPath2(uri) +{ + var i = uri.lastIndexOf('/'); + var s = uri.substring(i+1); + var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/); + return m ? uri.substring(i-6) : s; +} + +function hashValue() +{ + return $(location).attr('hash').substring(1).replace(/[^\w\-]/g,''); +} + +function hashUrl() +{ + return '#'+hashValue(); +} + +function pathName() +{ + return $(location).attr('pathname').replace(/[^-A-Za-z0-9+&@#/%?=~_|!:,.;\(\)]/g, ''); +} + +function localStorageSupported() +{ + try { + return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem; + } + catch(e) { + return false; + } +} + + +function storeLink(link) +{ + if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) { + window.localStorage.setItem('navpath',link); + } +} + +function deleteLink() +{ + if (localStorageSupported()) { + window.localStorage.setItem('navpath',''); + } +} + +function cachedLink() +{ + if (localStorageSupported()) { + return window.localStorage.getItem('navpath'); + } else { + return ''; + } +} + +function getScript(scriptName,func,show) +{ + var head = document.getElementsByTagName("head")[0]; + var script = document.createElement('script'); + script.id = scriptName; + script.type = 'text/javascript'; + script.onload = func; + script.src = scriptName+'.js'; + if ($.browser.msie && $.browser.version<=8) { + // script.onload does not work with older versions of IE + script.onreadystatechange = function() { + if (script.readyState=='complete' || script.readyState=='loaded') { + func(); if (show) showRoot(); + } + } + } + head.appendChild(script); +} + +function createIndent(o,domNode,node,level) +{ + var level=-1; + var n = node; + while (n.parentNode) { level++; n=n.parentNode; } + if (node.childrenData) { + var imgNode = document.createElement("span"); + imgNode.className = 'arrow'; + imgNode.style.paddingLeft=(16*level).toString()+'px'; + imgNode.innerHTML=arrowRight; + node.plus_img = imgNode; + node.expandToggle = document.createElement("a"); + node.expandToggle.href = "javascript:void(0)"; + node.expandToggle.onclick = function() { + if (node.expanded) { + $(node.getChildrenUL()).slideUp("fast"); + node.plus_img.innerHTML=arrowRight; + node.expanded = false; + } else { + expandNode(o, node, false, false); + } + } + node.expandToggle.appendChild(imgNode); + domNode.appendChild(node.expandToggle); + } else { + var span = document.createElement("span"); + span.className = 'arrow'; + span.style.width = 16*(level+1)+'px'; + span.innerHTML = ' '; + domNode.appendChild(span); + } +} + +var animationInProgress = false; + +function gotoAnchor(anchor,aname,updateLocation) +{ + var pos, docContent = $('#doc-content'); + var ancParent = $(anchor.parent()); + if (ancParent.hasClass('memItemLeft') || + ancParent.hasClass('fieldname') || + ancParent.hasClass('fieldtype') || + ancParent.is(':header')) + { + pos = ancParent.position().top; + } else if (anchor.position()) { + pos = anchor.position().top; + } + if (pos) { + var dist = Math.abs(Math.min( + pos-docContent.offset().top, + docContent[0].scrollHeight- + docContent.height()-docContent.scrollTop())); + animationInProgress=true; + docContent.animate({ + scrollTop: pos + docContent.scrollTop() - docContent.offset().top + },Math.max(50,Math.min(500,dist)),function(){ + if (updateLocation) window.location.href=aname; + animationInProgress=false; + }); + } +} + +function newNode(o, po, text, link, childrenData, lastNode) +{ + var node = new Object(); + node.children = Array(); + node.childrenData = childrenData; + node.depth = po.depth + 1; + node.relpath = po.relpath; + node.isLast = lastNode; + + node.li = document.createElement("li"); + po.getChildrenUL().appendChild(node.li); + node.parentNode = po; + + node.itemDiv = document.createElement("div"); + node.itemDiv.className = "item"; + + node.labelSpan = document.createElement("span"); + node.labelSpan.className = "label"; + + createIndent(o,node.itemDiv,node,0); + node.itemDiv.appendChild(node.labelSpan); + node.li.appendChild(node.itemDiv); + + var a = document.createElement("a"); + node.labelSpan.appendChild(a); + node.label = document.createTextNode(text); + node.expanded = false; + a.appendChild(node.label); + if (link) { + var url; + if (link.substring(0,1)=='^') { + url = link.substring(1); + link = url; + } else { + url = node.relpath+link; + } + a.className = stripPath(link.replace('#',':')); + if (link.indexOf('#')!=-1) { + var aname = '#'+link.split('#')[1]; + var srcPage = stripPath(pathName()); + var targetPage = stripPath(link.split('#')[0]); + a.href = srcPage!=targetPage ? url : "javascript:void(0)"; + a.onclick = function(){ + storeLink(link); + if (!$(a).parent().parent().hasClass('selected')) + { + $('.item').removeClass('selected'); + $('.item').removeAttr('id'); + $(a).parent().parent().addClass('selected'); + $(a).parent().parent().attr('id','selected'); + } + var anchor = $(aname); + gotoAnchor(anchor,aname,true); + }; + } else { + a.href = url; + a.onclick = function() { storeLink(link); } + } + } else { + if (childrenData != null) + { + a.className = "nolink"; + a.href = "javascript:void(0)"; + a.onclick = node.expandToggle.onclick; + } + } + + node.childrenUL = null; + node.getChildrenUL = function() { + if (!node.childrenUL) { + node.childrenUL = document.createElement("ul"); + node.childrenUL.className = "children_ul"; + node.childrenUL.style.display = "none"; + node.li.appendChild(node.childrenUL); + } + return node.childrenUL; + }; + + return node; +} + +function showRoot() +{ + var headerHeight = $("#top").height(); + var footerHeight = $("#nav-path").height(); + var windowHeight = $(window).height() - headerHeight - footerHeight; + (function (){ // retry until we can scroll to the selected item + try { + var navtree=$('#nav-tree'); + navtree.scrollTo('#selected',0,{offset:-windowHeight/2}); + } catch (err) { + setTimeout(arguments.callee, 0); + } + })(); +} + +function expandNode(o, node, imm, showRoot) +{ + if (node.childrenData && !node.expanded) { + if (typeof(node.childrenData)==='string') { + var varName = node.childrenData; + getScript(node.relpath+varName,function(){ + node.childrenData = getData(varName); + expandNode(o, node, imm, showRoot); + }, showRoot); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } if (imm || ($.browser.msie && $.browser.version>8)) { + // somehow slideDown jumps to the start of tree for IE9 :-( + $(node.getChildrenUL()).show(); + } else { + $(node.getChildrenUL()).slideDown("fast"); + } + node.plus_img.innerHTML = arrowDown; + node.expanded = true; + } + } +} + +function glowEffect(n,duration) +{ + n.addClass('glow').delay(duration).queue(function(next){ + $(this).removeClass('glow');next(); + }); +} + +function highlightAnchor() +{ + var aname = hashUrl(); + var anchor = $(aname); + if (anchor.parent().attr('class')=='memItemLeft'){ + var rows = $('.memberdecls tr[class$="'+hashValue()+'"]'); + glowEffect(rows.children(),300); // member without details + } else if (anchor.parent().attr('class')=='fieldname'){ + glowEffect(anchor.parent().parent(),1000); // enum value + } else if (anchor.parent().attr('class')=='fieldtype'){ + glowEffect(anchor.parent().parent(),1000); // struct field + } else if (anchor.parent().is(":header")) { + glowEffect(anchor.parent(),1000); // section header + } else { + glowEffect(anchor.next(),1000); // normal member + } + gotoAnchor(anchor,aname,false); +} + +function selectAndHighlight(hash,n) +{ + var a; + if (hash) { + var link=stripPath(pathName())+':'+hash.substring(1); + a=$('.item a[class$="'+link+'"]'); + } + if (a && a.length) { + a.parent().parent().addClass('selected'); + a.parent().parent().attr('id','selected'); + highlightAnchor(); + } else if (n) { + $(n.itemDiv).addClass('selected'); + $(n.itemDiv).attr('id','selected'); + } + if ($('#nav-tree-contents .item:first').hasClass('selected')) { + $('#nav-sync').css('top','30px'); + } else { + $('#nav-sync').css('top','5px'); + } + showRoot(); +} + +function showNode(o, node, index, hash) +{ + if (node && node.childrenData) { + if (typeof(node.childrenData)==='string') { + var varName = node.childrenData; + getScript(node.relpath+varName,function(){ + node.childrenData = getData(varName); + showNode(o,node,index,hash); + },true); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } + $(node.getChildrenUL()).css({'display':'block'}); + node.plus_img.innerHTML = arrowDown; + node.expanded = true; + var n = node.children[o.breadcrumbs[index]]; + if (index+11) hash = '#'+parts[1].replace(/[^\w\-]/g,''); + else hash=''; + } + if (hash.match(/^#l\d+$/)) { + var anchor=$('a[name='+hash.substring(1)+']'); + glowEffect(anchor.parent(),1000); // line number + hash=''; // strip line number anchors + } + var url=root+hash; + var i=-1; + while (NAVTREEINDEX[i+1]<=url) i++; + if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath) + } else { + getScript(relpath+'navtreeindex'+i,function(){ + navTreeSubIndices[i] = eval('NAVTREEINDEX'+i); + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath); + } + },true); + } +} + +function showSyncOff(n,relpath) +{ + n.html(''); +} + +function showSyncOn(n,relpath) +{ + n.html(''); +} + +function toggleSyncButton(relpath) +{ + var navSync = $('#nav-sync'); + if (navSync.hasClass('sync')) { + navSync.removeClass('sync'); + showSyncOff(navSync,relpath); + storeLink(stripPath2(pathName())+hashUrl()); + } else { + navSync.addClass('sync'); + showSyncOn(navSync,relpath); + deleteLink(); + } +} + +function initNavTree(toroot,relpath) +{ + var o = new Object(); + o.toroot = toroot; + o.node = new Object(); + o.node.li = document.getElementById("nav-tree-contents"); + o.node.childrenData = NAVTREE; + o.node.children = new Array(); + o.node.childrenUL = document.createElement("ul"); + o.node.getChildrenUL = function() { return o.node.childrenUL; }; + o.node.li.appendChild(o.node.childrenUL); + o.node.depth = 0; + o.node.relpath = relpath; + o.node.expanded = false; + o.node.isLast = true; + o.node.plus_img = document.createElement("span"); + o.node.plus_img.className = 'arrow'; + o.node.plus_img.innerHTML = arrowRight; + + if (localStorageSupported()) { + var navSync = $('#nav-sync'); + if (cachedLink()) { + showSyncOff(navSync,relpath); + navSync.removeClass('sync'); + } else { + showSyncOn(navSync,relpath); + } + navSync.click(function(){ toggleSyncButton(relpath); }); + } + + $(window).load(function(){ + navTo(o,toroot,hashUrl(),relpath); + showRoot(); + }); + + $(window).bind('hashchange', function(){ + if (window.location.hash && window.location.hash.length>1){ + var a; + if ($(location).attr('hash')){ + var clslink=stripPath(pathName())+':'+hashValue(); + a=$('.item a[class$="'+clslink.replace(/ + + + + + + +lwIP: src/core/ipv6/nd6.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  nd6.c File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/nd6.h"
                  +#include "lwip/priv/nd6_priv.h"
                  +#include "lwip/prot/nd6.h"
                  +#include "lwip/prot/icmp6.h"
                  +#include "lwip/pbuf.h"
                  +#include "lwip/mem.h"
                  +#include "lwip/memp.h"
                  +#include "lwip/ip6.h"
                  +#include "lwip/ip6_addr.h"
                  +#include "lwip/inet_chksum.h"
                  +#include "lwip/netif.h"
                  +#include "lwip/icmp6.h"
                  +#include "lwip/mld6.h"
                  +#include "lwip/dhcp6.h"
                  +#include "lwip/ip.h"
                  +#include "lwip/stats.h"
                  +#include "lwip/dns.h"
                  +#include <string.h>
                  +#include "path/to/my/lwip_hooks.h"
                  +
                  + + + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  void nd6_input (struct pbuf *p, struct netif *inp)
                   
                  void nd6_tmr (void)
                   
                  void nd6_clear_destination_cache (void)
                   
                  struct netifnd6_find_route (const ip6_addr_t *ip6addr)
                   
                  err_t nd6_get_next_hop_addr_or_queue (struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr, const u8_t **hwaddrp)
                   
                  u16_t nd6_get_destination_mtu (const ip6_addr_t *ip6addr, struct netif *netif)
                   
                  void nd6_reachability_hint (const ip6_addr_t *ip6addr)
                   
                  void nd6_cleanup_netif (struct netif *netif)
                   
                  void nd6_adjust_mld_membership (struct netif *netif, s8_t addr_idx, u8_t new_state)
                   
                  void nd6_restart_netif (struct netif *netif)
                   
                  +

                  Detailed Description

                  +

                  Neighbor discovery and stateless address autoconfiguration for IPv6. Aims to be compliant with RFC 4861 (Neighbor discovery) and RFC 4862 (Address autoconfiguration).

                  +

                  Function Documentation

                  + +

                  ◆ nd6_adjust_mld_membership()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  void nd6_adjust_mld_membership (struct netifnetif,
                  s8_t addr_idx,
                  u8_t new_state 
                  )
                  +
                  +

                  The state of a local IPv6 address entry is about to change. If needed, join or leave the solicited-node multicast group for the address.

                  +
                  Parameters
                  + + + + +
                  netifThe netif that owns the address.
                  addr_idxThe index of the address.
                  new_stateThe new (IP6_ADDR_) state for the address.
                  +
                  +
                  + +
                  +
                  + +

                  ◆ nd6_cleanup_netif()

                  + +
                  +
                  + + + + + + + + +
                  void nd6_cleanup_netif (struct netifnetif)
                  +
                  +

                  Remove all prefix, neighbor_cache and router entries of the specified netif.

                  +
                  Parameters
                  + + +
                  netifpoints to a network interface
                  +
                  +
                  + +
                  +
                  + +

                  ◆ nd6_clear_destination_cache()

                  + +
                  +
                  + + + + + + + + +
                  void nd6_clear_destination_cache (void )
                  +
                  +

                  Clear the destination cache.

                  +

                  This operation may be necessary for consistency in the light of changing local addresses and/or use of the gateway hook.

                  + +
                  +
                  + +

                  ◆ nd6_find_route()

                  + +
                  +
                  + + + + + + + + +
                  struct netif* nd6_find_route (const ip6_addr_tip6addr)
                  +
                  +

                  Find a router-announced route to the given destination. This route may be based on an on-link prefix or a default router.

                  +

                  If a suitable route is found, the returned netif is guaranteed to be in a suitable state (up, link up) to be used for packet transmission.

                  +
                  Parameters
                  + + +
                  ip6addrthe destination IPv6 address
                  +
                  +
                  +
                  Returns
                  the netif to use for the destination, or NULL if none found
                  + +
                  +
                  + +

                  ◆ nd6_get_destination_mtu()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  u16_t nd6_get_destination_mtu (const ip6_addr_tip6addr,
                  struct netifnetif 
                  )
                  +
                  +

                  Get the Path MTU for a destination.

                  +
                  Parameters
                  + + + +
                  ip6addrthe destination address
                  netifthe netif on which the packet will be sent
                  +
                  +
                  +
                  Returns
                  the Path MTU, if known, or the netif default MTU
                  + +
                  +
                  + +

                  ◆ nd6_get_next_hop_addr_or_queue()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t nd6_get_next_hop_addr_or_queue (struct netifnetif,
                  struct pbufq,
                  const ip6_addr_tip6addr,
                  const u8_t ** hwaddrp 
                  )
                  +
                  +

                  A packet is to be transmitted to a specific IPv6 destination on a specific interface. Check if we can find the hardware address of the next hop to use for the packet. If so, give the hardware address to the caller, which should use it to send the packet right away. Otherwise, enqueue the packet for later transmission while looking up the hardware address, if possible.

                  +

                  As such, this function returns one of three different possible results:

                  +
                    +
                  • ERR_OK with a non-NULL 'hwaddrp': the caller should send the packet now.
                  • +
                  • ERR_OK with a NULL 'hwaddrp': the packet has been enqueued for later.
                  • +
                  • not ERR_OK: something went wrong; forward the error upward in the stack.
                  • +
                  +
                  Parameters
                  + + + + + +
                  netifThe lwIP network interface on which the IP packet will be sent.
                  qThe pbuf(s) containing the IP packet to be sent.
                  ip6addrThe destination IPv6 address of the packet.
                  hwaddrpOn success, filled with a pointer to a HW address or NULL (meaning the packet has been queued).
                  +
                  +
                  +
                  Returns
                    +
                  • ERR_OK on success, ERR_RTE if no route was found for the packet, or ERR_MEM if low memory conditions prohibit sending the packet at all.
                  • +
                  +
                  + +
                  +
                  + +

                  ◆ nd6_input()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void nd6_input (struct pbufp,
                  struct netifinp 
                  )
                  +
                  +

                  Process an incoming neighbor discovery message

                  +
                  Parameters
                  + + + +
                  pthe nd packet, p->payload pointing to the icmpv6 header
                  inpthe netif on which this packet was received
                  +
                  +
                  + +
                  +
                  + +

                  ◆ nd6_reachability_hint()

                  + +
                  +
                  + + + + + + + + +
                  void nd6_reachability_hint (const ip6_addr_tip6addr)
                  +
                  +

                  Provide the Neighbor discovery process with a hint that a destination is reachable. Called by tcp_receive when ACKs are received or sent (as per RFC). This is useful to avoid sending NS messages every 30 seconds.

                  +
                  Parameters
                  + + +
                  ip6addrthe destination address which is know to be reachable by an upper layer protocol (TCP)
                  +
                  +
                  + +
                  +
                  + +

                  ◆ nd6_restart_netif()

                  + +
                  +
                  + + + + + + + + +
                  void nd6_restart_netif (struct netifnetif)
                  +
                  +

                  Netif was added, set up, or reconnected (link up)

                  + +
                  +
                  + +

                  ◆ nd6_tmr()

                  + +
                  +
                  + + + + + + + + +
                  void nd6_tmr (void )
                  +
                  +

                  Periodic timer for Neighbor discovery functions:

                  +
                    +
                  • Update neighbor reachability states
                  • +
                  • Update destination cache entries age
                  • +
                  • Update invalidation timers of default routers and on-link prefixes
                  • +
                  • Update lifetimes of our addresses
                  • +
                  • Perform duplicate address detection (DAD) for our addresses
                  • +
                  • Send router solicitations
                  • +
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/nd6_8c.js b/Libraries/LwIP/doc/doxygen/output/html/nd6_8c.js new file mode 100644 index 0000000..42c9041 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/nd6_8c.js @@ -0,0 +1,13 @@ +var nd6_8c = +[ + [ "nd6_adjust_mld_membership", "nd6_8c.html#a27224542b8ffab81c2ed9f47752bb51e", null ], + [ "nd6_cleanup_netif", "nd6_8c.html#a84f9f52cab7ae37b4dd343536156dc73", null ], + [ "nd6_clear_destination_cache", "nd6_8c.html#a64d7956cf2b0d45025b02661f3f62377", null ], + [ "nd6_find_route", "nd6_8c.html#ac5ce11eaecfb486c322641427f47cffe", null ], + [ "nd6_get_destination_mtu", "nd6_8c.html#af226438f4f9b4aa7c3a2bbdf3c1e948c", null ], + [ "nd6_get_next_hop_addr_or_queue", "nd6_8c.html#ae447c204ebbf71e6ebbc5ed727a73eb9", null ], + [ "nd6_input", "nd6_8c.html#abbb92837e715be0e7d99513a84995831", null ], + [ "nd6_reachability_hint", "nd6_8c.html#a4959990cae26a3996f638ec996f046df", null ], + [ "nd6_restart_netif", "nd6_8c.html#a73d3192204da20be193e3c00c4a0cb54", null ], + [ "nd6_tmr", "nd6_8c.html#a754781b509e69c35a7a4ee7e380399fe", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/nd6_8h.html b/Libraries/LwIP/doc/doxygen/output/html/nd6_8h.html new file mode 100644 index 0000000..49726ff --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/nd6_8h.html @@ -0,0 +1,490 @@ + + + + + + + +lwIP: src/include/lwip/nd6.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  nd6.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/ip6_addr.h"
                  +#include "lwip/err.h"
                  +
                  + + + + + +

                  +Macros

                  #define ND6_TMR_INTERVAL   1000
                   
                  #define ND6_RTR_SOLICITATION_INTERVAL   4000
                   
                  + + + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  void nd6_tmr (void)
                   
                  void nd6_input (struct pbuf *p, struct netif *inp)
                   
                  void nd6_clear_destination_cache (void)
                   
                  struct netifnd6_find_route (const ip6_addr_t *ip6addr)
                   
                  err_t nd6_get_next_hop_addr_or_queue (struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr, const u8_t **hwaddrp)
                   
                  u16_t nd6_get_destination_mtu (const ip6_addr_t *ip6addr, struct netif *netif)
                   
                  void nd6_reachability_hint (const ip6_addr_t *ip6addr)
                   
                  void nd6_cleanup_netif (struct netif *netif)
                   
                  void nd6_adjust_mld_membership (struct netif *netif, s8_t addr_idx, u8_t new_state)
                   
                  void nd6_restart_netif (struct netif *netif)
                   
                  +

                  Detailed Description

                  +

                  Neighbor discovery and stateless address autoconfiguration for IPv6. Aims to be compliant with RFC 4861 (Neighbor discovery) and RFC 4862 (Address autoconfiguration).

                  +

                  Macro Definition Documentation

                  + +

                  ◆ ND6_RTR_SOLICITATION_INTERVAL

                  + +
                  +
                  + + + + +
                  #define ND6_RTR_SOLICITATION_INTERVAL   4000
                  +
                  +

                  Router solicitations are sent in 4 second intervals (see RFC 4861, ch. 6.3.7)

                  + +
                  +
                  + +

                  ◆ ND6_TMR_INTERVAL

                  + +
                  +
                  + + + + +
                  #define ND6_TMR_INTERVAL   1000
                  +
                  +

                  1 second period

                  + +
                  +
                  +

                  Function Documentation

                  + +

                  ◆ nd6_adjust_mld_membership()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  void nd6_adjust_mld_membership (struct netifnetif,
                  s8_t addr_idx,
                  u8_t new_state 
                  )
                  +
                  +

                  The state of a local IPv6 address entry is about to change. If needed, join or leave the solicited-node multicast group for the address.

                  +
                  Parameters
                  + + + + +
                  netifThe netif that owns the address.
                  addr_idxThe index of the address.
                  new_stateThe new (IP6_ADDR_) state for the address.
                  +
                  +
                  + +
                  +
                  + +

                  ◆ nd6_cleanup_netif()

                  + +
                  +
                  + + + + + + + + +
                  void nd6_cleanup_netif (struct netifnetif)
                  +
                  +

                  Remove all prefix, neighbor_cache and router entries of the specified netif.

                  +
                  Parameters
                  + + +
                  netifpoints to a network interface
                  +
                  +
                  + +
                  +
                  + +

                  ◆ nd6_clear_destination_cache()

                  + +
                  +
                  + + + + + + + + +
                  void nd6_clear_destination_cache (void )
                  +
                  +

                  Clear the destination cache.

                  +

                  This operation may be necessary for consistency in the light of changing local addresses and/or use of the gateway hook.

                  + +
                  +
                  + +

                  ◆ nd6_find_route()

                  + +
                  +
                  + + + + + + + + +
                  struct netif* nd6_find_route (const ip6_addr_tip6addr)
                  +
                  +

                  Find a router-announced route to the given destination. This route may be based on an on-link prefix or a default router.

                  +

                  If a suitable route is found, the returned netif is guaranteed to be in a suitable state (up, link up) to be used for packet transmission.

                  +
                  Parameters
                  + + +
                  ip6addrthe destination IPv6 address
                  +
                  +
                  +
                  Returns
                  the netif to use for the destination, or NULL if none found
                  + +
                  +
                  + +

                  ◆ nd6_get_destination_mtu()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  u16_t nd6_get_destination_mtu (const ip6_addr_tip6addr,
                  struct netifnetif 
                  )
                  +
                  +

                  Get the Path MTU for a destination.

                  +
                  Parameters
                  + + + +
                  ip6addrthe destination address
                  netifthe netif on which the packet will be sent
                  +
                  +
                  +
                  Returns
                  the Path MTU, if known, or the netif default MTU
                  + +
                  +
                  + +

                  ◆ nd6_get_next_hop_addr_or_queue()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t nd6_get_next_hop_addr_or_queue (struct netifnetif,
                  struct pbufq,
                  const ip6_addr_tip6addr,
                  const u8_t ** hwaddrp 
                  )
                  +
                  +

                  A packet is to be transmitted to a specific IPv6 destination on a specific interface. Check if we can find the hardware address of the next hop to use for the packet. If so, give the hardware address to the caller, which should use it to send the packet right away. Otherwise, enqueue the packet for later transmission while looking up the hardware address, if possible.

                  +

                  As such, this function returns one of three different possible results:

                  +
                    +
                  • ERR_OK with a non-NULL 'hwaddrp': the caller should send the packet now.
                  • +
                  • ERR_OK with a NULL 'hwaddrp': the packet has been enqueued for later.
                  • +
                  • not ERR_OK: something went wrong; forward the error upward in the stack.
                  • +
                  +
                  Parameters
                  + + + + + +
                  netifThe lwIP network interface on which the IP packet will be sent.
                  qThe pbuf(s) containing the IP packet to be sent.
                  ip6addrThe destination IPv6 address of the packet.
                  hwaddrpOn success, filled with a pointer to a HW address or NULL (meaning the packet has been queued).
                  +
                  +
                  +
                  Returns
                    +
                  • ERR_OK on success, ERR_RTE if no route was found for the packet, or ERR_MEM if low memory conditions prohibit sending the packet at all.
                  • +
                  +
                  + +
                  +
                  + +

                  ◆ nd6_input()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void nd6_input (struct pbufp,
                  struct netifinp 
                  )
                  +
                  +

                  Process an incoming neighbor discovery message

                  +
                  Parameters
                  + + + +
                  pthe nd packet, p->payload pointing to the icmpv6 header
                  inpthe netif on which this packet was received
                  +
                  +
                  + +
                  +
                  + +

                  ◆ nd6_reachability_hint()

                  + +
                  +
                  + + + + + + + + +
                  void nd6_reachability_hint (const ip6_addr_tip6addr)
                  +
                  +

                  Provide the Neighbor discovery process with a hint that a destination is reachable. Called by tcp_receive when ACKs are received or sent (as per RFC). This is useful to avoid sending NS messages every 30 seconds.

                  +
                  Parameters
                  + + +
                  ip6addrthe destination address which is know to be reachable by an upper layer protocol (TCP)
                  +
                  +
                  + +
                  +
                  + +

                  ◆ nd6_restart_netif()

                  + +
                  +
                  + + + + + + + + +
                  void nd6_restart_netif (struct netifnetif)
                  +
                  +

                  Netif was added, set up, or reconnected (link up)

                  + +
                  +
                  + +

                  ◆ nd6_tmr()

                  + +
                  +
                  + + + + + + + + +
                  void nd6_tmr (void )
                  +
                  +

                  Periodic timer for Neighbor discovery functions:

                  +
                    +
                  • Update neighbor reachability states
                  • +
                  • Update destination cache entries age
                  • +
                  • Update invalidation timers of default routers and on-link prefixes
                  • +
                  • Update lifetimes of our addresses
                  • +
                  • Perform duplicate address detection (DAD) for our addresses
                  • +
                  • Send router solicitations
                  • +
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/nd6_8h.js b/Libraries/LwIP/doc/doxygen/output/html/nd6_8h.js new file mode 100644 index 0000000..cfd3784 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/nd6_8h.js @@ -0,0 +1,15 @@ +var nd6_8h = +[ + [ "ND6_RTR_SOLICITATION_INTERVAL", "nd6_8h.html#a2fec65c0785551bad3a282ddee4062ac", null ], + [ "ND6_TMR_INTERVAL", "nd6_8h.html#a3250c1e32713635d588cf25865ebed56", null ], + [ "nd6_adjust_mld_membership", "nd6_8h.html#a27224542b8ffab81c2ed9f47752bb51e", null ], + [ "nd6_cleanup_netif", "nd6_8h.html#a84f9f52cab7ae37b4dd343536156dc73", null ], + [ "nd6_clear_destination_cache", "nd6_8h.html#a64d7956cf2b0d45025b02661f3f62377", null ], + [ "nd6_find_route", "nd6_8h.html#ac5ce11eaecfb486c322641427f47cffe", null ], + [ "nd6_get_destination_mtu", "nd6_8h.html#af226438f4f9b4aa7c3a2bbdf3c1e948c", null ], + [ "nd6_get_next_hop_addr_or_queue", "nd6_8h.html#ae447c204ebbf71e6ebbc5ed727a73eb9", null ], + [ "nd6_input", "nd6_8h.html#abbb92837e715be0e7d99513a84995831", null ], + [ "nd6_reachability_hint", "nd6_8h.html#a4959990cae26a3996f638ec996f046df", null ], + [ "nd6_restart_netif", "nd6_8h.html#a73d3192204da20be193e3c00c4a0cb54", null ], + [ "nd6_tmr", "nd6_8h.html#a754781b509e69c35a7a4ee7e380399fe", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/nd6__priv_8h.html b/Libraries/LwIP/doc/doxygen/output/html/nd6__priv_8h.html new file mode 100644 index 0000000..6905bbe --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/nd6__priv_8h.html @@ -0,0 +1,116 @@ + + + + + + + +lwIP: src/include/lwip/priv/nd6_priv.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  nd6_priv.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/pbuf.h"
                  +#include "lwip/ip6_addr.h"
                  +#include "lwip/netif.h"
                  +
                  + + + + + +

                  +Data Structures

                  struct  nd6_q_entry
                   
                  struct  nd6_neighbor_cache_entry
                   
                  +

                  Detailed Description

                  +

                  Neighbor discovery and stateless address autoconfiguration for IPv6. Aims to be compliant with RFC 4861 (Neighbor discovery) and RFC 4862 (Address autoconfiguration).

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/nd6__priv_8h.js b/Libraries/LwIP/doc/doxygen/output/html/nd6__priv_8h.js new file mode 100644 index 0000000..7095e2b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/nd6__priv_8h.js @@ -0,0 +1,5 @@ +var nd6__priv_8h = +[ + [ "nd6_q_entry", "structnd6__q__entry.html", null ], + [ "nd6_neighbor_cache_entry", "structnd6__neighbor__cache__entry.html", "structnd6__neighbor__cache__entry" ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/netbiosns_8c.html b/Libraries/LwIP/doc/doxygen/output/html/netbiosns_8c.html new file mode 100644 index 0000000..8044884 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/netbiosns_8c.html @@ -0,0 +1,208 @@ + + + + + + + +lwIP: src/apps/netbiosns/netbiosns.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  netbiosns.c File Reference
                  +
                  +
                  +
                  #include "lwip/apps/netbiosns.h"
                  +#include "lwip/def.h"
                  +#include "lwip/udp.h"
                  +#include "lwip/ip.h"
                  +#include "lwip/netif.h"
                  +#include "lwip/prot/iana.h"
                  +#include <string.h>
                  +#include "arch/bpstruct.h"
                  +#include "arch/epstruct.h"
                  +
                  + + + + + + + + + + + +

                  +Data Structures

                  struct  netbios_hdr
                   
                  struct  netbios_question_hdr
                   
                  struct  netbios_name_hdr
                   
                  struct  netbios_resp
                   
                  struct  netbios_answer
                   
                  + + + + + + + + + +

                  +Macros

                  #define NETBIOS_NAME_LEN   16
                   
                  #define NETBIOS_NAME_TTL   300000u
                   
                  #define NETB_HFLAG_RESPONSE   0x8000U
                   
                  #define NETB_NFLAG_UNIQUE   0x8000U
                   
                  + + + + + +

                  +Functions

                  void netbiosns_init (void)
                   
                  void netbiosns_stop (void)
                   
                  +

                  Detailed Description

                  +

                  NetBIOS name service responder

                  +

                  Macro Definition Documentation

                  + +

                  ◆ NETB_HFLAG_RESPONSE

                  + +
                  +
                  + + + + +
                  #define NETB_HFLAG_RESPONSE   0x8000U
                  +
                  +

                  NetBIOS header flags

                  + +
                  +
                  + +

                  ◆ NETB_NFLAG_UNIQUE

                  + +
                  +
                  + + + + +
                  #define NETB_NFLAG_UNIQUE   0x8000U
                  +
                  +

                  NetBIOS name flags

                  + +
                  +
                  + +

                  ◆ NETBIOS_NAME_LEN

                  + +
                  +
                  + + + + +
                  #define NETBIOS_NAME_LEN   16
                  +
                  +

                  size of a NetBIOS name

                  + +
                  +
                  + +

                  ◆ NETBIOS_NAME_TTL

                  + +
                  +
                  + + + + +
                  #define NETBIOS_NAME_TTL   300000u
                  +
                  +

                  The Time-To-Live for NetBIOS name responds (in seconds) Default is 300000 seconds (3 days, 11 hours, 20 minutes)

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/netbiosns_8c.js b/Libraries/LwIP/doc/doxygen/output/html/netbiosns_8c.js new file mode 100644 index 0000000..a9cd499 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/netbiosns_8c.js @@ -0,0 +1,14 @@ +var netbiosns_8c = +[ + [ "netbios_hdr", "structnetbios__hdr.html", null ], + [ "netbios_question_hdr", "structnetbios__question__hdr.html", null ], + [ "netbios_name_hdr", "structnetbios__name__hdr.html", null ], + [ "netbios_resp", "structnetbios__resp.html", null ], + [ "netbios_answer", "structnetbios__answer.html", "structnetbios__answer" ], + [ "NETB_HFLAG_RESPONSE", "netbiosns_8c.html#af09685abf1739c802bc8772b35b7fb1c", null ], + [ "NETB_NFLAG_UNIQUE", "netbiosns_8c.html#ae00d45caef5a670e3aedde2788b3f212", null ], + [ "NETBIOS_NAME_LEN", "netbiosns_8c.html#a4b83658c5bbb9ac90aca4351086a9a00", null ], + [ "NETBIOS_NAME_TTL", "netbiosns_8c.html#a35d43ea3290f6412e45598b610f03cf1", null ], + [ "netbiosns_init", "group__netbiosns.html#ga0c696ea25a79e97715c8217901cff66b", null ], + [ "netbiosns_stop", "group__netbiosns.html#gaf82174943d25d67b04d44b7fba808806", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/netbiosns_8h.html b/Libraries/LwIP/doc/doxygen/output/html/netbiosns_8h.html new file mode 100644 index 0000000..bc78c47 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/netbiosns_8h.html @@ -0,0 +1,113 @@ + + + + + + + +lwIP: src/include/lwip/apps/netbiosns.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  netbiosns.h File Reference
                  +
                  +
                  + + + + + + +

                  +Functions

                  void netbiosns_init (void)
                   
                  void netbiosns_stop (void)
                   
                  +

                  Detailed Description

                  +

                  NETBIOS name service responder

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/netbiosns_8h.js b/Libraries/LwIP/doc/doxygen/output/html/netbiosns_8h.js new file mode 100644 index 0000000..a58a8ef --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/netbiosns_8h.js @@ -0,0 +1,5 @@ +var netbiosns_8h = +[ + [ "netbiosns_init", "group__netbiosns.html#ga0c696ea25a79e97715c8217901cff66b", null ], + [ "netbiosns_stop", "group__netbiosns.html#gaf82174943d25d67b04d44b7fba808806", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/netbiosns__opts_8h.html b/Libraries/LwIP/doc/doxygen/output/html/netbiosns__opts_8h.html new file mode 100644 index 0000000..512fe18 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/netbiosns__opts_8h.html @@ -0,0 +1,113 @@ + + + + + + + +lwIP: src/include/lwip/apps/netbiosns_opts.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  netbiosns_opts.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +
                  + + + + + +

                  +Macros

                  #define NETBIOS_LWIP_NAME   "NETBIOSLWIPDEV"
                   
                  #define LWIP_NETBIOS_RESPOND_NAME_QUERY   0
                   
                  +

                  Detailed Description

                  +

                  NETBIOS name service responder options

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/netbiosns__opts_8h.js b/Libraries/LwIP/doc/doxygen/output/html/netbiosns__opts_8h.js new file mode 100644 index 0000000..c0a1244 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/netbiosns__opts_8h.js @@ -0,0 +1,5 @@ +var netbiosns__opts_8h = +[ + [ "LWIP_NETBIOS_RESPOND_NAME_QUERY", "group__netbiosns__opts.html#gaa9dec8fc3dee5e72fbe9b854437bce84", null ], + [ "NETBIOS_LWIP_NAME", "group__netbiosns__opts.html#ga468c2ae67a79ce082ee585a438f7373b", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/netbuf_8c.html b/Libraries/LwIP/doc/doxygen/output/html/netbuf_8c.html new file mode 100644 index 0000000..c121b9c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/netbuf_8c.html @@ -0,0 +1,130 @@ + + + + + + + +lwIP: src/api/netbuf.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  netbuf.c File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/netbuf.h"
                  +#include "lwip/memp.h"
                  +#include <string.h>
                  +
                  + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  struct netbufnetbuf_new (void)
                   
                  void netbuf_delete (struct netbuf *buf)
                   
                  void * netbuf_alloc (struct netbuf *buf, u16_t size)
                   
                  void netbuf_free (struct netbuf *buf)
                   
                  err_t netbuf_ref (struct netbuf *buf, const void *dataptr, u16_t size)
                   
                  void netbuf_chain (struct netbuf *head, struct netbuf *tail)
                   
                  err_t netbuf_data (struct netbuf *buf, void **dataptr, u16_t *len)
                   
                  s8_t netbuf_next (struct netbuf *buf)
                   
                  void netbuf_first (struct netbuf *buf)
                   
                  +

                  Detailed Description

                  +

                  Network buffer management

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/netbuf_8c.js b/Libraries/LwIP/doc/doxygen/output/html/netbuf_8c.js new file mode 100644 index 0000000..dd171d8 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/netbuf_8c.js @@ -0,0 +1,12 @@ +var netbuf_8c = +[ + [ "netbuf_alloc", "group__netbuf.html#ga0b831b80d3aa64938abdbfb6d89eaac0", null ], + [ "netbuf_chain", "group__netbuf.html#ga631e8bddd99b2397cd0b26973c659602", null ], + [ "netbuf_data", "group__netbuf.html#ga04a54a8476b37c2a8804fed679b6cc01", null ], + [ "netbuf_delete", "group__netbuf.html#ga9dfd3ddfe0ec65009cb140c68404b09d", null ], + [ "netbuf_first", "group__netbuf.html#ga222ad2a2eb871d603b216a87e9f9be51", null ], + [ "netbuf_free", "group__netbuf.html#ga02f82348ac23431a4b1512feae25f26b", null ], + [ "netbuf_new", "group__netbuf.html#gaaba704cd963e35e71145de9f5112991d", null ], + [ "netbuf_next", "group__netbuf.html#gaf4e3718d378bb11f2fc8af42ce7b3715", null ], + [ "netbuf_ref", "group__netbuf.html#gabdffa0401e4473c9d9100ecbf50e46d2", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/netbuf_8h.html b/Libraries/LwIP/doc/doxygen/output/html/netbuf_8h.html new file mode 100644 index 0000000..c181110 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/netbuf_8h.html @@ -0,0 +1,175 @@ + + + + + + + +lwIP: src/include/lwip/netbuf.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  netbuf.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/pbuf.h"
                  +#include "lwip/ip_addr.h"
                  +#include "lwip/ip6_addr.h"
                  +
                  + + + +

                  +Data Structures

                  struct  netbuf
                   
                  + + + + + +

                  +Macros

                  #define NETBUF_FLAG_DESTADDR   0x01
                   
                  #define NETBUF_FLAG_CHKSUM   0x02
                   
                  + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  struct netbufnetbuf_new (void)
                   
                  void netbuf_delete (struct netbuf *buf)
                   
                  void * netbuf_alloc (struct netbuf *buf, u16_t size)
                   
                  void netbuf_free (struct netbuf *buf)
                   
                  err_t netbuf_ref (struct netbuf *buf, const void *dataptr, u16_t size)
                   
                  void netbuf_chain (struct netbuf *head, struct netbuf *tail)
                   
                  err_t netbuf_data (struct netbuf *buf, void **dataptr, u16_t *len)
                   
                  s8_t netbuf_next (struct netbuf *buf)
                   
                  void netbuf_first (struct netbuf *buf)
                   
                  +

                  Detailed Description

                  +

                  netbuf API (for netconn API)

                  +

                  Macro Definition Documentation

                  + +

                  ◆ NETBUF_FLAG_CHKSUM

                  + +
                  +
                  + + + + +
                  #define NETBUF_FLAG_CHKSUM   0x02
                  +
                  +

                  This netbuf includes a checksum

                  + +
                  +
                  + +

                  ◆ NETBUF_FLAG_DESTADDR

                  + +
                  +
                  + + + + +
                  #define NETBUF_FLAG_DESTADDR   0x01
                  +
                  +

                  This netbuf has dest-addr/port set

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/netbuf_8h.js b/Libraries/LwIP/doc/doxygen/output/html/netbuf_8h.js new file mode 100644 index 0000000..a8b37fb --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/netbuf_8h.js @@ -0,0 +1,15 @@ +var netbuf_8h = +[ + [ "netbuf", "structnetbuf.html", null ], + [ "NETBUF_FLAG_CHKSUM", "netbuf_8h.html#ab75db64a9e84eb67a382c30e382d417c", null ], + [ "NETBUF_FLAG_DESTADDR", "netbuf_8h.html#ab38abb4213df4c00b9b3ab844322a090", null ], + [ "netbuf_alloc", "group__netbuf.html#ga0b831b80d3aa64938abdbfb6d89eaac0", null ], + [ "netbuf_chain", "group__netbuf.html#ga631e8bddd99b2397cd0b26973c659602", null ], + [ "netbuf_data", "group__netbuf.html#ga04a54a8476b37c2a8804fed679b6cc01", null ], + [ "netbuf_delete", "group__netbuf.html#ga9dfd3ddfe0ec65009cb140c68404b09d", null ], + [ "netbuf_first", "group__netbuf.html#ga222ad2a2eb871d603b216a87e9f9be51", null ], + [ "netbuf_free", "group__netbuf.html#ga02f82348ac23431a4b1512feae25f26b", null ], + [ "netbuf_new", "group__netbuf.html#gaaba704cd963e35e71145de9f5112991d", null ], + [ "netbuf_next", "group__netbuf.html#gaf4e3718d378bb11f2fc8af42ce7b3715", null ], + [ "netbuf_ref", "group__netbuf.html#gabdffa0401e4473c9d9100ecbf50e46d2", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/netdb_8c.html b/Libraries/LwIP/doc/doxygen/output/html/netdb_8c.html new file mode 100644 index 0000000..ed199d0 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/netdb_8c.html @@ -0,0 +1,361 @@ + + + + + + + +lwIP: src/api/netdb.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  netdb.c File Reference
                  +
                  +
                  +
                  #include "lwip/netdb.h"
                  +#include "lwip/err.h"
                  +#include "lwip/mem.h"
                  +#include "lwip/memp.h"
                  +#include "lwip/ip_addr.h"
                  +#include "lwip/api.h"
                  +#include "lwip/dns.h"
                  +#include <string.h>
                  +#include <stdlib.h>
                  +
                  + + + +

                  +Data Structures

                  struct  gethostbyname_r_helper
                   
                  + + + + + +

                  +Macros

                  #define LWIP_DNS_API_HOSTENT_STORAGE   0
                   
                  #define HOSTENT_STORAGE   static
                   
                  + + + + + + + + + +

                  +Functions

                  struct hostent * lwip_gethostbyname (const char *name)
                   
                  int lwip_gethostbyname_r (const char *name, struct hostent *ret, char *buf, size_t buflen, struct hostent **result, int *h_errnop)
                   
                  void lwip_freeaddrinfo (struct addrinfo *ai)
                   
                  int lwip_getaddrinfo (const char *nodename, const char *servname, const struct addrinfo *hints, struct addrinfo **res)
                   
                  + + + +

                  +Variables

                  int h_errno
                   
                  +

                  Detailed Description

                  +

                  API functions for name resolving

                  +

                  Macro Definition Documentation

                  + +

                  ◆ HOSTENT_STORAGE

                  + +
                  +
                  + + + + +
                  #define HOSTENT_STORAGE   static
                  +
                  +

                  define "hostent" variables storage

                  + +
                  +
                  + +

                  ◆ LWIP_DNS_API_HOSTENT_STORAGE

                  + +
                  +
                  + + + + +
                  #define LWIP_DNS_API_HOSTENT_STORAGE   0
                  +
                  +

                  define "hostent" variables storage: 0 if we use a static (but unprotected) set of variables for lwip_gethostbyname, 1 if we use a local storage

                  + +
                  +
                  +

                  Function Documentation

                  + +

                  ◆ lwip_freeaddrinfo()

                  + +
                  +
                  + + + + + + + + +
                  void lwip_freeaddrinfo (struct addrinfo * ai)
                  +
                  +

                  Frees one or more addrinfo structures returned by getaddrinfo(), along with any additional storage associated with those structures. If the ai_next field of the structure is not null, the entire list of structures is freed.

                  +
                  Parameters
                  + + +
                  aistruct addrinfo to free
                  +
                  +
                  + +
                  +
                  + +

                  ◆ lwip_getaddrinfo()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  int lwip_getaddrinfo (const char * nodename,
                  const char * servname,
                  const struct addrinfo * hints,
                  struct addrinfo ** res 
                  )
                  +
                  +

                  Translates the name of a service location (for example, a host name) and/or a service name and returns a set of socket addresses and associated information to be used in creating a socket with which to address the specified service. Memory for the result is allocated internally and must be freed by calling lwip_freeaddrinfo()!

                  +

                  Due to a limitation in dns_gethostbyname, only the first address of a host is returned. Also, service names are not supported (only port numbers)!

                  +
                  Parameters
                  + + + + + +
                  nodenamedescriptive name or address string of the host (may be NULL -> local address)
                  servnameport number as string of NULL
                  hintsstructure containing input values that set socktype and protocol
                  respointer to a pointer where to store the result (set to NULL on failure)
                  +
                  +
                  +
                  Returns
                  0 on success, non-zero on failure
                  + +
                  +
                  + +

                  ◆ lwip_gethostbyname()

                  + +
                  +
                  + + + + + + + + +
                  struct hostent* lwip_gethostbyname (const char * name)
                  +
                  +

                  Returns an entry containing addresses of address family AF_INET for the host with name name. Due to dns_gethostbyname limitations, only one address is returned.

                  +
                  Parameters
                  + + +
                  namethe hostname to resolve
                  +
                  +
                  +
                  Returns
                  an entry containing addresses of address family AF_INET for the host with name name
                  + +
                  +
                  + +

                  ◆ lwip_gethostbyname_r()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  int lwip_gethostbyname_r (const char * name,
                  struct hostent * ret,
                  char * buf,
                  size_t buflen,
                  struct hostent ** result,
                  int * h_errnop 
                  )
                  +
                  +

                  Thread-safe variant of lwip_gethostbyname: instead of using a static buffer, this function takes buffer and errno pointers as arguments and uses these for the result.

                  +
                  Parameters
                  + + + + + + + +
                  namethe hostname to resolve
                  retpre-allocated struct where to store the result
                  bufpre-allocated buffer where to store additional data
                  buflenthe size of buf
                  resultpointer to a hostent pointer that is set to ret on success and set to zero on error
                  h_errnoppointer to an int where to store errors (instead of modifying the global h_errno)
                  +
                  +
                  +
                  Returns
                  0 on success, non-zero on error, additional error information is stored in *h_errnop instead of h_errno to be thread-safe
                  + +
                  +
                  +

                  Variable Documentation

                  + +

                  ◆ h_errno

                  + +
                  +
                  + + + + +
                  int h_errno
                  +
                  +

                  h_errno is exported in netdb.h for access by applications.

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/netdb_8c.js b/Libraries/LwIP/doc/doxygen/output/html/netdb_8c.js new file mode 100644 index 0000000..46b5732 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/netdb_8c.js @@ -0,0 +1,11 @@ +var netdb_8c = +[ + [ "gethostbyname_r_helper", "structgethostbyname__r__helper.html", null ], + [ "HOSTENT_STORAGE", "netdb_8c.html#acfc1e988534c0e497599b904739f92fe", null ], + [ "LWIP_DNS_API_HOSTENT_STORAGE", "netdb_8c.html#a768ab8ead892d6454709680340cd070e", null ], + [ "lwip_freeaddrinfo", "netdb_8c.html#a7f65ff5982a0743849a644ef2cd15ef5", null ], + [ "lwip_getaddrinfo", "netdb_8c.html#af356989c172a51187e22b557f22d4165", null ], + [ "lwip_gethostbyname", "netdb_8c.html#a8adc6d35c068a073369edde71c678cbc", null ], + [ "lwip_gethostbyname_r", "netdb_8c.html#afa229e90916f6c8d6308828f45351d2d", null ], + [ "h_errno", "netdb_8c.html#a2a1ce3f2040007303d36c0b682b5ac10", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/netif_2ethernet_8h.html b/Libraries/LwIP/doc/doxygen/output/html/netif_2ethernet_8h.html new file mode 100644 index 0000000..8c90ff5 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/netif_2ethernet_8h.html @@ -0,0 +1,138 @@ + + + + + + + +lwIP: src/include/netif/ethernet.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  ethernet.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/pbuf.h"
                  +#include "lwip/netif.h"
                  +#include "lwip/prot/ethernet.h"
                  +
                  + + + +

                  +Macros

                  #define LWIP_ARP_FILTER_NETIF   0
                   
                  + + + + + +

                  +Functions

                  err_t ethernet_input (struct pbuf *p, struct netif *netif)
                   
                  err_t ethernet_output (struct netif *netif, struct pbuf *p, const struct eth_addr *src, const struct eth_addr *dst, u16_t eth_type)
                   
                  +

                  Detailed Description

                  +

                  Ethernet input function - handles INCOMING ethernet level traffic To be used in most low-level netif implementations

                  +

                  Macro Definition Documentation

                  + +

                  ◆ LWIP_ARP_FILTER_NETIF

                  + +
                  +
                  + + + + +
                  #define LWIP_ARP_FILTER_NETIF   0
                  +
                  +

                  Define this to 1 and define LWIP_ARP_FILTER_NETIF_FN(pbuf, netif, type) to a filter function that returns the correct netif when using multiple netifs on one hardware interface where the netif's low-level receive routine cannot decide for the correct netif (e.g. when mapping multiple IP addresses to one hardware interface).

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/netif_2ethernet_8h.js b/Libraries/LwIP/doc/doxygen/output/html/netif_2ethernet_8h.js new file mode 100644 index 0000000..48c6637 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/netif_2ethernet_8h.js @@ -0,0 +1,6 @@ +var netif_2ethernet_8h = +[ + [ "LWIP_ARP_FILTER_NETIF", "netif_2ethernet_8h.html#a1ecae0406a3b714c02b632379f26a365", null ], + [ "ethernet_input", "group__lwip__nosys.html#ga6a10c58b82c56d02c48b3cfa2c2494ff", null ], + [ "ethernet_output", "group__ethernet.html#gac9cad5802bfa3d885f13d2ba0f40b778", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/netif_8c.html b/Libraries/LwIP/doc/doxygen/output/html/netif_8c.html new file mode 100644 index 0000000..e63ab21 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/netif_8c.html @@ -0,0 +1,332 @@ + + + + + + + +lwIP: src/core/netif.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  netif.c File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include <string.h>
                  +#include <stdlib.h>
                  +#include "lwip/def.h"
                  +#include "lwip/ip_addr.h"
                  +#include "lwip/ip6_addr.h"
                  +#include "lwip/netif.h"
                  +#include "lwip/priv/tcp_priv.h"
                  +#include "lwip/udp.h"
                  +#include "lwip/priv/raw_priv.h"
                  +#include "lwip/snmp.h"
                  +#include "lwip/igmp.h"
                  +#include "lwip/etharp.h"
                  +#include "lwip/stats.h"
                  +#include "lwip/sys.h"
                  +#include "lwip/ip.h"
                  +#include "lwip/tcpip.h"
                  +#include "netif/ethernet.h"
                  +#include "lwip/autoip.h"
                  +#include "lwip/dhcp.h"
                  +#include "lwip/dhcp6.h"
                  +#include "lwip/mld6.h"
                  +#include "lwip/nd6.h"
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  err_t netif_input (struct pbuf *p, struct netif *inp)
                   
                  struct netifnetif_add_noaddr (struct netif *netif, void *state, netif_init_fn init, netif_input_fn input)
                   
                  struct netifnetif_add (struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input)
                   
                  void netif_set_ipaddr (struct netif *netif, const ip4_addr_t *ipaddr)
                   
                  void netif_set_netmask (struct netif *netif, const ip4_addr_t *netmask)
                   
                  void netif_set_gw (struct netif *netif, const ip4_addr_t *gw)
                   
                  void netif_set_addr (struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw)
                   
                  void netif_remove (struct netif *netif)
                   
                  void netif_set_default (struct netif *netif)
                   
                  void netif_set_up (struct netif *netif)
                   
                  void netif_set_down (struct netif *netif)
                   
                  void netif_set_status_callback (struct netif *netif, netif_status_callback_fn status_callback)
                   
                  void netif_set_remove_callback (struct netif *netif, netif_status_callback_fn remove_callback)
                   
                  void netif_set_link_up (struct netif *netif)
                   
                  void netif_set_link_down (struct netif *netif)
                   
                  void netif_set_link_callback (struct netif *netif, netif_status_callback_fn link_callback)
                   
                  err_t netif_loop_output (struct netif *netif, struct pbuf *p)
                   
                  void netif_poll (struct netif *netif)
                   
                  u8_t netif_alloc_client_data_id (void)
                   
                  void netif_ip6_addr_set (struct netif *netif, s8_t addr_idx, const ip6_addr_t *addr6)
                   
                  void netif_ip6_addr_set_state (struct netif *netif, s8_t addr_idx, u8_t state)
                   
                  s8_t netif_get_ip6_addr_match (struct netif *netif, const ip6_addr_t *ip6addr)
                   
                  void netif_create_ip6_linklocal_address (struct netif *netif, u8_t from_mac_48bit)
                   
                  err_t netif_add_ip6_address (struct netif *netif, const ip6_addr_t *ip6addr, s8_t *chosen_idx)
                   
                  u8_t netif_name_to_index (const char *name)
                   
                  char * netif_index_to_name (u8_t idx, char *name)
                   
                  struct netifnetif_get_by_index (u8_t idx)
                   
                  struct netifnetif_find (const char *name)
                   
                  void netif_add_ext_callback (netif_ext_callback_t *callback, netif_ext_callback_fn fn)
                   
                  void netif_remove_ext_callback (netif_ext_callback_t *callback)
                   
                  void netif_invoke_ext_callback (struct netif *netif, netif_nsc_reason_t reason, const netif_ext_callback_args_t *args)
                   
                  + + + + + +

                  +Variables

                  struct netifnetif_list
                   
                  struct netifnetif_default
                   
                  +

                  Detailed Description

                  +

                  lwIP network interface abstraction

                  +

                  Function Documentation

                  + +

                  ◆ netif_get_ip6_addr_match()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  s8_t netif_get_ip6_addr_match (struct netifnetif,
                  const ip6_addr_tip6addr 
                  )
                  +
                  +

                  Checks if a specific local address is present on the netif and returns its index. Depending on its state, it may or may not be assigned to the interface (as per RFC terminology).

                  +

                  The given address may or may not be zoned (i.e., have a zone index other than IP6_NO_ZONE). If the address is zoned, it must have the correct zone for the given netif, or no match will be found.

                  +
                  Parameters
                  + + + +
                  netifthe netif to check
                  ip6addrthe IPv6 address to find
                  +
                  +
                  +
                  Returns
                  >= 0: address found, this is its index -1: address not found on this netif
                  + +
                  +
                  + +

                  ◆ netif_invoke_ext_callback()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  void netif_invoke_ext_callback (struct netifnetif,
                  netif_nsc_reason_t reason,
                  const netif_ext_callback_args_targs 
                  )
                  +
                  +

                  Invoke extended netif status event

                  Parameters
                  + + + + +
                  netifnetif that is affected by change
                  reasonchange reason
                  argsdepends on reason, see reason description
                  +
                  +
                  + +
                  +
                  + +

                  ◆ netif_poll()

                  + +
                  +
                  + + + + + + + + +
                  void netif_poll (struct netifnetif)
                  +
                  +

                  Call netif_poll() in the main loop of your application. This is to prevent reentering non-reentrant functions like tcp_input(). Packets passed to netif_loop_output() are put on a list that is passed to netif->input() by netif_poll().

                  + +
                  +
                  +

                  Variable Documentation

                  + +

                  ◆ netif_default

                  + +
                  +
                  + + + + +
                  struct netif* netif_default
                  +
                  +

                  The default network interface.

                  + +
                  +
                  + +

                  ◆ netif_list

                  + +
                  +
                  + + + + +
                  struct netif* netif_list
                  +
                  +

                  The list of network interfaces.

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/netif_8c.js b/Libraries/LwIP/doc/doxygen/output/html/netif_8c.js new file mode 100644 index 0000000..d8d9f8f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/netif_8c.js @@ -0,0 +1,36 @@ +var netif_8c = +[ + [ "netif_add", "group__netif.html#gade5498543e74067f28cc6bef0209e3be", null ], + [ "netif_add_ext_callback", "group__netif.html#ga3efc2b72f75936d50708247420c9d1d9", null ], + [ "netif_add_ip6_address", "group__netif__ip6.html#gab0727fba5f5b3fed8d7013775506f327", null ], + [ "netif_add_noaddr", "group__netif.html#gac20150ac754ff1f88afeaa33be3552a4", null ], + [ "netif_alloc_client_data_id", "group__netif__cd.html#ga55d62d43b5a9a5527f0116ec38369978", null ], + [ "netif_create_ip6_linklocal_address", "group__netif__ip6.html#gae864211a5eb052deb5da7bc7e3427fb9", null ], + [ "netif_find", "group__netif.html#ga69c93a139e8a1f6ef4e3d076a2897def", null ], + [ "netif_get_by_index", "group__netif.html#gae4df885347c800a5486d3bf25981300e", null ], + [ "netif_get_ip6_addr_match", "netif_8c.html#a0ec111195bcc452f77895ad35aedd7dc", null ], + [ "netif_index_to_name", "group__netif.html#ga3ff104d083914e87a7805a0b90a85755", null ], + [ "netif_input", "group__lwip__nosys.html#ga5532f93d68c874fb99c681bff2165385", null ], + [ "netif_invoke_ext_callback", "netif_8c.html#a75b5298b1c3c3794747d78a4ce95d81c", null ], + [ "netif_ip6_addr_set", "group__netif__ip6.html#gae21572fdbd8664d22a1b281a6c31c9bb", null ], + [ "netif_ip6_addr_set_state", "group__netif__ip6.html#ga9cde7286535c7f037a9b16052561b91f", null ], + [ "netif_loop_output", "group__netif.html#ga691f1cc7c9778ffa62a3843c184404b2", null ], + [ "netif_name_to_index", "group__netif.html#gac763a1f647fb9e8af4254418e813a6ae", null ], + [ "netif_poll", "netif_8c.html#a0fbaed78253d21e1b54e65651da3e327", null ], + [ "netif_remove", "group__netif.html#ga9c6e541f0c184e1ea61a5cd8afe3e979", null ], + [ "netif_remove_ext_callback", "group__netif.html#ga1d91ac26b0993a9a3466b317ab5ec716", null ], + [ "netif_set_addr", "group__netif__ip4.html#ga85e31a68e96390dab2feffb11f4948a1", null ], + [ "netif_set_default", "group__netif.html#gac90f290edd005238d62aa94c4ac9dea3", null ], + [ "netif_set_down", "group__netif.html#ga641d07ed8c31fe5306bc01605a6790cf", null ], + [ "netif_set_gw", "group__netif__ip4.html#ga841876c274c3c90898579f9e12f3b520", null ], + [ "netif_set_ipaddr", "group__netif__ip4.html#ga73b043a7ec0e4899aba8433ec9064cca", null ], + [ "netif_set_link_callback", "group__netif.html#ga1cd45910add90e267e33d680bbc3f0f4", null ], + [ "netif_set_link_down", "group__netif.html#ga34e37a1e8e358760dc1c43887922c7db", null ], + [ "netif_set_link_up", "group__netif.html#gae0d2975f189277990e9d5276fdd9e9ea", null ], + [ "netif_set_netmask", "group__netif__ip4.html#ga0bdd7c057c2f55f670853e3906014a53", null ], + [ "netif_set_remove_callback", "group__netif.html#ga319c88da0fdf25c1fee1595299bc35ce", null ], + [ "netif_set_status_callback", "group__netif.html#gadc8787b23ac0ee023979cbadf87813d4", null ], + [ "netif_set_up", "group__netif.html#gaf19693be401a265a52d2a56c65753121", null ], + [ "netif_default", "netif_8c.html#a3d0925cbce550ed461907aee816713ba", null ], + [ "netif_list", "netif_8c.html#a1c8141eaa98f6dc6dfddbb23a706656c", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/netif_8h.html b/Libraries/LwIP/doc/doxygen/output/html/netif_8h.html new file mode 100644 index 0000000..7d2e088 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/netif_8h.html @@ -0,0 +1,821 @@ + + + + + + + +lwIP: src/include/lwip/netif.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  netif.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/err.h"
                  +#include "lwip/ip_addr.h"
                  +#include "lwip/def.h"
                  +#include "lwip/pbuf.h"
                  +#include "lwip/stats.h"
                  +
                  + + + + + + + + + + + + + + + +

                  +Data Structures

                  struct  netif
                   
                  union  netif_ext_callback_args_t
                   
                  struct  netif_ext_callback_args_t::link_changed_s
                   
                  struct  netif_ext_callback_args_t::status_changed_s
                   
                  struct  netif_ext_callback_args_t::ipv4_changed_s
                   
                  struct  netif_ext_callback_args_t::ipv6_set_s
                   
                  struct  netif_ext_callback_args_t::ipv6_addr_state_changed_s
                   
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Macros

                  #define NETIF_MAX_HWADDR_LEN   6U
                   
                  #define NETIF_NAMESIZE   6
                   
                  #define NETIF_FLAG_UP   0x01U
                   
                  #define NETIF_FLAG_BROADCAST   0x02U
                   
                  #define NETIF_FLAG_LINK_UP   0x04U
                   
                  #define NETIF_FLAG_ETHARP   0x08U
                   
                  #define NETIF_FLAG_ETHERNET   0x10U
                   
                  #define NETIF_FLAG_IGMP   0x20U
                   
                  #define NETIF_FLAG_MLD6   0x40U
                   
                  #define netif_set_client_data(netif, id, data)   netif_get_client_data(netif, id) = (data)
                   
                  #define netif_get_client_data(netif, id)   (netif)->client_data[(id)]
                   
                  #define netif_ip4_addr(netif)   ((const ip4_addr_t*)ip_2_ip4(&((netif)->ip_addr)))
                   
                  #define netif_ip4_netmask(netif)   ((const ip4_addr_t*)ip_2_ip4(&((netif)->netmask)))
                   
                  #define netif_ip4_gw(netif)   ((const ip4_addr_t*)ip_2_ip4(&((netif)->gw)))
                   
                  #define netif_ip_addr4(netif)   ((const ip_addr_t*)&((netif)->ip_addr))
                   
                  #define netif_ip_netmask4(netif)   ((const ip_addr_t*)&((netif)->netmask))
                   
                  #define netif_ip_gw4(netif)   ((const ip_addr_t*)&((netif)->gw))
                   
                  #define netif_is_up(netif)   (((netif)->flags & NETIF_FLAG_UP) ? (u8_t)1 : (u8_t)0)
                   
                  #define netif_is_link_up(netif)   (((netif)->flags & NETIF_FLAG_LINK_UP) ? (u8_t)1 : (u8_t)0)
                   
                  #define netif_set_hostname(netif, name)   do { if((netif) != NULL) { (netif)->hostname = name; }}while(0)
                   
                  #define netif_get_hostname(netif)   (((netif) != NULL) ? ((netif)->hostname) : NULL)
                   
                  #define netif_set_igmp_mac_filter(netif, function)   do { if((netif) != NULL) { (netif)->igmp_mac_filter = function; }}while(0)
                   
                  #define netif_set_mld_mac_filter(netif, function)   do { if((netif) != NULL) { (netif)->mld_mac_filter = function; }}while(0)
                   
                  #define netif_ip_addr6(netif, i)   ((const ip_addr_t*)(&((netif)->ip6_addr[i])))
                   
                  #define netif_ip6_addr(netif, i)   ((const ip6_addr_t*)ip_2_ip6(&((netif)->ip6_addr[i])))
                   
                  #define LWIP_NSC_NETIF_ADDED   0x0001
                   
                  #define LWIP_NSC_NETIF_REMOVED   0x0002
                   
                  #define LWIP_NSC_LINK_CHANGED   0x0004
                   
                  #define LWIP_NSC_STATUS_CHANGED   0x0008
                   
                  #define LWIP_NSC_IPV4_ADDRESS_CHANGED   0x0010
                   
                  #define LWIP_NSC_IPV4_GATEWAY_CHANGED   0x0020
                   
                  #define LWIP_NSC_IPV4_NETMASK_CHANGED   0x0040
                   
                  #define LWIP_NSC_IPV4_SETTINGS_CHANGED   0x0080
                   
                  #define LWIP_NSC_IPV6_SET   0x0100
                   
                  #define LWIP_NSC_IPV6_ADDR_STATE_CHANGED   0x0200
                   
                  + + + + + + + + + + + + + + + + + + + + + +

                  +Typedefs

                  typedef err_t(* netif_init_fn) (struct netif *netif)
                   
                  typedef err_t(* netif_input_fn) (struct pbuf *p, struct netif *inp)
                   
                  typedef err_t(* netif_output_fn) (struct netif *netif, struct pbuf *p, const ip4_addr_t *ipaddr)
                   
                  typedef err_t(* netif_output_ip6_fn) (struct netif *netif, struct pbuf *p, const ip6_addr_t *ipaddr)
                   
                  typedef err_t(* netif_linkoutput_fn) (struct netif *netif, struct pbuf *p)
                   
                  typedef void(* netif_status_callback_fn) (struct netif *netif)
                   
                  typedef err_t(* netif_igmp_mac_filter_fn) (struct netif *netif, const ip4_addr_t *group, enum netif_mac_filter_action action)
                   
                  typedef err_t(* netif_mld_mac_filter_fn) (struct netif *netif, const ip6_addr_t *group, enum netif_mac_filter_action action)
                   
                  typedef u16_t netif_nsc_reason_t
                   
                  typedef void(* netif_ext_callback_fn) (struct netif *netif, netif_nsc_reason_t reason, const netif_ext_callback_args_t *args)
                   
                  + + + +

                  +Enumerations

                  enum  netif_mac_filter_action { NETIF_DEL_MAC_FILTER = 0, +NETIF_ADD_MAC_FILTER = 1 + }
                   
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  u8_t netif_alloc_client_data_id (void)
                   
                  struct netifnetif_add_noaddr (struct netif *netif, void *state, netif_init_fn init, netif_input_fn input)
                   
                  struct netifnetif_add (struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input)
                   
                  void netif_set_addr (struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw)
                   
                  void netif_remove (struct netif *netif)
                   
                  struct netifnetif_find (const char *name)
                   
                  void netif_set_default (struct netif *netif)
                   
                  void netif_set_ipaddr (struct netif *netif, const ip4_addr_t *ipaddr)
                   
                  void netif_set_netmask (struct netif *netif, const ip4_addr_t *netmask)
                   
                  void netif_set_gw (struct netif *netif, const ip4_addr_t *gw)
                   
                  void netif_set_up (struct netif *netif)
                   
                  void netif_set_down (struct netif *netif)
                   
                  void netif_set_status_callback (struct netif *netif, netif_status_callback_fn status_callback)
                   
                  void netif_set_remove_callback (struct netif *netif, netif_status_callback_fn remove_callback)
                   
                  void netif_set_link_up (struct netif *netif)
                   
                  void netif_set_link_down (struct netif *netif)
                   
                  void netif_set_link_callback (struct netif *netif, netif_status_callback_fn link_callback)
                   
                  err_t netif_loop_output (struct netif *netif, struct pbuf *p)
                   
                  void netif_poll (struct netif *netif)
                   
                  err_t netif_input (struct pbuf *p, struct netif *inp)
                   
                  void netif_ip6_addr_set (struct netif *netif, s8_t addr_idx, const ip6_addr_t *addr6)
                   
                  void netif_ip6_addr_set_state (struct netif *netif, s8_t addr_idx, u8_t state)
                   
                  s8_t netif_get_ip6_addr_match (struct netif *netif, const ip6_addr_t *ip6addr)
                   
                  void netif_create_ip6_linklocal_address (struct netif *netif, u8_t from_mac_48bit)
                   
                  err_t netif_add_ip6_address (struct netif *netif, const ip6_addr_t *ip6addr, s8_t *chosen_idx)
                   
                  u8_t netif_name_to_index (const char *name)
                   
                  char * netif_index_to_name (u8_t idx, char *name)
                   
                  struct netifnetif_get_by_index (u8_t idx)
                   
                  void netif_add_ext_callback (netif_ext_callback_t *callback, netif_ext_callback_fn fn)
                   
                  void netif_remove_ext_callback (netif_ext_callback_t *callback)
                   
                  void netif_invoke_ext_callback (struct netif *netif, netif_nsc_reason_t reason, const netif_ext_callback_args_t *args)
                   
                  + + + + + +

                  +Variables

                  struct netifnetif_list
                   
                  struct netifnetif_default
                   
                  +

                  Detailed Description

                  +

                  netif API (to be used from TCPIP thread)

                  +

                  Macro Definition Documentation

                  + +

                  ◆ LWIP_NSC_IPV4_ADDRESS_CHANGED

                  + +
                  +
                  + + + + +
                  #define LWIP_NSC_IPV4_ADDRESS_CHANGED   0x0010
                  +
                  +

                  IPv4 address has changed

                  + +
                  +
                  + +

                  ◆ LWIP_NSC_IPV4_GATEWAY_CHANGED

                  + +
                  +
                  + + + + +
                  #define LWIP_NSC_IPV4_GATEWAY_CHANGED   0x0020
                  +
                  +

                  IPv4 gateway has changed

                  + +
                  +
                  + +

                  ◆ LWIP_NSC_IPV4_NETMASK_CHANGED

                  + +
                  +
                  + + + + +
                  #define LWIP_NSC_IPV4_NETMASK_CHANGED   0x0040
                  +
                  +

                  IPv4 netmask has changed

                  + +
                  +
                  + +

                  ◆ LWIP_NSC_IPV4_SETTINGS_CHANGED

                  + +
                  +
                  + + + + +
                  #define LWIP_NSC_IPV4_SETTINGS_CHANGED   0x0080
                  +
                  +

                  called AFTER IPv4 address/gateway/netmask changes have been applied

                  + +
                  +
                  + +

                  ◆ LWIP_NSC_IPV6_ADDR_STATE_CHANGED

                  + +
                  +
                  + + + + +
                  #define LWIP_NSC_IPV6_ADDR_STATE_CHANGED   0x0200
                  +
                  +

                  IPv6 address state has changed

                  + +
                  +
                  + +

                  ◆ LWIP_NSC_IPV6_SET

                  + +
                  +
                  + + + + +
                  #define LWIP_NSC_IPV6_SET   0x0100
                  +
                  +

                  IPv6 address was added

                  + +
                  +
                  + +

                  ◆ LWIP_NSC_LINK_CHANGED

                  + +
                  +
                  + + + + +
                  #define LWIP_NSC_LINK_CHANGED   0x0004
                  +
                  +

                  link changed

                  + +
                  +
                  + +

                  ◆ LWIP_NSC_NETIF_ADDED

                  + +
                  +
                  + + + + +
                  #define LWIP_NSC_NETIF_ADDED   0x0001
                  +
                  +

                  netif was added. arg: NULL. Called AFTER netif was added.

                  + +
                  +
                  + +

                  ◆ LWIP_NSC_NETIF_REMOVED

                  + +
                  +
                  + + + + +
                  #define LWIP_NSC_NETIF_REMOVED   0x0002
                  +
                  +

                  netif was removed. arg: NULL. Called BEFORE netif is removed.

                  + +
                  +
                  + +

                  ◆ LWIP_NSC_STATUS_CHANGED

                  + +
                  +
                  + + + + +
                  #define LWIP_NSC_STATUS_CHANGED   0x0008
                  +
                  +

                  netif administrative status changed.
                  +up is called AFTER netif is set up.
                  +down is called BEFORE the netif is actually set down.

                  + +
                  +
                  + +

                  ◆ netif_is_link_up

                  + +
                  +
                  + + + + + + + + +
                  #define netif_is_link_up( netif)   (((netif)->flags & NETIF_FLAG_LINK_UP) ? (u8_t)1 : (u8_t)0)
                  +
                  +

                  Ask if a link is up

                  + +
                  +
                  + +

                  ◆ NETIF_MAX_HWADDR_LEN

                  + +
                  +
                  + + + + +
                  #define NETIF_MAX_HWADDR_LEN   6U
                  +
                  +

                  Must be the maximum of all used hardware address lengths across all types of interfaces in use. This does not have to be changed, normally.

                  + +
                  +
                  + +

                  ◆ NETIF_NAMESIZE

                  + +
                  +
                  + + + + +
                  #define NETIF_NAMESIZE   6
                  +
                  +

                  The size of a fully constructed netif name which the netif can be identified by in APIs. Composed of 2 chars, 3 (max) digits, and 1 \0

                  + +
                  +
                  +

                  Typedef Documentation

                  + +

                  ◆ netif_igmp_mac_filter_fn

                  + +
                  +
                  + + + + +
                  typedef err_t(* netif_igmp_mac_filter_fn) (struct netif *netif, const ip4_addr_t *group, enum netif_mac_filter_action action)
                  +
                  +

                  Function prototype for netif igmp_mac_filter functions

                  + +
                  +
                  + +

                  ◆ netif_init_fn

                  + +
                  +
                  + + + + +
                  typedef err_t(* netif_init_fn) (struct netif *netif)
                  +
                  +

                  Function prototype for netif init functions. Set up flags and output/linkoutput callback functions in this function.

                  +
                  Parameters
                  + + +
                  netifThe netif to initialize
                  +
                  +
                  + +
                  +
                  + +

                  ◆ netif_input_fn

                  + +
                  +
                  + + + + +
                  typedef err_t(* netif_input_fn) (struct pbuf *p, struct netif *inp)
                  +
                  +

                  Function prototype for netif->input functions. This function is saved as 'input' callback function in the netif struct. Call it when a packet has been received.

                  +
                  Parameters
                  + + + +
                  pThe received packet, copied into a pbuf
                  inpThe netif which received the packet
                  +
                  +
                  +
                  Returns
                  ERR_OK if the packet was handled != ERR_OK is the packet was NOT handled, in this case, the caller has to free the pbuf
                  + +
                  +
                  + +

                  ◆ netif_linkoutput_fn

                  + +
                  +
                  + + + + +
                  typedef err_t(* netif_linkoutput_fn) (struct netif *netif, struct pbuf *p)
                  +
                  +

                  Function prototype for netif->linkoutput functions. Only used for ethernet netifs. This function is called by ARP when a packet shall be sent.

                  +
                  Parameters
                  + + + +
                  netifThe netif which shall send a packet
                  pThe packet to send (raw ethernet packet)
                  +
                  +
                  + +
                  +
                  + +

                  ◆ netif_mld_mac_filter_fn

                  + +
                  +
                  + + + + +
                  typedef err_t(* netif_mld_mac_filter_fn) (struct netif *netif, const ip6_addr_t *group, enum netif_mac_filter_action action)
                  +
                  +

                  Function prototype for netif mld_mac_filter functions

                  + +
                  +
                  + +

                  ◆ netif_output_fn

                  + +
                  +
                  + + + + +
                  typedef err_t(* netif_output_fn) (struct netif *netif, struct pbuf *p, const ip4_addr_t *ipaddr)
                  +
                  +

                  Function prototype for netif->output functions. Called by lwIP when a packet shall be sent. For ethernet netif, set this to 'etharp_output' and set 'linkoutput'.

                  +
                  Parameters
                  + + + + +
                  netifThe netif which shall send a packet
                  pThe packet to send (p->payload points to IP header)
                  ipaddrThe IP address to which the packet shall be sent
                  +
                  +
                  + +
                  +
                  + +

                  ◆ netif_output_ip6_fn

                  + +
                  +
                  + + + + +
                  typedef err_t(* netif_output_ip6_fn) (struct netif *netif, struct pbuf *p, const ip6_addr_t *ipaddr)
                  +
                  +

                  Function prototype for netif->output_ip6 functions. Called by lwIP when a packet shall be sent. For ethernet netif, set this to 'ethip6_output' and set 'linkoutput'.

                  +
                  Parameters
                  + + + + +
                  netifThe netif which shall send a packet
                  pThe packet to send (p->payload points to IP header)
                  ipaddrThe IPv6 address to which the packet shall be sent
                  +
                  +
                  + +
                  +
                  + +

                  ◆ netif_status_callback_fn

                  + +
                  +
                  + + + + +
                  typedef void(* netif_status_callback_fn) (struct netif *netif)
                  +
                  +

                  Function prototype for netif status- or link-callback functions.

                  + +
                  +
                  +

                  Enumeration Type Documentation

                  + +

                  ◆ netif_mac_filter_action

                  + +
                  +
                  + + + + +
                  enum netif_mac_filter_action
                  +
                  +

                  MAC Filter Actions, these are passed to a netif's igmp_mac_filter or mld_mac_filter callback function.

                  + + + +
                  Enumerator
                  NETIF_DEL_MAC_FILTER 

                  Delete a filter entry

                  +
                  NETIF_ADD_MAC_FILTER 

                  Add a filter entry

                  +
                  + +
                  +
                  +

                  Function Documentation

                  + +

                  ◆ netif_get_ip6_addr_match()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  s8_t netif_get_ip6_addr_match (struct netifnetif,
                  const ip6_addr_tip6addr 
                  )
                  +
                  +

                  Checks if a specific local address is present on the netif and returns its index. Depending on its state, it may or may not be assigned to the interface (as per RFC terminology).

                  +

                  The given address may or may not be zoned (i.e., have a zone index other than IP6_NO_ZONE). If the address is zoned, it must have the correct zone for the given netif, or no match will be found.

                  +
                  Parameters
                  + + + +
                  netifthe netif to check
                  ip6addrthe IPv6 address to find
                  +
                  +
                  +
                  Returns
                  >= 0: address found, this is its index -1: address not found on this netif
                  + +
                  +
                  + +

                  ◆ netif_invoke_ext_callback()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  void netif_invoke_ext_callback (struct netifnetif,
                  netif_nsc_reason_t reason,
                  const netif_ext_callback_args_targs 
                  )
                  +
                  +

                  Invoke extended netif status event

                  Parameters
                  + + + + +
                  netifnetif that is affected by change
                  reasonchange reason
                  argsdepends on reason, see reason description
                  +
                  +
                  + +
                  +
                  + +

                  ◆ netif_poll()

                  + +
                  +
                  + + + + + + + + +
                  void netif_poll (struct netifnetif)
                  +
                  +

                  Call netif_poll() in the main loop of your application. This is to prevent reentering non-reentrant functions like tcp_input(). Packets passed to netif_loop_output() are put on a list that is passed to netif->input() by netif_poll().

                  + +
                  +
                  +

                  Variable Documentation

                  + +

                  ◆ netif_default

                  + +
                  +
                  + + + + +
                  struct netif* netif_default
                  +
                  +

                  The default network interface.

                  + +
                  +
                  + +

                  ◆ netif_list

                  + +
                  +
                  + + + + +
                  struct netif* netif_list
                  +
                  +

                  The list of network interfaces.

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/netif_8h.js b/Libraries/LwIP/doc/doxygen/output/html/netif_8h.js new file mode 100644 index 0000000..0c0775d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/netif_8h.js @@ -0,0 +1,91 @@ +var netif_8h = +[ + [ "netif", "structnetif.html", "structnetif" ], + [ "link_changed_s", "structnetif__ext__callback__args__t_1_1link__changed__s.html", "structnetif__ext__callback__args__t_1_1link__changed__s" ], + [ "status_changed_s", "structnetif__ext__callback__args__t_1_1status__changed__s.html", "structnetif__ext__callback__args__t_1_1status__changed__s" ], + [ "ipv4_changed_s", "structnetif__ext__callback__args__t_1_1ipv4__changed__s.html", "structnetif__ext__callback__args__t_1_1ipv4__changed__s" ], + [ "ipv6_set_s", "structnetif__ext__callback__args__t_1_1ipv6__set__s.html", "structnetif__ext__callback__args__t_1_1ipv6__set__s" ], + [ "ipv6_addr_state_changed_s", "structnetif__ext__callback__args__t_1_1ipv6__addr__state__changed__s.html", "structnetif__ext__callback__args__t_1_1ipv6__addr__state__changed__s" ], + [ "LWIP_NSC_IPV4_ADDRESS_CHANGED", "netif_8h.html#aeb4e790199b02469aa04c044ef5cfa32", null ], + [ "LWIP_NSC_IPV4_GATEWAY_CHANGED", "netif_8h.html#a22400d2202581b4a7273cded712adf49", null ], + [ "LWIP_NSC_IPV4_NETMASK_CHANGED", "netif_8h.html#ad747072771a887443ab33f90a12077d4", null ], + [ "LWIP_NSC_IPV4_SETTINGS_CHANGED", "netif_8h.html#a4ff19a6f3045f65d0397d30b6609660a", null ], + [ "LWIP_NSC_IPV6_ADDR_STATE_CHANGED", "netif_8h.html#a0d70fe11cac43c8fa35827b8e607ccf6", null ], + [ "LWIP_NSC_IPV6_SET", "netif_8h.html#a8fb4317a77ee2e3848be80db15618666", null ], + [ "LWIP_NSC_LINK_CHANGED", "netif_8h.html#a5ad7308195c0581680dd62fb148501cd", null ], + [ "LWIP_NSC_NETIF_ADDED", "netif_8h.html#adbfecb47897cfe63d4f6366c1fed23b2", null ], + [ "LWIP_NSC_NETIF_REMOVED", "netif_8h.html#ae8e2dc87c19a03d481ae37bcf7ced5c9", null ], + [ "LWIP_NSC_STATUS_CHANGED", "netif_8h.html#a6f406ee3ab60e8a4f27ae2483c96b8e2", null ], + [ "NETIF_FLAG_BROADCAST", "group__netif__flags.html#gaef64fe15c82bc7b235366923e517104e", null ], + [ "NETIF_FLAG_ETHARP", "group__netif__flags.html#ga92448dc510bc8d700c09e5c971ef0676", null ], + [ "NETIF_FLAG_ETHERNET", "group__netif__flags.html#ga76ad9d0cf9f029df0ab2a998c64040dc", null ], + [ "NETIF_FLAG_IGMP", "group__netif__flags.html#gac9493b923d733c73f6006d9714826558", null ], + [ "NETIF_FLAG_LINK_UP", "group__netif__flags.html#ga75f5a2b9276c93e3bd18a568459fd2d8", null ], + [ "NETIF_FLAG_MLD6", "group__netif__flags.html#gab14fbe1447d2fdbdf5abc87f51eb6508", null ], + [ "NETIF_FLAG_UP", "group__netif__flags.html#gab47d7d130693dc155f480a5bf447725e", null ], + [ "netif_get_client_data", "group__netif__cd.html#ga4bce01ddbf0fd70cb88431f773c91bc5", null ], + [ "netif_get_hostname", "group__netif.html#ga5a378ba73e60cd1e5235474f0db22978", null ], + [ "netif_ip4_addr", "group__netif__ip4.html#gac9b6e63b5dd2968fe0a4813f3eefb55d", null ], + [ "netif_ip4_gw", "group__netif__ip4.html#ga86d69faf416765b7f8faf60a43cc50da", null ], + [ "netif_ip4_netmask", "group__netif__ip4.html#ga952d1436f2428b92fc8197bcf2f8fca3", null ], + [ "netif_ip6_addr", "group__netif__ip6.html#ga7ec0623f1a858a0cdb187beaa89df365", null ], + [ "netif_ip_addr4", "group__netif__ip4.html#ga54179a2f3b7cc35b23ee8d692d8d8022", null ], + [ "netif_ip_addr6", "group__netif__ip6.html#gae424e336fe9f013b30d4065fd35c91ee", null ], + [ "netif_ip_gw4", "group__netif__ip4.html#ga7ea95478e000701423b7f6316e575a2a", null ], + [ "netif_ip_netmask4", "group__netif__ip4.html#ga58518602f388d2640985a01a312f0a51", null ], + [ "netif_is_link_up", "netif_8h.html#a780be4c3fa9f7f2534f7865666c3a1b8", null ], + [ "netif_is_up", "group__netif.html#ga94a4c24c988afc0a577387730f303b19", null ], + [ "NETIF_MAX_HWADDR_LEN", "netif_8h.html#ab887a8ec553de1be1d04cf2961c63c41", null ], + [ "NETIF_NAMESIZE", "netif_8h.html#a302f24fbfe883ee4840ffc71f267ae2a", null ], + [ "netif_set_client_data", "group__netif__cd.html#ga5ce61a277e1951183f7b7d03742c231f", null ], + [ "netif_set_hostname", "group__netif.html#ga5e5d2c6fa5566a24dd848f3a2c7c957f", null ], + [ "netif_set_igmp_mac_filter", "group__netif.html#ga3428b3f8195249c6cd8704a4db46b401", null ], + [ "netif_set_mld_mac_filter", "group__netif.html#ga97f30bb5542e4c07d3b32e3c754e104c", null ], + [ "netif_ext_callback_fn", "group__netif.html#ga5ee213cea065424c89c66f138c008da1", null ], + [ "netif_igmp_mac_filter_fn", "netif_8h.html#a71cad3277efe29191eef3348f4bf21f7", null ], + [ "netif_init_fn", "netif_8h.html#a2b02a78a8769925ff8e4f83d34e5e1f5", null ], + [ "netif_input_fn", "netif_8h.html#ab2302b1b64ac7b95f24c6bab754a575e", null ], + [ "netif_linkoutput_fn", "netif_8h.html#ab75e9d808bc1b788bea84213e6a111ed", null ], + [ "netif_mld_mac_filter_fn", "netif_8h.html#af2ed0716122b65e7feb43e0dd99ae468", null ], + [ "netif_nsc_reason_t", "group__netif.html#gab2b9387389513a02027c62e246723808", null ], + [ "netif_output_fn", "netif_8h.html#a7b4893aa2ed8c606a0cd7aa932fe5067", null ], + [ "netif_output_ip6_fn", "netif_8h.html#a343a5b14136a51957d552527384674b3", null ], + [ "netif_status_callback_fn", "netif_8h.html#a447d0a7e7c6e2396557c287b8b8c9436", null ], + [ "netif_mac_filter_action", "netif_8h.html#ab194ec4241fad8b6e9aac51e3ec23de0", [ + [ "NETIF_DEL_MAC_FILTER", "netif_8h.html#ab194ec4241fad8b6e9aac51e3ec23de0a7ad3406353906deb4e64ebeed349e07e", null ], + [ "NETIF_ADD_MAC_FILTER", "netif_8h.html#ab194ec4241fad8b6e9aac51e3ec23de0a4186fbaf94be956ea1a3b02cd1cccb1f", null ] + ] ], + [ "netif_add", "group__netif.html#gade5498543e74067f28cc6bef0209e3be", null ], + [ "netif_add_ext_callback", "group__netif.html#ga3efc2b72f75936d50708247420c9d1d9", null ], + [ "netif_add_ip6_address", "group__netif__ip6.html#gab0727fba5f5b3fed8d7013775506f327", null ], + [ "netif_add_noaddr", "group__netif.html#gac20150ac754ff1f88afeaa33be3552a4", null ], + [ "netif_alloc_client_data_id", "group__netif__cd.html#ga55d62d43b5a9a5527f0116ec38369978", null ], + [ "netif_create_ip6_linklocal_address", "group__netif__ip6.html#gae864211a5eb052deb5da7bc7e3427fb9", null ], + [ "netif_find", "group__netif.html#ga69c93a139e8a1f6ef4e3d076a2897def", null ], + [ "netif_get_by_index", "group__netif.html#gae4df885347c800a5486d3bf25981300e", null ], + [ "netif_get_ip6_addr_match", "netif_8h.html#a0ec111195bcc452f77895ad35aedd7dc", null ], + [ "netif_index_to_name", "group__netif.html#ga3ff104d083914e87a7805a0b90a85755", null ], + [ "netif_input", "group__lwip__nosys.html#ga5532f93d68c874fb99c681bff2165385", null ], + [ "netif_invoke_ext_callback", "netif_8h.html#a75b5298b1c3c3794747d78a4ce95d81c", null ], + [ "netif_ip6_addr_set", "group__netif__ip6.html#gae21572fdbd8664d22a1b281a6c31c9bb", null ], + [ "netif_ip6_addr_set_state", "group__netif__ip6.html#ga9cde7286535c7f037a9b16052561b91f", null ], + [ "netif_loop_output", "group__netif.html#ga691f1cc7c9778ffa62a3843c184404b2", null ], + [ "netif_name_to_index", "group__netif.html#gac763a1f647fb9e8af4254418e813a6ae", null ], + [ "netif_poll", "netif_8h.html#a0fbaed78253d21e1b54e65651da3e327", null ], + [ "netif_remove", "group__netif.html#ga9c6e541f0c184e1ea61a5cd8afe3e979", null ], + [ "netif_remove_ext_callback", "group__netif.html#ga1d91ac26b0993a9a3466b317ab5ec716", null ], + [ "netif_set_addr", "group__netif__ip4.html#ga85e31a68e96390dab2feffb11f4948a1", null ], + [ "netif_set_default", "group__netif.html#gac90f290edd005238d62aa94c4ac9dea3", null ], + [ "netif_set_down", "group__netif.html#ga641d07ed8c31fe5306bc01605a6790cf", null ], + [ "netif_set_gw", "group__netif__ip4.html#ga841876c274c3c90898579f9e12f3b520", null ], + [ "netif_set_ipaddr", "group__netif__ip4.html#ga73b043a7ec0e4899aba8433ec9064cca", null ], + [ "netif_set_link_callback", "group__netif.html#ga1cd45910add90e267e33d680bbc3f0f4", null ], + [ "netif_set_link_down", "group__netif.html#ga34e37a1e8e358760dc1c43887922c7db", null ], + [ "netif_set_link_up", "group__netif.html#gae0d2975f189277990e9d5276fdd9e9ea", null ], + [ "netif_set_netmask", "group__netif__ip4.html#ga0bdd7c057c2f55f670853e3906014a53", null ], + [ "netif_set_remove_callback", "group__netif.html#ga319c88da0fdf25c1fee1595299bc35ce", null ], + [ "netif_set_status_callback", "group__netif.html#gadc8787b23ac0ee023979cbadf87813d4", null ], + [ "netif_set_up", "group__netif.html#gaf19693be401a265a52d2a56c65753121", null ], + [ "netif_default", "netif_8h.html#a3d0925cbce550ed461907aee816713ba", null ], + [ "netif_list", "netif_8h.html#a1c8141eaa98f6dc6dfddbb23a706656c", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/netifapi_8c.html b/Libraries/LwIP/doc/doxygen/output/html/netifapi_8c.html new file mode 100644 index 0000000..27e6675 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/netifapi_8c.html @@ -0,0 +1,246 @@ + + + + + + + +lwIP: src/api/netifapi.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  netifapi.c File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/etharp.h"
                  +#include "lwip/netifapi.h"
                  +#include "lwip/memp.h"
                  +#include "lwip/priv/tcpip_priv.h"
                  +#include <string.h>
                  +
                  + + + + + + + + + + + + + + + +

                  +Functions

                  err_t netifapi_arp_add (const ip4_addr_t *ipaddr, struct eth_addr *ethaddr, enum netifapi_arp_entry type)
                   
                  err_t netifapi_arp_remove (const ip4_addr_t *ipaddr, enum netifapi_arp_entry type)
                   
                  err_t netifapi_netif_add (struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input)
                   
                  err_t netifapi_netif_set_addr (struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw)
                   
                  err_t netifapi_netif_common (struct netif *netif, netifapi_void_fn voidfunc, netifapi_errt_fn errtfunc)
                   
                  err_t netifapi_netif_name_to_index (const char *name, u8_t *idx)
                   
                  err_t netifapi_netif_index_to_name (u8_t idx, char *name)
                   
                  +

                  Detailed Description

                  +

                  Network Interface Sequential API module

                  +

                  Function Documentation

                  + +

                  ◆ netifapi_arp_add()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t netifapi_arp_add (const ip4_addr_tipaddr,
                  struct eth_addrethaddr,
                  enum netifapi_arp_entry type 
                  )
                  +
                  +

                  Add or update an entry in the ARP cache. For an update, ipaddr is used to find the cache entry.

                  +
                  Parameters
                  + + + + +
                  ipaddrIPv4 address of cache entry
                  ethaddrhardware address mapped to ipaddr
                  typetype of ARP cache entry
                  +
                  +
                  +
                  Returns
                  ERR_OK: entry added/updated, else error from err_t
                  + +
                  +
                  + +

                  ◆ netifapi_arp_remove()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  err_t netifapi_arp_remove (const ip4_addr_tipaddr,
                  enum netifapi_arp_entry type 
                  )
                  +
                  +

                  Remove an entry in the ARP cache identified by ipaddr

                  +
                  Parameters
                  + + + +
                  ipaddrIPv4 address of cache entry
                  typetype of ARP cache entry
                  +
                  +
                  +
                  Returns
                  ERR_OK: entry removed, else error from err_t
                  + +
                  +
                  + +

                  ◆ netifapi_netif_common()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t netifapi_netif_common (struct netifnetif,
                  netifapi_void_fn voidfunc,
                  netifapi_errt_fn errtfunc 
                  )
                  +
                  +

                  call the "errtfunc" (or the "voidfunc" if "errtfunc" is NULL) in a thread-safe way by running that function inside the tcpip_thread context.

                  +
                  Note
                  use only for functions where there is only "netif" parameter.
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/netifapi_8c.js b/Libraries/LwIP/doc/doxygen/output/html/netifapi_8c.js new file mode 100644 index 0000000..ebbdb59 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/netifapi_8c.js @@ -0,0 +1,10 @@ +var netifapi_8c = +[ + [ "netifapi_arp_add", "netifapi_8c.html#a62b0bdbb3783eb27aa73485081306119", null ], + [ "netifapi_arp_remove", "netifapi_8c.html#a037c3d05c19b4d467b6ce06eb4639ee8", null ], + [ "netifapi_netif_add", "group__netifapi__netif.html#gacc063c5a3071e34eec7376651e35a519", null ], + [ "netifapi_netif_common", "netifapi_8c.html#a26fd83042b53b2ff82e15262ed72f0a7", null ], + [ "netifapi_netif_index_to_name", "group__netifapi__netif.html#gab7914d77d0a89fd6c31048feb0bdafb6", null ], + [ "netifapi_netif_name_to_index", "group__netifapi__netif.html#gad4a821182d01eafa4ca258f958fcb089", null ], + [ "netifapi_netif_set_addr", "group__netifapi__netif.html#ga31755ea6dbb213236bfce19bcbe8c973", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/netifapi_8h.html b/Libraries/LwIP/doc/doxygen/output/html/netifapi_8h.html new file mode 100644 index 0000000..cbeadc4 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/netifapi_8h.html @@ -0,0 +1,280 @@ + + + + + + + +lwIP: src/include/lwip/netifapi.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  netifapi.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/sys.h"
                  +#include "lwip/netif.h"
                  +#include "lwip/dhcp.h"
                  +#include "lwip/autoip.h"
                  +#include "lwip/priv/tcpip_priv.h"
                  +#include "lwip/priv/api_msg.h"
                  +#include "lwip/prot/ethernet.h"
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Macros

                  #define netifapi_netif_remove(n)   netifapi_netif_common(n, netif_remove, NULL)
                   
                  #define netifapi_netif_set_up(n)   netifapi_netif_common(n, netif_set_up, NULL)
                   
                  #define netifapi_netif_set_down(n)   netifapi_netif_common(n, netif_set_down, NULL)
                   
                  #define netifapi_netif_set_default(n)   netifapi_netif_common(n, netif_set_default, NULL)
                   
                  #define netifapi_netif_set_link_up(n)   netifapi_netif_common(n, netif_set_link_up, NULL)
                   
                  #define netifapi_netif_set_link_down(n)   netifapi_netif_common(n, netif_set_link_down, NULL)
                   
                  #define netifapi_dhcp_start(n)   netifapi_netif_common(n, NULL, dhcp_start)
                   
                  #define netifapi_dhcp_stop(n)   netifapi_netif_common(n, dhcp_stop, NULL)
                   
                  #define netifapi_dhcp_inform(n)   netifapi_netif_common(n, dhcp_inform, NULL)
                   
                  #define netifapi_dhcp_renew(n)   netifapi_netif_common(n, NULL, dhcp_renew)
                   
                  #define netifapi_dhcp_release(n)   netifapi_netif_common(n, NULL, dhcp_release)
                   
                  #define netifapi_dhcp_release_and_stop(n)   netifapi_netif_common(n, dhcp_release_and_stop, NULL)
                   
                  #define netifapi_autoip_start(n)   netifapi_netif_common(n, NULL, autoip_start)
                   
                  #define netifapi_autoip_stop(n)   netifapi_netif_common(n, NULL, autoip_stop)
                   
                  + + + + + + + + + + + + + + + +

                  +Functions

                  err_t netifapi_arp_add (const ip4_addr_t *ipaddr, struct eth_addr *ethaddr, enum netifapi_arp_entry type)
                   
                  err_t netifapi_arp_remove (const ip4_addr_t *ipaddr, enum netifapi_arp_entry type)
                   
                  err_t netifapi_netif_add (struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input)
                   
                  err_t netifapi_netif_set_addr (struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw)
                   
                  err_t netifapi_netif_common (struct netif *netif, netifapi_void_fn voidfunc, netifapi_errt_fn errtfunc)
                   
                  err_t netifapi_netif_name_to_index (const char *name, u8_t *idx)
                   
                  err_t netifapi_netif_index_to_name (u8_t idx, char *name)
                   
                  +

                  Detailed Description

                  +

                  netif API (to be used from non-TCPIP threads)

                  +

                  Function Documentation

                  + +

                  ◆ netifapi_arp_add()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t netifapi_arp_add (const ip4_addr_tipaddr,
                  struct eth_addrethaddr,
                  enum netifapi_arp_entry type 
                  )
                  +
                  +

                  Add or update an entry in the ARP cache. For an update, ipaddr is used to find the cache entry.

                  +
                  Parameters
                  + + + + +
                  ipaddrIPv4 address of cache entry
                  ethaddrhardware address mapped to ipaddr
                  typetype of ARP cache entry
                  +
                  +
                  +
                  Returns
                  ERR_OK: entry added/updated, else error from err_t
                  + +
                  +
                  + +

                  ◆ netifapi_arp_remove()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  err_t netifapi_arp_remove (const ip4_addr_tipaddr,
                  enum netifapi_arp_entry type 
                  )
                  +
                  +

                  Remove an entry in the ARP cache identified by ipaddr

                  +
                  Parameters
                  + + + +
                  ipaddrIPv4 address of cache entry
                  typetype of ARP cache entry
                  +
                  +
                  +
                  Returns
                  ERR_OK: entry removed, else error from err_t
                  + +
                  +
                  + +

                  ◆ netifapi_netif_common()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t netifapi_netif_common (struct netifnetif,
                  netifapi_void_fn voidfunc,
                  netifapi_errt_fn errtfunc 
                  )
                  +
                  +

                  call the "errtfunc" (or the "voidfunc" if "errtfunc" is NULL) in a thread-safe way by running that function inside the tcpip_thread context.

                  +
                  Note
                  use only for functions where there is only "netif" parameter.
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/netifapi_8h.js b/Libraries/LwIP/doc/doxygen/output/html/netifapi_8h.js new file mode 100644 index 0000000..20af8ed --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/netifapi_8h.js @@ -0,0 +1,24 @@ +var netifapi_8h = +[ + [ "netifapi_autoip_start", "group__netifapi__autoip.html#gaca26bae2a21e0732a7599df14f880af2", null ], + [ "netifapi_autoip_stop", "group__netifapi__autoip.html#gae604f96907a52557e4ebd1bd5d80071d", null ], + [ "netifapi_dhcp_inform", "group__netifapi__dhcp4.html#ga29108975e9aa6463b9a574de961317e0", null ], + [ "netifapi_dhcp_release", "group__netifapi__dhcp4.html#ga5aeaee24c11128df90a56fe091c9d409", null ], + [ "netifapi_dhcp_release_and_stop", "group__netifapi__dhcp4.html#ga1971af04f882f5afdb3ade454a680134", null ], + [ "netifapi_dhcp_renew", "group__netifapi__dhcp4.html#ga642390e5efa53ad3095e01331c6a936b", null ], + [ "netifapi_dhcp_start", "group__netifapi__dhcp4.html#gae64d13afc6e3b0f21aae04b66d0e3765", null ], + [ "netifapi_dhcp_stop", "group__netifapi__dhcp4.html#ga2322c0d0e3eb6c1097d6f3942905dbd5", null ], + [ "netifapi_netif_remove", "group__netifapi__netif.html#ga0e3f522b900a0ba04421c4587e790373", null ], + [ "netifapi_netif_set_default", "group__netifapi__netif.html#ga862d6cfa5d36b2c36d7b1671e8d95ccf", null ], + [ "netifapi_netif_set_down", "group__netifapi__netif.html#ga22c02edde32743ccfd41924da0601a16", null ], + [ "netifapi_netif_set_link_down", "group__netifapi__netif.html#ga2a9694804743f5466c4ecc400b7f07e4", null ], + [ "netifapi_netif_set_link_up", "group__netifapi__netif.html#gac054a60a32447019913d34da63924853", null ], + [ "netifapi_netif_set_up", "group__netifapi__netif.html#ga6ce735fe79efe1739e53b7f0e975ac76", null ], + [ "netifapi_arp_add", "netifapi_8h.html#a62b0bdbb3783eb27aa73485081306119", null ], + [ "netifapi_arp_remove", "netifapi_8h.html#a037c3d05c19b4d467b6ce06eb4639ee8", null ], + [ "netifapi_netif_add", "group__netifapi__netif.html#gacc063c5a3071e34eec7376651e35a519", null ], + [ "netifapi_netif_common", "netifapi_8h.html#a26fd83042b53b2ff82e15262ed72f0a7", null ], + [ "netifapi_netif_index_to_name", "group__netifapi__netif.html#gab7914d77d0a89fd6c31048feb0bdafb6", null ], + [ "netifapi_netif_name_to_index", "group__netifapi__netif.html#gad4a821182d01eafa4ca258f958fcb089", null ], + [ "netifapi_netif_set_addr", "group__netifapi__netif.html#ga31755ea6dbb213236bfce19bcbe8c973", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/opt_8h.html b/Libraries/LwIP/doc/doxygen/output/html/opt_8h.html new file mode 100644 index 0000000..84b19f6 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/opt_8h.html @@ -0,0 +1,736 @@ + + + + + + + +lwIP: src/include/lwip/opt.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  opt.h File Reference
                  +
                  +
                  +
                  #include "lwipopts.h"
                  +#include "lwip/debug.h"
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Macros

                  #define NO_SYS   0
                   
                  #define LWIP_TIMERS   1
                   
                  #define LWIP_TIMERS_CUSTOM   0
                   
                  #define MEMCPY(dst, src, len)   memcpy(dst,src,len)
                   
                  #define SMEMCPY(dst, src, len)   memcpy(dst,src,len)
                   
                  #define MEMMOVE(dst, src, len)   memmove(dst,src,len)
                   
                  #define LWIP_MPU_COMPATIBLE   0
                   
                  #define LWIP_TCPIP_CORE_LOCKING   1
                   
                  #define LWIP_TCPIP_CORE_LOCKING_INPUT   0
                   
                  #define SYS_LIGHTWEIGHT_PROT   1
                   
                  #define LWIP_ASSERT_CORE_LOCKED()
                   
                  #define LWIP_MARK_TCPIP_THREAD()
                   
                  #define MEM_LIBC_MALLOC   0
                   
                  #define MEMP_MEM_MALLOC   0
                   
                  #define MEMP_MEM_INIT   0
                   
                  #define MEM_ALIGNMENT   1
                   
                  #define MEM_SIZE   1600
                   
                  #define MEMP_OVERFLOW_CHECK   0
                   
                  #define MEMP_SANITY_CHECK   0
                   
                  #define MEM_OVERFLOW_CHECK   0
                   
                  #define MEM_SANITY_CHECK   0
                   
                  #define MEM_USE_POOLS   0
                   
                  #define MEM_USE_POOLS_TRY_BIGGER_POOL   0
                   
                  #define MEMP_USE_CUSTOM_POOLS   0
                   
                  #define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT   0
                   
                  #define MEMP_NUM_PBUF   16
                   
                  #define MEMP_NUM_RAW_PCB   4
                   
                  #define MEMP_NUM_UDP_PCB   4
                   
                  #define MEMP_NUM_TCP_PCB   5
                   
                  #define MEMP_NUM_TCP_PCB_LISTEN   8
                   
                  #define MEMP_NUM_TCP_SEG   16
                   
                  #define MEMP_NUM_ALTCP_PCB   MEMP_NUM_TCP_PCB
                   
                  #define MEMP_NUM_REASSDATA   5
                   
                  #define MEMP_NUM_FRAG_PBUF   15
                   
                  #define MEMP_NUM_ARP_QUEUE   30
                   
                  #define MEMP_NUM_IGMP_GROUP   8
                   
                  #define LWIP_NUM_SYS_TIMEOUT_INTERNAL   (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + PPP_NUM_TIMEOUTS + (LWIP_IPV6 * (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD)))
                   
                  #define MEMP_NUM_SYS_TIMEOUT   LWIP_NUM_SYS_TIMEOUT_INTERNAL
                   
                  #define MEMP_NUM_NETBUF   2
                   
                  #define MEMP_NUM_NETCONN   4
                   
                  #define MEMP_NUM_SELECT_CB   4
                   
                  #define MEMP_NUM_TCPIP_MSG_API   8
                   
                  #define MEMP_NUM_TCPIP_MSG_INPKT   8
                   
                  #define MEMP_NUM_NETDB   1
                   
                  #define MEMP_NUM_LOCALHOSTLIST   1
                   
                  #define PBUF_POOL_SIZE   16
                   
                  #define MEMP_NUM_API_MSG   MEMP_NUM_TCPIP_MSG_API
                   
                  #define MEMP_NUM_DNS_API_MSG   MEMP_NUM_TCPIP_MSG_API
                   
                  #define MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA   MEMP_NUM_TCPIP_MSG_API
                   
                  #define MEMP_NUM_NETIFAPI_MSG   MEMP_NUM_TCPIP_MSG_API
                   
                  #define LWIP_ARP   1
                   
                  #define ARP_TABLE_SIZE   10
                   
                  #define ARP_MAXAGE   300
                   
                  #define ARP_QUEUEING   0
                   
                  #define ARP_QUEUE_LEN   3
                   
                  #define ETHARP_SUPPORT_VLAN   0
                   
                  #define LWIP_ETHERNET   LWIP_ARP
                   
                  #define ETH_PAD_SIZE   0
                   
                  #define ETHARP_SUPPORT_STATIC_ENTRIES   0
                   
                  #define ETHARP_TABLE_MATCH_NETIF   !LWIP_SINGLE_NETIF
                   
                  #define LWIP_IPV4   1
                   
                  #define IP_FORWARD   0
                   
                  #define IP_REASSEMBLY   1
                   
                  #define IP_FRAG   1
                   
                  #define IP_OPTIONS_ALLOWED   1
                   
                  #define IP_REASS_MAXAGE   15
                   
                  #define IP_REASS_MAX_PBUFS   10
                   
                  #define IP_DEFAULT_TTL   255
                   
                  #define IP_SOF_BROADCAST   0
                   
                  #define IP_SOF_BROADCAST_RECV   0
                   
                  #define IP_FORWARD_ALLOW_TX_ON_RX_NETIF   0
                   
                  #define LWIP_ICMP   1
                   
                  #define ICMP_TTL   IP_DEFAULT_TTL
                   
                  #define LWIP_BROADCAST_PING   0
                   
                  #define LWIP_MULTICAST_PING   0
                   
                  #define LWIP_RAW   0
                   
                  #define RAW_TTL   IP_DEFAULT_TTL
                   
                  #define LWIP_DHCP   0
                   
                  #define DHCP_DOES_ARP_CHECK   (LWIP_DHCP && LWIP_ARP)
                   
                  #define LWIP_DHCP_BOOTP_FILE   0
                   
                  #define LWIP_DHCP_GET_NTP_SRV   0
                   
                  #define LWIP_DHCP_MAX_NTP_SERVERS   1
                   
                  #define LWIP_DHCP_MAX_DNS_SERVERS   DNS_MAX_SERVERS
                   
                  #define LWIP_AUTOIP   0
                   
                  #define LWIP_DHCP_AUTOIP_COOP   0
                   
                  #define LWIP_DHCP_AUTOIP_COOP_TRIES   9
                   
                  #define LWIP_MIB2_CALLBACKS   0
                   
                  #define LWIP_MULTICAST_TX_OPTIONS   ((LWIP_IGMP || LWIP_IPV6_MLD) && (LWIP_UDP || LWIP_RAW))
                   
                  #define LWIP_IGMP   0
                   
                  #define LWIP_DNS   0
                   
                  #define DNS_TABLE_SIZE   4
                   
                  #define DNS_MAX_NAME_LENGTH   256
                   
                  #define DNS_MAX_SERVERS   2
                   
                  #define DNS_MAX_RETRIES   4
                   
                  #define DNS_DOES_NAME_CHECK   1
                   
                  #define LWIP_DNS_SECURE   (LWIP_DNS_SECURE_RAND_XID | LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING | LWIP_DNS_SECURE_RAND_SRC_PORT)
                   
                  #define DNS_LOCAL_HOSTLIST   0
                   
                  #define DNS_LOCAL_HOSTLIST_IS_DYNAMIC   0
                   
                  #define LWIP_DNS_SUPPORT_MDNS_QUERIES   0
                   
                  #define LWIP_UDP   1
                   
                  #define LWIP_UDPLITE   0
                   
                  #define UDP_TTL   IP_DEFAULT_TTL
                   
                  #define LWIP_NETBUF_RECVINFO   0
                   
                  #define LWIP_TCP   1
                   
                  #define TCP_TTL   IP_DEFAULT_TTL
                   
                  #define TCP_WND   (4 * TCP_MSS)
                   
                  #define TCP_MAXRTX   12
                   
                  #define TCP_SYNMAXRTX   6
                   
                  #define TCP_QUEUE_OOSEQ   LWIP_TCP
                   
                  #define LWIP_TCP_SACK_OUT   0
                   
                  #define LWIP_TCP_MAX_SACK_NUM   4
                   
                  #define TCP_MSS   536
                   
                  #define TCP_CALCULATE_EFF_SEND_MSS   1
                   
                  #define TCP_SND_BUF   (2 * TCP_MSS)
                   
                  #define TCP_SND_QUEUELEN   ((4 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS))
                   
                  #define TCP_SNDLOWAT   LWIP_MIN(LWIP_MAX(((TCP_SND_BUF)/2), (2 * TCP_MSS) + 1), (TCP_SND_BUF) - 1)
                   
                  #define TCP_SNDQUEUELOWAT   LWIP_MAX(((TCP_SND_QUEUELEN)/2), 5)
                   
                  #define TCP_OOSEQ_MAX_BYTES   0
                   
                  #define TCP_OOSEQ_MAX_PBUFS   0
                   
                  #define TCP_LISTEN_BACKLOG   0
                   
                  #define TCP_DEFAULT_LISTEN_BACKLOG   0xff
                   
                  #define TCP_OVERSIZE   TCP_MSS
                   
                  #define LWIP_TCP_TIMESTAMPS   0
                   
                  #define TCP_WND_UPDATE_THRESHOLD   LWIP_MIN((TCP_WND / 4), (TCP_MSS * 4))
                   
                  #define LWIP_EVENT_API   0
                   
                  #define LWIP_WND_SCALE   0
                   
                  #define LWIP_TCP_PCB_NUM_EXT_ARGS   0
                   
                  #define LWIP_ALTCP   0
                   
                  #define LWIP_ALTCP_TLS   0
                   
                  #define PBUF_LINK_HLEN   (14 + ETH_PAD_SIZE)
                   
                  #define PBUF_LINK_ENCAPSULATION_HLEN   0
                   
                  #define PBUF_POOL_BUFSIZE   LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN)
                   
                  #define LWIP_PBUF_REF_T   u8_t
                   
                  #define LWIP_SINGLE_NETIF   0
                   
                  #define LWIP_NETIF_HOSTNAME   0
                   
                  #define LWIP_NETIF_API   0
                   
                  #define LWIP_NETIF_STATUS_CALLBACK   0
                   
                  #define LWIP_NETIF_EXT_STATUS_CALLBACK   0
                   
                  #define LWIP_NETIF_LINK_CALLBACK   0
                   
                  #define LWIP_NETIF_REMOVE_CALLBACK   0
                   
                  #define LWIP_NETIF_HWADDRHINT   0
                   
                  #define LWIP_NETIF_TX_SINGLE_PBUF   0
                   
                  #define LWIP_NUM_NETIF_CLIENT_DATA   0
                   
                  #define LWIP_HAVE_LOOPIF   (LWIP_NETIF_LOOPBACK && !LWIP_SINGLE_NETIF)
                   
                  #define LWIP_LOOPIF_MULTICAST   0
                   
                  #define LWIP_NETIF_LOOPBACK   0
                   
                  #define LWIP_LOOPBACK_MAX_PBUFS   0
                   
                  #define LWIP_NETIF_LOOPBACK_MULTITHREADING   (!NO_SYS)
                   
                  #define TCPIP_THREAD_NAME   "tcpip_thread"
                   
                  #define TCPIP_THREAD_STACKSIZE   0
                   
                  #define TCPIP_THREAD_PRIO   1
                   
                  #define TCPIP_MBOX_SIZE   0
                   
                  #define LWIP_TCPIP_THREAD_ALIVE()
                   
                  #define SLIPIF_THREAD_NAME   "slipif_loop"
                   
                  #define SLIPIF_THREAD_STACKSIZE   0
                   
                  #define SLIPIF_THREAD_PRIO   1
                   
                  #define DEFAULT_THREAD_NAME   "lwIP"
                   
                  #define DEFAULT_THREAD_STACKSIZE   0
                   
                  #define DEFAULT_THREAD_PRIO   1
                   
                  #define DEFAULT_RAW_RECVMBOX_SIZE   0
                   
                  #define DEFAULT_UDP_RECVMBOX_SIZE   0
                   
                  #define DEFAULT_TCP_RECVMBOX_SIZE   0
                   
                  #define DEFAULT_ACCEPTMBOX_SIZE   0
                   
                  #define LWIP_NETCONN   1
                   
                  #define LWIP_TCPIP_TIMEOUT   0
                   
                  #define LWIP_NETCONN_SEM_PER_THREAD   0
                   
                  #define LWIP_NETCONN_FULLDUPLEX   0
                   
                  #define LWIP_SOCKET   1
                   
                  #define LWIP_COMPAT_SOCKETS   1
                   
                  #define LWIP_POSIX_SOCKETS_IO_NAMES   1
                   
                  #define LWIP_SOCKET_OFFSET   0
                   
                  #define LWIP_TCP_KEEPALIVE   0
                   
                  #define LWIP_SO_SNDTIMEO   0
                   
                  #define LWIP_SO_RCVTIMEO   0
                   
                  #define LWIP_SO_SNDRCVTIMEO_NONSTANDARD   0
                   
                  #define LWIP_SO_RCVBUF   0
                   
                  #define LWIP_SO_LINGER   0
                   
                  #define RECV_BUFSIZE_DEFAULT   INT_MAX
                   
                  #define LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT   20000
                   
                  #define SO_REUSE   0
                   
                  #define SO_REUSE_RXTOALL   0
                   
                  #define LWIP_FIONREAD_LINUXMODE   0
                   
                  #define LWIP_SOCKET_SELECT   1
                   
                  #define LWIP_SOCKET_POLL   1
                   
                  #define LWIP_STATS   1
                   
                  #define LWIP_STATS_DISPLAY   0
                   
                  #define LINK_STATS   1
                   
                  #define ETHARP_STATS   (LWIP_ARP)
                   
                  #define IP_STATS   1
                   
                  #define IPFRAG_STATS   (IP_REASSEMBLY || IP_FRAG)
                   
                  #define ICMP_STATS   1
                   
                  #define IGMP_STATS   (LWIP_IGMP)
                   
                  #define UDP_STATS   (LWIP_UDP)
                   
                  #define TCP_STATS   (LWIP_TCP)
                   
                  #define MEM_STATS   ((MEM_LIBC_MALLOC == 0) && (MEM_USE_POOLS == 0))
                   
                  #define MEMP_STATS   (MEMP_MEM_MALLOC == 0)
                   
                  #define SYS_STATS   (NO_SYS == 0)
                   
                  #define IP6_STATS   (LWIP_IPV6)
                   
                  #define ICMP6_STATS   (LWIP_IPV6 && LWIP_ICMP6)
                   
                  #define IP6_FRAG_STATS   (LWIP_IPV6 && (LWIP_IPV6_FRAG || LWIP_IPV6_REASS))
                   
                  #define MLD6_STATS   (LWIP_IPV6 && LWIP_IPV6_MLD)
                   
                  #define ND6_STATS   (LWIP_IPV6)
                   
                  #define MIB2_STATS   0
                   
                  #define LWIP_CHECKSUM_CTRL_PER_NETIF   0
                   
                  #define CHECKSUM_GEN_IP   1
                   
                  #define CHECKSUM_GEN_UDP   1
                   
                  #define CHECKSUM_GEN_TCP   1
                   
                  #define CHECKSUM_GEN_ICMP   1
                   
                  #define CHECKSUM_GEN_ICMP6   1
                   
                  #define CHECKSUM_CHECK_IP   1
                   
                  #define CHECKSUM_CHECK_UDP   1
                   
                  #define CHECKSUM_CHECK_TCP   1
                   
                  #define CHECKSUM_CHECK_ICMP   1
                   
                  #define CHECKSUM_CHECK_ICMP6   1
                   
                  #define LWIP_CHECKSUM_ON_COPY   0
                   
                  #define LWIP_IPV6   0
                   
                  #define IPV6_REASS_MAXAGE   60
                   
                  #define LWIP_IPV6_SCOPES   (LWIP_IPV6 && !LWIP_SINGLE_NETIF)
                   
                  #define LWIP_IPV6_SCOPES_DEBUG   0
                   
                  #define LWIP_IPV6_NUM_ADDRESSES   3
                   
                  #define LWIP_IPV6_FORWARD   0
                   
                  #define LWIP_IPV6_FRAG   1
                   
                  #define LWIP_IPV6_REASS   LWIP_IPV6
                   
                  #define LWIP_IPV6_SEND_ROUTER_SOLICIT   1
                   
                  #define LWIP_IPV6_AUTOCONFIG   LWIP_IPV6
                   
                  #define LWIP_IPV6_ADDRESS_LIFETIMES   LWIP_IPV6_AUTOCONFIG
                   
                  #define LWIP_IPV6_DUP_DETECT_ATTEMPTS   1
                   
                  #define LWIP_ICMP6   LWIP_IPV6
                   
                  #define LWIP_ICMP6_DATASIZE   8
                   
                  #define LWIP_ICMP6_HL   255
                   
                  #define LWIP_IPV6_MLD   LWIP_IPV6
                   
                  #define MEMP_NUM_MLD6_GROUP   4
                   
                  #define LWIP_ND6_QUEUEING   LWIP_IPV6
                   
                  #define MEMP_NUM_ND6_QUEUE   20
                   
                  #define LWIP_ND6_NUM_NEIGHBORS   10
                   
                  #define LWIP_ND6_NUM_DESTINATIONS   10
                   
                  #define LWIP_ND6_NUM_PREFIXES   5
                   
                  #define LWIP_ND6_NUM_ROUTERS   3
                   
                  #define LWIP_ND6_MAX_MULTICAST_SOLICIT   3
                   
                  #define LWIP_ND6_MAX_UNICAST_SOLICIT   3
                   
                  #define LWIP_ND6_MAX_ANYCAST_DELAY_TIME   1000
                   
                  #define LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT   3
                   
                  #define LWIP_ND6_REACHABLE_TIME   30000
                   
                  #define LWIP_ND6_RETRANS_TIMER   1000
                   
                  #define LWIP_ND6_DELAY_FIRST_PROBE_TIME   5000
                   
                  #define LWIP_ND6_ALLOW_RA_UPDATES   1
                   
                  #define LWIP_ND6_TCP_REACHABILITY_HINTS   1
                   
                  #define LWIP_ND6_RDNSS_MAX_DNS_SERVERS   0
                   
                  #define LWIP_IPV6_DHCP6   0
                   
                  #define LWIP_IPV6_DHCP6_STATEFUL   0
                   
                  #define LWIP_IPV6_DHCP6_STATELESS   LWIP_IPV6_DHCP6
                   
                  #define LWIP_DHCP6_GET_NTP_SRV   0
                   
                  #define LWIP_DHCP6_MAX_NTP_SERVERS   1
                   
                  #define LWIP_DHCP6_MAX_DNS_SERVERS   DNS_MAX_SERVERS
                   
                  #define LWIP_HOOK_FILENAME   "path/to/my/lwip_hooks.h"
                   
                  #define LWIP_HOOK_TCP_ISN(local_ip, local_port, remote_ip, remote_port)
                   
                  #define LWIP_HOOK_TCP_INPACKET_PCB(pcb, hdr, optlen, opt1len, opt2, p)
                   
                  #define LWIP_HOOK_TCP_OUT_TCPOPT_LENGTH(pcb, internal_len)
                   
                  #define LWIP_HOOK_TCP_OUT_ADD_TCPOPTS(p, hdr, pcb, opts)
                   
                  #define LWIP_HOOK_IP4_INPUT(pbuf, input_netif)
                   
                  #define LWIP_HOOK_IP4_ROUTE()
                   
                  #define LWIP_HOOK_IP4_ROUTE_SRC(src, dest)
                   
                  #define LWIP_HOOK_IP4_CANFORWARD(src, dest)
                   
                  #define LWIP_HOOK_ETHARP_GET_GW(netif, dest)
                   
                  #define LWIP_HOOK_IP6_INPUT(pbuf, input_netif)
                   
                  #define LWIP_HOOK_IP6_ROUTE(src, dest)
                   
                  #define LWIP_HOOK_ND6_GET_GW(netif, dest)
                   
                  #define LWIP_HOOK_VLAN_CHECK(netif, eth_hdr, vlan_hdr)
                   
                  #define LWIP_HOOK_VLAN_SET(netif, p, src, dst, eth_type)
                   
                  #define LWIP_HOOK_MEMP_AVAILABLE(memp_t_type)
                   
                  #define LWIP_HOOK_UNKNOWN_ETH_PROTOCOL(pbuf, netif)
                   
                  #define LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, state, msg, msg_type, options_len_ptr)
                   
                  #define LWIP_HOOK_DHCP_PARSE_OPTION(netif, dhcp, state, msg, msg_type, option, len, pbuf, offset)
                   
                  #define LWIP_HOOK_DHCP6_APPEND_OPTIONS(netif, dhcp6, state, msg, msg_type, options_len_ptr, max_len)
                   
                  #define LWIP_HOOK_SOCKETS_SETSOCKOPT(s, sock, level, optname, optval, optlen, err)
                   
                  #define LWIP_HOOK_SOCKETS_GETSOCKOPT(s, sock, level, optname, optval, optlen, err)
                   
                  #define LWIP_HOOK_NETCONN_EXTERNAL_RESOLVE(name, addr, addrtype, err)
                   
                  #define LWIP_DBG_MIN_LEVEL   LWIP_DBG_LEVEL_ALL
                   
                  #define LWIP_DBG_TYPES_ON   LWIP_DBG_ON
                   
                  #define ETHARP_DEBUG   LWIP_DBG_OFF
                   
                  #define NETIF_DEBUG   LWIP_DBG_OFF
                   
                  #define PBUF_DEBUG   LWIP_DBG_OFF
                   
                  #define API_LIB_DEBUG   LWIP_DBG_OFF
                   
                  #define API_MSG_DEBUG   LWIP_DBG_OFF
                   
                  #define SOCKETS_DEBUG   LWIP_DBG_OFF
                   
                  #define ICMP_DEBUG   LWIP_DBG_OFF
                   
                  #define IGMP_DEBUG   LWIP_DBG_OFF
                   
                  #define INET_DEBUG   LWIP_DBG_OFF
                   
                  #define IP_DEBUG   LWIP_DBG_OFF
                   
                  #define IP_REASS_DEBUG   LWIP_DBG_OFF
                   
                  #define RAW_DEBUG   LWIP_DBG_OFF
                   
                  #define MEM_DEBUG   LWIP_DBG_OFF
                   
                  #define MEMP_DEBUG   LWIP_DBG_OFF
                   
                  #define SYS_DEBUG   LWIP_DBG_OFF
                   
                  #define TIMERS_DEBUG   LWIP_DBG_OFF
                   
                  #define TCP_DEBUG   LWIP_DBG_OFF
                   
                  #define TCP_INPUT_DEBUG   LWIP_DBG_OFF
                   
                  #define TCP_FR_DEBUG   LWIP_DBG_OFF
                   
                  #define TCP_RTO_DEBUG   LWIP_DBG_OFF
                   
                  #define TCP_CWND_DEBUG   LWIP_DBG_OFF
                   
                  #define TCP_WND_DEBUG   LWIP_DBG_OFF
                   
                  #define TCP_OUTPUT_DEBUG   LWIP_DBG_OFF
                   
                  #define TCP_RST_DEBUG   LWIP_DBG_OFF
                   
                  #define TCP_QLEN_DEBUG   LWIP_DBG_OFF
                   
                  #define UDP_DEBUG   LWIP_DBG_OFF
                   
                  #define TCPIP_DEBUG   LWIP_DBG_OFF
                   
                  #define SLIP_DEBUG   LWIP_DBG_OFF
                   
                  #define DHCP_DEBUG   LWIP_DBG_OFF
                   
                  #define AUTOIP_DEBUG   LWIP_DBG_OFF
                   
                  #define DNS_DEBUG   LWIP_DBG_OFF
                   
                  #define IP6_DEBUG   LWIP_DBG_OFF
                   
                  #define DHCP6_DEBUG   LWIP_DBG_OFF
                   
                  #define LWIP_PERF   0
                   
                  +

                  Detailed Description

                  +

                  lwIP Options Configuration

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/opt_8h.js b/Libraries/LwIP/doc/doxygen/output/html/opt_8h.js new file mode 100644 index 0000000..e91b2f2 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/opt_8h.js @@ -0,0 +1,316 @@ +var opt_8h = +[ + [ "API_LIB_DEBUG", "group__lwip__opts__debugmsg.html#ga671009550216f7dc03e67ba5751e3160", null ], + [ "API_MSG_DEBUG", "group__lwip__opts__debugmsg.html#ga4279d7ff9f986b2ff3eb068bb012b697", null ], + [ "ARP_MAXAGE", "group__lwip__opts__arp.html#ga741a0710dc126ed3ae9e305472df3432", null ], + [ "ARP_QUEUE_LEN", "group__lwip__opts__arp.html#ga29f41a6ebdbb23f46688d381b3609fd1", null ], + [ "ARP_QUEUEING", "group__lwip__opts__arp.html#ga75837814536af29b6102508588d0ab58", null ], + [ "ARP_TABLE_SIZE", "group__lwip__opts__arp.html#ga924936a814564dbdb0bc950d255a83b9", null ], + [ "AUTOIP_DEBUG", "group__lwip__opts__debugmsg.html#gafaee522e7f32d81022215e1805e303a5", null ], + [ "CHECKSUM_CHECK_ICMP", "group__lwip__opts__checksum.html#ga79807171be8c20b69a5cd8de83566d25", null ], + [ "CHECKSUM_CHECK_ICMP6", "group__lwip__opts__checksum.html#gaf466a10b093489910a773fd1cec74c2d", null ], + [ "CHECKSUM_CHECK_IP", "group__lwip__opts__checksum.html#ga005b1b9988b84a2cb844144cef22c11e", null ], + [ "CHECKSUM_CHECK_TCP", "group__lwip__opts__checksum.html#gab676cc29571b7ffda12336482ad97699", null ], + [ "CHECKSUM_CHECK_UDP", "group__lwip__opts__checksum.html#ga6747f7b72abe544fd4dc184cc7fcad37", null ], + [ "CHECKSUM_GEN_ICMP", "group__lwip__opts__checksum.html#ga2291ec5bec0a551545da6d5f9f9316b2", null ], + [ "CHECKSUM_GEN_ICMP6", "group__lwip__opts__checksum.html#ga7cd47a55af03b1048c5a4a5fe0e76013", null ], + [ "CHECKSUM_GEN_IP", "group__lwip__opts__checksum.html#ga8ddad81fc26268a13b35091781da2265", null ], + [ "CHECKSUM_GEN_TCP", "group__lwip__opts__checksum.html#ga800069963cc4552b99235237c22f00bb", null ], + [ "CHECKSUM_GEN_UDP", "group__lwip__opts__checksum.html#ga98d460f8c2baed8bf62d5473831c0b2c", null ], + [ "DEFAULT_ACCEPTMBOX_SIZE", "group__lwip__opts__thread.html#ga5d5a6e04abe2ec233c7acdb09f992461", null ], + [ "DEFAULT_RAW_RECVMBOX_SIZE", "group__lwip__opts__thread.html#ga4ef8f046c957750056131310a1580df7", null ], + [ "DEFAULT_TCP_RECVMBOX_SIZE", "group__lwip__opts__thread.html#ga1bd172938b9c8ba63156fcafc87e83c7", null ], + [ "DEFAULT_THREAD_NAME", "group__lwip__opts__thread.html#gaca13123a5c8271558353e04123957616", null ], + [ "DEFAULT_THREAD_PRIO", "group__lwip__opts__thread.html#ga3d8715b1fdd0449d6c214e4a40108456", null ], + [ "DEFAULT_THREAD_STACKSIZE", "group__lwip__opts__thread.html#ga7f93dfeaed4021061959f822def602cb", null ], + [ "DEFAULT_UDP_RECVMBOX_SIZE", "group__lwip__opts__thread.html#ga09fe785559b3f0cf108da4440489e335", null ], + [ "DHCP6_DEBUG", "group__lwip__opts__debugmsg.html#gacfc11be8b3bf6bb55e3e5c39ea8802d1", null ], + [ "DHCP_DEBUG", "group__lwip__opts__debugmsg.html#ga97927ceecabcdb5f41735bf372a05cee", null ], + [ "DHCP_DOES_ARP_CHECK", "group__lwip__opts__dhcp.html#gab2d91de7b2fce879b0a213682e1b0b69", null ], + [ "DNS_DEBUG", "group__lwip__opts__debugmsg.html#gaba55da2352c99d813767913e5e36be1f", null ], + [ "DNS_DOES_NAME_CHECK", "group__lwip__opts__dns.html#ga07ffd8e9106dae3b65347bd03811a4b6", null ], + [ "DNS_LOCAL_HOSTLIST", "group__lwip__opts__dns.html#gacba1ac491c1b47b98dfbd0d5c1662659", null ], + [ "DNS_LOCAL_HOSTLIST_IS_DYNAMIC", "group__lwip__opts__dns.html#ga8235a5fb0a1c1cceeee670cf95612ba8", null ], + [ "DNS_MAX_NAME_LENGTH", "group__lwip__opts__dns.html#ga3b01c79902063c170ef57deb72f56124", null ], + [ "DNS_MAX_RETRIES", "group__lwip__opts__dns.html#gaab73c241189335435f3f662aa6a00dba", null ], + [ "DNS_MAX_SERVERS", "group__lwip__opts__dns.html#ga9f9881c887a8aceb9765820c2dbdf292", null ], + [ "DNS_TABLE_SIZE", "group__lwip__opts__dns.html#ga2384e76c1acdf969d883f3de08d340f7", null ], + [ "ETH_PAD_SIZE", "group__lwip__opts__arp.html#gad7fa3b356ca7e603e848b069c4cc6276", null ], + [ "ETHARP_DEBUG", "group__lwip__opts__debugmsg.html#gabff5d1e0b334f5b45bd2b8bbb675411e", null ], + [ "ETHARP_STATS", "group__lwip__opts__stats.html#ga3a8359abf4fff8ffdc449e5007f93275", null ], + [ "ETHARP_SUPPORT_STATIC_ENTRIES", "group__lwip__opts__arp.html#ga4675829464156f3d665f4de171c212d7", null ], + [ "ETHARP_SUPPORT_VLAN", "group__lwip__opts__arp.html#ga70ce0ecf56cf5fab000134e66d863f90", null ], + [ "ETHARP_TABLE_MATCH_NETIF", "group__lwip__opts__arp.html#ga2f762eee309a545650f80fc8dcc19084", null ], + [ "ICMP6_STATS", "group__lwip__opts__stats.html#ga714006cd5c5b0eb333159d0f677616a0", null ], + [ "ICMP_DEBUG", "group__lwip__opts__debugmsg.html#ga9595904a1cb9bfe0b9b1d958abdc923a", null ], + [ "ICMP_STATS", "group__lwip__opts__stats.html#ga472ad3f6da741f5b287d66ad3051242b", null ], + [ "ICMP_TTL", "group__lwip__opts__icmp.html#gae1533f2bc39a5843989909555f6ce0cf", null ], + [ "IGMP_DEBUG", "group__lwip__opts__debugmsg.html#ga8da07508ee75704362d45eee3eb857fa", null ], + [ "IGMP_STATS", "group__lwip__opts__stats.html#ga4d12af1356b9fd60717984be51e27740", null ], + [ "INET_DEBUG", "group__lwip__opts__debugmsg.html#ga78140cbe70258a65cb5c9e381843e4f3", null ], + [ "IP6_DEBUG", "group__lwip__opts__debugmsg.html#gac2f9726756b78d4d7c425b0422a776ce", null ], + [ "IP6_FRAG_STATS", "group__lwip__opts__stats.html#gaaa08a181c11ff8b471549e8f52c9939b", null ], + [ "IP6_STATS", "group__lwip__opts__stats.html#ga6a211b787c97bce3af4273b29c95d9c2", null ], + [ "IP_DEBUG", "group__lwip__opts__debugmsg.html#ga5d3348778951e7bc5cd397c6575eef3a", null ], + [ "IP_DEFAULT_TTL", "group__lwip__opts__ipv4.html#ga556b9b58fd02c0fdd126791baef77411", null ], + [ "IP_FORWARD", "group__lwip__opts__ipv4.html#ga881d32ff5ee02af01f758953f1b51d59", null ], + [ "IP_FORWARD_ALLOW_TX_ON_RX_NETIF", "group__lwip__opts__ipv4.html#ga9e761df07c4e93901858741d4771dbc7", null ], + [ "IP_FRAG", "group__lwip__opts__ipv4.html#gaf85c8bdd5035b6cada790b4cc2a209a4", null ], + [ "IP_OPTIONS_ALLOWED", "group__lwip__opts__ipv4.html#gaa956b0167c37a2265b55e2d0204a3933", null ], + [ "IP_REASS_DEBUG", "group__lwip__opts__debugmsg.html#ga4cdc3e9a4a1c01d1f7f0e723a1b2ec33", null ], + [ "IP_REASS_MAX_PBUFS", "group__lwip__opts__ipv4.html#ga29084a46d7d4be30e8029d356bca0394", null ], + [ "IP_REASS_MAXAGE", "group__lwip__opts__ipv4.html#gad41122bd0b5485a18a4415c8f953727b", null ], + [ "IP_REASSEMBLY", "group__lwip__opts__ipv4.html#ga1a31ab0e0f37b17d40fa7c35bc2c4f69", null ], + [ "IP_SOF_BROADCAST", "group__lwip__opts__ipv4.html#ga0b2c993fd940f5774108298933310384", null ], + [ "IP_SOF_BROADCAST_RECV", "group__lwip__opts__ipv4.html#ga0f1fbf42d3344bf87cd056d48ddca3db", null ], + [ "IP_STATS", "group__lwip__opts__stats.html#gaf50575a4895e26ea2c01d1f2269487be", null ], + [ "IPFRAG_STATS", "group__lwip__opts__stats.html#gac9a4fbb46df3c0f479a334d0e34fb74f", null ], + [ "IPV6_REASS_MAXAGE", "group__lwip__opts__ipv6.html#ga8adc0b7dbedd279387a21588f0e2c969", null ], + [ "LINK_STATS", "group__lwip__opts__stats.html#gae58b452782d0327ae728192686c5a84a", null ], + [ "LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT", "group__lwip__opts__mem.html#ga0a3ef6098813c103e5aba07da76e15e2", null ], + [ "LWIP_ALTCP", "group__lwip__opts__tcp.html#ga26dee0e5d9c51b1dda0adad29c770a77", null ], + [ "LWIP_ALTCP_TLS", "group__lwip__opts__tcp.html#gab03ba0306cf0a99ccce3d100142f60c8", null ], + [ "LWIP_ARP", "group__lwip__opts__arp.html#ga9609a014bba4638cc191d6a8f9556c87", null ], + [ "LWIP_ASSERT_CORE_LOCKED", "group__lwip__opts__lock.html#ga6a30040db307b3459fc11906bd433f75", null ], + [ "LWIP_AUTOIP", "group__lwip__opts__autoip.html#gaaf1b3a089827223589baf1b7f4f57069", null ], + [ "LWIP_BROADCAST_PING", "group__lwip__opts__icmp.html#ga8088cb56d1a84fe554b11bc15d84b2b9", null ], + [ "LWIP_CHECKSUM_CTRL_PER_NETIF", "group__lwip__opts__checksum.html#ga3ecc5246a0c6ca5aed56c2d7899c1004", null ], + [ "LWIP_CHECKSUM_ON_COPY", "group__lwip__opts__checksum.html#ga9f60183f0442bdbeefd6b395c6647613", null ], + [ "LWIP_COMPAT_SOCKETS", "group__lwip__opts__socket.html#gafed2811f031822ec5afa1ee211fb7447", null ], + [ "LWIP_DBG_MIN_LEVEL", "group__lwip__opts__debugmsg.html#ga2043f599515774f8e571ba185dbcb9e7", null ], + [ "LWIP_DBG_TYPES_ON", "group__lwip__opts__debugmsg.html#gac095d0e53f5eb5b326b2cccfd071d93d", null ], + [ "LWIP_DHCP", "group__lwip__opts__dhcp.html#ga8a6ec62dc121064ac591b1fd8567bee9", null ], + [ "LWIP_DHCP6_GET_NTP_SRV", "group__lwip__opts__dhcpv6.html#ga5d08f76a7472daa7bcfe17343243bd77", null ], + [ "LWIP_DHCP6_MAX_DNS_SERVERS", "group__lwip__opts__dhcpv6.html#ga92c3bc242ad20a5f398c45d332864a29", null ], + [ "LWIP_DHCP6_MAX_NTP_SERVERS", "group__lwip__opts__dhcpv6.html#gaf3ac8e15d7a67429a02bc2317e16bcfe", null ], + [ "LWIP_DHCP_AUTOIP_COOP", "group__lwip__opts__autoip.html#ga1a91e18dbb9777bc6e3963f52cb5f9fe", null ], + [ "LWIP_DHCP_AUTOIP_COOP_TRIES", "group__lwip__opts__autoip.html#ga4ff3f941b4c71a04b0c30fbee5b198c2", null ], + [ "LWIP_DHCP_BOOTP_FILE", "group__lwip__opts__dhcp.html#ga3c2983cbd228011dd3e18cb417e7e423", null ], + [ "LWIP_DHCP_GET_NTP_SRV", "group__lwip__opts__dhcp.html#ga2cc18315edcd5ffc083d1256f7d22a83", null ], + [ "LWIP_DHCP_MAX_DNS_SERVERS", "group__lwip__opts__dhcp.html#ga60ccc20fbb08be24b5d5f599dd47a6a6", null ], + [ "LWIP_DHCP_MAX_NTP_SERVERS", "group__lwip__opts__dhcp.html#ga9d014e3f7dc9e1e7c7decd8652ba65e2", null ], + [ "LWIP_DNS", "group__lwip__opts__dns.html#ga98710dd81446b7cb2daac736bae6f646", null ], + [ "LWIP_DNS_SECURE", "group__lwip__opts__dns.html#ga8979c30dfbfde609d5139f80aabdfcc5", null ], + [ "LWIP_DNS_SUPPORT_MDNS_QUERIES", "group__lwip__opts__dns.html#gafcbde5706a70ace562bd1f7d2d6f77cb", null ], + [ "LWIP_ETHERNET", "group__lwip__opts__arp.html#ga30e02dc217cc2995d0fd241d510c904f", null ], + [ "LWIP_EVENT_API", "group__lwip__opts__tcp.html#ga39f76e811117155be8525bb386ecddb7", null ], + [ "LWIP_FIONREAD_LINUXMODE", "group__lwip__opts__socket.html#ga0543eea2abe390d0bdc843c33debd762", null ], + [ "LWIP_HAVE_LOOPIF", "group__lwip__opts__loop.html#gaa2b1f736373cd896e212644aa453fbaf", null ], + [ "LWIP_HOOK_DHCP6_APPEND_OPTIONS", "group__lwip__opts__hooks.html#ga4068b3313e32f711ba016215fc2c886a", null ], + [ "LWIP_HOOK_DHCP_APPEND_OPTIONS", "group__lwip__opts__hooks.html#ga40e6c9aba06e66e5df1b4ca18329f9b4", null ], + [ "LWIP_HOOK_DHCP_PARSE_OPTION", "group__lwip__opts__hooks.html#gafbbbc574863c0f88988936bd1434f2d2", null ], + [ "LWIP_HOOK_ETHARP_GET_GW", "group__lwip__opts__hooks.html#ga2b76f127325fd5ca8b80077a4b6160b1", null ], + [ "LWIP_HOOK_FILENAME", "group__lwip__opts__hooks.html#ga11ac9d637cb6afc0a32e8da7f51d0c0d", null ], + [ "LWIP_HOOK_IP4_CANFORWARD", "group__lwip__opts__hooks.html#gaed848a98dbb5c8856a27e379986ea70d", null ], + [ "LWIP_HOOK_IP4_INPUT", "group__lwip__opts__hooks.html#ga9124237c28e2f18f3b28d5be09e9ccb6", null ], + [ "LWIP_HOOK_IP4_ROUTE", "group__lwip__opts__hooks.html#ga5d1061ad722a73012a28dbaf0f169b70", null ], + [ "LWIP_HOOK_IP4_ROUTE_SRC", "group__lwip__opts__hooks.html#gaa410d9cbe1d4fa4c8a7f49af7b501024", null ], + [ "LWIP_HOOK_IP6_INPUT", "group__lwip__opts__hooks.html#gaccbdd3d0250f7176dcd799ca06007f20", null ], + [ "LWIP_HOOK_IP6_ROUTE", "group__lwip__opts__hooks.html#ga8245a4bc7ffb172e3bf32276f9d126ce", null ], + [ "LWIP_HOOK_MEMP_AVAILABLE", "group__lwip__opts__hooks.html#ga13e90672158221b40f8b12bf9d8b721f", null ], + [ "LWIP_HOOK_ND6_GET_GW", "group__lwip__opts__hooks.html#ga287544c3d74bc2a2d645bddbbc4fbdd0", null ], + [ "LWIP_HOOK_NETCONN_EXTERNAL_RESOLVE", "group__lwip__opts__hooks.html#gae35e4b7374868dc748b12dedb8f807e5", null ], + [ "LWIP_HOOK_SOCKETS_GETSOCKOPT", "group__lwip__opts__hooks.html#gabdaeb09ac9f441934e21a087544a1af1", null ], + [ "LWIP_HOOK_SOCKETS_SETSOCKOPT", "group__lwip__opts__hooks.html#ga14ea9210c09da4dd33bc85bd8a01b48a", null ], + [ "LWIP_HOOK_TCP_INPACKET_PCB", "group__lwip__opts__hooks.html#gabed8b1cda4aba2d108fa62cdd74895a2", null ], + [ "LWIP_HOOK_TCP_ISN", "group__lwip__opts__hooks.html#ga078d203053911cf3af178392700386a4", null ], + [ "LWIP_HOOK_TCP_OUT_ADD_TCPOPTS", "group__lwip__opts__hooks.html#ga0ef31b749307b63c06633645d4de21f0", null ], + [ "LWIP_HOOK_TCP_OUT_TCPOPT_LENGTH", "group__lwip__opts__hooks.html#ga31c0694abe4eedf3ff039b7073c2293f", null ], + [ "LWIP_HOOK_UNKNOWN_ETH_PROTOCOL", "group__lwip__opts__hooks.html#ga6cc92f5101dd7a0420e18e1f2101abf4", null ], + [ "LWIP_HOOK_VLAN_CHECK", "group__lwip__opts__hooks.html#ga2f020543772368f8f4355f50f24c86a9", null ], + [ "LWIP_HOOK_VLAN_SET", "group__lwip__opts__hooks.html#ga2b6e450b4934b95df9b9a9d2b9a4d57e", null ], + [ "LWIP_ICMP", "group__lwip__opts__icmp.html#gae4d45345c3ab8e5a355fda1d8d24fca6", null ], + [ "LWIP_ICMP6", "group__lwip__opts__icmp6.html#ga65ac8bcbad242cba3a2b557e1574b21f", null ], + [ "LWIP_ICMP6_DATASIZE", "group__lwip__opts__icmp6.html#gaa88c55e37e5d7b865b91a9399313bbbf", null ], + [ "LWIP_ICMP6_HL", "group__lwip__opts__icmp6.html#ga82193577b4045e1ac1533c4341a2bd79", null ], + [ "LWIP_IGMP", "group__lwip__opts__igmp.html#gadaf25915ae1fd69c0943ef68cbb38923", null ], + [ "LWIP_IPV4", "group__lwip__opts__ipv4.html#ga429e811a80ebb5157e14a854870c4410", null ], + [ "LWIP_IPV6", "group__lwip__opts__ipv6.html#ga872e3bb3fe2212156d66b18fccc9643f", null ], + [ "LWIP_IPV6_ADDRESS_LIFETIMES", "group__lwip__opts__ipv6.html#ga2c0127fca1073ad3f0a1e53f00ea8858", null ], + [ "LWIP_IPV6_AUTOCONFIG", "group__lwip__opts__ipv6.html#ga580039bf2baf49fcb9e504e5d2b40a03", null ], + [ "LWIP_IPV6_DHCP6", "group__lwip__opts__dhcpv6.html#ga1ba67b6665026ec0c688dc4b0df047a6", null ], + [ "LWIP_IPV6_DHCP6_STATEFUL", "group__lwip__opts__dhcpv6.html#ga3fc9dbe8feae61621cac4952ac28e155", null ], + [ "LWIP_IPV6_DHCP6_STATELESS", "group__lwip__opts__dhcpv6.html#ga8d6bab14d580d2136430319aab6d7930", null ], + [ "LWIP_IPV6_DUP_DETECT_ATTEMPTS", "group__lwip__opts__ipv6.html#gad8489522d34f37e42b4001bab3781bcb", null ], + [ "LWIP_IPV6_FORWARD", "group__lwip__opts__ipv6.html#gac96c5802de6c75dd62ab38cff6d16a32", null ], + [ "LWIP_IPV6_FRAG", "group__lwip__opts__ipv6.html#ga9ab6269f3087f6d9f7b2c7181ef043c3", null ], + [ "LWIP_IPV6_MLD", "group__lwip__opts__mld6.html#ga44d8f24eaebbc50221ac1336212a3528", null ], + [ "LWIP_IPV6_NUM_ADDRESSES", "group__lwip__opts__ipv6.html#ga16c1b672604bfb0a66a6aeeb854589d3", null ], + [ "LWIP_IPV6_REASS", "group__lwip__opts__ipv6.html#gad0ef160d72e63b02c5e875b06ec53864", null ], + [ "LWIP_IPV6_SCOPES", "group__lwip__opts__ipv6.html#ga91d1e630059df3b3a296e2b6ff7aead5", null ], + [ "LWIP_IPV6_SCOPES_DEBUG", "group__lwip__opts__ipv6.html#ga623ef29d27d98fb7be8732730a5ddf4b", null ], + [ "LWIP_IPV6_SEND_ROUTER_SOLICIT", "group__lwip__opts__ipv6.html#ga273ed2e1a4e6a43713a0e4a06a34ee5c", null ], + [ "LWIP_LOOPBACK_MAX_PBUFS", "group__lwip__opts__loop.html#gaacc3ad5d0a771d45fb0a3e3a09b1dbea", null ], + [ "LWIP_LOOPIF_MULTICAST", "group__lwip__opts__loop.html#ga10a878b390c2fbe421d82502001c7300", null ], + [ "LWIP_MARK_TCPIP_THREAD", "group__lwip__opts__lock.html#gab97d014f7ecf3b20f9d5abc2d0a79a3e", null ], + [ "LWIP_MIB2_CALLBACKS", "group__lwip__opts__mib2.html#gad84d6a781880cec19a1ef4b2339fea29", null ], + [ "LWIP_MPU_COMPATIBLE", "group__lwip__opts__lock.html#gae9afcefa5d233372abb9413188dd98c9", null ], + [ "LWIP_MULTICAST_PING", "group__lwip__opts__icmp.html#gaf77baf0a83b04312eab4c006ef229661", null ], + [ "LWIP_MULTICAST_TX_OPTIONS", "group__lwip__opts__multicast.html#gab8d7d53247cc62caa76f54b2c5a5df30", null ], + [ "LWIP_ND6_ALLOW_RA_UPDATES", "group__lwip__opts__nd6.html#gad35d10353ac7c7d2c8d4b83788cdc6d9", null ], + [ "LWIP_ND6_DELAY_FIRST_PROBE_TIME", "group__lwip__opts__nd6.html#ga315bd6d4a9d185766dfc3253cd9d7715", null ], + [ "LWIP_ND6_MAX_ANYCAST_DELAY_TIME", "group__lwip__opts__nd6.html#ga960b8973df083fad53ae0eaa79f8c4df", null ], + [ "LWIP_ND6_MAX_MULTICAST_SOLICIT", "group__lwip__opts__nd6.html#ga980909018aed54adc10dd68be3572b30", null ], + [ "LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT", "group__lwip__opts__nd6.html#ga86ab0cac87cdc7aeff09384ddbaaba2a", null ], + [ "LWIP_ND6_MAX_UNICAST_SOLICIT", "group__lwip__opts__nd6.html#gafa6f4c2d2c259ab0895fa03a6f08c691", null ], + [ "LWIP_ND6_NUM_DESTINATIONS", "group__lwip__opts__nd6.html#gacad118b1ae886e80137a1d4f0fb19672", null ], + [ "LWIP_ND6_NUM_NEIGHBORS", "group__lwip__opts__nd6.html#gab2fe15bdb4e0a41f295eb5577b11ad16", null ], + [ "LWIP_ND6_NUM_PREFIXES", "group__lwip__opts__nd6.html#gad9cc576b5951f1b5e1c2b0d0bb831d9a", null ], + [ "LWIP_ND6_NUM_ROUTERS", "group__lwip__opts__nd6.html#ga75e81a96148f266c8fad8c0bcab2f36a", null ], + [ "LWIP_ND6_QUEUEING", "group__lwip__opts__nd6.html#ga0757a3c1b5d1563ad2d77228e1d8a60f", null ], + [ "LWIP_ND6_RDNSS_MAX_DNS_SERVERS", "group__lwip__opts__nd6.html#gaea4d829c0b52cc6cc28925eee89a7429", null ], + [ "LWIP_ND6_REACHABLE_TIME", "group__lwip__opts__nd6.html#ga269db9d61cdfc2fd3bc7b12c56261c74", null ], + [ "LWIP_ND6_RETRANS_TIMER", "group__lwip__opts__nd6.html#ga461abcbeef1d236d1f3201827dd28ad9", null ], + [ "LWIP_ND6_TCP_REACHABILITY_HINTS", "group__lwip__opts__nd6.html#ga9d7cb6fd447ef0f6726f565e2c7509c4", null ], + [ "LWIP_NETBUF_RECVINFO", "group__lwip__opts__udp.html#ga72021505969c5ce29e972486d7794baa", null ], + [ "LWIP_NETCONN", "group__lwip__opts__netconn.html#ga478041b8544461258f6961bf0f3c1a77", null ], + [ "LWIP_NETCONN_FULLDUPLEX", "group__lwip__opts__netconn.html#ga7bfe8487a3abffdd9d6730977d22c406", null ], + [ "LWIP_NETCONN_SEM_PER_THREAD", "group__lwip__opts__netconn.html#ga2543345adf7d2c307df78a54ac2ba8c4", null ], + [ "LWIP_NETIF_API", "group__lwip__opts__netif.html#gadd45fb65f2d0e6de5a0d14ff9e101b77", null ], + [ "LWIP_NETIF_EXT_STATUS_CALLBACK", "group__lwip__opts__netif.html#ga090482867ba04d442ab5b8ad745c0e1e", null ], + [ "LWIP_NETIF_HOSTNAME", "group__lwip__opts__netif.html#gaa714dbfa66822ec4c6111bdb8cf753c1", null ], + [ "LWIP_NETIF_HWADDRHINT", "group__lwip__opts__netif.html#gad1d5e878d94b56ba687cef69be936ad9", null ], + [ "LWIP_NETIF_LINK_CALLBACK", "group__lwip__opts__netif.html#ga1a446932dd927cc4136ba654c13bb97b", null ], + [ "LWIP_NETIF_LOOPBACK", "group__lwip__opts__loop.html#ga724a0ea765d5a47d026d529725f31c01", null ], + [ "LWIP_NETIF_LOOPBACK_MULTITHREADING", "group__lwip__opts__loop.html#gaa28d13ddd5281b1912276991e7ea58c5", null ], + [ "LWIP_NETIF_REMOVE_CALLBACK", "group__lwip__opts__netif.html#ga9c942c2e9655b06d4f73c630d30f60bf", null ], + [ "LWIP_NETIF_STATUS_CALLBACK", "group__lwip__opts__netif.html#gaffb97d89516c38d3fcb9e44e5d707f36", null ], + [ "LWIP_NETIF_TX_SINGLE_PBUF", "group__lwip__opts__netif.html#gabafb9f64a80e51b56c0abbcfc1f7e04e", null ], + [ "LWIP_NUM_NETIF_CLIENT_DATA", "group__lwip__opts__netif.html#ga94a35212616f9a9aae5c98741612b936", null ], + [ "LWIP_NUM_SYS_TIMEOUT_INTERNAL", "group__lwip__opts__memp.html#ga87a05debb46ff82093d0e6dc1aad8804", null ], + [ "LWIP_PBUF_REF_T", "group__lwip__opts__pbuf.html#gaaefb80d6bf9257c0f4322c36e1272c38", null ], + [ "LWIP_PERF", "group__lwip__opts__perf.html#ga44acd95b33e2d58a74455279721298de", null ], + [ "LWIP_POSIX_SOCKETS_IO_NAMES", "group__lwip__opts__socket.html#ga484c38ab08f60d5b3335d23d31f9a402", null ], + [ "LWIP_RAW", "group__lwip__opts__raw.html#gaca452be5cb05d9666f8f57e582c39221", null ], + [ "LWIP_SINGLE_NETIF", "group__lwip__opts__netif.html#ga943063b053eeac76b0b1bcef2ddd93be", null ], + [ "LWIP_SO_LINGER", "group__lwip__opts__socket.html#gaa91292d5d014dc1c6f1c1f4166269a1d", null ], + [ "LWIP_SO_RCVBUF", "group__lwip__opts__socket.html#ga06390cebcf4d13d3d47a11365e5fcd28", null ], + [ "LWIP_SO_RCVTIMEO", "group__lwip__opts__socket.html#ga91af3ade95b20b9a60c65ed0380fa0ed", null ], + [ "LWIP_SO_SNDRCVTIMEO_NONSTANDARD", "group__lwip__opts__socket.html#ga5b115bacb569763d8a3889a12229e942", null ], + [ "LWIP_SO_SNDTIMEO", "group__lwip__opts__socket.html#ga1162cb685f202d9b21c11344b8209a58", null ], + [ "LWIP_SOCKET", "group__lwip__opts__socket.html#ga1cb62ce61ac39d7d6728ae5d3d3b927f", null ], + [ "LWIP_SOCKET_OFFSET", "group__lwip__opts__socket.html#gad0197c845fbb44c920b272f0fef3b57e", null ], + [ "LWIP_SOCKET_POLL", "group__lwip__opts__socket.html#ga6c14d705e3321429683f24de9f5a7200", null ], + [ "LWIP_SOCKET_SELECT", "group__lwip__opts__socket.html#ga68417078b71b0be9735256f52933dcdb", null ], + [ "LWIP_STATS", "group__lwip__opts__stats.html#ga542b58734cc01902c5e099f6efdc5f1b", null ], + [ "LWIP_STATS_DISPLAY", "group__lwip__opts__stats.html#gacdc38ed58d1900b5d3d109a65be1c3d1", null ], + [ "LWIP_TCP", "group__lwip__opts__tcp.html#gaa4ed98deb97b77c633cb8870f34c71e9", null ], + [ "LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT", "group__lwip__opts__socket.html#ga3e7498d5d2921f0df3792de72f384d36", null ], + [ "LWIP_TCP_KEEPALIVE", "group__lwip__opts__socket.html#ga8b9369ab260f032686a81c77c5b4db77", null ], + [ "LWIP_TCP_MAX_SACK_NUM", "group__lwip__opts__tcp.html#gaaac0e9f559a8e3c251f3504cebcf44dc", null ], + [ "LWIP_TCP_PCB_NUM_EXT_ARGS", "group__lwip__opts__tcp.html#ga40b1cdad52eaa91a3f5c242fc92ee223", null ], + [ "LWIP_TCP_SACK_OUT", "group__lwip__opts__tcp.html#gaf1b6a015d29fea67b906c276e1e8314f", null ], + [ "LWIP_TCP_TIMESTAMPS", "group__lwip__opts__tcp.html#ga249bc450bb818cf2ef3cf1472ff354fd", null ], + [ "LWIP_TCPIP_CORE_LOCKING", "group__lwip__opts__lock.html#ga8e46232794349c209e8ed4e9e7e4f011", null ], + [ "LWIP_TCPIP_CORE_LOCKING_INPUT", "group__lwip__opts__lock.html#ga351beb1c06affe49e717bc9f76c66acf", null ], + [ "LWIP_TCPIP_THREAD_ALIVE", "group__lwip__opts__thread.html#ga8b99d75d9e0a0868567d10c8522915bb", null ], + [ "LWIP_TCPIP_TIMEOUT", "group__lwip__opts__netconn.html#ga1cd8d15a42262a0defaedabed126ea99", null ], + [ "LWIP_TIMERS", "group__lwip__opts__timers.html#ga25a41610055f91cbd0960256240b8f2c", null ], + [ "LWIP_TIMERS_CUSTOM", "group__lwip__opts__timers.html#gaff0ea56f3e3d8e86c49b50557bc13815", null ], + [ "LWIP_UDP", "group__lwip__opts__udp.html#gab6030e96e72df649d2650fd32d7a67b3", null ], + [ "LWIP_UDPLITE", "group__lwip__opts__udp.html#ga35731bc5f337943e474a15c1cd538a61", null ], + [ "LWIP_WND_SCALE", "group__lwip__opts__tcp.html#ga88dbbfeeeb41b129fdc8235fc08bb530", null ], + [ "MEM_ALIGNMENT", "group__lwip__opts__mem.html#ga97343214666ee6dcb18c0bd77b441ea7", null ], + [ "MEM_DEBUG", "group__lwip__opts__debugmsg.html#ga2d7bc380695eeedb1af50c3808613afe", null ], + [ "MEM_LIBC_MALLOC", "group__lwip__opts__mem.html#ga4ef345cc270912bd2230b1c5ec51dfc8", null ], + [ "MEM_OVERFLOW_CHECK", "group__lwip__opts__mem.html#gae331a198bd06100b90ea020cd5f07f4e", null ], + [ "MEM_SANITY_CHECK", "group__lwip__opts__mem.html#ga90b17afabb93986a162c327ed30bb4d3", null ], + [ "MEM_SIZE", "group__lwip__opts__mem.html#ga2dcf8c45f945dd0c4301a94700f2112c", null ], + [ "MEM_STATS", "group__lwip__opts__stats.html#ga61ec04a08c4fde690d10819e582656a7", null ], + [ "MEM_USE_POOLS", "group__lwip__opts__mem.html#gaddca3141bc7037241769eb152b6f89ba", null ], + [ "MEM_USE_POOLS_TRY_BIGGER_POOL", "group__lwip__opts__mem.html#gaba8be68e8fd0716b723ce4569ed89f82", null ], + [ "MEMCPY", "group__lwip__opts__memcpy.html#gaa1dd57a66b6de8c0593e9e3e8d1411f6", null ], + [ "MEMMOVE", "group__lwip__opts__memcpy.html#ga0e00bb235da5557fcbc049f732503863", null ], + [ "MEMP_DEBUG", "group__lwip__opts__debugmsg.html#gad80231923f7a808d49eba5ec57d63616", null ], + [ "MEMP_MEM_INIT", "group__lwip__opts__mem.html#gaa2f25586972d1cbc1ff0dcdc6f15a1b0", null ], + [ "MEMP_MEM_MALLOC", "group__lwip__opts__mem.html#gae93af697d27bbcefa6a28052d90f2f38", null ], + [ "MEMP_NUM_ALTCP_PCB", "group__lwip__opts__memp.html#ga24f6737ee990990b81b0d16ef6e0dffd", null ], + [ "MEMP_NUM_API_MSG", "group__lwip__opts__memp.html#ga5a95abf3610c56e7c23cb035eb9c3444", null ], + [ "MEMP_NUM_ARP_QUEUE", "group__lwip__opts__memp.html#ga087b00ea20a7edebcad33a1a1353a5d7", null ], + [ "MEMP_NUM_DNS_API_MSG", "group__lwip__opts__memp.html#ga3b1f228c598529c62895ad04ff294980", null ], + [ "MEMP_NUM_FRAG_PBUF", "group__lwip__opts__memp.html#ga1f66051a654dcd7a4e19bc6aff240630", null ], + [ "MEMP_NUM_IGMP_GROUP", "group__lwip__opts__memp.html#gab648ff95d8ffa4216b95f82a568a5d9a", null ], + [ "MEMP_NUM_LOCALHOSTLIST", "group__lwip__opts__memp.html#gaa9b0f949da12cbe8fe5f7aefc30290e0", null ], + [ "MEMP_NUM_MLD6_GROUP", "group__lwip__opts__mld6.html#ga89e92d8de8898696e797f13fdd169494", null ], + [ "MEMP_NUM_ND6_QUEUE", "group__lwip__opts__nd6.html#gabfaf3d92d51e2a9d70c8360af2611fb2", null ], + [ "MEMP_NUM_NETBUF", "group__lwip__opts__memp.html#ga5d99df65869ac101ed6a611fc85016be", null ], + [ "MEMP_NUM_NETCONN", "group__lwip__opts__memp.html#gacb40bd726b7e15593b20a628d298f456", null ], + [ "MEMP_NUM_NETDB", "group__lwip__opts__memp.html#ga293bc22b60bf3f8e2520f60a88370e7a", null ], + [ "MEMP_NUM_NETIFAPI_MSG", "group__lwip__opts__memp.html#gadd5a973b98068ce9318ea2f96b5fa14c", null ], + [ "MEMP_NUM_PBUF", "group__lwip__opts__memp.html#ga92b30aed958ec59334d936d4ca725418", null ], + [ "MEMP_NUM_RAW_PCB", "group__lwip__opts__memp.html#ga379bf92ed322cda54cb701337421e0d3", null ], + [ "MEMP_NUM_REASSDATA", "group__lwip__opts__memp.html#ga169436c5860253b90e25bdba9fdcac86", null ], + [ "MEMP_NUM_SELECT_CB", "group__lwip__opts__memp.html#ga8e136f5811e6652c6c5d2fcf596f0893", null ], + [ "MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA", "group__lwip__opts__memp.html#gacf9782dd26bf8a655044dc041a9de948", null ], + [ "MEMP_NUM_SYS_TIMEOUT", "group__lwip__opts__memp.html#ga4afbdca581a58d57bc7a81118a95327e", null ], + [ "MEMP_NUM_TCP_PCB", "group__lwip__opts__memp.html#ga73beecc19cfbc3114768f9b32b2cd70e", null ], + [ "MEMP_NUM_TCP_PCB_LISTEN", "group__lwip__opts__memp.html#ga04fba6a249123513271dccb4ec26aa5a", null ], + [ "MEMP_NUM_TCP_SEG", "group__lwip__opts__memp.html#gaa35fb3a1a76661e3ffb9722a57092de3", null ], + [ "MEMP_NUM_TCPIP_MSG_API", "group__lwip__opts__memp.html#gafbbfd6ce8536038cd00fa85bebae987c", null ], + [ "MEMP_NUM_TCPIP_MSG_INPKT", "group__lwip__opts__memp.html#gab089a7088439e726c3801ba9e249d831", null ], + [ "MEMP_NUM_UDP_PCB", "group__lwip__opts__memp.html#ga2c416da481ab09bd1ba257b75a0707eb", null ], + [ "MEMP_OVERFLOW_CHECK", "group__lwip__opts__mem.html#ga27fdd01194a42fc41a7716b72cdb49e3", null ], + [ "MEMP_SANITY_CHECK", "group__lwip__opts__mem.html#ga0838947193e222a9f46b582e01e5beff", null ], + [ "MEMP_STATS", "group__lwip__opts__stats.html#gab8c2430be0e567a7499a95454aaa6041", null ], + [ "MEMP_USE_CUSTOM_POOLS", "group__lwip__opts__mem.html#ga69de593b8ffd4f1c249f03e48e11983b", null ], + [ "MIB2_STATS", "group__lwip__opts__stats.html#ga5b01047eeb149a0b0ffe33d760d8370f", null ], + [ "MLD6_STATS", "group__lwip__opts__stats.html#gaf263df10b63b38201cae3d2dd5fb0b9e", null ], + [ "ND6_STATS", "group__lwip__opts__stats.html#ga753161114df60299a28d51c092c756cf", null ], + [ "NETIF_DEBUG", "group__lwip__opts__debugmsg.html#ga2dfad02b075a7f9a8791a66fe40864a4", null ], + [ "NO_SYS", "group__lwip__opts__nosys.html#gae00ba99de94a5bf84d832be8976df59b", null ], + [ "PBUF_DEBUG", "group__lwip__opts__debugmsg.html#ga5c3d44a0ec3bb8bd66f776c70d5c6a6c", null ], + [ "PBUF_LINK_ENCAPSULATION_HLEN", "group__lwip__opts__pbuf.html#ga6e1ba1875ae5168a17b53d83597bc1de", null ], + [ "PBUF_LINK_HLEN", "group__lwip__opts__pbuf.html#ga35998a3d56af9940e6a80bb372597685", null ], + [ "PBUF_POOL_BUFSIZE", "group__lwip__opts__pbuf.html#gae61f4491d56e805e79b79eb5d35a00e5", null ], + [ "PBUF_POOL_SIZE", "group__lwip__opts__memp.html#ga50eaadc4cad0716410332691e382c38a", null ], + [ "RAW_DEBUG", "group__lwip__opts__debugmsg.html#gaf0551bef83c0fc1baa57cf339d220e25", null ], + [ "RAW_TTL", "group__lwip__opts__raw.html#ga36e3ffa66073ca0d27d11c422778249c", null ], + [ "RECV_BUFSIZE_DEFAULT", "group__lwip__opts__socket.html#ga5dbd0a61f30ae6c6bfbda635095f138d", null ], + [ "SLIP_DEBUG", "group__lwip__opts__debugmsg.html#gab986f95183559d8678c6d80969b01857", null ], + [ "SLIPIF_THREAD_NAME", "group__lwip__opts__thread.html#gae9cd260c56472324a2f0ee5f9597a675", null ], + [ "SLIPIF_THREAD_PRIO", "group__lwip__opts__thread.html#gab1b9fc2efcbf1f804bfd0191bc019c4e", null ], + [ "SLIPIF_THREAD_STACKSIZE", "group__lwip__opts__thread.html#gae8ab54a25007ce997bbab6289815e258", null ], + [ "SMEMCPY", "group__lwip__opts__memcpy.html#ga8c6e3c1e4f74acb16376188dbf8909ec", null ], + [ "SO_REUSE", "group__lwip__opts__socket.html#gaf3822feed320cf8439b083ee525e4942", null ], + [ "SO_REUSE_RXTOALL", "group__lwip__opts__socket.html#gae9395d83af89002343e5782130f52f44", null ], + [ "SOCKETS_DEBUG", "group__lwip__opts__debugmsg.html#ga509594f3ba7d8b1356628b50b55a0934", null ], + [ "SYS_DEBUG", "group__lwip__opts__debugmsg.html#ga2960ae20008f05da8cc0714f36365642", null ], + [ "SYS_LIGHTWEIGHT_PROT", "group__lwip__opts__lock.html#gae85efb3a5fcf8585c94b3c2669978959", null ], + [ "SYS_STATS", "group__lwip__opts__stats.html#ga0173549afa76553583e5a02c6a791218", null ], + [ "TCP_CALCULATE_EFF_SEND_MSS", "group__lwip__opts__tcp.html#gac04b84d32251ac558f0c3a8af85ba3a5", null ], + [ "TCP_CWND_DEBUG", "group__lwip__opts__debugmsg.html#ga66df03d8192cd978d3321a9d68bf5411", null ], + [ "TCP_DEBUG", "group__lwip__opts__debugmsg.html#ga4f43bb8a430c7a52a1ad5086d3f2803c", null ], + [ "TCP_DEFAULT_LISTEN_BACKLOG", "group__lwip__opts__tcp.html#ga93cce3f47e33df11248c908d1775bacf", null ], + [ "TCP_FR_DEBUG", "group__lwip__opts__debugmsg.html#ga5895bee26e8e1a0b89d597e0f2580b23", null ], + [ "TCP_INPUT_DEBUG", "group__lwip__opts__debugmsg.html#gaf51dc2563536de56470146749f715ba8", null ], + [ "TCP_LISTEN_BACKLOG", "group__lwip__opts__tcp.html#ga98b23e7cbd3281915c50a485cb61899d", null ], + [ "TCP_MAXRTX", "group__lwip__opts__tcp.html#ga0dee0911197855bdf19ef79778c241a6", null ], + [ "TCP_MSS", "group__lwip__opts__tcp.html#gaf1ab7bb27860aa3677c387a2f3ba317b", null ], + [ "TCP_OOSEQ_MAX_BYTES", "group__lwip__opts__tcp.html#ga9d6d3219bb5fc0bc760a64114de13c25", null ], + [ "TCP_OOSEQ_MAX_PBUFS", "group__lwip__opts__tcp.html#ga1f57d3859c4556f785708e5dc440617e", null ], + [ "TCP_OUTPUT_DEBUG", "group__lwip__opts__debugmsg.html#ga9f70601fdc1feee490772bf7fcdb74fb", null ], + [ "TCP_OVERSIZE", "group__lwip__opts__tcp.html#ga5648e2580bb55c0efdfbebcf3bad1eef", null ], + [ "TCP_QLEN_DEBUG", "group__lwip__opts__debugmsg.html#gae7980c7f8eb45cd411bf410ff0a3fc55", null ], + [ "TCP_QUEUE_OOSEQ", "group__lwip__opts__tcp.html#ga89ffd0d7d1529bdb26bfbad267d0ad75", null ], + [ "TCP_RST_DEBUG", "group__lwip__opts__debugmsg.html#ga37596f7bbb9b7663826244ba54486679", null ], + [ "TCP_RTO_DEBUG", "group__lwip__opts__debugmsg.html#gad6e52e37415d0d0cbe4931a28f5a9662", null ], + [ "TCP_SND_BUF", "group__lwip__opts__tcp.html#ga871d111968d8c6c7880ff36b93c5c4dd", null ], + [ "TCP_SND_QUEUELEN", "group__lwip__opts__tcp.html#ga9beaa47832ead4180981bfbf71074904", null ], + [ "TCP_SNDLOWAT", "group__lwip__opts__tcp.html#gae5c9866d7cd463ac7b36792182145aec", null ], + [ "TCP_SNDQUEUELOWAT", "group__lwip__opts__tcp.html#ga75659867592a6b01c198532ed1b65698", null ], + [ "TCP_STATS", "group__lwip__opts__stats.html#gaa02ec5c5bc0edebe418680c54d044f58", null ], + [ "TCP_SYNMAXRTX", "group__lwip__opts__tcp.html#ga50b434a8541a4813f7b27f576c05d1b6", null ], + [ "TCP_TTL", "group__lwip__opts__tcp.html#gacd5b25ea81d2894790d25da5393cdab4", null ], + [ "TCP_WND", "group__lwip__opts__tcp.html#ga7f535a6efb5cdf86c3210e35ece1d6a7", null ], + [ "TCP_WND_DEBUG", "group__lwip__opts__debugmsg.html#ga3704f433e947d6342da77c74e33627e1", null ], + [ "TCP_WND_UPDATE_THRESHOLD", "group__lwip__opts__tcp.html#ga5d45732ba3a8438b141096d86e07ef8d", null ], + [ "TCPIP_DEBUG", "group__lwip__opts__debugmsg.html#ga52d6c83451936c3de3b0338d4a3f921f", null ], + [ "TCPIP_MBOX_SIZE", "group__lwip__opts__thread.html#ga8cf210ad4e4bf616860a45fbd140fd06", null ], + [ "TCPIP_THREAD_NAME", "group__lwip__opts__thread.html#ga405e604e4328e1feb878c6fe1798a587", null ], + [ "TCPIP_THREAD_PRIO", "group__lwip__opts__thread.html#ga42b2c7a3042d7c3efd00f367f5837435", null ], + [ "TCPIP_THREAD_STACKSIZE", "group__lwip__opts__thread.html#gaa02b84eafa0c8b09b158b97c96d79db0", null ], + [ "TIMERS_DEBUG", "group__lwip__opts__debugmsg.html#ga24a6644ba9cc82665a7bf209b3870c15", null ], + [ "UDP_DEBUG", "group__lwip__opts__debugmsg.html#ga0393f312c5475a1c649b39ef9cfcaad4", null ], + [ "UDP_STATS", "group__lwip__opts__stats.html#gaef64b11bf71f0d6d5bafaf6092462276", null ], + [ "UDP_TTL", "group__lwip__opts__udp.html#ga97908a317bcba89174b5d1ccbdca0096", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/optimization.html b/Libraries/LwIP/doc/doxygen/output/html/optimization.html new file mode 100644 index 0000000..13b6615 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/optimization.html @@ -0,0 +1,105 @@ + + + + + + + +lwIP: Optimization hints + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  Optimization hints
                  +
                  +
                  +

                  The first thing you want to optimize is the lwip_standard_checksum() routine from src/core/inet.c. You can override this standard function with the #define LWIP_CHKSUM your_checksum_routine().

                  +

                  There are C examples given in inet.c or you might want to craft an assembly function for this. RFC1071 is a good introduction to this subject.

                  +

                  Other significant improvements can be made by supplying assembly or inline replacements for htons() and htonl() if you're using a little-endian architecture. #define lwip_htons(x) your_htons() #define lwip_htonl(x) your_htonl() If you #define them to htons() and htonl(), you should #define LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS to prevent lwIP from defining htonx / ntohx compatibility macros.

                  +

                  Check your network interface driver if it reads at a higher speed than the maximum wire-speed. If the hardware isn't serviced frequently and fast enough buffer overflows are likely to occur.

                  +

                  E.g. when using the cs8900 driver, call cs8900if_service(ethif) as frequently as possible. When using an RTOS let the cs8900 interrupt wake a high priority task that services your driver using a binary semaphore or event flag. Some drivers might allow additional tuning to match your application and network.

                  +

                  For a production release it is recommended to set LWIP_STATS to 0. Note that speed performance isn't influenced much by simply setting high values to the memory options.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/pages.html b/Libraries/LwIP/doc/doxygen/output/html/pages.html new file mode 100644 index 0000000..e93060f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/pages.html @@ -0,0 +1,113 @@ + + + + + + + +lwIP: Related Pages + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  Related Pages
                  +
                  + +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/pbuf_8c.html b/Libraries/LwIP/doc/doxygen/output/html/pbuf_8c.html new file mode 100644 index 0000000..c24ccca --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/pbuf_8c.html @@ -0,0 +1,483 @@ + + + + + + + +lwIP: src/core/pbuf.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  pbuf.c File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/pbuf.h"
                  +#include "lwip/stats.h"
                  +#include "lwip/def.h"
                  +#include "lwip/mem.h"
                  +#include "lwip/memp.h"
                  +#include "lwip/sys.h"
                  +#include "lwip/netif.h"
                  +#include "lwip/priv/tcp_priv.h"
                  +#include <string.h>
                  +#include "lwip/tcpip.h"
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  struct pbufpbuf_alloc (pbuf_layer layer, u16_t length, pbuf_type type)
                   
                  struct pbufpbuf_alloc_reference (void *payload, u16_t length, pbuf_type type)
                   
                  struct pbufpbuf_alloced_custom (pbuf_layer l, u16_t length, pbuf_type type, struct pbuf_custom *p, void *payload_mem, u16_t payload_mem_len)
                   
                  void pbuf_realloc (struct pbuf *p, u16_t new_len)
                   
                  u8_t pbuf_add_header (struct pbuf *p, size_t header_size_increment)
                   
                  u8_t pbuf_add_header_force (struct pbuf *p, size_t header_size_increment)
                   
                  u8_t pbuf_remove_header (struct pbuf *p, size_t header_size_decrement)
                   
                  u8_t pbuf_header (struct pbuf *p, s16_t header_size_increment)
                   
                  u8_t pbuf_header_force (struct pbuf *p, s16_t header_size_increment)
                   
                  struct pbufpbuf_free_header (struct pbuf *q, u16_t size)
                   
                  u8_t pbuf_free (struct pbuf *p)
                   
                  u16_t pbuf_clen (const struct pbuf *p)
                   
                  void pbuf_ref (struct pbuf *p)
                   
                  void pbuf_cat (struct pbuf *h, struct pbuf *t)
                   
                  void pbuf_chain (struct pbuf *h, struct pbuf *t)
                   
                  struct pbufpbuf_dechain (struct pbuf *p)
                   
                  err_t pbuf_copy (struct pbuf *p_to, const struct pbuf *p_from)
                   
                  u16_t pbuf_copy_partial (const struct pbuf *buf, void *dataptr, u16_t len, u16_t offset)
                   
                  void * pbuf_get_contiguous (const struct pbuf *p, void *buffer, size_t bufsize, u16_t len, u16_t offset)
                   
                  struct pbufpbuf_skip (struct pbuf *in, u16_t in_offset, u16_t *out_offset)
                   
                  err_t pbuf_take (struct pbuf *buf, const void *dataptr, u16_t len)
                   
                  err_t pbuf_take_at (struct pbuf *buf, const void *dataptr, u16_t len, u16_t offset)
                   
                  struct pbufpbuf_coalesce (struct pbuf *p, pbuf_layer layer)
                   
                  struct pbufpbuf_clone (pbuf_layer layer, pbuf_type type, struct pbuf *p)
                   
                  u8_t pbuf_get_at (const struct pbuf *p, u16_t offset)
                   
                  int pbuf_try_get_at (const struct pbuf *p, u16_t offset)
                   
                  void pbuf_put_at (struct pbuf *p, u16_t offset, u8_t data)
                   
                  u16_t pbuf_memcmp (const struct pbuf *p, u16_t offset, const void *s2, u16_t n)
                   
                  u16_t pbuf_memfind (const struct pbuf *p, const void *mem, u16_t mem_len, u16_t start_offset)
                   
                  u16_t pbuf_strstr (const struct pbuf *p, const char *substr)
                   
                  +

                  Detailed Description

                  +

                  Packet buffer management

                  +

                  Function Documentation

                  + +

                  ◆ pbuf_add_header()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  u8_t pbuf_add_header (struct pbufp,
                  size_t header_size_increment 
                  )
                  +
                  +

                  Adjusts the payload pointer to reveal headers in the payload.

                  +

                  Adjusts the ->payload pointer so that space for a header appears in the pbuf payload.

                  +

                  The ->payload, ->tot_len and ->len fields are adjusted.

                  +
                  Parameters
                  + + + +
                  ppbuf to change the header size.
                  header_size_incrementNumber of bytes to increment header size which increases the size of the pbuf. New space is on the front. If header_size_increment is 0, this function does nothing and returns successful.
                  +
                  +
                  +

                  PBUF_ROM and PBUF_REF type buffers cannot have their sizes increased, so the call will fail. A check is made that the increase in header size does not move the payload pointer in front of the start of the buffer.

                  +
                  Returns
                  non-zero on failure, zero on success.
                  + +
                  +
                  + +

                  ◆ pbuf_add_header_force()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  u8_t pbuf_add_header_force (struct pbufp,
                  size_t header_size_increment 
                  )
                  +
                  +

                  Same as pbuf_add_header but does not check if 'header_size > 0' is allowed. This is used internally only, to allow PBUF_REF for RX.

                  + +
                  +
                  + +

                  ◆ pbuf_clen()

                  + +
                  +
                  + + + + + + + + +
                  u16_t pbuf_clen (const struct pbufp)
                  +
                  +

                  Count number of pbufs in a chain

                  +
                  Parameters
                  + + +
                  pfirst pbuf of chain
                  +
                  +
                  +
                  Returns
                  the number of pbufs in a chain
                  + +
                  +
                  + +

                  ◆ pbuf_dechain()

                  + +
                  +
                  + + + + + + + + +
                  struct pbuf* pbuf_dechain (struct pbufp)
                  +
                  +

                  Dechains the first pbuf from its succeeding pbufs in the chain.

                  +

                  Makes p->tot_len field equal to p->len.

                  Parameters
                  + + +
                  ppbuf to dechain
                  +
                  +
                  +
                  Returns
                  remainder of the pbuf chain, or NULL if it was de-allocated.
                  +
                  Note
                  May not be called on a packet queue.
                  + +
                  +
                  + +

                  ◆ pbuf_free_header()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  struct pbuf* pbuf_free_header (struct pbufq,
                  u16_t size 
                  )
                  +
                  +

                  Similar to pbuf_header(-size) but de-refs header pbufs for (size >= p->len)

                  +
                  Parameters
                  + + + +
                  qpbufs to operate on
                  sizeThe number of bytes to remove from the beginning of the pbuf list. While size >= p->len, pbufs are freed. ATTENTION: this is the opposite direction as pbuf_header, but takes an u16_t not s16_t!
                  +
                  +
                  +
                  Returns
                  the new head pbuf
                  + +
                  +
                  + +

                  ◆ pbuf_header()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  u8_t pbuf_header (struct pbufp,
                  s16_t header_size_increment 
                  )
                  +
                  +

                  Adjusts the payload pointer to hide or reveal headers in the payload.

                  +

                  Adjusts the ->payload pointer so that space for a header (dis)appears in the pbuf payload.

                  +

                  The ->payload, ->tot_len and ->len fields are adjusted.

                  +
                  Parameters
                  + + + +
                  ppbuf to change the header size.
                  header_size_incrementNumber of bytes to increment header size which increases the size of the pbuf. New space is on the front. (Using a negative value decreases the header size.) If header_size_increment is 0, this function does nothing and returns successful.
                  +
                  +
                  +

                  PBUF_ROM and PBUF_REF type buffers cannot have their sizes increased, so the call will fail. A check is made that the increase in header size does not move the payload pointer in front of the start of the buffer.

                  Returns
                  non-zero on failure, zero on success.
                  + +
                  +
                  + +

                  ◆ pbuf_header_force()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  u8_t pbuf_header_force (struct pbufp,
                  s16_t header_size_increment 
                  )
                  +
                  +

                  Same as pbuf_header but does not check if 'header_size > 0' is allowed. This is used internally only, to allow PBUF_REF for RX.

                  + +
                  +
                  + +

                  ◆ pbuf_remove_header()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  u8_t pbuf_remove_header (struct pbufp,
                  size_t header_size_decrement 
                  )
                  +
                  +

                  Adjusts the payload pointer to hide headers in the payload.

                  +

                  Adjusts the ->payload pointer so that space for a header disappears in the pbuf payload.

                  +

                  The ->payload, ->tot_len and ->len fields are adjusted.

                  +
                  Parameters
                  + + + +
                  ppbuf to change the header size.
                  header_size_decrementNumber of bytes to decrement header size which decreases the size of the pbuf. If header_size_decrement is 0, this function does nothing and returns successful.
                  +
                  +
                  +
                  Returns
                  non-zero on failure, zero on success.
                  + +
                  +
                  + +

                  ◆ pbuf_strstr()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  u16_t pbuf_strstr (const struct pbufp,
                  const char * substr 
                  )
                  +
                  +

                  Find occurrence of substr with length substr_len in pbuf p, start at offset start_offset WARNING: in contrast to strstr(), this one does not stop at the first \0 in the pbuf/source string!

                  +
                  Parameters
                  + + + +
                  ppbuf to search, maximum length is 0xFFFE since 0xFFFF is used as return value 'not found'
                  substrstring to search for in p, maximum length is 0xFFFE
                  +
                  +
                  +
                  Returns
                  0xFFFF if substr was not found in p or the index where it was found
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/pbuf_8c.js b/Libraries/LwIP/doc/doxygen/output/html/pbuf_8c.js new file mode 100644 index 0000000..ae3ccb4 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/pbuf_8c.js @@ -0,0 +1,33 @@ +var pbuf_8c = +[ + [ "pbuf_add_header", "pbuf_8c.html#a32dc14bd88dcafa25e627ab18e801815", null ], + [ "pbuf_add_header_force", "pbuf_8c.html#ad4ef8c5fbbd1447db04f8f73923e7dee", null ], + [ "pbuf_alloc", "group__pbuf.html#gacfcb0a2af918658ba0afe36499c65f47", null ], + [ "pbuf_alloc_reference", "group__pbuf.html#ga4caa46c6d560d9d0da2be845bc9c2fab", null ], + [ "pbuf_alloced_custom", "group__pbuf.html#ga90fa2bbf6ea4a263ee8f7b77c75683c2", null ], + [ "pbuf_cat", "group__pbuf.html#ga82429084fe29015509c9b4a072707cd4", null ], + [ "pbuf_chain", "group__pbuf.html#ga831c9a72bda1d3bd4c7b96f5a0e3b891", null ], + [ "pbuf_clen", "pbuf_8c.html#a5df7ac5ae59012fe9aeddba375a72190", null ], + [ "pbuf_clone", "group__pbuf.html#gafdb04fb0f37f0422fd44ec0fcec8ebd0", null ], + [ "pbuf_coalesce", "group__pbuf.html#ga54ac7b116c6f53c704cbf74f35a8b35c", null ], + [ "pbuf_copy", "group__pbuf.html#gaba88511dee3df4b631fde691f421320d", null ], + [ "pbuf_copy_partial", "group__pbuf.html#gac2f1f58fd36042e82af46f5015720899", null ], + [ "pbuf_dechain", "pbuf_8c.html#abf3d29c4f43986b4cb5eb314d5b9729d", null ], + [ "pbuf_free", "group__pbuf.html#gab0dd696fb4b6bc65e548944584f1738b", null ], + [ "pbuf_free_header", "pbuf_8c.html#a25a3b8edc783896b03819a966d00845e", null ], + [ "pbuf_get_at", "group__pbuf.html#ga6d803d9945bffb7ad97743f2fa503da6", null ], + [ "pbuf_get_contiguous", "group__pbuf.html#gad0357ae0be17b2aacd0c301cdc86fc39", null ], + [ "pbuf_header", "pbuf_8c.html#a0f81deff4a0e6e8e0ff161a7b9871449", null ], + [ "pbuf_header_force", "pbuf_8c.html#ad0e64d6fbc423593461063da97da9ce6", null ], + [ "pbuf_memcmp", "group__pbuf.html#ga2170ccbbb13238380dbb203ee1b85974", null ], + [ "pbuf_memfind", "group__pbuf.html#ga18c164a6e4a24d89ea9eb7571a886448", null ], + [ "pbuf_put_at", "group__pbuf.html#gaf76863707dc02993eae116574b1ea03f", null ], + [ "pbuf_realloc", "group__pbuf.html#ga50abfe830a33a1a47a562febee66015d", null ], + [ "pbuf_ref", "group__pbuf.html#ga77f6bbd69e45e542014d9c547c7da74e", null ], + [ "pbuf_remove_header", "pbuf_8c.html#aca0cd8b3f08fbb5e35bc91a663083cc1", null ], + [ "pbuf_skip", "group__pbuf.html#ga6a961522d81f0327aaf4d4ee6d96c583", null ], + [ "pbuf_strstr", "pbuf_8c.html#a9ba3f7b705309ceadb147692fd5a1c7d", null ], + [ "pbuf_take", "group__pbuf.html#gad1e31e370271335b197272af2724ca85", null ], + [ "pbuf_take_at", "group__pbuf.html#gae1cf2bf7454ff87ff377b0b2262f9b44", null ], + [ "pbuf_try_get_at", "group__pbuf.html#ga839f342803b0cf89049744124c5a98ad", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/pbuf_8h.html b/Libraries/LwIP/doc/doxygen/output/html/pbuf_8h.html new file mode 100644 index 0000000..3d07a99 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/pbuf_8h.html @@ -0,0 +1,788 @@ + + + + + + + +lwIP: src/include/lwip/pbuf.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  pbuf.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/err.h"
                  +
                  + + + + + + + +

                  +Data Structures

                  struct  pbuf
                   
                  struct  pbuf_rom
                   
                  struct  pbuf_custom
                   
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Macros

                  #define LWIP_SUPPORT_CUSTOM_PBUF   ((IP_FRAG && !LWIP_NETIF_TX_SINGLE_PBUF) || (LWIP_IPV6 && LWIP_IPV6_FRAG))
                   
                  #define PBUF_NEEDS_COPY(p)   ((p)->type_internal & PBUF_TYPE_FLAG_DATA_VOLATILE)
                   
                  #define PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS   0x80
                   
                  #define PBUF_TYPE_FLAG_DATA_VOLATILE   0x40
                   
                  #define PBUF_TYPE_ALLOC_SRC_MASK   0x0F
                   
                  #define PBUF_ALLOC_FLAG_RX   0x0100
                   
                  #define PBUF_ALLOC_FLAG_DATA_CONTIGUOUS   0x0200
                   
                  #define PBUF_TYPE_ALLOC_SRC_MASK_APP_MIN   0x03
                   
                  #define PBUF_TYPE_ALLOC_SRC_MASK_APP_MAX   PBUF_TYPE_ALLOC_SRC_MASK
                   
                  #define PBUF_FLAG_PUSH   0x01U
                   
                  #define PBUF_FLAG_IS_CUSTOM   0x02U
                   
                  #define PBUF_FLAG_MCASTLOOP   0x04U
                   
                  #define PBUF_FLAG_LLBCAST   0x08U
                   
                  #define PBUF_FLAG_LLMCAST   0x10U
                   
                  #define PBUF_FLAG_TCP_FIN   0x20U
                   
                  #define PBUF_POOL_FREE_OOSEQ   1
                   
                  + + + +

                  +Typedefs

                  typedef void(* pbuf_free_custom_fn) (struct pbuf *p)
                   
                  + + + + + +

                  +Enumerations

                  enum  pbuf_layer {
                  +  PBUF_TRANSPORT = 0 + (14 + 0 ) + 40 + 20, +PBUF_IP = 0 + (14 + 0 ) + 40, +PBUF_LINK = 0 + (14 + 0 ), +PBUF_RAW_TX = 0, +
                  +  PBUF_RAW = 0 +
                  + }
                   
                  enum  pbuf_type { PBUF_RAM = ( 0x0200 | 0x80 | 0x00 ), +PBUF_ROM = 0x01, +PBUF_REF = ( 0x40 | 0x01 ), +PBUF_POOL = ( 0x0100 | 0x80 | 0x02 ) + }
                   
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  struct pbufpbuf_alloc (pbuf_layer l, u16_t length, pbuf_type type)
                   
                  struct pbufpbuf_alloc_reference (void *payload, u16_t length, pbuf_type type)
                   
                  struct pbufpbuf_alloced_custom (pbuf_layer l, u16_t length, pbuf_type type, struct pbuf_custom *p, void *payload_mem, u16_t payload_mem_len)
                   
                  void pbuf_realloc (struct pbuf *p, u16_t size)
                   
                  u8_t pbuf_header (struct pbuf *p, s16_t header_size)
                   
                  u8_t pbuf_header_force (struct pbuf *p, s16_t header_size)
                   
                  u8_t pbuf_add_header (struct pbuf *p, size_t header_size_increment)
                   
                  u8_t pbuf_add_header_force (struct pbuf *p, size_t header_size_increment)
                   
                  u8_t pbuf_remove_header (struct pbuf *p, size_t header_size)
                   
                  struct pbufpbuf_free_header (struct pbuf *q, u16_t size)
                   
                  void pbuf_ref (struct pbuf *p)
                   
                  u8_t pbuf_free (struct pbuf *p)
                   
                  u16_t pbuf_clen (const struct pbuf *p)
                   
                  void pbuf_cat (struct pbuf *head, struct pbuf *tail)
                   
                  void pbuf_chain (struct pbuf *head, struct pbuf *tail)
                   
                  struct pbufpbuf_dechain (struct pbuf *p)
                   
                  err_t pbuf_copy (struct pbuf *p_to, const struct pbuf *p_from)
                   
                  u16_t pbuf_copy_partial (const struct pbuf *p, void *dataptr, u16_t len, u16_t offset)
                   
                  void * pbuf_get_contiguous (const struct pbuf *p, void *buffer, size_t bufsize, u16_t len, u16_t offset)
                   
                  err_t pbuf_take (struct pbuf *buf, const void *dataptr, u16_t len)
                   
                  err_t pbuf_take_at (struct pbuf *buf, const void *dataptr, u16_t len, u16_t offset)
                   
                  struct pbufpbuf_skip (struct pbuf *in, u16_t in_offset, u16_t *out_offset)
                   
                  struct pbufpbuf_coalesce (struct pbuf *p, pbuf_layer layer)
                   
                  struct pbufpbuf_clone (pbuf_layer l, pbuf_type type, struct pbuf *p)
                   
                  u8_t pbuf_get_at (const struct pbuf *p, u16_t offset)
                   
                  int pbuf_try_get_at (const struct pbuf *p, u16_t offset)
                   
                  void pbuf_put_at (struct pbuf *p, u16_t offset, u8_t data)
                   
                  u16_t pbuf_memcmp (const struct pbuf *p, u16_t offset, const void *s2, u16_t n)
                   
                  u16_t pbuf_memfind (const struct pbuf *p, const void *mem, u16_t mem_len, u16_t start_offset)
                   
                  u16_t pbuf_strstr (const struct pbuf *p, const char *substr)
                   
                  +

                  Detailed Description

                  +

                  pbuf API

                  +

                  Macro Definition Documentation

                  + +

                  ◆ LWIP_SUPPORT_CUSTOM_PBUF

                  + +
                  +
                  + + + + +
                  #define LWIP_SUPPORT_CUSTOM_PBUF   ((IP_FRAG && !LWIP_NETIF_TX_SINGLE_PBUF) || (LWIP_IPV6 && LWIP_IPV6_FRAG))
                  +
                  +

                  LWIP_SUPPORT_CUSTOM_PBUF==1: Custom pbufs behave much like their pbuf type but they are allocated by external code (initialised by calling pbuf_alloced_custom()) and when pbuf_free gives up their last reference, they are freed by calling pbuf_custom->custom_free_function(). Currently, the pbuf_custom code is only needed for one specific configuration of IP_FRAG, unless required by external driver/application code.

                  + +
                  +
                  + +

                  ◆ PBUF_ALLOC_FLAG_DATA_CONTIGUOUS

                  + +
                  +
                  + + + + +
                  #define PBUF_ALLOC_FLAG_DATA_CONTIGUOUS   0x0200
                  +
                  +

                  Indicates the application needs the pbuf payload to be in one piece

                  + +
                  +
                  + +

                  ◆ PBUF_ALLOC_FLAG_RX

                  + +
                  +
                  + + + + +
                  #define PBUF_ALLOC_FLAG_RX   0x0100
                  +
                  +

                  Indicates this pbuf is used for RX (if not set, indicates use for TX). This information can be used to keep some spare RX buffers e.g. for receiving TCP ACKs to unblock a connection)

                  + +
                  +
                  + +

                  ◆ PBUF_FLAG_IS_CUSTOM

                  + +
                  +
                  + + + + +
                  #define PBUF_FLAG_IS_CUSTOM   0x02U
                  +
                  +

                  indicates this is a custom pbuf: pbuf_free calls pbuf_custom->custom_free_function() when the last reference is released (plus custom PBUF_RAM cannot be trimmed)

                  + +
                  +
                  + +

                  ◆ PBUF_FLAG_LLBCAST

                  + +
                  +
                  + + + + +
                  #define PBUF_FLAG_LLBCAST   0x08U
                  +
                  +

                  indicates this pbuf was received as link-level broadcast

                  + +
                  +
                  + +

                  ◆ PBUF_FLAG_LLMCAST

                  + +
                  +
                  + + + + +
                  #define PBUF_FLAG_LLMCAST   0x10U
                  +
                  +

                  indicates this pbuf was received as link-level multicast

                  + +
                  +
                  + +

                  ◆ PBUF_FLAG_MCASTLOOP

                  + +
                  +
                  + + + + +
                  #define PBUF_FLAG_MCASTLOOP   0x04U
                  +
                  +

                  indicates this pbuf is UDP multicast to be looped back

                  + +
                  +
                  + +

                  ◆ PBUF_FLAG_PUSH

                  + +
                  +
                  + + + + +
                  #define PBUF_FLAG_PUSH   0x01U
                  +
                  +

                  indicates this packet's data should be immediately passed to the application

                  + +
                  +
                  + +

                  ◆ PBUF_FLAG_TCP_FIN

                  + +
                  +
                  + + + + +
                  #define PBUF_FLAG_TCP_FIN   0x20U
                  +
                  +

                  indicates this pbuf includes a TCP FIN flag

                  + +
                  +
                  + +

                  ◆ PBUF_POOL_FREE_OOSEQ

                  + +
                  +
                  + + + + +
                  #define PBUF_POOL_FREE_OOSEQ   1
                  +
                  +

                  Define this to 0 to prevent freeing ooseq pbufs when the PBUF_POOL is empty

                  + +
                  +
                  + +

                  ◆ PBUF_TYPE_ALLOC_SRC_MASK

                  + +
                  +
                  + + + + +
                  #define PBUF_TYPE_ALLOC_SRC_MASK   0x0F
                  +
                  +

                  4 bits are reserved for 16 allocation sources (e.g. heap, pool1, pool2, etc) Internally, we use: 0=heap, 1=MEMP_PBUF, 2=MEMP_PBUF_POOL -> 13 types free

                  + +
                  +
                  + +

                  ◆ PBUF_TYPE_ALLOC_SRC_MASK_APP_MAX

                  + +
                  +
                  + + + + +
                  #define PBUF_TYPE_ALLOC_SRC_MASK_APP_MAX   PBUF_TYPE_ALLOC_SRC_MASK
                  +
                  +

                  Last pbuf allocation type for applications

                  + +
                  +
                  + +

                  ◆ PBUF_TYPE_ALLOC_SRC_MASK_APP_MIN

                  + +
                  +
                  + + + + +
                  #define PBUF_TYPE_ALLOC_SRC_MASK_APP_MIN   0x03
                  +
                  +

                  First pbuf allocation type for applications

                  + +
                  +
                  + +

                  ◆ PBUF_TYPE_FLAG_DATA_VOLATILE

                  + +
                  +
                  + + + + +
                  #define PBUF_TYPE_FLAG_DATA_VOLATILE   0x40
                  +
                  +

                  Indicates the data stored in this pbuf can change. If this pbuf needs to be queued, it must be copied/duplicated.

                  + +
                  +
                  + +

                  ◆ PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS

                  + +
                  +
                  + + + + +
                  #define PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS   0x80
                  +
                  +

                  Indicates that the payload directly follows the struct pbuf. This makes pbuf_header work in both directions.

                  + +
                  +
                  +

                  Typedef Documentation

                  + +

                  ◆ pbuf_free_custom_fn

                  + +
                  +
                  + + + + +
                  typedef void(* pbuf_free_custom_fn) (struct pbuf *p)
                  +
                  +

                  Prototype for a function to free a custom pbuf

                  + +
                  +
                  +

                  Function Documentation

                  + +

                  ◆ pbuf_add_header()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  u8_t pbuf_add_header (struct pbufp,
                  size_t header_size_increment 
                  )
                  +
                  +

                  Adjusts the payload pointer to reveal headers in the payload.

                  +

                  Adjusts the ->payload pointer so that space for a header appears in the pbuf payload.

                  +

                  The ->payload, ->tot_len and ->len fields are adjusted.

                  +
                  Parameters
                  + + + +
                  ppbuf to change the header size.
                  header_size_incrementNumber of bytes to increment header size which increases the size of the pbuf. New space is on the front. If header_size_increment is 0, this function does nothing and returns successful.
                  +
                  +
                  +

                  PBUF_ROM and PBUF_REF type buffers cannot have their sizes increased, so the call will fail. A check is made that the increase in header size does not move the payload pointer in front of the start of the buffer.

                  +
                  Returns
                  non-zero on failure, zero on success.
                  + +
                  +
                  + +

                  ◆ pbuf_add_header_force()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  u8_t pbuf_add_header_force (struct pbufp,
                  size_t header_size_increment 
                  )
                  +
                  +

                  Same as pbuf_add_header but does not check if 'header_size > 0' is allowed. This is used internally only, to allow PBUF_REF for RX.

                  + +
                  +
                  + +

                  ◆ pbuf_clen()

                  + +
                  +
                  + + + + + + + + +
                  u16_t pbuf_clen (const struct pbufp)
                  +
                  +

                  Count number of pbufs in a chain

                  +
                  Parameters
                  + + +
                  pfirst pbuf of chain
                  +
                  +
                  +
                  Returns
                  the number of pbufs in a chain
                  + +
                  +
                  + +

                  ◆ pbuf_dechain()

                  + +
                  +
                  + + + + + + + + +
                  struct pbuf* pbuf_dechain (struct pbufp)
                  +
                  +

                  Dechains the first pbuf from its succeeding pbufs in the chain.

                  +

                  Makes p->tot_len field equal to p->len.

                  Parameters
                  + + +
                  ppbuf to dechain
                  +
                  +
                  +
                  Returns
                  remainder of the pbuf chain, or NULL if it was de-allocated.
                  +
                  Note
                  May not be called on a packet queue.
                  + +
                  +
                  + +

                  ◆ pbuf_free_header()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  struct pbuf* pbuf_free_header (struct pbufq,
                  u16_t size 
                  )
                  +
                  +

                  Similar to pbuf_header(-size) but de-refs header pbufs for (size >= p->len)

                  +
                  Parameters
                  + + + +
                  qpbufs to operate on
                  sizeThe number of bytes to remove from the beginning of the pbuf list. While size >= p->len, pbufs are freed. ATTENTION: this is the opposite direction as pbuf_header, but takes an u16_t not s16_t!
                  +
                  +
                  +
                  Returns
                  the new head pbuf
                  + +
                  +
                  + +

                  ◆ pbuf_header()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  u8_t pbuf_header (struct pbufp,
                  s16_t header_size_increment 
                  )
                  +
                  +

                  Adjusts the payload pointer to hide or reveal headers in the payload.

                  +

                  Adjusts the ->payload pointer so that space for a header (dis)appears in the pbuf payload.

                  +

                  The ->payload, ->tot_len and ->len fields are adjusted.

                  +
                  Parameters
                  + + + +
                  ppbuf to change the header size.
                  header_size_incrementNumber of bytes to increment header size which increases the size of the pbuf. New space is on the front. (Using a negative value decreases the header size.) If header_size_increment is 0, this function does nothing and returns successful.
                  +
                  +
                  +

                  PBUF_ROM and PBUF_REF type buffers cannot have their sizes increased, so the call will fail. A check is made that the increase in header size does not move the payload pointer in front of the start of the buffer.

                  Returns
                  non-zero on failure, zero on success.
                  + +
                  +
                  + +

                  ◆ pbuf_header_force()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  u8_t pbuf_header_force (struct pbufp,
                  s16_t header_size_increment 
                  )
                  +
                  +

                  Same as pbuf_header but does not check if 'header_size > 0' is allowed. This is used internally only, to allow PBUF_REF for RX.

                  + +
                  +
                  + +

                  ◆ pbuf_remove_header()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  u8_t pbuf_remove_header (struct pbufp,
                  size_t header_size_decrement 
                  )
                  +
                  +

                  Adjusts the payload pointer to hide headers in the payload.

                  +

                  Adjusts the ->payload pointer so that space for a header disappears in the pbuf payload.

                  +

                  The ->payload, ->tot_len and ->len fields are adjusted.

                  +
                  Parameters
                  + + + +
                  ppbuf to change the header size.
                  header_size_decrementNumber of bytes to decrement header size which decreases the size of the pbuf. If header_size_decrement is 0, this function does nothing and returns successful.
                  +
                  +
                  +
                  Returns
                  non-zero on failure, zero on success.
                  + +
                  +
                  + +

                  ◆ pbuf_strstr()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  u16_t pbuf_strstr (const struct pbufp,
                  const char * substr 
                  )
                  +
                  +

                  Find occurrence of substr with length substr_len in pbuf p, start at offset start_offset WARNING: in contrast to strstr(), this one does not stop at the first \0 in the pbuf/source string!

                  +
                  Parameters
                  + + + +
                  ppbuf to search, maximum length is 0xFFFE since 0xFFFF is used as return value 'not found'
                  substrstring to search for in p, maximum length is 0xFFFE
                  +
                  +
                  +
                  Returns
                  0xFFFF if substr was not found in p or the index where it was found
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/pbuf_8h.js b/Libraries/LwIP/doc/doxygen/output/html/pbuf_8h.js new file mode 100644 index 0000000..01b167c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/pbuf_8h.js @@ -0,0 +1,66 @@ +var pbuf_8h = +[ + [ "pbuf", "structpbuf.html", "structpbuf" ], + [ "pbuf_rom", "structpbuf__rom.html", "structpbuf__rom" ], + [ "pbuf_custom", "structpbuf__custom.html", "structpbuf__custom" ], + [ "LWIP_SUPPORT_CUSTOM_PBUF", "pbuf_8h.html#a64174c5169b48dc17674324afd9c63b9", null ], + [ "PBUF_ALLOC_FLAG_DATA_CONTIGUOUS", "pbuf_8h.html#a426883d928f8f3e8fd066e616159d78f", null ], + [ "PBUF_ALLOC_FLAG_RX", "pbuf_8h.html#a567a0dfa01b0e5540f9416a200ed163f", null ], + [ "PBUF_FLAG_IS_CUSTOM", "pbuf_8h.html#af78a7e1815dc0e31884d095b666d997f", null ], + [ "PBUF_FLAG_LLBCAST", "pbuf_8h.html#a6772c16662bbb78597399add086500c0", null ], + [ "PBUF_FLAG_LLMCAST", "pbuf_8h.html#ac0d56cde47aca24ef410d730d7c89887", null ], + [ "PBUF_FLAG_MCASTLOOP", "pbuf_8h.html#ab8ad153151a8c157335d9c0cedc007e6", null ], + [ "PBUF_FLAG_PUSH", "pbuf_8h.html#a018a6499e357f8a1373321f802a82930", null ], + [ "PBUF_FLAG_TCP_FIN", "pbuf_8h.html#a36a915aa2f6a188baa2862881407971e", null ], + [ "PBUF_NEEDS_COPY", "group__pbuf.html#ga894d91d811fd986f3cc3da828fa7beb3", null ], + [ "PBUF_POOL_FREE_OOSEQ", "pbuf_8h.html#ac54b0f161128a32c7419c33b893a5106", null ], + [ "PBUF_TYPE_ALLOC_SRC_MASK", "pbuf_8h.html#a97d4db8e0f127f61af0016c184c865ca", null ], + [ "PBUF_TYPE_ALLOC_SRC_MASK_APP_MAX", "pbuf_8h.html#aad686ef346759a221abdb45f64649816", null ], + [ "PBUF_TYPE_ALLOC_SRC_MASK_APP_MIN", "pbuf_8h.html#aa1f62ba9dc5d462e67e33c4be64c601a", null ], + [ "PBUF_TYPE_FLAG_DATA_VOLATILE", "pbuf_8h.html#a02789ca67766def65000b58f7fe7d03b", null ], + [ "PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS", "pbuf_8h.html#a49ab2c0662378f268ed8209bd54aaedf", null ], + [ "pbuf_free_custom_fn", "pbuf_8h.html#a6d285ce1d910f25e511c8c38532a1dce", null ], + [ "pbuf_layer", "group__pbuf.html#gaee1baa59bb2f85ba575b5a8619ac1ebf", [ + [ "PBUF_TRANSPORT", "group__pbuf.html#ggaee1baa59bb2f85ba575b5a8619ac1ebfa2ded3594a3977f8bf9cf09552be327b5", null ], + [ "PBUF_IP", "group__pbuf.html#ggaee1baa59bb2f85ba575b5a8619ac1ebfafcc1e506061ba69dfa142eb6b3da5f13", null ], + [ "PBUF_LINK", "group__pbuf.html#ggaee1baa59bb2f85ba575b5a8619ac1ebfab4de441e737330558b609a990cd17346", null ], + [ "PBUF_RAW_TX", "group__pbuf.html#ggaee1baa59bb2f85ba575b5a8619ac1ebfa0ff039585f05f9208bcb66c2d37783e2", null ], + [ "PBUF_RAW", "group__pbuf.html#ggaee1baa59bb2f85ba575b5a8619ac1ebfa21116654fbab6d5a4dfeb87a1bb8f0ba", null ] + ] ], + [ "pbuf_type", "group__pbuf.html#gab7e0e32fcc292c0d7107721766ed92fb", [ + [ "PBUF_RAM", "group__pbuf.html#ggab7e0e32fcc292c0d7107721766ed92fbac5e9f28455bca98944a030d4b84ecfab", null ], + [ "PBUF_ROM", "group__pbuf.html#ggab7e0e32fcc292c0d7107721766ed92fbac120b0fe39efe35bb682e4aa3b82e2c9", null ], + [ "PBUF_REF", "group__pbuf.html#ggab7e0e32fcc292c0d7107721766ed92fbac9b6ba960fdea6f2e8f35c8313b77e4e", null ], + [ "PBUF_POOL", "group__pbuf.html#ggab7e0e32fcc292c0d7107721766ed92fbae969347127387b9b59a23ccd24b76d21", null ] + ] ], + [ "pbuf_add_header", "pbuf_8h.html#a32dc14bd88dcafa25e627ab18e801815", null ], + [ "pbuf_add_header_force", "pbuf_8h.html#ad4ef8c5fbbd1447db04f8f73923e7dee", null ], + [ "pbuf_alloc", "group__pbuf.html#gacfcb0a2af918658ba0afe36499c65f47", null ], + [ "pbuf_alloc_reference", "group__pbuf.html#ga4caa46c6d560d9d0da2be845bc9c2fab", null ], + [ "pbuf_alloced_custom", "group__pbuf.html#ga90fa2bbf6ea4a263ee8f7b77c75683c2", null ], + [ "pbuf_cat", "group__pbuf.html#ga82429084fe29015509c9b4a072707cd4", null ], + [ "pbuf_chain", "group__pbuf.html#ga831c9a72bda1d3bd4c7b96f5a0e3b891", null ], + [ "pbuf_clen", "pbuf_8h.html#a5df7ac5ae59012fe9aeddba375a72190", null ], + [ "pbuf_clone", "group__pbuf.html#gafdb04fb0f37f0422fd44ec0fcec8ebd0", null ], + [ "pbuf_coalesce", "group__pbuf.html#ga54ac7b116c6f53c704cbf74f35a8b35c", null ], + [ "pbuf_copy", "group__pbuf.html#gaba88511dee3df4b631fde691f421320d", null ], + [ "pbuf_copy_partial", "group__pbuf.html#gac2f1f58fd36042e82af46f5015720899", null ], + [ "pbuf_dechain", "pbuf_8h.html#abf3d29c4f43986b4cb5eb314d5b9729d", null ], + [ "pbuf_free", "group__pbuf.html#gab0dd696fb4b6bc65e548944584f1738b", null ], + [ "pbuf_free_header", "pbuf_8h.html#a25a3b8edc783896b03819a966d00845e", null ], + [ "pbuf_get_at", "group__pbuf.html#ga6d803d9945bffb7ad97743f2fa503da6", null ], + [ "pbuf_get_contiguous", "group__pbuf.html#gad0357ae0be17b2aacd0c301cdc86fc39", null ], + [ "pbuf_header", "pbuf_8h.html#aaa17c1951cf2d207b6adfd3947d91f00", null ], + [ "pbuf_header_force", "pbuf_8h.html#a27480c41c34021d4417691d327163626", null ], + [ "pbuf_memcmp", "group__pbuf.html#ga2170ccbbb13238380dbb203ee1b85974", null ], + [ "pbuf_memfind", "group__pbuf.html#ga18c164a6e4a24d89ea9eb7571a886448", null ], + [ "pbuf_put_at", "group__pbuf.html#gaf76863707dc02993eae116574b1ea03f", null ], + [ "pbuf_realloc", "group__pbuf.html#ga50abfe830a33a1a47a562febee66015d", null ], + [ "pbuf_ref", "group__pbuf.html#ga77f6bbd69e45e542014d9c547c7da74e", null ], + [ "pbuf_remove_header", "pbuf_8h.html#ab65da7cd8f7449b3b2e57d7fa1a74ef4", null ], + [ "pbuf_skip", "group__pbuf.html#ga6a961522d81f0327aaf4d4ee6d96c583", null ], + [ "pbuf_strstr", "pbuf_8h.html#a9ba3f7b705309ceadb147692fd5a1c7d", null ], + [ "pbuf_take", "group__pbuf.html#gad1e31e370271335b197272af2724ca85", null ], + [ "pbuf_take_at", "group__pbuf.html#gae1cf2bf7454ff87ff377b0b2262f9b44", null ], + [ "pbuf_try_get_at", "group__pbuf.html#ga839f342803b0cf89049744124c5a98ad", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/pitfalls.html b/Libraries/LwIP/doc/doxygen/output/html/pitfalls.html new file mode 100644 index 0000000..7cbc93a --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/pitfalls.html @@ -0,0 +1,116 @@ + + + + + + + +lwIP: Common pitfalls + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  Common pitfalls
                  +
                  +
                  +

                  Multiple Execution Contexts in lwIP code

                  +

                  The most common source of lwIP problems is to have multiple execution contexts inside the lwIP code.

                  +

                  lwIP can be used in two basic modes: Mainloop mode ("NO_SYS") (no OS/RTOS running on target system) or OS mode (TCPIP thread) (there is an OS running on the target system).

                  +

                  See also: Multithreading (especially the part about LWIP_ASSERT_CORE_LOCKED()!)

                  +

                  Mainloop Mode

                  +

                  In mainloop mode, only "raw" APIs can be used. The user has two possibilities to ensure there is only one exection context at a time in lwIP:

                  +

                  1) Deliver RX ethernet packets directly in interrupt context to lwIP by calling netif->input directly in interrupt. This implies all lwIP callback functions are called in IRQ context, which may cause further problems in application code: IRQ is blocked for a long time, multiple execution contexts in application code etc. When the application wants to call lwIP, it only needs to disable interrupts during the call. If timers are involved, even more locking code is needed to lock out timer IRQ and ethernet IRQ from each other, assuming these may be nested.

                  +

                  2) Run lwIP in a mainloop. There is example code here: Mainloop mode ("NO_SYS"). lwIP is ONLY called from mainloop callstacks here. The ethernet IRQ has to put received telegrams into a queue which is polled in the mainloop. Ensure lwIP is NEVER called from an interrupt, e.g. some SPI IRQ wants to forward data to udp_send() or tcp_write()!

                  +

                  OS Mode

                  +

                  In OS mode, "raw" APIs AND Sequential-style APIs can be used. Sequential-style APIs are designed to be called from threads other than the TCPIP thread, so there is nothing to consider here. But "raw" APIs functions must ONLY be called from TCPIP thread. It is a common error to call these from other threads or from IRQ contexts. ​Ethernet RX needs to deliver incoming packets in the correct way by sending a message to TCPIP thread, this is implemented in tcpip_input().​​ Again, ensure lwIP is NEVER called from an interrupt, e.g. some SPI IRQ wants to forward data to udp_send() or tcp_write()!

                  +

                  1) tcpip_callback() can be used get called back from TCPIP thread, it is safe to call any "raw" APIs from there.

                  +

                  2) Use LWIP_TCPIP_CORE_LOCKING. All "raw" APIs functions can be called when lwIP core lock is aquired, see LOCK_TCPIP_CORE() and UNLOCK_TCPIP_CORE(). These macros cannot be used in an interrupt context! Note the OS must correctly handle priority inversion for this.

                  +

                  Cache / DMA issues

                  +

                  DMA-capable ethernet hardware and zero-copy RX

                  +

                  lwIP changes the content of RECEIVED pbufs in the TCP code path. This implies one or more cacheline(s) of the RX pbuf become dirty and need to be flushed before the memory is handed over to the DMA ethernet hardware for the next telegram to be received. See http://lists.nongnu.org/archive/html/lwip-devel/2017-12/msg00070.html for a more detailed explanation. Also keep in mind the user application may also write into pbufs, so it is generally a bug not to flush the data cache before handing a buffer to DMA hardware.

                  +

                  DMA-capable ethernet hardware and cacheline alignment

                  +

                  Nice description about DMA capable hardware and buffer handling: http://www.pebblebay.com/a-guide-to-using-direct-memory-access-in-embedded-systems-part-two/ Read especially sections "Cache coherency" and "Buffer alignment".

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/pppapi_8c.html b/Libraries/LwIP/doc/doxygen/output/html/pppapi_8c.html new file mode 100644 index 0000000..cb147cc --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/pppapi_8c.html @@ -0,0 +1,103 @@ + + + + + + + +lwIP: src/netif/ppp/pppapi.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  pppapi.c File Reference
                  +
                  +
                  +
                  #include "netif/ppp/ppp_opts.h"
                  +

                  Detailed Description

                  +

                  Point To Point Protocol Sequential API module

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/pppol2tp_8c.html b/Libraries/LwIP/doc/doxygen/output/html/pppol2tp_8c.html new file mode 100644 index 0000000..30d96fd --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/pppol2tp_8c.html @@ -0,0 +1,103 @@ + + + + + + + +lwIP: src/netif/ppp/pppol2tp.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  pppol2tp.c File Reference
                  +
                  +
                  +
                  #include "netif/ppp/ppp_opts.h"
                  +

                  Detailed Description

                  +

                  Network Point to Point Protocol over Layer 2 Tunneling Protocol program file.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/pppol2tp_8h.html b/Libraries/LwIP/doc/doxygen/output/html/pppol2tp_8h.html new file mode 100644 index 0000000..7330c8c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/pppol2tp_8h.html @@ -0,0 +1,103 @@ + + + + + + + +lwIP: src/include/netif/ppp/pppol2tp.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  pppol2tp.h File Reference
                  +
                  +
                  +
                  #include "netif/ppp/ppp_opts.h"
                  +

                  Detailed Description

                  +

                  Network Point to Point Protocol over Layer 2 Tunneling Protocol header file.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/pppos_8c.html b/Libraries/LwIP/doc/doxygen/output/html/pppos_8c.html new file mode 100644 index 0000000..4296106 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/pppos_8c.html @@ -0,0 +1,103 @@ + + + + + + + +lwIP: src/netif/ppp/pppos.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  pppos.c File Reference
                  +
                  +
                  +
                  #include "netif/ppp/ppp_opts.h"
                  +

                  Detailed Description

                  +

                  Network Point to Point Protocol over Serial file.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/pppos_8h.html b/Libraries/LwIP/doc/doxygen/output/html/pppos_8h.html new file mode 100644 index 0000000..507c0ec --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/pppos_8h.html @@ -0,0 +1,103 @@ + + + + + + + +lwIP: src/include/netif/ppp/pppos.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  pppos.h File Reference
                  +
                  +
                  +
                  #include "netif/ppp/ppp_opts.h"
                  +

                  Detailed Description

                  +

                  Network Point to Point Protocol over Serial header file.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/prot_2autoip_8h.html b/Libraries/LwIP/doc/doxygen/output/html/prot_2autoip_8h.html new file mode 100644 index 0000000..bd5b0a0 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/prot_2autoip_8h.html @@ -0,0 +1,102 @@ + + + + + + + +lwIP: src/include/lwip/prot/autoip.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  autoip.h File Reference
                  +
                  +
                  +

                  Detailed Description

                  +

                  AutoIP protocol definitions

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/prot_2dhcp6_8h.html b/Libraries/LwIP/doc/doxygen/output/html/prot_2dhcp6_8h.html new file mode 100644 index 0000000..c745aee --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/prot_2dhcp6_8h.html @@ -0,0 +1,152 @@ + + + + + + + +lwIP: src/include/lwip/prot/dhcp6.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  dhcp6.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "arch/bpstruct.h"
                  +#include "arch/epstruct.h"
                  +
                  + + + +

                  +Data Structures

                  struct  dhcp6_msg
                   
                  + + + + + +

                  +Macros

                  #define DHCP6_STATUS_SUCCESS   0 /* Success. */
                   
                  #define DHCP6_DUID_LLT   1 /* LLT: Link-layer Address Plus Time */
                   
                  +

                  Detailed Description

                  +

                  DHCPv6 protocol definitions

                  +

                  Macro Definition Documentation

                  + +

                  ◆ DHCP6_DUID_LLT

                  + +
                  +
                  + + + + +
                  #define DHCP6_DUID_LLT   1 /* LLT: Link-layer Address Plus Time */
                  +
                  +

                  DHCPv6 DUID types

                  + +
                  +
                  + +

                  ◆ DHCP6_STATUS_SUCCESS

                  + +
                  +
                  + + + + +
                  #define DHCP6_STATUS_SUCCESS   0 /* Success. */
                  +
                  +

                  DHCPv6 status codes

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/prot_2dhcp6_8h.js b/Libraries/LwIP/doc/doxygen/output/html/prot_2dhcp6_8h.js new file mode 100644 index 0000000..c4d51ba --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/prot_2dhcp6_8h.js @@ -0,0 +1,6 @@ +var prot_2dhcp6_8h = +[ + [ "dhcp6_msg", "structdhcp6__msg.html", null ], + [ "DHCP6_DUID_LLT", "prot_2dhcp6_8h.html#afe33f98cb94e0f18892a41502cf54e36", null ], + [ "DHCP6_STATUS_SUCCESS", "prot_2dhcp6_8h.html#a878a7734e159826e82e958fe3a5ca175", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/prot_2dhcp_8h.html b/Libraries/LwIP/doc/doxygen/output/html/prot_2dhcp_8h.html new file mode 100644 index 0000000..27e04ce --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/prot_2dhcp_8h.html @@ -0,0 +1,137 @@ + + + + + + + +lwIP: src/include/lwip/prot/dhcp.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  dhcp.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/arch.h"
                  +#include "lwip/prot/ip4.h"
                  +#include "arch/bpstruct.h"
                  +#include "arch/epstruct.h"
                  +
                  + + + +

                  +Data Structures

                  struct  dhcp_msg
                   
                  + + + +

                  +Macros

                  #define DHCP_OPTIONS_LEN   DHCP_MIN_OPTIONS_LEN
                   
                  +

                  Detailed Description

                  +

                  DHCP protocol definitions

                  +

                  Macro Definition Documentation

                  + +

                  ◆ DHCP_OPTIONS_LEN

                  + +
                  +
                  + + + + +
                  #define DHCP_OPTIONS_LEN   DHCP_MIN_OPTIONS_LEN
                  +
                  +

                  make sure user does not configure this too small allow this to be configured in lwipopts.h, but not too small set this to be sufficient for your options in outgoing DHCP msgs

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/prot_2dhcp_8h.js b/Libraries/LwIP/doc/doxygen/output/html/prot_2dhcp_8h.js new file mode 100644 index 0000000..5752c24 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/prot_2dhcp_8h.js @@ -0,0 +1,5 @@ +var prot_2dhcp_8h = +[ + [ "dhcp_msg", "structdhcp__msg.html", null ], + [ "DHCP_OPTIONS_LEN", "prot_2dhcp_8h.html#ae99d4be0d03f6f9c8f02f63abde91a06", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/prot_2dns_8h.html b/Libraries/LwIP/doc/doxygen/output/html/prot_2dns_8h.html new file mode 100644 index 0000000..690609e --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/prot_2dns_8h.html @@ -0,0 +1,152 @@ + + + + + + + +lwIP: src/include/lwip/prot/dns.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  dns.h File Reference
                  +
                  +
                  +
                  #include "lwip/arch.h"
                  +#include "arch/bpstruct.h"
                  +#include "arch/epstruct.h"
                  +
                  + + + +

                  +Data Structures

                  struct  dns_hdr
                   
                  + + + + + +

                  +Macros

                  #define DNS_SERVER_PORT   53
                   
                  #define DNS_MQUERY_PORT   5353
                   
                  +

                  Detailed Description

                  +

                  DNS - host name to IP address resolver.

                  +

                  Macro Definition Documentation

                  + +

                  ◆ DNS_MQUERY_PORT

                  + +
                  +
                  + + + + +
                  #define DNS_MQUERY_PORT   5353
                  +
                  +

                  UDP port for multicast DNS queries

                  + +
                  +
                  + +

                  ◆ DNS_SERVER_PORT

                  + +
                  +
                  + + + + +
                  #define DNS_SERVER_PORT   53
                  +
                  +

                  DNS server port address

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/prot_2dns_8h.js b/Libraries/LwIP/doc/doxygen/output/html/prot_2dns_8h.js new file mode 100644 index 0000000..8c194bc --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/prot_2dns_8h.js @@ -0,0 +1,6 @@ +var prot_2dns_8h = +[ + [ "dns_hdr", "structdns__hdr.html", null ], + [ "DNS_MQUERY_PORT", "prot_2dns_8h.html#a62d67af5ac6c6b3f98a6566a42564276", null ], + [ "DNS_SERVER_PORT", "prot_2dns_8h.html#a9266b48706648ecf0625a3e651095317", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/prot_2icmp6_8h.html b/Libraries/LwIP/doc/doxygen/output/html/prot_2icmp6_8h.html new file mode 100644 index 0000000..690c828 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/prot_2icmp6_8h.html @@ -0,0 +1,311 @@ + + + + + + + +lwIP: src/include/lwip/prot/icmp6.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  icmp6.h File Reference
                  +
                  +
                  +
                  #include "lwip/arch.h"
                  +#include "arch/bpstruct.h"
                  +#include "arch/epstruct.h"
                  +
                  + + + + + +

                  +Data Structures

                  struct  icmp6_hdr
                   
                  struct  icmp6_echo_hdr
                   
                  + + + + + + + + + +

                  +Enumerations

                  enum  icmp6_type {
                  +  ICMP6_TYPE_DUR = 1, +ICMP6_TYPE_PTB = 2, +ICMP6_TYPE_TE = 3, +ICMP6_TYPE_PP = 4, +
                  +  ICMP6_TYPE_PE1 = 100, +ICMP6_TYPE_PE2 = 101, +ICMP6_TYPE_RSV_ERR = 127, +ICMP6_TYPE_EREQ = 128, +
                  +  ICMP6_TYPE_EREP = 129, +ICMP6_TYPE_MLQ = 130, +ICMP6_TYPE_MLR = 131, +ICMP6_TYPE_MLD = 132, +
                  +  ICMP6_TYPE_RS = 133, +ICMP6_TYPE_RA = 134, +ICMP6_TYPE_NS = 135, +ICMP6_TYPE_NA = 136, +
                  +  ICMP6_TYPE_RD = 137, +ICMP6_TYPE_MRA = 151, +ICMP6_TYPE_MRS = 152, +ICMP6_TYPE_MRT = 153, +
                  +  ICMP6_TYPE_PE3 = 200, +ICMP6_TYPE_PE4 = 201, +ICMP6_TYPE_RSV_INF = 255 +
                  + }
                   
                  enum  icmp6_dur_code {
                  +  ICMP6_DUR_NO_ROUTE = 0, +ICMP6_DUR_PROHIBITED = 1, +ICMP6_DUR_SCOPE = 2, +ICMP6_DUR_ADDRESS = 3, +
                  +  ICMP6_DUR_PORT = 4, +ICMP6_DUR_POLICY = 5, +ICMP6_DUR_REJECT_ROUTE = 6 +
                  + }
                   
                  enum  icmp6_te_code { ICMP6_TE_HL = 0, +ICMP6_TE_FRAG = 1 + }
                   
                  enum  icmp6_pp_code { ICMP6_PP_FIELD = 0, +ICMP6_PP_HEADER = 1, +ICMP6_PP_OPTION = 2 + }
                   
                  +

                  Detailed Description

                  +

                  ICMP6 protocol definitions

                  +

                  Enumeration Type Documentation

                  + +

                  ◆ icmp6_dur_code

                  + +
                  +
                  + + + + +
                  enum icmp6_dur_code
                  +
                  +

                  ICMP destination unreachable codes

                  + + + + + + + + +
                  Enumerator
                  ICMP6_DUR_NO_ROUTE 

                  No route to destination

                  +
                  ICMP6_DUR_PROHIBITED 

                  Communication with destination administratively prohibited

                  +
                  ICMP6_DUR_SCOPE 

                  Beyond scope of source address

                  +
                  ICMP6_DUR_ADDRESS 

                  Address unreachable

                  +
                  ICMP6_DUR_PORT 

                  Port unreachable

                  +
                  ICMP6_DUR_POLICY 

                  Source address failed ingress/egress policy

                  +
                  ICMP6_DUR_REJECT_ROUTE 

                  Reject route to destination

                  +
                  + +
                  +
                  + +

                  ◆ icmp6_pp_code

                  + +
                  +
                  + + + + +
                  enum icmp6_pp_code
                  +
                  +

                  ICMP parameter code

                  + + + + +
                  Enumerator
                  ICMP6_PP_FIELD 

                  Erroneous header field encountered

                  +
                  ICMP6_PP_HEADER 

                  Unrecognized next header type encountered

                  +
                  ICMP6_PP_OPTION 

                  Unrecognized IPv6 option encountered

                  +
                  + +
                  +
                  + +

                  ◆ icmp6_te_code

                  + +
                  +
                  + + + + +
                  enum icmp6_te_code
                  +
                  +

                  ICMP time exceeded codes

                  + + + +
                  Enumerator
                  ICMP6_TE_HL 

                  Hop limit exceeded in transit

                  +
                  ICMP6_TE_FRAG 

                  Fragment reassembly time exceeded

                  +
                  + +
                  +
                  + +

                  ◆ icmp6_type

                  + +
                  +
                  + + + + +
                  enum icmp6_type
                  +
                  +

                  ICMP type

                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  Enumerator
                  ICMP6_TYPE_DUR 

                  Destination unreachable

                  +
                  ICMP6_TYPE_PTB 

                  Packet too big

                  +
                  ICMP6_TYPE_TE 

                  Time exceeded

                  +
                  ICMP6_TYPE_PP 

                  Parameter problem

                  +
                  ICMP6_TYPE_PE1 

                  Private experimentation

                  +
                  ICMP6_TYPE_PE2 

                  Private experimentation

                  +
                  ICMP6_TYPE_RSV_ERR 

                  Reserved for expansion of error messages

                  +
                  ICMP6_TYPE_EREQ 

                  Echo request

                  +
                  ICMP6_TYPE_EREP 

                  Echo reply

                  +
                  ICMP6_TYPE_MLQ 

                  Multicast listener query

                  +
                  ICMP6_TYPE_MLR 

                  Multicast listener report

                  +
                  ICMP6_TYPE_MLD 

                  Multicast listener done

                  +
                  ICMP6_TYPE_RS 

                  Router solicitation

                  +
                  ICMP6_TYPE_RA 

                  Router advertisement

                  +
                  ICMP6_TYPE_NS 

                  Neighbor solicitation

                  +
                  ICMP6_TYPE_NA 

                  Neighbor advertisement

                  +
                  ICMP6_TYPE_RD 

                  Redirect

                  +
                  ICMP6_TYPE_MRA 

                  Multicast router advertisement

                  +
                  ICMP6_TYPE_MRS 

                  Multicast router solicitation

                  +
                  ICMP6_TYPE_MRT 

                  Multicast router termination

                  +
                  ICMP6_TYPE_PE3 

                  Private experimentation

                  +
                  ICMP6_TYPE_PE4 

                  Private experimentation

                  +
                  ICMP6_TYPE_RSV_INF 

                  Reserved for expansion of informational messages

                  +
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/prot_2icmp6_8h.js b/Libraries/LwIP/doc/doxygen/output/html/prot_2icmp6_8h.js new file mode 100644 index 0000000..3f6856b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/prot_2icmp6_8h.js @@ -0,0 +1,48 @@ +var prot_2icmp6_8h = +[ + [ "icmp6_hdr", "structicmp6__hdr.html", null ], + [ "icmp6_echo_hdr", "structicmp6__echo__hdr.html", null ], + [ "icmp6_dur_code", "prot_2icmp6_8h.html#a11fe21b0a8c1bc73ee887a96bf416ccf", [ + [ "ICMP6_DUR_NO_ROUTE", "prot_2icmp6_8h.html#a11fe21b0a8c1bc73ee887a96bf416ccfa695bb4d92f32b504a9483ff137235a78", null ], + [ "ICMP6_DUR_PROHIBITED", "prot_2icmp6_8h.html#a11fe21b0a8c1bc73ee887a96bf416ccfa251961b990d0fbaf2c643f047c4f2532", null ], + [ "ICMP6_DUR_SCOPE", "prot_2icmp6_8h.html#a11fe21b0a8c1bc73ee887a96bf416ccfabdb01a67c61da588872f5799ef75aa6e", null ], + [ "ICMP6_DUR_ADDRESS", "prot_2icmp6_8h.html#a11fe21b0a8c1bc73ee887a96bf416ccfa789ef8158d8750b0fa5a14ec9ecaa23a", null ], + [ "ICMP6_DUR_PORT", "prot_2icmp6_8h.html#a11fe21b0a8c1bc73ee887a96bf416ccfa28cc924ec6eaa761acb76ccef4adcba0", null ], + [ "ICMP6_DUR_POLICY", "prot_2icmp6_8h.html#a11fe21b0a8c1bc73ee887a96bf416ccfac3c255282e0b49b5bbb3cd8f435bb763", null ], + [ "ICMP6_DUR_REJECT_ROUTE", "prot_2icmp6_8h.html#a11fe21b0a8c1bc73ee887a96bf416ccfa2aeed278149fb071a34beec89df03b5c", null ] + ] ], + [ "icmp6_pp_code", "prot_2icmp6_8h.html#a3a817e777ebcfd705e8e5a1b4c5ae023", [ + [ "ICMP6_PP_FIELD", "prot_2icmp6_8h.html#a3a817e777ebcfd705e8e5a1b4c5ae023a4aa4a79306a69fd4f60ad445cde4c2a9", null ], + [ "ICMP6_PP_HEADER", "prot_2icmp6_8h.html#a3a817e777ebcfd705e8e5a1b4c5ae023acbcc58901e2345ffc31df4098de60ff8", null ], + [ "ICMP6_PP_OPTION", "prot_2icmp6_8h.html#a3a817e777ebcfd705e8e5a1b4c5ae023a53884832d00d3c8f8de62cfdb4646932", null ] + ] ], + [ "icmp6_te_code", "prot_2icmp6_8h.html#ad06bbf4ee72635ece968db41cbe6869e", [ + [ "ICMP6_TE_HL", "prot_2icmp6_8h.html#ad06bbf4ee72635ece968db41cbe6869eacccbb5e776df1b35af4149e593240880", null ], + [ "ICMP6_TE_FRAG", "prot_2icmp6_8h.html#ad06bbf4ee72635ece968db41cbe6869eaec493420d61c80a21981b1aa32befe1f", null ] + ] ], + [ "icmp6_type", "prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858", [ + [ "ICMP6_TYPE_DUR", "prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858aad9d4f207459e4bbd0c33a25adf6fdd7", null ], + [ "ICMP6_TYPE_PTB", "prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a1d52ef5024a5822bd622bcb0b9da323d", null ], + [ "ICMP6_TYPE_TE", "prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858afae9848904bc4b4b4aa716a7a9a2d7fe", null ], + [ "ICMP6_TYPE_PP", "prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a63114feac8140031b74424d4a7cf6b26", null ], + [ "ICMP6_TYPE_PE1", "prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858ac7020c08a7b03ae2a198e4a8dcd31bd4", null ], + [ "ICMP6_TYPE_PE2", "prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858aed14d280e5911098af914a94bd3ab22b", null ], + [ "ICMP6_TYPE_RSV_ERR", "prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858abe61415e020b996220337f0cd002a28f", null ], + [ "ICMP6_TYPE_EREQ", "prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858ae649aa45c97b885f28771688957528a3", null ], + [ "ICMP6_TYPE_EREP", "prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858ac6b91695c06bfc7fb2360310d7b8e78a", null ], + [ "ICMP6_TYPE_MLQ", "prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858ad9794ae12b9ca196cc4fafaf6d834375", null ], + [ "ICMP6_TYPE_MLR", "prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a906dd689f0aa9b4796f49f299d4e3eb0", null ], + [ "ICMP6_TYPE_MLD", "prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a04228a1d11f9f88bd165f3430188bfe7", null ], + [ "ICMP6_TYPE_RS", "prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a670d95494c9282f646ac442d81d9a780", null ], + [ "ICMP6_TYPE_RA", "prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858ae4ae04be7df3a2cce614af0a5cdae951", null ], + [ "ICMP6_TYPE_NS", "prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a0d8d8717c6c34053d1101932c23929fe", null ], + [ "ICMP6_TYPE_NA", "prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a1f99d333f425c28d3840e029cc9c46f3", null ], + [ "ICMP6_TYPE_RD", "prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a0f6702d62de5f873e0afe7431d878207", null ], + [ "ICMP6_TYPE_MRA", "prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a29281016d3bb58e3bfd90417bbce7aa0", null ], + [ "ICMP6_TYPE_MRS", "prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a425f4e64a7d1570228adbbe450650ab4", null ], + [ "ICMP6_TYPE_MRT", "prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858afb12a9d774f53deb15ec23041548f6fc", null ], + [ "ICMP6_TYPE_PE3", "prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a9c9c358ebd5eb683a66819fd9ecf98c6", null ], + [ "ICMP6_TYPE_PE4", "prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858af8ebe97c4f68b54c9ef0c43e98211df5", null ], + [ "ICMP6_TYPE_RSV_INF", "prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a2c12d3244d837bd243ea647ec530600d", null ] + ] ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/prot_2icmp_8h.html b/Libraries/LwIP/doc/doxygen/output/html/prot_2icmp_8h.html new file mode 100644 index 0000000..1215ba3 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/prot_2icmp_8h.html @@ -0,0 +1,113 @@ + + + + + + + +lwIP: src/include/lwip/prot/icmp.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  icmp.h File Reference
                  +
                  +
                  +
                  #include "lwip/arch.h"
                  +#include "arch/bpstruct.h"
                  +#include "arch/epstruct.h"
                  +
                  + + + +

                  +Data Structures

                  struct  icmp_echo_hdr
                   
                  +

                  Detailed Description

                  +

                  ICMP protocol definitions

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/prot_2icmp_8h.js b/Libraries/LwIP/doc/doxygen/output/html/prot_2icmp_8h.js new file mode 100644 index 0000000..808f385 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/prot_2icmp_8h.js @@ -0,0 +1,4 @@ +var prot_2icmp_8h = +[ + [ "icmp_echo_hdr", "structicmp__echo__hdr.html", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/prot_2igmp_8h.html b/Libraries/LwIP/doc/doxygen/output/html/prot_2igmp_8h.html new file mode 100644 index 0000000..66d6fce --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/prot_2igmp_8h.html @@ -0,0 +1,114 @@ + + + + + + + +lwIP: src/include/lwip/prot/igmp.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  igmp.h File Reference
                  +
                  +
                  +
                  #include "lwip/arch.h"
                  +#include "lwip/prot/ip4.h"
                  +#include "arch/bpstruct.h"
                  +#include "arch/epstruct.h"
                  +
                  + + + +

                  +Data Structures

                  struct  igmp_msg
                   
                  +

                  Detailed Description

                  +

                  IGMP protocol definitions

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/prot_2igmp_8h.js b/Libraries/LwIP/doc/doxygen/output/html/prot_2igmp_8h.js new file mode 100644 index 0000000..94299b3 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/prot_2igmp_8h.js @@ -0,0 +1,4 @@ +var prot_2igmp_8h = +[ + [ "igmp_msg", "structigmp__msg.html", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/prot_2ip4_8h.html b/Libraries/LwIP/doc/doxygen/output/html/prot_2ip4_8h.html new file mode 100644 index 0000000..5aa5770 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/prot_2ip4_8h.html @@ -0,0 +1,114 @@ + + + + + + + +lwIP: src/include/lwip/prot/ip4.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  ip4.h File Reference
                  +
                  +
                  +
                  #include "lwip/arch.h"
                  +#include "lwip/ip4_addr.h"
                  +#include "arch/bpstruct.h"
                  +#include "arch/epstruct.h"
                  +
                  + + + +

                  +Data Structures

                  struct  ip4_addr_packed
                   
                  +

                  Detailed Description

                  +

                  IPv4 protocol definitions

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/prot_2ip4_8h.js b/Libraries/LwIP/doc/doxygen/output/html/prot_2ip4_8h.js new file mode 100644 index 0000000..630cc97 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/prot_2ip4_8h.js @@ -0,0 +1,4 @@ +var prot_2ip4_8h = +[ + [ "ip4_addr_packed", "structip4__addr__packed.html", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/prot_2ip6_8h.html b/Libraries/LwIP/doc/doxygen/output/html/prot_2ip6_8h.html new file mode 100644 index 0000000..97f6a5d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/prot_2ip6_8h.html @@ -0,0 +1,116 @@ + + + + + + + +lwIP: src/include/lwip/prot/ip6.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  ip6.h File Reference
                  +
                  +
                  +
                  #include "lwip/arch.h"
                  +#include "lwip/ip6_addr.h"
                  +#include "arch/bpstruct.h"
                  +#include "arch/epstruct.h"
                  +
                  + + + + + +

                  +Data Structures

                  struct  ip6_addr_packed
                   
                  struct  ip6_hdr
                   
                  +

                  Detailed Description

                  +

                  IPv6 protocol definitions

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/prot_2ip6_8h.js b/Libraries/LwIP/doc/doxygen/output/html/prot_2ip6_8h.js new file mode 100644 index 0000000..7b54375 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/prot_2ip6_8h.js @@ -0,0 +1,5 @@ +var prot_2ip6_8h = +[ + [ "ip6_addr_packed", "structip6__addr__packed.html", null ], + [ "ip6_hdr", "structip6__hdr.html", "structip6__hdr" ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/prot_2ip_8h.html b/Libraries/LwIP/doc/doxygen/output/html/prot_2ip_8h.html new file mode 100644 index 0000000..bcb663c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/prot_2ip_8h.html @@ -0,0 +1,131 @@ + + + + + + + +lwIP: src/include/lwip/prot/ip.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  ip.h File Reference
                  +
                  +
                  +
                  #include "lwip/arch.h"
                  +
                  + + + +

                  +Macros

                  #define IP_HDR_GET_VERSION(ptr)   ((*(u8_t*)(ptr)) >> 4)
                   
                  +

                  Detailed Description

                  +

                  IP protocol definitions

                  +

                  Macro Definition Documentation

                  + +

                  ◆ IP_HDR_GET_VERSION

                  + +
                  +
                  + + + + + + + + +
                  #define IP_HDR_GET_VERSION( ptr)   ((*(u8_t*)(ptr)) >> 4)
                  +
                  +

                  This operates on a void* by loading the first byte

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/prot_2ip_8h.js b/Libraries/LwIP/doc/doxygen/output/html/prot_2ip_8h.js new file mode 100644 index 0000000..04efcab --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/prot_2ip_8h.js @@ -0,0 +1,4 @@ +var prot_2ip_8h = +[ + [ "IP_HDR_GET_VERSION", "prot_2ip_8h.html#afc29766fb0707c63b64568c5fa44a374", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/prot_2mld6_8h.html b/Libraries/LwIP/doc/doxygen/output/html/prot_2mld6_8h.html new file mode 100644 index 0000000..228ccd2 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/prot_2mld6_8h.html @@ -0,0 +1,114 @@ + + + + + + + +lwIP: src/include/lwip/prot/mld6.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  mld6.h File Reference
                  +
                  +
                  +
                  #include "lwip/arch.h"
                  +#include "lwip/prot/ip6.h"
                  +#include "arch/bpstruct.h"
                  +#include "arch/epstruct.h"
                  +
                  + + + +

                  +Data Structures

                  struct  mld_header
                   
                  +

                  Detailed Description

                  +

                  MLD6 protocol definitions

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/prot_2mld6_8h.js b/Libraries/LwIP/doc/doxygen/output/html/prot_2mld6_8h.js new file mode 100644 index 0000000..ad8930d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/prot_2mld6_8h.js @@ -0,0 +1,4 @@ +var prot_2mld6_8h = +[ + [ "mld_header", "structmld__header.html", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/prot_2nd6_8h.html b/Libraries/LwIP/doc/doxygen/output/html/prot_2nd6_8h.html new file mode 100644 index 0000000..a387060 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/prot_2nd6_8h.html @@ -0,0 +1,245 @@ + + + + + + + +lwIP: src/include/lwip/prot/nd6.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  nd6.h File Reference
                  +
                  +
                  +
                  #include "lwip/arch.h"
                  +#include "lwip/ip6_addr.h"
                  +#include "lwip/prot/ip6.h"
                  +#include "arch/bpstruct.h"
                  +#include "arch/epstruct.h"
                  +
                  + + + + + + + + + +

                  +Data Structures

                  struct  ns_header
                   
                  struct  na_header
                   
                  struct  rs_header
                   
                  struct  redirect_header
                   
                  + + + + + + + + + + + + + + + +

                  +Macros

                  #define ND6_RA_FLAG_MANAGED_ADDR_CONFIG   (0x80)
                   
                  #define ND6_OPTION_TYPE_SOURCE_LLADDR   (0x01)
                   
                  #define ND6_OPTION_TYPE_PREFIX_INFO   (0x03)
                   
                  #define ND6_OPTION_TYPE_REDIR_HDR   (0x04)
                   
                  #define ND6_OPTION_TYPE_MTU   (0x05)
                   
                  #define ND6_OPTION_TYPE_ROUTE_INFO   (24)
                   
                  #define ND6_OPTION_TYPE_RDNSS   (25)
                   
                  +

                  Detailed Description

                  +

                  ND6 protocol definitions

                  +

                  Macro Definition Documentation

                  + +

                  ◆ ND6_OPTION_TYPE_MTU

                  + +
                  +
                  + + + + +
                  #define ND6_OPTION_TYPE_MTU   (0x05)
                  +
                  +

                  MTU option.

                  + +
                  +
                  + +

                  ◆ ND6_OPTION_TYPE_PREFIX_INFO

                  + +
                  +
                  + + + + +
                  #define ND6_OPTION_TYPE_PREFIX_INFO   (0x03)
                  +
                  +

                  Prefix information option.

                  + +
                  +
                  + +

                  ◆ ND6_OPTION_TYPE_RDNSS

                  + +
                  +
                  + + + + +
                  #define ND6_OPTION_TYPE_RDNSS   (25)
                  +
                  +

                  Recursive DNS Server Option.

                  + +
                  +
                  + +

                  ◆ ND6_OPTION_TYPE_REDIR_HDR

                  + +
                  +
                  + + + + +
                  #define ND6_OPTION_TYPE_REDIR_HDR   (0x04)
                  +
                  +

                  Redirected header option.

                  + +
                  +
                  + +

                  ◆ ND6_OPTION_TYPE_ROUTE_INFO

                  + +
                  +
                  + + + + +
                  #define ND6_OPTION_TYPE_ROUTE_INFO   (24)
                  +
                  +

                  Route information option.

                  + +
                  +
                  + +

                  ◆ ND6_OPTION_TYPE_SOURCE_LLADDR

                  + +
                  +
                  + + + + +
                  #define ND6_OPTION_TYPE_SOURCE_LLADDR   (0x01)
                  +
                  +

                  Link-layer address option.

                  + +
                  +
                  + +

                  ◆ ND6_RA_FLAG_MANAGED_ADDR_CONFIG

                  + +
                  +
                  + + + + +
                  #define ND6_RA_FLAG_MANAGED_ADDR_CONFIG   (0x80)
                  +
                  +

                  Router advertisement message header.

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/prot_2nd6_8h.js b/Libraries/LwIP/doc/doxygen/output/html/prot_2nd6_8h.js new file mode 100644 index 0000000..888167f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/prot_2nd6_8h.js @@ -0,0 +1,14 @@ +var prot_2nd6_8h = +[ + [ "ns_header", "structns__header.html", null ], + [ "na_header", "structna__header.html", null ], + [ "rs_header", "structrs__header.html", null ], + [ "redirect_header", "structredirect__header.html", null ], + [ "ND6_OPTION_TYPE_MTU", "prot_2nd6_8h.html#aab6c15c9bea51fbdcc660f718bb403a8", null ], + [ "ND6_OPTION_TYPE_PREFIX_INFO", "prot_2nd6_8h.html#a0225d4c8911efdbdbc2b40de208906c2", null ], + [ "ND6_OPTION_TYPE_RDNSS", "prot_2nd6_8h.html#a3188b9704a8ca598f54b87c3db73272e", null ], + [ "ND6_OPTION_TYPE_REDIR_HDR", "prot_2nd6_8h.html#aeaa575c1a66ccaa2dc62ff2c0bd71619", null ], + [ "ND6_OPTION_TYPE_ROUTE_INFO", "prot_2nd6_8h.html#aff2e03766ee1fa15263c4aeda5097d28", null ], + [ "ND6_OPTION_TYPE_SOURCE_LLADDR", "prot_2nd6_8h.html#a68ce8550a20cd30093d6e79e1ca51842", null ], + [ "ND6_RA_FLAG_MANAGED_ADDR_CONFIG", "prot_2nd6_8h.html#a7fb1b330719d83b7525374f4beca51bc", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/prot_2tcp_8h.html b/Libraries/LwIP/doc/doxygen/output/html/prot_2tcp_8h.html new file mode 100644 index 0000000..9263070 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/prot_2tcp_8h.html @@ -0,0 +1,105 @@ + + + + + + + +lwIP: src/include/lwip/prot/tcp.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  tcp.h File Reference
                  +
                  +
                  +
                  #include "lwip/arch.h"
                  +#include "arch/bpstruct.h"
                  +#include "arch/epstruct.h"
                  +

                  Detailed Description

                  +

                  TCP protocol definitions

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/prot_2udp_8h.html b/Libraries/LwIP/doc/doxygen/output/html/prot_2udp_8h.html new file mode 100644 index 0000000..d8266cc --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/prot_2udp_8h.html @@ -0,0 +1,105 @@ + + + + + + + +lwIP: src/include/lwip/prot/udp.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  udp.h File Reference
                  +
                  +
                  +
                  #include "lwip/arch.h"
                  +#include "arch/bpstruct.h"
                  +#include "arch/epstruct.h"
                  +

                  Detailed Description

                  +

                  UDP protocol definitions

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/raw_8c.html b/Libraries/LwIP/doc/doxygen/output/html/raw_8c.html new file mode 100644 index 0000000..f60a028 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/raw_8c.html @@ -0,0 +1,224 @@ + + + + + + + +lwIP: src/core/raw.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  raw.c File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/def.h"
                  +#include "lwip/memp.h"
                  +#include "lwip/ip_addr.h"
                  +#include "lwip/netif.h"
                  +#include "lwip/raw.h"
                  +#include "lwip/priv/raw_priv.h"
                  +#include "lwip/stats.h"
                  +#include "lwip/ip6.h"
                  +#include "lwip/ip6_addr.h"
                  +#include "lwip/inet_chksum.h"
                  +#include <string.h>
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  raw_input_state_t raw_input (struct pbuf *p, struct netif *inp)
                   
                  err_t raw_bind (struct raw_pcb *pcb, const ip_addr_t *ipaddr)
                   
                  void raw_bind_netif (struct raw_pcb *pcb, const struct netif *netif)
                   
                  err_t raw_connect (struct raw_pcb *pcb, const ip_addr_t *ipaddr)
                   
                  void raw_disconnect (struct raw_pcb *pcb)
                   
                  void raw_recv (struct raw_pcb *pcb, raw_recv_fn recv, void *recv_arg)
                   
                  err_t raw_sendto (struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *ipaddr)
                   
                  err_t raw_sendto_if_src (struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, struct netif *netif, const ip_addr_t *src_ip)
                   
                  err_t raw_send (struct raw_pcb *pcb, struct pbuf *p)
                   
                  void raw_remove (struct raw_pcb *pcb)
                   
                  struct raw_pcbraw_new (u8_t proto)
                   
                  struct raw_pcbraw_new_ip_type (u8_t type, u8_t proto)
                   
                  void raw_netif_ip_addr_changed (const ip_addr_t *old_addr, const ip_addr_t *new_addr)
                   
                  +

                  Detailed Description

                  +

                  Implementation of raw protocol PCBs for low-level handling of different types of protocols besides (or overriding) those already available in lwIP.
                  +See also RAW

                  +

                  Function Documentation

                  + +

                  ◆ raw_input()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  raw_input_state_t raw_input (struct pbufp,
                  struct netifinp 
                  )
                  +
                  +

                  Determine if in incoming IP packet is covered by a RAW PCB and if so, pass it to a user-provided receive callback function.

                  +

                  Given an incoming IP datagram (as a chain of pbufs) this function finds a corresponding RAW PCB and calls the corresponding receive callback function.

                  +
                  Parameters
                  + + + +
                  ppbuf to be demultiplexed to a RAW PCB.
                  inpnetwork interface on which the datagram was received.
                  +
                  +
                  +
                  Returns
                  - 1 if the packet has been eaten by a RAW PCB receive callback function. The caller MAY NOT not reference the packet any longer, and MAY NOT call pbuf_free().
                  +
                  +- 0 if packet is not eaten (pbuf is still referenced by the caller).
                  + +
                  +
                  + +

                  ◆ raw_netif_ip_addr_changed()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void raw_netif_ip_addr_changed (const ip_addr_told_addr,
                  const ip_addr_tnew_addr 
                  )
                  +
                  +

                  This function is called from netif.c when address is changed

                  +
                  Parameters
                  + + + +
                  old_addrIP address of the netif before change
                  new_addrIP address of the netif after change
                  +
                  +
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/raw_8c.js b/Libraries/LwIP/doc/doxygen/output/html/raw_8c.js new file mode 100644 index 0000000..fed5e65 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/raw_8c.js @@ -0,0 +1,16 @@ +var raw_8c = +[ + [ "raw_bind", "group__raw__raw.html#ga8576dbbc7f03797525d2cdb7ec3b9fe4", null ], + [ "raw_bind_netif", "group__raw__raw.html#gaa124ac8a9479aebefe2c953629df591a", null ], + [ "raw_connect", "group__raw__raw.html#ga31bb29c964d5e2f734e563485fc25168", null ], + [ "raw_disconnect", "group__raw__raw.html#ga7634c0306e2c6f8040e35f6547e8d3ef", null ], + [ "raw_input", "raw_8c.html#a03c4582d9ecf687e1f31d597c7889553", null ], + [ "raw_netif_ip_addr_changed", "raw_8c.html#a61dc42f18e34800643000e48be6543ab", null ], + [ "raw_new", "group__raw__raw.html#ga3217f096ea86728e011f91b249933e8f", null ], + [ "raw_new_ip_type", "group__raw__raw.html#ga3292b7ed2271ac29983edcef16dcbc11", null ], + [ "raw_recv", "group__raw__raw.html#gadf84e4e6911ce3c0d7f5669b6edac426", null ], + [ "raw_remove", "group__raw__raw.html#ga8db62f7d75f722a653b5368305a47e16", null ], + [ "raw_send", "group__raw__raw.html#gabbc2e7c7a1b4429f420562d4f31b3a9d", null ], + [ "raw_sendto", "group__raw__raw.html#ga09427456070fb610cc7795d23dedc159", null ], + [ "raw_sendto_if_src", "group__raw__raw.html#ga2fe3765ae938a3f7c53dc7051b7ab0b1", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/raw_8h.html b/Libraries/LwIP/doc/doxygen/output/html/raw_8h.html new file mode 100644 index 0000000..4a2a72b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/raw_8h.html @@ -0,0 +1,174 @@ + + + + + + + +lwIP: src/include/lwip/raw.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  raw.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/pbuf.h"
                  +#include "lwip/def.h"
                  +#include "lwip/ip.h"
                  +#include "lwip/ip_addr.h"
                  +#include "lwip/ip6_addr.h"
                  +
                  + + + +

                  +Data Structures

                  struct  raw_pcb
                   
                  + + + +

                  +Typedefs

                  typedef u8_t(* raw_recv_fn) (void *arg, struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *addr)
                   
                  + + + + + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  struct raw_pcbraw_new (u8_t proto)
                   
                  struct raw_pcbraw_new_ip_type (u8_t type, u8_t proto)
                   
                  void raw_remove (struct raw_pcb *pcb)
                   
                  err_t raw_bind (struct raw_pcb *pcb, const ip_addr_t *ipaddr)
                   
                  void raw_bind_netif (struct raw_pcb *pcb, const struct netif *netif)
                   
                  err_t raw_connect (struct raw_pcb *pcb, const ip_addr_t *ipaddr)
                   
                  void raw_disconnect (struct raw_pcb *pcb)
                   
                  err_t raw_sendto (struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *ipaddr)
                   
                  err_t raw_sendto_if_src (struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, struct netif *netif, const ip_addr_t *src_ip)
                   
                  err_t raw_send (struct raw_pcb *pcb, struct pbuf *p)
                   
                  void raw_recv (struct raw_pcb *pcb, raw_recv_fn recv, void *recv_arg)
                   
                  +

                  Detailed Description

                  +

                  raw API (to be used from TCPIP thread)
                  +See also RAW

                  +

                  Typedef Documentation

                  + +

                  ◆ raw_recv_fn

                  + +
                  +
                  + + + + +
                  typedef u8_t(* raw_recv_fn) (void *arg, struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *addr)
                  +
                  +

                  Function prototype for raw pcb receive callback functions.

                  Parameters
                  + + + + + +
                  arguser supplied argument (raw_pcb.recv_arg)
                  pcbthe raw_pcb which received data
                  pthe packet buffer that was received
                  addrthe remote IP address from which the packet was received
                  +
                  +
                  +
                  Returns
                  1 if the packet was 'eaten' (aka. deleted), 0 if the packet lives on If returning 1, the callback is responsible for freeing the pbuf if it's not used any more.
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/raw_8h.js b/Libraries/LwIP/doc/doxygen/output/html/raw_8h.js new file mode 100644 index 0000000..ff09a65 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/raw_8h.js @@ -0,0 +1,16 @@ +var raw_8h = +[ + [ "raw_pcb", "structraw__pcb.html", "structraw__pcb" ], + [ "raw_recv_fn", "raw_8h.html#a17edd059f34f45a770fe2fa458ecf4dd", null ], + [ "raw_bind", "group__raw__raw.html#ga8576dbbc7f03797525d2cdb7ec3b9fe4", null ], + [ "raw_bind_netif", "group__raw__raw.html#gaa124ac8a9479aebefe2c953629df591a", null ], + [ "raw_connect", "group__raw__raw.html#ga31bb29c964d5e2f734e563485fc25168", null ], + [ "raw_disconnect", "group__raw__raw.html#ga7634c0306e2c6f8040e35f6547e8d3ef", null ], + [ "raw_new", "group__raw__raw.html#ga3217f096ea86728e011f91b249933e8f", null ], + [ "raw_new_ip_type", "group__raw__raw.html#ga3292b7ed2271ac29983edcef16dcbc11", null ], + [ "raw_recv", "group__raw__raw.html#gadf84e4e6911ce3c0d7f5669b6edac426", null ], + [ "raw_remove", "group__raw__raw.html#ga8db62f7d75f722a653b5368305a47e16", null ], + [ "raw_send", "group__raw__raw.html#gabbc2e7c7a1b4429f420562d4f31b3a9d", null ], + [ "raw_sendto", "group__raw__raw.html#ga09427456070fb610cc7795d23dedc159", null ], + [ "raw_sendto_if_src", "group__raw__raw.html#ga2fe3765ae938a3f7c53dc7051b7ab0b1", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/raw__priv_8h.html b/Libraries/LwIP/doc/doxygen/output/html/raw__priv_8h.html new file mode 100644 index 0000000..cd7f0a9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/raw__priv_8h.html @@ -0,0 +1,235 @@ + + + + + + + +lwIP: src/include/lwip/priv/raw_priv.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  raw_priv.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/raw.h"
                  +
                  + + + +

                  +Typedefs

                  typedef enum raw_input_state raw_input_state_t
                   
                  + + + +

                  +Enumerations

                  enum  raw_input_state
                   
                  + + + + + +

                  +Functions

                  raw_input_state_t raw_input (struct pbuf *p, struct netif *inp)
                   
                  void raw_netif_ip_addr_changed (const ip_addr_t *old_addr, const ip_addr_t *new_addr)
                   
                  +

                  Detailed Description

                  +

                  raw API internal implementations (do not use in application code)

                  +

                  Typedef Documentation

                  + +

                  ◆ raw_input_state_t

                  + +
                  +
                  + + + + +
                  typedef enum raw_input_state raw_input_state_t
                  +
                  +

                  return codes for raw_input

                  + +
                  +
                  +

                  Enumeration Type Documentation

                  + +

                  ◆ raw_input_state

                  + +
                  +
                  + + + + +
                  enum raw_input_state
                  +
                  +

                  return codes for raw_input

                  + +
                  +
                  +

                  Function Documentation

                  + +

                  ◆ raw_input()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  raw_input_state_t raw_input (struct pbufp,
                  struct netifinp 
                  )
                  +
                  +

                  Determine if in incoming IP packet is covered by a RAW PCB and if so, pass it to a user-provided receive callback function.

                  +

                  Given an incoming IP datagram (as a chain of pbufs) this function finds a corresponding RAW PCB and calls the corresponding receive callback function.

                  +
                  Parameters
                  + + + +
                  ppbuf to be demultiplexed to a RAW PCB.
                  inpnetwork interface on which the datagram was received.
                  +
                  +
                  +
                  Returns
                  - 1 if the packet has been eaten by a RAW PCB receive callback function. The caller MAY NOT not reference the packet any longer, and MAY NOT call pbuf_free().
                  +
                  +- 0 if packet is not eaten (pbuf is still referenced by the caller).
                  + +
                  +
                  + +

                  ◆ raw_netif_ip_addr_changed()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void raw_netif_ip_addr_changed (const ip_addr_told_addr,
                  const ip_addr_tnew_addr 
                  )
                  +
                  +

                  This function is called from netif.c when address is changed

                  +
                  Parameters
                  + + + +
                  old_addrIP address of the netif before change
                  new_addrIP address of the netif after change
                  +
                  +
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/raw__priv_8h.js b/Libraries/LwIP/doc/doxygen/output/html/raw__priv_8h.js new file mode 100644 index 0000000..e6b0296 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/raw__priv_8h.js @@ -0,0 +1,7 @@ +var raw__priv_8h = +[ + [ "raw_input_state_t", "raw__priv_8h.html#aebbdbaee89c38ad9c007a1d1a336e687", null ], + [ "raw_input_state", "raw__priv_8h.html#a2580ec946c4196127888d5405257866b", null ], + [ "raw_input", "raw__priv_8h.html#a03c4582d9ecf687e1f31d597c7889553", null ], + [ "raw_netif_ip_addr_changed", "raw__priv_8h.html#a61dc42f18e34800643000e48be6543ab", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/resize.js b/Libraries/LwIP/doc/doxygen/output/html/resize.js new file mode 100644 index 0000000..56e4a02 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/resize.js @@ -0,0 +1,114 @@ +function initResizable() +{ + var cookie_namespace = 'doxygen'; + var sidenav,navtree,content,header,collapsed,collapsedWidth=0,barWidth=6,desktop_vp=768,titleHeight; + + function readCookie(cookie) + { + var myCookie = cookie_namespace+"_"+cookie+"="; + if (document.cookie) { + var index = document.cookie.indexOf(myCookie); + if (index != -1) { + var valStart = index + myCookie.length; + var valEnd = document.cookie.indexOf(";", valStart); + if (valEnd == -1) { + valEnd = document.cookie.length; + } + var val = document.cookie.substring(valStart, valEnd); + return val; + } + } + return 0; + } + + function writeCookie(cookie, val, expiration) + { + if (val==undefined) return; + if (expiration == null) { + var date = new Date(); + date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week + expiration = date.toGMTString(); + } + document.cookie = cookie_namespace + "_" + cookie + "=" + val + "; expires=" + expiration+"; path=/"; + } + + function resizeWidth() + { + var windowWidth = $(window).width() + "px"; + var sidenavWidth = $(sidenav).outerWidth(); + content.css({marginLeft:parseInt(sidenavWidth)+"px"}); + writeCookie('width',sidenavWidth-barWidth, null); + } + + function restoreWidth(navWidth) + { + var windowWidth = $(window).width() + "px"; + content.css({marginLeft:parseInt(navWidth)+barWidth+"px"}); + sidenav.css({width:navWidth + "px"}); + } + + function resizeHeight() + { + var headerHeight = header.outerHeight(); + var footerHeight = footer.outerHeight(); + var windowHeight = $(window).height() - headerHeight - footerHeight; + content.css({height:windowHeight + "px"}); + navtree.css({height:windowHeight + "px"}); + sidenav.css({height:windowHeight + "px"}); + var width=$(window).width(); + if (width!=collapsedWidth) { + if (width=desktop_vp) { + if (!collapsed) { + collapseExpand(); + } + } else if (width>desktop_vp && collapsedWidth0) { + restoreWidth(0); + collapsed=true; + } + else { + var width = readCookie('width'); + if (width>200 && width<$(window).width()) { restoreWidth(width); } else { restoreWidth(200); } + collapsed=false; + } + } + + header = $("#top"); + sidenav = $("#side-nav"); + content = $("#doc-content"); + navtree = $("#nav-tree"); + footer = $("#nav-path"); + $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); + $(sidenav).resizable({ minWidth: 0 }); + $(window).resize(function() { resizeHeight(); }); + var device = navigator.userAgent.toLowerCase(); + var touch_device = device.match(/(iphone|ipod|ipad|android)/); + if (touch_device) { /* wider split bar for touch only devices */ + $(sidenav).css({ paddingRight:'20px' }); + $('.ui-resizable-e').css({ width:'20px' }); + $('#nav-sync').css({ right:'34px' }); + barWidth=20; + } + var width = readCookie('width'); + if (width) { restoreWidth(width); } else { resizeWidth(); } + resizeHeight(); + var url = location.href; + var i=url.indexOf("#"); + if (i>=0) window.location.hash=url.substr(i); + var _preventDefault = function(evt) { evt.preventDefault(); }; + $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); + $(".ui-resizable-handle").dblclick(collapseExpand); + $(window).load(resizeHeight); +} + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_0.html b/Libraries/LwIP/doc/doxygen/output/html/search/all_0.html new file mode 100644 index 0000000..f25360b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_0.js b/Libraries/LwIP/doc/doxygen/output/html/search/all_0.js new file mode 100644 index 0000000..d15c401 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['6lowpan_20over_20ble_20_28rfc7668_29',['6LoWPAN over BLE (RFC7668)',['../group__rfc7668if.html',1,'']]], + ['6lowpan_20_28rfc4944_29',['6LoWPAN (RFC4944)',['../group__sixlowpan.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_1.html b/Libraries/LwIP/doc/doxygen/output/html/search/all_1.html new file mode 100644 index 0000000..b13f0f7 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_1.js b/Libraries/LwIP/doc/doxygen/output/html/search/all_1.js new file mode 100644 index 0000000..f3738f2 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_1.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['_5fhoplim',['_hoplim',['../structip6__hdr.html#af9cbfa5fa280a7a982a1c6268fa13a5a',1,'ip6_hdr']]], + ['_5flwiperf_5fsettings',['_lwiperf_settings',['../struct__lwiperf__settings.html',1,'']]], + ['_5flwiperf_5fstate_5ftcp',['_lwiperf_state_tcp',['../struct__lwiperf__state__tcp.html',1,'']]], + ['_5fnexth',['_nexth',['../structip6__hdr.html#abe3d612d4570864c922e18ed838292f6',1,'ip6_hdr']]], + ['_5fplen',['_plen',['../structip6__hdr.html#a9d225109d601ae8b34bab6ca3528fa94',1,'ip6_hdr']]], + ['_5fv_5ftc_5ffl',['_v_tc_fl',['../structip6__hdr.html#ad3b638f503a3f7e7724cf4c7b2c0a0b5',1,'ip6_hdr']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_10.html b/Libraries/LwIP/doc/doxygen/output/html/search/all_10.html new file mode 100644 index 0000000..d1345a1 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_10.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_10.js b/Libraries/LwIP/doc/doxygen/output/html/search/all_10.js new file mode 100644 index 0000000..0cbbe1d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_10.js @@ -0,0 +1,27 @@ +var searchData= +[ + ['options',['Options',['../group__bridgeif__opts.html',1,'']]], + ['options',['Options',['../group__httpd__opts.html',1,'']]], + ['overview',['Overview',['../index.html',1,'']]], + ['options_20_28lwipopts_2eh_29',['Options (lwipopts.h)',['../group__lwip__opts.html',1,'']]], + ['os_20mode_20_28tcpip_20thread_29',['OS mode (TCPIP thread)',['../group__lwip__os.html',1,'']]], + ['options',['Options',['../group__mdns__opts.html',1,'']]], + ['options',['Options',['../group__mqtt__opts.html',1,'']]], + ['options',['Options',['../group__netbiosns__opts.html',1,'']]], + ['offset',['offset',['../structapi__msg.html#a4bd9382dd42b18120803e246a0203353',1,'api_msg']]], + ['oid',['oid',['../structsnmp__varbind.html#ace3a9e4dcdc9a5ec79a20c84946418a4',1,'snmp_varbind::oid()'],['../structsnmp__node.html#ae7a3bb0eb49ac527d461be414937f271',1,'snmp_node::oid()']]], + ['old_5faddress',['old_address',['../structnetif__ext__callback__args__t_1_1ipv4__changed__s.html#a0f6e5c1318218d95f1d3dc8c29c30ade',1,'netif_ext_callback_args_t::ipv4_changed_s::old_address()'],['../structnetif__ext__callback__args__t_1_1ipv6__set__s.html#aafda237ad0c20d25fa2ad83d63051226',1,'netif_ext_callback_args_t::ipv6_set_s::old_address()']]], + ['old_5fstate',['old_state',['../structnetif__ext__callback__args__t_1_1ipv6__addr__state__changed__s.html#a9b58712e82a73803391523324e19a776',1,'netif_ext_callback_args_t::ipv6_addr_state_changed_s']]], + ['op_5fcompleted',['op_completed',['../structnetconn.html#a982506698a59f185ff3f16d1675ea4ae',1,'netconn']]], + ['open',['open',['../structtftp__context.html#ae70d64e8e20328cc492d766506df4cba',1,'tftp_context']]], + ['opt_2eh',['opt.h',['../opt_8h.html',1,'']]], + ['optimization_20hints',['Optimization hints',['../optimization.html',1,'']]], + ['original',['original',['../structpbuf__custom__ref.html#a135a1476908337d8073241fd7f68fa1d',1,'pbuf_custom_ref']]], + ['output',['output',['../structmqtt__client__s.html#a667c1dc7a6008055b63877acb06f333c',1,'mqtt_client_s::output()'],['../structnetif.html#a8e1dcfe65db487feecd244355f39215e',1,'netif::output()']]], + ['output_5fip6',['output_ip6',['../structnetif.html#ac38383379cff22c402156fec71c19617',1,'netif']]], + ['options',['Options',['../group__smtp__opts.html',1,'']]], + ['options',['Options',['../group__snmp__opts.html',1,'']]], + ['options',['Options',['../group__sntp__opts.html',1,'']]], + ['os_20abstraction_20layer',['OS abstraction layer',['../group__sys__os.html',1,'']]], + ['options',['Options',['../group__tftp__opts.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_11.html b/Libraries/LwIP/doc/doxygen/output/html/search/all_11.html new file mode 100644 index 0000000..2be8b71 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_11.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_11.js b/Libraries/LwIP/doc/doxygen/output/html/search/all_11.js new file mode 100644 index 0000000..8dd1312 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_11.js @@ -0,0 +1,107 @@ +var searchData= +[ + ['pbuf',['PBUF',['../group__lwip__opts__pbuf.html',1,'']]], + ['performance',['Performance',['../group__lwip__opts__perf.html',1,'']]], + ['pack_5fstruct_5fbegin',['PACK_STRUCT_BEGIN',['../group__compiler__abstraction.html#ga73199061891adf1b912d20835c7d5e96',1,'arch.h']]], + ['pack_5fstruct_5fend',['PACK_STRUCT_END',['../group__compiler__abstraction.html#ga465fef70f294e21cbf4ea51fc342f20e',1,'arch.h']]], + ['pack_5fstruct_5ffield',['PACK_STRUCT_FIELD',['../group__compiler__abstraction.html#gaab0b988124e37a978d9a88e7c1c778e0',1,'arch.h']]], + ['pack_5fstruct_5ffld_5f8',['PACK_STRUCT_FLD_8',['../group__compiler__abstraction.html#gaa8f75e4117374c2d09fbda5566e40b62',1,'arch.h']]], + ['pack_5fstruct_5ffld_5fs',['PACK_STRUCT_FLD_S',['../group__compiler__abstraction.html#gacc89e224363eb0ebca24b64d925c3cb7',1,'arch.h']]], + ['pack_5fstruct_5fstruct',['PACK_STRUCT_STRUCT',['../group__compiler__abstraction.html#ga33623da05bb55497534c3dc26ebebeb2',1,'arch.h']]], + ['pack_5fstruct_5fuse_5fincludes',['PACK_STRUCT_USE_INCLUDES',['../group__compiler__abstraction.html#ga57b90d36d8bea3798a5d1815945fd8ef',1,'arch.h']]], + ['parse_5foffset',['parse_offset',['../structmdns__packet.html#a4c3c3a28ac113b3ee40d5cf07d851f68',1,'mdns_packet']]], + ['pass',['pass',['../structsmtp__session.html#a7a5a3c00378ce076ce70236525afd431',1,'smtp_session']]], + ['passive_5fopen',['passive_open',['../structtcp__ext__arg__callbacks.html#a86b5816e8285378813963d09272b050a',1,'tcp_ext_arg_callbacks']]], + ['payload',['payload',['../structpbuf.html#a8d32dc3e964369d4eec638fc37fbc460',1,'pbuf::payload()'],['../structpbuf__rom.html#a5cd0dcc590038629644ad775d76230a1',1,'pbuf_rom::payload()']]], + ['pbuf',['pbuf',['../structpbuf.html',1,'pbuf'],['../structmdns__packet.html#a2ec02a67fd82f0df695e94745eddaf45',1,'mdns_packet::pbuf()'],['../structmdns__outpacket.html#a83d4504736f2bf315fc8b712c6a446e9',1,'mdns_outpacket::pbuf()'],['../structpbuf__custom.html#a100e338f13464e76b46896647b962ed8',1,'pbuf_custom::pbuf()'],['../group__pbuf.html',1,'(Global Namespace)']]], + ['pbuf_2ec',['pbuf.c',['../pbuf_8c.html',1,'']]], + ['pbuf_2eh',['pbuf.h',['../pbuf_8h.html',1,'']]], + ['pbuf_5fadd_5fheader',['pbuf_add_header',['../pbuf_8c.html#a32dc14bd88dcafa25e627ab18e801815',1,'pbuf_add_header(struct pbuf *p, size_t header_size_increment): pbuf.c'],['../pbuf_8h.html#a32dc14bd88dcafa25e627ab18e801815',1,'pbuf_add_header(struct pbuf *p, size_t header_size_increment): pbuf.c']]], + ['pbuf_5fadd_5fheader_5fforce',['pbuf_add_header_force',['../pbuf_8c.html#ad4ef8c5fbbd1447db04f8f73923e7dee',1,'pbuf_add_header_force(struct pbuf *p, size_t header_size_increment): pbuf.c'],['../pbuf_8h.html#ad4ef8c5fbbd1447db04f8f73923e7dee',1,'pbuf_add_header_force(struct pbuf *p, size_t header_size_increment): pbuf.c']]], + ['pbuf_5falloc',['pbuf_alloc',['../group__pbuf.html#gacfcb0a2af918658ba0afe36499c65f47',1,'pbuf_alloc(pbuf_layer layer, u16_t length, pbuf_type type): pbuf.c'],['../group__pbuf.html#gacfcb0a2af918658ba0afe36499c65f47',1,'pbuf_alloc(pbuf_layer l, u16_t length, pbuf_type type): pbuf.c']]], + ['pbuf_5falloc_5fflag_5fdata_5fcontiguous',['PBUF_ALLOC_FLAG_DATA_CONTIGUOUS',['../pbuf_8h.html#a426883d928f8f3e8fd066e616159d78f',1,'pbuf.h']]], + ['pbuf_5falloc_5fflag_5frx',['PBUF_ALLOC_FLAG_RX',['../pbuf_8h.html#a567a0dfa01b0e5540f9416a200ed163f',1,'pbuf.h']]], + ['pbuf_5falloc_5freference',['pbuf_alloc_reference',['../group__pbuf.html#ga4caa46c6d560d9d0da2be845bc9c2fab',1,'pbuf_alloc_reference(void *payload, u16_t length, pbuf_type type): pbuf.c'],['../group__pbuf.html#ga4caa46c6d560d9d0da2be845bc9c2fab',1,'pbuf_alloc_reference(void *payload, u16_t length, pbuf_type type): pbuf.c']]], + ['pbuf_5falloced_5fcustom',['pbuf_alloced_custom',['../group__pbuf.html#ga90fa2bbf6ea4a263ee8f7b77c75683c2',1,'pbuf_alloced_custom(pbuf_layer l, u16_t length, pbuf_type type, struct pbuf_custom *p, void *payload_mem, u16_t payload_mem_len): pbuf.c'],['../group__pbuf.html#ga90fa2bbf6ea4a263ee8f7b77c75683c2',1,'pbuf_alloced_custom(pbuf_layer l, u16_t length, pbuf_type type, struct pbuf_custom *p, void *payload_mem, u16_t payload_mem_len): pbuf.c']]], + ['pbuf_5fcat',['pbuf_cat',['../group__pbuf.html#ga82429084fe29015509c9b4a072707cd4',1,'pbuf_cat(struct pbuf *h, struct pbuf *t): pbuf.c'],['../group__pbuf.html#ga82429084fe29015509c9b4a072707cd4',1,'pbuf_cat(struct pbuf *head, struct pbuf *tail): pbuf.c']]], + ['pbuf_5fchain',['pbuf_chain',['../group__pbuf.html#ga831c9a72bda1d3bd4c7b96f5a0e3b891',1,'pbuf_chain(struct pbuf *h, struct pbuf *t): pbuf.c'],['../group__pbuf.html#ga831c9a72bda1d3bd4c7b96f5a0e3b891',1,'pbuf_chain(struct pbuf *head, struct pbuf *tail): pbuf.c']]], + ['pbuf_5fclen',['pbuf_clen',['../pbuf_8c.html#a5df7ac5ae59012fe9aeddba375a72190',1,'pbuf_clen(const struct pbuf *p): pbuf.c'],['../pbuf_8h.html#a5df7ac5ae59012fe9aeddba375a72190',1,'pbuf_clen(const struct pbuf *p): pbuf.c']]], + ['pbuf_5fclone',['pbuf_clone',['../group__pbuf.html#gafdb04fb0f37f0422fd44ec0fcec8ebd0',1,'pbuf_clone(pbuf_layer layer, pbuf_type type, struct pbuf *p): pbuf.c'],['../group__pbuf.html#gafdb04fb0f37f0422fd44ec0fcec8ebd0',1,'pbuf_clone(pbuf_layer l, pbuf_type type, struct pbuf *p): pbuf.c']]], + ['pbuf_5fcoalesce',['pbuf_coalesce',['../group__pbuf.html#ga54ac7b116c6f53c704cbf74f35a8b35c',1,'pbuf_coalesce(struct pbuf *p, pbuf_layer layer): pbuf.c'],['../group__pbuf.html#ga54ac7b116c6f53c704cbf74f35a8b35c',1,'pbuf_coalesce(struct pbuf *p, pbuf_layer layer): pbuf.c']]], + ['pbuf_5fcopy',['pbuf_copy',['../group__pbuf.html#gaba88511dee3df4b631fde691f421320d',1,'pbuf_copy(struct pbuf *p_to, const struct pbuf *p_from): pbuf.c'],['../group__pbuf.html#gaba88511dee3df4b631fde691f421320d',1,'pbuf_copy(struct pbuf *p_to, const struct pbuf *p_from): pbuf.c']]], + ['pbuf_5fcopy_5fpartial',['pbuf_copy_partial',['../group__pbuf.html#gac2f1f58fd36042e82af46f5015720899',1,'pbuf_copy_partial(const struct pbuf *buf, void *dataptr, u16_t len, u16_t offset): pbuf.c'],['../group__pbuf.html#gac2f1f58fd36042e82af46f5015720899',1,'pbuf_copy_partial(const struct pbuf *p, void *dataptr, u16_t len, u16_t offset): pbuf.c']]], + ['pbuf_5fcustom',['pbuf_custom',['../structpbuf__custom.html',1,'']]], + ['pbuf_5fcustom_5fref',['pbuf_custom_ref',['../structpbuf__custom__ref.html',1,'']]], + ['pbuf_5fdebug',['PBUF_DEBUG',['../group__lwip__opts__debugmsg.html#ga5c3d44a0ec3bb8bd66f776c70d5c6a6c',1,'opt.h']]], + ['pbuf_5fdechain',['pbuf_dechain',['../pbuf_8c.html#abf3d29c4f43986b4cb5eb314d5b9729d',1,'pbuf_dechain(struct pbuf *p): pbuf.c'],['../pbuf_8h.html#abf3d29c4f43986b4cb5eb314d5b9729d',1,'pbuf_dechain(struct pbuf *p): pbuf.c']]], + ['pbuf_5fflag_5fis_5fcustom',['PBUF_FLAG_IS_CUSTOM',['../pbuf_8h.html#af78a7e1815dc0e31884d095b666d997f',1,'pbuf.h']]], + ['pbuf_5fflag_5fllbcast',['PBUF_FLAG_LLBCAST',['../pbuf_8h.html#a6772c16662bbb78597399add086500c0',1,'pbuf.h']]], + ['pbuf_5fflag_5fllmcast',['PBUF_FLAG_LLMCAST',['../pbuf_8h.html#ac0d56cde47aca24ef410d730d7c89887',1,'pbuf.h']]], + ['pbuf_5fflag_5fmcastloop',['PBUF_FLAG_MCASTLOOP',['../pbuf_8h.html#ab8ad153151a8c157335d9c0cedc007e6',1,'pbuf.h']]], + ['pbuf_5fflag_5fpush',['PBUF_FLAG_PUSH',['../pbuf_8h.html#a018a6499e357f8a1373321f802a82930',1,'pbuf.h']]], + ['pbuf_5fflag_5ftcp_5ffin',['PBUF_FLAG_TCP_FIN',['../pbuf_8h.html#a36a915aa2f6a188baa2862881407971e',1,'pbuf.h']]], + ['pbuf_5ffree',['pbuf_free',['../group__pbuf.html#gab0dd696fb4b6bc65e548944584f1738b',1,'pbuf_free(struct pbuf *p): pbuf.c'],['../group__pbuf.html#gab0dd696fb4b6bc65e548944584f1738b',1,'pbuf_free(struct pbuf *p): pbuf.c']]], + ['pbuf_5ffree_5fcallback',['pbuf_free_callback',['../tcpip_8c.html#a5cdcb6b784fe0e8736a5b31a5cfbed6c',1,'pbuf_free_callback(struct pbuf *p): tcpip.c'],['../tcpip_8h.html#a5cdcb6b784fe0e8736a5b31a5cfbed6c',1,'pbuf_free_callback(struct pbuf *p): tcpip.c']]], + ['pbuf_5ffree_5fcustom_5ffn',['pbuf_free_custom_fn',['../pbuf_8h.html#a6d285ce1d910f25e511c8c38532a1dce',1,'pbuf.h']]], + ['pbuf_5ffree_5fheader',['pbuf_free_header',['../pbuf_8c.html#a25a3b8edc783896b03819a966d00845e',1,'pbuf_free_header(struct pbuf *q, u16_t size): pbuf.c'],['../pbuf_8h.html#a25a3b8edc783896b03819a966d00845e',1,'pbuf_free_header(struct pbuf *q, u16_t size): pbuf.c']]], + ['pbuf_5fget_5fat',['pbuf_get_at',['../group__pbuf.html#ga6d803d9945bffb7ad97743f2fa503da6',1,'pbuf_get_at(const struct pbuf *p, u16_t offset): pbuf.c'],['../group__pbuf.html#ga6d803d9945bffb7ad97743f2fa503da6',1,'pbuf_get_at(const struct pbuf *p, u16_t offset): pbuf.c']]], + ['pbuf_5fget_5fcontiguous',['pbuf_get_contiguous',['../group__pbuf.html#gad0357ae0be17b2aacd0c301cdc86fc39',1,'pbuf_get_contiguous(const struct pbuf *p, void *buffer, size_t bufsize, u16_t len, u16_t offset): pbuf.c'],['../group__pbuf.html#gad0357ae0be17b2aacd0c301cdc86fc39',1,'pbuf_get_contiguous(const struct pbuf *p, void *buffer, size_t bufsize, u16_t len, u16_t offset): pbuf.c']]], + ['pbuf_5fheader',['pbuf_header',['../pbuf_8c.html#a0f81deff4a0e6e8e0ff161a7b9871449',1,'pbuf_header(struct pbuf *p, s16_t header_size_increment): pbuf.c'],['../pbuf_8h.html#aaa17c1951cf2d207b6adfd3947d91f00',1,'pbuf_header(struct pbuf *p, s16_t header_size): pbuf.c']]], + ['pbuf_5fheader_5fforce',['pbuf_header_force',['../pbuf_8c.html#ad0e64d6fbc423593461063da97da9ce6',1,'pbuf_header_force(struct pbuf *p, s16_t header_size_increment): pbuf.c'],['../pbuf_8h.html#a27480c41c34021d4417691d327163626',1,'pbuf_header_force(struct pbuf *p, s16_t header_size): pbuf.c']]], + ['pbuf_5fip',['PBUF_IP',['../group__pbuf.html#ggaee1baa59bb2f85ba575b5a8619ac1ebfafcc1e506061ba69dfa142eb6b3da5f13',1,'pbuf.h']]], + ['pbuf_5flayer',['pbuf_layer',['../group__pbuf.html#gaee1baa59bb2f85ba575b5a8619ac1ebf',1,'pbuf.h']]], + ['pbuf_5flink',['PBUF_LINK',['../group__pbuf.html#ggaee1baa59bb2f85ba575b5a8619ac1ebfab4de441e737330558b609a990cd17346',1,'pbuf.h']]], + ['pbuf_5flink_5fencapsulation_5fhlen',['PBUF_LINK_ENCAPSULATION_HLEN',['../group__lwip__opts__pbuf.html#ga6e1ba1875ae5168a17b53d83597bc1de',1,'opt.h']]], + ['pbuf_5flink_5fhlen',['PBUF_LINK_HLEN',['../group__lwip__opts__pbuf.html#ga35998a3d56af9940e6a80bb372597685',1,'opt.h']]], + ['pbuf_5fmemcmp',['pbuf_memcmp',['../group__pbuf.html#ga2170ccbbb13238380dbb203ee1b85974',1,'pbuf_memcmp(const struct pbuf *p, u16_t offset, const void *s2, u16_t n): pbuf.c'],['../group__pbuf.html#ga2170ccbbb13238380dbb203ee1b85974',1,'pbuf_memcmp(const struct pbuf *p, u16_t offset, const void *s2, u16_t n): pbuf.c']]], + ['pbuf_5fmemfind',['pbuf_memfind',['../group__pbuf.html#ga18c164a6e4a24d89ea9eb7571a886448',1,'pbuf_memfind(const struct pbuf *p, const void *mem, u16_t mem_len, u16_t start_offset): pbuf.c'],['../group__pbuf.html#ga18c164a6e4a24d89ea9eb7571a886448',1,'pbuf_memfind(const struct pbuf *p, const void *mem, u16_t mem_len, u16_t start_offset): pbuf.c']]], + ['pbuf_5fneeds_5fcopy',['PBUF_NEEDS_COPY',['../group__pbuf.html#ga894d91d811fd986f3cc3da828fa7beb3',1,'pbuf.h']]], + ['pbuf_5fpool',['PBUF_POOL',['../group__pbuf.html#ggab7e0e32fcc292c0d7107721766ed92fbae969347127387b9b59a23ccd24b76d21',1,'pbuf.h']]], + ['pbuf_5fpool_5fbufsize',['PBUF_POOL_BUFSIZE',['../group__lwip__opts__pbuf.html#gae61f4491d56e805e79b79eb5d35a00e5',1,'opt.h']]], + ['pbuf_5fpool_5ffree_5fooseq',['PBUF_POOL_FREE_OOSEQ',['../pbuf_8h.html#ac54b0f161128a32c7419c33b893a5106',1,'pbuf.h']]], + ['pbuf_5fpool_5fsize',['PBUF_POOL_SIZE',['../group__lwip__opts__memp.html#ga50eaadc4cad0716410332691e382c38a',1,'opt.h']]], + ['pbuf_5fput_5fat',['pbuf_put_at',['../group__pbuf.html#gaf76863707dc02993eae116574b1ea03f',1,'pbuf_put_at(struct pbuf *p, u16_t offset, u8_t data): pbuf.c'],['../group__pbuf.html#gaf76863707dc02993eae116574b1ea03f',1,'pbuf_put_at(struct pbuf *p, u16_t offset, u8_t data): pbuf.c']]], + ['pbuf_5fram',['PBUF_RAM',['../group__pbuf.html#ggab7e0e32fcc292c0d7107721766ed92fbac5e9f28455bca98944a030d4b84ecfab',1,'pbuf.h']]], + ['pbuf_5fraw',['PBUF_RAW',['../group__pbuf.html#ggaee1baa59bb2f85ba575b5a8619ac1ebfa21116654fbab6d5a4dfeb87a1bb8f0ba',1,'pbuf.h']]], + ['pbuf_5fraw_5ftx',['PBUF_RAW_TX',['../group__pbuf.html#ggaee1baa59bb2f85ba575b5a8619ac1ebfa0ff039585f05f9208bcb66c2d37783e2',1,'pbuf.h']]], + ['pbuf_5frealloc',['pbuf_realloc',['../group__pbuf.html#ga50abfe830a33a1a47a562febee66015d',1,'pbuf_realloc(struct pbuf *p, u16_t new_len): pbuf.c'],['../group__pbuf.html#ga50abfe830a33a1a47a562febee66015d',1,'pbuf_realloc(struct pbuf *p, u16_t size): pbuf.c']]], + ['pbuf_5fref',['pbuf_ref',['../group__pbuf.html#ga77f6bbd69e45e542014d9c547c7da74e',1,'pbuf_ref(struct pbuf *p): pbuf.c'],['../group__pbuf.html#ga77f6bbd69e45e542014d9c547c7da74e',1,'pbuf_ref(struct pbuf *p): pbuf.c'],['../group__pbuf.html#ggab7e0e32fcc292c0d7107721766ed92fbac9b6ba960fdea6f2e8f35c8313b77e4e',1,'PBUF_REF(): pbuf.h']]], + ['pbuf_5fremove_5fheader',['pbuf_remove_header',['../pbuf_8c.html#aca0cd8b3f08fbb5e35bc91a663083cc1',1,'pbuf_remove_header(struct pbuf *p, size_t header_size_decrement): pbuf.c'],['../pbuf_8h.html#ab65da7cd8f7449b3b2e57d7fa1a74ef4',1,'pbuf_remove_header(struct pbuf *p, size_t header_size): pbuf.c']]], + ['pbuf_5from',['pbuf_rom',['../structpbuf__rom.html',1,'pbuf_rom'],['../group__pbuf.html#ggab7e0e32fcc292c0d7107721766ed92fbac120b0fe39efe35bb682e4aa3b82e2c9',1,'PBUF_ROM(): pbuf.h']]], + ['pbuf_5fskip',['pbuf_skip',['../group__pbuf.html#ga6a961522d81f0327aaf4d4ee6d96c583',1,'pbuf_skip(struct pbuf *in, u16_t in_offset, u16_t *out_offset): pbuf.c'],['../group__pbuf.html#ga6a961522d81f0327aaf4d4ee6d96c583',1,'pbuf_skip(struct pbuf *in, u16_t in_offset, u16_t *out_offset): pbuf.c']]], + ['pbuf_5fstrstr',['pbuf_strstr',['../pbuf_8c.html#a9ba3f7b705309ceadb147692fd5a1c7d',1,'pbuf_strstr(const struct pbuf *p, const char *substr): pbuf.c'],['../pbuf_8h.html#a9ba3f7b705309ceadb147692fd5a1c7d',1,'pbuf_strstr(const struct pbuf *p, const char *substr): pbuf.c']]], + ['pbuf_5ftake',['pbuf_take',['../group__pbuf.html#gad1e31e370271335b197272af2724ca85',1,'pbuf_take(struct pbuf *buf, const void *dataptr, u16_t len): pbuf.c'],['../group__pbuf.html#gad1e31e370271335b197272af2724ca85',1,'pbuf_take(struct pbuf *buf, const void *dataptr, u16_t len): pbuf.c']]], + ['pbuf_5ftake_5fat',['pbuf_take_at',['../group__pbuf.html#gae1cf2bf7454ff87ff377b0b2262f9b44',1,'pbuf_take_at(struct pbuf *buf, const void *dataptr, u16_t len, u16_t offset): pbuf.c'],['../group__pbuf.html#gae1cf2bf7454ff87ff377b0b2262f9b44',1,'pbuf_take_at(struct pbuf *buf, const void *dataptr, u16_t len, u16_t offset): pbuf.c']]], + ['pbuf_5ftransport',['PBUF_TRANSPORT',['../group__pbuf.html#ggaee1baa59bb2f85ba575b5a8619ac1ebfa2ded3594a3977f8bf9cf09552be327b5',1,'pbuf.h']]], + ['pbuf_5ftry_5fget_5fat',['pbuf_try_get_at',['../group__pbuf.html#ga839f342803b0cf89049744124c5a98ad',1,'pbuf_try_get_at(const struct pbuf *p, u16_t offset): pbuf.c'],['../group__pbuf.html#ga839f342803b0cf89049744124c5a98ad',1,'pbuf_try_get_at(const struct pbuf *p, u16_t offset): pbuf.c']]], + ['pbuf_5ftype',['pbuf_type',['../group__pbuf.html#gab7e0e32fcc292c0d7107721766ed92fb',1,'pbuf.h']]], + ['pbuf_5ftype_5falloc_5fsrc_5fmask',['PBUF_TYPE_ALLOC_SRC_MASK',['../pbuf_8h.html#a97d4db8e0f127f61af0016c184c865ca',1,'pbuf.h']]], + ['pbuf_5ftype_5falloc_5fsrc_5fmask_5fapp_5fmax',['PBUF_TYPE_ALLOC_SRC_MASK_APP_MAX',['../pbuf_8h.html#aad686ef346759a221abdb45f64649816',1,'pbuf.h']]], + ['pbuf_5ftype_5falloc_5fsrc_5fmask_5fapp_5fmin',['PBUF_TYPE_ALLOC_SRC_MASK_APP_MIN',['../pbuf_8h.html#aa1f62ba9dc5d462e67e33c4be64c601a',1,'pbuf.h']]], + ['pbuf_5ftype_5fflag_5fdata_5fvolatile',['PBUF_TYPE_FLAG_DATA_VOLATILE',['../pbuf_8h.html#a02789ca67766def65000b58f7fe7d03b',1,'pbuf.h']]], + ['pbuf_5ftype_5fflag_5fstruct_5fdata_5fcontiguous',['PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS',['../pbuf_8h.html#a49ab2c0662378f268ed8209bd54aaedf',1,'pbuf.h']]], + ['pc',['pc',['../structpbuf__custom__ref.html#af5884b6a7031d73406cb9596a51382b7',1,'pbuf_custom_ref']]], + ['pcb',['pcb',['../structnetconn.html#a2af6773c9f6ee91e7f462dd8acc07de6',1,'netconn']]], + ['pend_5freq_5fqueue',['pend_req_queue',['../structmqtt__client__s.html#a1897eeefe64f9e2d2d953adca858f439',1,'mqtt_client_s']]], + ['pending_5ferr',['pending_err',['../structnetconn.html#a2a54e90fa370cf0df46dfd0b97f1cce7',1,'netconn']]], + ['performance_20measurement',['Performance measurement',['../group__perf.html',1,'']]], + ['period_5fof_5fstatistics',['period_of_statistics',['../structnetbios__answer.html#a31ec9ea28b5801b9bb5f1b240d3412de',1,'netbios_answer']]], + ['pkt_5fid',['pkt_id',['../structmqtt__request__t.html#af2dc3cd85cdad25b9b3e1534ecc0cb58',1,'mqtt_request_t']]], + ['pkt_5fid_5fseq',['pkt_id_seq',['../structmqtt__client__s.html#ab4100f6e0867c212d5923f10024f2e32',1,'mqtt_client_s']]], + ['poll',['poll',['../group__socket.html#ga80ae38841b0e64e60618cd8bf857f617',1,'sockets.h']]], + ['poll_5ffds',['poll_fds',['../structlwip__select__cb.html#ae39fc1bef3938380d15085e0141639de',1,'lwip_select_cb']]], + ['poll_5fnfds',['poll_nfds',['../structlwip__select__cb.html#a39c4980c261380481f79af2b536ebfba',1,'lwip_select_cb']]], + ['port',['port',['../structmdns__service.html#abbf317cde8fb7ba8d834ad9746dd780c',1,'mdns_service']]], + ['ppp',['PPP',['../group__ppp.html',1,'']]], + ['pppapi_2ec',['pppapi.c',['../pppapi_8c.html',1,'']]], + ['pppol2tp_2ec',['pppol2tp.c',['../pppol2tp_8c.html',1,'']]], + ['pppol2tp_2eh',['pppol2tp.h',['../pppol2tp_8h.html',1,'']]], + ['pppos_2ec',['pppos.c',['../pppos_8c.html',1,'']]], + ['pppos_2eh',['pppos.h',['../pppos_8h.html',1,'']]], + ['prev',['prev',['../structmem.html#a9d7722ed10adf965fa98563d502f98ac',1,'mem::prev()'],['../structsnmp__varbind.html#a365abcc1f80d28dc8ffd07193099c760',1,'snmp_varbind::prev()'],['../structlwip__select__cb.html#a21a98e316bb7001d8750b20f5a7d0aa7',1,'lwip_select_cb::prev()']]], + ['probes_5fsent',['probes_sent',['../structmdns__host.html#ac8f6e3c6e1251bf73f043e489c840922',1,'mdns_host']]], + ['probing_5fstate',['probing_state',['../structmdns__host.html#af9ced31c35de6a281e5b13f01e5aae61',1,'mdns_host']]], + ['proto',['proto',['../structmdns__service.html#aa9f2e0bb67d3848152e6076e92e8018d',1,'mdns_service']]], + ['ptr',['ptr',['../structnetvector.html#a523362737ea7764f9aaa73a050a0b983',1,'netvector']]], + ['porting_20_28system_20abstraction_20layer_29',['Porting (system abstraction layer)',['../group__sys__layer.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_12.html b/Libraries/LwIP/doc/doxygen/output/html/search/all_12.html new file mode 100644 index 0000000..13c5263 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_12.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_12.js b/Libraries/LwIP/doc/doxygen/output/html/search/all_12.js new file mode 100644 index 0000000..8d63e1c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_12.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['q',['q',['../structnd6__neighbor__cache__entry.html#a830674446a45eb200d38a45fbdd5c5df',1,'nd6_neighbor_cache_entry']]], + ['query_5fname',['query_name',['../structnetbios__answer.html#aa024ce7e0e233c42393f5c3c378d3f9b',1,'netbios_answer']]], + ['questions',['questions',['../structmdns__packet.html#a09211e78f7f773c492b5856d31423699',1,'mdns_packet::questions()'],['../structmdns__outpacket.html#a0d402cde040728d361dec8f7d86f504c',1,'mdns_outpacket::questions()']]], + ['questions_5fleft',['questions_left',['../structmdns__packet.html#afdb9c14dd0c915119b8adb584381a437',1,'mdns_packet']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_13.html b/Libraries/LwIP/doc/doxygen/output/html/search/all_13.html new file mode 100644 index 0000000..b4a8bca --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_13.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_13.js b/Libraries/LwIP/doc/doxygen/output/html/search/all_13.js new file mode 100644 index 0000000..636f9e9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_13.js @@ -0,0 +1,61 @@ +var searchData= +[ + ['reporting_20bugs',['Reporting bugs',['../bugs.html',1,'']]], + ['raw',['RAW',['../group__lwip__opts__raw.html',1,'']]], + ['r',['r',['../structapi__msg.html#aebd72e07e711e7135294563b82c98cdf',1,'api_msg']]], + ['ram_5fheap',['ram_heap',['../mem_8c.html#a6da602f2bbf1d555556f9260b3b8ad5f',1,'mem.c']]], + ['raw_2ec',['raw.c',['../raw_8c.html',1,'']]], + ['raw_2eh',['raw.h',['../raw_8h.html',1,'']]], + ['raw_5fbind',['raw_bind',['../group__raw__raw.html#ga8576dbbc7f03797525d2cdb7ec3b9fe4',1,'raw_bind(struct raw_pcb *pcb, const ip_addr_t *ipaddr): raw.c'],['../group__raw__raw.html#ga8576dbbc7f03797525d2cdb7ec3b9fe4',1,'raw_bind(struct raw_pcb *pcb, const ip_addr_t *ipaddr): raw.c']]], + ['raw_5fbind_5fnetif',['raw_bind_netif',['../group__raw__raw.html#gaa124ac8a9479aebefe2c953629df591a',1,'raw_bind_netif(struct raw_pcb *pcb, const struct netif *netif): raw.c'],['../group__raw__raw.html#gaa124ac8a9479aebefe2c953629df591a',1,'raw_bind_netif(struct raw_pcb *pcb, const struct netif *netif): raw.c']]], + ['raw_5fconnect',['raw_connect',['../group__raw__raw.html#ga31bb29c964d5e2f734e563485fc25168',1,'raw_connect(struct raw_pcb *pcb, const ip_addr_t *ipaddr): raw.c'],['../group__raw__raw.html#ga31bb29c964d5e2f734e563485fc25168',1,'raw_connect(struct raw_pcb *pcb, const ip_addr_t *ipaddr): raw.c']]], + ['raw_5fdebug',['RAW_DEBUG',['../group__lwip__opts__debugmsg.html#gaf0551bef83c0fc1baa57cf339d220e25',1,'opt.h']]], + ['raw_5fdisconnect',['raw_disconnect',['../group__raw__raw.html#ga7634c0306e2c6f8040e35f6547e8d3ef',1,'raw_disconnect(struct raw_pcb *pcb): raw.c'],['../group__raw__raw.html#ga7634c0306e2c6f8040e35f6547e8d3ef',1,'raw_disconnect(struct raw_pcb *pcb): raw.c']]], + ['raw_5finput',['raw_input',['../raw_8c.html#a03c4582d9ecf687e1f31d597c7889553',1,'raw_input(struct pbuf *p, struct netif *inp): raw.c'],['../raw__priv_8h.html#a03c4582d9ecf687e1f31d597c7889553',1,'raw_input(struct pbuf *p, struct netif *inp): raw.c']]], + ['raw_5finput_5fstate',['raw_input_state',['../raw__priv_8h.html#a2580ec946c4196127888d5405257866b',1,'raw_priv.h']]], + ['raw_5finput_5fstate_5ft',['raw_input_state_t',['../raw__priv_8h.html#aebbdbaee89c38ad9c007a1d1a336e687',1,'raw_priv.h']]], + ['raw_5fnetif_5fip_5faddr_5fchanged',['raw_netif_ip_addr_changed',['../raw_8c.html#a61dc42f18e34800643000e48be6543ab',1,'raw_netif_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr): raw.c'],['../raw__priv_8h.html#a61dc42f18e34800643000e48be6543ab',1,'raw_netif_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr): raw.c']]], + ['raw_5fnew',['raw_new',['../group__raw__raw.html#ga3217f096ea86728e011f91b249933e8f',1,'raw_new(u8_t proto): raw.c'],['../group__raw__raw.html#ga3217f096ea86728e011f91b249933e8f',1,'raw_new(u8_t proto): raw.c']]], + ['raw_5fnew_5fip_5ftype',['raw_new_ip_type',['../group__raw__raw.html#ga3292b7ed2271ac29983edcef16dcbc11',1,'raw_new_ip_type(u8_t type, u8_t proto): raw.c'],['../group__raw__raw.html#ga3292b7ed2271ac29983edcef16dcbc11',1,'raw_new_ip_type(u8_t type, u8_t proto): raw.c']]], + ['raw_5fpcb',['raw_pcb',['../structraw__pcb.html',1,'']]], + ['raw_5fpriv_2eh',['raw_priv.h',['../raw__priv_8h.html',1,'']]], + ['raw',['RAW',['../group__raw__raw.html',1,'']]], + ['raw_5frecv',['raw_recv',['../group__raw__raw.html#gadf84e4e6911ce3c0d7f5669b6edac426',1,'raw_recv(struct raw_pcb *pcb, raw_recv_fn recv, void *recv_arg): raw.c'],['../group__raw__raw.html#gadf84e4e6911ce3c0d7f5669b6edac426',1,'raw_recv(struct raw_pcb *pcb, raw_recv_fn recv, void *recv_arg): raw.c']]], + ['raw_5frecv_5ffn',['raw_recv_fn',['../raw_8h.html#a17edd059f34f45a770fe2fa458ecf4dd',1,'raw.h']]], + ['raw_5fremove',['raw_remove',['../group__raw__raw.html#ga8db62f7d75f722a653b5368305a47e16',1,'raw_remove(struct raw_pcb *pcb): raw.c'],['../group__raw__raw.html#ga8db62f7d75f722a653b5368305a47e16',1,'raw_remove(struct raw_pcb *pcb): raw.c']]], + ['raw_5fsend',['raw_send',['../group__raw__raw.html#gabbc2e7c7a1b4429f420562d4f31b3a9d',1,'raw_send(struct raw_pcb *pcb, struct pbuf *p): raw.c'],['../group__raw__raw.html#gabbc2e7c7a1b4429f420562d4f31b3a9d',1,'raw_send(struct raw_pcb *pcb, struct pbuf *p): raw.c']]], + ['raw_5fsendto',['raw_sendto',['../group__raw__raw.html#ga09427456070fb610cc7795d23dedc159',1,'raw_sendto(struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *ipaddr): raw.c'],['../group__raw__raw.html#ga09427456070fb610cc7795d23dedc159',1,'raw_sendto(struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *ipaddr): raw.c']]], + ['raw_5fsendto_5fif_5fsrc',['raw_sendto_if_src',['../group__raw__raw.html#ga2fe3765ae938a3f7c53dc7051b7ab0b1',1,'raw_sendto_if_src(struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, struct netif *netif, const ip_addr_t *src_ip): raw.c'],['../group__raw__raw.html#ga2fe3765ae938a3f7c53dc7051b7ab0b1',1,'raw_sendto_if_src(struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, struct netif *netif, const ip_addr_t *src_ip): raw.c']]], + ['raw_5fttl',['RAW_TTL',['../group__lwip__opts__raw.html#ga36e3ffa66073ca0d27d11c422778249c',1,'opt.h']]], + ['rcvevent',['rcvevent',['../structlwip__sock.html#af40d67cbaef4318d26e560988b6e1b3a',1,'lwip_sock']]], + ['reachability',['reachability',['../structsntp__server.html#a2e9283bb8f94930fd2a2c3f24fc4b40d',1,'sntp_server']]], + ['read',['read',['../structtftp__context.html#a748e37df0c8b84b3adda78d603b9033c',1,'tftp_context::read()'],['../group__socket.html#ga822040573319cf87bfe6758d511be57f',1,'read(): sockets.h']]], + ['readset',['readset',['../structlwip__select__cb.html#a8694a2ce0dd5f91be84056982b96978e',1,'lwip_select_cb']]], + ['readv',['readv',['../group__socket.html#ga86788b3c690d38699fdbaea523ddec9d',1,'sockets.h']]], + ['reass_5flist',['reass_list',['../structlowpan6__ieee802154__data.html#a8c33e7a2026e6e93a2085f3d14378d35',1,'lowpan6_ieee802154_data']]], + ['recv',['recv',['../structraw__pcb.html#a963b023239ad97c05536046ed7058a10',1,'raw_pcb::recv()'],['../structudp__pcb.html#ac05dee75a3d6666267f7e626c2ec56a8',1,'udp_pcb::recv()'],['../group__socket.html#gadd7ae45df7c005619eb1126542231e9b',1,'recv(): sockets.h']]], + ['recv_5farg',['recv_arg',['../structudp__pcb.html#a11e4c40b8868aa40d923756a60598cab',1,'udp_pcb']]], + ['recv_5favail',['recv_avail',['../structnetconn.html#a05b15a28b0803bea3729b1da2047541e',1,'netconn']]], + ['recv_5fbufsize',['recv_bufsize',['../structnetconn.html#a6febc9717418ddba16f16e988061cfac',1,'netconn']]], + ['recv_5fbufsize_5fdefault',['RECV_BUFSIZE_DEFAULT',['../group__lwip__opts__socket.html#ga5dbd0a61f30ae6c6bfbda635095f138d',1,'opt.h']]], + ['recv_5funicast',['recv_unicast',['../structmdns__packet.html#a8659b4f582be0df84b6ae91308737377',1,'mdns_packet']]], + ['recvfrom',['recvfrom',['../group__socket.html#ga5e5f7bcda6562bae815e188ea1a81ecd',1,'sockets.h']]], + ['recvmbox',['recvmbox',['../structnetconn.html#a9f2bf6a3865b6a22a8a71ec2f3e770da',1,'netconn']]], + ['recvmsg',['recvmsg',['../group__socket.html#gaecfc7d524105e52604829c66ced752b8',1,'sockets.h']]], + ['redirect_5fheader',['redirect_header',['../structredirect__header.html',1,'']]], + ['ref',['ref',['../structpbuf.html#a62fe38eb0cf31027dc1fb9cbe7b55ba7',1,'pbuf']]], + ['reference',['reference',['../structsnmp__node__instance.html#a55f53419cd5b369b771153ca2598ebc5',1,'snmp_node_instance']]], + ['reference_5flen',['reference_len',['../structsnmp__node__instance.html#ad289957b34b4e55915fa79f37c4d9d54',1,'snmp_node_instance']]], + ['release_5finstance',['release_instance',['../structsnmp__node__instance.html#a20a256c54fab19a455ecf6deff76c6de',1,'snmp_node_instance']]], + ['remove_5fcallback',['remove_callback',['../structnetif.html#ae06deb532ead2e3009ba4e58aae6ca07',1,'netif']]], + ['rfc7668_5fif_5finit',['rfc7668_if_init',['../group__rfc7668if.html#ga3d940376bd983c14ffcc8d2580f3bdde',1,'rfc7668_if_init(struct netif *netif): lowpan6_ble.c'],['../group__rfc7668if.html#ga3d940376bd983c14ffcc8d2580f3bdde',1,'rfc7668_if_init(struct netif *netif): lowpan6_ble.c']]], + ['rfc7668_5finput',['rfc7668_input',['../group__rfc7668if.html#ga1d9d7aff9f2f0515f761be0802178197',1,'rfc7668_input(struct pbuf *p, struct netif *netif): lowpan6_ble.c'],['../group__rfc7668if.html#ga1d9d7aff9f2f0515f761be0802178197',1,'rfc7668_input(struct pbuf *p, struct netif *netif): lowpan6_ble.c']]], + ['rfc7668_5foutput',['rfc7668_output',['../group__rfc7668if.html#ga22930ade4e77b3195fe59949834d85f0',1,'rfc7668_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr): lowpan6_ble.c'],['../group__rfc7668if.html#ga22930ade4e77b3195fe59949834d85f0',1,'rfc7668_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr): lowpan6_ble.c']]], + ['rfc7668_5fset_5fcontext',['rfc7668_set_context',['../group__rfc7668if.html#ga29dc0ebb8e640b64a57008b940fbca1e',1,'rfc7668_set_context(u8_t index, const ip6_addr_t *context): lowpan6_ble.c'],['../group__rfc7668if.html#ga29dc0ebb8e640b64a57008b940fbca1e',1,'rfc7668_set_context(u8_t idx, const ip6_addr_t *context): lowpan6_ble.c']]], + ['rfc7668_5fset_5flocal_5faddr_5feui64',['rfc7668_set_local_addr_eui64',['../lowpan6__ble_8h.html#a9c5b721f6fb28b4c999baab56a65d8e2',1,'rfc7668_set_local_addr_eui64(struct netif *netif, const u8_t *local_addr, size_t local_addr_len): lowpan6_ble.c'],['../lowpan6__ble_8c.html#a9c5b721f6fb28b4c999baab56a65d8e2',1,'rfc7668_set_local_addr_eui64(struct netif *netif, const u8_t *local_addr, size_t local_addr_len): lowpan6_ble.c']]], + ['rfc7668_5fset_5flocal_5faddr_5fmac48',['rfc7668_set_local_addr_mac48',['../lowpan6__ble_8h.html#a53d4e8096dd714f94c69d67a6cd49ac2',1,'rfc7668_set_local_addr_mac48(struct netif *netif, const u8_t *local_addr, size_t local_addr_len, int is_public_addr): lowpan6_ble.c'],['../lowpan6__ble_8c.html#a53d4e8096dd714f94c69d67a6cd49ac2',1,'rfc7668_set_local_addr_mac48(struct netif *netif, const u8_t *local_addr, size_t local_addr_len, int is_public_addr): lowpan6_ble.c']]], + ['rfc7668_5fset_5fpeer_5faddr_5feui64',['rfc7668_set_peer_addr_eui64',['../lowpan6__ble_8h.html#a01b797f4fde59dfb803f0299e6a49593',1,'rfc7668_set_peer_addr_eui64(struct netif *netif, const u8_t *peer_addr, size_t peer_addr_len): lowpan6_ble.c'],['../lowpan6__ble_8c.html#a01b797f4fde59dfb803f0299e6a49593',1,'rfc7668_set_peer_addr_eui64(struct netif *netif, const u8_t *peer_addr, size_t peer_addr_len): lowpan6_ble.c']]], + ['rfc7668_5fset_5fpeer_5faddr_5fmac48',['rfc7668_set_peer_addr_mac48',['../lowpan6__ble_8h.html#a437b9f9e85be644bd7b939413e3c81d0',1,'rfc7668_set_peer_addr_mac48(struct netif *netif, const u8_t *peer_addr, size_t peer_addr_len, int is_public_addr): lowpan6_ble.c'],['../lowpan6__ble_8c.html#a437b9f9e85be644bd7b939413e3c81d0',1,'rfc7668_set_peer_addr_mac48(struct netif *netif, const u8_t *peer_addr, size_t peer_addr_len, int is_public_addr): lowpan6_ble.c']]], + ['rs_5fcount',['rs_count',['../structnetif.html#a9c1f9f28bde60aa868bc3296bee7b1b6',1,'netif']]], + ['rs_5fheader',['rs_header',['../structrs__header.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_14.html b/Libraries/LwIP/doc/doxygen/output/html/search/all_14.html new file mode 100644 index 0000000..fb4d0ec --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_14.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_14.js b/Libraries/LwIP/doc/doxygen/output/html/search/all_14.js new file mode 100644 index 0000000..444a50d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_14.js @@ -0,0 +1,344 @@ +var searchData= +[ + ['snmp_20mib2_20callbacks',['SNMP MIB2 callbacks',['../group__lwip__opts__mib2.html',1,'']]], + ['sockets',['Sockets',['../group__lwip__opts__socket.html',1,'']]], + ['statistics',['Statistics',['../group__lwip__opts__stats.html',1,'']]], + ['sd',['sd',['../structapi__msg.html#ad5e8bf133bc5ba4c78822af297330ce4',1,'api_msg']]], + ['select',['select',['../group__socket.html#gac332b9b9b2cd877a6189ef838de49e33',1,'sockets.h']]], + ['select_5fwaiting',['select_waiting',['../structlwip__sock.html#aadbcf5ec3d50631d8821200163d88d38',1,'lwip_sock']]], + ['selwait_5ft',['SELWAIT_T',['../sockets__priv_8h.html#a8f4d240733a9261c668fc66dc4ce8196',1,'sockets_priv.h']]], + ['sem',['sem',['../structdns__api__msg.html#a15e01e675ebc46b5aede42342be445e2',1,'dns_api_msg::sem()'],['../structlwip__select__cb.html#ac9e790cac8b5eae607a8ef95dcc68482',1,'lwip_select_cb::sem()']]], + ['sem_5fsignalled',['sem_signalled',['../structlwip__select__cb.html#a1c00f1159e9e8eb7cca02c497605cd99',1,'lwip_select_cb']]], + ['send',['send',['../group__socket.html#ga19024690fdfd3512d24dcaa9b80d24ed',1,'sockets.h']]], + ['send_5ftimeout',['send_timeout',['../structnetconn.html#a44e55724482b8e447134f5ba4f01551a',1,'netconn']]], + ['sendevent',['sendevent',['../structlwip__sock.html#a7e282776681ea4b7bd389950a8a64fa8',1,'lwip_sock']]], + ['sendmsg',['sendmsg',['../group__socket.html#gaad99bea090b1fe4743234fcee15a5d28',1,'sockets.h']]], + ['sendto',['sendto',['../group__socket.html#gaaa17499d76ef421821fe72fd29fe38f7',1,'sockets.h']]], + ['sent_5fnum',['sent_num',['../structautoip.html#a9d3e3bab2f12b7c7283177fbf039fb25',1,'autoip']]], + ['sequence_5fnumber',['sequence_number',['../structieee__802154__hdr.html#a870001205f5a3ce45ce0b2f323275869',1,'ieee_802154_hdr']]], + ['sequential_2dstyle_20apis',['Sequential-style APIs',['../group__sequential__api.html',1,'']]], + ['service',['service',['../structmdns__service.html#a42583986e24b5a4a13b6d647c1a281ad',1,'mdns_service']]], + ['service_5fget_5ftxt_5ffn_5ft',['service_get_txt_fn_t',['../mdns_8h.html#a3b9ee5953214665e585e5bcaf6b8ea83',1,'mdns.h']]], + ['services',['services',['../structmdns__host.html#a750c31340c22e51375e4dc3e6e94f2ed',1,'mdns_host']]], + ['session_5fdata_5fpacket_5fsize',['session_data_packet_size',['../structnetbios__answer.html#abec38f20bb460ddc2d6e8c9b9208608c',1,'netbios_answer']]], + ['set_5ftest',['set_test',['../structsnmp__node__instance.html#a03c1fec3764f6b48337238b3355ee5bd',1,'snmp_node_instance::set_test()'],['../structsnmp__table__node.html#acfbc5fa3361117fc4fa83642dde8aef0',1,'snmp_table_node::set_test()']]], + ['set_5fvalue',['set_value',['../structsnmp__node__instance.html#a55fb4cadefcab9c74c3fb529c2560834',1,'snmp_node_instance::set_value()'],['../structsnmp__table__node.html#a2a3e8ac0dcce64604fc17e1de3c5a804',1,'snmp_table_node::set_value()']]], + ['setsockopt',['setsockopt',['../group__socket.html#ga115d74cd1953e7bafc2e34157c697df1',1,'sockets.h']]], + ['shutdown',['shutdown',['../group__socket.html#ga7d832f77cfad97cf901640f243c6e682',1,'sockets.h']]], + ['size',['size',['../structmemp__desc.html#a1688d2bdd5a7b77700e1fa627f025ba3',1,'memp_desc']]], + ['slip_5fdebug',['SLIP_DEBUG',['../group__lwip__opts__debugmsg.html#gab986f95183559d8678c6d80969b01857',1,'opt.h']]], + ['slip_5fmax_5fsize',['SLIP_MAX_SIZE',['../slipif_8c.html#accf448f9dabb0f33ef46b40355691cab',1,'slipif.c']]], + ['slip_5frx_5fqueue',['SLIP_RX_QUEUE',['../slipif_8h.html#a37ce8613535232db02bfd9ae9b51c668',1,'slipif.h']]], + ['slip_5fsio_5fspeed',['SLIP_SIO_SPEED',['../slipif_8c.html#a2a9e9ed81732a6794a9b9a712f75a1cc',1,'slipif.c']]], + ['slip_5fuse_5frx_5fthread',['SLIP_USE_RX_THREAD',['../slipif_8h.html#a198967c11f79cffc32192710294e8826',1,'slipif.h']]], + ['slip',['SLIP',['../group__slipif.html',1,'']]], + ['slipif_2ec',['slipif.c',['../slipif_8c.html',1,'']]], + ['slipif_2eh',['slipif.h',['../slipif_8h.html',1,'']]], + ['slipif_5finit',['slipif_init',['../group__slipif.html#ga687973ba82dab13a5b9d38d7399aeee3',1,'slipif_init(struct netif *netif): slipif.c'],['../group__slipif.html#ga687973ba82dab13a5b9d38d7399aeee3',1,'slipif_init(struct netif *netif): slipif.c']]], + ['slipif_5fpoll',['slipif_poll',['../group__slipif.html#ga7b036fd1cde9b299139cac62f52d15a6',1,'slipif_poll(struct netif *netif): slipif.c'],['../group__slipif.html#ga7b036fd1cde9b299139cac62f52d15a6',1,'slipif_poll(struct netif *netif): slipif.c']]], + ['slipif_5fprocess_5frxqueue',['slipif_process_rxqueue',['../group__slipif.html#gae135be7d61e5bb49ab72476b0aa70946',1,'slipif_process_rxqueue(struct netif *netif): slipif.c'],['../group__slipif.html#gae135be7d61e5bb49ab72476b0aa70946',1,'slipif_process_rxqueue(struct netif *netif): slipif.c']]], + ['slipif_5freceived_5fbyte',['slipif_received_byte',['../group__slipif.html#ga3f2f5e2fa4a816dc27a46f3ee91cf1b3',1,'slipif_received_byte(struct netif *netif, u8_t data): slipif.c'],['../group__slipif.html#ga3f2f5e2fa4a816dc27a46f3ee91cf1b3',1,'slipif_received_byte(struct netif *netif, u8_t data): slipif.c']]], + ['slipif_5freceived_5fbytes',['slipif_received_bytes',['../group__slipif.html#gabbee48569a513c90fe154632038eb6d6',1,'slipif_received_bytes(struct netif *netif, u8_t *data, u8_t len): slipif.c'],['../group__slipif.html#gabbee48569a513c90fe154632038eb6d6',1,'slipif_received_bytes(struct netif *netif, u8_t *data, u8_t len): slipif.c']]], + ['slipif_5fthread_5fname',['SLIPIF_THREAD_NAME',['../group__lwip__opts__thread.html#gae9cd260c56472324a2f0ee5f9597a675',1,'opt.h']]], + ['slipif_5fthread_5fprio',['SLIPIF_THREAD_PRIO',['../group__lwip__opts__thread.html#gab1b9fc2efcbf1f804bfd0191bc019c4e',1,'opt.h']]], + ['slipif_5fthread_5fstacksize',['SLIPIF_THREAD_STACKSIZE',['../group__lwip__opts__thread.html#gae8ab54a25007ce997bbab6289815e258',1,'opt.h']]], + ['smemcpy',['SMEMCPY',['../group__lwip__opts__memcpy.html#ga8c6e3c1e4f74acb16376188dbf8909ec',1,'opt.h']]], + ['smtp_20client',['SMTP client',['../group__smtp.html',1,'']]], + ['smtp_2ec',['smtp.c',['../smtp_8c.html',1,'']]], + ['smtp_5fbodydh',['SMTP_BODYDH',['../group__smtp__opts.html#ga4b1667149354b7819847cb4f5f1ff144',1,'smtp_opts.h']]], + ['smtp_5fcheck_5fdata',['SMTP_CHECK_DATA',['../group__smtp__opts.html#ga021d8133159895a2dbf5fb0b243da9fa',1,'smtp_opts.h']]], + ['smtp_5fcopy_5fauthdata',['SMTP_COPY_AUTHDATA',['../group__smtp__opts.html#gab5559a7c976e72204d9391f655bcc07e',1,'smtp_opts.h']]], + ['smtp_5fdebug',['SMTP_DEBUG',['../group__smtp__opts.html#gae7ea4f31c521947d5127e268ae02c317',1,'smtp_opts.h']]], + ['smtp_5fmax_5fpass_5flen',['SMTP_MAX_PASS_LEN',['../group__smtp__opts.html#ga9aa5f5529121a8266947f33c5e424ccc',1,'smtp_opts.h']]], + ['smtp_5fmax_5fservername_5flen',['SMTP_MAX_SERVERNAME_LEN',['../group__smtp__opts.html#gaee3b273524a2253ce5fb44b240b0371b',1,'smtp_opts.h']]], + ['smtp_5fmax_5fusername_5flen',['SMTP_MAX_USERNAME_LEN',['../group__smtp__opts.html#gafa0c84e5279b8eb8a5dbea6fe97aa099',1,'smtp_opts.h']]], + ['smtp_5fpoll_5finterval',['SMTP_POLL_INTERVAL',['../smtp_8c.html#a19ebd0b9a82b87fd205fed0dba06649e',1,'smtp.c']]], + ['smtp_5fsend_5fmail',['smtp_send_mail',['../group__smtp.html#gae43119480c4146df9eeff7ae80c767f7',1,'smtp_send_mail(const char *from, const char *to, const char *subject, const char *body, smtp_result_fn callback_fn, void *callback_arg): smtp.c'],['../group__smtp.html#gae43119480c4146df9eeff7ae80c767f7',1,'smtp_send_mail(const char *from, const char *to, const char *subject, const char *body, smtp_result_fn callback_fn, void *callback_arg): smtp.c']]], + ['smtp_5fsend_5fmail_5fint',['smtp_send_mail_int',['../group__smtp.html#gaa9331cc8c6d73a8cd7e6e4466aca9243',1,'smtp_send_mail_int(void *arg): smtp.c'],['../group__smtp.html#gaa9331cc8c6d73a8cd7e6e4466aca9243',1,'smtp_send_mail_int(void *arg): smtp.c']]], + ['smtp_5fsend_5fmail_5fstatic',['smtp_send_mail_static',['../group__smtp.html#ga06f6582701def2a62582373bb0be5788',1,'smtp_send_mail_static(const char *from, const char *to, const char *subject, const char *body, smtp_result_fn callback_fn, void *callback_arg): smtp.c'],['../group__smtp.html#ga06f6582701def2a62582373bb0be5788',1,'smtp_send_mail_static(const char *from, const char *to, const char *subject, const char *body, smtp_result_fn callback_fn, void *callback_arg): smtp.c']]], + ['smtp_5fsend_5frequest',['smtp_send_request',['../structsmtp__send__request.html',1,'']]], + ['smtp_5fsession',['smtp_session',['../structsmtp__session.html',1,'']]], + ['smtp_5fsession_5fstate',['smtp_session_state',['../smtp_8c.html#a04947fff2d3a3803e6c716aecc7f2bae',1,'smtp.c']]], + ['smtp_5fset_5fauth',['smtp_set_auth',['../group__smtp.html#ga79567a5a75e048a6b8addb5b038fc899',1,'smtp_set_auth(const char *username, const char *pass): smtp.c'],['../group__smtp.html#ga79567a5a75e048a6b8addb5b038fc899',1,'smtp_set_auth(const char *username, const char *pass): smtp.c']]], + ['smtp_5fset_5fserver_5faddr',['smtp_set_server_addr',['../group__smtp.html#ga1ccf4305461ec16cf41599341ec54983',1,'smtp_set_server_addr(const char *server): smtp.c'],['../group__smtp.html#ga1ccf4305461ec16cf41599341ec54983',1,'smtp_set_server_addr(const char *server): smtp.c']]], + ['smtp_5fset_5fserver_5fport',['smtp_set_server_port',['../group__smtp.html#ga4b0606e7ad64d8215cebbea43f08759f',1,'smtp_set_server_port(u16_t port): smtp.c'],['../group__smtp.html#ga4b0606e7ad64d8215cebbea43f08759f',1,'smtp_set_server_port(u16_t port): smtp.c']]], + ['smtp_5fset_5ftls_5fconfig',['smtp_set_tls_config',['../group__smtp.html#gae72a8a0ec42ecae1be401978e224c39e',1,'smtp_set_tls_config(struct altcp_tls_config *tls_config): smtp.c'],['../group__smtp.html#gae72a8a0ec42ecae1be401978e224c39e',1,'smtp_set_tls_config(struct altcp_tls_config *tls_config): smtp.c']]], + ['smtp_5fsupport_5fauth_5flogin',['SMTP_SUPPORT_AUTH_LOGIN',['../group__smtp__opts.html#ga7a83e686b109fa59557c13736aeeab3b',1,'smtp_opts.h']]], + ['smtp_5fsupport_5fauth_5fplain',['SMTP_SUPPORT_AUTH_PLAIN',['../group__smtp__opts.html#ga2e6c8313006592884e89bbcf353cf5ac',1,'smtp_opts.h']]], + ['smtp_5ftimeout',['SMTP_TIMEOUT',['../smtp_8c.html#a6029851c4f71d98b00d6c49a17ea9ef6',1,'smtp.c']]], + ['smtp_5ftimeout_5fdatablock',['SMTP_TIMEOUT_DATABLOCK',['../smtp_8c.html#ad853ab316a3b866b87c0454053febfe3',1,'smtp.c']]], + ['smtp_5ftimeout_5fdataterm',['SMTP_TIMEOUT_DATATERM',['../smtp_8c.html#a73855e673457f748b6bcba49aab9b035',1,'smtp.c']]], + ['snmpv2c_2fv3_20agent',['SNMPv2c/v3 agent',['../group__snmp.html',1,'']]], + ['snmp_2eh',['snmp.h',['../apps_2snmp_8h.html',1,'(Global Namespace)'],['../snmp_8h.html',1,'(Global Namespace)']]], + ['snmp_5faccess_5ft',['snmp_access_t',['../snmp__core_8h.html#ad5a33687d1a6fcf970266b41b0633760',1,'snmp_core.h']]], + ['snmp_5fans1_5fenc_5ftlv',['snmp_ans1_enc_tlv',['../snmp__asn1_8c.html#af8e905a214936995d235789f359cf015',1,'snmp_ans1_enc_tlv(struct snmp_pbuf_stream *pbuf_stream, struct snmp_asn1_tlv *tlv): snmp_asn1.c'],['../snmp__asn1_8h.html#af8e905a214936995d235789f359cf015',1,'snmp_ans1_enc_tlv(struct snmp_pbuf_stream *pbuf_stream, struct snmp_asn1_tlv *tlv): snmp_asn1.c']]], + ['snmp_5fasn1_2ec',['snmp_asn1.c',['../snmp__asn1_8c.html',1,'']]], + ['snmp_5fasn1_2eh',['snmp_asn1.h',['../snmp__asn1_8h.html',1,'']]], + ['snmp_5fasn1_5fdec_5foid',['snmp_asn1_dec_oid',['../snmp__asn1_8c.html#a8bb84ec51c46a890b7ced016043b2908',1,'snmp_asn1_dec_oid(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u32_t *oid, u8_t *oid_len, u8_t oid_max_len): snmp_asn1.c'],['../snmp__asn1_8h.html#a8bb84ec51c46a890b7ced016043b2908',1,'snmp_asn1_dec_oid(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u32_t *oid, u8_t *oid_len, u8_t oid_max_len): snmp_asn1.c']]], + ['snmp_5fasn1_5fdec_5fraw',['snmp_asn1_dec_raw',['../snmp__asn1_8c.html#a31055a35285214ea0d4ad60c64c2f73e',1,'snmp_asn1_dec_raw(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u8_t *buf, u16_t *buf_len, u16_t buf_max_len): snmp_asn1.c'],['../snmp__asn1_8h.html#a31055a35285214ea0d4ad60c64c2f73e',1,'snmp_asn1_dec_raw(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u8_t *buf, u16_t *buf_len, u16_t buf_max_len): snmp_asn1.c']]], + ['snmp_5fasn1_5fdec_5fs32t',['snmp_asn1_dec_s32t',['../snmp__asn1_8c.html#a51d36daf2935c246eb55fb749581e2bb',1,'snmp_asn1_dec_s32t(struct snmp_pbuf_stream *pbuf_stream, u16_t len, s32_t *value): snmp_asn1.c'],['../snmp__asn1_8h.html#a51d36daf2935c246eb55fb749581e2bb',1,'snmp_asn1_dec_s32t(struct snmp_pbuf_stream *pbuf_stream, u16_t len, s32_t *value): snmp_asn1.c']]], + ['snmp_5fasn1_5fdec_5ftlv',['snmp_asn1_dec_tlv',['../snmp__asn1_8c.html#a7e3f63b155b06f7ade627060b55e4496',1,'snmp_asn1_dec_tlv(struct snmp_pbuf_stream *pbuf_stream, struct snmp_asn1_tlv *tlv): snmp_asn1.c'],['../snmp__asn1_8h.html#a7e3f63b155b06f7ade627060b55e4496',1,'snmp_asn1_dec_tlv(struct snmp_pbuf_stream *pbuf_stream, struct snmp_asn1_tlv *tlv): snmp_asn1.c']]], + ['snmp_5fasn1_5fdec_5fu32t',['snmp_asn1_dec_u32t',['../snmp__asn1_8c.html#ac04e08c19c40cfc3333a181018887a51',1,'snmp_asn1_dec_u32t(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u32_t *value): snmp_asn1.c'],['../snmp__asn1_8h.html#ac04e08c19c40cfc3333a181018887a51',1,'snmp_asn1_dec_u32t(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u32_t *value): snmp_asn1.c']]], + ['snmp_5fasn1_5fenc_5flength_5fcnt',['snmp_asn1_enc_length_cnt',['../snmp__asn1_8c.html#a20343aef4524459a2b45704e18ef520d',1,'snmp_asn1_enc_length_cnt(u16_t length, u8_t *octets_needed): snmp_asn1.c'],['../snmp__asn1_8h.html#a20343aef4524459a2b45704e18ef520d',1,'snmp_asn1_enc_length_cnt(u16_t length, u8_t *octets_needed): snmp_asn1.c']]], + ['snmp_5fasn1_5fenc_5foid',['snmp_asn1_enc_oid',['../snmp__asn1_8c.html#aa71260abd46fc2f682874016896fe218',1,'snmp_asn1_enc_oid(struct snmp_pbuf_stream *pbuf_stream, const u32_t *oid, u16_t oid_len): snmp_asn1.c'],['../snmp__asn1_8h.html#aa71260abd46fc2f682874016896fe218',1,'snmp_asn1_enc_oid(struct snmp_pbuf_stream *pbuf_stream, const u32_t *oid, u16_t oid_len): snmp_asn1.c']]], + ['snmp_5fasn1_5fenc_5foid_5fcnt',['snmp_asn1_enc_oid_cnt',['../snmp__asn1_8c.html#ab6fd58c1b41cb98117f00a11db7d226f',1,'snmp_asn1_enc_oid_cnt(const u32_t *oid, u16_t oid_len, u16_t *octets_needed): snmp_asn1.c'],['../snmp__asn1_8h.html#ab6fd58c1b41cb98117f00a11db7d226f',1,'snmp_asn1_enc_oid_cnt(const u32_t *oid, u16_t oid_len, u16_t *octets_needed): snmp_asn1.c']]], + ['snmp_5fasn1_5fenc_5fraw',['snmp_asn1_enc_raw',['../snmp__asn1_8c.html#a167b707051bbbeafea14eeca72449ac6',1,'snmp_asn1_enc_raw(struct snmp_pbuf_stream *pbuf_stream, const u8_t *raw, u16_t raw_len): snmp_asn1.c'],['../snmp__asn1_8h.html#a167b707051bbbeafea14eeca72449ac6',1,'snmp_asn1_enc_raw(struct snmp_pbuf_stream *pbuf_stream, const u8_t *raw, u16_t raw_len): snmp_asn1.c']]], + ['snmp_5fasn1_5fenc_5fs32t',['snmp_asn1_enc_s32t',['../snmp__asn1_8c.html#a25b3fe21becd08260ec56bef9299d3c6',1,'snmp_asn1_enc_s32t(struct snmp_pbuf_stream *pbuf_stream, u16_t octets_needed, s32_t value): snmp_asn1.c'],['../snmp__asn1_8h.html#a25b3fe21becd08260ec56bef9299d3c6',1,'snmp_asn1_enc_s32t(struct snmp_pbuf_stream *pbuf_stream, u16_t octets_needed, s32_t value): snmp_asn1.c']]], + ['snmp_5fasn1_5fenc_5fs32t_5fcnt',['snmp_asn1_enc_s32t_cnt',['../snmp__asn1_8c.html#a8c74914532f1e0c219dfb1977fd0c22f',1,'snmp_asn1_enc_s32t_cnt(s32_t value, u16_t *octets_needed): snmp_asn1.c'],['../snmp__asn1_8h.html#a8c74914532f1e0c219dfb1977fd0c22f',1,'snmp_asn1_enc_s32t_cnt(s32_t value, u16_t *octets_needed): snmp_asn1.c']]], + ['snmp_5fasn1_5fenc_5fu32t',['snmp_asn1_enc_u32t',['../snmp__asn1_8c.html#aa54b4ee3c58ef66721df96fd8b1f66b2',1,'snmp_asn1_enc_u32t(struct snmp_pbuf_stream *pbuf_stream, u16_t octets_needed, u32_t value): snmp_asn1.c'],['../snmp__asn1_8h.html#aa54b4ee3c58ef66721df96fd8b1f66b2',1,'snmp_asn1_enc_u32t(struct snmp_pbuf_stream *pbuf_stream, u16_t octets_needed, u32_t value): snmp_asn1.c']]], + ['snmp_5fasn1_5fenc_5fu32t_5fcnt',['snmp_asn1_enc_u32t_cnt',['../snmp__asn1_8c.html#a58965e0305884d550786440c84119ad4',1,'snmp_asn1_enc_u32t_cnt(u32_t value, u16_t *octets_needed): snmp_asn1.c'],['../snmp__asn1_8h.html#a58965e0305884d550786440c84119ad4',1,'snmp_asn1_enc_u32t_cnt(u32_t value, u16_t *octets_needed): snmp_asn1.c']]], + ['snmp_5fauthfail_5ftrap',['snmp_authfail_trap',['../group__snmp__traps.html#gaf6d0a95a3a406d8ea00849c07aca05ee',1,'snmp_authfail_trap(void): snmp_traps.c'],['../group__snmp__traps.html#gaf6d0a95a3a406d8ea00849c07aca05ee',1,'snmp_authfail_trap(void): snmp_traps.c']]], + ['snmp_5fcoldstart_5ftrap',['snmp_coldstart_trap',['../group__snmp__traps.html#gaa8a49d1a6a207740ba44e27b5bbc22be',1,'snmp_coldstart_trap(void): snmp_traps.c'],['../group__snmp__traps.html#gaa8a49d1a6a207740ba44e27b5bbc22be',1,'snmp_coldstart_trap(void): snmp_traps.c']]], + ['snmp_5fcommunity',['snmp_community',['../snmp__msg_8c.html#ac6f810ab812c44c6ca1df1fdf926a9f6',1,'snmp_community(): snmp_msg.c'],['../snmp__msg_8h.html#ac6f810ab812c44c6ca1df1fdf926a9f6',1,'snmp_community(): snmp_msg.c'],['../group__snmp__opts.html#ga316c1e1f06f0c7ca56589563809e64db',1,'SNMP_COMMUNITY(): snmp_opts.h']]], + ['snmp_5fcommunity_5ftrap',['snmp_community_trap',['../snmp__msg_8c.html#a2e2007343d9492b8e31d363d2c6ad79b',1,'snmp_community_trap(): snmp_msg.c'],['../snmp__traps_8c.html#a2e2007343d9492b8e31d363d2c6ad79b',1,'snmp_community_trap(): snmp_msg.c'],['../group__snmp__opts.html#gaaefc9dda5f8e5c296018a463cdbac39b',1,'SNMP_COMMUNITY_TRAP(): snmp_opts.h']]], + ['snmp_5fcommunity_5fwrite',['SNMP_COMMUNITY_WRITE',['../group__snmp__opts.html#gafb9414dc7a33978b62a3a9838b659464',1,'SNMP_COMMUNITY_WRITE(): snmp_opts.h'],['../snmp__msg_8c.html#a2d77485bb0b640c8e5f569ca756d3b04',1,'snmp_community_write(): snmp_msg.c'],['../snmp__msg_8h.html#a2d77485bb0b640c8e5f569ca756d3b04',1,'snmp_community_write(): snmp_msg.c']]], + ['snmp_5fcore_2ec',['snmp_core.c',['../snmp__core_8c.html',1,'']]], + ['snmp_5fcore_2eh',['snmp_core.h',['../snmp__core_8h.html',1,'']]], + ['snmp_5fcreate_5fthread_5fsync_5fnode',['SNMP_CREATE_THREAD_SYNC_NODE',['../snmp__threadsync_8h.html#a1971c27c8addf1c426abd1abac54c8d2',1,'snmp_threadsync.h']]], + ['snmp_5fdebug',['SNMP_DEBUG',['../group__snmp__opts.html#gac041000361342f51ad5ee5d8f6254e02',1,'snmp_opts.h']]], + ['snmp_5fdecode_5fbits',['snmp_decode_bits',['../snmp__core_8c.html#ad3ab34b13bb9fcc757c8d366fe520fdc',1,'snmp_decode_bits(const u8_t *buf, u32_t buf_len, u32_t *bit_value): snmp_core.c'],['../snmp__core_8h.html#ad3ab34b13bb9fcc757c8d366fe520fdc',1,'snmp_decode_bits(const u8_t *buf, u32_t buf_len, u32_t *bit_value): snmp_core.c']]], + ['snmp_5fdevice_5fenterprise_5foid',['SNMP_DEVICE_ENTERPRISE_OID',['../group__snmp__opts.html#ga09118b734e85df152af098744e888b34',1,'snmp_opts.h']]], + ['snmp_5fdevice_5fenterprise_5foid_5flen',['SNMP_DEVICE_ENTERPRISE_OID_LEN',['../group__snmp__opts.html#ga9e39ba5308f5c7ac5296c7d05fdfa97f',1,'snmp_opts.h']]], + ['snmp_5fencode_5fbits',['snmp_encode_bits',['../snmp__core_8c.html#ae6f5d0c38a7ec164a67fa55c87f1de03',1,'snmp_encode_bits(u8_t *buf, u32_t buf_len, u32_t bit_value, u8_t bit_count): snmp_core.c'],['../snmp__core_8h.html#ae6f5d0c38a7ec164a67fa55c87f1de03',1,'snmp_encode_bits(u8_t *buf, u32_t buf_len, u32_t bit_value, u8_t bit_count): snmp_core.c']]], + ['snmp_5ferr_5ft',['snmp_err_t',['../snmp__core_8h.html#abaa9cdad345ad93da515d31625a54589',1,'snmp_core.h']]], + ['snmp_5fgentrap_5fauth_5ffailure',['SNMP_GENTRAP_AUTH_FAILURE',['../apps_2snmp_8h.html#aaf312d8bdbeed2c02560321ab24a022f',1,'snmp.h']]], + ['snmp_5fgentrap_5fcoldstart',['SNMP_GENTRAP_COLDSTART',['../apps_2snmp_8h.html#ae9310bbe1948b3c3bc64c073d4621019',1,'snmp.h']]], + ['snmp_5fgentrap_5fegp_5fneighbor_5floss',['SNMP_GENTRAP_EGP_NEIGHBOR_LOSS',['../apps_2snmp_8h.html#ac1cd822650d9ac66d0333a5ad600cfee',1,'snmp.h']]], + ['snmp_5fgentrap_5fenterprise_5fspecific',['SNMP_GENTRAP_ENTERPRISE_SPECIFIC',['../apps_2snmp_8h.html#ab3691cecfa911baa52ccf6054022ba43',1,'snmp.h']]], + ['snmp_5fgentrap_5flinkdown',['SNMP_GENTRAP_LINKDOWN',['../apps_2snmp_8h.html#a1856efbe83199f456c34a4e5139dfb16',1,'snmp.h']]], + ['snmp_5fgentrap_5flinkup',['SNMP_GENTRAP_LINKUP',['../apps_2snmp_8h.html#afa665cdc02ccd5ee9fe0c4cb1b792186',1,'snmp.h']]], + ['snmp_5fgentrap_5fwarmstart',['SNMP_GENTRAP_WARMSTART',['../apps_2snmp_8h.html#a9a2e5824deab50e639b01181307a0926',1,'snmp.h']]], + ['snmp_5fget_5fauth_5ftraps_5fenabled',['snmp_get_auth_traps_enabled',['../group__snmp__traps.html#ga7804a22615bd9b3a323a3f48a9fb8cb7',1,'snmp_get_auth_traps_enabled(void): snmp_traps.c'],['../group__snmp__traps.html#ga7804a22615bd9b3a323a3f48a9fb8cb7',1,'snmp_get_auth_traps_enabled(void): snmp_traps.c']]], + ['snmp_5fget_5fcommunity',['snmp_get_community',['../group__snmp__core.html#gacf277cbca915275190426aeef4cfb103',1,'snmp_get_community(void): snmp_msg.c'],['../group__snmp__core.html#gacf277cbca915275190426aeef4cfb103',1,'snmp_get_community(void): snmp_msg.c']]], + ['snmp_5fget_5fcommunity_5ftrap',['snmp_get_community_trap',['../group__snmp__traps.html#gafdd3299e145f53cc826cc11a469f8409',1,'snmp_get_community_trap(void): snmp_msg.c'],['../group__snmp__traps.html#gafdd3299e145f53cc826cc11a469f8409',1,'snmp_get_community_trap(void): snmp_msg.c']]], + ['snmp_5fget_5fcommunity_5fwrite',['snmp_get_community_write',['../group__snmp__core.html#gaba31b6f1816661df5a3b7f2076ee6ec0',1,'snmp_get_community_write(void): snmp_msg.c'],['../group__snmp__core.html#gaba31b6f1816661df5a3b7f2076ee6ec0',1,'snmp_get_community_write(void): snmp_msg.c']]], + ['snmp_5fget_5fdevice_5fenterprise_5foid',['snmp_get_device_enterprise_oid',['../group__snmp__core.html#ga4dff82dda2553b9554a9f98561852a50',1,'snmp_get_device_enterprise_oid(void): snmp_core.c'],['../group__snmp__core.html#ga4dff82dda2553b9554a9f98561852a50',1,'snmp_get_device_enterprise_oid(void): snmp_core.c']]], + ['snmp_5fiftype',['snmp_ifType',['../group__netif__mib2.html#ga15378b8dcd2a9dc2985142d864a767ba',1,'snmp.h']]], + ['snmp_5finit',['snmp_init',['../snmp__netconn_8c.html#ga4d88f2fc7655280384131d543e0d83e5',1,'snmp_init(void): snmp_netconn.c'],['../group__snmp__core.html#ga4d88f2fc7655280384131d543e0d83e5',1,'snmp_init(void): snmp_raw.c']]], + ['snmp_5fip4_5fto_5foid',['snmp_ip4_to_oid',['../snmp__core_8c.html#a4e01d395f0c8c38c2b5b681047969da1',1,'snmp_ip4_to_oid(const ip4_addr_t *ip, u32_t *oid): snmp_core.c'],['../snmp__core_8h.html#a4e01d395f0c8c38c2b5b681047969da1',1,'snmp_ip4_to_oid(const ip4_addr_t *ip, u32_t *oid): snmp_core.c']]], + ['snmp_5fip6_5fto_5foid',['snmp_ip6_to_oid',['../snmp__core_8c.html#af1f327eef86765cce0253c94ec3c5ce9',1,'snmp_ip6_to_oid(const ip6_addr_t *ip, u32_t *oid): snmp_core.c'],['../snmp__core_8h.html#af1f327eef86765cce0253c94ec3c5ce9',1,'snmp_ip6_to_oid(const ip6_addr_t *ip, u32_t *oid): snmp_core.c']]], + ['snmp_5fip_5fport_5fto_5foid',['snmp_ip_port_to_oid',['../snmp__core_8c.html#a53b01262de3d1c52faf88dd4bb702a27',1,'snmp_ip_port_to_oid(const ip_addr_t *ip, u16_t port, u32_t *oid): snmp_core.c'],['../snmp__core_8h.html#a53b01262de3d1c52faf88dd4bb702a27',1,'snmp_ip_port_to_oid(const ip_addr_t *ip, u16_t port, u32_t *oid): snmp_core.c']]], + ['snmp_5fip_5fto_5foid',['snmp_ip_to_oid',['../snmp__core_8c.html#a909ed1b0da526a0acdf6fa57a06f351e',1,'snmp_ip_to_oid(const ip_addr_t *ip, u32_t *oid): snmp_core.c'],['../snmp__core_8h.html#a909ed1b0da526a0acdf6fa57a06f351e',1,'snmp_ip_to_oid(const ip_addr_t *ip, u32_t *oid): snmp_core.c']]], + ['snmp_5fleaf_5fnode',['snmp_leaf_node',['../structsnmp__leaf__node.html',1,'']]], + ['snmp_5flwip_5fenterprise_5foid',['SNMP_LWIP_ENTERPRISE_OID',['../group__snmp__opts.html#ga868bfef6efe05515c86291137a633479',1,'snmp_opts.h']]], + ['snmp_5flwip_5fgetbulk_5fmax_5frepetitions',['SNMP_LWIP_GETBULK_MAX_REPETITIONS',['../group__snmp__opts.html#ga5a24152aa5f3c2837b9a3145aa3c59f3',1,'snmp_opts.h']]], + ['snmp_5flwip_5fmib2',['SNMP_LWIP_MIB2',['../group__snmp__opts.html#gaab667d48f48ee89f8bdbc7f134e6037d',1,'snmp_opts.h']]], + ['snmp_5flwip_5fmib2_5fsyscontact',['SNMP_LWIP_MIB2_SYSCONTACT',['../group__snmp__opts.html#ga1a57501c615b630d363e0af1a504e683',1,'snmp_opts.h']]], + ['snmp_5flwip_5fmib2_5fsysdesc',['SNMP_LWIP_MIB2_SYSDESC',['../group__snmp__opts.html#gae93a105b421a2ca91e862da5087cec73',1,'snmp_opts.h']]], + ['snmp_5flwip_5fmib2_5fsyslocation',['SNMP_LWIP_MIB2_SYSLOCATION',['../group__snmp__opts.html#ga311cec98c8f7e4851d325fffe96cf8d9',1,'snmp_opts.h']]], + ['snmp_5flwip_5fmib2_5fsysname',['SNMP_LWIP_MIB2_SYSNAME',['../group__snmp__opts.html#ga80ba46f9517a51b5477f13082b2bcf98',1,'snmp_opts.h']]], + ['snmp_5fmax_5fcommunity_5fstr_5flen',['SNMP_MAX_COMMUNITY_STR_LEN',['../group__snmp__opts.html#ga0e98b58159a77688f87f9f50479177fd',1,'snmp_opts.h']]], + ['snmp_5fmax_5fobj_5fid_5flen',['SNMP_MAX_OBJ_ID_LEN',['../group__snmp__opts.html#ga3ad9d293f90e3c885c4e3263a9064a41',1,'snmp_opts.h']]], + ['snmp_5fmax_5foctet_5fstring_5flen',['SNMP_MAX_OCTET_STRING_LEN',['../group__snmp__opts.html#gae50cdd09697aa54a8b9f26432ac55ac2',1,'snmp_opts.h']]], + ['snmp_5fmax_5fvalue_5fsize',['SNMP_MAX_VALUE_SIZE',['../group__snmp__opts.html#gafb4362575bc50476a7401a1ed14787f0',1,'snmp_opts.h']]], + ['snmp_5fmib',['snmp_mib',['../structsnmp__mib.html',1,'']]], + ['snmp_5fmib2_2ec',['snmp_mib2.c',['../snmp__mib2_8c.html',1,'']]], + ['snmp_5fmib2_2eh',['snmp_mib2.h',['../snmp__mib2_8h.html',1,'']]], + ['snmp_5fmib2_5ficmp_2ec',['snmp_mib2_icmp.c',['../snmp__mib2__icmp_8c.html',1,'']]], + ['snmp_5fmib2_5finterfaces_2ec',['snmp_mib2_interfaces.c',['../snmp__mib2__interfaces_8c.html',1,'']]], + ['snmp_5fmib2_5fip_2ec',['snmp_mib2_ip.c',['../snmp__mib2__ip_8c.html',1,'']]], + ['snmp_5fmib2_5fset_5fsyscontact',['snmp_mib2_set_syscontact',['../group__snmp__mib2.html#gaf96002d9d10bcae27a95b2367674249e',1,'snmp_mib2_set_syscontact(u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize): snmp_mib2_system.c'],['../group__snmp__mib2.html#gaf96002d9d10bcae27a95b2367674249e',1,'snmp_mib2_set_syscontact(u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize): snmp_mib2_system.c']]], + ['snmp_5fmib2_5fset_5fsyscontact_5freadonly',['snmp_mib2_set_syscontact_readonly',['../group__snmp__mib2.html#ga53339a03d720c745790837905bc2171a',1,'snmp_mib2_set_syscontact_readonly(const u8_t *ocstr, const u16_t *ocstrlen): snmp_mib2_system.c'],['../group__snmp__mib2.html#ga53339a03d720c745790837905bc2171a',1,'snmp_mib2_set_syscontact_readonly(const u8_t *ocstr, const u16_t *ocstrlen): snmp_mib2_system.c']]], + ['snmp_5fmib2_5fset_5fsysdescr',['snmp_mib2_set_sysdescr',['../group__snmp__mib2.html#gacde87dc1d3bd669b19d834b028f490cc',1,'snmp_mib2_set_sysdescr(const u8_t *str, const u16_t *len): snmp_mib2_system.c'],['../group__snmp__mib2.html#gacde87dc1d3bd669b19d834b028f490cc',1,'snmp_mib2_set_sysdescr(const u8_t *str, const u16_t *len): snmp_mib2_system.c']]], + ['snmp_5fmib2_5fset_5fsyslocation',['snmp_mib2_set_syslocation',['../group__snmp__mib2.html#ga4248e004a27344b7260574c3a51882f2',1,'snmp_mib2_set_syslocation(u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize): snmp_mib2_system.c'],['../group__snmp__mib2.html#ga4248e004a27344b7260574c3a51882f2',1,'snmp_mib2_set_syslocation(u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize): snmp_mib2_system.c']]], + ['snmp_5fmib2_5fset_5fsyslocation_5freadonly',['snmp_mib2_set_syslocation_readonly',['../group__snmp__mib2.html#gac1759d5b0640943697be2ad538325267',1,'snmp_mib2_set_syslocation_readonly(const u8_t *ocstr, const u16_t *ocstrlen): snmp_mib2_system.c'],['../group__snmp__mib2.html#gac1759d5b0640943697be2ad538325267',1,'snmp_mib2_set_syslocation_readonly(const u8_t *ocstr, const u16_t *ocstrlen): snmp_mib2_system.c']]], + ['snmp_5fmib2_5fset_5fsysname',['snmp_mib2_set_sysname',['../group__snmp__mib2.html#gae7ce98a6ecc0bb92aaa2b330599a2db7',1,'snmp_mib2_set_sysname(u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize): snmp_mib2_system.c'],['../group__snmp__mib2.html#gae7ce98a6ecc0bb92aaa2b330599a2db7',1,'snmp_mib2_set_sysname(u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize): snmp_mib2_system.c']]], + ['snmp_5fmib2_5fset_5fsysname_5freadonly',['snmp_mib2_set_sysname_readonly',['../group__snmp__mib2.html#gab95eb687492fa0e7d762f911c442bdc5',1,'snmp_mib2_set_sysname_readonly(const u8_t *ocstr, const u16_t *ocstrlen): snmp_mib2_system.c'],['../group__snmp__mib2.html#gab95eb687492fa0e7d762f911c442bdc5',1,'snmp_mib2_set_sysname_readonly(const u8_t *ocstr, const u16_t *ocstrlen): snmp_mib2_system.c']]], + ['snmp_5fmib2_5fsnmp_2ec',['snmp_mib2_snmp.c',['../snmp__mib2__snmp_8c.html',1,'']]], + ['snmp_5fmib2_5fsystem_2ec',['snmp_mib2_system.c',['../snmp__mib2__system_8c.html',1,'']]], + ['snmp_5fmib2_5ftcp_2ec',['snmp_mib2_tcp.c',['../snmp__mib2__tcp_8c.html',1,'']]], + ['snmp_5fmib2_5fudp_2ec',['snmp_mib2_udp.c',['../snmp__mib2__udp_8c.html',1,'']]], + ['snmp_5fmib_5fdebug',['SNMP_MIB_DEBUG',['../group__snmp__opts.html#gac12240265db443eaf9d31d187e586c16',1,'snmp_opts.h']]], + ['snmp_5fmib_5ftree_5fresolve_5fexact',['snmp_mib_tree_resolve_exact',['../snmp__core_8c.html#af42d6d2732a92017a43b83a07609fd1a',1,'snmp_core.c']]], + ['snmp_5fmin_5fvalue_5fsize',['SNMP_MIN_VALUE_SIZE',['../group__snmp__opts.html#gac815d0dbe576299546ac612e7eaf3f90',1,'snmp_opts.h']]], + ['snmp_5fmsg_2ec',['snmp_msg.c',['../snmp__msg_8c.html',1,'']]], + ['snmp_5fmsg_2eh',['snmp_msg.h',['../snmp__msg_8h.html',1,'']]], + ['snmp_5fnetconn_2ec',['snmp_netconn.c',['../snmp__netconn_8c.html',1,'']]], + ['snmp_5fnext_5foid_5fcheck',['snmp_next_oid_check',['../snmp__core_8c.html#a18126b2b13f267306c27e851e9379983',1,'snmp_next_oid_check(struct snmp_next_oid_state *state, const u32_t *oid, u8_t oid_len, void *reference): snmp_core.c'],['../snmp__core_8h.html#a18126b2b13f267306c27e851e9379983',1,'snmp_next_oid_check(struct snmp_next_oid_state *state, const u32_t *oid, u8_t oid_len, void *reference): snmp_core.c']]], + ['snmp_5fnext_5foid_5finit',['snmp_next_oid_init',['../snmp__core_8c.html#a8074765d5c2b809561f032d35e59e213',1,'snmp_next_oid_init(struct snmp_next_oid_state *state, const u32_t *start_oid, u8_t start_oid_len, u32_t *next_oid_buf, u8_t next_oid_max_len): snmp_core.c'],['../snmp__core_8h.html#a8074765d5c2b809561f032d35e59e213',1,'snmp_next_oid_init(struct snmp_next_oid_state *state, const u32_t *start_oid, u8_t start_oid_len, u32_t *next_oid_buf, u8_t next_oid_max_len): snmp_core.c']]], + ['snmp_5fnext_5foid_5fprecheck',['snmp_next_oid_precheck',['../snmp__core_8c.html#a9768ecf81f01880dbf1cc1933bd9e60a',1,'snmp_next_oid_precheck(struct snmp_next_oid_state *state, const u32_t *oid, u8_t oid_len): snmp_core.c'],['../snmp__core_8h.html#a9768ecf81f01880dbf1cc1933bd9e60a',1,'snmp_next_oid_precheck(struct snmp_next_oid_state *state, const u32_t *oid, u8_t oid_len): snmp_core.c']]], + ['snmp_5fnext_5foid_5fstate',['snmp_next_oid_state',['../structsnmp__next__oid__state.html',1,'']]], + ['snmp_5fnode',['snmp_node',['../structsnmp__node.html',1,'']]], + ['snmp_5fnode_5finstance',['snmp_node_instance',['../structsnmp__node__instance.html',1,'']]], + ['snmp_5fnode_5ftree',['SNMP_NODE_TREE',['../snmp__core_8h.html#a9ee3aad9305fdd883abb37822be81b72',1,'snmp_core.h']]], + ['snmp_5fobj_5fid',['snmp_obj_id',['../structsnmp__obj__id.html',1,'']]], + ['snmp_5foid_5fappend',['snmp_oid_append',['../snmp__core_8c.html#a5aa6c8dbfc93235b160afaf3a40c1c93',1,'snmp_oid_append(struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len): snmp_core.c'],['../snmp__core_8h.html#a5aa6c8dbfc93235b160afaf3a40c1c93',1,'snmp_oid_append(struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len): snmp_core.c']]], + ['snmp_5foid_5fassign',['snmp_oid_assign',['../snmp__core_8c.html#a41fd5e854d809499e28c66b4918481a6',1,'snmp_oid_assign(struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len): snmp_core.c'],['../snmp__core_8h.html#a41fd5e854d809499e28c66b4918481a6',1,'snmp_oid_assign(struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len): snmp_core.c']]], + ['snmp_5foid_5fcombine',['snmp_oid_combine',['../snmp__core_8c.html#a6edcb88d8162544333bcede301cf0904',1,'snmp_oid_combine(struct snmp_obj_id *target, const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len): snmp_core.c'],['../snmp__core_8h.html#a6edcb88d8162544333bcede301cf0904',1,'snmp_oid_combine(struct snmp_obj_id *target, const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len): snmp_core.c']]], + ['snmp_5foid_5fcompare',['snmp_oid_compare',['../snmp__core_8c.html#af041ab415e8063097c79be2b892174f8',1,'snmp_oid_compare(const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len): snmp_core.c'],['../snmp__core_8h.html#af041ab415e8063097c79be2b892174f8',1,'snmp_oid_compare(const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len): snmp_core.c']]], + ['snmp_5foid_5fequal',['snmp_oid_equal',['../snmp__core_8c.html#ac2b6821b3d4a25033433fc25ffd74c9e',1,'snmp_oid_equal(const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len): snmp_core.c'],['../snmp__core_8h.html#ac2b6821b3d4a25033433fc25ffd74c9e',1,'snmp_oid_equal(const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len): snmp_core.c']]], + ['snmp_5foid_5fin_5frange',['snmp_oid_in_range',['../snmp__core_8c.html#a5275903be5948b1c28bfadb365823504',1,'snmp_oid_in_range(const u32_t *oid_in, u8_t oid_len, const struct snmp_oid_range *oid_ranges, u8_t oid_ranges_len): snmp_core.c'],['../snmp__core_8h.html#a5275903be5948b1c28bfadb365823504',1,'snmp_oid_in_range(const u32_t *oid_in, u8_t oid_len, const struct snmp_oid_range *oid_ranges, u8_t oid_ranges_len): snmp_core.c']]], + ['snmp_5foid_5fprefix',['snmp_oid_prefix',['../snmp__core_8c.html#a32256b37b211b4f59d8f114cee364f39',1,'snmp_oid_prefix(struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len): snmp_core.c'],['../snmp__core_8h.html#a32256b37b211b4f59d8f114cee364f39',1,'snmp_oid_prefix(struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len): snmp_core.c']]], + ['snmp_5foid_5frange',['snmp_oid_range',['../structsnmp__oid__range.html',1,'']]], + ['snmp_5foid_5fto_5fip',['snmp_oid_to_ip',['../snmp__core_8c.html#a66aac86af921cd8aecb95eb252eb3e84',1,'snmp_oid_to_ip(const u32_t *oid, u8_t oid_len, ip_addr_t *ip): snmp_core.c'],['../snmp__core_8h.html#a66aac86af921cd8aecb95eb252eb3e84',1,'snmp_oid_to_ip(const u32_t *oid, u8_t oid_len, ip_addr_t *ip): snmp_core.c']]], + ['snmp_5foid_5fto_5fip4',['snmp_oid_to_ip4',['../snmp__core_8c.html#a095efcd4202782e57625d7b1afcdbf77',1,'snmp_oid_to_ip4(const u32_t *oid, ip4_addr_t *ip): snmp_core.c'],['../snmp__core_8h.html#a095efcd4202782e57625d7b1afcdbf77',1,'snmp_oid_to_ip4(const u32_t *oid, ip4_addr_t *ip): snmp_core.c']]], + ['snmp_5foid_5fto_5fip6',['snmp_oid_to_ip6',['../snmp__core_8c.html#aa1b651a1faf6f1ee0dfdbea48310ed09',1,'snmp_oid_to_ip6(const u32_t *oid, ip6_addr_t *ip): snmp_core.c'],['../snmp__core_8h.html#aa1b651a1faf6f1ee0dfdbea48310ed09',1,'snmp_oid_to_ip6(const u32_t *oid, ip6_addr_t *ip): snmp_core.c']]], + ['snmp_5foid_5fto_5fip_5fport',['snmp_oid_to_ip_port',['../snmp__core_8c.html#a21f02b239cc9abae586f5ef92923e507',1,'snmp_oid_to_ip_port(const u32_t *oid, u8_t oid_len, ip_addr_t *ip, u16_t *port): snmp_core.c'],['../snmp__core_8h.html#a21f02b239cc9abae586f5ef92923e507',1,'snmp_oid_to_ip_port(const u32_t *oid, u8_t oid_len, ip_addr_t *ip, u16_t *port): snmp_core.c']]], + ['snmp_5fopts_2eh',['snmp_opts.h',['../snmp__opts_8h.html',1,'']]], + ['snmp_5fpbuf_5fstream_2ec',['snmp_pbuf_stream.c',['../snmp__pbuf__stream_8c.html',1,'']]], + ['snmp_5fpbuf_5fstream_2eh',['snmp_pbuf_stream.h',['../snmp__pbuf__stream_8h.html',1,'']]], + ['snmp_5fraw_2ec',['snmp_raw.c',['../snmp__raw_8c.html',1,'']]], + ['snmp_5fsafe_5frequests',['SNMP_SAFE_REQUESTS',['../group__snmp__opts.html#ga95e39047b9bcb385780b06b35af49261',1,'snmp_opts.h']]], + ['snmp_5fscalar_2ec',['snmp_scalar.c',['../snmp__scalar_8c.html',1,'']]], + ['snmp_5fscalar_2eh',['snmp_scalar.h',['../snmp__scalar_8h.html',1,'']]], + ['snmp_5fscalar_5farray_5fnode',['snmp_scalar_array_node',['../structsnmp__scalar__array__node.html',1,'']]], + ['snmp_5fscalar_5farray_5fnode_5fdef',['snmp_scalar_array_node_def',['../structsnmp__scalar__array__node__def.html',1,'']]], + ['snmp_5fscalar_5fnode',['snmp_scalar_node',['../structsnmp__scalar__node.html',1,'']]], + ['snmp_5fsend_5ftrap',['snmp_send_trap',['../group__snmp__traps.html#ga96cc7af0118d75049609872ea41187cd',1,'snmp_send_trap(const struct snmp_obj_id *eoid, s32_t generic_trap, s32_t specific_trap, struct snmp_varbind *varbinds): snmp_traps.c'],['../group__snmp__traps.html#ga96cc7af0118d75049609872ea41187cd',1,'snmp_send_trap(const struct snmp_obj_id *oid, s32_t generic_trap, s32_t specific_trap, struct snmp_varbind *varbinds): snmp_traps.c']]], + ['snmp_5fsend_5ftrap_5fgeneric',['snmp_send_trap_generic',['../group__snmp__traps.html#ga0e044259289cb690197173f93c17607d',1,'snmp_send_trap_generic(s32_t generic_trap): snmp_traps.c'],['../group__snmp__traps.html#ga0e044259289cb690197173f93c17607d',1,'snmp_send_trap_generic(s32_t generic_trap): snmp_traps.c']]], + ['snmp_5fsend_5ftrap_5fspecific',['snmp_send_trap_specific',['../group__snmp__traps.html#ga56bdce04e9e77cb3f8a872718cd273d1',1,'snmp_send_trap_specific(s32_t specific_trap, struct snmp_varbind *varbinds): snmp_traps.c'],['../group__snmp__traps.html#ga56bdce04e9e77cb3f8a872718cd273d1',1,'snmp_send_trap_specific(s32_t specific_trap, struct snmp_varbind *varbinds): snmp_traps.c']]], + ['snmp_5fset_5fauth_5ftraps_5fenabled',['snmp_set_auth_traps_enabled',['../group__snmp__traps.html#gacaf816ff917f7b7e5d00ed6c9f79b51c',1,'snmp_set_auth_traps_enabled(u8_t enable): snmp_traps.c'],['../group__snmp__traps.html#gacaf816ff917f7b7e5d00ed6c9f79b51c',1,'snmp_set_auth_traps_enabled(u8_t enable): snmp_traps.c']]], + ['snmp_5fset_5fcommunity',['snmp_set_community',['../group__snmp__core.html#ga30cc587a260757fdb2b81d462f430ef1',1,'snmp_set_community(const char *const community): snmp_msg.c'],['../group__snmp__core.html#ga30cc587a260757fdb2b81d462f430ef1',1,'snmp_set_community(const char *const community): snmp_msg.c']]], + ['snmp_5fset_5fcommunity_5ftrap',['snmp_set_community_trap',['../group__snmp__traps.html#ga5631711f357b6610be7e93b1c6d87760',1,'snmp_set_community_trap(const char *const community): snmp_msg.c'],['../group__snmp__traps.html#ga5631711f357b6610be7e93b1c6d87760',1,'snmp_set_community_trap(const char *const community): snmp_msg.c']]], + ['snmp_5fset_5fcommunity_5fwrite',['snmp_set_community_write',['../group__snmp__core.html#ga341461766863cff46a44e5f431f2da01',1,'snmp_set_community_write(const char *const community): snmp_msg.c'],['../group__snmp__core.html#ga341461766863cff46a44e5f431f2da01',1,'snmp_set_community_write(const char *const community): snmp_msg.c']]], + ['snmp_5fset_5fdevice_5fenterprise_5foid',['snmp_set_device_enterprise_oid',['../group__snmp__core.html#gacc71ac857bf9215f06a624dda09abe3a',1,'snmp_set_device_enterprise_oid(const struct snmp_obj_id *device_enterprise_oid): snmp_core.c'],['../group__snmp__core.html#gacc71ac857bf9215f06a624dda09abe3a',1,'snmp_set_device_enterprise_oid(const struct snmp_obj_id *device_enterprise_oid): snmp_core.c']]], + ['snmp_5fset_5fmibs',['snmp_set_mibs',['../group__snmp__core.html#ga29c76474971f25d038fd486447c70e21',1,'snmp_set_mibs(const struct snmp_mib **mibs, u8_t num_mibs): snmp_core.c'],['../group__snmp__core.html#ga29c76474971f25d038fd486447c70e21',1,'snmp_set_mibs(const struct snmp_mib **mibs, u8_t num_mibs): snmp_core.c']]], + ['snmp_5fset_5fwrite_5fcallback',['snmp_set_write_callback',['../group__snmp__core.html#gaff6a6b39322e92862ab55cfcddfe254b',1,'snmp_set_write_callback(snmp_write_callback_fct write_callback, void *callback_arg): snmp_msg.c'],['../group__snmp__core.html#gaff6a6b39322e92862ab55cfcddfe254b',1,'snmp_set_write_callback(snmp_write_callback_fct write_callback, void *callback_arg): snmp_msg.c']]], + ['snmp_5fstack_5fsize',['SNMP_STACK_SIZE',['../group__snmp__opts.html#ga0dcacdccc61216c6773943ad3fd31242',1,'snmp_opts.h']]], + ['snmp_5ftable_2ec',['snmp_table.c',['../snmp__table_8c.html',1,'']]], + ['snmp_5ftable_2eh',['snmp_table.h',['../snmp__table_8h.html',1,'']]], + ['snmp_5ftable_5fcol_5fdef',['snmp_table_col_def',['../structsnmp__table__col__def.html',1,'']]], + ['snmp_5ftable_5fcolumn_5fdata_5ftype_5ft',['snmp_table_column_data_type_t',['../snmp__table_8h.html#af9b59f3ba7dccf338fe6e5bc1c4b1db5',1,'snmp_table.h']]], + ['snmp_5ftable_5fnode',['snmp_table_node',['../structsnmp__table__node.html',1,'']]], + ['snmp_5ftable_5fsimple_5fnode',['snmp_table_simple_node',['../structsnmp__table__simple__node.html',1,'']]], + ['snmp_5fthread_5fprio',['SNMP_THREAD_PRIO',['../group__snmp__opts.html#gad9bce0d9c05ed4607d72de7b75f2a80b',1,'snmp_opts.h']]], + ['snmp_5fthreadsync_2ec',['snmp_threadsync.c',['../snmp__threadsync_8c.html',1,'']]], + ['snmp_5fthreadsync_2eh',['snmp_threadsync.h',['../snmp__threadsync_8h.html',1,'']]], + ['snmp_5fthreadsync_5finit',['snmp_threadsync_init',['../snmp__threadsync_8c.html#a36e5b1dbb067641b7a6ac486b4ec15b6',1,'snmp_threadsync_init(struct snmp_threadsync_instance *instance, snmp_threadsync_synchronizer_fn sync_fn): snmp_threadsync.c'],['../snmp__threadsync_8h.html#a36e5b1dbb067641b7a6ac486b4ec15b6',1,'snmp_threadsync_init(struct snmp_threadsync_instance *instance, snmp_threadsync_synchronizer_fn sync_fn): snmp_threadsync.c']]], + ['snmp_5fthreadsync_5finstance',['snmp_threadsync_instance',['../structsnmp__threadsync__instance.html',1,'']]], + ['snmp_5fthreadsync_5fnode',['snmp_threadsync_node',['../structsnmp__threadsync__node.html',1,'']]], + ['snmp_5ftrap_5fdestinations',['SNMP_TRAP_DESTINATIONS',['../group__snmp__opts.html#ga692343b0cc555c302fd713003d4f8a08',1,'snmp_opts.h']]], + ['snmp_5ftrap_5fdst_5fenable',['snmp_trap_dst_enable',['../group__snmp__traps.html#gab101505be59778cf0f2f1ac40bcf3f32',1,'snmp_trap_dst_enable(u8_t dst_idx, u8_t enable): snmp_traps.c'],['../group__snmp__traps.html#gab101505be59778cf0f2f1ac40bcf3f32',1,'snmp_trap_dst_enable(u8_t dst_idx, u8_t enable): snmp_traps.c']]], + ['snmp_5ftrap_5fdst_5fip_5fset',['snmp_trap_dst_ip_set',['../group__snmp__traps.html#ga15e4afbf80ed2260850842e6608c6d86',1,'snmp_trap_dst_ip_set(u8_t dst_idx, const ip_addr_t *dst): snmp_traps.c'],['../group__snmp__traps.html#ga15e4afbf80ed2260850842e6608c6d86',1,'snmp_trap_dst_ip_set(u8_t dst_idx, const ip_addr_t *dst): snmp_traps.c']]], + ['snmp_5ftraps_2ec',['snmp_traps.c',['../snmp__traps_8c.html',1,'']]], + ['snmp_5ftraps_5fhandle',['snmp_traps_handle',['../snmp__msg_8h.html#ade16efa80e2c2a20236d3cb96b19c79a',1,'snmp_traps_handle(): snmp_traps.c'],['../snmp__traps_8c.html#ade16efa80e2c2a20236d3cb96b19c79a',1,'snmp_traps_handle(): snmp_traps.c']]], + ['snmp_5ftree_5fnode',['snmp_tree_node',['../structsnmp__tree__node.html',1,'']]], + ['snmp_5fuse_5fnetconn',['SNMP_USE_NETCONN',['../group__snmp__opts.html#gaf02e8b4b69e99df784e9953401477078',1,'snmp_opts.h']]], + ['snmp_5fuse_5fraw',['SNMP_USE_RAW',['../group__snmp__opts.html#ga8c93f4260af2eb3c50d4bc603f716f1f',1,'snmp_opts.h']]], + ['snmp_5fvarbind',['snmp_varbind',['../structsnmp__varbind.html',1,'']]], + ['snmp_5fvarbind_5flen',['snmp_varbind_len',['../structsnmp__varbind__len.html',1,'']]], + ['snmp_5fvarbind_5flength',['snmp_varbind_length',['../snmp__msg_8c.html#ac1f684dada963f68b71a04a702f28fe5',1,'snmp_varbind_length(struct snmp_varbind *varbind, struct snmp_varbind_len *len): snmp_msg.c'],['../snmp__msg_8h.html#ac1f684dada963f68b71a04a702f28fe5',1,'snmp_varbind_length(struct snmp_varbind *varbind, struct snmp_varbind_len *len): snmp_msg.c']]], + ['snmp_5fvariant_5fvalue',['snmp_variant_value',['../unionsnmp__variant__value.html',1,'']]], + ['snmpv3_2ec',['snmpv3.c',['../snmpv3_8c.html',1,'']]], + ['snmpv3_2eh',['snmpv3.h',['../snmpv3_8h.html',1,'']]], + ['snmpv3_5fmbedtls_2ec',['snmpv3_mbedtls.c',['../snmpv3__mbedtls_8c.html',1,'']]], + ['snmpv3_5fpriv_2eh',['snmpv3_priv.h',['../snmpv3__priv_8h.html',1,'']]], + ['sntp',['SNTP',['../group__sntp.html',1,'']]], + ['sntp_2ec',['sntp.c',['../sntp_8c.html',1,'']]], + ['sntp_2eh',['sntp.h',['../sntp_8h.html',1,'']]], + ['sntp_5fcheck_5fresponse',['SNTP_CHECK_RESPONSE',['../group__sntp__opts.html#ga7d4e12d90912d486e64f289d7f3ca446',1,'sntp_opts.h']]], + ['sntp_5fcomp_5froundtrip',['SNTP_COMP_ROUNDTRIP',['../group__sntp__opts.html#ga1e21781705d3549a305339fd7fca63e7',1,'sntp_opts.h']]], + ['sntp_5fdebug',['SNTP_DEBUG',['../group__sntp__opts.html#ga25c6f9c14c17e218d110d826b09f8d91',1,'sntp_opts.h']]], + ['sntp_5fenabled',['sntp_enabled',['../group__sntp.html#ga3fe5254e5a056fca80802d9f26b9c3c5',1,'sntp_enabled(void): sntp.c'],['../group__sntp.html#ga3fe5254e5a056fca80802d9f26b9c3c5',1,'sntp_enabled(void): sntp.c']]], + ['sntp_5ffrac_5fto_5fus',['SNTP_FRAC_TO_US',['../sntp_8c.html#aebe74c93643ac9b8c8a9c7d223192c8f',1,'sntp.c']]], + ['sntp_5fget_5fservers_5ffrom_5fdhcp',['SNTP_GET_SERVERS_FROM_DHCP',['../group__sntp__opts.html#ga961a61eef942ab5378cff1e3742b3ade',1,'sntp_opts.h']]], + ['sntp_5fget_5fsystem_5ftime',['SNTP_GET_SYSTEM_TIME',['../group__sntp__opts.html#gab0ea385479a5c5c8c173f165ded2fb63',1,'sntp_opts.h']]], + ['sntp_5fgetoperatingmode',['sntp_getoperatingmode',['../group__sntp.html#gae66404a551d5cef420cf844a71356fae',1,'sntp_getoperatingmode(void): sntp.c'],['../group__sntp.html#gae66404a551d5cef420cf844a71356fae',1,'sntp_getoperatingmode(void): sntp.c']]], + ['sntp_5fgetreachability',['sntp_getreachability',['../group__sntp.html#gac8097829a81cb6f37d9acf8efb2cc82e',1,'sntp_getreachability(u8_t idx): sntp.c'],['../group__sntp.html#gac8097829a81cb6f37d9acf8efb2cc82e',1,'sntp_getreachability(u8_t idx): sntp.c']]], + ['sntp_5fgetserver',['sntp_getserver',['../group__sntp.html#ga2a28523cb9f2b5b025a4818bc2c1afc1',1,'sntp_getserver(u8_t idx): sntp.c'],['../group__sntp.html#ga2a28523cb9f2b5b025a4818bc2c1afc1',1,'sntp_getserver(u8_t idx): sntp.c']]], + ['sntp_5finit',['sntp_init',['../group__sntp.html#ga9b300c6616de60524c85ea40bf70e2ba',1,'sntp_init(void): sntp.c'],['../group__sntp.html#ga9b300c6616de60524c85ea40bf70e2ba',1,'sntp_init(void): sntp.c']]], + ['sntp_5fmax_5fservers',['SNTP_MAX_SERVERS',['../group__sntp__opts.html#ga5d9dc0827f402849f5c18d44e311dbc2',1,'sntp_opts.h']]], + ['sntp_5fmonitor_5fserver_5freachability',['SNTP_MONITOR_SERVER_REACHABILITY',['../group__sntp__opts.html#ga5782f21ef24ebddd5ba2ce9a889094e3',1,'sntp_opts.h']]], + ['sntp_5fmsg',['sntp_msg',['../structsntp__msg.html',1,'']]], + ['sntp_5fopts_2eh',['sntp_opts.h',['../sntp__opts_8h.html',1,'']]], + ['sntp_5fport',['SNTP_PORT',['../group__sntp__opts.html#gacbee62c27f54371fc2c5259a834a0f9b',1,'sntp_opts.h']]], + ['sntp_5frecv_5ftimeout',['SNTP_RECV_TIMEOUT',['../group__sntp__opts.html#ga44cf26b9b19832d88599244711a12d08',1,'sntp_opts.h']]], + ['sntp_5fretry_5ftimeout',['SNTP_RETRY_TIMEOUT',['../group__sntp__opts.html#ga86d651d8eb07687208308deef95a23ba',1,'sntp_opts.h']]], + ['sntp_5fretry_5ftimeout_5fexp',['SNTP_RETRY_TIMEOUT_EXP',['../group__sntp__opts.html#gafdb7e98f608cc429188d7dac356614c2',1,'sntp_opts.h']]], + ['sntp_5fretry_5ftimeout_5fmax',['SNTP_RETRY_TIMEOUT_MAX',['../group__sntp__opts.html#gafde10b3ed7cb4bb2cd2c4daa389db699',1,'sntp_opts.h']]], + ['sntp_5fserver',['sntp_server',['../structsntp__server.html',1,'']]], + ['sntp_5fserver_5fdns',['SNTP_SERVER_DNS',['../group__sntp__opts.html#gaef477c145ae404d77188b26b79b6996f',1,'sntp_opts.h']]], + ['sntp_5fset_5fsystem_5ftime',['SNTP_SET_SYSTEM_TIME',['../group__sntp__opts.html#gafe340b98c52dedcbc041267fe13b2da6',1,'sntp_opts.h']]], + ['sntp_5fsetoperatingmode',['sntp_setoperatingmode',['../group__sntp.html#gaae94fb2adadbf9667e9597f8a45bf120',1,'sntp_setoperatingmode(u8_t operating_mode): sntp.c'],['../group__sntp.html#gaae94fb2adadbf9667e9597f8a45bf120',1,'sntp_setoperatingmode(u8_t operating_mode): sntp.c']]], + ['sntp_5fsetserver',['sntp_setserver',['../group__sntp.html#ga4fa038dcea66349fafdbe1cc3e52ff3a',1,'sntp_setserver(u8_t idx, const ip_addr_t *server): sntp.c'],['../group__sntp.html#ga4fa038dcea66349fafdbe1cc3e52ff3a',1,'sntp_setserver(u8_t idx, const ip_addr_t *addr): sntp.c']]], + ['sntp_5fstartup_5fdelay',['SNTP_STARTUP_DELAY',['../group__sntp__opts.html#ga22017d43da7d4bf8d42e786b4ced4dfa',1,'sntp_opts.h']]], + ['sntp_5fstartup_5fdelay_5ffunc',['SNTP_STARTUP_DELAY_FUNC',['../group__sntp__opts.html#gae082c2f3044d500ca5e1be1d4928de75',1,'sntp_opts.h']]], + ['sntp_5fstop',['sntp_stop',['../group__sntp.html#ga8119fc2d1ff7ff6eba511cc9c7167488',1,'sntp_stop(void): sntp.c'],['../group__sntp.html#ga8119fc2d1ff7ff6eba511cc9c7167488',1,'sntp_stop(void): sntp.c']]], + ['sntp_5ftime',['sntp_time',['../structsntp__time.html',1,'']]], + ['sntp_5ftimestamps',['sntp_timestamps',['../structsntp__timestamps.html',1,'']]], + ['sntp_5fupdate_5fdelay',['SNTP_UPDATE_DELAY',['../group__sntp__opts.html#ga9232c56443115be05a2f852eba21979c',1,'sntp_opts.h']]], + ['so_5freuse',['SO_REUSE',['../group__lwip__opts__socket.html#gaf3822feed320cf8439b083ee525e4942',1,'opt.h']]], + ['so_5freuse_5frxtoall',['SO_REUSE_RXTOALL',['../group__lwip__opts__socket.html#gae9395d83af89002343e5782130f52f44',1,'opt.h']]], + ['sockaddr_5faligned',['sockaddr_aligned',['../unionsockaddr__aligned.html',1,'']]], + ['socket',['socket',['../structnetconn.html#ac8e05eb65774665e364a3dcf0f139b36',1,'netconn::socket()'],['../group__socket.html#ga862d8f4070c66dddb979540ce9ba6a83',1,'socket(): sockets.h'],['../group__socket.html',1,'(Global Namespace)']]], + ['socket_2eh',['socket.h',['../socket_8h.html',1,'']]], + ['sockets_2ec',['sockets.c',['../sockets_8c.html',1,'']]], + ['sockets_2eh',['sockets.h',['../sockets_8h.html',1,'']]], + ['sockets_5fdebug',['SOCKETS_DEBUG',['../group__lwip__opts__debugmsg.html#ga509594f3ba7d8b1356628b50b55a0934',1,'opt.h']]], + ['sockets_5fpriv_2eh',['sockets_priv.h',['../sockets__priv_8h.html',1,'']]], + ['source_5faddr',['source_addr',['../structmdns__packet.html#aaa64cc21495dc6bb76ed9125904dd07a',1,'mdns_packet']]], + ['source_5faddress',['source_address',['../structieee__802154__hdr.html#aa96c037381583756e79bc6ecede27937',1,'ieee_802154_hdr']]], + ['source_5fpan_5fid',['source_pan_id',['../structieee__802154__hdr.html#ab67fc612a7fd7dcaf46401e4719fa2b2',1,'ieee_802154_hdr']]], + ['src',['src',['../structip6__hdr.html#af0df3214134f29827c27e66b2970c6ef',1,'ip6_hdr']]], + ['state',['state',['../structsmtp__session.html#aed9c182738767279c2b58b1e3322db09',1,'smtp_session::state()'],['../structnetconn.html#a936c33090ec35e5e8c0011be5515a589',1,'netconn::state()'],['../structautoip.html#a51af55190548e378e310aeaddfa1fdef',1,'autoip::state()'],['../structnetif.html#a809cc57c0dff09c5c9ae45b02c2002f3',1,'netif::state()'],['../structnetif__ext__callback__args__t_1_1link__changed__s.html#a39870f966a2a64a7f51747b45977296c',1,'netif_ext_callback_args_t::link_changed_s::state()'],['../structnetif__ext__callback__args__t_1_1status__changed__s.html#a207d3afdf0a37d16a61d1253e264d7a7',1,'netif_ext_callback_args_t::status_changed_s::state()']]], + ['static_5fdata',['static_data',['../structsmtp__send__request.html#a4d517ae8b29caa4f0b371923379d9ef4',1,'smtp_send_request']]], + ['stats',['stats',['../structmemp__desc.html#a05cb67eb408e4736cc0f5e32b5db7500',1,'memp_desc']]], + ['stats_2ec',['stats.c',['../stats_8c.html',1,'']]], + ['stats_2eh',['stats.h',['../stats_8h.html',1,'']]], + ['stats_5f',['stats_',['../structstats__.html',1,'']]], + ['stats_5figmp',['stats_igmp',['../structstats__igmp.html',1,'']]], + ['stats_5finit',['stats_init',['../stats_8c.html#aeaa149d6c0445b22e944a063e0884d0d',1,'stats_init(void): stats.c'],['../stats_8h.html#aeaa149d6c0445b22e944a063e0884d0d',1,'stats_init(void): stats.c']]], + ['stats_5fmem',['stats_mem',['../structstats__mem.html',1,'']]], + ['stats_5fmib2',['stats_mib2',['../structstats__mib2.html',1,'']]], + ['stats_5fmib2_5fnetif_5fctrs',['stats_mib2_netif_ctrs',['../structstats__mib2__netif__ctrs.html',1,'']]], + ['stats_5fproto',['stats_proto',['../structstats__proto.html',1,'']]], + ['stats_5fsys',['stats_sys',['../structstats__sys.html',1,'']]], + ['stats_5fsyselem',['stats_syselem',['../structstats__syselem.html',1,'']]], + ['status_5fcallback',['status_callback',['../structnetif.html#a1513e81d02557d2a950e965f18b53a45',1,'netif']]], + ['status_5fchanged_5fs',['status_changed_s',['../structnetif__ext__callback__args__t_1_1status__changed__s.html',1,'netif_ext_callback_args_t']]], + ['subject',['subject',['../structsmtp__session.html#ab8240801e229ee260f3feeaa270520c7',1,'smtp_session']]], + ['subject_5flen',['subject_len',['../structsmtp__session.html#aea48a6edd3ede02b26882c7b8d72646c',1,'smtp_session']]], + ['swap_5fbytes_5fin_5fword',['SWAP_BYTES_IN_WORD',['../inet__chksum_8h.html#a0196bd603262882d16b5264b52eafe18',1,'inet_chksum.h']]], + ['sys',['sys',['../structstats__.html#a317123da6c92aa9d2fa40e8060357035',1,'stats_']]], + ['sys_2ec',['sys.c',['../sys_8c.html',1,'']]], + ['sys_2eh',['sys.h',['../sys_8h.html',1,'']]], + ['sys_5farch_5fdecl_5fprotect',['SYS_ARCH_DECL_PROTECT',['../group__sys__prot.html#ga945395fa326214fc9736487242710a90',1,'sys.h']]], + ['sys_5farch_5fmbox_5ffetch',['sys_arch_mbox_fetch',['../group__sys__mbox.html#ga6464cd77cf6799bd8b3d6c840166a2e8',1,'sys.h']]], + ['sys_5farch_5fmbox_5ftryfetch',['sys_arch_mbox_tryfetch',['../group__sys__mbox.html#gafab441b130b4ec417012835dbe1e497c',1,'sys.h']]], + ['sys_5farch_5fprotect',['SYS_ARCH_PROTECT',['../group__sys__prot.html#ga3d0e48feafd378e9c26c64567ecd8bab',1,'sys.h']]], + ['sys_5farch_5fsem_5fwait',['sys_arch_sem_wait',['../group__sys__sem.html#ga8d364c5037778acb21c3df675db81b4f',1,'sys.h']]], + ['sys_5farch_5ftimeout',['SYS_ARCH_TIMEOUT',['../sys_8h.html#ac1495030a8ab5e1f3c89e42ced527c5b',1,'sys.h']]], + ['sys_5farch_5funprotect',['SYS_ARCH_UNPROTECT',['../group__sys__prot.html#ga2f48e97047945642ddeb27e65bf4ffe2',1,'sys.h']]], + ['sys_5fcheck_5ftimeouts',['sys_check_timeouts',['../group__lwip__nosys.html#ga83cffdf69ab60fd0eba9d17d363f9883',1,'sys_check_timeouts(void): timeouts.c'],['../group__lwip__nosys.html#ga83cffdf69ab60fd0eba9d17d363f9883',1,'sys_check_timeouts(void): timeouts.c']]], + ['sys_5fdebug',['SYS_DEBUG',['../group__lwip__opts__debugmsg.html#ga2960ae20008f05da8cc0714f36365642',1,'opt.h']]], + ['sys_5finit',['sys_init',['../group__sys__misc.html#gaf411a8bc6b7ed4b0af9114e10c959448',1,'sys_init(void): sys.h'],['../sys_init.html',1,'(Global Namespace)']]], + ['sys_5fjiffies',['sys_jiffies',['../sys_8h.html#ac89f307e8b360eaf821b461a4f26753a',1,'sys.h']]], + ['sys_5flightweight_5fprot',['SYS_LIGHTWEIGHT_PROT',['../group__lwip__opts__lock.html#gae85efb3a5fcf8585c94b3c2669978959',1,'opt.h']]], + ['sys_5fmbox_5fempty',['SYS_MBOX_EMPTY',['../sys_8h.html#ab0571e67edca0132b144106e9b319ef9',1,'sys.h']]], + ['sys_5fmbox_5ffree',['sys_mbox_free',['../group__sys__mbox.html#gac641a45812155d2234ef80dd6412882f',1,'sys.h']]], + ['sys_5fmbox_5fnew',['sys_mbox_new',['../group__sys__mbox.html#gab9793f30642de06ce87827e9adbe30cc',1,'sys.h']]], + ['sys_5fmbox_5fpost',['sys_mbox_post',['../group__sys__mbox.html#ga9d068386a3c53dd01b8af99c3ef77555',1,'sys.h']]], + ['sys_5fmbox_5fset_5finvalid',['sys_mbox_set_invalid',['../group__sys__mbox.html#ga53ddec9d7f5500c5b1d982cd17493172',1,'sys.h']]], + ['sys_5fmbox_5fset_5finvalid_5fval',['sys_mbox_set_invalid_val',['../sys_8h.html#ae293feebb61d36f2db99be53702b8203',1,'sys.h']]], + ['sys_5fmbox_5ftryfetch',['sys_mbox_tryfetch',['../sys_8h.html#ab7841780b31ba9c0a39a440aad1fca13',1,'sys.h']]], + ['sys_5fmbox_5ftrypost',['sys_mbox_trypost',['../group__sys__mbox.html#gaa36345e48a49d67cbb0878cd4cbd2195',1,'sys.h']]], + ['sys_5fmbox_5ftrypost_5ffromisr',['sys_mbox_trypost_fromisr',['../group__sys__mbox.html#gaf677a6e76adb7650a3020fdb3cb8429a',1,'sys.h']]], + ['sys_5fmbox_5fvalid',['sys_mbox_valid',['../group__sys__mbox.html#ga8bcfab4bd791dd33f69a778e7585275d',1,'sys.h']]], + ['sys_5fmbox_5fvalid_5fval',['sys_mbox_valid_val',['../sys_8h.html#aae82640d0bdbeec7b9b6511b3f8d99cb',1,'sys.h']]], + ['sys_5fmsleep',['sys_msleep',['../group__sys__misc.html#ga6b8786f43e779953e8b74e983c88682e',1,'sys_msleep(u32_t ms): sys.c'],['../group__sys__misc.html#ga6b8786f43e779953e8b74e983c88682e',1,'sys_msleep(u32_t ms): sys.c']]], + ['sys_5fmutex_5ffree',['sys_mutex_free',['../group__sys__mutex.html#ga16336ce68b741e98204102ca4bc84dd9',1,'sys.h']]], + ['sys_5fmutex_5flock',['sys_mutex_lock',['../group__sys__mutex.html#ga4d4eb9afe5965fa2661dd54ff55d616a',1,'sys.h']]], + ['sys_5fmutex_5fnew',['sys_mutex_new',['../group__sys__mutex.html#ga38e7dae1fd88b338eb1cd97f110f3897',1,'sys.h']]], + ['sys_5fmutex_5fset_5finvalid',['sys_mutex_set_invalid',['../group__sys__mutex.html#ga3f392725971dc837aa56dd7e45fa7ca8',1,'sys.h']]], + ['sys_5fmutex_5funlock',['sys_mutex_unlock',['../group__sys__mutex.html#ga5568f68898fe9d5735f9ce2f665624fb',1,'sys.h']]], + ['sys_5fmutex_5fvalid',['sys_mutex_valid',['../group__sys__mutex.html#gaebe83ba90a6d9c23cdb3eb5d49562c4a',1,'sys.h']]], + ['sys_5fnow',['sys_now',['../group__sys__time.html#ga11316ac1e77418c6fa4ab8869e3fa199',1,'sys.h']]], + ['sys_5frestart_5ftimeouts',['sys_restart_timeouts',['../timeouts_8c.html#a6913959cf264dbe876b7e7c4db1cc13e',1,'sys_restart_timeouts(void): timeouts.c'],['../timeouts_8h.html#a6913959cf264dbe876b7e7c4db1cc13e',1,'sys_restart_timeouts(void): timeouts.c']]], + ['semaphores',['Semaphores',['../group__sys__sem.html',1,'']]], + ['sys_5fsem_5ffree',['sys_sem_free',['../group__sys__sem.html#ga83b781f96c30e915c752065a757da283',1,'sys.h']]], + ['sys_5fsem_5fnew',['sys_sem_new',['../group__sys__sem.html#gaf99da9e34a71855285c535183133dfde',1,'sys.h']]], + ['sys_5fsem_5fset_5finvalid',['sys_sem_set_invalid',['../group__sys__sem.html#ga42a2ab32afbf41a4146a9d135224ef33',1,'sys.h']]], + ['sys_5fsem_5fset_5finvalid_5fval',['sys_sem_set_invalid_val',['../sys_8h.html#a2556e570f6973a6f4d57d0e76ef190d8',1,'sys.h']]], + ['sys_5fsem_5fsignal',['sys_sem_signal',['../group__sys__sem.html#gaaf800273061fcc3f8200fd4e1b9ca875',1,'sys.h']]], + ['sys_5fsem_5fvalid',['sys_sem_valid',['../group__sys__sem.html#ga09a6c052ddaf799139efc56adfa087e4',1,'sys.h']]], + ['sys_5fsem_5fvalid_5fval',['sys_sem_valid_val',['../sys_8h.html#a9e8ad541356786936f23ab83b8f550cc',1,'sys.h']]], + ['sys_5fsem_5fwait',['sys_sem_wait',['../sys_8h.html#a84e7e4bc00255aee84e6e7289a985703',1,'sys.h']]], + ['sys_5fstats',['SYS_STATS',['../group__lwip__opts__stats.html#ga0173549afa76553583e5a02c6a791218',1,'opt.h']]], + ['sys_5fthread_5fnew',['sys_thread_new',['../group__sys__misc.html#ga0d596afdd8dbcfad320172d39b0f607a',1,'sys.h']]], + ['sys_5ftimeout',['sys_timeout',['../timeouts_8c.html#a8deed391626ec8b5423998e33782d7a8',1,'sys_timeout(u32_t msecs, sys_timeout_handler handler, void *arg): timeouts.c'],['../timeouts_8h.html#a8deed391626ec8b5423998e33782d7a8',1,'sys_timeout(u32_t msecs, sys_timeout_handler handler, void *arg): timeouts.c']]], + ['sys_5ftimeout_5fhandler',['sys_timeout_handler',['../timeouts_8h.html#a2ab5bb8173f492563f70a519011b0ac1',1,'timeouts.h']]], + ['sys_5ftimeouts_5finit',['sys_timeouts_init',['../timeouts_8c.html#a60f42f167f496f6f740c8df48f4dd26c',1,'sys_timeouts_init(void): timeouts.c'],['../timeouts_8h.html#a60f42f167f496f6f740c8df48f4dd26c',1,'sys_timeouts_init(void): timeouts.c']]], + ['sys_5ftimeouts_5fsleeptime',['sys_timeouts_sleeptime',['../timeouts_8c.html#aa9971a14a5810cfeb1efd7104cde6664',1,'sys_timeouts_sleeptime(void): timeouts.c'],['../timeouts_8h.html#aa9971a14a5810cfeb1efd7104cde6664',1,'sys_timeouts_sleeptime(void): timeouts.c']]], + ['sys_5ftimeouts_5fsleeptime_5finfinite',['SYS_TIMEOUTS_SLEEPTIME_INFINITE',['../timeouts_8h.html#a9e2b2593e709ff54c7e3c0b003f6f1b0',1,'timeouts.h']]], + ['sys_5funtimeout',['sys_untimeout',['../timeouts_8c.html#adbfcaa78f4b8d71ae0d7f0bcab6f8fb6',1,'sys_untimeout(sys_timeout_handler handler, void *arg): timeouts.c'],['../timeouts_8h.html#adbfcaa78f4b8d71ae0d7f0bcab6f8fb6',1,'sys_untimeout(sys_timeout_handler handler, void *arg): timeouts.c']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_15.html b/Libraries/LwIP/doc/doxygen/output/html/search/all_15.html new file mode 100644 index 0000000..8afe9a0 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_15.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_15.js b/Libraries/LwIP/doc/doxygen/output/html/search/all_15.js new file mode 100644 index 0000000..ddc1378 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_15.js @@ -0,0 +1,201 @@ +var searchData= +[ + ['tls_20layer',['TLS layer',['../group__altcp__tls.html',1,'']]], + ['tcp',['TCP',['../group__lwip__opts__tcp.html',1,'']]], + ['threading',['Threading',['../group__lwip__opts__thread.html',1,'']]], + ['thread_2dsafe_20apis',['Thread-safe APIs',['../group__lwip__opts__threadsafe__apis.html',1,'']]], + ['timers',['Timers',['../group__lwip__opts__timers.html',1,'']]], + ['tcp_20only',['TCP only',['../group__netconn__tcp.html',1,'']]], + ['traps',['Traps',['../group__snmp__traps.html',1,'']]], + ['time',['Time',['../group__sys__time.html',1,'']]], + ['tab',['tab',['../structmemp__desc.html#a9d6b758ce5c3b47a67a7568d38fb3926',1,'memp_desc']]], + ['tcgi',['tCGI',['../structt_c_g_i.html',1,'']]], + ['tcgihandler',['tCGIHandler',['../group__httpd.html#gafe011a487c5e8d03a6b2f629e14e6b5c',1,'httpd.h']]], + ['tcp',['tcp',['../structstats__.html#a32ef1aaa427d62a5c7890de0ac23fe86',1,'stats_']]], + ['tcp_2ec',['tcp.c',['../tcp_8c.html',1,'']]], + ['tcp_2eh',['tcp.h',['../prot_2tcp_8h.html',1,'(Global Namespace)'],['../tcp_8h.html',1,'(Global Namespace)']]], + ['tcp_5fabandon',['tcp_abandon',['../tcp_8c.html#ae4f0f1ca01dbccd680eaa2d8433cd7fe',1,'tcp_abandon(struct tcp_pcb *pcb, int reset): tcp.c'],['../tcp__priv_8h.html#ae4f0f1ca01dbccd680eaa2d8433cd7fe',1,'tcp_abandon(struct tcp_pcb *pcb, int reset): tcp.c']]], + ['tcp_5fabort',['tcp_abort',['../group__tcp__raw.html#ga468c2260ddb01582e966ddcf3c25ce61',1,'tcp_abort(struct tcp_pcb *pcb): tcp.c'],['../group__tcp__raw.html#ga468c2260ddb01582e966ddcf3c25ce61',1,'tcp_abort(struct tcp_pcb *pcb): tcp.c']]], + ['tcp_5faccept',['tcp_accept',['../group__tcp__raw.html#gaff4c3e380fc60c8fb9b3aa95eda94c62',1,'tcp_accept(struct tcp_pcb *pcb, tcp_accept_fn accept): tcp.c'],['../group__tcp__raw.html#gaff4c3e380fc60c8fb9b3aa95eda94c62',1,'tcp_accept(struct tcp_pcb *pcb, tcp_accept_fn accept): tcp.c']]], + ['tcp_5faccept_5ffn',['tcp_accept_fn',['../tcp_8h.html#a00517abce6856d6c82f0efebdafb734d',1,'tcp.h']]], + ['tcp_5factive_5fpcbs',['tcp_active_pcbs',['../tcp_8c.html#a78c09dbae67ccc06b659d9f1a388f911',1,'tcp_active_pcbs(): tcp.c'],['../tcp__priv_8h.html#a78c09dbae67ccc06b659d9f1a388f911',1,'tcp_active_pcbs(): tcp.c']]], + ['tcp_5falloc',['tcp_alloc',['../tcp_8c.html#a1dd6830a42b3c464b5a72f62ae312d0a',1,'tcp_alloc(u8_t prio): tcp.c'],['../tcp__priv_8h.html#a1dd6830a42b3c464b5a72f62ae312d0a',1,'tcp_alloc(u8_t prio): tcp.c']]], + ['tcp_5farg',['tcp_arg',['../group__tcp__raw.html#gac10926e6f76f73e17c0d37aaab3e56b6',1,'tcp_arg(struct tcp_pcb *pcb, void *arg): tcp.c'],['../group__tcp__raw.html#gac10926e6f76f73e17c0d37aaab3e56b6',1,'tcp_arg(struct tcp_pcb *pcb, void *arg): tcp.c']]], + ['tcp_5fbacklog_5faccepted',['tcp_backlog_accepted',['../group__tcp__raw.html#ga619154658137a23839ca3b94882131ca',1,'tcp_backlog_accepted(struct tcp_pcb *pcb): tcp.c'],['../group__tcp__raw.html#ga619154658137a23839ca3b94882131ca',1,'tcp_backlog_accepted(struct tcp_pcb *pcb): tcp.c']]], + ['tcp_5fbacklog_5fdelayed',['tcp_backlog_delayed',['../group__tcp__raw.html#ga427b11c7b98c748ec487cd43093bd2f8',1,'tcp_backlog_delayed(struct tcp_pcb *pcb): tcp.c'],['../group__tcp__raw.html#ga427b11c7b98c748ec487cd43093bd2f8',1,'tcp_backlog_delayed(struct tcp_pcb *pcb): tcp.c']]], + ['tcp_5fbind',['tcp_bind',['../group__tcp__raw.html#gacf5aa67bd7fc66fef43f77a55a1201ee',1,'tcp_bind(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port): tcp.c'],['../group__tcp__raw.html#gacf5aa67bd7fc66fef43f77a55a1201ee',1,'tcp_bind(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port): tcp.c']]], + ['tcp_5fbind_5fnetif',['tcp_bind_netif',['../group__tcp__raw.html#ga6469a15709088e80024258dbe80fcd1f',1,'tcp_bind_netif(struct tcp_pcb *pcb, const struct netif *netif): tcp.c'],['../group__tcp__raw.html#ga6469a15709088e80024258dbe80fcd1f',1,'tcp_bind_netif(struct tcp_pcb *pcb, const struct netif *netif): tcp.c']]], + ['tcp_5fbound_5fpcbs',['tcp_bound_pcbs',['../tcp_8c.html#a1b42a7ac0fc173a42d575f86853d32a8',1,'tcp_bound_pcbs(): tcp.c'],['../tcp__priv_8h.html#a1b42a7ac0fc173a42d575f86853d32a8',1,'tcp_bound_pcbs(): tcp.c']]], + ['tcp_5fbuild_5fmss_5foption',['TCP_BUILD_MSS_OPTION',['../tcp__priv_8h.html#abdc99c343efc6c81abf60bb62b361dd8',1,'tcp_priv.h']]], + ['tcp_5fcalculate_5feff_5fsend_5fmss',['TCP_CALCULATE_EFF_SEND_MSS',['../group__lwip__opts__tcp.html#gac04b84d32251ac558f0c3a8af85ba3a5',1,'opt.h']]], + ['tcp_5fchecksum_5fon_5fcopy',['TCP_CHECKSUM_ON_COPY',['../tcp__priv_8h.html#aea0c47b916a8a25f82d2063335033aee',1,'tcp_priv.h']]], + ['tcp_5fchecksum_5fon_5fcopy_5fsanity_5fcheck',['TCP_CHECKSUM_ON_COPY_SANITY_CHECK',['../tcp__out_8c.html#a25d7e9081baa5c84f2ebd34b0eb4169b',1,'tcp_out.c']]], + ['tcp_5fclose',['tcp_close',['../group__tcp__raw.html#ga87093e137fcc53ea82a134a3f5b33623',1,'tcp_close(struct tcp_pcb *pcb): tcp.c'],['../group__tcp__raw.html#ga87093e137fcc53ea82a134a3f5b33623',1,'tcp_close(struct tcp_pcb *pcb): tcp.c']]], + ['tcp_5fconnect',['tcp_connect',['../group__tcp__raw.html#ga9a31deea4cadacd39f9485f37cfdd012',1,'tcp_connect(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port, tcp_connected_fn connected): tcp.c'],['../group__tcp__raw.html#ga9a31deea4cadacd39f9485f37cfdd012',1,'tcp_connect(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port, tcp_connected_fn connected): tcp.c']]], + ['tcp_5fconnected_5ffn',['tcp_connected_fn',['../tcp_8h.html#a939867106bd492caf2d85852fb7f6ae8',1,'tcp.h']]], + ['tcp_5fcwnd_5fdebug',['TCP_CWND_DEBUG',['../group__lwip__opts__debugmsg.html#ga66df03d8192cd978d3321a9d68bf5411',1,'opt.h']]], + ['tcp_5fdebug',['TCP_DEBUG',['../group__lwip__opts__debugmsg.html#ga4f43bb8a430c7a52a1ad5086d3f2803c',1,'opt.h']]], + ['tcp_5fdefault_5flisten_5fbacklog',['TCP_DEFAULT_LISTEN_BACKLOG',['../group__lwip__opts__tcp.html#ga93cce3f47e33df11248c908d1775bacf',1,'opt.h']]], + ['tcp_5fdo_5foutput_5fnagle',['tcp_do_output_nagle',['../tcp__priv_8h.html#afbd7a2997e3a3b7569efc3298e2e409f',1,'tcp_priv.h']]], + ['tcp_5feff_5fsend_5fmss_5fnetif',['tcp_eff_send_mss_netif',['../tcp_8c.html#a08a3b5396c40f32dd8b21e7d63b3e1b3',1,'tcp_eff_send_mss_netif(u16_t sendmss, struct netif *outif, const ip_addr_t *dest): tcp.c'],['../tcp__priv_8h.html#a08a3b5396c40f32dd8b21e7d63b3e1b3',1,'tcp_eff_send_mss_netif(u16_t sendmss, struct netif *outif, const ip_addr_t *dest): tcp.c']]], + ['tcp_5fenqueue_5fflags',['tcp_enqueue_flags',['../tcp__out_8c.html#aa7d5d552647d567095876aab202bfd1a',1,'tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags): tcp_out.c'],['../tcp__priv_8h.html#aa7d5d552647d567095876aab202bfd1a',1,'tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags): tcp_out.c']]], + ['tcp_5ferr',['tcp_err',['../group__tcp__raw.html#gae1346c4e34d3bc7c01e1b47142ab3121',1,'tcp_err(struct tcp_pcb *pcb, tcp_err_fn err): tcp.c'],['../group__tcp__raw.html#gae1346c4e34d3bc7c01e1b47142ab3121',1,'tcp_err(struct tcp_pcb *pcb, tcp_err_fn err): tcp.c']]], + ['tcp_5ferr_5ffn',['tcp_err_fn',['../tcp_8h.html#a1b4f9e3551e575c0ef06d6daa7f06e55',1,'tcp.h']]], + ['tcp_5fext_5farg_5falloc_5fid',['tcp_ext_arg_alloc_id',['../group__tcp__raw__extargs.html#ga4836e0b4f66439493e106a50400d1616',1,'tcp_ext_arg_alloc_id(void): tcp.c'],['../group__tcp__raw__extargs.html#ga4836e0b4f66439493e106a50400d1616',1,'tcp_ext_arg_alloc_id(void): tcp.c']]], + ['tcp_5fext_5farg_5fcallbacks',['tcp_ext_arg_callbacks',['../structtcp__ext__arg__callbacks.html',1,'']]], + ['tcp_5fext_5farg_5fget',['tcp_ext_arg_get',['../group__tcp__raw__extargs.html#gaa8ac7a74407cb3e0e01a30314805f990',1,'tcp_ext_arg_get(const struct tcp_pcb *pcb, uint8_t id): tcp.c'],['../group__tcp__raw__extargs.html#gaa8ac7a74407cb3e0e01a30314805f990',1,'tcp_ext_arg_get(const struct tcp_pcb *pcb, uint8_t id): tcp.c']]], + ['tcp_5fext_5farg_5finvoke_5fcallbacks_5fpassive_5fopen',['tcp_ext_arg_invoke_callbacks_passive_open',['../tcp_8c.html#a5265b1df024d04287ed3edc02b1b9ccc',1,'tcp_ext_arg_invoke_callbacks_passive_open(struct tcp_pcb_listen *lpcb, struct tcp_pcb *cpcb): tcp.c'],['../tcp__priv_8h.html#a5265b1df024d04287ed3edc02b1b9ccc',1,'tcp_ext_arg_invoke_callbacks_passive_open(struct tcp_pcb_listen *lpcb, struct tcp_pcb *cpcb): tcp.c']]], + ['tcp_5fext_5farg_5fset',['tcp_ext_arg_set',['../group__tcp__raw__extargs.html#ga58500cb2ce22438e16a37373595af318',1,'tcp_ext_arg_set(struct tcp_pcb *pcb, uint8_t id, void *arg): tcp.c'],['../group__tcp__raw__extargs.html#ga58500cb2ce22438e16a37373595af318',1,'tcp_ext_arg_set(struct tcp_pcb *pcb, uint8_t id, void *arg): tcp.c']]], + ['tcp_5fext_5farg_5fset_5fcallbacks',['tcp_ext_arg_set_callbacks',['../group__tcp__raw__extargs.html#ga36e60dc02bfe0437c8da368a62e2f316',1,'tcp_ext_arg_set_callbacks(struct tcp_pcb *pcb, uint8_t id, const struct tcp_ext_arg_callbacks *const callbacks): tcp.c'],['../group__tcp__raw__extargs.html#ga36e60dc02bfe0437c8da368a62e2f316',1,'tcp_ext_arg_set_callbacks(struct tcp_pcb *pcb, uint8_t id, const struct tcp_ext_arg_callbacks *const callbacks): tcp.c']]], + ['tcp_5fextarg_5fcallback_5fpassive_5fopen_5ffn',['tcp_extarg_callback_passive_open_fn',['../tcp_8h.html#aba649c5bdf19d47e39643392b6d88588',1,'tcp.h']]], + ['tcp_5fextarg_5fcallback_5fpcb_5fdestroyed_5ffn',['tcp_extarg_callback_pcb_destroyed_fn',['../tcp_8h.html#a20881e537f5be7847d88fe2a0c8fd2cd',1,'tcp.h']]], + ['tcp_5ffasttmr',['tcp_fasttmr',['../tcp_8c.html#abf446b07e52161b8a53cea07bc6c366d',1,'tcp_fasttmr(void): tcp.c'],['../tcp__priv_8h.html#abf446b07e52161b8a53cea07bc6c366d',1,'tcp_fasttmr(void): tcp.c']]], + ['tcp_5ffr_5fdebug',['TCP_FR_DEBUG',['../group__lwip__opts__debugmsg.html#ga5895bee26e8e1a0b89d597e0f2580b23',1,'opt.h']]], + ['tcp_5ffree',['tcp_free',['../tcp_8c.html#aa2b6b075c27c64dfb8c402ac961fb910',1,'tcp_free(struct tcp_pcb *pcb): tcp.c'],['../tcp__priv_8h.html#aa2b6b075c27c64dfb8c402ac961fb910',1,'tcp_free(struct tcp_pcb *pcb): tcp.c']]], + ['tcp_5fin_2ec',['tcp_in.c',['../tcp__in_8c.html',1,'']]], + ['tcp_5finit',['tcp_init',['../tcp_8c.html#a51de4ded7d342456d31722493c92c969',1,'tcp_init(void): tcp.c'],['../tcp__priv_8h.html#a51de4ded7d342456d31722493c92c969',1,'tcp_init(void): tcp.c']]], + ['tcp_5finput',['tcp_input',['../tcp__in_8c.html#ae70c3c99d9dd6b07f7e11f7ba5eedcb5',1,'tcp_input(struct pbuf *p, struct netif *inp): tcp_in.c'],['../tcp__priv_8h.html#ae70c3c99d9dd6b07f7e11f7ba5eedcb5',1,'tcp_input(struct pbuf *p, struct netif *inp): tcp_in.c']]], + ['tcp_5finput_5fdebug',['TCP_INPUT_DEBUG',['../group__lwip__opts__debugmsg.html#gaf51dc2563536de56470146749f715ba8',1,'opt.h']]], + ['tcp_5fkeepalive',['tcp_keepalive',['../tcp__out_8c.html#a0d8bb5fc8522515aa35d305774cc5332',1,'tcp_keepalive(struct tcp_pcb *pcb): tcp_out.c'],['../tcp__priv_8h.html#a0d8bb5fc8522515aa35d305774cc5332',1,'tcp_keepalive(struct tcp_pcb *pcb): tcp_out.c']]], + ['tcp_5flisten',['tcp_listen',['../group__tcp__raw.html#ga6b2a4efb1fc15d7d85cb71cb2a1d1066',1,'tcp.h']]], + ['tcp_5flisten_5fbacklog',['TCP_LISTEN_BACKLOG',['../group__lwip__opts__tcp.html#ga98b23e7cbd3281915c50a485cb61899d',1,'opt.h']]], + ['tcp_5flisten_5fpcbs',['tcp_listen_pcbs',['../tcp_8c.html#a96fe1350e510d4308ac9969ffb4c9c81',1,'tcp_listen_pcbs(): tcp.c'],['../tcp__priv_8h.html#a96fe1350e510d4308ac9969ffb4c9c81',1,'tcp_listen_pcbs(): tcp.c']]], + ['tcp_5flisten_5fwith_5fbacklog',['tcp_listen_with_backlog',['../group__tcp__raw.html#gaeff14f321d1eecd0431611f382fcd338',1,'tcp_listen_with_backlog(struct tcp_pcb *pcb, u8_t backlog): tcp.c'],['../group__tcp__raw.html#gaeff14f321d1eecd0431611f382fcd338',1,'tcp_listen_with_backlog(struct tcp_pcb *pcb, u8_t backlog): tcp.c']]], + ['tcp_5flisten_5fwith_5fbacklog_5fand_5ferr',['tcp_listen_with_backlog_and_err',['../group__tcp__raw.html#gac86ad8ded4d1db15a5b5fb42eb7c1436',1,'tcp_listen_with_backlog_and_err(struct tcp_pcb *pcb, u8_t backlog, err_t *err): tcp.c'],['../group__tcp__raw.html#gac86ad8ded4d1db15a5b5fb42eb7c1436',1,'tcp_listen_with_backlog_and_err(struct tcp_pcb *pcb, u8_t backlog, err_t *err): tcp.c']]], + ['tcp_5fmaxrtx',['TCP_MAXRTX',['../group__lwip__opts__tcp.html#ga0dee0911197855bdf19ef79778c241a6',1,'opt.h']]], + ['tcp_5fmss',['TCP_MSS',['../group__lwip__opts__tcp.html#gaf1ab7bb27860aa3677c387a2f3ba317b',1,'TCP_MSS(): opt.h'],['../group__tcp__raw.html#gab0b45a01dcd461e5b8df2a1d9ddda134',1,'tcp_mss(): tcp.h']]], + ['tcp_5fnagle_5fdisable',['tcp_nagle_disable',['../group__tcp__raw.html#ga5b5c0093efff4466bda06d45f12a4633',1,'tcp.h']]], + ['tcp_5fnagle_5fdisabled',['tcp_nagle_disabled',['../group__tcp__raw.html#ga9398061411b4af900160233aa3b1a286',1,'tcp.h']]], + ['tcp_5fnagle_5fenable',['tcp_nagle_enable',['../group__tcp__raw.html#ga9dfcdb8a05533b07dca91cf7e784f88f',1,'tcp.h']]], + ['tcp_5fnetif_5fip_5faddr_5fchanged',['tcp_netif_ip_addr_changed',['../tcp_8c.html#a4d0c2d1ad02134c79fc72fe95ee2a703',1,'tcp_netif_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr): tcp.c'],['../tcp__priv_8h.html#a4d0c2d1ad02134c79fc72fe95ee2a703',1,'tcp_netif_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr): tcp.c']]], + ['tcp_5fnew',['tcp_new',['../group__tcp__raw.html#ga7427c5d237fe66a8097bfa8d24ceb943',1,'tcp_new(void): tcp.c'],['../group__tcp__raw.html#ga7427c5d237fe66a8097bfa8d24ceb943',1,'tcp_new(void): tcp.c']]], + ['tcp_5fnew_5fip_5ftype',['tcp_new_ip_type',['../group__tcp__raw.html#gac14e757a21a4a87c6aa52372c210b937',1,'tcp_new_ip_type(u8_t type): tcp.c'],['../group__tcp__raw.html#gac14e757a21a4a87c6aa52372c210b937',1,'tcp_new_ip_type(u8_t type): tcp.c']]], + ['tcp_5fnext_5fiss',['tcp_next_iss',['../tcp_8c.html#afd5dc2fa74855a84b2da642ba31059ea',1,'tcp_next_iss(struct tcp_pcb *pcb): tcp.c'],['../tcp__priv_8h.html#afd5dc2fa74855a84b2da642ba31059ea',1,'tcp_next_iss(struct tcp_pcb *pcb): tcp.c']]], + ['tcp_5fooseq_5fmax_5fbytes',['TCP_OOSEQ_MAX_BYTES',['../group__lwip__opts__tcp.html#ga9d6d3219bb5fc0bc760a64114de13c25',1,'opt.h']]], + ['tcp_5fooseq_5fmax_5fpbufs',['TCP_OOSEQ_MAX_PBUFS',['../group__lwip__opts__tcp.html#ga1f57d3859c4556f785708e5dc440617e',1,'opt.h']]], + ['tcp_5fout_2ec',['tcp_out.c',['../tcp__out_8c.html',1,'']]], + ['tcp_5foutput',['tcp_output',['../group__tcp__raw.html#ga0cbcc6d628f644a530daf629fa3e5f7f',1,'tcp_output(struct tcp_pcb *pcb): tcp_out.c'],['../group__tcp__raw.html#ga0cbcc6d628f644a530daf629fa3e5f7f',1,'tcp_output(struct tcp_pcb *pcb): tcp_out.c']]], + ['tcp_5foutput_5fdebug',['TCP_OUTPUT_DEBUG',['../group__lwip__opts__debugmsg.html#ga9f70601fdc1feee490772bf7fcdb74fb',1,'opt.h']]], + ['tcp_5foversize',['TCP_OVERSIZE',['../group__lwip__opts__tcp.html#ga5648e2580bb55c0efdfbebcf3bad1eef',1,'opt.h']]], + ['tcp_5foversize_5fcalc_5flength',['TCP_OVERSIZE_CALC_LENGTH',['../tcp__out_8c.html#aa2ef22d2384225a1b5fee187411cc129',1,'tcp_out.c']]], + ['tcp_5foversize_5fdbgcheck',['TCP_OVERSIZE_DBGCHECK',['../tcp__priv_8h.html#a178a6e9966d03c3326b9e0568666bb69',1,'tcp_priv.h']]], + ['tcp_5fpcb',['tcp_pcb',['../structtcp__pcb.html',1,'']]], + ['tcp_5fpcb_5fcommon',['TCP_PCB_COMMON',['../tcp_8h.html#a874630045102fc5f1442704a790c8bb8',1,'tcp.h']]], + ['tcp_5fpcb_5flisten',['tcp_pcb_listen',['../structtcp__pcb__listen.html',1,'']]], + ['tcp_5fpcb_5flists',['tcp_pcb_lists',['../tcp_8c.html#a51515507dec664e9d69a870e6b627610',1,'tcp_pcb_lists(): tcp.c'],['../tcp__priv_8h.html#af5e1079ab223e1cb27208c45e3c84df7',1,'tcp_pcb_lists(): tcp.c']]], + ['tcp_5fpcb_5fpurge',['tcp_pcb_purge',['../tcp_8c.html#a44fc672b9d14a65e61040707c45302ba',1,'tcp_pcb_purge(struct tcp_pcb *pcb): tcp.c'],['../tcp__priv_8h.html#a44fc672b9d14a65e61040707c45302ba',1,'tcp_pcb_purge(struct tcp_pcb *pcb): tcp.c']]], + ['tcp_5fpcb_5fremove',['tcp_pcb_remove',['../tcp_8c.html#aaaef096f6a03bf5b778329bb66ee06f6',1,'tcp_pcb_remove(struct tcp_pcb **pcblist, struct tcp_pcb *pcb): tcp.c'],['../tcp__priv_8h.html#aaaef096f6a03bf5b778329bb66ee06f6',1,'tcp_pcb_remove(struct tcp_pcb **pcblist, struct tcp_pcb *pcb): tcp.c']]], + ['tcp_5fpoll',['tcp_poll',['../group__tcp__raw.html#gafba47015098ed7ce523dcf7bdf70f7e5',1,'tcp_poll(struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval): tcp.c'],['../group__tcp__raw.html#gafba47015098ed7ce523dcf7bdf70f7e5',1,'tcp_poll(struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval): tcp.c']]], + ['tcp_5fpoll_5ffn',['tcp_poll_fn',['../tcp_8h.html#a66deb97618a9cd9d57fca28c5245e073',1,'tcp.h']]], + ['tcp_5fpriv_2eh',['tcp_priv.h',['../tcp__priv_8h.html',1,'']]], + ['tcp_5fprocess_5frefused_5fdata',['tcp_process_refused_data',['../tcp_8c.html#a0075b56ad4b0eca7c9d439cf150e1973',1,'tcp_process_refused_data(struct tcp_pcb *pcb): tcp.c'],['../tcp__priv_8h.html#a0075b56ad4b0eca7c9d439cf150e1973',1,'tcp_process_refused_data(struct tcp_pcb *pcb): tcp.c']]], + ['tcp_5fqlen_5fdebug',['TCP_QLEN_DEBUG',['../group__lwip__opts__debugmsg.html#gae7980c7f8eb45cd411bf410ff0a3fc55',1,'opt.h']]], + ['tcp_5fqueue_5fooseq',['TCP_QUEUE_OOSEQ',['../group__lwip__opts__tcp.html#ga89ffd0d7d1529bdb26bfbad267d0ad75',1,'opt.h']]], + ['tcp',['TCP',['../group__tcp__raw.html',1,'']]], + ['tcp_5frecv',['tcp_recv',['../group__tcp__raw.html#ga8afd0b316a87a5eeff4726dc95006ed0',1,'tcp_recv(struct tcp_pcb *pcb, tcp_recv_fn recv): tcp.c'],['../group__tcp__raw.html#ga8afd0b316a87a5eeff4726dc95006ed0',1,'tcp_recv(struct tcp_pcb *pcb, tcp_recv_fn recv): tcp.c']]], + ['tcp_5frecv_5ffn',['tcp_recv_fn',['../tcp_8h.html#a780cfac08b02c66948ab94ea974202e8',1,'tcp.h']]], + ['tcp_5frecv_5fnull',['tcp_recv_null',['../tcp_8c.html#a0cb3f604fc8d20870d8cab291da5701c',1,'tcp_recv_null(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err): tcp.c'],['../tcp__priv_8h.html#a0cb3f604fc8d20870d8cab291da5701c',1,'tcp_recv_null(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err): tcp.c']]], + ['tcp_5frecved',['tcp_recved',['../group__tcp__raw.html#gabdac0856a52b5789dc897d4c7137ec44',1,'tcp_recved(struct tcp_pcb *pcb, u16_t len): tcp.c'],['../group__tcp__raw.html#gabdac0856a52b5789dc897d4c7137ec44',1,'tcp_recved(struct tcp_pcb *pcb, u16_t len): tcp.c']]], + ['tcp_5frexmit',['tcp_rexmit',['../tcp__out_8c.html#af75fefe4fe509845be156d6e424eb6f1',1,'tcp_rexmit(struct tcp_pcb *pcb): tcp_out.c'],['../tcp__priv_8h.html#af75fefe4fe509845be156d6e424eb6f1',1,'tcp_rexmit(struct tcp_pcb *pcb): tcp_out.c']]], + ['tcp_5frexmit_5ffast',['tcp_rexmit_fast',['../tcp__out_8c.html#adb6ee7b4d59f125cc8bfac3bb5ca3937',1,'tcp_rexmit_fast(struct tcp_pcb *pcb): tcp_out.c'],['../tcp__priv_8h.html#adb6ee7b4d59f125cc8bfac3bb5ca3937',1,'tcp_rexmit_fast(struct tcp_pcb *pcb): tcp_out.c']]], + ['tcp_5frexmit_5frto',['tcp_rexmit_rto',['../tcp__out_8c.html#ab5ef9c8ab4629eb721987ae316b9f30f',1,'tcp_rexmit_rto(struct tcp_pcb *pcb): tcp_out.c'],['../tcp__priv_8h.html#ab5ef9c8ab4629eb721987ae316b9f30f',1,'tcp_rexmit_rto(struct tcp_pcb *pcb): tcp_out.c']]], + ['tcp_5frexmit_5frto_5fcommit',['tcp_rexmit_rto_commit',['../tcp__out_8c.html#a9ef9dc094e21bdf0779aed25ab0b08d4',1,'tcp_rexmit_rto_commit(struct tcp_pcb *pcb): tcp_out.c'],['../tcp__priv_8h.html#a9ef9dc094e21bdf0779aed25ab0b08d4',1,'tcp_rexmit_rto_commit(struct tcp_pcb *pcb): tcp_out.c']]], + ['tcp_5frexmit_5frto_5fprepare',['tcp_rexmit_rto_prepare',['../tcp__out_8c.html#a1f318930bd6d49074343cc79c5166f39',1,'tcp_rexmit_rto_prepare(struct tcp_pcb *pcb): tcp_out.c'],['../tcp__priv_8h.html#a1f318930bd6d49074343cc79c5166f39',1,'tcp_rexmit_rto_prepare(struct tcp_pcb *pcb): tcp_out.c']]], + ['tcp_5frst',['tcp_rst',['../tcp__out_8c.html#aa90f8051c9633d3017c588245cdc4014',1,'tcp_rst(const struct tcp_pcb *pcb, u32_t seqno, u32_t ackno, const ip_addr_t *local_ip, const ip_addr_t *remote_ip, u16_t local_port, u16_t remote_port): tcp_out.c'],['../tcp__priv_8h.html#aa90f8051c9633d3017c588245cdc4014',1,'tcp_rst(const struct tcp_pcb *pcb, u32_t seqno, u32_t ackno, const ip_addr_t *local_ip, const ip_addr_t *remote_ip, u16_t local_port, u16_t remote_port): tcp_out.c']]], + ['tcp_5frst_5fdebug',['TCP_RST_DEBUG',['../group__lwip__opts__debugmsg.html#ga37596f7bbb9b7663826244ba54486679',1,'opt.h']]], + ['tcp_5frto_5fdebug',['TCP_RTO_DEBUG',['../group__lwip__opts__debugmsg.html#gad6e52e37415d0d0cbe4931a28f5a9662',1,'opt.h']]], + ['tcp_5fseg_5fcopy',['tcp_seg_copy',['../tcp_8c.html#a569d79451d2570e4ef406775725ef6ef',1,'tcp_seg_copy(struct tcp_seg *seg): tcp.c'],['../tcp__priv_8h.html#a569d79451d2570e4ef406775725ef6ef',1,'tcp_seg_copy(struct tcp_seg *seg): tcp.c']]], + ['tcp_5fseg_5ffree',['tcp_seg_free',['../tcp_8c.html#ac6283651b26f74dba2444159aee88b20',1,'tcp_seg_free(struct tcp_seg *seg): tcp.c'],['../tcp__priv_8h.html#ac6283651b26f74dba2444159aee88b20',1,'tcp_seg_free(struct tcp_seg *seg): tcp.c']]], + ['tcp_5fsegs_5ffree',['tcp_segs_free',['../tcp_8c.html#a3d9bb9809769197bce9b2499d55cf28c',1,'tcp_segs_free(struct tcp_seg *seg): tcp.c'],['../tcp__priv_8h.html#a3d9bb9809769197bce9b2499d55cf28c',1,'tcp_segs_free(struct tcp_seg *seg): tcp.c']]], + ['tcp_5fsend_5fempty_5fack',['tcp_send_empty_ack',['../tcp__out_8c.html#aefde3e34b2cc8df9654986484c44a996',1,'tcp_send_empty_ack(struct tcp_pcb *pcb): tcp_out.c'],['../tcp__priv_8h.html#aefde3e34b2cc8df9654986484c44a996',1,'tcp_send_empty_ack(struct tcp_pcb *pcb): tcp_out.c']]], + ['tcp_5fsend_5ffin',['tcp_send_fin',['../tcp__out_8c.html#af40ba9d645a8910436c3d7cf13dba342',1,'tcp_send_fin(struct tcp_pcb *pcb): tcp_out.c'],['../tcp__priv_8h.html#af40ba9d645a8910436c3d7cf13dba342',1,'tcp_send_fin(struct tcp_pcb *pcb): tcp_out.c']]], + ['tcp_5fsent',['tcp_sent',['../group__tcp__raw.html#ga1596332b93bb6249179f3b89f24bd808',1,'tcp_sent(struct tcp_pcb *pcb, tcp_sent_fn sent): tcp.c'],['../group__tcp__raw.html#ga1596332b93bb6249179f3b89f24bd808',1,'tcp_sent(struct tcp_pcb *pcb, tcp_sent_fn sent): tcp.c']]], + ['tcp_5fsent_5ffn',['tcp_sent_fn',['../tcp_8h.html#aa60622ffaa099e97f66fb56e437fca18',1,'tcp.h']]], + ['tcp_5fsetprio',['tcp_setprio',['../tcp_8c.html#a2c4234f1e95b6bde0e84d4ea97ae95bc',1,'tcp_setprio(struct tcp_pcb *pcb, u8_t prio): tcp.c'],['../tcp_8h.html#a2c4234f1e95b6bde0e84d4ea97ae95bc',1,'tcp_setprio(struct tcp_pcb *pcb, u8_t prio): tcp.c']]], + ['tcp_5fshutdown',['tcp_shutdown',['../group__tcp__raw.html#ga5b94d57f1891b9287f88525a2ac561dd',1,'tcp_shutdown(struct tcp_pcb *pcb, int shut_rx, int shut_tx): tcp.c'],['../group__tcp__raw.html#ga5b94d57f1891b9287f88525a2ac561dd',1,'tcp_shutdown(struct tcp_pcb *pcb, int shut_rx, int shut_tx): tcp.c']]], + ['tcp_5fslowtmr',['tcp_slowtmr',['../tcp_8c.html#a421fb42ef919018e14ae413adfee9905',1,'tcp_slowtmr(void): tcp.c'],['../tcp__priv_8h.html#a421fb42ef919018e14ae413adfee9905',1,'tcp_slowtmr(void): tcp.c']]], + ['tcp_5fsnd_5fbuf',['TCP_SND_BUF',['../group__lwip__opts__tcp.html#ga871d111968d8c6c7880ff36b93c5c4dd',1,'opt.h']]], + ['tcp_5fsnd_5fqueuelen',['TCP_SND_QUEUELEN',['../group__lwip__opts__tcp.html#ga9beaa47832ead4180981bfbf71074904',1,'opt.h']]], + ['tcp_5fsndbuf',['tcp_sndbuf',['../group__tcp__raw.html#gad1a95f09deb49cd7341d35527d6d3e2f',1,'tcp.h']]], + ['tcp_5fsndlowat',['TCP_SNDLOWAT',['../group__lwip__opts__tcp.html#gae5c9866d7cd463ac7b36792182145aec',1,'opt.h']]], + ['tcp_5fsndqueuelen',['tcp_sndqueuelen',['../group__tcp__raw.html#ga53ee4364718e84dc42cb1e0179deb1f4',1,'tcp.h']]], + ['tcp_5fsndqueuelowat',['TCP_SNDQUEUELOWAT',['../group__lwip__opts__tcp.html#ga75659867592a6b01c198532ed1b65698',1,'opt.h']]], + ['tcp_5fsplit_5funsent_5fseg',['tcp_split_unsent_seg',['../tcp__out_8c.html#ac930859c4e4ad9fcf6bb25ef5e91bcd5',1,'tcp_split_unsent_seg(struct tcp_pcb *pcb, u16_t split): tcp_out.c'],['../tcp__priv_8h.html#ac930859c4e4ad9fcf6bb25ef5e91bcd5',1,'tcp_split_unsent_seg(struct tcp_pcb *pcb, u16_t split): tcp_out.c']]], + ['tcp_5fstats',['TCP_STATS',['../group__lwip__opts__stats.html#gaa02ec5c5bc0edebe418680c54d044f58',1,'opt.h']]], + ['tcp_5fsynmaxrtx',['TCP_SYNMAXRTX',['../group__lwip__opts__tcp.html#ga50b434a8541a4813f7b27f576c05d1b6',1,'opt.h']]], + ['tcp_5ftimer_5fneeded',['tcp_timer_needed',['../timeouts_8c.html#a8181bc316fdf61b85f787c5cadfcd249',1,'tcp_timer_needed(void): timeouts.c'],['../tcp__priv_8h.html#a8181bc316fdf61b85f787c5cadfcd249',1,'tcp_timer_needed(void): timeouts.c']]], + ['tcp_5ftmr',['tcp_tmr',['../tcp_8c.html#a3846a756b13214ed88ea47d0ff8279eb',1,'tcp_tmr(void): tcp.c'],['../tcp__priv_8h.html#a3846a756b13214ed88ea47d0ff8279eb',1,'tcp_tmr(void): tcp.c']]], + ['tcp_5fttl',['TCP_TTL',['../group__lwip__opts__tcp.html#gacd5b25ea81d2894790d25da5393cdab4',1,'opt.h']]], + ['tcp_5ftw_5fpcbs',['tcp_tw_pcbs',['../tcp_8c.html#a9a522a66c5e1f1a4e28fe7a672cc64e3',1,'tcp_tw_pcbs(): tcp.c'],['../tcp__priv_8h.html#a9a522a66c5e1f1a4e28fe7a672cc64e3',1,'tcp_tw_pcbs(): tcp.c']]], + ['tcp_5ftxnow',['tcp_txnow',['../tcp_8c.html#a5ae0268e59fda0665fdd08c6e77ec547',1,'tcp_txnow(void): tcp.c'],['../tcp__priv_8h.html#a5ae0268e59fda0665fdd08c6e77ec547',1,'tcp_txnow(void): tcp.c']]], + ['tcp_5fupdate_5frcv_5fann_5fwnd',['tcp_update_rcv_ann_wnd',['../tcp_8c.html#a6d2c254b779db4e517cb34e41301588d',1,'tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb): tcp.c'],['../tcp__priv_8h.html#a6d2c254b779db4e517cb34e41301588d',1,'tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb): tcp.c']]], + ['tcp_5fwnd',['TCP_WND',['../group__lwip__opts__tcp.html#ga7f535a6efb5cdf86c3210e35ece1d6a7',1,'opt.h']]], + ['tcp_5fwnd_5fdebug',['TCP_WND_DEBUG',['../group__lwip__opts__debugmsg.html#ga3704f433e947d6342da77c74e33627e1',1,'opt.h']]], + ['tcp_5fwnd_5fupdate_5fthreshold',['TCP_WND_UPDATE_THRESHOLD',['../group__lwip__opts__tcp.html#ga5d45732ba3a8438b141096d86e07ef8d',1,'opt.h']]], + ['tcp_5fwrite',['tcp_write',['../group__tcp__raw.html#ga6b2aa0efbf10e254930332b7c89cd8c5',1,'tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags): tcp_out.c'],['../group__tcp__raw.html#ga6b2aa0efbf10e254930332b7c89cd8c5',1,'tcp_write(struct tcp_pcb *pcb, const void *dataptr, u16_t len, u8_t apiflags): tcp_out.c']]], + ['tcp_5fzero_5fwindow_5fprobe',['tcp_zero_window_probe',['../tcp__out_8c.html#a6c20490aa45c771c38ce8ad3031cbdf6',1,'tcp_zero_window_probe(struct tcp_pcb *pcb): tcp_out.c'],['../tcp__priv_8h.html#a6c20490aa45c771c38ce8ad3031cbdf6',1,'tcp_zero_window_probe(struct tcp_pcb *pcb): tcp_out.c']]], + ['tcpbase_2eh',['tcpbase.h',['../tcpbase_8h.html',1,'']]], + ['tcpip_2ec',['tcpip.c',['../tcpip_8c.html',1,'']]], + ['tcpip_2eh',['tcpip.h',['../tcpip_8h.html',1,'']]], + ['tcpip_5f6lowpan_5finput',['tcpip_6lowpan_input',['../group__sixlowpan.html#ga9d9b93c47dd138fd84a503ffecb9336b',1,'tcpip_6lowpan_input(struct pbuf *p, struct netif *inp): lowpan6.c'],['../group__sixlowpan.html#ga9d9b93c47dd138fd84a503ffecb9336b',1,'tcpip_6lowpan_input(struct pbuf *p, struct netif *inp): lowpan6.c']]], + ['tcpip_5fapi_5fcall',['tcpip_api_call',['../tcpip_8c.html#a3d42b0c46607f91aedcc7745ed466b08',1,'tcpip_api_call(tcpip_api_call_fn fn, struct tcpip_api_call_data *call): tcpip.c'],['../tcpip__priv_8h.html#a3d42b0c46607f91aedcc7745ed466b08',1,'tcpip_api_call(tcpip_api_call_fn fn, struct tcpip_api_call_data *call): tcpip.c']]], + ['tcpip_5fcallback',['tcpip_callback',['../group__lwip__os.html#gaab838fe3417ab3a1f61f0728009a0c2a',1,'tcpip_callback(tcpip_callback_fn function, void *ctx): tcpip.c'],['../group__lwip__os.html#gaab838fe3417ab3a1f61f0728009a0c2a',1,'tcpip_callback(tcpip_callback_fn function, void *ctx): tcpip.c']]], + ['tcpip_5fcallback_5ffn',['tcpip_callback_fn',['../tcpip_8h.html#a35203296bb838f3b493839ffc6e7285d',1,'tcpip.h']]], + ['tcpip_5fcallback_5fwith_5fblock',['tcpip_callback_with_block',['../group__lwip__os.html#gacd0a865623921ada2dd08962eb82c9df',1,'tcpip.h']]], + ['tcpip_5fcallbackmsg_5fdelete',['tcpip_callbackmsg_delete',['../group__lwip__os.html#gac5b7a59f4c3f5f721ab9ee81f231c9fd',1,'tcpip_callbackmsg_delete(struct tcpip_callback_msg *msg): tcpip.c'],['../group__lwip__os.html#gac5b7a59f4c3f5f721ab9ee81f231c9fd',1,'tcpip_callbackmsg_delete(struct tcpip_callback_msg *msg): tcpip.c']]], + ['tcpip_5fcallbackmsg_5fnew',['tcpip_callbackmsg_new',['../group__lwip__os.html#gaee14fa2587a9ba9d23e4c7e16c4526ac',1,'tcpip_callbackmsg_new(tcpip_callback_fn function, void *ctx): tcpip.c'],['../group__lwip__os.html#gaee14fa2587a9ba9d23e4c7e16c4526ac',1,'tcpip_callbackmsg_new(tcpip_callback_fn function, void *ctx): tcpip.c']]], + ['tcpip_5fcallbackmsg_5ftrycallback',['tcpip_callbackmsg_trycallback',['../group__lwip__os.html#ga83fe5fb2ea33e8c262567ac46f4db3f8',1,'tcpip_callbackmsg_trycallback(struct tcpip_callback_msg *msg): tcpip.c'],['../group__lwip__os.html#ga83fe5fb2ea33e8c262567ac46f4db3f8',1,'tcpip_callbackmsg_trycallback(struct tcpip_callback_msg *msg): tcpip.c']]], + ['tcpip_5fcallbackmsg_5ftrycallback_5ffromisr',['tcpip_callbackmsg_trycallback_fromisr',['../group__lwip__os.html#ga56a234f3d895791225c3c850bfadb666',1,'tcpip_callbackmsg_trycallback_fromisr(struct tcpip_callback_msg *msg): tcpip.c'],['../group__lwip__os.html#ga56a234f3d895791225c3c850bfadb666',1,'tcpip_callbackmsg_trycallback_fromisr(struct tcpip_callback_msg *msg): tcpip.c']]], + ['tcpip_5fdebug',['TCPIP_DEBUG',['../group__lwip__opts__debugmsg.html#ga52d6c83451936c3de3b0338d4a3f921f',1,'opt.h']]], + ['tcpip_5finit',['tcpip_init',['../group__lwip__os.html#ga1f3a88b8df6ba3b9ed1c00e0a305e3db',1,'tcpip_init(tcpip_init_done_fn initfunc, void *arg): tcpip.c'],['../group__lwip__os.html#ga1f3a88b8df6ba3b9ed1c00e0a305e3db',1,'tcpip_init(tcpip_init_done_fn tcpip_init_done, void *arg): tcpip.c']]], + ['tcpip_5finit_5fdone_5ffn',['tcpip_init_done_fn',['../tcpip_8h.html#a5fe07216c441e27c3028bcac60fa0992',1,'tcpip.h']]], + ['tcpip_5finpkt',['tcpip_inpkt',['../tcpip_8c.html#a93043b3c66dbe4a15a60299c6199d102',1,'tcpip_inpkt(struct pbuf *p, struct netif *inp, netif_input_fn input_fn): tcpip.c'],['../tcpip_8h.html#a93043b3c66dbe4a15a60299c6199d102',1,'tcpip_inpkt(struct pbuf *p, struct netif *inp, netif_input_fn input_fn): tcpip.c']]], + ['tcpip_5finput',['tcpip_input',['../group__lwip__os.html#gae510f195171bed8499ae94e264a92717',1,'tcpip_input(struct pbuf *p, struct netif *inp): tcpip.c'],['../group__lwip__os.html#gae510f195171bed8499ae94e264a92717',1,'tcpip_input(struct pbuf *p, struct netif *inp): tcpip.c']]], + ['tcpip_5fmbox_5fsize',['TCPIP_MBOX_SIZE',['../group__lwip__opts__thread.html#ga8cf210ad4e4bf616860a45fbd140fd06',1,'opt.h']]], + ['tcpip_5fpriv_2eh',['tcpip_priv.h',['../tcpip__priv_8h.html',1,'']]], + ['tcpip_5frfc7668_5finput',['tcpip_rfc7668_input',['../lowpan6__ble_8h.html#a6ae90ad69f5d901eb44cf87b9120cd9a',1,'tcpip_rfc7668_input(struct pbuf *p, struct netif *inp): lowpan6_ble.c'],['../lowpan6__ble_8c.html#a6ae90ad69f5d901eb44cf87b9120cd9a',1,'tcpip_rfc7668_input(struct pbuf *p, struct netif *inp): lowpan6_ble.c']]], + ['tcpip_5fsend_5fmsg_5fwait_5fsem',['tcpip_send_msg_wait_sem',['../tcpip_8c.html#a12bdf37eddcd72c4178e3ea7d370395d',1,'tcpip_send_msg_wait_sem(tcpip_callback_fn fn, void *apimsg, sys_sem_t *sem): tcpip.c'],['../tcpip__priv_8h.html#a12bdf37eddcd72c4178e3ea7d370395d',1,'tcpip_send_msg_wait_sem(tcpip_callback_fn fn, void *apimsg, sys_sem_t *sem): tcpip.c']]], + ['tcpip_5fthread_5fname',['TCPIP_THREAD_NAME',['../group__lwip__opts__thread.html#ga405e604e4328e1feb878c6fe1798a587',1,'opt.h']]], + ['tcpip_5fthread_5fprio',['TCPIP_THREAD_PRIO',['../group__lwip__opts__thread.html#ga42b2c7a3042d7c3efd00f367f5837435',1,'opt.h']]], + ['tcpip_5fthread_5fstacksize',['TCPIP_THREAD_STACKSIZE',['../group__lwip__opts__thread.html#gaa02b84eafa0c8b09b158b97c96d79db0',1,'opt.h']]], + ['tcpip_5ftry_5fcallback',['tcpip_try_callback',['../group__lwip__os.html#gaeb7b3c7414c76ad8dde14d2fba6cb020',1,'tcpip_try_callback(tcpip_callback_fn function, void *ctx): tcpip.c'],['../group__lwip__os.html#gaeb7b3c7414c76ad8dde14d2fba6cb020',1,'tcpip_try_callback(tcpip_callback_fn function, void *ctx): tcpip.c']]], + ['test_5fresult',['test_result',['../structnetbios__answer.html#a91116fe26c8050ee166053f377b40c7f',1,'netbios_answer']]], + ['tf_5freset',['TF_RESET',['../tcp__priv_8h.html#ac9dbdaeac3e25f5badf3a763a1b0b990',1,'tcp_priv.h']]], + ['tftp_20server',['TFTP server',['../group__tftp.html',1,'']]], + ['tftp_5fcleanup',['tftp_cleanup',['../group__tftp.html#gabb4a4e24b5c7ec8df70ec5a68a206dec',1,'tftp_cleanup(void): tftp_server.c'],['../group__tftp.html#gabb4a4e24b5c7ec8df70ec5a68a206dec',1,'tftp_cleanup(void): tftp_server.c']]], + ['tftp_5fcontext',['tftp_context',['../structtftp__context.html',1,'']]], + ['tftp_5fdebug',['TFTP_DEBUG',['../group__tftp__opts.html#ga2dd54a1d0c3006527b8a7a8604b81981',1,'tftp_opts.h']]], + ['tftp_5finit',['tftp_init',['../group__tftp.html#ga7a80673a1324da5c8ae2440af7b008a3',1,'tftp_init(const struct tftp_context *ctx): tftp_server.c'],['../group__tftp.html#ga7a80673a1324da5c8ae2440af7b008a3',1,'tftp_init(const struct tftp_context *ctx): tftp_server.c']]], + ['tftp_5fmax_5ffilename_5flen',['TFTP_MAX_FILENAME_LEN',['../group__tftp__opts.html#ga8e975900b4397313f1a649ff76a3063b',1,'tftp_opts.h']]], + ['tftp_5fmax_5fmode_5flen',['TFTP_MAX_MODE_LEN',['../group__tftp__opts.html#gaa8a449c25e37be757f5efccd422c9055',1,'tftp_opts.h']]], + ['tftp_5fmax_5fretries',['TFTP_MAX_RETRIES',['../group__tftp__opts.html#ga6a01757ad942eb602e8a87e2be42d313',1,'tftp_opts.h']]], + ['tftp_5fopts_2eh',['tftp_opts.h',['../tftp__opts_8h.html',1,'']]], + ['tftp_5fport',['TFTP_PORT',['../group__tftp__opts.html#gad9230620a5d3bb87a7ac280ff99875d1',1,'tftp_opts.h']]], + ['tftp_5fserver_2ec',['tftp_server.c',['../tftp__server_8c.html',1,'']]], + ['tftp_5fserver_2eh',['tftp_server.h',['../tftp__server_8h.html',1,'']]], + ['tftp_5ftimeout_5fmsecs',['TFTP_TIMEOUT_MSECS',['../group__tftp__opts.html#ga36986e5465dc2ccb6184fc57f9a37d63',1,'tftp_opts.h']]], + ['tftp_5ftimer_5fmsecs',['TFTP_TIMER_MSECS',['../group__tftp__opts.html#ga3e6caacb3f4d43f780b2d68ffe4258ea',1,'tftp_opts.h']]], + ['threadsync_5fdata',['threadsync_data',['../structthreadsync__data.html',1,'']]], + ['timeout_5fdiff',['timeout_diff',['../structmqtt__request__t.html#a65a7292669bc1f2d9df8f30bbcd77073',1,'mqtt_request_t']]], + ['timeouts_2ec',['timeouts.c',['../timeouts_8c.html',1,'']]], + ['timeouts_2eh',['timeouts.h',['../timeouts_8h.html',1,'']]], + ['timer',['timer',['../structsmtp__session.html#a5884425cb5ce964d8383b29cc20208d7',1,'smtp_session::timer()'],['../structigmp__group.html#a8e2227e486652603fcd7f88681d4c75b',1,'igmp_group::timer()'],['../structmld__group.html#a21f31e845cb11d2aca4ae7120736f69a',1,'mld_group::timer()']]], + ['timers_5fdebug',['TIMERS_DEBUG',['../group__lwip__opts__debugmsg.html#ga24a6644ba9cc82665a7bf209b3870c15',1,'opt.h']]], + ['tls_5fconfig',['tls_config',['../structmqtt__connect__client__info__t.html#a45987acc116de5d27fff6856778e55b4',1,'mqtt_connect_client_info_t']]], + ['to',['to',['../structsmtp__session.html#a70b3753bc70e65f779279c246617faea',1,'smtp_session']]], + ['to_5flen',['to_len',['../structsmtp__session.html#a66b8e1dd314976788e9ac9a81f59a402',1,'smtp_session']]], + ['tot_5flen',['tot_len',['../structpbuf.html#a5259e7ec29bab9c0999b64f2e86b411f',1,'pbuf']]], + ['total_5fnumber_5fof_5fcommand_5fblocks',['total_number_of_command_blocks',['../structnetbios__answer.html#a4c7ea5d1839fd27232877880e43485a2',1,'netbios_answer']]], + ['tried_5fllipaddr',['tried_llipaddr',['../structautoip.html#a472f3d18c07b3df024a0cde8f4ffa853',1,'autoip']]], + ['ts',['ts',['../structnetif.html#a1bb4e3aed6e0fd4b6b31ee82d806f971',1,'netif']]], + ['tssihandler',['tSSIHandler',['../group__httpd.html#gaf88dacc4f18d299084cab75252001319',1,'httpd.h']]], + ['ttw',['ttw',['../structautoip.html#a7510d9a2961ea7c28ebfcde6390284bf',1,'autoip']]], + ['tx_5fbuf',['tx_buf',['../structsmtp__session.html#a42cedb495f7423b9e28979ce1e460c61',1,'smtp_session']]], + ['tx_5fdatagram_5ftag',['tx_datagram_tag',['../structlowpan6__ieee802154__data.html#a64560b289f86efe1d39ece603cd14b5c',1,'lowpan6_ieee802154_data']]], + ['tx_5fframe_5fseq_5fnum',['tx_frame_seq_num',['../structlowpan6__ieee802154__data.html#ad9cd994385c4d1d8ef0a22686c17720c',1,'lowpan6_ieee802154_data']]], + ['tx_5fid',['tx_id',['../structmdns__packet.html#a0cd71fd9af6d2529e6a41c451c037e00',1,'mdns_packet::tx_id()'],['../structmdns__outpacket.html#ac470f02a9f332f18e027437dc293d348',1,'mdns_outpacket::tx_id()']]], + ['txt_5ffn',['txt_fn',['../structmdns__service.html#a79bc4946c96a3b2d0713bc0897c4bd9c',1,'mdns_service']]], + ['txtdata',['txtdata',['../structmdns__service.html#a35daff90a18d19b14f23fa02df424f94',1,'mdns_service']]], + ['type',['type',['../structnetconn.html#a61af908d1d2e4e7345ac65d3b390d7b6',1,'netconn::type()'],['../structsnmp__varbind.html#ad63223e45e04c08ea97859b8ba767950',1,'snmp_varbind::type()'],['../structip__addr.html#a66eaa8e9051e7102bf9f0c195fbe555a',1,'ip_addr::type()']]], + ['type_5finternal',['type_internal',['../structpbuf.html#a61a26ac8393dc9e549016b86c2cf5131',1,'pbuf']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_16.html b/Libraries/LwIP/doc/doxygen/output/html/search/all_16.html new file mode 100644 index 0000000..e511edb --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_16.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_16.js b/Libraries/LwIP/doc/doxygen/output/html/search/all_16.js new file mode 100644 index 0000000..3435bf5 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_16.js @@ -0,0 +1,37 @@ +var searchData= +[ + ['udp',['UDP',['../group__lwip__opts__udp.html',1,'']]], + ['udp_20only',['UDP only',['../group__netconn__udp.html',1,'']]], + ['udp',['udp',['../structstats__.html#a626e03d4bded6480582789cfd17d4063',1,'stats_']]], + ['udp_2ec',['udp.c',['../udp_8c.html',1,'']]], + ['udp_2eh',['udp.h',['../prot_2udp_8h.html',1,'(Global Namespace)'],['../udp_8h.html',1,'(Global Namespace)']]], + ['udp_5fbind',['udp_bind',['../group__udp__raw.html#gac7fbda8b12b9b9360e92b51e805e799e',1,'udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port): udp.c'],['../group__udp__raw.html#gac7fbda8b12b9b9360e92b51e805e799e',1,'udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port): udp.c']]], + ['udp_5fbind_5fnetif',['udp_bind_netif',['../group__udp__raw.html#ga4360535ae72e77019721c9637a1051a8',1,'udp_bind_netif(struct udp_pcb *pcb, const struct netif *netif): udp.c'],['../group__udp__raw.html#ga4360535ae72e77019721c9637a1051a8',1,'udp_bind_netif(struct udp_pcb *pcb, const struct netif *netif): udp.c']]], + ['udp_5fconnect',['udp_connect',['../group__udp__raw.html#ga83625967670477aa254643129a53971b',1,'udp_connect(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port): udp.c'],['../group__udp__raw.html#ga83625967670477aa254643129a53971b',1,'udp_connect(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port): udp.c']]], + ['udp_5fdebug',['UDP_DEBUG',['../group__lwip__opts__debugmsg.html#ga0393f312c5475a1c649b39ef9cfcaad4',1,'opt.h']]], + ['udp_5fdisconnect',['udp_disconnect',['../group__udp__raw.html#ga8d26559743e59e4b409c92a268ee67fc',1,'udp_disconnect(struct udp_pcb *pcb): udp.c'],['../group__udp__raw.html#ga8d26559743e59e4b409c92a268ee67fc',1,'udp_disconnect(struct udp_pcb *pcb): udp.c']]], + ['udp_5finit',['udp_init',['../udp_8c.html#ae7f7431ce99333577d7b82b26619309e',1,'udp_init(void): udp.c'],['../udp_8h.html#ae7f7431ce99333577d7b82b26619309e',1,'udp_init(void): udp.c']]], + ['udp_5finput',['udp_input',['../udp_8c.html#a7b338a5515606bd51976fbc5bcec9611',1,'udp_input(struct pbuf *p, struct netif *inp): udp.c'],['../udp_8h.html#a7b338a5515606bd51976fbc5bcec9611',1,'udp_input(struct pbuf *p, struct netif *inp): udp.c']]], + ['udp_5fnetif_5fip_5faddr_5fchanged',['udp_netif_ip_addr_changed',['../udp_8c.html#ab857f86a0b15d02b864292b161b2c3fc',1,'udp_netif_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr): udp.c'],['../udp_8h.html#ab857f86a0b15d02b864292b161b2c3fc',1,'udp_netif_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr): udp.c']]], + ['udp_5fnew',['udp_new',['../group__udp__raw.html#gaa6d6430499acae43d342f0e68ddbb209',1,'udp_new(void): udp.c'],['../group__udp__raw.html#gaa6d6430499acae43d342f0e68ddbb209',1,'udp_new(void): udp.c']]], + ['udp_5fnew_5fip_5ftype',['udp_new_ip_type',['../group__udp__raw.html#gaf1ab236050dd351e93f112cfbc1ada88',1,'udp_new_ip_type(u8_t type): udp.c'],['../group__udp__raw.html#gaf1ab236050dd351e93f112cfbc1ada88',1,'udp_new_ip_type(u8_t type): udp.c']]], + ['udp_5fpcb',['udp_pcb',['../structudp__pcb.html',1,'']]], + ['udp',['UDP',['../group__udp__raw.html',1,'']]], + ['udp_5frecv',['udp_recv',['../group__udp__raw.html#gada6d02b9a5f35e1fb2e1bc71b11e6027',1,'udp_recv(struct udp_pcb *pcb, udp_recv_fn recv, void *recv_arg): udp.c'],['../group__udp__raw.html#gada6d02b9a5f35e1fb2e1bc71b11e6027',1,'udp_recv(struct udp_pcb *pcb, udp_recv_fn recv, void *recv_arg): udp.c']]], + ['udp_5frecv_5ffn',['udp_recv_fn',['../udp_8h.html#af0ec7feb31acdb6e11b928f438c8a64b',1,'udp.h']]], + ['udp_5fremove',['udp_remove',['../group__udp__raw.html#ga3aed8e469f74f960837ebf9f34acf646',1,'udp_remove(struct udp_pcb *pcb): udp.c'],['../group__udp__raw.html#ga3aed8e469f74f960837ebf9f34acf646',1,'udp_remove(struct udp_pcb *pcb): udp.c']]], + ['udp_5fsend',['udp_send',['../group__udp__raw.html#gaa4546c43981f043c0ae4514d625cc3fc',1,'udp_send(struct udp_pcb *pcb, struct pbuf *p): udp.c'],['../group__udp__raw.html#gaa4546c43981f043c0ae4514d625cc3fc',1,'udp_send(struct udp_pcb *pcb, struct pbuf *p): udp.c']]], + ['udp_5fsendto',['udp_sendto',['../group__udp__raw.html#gaa0e135a5958f1f0cc83cbeb609e18743',1,'udp_sendto(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, u16_t dst_port): udp.c'],['../group__udp__raw.html#gaa0e135a5958f1f0cc83cbeb609e18743',1,'udp_sendto(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, u16_t dst_port): udp.c']]], + ['udp_5fsendto_5fif',['udp_sendto_if',['../group__udp__raw.html#ga83f8c873671ca7f307d14b29a0a7a142',1,'udp_sendto_if(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif): udp.c'],['../group__udp__raw.html#ga83f8c873671ca7f307d14b29a0a7a142',1,'udp_sendto_if(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif): udp.c']]], + ['udp_5fsendto_5fif_5fsrc',['udp_sendto_if_src',['../group__udp__raw.html#gaa389827c979c766c1dae301239f7bbb7',1,'udp_sendto_if_src(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif, const ip_addr_t *src_ip): udp.c'],['../group__udp__raw.html#gaa389827c979c766c1dae301239f7bbb7',1,'udp_sendto_if_src(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif, const ip_addr_t *src_ip): udp.c']]], + ['udp_5fstats',['UDP_STATS',['../group__lwip__opts__stats.html#gaef64b11bf71f0d6d5bafaf6092462276',1,'opt.h']]], + ['udp_5fttl',['UDP_TTL',['../group__lwip__opts__udp.html#ga97908a317bcba89174b5d1ccbdca0096',1,'opt.h']]], + ['unicast_5freply',['unicast_reply',['../structmdns__outpacket.html#a68255725575af086a3afa76bc5c8e64d',1,'mdns_outpacket']]], + ['unit_5fid',['unit_id',['../structnetbios__answer.html#aeed6aa8ba4f8bb107d141b3b3d0a1787',1,'netbios_answer']]], + ['unlock_5ftcpip_5fcore',['UNLOCK_TCPIP_CORE',['../tcpip_8h.html#a915effea029b9c4891e1ec635eb1826d',1,'tcpip.h']]], + ['unmap_5fipv4_5fmapped_5fipv6',['unmap_ipv4_mapped_ipv6',['../group__ipaddr.html#ga66b5a64b12128e3716bcf04ff91b5a57',1,'ip_addr.h']]], + ['upgrading',['Upgrading',['../upgrading.html',1,'']]], + ['use',['use',['../structigmp__group.html#ab3625aeb3689e3626f73138eb0e41852',1,'igmp_group::use()'],['../structmld__group.html#addc67094f83c9352fe039c392c480f9e',1,'mld_group::use()']]], + ['used',['used',['../structmem.html#aa76b6a39425617435978dce903f0d456',1,'mem']]], + ['username',['username',['../structsmtp__session.html#a568e3def9d0ec54e3c079f577717a6bb',1,'smtp_session']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_17.html b/Libraries/LwIP/doc/doxygen/output/html/search/all_17.html new file mode 100644 index 0000000..5ca9efd --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_17.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_17.js b/Libraries/LwIP/doc/doxygen/output/html/search/all_17.js new file mode 100644 index 0000000..b970844 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_17.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['version',['Version',['../group__lwip__version.html',1,'']]], + ['value',['value',['../structsnmp__varbind.html#a328227d7ae188a0a2feb95f8000aac45',1,'snmp_varbind']]], + ['value_5flen',['value_len',['../structsnmp__varbind.html#ab094577fac6c7cc16ad666c9970cdb85',1,'snmp_varbind']]], + ['vector',['vector',['../structapi__msg.html#a1ceb9822ba49ba439e30d98492593612',1,'api_msg']]], + ['vector_5fcnt',['vector_cnt',['../structapi__msg.html#ab6f14157a3e6735b69a569249d3286a2',1,'api_msg']]], + ['vector_5foff',['vector_off',['../structapi__msg.html#a6896ae78ebddefdf2d8358ab5f21f444',1,'api_msg']]], + ['version_5fnumber',['version_number',['../structnetbios__answer.html#a151dce0f0bf626b2a54fbb75775237ba',1,'netbios_answer']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_18.html b/Libraries/LwIP/doc/doxygen/output/html/search/all_18.html new file mode 100644 index 0000000..069edeb --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_18.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_18.js b/Libraries/LwIP/doc/doxygen/output/html/search/all_18.js new file mode 100644 index 0000000..29f1b90 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_18.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['w',['w',['../structapi__msg.html#a8a71456d1199d10af5c1d8760cc0ce73',1,'api_msg']]], + ['will_5fmsg',['will_msg',['../structmqtt__connect__client__info__t.html#a925fcebd15555afdc0820e196e2fd3a7',1,'mqtt_connect_client_info_t']]], + ['will_5fqos',['will_qos',['../structmqtt__connect__client__info__t.html#a07954934f4fecf54fa190997848229d9',1,'mqtt_connect_client_info_t']]], + ['will_5fretain',['will_retain',['../structmqtt__connect__client__info__t.html#a49c10873f44d7534140a63eef2a6a4e3',1,'mqtt_connect_client_info_t']]], + ['will_5ftopic',['will_topic',['../structmqtt__connect__client__info__t.html#a32e77415460752ba0484eb3ba0faf0c8',1,'mqtt_connect_client_info_t']]], + ['write',['write',['../structtftp__context.html#a9e6e4ec803ec9597822923369701754d',1,'tftp_context::write()'],['../group__socket.html#ga0a651eb5fb5e6127f5e5153ce2251f3d',1,'write(): sockets.h']]], + ['write_5foffset',['write_offset',['../structmdns__outpacket.html#a8ead21e392b21c3e872c0cab874cdcf5',1,'mdns_outpacket']]], + ['writeset',['writeset',['../structlwip__select__cb.html#aa89638b1c2c6b2c88030560861aba04c',1,'lwip_select_cb']]], + ['writev',['writev',['../group__socket.html#ga697fd916a65a10b4dcb54b8199346fee',1,'sockets.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_19.html b/Libraries/LwIP/doc/doxygen/output/html/search/all_19.html new file mode 100644 index 0000000..4fdfe46 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_19.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_19.js b/Libraries/LwIP/doc/doxygen/output/html/search/all_19.js new file mode 100644 index 0000000..05a6bf6 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_19.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['zep_5fdst_5fip_5faddr',['zep_dst_ip_addr',['../structzepif__init.html#a851efb99a973348f1064a31b97ce779d',1,'zepif_init']]], + ['zep_5fdst_5fudp_5fport',['zep_dst_udp_port',['../structzepif__init.html#a86c6229ed3010158e601666afe91a286',1,'zepif_init']]], + ['zep_5fnetif',['zep_netif',['../structzepif__init.html#a3d97bf90b6bd4dd8258a3b1caf7890e3',1,'zepif_init']]], + ['zep_5fsrc_5fip_5faddr',['zep_src_ip_addr',['../structzepif__init.html#adbe989f1f5cba623d742187def36f02c',1,'zepif_init']]], + ['zep_5fsrc_5fudp_5fport',['zep_src_udp_port',['../structzepif__init.html#ad739032585841b126b4c0eab5899d40f',1,'zepif_init']]], + ['zep_20_2d_20zigbee_20encapsulation_20protocol',['ZEP - ZigBee Encapsulation Protocol',['../group__zepif.html',1,'']]], + ['zepif_2ec',['zepif.c',['../zepif_8c.html',1,'']]], + ['zepif_2eh',['zepif.h',['../zepif_8h.html',1,'']]], + ['zepif_5finit',['zepif_init',['../structzepif__init.html',1,'zepif_init'],['../group__zepif.html#gad61a6d9c1ab17e5b2c2c3eb9b42cc004',1,'zepif_init(struct netif *netif): zepif.c'],['../group__zepif.html#gad61a6d9c1ab17e5b2c2c3eb9b42cc004',1,'zepif_init(struct netif *netif): zepif.c']]], + ['zepif_5floopback',['ZEPIF_LOOPBACK',['../zepif_8c.html#a8cae594e71cf385076f7bda166729dcd',1,'zepif.c']]], + ['zero_2dcopy_20rx',['Zero-copy RX',['../zerocopyrx.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_2.html b/Libraries/LwIP/doc/doxygen/output/html/search/all_2.html new file mode 100644 index 0000000..9543c57 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_2.js b/Libraries/LwIP/doc/doxygen/output/html/search/all_2.js new file mode 100644 index 0000000..7bd4977 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_2.js @@ -0,0 +1,115 @@ +var searchData= +[ + ['accept',['accept',['../group__socket.html#gade2b17671b5a4b18e941fbf7e1060310',1,'sockets.h']]], + ['acceptmbox',['acceptmbox',['../structnetconn.html#a9b59188f300828d2b5814e27ab27cad0',1,'netconn']]], + ['access',['access',['../structsnmp__node__instance.html#a4af17d17a971f1d11a186e6e1fc4411c',1,'snmp_node_instance']]], + ['ad',['ad',['../structapi__msg.html#a36dedcbd9ecca67043a8e1d1e715be94',1,'api_msg']]], + ['additional',['additional',['../structmdns__outpacket.html#acda83121a9bb785d20f979a0a3a312ce',1,'mdns_outpacket']]], + ['addr',['addr',['../structdns__api__msg.html#a217814594564077d21b0f2696280b2a8',1,'dns_api_msg::addr()'],['../structzepif__init.html#a5a9a7ee6e687a7c1ae85b103d39de61d',1,'zepif_init::addr()']]], + ['addr_5findex',['addr_index',['../structnetif__ext__callback__args__t_1_1ipv6__set__s.html#ad44a5f52ad695ea90b15a1e29ff823dd',1,'netif_ext_callback_args_t::ipv6_set_s::addr_index()'],['../structnetif__ext__callback__args__t_1_1ipv6__addr__state__changed__s.html#aebf2aa0b26b07ca1977c676a0404323f',1,'netif_ext_callback_args_t::ipv6_addr_state_changed_s::addr_index()']]], + ['address',['address',['../structnetif__ext__callback__args__t_1_1ipv6__addr__state__changed__s.html#acd24c243c866f8f9169b89af11974f17',1,'netif_ext_callback_args_t::ipv6_addr_state_changed_s']]], + ['alloc',['alloc',['../structaltcp__allocator__s.html#aaf07ebf181a11d0320381ef46d40e687',1,'altcp_allocator_s']]], + ['application_20layered_20tcp_20functions',['Application layered TCP Functions',['../group__altcp.html',1,'']]], + ['altcp_2ec',['altcp.c',['../altcp_8c.html',1,'']]], + ['altcp_2eh',['altcp.h',['../altcp_8h.html',1,'']]], + ['altcp_5fabort',['altcp_abort',['../group__altcp.html#ga7f6fab99fed448385a76b4a5100796ab',1,'altcp_abort(struct altcp_pcb *conn): altcp.c'],['../group__altcp.html#ga7f6fab99fed448385a76b4a5100796ab',1,'altcp_abort(struct altcp_pcb *conn): altcp.c']]], + ['altcp_5faccept',['altcp_accept',['../group__altcp.html#ga7c4cd0b1179a53b1a223936ba2270bf9',1,'altcp_accept(struct altcp_pcb *conn, altcp_accept_fn accept): altcp.c'],['../group__altcp.html#ga7c4cd0b1179a53b1a223936ba2270bf9',1,'altcp_accept(struct altcp_pcb *conn, altcp_accept_fn accept): altcp.c']]], + ['altcp_5falloc',['altcp_alloc',['../altcp_8c.html#a6a99f8757c18fbc9b9f30925afbcf4c2',1,'altcp_alloc(void): altcp.c'],['../altcp__priv_8h.html#a6a99f8757c18fbc9b9f30925afbcf4c2',1,'altcp_alloc(void): altcp.c']]], + ['altcp_5falloc_2ec',['altcp_alloc.c',['../altcp__alloc_8c.html',1,'']]], + ['altcp_5fallocator_5fs',['altcp_allocator_s',['../structaltcp__allocator__s.html',1,'']]], + ['altcp_5fallocator_5ft',['altcp_allocator_t',['../group__altcp.html#ga9ddf490e24b1472a96ab2b4cedd171f8',1,'altcp.h']]], + ['application_20layered_20tcp_20introduction',['Application layered TCP Introduction',['../group__altcp__api.html',1,'']]], + ['altcp_5farg',['altcp_arg',['../group__altcp.html#ga197a33af038556a04d8f27c7033d771f',1,'altcp_arg(struct altcp_pcb *conn, void *arg): altcp.c'],['../group__altcp.html#ga197a33af038556a04d8f27c7033d771f',1,'altcp_arg(struct altcp_pcb *conn, void *arg): altcp.c']]], + ['altcp_5fbind',['altcp_bind',['../group__altcp.html#ga485b248680f73b9876d8674029c5157c',1,'altcp_bind(struct altcp_pcb *conn, const ip_addr_t *ipaddr, u16_t port): altcp.c'],['../group__altcp.html#ga485b248680f73b9876d8674029c5157c',1,'altcp_bind(struct altcp_pcb *conn, const ip_addr_t *ipaddr, u16_t port): altcp.c']]], + ['altcp_5fclose',['altcp_close',['../group__altcp.html#ga4329798afdf3709c789a2ee060ee3993',1,'altcp_close(struct altcp_pcb *conn): altcp.c'],['../group__altcp.html#ga4329798afdf3709c789a2ee060ee3993',1,'altcp_close(struct altcp_pcb *conn): altcp.c']]], + ['altcp_5fconnect',['altcp_connect',['../group__altcp.html#gafaf1d533e4e89dc249a3f931afa93492',1,'altcp_connect(struct altcp_pcb *conn, const ip_addr_t *ipaddr, u16_t port, altcp_connected_fn connected): altcp.c'],['../group__altcp.html#gafaf1d533e4e89dc249a3f931afa93492',1,'altcp_connect(struct altcp_pcb *conn, const ip_addr_t *ipaddr, u16_t port, altcp_connected_fn connected): altcp.c']]], + ['altcp_5ferr',['altcp_err',['../group__altcp.html#gadc76a1f3b2448559dc87da1b33291644',1,'altcp_err(struct altcp_pcb *conn, altcp_err_fn err): altcp.c'],['../group__altcp.html#gadc76a1f3b2448559dc87da1b33291644',1,'altcp_err(struct altcp_pcb *conn, altcp_err_fn err): altcp.c']]], + ['altcp_5ffree',['altcp_free',['../altcp_8c.html#afd7f6b6602e89cff51f8a8ea0315321d',1,'altcp_free(struct altcp_pcb *conn): altcp.c'],['../altcp__priv_8h.html#afd7f6b6602e89cff51f8a8ea0315321d',1,'altcp_free(struct altcp_pcb *conn): altcp.c']]], + ['altcp_5flisten',['altcp_listen',['../group__altcp.html#ga96c22e15230b5216b3a95dc9e2ca42c8',1,'altcp.h']]], + ['altcp_5flisten_5fwith_5fbacklog_5fand_5ferr',['altcp_listen_with_backlog_and_err',['../group__altcp.html#gac69722b86b1198916f2527fb9f132c2b',1,'altcp_listen_with_backlog_and_err(struct altcp_pcb *conn, u8_t backlog, err_t *err): altcp.c'],['../group__altcp.html#gac69722b86b1198916f2527fb9f132c2b',1,'altcp_listen_with_backlog_and_err(struct altcp_pcb *conn, u8_t backlog, err_t *err): altcp.c']]], + ['altcp_5fmbedtls_5fdebug',['ALTCP_MBEDTLS_DEBUG',['../altcp__tls__mbedtls__opts_8h.html#a7727456eeb0b3311213936413d238989',1,'altcp_tls_mbedtls_opts.h']]], + ['altcp_5fmbedtls_5fsession_5fcache_5ftimeout_5fseconds',['ALTCP_MBEDTLS_SESSION_CACHE_TIMEOUT_SECONDS',['../altcp__tls__mbedtls__opts_8h.html#a6acb28346f87b2310fc00ec1fccba2b6',1,'altcp_tls_mbedtls_opts.h']]], + ['altcp_5fmss',['altcp_mss',['../group__altcp.html#gae7cfc8bd8e45c517a706afd5857fda08',1,'altcp_mss(struct altcp_pcb *conn): altcp.c'],['../group__altcp.html#gae7cfc8bd8e45c517a706afd5857fda08',1,'altcp_mss(struct altcp_pcb *conn): altcp.c']]], + ['altcp_5fnew',['altcp_new',['../group__altcp.html#ga86843287b0ad0099c067817cfb7aa336',1,'altcp_new(altcp_allocator_t *allocator): altcp.c'],['../group__altcp.html#ga86843287b0ad0099c067817cfb7aa336',1,'altcp_new(altcp_allocator_t *allocator): altcp.c']]], + ['altcp_5fnew_5fip6',['altcp_new_ip6',['../group__altcp.html#gaa51a47bcb334b188c82a1b99db49f1f1',1,'altcp_new_ip6(altcp_allocator_t *allocator): altcp.c'],['../group__altcp.html#gaa51a47bcb334b188c82a1b99db49f1f1',1,'altcp_new_ip6(altcp_allocator_t *allocator): altcp.c']]], + ['altcp_5fnew_5fip_5ftype',['altcp_new_ip_type',['../group__altcp.html#gab631f6f92d7f6c58d9db27b7b415bc21',1,'altcp_new_ip_type(altcp_allocator_t *allocator, u8_t ip_type): altcp.c'],['../group__altcp.html#gab631f6f92d7f6c58d9db27b7b415bc21',1,'altcp_new_ip_type(altcp_allocator_t *allocator, u8_t ip_type): altcp.c']]], + ['altcp_5foutput',['altcp_output',['../group__altcp.html#ga5d2370d3b671377d7e2c98ce2dc3cfc6',1,'altcp_output(struct altcp_pcb *conn): altcp.c'],['../group__altcp.html#ga5d2370d3b671377d7e2c98ce2dc3cfc6',1,'altcp_output(struct altcp_pcb *conn): altcp.c']]], + ['altcp_5fpoll',['altcp_poll',['../group__altcp.html#ga269beeaf7d8264b6ff02333bcc7c7ab0',1,'altcp_poll(struct altcp_pcb *conn, altcp_poll_fn poll, u8_t interval): altcp.c'],['../group__altcp.html#ga269beeaf7d8264b6ff02333bcc7c7ab0',1,'altcp_poll(struct altcp_pcb *conn, altcp_poll_fn poll, u8_t interval): altcp.c']]], + ['altcp_5fpriv_2eh',['altcp_priv.h',['../altcp__priv_8h.html',1,'']]], + ['altcp_5fproxyconnect_2ec',['altcp_proxyconnect.c',['../altcp__proxyconnect_8c.html',1,'']]], + ['altcp_5fproxyconnect_2eh',['altcp_proxyconnect.h',['../altcp__proxyconnect_8h.html',1,'']]], + ['altcp_5fproxyconnect_5falloc',['altcp_proxyconnect_alloc',['../altcp__proxyconnect_8c.html#a3d3af45390467ceeaa064b7e28dd43a9',1,'altcp_proxyconnect_alloc(void *arg, u8_t ip_type): altcp_proxyconnect.c'],['../altcp__proxyconnect_8h.html#a3d3af45390467ceeaa064b7e28dd43a9',1,'altcp_proxyconnect_alloc(void *arg, u8_t ip_type): altcp_proxyconnect.c']]], + ['altcp_5fproxyconnect_5fclient_5fagent',['ALTCP_PROXYCONNECT_CLIENT_AGENT',['../altcp__proxyconnect_8c.html#a344227f22aa1b58f7ed737a2d4f4636f',1,'altcp_proxyconnect.c']]], + ['altcp_5fproxyconnect_5fnew',['altcp_proxyconnect_new',['../altcp__proxyconnect_8c.html#ae774782064a92d0f58ce07b57a5360d1',1,'altcp_proxyconnect_new(struct altcp_proxyconnect_config *config, struct altcp_pcb *inner_pcb): altcp_proxyconnect.c'],['../altcp__proxyconnect_8h.html#ae774782064a92d0f58ce07b57a5360d1',1,'altcp_proxyconnect_new(struct altcp_proxyconnect_config *config, struct altcp_pcb *inner_pcb): altcp_proxyconnect.c']]], + ['altcp_5fproxyconnect_5fnew_5ftcp',['altcp_proxyconnect_new_tcp',['../altcp__proxyconnect_8c.html#a24e122d2bc2c0b9f86074c1e8d5ccfe4',1,'altcp_proxyconnect_new_tcp(struct altcp_proxyconnect_config *config, u8_t ip_type): altcp_proxyconnect.c'],['../altcp__proxyconnect_8h.html#a24e122d2bc2c0b9f86074c1e8d5ccfe4',1,'altcp_proxyconnect_new_tcp(struct altcp_proxyconnect_config *config, u8_t ip_type): altcp_proxyconnect.c']]], + ['altcp_5fproxyconnect_5ftls_5falloc',['altcp_proxyconnect_tls_alloc',['../altcp__proxyconnect_8c.html#a5ff49bcd035847a8915f18deef4172a9',1,'altcp_proxyconnect_tls_alloc(void *arg, u8_t ip_type): altcp_proxyconnect.c'],['../altcp__proxyconnect_8h.html#a5ff49bcd035847a8915f18deef4172a9',1,'altcp_proxyconnect_tls_alloc(void *arg, u8_t ip_type): altcp_proxyconnect.c']]], + ['altcp_5frecv',['altcp_recv',['../group__altcp.html#ga7f89221f9d65036d890b1e5bd9192a71',1,'altcp_recv(struct altcp_pcb *conn, altcp_recv_fn recv): altcp.c'],['../group__altcp.html#ga7f89221f9d65036d890b1e5bd9192a71',1,'altcp_recv(struct altcp_pcb *conn, altcp_recv_fn recv): altcp.c']]], + ['altcp_5frecved',['altcp_recved',['../group__altcp.html#gac086951cbfedaed0c36c5fb26b44ef83',1,'altcp_recved(struct altcp_pcb *conn, u16_t len): altcp.c'],['../group__altcp.html#gac086951cbfedaed0c36c5fb26b44ef83',1,'altcp_recved(struct altcp_pcb *conn, u16_t len): altcp.c']]], + ['altcp_5fsent',['altcp_sent',['../group__altcp.html#gab2b228c77c827fb14bfc513171c79f47',1,'altcp_sent(struct altcp_pcb *conn, altcp_sent_fn sent): altcp.c'],['../group__altcp.html#gab2b228c77c827fb14bfc513171c79f47',1,'altcp_sent(struct altcp_pcb *conn, altcp_sent_fn sent): altcp.c']]], + ['altcp_5fsetprio',['altcp_setprio',['../group__altcp.html#ga5040b0a4646bca718d3611ba7fa558c5',1,'altcp_setprio(struct altcp_pcb *conn, u8_t prio): altcp.c'],['../group__altcp.html#ga5040b0a4646bca718d3611ba7fa558c5',1,'altcp_setprio(struct altcp_pcb *conn, u8_t prio): altcp.c']]], + ['altcp_5fshutdown',['altcp_shutdown',['../group__altcp.html#ga0c3172d0bfe452599e242ea2e4692319',1,'altcp_shutdown(struct altcp_pcb *conn, int shut_rx, int shut_tx): altcp.c'],['../group__altcp.html#ga0c3172d0bfe452599e242ea2e4692319',1,'altcp_shutdown(struct altcp_pcb *conn, int shut_rx, int shut_tx): altcp.c']]], + ['altcp_5fsndbuf',['altcp_sndbuf',['../group__altcp.html#gab295cba0c1ded90fe044a8c37387a12c',1,'altcp_sndbuf(struct altcp_pcb *conn): altcp.c'],['../group__altcp.html#gab295cba0c1ded90fe044a8c37387a12c',1,'altcp_sndbuf(struct altcp_pcb *conn): altcp.c']]], + ['altcp_5fsndqueuelen',['altcp_sndqueuelen',['../group__altcp.html#ga516a1bfbf38fc47cfd47852715c505c5',1,'altcp_sndqueuelen(struct altcp_pcb *conn): altcp.c'],['../group__altcp.html#ga516a1bfbf38fc47cfd47852715c505c5',1,'altcp_sndqueuelen(struct altcp_pcb *conn): altcp.c']]], + ['altcp_5ftcp_2ec',['altcp_tcp.c',['../altcp__tcp_8c.html',1,'']]], + ['altcp_5ftcp_2eh',['altcp_tcp.h',['../altcp__tcp_8h.html',1,'']]], + ['altcp_5ftcp_5falloc',['altcp_tcp_alloc',['../altcp__tcp_8c.html#a211215e43cb40bd204a20c34316b7caa',1,'altcp_tcp_alloc(void *arg, u8_t ip_type): altcp_tcp.c'],['../altcp__tcp_8h.html#a211215e43cb40bd204a20c34316b7caa',1,'altcp_tcp_alloc(void *arg, u8_t ip_type): altcp_tcp.c']]], + ['altcp_5ftls_2eh',['altcp_tls.h',['../altcp__tls_8h.html',1,'']]], + ['altcp_5ftls_5falloc',['altcp_tls_alloc',['../group__altcp__tls.html#ga09e6ca8f144ee94ef21d7e5760aa4391',1,'altcp_tls_alloc(void *arg, u8_t ip_type): altcp_alloc.c'],['../group__altcp__tls.html#ga09e6ca8f144ee94ef21d7e5760aa4391',1,'altcp_tls_alloc(void *arg, u8_t ip_type): altcp_alloc.c']]], + ['altcp_5ftls_5fcontext',['altcp_tls_context',['../group__altcp__tls.html#gabc1741530d5089c3093889416430bc76',1,'altcp_tls.h']]], + ['altcp_5ftls_5fcreate_5fconfig_5fclient',['altcp_tls_create_config_client',['../group__altcp__tls.html#ga2b249447e10c8599b6d723d403086c35',1,'altcp_tls.h']]], + ['altcp_5ftls_5fcreate_5fconfig_5fclient_5f2wayauth',['altcp_tls_create_config_client_2wayauth',['../group__altcp__tls.html#ga7352a4600fee89e167541cf0776c01fb',1,'altcp_tls.h']]], + ['altcp_5ftls_5fcreate_5fconfig_5fserver_5fprivkey_5fcert',['altcp_tls_create_config_server_privkey_cert',['../group__altcp__tls.html#ga700dc0320e93cea337673e7d4295e161',1,'altcp_tls.h']]], + ['altcp_5ftls_5ffree_5fconfig',['altcp_tls_free_config',['../group__altcp__tls.html#ga8fb8a92fa3f84170050ddab2888b9145',1,'altcp_tls.h']]], + ['altcp_5ftls_5fmbedtls_2ec',['altcp_tls_mbedtls.c',['../altcp__tls__mbedtls_8c.html',1,'']]], + ['altcp_5ftls_5fmbedtls_5fmem_2ec',['altcp_tls_mbedtls_mem.c',['../altcp__tls__mbedtls__mem_8c.html',1,'']]], + ['altcp_5ftls_5fmbedtls_5fmem_2eh',['altcp_tls_mbedtls_mem.h',['../altcp__tls__mbedtls__mem_8h.html',1,'']]], + ['altcp_5ftls_5fmbedtls_5fopts_2eh',['altcp_tls_mbedtls_opts.h',['../altcp__tls__mbedtls__opts_8h.html',1,'']]], + ['altcp_5ftls_5fmbedtls_5fstructs_2eh',['altcp_tls_mbedtls_structs.h',['../altcp__tls__mbedtls__structs_8h.html',1,'']]], + ['altcp_5ftls_5fnew',['altcp_tls_new',['../group__altcp__tls.html#ga028316a8257cf8dcace9cd063de79c0a',1,'altcp_tls_new(struct altcp_tls_config *config, u8_t ip_type): altcp_alloc.c'],['../group__altcp__tls.html#ga028316a8257cf8dcace9cd063de79c0a',1,'altcp_tls_new(struct altcp_tls_config *config, u8_t ip_type): altcp_alloc.c']]], + ['altcp_5ftls_5fwrap',['altcp_tls_wrap',['../group__altcp__tls.html#gab874adb7f87984c0520bd032c2108c47',1,'altcp_tls.h']]], + ['altcp_5fwrite',['altcp_write',['../group__altcp.html#gaad9a38396b127cfd778e253f20a97b8d',1,'altcp_write(struct altcp_pcb *conn, const void *dataptr, u16_t len, u8_t apiflags): altcp.c'],['../group__altcp.html#gaad9a38396b127cfd778e253f20a97b8d',1,'altcp_write(struct altcp_pcb *conn, const void *dataptr, u16_t len, u8_t apiflags): altcp.c']]], + ['answer_5fname',['answer_name',['../structnetbios__answer.html#abf746cd54add594216ddc3683c741406',1,'netbios_answer']]], + ['answer_5fname_5fflags',['answer_name_flags',['../structnetbios__answer.html#a2729b7249e3d23309624cb19fa0dbfc4',1,'netbios_answer']]], + ['answers',['answers',['../structmdns__packet.html#a918feee242cfb3934d9f5c3de1c298e7',1,'mdns_packet::answers()'],['../structmdns__outpacket.html#aad2c24d4d5a935a209966ceace82f9ad',1,'mdns_outpacket::answers()']]], + ['answers_5fleft',['answers_left',['../structmdns__packet.html#a56ba495a1458a21982e65d746468849d',1,'mdns_packet']]], + ['apis',['APIs',['../group__api.html',1,'']]], + ['api_2eh',['api.h',['../api_8h.html',1,'']]], + ['api_5fevent',['API_EVENT',['../api_8h.html#a3ce590f58be8f60dbde361920863b26d',1,'api.h']]], + ['api_5flib_2ec',['api_lib.c',['../api__lib_8c.html',1,'']]], + ['api_5flib_5fdebug',['API_LIB_DEBUG',['../group__lwip__opts__debugmsg.html#ga671009550216f7dc03e67ba5751e3160',1,'opt.h']]], + ['api_5fmsg',['api_msg',['../structapi__msg.html',1,'']]], + ['api_5fmsg_2ec',['api_msg.c',['../api__msg_8c.html',1,'']]], + ['api_5fmsg_2eh',['api_msg.h',['../api__msg_8h.html',1,'']]], + ['api_5fmsg_5fdebug',['API_MSG_DEBUG',['../group__lwip__opts__debugmsg.html#ga4279d7ff9f986b2ff3eb068bb012b697',1,'opt.h']]], + ['applications',['Applications',['../group__apps.html',1,'']]], + ['arch_2eh',['arch.h',['../arch_8h.html',1,'']]], + ['arg',['arg',['../structaltcp__allocator__s.html#a8d8aa48e9a105e9d25ad4b90d259d0b1',1,'altcp_allocator_s']]], + ['arp_5fage_5frerequest_5fused_5funicast',['ARP_AGE_REREQUEST_USED_UNICAST',['../etharp_8c.html#ac71515a6f140b25de49e9bf432b2bb2a',1,'etharp.c']]], + ['arp_5fmaxage',['ARP_MAXAGE',['../group__lwip__opts__arp.html#ga741a0710dc126ed3ae9e305472df3432',1,'opt.h']]], + ['arp_5fmaxpending',['ARP_MAXPENDING',['../etharp_8c.html#a0a03fea13e060da5a53a10a75a96def9',1,'etharp.c']]], + ['arp_5fqueue_5flen',['ARP_QUEUE_LEN',['../group__lwip__opts__arp.html#ga29f41a6ebdbb23f46688d381b3609fd1',1,'opt.h']]], + ['arp_5fqueueing',['ARP_QUEUEING',['../group__lwip__opts__arp.html#ga75837814536af29b6102508588d0ab58',1,'opt.h']]], + ['arp_5ftable_5fsize',['ARP_TABLE_SIZE',['../group__lwip__opts__arp.html#ga924936a814564dbdb0bc950d255a83b9',1,'opt.h']]], + ['arp_5ftmr_5finterval',['ARP_TMR_INTERVAL',['../lwip_2etharp_8h.html#aaa3d8ed1eb1129f518345e37b38cfc37',1,'etharp.h']]], + ['asn1_5ftype',['asn1_type',['../structsnmp__node__instance.html#af51206e0912a8402c395dcf3b623f8b9',1,'snmp_node_instance']]], + ['auth_5fplain',['auth_plain',['../structsmtp__session.html#a9da4e424e22892fae51987665eca85a9',1,'smtp_session']]], + ['auth_5fplain_5flen',['auth_plain_len',['../structsmtp__session.html#a003dfd03ac58252b575a7c965e532461',1,'smtp_session']]], + ['authoritative',['authoritative',['../structmdns__outpacket.html#a1a689ea7094a3569878f15477e725035',1,'mdns_outpacket']]], + ['autoip',['autoip',['../structautoip.html',1,'autoip'],['../group__autoip.html',1,'(Global Namespace)']]], + ['autoip_2ec',['autoip.c',['../autoip_8c.html',1,'']]], + ['autoip_2eh',['autoip.h',['../autoip_8h.html',1,'(Global Namespace)'],['../prot_2autoip_8h.html',1,'(Global Namespace)']]], + ['autoip_5farp_5freply',['autoip_arp_reply',['../autoip_8c.html#acaf2793325c60dc4531c21a3fd55c16e',1,'autoip_arp_reply(struct netif *netif, struct etharp_hdr *hdr): autoip.c'],['../autoip_8h.html#acaf2793325c60dc4531c21a3fd55c16e',1,'autoip_arp_reply(struct netif *netif, struct etharp_hdr *hdr): autoip.c']]], + ['autoip_5fdebug',['AUTOIP_DEBUG',['../group__lwip__opts__debugmsg.html#gafaee522e7f32d81022215e1805e303a5',1,'opt.h']]], + ['autoip_5fnetwork_5fchanged',['autoip_network_changed',['../autoip_8c.html#a11df7a20d52680cd8c1c18fba2b91e9e',1,'autoip_network_changed(struct netif *netif): autoip.c'],['../autoip_8h.html#a11df7a20d52680cd8c1c18fba2b91e9e',1,'autoip_network_changed(struct netif *netif): autoip.c']]], + ['autoip_5fremove_5fstruct',['autoip_remove_struct',['../autoip_8h.html#aaeb4b778fce078bee84144ab50916b15',1,'autoip.h']]], + ['autoip_5fset_5fstruct',['autoip_set_struct',['../group__autoip.html#ga2122c0b2518b371559fef5ec1d2aed90',1,'autoip_set_struct(struct netif *netif, struct autoip *autoip): autoip.c'],['../group__autoip.html#ga2122c0b2518b371559fef5ec1d2aed90',1,'autoip_set_struct(struct netif *netif, struct autoip *autoip): autoip.c']]], + ['autoip_5fstart',['autoip_start',['../group__autoip.html#ga1461f5826ebefc050e0d63013818d1e8',1,'autoip_start(struct netif *netif): autoip.c'],['../group__autoip.html#ga1461f5826ebefc050e0d63013818d1e8',1,'autoip_start(struct netif *netif): autoip.c']]], + ['autoip_5fstop',['autoip_stop',['../group__autoip.html#ga58a4dce658dd1263e84eb982f62587d4',1,'autoip_stop(struct netif *netif): autoip.c'],['../group__autoip.html#ga58a4dce658dd1263e84eb982f62587d4',1,'autoip_stop(struct netif *netif): autoip.c']]], + ['autoip_5fsupplied_5faddress',['autoip_supplied_address',['../autoip_8c.html#a1b4f0c53da17395d9de92a85708a1bb9',1,'autoip_supplied_address(const struct netif *netif): autoip.c'],['../autoip_8h.html#a1b4f0c53da17395d9de92a85708a1bb9',1,'autoip_supplied_address(const struct netif *netif): autoip.c']]], + ['autoip_5ftmr',['autoip_tmr',['../autoip_8c.html#a746fc1d7db1bf1617afae166c9d92c2d',1,'autoip_tmr(void): autoip.c'],['../autoip_8h.html#a746fc1d7db1bf1617afae166c9d92c2d',1,'autoip_tmr(void): autoip.c']]], + ['autoip_5ftmr_5finterval',['AUTOIP_TMR_INTERVAL',['../autoip_8h.html#a8986919a452ab77eec9a199ff6668e92',1,'autoip.h']]], + ['assertion_20handling',['Assertion handling',['../group__lwip__assertions.html',1,'']]], + ['arp',['ARP',['../group__lwip__opts__arp.html',1,'']]], + ['autoip',['AUTOIP',['../group__lwip__opts__autoip.html',1,'']]], + ['autoip',['AUTOIP',['../group__netifapi__autoip.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_3.html b/Libraries/LwIP/doc/doxygen/output/html/search/all_3.html new file mode 100644 index 0000000..03405c0 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_3.js b/Libraries/LwIP/doc/doxygen/output/html/search/all_3.js new file mode 100644 index 0000000..18d879f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_3.js @@ -0,0 +1,32 @@ +var searchData= +[ + ['b',['b',['../structapi__msg.html#ab0abd60527e96cc24c2c20c835cdac05',1,'api_msg']]], + ['base',['base',['../structmemp__desc.html#a9aec58adcbcd88167247296ca4346558',1,'memp_desc']]], + ['bc',['bc',['../structapi__msg.html#a1705127c6cd22c2c6dbbcc59834e41e0',1,'api_msg']]], + ['bind',['bind',['../group__socket.html#ga4a88bb849aa7203b24bb245a193997a6',1,'sockets.h']]], + ['ble_5faddr_5fto_5feui64',['ble_addr_to_eui64',['../group__rfc7668if.html#gaa5b1823c2509b8816ef98dcac67e037c',1,'ble_addr_to_eui64(uint8_t *dst, const uint8_t *src, int public_addr): lowpan6_ble.c'],['../group__rfc7668if.html#gaa5b1823c2509b8816ef98dcac67e037c',1,'ble_addr_to_eui64(uint8_t *dst, const uint8_t *src, int public_addr): lowpan6_ble.c']]], + ['body',['body',['../structsmtp__session.html#a7bb4bf5cc209e073341b56845e5cbd49',1,'smtp_session']]], + ['body_5flen',['body_len',['../structsmtp__session.html#a0da8b775ddfe5f8891464037a6b4bb4d',1,'smtp_session']]], + ['body_5fsent',['body_sent',['../structsmtp__session.html#a5893c61d863b4846a81d8a4bbcaebb5b',1,'smtp_session']]], + ['bridgeif_2ec',['bridgeif.c',['../bridgeif_8c.html',1,'']]], + ['bridgeif_2eh',['bridgeif.h',['../bridgeif_8h.html',1,'']]], + ['bridgeif_5fadd_5fport',['bridgeif_add_port',['../group__bridgeif.html#ga51b7d1af22f7023aabd8502aadf77c77',1,'bridgeif_add_port(struct netif *bridgeif, struct netif *portif): bridgeif.c'],['../group__bridgeif.html#ga51b7d1af22f7023aabd8502aadf77c77',1,'bridgeif_add_port(struct netif *bridgeif, struct netif *portif): bridgeif.c']]], + ['bridgeif_5fdebug',['BRIDGEIF_DEBUG',['../group__bridgeif__opts.html#gaab45e20e9b09a98217994082968cec73',1,'bridgeif_opts.h']]], + ['bridgeif_5ffdb_2ec',['bridgeif_fdb.c',['../bridgeif__fdb_8c.html',1,'']]], + ['bridgeif_5ffdb_5fadd',['bridgeif_fdb_add',['../group__bridgeif.html#gad20fea2657431d4a0905be80cb0b4666',1,'bridgeif_fdb_add(struct netif *bridgeif, const struct eth_addr *addr, bridgeif_portmask_t ports): bridgeif.c'],['../group__bridgeif.html#gad20fea2657431d4a0905be80cb0b4666',1,'bridgeif_fdb_add(struct netif *bridgeif, const struct eth_addr *addr, bridgeif_portmask_t ports): bridgeif.c']]], + ['bridgeif_5ffdb_5fdebug',['BRIDGEIF_FDB_DEBUG',['../group__bridgeif__opts.html#ga72e389f592470dc50288a68f3db70730',1,'bridgeif_opts.h']]], + ['bridgeif_5ffdb_5fget_5fdst_5fports',['bridgeif_fdb_get_dst_ports',['../group__bridgeif__fdb.html#ga616fb7404be5da79d8092b4a14976750',1,'bridgeif_fdb_get_dst_ports(void *fdb_ptr, struct eth_addr *dst_addr): bridgeif_fdb.c'],['../group__bridgeif__fdb.html#ga616fb7404be5da79d8092b4a14976750',1,'bridgeif_fdb_get_dst_ports(void *fdb_ptr, struct eth_addr *dst_addr): bridgeif_fdb.c']]], + ['bridgeif_5ffdb_5finit',['bridgeif_fdb_init',['../group__bridgeif__fdb.html#gaf7935226ee7f99f964bf0135b6cb9ca0',1,'bridgeif_fdb_init(u16_t max_fdb_entries): bridgeif_fdb.c'],['../group__bridgeif__fdb.html#gaf7935226ee7f99f964bf0135b6cb9ca0',1,'bridgeif_fdb_init(u16_t max_fdb_entries): bridgeif_fdb.c']]], + ['bridgeif_5ffdb_5fremove',['bridgeif_fdb_remove',['../group__bridgeif.html#ga79349b1e9d0f944e8abad5a6cfb1c8e8',1,'bridgeif_fdb_remove(struct netif *bridgeif, const struct eth_addr *addr): bridgeif.c'],['../group__bridgeif.html#ga79349b1e9d0f944e8abad5a6cfb1c8e8',1,'bridgeif_fdb_remove(struct netif *bridgeif, const struct eth_addr *addr): bridgeif.c']]], + ['bridgeif_5ffdb_5fupdate_5fsrc',['bridgeif_fdb_update_src',['../group__bridgeif__fdb.html#gad912bfd3ce8e24d0eb48b7dc9de07c39',1,'bridgeif_fdb_update_src(void *fdb_ptr, struct eth_addr *src_addr, u8_t port_idx): bridgeif_fdb.c'],['../group__bridgeif__fdb.html#gad912bfd3ce8e24d0eb48b7dc9de07c39',1,'bridgeif_fdb_update_src(void *fdb_ptr, struct eth_addr *src_addr, u8_t port_idx): bridgeif_fdb.c']]], + ['bridgeif_5ffw_5fdebug',['BRIDGEIF_FW_DEBUG',['../group__bridgeif__opts.html#gac456e97b1b0e9a57449596a2b229763a',1,'bridgeif_opts.h']]], + ['bridgeif_5finit',['bridgeif_init',['../group__bridgeif.html#ga23cc2c5f8fccefc470093840cc53727c',1,'bridgeif_init(struct netif *netif): bridgeif.c'],['../group__bridgeif.html#ga23cc2c5f8fccefc470093840cc53727c',1,'bridgeif_init(struct netif *netif): bridgeif.c']]], + ['bridgeif_5finitdata1',['BRIDGEIF_INITDATA1',['../group__bridgeif.html#ga3d41c7905b61aef3a3b8c61b3af7879f',1,'bridgeif.h']]], + ['bridgeif_5finitdata2',['BRIDGEIF_INITDATA2',['../group__bridgeif.html#gaaaeb47fbf1dd6c30cb502343fa0d0741',1,'bridgeif.h']]], + ['bridgeif_5finitdata_5fs',['bridgeif_initdata_s',['../structbridgeif__initdata__s.html',1,'']]], + ['bridgeif_5finitdata_5ft',['bridgeif_initdata_t',['../group__bridgeif.html#gac47f8ce66bc6dad5dd9829467f93a1bb',1,'bridgeif.h']]], + ['bridgeif_5fmax_5fports',['BRIDGEIF_MAX_PORTS',['../group__bridgeif__opts.html#ga6fe03b84359150b7dea3dfca942b6414',1,'bridgeif_opts.h']]], + ['bridgeif_5fopts_2eh',['bridgeif_opts.h',['../bridgeif__opts_8h.html',1,'']]], + ['bridgeif_5fport_5fnetifs_5foutput_5fdirect',['BRIDGEIF_PORT_NETIFS_OUTPUT_DIRECT',['../group__bridgeif__opts.html#ga5aed5cd9b01ba1345b47845cd04ca30d',1,'bridgeif_opts.h']]], + ['byte_5forder',['BYTE_ORDER',['../group__compiler__abstraction.html#ga1771b7fb65ee640524d0052f229768c3',1,'arch.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_4.html b/Libraries/LwIP/doc/doxygen/output/html/search/all_4.html new file mode 100644 index 0000000..8e1f4b9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_4.js b/Libraries/LwIP/doc/doxygen/output/html/search/all_4.js new file mode 100644 index 0000000..69733dd --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_4.js @@ -0,0 +1,48 @@ +var searchData= +[ + ['cache_5fflush',['cache_flush',['../structmdns__outpacket.html#a9bd0fd91dda48baa2938dddd747d3195',1,'mdns_outpacket']]], + ['callback',['callback',['../structnetconn.html#abe796060bb06e585333ca9a87862b624',1,'netconn']]], + ['callback_5farg',['callback_arg',['../structsmtp__session.html#af0544df7a935a092d825d8f2380f970f',1,'smtp_session']]], + ['callback_5ffn',['callback_fn',['../structsmtp__session.html#a24c13d621e18311a613ab68b856a7f7b',1,'smtp_session']]], + ['cb',['cb',['../structmqtt__request__t.html#a32a4b14b0b8b5b8ce8db1074e53f4a79',1,'mqtt_request_t']]], + ['changelog',['Changelog',['../changelog.html',1,'']]], + ['checksum_5fcheck_5ficmp',['CHECKSUM_CHECK_ICMP',['../group__lwip__opts__checksum.html#ga79807171be8c20b69a5cd8de83566d25',1,'opt.h']]], + ['checksum_5fcheck_5ficmp6',['CHECKSUM_CHECK_ICMP6',['../group__lwip__opts__checksum.html#gaf466a10b093489910a773fd1cec74c2d',1,'opt.h']]], + ['checksum_5fcheck_5fip',['CHECKSUM_CHECK_IP',['../group__lwip__opts__checksum.html#ga005b1b9988b84a2cb844144cef22c11e',1,'opt.h']]], + ['checksum_5fcheck_5ftcp',['CHECKSUM_CHECK_TCP',['../group__lwip__opts__checksum.html#gab676cc29571b7ffda12336482ad97699',1,'opt.h']]], + ['checksum_5fcheck_5fudp',['CHECKSUM_CHECK_UDP',['../group__lwip__opts__checksum.html#ga6747f7b72abe544fd4dc184cc7fcad37',1,'opt.h']]], + ['checksum_5fgen_5ficmp',['CHECKSUM_GEN_ICMP',['../group__lwip__opts__checksum.html#ga2291ec5bec0a551545da6d5f9f9316b2',1,'opt.h']]], + ['checksum_5fgen_5ficmp6',['CHECKSUM_GEN_ICMP6',['../group__lwip__opts__checksum.html#ga7cd47a55af03b1048c5a4a5fe0e76013',1,'opt.h']]], + ['checksum_5fgen_5fip',['CHECKSUM_GEN_IP',['../group__lwip__opts__checksum.html#ga8ddad81fc26268a13b35091781da2265',1,'opt.h']]], + ['checksum_5fgen_5ftcp',['CHECKSUM_GEN_TCP',['../group__lwip__opts__checksum.html#ga800069963cc4552b99235237c22f00bb',1,'opt.h']]], + ['checksum_5fgen_5fudp',['CHECKSUM_GEN_UDP',['../group__lwip__opts__checksum.html#ga98d460f8c2baed8bf62d5473831c0b2c',1,'opt.h']]], + ['chksum_5flen_5frx',['chksum_len_rx',['../structudp__pcb.html#a5e2833df51760c83c6032608eb5d0d4d',1,'udp_pcb']]], + ['client_5fid',['client_id',['../structmqtt__connect__client__info__t.html#ad35f7850df21f001d5c5ffaa1a18c05a',1,'mqtt_connect_client_info_t']]], + ['client_5fpass',['client_pass',['../structmqtt__connect__client__info__t.html#a8f68efe91c5311418151256c96102d4b',1,'mqtt_connect_client_info_t']]], + ['client_5fuser',['client_user',['../structmqtt__connect__client__info__t.html#aec961673d5c3e8dc853c91f30d9333b5',1,'mqtt_connect_client_info_t']]], + ['close',['close',['../structtftp__context.html#ae9181c57d1cf89bc263f7671e5630a65',1,'tftp_context::close()'],['../group__socket.html#ga4ef17e85ec4d3acdcee5ce23f8ed93c4',1,'close(): sockets.h']]], + ['closesocket',['closesocket',['../group__socket.html#ga5a3eb971b466278ada4f7f87399a537c',1,'sockets.h']]], + ['compiler_2fplatform_20abstraction',['Compiler/platform abstraction',['../group__compiler__abstraction.html',1,'']]], + ['conn',['conn',['../structapi__msg.html#abec5e33802d69f1b601543d60699f028',1,'api_msg::conn()'],['../structlwip__sock.html#a3a3fee485b3361ed7054cde149355fb4',1,'lwip_sock::conn()']]], + ['conn_5fstate',['conn_state',['../structmqtt__client__s.html#af4a07c1079e2e2a336f1939d8b9677e6',1,'mqtt_client_s']]], + ['connect',['connect',['../group__socket.html#gae3d13671f622e17c17317c9a16dfd0ee',1,'sockets.h']]], + ['connect_5farg',['connect_arg',['../structmqtt__client__s.html#ae6d53359ec6d70533dab7c0d2717ce1a',1,'mqtt_client_s']]], + ['current_5finput_5fnetif',['current_input_netif',['../structip__globals.html#a7da899c663b1d560b61d92ba6d544701',1,'ip_globals']]], + ['current_5fip4_5fheader',['current_ip4_header',['../structip__globals.html#a2e810f97cf3e8e855e3baafc3be8c0d4',1,'ip_globals']]], + ['current_5fip6_5fheader',['current_ip6_header',['../structip__globals.html#aa5cfc3ac29dc746a4cbe844206b0ed41',1,'ip_globals']]], + ['current_5fip_5fheader_5ftot_5flen',['current_ip_header_tot_len',['../structip__globals.html#a17004526e6f1a164c0bab01aeac5e34a',1,'ip_globals']]], + ['current_5fiphdr_5fdest',['current_iphdr_dest',['../structip__globals.html#a0b4e54250c692c638408de54593d2aa1',1,'ip_globals']]], + ['current_5fiphdr_5fsrc',['current_iphdr_src',['../structip__globals.html#a04d85a3dc2c417050b3e088fa58a74b0',1,'ip_globals']]], + ['current_5fmsg',['current_msg',['../structnetconn.html#a49ba09038b2f2563fd3a38e38f8b8ab9',1,'netconn']]], + ['current_5fnetif',['current_netif',['../structip__globals.html#a7803dc5950d143e4433a0df689989bab',1,'ip_globals']]], + ['custom_5ffree_5ffunction',['custom_free_function',['../structpbuf__custom.html#af614d17874746cbbf778dc4ca9eac2e9',1,'pbuf_custom']]], + ['cyclic_5ftick',['cyclic_tick',['../structmqtt__client__s.html#a6274ba2eb2fe6afa970b1c8a650d8cef',1,'mqtt_client_s']]], + ['callback_2dstyle_20apis',['Callback-style APIs',['../group__lwip__opts__callback.html',1,'']]], + ['checksum',['Checksum',['../group__lwip__opts__checksum.html',1,'']]], + ['core_20locking_20and_20mpu',['Core locking and MPU',['../group__lwip__opts__lock.html',1,'']]], + ['common_20functions',['Common functions',['../group__netconn__common.html',1,'']]], + ['client_20data_20handling',['Client data handling',['../group__netif__cd.html',1,'']]], + ['common_20pitfalls',['Common pitfalls',['../pitfalls.html',1,'']]], + ['core',['Core',['../group__snmp__core.html',1,'']]], + ['critical_20sections',['Critical sections',['../group__sys__prot.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_5.html b/Libraries/LwIP/doc/doxygen/output/html/search/all_5.html new file mode 100644 index 0000000..89a879e --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_5.js b/Libraries/LwIP/doc/doxygen/output/html/search/all_5.js new file mode 100644 index 0000000..13bb70e --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_5.js @@ -0,0 +1,106 @@ +var searchData= +[ + ['data_5fcb',['data_cb',['../structmqtt__client__s.html#a26dc9112351c042594a41703197925a7',1,'mqtt_client_s']]], + ['debug_2eh',['debug.h',['../debug_8h.html',1,'']]], + ['def_2ec',['def.c',['../def_8c.html',1,'']]], + ['def_2eh',['def.h',['../def_8h.html',1,'']]], + ['default_5facceptmbox_5fsize',['DEFAULT_ACCEPTMBOX_SIZE',['../group__lwip__opts__thread.html#ga5d5a6e04abe2ec233c7acdb09f992461',1,'opt.h']]], + ['default_5fraw_5frecvmbox_5fsize',['DEFAULT_RAW_RECVMBOX_SIZE',['../group__lwip__opts__thread.html#ga4ef8f046c957750056131310a1580df7',1,'opt.h']]], + ['default_5ftcp_5frecvmbox_5fsize',['DEFAULT_TCP_RECVMBOX_SIZE',['../group__lwip__opts__thread.html#ga1bd172938b9c8ba63156fcafc87e83c7',1,'opt.h']]], + ['default_5fthread_5fname',['DEFAULT_THREAD_NAME',['../group__lwip__opts__thread.html#gaca13123a5c8271558353e04123957616',1,'opt.h']]], + ['default_5fthread_5fprio',['DEFAULT_THREAD_PRIO',['../group__lwip__opts__thread.html#ga3d8715b1fdd0449d6c214e4a40108456',1,'opt.h']]], + ['default_5fthread_5fstacksize',['DEFAULT_THREAD_STACKSIZE',['../group__lwip__opts__thread.html#ga7f93dfeaed4021061959f822def602cb',1,'opt.h']]], + ['default_5fudp_5frecvmbox_5fsize',['DEFAULT_UDP_RECVMBOX_SIZE',['../group__lwip__opts__thread.html#ga09fe785559b3f0cf108da4440489e335',1,'opt.h']]], + ['deprecated_20list',['Deprecated List',['../deprecated.html',1,'']]], + ['dest_5faddr',['dest_addr',['../structmdns__outpacket.html#a1fdc90b48d8cf1fc24895f0c7a5798e4',1,'mdns_outpacket']]], + ['destination_5faddress',['destination_address',['../structieee__802154__hdr.html#a87ce59d2804cacc5a58411c8b6c47f33',1,'ieee_802154_hdr']]], + ['destination_5fpan_5fid',['destination_pan_id',['../structieee__802154__hdr.html#ac1ad9159d3bb70b1a7223060c6c81efd',1,'ieee_802154_hdr']]], + ['destroy',['destroy',['../structtcp__ext__arg__callbacks.html#ace586d5d376b42465927a4fd8688c24b',1,'tcp_ext_arg_callbacks']]], + ['dhcp_2ec',['dhcp.c',['../dhcp_8c.html',1,'']]], + ['dhcp_2eh',['dhcp.h',['../dhcp_8h.html',1,'(Global Namespace)'],['../prot_2dhcp_8h.html',1,'(Global Namespace)']]], + ['dhcpv4',['DHCPv4',['../group__dhcp4.html',1,'']]], + ['dhcpv6',['DHCPv6',['../group__dhcp6.html',1,'']]], + ['dhcp6_2ec',['dhcp6.c',['../dhcp6_8c.html',1,'']]], + ['dhcp6_2eh',['dhcp6.h',['../dhcp6_8h.html',1,'(Global Namespace)'],['../prot_2dhcp6_8h.html',1,'(Global Namespace)']]], + ['dhcp6_5fcleanup',['dhcp6_cleanup',['../group__dhcp6.html#gacb7042000509fb21e8d2758e235d6dde',1,'dhcp6_cleanup(struct netif *netif): dhcp6.c'],['../group__dhcp6.html#gacb7042000509fb21e8d2758e235d6dde',1,'dhcp6_cleanup(struct netif *netif): dhcp6.c']]], + ['dhcp6_5fdebug',['DHCP6_DEBUG',['../group__lwip__opts__debugmsg.html#gacfc11be8b3bf6bb55e3e5c39ea8802d1',1,'opt.h']]], + ['dhcp6_5fdisable',['dhcp6_disable',['../group__dhcp6.html#gadd0c783a85a410f75b37a3d922ad60d2',1,'dhcp6_disable(struct netif *netif): dhcp6.c'],['../group__dhcp6.html#gadd0c783a85a410f75b37a3d922ad60d2',1,'dhcp6_disable(struct netif *netif): dhcp6.c']]], + ['dhcp6_5fduid_5fllt',['DHCP6_DUID_LLT',['../prot_2dhcp6_8h.html#afe33f98cb94e0f18892a41502cf54e36',1,'dhcp6.h']]], + ['dhcp6_5fenable_5fstateful',['dhcp6_enable_stateful',['../group__dhcp6.html#gaa9e972fcd1d648ca5f02334b1591b619',1,'dhcp6_enable_stateful(struct netif *netif): dhcp6.c'],['../group__dhcp6.html#gaa9e972fcd1d648ca5f02334b1591b619',1,'dhcp6_enable_stateful(struct netif *netif): dhcp6.c']]], + ['dhcp6_5fenable_5fstateless',['dhcp6_enable_stateless',['../group__dhcp6.html#gaf3349463541e673fec33843eb019b18c',1,'dhcp6_enable_stateless(struct netif *netif): dhcp6.c'],['../group__dhcp6.html#gaf3349463541e673fec33843eb019b18c',1,'dhcp6_enable_stateless(struct netif *netif): dhcp6.c']]], + ['dhcp6_5fmsg',['dhcp6_msg',['../structdhcp6__msg.html',1,'']]], + ['dhcp6_5fnd6_5fra_5ftrigger',['dhcp6_nd6_ra_trigger',['../dhcp6_8c.html#af0f47aac3c04c84a7143fa6925e9fdba',1,'dhcp6_nd6_ra_trigger(struct netif *netif, u8_t managed_addr_config, u8_t other_config): dhcp6.c'],['../dhcp6_8h.html#af0f47aac3c04c84a7143fa6925e9fdba',1,'dhcp6_nd6_ra_trigger(struct netif *netif, u8_t managed_addr_config, u8_t other_config): dhcp6.c']]], + ['dhcp6_5foption_5fidx',['dhcp6_option_idx',['../dhcp6_8c.html#ac4c519a2e10067f277d6b09e60919e9a',1,'dhcp6.c']]], + ['dhcp6_5fremove_5fstruct',['dhcp6_remove_struct',['../dhcp6_8h.html#a76941ddba22fe00dfc47d2f339f7aca3',1,'dhcp6.h']]], + ['dhcp6_5frx_5foptions',['dhcp6_rx_options',['../dhcp6_8c.html#abcce06f078da4b03265d20c0bc1bdce0',1,'dhcp6.c']]], + ['dhcp6_5fset_5fstruct',['dhcp6_set_struct',['../group__dhcp6.html#ga5cdf4082c8a4ee6bf0cb874c0eaa8453',1,'dhcp6_set_struct(struct netif *netif, struct dhcp6 *dhcp6): dhcp6.c'],['../group__dhcp6.html#ga5cdf4082c8a4ee6bf0cb874c0eaa8453',1,'dhcp6_set_struct(struct netif *netif, struct dhcp6 *dhcp6): dhcp6.c']]], + ['dhcp6_5fstatus_5fsuccess',['DHCP6_STATUS_SUCCESS',['../prot_2dhcp6_8h.html#a878a7734e159826e82e958fe3a5ca175',1,'dhcp6.h']]], + ['dhcp6_5ftimer_5fmsecs',['DHCP6_TIMER_MSECS',['../dhcp6_8h.html#afdd69327dc7d9f5cc4f029d706f60c8f',1,'dhcp6.h']]], + ['dhcp6_5ftmr',['dhcp6_tmr',['../dhcp6_8c.html#a5289027cb2b166d08bc55b7ed2d4756d',1,'dhcp6_tmr(void): dhcp6.c'],['../dhcp6_8h.html#a5289027cb2b166d08bc55b7ed2d4756d',1,'dhcp6_tmr(void): dhcp6.c']]], + ['dhcp_5farp_5freply',['dhcp_arp_reply',['../dhcp_8c.html#a1fc0a94e0b94f13c5d302018f7ecb535',1,'dhcp_arp_reply(struct netif *netif, const ip4_addr_t *addr): dhcp.c'],['../dhcp_8h.html#a1fc0a94e0b94f13c5d302018f7ecb535',1,'dhcp_arp_reply(struct netif *netif, const ip4_addr_t *addr): dhcp.c']]], + ['dhcp_5fcleanup',['dhcp_cleanup',['../group__dhcp4.html#ga292a1b0c0c288ec508108a3fba473e64',1,'dhcp_cleanup(struct netif *netif): dhcp.c'],['../group__dhcp4.html#ga292a1b0c0c288ec508108a3fba473e64',1,'dhcp_cleanup(struct netif *netif): dhcp.c']]], + ['dhcp_5fcoarse_5ftimer_5fmsecs',['DHCP_COARSE_TIMER_MSECS',['../dhcp_8h.html#ad84b8f4deec421bbf6fd85e8fae047d6',1,'dhcp.h']]], + ['dhcp_5fcoarse_5ftimer_5fsecs',['DHCP_COARSE_TIMER_SECS',['../dhcp_8h.html#a3751cc5daa0875d415ebacd8ad675f1e',1,'dhcp.h']]], + ['dhcp_5fcoarse_5ftmr',['dhcp_coarse_tmr',['../dhcp_8c.html#ad7480883d64f3d6f083c8aa933b5e3cb',1,'dhcp_coarse_tmr(void): dhcp.c'],['../dhcp_8h.html#ad7480883d64f3d6f083c8aa933b5e3cb',1,'dhcp_coarse_tmr(void): dhcp.c']]], + ['dhcp_5fcreate_5frand_5fxid',['DHCP_CREATE_RAND_XID',['../dhcp_8c.html#ad6de9c5120654454a330bf5de53c4835',1,'dhcp.c']]], + ['dhcp_5fdebug',['DHCP_DEBUG',['../group__lwip__opts__debugmsg.html#ga97927ceecabcdb5f41735bf372a05cee',1,'opt.h']]], + ['dhcp_5fdoes_5farp_5fcheck',['DHCP_DOES_ARP_CHECK',['../group__lwip__opts__dhcp.html#gab2d91de7b2fce879b0a213682e1b0b69',1,'opt.h']]], + ['dhcp_5ffine_5ftimer_5fmsecs',['DHCP_FINE_TIMER_MSECS',['../dhcp_8h.html#a7a26209f52eebe8ded457ae141df403f',1,'dhcp.h']]], + ['dhcp_5ffine_5ftmr',['dhcp_fine_tmr',['../dhcp_8c.html#a601d97faa24fa7289244bb452f052045',1,'dhcp_fine_tmr(void): dhcp.c'],['../dhcp_8h.html#a601d97faa24fa7289244bb452f052045',1,'dhcp_fine_tmr(void): dhcp.c']]], + ['dhcp_5finform',['dhcp_inform',['../group__dhcp4.html#gabd7fcc7e0799e313885fc7fd9d4992ad',1,'dhcp_inform(struct netif *netif): dhcp.c'],['../group__dhcp4.html#gabd7fcc7e0799e313885fc7fd9d4992ad',1,'dhcp_inform(struct netif *netif): dhcp.c']]], + ['dhcp_5fmax_5fmsg_5flen',['DHCP_MAX_MSG_LEN',['../dhcp_8c.html#a63e9ec4517b80d8576f218d905e31a9b',1,'dhcp.c']]], + ['dhcp_5fmin_5freply_5flen',['DHCP_MIN_REPLY_LEN',['../dhcp_8c.html#aa52c2b64ef42fbad84a3bcd58052caab',1,'dhcp.c']]], + ['dhcp_5fmsg',['dhcp_msg',['../structdhcp__msg.html',1,'']]], + ['dhcp_5fnetwork_5fchanged',['dhcp_network_changed',['../dhcp_8c.html#a04f3824720223c439165243527906002',1,'dhcp_network_changed(struct netif *netif): dhcp.c'],['../dhcp_8h.html#a04f3824720223c439165243527906002',1,'dhcp_network_changed(struct netif *netif): dhcp.c']]], + ['dhcp_5foption_5fidx',['dhcp_option_idx',['../dhcp_8c.html#a8c3b584d223b995b48613ad96cb776a0',1,'dhcp.c']]], + ['dhcp_5foptions_5flen',['DHCP_OPTIONS_LEN',['../prot_2dhcp_8h.html#ae99d4be0d03f6f9c8f02f63abde91a06',1,'dhcp.h']]], + ['dhcp_5frelease',['dhcp_release',['../group__dhcp4.html#gaf92f7afb58252f82a749064602974bd4',1,'dhcp_release(struct netif *netif): dhcp.c'],['../group__dhcp4.html#gaf92f7afb58252f82a749064602974bd4',1,'dhcp_release(struct netif *netif): dhcp.c']]], + ['dhcp_5frelease_5fand_5fstop',['dhcp_release_and_stop',['../group__dhcp4.html#gaf7cd42b9f220446b6a597d3474da6ece',1,'dhcp_release_and_stop(struct netif *netif): dhcp.c'],['../group__dhcp4.html#gaf7cd42b9f220446b6a597d3474da6ece',1,'dhcp_release_and_stop(struct netif *netif): dhcp.c']]], + ['dhcp_5fremove_5fstruct',['dhcp_remove_struct',['../dhcp_8h.html#aa92284faa099dac4331c1fc0b997dabc',1,'dhcp.h']]], + ['dhcp_5frenew',['dhcp_renew',['../group__dhcp4.html#ga583eb8d58f5e96b7dea717948578a947',1,'dhcp_renew(struct netif *netif): dhcp.c'],['../group__dhcp4.html#ga583eb8d58f5e96b7dea717948578a947',1,'dhcp_renew(struct netif *netif): dhcp.c']]], + ['dhcp_5frx_5foptions_5fgiven',['dhcp_rx_options_given',['../dhcp_8c.html#a058b71e1d26b3758b29d16d9f892c8cc',1,'dhcp.c']]], + ['dhcp_5frx_5foptions_5fval',['dhcp_rx_options_val',['../dhcp_8c.html#a5abd232496063bddcbc6692c0e8f9c1f',1,'dhcp.c']]], + ['dhcp_5fset_5fstruct',['dhcp_set_struct',['../group__dhcp4.html#ga43812097832716a462c660eb59cc1bf8',1,'dhcp_set_struct(struct netif *netif, struct dhcp *dhcp): dhcp.c'],['../group__dhcp4.html#ga43812097832716a462c660eb59cc1bf8',1,'dhcp_set_struct(struct netif *netif, struct dhcp *dhcp): dhcp.c']]], + ['dhcp_5fstart',['dhcp_start',['../group__dhcp4.html#ga0c50968d9811aa2aa67fadc0885d744f',1,'dhcp_start(struct netif *netif): dhcp.c'],['../group__dhcp4.html#ga0c50968d9811aa2aa67fadc0885d744f',1,'dhcp_start(struct netif *netif): dhcp.c']]], + ['dhcp_5fstop',['dhcp_stop',['../group__dhcp4.html#ga93f6bf21086dc9b10c0bec4676f97312',1,'dhcp_stop(struct netif *netif): dhcp.c'],['../group__dhcp4.html#ga93f6bf21086dc9b10c0bec4676f97312',1,'dhcp_stop(struct netif *netif): dhcp.c']]], + ['dhcp_5fsupplied_5faddress',['dhcp_supplied_address',['../dhcp_8c.html#ae24a2529372218327ab9cb6592041c85',1,'dhcp_supplied_address(const struct netif *netif): dhcp.c'],['../dhcp_8h.html#ae24a2529372218327ab9cb6592041c85',1,'dhcp_supplied_address(const struct netif *netif): dhcp.c']]], + ['dns',['DNS',['../group__dns.html',1,'']]], + ['dns_2ec',['dns.c',['../dns_8c.html',1,'']]], + ['dns_2eh',['dns.h',['../dns_8h.html',1,'(Global Namespace)'],['../prot_2dns_8h.html',1,'(Global Namespace)']]], + ['dns_5faddrtype',['dns_addrtype',['../structdns__api__msg.html#afb2536a6c342bed4c4ad9d75982f7493',1,'dns_api_msg']]], + ['dns_5fanswer',['dns_answer',['../structdns__answer.html',1,'']]], + ['dns_5fapi_5fmsg',['dns_api_msg',['../structdns__api__msg.html',1,'']]], + ['dns_5fdebug',['DNS_DEBUG',['../group__lwip__opts__debugmsg.html#gaba55da2352c99d813767913e5e36be1f',1,'opt.h']]], + ['dns_5fdoes_5fname_5fcheck',['DNS_DOES_NAME_CHECK',['../group__lwip__opts__dns.html#ga07ffd8e9106dae3b65347bd03811a4b6',1,'opt.h']]], + ['dns_5ffound_5fcallback',['dns_found_callback',['../dns_8h.html#ab5a9dec5b22802f91876c53e99f427ae',1,'dns.h']]], + ['dns_5fgethostbyname',['dns_gethostbyname',['../group__dns.html#ga1e040ec38166dc9bfcc3473aab0c799f',1,'dns_gethostbyname(const char *hostname, ip_addr_t *addr, dns_found_callback found, void *callback_arg): dns.c'],['../group__dns.html#ga1e040ec38166dc9bfcc3473aab0c799f',1,'dns_gethostbyname(const char *hostname, ip_addr_t *addr, dns_found_callback found, void *callback_arg): dns.c']]], + ['dns_5fgethostbyname_5faddrtype',['dns_gethostbyname_addrtype',['../group__dns.html#gae84449f60dca6b863142daca8e03ce79',1,'dns_gethostbyname_addrtype(const char *hostname, ip_addr_t *addr, dns_found_callback found, void *callback_arg, u8_t dns_addrtype): dns.c'],['../group__dns.html#gae84449f60dca6b863142daca8e03ce79',1,'dns_gethostbyname_addrtype(const char *hostname, ip_addr_t *addr, dns_found_callback found, void *callback_arg, u8_t dns_addrtype): dns.c']]], + ['dns_5fgetserver',['dns_getserver',['../group__dns.html#gad02111a6b26b93f1c3580d5f41a59af3',1,'dns_getserver(u8_t numdns): dns.c'],['../group__dns.html#gad02111a6b26b93f1c3580d5f41a59af3',1,'dns_getserver(u8_t numdns): dns.c']]], + ['dns_5fhdr',['dns_hdr',['../structdns__hdr.html',1,'']]], + ['dns_5finit',['dns_init',['../dns_8c.html#adb31c3b6180773bd11f914c327f209cf',1,'dns_init(void): dns.c'],['../dns_8h.html#adb31c3b6180773bd11f914c327f209cf',1,'dns_init(void): dns.c']]], + ['dns_5flocal_5fhostlist',['DNS_LOCAL_HOSTLIST',['../group__lwip__opts__dns.html#gacba1ac491c1b47b98dfbd0d5c1662659',1,'opt.h']]], + ['dns_5flocal_5fhostlist_5fis_5fdynamic',['DNS_LOCAL_HOSTLIST_IS_DYNAMIC',['../group__lwip__opts__dns.html#ga8235a5fb0a1c1cceeee670cf95612ba8',1,'opt.h']]], + ['dns_5fmax_5fname_5flength',['DNS_MAX_NAME_LENGTH',['../group__lwip__opts__dns.html#ga3b01c79902063c170ef57deb72f56124',1,'opt.h']]], + ['dns_5fmax_5fretries',['DNS_MAX_RETRIES',['../group__lwip__opts__dns.html#gaab73c241189335435f3f662aa6a00dba',1,'opt.h']]], + ['dns_5fmax_5fservers',['DNS_MAX_SERVERS',['../group__lwip__opts__dns.html#ga9f9881c887a8aceb9765820c2dbdf292',1,'opt.h']]], + ['dns_5fmax_5fttl',['DNS_MAX_TTL',['../dns_8c.html#a7f5553dc4a0d2bf99ba1282a86df31e2',1,'dns.c']]], + ['dns_5fmquery_5fport',['DNS_MQUERY_PORT',['../prot_2dns_8h.html#a62d67af5ac6c6b3f98a6566a42564276',1,'dns.h']]], + ['dns_5fport_5fallowed',['DNS_PORT_ALLOWED',['../dns_8c.html#a97f3b0c56aeee091fdf2f07faf864ce0',1,'dns.c']]], + ['dns_5fquery',['dns_query',['../structdns__query.html',1,'']]], + ['dns_5frand_5ftxid',['DNS_RAND_TXID',['../dns_8c.html#a9209c204996270af5cfdfd6e391267a1',1,'dns.c']]], + ['dns_5freq_5fentry',['dns_req_entry',['../structdns__req__entry.html',1,'']]], + ['dns_5fserver_5fport',['DNS_SERVER_PORT',['../prot_2dns_8h.html#a9266b48706648ecf0625a3e651095317',1,'dns.h']]], + ['dns_5fsetserver',['dns_setserver',['../group__dns.html#gaf66c5d8273f83cdc2cdd8911fb68d584',1,'dns_setserver(u8_t numdns, const ip_addr_t *dnsserver): dns.c'],['../group__dns.html#gaf66c5d8273f83cdc2cdd8911fb68d584',1,'dns_setserver(u8_t numdns, const ip_addr_t *dnsserver): dns.c']]], + ['dns_5ftable_5fentry',['dns_table_entry',['../structdns__table__entry.html',1,'']]], + ['dns_5ftable_5fsize',['DNS_TABLE_SIZE',['../group__lwip__opts__dns.html#ga2384e76c1acdf969d883f3de08d340f7',1,'opt.h']]], + ['dns_5ftmr',['dns_tmr',['../dns_8c.html#a9389f374ec66488aa4f42a652583f533',1,'dns_tmr(void): dns.c'],['../dns_8h.html#a9389f374ec66488aa4f42a652583f533',1,'dns_tmr(void): dns.c']]], + ['dns_5ftmr_5finterval',['DNS_TMR_INTERVAL',['../dns_8h.html#a464a7435c4c00735af59033d2acd83bb',1,'dns.h']]], + ['dns_5fttl',['dns_ttl',['../structmdns__service.html#a5a939a4da01cb50c74cd53b352e4fa14',1,'mdns_service::dns_ttl()'],['../structmdns__host.html#a4547e5a8375fc1f1372546268a80d51b',1,'mdns_host::dns_ttl()']]], + ['domain_5foffsets',['domain_offsets',['../structmdns__outpacket.html#aee97e98c4869aa63ffe348d38d87221f',1,'mdns_outpacket']]], + ['debugging',['Debugging',['../group__lwip__opts__debug.html',1,'']]], + ['debug_20messages',['Debug messages',['../group__lwip__opts__debugmsg.html',1,'']]], + ['dhcp',['DHCP',['../group__lwip__opts__dhcp.html',1,'']]], + ['dhcpv6',['DHCPv6',['../group__lwip__opts__dhcpv6.html',1,'']]], + ['dns',['DNS',['../group__lwip__opts__dns.html',1,'']]], + ['dhcpv4',['DHCPv4',['../group__netifapi__dhcp4.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_6.html b/Libraries/LwIP/doc/doxygen/output/html/search/all_6.html new file mode 100644 index 0000000..6afac06 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_6.js b/Libraries/LwIP/doc/doxygen/output/html/search/all_6.js new file mode 100644 index 0000000..57dd6dc --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_6.js @@ -0,0 +1,83 @@ +var searchData= +[ + ['eai_5fnoname',['EAI_NONAME',['../lwip_2netdb_8h.html#a0bb00f48d6ba1e8c55b7d85c8e3a19a7',1,'netdb.h']]], + ['ehttpc_5fresult',['ehttpc_result',['../group__httpc.html#ga49e34884b272b1e0ddae8da46c31d9a3',1,'http_client.h']]], + ['err',['err',['../structapi__msg.html#a8c66bd95217fa627f13f2f0847bbb25f',1,'api_msg::err()'],['../structdns__api__msg.html#a6536d91adb146555461359bd451b30de',1,'dns_api_msg::err()']]], + ['err_2ec',['err.c',['../err_8c.html',1,'']]], + ['err_2eh',['err.h',['../err_8h.html',1,'']]], + ['err_5fabrt',['ERR_ABRT',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadcaf316b2c5eee4079820f7100849115142',1,'err.h']]], + ['err_5falready',['ERR_ALREADY',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadcae6f9c1e4c18ca844f7934307d4cc30e5',1,'err.h']]], + ['err_5farg',['ERR_ARG',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadcab508ce0ebdf3ca735208b00a80a45c91',1,'err.h']]], + ['err_5fbuf',['ERR_BUF',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadca05c91366f1b5203a5db9a241b415cd63',1,'err.h']]], + ['err_5fclsd',['ERR_CLSD',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadcaa5176d9fecf8ec43d3bc49f4e6c3f7f5',1,'err.h']]], + ['err_5fconn',['ERR_CONN',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadcab0036c51817b5200bfe8157cc4115b27',1,'err.h']]], + ['err_5fenum_5ft',['err_enum_t',['../group__infrastructure__errors.html#gae2e66c7d13afc90ffecd6151680fbadc',1,'err.h']]], + ['err_5fif',['ERR_IF',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadca7d61d90449ae6788575e8e46d5d3bbc6',1,'err.h']]], + ['err_5finprogress',['ERR_INPROGRESS',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadca13e1dd0edca8a27b6abdf1524bde7929',1,'err.h']]], + ['err_5fisconn',['ERR_ISCONN',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadca8543e1d6422fed7b318d97e08dcbaa33',1,'err.h']]], + ['err_5fmem',['ERR_MEM',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadcaaaeafdbf3aecc46864daa3cd829c7e05',1,'err.h']]], + ['err_5fok',['ERR_OK',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadcaa26c163b80b1f6786ca81dadc14b00fb',1,'err.h']]], + ['err_5frst',['ERR_RST',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadca759030525f1768a23dc086a5fd45b4e5',1,'err.h']]], + ['err_5frte',['ERR_RTE',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadca9448893187313c0c5a502ca9a9ad1c2a',1,'err.h']]], + ['err_5ft',['err_t',['../group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb',1,'err.h']]], + ['err_5ftimeout',['ERR_TIMEOUT',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadcac568baeb6407ef5e2630084ccbc34be8',1,'err.h']]], + ['err_5fuse',['ERR_USE',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadca4ebdc2aa1dbd75f927845733a3fb1f8b',1,'err.h']]], + ['err_5fval',['ERR_VAL',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadcaa9a1c5a6fdeed0aad7fe41d538482bbd',1,'err.h']]], + ['err_5fwouldblock',['ERR_WOULDBLOCK',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadcab9dcf89d46668b072192278fb907b7ad',1,'err.h']]], + ['errevent',['errevent',['../structlwip__sock.html#a9245a7ab9471bfb6fac94c66d26fba5e',1,'lwip_sock']]], + ['errno_2eh',['errno.h',['../compat_2stdc_2errno_8h.html',1,'(Global Namespace)'],['../lwip_2errno_8h.html',1,'(Global Namespace)']]], + ['eth_5faddr',['eth_addr',['../structeth__addr.html',1,'eth_addr'],['../lwip_2prot_2ethernet_8h.html#a19c72ce98569e0fb55948a7587d704ee',1,'ETH_ADDR(): ethernet.h']]], + ['eth_5fhdr',['eth_hdr',['../structeth__hdr.html',1,'']]], + ['eth_5fpad_5fsize',['ETH_PAD_SIZE',['../group__lwip__opts__arp.html#gad7fa3b356ca7e603e848b069c4cc6276',1,'opt.h']]], + ['eth_5fvlan_5fhdr',['eth_vlan_hdr',['../structeth__vlan__hdr.html',1,'']]], + ['ethaddr',['ethaddr',['../structbridgeif__initdata__s.html#a8e0048db5e021f5d79411492dc9330bc',1,'bridgeif_initdata_s']]], + ['etharp',['etharp',['../structstats__.html#aa52547cb08dc828927494dc485bb69f3',1,'stats_']]], + ['etharp_2ec',['etharp.c',['../etharp_8c.html',1,'']]], + ['etharp_2eh',['etharp.h',['../lwip_2etharp_8h.html',1,'(Global Namespace)'],['../lwip_2prot_2etharp_8h.html',1,'(Global Namespace)']]], + ['etharp_5fcleanup_5fnetif',['etharp_cleanup_netif',['../etharp_8c.html#ae94677a2a5f3698276027c7475f6ca05',1,'etharp_cleanup_netif(struct netif *netif): etharp.c'],['../lwip_2etharp_8h.html#ae94677a2a5f3698276027c7475f6ca05',1,'etharp_cleanup_netif(struct netif *netif): etharp.c']]], + ['etharp_5fdebug',['ETHARP_DEBUG',['../group__lwip__opts__debugmsg.html#gabff5d1e0b334f5b45bd2b8bbb675411e',1,'opt.h']]], + ['etharp_5ffind_5faddr',['etharp_find_addr',['../etharp_8c.html#a0f8ca87c5472fa165763c8c38b76174c',1,'etharp_find_addr(struct netif *netif, const ip4_addr_t *ipaddr, struct eth_addr **eth_ret, const ip4_addr_t **ip_ret): etharp.c'],['../lwip_2etharp_8h.html#a0f8ca87c5472fa165763c8c38b76174c',1,'etharp_find_addr(struct netif *netif, const ip4_addr_t *ipaddr, struct eth_addr **eth_ret, const ip4_addr_t **ip_ret): etharp.c']]], + ['etharp_5fflag_5ftry_5fhard',['ETHARP_FLAG_TRY_HARD',['../etharp_8c.html#a96f8787ca623e704da1d32ca7dd6d6d9',1,'etharp.c']]], + ['etharp_5fget_5fentry',['etharp_get_entry',['../etharp_8c.html#ab93df7ccb26496100d45137541e863c8',1,'etharp_get_entry(size_t i, ip4_addr_t **ipaddr, struct netif **netif, struct eth_addr **eth_ret): etharp.c'],['../lwip_2etharp_8h.html#ab93df7ccb26496100d45137541e863c8',1,'etharp_get_entry(size_t i, ip4_addr_t **ipaddr, struct netif **netif, struct eth_addr **eth_ret): etharp.c']]], + ['etharp_5fgratuitous',['etharp_gratuitous',['../lwip_2etharp_8h.html#a83947dea159baf3420922084072e631e',1,'etharp.h']]], + ['etharp_5fhdr',['etharp_hdr',['../structetharp__hdr.html',1,'']]], + ['etharp_5finput',['etharp_input',['../etharp_8c.html#a540a5506979693ef9ac4496db9bfa7d6',1,'etharp_input(struct pbuf *p, struct netif *netif): etharp.c'],['../lwip_2etharp_8h.html#a540a5506979693ef9ac4496db9bfa7d6',1,'etharp_input(struct pbuf *p, struct netif *netif): etharp.c']]], + ['etharp_5foutput',['etharp_output',['../etharp_8c.html#a19258c75a3778b6ed0c82f63a419502d',1,'etharp_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr): etharp.c'],['../lwip_2etharp_8h.html#a19258c75a3778b6ed0c82f63a419502d',1,'etharp_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr): etharp.c']]], + ['etharp_5fq_5fentry',['etharp_q_entry',['../structetharp__q__entry.html',1,'']]], + ['etharp_5fquery',['etharp_query',['../etharp_8c.html#ae180772e31346a0afeb707ad172dd19c',1,'etharp_query(struct netif *netif, const ip4_addr_t *ipaddr, struct pbuf *q): etharp.c'],['../lwip_2etharp_8h.html#ae180772e31346a0afeb707ad172dd19c',1,'etharp_query(struct netif *netif, const ip4_addr_t *ipaddr, struct pbuf *q): etharp.c']]], + ['etharp_5frequest',['etharp_request',['../etharp_8c.html#a3e56faced96841e615f88dd57d1b2b15',1,'etharp_request(struct netif *netif, const ip4_addr_t *ipaddr): etharp.c'],['../lwip_2etharp_8h.html#a3e56faced96841e615f88dd57d1b2b15',1,'etharp_request(struct netif *netif, const ip4_addr_t *ipaddr): etharp.c']]], + ['etharp_5fstate',['etharp_state',['../etharp_8c.html#ae95dee9363e6d3417298e07380b2d383',1,'etharp.c']]], + ['etharp_5fstats',['ETHARP_STATS',['../group__lwip__opts__stats.html#ga3a8359abf4fff8ffdc449e5007f93275',1,'opt.h']]], + ['etharp_5fsupport_5fstatic_5fentries',['ETHARP_SUPPORT_STATIC_ENTRIES',['../group__lwip__opts__arp.html#ga4675829464156f3d665f4de171c212d7',1,'opt.h']]], + ['etharp_5fsupport_5fvlan',['ETHARP_SUPPORT_VLAN',['../group__lwip__opts__arp.html#ga70ce0ecf56cf5fab000134e66d863f90',1,'opt.h']]], + ['etharp_5ftable_5fmatch_5fnetif',['ETHARP_TABLE_MATCH_NETIF',['../group__lwip__opts__arp.html#ga2f762eee309a545650f80fc8dcc19084',1,'opt.h']]], + ['etharp_5ftmr',['etharp_tmr',['../etharp_8c.html#a654f4dad71f7e2bc4820094648f37a26',1,'etharp_tmr(void): etharp.c'],['../lwip_2etharp_8h.html#a654f4dad71f7e2bc4820094648f37a26',1,'etharp_tmr(void): etharp.c']]], + ['ethernet',['Ethernet',['../group__ethernet.html',1,'']]], + ['ethernet_2ec',['ethernet.c',['../ethernet_8c.html',1,'']]], + ['ethernet_2eh',['ethernet.h',['../lwip_2prot_2ethernet_8h.html',1,'(Global Namespace)'],['../netif_2ethernet_8h.html',1,'(Global Namespace)']]], + ['ethernet_5finput',['ethernet_input',['../group__lwip__nosys.html#ga6a10c58b82c56d02c48b3cfa2c2494ff',1,'ethernet_input(struct pbuf *p, struct netif *netif): ethernet.c'],['../group__lwip__nosys.html#ga6a10c58b82c56d02c48b3cfa2c2494ff',1,'ethernet_input(struct pbuf *p, struct netif *netif): ethernet.c']]], + ['ethernet_5foutput',['ethernet_output',['../group__ethernet.html#gac9cad5802bfa3d885f13d2ba0f40b778',1,'ethernet_output(struct netif *netif, struct pbuf *p, const struct eth_addr *src, const struct eth_addr *dst, u16_t eth_type): ethernet.c'],['../group__ethernet.html#gac9cad5802bfa3d885f13d2ba0f40b778',1,'ethernet_output(struct netif *netif, struct pbuf *p, const struct eth_addr *src, const struct eth_addr *dst, u16_t eth_type): ethernet.c']]], + ['ethip6_2ec',['ethip6.c',['../ethip6_8c.html',1,'']]], + ['ethip6_2eh',['ethip6.h',['../ethip6_8h.html',1,'']]], + ['ethip6_5foutput',['ethip6_output',['../ethip6_8c.html#ab5326546d33174f91f1fb0cc6d398bfd',1,'ethip6_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr): ethip6.c'],['../ethip6_8h.html#ab5326546d33174f91f1fb0cc6d398bfd',1,'ethip6_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr): ethip6.c']]], + ['ethtype_5farp',['ETHTYPE_ARP',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4a41217db03576ea59c44b28b248c39be5',1,'ieee.h']]], + ['ethtype_5fethercat',['ETHTYPE_ETHERCAT',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4a5085a5fd5f9c9506124e93ea43ad2d7c',1,'ieee.h']]], + ['ethtype_5fip',['ETHTYPE_IP',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4ac95756b20fde70b868ef4185dd221c79',1,'ieee.h']]], + ['ethtype_5fipv6',['ETHTYPE_IPV6',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4aab26004eed559217be5dd466a79b1383',1,'ieee.h']]], + ['ethtype_5fjumbo',['ETHTYPE_JUMBO',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4a2511e8a31961bd742363b11b274b9dd1',1,'ieee.h']]], + ['ethtype_5flldp',['ETHTYPE_LLDP',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4a02eab0dd87f222a2d555ca38b1b8afcc',1,'ieee.h']]], + ['ethtype_5fmrp',['ETHTYPE_MRP',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4ad36caec44d8db59ff433a8bd3e92ad3e',1,'ieee.h']]], + ['ethtype_5fpppoe',['ETHTYPE_PPPOE',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4a8c0e8f68b90134eb4f1f17d3d2eb6f8c',1,'ieee.h']]], + ['ethtype_5fpppoedisc',['ETHTYPE_PPPOEDISC',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4a58c6f40d7cc3edb9455762938f3f6569',1,'ieee.h']]], + ['ethtype_5fprofinet',['ETHTYPE_PROFINET',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4a889eb8f716238d16ee3408f16a5cf19d',1,'ieee.h']]], + ['ethtype_5fptp',['ETHTYPE_PTP',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4aa3e9e834eef932d073028e28eb8793dc',1,'ieee.h']]], + ['ethtype_5fqinq',['ETHTYPE_QINQ',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4a39a18006412cbb57536535bd9d378394',1,'ieee.h']]], + ['ethtype_5frarp',['ETHTYPE_RARP',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4a14292184cb41b279249319896d0e2b1f',1,'ieee.h']]], + ['ethtype_5fsercos',['ETHTYPE_SERCOS',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4ab93419f8edf5692e91629ab92fce8a14',1,'ieee.h']]], + ['ethtype_5fvlan',['ETHTYPE_VLAN',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4ad8f84826d52d92ac24a477d1f03e7903',1,'ieee.h']]], + ['ethtype_5fwol',['ETHTYPE_WOL',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4a530a30feb9b87fd993da2bf83776cf9b',1,'ieee.h']]], + ['eui64_5fto_5fble_5faddr',['eui64_to_ble_addr',['../group__rfc7668if.html#ga3e245a85f9edddca93ddd2967209881d',1,'eui64_to_ble_addr(uint8_t *dst, const uint8_t *src): lowpan6_ble.c'],['../group__rfc7668if.html#ga3e245a85f9edddca93ddd2967209881d',1,'eui64_to_ble_addr(uint8_t *dst, const uint8_t *src): lowpan6_ble.c']]], + ['exceptset',['exceptset',['../structlwip__select__cb.html#a2a1e68993ed887fca326d1373ea6caed',1,'lwip_select_cb']]], + ['error_20codes',['Error codes',['../group__infrastructure__errors.html',1,'']]], + ['ext_20arguments',['ext arguments',['../group__tcp__raw__extargs.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_7.html b/Libraries/LwIP/doc/doxygen/output/html/search/all_7.html new file mode 100644 index 0000000..de19107 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_7.js b/Libraries/LwIP/doc/doxygen/output/html/search/all_7.js new file mode 100644 index 0000000..e3c43e6 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_7.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['fdb_20example_20code',['FDB example code',['../group__bridgeif__fdb.html',1,'']]], + ['fcntl',['fcntl',['../group__socket.html#gaaa2b0e00cab161fcc4b31ee0d06e7eb3',1,'sockets.h']]], + ['flags',['flags',['../structnetconn.html#a96cb9a3830248699bd07a1a447e5630c',1,'netconn::flags()'],['../structnetif.html#a1c171db6097bbb6f09f63549a66e00ea',1,'netif::flags()'],['../structpbuf.html#aa4d1af2cab3d9280d29212095b5b872a',1,'pbuf::flags()']]], + ['fold_5fu32t',['FOLD_U32T',['../inet__chksum_8h.html#a6ffe83b4bdd1784a0671ee4778966a01',1,'inet_chksum.h']]], + ['frame_5fcontrol',['frame_control',['../structieee__802154__hdr.html#a1d1e2cef0e0c1b1e1fd02a8a5f07fb10',1,'ieee_802154_hdr']]], + ['freeaddrinfo',['freeaddrinfo',['../group__netdbapi.html#gab28cd3049bcf6e2bc3a71e968a64a92d',1,'netdb.h']]], + ['from',['from',['../structsmtp__session.html#a8dc4651c67618e33c56dc66790bc12ee',1,'smtp_session']]], + ['from_5flen',['from_len',['../structsmtp__session.html#a191b09e7142414a671da82fece888e65',1,'smtp_session']]], + ['flags',['Flags',['../group__netif__flags.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_8.html b/Libraries/LwIP/doc/doxygen/output/html/search/all_8.html new file mode 100644 index 0000000..11e27cd --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_8.js b/Libraries/LwIP/doc/doxygen/output/html/search/all_8.js new file mode 100644 index 0000000..739a417 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_8.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['get_5fvalue',['get_value',['../structsnmp__node__instance.html#a17aa954aa34672f4a399bf0d91c0a649',1,'snmp_node_instance::get_value()'],['../structsnmp__table__node.html#ac65c57e29faa456a9a710185109fe272',1,'snmp_table_node::get_value()']]], + ['getaddrinfo',['getaddrinfo',['../group__netdbapi.html#ga558191530d91c101621b49e43bd5bbf5',1,'netdb.h']]], + ['gethostbyname',['gethostbyname',['../group__netdbapi.html#ga39746b4b096060ca3e8c6ee7a7560b1d',1,'netdb.h']]], + ['gethostbyname_5fr',['gethostbyname_r',['../group__netdbapi.html#ga76204a4d646dba393f88aa9b0980fc07',1,'netdb.h']]], + ['gethostbyname_5fr_5fhelper',['gethostbyname_r_helper',['../structgethostbyname__r__helper.html',1,'']]], + ['getpeername',['getpeername',['../group__socket.html#ga33bf1b7f5b11de02d0db32531cd940b8',1,'sockets.h']]], + ['getsockname',['getsockname',['../group__socket.html#gab096fb7dbc3f84be1699a87dce980f2f',1,'sockets.h']]], + ['getsockopt',['getsockopt',['../group__socket.html#gad2de02b35dbbf2334d1befb137ede821',1,'sockets.h']]], + ['group_5faddress',['group_address',['../structigmp__group.html#ae26e6041f865880bf46cd21b6f9af854',1,'igmp_group::group_address()'],['../structmld__group.html#a781abf78d835627ded1202166b44b88e',1,'mld_group::group_address()']]], + ['group_5fstate',['group_state',['../structigmp__group.html#add0d24f719ad4b598abad254689ad911',1,'igmp_group::group_state()'],['../structmld__group.html#ae9cfd3f126257aa3aff4a24e05c04059',1,'mld_group::group_state()']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_9.html b/Libraries/LwIP/doc/doxygen/output/html/search/all_9.html new file mode 100644 index 0000000..f8abbbe --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_9.js b/Libraries/LwIP/doc/doxygen/output/html/search/all_9.js new file mode 100644 index 0000000..526952e --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_9.js @@ -0,0 +1,59 @@ +var searchData= +[ + ['how_20to_20contribute_20to_20lwip',['How to contribute to lwIP',['../contrib.html',1,'']]], + ['h_5ferrno',['h_errno',['../netdb_8c.html#a2a1ce3f2040007303d36c0b682b5ac10',1,'h_errno(): netdb.c'],['../lwip_2netdb_8h.html#a2a1ce3f2040007303d36c0b682b5ac10',1,'h_errno(): netdb.c']]], + ['hostent_5fstorage',['HOSTENT_STORAGE',['../netdb_8c.html#acfc1e988534c0e497599b904739f92fe',1,'netdb.c']]], + ['http_5fclient_2ec',['http_client.c',['../http__client_8c.html',1,'']]], + ['http_5fclient_2eh',['http_client.h',['../http__client_8h.html',1,'']]], + ['http_5fdefault_5fport',['HTTP_DEFAULT_PORT',['../group__httpc.html#ga1f192f3009865e9f9a3cd83609c866c2',1,'http_client.h']]], + ['http_5fis_5fdata_5fvolatile',['HTTP_IS_DATA_VOLATILE',['../httpd_8c.html#aa93d60e8af23b915b5b9652ff71e1300',1,'httpd.c']]], + ['http_5fis_5fhdr_5fvolatile',['HTTP_IS_HDR_VOLATILE',['../httpd_8c.html#af281bc4a762d56243e0b85dd4197174a',1,'httpd.c']]], + ['http_5fis_5ftag_5fvolatile',['HTTP_IS_TAG_VOLATILE',['../group__httpd__opts.html#ga662e88120b507426374dd8ebbd54a048',1,'httpd_opts.h']]], + ['http_5fset_5fcgi_5fhandlers',['http_set_cgi_handlers',['../group__httpd.html#gae1ec09532ff7fc622e1860727bf2c897',1,'http_set_cgi_handlers(const tCGI *cgis, int num_handlers): httpd.c'],['../group__httpd.html#gae1ec09532ff7fc622e1860727bf2c897',1,'http_set_cgi_handlers(const tCGI *pCGIs, int iNumHandlers): httpd.c']]], + ['http_5fset_5fssi_5fhandler',['http_set_ssi_handler',['../group__httpd.html#ga8834ecb16d9a7d6c128bdf9514b7879c',1,'http_set_ssi_handler(tSSIHandler ssi_handler, const char **tags, int num_tags): httpd.c'],['../group__httpd.html#ga8834ecb16d9a7d6c128bdf9514b7879c',1,'http_set_ssi_handler(tSSIHandler pfnSSIHandler, const char **ppcTags, int iNumTags): httpd.c']]], + ['http_20client',['HTTP client',['../group__httpc.html',1,'']]], + ['httpc_5fclient_5fagent',['HTTPC_CLIENT_AGENT',['../http__client_8c.html#aeda6122d341b879ba8b0fb2df834276a',1,'http_client.c']]], + ['httpc_5fdebug',['HTTPC_DEBUG',['../http__client_8c.html#a32d4c0e6e42327e21fb59dabdc152dd1',1,'http_client.c']]], + ['httpc_5fdebug_5frequest',['HTTPC_DEBUG_REQUEST',['../http__client_8c.html#ad2ec42c8e7adaef67266a5bd12c4ad2a',1,'http_client.c']]], + ['httpc_5fget_5ffile',['httpc_get_file',['../group__httpc.html#ga6c961e52cec2d25b4b82b6910ebcfa1b',1,'httpc_get_file(const ip_addr_t *server_addr, u16_t port, const char *uri, const httpc_connection_t *settings, altcp_recv_fn recv_fn, void *callback_arg, httpc_state_t **connection): http_client.c'],['../group__httpc.html#ga6c961e52cec2d25b4b82b6910ebcfa1b',1,'httpc_get_file(const ip_addr_t *server_addr, u16_t port, const char *uri, const httpc_connection_t *settings, altcp_recv_fn recv_fn, void *callback_arg, httpc_state_t **connection): http_client.c']]], + ['httpc_5fget_5ffile_5fdns',['httpc_get_file_dns',['../group__httpc.html#gabd4ef2259885a93090733235cc0fa8d6',1,'httpc_get_file_dns(const char *server_name, u16_t port, const char *uri, const httpc_connection_t *settings, altcp_recv_fn recv_fn, void *callback_arg, httpc_state_t **connection): http_client.c'],['../group__httpc.html#gabd4ef2259885a93090733235cc0fa8d6',1,'httpc_get_file_dns(const char *server_name, u16_t port, const char *uri, const httpc_connection_t *settings, altcp_recv_fn recv_fn, void *callback_arg, httpc_state_t **connection): http_client.c']]], + ['httpc_5fheaders_5fdone_5ffn',['httpc_headers_done_fn',['../group__httpc.html#ga1e5b62519d6592c89ed3edfabd917472',1,'http_client.h']]], + ['httpc_5fresult_5ferr_5fclosed',['HTTPC_RESULT_ERR_CLOSED',['../group__httpc.html#gga49e34884b272b1e0ddae8da46c31d9a3a89a6700abb14dd7cab9b4e0fd66e5fd6',1,'http_client.h']]], + ['httpc_5fresult_5ferr_5fconnect',['HTTPC_RESULT_ERR_CONNECT',['../group__httpc.html#gga49e34884b272b1e0ddae8da46c31d9a3ab866d5433b4c4593c80b756d434e1d09',1,'http_client.h']]], + ['httpc_5fresult_5ferr_5fcontent_5flen',['HTTPC_RESULT_ERR_CONTENT_LEN',['../group__httpc.html#gga49e34884b272b1e0ddae8da46c31d9a3a6c8a4195834e1997a498a03bb47bb096',1,'http_client.h']]], + ['httpc_5fresult_5ferr_5fhostname',['HTTPC_RESULT_ERR_HOSTNAME',['../group__httpc.html#gga49e34884b272b1e0ddae8da46c31d9a3ae04714f90692c122e6c85e06083dbc6d',1,'http_client.h']]], + ['httpc_5fresult_5ferr_5fmem',['HTTPC_RESULT_ERR_MEM',['../group__httpc.html#gga49e34884b272b1e0ddae8da46c31d9a3a49972833ec01c7a10dee734c7c69ed62',1,'http_client.h']]], + ['httpc_5fresult_5ferr_5fsvr_5fresp',['HTTPC_RESULT_ERR_SVR_RESP',['../group__httpc.html#gga49e34884b272b1e0ddae8da46c31d9a3aaa023a6f8069c02c87a826ba323c54b8',1,'http_client.h']]], + ['httpc_5fresult_5ferr_5ftimeout',['HTTPC_RESULT_ERR_TIMEOUT',['../group__httpc.html#gga49e34884b272b1e0ddae8da46c31d9a3a8e6c597f88335b31e6a8b078a32fde33',1,'http_client.h']]], + ['httpc_5fresult_5ferr_5funknown',['HTTPC_RESULT_ERR_UNKNOWN',['../group__httpc.html#gga49e34884b272b1e0ddae8da46c31d9a3a5026187026abd1d242333ba6ff69ddbd',1,'http_client.h']]], + ['httpc_5fresult_5ffn',['httpc_result_fn',['../group__httpc.html#ga0452eb8007dbb5f139ec992e58e560dd',1,'http_client.h']]], + ['httpc_5fresult_5flocal_5fabort',['HTTPC_RESULT_LOCAL_ABORT',['../group__httpc.html#gga49e34884b272b1e0ddae8da46c31d9a3adf4e45365923c16b6a6879bde5f60867',1,'http_client.h']]], + ['httpc_5fresult_5fok',['HTTPC_RESULT_OK',['../group__httpc.html#gga49e34884b272b1e0ddae8da46c31d9a3af3173d4d272c9c0b5a5c9b5b027e3659',1,'http_client.h']]], + ['httpc_5fresult_5ft',['httpc_result_t',['../group__httpc.html#gac6713454283bff8e1187849e8d4bda18',1,'http_client.h']]], + ['http_20server',['HTTP server',['../group__httpd.html',1,'']]], + ['httpd_2ec',['httpd.c',['../httpd_8c.html',1,'']]], + ['httpd_2eh',['httpd.h',['../httpd_8h.html',1,'']]], + ['httpd_5fdebug_5ftiming',['HTTPD_DEBUG_TIMING',['../group__httpd__opts.html#ga5f2642874f930798d975b1f7a6d2e1da',1,'httpd_opts.h']]], + ['httpd_5fenable_5fhttps',['HTTPD_ENABLE_HTTPS',['../group__httpd__opts.html#ga64dc2a10b1c2ec886e698fe9008e51e2',1,'httpd_opts.h']]], + ['httpd_5ffsdata_5ffile',['HTTPD_FSDATA_FILE',['../group__httpd__opts.html#gad68e8e06ea4c2be1b3508e813a49f7cc',1,'httpd_opts.h']]], + ['httpd_5finit',['httpd_init',['../group__httpd.html#gac364305cee969a0be43c071722b136e6',1,'httpd_init(void): httpd.c'],['../group__httpd.html#gac364305cee969a0be43c071722b136e6',1,'httpd_init(void): httpd.c']]], + ['httpd_5finits',['httpd_inits',['../group__httpd.html#gafaedb1911a83854b1e9835132db64409',1,'httpd_inits(struct altcp_tls_config *conf): httpd.c'],['../group__httpd.html#gafaedb1911a83854b1e9835132db64409',1,'httpd_inits(struct altcp_tls_config *conf): httpd.c']]], + ['httpd_5fmax_5fretries',['HTTPD_MAX_RETRIES',['../group__httpd__opts.html#gad92e78e19fd3ab2af42750e83ed73fd5',1,'httpd_opts.h']]], + ['httpd_5fopts_2eh',['httpd_opts.h',['../httpd__opts_8h.html',1,'']]], + ['httpd_5fpoll_5finterval',['HTTPD_POLL_INTERVAL',['../group__httpd__opts.html#gacc3e7667baa2cfafd23de2b152df7a63',1,'httpd_opts.h']]], + ['httpd_5fpost_5fbegin',['httpd_post_begin',['../group__httpd.html#ga6cb33693ee8f0c054be82a968ceff582',1,'httpd.h']]], + ['httpd_5fpost_5fdata_5frecved',['httpd_post_data_recved',['../group__httpd.html#gaca4357acf5c988b28123bc6f23540380',1,'httpd_post_data_recved(void *connection, u16_t recved_len): httpd.c'],['../group__httpd.html#gaca4357acf5c988b28123bc6f23540380',1,'httpd_post_data_recved(void *connection, u16_t recved_len): httpd.c']]], + ['httpd_5fpost_5ffinished',['httpd_post_finished',['../group__httpd.html#ga477473f7ead250fec71f1f8b9926fec5',1,'httpd.h']]], + ['httpd_5fpost_5freceive_5fdata',['httpd_post_receive_data',['../group__httpd.html#ga461409c8813c2a82ba63fde987c0e537',1,'httpd.h']]], + ['httpd_5fprecalculated_5fchecksum',['HTTPD_PRECALCULATED_CHECKSUM',['../group__httpd__opts.html#ga6e5de8515c89af12277e4cb011165103',1,'httpd_opts.h']]], + ['httpd_5fserver_5fagent',['HTTPD_SERVER_AGENT',['../group__httpd__opts.html#gafb2115e763ed3163a3e204a0ba53edb9',1,'httpd_opts.h']]], + ['httpd_5fserver_5fport',['HTTPD_SERVER_PORT',['../group__httpd__opts.html#ga2b058c5d1bd67e5d7cb260166e3ace50',1,'httpd_opts.h']]], + ['httpd_5fserver_5fport_5fhttps',['HTTPD_SERVER_PORT_HTTPS',['../group__httpd__opts.html#gaffe653b08bf5ba25b276c655f6813441',1,'httpd_opts.h']]], + ['httpd_5fssi_5ftag_5funknown',['HTTPD_SSI_TAG_UNKNOWN',['../httpd_8h.html#aeb00bcd99ec9627b108832f0b58891ca',1,'httpd.h']]], + ['httpd_5ftcp_5fprio',['HTTPD_TCP_PRIO',['../group__httpd__opts.html#gaabd1f6319d04b8d5f2c93270794d5182',1,'httpd_opts.h']]], + ['httpd_5fuse_5fmem_5fpool',['HTTPD_USE_MEM_POOL',['../group__httpd__opts.html#gabb13219495a813fceaafa954a238a924',1,'httpd_opts.h']]], + ['hwaddr',['hwaddr',['../structnetif.html#aee967965d999fc1a4c40a66709304e69',1,'netif']]], + ['hwaddr_5flen',['hwaddr_len',['../structnetif.html#afe1181561cb16241f3cb5ed01e567d42',1,'netif']]], + ['hooks',['Hooks',['../group__lwip__opts__hooks.html',1,'']]], + ['heap_20and_20memory_20pools',['Heap and memory pools',['../group__lwip__opts__mem.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_a.html b/Libraries/LwIP/doc/doxygen/output/html/search/all_a.html new file mode 100644 index 0000000..9601fce --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_a.js b/Libraries/LwIP/doc/doxygen/output/html/search/all_a.js new file mode 100644 index 0000000..2ab029d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_a.js @@ -0,0 +1,394 @@ +var searchData= +[ + ['ieee_20802_2e1d_20bridge',['IEEE 802.1D bridge',['../group__bridgeif.html',1,'']]], + ['iana_20assigned_20numbers',['IANA assigned numbers',['../group__iana.html',1,'']]], + ['iana_2eh',['iana.h',['../iana_8h.html',1,'']]], + ['icmp',['icmp',['../structstats__.html#a10bc430163b0e6db91338aded5b7019a',1,'stats_']]], + ['icmp_2ec',['icmp.c',['../icmp_8c.html',1,'']]], + ['icmp_2eh',['icmp.h',['../icmp_8h.html',1,'(Global Namespace)'],['../prot_2icmp_8h.html',1,'(Global Namespace)']]], + ['icmp6',['icmp6',['../structstats__.html#a25a6b5940e32d53a066aa1bbc2028c03',1,'stats_']]], + ['icmp6_2ec',['icmp6.c',['../icmp6_8c.html',1,'']]], + ['icmp6_2eh',['icmp6.h',['../icmp6_8h.html',1,'(Global Namespace)'],['../prot_2icmp6_8h.html',1,'(Global Namespace)']]], + ['icmp6_5fdest_5funreach',['icmp6_dest_unreach',['../icmp6_8c.html#ab480867394952904b5607d62315bdbac',1,'icmp6_dest_unreach(struct pbuf *p, enum icmp6_dur_code c): icmp6.c'],['../icmp6_8h.html#ab480867394952904b5607d62315bdbac',1,'icmp6_dest_unreach(struct pbuf *p, enum icmp6_dur_code c): icmp6.c']]], + ['icmp6_5fdur_5faddress',['ICMP6_DUR_ADDRESS',['../prot_2icmp6_8h.html#a11fe21b0a8c1bc73ee887a96bf416ccfa789ef8158d8750b0fa5a14ec9ecaa23a',1,'icmp6.h']]], + ['icmp6_5fdur_5fcode',['icmp6_dur_code',['../prot_2icmp6_8h.html#a11fe21b0a8c1bc73ee887a96bf416ccf',1,'icmp6.h']]], + ['icmp6_5fdur_5fno_5froute',['ICMP6_DUR_NO_ROUTE',['../prot_2icmp6_8h.html#a11fe21b0a8c1bc73ee887a96bf416ccfa695bb4d92f32b504a9483ff137235a78',1,'icmp6.h']]], + ['icmp6_5fdur_5fpolicy',['ICMP6_DUR_POLICY',['../prot_2icmp6_8h.html#a11fe21b0a8c1bc73ee887a96bf416ccfac3c255282e0b49b5bbb3cd8f435bb763',1,'icmp6.h']]], + ['icmp6_5fdur_5fport',['ICMP6_DUR_PORT',['../prot_2icmp6_8h.html#a11fe21b0a8c1bc73ee887a96bf416ccfa28cc924ec6eaa761acb76ccef4adcba0',1,'icmp6.h']]], + ['icmp6_5fdur_5fprohibited',['ICMP6_DUR_PROHIBITED',['../prot_2icmp6_8h.html#a11fe21b0a8c1bc73ee887a96bf416ccfa251961b990d0fbaf2c643f047c4f2532',1,'icmp6.h']]], + ['icmp6_5fdur_5freject_5froute',['ICMP6_DUR_REJECT_ROUTE',['../prot_2icmp6_8h.html#a11fe21b0a8c1bc73ee887a96bf416ccfa2aeed278149fb071a34beec89df03b5c',1,'icmp6.h']]], + ['icmp6_5fdur_5fscope',['ICMP6_DUR_SCOPE',['../prot_2icmp6_8h.html#a11fe21b0a8c1bc73ee887a96bf416ccfabdb01a67c61da588872f5799ef75aa6e',1,'icmp6.h']]], + ['icmp6_5fecho_5fhdr',['icmp6_echo_hdr',['../structicmp6__echo__hdr.html',1,'']]], + ['icmp6_5fhdr',['icmp6_hdr',['../structicmp6__hdr.html',1,'']]], + ['icmp6_5finput',['icmp6_input',['../icmp6_8c.html#a94bec819e11f51c8088ca338f2e36c3d',1,'icmp6_input(struct pbuf *p, struct netif *inp): icmp6.c'],['../icmp6_8h.html#a94bec819e11f51c8088ca338f2e36c3d',1,'icmp6_input(struct pbuf *p, struct netif *inp): icmp6.c']]], + ['icmp6_5fpacket_5ftoo_5fbig',['icmp6_packet_too_big',['../icmp6_8c.html#a3c0a84e0944263d92c9dc3ad094ffcb0',1,'icmp6_packet_too_big(struct pbuf *p, u32_t mtu): icmp6.c'],['../icmp6_8h.html#a3c0a84e0944263d92c9dc3ad094ffcb0',1,'icmp6_packet_too_big(struct pbuf *p, u32_t mtu): icmp6.c']]], + ['icmp6_5fparam_5fproblem',['icmp6_param_problem',['../icmp6_8c.html#a6094fa333b2cbf1b1b062e72313ef146',1,'icmp6_param_problem(struct pbuf *p, enum icmp6_pp_code c, const void *pointer): icmp6.c'],['../icmp6_8h.html#a6094fa333b2cbf1b1b062e72313ef146',1,'icmp6_param_problem(struct pbuf *p, enum icmp6_pp_code c, const void *pointer): icmp6.c']]], + ['icmp6_5fpp_5fcode',['icmp6_pp_code',['../prot_2icmp6_8h.html#a3a817e777ebcfd705e8e5a1b4c5ae023',1,'icmp6.h']]], + ['icmp6_5fpp_5ffield',['ICMP6_PP_FIELD',['../prot_2icmp6_8h.html#a3a817e777ebcfd705e8e5a1b4c5ae023a4aa4a79306a69fd4f60ad445cde4c2a9',1,'icmp6.h']]], + ['icmp6_5fpp_5fheader',['ICMP6_PP_HEADER',['../prot_2icmp6_8h.html#a3a817e777ebcfd705e8e5a1b4c5ae023acbcc58901e2345ffc31df4098de60ff8',1,'icmp6.h']]], + ['icmp6_5fpp_5foption',['ICMP6_PP_OPTION',['../prot_2icmp6_8h.html#a3a817e777ebcfd705e8e5a1b4c5ae023a53884832d00d3c8f8de62cfdb4646932',1,'icmp6.h']]], + ['icmp6_5fstats',['ICMP6_STATS',['../group__lwip__opts__stats.html#ga714006cd5c5b0eb333159d0f677616a0',1,'opt.h']]], + ['icmp6_5fte_5fcode',['icmp6_te_code',['../prot_2icmp6_8h.html#ad06bbf4ee72635ece968db41cbe6869e',1,'icmp6.h']]], + ['icmp6_5fte_5ffrag',['ICMP6_TE_FRAG',['../prot_2icmp6_8h.html#ad06bbf4ee72635ece968db41cbe6869eaec493420d61c80a21981b1aa32befe1f',1,'icmp6.h']]], + ['icmp6_5fte_5fhl',['ICMP6_TE_HL',['../prot_2icmp6_8h.html#ad06bbf4ee72635ece968db41cbe6869eacccbb5e776df1b35af4149e593240880',1,'icmp6.h']]], + ['icmp6_5ftime_5fexceeded',['icmp6_time_exceeded',['../icmp6_8c.html#a358abb6555f6ca6b2b2b1412c9117bec',1,'icmp6_time_exceeded(struct pbuf *p, enum icmp6_te_code c): icmp6.c'],['../icmp6_8h.html#a358abb6555f6ca6b2b2b1412c9117bec',1,'icmp6_time_exceeded(struct pbuf *p, enum icmp6_te_code c): icmp6.c']]], + ['icmp6_5ftime_5fexceeded_5fwith_5faddrs',['icmp6_time_exceeded_with_addrs',['../icmp6_8c.html#ad01e5bc4690a2c6aeb534237a5a9b593',1,'icmp6_time_exceeded_with_addrs(struct pbuf *p, enum icmp6_te_code c, const ip6_addr_t *src_addr, const ip6_addr_t *dest_addr): icmp6.c'],['../icmp6_8h.html#ad01e5bc4690a2c6aeb534237a5a9b593',1,'icmp6_time_exceeded_with_addrs(struct pbuf *p, enum icmp6_te_code c, const ip6_addr_t *src_addr, const ip6_addr_t *dest_addr): icmp6.c']]], + ['icmp6_5ftype',['icmp6_type',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858',1,'icmp6.h']]], + ['icmp6_5ftype_5fdur',['ICMP6_TYPE_DUR',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858aad9d4f207459e4bbd0c33a25adf6fdd7',1,'icmp6.h']]], + ['icmp6_5ftype_5ferep',['ICMP6_TYPE_EREP',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858ac6b91695c06bfc7fb2360310d7b8e78a',1,'icmp6.h']]], + ['icmp6_5ftype_5fereq',['ICMP6_TYPE_EREQ',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858ae649aa45c97b885f28771688957528a3',1,'icmp6.h']]], + ['icmp6_5ftype_5fmld',['ICMP6_TYPE_MLD',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a04228a1d11f9f88bd165f3430188bfe7',1,'icmp6.h']]], + ['icmp6_5ftype_5fmlq',['ICMP6_TYPE_MLQ',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858ad9794ae12b9ca196cc4fafaf6d834375',1,'icmp6.h']]], + ['icmp6_5ftype_5fmlr',['ICMP6_TYPE_MLR',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a906dd689f0aa9b4796f49f299d4e3eb0',1,'icmp6.h']]], + ['icmp6_5ftype_5fmra',['ICMP6_TYPE_MRA',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a29281016d3bb58e3bfd90417bbce7aa0',1,'icmp6.h']]], + ['icmp6_5ftype_5fmrs',['ICMP6_TYPE_MRS',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a425f4e64a7d1570228adbbe450650ab4',1,'icmp6.h']]], + ['icmp6_5ftype_5fmrt',['ICMP6_TYPE_MRT',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858afb12a9d774f53deb15ec23041548f6fc',1,'icmp6.h']]], + ['icmp6_5ftype_5fna',['ICMP6_TYPE_NA',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a1f99d333f425c28d3840e029cc9c46f3',1,'icmp6.h']]], + ['icmp6_5ftype_5fns',['ICMP6_TYPE_NS',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a0d8d8717c6c34053d1101932c23929fe',1,'icmp6.h']]], + ['icmp6_5ftype_5fpe1',['ICMP6_TYPE_PE1',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858ac7020c08a7b03ae2a198e4a8dcd31bd4',1,'icmp6.h']]], + ['icmp6_5ftype_5fpe2',['ICMP6_TYPE_PE2',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858aed14d280e5911098af914a94bd3ab22b',1,'icmp6.h']]], + ['icmp6_5ftype_5fpe3',['ICMP6_TYPE_PE3',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a9c9c358ebd5eb683a66819fd9ecf98c6',1,'icmp6.h']]], + ['icmp6_5ftype_5fpe4',['ICMP6_TYPE_PE4',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858af8ebe97c4f68b54c9ef0c43e98211df5',1,'icmp6.h']]], + ['icmp6_5ftype_5fpp',['ICMP6_TYPE_PP',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a63114feac8140031b74424d4a7cf6b26',1,'icmp6.h']]], + ['icmp6_5ftype_5fptb',['ICMP6_TYPE_PTB',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a1d52ef5024a5822bd622bcb0b9da323d',1,'icmp6.h']]], + ['icmp6_5ftype_5fra',['ICMP6_TYPE_RA',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858ae4ae04be7df3a2cce614af0a5cdae951',1,'icmp6.h']]], + ['icmp6_5ftype_5frd',['ICMP6_TYPE_RD',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a0f6702d62de5f873e0afe7431d878207',1,'icmp6.h']]], + ['icmp6_5ftype_5frs',['ICMP6_TYPE_RS',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a670d95494c9282f646ac442d81d9a780',1,'icmp6.h']]], + ['icmp6_5ftype_5frsv_5ferr',['ICMP6_TYPE_RSV_ERR',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858abe61415e020b996220337f0cd002a28f',1,'icmp6.h']]], + ['icmp6_5ftype_5frsv_5finf',['ICMP6_TYPE_RSV_INF',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a2c12d3244d837bd243ea647ec530600d',1,'icmp6.h']]], + ['icmp6_5ftype_5fte',['ICMP6_TYPE_TE',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858afae9848904bc4b4b4aa716a7a9a2d7fe',1,'icmp6.h']]], + ['icmp_5fdebug',['ICMP_DEBUG',['../group__lwip__opts__debugmsg.html#ga9595904a1cb9bfe0b9b1d958abdc923a',1,'opt.h']]], + ['icmp_5fdest_5funreach',['icmp_dest_unreach',['../icmp_8c.html#ae26c59eab4ce553964a0c9d43f534d06',1,'icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t): icmp.c'],['../icmp_8h.html#ae26c59eab4ce553964a0c9d43f534d06',1,'icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t): icmp.c']]], + ['icmp_5fdur_5ffrag',['ICMP_DUR_FRAG',['../icmp_8h.html#a17637465f209385e5d19ef47fd9266a5a8be2bc49d42aa1a6ee1da93a8700ef5f',1,'icmp.h']]], + ['icmp_5fdur_5fhost',['ICMP_DUR_HOST',['../icmp_8h.html#a17637465f209385e5d19ef47fd9266a5a648ab915a76dfb7b9568e94de00da1e7',1,'icmp.h']]], + ['icmp_5fdur_5fnet',['ICMP_DUR_NET',['../icmp_8h.html#a17637465f209385e5d19ef47fd9266a5a3cc3714544e123bdef2eadb1a4d320e3',1,'icmp.h']]], + ['icmp_5fdur_5fport',['ICMP_DUR_PORT',['../icmp_8h.html#a17637465f209385e5d19ef47fd9266a5ac973dd9b04e094043ccc4cf875ef5644',1,'icmp.h']]], + ['icmp_5fdur_5fproto',['ICMP_DUR_PROTO',['../icmp_8h.html#a17637465f209385e5d19ef47fd9266a5a3c7bbd13b613990413ef167017dfbcef',1,'icmp.h']]], + ['icmp_5fdur_5fsr',['ICMP_DUR_SR',['../icmp_8h.html#a17637465f209385e5d19ef47fd9266a5af63296fc25f79e56946a56a8da132c13',1,'icmp.h']]], + ['icmp_5fdur_5ftype',['icmp_dur_type',['../icmp_8h.html#a17637465f209385e5d19ef47fd9266a5',1,'icmp.h']]], + ['icmp_5fecho_5fhdr',['icmp_echo_hdr',['../structicmp__echo__hdr.html',1,'']]], + ['icmp_5finput',['icmp_input',['../icmp_8c.html#ac929e48a1dddf98050b73a2633fcaef1',1,'icmp_input(struct pbuf *p, struct netif *inp): icmp.c'],['../icmp_8h.html#ac929e48a1dddf98050b73a2633fcaef1',1,'icmp_input(struct pbuf *p, struct netif *inp): icmp.c']]], + ['icmp_5fstats',['ICMP_STATS',['../group__lwip__opts__stats.html#ga472ad3f6da741f5b287d66ad3051242b',1,'opt.h']]], + ['icmp_5fte_5ffrag',['ICMP_TE_FRAG',['../icmp_8h.html#a058d0a0769bd38db99fc6fd1dad1324aa4d351874c3e2d4a4cf46569df28cd796',1,'icmp.h']]], + ['icmp_5fte_5fttl',['ICMP_TE_TTL',['../icmp_8h.html#a058d0a0769bd38db99fc6fd1dad1324aa827a1f8705826a6cc3c22e2571acf02c',1,'icmp.h']]], + ['icmp_5fte_5ftype',['icmp_te_type',['../icmp_8h.html#a058d0a0769bd38db99fc6fd1dad1324a',1,'icmp.h']]], + ['icmp_5ftime_5fexceeded',['icmp_time_exceeded',['../icmp_8c.html#a49723e5e11c4bbc86197e58fdca7c119',1,'icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t): icmp.c'],['../icmp_8h.html#a49723e5e11c4bbc86197e58fdca7c119',1,'icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t): icmp.c']]], + ['icmp_5fttl',['ICMP_TTL',['../group__lwip__opts__icmp.html#gae1533f2bc39a5843989909555f6ce0cf',1,'opt.h']]], + ['ieee_20assigned_20numbers',['IEEE assigned numbers',['../group__ieee.html',1,'']]], + ['ieee_2eh',['ieee.h',['../ieee_8h.html',1,'']]], + ['ieee802154_2eh',['ieee802154.h',['../ieee802154_8h.html',1,'']]], + ['ieee_5f802154_5fhdr',['ieee_802154_hdr',['../structieee__802154__hdr.html',1,'']]], + ['ieee_5f802154_5fpan_5fid',['ieee_802154_pan_id',['../structlowpan6__ieee802154__data.html#a017fc6f447215e4b65955ee7b1ed798f',1,'lowpan6_ieee802154_data']]], + ['if_2eh',['if.h',['../if_8h.html',1,'']]], + ['interface_20identification_20api',['Interface Identification API',['../group__if__api.html',1,'']]], + ['if_5fapi_2ec',['if_api.c',['../if__api_8c.html',1,'']]], + ['if_5fapi_2eh',['if_api.h',['../if__api_8h.html',1,'']]], + ['if_5fidx',['if_idx',['../structpbuf.html#a6a58e90efbb4751608e9a1fdbd91e697',1,'pbuf']]], + ['ifindiscards',['ifindiscards',['../structstats__mib2__netif__ctrs.html#a4a767e6b835d5ad2f9b73751de2b0947',1,'stats_mib2_netif_ctrs']]], + ['ifinerrors',['ifinerrors',['../structstats__mib2__netif__ctrs.html#afda1a14dc79bb65a33f97f9fb467ec1d',1,'stats_mib2_netif_ctrs']]], + ['ifinnucastpkts',['ifinnucastpkts',['../structstats__mib2__netif__ctrs.html#a111f08290b3c6944108237cefba066dd',1,'stats_mib2_netif_ctrs']]], + ['ifinoctets',['ifinoctets',['../structstats__mib2__netif__ctrs.html#a7e9ddf9b4a17748a9d3f041c1d24ba8e',1,'stats_mib2_netif_ctrs']]], + ['ifinucastpkts',['ifinucastpkts',['../structstats__mib2__netif__ctrs.html#a9ed42d6329a9616669ba21789fa001d8',1,'stats_mib2_netif_ctrs']]], + ['ifinunknownprotos',['ifinunknownprotos',['../structstats__mib2__netif__ctrs.html#ac34eb01b42f22b1e49ca7c9734e737aa',1,'stats_mib2_netif_ctrs']]], + ['ifoutdiscards',['ifoutdiscards',['../structstats__mib2__netif__ctrs.html#a3a2aec508fd4466ca8bab10d8dc2c842',1,'stats_mib2_netif_ctrs']]], + ['ifouterrors',['ifouterrors',['../structstats__mib2__netif__ctrs.html#a91b60bb78759c9b655a74bb4fae3346e',1,'stats_mib2_netif_ctrs']]], + ['ifoutnucastpkts',['ifoutnucastpkts',['../structstats__mib2__netif__ctrs.html#afd3264670c39cc0d721a35cb6650f8d7',1,'stats_mib2_netif_ctrs']]], + ['ifoutoctets',['ifoutoctets',['../structstats__mib2__netif__ctrs.html#a24151d13a55452518e5f7832f48bd5a7',1,'stats_mib2_netif_ctrs']]], + ['ifoutucastpkts',['ifoutucastpkts',['../structstats__mib2__netif__ctrs.html#a24aba9660a2951027b23d4118b57c471',1,'stats_mib2_netif_ctrs']]], + ['igmp',['igmp',['../structstats__.html#a877e369c2abef97f13492faa838e2271',1,'stats_::igmp()'],['../group__igmp.html',1,'(Global Namespace)']]], + ['igmp_2ec',['igmp.c',['../igmp_8c.html',1,'']]], + ['igmp_2eh',['igmp.h',['../igmp_8h.html',1,'(Global Namespace)'],['../prot_2igmp_8h.html',1,'(Global Namespace)']]], + ['igmp_5fdebug',['IGMP_DEBUG',['../group__lwip__opts__debugmsg.html#ga8da07508ee75704362d45eee3eb857fa',1,'opt.h']]], + ['igmp_5fgroup',['igmp_group',['../structigmp__group.html',1,'']]], + ['igmp_5finit',['igmp_init',['../igmp_8c.html#aeb8103aa3091e35c966f0894fb54a2c8',1,'igmp_init(void): igmp.c'],['../igmp_8h.html#aeb8103aa3091e35c966f0894fb54a2c8',1,'igmp_init(void): igmp.c']]], + ['igmp_5finput',['igmp_input',['../igmp_8c.html#a065685cc25f2cc50f0d9659f4b086e1a',1,'igmp_input(struct pbuf *p, struct netif *inp, const ip4_addr_t *dest): igmp.c'],['../igmp_8h.html#a065685cc25f2cc50f0d9659f4b086e1a',1,'igmp_input(struct pbuf *p, struct netif *inp, const ip4_addr_t *dest): igmp.c']]], + ['igmp_5fjoingroup',['igmp_joingroup',['../group__igmp.html#gac989949e9cf84dbd08ab071854bd1ba6',1,'igmp_joingroup(const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr): igmp.c'],['../group__igmp.html#gac989949e9cf84dbd08ab071854bd1ba6',1,'igmp_joingroup(const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr): igmp.c']]], + ['igmp_5fjoingroup_5fnetif',['igmp_joingroup_netif',['../group__igmp.html#ga7a6d36dd7b4c8a8c2790c0eac53b49d6',1,'igmp_joingroup_netif(struct netif *netif, const ip4_addr_t *groupaddr): igmp.c'],['../group__igmp.html#ga7a6d36dd7b4c8a8c2790c0eac53b49d6',1,'igmp_joingroup_netif(struct netif *netif, const ip4_addr_t *groupaddr): igmp.c']]], + ['igmp_5fleavegroup',['igmp_leavegroup',['../group__igmp.html#ga21c572ba7481ca41eb873923a5346544',1,'igmp_leavegroup(const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr): igmp.c'],['../group__igmp.html#ga21c572ba7481ca41eb873923a5346544',1,'igmp_leavegroup(const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr): igmp.c']]], + ['igmp_5fleavegroup_5fnetif',['igmp_leavegroup_netif',['../group__igmp.html#ga651bec2a5f3a24766c52aa86a5d88201',1,'igmp_leavegroup_netif(struct netif *netif, const ip4_addr_t *groupaddr): igmp.c'],['../group__igmp.html#ga651bec2a5f3a24766c52aa86a5d88201',1,'igmp_leavegroup_netif(struct netif *netif, const ip4_addr_t *groupaddr): igmp.c']]], + ['igmp_5flookfor_5fgroup',['igmp_lookfor_group',['../igmp_8c.html#a8228ddd10aa3f2518b16815d82d73448',1,'igmp_lookfor_group(struct netif *ifp, const ip4_addr_t *addr): igmp.c'],['../igmp_8h.html#a8228ddd10aa3f2518b16815d82d73448',1,'igmp_lookfor_group(struct netif *ifp, const ip4_addr_t *addr): igmp.c']]], + ['igmp_5fmac_5ffilter',['igmp_mac_filter',['../structnetif.html#ae64e56581bf0f136601f24c5395c19f0',1,'netif']]], + ['igmp_5fmsg',['igmp_msg',['../structigmp__msg.html',1,'']]], + ['igmp_5freport_5fgroups',['igmp_report_groups',['../igmp_8c.html#af06eeba0e984aab4a67a836eab577726',1,'igmp_report_groups(struct netif *netif): igmp.c'],['../igmp_8h.html#af06eeba0e984aab4a67a836eab577726',1,'igmp_report_groups(struct netif *netif): igmp.c']]], + ['igmp_5fstart',['igmp_start',['../igmp_8c.html#aac0fe91a589ba90b3f76e69cebf264f6',1,'igmp_start(struct netif *netif): igmp.c'],['../igmp_8h.html#aac0fe91a589ba90b3f76e69cebf264f6',1,'igmp_start(struct netif *netif): igmp.c']]], + ['igmp_5fstats',['IGMP_STATS',['../group__lwip__opts__stats.html#ga4d12af1356b9fd60717984be51e27740',1,'opt.h']]], + ['igmp_5fstop',['igmp_stop',['../igmp_8c.html#afc19bd532855a64c021be08172065f84',1,'igmp_stop(struct netif *netif): igmp.c'],['../igmp_8h.html#afc19bd532855a64c021be08172065f84',1,'igmp_stop(struct netif *netif): igmp.c']]], + ['igmp_5ftmr',['igmp_tmr',['../igmp_8c.html#a4418a22d37098f05d0c2fcfe288d0ca1',1,'igmp_tmr(void): igmp.c'],['../igmp_8h.html#a4418a22d37098f05d0c2fcfe288d0ca1',1,'igmp_tmr(void): igmp.c']]], + ['in6addr_5fany',['in6addr_any',['../inet6_8c.html#af8c97553060738d9edd6bfeab13ef7c3',1,'in6addr_any(): inet6.c'],['../lwip_2inet_8h.html#af8c97553060738d9edd6bfeab13ef7c3',1,'in6addr_any(): inet6.c']]], + ['in6addr_5fany_5finit',['IN6ADDR_ANY_INIT',['../lwip_2inet_8h.html#a1de876a356ee05a2e9427b741f99f49c',1,'inet.h']]], + ['in6addr_5floopback_5finit',['IN6ADDR_LOOPBACK_INIT',['../lwip_2inet_8h.html#a5562c81af19ee5988ddc5a5c6153cf37',1,'inet.h']]], + ['inaddr_5fany',['INADDR_ANY',['../lwip_2inet_8h.html#a5d1940045dc2e7de552f3d4ff13a74ab',1,'inet.h']]], + ['inaddr_5fbroadcast',['INADDR_BROADCAST',['../lwip_2inet_8h.html#a4a725f61ded23ce8a7dff8e82ed51986',1,'inet.h']]], + ['inaddr_5floopback',['INADDR_LOOPBACK',['../lwip_2inet_8h.html#ae1ac25d7797666cff6d01d6c795c2378',1,'inet.h']]], + ['inaddr_5fnone',['INADDR_NONE',['../lwip_2inet_8h.html#a3d2472d6cf31b73eeb829110dd0fffea',1,'inet.h']]], + ['inet_2eh',['inet.h',['../compat_2posix_2arpa_2inet_8h.html',1,'(Global Namespace)'],['../lwip_2inet_8h.html',1,'(Global Namespace)']]], + ['inet6_2ec',['inet6.c',['../inet6_8c.html',1,'']]], + ['inet_5fchksum_2ec',['inet_chksum.c',['../inet__chksum_8c.html',1,'']]], + ['inet_5fchksum_2eh',['inet_chksum.h',['../inet__chksum_8h.html',1,'']]], + ['inet_5fchksum_5fpbuf',['inet_chksum_pbuf',['../inet__chksum_8c.html#ab35967a50418358e194e8f80fdc3c865',1,'inet_chksum_pbuf(struct pbuf *p): inet_chksum.c'],['../inet__chksum_8h.html#ab35967a50418358e194e8f80fdc3c865',1,'inet_chksum_pbuf(struct pbuf *p): inet_chksum.c']]], + ['inet_5fdebug',['INET_DEBUG',['../group__lwip__opts__debugmsg.html#ga78140cbe70258a65cb5c9e381843e4f3',1,'opt.h']]], + ['inet_5fntop',['inet_ntop',['../group__socket.html#gaa40bf11abb409097e68aa3a6982eb52b',1,'sockets.h']]], + ['inet_5fpton',['inet_pton',['../group__socket.html#ga90d2b417d82e8da981c940a665324fd5',1,'sockets.h']]], + ['infrastructure',['Infrastructure',['../group__infrastructure.html',1,'']]], + ['init_2ec',['init.c',['../init_8c.html',1,'']]], + ['init_2eh',['init.h',['../init_8h.html',1,'']]], + ['inpub_5fpkt_5fid',['inpub_pkt_id',['../structmqtt__client__s.html#a6c81d0dd14e786222425ea04fd060824',1,'mqtt_client_s']]], + ['input',['input',['../structnetif.html#a8fe4f1b7b0d710216287da9615164a5c',1,'netif']]], + ['instance_5foid',['instance_oid',['../structsnmp__node__instance.html#aedb358729c310c8e5b391dd256726a23',1,'snmp_node_instance']]], + ['ioctl',['ioctl',['../group__socket.html#ga50a83956bc3a96e6274a21ec0d4d6338',1,'sockets.h']]], + ['ioctlsocket',['ioctlsocket',['../group__socket.html#ga19e714443d0238cfd79b71059ec92378',1,'sockets.h']]], + ['ip',['ip',['../structstats__.html#a40f5b637d083896a07a3482ede23b7ed',1,'stats_::ip()'],['../group__ip.html',1,'(Global Namespace)']]], + ['ip_2ec',['ip.c',['../ip_8c.html',1,'']]], + ['ip_2eh',['ip.h',['../ip_8h.html',1,'(Global Namespace)'],['../prot_2ip_8h.html',1,'(Global Namespace)']]], + ['ipv4',['IPv4',['../group__ip4.html',1,'']]], + ['ip4_2ec',['ip4.c',['../ip4_8c.html',1,'']]], + ['ip4_2eh',['ip4.h',['../ip4_8h.html',1,'(Global Namespace)'],['../prot_2ip4_8h.html',1,'(Global Namespace)']]], + ['ip4_5f2_5fipv4_5fmapped_5fipv6',['ip4_2_ipv4_mapped_ipv6',['../group__ipaddr.html#gae5f26df8f5099f330ad1e506c74f06f7',1,'ip_addr.h']]], + ['ip4_5faddr',['ip4_addr',['../structip4__addr.html',1,'ip4_addr'],['../ip4__addr_8h.html#a58aee4166c466f9ac7035bf5cc9f9974',1,'IP4_ADDR(): ip4_addr.h']]], + ['ip4_5faddr_2ec',['ip4_addr.c',['../ip4__addr_8c.html',1,'']]], + ['ip4_5faddr_2eh',['ip4_addr.h',['../ip4__addr_8h.html',1,'']]], + ['ip4_5faddr_5fany',['IP4_ADDR_ANY',['../group__ip4addr.html#gae920b6e81610a38cf9ada52118807eff',1,'ip_addr.h']]], + ['ip4_5faddr_5fany4',['IP4_ADDR_ANY4',['../group__ip4addr.html#gaa3f65a42b68149e96e618600b2ca2e42',1,'ip_addr.h']]], + ['ip4_5faddr_5fbroadcast',['IP4_ADDR_BROADCAST',['../group__ip4addr.html#ga5efdf55ba72c2b1b5755b1fc6f559a1a',1,'ip_addr.h']]], + ['ip4_5faddr_5fcopy',['ip4_addr_copy',['../ip4__addr_8h.html#a2f4e9c339e897e6ca5cb4a2f1e8394d5',1,'ip4_addr.h']]], + ['ip4_5faddr_5fget_5fnetwork',['ip4_addr_get_network',['../ip4__addr_8h.html#a81658cb05ba504d13ee860e82dc444e9',1,'ip4_addr.h']]], + ['ip4_5faddr_5fget_5fu32',['ip4_addr_get_u32',['../ip4__addr_8h.html#ad50d93464bbbda199b585c54869a3a4b',1,'ip4_addr.h']]], + ['ip4_5faddr_5fisbroadcast_5fu32',['ip4_addr_isbroadcast_u32',['../ip4__addr_8c.html#ab3cd7e7fba28c29d35f3c17461071421',1,'ip4_addr_isbroadcast_u32(u32_t addr, const struct netif *netif): ip4_addr.c'],['../ip4__addr_8h.html#ab3cd7e7fba28c29d35f3c17461071421',1,'ip4_addr_isbroadcast_u32(u32_t addr, const struct netif *netif): ip4_addr.c']]], + ['ip4_5faddr_5fisloopback',['ip4_addr_isloopback',['../ip4__addr_8h.html#a46dabb4df212d156004fa5afe03e2051',1,'ip4_addr.h']]], + ['ip4_5faddr_5fnetcmp',['ip4_addr_netcmp',['../ip4__addr_8h.html#afd43f6ceb2df8d50c84509ad1059f514',1,'ip4_addr.h']]], + ['ip4_5faddr_5fnetmask_5fvalid',['ip4_addr_netmask_valid',['../ip4__addr_8c.html#ab5810d404b0ad1b89ef1323ea1e78071',1,'ip4_addr_netmask_valid(u32_t netmask): ip4_addr.c'],['../ip4__addr_8h.html#ab5810d404b0ad1b89ef1323ea1e78071',1,'ip4_addr_netmask_valid(u32_t netmask): ip4_addr.c']]], + ['ip4_5faddr_5fpacked',['ip4_addr_packed',['../structip4__addr__packed.html',1,'']]], + ['ip4_5faddr_5fset',['ip4_addr_set',['../ip4__addr_8h.html#a33a17a8d2025ce3715db835534868e88',1,'ip4_addr.h']]], + ['ip4_5faddr_5fset_5fany',['ip4_addr_set_any',['../ip4__addr_8h.html#afaaed3762ce8e9de14fcf73b19964567',1,'ip4_addr.h']]], + ['ip4_5faddr_5fset_5fhton',['ip4_addr_set_hton',['../ip4__addr_8h.html#a901850ec90b01b9bf6baf69561aa465a',1,'ip4_addr.h']]], + ['ip4_5faddr_5fset_5floopback',['ip4_addr_set_loopback',['../ip4__addr_8h.html#a5c7eae50a387987a7f56c29c74255c3c',1,'ip4_addr.h']]], + ['ip4_5faddr_5fset_5fu32',['ip4_addr_set_u32',['../ip4__addr_8h.html#aeb39f58b38435f89219c8ccb509eb520',1,'ip4_addr.h']]], + ['ip4_5faddr_5fset_5fzero',['ip4_addr_set_zero',['../ip4__addr_8h.html#a973b6ad98e037fc45f1e11d29cda99ea',1,'ip4_addr.h']]], + ['ip4_5faddr_5ft',['ip4_addr_t',['../ip4__addr_8h.html#a3d3b45daffbc15d65da236e31e621b7e',1,'ip4_addr.h']]], + ['ip4_5faddr_5fwordaligned',['ip4_addr_wordaligned',['../structip4__addr__wordaligned.html',1,'']]], + ['ip4_5fcurrent_5fdest_5faddr',['ip4_current_dest_addr',['../ip_8h.html#a2833c8d59910dd7c0e87ab3bb174e720',1,'ip.h']]], + ['ip4_5fcurrent_5fheader',['ip4_current_header',['../ip_8h.html#a3ce482b7e08282effd670001198ecd87',1,'ip.h']]], + ['ip4_5fcurrent_5fsrc_5faddr',['ip4_current_src_addr',['../ip_8h.html#ad2a62f96b9431a79f0258dc13058b160',1,'ip.h']]], + ['ip4_5ffrag',['ip4_frag',['../ip4__frag_8c.html#a70872fd4c7aefec6b4eef0707e1a371c',1,'ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest): ip4_frag.c'],['../ip4__frag_8h.html#a70872fd4c7aefec6b4eef0707e1a371c',1,'ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest): ip4_frag.c']]], + ['ip4_5ffrag_2ec',['ip4_frag.c',['../ip4__frag_8c.html',1,'']]], + ['ip4_5ffrag_2eh',['ip4_frag.h',['../ip4__frag_8h.html',1,'']]], + ['ip4_5finput',['ip4_input',['../ip4_8c.html#aff1f784c9f05f3d79cc1a921d840501b',1,'ip4_input(struct pbuf *p, struct netif *inp): ip4.c'],['../ip4_8h.html#aff1f784c9f05f3d79cc1a921d840501b',1,'ip4_input(struct pbuf *p, struct netif *inp): ip4.c']]], + ['ip4_5foutput',['ip4_output',['../ip4_8c.html#ac87d296205eb5ac04058e609672d4ba8',1,'ip4_output(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto): ip4.c'],['../ip4_8h.html#ac87d296205eb5ac04058e609672d4ba8',1,'ip4_output(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto): ip4.c']]], + ['ip4_5foutput_5fif',['ip4_output_if',['../ip4_8c.html#ab220bc4ce4f48bdbba447358b3594917',1,'ip4_output_if(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif): ip4.c'],['../ip4_8h.html#ab220bc4ce4f48bdbba447358b3594917',1,'ip4_output_if(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif): ip4.c']]], + ['ip4_5foutput_5fif_5fopt',['ip4_output_if_opt',['../ip4_8c.html#a0d912e400875396792a12ea443ecc1cf',1,'ip4_output_if_opt(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif, void *ip_options, u16_t optlen): ip4.c'],['../ip4_8h.html#a0d912e400875396792a12ea443ecc1cf',1,'ip4_output_if_opt(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif, void *ip_options, u16_t optlen): ip4.c']]], + ['ip4_5foutput_5fif_5fopt_5fsrc',['ip4_output_if_opt_src',['../ip4_8c.html#accd56b095730de4ad56728bfcb349940',1,'ip4_output_if_opt_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif, void *ip_options, u16_t optlen): ip4.c'],['../ip4_8h.html#accd56b095730de4ad56728bfcb349940',1,'ip4_output_if_opt_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif, void *ip_options, u16_t optlen): ip4.c']]], + ['ip4_5foutput_5fif_5fsrc',['ip4_output_if_src',['../ip4_8c.html#a2943d118873e9eb1d8296e04a6740db7',1,'ip4_output_if_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif): ip4.c'],['../ip4_8h.html#a2943d118873e9eb1d8296e04a6740db7',1,'ip4_output_if_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif): ip4.c']]], + ['ip4_5freass',['ip4_reass',['../ip4__frag_8c.html#a7debaa6366c0db4270d4f03219c75c05',1,'ip4_reass(struct pbuf *p): ip4_frag.c'],['../ip4__frag_8h.html#a7debaa6366c0db4270d4f03219c75c05',1,'ip4_reass(struct pbuf *p): ip4_frag.c']]], + ['ip4_5froute',['ip4_route',['../ip4_8c.html#ac659f675356cfc1d4d13884946347e47',1,'ip4_route(const ip4_addr_t *dest): ip4.c'],['../ip4_8h.html#ac659f675356cfc1d4d13884946347e47',1,'ip4_route(const ip4_addr_t *dest): ip4.c']]], + ['ip4_5froute_5fsrc',['ip4_route_src',['../ip4_8c.html#ab615a9ca8fdd99e697f52506fc440fba',1,'ip4_route_src(const ip4_addr_t *src, const ip4_addr_t *dest): ip4.c'],['../ip4_8h.html#ab615a9ca8fdd99e697f52506fc440fba',1,'ip4_route_src(const ip4_addr_t *src, const ip4_addr_t *dest): ip4.c']]], + ['ip4_5fset_5fdefault_5fmulticast_5fnetif',['ip4_set_default_multicast_netif',['../group__ip4.html#ga6ae67c86aa82dccac5df81d93de00420',1,'ip4_set_default_multicast_netif(struct netif *default_multicast_netif): ip4.c'],['../group__ip4.html#ga6ae67c86aa82dccac5df81d93de00420',1,'ip4_set_default_multicast_netif(struct netif *default_multicast_netif): ip4.c']]], + ['ipv4_20only',['IPv4 only',['../group__ip4addr.html',1,'']]], + ['ip4addr_5faton',['ip4addr_aton',['../ip4__addr_8c.html#af66de98501e92c66714d58119b6d9e1a',1,'ip4addr_aton(const char *cp, ip4_addr_t *addr): ip4_addr.c'],['../ip4__addr_8h.html#af66de98501e92c66714d58119b6d9e1a',1,'ip4addr_aton(const char *cp, ip4_addr_t *addr): ip4_addr.c']]], + ['ip4addr_5fntoa',['ip4addr_ntoa',['../ip4__addr_8c.html#a28620fdd443c5c98d15e5890cbd9059c',1,'ip4addr_ntoa(const ip4_addr_t *addr): ip4_addr.c'],['../ip4__addr_8h.html#a28620fdd443c5c98d15e5890cbd9059c',1,'ip4addr_ntoa(const ip4_addr_t *addr): ip4_addr.c']]], + ['ip4addr_5fntoa_5fr',['ip4addr_ntoa_r',['../ip4__addr_8c.html#a3825d5b4786c207af971ceb287f101fd',1,'ip4addr_ntoa_r(const ip4_addr_t *addr, char *buf, int buflen): ip4_addr.c'],['../ip4__addr_8h.html#a3825d5b4786c207af971ceb287f101fd',1,'ip4addr_ntoa_r(const ip4_addr_t *addr, char *buf, int buflen): ip4_addr.c']]], + ['ip6',['ip6',['../structstats__.html#afc0942a5bc26735cf059099636b85336',1,'stats_::ip6()'],['../group__ip6.html',1,'(Global Namespace)']]], + ['ip6_2ec',['ip6.c',['../ip6_8c.html',1,'']]], + ['ip6_2eh',['ip6.h',['../ip6_8h.html',1,'(Global Namespace)'],['../prot_2ip6_8h.html',1,'(Global Namespace)']]], + ['ip6_5faddr',['ip6_addr',['../structip6__addr.html',1,'ip6_addr'],['../structnetif.html#ab7ef575d4ab398a182bc6e592f4d53a4',1,'netif::ip6_addr()'],['../ip6__addr_8h.html#a30c92254d6abe631de6a5accfd491bc3',1,'IP6_ADDR(): ip6_addr.h']]], + ['ip6_5faddr_2ec',['ip6_addr.c',['../ip6__addr_8c.html',1,'']]], + ['ip6_5faddr_2eh',['ip6_addr.h',['../ip6__addr_8h.html',1,'']]], + ['ip6_5faddr_5fany',['IP6_ADDR_ANY',['../group__ip6addr.html#ga5181d2cb6b9254eb5ad4137f7b3635a0',1,'ip_addr.h']]], + ['ip6_5faddr_5fany6',['IP6_ADDR_ANY6',['../group__ip6addr.html#ga953cdd2592764ba2e6e021aea350ad43',1,'ip_addr.h']]], + ['ip6_5faddr_5fassign_5fzone',['ip6_addr_assign_zone',['../group__ip6__zones.html#ga1040a3d67498a1ef617bda8d9e0ba3a5',1,'ip6_zone.h']]], + ['ip6_5faddr_5fblock1',['IP6_ADDR_BLOCK1',['../ip6__addr_8h.html#ae258ebfa66d18c8c428bf3d8fd0f969c',1,'ip6_addr.h']]], + ['ip6_5faddr_5fblock2',['IP6_ADDR_BLOCK2',['../ip6__addr_8h.html#a9193137423b6b936d25c2e6cf33b4921',1,'ip6_addr.h']]], + ['ip6_5faddr_5fblock3',['IP6_ADDR_BLOCK3',['../ip6__addr_8h.html#a6466b1c0edd03d6a5986dcc79f7d8bb6',1,'ip6_addr.h']]], + ['ip6_5faddr_5fblock4',['IP6_ADDR_BLOCK4',['../ip6__addr_8h.html#a2a5d7de341ce708b7145ad4d72652c71',1,'ip6_addr.h']]], + ['ip6_5faddr_5fblock5',['IP6_ADDR_BLOCK5',['../ip6__addr_8h.html#a56a11cfaa169389c319f8bd027ac524c',1,'ip6_addr.h']]], + ['ip6_5faddr_5fblock6',['IP6_ADDR_BLOCK6',['../ip6__addr_8h.html#a116d7c5c8bf8531b27f8a9fa98e728c3',1,'ip6_addr.h']]], + ['ip6_5faddr_5fblock7',['IP6_ADDR_BLOCK7',['../ip6__addr_8h.html#ab87bee320ecc0e923931ee6f49802deb',1,'ip6_addr.h']]], + ['ip6_5faddr_5fblock8',['IP6_ADDR_BLOCK8',['../ip6__addr_8h.html#af3d1f9876bf256ec964bd3809d7ed1b4',1,'ip6_addr.h']]], + ['ip6_5faddr_5fclear_5fzone',['ip6_addr_clear_zone',['../group__ip6__zones.html#gae0249db6cd2687f2dbc445e7778d37ad',1,'ip6_zone.h']]], + ['ip6_5faddr_5fcmp',['ip6_addr_cmp',['../ip6__addr_8h.html#aea8d4c4134abff1c76bc997a91163fe1',1,'ip6_addr.h']]], + ['ip6_5faddr_5fcmp_5fpacked',['ip6_addr_cmp_packed',['../ip6__addr_8h.html#a11fe84789e3f039b3f71009e802946a8',1,'ip6_addr.h']]], + ['ip6_5faddr_5fcmp_5fzone',['ip6_addr_cmp_zone',['../group__ip6__zones.html#gacbb8e1a7505d9772181defa0e75b8da9',1,'ip6_zone.h']]], + ['ip6_5faddr_5fcmp_5fzoneless',['ip6_addr_cmp_zoneless',['../ip6__addr_8h.html#ad0fc088972d395839a7ad75d3dab8322',1,'ip6_addr.h']]], + ['ip6_5faddr_5fcopy',['ip6_addr_copy',['../ip6__addr_8h.html#a7b17e85a46bd8368ce27fc644e058073',1,'ip6_addr.h']]], + ['ip6_5faddr_5fcopy_5ffrom_5fpacked',['ip6_addr_copy_from_packed',['../ip6__addr_8h.html#a05575d46c233ffb13fb03a3a2c8a16b3',1,'ip6_addr.h']]], + ['ip6_5faddr_5fcopy_5fto_5fpacked',['ip6_addr_copy_to_packed',['../ip6__addr_8h.html#a6c46d12fa7d36c47b629d0ccdefa114b',1,'ip6_addr.h']]], + ['ip6_5faddr_5fcopy_5fzone',['ip6_addr_copy_zone',['../group__ip6__zones.html#ga7347729485d837bcff85ae4731bbf5c4',1,'ip6_zone.h']]], + ['ip6_5faddr_5fequals_5fzone',['ip6_addr_equals_zone',['../group__ip6__zones.html#gaeead8379cc3fd4c257be0bb654994a8f',1,'ip6_zone.h']]], + ['ip6_5faddr_5fhas_5fscope',['ip6_addr_has_scope',['../group__ip6__zones.html#gaa5332bb3b70c1a9acba1bea3ea0ecb90',1,'ip6_zone.h']]], + ['ip6_5faddr_5fhas_5fzone',['ip6_addr_has_zone',['../group__ip6__zones.html#ga8727c081b6a80992881d481d0680db78',1,'ip6_zone.h']]], + ['ip6_5faddr_5flacks_5fzone',['ip6_addr_lacks_zone',['../group__ip6__zones.html#gad963bf3e9695ba898271e314975f5c97',1,'ip6_zone.h']]], + ['ip6_5faddr_5fnetcmp',['ip6_addr_netcmp',['../ip6__addr_8h.html#a76b01f76b65647767d00ee9fad9fbaa2',1,'ip6_addr.h']]], + ['ip6_5faddr_5fnetcmp_5fzoneless',['ip6_addr_netcmp_zoneless',['../ip6__addr_8h.html#acc1622ab895680da0a3b6e5e56070342',1,'ip6_addr.h']]], + ['ip6_5faddr_5fpacked',['ip6_addr_packed',['../structip6__addr__packed.html',1,'']]], + ['ip6_5faddr_5fpart',['IP6_ADDR_PART',['../ip6__addr_8h.html#a1d78feeb50aec8f2c07d840829f49ddd',1,'ip6_addr.h']]], + ['ip6_5faddr_5fselect_5fzone',['ip6_addr_select_zone',['../group__ip6__zones.html#gac83f3e7c8d65d3c784bffc9dec29b70c',1,'ip6_zone.h']]], + ['ip6_5faddr_5fset',['ip6_addr_set',['../ip6__addr_8h.html#aa7b4ba4202b5f64dee605fe159e9c3ad',1,'ip6_addr.h']]], + ['ip6_5faddr_5fset_5fany',['ip6_addr_set_any',['../ip6__addr_8h.html#ae2d1ce50ec6dbee890e2f8ae64abdf6b',1,'ip6_addr.h']]], + ['ip6_5faddr_5fset_5fhton',['ip6_addr_set_hton',['../ip6__addr_8h.html#ad636c27d56d1b3deca9f780bc173d3c2',1,'ip6_addr.h']]], + ['ip6_5faddr_5fset_5floopback',['ip6_addr_set_loopback',['../ip6__addr_8h.html#a02f5271e922f34a09153ce84839ad292',1,'ip6_addr.h']]], + ['ip6_5faddr_5fset_5fzero',['ip6_addr_set_zero',['../ip6__addr_8h.html#af696d3b81f4cb9c40ece912de73ed53c',1,'ip6_addr.h']]], + ['ip6_5faddr_5fset_5fzone',['ip6_addr_set_zone',['../group__ip6__zones.html#ga213310b303dd050da7856d67da72abd6',1,'ip6_zone.h']]], + ['ip6_5faddr_5fstate',['ip6_addr_state',['../structnetif.html#a54e81344084e9840a51cc4abab3b059b',1,'netif']]], + ['ip6_5faddr_5ft',['ip6_addr_t',['../ip6__addr_8h.html#aaca9e796e93a355294c4954c08d01762',1,'ip6_addr.h']]], + ['ip6_5faddr_5ftest_5fzone',['ip6_addr_test_zone',['../group__ip6__zones.html#gac3ec5f94e1cd62b1237efca3723dc06e',1,'ip6_zone.h']]], + ['ip6_5faddr_5fvalid_5flife',['ip6_addr_valid_life',['../structnetif.html#a26f6e26d4a54c998716c10b7b85c8230',1,'netif']]], + ['ip6_5faddr_5fzone',['ip6_addr_zone',['../group__ip6__zones.html#gaee83e12649fa9706857c9ad8f9ef8634',1,'ip6_zone.h']]], + ['ip6_5fautoconfig_5fenabled',['ip6_autoconfig_enabled',['../structnetif.html#ad98bafb7733b40ef898e53d91fbfa20f',1,'netif']]], + ['ip6_5fchksum_5fpseudo',['ip6_chksum_pseudo',['../inet__chksum_8c.html#a102544bca5912c78649e25a45a7d0a88',1,'ip6_chksum_pseudo(struct pbuf *p, u8_t proto, u16_t proto_len, const ip6_addr_t *src, const ip6_addr_t *dest): inet_chksum.c'],['../inet__chksum_8h.html#a102544bca5912c78649e25a45a7d0a88',1,'ip6_chksum_pseudo(struct pbuf *p, u8_t proto, u16_t proto_len, const ip6_addr_t *src, const ip6_addr_t *dest): inet_chksum.c']]], + ['ip6_5fchksum_5fpseudo_5fpartial',['ip6_chksum_pseudo_partial',['../inet__chksum_8c.html#ae4218e08510fd92c9a699c4e5d9fc17b',1,'ip6_chksum_pseudo_partial(struct pbuf *p, u8_t proto, u16_t proto_len, u16_t chksum_len, const ip6_addr_t *src, const ip6_addr_t *dest): inet_chksum.c'],['../inet__chksum_8h.html#ae4218e08510fd92c9a699c4e5d9fc17b',1,'ip6_chksum_pseudo_partial(struct pbuf *p, u8_t proto, u16_t proto_len, u16_t chksum_len, const ip6_addr_t *src, const ip6_addr_t *dest): inet_chksum.c']]], + ['ip6_5fcurrent_5fdest_5faddr',['ip6_current_dest_addr',['../ip_8h.html#a176525c2192d37ee9eaeba8012c5d9c0',1,'ip.h']]], + ['ip6_5fcurrent_5fheader',['ip6_current_header',['../ip_8h.html#af9bf74750c9d7a219ee88d240300fe69',1,'ip.h']]], + ['ip6_5fcurrent_5fsrc_5faddr',['ip6_current_src_addr',['../ip_8h.html#ac40a9e4a21ecf5bb39813bb6ca5bb245',1,'ip.h']]], + ['ip6_5fdebug',['IP6_DEBUG',['../group__lwip__opts__debugmsg.html#gac2f9726756b78d4d7c425b0422a776ce',1,'opt.h']]], + ['ip6_5ffrag',['ip6_frag',['../structstats__.html#a7373df7bc44bb9913a42c0bc7b3039cf',1,'stats_::ip6_frag()'],['../ip6__frag_8c.html#a3ef87acbc615d5eb015104f83bbe7d37',1,'ip6_frag(struct pbuf *p, struct netif *netif, const ip6_addr_t *dest): ip6_frag.c'],['../ip6__frag_8h.html#a3ef87acbc615d5eb015104f83bbe7d37',1,'ip6_frag(struct pbuf *p, struct netif *netif, const ip6_addr_t *dest): ip6_frag.c']]], + ['ip6_5ffrag_2ec',['ip6_frag.c',['../ip6__frag_8c.html',1,'']]], + ['ip6_5ffrag_2eh',['ip6_frag.h',['../ip6__frag_8h.html',1,'']]], + ['ip6_5ffrag_5fstats',['IP6_FRAG_STATS',['../group__lwip__opts__stats.html#gaaa08a181c11ff8b471549e8f52c9939b',1,'opt.h']]], + ['ip6_5fhdr',['ip6_hdr',['../structip6__hdr.html',1,'']]], + ['ip6_5finput',['ip6_input',['../ip6_8c.html#a6bbbae5ea37a82c746dba2feb1abd094',1,'ip6_input(struct pbuf *p, struct netif *inp): ip6.c'],['../ip6_8h.html#a6bbbae5ea37a82c746dba2feb1abd094',1,'ip6_input(struct pbuf *p, struct netif *inp): ip6.c']]], + ['ip6_5fmulticast',['IP6_MULTICAST',['../group__ip6__zones.html#gga1993c4b6a297b6e92d80a9ce46ddedfea70cda997b66f3e120e925c5a41904809',1,'ip6_zone.h']]], + ['ip6_5fno_5fzone',['IP6_NO_ZONE',['../group__ip6__zones.html#ga2049167d1715b9a9cf2730e122c0d4fb',1,'ip6_zone.h']]], + ['ip6_5foptions_5fadd_5fhbh_5fra',['ip6_options_add_hbh_ra',['../ip6_8c.html#a7a8d47200bb6ccbec329be8f0979853e',1,'ip6_options_add_hbh_ra(struct pbuf *p, u8_t nexth, u8_t value): ip6.c'],['../ip6_8h.html#a7a8d47200bb6ccbec329be8f0979853e',1,'ip6_options_add_hbh_ra(struct pbuf *p, u8_t nexth, u8_t value): ip6.c']]], + ['ip6_5foutput',['ip6_output',['../ip6_8c.html#aec695e64536ac744e616c997deb84cda',1,'ip6_output(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, u8_t hl, u8_t tc, u8_t nexth): ip6.c'],['../ip6_8h.html#aec695e64536ac744e616c997deb84cda',1,'ip6_output(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, u8_t hl, u8_t tc, u8_t nexth): ip6.c']]], + ['ip6_5foutput_5fif',['ip6_output_if',['../ip6_8c.html#aeb1c9967e7ae7d7ba71b68256ff6fdb4',1,'ip6_output_if(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, u8_t hl, u8_t tc, u8_t nexth, struct netif *netif): ip6.c'],['../ip6_8h.html#aeb1c9967e7ae7d7ba71b68256ff6fdb4',1,'ip6_output_if(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, u8_t hl, u8_t tc, u8_t nexth, struct netif *netif): ip6.c']]], + ['ip6_5foutput_5fif_5fsrc',['ip6_output_if_src',['../ip6_8c.html#a58bd3c9ce332731fac82b89c77be4f56',1,'ip6_output_if_src(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, u8_t hl, u8_t tc, u8_t nexth, struct netif *netif): ip6.c'],['../ip6_8h.html#a58bd3c9ce332731fac82b89c77be4f56',1,'ip6_output_if_src(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, u8_t hl, u8_t tc, u8_t nexth, struct netif *netif): ip6.c']]], + ['ip6_5freass',['ip6_reass',['../ip6__frag_8c.html#adbd666d01adcbbbc5966938f02025b7c',1,'ip6_reass(struct pbuf *p): ip6_frag.c'],['../ip6__frag_8h.html#adbd666d01adcbbbc5966938f02025b7c',1,'ip6_reass(struct pbuf *p): ip6_frag.c']]], + ['ip6_5freass_5fhelper',['ip6_reass_helper',['../structip6__reass__helper.html',1,'']]], + ['ip6_5freass_5ftmr_5finterval',['IP6_REASS_TMR_INTERVAL',['../ip6__frag_8h.html#ad0730ee4db9fbebdf071bb33d75698a2',1,'ip6_frag.h']]], + ['ip6_5freassdata',['ip6_reassdata',['../structip6__reassdata.html',1,'']]], + ['ip6_5froute',['ip6_route',['../ip6_8c.html#a1153bd9e8c45847282105ab6379e6e70',1,'ip6_route(const ip6_addr_t *src, const ip6_addr_t *dest): ip6.c'],['../ip6_8h.html#a1153bd9e8c45847282105ab6379e6e70',1,'ip6_route(const ip6_addr_t *src, const ip6_addr_t *dest): ip6.c']]], + ['ip6_5fselect_5fsource_5faddress',['ip6_select_source_address',['../group__ip6.html#ga540ad82e2af4c4709f1852e63c36706a',1,'ip6_select_source_address(struct netif *netif, const ip6_addr_t *dest): ip6.c'],['../group__ip6.html#ga540ad82e2af4c4709f1852e63c36706a',1,'ip6_select_source_address(struct netif *netif, const ip6_addr_t *dest): ip6.c']]], + ['ip6_5fstats',['IP6_STATS',['../group__lwip__opts__stats.html#ga6a211b787c97bce3af4273b29c95d9c2',1,'opt.h']]], + ['ip6_5funicast',['IP6_UNICAST',['../group__ip6__zones.html#gga1993c4b6a297b6e92d80a9ce46ddedfeaacbcc65569837d437eea53c3bbb017b0',1,'ip6_zone.h']]], + ['ip6_5funknown',['IP6_UNKNOWN',['../group__ip6__zones.html#gga1993c4b6a297b6e92d80a9ce46ddedfeaddb1d298ce96cea5ccc8e1397443dbb8',1,'ip6_zone.h']]], + ['ip6_5fzone_2eh',['ip6_zone.h',['../ip6__zone_8h.html',1,'']]], + ['ipv6_20zones',['IPv6 Zones',['../group__ip6__zones.html',1,'']]], + ['ipv6_20only',['IPv6 only',['../group__ip6addr.html',1,'']]], + ['ip6addr_5faton',['ip6addr_aton',['../ip6__addr_8c.html#a3f555ae302eb056f28f6cb266a27036e',1,'ip6addr_aton(const char *cp, ip6_addr_t *addr): ip6_addr.c'],['../ip6__addr_8h.html#a3f555ae302eb056f28f6cb266a27036e',1,'ip6addr_aton(const char *cp, ip6_addr_t *addr): ip6_addr.c']]], + ['ip6addr_5fntoa',['ip6addr_ntoa',['../ip6__addr_8c.html#adba4443e6629583d48e1d1c7c21a977e',1,'ip6addr_ntoa(const ip6_addr_t *addr): ip6_addr.c'],['../ip6__addr_8h.html#adba4443e6629583d48e1d1c7c21a977e',1,'ip6addr_ntoa(const ip6_addr_t *addr): ip6_addr.c']]], + ['ip6addr_5fntoa_5fr',['ip6addr_ntoa_r',['../ip6__addr_8c.html#a64d442f35f34c43121bf91cfea2e77a2',1,'ip6addr_ntoa_r(const ip6_addr_t *addr, char *buf, int buflen): ip6_addr.c'],['../ip6__addr_8h.html#a64d442f35f34c43121bf91cfea2e77a2',1,'ip6addr_ntoa_r(const ip6_addr_t *addr, char *buf, int buflen): ip6_addr.c']]], + ['ip_5f2_5fip4',['ip_2_ip4',['../group__ip4addr.html#gad7268a496b7e3f872efecd859eba6f03',1,'ip_addr.h']]], + ['ip_5f2_5fip6',['ip_2_ip6',['../group__ip6addr.html#ga06e75bcd198012b5ba39480c233608bd',1,'ip_addr.h']]], + ['ip_5faccept_5flink_5flayer_5faddressed_5fport',['IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT',['../ip4_8c.html#a185c7d6380711847105430931692b267',1,'ip4.c']]], + ['ip_5faddr',['ip_addr',['../structip__addr.html',1,'ip_addr'],['../structnetif.html#a9776aaee37ea8f07b9ddc0f8b4e7e866',1,'netif::ip_addr()']]], + ['ip_5faddr_2eh',['ip_addr.h',['../ip__addr_8h.html',1,'']]], + ['ip_5faddr4',['IP_ADDR4',['../group__ip4addr.html#gadd2203c6cbfb6de8c2d9ce5bbfb2bd2a',1,'ip_addr.h']]], + ['ip_5faddr6',['IP_ADDR6',['../group__ip6addr.html#ga9ee53b601b89dcb517496ba0bccf9bd0',1,'ip_addr.h']]], + ['ip_5faddr6_5fhost',['IP_ADDR6_HOST',['../group__ip6addr.html#gabfb1ce44d6a8791336bf3ac06aa086ca',1,'ip_addr.h']]], + ['ip_5faddr_5fany',['IP_ADDR_ANY',['../group__ip4addr.html#ga3e5e67b7292b156034560fef2202776c',1,'ip_addr.h']]], + ['ip_5faddr_5fbroadcast',['IP_ADDR_BROADCAST',['../group__ip4addr.html#gad546955e48dada78b552375b873f6986',1,'ip_addr.h']]], + ['ip_5faddr_5fcmp',['ip_addr_cmp',['../group__ipaddr.html#ga008c9c92d770cc030ea054e6b259835a',1,'ip_addr.h']]], + ['ip_5faddr_5fcmp_5fzoneless',['ip_addr_cmp_zoneless',['../group__ipaddr.html#gadb66f6d5fa926ed4b0e69db58dffcbe4',1,'ip_addr.h']]], + ['ip_5faddr_5fcopy',['ip_addr_copy',['../group__ipaddr.html#ga77a933975db287f6aa5c2e70249ba18f',1,'ip_addr.h']]], + ['ip_5faddr_5fcopy_5ffrom_5fip4',['ip_addr_copy_from_ip4',['../group__ip4addr.html#gaef063b2e975dae7ecf398770b04b14af',1,'ip_addr.h']]], + ['ip_5faddr_5fcopy_5ffrom_5fip6',['ip_addr_copy_from_ip6',['../group__ip6addr.html#gabe6f7908ce8a91dc587e2ebc2172e651',1,'ip_addr.h']]], + ['ip_5faddr_5fcopy_5ffrom_5fip6_5fpacked',['ip_addr_copy_from_ip6_packed',['../group__ip6addr.html#ga130ca0907497831677c130dbb3289e1e',1,'ip_addr.h']]], + ['ip_5faddr_5fget_5fip4_5fu32',['ip_addr_get_ip4_u32',['../group__ip4addr.html#ga09c62e8a3bf599aa7f335e0ad0820e85',1,'ip_addr.h']]], + ['ip_5faddr_5fget_5fnetwork',['ip_addr_get_network',['../group__ipaddr.html#gab5c5540ea05227bdd9207a47304bb2c1',1,'ip_addr.h']]], + ['ip_5faddr_5fisany',['ip_addr_isany',['../group__ipaddr.html#ga279118890e6a90aa740051fb8b0cc5f4',1,'ip_addr.h']]], + ['ip_5faddr_5fisany_5fval',['ip_addr_isany_val',['../group__ipaddr.html#gacd8f5aa151cff966fd28368b85f38c05',1,'ip_addr.h']]], + ['ip_5faddr_5fisbroadcast',['ip_addr_isbroadcast',['../group__ipaddr.html#gaa3345706e3aa8b32dd630c195b053e75',1,'ip_addr.h']]], + ['ip_5faddr_5fislinklocal',['ip_addr_islinklocal',['../group__ipaddr.html#ga33bc079baaf513a9a7381b9531a1f653',1,'ip_addr.h']]], + ['ip_5faddr_5fisloopback',['ip_addr_isloopback',['../group__ipaddr.html#ga0fc8bf6662809274750868683b3a422e',1,'ip_addr.h']]], + ['ip_5faddr_5fismulticast',['ip_addr_ismulticast',['../group__ipaddr.html#ga2170d3ee13dd22722222228e7b1c5752',1,'ip_addr.h']]], + ['ip_5faddr_5fnetcmp',['ip_addr_netcmp',['../group__ipaddr.html#ga3a2123f0bbf6fe843c8542e349c680eb',1,'ip_addr.h']]], + ['ip_5faddr_5fset',['ip_addr_set',['../group__ipaddr.html#ga40db7feae2b92f7a7a01d65a85b06e18',1,'ip_addr.h']]], + ['ip_5faddr_5fset_5fany',['ip_addr_set_any',['../group__ipaddr.html#ga8853fce54b1816dca3af90b48677e673',1,'ip_addr.h']]], + ['ip_5faddr_5fset_5fany_5fval',['ip_addr_set_any_val',['../group__ipaddr.html#ga93c7bf3f7487495472aa0f9b5fc25d1a',1,'ip_addr.h']]], + ['ip_5faddr_5fset_5fhton',['ip_addr_set_hton',['../group__ipaddr.html#ga3528798be1d2f1ec6a6bccd35694edce',1,'ip_addr.h']]], + ['ip_5faddr_5fset_5fip4_5fu32',['ip_addr_set_ip4_u32',['../group__ip4addr.html#ga971516589980428bf51f37cefa4ddf66',1,'ip_addr.h']]], + ['ip_5faddr_5fset_5fip4_5fu32_5fval',['ip_addr_set_ip4_u32_val',['../group__ip4addr.html#ga624b5010ccc04cc3d0de2acce44f1c9e',1,'ip_addr.h']]], + ['ip_5faddr_5fset_5fipaddr',['ip_addr_set_ipaddr',['../group__ipaddr.html#gaea5e4795598bc33fa2db1773c8e6fbac',1,'ip_addr.h']]], + ['ip_5faddr_5fset_5floopback',['ip_addr_set_loopback',['../group__ipaddr.html#ga8f9d56ac85cd87338a1823e4a58ba1da',1,'ip_addr.h']]], + ['ip_5faddr_5fset_5floopback_5fval',['ip_addr_set_loopback_val',['../group__ipaddr.html#gac1c5f897bbee217771b1a6ba18733042',1,'ip_addr.h']]], + ['ip_5faddr_5fset_5fzero',['ip_addr_set_zero',['../group__ipaddr.html#gaae7edb585c062ae03bfbd3af7bf671bc',1,'ip_addr.h']]], + ['ip_5faddr_5fset_5fzero_5fip4',['ip_addr_set_zero_ip4',['../ip__addr_8h.html#aecb93d575e65f835f1045a4e87e70ed9',1,'ip_addr.h']]], + ['ip_5faddr_5fset_5fzero_5fip6',['ip_addr_set_zero_ip6',['../group__ip6addr.html#gafb3a0e5241683aff573e195f31ba8845',1,'ip_addr.h']]], + ['ip_5faddr_5ft',['ip_addr_t',['../group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a',1,'ip_addr.h']]], + ['ip_5fany_5ftype',['IP_ANY_TYPE',['../group__ipaddr.html#gabe43b154533b73585c4e58f568370ede',1,'ip_addr.h']]], + ['ip_5fcurrent_5fdest_5faddr',['ip_current_dest_addr',['../ip_8h.html#a9135977868017c3deeec86b525e13997',1,'ip_current_dest_addr(): ip.h'],['../ip_8h.html#a9135977868017c3deeec86b525e13997',1,'ip_current_dest_addr(): ip.h']]], + ['ip_5fcurrent_5fheader_5fproto',['ip_current_header_proto',['../ip_8h.html#af27c43c23b59d68a8463cd5ad035b20f',1,'ip.h']]], + ['ip_5fcurrent_5fheader_5ftot_5flen',['ip_current_header_tot_len',['../ip_8h.html#a2ca15ea285a10982294378cd7b8e83e2',1,'ip.h']]], + ['ip_5fcurrent_5finput_5fnetif',['ip_current_input_netif',['../ip_8h.html#ae214afa9d3f1b26fc8d538436b8fa3c4',1,'ip.h']]], + ['ip_5fcurrent_5fis_5fv6',['ip_current_is_v6',['../ip_8h.html#abc56623d434a204298a4e98352af1c9d',1,'ip.h']]], + ['ip_5fcurrent_5fnetif',['ip_current_netif',['../ip_8h.html#aabecef3c7653a9767c79245c44fcab9f',1,'ip.h']]], + ['ip_5fcurrent_5fsrc_5faddr',['ip_current_src_addr',['../ip_8h.html#a4e35b7692c228c98e738892f0a215647',1,'ip_current_src_addr(): ip.h'],['../ip_8h.html#a4e35b7692c228c98e738892f0a215647',1,'ip_current_src_addr(): ip.h']]], + ['ip_5fdata',['ip_data',['../ip_8c.html#ac944fb6564f181bc90bc7c2b8b00d94c',1,'ip_data(): ip.c'],['../ip_8h.html#ac944fb6564f181bc90bc7c2b8b00d94c',1,'ip_data(): ip.c']]], + ['ip_5fdebug',['IP_DEBUG',['../group__lwip__opts__debugmsg.html#ga5d3348778951e7bc5cd397c6575eef3a',1,'opt.h']]], + ['ip_5fdefault_5fttl',['IP_DEFAULT_TTL',['../group__lwip__opts__ipv4.html#ga556b9b58fd02c0fdd126791baef77411',1,'opt.h']]], + ['ip_5fforward',['IP_FORWARD',['../group__lwip__opts__ipv4.html#ga881d32ff5ee02af01f758953f1b51d59',1,'opt.h']]], + ['ip_5fforward_5fallow_5ftx_5fon_5frx_5fnetif',['IP_FORWARD_ALLOW_TX_ON_RX_NETIF',['../group__lwip__opts__ipv4.html#ga9e761df07c4e93901858741d4771dbc7',1,'opt.h']]], + ['ip_5ffrag',['ip_frag',['../structstats__.html#a81fcccf03ab0d4e31423f39d0c880302',1,'stats_::ip_frag()'],['../group__lwip__opts__ipv4.html#gaf85c8bdd5035b6cada790b4cc2a209a4',1,'IP_FRAG(): opt.h']]], + ['ip_5fget_5foption',['ip_get_option',['../ip_8h.html#a26e077f52de4a97ff89c02415c084518',1,'ip.h']]], + ['ip_5fglobals',['ip_globals',['../structip__globals.html',1,'']]], + ['ip_5fhdr_5fget_5fversion',['IP_HDR_GET_VERSION',['../prot_2ip_8h.html#afc29766fb0707c63b64568c5fa44a374',1,'ip.h']]], + ['ip_5finput',['ip_input',['../group__lwip__nosys.html#ga3c420dab0c6760df099a2d688fa42a26',1,'ip_input(struct pbuf *p, struct netif *inp): ip.c'],['../group__lwip__nosys.html#ga3c420dab0c6760df099a2d688fa42a26',1,'ip_input(struct pbuf *p, struct netif *inp): ip.c']]], + ['ip_5fis_5fany_5ftype_5fval',['IP_IS_ANY_TYPE_VAL',['../group__ipaddr.html#ga83b17dbf7d1faf5c8f8c20b039db8bb8',1,'ip_addr.h']]], + ['ip_5fis_5fv4',['IP_IS_V4',['../group__ip4addr.html#gabee5dab2191bb0f3355d7f30d1496f24',1,'ip_addr.h']]], + ['ip_5fis_5fv4_5fval',['IP_IS_V4_VAL',['../group__ip4addr.html#gab1a059f07bd9c50aa58447d963b823a1',1,'ip_addr.h']]], + ['ip_5fis_5fv6',['IP_IS_V6',['../group__ip6addr.html#ga9bac7e938757f1d24df2404e8b57cb7d',1,'ip_addr.h']]], + ['ip_5fis_5fv6_5fval',['IP_IS_V6_VAL',['../group__ip6addr.html#ga1578e34703e86711a7fb7dcc3857004d',1,'ip_addr.h']]], + ['ip_5fnetif_5fget_5flocal_5fip',['ip_netif_get_local_ip',['../group__ip.html#ga4a4b9439c91eeec719692dfe10f14af0',1,'ip.h']]], + ['ip_5fnext_5fheader_5fptr',['ip_next_header_ptr',['../ip_8h.html#a68d25b5924b768cbf2f1a78bbabfce26',1,'ip.h']]], + ['ip_5fntoa',['ip_ntoa',['../ip4__addr_8h.html#a2b2230516e7911dfacc9b87644ba30f1',1,'ip4_addr.h']]], + ['ip_5foptions_5fallowed',['IP_OPTIONS_ALLOWED',['../group__lwip__opts__ipv4.html#gaa956b0167c37a2265b55e2d0204a3933',1,'opt.h']]], + ['ip_5foptions_5fsend',['IP_OPTIONS_SEND',['../ip4_8h.html#a516aa115f61c368cbe74fae2da2c6824',1,'ip4.h']]], + ['ip_5foutput',['ip_output',['../group__ip.html#gaf056aa43789c2964f091f8349bb83730',1,'ip.h']]], + ['ip_5foutput_5fhinted',['ip_output_hinted',['../ip_8h.html#accbc01f37dd426a66de41693a5450207',1,'ip.h']]], + ['ip_5foutput_5fif',['ip_output_if',['../group__ip.html#ga51cd772c3f6fca7c0363dca1fce7b250',1,'ip.h']]], + ['ip_5foutput_5fif_5fhdrincl',['ip_output_if_hdrincl',['../ip_8h.html#aac608b92f8f226c3574d6bb855f12496',1,'ip.h']]], + ['ip_5foutput_5fif_5fsrc',['ip_output_if_src',['../group__ip.html#gab9d45f846f796bd6ce1e0c780c392765',1,'ip.h']]], + ['ip_5fpcb',['IP_PCB',['../ip_8h.html#a8bdf4b5f674375e76cdd968826d80e53',1,'ip.h']]], + ['ip_5freass_5fcheck_5foverlap',['IP_REASS_CHECK_OVERLAP',['../ip4__frag_8c.html#af920fb8127d00dd7a8b809afd28723fe',1,'IP_REASS_CHECK_OVERLAP(): ip4_frag.c'],['../ip6__frag_8c.html#af920fb8127d00dd7a8b809afd28723fe',1,'IP_REASS_CHECK_OVERLAP(): ip6_frag.c']]], + ['ip_5freass_5fdebug',['IP_REASS_DEBUG',['../group__lwip__opts__debugmsg.html#ga4cdc3e9a4a1c01d1f7f0e723a1b2ec33',1,'opt.h']]], + ['ip_5freass_5ffree_5foldest',['IP_REASS_FREE_OLDEST',['../ip4__frag_8c.html#a510934accf149433bdcf683993e79080',1,'IP_REASS_FREE_OLDEST(): ip4_frag.c'],['../ip6__frag_8c.html#a510934accf149433bdcf683993e79080',1,'IP_REASS_FREE_OLDEST(): ip6_frag.c']]], + ['ip_5freass_5fhelper',['ip_reass_helper',['../structip__reass__helper.html',1,'']]], + ['ip_5freass_5fmax_5fpbufs',['IP_REASS_MAX_PBUFS',['../group__lwip__opts__ipv4.html#ga29084a46d7d4be30e8029d356bca0394',1,'opt.h']]], + ['ip_5freass_5fmaxage',['IP_REASS_MAXAGE',['../group__lwip__opts__ipv4.html#gad41122bd0b5485a18a4415c8f953727b',1,'opt.h']]], + ['ip_5freass_5ftmr',['ip_reass_tmr',['../ip4__frag_8c.html#abc7017eb20983f372e81de7376ebec88',1,'ip_reass_tmr(void): ip4_frag.c'],['../ip4__frag_8h.html#abc7017eb20983f372e81de7376ebec88',1,'ip_reass_tmr(void): ip4_frag.c']]], + ['ip_5freassdata',['ip_reassdata',['../structip__reassdata.html',1,'']]], + ['ip_5freassembly',['IP_REASSEMBLY',['../group__lwip__opts__ipv4.html#ga1a31ab0e0f37b17d40fa7c35bc2c4f69',1,'opt.h']]], + ['ip_5freset_5foption',['ip_reset_option',['../ip_8h.html#a441c63f00c4b0cb69fc34ca6b55307cc',1,'ip.h']]], + ['ip_5froute',['ip_route',['../group__ip.html#ga0fa3afc2c00aea346889b476650adee3',1,'ip.h']]], + ['ip_5fset_5foption',['ip_set_option',['../ip_8h.html#a13f48cf825c7f074dc05bea54e9d6a93',1,'ip.h']]], + ['ip_5fsof_5fbroadcast',['IP_SOF_BROADCAST',['../group__lwip__opts__ipv4.html#ga0b2c993fd940f5774108298933310384',1,'opt.h']]], + ['ip_5fsof_5fbroadcast_5frecv',['IP_SOF_BROADCAST_RECV',['../group__lwip__opts__ipv4.html#ga0f1fbf42d3344bf87cd056d48ddca3db',1,'opt.h']]], + ['ip_5fstats',['IP_STATS',['../group__lwip__opts__stats.html#gaf50575a4895e26ea2c01d1f2269487be',1,'opt.h']]], + ['ip_20address_20handling',['IP address handling',['../group__ipaddr.html',1,'']]], + ['ipaddr4_5finit',['IPADDR4_INIT',['../group__ip4addr.html#ga1eaffd17b4b3c56cc91a6d516e18118f',1,'ip_addr.h']]], + ['ipaddr4_5finit_5fbytes',['IPADDR4_INIT_BYTES',['../group__ip4addr.html#ga55cc3896c46564bd2941ee5806fe1e11',1,'ip_addr.h']]], + ['ipaddr6_5finit',['IPADDR6_INIT',['../group__ip6addr.html#ga1266e500b1db0b7cdc4b269cace49746',1,'ip_addr.h']]], + ['ipaddr6_5finit_5fhost',['IPADDR6_INIT_HOST',['../group__ip6addr.html#gadaff748da2b808995993dd3db5420f08',1,'ip_addr.h']]], + ['ipaddr6_5fzone_5finit',['IPADDR6_ZONE_INIT',['../group__ip6__zones.html#gaa090e54f632c8512a7991307e011c1b9',1,'ip6_zone.h']]], + ['ipaddr_5faddr',['ipaddr_addr',['../ip4__addr_8c.html#a2c05f9138da41115978409e547df9670',1,'ipaddr_addr(const char *cp): ip4_addr.c'],['../ip4__addr_8h.html#a2c05f9138da41115978409e547df9670',1,'ipaddr_addr(const char *cp): ip4_addr.c']]], + ['ipaddr_5fany',['IPADDR_ANY',['../ip4__addr_8h.html#ad6ed0d622d61ecd6edd606e3b564f0a2',1,'ip4_addr.h']]], + ['ipaddr_5fany_5ftype_5finit',['IPADDR_ANY_TYPE_INIT',['../group__ipaddr.html#ga23b580930c0eb1d0fdeba2b109c077a5',1,'ip_addr.h']]], + ['ipaddr_5faton',['ipaddr_aton',['../group__ipaddr.html#ga4de70fdd7fd36c5b6eaed8b855d5f151',1,'ipaddr_aton(const char *cp, ip_addr_t *addr): ip.c'],['../group__ipaddr.html#ga4de70fdd7fd36c5b6eaed8b855d5f151',1,'ipaddr_aton(const char *cp, ip_addr_t *addr): ip.c']]], + ['ipaddr_5fbroadcast',['IPADDR_BROADCAST',['../ip4__addr_8h.html#ac661fca7e7d25e5cd379b811a767c29a',1,'ip4_addr.h']]], + ['ipaddr_5floopback',['IPADDR_LOOPBACK',['../ip4__addr_8h.html#a6f51a2eb21547df4e6b3ba046188345e',1,'ip4_addr.h']]], + ['ipaddr_5fnone',['IPADDR_NONE',['../ip4__addr_8h.html#abc4b2e3531c4992f2ae4b8c0f9751544',1,'ip4_addr.h']]], + ['ipaddr_5fntoa',['ipaddr_ntoa',['../group__ipaddr.html#gace12d28aef35bb15962e8563aea571b1',1,'ipaddr_ntoa(const ip_addr_t *addr): ip.c'],['../group__ipaddr.html#gace12d28aef35bb15962e8563aea571b1',1,'ipaddr_ntoa(const ip_addr_t *addr): ip.c']]], + ['ipaddr_5fntoa_5fr',['ipaddr_ntoa_r',['../group__ipaddr.html#ga3684dabc0cae597ffb5b51d41f1d886f',1,'ipaddr_ntoa_r(const ip_addr_t *addr, char *buf, int buflen): ip.c'],['../group__ipaddr.html#ga3684dabc0cae597ffb5b51d41f1d886f',1,'ipaddr_ntoa_r(const ip_addr_t *addr, char *buf, int buflen): ip.c']]], + ['ipaddr_5fstrlen_5fmax',['IPADDR_STRLEN_MAX',['../group__ipaddr.html#ga8619278bcbf705844f584f36972fc758',1,'ip_addr.h']]], + ['ipaddr_5ftype_5fany',['IPADDR_TYPE_ANY',['../group__ipaddr.html#ggaf2142f0dfdcc938e2db16aa745ed585cac6b2c99cf920e08efcb55dc40e42944e',1,'ip_addr.h']]], + ['ipaddr_5ftype_5fv4',['IPADDR_TYPE_V4',['../group__ipaddr.html#ggaf2142f0dfdcc938e2db16aa745ed585cace47fa82608deeb1c1c7c2c891eb5049',1,'ip_addr.h']]], + ['ipaddr_5ftype_5fv6',['IPADDR_TYPE_V6',['../group__ipaddr.html#ggaf2142f0dfdcc938e2db16aa745ed585caae510fd8ec7fe405b594b57af61f9a02',1,'ip_addr.h']]], + ['ipaddr_5fwordaligned_5fcopy_5ffrom_5fip4_5faddr_5ft',['IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T',['../lwip_2prot_2etharp_8h.html#a7dff02ff186f844b731cecbe614b7419',1,'etharp.h']]], + ['ipaddr_5fwordaligned_5fcopy_5fto_5fip4_5faddr_5ft',['IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T',['../lwip_2prot_2etharp_8h.html#a94f1c2a6ad7cecdfe759c0490ba7f030',1,'etharp.h']]], + ['iperf_20server',['Iperf server',['../group__iperf.html',1,'']]], + ['ipfrag_5fstats',['IPFRAG_STATS',['../group__lwip__opts__stats.html#gac9a4fbb46df3c0f479a334d0e34fb74f',1,'opt.h']]], + ['ipv4_5fchanged_5fs',['ipv4_changed_s',['../structnetif__ext__callback__args__t_1_1ipv4__changed__s.html',1,'netif_ext_callback_args_t']]], + ['ipv6_5faddr_5fstate_5fchanged_5fs',['ipv6_addr_state_changed_s',['../structnetif__ext__callback__args__t_1_1ipv6__addr__state__changed__s.html',1,'netif_ext_callback_args_t']]], + ['ipv6_5fcustom_5fscopes',['IPV6_CUSTOM_SCOPES',['../group__ip6__zones.html#gae677a65970f4b667156b256dd9a4924b',1,'ip6_zone.h']]], + ['ipv6_5ffrag_5fcopyheader',['IPV6_FRAG_COPYHEADER',['../ip6__frag_8h.html#a151e742cf7f0e5c3a08f31db0370cea7',1,'ip6_frag.h']]], + ['ipv6_5freass_5fmaxage',['IPV6_REASS_MAXAGE',['../group__lwip__opts__ipv6.html#ga8adc0b7dbedd279387a21588f0e2c969',1,'opt.h']]], + ['ipv6_5fset_5fs',['ipv6_set_s',['../structnetif__ext__callback__args__t_1_1ipv6__set__s.html',1,'netif_ext_callback_args_t']]], + ['icmp',['ICMP',['../group__lwip__opts__icmp.html',1,'']]], + ['icmp6',['ICMP6',['../group__lwip__opts__icmp6.html',1,'']]], + ['igmp',['IGMP',['../group__lwip__opts__igmp.html',1,'']]], + ['infrastructure',['Infrastructure',['../group__lwip__opts__infrastructure.html',1,'']]], + ['ipv4',['IPv4',['../group__lwip__opts__ipv4.html',1,'']]], + ['ipv6',['IPv6',['../group__lwip__opts__ipv6.html',1,'']]], + ['internal_20memory_20pools',['Internal memory pools',['../group__lwip__opts__memp.html',1,'']]], + ['ipv4_20address_20handling',['IPv4 address handling',['../group__netif__ip4.html',1,'']]], + ['ipv6_20address_20handling',['IPv6 address handling',['../group__netif__ip6.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_b.html b/Libraries/LwIP/doc/doxygen/output/html/search/all_b.html new file mode 100644 index 0000000..0814e4e --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_b.js b/Libraries/LwIP/doc/doxygen/output/html/search/all_b.js new file mode 100644 index 0000000..8c223f4 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_b.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['jl',['jl',['../structapi__msg.html#a6387bddb309c218ac0ccc5ef6d7a033e',1,'api_msg']]], + ['jumpers',['jumpers',['../structnetbios__answer.html#a69cd3e8b8265531a7ce3e5cbd4911683',1,'netbios_answer']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_c.html b/Libraries/LwIP/doc/doxygen/output/html/search/all_c.html new file mode 100644 index 0000000..da08c38 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_c.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_c.js b/Libraries/LwIP/doc/doxygen/output/html/search/all_c.js new file mode 100644 index 0000000..c8680df --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_c.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['keep_5falive',['keep_alive',['../structmqtt__connect__client__info__t.html#ac80262a7456812e9eefffd8c3b9ac21a',1,'mqtt_connect_client_info_t']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_d.html b/Libraries/LwIP/doc/doxygen/output/html/search/all_d.html new file mode 100644 index 0000000..9986c9c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_d.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_d.js b/Libraries/LwIP/doc/doxygen/output/html/search/all_d.js new file mode 100644 index 0000000..dd37291 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_d.js @@ -0,0 +1,384 @@ +var searchData= +[ + ['lwip_5fdbg_5fmin_5flevel_20and_20lwip_5fdbg_5ftypes_5fon_20values',['LWIP_DBG_MIN_LEVEL and LWIP_DBG_TYPES_ON values',['../group__debugging__levels.html',1,'']]], + ['last_5freporter_5fflag',['last_reporter_flag',['../structigmp__group.html#a8fa72062d168d81c1c5ae5209eb0a874',1,'igmp_group::last_reporter_flag()'],['../structmld__group.html#aa8eb75f4dfaefbf0d2853b0e31ceb53b',1,'mld_group::last_reporter_flag()']]], + ['lastconflict',['lastconflict',['../structautoip.html#a2f51d8cde73e20d6e0ae3ec8053afb55',1,'autoip']]], + ['lastdata',['lastdata',['../structlwip__sock.html#aa487ac16b7e5b6a2a618b7b5060247e1',1,'lwip_sock']]], + ['legacy_5fquery',['legacy_query',['../structmdns__outpacket.html#aff8c520bffa87c78e0ee2440571bbd65',1,'mdns_outpacket']]], + ['len',['len',['../structnetvector.html#a8a95e6dcf57067e4354b9c2b6b391dbd',1,'netvector::len()'],['../structpbuf.html#a6f82449625e36e294f5d210268c0703f',1,'pbuf::len()'],['../structapi__msg.html#a40624c398d1939bfee54bffa708a363e',1,'api_msg::len()']]], + ['linger',['linger',['../structnetconn.html#a25ed06d944da0b0b9e7db5265be3fa3d',1,'netconn']]], + ['link',['link',['../structstats__.html#a67759c9b0059bf569f9f771df23924eb',1,'stats_']]], + ['link_5fcallback',['link_callback',['../structnetif.html#a4388cfadc8b4e9a9c1c93ce777bc3673',1,'netif']]], + ['link_5fchanged_5fs',['link_changed_s',['../structnetif__ext__callback__args__t_1_1link__changed__s.html',1,'netif_ext_callback_args_t']]], + ['link_5fspeed',['link_speed',['../structnetif.html#a908452e854180941054ed89f52bb8094',1,'netif']]], + ['link_5fstats',['LINK_STATS',['../group__lwip__opts__stats.html#gae58b452782d0327ae728192686c5a84a',1,'opt.h']]], + ['link_5ftype',['link_type',['../structnetif.html#ad0ee2a2169e384a2977ece2c471e0062',1,'netif']]], + ['linkoutput',['linkoutput',['../structnetif.html#acaaac9b415a7be73eb8a287c8ed18a8d',1,'netif']]], + ['listen',['listen',['../group__socket.html#gae6e6de5a20bed9fc7078f0e6c9c4aca4',1,'sockets.h']]], + ['ll_5fip4_5fmulticast_5faddr_5f0',['LL_IP4_MULTICAST_ADDR_0',['../lwip_2prot_2ethernet_8h.html#afaf6cbccf9477c3505660e3a17860e07',1,'ethernet.h']]], + ['ll_5fip6_5fmulticast_5faddr_5f0',['LL_IP6_MULTICAST_ADDR_0',['../lwip_2prot_2ethernet_8h.html#a8ebe93c6ad2d743e6c952539257679b6',1,'ethernet.h']]], + ['llipaddr',['llipaddr',['../structautoip.html#a13b5da8a86839b4cd9bd9f5400ac9dc7',1,'autoip']]], + ['local_5fip',['local_ip',['../structtcp__pcb__listen.html#a8a4f7b0551a0c6926a08ea5b6b3d5987',1,'tcp_pcb_listen::local_ip()'],['../structtcp__pcb.html#a0c4f101d55debee0d8fad86a7eb4f76f',1,'tcp_pcb::local_ip()'],['../structudp__pcb.html#a6160ea5e52f0d33e51b16b853ea1cd63',1,'udp_pcb::local_ip()']]], + ['local_5fport',['local_port',['../structudp__pcb.html#a8cc805631142eefc5593ae8ba3302d7c',1,'udp_pcb']]], + ['lock_5ftcpip_5fcore',['LOCK_TCPIP_CORE',['../tcpip_8h.html#a4700525e737fc025fea4887b172e0c95',1,'LOCK_TCPIP_CORE(): tcpip.h'],['../tcpip_8c.html#acd7be2108e9a47fd8f1ab0a49f76241d',1,'lock_tcpip_core(): tcpip.c'],['../tcpip_8h.html#acd7be2108e9a47fd8f1ab0a49f76241d',1,'lock_tcpip_core(): tcpip.c']]], + ['lowpan6_2ec',['lowpan6.c',['../lowpan6_8c.html',1,'']]], + ['lowpan6_2eh',['lowpan6.h',['../lowpan6_8h.html',1,'']]], + ['lowpan6_5fble_2ec',['lowpan6_ble.c',['../lowpan6__ble_8c.html',1,'']]], + ['lowpan6_5fble_2eh',['lowpan6_ble.h',['../lowpan6__ble_8h.html',1,'']]], + ['lowpan6_5fcalc_5fcrc',['lowpan6_calc_crc',['../lowpan6_8h.html#ab33dc87f30aeda871845854511de9931',1,'lowpan6_calc_crc(const void *buf, u16_t len): lowpan6.c'],['../lowpan6_8c.html#ab33dc87f30aeda871845854511de9931',1,'lowpan6_calc_crc(const void *buf, u16_t len): lowpan6.c']]], + ['lowpan6_5fcommon_2ec',['lowpan6_common.c',['../lowpan6__common_8c.html',1,'']]], + ['lowpan6_5fcommon_2eh',['lowpan6_common.h',['../lowpan6__common_8h.html',1,'']]], + ['lowpan6_5fcontext',['lowpan6_context',['../structlowpan6__ieee802154__data.html#a190c9c06dfe1075abb7399f99553b507',1,'lowpan6_ieee802154_data']]], + ['lowpan6_5fieee802154_5fdata',['lowpan6_ieee802154_data',['../structlowpan6__ieee802154__data.html',1,'']]], + ['lowpan6_5finput',['lowpan6_input',['../group__sixlowpan.html#ga3c943da6f9d3f1096bdcebe3e19d38b7',1,'lowpan6_input(struct pbuf *p, struct netif *netif): lowpan6.c'],['../group__sixlowpan.html#ga3c943da6f9d3f1096bdcebe3e19d38b7',1,'lowpan6_input(struct pbuf *p, struct netif *netif): lowpan6.c']]], + ['lowpan6_5flink_5faddr',['lowpan6_link_addr',['../structlowpan6__link__addr.html',1,'']]], + ['lowpan6_5fopts_2eh',['lowpan6_opts.h',['../lowpan6__opts_8h.html',1,'']]], + ['lowpan6_5foutput',['lowpan6_output',['../group__sixlowpan.html#ga9e650551777ededccf035ef9aaee247b',1,'lowpan6_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr): lowpan6.c'],['../group__sixlowpan.html#ga9e650551777ededccf035ef9aaee247b',1,'lowpan6_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr): lowpan6.c']]], + ['lowpan6_5freass_5fhelper',['lowpan6_reass_helper',['../structlowpan6__reass__helper.html',1,'']]], + ['lowpan6_5fset_5fcontext',['lowpan6_set_context',['../group__sixlowpan.html#ga94c6d289bc25a14fd0fee9230ae3af94',1,'lowpan6_set_context(u8_t idx, const ip6_addr_t *context): lowpan6.c'],['../group__sixlowpan.html#ga94c6d289bc25a14fd0fee9230ae3af94',1,'lowpan6_set_context(u8_t idx, const ip6_addr_t *context): lowpan6.c']]], + ['lowpan6_5fset_5fpan_5fid',['lowpan6_set_pan_id',['../group__sixlowpan.html#gade00524e85d37a3521ea85359f801df3',1,'lowpan6_set_pan_id(u16_t pan_id): lowpan6.c'],['../group__sixlowpan.html#gade00524e85d37a3521ea85359f801df3',1,'lowpan6_set_pan_id(u16_t pan_id): lowpan6.c']]], + ['lowpan6_5fset_5fshort_5faddr',['lowpan6_set_short_addr',['../group__sixlowpan.html#gafee5495843dfb36cb77ba2f16ea6a625',1,'lowpan6_set_short_addr(u8_t addr_high, u8_t addr_low): lowpan6.c'],['../group__sixlowpan.html#gafee5495843dfb36cb77ba2f16ea6a625',1,'lowpan6_set_short_addr(u8_t addr_high, u8_t addr_low): lowpan6.c']]], + ['lowpan6_5ftmr',['lowpan6_tmr',['../lowpan6_8h.html#ac8c3a4612aeb23f65e55c18faf5ad7d7',1,'lowpan6_tmr(void): lowpan6.c'],['../lowpan6_8c.html#ac8c3a4612aeb23f65e55c18faf5ad7d7',1,'lowpan6_tmr(void): lowpan6.c']]], + ['lowpan6_5ftmr_5finterval',['LOWPAN6_TMR_INTERVAL',['../lowpan6_8h.html#aa258ae16a937c40333c8f97a7f236797',1,'lowpan6.h']]], + ['lwip',['lwIP',['../group__lwip.html',1,'']]], + ['lwip_5f6lowpan_5f802154_5fhw_5fcrc',['LWIP_6LOWPAN_802154_HW_CRC',['../lowpan6__opts_8h.html#ae5bb9b8d695caec08930073edc7c6175',1,'lowpan6_opts.h']]], + ['lwip_5f6lowpan_5fcalc_5fcrc',['LWIP_6LOWPAN_CALC_CRC',['../lowpan6__opts_8h.html#ad20840e31a0a6eeec8666e4d4a979f43',1,'lowpan6_opts.h']]], + ['lwip_5f6lowpan_5finfer_5fshort_5faddress',['LWIP_6LOWPAN_INFER_SHORT_ADDRESS',['../lowpan6__opts_8h.html#a6a542cd72a6270b7231b8b93f8041207',1,'lowpan6_opts.h']]], + ['lwip_5f6lowpan_5fiphc',['LWIP_6LOWPAN_IPHC',['../lowpan6__opts_8h.html#a0f178a86d02e0ba4168cafe3de5f3afa',1,'lowpan6_opts.h']]], + ['lwip_5f6lowpan_5fnum_5fcontexts',['LWIP_6LOWPAN_NUM_CONTEXTS',['../lowpan6__opts_8h.html#a4ffa89f39abf93cc599f78c5a8bb0a4a',1,'lowpan6_opts.h']]], + ['lwip_5falignment_5fcast',['LWIP_ALIGNMENT_CAST',['../group__compiler__abstraction.html#gaade87973d72135b0b3afccfff4f62eb8',1,'arch.h']]], + ['lwip_5fallow_5fmem_5ffree_5ffrom_5fother_5fcontext',['LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT',['../group__lwip__opts__mem.html#ga0a3ef6098813c103e5aba07da76e15e2',1,'opt.h']]], + ['lwip_5faltcp',['LWIP_ALTCP',['../group__lwip__opts__tcp.html#ga26dee0e5d9c51b1dda0adad29c770a77',1,'opt.h']]], + ['lwip_5faltcp_5ftls',['LWIP_ALTCP_TLS',['../group__lwip__opts__tcp.html#gab03ba0306cf0a99ccce3d100142f60c8',1,'opt.h']]], + ['lwip_5faltcp_5ftls_5fmbedtls',['LWIP_ALTCP_TLS_MBEDTLS',['../altcp__tls__mbedtls__opts_8h.html#ac8dbfe10a4a9a64c1e2c62ea97e48639',1,'altcp_tls_mbedtls_opts.h']]], + ['lwip_5farp',['LWIP_ARP',['../group__lwip__opts__arp.html#ga9609a014bba4638cc191d6a8f9556c87',1,'opt.h']]], + ['lwip_5farp_5ffilter_5fnetif',['LWIP_ARP_FILTER_NETIF',['../netif_2ethernet_8h.html#a1ecae0406a3b714c02b632379f26a365',1,'ethernet.h']]], + ['lwip_5fassert_5fcore_5flocked',['LWIP_ASSERT_CORE_LOCKED',['../group__lwip__opts__lock.html#ga6a30040db307b3459fc11906bd433f75',1,'opt.h']]], + ['lwip_5fautoip',['LWIP_AUTOIP',['../group__lwip__opts__autoip.html#gaaf1b3a089827223589baf1b7f4f57069',1,'opt.h']]], + ['lwip_5fautoip_5fcreate_5fseed_5faddr',['LWIP_AUTOIP_CREATE_SEED_ADDR',['../autoip_8c.html#acec75069f6e6ecbe200c5691e56ecd43',1,'autoip.c']]], + ['lwip_5fautoip_5frand',['LWIP_AUTOIP_RAND',['../autoip_8c.html#a634535156cc1a8cf9f04d3d5c74f8a59',1,'autoip.c']]], + ['lwip_5fbroadcast_5fping',['LWIP_BROADCAST_PING',['../group__lwip__opts__icmp.html#ga8088cb56d1a84fe554b11bc15d84b2b9',1,'opt.h']]], + ['lwip_5fchecksum_5fctrl_5fper_5fnetif',['LWIP_CHECKSUM_CTRL_PER_NETIF',['../group__lwip__opts__checksum.html#ga3ecc5246a0c6ca5aed56c2d7899c1004',1,'opt.h']]], + ['lwip_5fchecksum_5fon_5fcopy',['LWIP_CHECKSUM_ON_COPY',['../group__lwip__opts__checksum.html#ga9f60183f0442bdbeefd6b395c6647613',1,'opt.h']]], + ['lwip_5fcompat_5fmutex',['LWIP_COMPAT_MUTEX',['../sys_8h.html#a7bada49634cd3b28b28bdcedd763a1e6',1,'sys.h']]], + ['lwip_5fcompat_5fsockets',['LWIP_COMPAT_SOCKETS',['../group__lwip__opts__socket.html#gafed2811f031822ec5afa1ee211fb7447',1,'opt.h']]], + ['lwip_5fconst_5fcast',['LWIP_CONST_CAST',['../group__compiler__abstraction.html#gaa0dd3f76dd9a837feaac61fedc0dbe72',1,'arch.h']]], + ['lwip_5fcyclic_5ftimer',['lwip_cyclic_timer',['../structlwip__cyclic__timer.html',1,'']]], + ['lwip_5fcyclic_5ftimer_5fhandler',['lwip_cyclic_timer_handler',['../timeouts_8h.html#a985c5d366b62bd179195e093ffcb7ecd',1,'timeouts.h']]], + ['lwip_5fcyclic_5ftimers',['lwip_cyclic_timers',['../timeouts_8c.html#addc06ab816f051a0fe6f280972eed142',1,'lwip_cyclic_timers(): timeouts.c'],['../timeouts_8h.html#addc06ab816f051a0fe6f280972eed142',1,'lwip_cyclic_timers(): timeouts.c']]], + ['lwip_5fdbg_5ffresh',['LWIP_DBG_FRESH',['../group__debugging__levels.html#ga7d44d1804fa5e747aed86816e2a6cae0',1,'debug.h']]], + ['lwip_5fdbg_5fhalt',['LWIP_DBG_HALT',['../group__debugging__levels.html#gab0a296414983155b30ad51871606b90f',1,'debug.h']]], + ['lwip_5fdbg_5flevel_5fall',['LWIP_DBG_LEVEL_ALL',['../group__debugging__levels.html#ga8ebaeb006b43f55897f3196b3617dc87',1,'debug.h']]], + ['lwip_5fdbg_5flevel_5fserious',['LWIP_DBG_LEVEL_SERIOUS',['../group__debugging__levels.html#ga0269bdc51f1e8a5ecf9af72c6e1c996c',1,'debug.h']]], + ['lwip_5fdbg_5flevel_5fsevere',['LWIP_DBG_LEVEL_SEVERE',['../group__debugging__levels.html#gaab41143277cd38047b6660d90e9cec3b',1,'debug.h']]], + ['lwip_5fdbg_5flevel_5fwarning',['LWIP_DBG_LEVEL_WARNING',['../group__debugging__levels.html#ga77c491e468bf7d9a1bc48430c1866a96',1,'debug.h']]], + ['lwip_5fdbg_5fmin_5flevel',['LWIP_DBG_MIN_LEVEL',['../group__lwip__opts__debugmsg.html#ga2043f599515774f8e571ba185dbcb9e7',1,'opt.h']]], + ['lwip_5fdbg_5foff',['LWIP_DBG_OFF',['../group__debugging__levels.html#gadab1cdc3f45939a3a5c9a3d7e04987e1',1,'debug.h']]], + ['lwip_5fdbg_5fon',['LWIP_DBG_ON',['../group__debugging__levels.html#ga9e31b7cbbc8f46af8e62b548079acd4e',1,'debug.h']]], + ['lwip_5fdbg_5fstate',['LWIP_DBG_STATE',['../group__debugging__levels.html#ga511ee3deb3240635f5ec6a1709c6d741',1,'debug.h']]], + ['lwip_5fdbg_5ftrace',['LWIP_DBG_TRACE',['../group__debugging__levels.html#ga988147559b78642ac881815b66023646',1,'debug.h']]], + ['lwip_5fdbg_5ftypes_5fon',['LWIP_DBG_TYPES_ON',['../group__lwip__opts__debugmsg.html#gac095d0e53f5eb5b326b2cccfd071d93d',1,'opt.h']]], + ['lwip_5fdebug',['LWIP_DEBUG',['../debug_8h.html#a957d947c94fda9b85d4aee0aab72952a',1,'debug.h']]], + ['lwip_5fdeclare_5fmemory_5faligned',['LWIP_DECLARE_MEMORY_ALIGNED',['../group__compiler__abstraction.html#ga651bb349041669fe717b19f127ef16c0',1,'arch.h']]], + ['lwip_5fdhcp',['LWIP_DHCP',['../group__lwip__opts__dhcp.html#ga8a6ec62dc121064ac591b1fd8567bee9',1,'opt.h']]], + ['lwip_5fdhcp6_5fget_5fntp_5fsrv',['LWIP_DHCP6_GET_NTP_SRV',['../group__lwip__opts__dhcpv6.html#ga5d08f76a7472daa7bcfe17343243bd77',1,'opt.h']]], + ['lwip_5fdhcp6_5fmax_5fdns_5fservers',['LWIP_DHCP6_MAX_DNS_SERVERS',['../group__lwip__opts__dhcpv6.html#ga92c3bc242ad20a5f398c45d332864a29',1,'opt.h']]], + ['lwip_5fdhcp6_5fmax_5fntp_5fservers',['LWIP_DHCP6_MAX_NTP_SERVERS',['../group__lwip__opts__dhcpv6.html#gaf3ac8e15d7a67429a02bc2317e16bcfe',1,'opt.h']]], + ['lwip_5fdhcp_5fautoip_5fcoop',['LWIP_DHCP_AUTOIP_COOP',['../group__lwip__opts__autoip.html#ga1a91e18dbb9777bc6e3963f52cb5f9fe',1,'opt.h']]], + ['lwip_5fdhcp_5fautoip_5fcoop_5ftries',['LWIP_DHCP_AUTOIP_COOP_TRIES',['../group__lwip__opts__autoip.html#ga4ff3f941b4c71a04b0c30fbee5b198c2',1,'opt.h']]], + ['lwip_5fdhcp_5fbootp_5ffile',['LWIP_DHCP_BOOTP_FILE',['../group__lwip__opts__dhcp.html#ga3c2983cbd228011dd3e18cb417e7e423',1,'opt.h']]], + ['lwip_5fdhcp_5fget_5fntp_5fsrv',['LWIP_DHCP_GET_NTP_SRV',['../group__lwip__opts__dhcp.html#ga2cc18315edcd5ffc083d1256f7d22a83',1,'opt.h']]], + ['lwip_5fdhcp_5fmax_5fdns_5fservers',['LWIP_DHCP_MAX_DNS_SERVERS',['../group__lwip__opts__dhcp.html#ga60ccc20fbb08be24b5d5f599dd47a6a6',1,'opt.h']]], + ['lwip_5fdhcp_5fmax_5fntp_5fservers',['LWIP_DHCP_MAX_NTP_SERVERS',['../group__lwip__opts__dhcp.html#ga9d014e3f7dc9e1e7c7decd8652ba65e2',1,'opt.h']]], + ['lwip_5fdns',['LWIP_DNS',['../group__lwip__opts__dns.html#ga98710dd81446b7cb2daac736bae6f646',1,'opt.h']]], + ['lwip_5fdns_5fapi_5fhostent_5fstorage',['LWIP_DNS_API_HOSTENT_STORAGE',['../netdb_8c.html#a768ab8ead892d6454709680340cd070e',1,'netdb.c']]], + ['lwip_5fdns_5fsecure',['LWIP_DNS_SECURE',['../group__lwip__opts__dns.html#ga8979c30dfbfde609d5139f80aabdfcc5',1,'opt.h']]], + ['lwip_5fdns_5fsupport_5fmdns_5fqueries',['LWIP_DNS_SUPPORT_MDNS_QUERIES',['../group__lwip__opts__dns.html#gafcbde5706a70ace562bd1f7d2d6f77cb',1,'opt.h']]], + ['lwip_5fethernet',['LWIP_ETHERNET',['../group__lwip__opts__arp.html#ga30e02dc217cc2995d0fd241d510c904f',1,'opt.h']]], + ['lwip_5fevent_5fapi',['LWIP_EVENT_API',['../group__lwip__opts__tcp.html#ga39f76e811117155be8525bb386ecddb7',1,'opt.h']]], + ['lwip_5ffcntl',['lwip_fcntl',['../sockets_8c.html#ae84296093574ec746f8f88321356388f',1,'lwip_fcntl(int s, int cmd, int val): sockets.c'],['../sockets_8h.html#ae84296093574ec746f8f88321356388f',1,'lwip_fcntl(int s, int cmd, int val): sockets.c']]], + ['lwip_5ffionread_5flinuxmode',['LWIP_FIONREAD_LINUXMODE',['../group__lwip__opts__socket.html#ga0543eea2abe390d0bdc843c33debd762',1,'opt.h']]], + ['lwip_5ffreeaddrinfo',['lwip_freeaddrinfo',['../netdb_8c.html#a7f65ff5982a0743849a644ef2cd15ef5',1,'lwip_freeaddrinfo(struct addrinfo *ai): netdb.c'],['../lwip_2netdb_8h.html#a7f65ff5982a0743849a644ef2cd15ef5',1,'lwip_freeaddrinfo(struct addrinfo *ai): netdb.c']]], + ['lwip_5fgetaddrinfo',['lwip_getaddrinfo',['../netdb_8c.html#af356989c172a51187e22b557f22d4165',1,'lwip_getaddrinfo(const char *nodename, const char *servname, const struct addrinfo *hints, struct addrinfo **res): netdb.c'],['../lwip_2netdb_8h.html#af356989c172a51187e22b557f22d4165',1,'lwip_getaddrinfo(const char *nodename, const char *servname, const struct addrinfo *hints, struct addrinfo **res): netdb.c']]], + ['lwip_5fgethostbyname',['lwip_gethostbyname',['../netdb_8c.html#a8adc6d35c068a073369edde71c678cbc',1,'lwip_gethostbyname(const char *name): netdb.c'],['../lwip_2netdb_8h.html#a8adc6d35c068a073369edde71c678cbc',1,'lwip_gethostbyname(const char *name): netdb.c']]], + ['lwip_5fgethostbyname_5fr',['lwip_gethostbyname_r',['../netdb_8c.html#afa229e90916f6c8d6308828f45351d2d',1,'lwip_gethostbyname_r(const char *name, struct hostent *ret, char *buf, size_t buflen, struct hostent **result, int *h_errnop): netdb.c'],['../lwip_2netdb_8h.html#afa229e90916f6c8d6308828f45351d2d',1,'lwip_gethostbyname_r(const char *name, struct hostent *ret, char *buf, size_t buflen, struct hostent **result, int *h_errnop): netdb.c']]], + ['lwip_5fhave_5floopif',['LWIP_HAVE_LOOPIF',['../group__lwip__opts__loop.html#gaa2b1f736373cd896e212644aa453fbaf',1,'opt.h']]], + ['lwip_5fhook_5fdhcp6_5fappend_5foptions',['LWIP_HOOK_DHCP6_APPEND_OPTIONS',['../group__lwip__opts__hooks.html#ga4068b3313e32f711ba016215fc2c886a',1,'opt.h']]], + ['lwip_5fhook_5fdhcp_5fappend_5foptions',['LWIP_HOOK_DHCP_APPEND_OPTIONS',['../group__lwip__opts__hooks.html#ga40e6c9aba06e66e5df1b4ca18329f9b4',1,'opt.h']]], + ['lwip_5fhook_5fdhcp_5fparse_5foption',['LWIP_HOOK_DHCP_PARSE_OPTION',['../group__lwip__opts__hooks.html#gafbbbc574863c0f88988936bd1434f2d2',1,'opt.h']]], + ['lwip_5fhook_5fetharp_5fget_5fgw',['LWIP_HOOK_ETHARP_GET_GW',['../group__lwip__opts__hooks.html#ga2b76f127325fd5ca8b80077a4b6160b1',1,'opt.h']]], + ['lwip_5fhook_5ffilename',['LWIP_HOOK_FILENAME',['../group__lwip__opts__hooks.html#ga11ac9d637cb6afc0a32e8da7f51d0c0d',1,'opt.h']]], + ['lwip_5fhook_5fip4_5fcanforward',['LWIP_HOOK_IP4_CANFORWARD',['../group__lwip__opts__hooks.html#gaed848a98dbb5c8856a27e379986ea70d',1,'opt.h']]], + ['lwip_5fhook_5fip4_5finput',['LWIP_HOOK_IP4_INPUT',['../group__lwip__opts__hooks.html#ga9124237c28e2f18f3b28d5be09e9ccb6',1,'opt.h']]], + ['lwip_5fhook_5fip4_5froute',['LWIP_HOOK_IP4_ROUTE',['../group__lwip__opts__hooks.html#ga5d1061ad722a73012a28dbaf0f169b70',1,'opt.h']]], + ['lwip_5fhook_5fip4_5froute_5fsrc',['LWIP_HOOK_IP4_ROUTE_SRC',['../group__lwip__opts__hooks.html#gaa410d9cbe1d4fa4c8a7f49af7b501024',1,'opt.h']]], + ['lwip_5fhook_5fip6_5finput',['LWIP_HOOK_IP6_INPUT',['../group__lwip__opts__hooks.html#gaccbdd3d0250f7176dcd799ca06007f20',1,'opt.h']]], + ['lwip_5fhook_5fip6_5froute',['LWIP_HOOK_IP6_ROUTE',['../group__lwip__opts__hooks.html#ga8245a4bc7ffb172e3bf32276f9d126ce',1,'opt.h']]], + ['lwip_5fhook_5fmemp_5favailable',['LWIP_HOOK_MEMP_AVAILABLE',['../group__lwip__opts__hooks.html#ga13e90672158221b40f8b12bf9d8b721f',1,'opt.h']]], + ['lwip_5fhook_5fnd6_5fget_5fgw',['LWIP_HOOK_ND6_GET_GW',['../group__lwip__opts__hooks.html#ga287544c3d74bc2a2d645bddbbc4fbdd0',1,'opt.h']]], + ['lwip_5fhook_5fnetconn_5fexternal_5fresolve',['LWIP_HOOK_NETCONN_EXTERNAL_RESOLVE',['../group__lwip__opts__hooks.html#gae35e4b7374868dc748b12dedb8f807e5',1,'opt.h']]], + ['lwip_5fhook_5fsockets_5fgetsockopt',['LWIP_HOOK_SOCKETS_GETSOCKOPT',['../group__lwip__opts__hooks.html#gabdaeb09ac9f441934e21a087544a1af1',1,'opt.h']]], + ['lwip_5fhook_5fsockets_5fsetsockopt',['LWIP_HOOK_SOCKETS_SETSOCKOPT',['../group__lwip__opts__hooks.html#ga14ea9210c09da4dd33bc85bd8a01b48a',1,'opt.h']]], + ['lwip_5fhook_5ftcp_5finpacket_5fpcb',['LWIP_HOOK_TCP_INPACKET_PCB',['../group__lwip__opts__hooks.html#gabed8b1cda4aba2d108fa62cdd74895a2',1,'opt.h']]], + ['lwip_5fhook_5ftcp_5fisn',['LWIP_HOOK_TCP_ISN',['../group__lwip__opts__hooks.html#ga078d203053911cf3af178392700386a4',1,'opt.h']]], + ['lwip_5fhook_5ftcp_5fout_5fadd_5ftcpopts',['LWIP_HOOK_TCP_OUT_ADD_TCPOPTS',['../group__lwip__opts__hooks.html#ga0ef31b749307b63c06633645d4de21f0',1,'opt.h']]], + ['lwip_5fhook_5ftcp_5fout_5ftcpopt_5flength',['LWIP_HOOK_TCP_OUT_TCPOPT_LENGTH',['../group__lwip__opts__hooks.html#ga31c0694abe4eedf3ff039b7073c2293f',1,'opt.h']]], + ['lwip_5fhook_5funknown_5feth_5fprotocol',['LWIP_HOOK_UNKNOWN_ETH_PROTOCOL',['../group__lwip__opts__hooks.html#ga6cc92f5101dd7a0420e18e1f2101abf4',1,'opt.h']]], + ['lwip_5fhook_5fvlan_5fcheck',['LWIP_HOOK_VLAN_CHECK',['../group__lwip__opts__hooks.html#ga2f020543772368f8f4355f50f24c86a9',1,'opt.h']]], + ['lwip_5fhook_5fvlan_5fset',['LWIP_HOOK_VLAN_SET',['../group__lwip__opts__hooks.html#ga2b6e450b4934b95df9b9a9d2b9a4d57e',1,'opt.h']]], + ['lwip_5fhtonl',['lwip_htonl',['../def_8c.html#a14f94347a5b9b9e3602705b75b7ae524',1,'lwip_htonl(u32_t n): def.c'],['../def_8h.html#a95e391e860b519b4f4f5c4979c9c9a37',1,'lwip_htonl(u32_t x): def.c']]], + ['lwip_5fhtons',['lwip_htons',['../def_8c.html#ad637280639de4066392e6b5614fa3e56',1,'lwip_htons(u16_t n): def.c'],['../def_8h.html#ac49eb25570806fb51c329d4f86302cc2',1,'lwip_htons(u16_t x): def.c']]], + ['lwip_5fhttpc_5fhave_5ffile_5fio',['LWIP_HTTPC_HAVE_FILE_IO',['../group__httpc.html#ga055b9a8bf8f4e2c18c621471773fa66c',1,'http_client.h']]], + ['lwip_5fhttpd_5fabort_5fon_5fclose_5fmem_5ferror',['LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR',['../group__httpd__opts.html#ga0ff20ebc4ab50d4aa6151c3241dacb3a',1,'httpd_opts.h']]], + ['lwip_5fhttpd_5fcgi',['LWIP_HTTPD_CGI',['../group__httpd__opts.html#gafb28f7c5fee75f013a199d427452372c',1,'httpd_opts.h']]], + ['lwip_5fhttpd_5fcgi_5fssi',['LWIP_HTTPD_CGI_SSI',['../group__httpd__opts.html#gad3960bf65731bd0f1341867664afe860',1,'httpd_opts.h']]], + ['lwip_5fhttpd_5fcustom_5ffiles',['LWIP_HTTPD_CUSTOM_FILES',['../group__httpd__opts.html#gadadb70f5663cdf004bf879e3b5d326bd',1,'httpd_opts.h']]], + ['lwip_5fhttpd_5fdynamic_5ffile_5fread',['LWIP_HTTPD_DYNAMIC_FILE_READ',['../group__httpd__opts.html#ga1ee8d7c975c7e3d1c9d9dd9b43660c79',1,'httpd_opts.h']]], + ['lwip_5fhttpd_5fdynamic_5fheaders',['LWIP_HTTPD_DYNAMIC_HEADERS',['../group__httpd__opts.html#ga75932fc5eeb9abeddfdaf8413574c6d7',1,'httpd_opts.h']]], + ['lwip_5fhttpd_5ffile_5fstate',['LWIP_HTTPD_FILE_STATE',['../group__httpd__opts.html#gaedd0fa3d356170d8ca3557acb410fd7c',1,'httpd_opts.h']]], + ['lwip_5fhttpd_5ffs_5fasync_5fread',['LWIP_HTTPD_FS_ASYNC_READ',['../group__httpd__opts.html#ga51cb673cb5cc362acc409f23c1e0a331',1,'httpd_opts.h']]], + ['lwip_5fhttpd_5fkill_5fold_5fon_5fconnections_5fexceeded',['LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED',['../group__httpd__opts.html#ga0d5074965efd40786182287895feb691',1,'httpd_opts.h']]], + ['lwip_5fhttpd_5fmax_5freq_5flength',['LWIP_HTTPD_MAX_REQ_LENGTH',['../group__httpd__opts.html#ga30dc71c59f3904df7daaf293f74f91f8',1,'httpd_opts.h']]], + ['lwip_5fhttpd_5fmax_5frequest_5furi_5flen',['LWIP_HTTPD_MAX_REQUEST_URI_LEN',['../group__httpd__opts.html#gaca4ef53e7a9abbd8d4bd8bc1ba7b486a',1,'httpd_opts.h']]], + ['lwip_5fhttpd_5fomit_5fheader_5ffor_5fextensionless_5furi',['LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI',['../group__httpd__opts.html#ga82a030ce2ecdcf741b02b7be41c012b3',1,'httpd_opts.h']]], + ['lwip_5fhttpd_5fpost_5fmax_5fresponse_5furi_5flen',['LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN',['../group__httpd__opts.html#gaa27f7c5450392d10aeed033ca878cce3',1,'httpd_opts.h']]], + ['lwip_5fhttpd_5freq_5fbufsize',['LWIP_HTTPD_REQ_BUFSIZE',['../group__httpd__opts.html#ga8dbe61a35228da0e7365a088197191b8',1,'httpd_opts.h']]], + ['lwip_5fhttpd_5freq_5fqueuelen',['LWIP_HTTPD_REQ_QUEUELEN',['../group__httpd__opts.html#gaef23f4e3525aa5dd0ecbce9b5e16d4e0',1,'httpd_opts.h']]], + ['lwip_5fhttpd_5fssi',['LWIP_HTTPD_SSI',['../group__httpd__opts.html#gacb70e0cdd30a940f8bce681c6cc63949',1,'httpd_opts.h']]], + ['lwip_5fhttpd_5fssi_5fby_5ffile_5fextension',['LWIP_HTTPD_SSI_BY_FILE_EXTENSION',['../group__httpd__opts.html#gaba2d4cfe4c1f5bdbe37b339084a7d466',1,'httpd_opts.h']]], + ['lwip_5fhttpd_5fssi_5finclude_5ftag',['LWIP_HTTPD_SSI_INCLUDE_TAG',['../group__httpd__opts.html#ga975961a6d22d1a077118fb85dfec809a',1,'httpd_opts.h']]], + ['lwip_5fhttpd_5fssi_5fmultipart',['LWIP_HTTPD_SSI_MULTIPART',['../group__httpd__opts.html#ga3167d52d20cf90857e2c809b92458bf0',1,'httpd_opts.h']]], + ['lwip_5fhttpd_5fssi_5fraw',['LWIP_HTTPD_SSI_RAW',['../group__httpd__opts.html#ga520858778b84d4d2fa125294c0f119e5',1,'httpd_opts.h']]], + ['lwip_5fhttpd_5fsupport_5f11_5fkeepalive',['LWIP_HTTPD_SUPPORT_11_KEEPALIVE',['../group__httpd__opts.html#ga6f78487bc829f7f98274f1264020045e',1,'httpd_opts.h']]], + ['lwip_5fhttpd_5fsupport_5fextstatus',['LWIP_HTTPD_SUPPORT_EXTSTATUS',['../group__httpd__opts.html#ga85ebddbc4236b1e31bfa68fa163f9b07',1,'httpd_opts.h']]], + ['lwip_5fhttpd_5fsupport_5fpost',['LWIP_HTTPD_SUPPORT_POST',['../group__httpd__opts.html#gacbea06ce33933e3ef2f2f1834a21cc2c',1,'httpd_opts.h']]], + ['lwip_5fhttpd_5fsupport_5frequestlist',['LWIP_HTTPD_SUPPORT_REQUESTLIST',['../group__httpd__opts.html#ga0bd0f9a89423fb3bbfea4e4c6141ae43',1,'httpd_opts.h']]], + ['lwip_5fhttpd_5fsupport_5fv09',['LWIP_HTTPD_SUPPORT_V09',['../group__httpd__opts.html#ga7a8f4ab787b6fb8482c8a36c9fd0c7dd',1,'httpd_opts.h']]], + ['lwip_5fhttpd_5ftiming',['LWIP_HTTPD_TIMING',['../group__httpd__opts.html#ga054db3f080715942967969c6ae30bb6a',1,'httpd_opts.h']]], + ['lwip_5fiana_5fhwtype',['lwip_iana_hwtype',['../group__iana.html#ga3d2bbfcb56c8adf3be8c8d12868cecfe',1,'iana.h']]], + ['lwip_5fiana_5fhwtype_5fethernet',['LWIP_IANA_HWTYPE_ETHERNET',['../group__iana.html#gga3d2bbfcb56c8adf3be8c8d12868cecfea89e82e6ac55811bb26fe66ec029f2a0c',1,'iana.h']]], + ['lwip_5fiana_5fport_5fdhcp_5fclient',['LWIP_IANA_PORT_DHCP_CLIENT',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0a9fcae1f16758e1ac35dab343fc897f40',1,'iana.h']]], + ['lwip_5fiana_5fport_5fdhcp_5fserver',['LWIP_IANA_PORT_DHCP_SERVER',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0ac70ae96c985cf3660e26aa496094916d',1,'iana.h']]], + ['lwip_5fiana_5fport_5fhttp',['LWIP_IANA_PORT_HTTP',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0a1c665cb8e57dff577f4966493c15b618',1,'iana.h']]], + ['lwip_5fiana_5fport_5fhttps',['LWIP_IANA_PORT_HTTPS',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0ad07fb8ff2b18006405d904b5b3810c88',1,'iana.h']]], + ['lwip_5fiana_5fport_5fmdns',['LWIP_IANA_PORT_MDNS',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0a839da325f45916d7b27d53d5e5e97dc6',1,'iana.h']]], + ['lwip_5fiana_5fport_5fmqtt',['LWIP_IANA_PORT_MQTT',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0a172d486d82c552ef3540cf8d61b14b22',1,'iana.h']]], + ['lwip_5fiana_5fport_5fnetbios',['LWIP_IANA_PORT_NETBIOS',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0ae1cf6eaab024b31aff5bf407d38e0ede',1,'iana.h']]], + ['lwip_5fiana_5fport_5fnumber',['lwip_iana_port_number',['../group__iana.html#gac9396d90585e49e9a287179bf5aa9ba0',1,'iana.h']]], + ['lwip_5fiana_5fport_5fsecure_5fmqtt',['LWIP_IANA_PORT_SECURE_MQTT',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0ab833e9dc7646bd7affde45691bc66601',1,'iana.h']]], + ['lwip_5fiana_5fport_5fsmtp',['LWIP_IANA_PORT_SMTP',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0ae2645895203ca3c54005afad053a813c',1,'iana.h']]], + ['lwip_5fiana_5fport_5fsmtps',['LWIP_IANA_PORT_SMTPS',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0a88f8872246977c6e24c617266ada1a3b',1,'iana.h']]], + ['lwip_5fiana_5fport_5fsnmp',['LWIP_IANA_PORT_SNMP',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0aeb10a37f0c48e053b138f65b843c45d3',1,'iana.h']]], + ['lwip_5fiana_5fport_5fsnmp_5ftrap',['LWIP_IANA_PORT_SNMP_TRAP',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0aff60c0d3e8eca210b7e4faca3491f4a8',1,'iana.h']]], + ['lwip_5fiana_5fport_5fsntp',['LWIP_IANA_PORT_SNTP',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0a79c377ce09e05cd4410a8865d41b3efb',1,'iana.h']]], + ['lwip_5fiana_5fport_5ftftp',['LWIP_IANA_PORT_TFTP',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0a7b318226afef92e019b67227acf94050',1,'iana.h']]], + ['lwip_5ficmp',['LWIP_ICMP',['../group__lwip__opts__icmp.html#gae4d45345c3ab8e5a355fda1d8d24fca6',1,'opt.h']]], + ['lwip_5ficmp6',['LWIP_ICMP6',['../group__lwip__opts__icmp6.html#ga65ac8bcbad242cba3a2b557e1574b21f',1,'opt.h']]], + ['lwip_5ficmp6_5fdatasize',['LWIP_ICMP6_DATASIZE',['../group__lwip__opts__icmp6.html#gaa88c55e37e5d7b865b91a9399313bbbf',1,'opt.h']]], + ['lwip_5ficmp6_5fhl',['LWIP_ICMP6_HL',['../group__lwip__opts__icmp6.html#ga82193577b4045e1ac1533c4341a2bd79',1,'opt.h']]], + ['lwip_5ficmp_5fecho_5fcheck_5finput_5fpbuf_5flen',['LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN',['../icmp_8c.html#a6b9fd6be0a7dcf301bc86b9e96e3857e',1,'icmp.c']]], + ['lwip_5fieee_5feth_5ftype',['lwip_ieee_eth_type',['../group__ieee.html#gab3a7b97666b100584972d158acbbd1f4',1,'ieee.h']]], + ['lwip_5fif_5findextoname',['lwip_if_indextoname',['../group__if__api.html#gac68ad9ef70eb869525e0a1cc818f056b',1,'lwip_if_indextoname(unsigned int ifindex, char *ifname): if_api.c'],['../group__if__api.html#gac68ad9ef70eb869525e0a1cc818f056b',1,'lwip_if_indextoname(unsigned int ifindex, char *ifname): if_api.c']]], + ['lwip_5fif_5fnametoindex',['lwip_if_nametoindex',['../group__if__api.html#ga76d07962b9d19c3c6f578de780e2c3be',1,'lwip_if_nametoindex(const char *ifname): if_api.c'],['../group__if__api.html#ga76d07962b9d19c3c6f578de780e2c3be',1,'lwip_if_nametoindex(const char *ifname): if_api.c']]], + ['lwip_5figmp',['LWIP_IGMP',['../group__lwip__opts__igmp.html#gadaf25915ae1fd69c0943ef68cbb38923',1,'opt.h']]], + ['lwip_5finit',['lwip_init',['../group__lwip__nosys.html#ga0c1a18439524d2f4a5e51d25c0ca2ce9',1,'lwip_init(void): init.c'],['../group__lwip__nosys.html#ga0c1a18439524d2f4a5e51d25c0ca2ce9',1,'lwip_init(void): init.c']]], + ['lwip_5finline_5fip_5fchksum',['LWIP_INLINE_IP_CHKSUM',['../ip4_8c.html#a9652ce304f893f6245c6ba9daea0a30f',1,'ip4.c']]], + ['lwip_5fip_5faddr_5ftype',['lwip_ip_addr_type',['../group__ipaddr.html#gaf2142f0dfdcc938e2db16aa745ed585c',1,'ip_addr.h']]], + ['lwip_5fip_5fcheck_5fpbuf_5fref_5fcount_5ffor_5ftx',['LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX',['../ip_8h.html#a355679dba1c0d8ef07ce3abcd28e3063',1,'ip.h']]], + ['lwip_5fipv4',['LWIP_IPV4',['../group__lwip__opts__ipv4.html#ga429e811a80ebb5157e14a854870c4410',1,'opt.h']]], + ['lwip_5fipv6',['LWIP_IPV6',['../group__lwip__opts__ipv6.html#ga872e3bb3fe2212156d66b18fccc9643f',1,'opt.h']]], + ['lwip_5fipv6_5faddress_5flifetimes',['LWIP_IPV6_ADDRESS_LIFETIMES',['../group__lwip__opts__ipv6.html#ga2c0127fca1073ad3f0a1e53f00ea8858',1,'opt.h']]], + ['lwip_5fipv6_5fautoconfig',['LWIP_IPV6_AUTOCONFIG',['../group__lwip__opts__ipv6.html#ga580039bf2baf49fcb9e504e5d2b40a03',1,'opt.h']]], + ['lwip_5fipv6_5fdhcp6',['LWIP_IPV6_DHCP6',['../group__lwip__opts__dhcpv6.html#ga1ba67b6665026ec0c688dc4b0df047a6',1,'opt.h']]], + ['lwip_5fipv6_5fdhcp6_5fstateful',['LWIP_IPV6_DHCP6_STATEFUL',['../group__lwip__opts__dhcpv6.html#ga3fc9dbe8feae61621cac4952ac28e155',1,'opt.h']]], + ['lwip_5fipv6_5fdhcp6_5fstateless',['LWIP_IPV6_DHCP6_STATELESS',['../group__lwip__opts__dhcpv6.html#ga8d6bab14d580d2136430319aab6d7930',1,'opt.h']]], + ['lwip_5fipv6_5fdup_5fdetect_5fattempts',['LWIP_IPV6_DUP_DETECT_ATTEMPTS',['../group__lwip__opts__ipv6.html#gad8489522d34f37e42b4001bab3781bcb',1,'opt.h']]], + ['lwip_5fipv6_5fforward',['LWIP_IPV6_FORWARD',['../group__lwip__opts__ipv6.html#gac96c5802de6c75dd62ab38cff6d16a32',1,'opt.h']]], + ['lwip_5fipv6_5ffrag',['LWIP_IPV6_FRAG',['../group__lwip__opts__ipv6.html#ga9ab6269f3087f6d9f7b2c7181ef043c3',1,'opt.h']]], + ['lwip_5fipv6_5fmld',['LWIP_IPV6_MLD',['../group__lwip__opts__mld6.html#ga44d8f24eaebbc50221ac1336212a3528',1,'opt.h']]], + ['lwip_5fipv6_5fnum_5faddresses',['LWIP_IPV6_NUM_ADDRESSES',['../group__lwip__opts__ipv6.html#ga16c1b672604bfb0a66a6aeeb854589d3',1,'opt.h']]], + ['lwip_5fipv6_5freass',['LWIP_IPV6_REASS',['../group__lwip__opts__ipv6.html#gad0ef160d72e63b02c5e875b06ec53864',1,'opt.h']]], + ['lwip_5fipv6_5fscope_5ftype',['lwip_ipv6_scope_type',['../group__ip6__zones.html#ga1993c4b6a297b6e92d80a9ce46ddedfe',1,'ip6_zone.h']]], + ['lwip_5fipv6_5fscopes',['LWIP_IPV6_SCOPES',['../group__lwip__opts__ipv6.html#ga91d1e630059df3b3a296e2b6ff7aead5',1,'opt.h']]], + ['lwip_5fipv6_5fscopes_5fdebug',['LWIP_IPV6_SCOPES_DEBUG',['../group__lwip__opts__ipv6.html#ga623ef29d27d98fb7be8732730a5ddf4b',1,'opt.h']]], + ['lwip_5fipv6_5fsend_5frouter_5fsolicit',['LWIP_IPV6_SEND_ROUTER_SOLICIT',['../group__lwip__opts__ipv6.html#ga273ed2e1a4e6a43713a0e4a06a34ee5c',1,'opt.h']]], + ['lwip_5fitoa',['lwip_itoa',['../group__sys__nonstandard.html#gaf15b4fbaaae5bb7f6da4301f3f979284',1,'lwip_itoa(char *result, size_t bufsize, int number): def.c'],['../group__sys__nonstandard.html#gaf15b4fbaaae5bb7f6da4301f3f979284',1,'lwip_itoa(char *result, size_t bufsize, int number): def.c']]], + ['lwip_5flisten',['lwip_listen',['../sockets_8c.html#abee6ee286147cf334a1ba19f19b2e08b',1,'lwip_listen(int s, int backlog): sockets.c'],['../sockets_8h.html#abee6ee286147cf334a1ba19f19b2e08b',1,'lwip_listen(int s, int backlog): sockets.c']]], + ['lwip_5floopback_5fmax_5fpbufs',['LWIP_LOOPBACK_MAX_PBUFS',['../group__lwip__opts__loop.html#gaacc3ad5d0a771d45fb0a3e3a09b1dbea',1,'opt.h']]], + ['lwip_5floopif_5fmulticast',['LWIP_LOOPIF_MULTICAST',['../group__lwip__opts__loop.html#ga10a878b390c2fbe421d82502001c7300',1,'opt.h']]], + ['lwip_5flowpan6_5f802154_5fdebug',['LWIP_LOWPAN6_802154_DEBUG',['../lowpan6__opts_8h.html#acf9a44be56d5dca9e45f644571d66f58',1,'lowpan6_opts.h']]], + ['lwip_5flowpan6_5fdebug',['LWIP_LOWPAN6_DEBUG',['../lowpan6__opts_8h.html#ae90ebb32999c6df5cc83705e133e1754',1,'lowpan6_opts.h']]], + ['lwip_5flowpan6_5fdecompression_5fdebug',['LWIP_LOWPAN6_DECOMPRESSION_DEBUG',['../lowpan6__opts_8h.html#a7f4db0bd3dbe36a19efbd24cd8b7fcf0',1,'lowpan6_opts.h']]], + ['lwip_5flowpan6_5fip_5fcompressed_5fdebug',['LWIP_LOWPAN6_IP_COMPRESSED_DEBUG',['../lowpan6__opts_8h.html#a231bc758484376dfd2ded6931c462df8',1,'lowpan6_opts.h']]], + ['lwip_5fmakeu32',['LWIP_MAKEU32',['../def_8h.html#acf56d3da92a0a7a8a62a617e793e948c',1,'def.h']]], + ['lwip_5fmark_5ftcpip_5fthread',['LWIP_MARK_TCPIP_THREAD',['../group__lwip__opts__lock.html#gab97d014f7ecf3b20f9d5abc2d0a79a3e',1,'opt.h']]], + ['lwip_5fmem_5falign',['LWIP_MEM_ALIGN',['../group__compiler__abstraction.html#gaa8e8724eb1c220cbbb90de9e175ce1dc',1,'arch.h']]], + ['lwip_5fmem_5falign_5fbuffer',['LWIP_MEM_ALIGN_BUFFER',['../group__compiler__abstraction.html#ga25591dcb72fccc7b5dc46fbc1959694e',1,'arch.h']]], + ['lwip_5fmem_5falign_5fsize',['LWIP_MEM_ALIGN_SIZE',['../group__compiler__abstraction.html#gaef204be511fd32f681b55abc08e9ae18',1,'arch.h']]], + ['lwip_5fmempool_5falloc',['LWIP_MEMPOOL_ALLOC',['../group__mempool.html#ga5e2498f6c17746c1fe7153de5f7f275a',1,'memp.h']]], + ['lwip_5fmempool_5fdeclare',['LWIP_MEMPOOL_DECLARE',['../group__mempool.html#ga5b1fb3ce7942432d87cc948b1c5ed6cb',1,'memp.h']]], + ['lwip_5fmempool_5ffree',['LWIP_MEMPOOL_FREE',['../group__mempool.html#gaa43d114dd702fbd8f1db18474ea93a04',1,'memp.h']]], + ['lwip_5fmempool_5finit',['LWIP_MEMPOOL_INIT',['../group__mempool.html#ga60b51c06d276f525b35d8b7abd4dcb41',1,'memp.h']]], + ['lwip_5fmempool_5fprototype',['LWIP_MEMPOOL_PROTOTYPE',['../group__mempool.html#ga92fc8c29d0e2654f2a2ecc43b2b7fb13',1,'memp.h']]], + ['lwip_5fmib2_5fcallbacks',['LWIP_MIB2_CALLBACKS',['../group__lwip__opts__mib2.html#gad84d6a781880cec19a1ef4b2339fea29',1,'opt.h']]], + ['lwip_5fmpu_5fcompatible',['LWIP_MPU_COMPATIBLE',['../group__lwip__opts__lock.html#gae9afcefa5d233372abb9413188dd98c9',1,'opt.h']]], + ['lwip_5fmulticast_5fping',['LWIP_MULTICAST_PING',['../group__lwip__opts__icmp.html#gaf77baf0a83b04312eab4c006ef229661',1,'opt.h']]], + ['lwip_5fmulticast_5ftx_5foptions',['LWIP_MULTICAST_TX_OPTIONS',['../group__lwip__opts__multicast.html#gab8d7d53247cc62caa76f54b2c5a5df30',1,'opt.h']]], + ['lwip_5fnd6_5fallow_5fra_5fupdates',['LWIP_ND6_ALLOW_RA_UPDATES',['../group__lwip__opts__nd6.html#gad35d10353ac7c7d2c8d4b83788cdc6d9',1,'opt.h']]], + ['lwip_5fnd6_5fdelay_5ffirst_5fprobe_5ftime',['LWIP_ND6_DELAY_FIRST_PROBE_TIME',['../group__lwip__opts__nd6.html#ga315bd6d4a9d185766dfc3253cd9d7715',1,'opt.h']]], + ['lwip_5fnd6_5fmax_5fanycast_5fdelay_5ftime',['LWIP_ND6_MAX_ANYCAST_DELAY_TIME',['../group__lwip__opts__nd6.html#ga960b8973df083fad53ae0eaa79f8c4df',1,'opt.h']]], + ['lwip_5fnd6_5fmax_5fmulticast_5fsolicit',['LWIP_ND6_MAX_MULTICAST_SOLICIT',['../group__lwip__opts__nd6.html#ga980909018aed54adc10dd68be3572b30',1,'opt.h']]], + ['lwip_5fnd6_5fmax_5fneighbor_5fadvertisement',['LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT',['../group__lwip__opts__nd6.html#ga86ab0cac87cdc7aeff09384ddbaaba2a',1,'opt.h']]], + ['lwip_5fnd6_5fmax_5funicast_5fsolicit',['LWIP_ND6_MAX_UNICAST_SOLICIT',['../group__lwip__opts__nd6.html#gafa6f4c2d2c259ab0895fa03a6f08c691',1,'opt.h']]], + ['lwip_5fnd6_5fnum_5fdestinations',['LWIP_ND6_NUM_DESTINATIONS',['../group__lwip__opts__nd6.html#gacad118b1ae886e80137a1d4f0fb19672',1,'opt.h']]], + ['lwip_5fnd6_5fnum_5fneighbors',['LWIP_ND6_NUM_NEIGHBORS',['../group__lwip__opts__nd6.html#gab2fe15bdb4e0a41f295eb5577b11ad16',1,'opt.h']]], + ['lwip_5fnd6_5fnum_5fprefixes',['LWIP_ND6_NUM_PREFIXES',['../group__lwip__opts__nd6.html#gad9cc576b5951f1b5e1c2b0d0bb831d9a',1,'opt.h']]], + ['lwip_5fnd6_5fnum_5frouters',['LWIP_ND6_NUM_ROUTERS',['../group__lwip__opts__nd6.html#ga75e81a96148f266c8fad8c0bcab2f36a',1,'opt.h']]], + ['lwip_5fnd6_5fqueueing',['LWIP_ND6_QUEUEING',['../group__lwip__opts__nd6.html#ga0757a3c1b5d1563ad2d77228e1d8a60f',1,'opt.h']]], + ['lwip_5fnd6_5frdnss_5fmax_5fdns_5fservers',['LWIP_ND6_RDNSS_MAX_DNS_SERVERS',['../group__lwip__opts__nd6.html#gaea4d829c0b52cc6cc28925eee89a7429',1,'opt.h']]], + ['lwip_5fnd6_5freachable_5ftime',['LWIP_ND6_REACHABLE_TIME',['../group__lwip__opts__nd6.html#ga269db9d61cdfc2fd3bc7b12c56261c74',1,'opt.h']]], + ['lwip_5fnd6_5fretrans_5ftimer',['LWIP_ND6_RETRANS_TIMER',['../group__lwip__opts__nd6.html#ga461abcbeef1d236d1f3201827dd28ad9',1,'opt.h']]], + ['lwip_5fnd6_5ftcp_5freachability_5fhints',['LWIP_ND6_TCP_REACHABILITY_HINTS',['../group__lwip__opts__nd6.html#ga9d7cb6fd447ef0f6726f565e2c7509c4',1,'opt.h']]], + ['lwip_5fnetbios_5frespond_5fname_5fquery',['LWIP_NETBIOS_RESPOND_NAME_QUERY',['../group__netbiosns__opts.html#gaa9dec8fc3dee5e72fbe9b854437bce84',1,'netbiosns_opts.h']]], + ['lwip_5fnetbuf_5frecvinfo',['LWIP_NETBUF_RECVINFO',['../group__lwip__opts__udp.html#ga72021505969c5ce29e972486d7794baa',1,'opt.h']]], + ['lwip_5fnetconn',['LWIP_NETCONN',['../group__lwip__opts__netconn.html#ga478041b8544461258f6961bf0f3c1a77',1,'opt.h']]], + ['lwip_5fnetconn_5fdo_5faccepted',['lwip_netconn_do_accepted',['../api__msg_8c.html#afc455a5f63fa3bc85022e34861a2fea5',1,'lwip_netconn_do_accepted(void *m): api_msg.c'],['../api__msg_8h.html#afc455a5f63fa3bc85022e34861a2fea5',1,'lwip_netconn_do_accepted(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5fbind',['lwip_netconn_do_bind',['../api__msg_8c.html#aa8e265922cda9f7fd54bf39e4ecf3768',1,'lwip_netconn_do_bind(void *m): api_msg.c'],['../api__msg_8h.html#aa8e265922cda9f7fd54bf39e4ecf3768',1,'lwip_netconn_do_bind(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5fbind_5fif',['lwip_netconn_do_bind_if',['../api__msg_8c.html#af4fed475f06818552ffefc8a1eda6605',1,'lwip_netconn_do_bind_if(void *m): api_msg.c'],['../api__msg_8h.html#af4fed475f06818552ffefc8a1eda6605',1,'lwip_netconn_do_bind_if(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5fclose',['lwip_netconn_do_close',['../api__msg_8c.html#aff73e0fcdc13c7cb97a4bfbd71a4347d',1,'lwip_netconn_do_close(void *m): api_msg.c'],['../api__msg_8h.html#aff73e0fcdc13c7cb97a4bfbd71a4347d',1,'lwip_netconn_do_close(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5fconnect',['lwip_netconn_do_connect',['../api__msg_8c.html#a6f18f57eeda7b0596110930e696f9902',1,'lwip_netconn_do_connect(void *m): api_msg.c'],['../api__msg_8h.html#a6f18f57eeda7b0596110930e696f9902',1,'lwip_netconn_do_connect(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5fdelconn',['lwip_netconn_do_delconn',['../api__msg_8c.html#a9e77da8492e93d570bc1ec37f3c91d59',1,'lwip_netconn_do_delconn(void *m): api_msg.c'],['../api__msg_8h.html#a9e77da8492e93d570bc1ec37f3c91d59',1,'lwip_netconn_do_delconn(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5fdisconnect',['lwip_netconn_do_disconnect',['../api__msg_8c.html#adec8a5ddbcbdacba099c630c8310d34a',1,'lwip_netconn_do_disconnect(void *m): api_msg.c'],['../api__msg_8h.html#adec8a5ddbcbdacba099c630c8310d34a',1,'lwip_netconn_do_disconnect(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5fgetaddr',['lwip_netconn_do_getaddr',['../api__msg_8c.html#af33f432db6e3f111d4ee5876089e4163',1,'lwip_netconn_do_getaddr(void *m): api_msg.c'],['../api__msg_8h.html#af33f432db6e3f111d4ee5876089e4163',1,'lwip_netconn_do_getaddr(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5fgethostbyname',['lwip_netconn_do_gethostbyname',['../api__msg_8c.html#afd3802b2f12e27928ccc0f759b887d61',1,'lwip_netconn_do_gethostbyname(void *arg): api_msg.c'],['../api__msg_8h.html#afd3802b2f12e27928ccc0f759b887d61',1,'lwip_netconn_do_gethostbyname(void *arg): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5fjoin_5fleave_5fgroup',['lwip_netconn_do_join_leave_group',['../api__msg_8c.html#a7402b52416828906a5679828cce37546',1,'lwip_netconn_do_join_leave_group(void *m): api_msg.c'],['../api__msg_8h.html#a7402b52416828906a5679828cce37546',1,'lwip_netconn_do_join_leave_group(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5fjoin_5fleave_5fgroup_5fnetif',['lwip_netconn_do_join_leave_group_netif',['../api__msg_8c.html#aacc47257c0a5aa5eb107da0cfc699722',1,'lwip_netconn_do_join_leave_group_netif(void *m): api_msg.c'],['../api__msg_8h.html#aacc47257c0a5aa5eb107da0cfc699722',1,'lwip_netconn_do_join_leave_group_netif(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5flisten',['lwip_netconn_do_listen',['../api__msg_8c.html#aa7d753d86818bfd77c1d73dab8dc943f',1,'lwip_netconn_do_listen(void *m): api_msg.c'],['../api__msg_8h.html#aa7d753d86818bfd77c1d73dab8dc943f',1,'lwip_netconn_do_listen(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5fnewconn',['lwip_netconn_do_newconn',['../api__msg_8c.html#abc6e1a4f8dd4640ab00eae4bbfdb7236',1,'lwip_netconn_do_newconn(void *m): api_msg.c'],['../api__msg_8h.html#abc6e1a4f8dd4640ab00eae4bbfdb7236',1,'lwip_netconn_do_newconn(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5frecv',['lwip_netconn_do_recv',['../api__msg_8c.html#ab6ae6036baf5c8fef22228ceb5e3ff9f',1,'lwip_netconn_do_recv(void *m): api_msg.c'],['../api__msg_8h.html#ab6ae6036baf5c8fef22228ceb5e3ff9f',1,'lwip_netconn_do_recv(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5fsend',['lwip_netconn_do_send',['../api__msg_8c.html#ac714bdd3d57e34f0a6517a469d80df6c',1,'lwip_netconn_do_send(void *m): api_msg.c'],['../api__msg_8h.html#ac714bdd3d57e34f0a6517a469d80df6c',1,'lwip_netconn_do_send(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5fwrite',['lwip_netconn_do_write',['../api__msg_8c.html#aca4545a471ead1bc673ea93fe85f7e5c',1,'lwip_netconn_do_write(void *m): api_msg.c'],['../api__msg_8h.html#aca4545a471ead1bc673ea93fe85f7e5c',1,'lwip_netconn_do_write(void *m): api_msg.c']]], + ['lwip_5fnetconn_5ffullduplex',['LWIP_NETCONN_FULLDUPLEX',['../group__lwip__opts__netconn.html#ga7bfe8487a3abffdd9d6730977d22c406',1,'opt.h']]], + ['lwip_5fnetconn_5fsem_5fper_5fthread',['LWIP_NETCONN_SEM_PER_THREAD',['../group__lwip__opts__netconn.html#ga2543345adf7d2c307df78a54ac2ba8c4',1,'opt.h']]], + ['lwip_5fnetif_5fapi',['LWIP_NETIF_API',['../group__lwip__opts__netif.html#gadd45fb65f2d0e6de5a0d14ff9e101b77',1,'opt.h']]], + ['lwip_5fnetif_5fext_5fstatus_5fcallback',['LWIP_NETIF_EXT_STATUS_CALLBACK',['../group__lwip__opts__netif.html#ga090482867ba04d442ab5b8ad745c0e1e',1,'opt.h']]], + ['lwip_5fnetif_5fhostname',['LWIP_NETIF_HOSTNAME',['../group__lwip__opts__netif.html#gaa714dbfa66822ec4c6111bdb8cf753c1',1,'opt.h']]], + ['lwip_5fnetif_5fhwaddrhint',['LWIP_NETIF_HWADDRHINT',['../group__lwip__opts__netif.html#gad1d5e878d94b56ba687cef69be936ad9',1,'opt.h']]], + ['lwip_5fnetif_5flink_5fcallback',['LWIP_NETIF_LINK_CALLBACK',['../group__lwip__opts__netif.html#ga1a446932dd927cc4136ba654c13bb97b',1,'opt.h']]], + ['lwip_5fnetif_5floopback',['LWIP_NETIF_LOOPBACK',['../group__lwip__opts__loop.html#ga724a0ea765d5a47d026d529725f31c01',1,'opt.h']]], + ['lwip_5fnetif_5floopback_5fmultithreading',['LWIP_NETIF_LOOPBACK_MULTITHREADING',['../group__lwip__opts__loop.html#gaa28d13ddd5281b1912276991e7ea58c5',1,'opt.h']]], + ['lwip_5fnetif_5fremove_5fcallback',['LWIP_NETIF_REMOVE_CALLBACK',['../group__lwip__opts__netif.html#ga9c942c2e9655b06d4f73c630d30f60bf',1,'opt.h']]], + ['lwip_5fnetif_5fstatus_5fcallback',['LWIP_NETIF_STATUS_CALLBACK',['../group__lwip__opts__netif.html#gaffb97d89516c38d3fcb9e44e5d707f36',1,'opt.h']]], + ['lwip_5fnetif_5ftx_5fsingle_5fpbuf',['LWIP_NETIF_TX_SINGLE_PBUF',['../group__lwip__opts__netif.html#gabafb9f64a80e51b56c0abbcfc1f7e04e',1,'opt.h']]], + ['lwip_5fno_5fctype_5fh',['LWIP_NO_CTYPE_H',['../group__compiler__abstraction.html#ga6871ce1e92ae09cdad39a9b230a3a800',1,'arch.h']]], + ['lwip_5fno_5finttypes_5fh',['LWIP_NO_INTTYPES_H',['../group__compiler__abstraction.html#ga5bf52d6f2729d0c8afd365f69d7d4373',1,'arch.h']]], + ['lwip_5fno_5flimits_5fh',['LWIP_NO_LIMITS_H',['../group__compiler__abstraction.html#gade9c8513419a799cd78a07ae894bb805',1,'arch.h']]], + ['lwip_5fno_5fstddef_5fh',['LWIP_NO_STDDEF_H',['../group__compiler__abstraction.html#ga53954d507c09e521ec0d44a2450bb89d',1,'arch.h']]], + ['lwip_5fno_5fstdint_5fh',['LWIP_NO_STDINT_H',['../group__compiler__abstraction.html#ga122c754db96ecad23bc6f4541d6360c1',1,'arch.h']]], + ['lwip_5fnoassert',['LWIP_NOASSERT',['../group__lwip__assertions.html#ga71b7787802abbfc2218fb1f39f948a41',1,'debug.h']]], + ['lwip_5fnsc_5fipv4_5faddress_5fchanged',['LWIP_NSC_IPV4_ADDRESS_CHANGED',['../netif_8h.html#aeb4e790199b02469aa04c044ef5cfa32',1,'netif.h']]], + ['lwip_5fnsc_5fipv4_5fgateway_5fchanged',['LWIP_NSC_IPV4_GATEWAY_CHANGED',['../netif_8h.html#a22400d2202581b4a7273cded712adf49',1,'netif.h']]], + ['lwip_5fnsc_5fipv4_5fnetmask_5fchanged',['LWIP_NSC_IPV4_NETMASK_CHANGED',['../netif_8h.html#ad747072771a887443ab33f90a12077d4',1,'netif.h']]], + ['lwip_5fnsc_5fipv4_5fsettings_5fchanged',['LWIP_NSC_IPV4_SETTINGS_CHANGED',['../netif_8h.html#a4ff19a6f3045f65d0397d30b6609660a',1,'netif.h']]], + ['lwip_5fnsc_5fipv6_5faddr_5fstate_5fchanged',['LWIP_NSC_IPV6_ADDR_STATE_CHANGED',['../netif_8h.html#a0d70fe11cac43c8fa35827b8e607ccf6',1,'netif.h']]], + ['lwip_5fnsc_5fipv6_5fset',['LWIP_NSC_IPV6_SET',['../netif_8h.html#a8fb4317a77ee2e3848be80db15618666',1,'netif.h']]], + ['lwip_5fnsc_5flink_5fchanged',['LWIP_NSC_LINK_CHANGED',['../netif_8h.html#a5ad7308195c0581680dd62fb148501cd',1,'netif.h']]], + ['lwip_5fnsc_5fnetif_5fadded',['LWIP_NSC_NETIF_ADDED',['../netif_8h.html#adbfecb47897cfe63d4f6366c1fed23b2',1,'netif.h']]], + ['lwip_5fnsc_5fnetif_5fremoved',['LWIP_NSC_NETIF_REMOVED',['../netif_8h.html#ae8e2dc87c19a03d481ae37bcf7ced5c9',1,'netif.h']]], + ['lwip_5fnsc_5fstatus_5fchanged',['LWIP_NSC_STATUS_CHANGED',['../netif_8h.html#a6f406ee3ab60e8a4f27ae2483c96b8e2',1,'netif.h']]], + ['lwip_5fnum_5fcyclic_5ftimers',['lwip_num_cyclic_timers',['../timeouts_8c.html#a9d01f287a19f20b073d3a1c306ecbfcd',1,'lwip_num_cyclic_timers(): timeouts.c'],['../timeouts_8h.html#a9d01f287a19f20b073d3a1c306ecbfcd',1,'lwip_num_cyclic_timers(): timeouts.c']]], + ['lwip_5fnum_5fnetif_5fclient_5fdata',['LWIP_NUM_NETIF_CLIENT_DATA',['../group__lwip__opts__netif.html#ga94a35212616f9a9aae5c98741612b936',1,'opt.h']]], + ['lwip_5fnum_5fsys_5ftimeout_5finternal',['LWIP_NUM_SYS_TIMEOUT_INTERNAL',['../group__lwip__opts__memp.html#ga87a05debb46ff82093d0e6dc1aad8804',1,'opt.h']]], + ['loopback_20interface',['Loopback interface',['../group__lwip__opts__loop.html',1,'']]], + ['lwip_5fpacked_5fcast',['LWIP_PACKED_CAST',['../group__compiler__abstraction.html#ga4488578f18ad1a76e4fa8bc288c51446',1,'arch.h']]], + ['lwip_5fpbuf_5fref_5ft',['LWIP_PBUF_REF_T',['../group__lwip__opts__pbuf.html#gaaefb80d6bf9257c0f4322c36e1272c38',1,'opt.h']]], + ['lwip_5fperf',['LWIP_PERF',['../group__lwip__opts__perf.html#ga44acd95b33e2d58a74455279721298de',1,'opt.h']]], + ['lwip_5fplatform_5fassert',['LWIP_PLATFORM_ASSERT',['../group__compiler__abstraction.html#ga7e8bcd0282525704d6dd596bdd1b47d0',1,'arch.h']]], + ['lwip_5fplatform_5fdiag',['LWIP_PLATFORM_DIAG',['../group__compiler__abstraction.html#gaccef167be13a500ce30036030a9b142b',1,'arch.h']]], + ['lwip_5fpollscan_5fclear',['LWIP_POLLSCAN_CLEAR',['../sockets_8c.html#a2f15a466e75cbaaea0c31e63116870f9aa9a8fe3199d00016f1f5ad639e1b28f7',1,'sockets.c']]], + ['lwip_5fpollscan_5fdec_5fwait',['LWIP_POLLSCAN_DEC_WAIT',['../sockets_8c.html#a2f15a466e75cbaaea0c31e63116870f9a6c1eefa3e29a39b923c4b522eb1b3eb1',1,'sockets.c']]], + ['lwip_5fpollscan_5finc_5fwait',['LWIP_POLLSCAN_INC_WAIT',['../sockets_8c.html#a2f15a466e75cbaaea0c31e63116870f9ab6511d3104f70c18fb4bd80f24cb867d',1,'sockets.c']]], + ['lwip_5fpollscan_5fopts',['lwip_pollscan_opts',['../sockets_8c.html#a2f15a466e75cbaaea0c31e63116870f9',1,'sockets.c']]], + ['lwip_5fposix_5fsockets_5fio_5fnames',['LWIP_POSIX_SOCKETS_IO_NAMES',['../group__lwip__opts__socket.html#ga484c38ab08f60d5b3335d23d31f9a402',1,'opt.h']]], + ['lwip_5fprovide_5ferrno',['LWIP_PROVIDE_ERRNO',['../group__compiler__abstraction.html#ga8e2cba4c97dd38f4d517ed21cf109ade',1,'arch.h']]], + ['lwip_5fptr_5fnumeric_5fcast',['LWIP_PTR_NUMERIC_CAST',['../group__compiler__abstraction.html#ga683e5c35d3263fe3145e6a6bc546604a',1,'arch.h']]], + ['lwip_5frand',['LWIP_RAND',['../group__compiler__abstraction.html#ga77370c377781ee7489e30eaf772ea05a',1,'arch.h']]], + ['lwip_5fraw',['LWIP_RAW',['../group__lwip__opts__raw.html#gaca452be5cb05d9666f8f57e582c39221',1,'opt.h']]], + ['lwip_5frc_5fdevelopment',['LWIP_RC_DEVELOPMENT',['../group__lwip__version.html#ga9ca69b1a453eb72efd0bbda333f2a33b',1,'init.h']]], + ['lwip_5frc_5frelease',['LWIP_RC_RELEASE',['../group__lwip__version.html#ga375ee868e76ed7c458cdf249387bd469',1,'init.h']]], + ['lwip_5frfc7668_5fip_5funcompressed_5fdebug',['LWIP_RFC7668_IP_UNCOMPRESSED_DEBUG',['../lowpan6__opts_8h.html#a5b7a3e204d2edde5552ca3c8694419c1',1,'lowpan6_opts.h']]], + ['lwip_5frfc7668_5flinux_5fworkaround_5fpublic_5faddress',['LWIP_RFC7668_LINUX_WORKAROUND_PUBLIC_ADDRESS',['../lowpan6__opts_8h.html#af4a4d962af3439b111a8e72e5eeaccf8',1,'lowpan6_opts.h']]], + ['lwip_5fselect_5fcb',['lwip_select_cb',['../structlwip__select__cb.html',1,'']]], + ['lwip_5fshutdown',['lwip_shutdown',['../sockets_8c.html#ade85c68b6673296c8fb67127b93fa4c1',1,'lwip_shutdown(int s, int how): sockets.c'],['../sockets_8h.html#ade85c68b6673296c8fb67127b93fa4c1',1,'lwip_shutdown(int s, int how): sockets.c']]], + ['lwip_5fsingle_5fnetif',['LWIP_SINGLE_NETIF',['../group__lwip__opts__netif.html#ga943063b053eeac76b0b1bcef2ddd93be',1,'opt.h']]], + ['lwip_5fsnmp',['LWIP_SNMP',['../group__snmp__opts.html#gaf4900859dc53f19f5f67cc34e48ad68c',1,'snmp_opts.h']]], + ['lwip_5fsnmp_5fv3',['LWIP_SNMP_V3',['../snmp__opts_8h.html#a1fe0e120f979ed400f649019edcefe2b',1,'snmp_opts.h']]], + ['lwip_5fso_5flinger',['LWIP_SO_LINGER',['../group__lwip__opts__socket.html#gaa91292d5d014dc1c6f1c1f4166269a1d',1,'opt.h']]], + ['lwip_5fso_5frcvbuf',['LWIP_SO_RCVBUF',['../group__lwip__opts__socket.html#ga06390cebcf4d13d3d47a11365e5fcd28',1,'opt.h']]], + ['lwip_5fso_5frcvtimeo',['LWIP_SO_RCVTIMEO',['../group__lwip__opts__socket.html#ga91af3ade95b20b9a60c65ed0380fa0ed',1,'opt.h']]], + ['lwip_5fso_5fsndrcvtimeo_5fnonstandard',['LWIP_SO_SNDRCVTIMEO_NONSTANDARD',['../group__lwip__opts__socket.html#ga5b115bacb569763d8a3889a12229e942',1,'opt.h']]], + ['lwip_5fso_5fsndtimeo',['LWIP_SO_SNDTIMEO',['../group__lwip__opts__socket.html#ga1162cb685f202d9b21c11344b8209a58',1,'opt.h']]], + ['lwip_5fsock',['lwip_sock',['../structlwip__sock.html',1,'']]], + ['lwip_5fsocket',['LWIP_SOCKET',['../group__lwip__opts__socket.html#ga1cb62ce61ac39d7d6728ae5d3d3b927f',1,'opt.h']]], + ['lwip_5fsocket_5foffset',['LWIP_SOCKET_OFFSET',['../group__lwip__opts__socket.html#gad0197c845fbb44c920b272f0fef3b57e',1,'opt.h']]], + ['lwip_5fsocket_5fpoll',['LWIP_SOCKET_POLL',['../group__lwip__opts__socket.html#ga6c14d705e3321429683f24de9f5a7200',1,'opt.h']]], + ['lwip_5fsocket_5fselect',['LWIP_SOCKET_SELECT',['../group__lwip__opts__socket.html#ga68417078b71b0be9735256f52933dcdb',1,'opt.h']]], + ['lwip_5fsocket_5fthread_5fcleanup',['lwip_socket_thread_cleanup',['../sockets_8c.html#ab8cd92b10dbe3fb33da03faed1ea98a7',1,'lwip_socket_thread_cleanup(void): sockets.c'],['../sockets_8h.html#ab8cd92b10dbe3fb33da03faed1ea98a7',1,'lwip_socket_thread_cleanup(void): sockets.c']]], + ['lwip_5fsocket_5fthread_5finit',['lwip_socket_thread_init',['../sockets_8c.html#a0a250b3b4d1827e3a3661327f5e80ae0',1,'lwip_socket_thread_init(void): sockets.c'],['../sockets_8h.html#a0a250b3b4d1827e3a3661327f5e80ae0',1,'lwip_socket_thread_init(void): sockets.c']]], + ['lwip_5fstats',['lwip_stats',['../stats_8c.html#a614735db0145db9ba944ede600d1d19b',1,'lwip_stats(): stats.c'],['../stats_8h.html#a614735db0145db9ba944ede600d1d19b',1,'lwip_stats(): stats.c'],['../group__lwip__opts__stats.html#ga542b58734cc01902c5e099f6efdc5f1b',1,'LWIP_STATS(): opt.h']]], + ['lwip_5fstats_5fdisplay',['LWIP_STATS_DISPLAY',['../group__lwip__opts__stats.html#gacdc38ed58d1900b5d3d109a65be1c3d1',1,'opt.h']]], + ['lwip_5fstricmp',['lwip_stricmp',['../group__sys__nonstandard.html#ga263cbafcb697eff964139a9998a6668a',1,'lwip_stricmp(const char *str1, const char *str2): def.c'],['../group__sys__nonstandard.html#ga263cbafcb697eff964139a9998a6668a',1,'lwip_stricmp(const char *str1, const char *str2): def.c']]], + ['lwip_5fstrnicmp',['lwip_strnicmp',['../group__sys__nonstandard.html#ga997dcc49451121d4ed755b33bc7bd26a',1,'lwip_strnicmp(const char *str1, const char *str2, size_t len): def.c'],['../group__sys__nonstandard.html#ga997dcc49451121d4ed755b33bc7bd26a',1,'lwip_strnicmp(const char *str1, const char *str2, size_t len): def.c']]], + ['lwip_5fstrnstr',['lwip_strnstr',['../group__sys__nonstandard.html#gaeece028198cdaea2f0d2f1d691752c02',1,'lwip_strnstr(const char *buffer, const char *token, size_t n): def.c'],['../group__sys__nonstandard.html#gaeece028198cdaea2f0d2f1d691752c02',1,'lwip_strnstr(const char *buffer, const char *token, size_t n): def.c']]], + ['lwip_5fsupport_5fcustom_5fpbuf',['LWIP_SUPPORT_CUSTOM_PBUF',['../pbuf_8h.html#a64174c5169b48dc17674324afd9c63b9',1,'pbuf.h']]], + ['lwip_5ftcp',['LWIP_TCP',['../group__lwip__opts__tcp.html#gaa4ed98deb97b77c633cb8870f34c71e9',1,'opt.h']]], + ['lwip_5ftcp_5fcalc_5finitial_5fcwnd',['LWIP_TCP_CALC_INITIAL_CWND',['../tcp__in_8c.html#aea174f2c6ca4cb0ad270dd8d0faf0c84',1,'tcp_in.c']]], + ['lwip_5ftcp_5fclose_5ftimeout_5fms_5fdefault',['LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT',['../group__lwip__opts__socket.html#ga3e7498d5d2921f0df3792de72f384d36',1,'opt.h']]], + ['lwip_5ftcp_5fkeepalive',['LWIP_TCP_KEEPALIVE',['../group__lwip__opts__socket.html#ga8b9369ab260f032686a81c77c5b4db77',1,'opt.h']]], + ['lwip_5ftcp_5fmax_5fsack_5fnum',['LWIP_TCP_MAX_SACK_NUM',['../group__lwip__opts__tcp.html#gaaac0e9f559a8e3c251f3504cebcf44dc',1,'opt.h']]], + ['lwip_5ftcp_5fpcb_5fnum_5fext_5fargs',['LWIP_TCP_PCB_NUM_EXT_ARGS',['../group__lwip__opts__tcp.html#ga40b1cdad52eaa91a3f5c242fc92ee223',1,'opt.h']]], + ['lwip_5ftcp_5fsack_5fout',['LWIP_TCP_SACK_OUT',['../group__lwip__opts__tcp.html#gaf1b6a015d29fea67b906c276e1e8314f',1,'opt.h']]], + ['lwip_5ftcp_5ftimestamps',['LWIP_TCP_TIMESTAMPS',['../group__lwip__opts__tcp.html#ga249bc450bb818cf2ef3cf1472ff354fd',1,'opt.h']]], + ['lwip_5ftcpip_5fcore_5flocking',['LWIP_TCPIP_CORE_LOCKING',['../group__lwip__opts__lock.html#ga8e46232794349c209e8ed4e9e7e4f011',1,'opt.h']]], + ['lwip_5ftcpip_5fcore_5flocking_5finput',['LWIP_TCPIP_CORE_LOCKING_INPUT',['../group__lwip__opts__lock.html#ga351beb1c06affe49e717bc9f76c66acf',1,'opt.h']]], + ['lwip_5ftcpip_5fthread_5falive',['LWIP_TCPIP_THREAD_ALIVE',['../group__lwip__opts__thread.html#ga8b99d75d9e0a0868567d10c8522915bb',1,'opt.h']]], + ['lwip_5ftcpip_5ftimeout',['LWIP_TCPIP_TIMEOUT',['../group__lwip__opts__netconn.html#ga1cd8d15a42262a0defaedabed126ea99',1,'opt.h']]], + ['lwip_5fthread_5ffn',['lwip_thread_fn',['../sys_8h.html#ae30a77bf6bd69bfcc5f235eaad54f2b9',1,'sys.h']]], + ['lwip_5ftimers',['LWIP_TIMERS',['../group__lwip__opts__timers.html#ga25a41610055f91cbd0960256240b8f2c',1,'opt.h']]], + ['lwip_5ftimers_5fcustom',['LWIP_TIMERS_CUSTOM',['../group__lwip__opts__timers.html#gaff0ea56f3e3d8e86c49b50557bc13815',1,'opt.h']]], + ['lwip_5ftimeval_5fprivate',['LWIP_TIMEVAL_PRIVATE',['../sockets_8h.html#aaffd64f6887883ec6401e6bb684c40fa',1,'sockets.h']]], + ['lwip_5fudp',['LWIP_UDP',['../group__lwip__opts__udp.html#gab6030e96e72df649d2650fd32d7a67b3',1,'opt.h']]], + ['lwip_5fudplite',['LWIP_UDPLITE',['../group__lwip__opts__udp.html#ga35731bc5f337943e474a15c1cd538a61',1,'opt.h']]], + ['lwip_5funused_5farg',['LWIP_UNUSED_ARG',['../group__compiler__abstraction.html#ga70624a5deb8b9199406372a7f3603ecf',1,'arch.h']]], + ['lwip_5fversion',['LWIP_VERSION',['../group__lwip__version.html#ga0a0d322fad0a67aa5b8f1b8c9dfcfe59',1,'init.h']]], + ['lwip_5fversion_5fmajor',['LWIP_VERSION_MAJOR',['../group__lwip__version.html#ga4308c06ef36496e00c798d96d7d03246',1,'init.h']]], + ['lwip_5fversion_5fminor',['LWIP_VERSION_MINOR',['../group__lwip__version.html#ga1e596388c15ba81e753c5633fad1c034',1,'init.h']]], + ['lwip_5fversion_5frc',['LWIP_VERSION_RC',['../group__lwip__version.html#gac1dc92d8f453a98560de7e2e00a221a1',1,'init.h']]], + ['lwip_5fversion_5frevision',['LWIP_VERSION_REVISION',['../group__lwip__version.html#ga0a57983df1b199cf39a2e6a2d90e3d50',1,'init.h']]], + ['lwip_5fversion_5fstring',['LWIP_VERSION_STRING',['../group__lwip__version.html#gab47e87bc38eef94486db402813183ba7',1,'init.h']]], + ['lwip_5fwnd_5fscale',['LWIP_WND_SCALE',['../group__lwip__opts__tcp.html#ga88dbbfeeeb41b129fdc8235fc08bb530',1,'opt.h']]], + ['lwiperf_2ec',['lwiperf.c',['../lwiperf_8c.html',1,'']]], + ['lwiperf_2eh',['lwiperf.h',['../lwiperf_8h.html',1,'']]], + ['lwiperf_5fabort',['lwiperf_abort',['../group__iperf.html#gac51c9c44a38bfa1140bd44b793a0a004',1,'lwiperf_abort(void *lwiperf_session): lwiperf.c'],['../group__iperf.html#gac51c9c44a38bfa1140bd44b793a0a004',1,'lwiperf_abort(void *lwiperf_session): lwiperf.c']]], + ['lwiperf_5fcheck_5frx_5fdata',['LWIPERF_CHECK_RX_DATA',['../lwiperf_8c.html#af51dcfc53fe575411c26e18963f1b902',1,'lwiperf.c']]], + ['lwiperf_5fclient',['LWIPERF_CLIENT',['../lwiperf_8h.html#ab3280e56eb41bd6f698a20843573f76cae1862655ebaaea2e7e0261dff0173110',1,'lwiperf.h']]], + ['lwiperf_5fclient_5ftype',['lwiperf_client_type',['../lwiperf_8h.html#ab3280e56eb41bd6f698a20843573f76c',1,'lwiperf.h']]], + ['lwiperf_5fdual',['LWIPERF_DUAL',['../lwiperf_8h.html#ab3280e56eb41bd6f698a20843573f76cab0381feca6655968e7380622e7a63ede',1,'lwiperf.h']]], + ['lwiperf_5freport_5ffn',['lwiperf_report_fn',['../lwiperf_8h.html#a248ea47a58a14c6aecf6525217a812fd',1,'lwiperf.h']]], + ['lwiperf_5freport_5ftype',['lwiperf_report_type',['../lwiperf_8h.html#ab72a2d205e43d5243a291f937bbc24d6',1,'lwiperf.h']]], + ['lwiperf_5fserver_5fip_5ftype',['LWIPERF_SERVER_IP_TYPE',['../lwiperf_8c.html#a1351e47d0bdb7d0fe0efaf9f1b2b0f7a',1,'lwiperf.c']]], + ['lwiperf_5fsettings_5ft',['lwiperf_settings_t',['../lwiperf_8c.html#a4a794a0c1a90b889d54b1dacbce923f4',1,'lwiperf.c']]], + ['lwiperf_5fstart_5ftcp_5fclient',['lwiperf_start_tcp_client',['../group__iperf.html#gad8317f52289d8bb12a14627cd177a565',1,'lwiperf_start_tcp_client(const ip_addr_t *remote_addr, u16_t remote_port, enum lwiperf_client_type type, lwiperf_report_fn report_fn, void *report_arg): lwiperf.c'],['../group__iperf.html#gad8317f52289d8bb12a14627cd177a565',1,'lwiperf_start_tcp_client(const ip_addr_t *remote_addr, u16_t remote_port, enum lwiperf_client_type type, lwiperf_report_fn report_fn, void *report_arg): lwiperf.c']]], + ['lwiperf_5fstart_5ftcp_5fclient_5fdefault',['lwiperf_start_tcp_client_default',['../group__iperf.html#ga85a487cf8ecbd0999382c9bff375d0da',1,'lwiperf_start_tcp_client_default(const ip_addr_t *remote_addr, lwiperf_report_fn report_fn, void *report_arg): lwiperf.c'],['../group__iperf.html#ga85a487cf8ecbd0999382c9bff375d0da',1,'lwiperf_start_tcp_client_default(const ip_addr_t *remote_addr, lwiperf_report_fn report_fn, void *report_arg): lwiperf.c']]], + ['lwiperf_5fstart_5ftcp_5fserver',['lwiperf_start_tcp_server',['../group__iperf.html#gad97bf77057e7f96d6d8def812deea202',1,'lwiperf_start_tcp_server(const ip_addr_t *local_addr, u16_t local_port, lwiperf_report_fn report_fn, void *report_arg): lwiperf.c'],['../group__iperf.html#gad97bf77057e7f96d6d8def812deea202',1,'lwiperf_start_tcp_server(const ip_addr_t *local_addr, u16_t local_port, lwiperf_report_fn report_fn, void *report_arg): lwiperf.c']]], + ['lwiperf_5fstart_5ftcp_5fserver_5fdefault',['lwiperf_start_tcp_server_default',['../group__iperf.html#gae1f30a02b86c4dd3d47810cd493baf26',1,'lwiperf_start_tcp_server_default(lwiperf_report_fn report_fn, void *report_arg): lwiperf.c'],['../group__iperf.html#gae1f30a02b86c4dd3d47810cd493baf26',1,'lwiperf_start_tcp_server_default(lwiperf_report_fn report_fn, void *report_arg): lwiperf.c']]], + ['lwiperf_5fstate_5ftcp_5ft',['lwiperf_state_tcp_t',['../lwiperf_8c.html#a06db7abdf1d4864ca2b367d9c89e3e2d',1,'lwiperf.c']]], + ['lwiperf_5ftcp_5faborted_5flocal',['LWIPERF_TCP_ABORTED_LOCAL',['../lwiperf_8h.html#ab72a2d205e43d5243a291f937bbc24d6abee2bf6da51a0845c15ac52b280203cb',1,'lwiperf.h']]], + ['lwiperf_5ftcp_5faborted_5flocal_5fdataerror',['LWIPERF_TCP_ABORTED_LOCAL_DATAERROR',['../lwiperf_8h.html#ab72a2d205e43d5243a291f937bbc24d6adda7e5dbaf1e04eb04ec0fd2b05584a5',1,'lwiperf.h']]], + ['lwiperf_5ftcp_5faborted_5flocal_5ftxerror',['LWIPERF_TCP_ABORTED_LOCAL_TXERROR',['../lwiperf_8h.html#ab72a2d205e43d5243a291f937bbc24d6a3d4e1f5742d80aeafb6b22aa74d93e40',1,'lwiperf.h']]], + ['lwiperf_5ftcp_5faborted_5fremote',['LWIPERF_TCP_ABORTED_REMOTE',['../lwiperf_8h.html#ab72a2d205e43d5243a291f937bbc24d6ae664c0f987584f07fb0f6f8896aada0d',1,'lwiperf.h']]], + ['lwiperf_5ftcp_5fdone_5fclient',['LWIPERF_TCP_DONE_CLIENT',['../lwiperf_8h.html#ab72a2d205e43d5243a291f937bbc24d6a4f9bde0cad305eaab25d2c1d0196677b',1,'lwiperf.h']]], + ['lwiperf_5ftcp_5fdone_5fserver',['LWIPERF_TCP_DONE_SERVER',['../lwiperf_8h.html#ab72a2d205e43d5243a291f937bbc24d6aa52255236ad2983346311ce7f28210e5',1,'lwiperf.h']]], + ['lwiperf_5ftcp_5fmax_5fidle_5fsec',['LWIPERF_TCP_MAX_IDLE_SEC',['../lwiperf_8c.html#a646d7e0b37c5cefdd6eef38a3fba4673',1,'lwiperf.c']]], + ['lwiperf_5ftradeoff',['LWIPERF_TRADEOFF',['../lwiperf_8h.html#ab3280e56eb41bd6f698a20843573f76caccdab7ee6e1b0981861e66f0755f7964',1,'lwiperf.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_e.html b/Libraries/LwIP/doc/doxygen/output/html/search/all_e.html new file mode 100644 index 0000000..9fa42bb --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_e.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_e.js b/Libraries/LwIP/doc/doxygen/output/html/search/all_e.js new file mode 100644 index 0000000..0476552 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_e.js @@ -0,0 +1,195 @@ +var searchData= +[ + ['mainloop_20mode_20_28_22no_5fsys_22_29',['Mainloop mode ("NO_SYS")',['../group__lwip__nosys.html',1,'']]], + ['memcpy',['memcpy',['../group__lwip__opts__memcpy.html',1,'']]], + ['multicast_20listener_20discovery',['Multicast listener discovery',['../group__lwip__opts__mld6.html',1,'']]], + ['multicast',['Multicast',['../group__lwip__opts__multicast.html',1,'']]], + ['max_5ffdb_5fdynamic_5fentries',['max_fdb_dynamic_entries',['../structbridgeif__initdata__s.html#aeb312c2e698513c6416d5c8459ad622f',1,'bridgeif_initdata_s']]], + ['max_5ffdb_5fstatic_5fentries',['max_fdb_static_entries',['../structbridgeif__initdata__s.html#a210915aa1b0436ccabc7e8d9fd3c3fe6',1,'bridgeif_initdata_s']]], + ['max_5fnumber_5fof_5fpending_5fsessions',['max_number_of_pending_sessions',['../structnetbios__answer.html#a58aba600ed34b7c689606c296ef57c8c',1,'netbios_answer']]], + ['max_5fports',['max_ports',['../structbridgeif__initdata__s.html#a0e0bb6a885967b5fcfef09a8f0adc63f',1,'bridgeif_initdata_s']]], + ['max_5ftotal_5fnumber_5fof_5fcommand_5fblocks',['max_total_number_of_command_blocks',['../structnetbios__answer.html#a9cf85c173fe0d99c1c4e7e09aaeed9b8',1,'netbios_answer']]], + ['max_5ftotal_5fsessions_5fpossible',['max_total_sessions_possible',['../structnetbios__answer.html#a0069c9ae014881298828660787fa945e',1,'netbios_answer']]], + ['mcast_5fifindex',['mcast_ifindex',['../structraw__pcb.html#a5124a21e1523c774bd76c0eabc7c7ca8',1,'raw_pcb::mcast_ifindex()'],['../structudp__pcb.html#ac80ae56333b88cea08bfa3563b0dd3cd',1,'udp_pcb::mcast_ifindex()']]], + ['mcast_5fip4',['mcast_ip4',['../structudp__pcb.html#a1c32c7ebd76898cf8f1227c10d34dbe0',1,'udp_pcb']]], + ['mcast_5fttl',['mcast_ttl',['../structraw__pcb.html#a2ecc77e919de9bb552d1c70e771e2cad',1,'raw_pcb::mcast_ttl()'],['../structudp__pcb.html#aaab9255f7f1186aef12d45c9bb90d3f4',1,'udp_pcb::mcast_ttl()']]], + ['mdns',['MDNS',['../group__mdns.html',1,'']]], + ['mdns_2ec',['mdns.c',['../mdns_8c.html',1,'']]], + ['mdns_2eh',['mdns.h',['../mdns_8h.html',1,'']]], + ['mdns_5fcompress_5fdomain',['mdns_compress_domain',['../mdns_8c.html#ab72e48cf076afd1e3a08030d1d0bff9e',1,'mdns_compress_domain(struct pbuf *pbuf, u16_t *offset, struct mdns_domain *domain): mdns.c'],['../mdns__priv_8h.html#ab72e48cf076afd1e3a08030d1d0bff9e',1,'mdns_compress_domain(struct pbuf *pbuf, u16_t *offset, struct mdns_domain *domain): mdns.c']]], + ['mdns_5fdebug',['MDNS_DEBUG',['../group__mdns__opts.html#ga53a97502efdcf1214cab4078f93a6dc9',1,'mdns_opts.h']]], + ['mdns_5fdomain_5fadd_5flabel',['mdns_domain_add_label',['../mdns_8c.html#a17db69fa887515374452b945e959bbf9',1,'mdns_domain_add_label(struct mdns_domain *domain, const char *label, u8_t len): mdns.c'],['../mdns__priv_8h.html#a17db69fa887515374452b945e959bbf9',1,'mdns_domain_add_label(struct mdns_domain *domain, const char *label, u8_t len): mdns.c']]], + ['mdns_5fdomain_5feq',['mdns_domain_eq',['../mdns_8c.html#a52d8f70432ae998814f16b18431213cd',1,'mdns_domain_eq(struct mdns_domain *a, struct mdns_domain *b): mdns.c'],['../mdns__priv_8h.html#a52d8f70432ae998814f16b18431213cd',1,'mdns_domain_eq(struct mdns_domain *a, struct mdns_domain *b): mdns.c']]], + ['mdns_5fhost',['mdns_host',['../structmdns__host.html',1,'']]], + ['mdns_5fmax_5fservices',['MDNS_MAX_SERVICES',['../group__mdns__opts.html#ga82749ee08be21967b6daf577b9710ac6',1,'mdns_opts.h']]], + ['mdns_5fname_5fresult_5fcb_5ft',['mdns_name_result_cb_t',['../mdns_8h.html#a19f12d7092de6fe90d5843e4ef8d4536',1,'mdns.h']]], + ['mdns_5fopts_2eh',['mdns_opts.h',['../mdns__opts_8h.html',1,'']]], + ['mdns_5foutpacket',['mdns_outpacket',['../structmdns__outpacket.html',1,'']]], + ['mdns_5fpacket',['mdns_packet',['../structmdns__packet.html',1,'']]], + ['mdns_5fpriv_2eh',['mdns_priv.h',['../mdns__priv_8h.html',1,'']]], + ['mdns_5freadname',['mdns_readname',['../mdns_8c.html#ab5f49d9356a76879e0e6a14eb0643b23',1,'mdns_readname(struct pbuf *p, u16_t offset, struct mdns_domain *domain): mdns.c'],['../mdns__priv_8h.html#ab5f49d9356a76879e0e6a14eb0643b23',1,'mdns_readname(struct pbuf *p, u16_t offset, struct mdns_domain *domain): mdns.c']]], + ['mdns_5fresp_5fadd_5fnetif',['mdns_resp_add_netif',['../group__mdns.html#gaa619ac8f46a4b4021195720f0355cbeb',1,'mdns_resp_add_netif(struct netif *netif, const char *hostname, u32_t dns_ttl): mdns.c'],['../group__mdns.html#gaa619ac8f46a4b4021195720f0355cbeb',1,'mdns_resp_add_netif(struct netif *netif, const char *hostname, u32_t dns_ttl): mdns.c']]], + ['mdns_5fresp_5fadd_5fservice',['mdns_resp_add_service',['../group__mdns.html#ga824e992e94be216c8e059f48f49a59ce',1,'mdns_resp_add_service(struct netif *netif, const char *name, const char *service, enum mdns_sd_proto proto, u16_t port, u32_t dns_ttl, service_get_txt_fn_t txt_fn, void *txt_data): mdns.c'],['../group__mdns.html#ga824e992e94be216c8e059f48f49a59ce',1,'mdns_resp_add_service(struct netif *netif, const char *name, const char *service, enum mdns_sd_proto proto, u16_t port, u32_t dns_ttl, service_get_txt_fn_t txt_fn, void *txt_userdata): mdns.c']]], + ['mdns_5fresp_5fadd_5fservice_5ftxtitem',['mdns_resp_add_service_txtitem',['../group__mdns.html#ga01c85202f4b85edc8b571f2f419db576',1,'mdns_resp_add_service_txtitem(struct mdns_service *service, const char *txt, u8_t txt_len): mdns.c'],['../group__mdns.html#ga01c85202f4b85edc8b571f2f419db576',1,'mdns_resp_add_service_txtitem(struct mdns_service *service, const char *txt, u8_t txt_len): mdns.c']]], + ['mdns_5fresp_5fannounce',['mdns_resp_announce',['../group__mdns.html#ga0f462fb91a9d0323bb4636bd725f0e85',1,'mdns_resp_announce(struct netif *netif): mdns.c'],['../group__mdns.html#ga0f462fb91a9d0323bb4636bd725f0e85',1,'mdns_resp_announce(struct netif *netif): mdns.c']]], + ['mdns_5fresp_5fdel_5fservice',['mdns_resp_del_service',['../group__mdns.html#ga3df2ae751cdfdffb0a567390940eb8ad',1,'mdns_resp_del_service(struct netif *netif, s8_t slot): mdns.c'],['../group__mdns.html#ga3df2ae751cdfdffb0a567390940eb8ad',1,'mdns_resp_del_service(struct netif *netif, s8_t slot): mdns.c']]], + ['mdns_5fresp_5finit',['mdns_resp_init',['../group__mdns.html#ga5fa15978a398dae1a8d7620ae169bdd3',1,'mdns_resp_init(void): mdns.c'],['../group__mdns.html#ga5fa15978a398dae1a8d7620ae169bdd3',1,'mdns_resp_init(void): mdns.c']]], + ['mdns_5fresp_5fnetif_5fsettings_5fchanged',['mdns_resp_netif_settings_changed',['../group__mdns.html#gab2edba12d5cad1949f7ca040ae12beec',1,'mdns.h']]], + ['mdns_5fresp_5fregister_5fname_5fresult_5fcb',['mdns_resp_register_name_result_cb',['../mdns_8c.html#a01f8850b9c2d2cd40ed77a1438c85bf1',1,'mdns_resp_register_name_result_cb(mdns_name_result_cb_t cb): mdns.c'],['../mdns_8h.html#a01f8850b9c2d2cd40ed77a1438c85bf1',1,'mdns_resp_register_name_result_cb(mdns_name_result_cb_t cb): mdns.c']]], + ['mdns_5fresp_5fremove_5fnetif',['mdns_resp_remove_netif',['../group__mdns.html#gaa8144e3c77a92c4043e6214ff6b6010c',1,'mdns_resp_remove_netif(struct netif *netif): mdns.c'],['../group__mdns.html#gaa8144e3c77a92c4043e6214ff6b6010c',1,'mdns_resp_remove_netif(struct netif *netif): mdns.c']]], + ['mdns_5fresp_5frename_5fnetif',['mdns_resp_rename_netif',['../group__mdns.html#ga7b1473e595eb0c185bab293f3ec2e50e',1,'mdns_resp_rename_netif(struct netif *netif, const char *hostname): mdns.c'],['../group__mdns.html#ga7b1473e595eb0c185bab293f3ec2e50e',1,'mdns_resp_rename_netif(struct netif *netif, const char *hostname): mdns.c']]], + ['mdns_5fresp_5frename_5fservice',['mdns_resp_rename_service',['../group__mdns.html#gaf273897059f1bbddc74cfcb820777dd9',1,'mdns_resp_rename_service(struct netif *netif, s8_t slot, const char *name): mdns.c'],['../group__mdns.html#gaf273897059f1bbddc74cfcb820777dd9',1,'mdns_resp_rename_service(struct netif *netif, s8_t slot, const char *name): mdns.c']]], + ['mdns_5fresp_5frestart',['mdns_resp_restart',['../group__mdns.html#ga93eccdc0d9afff0f24160d31c70e2c9a',1,'mdns_resp_restart(struct netif *netif): mdns.c'],['../group__mdns.html#ga93eccdc0d9afff0f24160d31c70e2c9a',1,'mdns_resp_restart(struct netif *netif): mdns.c']]], + ['mdns_5fresp_5fusenetif_5fextcallback',['MDNS_RESP_USENETIF_EXTCALLBACK',['../group__mdns__opts.html#ga172e579cd09a1db51cf224319c012396',1,'mdns_opts.h']]], + ['mdns_5frr_5finfo',['mdns_rr_info',['../structmdns__rr__info.html',1,'']]], + ['mdns_5fservice',['mdns_service',['../structmdns__service.html',1,'']]], + ['mem',['mem',['../structmem.html',1,'mem'],['../structstats__.html#a656444f95080c6a3d474f73a6fcd9b1c',1,'stats_::mem()']]], + ['mem_2ec',['mem.c',['../mem_8c.html',1,'']]], + ['mem_2eh',['mem.h',['../mem_8h.html',1,'']]], + ['mem_5falignment',['MEM_ALIGNMENT',['../group__lwip__opts__mem.html#ga97343214666ee6dcb18c0bd77b441ea7',1,'opt.h']]], + ['mem_5fcalloc',['mem_calloc',['../mem_8c.html#ab0bdc525971701883f2065e7fb257a24',1,'mem_calloc(mem_size_t count, mem_size_t size): mem.c'],['../mem_8h.html#ab0bdc525971701883f2065e7fb257a24',1,'mem_calloc(mem_size_t count, mem_size_t size): mem.c']]], + ['mem_5fdebug',['MEM_DEBUG',['../group__lwip__opts__debugmsg.html#ga2d7bc380695eeedb1af50c3808613afe',1,'opt.h']]], + ['mem_5ffree',['mem_free',['../mem_8c.html#a65169147c44e9db60d997819af9b455c',1,'mem_free(void *rmem): mem.c'],['../mem_8h.html#a2fd7aa1adf6e394d3be7c7734e7df41a',1,'mem_free(void *mem): mem.c']]], + ['mem_5ffree_5fcallback',['mem_free_callback',['../tcpip_8c.html#a55b4de3765c6a37b3f2b26a11603771c',1,'mem_free_callback(void *m): tcpip.c'],['../tcpip_8h.html#a55b4de3765c6a37b3f2b26a11603771c',1,'mem_free_callback(void *m): tcpip.c']]], + ['mem_5finit',['mem_init',['../mem_8c.html#a44a136e3b70c36abb6f8dc060c778113',1,'mem_init(void): mem.c'],['../mem_8h.html#a44a136e3b70c36abb6f8dc060c778113',1,'mem_init(void): mem.c']]], + ['mem_5flibc_5fmalloc',['MEM_LIBC_MALLOC',['../group__lwip__opts__mem.html#ga4ef345cc270912bd2230b1c5ec51dfc8',1,'opt.h']]], + ['mem_5fmalloc',['mem_malloc',['../mem_8c.html#af418ade27d91d41e6143dba2cc246b0f',1,'mem_malloc(mem_size_t size_in): mem.c'],['../mem_8h.html#a932aa40d85b14cb7331625e012d12335',1,'mem_malloc(mem_size_t size): mem.c']]], + ['mem_5foverflow_5fcheck',['MEM_OVERFLOW_CHECK',['../group__lwip__opts__mem.html#gae331a198bd06100b90ea020cd5f07f4e',1,'opt.h']]], + ['mem_5fpriv_2eh',['mem_priv.h',['../mem__priv_8h.html',1,'']]], + ['mem_5fsanity_5fcheck',['MEM_SANITY_CHECK',['../group__lwip__opts__mem.html#ga90b17afabb93986a162c327ed30bb4d3',1,'opt.h']]], + ['mem_5fsize',['MEM_SIZE',['../group__lwip__opts__mem.html#ga2dcf8c45f945dd0c4301a94700f2112c',1,'opt.h']]], + ['mem_5fstats',['MEM_STATS',['../group__lwip__opts__stats.html#ga61ec04a08c4fde690d10819e582656a7',1,'opt.h']]], + ['mem_5ftrim',['mem_trim',['../mem_8c.html#a7e6b7f11bb50bead9b35515d9a517124',1,'mem_trim(void *rmem, mem_size_t new_size): mem.c'],['../mem_8h.html#a5e39a108c44d8a72df0b30a117cb62e4',1,'mem_trim(void *mem, mem_size_t size): mem.c']]], + ['mem_5fuse_5fpools',['MEM_USE_POOLS',['../group__lwip__opts__mem.html#gaddca3141bc7037241769eb152b6f89ba',1,'opt.h']]], + ['mem_5fuse_5fpools_5ftry_5fbigger_5fpool',['MEM_USE_POOLS_TRY_BIGGER_POOL',['../group__lwip__opts__mem.html#gaba8be68e8fd0716b723ce4569ed89f82',1,'opt.h']]], + ['memcpy',['MEMCPY',['../group__lwip__opts__memcpy.html#gaa1dd57a66b6de8c0593e9e3e8d1411f6',1,'opt.h']]], + ['memmove',['MEMMOVE',['../group__lwip__opts__memcpy.html#ga0e00bb235da5557fcbc049f732503863',1,'opt.h']]], + ['memp',['memp',['../structstats__.html#aa75d6b389e94b0f619b5db0daaf569fc',1,'stats_']]], + ['memp_2ec',['memp.c',['../memp_8c.html',1,'']]], + ['memp_2eh',['memp.h',['../memp_8h.html',1,'']]], + ['memp_5fdebug',['MEMP_DEBUG',['../group__lwip__opts__debugmsg.html#gad80231923f7a808d49eba5ec57d63616',1,'opt.h']]], + ['memp_5fdesc',['memp_desc',['../structmemp__desc.html',1,'']]], + ['memp_5ffree',['memp_free',['../memp_8c.html#aecd94926b7c2a0e23ae195f4ae97581f',1,'memp_free(memp_t type, void *mem): memp.c'],['../memp_8h.html#aecd94926b7c2a0e23ae195f4ae97581f',1,'memp_free(memp_t type, void *mem): memp.c']]], + ['memp_5ffree_5fpool',['memp_free_pool',['../memp_8c.html#a62f8c3c907743e34eee3cdac7fa1eaa5',1,'memp_free_pool(const struct memp_desc *desc, void *mem): memp.c'],['../memp__priv_8h.html#a62f8c3c907743e34eee3cdac7fa1eaa5',1,'memp_free_pool(const struct memp_desc *desc, void *mem): memp.c']]], + ['memp_5finit',['memp_init',['../memp_8c.html#a9693e5b1ac2c6b9c0e7870522d45efa2',1,'memp_init(void): memp.c'],['../memp_8h.html#a9693e5b1ac2c6b9c0e7870522d45efa2',1,'memp_init(void): memp.c']]], + ['memp_5finit_5fpool',['memp_init_pool',['../memp_8c.html#a6416303426d05526bed33f241fa6ecd7',1,'memp_init_pool(const struct memp_desc *desc): memp.c'],['../memp__priv_8h.html#a6416303426d05526bed33f241fa6ecd7',1,'memp_init_pool(const struct memp_desc *desc): memp.c']]], + ['memp_5fmalloc',['memp_malloc',['../memp_8c.html#a2b00593d086313c267b54a976bf67aa5',1,'memp_malloc(memp_t type): memp.c'],['../memp_8h.html#a2b00593d086313c267b54a976bf67aa5',1,'memp_malloc(memp_t type): memp.c']]], + ['memp_5fmalloc_5fpool',['memp_malloc_pool',['../memp_8c.html#a348c83ee972f1edf7296a1cdf1d75f22',1,'memp_malloc_pool(const struct memp_desc *desc): memp.c'],['../memp__priv_8h.html#a348c83ee972f1edf7296a1cdf1d75f22',1,'memp_malloc_pool(const struct memp_desc *desc): memp.c']]], + ['memp_5fmem_5finit',['MEMP_MEM_INIT',['../group__lwip__opts__mem.html#gaa2f25586972d1cbc1ff0dcdc6f15a1b0',1,'opt.h']]], + ['memp_5fmem_5fmalloc',['MEMP_MEM_MALLOC',['../group__lwip__opts__mem.html#gae93af697d27bbcefa6a28052d90f2f38',1,'opt.h']]], + ['memp_5fnum_5faltcp_5fpcb',['MEMP_NUM_ALTCP_PCB',['../group__lwip__opts__memp.html#ga24f6737ee990990b81b0d16ef6e0dffd',1,'opt.h']]], + ['memp_5fnum_5fapi_5fmsg',['MEMP_NUM_API_MSG',['../group__lwip__opts__memp.html#ga5a95abf3610c56e7c23cb035eb9c3444',1,'opt.h']]], + ['memp_5fnum_5farp_5fqueue',['MEMP_NUM_ARP_QUEUE',['../group__lwip__opts__memp.html#ga087b00ea20a7edebcad33a1a1353a5d7',1,'opt.h']]], + ['memp_5fnum_5fdns_5fapi_5fmsg',['MEMP_NUM_DNS_API_MSG',['../group__lwip__opts__memp.html#ga3b1f228c598529c62895ad04ff294980',1,'opt.h']]], + ['memp_5fnum_5ffrag_5fpbuf',['MEMP_NUM_FRAG_PBUF',['../group__lwip__opts__memp.html#ga1f66051a654dcd7a4e19bc6aff240630',1,'opt.h']]], + ['memp_5fnum_5figmp_5fgroup',['MEMP_NUM_IGMP_GROUP',['../group__lwip__opts__memp.html#gab648ff95d8ffa4216b95f82a568a5d9a',1,'opt.h']]], + ['memp_5fnum_5flocalhostlist',['MEMP_NUM_LOCALHOSTLIST',['../group__lwip__opts__memp.html#gaa9b0f949da12cbe8fe5f7aefc30290e0',1,'opt.h']]], + ['memp_5fnum_5fmld6_5fgroup',['MEMP_NUM_MLD6_GROUP',['../group__lwip__opts__mld6.html#ga89e92d8de8898696e797f13fdd169494',1,'opt.h']]], + ['memp_5fnum_5fnd6_5fqueue',['MEMP_NUM_ND6_QUEUE',['../group__lwip__opts__nd6.html#gabfaf3d92d51e2a9d70c8360af2611fb2',1,'opt.h']]], + ['memp_5fnum_5fnetbuf',['MEMP_NUM_NETBUF',['../group__lwip__opts__memp.html#ga5d99df65869ac101ed6a611fc85016be',1,'opt.h']]], + ['memp_5fnum_5fnetconn',['MEMP_NUM_NETCONN',['../group__lwip__opts__memp.html#gacb40bd726b7e15593b20a628d298f456',1,'opt.h']]], + ['memp_5fnum_5fnetdb',['MEMP_NUM_NETDB',['../group__lwip__opts__memp.html#ga293bc22b60bf3f8e2520f60a88370e7a',1,'opt.h']]], + ['memp_5fnum_5fnetifapi_5fmsg',['MEMP_NUM_NETIFAPI_MSG',['../group__lwip__opts__memp.html#gadd5a973b98068ce9318ea2f96b5fa14c',1,'opt.h']]], + ['memp_5fnum_5fpbuf',['MEMP_NUM_PBUF',['../group__lwip__opts__memp.html#ga92b30aed958ec59334d936d4ca725418',1,'opt.h']]], + ['memp_5fnum_5fraw_5fpcb',['MEMP_NUM_RAW_PCB',['../group__lwip__opts__memp.html#ga379bf92ed322cda54cb701337421e0d3',1,'opt.h']]], + ['memp_5fnum_5freassdata',['MEMP_NUM_REASSDATA',['../group__lwip__opts__memp.html#ga169436c5860253b90e25bdba9fdcac86',1,'opt.h']]], + ['memp_5fnum_5fselect_5fcb',['MEMP_NUM_SELECT_CB',['../group__lwip__opts__memp.html#ga8e136f5811e6652c6c5d2fcf596f0893',1,'opt.h']]], + ['memp_5fnum_5fsocket_5fsetgetsockopt_5fdata',['MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA',['../group__lwip__opts__memp.html#gacf9782dd26bf8a655044dc041a9de948',1,'opt.h']]], + ['memp_5fnum_5fsys_5ftimeout',['MEMP_NUM_SYS_TIMEOUT',['../group__lwip__opts__memp.html#ga4afbdca581a58d57bc7a81118a95327e',1,'opt.h']]], + ['memp_5fnum_5ftcp_5fpcb',['MEMP_NUM_TCP_PCB',['../group__lwip__opts__memp.html#ga73beecc19cfbc3114768f9b32b2cd70e',1,'opt.h']]], + ['memp_5fnum_5ftcp_5fpcb_5flisten',['MEMP_NUM_TCP_PCB_LISTEN',['../group__lwip__opts__memp.html#ga04fba6a249123513271dccb4ec26aa5a',1,'opt.h']]], + ['memp_5fnum_5ftcp_5fseg',['MEMP_NUM_TCP_SEG',['../group__lwip__opts__memp.html#gaa35fb3a1a76661e3ffb9722a57092de3',1,'opt.h']]], + ['memp_5fnum_5ftcpip_5fmsg_5fapi',['MEMP_NUM_TCPIP_MSG_API',['../group__lwip__opts__memp.html#gafbbfd6ce8536038cd00fa85bebae987c',1,'opt.h']]], + ['memp_5fnum_5ftcpip_5fmsg_5finpkt',['MEMP_NUM_TCPIP_MSG_INPKT',['../group__lwip__opts__memp.html#gab089a7088439e726c3801ba9e249d831',1,'opt.h']]], + ['memp_5fnum_5fudp_5fpcb',['MEMP_NUM_UDP_PCB',['../group__lwip__opts__memp.html#ga2c416da481ab09bd1ba257b75a0707eb',1,'opt.h']]], + ['memp_5foverflow_5fcheck',['MEMP_OVERFLOW_CHECK',['../group__lwip__opts__mem.html#ga27fdd01194a42fc41a7716b72cdb49e3',1,'opt.h']]], + ['memp_5fpriv_2eh',['memp_priv.h',['../memp__priv_8h.html',1,'']]], + ['memp_5fsanity_5fcheck',['MEMP_SANITY_CHECK',['../group__lwip__opts__mem.html#ga0838947193e222a9f46b582e01e5beff',1,'opt.h']]], + ['memp_5fstats',['MEMP_STATS',['../group__lwip__opts__stats.html#gab8c2430be0e567a7499a95454aaa6041',1,'opt.h']]], + ['memp_5fstd_2eh',['memp_std.h',['../memp__std_8h.html',1,'']]], + ['memp_5ft',['memp_t',['../memp_8h.html#a85a164b1f7764951cc685ea525114e57',1,'memp.h']]], + ['memp_5fuse_5fcustom_5fpools',['MEMP_USE_CUSTOM_POOLS',['../group__lwip__opts__mem.html#ga69de593b8ffd4f1c249f03e48e11983b',1,'opt.h']]], + ['memory_20pools',['Memory pools',['../group__mempool.html',1,'']]], + ['mib2',['mib2',['../structstats__.html#ac001c065c56c26c3952b19b9ce0d5832',1,'stats_']]], + ['mib2_5fcopy_5fsysuptime_5fto',['MIB2_COPY_SYSUPTIME_TO',['../snmp_8h.html#abe6b270482ca9af07c029f3136d8ec9c',1,'snmp.h']]], + ['mib2_5fcounters',['mib2_counters',['../structnetif.html#ab32cbe1851154fd020bac4be558f5fd5',1,'netif']]], + ['mib2_5finit_5fnetif',['MIB2_INIT_NETIF',['../group__netif__mib2.html#ga5be1b8cba1d67bf6e7f8851ec91b10f0',1,'snmp.h']]], + ['mib2_5fstats',['MIB2_STATS',['../group__lwip__opts__stats.html#ga5b01047eeb149a0b0ffe33d760d8370f',1,'opt.h']]], + ['mib2_5fstats_5fnetif_5fadd',['MIB2_STATS_NETIF_ADD',['../group__netif__mib2.html#ga05641438775014b7e13b9e55eba48bed',1,'snmp.h']]], + ['mib2_5fstats_5fnetif_5finc',['MIB2_STATS_NETIF_INC',['../group__netif__mib2.html#ga3c52caf566d37705c6547f2d025afd9f',1,'snmp.h']]], + ['min_5freq_5flen',['MIN_REQ_LEN',['../httpd_8c.html#aa8e2f3e13ac1fcacd85c558d6e40e40a',1,'httpd.c']]], + ['min_5fsize',['MIN_SIZE',['../mem_8c.html#a278694c2333c9826f21ddd2c2d220f66',1,'mem.c']]], + ['mld6',['mld6',['../structstats__.html#ab0ad1d07dff25cd3e4a8e5be607497f8',1,'stats_::mld6()'],['../group__mld6.html',1,'(Global Namespace)']]], + ['mld6_2ec',['mld6.c',['../mld6_8c.html',1,'']]], + ['mld6_2eh',['mld6.h',['../mld6_8h.html',1,'(Global Namespace)'],['../prot_2mld6_8h.html',1,'(Global Namespace)']]], + ['mld6_5finput',['mld6_input',['../mld6_8c.html#a7c190ca25432d466b28f607c3574a841',1,'mld6_input(struct pbuf *p, struct netif *inp): mld6.c'],['../mld6_8h.html#a7c190ca25432d466b28f607c3574a841',1,'mld6_input(struct pbuf *p, struct netif *inp): mld6.c']]], + ['mld6_5fjoingroup',['mld6_joingroup',['../group__mld6.html#ga53560ab6e47163e4888070830bf912a8',1,'mld6_joingroup(const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr): mld6.c'],['../group__mld6.html#ga53560ab6e47163e4888070830bf912a8',1,'mld6_joingroup(const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr): mld6.c']]], + ['mld6_5fjoingroup_5fnetif',['mld6_joingroup_netif',['../group__mld6.html#ga2ba41d575a56d27c0af0a08fb8724940',1,'mld6_joingroup_netif(struct netif *netif, const ip6_addr_t *groupaddr): mld6.c'],['../group__mld6.html#ga2ba41d575a56d27c0af0a08fb8724940',1,'mld6_joingroup_netif(struct netif *netif, const ip6_addr_t *groupaddr): mld6.c']]], + ['mld6_5fleavegroup',['mld6_leavegroup',['../group__mld6.html#ga946b830efc6fd795b07a0964dc7940e5',1,'mld6_leavegroup(const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr): mld6.c'],['../group__mld6.html#ga946b830efc6fd795b07a0964dc7940e5',1,'mld6_leavegroup(const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr): mld6.c']]], + ['mld6_5fleavegroup_5fnetif',['mld6_leavegroup_netif',['../group__mld6.html#gab664062a15a3ae3e05282eacf4dc0a22',1,'mld6_leavegroup_netif(struct netif *netif, const ip6_addr_t *groupaddr): mld6.c'],['../group__mld6.html#gab664062a15a3ae3e05282eacf4dc0a22',1,'mld6_leavegroup_netif(struct netif *netif, const ip6_addr_t *groupaddr): mld6.c']]], + ['mld6_5flookfor_5fgroup',['mld6_lookfor_group',['../mld6_8c.html#ad2fbba6bc543dbf994961656d7431eb5',1,'mld6_lookfor_group(struct netif *ifp, const ip6_addr_t *addr): mld6.c'],['../mld6_8h.html#ad2fbba6bc543dbf994961656d7431eb5',1,'mld6_lookfor_group(struct netif *ifp, const ip6_addr_t *addr): mld6.c']]], + ['mld6_5freport_5fgroups',['mld6_report_groups',['../mld6_8c.html#a2a08b95a7b3c82da05df1a3b50629686',1,'mld6_report_groups(struct netif *netif): mld6.c'],['../mld6_8h.html#a2a08b95a7b3c82da05df1a3b50629686',1,'mld6_report_groups(struct netif *netif): mld6.c']]], + ['mld6_5fstats',['MLD6_STATS',['../group__lwip__opts__stats.html#gaf263df10b63b38201cae3d2dd5fb0b9e',1,'opt.h']]], + ['mld6_5fstop',['mld6_stop',['../mld6_8c.html#ab7197d123f21a8863b56cc3871fd5198',1,'mld6_stop(struct netif *netif): mld6.c'],['../mld6_8h.html#ab7197d123f21a8863b56cc3871fd5198',1,'mld6_stop(struct netif *netif): mld6.c']]], + ['mld6_5ftmr',['mld6_tmr',['../mld6_8c.html#a4ddb496d0a6a466df5665dbed8bd6274',1,'mld6_tmr(void): mld6.c'],['../mld6_8h.html#a4ddb496d0a6a466df5665dbed8bd6274',1,'mld6_tmr(void): mld6.c']]], + ['mld_5fgroup',['mld_group',['../structmld__group.html',1,'']]], + ['mld_5fheader',['mld_header',['../structmld__header.html',1,'']]], + ['mld_5fmac_5ffilter',['mld_mac_filter',['../structnetif.html#abc67963ff9f574e98ef9c50138a3e470',1,'netif']]], + ['mqtt_20client',['MQTT client',['../group__mqtt.html',1,'']]], + ['mqtt_2ec',['mqtt.c',['../mqtt_8c.html',1,'']]], + ['mqtt_2eh',['mqtt.h',['../mqtt_8h.html',1,'']]], + ['mqtt_5fclient_5fconnect',['mqtt_client_connect',['../group__mqtt.html#gadf4d2a3f1b12fb6cbc020b126f3125f0',1,'mqtt_client_connect(mqtt_client_t *client, const ip_addr_t *ip_addr, u16_t port, mqtt_connection_cb_t cb, void *arg, const struct mqtt_connect_client_info_t *client_info): mqtt.c'],['../group__mqtt.html#gadf4d2a3f1b12fb6cbc020b126f3125f0',1,'mqtt_client_connect(mqtt_client_t *client, const ip_addr_t *ipaddr, u16_t port, mqtt_connection_cb_t cb, void *arg, const struct mqtt_connect_client_info_t *client_info): mqtt.c']]], + ['mqtt_5fclient_5ffree',['mqtt_client_free',['../group__mqtt.html#gaa0fa1d985c322a9c91a51322db254882',1,'mqtt_client_free(mqtt_client_t *client): mqtt.c'],['../group__mqtt.html#gaa0fa1d985c322a9c91a51322db254882',1,'mqtt_client_free(mqtt_client_t *client): mqtt.c']]], + ['mqtt_5fclient_5fis_5fconnected',['mqtt_client_is_connected',['../group__mqtt.html#ga98f0fd168112b8b7db59bcd7a325a5c5',1,'mqtt_client_is_connected(mqtt_client_t *client): mqtt.c'],['../group__mqtt.html#ga98f0fd168112b8b7db59bcd7a325a5c5',1,'mqtt_client_is_connected(mqtt_client_t *client): mqtt.c']]], + ['mqtt_5fclient_5fnew',['mqtt_client_new',['../group__mqtt.html#gae7e19e236eb6122c8c39e93db6f5f53f',1,'mqtt_client_new(void): mqtt.c'],['../group__mqtt.html#gae7e19e236eb6122c8c39e93db6f5f53f',1,'mqtt_client_new(void): mqtt.c']]], + ['mqtt_5fclient_5fs',['mqtt_client_s',['../structmqtt__client__s.html',1,'']]], + ['mqtt_5fconnect_5faccepted',['MQTT_CONNECT_ACCEPTED',['../group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77da074dc1d289b8e8d4aad91f6a2cb93dc1',1,'mqtt.h']]], + ['mqtt_5fconnect_5fclient_5finfo_5ft',['mqtt_connect_client_info_t',['../structmqtt__connect__client__info__t.html',1,'']]], + ['mqtt_5fconnect_5fdisconnected',['MQTT_CONNECT_DISCONNECTED',['../group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77da321f5ce31b173f235de1a517fcfd00dd',1,'mqtt.h']]], + ['mqtt_5fconnect_5fflag',['mqtt_connect_flag',['../mqtt_8c.html#a4f6c42ed730546ff755e3bb99989dd12',1,'mqtt.c']]], + ['mqtt_5fconnect_5frefused_5fidentifier',['MQTT_CONNECT_REFUSED_IDENTIFIER',['../group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77da28ffe49b0175adaa2b9a27cb4873224a',1,'mqtt.h']]], + ['mqtt_5fconnect_5frefused_5fnot_5fauthorized_5f',['MQTT_CONNECT_REFUSED_NOT_AUTHORIZED_',['../group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77dafc4888158dd6ee84269a5f0bfdc12b17',1,'mqtt.h']]], + ['mqtt_5fconnect_5frefused_5fprotocol_5fversion',['MQTT_CONNECT_REFUSED_PROTOCOL_VERSION',['../group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77da41f8aa97142be337cb639f94d9145190',1,'mqtt.h']]], + ['mqtt_5fconnect_5frefused_5fserver',['MQTT_CONNECT_REFUSED_SERVER',['../group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77dade28ec1c2ce3d874e91251d683c92b2a',1,'mqtt.h']]], + ['mqtt_5fconnect_5frefused_5fusername_5fpass',['MQTT_CONNECT_REFUSED_USERNAME_PASS',['../group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77da290cf9037054c42022cc864cfade896a',1,'mqtt.h']]], + ['mqtt_5fconnect_5ftimeout',['MQTT_CONNECT_TIMEOUT',['../group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77da57153f2ab4331c6f76a9ee74e1bcfc62',1,'mqtt.h']]], + ['mqtt_5fconnect_5ftimout',['MQTT_CONNECT_TIMOUT',['../group__mqtt__opts.html#gac5d0580d1caf57dac1cb56662e5d9f7b',1,'mqtt_opts.h']]], + ['mqtt_5fconnection_5fcb_5ft',['mqtt_connection_cb_t',['../group__mqtt.html#ga8558743bdb7d599a93844fbc56c9029f',1,'mqtt.h']]], + ['mqtt_5fconnection_5fstatus_5ft',['mqtt_connection_status_t',['../group__mqtt.html#ga8cf0f360ab20343af37e1d124395a77d',1,'mqtt.h']]], + ['mqtt_5fctl_5fpacket_5ftype',['MQTT_CTL_PACKET_TYPE',['../mqtt_8c.html#a45c57ebd31832f1c128d847067c4688b',1,'mqtt.c']]], + ['mqtt_5fcyclic_5ftimer_5finterval',['MQTT_CYCLIC_TIMER_INTERVAL',['../group__mqtt__opts.html#ga1d89fda808c7047eab7a67d3785aea8e',1,'mqtt_opts.h']]], + ['mqtt_5fdata_5fflag_5flast',['MQTT_DATA_FLAG_LAST',['../group__mqtt.html#gga99fb83031ce9923c84392b4e92f956b5a79cd00d0a5a8df13207e0c49447df87f',1,'mqtt.h']]], + ['mqtt_5fdebug',['MQTT_DEBUG',['../mqtt_8c.html#a99c325e06cc17ee24e09dab251606f9d',1,'mqtt.c']]], + ['mqtt_5fdisconnect',['mqtt_disconnect',['../group__mqtt.html#ga73d8dd718bce09bfaab452770b4f76e6',1,'mqtt_disconnect(mqtt_client_t *client): mqtt.c'],['../group__mqtt.html#ga73d8dd718bce09bfaab452770b4f76e6',1,'mqtt_disconnect(mqtt_client_t *client): mqtt.c']]], + ['mqtt_5fincoming_5fdata_5fcb_5ft',['mqtt_incoming_data_cb_t',['../group__mqtt.html#gafec7e75fe6a746eef9ca411463446c81',1,'mqtt.h']]], + ['mqtt_5fincoming_5fpublish_5fcb_5ft',['mqtt_incoming_publish_cb_t',['../group__mqtt.html#ga7116bb85255394cec4b1d9fa38842c29',1,'mqtt.h']]], + ['mqtt_5fmessage_5ftype',['mqtt_message_type',['../mqtt_8c.html#ac243cf15beb51b2206e36da86c2f95f1',1,'mqtt.c']]], + ['mqtt_5fopts_2eh',['mqtt_opts.h',['../mqtt__opts_8h.html',1,'']]], + ['mqtt_5foutput_5fringbuf_5fsize',['MQTT_OUTPUT_RINGBUF_SIZE',['../group__mqtt__opts.html#ga70627bafaffa071875cee9edc38d942b',1,'mqtt_opts.h']]], + ['mqtt_5fport',['MQTT_PORT',['../group__mqtt.html#gaa8632baff6bbb5004385998918f1e6bd',1,'mqtt.h']]], + ['mqtt_5fpriv_2eh',['mqtt_priv.h',['../mqtt__priv_8h.html',1,'']]], + ['mqtt_5fpublish',['mqtt_publish',['../group__mqtt.html#gade9850d716e81fde572cb012be795d2f',1,'mqtt_publish(mqtt_client_t *client, const char *topic, const void *payload, u16_t payload_length, u8_t qos, u8_t retain, mqtt_request_cb_t cb, void *arg): mqtt.c'],['../group__mqtt.html#gade9850d716e81fde572cb012be795d2f',1,'mqtt_publish(mqtt_client_t *client, const char *topic, const void *payload, u16_t payload_length, u8_t qos, u8_t retain, mqtt_request_cb_t cb, void *arg): mqtt.c']]], + ['mqtt_5freq_5fmax_5fin_5fflight',['MQTT_REQ_MAX_IN_FLIGHT',['../group__mqtt__opts.html#gae82460b35de2291e9661e440c3458e8f',1,'mqtt_opts.h']]], + ['mqtt_5freq_5ftimeout',['MQTT_REQ_TIMEOUT',['../group__mqtt__opts.html#ga262639f2b45f6e064fb53156396d6d0a',1,'mqtt_opts.h']]], + ['mqtt_5frequest_5fcb_5ft',['mqtt_request_cb_t',['../group__mqtt.html#gacad2bbe2cee76eaa120cc63e2f6094fd',1,'mqtt.h']]], + ['mqtt_5frequest_5ft',['mqtt_request_t',['../structmqtt__request__t.html',1,'']]], + ['mqtt_5fringbuf_5ffree',['mqtt_ringbuf_free',['../mqtt_8c.html#afba101fbf26b556c869060d3d013c8fa',1,'mqtt.c']]], + ['mqtt_5fringbuf_5flinear_5fread_5flength',['mqtt_ringbuf_linear_read_length',['../mqtt_8c.html#ad82b4039213ab3f1d9e4bcd3aa0c88a3',1,'mqtt.c']]], + ['mqtt_5fringbuf_5ft',['mqtt_ringbuf_t',['../structmqtt__ringbuf__t.html',1,'']]], + ['mqtt_5fset_5finpub_5fcallback',['mqtt_set_inpub_callback',['../group__mqtt.html#gafdfa0e65b217e92835d35858924565cf',1,'mqtt_set_inpub_callback(mqtt_client_t *client, mqtt_incoming_publish_cb_t pub_cb, mqtt_incoming_data_cb_t data_cb, void *arg): mqtt.c'],['../group__mqtt.html#gafdfa0e65b217e92835d35858924565cf',1,'mqtt_set_inpub_callback(mqtt_client_t *client, mqtt_incoming_publish_cb_t, mqtt_incoming_data_cb_t data_cb, void *arg): mqtt.c']]], + ['mqtt_5fsub_5funsub',['mqtt_sub_unsub',['../group__mqtt.html#gafdb39d4a9758f98c02451aaa9a9b3103',1,'mqtt_sub_unsub(mqtt_client_t *client, const char *topic, u8_t qos, mqtt_request_cb_t cb, void *arg, u8_t sub): mqtt.c'],['../group__mqtt.html#gafdb39d4a9758f98c02451aaa9a9b3103',1,'mqtt_sub_unsub(mqtt_client_t *client, const char *topic, u8_t qos, mqtt_request_cb_t cb, void *arg, u8_t sub): mqtt.c']]], + ['mqtt_5fsubscribe',['mqtt_subscribe',['../group__mqtt.html#ga83d6a6d811b201a74d793bc1b5d4e029',1,'mqtt.h']]], + ['mqtt_5ftls_5fport',['MQTT_TLS_PORT',['../group__mqtt.html#ga6610174f17b9ecbcf2bc66a4fd5a6b0f',1,'mqtt.h']]], + ['mqtt_5funsubscribe',['mqtt_unsubscribe',['../group__mqtt.html#ga0f133ef09cbe56c46ebe2cc21afccf3f',1,'mqtt.h']]], + ['mqtt_5fvar_5fheader_5fbuffer_5flen',['MQTT_VAR_HEADER_BUFFER_LEN',['../group__mqtt__opts.html#ga8275ef78a85fb14c3ac1423c70e45805',1,'mqtt_opts.h']]], + ['msg',['msg',['../structapi__msg.html#aef71459b5251d796434f741ca630d528',1,'api_msg']]], + ['msg_5fidx',['msg_idx',['../structmqtt__client__s.html#aae7bd1da3461efef9616934feb166aa5',1,'mqtt_client_s']]], + ['mtu',['mtu',['../structnetif.html#aca7d56b4e0f822b0ced2885f222b8d48',1,'netif']]], + ['mtu6',['mtu6',['../structnetif.html#acd78fca5dad6468605f38e327b3a5e72',1,'netif']]], + ['multithreading',['Multithreading',['../multithreading.html',1,'']]], + ['mib2_20statistics',['MIB2 statistics',['../group__netif__mib2.html',1,'']]], + ['mib2',['MIB2',['../group__snmp__mib2.html',1,'']]], + ['mailboxes',['Mailboxes',['../group__sys__mbox.html',1,'']]], + ['misc',['Misc',['../group__sys__misc.html',1,'']]], + ['mutexes',['Mutexes',['../group__sys__mutex.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_f.html b/Libraries/LwIP/doc/doxygen/output/html/search/all_f.html new file mode 100644 index 0000000..6ecfc0e --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_f.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/all_f.js b/Libraries/LwIP/doc/doxygen/output/html/search/all_f.js new file mode 100644 index 0000000..24f8267 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/all_f.js @@ -0,0 +1,255 @@ +var searchData= +[ + ['neighbor_20discovery',['Neighbor discovery',['../group__lwip__opts__nd6.html',1,'']]], + ['netconn',['Netconn',['../group__lwip__opts__netconn.html',1,'']]], + ['netif',['NETIF',['../group__lwip__opts__netif.html',1,'']]], + ['no_5fsys',['NO_SYS',['../group__lwip__opts__nosys.html',1,'']]], + ['n',['n',['../structapi__msg.html#adbbfc2baa8088b31fc722365237e5807',1,'api_msg']]], + ['na_5fheader',['na_header',['../structna__header.html',1,'']]], + ['name',['name',['../structmdns__service.html#ac6d92cf213e3647d3ca1520595c3b784',1,'mdns_service::name()'],['../structmdns__host.html#a560447b364854eb5480e137e09d3cd24',1,'mdns_host::name()'],['../structnetif.html#a32fca6ffd28bb9af3f891a378827a67e',1,'netif::name()'],['../structdns__api__msg.html#ada44a0eb6c9181cac80cfbbee01d3b53',1,'dns_api_msg::name()']]], + ['name_5fsize',['name_size',['../structnetbios__answer.html#a5828dc04e01a1f7b734019db428fd46d',1,'netbios_answer']]], + ['nd6',['nd6',['../structstats__.html#ab348a3a4b593b05d7df1293a06af8adf',1,'stats_']]], + ['nd6_2ec',['nd6.c',['../nd6_8c.html',1,'']]], + ['nd6_2eh',['nd6.h',['../nd6_8h.html',1,'(Global Namespace)'],['../prot_2nd6_8h.html',1,'(Global Namespace)']]], + ['nd6_5fadjust_5fmld_5fmembership',['nd6_adjust_mld_membership',['../nd6_8c.html#a27224542b8ffab81c2ed9f47752bb51e',1,'nd6_adjust_mld_membership(struct netif *netif, s8_t addr_idx, u8_t new_state): nd6.c'],['../nd6_8h.html#a27224542b8ffab81c2ed9f47752bb51e',1,'nd6_adjust_mld_membership(struct netif *netif, s8_t addr_idx, u8_t new_state): nd6.c']]], + ['nd6_5fcleanup_5fnetif',['nd6_cleanup_netif',['../nd6_8c.html#a84f9f52cab7ae37b4dd343536156dc73',1,'nd6_cleanup_netif(struct netif *netif): nd6.c'],['../nd6_8h.html#a84f9f52cab7ae37b4dd343536156dc73',1,'nd6_cleanup_netif(struct netif *netif): nd6.c']]], + ['nd6_5fclear_5fdestination_5fcache',['nd6_clear_destination_cache',['../nd6_8c.html#a64d7956cf2b0d45025b02661f3f62377',1,'nd6_clear_destination_cache(void): nd6.c'],['../nd6_8h.html#a64d7956cf2b0d45025b02661f3f62377',1,'nd6_clear_destination_cache(void): nd6.c']]], + ['nd6_5ffind_5froute',['nd6_find_route',['../nd6_8c.html#ac5ce11eaecfb486c322641427f47cffe',1,'nd6_find_route(const ip6_addr_t *ip6addr): nd6.c'],['../nd6_8h.html#ac5ce11eaecfb486c322641427f47cffe',1,'nd6_find_route(const ip6_addr_t *ip6addr): nd6.c']]], + ['nd6_5fget_5fdestination_5fmtu',['nd6_get_destination_mtu',['../nd6_8c.html#af226438f4f9b4aa7c3a2bbdf3c1e948c',1,'nd6_get_destination_mtu(const ip6_addr_t *ip6addr, struct netif *netif): nd6.c'],['../nd6_8h.html#af226438f4f9b4aa7c3a2bbdf3c1e948c',1,'nd6_get_destination_mtu(const ip6_addr_t *ip6addr, struct netif *netif): nd6.c']]], + ['nd6_5fget_5fnext_5fhop_5faddr_5for_5fqueue',['nd6_get_next_hop_addr_or_queue',['../nd6_8c.html#ae447c204ebbf71e6ebbc5ed727a73eb9',1,'nd6_get_next_hop_addr_or_queue(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr, const u8_t **hwaddrp): nd6.c'],['../nd6_8h.html#ae447c204ebbf71e6ebbc5ed727a73eb9',1,'nd6_get_next_hop_addr_or_queue(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr, const u8_t **hwaddrp): nd6.c']]], + ['nd6_5finput',['nd6_input',['../nd6_8c.html#abbb92837e715be0e7d99513a84995831',1,'nd6_input(struct pbuf *p, struct netif *inp): nd6.c'],['../nd6_8h.html#abbb92837e715be0e7d99513a84995831',1,'nd6_input(struct pbuf *p, struct netif *inp): nd6.c']]], + ['nd6_5fneighbor_5fcache_5fentry',['nd6_neighbor_cache_entry',['../structnd6__neighbor__cache__entry.html',1,'']]], + ['nd6_5foption_5ftype_5fmtu',['ND6_OPTION_TYPE_MTU',['../prot_2nd6_8h.html#aab6c15c9bea51fbdcc660f718bb403a8',1,'nd6.h']]], + ['nd6_5foption_5ftype_5fprefix_5finfo',['ND6_OPTION_TYPE_PREFIX_INFO',['../prot_2nd6_8h.html#a0225d4c8911efdbdbc2b40de208906c2',1,'nd6.h']]], + ['nd6_5foption_5ftype_5frdnss',['ND6_OPTION_TYPE_RDNSS',['../prot_2nd6_8h.html#a3188b9704a8ca598f54b87c3db73272e',1,'nd6.h']]], + ['nd6_5foption_5ftype_5fredir_5fhdr',['ND6_OPTION_TYPE_REDIR_HDR',['../prot_2nd6_8h.html#aeaa575c1a66ccaa2dc62ff2c0bd71619',1,'nd6.h']]], + ['nd6_5foption_5ftype_5froute_5finfo',['ND6_OPTION_TYPE_ROUTE_INFO',['../prot_2nd6_8h.html#aff2e03766ee1fa15263c4aeda5097d28',1,'nd6.h']]], + ['nd6_5foption_5ftype_5fsource_5flladdr',['ND6_OPTION_TYPE_SOURCE_LLADDR',['../prot_2nd6_8h.html#a68ce8550a20cd30093d6e79e1ca51842',1,'nd6.h']]], + ['nd6_5fpriv_2eh',['nd6_priv.h',['../nd6__priv_8h.html',1,'']]], + ['nd6_5fq_5fentry',['nd6_q_entry',['../structnd6__q__entry.html',1,'']]], + ['nd6_5fra_5fflag_5fmanaged_5faddr_5fconfig',['ND6_RA_FLAG_MANAGED_ADDR_CONFIG',['../prot_2nd6_8h.html#a7fb1b330719d83b7525374f4beca51bc',1,'nd6.h']]], + ['nd6_5freachability_5fhint',['nd6_reachability_hint',['../nd6_8c.html#a4959990cae26a3996f638ec996f046df',1,'nd6_reachability_hint(const ip6_addr_t *ip6addr): nd6.c'],['../nd6_8h.html#a4959990cae26a3996f638ec996f046df',1,'nd6_reachability_hint(const ip6_addr_t *ip6addr): nd6.c']]], + ['nd6_5frestart_5fnetif',['nd6_restart_netif',['../nd6_8c.html#a73d3192204da20be193e3c00c4a0cb54',1,'nd6_restart_netif(struct netif *netif): nd6.c'],['../nd6_8h.html#a73d3192204da20be193e3c00c4a0cb54',1,'nd6_restart_netif(struct netif *netif): nd6.c']]], + ['nd6_5frtr_5fsolicitation_5finterval',['ND6_RTR_SOLICITATION_INTERVAL',['../nd6_8h.html#a2fec65c0785551bad3a282ddee4062ac',1,'nd6.h']]], + ['nd6_5fstats',['ND6_STATS',['../group__lwip__opts__stats.html#ga753161114df60299a28d51c092c756cf',1,'opt.h']]], + ['nd6_5ftmr',['nd6_tmr',['../nd6_8c.html#a754781b509e69c35a7a4ee7e380399fe',1,'nd6_tmr(void): nd6.c'],['../nd6_8h.html#a754781b509e69c35a7a4ee7e380399fe',1,'nd6_tmr(void): nd6.c']]], + ['nd6_5ftmr_5finterval',['ND6_TMR_INTERVAL',['../nd6_8h.html#a3250c1e32713635d588cf25865ebed56',1,'nd6.h']]], + ['netb_5fhflag_5fresponse',['NETB_HFLAG_RESPONSE',['../netbiosns_8c.html#af09685abf1739c802bc8772b35b7fb1c',1,'netbiosns.c']]], + ['netb_5fnflag_5funique',['NETB_NFLAG_UNIQUE',['../netbiosns_8c.html#ae00d45caef5a670e3aedde2788b3f212',1,'netbiosns.c']]], + ['netbios_5fanswer',['netbios_answer',['../structnetbios__answer.html',1,'']]], + ['netbios_5fhdr',['netbios_hdr',['../structnetbios__hdr.html',1,'']]], + ['netbios_5flwip_5fname',['NETBIOS_LWIP_NAME',['../group__netbiosns__opts.html#ga468c2ae67a79ce082ee585a438f7373b',1,'netbiosns_opts.h']]], + ['netbios_5fname_5fhdr',['netbios_name_hdr',['../structnetbios__name__hdr.html',1,'']]], + ['netbios_5fname_5flen',['NETBIOS_NAME_LEN',['../netbiosns_8c.html#a4b83658c5bbb9ac90aca4351086a9a00',1,'netbiosns.c']]], + ['netbios_5fname_5fttl',['NETBIOS_NAME_TTL',['../netbiosns_8c.html#a35d43ea3290f6412e45598b610f03cf1',1,'netbiosns.c']]], + ['netbios_5fquestion_5fhdr',['netbios_question_hdr',['../structnetbios__question__hdr.html',1,'']]], + ['netbios_5fresp',['netbios_resp',['../structnetbios__resp.html',1,'']]], + ['netbios_20responder',['NETBIOS responder',['../group__netbiosns.html',1,'']]], + ['netbiosns_2ec',['netbiosns.c',['../netbiosns_8c.html',1,'']]], + ['netbiosns_2eh',['netbiosns.h',['../netbiosns_8h.html',1,'']]], + ['netbiosns_5finit',['netbiosns_init',['../group__netbiosns.html#ga0c696ea25a79e97715c8217901cff66b',1,'netbiosns_init(void): netbiosns.c'],['../group__netbiosns.html#ga0c696ea25a79e97715c8217901cff66b',1,'netbiosns_init(void): netbiosns.c']]], + ['netbiosns_5fopts_2eh',['netbiosns_opts.h',['../netbiosns__opts_8h.html',1,'']]], + ['netbiosns_5fstop',['netbiosns_stop',['../group__netbiosns.html#gaf82174943d25d67b04d44b7fba808806',1,'netbiosns_stop(void): netbiosns.c'],['../group__netbiosns.html#gaf82174943d25d67b04d44b7fba808806',1,'netbiosns_stop(void): netbiosns.c']]], + ['netbuf',['netbuf',['../structnetbuf.html',1,'netbuf'],['../group__netbuf.html',1,'(Global Namespace)']]], + ['netbuf_2ec',['netbuf.c',['../netbuf_8c.html',1,'']]], + ['netbuf_2eh',['netbuf.h',['../netbuf_8h.html',1,'']]], + ['netbuf_5falloc',['netbuf_alloc',['../group__netbuf.html#ga0b831b80d3aa64938abdbfb6d89eaac0',1,'netbuf_alloc(struct netbuf *buf, u16_t size): netbuf.c'],['../group__netbuf.html#ga0b831b80d3aa64938abdbfb6d89eaac0',1,'netbuf_alloc(struct netbuf *buf, u16_t size): netbuf.c']]], + ['netbuf_5fchain',['netbuf_chain',['../group__netbuf.html#ga631e8bddd99b2397cd0b26973c659602',1,'netbuf_chain(struct netbuf *head, struct netbuf *tail): netbuf.c'],['../group__netbuf.html#ga631e8bddd99b2397cd0b26973c659602',1,'netbuf_chain(struct netbuf *head, struct netbuf *tail): netbuf.c']]], + ['netbuf_5fdata',['netbuf_data',['../group__netbuf.html#ga04a54a8476b37c2a8804fed679b6cc01',1,'netbuf_data(struct netbuf *buf, void **dataptr, u16_t *len): netbuf.c'],['../group__netbuf.html#ga04a54a8476b37c2a8804fed679b6cc01',1,'netbuf_data(struct netbuf *buf, void **dataptr, u16_t *len): netbuf.c']]], + ['netbuf_5fdelete',['netbuf_delete',['../group__netbuf.html#ga9dfd3ddfe0ec65009cb140c68404b09d',1,'netbuf_delete(struct netbuf *buf): netbuf.c'],['../group__netbuf.html#ga9dfd3ddfe0ec65009cb140c68404b09d',1,'netbuf_delete(struct netbuf *buf): netbuf.c']]], + ['netbuf_5ffirst',['netbuf_first',['../group__netbuf.html#ga222ad2a2eb871d603b216a87e9f9be51',1,'netbuf_first(struct netbuf *buf): netbuf.c'],['../group__netbuf.html#ga222ad2a2eb871d603b216a87e9f9be51',1,'netbuf_first(struct netbuf *buf): netbuf.c']]], + ['netbuf_5fflag_5fchksum',['NETBUF_FLAG_CHKSUM',['../netbuf_8h.html#ab75db64a9e84eb67a382c30e382d417c',1,'netbuf.h']]], + ['netbuf_5fflag_5fdestaddr',['NETBUF_FLAG_DESTADDR',['../netbuf_8h.html#ab38abb4213df4c00b9b3ab844322a090',1,'netbuf.h']]], + ['netbuf_5ffree',['netbuf_free',['../group__netbuf.html#ga02f82348ac23431a4b1512feae25f26b',1,'netbuf_free(struct netbuf *buf): netbuf.c'],['../group__netbuf.html#ga02f82348ac23431a4b1512feae25f26b',1,'netbuf_free(struct netbuf *buf): netbuf.c']]], + ['netbuf_5fnew',['netbuf_new',['../group__netbuf.html#gaaba704cd963e35e71145de9f5112991d',1,'netbuf_new(void): netbuf.c'],['../group__netbuf.html#gaaba704cd963e35e71145de9f5112991d',1,'netbuf_new(void): netbuf.c']]], + ['netbuf_5fnext',['netbuf_next',['../group__netbuf.html#gaf4e3718d378bb11f2fc8af42ce7b3715',1,'netbuf_next(struct netbuf *buf): netbuf.c'],['../group__netbuf.html#gaf4e3718d378bb11f2fc8af42ce7b3715',1,'netbuf_next(struct netbuf *buf): netbuf.c']]], + ['netbuf_5fref',['netbuf_ref',['../group__netbuf.html#gabdffa0401e4473c9d9100ecbf50e46d2',1,'netbuf_ref(struct netbuf *buf, const void *dataptr, u16_t size): netbuf.c'],['../group__netbuf.html#gabdffa0401e4473c9d9100ecbf50e46d2',1,'netbuf_ref(struct netbuf *buf, const void *dataptr, u16_t size): netbuf.c']]], + ['netconn',['netconn',['../structnetconn.html',1,'netconn'],['../group__netconn.html',1,'(Global Namespace)']]], + ['netconn_5faccept',['netconn_accept',['../group__netconn__tcp.html#ga13593148f60f7bbc6a505b567f175d69',1,'netconn_accept(struct netconn *conn, struct netconn **new_conn): api_lib.c'],['../group__netconn__tcp.html#ga13593148f60f7bbc6a505b567f175d69',1,'netconn_accept(struct netconn *conn, struct netconn **new_conn): api_lib.c']]], + ['netconn_5faddr',['netconn_addr',['../group__netconn__common.html#ga37ec33522cfc26fa57251c33e4cebb3e',1,'api.h']]], + ['netconn_5falloc',['netconn_alloc',['../api__msg_8c.html#a919865fa64270a3e4cb719ddff2fead9',1,'netconn_alloc(enum netconn_type t, netconn_callback callback): api_msg.c'],['../api__msg_8h.html#a919865fa64270a3e4cb719ddff2fead9',1,'netconn_alloc(enum netconn_type t, netconn_callback callback): api_msg.c']]], + ['netconn_5fbind',['netconn_bind',['../group__netconn__common.html#ga63bcc4d7bd150674fa953a1253fa6230',1,'netconn_bind(struct netconn *conn, const ip_addr_t *addr, u16_t port): api_lib.c'],['../group__netconn__common.html#ga63bcc4d7bd150674fa953a1253fa6230',1,'netconn_bind(struct netconn *conn, const ip_addr_t *addr, u16_t port): api_lib.c']]], + ['netconn_5fbind_5fif',['netconn_bind_if',['../group__netconn__common.html#gaa78479deeedcecd3bacade387ac40cc5',1,'netconn_bind_if(struct netconn *conn, u8_t if_idx): api_lib.c'],['../group__netconn__common.html#gaa78479deeedcecd3bacade387ac40cc5',1,'netconn_bind_if(struct netconn *conn, u8_t if_idx): api_lib.c']]], + ['netconn_5fcallback',['netconn_callback',['../api_8h.html#a3e130339f00202b3ab714af502163a2d',1,'api.h']]], + ['netconn_5fclose',['netconn_close',['../group__netconn__tcp.html#ga25bb1c1c9928f91f53149a026e2e2624',1,'netconn_close(struct netconn *conn): api_lib.c'],['../group__netconn__tcp.html#ga25bb1c1c9928f91f53149a026e2e2624',1,'netconn_close(struct netconn *conn): api_lib.c']]], + ['netconn_5fconnect',['netconn_connect',['../group__netconn__common.html#gacba7f74d973872ad0b88b9a96098cf77',1,'netconn_connect(struct netconn *conn, const ip_addr_t *addr, u16_t port): api_lib.c'],['../group__netconn__common.html#gacba7f74d973872ad0b88b9a96098cf77',1,'netconn_connect(struct netconn *conn, const ip_addr_t *addr, u16_t port): api_lib.c']]], + ['netconn_5fdelete',['netconn_delete',['../group__netconn__common.html#gab411221f912a6d9e4c82ac3963989403',1,'netconn_delete(struct netconn *conn): api_lib.c'],['../group__netconn__common.html#gab411221f912a6d9e4c82ac3963989403',1,'netconn_delete(struct netconn *conn): api_lib.c']]], + ['netconn_5fdisconnect',['netconn_disconnect',['../group__netconn__udp.html#ga90bb4c4d1af6602a655b78fce0520402',1,'netconn_disconnect(struct netconn *conn): api_lib.c'],['../group__netconn__udp.html#ga90bb4c4d1af6602a655b78fce0520402',1,'netconn_disconnect(struct netconn *conn): api_lib.c']]], + ['netconn_5ferr',['netconn_err',['../group__netconn__common.html#gab9eccae90351eb6c3d2ca690068445d4',1,'netconn_err(struct netconn *conn): api_lib.c'],['../group__netconn__common.html#gab9eccae90351eb6c3d2ca690068445d4',1,'netconn_err(struct netconn *conn): api_lib.c']]], + ['netconn_5fevt',['netconn_evt',['../api_8h.html#af722260882d14c49afb765293ffb0155',1,'api.h']]], + ['netconn_5ffin_5frx_5fpending',['NETCONN_FIN_RX_PENDING',['../api_8h.html#a24d62a2a03ba421fcf2bdce1ea89b949',1,'api.h']]], + ['netconn_5fflag_5fcheck_5fwritespace',['NETCONN_FLAG_CHECK_WRITESPACE',['../api_8h.html#a9d791955a4256a0589a3844e4e6f0f9c',1,'api.h']]], + ['netconn_5fflag_5fin_5fnonblocking_5fconnect',['NETCONN_FLAG_IN_NONBLOCKING_CONNECT',['../api_8h.html#a70bb861ee643b60ee402fd48f581f58d',1,'api.h']]], + ['netconn_5fflag_5fipv6_5fv6only',['NETCONN_FLAG_IPV6_V6ONLY',['../api_8h.html#a60892e4eb139f10157847fea4266bf5b',1,'api.h']]], + ['netconn_5fflag_5fmboxclosed',['NETCONN_FLAG_MBOXCLOSED',['../api_8h.html#af77be7590d3712259e78103c1dddf63f',1,'api.h']]], + ['netconn_5fflag_5fnon_5fblocking',['NETCONN_FLAG_NON_BLOCKING',['../api_8h.html#abee57aa0ba63e35742d411bc5224900a',1,'api.h']]], + ['netconn_5ffree',['netconn_free',['../api__msg_8c.html#a875b82ad129bdec1c6f2c21cbeedc48b',1,'netconn_free(struct netconn *conn): api_msg.c'],['../api__msg_8h.html#a875b82ad129bdec1c6f2c21cbeedc48b',1,'netconn_free(struct netconn *conn): api_msg.c']]], + ['netconn_5fget_5fipv6only',['netconn_get_ipv6only',['../group__netconn__common.html#gaf001c7d5fbf97c04eb1d9ac7d14c9c31',1,'api.h']]], + ['netconn_5fget_5frecvbufsize',['netconn_get_recvbufsize',['../api_8h.html#ac0298c287dc3823047c378c014ff1eb0',1,'api.h']]], + ['netconn_5fget_5fsendtimeout',['netconn_get_sendtimeout',['../api_8h.html#a7d6e84458eec796b0b0ce1bb247f323f',1,'api.h']]], + ['netconn_5fgetaddr',['netconn_getaddr',['../api__lib_8c.html#a28430d1d86733f1bf98dc31305c42104',1,'netconn_getaddr(struct netconn *conn, ip_addr_t *addr, u16_t *port, u8_t local): api_lib.c'],['../api_8h.html#a28430d1d86733f1bf98dc31305c42104',1,'netconn_getaddr(struct netconn *conn, ip_addr_t *addr, u16_t *port, u8_t local): api_lib.c']]], + ['netconn_5fgethostbyname_5faddrtype',['netconn_gethostbyname_addrtype',['../group__netconn__common.html#gafb3494b149dff96ed8d1acb770ab52f5',1,'netconn_gethostbyname_addrtype(const char *name, ip_addr_t *addr, u8_t dns_addrtype): api_lib.c'],['../group__netconn__common.html#gafb3494b149dff96ed8d1acb770ab52f5',1,'netconn_gethostbyname_addrtype(const char *name, ip_addr_t *addr, u8_t dns_addrtype): api_lib.c']]], + ['netconn_5figmp',['netconn_igmp',['../api_8h.html#a5c6ded2c082de1536019b197a0a912db',1,'api.h']]], + ['netconn_5fis_5fnonblocking',['netconn_is_nonblocking',['../api_8h.html#a5789f0030b895b40625a74deb5a1092f',1,'api.h']]], + ['netconn_5fjoin_5fleave_5fgroup',['netconn_join_leave_group',['../group__netconn__udp.html#gaaaf2f92eeb38dca70b3e6ad98c3c45ed',1,'netconn_join_leave_group(struct netconn *conn, const ip_addr_t *multiaddr, const ip_addr_t *netif_addr, enum netconn_igmp join_or_leave): api_lib.c'],['../group__netconn__udp.html#gaaaf2f92eeb38dca70b3e6ad98c3c45ed',1,'netconn_join_leave_group(struct netconn *conn, const ip_addr_t *multiaddr, const ip_addr_t *netif_addr, enum netconn_igmp join_or_leave): api_lib.c']]], + ['netconn_5fjoin_5fleave_5fgroup_5fnetif',['netconn_join_leave_group_netif',['../group__netconn__udp.html#ga5db2a1cf06a5fbb36f433e637da8729b',1,'netconn_join_leave_group_netif(struct netconn *conn, const ip_addr_t *multiaddr, u8_t if_idx, enum netconn_igmp join_or_leave): api_lib.c'],['../group__netconn__udp.html#ga5db2a1cf06a5fbb36f433e637da8729b',1,'netconn_join_leave_group_netif(struct netconn *conn, const ip_addr_t *multiaddr, u8_t if_idx, enum netconn_igmp join_or_leave): api_lib.c']]], + ['netconn_5flisten',['netconn_listen',['../group__netconn__tcp.html#ga43e3f4c2169dec0f666c502e490416b7',1,'api.h']]], + ['netconn_5flisten_5fwith_5fbacklog',['netconn_listen_with_backlog',['../group__netconn__tcp.html#ga84333ba8e7cdf45558d2b4795f53265d',1,'netconn_listen_with_backlog(struct netconn *conn, u8_t backlog): api_lib.c'],['../group__netconn__tcp.html#ga84333ba8e7cdf45558d2b4795f53265d',1,'netconn_listen_with_backlog(struct netconn *conn, u8_t backlog): api_lib.c']]], + ['netconn_5fnew',['netconn_new',['../group__netconn__common.html#gab2bd1d5e633e14e428cfc0ca908d5e0c',1,'api.h']]], + ['netconn_5fnew_5fwith_5fproto_5fand_5fcallback',['netconn_new_with_proto_and_callback',['../api__lib_8c.html#ad0a0434e5ff08bb350740cb840e2aca8',1,'netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto, netconn_callback callback): api_lib.c'],['../api_8h.html#ad0a0434e5ff08bb350740cb840e2aca8',1,'netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto, netconn_callback callback): api_lib.c']]], + ['netconn_5fpeer',['netconn_peer',['../group__netconn__common.html#ga1065e769f2276270722a7700182077bc',1,'api.h']]], + ['netconn_5fprepare_5fdelete',['netconn_prepare_delete',['../group__netconn__common.html#gad5c079af0ad791a92fe9dade375744f0',1,'netconn_prepare_delete(struct netconn *conn): api_lib.c'],['../group__netconn__common.html#gad5c079af0ad791a92fe9dade375744f0',1,'netconn_prepare_delete(struct netconn *conn): api_lib.c']]], + ['netconn_5fraw',['NETCONN_RAW',['../group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a0d828a7e9c1614d4cae56602b09f39e9',1,'api.h']]], + ['netconn_5frecv',['netconn_recv',['../group__netconn__common.html#ga50490bab058f4e740798beffcf48cabf',1,'netconn_recv(struct netconn *conn, struct netbuf **new_buf): api_lib.c'],['../group__netconn__common.html#ga50490bab058f4e740798beffcf48cabf',1,'netconn_recv(struct netconn *conn, struct netbuf **new_buf): api_lib.c']]], + ['netconn_5frecv_5ftcp_5fpbuf',['netconn_recv_tcp_pbuf',['../group__netconn__tcp.html#ga6893cb7648733d1f05696bac94e10490',1,'netconn_recv_tcp_pbuf(struct netconn *conn, struct pbuf **new_buf): api_lib.c'],['../group__netconn__tcp.html#ga6893cb7648733d1f05696bac94e10490',1,'netconn_recv_tcp_pbuf(struct netconn *conn, struct pbuf **new_buf): api_lib.c']]], + ['netconn_5frecv_5ftcp_5fpbuf_5fflags',['netconn_recv_tcp_pbuf_flags',['../group__netconn__tcp.html#gabb8a242c445ef928c23258a2b2344294',1,'netconn_recv_tcp_pbuf_flags(struct netconn *conn, struct pbuf **new_buf, u8_t apiflags): api_lib.c'],['../group__netconn__tcp.html#gabb8a242c445ef928c23258a2b2344294',1,'netconn_recv_tcp_pbuf_flags(struct netconn *conn, struct pbuf **new_buf, u8_t apiflags): api_lib.c']]], + ['netconn_5frecv_5fudp_5fraw_5fnetbuf',['netconn_recv_udp_raw_netbuf',['../api__lib_8c.html#a805a90b546c5a149f04782351633979b',1,'netconn_recv_udp_raw_netbuf(struct netconn *conn, struct netbuf **new_buf): api_lib.c'],['../api_8h.html#a805a90b546c5a149f04782351633979b',1,'netconn_recv_udp_raw_netbuf(struct netconn *conn, struct netbuf **new_buf): api_lib.c']]], + ['netconn_5frecv_5fudp_5fraw_5fnetbuf_5fflags',['netconn_recv_udp_raw_netbuf_flags',['../api__lib_8c.html#a505c3b8e400babf9681e09c945b7f421',1,'netconn_recv_udp_raw_netbuf_flags(struct netconn *conn, struct netbuf **new_buf, u8_t apiflags): api_lib.c'],['../api_8h.html#a505c3b8e400babf9681e09c945b7f421',1,'netconn_recv_udp_raw_netbuf_flags(struct netconn *conn, struct netbuf **new_buf, u8_t apiflags): api_lib.c']]], + ['netconn_5fsend',['netconn_send',['../group__netconn__udp.html#gac4d4d10153d47c80a783c34b27c66238',1,'netconn_send(struct netconn *conn, struct netbuf *buf): api_lib.c'],['../group__netconn__udp.html#gac4d4d10153d47c80a783c34b27c66238',1,'netconn_send(struct netconn *conn, struct netbuf *buf): api_lib.c']]], + ['netconn_5fsendto',['netconn_sendto',['../group__netconn__udp.html#ga8e1d852119bda1e1b602c2995282ef0c',1,'netconn_sendto(struct netconn *conn, struct netbuf *buf, const ip_addr_t *addr, u16_t port): api_lib.c'],['../group__netconn__udp.html#ga8e1d852119bda1e1b602c2995282ef0c',1,'netconn_sendto(struct netconn *conn, struct netbuf *buf, const ip_addr_t *addr, u16_t port): api_lib.c']]], + ['netconn_5fset_5fipv6only',['netconn_set_ipv6only',['../group__netconn__common.html#gae56911e2d92bebf43d73e116530e41f1',1,'api.h']]], + ['netconn_5fset_5fnonblocking',['netconn_set_nonblocking',['../api_8h.html#a6a578dd5b55e4457e0d23574ec9c55bb',1,'api.h']]], + ['netconn_5fset_5frecvbufsize',['netconn_set_recvbufsize',['../api_8h.html#a04785274634a5b504c760731c2e70725',1,'api.h']]], + ['netconn_5fset_5fsendtimeout',['netconn_set_sendtimeout',['../api_8h.html#a3ce3ad9f660e99b11fec20cafaf8f016',1,'api.h']]], + ['netconn_5fshutdown',['netconn_shutdown',['../group__netconn__tcp.html#ga6ec6b2cf7b0f59e9371e38ae7dea2a63',1,'netconn_shutdown(struct netconn *conn, u8_t shut_rx, u8_t shut_tx): api_lib.c'],['../group__netconn__tcp.html#ga6ec6b2cf7b0f59e9371e38ae7dea2a63',1,'netconn_shutdown(struct netconn *conn, u8_t shut_rx, u8_t shut_tx): api_lib.c']]], + ['netconn_5fstate',['netconn_state',['../api_8h.html#a2c6c9c1869f443c5ec7b31180a44fada',1,'api.h']]], + ['netconn_5ftcp',['NETCONN_TCP',['../group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a75d14318b91af7a452230189f47e5e1a',1,'api.h']]], + ['netconn_5ftcp_5fipv6',['NETCONN_TCP_IPV6',['../group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91ae7efa7c4e50b7b381531a2136cd5a013',1,'api.h']]], + ['netconn_5ftype',['netconn_type',['../api_8h.html#a62cd17ad03bb2817cb0c419e1c9790b1',1,'netconn_type(): api.h'],['../group__netconn__common.html#gaaba260d28d105fb4bce9185fd0300d91',1,'netconn_type(): api.h']]], + ['netconn_5fudp',['NETCONN_UDP',['../group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a6b8ec191d69f7e639f4ab40779069636',1,'api.h']]], + ['netconn_5fudp_5fipv6',['NETCONN_UDP_IPV6',['../group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a34ee1c89f6705462590a4fe2c9772d9e',1,'api.h']]], + ['netconn_5fudplite',['NETCONN_UDPLITE',['../group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a655e1625cc7e6a93f1e3d2646f56a1e4',1,'api.h']]], + ['netconn_5fudplite_5fipv6',['NETCONN_UDPLITE_IPV6',['../group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91aa9cabc9d90606b5c5939fcc02ac588c7',1,'api.h']]], + ['netconn_5fudpnochksum',['NETCONN_UDPNOCHKSUM',['../group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a7e0c3f566b3d4321b36b711b6b1ad6de',1,'api.h']]], + ['netconn_5fudpnochksum_5fipv6',['NETCONN_UDPNOCHKSUM_IPV6',['../group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a2c7f548d26f6c411f084b6c59247b60e',1,'api.h']]], + ['netconn_5fwrite',['netconn_write',['../group__netconn__tcp.html#gafea5e9b90770a7c6cd0762ceb65e5b46',1,'api.h']]], + ['netconn_5fwrite_5fpartly',['netconn_write_partly',['../group__netconn__tcp.html#gacf9ce6f71652739d6be2ca83f7c423bf',1,'netconn_write_partly(struct netconn *conn, const void *dataptr, size_t size, u8_t apiflags, size_t *bytes_written): api_lib.c'],['../group__netconn__tcp.html#gacf9ce6f71652739d6be2ca83f7c423bf',1,'netconn_write_partly(struct netconn *conn, const void *dataptr, size_t size, u8_t apiflags, size_t *bytes_written): api_lib.c']]], + ['netconn_5fwrite_5fvectors_5fpartly',['netconn_write_vectors_partly',['../api__lib_8c.html#a992b4fe8a855fd94861738f7260d0a32',1,'netconn_write_vectors_partly(struct netconn *conn, struct netvector *vectors, u16_t vectorcnt, u8_t apiflags, size_t *bytes_written): api_lib.c'],['../api_8h.html#a992b4fe8a855fd94861738f7260d0a32',1,'netconn_write_vectors_partly(struct netconn *conn, struct netvector *vectors, u16_t vectorcnt, u8_t apiflags, size_t *bytes_written): api_lib.c']]], + ['netdb_2ec',['netdb.c',['../netdb_8c.html',1,'']]], + ['netdb_2eh',['netdb.h',['../compat_2posix_2netdb_8h.html',1,'(Global Namespace)'],['../lwip_2netdb_8h.html',1,'(Global Namespace)']]], + ['netdb_20api',['NETDB API',['../group__netdbapi.html',1,'']]], + ['netif',['netif',['../structnetif.html',1,'netif'],['../structmdns__packet.html#ac7307f344f654cb954f92d578dc7c989',1,'mdns_packet::netif()'],['../structmdns__outpacket.html#ad0bd066f127d35a0ce67193e1cd07430',1,'mdns_outpacket::netif()'],['../group__netif.html',1,'(Global Namespace)']]], + ['netif_2ec',['netif.c',['../netif_8c.html',1,'']]], + ['netif_2eh',['netif.h',['../netif_8h.html',1,'']]], + ['netif_5fadd',['netif_add',['../group__netif.html#gade5498543e74067f28cc6bef0209e3be',1,'netif_add(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input): netif.c'],['../group__netif.html#gade5498543e74067f28cc6bef0209e3be',1,'netif_add(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input): netif.c']]], + ['netif_5fadd_5fext_5fcallback',['netif_add_ext_callback',['../group__netif.html#ga3efc2b72f75936d50708247420c9d1d9',1,'netif_add_ext_callback(netif_ext_callback_t *callback, netif_ext_callback_fn fn): netif.c'],['../group__netif.html#ga3efc2b72f75936d50708247420c9d1d9',1,'netif_add_ext_callback(netif_ext_callback_t *callback, netif_ext_callback_fn fn): netif.c']]], + ['netif_5fadd_5fip6_5faddress',['netif_add_ip6_address',['../group__netif__ip6.html#gab0727fba5f5b3fed8d7013775506f327',1,'netif_add_ip6_address(struct netif *netif, const ip6_addr_t *ip6addr, s8_t *chosen_idx): netif.c'],['../group__netif__ip6.html#gab0727fba5f5b3fed8d7013775506f327',1,'netif_add_ip6_address(struct netif *netif, const ip6_addr_t *ip6addr, s8_t *chosen_idx): netif.c']]], + ['netif_5fadd_5fmac_5ffilter',['NETIF_ADD_MAC_FILTER',['../netif_8h.html#ab194ec4241fad8b6e9aac51e3ec23de0a4186fbaf94be956ea1a3b02cd1cccb1f',1,'netif.h']]], + ['netif_5fadd_5fnoaddr',['netif_add_noaddr',['../group__netif.html#gac20150ac754ff1f88afeaa33be3552a4',1,'netif_add_noaddr(struct netif *netif, void *state, netif_init_fn init, netif_input_fn input): netif.c'],['../group__netif.html#gac20150ac754ff1f88afeaa33be3552a4',1,'netif_add_noaddr(struct netif *netif, void *state, netif_init_fn init, netif_input_fn input): netif.c']]], + ['netif_5falloc_5fclient_5fdata_5fid',['netif_alloc_client_data_id',['../group__netif__cd.html#ga55d62d43b5a9a5527f0116ec38369978',1,'netif_alloc_client_data_id(void): netif.c'],['../group__netif__cd.html#ga55d62d43b5a9a5527f0116ec38369978',1,'netif_alloc_client_data_id(void): netif.c']]], + ['netif_5fcreate_5fip6_5flinklocal_5faddress',['netif_create_ip6_linklocal_address',['../group__netif__ip6.html#gae864211a5eb052deb5da7bc7e3427fb9',1,'netif_create_ip6_linklocal_address(struct netif *netif, u8_t from_mac_48bit): netif.c'],['../group__netif__ip6.html#gae864211a5eb052deb5da7bc7e3427fb9',1,'netif_create_ip6_linklocal_address(struct netif *netif, u8_t from_mac_48bit): netif.c']]], + ['netif_5fdebug',['NETIF_DEBUG',['../group__lwip__opts__debugmsg.html#ga2dfad02b075a7f9a8791a66fe40864a4',1,'opt.h']]], + ['netif_5fdefault',['netif_default',['../netif_8c.html#a3d0925cbce550ed461907aee816713ba',1,'netif_default(): netif.c'],['../netif_8h.html#a3d0925cbce550ed461907aee816713ba',1,'netif_default(): netif.c']]], + ['netif_5fdel_5fmac_5ffilter',['NETIF_DEL_MAC_FILTER',['../netif_8h.html#ab194ec4241fad8b6e9aac51e3ec23de0a7ad3406353906deb4e64ebeed349e07e',1,'netif.h']]], + ['netif_5fext_5fcallback_5fargs_5ft',['netif_ext_callback_args_t',['../unionnetif__ext__callback__args__t.html',1,'']]], + ['netif_5fext_5fcallback_5ffn',['netif_ext_callback_fn',['../group__netif.html#ga5ee213cea065424c89c66f138c008da1',1,'netif.h']]], + ['netif_5ffind',['netif_find',['../group__netif.html#ga69c93a139e8a1f6ef4e3d076a2897def',1,'netif_find(const char *name): netif.c'],['../group__netif.html#ga69c93a139e8a1f6ef4e3d076a2897def',1,'netif_find(const char *name): netif.c']]], + ['netif_5fflag_5fbroadcast',['NETIF_FLAG_BROADCAST',['../group__netif__flags.html#gaef64fe15c82bc7b235366923e517104e',1,'netif.h']]], + ['netif_5fflag_5fetharp',['NETIF_FLAG_ETHARP',['../group__netif__flags.html#ga92448dc510bc8d700c09e5c971ef0676',1,'netif.h']]], + ['netif_5fflag_5fethernet',['NETIF_FLAG_ETHERNET',['../group__netif__flags.html#ga76ad9d0cf9f029df0ab2a998c64040dc',1,'netif.h']]], + ['netif_5fflag_5figmp',['NETIF_FLAG_IGMP',['../group__netif__flags.html#gac9493b923d733c73f6006d9714826558',1,'netif.h']]], + ['netif_5fflag_5flink_5fup',['NETIF_FLAG_LINK_UP',['../group__netif__flags.html#ga75f5a2b9276c93e3bd18a568459fd2d8',1,'netif.h']]], + ['netif_5fflag_5fmld6',['NETIF_FLAG_MLD6',['../group__netif__flags.html#gab14fbe1447d2fdbdf5abc87f51eb6508',1,'netif.h']]], + ['netif_5fflag_5fup',['NETIF_FLAG_UP',['../group__netif__flags.html#gab47d7d130693dc155f480a5bf447725e',1,'netif.h']]], + ['netif_5fget_5fby_5findex',['netif_get_by_index',['../group__netif.html#gae4df885347c800a5486d3bf25981300e',1,'netif_get_by_index(u8_t idx): netif.c'],['../group__netif.html#gae4df885347c800a5486d3bf25981300e',1,'netif_get_by_index(u8_t idx): netif.c']]], + ['netif_5fget_5fclient_5fdata',['netif_get_client_data',['../group__netif__cd.html#ga4bce01ddbf0fd70cb88431f773c91bc5',1,'netif.h']]], + ['netif_5fget_5fhostname',['netif_get_hostname',['../group__netif.html#ga5a378ba73e60cd1e5235474f0db22978',1,'netif.h']]], + ['netif_5fget_5fip6_5faddr_5fmatch',['netif_get_ip6_addr_match',['../netif_8c.html#a0ec111195bcc452f77895ad35aedd7dc',1,'netif_get_ip6_addr_match(struct netif *netif, const ip6_addr_t *ip6addr): netif.c'],['../netif_8h.html#a0ec111195bcc452f77895ad35aedd7dc',1,'netif_get_ip6_addr_match(struct netif *netif, const ip6_addr_t *ip6addr): netif.c']]], + ['netif_5figmp_5fdata',['netif_igmp_data',['../group__igmp.html#gad990dfc5ed8b644c16cc578c876e588d',1,'igmp.h']]], + ['netif_5figmp_5fmac_5ffilter_5ffn',['netif_igmp_mac_filter_fn',['../netif_8h.html#a71cad3277efe29191eef3348f4bf21f7',1,'netif.h']]], + ['netif_5findex_5fto_5fname',['netif_index_to_name',['../group__netif.html#ga3ff104d083914e87a7805a0b90a85755',1,'netif_index_to_name(u8_t idx, char *name): netif.c'],['../group__netif.html#ga3ff104d083914e87a7805a0b90a85755',1,'netif_index_to_name(u8_t idx, char *name): netif.c']]], + ['netif_5finit_5ffn',['netif_init_fn',['../netif_8h.html#a2b02a78a8769925ff8e4f83d34e5e1f5',1,'netif.h']]], + ['netif_5finput',['netif_input',['../group__lwip__nosys.html#ga5532f93d68c874fb99c681bff2165385',1,'netif_input(struct pbuf *p, struct netif *inp): netif.c'],['../group__lwip__nosys.html#ga5532f93d68c874fb99c681bff2165385',1,'netif_input(struct pbuf *p, struct netif *inp): netif.c']]], + ['netif_5finput_5ffn',['netif_input_fn',['../netif_8h.html#ab2302b1b64ac7b95f24c6bab754a575e',1,'netif.h']]], + ['netif_5finvoke_5fext_5fcallback',['netif_invoke_ext_callback',['../netif_8c.html#a75b5298b1c3c3794747d78a4ce95d81c',1,'netif_invoke_ext_callback(struct netif *netif, netif_nsc_reason_t reason, const netif_ext_callback_args_t *args): netif.c'],['../netif_8h.html#a75b5298b1c3c3794747d78a4ce95d81c',1,'netif_invoke_ext_callback(struct netif *netif, netif_nsc_reason_t reason, const netif_ext_callback_args_t *args): netif.c']]], + ['netif_5fip4_5faddr',['netif_ip4_addr',['../group__netif__ip4.html#gac9b6e63b5dd2968fe0a4813f3eefb55d',1,'netif.h']]], + ['netif_5fip4_5fgw',['netif_ip4_gw',['../group__netif__ip4.html#ga86d69faf416765b7f8faf60a43cc50da',1,'netif.h']]], + ['netif_5fip4_5fnetmask',['netif_ip4_netmask',['../group__netif__ip4.html#ga952d1436f2428b92fc8197bcf2f8fca3',1,'netif.h']]], + ['netif_5fip6_5faddr',['netif_ip6_addr',['../group__netif__ip6.html#ga7ec0623f1a858a0cdb187beaa89df365',1,'netif.h']]], + ['netif_5fip6_5faddr_5fset',['netif_ip6_addr_set',['../group__netif__ip6.html#gae21572fdbd8664d22a1b281a6c31c9bb',1,'netif_ip6_addr_set(struct netif *netif, s8_t addr_idx, const ip6_addr_t *addr6): netif.c'],['../group__netif__ip6.html#gae21572fdbd8664d22a1b281a6c31c9bb',1,'netif_ip6_addr_set(struct netif *netif, s8_t addr_idx, const ip6_addr_t *addr6): netif.c']]], + ['netif_5fip6_5faddr_5fset_5fstate',['netif_ip6_addr_set_state',['../group__netif__ip6.html#ga9cde7286535c7f037a9b16052561b91f',1,'netif_ip6_addr_set_state(struct netif *netif, s8_t addr_idx, u8_t state): netif.c'],['../group__netif__ip6.html#ga9cde7286535c7f037a9b16052561b91f',1,'netif_ip6_addr_set_state(struct netif *netif, s8_t addr_idx, u8_t state): netif.c']]], + ['netif_5fip_5faddr4',['netif_ip_addr4',['../group__netif__ip4.html#ga54179a2f3b7cc35b23ee8d692d8d8022',1,'netif.h']]], + ['netif_5fip_5faddr6',['netif_ip_addr6',['../group__netif__ip6.html#gae424e336fe9f013b30d4065fd35c91ee',1,'netif.h']]], + ['netif_5fip_5fgw4',['netif_ip_gw4',['../group__netif__ip4.html#ga7ea95478e000701423b7f6316e575a2a',1,'netif.h']]], + ['netif_5fip_5fnetmask4',['netif_ip_netmask4',['../group__netif__ip4.html#ga58518602f388d2640985a01a312f0a51',1,'netif.h']]], + ['netif_5fis_5flink_5fup',['netif_is_link_up',['../netif_8h.html#a780be4c3fa9f7f2534f7865666c3a1b8',1,'netif.h']]], + ['netif_5fis_5fup',['netif_is_up',['../group__netif.html#ga94a4c24c988afc0a577387730f303b19',1,'netif.h']]], + ['netif_5flinkoutput_5ffn',['netif_linkoutput_fn',['../netif_8h.html#ab75e9d808bc1b788bea84213e6a111ed',1,'netif.h']]], + ['netif_5flist',['netif_list',['../netif_8c.html#a1c8141eaa98f6dc6dfddbb23a706656c',1,'netif_list(): netif.c'],['../netif_8h.html#a1c8141eaa98f6dc6dfddbb23a706656c',1,'netif_list(): netif.c']]], + ['netif_5floop_5foutput',['netif_loop_output',['../group__netif.html#ga691f1cc7c9778ffa62a3843c184404b2',1,'netif_loop_output(struct netif *netif, struct pbuf *p): netif.c'],['../group__netif.html#ga691f1cc7c9778ffa62a3843c184404b2',1,'netif_loop_output(struct netif *netif, struct pbuf *p): netif.c']]], + ['netif_5fmac_5ffilter_5faction',['netif_mac_filter_action',['../netif_8h.html#ab194ec4241fad8b6e9aac51e3ec23de0',1,'netif.h']]], + ['netif_5fmax_5fhwaddr_5flen',['NETIF_MAX_HWADDR_LEN',['../netif_8h.html#ab887a8ec553de1be1d04cf2961c63c41',1,'netif.h']]], + ['netif_5fmld6_5fdata',['netif_mld6_data',['../group__mld6.html#ga02a2259082f22c5989a3c929be95e641',1,'mld6.h']]], + ['netif_5fmld_5fmac_5ffilter_5ffn',['netif_mld_mac_filter_fn',['../netif_8h.html#af2ed0716122b65e7feb43e0dd99ae468',1,'netif.h']]], + ['netif_5fname_5fto_5findex',['netif_name_to_index',['../group__netif.html#gac763a1f647fb9e8af4254418e813a6ae',1,'netif_name_to_index(const char *name): netif.c'],['../group__netif.html#gac763a1f647fb9e8af4254418e813a6ae',1,'netif_name_to_index(const char *name): netif.c']]], + ['netif_5fnamesize',['NETIF_NAMESIZE',['../netif_8h.html#a302f24fbfe883ee4840ffc71f267ae2a',1,'netif.h']]], + ['netif_5fnsc_5freason_5ft',['netif_nsc_reason_t',['../group__netif.html#gab2b9387389513a02027c62e246723808',1,'netif.h']]], + ['netif_5foutput_5ffn',['netif_output_fn',['../netif_8h.html#a7b4893aa2ed8c606a0cd7aa932fe5067',1,'netif.h']]], + ['netif_5foutput_5fip6_5ffn',['netif_output_ip6_fn',['../netif_8h.html#a343a5b14136a51957d552527384674b3',1,'netif.h']]], + ['netif_5fpoll',['netif_poll',['../netif_8c.html#a0fbaed78253d21e1b54e65651da3e327',1,'netif_poll(struct netif *netif): netif.c'],['../netif_8h.html#a0fbaed78253d21e1b54e65651da3e327',1,'netif_poll(struct netif *netif): netif.c']]], + ['netif_5fremove',['netif_remove',['../group__netif.html#ga9c6e541f0c184e1ea61a5cd8afe3e979',1,'netif_remove(struct netif *netif): netif.c'],['../group__netif.html#ga9c6e541f0c184e1ea61a5cd8afe3e979',1,'netif_remove(struct netif *netif): netif.c']]], + ['netif_5fremove_5fext_5fcallback',['netif_remove_ext_callback',['../group__netif.html#ga1d91ac26b0993a9a3466b317ab5ec716',1,'netif_remove_ext_callback(netif_ext_callback_t *callback): netif.c'],['../group__netif.html#ga1d91ac26b0993a9a3466b317ab5ec716',1,'netif_remove_ext_callback(netif_ext_callback_t *callback): netif.c']]], + ['netif_5fset_5faddr',['netif_set_addr',['../group__netif__ip4.html#ga85e31a68e96390dab2feffb11f4948a1',1,'netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw): netif.c'],['../group__netif__ip4.html#ga85e31a68e96390dab2feffb11f4948a1',1,'netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw): netif.c']]], + ['netif_5fset_5fclient_5fdata',['netif_set_client_data',['../group__netif__cd.html#ga5ce61a277e1951183f7b7d03742c231f',1,'netif.h']]], + ['netif_5fset_5fdefault',['netif_set_default',['../group__netif.html#gac90f290edd005238d62aa94c4ac9dea3',1,'netif_set_default(struct netif *netif): netif.c'],['../group__netif.html#gac90f290edd005238d62aa94c4ac9dea3',1,'netif_set_default(struct netif *netif): netif.c']]], + ['netif_5fset_5fdown',['netif_set_down',['../group__netif.html#ga641d07ed8c31fe5306bc01605a6790cf',1,'netif_set_down(struct netif *netif): netif.c'],['../group__netif.html#ga641d07ed8c31fe5306bc01605a6790cf',1,'netif_set_down(struct netif *netif): netif.c']]], + ['netif_5fset_5fgw',['netif_set_gw',['../group__netif__ip4.html#ga841876c274c3c90898579f9e12f3b520',1,'netif_set_gw(struct netif *netif, const ip4_addr_t *gw): netif.c'],['../group__netif__ip4.html#ga841876c274c3c90898579f9e12f3b520',1,'netif_set_gw(struct netif *netif, const ip4_addr_t *gw): netif.c']]], + ['netif_5fset_5fhostname',['netif_set_hostname',['../group__netif.html#ga5e5d2c6fa5566a24dd848f3a2c7c957f',1,'netif.h']]], + ['netif_5fset_5figmp_5fmac_5ffilter',['netif_set_igmp_mac_filter',['../group__netif.html#ga3428b3f8195249c6cd8704a4db46b401',1,'netif.h']]], + ['netif_5fset_5fipaddr',['netif_set_ipaddr',['../group__netif__ip4.html#ga73b043a7ec0e4899aba8433ec9064cca',1,'netif_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr): netif.c'],['../group__netif__ip4.html#ga73b043a7ec0e4899aba8433ec9064cca',1,'netif_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr): netif.c']]], + ['netif_5fset_5flink_5fcallback',['netif_set_link_callback',['../group__netif.html#ga1cd45910add90e267e33d680bbc3f0f4',1,'netif_set_link_callback(struct netif *netif, netif_status_callback_fn link_callback): netif.c'],['../group__netif.html#ga1cd45910add90e267e33d680bbc3f0f4',1,'netif_set_link_callback(struct netif *netif, netif_status_callback_fn link_callback): netif.c']]], + ['netif_5fset_5flink_5fdown',['netif_set_link_down',['../group__netif.html#ga34e37a1e8e358760dc1c43887922c7db',1,'netif_set_link_down(struct netif *netif): netif.c'],['../group__netif.html#ga34e37a1e8e358760dc1c43887922c7db',1,'netif_set_link_down(struct netif *netif): netif.c']]], + ['netif_5fset_5flink_5fup',['netif_set_link_up',['../group__netif.html#gae0d2975f189277990e9d5276fdd9e9ea',1,'netif_set_link_up(struct netif *netif): netif.c'],['../group__netif.html#gae0d2975f189277990e9d5276fdd9e9ea',1,'netif_set_link_up(struct netif *netif): netif.c']]], + ['netif_5fset_5fmld_5fmac_5ffilter',['netif_set_mld_mac_filter',['../group__netif.html#ga97f30bb5542e4c07d3b32e3c754e104c',1,'netif.h']]], + ['netif_5fset_5fnetmask',['netif_set_netmask',['../group__netif__ip4.html#ga0bdd7c057c2f55f670853e3906014a53',1,'netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask): netif.c'],['../group__netif__ip4.html#ga0bdd7c057c2f55f670853e3906014a53',1,'netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask): netif.c']]], + ['netif_5fset_5fremove_5fcallback',['netif_set_remove_callback',['../group__netif.html#ga319c88da0fdf25c1fee1595299bc35ce',1,'netif_set_remove_callback(struct netif *netif, netif_status_callback_fn remove_callback): netif.c'],['../group__netif.html#ga319c88da0fdf25c1fee1595299bc35ce',1,'netif_set_remove_callback(struct netif *netif, netif_status_callback_fn remove_callback): netif.c']]], + ['netif_5fset_5fstatus_5fcallback',['netif_set_status_callback',['../group__netif.html#gadc8787b23ac0ee023979cbadf87813d4',1,'netif_set_status_callback(struct netif *netif, netif_status_callback_fn status_callback): netif.c'],['../group__netif.html#gadc8787b23ac0ee023979cbadf87813d4',1,'netif_set_status_callback(struct netif *netif, netif_status_callback_fn status_callback): netif.c']]], + ['netif_5fset_5fup',['netif_set_up',['../group__netif.html#gaf19693be401a265a52d2a56c65753121',1,'netif_set_up(struct netif *netif): netif.c'],['../group__netif.html#gaf19693be401a265a52d2a56c65753121',1,'netif_set_up(struct netif *netif): netif.c']]], + ['netif_5fstatus_5fcallback_5ffn',['netif_status_callback_fn',['../netif_8h.html#a447d0a7e7c6e2396557c287b8b8c9436',1,'netif.h']]], + ['netif_5fto_5fnum',['netif_to_num',['../snmp__core_8c.html#a871aa636806c7d68cbe24572598e59de',1,'netif_to_num(const struct netif *netif): snmp_core.c'],['../snmp__core_8h.html#a871aa636806c7d68cbe24572598e59de',1,'netif_to_num(const struct netif *netif): snmp_core.c']]], + ['netif_20api',['NETIF API',['../group__netifapi.html',1,'']]], + ['netifapi_2ec',['netifapi.c',['../netifapi_8c.html',1,'']]], + ['netifapi_2eh',['netifapi.h',['../netifapi_8h.html',1,'']]], + ['netifapi_5farp_5fadd',['netifapi_arp_add',['../netifapi_8c.html#a62b0bdbb3783eb27aa73485081306119',1,'netifapi_arp_add(const ip4_addr_t *ipaddr, struct eth_addr *ethaddr, enum netifapi_arp_entry type): netifapi.c'],['../netifapi_8h.html#a62b0bdbb3783eb27aa73485081306119',1,'netifapi_arp_add(const ip4_addr_t *ipaddr, struct eth_addr *ethaddr, enum netifapi_arp_entry type): netifapi.c']]], + ['netifapi_5farp_5fremove',['netifapi_arp_remove',['../netifapi_8c.html#a037c3d05c19b4d467b6ce06eb4639ee8',1,'netifapi_arp_remove(const ip4_addr_t *ipaddr, enum netifapi_arp_entry type): netifapi.c'],['../netifapi_8h.html#a037c3d05c19b4d467b6ce06eb4639ee8',1,'netifapi_arp_remove(const ip4_addr_t *ipaddr, enum netifapi_arp_entry type): netifapi.c']]], + ['netifapi_5fautoip_5fstart',['netifapi_autoip_start',['../group__netifapi__autoip.html#gaca26bae2a21e0732a7599df14f880af2',1,'netifapi.h']]], + ['netifapi_5fautoip_5fstop',['netifapi_autoip_stop',['../group__netifapi__autoip.html#gae604f96907a52557e4ebd1bd5d80071d',1,'netifapi.h']]], + ['netifapi_5fdhcp_5finform',['netifapi_dhcp_inform',['../group__netifapi__dhcp4.html#ga29108975e9aa6463b9a574de961317e0',1,'netifapi.h']]], + ['netifapi_5fdhcp_5frelease',['netifapi_dhcp_release',['../group__netifapi__dhcp4.html#ga5aeaee24c11128df90a56fe091c9d409',1,'netifapi.h']]], + ['netifapi_5fdhcp_5frelease_5fand_5fstop',['netifapi_dhcp_release_and_stop',['../group__netifapi__dhcp4.html#ga1971af04f882f5afdb3ade454a680134',1,'netifapi.h']]], + ['netifapi_5fdhcp_5frenew',['netifapi_dhcp_renew',['../group__netifapi__dhcp4.html#ga642390e5efa53ad3095e01331c6a936b',1,'netifapi.h']]], + ['netifapi_5fdhcp_5fstart',['netifapi_dhcp_start',['../group__netifapi__dhcp4.html#gae64d13afc6e3b0f21aae04b66d0e3765',1,'netifapi.h']]], + ['netifapi_5fdhcp_5fstop',['netifapi_dhcp_stop',['../group__netifapi__dhcp4.html#ga2322c0d0e3eb6c1097d6f3942905dbd5',1,'netifapi.h']]], + ['netif_20related',['NETIF related',['../group__netifapi__netif.html',1,'']]], + ['netifapi_5fnetif_5fadd',['netifapi_netif_add',['../group__netifapi__netif.html#gacc063c5a3071e34eec7376651e35a519',1,'netifapi_netif_add(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input): netifapi.c'],['../group__netifapi__netif.html#gacc063c5a3071e34eec7376651e35a519',1,'netifapi_netif_add(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input): netifapi.c']]], + ['netifapi_5fnetif_5fcommon',['netifapi_netif_common',['../netifapi_8c.html#a26fd83042b53b2ff82e15262ed72f0a7',1,'netifapi_netif_common(struct netif *netif, netifapi_void_fn voidfunc, netifapi_errt_fn errtfunc): netifapi.c'],['../netifapi_8h.html#a26fd83042b53b2ff82e15262ed72f0a7',1,'netifapi_netif_common(struct netif *netif, netifapi_void_fn voidfunc, netifapi_errt_fn errtfunc): netifapi.c']]], + ['netifapi_5fnetif_5findex_5fto_5fname',['netifapi_netif_index_to_name',['../group__netifapi__netif.html#gab7914d77d0a89fd6c31048feb0bdafb6',1,'netifapi.c']]], + ['netifapi_5fnetif_5fname_5fto_5findex',['netifapi_netif_name_to_index',['../group__netifapi__netif.html#gad4a821182d01eafa4ca258f958fcb089',1,'netifapi.c']]], + ['netifapi_5fnetif_5fremove',['netifapi_netif_remove',['../group__netifapi__netif.html#ga0e3f522b900a0ba04421c4587e790373',1,'netifapi.h']]], + ['netifapi_5fnetif_5fset_5faddr',['netifapi_netif_set_addr',['../group__netifapi__netif.html#ga31755ea6dbb213236bfce19bcbe8c973',1,'netifapi_netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw): netifapi.c'],['../group__netifapi__netif.html#ga31755ea6dbb213236bfce19bcbe8c973',1,'netifapi_netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw): netifapi.c']]], + ['netifapi_5fnetif_5fset_5fdefault',['netifapi_netif_set_default',['../group__netifapi__netif.html#ga862d6cfa5d36b2c36d7b1671e8d95ccf',1,'netifapi.h']]], + ['netifapi_5fnetif_5fset_5fdown',['netifapi_netif_set_down',['../group__netifapi__netif.html#ga22c02edde32743ccfd41924da0601a16',1,'netifapi.h']]], + ['netifapi_5fnetif_5fset_5flink_5fdown',['netifapi_netif_set_link_down',['../group__netifapi__netif.html#ga2a9694804743f5466c4ecc400b7f07e4',1,'netifapi.h']]], + ['netifapi_5fnetif_5fset_5flink_5fup',['netifapi_netif_set_link_up',['../group__netifapi__netif.html#gac054a60a32447019913d34da63924853',1,'netifapi.h']]], + ['netifapi_5fnetif_5fset_5fup',['netifapi_netif_set_up',['../group__netifapi__netif.html#ga6ce735fe79efe1739e53b7f0e975ac76',1,'netifapi.h']]], + ['netifs',['NETIFs',['../group__netifs.html',1,'']]], + ['netvector',['netvector',['../structnetvector.html',1,'']]], + ['next',['next',['../structmem.html#a5abf13a11156e92c417f7ff66ef0b5cf',1,'mem::next()'],['../structmqtt__request__t.html#aca8de21579f51e7742076a4975a4177b',1,'mqtt_request_t::next()'],['../structsnmp__varbind.html#a7388422ffb0607b209a39d6d3fcad40e',1,'snmp_varbind::next()'],['../structigmp__group.html#a95c41b9e7de6a14bb8a7910913395e78',1,'igmp_group::next()'],['../structmld__group.html#a9273a345a5754241bf26ddc835d27ddc',1,'mld_group::next()'],['../structnetif.html#ae77736b64df442242795220d76be6b86',1,'netif::next()'],['../structpbuf.html#a5e5763c94fd18d78937b0b58ce7df341',1,'pbuf::next()'],['../structpbuf__rom.html#a5ffdf590ed65b217e2d96f648e1bd3e7',1,'pbuf_rom::next()'],['../structlwip__select__cb.html#a94128f0e164f895226f20fe75fddd35a',1,'lwip_select_cb::next()'],['../structtcp__pcb__listen.html#a0483d0c2a2758dcef18689be2efbdf34',1,'tcp_pcb_listen::next()'],['../structtcp__pcb.html#a2aed7ffb5fb83aabe68b36f097d99260',1,'tcp_pcb::next()']]], + ['no_5fsys',['NO_SYS',['../group__lwip__opts__nosys.html#gae00ba99de94a5bf84d832be8976df59b',1,'opt.h']]], + ['node',['node',['../structsnmp__node__instance.html#a4136f44404b25f4d4dacc6b6b76e77ac',1,'snmp_node_instance::node()'],['../structsnmp__tree__node.html#ad851f80c809606947c99cb26a9163386',1,'snmp_tree_node::node()'],['../structsnmp__leaf__node.html#aa9e43030b5229d8425082c595c576992',1,'snmp_leaf_node::node()'],['../structsnmp__scalar__node.html#a3c9e5cc0a5e22ececeeb3c512d25e3a1',1,'snmp_scalar_node::node()'],['../structsnmp__scalar__array__node.html#a34753e75ec873c92381bf9b6d00d411b',1,'snmp_scalar_array_node::node()'],['../structsnmp__table__node.html#a3f12334e8d1556c36ce3e2206001ab18',1,'snmp_table_node::node()']]], + ['node_5ftype',['node_type',['../structsnmp__node.html#a1af8e20a688943a419b307bf123b1851',1,'snmp_node']]], + ['ns_5fheader',['ns_header',['../structns__header.html',1,'']]], + ['num',['num',['../structnetif.html#ab7ef01e505dd2feb781fe86756b1c973',1,'netif::num()'],['../structmemp__desc.html#a2c32db78e565b8812ca0e20fe929a8a7',1,'memp_desc::num()']]], + ['number_5fof_5falignment_5ferrors',['number_of_alignment_errors',['../structnetbios__answer.html#ab4f9ff63bd5529418c07762506189ad2',1,'netbios_answer']]], + ['number_5fof_5fcollisions',['number_of_collisions',['../structnetbios__answer.html#a45b7aec200434d3aaabc3ea6ebc46c1e',1,'netbios_answer']]], + ['number_5fof_5fcrcs',['number_of_crcs',['../structnetbios__answer.html#ab23a11db86a170b46aa8f8af434534d8',1,'netbios_answer']]], + ['number_5fof_5ffree_5fcommand_5fblocks',['number_of_free_command_blocks',['../structnetbios__answer.html#af41cbffb0ac6a9db3305b3fc64646219',1,'netbios_answer']]], + ['number_5fof_5fgood_5freceives',['number_of_good_receives',['../structnetbios__answer.html#a0eab7dbe733cc50f515126649de596ea',1,'netbios_answer']]], + ['number_5fof_5fgood_5fsends',['number_of_good_sends',['../structnetbios__answer.html#aa6088bca2a59ffcd077a474330511abd',1,'netbios_answer']]], + ['number_5fof_5fnames',['number_of_names',['../structnetbios__answer.html#ac4a95ccabbb945c9470e0cfd470be491',1,'netbios_answer']]], + ['number_5fof_5fno_5fresource_5fcondition',['number_of_no_resource_condition',['../structnetbios__answer.html#a62946dd0f27e9f9b9f295dcde4d3ea42',1,'netbios_answer']]], + ['number_5fof_5fpending_5fsessions',['number_of_pending_sessions',['../structnetbios__answer.html#a66098747155d5bd56f1c92aa8da10c1d',1,'netbios_answer']]], + ['number_5fof_5fretransmits',['number_of_retransmits',['../structnetbios__answer.html#ab175ad0f89102b3b3f81a41b5a72b321',1,'netbios_answer']]], + ['number_5fof_5fsend_5faborts',['number_of_send_aborts',['../structnetbios__answer.html#a1560e3864a0821acea9410e8c1d21408',1,'netbios_answer']]], + ['non_2dstandard_20functions',['Non-standard functions',['../group__sys__nonstandard.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_0.html b/Libraries/LwIP/doc/doxygen/output/html/search/classes_0.html new file mode 100644 index 0000000..1c3e406 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_0.js b/Libraries/LwIP/doc/doxygen/output/html/search/classes_0.js new file mode 100644 index 0000000..ef7d18e --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['_5flwiperf_5fsettings',['_lwiperf_settings',['../struct__lwiperf__settings.html',1,'']]], + ['_5flwiperf_5fstate_5ftcp',['_lwiperf_state_tcp',['../struct__lwiperf__state__tcp.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_1.html b/Libraries/LwIP/doc/doxygen/output/html/search/classes_1.html new file mode 100644 index 0000000..a8e7069 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_1.js b/Libraries/LwIP/doc/doxygen/output/html/search/classes_1.js new file mode 100644 index 0000000..29709ff --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_1.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['altcp_5fallocator_5fs',['altcp_allocator_s',['../structaltcp__allocator__s.html',1,'']]], + ['api_5fmsg',['api_msg',['../structapi__msg.html',1,'']]], + ['autoip',['autoip',['../structautoip.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_2.html b/Libraries/LwIP/doc/doxygen/output/html/search/classes_2.html new file mode 100644 index 0000000..5c09c96 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_2.js b/Libraries/LwIP/doc/doxygen/output/html/search/classes_2.js new file mode 100644 index 0000000..64321cc --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['bridgeif_5finitdata_5fs',['bridgeif_initdata_s',['../structbridgeif__initdata__s.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_3.html b/Libraries/LwIP/doc/doxygen/output/html/search/classes_3.html new file mode 100644 index 0000000..5faaeba --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_3.js b/Libraries/LwIP/doc/doxygen/output/html/search/classes_3.js new file mode 100644 index 0000000..53426c2 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_3.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['dhcp6_5fmsg',['dhcp6_msg',['../structdhcp6__msg.html',1,'']]], + ['dhcp_5fmsg',['dhcp_msg',['../structdhcp__msg.html',1,'']]], + ['dns_5fanswer',['dns_answer',['../structdns__answer.html',1,'']]], + ['dns_5fapi_5fmsg',['dns_api_msg',['../structdns__api__msg.html',1,'']]], + ['dns_5fhdr',['dns_hdr',['../structdns__hdr.html',1,'']]], + ['dns_5fquery',['dns_query',['../structdns__query.html',1,'']]], + ['dns_5freq_5fentry',['dns_req_entry',['../structdns__req__entry.html',1,'']]], + ['dns_5ftable_5fentry',['dns_table_entry',['../structdns__table__entry.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_4.html b/Libraries/LwIP/doc/doxygen/output/html/search/classes_4.html new file mode 100644 index 0000000..b3f11bc --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_4.js b/Libraries/LwIP/doc/doxygen/output/html/search/classes_4.js new file mode 100644 index 0000000..c760ffd --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_4.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['eth_5faddr',['eth_addr',['../structeth__addr.html',1,'']]], + ['eth_5fhdr',['eth_hdr',['../structeth__hdr.html',1,'']]], + ['eth_5fvlan_5fhdr',['eth_vlan_hdr',['../structeth__vlan__hdr.html',1,'']]], + ['etharp_5fhdr',['etharp_hdr',['../structetharp__hdr.html',1,'']]], + ['etharp_5fq_5fentry',['etharp_q_entry',['../structetharp__q__entry.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_5.html b/Libraries/LwIP/doc/doxygen/output/html/search/classes_5.html new file mode 100644 index 0000000..952ace6 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_5.js b/Libraries/LwIP/doc/doxygen/output/html/search/classes_5.js new file mode 100644 index 0000000..d3e6206 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['gethostbyname_5fr_5fhelper',['gethostbyname_r_helper',['../structgethostbyname__r__helper.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_6.html b/Libraries/LwIP/doc/doxygen/output/html/search/classes_6.html new file mode 100644 index 0000000..75eef9f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_6.js b/Libraries/LwIP/doc/doxygen/output/html/search/classes_6.js new file mode 100644 index 0000000..e5db105 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_6.js @@ -0,0 +1,24 @@ +var searchData= +[ + ['icmp6_5fecho_5fhdr',['icmp6_echo_hdr',['../structicmp6__echo__hdr.html',1,'']]], + ['icmp6_5fhdr',['icmp6_hdr',['../structicmp6__hdr.html',1,'']]], + ['icmp_5fecho_5fhdr',['icmp_echo_hdr',['../structicmp__echo__hdr.html',1,'']]], + ['ieee_5f802154_5fhdr',['ieee_802154_hdr',['../structieee__802154__hdr.html',1,'']]], + ['igmp_5fgroup',['igmp_group',['../structigmp__group.html',1,'']]], + ['igmp_5fmsg',['igmp_msg',['../structigmp__msg.html',1,'']]], + ['ip4_5faddr',['ip4_addr',['../structip4__addr.html',1,'']]], + ['ip4_5faddr_5fpacked',['ip4_addr_packed',['../structip4__addr__packed.html',1,'']]], + ['ip4_5faddr_5fwordaligned',['ip4_addr_wordaligned',['../structip4__addr__wordaligned.html',1,'']]], + ['ip6_5faddr',['ip6_addr',['../structip6__addr.html',1,'']]], + ['ip6_5faddr_5fpacked',['ip6_addr_packed',['../structip6__addr__packed.html',1,'']]], + ['ip6_5fhdr',['ip6_hdr',['../structip6__hdr.html',1,'']]], + ['ip6_5freass_5fhelper',['ip6_reass_helper',['../structip6__reass__helper.html',1,'']]], + ['ip6_5freassdata',['ip6_reassdata',['../structip6__reassdata.html',1,'']]], + ['ip_5faddr',['ip_addr',['../structip__addr.html',1,'']]], + ['ip_5fglobals',['ip_globals',['../structip__globals.html',1,'']]], + ['ip_5freass_5fhelper',['ip_reass_helper',['../structip__reass__helper.html',1,'']]], + ['ip_5freassdata',['ip_reassdata',['../structip__reassdata.html',1,'']]], + ['ipv4_5fchanged_5fs',['ipv4_changed_s',['../structnetif__ext__callback__args__t_1_1ipv4__changed__s.html',1,'netif_ext_callback_args_t']]], + ['ipv6_5faddr_5fstate_5fchanged_5fs',['ipv6_addr_state_changed_s',['../structnetif__ext__callback__args__t_1_1ipv6__addr__state__changed__s.html',1,'netif_ext_callback_args_t']]], + ['ipv6_5fset_5fs',['ipv6_set_s',['../structnetif__ext__callback__args__t_1_1ipv6__set__s.html',1,'netif_ext_callback_args_t']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_7.html b/Libraries/LwIP/doc/doxygen/output/html/search/classes_7.html new file mode 100644 index 0000000..745f5f2 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_7.js b/Libraries/LwIP/doc/doxygen/output/html/search/classes_7.js new file mode 100644 index 0000000..925b3bd --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_7.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['link_5fchanged_5fs',['link_changed_s',['../structnetif__ext__callback__args__t_1_1link__changed__s.html',1,'netif_ext_callback_args_t']]], + ['lowpan6_5fieee802154_5fdata',['lowpan6_ieee802154_data',['../structlowpan6__ieee802154__data.html',1,'']]], + ['lowpan6_5flink_5faddr',['lowpan6_link_addr',['../structlowpan6__link__addr.html',1,'']]], + ['lowpan6_5freass_5fhelper',['lowpan6_reass_helper',['../structlowpan6__reass__helper.html',1,'']]], + ['lwip_5fcyclic_5ftimer',['lwip_cyclic_timer',['../structlwip__cyclic__timer.html',1,'']]], + ['lwip_5fselect_5fcb',['lwip_select_cb',['../structlwip__select__cb.html',1,'']]], + ['lwip_5fsock',['lwip_sock',['../structlwip__sock.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_8.html b/Libraries/LwIP/doc/doxygen/output/html/search/classes_8.html new file mode 100644 index 0000000..5a443d9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_8.js b/Libraries/LwIP/doc/doxygen/output/html/search/classes_8.js new file mode 100644 index 0000000..643301a --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_8.js @@ -0,0 +1,16 @@ +var searchData= +[ + ['mdns_5fhost',['mdns_host',['../structmdns__host.html',1,'']]], + ['mdns_5foutpacket',['mdns_outpacket',['../structmdns__outpacket.html',1,'']]], + ['mdns_5fpacket',['mdns_packet',['../structmdns__packet.html',1,'']]], + ['mdns_5frr_5finfo',['mdns_rr_info',['../structmdns__rr__info.html',1,'']]], + ['mdns_5fservice',['mdns_service',['../structmdns__service.html',1,'']]], + ['mem',['mem',['../structmem.html',1,'']]], + ['memp_5fdesc',['memp_desc',['../structmemp__desc.html',1,'']]], + ['mld_5fgroup',['mld_group',['../structmld__group.html',1,'']]], + ['mld_5fheader',['mld_header',['../structmld__header.html',1,'']]], + ['mqtt_5fclient_5fs',['mqtt_client_s',['../structmqtt__client__s.html',1,'']]], + ['mqtt_5fconnect_5fclient_5finfo_5ft',['mqtt_connect_client_info_t',['../structmqtt__connect__client__info__t.html',1,'']]], + ['mqtt_5frequest_5ft',['mqtt_request_t',['../structmqtt__request__t.html',1,'']]], + ['mqtt_5fringbuf_5ft',['mqtt_ringbuf_t',['../structmqtt__ringbuf__t.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_9.html b/Libraries/LwIP/doc/doxygen/output/html/search/classes_9.html new file mode 100644 index 0000000..9cb55be --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_9.js b/Libraries/LwIP/doc/doxygen/output/html/search/classes_9.js new file mode 100644 index 0000000..aa95809 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_9.js @@ -0,0 +1,17 @@ +var searchData= +[ + ['na_5fheader',['na_header',['../structna__header.html',1,'']]], + ['nd6_5fneighbor_5fcache_5fentry',['nd6_neighbor_cache_entry',['../structnd6__neighbor__cache__entry.html',1,'']]], + ['nd6_5fq_5fentry',['nd6_q_entry',['../structnd6__q__entry.html',1,'']]], + ['netbios_5fanswer',['netbios_answer',['../structnetbios__answer.html',1,'']]], + ['netbios_5fhdr',['netbios_hdr',['../structnetbios__hdr.html',1,'']]], + ['netbios_5fname_5fhdr',['netbios_name_hdr',['../structnetbios__name__hdr.html',1,'']]], + ['netbios_5fquestion_5fhdr',['netbios_question_hdr',['../structnetbios__question__hdr.html',1,'']]], + ['netbios_5fresp',['netbios_resp',['../structnetbios__resp.html',1,'']]], + ['netbuf',['netbuf',['../structnetbuf.html',1,'']]], + ['netconn',['netconn',['../structnetconn.html',1,'']]], + ['netif',['netif',['../structnetif.html',1,'']]], + ['netif_5fext_5fcallback_5fargs_5ft',['netif_ext_callback_args_t',['../unionnetif__ext__callback__args__t.html',1,'']]], + ['netvector',['netvector',['../structnetvector.html',1,'']]], + ['ns_5fheader',['ns_header',['../structns__header.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_a.html b/Libraries/LwIP/doc/doxygen/output/html/search/classes_a.html new file mode 100644 index 0000000..54940d7 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_a.js b/Libraries/LwIP/doc/doxygen/output/html/search/classes_a.js new file mode 100644 index 0000000..712c690 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_a.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['pbuf',['pbuf',['../structpbuf.html',1,'']]], + ['pbuf_5fcustom',['pbuf_custom',['../structpbuf__custom.html',1,'']]], + ['pbuf_5fcustom_5fref',['pbuf_custom_ref',['../structpbuf__custom__ref.html',1,'']]], + ['pbuf_5from',['pbuf_rom',['../structpbuf__rom.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_b.html b/Libraries/LwIP/doc/doxygen/output/html/search/classes_b.html new file mode 100644 index 0000000..6071ae0 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_b.js b/Libraries/LwIP/doc/doxygen/output/html/search/classes_b.js new file mode 100644 index 0000000..49ddae4 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_b.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['raw_5fpcb',['raw_pcb',['../structraw__pcb.html',1,'']]], + ['redirect_5fheader',['redirect_header',['../structredirect__header.html',1,'']]], + ['rs_5fheader',['rs_header',['../structrs__header.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_c.html b/Libraries/LwIP/doc/doxygen/output/html/search/classes_c.html new file mode 100644 index 0000000..6cf1d00 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_c.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_c.js b/Libraries/LwIP/doc/doxygen/output/html/search/classes_c.js new file mode 100644 index 0000000..7bb553b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_c.js @@ -0,0 +1,38 @@ +var searchData= +[ + ['smtp_5fsend_5frequest',['smtp_send_request',['../structsmtp__send__request.html',1,'']]], + ['smtp_5fsession',['smtp_session',['../structsmtp__session.html',1,'']]], + ['snmp_5fleaf_5fnode',['snmp_leaf_node',['../structsnmp__leaf__node.html',1,'']]], + ['snmp_5fmib',['snmp_mib',['../structsnmp__mib.html',1,'']]], + ['snmp_5fnext_5foid_5fstate',['snmp_next_oid_state',['../structsnmp__next__oid__state.html',1,'']]], + ['snmp_5fnode',['snmp_node',['../structsnmp__node.html',1,'']]], + ['snmp_5fnode_5finstance',['snmp_node_instance',['../structsnmp__node__instance.html',1,'']]], + ['snmp_5fobj_5fid',['snmp_obj_id',['../structsnmp__obj__id.html',1,'']]], + ['snmp_5foid_5frange',['snmp_oid_range',['../structsnmp__oid__range.html',1,'']]], + ['snmp_5fscalar_5farray_5fnode',['snmp_scalar_array_node',['../structsnmp__scalar__array__node.html',1,'']]], + ['snmp_5fscalar_5farray_5fnode_5fdef',['snmp_scalar_array_node_def',['../structsnmp__scalar__array__node__def.html',1,'']]], + ['snmp_5fscalar_5fnode',['snmp_scalar_node',['../structsnmp__scalar__node.html',1,'']]], + ['snmp_5ftable_5fcol_5fdef',['snmp_table_col_def',['../structsnmp__table__col__def.html',1,'']]], + ['snmp_5ftable_5fnode',['snmp_table_node',['../structsnmp__table__node.html',1,'']]], + ['snmp_5ftable_5fsimple_5fnode',['snmp_table_simple_node',['../structsnmp__table__simple__node.html',1,'']]], + ['snmp_5fthreadsync_5finstance',['snmp_threadsync_instance',['../structsnmp__threadsync__instance.html',1,'']]], + ['snmp_5fthreadsync_5fnode',['snmp_threadsync_node',['../structsnmp__threadsync__node.html',1,'']]], + ['snmp_5ftree_5fnode',['snmp_tree_node',['../structsnmp__tree__node.html',1,'']]], + ['snmp_5fvarbind',['snmp_varbind',['../structsnmp__varbind.html',1,'']]], + ['snmp_5fvarbind_5flen',['snmp_varbind_len',['../structsnmp__varbind__len.html',1,'']]], + ['snmp_5fvariant_5fvalue',['snmp_variant_value',['../unionsnmp__variant__value.html',1,'']]], + ['sntp_5fmsg',['sntp_msg',['../structsntp__msg.html',1,'']]], + ['sntp_5fserver',['sntp_server',['../structsntp__server.html',1,'']]], + ['sntp_5ftime',['sntp_time',['../structsntp__time.html',1,'']]], + ['sntp_5ftimestamps',['sntp_timestamps',['../structsntp__timestamps.html',1,'']]], + ['sockaddr_5faligned',['sockaddr_aligned',['../unionsockaddr__aligned.html',1,'']]], + ['stats_5f',['stats_',['../structstats__.html',1,'']]], + ['stats_5figmp',['stats_igmp',['../structstats__igmp.html',1,'']]], + ['stats_5fmem',['stats_mem',['../structstats__mem.html',1,'']]], + ['stats_5fmib2',['stats_mib2',['../structstats__mib2.html',1,'']]], + ['stats_5fmib2_5fnetif_5fctrs',['stats_mib2_netif_ctrs',['../structstats__mib2__netif__ctrs.html',1,'']]], + ['stats_5fproto',['stats_proto',['../structstats__proto.html',1,'']]], + ['stats_5fsys',['stats_sys',['../structstats__sys.html',1,'']]], + ['stats_5fsyselem',['stats_syselem',['../structstats__syselem.html',1,'']]], + ['status_5fchanged_5fs',['status_changed_s',['../structnetif__ext__callback__args__t_1_1status__changed__s.html',1,'netif_ext_callback_args_t']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_d.html b/Libraries/LwIP/doc/doxygen/output/html/search/classes_d.html new file mode 100644 index 0000000..d4a7ed7 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_d.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_d.js b/Libraries/LwIP/doc/doxygen/output/html/search/classes_d.js new file mode 100644 index 0000000..2ffecb6 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_d.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['tcgi',['tCGI',['../structt_c_g_i.html',1,'']]], + ['tcp_5fext_5farg_5fcallbacks',['tcp_ext_arg_callbacks',['../structtcp__ext__arg__callbacks.html',1,'']]], + ['tcp_5fpcb',['tcp_pcb',['../structtcp__pcb.html',1,'']]], + ['tcp_5fpcb_5flisten',['tcp_pcb_listen',['../structtcp__pcb__listen.html',1,'']]], + ['tftp_5fcontext',['tftp_context',['../structtftp__context.html',1,'']]], + ['threadsync_5fdata',['threadsync_data',['../structthreadsync__data.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_e.html b/Libraries/LwIP/doc/doxygen/output/html/search/classes_e.html new file mode 100644 index 0000000..9a9f48c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_e.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_e.js b/Libraries/LwIP/doc/doxygen/output/html/search/classes_e.js new file mode 100644 index 0000000..e1de147 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_e.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['udp_5fpcb',['udp_pcb',['../structudp__pcb.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_f.html b/Libraries/LwIP/doc/doxygen/output/html/search/classes_f.html new file mode 100644 index 0000000..a128d60 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_f.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/classes_f.js b/Libraries/LwIP/doc/doxygen/output/html/search/classes_f.js new file mode 100644 index 0000000..2be8600 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/classes_f.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['zepif_5finit',['zepif_init',['../structzepif__init.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_0.html b/Libraries/LwIP/doc/doxygen/output/html/search/defines_0.html new file mode 100644 index 0000000..5b25204 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_0.js b/Libraries/LwIP/doc/doxygen/output/html/search/defines_0.js new file mode 100644 index 0000000..f388cfa --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_0.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['altcp_5fmbedtls_5fdebug',['ALTCP_MBEDTLS_DEBUG',['../altcp__tls__mbedtls__opts_8h.html#a7727456eeb0b3311213936413d238989',1,'altcp_tls_mbedtls_opts.h']]], + ['altcp_5fmbedtls_5fsession_5fcache_5ftimeout_5fseconds',['ALTCP_MBEDTLS_SESSION_CACHE_TIMEOUT_SECONDS',['../altcp__tls__mbedtls__opts_8h.html#a6acb28346f87b2310fc00ec1fccba2b6',1,'altcp_tls_mbedtls_opts.h']]], + ['altcp_5fproxyconnect_5fclient_5fagent',['ALTCP_PROXYCONNECT_CLIENT_AGENT',['../altcp__proxyconnect_8c.html#a344227f22aa1b58f7ed737a2d4f4636f',1,'altcp_proxyconnect.c']]], + ['api_5fevent',['API_EVENT',['../api_8h.html#a3ce590f58be8f60dbde361920863b26d',1,'api.h']]], + ['arp_5fage_5frerequest_5fused_5funicast',['ARP_AGE_REREQUEST_USED_UNICAST',['../etharp_8c.html#ac71515a6f140b25de49e9bf432b2bb2a',1,'etharp.c']]], + ['arp_5fmaxpending',['ARP_MAXPENDING',['../etharp_8c.html#a0a03fea13e060da5a53a10a75a96def9',1,'etharp.c']]], + ['arp_5ftmr_5finterval',['ARP_TMR_INTERVAL',['../lwip_2etharp_8h.html#aaa3d8ed1eb1129f518345e37b38cfc37',1,'etharp.h']]], + ['autoip_5fremove_5fstruct',['autoip_remove_struct',['../autoip_8h.html#aaeb4b778fce078bee84144ab50916b15',1,'autoip.h']]], + ['autoip_5ftmr_5finterval',['AUTOIP_TMR_INTERVAL',['../autoip_8h.html#a8986919a452ab77eec9a199ff6668e92',1,'autoip.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_1.html b/Libraries/LwIP/doc/doxygen/output/html/search/defines_1.html new file mode 100644 index 0000000..91488cb --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_1.js b/Libraries/LwIP/doc/doxygen/output/html/search/defines_1.js new file mode 100644 index 0000000..69cff08 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_1.js @@ -0,0 +1,21 @@ +var searchData= +[ + ['dhcp6_5fduid_5fllt',['DHCP6_DUID_LLT',['../prot_2dhcp6_8h.html#afe33f98cb94e0f18892a41502cf54e36',1,'dhcp6.h']]], + ['dhcp6_5fremove_5fstruct',['dhcp6_remove_struct',['../dhcp6_8h.html#a76941ddba22fe00dfc47d2f339f7aca3',1,'dhcp6.h']]], + ['dhcp6_5fstatus_5fsuccess',['DHCP6_STATUS_SUCCESS',['../prot_2dhcp6_8h.html#a878a7734e159826e82e958fe3a5ca175',1,'dhcp6.h']]], + ['dhcp6_5ftimer_5fmsecs',['DHCP6_TIMER_MSECS',['../dhcp6_8h.html#afdd69327dc7d9f5cc4f029d706f60c8f',1,'dhcp6.h']]], + ['dhcp_5fcoarse_5ftimer_5fmsecs',['DHCP_COARSE_TIMER_MSECS',['../dhcp_8h.html#ad84b8f4deec421bbf6fd85e8fae047d6',1,'dhcp.h']]], + ['dhcp_5fcoarse_5ftimer_5fsecs',['DHCP_COARSE_TIMER_SECS',['../dhcp_8h.html#a3751cc5daa0875d415ebacd8ad675f1e',1,'dhcp.h']]], + ['dhcp_5fcreate_5frand_5fxid',['DHCP_CREATE_RAND_XID',['../dhcp_8c.html#ad6de9c5120654454a330bf5de53c4835',1,'dhcp.c']]], + ['dhcp_5ffine_5ftimer_5fmsecs',['DHCP_FINE_TIMER_MSECS',['../dhcp_8h.html#a7a26209f52eebe8ded457ae141df403f',1,'dhcp.h']]], + ['dhcp_5fmax_5fmsg_5flen',['DHCP_MAX_MSG_LEN',['../dhcp_8c.html#a63e9ec4517b80d8576f218d905e31a9b',1,'dhcp.c']]], + ['dhcp_5fmin_5freply_5flen',['DHCP_MIN_REPLY_LEN',['../dhcp_8c.html#aa52c2b64ef42fbad84a3bcd58052caab',1,'dhcp.c']]], + ['dhcp_5foptions_5flen',['DHCP_OPTIONS_LEN',['../prot_2dhcp_8h.html#ae99d4be0d03f6f9c8f02f63abde91a06',1,'dhcp.h']]], + ['dhcp_5fremove_5fstruct',['dhcp_remove_struct',['../dhcp_8h.html#aa92284faa099dac4331c1fc0b997dabc',1,'dhcp.h']]], + ['dns_5fmax_5fttl',['DNS_MAX_TTL',['../dns_8c.html#a7f5553dc4a0d2bf99ba1282a86df31e2',1,'dns.c']]], + ['dns_5fmquery_5fport',['DNS_MQUERY_PORT',['../prot_2dns_8h.html#a62d67af5ac6c6b3f98a6566a42564276',1,'dns.h']]], + ['dns_5fport_5fallowed',['DNS_PORT_ALLOWED',['../dns_8c.html#a97f3b0c56aeee091fdf2f07faf864ce0',1,'dns.c']]], + ['dns_5frand_5ftxid',['DNS_RAND_TXID',['../dns_8c.html#a9209c204996270af5cfdfd6e391267a1',1,'dns.c']]], + ['dns_5fserver_5fport',['DNS_SERVER_PORT',['../prot_2dns_8h.html#a9266b48706648ecf0625a3e651095317',1,'dns.h']]], + ['dns_5ftmr_5finterval',['DNS_TMR_INTERVAL',['../dns_8h.html#a464a7435c4c00735af59033d2acd83bb',1,'dns.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_2.html b/Libraries/LwIP/doc/doxygen/output/html/search/defines_2.html new file mode 100644 index 0000000..8655993 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_2.js b/Libraries/LwIP/doc/doxygen/output/html/search/defines_2.js new file mode 100644 index 0000000..bb1f845 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_2.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['eai_5fnoname',['EAI_NONAME',['../lwip_2netdb_8h.html#a0bb00f48d6ba1e8c55b7d85c8e3a19a7',1,'netdb.h']]], + ['eth_5faddr',['ETH_ADDR',['../lwip_2prot_2ethernet_8h.html#a19c72ce98569e0fb55948a7587d704ee',1,'ethernet.h']]], + ['etharp_5fflag_5ftry_5fhard',['ETHARP_FLAG_TRY_HARD',['../etharp_8c.html#a96f8787ca623e704da1d32ca7dd6d6d9',1,'etharp.c']]], + ['etharp_5fgratuitous',['etharp_gratuitous',['../lwip_2etharp_8h.html#a83947dea159baf3420922084072e631e',1,'etharp.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_3.html b/Libraries/LwIP/doc/doxygen/output/html/search/defines_3.html new file mode 100644 index 0000000..a55d3ff --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_3.js b/Libraries/LwIP/doc/doxygen/output/html/search/defines_3.js new file mode 100644 index 0000000..c38eb67 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['fold_5fu32t',['FOLD_U32T',['../inet__chksum_8h.html#a6ffe83b4bdd1784a0671ee4778966a01',1,'inet_chksum.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_4.html b/Libraries/LwIP/doc/doxygen/output/html/search/defines_4.html new file mode 100644 index 0000000..54da39a --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_4.js b/Libraries/LwIP/doc/doxygen/output/html/search/defines_4.js new file mode 100644 index 0000000..21e32bd --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_4.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['hostent_5fstorage',['HOSTENT_STORAGE',['../netdb_8c.html#acfc1e988534c0e497599b904739f92fe',1,'netdb.c']]], + ['http_5fis_5fdata_5fvolatile',['HTTP_IS_DATA_VOLATILE',['../httpd_8c.html#aa93d60e8af23b915b5b9652ff71e1300',1,'httpd.c']]], + ['http_5fis_5fhdr_5fvolatile',['HTTP_IS_HDR_VOLATILE',['../httpd_8c.html#af281bc4a762d56243e0b85dd4197174a',1,'httpd.c']]], + ['httpc_5fclient_5fagent',['HTTPC_CLIENT_AGENT',['../http__client_8c.html#aeda6122d341b879ba8b0fb2df834276a',1,'http_client.c']]], + ['httpc_5fdebug',['HTTPC_DEBUG',['../http__client_8c.html#a32d4c0e6e42327e21fb59dabdc152dd1',1,'http_client.c']]], + ['httpc_5fdebug_5frequest',['HTTPC_DEBUG_REQUEST',['../http__client_8c.html#ad2ec42c8e7adaef67266a5bd12c4ad2a',1,'http_client.c']]], + ['httpd_5fssi_5ftag_5funknown',['HTTPD_SSI_TAG_UNKNOWN',['../httpd_8h.html#aeb00bcd99ec9627b108832f0b58891ca',1,'httpd.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_5.html b/Libraries/LwIP/doc/doxygen/output/html/search/defines_5.html new file mode 100644 index 0000000..dd7bfdc --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_5.js b/Libraries/LwIP/doc/doxygen/output/html/search/defines_5.js new file mode 100644 index 0000000..bc4e370 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_5.js @@ -0,0 +1,79 @@ +var searchData= +[ + ['in6addr_5fany_5finit',['IN6ADDR_ANY_INIT',['../lwip_2inet_8h.html#a1de876a356ee05a2e9427b741f99f49c',1,'inet.h']]], + ['in6addr_5floopback_5finit',['IN6ADDR_LOOPBACK_INIT',['../lwip_2inet_8h.html#a5562c81af19ee5988ddc5a5c6153cf37',1,'inet.h']]], + ['inaddr_5fany',['INADDR_ANY',['../lwip_2inet_8h.html#a5d1940045dc2e7de552f3d4ff13a74ab',1,'inet.h']]], + ['inaddr_5fbroadcast',['INADDR_BROADCAST',['../lwip_2inet_8h.html#a4a725f61ded23ce8a7dff8e82ed51986',1,'inet.h']]], + ['inaddr_5floopback',['INADDR_LOOPBACK',['../lwip_2inet_8h.html#ae1ac25d7797666cff6d01d6c795c2378',1,'inet.h']]], + ['inaddr_5fnone',['INADDR_NONE',['../lwip_2inet_8h.html#a3d2472d6cf31b73eeb829110dd0fffea',1,'inet.h']]], + ['ip4_5faddr',['IP4_ADDR',['../ip4__addr_8h.html#a58aee4166c466f9ac7035bf5cc9f9974',1,'ip4_addr.h']]], + ['ip4_5faddr_5fcopy',['ip4_addr_copy',['../ip4__addr_8h.html#a2f4e9c339e897e6ca5cb4a2f1e8394d5',1,'ip4_addr.h']]], + ['ip4_5faddr_5fget_5fnetwork',['ip4_addr_get_network',['../ip4__addr_8h.html#a81658cb05ba504d13ee860e82dc444e9',1,'ip4_addr.h']]], + ['ip4_5faddr_5fget_5fu32',['ip4_addr_get_u32',['../ip4__addr_8h.html#ad50d93464bbbda199b585c54869a3a4b',1,'ip4_addr.h']]], + ['ip4_5faddr_5fisloopback',['ip4_addr_isloopback',['../ip4__addr_8h.html#a46dabb4df212d156004fa5afe03e2051',1,'ip4_addr.h']]], + ['ip4_5faddr_5fnetcmp',['ip4_addr_netcmp',['../ip4__addr_8h.html#afd43f6ceb2df8d50c84509ad1059f514',1,'ip4_addr.h']]], + ['ip4_5faddr_5fset',['ip4_addr_set',['../ip4__addr_8h.html#a33a17a8d2025ce3715db835534868e88',1,'ip4_addr.h']]], + ['ip4_5faddr_5fset_5fany',['ip4_addr_set_any',['../ip4__addr_8h.html#afaaed3762ce8e9de14fcf73b19964567',1,'ip4_addr.h']]], + ['ip4_5faddr_5fset_5fhton',['ip4_addr_set_hton',['../ip4__addr_8h.html#a901850ec90b01b9bf6baf69561aa465a',1,'ip4_addr.h']]], + ['ip4_5faddr_5fset_5floopback',['ip4_addr_set_loopback',['../ip4__addr_8h.html#a5c7eae50a387987a7f56c29c74255c3c',1,'ip4_addr.h']]], + ['ip4_5faddr_5fset_5fu32',['ip4_addr_set_u32',['../ip4__addr_8h.html#aeb39f58b38435f89219c8ccb509eb520',1,'ip4_addr.h']]], + ['ip4_5faddr_5fset_5fzero',['ip4_addr_set_zero',['../ip4__addr_8h.html#a973b6ad98e037fc45f1e11d29cda99ea',1,'ip4_addr.h']]], + ['ip4_5fcurrent_5fdest_5faddr',['ip4_current_dest_addr',['../ip_8h.html#a2833c8d59910dd7c0e87ab3bb174e720',1,'ip.h']]], + ['ip4_5fcurrent_5fheader',['ip4_current_header',['../ip_8h.html#a3ce482b7e08282effd670001198ecd87',1,'ip.h']]], + ['ip4_5fcurrent_5fsrc_5faddr',['ip4_current_src_addr',['../ip_8h.html#ad2a62f96b9431a79f0258dc13058b160',1,'ip.h']]], + ['ip6_5faddr',['IP6_ADDR',['../ip6__addr_8h.html#a30c92254d6abe631de6a5accfd491bc3',1,'ip6_addr.h']]], + ['ip6_5faddr_5fblock1',['IP6_ADDR_BLOCK1',['../ip6__addr_8h.html#ae258ebfa66d18c8c428bf3d8fd0f969c',1,'ip6_addr.h']]], + ['ip6_5faddr_5fblock2',['IP6_ADDR_BLOCK2',['../ip6__addr_8h.html#a9193137423b6b936d25c2e6cf33b4921',1,'ip6_addr.h']]], + ['ip6_5faddr_5fblock3',['IP6_ADDR_BLOCK3',['../ip6__addr_8h.html#a6466b1c0edd03d6a5986dcc79f7d8bb6',1,'ip6_addr.h']]], + ['ip6_5faddr_5fblock4',['IP6_ADDR_BLOCK4',['../ip6__addr_8h.html#a2a5d7de341ce708b7145ad4d72652c71',1,'ip6_addr.h']]], + ['ip6_5faddr_5fblock5',['IP6_ADDR_BLOCK5',['../ip6__addr_8h.html#a56a11cfaa169389c319f8bd027ac524c',1,'ip6_addr.h']]], + ['ip6_5faddr_5fblock6',['IP6_ADDR_BLOCK6',['../ip6__addr_8h.html#a116d7c5c8bf8531b27f8a9fa98e728c3',1,'ip6_addr.h']]], + ['ip6_5faddr_5fblock7',['IP6_ADDR_BLOCK7',['../ip6__addr_8h.html#ab87bee320ecc0e923931ee6f49802deb',1,'ip6_addr.h']]], + ['ip6_5faddr_5fblock8',['IP6_ADDR_BLOCK8',['../ip6__addr_8h.html#af3d1f9876bf256ec964bd3809d7ed1b4',1,'ip6_addr.h']]], + ['ip6_5faddr_5fcmp',['ip6_addr_cmp',['../ip6__addr_8h.html#aea8d4c4134abff1c76bc997a91163fe1',1,'ip6_addr.h']]], + ['ip6_5faddr_5fcmp_5fpacked',['ip6_addr_cmp_packed',['../ip6__addr_8h.html#a11fe84789e3f039b3f71009e802946a8',1,'ip6_addr.h']]], + ['ip6_5faddr_5fcmp_5fzoneless',['ip6_addr_cmp_zoneless',['../ip6__addr_8h.html#ad0fc088972d395839a7ad75d3dab8322',1,'ip6_addr.h']]], + ['ip6_5faddr_5fcopy',['ip6_addr_copy',['../ip6__addr_8h.html#a7b17e85a46bd8368ce27fc644e058073',1,'ip6_addr.h']]], + ['ip6_5faddr_5fcopy_5ffrom_5fpacked',['ip6_addr_copy_from_packed',['../ip6__addr_8h.html#a05575d46c233ffb13fb03a3a2c8a16b3',1,'ip6_addr.h']]], + ['ip6_5faddr_5fcopy_5fto_5fpacked',['ip6_addr_copy_to_packed',['../ip6__addr_8h.html#a6c46d12fa7d36c47b629d0ccdefa114b',1,'ip6_addr.h']]], + ['ip6_5faddr_5fnetcmp',['ip6_addr_netcmp',['../ip6__addr_8h.html#a76b01f76b65647767d00ee9fad9fbaa2',1,'ip6_addr.h']]], + ['ip6_5faddr_5fnetcmp_5fzoneless',['ip6_addr_netcmp_zoneless',['../ip6__addr_8h.html#acc1622ab895680da0a3b6e5e56070342',1,'ip6_addr.h']]], + ['ip6_5faddr_5fpart',['IP6_ADDR_PART',['../ip6__addr_8h.html#a1d78feeb50aec8f2c07d840829f49ddd',1,'ip6_addr.h']]], + ['ip6_5faddr_5fset',['ip6_addr_set',['../ip6__addr_8h.html#aa7b4ba4202b5f64dee605fe159e9c3ad',1,'ip6_addr.h']]], + ['ip6_5faddr_5fset_5fany',['ip6_addr_set_any',['../ip6__addr_8h.html#ae2d1ce50ec6dbee890e2f8ae64abdf6b',1,'ip6_addr.h']]], + ['ip6_5faddr_5fset_5fhton',['ip6_addr_set_hton',['../ip6__addr_8h.html#ad636c27d56d1b3deca9f780bc173d3c2',1,'ip6_addr.h']]], + ['ip6_5faddr_5fset_5floopback',['ip6_addr_set_loopback',['../ip6__addr_8h.html#a02f5271e922f34a09153ce84839ad292',1,'ip6_addr.h']]], + ['ip6_5faddr_5fset_5fzero',['ip6_addr_set_zero',['../ip6__addr_8h.html#af696d3b81f4cb9c40ece912de73ed53c',1,'ip6_addr.h']]], + ['ip6_5fcurrent_5fdest_5faddr',['ip6_current_dest_addr',['../ip_8h.html#a176525c2192d37ee9eaeba8012c5d9c0',1,'ip.h']]], + ['ip6_5fcurrent_5fheader',['ip6_current_header',['../ip_8h.html#af9bf74750c9d7a219ee88d240300fe69',1,'ip.h']]], + ['ip6_5fcurrent_5fsrc_5faddr',['ip6_current_src_addr',['../ip_8h.html#ac40a9e4a21ecf5bb39813bb6ca5bb245',1,'ip.h']]], + ['ip6_5freass_5ftmr_5finterval',['IP6_REASS_TMR_INTERVAL',['../ip6__frag_8h.html#ad0730ee4db9fbebdf071bb33d75698a2',1,'ip6_frag.h']]], + ['ip_5faccept_5flink_5flayer_5faddressed_5fport',['IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT',['../ip4_8c.html#a185c7d6380711847105430931692b267',1,'ip4.c']]], + ['ip_5faddr_5fset_5fzero_5fip4',['ip_addr_set_zero_ip4',['../ip__addr_8h.html#aecb93d575e65f835f1045a4e87e70ed9',1,'ip_addr.h']]], + ['ip_5fcurrent_5fdest_5faddr',['ip_current_dest_addr',['../ip_8h.html#a9135977868017c3deeec86b525e13997',1,'ip_current_dest_addr(): ip.h'],['../ip_8h.html#a9135977868017c3deeec86b525e13997',1,'ip_current_dest_addr(): ip.h']]], + ['ip_5fcurrent_5fheader_5fproto',['ip_current_header_proto',['../ip_8h.html#af27c43c23b59d68a8463cd5ad035b20f',1,'ip.h']]], + ['ip_5fcurrent_5fheader_5ftot_5flen',['ip_current_header_tot_len',['../ip_8h.html#a2ca15ea285a10982294378cd7b8e83e2',1,'ip.h']]], + ['ip_5fcurrent_5finput_5fnetif',['ip_current_input_netif',['../ip_8h.html#ae214afa9d3f1b26fc8d538436b8fa3c4',1,'ip.h']]], + ['ip_5fcurrent_5fis_5fv6',['ip_current_is_v6',['../ip_8h.html#abc56623d434a204298a4e98352af1c9d',1,'ip.h']]], + ['ip_5fcurrent_5fnetif',['ip_current_netif',['../ip_8h.html#aabecef3c7653a9767c79245c44fcab9f',1,'ip.h']]], + ['ip_5fcurrent_5fsrc_5faddr',['ip_current_src_addr',['../ip_8h.html#a4e35b7692c228c98e738892f0a215647',1,'ip_current_src_addr(): ip.h'],['../ip_8h.html#a4e35b7692c228c98e738892f0a215647',1,'ip_current_src_addr(): ip.h']]], + ['ip_5fget_5foption',['ip_get_option',['../ip_8h.html#a26e077f52de4a97ff89c02415c084518',1,'ip.h']]], + ['ip_5fhdr_5fget_5fversion',['IP_HDR_GET_VERSION',['../prot_2ip_8h.html#afc29766fb0707c63b64568c5fa44a374',1,'ip.h']]], + ['ip_5fnext_5fheader_5fptr',['ip_next_header_ptr',['../ip_8h.html#a68d25b5924b768cbf2f1a78bbabfce26',1,'ip.h']]], + ['ip_5fntoa',['ip_ntoa',['../ip4__addr_8h.html#a2b2230516e7911dfacc9b87644ba30f1',1,'ip4_addr.h']]], + ['ip_5foptions_5fsend',['IP_OPTIONS_SEND',['../ip4_8h.html#a516aa115f61c368cbe74fae2da2c6824',1,'ip4.h']]], + ['ip_5foutput_5fhinted',['ip_output_hinted',['../ip_8h.html#accbc01f37dd426a66de41693a5450207',1,'ip.h']]], + ['ip_5foutput_5fif_5fhdrincl',['ip_output_if_hdrincl',['../ip_8h.html#aac608b92f8f226c3574d6bb855f12496',1,'ip.h']]], + ['ip_5fpcb',['IP_PCB',['../ip_8h.html#a8bdf4b5f674375e76cdd968826d80e53',1,'ip.h']]], + ['ip_5freass_5fcheck_5foverlap',['IP_REASS_CHECK_OVERLAP',['../ip4__frag_8c.html#af920fb8127d00dd7a8b809afd28723fe',1,'IP_REASS_CHECK_OVERLAP(): ip4_frag.c'],['../ip6__frag_8c.html#af920fb8127d00dd7a8b809afd28723fe',1,'IP_REASS_CHECK_OVERLAP(): ip6_frag.c']]], + ['ip_5freass_5ffree_5foldest',['IP_REASS_FREE_OLDEST',['../ip4__frag_8c.html#a510934accf149433bdcf683993e79080',1,'IP_REASS_FREE_OLDEST(): ip4_frag.c'],['../ip6__frag_8c.html#a510934accf149433bdcf683993e79080',1,'IP_REASS_FREE_OLDEST(): ip6_frag.c']]], + ['ip_5freset_5foption',['ip_reset_option',['../ip_8h.html#a441c63f00c4b0cb69fc34ca6b55307cc',1,'ip.h']]], + ['ip_5fset_5foption',['ip_set_option',['../ip_8h.html#a13f48cf825c7f074dc05bea54e9d6a93',1,'ip.h']]], + ['ipaddr_5fany',['IPADDR_ANY',['../ip4__addr_8h.html#ad6ed0d622d61ecd6edd606e3b564f0a2',1,'ip4_addr.h']]], + ['ipaddr_5fbroadcast',['IPADDR_BROADCAST',['../ip4__addr_8h.html#ac661fca7e7d25e5cd379b811a767c29a',1,'ip4_addr.h']]], + ['ipaddr_5floopback',['IPADDR_LOOPBACK',['../ip4__addr_8h.html#a6f51a2eb21547df4e6b3ba046188345e',1,'ip4_addr.h']]], + ['ipaddr_5fnone',['IPADDR_NONE',['../ip4__addr_8h.html#abc4b2e3531c4992f2ae4b8c0f9751544',1,'ip4_addr.h']]], + ['ipaddr_5fwordaligned_5fcopy_5ffrom_5fip4_5faddr_5ft',['IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T',['../lwip_2prot_2etharp_8h.html#a7dff02ff186f844b731cecbe614b7419',1,'etharp.h']]], + ['ipaddr_5fwordaligned_5fcopy_5fto_5fip4_5faddr_5ft',['IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T',['../lwip_2prot_2etharp_8h.html#a94f1c2a6ad7cecdfe759c0490ba7f030',1,'etharp.h']]], + ['ipv6_5ffrag_5fcopyheader',['IPV6_FRAG_COPYHEADER',['../ip6__frag_8h.html#a151e742cf7f0e5c3a08f31db0370cea7',1,'ip6_frag.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_6.html b/Libraries/LwIP/doc/doxygen/output/html/search/defines_6.html new file mode 100644 index 0000000..58d00e9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_6.js b/Libraries/LwIP/doc/doxygen/output/html/search/defines_6.js new file mode 100644 index 0000000..0284d92 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_6.js @@ -0,0 +1,46 @@ +var searchData= +[ + ['ll_5fip4_5fmulticast_5faddr_5f0',['LL_IP4_MULTICAST_ADDR_0',['../lwip_2prot_2ethernet_8h.html#afaf6cbccf9477c3505660e3a17860e07',1,'ethernet.h']]], + ['ll_5fip6_5fmulticast_5faddr_5f0',['LL_IP6_MULTICAST_ADDR_0',['../lwip_2prot_2ethernet_8h.html#a8ebe93c6ad2d743e6c952539257679b6',1,'ethernet.h']]], + ['lock_5ftcpip_5fcore',['LOCK_TCPIP_CORE',['../tcpip_8h.html#a4700525e737fc025fea4887b172e0c95',1,'tcpip.h']]], + ['lowpan6_5ftmr_5finterval',['LOWPAN6_TMR_INTERVAL',['../lowpan6_8h.html#aa258ae16a937c40333c8f97a7f236797',1,'lowpan6.h']]], + ['lwip_5f6lowpan_5f802154_5fhw_5fcrc',['LWIP_6LOWPAN_802154_HW_CRC',['../lowpan6__opts_8h.html#ae5bb9b8d695caec08930073edc7c6175',1,'lowpan6_opts.h']]], + ['lwip_5f6lowpan_5fcalc_5fcrc',['LWIP_6LOWPAN_CALC_CRC',['../lowpan6__opts_8h.html#ad20840e31a0a6eeec8666e4d4a979f43',1,'lowpan6_opts.h']]], + ['lwip_5f6lowpan_5finfer_5fshort_5faddress',['LWIP_6LOWPAN_INFER_SHORT_ADDRESS',['../lowpan6__opts_8h.html#a6a542cd72a6270b7231b8b93f8041207',1,'lowpan6_opts.h']]], + ['lwip_5f6lowpan_5fiphc',['LWIP_6LOWPAN_IPHC',['../lowpan6__opts_8h.html#a0f178a86d02e0ba4168cafe3de5f3afa',1,'lowpan6_opts.h']]], + ['lwip_5f6lowpan_5fnum_5fcontexts',['LWIP_6LOWPAN_NUM_CONTEXTS',['../lowpan6__opts_8h.html#a4ffa89f39abf93cc599f78c5a8bb0a4a',1,'lowpan6_opts.h']]], + ['lwip_5faltcp_5ftls_5fmbedtls',['LWIP_ALTCP_TLS_MBEDTLS',['../altcp__tls__mbedtls__opts_8h.html#ac8dbfe10a4a9a64c1e2c62ea97e48639',1,'altcp_tls_mbedtls_opts.h']]], + ['lwip_5farp_5ffilter_5fnetif',['LWIP_ARP_FILTER_NETIF',['../netif_2ethernet_8h.html#a1ecae0406a3b714c02b632379f26a365',1,'ethernet.h']]], + ['lwip_5fautoip_5fcreate_5fseed_5faddr',['LWIP_AUTOIP_CREATE_SEED_ADDR',['../autoip_8c.html#acec75069f6e6ecbe200c5691e56ecd43',1,'autoip.c']]], + ['lwip_5fautoip_5frand',['LWIP_AUTOIP_RAND',['../autoip_8c.html#a634535156cc1a8cf9f04d3d5c74f8a59',1,'autoip.c']]], + ['lwip_5fcompat_5fmutex',['LWIP_COMPAT_MUTEX',['../sys_8h.html#a7bada49634cd3b28b28bdcedd763a1e6',1,'sys.h']]], + ['lwip_5fdebug',['LWIP_DEBUG',['../debug_8h.html#a957d947c94fda9b85d4aee0aab72952a',1,'debug.h']]], + ['lwip_5fdns_5fapi_5fhostent_5fstorage',['LWIP_DNS_API_HOSTENT_STORAGE',['../netdb_8c.html#a768ab8ead892d6454709680340cd070e',1,'netdb.c']]], + ['lwip_5ficmp_5fecho_5fcheck_5finput_5fpbuf_5flen',['LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN',['../icmp_8c.html#a6b9fd6be0a7dcf301bc86b9e96e3857e',1,'icmp.c']]], + ['lwip_5finline_5fip_5fchksum',['LWIP_INLINE_IP_CHKSUM',['../ip4_8c.html#a9652ce304f893f6245c6ba9daea0a30f',1,'ip4.c']]], + ['lwip_5fip_5fcheck_5fpbuf_5fref_5fcount_5ffor_5ftx',['LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX',['../ip_8h.html#a355679dba1c0d8ef07ce3abcd28e3063',1,'ip.h']]], + ['lwip_5flowpan6_5f802154_5fdebug',['LWIP_LOWPAN6_802154_DEBUG',['../lowpan6__opts_8h.html#acf9a44be56d5dca9e45f644571d66f58',1,'lowpan6_opts.h']]], + ['lwip_5flowpan6_5fdebug',['LWIP_LOWPAN6_DEBUG',['../lowpan6__opts_8h.html#ae90ebb32999c6df5cc83705e133e1754',1,'lowpan6_opts.h']]], + ['lwip_5flowpan6_5fdecompression_5fdebug',['LWIP_LOWPAN6_DECOMPRESSION_DEBUG',['../lowpan6__opts_8h.html#a7f4db0bd3dbe36a19efbd24cd8b7fcf0',1,'lowpan6_opts.h']]], + ['lwip_5flowpan6_5fip_5fcompressed_5fdebug',['LWIP_LOWPAN6_IP_COMPRESSED_DEBUG',['../lowpan6__opts_8h.html#a231bc758484376dfd2ded6931c462df8',1,'lowpan6_opts.h']]], + ['lwip_5fmakeu32',['LWIP_MAKEU32',['../def_8h.html#acf56d3da92a0a7a8a62a617e793e948c',1,'def.h']]], + ['lwip_5fnsc_5fipv4_5faddress_5fchanged',['LWIP_NSC_IPV4_ADDRESS_CHANGED',['../netif_8h.html#aeb4e790199b02469aa04c044ef5cfa32',1,'netif.h']]], + ['lwip_5fnsc_5fipv4_5fgateway_5fchanged',['LWIP_NSC_IPV4_GATEWAY_CHANGED',['../netif_8h.html#a22400d2202581b4a7273cded712adf49',1,'netif.h']]], + ['lwip_5fnsc_5fipv4_5fnetmask_5fchanged',['LWIP_NSC_IPV4_NETMASK_CHANGED',['../netif_8h.html#ad747072771a887443ab33f90a12077d4',1,'netif.h']]], + ['lwip_5fnsc_5fipv4_5fsettings_5fchanged',['LWIP_NSC_IPV4_SETTINGS_CHANGED',['../netif_8h.html#a4ff19a6f3045f65d0397d30b6609660a',1,'netif.h']]], + ['lwip_5fnsc_5fipv6_5faddr_5fstate_5fchanged',['LWIP_NSC_IPV6_ADDR_STATE_CHANGED',['../netif_8h.html#a0d70fe11cac43c8fa35827b8e607ccf6',1,'netif.h']]], + ['lwip_5fnsc_5fipv6_5fset',['LWIP_NSC_IPV6_SET',['../netif_8h.html#a8fb4317a77ee2e3848be80db15618666',1,'netif.h']]], + ['lwip_5fnsc_5flink_5fchanged',['LWIP_NSC_LINK_CHANGED',['../netif_8h.html#a5ad7308195c0581680dd62fb148501cd',1,'netif.h']]], + ['lwip_5fnsc_5fnetif_5fadded',['LWIP_NSC_NETIF_ADDED',['../netif_8h.html#adbfecb47897cfe63d4f6366c1fed23b2',1,'netif.h']]], + ['lwip_5fnsc_5fnetif_5fremoved',['LWIP_NSC_NETIF_REMOVED',['../netif_8h.html#ae8e2dc87c19a03d481ae37bcf7ced5c9',1,'netif.h']]], + ['lwip_5fnsc_5fstatus_5fchanged',['LWIP_NSC_STATUS_CHANGED',['../netif_8h.html#a6f406ee3ab60e8a4f27ae2483c96b8e2',1,'netif.h']]], + ['lwip_5frfc7668_5fip_5funcompressed_5fdebug',['LWIP_RFC7668_IP_UNCOMPRESSED_DEBUG',['../lowpan6__opts_8h.html#a5b7a3e204d2edde5552ca3c8694419c1',1,'lowpan6_opts.h']]], + ['lwip_5frfc7668_5flinux_5fworkaround_5fpublic_5faddress',['LWIP_RFC7668_LINUX_WORKAROUND_PUBLIC_ADDRESS',['../lowpan6__opts_8h.html#af4a4d962af3439b111a8e72e5eeaccf8',1,'lowpan6_opts.h']]], + ['lwip_5fsnmp_5fv3',['LWIP_SNMP_V3',['../snmp__opts_8h.html#a1fe0e120f979ed400f649019edcefe2b',1,'snmp_opts.h']]], + ['lwip_5fsupport_5fcustom_5fpbuf',['LWIP_SUPPORT_CUSTOM_PBUF',['../pbuf_8h.html#a64174c5169b48dc17674324afd9c63b9',1,'pbuf.h']]], + ['lwip_5ftcp_5fcalc_5finitial_5fcwnd',['LWIP_TCP_CALC_INITIAL_CWND',['../tcp__in_8c.html#aea174f2c6ca4cb0ad270dd8d0faf0c84',1,'tcp_in.c']]], + ['lwip_5ftimeval_5fprivate',['LWIP_TIMEVAL_PRIVATE',['../sockets_8h.html#aaffd64f6887883ec6401e6bb684c40fa',1,'sockets.h']]], + ['lwiperf_5fcheck_5frx_5fdata',['LWIPERF_CHECK_RX_DATA',['../lwiperf_8c.html#af51dcfc53fe575411c26e18963f1b902',1,'lwiperf.c']]], + ['lwiperf_5fserver_5fip_5ftype',['LWIPERF_SERVER_IP_TYPE',['../lwiperf_8c.html#a1351e47d0bdb7d0fe0efaf9f1b2b0f7a',1,'lwiperf.c']]], + ['lwiperf_5ftcp_5fmax_5fidle_5fsec',['LWIPERF_TCP_MAX_IDLE_SEC',['../lwiperf_8c.html#a646d7e0b37c5cefdd6eef38a3fba4673',1,'lwiperf.c']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_7.html b/Libraries/LwIP/doc/doxygen/output/html/search/defines_7.html new file mode 100644 index 0000000..275e1b3 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_7.js b/Libraries/LwIP/doc/doxygen/output/html/search/defines_7.js new file mode 100644 index 0000000..6d6428a --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_7.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['mib2_5fcopy_5fsysuptime_5fto',['MIB2_COPY_SYSUPTIME_TO',['../snmp_8h.html#abe6b270482ca9af07c029f3136d8ec9c',1,'snmp.h']]], + ['min_5freq_5flen',['MIN_REQ_LEN',['../httpd_8c.html#aa8e2f3e13ac1fcacd85c558d6e40e40a',1,'httpd.c']]], + ['min_5fsize',['MIN_SIZE',['../mem_8c.html#a278694c2333c9826f21ddd2c2d220f66',1,'mem.c']]], + ['mqtt_5fctl_5fpacket_5ftype',['MQTT_CTL_PACKET_TYPE',['../mqtt_8c.html#a45c57ebd31832f1c128d847067c4688b',1,'mqtt.c']]], + ['mqtt_5fdebug',['MQTT_DEBUG',['../mqtt_8c.html#a99c325e06cc17ee24e09dab251606f9d',1,'mqtt.c']]], + ['mqtt_5fringbuf_5ffree',['mqtt_ringbuf_free',['../mqtt_8c.html#afba101fbf26b556c869060d3d013c8fa',1,'mqtt.c']]], + ['mqtt_5fringbuf_5flinear_5fread_5flength',['mqtt_ringbuf_linear_read_length',['../mqtt_8c.html#ad82b4039213ab3f1d9e4bcd3aa0c88a3',1,'mqtt.c']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_8.html b/Libraries/LwIP/doc/doxygen/output/html/search/defines_8.html new file mode 100644 index 0000000..de651d9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_8.js b/Libraries/LwIP/doc/doxygen/output/html/search/defines_8.js new file mode 100644 index 0000000..0a197eb --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_8.js @@ -0,0 +1,34 @@ +var searchData= +[ + ['nd6_5foption_5ftype_5fmtu',['ND6_OPTION_TYPE_MTU',['../prot_2nd6_8h.html#aab6c15c9bea51fbdcc660f718bb403a8',1,'nd6.h']]], + ['nd6_5foption_5ftype_5fprefix_5finfo',['ND6_OPTION_TYPE_PREFIX_INFO',['../prot_2nd6_8h.html#a0225d4c8911efdbdbc2b40de208906c2',1,'nd6.h']]], + ['nd6_5foption_5ftype_5frdnss',['ND6_OPTION_TYPE_RDNSS',['../prot_2nd6_8h.html#a3188b9704a8ca598f54b87c3db73272e',1,'nd6.h']]], + ['nd6_5foption_5ftype_5fredir_5fhdr',['ND6_OPTION_TYPE_REDIR_HDR',['../prot_2nd6_8h.html#aeaa575c1a66ccaa2dc62ff2c0bd71619',1,'nd6.h']]], + ['nd6_5foption_5ftype_5froute_5finfo',['ND6_OPTION_TYPE_ROUTE_INFO',['../prot_2nd6_8h.html#aff2e03766ee1fa15263c4aeda5097d28',1,'nd6.h']]], + ['nd6_5foption_5ftype_5fsource_5flladdr',['ND6_OPTION_TYPE_SOURCE_LLADDR',['../prot_2nd6_8h.html#a68ce8550a20cd30093d6e79e1ca51842',1,'nd6.h']]], + ['nd6_5fra_5fflag_5fmanaged_5faddr_5fconfig',['ND6_RA_FLAG_MANAGED_ADDR_CONFIG',['../prot_2nd6_8h.html#a7fb1b330719d83b7525374f4beca51bc',1,'nd6.h']]], + ['nd6_5frtr_5fsolicitation_5finterval',['ND6_RTR_SOLICITATION_INTERVAL',['../nd6_8h.html#a2fec65c0785551bad3a282ddee4062ac',1,'nd6.h']]], + ['nd6_5ftmr_5finterval',['ND6_TMR_INTERVAL',['../nd6_8h.html#a3250c1e32713635d588cf25865ebed56',1,'nd6.h']]], + ['netb_5fhflag_5fresponse',['NETB_HFLAG_RESPONSE',['../netbiosns_8c.html#af09685abf1739c802bc8772b35b7fb1c',1,'netbiosns.c']]], + ['netb_5fnflag_5funique',['NETB_NFLAG_UNIQUE',['../netbiosns_8c.html#ae00d45caef5a670e3aedde2788b3f212',1,'netbiosns.c']]], + ['netbios_5fname_5flen',['NETBIOS_NAME_LEN',['../netbiosns_8c.html#a4b83658c5bbb9ac90aca4351086a9a00',1,'netbiosns.c']]], + ['netbios_5fname_5fttl',['NETBIOS_NAME_TTL',['../netbiosns_8c.html#a35d43ea3290f6412e45598b610f03cf1',1,'netbiosns.c']]], + ['netbuf_5fflag_5fchksum',['NETBUF_FLAG_CHKSUM',['../netbuf_8h.html#ab75db64a9e84eb67a382c30e382d417c',1,'netbuf.h']]], + ['netbuf_5fflag_5fdestaddr',['NETBUF_FLAG_DESTADDR',['../netbuf_8h.html#ab38abb4213df4c00b9b3ab844322a090',1,'netbuf.h']]], + ['netconn_5ffin_5frx_5fpending',['NETCONN_FIN_RX_PENDING',['../api_8h.html#a24d62a2a03ba421fcf2bdce1ea89b949',1,'api.h']]], + ['netconn_5fflag_5fcheck_5fwritespace',['NETCONN_FLAG_CHECK_WRITESPACE',['../api_8h.html#a9d791955a4256a0589a3844e4e6f0f9c',1,'api.h']]], + ['netconn_5fflag_5fin_5fnonblocking_5fconnect',['NETCONN_FLAG_IN_NONBLOCKING_CONNECT',['../api_8h.html#a70bb861ee643b60ee402fd48f581f58d',1,'api.h']]], + ['netconn_5fflag_5fipv6_5fv6only',['NETCONN_FLAG_IPV6_V6ONLY',['../api_8h.html#a60892e4eb139f10157847fea4266bf5b',1,'api.h']]], + ['netconn_5fflag_5fmboxclosed',['NETCONN_FLAG_MBOXCLOSED',['../api_8h.html#af77be7590d3712259e78103c1dddf63f',1,'api.h']]], + ['netconn_5fflag_5fnon_5fblocking',['NETCONN_FLAG_NON_BLOCKING',['../api_8h.html#abee57aa0ba63e35742d411bc5224900a',1,'api.h']]], + ['netconn_5fget_5frecvbufsize',['netconn_get_recvbufsize',['../api_8h.html#ac0298c287dc3823047c378c014ff1eb0',1,'api.h']]], + ['netconn_5fget_5fsendtimeout',['netconn_get_sendtimeout',['../api_8h.html#a7d6e84458eec796b0b0ce1bb247f323f',1,'api.h']]], + ['netconn_5fis_5fnonblocking',['netconn_is_nonblocking',['../api_8h.html#a5789f0030b895b40625a74deb5a1092f',1,'api.h']]], + ['netconn_5fset_5fnonblocking',['netconn_set_nonblocking',['../api_8h.html#a6a578dd5b55e4457e0d23574ec9c55bb',1,'api.h']]], + ['netconn_5fset_5frecvbufsize',['netconn_set_recvbufsize',['../api_8h.html#a04785274634a5b504c760731c2e70725',1,'api.h']]], + ['netconn_5fset_5fsendtimeout',['netconn_set_sendtimeout',['../api_8h.html#a3ce3ad9f660e99b11fec20cafaf8f016',1,'api.h']]], + ['netconn_5ftype',['netconn_type',['../api_8h.html#a62cd17ad03bb2817cb0c419e1c9790b1',1,'api.h']]], + ['netif_5fis_5flink_5fup',['netif_is_link_up',['../netif_8h.html#a780be4c3fa9f7f2534f7865666c3a1b8',1,'netif.h']]], + ['netif_5fmax_5fhwaddr_5flen',['NETIF_MAX_HWADDR_LEN',['../netif_8h.html#ab887a8ec553de1be1d04cf2961c63c41',1,'netif.h']]], + ['netif_5fnamesize',['NETIF_NAMESIZE',['../netif_8h.html#a302f24fbfe883ee4840ffc71f267ae2a',1,'netif.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_9.html b/Libraries/LwIP/doc/doxygen/output/html/search/defines_9.html new file mode 100644 index 0000000..a93bb53 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_9.js b/Libraries/LwIP/doc/doxygen/output/html/search/defines_9.js new file mode 100644 index 0000000..1580aef --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_9.js @@ -0,0 +1,17 @@ +var searchData= +[ + ['pbuf_5falloc_5fflag_5fdata_5fcontiguous',['PBUF_ALLOC_FLAG_DATA_CONTIGUOUS',['../pbuf_8h.html#a426883d928f8f3e8fd066e616159d78f',1,'pbuf.h']]], + ['pbuf_5falloc_5fflag_5frx',['PBUF_ALLOC_FLAG_RX',['../pbuf_8h.html#a567a0dfa01b0e5540f9416a200ed163f',1,'pbuf.h']]], + ['pbuf_5fflag_5fis_5fcustom',['PBUF_FLAG_IS_CUSTOM',['../pbuf_8h.html#af78a7e1815dc0e31884d095b666d997f',1,'pbuf.h']]], + ['pbuf_5fflag_5fllbcast',['PBUF_FLAG_LLBCAST',['../pbuf_8h.html#a6772c16662bbb78597399add086500c0',1,'pbuf.h']]], + ['pbuf_5fflag_5fllmcast',['PBUF_FLAG_LLMCAST',['../pbuf_8h.html#ac0d56cde47aca24ef410d730d7c89887',1,'pbuf.h']]], + ['pbuf_5fflag_5fmcastloop',['PBUF_FLAG_MCASTLOOP',['../pbuf_8h.html#ab8ad153151a8c157335d9c0cedc007e6',1,'pbuf.h']]], + ['pbuf_5fflag_5fpush',['PBUF_FLAG_PUSH',['../pbuf_8h.html#a018a6499e357f8a1373321f802a82930',1,'pbuf.h']]], + ['pbuf_5fflag_5ftcp_5ffin',['PBUF_FLAG_TCP_FIN',['../pbuf_8h.html#a36a915aa2f6a188baa2862881407971e',1,'pbuf.h']]], + ['pbuf_5fpool_5ffree_5fooseq',['PBUF_POOL_FREE_OOSEQ',['../pbuf_8h.html#ac54b0f161128a32c7419c33b893a5106',1,'pbuf.h']]], + ['pbuf_5ftype_5falloc_5fsrc_5fmask',['PBUF_TYPE_ALLOC_SRC_MASK',['../pbuf_8h.html#a97d4db8e0f127f61af0016c184c865ca',1,'pbuf.h']]], + ['pbuf_5ftype_5falloc_5fsrc_5fmask_5fapp_5fmax',['PBUF_TYPE_ALLOC_SRC_MASK_APP_MAX',['../pbuf_8h.html#aad686ef346759a221abdb45f64649816',1,'pbuf.h']]], + ['pbuf_5ftype_5falloc_5fsrc_5fmask_5fapp_5fmin',['PBUF_TYPE_ALLOC_SRC_MASK_APP_MIN',['../pbuf_8h.html#aa1f62ba9dc5d462e67e33c4be64c601a',1,'pbuf.h']]], + ['pbuf_5ftype_5fflag_5fdata_5fvolatile',['PBUF_TYPE_FLAG_DATA_VOLATILE',['../pbuf_8h.html#a02789ca67766def65000b58f7fe7d03b',1,'pbuf.h']]], + ['pbuf_5ftype_5fflag_5fstruct_5fdata_5fcontiguous',['PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS',['../pbuf_8h.html#a49ab2c0662378f268ed8209bd54aaedf',1,'pbuf.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_a.html b/Libraries/LwIP/doc/doxygen/output/html/search/defines_a.html new file mode 100644 index 0000000..cf4841d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_a.js b/Libraries/LwIP/doc/doxygen/output/html/search/defines_a.js new file mode 100644 index 0000000..c0ffaf2 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_a.js @@ -0,0 +1,32 @@ +var searchData= +[ + ['selwait_5ft',['SELWAIT_T',['../sockets__priv_8h.html#a8f4d240733a9261c668fc66dc4ce8196',1,'sockets_priv.h']]], + ['slip_5fmax_5fsize',['SLIP_MAX_SIZE',['../slipif_8c.html#accf448f9dabb0f33ef46b40355691cab',1,'slipif.c']]], + ['slip_5frx_5fqueue',['SLIP_RX_QUEUE',['../slipif_8h.html#a37ce8613535232db02bfd9ae9b51c668',1,'slipif.h']]], + ['slip_5fsio_5fspeed',['SLIP_SIO_SPEED',['../slipif_8c.html#a2a9e9ed81732a6794a9b9a712f75a1cc',1,'slipif.c']]], + ['slip_5fuse_5frx_5fthread',['SLIP_USE_RX_THREAD',['../slipif_8h.html#a198967c11f79cffc32192710294e8826',1,'slipif.h']]], + ['smtp_5fpoll_5finterval',['SMTP_POLL_INTERVAL',['../smtp_8c.html#a19ebd0b9a82b87fd205fed0dba06649e',1,'smtp.c']]], + ['smtp_5ftimeout',['SMTP_TIMEOUT',['../smtp_8c.html#a6029851c4f71d98b00d6c49a17ea9ef6',1,'smtp.c']]], + ['smtp_5ftimeout_5fdatablock',['SMTP_TIMEOUT_DATABLOCK',['../smtp_8c.html#ad853ab316a3b866b87c0454053febfe3',1,'smtp.c']]], + ['smtp_5ftimeout_5fdataterm',['SMTP_TIMEOUT_DATATERM',['../smtp_8c.html#a73855e673457f748b6bcba49aab9b035',1,'smtp.c']]], + ['snmp_5fcreate_5fthread_5fsync_5fnode',['SNMP_CREATE_THREAD_SYNC_NODE',['../snmp__threadsync_8h.html#a1971c27c8addf1c426abd1abac54c8d2',1,'snmp_threadsync.h']]], + ['snmp_5fgentrap_5fauth_5ffailure',['SNMP_GENTRAP_AUTH_FAILURE',['../apps_2snmp_8h.html#aaf312d8bdbeed2c02560321ab24a022f',1,'snmp.h']]], + ['snmp_5fgentrap_5fcoldstart',['SNMP_GENTRAP_COLDSTART',['../apps_2snmp_8h.html#ae9310bbe1948b3c3bc64c073d4621019',1,'snmp.h']]], + ['snmp_5fgentrap_5fegp_5fneighbor_5floss',['SNMP_GENTRAP_EGP_NEIGHBOR_LOSS',['../apps_2snmp_8h.html#ac1cd822650d9ac66d0333a5ad600cfee',1,'snmp.h']]], + ['snmp_5fgentrap_5fenterprise_5fspecific',['SNMP_GENTRAP_ENTERPRISE_SPECIFIC',['../apps_2snmp_8h.html#ab3691cecfa911baa52ccf6054022ba43',1,'snmp.h']]], + ['snmp_5fgentrap_5flinkdown',['SNMP_GENTRAP_LINKDOWN',['../apps_2snmp_8h.html#a1856efbe83199f456c34a4e5139dfb16',1,'snmp.h']]], + ['snmp_5fgentrap_5flinkup',['SNMP_GENTRAP_LINKUP',['../apps_2snmp_8h.html#afa665cdc02ccd5ee9fe0c4cb1b792186',1,'snmp.h']]], + ['snmp_5fgentrap_5fwarmstart',['SNMP_GENTRAP_WARMSTART',['../apps_2snmp_8h.html#a9a2e5824deab50e639b01181307a0926',1,'snmp.h']]], + ['snmp_5fnode_5ftree',['SNMP_NODE_TREE',['../snmp__core_8h.html#a9ee3aad9305fdd883abb37822be81b72',1,'snmp_core.h']]], + ['sntp_5ffrac_5fto_5fus',['SNTP_FRAC_TO_US',['../sntp_8c.html#aebe74c93643ac9b8c8a9c7d223192c8f',1,'sntp.c']]], + ['swap_5fbytes_5fin_5fword',['SWAP_BYTES_IN_WORD',['../inet__chksum_8h.html#a0196bd603262882d16b5264b52eafe18',1,'inet_chksum.h']]], + ['sys_5farch_5ftimeout',['SYS_ARCH_TIMEOUT',['../sys_8h.html#ac1495030a8ab5e1f3c89e42ced527c5b',1,'sys.h']]], + ['sys_5fmbox_5fempty',['SYS_MBOX_EMPTY',['../sys_8h.html#ab0571e67edca0132b144106e9b319ef9',1,'sys.h']]], + ['sys_5fmbox_5fset_5finvalid_5fval',['sys_mbox_set_invalid_val',['../sys_8h.html#ae293feebb61d36f2db99be53702b8203',1,'sys.h']]], + ['sys_5fmbox_5ftryfetch',['sys_mbox_tryfetch',['../sys_8h.html#ab7841780b31ba9c0a39a440aad1fca13',1,'sys.h']]], + ['sys_5fmbox_5fvalid_5fval',['sys_mbox_valid_val',['../sys_8h.html#aae82640d0bdbeec7b9b6511b3f8d99cb',1,'sys.h']]], + ['sys_5fsem_5fset_5finvalid_5fval',['sys_sem_set_invalid_val',['../sys_8h.html#a2556e570f6973a6f4d57d0e76ef190d8',1,'sys.h']]], + ['sys_5fsem_5fvalid_5fval',['sys_sem_valid_val',['../sys_8h.html#a9e8ad541356786936f23ab83b8f550cc',1,'sys.h']]], + ['sys_5fsem_5fwait',['sys_sem_wait',['../sys_8h.html#a84e7e4bc00255aee84e6e7289a985703',1,'sys.h']]], + ['sys_5ftimeouts_5fsleeptime_5finfinite',['SYS_TIMEOUTS_SLEEPTIME_INFINITE',['../timeouts_8h.html#a9e2b2593e709ff54c7e3c0b003f6f1b0',1,'timeouts.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_b.html b/Libraries/LwIP/doc/doxygen/output/html/search/defines_b.html new file mode 100644 index 0000000..26cf44f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_b.js b/Libraries/LwIP/doc/doxygen/output/html/search/defines_b.js new file mode 100644 index 0000000..b509ab7 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_b.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['tcp_5fbuild_5fmss_5foption',['TCP_BUILD_MSS_OPTION',['../tcp__priv_8h.html#abdc99c343efc6c81abf60bb62b361dd8',1,'tcp_priv.h']]], + ['tcp_5fchecksum_5fon_5fcopy',['TCP_CHECKSUM_ON_COPY',['../tcp__priv_8h.html#aea0c47b916a8a25f82d2063335033aee',1,'tcp_priv.h']]], + ['tcp_5fchecksum_5fon_5fcopy_5fsanity_5fcheck',['TCP_CHECKSUM_ON_COPY_SANITY_CHECK',['../tcp__out_8c.html#a25d7e9081baa5c84f2ebd34b0eb4169b',1,'tcp_out.c']]], + ['tcp_5fdo_5foutput_5fnagle',['tcp_do_output_nagle',['../tcp__priv_8h.html#afbd7a2997e3a3b7569efc3298e2e409f',1,'tcp_priv.h']]], + ['tcp_5foversize_5fcalc_5flength',['TCP_OVERSIZE_CALC_LENGTH',['../tcp__out_8c.html#aa2ef22d2384225a1b5fee187411cc129',1,'tcp_out.c']]], + ['tcp_5foversize_5fdbgcheck',['TCP_OVERSIZE_DBGCHECK',['../tcp__priv_8h.html#a178a6e9966d03c3326b9e0568666bb69',1,'tcp_priv.h']]], + ['tcp_5fpcb_5fcommon',['TCP_PCB_COMMON',['../tcp_8h.html#a874630045102fc5f1442704a790c8bb8',1,'tcp.h']]], + ['tf_5freset',['TF_RESET',['../tcp__priv_8h.html#ac9dbdaeac3e25f5badf3a763a1b0b990',1,'tcp_priv.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_c.html b/Libraries/LwIP/doc/doxygen/output/html/search/defines_c.html new file mode 100644 index 0000000..eca33be --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_c.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_c.js b/Libraries/LwIP/doc/doxygen/output/html/search/defines_c.js new file mode 100644 index 0000000..0d12169 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_c.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['unlock_5ftcpip_5fcore',['UNLOCK_TCPIP_CORE',['../tcpip_8h.html#a915effea029b9c4891e1ec635eb1826d',1,'tcpip.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_d.html b/Libraries/LwIP/doc/doxygen/output/html/search/defines_d.html new file mode 100644 index 0000000..bdb5500 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_d.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/defines_d.js b/Libraries/LwIP/doc/doxygen/output/html/search/defines_d.js new file mode 100644 index 0000000..5f00ca9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/defines_d.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['zepif_5floopback',['ZEPIF_LOOPBACK',['../zepif_8c.html#a8cae594e71cf385076f7bda166729dcd',1,'zepif.c']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enums_0.html b/Libraries/LwIP/doc/doxygen/output/html/search/enums_0.html new file mode 100644 index 0000000..ee343ac --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enums_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enums_0.js b/Libraries/LwIP/doc/doxygen/output/html/search/enums_0.js new file mode 100644 index 0000000..bf45d70 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enums_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['dhcp6_5foption_5fidx',['dhcp6_option_idx',['../dhcp6_8c.html#ac4c519a2e10067f277d6b09e60919e9a',1,'dhcp6.c']]], + ['dhcp_5foption_5fidx',['dhcp_option_idx',['../dhcp_8c.html#a8c3b584d223b995b48613ad96cb776a0',1,'dhcp.c']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enums_1.html b/Libraries/LwIP/doc/doxygen/output/html/search/enums_1.html new file mode 100644 index 0000000..3fd210a --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enums_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enums_1.js b/Libraries/LwIP/doc/doxygen/output/html/search/enums_1.js new file mode 100644 index 0000000..133fafb --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enums_1.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['ehttpc_5fresult',['ehttpc_result',['../group__httpc.html#ga49e34884b272b1e0ddae8da46c31d9a3',1,'http_client.h']]], + ['err_5fenum_5ft',['err_enum_t',['../group__infrastructure__errors.html#gae2e66c7d13afc90ffecd6151680fbadc',1,'err.h']]], + ['etharp_5fstate',['etharp_state',['../etharp_8c.html#ae95dee9363e6d3417298e07380b2d383',1,'etharp.c']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enums_2.html b/Libraries/LwIP/doc/doxygen/output/html/search/enums_2.html new file mode 100644 index 0000000..a042e52 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enums_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enums_2.js b/Libraries/LwIP/doc/doxygen/output/html/search/enums_2.js new file mode 100644 index 0000000..5d2a622 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enums_2.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['icmp6_5fdur_5fcode',['icmp6_dur_code',['../prot_2icmp6_8h.html#a11fe21b0a8c1bc73ee887a96bf416ccf',1,'icmp6.h']]], + ['icmp6_5fpp_5fcode',['icmp6_pp_code',['../prot_2icmp6_8h.html#a3a817e777ebcfd705e8e5a1b4c5ae023',1,'icmp6.h']]], + ['icmp6_5fte_5fcode',['icmp6_te_code',['../prot_2icmp6_8h.html#ad06bbf4ee72635ece968db41cbe6869e',1,'icmp6.h']]], + ['icmp6_5ftype',['icmp6_type',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858',1,'icmp6.h']]], + ['icmp_5fdur_5ftype',['icmp_dur_type',['../icmp_8h.html#a17637465f209385e5d19ef47fd9266a5',1,'icmp.h']]], + ['icmp_5fte_5ftype',['icmp_te_type',['../icmp_8h.html#a058d0a0769bd38db99fc6fd1dad1324a',1,'icmp.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enums_3.html b/Libraries/LwIP/doc/doxygen/output/html/search/enums_3.html new file mode 100644 index 0000000..265e0cb --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enums_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enums_3.js b/Libraries/LwIP/doc/doxygen/output/html/search/enums_3.js new file mode 100644 index 0000000..7f6c20e --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enums_3.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['lwip_5fiana_5fhwtype',['lwip_iana_hwtype',['../group__iana.html#ga3d2bbfcb56c8adf3be8c8d12868cecfe',1,'iana.h']]], + ['lwip_5fiana_5fport_5fnumber',['lwip_iana_port_number',['../group__iana.html#gac9396d90585e49e9a287179bf5aa9ba0',1,'iana.h']]], + ['lwip_5fieee_5feth_5ftype',['lwip_ieee_eth_type',['../group__ieee.html#gab3a7b97666b100584972d158acbbd1f4',1,'ieee.h']]], + ['lwip_5fip_5faddr_5ftype',['lwip_ip_addr_type',['../group__ipaddr.html#gaf2142f0dfdcc938e2db16aa745ed585c',1,'ip_addr.h']]], + ['lwip_5fipv6_5fscope_5ftype',['lwip_ipv6_scope_type',['../group__ip6__zones.html#ga1993c4b6a297b6e92d80a9ce46ddedfe',1,'ip6_zone.h']]], + ['lwip_5fpollscan_5fopts',['lwip_pollscan_opts',['../sockets_8c.html#a2f15a466e75cbaaea0c31e63116870f9',1,'sockets.c']]], + ['lwiperf_5fclient_5ftype',['lwiperf_client_type',['../lwiperf_8h.html#ab3280e56eb41bd6f698a20843573f76c',1,'lwiperf.h']]], + ['lwiperf_5freport_5ftype',['lwiperf_report_type',['../lwiperf_8h.html#ab72a2d205e43d5243a291f937bbc24d6',1,'lwiperf.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enums_4.html b/Libraries/LwIP/doc/doxygen/output/html/search/enums_4.html new file mode 100644 index 0000000..97ee07f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enums_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enums_4.js b/Libraries/LwIP/doc/doxygen/output/html/search/enums_4.js new file mode 100644 index 0000000..c569e5c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enums_4.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['memp_5ft',['memp_t',['../memp_8h.html#a85a164b1f7764951cc685ea525114e57',1,'memp.h']]], + ['mqtt_5fconnect_5fflag',['mqtt_connect_flag',['../mqtt_8c.html#a4f6c42ed730546ff755e3bb99989dd12',1,'mqtt.c']]], + ['mqtt_5fconnection_5fstatus_5ft',['mqtt_connection_status_t',['../group__mqtt.html#ga8cf0f360ab20343af37e1d124395a77d',1,'mqtt.h']]], + ['mqtt_5fmessage_5ftype',['mqtt_message_type',['../mqtt_8c.html#ac243cf15beb51b2206e36da86c2f95f1',1,'mqtt.c']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enums_5.html b/Libraries/LwIP/doc/doxygen/output/html/search/enums_5.html new file mode 100644 index 0000000..f837d25 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enums_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enums_5.js b/Libraries/LwIP/doc/doxygen/output/html/search/enums_5.js new file mode 100644 index 0000000..0cdf324 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enums_5.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['netconn_5fevt',['netconn_evt',['../api_8h.html#af722260882d14c49afb765293ffb0155',1,'api.h']]], + ['netconn_5figmp',['netconn_igmp',['../api_8h.html#a5c6ded2c082de1536019b197a0a912db',1,'api.h']]], + ['netconn_5fstate',['netconn_state',['../api_8h.html#a2c6c9c1869f443c5ec7b31180a44fada',1,'api.h']]], + ['netconn_5ftype',['netconn_type',['../group__netconn__common.html#gaaba260d28d105fb4bce9185fd0300d91',1,'api.h']]], + ['netif_5fmac_5ffilter_5faction',['netif_mac_filter_action',['../netif_8h.html#ab194ec4241fad8b6e9aac51e3ec23de0',1,'netif.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enums_6.html b/Libraries/LwIP/doc/doxygen/output/html/search/enums_6.html new file mode 100644 index 0000000..56491ab --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enums_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enums_6.js b/Libraries/LwIP/doc/doxygen/output/html/search/enums_6.js new file mode 100644 index 0000000..e88cbe8 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enums_6.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['pbuf_5flayer',['pbuf_layer',['../group__pbuf.html#gaee1baa59bb2f85ba575b5a8619ac1ebf',1,'pbuf.h']]], + ['pbuf_5ftype',['pbuf_type',['../group__pbuf.html#gab7e0e32fcc292c0d7107721766ed92fb',1,'pbuf.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enums_7.html b/Libraries/LwIP/doc/doxygen/output/html/search/enums_7.html new file mode 100644 index 0000000..5851773 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enums_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enums_7.js b/Libraries/LwIP/doc/doxygen/output/html/search/enums_7.js new file mode 100644 index 0000000..f42f375 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enums_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['raw_5finput_5fstate',['raw_input_state',['../raw__priv_8h.html#a2580ec946c4196127888d5405257866b',1,'raw_priv.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enums_8.html b/Libraries/LwIP/doc/doxygen/output/html/search/enums_8.html new file mode 100644 index 0000000..74b2e21 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enums_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enums_8.js b/Libraries/LwIP/doc/doxygen/output/html/search/enums_8.js new file mode 100644 index 0000000..ac7822f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enums_8.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['smtp_5fsession_5fstate',['smtp_session_state',['../smtp_8c.html#a04947fff2d3a3803e6c716aecc7f2bae',1,'smtp.c']]], + ['snmp_5faccess_5ft',['snmp_access_t',['../snmp__core_8h.html#ad5a33687d1a6fcf970266b41b0633760',1,'snmp_core.h']]], + ['snmp_5ferr_5ft',['snmp_err_t',['../snmp__core_8h.html#abaa9cdad345ad93da515d31625a54589',1,'snmp_core.h']]], + ['snmp_5fiftype',['snmp_ifType',['../group__netif__mib2.html#ga15378b8dcd2a9dc2985142d864a767ba',1,'snmp.h']]], + ['snmp_5ftable_5fcolumn_5fdata_5ftype_5ft',['snmp_table_column_data_type_t',['../snmp__table_8h.html#af9b59f3ba7dccf338fe6e5bc1c4b1db5',1,'snmp_table.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_0.html b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_0.html new file mode 100644 index 0000000..9387b6a --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_0.js b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_0.js new file mode 100644 index 0000000..7171eaa --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_0.js @@ -0,0 +1,36 @@ +var searchData= +[ + ['err_5fabrt',['ERR_ABRT',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadcaf316b2c5eee4079820f7100849115142',1,'err.h']]], + ['err_5falready',['ERR_ALREADY',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadcae6f9c1e4c18ca844f7934307d4cc30e5',1,'err.h']]], + ['err_5farg',['ERR_ARG',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadcab508ce0ebdf3ca735208b00a80a45c91',1,'err.h']]], + ['err_5fbuf',['ERR_BUF',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadca05c91366f1b5203a5db9a241b415cd63',1,'err.h']]], + ['err_5fclsd',['ERR_CLSD',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadcaa5176d9fecf8ec43d3bc49f4e6c3f7f5',1,'err.h']]], + ['err_5fconn',['ERR_CONN',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadcab0036c51817b5200bfe8157cc4115b27',1,'err.h']]], + ['err_5fif',['ERR_IF',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadca7d61d90449ae6788575e8e46d5d3bbc6',1,'err.h']]], + ['err_5finprogress',['ERR_INPROGRESS',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadca13e1dd0edca8a27b6abdf1524bde7929',1,'err.h']]], + ['err_5fisconn',['ERR_ISCONN',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadca8543e1d6422fed7b318d97e08dcbaa33',1,'err.h']]], + ['err_5fmem',['ERR_MEM',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadcaaaeafdbf3aecc46864daa3cd829c7e05',1,'err.h']]], + ['err_5fok',['ERR_OK',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadcaa26c163b80b1f6786ca81dadc14b00fb',1,'err.h']]], + ['err_5frst',['ERR_RST',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadca759030525f1768a23dc086a5fd45b4e5',1,'err.h']]], + ['err_5frte',['ERR_RTE',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadca9448893187313c0c5a502ca9a9ad1c2a',1,'err.h']]], + ['err_5ftimeout',['ERR_TIMEOUT',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadcac568baeb6407ef5e2630084ccbc34be8',1,'err.h']]], + ['err_5fuse',['ERR_USE',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadca4ebdc2aa1dbd75f927845733a3fb1f8b',1,'err.h']]], + ['err_5fval',['ERR_VAL',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadcaa9a1c5a6fdeed0aad7fe41d538482bbd',1,'err.h']]], + ['err_5fwouldblock',['ERR_WOULDBLOCK',['../group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadcab9dcf89d46668b072192278fb907b7ad',1,'err.h']]], + ['ethtype_5farp',['ETHTYPE_ARP',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4a41217db03576ea59c44b28b248c39be5',1,'ieee.h']]], + ['ethtype_5fethercat',['ETHTYPE_ETHERCAT',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4a5085a5fd5f9c9506124e93ea43ad2d7c',1,'ieee.h']]], + ['ethtype_5fip',['ETHTYPE_IP',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4ac95756b20fde70b868ef4185dd221c79',1,'ieee.h']]], + ['ethtype_5fipv6',['ETHTYPE_IPV6',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4aab26004eed559217be5dd466a79b1383',1,'ieee.h']]], + ['ethtype_5fjumbo',['ETHTYPE_JUMBO',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4a2511e8a31961bd742363b11b274b9dd1',1,'ieee.h']]], + ['ethtype_5flldp',['ETHTYPE_LLDP',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4a02eab0dd87f222a2d555ca38b1b8afcc',1,'ieee.h']]], + ['ethtype_5fmrp',['ETHTYPE_MRP',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4ad36caec44d8db59ff433a8bd3e92ad3e',1,'ieee.h']]], + ['ethtype_5fpppoe',['ETHTYPE_PPPOE',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4a8c0e8f68b90134eb4f1f17d3d2eb6f8c',1,'ieee.h']]], + ['ethtype_5fpppoedisc',['ETHTYPE_PPPOEDISC',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4a58c6f40d7cc3edb9455762938f3f6569',1,'ieee.h']]], + ['ethtype_5fprofinet',['ETHTYPE_PROFINET',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4a889eb8f716238d16ee3408f16a5cf19d',1,'ieee.h']]], + ['ethtype_5fptp',['ETHTYPE_PTP',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4aa3e9e834eef932d073028e28eb8793dc',1,'ieee.h']]], + ['ethtype_5fqinq',['ETHTYPE_QINQ',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4a39a18006412cbb57536535bd9d378394',1,'ieee.h']]], + ['ethtype_5frarp',['ETHTYPE_RARP',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4a14292184cb41b279249319896d0e2b1f',1,'ieee.h']]], + ['ethtype_5fsercos',['ETHTYPE_SERCOS',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4ab93419f8edf5692e91629ab92fce8a14',1,'ieee.h']]], + ['ethtype_5fvlan',['ETHTYPE_VLAN',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4ad8f84826d52d92ac24a477d1f03e7903',1,'ieee.h']]], + ['ethtype_5fwol',['ETHTYPE_WOL',['../group__ieee.html#ggab3a7b97666b100584972d158acbbd1f4a530a30feb9b87fd993da2bf83776cf9b',1,'ieee.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_1.html b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_1.html new file mode 100644 index 0000000..f622aba --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_1.js b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_1.js new file mode 100644 index 0000000..c2631fb --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_1.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['httpc_5fresult_5ferr_5fclosed',['HTTPC_RESULT_ERR_CLOSED',['../group__httpc.html#gga49e34884b272b1e0ddae8da46c31d9a3a89a6700abb14dd7cab9b4e0fd66e5fd6',1,'http_client.h']]], + ['httpc_5fresult_5ferr_5fconnect',['HTTPC_RESULT_ERR_CONNECT',['../group__httpc.html#gga49e34884b272b1e0ddae8da46c31d9a3ab866d5433b4c4593c80b756d434e1d09',1,'http_client.h']]], + ['httpc_5fresult_5ferr_5fcontent_5flen',['HTTPC_RESULT_ERR_CONTENT_LEN',['../group__httpc.html#gga49e34884b272b1e0ddae8da46c31d9a3a6c8a4195834e1997a498a03bb47bb096',1,'http_client.h']]], + ['httpc_5fresult_5ferr_5fhostname',['HTTPC_RESULT_ERR_HOSTNAME',['../group__httpc.html#gga49e34884b272b1e0ddae8da46c31d9a3ae04714f90692c122e6c85e06083dbc6d',1,'http_client.h']]], + ['httpc_5fresult_5ferr_5fmem',['HTTPC_RESULT_ERR_MEM',['../group__httpc.html#gga49e34884b272b1e0ddae8da46c31d9a3a49972833ec01c7a10dee734c7c69ed62',1,'http_client.h']]], + ['httpc_5fresult_5ferr_5fsvr_5fresp',['HTTPC_RESULT_ERR_SVR_RESP',['../group__httpc.html#gga49e34884b272b1e0ddae8da46c31d9a3aaa023a6f8069c02c87a826ba323c54b8',1,'http_client.h']]], + ['httpc_5fresult_5ferr_5ftimeout',['HTTPC_RESULT_ERR_TIMEOUT',['../group__httpc.html#gga49e34884b272b1e0ddae8da46c31d9a3a8e6c597f88335b31e6a8b078a32fde33',1,'http_client.h']]], + ['httpc_5fresult_5ferr_5funknown',['HTTPC_RESULT_ERR_UNKNOWN',['../group__httpc.html#gga49e34884b272b1e0ddae8da46c31d9a3a5026187026abd1d242333ba6ff69ddbd',1,'http_client.h']]], + ['httpc_5fresult_5flocal_5fabort',['HTTPC_RESULT_LOCAL_ABORT',['../group__httpc.html#gga49e34884b272b1e0ddae8da46c31d9a3adf4e45365923c16b6a6879bde5f60867',1,'http_client.h']]], + ['httpc_5fresult_5fok',['HTTPC_RESULT_OK',['../group__httpc.html#gga49e34884b272b1e0ddae8da46c31d9a3af3173d4d272c9c0b5a5c9b5b027e3659',1,'http_client.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_2.html b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_2.html new file mode 100644 index 0000000..d499078 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_2.js b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_2.js new file mode 100644 index 0000000..f8fcbf3 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_2.js @@ -0,0 +1,52 @@ +var searchData= +[ + ['icmp6_5fdur_5faddress',['ICMP6_DUR_ADDRESS',['../prot_2icmp6_8h.html#a11fe21b0a8c1bc73ee887a96bf416ccfa789ef8158d8750b0fa5a14ec9ecaa23a',1,'icmp6.h']]], + ['icmp6_5fdur_5fno_5froute',['ICMP6_DUR_NO_ROUTE',['../prot_2icmp6_8h.html#a11fe21b0a8c1bc73ee887a96bf416ccfa695bb4d92f32b504a9483ff137235a78',1,'icmp6.h']]], + ['icmp6_5fdur_5fpolicy',['ICMP6_DUR_POLICY',['../prot_2icmp6_8h.html#a11fe21b0a8c1bc73ee887a96bf416ccfac3c255282e0b49b5bbb3cd8f435bb763',1,'icmp6.h']]], + ['icmp6_5fdur_5fport',['ICMP6_DUR_PORT',['../prot_2icmp6_8h.html#a11fe21b0a8c1bc73ee887a96bf416ccfa28cc924ec6eaa761acb76ccef4adcba0',1,'icmp6.h']]], + ['icmp6_5fdur_5fprohibited',['ICMP6_DUR_PROHIBITED',['../prot_2icmp6_8h.html#a11fe21b0a8c1bc73ee887a96bf416ccfa251961b990d0fbaf2c643f047c4f2532',1,'icmp6.h']]], + ['icmp6_5fdur_5freject_5froute',['ICMP6_DUR_REJECT_ROUTE',['../prot_2icmp6_8h.html#a11fe21b0a8c1bc73ee887a96bf416ccfa2aeed278149fb071a34beec89df03b5c',1,'icmp6.h']]], + ['icmp6_5fdur_5fscope',['ICMP6_DUR_SCOPE',['../prot_2icmp6_8h.html#a11fe21b0a8c1bc73ee887a96bf416ccfabdb01a67c61da588872f5799ef75aa6e',1,'icmp6.h']]], + ['icmp6_5fpp_5ffield',['ICMP6_PP_FIELD',['../prot_2icmp6_8h.html#a3a817e777ebcfd705e8e5a1b4c5ae023a4aa4a79306a69fd4f60ad445cde4c2a9',1,'icmp6.h']]], + ['icmp6_5fpp_5fheader',['ICMP6_PP_HEADER',['../prot_2icmp6_8h.html#a3a817e777ebcfd705e8e5a1b4c5ae023acbcc58901e2345ffc31df4098de60ff8',1,'icmp6.h']]], + ['icmp6_5fpp_5foption',['ICMP6_PP_OPTION',['../prot_2icmp6_8h.html#a3a817e777ebcfd705e8e5a1b4c5ae023a53884832d00d3c8f8de62cfdb4646932',1,'icmp6.h']]], + ['icmp6_5fte_5ffrag',['ICMP6_TE_FRAG',['../prot_2icmp6_8h.html#ad06bbf4ee72635ece968db41cbe6869eaec493420d61c80a21981b1aa32befe1f',1,'icmp6.h']]], + ['icmp6_5fte_5fhl',['ICMP6_TE_HL',['../prot_2icmp6_8h.html#ad06bbf4ee72635ece968db41cbe6869eacccbb5e776df1b35af4149e593240880',1,'icmp6.h']]], + ['icmp6_5ftype_5fdur',['ICMP6_TYPE_DUR',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858aad9d4f207459e4bbd0c33a25adf6fdd7',1,'icmp6.h']]], + ['icmp6_5ftype_5ferep',['ICMP6_TYPE_EREP',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858ac6b91695c06bfc7fb2360310d7b8e78a',1,'icmp6.h']]], + ['icmp6_5ftype_5fereq',['ICMP6_TYPE_EREQ',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858ae649aa45c97b885f28771688957528a3',1,'icmp6.h']]], + ['icmp6_5ftype_5fmld',['ICMP6_TYPE_MLD',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a04228a1d11f9f88bd165f3430188bfe7',1,'icmp6.h']]], + ['icmp6_5ftype_5fmlq',['ICMP6_TYPE_MLQ',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858ad9794ae12b9ca196cc4fafaf6d834375',1,'icmp6.h']]], + ['icmp6_5ftype_5fmlr',['ICMP6_TYPE_MLR',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a906dd689f0aa9b4796f49f299d4e3eb0',1,'icmp6.h']]], + ['icmp6_5ftype_5fmra',['ICMP6_TYPE_MRA',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a29281016d3bb58e3bfd90417bbce7aa0',1,'icmp6.h']]], + ['icmp6_5ftype_5fmrs',['ICMP6_TYPE_MRS',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a425f4e64a7d1570228adbbe450650ab4',1,'icmp6.h']]], + ['icmp6_5ftype_5fmrt',['ICMP6_TYPE_MRT',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858afb12a9d774f53deb15ec23041548f6fc',1,'icmp6.h']]], + ['icmp6_5ftype_5fna',['ICMP6_TYPE_NA',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a1f99d333f425c28d3840e029cc9c46f3',1,'icmp6.h']]], + ['icmp6_5ftype_5fns',['ICMP6_TYPE_NS',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a0d8d8717c6c34053d1101932c23929fe',1,'icmp6.h']]], + ['icmp6_5ftype_5fpe1',['ICMP6_TYPE_PE1',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858ac7020c08a7b03ae2a198e4a8dcd31bd4',1,'icmp6.h']]], + ['icmp6_5ftype_5fpe2',['ICMP6_TYPE_PE2',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858aed14d280e5911098af914a94bd3ab22b',1,'icmp6.h']]], + ['icmp6_5ftype_5fpe3',['ICMP6_TYPE_PE3',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a9c9c358ebd5eb683a66819fd9ecf98c6',1,'icmp6.h']]], + ['icmp6_5ftype_5fpe4',['ICMP6_TYPE_PE4',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858af8ebe97c4f68b54c9ef0c43e98211df5',1,'icmp6.h']]], + ['icmp6_5ftype_5fpp',['ICMP6_TYPE_PP',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a63114feac8140031b74424d4a7cf6b26',1,'icmp6.h']]], + ['icmp6_5ftype_5fptb',['ICMP6_TYPE_PTB',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a1d52ef5024a5822bd622bcb0b9da323d',1,'icmp6.h']]], + ['icmp6_5ftype_5fra',['ICMP6_TYPE_RA',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858ae4ae04be7df3a2cce614af0a5cdae951',1,'icmp6.h']]], + ['icmp6_5ftype_5frd',['ICMP6_TYPE_RD',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a0f6702d62de5f873e0afe7431d878207',1,'icmp6.h']]], + ['icmp6_5ftype_5frs',['ICMP6_TYPE_RS',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a670d95494c9282f646ac442d81d9a780',1,'icmp6.h']]], + ['icmp6_5ftype_5frsv_5ferr',['ICMP6_TYPE_RSV_ERR',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858abe61415e020b996220337f0cd002a28f',1,'icmp6.h']]], + ['icmp6_5ftype_5frsv_5finf',['ICMP6_TYPE_RSV_INF',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a2c12d3244d837bd243ea647ec530600d',1,'icmp6.h']]], + ['icmp6_5ftype_5fte',['ICMP6_TYPE_TE',['../prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858afae9848904bc4b4b4aa716a7a9a2d7fe',1,'icmp6.h']]], + ['icmp_5fdur_5ffrag',['ICMP_DUR_FRAG',['../icmp_8h.html#a17637465f209385e5d19ef47fd9266a5a8be2bc49d42aa1a6ee1da93a8700ef5f',1,'icmp.h']]], + ['icmp_5fdur_5fhost',['ICMP_DUR_HOST',['../icmp_8h.html#a17637465f209385e5d19ef47fd9266a5a648ab915a76dfb7b9568e94de00da1e7',1,'icmp.h']]], + ['icmp_5fdur_5fnet',['ICMP_DUR_NET',['../icmp_8h.html#a17637465f209385e5d19ef47fd9266a5a3cc3714544e123bdef2eadb1a4d320e3',1,'icmp.h']]], + ['icmp_5fdur_5fport',['ICMP_DUR_PORT',['../icmp_8h.html#a17637465f209385e5d19ef47fd9266a5ac973dd9b04e094043ccc4cf875ef5644',1,'icmp.h']]], + ['icmp_5fdur_5fproto',['ICMP_DUR_PROTO',['../icmp_8h.html#a17637465f209385e5d19ef47fd9266a5a3c7bbd13b613990413ef167017dfbcef',1,'icmp.h']]], + ['icmp_5fdur_5fsr',['ICMP_DUR_SR',['../icmp_8h.html#a17637465f209385e5d19ef47fd9266a5af63296fc25f79e56946a56a8da132c13',1,'icmp.h']]], + ['icmp_5fte_5ffrag',['ICMP_TE_FRAG',['../icmp_8h.html#a058d0a0769bd38db99fc6fd1dad1324aa4d351874c3e2d4a4cf46569df28cd796',1,'icmp.h']]], + ['icmp_5fte_5fttl',['ICMP_TE_TTL',['../icmp_8h.html#a058d0a0769bd38db99fc6fd1dad1324aa827a1f8705826a6cc3c22e2571acf02c',1,'icmp.h']]], + ['ip6_5fmulticast',['IP6_MULTICAST',['../group__ip6__zones.html#gga1993c4b6a297b6e92d80a9ce46ddedfea70cda997b66f3e120e925c5a41904809',1,'ip6_zone.h']]], + ['ip6_5funicast',['IP6_UNICAST',['../group__ip6__zones.html#gga1993c4b6a297b6e92d80a9ce46ddedfeaacbcc65569837d437eea53c3bbb017b0',1,'ip6_zone.h']]], + ['ip6_5funknown',['IP6_UNKNOWN',['../group__ip6__zones.html#gga1993c4b6a297b6e92d80a9ce46ddedfeaddb1d298ce96cea5ccc8e1397443dbb8',1,'ip6_zone.h']]], + ['ipaddr_5ftype_5fany',['IPADDR_TYPE_ANY',['../group__ipaddr.html#ggaf2142f0dfdcc938e2db16aa745ed585cac6b2c99cf920e08efcb55dc40e42944e',1,'ip_addr.h']]], + ['ipaddr_5ftype_5fv4',['IPADDR_TYPE_V4',['../group__ipaddr.html#ggaf2142f0dfdcc938e2db16aa745ed585cace47fa82608deeb1c1c7c2c891eb5049',1,'ip_addr.h']]], + ['ipaddr_5ftype_5fv6',['IPADDR_TYPE_V6',['../group__ipaddr.html#ggaf2142f0dfdcc938e2db16aa745ed585caae510fd8ec7fe405b594b57af61f9a02',1,'ip_addr.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_3.html b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_3.html new file mode 100644 index 0000000..b4fc3ee --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_3.js b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_3.js new file mode 100644 index 0000000..07de56e --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_3.js @@ -0,0 +1,30 @@ +var searchData= +[ + ['lwip_5fiana_5fhwtype_5fethernet',['LWIP_IANA_HWTYPE_ETHERNET',['../group__iana.html#gga3d2bbfcb56c8adf3be8c8d12868cecfea89e82e6ac55811bb26fe66ec029f2a0c',1,'iana.h']]], + ['lwip_5fiana_5fport_5fdhcp_5fclient',['LWIP_IANA_PORT_DHCP_CLIENT',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0a9fcae1f16758e1ac35dab343fc897f40',1,'iana.h']]], + ['lwip_5fiana_5fport_5fdhcp_5fserver',['LWIP_IANA_PORT_DHCP_SERVER',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0ac70ae96c985cf3660e26aa496094916d',1,'iana.h']]], + ['lwip_5fiana_5fport_5fhttp',['LWIP_IANA_PORT_HTTP',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0a1c665cb8e57dff577f4966493c15b618',1,'iana.h']]], + ['lwip_5fiana_5fport_5fhttps',['LWIP_IANA_PORT_HTTPS',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0ad07fb8ff2b18006405d904b5b3810c88',1,'iana.h']]], + ['lwip_5fiana_5fport_5fmdns',['LWIP_IANA_PORT_MDNS',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0a839da325f45916d7b27d53d5e5e97dc6',1,'iana.h']]], + ['lwip_5fiana_5fport_5fmqtt',['LWIP_IANA_PORT_MQTT',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0a172d486d82c552ef3540cf8d61b14b22',1,'iana.h']]], + ['lwip_5fiana_5fport_5fnetbios',['LWIP_IANA_PORT_NETBIOS',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0ae1cf6eaab024b31aff5bf407d38e0ede',1,'iana.h']]], + ['lwip_5fiana_5fport_5fsecure_5fmqtt',['LWIP_IANA_PORT_SECURE_MQTT',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0ab833e9dc7646bd7affde45691bc66601',1,'iana.h']]], + ['lwip_5fiana_5fport_5fsmtp',['LWIP_IANA_PORT_SMTP',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0ae2645895203ca3c54005afad053a813c',1,'iana.h']]], + ['lwip_5fiana_5fport_5fsmtps',['LWIP_IANA_PORT_SMTPS',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0a88f8872246977c6e24c617266ada1a3b',1,'iana.h']]], + ['lwip_5fiana_5fport_5fsnmp',['LWIP_IANA_PORT_SNMP',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0aeb10a37f0c48e053b138f65b843c45d3',1,'iana.h']]], + ['lwip_5fiana_5fport_5fsnmp_5ftrap',['LWIP_IANA_PORT_SNMP_TRAP',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0aff60c0d3e8eca210b7e4faca3491f4a8',1,'iana.h']]], + ['lwip_5fiana_5fport_5fsntp',['LWIP_IANA_PORT_SNTP',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0a79c377ce09e05cd4410a8865d41b3efb',1,'iana.h']]], + ['lwip_5fiana_5fport_5ftftp',['LWIP_IANA_PORT_TFTP',['../group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0a7b318226afef92e019b67227acf94050',1,'iana.h']]], + ['lwip_5fpollscan_5fclear',['LWIP_POLLSCAN_CLEAR',['../sockets_8c.html#a2f15a466e75cbaaea0c31e63116870f9aa9a8fe3199d00016f1f5ad639e1b28f7',1,'sockets.c']]], + ['lwip_5fpollscan_5fdec_5fwait',['LWIP_POLLSCAN_DEC_WAIT',['../sockets_8c.html#a2f15a466e75cbaaea0c31e63116870f9a6c1eefa3e29a39b923c4b522eb1b3eb1',1,'sockets.c']]], + ['lwip_5fpollscan_5finc_5fwait',['LWIP_POLLSCAN_INC_WAIT',['../sockets_8c.html#a2f15a466e75cbaaea0c31e63116870f9ab6511d3104f70c18fb4bd80f24cb867d',1,'sockets.c']]], + ['lwiperf_5fclient',['LWIPERF_CLIENT',['../lwiperf_8h.html#ab3280e56eb41bd6f698a20843573f76cae1862655ebaaea2e7e0261dff0173110',1,'lwiperf.h']]], + ['lwiperf_5fdual',['LWIPERF_DUAL',['../lwiperf_8h.html#ab3280e56eb41bd6f698a20843573f76cab0381feca6655968e7380622e7a63ede',1,'lwiperf.h']]], + ['lwiperf_5ftcp_5faborted_5flocal',['LWIPERF_TCP_ABORTED_LOCAL',['../lwiperf_8h.html#ab72a2d205e43d5243a291f937bbc24d6abee2bf6da51a0845c15ac52b280203cb',1,'lwiperf.h']]], + ['lwiperf_5ftcp_5faborted_5flocal_5fdataerror',['LWIPERF_TCP_ABORTED_LOCAL_DATAERROR',['../lwiperf_8h.html#ab72a2d205e43d5243a291f937bbc24d6adda7e5dbaf1e04eb04ec0fd2b05584a5',1,'lwiperf.h']]], + ['lwiperf_5ftcp_5faborted_5flocal_5ftxerror',['LWIPERF_TCP_ABORTED_LOCAL_TXERROR',['../lwiperf_8h.html#ab72a2d205e43d5243a291f937bbc24d6a3d4e1f5742d80aeafb6b22aa74d93e40',1,'lwiperf.h']]], + ['lwiperf_5ftcp_5faborted_5fremote',['LWIPERF_TCP_ABORTED_REMOTE',['../lwiperf_8h.html#ab72a2d205e43d5243a291f937bbc24d6ae664c0f987584f07fb0f6f8896aada0d',1,'lwiperf.h']]], + ['lwiperf_5ftcp_5fdone_5fclient',['LWIPERF_TCP_DONE_CLIENT',['../lwiperf_8h.html#ab72a2d205e43d5243a291f937bbc24d6a4f9bde0cad305eaab25d2c1d0196677b',1,'lwiperf.h']]], + ['lwiperf_5ftcp_5fdone_5fserver',['LWIPERF_TCP_DONE_SERVER',['../lwiperf_8h.html#ab72a2d205e43d5243a291f937bbc24d6aa52255236ad2983346311ce7f28210e5',1,'lwiperf.h']]], + ['lwiperf_5ftradeoff',['LWIPERF_TRADEOFF',['../lwiperf_8h.html#ab3280e56eb41bd6f698a20843573f76caccdab7ee6e1b0981861e66f0755f7964',1,'lwiperf.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_4.html b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_4.html new file mode 100644 index 0000000..d6f69ac --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_4.js b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_4.js new file mode 100644 index 0000000..00eca2b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_4.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['mqtt_5fconnect_5faccepted',['MQTT_CONNECT_ACCEPTED',['../group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77da074dc1d289b8e8d4aad91f6a2cb93dc1',1,'mqtt.h']]], + ['mqtt_5fconnect_5fdisconnected',['MQTT_CONNECT_DISCONNECTED',['../group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77da321f5ce31b173f235de1a517fcfd00dd',1,'mqtt.h']]], + ['mqtt_5fconnect_5frefused_5fidentifier',['MQTT_CONNECT_REFUSED_IDENTIFIER',['../group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77da28ffe49b0175adaa2b9a27cb4873224a',1,'mqtt.h']]], + ['mqtt_5fconnect_5frefused_5fnot_5fauthorized_5f',['MQTT_CONNECT_REFUSED_NOT_AUTHORIZED_',['../group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77dafc4888158dd6ee84269a5f0bfdc12b17',1,'mqtt.h']]], + ['mqtt_5fconnect_5frefused_5fprotocol_5fversion',['MQTT_CONNECT_REFUSED_PROTOCOL_VERSION',['../group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77da41f8aa97142be337cb639f94d9145190',1,'mqtt.h']]], + ['mqtt_5fconnect_5frefused_5fserver',['MQTT_CONNECT_REFUSED_SERVER',['../group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77dade28ec1c2ce3d874e91251d683c92b2a',1,'mqtt.h']]], + ['mqtt_5fconnect_5frefused_5fusername_5fpass',['MQTT_CONNECT_REFUSED_USERNAME_PASS',['../group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77da290cf9037054c42022cc864cfade896a',1,'mqtt.h']]], + ['mqtt_5fconnect_5ftimeout',['MQTT_CONNECT_TIMEOUT',['../group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77da57153f2ab4331c6f76a9ee74e1bcfc62',1,'mqtt.h']]], + ['mqtt_5fdata_5fflag_5flast',['MQTT_DATA_FLAG_LAST',['../group__mqtt.html#gga99fb83031ce9923c84392b4e92f956b5a79cd00d0a5a8df13207e0c49447df87f',1,'mqtt.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_5.html b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_5.html new file mode 100644 index 0000000..43a28d1 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_5.js b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_5.js new file mode 100644 index 0000000..28edce9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_5.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['netconn_5fraw',['NETCONN_RAW',['../group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a0d828a7e9c1614d4cae56602b09f39e9',1,'api.h']]], + ['netconn_5ftcp',['NETCONN_TCP',['../group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a75d14318b91af7a452230189f47e5e1a',1,'api.h']]], + ['netconn_5ftcp_5fipv6',['NETCONN_TCP_IPV6',['../group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91ae7efa7c4e50b7b381531a2136cd5a013',1,'api.h']]], + ['netconn_5fudp',['NETCONN_UDP',['../group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a6b8ec191d69f7e639f4ab40779069636',1,'api.h']]], + ['netconn_5fudp_5fipv6',['NETCONN_UDP_IPV6',['../group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a34ee1c89f6705462590a4fe2c9772d9e',1,'api.h']]], + ['netconn_5fudplite',['NETCONN_UDPLITE',['../group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a655e1625cc7e6a93f1e3d2646f56a1e4',1,'api.h']]], + ['netconn_5fudplite_5fipv6',['NETCONN_UDPLITE_IPV6',['../group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91aa9cabc9d90606b5c5939fcc02ac588c7',1,'api.h']]], + ['netconn_5fudpnochksum',['NETCONN_UDPNOCHKSUM',['../group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a7e0c3f566b3d4321b36b711b6b1ad6de',1,'api.h']]], + ['netconn_5fudpnochksum_5fipv6',['NETCONN_UDPNOCHKSUM_IPV6',['../group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a2c7f548d26f6c411f084b6c59247b60e',1,'api.h']]], + ['netif_5fadd_5fmac_5ffilter',['NETIF_ADD_MAC_FILTER',['../netif_8h.html#ab194ec4241fad8b6e9aac51e3ec23de0a4186fbaf94be956ea1a3b02cd1cccb1f',1,'netif.h']]], + ['netif_5fdel_5fmac_5ffilter',['NETIF_DEL_MAC_FILTER',['../netif_8h.html#ab194ec4241fad8b6e9aac51e3ec23de0a7ad3406353906deb4e64ebeed349e07e',1,'netif.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_6.html b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_6.html new file mode 100644 index 0000000..7439ee1 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_6.js b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_6.js new file mode 100644 index 0000000..68c7097 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/enumvalues_6.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['pbuf_5fip',['PBUF_IP',['../group__pbuf.html#ggaee1baa59bb2f85ba575b5a8619ac1ebfafcc1e506061ba69dfa142eb6b3da5f13',1,'pbuf.h']]], + ['pbuf_5flink',['PBUF_LINK',['../group__pbuf.html#ggaee1baa59bb2f85ba575b5a8619ac1ebfab4de441e737330558b609a990cd17346',1,'pbuf.h']]], + ['pbuf_5fpool',['PBUF_POOL',['../group__pbuf.html#ggab7e0e32fcc292c0d7107721766ed92fbae969347127387b9b59a23ccd24b76d21',1,'pbuf.h']]], + ['pbuf_5fram',['PBUF_RAM',['../group__pbuf.html#ggab7e0e32fcc292c0d7107721766ed92fbac5e9f28455bca98944a030d4b84ecfab',1,'pbuf.h']]], + ['pbuf_5fraw',['PBUF_RAW',['../group__pbuf.html#ggaee1baa59bb2f85ba575b5a8619ac1ebfa21116654fbab6d5a4dfeb87a1bb8f0ba',1,'pbuf.h']]], + ['pbuf_5fraw_5ftx',['PBUF_RAW_TX',['../group__pbuf.html#ggaee1baa59bb2f85ba575b5a8619ac1ebfa0ff039585f05f9208bcb66c2d37783e2',1,'pbuf.h']]], + ['pbuf_5fref',['PBUF_REF',['../group__pbuf.html#ggab7e0e32fcc292c0d7107721766ed92fbac9b6ba960fdea6f2e8f35c8313b77e4e',1,'pbuf.h']]], + ['pbuf_5from',['PBUF_ROM',['../group__pbuf.html#ggab7e0e32fcc292c0d7107721766ed92fbac120b0fe39efe35bb682e4aa3b82e2c9',1,'pbuf.h']]], + ['pbuf_5ftransport',['PBUF_TRANSPORT',['../group__pbuf.html#ggaee1baa59bb2f85ba575b5a8619ac1ebfa2ded3594a3977f8bf9cf09552be327b5',1,'pbuf.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_0.html b/Libraries/LwIP/doc/doxygen/output/html/search/files_0.html new file mode 100644 index 0000000..4f272b8 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_0.js b/Libraries/LwIP/doc/doxygen/output/html/search/files_0.js new file mode 100644 index 0000000..8bafdeb --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_0.js @@ -0,0 +1,24 @@ +var searchData= +[ + ['altcp_2ec',['altcp.c',['../altcp_8c.html',1,'']]], + ['altcp_2eh',['altcp.h',['../altcp_8h.html',1,'']]], + ['altcp_5falloc_2ec',['altcp_alloc.c',['../altcp__alloc_8c.html',1,'']]], + ['altcp_5fpriv_2eh',['altcp_priv.h',['../altcp__priv_8h.html',1,'']]], + ['altcp_5fproxyconnect_2ec',['altcp_proxyconnect.c',['../altcp__proxyconnect_8c.html',1,'']]], + ['altcp_5fproxyconnect_2eh',['altcp_proxyconnect.h',['../altcp__proxyconnect_8h.html',1,'']]], + ['altcp_5ftcp_2ec',['altcp_tcp.c',['../altcp__tcp_8c.html',1,'']]], + ['altcp_5ftcp_2eh',['altcp_tcp.h',['../altcp__tcp_8h.html',1,'']]], + ['altcp_5ftls_2eh',['altcp_tls.h',['../altcp__tls_8h.html',1,'']]], + ['altcp_5ftls_5fmbedtls_2ec',['altcp_tls_mbedtls.c',['../altcp__tls__mbedtls_8c.html',1,'']]], + ['altcp_5ftls_5fmbedtls_5fmem_2ec',['altcp_tls_mbedtls_mem.c',['../altcp__tls__mbedtls__mem_8c.html',1,'']]], + ['altcp_5ftls_5fmbedtls_5fmem_2eh',['altcp_tls_mbedtls_mem.h',['../altcp__tls__mbedtls__mem_8h.html',1,'']]], + ['altcp_5ftls_5fmbedtls_5fopts_2eh',['altcp_tls_mbedtls_opts.h',['../altcp__tls__mbedtls__opts_8h.html',1,'']]], + ['altcp_5ftls_5fmbedtls_5fstructs_2eh',['altcp_tls_mbedtls_structs.h',['../altcp__tls__mbedtls__structs_8h.html',1,'']]], + ['api_2eh',['api.h',['../api_8h.html',1,'']]], + ['api_5flib_2ec',['api_lib.c',['../api__lib_8c.html',1,'']]], + ['api_5fmsg_2ec',['api_msg.c',['../api__msg_8c.html',1,'']]], + ['api_5fmsg_2eh',['api_msg.h',['../api__msg_8h.html',1,'']]], + ['arch_2eh',['arch.h',['../arch_8h.html',1,'']]], + ['autoip_2ec',['autoip.c',['../autoip_8c.html',1,'']]], + ['autoip_2eh',['autoip.h',['../autoip_8h.html',1,'(Global Namespace)'],['../prot_2autoip_8h.html',1,'(Global Namespace)']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_1.html b/Libraries/LwIP/doc/doxygen/output/html/search/files_1.html new file mode 100644 index 0000000..dcce422 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_1.js b/Libraries/LwIP/doc/doxygen/output/html/search/files_1.js new file mode 100644 index 0000000..00e7f12 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_1.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['bridgeif_2ec',['bridgeif.c',['../bridgeif_8c.html',1,'']]], + ['bridgeif_2eh',['bridgeif.h',['../bridgeif_8h.html',1,'']]], + ['bridgeif_5ffdb_2ec',['bridgeif_fdb.c',['../bridgeif__fdb_8c.html',1,'']]], + ['bridgeif_5fopts_2eh',['bridgeif_opts.h',['../bridgeif__opts_8h.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_2.html b/Libraries/LwIP/doc/doxygen/output/html/search/files_2.html new file mode 100644 index 0000000..d5c6c3b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_2.js b/Libraries/LwIP/doc/doxygen/output/html/search/files_2.js new file mode 100644 index 0000000..608188f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_2.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['debug_2eh',['debug.h',['../debug_8h.html',1,'']]], + ['def_2ec',['def.c',['../def_8c.html',1,'']]], + ['def_2eh',['def.h',['../def_8h.html',1,'']]], + ['dhcp_2ec',['dhcp.c',['../dhcp_8c.html',1,'']]], + ['dhcp_2eh',['dhcp.h',['../dhcp_8h.html',1,'(Global Namespace)'],['../prot_2dhcp_8h.html',1,'(Global Namespace)']]], + ['dhcp6_2ec',['dhcp6.c',['../dhcp6_8c.html',1,'']]], + ['dhcp6_2eh',['dhcp6.h',['../dhcp6_8h.html',1,'(Global Namespace)'],['../prot_2dhcp6_8h.html',1,'(Global Namespace)']]], + ['dns_2ec',['dns.c',['../dns_8c.html',1,'']]], + ['dns_2eh',['dns.h',['../dns_8h.html',1,'(Global Namespace)'],['../prot_2dns_8h.html',1,'(Global Namespace)']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_3.html b/Libraries/LwIP/doc/doxygen/output/html/search/files_3.html new file mode 100644 index 0000000..d5a9528 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_3.js b/Libraries/LwIP/doc/doxygen/output/html/search/files_3.js new file mode 100644 index 0000000..2a23659 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_3.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['err_2ec',['err.c',['../err_8c.html',1,'']]], + ['err_2eh',['err.h',['../err_8h.html',1,'']]], + ['errno_2eh',['errno.h',['../compat_2stdc_2errno_8h.html',1,'(Global Namespace)'],['../lwip_2errno_8h.html',1,'(Global Namespace)']]], + ['etharp_2ec',['etharp.c',['../etharp_8c.html',1,'']]], + ['etharp_2eh',['etharp.h',['../lwip_2etharp_8h.html',1,'(Global Namespace)'],['../lwip_2prot_2etharp_8h.html',1,'(Global Namespace)']]], + ['ethernet_2ec',['ethernet.c',['../ethernet_8c.html',1,'']]], + ['ethernet_2eh',['ethernet.h',['../lwip_2prot_2ethernet_8h.html',1,'(Global Namespace)'],['../netif_2ethernet_8h.html',1,'(Global Namespace)']]], + ['ethip6_2ec',['ethip6.c',['../ethip6_8c.html',1,'']]], + ['ethip6_2eh',['ethip6.h',['../ethip6_8h.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_4.html b/Libraries/LwIP/doc/doxygen/output/html/search/files_4.html new file mode 100644 index 0000000..7b4c42a --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_4.js b/Libraries/LwIP/doc/doxygen/output/html/search/files_4.js new file mode 100644 index 0000000..e9bef30 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_4.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['http_5fclient_2ec',['http_client.c',['../http__client_8c.html',1,'']]], + ['http_5fclient_2eh',['http_client.h',['../http__client_8h.html',1,'']]], + ['httpd_2ec',['httpd.c',['../httpd_8c.html',1,'']]], + ['httpd_2eh',['httpd.h',['../httpd_8h.html',1,'']]], + ['httpd_5fopts_2eh',['httpd_opts.h',['../httpd__opts_8h.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_5.html b/Libraries/LwIP/doc/doxygen/output/html/search/files_5.html new file mode 100644 index 0000000..1f77bb1 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_5.js b/Libraries/LwIP/doc/doxygen/output/html/search/files_5.js new file mode 100644 index 0000000..b9c9e1f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_5.js @@ -0,0 +1,37 @@ +var searchData= +[ + ['iana_2eh',['iana.h',['../iana_8h.html',1,'']]], + ['icmp_2ec',['icmp.c',['../icmp_8c.html',1,'']]], + ['icmp_2eh',['icmp.h',['../icmp_8h.html',1,'(Global Namespace)'],['../prot_2icmp_8h.html',1,'(Global Namespace)']]], + ['icmp6_2ec',['icmp6.c',['../icmp6_8c.html',1,'']]], + ['icmp6_2eh',['icmp6.h',['../icmp6_8h.html',1,'(Global Namespace)'],['../prot_2icmp6_8h.html',1,'(Global Namespace)']]], + ['ieee_2eh',['ieee.h',['../ieee_8h.html',1,'']]], + ['ieee802154_2eh',['ieee802154.h',['../ieee802154_8h.html',1,'']]], + ['if_2eh',['if.h',['../if_8h.html',1,'']]], + ['if_5fapi_2ec',['if_api.c',['../if__api_8c.html',1,'']]], + ['if_5fapi_2eh',['if_api.h',['../if__api_8h.html',1,'']]], + ['igmp_2ec',['igmp.c',['../igmp_8c.html',1,'']]], + ['igmp_2eh',['igmp.h',['../igmp_8h.html',1,'(Global Namespace)'],['../prot_2igmp_8h.html',1,'(Global Namespace)']]], + ['inet_2eh',['inet.h',['../compat_2posix_2arpa_2inet_8h.html',1,'(Global Namespace)'],['../lwip_2inet_8h.html',1,'(Global Namespace)']]], + ['inet6_2ec',['inet6.c',['../inet6_8c.html',1,'']]], + ['inet_5fchksum_2ec',['inet_chksum.c',['../inet__chksum_8c.html',1,'']]], + ['inet_5fchksum_2eh',['inet_chksum.h',['../inet__chksum_8h.html',1,'']]], + ['init_2ec',['init.c',['../init_8c.html',1,'']]], + ['init_2eh',['init.h',['../init_8h.html',1,'']]], + ['ip_2ec',['ip.c',['../ip_8c.html',1,'']]], + ['ip_2eh',['ip.h',['../ip_8h.html',1,'(Global Namespace)'],['../prot_2ip_8h.html',1,'(Global Namespace)']]], + ['ip4_2ec',['ip4.c',['../ip4_8c.html',1,'']]], + ['ip4_2eh',['ip4.h',['../ip4_8h.html',1,'(Global Namespace)'],['../prot_2ip4_8h.html',1,'(Global Namespace)']]], + ['ip4_5faddr_2ec',['ip4_addr.c',['../ip4__addr_8c.html',1,'']]], + ['ip4_5faddr_2eh',['ip4_addr.h',['../ip4__addr_8h.html',1,'']]], + ['ip4_5ffrag_2ec',['ip4_frag.c',['../ip4__frag_8c.html',1,'']]], + ['ip4_5ffrag_2eh',['ip4_frag.h',['../ip4__frag_8h.html',1,'']]], + ['ip6_2ec',['ip6.c',['../ip6_8c.html',1,'']]], + ['ip6_2eh',['ip6.h',['../ip6_8h.html',1,'(Global Namespace)'],['../prot_2ip6_8h.html',1,'(Global Namespace)']]], + ['ip6_5faddr_2ec',['ip6_addr.c',['../ip6__addr_8c.html',1,'']]], + ['ip6_5faddr_2eh',['ip6_addr.h',['../ip6__addr_8h.html',1,'']]], + ['ip6_5ffrag_2ec',['ip6_frag.c',['../ip6__frag_8c.html',1,'']]], + ['ip6_5ffrag_2eh',['ip6_frag.h',['../ip6__frag_8h.html',1,'']]], + ['ip6_5fzone_2eh',['ip6_zone.h',['../ip6__zone_8h.html',1,'']]], + ['ip_5faddr_2eh',['ip_addr.h',['../ip__addr_8h.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_6.html b/Libraries/LwIP/doc/doxygen/output/html/search/files_6.html new file mode 100644 index 0000000..7573254 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_6.js b/Libraries/LwIP/doc/doxygen/output/html/search/files_6.js new file mode 100644 index 0000000..ee950a5 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_6.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['lowpan6_2ec',['lowpan6.c',['../lowpan6_8c.html',1,'']]], + ['lowpan6_2eh',['lowpan6.h',['../lowpan6_8h.html',1,'']]], + ['lowpan6_5fble_2ec',['lowpan6_ble.c',['../lowpan6__ble_8c.html',1,'']]], + ['lowpan6_5fble_2eh',['lowpan6_ble.h',['../lowpan6__ble_8h.html',1,'']]], + ['lowpan6_5fcommon_2ec',['lowpan6_common.c',['../lowpan6__common_8c.html',1,'']]], + ['lowpan6_5fcommon_2eh',['lowpan6_common.h',['../lowpan6__common_8h.html',1,'']]], + ['lowpan6_5fopts_2eh',['lowpan6_opts.h',['../lowpan6__opts_8h.html',1,'']]], + ['lwiperf_2ec',['lwiperf.c',['../lwiperf_8c.html',1,'']]], + ['lwiperf_2eh',['lwiperf.h',['../lwiperf_8h.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_7.html b/Libraries/LwIP/doc/doxygen/output/html/search/files_7.html new file mode 100644 index 0000000..214b329 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_7.js b/Libraries/LwIP/doc/doxygen/output/html/search/files_7.js new file mode 100644 index 0000000..3c9a2c9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_7.js @@ -0,0 +1,20 @@ +var searchData= +[ + ['mdns_2ec',['mdns.c',['../mdns_8c.html',1,'']]], + ['mdns_2eh',['mdns.h',['../mdns_8h.html',1,'']]], + ['mdns_5fopts_2eh',['mdns_opts.h',['../mdns__opts_8h.html',1,'']]], + ['mdns_5fpriv_2eh',['mdns_priv.h',['../mdns__priv_8h.html',1,'']]], + ['mem_2ec',['mem.c',['../mem_8c.html',1,'']]], + ['mem_2eh',['mem.h',['../mem_8h.html',1,'']]], + ['mem_5fpriv_2eh',['mem_priv.h',['../mem__priv_8h.html',1,'']]], + ['memp_2ec',['memp.c',['../memp_8c.html',1,'']]], + ['memp_2eh',['memp.h',['../memp_8h.html',1,'']]], + ['memp_5fpriv_2eh',['memp_priv.h',['../memp__priv_8h.html',1,'']]], + ['memp_5fstd_2eh',['memp_std.h',['../memp__std_8h.html',1,'']]], + ['mld6_2ec',['mld6.c',['../mld6_8c.html',1,'']]], + ['mld6_2eh',['mld6.h',['../mld6_8h.html',1,'(Global Namespace)'],['../prot_2mld6_8h.html',1,'(Global Namespace)']]], + ['mqtt_2ec',['mqtt.c',['../mqtt_8c.html',1,'']]], + ['mqtt_2eh',['mqtt.h',['../mqtt_8h.html',1,'']]], + ['mqtt_5fopts_2eh',['mqtt_opts.h',['../mqtt__opts_8h.html',1,'']]], + ['mqtt_5fpriv_2eh',['mqtt_priv.h',['../mqtt__priv_8h.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_8.html b/Libraries/LwIP/doc/doxygen/output/html/search/files_8.html new file mode 100644 index 0000000..6720c7c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_8.js b/Libraries/LwIP/doc/doxygen/output/html/search/files_8.js new file mode 100644 index 0000000..d0751f1 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_8.js @@ -0,0 +1,17 @@ +var searchData= +[ + ['nd6_2ec',['nd6.c',['../nd6_8c.html',1,'']]], + ['nd6_2eh',['nd6.h',['../nd6_8h.html',1,'(Global Namespace)'],['../prot_2nd6_8h.html',1,'(Global Namespace)']]], + ['nd6_5fpriv_2eh',['nd6_priv.h',['../nd6__priv_8h.html',1,'']]], + ['netbiosns_2ec',['netbiosns.c',['../netbiosns_8c.html',1,'']]], + ['netbiosns_2eh',['netbiosns.h',['../netbiosns_8h.html',1,'']]], + ['netbiosns_5fopts_2eh',['netbiosns_opts.h',['../netbiosns__opts_8h.html',1,'']]], + ['netbuf_2ec',['netbuf.c',['../netbuf_8c.html',1,'']]], + ['netbuf_2eh',['netbuf.h',['../netbuf_8h.html',1,'']]], + ['netdb_2ec',['netdb.c',['../netdb_8c.html',1,'']]], + ['netdb_2eh',['netdb.h',['../compat_2posix_2netdb_8h.html',1,'(Global Namespace)'],['../lwip_2netdb_8h.html',1,'(Global Namespace)']]], + ['netif_2ec',['netif.c',['../netif_8c.html',1,'']]], + ['netif_2eh',['netif.h',['../netif_8h.html',1,'']]], + ['netifapi_2ec',['netifapi.c',['../netifapi_8c.html',1,'']]], + ['netifapi_2eh',['netifapi.h',['../netifapi_8h.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_9.html b/Libraries/LwIP/doc/doxygen/output/html/search/files_9.html new file mode 100644 index 0000000..fc95877 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_9.js b/Libraries/LwIP/doc/doxygen/output/html/search/files_9.js new file mode 100644 index 0000000..05d8df7 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_9.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['opt_2eh',['opt.h',['../opt_8h.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_a.html b/Libraries/LwIP/doc/doxygen/output/html/search/files_a.html new file mode 100644 index 0000000..ffe3e9d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_a.js b/Libraries/LwIP/doc/doxygen/output/html/search/files_a.js new file mode 100644 index 0000000..2a66df7 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_a.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['pbuf_2ec',['pbuf.c',['../pbuf_8c.html',1,'']]], + ['pbuf_2eh',['pbuf.h',['../pbuf_8h.html',1,'']]], + ['pppapi_2ec',['pppapi.c',['../pppapi_8c.html',1,'']]], + ['pppol2tp_2ec',['pppol2tp.c',['../pppol2tp_8c.html',1,'']]], + ['pppol2tp_2eh',['pppol2tp.h',['../pppol2tp_8h.html',1,'']]], + ['pppos_2ec',['pppos.c',['../pppos_8c.html',1,'']]], + ['pppos_2eh',['pppos.h',['../pppos_8h.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_b.html b/Libraries/LwIP/doc/doxygen/output/html/search/files_b.html new file mode 100644 index 0000000..32cd2be --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_b.js b/Libraries/LwIP/doc/doxygen/output/html/search/files_b.js new file mode 100644 index 0000000..eba968a --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_b.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['raw_2ec',['raw.c',['../raw_8c.html',1,'']]], + ['raw_2eh',['raw.h',['../raw_8h.html',1,'']]], + ['raw_5fpriv_2eh',['raw_priv.h',['../raw__priv_8h.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_c.html b/Libraries/LwIP/doc/doxygen/output/html/search/files_c.html new file mode 100644 index 0000000..bb83608 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_c.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_c.js b/Libraries/LwIP/doc/doxygen/output/html/search/files_c.js new file mode 100644 index 0000000..8b27e4c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_c.js @@ -0,0 +1,49 @@ +var searchData= +[ + ['slipif_2ec',['slipif.c',['../slipif_8c.html',1,'']]], + ['slipif_2eh',['slipif.h',['../slipif_8h.html',1,'']]], + ['smtp_2ec',['smtp.c',['../smtp_8c.html',1,'']]], + ['snmp_2eh',['snmp.h',['../apps_2snmp_8h.html',1,'(Global Namespace)'],['../snmp_8h.html',1,'(Global Namespace)']]], + ['snmp_5fasn1_2ec',['snmp_asn1.c',['../snmp__asn1_8c.html',1,'']]], + ['snmp_5fasn1_2eh',['snmp_asn1.h',['../snmp__asn1_8h.html',1,'']]], + ['snmp_5fcore_2ec',['snmp_core.c',['../snmp__core_8c.html',1,'']]], + ['snmp_5fcore_2eh',['snmp_core.h',['../snmp__core_8h.html',1,'']]], + ['snmp_5fmib2_2ec',['snmp_mib2.c',['../snmp__mib2_8c.html',1,'']]], + ['snmp_5fmib2_2eh',['snmp_mib2.h',['../snmp__mib2_8h.html',1,'']]], + ['snmp_5fmib2_5ficmp_2ec',['snmp_mib2_icmp.c',['../snmp__mib2__icmp_8c.html',1,'']]], + ['snmp_5fmib2_5finterfaces_2ec',['snmp_mib2_interfaces.c',['../snmp__mib2__interfaces_8c.html',1,'']]], + ['snmp_5fmib2_5fip_2ec',['snmp_mib2_ip.c',['../snmp__mib2__ip_8c.html',1,'']]], + ['snmp_5fmib2_5fsnmp_2ec',['snmp_mib2_snmp.c',['../snmp__mib2__snmp_8c.html',1,'']]], + ['snmp_5fmib2_5fsystem_2ec',['snmp_mib2_system.c',['../snmp__mib2__system_8c.html',1,'']]], + ['snmp_5fmib2_5ftcp_2ec',['snmp_mib2_tcp.c',['../snmp__mib2__tcp_8c.html',1,'']]], + ['snmp_5fmib2_5fudp_2ec',['snmp_mib2_udp.c',['../snmp__mib2__udp_8c.html',1,'']]], + ['snmp_5fmsg_2ec',['snmp_msg.c',['../snmp__msg_8c.html',1,'']]], + ['snmp_5fmsg_2eh',['snmp_msg.h',['../snmp__msg_8h.html',1,'']]], + ['snmp_5fnetconn_2ec',['snmp_netconn.c',['../snmp__netconn_8c.html',1,'']]], + ['snmp_5fopts_2eh',['snmp_opts.h',['../snmp__opts_8h.html',1,'']]], + ['snmp_5fpbuf_5fstream_2ec',['snmp_pbuf_stream.c',['../snmp__pbuf__stream_8c.html',1,'']]], + ['snmp_5fpbuf_5fstream_2eh',['snmp_pbuf_stream.h',['../snmp__pbuf__stream_8h.html',1,'']]], + ['snmp_5fraw_2ec',['snmp_raw.c',['../snmp__raw_8c.html',1,'']]], + ['snmp_5fscalar_2ec',['snmp_scalar.c',['../snmp__scalar_8c.html',1,'']]], + ['snmp_5fscalar_2eh',['snmp_scalar.h',['../snmp__scalar_8h.html',1,'']]], + ['snmp_5ftable_2ec',['snmp_table.c',['../snmp__table_8c.html',1,'']]], + ['snmp_5ftable_2eh',['snmp_table.h',['../snmp__table_8h.html',1,'']]], + ['snmp_5fthreadsync_2ec',['snmp_threadsync.c',['../snmp__threadsync_8c.html',1,'']]], + ['snmp_5fthreadsync_2eh',['snmp_threadsync.h',['../snmp__threadsync_8h.html',1,'']]], + ['snmp_5ftraps_2ec',['snmp_traps.c',['../snmp__traps_8c.html',1,'']]], + ['snmpv3_2ec',['snmpv3.c',['../snmpv3_8c.html',1,'']]], + ['snmpv3_2eh',['snmpv3.h',['../snmpv3_8h.html',1,'']]], + ['snmpv3_5fmbedtls_2ec',['snmpv3_mbedtls.c',['../snmpv3__mbedtls_8c.html',1,'']]], + ['snmpv3_5fpriv_2eh',['snmpv3_priv.h',['../snmpv3__priv_8h.html',1,'']]], + ['sntp_2ec',['sntp.c',['../sntp_8c.html',1,'']]], + ['sntp_2eh',['sntp.h',['../sntp_8h.html',1,'']]], + ['sntp_5fopts_2eh',['sntp_opts.h',['../sntp__opts_8h.html',1,'']]], + ['socket_2eh',['socket.h',['../socket_8h.html',1,'']]], + ['sockets_2ec',['sockets.c',['../sockets_8c.html',1,'']]], + ['sockets_2eh',['sockets.h',['../sockets_8h.html',1,'']]], + ['sockets_5fpriv_2eh',['sockets_priv.h',['../sockets__priv_8h.html',1,'']]], + ['stats_2ec',['stats.c',['../stats_8c.html',1,'']]], + ['stats_2eh',['stats.h',['../stats_8h.html',1,'']]], + ['sys_2ec',['sys.c',['../sys_8c.html',1,'']]], + ['sys_2eh',['sys.h',['../sys_8h.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_d.html b/Libraries/LwIP/doc/doxygen/output/html/search/files_d.html new file mode 100644 index 0000000..38bf2b3 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_d.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_d.js b/Libraries/LwIP/doc/doxygen/output/html/search/files_d.js new file mode 100644 index 0000000..a9d7bbe --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_d.js @@ -0,0 +1,17 @@ +var searchData= +[ + ['tcp_2ec',['tcp.c',['../tcp_8c.html',1,'']]], + ['tcp_2eh',['tcp.h',['../prot_2tcp_8h.html',1,'(Global Namespace)'],['../tcp_8h.html',1,'(Global Namespace)']]], + ['tcp_5fin_2ec',['tcp_in.c',['../tcp__in_8c.html',1,'']]], + ['tcp_5fout_2ec',['tcp_out.c',['../tcp__out_8c.html',1,'']]], + ['tcp_5fpriv_2eh',['tcp_priv.h',['../tcp__priv_8h.html',1,'']]], + ['tcpbase_2eh',['tcpbase.h',['../tcpbase_8h.html',1,'']]], + ['tcpip_2ec',['tcpip.c',['../tcpip_8c.html',1,'']]], + ['tcpip_2eh',['tcpip.h',['../tcpip_8h.html',1,'']]], + ['tcpip_5fpriv_2eh',['tcpip_priv.h',['../tcpip__priv_8h.html',1,'']]], + ['tftp_5fopts_2eh',['tftp_opts.h',['../tftp__opts_8h.html',1,'']]], + ['tftp_5fserver_2ec',['tftp_server.c',['../tftp__server_8c.html',1,'']]], + ['tftp_5fserver_2eh',['tftp_server.h',['../tftp__server_8h.html',1,'']]], + ['timeouts_2ec',['timeouts.c',['../timeouts_8c.html',1,'']]], + ['timeouts_2eh',['timeouts.h',['../timeouts_8h.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_e.html b/Libraries/LwIP/doc/doxygen/output/html/search/files_e.html new file mode 100644 index 0000000..6f84762 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_e.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_e.js b/Libraries/LwIP/doc/doxygen/output/html/search/files_e.js new file mode 100644 index 0000000..0919264 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_e.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['udp_2ec',['udp.c',['../udp_8c.html',1,'']]], + ['udp_2eh',['udp.h',['../prot_2udp_8h.html',1,'(Global Namespace)'],['../udp_8h.html',1,'(Global Namespace)']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_f.html b/Libraries/LwIP/doc/doxygen/output/html/search/files_f.html new file mode 100644 index 0000000..7568063 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_f.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/files_f.js b/Libraries/LwIP/doc/doxygen/output/html/search/files_f.js new file mode 100644 index 0000000..f0c60f6 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/files_f.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['zepif_2ec',['zepif.c',['../zepif_8c.html',1,'']]], + ['zepif_2eh',['zepif.h',['../zepif_8h.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_0.html b/Libraries/LwIP/doc/doxygen/output/html/search/functions_0.html new file mode 100644 index 0000000..4e6d87d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_0.js b/Libraries/LwIP/doc/doxygen/output/html/search/functions_0.js new file mode 100644 index 0000000..c87e453 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_0.js @@ -0,0 +1,47 @@ +var searchData= +[ + ['altcp_5fabort',['altcp_abort',['../group__altcp.html#ga7f6fab99fed448385a76b4a5100796ab',1,'altcp_abort(struct altcp_pcb *conn): altcp.c'],['../group__altcp.html#ga7f6fab99fed448385a76b4a5100796ab',1,'altcp_abort(struct altcp_pcb *conn): altcp.c']]], + ['altcp_5faccept',['altcp_accept',['../group__altcp.html#ga7c4cd0b1179a53b1a223936ba2270bf9',1,'altcp_accept(struct altcp_pcb *conn, altcp_accept_fn accept): altcp.c'],['../group__altcp.html#ga7c4cd0b1179a53b1a223936ba2270bf9',1,'altcp_accept(struct altcp_pcb *conn, altcp_accept_fn accept): altcp.c']]], + ['altcp_5falloc',['altcp_alloc',['../altcp_8c.html#a6a99f8757c18fbc9b9f30925afbcf4c2',1,'altcp_alloc(void): altcp.c'],['../altcp__priv_8h.html#a6a99f8757c18fbc9b9f30925afbcf4c2',1,'altcp_alloc(void): altcp.c']]], + ['altcp_5farg',['altcp_arg',['../group__altcp.html#ga197a33af038556a04d8f27c7033d771f',1,'altcp_arg(struct altcp_pcb *conn, void *arg): altcp.c'],['../group__altcp.html#ga197a33af038556a04d8f27c7033d771f',1,'altcp_arg(struct altcp_pcb *conn, void *arg): altcp.c']]], + ['altcp_5fbind',['altcp_bind',['../group__altcp.html#ga485b248680f73b9876d8674029c5157c',1,'altcp_bind(struct altcp_pcb *conn, const ip_addr_t *ipaddr, u16_t port): altcp.c'],['../group__altcp.html#ga485b248680f73b9876d8674029c5157c',1,'altcp_bind(struct altcp_pcb *conn, const ip_addr_t *ipaddr, u16_t port): altcp.c']]], + ['altcp_5fclose',['altcp_close',['../group__altcp.html#ga4329798afdf3709c789a2ee060ee3993',1,'altcp_close(struct altcp_pcb *conn): altcp.c'],['../group__altcp.html#ga4329798afdf3709c789a2ee060ee3993',1,'altcp_close(struct altcp_pcb *conn): altcp.c']]], + ['altcp_5fconnect',['altcp_connect',['../group__altcp.html#gafaf1d533e4e89dc249a3f931afa93492',1,'altcp_connect(struct altcp_pcb *conn, const ip_addr_t *ipaddr, u16_t port, altcp_connected_fn connected): altcp.c'],['../group__altcp.html#gafaf1d533e4e89dc249a3f931afa93492',1,'altcp_connect(struct altcp_pcb *conn, const ip_addr_t *ipaddr, u16_t port, altcp_connected_fn connected): altcp.c']]], + ['altcp_5ferr',['altcp_err',['../group__altcp.html#gadc76a1f3b2448559dc87da1b33291644',1,'altcp_err(struct altcp_pcb *conn, altcp_err_fn err): altcp.c'],['../group__altcp.html#gadc76a1f3b2448559dc87da1b33291644',1,'altcp_err(struct altcp_pcb *conn, altcp_err_fn err): altcp.c']]], + ['altcp_5ffree',['altcp_free',['../altcp_8c.html#afd7f6b6602e89cff51f8a8ea0315321d',1,'altcp_free(struct altcp_pcb *conn): altcp.c'],['../altcp__priv_8h.html#afd7f6b6602e89cff51f8a8ea0315321d',1,'altcp_free(struct altcp_pcb *conn): altcp.c']]], + ['altcp_5flisten_5fwith_5fbacklog_5fand_5ferr',['altcp_listen_with_backlog_and_err',['../group__altcp.html#gac69722b86b1198916f2527fb9f132c2b',1,'altcp_listen_with_backlog_and_err(struct altcp_pcb *conn, u8_t backlog, err_t *err): altcp.c'],['../group__altcp.html#gac69722b86b1198916f2527fb9f132c2b',1,'altcp_listen_with_backlog_and_err(struct altcp_pcb *conn, u8_t backlog, err_t *err): altcp.c']]], + ['altcp_5fmss',['altcp_mss',['../group__altcp.html#gae7cfc8bd8e45c517a706afd5857fda08',1,'altcp_mss(struct altcp_pcb *conn): altcp.c'],['../group__altcp.html#gae7cfc8bd8e45c517a706afd5857fda08',1,'altcp_mss(struct altcp_pcb *conn): altcp.c']]], + ['altcp_5fnew',['altcp_new',['../group__altcp.html#ga86843287b0ad0099c067817cfb7aa336',1,'altcp_new(altcp_allocator_t *allocator): altcp.c'],['../group__altcp.html#ga86843287b0ad0099c067817cfb7aa336',1,'altcp_new(altcp_allocator_t *allocator): altcp.c']]], + ['altcp_5fnew_5fip6',['altcp_new_ip6',['../group__altcp.html#gaa51a47bcb334b188c82a1b99db49f1f1',1,'altcp_new_ip6(altcp_allocator_t *allocator): altcp.c'],['../group__altcp.html#gaa51a47bcb334b188c82a1b99db49f1f1',1,'altcp_new_ip6(altcp_allocator_t *allocator): altcp.c']]], + ['altcp_5fnew_5fip_5ftype',['altcp_new_ip_type',['../group__altcp.html#gab631f6f92d7f6c58d9db27b7b415bc21',1,'altcp_new_ip_type(altcp_allocator_t *allocator, u8_t ip_type): altcp.c'],['../group__altcp.html#gab631f6f92d7f6c58d9db27b7b415bc21',1,'altcp_new_ip_type(altcp_allocator_t *allocator, u8_t ip_type): altcp.c']]], + ['altcp_5foutput',['altcp_output',['../group__altcp.html#ga5d2370d3b671377d7e2c98ce2dc3cfc6',1,'altcp_output(struct altcp_pcb *conn): altcp.c'],['../group__altcp.html#ga5d2370d3b671377d7e2c98ce2dc3cfc6',1,'altcp_output(struct altcp_pcb *conn): altcp.c']]], + ['altcp_5fpoll',['altcp_poll',['../group__altcp.html#ga269beeaf7d8264b6ff02333bcc7c7ab0',1,'altcp_poll(struct altcp_pcb *conn, altcp_poll_fn poll, u8_t interval): altcp.c'],['../group__altcp.html#ga269beeaf7d8264b6ff02333bcc7c7ab0',1,'altcp_poll(struct altcp_pcb *conn, altcp_poll_fn poll, u8_t interval): altcp.c']]], + ['altcp_5fproxyconnect_5falloc',['altcp_proxyconnect_alloc',['../altcp__proxyconnect_8c.html#a3d3af45390467ceeaa064b7e28dd43a9',1,'altcp_proxyconnect_alloc(void *arg, u8_t ip_type): altcp_proxyconnect.c'],['../altcp__proxyconnect_8h.html#a3d3af45390467ceeaa064b7e28dd43a9',1,'altcp_proxyconnect_alloc(void *arg, u8_t ip_type): altcp_proxyconnect.c']]], + ['altcp_5fproxyconnect_5fnew',['altcp_proxyconnect_new',['../altcp__proxyconnect_8c.html#ae774782064a92d0f58ce07b57a5360d1',1,'altcp_proxyconnect_new(struct altcp_proxyconnect_config *config, struct altcp_pcb *inner_pcb): altcp_proxyconnect.c'],['../altcp__proxyconnect_8h.html#ae774782064a92d0f58ce07b57a5360d1',1,'altcp_proxyconnect_new(struct altcp_proxyconnect_config *config, struct altcp_pcb *inner_pcb): altcp_proxyconnect.c']]], + ['altcp_5fproxyconnect_5fnew_5ftcp',['altcp_proxyconnect_new_tcp',['../altcp__proxyconnect_8c.html#a24e122d2bc2c0b9f86074c1e8d5ccfe4',1,'altcp_proxyconnect_new_tcp(struct altcp_proxyconnect_config *config, u8_t ip_type): altcp_proxyconnect.c'],['../altcp__proxyconnect_8h.html#a24e122d2bc2c0b9f86074c1e8d5ccfe4',1,'altcp_proxyconnect_new_tcp(struct altcp_proxyconnect_config *config, u8_t ip_type): altcp_proxyconnect.c']]], + ['altcp_5fproxyconnect_5ftls_5falloc',['altcp_proxyconnect_tls_alloc',['../altcp__proxyconnect_8c.html#a5ff49bcd035847a8915f18deef4172a9',1,'altcp_proxyconnect_tls_alloc(void *arg, u8_t ip_type): altcp_proxyconnect.c'],['../altcp__proxyconnect_8h.html#a5ff49bcd035847a8915f18deef4172a9',1,'altcp_proxyconnect_tls_alloc(void *arg, u8_t ip_type): altcp_proxyconnect.c']]], + ['altcp_5frecv',['altcp_recv',['../group__altcp.html#ga7f89221f9d65036d890b1e5bd9192a71',1,'altcp_recv(struct altcp_pcb *conn, altcp_recv_fn recv): altcp.c'],['../group__altcp.html#ga7f89221f9d65036d890b1e5bd9192a71',1,'altcp_recv(struct altcp_pcb *conn, altcp_recv_fn recv): altcp.c']]], + ['altcp_5frecved',['altcp_recved',['../group__altcp.html#gac086951cbfedaed0c36c5fb26b44ef83',1,'altcp_recved(struct altcp_pcb *conn, u16_t len): altcp.c'],['../group__altcp.html#gac086951cbfedaed0c36c5fb26b44ef83',1,'altcp_recved(struct altcp_pcb *conn, u16_t len): altcp.c']]], + ['altcp_5fsent',['altcp_sent',['../group__altcp.html#gab2b228c77c827fb14bfc513171c79f47',1,'altcp_sent(struct altcp_pcb *conn, altcp_sent_fn sent): altcp.c'],['../group__altcp.html#gab2b228c77c827fb14bfc513171c79f47',1,'altcp_sent(struct altcp_pcb *conn, altcp_sent_fn sent): altcp.c']]], + ['altcp_5fsetprio',['altcp_setprio',['../group__altcp.html#ga5040b0a4646bca718d3611ba7fa558c5',1,'altcp_setprio(struct altcp_pcb *conn, u8_t prio): altcp.c'],['../group__altcp.html#ga5040b0a4646bca718d3611ba7fa558c5',1,'altcp_setprio(struct altcp_pcb *conn, u8_t prio): altcp.c']]], + ['altcp_5fshutdown',['altcp_shutdown',['../group__altcp.html#ga0c3172d0bfe452599e242ea2e4692319',1,'altcp_shutdown(struct altcp_pcb *conn, int shut_rx, int shut_tx): altcp.c'],['../group__altcp.html#ga0c3172d0bfe452599e242ea2e4692319',1,'altcp_shutdown(struct altcp_pcb *conn, int shut_rx, int shut_tx): altcp.c']]], + ['altcp_5fsndbuf',['altcp_sndbuf',['../group__altcp.html#gab295cba0c1ded90fe044a8c37387a12c',1,'altcp_sndbuf(struct altcp_pcb *conn): altcp.c'],['../group__altcp.html#gab295cba0c1ded90fe044a8c37387a12c',1,'altcp_sndbuf(struct altcp_pcb *conn): altcp.c']]], + ['altcp_5fsndqueuelen',['altcp_sndqueuelen',['../group__altcp.html#ga516a1bfbf38fc47cfd47852715c505c5',1,'altcp_sndqueuelen(struct altcp_pcb *conn): altcp.c'],['../group__altcp.html#ga516a1bfbf38fc47cfd47852715c505c5',1,'altcp_sndqueuelen(struct altcp_pcb *conn): altcp.c']]], + ['altcp_5ftcp_5falloc',['altcp_tcp_alloc',['../altcp__tcp_8c.html#a211215e43cb40bd204a20c34316b7caa',1,'altcp_tcp_alloc(void *arg, u8_t ip_type): altcp_tcp.c'],['../altcp__tcp_8h.html#a211215e43cb40bd204a20c34316b7caa',1,'altcp_tcp_alloc(void *arg, u8_t ip_type): altcp_tcp.c']]], + ['altcp_5ftls_5falloc',['altcp_tls_alloc',['../group__altcp__tls.html#ga09e6ca8f144ee94ef21d7e5760aa4391',1,'altcp_tls_alloc(void *arg, u8_t ip_type): altcp_alloc.c'],['../group__altcp__tls.html#ga09e6ca8f144ee94ef21d7e5760aa4391',1,'altcp_tls_alloc(void *arg, u8_t ip_type): altcp_alloc.c']]], + ['altcp_5ftls_5fcontext',['altcp_tls_context',['../group__altcp__tls.html#gabc1741530d5089c3093889416430bc76',1,'altcp_tls.h']]], + ['altcp_5ftls_5fcreate_5fconfig_5fclient',['altcp_tls_create_config_client',['../group__altcp__tls.html#ga2b249447e10c8599b6d723d403086c35',1,'altcp_tls.h']]], + ['altcp_5ftls_5fcreate_5fconfig_5fclient_5f2wayauth',['altcp_tls_create_config_client_2wayauth',['../group__altcp__tls.html#ga7352a4600fee89e167541cf0776c01fb',1,'altcp_tls.h']]], + ['altcp_5ftls_5fcreate_5fconfig_5fserver_5fprivkey_5fcert',['altcp_tls_create_config_server_privkey_cert',['../group__altcp__tls.html#ga700dc0320e93cea337673e7d4295e161',1,'altcp_tls.h']]], + ['altcp_5ftls_5ffree_5fconfig',['altcp_tls_free_config',['../group__altcp__tls.html#ga8fb8a92fa3f84170050ddab2888b9145',1,'altcp_tls.h']]], + ['altcp_5ftls_5fnew',['altcp_tls_new',['../group__altcp__tls.html#ga028316a8257cf8dcace9cd063de79c0a',1,'altcp_tls_new(struct altcp_tls_config *config, u8_t ip_type): altcp_alloc.c'],['../group__altcp__tls.html#ga028316a8257cf8dcace9cd063de79c0a',1,'altcp_tls_new(struct altcp_tls_config *config, u8_t ip_type): altcp_alloc.c']]], + ['altcp_5ftls_5fwrap',['altcp_tls_wrap',['../group__altcp__tls.html#gab874adb7f87984c0520bd032c2108c47',1,'altcp_tls.h']]], + ['altcp_5fwrite',['altcp_write',['../group__altcp.html#gaad9a38396b127cfd778e253f20a97b8d',1,'altcp_write(struct altcp_pcb *conn, const void *dataptr, u16_t len, u8_t apiflags): altcp.c'],['../group__altcp.html#gaad9a38396b127cfd778e253f20a97b8d',1,'altcp_write(struct altcp_pcb *conn, const void *dataptr, u16_t len, u8_t apiflags): altcp.c']]], + ['autoip_5farp_5freply',['autoip_arp_reply',['../autoip_8c.html#acaf2793325c60dc4531c21a3fd55c16e',1,'autoip_arp_reply(struct netif *netif, struct etharp_hdr *hdr): autoip.c'],['../autoip_8h.html#acaf2793325c60dc4531c21a3fd55c16e',1,'autoip_arp_reply(struct netif *netif, struct etharp_hdr *hdr): autoip.c']]], + ['autoip_5fnetwork_5fchanged',['autoip_network_changed',['../autoip_8c.html#a11df7a20d52680cd8c1c18fba2b91e9e',1,'autoip_network_changed(struct netif *netif): autoip.c'],['../autoip_8h.html#a11df7a20d52680cd8c1c18fba2b91e9e',1,'autoip_network_changed(struct netif *netif): autoip.c']]], + ['autoip_5fset_5fstruct',['autoip_set_struct',['../group__autoip.html#ga2122c0b2518b371559fef5ec1d2aed90',1,'autoip_set_struct(struct netif *netif, struct autoip *autoip): autoip.c'],['../group__autoip.html#ga2122c0b2518b371559fef5ec1d2aed90',1,'autoip_set_struct(struct netif *netif, struct autoip *autoip): autoip.c']]], + ['autoip_5fstart',['autoip_start',['../group__autoip.html#ga1461f5826ebefc050e0d63013818d1e8',1,'autoip_start(struct netif *netif): autoip.c'],['../group__autoip.html#ga1461f5826ebefc050e0d63013818d1e8',1,'autoip_start(struct netif *netif): autoip.c']]], + ['autoip_5fstop',['autoip_stop',['../group__autoip.html#ga58a4dce658dd1263e84eb982f62587d4',1,'autoip_stop(struct netif *netif): autoip.c'],['../group__autoip.html#ga58a4dce658dd1263e84eb982f62587d4',1,'autoip_stop(struct netif *netif): autoip.c']]], + ['autoip_5fsupplied_5faddress',['autoip_supplied_address',['../autoip_8c.html#a1b4f0c53da17395d9de92a85708a1bb9',1,'autoip_supplied_address(const struct netif *netif): autoip.c'],['../autoip_8h.html#a1b4f0c53da17395d9de92a85708a1bb9',1,'autoip_supplied_address(const struct netif *netif): autoip.c']]], + ['autoip_5ftmr',['autoip_tmr',['../autoip_8c.html#a746fc1d7db1bf1617afae166c9d92c2d',1,'autoip_tmr(void): autoip.c'],['../autoip_8h.html#a746fc1d7db1bf1617afae166c9d92c2d',1,'autoip_tmr(void): autoip.c']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_1.html b/Libraries/LwIP/doc/doxygen/output/html/search/functions_1.html new file mode 100644 index 0000000..b343e2d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_1.js b/Libraries/LwIP/doc/doxygen/output/html/search/functions_1.js new file mode 100644 index 0000000..673c6a0 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_1.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['ble_5faddr_5fto_5feui64',['ble_addr_to_eui64',['../group__rfc7668if.html#gaa5b1823c2509b8816ef98dcac67e037c',1,'ble_addr_to_eui64(uint8_t *dst, const uint8_t *src, int public_addr): lowpan6_ble.c'],['../group__rfc7668if.html#gaa5b1823c2509b8816ef98dcac67e037c',1,'ble_addr_to_eui64(uint8_t *dst, const uint8_t *src, int public_addr): lowpan6_ble.c']]], + ['bridgeif_5fadd_5fport',['bridgeif_add_port',['../group__bridgeif.html#ga51b7d1af22f7023aabd8502aadf77c77',1,'bridgeif_add_port(struct netif *bridgeif, struct netif *portif): bridgeif.c'],['../group__bridgeif.html#ga51b7d1af22f7023aabd8502aadf77c77',1,'bridgeif_add_port(struct netif *bridgeif, struct netif *portif): bridgeif.c']]], + ['bridgeif_5ffdb_5fadd',['bridgeif_fdb_add',['../group__bridgeif.html#gad20fea2657431d4a0905be80cb0b4666',1,'bridgeif_fdb_add(struct netif *bridgeif, const struct eth_addr *addr, bridgeif_portmask_t ports): bridgeif.c'],['../group__bridgeif.html#gad20fea2657431d4a0905be80cb0b4666',1,'bridgeif_fdb_add(struct netif *bridgeif, const struct eth_addr *addr, bridgeif_portmask_t ports): bridgeif.c']]], + ['bridgeif_5ffdb_5fget_5fdst_5fports',['bridgeif_fdb_get_dst_ports',['../group__bridgeif__fdb.html#ga616fb7404be5da79d8092b4a14976750',1,'bridgeif_fdb_get_dst_ports(void *fdb_ptr, struct eth_addr *dst_addr): bridgeif_fdb.c'],['../group__bridgeif__fdb.html#ga616fb7404be5da79d8092b4a14976750',1,'bridgeif_fdb_get_dst_ports(void *fdb_ptr, struct eth_addr *dst_addr): bridgeif_fdb.c']]], + ['bridgeif_5ffdb_5finit',['bridgeif_fdb_init',['../group__bridgeif__fdb.html#gaf7935226ee7f99f964bf0135b6cb9ca0',1,'bridgeif_fdb_init(u16_t max_fdb_entries): bridgeif_fdb.c'],['../group__bridgeif__fdb.html#gaf7935226ee7f99f964bf0135b6cb9ca0',1,'bridgeif_fdb_init(u16_t max_fdb_entries): bridgeif_fdb.c']]], + ['bridgeif_5ffdb_5fremove',['bridgeif_fdb_remove',['../group__bridgeif.html#ga79349b1e9d0f944e8abad5a6cfb1c8e8',1,'bridgeif_fdb_remove(struct netif *bridgeif, const struct eth_addr *addr): bridgeif.c'],['../group__bridgeif.html#ga79349b1e9d0f944e8abad5a6cfb1c8e8',1,'bridgeif_fdb_remove(struct netif *bridgeif, const struct eth_addr *addr): bridgeif.c']]], + ['bridgeif_5ffdb_5fupdate_5fsrc',['bridgeif_fdb_update_src',['../group__bridgeif__fdb.html#gad912bfd3ce8e24d0eb48b7dc9de07c39',1,'bridgeif_fdb_update_src(void *fdb_ptr, struct eth_addr *src_addr, u8_t port_idx): bridgeif_fdb.c'],['../group__bridgeif__fdb.html#gad912bfd3ce8e24d0eb48b7dc9de07c39',1,'bridgeif_fdb_update_src(void *fdb_ptr, struct eth_addr *src_addr, u8_t port_idx): bridgeif_fdb.c']]], + ['bridgeif_5finit',['bridgeif_init',['../group__bridgeif.html#ga23cc2c5f8fccefc470093840cc53727c',1,'bridgeif_init(struct netif *netif): bridgeif.c'],['../group__bridgeif.html#ga23cc2c5f8fccefc470093840cc53727c',1,'bridgeif_init(struct netif *netif): bridgeif.c']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_2.html b/Libraries/LwIP/doc/doxygen/output/html/search/functions_2.html new file mode 100644 index 0000000..ecce2f3 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_2.js b/Libraries/LwIP/doc/doxygen/output/html/search/functions_2.js new file mode 100644 index 0000000..585d49d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_2.js @@ -0,0 +1,29 @@ +var searchData= +[ + ['dhcp6_5fcleanup',['dhcp6_cleanup',['../group__dhcp6.html#gacb7042000509fb21e8d2758e235d6dde',1,'dhcp6_cleanup(struct netif *netif): dhcp6.c'],['../group__dhcp6.html#gacb7042000509fb21e8d2758e235d6dde',1,'dhcp6_cleanup(struct netif *netif): dhcp6.c']]], + ['dhcp6_5fdisable',['dhcp6_disable',['../group__dhcp6.html#gadd0c783a85a410f75b37a3d922ad60d2',1,'dhcp6_disable(struct netif *netif): dhcp6.c'],['../group__dhcp6.html#gadd0c783a85a410f75b37a3d922ad60d2',1,'dhcp6_disable(struct netif *netif): dhcp6.c']]], + ['dhcp6_5fenable_5fstateful',['dhcp6_enable_stateful',['../group__dhcp6.html#gaa9e972fcd1d648ca5f02334b1591b619',1,'dhcp6_enable_stateful(struct netif *netif): dhcp6.c'],['../group__dhcp6.html#gaa9e972fcd1d648ca5f02334b1591b619',1,'dhcp6_enable_stateful(struct netif *netif): dhcp6.c']]], + ['dhcp6_5fenable_5fstateless',['dhcp6_enable_stateless',['../group__dhcp6.html#gaf3349463541e673fec33843eb019b18c',1,'dhcp6_enable_stateless(struct netif *netif): dhcp6.c'],['../group__dhcp6.html#gaf3349463541e673fec33843eb019b18c',1,'dhcp6_enable_stateless(struct netif *netif): dhcp6.c']]], + ['dhcp6_5fnd6_5fra_5ftrigger',['dhcp6_nd6_ra_trigger',['../dhcp6_8c.html#af0f47aac3c04c84a7143fa6925e9fdba',1,'dhcp6_nd6_ra_trigger(struct netif *netif, u8_t managed_addr_config, u8_t other_config): dhcp6.c'],['../dhcp6_8h.html#af0f47aac3c04c84a7143fa6925e9fdba',1,'dhcp6_nd6_ra_trigger(struct netif *netif, u8_t managed_addr_config, u8_t other_config): dhcp6.c']]], + ['dhcp6_5fset_5fstruct',['dhcp6_set_struct',['../group__dhcp6.html#ga5cdf4082c8a4ee6bf0cb874c0eaa8453',1,'dhcp6_set_struct(struct netif *netif, struct dhcp6 *dhcp6): dhcp6.c'],['../group__dhcp6.html#ga5cdf4082c8a4ee6bf0cb874c0eaa8453',1,'dhcp6_set_struct(struct netif *netif, struct dhcp6 *dhcp6): dhcp6.c']]], + ['dhcp6_5ftmr',['dhcp6_tmr',['../dhcp6_8c.html#a5289027cb2b166d08bc55b7ed2d4756d',1,'dhcp6_tmr(void): dhcp6.c'],['../dhcp6_8h.html#a5289027cb2b166d08bc55b7ed2d4756d',1,'dhcp6_tmr(void): dhcp6.c']]], + ['dhcp_5farp_5freply',['dhcp_arp_reply',['../dhcp_8c.html#a1fc0a94e0b94f13c5d302018f7ecb535',1,'dhcp_arp_reply(struct netif *netif, const ip4_addr_t *addr): dhcp.c'],['../dhcp_8h.html#a1fc0a94e0b94f13c5d302018f7ecb535',1,'dhcp_arp_reply(struct netif *netif, const ip4_addr_t *addr): dhcp.c']]], + ['dhcp_5fcleanup',['dhcp_cleanup',['../group__dhcp4.html#ga292a1b0c0c288ec508108a3fba473e64',1,'dhcp_cleanup(struct netif *netif): dhcp.c'],['../group__dhcp4.html#ga292a1b0c0c288ec508108a3fba473e64',1,'dhcp_cleanup(struct netif *netif): dhcp.c']]], + ['dhcp_5fcoarse_5ftmr',['dhcp_coarse_tmr',['../dhcp_8c.html#ad7480883d64f3d6f083c8aa933b5e3cb',1,'dhcp_coarse_tmr(void): dhcp.c'],['../dhcp_8h.html#ad7480883d64f3d6f083c8aa933b5e3cb',1,'dhcp_coarse_tmr(void): dhcp.c']]], + ['dhcp_5ffine_5ftmr',['dhcp_fine_tmr',['../dhcp_8c.html#a601d97faa24fa7289244bb452f052045',1,'dhcp_fine_tmr(void): dhcp.c'],['../dhcp_8h.html#a601d97faa24fa7289244bb452f052045',1,'dhcp_fine_tmr(void): dhcp.c']]], + ['dhcp_5finform',['dhcp_inform',['../group__dhcp4.html#gabd7fcc7e0799e313885fc7fd9d4992ad',1,'dhcp_inform(struct netif *netif): dhcp.c'],['../group__dhcp4.html#gabd7fcc7e0799e313885fc7fd9d4992ad',1,'dhcp_inform(struct netif *netif): dhcp.c']]], + ['dhcp_5fnetwork_5fchanged',['dhcp_network_changed',['../dhcp_8c.html#a04f3824720223c439165243527906002',1,'dhcp_network_changed(struct netif *netif): dhcp.c'],['../dhcp_8h.html#a04f3824720223c439165243527906002',1,'dhcp_network_changed(struct netif *netif): dhcp.c']]], + ['dhcp_5frelease',['dhcp_release',['../group__dhcp4.html#gaf92f7afb58252f82a749064602974bd4',1,'dhcp_release(struct netif *netif): dhcp.c'],['../group__dhcp4.html#gaf92f7afb58252f82a749064602974bd4',1,'dhcp_release(struct netif *netif): dhcp.c']]], + ['dhcp_5frelease_5fand_5fstop',['dhcp_release_and_stop',['../group__dhcp4.html#gaf7cd42b9f220446b6a597d3474da6ece',1,'dhcp_release_and_stop(struct netif *netif): dhcp.c'],['../group__dhcp4.html#gaf7cd42b9f220446b6a597d3474da6ece',1,'dhcp_release_and_stop(struct netif *netif): dhcp.c']]], + ['dhcp_5frenew',['dhcp_renew',['../group__dhcp4.html#ga583eb8d58f5e96b7dea717948578a947',1,'dhcp_renew(struct netif *netif): dhcp.c'],['../group__dhcp4.html#ga583eb8d58f5e96b7dea717948578a947',1,'dhcp_renew(struct netif *netif): dhcp.c']]], + ['dhcp_5fset_5fstruct',['dhcp_set_struct',['../group__dhcp4.html#ga43812097832716a462c660eb59cc1bf8',1,'dhcp_set_struct(struct netif *netif, struct dhcp *dhcp): dhcp.c'],['../group__dhcp4.html#ga43812097832716a462c660eb59cc1bf8',1,'dhcp_set_struct(struct netif *netif, struct dhcp *dhcp): dhcp.c']]], + ['dhcp_5fstart',['dhcp_start',['../group__dhcp4.html#ga0c50968d9811aa2aa67fadc0885d744f',1,'dhcp_start(struct netif *netif): dhcp.c'],['../group__dhcp4.html#ga0c50968d9811aa2aa67fadc0885d744f',1,'dhcp_start(struct netif *netif): dhcp.c']]], + ['dhcp_5fstop',['dhcp_stop',['../group__dhcp4.html#ga93f6bf21086dc9b10c0bec4676f97312',1,'dhcp_stop(struct netif *netif): dhcp.c'],['../group__dhcp4.html#ga93f6bf21086dc9b10c0bec4676f97312',1,'dhcp_stop(struct netif *netif): dhcp.c']]], + ['dhcp_5fsupplied_5faddress',['dhcp_supplied_address',['../dhcp_8c.html#ae24a2529372218327ab9cb6592041c85',1,'dhcp_supplied_address(const struct netif *netif): dhcp.c'],['../dhcp_8h.html#ae24a2529372218327ab9cb6592041c85',1,'dhcp_supplied_address(const struct netif *netif): dhcp.c']]], + ['dns_5fgethostbyname',['dns_gethostbyname',['../group__dns.html#ga1e040ec38166dc9bfcc3473aab0c799f',1,'dns_gethostbyname(const char *hostname, ip_addr_t *addr, dns_found_callback found, void *callback_arg): dns.c'],['../group__dns.html#ga1e040ec38166dc9bfcc3473aab0c799f',1,'dns_gethostbyname(const char *hostname, ip_addr_t *addr, dns_found_callback found, void *callback_arg): dns.c']]], + ['dns_5fgethostbyname_5faddrtype',['dns_gethostbyname_addrtype',['../group__dns.html#gae84449f60dca6b863142daca8e03ce79',1,'dns_gethostbyname_addrtype(const char *hostname, ip_addr_t *addr, dns_found_callback found, void *callback_arg, u8_t dns_addrtype): dns.c'],['../group__dns.html#gae84449f60dca6b863142daca8e03ce79',1,'dns_gethostbyname_addrtype(const char *hostname, ip_addr_t *addr, dns_found_callback found, void *callback_arg, u8_t dns_addrtype): dns.c']]], + ['dns_5fgetserver',['dns_getserver',['../group__dns.html#gad02111a6b26b93f1c3580d5f41a59af3',1,'dns_getserver(u8_t numdns): dns.c'],['../group__dns.html#gad02111a6b26b93f1c3580d5f41a59af3',1,'dns_getserver(u8_t numdns): dns.c']]], + ['dns_5finit',['dns_init',['../dns_8c.html#adb31c3b6180773bd11f914c327f209cf',1,'dns_init(void): dns.c'],['../dns_8h.html#adb31c3b6180773bd11f914c327f209cf',1,'dns_init(void): dns.c']]], + ['dns_5fsetserver',['dns_setserver',['../group__dns.html#gaf66c5d8273f83cdc2cdd8911fb68d584',1,'dns_setserver(u8_t numdns, const ip_addr_t *dnsserver): dns.c'],['../group__dns.html#gaf66c5d8273f83cdc2cdd8911fb68d584',1,'dns_setserver(u8_t numdns, const ip_addr_t *dnsserver): dns.c']]], + ['dns_5ftmr',['dns_tmr',['../dns_8c.html#a9389f374ec66488aa4f42a652583f533',1,'dns_tmr(void): dns.c'],['../dns_8h.html#a9389f374ec66488aa4f42a652583f533',1,'dns_tmr(void): dns.c']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_3.html b/Libraries/LwIP/doc/doxygen/output/html/search/functions_3.html new file mode 100644 index 0000000..15f06ab --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_3.js b/Libraries/LwIP/doc/doxygen/output/html/search/functions_3.js new file mode 100644 index 0000000..628c10e --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_3.js @@ -0,0 +1,15 @@ +var searchData= +[ + ['etharp_5fcleanup_5fnetif',['etharp_cleanup_netif',['../etharp_8c.html#ae94677a2a5f3698276027c7475f6ca05',1,'etharp_cleanup_netif(struct netif *netif): etharp.c'],['../lwip_2etharp_8h.html#ae94677a2a5f3698276027c7475f6ca05',1,'etharp_cleanup_netif(struct netif *netif): etharp.c']]], + ['etharp_5ffind_5faddr',['etharp_find_addr',['../etharp_8c.html#a0f8ca87c5472fa165763c8c38b76174c',1,'etharp_find_addr(struct netif *netif, const ip4_addr_t *ipaddr, struct eth_addr **eth_ret, const ip4_addr_t **ip_ret): etharp.c'],['../lwip_2etharp_8h.html#a0f8ca87c5472fa165763c8c38b76174c',1,'etharp_find_addr(struct netif *netif, const ip4_addr_t *ipaddr, struct eth_addr **eth_ret, const ip4_addr_t **ip_ret): etharp.c']]], + ['etharp_5fget_5fentry',['etharp_get_entry',['../etharp_8c.html#ab93df7ccb26496100d45137541e863c8',1,'etharp_get_entry(size_t i, ip4_addr_t **ipaddr, struct netif **netif, struct eth_addr **eth_ret): etharp.c'],['../lwip_2etharp_8h.html#ab93df7ccb26496100d45137541e863c8',1,'etharp_get_entry(size_t i, ip4_addr_t **ipaddr, struct netif **netif, struct eth_addr **eth_ret): etharp.c']]], + ['etharp_5finput',['etharp_input',['../etharp_8c.html#a540a5506979693ef9ac4496db9bfa7d6',1,'etharp_input(struct pbuf *p, struct netif *netif): etharp.c'],['../lwip_2etharp_8h.html#a540a5506979693ef9ac4496db9bfa7d6',1,'etharp_input(struct pbuf *p, struct netif *netif): etharp.c']]], + ['etharp_5foutput',['etharp_output',['../etharp_8c.html#a19258c75a3778b6ed0c82f63a419502d',1,'etharp_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr): etharp.c'],['../lwip_2etharp_8h.html#a19258c75a3778b6ed0c82f63a419502d',1,'etharp_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr): etharp.c']]], + ['etharp_5fquery',['etharp_query',['../etharp_8c.html#ae180772e31346a0afeb707ad172dd19c',1,'etharp_query(struct netif *netif, const ip4_addr_t *ipaddr, struct pbuf *q): etharp.c'],['../lwip_2etharp_8h.html#ae180772e31346a0afeb707ad172dd19c',1,'etharp_query(struct netif *netif, const ip4_addr_t *ipaddr, struct pbuf *q): etharp.c']]], + ['etharp_5frequest',['etharp_request',['../etharp_8c.html#a3e56faced96841e615f88dd57d1b2b15',1,'etharp_request(struct netif *netif, const ip4_addr_t *ipaddr): etharp.c'],['../lwip_2etharp_8h.html#a3e56faced96841e615f88dd57d1b2b15',1,'etharp_request(struct netif *netif, const ip4_addr_t *ipaddr): etharp.c']]], + ['etharp_5ftmr',['etharp_tmr',['../etharp_8c.html#a654f4dad71f7e2bc4820094648f37a26',1,'etharp_tmr(void): etharp.c'],['../lwip_2etharp_8h.html#a654f4dad71f7e2bc4820094648f37a26',1,'etharp_tmr(void): etharp.c']]], + ['ethernet_5finput',['ethernet_input',['../group__lwip__nosys.html#ga6a10c58b82c56d02c48b3cfa2c2494ff',1,'ethernet_input(struct pbuf *p, struct netif *netif): ethernet.c'],['../group__lwip__nosys.html#ga6a10c58b82c56d02c48b3cfa2c2494ff',1,'ethernet_input(struct pbuf *p, struct netif *netif): ethernet.c']]], + ['ethernet_5foutput',['ethernet_output',['../group__ethernet.html#gac9cad5802bfa3d885f13d2ba0f40b778',1,'ethernet_output(struct netif *netif, struct pbuf *p, const struct eth_addr *src, const struct eth_addr *dst, u16_t eth_type): ethernet.c'],['../group__ethernet.html#gac9cad5802bfa3d885f13d2ba0f40b778',1,'ethernet_output(struct netif *netif, struct pbuf *p, const struct eth_addr *src, const struct eth_addr *dst, u16_t eth_type): ethernet.c']]], + ['ethip6_5foutput',['ethip6_output',['../ethip6_8c.html#ab5326546d33174f91f1fb0cc6d398bfd',1,'ethip6_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr): ethip6.c'],['../ethip6_8h.html#ab5326546d33174f91f1fb0cc6d398bfd',1,'ethip6_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr): ethip6.c']]], + ['eui64_5fto_5fble_5faddr',['eui64_to_ble_addr',['../group__rfc7668if.html#ga3e245a85f9edddca93ddd2967209881d',1,'eui64_to_ble_addr(uint8_t *dst, const uint8_t *src): lowpan6_ble.c'],['../group__rfc7668if.html#ga3e245a85f9edddca93ddd2967209881d',1,'eui64_to_ble_addr(uint8_t *dst, const uint8_t *src): lowpan6_ble.c']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_4.html b/Libraries/LwIP/doc/doxygen/output/html/search/functions_4.html new file mode 100644 index 0000000..8985ff2 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_4.js b/Libraries/LwIP/doc/doxygen/output/html/search/functions_4.js new file mode 100644 index 0000000..b8857d7 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_4.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['http_5fset_5fcgi_5fhandlers',['http_set_cgi_handlers',['../group__httpd.html#gae1ec09532ff7fc622e1860727bf2c897',1,'http_set_cgi_handlers(const tCGI *cgis, int num_handlers): httpd.c'],['../group__httpd.html#gae1ec09532ff7fc622e1860727bf2c897',1,'http_set_cgi_handlers(const tCGI *pCGIs, int iNumHandlers): httpd.c']]], + ['http_5fset_5fssi_5fhandler',['http_set_ssi_handler',['../group__httpd.html#ga8834ecb16d9a7d6c128bdf9514b7879c',1,'http_set_ssi_handler(tSSIHandler ssi_handler, const char **tags, int num_tags): httpd.c'],['../group__httpd.html#ga8834ecb16d9a7d6c128bdf9514b7879c',1,'http_set_ssi_handler(tSSIHandler pfnSSIHandler, const char **ppcTags, int iNumTags): httpd.c']]], + ['httpc_5fget_5ffile',['httpc_get_file',['../group__httpc.html#ga6c961e52cec2d25b4b82b6910ebcfa1b',1,'httpc_get_file(const ip_addr_t *server_addr, u16_t port, const char *uri, const httpc_connection_t *settings, altcp_recv_fn recv_fn, void *callback_arg, httpc_state_t **connection): http_client.c'],['../group__httpc.html#ga6c961e52cec2d25b4b82b6910ebcfa1b',1,'httpc_get_file(const ip_addr_t *server_addr, u16_t port, const char *uri, const httpc_connection_t *settings, altcp_recv_fn recv_fn, void *callback_arg, httpc_state_t **connection): http_client.c']]], + ['httpc_5fget_5ffile_5fdns',['httpc_get_file_dns',['../group__httpc.html#gabd4ef2259885a93090733235cc0fa8d6',1,'httpc_get_file_dns(const char *server_name, u16_t port, const char *uri, const httpc_connection_t *settings, altcp_recv_fn recv_fn, void *callback_arg, httpc_state_t **connection): http_client.c'],['../group__httpc.html#gabd4ef2259885a93090733235cc0fa8d6',1,'httpc_get_file_dns(const char *server_name, u16_t port, const char *uri, const httpc_connection_t *settings, altcp_recv_fn recv_fn, void *callback_arg, httpc_state_t **connection): http_client.c']]], + ['httpd_5finit',['httpd_init',['../group__httpd.html#gac364305cee969a0be43c071722b136e6',1,'httpd_init(void): httpd.c'],['../group__httpd.html#gac364305cee969a0be43c071722b136e6',1,'httpd_init(void): httpd.c']]], + ['httpd_5finits',['httpd_inits',['../group__httpd.html#gafaedb1911a83854b1e9835132db64409',1,'httpd_inits(struct altcp_tls_config *conf): httpd.c'],['../group__httpd.html#gafaedb1911a83854b1e9835132db64409',1,'httpd_inits(struct altcp_tls_config *conf): httpd.c']]], + ['httpd_5fpost_5fbegin',['httpd_post_begin',['../group__httpd.html#ga6cb33693ee8f0c054be82a968ceff582',1,'httpd.h']]], + ['httpd_5fpost_5fdata_5frecved',['httpd_post_data_recved',['../group__httpd.html#gaca4357acf5c988b28123bc6f23540380',1,'httpd_post_data_recved(void *connection, u16_t recved_len): httpd.c'],['../group__httpd.html#gaca4357acf5c988b28123bc6f23540380',1,'httpd_post_data_recved(void *connection, u16_t recved_len): httpd.c']]], + ['httpd_5fpost_5ffinished',['httpd_post_finished',['../group__httpd.html#ga477473f7ead250fec71f1f8b9926fec5',1,'httpd.h']]], + ['httpd_5fpost_5freceive_5fdata',['httpd_post_receive_data',['../group__httpd.html#ga461409c8813c2a82ba63fde987c0e537',1,'httpd.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_5.html b/Libraries/LwIP/doc/doxygen/output/html/search/functions_5.html new file mode 100644 index 0000000..0314918 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_5.js b/Libraries/LwIP/doc/doxygen/output/html/search/functions_5.js new file mode 100644 index 0000000..14c2fb0 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_5.js @@ -0,0 +1,60 @@ +var searchData= +[ + ['icmp6_5fdest_5funreach',['icmp6_dest_unreach',['../icmp6_8c.html#ab480867394952904b5607d62315bdbac',1,'icmp6_dest_unreach(struct pbuf *p, enum icmp6_dur_code c): icmp6.c'],['../icmp6_8h.html#ab480867394952904b5607d62315bdbac',1,'icmp6_dest_unreach(struct pbuf *p, enum icmp6_dur_code c): icmp6.c']]], + ['icmp6_5finput',['icmp6_input',['../icmp6_8c.html#a94bec819e11f51c8088ca338f2e36c3d',1,'icmp6_input(struct pbuf *p, struct netif *inp): icmp6.c'],['../icmp6_8h.html#a94bec819e11f51c8088ca338f2e36c3d',1,'icmp6_input(struct pbuf *p, struct netif *inp): icmp6.c']]], + ['icmp6_5fpacket_5ftoo_5fbig',['icmp6_packet_too_big',['../icmp6_8c.html#a3c0a84e0944263d92c9dc3ad094ffcb0',1,'icmp6_packet_too_big(struct pbuf *p, u32_t mtu): icmp6.c'],['../icmp6_8h.html#a3c0a84e0944263d92c9dc3ad094ffcb0',1,'icmp6_packet_too_big(struct pbuf *p, u32_t mtu): icmp6.c']]], + ['icmp6_5fparam_5fproblem',['icmp6_param_problem',['../icmp6_8c.html#a6094fa333b2cbf1b1b062e72313ef146',1,'icmp6_param_problem(struct pbuf *p, enum icmp6_pp_code c, const void *pointer): icmp6.c'],['../icmp6_8h.html#a6094fa333b2cbf1b1b062e72313ef146',1,'icmp6_param_problem(struct pbuf *p, enum icmp6_pp_code c, const void *pointer): icmp6.c']]], + ['icmp6_5ftime_5fexceeded',['icmp6_time_exceeded',['../icmp6_8c.html#a358abb6555f6ca6b2b2b1412c9117bec',1,'icmp6_time_exceeded(struct pbuf *p, enum icmp6_te_code c): icmp6.c'],['../icmp6_8h.html#a358abb6555f6ca6b2b2b1412c9117bec',1,'icmp6_time_exceeded(struct pbuf *p, enum icmp6_te_code c): icmp6.c']]], + ['icmp6_5ftime_5fexceeded_5fwith_5faddrs',['icmp6_time_exceeded_with_addrs',['../icmp6_8c.html#ad01e5bc4690a2c6aeb534237a5a9b593',1,'icmp6_time_exceeded_with_addrs(struct pbuf *p, enum icmp6_te_code c, const ip6_addr_t *src_addr, const ip6_addr_t *dest_addr): icmp6.c'],['../icmp6_8h.html#ad01e5bc4690a2c6aeb534237a5a9b593',1,'icmp6_time_exceeded_with_addrs(struct pbuf *p, enum icmp6_te_code c, const ip6_addr_t *src_addr, const ip6_addr_t *dest_addr): icmp6.c']]], + ['icmp_5fdest_5funreach',['icmp_dest_unreach',['../icmp_8c.html#ae26c59eab4ce553964a0c9d43f534d06',1,'icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t): icmp.c'],['../icmp_8h.html#ae26c59eab4ce553964a0c9d43f534d06',1,'icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t): icmp.c']]], + ['icmp_5finput',['icmp_input',['../icmp_8c.html#ac929e48a1dddf98050b73a2633fcaef1',1,'icmp_input(struct pbuf *p, struct netif *inp): icmp.c'],['../icmp_8h.html#ac929e48a1dddf98050b73a2633fcaef1',1,'icmp_input(struct pbuf *p, struct netif *inp): icmp.c']]], + ['icmp_5ftime_5fexceeded',['icmp_time_exceeded',['../icmp_8c.html#a49723e5e11c4bbc86197e58fdca7c119',1,'icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t): icmp.c'],['../icmp_8h.html#a49723e5e11c4bbc86197e58fdca7c119',1,'icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t): icmp.c']]], + ['igmp_5finit',['igmp_init',['../igmp_8c.html#aeb8103aa3091e35c966f0894fb54a2c8',1,'igmp_init(void): igmp.c'],['../igmp_8h.html#aeb8103aa3091e35c966f0894fb54a2c8',1,'igmp_init(void): igmp.c']]], + ['igmp_5finput',['igmp_input',['../igmp_8c.html#a065685cc25f2cc50f0d9659f4b086e1a',1,'igmp_input(struct pbuf *p, struct netif *inp, const ip4_addr_t *dest): igmp.c'],['../igmp_8h.html#a065685cc25f2cc50f0d9659f4b086e1a',1,'igmp_input(struct pbuf *p, struct netif *inp, const ip4_addr_t *dest): igmp.c']]], + ['igmp_5fjoingroup',['igmp_joingroup',['../group__igmp.html#gac989949e9cf84dbd08ab071854bd1ba6',1,'igmp_joingroup(const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr): igmp.c'],['../group__igmp.html#gac989949e9cf84dbd08ab071854bd1ba6',1,'igmp_joingroup(const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr): igmp.c']]], + ['igmp_5fjoingroup_5fnetif',['igmp_joingroup_netif',['../group__igmp.html#ga7a6d36dd7b4c8a8c2790c0eac53b49d6',1,'igmp_joingroup_netif(struct netif *netif, const ip4_addr_t *groupaddr): igmp.c'],['../group__igmp.html#ga7a6d36dd7b4c8a8c2790c0eac53b49d6',1,'igmp_joingroup_netif(struct netif *netif, const ip4_addr_t *groupaddr): igmp.c']]], + ['igmp_5fleavegroup',['igmp_leavegroup',['../group__igmp.html#ga21c572ba7481ca41eb873923a5346544',1,'igmp_leavegroup(const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr): igmp.c'],['../group__igmp.html#ga21c572ba7481ca41eb873923a5346544',1,'igmp_leavegroup(const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr): igmp.c']]], + ['igmp_5fleavegroup_5fnetif',['igmp_leavegroup_netif',['../group__igmp.html#ga651bec2a5f3a24766c52aa86a5d88201',1,'igmp_leavegroup_netif(struct netif *netif, const ip4_addr_t *groupaddr): igmp.c'],['../group__igmp.html#ga651bec2a5f3a24766c52aa86a5d88201',1,'igmp_leavegroup_netif(struct netif *netif, const ip4_addr_t *groupaddr): igmp.c']]], + ['igmp_5flookfor_5fgroup',['igmp_lookfor_group',['../igmp_8c.html#a8228ddd10aa3f2518b16815d82d73448',1,'igmp_lookfor_group(struct netif *ifp, const ip4_addr_t *addr): igmp.c'],['../igmp_8h.html#a8228ddd10aa3f2518b16815d82d73448',1,'igmp_lookfor_group(struct netif *ifp, const ip4_addr_t *addr): igmp.c']]], + ['igmp_5freport_5fgroups',['igmp_report_groups',['../igmp_8c.html#af06eeba0e984aab4a67a836eab577726',1,'igmp_report_groups(struct netif *netif): igmp.c'],['../igmp_8h.html#af06eeba0e984aab4a67a836eab577726',1,'igmp_report_groups(struct netif *netif): igmp.c']]], + ['igmp_5fstart',['igmp_start',['../igmp_8c.html#aac0fe91a589ba90b3f76e69cebf264f6',1,'igmp_start(struct netif *netif): igmp.c'],['../igmp_8h.html#aac0fe91a589ba90b3f76e69cebf264f6',1,'igmp_start(struct netif *netif): igmp.c']]], + ['igmp_5fstop',['igmp_stop',['../igmp_8c.html#afc19bd532855a64c021be08172065f84',1,'igmp_stop(struct netif *netif): igmp.c'],['../igmp_8h.html#afc19bd532855a64c021be08172065f84',1,'igmp_stop(struct netif *netif): igmp.c']]], + ['igmp_5ftmr',['igmp_tmr',['../igmp_8c.html#a4418a22d37098f05d0c2fcfe288d0ca1',1,'igmp_tmr(void): igmp.c'],['../igmp_8h.html#a4418a22d37098f05d0c2fcfe288d0ca1',1,'igmp_tmr(void): igmp.c']]], + ['inet_5fchksum_5fpbuf',['inet_chksum_pbuf',['../inet__chksum_8c.html#ab35967a50418358e194e8f80fdc3c865',1,'inet_chksum_pbuf(struct pbuf *p): inet_chksum.c'],['../inet__chksum_8h.html#ab35967a50418358e194e8f80fdc3c865',1,'inet_chksum_pbuf(struct pbuf *p): inet_chksum.c']]], + ['ip4_5faddr_5fisbroadcast_5fu32',['ip4_addr_isbroadcast_u32',['../ip4__addr_8c.html#ab3cd7e7fba28c29d35f3c17461071421',1,'ip4_addr_isbroadcast_u32(u32_t addr, const struct netif *netif): ip4_addr.c'],['../ip4__addr_8h.html#ab3cd7e7fba28c29d35f3c17461071421',1,'ip4_addr_isbroadcast_u32(u32_t addr, const struct netif *netif): ip4_addr.c']]], + ['ip4_5faddr_5fnetmask_5fvalid',['ip4_addr_netmask_valid',['../ip4__addr_8c.html#ab5810d404b0ad1b89ef1323ea1e78071',1,'ip4_addr_netmask_valid(u32_t netmask): ip4_addr.c'],['../ip4__addr_8h.html#ab5810d404b0ad1b89ef1323ea1e78071',1,'ip4_addr_netmask_valid(u32_t netmask): ip4_addr.c']]], + ['ip4_5ffrag',['ip4_frag',['../ip4__frag_8c.html#a70872fd4c7aefec6b4eef0707e1a371c',1,'ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest): ip4_frag.c'],['../ip4__frag_8h.html#a70872fd4c7aefec6b4eef0707e1a371c',1,'ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest): ip4_frag.c']]], + ['ip4_5finput',['ip4_input',['../ip4_8c.html#aff1f784c9f05f3d79cc1a921d840501b',1,'ip4_input(struct pbuf *p, struct netif *inp): ip4.c'],['../ip4_8h.html#aff1f784c9f05f3d79cc1a921d840501b',1,'ip4_input(struct pbuf *p, struct netif *inp): ip4.c']]], + ['ip4_5foutput',['ip4_output',['../ip4_8c.html#ac87d296205eb5ac04058e609672d4ba8',1,'ip4_output(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto): ip4.c'],['../ip4_8h.html#ac87d296205eb5ac04058e609672d4ba8',1,'ip4_output(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto): ip4.c']]], + ['ip4_5foutput_5fif',['ip4_output_if',['../ip4_8c.html#ab220bc4ce4f48bdbba447358b3594917',1,'ip4_output_if(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif): ip4.c'],['../ip4_8h.html#ab220bc4ce4f48bdbba447358b3594917',1,'ip4_output_if(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif): ip4.c']]], + ['ip4_5foutput_5fif_5fopt',['ip4_output_if_opt',['../ip4_8c.html#a0d912e400875396792a12ea443ecc1cf',1,'ip4_output_if_opt(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif, void *ip_options, u16_t optlen): ip4.c'],['../ip4_8h.html#a0d912e400875396792a12ea443ecc1cf',1,'ip4_output_if_opt(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif, void *ip_options, u16_t optlen): ip4.c']]], + ['ip4_5foutput_5fif_5fopt_5fsrc',['ip4_output_if_opt_src',['../ip4_8c.html#accd56b095730de4ad56728bfcb349940',1,'ip4_output_if_opt_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif, void *ip_options, u16_t optlen): ip4.c'],['../ip4_8h.html#accd56b095730de4ad56728bfcb349940',1,'ip4_output_if_opt_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif, void *ip_options, u16_t optlen): ip4.c']]], + ['ip4_5foutput_5fif_5fsrc',['ip4_output_if_src',['../ip4_8c.html#a2943d118873e9eb1d8296e04a6740db7',1,'ip4_output_if_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif): ip4.c'],['../ip4_8h.html#a2943d118873e9eb1d8296e04a6740db7',1,'ip4_output_if_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif): ip4.c']]], + ['ip4_5freass',['ip4_reass',['../ip4__frag_8c.html#a7debaa6366c0db4270d4f03219c75c05',1,'ip4_reass(struct pbuf *p): ip4_frag.c'],['../ip4__frag_8h.html#a7debaa6366c0db4270d4f03219c75c05',1,'ip4_reass(struct pbuf *p): ip4_frag.c']]], + ['ip4_5froute',['ip4_route',['../ip4_8c.html#ac659f675356cfc1d4d13884946347e47',1,'ip4_route(const ip4_addr_t *dest): ip4.c'],['../ip4_8h.html#ac659f675356cfc1d4d13884946347e47',1,'ip4_route(const ip4_addr_t *dest): ip4.c']]], + ['ip4_5froute_5fsrc',['ip4_route_src',['../ip4_8c.html#ab615a9ca8fdd99e697f52506fc440fba',1,'ip4_route_src(const ip4_addr_t *src, const ip4_addr_t *dest): ip4.c'],['../ip4_8h.html#ab615a9ca8fdd99e697f52506fc440fba',1,'ip4_route_src(const ip4_addr_t *src, const ip4_addr_t *dest): ip4.c']]], + ['ip4_5fset_5fdefault_5fmulticast_5fnetif',['ip4_set_default_multicast_netif',['../group__ip4.html#ga6ae67c86aa82dccac5df81d93de00420',1,'ip4_set_default_multicast_netif(struct netif *default_multicast_netif): ip4.c'],['../group__ip4.html#ga6ae67c86aa82dccac5df81d93de00420',1,'ip4_set_default_multicast_netif(struct netif *default_multicast_netif): ip4.c']]], + ['ip4addr_5faton',['ip4addr_aton',['../ip4__addr_8c.html#af66de98501e92c66714d58119b6d9e1a',1,'ip4addr_aton(const char *cp, ip4_addr_t *addr): ip4_addr.c'],['../ip4__addr_8h.html#af66de98501e92c66714d58119b6d9e1a',1,'ip4addr_aton(const char *cp, ip4_addr_t *addr): ip4_addr.c']]], + ['ip4addr_5fntoa',['ip4addr_ntoa',['../ip4__addr_8c.html#a28620fdd443c5c98d15e5890cbd9059c',1,'ip4addr_ntoa(const ip4_addr_t *addr): ip4_addr.c'],['../ip4__addr_8h.html#a28620fdd443c5c98d15e5890cbd9059c',1,'ip4addr_ntoa(const ip4_addr_t *addr): ip4_addr.c']]], + ['ip4addr_5fntoa_5fr',['ip4addr_ntoa_r',['../ip4__addr_8c.html#a3825d5b4786c207af971ceb287f101fd',1,'ip4addr_ntoa_r(const ip4_addr_t *addr, char *buf, int buflen): ip4_addr.c'],['../ip4__addr_8h.html#a3825d5b4786c207af971ceb287f101fd',1,'ip4addr_ntoa_r(const ip4_addr_t *addr, char *buf, int buflen): ip4_addr.c']]], + ['ip6_5fchksum_5fpseudo',['ip6_chksum_pseudo',['../inet__chksum_8c.html#a102544bca5912c78649e25a45a7d0a88',1,'ip6_chksum_pseudo(struct pbuf *p, u8_t proto, u16_t proto_len, const ip6_addr_t *src, const ip6_addr_t *dest): inet_chksum.c'],['../inet__chksum_8h.html#a102544bca5912c78649e25a45a7d0a88',1,'ip6_chksum_pseudo(struct pbuf *p, u8_t proto, u16_t proto_len, const ip6_addr_t *src, const ip6_addr_t *dest): inet_chksum.c']]], + ['ip6_5fchksum_5fpseudo_5fpartial',['ip6_chksum_pseudo_partial',['../inet__chksum_8c.html#ae4218e08510fd92c9a699c4e5d9fc17b',1,'ip6_chksum_pseudo_partial(struct pbuf *p, u8_t proto, u16_t proto_len, u16_t chksum_len, const ip6_addr_t *src, const ip6_addr_t *dest): inet_chksum.c'],['../inet__chksum_8h.html#ae4218e08510fd92c9a699c4e5d9fc17b',1,'ip6_chksum_pseudo_partial(struct pbuf *p, u8_t proto, u16_t proto_len, u16_t chksum_len, const ip6_addr_t *src, const ip6_addr_t *dest): inet_chksum.c']]], + ['ip6_5ffrag',['ip6_frag',['../ip6__frag_8c.html#a3ef87acbc615d5eb015104f83bbe7d37',1,'ip6_frag(struct pbuf *p, struct netif *netif, const ip6_addr_t *dest): ip6_frag.c'],['../ip6__frag_8h.html#a3ef87acbc615d5eb015104f83bbe7d37',1,'ip6_frag(struct pbuf *p, struct netif *netif, const ip6_addr_t *dest): ip6_frag.c']]], + ['ip6_5finput',['ip6_input',['../ip6_8c.html#a6bbbae5ea37a82c746dba2feb1abd094',1,'ip6_input(struct pbuf *p, struct netif *inp): ip6.c'],['../ip6_8h.html#a6bbbae5ea37a82c746dba2feb1abd094',1,'ip6_input(struct pbuf *p, struct netif *inp): ip6.c']]], + ['ip6_5foptions_5fadd_5fhbh_5fra',['ip6_options_add_hbh_ra',['../ip6_8c.html#a7a8d47200bb6ccbec329be8f0979853e',1,'ip6_options_add_hbh_ra(struct pbuf *p, u8_t nexth, u8_t value): ip6.c'],['../ip6_8h.html#a7a8d47200bb6ccbec329be8f0979853e',1,'ip6_options_add_hbh_ra(struct pbuf *p, u8_t nexth, u8_t value): ip6.c']]], + ['ip6_5foutput',['ip6_output',['../ip6_8c.html#aec695e64536ac744e616c997deb84cda',1,'ip6_output(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, u8_t hl, u8_t tc, u8_t nexth): ip6.c'],['../ip6_8h.html#aec695e64536ac744e616c997deb84cda',1,'ip6_output(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, u8_t hl, u8_t tc, u8_t nexth): ip6.c']]], + ['ip6_5foutput_5fif',['ip6_output_if',['../ip6_8c.html#aeb1c9967e7ae7d7ba71b68256ff6fdb4',1,'ip6_output_if(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, u8_t hl, u8_t tc, u8_t nexth, struct netif *netif): ip6.c'],['../ip6_8h.html#aeb1c9967e7ae7d7ba71b68256ff6fdb4',1,'ip6_output_if(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, u8_t hl, u8_t tc, u8_t nexth, struct netif *netif): ip6.c']]], + ['ip6_5foutput_5fif_5fsrc',['ip6_output_if_src',['../ip6_8c.html#a58bd3c9ce332731fac82b89c77be4f56',1,'ip6_output_if_src(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, u8_t hl, u8_t tc, u8_t nexth, struct netif *netif): ip6.c'],['../ip6_8h.html#a58bd3c9ce332731fac82b89c77be4f56',1,'ip6_output_if_src(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, u8_t hl, u8_t tc, u8_t nexth, struct netif *netif): ip6.c']]], + ['ip6_5freass',['ip6_reass',['../ip6__frag_8c.html#adbd666d01adcbbbc5966938f02025b7c',1,'ip6_reass(struct pbuf *p): ip6_frag.c'],['../ip6__frag_8h.html#adbd666d01adcbbbc5966938f02025b7c',1,'ip6_reass(struct pbuf *p): ip6_frag.c']]], + ['ip6_5froute',['ip6_route',['../ip6_8c.html#a1153bd9e8c45847282105ab6379e6e70',1,'ip6_route(const ip6_addr_t *src, const ip6_addr_t *dest): ip6.c'],['../ip6_8h.html#a1153bd9e8c45847282105ab6379e6e70',1,'ip6_route(const ip6_addr_t *src, const ip6_addr_t *dest): ip6.c']]], + ['ip6_5fselect_5fsource_5faddress',['ip6_select_source_address',['../group__ip6.html#ga540ad82e2af4c4709f1852e63c36706a',1,'ip6_select_source_address(struct netif *netif, const ip6_addr_t *dest): ip6.c'],['../group__ip6.html#ga540ad82e2af4c4709f1852e63c36706a',1,'ip6_select_source_address(struct netif *netif, const ip6_addr_t *dest): ip6.c']]], + ['ip6addr_5faton',['ip6addr_aton',['../ip6__addr_8c.html#a3f555ae302eb056f28f6cb266a27036e',1,'ip6addr_aton(const char *cp, ip6_addr_t *addr): ip6_addr.c'],['../ip6__addr_8h.html#a3f555ae302eb056f28f6cb266a27036e',1,'ip6addr_aton(const char *cp, ip6_addr_t *addr): ip6_addr.c']]], + ['ip6addr_5fntoa',['ip6addr_ntoa',['../ip6__addr_8c.html#adba4443e6629583d48e1d1c7c21a977e',1,'ip6addr_ntoa(const ip6_addr_t *addr): ip6_addr.c'],['../ip6__addr_8h.html#adba4443e6629583d48e1d1c7c21a977e',1,'ip6addr_ntoa(const ip6_addr_t *addr): ip6_addr.c']]], + ['ip6addr_5fntoa_5fr',['ip6addr_ntoa_r',['../ip6__addr_8c.html#a64d442f35f34c43121bf91cfea2e77a2',1,'ip6addr_ntoa_r(const ip6_addr_t *addr, char *buf, int buflen): ip6_addr.c'],['../ip6__addr_8h.html#a64d442f35f34c43121bf91cfea2e77a2',1,'ip6addr_ntoa_r(const ip6_addr_t *addr, char *buf, int buflen): ip6_addr.c']]], + ['ip_5finput',['ip_input',['../group__lwip__nosys.html#ga3c420dab0c6760df099a2d688fa42a26',1,'ip_input(struct pbuf *p, struct netif *inp): ip.c'],['../group__lwip__nosys.html#ga3c420dab0c6760df099a2d688fa42a26',1,'ip_input(struct pbuf *p, struct netif *inp): ip.c']]], + ['ip_5freass_5ftmr',['ip_reass_tmr',['../ip4__frag_8c.html#abc7017eb20983f372e81de7376ebec88',1,'ip_reass_tmr(void): ip4_frag.c'],['../ip4__frag_8h.html#abc7017eb20983f372e81de7376ebec88',1,'ip_reass_tmr(void): ip4_frag.c']]], + ['ipaddr_5faddr',['ipaddr_addr',['../ip4__addr_8c.html#a2c05f9138da41115978409e547df9670',1,'ipaddr_addr(const char *cp): ip4_addr.c'],['../ip4__addr_8h.html#a2c05f9138da41115978409e547df9670',1,'ipaddr_addr(const char *cp): ip4_addr.c']]], + ['ipaddr_5faton',['ipaddr_aton',['../group__ipaddr.html#ga4de70fdd7fd36c5b6eaed8b855d5f151',1,'ipaddr_aton(const char *cp, ip_addr_t *addr): ip.c'],['../group__ipaddr.html#ga4de70fdd7fd36c5b6eaed8b855d5f151',1,'ipaddr_aton(const char *cp, ip_addr_t *addr): ip.c']]], + ['ipaddr_5fntoa',['ipaddr_ntoa',['../group__ipaddr.html#gace12d28aef35bb15962e8563aea571b1',1,'ipaddr_ntoa(const ip_addr_t *addr): ip.c'],['../group__ipaddr.html#gace12d28aef35bb15962e8563aea571b1',1,'ipaddr_ntoa(const ip_addr_t *addr): ip.c']]], + ['ipaddr_5fntoa_5fr',['ipaddr_ntoa_r',['../group__ipaddr.html#ga3684dabc0cae597ffb5b51d41f1d886f',1,'ipaddr_ntoa_r(const ip_addr_t *addr, char *buf, int buflen): ip.c'],['../group__ipaddr.html#ga3684dabc0cae597ffb5b51d41f1d886f',1,'ipaddr_ntoa_r(const ip_addr_t *addr, char *buf, int buflen): ip.c']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_6.html b/Libraries/LwIP/doc/doxygen/output/html/search/functions_6.html new file mode 100644 index 0000000..c506123 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_6.js b/Libraries/LwIP/doc/doxygen/output/html/search/functions_6.js new file mode 100644 index 0000000..e7fc6ca --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_6.js @@ -0,0 +1,49 @@ +var searchData= +[ + ['lowpan6_5fcalc_5fcrc',['lowpan6_calc_crc',['../lowpan6_8h.html#ab33dc87f30aeda871845854511de9931',1,'lowpan6_calc_crc(const void *buf, u16_t len): lowpan6.c'],['../lowpan6_8c.html#ab33dc87f30aeda871845854511de9931',1,'lowpan6_calc_crc(const void *buf, u16_t len): lowpan6.c']]], + ['lowpan6_5finput',['lowpan6_input',['../group__sixlowpan.html#ga3c943da6f9d3f1096bdcebe3e19d38b7',1,'lowpan6_input(struct pbuf *p, struct netif *netif): lowpan6.c'],['../group__sixlowpan.html#ga3c943da6f9d3f1096bdcebe3e19d38b7',1,'lowpan6_input(struct pbuf *p, struct netif *netif): lowpan6.c']]], + ['lowpan6_5foutput',['lowpan6_output',['../group__sixlowpan.html#ga9e650551777ededccf035ef9aaee247b',1,'lowpan6_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr): lowpan6.c'],['../group__sixlowpan.html#ga9e650551777ededccf035ef9aaee247b',1,'lowpan6_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr): lowpan6.c']]], + ['lowpan6_5fset_5fcontext',['lowpan6_set_context',['../group__sixlowpan.html#ga94c6d289bc25a14fd0fee9230ae3af94',1,'lowpan6_set_context(u8_t idx, const ip6_addr_t *context): lowpan6.c'],['../group__sixlowpan.html#ga94c6d289bc25a14fd0fee9230ae3af94',1,'lowpan6_set_context(u8_t idx, const ip6_addr_t *context): lowpan6.c']]], + ['lowpan6_5fset_5fpan_5fid',['lowpan6_set_pan_id',['../group__sixlowpan.html#gade00524e85d37a3521ea85359f801df3',1,'lowpan6_set_pan_id(u16_t pan_id): lowpan6.c'],['../group__sixlowpan.html#gade00524e85d37a3521ea85359f801df3',1,'lowpan6_set_pan_id(u16_t pan_id): lowpan6.c']]], + ['lowpan6_5fset_5fshort_5faddr',['lowpan6_set_short_addr',['../group__sixlowpan.html#gafee5495843dfb36cb77ba2f16ea6a625',1,'lowpan6_set_short_addr(u8_t addr_high, u8_t addr_low): lowpan6.c'],['../group__sixlowpan.html#gafee5495843dfb36cb77ba2f16ea6a625',1,'lowpan6_set_short_addr(u8_t addr_high, u8_t addr_low): lowpan6.c']]], + ['lowpan6_5ftmr',['lowpan6_tmr',['../lowpan6_8h.html#ac8c3a4612aeb23f65e55c18faf5ad7d7',1,'lowpan6_tmr(void): lowpan6.c'],['../lowpan6_8c.html#ac8c3a4612aeb23f65e55c18faf5ad7d7',1,'lowpan6_tmr(void): lowpan6.c']]], + ['lwip_5ffcntl',['lwip_fcntl',['../sockets_8c.html#ae84296093574ec746f8f88321356388f',1,'lwip_fcntl(int s, int cmd, int val): sockets.c'],['../sockets_8h.html#ae84296093574ec746f8f88321356388f',1,'lwip_fcntl(int s, int cmd, int val): sockets.c']]], + ['lwip_5ffreeaddrinfo',['lwip_freeaddrinfo',['../netdb_8c.html#a7f65ff5982a0743849a644ef2cd15ef5',1,'lwip_freeaddrinfo(struct addrinfo *ai): netdb.c'],['../lwip_2netdb_8h.html#a7f65ff5982a0743849a644ef2cd15ef5',1,'lwip_freeaddrinfo(struct addrinfo *ai): netdb.c']]], + ['lwip_5fgetaddrinfo',['lwip_getaddrinfo',['../netdb_8c.html#af356989c172a51187e22b557f22d4165',1,'lwip_getaddrinfo(const char *nodename, const char *servname, const struct addrinfo *hints, struct addrinfo **res): netdb.c'],['../lwip_2netdb_8h.html#af356989c172a51187e22b557f22d4165',1,'lwip_getaddrinfo(const char *nodename, const char *servname, const struct addrinfo *hints, struct addrinfo **res): netdb.c']]], + ['lwip_5fgethostbyname',['lwip_gethostbyname',['../netdb_8c.html#a8adc6d35c068a073369edde71c678cbc',1,'lwip_gethostbyname(const char *name): netdb.c'],['../lwip_2netdb_8h.html#a8adc6d35c068a073369edde71c678cbc',1,'lwip_gethostbyname(const char *name): netdb.c']]], + ['lwip_5fgethostbyname_5fr',['lwip_gethostbyname_r',['../netdb_8c.html#afa229e90916f6c8d6308828f45351d2d',1,'lwip_gethostbyname_r(const char *name, struct hostent *ret, char *buf, size_t buflen, struct hostent **result, int *h_errnop): netdb.c'],['../lwip_2netdb_8h.html#afa229e90916f6c8d6308828f45351d2d',1,'lwip_gethostbyname_r(const char *name, struct hostent *ret, char *buf, size_t buflen, struct hostent **result, int *h_errnop): netdb.c']]], + ['lwip_5fhtonl',['lwip_htonl',['../def_8c.html#a14f94347a5b9b9e3602705b75b7ae524',1,'lwip_htonl(u32_t n): def.c'],['../def_8h.html#a95e391e860b519b4f4f5c4979c9c9a37',1,'lwip_htonl(u32_t x): def.c']]], + ['lwip_5fhtons',['lwip_htons',['../def_8c.html#ad637280639de4066392e6b5614fa3e56',1,'lwip_htons(u16_t n): def.c'],['../def_8h.html#ac49eb25570806fb51c329d4f86302cc2',1,'lwip_htons(u16_t x): def.c']]], + ['lwip_5fif_5findextoname',['lwip_if_indextoname',['../group__if__api.html#gac68ad9ef70eb869525e0a1cc818f056b',1,'lwip_if_indextoname(unsigned int ifindex, char *ifname): if_api.c'],['../group__if__api.html#gac68ad9ef70eb869525e0a1cc818f056b',1,'lwip_if_indextoname(unsigned int ifindex, char *ifname): if_api.c']]], + ['lwip_5fif_5fnametoindex',['lwip_if_nametoindex',['../group__if__api.html#ga76d07962b9d19c3c6f578de780e2c3be',1,'lwip_if_nametoindex(const char *ifname): if_api.c'],['../group__if__api.html#ga76d07962b9d19c3c6f578de780e2c3be',1,'lwip_if_nametoindex(const char *ifname): if_api.c']]], + ['lwip_5finit',['lwip_init',['../group__lwip__nosys.html#ga0c1a18439524d2f4a5e51d25c0ca2ce9',1,'lwip_init(void): init.c'],['../group__lwip__nosys.html#ga0c1a18439524d2f4a5e51d25c0ca2ce9',1,'lwip_init(void): init.c']]], + ['lwip_5fitoa',['lwip_itoa',['../group__sys__nonstandard.html#gaf15b4fbaaae5bb7f6da4301f3f979284',1,'lwip_itoa(char *result, size_t bufsize, int number): def.c'],['../group__sys__nonstandard.html#gaf15b4fbaaae5bb7f6da4301f3f979284',1,'lwip_itoa(char *result, size_t bufsize, int number): def.c']]], + ['lwip_5flisten',['lwip_listen',['../sockets_8c.html#abee6ee286147cf334a1ba19f19b2e08b',1,'lwip_listen(int s, int backlog): sockets.c'],['../sockets_8h.html#abee6ee286147cf334a1ba19f19b2e08b',1,'lwip_listen(int s, int backlog): sockets.c']]], + ['lwip_5fnetconn_5fdo_5faccepted',['lwip_netconn_do_accepted',['../api__msg_8c.html#afc455a5f63fa3bc85022e34861a2fea5',1,'lwip_netconn_do_accepted(void *m): api_msg.c'],['../api__msg_8h.html#afc455a5f63fa3bc85022e34861a2fea5',1,'lwip_netconn_do_accepted(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5fbind',['lwip_netconn_do_bind',['../api__msg_8c.html#aa8e265922cda9f7fd54bf39e4ecf3768',1,'lwip_netconn_do_bind(void *m): api_msg.c'],['../api__msg_8h.html#aa8e265922cda9f7fd54bf39e4ecf3768',1,'lwip_netconn_do_bind(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5fbind_5fif',['lwip_netconn_do_bind_if',['../api__msg_8c.html#af4fed475f06818552ffefc8a1eda6605',1,'lwip_netconn_do_bind_if(void *m): api_msg.c'],['../api__msg_8h.html#af4fed475f06818552ffefc8a1eda6605',1,'lwip_netconn_do_bind_if(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5fclose',['lwip_netconn_do_close',['../api__msg_8c.html#aff73e0fcdc13c7cb97a4bfbd71a4347d',1,'lwip_netconn_do_close(void *m): api_msg.c'],['../api__msg_8h.html#aff73e0fcdc13c7cb97a4bfbd71a4347d',1,'lwip_netconn_do_close(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5fconnect',['lwip_netconn_do_connect',['../api__msg_8c.html#a6f18f57eeda7b0596110930e696f9902',1,'lwip_netconn_do_connect(void *m): api_msg.c'],['../api__msg_8h.html#a6f18f57eeda7b0596110930e696f9902',1,'lwip_netconn_do_connect(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5fdelconn',['lwip_netconn_do_delconn',['../api__msg_8c.html#a9e77da8492e93d570bc1ec37f3c91d59',1,'lwip_netconn_do_delconn(void *m): api_msg.c'],['../api__msg_8h.html#a9e77da8492e93d570bc1ec37f3c91d59',1,'lwip_netconn_do_delconn(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5fdisconnect',['lwip_netconn_do_disconnect',['../api__msg_8c.html#adec8a5ddbcbdacba099c630c8310d34a',1,'lwip_netconn_do_disconnect(void *m): api_msg.c'],['../api__msg_8h.html#adec8a5ddbcbdacba099c630c8310d34a',1,'lwip_netconn_do_disconnect(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5fgetaddr',['lwip_netconn_do_getaddr',['../api__msg_8c.html#af33f432db6e3f111d4ee5876089e4163',1,'lwip_netconn_do_getaddr(void *m): api_msg.c'],['../api__msg_8h.html#af33f432db6e3f111d4ee5876089e4163',1,'lwip_netconn_do_getaddr(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5fgethostbyname',['lwip_netconn_do_gethostbyname',['../api__msg_8c.html#afd3802b2f12e27928ccc0f759b887d61',1,'lwip_netconn_do_gethostbyname(void *arg): api_msg.c'],['../api__msg_8h.html#afd3802b2f12e27928ccc0f759b887d61',1,'lwip_netconn_do_gethostbyname(void *arg): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5fjoin_5fleave_5fgroup',['lwip_netconn_do_join_leave_group',['../api__msg_8c.html#a7402b52416828906a5679828cce37546',1,'lwip_netconn_do_join_leave_group(void *m): api_msg.c'],['../api__msg_8h.html#a7402b52416828906a5679828cce37546',1,'lwip_netconn_do_join_leave_group(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5fjoin_5fleave_5fgroup_5fnetif',['lwip_netconn_do_join_leave_group_netif',['../api__msg_8c.html#aacc47257c0a5aa5eb107da0cfc699722',1,'lwip_netconn_do_join_leave_group_netif(void *m): api_msg.c'],['../api__msg_8h.html#aacc47257c0a5aa5eb107da0cfc699722',1,'lwip_netconn_do_join_leave_group_netif(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5flisten',['lwip_netconn_do_listen',['../api__msg_8c.html#aa7d753d86818bfd77c1d73dab8dc943f',1,'lwip_netconn_do_listen(void *m): api_msg.c'],['../api__msg_8h.html#aa7d753d86818bfd77c1d73dab8dc943f',1,'lwip_netconn_do_listen(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5fnewconn',['lwip_netconn_do_newconn',['../api__msg_8c.html#abc6e1a4f8dd4640ab00eae4bbfdb7236',1,'lwip_netconn_do_newconn(void *m): api_msg.c'],['../api__msg_8h.html#abc6e1a4f8dd4640ab00eae4bbfdb7236',1,'lwip_netconn_do_newconn(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5frecv',['lwip_netconn_do_recv',['../api__msg_8c.html#ab6ae6036baf5c8fef22228ceb5e3ff9f',1,'lwip_netconn_do_recv(void *m): api_msg.c'],['../api__msg_8h.html#ab6ae6036baf5c8fef22228ceb5e3ff9f',1,'lwip_netconn_do_recv(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5fsend',['lwip_netconn_do_send',['../api__msg_8c.html#ac714bdd3d57e34f0a6517a469d80df6c',1,'lwip_netconn_do_send(void *m): api_msg.c'],['../api__msg_8h.html#ac714bdd3d57e34f0a6517a469d80df6c',1,'lwip_netconn_do_send(void *m): api_msg.c']]], + ['lwip_5fnetconn_5fdo_5fwrite',['lwip_netconn_do_write',['../api__msg_8c.html#aca4545a471ead1bc673ea93fe85f7e5c',1,'lwip_netconn_do_write(void *m): api_msg.c'],['../api__msg_8h.html#aca4545a471ead1bc673ea93fe85f7e5c',1,'lwip_netconn_do_write(void *m): api_msg.c']]], + ['lwip_5fshutdown',['lwip_shutdown',['../sockets_8c.html#ade85c68b6673296c8fb67127b93fa4c1',1,'lwip_shutdown(int s, int how): sockets.c'],['../sockets_8h.html#ade85c68b6673296c8fb67127b93fa4c1',1,'lwip_shutdown(int s, int how): sockets.c']]], + ['lwip_5fsocket_5fthread_5fcleanup',['lwip_socket_thread_cleanup',['../sockets_8c.html#ab8cd92b10dbe3fb33da03faed1ea98a7',1,'lwip_socket_thread_cleanup(void): sockets.c'],['../sockets_8h.html#ab8cd92b10dbe3fb33da03faed1ea98a7',1,'lwip_socket_thread_cleanup(void): sockets.c']]], + ['lwip_5fsocket_5fthread_5finit',['lwip_socket_thread_init',['../sockets_8c.html#a0a250b3b4d1827e3a3661327f5e80ae0',1,'lwip_socket_thread_init(void): sockets.c'],['../sockets_8h.html#a0a250b3b4d1827e3a3661327f5e80ae0',1,'lwip_socket_thread_init(void): sockets.c']]], + ['lwip_5fstricmp',['lwip_stricmp',['../group__sys__nonstandard.html#ga263cbafcb697eff964139a9998a6668a',1,'lwip_stricmp(const char *str1, const char *str2): def.c'],['../group__sys__nonstandard.html#ga263cbafcb697eff964139a9998a6668a',1,'lwip_stricmp(const char *str1, const char *str2): def.c']]], + ['lwip_5fstrnicmp',['lwip_strnicmp',['../group__sys__nonstandard.html#ga997dcc49451121d4ed755b33bc7bd26a',1,'lwip_strnicmp(const char *str1, const char *str2, size_t len): def.c'],['../group__sys__nonstandard.html#ga997dcc49451121d4ed755b33bc7bd26a',1,'lwip_strnicmp(const char *str1, const char *str2, size_t len): def.c']]], + ['lwip_5fstrnstr',['lwip_strnstr',['../group__sys__nonstandard.html#gaeece028198cdaea2f0d2f1d691752c02',1,'lwip_strnstr(const char *buffer, const char *token, size_t n): def.c'],['../group__sys__nonstandard.html#gaeece028198cdaea2f0d2f1d691752c02',1,'lwip_strnstr(const char *buffer, const char *token, size_t n): def.c']]], + ['lwiperf_5fabort',['lwiperf_abort',['../group__iperf.html#gac51c9c44a38bfa1140bd44b793a0a004',1,'lwiperf_abort(void *lwiperf_session): lwiperf.c'],['../group__iperf.html#gac51c9c44a38bfa1140bd44b793a0a004',1,'lwiperf_abort(void *lwiperf_session): lwiperf.c']]], + ['lwiperf_5fstart_5ftcp_5fclient',['lwiperf_start_tcp_client',['../group__iperf.html#gad8317f52289d8bb12a14627cd177a565',1,'lwiperf_start_tcp_client(const ip_addr_t *remote_addr, u16_t remote_port, enum lwiperf_client_type type, lwiperf_report_fn report_fn, void *report_arg): lwiperf.c'],['../group__iperf.html#gad8317f52289d8bb12a14627cd177a565',1,'lwiperf_start_tcp_client(const ip_addr_t *remote_addr, u16_t remote_port, enum lwiperf_client_type type, lwiperf_report_fn report_fn, void *report_arg): lwiperf.c']]], + ['lwiperf_5fstart_5ftcp_5fclient_5fdefault',['lwiperf_start_tcp_client_default',['../group__iperf.html#ga85a487cf8ecbd0999382c9bff375d0da',1,'lwiperf_start_tcp_client_default(const ip_addr_t *remote_addr, lwiperf_report_fn report_fn, void *report_arg): lwiperf.c'],['../group__iperf.html#ga85a487cf8ecbd0999382c9bff375d0da',1,'lwiperf_start_tcp_client_default(const ip_addr_t *remote_addr, lwiperf_report_fn report_fn, void *report_arg): lwiperf.c']]], + ['lwiperf_5fstart_5ftcp_5fserver',['lwiperf_start_tcp_server',['../group__iperf.html#gad97bf77057e7f96d6d8def812deea202',1,'lwiperf_start_tcp_server(const ip_addr_t *local_addr, u16_t local_port, lwiperf_report_fn report_fn, void *report_arg): lwiperf.c'],['../group__iperf.html#gad97bf77057e7f96d6d8def812deea202',1,'lwiperf_start_tcp_server(const ip_addr_t *local_addr, u16_t local_port, lwiperf_report_fn report_fn, void *report_arg): lwiperf.c']]], + ['lwiperf_5fstart_5ftcp_5fserver_5fdefault',['lwiperf_start_tcp_server_default',['../group__iperf.html#gae1f30a02b86c4dd3d47810cd493baf26',1,'lwiperf_start_tcp_server_default(lwiperf_report_fn report_fn, void *report_arg): lwiperf.c'],['../group__iperf.html#gae1f30a02b86c4dd3d47810cd493baf26',1,'lwiperf_start_tcp_server_default(lwiperf_report_fn report_fn, void *report_arg): lwiperf.c']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_7.html b/Libraries/LwIP/doc/doxygen/output/html/search/functions_7.html new file mode 100644 index 0000000..83a7b84 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_7.js b/Libraries/LwIP/doc/doxygen/output/html/search/functions_7.js new file mode 100644 index 0000000..80cf5fc --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_7.js @@ -0,0 +1,47 @@ +var searchData= +[ + ['mdns_5fcompress_5fdomain',['mdns_compress_domain',['../mdns_8c.html#ab72e48cf076afd1e3a08030d1d0bff9e',1,'mdns_compress_domain(struct pbuf *pbuf, u16_t *offset, struct mdns_domain *domain): mdns.c'],['../mdns__priv_8h.html#ab72e48cf076afd1e3a08030d1d0bff9e',1,'mdns_compress_domain(struct pbuf *pbuf, u16_t *offset, struct mdns_domain *domain): mdns.c']]], + ['mdns_5fdomain_5fadd_5flabel',['mdns_domain_add_label',['../mdns_8c.html#a17db69fa887515374452b945e959bbf9',1,'mdns_domain_add_label(struct mdns_domain *domain, const char *label, u8_t len): mdns.c'],['../mdns__priv_8h.html#a17db69fa887515374452b945e959bbf9',1,'mdns_domain_add_label(struct mdns_domain *domain, const char *label, u8_t len): mdns.c']]], + ['mdns_5fdomain_5feq',['mdns_domain_eq',['../mdns_8c.html#a52d8f70432ae998814f16b18431213cd',1,'mdns_domain_eq(struct mdns_domain *a, struct mdns_domain *b): mdns.c'],['../mdns__priv_8h.html#a52d8f70432ae998814f16b18431213cd',1,'mdns_domain_eq(struct mdns_domain *a, struct mdns_domain *b): mdns.c']]], + ['mdns_5freadname',['mdns_readname',['../mdns_8c.html#ab5f49d9356a76879e0e6a14eb0643b23',1,'mdns_readname(struct pbuf *p, u16_t offset, struct mdns_domain *domain): mdns.c'],['../mdns__priv_8h.html#ab5f49d9356a76879e0e6a14eb0643b23',1,'mdns_readname(struct pbuf *p, u16_t offset, struct mdns_domain *domain): mdns.c']]], + ['mdns_5fresp_5fadd_5fnetif',['mdns_resp_add_netif',['../group__mdns.html#gaa619ac8f46a4b4021195720f0355cbeb',1,'mdns_resp_add_netif(struct netif *netif, const char *hostname, u32_t dns_ttl): mdns.c'],['../group__mdns.html#gaa619ac8f46a4b4021195720f0355cbeb',1,'mdns_resp_add_netif(struct netif *netif, const char *hostname, u32_t dns_ttl): mdns.c']]], + ['mdns_5fresp_5fadd_5fservice',['mdns_resp_add_service',['../group__mdns.html#ga824e992e94be216c8e059f48f49a59ce',1,'mdns_resp_add_service(struct netif *netif, const char *name, const char *service, enum mdns_sd_proto proto, u16_t port, u32_t dns_ttl, service_get_txt_fn_t txt_fn, void *txt_data): mdns.c'],['../group__mdns.html#ga824e992e94be216c8e059f48f49a59ce',1,'mdns_resp_add_service(struct netif *netif, const char *name, const char *service, enum mdns_sd_proto proto, u16_t port, u32_t dns_ttl, service_get_txt_fn_t txt_fn, void *txt_userdata): mdns.c']]], + ['mdns_5fresp_5fadd_5fservice_5ftxtitem',['mdns_resp_add_service_txtitem',['../group__mdns.html#ga01c85202f4b85edc8b571f2f419db576',1,'mdns_resp_add_service_txtitem(struct mdns_service *service, const char *txt, u8_t txt_len): mdns.c'],['../group__mdns.html#ga01c85202f4b85edc8b571f2f419db576',1,'mdns_resp_add_service_txtitem(struct mdns_service *service, const char *txt, u8_t txt_len): mdns.c']]], + ['mdns_5fresp_5fannounce',['mdns_resp_announce',['../group__mdns.html#ga0f462fb91a9d0323bb4636bd725f0e85',1,'mdns_resp_announce(struct netif *netif): mdns.c'],['../group__mdns.html#ga0f462fb91a9d0323bb4636bd725f0e85',1,'mdns_resp_announce(struct netif *netif): mdns.c']]], + ['mdns_5fresp_5fdel_5fservice',['mdns_resp_del_service',['../group__mdns.html#ga3df2ae751cdfdffb0a567390940eb8ad',1,'mdns_resp_del_service(struct netif *netif, s8_t slot): mdns.c'],['../group__mdns.html#ga3df2ae751cdfdffb0a567390940eb8ad',1,'mdns_resp_del_service(struct netif *netif, s8_t slot): mdns.c']]], + ['mdns_5fresp_5finit',['mdns_resp_init',['../group__mdns.html#ga5fa15978a398dae1a8d7620ae169bdd3',1,'mdns_resp_init(void): mdns.c'],['../group__mdns.html#ga5fa15978a398dae1a8d7620ae169bdd3',1,'mdns_resp_init(void): mdns.c']]], + ['mdns_5fresp_5fregister_5fname_5fresult_5fcb',['mdns_resp_register_name_result_cb',['../mdns_8c.html#a01f8850b9c2d2cd40ed77a1438c85bf1',1,'mdns_resp_register_name_result_cb(mdns_name_result_cb_t cb): mdns.c'],['../mdns_8h.html#a01f8850b9c2d2cd40ed77a1438c85bf1',1,'mdns_resp_register_name_result_cb(mdns_name_result_cb_t cb): mdns.c']]], + ['mdns_5fresp_5fremove_5fnetif',['mdns_resp_remove_netif',['../group__mdns.html#gaa8144e3c77a92c4043e6214ff6b6010c',1,'mdns_resp_remove_netif(struct netif *netif): mdns.c'],['../group__mdns.html#gaa8144e3c77a92c4043e6214ff6b6010c',1,'mdns_resp_remove_netif(struct netif *netif): mdns.c']]], + ['mdns_5fresp_5frename_5fnetif',['mdns_resp_rename_netif',['../group__mdns.html#ga7b1473e595eb0c185bab293f3ec2e50e',1,'mdns_resp_rename_netif(struct netif *netif, const char *hostname): mdns.c'],['../group__mdns.html#ga7b1473e595eb0c185bab293f3ec2e50e',1,'mdns_resp_rename_netif(struct netif *netif, const char *hostname): mdns.c']]], + ['mdns_5fresp_5frename_5fservice',['mdns_resp_rename_service',['../group__mdns.html#gaf273897059f1bbddc74cfcb820777dd9',1,'mdns_resp_rename_service(struct netif *netif, s8_t slot, const char *name): mdns.c'],['../group__mdns.html#gaf273897059f1bbddc74cfcb820777dd9',1,'mdns_resp_rename_service(struct netif *netif, s8_t slot, const char *name): mdns.c']]], + ['mdns_5fresp_5frestart',['mdns_resp_restart',['../group__mdns.html#ga93eccdc0d9afff0f24160d31c70e2c9a',1,'mdns_resp_restart(struct netif *netif): mdns.c'],['../group__mdns.html#ga93eccdc0d9afff0f24160d31c70e2c9a',1,'mdns_resp_restart(struct netif *netif): mdns.c']]], + ['mem_5fcalloc',['mem_calloc',['../mem_8c.html#ab0bdc525971701883f2065e7fb257a24',1,'mem_calloc(mem_size_t count, mem_size_t size): mem.c'],['../mem_8h.html#ab0bdc525971701883f2065e7fb257a24',1,'mem_calloc(mem_size_t count, mem_size_t size): mem.c']]], + ['mem_5ffree',['mem_free',['../mem_8c.html#a65169147c44e9db60d997819af9b455c',1,'mem_free(void *rmem): mem.c'],['../mem_8h.html#a2fd7aa1adf6e394d3be7c7734e7df41a',1,'mem_free(void *mem): mem.c']]], + ['mem_5ffree_5fcallback',['mem_free_callback',['../tcpip_8c.html#a55b4de3765c6a37b3f2b26a11603771c',1,'mem_free_callback(void *m): tcpip.c'],['../tcpip_8h.html#a55b4de3765c6a37b3f2b26a11603771c',1,'mem_free_callback(void *m): tcpip.c']]], + ['mem_5finit',['mem_init',['../mem_8c.html#a44a136e3b70c36abb6f8dc060c778113',1,'mem_init(void): mem.c'],['../mem_8h.html#a44a136e3b70c36abb6f8dc060c778113',1,'mem_init(void): mem.c']]], + ['mem_5fmalloc',['mem_malloc',['../mem_8c.html#af418ade27d91d41e6143dba2cc246b0f',1,'mem_malloc(mem_size_t size_in): mem.c'],['../mem_8h.html#a932aa40d85b14cb7331625e012d12335',1,'mem_malloc(mem_size_t size): mem.c']]], + ['mem_5ftrim',['mem_trim',['../mem_8c.html#a7e6b7f11bb50bead9b35515d9a517124',1,'mem_trim(void *rmem, mem_size_t new_size): mem.c'],['../mem_8h.html#a5e39a108c44d8a72df0b30a117cb62e4',1,'mem_trim(void *mem, mem_size_t size): mem.c']]], + ['memp_5ffree',['memp_free',['../memp_8c.html#aecd94926b7c2a0e23ae195f4ae97581f',1,'memp_free(memp_t type, void *mem): memp.c'],['../memp_8h.html#aecd94926b7c2a0e23ae195f4ae97581f',1,'memp_free(memp_t type, void *mem): memp.c']]], + ['memp_5ffree_5fpool',['memp_free_pool',['../memp_8c.html#a62f8c3c907743e34eee3cdac7fa1eaa5',1,'memp_free_pool(const struct memp_desc *desc, void *mem): memp.c'],['../memp__priv_8h.html#a62f8c3c907743e34eee3cdac7fa1eaa5',1,'memp_free_pool(const struct memp_desc *desc, void *mem): memp.c']]], + ['memp_5finit',['memp_init',['../memp_8c.html#a9693e5b1ac2c6b9c0e7870522d45efa2',1,'memp_init(void): memp.c'],['../memp_8h.html#a9693e5b1ac2c6b9c0e7870522d45efa2',1,'memp_init(void): memp.c']]], + ['memp_5finit_5fpool',['memp_init_pool',['../memp_8c.html#a6416303426d05526bed33f241fa6ecd7',1,'memp_init_pool(const struct memp_desc *desc): memp.c'],['../memp__priv_8h.html#a6416303426d05526bed33f241fa6ecd7',1,'memp_init_pool(const struct memp_desc *desc): memp.c']]], + ['memp_5fmalloc',['memp_malloc',['../memp_8c.html#a2b00593d086313c267b54a976bf67aa5',1,'memp_malloc(memp_t type): memp.c'],['../memp_8h.html#a2b00593d086313c267b54a976bf67aa5',1,'memp_malloc(memp_t type): memp.c']]], + ['memp_5fmalloc_5fpool',['memp_malloc_pool',['../memp_8c.html#a348c83ee972f1edf7296a1cdf1d75f22',1,'memp_malloc_pool(const struct memp_desc *desc): memp.c'],['../memp__priv_8h.html#a348c83ee972f1edf7296a1cdf1d75f22',1,'memp_malloc_pool(const struct memp_desc *desc): memp.c']]], + ['mld6_5finput',['mld6_input',['../mld6_8c.html#a7c190ca25432d466b28f607c3574a841',1,'mld6_input(struct pbuf *p, struct netif *inp): mld6.c'],['../mld6_8h.html#a7c190ca25432d466b28f607c3574a841',1,'mld6_input(struct pbuf *p, struct netif *inp): mld6.c']]], + ['mld6_5fjoingroup',['mld6_joingroup',['../group__mld6.html#ga53560ab6e47163e4888070830bf912a8',1,'mld6_joingroup(const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr): mld6.c'],['../group__mld6.html#ga53560ab6e47163e4888070830bf912a8',1,'mld6_joingroup(const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr): mld6.c']]], + ['mld6_5fjoingroup_5fnetif',['mld6_joingroup_netif',['../group__mld6.html#ga2ba41d575a56d27c0af0a08fb8724940',1,'mld6_joingroup_netif(struct netif *netif, const ip6_addr_t *groupaddr): mld6.c'],['../group__mld6.html#ga2ba41d575a56d27c0af0a08fb8724940',1,'mld6_joingroup_netif(struct netif *netif, const ip6_addr_t *groupaddr): mld6.c']]], + ['mld6_5fleavegroup',['mld6_leavegroup',['../group__mld6.html#ga946b830efc6fd795b07a0964dc7940e5',1,'mld6_leavegroup(const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr): mld6.c'],['../group__mld6.html#ga946b830efc6fd795b07a0964dc7940e5',1,'mld6_leavegroup(const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr): mld6.c']]], + ['mld6_5fleavegroup_5fnetif',['mld6_leavegroup_netif',['../group__mld6.html#gab664062a15a3ae3e05282eacf4dc0a22',1,'mld6_leavegroup_netif(struct netif *netif, const ip6_addr_t *groupaddr): mld6.c'],['../group__mld6.html#gab664062a15a3ae3e05282eacf4dc0a22',1,'mld6_leavegroup_netif(struct netif *netif, const ip6_addr_t *groupaddr): mld6.c']]], + ['mld6_5flookfor_5fgroup',['mld6_lookfor_group',['../mld6_8c.html#ad2fbba6bc543dbf994961656d7431eb5',1,'mld6_lookfor_group(struct netif *ifp, const ip6_addr_t *addr): mld6.c'],['../mld6_8h.html#ad2fbba6bc543dbf994961656d7431eb5',1,'mld6_lookfor_group(struct netif *ifp, const ip6_addr_t *addr): mld6.c']]], + ['mld6_5freport_5fgroups',['mld6_report_groups',['../mld6_8c.html#a2a08b95a7b3c82da05df1a3b50629686',1,'mld6_report_groups(struct netif *netif): mld6.c'],['../mld6_8h.html#a2a08b95a7b3c82da05df1a3b50629686',1,'mld6_report_groups(struct netif *netif): mld6.c']]], + ['mld6_5fstop',['mld6_stop',['../mld6_8c.html#ab7197d123f21a8863b56cc3871fd5198',1,'mld6_stop(struct netif *netif): mld6.c'],['../mld6_8h.html#ab7197d123f21a8863b56cc3871fd5198',1,'mld6_stop(struct netif *netif): mld6.c']]], + ['mld6_5ftmr',['mld6_tmr',['../mld6_8c.html#a4ddb496d0a6a466df5665dbed8bd6274',1,'mld6_tmr(void): mld6.c'],['../mld6_8h.html#a4ddb496d0a6a466df5665dbed8bd6274',1,'mld6_tmr(void): mld6.c']]], + ['mqtt_5fclient_5fconnect',['mqtt_client_connect',['../group__mqtt.html#gadf4d2a3f1b12fb6cbc020b126f3125f0',1,'mqtt_client_connect(mqtt_client_t *client, const ip_addr_t *ip_addr, u16_t port, mqtt_connection_cb_t cb, void *arg, const struct mqtt_connect_client_info_t *client_info): mqtt.c'],['../group__mqtt.html#gadf4d2a3f1b12fb6cbc020b126f3125f0',1,'mqtt_client_connect(mqtt_client_t *client, const ip_addr_t *ipaddr, u16_t port, mqtt_connection_cb_t cb, void *arg, const struct mqtt_connect_client_info_t *client_info): mqtt.c']]], + ['mqtt_5fclient_5ffree',['mqtt_client_free',['../group__mqtt.html#gaa0fa1d985c322a9c91a51322db254882',1,'mqtt_client_free(mqtt_client_t *client): mqtt.c'],['../group__mqtt.html#gaa0fa1d985c322a9c91a51322db254882',1,'mqtt_client_free(mqtt_client_t *client): mqtt.c']]], + ['mqtt_5fclient_5fis_5fconnected',['mqtt_client_is_connected',['../group__mqtt.html#ga98f0fd168112b8b7db59bcd7a325a5c5',1,'mqtt_client_is_connected(mqtt_client_t *client): mqtt.c'],['../group__mqtt.html#ga98f0fd168112b8b7db59bcd7a325a5c5',1,'mqtt_client_is_connected(mqtt_client_t *client): mqtt.c']]], + ['mqtt_5fclient_5fnew',['mqtt_client_new',['../group__mqtt.html#gae7e19e236eb6122c8c39e93db6f5f53f',1,'mqtt_client_new(void): mqtt.c'],['../group__mqtt.html#gae7e19e236eb6122c8c39e93db6f5f53f',1,'mqtt_client_new(void): mqtt.c']]], + ['mqtt_5fdisconnect',['mqtt_disconnect',['../group__mqtt.html#ga73d8dd718bce09bfaab452770b4f76e6',1,'mqtt_disconnect(mqtt_client_t *client): mqtt.c'],['../group__mqtt.html#ga73d8dd718bce09bfaab452770b4f76e6',1,'mqtt_disconnect(mqtt_client_t *client): mqtt.c']]], + ['mqtt_5fpublish',['mqtt_publish',['../group__mqtt.html#gade9850d716e81fde572cb012be795d2f',1,'mqtt_publish(mqtt_client_t *client, const char *topic, const void *payload, u16_t payload_length, u8_t qos, u8_t retain, mqtt_request_cb_t cb, void *arg): mqtt.c'],['../group__mqtt.html#gade9850d716e81fde572cb012be795d2f',1,'mqtt_publish(mqtt_client_t *client, const char *topic, const void *payload, u16_t payload_length, u8_t qos, u8_t retain, mqtt_request_cb_t cb, void *arg): mqtt.c']]], + ['mqtt_5fset_5finpub_5fcallback',['mqtt_set_inpub_callback',['../group__mqtt.html#gafdfa0e65b217e92835d35858924565cf',1,'mqtt_set_inpub_callback(mqtt_client_t *client, mqtt_incoming_publish_cb_t pub_cb, mqtt_incoming_data_cb_t data_cb, void *arg): mqtt.c'],['../group__mqtt.html#gafdfa0e65b217e92835d35858924565cf',1,'mqtt_set_inpub_callback(mqtt_client_t *client, mqtt_incoming_publish_cb_t, mqtt_incoming_data_cb_t data_cb, void *arg): mqtt.c']]], + ['mqtt_5fsub_5funsub',['mqtt_sub_unsub',['../group__mqtt.html#gafdb39d4a9758f98c02451aaa9a9b3103',1,'mqtt_sub_unsub(mqtt_client_t *client, const char *topic, u8_t qos, mqtt_request_cb_t cb, void *arg, u8_t sub): mqtt.c'],['../group__mqtt.html#gafdb39d4a9758f98c02451aaa9a9b3103',1,'mqtt_sub_unsub(mqtt_client_t *client, const char *topic, u8_t qos, mqtt_request_cb_t cb, void *arg, u8_t sub): mqtt.c']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_8.html b/Libraries/LwIP/doc/doxygen/output/html/search/functions_8.html new file mode 100644 index 0000000..b55f0e6 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_8.js b/Libraries/LwIP/doc/doxygen/output/html/search/functions_8.js new file mode 100644 index 0000000..b2af023 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_8.js @@ -0,0 +1,90 @@ +var searchData= +[ + ['nd6_5fadjust_5fmld_5fmembership',['nd6_adjust_mld_membership',['../nd6_8c.html#a27224542b8ffab81c2ed9f47752bb51e',1,'nd6_adjust_mld_membership(struct netif *netif, s8_t addr_idx, u8_t new_state): nd6.c'],['../nd6_8h.html#a27224542b8ffab81c2ed9f47752bb51e',1,'nd6_adjust_mld_membership(struct netif *netif, s8_t addr_idx, u8_t new_state): nd6.c']]], + ['nd6_5fcleanup_5fnetif',['nd6_cleanup_netif',['../nd6_8c.html#a84f9f52cab7ae37b4dd343536156dc73',1,'nd6_cleanup_netif(struct netif *netif): nd6.c'],['../nd6_8h.html#a84f9f52cab7ae37b4dd343536156dc73',1,'nd6_cleanup_netif(struct netif *netif): nd6.c']]], + ['nd6_5fclear_5fdestination_5fcache',['nd6_clear_destination_cache',['../nd6_8c.html#a64d7956cf2b0d45025b02661f3f62377',1,'nd6_clear_destination_cache(void): nd6.c'],['../nd6_8h.html#a64d7956cf2b0d45025b02661f3f62377',1,'nd6_clear_destination_cache(void): nd6.c']]], + ['nd6_5ffind_5froute',['nd6_find_route',['../nd6_8c.html#ac5ce11eaecfb486c322641427f47cffe',1,'nd6_find_route(const ip6_addr_t *ip6addr): nd6.c'],['../nd6_8h.html#ac5ce11eaecfb486c322641427f47cffe',1,'nd6_find_route(const ip6_addr_t *ip6addr): nd6.c']]], + ['nd6_5fget_5fdestination_5fmtu',['nd6_get_destination_mtu',['../nd6_8c.html#af226438f4f9b4aa7c3a2bbdf3c1e948c',1,'nd6_get_destination_mtu(const ip6_addr_t *ip6addr, struct netif *netif): nd6.c'],['../nd6_8h.html#af226438f4f9b4aa7c3a2bbdf3c1e948c',1,'nd6_get_destination_mtu(const ip6_addr_t *ip6addr, struct netif *netif): nd6.c']]], + ['nd6_5fget_5fnext_5fhop_5faddr_5for_5fqueue',['nd6_get_next_hop_addr_or_queue',['../nd6_8c.html#ae447c204ebbf71e6ebbc5ed727a73eb9',1,'nd6_get_next_hop_addr_or_queue(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr, const u8_t **hwaddrp): nd6.c'],['../nd6_8h.html#ae447c204ebbf71e6ebbc5ed727a73eb9',1,'nd6_get_next_hop_addr_or_queue(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr, const u8_t **hwaddrp): nd6.c']]], + ['nd6_5finput',['nd6_input',['../nd6_8c.html#abbb92837e715be0e7d99513a84995831',1,'nd6_input(struct pbuf *p, struct netif *inp): nd6.c'],['../nd6_8h.html#abbb92837e715be0e7d99513a84995831',1,'nd6_input(struct pbuf *p, struct netif *inp): nd6.c']]], + ['nd6_5freachability_5fhint',['nd6_reachability_hint',['../nd6_8c.html#a4959990cae26a3996f638ec996f046df',1,'nd6_reachability_hint(const ip6_addr_t *ip6addr): nd6.c'],['../nd6_8h.html#a4959990cae26a3996f638ec996f046df',1,'nd6_reachability_hint(const ip6_addr_t *ip6addr): nd6.c']]], + ['nd6_5frestart_5fnetif',['nd6_restart_netif',['../nd6_8c.html#a73d3192204da20be193e3c00c4a0cb54',1,'nd6_restart_netif(struct netif *netif): nd6.c'],['../nd6_8h.html#a73d3192204da20be193e3c00c4a0cb54',1,'nd6_restart_netif(struct netif *netif): nd6.c']]], + ['nd6_5ftmr',['nd6_tmr',['../nd6_8c.html#a754781b509e69c35a7a4ee7e380399fe',1,'nd6_tmr(void): nd6.c'],['../nd6_8h.html#a754781b509e69c35a7a4ee7e380399fe',1,'nd6_tmr(void): nd6.c']]], + ['netbiosns_5finit',['netbiosns_init',['../group__netbiosns.html#ga0c696ea25a79e97715c8217901cff66b',1,'netbiosns_init(void): netbiosns.c'],['../group__netbiosns.html#ga0c696ea25a79e97715c8217901cff66b',1,'netbiosns_init(void): netbiosns.c']]], + ['netbiosns_5fstop',['netbiosns_stop',['../group__netbiosns.html#gaf82174943d25d67b04d44b7fba808806',1,'netbiosns_stop(void): netbiosns.c'],['../group__netbiosns.html#gaf82174943d25d67b04d44b7fba808806',1,'netbiosns_stop(void): netbiosns.c']]], + ['netbuf_5falloc',['netbuf_alloc',['../group__netbuf.html#ga0b831b80d3aa64938abdbfb6d89eaac0',1,'netbuf_alloc(struct netbuf *buf, u16_t size): netbuf.c'],['../group__netbuf.html#ga0b831b80d3aa64938abdbfb6d89eaac0',1,'netbuf_alloc(struct netbuf *buf, u16_t size): netbuf.c']]], + ['netbuf_5fchain',['netbuf_chain',['../group__netbuf.html#ga631e8bddd99b2397cd0b26973c659602',1,'netbuf_chain(struct netbuf *head, struct netbuf *tail): netbuf.c'],['../group__netbuf.html#ga631e8bddd99b2397cd0b26973c659602',1,'netbuf_chain(struct netbuf *head, struct netbuf *tail): netbuf.c']]], + ['netbuf_5fdata',['netbuf_data',['../group__netbuf.html#ga04a54a8476b37c2a8804fed679b6cc01',1,'netbuf_data(struct netbuf *buf, void **dataptr, u16_t *len): netbuf.c'],['../group__netbuf.html#ga04a54a8476b37c2a8804fed679b6cc01',1,'netbuf_data(struct netbuf *buf, void **dataptr, u16_t *len): netbuf.c']]], + ['netbuf_5fdelete',['netbuf_delete',['../group__netbuf.html#ga9dfd3ddfe0ec65009cb140c68404b09d',1,'netbuf_delete(struct netbuf *buf): netbuf.c'],['../group__netbuf.html#ga9dfd3ddfe0ec65009cb140c68404b09d',1,'netbuf_delete(struct netbuf *buf): netbuf.c']]], + ['netbuf_5ffirst',['netbuf_first',['../group__netbuf.html#ga222ad2a2eb871d603b216a87e9f9be51',1,'netbuf_first(struct netbuf *buf): netbuf.c'],['../group__netbuf.html#ga222ad2a2eb871d603b216a87e9f9be51',1,'netbuf_first(struct netbuf *buf): netbuf.c']]], + ['netbuf_5ffree',['netbuf_free',['../group__netbuf.html#ga02f82348ac23431a4b1512feae25f26b',1,'netbuf_free(struct netbuf *buf): netbuf.c'],['../group__netbuf.html#ga02f82348ac23431a4b1512feae25f26b',1,'netbuf_free(struct netbuf *buf): netbuf.c']]], + ['netbuf_5fnew',['netbuf_new',['../group__netbuf.html#gaaba704cd963e35e71145de9f5112991d',1,'netbuf_new(void): netbuf.c'],['../group__netbuf.html#gaaba704cd963e35e71145de9f5112991d',1,'netbuf_new(void): netbuf.c']]], + ['netbuf_5fnext',['netbuf_next',['../group__netbuf.html#gaf4e3718d378bb11f2fc8af42ce7b3715',1,'netbuf_next(struct netbuf *buf): netbuf.c'],['../group__netbuf.html#gaf4e3718d378bb11f2fc8af42ce7b3715',1,'netbuf_next(struct netbuf *buf): netbuf.c']]], + ['netbuf_5fref',['netbuf_ref',['../group__netbuf.html#gabdffa0401e4473c9d9100ecbf50e46d2',1,'netbuf_ref(struct netbuf *buf, const void *dataptr, u16_t size): netbuf.c'],['../group__netbuf.html#gabdffa0401e4473c9d9100ecbf50e46d2',1,'netbuf_ref(struct netbuf *buf, const void *dataptr, u16_t size): netbuf.c']]], + ['netconn_5faccept',['netconn_accept',['../group__netconn__tcp.html#ga13593148f60f7bbc6a505b567f175d69',1,'netconn_accept(struct netconn *conn, struct netconn **new_conn): api_lib.c'],['../group__netconn__tcp.html#ga13593148f60f7bbc6a505b567f175d69',1,'netconn_accept(struct netconn *conn, struct netconn **new_conn): api_lib.c']]], + ['netconn_5falloc',['netconn_alloc',['../api__msg_8c.html#a919865fa64270a3e4cb719ddff2fead9',1,'netconn_alloc(enum netconn_type t, netconn_callback callback): api_msg.c'],['../api__msg_8h.html#a919865fa64270a3e4cb719ddff2fead9',1,'netconn_alloc(enum netconn_type t, netconn_callback callback): api_msg.c']]], + ['netconn_5fbind',['netconn_bind',['../group__netconn__common.html#ga63bcc4d7bd150674fa953a1253fa6230',1,'netconn_bind(struct netconn *conn, const ip_addr_t *addr, u16_t port): api_lib.c'],['../group__netconn__common.html#ga63bcc4d7bd150674fa953a1253fa6230',1,'netconn_bind(struct netconn *conn, const ip_addr_t *addr, u16_t port): api_lib.c']]], + ['netconn_5fbind_5fif',['netconn_bind_if',['../group__netconn__common.html#gaa78479deeedcecd3bacade387ac40cc5',1,'netconn_bind_if(struct netconn *conn, u8_t if_idx): api_lib.c'],['../group__netconn__common.html#gaa78479deeedcecd3bacade387ac40cc5',1,'netconn_bind_if(struct netconn *conn, u8_t if_idx): api_lib.c']]], + ['netconn_5fclose',['netconn_close',['../group__netconn__tcp.html#ga25bb1c1c9928f91f53149a026e2e2624',1,'netconn_close(struct netconn *conn): api_lib.c'],['../group__netconn__tcp.html#ga25bb1c1c9928f91f53149a026e2e2624',1,'netconn_close(struct netconn *conn): api_lib.c']]], + ['netconn_5fconnect',['netconn_connect',['../group__netconn__common.html#gacba7f74d973872ad0b88b9a96098cf77',1,'netconn_connect(struct netconn *conn, const ip_addr_t *addr, u16_t port): api_lib.c'],['../group__netconn__common.html#gacba7f74d973872ad0b88b9a96098cf77',1,'netconn_connect(struct netconn *conn, const ip_addr_t *addr, u16_t port): api_lib.c']]], + ['netconn_5fdelete',['netconn_delete',['../group__netconn__common.html#gab411221f912a6d9e4c82ac3963989403',1,'netconn_delete(struct netconn *conn): api_lib.c'],['../group__netconn__common.html#gab411221f912a6d9e4c82ac3963989403',1,'netconn_delete(struct netconn *conn): api_lib.c']]], + ['netconn_5fdisconnect',['netconn_disconnect',['../group__netconn__udp.html#ga90bb4c4d1af6602a655b78fce0520402',1,'netconn_disconnect(struct netconn *conn): api_lib.c'],['../group__netconn__udp.html#ga90bb4c4d1af6602a655b78fce0520402',1,'netconn_disconnect(struct netconn *conn): api_lib.c']]], + ['netconn_5ferr',['netconn_err',['../group__netconn__common.html#gab9eccae90351eb6c3d2ca690068445d4',1,'netconn_err(struct netconn *conn): api_lib.c'],['../group__netconn__common.html#gab9eccae90351eb6c3d2ca690068445d4',1,'netconn_err(struct netconn *conn): api_lib.c']]], + ['netconn_5ffree',['netconn_free',['../api__msg_8c.html#a875b82ad129bdec1c6f2c21cbeedc48b',1,'netconn_free(struct netconn *conn): api_msg.c'],['../api__msg_8h.html#a875b82ad129bdec1c6f2c21cbeedc48b',1,'netconn_free(struct netconn *conn): api_msg.c']]], + ['netconn_5fgetaddr',['netconn_getaddr',['../api__lib_8c.html#a28430d1d86733f1bf98dc31305c42104',1,'netconn_getaddr(struct netconn *conn, ip_addr_t *addr, u16_t *port, u8_t local): api_lib.c'],['../api_8h.html#a28430d1d86733f1bf98dc31305c42104',1,'netconn_getaddr(struct netconn *conn, ip_addr_t *addr, u16_t *port, u8_t local): api_lib.c']]], + ['netconn_5fgethostbyname_5faddrtype',['netconn_gethostbyname_addrtype',['../group__netconn__common.html#gafb3494b149dff96ed8d1acb770ab52f5',1,'netconn_gethostbyname_addrtype(const char *name, ip_addr_t *addr, u8_t dns_addrtype): api_lib.c'],['../group__netconn__common.html#gafb3494b149dff96ed8d1acb770ab52f5',1,'netconn_gethostbyname_addrtype(const char *name, ip_addr_t *addr, u8_t dns_addrtype): api_lib.c']]], + ['netconn_5fjoin_5fleave_5fgroup',['netconn_join_leave_group',['../group__netconn__udp.html#gaaaf2f92eeb38dca70b3e6ad98c3c45ed',1,'netconn_join_leave_group(struct netconn *conn, const ip_addr_t *multiaddr, const ip_addr_t *netif_addr, enum netconn_igmp join_or_leave): api_lib.c'],['../group__netconn__udp.html#gaaaf2f92eeb38dca70b3e6ad98c3c45ed',1,'netconn_join_leave_group(struct netconn *conn, const ip_addr_t *multiaddr, const ip_addr_t *netif_addr, enum netconn_igmp join_or_leave): api_lib.c']]], + ['netconn_5fjoin_5fleave_5fgroup_5fnetif',['netconn_join_leave_group_netif',['../group__netconn__udp.html#ga5db2a1cf06a5fbb36f433e637da8729b',1,'netconn_join_leave_group_netif(struct netconn *conn, const ip_addr_t *multiaddr, u8_t if_idx, enum netconn_igmp join_or_leave): api_lib.c'],['../group__netconn__udp.html#ga5db2a1cf06a5fbb36f433e637da8729b',1,'netconn_join_leave_group_netif(struct netconn *conn, const ip_addr_t *multiaddr, u8_t if_idx, enum netconn_igmp join_or_leave): api_lib.c']]], + ['netconn_5flisten_5fwith_5fbacklog',['netconn_listen_with_backlog',['../group__netconn__tcp.html#ga84333ba8e7cdf45558d2b4795f53265d',1,'netconn_listen_with_backlog(struct netconn *conn, u8_t backlog): api_lib.c'],['../group__netconn__tcp.html#ga84333ba8e7cdf45558d2b4795f53265d',1,'netconn_listen_with_backlog(struct netconn *conn, u8_t backlog): api_lib.c']]], + ['netconn_5fnew_5fwith_5fproto_5fand_5fcallback',['netconn_new_with_proto_and_callback',['../api__lib_8c.html#ad0a0434e5ff08bb350740cb840e2aca8',1,'netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto, netconn_callback callback): api_lib.c'],['../api_8h.html#ad0a0434e5ff08bb350740cb840e2aca8',1,'netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto, netconn_callback callback): api_lib.c']]], + ['netconn_5fprepare_5fdelete',['netconn_prepare_delete',['../group__netconn__common.html#gad5c079af0ad791a92fe9dade375744f0',1,'netconn_prepare_delete(struct netconn *conn): api_lib.c'],['../group__netconn__common.html#gad5c079af0ad791a92fe9dade375744f0',1,'netconn_prepare_delete(struct netconn *conn): api_lib.c']]], + ['netconn_5frecv',['netconn_recv',['../group__netconn__common.html#ga50490bab058f4e740798beffcf48cabf',1,'netconn_recv(struct netconn *conn, struct netbuf **new_buf): api_lib.c'],['../group__netconn__common.html#ga50490bab058f4e740798beffcf48cabf',1,'netconn_recv(struct netconn *conn, struct netbuf **new_buf): api_lib.c']]], + ['netconn_5frecv_5ftcp_5fpbuf',['netconn_recv_tcp_pbuf',['../group__netconn__tcp.html#ga6893cb7648733d1f05696bac94e10490',1,'netconn_recv_tcp_pbuf(struct netconn *conn, struct pbuf **new_buf): api_lib.c'],['../group__netconn__tcp.html#ga6893cb7648733d1f05696bac94e10490',1,'netconn_recv_tcp_pbuf(struct netconn *conn, struct pbuf **new_buf): api_lib.c']]], + ['netconn_5frecv_5ftcp_5fpbuf_5fflags',['netconn_recv_tcp_pbuf_flags',['../group__netconn__tcp.html#gabb8a242c445ef928c23258a2b2344294',1,'netconn_recv_tcp_pbuf_flags(struct netconn *conn, struct pbuf **new_buf, u8_t apiflags): api_lib.c'],['../group__netconn__tcp.html#gabb8a242c445ef928c23258a2b2344294',1,'netconn_recv_tcp_pbuf_flags(struct netconn *conn, struct pbuf **new_buf, u8_t apiflags): api_lib.c']]], + ['netconn_5frecv_5fudp_5fraw_5fnetbuf',['netconn_recv_udp_raw_netbuf',['../api__lib_8c.html#a805a90b546c5a149f04782351633979b',1,'netconn_recv_udp_raw_netbuf(struct netconn *conn, struct netbuf **new_buf): api_lib.c'],['../api_8h.html#a805a90b546c5a149f04782351633979b',1,'netconn_recv_udp_raw_netbuf(struct netconn *conn, struct netbuf **new_buf): api_lib.c']]], + ['netconn_5frecv_5fudp_5fraw_5fnetbuf_5fflags',['netconn_recv_udp_raw_netbuf_flags',['../api__lib_8c.html#a505c3b8e400babf9681e09c945b7f421',1,'netconn_recv_udp_raw_netbuf_flags(struct netconn *conn, struct netbuf **new_buf, u8_t apiflags): api_lib.c'],['../api_8h.html#a505c3b8e400babf9681e09c945b7f421',1,'netconn_recv_udp_raw_netbuf_flags(struct netconn *conn, struct netbuf **new_buf, u8_t apiflags): api_lib.c']]], + ['netconn_5fsend',['netconn_send',['../group__netconn__udp.html#gac4d4d10153d47c80a783c34b27c66238',1,'netconn_send(struct netconn *conn, struct netbuf *buf): api_lib.c'],['../group__netconn__udp.html#gac4d4d10153d47c80a783c34b27c66238',1,'netconn_send(struct netconn *conn, struct netbuf *buf): api_lib.c']]], + ['netconn_5fsendto',['netconn_sendto',['../group__netconn__udp.html#ga8e1d852119bda1e1b602c2995282ef0c',1,'netconn_sendto(struct netconn *conn, struct netbuf *buf, const ip_addr_t *addr, u16_t port): api_lib.c'],['../group__netconn__udp.html#ga8e1d852119bda1e1b602c2995282ef0c',1,'netconn_sendto(struct netconn *conn, struct netbuf *buf, const ip_addr_t *addr, u16_t port): api_lib.c']]], + ['netconn_5fshutdown',['netconn_shutdown',['../group__netconn__tcp.html#ga6ec6b2cf7b0f59e9371e38ae7dea2a63',1,'netconn_shutdown(struct netconn *conn, u8_t shut_rx, u8_t shut_tx): api_lib.c'],['../group__netconn__tcp.html#ga6ec6b2cf7b0f59e9371e38ae7dea2a63',1,'netconn_shutdown(struct netconn *conn, u8_t shut_rx, u8_t shut_tx): api_lib.c']]], + ['netconn_5fwrite_5fpartly',['netconn_write_partly',['../group__netconn__tcp.html#gacf9ce6f71652739d6be2ca83f7c423bf',1,'netconn_write_partly(struct netconn *conn, const void *dataptr, size_t size, u8_t apiflags, size_t *bytes_written): api_lib.c'],['../group__netconn__tcp.html#gacf9ce6f71652739d6be2ca83f7c423bf',1,'netconn_write_partly(struct netconn *conn, const void *dataptr, size_t size, u8_t apiflags, size_t *bytes_written): api_lib.c']]], + ['netconn_5fwrite_5fvectors_5fpartly',['netconn_write_vectors_partly',['../api__lib_8c.html#a992b4fe8a855fd94861738f7260d0a32',1,'netconn_write_vectors_partly(struct netconn *conn, struct netvector *vectors, u16_t vectorcnt, u8_t apiflags, size_t *bytes_written): api_lib.c'],['../api_8h.html#a992b4fe8a855fd94861738f7260d0a32',1,'netconn_write_vectors_partly(struct netconn *conn, struct netvector *vectors, u16_t vectorcnt, u8_t apiflags, size_t *bytes_written): api_lib.c']]], + ['netif_5fadd',['netif_add',['../group__netif.html#gade5498543e74067f28cc6bef0209e3be',1,'netif_add(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input): netif.c'],['../group__netif.html#gade5498543e74067f28cc6bef0209e3be',1,'netif_add(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input): netif.c']]], + ['netif_5fadd_5fext_5fcallback',['netif_add_ext_callback',['../group__netif.html#ga3efc2b72f75936d50708247420c9d1d9',1,'netif_add_ext_callback(netif_ext_callback_t *callback, netif_ext_callback_fn fn): netif.c'],['../group__netif.html#ga3efc2b72f75936d50708247420c9d1d9',1,'netif_add_ext_callback(netif_ext_callback_t *callback, netif_ext_callback_fn fn): netif.c']]], + ['netif_5fadd_5fip6_5faddress',['netif_add_ip6_address',['../group__netif__ip6.html#gab0727fba5f5b3fed8d7013775506f327',1,'netif_add_ip6_address(struct netif *netif, const ip6_addr_t *ip6addr, s8_t *chosen_idx): netif.c'],['../group__netif__ip6.html#gab0727fba5f5b3fed8d7013775506f327',1,'netif_add_ip6_address(struct netif *netif, const ip6_addr_t *ip6addr, s8_t *chosen_idx): netif.c']]], + ['netif_5fadd_5fnoaddr',['netif_add_noaddr',['../group__netif.html#gac20150ac754ff1f88afeaa33be3552a4',1,'netif_add_noaddr(struct netif *netif, void *state, netif_init_fn init, netif_input_fn input): netif.c'],['../group__netif.html#gac20150ac754ff1f88afeaa33be3552a4',1,'netif_add_noaddr(struct netif *netif, void *state, netif_init_fn init, netif_input_fn input): netif.c']]], + ['netif_5falloc_5fclient_5fdata_5fid',['netif_alloc_client_data_id',['../group__netif__cd.html#ga55d62d43b5a9a5527f0116ec38369978',1,'netif_alloc_client_data_id(void): netif.c'],['../group__netif__cd.html#ga55d62d43b5a9a5527f0116ec38369978',1,'netif_alloc_client_data_id(void): netif.c']]], + ['netif_5fcreate_5fip6_5flinklocal_5faddress',['netif_create_ip6_linklocal_address',['../group__netif__ip6.html#gae864211a5eb052deb5da7bc7e3427fb9',1,'netif_create_ip6_linklocal_address(struct netif *netif, u8_t from_mac_48bit): netif.c'],['../group__netif__ip6.html#gae864211a5eb052deb5da7bc7e3427fb9',1,'netif_create_ip6_linklocal_address(struct netif *netif, u8_t from_mac_48bit): netif.c']]], + ['netif_5ffind',['netif_find',['../group__netif.html#ga69c93a139e8a1f6ef4e3d076a2897def',1,'netif_find(const char *name): netif.c'],['../group__netif.html#ga69c93a139e8a1f6ef4e3d076a2897def',1,'netif_find(const char *name): netif.c']]], + ['netif_5fget_5fby_5findex',['netif_get_by_index',['../group__netif.html#gae4df885347c800a5486d3bf25981300e',1,'netif_get_by_index(u8_t idx): netif.c'],['../group__netif.html#gae4df885347c800a5486d3bf25981300e',1,'netif_get_by_index(u8_t idx): netif.c']]], + ['netif_5fget_5fip6_5faddr_5fmatch',['netif_get_ip6_addr_match',['../netif_8c.html#a0ec111195bcc452f77895ad35aedd7dc',1,'netif_get_ip6_addr_match(struct netif *netif, const ip6_addr_t *ip6addr): netif.c'],['../netif_8h.html#a0ec111195bcc452f77895ad35aedd7dc',1,'netif_get_ip6_addr_match(struct netif *netif, const ip6_addr_t *ip6addr): netif.c']]], + ['netif_5findex_5fto_5fname',['netif_index_to_name',['../group__netif.html#ga3ff104d083914e87a7805a0b90a85755',1,'netif_index_to_name(u8_t idx, char *name): netif.c'],['../group__netif.html#ga3ff104d083914e87a7805a0b90a85755',1,'netif_index_to_name(u8_t idx, char *name): netif.c']]], + ['netif_5finput',['netif_input',['../group__lwip__nosys.html#ga5532f93d68c874fb99c681bff2165385',1,'netif_input(struct pbuf *p, struct netif *inp): netif.c'],['../group__lwip__nosys.html#ga5532f93d68c874fb99c681bff2165385',1,'netif_input(struct pbuf *p, struct netif *inp): netif.c']]], + ['netif_5finvoke_5fext_5fcallback',['netif_invoke_ext_callback',['../netif_8c.html#a75b5298b1c3c3794747d78a4ce95d81c',1,'netif_invoke_ext_callback(struct netif *netif, netif_nsc_reason_t reason, const netif_ext_callback_args_t *args): netif.c'],['../netif_8h.html#a75b5298b1c3c3794747d78a4ce95d81c',1,'netif_invoke_ext_callback(struct netif *netif, netif_nsc_reason_t reason, const netif_ext_callback_args_t *args): netif.c']]], + ['netif_5fip6_5faddr_5fset',['netif_ip6_addr_set',['../group__netif__ip6.html#gae21572fdbd8664d22a1b281a6c31c9bb',1,'netif_ip6_addr_set(struct netif *netif, s8_t addr_idx, const ip6_addr_t *addr6): netif.c'],['../group__netif__ip6.html#gae21572fdbd8664d22a1b281a6c31c9bb',1,'netif_ip6_addr_set(struct netif *netif, s8_t addr_idx, const ip6_addr_t *addr6): netif.c']]], + ['netif_5fip6_5faddr_5fset_5fstate',['netif_ip6_addr_set_state',['../group__netif__ip6.html#ga9cde7286535c7f037a9b16052561b91f',1,'netif_ip6_addr_set_state(struct netif *netif, s8_t addr_idx, u8_t state): netif.c'],['../group__netif__ip6.html#ga9cde7286535c7f037a9b16052561b91f',1,'netif_ip6_addr_set_state(struct netif *netif, s8_t addr_idx, u8_t state): netif.c']]], + ['netif_5floop_5foutput',['netif_loop_output',['../group__netif.html#ga691f1cc7c9778ffa62a3843c184404b2',1,'netif_loop_output(struct netif *netif, struct pbuf *p): netif.c'],['../group__netif.html#ga691f1cc7c9778ffa62a3843c184404b2',1,'netif_loop_output(struct netif *netif, struct pbuf *p): netif.c']]], + ['netif_5fname_5fto_5findex',['netif_name_to_index',['../group__netif.html#gac763a1f647fb9e8af4254418e813a6ae',1,'netif_name_to_index(const char *name): netif.c'],['../group__netif.html#gac763a1f647fb9e8af4254418e813a6ae',1,'netif_name_to_index(const char *name): netif.c']]], + ['netif_5fpoll',['netif_poll',['../netif_8c.html#a0fbaed78253d21e1b54e65651da3e327',1,'netif_poll(struct netif *netif): netif.c'],['../netif_8h.html#a0fbaed78253d21e1b54e65651da3e327',1,'netif_poll(struct netif *netif): netif.c']]], + ['netif_5fremove',['netif_remove',['../group__netif.html#ga9c6e541f0c184e1ea61a5cd8afe3e979',1,'netif_remove(struct netif *netif): netif.c'],['../group__netif.html#ga9c6e541f0c184e1ea61a5cd8afe3e979',1,'netif_remove(struct netif *netif): netif.c']]], + ['netif_5fremove_5fext_5fcallback',['netif_remove_ext_callback',['../group__netif.html#ga1d91ac26b0993a9a3466b317ab5ec716',1,'netif_remove_ext_callback(netif_ext_callback_t *callback): netif.c'],['../group__netif.html#ga1d91ac26b0993a9a3466b317ab5ec716',1,'netif_remove_ext_callback(netif_ext_callback_t *callback): netif.c']]], + ['netif_5fset_5faddr',['netif_set_addr',['../group__netif__ip4.html#ga85e31a68e96390dab2feffb11f4948a1',1,'netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw): netif.c'],['../group__netif__ip4.html#ga85e31a68e96390dab2feffb11f4948a1',1,'netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw): netif.c']]], + ['netif_5fset_5fdefault',['netif_set_default',['../group__netif.html#gac90f290edd005238d62aa94c4ac9dea3',1,'netif_set_default(struct netif *netif): netif.c'],['../group__netif.html#gac90f290edd005238d62aa94c4ac9dea3',1,'netif_set_default(struct netif *netif): netif.c']]], + ['netif_5fset_5fdown',['netif_set_down',['../group__netif.html#ga641d07ed8c31fe5306bc01605a6790cf',1,'netif_set_down(struct netif *netif): netif.c'],['../group__netif.html#ga641d07ed8c31fe5306bc01605a6790cf',1,'netif_set_down(struct netif *netif): netif.c']]], + ['netif_5fset_5fgw',['netif_set_gw',['../group__netif__ip4.html#ga841876c274c3c90898579f9e12f3b520',1,'netif_set_gw(struct netif *netif, const ip4_addr_t *gw): netif.c'],['../group__netif__ip4.html#ga841876c274c3c90898579f9e12f3b520',1,'netif_set_gw(struct netif *netif, const ip4_addr_t *gw): netif.c']]], + ['netif_5fset_5fipaddr',['netif_set_ipaddr',['../group__netif__ip4.html#ga73b043a7ec0e4899aba8433ec9064cca',1,'netif_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr): netif.c'],['../group__netif__ip4.html#ga73b043a7ec0e4899aba8433ec9064cca',1,'netif_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr): netif.c']]], + ['netif_5fset_5flink_5fcallback',['netif_set_link_callback',['../group__netif.html#ga1cd45910add90e267e33d680bbc3f0f4',1,'netif_set_link_callback(struct netif *netif, netif_status_callback_fn link_callback): netif.c'],['../group__netif.html#ga1cd45910add90e267e33d680bbc3f0f4',1,'netif_set_link_callback(struct netif *netif, netif_status_callback_fn link_callback): netif.c']]], + ['netif_5fset_5flink_5fdown',['netif_set_link_down',['../group__netif.html#ga34e37a1e8e358760dc1c43887922c7db',1,'netif_set_link_down(struct netif *netif): netif.c'],['../group__netif.html#ga34e37a1e8e358760dc1c43887922c7db',1,'netif_set_link_down(struct netif *netif): netif.c']]], + ['netif_5fset_5flink_5fup',['netif_set_link_up',['../group__netif.html#gae0d2975f189277990e9d5276fdd9e9ea',1,'netif_set_link_up(struct netif *netif): netif.c'],['../group__netif.html#gae0d2975f189277990e9d5276fdd9e9ea',1,'netif_set_link_up(struct netif *netif): netif.c']]], + ['netif_5fset_5fnetmask',['netif_set_netmask',['../group__netif__ip4.html#ga0bdd7c057c2f55f670853e3906014a53',1,'netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask): netif.c'],['../group__netif__ip4.html#ga0bdd7c057c2f55f670853e3906014a53',1,'netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask): netif.c']]], + ['netif_5fset_5fremove_5fcallback',['netif_set_remove_callback',['../group__netif.html#ga319c88da0fdf25c1fee1595299bc35ce',1,'netif_set_remove_callback(struct netif *netif, netif_status_callback_fn remove_callback): netif.c'],['../group__netif.html#ga319c88da0fdf25c1fee1595299bc35ce',1,'netif_set_remove_callback(struct netif *netif, netif_status_callback_fn remove_callback): netif.c']]], + ['netif_5fset_5fstatus_5fcallback',['netif_set_status_callback',['../group__netif.html#gadc8787b23ac0ee023979cbadf87813d4',1,'netif_set_status_callback(struct netif *netif, netif_status_callback_fn status_callback): netif.c'],['../group__netif.html#gadc8787b23ac0ee023979cbadf87813d4',1,'netif_set_status_callback(struct netif *netif, netif_status_callback_fn status_callback): netif.c']]], + ['netif_5fset_5fup',['netif_set_up',['../group__netif.html#gaf19693be401a265a52d2a56c65753121',1,'netif_set_up(struct netif *netif): netif.c'],['../group__netif.html#gaf19693be401a265a52d2a56c65753121',1,'netif_set_up(struct netif *netif): netif.c']]], + ['netif_5fto_5fnum',['netif_to_num',['../snmp__core_8c.html#a871aa636806c7d68cbe24572598e59de',1,'netif_to_num(const struct netif *netif): snmp_core.c'],['../snmp__core_8h.html#a871aa636806c7d68cbe24572598e59de',1,'netif_to_num(const struct netif *netif): snmp_core.c']]], + ['netifapi_5farp_5fadd',['netifapi_arp_add',['../netifapi_8c.html#a62b0bdbb3783eb27aa73485081306119',1,'netifapi_arp_add(const ip4_addr_t *ipaddr, struct eth_addr *ethaddr, enum netifapi_arp_entry type): netifapi.c'],['../netifapi_8h.html#a62b0bdbb3783eb27aa73485081306119',1,'netifapi_arp_add(const ip4_addr_t *ipaddr, struct eth_addr *ethaddr, enum netifapi_arp_entry type): netifapi.c']]], + ['netifapi_5farp_5fremove',['netifapi_arp_remove',['../netifapi_8c.html#a037c3d05c19b4d467b6ce06eb4639ee8',1,'netifapi_arp_remove(const ip4_addr_t *ipaddr, enum netifapi_arp_entry type): netifapi.c'],['../netifapi_8h.html#a037c3d05c19b4d467b6ce06eb4639ee8',1,'netifapi_arp_remove(const ip4_addr_t *ipaddr, enum netifapi_arp_entry type): netifapi.c']]], + ['netifapi_5fnetif_5fadd',['netifapi_netif_add',['../group__netifapi__netif.html#gacc063c5a3071e34eec7376651e35a519',1,'netifapi_netif_add(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input): netifapi.c'],['../group__netifapi__netif.html#gacc063c5a3071e34eec7376651e35a519',1,'netifapi_netif_add(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input): netifapi.c']]], + ['netifapi_5fnetif_5fcommon',['netifapi_netif_common',['../netifapi_8c.html#a26fd83042b53b2ff82e15262ed72f0a7',1,'netifapi_netif_common(struct netif *netif, netifapi_void_fn voidfunc, netifapi_errt_fn errtfunc): netifapi.c'],['../netifapi_8h.html#a26fd83042b53b2ff82e15262ed72f0a7',1,'netifapi_netif_common(struct netif *netif, netifapi_void_fn voidfunc, netifapi_errt_fn errtfunc): netifapi.c']]], + ['netifapi_5fnetif_5findex_5fto_5fname',['netifapi_netif_index_to_name',['../group__netifapi__netif.html#gab7914d77d0a89fd6c31048feb0bdafb6',1,'netifapi.c']]], + ['netifapi_5fnetif_5fname_5fto_5findex',['netifapi_netif_name_to_index',['../group__netifapi__netif.html#gad4a821182d01eafa4ca258f958fcb089',1,'netifapi.c']]], + ['netifapi_5fnetif_5fset_5faddr',['netifapi_netif_set_addr',['../group__netifapi__netif.html#ga31755ea6dbb213236bfce19bcbe8c973',1,'netifapi_netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw): netifapi.c'],['../group__netifapi__netif.html#ga31755ea6dbb213236bfce19bcbe8c973',1,'netifapi_netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw): netifapi.c']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_9.html b/Libraries/LwIP/doc/doxygen/output/html/search/functions_9.html new file mode 100644 index 0000000..c73f07b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_9.js b/Libraries/LwIP/doc/doxygen/output/html/search/functions_9.js new file mode 100644 index 0000000..ba6e7ff --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_9.js @@ -0,0 +1,34 @@ +var searchData= +[ + ['pbuf_5fadd_5fheader',['pbuf_add_header',['../pbuf_8c.html#a32dc14bd88dcafa25e627ab18e801815',1,'pbuf_add_header(struct pbuf *p, size_t header_size_increment): pbuf.c'],['../pbuf_8h.html#a32dc14bd88dcafa25e627ab18e801815',1,'pbuf_add_header(struct pbuf *p, size_t header_size_increment): pbuf.c']]], + ['pbuf_5fadd_5fheader_5fforce',['pbuf_add_header_force',['../pbuf_8c.html#ad4ef8c5fbbd1447db04f8f73923e7dee',1,'pbuf_add_header_force(struct pbuf *p, size_t header_size_increment): pbuf.c'],['../pbuf_8h.html#ad4ef8c5fbbd1447db04f8f73923e7dee',1,'pbuf_add_header_force(struct pbuf *p, size_t header_size_increment): pbuf.c']]], + ['pbuf_5falloc',['pbuf_alloc',['../group__pbuf.html#gacfcb0a2af918658ba0afe36499c65f47',1,'pbuf_alloc(pbuf_layer layer, u16_t length, pbuf_type type): pbuf.c'],['../group__pbuf.html#gacfcb0a2af918658ba0afe36499c65f47',1,'pbuf_alloc(pbuf_layer l, u16_t length, pbuf_type type): pbuf.c']]], + ['pbuf_5falloc_5freference',['pbuf_alloc_reference',['../group__pbuf.html#ga4caa46c6d560d9d0da2be845bc9c2fab',1,'pbuf_alloc_reference(void *payload, u16_t length, pbuf_type type): pbuf.c'],['../group__pbuf.html#ga4caa46c6d560d9d0da2be845bc9c2fab',1,'pbuf_alloc_reference(void *payload, u16_t length, pbuf_type type): pbuf.c']]], + ['pbuf_5falloced_5fcustom',['pbuf_alloced_custom',['../group__pbuf.html#ga90fa2bbf6ea4a263ee8f7b77c75683c2',1,'pbuf_alloced_custom(pbuf_layer l, u16_t length, pbuf_type type, struct pbuf_custom *p, void *payload_mem, u16_t payload_mem_len): pbuf.c'],['../group__pbuf.html#ga90fa2bbf6ea4a263ee8f7b77c75683c2',1,'pbuf_alloced_custom(pbuf_layer l, u16_t length, pbuf_type type, struct pbuf_custom *p, void *payload_mem, u16_t payload_mem_len): pbuf.c']]], + ['pbuf_5fcat',['pbuf_cat',['../group__pbuf.html#ga82429084fe29015509c9b4a072707cd4',1,'pbuf_cat(struct pbuf *h, struct pbuf *t): pbuf.c'],['../group__pbuf.html#ga82429084fe29015509c9b4a072707cd4',1,'pbuf_cat(struct pbuf *head, struct pbuf *tail): pbuf.c']]], + ['pbuf_5fchain',['pbuf_chain',['../group__pbuf.html#ga831c9a72bda1d3bd4c7b96f5a0e3b891',1,'pbuf_chain(struct pbuf *h, struct pbuf *t): pbuf.c'],['../group__pbuf.html#ga831c9a72bda1d3bd4c7b96f5a0e3b891',1,'pbuf_chain(struct pbuf *head, struct pbuf *tail): pbuf.c']]], + ['pbuf_5fclen',['pbuf_clen',['../pbuf_8c.html#a5df7ac5ae59012fe9aeddba375a72190',1,'pbuf_clen(const struct pbuf *p): pbuf.c'],['../pbuf_8h.html#a5df7ac5ae59012fe9aeddba375a72190',1,'pbuf_clen(const struct pbuf *p): pbuf.c']]], + ['pbuf_5fclone',['pbuf_clone',['../group__pbuf.html#gafdb04fb0f37f0422fd44ec0fcec8ebd0',1,'pbuf_clone(pbuf_layer layer, pbuf_type type, struct pbuf *p): pbuf.c'],['../group__pbuf.html#gafdb04fb0f37f0422fd44ec0fcec8ebd0',1,'pbuf_clone(pbuf_layer l, pbuf_type type, struct pbuf *p): pbuf.c']]], + ['pbuf_5fcoalesce',['pbuf_coalesce',['../group__pbuf.html#ga54ac7b116c6f53c704cbf74f35a8b35c',1,'pbuf_coalesce(struct pbuf *p, pbuf_layer layer): pbuf.c'],['../group__pbuf.html#ga54ac7b116c6f53c704cbf74f35a8b35c',1,'pbuf_coalesce(struct pbuf *p, pbuf_layer layer): pbuf.c']]], + ['pbuf_5fcopy',['pbuf_copy',['../group__pbuf.html#gaba88511dee3df4b631fde691f421320d',1,'pbuf_copy(struct pbuf *p_to, const struct pbuf *p_from): pbuf.c'],['../group__pbuf.html#gaba88511dee3df4b631fde691f421320d',1,'pbuf_copy(struct pbuf *p_to, const struct pbuf *p_from): pbuf.c']]], + ['pbuf_5fcopy_5fpartial',['pbuf_copy_partial',['../group__pbuf.html#gac2f1f58fd36042e82af46f5015720899',1,'pbuf_copy_partial(const struct pbuf *buf, void *dataptr, u16_t len, u16_t offset): pbuf.c'],['../group__pbuf.html#gac2f1f58fd36042e82af46f5015720899',1,'pbuf_copy_partial(const struct pbuf *p, void *dataptr, u16_t len, u16_t offset): pbuf.c']]], + ['pbuf_5fdechain',['pbuf_dechain',['../pbuf_8c.html#abf3d29c4f43986b4cb5eb314d5b9729d',1,'pbuf_dechain(struct pbuf *p): pbuf.c'],['../pbuf_8h.html#abf3d29c4f43986b4cb5eb314d5b9729d',1,'pbuf_dechain(struct pbuf *p): pbuf.c']]], + ['pbuf_5ffree',['pbuf_free',['../group__pbuf.html#gab0dd696fb4b6bc65e548944584f1738b',1,'pbuf_free(struct pbuf *p): pbuf.c'],['../group__pbuf.html#gab0dd696fb4b6bc65e548944584f1738b',1,'pbuf_free(struct pbuf *p): pbuf.c']]], + ['pbuf_5ffree_5fcallback',['pbuf_free_callback',['../tcpip_8c.html#a5cdcb6b784fe0e8736a5b31a5cfbed6c',1,'pbuf_free_callback(struct pbuf *p): tcpip.c'],['../tcpip_8h.html#a5cdcb6b784fe0e8736a5b31a5cfbed6c',1,'pbuf_free_callback(struct pbuf *p): tcpip.c']]], + ['pbuf_5ffree_5fheader',['pbuf_free_header',['../pbuf_8c.html#a25a3b8edc783896b03819a966d00845e',1,'pbuf_free_header(struct pbuf *q, u16_t size): pbuf.c'],['../pbuf_8h.html#a25a3b8edc783896b03819a966d00845e',1,'pbuf_free_header(struct pbuf *q, u16_t size): pbuf.c']]], + ['pbuf_5fget_5fat',['pbuf_get_at',['../group__pbuf.html#ga6d803d9945bffb7ad97743f2fa503da6',1,'pbuf_get_at(const struct pbuf *p, u16_t offset): pbuf.c'],['../group__pbuf.html#ga6d803d9945bffb7ad97743f2fa503da6',1,'pbuf_get_at(const struct pbuf *p, u16_t offset): pbuf.c']]], + ['pbuf_5fget_5fcontiguous',['pbuf_get_contiguous',['../group__pbuf.html#gad0357ae0be17b2aacd0c301cdc86fc39',1,'pbuf_get_contiguous(const struct pbuf *p, void *buffer, size_t bufsize, u16_t len, u16_t offset): pbuf.c'],['../group__pbuf.html#gad0357ae0be17b2aacd0c301cdc86fc39',1,'pbuf_get_contiguous(const struct pbuf *p, void *buffer, size_t bufsize, u16_t len, u16_t offset): pbuf.c']]], + ['pbuf_5fheader',['pbuf_header',['../pbuf_8c.html#a0f81deff4a0e6e8e0ff161a7b9871449',1,'pbuf_header(struct pbuf *p, s16_t header_size_increment): pbuf.c'],['../pbuf_8h.html#aaa17c1951cf2d207b6adfd3947d91f00',1,'pbuf_header(struct pbuf *p, s16_t header_size): pbuf.c']]], + ['pbuf_5fheader_5fforce',['pbuf_header_force',['../pbuf_8c.html#ad0e64d6fbc423593461063da97da9ce6',1,'pbuf_header_force(struct pbuf *p, s16_t header_size_increment): pbuf.c'],['../pbuf_8h.html#a27480c41c34021d4417691d327163626',1,'pbuf_header_force(struct pbuf *p, s16_t header_size): pbuf.c']]], + ['pbuf_5fmemcmp',['pbuf_memcmp',['../group__pbuf.html#ga2170ccbbb13238380dbb203ee1b85974',1,'pbuf_memcmp(const struct pbuf *p, u16_t offset, const void *s2, u16_t n): pbuf.c'],['../group__pbuf.html#ga2170ccbbb13238380dbb203ee1b85974',1,'pbuf_memcmp(const struct pbuf *p, u16_t offset, const void *s2, u16_t n): pbuf.c']]], + ['pbuf_5fmemfind',['pbuf_memfind',['../group__pbuf.html#ga18c164a6e4a24d89ea9eb7571a886448',1,'pbuf_memfind(const struct pbuf *p, const void *mem, u16_t mem_len, u16_t start_offset): pbuf.c'],['../group__pbuf.html#ga18c164a6e4a24d89ea9eb7571a886448',1,'pbuf_memfind(const struct pbuf *p, const void *mem, u16_t mem_len, u16_t start_offset): pbuf.c']]], + ['pbuf_5fput_5fat',['pbuf_put_at',['../group__pbuf.html#gaf76863707dc02993eae116574b1ea03f',1,'pbuf_put_at(struct pbuf *p, u16_t offset, u8_t data): pbuf.c'],['../group__pbuf.html#gaf76863707dc02993eae116574b1ea03f',1,'pbuf_put_at(struct pbuf *p, u16_t offset, u8_t data): pbuf.c']]], + ['pbuf_5frealloc',['pbuf_realloc',['../group__pbuf.html#ga50abfe830a33a1a47a562febee66015d',1,'pbuf_realloc(struct pbuf *p, u16_t new_len): pbuf.c'],['../group__pbuf.html#ga50abfe830a33a1a47a562febee66015d',1,'pbuf_realloc(struct pbuf *p, u16_t size): pbuf.c']]], + ['pbuf_5fref',['pbuf_ref',['../group__pbuf.html#ga77f6bbd69e45e542014d9c547c7da74e',1,'pbuf_ref(struct pbuf *p): pbuf.c'],['../group__pbuf.html#ga77f6bbd69e45e542014d9c547c7da74e',1,'pbuf_ref(struct pbuf *p): pbuf.c']]], + ['pbuf_5fremove_5fheader',['pbuf_remove_header',['../pbuf_8c.html#aca0cd8b3f08fbb5e35bc91a663083cc1',1,'pbuf_remove_header(struct pbuf *p, size_t header_size_decrement): pbuf.c'],['../pbuf_8h.html#ab65da7cd8f7449b3b2e57d7fa1a74ef4',1,'pbuf_remove_header(struct pbuf *p, size_t header_size): pbuf.c']]], + ['pbuf_5fskip',['pbuf_skip',['../group__pbuf.html#ga6a961522d81f0327aaf4d4ee6d96c583',1,'pbuf_skip(struct pbuf *in, u16_t in_offset, u16_t *out_offset): pbuf.c'],['../group__pbuf.html#ga6a961522d81f0327aaf4d4ee6d96c583',1,'pbuf_skip(struct pbuf *in, u16_t in_offset, u16_t *out_offset): pbuf.c']]], + ['pbuf_5fstrstr',['pbuf_strstr',['../pbuf_8c.html#a9ba3f7b705309ceadb147692fd5a1c7d',1,'pbuf_strstr(const struct pbuf *p, const char *substr): pbuf.c'],['../pbuf_8h.html#a9ba3f7b705309ceadb147692fd5a1c7d',1,'pbuf_strstr(const struct pbuf *p, const char *substr): pbuf.c']]], + ['pbuf_5ftake',['pbuf_take',['../group__pbuf.html#gad1e31e370271335b197272af2724ca85',1,'pbuf_take(struct pbuf *buf, const void *dataptr, u16_t len): pbuf.c'],['../group__pbuf.html#gad1e31e370271335b197272af2724ca85',1,'pbuf_take(struct pbuf *buf, const void *dataptr, u16_t len): pbuf.c']]], + ['pbuf_5ftake_5fat',['pbuf_take_at',['../group__pbuf.html#gae1cf2bf7454ff87ff377b0b2262f9b44',1,'pbuf_take_at(struct pbuf *buf, const void *dataptr, u16_t len, u16_t offset): pbuf.c'],['../group__pbuf.html#gae1cf2bf7454ff87ff377b0b2262f9b44',1,'pbuf_take_at(struct pbuf *buf, const void *dataptr, u16_t len, u16_t offset): pbuf.c']]], + ['pbuf_5ftry_5fget_5fat',['pbuf_try_get_at',['../group__pbuf.html#ga839f342803b0cf89049744124c5a98ad',1,'pbuf_try_get_at(const struct pbuf *p, u16_t offset): pbuf.c'],['../group__pbuf.html#ga839f342803b0cf89049744124c5a98ad',1,'pbuf_try_get_at(const struct pbuf *p, u16_t offset): pbuf.c']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_a.html b/Libraries/LwIP/doc/doxygen/output/html/search/functions_a.html new file mode 100644 index 0000000..f10ad63 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_a.js b/Libraries/LwIP/doc/doxygen/output/html/search/functions_a.js new file mode 100644 index 0000000..7800d64 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_a.js @@ -0,0 +1,24 @@ +var searchData= +[ + ['raw_5fbind',['raw_bind',['../group__raw__raw.html#ga8576dbbc7f03797525d2cdb7ec3b9fe4',1,'raw_bind(struct raw_pcb *pcb, const ip_addr_t *ipaddr): raw.c'],['../group__raw__raw.html#ga8576dbbc7f03797525d2cdb7ec3b9fe4',1,'raw_bind(struct raw_pcb *pcb, const ip_addr_t *ipaddr): raw.c']]], + ['raw_5fbind_5fnetif',['raw_bind_netif',['../group__raw__raw.html#gaa124ac8a9479aebefe2c953629df591a',1,'raw_bind_netif(struct raw_pcb *pcb, const struct netif *netif): raw.c'],['../group__raw__raw.html#gaa124ac8a9479aebefe2c953629df591a',1,'raw_bind_netif(struct raw_pcb *pcb, const struct netif *netif): raw.c']]], + ['raw_5fconnect',['raw_connect',['../group__raw__raw.html#ga31bb29c964d5e2f734e563485fc25168',1,'raw_connect(struct raw_pcb *pcb, const ip_addr_t *ipaddr): raw.c'],['../group__raw__raw.html#ga31bb29c964d5e2f734e563485fc25168',1,'raw_connect(struct raw_pcb *pcb, const ip_addr_t *ipaddr): raw.c']]], + ['raw_5fdisconnect',['raw_disconnect',['../group__raw__raw.html#ga7634c0306e2c6f8040e35f6547e8d3ef',1,'raw_disconnect(struct raw_pcb *pcb): raw.c'],['../group__raw__raw.html#ga7634c0306e2c6f8040e35f6547e8d3ef',1,'raw_disconnect(struct raw_pcb *pcb): raw.c']]], + ['raw_5finput',['raw_input',['../raw_8c.html#a03c4582d9ecf687e1f31d597c7889553',1,'raw_input(struct pbuf *p, struct netif *inp): raw.c'],['../raw__priv_8h.html#a03c4582d9ecf687e1f31d597c7889553',1,'raw_input(struct pbuf *p, struct netif *inp): raw.c']]], + ['raw_5fnetif_5fip_5faddr_5fchanged',['raw_netif_ip_addr_changed',['../raw_8c.html#a61dc42f18e34800643000e48be6543ab',1,'raw_netif_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr): raw.c'],['../raw__priv_8h.html#a61dc42f18e34800643000e48be6543ab',1,'raw_netif_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr): raw.c']]], + ['raw_5fnew',['raw_new',['../group__raw__raw.html#ga3217f096ea86728e011f91b249933e8f',1,'raw_new(u8_t proto): raw.c'],['../group__raw__raw.html#ga3217f096ea86728e011f91b249933e8f',1,'raw_new(u8_t proto): raw.c']]], + ['raw_5fnew_5fip_5ftype',['raw_new_ip_type',['../group__raw__raw.html#ga3292b7ed2271ac29983edcef16dcbc11',1,'raw_new_ip_type(u8_t type, u8_t proto): raw.c'],['../group__raw__raw.html#ga3292b7ed2271ac29983edcef16dcbc11',1,'raw_new_ip_type(u8_t type, u8_t proto): raw.c']]], + ['raw_5frecv',['raw_recv',['../group__raw__raw.html#gadf84e4e6911ce3c0d7f5669b6edac426',1,'raw_recv(struct raw_pcb *pcb, raw_recv_fn recv, void *recv_arg): raw.c'],['../group__raw__raw.html#gadf84e4e6911ce3c0d7f5669b6edac426',1,'raw_recv(struct raw_pcb *pcb, raw_recv_fn recv, void *recv_arg): raw.c']]], + ['raw_5fremove',['raw_remove',['../group__raw__raw.html#ga8db62f7d75f722a653b5368305a47e16',1,'raw_remove(struct raw_pcb *pcb): raw.c'],['../group__raw__raw.html#ga8db62f7d75f722a653b5368305a47e16',1,'raw_remove(struct raw_pcb *pcb): raw.c']]], + ['raw_5fsend',['raw_send',['../group__raw__raw.html#gabbc2e7c7a1b4429f420562d4f31b3a9d',1,'raw_send(struct raw_pcb *pcb, struct pbuf *p): raw.c'],['../group__raw__raw.html#gabbc2e7c7a1b4429f420562d4f31b3a9d',1,'raw_send(struct raw_pcb *pcb, struct pbuf *p): raw.c']]], + ['raw_5fsendto',['raw_sendto',['../group__raw__raw.html#ga09427456070fb610cc7795d23dedc159',1,'raw_sendto(struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *ipaddr): raw.c'],['../group__raw__raw.html#ga09427456070fb610cc7795d23dedc159',1,'raw_sendto(struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *ipaddr): raw.c']]], + ['raw_5fsendto_5fif_5fsrc',['raw_sendto_if_src',['../group__raw__raw.html#ga2fe3765ae938a3f7c53dc7051b7ab0b1',1,'raw_sendto_if_src(struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, struct netif *netif, const ip_addr_t *src_ip): raw.c'],['../group__raw__raw.html#ga2fe3765ae938a3f7c53dc7051b7ab0b1',1,'raw_sendto_if_src(struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, struct netif *netif, const ip_addr_t *src_ip): raw.c']]], + ['rfc7668_5fif_5finit',['rfc7668_if_init',['../group__rfc7668if.html#ga3d940376bd983c14ffcc8d2580f3bdde',1,'rfc7668_if_init(struct netif *netif): lowpan6_ble.c'],['../group__rfc7668if.html#ga3d940376bd983c14ffcc8d2580f3bdde',1,'rfc7668_if_init(struct netif *netif): lowpan6_ble.c']]], + ['rfc7668_5finput',['rfc7668_input',['../group__rfc7668if.html#ga1d9d7aff9f2f0515f761be0802178197',1,'rfc7668_input(struct pbuf *p, struct netif *netif): lowpan6_ble.c'],['../group__rfc7668if.html#ga1d9d7aff9f2f0515f761be0802178197',1,'rfc7668_input(struct pbuf *p, struct netif *netif): lowpan6_ble.c']]], + ['rfc7668_5foutput',['rfc7668_output',['../group__rfc7668if.html#ga22930ade4e77b3195fe59949834d85f0',1,'rfc7668_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr): lowpan6_ble.c'],['../group__rfc7668if.html#ga22930ade4e77b3195fe59949834d85f0',1,'rfc7668_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr): lowpan6_ble.c']]], + ['rfc7668_5fset_5fcontext',['rfc7668_set_context',['../group__rfc7668if.html#ga29dc0ebb8e640b64a57008b940fbca1e',1,'rfc7668_set_context(u8_t index, const ip6_addr_t *context): lowpan6_ble.c'],['../group__rfc7668if.html#ga29dc0ebb8e640b64a57008b940fbca1e',1,'rfc7668_set_context(u8_t idx, const ip6_addr_t *context): lowpan6_ble.c']]], + ['rfc7668_5fset_5flocal_5faddr_5feui64',['rfc7668_set_local_addr_eui64',['../lowpan6__ble_8h.html#a9c5b721f6fb28b4c999baab56a65d8e2',1,'rfc7668_set_local_addr_eui64(struct netif *netif, const u8_t *local_addr, size_t local_addr_len): lowpan6_ble.c'],['../lowpan6__ble_8c.html#a9c5b721f6fb28b4c999baab56a65d8e2',1,'rfc7668_set_local_addr_eui64(struct netif *netif, const u8_t *local_addr, size_t local_addr_len): lowpan6_ble.c']]], + ['rfc7668_5fset_5flocal_5faddr_5fmac48',['rfc7668_set_local_addr_mac48',['../lowpan6__ble_8h.html#a53d4e8096dd714f94c69d67a6cd49ac2',1,'rfc7668_set_local_addr_mac48(struct netif *netif, const u8_t *local_addr, size_t local_addr_len, int is_public_addr): lowpan6_ble.c'],['../lowpan6__ble_8c.html#a53d4e8096dd714f94c69d67a6cd49ac2',1,'rfc7668_set_local_addr_mac48(struct netif *netif, const u8_t *local_addr, size_t local_addr_len, int is_public_addr): lowpan6_ble.c']]], + ['rfc7668_5fset_5fpeer_5faddr_5feui64',['rfc7668_set_peer_addr_eui64',['../lowpan6__ble_8h.html#a01b797f4fde59dfb803f0299e6a49593',1,'rfc7668_set_peer_addr_eui64(struct netif *netif, const u8_t *peer_addr, size_t peer_addr_len): lowpan6_ble.c'],['../lowpan6__ble_8c.html#a01b797f4fde59dfb803f0299e6a49593',1,'rfc7668_set_peer_addr_eui64(struct netif *netif, const u8_t *peer_addr, size_t peer_addr_len): lowpan6_ble.c']]], + ['rfc7668_5fset_5fpeer_5faddr_5fmac48',['rfc7668_set_peer_addr_mac48',['../lowpan6__ble_8h.html#a437b9f9e85be644bd7b939413e3c81d0',1,'rfc7668_set_peer_addr_mac48(struct netif *netif, const u8_t *peer_addr, size_t peer_addr_len, int is_public_addr): lowpan6_ble.c'],['../lowpan6__ble_8c.html#a437b9f9e85be644bd7b939413e3c81d0',1,'rfc7668_set_peer_addr_mac48(struct netif *netif, const u8_t *peer_addr, size_t peer_addr_len, int is_public_addr): lowpan6_ble.c']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_b.html b/Libraries/LwIP/doc/doxygen/output/html/search/functions_b.html new file mode 100644 index 0000000..172ea1b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_b.js b/Libraries/LwIP/doc/doxygen/output/html/search/functions_b.js new file mode 100644 index 0000000..3408c5b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_b.js @@ -0,0 +1,120 @@ +var searchData= +[ + ['slipif_5finit',['slipif_init',['../group__slipif.html#ga687973ba82dab13a5b9d38d7399aeee3',1,'slipif_init(struct netif *netif): slipif.c'],['../group__slipif.html#ga687973ba82dab13a5b9d38d7399aeee3',1,'slipif_init(struct netif *netif): slipif.c']]], + ['slipif_5fpoll',['slipif_poll',['../group__slipif.html#ga7b036fd1cde9b299139cac62f52d15a6',1,'slipif_poll(struct netif *netif): slipif.c'],['../group__slipif.html#ga7b036fd1cde9b299139cac62f52d15a6',1,'slipif_poll(struct netif *netif): slipif.c']]], + ['slipif_5fprocess_5frxqueue',['slipif_process_rxqueue',['../group__slipif.html#gae135be7d61e5bb49ab72476b0aa70946',1,'slipif_process_rxqueue(struct netif *netif): slipif.c'],['../group__slipif.html#gae135be7d61e5bb49ab72476b0aa70946',1,'slipif_process_rxqueue(struct netif *netif): slipif.c']]], + ['slipif_5freceived_5fbyte',['slipif_received_byte',['../group__slipif.html#ga3f2f5e2fa4a816dc27a46f3ee91cf1b3',1,'slipif_received_byte(struct netif *netif, u8_t data): slipif.c'],['../group__slipif.html#ga3f2f5e2fa4a816dc27a46f3ee91cf1b3',1,'slipif_received_byte(struct netif *netif, u8_t data): slipif.c']]], + ['slipif_5freceived_5fbytes',['slipif_received_bytes',['../group__slipif.html#gabbee48569a513c90fe154632038eb6d6',1,'slipif_received_bytes(struct netif *netif, u8_t *data, u8_t len): slipif.c'],['../group__slipif.html#gabbee48569a513c90fe154632038eb6d6',1,'slipif_received_bytes(struct netif *netif, u8_t *data, u8_t len): slipif.c']]], + ['smtp_5fsend_5fmail',['smtp_send_mail',['../group__smtp.html#gae43119480c4146df9eeff7ae80c767f7',1,'smtp_send_mail(const char *from, const char *to, const char *subject, const char *body, smtp_result_fn callback_fn, void *callback_arg): smtp.c'],['../group__smtp.html#gae43119480c4146df9eeff7ae80c767f7',1,'smtp_send_mail(const char *from, const char *to, const char *subject, const char *body, smtp_result_fn callback_fn, void *callback_arg): smtp.c']]], + ['smtp_5fsend_5fmail_5fint',['smtp_send_mail_int',['../group__smtp.html#gaa9331cc8c6d73a8cd7e6e4466aca9243',1,'smtp_send_mail_int(void *arg): smtp.c'],['../group__smtp.html#gaa9331cc8c6d73a8cd7e6e4466aca9243',1,'smtp_send_mail_int(void *arg): smtp.c']]], + ['smtp_5fsend_5fmail_5fstatic',['smtp_send_mail_static',['../group__smtp.html#ga06f6582701def2a62582373bb0be5788',1,'smtp_send_mail_static(const char *from, const char *to, const char *subject, const char *body, smtp_result_fn callback_fn, void *callback_arg): smtp.c'],['../group__smtp.html#ga06f6582701def2a62582373bb0be5788',1,'smtp_send_mail_static(const char *from, const char *to, const char *subject, const char *body, smtp_result_fn callback_fn, void *callback_arg): smtp.c']]], + ['smtp_5fset_5fauth',['smtp_set_auth',['../group__smtp.html#ga79567a5a75e048a6b8addb5b038fc899',1,'smtp_set_auth(const char *username, const char *pass): smtp.c'],['../group__smtp.html#ga79567a5a75e048a6b8addb5b038fc899',1,'smtp_set_auth(const char *username, const char *pass): smtp.c']]], + ['smtp_5fset_5fserver_5faddr',['smtp_set_server_addr',['../group__smtp.html#ga1ccf4305461ec16cf41599341ec54983',1,'smtp_set_server_addr(const char *server): smtp.c'],['../group__smtp.html#ga1ccf4305461ec16cf41599341ec54983',1,'smtp_set_server_addr(const char *server): smtp.c']]], + ['smtp_5fset_5fserver_5fport',['smtp_set_server_port',['../group__smtp.html#ga4b0606e7ad64d8215cebbea43f08759f',1,'smtp_set_server_port(u16_t port): smtp.c'],['../group__smtp.html#ga4b0606e7ad64d8215cebbea43f08759f',1,'smtp_set_server_port(u16_t port): smtp.c']]], + ['smtp_5fset_5ftls_5fconfig',['smtp_set_tls_config',['../group__smtp.html#gae72a8a0ec42ecae1be401978e224c39e',1,'smtp_set_tls_config(struct altcp_tls_config *tls_config): smtp.c'],['../group__smtp.html#gae72a8a0ec42ecae1be401978e224c39e',1,'smtp_set_tls_config(struct altcp_tls_config *tls_config): smtp.c']]], + ['snmp_5fans1_5fenc_5ftlv',['snmp_ans1_enc_tlv',['../snmp__asn1_8c.html#af8e905a214936995d235789f359cf015',1,'snmp_ans1_enc_tlv(struct snmp_pbuf_stream *pbuf_stream, struct snmp_asn1_tlv *tlv): snmp_asn1.c'],['../snmp__asn1_8h.html#af8e905a214936995d235789f359cf015',1,'snmp_ans1_enc_tlv(struct snmp_pbuf_stream *pbuf_stream, struct snmp_asn1_tlv *tlv): snmp_asn1.c']]], + ['snmp_5fasn1_5fdec_5foid',['snmp_asn1_dec_oid',['../snmp__asn1_8c.html#a8bb84ec51c46a890b7ced016043b2908',1,'snmp_asn1_dec_oid(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u32_t *oid, u8_t *oid_len, u8_t oid_max_len): snmp_asn1.c'],['../snmp__asn1_8h.html#a8bb84ec51c46a890b7ced016043b2908',1,'snmp_asn1_dec_oid(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u32_t *oid, u8_t *oid_len, u8_t oid_max_len): snmp_asn1.c']]], + ['snmp_5fasn1_5fdec_5fraw',['snmp_asn1_dec_raw',['../snmp__asn1_8c.html#a31055a35285214ea0d4ad60c64c2f73e',1,'snmp_asn1_dec_raw(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u8_t *buf, u16_t *buf_len, u16_t buf_max_len): snmp_asn1.c'],['../snmp__asn1_8h.html#a31055a35285214ea0d4ad60c64c2f73e',1,'snmp_asn1_dec_raw(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u8_t *buf, u16_t *buf_len, u16_t buf_max_len): snmp_asn1.c']]], + ['snmp_5fasn1_5fdec_5fs32t',['snmp_asn1_dec_s32t',['../snmp__asn1_8c.html#a51d36daf2935c246eb55fb749581e2bb',1,'snmp_asn1_dec_s32t(struct snmp_pbuf_stream *pbuf_stream, u16_t len, s32_t *value): snmp_asn1.c'],['../snmp__asn1_8h.html#a51d36daf2935c246eb55fb749581e2bb',1,'snmp_asn1_dec_s32t(struct snmp_pbuf_stream *pbuf_stream, u16_t len, s32_t *value): snmp_asn1.c']]], + ['snmp_5fasn1_5fdec_5ftlv',['snmp_asn1_dec_tlv',['../snmp__asn1_8c.html#a7e3f63b155b06f7ade627060b55e4496',1,'snmp_asn1_dec_tlv(struct snmp_pbuf_stream *pbuf_stream, struct snmp_asn1_tlv *tlv): snmp_asn1.c'],['../snmp__asn1_8h.html#a7e3f63b155b06f7ade627060b55e4496',1,'snmp_asn1_dec_tlv(struct snmp_pbuf_stream *pbuf_stream, struct snmp_asn1_tlv *tlv): snmp_asn1.c']]], + ['snmp_5fasn1_5fdec_5fu32t',['snmp_asn1_dec_u32t',['../snmp__asn1_8c.html#ac04e08c19c40cfc3333a181018887a51',1,'snmp_asn1_dec_u32t(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u32_t *value): snmp_asn1.c'],['../snmp__asn1_8h.html#ac04e08c19c40cfc3333a181018887a51',1,'snmp_asn1_dec_u32t(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u32_t *value): snmp_asn1.c']]], + ['snmp_5fasn1_5fenc_5flength_5fcnt',['snmp_asn1_enc_length_cnt',['../snmp__asn1_8c.html#a20343aef4524459a2b45704e18ef520d',1,'snmp_asn1_enc_length_cnt(u16_t length, u8_t *octets_needed): snmp_asn1.c'],['../snmp__asn1_8h.html#a20343aef4524459a2b45704e18ef520d',1,'snmp_asn1_enc_length_cnt(u16_t length, u8_t *octets_needed): snmp_asn1.c']]], + ['snmp_5fasn1_5fenc_5foid',['snmp_asn1_enc_oid',['../snmp__asn1_8c.html#aa71260abd46fc2f682874016896fe218',1,'snmp_asn1_enc_oid(struct snmp_pbuf_stream *pbuf_stream, const u32_t *oid, u16_t oid_len): snmp_asn1.c'],['../snmp__asn1_8h.html#aa71260abd46fc2f682874016896fe218',1,'snmp_asn1_enc_oid(struct snmp_pbuf_stream *pbuf_stream, const u32_t *oid, u16_t oid_len): snmp_asn1.c']]], + ['snmp_5fasn1_5fenc_5foid_5fcnt',['snmp_asn1_enc_oid_cnt',['../snmp__asn1_8c.html#ab6fd58c1b41cb98117f00a11db7d226f',1,'snmp_asn1_enc_oid_cnt(const u32_t *oid, u16_t oid_len, u16_t *octets_needed): snmp_asn1.c'],['../snmp__asn1_8h.html#ab6fd58c1b41cb98117f00a11db7d226f',1,'snmp_asn1_enc_oid_cnt(const u32_t *oid, u16_t oid_len, u16_t *octets_needed): snmp_asn1.c']]], + ['snmp_5fasn1_5fenc_5fraw',['snmp_asn1_enc_raw',['../snmp__asn1_8c.html#a167b707051bbbeafea14eeca72449ac6',1,'snmp_asn1_enc_raw(struct snmp_pbuf_stream *pbuf_stream, const u8_t *raw, u16_t raw_len): snmp_asn1.c'],['../snmp__asn1_8h.html#a167b707051bbbeafea14eeca72449ac6',1,'snmp_asn1_enc_raw(struct snmp_pbuf_stream *pbuf_stream, const u8_t *raw, u16_t raw_len): snmp_asn1.c']]], + ['snmp_5fasn1_5fenc_5fs32t',['snmp_asn1_enc_s32t',['../snmp__asn1_8c.html#a25b3fe21becd08260ec56bef9299d3c6',1,'snmp_asn1_enc_s32t(struct snmp_pbuf_stream *pbuf_stream, u16_t octets_needed, s32_t value): snmp_asn1.c'],['../snmp__asn1_8h.html#a25b3fe21becd08260ec56bef9299d3c6',1,'snmp_asn1_enc_s32t(struct snmp_pbuf_stream *pbuf_stream, u16_t octets_needed, s32_t value): snmp_asn1.c']]], + ['snmp_5fasn1_5fenc_5fs32t_5fcnt',['snmp_asn1_enc_s32t_cnt',['../snmp__asn1_8c.html#a8c74914532f1e0c219dfb1977fd0c22f',1,'snmp_asn1_enc_s32t_cnt(s32_t value, u16_t *octets_needed): snmp_asn1.c'],['../snmp__asn1_8h.html#a8c74914532f1e0c219dfb1977fd0c22f',1,'snmp_asn1_enc_s32t_cnt(s32_t value, u16_t *octets_needed): snmp_asn1.c']]], + ['snmp_5fasn1_5fenc_5fu32t',['snmp_asn1_enc_u32t',['../snmp__asn1_8c.html#aa54b4ee3c58ef66721df96fd8b1f66b2',1,'snmp_asn1_enc_u32t(struct snmp_pbuf_stream *pbuf_stream, u16_t octets_needed, u32_t value): snmp_asn1.c'],['../snmp__asn1_8h.html#aa54b4ee3c58ef66721df96fd8b1f66b2',1,'snmp_asn1_enc_u32t(struct snmp_pbuf_stream *pbuf_stream, u16_t octets_needed, u32_t value): snmp_asn1.c']]], + ['snmp_5fasn1_5fenc_5fu32t_5fcnt',['snmp_asn1_enc_u32t_cnt',['../snmp__asn1_8c.html#a58965e0305884d550786440c84119ad4',1,'snmp_asn1_enc_u32t_cnt(u32_t value, u16_t *octets_needed): snmp_asn1.c'],['../snmp__asn1_8h.html#a58965e0305884d550786440c84119ad4',1,'snmp_asn1_enc_u32t_cnt(u32_t value, u16_t *octets_needed): snmp_asn1.c']]], + ['snmp_5fauthfail_5ftrap',['snmp_authfail_trap',['../group__snmp__traps.html#gaf6d0a95a3a406d8ea00849c07aca05ee',1,'snmp_authfail_trap(void): snmp_traps.c'],['../group__snmp__traps.html#gaf6d0a95a3a406d8ea00849c07aca05ee',1,'snmp_authfail_trap(void): snmp_traps.c']]], + ['snmp_5fcoldstart_5ftrap',['snmp_coldstart_trap',['../group__snmp__traps.html#gaa8a49d1a6a207740ba44e27b5bbc22be',1,'snmp_coldstart_trap(void): snmp_traps.c'],['../group__snmp__traps.html#gaa8a49d1a6a207740ba44e27b5bbc22be',1,'snmp_coldstart_trap(void): snmp_traps.c']]], + ['snmp_5fdecode_5fbits',['snmp_decode_bits',['../snmp__core_8c.html#ad3ab34b13bb9fcc757c8d366fe520fdc',1,'snmp_decode_bits(const u8_t *buf, u32_t buf_len, u32_t *bit_value): snmp_core.c'],['../snmp__core_8h.html#ad3ab34b13bb9fcc757c8d366fe520fdc',1,'snmp_decode_bits(const u8_t *buf, u32_t buf_len, u32_t *bit_value): snmp_core.c']]], + ['snmp_5fencode_5fbits',['snmp_encode_bits',['../snmp__core_8c.html#ae6f5d0c38a7ec164a67fa55c87f1de03',1,'snmp_encode_bits(u8_t *buf, u32_t buf_len, u32_t bit_value, u8_t bit_count): snmp_core.c'],['../snmp__core_8h.html#ae6f5d0c38a7ec164a67fa55c87f1de03',1,'snmp_encode_bits(u8_t *buf, u32_t buf_len, u32_t bit_value, u8_t bit_count): snmp_core.c']]], + ['snmp_5fget_5fauth_5ftraps_5fenabled',['snmp_get_auth_traps_enabled',['../group__snmp__traps.html#ga7804a22615bd9b3a323a3f48a9fb8cb7',1,'snmp_get_auth_traps_enabled(void): snmp_traps.c'],['../group__snmp__traps.html#ga7804a22615bd9b3a323a3f48a9fb8cb7',1,'snmp_get_auth_traps_enabled(void): snmp_traps.c']]], + ['snmp_5fget_5fcommunity',['snmp_get_community',['../group__snmp__core.html#gacf277cbca915275190426aeef4cfb103',1,'snmp_get_community(void): snmp_msg.c'],['../group__snmp__core.html#gacf277cbca915275190426aeef4cfb103',1,'snmp_get_community(void): snmp_msg.c']]], + ['snmp_5fget_5fcommunity_5ftrap',['snmp_get_community_trap',['../group__snmp__traps.html#gafdd3299e145f53cc826cc11a469f8409',1,'snmp_get_community_trap(void): snmp_msg.c'],['../group__snmp__traps.html#gafdd3299e145f53cc826cc11a469f8409',1,'snmp_get_community_trap(void): snmp_msg.c']]], + ['snmp_5fget_5fcommunity_5fwrite',['snmp_get_community_write',['../group__snmp__core.html#gaba31b6f1816661df5a3b7f2076ee6ec0',1,'snmp_get_community_write(void): snmp_msg.c'],['../group__snmp__core.html#gaba31b6f1816661df5a3b7f2076ee6ec0',1,'snmp_get_community_write(void): snmp_msg.c']]], + ['snmp_5fget_5fdevice_5fenterprise_5foid',['snmp_get_device_enterprise_oid',['../group__snmp__core.html#ga4dff82dda2553b9554a9f98561852a50',1,'snmp_get_device_enterprise_oid(void): snmp_core.c'],['../group__snmp__core.html#ga4dff82dda2553b9554a9f98561852a50',1,'snmp_get_device_enterprise_oid(void): snmp_core.c']]], + ['snmp_5finit',['snmp_init',['../snmp__netconn_8c.html#ga4d88f2fc7655280384131d543e0d83e5',1,'snmp_init(void): snmp_netconn.c'],['../group__snmp__core.html#ga4d88f2fc7655280384131d543e0d83e5',1,'snmp_init(void): snmp_raw.c']]], + ['snmp_5fip4_5fto_5foid',['snmp_ip4_to_oid',['../snmp__core_8c.html#a4e01d395f0c8c38c2b5b681047969da1',1,'snmp_ip4_to_oid(const ip4_addr_t *ip, u32_t *oid): snmp_core.c'],['../snmp__core_8h.html#a4e01d395f0c8c38c2b5b681047969da1',1,'snmp_ip4_to_oid(const ip4_addr_t *ip, u32_t *oid): snmp_core.c']]], + ['snmp_5fip6_5fto_5foid',['snmp_ip6_to_oid',['../snmp__core_8c.html#af1f327eef86765cce0253c94ec3c5ce9',1,'snmp_ip6_to_oid(const ip6_addr_t *ip, u32_t *oid): snmp_core.c'],['../snmp__core_8h.html#af1f327eef86765cce0253c94ec3c5ce9',1,'snmp_ip6_to_oid(const ip6_addr_t *ip, u32_t *oid): snmp_core.c']]], + ['snmp_5fip_5fport_5fto_5foid',['snmp_ip_port_to_oid',['../snmp__core_8c.html#a53b01262de3d1c52faf88dd4bb702a27',1,'snmp_ip_port_to_oid(const ip_addr_t *ip, u16_t port, u32_t *oid): snmp_core.c'],['../snmp__core_8h.html#a53b01262de3d1c52faf88dd4bb702a27',1,'snmp_ip_port_to_oid(const ip_addr_t *ip, u16_t port, u32_t *oid): snmp_core.c']]], + ['snmp_5fip_5fto_5foid',['snmp_ip_to_oid',['../snmp__core_8c.html#a909ed1b0da526a0acdf6fa57a06f351e',1,'snmp_ip_to_oid(const ip_addr_t *ip, u32_t *oid): snmp_core.c'],['../snmp__core_8h.html#a909ed1b0da526a0acdf6fa57a06f351e',1,'snmp_ip_to_oid(const ip_addr_t *ip, u32_t *oid): snmp_core.c']]], + ['snmp_5fmib2_5fset_5fsyscontact',['snmp_mib2_set_syscontact',['../group__snmp__mib2.html#gaf96002d9d10bcae27a95b2367674249e',1,'snmp_mib2_set_syscontact(u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize): snmp_mib2_system.c'],['../group__snmp__mib2.html#gaf96002d9d10bcae27a95b2367674249e',1,'snmp_mib2_set_syscontact(u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize): snmp_mib2_system.c']]], + ['snmp_5fmib2_5fset_5fsyscontact_5freadonly',['snmp_mib2_set_syscontact_readonly',['../group__snmp__mib2.html#ga53339a03d720c745790837905bc2171a',1,'snmp_mib2_set_syscontact_readonly(const u8_t *ocstr, const u16_t *ocstrlen): snmp_mib2_system.c'],['../group__snmp__mib2.html#ga53339a03d720c745790837905bc2171a',1,'snmp_mib2_set_syscontact_readonly(const u8_t *ocstr, const u16_t *ocstrlen): snmp_mib2_system.c']]], + ['snmp_5fmib2_5fset_5fsysdescr',['snmp_mib2_set_sysdescr',['../group__snmp__mib2.html#gacde87dc1d3bd669b19d834b028f490cc',1,'snmp_mib2_set_sysdescr(const u8_t *str, const u16_t *len): snmp_mib2_system.c'],['../group__snmp__mib2.html#gacde87dc1d3bd669b19d834b028f490cc',1,'snmp_mib2_set_sysdescr(const u8_t *str, const u16_t *len): snmp_mib2_system.c']]], + ['snmp_5fmib2_5fset_5fsyslocation',['snmp_mib2_set_syslocation',['../group__snmp__mib2.html#ga4248e004a27344b7260574c3a51882f2',1,'snmp_mib2_set_syslocation(u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize): snmp_mib2_system.c'],['../group__snmp__mib2.html#ga4248e004a27344b7260574c3a51882f2',1,'snmp_mib2_set_syslocation(u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize): snmp_mib2_system.c']]], + ['snmp_5fmib2_5fset_5fsyslocation_5freadonly',['snmp_mib2_set_syslocation_readonly',['../group__snmp__mib2.html#gac1759d5b0640943697be2ad538325267',1,'snmp_mib2_set_syslocation_readonly(const u8_t *ocstr, const u16_t *ocstrlen): snmp_mib2_system.c'],['../group__snmp__mib2.html#gac1759d5b0640943697be2ad538325267',1,'snmp_mib2_set_syslocation_readonly(const u8_t *ocstr, const u16_t *ocstrlen): snmp_mib2_system.c']]], + ['snmp_5fmib2_5fset_5fsysname',['snmp_mib2_set_sysname',['../group__snmp__mib2.html#gae7ce98a6ecc0bb92aaa2b330599a2db7',1,'snmp_mib2_set_sysname(u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize): snmp_mib2_system.c'],['../group__snmp__mib2.html#gae7ce98a6ecc0bb92aaa2b330599a2db7',1,'snmp_mib2_set_sysname(u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize): snmp_mib2_system.c']]], + ['snmp_5fmib2_5fset_5fsysname_5freadonly',['snmp_mib2_set_sysname_readonly',['../group__snmp__mib2.html#gab95eb687492fa0e7d762f911c442bdc5',1,'snmp_mib2_set_sysname_readonly(const u8_t *ocstr, const u16_t *ocstrlen): snmp_mib2_system.c'],['../group__snmp__mib2.html#gab95eb687492fa0e7d762f911c442bdc5',1,'snmp_mib2_set_sysname_readonly(const u8_t *ocstr, const u16_t *ocstrlen): snmp_mib2_system.c']]], + ['snmp_5fmib_5ftree_5fresolve_5fexact',['snmp_mib_tree_resolve_exact',['../snmp__core_8c.html#af42d6d2732a92017a43b83a07609fd1a',1,'snmp_core.c']]], + ['snmp_5fnext_5foid_5fcheck',['snmp_next_oid_check',['../snmp__core_8c.html#a18126b2b13f267306c27e851e9379983',1,'snmp_next_oid_check(struct snmp_next_oid_state *state, const u32_t *oid, u8_t oid_len, void *reference): snmp_core.c'],['../snmp__core_8h.html#a18126b2b13f267306c27e851e9379983',1,'snmp_next_oid_check(struct snmp_next_oid_state *state, const u32_t *oid, u8_t oid_len, void *reference): snmp_core.c']]], + ['snmp_5fnext_5foid_5finit',['snmp_next_oid_init',['../snmp__core_8c.html#a8074765d5c2b809561f032d35e59e213',1,'snmp_next_oid_init(struct snmp_next_oid_state *state, const u32_t *start_oid, u8_t start_oid_len, u32_t *next_oid_buf, u8_t next_oid_max_len): snmp_core.c'],['../snmp__core_8h.html#a8074765d5c2b809561f032d35e59e213',1,'snmp_next_oid_init(struct snmp_next_oid_state *state, const u32_t *start_oid, u8_t start_oid_len, u32_t *next_oid_buf, u8_t next_oid_max_len): snmp_core.c']]], + ['snmp_5fnext_5foid_5fprecheck',['snmp_next_oid_precheck',['../snmp__core_8c.html#a9768ecf81f01880dbf1cc1933bd9e60a',1,'snmp_next_oid_precheck(struct snmp_next_oid_state *state, const u32_t *oid, u8_t oid_len): snmp_core.c'],['../snmp__core_8h.html#a9768ecf81f01880dbf1cc1933bd9e60a',1,'snmp_next_oid_precheck(struct snmp_next_oid_state *state, const u32_t *oid, u8_t oid_len): snmp_core.c']]], + ['snmp_5foid_5fappend',['snmp_oid_append',['../snmp__core_8c.html#a5aa6c8dbfc93235b160afaf3a40c1c93',1,'snmp_oid_append(struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len): snmp_core.c'],['../snmp__core_8h.html#a5aa6c8dbfc93235b160afaf3a40c1c93',1,'snmp_oid_append(struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len): snmp_core.c']]], + ['snmp_5foid_5fassign',['snmp_oid_assign',['../snmp__core_8c.html#a41fd5e854d809499e28c66b4918481a6',1,'snmp_oid_assign(struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len): snmp_core.c'],['../snmp__core_8h.html#a41fd5e854d809499e28c66b4918481a6',1,'snmp_oid_assign(struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len): snmp_core.c']]], + ['snmp_5foid_5fcombine',['snmp_oid_combine',['../snmp__core_8c.html#a6edcb88d8162544333bcede301cf0904',1,'snmp_oid_combine(struct snmp_obj_id *target, const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len): snmp_core.c'],['../snmp__core_8h.html#a6edcb88d8162544333bcede301cf0904',1,'snmp_oid_combine(struct snmp_obj_id *target, const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len): snmp_core.c']]], + ['snmp_5foid_5fcompare',['snmp_oid_compare',['../snmp__core_8c.html#af041ab415e8063097c79be2b892174f8',1,'snmp_oid_compare(const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len): snmp_core.c'],['../snmp__core_8h.html#af041ab415e8063097c79be2b892174f8',1,'snmp_oid_compare(const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len): snmp_core.c']]], + ['snmp_5foid_5fequal',['snmp_oid_equal',['../snmp__core_8c.html#ac2b6821b3d4a25033433fc25ffd74c9e',1,'snmp_oid_equal(const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len): snmp_core.c'],['../snmp__core_8h.html#ac2b6821b3d4a25033433fc25ffd74c9e',1,'snmp_oid_equal(const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len): snmp_core.c']]], + ['snmp_5foid_5fin_5frange',['snmp_oid_in_range',['../snmp__core_8c.html#a5275903be5948b1c28bfadb365823504',1,'snmp_oid_in_range(const u32_t *oid_in, u8_t oid_len, const struct snmp_oid_range *oid_ranges, u8_t oid_ranges_len): snmp_core.c'],['../snmp__core_8h.html#a5275903be5948b1c28bfadb365823504',1,'snmp_oid_in_range(const u32_t *oid_in, u8_t oid_len, const struct snmp_oid_range *oid_ranges, u8_t oid_ranges_len): snmp_core.c']]], + ['snmp_5foid_5fprefix',['snmp_oid_prefix',['../snmp__core_8c.html#a32256b37b211b4f59d8f114cee364f39',1,'snmp_oid_prefix(struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len): snmp_core.c'],['../snmp__core_8h.html#a32256b37b211b4f59d8f114cee364f39',1,'snmp_oid_prefix(struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len): snmp_core.c']]], + ['snmp_5foid_5fto_5fip',['snmp_oid_to_ip',['../snmp__core_8c.html#a66aac86af921cd8aecb95eb252eb3e84',1,'snmp_oid_to_ip(const u32_t *oid, u8_t oid_len, ip_addr_t *ip): snmp_core.c'],['../snmp__core_8h.html#a66aac86af921cd8aecb95eb252eb3e84',1,'snmp_oid_to_ip(const u32_t *oid, u8_t oid_len, ip_addr_t *ip): snmp_core.c']]], + ['snmp_5foid_5fto_5fip4',['snmp_oid_to_ip4',['../snmp__core_8c.html#a095efcd4202782e57625d7b1afcdbf77',1,'snmp_oid_to_ip4(const u32_t *oid, ip4_addr_t *ip): snmp_core.c'],['../snmp__core_8h.html#a095efcd4202782e57625d7b1afcdbf77',1,'snmp_oid_to_ip4(const u32_t *oid, ip4_addr_t *ip): snmp_core.c']]], + ['snmp_5foid_5fto_5fip6',['snmp_oid_to_ip6',['../snmp__core_8c.html#aa1b651a1faf6f1ee0dfdbea48310ed09',1,'snmp_oid_to_ip6(const u32_t *oid, ip6_addr_t *ip): snmp_core.c'],['../snmp__core_8h.html#aa1b651a1faf6f1ee0dfdbea48310ed09',1,'snmp_oid_to_ip6(const u32_t *oid, ip6_addr_t *ip): snmp_core.c']]], + ['snmp_5foid_5fto_5fip_5fport',['snmp_oid_to_ip_port',['../snmp__core_8c.html#a21f02b239cc9abae586f5ef92923e507',1,'snmp_oid_to_ip_port(const u32_t *oid, u8_t oid_len, ip_addr_t *ip, u16_t *port): snmp_core.c'],['../snmp__core_8h.html#a21f02b239cc9abae586f5ef92923e507',1,'snmp_oid_to_ip_port(const u32_t *oid, u8_t oid_len, ip_addr_t *ip, u16_t *port): snmp_core.c']]], + ['snmp_5fsend_5ftrap',['snmp_send_trap',['../group__snmp__traps.html#ga96cc7af0118d75049609872ea41187cd',1,'snmp_send_trap(const struct snmp_obj_id *eoid, s32_t generic_trap, s32_t specific_trap, struct snmp_varbind *varbinds): snmp_traps.c'],['../group__snmp__traps.html#ga96cc7af0118d75049609872ea41187cd',1,'snmp_send_trap(const struct snmp_obj_id *oid, s32_t generic_trap, s32_t specific_trap, struct snmp_varbind *varbinds): snmp_traps.c']]], + ['snmp_5fsend_5ftrap_5fgeneric',['snmp_send_trap_generic',['../group__snmp__traps.html#ga0e044259289cb690197173f93c17607d',1,'snmp_send_trap_generic(s32_t generic_trap): snmp_traps.c'],['../group__snmp__traps.html#ga0e044259289cb690197173f93c17607d',1,'snmp_send_trap_generic(s32_t generic_trap): snmp_traps.c']]], + ['snmp_5fsend_5ftrap_5fspecific',['snmp_send_trap_specific',['../group__snmp__traps.html#ga56bdce04e9e77cb3f8a872718cd273d1',1,'snmp_send_trap_specific(s32_t specific_trap, struct snmp_varbind *varbinds): snmp_traps.c'],['../group__snmp__traps.html#ga56bdce04e9e77cb3f8a872718cd273d1',1,'snmp_send_trap_specific(s32_t specific_trap, struct snmp_varbind *varbinds): snmp_traps.c']]], + ['snmp_5fset_5fauth_5ftraps_5fenabled',['snmp_set_auth_traps_enabled',['../group__snmp__traps.html#gacaf816ff917f7b7e5d00ed6c9f79b51c',1,'snmp_set_auth_traps_enabled(u8_t enable): snmp_traps.c'],['../group__snmp__traps.html#gacaf816ff917f7b7e5d00ed6c9f79b51c',1,'snmp_set_auth_traps_enabled(u8_t enable): snmp_traps.c']]], + ['snmp_5fset_5fcommunity',['snmp_set_community',['../group__snmp__core.html#ga30cc587a260757fdb2b81d462f430ef1',1,'snmp_set_community(const char *const community): snmp_msg.c'],['../group__snmp__core.html#ga30cc587a260757fdb2b81d462f430ef1',1,'snmp_set_community(const char *const community): snmp_msg.c']]], + ['snmp_5fset_5fcommunity_5ftrap',['snmp_set_community_trap',['../group__snmp__traps.html#ga5631711f357b6610be7e93b1c6d87760',1,'snmp_set_community_trap(const char *const community): snmp_msg.c'],['../group__snmp__traps.html#ga5631711f357b6610be7e93b1c6d87760',1,'snmp_set_community_trap(const char *const community): snmp_msg.c']]], + ['snmp_5fset_5fcommunity_5fwrite',['snmp_set_community_write',['../group__snmp__core.html#ga341461766863cff46a44e5f431f2da01',1,'snmp_set_community_write(const char *const community): snmp_msg.c'],['../group__snmp__core.html#ga341461766863cff46a44e5f431f2da01',1,'snmp_set_community_write(const char *const community): snmp_msg.c']]], + ['snmp_5fset_5fdevice_5fenterprise_5foid',['snmp_set_device_enterprise_oid',['../group__snmp__core.html#gacc71ac857bf9215f06a624dda09abe3a',1,'snmp_set_device_enterprise_oid(const struct snmp_obj_id *device_enterprise_oid): snmp_core.c'],['../group__snmp__core.html#gacc71ac857bf9215f06a624dda09abe3a',1,'snmp_set_device_enterprise_oid(const struct snmp_obj_id *device_enterprise_oid): snmp_core.c']]], + ['snmp_5fset_5fmibs',['snmp_set_mibs',['../group__snmp__core.html#ga29c76474971f25d038fd486447c70e21',1,'snmp_set_mibs(const struct snmp_mib **mibs, u8_t num_mibs): snmp_core.c'],['../group__snmp__core.html#ga29c76474971f25d038fd486447c70e21',1,'snmp_set_mibs(const struct snmp_mib **mibs, u8_t num_mibs): snmp_core.c']]], + ['snmp_5fset_5fwrite_5fcallback',['snmp_set_write_callback',['../group__snmp__core.html#gaff6a6b39322e92862ab55cfcddfe254b',1,'snmp_set_write_callback(snmp_write_callback_fct write_callback, void *callback_arg): snmp_msg.c'],['../group__snmp__core.html#gaff6a6b39322e92862ab55cfcddfe254b',1,'snmp_set_write_callback(snmp_write_callback_fct write_callback, void *callback_arg): snmp_msg.c']]], + ['snmp_5fthreadsync_5finit',['snmp_threadsync_init',['../snmp__threadsync_8c.html#a36e5b1dbb067641b7a6ac486b4ec15b6',1,'snmp_threadsync_init(struct snmp_threadsync_instance *instance, snmp_threadsync_synchronizer_fn sync_fn): snmp_threadsync.c'],['../snmp__threadsync_8h.html#a36e5b1dbb067641b7a6ac486b4ec15b6',1,'snmp_threadsync_init(struct snmp_threadsync_instance *instance, snmp_threadsync_synchronizer_fn sync_fn): snmp_threadsync.c']]], + ['snmp_5ftrap_5fdst_5fenable',['snmp_trap_dst_enable',['../group__snmp__traps.html#gab101505be59778cf0f2f1ac40bcf3f32',1,'snmp_trap_dst_enable(u8_t dst_idx, u8_t enable): snmp_traps.c'],['../group__snmp__traps.html#gab101505be59778cf0f2f1ac40bcf3f32',1,'snmp_trap_dst_enable(u8_t dst_idx, u8_t enable): snmp_traps.c']]], + ['snmp_5ftrap_5fdst_5fip_5fset',['snmp_trap_dst_ip_set',['../group__snmp__traps.html#ga15e4afbf80ed2260850842e6608c6d86',1,'snmp_trap_dst_ip_set(u8_t dst_idx, const ip_addr_t *dst): snmp_traps.c'],['../group__snmp__traps.html#ga15e4afbf80ed2260850842e6608c6d86',1,'snmp_trap_dst_ip_set(u8_t dst_idx, const ip_addr_t *dst): snmp_traps.c']]], + ['snmp_5fvarbind_5flength',['snmp_varbind_length',['../snmp__msg_8c.html#ac1f684dada963f68b71a04a702f28fe5',1,'snmp_varbind_length(struct snmp_varbind *varbind, struct snmp_varbind_len *len): snmp_msg.c'],['../snmp__msg_8h.html#ac1f684dada963f68b71a04a702f28fe5',1,'snmp_varbind_length(struct snmp_varbind *varbind, struct snmp_varbind_len *len): snmp_msg.c']]], + ['sntp_5fenabled',['sntp_enabled',['../group__sntp.html#ga3fe5254e5a056fca80802d9f26b9c3c5',1,'sntp_enabled(void): sntp.c'],['../group__sntp.html#ga3fe5254e5a056fca80802d9f26b9c3c5',1,'sntp_enabled(void): sntp.c']]], + ['sntp_5fgetoperatingmode',['sntp_getoperatingmode',['../group__sntp.html#gae66404a551d5cef420cf844a71356fae',1,'sntp_getoperatingmode(void): sntp.c'],['../group__sntp.html#gae66404a551d5cef420cf844a71356fae',1,'sntp_getoperatingmode(void): sntp.c']]], + ['sntp_5fgetreachability',['sntp_getreachability',['../group__sntp.html#gac8097829a81cb6f37d9acf8efb2cc82e',1,'sntp_getreachability(u8_t idx): sntp.c'],['../group__sntp.html#gac8097829a81cb6f37d9acf8efb2cc82e',1,'sntp_getreachability(u8_t idx): sntp.c']]], + ['sntp_5fgetserver',['sntp_getserver',['../group__sntp.html#ga2a28523cb9f2b5b025a4818bc2c1afc1',1,'sntp_getserver(u8_t idx): sntp.c'],['../group__sntp.html#ga2a28523cb9f2b5b025a4818bc2c1afc1',1,'sntp_getserver(u8_t idx): sntp.c']]], + ['sntp_5finit',['sntp_init',['../group__sntp.html#ga9b300c6616de60524c85ea40bf70e2ba',1,'sntp_init(void): sntp.c'],['../group__sntp.html#ga9b300c6616de60524c85ea40bf70e2ba',1,'sntp_init(void): sntp.c']]], + ['sntp_5fsetoperatingmode',['sntp_setoperatingmode',['../group__sntp.html#gaae94fb2adadbf9667e9597f8a45bf120',1,'sntp_setoperatingmode(u8_t operating_mode): sntp.c'],['../group__sntp.html#gaae94fb2adadbf9667e9597f8a45bf120',1,'sntp_setoperatingmode(u8_t operating_mode): sntp.c']]], + ['sntp_5fsetserver',['sntp_setserver',['../group__sntp.html#ga4fa038dcea66349fafdbe1cc3e52ff3a',1,'sntp_setserver(u8_t idx, const ip_addr_t *server): sntp.c'],['../group__sntp.html#ga4fa038dcea66349fafdbe1cc3e52ff3a',1,'sntp_setserver(u8_t idx, const ip_addr_t *addr): sntp.c']]], + ['sntp_5fstop',['sntp_stop',['../group__sntp.html#ga8119fc2d1ff7ff6eba511cc9c7167488',1,'sntp_stop(void): sntp.c'],['../group__sntp.html#ga8119fc2d1ff7ff6eba511cc9c7167488',1,'sntp_stop(void): sntp.c']]], + ['stats_5finit',['stats_init',['../stats_8c.html#aeaa149d6c0445b22e944a063e0884d0d',1,'stats_init(void): stats.c'],['../stats_8h.html#aeaa149d6c0445b22e944a063e0884d0d',1,'stats_init(void): stats.c']]], + ['sys_5farch_5fmbox_5ffetch',['sys_arch_mbox_fetch',['../group__sys__mbox.html#ga6464cd77cf6799bd8b3d6c840166a2e8',1,'sys.h']]], + ['sys_5farch_5fmbox_5ftryfetch',['sys_arch_mbox_tryfetch',['../group__sys__mbox.html#gafab441b130b4ec417012835dbe1e497c',1,'sys.h']]], + ['sys_5farch_5fsem_5fwait',['sys_arch_sem_wait',['../group__sys__sem.html#ga8d364c5037778acb21c3df675db81b4f',1,'sys.h']]], + ['sys_5fcheck_5ftimeouts',['sys_check_timeouts',['../group__lwip__nosys.html#ga83cffdf69ab60fd0eba9d17d363f9883',1,'sys_check_timeouts(void): timeouts.c'],['../group__lwip__nosys.html#ga83cffdf69ab60fd0eba9d17d363f9883',1,'sys_check_timeouts(void): timeouts.c']]], + ['sys_5finit',['sys_init',['../group__sys__misc.html#gaf411a8bc6b7ed4b0af9114e10c959448',1,'sys.h']]], + ['sys_5fjiffies',['sys_jiffies',['../sys_8h.html#ac89f307e8b360eaf821b461a4f26753a',1,'sys.h']]], + ['sys_5fmbox_5ffree',['sys_mbox_free',['../group__sys__mbox.html#gac641a45812155d2234ef80dd6412882f',1,'sys.h']]], + ['sys_5fmbox_5fnew',['sys_mbox_new',['../group__sys__mbox.html#gab9793f30642de06ce87827e9adbe30cc',1,'sys.h']]], + ['sys_5fmbox_5fpost',['sys_mbox_post',['../group__sys__mbox.html#ga9d068386a3c53dd01b8af99c3ef77555',1,'sys.h']]], + ['sys_5fmbox_5fset_5finvalid',['sys_mbox_set_invalid',['../group__sys__mbox.html#ga53ddec9d7f5500c5b1d982cd17493172',1,'sys.h']]], + ['sys_5fmbox_5ftrypost',['sys_mbox_trypost',['../group__sys__mbox.html#gaa36345e48a49d67cbb0878cd4cbd2195',1,'sys.h']]], + ['sys_5fmbox_5ftrypost_5ffromisr',['sys_mbox_trypost_fromisr',['../group__sys__mbox.html#gaf677a6e76adb7650a3020fdb3cb8429a',1,'sys.h']]], + ['sys_5fmbox_5fvalid',['sys_mbox_valid',['../group__sys__mbox.html#ga8bcfab4bd791dd33f69a778e7585275d',1,'sys.h']]], + ['sys_5fmsleep',['sys_msleep',['../group__sys__misc.html#ga6b8786f43e779953e8b74e983c88682e',1,'sys_msleep(u32_t ms): sys.c'],['../group__sys__misc.html#ga6b8786f43e779953e8b74e983c88682e',1,'sys_msleep(u32_t ms): sys.c']]], + ['sys_5fmutex_5ffree',['sys_mutex_free',['../group__sys__mutex.html#ga16336ce68b741e98204102ca4bc84dd9',1,'sys.h']]], + ['sys_5fmutex_5flock',['sys_mutex_lock',['../group__sys__mutex.html#ga4d4eb9afe5965fa2661dd54ff55d616a',1,'sys.h']]], + ['sys_5fmutex_5fnew',['sys_mutex_new',['../group__sys__mutex.html#ga38e7dae1fd88b338eb1cd97f110f3897',1,'sys.h']]], + ['sys_5fmutex_5fset_5finvalid',['sys_mutex_set_invalid',['../group__sys__mutex.html#ga3f392725971dc837aa56dd7e45fa7ca8',1,'sys.h']]], + ['sys_5fmutex_5funlock',['sys_mutex_unlock',['../group__sys__mutex.html#ga5568f68898fe9d5735f9ce2f665624fb',1,'sys.h']]], + ['sys_5fmutex_5fvalid',['sys_mutex_valid',['../group__sys__mutex.html#gaebe83ba90a6d9c23cdb3eb5d49562c4a',1,'sys.h']]], + ['sys_5fnow',['sys_now',['../group__sys__time.html#ga11316ac1e77418c6fa4ab8869e3fa199',1,'sys.h']]], + ['sys_5frestart_5ftimeouts',['sys_restart_timeouts',['../timeouts_8c.html#a6913959cf264dbe876b7e7c4db1cc13e',1,'sys_restart_timeouts(void): timeouts.c'],['../timeouts_8h.html#a6913959cf264dbe876b7e7c4db1cc13e',1,'sys_restart_timeouts(void): timeouts.c']]], + ['sys_5fsem_5ffree',['sys_sem_free',['../group__sys__sem.html#ga83b781f96c30e915c752065a757da283',1,'sys.h']]], + ['sys_5fsem_5fnew',['sys_sem_new',['../group__sys__sem.html#gaf99da9e34a71855285c535183133dfde',1,'sys.h']]], + ['sys_5fsem_5fset_5finvalid',['sys_sem_set_invalid',['../group__sys__sem.html#ga42a2ab32afbf41a4146a9d135224ef33',1,'sys.h']]], + ['sys_5fsem_5fsignal',['sys_sem_signal',['../group__sys__sem.html#gaaf800273061fcc3f8200fd4e1b9ca875',1,'sys.h']]], + ['sys_5fsem_5fvalid',['sys_sem_valid',['../group__sys__sem.html#ga09a6c052ddaf799139efc56adfa087e4',1,'sys.h']]], + ['sys_5fthread_5fnew',['sys_thread_new',['../group__sys__misc.html#ga0d596afdd8dbcfad320172d39b0f607a',1,'sys.h']]], + ['sys_5ftimeout',['sys_timeout',['../timeouts_8c.html#a8deed391626ec8b5423998e33782d7a8',1,'sys_timeout(u32_t msecs, sys_timeout_handler handler, void *arg): timeouts.c'],['../timeouts_8h.html#a8deed391626ec8b5423998e33782d7a8',1,'sys_timeout(u32_t msecs, sys_timeout_handler handler, void *arg): timeouts.c']]], + ['sys_5ftimeouts_5finit',['sys_timeouts_init',['../timeouts_8c.html#a60f42f167f496f6f740c8df48f4dd26c',1,'sys_timeouts_init(void): timeouts.c'],['../timeouts_8h.html#a60f42f167f496f6f740c8df48f4dd26c',1,'sys_timeouts_init(void): timeouts.c']]], + ['sys_5ftimeouts_5fsleeptime',['sys_timeouts_sleeptime',['../timeouts_8c.html#aa9971a14a5810cfeb1efd7104cde6664',1,'sys_timeouts_sleeptime(void): timeouts.c'],['../timeouts_8h.html#aa9971a14a5810cfeb1efd7104cde6664',1,'sys_timeouts_sleeptime(void): timeouts.c']]], + ['sys_5funtimeout',['sys_untimeout',['../timeouts_8c.html#adbfcaa78f4b8d71ae0d7f0bcab6f8fb6',1,'sys_untimeout(sys_timeout_handler handler, void *arg): timeouts.c'],['../timeouts_8h.html#adbfcaa78f4b8d71ae0d7f0bcab6f8fb6',1,'sys_untimeout(sys_timeout_handler handler, void *arg): timeouts.c']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_c.html b/Libraries/LwIP/doc/doxygen/output/html/search/functions_c.html new file mode 100644 index 0000000..99492ba --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_c.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_c.js b/Libraries/LwIP/doc/doxygen/output/html/search/functions_c.js new file mode 100644 index 0000000..0c6fb33 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_c.js @@ -0,0 +1,78 @@ +var searchData= +[ + ['tcp_5fabandon',['tcp_abandon',['../tcp_8c.html#ae4f0f1ca01dbccd680eaa2d8433cd7fe',1,'tcp_abandon(struct tcp_pcb *pcb, int reset): tcp.c'],['../tcp__priv_8h.html#ae4f0f1ca01dbccd680eaa2d8433cd7fe',1,'tcp_abandon(struct tcp_pcb *pcb, int reset): tcp.c']]], + ['tcp_5fabort',['tcp_abort',['../group__tcp__raw.html#ga468c2260ddb01582e966ddcf3c25ce61',1,'tcp_abort(struct tcp_pcb *pcb): tcp.c'],['../group__tcp__raw.html#ga468c2260ddb01582e966ddcf3c25ce61',1,'tcp_abort(struct tcp_pcb *pcb): tcp.c']]], + ['tcp_5faccept',['tcp_accept',['../group__tcp__raw.html#gaff4c3e380fc60c8fb9b3aa95eda94c62',1,'tcp_accept(struct tcp_pcb *pcb, tcp_accept_fn accept): tcp.c'],['../group__tcp__raw.html#gaff4c3e380fc60c8fb9b3aa95eda94c62',1,'tcp_accept(struct tcp_pcb *pcb, tcp_accept_fn accept): tcp.c']]], + ['tcp_5falloc',['tcp_alloc',['../tcp_8c.html#a1dd6830a42b3c464b5a72f62ae312d0a',1,'tcp_alloc(u8_t prio): tcp.c'],['../tcp__priv_8h.html#a1dd6830a42b3c464b5a72f62ae312d0a',1,'tcp_alloc(u8_t prio): tcp.c']]], + ['tcp_5farg',['tcp_arg',['../group__tcp__raw.html#gac10926e6f76f73e17c0d37aaab3e56b6',1,'tcp_arg(struct tcp_pcb *pcb, void *arg): tcp.c'],['../group__tcp__raw.html#gac10926e6f76f73e17c0d37aaab3e56b6',1,'tcp_arg(struct tcp_pcb *pcb, void *arg): tcp.c']]], + ['tcp_5fbacklog_5faccepted',['tcp_backlog_accepted',['../group__tcp__raw.html#ga619154658137a23839ca3b94882131ca',1,'tcp_backlog_accepted(struct tcp_pcb *pcb): tcp.c'],['../group__tcp__raw.html#ga619154658137a23839ca3b94882131ca',1,'tcp_backlog_accepted(struct tcp_pcb *pcb): tcp.c']]], + ['tcp_5fbacklog_5fdelayed',['tcp_backlog_delayed',['../group__tcp__raw.html#ga427b11c7b98c748ec487cd43093bd2f8',1,'tcp_backlog_delayed(struct tcp_pcb *pcb): tcp.c'],['../group__tcp__raw.html#ga427b11c7b98c748ec487cd43093bd2f8',1,'tcp_backlog_delayed(struct tcp_pcb *pcb): tcp.c']]], + ['tcp_5fbind',['tcp_bind',['../group__tcp__raw.html#gacf5aa67bd7fc66fef43f77a55a1201ee',1,'tcp_bind(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port): tcp.c'],['../group__tcp__raw.html#gacf5aa67bd7fc66fef43f77a55a1201ee',1,'tcp_bind(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port): tcp.c']]], + ['tcp_5fbind_5fnetif',['tcp_bind_netif',['../group__tcp__raw.html#ga6469a15709088e80024258dbe80fcd1f',1,'tcp_bind_netif(struct tcp_pcb *pcb, const struct netif *netif): tcp.c'],['../group__tcp__raw.html#ga6469a15709088e80024258dbe80fcd1f',1,'tcp_bind_netif(struct tcp_pcb *pcb, const struct netif *netif): tcp.c']]], + ['tcp_5fclose',['tcp_close',['../group__tcp__raw.html#ga87093e137fcc53ea82a134a3f5b33623',1,'tcp_close(struct tcp_pcb *pcb): tcp.c'],['../group__tcp__raw.html#ga87093e137fcc53ea82a134a3f5b33623',1,'tcp_close(struct tcp_pcb *pcb): tcp.c']]], + ['tcp_5fconnect',['tcp_connect',['../group__tcp__raw.html#ga9a31deea4cadacd39f9485f37cfdd012',1,'tcp_connect(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port, tcp_connected_fn connected): tcp.c'],['../group__tcp__raw.html#ga9a31deea4cadacd39f9485f37cfdd012',1,'tcp_connect(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port, tcp_connected_fn connected): tcp.c']]], + ['tcp_5feff_5fsend_5fmss_5fnetif',['tcp_eff_send_mss_netif',['../tcp_8c.html#a08a3b5396c40f32dd8b21e7d63b3e1b3',1,'tcp_eff_send_mss_netif(u16_t sendmss, struct netif *outif, const ip_addr_t *dest): tcp.c'],['../tcp__priv_8h.html#a08a3b5396c40f32dd8b21e7d63b3e1b3',1,'tcp_eff_send_mss_netif(u16_t sendmss, struct netif *outif, const ip_addr_t *dest): tcp.c']]], + ['tcp_5fenqueue_5fflags',['tcp_enqueue_flags',['../tcp__out_8c.html#aa7d5d552647d567095876aab202bfd1a',1,'tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags): tcp_out.c'],['../tcp__priv_8h.html#aa7d5d552647d567095876aab202bfd1a',1,'tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags): tcp_out.c']]], + ['tcp_5ferr',['tcp_err',['../group__tcp__raw.html#gae1346c4e34d3bc7c01e1b47142ab3121',1,'tcp_err(struct tcp_pcb *pcb, tcp_err_fn err): tcp.c'],['../group__tcp__raw.html#gae1346c4e34d3bc7c01e1b47142ab3121',1,'tcp_err(struct tcp_pcb *pcb, tcp_err_fn err): tcp.c']]], + ['tcp_5fext_5farg_5falloc_5fid',['tcp_ext_arg_alloc_id',['../group__tcp__raw__extargs.html#ga4836e0b4f66439493e106a50400d1616',1,'tcp_ext_arg_alloc_id(void): tcp.c'],['../group__tcp__raw__extargs.html#ga4836e0b4f66439493e106a50400d1616',1,'tcp_ext_arg_alloc_id(void): tcp.c']]], + ['tcp_5fext_5farg_5fget',['tcp_ext_arg_get',['../group__tcp__raw__extargs.html#gaa8ac7a74407cb3e0e01a30314805f990',1,'tcp_ext_arg_get(const struct tcp_pcb *pcb, uint8_t id): tcp.c'],['../group__tcp__raw__extargs.html#gaa8ac7a74407cb3e0e01a30314805f990',1,'tcp_ext_arg_get(const struct tcp_pcb *pcb, uint8_t id): tcp.c']]], + ['tcp_5fext_5farg_5finvoke_5fcallbacks_5fpassive_5fopen',['tcp_ext_arg_invoke_callbacks_passive_open',['../tcp_8c.html#a5265b1df024d04287ed3edc02b1b9ccc',1,'tcp_ext_arg_invoke_callbacks_passive_open(struct tcp_pcb_listen *lpcb, struct tcp_pcb *cpcb): tcp.c'],['../tcp__priv_8h.html#a5265b1df024d04287ed3edc02b1b9ccc',1,'tcp_ext_arg_invoke_callbacks_passive_open(struct tcp_pcb_listen *lpcb, struct tcp_pcb *cpcb): tcp.c']]], + ['tcp_5fext_5farg_5fset',['tcp_ext_arg_set',['../group__tcp__raw__extargs.html#ga58500cb2ce22438e16a37373595af318',1,'tcp_ext_arg_set(struct tcp_pcb *pcb, uint8_t id, void *arg): tcp.c'],['../group__tcp__raw__extargs.html#ga58500cb2ce22438e16a37373595af318',1,'tcp_ext_arg_set(struct tcp_pcb *pcb, uint8_t id, void *arg): tcp.c']]], + ['tcp_5fext_5farg_5fset_5fcallbacks',['tcp_ext_arg_set_callbacks',['../group__tcp__raw__extargs.html#ga36e60dc02bfe0437c8da368a62e2f316',1,'tcp_ext_arg_set_callbacks(struct tcp_pcb *pcb, uint8_t id, const struct tcp_ext_arg_callbacks *const callbacks): tcp.c'],['../group__tcp__raw__extargs.html#ga36e60dc02bfe0437c8da368a62e2f316',1,'tcp_ext_arg_set_callbacks(struct tcp_pcb *pcb, uint8_t id, const struct tcp_ext_arg_callbacks *const callbacks): tcp.c']]], + ['tcp_5ffasttmr',['tcp_fasttmr',['../tcp_8c.html#abf446b07e52161b8a53cea07bc6c366d',1,'tcp_fasttmr(void): tcp.c'],['../tcp__priv_8h.html#abf446b07e52161b8a53cea07bc6c366d',1,'tcp_fasttmr(void): tcp.c']]], + ['tcp_5ffree',['tcp_free',['../tcp_8c.html#aa2b6b075c27c64dfb8c402ac961fb910',1,'tcp_free(struct tcp_pcb *pcb): tcp.c'],['../tcp__priv_8h.html#aa2b6b075c27c64dfb8c402ac961fb910',1,'tcp_free(struct tcp_pcb *pcb): tcp.c']]], + ['tcp_5finit',['tcp_init',['../tcp_8c.html#a51de4ded7d342456d31722493c92c969',1,'tcp_init(void): tcp.c'],['../tcp__priv_8h.html#a51de4ded7d342456d31722493c92c969',1,'tcp_init(void): tcp.c']]], + ['tcp_5finput',['tcp_input',['../tcp__in_8c.html#ae70c3c99d9dd6b07f7e11f7ba5eedcb5',1,'tcp_input(struct pbuf *p, struct netif *inp): tcp_in.c'],['../tcp__priv_8h.html#ae70c3c99d9dd6b07f7e11f7ba5eedcb5',1,'tcp_input(struct pbuf *p, struct netif *inp): tcp_in.c']]], + ['tcp_5fkeepalive',['tcp_keepalive',['../tcp__out_8c.html#a0d8bb5fc8522515aa35d305774cc5332',1,'tcp_keepalive(struct tcp_pcb *pcb): tcp_out.c'],['../tcp__priv_8h.html#a0d8bb5fc8522515aa35d305774cc5332',1,'tcp_keepalive(struct tcp_pcb *pcb): tcp_out.c']]], + ['tcp_5flisten_5fwith_5fbacklog',['tcp_listen_with_backlog',['../group__tcp__raw.html#gaeff14f321d1eecd0431611f382fcd338',1,'tcp_listen_with_backlog(struct tcp_pcb *pcb, u8_t backlog): tcp.c'],['../group__tcp__raw.html#gaeff14f321d1eecd0431611f382fcd338',1,'tcp_listen_with_backlog(struct tcp_pcb *pcb, u8_t backlog): tcp.c']]], + ['tcp_5flisten_5fwith_5fbacklog_5fand_5ferr',['tcp_listen_with_backlog_and_err',['../group__tcp__raw.html#gac86ad8ded4d1db15a5b5fb42eb7c1436',1,'tcp_listen_with_backlog_and_err(struct tcp_pcb *pcb, u8_t backlog, err_t *err): tcp.c'],['../group__tcp__raw.html#gac86ad8ded4d1db15a5b5fb42eb7c1436',1,'tcp_listen_with_backlog_and_err(struct tcp_pcb *pcb, u8_t backlog, err_t *err): tcp.c']]], + ['tcp_5fnetif_5fip_5faddr_5fchanged',['tcp_netif_ip_addr_changed',['../tcp_8c.html#a4d0c2d1ad02134c79fc72fe95ee2a703',1,'tcp_netif_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr): tcp.c'],['../tcp__priv_8h.html#a4d0c2d1ad02134c79fc72fe95ee2a703',1,'tcp_netif_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr): tcp.c']]], + ['tcp_5fnew',['tcp_new',['../group__tcp__raw.html#ga7427c5d237fe66a8097bfa8d24ceb943',1,'tcp_new(void): tcp.c'],['../group__tcp__raw.html#ga7427c5d237fe66a8097bfa8d24ceb943',1,'tcp_new(void): tcp.c']]], + ['tcp_5fnew_5fip_5ftype',['tcp_new_ip_type',['../group__tcp__raw.html#gac14e757a21a4a87c6aa52372c210b937',1,'tcp_new_ip_type(u8_t type): tcp.c'],['../group__tcp__raw.html#gac14e757a21a4a87c6aa52372c210b937',1,'tcp_new_ip_type(u8_t type): tcp.c']]], + ['tcp_5fnext_5fiss',['tcp_next_iss',['../tcp_8c.html#afd5dc2fa74855a84b2da642ba31059ea',1,'tcp_next_iss(struct tcp_pcb *pcb): tcp.c'],['../tcp__priv_8h.html#afd5dc2fa74855a84b2da642ba31059ea',1,'tcp_next_iss(struct tcp_pcb *pcb): tcp.c']]], + ['tcp_5foutput',['tcp_output',['../group__tcp__raw.html#ga0cbcc6d628f644a530daf629fa3e5f7f',1,'tcp_output(struct tcp_pcb *pcb): tcp_out.c'],['../group__tcp__raw.html#ga0cbcc6d628f644a530daf629fa3e5f7f',1,'tcp_output(struct tcp_pcb *pcb): tcp_out.c']]], + ['tcp_5fpcb_5fpurge',['tcp_pcb_purge',['../tcp_8c.html#a44fc672b9d14a65e61040707c45302ba',1,'tcp_pcb_purge(struct tcp_pcb *pcb): tcp.c'],['../tcp__priv_8h.html#a44fc672b9d14a65e61040707c45302ba',1,'tcp_pcb_purge(struct tcp_pcb *pcb): tcp.c']]], + ['tcp_5fpcb_5fremove',['tcp_pcb_remove',['../tcp_8c.html#aaaef096f6a03bf5b778329bb66ee06f6',1,'tcp_pcb_remove(struct tcp_pcb **pcblist, struct tcp_pcb *pcb): tcp.c'],['../tcp__priv_8h.html#aaaef096f6a03bf5b778329bb66ee06f6',1,'tcp_pcb_remove(struct tcp_pcb **pcblist, struct tcp_pcb *pcb): tcp.c']]], + ['tcp_5fpoll',['tcp_poll',['../group__tcp__raw.html#gafba47015098ed7ce523dcf7bdf70f7e5',1,'tcp_poll(struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval): tcp.c'],['../group__tcp__raw.html#gafba47015098ed7ce523dcf7bdf70f7e5',1,'tcp_poll(struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval): tcp.c']]], + ['tcp_5fprocess_5frefused_5fdata',['tcp_process_refused_data',['../tcp_8c.html#a0075b56ad4b0eca7c9d439cf150e1973',1,'tcp_process_refused_data(struct tcp_pcb *pcb): tcp.c'],['../tcp__priv_8h.html#a0075b56ad4b0eca7c9d439cf150e1973',1,'tcp_process_refused_data(struct tcp_pcb *pcb): tcp.c']]], + ['tcp_5frecv',['tcp_recv',['../group__tcp__raw.html#ga8afd0b316a87a5eeff4726dc95006ed0',1,'tcp_recv(struct tcp_pcb *pcb, tcp_recv_fn recv): tcp.c'],['../group__tcp__raw.html#ga8afd0b316a87a5eeff4726dc95006ed0',1,'tcp_recv(struct tcp_pcb *pcb, tcp_recv_fn recv): tcp.c']]], + ['tcp_5frecv_5fnull',['tcp_recv_null',['../tcp_8c.html#a0cb3f604fc8d20870d8cab291da5701c',1,'tcp_recv_null(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err): tcp.c'],['../tcp__priv_8h.html#a0cb3f604fc8d20870d8cab291da5701c',1,'tcp_recv_null(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err): tcp.c']]], + ['tcp_5frecved',['tcp_recved',['../group__tcp__raw.html#gabdac0856a52b5789dc897d4c7137ec44',1,'tcp_recved(struct tcp_pcb *pcb, u16_t len): tcp.c'],['../group__tcp__raw.html#gabdac0856a52b5789dc897d4c7137ec44',1,'tcp_recved(struct tcp_pcb *pcb, u16_t len): tcp.c']]], + ['tcp_5frexmit',['tcp_rexmit',['../tcp__out_8c.html#af75fefe4fe509845be156d6e424eb6f1',1,'tcp_rexmit(struct tcp_pcb *pcb): tcp_out.c'],['../tcp__priv_8h.html#af75fefe4fe509845be156d6e424eb6f1',1,'tcp_rexmit(struct tcp_pcb *pcb): tcp_out.c']]], + ['tcp_5frexmit_5ffast',['tcp_rexmit_fast',['../tcp__out_8c.html#adb6ee7b4d59f125cc8bfac3bb5ca3937',1,'tcp_rexmit_fast(struct tcp_pcb *pcb): tcp_out.c'],['../tcp__priv_8h.html#adb6ee7b4d59f125cc8bfac3bb5ca3937',1,'tcp_rexmit_fast(struct tcp_pcb *pcb): tcp_out.c']]], + ['tcp_5frexmit_5frto',['tcp_rexmit_rto',['../tcp__out_8c.html#ab5ef9c8ab4629eb721987ae316b9f30f',1,'tcp_rexmit_rto(struct tcp_pcb *pcb): tcp_out.c'],['../tcp__priv_8h.html#ab5ef9c8ab4629eb721987ae316b9f30f',1,'tcp_rexmit_rto(struct tcp_pcb *pcb): tcp_out.c']]], + ['tcp_5frexmit_5frto_5fcommit',['tcp_rexmit_rto_commit',['../tcp__out_8c.html#a9ef9dc094e21bdf0779aed25ab0b08d4',1,'tcp_rexmit_rto_commit(struct tcp_pcb *pcb): tcp_out.c'],['../tcp__priv_8h.html#a9ef9dc094e21bdf0779aed25ab0b08d4',1,'tcp_rexmit_rto_commit(struct tcp_pcb *pcb): tcp_out.c']]], + ['tcp_5frexmit_5frto_5fprepare',['tcp_rexmit_rto_prepare',['../tcp__out_8c.html#a1f318930bd6d49074343cc79c5166f39',1,'tcp_rexmit_rto_prepare(struct tcp_pcb *pcb): tcp_out.c'],['../tcp__priv_8h.html#a1f318930bd6d49074343cc79c5166f39',1,'tcp_rexmit_rto_prepare(struct tcp_pcb *pcb): tcp_out.c']]], + ['tcp_5frst',['tcp_rst',['../tcp__out_8c.html#aa90f8051c9633d3017c588245cdc4014',1,'tcp_rst(const struct tcp_pcb *pcb, u32_t seqno, u32_t ackno, const ip_addr_t *local_ip, const ip_addr_t *remote_ip, u16_t local_port, u16_t remote_port): tcp_out.c'],['../tcp__priv_8h.html#aa90f8051c9633d3017c588245cdc4014',1,'tcp_rst(const struct tcp_pcb *pcb, u32_t seqno, u32_t ackno, const ip_addr_t *local_ip, const ip_addr_t *remote_ip, u16_t local_port, u16_t remote_port): tcp_out.c']]], + ['tcp_5fseg_5fcopy',['tcp_seg_copy',['../tcp_8c.html#a569d79451d2570e4ef406775725ef6ef',1,'tcp_seg_copy(struct tcp_seg *seg): tcp.c'],['../tcp__priv_8h.html#a569d79451d2570e4ef406775725ef6ef',1,'tcp_seg_copy(struct tcp_seg *seg): tcp.c']]], + ['tcp_5fseg_5ffree',['tcp_seg_free',['../tcp_8c.html#ac6283651b26f74dba2444159aee88b20',1,'tcp_seg_free(struct tcp_seg *seg): tcp.c'],['../tcp__priv_8h.html#ac6283651b26f74dba2444159aee88b20',1,'tcp_seg_free(struct tcp_seg *seg): tcp.c']]], + ['tcp_5fsegs_5ffree',['tcp_segs_free',['../tcp_8c.html#a3d9bb9809769197bce9b2499d55cf28c',1,'tcp_segs_free(struct tcp_seg *seg): tcp.c'],['../tcp__priv_8h.html#a3d9bb9809769197bce9b2499d55cf28c',1,'tcp_segs_free(struct tcp_seg *seg): tcp.c']]], + ['tcp_5fsend_5fempty_5fack',['tcp_send_empty_ack',['../tcp__out_8c.html#aefde3e34b2cc8df9654986484c44a996',1,'tcp_send_empty_ack(struct tcp_pcb *pcb): tcp_out.c'],['../tcp__priv_8h.html#aefde3e34b2cc8df9654986484c44a996',1,'tcp_send_empty_ack(struct tcp_pcb *pcb): tcp_out.c']]], + ['tcp_5fsend_5ffin',['tcp_send_fin',['../tcp__out_8c.html#af40ba9d645a8910436c3d7cf13dba342',1,'tcp_send_fin(struct tcp_pcb *pcb): tcp_out.c'],['../tcp__priv_8h.html#af40ba9d645a8910436c3d7cf13dba342',1,'tcp_send_fin(struct tcp_pcb *pcb): tcp_out.c']]], + ['tcp_5fsent',['tcp_sent',['../group__tcp__raw.html#ga1596332b93bb6249179f3b89f24bd808',1,'tcp_sent(struct tcp_pcb *pcb, tcp_sent_fn sent): tcp.c'],['../group__tcp__raw.html#ga1596332b93bb6249179f3b89f24bd808',1,'tcp_sent(struct tcp_pcb *pcb, tcp_sent_fn sent): tcp.c']]], + ['tcp_5fsetprio',['tcp_setprio',['../tcp_8c.html#a2c4234f1e95b6bde0e84d4ea97ae95bc',1,'tcp_setprio(struct tcp_pcb *pcb, u8_t prio): tcp.c'],['../tcp_8h.html#a2c4234f1e95b6bde0e84d4ea97ae95bc',1,'tcp_setprio(struct tcp_pcb *pcb, u8_t prio): tcp.c']]], + ['tcp_5fshutdown',['tcp_shutdown',['../group__tcp__raw.html#ga5b94d57f1891b9287f88525a2ac561dd',1,'tcp_shutdown(struct tcp_pcb *pcb, int shut_rx, int shut_tx): tcp.c'],['../group__tcp__raw.html#ga5b94d57f1891b9287f88525a2ac561dd',1,'tcp_shutdown(struct tcp_pcb *pcb, int shut_rx, int shut_tx): tcp.c']]], + ['tcp_5fslowtmr',['tcp_slowtmr',['../tcp_8c.html#a421fb42ef919018e14ae413adfee9905',1,'tcp_slowtmr(void): tcp.c'],['../tcp__priv_8h.html#a421fb42ef919018e14ae413adfee9905',1,'tcp_slowtmr(void): tcp.c']]], + ['tcp_5fsplit_5funsent_5fseg',['tcp_split_unsent_seg',['../tcp__out_8c.html#ac930859c4e4ad9fcf6bb25ef5e91bcd5',1,'tcp_split_unsent_seg(struct tcp_pcb *pcb, u16_t split): tcp_out.c'],['../tcp__priv_8h.html#ac930859c4e4ad9fcf6bb25ef5e91bcd5',1,'tcp_split_unsent_seg(struct tcp_pcb *pcb, u16_t split): tcp_out.c']]], + ['tcp_5ftimer_5fneeded',['tcp_timer_needed',['../timeouts_8c.html#a8181bc316fdf61b85f787c5cadfcd249',1,'tcp_timer_needed(void): timeouts.c'],['../tcp__priv_8h.html#a8181bc316fdf61b85f787c5cadfcd249',1,'tcp_timer_needed(void): timeouts.c']]], + ['tcp_5ftmr',['tcp_tmr',['../tcp_8c.html#a3846a756b13214ed88ea47d0ff8279eb',1,'tcp_tmr(void): tcp.c'],['../tcp__priv_8h.html#a3846a756b13214ed88ea47d0ff8279eb',1,'tcp_tmr(void): tcp.c']]], + ['tcp_5ftxnow',['tcp_txnow',['../tcp_8c.html#a5ae0268e59fda0665fdd08c6e77ec547',1,'tcp_txnow(void): tcp.c'],['../tcp__priv_8h.html#a5ae0268e59fda0665fdd08c6e77ec547',1,'tcp_txnow(void): tcp.c']]], + ['tcp_5fupdate_5frcv_5fann_5fwnd',['tcp_update_rcv_ann_wnd',['../tcp_8c.html#a6d2c254b779db4e517cb34e41301588d',1,'tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb): tcp.c'],['../tcp__priv_8h.html#a6d2c254b779db4e517cb34e41301588d',1,'tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb): tcp.c']]], + ['tcp_5fwrite',['tcp_write',['../group__tcp__raw.html#ga6b2aa0efbf10e254930332b7c89cd8c5',1,'tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags): tcp_out.c'],['../group__tcp__raw.html#ga6b2aa0efbf10e254930332b7c89cd8c5',1,'tcp_write(struct tcp_pcb *pcb, const void *dataptr, u16_t len, u8_t apiflags): tcp_out.c']]], + ['tcp_5fzero_5fwindow_5fprobe',['tcp_zero_window_probe',['../tcp__out_8c.html#a6c20490aa45c771c38ce8ad3031cbdf6',1,'tcp_zero_window_probe(struct tcp_pcb *pcb): tcp_out.c'],['../tcp__priv_8h.html#a6c20490aa45c771c38ce8ad3031cbdf6',1,'tcp_zero_window_probe(struct tcp_pcb *pcb): tcp_out.c']]], + ['tcpip_5f6lowpan_5finput',['tcpip_6lowpan_input',['../group__sixlowpan.html#ga9d9b93c47dd138fd84a503ffecb9336b',1,'tcpip_6lowpan_input(struct pbuf *p, struct netif *inp): lowpan6.c'],['../group__sixlowpan.html#ga9d9b93c47dd138fd84a503ffecb9336b',1,'tcpip_6lowpan_input(struct pbuf *p, struct netif *inp): lowpan6.c']]], + ['tcpip_5fapi_5fcall',['tcpip_api_call',['../tcpip_8c.html#a3d42b0c46607f91aedcc7745ed466b08',1,'tcpip_api_call(tcpip_api_call_fn fn, struct tcpip_api_call_data *call): tcpip.c'],['../tcpip__priv_8h.html#a3d42b0c46607f91aedcc7745ed466b08',1,'tcpip_api_call(tcpip_api_call_fn fn, struct tcpip_api_call_data *call): tcpip.c']]], + ['tcpip_5fcallback',['tcpip_callback',['../group__lwip__os.html#gaab838fe3417ab3a1f61f0728009a0c2a',1,'tcpip_callback(tcpip_callback_fn function, void *ctx): tcpip.c'],['../group__lwip__os.html#gaab838fe3417ab3a1f61f0728009a0c2a',1,'tcpip_callback(tcpip_callback_fn function, void *ctx): tcpip.c']]], + ['tcpip_5fcallbackmsg_5fdelete',['tcpip_callbackmsg_delete',['../group__lwip__os.html#gac5b7a59f4c3f5f721ab9ee81f231c9fd',1,'tcpip_callbackmsg_delete(struct tcpip_callback_msg *msg): tcpip.c'],['../group__lwip__os.html#gac5b7a59f4c3f5f721ab9ee81f231c9fd',1,'tcpip_callbackmsg_delete(struct tcpip_callback_msg *msg): tcpip.c']]], + ['tcpip_5fcallbackmsg_5fnew',['tcpip_callbackmsg_new',['../group__lwip__os.html#gaee14fa2587a9ba9d23e4c7e16c4526ac',1,'tcpip_callbackmsg_new(tcpip_callback_fn function, void *ctx): tcpip.c'],['../group__lwip__os.html#gaee14fa2587a9ba9d23e4c7e16c4526ac',1,'tcpip_callbackmsg_new(tcpip_callback_fn function, void *ctx): tcpip.c']]], + ['tcpip_5fcallbackmsg_5ftrycallback',['tcpip_callbackmsg_trycallback',['../group__lwip__os.html#ga83fe5fb2ea33e8c262567ac46f4db3f8',1,'tcpip_callbackmsg_trycallback(struct tcpip_callback_msg *msg): tcpip.c'],['../group__lwip__os.html#ga83fe5fb2ea33e8c262567ac46f4db3f8',1,'tcpip_callbackmsg_trycallback(struct tcpip_callback_msg *msg): tcpip.c']]], + ['tcpip_5fcallbackmsg_5ftrycallback_5ffromisr',['tcpip_callbackmsg_trycallback_fromisr',['../group__lwip__os.html#ga56a234f3d895791225c3c850bfadb666',1,'tcpip_callbackmsg_trycallback_fromisr(struct tcpip_callback_msg *msg): tcpip.c'],['../group__lwip__os.html#ga56a234f3d895791225c3c850bfadb666',1,'tcpip_callbackmsg_trycallback_fromisr(struct tcpip_callback_msg *msg): tcpip.c']]], + ['tcpip_5finit',['tcpip_init',['../group__lwip__os.html#ga1f3a88b8df6ba3b9ed1c00e0a305e3db',1,'tcpip_init(tcpip_init_done_fn initfunc, void *arg): tcpip.c'],['../group__lwip__os.html#ga1f3a88b8df6ba3b9ed1c00e0a305e3db',1,'tcpip_init(tcpip_init_done_fn tcpip_init_done, void *arg): tcpip.c']]], + ['tcpip_5finpkt',['tcpip_inpkt',['../tcpip_8c.html#a93043b3c66dbe4a15a60299c6199d102',1,'tcpip_inpkt(struct pbuf *p, struct netif *inp, netif_input_fn input_fn): tcpip.c'],['../tcpip_8h.html#a93043b3c66dbe4a15a60299c6199d102',1,'tcpip_inpkt(struct pbuf *p, struct netif *inp, netif_input_fn input_fn): tcpip.c']]], + ['tcpip_5finput',['tcpip_input',['../group__lwip__os.html#gae510f195171bed8499ae94e264a92717',1,'tcpip_input(struct pbuf *p, struct netif *inp): tcpip.c'],['../group__lwip__os.html#gae510f195171bed8499ae94e264a92717',1,'tcpip_input(struct pbuf *p, struct netif *inp): tcpip.c']]], + ['tcpip_5frfc7668_5finput',['tcpip_rfc7668_input',['../lowpan6__ble_8h.html#a6ae90ad69f5d901eb44cf87b9120cd9a',1,'tcpip_rfc7668_input(struct pbuf *p, struct netif *inp): lowpan6_ble.c'],['../lowpan6__ble_8c.html#a6ae90ad69f5d901eb44cf87b9120cd9a',1,'tcpip_rfc7668_input(struct pbuf *p, struct netif *inp): lowpan6_ble.c']]], + ['tcpip_5fsend_5fmsg_5fwait_5fsem',['tcpip_send_msg_wait_sem',['../tcpip_8c.html#a12bdf37eddcd72c4178e3ea7d370395d',1,'tcpip_send_msg_wait_sem(tcpip_callback_fn fn, void *apimsg, sys_sem_t *sem): tcpip.c'],['../tcpip__priv_8h.html#a12bdf37eddcd72c4178e3ea7d370395d',1,'tcpip_send_msg_wait_sem(tcpip_callback_fn fn, void *apimsg, sys_sem_t *sem): tcpip.c']]], + ['tcpip_5ftry_5fcallback',['tcpip_try_callback',['../group__lwip__os.html#gaeb7b3c7414c76ad8dde14d2fba6cb020',1,'tcpip_try_callback(tcpip_callback_fn function, void *ctx): tcpip.c'],['../group__lwip__os.html#gaeb7b3c7414c76ad8dde14d2fba6cb020',1,'tcpip_try_callback(tcpip_callback_fn function, void *ctx): tcpip.c']]], + ['tftp_5fcleanup',['tftp_cleanup',['../group__tftp.html#gabb4a4e24b5c7ec8df70ec5a68a206dec',1,'tftp_cleanup(void): tftp_server.c'],['../group__tftp.html#gabb4a4e24b5c7ec8df70ec5a68a206dec',1,'tftp_cleanup(void): tftp_server.c']]], + ['tftp_5finit',['tftp_init',['../group__tftp.html#ga7a80673a1324da5c8ae2440af7b008a3',1,'tftp_init(const struct tftp_context *ctx): tftp_server.c'],['../group__tftp.html#ga7a80673a1324da5c8ae2440af7b008a3',1,'tftp_init(const struct tftp_context *ctx): tftp_server.c']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_d.html b/Libraries/LwIP/doc/doxygen/output/html/search/functions_d.html new file mode 100644 index 0000000..5be9ecc --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_d.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_d.js b/Libraries/LwIP/doc/doxygen/output/html/search/functions_d.js new file mode 100644 index 0000000..13fda59 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_d.js @@ -0,0 +1,18 @@ +var searchData= +[ + ['udp_5fbind',['udp_bind',['../group__udp__raw.html#gac7fbda8b12b9b9360e92b51e805e799e',1,'udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port): udp.c'],['../group__udp__raw.html#gac7fbda8b12b9b9360e92b51e805e799e',1,'udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port): udp.c']]], + ['udp_5fbind_5fnetif',['udp_bind_netif',['../group__udp__raw.html#ga4360535ae72e77019721c9637a1051a8',1,'udp_bind_netif(struct udp_pcb *pcb, const struct netif *netif): udp.c'],['../group__udp__raw.html#ga4360535ae72e77019721c9637a1051a8',1,'udp_bind_netif(struct udp_pcb *pcb, const struct netif *netif): udp.c']]], + ['udp_5fconnect',['udp_connect',['../group__udp__raw.html#ga83625967670477aa254643129a53971b',1,'udp_connect(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port): udp.c'],['../group__udp__raw.html#ga83625967670477aa254643129a53971b',1,'udp_connect(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port): udp.c']]], + ['udp_5fdisconnect',['udp_disconnect',['../group__udp__raw.html#ga8d26559743e59e4b409c92a268ee67fc',1,'udp_disconnect(struct udp_pcb *pcb): udp.c'],['../group__udp__raw.html#ga8d26559743e59e4b409c92a268ee67fc',1,'udp_disconnect(struct udp_pcb *pcb): udp.c']]], + ['udp_5finit',['udp_init',['../udp_8c.html#ae7f7431ce99333577d7b82b26619309e',1,'udp_init(void): udp.c'],['../udp_8h.html#ae7f7431ce99333577d7b82b26619309e',1,'udp_init(void): udp.c']]], + ['udp_5finput',['udp_input',['../udp_8c.html#a7b338a5515606bd51976fbc5bcec9611',1,'udp_input(struct pbuf *p, struct netif *inp): udp.c'],['../udp_8h.html#a7b338a5515606bd51976fbc5bcec9611',1,'udp_input(struct pbuf *p, struct netif *inp): udp.c']]], + ['udp_5fnetif_5fip_5faddr_5fchanged',['udp_netif_ip_addr_changed',['../udp_8c.html#ab857f86a0b15d02b864292b161b2c3fc',1,'udp_netif_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr): udp.c'],['../udp_8h.html#ab857f86a0b15d02b864292b161b2c3fc',1,'udp_netif_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr): udp.c']]], + ['udp_5fnew',['udp_new',['../group__udp__raw.html#gaa6d6430499acae43d342f0e68ddbb209',1,'udp_new(void): udp.c'],['../group__udp__raw.html#gaa6d6430499acae43d342f0e68ddbb209',1,'udp_new(void): udp.c']]], + ['udp_5fnew_5fip_5ftype',['udp_new_ip_type',['../group__udp__raw.html#gaf1ab236050dd351e93f112cfbc1ada88',1,'udp_new_ip_type(u8_t type): udp.c'],['../group__udp__raw.html#gaf1ab236050dd351e93f112cfbc1ada88',1,'udp_new_ip_type(u8_t type): udp.c']]], + ['udp_5frecv',['udp_recv',['../group__udp__raw.html#gada6d02b9a5f35e1fb2e1bc71b11e6027',1,'udp_recv(struct udp_pcb *pcb, udp_recv_fn recv, void *recv_arg): udp.c'],['../group__udp__raw.html#gada6d02b9a5f35e1fb2e1bc71b11e6027',1,'udp_recv(struct udp_pcb *pcb, udp_recv_fn recv, void *recv_arg): udp.c']]], + ['udp_5fremove',['udp_remove',['../group__udp__raw.html#ga3aed8e469f74f960837ebf9f34acf646',1,'udp_remove(struct udp_pcb *pcb): udp.c'],['../group__udp__raw.html#ga3aed8e469f74f960837ebf9f34acf646',1,'udp_remove(struct udp_pcb *pcb): udp.c']]], + ['udp_5fsend',['udp_send',['../group__udp__raw.html#gaa4546c43981f043c0ae4514d625cc3fc',1,'udp_send(struct udp_pcb *pcb, struct pbuf *p): udp.c'],['../group__udp__raw.html#gaa4546c43981f043c0ae4514d625cc3fc',1,'udp_send(struct udp_pcb *pcb, struct pbuf *p): udp.c']]], + ['udp_5fsendto',['udp_sendto',['../group__udp__raw.html#gaa0e135a5958f1f0cc83cbeb609e18743',1,'udp_sendto(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, u16_t dst_port): udp.c'],['../group__udp__raw.html#gaa0e135a5958f1f0cc83cbeb609e18743',1,'udp_sendto(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, u16_t dst_port): udp.c']]], + ['udp_5fsendto_5fif',['udp_sendto_if',['../group__udp__raw.html#ga83f8c873671ca7f307d14b29a0a7a142',1,'udp_sendto_if(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif): udp.c'],['../group__udp__raw.html#ga83f8c873671ca7f307d14b29a0a7a142',1,'udp_sendto_if(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif): udp.c']]], + ['udp_5fsendto_5fif_5fsrc',['udp_sendto_if_src',['../group__udp__raw.html#gaa389827c979c766c1dae301239f7bbb7',1,'udp_sendto_if_src(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif, const ip_addr_t *src_ip): udp.c'],['../group__udp__raw.html#gaa389827c979c766c1dae301239f7bbb7',1,'udp_sendto_if_src(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif, const ip_addr_t *src_ip): udp.c']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_e.html b/Libraries/LwIP/doc/doxygen/output/html/search/functions_e.html new file mode 100644 index 0000000..e256cb6 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_e.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/functions_e.js b/Libraries/LwIP/doc/doxygen/output/html/search/functions_e.js new file mode 100644 index 0000000..babc6c0 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/functions_e.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['zepif_5finit',['zepif_init',['../group__zepif.html#gad61a6d9c1ab17e5b2c2c3eb9b42cc004',1,'zepif_init(struct netif *netif): zepif.c'],['../group__zepif.html#gad61a6d9c1ab17e5b2c2c3eb9b42cc004',1,'zepif_init(struct netif *netif): zepif.c']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_0.html b/Libraries/LwIP/doc/doxygen/output/html/search/groups_0.html new file mode 100644 index 0000000..1ede28d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_0.js b/Libraries/LwIP/doc/doxygen/output/html/search/groups_0.js new file mode 100644 index 0000000..d15c401 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['6lowpan_20over_20ble_20_28rfc7668_29',['6LoWPAN over BLE (RFC7668)',['../group__rfc7668if.html',1,'']]], + ['6lowpan_20_28rfc4944_29',['6LoWPAN (RFC4944)',['../group__sixlowpan.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_1.html b/Libraries/LwIP/doc/doxygen/output/html/search/groups_1.html new file mode 100644 index 0000000..3c05216 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_1.js b/Libraries/LwIP/doc/doxygen/output/html/search/groups_1.js new file mode 100644 index 0000000..b3451eb --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_1.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['application_20layered_20tcp_20functions',['Application layered TCP Functions',['../group__altcp.html',1,'']]], + ['application_20layered_20tcp_20introduction',['Application layered TCP Introduction',['../group__altcp__api.html',1,'']]], + ['apis',['APIs',['../group__api.html',1,'']]], + ['applications',['Applications',['../group__apps.html',1,'']]], + ['autoip',['AUTOIP',['../group__autoip.html',1,'']]], + ['assertion_20handling',['Assertion handling',['../group__lwip__assertions.html',1,'']]], + ['arp',['ARP',['../group__lwip__opts__arp.html',1,'']]], + ['autoip',['AUTOIP',['../group__lwip__opts__autoip.html',1,'']]], + ['autoip',['AUTOIP',['../group__netifapi__autoip.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_10.html b/Libraries/LwIP/doc/doxygen/output/html/search/groups_10.html new file mode 100644 index 0000000..b5d2c6b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_10.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_10.js b/Libraries/LwIP/doc/doxygen/output/html/search/groups_10.js new file mode 100644 index 0000000..d45fde9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_10.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['udp',['UDP',['../group__lwip__opts__udp.html',1,'']]], + ['udp_20only',['UDP only',['../group__netconn__udp.html',1,'']]], + ['udp',['UDP',['../group__udp__raw.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_11.html b/Libraries/LwIP/doc/doxygen/output/html/search/groups_11.html new file mode 100644 index 0000000..be44d3d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_11.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_11.js b/Libraries/LwIP/doc/doxygen/output/html/search/groups_11.js new file mode 100644 index 0000000..f234255 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_11.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['version',['Version',['../group__lwip__version.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_12.html b/Libraries/LwIP/doc/doxygen/output/html/search/groups_12.html new file mode 100644 index 0000000..f425e78 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_12.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_12.js b/Libraries/LwIP/doc/doxygen/output/html/search/groups_12.js new file mode 100644 index 0000000..b8b708b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_12.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['zep_20_2d_20zigbee_20encapsulation_20protocol',['ZEP - ZigBee Encapsulation Protocol',['../group__zepif.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_2.html b/Libraries/LwIP/doc/doxygen/output/html/search/groups_2.html new file mode 100644 index 0000000..7191495 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_2.js b/Libraries/LwIP/doc/doxygen/output/html/search/groups_2.js new file mode 100644 index 0000000..f583148 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_2.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['compiler_2fplatform_20abstraction',['Compiler/platform abstraction',['../group__compiler__abstraction.html',1,'']]], + ['callback_2dstyle_20apis',['Callback-style APIs',['../group__lwip__opts__callback.html',1,'']]], + ['checksum',['Checksum',['../group__lwip__opts__checksum.html',1,'']]], + ['core_20locking_20and_20mpu',['Core locking and MPU',['../group__lwip__opts__lock.html',1,'']]], + ['common_20functions',['Common functions',['../group__netconn__common.html',1,'']]], + ['client_20data_20handling',['Client data handling',['../group__netif__cd.html',1,'']]], + ['core',['Core',['../group__snmp__core.html',1,'']]], + ['critical_20sections',['Critical sections',['../group__sys__prot.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_3.html b/Libraries/LwIP/doc/doxygen/output/html/search/groups_3.html new file mode 100644 index 0000000..3af27ea --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_3.js b/Libraries/LwIP/doc/doxygen/output/html/search/groups_3.js new file mode 100644 index 0000000..cbab017 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_3.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['dhcpv4',['DHCPv4',['../group__dhcp4.html',1,'']]], + ['dhcpv6',['DHCPv6',['../group__dhcp6.html',1,'']]], + ['dns',['DNS',['../group__dns.html',1,'']]], + ['debugging',['Debugging',['../group__lwip__opts__debug.html',1,'']]], + ['debug_20messages',['Debug messages',['../group__lwip__opts__debugmsg.html',1,'']]], + ['dhcp',['DHCP',['../group__lwip__opts__dhcp.html',1,'']]], + ['dhcpv6',['DHCPv6',['../group__lwip__opts__dhcpv6.html',1,'']]], + ['dns',['DNS',['../group__lwip__opts__dns.html',1,'']]], + ['dhcpv4',['DHCPv4',['../group__netifapi__dhcp4.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_4.html b/Libraries/LwIP/doc/doxygen/output/html/search/groups_4.html new file mode 100644 index 0000000..e7abc74 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_4.js b/Libraries/LwIP/doc/doxygen/output/html/search/groups_4.js new file mode 100644 index 0000000..6e13660 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_4.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['ethernet',['Ethernet',['../group__ethernet.html',1,'']]], + ['error_20codes',['Error codes',['../group__infrastructure__errors.html',1,'']]], + ['ext_20arguments',['ext arguments',['../group__tcp__raw__extargs.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_5.html b/Libraries/LwIP/doc/doxygen/output/html/search/groups_5.html new file mode 100644 index 0000000..edc563e --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_5.js b/Libraries/LwIP/doc/doxygen/output/html/search/groups_5.js new file mode 100644 index 0000000..58b0b0d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_5.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['fdb_20example_20code',['FDB example code',['../group__bridgeif__fdb.html',1,'']]], + ['flags',['Flags',['../group__netif__flags.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_6.html b/Libraries/LwIP/doc/doxygen/output/html/search/groups_6.html new file mode 100644 index 0000000..176b61a --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_6.js b/Libraries/LwIP/doc/doxygen/output/html/search/groups_6.js new file mode 100644 index 0000000..0a8f1a9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_6.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['http_20client',['HTTP client',['../group__httpc.html',1,'']]], + ['http_20server',['HTTP server',['../group__httpd.html',1,'']]], + ['hooks',['Hooks',['../group__lwip__opts__hooks.html',1,'']]], + ['heap_20and_20memory_20pools',['Heap and memory pools',['../group__lwip__opts__mem.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_7.html b/Libraries/LwIP/doc/doxygen/output/html/search/groups_7.html new file mode 100644 index 0000000..0b8fa02 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_7.js b/Libraries/LwIP/doc/doxygen/output/html/search/groups_7.js new file mode 100644 index 0000000..b80fdf4 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_7.js @@ -0,0 +1,26 @@ +var searchData= +[ + ['ieee_20802_2e1d_20bridge',['IEEE 802.1D bridge',['../group__bridgeif.html',1,'']]], + ['iana_20assigned_20numbers',['IANA assigned numbers',['../group__iana.html',1,'']]], + ['ieee_20assigned_20numbers',['IEEE assigned numbers',['../group__ieee.html',1,'']]], + ['interface_20identification_20api',['Interface Identification API',['../group__if__api.html',1,'']]], + ['igmp',['IGMP',['../group__igmp.html',1,'']]], + ['infrastructure',['Infrastructure',['../group__infrastructure.html',1,'']]], + ['ip',['IP',['../group__ip.html',1,'']]], + ['ipv4',['IPv4',['../group__ip4.html',1,'']]], + ['ipv4_20only',['IPv4 only',['../group__ip4addr.html',1,'']]], + ['ipv6',['IPv6',['../group__ip6.html',1,'']]], + ['ipv6_20zones',['IPv6 Zones',['../group__ip6__zones.html',1,'']]], + ['ipv6_20only',['IPv6 only',['../group__ip6addr.html',1,'']]], + ['ip_20address_20handling',['IP address handling',['../group__ipaddr.html',1,'']]], + ['iperf_20server',['Iperf server',['../group__iperf.html',1,'']]], + ['icmp',['ICMP',['../group__lwip__opts__icmp.html',1,'']]], + ['icmp6',['ICMP6',['../group__lwip__opts__icmp6.html',1,'']]], + ['igmp',['IGMP',['../group__lwip__opts__igmp.html',1,'']]], + ['infrastructure',['Infrastructure',['../group__lwip__opts__infrastructure.html',1,'']]], + ['ipv4',['IPv4',['../group__lwip__opts__ipv4.html',1,'']]], + ['ipv6',['IPv6',['../group__lwip__opts__ipv6.html',1,'']]], + ['internal_20memory_20pools',['Internal memory pools',['../group__lwip__opts__memp.html',1,'']]], + ['ipv4_20address_20handling',['IPv4 address handling',['../group__netif__ip4.html',1,'']]], + ['ipv6_20address_20handling',['IPv6 address handling',['../group__netif__ip6.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_8.html b/Libraries/LwIP/doc/doxygen/output/html/search/groups_8.html new file mode 100644 index 0000000..5bee592 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_8.js b/Libraries/LwIP/doc/doxygen/output/html/search/groups_8.js new file mode 100644 index 0000000..e0d2697 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_8.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['lwip_5fdbg_5fmin_5flevel_20and_20lwip_5fdbg_5ftypes_5fon_20values',['LWIP_DBG_MIN_LEVEL and LWIP_DBG_TYPES_ON values',['../group__debugging__levels.html',1,'']]], + ['lwip',['lwIP',['../group__lwip.html',1,'']]], + ['loopback_20interface',['Loopback interface',['../group__lwip__opts__loop.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_9.html b/Libraries/LwIP/doc/doxygen/output/html/search/groups_9.html new file mode 100644 index 0000000..00d9cb3 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_9.js b/Libraries/LwIP/doc/doxygen/output/html/search/groups_9.js new file mode 100644 index 0000000..99327d3 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_9.js @@ -0,0 +1,16 @@ +var searchData= +[ + ['mainloop_20mode_20_28_22no_5fsys_22_29',['Mainloop mode ("NO_SYS")',['../group__lwip__nosys.html',1,'']]], + ['memcpy',['memcpy',['../group__lwip__opts__memcpy.html',1,'']]], + ['multicast_20listener_20discovery',['Multicast listener discovery',['../group__lwip__opts__mld6.html',1,'']]], + ['multicast',['Multicast',['../group__lwip__opts__multicast.html',1,'']]], + ['mdns',['MDNS',['../group__mdns.html',1,'']]], + ['memory_20pools',['Memory pools',['../group__mempool.html',1,'']]], + ['mld6',['MLD6',['../group__mld6.html',1,'']]], + ['mqtt_20client',['MQTT client',['../group__mqtt.html',1,'']]], + ['mib2_20statistics',['MIB2 statistics',['../group__netif__mib2.html',1,'']]], + ['mib2',['MIB2',['../group__snmp__mib2.html',1,'']]], + ['mailboxes',['Mailboxes',['../group__sys__mbox.html',1,'']]], + ['misc',['Misc',['../group__sys__misc.html',1,'']]], + ['mutexes',['Mutexes',['../group__sys__mutex.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_a.html b/Libraries/LwIP/doc/doxygen/output/html/search/groups_a.html new file mode 100644 index 0000000..4949930 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_a.js b/Libraries/LwIP/doc/doxygen/output/html/search/groups_a.js new file mode 100644 index 0000000..b81af57 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_a.js @@ -0,0 +1,16 @@ +var searchData= +[ + ['neighbor_20discovery',['Neighbor discovery',['../group__lwip__opts__nd6.html',1,'']]], + ['netconn',['Netconn',['../group__lwip__opts__netconn.html',1,'']]], + ['netif',['NETIF',['../group__lwip__opts__netif.html',1,'']]], + ['no_5fsys',['NO_SYS',['../group__lwip__opts__nosys.html',1,'']]], + ['netbios_20responder',['NETBIOS responder',['../group__netbiosns.html',1,'']]], + ['network_20buffers',['Network buffers',['../group__netbuf.html',1,'']]], + ['netconn_20api',['Netconn API',['../group__netconn.html',1,'']]], + ['netdb_20api',['NETDB API',['../group__netdbapi.html',1,'']]], + ['network_20interface_20_28netif_29',['Network interface (NETIF)',['../group__netif.html',1,'']]], + ['netif_20api',['NETIF API',['../group__netifapi.html',1,'']]], + ['netif_20related',['NETIF related',['../group__netifapi__netif.html',1,'']]], + ['netifs',['NETIFs',['../group__netifs.html',1,'']]], + ['non_2dstandard_20functions',['Non-standard functions',['../group__sys__nonstandard.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_b.html b/Libraries/LwIP/doc/doxygen/output/html/search/groups_b.html new file mode 100644 index 0000000..cc59f7f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_b.js b/Libraries/LwIP/doc/doxygen/output/html/search/groups_b.js new file mode 100644 index 0000000..1df0486 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_b.js @@ -0,0 +1,15 @@ +var searchData= +[ + ['options',['Options',['../group__bridgeif__opts.html',1,'']]], + ['options',['Options',['../group__httpd__opts.html',1,'']]], + ['options_20_28lwipopts_2eh_29',['Options (lwipopts.h)',['../group__lwip__opts.html',1,'']]], + ['os_20mode_20_28tcpip_20thread_29',['OS mode (TCPIP thread)',['../group__lwip__os.html',1,'']]], + ['options',['Options',['../group__mdns__opts.html',1,'']]], + ['options',['Options',['../group__mqtt__opts.html',1,'']]], + ['options',['Options',['../group__netbiosns__opts.html',1,'']]], + ['options',['Options',['../group__smtp__opts.html',1,'']]], + ['options',['Options',['../group__snmp__opts.html',1,'']]], + ['options',['Options',['../group__sntp__opts.html',1,'']]], + ['os_20abstraction_20layer',['OS abstraction layer',['../group__sys__os.html',1,'']]], + ['options',['Options',['../group__tftp__opts.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_c.html b/Libraries/LwIP/doc/doxygen/output/html/search/groups_c.html new file mode 100644 index 0000000..07a0716 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_c.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_c.js b/Libraries/LwIP/doc/doxygen/output/html/search/groups_c.js new file mode 100644 index 0000000..af3e141 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_c.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['pbuf',['PBUF',['../group__lwip__opts__pbuf.html',1,'']]], + ['performance',['Performance',['../group__lwip__opts__perf.html',1,'']]], + ['packet_20buffers_20_28pbuf_29',['Packet buffers (PBUF)',['../group__pbuf.html',1,'']]], + ['performance_20measurement',['Performance measurement',['../group__perf.html',1,'']]], + ['ppp',['PPP',['../group__ppp.html',1,'']]], + ['porting_20_28system_20abstraction_20layer_29',['Porting (system abstraction layer)',['../group__sys__layer.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_d.html b/Libraries/LwIP/doc/doxygen/output/html/search/groups_d.html new file mode 100644 index 0000000..1713df4 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_d.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_d.js b/Libraries/LwIP/doc/doxygen/output/html/search/groups_d.js new file mode 100644 index 0000000..c44b733 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_d.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['raw',['RAW',['../group__lwip__opts__raw.html',1,'']]], + ['raw',['RAW',['../group__raw__raw.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_e.html b/Libraries/LwIP/doc/doxygen/output/html/search/groups_e.html new file mode 100644 index 0000000..459d030 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_e.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_e.js b/Libraries/LwIP/doc/doxygen/output/html/search/groups_e.js new file mode 100644 index 0000000..486ca25 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_e.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['snmp_20mib2_20callbacks',['SNMP MIB2 callbacks',['../group__lwip__opts__mib2.html',1,'']]], + ['sockets',['Sockets',['../group__lwip__opts__socket.html',1,'']]], + ['statistics',['Statistics',['../group__lwip__opts__stats.html',1,'']]], + ['sequential_2dstyle_20apis',['Sequential-style APIs',['../group__sequential__api.html',1,'']]], + ['slip',['SLIP',['../group__slipif.html',1,'']]], + ['smtp_20client',['SMTP client',['../group__smtp.html',1,'']]], + ['snmpv2c_2fv3_20agent',['SNMPv2c/v3 agent',['../group__snmp.html',1,'']]], + ['sntp',['SNTP',['../group__sntp.html',1,'']]], + ['socket_20api',['Socket API',['../group__socket.html',1,'']]], + ['semaphores',['Semaphores',['../group__sys__sem.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_f.html b/Libraries/LwIP/doc/doxygen/output/html/search/groups_f.html new file mode 100644 index 0000000..9689c57 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_f.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/groups_f.js b/Libraries/LwIP/doc/doxygen/output/html/search/groups_f.js new file mode 100644 index 0000000..f0e816c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/groups_f.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['tls_20layer',['TLS layer',['../group__altcp__tls.html',1,'']]], + ['tcp',['TCP',['../group__lwip__opts__tcp.html',1,'']]], + ['threading',['Threading',['../group__lwip__opts__thread.html',1,'']]], + ['thread_2dsafe_20apis',['Thread-safe APIs',['../group__lwip__opts__threadsafe__apis.html',1,'']]], + ['timers',['Timers',['../group__lwip__opts__timers.html',1,'']]], + ['tcp_20only',['TCP only',['../group__netconn__tcp.html',1,'']]], + ['traps',['Traps',['../group__snmp__traps.html',1,'']]], + ['time',['Time',['../group__sys__time.html',1,'']]], + ['tcp',['TCP',['../group__tcp__raw.html',1,'']]], + ['tftp_20server',['TFTP server',['../group__tftp.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/nomatches.html b/Libraries/LwIP/doc/doxygen/output/html/search/nomatches.html new file mode 100644 index 0000000..b1ded27 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/nomatches.html @@ -0,0 +1,12 @@ + + + + + + + +
                  +
                  No Matches
                  +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/pages_0.html b/Libraries/LwIP/doc/doxygen/output/html/search/pages_0.html new file mode 100644 index 0000000..4955b9e --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/pages_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/pages_0.js b/Libraries/LwIP/doc/doxygen/output/html/search/pages_0.js new file mode 100644 index 0000000..d6c1967 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/pages_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['changelog',['Changelog',['../changelog.html',1,'']]], + ['common_20pitfalls',['Common pitfalls',['../pitfalls.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/pages_1.html b/Libraries/LwIP/doc/doxygen/output/html/search/pages_1.html new file mode 100644 index 0000000..aedb14e --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/pages_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/pages_1.js b/Libraries/LwIP/doc/doxygen/output/html/search/pages_1.js new file mode 100644 index 0000000..038da54 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/pages_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['deprecated_20list',['Deprecated List',['../deprecated.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/pages_2.html b/Libraries/LwIP/doc/doxygen/output/html/search/pages_2.html new file mode 100644 index 0000000..bd91593 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/pages_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/pages_2.js b/Libraries/LwIP/doc/doxygen/output/html/search/pages_2.js new file mode 100644 index 0000000..92a9f3d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/pages_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['how_20to_20contribute_20to_20lwip',['How to contribute to lwIP',['../contrib.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/pages_3.html b/Libraries/LwIP/doc/doxygen/output/html/search/pages_3.html new file mode 100644 index 0000000..bc0e37f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/pages_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/pages_3.js b/Libraries/LwIP/doc/doxygen/output/html/search/pages_3.js new file mode 100644 index 0000000..2e2afba --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/pages_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['multithreading',['Multithreading',['../multithreading.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/pages_4.html b/Libraries/LwIP/doc/doxygen/output/html/search/pages_4.html new file mode 100644 index 0000000..d4c3e8e --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/pages_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/pages_4.js b/Libraries/LwIP/doc/doxygen/output/html/search/pages_4.js new file mode 100644 index 0000000..fce55ed --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/pages_4.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['overview',['Overview',['../index.html',1,'']]], + ['optimization_20hints',['Optimization hints',['../optimization.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/pages_5.html b/Libraries/LwIP/doc/doxygen/output/html/search/pages_5.html new file mode 100644 index 0000000..af17efe --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/pages_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/pages_5.js b/Libraries/LwIP/doc/doxygen/output/html/search/pages_5.js new file mode 100644 index 0000000..9f888bf --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/pages_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['reporting_20bugs',['Reporting bugs',['../bugs.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/pages_6.html b/Libraries/LwIP/doc/doxygen/output/html/search/pages_6.html new file mode 100644 index 0000000..52583b3 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/pages_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/pages_6.js b/Libraries/LwIP/doc/doxygen/output/html/search/pages_6.js new file mode 100644 index 0000000..53e8a96 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/pages_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['system_20initalization',['System initalization',['../sys_init.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/pages_7.html b/Libraries/LwIP/doc/doxygen/output/html/search/pages_7.html new file mode 100644 index 0000000..7d4b8fe --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/pages_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/pages_7.js b/Libraries/LwIP/doc/doxygen/output/html/search/pages_7.js new file mode 100644 index 0000000..3d8a2b7 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/pages_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['upgrading',['Upgrading',['../upgrading.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/pages_8.html b/Libraries/LwIP/doc/doxygen/output/html/search/pages_8.html new file mode 100644 index 0000000..b704407 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/pages_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/pages_8.js b/Libraries/LwIP/doc/doxygen/output/html/search/pages_8.js new file mode 100644 index 0000000..ab360e0 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/pages_8.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['zero_2dcopy_20rx',['Zero-copy RX',['../zerocopyrx.html',1,'']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/search.css b/Libraries/LwIP/doc/doxygen/output/html/search/search.css new file mode 100644 index 0000000..3cf9df9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/search.css @@ -0,0 +1,271 @@ +/*---------------- Search Box */ + +#FSearchBox { + float: left; +} + +#MSearchBox { + white-space : nowrap; + float: none; + margin-top: 8px; + right: 0px; + width: 170px; + height: 24px; + z-index: 102; +} + +#MSearchBox .left +{ + display:block; + position:absolute; + left:10px; + width:20px; + height:19px; + background:url('search_l.png') no-repeat; + background-position:right; +} + +#MSearchSelect { + display:block; + position:absolute; + width:20px; + height:19px; +} + +.left #MSearchSelect { + left:4px; +} + +.right #MSearchSelect { + right:5px; +} + +#MSearchField { + display:block; + position:absolute; + height:19px; + background:url('search_m.png') repeat-x; + border:none; + width:115px; + margin-left:20px; + padding-left:4px; + color: #909090; + outline: none; + font: 9pt Arial, Verdana, sans-serif; + -webkit-border-radius: 0px; +} + +#FSearchBox #MSearchField { + margin-left:15px; +} + +#MSearchBox .right { + display:block; + position:absolute; + right:10px; + top:8px; + width:20px; + height:19px; + background:url('search_r.png') no-repeat; + background-position:left; +} + +#MSearchClose { + display: none; + position: absolute; + top: 4px; + background : none; + border: none; + margin: 0px 4px 0px 0px; + padding: 0px 0px; + outline: none; +} + +.left #MSearchClose { + left: 6px; +} + +.right #MSearchClose { + right: 2px; +} + +.MSearchBoxActive #MSearchField { + color: #000000; +} + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #90A5CE; + background-color: #F9FAFC; + z-index: 10001; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.SelectItem { + font: 8pt Arial, Verdana, sans-serif; + padding-left: 2px; + padding-right: 12px; + border: 0px; +} + +span.SelectionMark { + margin-right: 4px; + font-family: monospace; + outline-style: none; + text-decoration: none; +} + +a.SelectItem { + display: block; + outline-style: none; + color: #000000; + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} + +a.SelectItem:focus, +a.SelectItem:active { + color: #000000; + outline-style: none; + text-decoration: none; +} + +a.SelectItem:hover { + color: #FFFFFF; + background-color: #3D578C; + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + width: 60ex; + height: 15em; +} + +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #000; + background-color: #EEF1F7; + z-index:10000; +} + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; + padding-bottom: 15px; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} + +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} + +body.SRPage { + margin: 5px 2px; +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} + +.SRPage .SRChildren { + display: none; +} + +.SRSymbol { + font-weight: bold; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRSymbol:focus, a.SRSymbol:active, +a.SRScope:focus, a.SRScope:active { + text-decoration: underline; +} + +span.SRScope { + padding-left: 4px; +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; +} + +.SRResult { + display: none; +} + +DIV.searchresults { + margin-left: 10px; + margin-right: 10px; +} + +/*---------------- External search page results */ + +.searchresult { + background-color: #F0F3F8; +} + +.pages b { + color: white; + padding: 5px 5px 3px 5px; + background-image: url("../tab_a.png"); + background-repeat: repeat-x; + text-shadow: 0 1px 1px #000000; +} + +.pages { + line-height: 17px; + margin-left: 4px; + text-decoration: none; +} + +.hl { + font-weight: bold; +} + +#searchresults { + margin-bottom: 20px; +} + +.searchpages { + margin-top: 10px; +} + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/search.js b/Libraries/LwIP/doc/doxygen/output/html/search/search.js new file mode 100644 index 0000000..dedce3b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/search.js @@ -0,0 +1,791 @@ +function convertToId(search) +{ + var result = ''; + for (i=0;i do a search + { + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex0) // Up + { + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } + else if (e.keyCode==13 || e.keyCode==27) + { + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() + { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() + { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() + { + this.keyTimeout = 0; + + // strip leading whitespace + var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + var code = searchValue.toLowerCase().charCodeAt(0); + var idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair + { + idxChar = searchValue.substr(0, 2); + } + + var resultsPage; + var resultsPageWithSearch; + var hasResultsPage; + + var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) + { + var hexCode=idx.toString(16); + resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; + resultsPageWithSearch = resultsPage+'?'+escape(searchValue); + hasResultsPage = true; + } + else // nothing available for this search term + { + resultsPage = this.resultsPath + '/nomatches.html'; + resultsPageWithSearch = resultsPage; + hasResultsPage = false; + } + + window.frames.MSearchResults.location = resultsPageWithSearch; + var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + + if (domPopupSearchResultsWindow.style.display!='block') + { + var domSearchBox = this.DOMSearchBox(); + this.DOMSearchClose().style.display = 'inline'; + if (this.insideFrame) + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + domPopupSearchResultsWindow.style.position = 'relative'; + domPopupSearchResultsWindow.style.display = 'block'; + var width = document.body.clientWidth - 8; // the -8 is for IE :-( + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResults.style.width = width + 'px'; + } + else + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; + var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + } + } + + this.lastSearchValue = searchValue; + this.lastResultsPage = resultsPage; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) + { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) + { + this.DOMSearchBox().className = 'MSearchBoxActive'; + + var searchField = this.DOMSearchField(); + + if (searchField.value == this.searchLabel) // clear "Search" term upon entry + { + searchField.value = ''; + this.searchActive = true; + } + } + else if (!isActive) // directly remove the panel + { + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.DOMSearchField().value = this.searchLabel; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults(name) +{ + // The number of matches from the last run of . + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) + { + var parentElement = document.getElementById(id); + var element = parentElement.firstChild; + + while (element && element!=parentElement) + { + if (element.nodeName == 'DIV' && element.className == 'SRChildren') + { + return element; + } + + if (element.nodeName == 'DIV' && element.hasChildNodes()) + { + element = element.firstChild; + } + else if (element.nextSibling) + { + element = element.nextSibling; + } + else + { + do + { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) + { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) + { + var element = this.FindChildElement(id); + if (element) + { + if (element.style.display == 'block') + { + element.style.display = 'none'; + } + else + { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) + { + if (!search) // get search word from URL + { + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + var resultRows = document.getElementsByTagName("div"); + var matches = 0; + + var i = 0; + while (i < resultRows.length) + { + var row = resultRows.item(i); + if (row.className == "SRResult") + { + var rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) + { + row.style.display = 'block'; + matches++; + } + else + { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) // no results + { + document.getElementById("NoMatches").style.display='block'; + } + else // at least one result + { + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) + { + if (e.type == "keydown") + { + this.repeatOn = false; + this.lastKey = e.keyCode; + } + else if (e.type == "keypress") + { + if (!this.repeatOn) + { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } + else if (e.type == "keyup") + { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + var newIndex = itemIndex-1; + var focusItem = this.NavPrev(newIndex); + if (focusItem) + { + var child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') // children visible + { + var n=0; + var tmpElem; + while (1) // search for last child + { + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) + { + focusItem = tmpElem; + } + else // found it! + { + break; + } + n++; + } + } + } + if (focusItem) + { + focusItem.focus(); + } + else // return focus to search field + { + parent.document.getElementById("MSearchField").focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = itemIndex+1; + var focusItem; + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') // children visible + { + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } + else if (this.lastKey==39) // Right + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } + else if (this.lastKey==37) // Left + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + if (childIndex>0) + { + var newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } + else // already at first child, jump to parent + { + document.getElementById('Item'+itemIndex).focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = childIndex+1; + var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) // last child, jump to parent next parent + { + elem = this.NavNext(itemIndex+1); + } + if (elem) + { + elem.focus(); + } + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } +} + +function setKeyActions(elem,action) +{ + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); +} + +function setClassAttr(elem,attr) +{ + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); +} + +function createResults() +{ + var results = document.getElementById("SRResults"); + for (var e=0; e + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_0.js b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_0.js new file mode 100644 index 0000000..4e801d7 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['altcp_5fallocator_5ft',['altcp_allocator_t',['../group__altcp.html#ga9ddf490e24b1472a96ab2b4cedd171f8',1,'altcp.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_1.html b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_1.html new file mode 100644 index 0000000..b77c533 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_1.js b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_1.js new file mode 100644 index 0000000..bd7eae7 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['bridgeif_5finitdata_5ft',['bridgeif_initdata_t',['../group__bridgeif.html#gac47f8ce66bc6dad5dd9829467f93a1bb',1,'bridgeif.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_2.html b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_2.html new file mode 100644 index 0000000..076311d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_2.js b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_2.js new file mode 100644 index 0000000..f713521 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['dns_5ffound_5fcallback',['dns_found_callback',['../dns_8h.html#ab5a9dec5b22802f91876c53e99f427ae',1,'dns.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_3.html b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_3.html new file mode 100644 index 0000000..a4a727f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_3.js b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_3.js new file mode 100644 index 0000000..0e3641f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['err_5ft',['err_t',['../group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb',1,'err.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_4.html b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_4.html new file mode 100644 index 0000000..be033cd --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_4.js b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_4.js new file mode 100644 index 0000000..21cc781 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_4.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['httpc_5fheaders_5fdone_5ffn',['httpc_headers_done_fn',['../group__httpc.html#ga1e5b62519d6592c89ed3edfabd917472',1,'http_client.h']]], + ['httpc_5fresult_5ffn',['httpc_result_fn',['../group__httpc.html#ga0452eb8007dbb5f139ec992e58e560dd',1,'http_client.h']]], + ['httpc_5fresult_5ft',['httpc_result_t',['../group__httpc.html#gac6713454283bff8e1187849e8d4bda18',1,'http_client.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_5.html b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_5.html new file mode 100644 index 0000000..e10c325 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_5.js b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_5.js new file mode 100644 index 0000000..87fd03e --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_5.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['ip4_5faddr_5ft',['ip4_addr_t',['../ip4__addr_8h.html#a3d3b45daffbc15d65da236e31e621b7e',1,'ip4_addr.h']]], + ['ip6_5faddr_5ft',['ip6_addr_t',['../ip6__addr_8h.html#aaca9e796e93a355294c4954c08d01762',1,'ip6_addr.h']]], + ['ip_5faddr_5ft',['ip_addr_t',['../group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a',1,'ip_addr.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_6.html b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_6.html new file mode 100644 index 0000000..4e206e8 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_6.js b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_6.js new file mode 100644 index 0000000..d744e0f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_6.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['lwip_5fcyclic_5ftimer_5fhandler',['lwip_cyclic_timer_handler',['../timeouts_8h.html#a985c5d366b62bd179195e093ffcb7ecd',1,'timeouts.h']]], + ['lwip_5fthread_5ffn',['lwip_thread_fn',['../sys_8h.html#ae30a77bf6bd69bfcc5f235eaad54f2b9',1,'sys.h']]], + ['lwiperf_5freport_5ffn',['lwiperf_report_fn',['../lwiperf_8h.html#a248ea47a58a14c6aecf6525217a812fd',1,'lwiperf.h']]], + ['lwiperf_5fsettings_5ft',['lwiperf_settings_t',['../lwiperf_8c.html#a4a794a0c1a90b889d54b1dacbce923f4',1,'lwiperf.c']]], + ['lwiperf_5fstate_5ftcp_5ft',['lwiperf_state_tcp_t',['../lwiperf_8c.html#a06db7abdf1d4864ca2b367d9c89e3e2d',1,'lwiperf.c']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_7.html b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_7.html new file mode 100644 index 0000000..cc182ee --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_7.js b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_7.js new file mode 100644 index 0000000..59d9346 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_7.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['mdns_5fname_5fresult_5fcb_5ft',['mdns_name_result_cb_t',['../mdns_8h.html#a19f12d7092de6fe90d5843e4ef8d4536',1,'mdns.h']]], + ['mqtt_5fconnection_5fcb_5ft',['mqtt_connection_cb_t',['../group__mqtt.html#ga8558743bdb7d599a93844fbc56c9029f',1,'mqtt.h']]], + ['mqtt_5fincoming_5fdata_5fcb_5ft',['mqtt_incoming_data_cb_t',['../group__mqtt.html#gafec7e75fe6a746eef9ca411463446c81',1,'mqtt.h']]], + ['mqtt_5fincoming_5fpublish_5fcb_5ft',['mqtt_incoming_publish_cb_t',['../group__mqtt.html#ga7116bb85255394cec4b1d9fa38842c29',1,'mqtt.h']]], + ['mqtt_5frequest_5fcb_5ft',['mqtt_request_cb_t',['../group__mqtt.html#gacad2bbe2cee76eaa120cc63e2f6094fd',1,'mqtt.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_8.html b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_8.html new file mode 100644 index 0000000..9379676 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_8.js b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_8.js new file mode 100644 index 0000000..00d0d24 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_8.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['netconn_5fcallback',['netconn_callback',['../api_8h.html#a3e130339f00202b3ab714af502163a2d',1,'api.h']]], + ['netif_5fext_5fcallback_5ffn',['netif_ext_callback_fn',['../group__netif.html#ga5ee213cea065424c89c66f138c008da1',1,'netif.h']]], + ['netif_5figmp_5fmac_5ffilter_5ffn',['netif_igmp_mac_filter_fn',['../netif_8h.html#a71cad3277efe29191eef3348f4bf21f7',1,'netif.h']]], + ['netif_5finit_5ffn',['netif_init_fn',['../netif_8h.html#a2b02a78a8769925ff8e4f83d34e5e1f5',1,'netif.h']]], + ['netif_5finput_5ffn',['netif_input_fn',['../netif_8h.html#ab2302b1b64ac7b95f24c6bab754a575e',1,'netif.h']]], + ['netif_5flinkoutput_5ffn',['netif_linkoutput_fn',['../netif_8h.html#ab75e9d808bc1b788bea84213e6a111ed',1,'netif.h']]], + ['netif_5fmld_5fmac_5ffilter_5ffn',['netif_mld_mac_filter_fn',['../netif_8h.html#af2ed0716122b65e7feb43e0dd99ae468',1,'netif.h']]], + ['netif_5fnsc_5freason_5ft',['netif_nsc_reason_t',['../group__netif.html#gab2b9387389513a02027c62e246723808',1,'netif.h']]], + ['netif_5foutput_5ffn',['netif_output_fn',['../netif_8h.html#a7b4893aa2ed8c606a0cd7aa932fe5067',1,'netif.h']]], + ['netif_5foutput_5fip6_5ffn',['netif_output_ip6_fn',['../netif_8h.html#a343a5b14136a51957d552527384674b3',1,'netif.h']]], + ['netif_5fstatus_5fcallback_5ffn',['netif_status_callback_fn',['../netif_8h.html#a447d0a7e7c6e2396557c287b8b8c9436',1,'netif.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_9.html b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_9.html new file mode 100644 index 0000000..6f2b9ea --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_9.js b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_9.js new file mode 100644 index 0000000..29f6dd6 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_9.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['pbuf_5ffree_5fcustom_5ffn',['pbuf_free_custom_fn',['../pbuf_8h.html#a6d285ce1d910f25e511c8c38532a1dce',1,'pbuf.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_a.html b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_a.html new file mode 100644 index 0000000..b897e1c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_a.js b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_a.js new file mode 100644 index 0000000..c1b2be9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_a.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['raw_5finput_5fstate_5ft',['raw_input_state_t',['../raw__priv_8h.html#aebbdbaee89c38ad9c007a1d1a336e687',1,'raw_priv.h']]], + ['raw_5frecv_5ffn',['raw_recv_fn',['../raw_8h.html#a17edd059f34f45a770fe2fa458ecf4dd',1,'raw.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_b.html b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_b.html new file mode 100644 index 0000000..23bfdac --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_b.js b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_b.js new file mode 100644 index 0000000..0382cc8 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_b.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['service_5fget_5ftxt_5ffn_5ft',['service_get_txt_fn_t',['../mdns_8h.html#a3b9ee5953214665e585e5bcaf6b8ea83',1,'mdns.h']]], + ['sys_5ftimeout_5fhandler',['sys_timeout_handler',['../timeouts_8h.html#a2ab5bb8173f492563f70a519011b0ac1',1,'timeouts.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_c.html b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_c.html new file mode 100644 index 0000000..28f5aad --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_c.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_c.js b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_c.js new file mode 100644 index 0000000..1e1e0f1 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_c.js @@ -0,0 +1,15 @@ +var searchData= +[ + ['tcgihandler',['tCGIHandler',['../group__httpd.html#gafe011a487c5e8d03a6b2f629e14e6b5c',1,'httpd.h']]], + ['tcp_5faccept_5ffn',['tcp_accept_fn',['../tcp_8h.html#a00517abce6856d6c82f0efebdafb734d',1,'tcp.h']]], + ['tcp_5fconnected_5ffn',['tcp_connected_fn',['../tcp_8h.html#a939867106bd492caf2d85852fb7f6ae8',1,'tcp.h']]], + ['tcp_5ferr_5ffn',['tcp_err_fn',['../tcp_8h.html#a1b4f9e3551e575c0ef06d6daa7f06e55',1,'tcp.h']]], + ['tcp_5fextarg_5fcallback_5fpassive_5fopen_5ffn',['tcp_extarg_callback_passive_open_fn',['../tcp_8h.html#aba649c5bdf19d47e39643392b6d88588',1,'tcp.h']]], + ['tcp_5fextarg_5fcallback_5fpcb_5fdestroyed_5ffn',['tcp_extarg_callback_pcb_destroyed_fn',['../tcp_8h.html#a20881e537f5be7847d88fe2a0c8fd2cd',1,'tcp.h']]], + ['tcp_5fpoll_5ffn',['tcp_poll_fn',['../tcp_8h.html#a66deb97618a9cd9d57fca28c5245e073',1,'tcp.h']]], + ['tcp_5frecv_5ffn',['tcp_recv_fn',['../tcp_8h.html#a780cfac08b02c66948ab94ea974202e8',1,'tcp.h']]], + ['tcp_5fsent_5ffn',['tcp_sent_fn',['../tcp_8h.html#aa60622ffaa099e97f66fb56e437fca18',1,'tcp.h']]], + ['tcpip_5fcallback_5ffn',['tcpip_callback_fn',['../tcpip_8h.html#a35203296bb838f3b493839ffc6e7285d',1,'tcpip.h']]], + ['tcpip_5finit_5fdone_5ffn',['tcpip_init_done_fn',['../tcpip_8h.html#a5fe07216c441e27c3028bcac60fa0992',1,'tcpip.h']]], + ['tssihandler',['tSSIHandler',['../group__httpd.html#gaf88dacc4f18d299084cab75252001319',1,'httpd.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_d.html b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_d.html new file mode 100644 index 0000000..1579482 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_d.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_d.js b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_d.js new file mode 100644 index 0000000..fd122a7 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/typedefs_d.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['udp_5frecv_5ffn',['udp_recv_fn',['../udp_8h.html#af0ec7feb31acdb6e11b928f438c8a64b',1,'udp.h']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_0.html b/Libraries/LwIP/doc/doxygen/output/html/search/variables_0.html new file mode 100644 index 0000000..74ce807 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_0.js b/Libraries/LwIP/doc/doxygen/output/html/search/variables_0.js new file mode 100644 index 0000000..92b66e2 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_0.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['_5fhoplim',['_hoplim',['../structip6__hdr.html#af9cbfa5fa280a7a982a1c6268fa13a5a',1,'ip6_hdr']]], + ['_5fnexth',['_nexth',['../structip6__hdr.html#abe3d612d4570864c922e18ed838292f6',1,'ip6_hdr']]], + ['_5fplen',['_plen',['../structip6__hdr.html#a9d225109d601ae8b34bab6ca3528fa94',1,'ip6_hdr']]], + ['_5fv_5ftc_5ffl',['_v_tc_fl',['../structip6__hdr.html#ad3b638f503a3f7e7724cf4c7b2c0a0b5',1,'ip6_hdr']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_1.html b/Libraries/LwIP/doc/doxygen/output/html/search/variables_1.html new file mode 100644 index 0000000..84237b6 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_1.js b/Libraries/LwIP/doc/doxygen/output/html/search/variables_1.js new file mode 100644 index 0000000..0fa3730 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_1.js @@ -0,0 +1,20 @@ +var searchData= +[ + ['acceptmbox',['acceptmbox',['../structnetconn.html#a9b59188f300828d2b5814e27ab27cad0',1,'netconn']]], + ['access',['access',['../structsnmp__node__instance.html#a4af17d17a971f1d11a186e6e1fc4411c',1,'snmp_node_instance']]], + ['ad',['ad',['../structapi__msg.html#a36dedcbd9ecca67043a8e1d1e715be94',1,'api_msg']]], + ['additional',['additional',['../structmdns__outpacket.html#acda83121a9bb785d20f979a0a3a312ce',1,'mdns_outpacket']]], + ['addr',['addr',['../structdns__api__msg.html#a217814594564077d21b0f2696280b2a8',1,'dns_api_msg::addr()'],['../structzepif__init.html#a5a9a7ee6e687a7c1ae85b103d39de61d',1,'zepif_init::addr()']]], + ['addr_5findex',['addr_index',['../structnetif__ext__callback__args__t_1_1ipv6__set__s.html#ad44a5f52ad695ea90b15a1e29ff823dd',1,'netif_ext_callback_args_t::ipv6_set_s::addr_index()'],['../structnetif__ext__callback__args__t_1_1ipv6__addr__state__changed__s.html#aebf2aa0b26b07ca1977c676a0404323f',1,'netif_ext_callback_args_t::ipv6_addr_state_changed_s::addr_index()']]], + ['address',['address',['../structnetif__ext__callback__args__t_1_1ipv6__addr__state__changed__s.html#acd24c243c866f8f9169b89af11974f17',1,'netif_ext_callback_args_t::ipv6_addr_state_changed_s']]], + ['alloc',['alloc',['../structaltcp__allocator__s.html#aaf07ebf181a11d0320381ef46d40e687',1,'altcp_allocator_s']]], + ['answer_5fname',['answer_name',['../structnetbios__answer.html#abf746cd54add594216ddc3683c741406',1,'netbios_answer']]], + ['answer_5fname_5fflags',['answer_name_flags',['../structnetbios__answer.html#a2729b7249e3d23309624cb19fa0dbfc4',1,'netbios_answer']]], + ['answers',['answers',['../structmdns__packet.html#a918feee242cfb3934d9f5c3de1c298e7',1,'mdns_packet::answers()'],['../structmdns__outpacket.html#aad2c24d4d5a935a209966ceace82f9ad',1,'mdns_outpacket::answers()']]], + ['answers_5fleft',['answers_left',['../structmdns__packet.html#a56ba495a1458a21982e65d746468849d',1,'mdns_packet']]], + ['arg',['arg',['../structaltcp__allocator__s.html#a8d8aa48e9a105e9d25ad4b90d259d0b1',1,'altcp_allocator_s']]], + ['asn1_5ftype',['asn1_type',['../structsnmp__node__instance.html#af51206e0912a8402c395dcf3b623f8b9',1,'snmp_node_instance']]], + ['auth_5fplain',['auth_plain',['../structsmtp__session.html#a9da4e424e22892fae51987665eca85a9',1,'smtp_session']]], + ['auth_5fplain_5flen',['auth_plain_len',['../structsmtp__session.html#a003dfd03ac58252b575a7c965e532461',1,'smtp_session']]], + ['authoritative',['authoritative',['../structmdns__outpacket.html#a1a689ea7094a3569878f15477e725035',1,'mdns_outpacket']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_10.html b/Libraries/LwIP/doc/doxygen/output/html/search/variables_10.html new file mode 100644 index 0000000..548ac84 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_10.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_10.js b/Libraries/LwIP/doc/doxygen/output/html/search/variables_10.js new file mode 100644 index 0000000..64deac0 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_10.js @@ -0,0 +1,23 @@ +var searchData= +[ + ['parse_5foffset',['parse_offset',['../structmdns__packet.html#a4c3c3a28ac113b3ee40d5cf07d851f68',1,'mdns_packet']]], + ['pass',['pass',['../structsmtp__session.html#a7a5a3c00378ce076ce70236525afd431',1,'smtp_session']]], + ['passive_5fopen',['passive_open',['../structtcp__ext__arg__callbacks.html#a86b5816e8285378813963d09272b050a',1,'tcp_ext_arg_callbacks']]], + ['payload',['payload',['../structpbuf.html#a8d32dc3e964369d4eec638fc37fbc460',1,'pbuf::payload()'],['../structpbuf__rom.html#a5cd0dcc590038629644ad775d76230a1',1,'pbuf_rom::payload()']]], + ['pbuf',['pbuf',['../structmdns__packet.html#a2ec02a67fd82f0df695e94745eddaf45',1,'mdns_packet::pbuf()'],['../structmdns__outpacket.html#a83d4504736f2bf315fc8b712c6a446e9',1,'mdns_outpacket::pbuf()'],['../structpbuf__custom.html#a100e338f13464e76b46896647b962ed8',1,'pbuf_custom::pbuf()']]], + ['pc',['pc',['../structpbuf__custom__ref.html#af5884b6a7031d73406cb9596a51382b7',1,'pbuf_custom_ref']]], + ['pcb',['pcb',['../structnetconn.html#a2af6773c9f6ee91e7f462dd8acc07de6',1,'netconn']]], + ['pend_5freq_5fqueue',['pend_req_queue',['../structmqtt__client__s.html#a1897eeefe64f9e2d2d953adca858f439',1,'mqtt_client_s']]], + ['pending_5ferr',['pending_err',['../structnetconn.html#a2a54e90fa370cf0df46dfd0b97f1cce7',1,'netconn']]], + ['period_5fof_5fstatistics',['period_of_statistics',['../structnetbios__answer.html#a31ec9ea28b5801b9bb5f1b240d3412de',1,'netbios_answer']]], + ['pkt_5fid',['pkt_id',['../structmqtt__request__t.html#af2dc3cd85cdad25b9b3e1534ecc0cb58',1,'mqtt_request_t']]], + ['pkt_5fid_5fseq',['pkt_id_seq',['../structmqtt__client__s.html#ab4100f6e0867c212d5923f10024f2e32',1,'mqtt_client_s']]], + ['poll_5ffds',['poll_fds',['../structlwip__select__cb.html#ae39fc1bef3938380d15085e0141639de',1,'lwip_select_cb']]], + ['poll_5fnfds',['poll_nfds',['../structlwip__select__cb.html#a39c4980c261380481f79af2b536ebfba',1,'lwip_select_cb']]], + ['port',['port',['../structmdns__service.html#abbf317cde8fb7ba8d834ad9746dd780c',1,'mdns_service']]], + ['prev',['prev',['../structmem.html#a9d7722ed10adf965fa98563d502f98ac',1,'mem::prev()'],['../structsnmp__varbind.html#a365abcc1f80d28dc8ffd07193099c760',1,'snmp_varbind::prev()'],['../structlwip__select__cb.html#a21a98e316bb7001d8750b20f5a7d0aa7',1,'lwip_select_cb::prev()']]], + ['probes_5fsent',['probes_sent',['../structmdns__host.html#ac8f6e3c6e1251bf73f043e489c840922',1,'mdns_host']]], + ['probing_5fstate',['probing_state',['../structmdns__host.html#af9ced31c35de6a281e5b13f01e5aae61',1,'mdns_host']]], + ['proto',['proto',['../structmdns__service.html#aa9f2e0bb67d3848152e6076e92e8018d',1,'mdns_service']]], + ['ptr',['ptr',['../structnetvector.html#a523362737ea7764f9aaa73a050a0b983',1,'netvector']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_11.html b/Libraries/LwIP/doc/doxygen/output/html/search/variables_11.html new file mode 100644 index 0000000..d5be914 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_11.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_11.js b/Libraries/LwIP/doc/doxygen/output/html/search/variables_11.js new file mode 100644 index 0000000..8d63e1c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_11.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['q',['q',['../structnd6__neighbor__cache__entry.html#a830674446a45eb200d38a45fbdd5c5df',1,'nd6_neighbor_cache_entry']]], + ['query_5fname',['query_name',['../structnetbios__answer.html#aa024ce7e0e233c42393f5c3c378d3f9b',1,'netbios_answer']]], + ['questions',['questions',['../structmdns__packet.html#a09211e78f7f773c492b5856d31423699',1,'mdns_packet::questions()'],['../structmdns__outpacket.html#a0d402cde040728d361dec8f7d86f504c',1,'mdns_outpacket::questions()']]], + ['questions_5fleft',['questions_left',['../structmdns__packet.html#afdb9c14dd0c915119b8adb584381a437',1,'mdns_packet']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_12.html b/Libraries/LwIP/doc/doxygen/output/html/search/variables_12.html new file mode 100644 index 0000000..b62e1ee --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_12.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_12.js b/Libraries/LwIP/doc/doxygen/output/html/search/variables_12.js new file mode 100644 index 0000000..b9bb42a --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_12.js @@ -0,0 +1,22 @@ +var searchData= +[ + ['r',['r',['../structapi__msg.html#aebd72e07e711e7135294563b82c98cdf',1,'api_msg']]], + ['ram_5fheap',['ram_heap',['../mem_8c.html#a6da602f2bbf1d555556f9260b3b8ad5f',1,'mem.c']]], + ['rcvevent',['rcvevent',['../structlwip__sock.html#af40d67cbaef4318d26e560988b6e1b3a',1,'lwip_sock']]], + ['reachability',['reachability',['../structsntp__server.html#a2e9283bb8f94930fd2a2c3f24fc4b40d',1,'sntp_server']]], + ['read',['read',['../structtftp__context.html#a748e37df0c8b84b3adda78d603b9033c',1,'tftp_context']]], + ['readset',['readset',['../structlwip__select__cb.html#a8694a2ce0dd5f91be84056982b96978e',1,'lwip_select_cb']]], + ['reass_5flist',['reass_list',['../structlowpan6__ieee802154__data.html#a8c33e7a2026e6e93a2085f3d14378d35',1,'lowpan6_ieee802154_data']]], + ['recv',['recv',['../structraw__pcb.html#a963b023239ad97c05536046ed7058a10',1,'raw_pcb::recv()'],['../structudp__pcb.html#ac05dee75a3d6666267f7e626c2ec56a8',1,'udp_pcb::recv()']]], + ['recv_5farg',['recv_arg',['../structudp__pcb.html#a11e4c40b8868aa40d923756a60598cab',1,'udp_pcb']]], + ['recv_5favail',['recv_avail',['../structnetconn.html#a05b15a28b0803bea3729b1da2047541e',1,'netconn']]], + ['recv_5fbufsize',['recv_bufsize',['../structnetconn.html#a6febc9717418ddba16f16e988061cfac',1,'netconn']]], + ['recv_5funicast',['recv_unicast',['../structmdns__packet.html#a8659b4f582be0df84b6ae91308737377',1,'mdns_packet']]], + ['recvmbox',['recvmbox',['../structnetconn.html#a9f2bf6a3865b6a22a8a71ec2f3e770da',1,'netconn']]], + ['ref',['ref',['../structpbuf.html#a62fe38eb0cf31027dc1fb9cbe7b55ba7',1,'pbuf']]], + ['reference',['reference',['../structsnmp__node__instance.html#a55f53419cd5b369b771153ca2598ebc5',1,'snmp_node_instance']]], + ['reference_5flen',['reference_len',['../structsnmp__node__instance.html#ad289957b34b4e55915fa79f37c4d9d54',1,'snmp_node_instance']]], + ['release_5finstance',['release_instance',['../structsnmp__node__instance.html#a20a256c54fab19a455ecf6deff76c6de',1,'snmp_node_instance']]], + ['remove_5fcallback',['remove_callback',['../structnetif.html#ae06deb532ead2e3009ba4e58aae6ca07',1,'netif']]], + ['rs_5fcount',['rs_count',['../structnetif.html#a9c1f9f28bde60aa868bc3296bee7b1b6',1,'netif']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_13.html b/Libraries/LwIP/doc/doxygen/output/html/search/variables_13.html new file mode 100644 index 0000000..15437be --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_13.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_13.js b/Libraries/LwIP/doc/doxygen/output/html/search/variables_13.js new file mode 100644 index 0000000..b3c40c2 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_13.js @@ -0,0 +1,33 @@ +var searchData= +[ + ['sd',['sd',['../structapi__msg.html#ad5e8bf133bc5ba4c78822af297330ce4',1,'api_msg']]], + ['select_5fwaiting',['select_waiting',['../structlwip__sock.html#aadbcf5ec3d50631d8821200163d88d38',1,'lwip_sock']]], + ['sem',['sem',['../structdns__api__msg.html#a15e01e675ebc46b5aede42342be445e2',1,'dns_api_msg::sem()'],['../structlwip__select__cb.html#ac9e790cac8b5eae607a8ef95dcc68482',1,'lwip_select_cb::sem()']]], + ['sem_5fsignalled',['sem_signalled',['../structlwip__select__cb.html#a1c00f1159e9e8eb7cca02c497605cd99',1,'lwip_select_cb']]], + ['send_5ftimeout',['send_timeout',['../structnetconn.html#a44e55724482b8e447134f5ba4f01551a',1,'netconn']]], + ['sendevent',['sendevent',['../structlwip__sock.html#a7e282776681ea4b7bd389950a8a64fa8',1,'lwip_sock']]], + ['sent_5fnum',['sent_num',['../structautoip.html#a9d3e3bab2f12b7c7283177fbf039fb25',1,'autoip']]], + ['sequence_5fnumber',['sequence_number',['../structieee__802154__hdr.html#a870001205f5a3ce45ce0b2f323275869',1,'ieee_802154_hdr']]], + ['service',['service',['../structmdns__service.html#a42583986e24b5a4a13b6d647c1a281ad',1,'mdns_service']]], + ['services',['services',['../structmdns__host.html#a750c31340c22e51375e4dc3e6e94f2ed',1,'mdns_host']]], + ['session_5fdata_5fpacket_5fsize',['session_data_packet_size',['../structnetbios__answer.html#abec38f20bb460ddc2d6e8c9b9208608c',1,'netbios_answer']]], + ['set_5ftest',['set_test',['../structsnmp__node__instance.html#a03c1fec3764f6b48337238b3355ee5bd',1,'snmp_node_instance::set_test()'],['../structsnmp__table__node.html#acfbc5fa3361117fc4fa83642dde8aef0',1,'snmp_table_node::set_test()']]], + ['set_5fvalue',['set_value',['../structsnmp__node__instance.html#a55fb4cadefcab9c74c3fb529c2560834',1,'snmp_node_instance::set_value()'],['../structsnmp__table__node.html#a2a3e8ac0dcce64604fc17e1de3c5a804',1,'snmp_table_node::set_value()']]], + ['size',['size',['../structmemp__desc.html#a1688d2bdd5a7b77700e1fa627f025ba3',1,'memp_desc']]], + ['snmp_5fcommunity',['snmp_community',['../snmp__msg_8c.html#ac6f810ab812c44c6ca1df1fdf926a9f6',1,'snmp_community(): snmp_msg.c'],['../snmp__msg_8h.html#ac6f810ab812c44c6ca1df1fdf926a9f6',1,'snmp_community(): snmp_msg.c']]], + ['snmp_5fcommunity_5ftrap',['snmp_community_trap',['../snmp__msg_8c.html#a2e2007343d9492b8e31d363d2c6ad79b',1,'snmp_community_trap(): snmp_msg.c'],['../snmp__traps_8c.html#a2e2007343d9492b8e31d363d2c6ad79b',1,'snmp_community_trap(): snmp_msg.c']]], + ['snmp_5fcommunity_5fwrite',['snmp_community_write',['../snmp__msg_8c.html#a2d77485bb0b640c8e5f569ca756d3b04',1,'snmp_community_write(): snmp_msg.c'],['../snmp__msg_8h.html#a2d77485bb0b640c8e5f569ca756d3b04',1,'snmp_community_write(): snmp_msg.c']]], + ['snmp_5ftraps_5fhandle',['snmp_traps_handle',['../snmp__msg_8h.html#ade16efa80e2c2a20236d3cb96b19c79a',1,'snmp_traps_handle(): snmp_traps.c'],['../snmp__traps_8c.html#ade16efa80e2c2a20236d3cb96b19c79a',1,'snmp_traps_handle(): snmp_traps.c']]], + ['socket',['socket',['../structnetconn.html#ac8e05eb65774665e364a3dcf0f139b36',1,'netconn']]], + ['source_5faddr',['source_addr',['../structmdns__packet.html#aaa64cc21495dc6bb76ed9125904dd07a',1,'mdns_packet']]], + ['source_5faddress',['source_address',['../structieee__802154__hdr.html#aa96c037381583756e79bc6ecede27937',1,'ieee_802154_hdr']]], + ['source_5fpan_5fid',['source_pan_id',['../structieee__802154__hdr.html#ab67fc612a7fd7dcaf46401e4719fa2b2',1,'ieee_802154_hdr']]], + ['src',['src',['../structip6__hdr.html#af0df3214134f29827c27e66b2970c6ef',1,'ip6_hdr']]], + ['state',['state',['../structsmtp__session.html#aed9c182738767279c2b58b1e3322db09',1,'smtp_session::state()'],['../structnetconn.html#a936c33090ec35e5e8c0011be5515a589',1,'netconn::state()'],['../structautoip.html#a51af55190548e378e310aeaddfa1fdef',1,'autoip::state()'],['../structnetif.html#a809cc57c0dff09c5c9ae45b02c2002f3',1,'netif::state()'],['../structnetif__ext__callback__args__t_1_1link__changed__s.html#a39870f966a2a64a7f51747b45977296c',1,'netif_ext_callback_args_t::link_changed_s::state()'],['../structnetif__ext__callback__args__t_1_1status__changed__s.html#a207d3afdf0a37d16a61d1253e264d7a7',1,'netif_ext_callback_args_t::status_changed_s::state()']]], + ['static_5fdata',['static_data',['../structsmtp__send__request.html#a4d517ae8b29caa4f0b371923379d9ef4',1,'smtp_send_request']]], + ['stats',['stats',['../structmemp__desc.html#a05cb67eb408e4736cc0f5e32b5db7500',1,'memp_desc']]], + ['status_5fcallback',['status_callback',['../structnetif.html#a1513e81d02557d2a950e965f18b53a45',1,'netif']]], + ['subject',['subject',['../structsmtp__session.html#ab8240801e229ee260f3feeaa270520c7',1,'smtp_session']]], + ['subject_5flen',['subject_len',['../structsmtp__session.html#aea48a6edd3ede02b26882c7b8d72646c',1,'smtp_session']]], + ['sys',['sys',['../structstats__.html#a317123da6c92aa9d2fa40e8060357035',1,'stats_']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_14.html b/Libraries/LwIP/doc/doxygen/output/html/search/variables_14.html new file mode 100644 index 0000000..3745fec --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_14.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_14.js b/Libraries/LwIP/doc/doxygen/output/html/search/variables_14.js new file mode 100644 index 0000000..7daea01 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_14.js @@ -0,0 +1,29 @@ +var searchData= +[ + ['tab',['tab',['../structmemp__desc.html#a9d6b758ce5c3b47a67a7568d38fb3926',1,'memp_desc']]], + ['tcp',['tcp',['../structstats__.html#a32ef1aaa427d62a5c7890de0ac23fe86',1,'stats_']]], + ['tcp_5factive_5fpcbs',['tcp_active_pcbs',['../tcp_8c.html#a78c09dbae67ccc06b659d9f1a388f911',1,'tcp_active_pcbs(): tcp.c'],['../tcp__priv_8h.html#a78c09dbae67ccc06b659d9f1a388f911',1,'tcp_active_pcbs(): tcp.c']]], + ['tcp_5fbound_5fpcbs',['tcp_bound_pcbs',['../tcp_8c.html#a1b42a7ac0fc173a42d575f86853d32a8',1,'tcp_bound_pcbs(): tcp.c'],['../tcp__priv_8h.html#a1b42a7ac0fc173a42d575f86853d32a8',1,'tcp_bound_pcbs(): tcp.c']]], + ['tcp_5flisten_5fpcbs',['tcp_listen_pcbs',['../tcp_8c.html#a96fe1350e510d4308ac9969ffb4c9c81',1,'tcp_listen_pcbs(): tcp.c'],['../tcp__priv_8h.html#a96fe1350e510d4308ac9969ffb4c9c81',1,'tcp_listen_pcbs(): tcp.c']]], + ['tcp_5fpcb_5flists',['tcp_pcb_lists',['../tcp_8c.html#a51515507dec664e9d69a870e6b627610',1,'tcp_pcb_lists(): tcp.c'],['../tcp__priv_8h.html#af5e1079ab223e1cb27208c45e3c84df7',1,'tcp_pcb_lists(): tcp.c']]], + ['tcp_5ftw_5fpcbs',['tcp_tw_pcbs',['../tcp_8c.html#a9a522a66c5e1f1a4e28fe7a672cc64e3',1,'tcp_tw_pcbs(): tcp.c'],['../tcp__priv_8h.html#a9a522a66c5e1f1a4e28fe7a672cc64e3',1,'tcp_tw_pcbs(): tcp.c']]], + ['test_5fresult',['test_result',['../structnetbios__answer.html#a91116fe26c8050ee166053f377b40c7f',1,'netbios_answer']]], + ['timeout_5fdiff',['timeout_diff',['../structmqtt__request__t.html#a65a7292669bc1f2d9df8f30bbcd77073',1,'mqtt_request_t']]], + ['timer',['timer',['../structsmtp__session.html#a5884425cb5ce964d8383b29cc20208d7',1,'smtp_session::timer()'],['../structigmp__group.html#a8e2227e486652603fcd7f88681d4c75b',1,'igmp_group::timer()'],['../structmld__group.html#a21f31e845cb11d2aca4ae7120736f69a',1,'mld_group::timer()']]], + ['tls_5fconfig',['tls_config',['../structmqtt__connect__client__info__t.html#a45987acc116de5d27fff6856778e55b4',1,'mqtt_connect_client_info_t']]], + ['to',['to',['../structsmtp__session.html#a70b3753bc70e65f779279c246617faea',1,'smtp_session']]], + ['to_5flen',['to_len',['../structsmtp__session.html#a66b8e1dd314976788e9ac9a81f59a402',1,'smtp_session']]], + ['tot_5flen',['tot_len',['../structpbuf.html#a5259e7ec29bab9c0999b64f2e86b411f',1,'pbuf']]], + ['total_5fnumber_5fof_5fcommand_5fblocks',['total_number_of_command_blocks',['../structnetbios__answer.html#a4c7ea5d1839fd27232877880e43485a2',1,'netbios_answer']]], + ['tried_5fllipaddr',['tried_llipaddr',['../structautoip.html#a472f3d18c07b3df024a0cde8f4ffa853',1,'autoip']]], + ['ts',['ts',['../structnetif.html#a1bb4e3aed6e0fd4b6b31ee82d806f971',1,'netif']]], + ['ttw',['ttw',['../structautoip.html#a7510d9a2961ea7c28ebfcde6390284bf',1,'autoip']]], + ['tx_5fbuf',['tx_buf',['../structsmtp__session.html#a42cedb495f7423b9e28979ce1e460c61',1,'smtp_session']]], + ['tx_5fdatagram_5ftag',['tx_datagram_tag',['../structlowpan6__ieee802154__data.html#a64560b289f86efe1d39ece603cd14b5c',1,'lowpan6_ieee802154_data']]], + ['tx_5fframe_5fseq_5fnum',['tx_frame_seq_num',['../structlowpan6__ieee802154__data.html#ad9cd994385c4d1d8ef0a22686c17720c',1,'lowpan6_ieee802154_data']]], + ['tx_5fid',['tx_id',['../structmdns__packet.html#a0cd71fd9af6d2529e6a41c451c037e00',1,'mdns_packet::tx_id()'],['../structmdns__outpacket.html#ac470f02a9f332f18e027437dc293d348',1,'mdns_outpacket::tx_id()']]], + ['txt_5ffn',['txt_fn',['../structmdns__service.html#a79bc4946c96a3b2d0713bc0897c4bd9c',1,'mdns_service']]], + ['txtdata',['txtdata',['../structmdns__service.html#a35daff90a18d19b14f23fa02df424f94',1,'mdns_service']]], + ['type',['type',['../structnetconn.html#a61af908d1d2e4e7345ac65d3b390d7b6',1,'netconn::type()'],['../structsnmp__varbind.html#ad63223e45e04c08ea97859b8ba767950',1,'snmp_varbind::type()'],['../structip__addr.html#a66eaa8e9051e7102bf9f0c195fbe555a',1,'ip_addr::type()']]], + ['type_5finternal',['type_internal',['../structpbuf.html#a61a26ac8393dc9e549016b86c2cf5131',1,'pbuf']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_15.html b/Libraries/LwIP/doc/doxygen/output/html/search/variables_15.html new file mode 100644 index 0000000..7432fd7 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_15.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_15.js b/Libraries/LwIP/doc/doxygen/output/html/search/variables_15.js new file mode 100644 index 0000000..acc17f5 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_15.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['udp',['udp',['../structstats__.html#a626e03d4bded6480582789cfd17d4063',1,'stats_']]], + ['unicast_5freply',['unicast_reply',['../structmdns__outpacket.html#a68255725575af086a3afa76bc5c8e64d',1,'mdns_outpacket']]], + ['unit_5fid',['unit_id',['../structnetbios__answer.html#aeed6aa8ba4f8bb107d141b3b3d0a1787',1,'netbios_answer']]], + ['use',['use',['../structigmp__group.html#ab3625aeb3689e3626f73138eb0e41852',1,'igmp_group::use()'],['../structmld__group.html#addc67094f83c9352fe039c392c480f9e',1,'mld_group::use()']]], + ['used',['used',['../structmem.html#aa76b6a39425617435978dce903f0d456',1,'mem']]], + ['username',['username',['../structsmtp__session.html#a568e3def9d0ec54e3c079f577717a6bb',1,'smtp_session']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_16.html b/Libraries/LwIP/doc/doxygen/output/html/search/variables_16.html new file mode 100644 index 0000000..737584f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_16.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_16.js b/Libraries/LwIP/doc/doxygen/output/html/search/variables_16.js new file mode 100644 index 0000000..edc8ed0 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_16.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['value',['value',['../structsnmp__varbind.html#a328227d7ae188a0a2feb95f8000aac45',1,'snmp_varbind']]], + ['value_5flen',['value_len',['../structsnmp__varbind.html#ab094577fac6c7cc16ad666c9970cdb85',1,'snmp_varbind']]], + ['vector',['vector',['../structapi__msg.html#a1ceb9822ba49ba439e30d98492593612',1,'api_msg']]], + ['vector_5fcnt',['vector_cnt',['../structapi__msg.html#ab6f14157a3e6735b69a569249d3286a2',1,'api_msg']]], + ['vector_5foff',['vector_off',['../structapi__msg.html#a6896ae78ebddefdf2d8358ab5f21f444',1,'api_msg']]], + ['version_5fnumber',['version_number',['../structnetbios__answer.html#a151dce0f0bf626b2a54fbb75775237ba',1,'netbios_answer']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_17.html b/Libraries/LwIP/doc/doxygen/output/html/search/variables_17.html new file mode 100644 index 0000000..fe5c7ef --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_17.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_17.js b/Libraries/LwIP/doc/doxygen/output/html/search/variables_17.js new file mode 100644 index 0000000..ec40cf2 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_17.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['w',['w',['../structapi__msg.html#a8a71456d1199d10af5c1d8760cc0ce73',1,'api_msg']]], + ['will_5fmsg',['will_msg',['../structmqtt__connect__client__info__t.html#a925fcebd15555afdc0820e196e2fd3a7',1,'mqtt_connect_client_info_t']]], + ['will_5fqos',['will_qos',['../structmqtt__connect__client__info__t.html#a07954934f4fecf54fa190997848229d9',1,'mqtt_connect_client_info_t']]], + ['will_5fretain',['will_retain',['../structmqtt__connect__client__info__t.html#a49c10873f44d7534140a63eef2a6a4e3',1,'mqtt_connect_client_info_t']]], + ['will_5ftopic',['will_topic',['../structmqtt__connect__client__info__t.html#a32e77415460752ba0484eb3ba0faf0c8',1,'mqtt_connect_client_info_t']]], + ['write',['write',['../structtftp__context.html#a9e6e4ec803ec9597822923369701754d',1,'tftp_context']]], + ['write_5foffset',['write_offset',['../structmdns__outpacket.html#a8ead21e392b21c3e872c0cab874cdcf5',1,'mdns_outpacket']]], + ['writeset',['writeset',['../structlwip__select__cb.html#aa89638b1c2c6b2c88030560861aba04c',1,'lwip_select_cb']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_18.html b/Libraries/LwIP/doc/doxygen/output/html/search/variables_18.html new file mode 100644 index 0000000..56aa0a7 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_18.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_18.js b/Libraries/LwIP/doc/doxygen/output/html/search/variables_18.js new file mode 100644 index 0000000..e1e8257 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_18.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['zep_5fdst_5fip_5faddr',['zep_dst_ip_addr',['../structzepif__init.html#a851efb99a973348f1064a31b97ce779d',1,'zepif_init']]], + ['zep_5fdst_5fudp_5fport',['zep_dst_udp_port',['../structzepif__init.html#a86c6229ed3010158e601666afe91a286',1,'zepif_init']]], + ['zep_5fnetif',['zep_netif',['../structzepif__init.html#a3d97bf90b6bd4dd8258a3b1caf7890e3',1,'zepif_init']]], + ['zep_5fsrc_5fip_5faddr',['zep_src_ip_addr',['../structzepif__init.html#adbe989f1f5cba623d742187def36f02c',1,'zepif_init']]], + ['zep_5fsrc_5fudp_5fport',['zep_src_udp_port',['../structzepif__init.html#ad739032585841b126b4c0eab5899d40f',1,'zepif_init']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_2.html b/Libraries/LwIP/doc/doxygen/output/html/search/variables_2.html new file mode 100644 index 0000000..5c9de1a --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_2.js b/Libraries/LwIP/doc/doxygen/output/html/search/variables_2.js new file mode 100644 index 0000000..ebb1bce --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_2.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['b',['b',['../structapi__msg.html#ab0abd60527e96cc24c2c20c835cdac05',1,'api_msg']]], + ['base',['base',['../structmemp__desc.html#a9aec58adcbcd88167247296ca4346558',1,'memp_desc']]], + ['bc',['bc',['../structapi__msg.html#a1705127c6cd22c2c6dbbcc59834e41e0',1,'api_msg']]], + ['body',['body',['../structsmtp__session.html#a7bb4bf5cc209e073341b56845e5cbd49',1,'smtp_session']]], + ['body_5flen',['body_len',['../structsmtp__session.html#a0da8b775ddfe5f8891464037a6b4bb4d',1,'smtp_session']]], + ['body_5fsent',['body_sent',['../structsmtp__session.html#a5893c61d863b4846a81d8a4bbcaebb5b',1,'smtp_session']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_3.html b/Libraries/LwIP/doc/doxygen/output/html/search/variables_3.html new file mode 100644 index 0000000..f95e34c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_3.js b/Libraries/LwIP/doc/doxygen/output/html/search/variables_3.js new file mode 100644 index 0000000..248f702 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_3.js @@ -0,0 +1,26 @@ +var searchData= +[ + ['cache_5fflush',['cache_flush',['../structmdns__outpacket.html#a9bd0fd91dda48baa2938dddd747d3195',1,'mdns_outpacket']]], + ['callback',['callback',['../structnetconn.html#abe796060bb06e585333ca9a87862b624',1,'netconn']]], + ['callback_5farg',['callback_arg',['../structsmtp__session.html#af0544df7a935a092d825d8f2380f970f',1,'smtp_session']]], + ['callback_5ffn',['callback_fn',['../structsmtp__session.html#a24c13d621e18311a613ab68b856a7f7b',1,'smtp_session']]], + ['cb',['cb',['../structmqtt__request__t.html#a32a4b14b0b8b5b8ce8db1074e53f4a79',1,'mqtt_request_t']]], + ['chksum_5flen_5frx',['chksum_len_rx',['../structudp__pcb.html#a5e2833df51760c83c6032608eb5d0d4d',1,'udp_pcb']]], + ['client_5fid',['client_id',['../structmqtt__connect__client__info__t.html#ad35f7850df21f001d5c5ffaa1a18c05a',1,'mqtt_connect_client_info_t']]], + ['client_5fpass',['client_pass',['../structmqtt__connect__client__info__t.html#a8f68efe91c5311418151256c96102d4b',1,'mqtt_connect_client_info_t']]], + ['client_5fuser',['client_user',['../structmqtt__connect__client__info__t.html#aec961673d5c3e8dc853c91f30d9333b5',1,'mqtt_connect_client_info_t']]], + ['close',['close',['../structtftp__context.html#ae9181c57d1cf89bc263f7671e5630a65',1,'tftp_context']]], + ['conn',['conn',['../structapi__msg.html#abec5e33802d69f1b601543d60699f028',1,'api_msg::conn()'],['../structlwip__sock.html#a3a3fee485b3361ed7054cde149355fb4',1,'lwip_sock::conn()']]], + ['conn_5fstate',['conn_state',['../structmqtt__client__s.html#af4a07c1079e2e2a336f1939d8b9677e6',1,'mqtt_client_s']]], + ['connect_5farg',['connect_arg',['../structmqtt__client__s.html#ae6d53359ec6d70533dab7c0d2717ce1a',1,'mqtt_client_s']]], + ['current_5finput_5fnetif',['current_input_netif',['../structip__globals.html#a7da899c663b1d560b61d92ba6d544701',1,'ip_globals']]], + ['current_5fip4_5fheader',['current_ip4_header',['../structip__globals.html#a2e810f97cf3e8e855e3baafc3be8c0d4',1,'ip_globals']]], + ['current_5fip6_5fheader',['current_ip6_header',['../structip__globals.html#aa5cfc3ac29dc746a4cbe844206b0ed41',1,'ip_globals']]], + ['current_5fip_5fheader_5ftot_5flen',['current_ip_header_tot_len',['../structip__globals.html#a17004526e6f1a164c0bab01aeac5e34a',1,'ip_globals']]], + ['current_5fiphdr_5fdest',['current_iphdr_dest',['../structip__globals.html#a0b4e54250c692c638408de54593d2aa1',1,'ip_globals']]], + ['current_5fiphdr_5fsrc',['current_iphdr_src',['../structip__globals.html#a04d85a3dc2c417050b3e088fa58a74b0',1,'ip_globals']]], + ['current_5fmsg',['current_msg',['../structnetconn.html#a49ba09038b2f2563fd3a38e38f8b8ab9',1,'netconn']]], + ['current_5fnetif',['current_netif',['../structip__globals.html#a7803dc5950d143e4433a0df689989bab',1,'ip_globals']]], + ['custom_5ffree_5ffunction',['custom_free_function',['../structpbuf__custom.html#af614d17874746cbbf778dc4ca9eac2e9',1,'pbuf_custom']]], + ['cyclic_5ftick',['cyclic_tick',['../structmqtt__client__s.html#a6274ba2eb2fe6afa970b1c8a650d8cef',1,'mqtt_client_s']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_4.html b/Libraries/LwIP/doc/doxygen/output/html/search/variables_4.html new file mode 100644 index 0000000..d7db285 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_4.js b/Libraries/LwIP/doc/doxygen/output/html/search/variables_4.js new file mode 100644 index 0000000..8004b90 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_4.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['data_5fcb',['data_cb',['../structmqtt__client__s.html#a26dc9112351c042594a41703197925a7',1,'mqtt_client_s']]], + ['dest_5faddr',['dest_addr',['../structmdns__outpacket.html#a1fdc90b48d8cf1fc24895f0c7a5798e4',1,'mdns_outpacket']]], + ['destination_5faddress',['destination_address',['../structieee__802154__hdr.html#a87ce59d2804cacc5a58411c8b6c47f33',1,'ieee_802154_hdr']]], + ['destination_5fpan_5fid',['destination_pan_id',['../structieee__802154__hdr.html#ac1ad9159d3bb70b1a7223060c6c81efd',1,'ieee_802154_hdr']]], + ['destroy',['destroy',['../structtcp__ext__arg__callbacks.html#ace586d5d376b42465927a4fd8688c24b',1,'tcp_ext_arg_callbacks']]], + ['dhcp6_5frx_5foptions',['dhcp6_rx_options',['../dhcp6_8c.html#abcce06f078da4b03265d20c0bc1bdce0',1,'dhcp6.c']]], + ['dhcp_5frx_5foptions_5fgiven',['dhcp_rx_options_given',['../dhcp_8c.html#a058b71e1d26b3758b29d16d9f892c8cc',1,'dhcp.c']]], + ['dhcp_5frx_5foptions_5fval',['dhcp_rx_options_val',['../dhcp_8c.html#a5abd232496063bddcbc6692c0e8f9c1f',1,'dhcp.c']]], + ['dns_5faddrtype',['dns_addrtype',['../structdns__api__msg.html#afb2536a6c342bed4c4ad9d75982f7493',1,'dns_api_msg']]], + ['dns_5fttl',['dns_ttl',['../structmdns__service.html#a5a939a4da01cb50c74cd53b352e4fa14',1,'mdns_service::dns_ttl()'],['../structmdns__host.html#a4547e5a8375fc1f1372546268a80d51b',1,'mdns_host::dns_ttl()']]], + ['domain_5foffsets',['domain_offsets',['../structmdns__outpacket.html#aee97e98c4869aa63ffe348d38d87221f',1,'mdns_outpacket']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_5.html b/Libraries/LwIP/doc/doxygen/output/html/search/variables_5.html new file mode 100644 index 0000000..7bbceeb --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_5.js b/Libraries/LwIP/doc/doxygen/output/html/search/variables_5.js new file mode 100644 index 0000000..ac86601 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_5.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['err',['err',['../structapi__msg.html#a8c66bd95217fa627f13f2f0847bbb25f',1,'api_msg::err()'],['../structdns__api__msg.html#a6536d91adb146555461359bd451b30de',1,'dns_api_msg::err()']]], + ['errevent',['errevent',['../structlwip__sock.html#a9245a7ab9471bfb6fac94c66d26fba5e',1,'lwip_sock']]], + ['ethaddr',['ethaddr',['../structbridgeif__initdata__s.html#a8e0048db5e021f5d79411492dc9330bc',1,'bridgeif_initdata_s']]], + ['etharp',['etharp',['../structstats__.html#aa52547cb08dc828927494dc485bb69f3',1,'stats_']]], + ['exceptset',['exceptset',['../structlwip__select__cb.html#a2a1e68993ed887fca326d1373ea6caed',1,'lwip_select_cb']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_6.html b/Libraries/LwIP/doc/doxygen/output/html/search/variables_6.html new file mode 100644 index 0000000..4eb162d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_6.js b/Libraries/LwIP/doc/doxygen/output/html/search/variables_6.js new file mode 100644 index 0000000..c489f6a --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_6.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['flags',['flags',['../structnetconn.html#a96cb9a3830248699bd07a1a447e5630c',1,'netconn::flags()'],['../structnetif.html#a1c171db6097bbb6f09f63549a66e00ea',1,'netif::flags()'],['../structpbuf.html#aa4d1af2cab3d9280d29212095b5b872a',1,'pbuf::flags()']]], + ['frame_5fcontrol',['frame_control',['../structieee__802154__hdr.html#a1d1e2cef0e0c1b1e1fd02a8a5f07fb10',1,'ieee_802154_hdr']]], + ['from',['from',['../structsmtp__session.html#a8dc4651c67618e33c56dc66790bc12ee',1,'smtp_session']]], + ['from_5flen',['from_len',['../structsmtp__session.html#a191b09e7142414a671da82fece888e65',1,'smtp_session']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_7.html b/Libraries/LwIP/doc/doxygen/output/html/search/variables_7.html new file mode 100644 index 0000000..0408829 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_7.js b/Libraries/LwIP/doc/doxygen/output/html/search/variables_7.js new file mode 100644 index 0000000..0c3fc91 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_7.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['get_5fvalue',['get_value',['../structsnmp__node__instance.html#a17aa954aa34672f4a399bf0d91c0a649',1,'snmp_node_instance::get_value()'],['../structsnmp__table__node.html#ac65c57e29faa456a9a710185109fe272',1,'snmp_table_node::get_value()']]], + ['group_5faddress',['group_address',['../structigmp__group.html#ae26e6041f865880bf46cd21b6f9af854',1,'igmp_group::group_address()'],['../structmld__group.html#a781abf78d835627ded1202166b44b88e',1,'mld_group::group_address()']]], + ['group_5fstate',['group_state',['../structigmp__group.html#add0d24f719ad4b598abad254689ad911',1,'igmp_group::group_state()'],['../structmld__group.html#ae9cfd3f126257aa3aff4a24e05c04059',1,'mld_group::group_state()']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_8.html b/Libraries/LwIP/doc/doxygen/output/html/search/variables_8.html new file mode 100644 index 0000000..d54d096 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_8.js b/Libraries/LwIP/doc/doxygen/output/html/search/variables_8.js new file mode 100644 index 0000000..9a30316 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_8.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['h_5ferrno',['h_errno',['../netdb_8c.html#a2a1ce3f2040007303d36c0b682b5ac10',1,'h_errno(): netdb.c'],['../lwip_2netdb_8h.html#a2a1ce3f2040007303d36c0b682b5ac10',1,'h_errno(): netdb.c']]], + ['hwaddr',['hwaddr',['../structnetif.html#aee967965d999fc1a4c40a66709304e69',1,'netif']]], + ['hwaddr_5flen',['hwaddr_len',['../structnetif.html#afe1181561cb16241f3cb5ed01e567d42',1,'netif']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_9.html b/Libraries/LwIP/doc/doxygen/output/html/search/variables_9.html new file mode 100644 index 0000000..234dc60 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_9.js b/Libraries/LwIP/doc/doxygen/output/html/search/variables_9.js new file mode 100644 index 0000000..5dc94c8 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_9.js @@ -0,0 +1,34 @@ +var searchData= +[ + ['icmp',['icmp',['../structstats__.html#a10bc430163b0e6db91338aded5b7019a',1,'stats_']]], + ['icmp6',['icmp6',['../structstats__.html#a25a6b5940e32d53a066aa1bbc2028c03',1,'stats_']]], + ['ieee_5f802154_5fpan_5fid',['ieee_802154_pan_id',['../structlowpan6__ieee802154__data.html#a017fc6f447215e4b65955ee7b1ed798f',1,'lowpan6_ieee802154_data']]], + ['if_5fidx',['if_idx',['../structpbuf.html#a6a58e90efbb4751608e9a1fdbd91e697',1,'pbuf']]], + ['ifindiscards',['ifindiscards',['../structstats__mib2__netif__ctrs.html#a4a767e6b835d5ad2f9b73751de2b0947',1,'stats_mib2_netif_ctrs']]], + ['ifinerrors',['ifinerrors',['../structstats__mib2__netif__ctrs.html#afda1a14dc79bb65a33f97f9fb467ec1d',1,'stats_mib2_netif_ctrs']]], + ['ifinnucastpkts',['ifinnucastpkts',['../structstats__mib2__netif__ctrs.html#a111f08290b3c6944108237cefba066dd',1,'stats_mib2_netif_ctrs']]], + ['ifinoctets',['ifinoctets',['../structstats__mib2__netif__ctrs.html#a7e9ddf9b4a17748a9d3f041c1d24ba8e',1,'stats_mib2_netif_ctrs']]], + ['ifinucastpkts',['ifinucastpkts',['../structstats__mib2__netif__ctrs.html#a9ed42d6329a9616669ba21789fa001d8',1,'stats_mib2_netif_ctrs']]], + ['ifinunknownprotos',['ifinunknownprotos',['../structstats__mib2__netif__ctrs.html#ac34eb01b42f22b1e49ca7c9734e737aa',1,'stats_mib2_netif_ctrs']]], + ['ifoutdiscards',['ifoutdiscards',['../structstats__mib2__netif__ctrs.html#a3a2aec508fd4466ca8bab10d8dc2c842',1,'stats_mib2_netif_ctrs']]], + ['ifouterrors',['ifouterrors',['../structstats__mib2__netif__ctrs.html#a91b60bb78759c9b655a74bb4fae3346e',1,'stats_mib2_netif_ctrs']]], + ['ifoutnucastpkts',['ifoutnucastpkts',['../structstats__mib2__netif__ctrs.html#afd3264670c39cc0d721a35cb6650f8d7',1,'stats_mib2_netif_ctrs']]], + ['ifoutoctets',['ifoutoctets',['../structstats__mib2__netif__ctrs.html#a24151d13a55452518e5f7832f48bd5a7',1,'stats_mib2_netif_ctrs']]], + ['ifoutucastpkts',['ifoutucastpkts',['../structstats__mib2__netif__ctrs.html#a24aba9660a2951027b23d4118b57c471',1,'stats_mib2_netif_ctrs']]], + ['igmp',['igmp',['../structstats__.html#a877e369c2abef97f13492faa838e2271',1,'stats_']]], + ['igmp_5fmac_5ffilter',['igmp_mac_filter',['../structnetif.html#ae64e56581bf0f136601f24c5395c19f0',1,'netif']]], + ['in6addr_5fany',['in6addr_any',['../inet6_8c.html#af8c97553060738d9edd6bfeab13ef7c3',1,'in6addr_any(): inet6.c'],['../lwip_2inet_8h.html#af8c97553060738d9edd6bfeab13ef7c3',1,'in6addr_any(): inet6.c']]], + ['inpub_5fpkt_5fid',['inpub_pkt_id',['../structmqtt__client__s.html#a6c81d0dd14e786222425ea04fd060824',1,'mqtt_client_s']]], + ['input',['input',['../structnetif.html#a8fe4f1b7b0d710216287da9615164a5c',1,'netif']]], + ['instance_5foid',['instance_oid',['../structsnmp__node__instance.html#aedb358729c310c8e5b391dd256726a23',1,'snmp_node_instance']]], + ['ip',['ip',['../structstats__.html#a40f5b637d083896a07a3482ede23b7ed',1,'stats_']]], + ['ip6',['ip6',['../structstats__.html#afc0942a5bc26735cf059099636b85336',1,'stats_']]], + ['ip6_5faddr',['ip6_addr',['../structnetif.html#ab7ef575d4ab398a182bc6e592f4d53a4',1,'netif']]], + ['ip6_5faddr_5fstate',['ip6_addr_state',['../structnetif.html#a54e81344084e9840a51cc4abab3b059b',1,'netif']]], + ['ip6_5faddr_5fvalid_5flife',['ip6_addr_valid_life',['../structnetif.html#a26f6e26d4a54c998716c10b7b85c8230',1,'netif']]], + ['ip6_5fautoconfig_5fenabled',['ip6_autoconfig_enabled',['../structnetif.html#ad98bafb7733b40ef898e53d91fbfa20f',1,'netif']]], + ['ip6_5ffrag',['ip6_frag',['../structstats__.html#a7373df7bc44bb9913a42c0bc7b3039cf',1,'stats_']]], + ['ip_5faddr',['ip_addr',['../structnetif.html#a9776aaee37ea8f07b9ddc0f8b4e7e866',1,'netif']]], + ['ip_5fdata',['ip_data',['../ip_8c.html#ac944fb6564f181bc90bc7c2b8b00d94c',1,'ip_data(): ip.c'],['../ip_8h.html#ac944fb6564f181bc90bc7c2b8b00d94c',1,'ip_data(): ip.c']]], + ['ip_5ffrag',['ip_frag',['../structstats__.html#a81fcccf03ab0d4e31423f39d0c880302',1,'stats_']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_a.html b/Libraries/LwIP/doc/doxygen/output/html/search/variables_a.html new file mode 100644 index 0000000..0892488 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_a.js b/Libraries/LwIP/doc/doxygen/output/html/search/variables_a.js new file mode 100644 index 0000000..8c223f4 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_a.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['jl',['jl',['../structapi__msg.html#a6387bddb309c218ac0ccc5ef6d7a033e',1,'api_msg']]], + ['jumpers',['jumpers',['../structnetbios__answer.html#a69cd3e8b8265531a7ce3e5cbd4911683',1,'netbios_answer']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_b.html b/Libraries/LwIP/doc/doxygen/output/html/search/variables_b.html new file mode 100644 index 0000000..ea46965 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_b.js b/Libraries/LwIP/doc/doxygen/output/html/search/variables_b.js new file mode 100644 index 0000000..c8680df --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_b.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['keep_5falive',['keep_alive',['../structmqtt__connect__client__info__t.html#ac80262a7456812e9eefffd8c3b9ac21a',1,'mqtt_connect_client_info_t']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_c.html b/Libraries/LwIP/doc/doxygen/output/html/search/variables_c.html new file mode 100644 index 0000000..94bf1a6 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_c.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_c.js b/Libraries/LwIP/doc/doxygen/output/html/search/variables_c.js new file mode 100644 index 0000000..b0f7147 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_c.js @@ -0,0 +1,22 @@ +var searchData= +[ + ['last_5freporter_5fflag',['last_reporter_flag',['../structigmp__group.html#a8fa72062d168d81c1c5ae5209eb0a874',1,'igmp_group::last_reporter_flag()'],['../structmld__group.html#aa8eb75f4dfaefbf0d2853b0e31ceb53b',1,'mld_group::last_reporter_flag()']]], + ['lastconflict',['lastconflict',['../structautoip.html#a2f51d8cde73e20d6e0ae3ec8053afb55',1,'autoip']]], + ['lastdata',['lastdata',['../structlwip__sock.html#aa487ac16b7e5b6a2a618b7b5060247e1',1,'lwip_sock']]], + ['legacy_5fquery',['legacy_query',['../structmdns__outpacket.html#aff8c520bffa87c78e0ee2440571bbd65',1,'mdns_outpacket']]], + ['len',['len',['../structnetvector.html#a8a95e6dcf57067e4354b9c2b6b391dbd',1,'netvector::len()'],['../structpbuf.html#a6f82449625e36e294f5d210268c0703f',1,'pbuf::len()'],['../structapi__msg.html#a40624c398d1939bfee54bffa708a363e',1,'api_msg::len()']]], + ['linger',['linger',['../structnetconn.html#a25ed06d944da0b0b9e7db5265be3fa3d',1,'netconn']]], + ['link',['link',['../structstats__.html#a67759c9b0059bf569f9f771df23924eb',1,'stats_']]], + ['link_5fcallback',['link_callback',['../structnetif.html#a4388cfadc8b4e9a9c1c93ce777bc3673',1,'netif']]], + ['link_5fspeed',['link_speed',['../structnetif.html#a908452e854180941054ed89f52bb8094',1,'netif']]], + ['link_5ftype',['link_type',['../structnetif.html#ad0ee2a2169e384a2977ece2c471e0062',1,'netif']]], + ['linkoutput',['linkoutput',['../structnetif.html#acaaac9b415a7be73eb8a287c8ed18a8d',1,'netif']]], + ['llipaddr',['llipaddr',['../structautoip.html#a13b5da8a86839b4cd9bd9f5400ac9dc7',1,'autoip']]], + ['local_5fip',['local_ip',['../structtcp__pcb__listen.html#a8a4f7b0551a0c6926a08ea5b6b3d5987',1,'tcp_pcb_listen::local_ip()'],['../structtcp__pcb.html#a0c4f101d55debee0d8fad86a7eb4f76f',1,'tcp_pcb::local_ip()'],['../structudp__pcb.html#a6160ea5e52f0d33e51b16b853ea1cd63',1,'udp_pcb::local_ip()']]], + ['local_5fport',['local_port',['../structudp__pcb.html#a8cc805631142eefc5593ae8ba3302d7c',1,'udp_pcb']]], + ['lock_5ftcpip_5fcore',['lock_tcpip_core',['../tcpip_8c.html#acd7be2108e9a47fd8f1ab0a49f76241d',1,'lock_tcpip_core(): tcpip.c'],['../tcpip_8h.html#acd7be2108e9a47fd8f1ab0a49f76241d',1,'lock_tcpip_core(): tcpip.c']]], + ['lowpan6_5fcontext',['lowpan6_context',['../structlowpan6__ieee802154__data.html#a190c9c06dfe1075abb7399f99553b507',1,'lowpan6_ieee802154_data']]], + ['lwip_5fcyclic_5ftimers',['lwip_cyclic_timers',['../timeouts_8c.html#addc06ab816f051a0fe6f280972eed142',1,'lwip_cyclic_timers(): timeouts.c'],['../timeouts_8h.html#addc06ab816f051a0fe6f280972eed142',1,'lwip_cyclic_timers(): timeouts.c']]], + ['lwip_5fnum_5fcyclic_5ftimers',['lwip_num_cyclic_timers',['../timeouts_8c.html#a9d01f287a19f20b073d3a1c306ecbfcd',1,'lwip_num_cyclic_timers(): timeouts.c'],['../timeouts_8h.html#a9d01f287a19f20b073d3a1c306ecbfcd',1,'lwip_num_cyclic_timers(): timeouts.c']]], + ['lwip_5fstats',['lwip_stats',['../stats_8c.html#a614735db0145db9ba944ede600d1d19b',1,'lwip_stats(): stats.c'],['../stats_8h.html#a614735db0145db9ba944ede600d1d19b',1,'lwip_stats(): stats.c']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_d.html b/Libraries/LwIP/doc/doxygen/output/html/search/variables_d.html new file mode 100644 index 0000000..b9381e9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_d.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_d.js b/Libraries/LwIP/doc/doxygen/output/html/search/variables_d.js new file mode 100644 index 0000000..6e327b1 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_d.js @@ -0,0 +1,22 @@ +var searchData= +[ + ['max_5ffdb_5fdynamic_5fentries',['max_fdb_dynamic_entries',['../structbridgeif__initdata__s.html#aeb312c2e698513c6416d5c8459ad622f',1,'bridgeif_initdata_s']]], + ['max_5ffdb_5fstatic_5fentries',['max_fdb_static_entries',['../structbridgeif__initdata__s.html#a210915aa1b0436ccabc7e8d9fd3c3fe6',1,'bridgeif_initdata_s']]], + ['max_5fnumber_5fof_5fpending_5fsessions',['max_number_of_pending_sessions',['../structnetbios__answer.html#a58aba600ed34b7c689606c296ef57c8c',1,'netbios_answer']]], + ['max_5fports',['max_ports',['../structbridgeif__initdata__s.html#a0e0bb6a885967b5fcfef09a8f0adc63f',1,'bridgeif_initdata_s']]], + ['max_5ftotal_5fnumber_5fof_5fcommand_5fblocks',['max_total_number_of_command_blocks',['../structnetbios__answer.html#a9cf85c173fe0d99c1c4e7e09aaeed9b8',1,'netbios_answer']]], + ['max_5ftotal_5fsessions_5fpossible',['max_total_sessions_possible',['../structnetbios__answer.html#a0069c9ae014881298828660787fa945e',1,'netbios_answer']]], + ['mcast_5fifindex',['mcast_ifindex',['../structraw__pcb.html#a5124a21e1523c774bd76c0eabc7c7ca8',1,'raw_pcb::mcast_ifindex()'],['../structudp__pcb.html#ac80ae56333b88cea08bfa3563b0dd3cd',1,'udp_pcb::mcast_ifindex()']]], + ['mcast_5fip4',['mcast_ip4',['../structudp__pcb.html#a1c32c7ebd76898cf8f1227c10d34dbe0',1,'udp_pcb']]], + ['mcast_5fttl',['mcast_ttl',['../structraw__pcb.html#a2ecc77e919de9bb552d1c70e771e2cad',1,'raw_pcb::mcast_ttl()'],['../structudp__pcb.html#aaab9255f7f1186aef12d45c9bb90d3f4',1,'udp_pcb::mcast_ttl()']]], + ['mem',['mem',['../structstats__.html#a656444f95080c6a3d474f73a6fcd9b1c',1,'stats_']]], + ['memp',['memp',['../structstats__.html#aa75d6b389e94b0f619b5db0daaf569fc',1,'stats_']]], + ['mib2',['mib2',['../structstats__.html#ac001c065c56c26c3952b19b9ce0d5832',1,'stats_']]], + ['mib2_5fcounters',['mib2_counters',['../structnetif.html#ab32cbe1851154fd020bac4be558f5fd5',1,'netif']]], + ['mld6',['mld6',['../structstats__.html#ab0ad1d07dff25cd3e4a8e5be607497f8',1,'stats_']]], + ['mld_5fmac_5ffilter',['mld_mac_filter',['../structnetif.html#abc67963ff9f574e98ef9c50138a3e470',1,'netif']]], + ['msg',['msg',['../structapi__msg.html#aef71459b5251d796434f741ca630d528',1,'api_msg']]], + ['msg_5fidx',['msg_idx',['../structmqtt__client__s.html#aae7bd1da3461efef9616934feb166aa5',1,'mqtt_client_s']]], + ['mtu',['mtu',['../structnetif.html#aca7d56b4e0f822b0ced2885f222b8d48',1,'netif']]], + ['mtu6',['mtu6',['../structnetif.html#acd78fca5dad6468605f38e327b3a5e72',1,'netif']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_e.html b/Libraries/LwIP/doc/doxygen/output/html/search/variables_e.html new file mode 100644 index 0000000..375ad70 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_e.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_e.js b/Libraries/LwIP/doc/doxygen/output/html/search/variables_e.js new file mode 100644 index 0000000..58a49ab --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_e.js @@ -0,0 +1,25 @@ +var searchData= +[ + ['n',['n',['../structapi__msg.html#adbbfc2baa8088b31fc722365237e5807',1,'api_msg']]], + ['name',['name',['../structmdns__service.html#ac6d92cf213e3647d3ca1520595c3b784',1,'mdns_service::name()'],['../structmdns__host.html#a560447b364854eb5480e137e09d3cd24',1,'mdns_host::name()'],['../structnetif.html#a32fca6ffd28bb9af3f891a378827a67e',1,'netif::name()'],['../structdns__api__msg.html#ada44a0eb6c9181cac80cfbbee01d3b53',1,'dns_api_msg::name()']]], + ['name_5fsize',['name_size',['../structnetbios__answer.html#a5828dc04e01a1f7b734019db428fd46d',1,'netbios_answer']]], + ['nd6',['nd6',['../structstats__.html#ab348a3a4b593b05d7df1293a06af8adf',1,'stats_']]], + ['netif',['netif',['../structmdns__packet.html#ac7307f344f654cb954f92d578dc7c989',1,'mdns_packet::netif()'],['../structmdns__outpacket.html#ad0bd066f127d35a0ce67193e1cd07430',1,'mdns_outpacket::netif()']]], + ['netif_5fdefault',['netif_default',['../netif_8c.html#a3d0925cbce550ed461907aee816713ba',1,'netif_default(): netif.c'],['../netif_8h.html#a3d0925cbce550ed461907aee816713ba',1,'netif_default(): netif.c']]], + ['netif_5flist',['netif_list',['../netif_8c.html#a1c8141eaa98f6dc6dfddbb23a706656c',1,'netif_list(): netif.c'],['../netif_8h.html#a1c8141eaa98f6dc6dfddbb23a706656c',1,'netif_list(): netif.c']]], + ['next',['next',['../structmem.html#a5abf13a11156e92c417f7ff66ef0b5cf',1,'mem::next()'],['../structmqtt__request__t.html#aca8de21579f51e7742076a4975a4177b',1,'mqtt_request_t::next()'],['../structsnmp__varbind.html#a7388422ffb0607b209a39d6d3fcad40e',1,'snmp_varbind::next()'],['../structigmp__group.html#a95c41b9e7de6a14bb8a7910913395e78',1,'igmp_group::next()'],['../structmld__group.html#a9273a345a5754241bf26ddc835d27ddc',1,'mld_group::next()'],['../structnetif.html#ae77736b64df442242795220d76be6b86',1,'netif::next()'],['../structpbuf.html#a5e5763c94fd18d78937b0b58ce7df341',1,'pbuf::next()'],['../structpbuf__rom.html#a5ffdf590ed65b217e2d96f648e1bd3e7',1,'pbuf_rom::next()'],['../structlwip__select__cb.html#a94128f0e164f895226f20fe75fddd35a',1,'lwip_select_cb::next()'],['../structtcp__pcb__listen.html#a0483d0c2a2758dcef18689be2efbdf34',1,'tcp_pcb_listen::next()'],['../structtcp__pcb.html#a2aed7ffb5fb83aabe68b36f097d99260',1,'tcp_pcb::next()']]], + ['node',['node',['../structsnmp__node__instance.html#a4136f44404b25f4d4dacc6b6b76e77ac',1,'snmp_node_instance::node()'],['../structsnmp__tree__node.html#ad851f80c809606947c99cb26a9163386',1,'snmp_tree_node::node()'],['../structsnmp__leaf__node.html#aa9e43030b5229d8425082c595c576992',1,'snmp_leaf_node::node()'],['../structsnmp__scalar__node.html#a3c9e5cc0a5e22ececeeb3c512d25e3a1',1,'snmp_scalar_node::node()'],['../structsnmp__scalar__array__node.html#a34753e75ec873c92381bf9b6d00d411b',1,'snmp_scalar_array_node::node()'],['../structsnmp__table__node.html#a3f12334e8d1556c36ce3e2206001ab18',1,'snmp_table_node::node()']]], + ['node_5ftype',['node_type',['../structsnmp__node.html#a1af8e20a688943a419b307bf123b1851',1,'snmp_node']]], + ['num',['num',['../structnetif.html#ab7ef01e505dd2feb781fe86756b1c973',1,'netif::num()'],['../structmemp__desc.html#a2c32db78e565b8812ca0e20fe929a8a7',1,'memp_desc::num()']]], + ['number_5fof_5falignment_5ferrors',['number_of_alignment_errors',['../structnetbios__answer.html#ab4f9ff63bd5529418c07762506189ad2',1,'netbios_answer']]], + ['number_5fof_5fcollisions',['number_of_collisions',['../structnetbios__answer.html#a45b7aec200434d3aaabc3ea6ebc46c1e',1,'netbios_answer']]], + ['number_5fof_5fcrcs',['number_of_crcs',['../structnetbios__answer.html#ab23a11db86a170b46aa8f8af434534d8',1,'netbios_answer']]], + ['number_5fof_5ffree_5fcommand_5fblocks',['number_of_free_command_blocks',['../structnetbios__answer.html#af41cbffb0ac6a9db3305b3fc64646219',1,'netbios_answer']]], + ['number_5fof_5fgood_5freceives',['number_of_good_receives',['../structnetbios__answer.html#a0eab7dbe733cc50f515126649de596ea',1,'netbios_answer']]], + ['number_5fof_5fgood_5fsends',['number_of_good_sends',['../structnetbios__answer.html#aa6088bca2a59ffcd077a474330511abd',1,'netbios_answer']]], + ['number_5fof_5fnames',['number_of_names',['../structnetbios__answer.html#ac4a95ccabbb945c9470e0cfd470be491',1,'netbios_answer']]], + ['number_5fof_5fno_5fresource_5fcondition',['number_of_no_resource_condition',['../structnetbios__answer.html#a62946dd0f27e9f9b9f295dcde4d3ea42',1,'netbios_answer']]], + ['number_5fof_5fpending_5fsessions',['number_of_pending_sessions',['../structnetbios__answer.html#a66098747155d5bd56f1c92aa8da10c1d',1,'netbios_answer']]], + ['number_5fof_5fretransmits',['number_of_retransmits',['../structnetbios__answer.html#ab175ad0f89102b3b3f81a41b5a72b321',1,'netbios_answer']]], + ['number_5fof_5fsend_5faborts',['number_of_send_aborts',['../structnetbios__answer.html#a1560e3864a0821acea9410e8c1d21408',1,'netbios_answer']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_f.html b/Libraries/LwIP/doc/doxygen/output/html/search/variables_f.html new file mode 100644 index 0000000..d371418 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_f.html @@ -0,0 +1,26 @@ + + + + + + + + + +
                  +
                  Loading...
                  +
                  + +
                  Searching...
                  +
                  No Matches
                  + +
                  + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/search/variables_f.js b/Libraries/LwIP/doc/doxygen/output/html/search/variables_f.js new file mode 100644 index 0000000..80559e1 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/search/variables_f.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['offset',['offset',['../structapi__msg.html#a4bd9382dd42b18120803e246a0203353',1,'api_msg']]], + ['oid',['oid',['../structsnmp__varbind.html#ace3a9e4dcdc9a5ec79a20c84946418a4',1,'snmp_varbind::oid()'],['../structsnmp__node.html#ae7a3bb0eb49ac527d461be414937f271',1,'snmp_node::oid()']]], + ['old_5faddress',['old_address',['../structnetif__ext__callback__args__t_1_1ipv4__changed__s.html#a0f6e5c1318218d95f1d3dc8c29c30ade',1,'netif_ext_callback_args_t::ipv4_changed_s::old_address()'],['../structnetif__ext__callback__args__t_1_1ipv6__set__s.html#aafda237ad0c20d25fa2ad83d63051226',1,'netif_ext_callback_args_t::ipv6_set_s::old_address()']]], + ['old_5fstate',['old_state',['../structnetif__ext__callback__args__t_1_1ipv6__addr__state__changed__s.html#a9b58712e82a73803391523324e19a776',1,'netif_ext_callback_args_t::ipv6_addr_state_changed_s']]], + ['op_5fcompleted',['op_completed',['../structnetconn.html#a982506698a59f185ff3f16d1675ea4ae',1,'netconn']]], + ['open',['open',['../structtftp__context.html#ae70d64e8e20328cc492d766506df4cba',1,'tftp_context']]], + ['original',['original',['../structpbuf__custom__ref.html#a135a1476908337d8073241fd7f68fa1d',1,'pbuf_custom_ref']]], + ['output',['output',['../structmqtt__client__s.html#a667c1dc7a6008055b63877acb06f333c',1,'mqtt_client_s::output()'],['../structnetif.html#a8e1dcfe65db487feecd244355f39215e',1,'netif::output()']]], + ['output_5fip6',['output_ip6',['../structnetif.html#ac38383379cff22c402156fec71c19617',1,'netif']]] +]; diff --git a/Libraries/LwIP/doc/doxygen/output/html/slipif_8c.html b/Libraries/LwIP/doc/doxygen/output/html/slipif_8c.html new file mode 100644 index 0000000..6840e96 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/slipif_8c.html @@ -0,0 +1,169 @@ + + + + + + + +lwIP: src/netif/slipif.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  slipif.c File Reference
                  +
                  +
                  +
                  #include "netif/slipif.h"
                  +#include "lwip/opt.h"
                  +#include "lwip/def.h"
                  +#include "lwip/pbuf.h"
                  +#include "lwip/stats.h"
                  +#include "lwip/snmp.h"
                  +#include "lwip/sys.h"
                  +#include "lwip/sio.h"
                  +
                  + + + + + +

                  +Macros

                  #define SLIP_MAX_SIZE   1500
                   
                  #define SLIP_SIO_SPEED(sio_fd)   0
                   
                  + + + + + + + + + + + +

                  +Functions

                  err_t slipif_init (struct netif *netif)
                   
                  void slipif_poll (struct netif *netif)
                   
                  void slipif_process_rxqueue (struct netif *netif)
                   
                  void slipif_received_byte (struct netif *netif, u8_t data)
                   
                  void slipif_received_bytes (struct netif *netif, u8_t *data, u8_t len)
                   
                  +

                  Detailed Description

                  +

                  SLIP Interface

                  +

                  Macro Definition Documentation

                  + +

                  ◆ SLIP_MAX_SIZE

                  + +
                  +
                  + + + + +
                  #define SLIP_MAX_SIZE   1500
                  +
                  +

                  Maximum packet size that is received by this netif

                  + +
                  +
                  + +

                  ◆ SLIP_SIO_SPEED

                  + +
                  +
                  + + + + + + + + +
                  #define SLIP_SIO_SPEED( sio_fd)   0
                  +
                  +

                  Define this to the interface speed for SNMP (sio_fd is the sio_fd_t returned by sio_open). The default value of zero means 'unknown'.

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/slipif_8c.js b/Libraries/LwIP/doc/doxygen/output/html/slipif_8c.js new file mode 100644 index 0000000..fa8dc34 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/slipif_8c.js @@ -0,0 +1,10 @@ +var slipif_8c = +[ + [ "SLIP_MAX_SIZE", "slipif_8c.html#accf448f9dabb0f33ef46b40355691cab", null ], + [ "SLIP_SIO_SPEED", "slipif_8c.html#a2a9e9ed81732a6794a9b9a712f75a1cc", null ], + [ "slipif_init", "group__slipif.html#ga687973ba82dab13a5b9d38d7399aeee3", null ], + [ "slipif_poll", "group__slipif.html#ga7b036fd1cde9b299139cac62f52d15a6", null ], + [ "slipif_process_rxqueue", "group__slipif.html#gae135be7d61e5bb49ab72476b0aa70946", null ], + [ "slipif_received_byte", "group__slipif.html#ga3f2f5e2fa4a816dc27a46f3ee91cf1b3", null ], + [ "slipif_received_bytes", "group__slipif.html#gabbee48569a513c90fe154632038eb6d6", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/slipif_8h.html b/Libraries/LwIP/doc/doxygen/output/html/slipif_8h.html new file mode 100644 index 0000000..a502500 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/slipif_8h.html @@ -0,0 +1,159 @@ + + + + + + + +lwIP: src/include/netif/slipif.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  slipif.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/netif.h"
                  +
                  + + + + + +

                  +Macros

                  #define SLIP_USE_RX_THREAD   !NO_SYS
                   
                  #define SLIP_RX_QUEUE   SLIP_RX_FROM_ISR
                   
                  + + + + + + + + + + + +

                  +Functions

                  err_t slipif_init (struct netif *netif)
                   
                  void slipif_poll (struct netif *netif)
                   
                  void slipif_process_rxqueue (struct netif *netif)
                   
                  void slipif_received_byte (struct netif *netif, u8_t data)
                   
                  void slipif_received_bytes (struct netif *netif, u8_t *data, u8_t len)
                   
                  +

                  Detailed Description

                  +

                  SLIP netif API

                  +

                  Macro Definition Documentation

                  + +

                  ◆ SLIP_RX_QUEUE

                  + +
                  +
                  + + + + +
                  #define SLIP_RX_QUEUE   SLIP_RX_FROM_ISR
                  +
                  +

                  Set this to 1 to enable functions to pass in RX bytes from ISR context. If enabled, slipif_received_byte[s]() process incoming bytes and put assembled packets on a queue, which is fed into lwIP from slipif_poll(). If disabled, slipif_poll() polls the serial line (using sio_tryread()). Set this to 1 (default for SLIP_RX_FROM_ISR) to queue incoming packets received by slipif_received_byte[s]() as long as PBUF_POOL pbufs are available. If disabled, packets will be dropped if more than one packet is received.

                  + +
                  +
                  + +

                  ◆ SLIP_USE_RX_THREAD

                  + +
                  +
                  + + + + +
                  #define SLIP_USE_RX_THREAD   !NO_SYS
                  +
                  +

                  Set this to 1 to start a thread that blocks reading on the serial line (using sio_read()).

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/slipif_8h.js b/Libraries/LwIP/doc/doxygen/output/html/slipif_8h.js new file mode 100644 index 0000000..c6f8b6e --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/slipif_8h.js @@ -0,0 +1,10 @@ +var slipif_8h = +[ + [ "SLIP_RX_QUEUE", "slipif_8h.html#a37ce8613535232db02bfd9ae9b51c668", null ], + [ "SLIP_USE_RX_THREAD", "slipif_8h.html#a198967c11f79cffc32192710294e8826", null ], + [ "slipif_init", "group__slipif.html#ga687973ba82dab13a5b9d38d7399aeee3", null ], + [ "slipif_poll", "group__slipif.html#ga7b036fd1cde9b299139cac62f52d15a6", null ], + [ "slipif_process_rxqueue", "group__slipif.html#gae135be7d61e5bb49ab72476b0aa70946", null ], + [ "slipif_received_byte", "group__slipif.html#ga3f2f5e2fa4a816dc27a46f3ee91cf1b3", null ], + [ "slipif_received_bytes", "group__slipif.html#gabbee48569a513c90fe154632038eb6d6", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/smtp_8c.html b/Libraries/LwIP/doc/doxygen/output/html/smtp_8c.html new file mode 100644 index 0000000..211af0c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/smtp_8c.html @@ -0,0 +1,234 @@ + + + + + + + +lwIP: src/apps/smtp/smtp.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  smtp.c File Reference
                  +
                  +
                  +
                  #include "lwip/apps/smtp.h"
                  +#include "lwip/sys.h"
                  +#include "lwip/sockets.h"
                  +#include "lwip/altcp.h"
                  +#include "lwip/dns.h"
                  +#include "lwip/mem.h"
                  +#include "lwip/altcp_tcp.h"
                  +#include "lwip/altcp_tls.h"
                  +#include <string.h>
                  +#include <stdlib.h>
                  +
                  + + + +

                  +Data Structures

                  struct  smtp_session
                   
                  + + + + + + + + + +

                  +Macros

                  #define SMTP_POLL_INTERVAL   4
                   
                  #define SMTP_TIMEOUT_DATABLOCK   ( 3 * 60 * SMTP_POLL_INTERVAL / 2)
                   
                  #define SMTP_TIMEOUT_DATATERM   (10 * 60 * SMTP_POLL_INTERVAL / 2)
                   
                  #define SMTP_TIMEOUT   ( 2 * 60 * SMTP_POLL_INTERVAL / 2)
                   
                  + + + +

                  +Enumerations

                  enum  smtp_session_state
                   
                  + + + + + + + + + + + + + + + +

                  +Functions

                  err_t smtp_set_server_addr (const char *server)
                   
                  void smtp_set_server_port (u16_t port)
                   
                  void smtp_set_tls_config (struct altcp_tls_config *tls_config)
                   
                  err_t smtp_set_auth (const char *username, const char *pass)
                   
                  err_t smtp_send_mail (const char *from, const char *to, const char *subject, const char *body, smtp_result_fn callback_fn, void *callback_arg)
                   
                  err_t smtp_send_mail_static (const char *from, const char *to, const char *subject, const char *body, smtp_result_fn callback_fn, void *callback_arg)
                   
                  void smtp_send_mail_int (void *arg)
                   
                  +

                  Detailed Description

                  +

                  SMTP client module

                  +

                  Author: Simon Goldschmidt

                  +

                  Macro Definition Documentation

                  + +

                  ◆ SMTP_POLL_INTERVAL

                  + +
                  +
                  + + + + +
                  #define SMTP_POLL_INTERVAL   4
                  +
                  +

                  TCP poll interval. Unit is 0.5 sec.

                  + +
                  +
                  + +

                  ◆ SMTP_TIMEOUT

                  + +
                  +
                  + + + + +
                  #define SMTP_TIMEOUT   ( 2 * 60 * SMTP_POLL_INTERVAL / 2)
                  +
                  +

                  TCP poll timeout while not sending the body. This is somewhat lower than the RFC states (5 minutes for initial, MAIL and RCPT) but still OK for us here. 2 minutes

                  + +
                  +
                  + +

                  ◆ SMTP_TIMEOUT_DATABLOCK

                  + +
                  +
                  + + + + +
                  #define SMTP_TIMEOUT_DATABLOCK   ( 3 * 60 * SMTP_POLL_INTERVAL / 2)
                  +
                  +

                  TCP poll timeout while sending message body, reset after every successful write. 3 minutes

                  + +
                  +
                  + +

                  ◆ SMTP_TIMEOUT_DATATERM

                  + +
                  +
                  + + + + +
                  #define SMTP_TIMEOUT_DATATERM   (10 * 60 * SMTP_POLL_INTERVAL / 2)
                  +
                  +

                  TCP poll timeout while waiting for confirmation after sending the body. 10 minutes

                  + +
                  +
                  +

                  Enumeration Type Documentation

                  + +

                  ◆ smtp_session_state

                  + +
                  +
                  + + + + +
                  enum smtp_session_state
                  +
                  +

                  State for SMTP client state machine

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/smtp_8c.js b/Libraries/LwIP/doc/doxygen/output/html/smtp_8c.js new file mode 100644 index 0000000..e88b388 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/smtp_8c.js @@ -0,0 +1,16 @@ +var smtp_8c = +[ + [ "smtp_session", "structsmtp__session.html", "structsmtp__session" ], + [ "SMTP_POLL_INTERVAL", "smtp_8c.html#a19ebd0b9a82b87fd205fed0dba06649e", null ], + [ "SMTP_TIMEOUT", "smtp_8c.html#a6029851c4f71d98b00d6c49a17ea9ef6", null ], + [ "SMTP_TIMEOUT_DATABLOCK", "smtp_8c.html#ad853ab316a3b866b87c0454053febfe3", null ], + [ "SMTP_TIMEOUT_DATATERM", "smtp_8c.html#a73855e673457f748b6bcba49aab9b035", null ], + [ "smtp_session_state", "smtp_8c.html#a04947fff2d3a3803e6c716aecc7f2bae", null ], + [ "smtp_send_mail", "group__smtp.html#gae43119480c4146df9eeff7ae80c767f7", null ], + [ "smtp_send_mail_int", "group__smtp.html#gaa9331cc8c6d73a8cd7e6e4466aca9243", null ], + [ "smtp_send_mail_static", "group__smtp.html#ga06f6582701def2a62582373bb0be5788", null ], + [ "smtp_set_auth", "group__smtp.html#ga79567a5a75e048a6b8addb5b038fc899", null ], + [ "smtp_set_server_addr", "group__smtp.html#ga1ccf4305461ec16cf41599341ec54983", null ], + [ "smtp_set_server_port", "group__smtp.html#ga4b0606e7ad64d8215cebbea43f08759f", null ], + [ "smtp_set_tls_config", "group__smtp.html#gae72a8a0ec42ecae1be401978e224c39e", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp_8h.html b/Libraries/LwIP/doc/doxygen/output/html/snmp_8h.html new file mode 100644 index 0000000..a69a607 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp_8h.html @@ -0,0 +1,144 @@ + + + + + + + +lwIP: src/include/lwip/snmp.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  snmp.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/ip_addr.h"
                  +
                  + + + + + + + + + +

                  +Macros

                  #define MIB2_COPY_SYSUPTIME_TO(ptrToVal)   (*(ptrToVal) = (sys_now() / 10))
                   
                  #define MIB2_STATS_NETIF_INC(n, x)   do { ++(n)->mib2_counters.x; } while(0)
                   
                  #define MIB2_STATS_NETIF_ADD(n, x, val)   do { (n)->mib2_counters.x += (val); } while(0)
                   
                  #define MIB2_INIT_NETIF(netif, type, speed)
                   
                  + + + +

                  +Enumerations

                  enum  snmp_ifType
                   
                  +

                  Detailed Description

                  +

                  SNMP support API for implementing netifs and statitics for MIB2

                  +

                  Macro Definition Documentation

                  + +

                  ◆ MIB2_COPY_SYSUPTIME_TO

                  + +
                  +
                  + + + + + + + + +
                  #define MIB2_COPY_SYSUPTIME_TO( ptrToVal)   (*(ptrToVal) = (sys_now() / 10))
                  +
                  +

                  This macro has a precision of ~49 days because sys_now returns u32_t. #define your own if you want ~490 days.

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp_8h.js b/Libraries/LwIP/doc/doxygen/output/html/snmp_8h.js new file mode 100644 index 0000000..35a6c87 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp_8h.js @@ -0,0 +1,8 @@ +var snmp_8h = +[ + [ "MIB2_COPY_SYSUPTIME_TO", "snmp_8h.html#abe6b270482ca9af07c029f3136d8ec9c", null ], + [ "MIB2_INIT_NETIF", "group__netif__mib2.html#ga5be1b8cba1d67bf6e7f8851ec91b10f0", null ], + [ "MIB2_STATS_NETIF_ADD", "group__netif__mib2.html#ga05641438775014b7e13b9e55eba48bed", null ], + [ "MIB2_STATS_NETIF_INC", "group__netif__mib2.html#ga3c52caf566d37705c6547f2d025afd9f", null ], + [ "snmp_ifType", "group__netif__mib2.html#ga15378b8dcd2a9dc2985142d864a767ba", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__asn1_8c.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__asn1_8c.html new file mode 100644 index 0000000..2d5b6e3 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__asn1_8c.html @@ -0,0 +1,750 @@ + + + + + + + +lwIP: src/apps/snmp/snmp_asn1.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  snmp_asn1.c File Reference
                  +
                  +
                  +
                  #include "lwip/apps/snmp_opts.h"
                  +#include "snmp_asn1.h"
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  err_t snmp_ans1_enc_tlv (struct snmp_pbuf_stream *pbuf_stream, struct snmp_asn1_tlv *tlv)
                   
                  err_t snmp_asn1_enc_raw (struct snmp_pbuf_stream *pbuf_stream, const u8_t *raw, u16_t raw_len)
                   
                  err_t snmp_asn1_enc_u32t (struct snmp_pbuf_stream *pbuf_stream, u16_t octets_needed, u32_t value)
                   
                  err_t snmp_asn1_enc_s32t (struct snmp_pbuf_stream *pbuf_stream, u16_t octets_needed, s32_t value)
                   
                  err_t snmp_asn1_enc_oid (struct snmp_pbuf_stream *pbuf_stream, const u32_t *oid, u16_t oid_len)
                   
                  void snmp_asn1_enc_length_cnt (u16_t length, u8_t *octets_needed)
                   
                  void snmp_asn1_enc_u32t_cnt (u32_t value, u16_t *octets_needed)
                   
                  void snmp_asn1_enc_s32t_cnt (s32_t value, u16_t *octets_needed)
                   
                  void snmp_asn1_enc_oid_cnt (const u32_t *oid, u16_t oid_len, u16_t *octets_needed)
                   
                  err_t snmp_asn1_dec_tlv (struct snmp_pbuf_stream *pbuf_stream, struct snmp_asn1_tlv *tlv)
                   
                  err_t snmp_asn1_dec_u32t (struct snmp_pbuf_stream *pbuf_stream, u16_t len, u32_t *value)
                   
                  err_t snmp_asn1_dec_s32t (struct snmp_pbuf_stream *pbuf_stream, u16_t len, s32_t *value)
                   
                  err_t snmp_asn1_dec_oid (struct snmp_pbuf_stream *pbuf_stream, u16_t len, u32_t *oid, u8_t *oid_len, u8_t oid_max_len)
                   
                  err_t snmp_asn1_dec_raw (struct snmp_pbuf_stream *pbuf_stream, u16_t len, u8_t *buf, u16_t *buf_len, u16_t buf_max_len)
                   
                  +

                  Detailed Description

                  +

                  Abstract Syntax Notation One (ISO 8824, 8825) encoding

                  +

                  Function Documentation

                  + +

                  ◆ snmp_ans1_enc_tlv()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  err_t snmp_ans1_enc_tlv (struct snmp_pbuf_stream * pbuf_stream,
                  struct snmp_asn1_tlv * tlv 
                  )
                  +
                  +

                  Encodes a TLV into a pbuf stream.

                  +
                  Parameters
                  + + + +
                  pbuf_streampoints to a pbuf stream
                  tlvTLV to encode
                  +
                  +
                  +
                  Returns
                  ERR_OK if successful, ERR_ARG if we can't (or won't) encode
                  + +
                  +
                  + +

                  ◆ snmp_asn1_dec_oid()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t snmp_asn1_dec_oid (struct snmp_pbuf_stream * pbuf_stream,
                  u16_t len,
                  u32_t * oid,
                  u8_t * oid_len,
                  u8_t oid_max_len 
                  )
                  +
                  +

                  Decodes object identifier from incoming message into array of u32_t.

                  +
                  Parameters
                  + + + + + + +
                  pbuf_streampoints to a pbuf stream
                  lenlength of the coded object identifier
                  oidreturn decoded object identifier
                  oid_lenreturn decoded object identifier length
                  oid_max_lensize of oid buffer
                  +
                  +
                  +
                  Returns
                  ERR_OK if successful, ERR_ARG if we can't (or won't) decode
                  + +
                  +
                  + +

                  ◆ snmp_asn1_dec_raw()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t snmp_asn1_dec_raw (struct snmp_pbuf_stream * pbuf_stream,
                  u16_t len,
                  u8_t * buf,
                  u16_t * buf_len,
                  u16_t buf_max_len 
                  )
                  +
                  +

                  Decodes (copies) raw data (ip-addresses, octet strings, opaque encoding) from incoming message into array.

                  +
                  Parameters
                  + + + + + + +
                  pbuf_streampoints to a pbuf stream
                  lenlength of the coded raw data (zero is valid, e.g. empty string!)
                  bufreturn raw bytes
                  buf_lenreturns length of the raw return value
                  buf_max_lenbuffer size
                  +
                  +
                  +
                  Returns
                  ERR_OK if successful, ERR_ARG if we can't (or won't) decode
                  + +
                  +
                  + +

                  ◆ snmp_asn1_dec_s32t()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t snmp_asn1_dec_s32t (struct snmp_pbuf_stream * pbuf_stream,
                  u16_t len,
                  s32_t * value 
                  )
                  +
                  +

                  Decodes integer into s32_t.

                  +
                  Parameters
                  + + + + +
                  pbuf_streampoints to a pbuf stream
                  lenlength of the coded integer field
                  valuereturn host order integer
                  +
                  +
                  +
                  Returns
                  ERR_OK if successful, ERR_ARG if we can't (or won't) decode
                  +
                  Note
                  ASN coded integers are always signed!
                  + +
                  +
                  + +

                  ◆ snmp_asn1_dec_tlv()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  err_t snmp_asn1_dec_tlv (struct snmp_pbuf_stream * pbuf_stream,
                  struct snmp_asn1_tlv * tlv 
                  )
                  +
                  +

                  Decodes a TLV from a pbuf stream.

                  +
                  Parameters
                  + + + +
                  pbuf_streampoints to a pbuf stream
                  tlvreturns decoded TLV
                  +
                  +
                  +
                  Returns
                  ERR_OK if successful, ERR_VAL if we can't decode
                  + +
                  +
                  + +

                  ◆ snmp_asn1_dec_u32t()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t snmp_asn1_dec_u32t (struct snmp_pbuf_stream * pbuf_stream,
                  u16_t len,
                  u32_t * value 
                  )
                  +
                  +

                  Decodes positive integer (counter, gauge, timeticks) into u32_t.

                  +
                  Parameters
                  + + + + +
                  pbuf_streampoints to a pbuf stream
                  lenlength of the coded integer field
                  valuereturn host order integer
                  +
                  +
                  +
                  Returns
                  ERR_OK if successful, ERR_ARG if we can't (or won't) decode
                  +
                  Note
                  ASN coded integers are always signed. E.g. +0xFFFF is coded as 0x00,0xFF,0xFF. Note the leading sign octet. A positive value of 0xFFFFFFFF is preceded with 0x00 and the length is 5 octets!!
                  + +
                  +
                  + +

                  ◆ snmp_asn1_enc_length_cnt()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void snmp_asn1_enc_length_cnt (u16_t length,
                  u8_t * octets_needed 
                  )
                  +
                  +

                  Returns octet count for length.

                  +
                  Parameters
                  + + + +
                  lengthparameter length
                  octets_neededpoints to the return value
                  +
                  +
                  + +
                  +
                  + +

                  ◆ snmp_asn1_enc_oid()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t snmp_asn1_enc_oid (struct snmp_pbuf_stream * pbuf_stream,
                  const u32_t * oid,
                  u16_t oid_len 
                  )
                  +
                  +

                  Encodes object identifier into a pbuf chained ASN1 msg.

                  +
                  Parameters
                  + + + + +
                  pbuf_streampoints to a pbuf stream
                  oidpoints to object identifier array
                  oid_lenobject identifier array length
                  +
                  +
                  +
                  Returns
                  ERR_OK if successful, ERR_ARG if we can't (or won't) encode
                  + +
                  +
                  + +

                  ◆ snmp_asn1_enc_oid_cnt()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  void snmp_asn1_enc_oid_cnt (const u32_t * oid,
                  u16_t oid_len,
                  u16_t * octets_needed 
                  )
                  +
                  +

                  Returns octet count for an object identifier.

                  +
                  Parameters
                  + + + + +
                  oidpoints to object identifier array
                  oid_lenobject identifier array length
                  octets_neededpoints to the return value
                  +
                  +
                  + +
                  +
                  + +

                  ◆ snmp_asn1_enc_raw()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t snmp_asn1_enc_raw (struct snmp_pbuf_stream * pbuf_stream,
                  const u8_t * raw,
                  u16_t raw_len 
                  )
                  +
                  +

                  Encodes raw data (octet string, opaque) into a pbuf chained ASN1 msg.

                  +
                  Parameters
                  + + + + +
                  pbuf_streampoints to a pbuf stream
                  raw_lenraw data length
                  rawpoints raw data
                  +
                  +
                  +
                  Returns
                  ERR_OK if successful, ERR_ARG if we can't (or won't) encode
                  + +
                  +
                  + +

                  ◆ snmp_asn1_enc_s32t()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t snmp_asn1_enc_s32t (struct snmp_pbuf_stream * pbuf_stream,
                  u16_t octets_needed,
                  s32_t value 
                  )
                  +
                  +

                  Encodes s32_t integer into a pbuf chained ASN1 msg.

                  +
                  Parameters
                  + + + + +
                  pbuf_streampoints to a pbuf stream
                  octets_neededencoding length (from snmp_asn1_enc_s32t_cnt())
                  valueis the host order s32_t value to be encoded
                  +
                  +
                  +
                  Returns
                  ERR_OK if successful, ERR_ARG if we can't (or won't) encode
                  +
                  See also
                  snmp_asn1_enc_s32t_cnt()
                  + +
                  +
                  + +

                  ◆ snmp_asn1_enc_s32t_cnt()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void snmp_asn1_enc_s32t_cnt (s32_t value,
                  u16_t * octets_needed 
                  )
                  +
                  +

                  Returns octet count for an s32_t.

                  +
                  Parameters
                  + + + +
                  valuevalue to be encoded
                  octets_neededpoints to the return value
                  +
                  +
                  +
                  Note
                  ASN coded integers are always signed.
                  + +
                  +
                  + +

                  ◆ snmp_asn1_enc_u32t()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t snmp_asn1_enc_u32t (struct snmp_pbuf_stream * pbuf_stream,
                  u16_t octets_needed,
                  u32_t value 
                  )
                  +
                  +

                  Encodes u32_t (counter, gauge, timeticks) into a pbuf chained ASN1 msg.

                  +
                  Parameters
                  + + + + +
                  pbuf_streampoints to a pbuf stream
                  octets_neededencoding length (from snmp_asn1_enc_u32t_cnt())
                  valueis the host order u32_t value to be encoded
                  +
                  +
                  +
                  Returns
                  ERR_OK if successful, ERR_ARG if we can't (or won't) encode
                  +
                  See also
                  snmp_asn1_enc_u32t_cnt()
                  + +
                  +
                  + +

                  ◆ snmp_asn1_enc_u32t_cnt()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void snmp_asn1_enc_u32t_cnt (u32_t value,
                  u16_t * octets_needed 
                  )
                  +
                  +

                  Returns octet count for an u32_t.

                  +
                  Parameters
                  + + + +
                  valuevalue to be encoded
                  octets_neededpoints to the return value
                  +
                  +
                  +
                  Note
                  ASN coded integers are always signed. E.g. +0xFFFF is coded as 0x00,0xFF,0xFF. Note the leading sign octet. A positive value of 0xFFFFFFFF is preceded with 0x00 and the length is 5 octets!!
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__asn1_8c.js b/Libraries/LwIP/doc/doxygen/output/html/snmp__asn1_8c.js new file mode 100644 index 0000000..520692e --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__asn1_8c.js @@ -0,0 +1,17 @@ +var snmp__asn1_8c = +[ + [ "snmp_ans1_enc_tlv", "snmp__asn1_8c.html#af8e905a214936995d235789f359cf015", null ], + [ "snmp_asn1_dec_oid", "snmp__asn1_8c.html#a8bb84ec51c46a890b7ced016043b2908", null ], + [ "snmp_asn1_dec_raw", "snmp__asn1_8c.html#a31055a35285214ea0d4ad60c64c2f73e", null ], + [ "snmp_asn1_dec_s32t", "snmp__asn1_8c.html#a51d36daf2935c246eb55fb749581e2bb", null ], + [ "snmp_asn1_dec_tlv", "snmp__asn1_8c.html#a7e3f63b155b06f7ade627060b55e4496", null ], + [ "snmp_asn1_dec_u32t", "snmp__asn1_8c.html#ac04e08c19c40cfc3333a181018887a51", null ], + [ "snmp_asn1_enc_length_cnt", "snmp__asn1_8c.html#a20343aef4524459a2b45704e18ef520d", null ], + [ "snmp_asn1_enc_oid", "snmp__asn1_8c.html#aa71260abd46fc2f682874016896fe218", null ], + [ "snmp_asn1_enc_oid_cnt", "snmp__asn1_8c.html#ab6fd58c1b41cb98117f00a11db7d226f", null ], + [ "snmp_asn1_enc_raw", "snmp__asn1_8c.html#a167b707051bbbeafea14eeca72449ac6", null ], + [ "snmp_asn1_enc_s32t", "snmp__asn1_8c.html#a25b3fe21becd08260ec56bef9299d3c6", null ], + [ "snmp_asn1_enc_s32t_cnt", "snmp__asn1_8c.html#a8c74914532f1e0c219dfb1977fd0c22f", null ], + [ "snmp_asn1_enc_u32t", "snmp__asn1_8c.html#aa54b4ee3c58ef66721df96fd8b1f66b2", null ], + [ "snmp_asn1_enc_u32t_cnt", "snmp__asn1_8c.html#a58965e0305884d550786440c84119ad4", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__asn1_8h.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__asn1_8h.html new file mode 100644 index 0000000..6acc16c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__asn1_8h.html @@ -0,0 +1,752 @@ + + + + + + + +lwIP: src/apps/snmp/snmp_asn1.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  snmp_asn1.h File Reference
                  +
                  +
                  +
                  #include "lwip/apps/snmp_opts.h"
                  +#include "lwip/err.h"
                  +#include "lwip/apps/snmp_core.h"
                  +#include "snmp_pbuf_stream.h"
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  err_t snmp_asn1_dec_tlv (struct snmp_pbuf_stream *pbuf_stream, struct snmp_asn1_tlv *tlv)
                   
                  err_t snmp_asn1_dec_u32t (struct snmp_pbuf_stream *pbuf_stream, u16_t len, u32_t *value)
                   
                  err_t snmp_asn1_dec_s32t (struct snmp_pbuf_stream *pbuf_stream, u16_t len, s32_t *value)
                   
                  err_t snmp_asn1_dec_oid (struct snmp_pbuf_stream *pbuf_stream, u16_t len, u32_t *oid, u8_t *oid_len, u8_t oid_max_len)
                   
                  err_t snmp_asn1_dec_raw (struct snmp_pbuf_stream *pbuf_stream, u16_t len, u8_t *buf, u16_t *buf_len, u16_t buf_max_len)
                   
                  err_t snmp_ans1_enc_tlv (struct snmp_pbuf_stream *pbuf_stream, struct snmp_asn1_tlv *tlv)
                   
                  void snmp_asn1_enc_length_cnt (u16_t length, u8_t *octets_needed)
                   
                  void snmp_asn1_enc_u32t_cnt (u32_t value, u16_t *octets_needed)
                   
                  void snmp_asn1_enc_s32t_cnt (s32_t value, u16_t *octets_needed)
                   
                  void snmp_asn1_enc_oid_cnt (const u32_t *oid, u16_t oid_len, u16_t *octets_needed)
                   
                  err_t snmp_asn1_enc_oid (struct snmp_pbuf_stream *pbuf_stream, const u32_t *oid, u16_t oid_len)
                   
                  err_t snmp_asn1_enc_s32t (struct snmp_pbuf_stream *pbuf_stream, u16_t octets_needed, s32_t value)
                   
                  err_t snmp_asn1_enc_u32t (struct snmp_pbuf_stream *pbuf_stream, u16_t octets_needed, u32_t value)
                   
                  err_t snmp_asn1_enc_raw (struct snmp_pbuf_stream *pbuf_stream, const u8_t *raw, u16_t raw_len)
                   
                  +

                  Detailed Description

                  +

                  Abstract Syntax Notation One (ISO 8824, 8825) codec.

                  +

                  Function Documentation

                  + +

                  ◆ snmp_ans1_enc_tlv()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  err_t snmp_ans1_enc_tlv (struct snmp_pbuf_stream * pbuf_stream,
                  struct snmp_asn1_tlv * tlv 
                  )
                  +
                  +

                  Encodes a TLV into a pbuf stream.

                  +
                  Parameters
                  + + + +
                  pbuf_streampoints to a pbuf stream
                  tlvTLV to encode
                  +
                  +
                  +
                  Returns
                  ERR_OK if successful, ERR_ARG if we can't (or won't) encode
                  + +
                  +
                  + +

                  ◆ snmp_asn1_dec_oid()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t snmp_asn1_dec_oid (struct snmp_pbuf_stream * pbuf_stream,
                  u16_t len,
                  u32_t * oid,
                  u8_t * oid_len,
                  u8_t oid_max_len 
                  )
                  +
                  +

                  Decodes object identifier from incoming message into array of u32_t.

                  +
                  Parameters
                  + + + + + + +
                  pbuf_streampoints to a pbuf stream
                  lenlength of the coded object identifier
                  oidreturn decoded object identifier
                  oid_lenreturn decoded object identifier length
                  oid_max_lensize of oid buffer
                  +
                  +
                  +
                  Returns
                  ERR_OK if successful, ERR_ARG if we can't (or won't) decode
                  + +
                  +
                  + +

                  ◆ snmp_asn1_dec_raw()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t snmp_asn1_dec_raw (struct snmp_pbuf_stream * pbuf_stream,
                  u16_t len,
                  u8_t * buf,
                  u16_t * buf_len,
                  u16_t buf_max_len 
                  )
                  +
                  +

                  Decodes (copies) raw data (ip-addresses, octet strings, opaque encoding) from incoming message into array.

                  +
                  Parameters
                  + + + + + + +
                  pbuf_streampoints to a pbuf stream
                  lenlength of the coded raw data (zero is valid, e.g. empty string!)
                  bufreturn raw bytes
                  buf_lenreturns length of the raw return value
                  buf_max_lenbuffer size
                  +
                  +
                  +
                  Returns
                  ERR_OK if successful, ERR_ARG if we can't (or won't) decode
                  + +
                  +
                  + +

                  ◆ snmp_asn1_dec_s32t()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t snmp_asn1_dec_s32t (struct snmp_pbuf_stream * pbuf_stream,
                  u16_t len,
                  s32_t * value 
                  )
                  +
                  +

                  Decodes integer into s32_t.

                  +
                  Parameters
                  + + + + +
                  pbuf_streampoints to a pbuf stream
                  lenlength of the coded integer field
                  valuereturn host order integer
                  +
                  +
                  +
                  Returns
                  ERR_OK if successful, ERR_ARG if we can't (or won't) decode
                  +
                  Note
                  ASN coded integers are always signed!
                  + +
                  +
                  + +

                  ◆ snmp_asn1_dec_tlv()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  err_t snmp_asn1_dec_tlv (struct snmp_pbuf_stream * pbuf_stream,
                  struct snmp_asn1_tlv * tlv 
                  )
                  +
                  +

                  Decodes a TLV from a pbuf stream.

                  +
                  Parameters
                  + + + +
                  pbuf_streampoints to a pbuf stream
                  tlvreturns decoded TLV
                  +
                  +
                  +
                  Returns
                  ERR_OK if successful, ERR_VAL if we can't decode
                  + +
                  +
                  + +

                  ◆ snmp_asn1_dec_u32t()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t snmp_asn1_dec_u32t (struct snmp_pbuf_stream * pbuf_stream,
                  u16_t len,
                  u32_t * value 
                  )
                  +
                  +

                  Decodes positive integer (counter, gauge, timeticks) into u32_t.

                  +
                  Parameters
                  + + + + +
                  pbuf_streampoints to a pbuf stream
                  lenlength of the coded integer field
                  valuereturn host order integer
                  +
                  +
                  +
                  Returns
                  ERR_OK if successful, ERR_ARG if we can't (or won't) decode
                  +
                  Note
                  ASN coded integers are always signed. E.g. +0xFFFF is coded as 0x00,0xFF,0xFF. Note the leading sign octet. A positive value of 0xFFFFFFFF is preceded with 0x00 and the length is 5 octets!!
                  + +
                  +
                  + +

                  ◆ snmp_asn1_enc_length_cnt()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void snmp_asn1_enc_length_cnt (u16_t length,
                  u8_t * octets_needed 
                  )
                  +
                  +

                  Returns octet count for length.

                  +
                  Parameters
                  + + + +
                  lengthparameter length
                  octets_neededpoints to the return value
                  +
                  +
                  + +
                  +
                  + +

                  ◆ snmp_asn1_enc_oid()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t snmp_asn1_enc_oid (struct snmp_pbuf_stream * pbuf_stream,
                  const u32_t * oid,
                  u16_t oid_len 
                  )
                  +
                  +

                  Encodes object identifier into a pbuf chained ASN1 msg.

                  +
                  Parameters
                  + + + + +
                  pbuf_streampoints to a pbuf stream
                  oidpoints to object identifier array
                  oid_lenobject identifier array length
                  +
                  +
                  +
                  Returns
                  ERR_OK if successful, ERR_ARG if we can't (or won't) encode
                  + +
                  +
                  + +

                  ◆ snmp_asn1_enc_oid_cnt()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  void snmp_asn1_enc_oid_cnt (const u32_t * oid,
                  u16_t oid_len,
                  u16_t * octets_needed 
                  )
                  +
                  +

                  Returns octet count for an object identifier.

                  +
                  Parameters
                  + + + + +
                  oidpoints to object identifier array
                  oid_lenobject identifier array length
                  octets_neededpoints to the return value
                  +
                  +
                  + +
                  +
                  + +

                  ◆ snmp_asn1_enc_raw()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t snmp_asn1_enc_raw (struct snmp_pbuf_stream * pbuf_stream,
                  const u8_t * raw,
                  u16_t raw_len 
                  )
                  +
                  +

                  Encodes raw data (octet string, opaque) into a pbuf chained ASN1 msg.

                  +
                  Parameters
                  + + + + +
                  pbuf_streampoints to a pbuf stream
                  raw_lenraw data length
                  rawpoints raw data
                  +
                  +
                  +
                  Returns
                  ERR_OK if successful, ERR_ARG if we can't (or won't) encode
                  + +
                  +
                  + +

                  ◆ snmp_asn1_enc_s32t()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t snmp_asn1_enc_s32t (struct snmp_pbuf_stream * pbuf_stream,
                  u16_t octets_needed,
                  s32_t value 
                  )
                  +
                  +

                  Encodes s32_t integer into a pbuf chained ASN1 msg.

                  +
                  Parameters
                  + + + + +
                  pbuf_streampoints to a pbuf stream
                  octets_neededencoding length (from snmp_asn1_enc_s32t_cnt())
                  valueis the host order s32_t value to be encoded
                  +
                  +
                  +
                  Returns
                  ERR_OK if successful, ERR_ARG if we can't (or won't) encode
                  +
                  See also
                  snmp_asn1_enc_s32t_cnt()
                  + +
                  +
                  + +

                  ◆ snmp_asn1_enc_s32t_cnt()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void snmp_asn1_enc_s32t_cnt (s32_t value,
                  u16_t * octets_needed 
                  )
                  +
                  +

                  Returns octet count for an s32_t.

                  +
                  Parameters
                  + + + +
                  valuevalue to be encoded
                  octets_neededpoints to the return value
                  +
                  +
                  +
                  Note
                  ASN coded integers are always signed.
                  + +
                  +
                  + +

                  ◆ snmp_asn1_enc_u32t()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t snmp_asn1_enc_u32t (struct snmp_pbuf_stream * pbuf_stream,
                  u16_t octets_needed,
                  u32_t value 
                  )
                  +
                  +

                  Encodes u32_t (counter, gauge, timeticks) into a pbuf chained ASN1 msg.

                  +
                  Parameters
                  + + + + +
                  pbuf_streampoints to a pbuf stream
                  octets_neededencoding length (from snmp_asn1_enc_u32t_cnt())
                  valueis the host order u32_t value to be encoded
                  +
                  +
                  +
                  Returns
                  ERR_OK if successful, ERR_ARG if we can't (or won't) encode
                  +
                  See also
                  snmp_asn1_enc_u32t_cnt()
                  + +
                  +
                  + +

                  ◆ snmp_asn1_enc_u32t_cnt()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void snmp_asn1_enc_u32t_cnt (u32_t value,
                  u16_t * octets_needed 
                  )
                  +
                  +

                  Returns octet count for an u32_t.

                  +
                  Parameters
                  + + + +
                  valuevalue to be encoded
                  octets_neededpoints to the return value
                  +
                  +
                  +
                  Note
                  ASN coded integers are always signed. E.g. +0xFFFF is coded as 0x00,0xFF,0xFF. Note the leading sign octet. A positive value of 0xFFFFFFFF is preceded with 0x00 and the length is 5 octets!!
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__asn1_8h.js b/Libraries/LwIP/doc/doxygen/output/html/snmp__asn1_8h.js new file mode 100644 index 0000000..169ce98 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__asn1_8h.js @@ -0,0 +1,17 @@ +var snmp__asn1_8h = +[ + [ "snmp_ans1_enc_tlv", "snmp__asn1_8h.html#af8e905a214936995d235789f359cf015", null ], + [ "snmp_asn1_dec_oid", "snmp__asn1_8h.html#a8bb84ec51c46a890b7ced016043b2908", null ], + [ "snmp_asn1_dec_raw", "snmp__asn1_8h.html#a31055a35285214ea0d4ad60c64c2f73e", null ], + [ "snmp_asn1_dec_s32t", "snmp__asn1_8h.html#a51d36daf2935c246eb55fb749581e2bb", null ], + [ "snmp_asn1_dec_tlv", "snmp__asn1_8h.html#a7e3f63b155b06f7ade627060b55e4496", null ], + [ "snmp_asn1_dec_u32t", "snmp__asn1_8h.html#ac04e08c19c40cfc3333a181018887a51", null ], + [ "snmp_asn1_enc_length_cnt", "snmp__asn1_8h.html#a20343aef4524459a2b45704e18ef520d", null ], + [ "snmp_asn1_enc_oid", "snmp__asn1_8h.html#aa71260abd46fc2f682874016896fe218", null ], + [ "snmp_asn1_enc_oid_cnt", "snmp__asn1_8h.html#ab6fd58c1b41cb98117f00a11db7d226f", null ], + [ "snmp_asn1_enc_raw", "snmp__asn1_8h.html#a167b707051bbbeafea14eeca72449ac6", null ], + [ "snmp_asn1_enc_s32t", "snmp__asn1_8h.html#a25b3fe21becd08260ec56bef9299d3c6", null ], + [ "snmp_asn1_enc_s32t_cnt", "snmp__asn1_8h.html#a8c74914532f1e0c219dfb1977fd0c22f", null ], + [ "snmp_asn1_enc_u32t", "snmp__asn1_8h.html#aa54b4ee3c58ef66721df96fd8b1f66b2", null ], + [ "snmp_asn1_enc_u32t_cnt", "snmp__asn1_8h.html#a58965e0305884d550786440c84119ad4", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__core_8c.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__core_8c.html new file mode 100644 index 0000000..bb33308 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__core_8c.html @@ -0,0 +1,1087 @@ + + + + + + + +lwIP: src/apps/snmp/snmp_core.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  snmp_core.c File Reference
                  +
                  +
                  +
                  #include "lwip/apps/snmp_opts.h"
                  +#include "lwip/apps/snmp.h"
                  +#include "lwip/apps/snmp_core.h"
                  +#include "snmp_core_priv.h"
                  +#include "lwip/netif.h"
                  +#include <string.h>
                  +#include "lwip/apps/snmp_mib2.h"
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  void snmp_set_mibs (const struct snmp_mib **mibs, u8_t num_mibs)
                   
                  void snmp_set_device_enterprise_oid (const struct snmp_obj_id *device_enterprise_oid)
                   
                  const struct snmp_obj_idsnmp_get_device_enterprise_oid (void)
                   
                  u8_t snmp_oid_to_ip4 (const u32_t *oid, ip4_addr_t *ip)
                   
                  void snmp_ip4_to_oid (const ip4_addr_t *ip, u32_t *oid)
                   
                  u8_t snmp_oid_to_ip6 (const u32_t *oid, ip6_addr_t *ip)
                   
                  void snmp_ip6_to_oid (const ip6_addr_t *ip, u32_t *oid)
                   
                  u8_t snmp_ip_port_to_oid (const ip_addr_t *ip, u16_t port, u32_t *oid)
                   
                  u8_t snmp_ip_to_oid (const ip_addr_t *ip, u32_t *oid)
                   
                  u8_t snmp_oid_to_ip (const u32_t *oid, u8_t oid_len, ip_addr_t *ip)
                   
                  u8_t snmp_oid_to_ip_port (const u32_t *oid, u8_t oid_len, ip_addr_t *ip, u16_t *port)
                   
                  void snmp_oid_assign (struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len)
                   
                  void snmp_oid_prefix (struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len)
                   
                  void snmp_oid_combine (struct snmp_obj_id *target, const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len)
                   
                  void snmp_oid_append (struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len)
                   
                  s8_t snmp_oid_compare (const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len)
                   
                  u8_t snmp_oid_equal (const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len)
                   
                  u8_t netif_to_num (const struct netif *netif)
                   
                  const struct snmp_nodesnmp_mib_tree_resolve_exact (const struct snmp_mib *mib, const u32_t *oid, u8_t oid_len, u8_t *oid_instance_len)
                   
                  void snmp_next_oid_init (struct snmp_next_oid_state *state, const u32_t *start_oid, u8_t start_oid_len, u32_t *next_oid_buf, u8_t next_oid_max_len)
                   
                  u8_t snmp_next_oid_precheck (struct snmp_next_oid_state *state, const u32_t *oid, u8_t oid_len)
                   
                  u8_t snmp_next_oid_check (struct snmp_next_oid_state *state, const u32_t *oid, u8_t oid_len, void *reference)
                   
                  u8_t snmp_oid_in_range (const u32_t *oid_in, u8_t oid_len, const struct snmp_oid_range *oid_ranges, u8_t oid_ranges_len)
                   
                  err_t snmp_decode_bits (const u8_t *buf, u32_t buf_len, u32_t *bit_value)
                   
                  u8_t snmp_encode_bits (u8_t *buf, u32_t buf_len, u32_t bit_value, u8_t bit_count)
                   
                  +

                  Detailed Description

                  +

                  MIB tree access/construction functions.

                  +

                  Function Documentation

                  + +

                  ◆ netif_to_num()

                  + +
                  +
                  + + + + + + + + +
                  u8_t netif_to_num (const struct netifnetif)
                  +
                  +

                  Convert netif to interface index

                  Parameters
                  + + +
                  netifnetif
                  +
                  +
                  +
                  Returns
                  index
                  + +
                  +
                  + +

                  ◆ snmp_decode_bits()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t snmp_decode_bits (const u8_t * buf,
                  u32_t buf_len,
                  u32_t * bit_value 
                  )
                  +
                  +

                  Decodes BITS pseudotype value from ASN.1 OctetString.

                  +
                  Note
                  Because BITS pseudo type is encoded as OCTET STRING, it cannot directly be encoded/decoded by the agent. Instead call this function as required from get/test/set methods.
                  +
                  Parameters
                  + + + + +
                  bufpoints to a buffer holding the ASN1 octet string
                  buf_lenlength of octet string
                  bit_valuedecoded Bit value with Bit0 == LSB
                  +
                  +
                  +
                  Returns
                  ERR_OK if successful, ERR_ARG if bit value contains more than 32 bit
                  + +
                  +
                  + +

                  ◆ snmp_encode_bits()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  u8_t snmp_encode_bits (u8_t * buf,
                  u32_t buf_len,
                  u32_t bit_value,
                  u8_t bit_count 
                  )
                  +
                  +

                  Encodes BITS pseudotype value into ASN.1 OctetString.

                  +
                  Note
                  Because BITS pseudo type is encoded as OCTET STRING, it cannot directly be encoded/decoded by the agent. Instead call this function as required from get/test/set methods.
                  +
                  Parameters
                  + + + + + +
                  bufpoints to a buffer where the resulting ASN1 octet string is stored to
                  buf_lenmax length of the bufffer
                  bit_valueBit value to encode with Bit0 == LSB
                  bit_countNumber of possible bits for the bit value (according to rfc we have to send all bits independant from their truth value)
                  +
                  +
                  +
                  Returns
                  number of bytes used from buffer to store the resulting OctetString
                  + +
                  +
                  + +

                  ◆ snmp_ip4_to_oid()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void snmp_ip4_to_oid (const ip4_addr_tip,
                  u32_t * oid 
                  )
                  +
                  +

                  Convert ip4_addr to InetAddressIPv4 (no InetAddressType)

                  Parameters
                  + + + +
                  ippoints to input struct
                  oidpoints to u32_t ident[4] output
                  +
                  +
                  + +
                  +
                  + +

                  ◆ snmp_ip6_to_oid()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void snmp_ip6_to_oid (const ip6_addr_tip,
                  u32_t * oid 
                  )
                  +
                  +

                  Convert ip6_addr to InetAddressIPv6 (no InetAddressType)

                  Parameters
                  + + + +
                  ippoints to input struct
                  oidpoints to u32_t ident[16] output
                  +
                  +
                  + +
                  +
                  + +

                  ◆ snmp_ip_port_to_oid()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  u8_t snmp_ip_port_to_oid (const ip_addr_tip,
                  u16_t port,
                  u32_t * oid 
                  )
                  +
                  +

                  Convert to InetAddressType+InetAddress+InetPortNumber

                  Parameters
                  + + + + +
                  ipIP address
                  portPort
                  oidOID
                  +
                  +
                  +
                  Returns
                  OID length
                  + +
                  +
                  + +

                  ◆ snmp_ip_to_oid()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  u8_t snmp_ip_to_oid (const ip_addr_tip,
                  u32_t * oid 
                  )
                  +
                  +

                  Convert to InetAddressType+InetAddress

                  Parameters
                  + + + +
                  ipIP address
                  oidOID
                  +
                  +
                  +
                  Returns
                  OID length
                  + +
                  +
                  + +

                  ◆ snmp_mib_tree_resolve_exact()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  const struct snmp_node* snmp_mib_tree_resolve_exact (const struct snmp_mibmib,
                  const u32_t * oid,
                  u8_t oid_len,
                  u8_t * oid_instance_len 
                  )
                  +
                  +

                  Searches tree for the supplied object identifier.

                  + +
                  +
                  + +

                  ◆ snmp_next_oid_check()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  u8_t snmp_next_oid_check (struct snmp_next_oid_statestate,
                  const u32_t * oid,
                  u8_t oid_len,
                  void * reference 
                  )
                  +
                  +

                  checks the passed OID if it is a candidate to be the next one (get_next); returns !=0 if passed oid is currently closest, otherwise 0

                  + +
                  +
                  + +

                  ◆ snmp_next_oid_init()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  void snmp_next_oid_init (struct snmp_next_oid_statestate,
                  const u32_t * start_oid,
                  u8_t start_oid_len,
                  u32_t * next_oid_buf,
                  u8_t next_oid_max_len 
                  )
                  +
                  +

                  initialize struct next_oid_state using this function before passing it to next_oid_check

                  + +
                  +
                  + +

                  ◆ snmp_next_oid_precheck()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  u8_t snmp_next_oid_precheck (struct snmp_next_oid_statestate,
                  const u32_t * oid,
                  u8_t oid_len 
                  )
                  +
                  +

                  checks if the passed incomplete OID may be a possible candidate for snmp_next_oid_check(); this methid is intended if the complete OID is not yet known but it is very expensive to build it up, so it is possible to test the starting part before building up the complete oid and pass it to snmp_next_oid_check()

                  + +
                  +
                  + +

                  ◆ snmp_oid_append()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  void snmp_oid_append (struct snmp_obj_idtarget,
                  const u32_t * oid,
                  u8_t oid_len 
                  )
                  +
                  +

                  Append OIDs to struct snmp_obj_id

                  Parameters
                  + + + + +
                  targetAssignment target to append to
                  oidOID
                  oid_lenOID length
                  +
                  +
                  + +
                  +
                  + +

                  ◆ snmp_oid_assign()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  void snmp_oid_assign (struct snmp_obj_idtarget,
                  const u32_t * oid,
                  u8_t oid_len 
                  )
                  +
                  +

                  Assign an OID to struct snmp_obj_id

                  Parameters
                  + + + + +
                  targetAssignment target
                  oidOID
                  oid_lenOID length
                  +
                  +
                  + +
                  +
                  + +

                  ◆ snmp_oid_combine()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  void snmp_oid_combine (struct snmp_obj_idtarget,
                  const u32_t * oid1,
                  u8_t oid1_len,
                  const u32_t * oid2,
                  u8_t oid2_len 
                  )
                  +
                  +

                  Combine two OIDs into struct snmp_obj_id

                  Parameters
                  + + + + + + +
                  targetAssignmet target
                  oid1OID 1
                  oid1_lenOID 1 length
                  oid2OID 2
                  oid2_lenOID 2 length
                  +
                  +
                  + +
                  +
                  + +

                  ◆ snmp_oid_compare()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  s8_t snmp_oid_compare (const u32_t * oid1,
                  u8_t oid1_len,
                  const u32_t * oid2,
                  u8_t oid2_len 
                  )
                  +
                  +

                  Compare two OIDs

                  Parameters
                  + + + + + +
                  oid1OID 1
                  oid1_lenOID 1 length
                  oid2OID 2
                  oid2_lenOID 2 length
                  +
                  +
                  +
                  Returns
                  -1: OID1<OID2 1: OID1 >OID2 0: equal
                  + +
                  +
                  + +

                  ◆ snmp_oid_equal()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  u8_t snmp_oid_equal (const u32_t * oid1,
                  u8_t oid1_len,
                  const u32_t * oid2,
                  u8_t oid2_len 
                  )
                  +
                  +

                  Check of two OIDs are equal

                  Parameters
                  + + + + + +
                  oid1OID 1
                  oid1_lenOID 1 length
                  oid2OID 2
                  oid2_lenOID 2 length
                  +
                  +
                  +
                  Returns
                  1: equal 0: non-equal
                  + +
                  +
                  + +

                  ◆ snmp_oid_in_range()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  u8_t snmp_oid_in_range (const u32_t * oid_in,
                  u8_t oid_len,
                  const struct snmp_oid_rangeoid_ranges,
                  u8_t oid_ranges_len 
                  )
                  +
                  +

                  checks if incoming OID length and values are in allowed ranges

                  + +
                  +
                  + +

                  ◆ snmp_oid_prefix()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  void snmp_oid_prefix (struct snmp_obj_idtarget,
                  const u32_t * oid,
                  u8_t oid_len 
                  )
                  +
                  +

                  Prefix an OID to OID in struct snmp_obj_id

                  Parameters
                  + + + + +
                  targetAssignment target to prefix
                  oidOID
                  oid_lenOID length
                  +
                  +
                  + +
                  +
                  + +

                  ◆ snmp_oid_to_ip()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  u8_t snmp_oid_to_ip (const u32_t * oid,
                  u8_t oid_len,
                  ip_addr_tip 
                  )
                  +
                  +

                  Convert from InetAddressType+InetAddress to ip_addr_t

                  Parameters
                  + + + + +
                  oidOID
                  oid_lenOID length
                  ipIP address
                  +
                  +
                  +
                  Returns
                  Parsed OID length
                  + +
                  +
                  + +

                  ◆ snmp_oid_to_ip4()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  u8_t snmp_oid_to_ip4 (const u32_t * oid,
                  ip4_addr_tip 
                  )
                  +
                  +

                  Conversion from InetAddressIPv4 oid to lwIP ip4_addr

                  Parameters
                  + + + +
                  oidpoints to u32_t ident[4] input
                  ippoints to output struct
                  +
                  +
                  + +
                  +
                  + +

                  ◆ snmp_oid_to_ip6()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  u8_t snmp_oid_to_ip6 (const u32_t * oid,
                  ip6_addr_tip 
                  )
                  +
                  +

                  Conversion from InetAddressIPv6 oid to lwIP ip6_addr

                  Parameters
                  + + + +
                  oidpoints to u32_t oid[16] input
                  ippoints to output struct
                  +
                  +
                  + +
                  +
                  + +

                  ◆ snmp_oid_to_ip_port()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  u8_t snmp_oid_to_ip_port (const u32_t * oid,
                  u8_t oid_len,
                  ip_addr_tip,
                  u16_t * port 
                  )
                  +
                  +

                  Convert from InetAddressType+InetAddress+InetPortNumber to ip_addr_t and u16_t

                  Parameters
                  + + + + + +
                  oidOID
                  oid_lenOID length
                  ipIP address
                  portPort
                  +
                  +
                  +
                  Returns
                  Parsed OID length
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__core_8c.js b/Libraries/LwIP/doc/doxygen/output/html/snmp__core_8c.js new file mode 100644 index 0000000..c6d9f5c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__core_8c.js @@ -0,0 +1,28 @@ +var snmp__core_8c = +[ + [ "netif_to_num", "snmp__core_8c.html#a871aa636806c7d68cbe24572598e59de", null ], + [ "snmp_decode_bits", "snmp__core_8c.html#ad3ab34b13bb9fcc757c8d366fe520fdc", null ], + [ "snmp_encode_bits", "snmp__core_8c.html#ae6f5d0c38a7ec164a67fa55c87f1de03", null ], + [ "snmp_get_device_enterprise_oid", "group__snmp__core.html#ga4dff82dda2553b9554a9f98561852a50", null ], + [ "snmp_ip4_to_oid", "snmp__core_8c.html#a4e01d395f0c8c38c2b5b681047969da1", null ], + [ "snmp_ip6_to_oid", "snmp__core_8c.html#af1f327eef86765cce0253c94ec3c5ce9", null ], + [ "snmp_ip_port_to_oid", "snmp__core_8c.html#a53b01262de3d1c52faf88dd4bb702a27", null ], + [ "snmp_ip_to_oid", "snmp__core_8c.html#a909ed1b0da526a0acdf6fa57a06f351e", null ], + [ "snmp_mib_tree_resolve_exact", "snmp__core_8c.html#af42d6d2732a92017a43b83a07609fd1a", null ], + [ "snmp_next_oid_check", "snmp__core_8c.html#a18126b2b13f267306c27e851e9379983", null ], + [ "snmp_next_oid_init", "snmp__core_8c.html#a8074765d5c2b809561f032d35e59e213", null ], + [ "snmp_next_oid_precheck", "snmp__core_8c.html#a9768ecf81f01880dbf1cc1933bd9e60a", null ], + [ "snmp_oid_append", "snmp__core_8c.html#a5aa6c8dbfc93235b160afaf3a40c1c93", null ], + [ "snmp_oid_assign", "snmp__core_8c.html#a41fd5e854d809499e28c66b4918481a6", null ], + [ "snmp_oid_combine", "snmp__core_8c.html#a6edcb88d8162544333bcede301cf0904", null ], + [ "snmp_oid_compare", "snmp__core_8c.html#af041ab415e8063097c79be2b892174f8", null ], + [ "snmp_oid_equal", "snmp__core_8c.html#ac2b6821b3d4a25033433fc25ffd74c9e", null ], + [ "snmp_oid_in_range", "snmp__core_8c.html#a5275903be5948b1c28bfadb365823504", null ], + [ "snmp_oid_prefix", "snmp__core_8c.html#a32256b37b211b4f59d8f114cee364f39", null ], + [ "snmp_oid_to_ip", "snmp__core_8c.html#a66aac86af921cd8aecb95eb252eb3e84", null ], + [ "snmp_oid_to_ip4", "snmp__core_8c.html#a095efcd4202782e57625d7b1afcdbf77", null ], + [ "snmp_oid_to_ip6", "snmp__core_8c.html#aa1b651a1faf6f1ee0dfdbea48310ed09", null ], + [ "snmp_oid_to_ip_port", "snmp__core_8c.html#a21f02b239cc9abae586f5ef92923e507", null ], + [ "snmp_set_device_enterprise_oid", "group__snmp__core.html#gacc71ac857bf9215f06a624dda09abe3a", null ], + [ "snmp_set_mibs", "group__snmp__core.html#ga29c76474971f25d038fd486447c70e21", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__core_8h.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__core_8h.html new file mode 100644 index 0000000..e8040b5 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__core_8h.html @@ -0,0 +1,1117 @@ + + + + + + + +lwIP: src/include/lwip/apps/snmp_core.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  snmp_core.h File Reference
                  +
                  +
                  +
                  #include "lwip/apps/snmp_opts.h"
                  +#include "lwip/ip_addr.h"
                  +#include "lwip/err.h"
                  +
                  + + + + + + + + + + + + + + + + + + + +

                  +Data Structures

                  struct  snmp_obj_id
                   
                  union  snmp_variant_value
                   
                  struct  snmp_node
                   
                  struct  snmp_node_instance
                   
                  struct  snmp_tree_node
                   
                  struct  snmp_leaf_node
                   
                  struct  snmp_mib
                   
                  struct  snmp_oid_range
                   
                  struct  snmp_next_oid_state
                   
                  + + + +

                  +Macros

                  #define SNMP_NODE_TREE   0x00
                   
                  + + + + + +

                  +Enumerations

                  enum  snmp_err_t
                   
                  enum  snmp_access_t
                   
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  u8_t snmp_oid_in_range (const u32_t *oid_in, u8_t oid_len, const struct snmp_oid_range *oid_ranges, u8_t oid_ranges_len)
                   
                  void snmp_next_oid_init (struct snmp_next_oid_state *state, const u32_t *start_oid, u8_t start_oid_len, u32_t *next_oid_buf, u8_t next_oid_max_len)
                   
                  u8_t snmp_next_oid_precheck (struct snmp_next_oid_state *state, const u32_t *oid, u8_t oid_len)
                   
                  u8_t snmp_next_oid_check (struct snmp_next_oid_state *state, const u32_t *oid, u8_t oid_len, void *reference)
                   
                  void snmp_oid_assign (struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len)
                   
                  void snmp_oid_combine (struct snmp_obj_id *target, const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len)
                   
                  void snmp_oid_prefix (struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len)
                   
                  void snmp_oid_append (struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len)
                   
                  u8_t snmp_oid_equal (const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len)
                   
                  s8_t snmp_oid_compare (const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len)
                   
                  u8_t snmp_oid_to_ip4 (const u32_t *oid, ip4_addr_t *ip)
                   
                  void snmp_ip4_to_oid (const ip4_addr_t *ip, u32_t *oid)
                   
                  u8_t snmp_oid_to_ip6 (const u32_t *oid, ip6_addr_t *ip)
                   
                  void snmp_ip6_to_oid (const ip6_addr_t *ip, u32_t *oid)
                   
                  u8_t snmp_ip_to_oid (const ip_addr_t *ip, u32_t *oid)
                   
                  u8_t snmp_ip_port_to_oid (const ip_addr_t *ip, u16_t port, u32_t *oid)
                   
                  u8_t snmp_oid_to_ip (const u32_t *oid, u8_t oid_len, ip_addr_t *ip)
                   
                  u8_t snmp_oid_to_ip_port (const u32_t *oid, u8_t oid_len, ip_addr_t *ip, u16_t *port)
                   
                  u8_t netif_to_num (const struct netif *netif)
                   
                  err_t snmp_decode_bits (const u8_t *buf, u32_t buf_len, u32_t *bit_value)
                   
                  u8_t snmp_encode_bits (u8_t *buf, u32_t buf_len, u32_t bit_value, u8_t bit_count)
                   
                  +

                  Detailed Description

                  +

                  SNMP core API for implementing MIBs

                  +

                  Macro Definition Documentation

                  + +

                  ◆ SNMP_NODE_TREE

                  + +
                  +
                  + + + + +
                  #define SNMP_NODE_TREE   0x00
                  +
                  +

                  SNMP MIB node types tree node is the only node the stack can process in order to walk the tree, all other nodes are assumed to be leaf nodes. This cannot be an enum because users may want to define their own node types.

                  + +
                  +
                  +

                  Enumeration Type Documentation

                  + +

                  ◆ snmp_access_t

                  + +
                  +
                  + + + + +
                  enum snmp_access_t
                  +
                  +

                  SNMP node instance access types

                  + +
                  +
                  + +

                  ◆ snmp_err_t

                  + +
                  +
                  + + + + +
                  enum snmp_err_t
                  +
                  +

                  error codes predefined by SNMP prot.

                  + +
                  +
                  +

                  Function Documentation

                  + +

                  ◆ netif_to_num()

                  + +
                  +
                  + + + + + + + + +
                  u8_t netif_to_num (const struct netifnetif)
                  +
                  +

                  Convert netif to interface index

                  Parameters
                  + + +
                  netifnetif
                  +
                  +
                  +
                  Returns
                  index
                  + +
                  +
                  + +

                  ◆ snmp_decode_bits()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t snmp_decode_bits (const u8_t * buf,
                  u32_t buf_len,
                  u32_t * bit_value 
                  )
                  +
                  +

                  Decodes BITS pseudotype value from ASN.1 OctetString.

                  +
                  Note
                  Because BITS pseudo type is encoded as OCTET STRING, it cannot directly be encoded/decoded by the agent. Instead call this function as required from get/test/set methods.
                  +
                  Parameters
                  + + + + +
                  bufpoints to a buffer holding the ASN1 octet string
                  buf_lenlength of octet string
                  bit_valuedecoded Bit value with Bit0 == LSB
                  +
                  +
                  +
                  Returns
                  ERR_OK if successful, ERR_ARG if bit value contains more than 32 bit
                  + +
                  +
                  + +

                  ◆ snmp_encode_bits()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  u8_t snmp_encode_bits (u8_t * buf,
                  u32_t buf_len,
                  u32_t bit_value,
                  u8_t bit_count 
                  )
                  +
                  +

                  Encodes BITS pseudotype value into ASN.1 OctetString.

                  +
                  Note
                  Because BITS pseudo type is encoded as OCTET STRING, it cannot directly be encoded/decoded by the agent. Instead call this function as required from get/test/set methods.
                  +
                  Parameters
                  + + + + + +
                  bufpoints to a buffer where the resulting ASN1 octet string is stored to
                  buf_lenmax length of the bufffer
                  bit_valueBit value to encode with Bit0 == LSB
                  bit_countNumber of possible bits for the bit value (according to rfc we have to send all bits independant from their truth value)
                  +
                  +
                  +
                  Returns
                  number of bytes used from buffer to store the resulting OctetString
                  + +
                  +
                  + +

                  ◆ snmp_ip4_to_oid()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void snmp_ip4_to_oid (const ip4_addr_tip,
                  u32_t * oid 
                  )
                  +
                  +

                  Convert ip4_addr to InetAddressIPv4 (no InetAddressType)

                  Parameters
                  + + + +
                  ippoints to input struct
                  oidpoints to u32_t ident[4] output
                  +
                  +
                  + +
                  +
                  + +

                  ◆ snmp_ip6_to_oid()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void snmp_ip6_to_oid (const ip6_addr_tip,
                  u32_t * oid 
                  )
                  +
                  +

                  Convert ip6_addr to InetAddressIPv6 (no InetAddressType)

                  Parameters
                  + + + +
                  ippoints to input struct
                  oidpoints to u32_t ident[16] output
                  +
                  +
                  + +
                  +
                  + +

                  ◆ snmp_ip_port_to_oid()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  u8_t snmp_ip_port_to_oid (const ip_addr_tip,
                  u16_t port,
                  u32_t * oid 
                  )
                  +
                  +

                  Convert to InetAddressType+InetAddress+InetPortNumber

                  Parameters
                  + + + + +
                  ipIP address
                  portPort
                  oidOID
                  +
                  +
                  +
                  Returns
                  OID length
                  + +
                  +
                  + +

                  ◆ snmp_ip_to_oid()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  u8_t snmp_ip_to_oid (const ip_addr_tip,
                  u32_t * oid 
                  )
                  +
                  +

                  Convert to InetAddressType+InetAddress

                  Parameters
                  + + + +
                  ipIP address
                  oidOID
                  +
                  +
                  +
                  Returns
                  OID length
                  + +
                  +
                  + +

                  ◆ snmp_next_oid_check()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  u8_t snmp_next_oid_check (struct snmp_next_oid_statestate,
                  const u32_t * oid,
                  u8_t oid_len,
                  void * reference 
                  )
                  +
                  +

                  checks the passed OID if it is a candidate to be the next one (get_next); returns !=0 if passed oid is currently closest, otherwise 0

                  + +
                  +
                  + +

                  ◆ snmp_next_oid_init()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  void snmp_next_oid_init (struct snmp_next_oid_statestate,
                  const u32_t * start_oid,
                  u8_t start_oid_len,
                  u32_t * next_oid_buf,
                  u8_t next_oid_max_len 
                  )
                  +
                  +

                  initialize struct next_oid_state using this function before passing it to next_oid_check

                  + +
                  +
                  + +

                  ◆ snmp_next_oid_precheck()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  u8_t snmp_next_oid_precheck (struct snmp_next_oid_statestate,
                  const u32_t * oid,
                  u8_t oid_len 
                  )
                  +
                  +

                  checks if the passed incomplete OID may be a possible candidate for snmp_next_oid_check(); this methid is intended if the complete OID is not yet known but it is very expensive to build it up, so it is possible to test the starting part before building up the complete oid and pass it to snmp_next_oid_check()

                  + +
                  +
                  + +

                  ◆ snmp_oid_append()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  void snmp_oid_append (struct snmp_obj_idtarget,
                  const u32_t * oid,
                  u8_t oid_len 
                  )
                  +
                  +

                  Append OIDs to struct snmp_obj_id

                  Parameters
                  + + + + +
                  targetAssignment target to append to
                  oidOID
                  oid_lenOID length
                  +
                  +
                  + +
                  +
                  + +

                  ◆ snmp_oid_assign()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  void snmp_oid_assign (struct snmp_obj_idtarget,
                  const u32_t * oid,
                  u8_t oid_len 
                  )
                  +
                  +

                  Assign an OID to struct snmp_obj_id

                  Parameters
                  + + + + +
                  targetAssignment target
                  oidOID
                  oid_lenOID length
                  +
                  +
                  + +
                  +
                  + +

                  ◆ snmp_oid_combine()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  void snmp_oid_combine (struct snmp_obj_idtarget,
                  const u32_t * oid1,
                  u8_t oid1_len,
                  const u32_t * oid2,
                  u8_t oid2_len 
                  )
                  +
                  +

                  Combine two OIDs into struct snmp_obj_id

                  Parameters
                  + + + + + + +
                  targetAssignmet target
                  oid1OID 1
                  oid1_lenOID 1 length
                  oid2OID 2
                  oid2_lenOID 2 length
                  +
                  +
                  + +
                  +
                  + +

                  ◆ snmp_oid_compare()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  s8_t snmp_oid_compare (const u32_t * oid1,
                  u8_t oid1_len,
                  const u32_t * oid2,
                  u8_t oid2_len 
                  )
                  +
                  +

                  Compare two OIDs

                  Parameters
                  + + + + + +
                  oid1OID 1
                  oid1_lenOID 1 length
                  oid2OID 2
                  oid2_lenOID 2 length
                  +
                  +
                  +
                  Returns
                  -1: OID1<OID2 1: OID1 >OID2 0: equal
                  + +
                  +
                  + +

                  ◆ snmp_oid_equal()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  u8_t snmp_oid_equal (const u32_t * oid1,
                  u8_t oid1_len,
                  const u32_t * oid2,
                  u8_t oid2_len 
                  )
                  +
                  +

                  Check of two OIDs are equal

                  Parameters
                  + + + + + +
                  oid1OID 1
                  oid1_lenOID 1 length
                  oid2OID 2
                  oid2_lenOID 2 length
                  +
                  +
                  +
                  Returns
                  1: equal 0: non-equal
                  + +
                  +
                  + +

                  ◆ snmp_oid_in_range()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  u8_t snmp_oid_in_range (const u32_t * oid_in,
                  u8_t oid_len,
                  const struct snmp_oid_rangeoid_ranges,
                  u8_t oid_ranges_len 
                  )
                  +
                  +

                  checks if incoming OID length and values are in allowed ranges

                  + +
                  +
                  + +

                  ◆ snmp_oid_prefix()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  void snmp_oid_prefix (struct snmp_obj_idtarget,
                  const u32_t * oid,
                  u8_t oid_len 
                  )
                  +
                  +

                  Prefix an OID to OID in struct snmp_obj_id

                  Parameters
                  + + + + +
                  targetAssignment target to prefix
                  oidOID
                  oid_lenOID length
                  +
                  +
                  + +
                  +
                  + +

                  ◆ snmp_oid_to_ip()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  u8_t snmp_oid_to_ip (const u32_t * oid,
                  u8_t oid_len,
                  ip_addr_tip 
                  )
                  +
                  +

                  Convert from InetAddressType+InetAddress to ip_addr_t

                  Parameters
                  + + + + +
                  oidOID
                  oid_lenOID length
                  ipIP address
                  +
                  +
                  +
                  Returns
                  Parsed OID length
                  + +
                  +
                  + +

                  ◆ snmp_oid_to_ip4()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  u8_t snmp_oid_to_ip4 (const u32_t * oid,
                  ip4_addr_tip 
                  )
                  +
                  +

                  Conversion from InetAddressIPv4 oid to lwIP ip4_addr

                  Parameters
                  + + + +
                  oidpoints to u32_t ident[4] input
                  ippoints to output struct
                  +
                  +
                  + +
                  +
                  + +

                  ◆ snmp_oid_to_ip6()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  u8_t snmp_oid_to_ip6 (const u32_t * oid,
                  ip6_addr_tip 
                  )
                  +
                  +

                  Conversion from InetAddressIPv6 oid to lwIP ip6_addr

                  Parameters
                  + + + +
                  oidpoints to u32_t oid[16] input
                  ippoints to output struct
                  +
                  +
                  + +
                  +
                  + +

                  ◆ snmp_oid_to_ip_port()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  u8_t snmp_oid_to_ip_port (const u32_t * oid,
                  u8_t oid_len,
                  ip_addr_tip,
                  u16_t * port 
                  )
                  +
                  +

                  Convert from InetAddressType+InetAddress+InetPortNumber to ip_addr_t and u16_t

                  Parameters
                  + + + + + +
                  oidOID
                  oid_lenOID length
                  ipIP address
                  portPort
                  +
                  +
                  +
                  Returns
                  Parsed OID length
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__core_8h.js b/Libraries/LwIP/doc/doxygen/output/html/snmp__core_8h.js new file mode 100644 index 0000000..d0a83ad --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__core_8h.js @@ -0,0 +1,36 @@ +var snmp__core_8h = +[ + [ "snmp_obj_id", "structsnmp__obj__id.html", null ], + [ "snmp_variant_value", "unionsnmp__variant__value.html", null ], + [ "snmp_node", "structsnmp__node.html", "structsnmp__node" ], + [ "snmp_node_instance", "structsnmp__node__instance.html", "structsnmp__node__instance" ], + [ "snmp_tree_node", "structsnmp__tree__node.html", "structsnmp__tree__node" ], + [ "snmp_leaf_node", "structsnmp__leaf__node.html", "structsnmp__leaf__node" ], + [ "snmp_mib", "structsnmp__mib.html", null ], + [ "snmp_oid_range", "structsnmp__oid__range.html", null ], + [ "snmp_next_oid_state", "structsnmp__next__oid__state.html", null ], + [ "SNMP_NODE_TREE", "snmp__core_8h.html#a9ee3aad9305fdd883abb37822be81b72", null ], + [ "snmp_access_t", "snmp__core_8h.html#ad5a33687d1a6fcf970266b41b0633760", null ], + [ "snmp_err_t", "snmp__core_8h.html#abaa9cdad345ad93da515d31625a54589", null ], + [ "netif_to_num", "snmp__core_8h.html#a871aa636806c7d68cbe24572598e59de", null ], + [ "snmp_decode_bits", "snmp__core_8h.html#ad3ab34b13bb9fcc757c8d366fe520fdc", null ], + [ "snmp_encode_bits", "snmp__core_8h.html#ae6f5d0c38a7ec164a67fa55c87f1de03", null ], + [ "snmp_ip4_to_oid", "snmp__core_8h.html#a4e01d395f0c8c38c2b5b681047969da1", null ], + [ "snmp_ip6_to_oid", "snmp__core_8h.html#af1f327eef86765cce0253c94ec3c5ce9", null ], + [ "snmp_ip_port_to_oid", "snmp__core_8h.html#a53b01262de3d1c52faf88dd4bb702a27", null ], + [ "snmp_ip_to_oid", "snmp__core_8h.html#a909ed1b0da526a0acdf6fa57a06f351e", null ], + [ "snmp_next_oid_check", "snmp__core_8h.html#a18126b2b13f267306c27e851e9379983", null ], + [ "snmp_next_oid_init", "snmp__core_8h.html#a8074765d5c2b809561f032d35e59e213", null ], + [ "snmp_next_oid_precheck", "snmp__core_8h.html#a9768ecf81f01880dbf1cc1933bd9e60a", null ], + [ "snmp_oid_append", "snmp__core_8h.html#a5aa6c8dbfc93235b160afaf3a40c1c93", null ], + [ "snmp_oid_assign", "snmp__core_8h.html#a41fd5e854d809499e28c66b4918481a6", null ], + [ "snmp_oid_combine", "snmp__core_8h.html#a6edcb88d8162544333bcede301cf0904", null ], + [ "snmp_oid_compare", "snmp__core_8h.html#af041ab415e8063097c79be2b892174f8", null ], + [ "snmp_oid_equal", "snmp__core_8h.html#ac2b6821b3d4a25033433fc25ffd74c9e", null ], + [ "snmp_oid_in_range", "snmp__core_8h.html#a5275903be5948b1c28bfadb365823504", null ], + [ "snmp_oid_prefix", "snmp__core_8h.html#a32256b37b211b4f59d8f114cee364f39", null ], + [ "snmp_oid_to_ip", "snmp__core_8h.html#a66aac86af921cd8aecb95eb252eb3e84", null ], + [ "snmp_oid_to_ip4", "snmp__core_8h.html#a095efcd4202782e57625d7b1afcdbf77", null ], + [ "snmp_oid_to_ip6", "snmp__core_8h.html#aa1b651a1faf6f1ee0dfdbea48310ed09", null ], + [ "snmp_oid_to_ip_port", "snmp__core_8h.html#a21f02b239cc9abae586f5ef92923e507", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2_8c.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2_8c.html new file mode 100644 index 0000000..e4e1256 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2_8c.html @@ -0,0 +1,110 @@ + + + + + + + +lwIP: src/apps/snmp/snmp_mib2.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  snmp_mib2.c File Reference
                  +
                  +
                  +
                  #include "lwip/apps/snmp_opts.h"
                  +#include "lwip/snmp.h"
                  +#include "lwip/apps/snmp.h"
                  +#include "lwip/apps/snmp_core.h"
                  +#include "lwip/apps/snmp_mib2.h"
                  +#include "lwip/apps/snmp_scalar.h"
                  +#include "lwip/tcpip.h"
                  +#include "lwip/priv/tcpip_priv.h"
                  +

                  Detailed Description

                  +

                  Management Information Base II (RFC1213) objects and functions.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2_8h.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2_8h.html new file mode 100644 index 0000000..aba7ed2 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2_8h.html @@ -0,0 +1,125 @@ + + + + + + + +lwIP: src/include/lwip/apps/snmp_mib2.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  snmp_mib2.h File Reference
                  +
                  +
                  + + + + + + + + + + + + + + + + +

                  +Functions

                  void snmp_mib2_set_sysdescr (const u8_t *str, const u16_t *len)
                   
                  void snmp_mib2_set_syscontact (u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize)
                   
                  void snmp_mib2_set_syscontact_readonly (const u8_t *ocstr, const u16_t *ocstrlen)
                   
                  void snmp_mib2_set_sysname (u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize)
                   
                  void snmp_mib2_set_sysname_readonly (const u8_t *ocstr, const u16_t *ocstrlen)
                   
                  void snmp_mib2_set_syslocation (u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize)
                   
                  void snmp_mib2_set_syslocation_readonly (const u8_t *ocstr, const u16_t *ocstrlen)
                   
                  +

                  Detailed Description

                  +

                  SNMP MIB2 API

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2_8h.js b/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2_8h.js new file mode 100644 index 0000000..b44b408 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2_8h.js @@ -0,0 +1,10 @@ +var snmp__mib2_8h = +[ + [ "snmp_mib2_set_syscontact", "group__snmp__mib2.html#gaf96002d9d10bcae27a95b2367674249e", null ], + [ "snmp_mib2_set_syscontact_readonly", "group__snmp__mib2.html#ga53339a03d720c745790837905bc2171a", null ], + [ "snmp_mib2_set_sysdescr", "group__snmp__mib2.html#gacde87dc1d3bd669b19d834b028f490cc", null ], + [ "snmp_mib2_set_syslocation", "group__snmp__mib2.html#ga4248e004a27344b7260574c3a51882f2", null ], + [ "snmp_mib2_set_syslocation_readonly", "group__snmp__mib2.html#gac1759d5b0640943697be2ad538325267", null ], + [ "snmp_mib2_set_sysname", "group__snmp__mib2.html#gae7ce98a6ecc0bb92aaa2b330599a2db7", null ], + [ "snmp_mib2_set_sysname_readonly", "group__snmp__mib2.html#gab95eb687492fa0e7d762f911c442bdc5", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__icmp_8c.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__icmp_8c.html new file mode 100644 index 0000000..24abfa9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__icmp_8c.html @@ -0,0 +1,110 @@ + + + + + + + +lwIP: src/apps/snmp/snmp_mib2_icmp.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  snmp_mib2_icmp.c File Reference
                  +
                  +
                  +
                  #include "lwip/snmp.h"
                  +#include "lwip/apps/snmp.h"
                  +#include "lwip/apps/snmp_core.h"
                  +#include "lwip/apps/snmp_mib2.h"
                  +#include "lwip/apps/snmp_table.h"
                  +#include "lwip/apps/snmp_scalar.h"
                  +#include "lwip/icmp.h"
                  +#include "lwip/stats.h"
                  +

                  Detailed Description

                  +

                  Management Information Base II (RFC1213) ICMP objects and functions.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__interfaces_8c.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__interfaces_8c.html new file mode 100644 index 0000000..26ca3c2 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__interfaces_8c.html @@ -0,0 +1,111 @@ + + + + + + + +lwIP: src/apps/snmp/snmp_mib2_interfaces.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  snmp_mib2_interfaces.c File Reference
                  +
                  +
                  +
                  #include "lwip/snmp.h"
                  +#include "lwip/apps/snmp.h"
                  +#include "lwip/apps/snmp_core.h"
                  +#include "lwip/apps/snmp_mib2.h"
                  +#include "lwip/apps/snmp_table.h"
                  +#include "lwip/apps/snmp_scalar.h"
                  +#include "lwip/netif.h"
                  +#include "lwip/stats.h"
                  +#include <string.h>
                  +

                  Detailed Description

                  +

                  Management Information Base II (RFC1213) INTERFACES objects and functions.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__ip_8c.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__ip_8c.html new file mode 100644 index 0000000..8ebc726 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__ip_8c.html @@ -0,0 +1,112 @@ + + + + + + + +lwIP: src/apps/snmp/snmp_mib2_ip.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  snmp_mib2_ip.c File Reference
                  +
                  +
                  +
                  #include "lwip/snmp.h"
                  +#include "lwip/apps/snmp.h"
                  +#include "lwip/apps/snmp_core.h"
                  +#include "lwip/apps/snmp_mib2.h"
                  +#include "lwip/apps/snmp_table.h"
                  +#include "lwip/apps/snmp_scalar.h"
                  +#include "lwip/stats.h"
                  +#include "lwip/netif.h"
                  +#include "lwip/ip.h"
                  +#include "lwip/etharp.h"
                  +

                  Detailed Description

                  +

                  Management Information Base II (RFC1213) IP objects and functions.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__snmp_8c.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__snmp_8c.html new file mode 100644 index 0000000..9d81cfc --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__snmp_8c.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: src/apps/snmp/snmp_mib2_snmp.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  snmp_mib2_snmp.c File Reference
                  +
                  +
                  +
                  #include "lwip/snmp.h"
                  +#include "lwip/apps/snmp.h"
                  +#include "lwip/apps/snmp_core.h"
                  +#include "lwip/apps/snmp_mib2.h"
                  +#include "lwip/apps/snmp_scalar.h"
                  +

                  Detailed Description

                  +

                  Management Information Base II (RFC1213) SNMP objects and functions.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__system_8c.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__system_8c.html new file mode 100644 index 0000000..ba1b7c5 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__system_8c.html @@ -0,0 +1,130 @@ + + + + + + + +lwIP: src/apps/snmp/snmp_mib2_system.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  snmp_mib2_system.c File Reference
                  +
                  +
                  +
                  #include "lwip/snmp.h"
                  +#include "lwip/apps/snmp.h"
                  +#include "lwip/apps/snmp_core.h"
                  +#include "lwip/apps/snmp_mib2.h"
                  +#include "lwip/apps/snmp_table.h"
                  +#include "lwip/apps/snmp_scalar.h"
                  +#include "lwip/sys.h"
                  +#include <string.h>
                  +
                  + + + + + + + + + + + + + + + +

                  +Functions

                  void snmp_mib2_set_sysdescr (const u8_t *str, const u16_t *len)
                   
                  void snmp_mib2_set_syscontact (u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize)
                   
                  void snmp_mib2_set_syscontact_readonly (const u8_t *ocstr, const u16_t *ocstrlen)
                   
                  void snmp_mib2_set_sysname (u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize)
                   
                  void snmp_mib2_set_sysname_readonly (const u8_t *ocstr, const u16_t *ocstrlen)
                   
                  void snmp_mib2_set_syslocation (u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize)
                   
                  void snmp_mib2_set_syslocation_readonly (const u8_t *ocstr, const u16_t *ocstrlen)
                   
                  +

                  Detailed Description

                  +

                  Management Information Base II (RFC1213) SYSTEM objects and functions.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__system_8c.js b/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__system_8c.js new file mode 100644 index 0000000..de9f86f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__system_8c.js @@ -0,0 +1,10 @@ +var snmp__mib2__system_8c = +[ + [ "snmp_mib2_set_syscontact", "group__snmp__mib2.html#gaf96002d9d10bcae27a95b2367674249e", null ], + [ "snmp_mib2_set_syscontact_readonly", "group__snmp__mib2.html#ga53339a03d720c745790837905bc2171a", null ], + [ "snmp_mib2_set_sysdescr", "group__snmp__mib2.html#gacde87dc1d3bd669b19d834b028f490cc", null ], + [ "snmp_mib2_set_syslocation", "group__snmp__mib2.html#ga4248e004a27344b7260574c3a51882f2", null ], + [ "snmp_mib2_set_syslocation_readonly", "group__snmp__mib2.html#gac1759d5b0640943697be2ad538325267", null ], + [ "snmp_mib2_set_sysname", "group__snmp__mib2.html#gae7ce98a6ecc0bb92aaa2b330599a2db7", null ], + [ "snmp_mib2_set_sysname_readonly", "group__snmp__mib2.html#gab95eb687492fa0e7d762f911c442bdc5", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__tcp_8c.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__tcp_8c.html new file mode 100644 index 0000000..bae273b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__tcp_8c.html @@ -0,0 +1,112 @@ + + + + + + + +lwIP: src/apps/snmp/snmp_mib2_tcp.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  snmp_mib2_tcp.c File Reference
                  +
                  +
                  +
                  #include "lwip/snmp.h"
                  +#include "lwip/apps/snmp.h"
                  +#include "lwip/apps/snmp_core.h"
                  +#include "lwip/apps/snmp_mib2.h"
                  +#include "lwip/apps/snmp_table.h"
                  +#include "lwip/apps/snmp_scalar.h"
                  +#include "lwip/tcp.h"
                  +#include "lwip/priv/tcp_priv.h"
                  +#include "lwip/stats.h"
                  +#include <string.h>
                  +

                  Detailed Description

                  +

                  Management Information Base II (RFC1213) TCP objects and functions.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__udp_8c.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__udp_8c.html new file mode 100644 index 0000000..5a075cb --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__mib2__udp_8c.html @@ -0,0 +1,111 @@ + + + + + + + +lwIP: src/apps/snmp/snmp_mib2_udp.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  snmp_mib2_udp.c File Reference
                  +
                  +
                  +
                  #include "lwip/snmp.h"
                  +#include "lwip/apps/snmp.h"
                  +#include "lwip/apps/snmp_core.h"
                  +#include "lwip/apps/snmp_mib2.h"
                  +#include "lwip/apps/snmp_table.h"
                  +#include "lwip/apps/snmp_scalar.h"
                  +#include "lwip/udp.h"
                  +#include "lwip/stats.h"
                  +#include <string.h>
                  +

                  Detailed Description

                  +

                  Management Information Base II (RFC1213) UDP objects and functions.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__msg_8c.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__msg_8c.html new file mode 100644 index 0000000..3d16298 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__msg_8c.html @@ -0,0 +1,217 @@ + + + + + + + +lwIP: src/apps/snmp/snmp_msg.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  snmp_msg.c File Reference
                  +
                  +
                  +
                  #include "lwip/apps/snmp_opts.h"
                  +#include "snmp_msg.h"
                  +#include "snmp_asn1.h"
                  +#include "snmp_core_priv.h"
                  +#include "lwip/ip_addr.h"
                  +#include "lwip/stats.h"
                  +#include <string.h>
                  +
                  + + + + + + + + + + + + + + + + + +

                  +Functions

                  const char * snmp_get_community (void)
                   
                  void snmp_set_community (const char *const community)
                   
                  const char * snmp_get_community_write (void)
                   
                  const char * snmp_get_community_trap (void)
                   
                  void snmp_set_community_write (const char *const community)
                   
                  void snmp_set_community_trap (const char *const community)
                   
                  void snmp_set_write_callback (snmp_write_callback_fct write_callback, void *callback_arg)
                   
                  err_t snmp_varbind_length (struct snmp_varbind *varbind, struct snmp_varbind_len *len)
                   
                  + + + + + + + +

                  +Variables

                  const char * snmp_community = "public"
                   
                  const char * snmp_community_write = "private"
                   
                  const char * snmp_community_trap = "public"
                   
                  +

                  Detailed Description

                  +

                  SNMP message processing (RFC1157).

                  +

                  Function Documentation

                  + +

                  ◆ snmp_varbind_length()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  err_t snmp_varbind_length (struct snmp_varbindvarbind,
                  struct snmp_varbind_lenlen 
                  )
                  +
                  +

                  Calculate the length of a varbind list

                  + +
                  +
                  +

                  Variable Documentation

                  + +

                  ◆ snmp_community

                  + +
                  +
                  + + + + +
                  const char* snmp_community = "public"
                  +
                  +

                  SNMP community string

                  + +
                  +
                  + +

                  ◆ snmp_community_trap

                  + +
                  +
                  + + + + +
                  const char* snmp_community_trap = "public"
                  +
                  +

                  SNMP community string for sending traps

                  + +
                  +
                  + +

                  ◆ snmp_community_write

                  + +
                  +
                  + + + + +
                  const char* snmp_community_write = "private"
                  +
                  +

                  SNMP community string for write access

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__msg_8c.js b/Libraries/LwIP/doc/doxygen/output/html/snmp__msg_8c.js new file mode 100644 index 0000000..2c8a603 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__msg_8c.js @@ -0,0 +1,14 @@ +var snmp__msg_8c = +[ + [ "snmp_get_community", "group__snmp__core.html#gacf277cbca915275190426aeef4cfb103", null ], + [ "snmp_get_community_trap", "group__snmp__traps.html#gafdd3299e145f53cc826cc11a469f8409", null ], + [ "snmp_get_community_write", "group__snmp__core.html#gaba31b6f1816661df5a3b7f2076ee6ec0", null ], + [ "snmp_set_community", "group__snmp__core.html#ga30cc587a260757fdb2b81d462f430ef1", null ], + [ "snmp_set_community_trap", "group__snmp__traps.html#ga5631711f357b6610be7e93b1c6d87760", null ], + [ "snmp_set_community_write", "group__snmp__core.html#ga341461766863cff46a44e5f431f2da01", null ], + [ "snmp_set_write_callback", "group__snmp__core.html#gaff6a6b39322e92862ab55cfcddfe254b", null ], + [ "snmp_varbind_length", "snmp__msg_8c.html#ac1f684dada963f68b71a04a702f28fe5", null ], + [ "snmp_community", "snmp__msg_8c.html#ac6f810ab812c44c6ca1df1fdf926a9f6", null ], + [ "snmp_community_trap", "snmp__msg_8c.html#a2e2007343d9492b8e31d363d2c6ad79b", null ], + [ "snmp_community_write", "snmp__msg_8c.html#a2d77485bb0b640c8e5f569ca756d3b04", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__msg_8h.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__msg_8h.html new file mode 100644 index 0000000..5448d61 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__msg_8h.html @@ -0,0 +1,210 @@ + + + + + + + +lwIP: src/apps/snmp/snmp_msg.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  snmp_msg.h File Reference
                  +
                  +
                  +
                  #include "lwip/apps/snmp_opts.h"
                  +#include "lwip/apps/snmp.h"
                  +#include "lwip/apps/snmp_core.h"
                  +#include "snmp_pbuf_stream.h"
                  +#include "lwip/ip_addr.h"
                  +#include "lwip/err.h"
                  +
                  + + + +

                  +Data Structures

                  struct  snmp_varbind_len
                   
                  + + + +

                  +Functions

                  err_t snmp_varbind_length (struct snmp_varbind *varbind, struct snmp_varbind_len *len)
                   
                  + + + + + + + +

                  +Variables

                  const char * snmp_community
                   
                  const char * snmp_community_write
                   
                  void * snmp_traps_handle
                   
                  +

                  Detailed Description

                  +

                  SNMP Agent message handling structures (internal API, do not use in client code).

                  +

                  Function Documentation

                  + +

                  ◆ snmp_varbind_length()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  err_t snmp_varbind_length (struct snmp_varbindvarbind,
                  struct snmp_varbind_lenlen 
                  )
                  +
                  +

                  Calculate the length of a varbind list

                  + +
                  +
                  +

                  Variable Documentation

                  + +

                  ◆ snmp_community

                  + +
                  +
                  + + + + +
                  const char* snmp_community
                  +
                  +

                  Agent community string

                  +

                  SNMP community string

                  + +
                  +
                  + +

                  ◆ snmp_community_write

                  + +
                  +
                  + + + + +
                  const char* snmp_community_write
                  +
                  +

                  Agent community string for write access

                  +

                  SNMP community string for write access

                  + +
                  +
                  + +

                  ◆ snmp_traps_handle

                  + +
                  +
                  + + + + +
                  void* snmp_traps_handle
                  +
                  +

                  handle for sending traps

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__msg_8h.js b/Libraries/LwIP/doc/doxygen/output/html/snmp__msg_8h.js new file mode 100644 index 0000000..8787d71 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__msg_8h.js @@ -0,0 +1,8 @@ +var snmp__msg_8h = +[ + [ "snmp_varbind_len", "structsnmp__varbind__len.html", null ], + [ "snmp_varbind_length", "snmp__msg_8h.html#ac1f684dada963f68b71a04a702f28fe5", null ], + [ "snmp_community", "snmp__msg_8h.html#ac6f810ab812c44c6ca1df1fdf926a9f6", null ], + [ "snmp_community_write", "snmp__msg_8h.html#a2d77485bb0b640c8e5f569ca756d3b04", null ], + [ "snmp_traps_handle", "snmp__msg_8h.html#ade16efa80e2c2a20236d3cb96b19c79a", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__netconn_8c.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__netconn_8c.html new file mode 100644 index 0000000..66a7d03 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__netconn_8c.html @@ -0,0 +1,139 @@ + + + + + + + +lwIP: src/apps/snmp/snmp_netconn.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  snmp_netconn.c File Reference
                  +
                  +
                  +
                  #include "lwip/apps/snmp_opts.h"
                  +#include <string.h>
                  +#include "lwip/api.h"
                  +#include "lwip/ip.h"
                  +#include "lwip/udp.h"
                  +#include "snmp_msg.h"
                  +#include "lwip/sys.h"
                  +#include "lwip/prot/iana.h"
                  +
                  + + + +

                  +Functions

                  void snmp_init (void)
                   
                  +

                  Detailed Description

                  +

                  SNMP netconn frontend.

                  +

                  Function Documentation

                  + +

                  ◆ snmp_init()

                  + +
                  +
                  + + + + + + + + +
                  void snmp_init (void )
                  +
                  +

                  Starts SNMP Agent.

                  +

                  Agent setup, start listening to port 161.

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__netconn_8c.js b/Libraries/LwIP/doc/doxygen/output/html/snmp__netconn_8c.js new file mode 100644 index 0000000..c46b6da --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__netconn_8c.js @@ -0,0 +1,4 @@ +var snmp__netconn_8c = +[ + [ "snmp_init", "snmp__netconn_8c.html#ga4d88f2fc7655280384131d543e0d83e5", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__opts_8h.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__opts_8h.html new file mode 100644 index 0000000..3336988 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__opts_8h.html @@ -0,0 +1,179 @@ + + + + + + + +lwIP: src/include/lwip/apps/snmp_opts.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  snmp_opts.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Macros

                  #define LWIP_SNMP   0
                   
                  #define SNMP_USE_NETCONN   0
                   
                  #define SNMP_USE_RAW   1
                   
                  #define SNMP_STACK_SIZE   DEFAULT_THREAD_STACKSIZE
                   
                  #define SNMP_THREAD_PRIO   DEFAULT_THREAD_PRIO
                   
                  #define SNMP_TRAP_DESTINATIONS   1
                   
                  #define SNMP_SAFE_REQUESTS   1
                   
                  #define SNMP_MAX_OCTET_STRING_LEN   127
                   
                  #define SNMP_MAX_OBJ_ID_LEN   50
                   
                  #define SNMP_MIN_VALUE_SIZE   (2 * sizeof(u32_t*)) /* size required to store the basic types (8 bytes for counter64) */
                   
                  #define SNMP_MAX_VALUE_SIZE   LWIP_MAX(LWIP_MAX((SNMP_MAX_OCTET_STRING_LEN), sizeof(u32_t)*(SNMP_MAX_OBJ_ID_LEN)), SNMP_MIN_VALUE_SIZE)
                   
                  #define SNMP_COMMUNITY   "public"
                   
                  #define SNMP_COMMUNITY_WRITE   "private"
                   
                  #define SNMP_COMMUNITY_TRAP   "public"
                   
                  #define SNMP_MAX_COMMUNITY_STR_LEN   LWIP_MAX(LWIP_MAX(sizeof(SNMP_COMMUNITY), sizeof(SNMP_COMMUNITY_WRITE)), sizeof(SNMP_COMMUNITY_TRAP))
                   
                  #define SNMP_LWIP_ENTERPRISE_OID   26381
                   
                  #define SNMP_DEVICE_ENTERPRISE_OID   {1, 3, 6, 1, 4, 1, SNMP_LWIP_ENTERPRISE_OID}
                   
                  #define SNMP_DEVICE_ENTERPRISE_OID_LEN   7
                   
                  #define SNMP_DEBUG   LWIP_DBG_OFF
                   
                  #define SNMP_MIB_DEBUG   LWIP_DBG_OFF
                   
                  #define SNMP_LWIP_MIB2   LWIP_SNMP
                   
                  #define SNMP_LWIP_MIB2_SYSDESC   "lwIP"
                   
                  #define SNMP_LWIP_MIB2_SYSNAME   "FQDN-unk"
                   
                  #define SNMP_LWIP_MIB2_SYSCONTACT   ""
                   
                  #define SNMP_LWIP_MIB2_SYSLOCATION   ""
                   
                  #define SNMP_LWIP_GETBULK_MAX_REPETITIONS   0
                   
                  #define LWIP_SNMP_V3   0
                   
                  +

                  Detailed Description

                  +

                  SNMP server options list

                  +

                  Macro Definition Documentation

                  + +

                  ◆ LWIP_SNMP_V3

                  + +
                  +
                  + + + + +
                  #define LWIP_SNMP_V3   0
                  +
                  +

                  LWIP_SNMP_V3==1: This enables EXPERIMENTAL SNMPv3 support. LWIP_SNMP must also be enabled. THIS IS UNDER DEVELOPMENT AND SHOULD NOT BE ENABLED IN PRODUCTS.

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__opts_8h.js b/Libraries/LwIP/doc/doxygen/output/html/snmp__opts_8h.js new file mode 100644 index 0000000..6d8536c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__opts_8h.js @@ -0,0 +1,30 @@ +var snmp__opts_8h = +[ + [ "LWIP_SNMP", "group__snmp__opts.html#gaf4900859dc53f19f5f67cc34e48ad68c", null ], + [ "LWIP_SNMP_V3", "snmp__opts_8h.html#a1fe0e120f979ed400f649019edcefe2b", null ], + [ "SNMP_COMMUNITY", "group__snmp__opts.html#ga316c1e1f06f0c7ca56589563809e64db", null ], + [ "SNMP_COMMUNITY_TRAP", "group__snmp__opts.html#gaaefc9dda5f8e5c296018a463cdbac39b", null ], + [ "SNMP_COMMUNITY_WRITE", "group__snmp__opts.html#gafb9414dc7a33978b62a3a9838b659464", null ], + [ "SNMP_DEBUG", "group__snmp__opts.html#gac041000361342f51ad5ee5d8f6254e02", null ], + [ "SNMP_DEVICE_ENTERPRISE_OID", "group__snmp__opts.html#ga09118b734e85df152af098744e888b34", null ], + [ "SNMP_DEVICE_ENTERPRISE_OID_LEN", "group__snmp__opts.html#ga9e39ba5308f5c7ac5296c7d05fdfa97f", null ], + [ "SNMP_LWIP_ENTERPRISE_OID", "group__snmp__opts.html#ga868bfef6efe05515c86291137a633479", null ], + [ "SNMP_LWIP_GETBULK_MAX_REPETITIONS", "group__snmp__opts.html#ga5a24152aa5f3c2837b9a3145aa3c59f3", null ], + [ "SNMP_LWIP_MIB2", "group__snmp__opts.html#gaab667d48f48ee89f8bdbc7f134e6037d", null ], + [ "SNMP_LWIP_MIB2_SYSCONTACT", "group__snmp__opts.html#ga1a57501c615b630d363e0af1a504e683", null ], + [ "SNMP_LWIP_MIB2_SYSDESC", "group__snmp__opts.html#gae93a105b421a2ca91e862da5087cec73", null ], + [ "SNMP_LWIP_MIB2_SYSLOCATION", "group__snmp__opts.html#ga311cec98c8f7e4851d325fffe96cf8d9", null ], + [ "SNMP_LWIP_MIB2_SYSNAME", "group__snmp__opts.html#ga80ba46f9517a51b5477f13082b2bcf98", null ], + [ "SNMP_MAX_COMMUNITY_STR_LEN", "group__snmp__opts.html#ga0e98b58159a77688f87f9f50479177fd", null ], + [ "SNMP_MAX_OBJ_ID_LEN", "group__snmp__opts.html#ga3ad9d293f90e3c885c4e3263a9064a41", null ], + [ "SNMP_MAX_OCTET_STRING_LEN", "group__snmp__opts.html#gae50cdd09697aa54a8b9f26432ac55ac2", null ], + [ "SNMP_MAX_VALUE_SIZE", "group__snmp__opts.html#gafb4362575bc50476a7401a1ed14787f0", null ], + [ "SNMP_MIB_DEBUG", "group__snmp__opts.html#gac12240265db443eaf9d31d187e586c16", null ], + [ "SNMP_MIN_VALUE_SIZE", "group__snmp__opts.html#gac815d0dbe576299546ac612e7eaf3f90", null ], + [ "SNMP_SAFE_REQUESTS", "group__snmp__opts.html#ga95e39047b9bcb385780b06b35af49261", null ], + [ "SNMP_STACK_SIZE", "group__snmp__opts.html#ga0dcacdccc61216c6773943ad3fd31242", null ], + [ "SNMP_THREAD_PRIO", "group__snmp__opts.html#gad9bce0d9c05ed4607d72de7b75f2a80b", null ], + [ "SNMP_TRAP_DESTINATIONS", "group__snmp__opts.html#ga692343b0cc555c302fd713003d4f8a08", null ], + [ "SNMP_USE_NETCONN", "group__snmp__opts.html#gaf02e8b4b69e99df784e9953401477078", null ], + [ "SNMP_USE_RAW", "group__snmp__opts.html#ga8c93f4260af2eb3c50d4bc603f716f1f", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__pbuf__stream_8c.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__pbuf__stream_8c.html new file mode 100644 index 0000000..ae495ee --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__pbuf__stream_8c.html @@ -0,0 +1,106 @@ + + + + + + + +lwIP: src/apps/snmp/snmp_pbuf_stream.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  snmp_pbuf_stream.c File Reference
                  +
                  +
                  +
                  #include "lwip/apps/snmp_opts.h"
                  +#include "snmp_pbuf_stream.h"
                  +#include "lwip/def.h"
                  +#include <string.h>
                  +

                  Detailed Description

                  +

                  SNMP pbuf stream wrapper implementation (internal API, do not use in client code).

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__pbuf__stream_8h.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__pbuf__stream_8h.html new file mode 100644 index 0000000..d2c3970 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__pbuf__stream_8h.html @@ -0,0 +1,105 @@ + + + + + + + +lwIP: src/apps/snmp/snmp_pbuf_stream.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  snmp_pbuf_stream.h File Reference
                  +
                  +
                  +
                  #include "lwip/apps/snmp_opts.h"
                  +#include "lwip/err.h"
                  +#include "lwip/pbuf.h"
                  +

                  Detailed Description

                  +

                  SNMP pbuf stream wrapper (internal API, do not use in client code).

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__raw_8c.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__raw_8c.html new file mode 100644 index 0000000..8ccc5f9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__raw_8c.html @@ -0,0 +1,116 @@ + + + + + + + +lwIP: src/apps/snmp/snmp_raw.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  snmp_raw.c File Reference
                  +
                  +
                  +
                  #include "lwip/apps/snmp_opts.h"
                  +#include "lwip/ip_addr.h"
                  +#include "lwip/udp.h"
                  +#include "lwip/ip.h"
                  +#include "lwip/prot/iana.h"
                  +#include "snmp_msg.h"
                  +
                  + + + +

                  +Functions

                  void snmp_init (void)
                   
                  +

                  Detailed Description

                  +

                  SNMP RAW API frontend.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__raw_8c.js b/Libraries/LwIP/doc/doxygen/output/html/snmp__raw_8c.js new file mode 100644 index 0000000..3d725fa --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__raw_8c.js @@ -0,0 +1,4 @@ +var snmp__raw_8c = +[ + [ "snmp_init", "group__snmp__core.html#ga4d88f2fc7655280384131d543e0d83e5", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__scalar_8c.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__scalar_8c.html new file mode 100644 index 0000000..5696c20 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__scalar_8c.html @@ -0,0 +1,105 @@ + + + + + + + +lwIP: src/apps/snmp/snmp_scalar.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  snmp_scalar.c File Reference
                  +
                  +
                  +

                  Detailed Description

                  +

                  SNMP scalar node support implementation.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__scalar_8h.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__scalar_8h.html new file mode 100644 index 0000000..646dfa1 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__scalar_8h.html @@ -0,0 +1,116 @@ + + + + + + + +lwIP: src/include/lwip/apps/snmp_scalar.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  snmp_scalar.h File Reference
                  +
                  +
                  + + + + + + + + +

                  +Data Structures

                  struct  snmp_scalar_node
                   
                  struct  snmp_scalar_array_node_def
                   
                  struct  snmp_scalar_array_node
                   
                  +

                  Detailed Description

                  +

                  SNMP server MIB API to implement scalar nodes

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__scalar_8h.js b/Libraries/LwIP/doc/doxygen/output/html/snmp__scalar_8h.js new file mode 100644 index 0000000..1d2ebb7 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__scalar_8h.js @@ -0,0 +1,6 @@ +var snmp__scalar_8h = +[ + [ "snmp_scalar_node", "structsnmp__scalar__node.html", "structsnmp__scalar__node" ], + [ "snmp_scalar_array_node_def", "structsnmp__scalar__array__node__def.html", null ], + [ "snmp_scalar_array_node", "structsnmp__scalar__array__node.html", "structsnmp__scalar__array__node" ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__table_8c.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__table_8c.html new file mode 100644 index 0000000..9b2e5a3 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__table_8c.html @@ -0,0 +1,106 @@ + + + + + + + +lwIP: src/apps/snmp/snmp_table.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  snmp_table.c File Reference
                  +
                  +
                  +
                  #include "lwip/apps/snmp_opts.h"
                  +#include "lwip/apps/snmp_core.h"
                  +#include "lwip/apps/snmp_table.h"
                  +#include <string.h>
                  +

                  Detailed Description

                  +

                  SNMP table support implementation.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__table_8h.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__table_8h.html new file mode 100644 index 0000000..dabf1fc --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__table_8h.html @@ -0,0 +1,138 @@ + + + + + + + +lwIP: src/include/lwip/apps/snmp_table.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  snmp_table.h File Reference
                  +
                  +
                  + + + + + + + + +

                  +Data Structures

                  struct  snmp_table_col_def
                   
                  struct  snmp_table_node
                   
                  struct  snmp_table_simple_node
                   
                  + + + +

                  +Enumerations

                  enum  snmp_table_column_data_type_t
                   
                  +

                  Detailed Description

                  +

                  SNMP server MIB API to implement table nodes

                  +

                  Enumeration Type Documentation

                  + +

                  ◆ snmp_table_column_data_type_t

                  + +
                  +
                  +

                  simple read-only table

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__table_8h.js b/Libraries/LwIP/doc/doxygen/output/html/snmp__table_8h.js new file mode 100644 index 0000000..fd773ec --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__table_8h.js @@ -0,0 +1,7 @@ +var snmp__table_8h = +[ + [ "snmp_table_col_def", "structsnmp__table__col__def.html", null ], + [ "snmp_table_node", "structsnmp__table__node.html", "structsnmp__table__node" ], + [ "snmp_table_simple_node", "structsnmp__table__simple__node.html", null ], + [ "snmp_table_column_data_type_t", "snmp__table_8h.html#af9b59f3ba7dccf338fe6e5bc1c4b1db5", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__threadsync_8c.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__threadsync_8c.html new file mode 100644 index 0000000..5fcf440 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__threadsync_8c.html @@ -0,0 +1,145 @@ + + + + + + + +lwIP: src/apps/snmp/snmp_threadsync.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  snmp_threadsync.c File Reference
                  +
                  +
                  +
                  #include "lwip/apps/snmp_opts.h"
                  +#include "lwip/apps/snmp_threadsync.h"
                  +#include "lwip/apps/snmp_core.h"
                  +#include "lwip/sys.h"
                  +#include <string.h>
                  +
                  + + + +

                  +Functions

                  void snmp_threadsync_init (struct snmp_threadsync_instance *instance, snmp_threadsync_synchronizer_fn sync_fn)
                   
                  +

                  Detailed Description

                  +

                  SNMP thread synchronization implementation.

                  +

                  Function Documentation

                  + +

                  ◆ snmp_threadsync_init()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void snmp_threadsync_init (struct snmp_threadsync_instanceinstance,
                  snmp_threadsync_synchronizer_fn sync_fn 
                  )
                  +
                  +

                  Initializes thread synchronization instance

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__threadsync_8c.js b/Libraries/LwIP/doc/doxygen/output/html/snmp__threadsync_8c.js new file mode 100644 index 0000000..0e5cb2b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__threadsync_8c.js @@ -0,0 +1,4 @@ +var snmp__threadsync_8c = +[ + [ "snmp_threadsync_init", "snmp__threadsync_8c.html#a36e5b1dbb067641b7a6ac486b4ec15b6", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__threadsync_8h.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__threadsync_8h.html new file mode 100644 index 0000000..66cadce --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__threadsync_8h.html @@ -0,0 +1,196 @@ + + + + + + + +lwIP: src/include/lwip/apps/snmp_threadsync.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  snmp_threadsync.h File Reference
                  +
                  +
                  +
                  #include "lwip/apps/snmp_opts.h"
                  +#include "lwip/apps/snmp_core.h"
                  +#include "lwip/sys.h"
                  +
                  + + + + + + + +

                  +Data Structures

                  struct  threadsync_data
                   
                  struct  snmp_threadsync_instance
                   
                  struct  snmp_threadsync_node
                   
                  + + + +

                  +Macros

                  #define SNMP_CREATE_THREAD_SYNC_NODE(oid, target_leaf_node, threadsync_instance)
                   
                  + + + +

                  +Functions

                  void snmp_threadsync_init (struct snmp_threadsync_instance *instance, snmp_threadsync_synchronizer_fn sync_fn)
                   
                  +

                  Detailed Description

                  +

                  SNMP server MIB API to implement thread synchronization

                  +

                  Macro Definition Documentation

                  + +

                  ◆ SNMP_CREATE_THREAD_SYNC_NODE

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  #define SNMP_CREATE_THREAD_SYNC_NODE( oid,
                   target_leaf_node,
                   threadsync_instance 
                  )
                  +
                  +Value:
                  {{{ SNMP_NODE_THREADSYNC, (oid) }, \
                  snmp_threadsync_get_instance, \
                  snmp_threadsync_get_next_instance }, \
                  (target_leaf_node), \
                  (threadsync_instance) }

                  Create thread sync proxy node

                  + +
                  +
                  +

                  Function Documentation

                  + +

                  ◆ snmp_threadsync_init()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void snmp_threadsync_init (struct snmp_threadsync_instanceinstance,
                  snmp_threadsync_synchronizer_fn sync_fn 
                  )
                  +
                  +

                  Create thread sync instance data

                  +

                  Initializes thread synchronization instance

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__threadsync_8h.js b/Libraries/LwIP/doc/doxygen/output/html/snmp__threadsync_8h.js new file mode 100644 index 0000000..78284bc --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__threadsync_8h.js @@ -0,0 +1,8 @@ +var snmp__threadsync_8h = +[ + [ "threadsync_data", "structthreadsync__data.html", null ], + [ "snmp_threadsync_instance", "structsnmp__threadsync__instance.html", null ], + [ "snmp_threadsync_node", "structsnmp__threadsync__node.html", null ], + [ "SNMP_CREATE_THREAD_SYNC_NODE", "snmp__threadsync_8h.html#a1971c27c8addf1c426abd1abac54c8d2", null ], + [ "snmp_threadsync_init", "snmp__threadsync_8h.html#a36e5b1dbb067641b7a6ac486b4ec15b6", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__traps_8c.html b/Libraries/LwIP/doc/doxygen/output/html/snmp__traps_8c.html new file mode 100644 index 0000000..00a54b8 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__traps_8c.html @@ -0,0 +1,176 @@ + + + + + + + +lwIP: src/apps/snmp/snmp_traps.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  snmp_traps.c File Reference
                  +
                  +
                  +
                  #include "lwip/apps/snmp_opts.h"
                  +#include <string.h>
                  +#include "lwip/snmp.h"
                  +#include "lwip/sys.h"
                  +#include "lwip/apps/snmp.h"
                  +#include "lwip/apps/snmp_core.h"
                  +#include "lwip/prot/iana.h"
                  +#include "snmp_msg.h"
                  +#include "snmp_asn1.h"
                  +#include "snmp_core_priv.h"
                  +
                  + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  void snmp_trap_dst_enable (u8_t dst_idx, u8_t enable)
                   
                  void snmp_trap_dst_ip_set (u8_t dst_idx, const ip_addr_t *dst)
                   
                  void snmp_set_auth_traps_enabled (u8_t enable)
                   
                  u8_t snmp_get_auth_traps_enabled (void)
                   
                  err_t snmp_send_trap (const struct snmp_obj_id *eoid, s32_t generic_trap, s32_t specific_trap, struct snmp_varbind *varbinds)
                   
                  err_t snmp_send_trap_generic (s32_t generic_trap)
                   
                  err_t snmp_send_trap_specific (s32_t specific_trap, struct snmp_varbind *varbinds)
                   
                  void snmp_coldstart_trap (void)
                   
                  void snmp_authfail_trap (void)
                   
                  + + + + + +

                  +Variables

                  const char * snmp_community_trap
                   
                  void * snmp_traps_handle
                   
                  +

                  Detailed Description

                  +

                  SNMPv1 traps implementation.

                  +

                  Variable Documentation

                  + +

                  ◆ snmp_community_trap

                  + +
                  +
                  + + + + +
                  const char* snmp_community_trap
                  +
                  +

                  Agent community string for sending traps

                  +

                  SNMP community string for sending traps

                  + +
                  +
                  + +

                  ◆ snmp_traps_handle

                  + +
                  +
                  + + + + +
                  void* snmp_traps_handle
                  +
                  +

                  handle for sending traps

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmp__traps_8c.js b/Libraries/LwIP/doc/doxygen/output/html/snmp__traps_8c.js new file mode 100644 index 0000000..be7fdd9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmp__traps_8c.js @@ -0,0 +1,14 @@ +var snmp__traps_8c = +[ + [ "snmp_authfail_trap", "group__snmp__traps.html#gaf6d0a95a3a406d8ea00849c07aca05ee", null ], + [ "snmp_coldstart_trap", "group__snmp__traps.html#gaa8a49d1a6a207740ba44e27b5bbc22be", null ], + [ "snmp_get_auth_traps_enabled", "group__snmp__traps.html#ga7804a22615bd9b3a323a3f48a9fb8cb7", null ], + [ "snmp_send_trap", "group__snmp__traps.html#ga96cc7af0118d75049609872ea41187cd", null ], + [ "snmp_send_trap_generic", "group__snmp__traps.html#ga0e044259289cb690197173f93c17607d", null ], + [ "snmp_send_trap_specific", "group__snmp__traps.html#ga56bdce04e9e77cb3f8a872718cd273d1", null ], + [ "snmp_set_auth_traps_enabled", "group__snmp__traps.html#gacaf816ff917f7b7e5d00ed6c9f79b51c", null ], + [ "snmp_trap_dst_enable", "group__snmp__traps.html#gab101505be59778cf0f2f1ac40bcf3f32", null ], + [ "snmp_trap_dst_ip_set", "group__snmp__traps.html#ga15e4afbf80ed2260850842e6608c6d86", null ], + [ "snmp_community_trap", "snmp__traps_8c.html#a2e2007343d9492b8e31d363d2c6ad79b", null ], + [ "snmp_traps_handle", "snmp__traps_8c.html#ade16efa80e2c2a20236d3cb96b19c79a", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmpv3_8c.html b/Libraries/LwIP/doc/doxygen/output/html/snmpv3_8c.html new file mode 100644 index 0000000..4e78383 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmpv3_8c.html @@ -0,0 +1,106 @@ + + + + + + + +lwIP: src/apps/snmp/snmpv3.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  snmpv3.c File Reference
                  +
                  +
                  +
                  #include "snmpv3_priv.h"
                  +#include "lwip/apps/snmpv3.h"
                  +#include "lwip/sys.h"
                  +#include <string.h>
                  +

                  Detailed Description

                  +

                  Additional SNMPv3 functionality RFC3414 and RFC3826.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmpv3_8h.html b/Libraries/LwIP/doc/doxygen/output/html/snmpv3_8h.html new file mode 100644 index 0000000..e42d9b5 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmpv3_8h.html @@ -0,0 +1,104 @@ + + + + + + + +lwIP: src/include/lwip/apps/snmpv3.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  snmpv3.h File Reference
                  +
                  +
                  +
                  #include "lwip/apps/snmp_opts.h"
                  +#include "lwip/err.h"
                  +

                  Detailed Description

                  +

                  Additional SNMPv3 functionality RFC3414 and RFC3826.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmpv3__mbedtls_8c.html b/Libraries/LwIP/doc/doxygen/output/html/snmpv3__mbedtls_8c.html new file mode 100644 index 0000000..d56dd61 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmpv3__mbedtls_8c.html @@ -0,0 +1,108 @@ + + + + + + + +lwIP: src/apps/snmp/snmpv3_mbedtls.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  snmpv3_mbedtls.c File Reference
                  +
                  +
                  +
                  #include "lwip/apps/snmpv3.h"
                  +#include "snmpv3_priv.h"
                  +#include "lwip/arch.h"
                  +#include "snmp_msg.h"
                  +#include "lwip/sys.h"
                  +#include <string.h>
                  +

                  Detailed Description

                  +

                  SNMPv3 crypto/auth functions implemented for ARM mbedtls.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/snmpv3__priv_8h.html b/Libraries/LwIP/doc/doxygen/output/html/snmpv3__priv_8h.html new file mode 100644 index 0000000..f472925 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/snmpv3__priv_8h.html @@ -0,0 +1,103 @@ + + + + + + + +lwIP: src/apps/snmp/snmpv3_priv.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  snmpv3_priv.h File Reference
                  +
                  +
                  +

                  Detailed Description

                  +

                  Additional SNMPv3 functionality RFC3414 and RFC3826 (internal API, do not use in client code).

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/sntp_8c.html b/Libraries/LwIP/doc/doxygen/output/html/sntp_8c.html new file mode 100644 index 0000000..bb5a49f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/sntp_8c.html @@ -0,0 +1,174 @@ + + + + + + + +lwIP: src/apps/sntp/sntp.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  sntp.c File Reference
                  +
                  +
                  +
                  #include "lwip/apps/sntp.h"
                  +#include "lwip/opt.h"
                  +#include "lwip/timeouts.h"
                  +#include "lwip/udp.h"
                  +#include "lwip/dns.h"
                  +#include "lwip/ip_addr.h"
                  +#include "lwip/pbuf.h"
                  +#include "lwip/dhcp.h"
                  +#include <string.h>
                  +#include <time.h>
                  +#include "arch/bpstruct.h"
                  +#include "arch/epstruct.h"
                  +
                  + + + + + + + + + +

                  +Data Structures

                  struct  sntp_time
                   
                  struct  sntp_timestamps
                   
                  struct  sntp_msg
                   
                  struct  sntp_server
                   
                  + + + +

                  +Macros

                  #define SNTP_FRAC_TO_US(f)   ((u32_t)(f) / 4295)
                   
                  + + + + + + + + + + + + + + + + + +

                  +Functions

                  void sntp_init (void)
                   
                  void sntp_stop (void)
                   
                  u8_t sntp_enabled (void)
                   
                  void sntp_setoperatingmode (u8_t operating_mode)
                   
                  u8_t sntp_getoperatingmode (void)
                   
                  u8_t sntp_getreachability (u8_t idx)
                   
                  void sntp_setserver (u8_t idx, const ip_addr_t *server)
                   
                  const ip_addr_tsntp_getserver (u8_t idx)
                   
                  +

                  Detailed Description

                  +

                  SNTP client module

                  +

                  Macro Definition Documentation

                  + +

                  ◆ SNTP_FRAC_TO_US

                  + +
                  +
                  + + + + + + + + +
                  #define SNTP_FRAC_TO_US( f)   ((u32_t)(f) / 4295)
                  +
                  +

                  Convert NTP timestamp fraction to microseconds.

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/sntp_8c.js b/Libraries/LwIP/doc/doxygen/output/html/sntp_8c.js new file mode 100644 index 0000000..1140fef --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/sntp_8c.js @@ -0,0 +1,16 @@ +var sntp_8c = +[ + [ "sntp_time", "structsntp__time.html", null ], + [ "sntp_timestamps", "structsntp__timestamps.html", null ], + [ "sntp_msg", "structsntp__msg.html", null ], + [ "sntp_server", "structsntp__server.html", "structsntp__server" ], + [ "SNTP_FRAC_TO_US", "sntp_8c.html#aebe74c93643ac9b8c8a9c7d223192c8f", null ], + [ "sntp_enabled", "group__sntp.html#ga3fe5254e5a056fca80802d9f26b9c3c5", null ], + [ "sntp_getoperatingmode", "group__sntp.html#gae66404a551d5cef420cf844a71356fae", null ], + [ "sntp_getreachability", "group__sntp.html#gac8097829a81cb6f37d9acf8efb2cc82e", null ], + [ "sntp_getserver", "group__sntp.html#ga2a28523cb9f2b5b025a4818bc2c1afc1", null ], + [ "sntp_init", "group__sntp.html#ga9b300c6616de60524c85ea40bf70e2ba", null ], + [ "sntp_setoperatingmode", "group__sntp.html#gaae94fb2adadbf9667e9597f8a45bf120", null ], + [ "sntp_setserver", "group__sntp.html#ga4fa038dcea66349fafdbe1cc3e52ff3a", null ], + [ "sntp_stop", "group__sntp.html#ga8119fc2d1ff7ff6eba511cc9c7167488", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/sntp_8h.html b/Libraries/LwIP/doc/doxygen/output/html/sntp_8h.html new file mode 100644 index 0000000..3a72115 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/sntp_8h.html @@ -0,0 +1,126 @@ + + + + + + + +lwIP: src/include/lwip/apps/sntp.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  sntp.h File Reference
                  +
                  +
                  +
                  #include "lwip/apps/sntp_opts.h"
                  +#include "lwip/ip_addr.h"
                  +
                  + + + + + + + + + + + + + + + + + +

                  +Functions

                  void sntp_setoperatingmode (u8_t operating_mode)
                   
                  u8_t sntp_getoperatingmode (void)
                   
                  void sntp_init (void)
                   
                  void sntp_stop (void)
                   
                  u8_t sntp_enabled (void)
                   
                  void sntp_setserver (u8_t idx, const ip_addr_t *addr)
                   
                  const ip_addr_tsntp_getserver (u8_t idx)
                   
                  u8_t sntp_getreachability (u8_t idx)
                   
                  +

                  Detailed Description

                  +

                  SNTP client API

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/sntp_8h.js b/Libraries/LwIP/doc/doxygen/output/html/sntp_8h.js new file mode 100644 index 0000000..df73f8f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/sntp_8h.js @@ -0,0 +1,11 @@ +var sntp_8h = +[ + [ "sntp_enabled", "group__sntp.html#ga3fe5254e5a056fca80802d9f26b9c3c5", null ], + [ "sntp_getoperatingmode", "group__sntp.html#gae66404a551d5cef420cf844a71356fae", null ], + [ "sntp_getreachability", "group__sntp.html#gac8097829a81cb6f37d9acf8efb2cc82e", null ], + [ "sntp_getserver", "group__sntp.html#ga2a28523cb9f2b5b025a4818bc2c1afc1", null ], + [ "sntp_init", "group__sntp.html#ga9b300c6616de60524c85ea40bf70e2ba", null ], + [ "sntp_setoperatingmode", "group__sntp.html#gaae94fb2adadbf9667e9597f8a45bf120", null ], + [ "sntp_setserver", "group__sntp.html#ga4fa038dcea66349fafdbe1cc3e52ff3a", null ], + [ "sntp_stop", "group__sntp.html#ga8119fc2d1ff7ff6eba511cc9c7167488", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/sntp__opts_8h.html b/Libraries/LwIP/doc/doxygen/output/html/sntp__opts_8h.html new file mode 100644 index 0000000..db2d432 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/sntp__opts_8h.html @@ -0,0 +1,144 @@ + + + + + + + +lwIP: src/include/lwip/apps/sntp_opts.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  sntp_opts.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/prot/iana.h"
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Macros

                  #define SNTP_SET_SYSTEM_TIME(sec)   LWIP_UNUSED_ARG(sec)
                   
                  #define SNTP_MAX_SERVERS   LWIP_DHCP_MAX_NTP_SERVERS
                   
                  #define SNTP_GET_SERVERS_FROM_DHCP   LWIP_DHCP_GET_NTP_SRV
                   
                  #define SNTP_SERVER_DNS   0
                   
                  #define SNTP_DEBUG   LWIP_DBG_OFF
                   
                  #define SNTP_PORT   LWIP_IANA_PORT_SNTP
                   
                  #define SNTP_CHECK_RESPONSE   0
                   
                  #define SNTP_COMP_ROUNDTRIP   0
                   
                  #define SNTP_STARTUP_DELAY   1
                   
                  #define SNTP_STARTUP_DELAY_FUNC   (LWIP_RAND() % 5000)
                   
                  #define SNTP_RECV_TIMEOUT   15000
                   
                  #define SNTP_UPDATE_DELAY   3600000
                   
                  #define SNTP_GET_SYSTEM_TIME(sec, us)   do { (sec) = 0; (us) = 0; } while(0)
                   
                  #define SNTP_RETRY_TIMEOUT   SNTP_RECV_TIMEOUT
                   
                  #define SNTP_RETRY_TIMEOUT_MAX   (SNTP_RETRY_TIMEOUT * 10)
                   
                  #define SNTP_RETRY_TIMEOUT_EXP   1
                   
                  #define SNTP_MONITOR_SERVER_REACHABILITY   1
                   
                  +

                  Detailed Description

                  +

                  SNTP client options list

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/sntp__opts_8h.js b/Libraries/LwIP/doc/doxygen/output/html/sntp__opts_8h.js new file mode 100644 index 0000000..b76c438 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/sntp__opts_8h.js @@ -0,0 +1,20 @@ +var sntp__opts_8h = +[ + [ "SNTP_CHECK_RESPONSE", "group__sntp__opts.html#ga7d4e12d90912d486e64f289d7f3ca446", null ], + [ "SNTP_COMP_ROUNDTRIP", "group__sntp__opts.html#ga1e21781705d3549a305339fd7fca63e7", null ], + [ "SNTP_DEBUG", "group__sntp__opts.html#ga25c6f9c14c17e218d110d826b09f8d91", null ], + [ "SNTP_GET_SERVERS_FROM_DHCP", "group__sntp__opts.html#ga961a61eef942ab5378cff1e3742b3ade", null ], + [ "SNTP_GET_SYSTEM_TIME", "group__sntp__opts.html#gab0ea385479a5c5c8c173f165ded2fb63", null ], + [ "SNTP_MAX_SERVERS", "group__sntp__opts.html#ga5d9dc0827f402849f5c18d44e311dbc2", null ], + [ "SNTP_MONITOR_SERVER_REACHABILITY", "group__sntp__opts.html#ga5782f21ef24ebddd5ba2ce9a889094e3", null ], + [ "SNTP_PORT", "group__sntp__opts.html#gacbee62c27f54371fc2c5259a834a0f9b", null ], + [ "SNTP_RECV_TIMEOUT", "group__sntp__opts.html#ga44cf26b9b19832d88599244711a12d08", null ], + [ "SNTP_RETRY_TIMEOUT", "group__sntp__opts.html#ga86d651d8eb07687208308deef95a23ba", null ], + [ "SNTP_RETRY_TIMEOUT_EXP", "group__sntp__opts.html#gafdb7e98f608cc429188d7dac356614c2", null ], + [ "SNTP_RETRY_TIMEOUT_MAX", "group__sntp__opts.html#gafde10b3ed7cb4bb2cd2c4daa389db699", null ], + [ "SNTP_SERVER_DNS", "group__sntp__opts.html#gaef477c145ae404d77188b26b79b6996f", null ], + [ "SNTP_SET_SYSTEM_TIME", "group__sntp__opts.html#gafe340b98c52dedcbc041267fe13b2da6", null ], + [ "SNTP_STARTUP_DELAY", "group__sntp__opts.html#ga22017d43da7d4bf8d42e786b4ced4dfa", null ], + [ "SNTP_STARTUP_DELAY_FUNC", "group__sntp__opts.html#gae082c2f3044d500ca5e1be1d4928de75", null ], + [ "SNTP_UPDATE_DELAY", "group__sntp__opts.html#ga9232c56443115be05a2f852eba21979c", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/socket_8h.html b/Libraries/LwIP/doc/doxygen/output/html/socket_8h.html new file mode 100644 index 0000000..6880bdb --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/socket_8h.html @@ -0,0 +1,103 @@ + + + + + + + +lwIP: src/include/compat/posix/sys/socket.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  socket.h File Reference
                  +
                  +
                  +
                  #include "lwip/sockets.h"
                  +

                  Detailed Description

                  +

                  This file is a posix wrapper for lwip/sockets.h.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/sockets_8c.html b/Libraries/LwIP/doc/doxygen/output/html/sockets_8c.html new file mode 100644 index 0000000..bc2cee4 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/sockets_8c.html @@ -0,0 +1,313 @@ + + + + + + + +lwIP: src/api/sockets.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  sockets.c File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/sockets.h"
                  +#include "lwip/priv/sockets_priv.h"
                  +#include "lwip/api.h"
                  +#include "lwip/igmp.h"
                  +#include "lwip/inet.h"
                  +#include "lwip/tcp.h"
                  +#include "lwip/raw.h"
                  +#include "lwip/udp.h"
                  +#include "lwip/memp.h"
                  +#include "lwip/pbuf.h"
                  +#include "lwip/netif.h"
                  +#include "lwip/priv/tcpip_priv.h"
                  +#include "lwip/mld6.h"
                  +#include <string.h>
                  +#include "path/to/my/lwip_hooks.h"
                  +
                  + + + +

                  +Data Structures

                  union  sockaddr_aligned
                   
                  + + + +

                  +Enumerations

                  enum  lwip_pollscan_opts { LWIP_POLLSCAN_CLEAR = 1, +LWIP_POLLSCAN_INC_WAIT = 2, +LWIP_POLLSCAN_DEC_WAIT = 4 + }
                   
                  + + + + + + + + + + + +

                  +Functions

                  void lwip_socket_thread_init (void)
                   
                  void lwip_socket_thread_cleanup (void)
                   
                  int lwip_listen (int s, int backlog)
                   
                  int lwip_shutdown (int s, int how)
                   
                  int lwip_fcntl (int s, int cmd, int val)
                   
                  +

                  Detailed Description

                  +

                  Sockets BSD-Like API module

                  +

                  Enumeration Type Documentation

                  + +

                  ◆ lwip_pollscan_opts

                  + +
                  +
                  + + + + +
                  enum lwip_pollscan_opts
                  +
                  +

                  Options for the lwip_pollscan function.

                  + + + + +
                  Enumerator
                  LWIP_POLLSCAN_CLEAR 

                  Clear revents in each struct pollfd.

                  +
                  LWIP_POLLSCAN_INC_WAIT 

                  Increment select_waiting in each struct lwip_sock.

                  +
                  LWIP_POLLSCAN_DEC_WAIT 

                  Decrement select_waiting in each struct lwip_sock.

                  +
                  + +
                  +
                  +

                  Function Documentation

                  + +

                  ◆ lwip_fcntl()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  int lwip_fcntl (int s,
                  int cmd,
                  int val 
                  )
                  +
                  +

                  A minimal implementation of fcntl. Currently only the commands F_GETFL and F_SETFL are implemented. The flag O_NONBLOCK and access modes are supported for F_GETFL, only the flag O_NONBLOCK is implemented for F_SETFL.

                  + +
                  +
                  + +

                  ◆ lwip_listen()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  int lwip_listen (int s,
                  int backlog 
                  )
                  +
                  +

                  Set a socket into listen mode. The socket may not have been used for another connection previously.

                  +
                  Parameters
                  + + + +
                  sthe socket to set to listening mode
                  backlog(ATTENTION: needs TCP_LISTEN_BACKLOG=1)
                  +
                  +
                  +
                  Returns
                  0 on success, non-zero on failure
                  + +
                  +
                  + +

                  ◆ lwip_shutdown()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  int lwip_shutdown (int s,
                  int how 
                  )
                  +
                  +

                  Close one end of a full-duplex connection.

                  + +
                  +
                  + +

                  ◆ lwip_socket_thread_cleanup()

                  + +
                  +
                  + + + + + + + + +
                  void lwip_socket_thread_cleanup (void )
                  +
                  +

                  LWIP_NETCONN_SEM_PER_THREAD==1: destroy thread-local semaphore

                  + +
                  +
                  + +

                  ◆ lwip_socket_thread_init()

                  + +
                  +
                  + + + + + + + + +
                  void lwip_socket_thread_init (void )
                  +
                  +

                  LWIP_NETCONN_SEM_PER_THREAD==1: initialize thread-local semaphore

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/sockets_8c.js b/Libraries/LwIP/doc/doxygen/output/html/sockets_8c.js new file mode 100644 index 0000000..b5c847c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/sockets_8c.js @@ -0,0 +1,14 @@ +var sockets_8c = +[ + [ "sockaddr_aligned", "unionsockaddr__aligned.html", null ], + [ "lwip_pollscan_opts", "sockets_8c.html#a2f15a466e75cbaaea0c31e63116870f9", [ + [ "LWIP_POLLSCAN_CLEAR", "sockets_8c.html#a2f15a466e75cbaaea0c31e63116870f9aa9a8fe3199d00016f1f5ad639e1b28f7", null ], + [ "LWIP_POLLSCAN_INC_WAIT", "sockets_8c.html#a2f15a466e75cbaaea0c31e63116870f9ab6511d3104f70c18fb4bd80f24cb867d", null ], + [ "LWIP_POLLSCAN_DEC_WAIT", "sockets_8c.html#a2f15a466e75cbaaea0c31e63116870f9a6c1eefa3e29a39b923c4b522eb1b3eb1", null ] + ] ], + [ "lwip_fcntl", "sockets_8c.html#ae84296093574ec746f8f88321356388f", null ], + [ "lwip_listen", "sockets_8c.html#abee6ee286147cf334a1ba19f19b2e08b", null ], + [ "lwip_shutdown", "sockets_8c.html#ade85c68b6673296c8fb67127b93fa4c1", null ], + [ "lwip_socket_thread_cleanup", "sockets_8c.html#ab8cd92b10dbe3fb33da03faed1ea98a7", null ], + [ "lwip_socket_thread_init", "sockets_8c.html#a0a250b3b4d1827e3a3661327f5e80ae0", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/sockets_8h.html b/Libraries/LwIP/doc/doxygen/output/html/sockets_8h.html new file mode 100644 index 0000000..f1ad96d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/sockets_8h.html @@ -0,0 +1,345 @@ + + + + + + + +lwIP: src/include/lwip/sockets.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  sockets.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/ip_addr.h"
                  +#include "lwip/netif.h"
                  +#include "lwip/err.h"
                  +#include "lwip/inet.h"
                  +#include "lwip/errno.h"
                  +#include <string.h>
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Macros

                  #define LWIP_TIMEVAL_PRIVATE   1
                   
                  #define accept(s, addr, addrlen)   lwip_accept(s,addr,addrlen)
                   
                  #define bind(s, name, namelen)   lwip_bind(s,name,namelen)
                   
                  #define shutdown(s, how)   lwip_shutdown(s,how)
                   
                  #define getpeername(s, name, namelen)   lwip_getpeername(s,name,namelen)
                   
                  #define getsockname(s, name, namelen)   lwip_getsockname(s,name,namelen)
                   
                  #define setsockopt(s, level, optname, opval, optlen)   lwip_setsockopt(s,level,optname,opval,optlen)
                   
                  #define getsockopt(s, level, optname, opval, optlen)   lwip_getsockopt(s,level,optname,opval,optlen)
                   
                  #define closesocket(s)   lwip_close(s)
                   
                  #define connect(s, name, namelen)   lwip_connect(s,name,namelen)
                   
                  #define listen(s, backlog)   lwip_listen(s,backlog)
                   
                  #define recv(s, mem, len, flags)   lwip_recv(s,mem,len,flags)
                   
                  #define recvmsg(s, message, flags)   lwip_recvmsg(s,message,flags)
                   
                  #define recvfrom(s, mem, len, flags, from, fromlen)   lwip_recvfrom(s,mem,len,flags,from,fromlen)
                   
                  #define send(s, dataptr, size, flags)   lwip_send(s,dataptr,size,flags)
                   
                  #define sendmsg(s, message, flags)   lwip_sendmsg(s,message,flags)
                   
                  #define sendto(s, dataptr, size, flags, to, tolen)   lwip_sendto(s,dataptr,size,flags,to,tolen)
                   
                  #define socket(domain, type, protocol)   lwip_socket(domain,type,protocol)
                   
                  #define select(maxfdp1, readset, writeset, exceptset, timeout)   lwip_select(maxfdp1,readset,writeset,exceptset,timeout)
                   
                  #define poll(fds, nfds, timeout)   lwip_poll(fds,nfds,timeout)
                   
                  #define ioctlsocket(s, cmd, argp)   lwip_ioctl(s,cmd,argp)
                   
                  #define inet_ntop(af, src, dst, size)   lwip_inet_ntop(af,src,dst,size)
                   
                  #define inet_pton(af, src, dst)   lwip_inet_pton(af,src,dst)
                   
                  #define read(s, mem, len)   lwip_read(s,mem,len)
                   
                  #define readv(s, iov, iovcnt)   lwip_readv(s,iov,iovcnt)
                   
                  #define write(s, dataptr, len)   lwip_write(s,dataptr,len)
                   
                  #define writev(s, iov, iovcnt)   lwip_writev(s,iov,iovcnt)
                   
                  #define close(s)   lwip_close(s)
                   
                  #define fcntl(s, cmd, val)   lwip_fcntl(s,cmd,val)
                   
                  #define ioctl(s, cmd, argp)   lwip_ioctl(s,cmd,argp)
                   
                  + + + + + + + + + + + +

                  +Functions

                  void lwip_socket_thread_init (void)
                   
                  void lwip_socket_thread_cleanup (void)
                   
                  int lwip_shutdown (int s, int how)
                   
                  int lwip_listen (int s, int backlog)
                   
                  int lwip_fcntl (int s, int cmd, int val)
                   
                  +

                  Detailed Description

                  +

                  Socket API (to be used from non-TCPIP threads)

                  +

                  Macro Definition Documentation

                  + +

                  ◆ LWIP_TIMEVAL_PRIVATE

                  + +
                  +
                  + + + + +
                  #define LWIP_TIMEVAL_PRIVATE   1
                  +
                  +

                  LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h

                  + +
                  +
                  +

                  Function Documentation

                  + +

                  ◆ lwip_fcntl()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  int lwip_fcntl (int s,
                  int cmd,
                  int val 
                  )
                  +
                  +

                  A minimal implementation of fcntl. Currently only the commands F_GETFL and F_SETFL are implemented. The flag O_NONBLOCK and access modes are supported for F_GETFL, only the flag O_NONBLOCK is implemented for F_SETFL.

                  + +
                  +
                  + +

                  ◆ lwip_listen()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  int lwip_listen (int s,
                  int backlog 
                  )
                  +
                  +

                  Set a socket into listen mode. The socket may not have been used for another connection previously.

                  +
                  Parameters
                  + + + +
                  sthe socket to set to listening mode
                  backlog(ATTENTION: needs TCP_LISTEN_BACKLOG=1)
                  +
                  +
                  +
                  Returns
                  0 on success, non-zero on failure
                  + +
                  +
                  + +

                  ◆ lwip_shutdown()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  int lwip_shutdown (int s,
                  int how 
                  )
                  +
                  +

                  Close one end of a full-duplex connection.

                  + +
                  +
                  + +

                  ◆ lwip_socket_thread_cleanup()

                  + +
                  +
                  + + + + + + + + +
                  void lwip_socket_thread_cleanup (void )
                  +
                  +

                  LWIP_NETCONN_SEM_PER_THREAD==1: destroy thread-local semaphore

                  + +
                  +
                  + +

                  ◆ lwip_socket_thread_init()

                  + +
                  +
                  + + + + + + + + +
                  void lwip_socket_thread_init (void )
                  +
                  +

                  LWIP_NETCONN_SEM_PER_THREAD==1: initialize thread-local semaphore

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/sockets_8h.js b/Libraries/LwIP/doc/doxygen/output/html/sockets_8h.js new file mode 100644 index 0000000..7463dff --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/sockets_8h.js @@ -0,0 +1,38 @@ +var sockets_8h = +[ + [ "accept", "group__socket.html#gade2b17671b5a4b18e941fbf7e1060310", null ], + [ "bind", "group__socket.html#ga4a88bb849aa7203b24bb245a193997a6", null ], + [ "close", "group__socket.html#ga4ef17e85ec4d3acdcee5ce23f8ed93c4", null ], + [ "closesocket", "group__socket.html#ga5a3eb971b466278ada4f7f87399a537c", null ], + [ "connect", "group__socket.html#gae3d13671f622e17c17317c9a16dfd0ee", null ], + [ "fcntl", "group__socket.html#gaaa2b0e00cab161fcc4b31ee0d06e7eb3", null ], + [ "getpeername", "group__socket.html#ga33bf1b7f5b11de02d0db32531cd940b8", null ], + [ "getsockname", "group__socket.html#gab096fb7dbc3f84be1699a87dce980f2f", null ], + [ "getsockopt", "group__socket.html#gad2de02b35dbbf2334d1befb137ede821", null ], + [ "inet_ntop", "group__socket.html#gaa40bf11abb409097e68aa3a6982eb52b", null ], + [ "inet_pton", "group__socket.html#ga90d2b417d82e8da981c940a665324fd5", null ], + [ "ioctl", "group__socket.html#ga50a83956bc3a96e6274a21ec0d4d6338", null ], + [ "ioctlsocket", "group__socket.html#ga19e714443d0238cfd79b71059ec92378", null ], + [ "listen", "group__socket.html#gae6e6de5a20bed9fc7078f0e6c9c4aca4", null ], + [ "LWIP_TIMEVAL_PRIVATE", "sockets_8h.html#aaffd64f6887883ec6401e6bb684c40fa", null ], + [ "poll", "group__socket.html#ga80ae38841b0e64e60618cd8bf857f617", null ], + [ "read", "group__socket.html#ga822040573319cf87bfe6758d511be57f", null ], + [ "readv", "group__socket.html#ga86788b3c690d38699fdbaea523ddec9d", null ], + [ "recv", "group__socket.html#gadd7ae45df7c005619eb1126542231e9b", null ], + [ "recvfrom", "group__socket.html#ga5e5f7bcda6562bae815e188ea1a81ecd", null ], + [ "recvmsg", "group__socket.html#gaecfc7d524105e52604829c66ced752b8", null ], + [ "select", "group__socket.html#gac332b9b9b2cd877a6189ef838de49e33", null ], + [ "send", "group__socket.html#ga19024690fdfd3512d24dcaa9b80d24ed", null ], + [ "sendmsg", "group__socket.html#gaad99bea090b1fe4743234fcee15a5d28", null ], + [ "sendto", "group__socket.html#gaaa17499d76ef421821fe72fd29fe38f7", null ], + [ "setsockopt", "group__socket.html#ga115d74cd1953e7bafc2e34157c697df1", null ], + [ "shutdown", "group__socket.html#ga7d832f77cfad97cf901640f243c6e682", null ], + [ "socket", "group__socket.html#ga862d8f4070c66dddb979540ce9ba6a83", null ], + [ "write", "group__socket.html#ga0a651eb5fb5e6127f5e5153ce2251f3d", null ], + [ "writev", "group__socket.html#ga697fd916a65a10b4dcb54b8199346fee", null ], + [ "lwip_fcntl", "sockets_8h.html#ae84296093574ec746f8f88321356388f", null ], + [ "lwip_listen", "sockets_8h.html#abee6ee286147cf334a1ba19f19b2e08b", null ], + [ "lwip_shutdown", "sockets_8h.html#ade85c68b6673296c8fb67127b93fa4c1", null ], + [ "lwip_socket_thread_cleanup", "sockets_8h.html#ab8cd92b10dbe3fb33da03faed1ea98a7", null ], + [ "lwip_socket_thread_init", "sockets_8h.html#a0a250b3b4d1827e3a3661327f5e80ae0", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/sockets__priv_8h.html b/Libraries/LwIP/doc/doxygen/output/html/sockets__priv_8h.html new file mode 100644 index 0000000..7a8a9a4 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/sockets__priv_8h.html @@ -0,0 +1,138 @@ + + + + + + + +lwIP: src/include/lwip/priv/sockets_priv.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  sockets_priv.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/err.h"
                  +#include "lwip/sockets.h"
                  +#include "lwip/sys.h"
                  +
                  + + + + + +

                  +Data Structures

                  struct  lwip_sock
                   
                  struct  lwip_select_cb
                   
                  + + + +

                  +Macros

                  #define SELWAIT_T   u8_t
                   
                  +

                  Detailed Description

                  +

                  Sockets API internal implementations (do not use in application code)

                  +

                  Macro Definition Documentation

                  + +

                  ◆ SELWAIT_T

                  + +
                  +
                  + + + + +
                  #define SELWAIT_T   u8_t
                  +
                  +

                  This is overridable for the rare case where more than 255 threads select on the same socket...

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/sockets__priv_8h.js b/Libraries/LwIP/doc/doxygen/output/html/sockets__priv_8h.js new file mode 100644 index 0000000..237eb68 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/sockets__priv_8h.js @@ -0,0 +1,6 @@ +var sockets__priv_8h = +[ + [ "lwip_sock", "structlwip__sock.html", "structlwip__sock" ], + [ "lwip_select_cb", "structlwip__select__cb.html", "structlwip__select__cb" ], + [ "SELWAIT_T", "sockets__priv_8h.html#a8f4d240733a9261c668fc66dc4ce8196", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/stats_8c.html b/Libraries/LwIP/doc/doxygen/output/html/stats_8c.html new file mode 100644 index 0000000..a6e90e5 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/stats_8c.html @@ -0,0 +1,158 @@ + + + + + + + +lwIP: src/core/stats.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  stats.c File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/def.h"
                  +#include "lwip/stats.h"
                  +#include "lwip/mem.h"
                  +#include "lwip/debug.h"
                  +#include <string.h>
                  +
                  + + + +

                  +Functions

                  void stats_init (void)
                   
                  + + + +

                  +Variables

                  struct stats_ lwip_stats
                   
                  +

                  Detailed Description

                  +

                  Statistics module

                  +

                  Function Documentation

                  + +

                  ◆ stats_init()

                  + +
                  +
                  + + + + + + + + +
                  void stats_init (void )
                  +
                  +

                  Init statistics

                  + +
                  +
                  +

                  Variable Documentation

                  + +

                  ◆ lwip_stats

                  + +
                  +
                  + + + + +
                  struct stats_ lwip_stats
                  +
                  +

                  Global variable containing lwIP internal statistics. Add this to your debugger's watchlist.

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/stats_8c.js b/Libraries/LwIP/doc/doxygen/output/html/stats_8c.js new file mode 100644 index 0000000..ffdbbc2 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/stats_8c.js @@ -0,0 +1,5 @@ +var stats_8c = +[ + [ "stats_init", "stats_8c.html#aeaa149d6c0445b22e944a063e0884d0d", null ], + [ "lwip_stats", "stats_8c.html#a614735db0145db9ba944ede600d1d19b", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/stats_8h.html b/Libraries/LwIP/doc/doxygen/output/html/stats_8h.html new file mode 100644 index 0000000..9348e94 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/stats_8h.html @@ -0,0 +1,175 @@ + + + + + + + +lwIP: src/include/lwip/stats.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  stats.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/mem.h"
                  +#include "lwip/memp.h"
                  +
                  + + + + + + + + + + + + + + + + + +

                  +Data Structures

                  struct  stats_proto
                   
                  struct  stats_igmp
                   
                  struct  stats_mem
                   
                  struct  stats_syselem
                   
                  struct  stats_sys
                   
                  struct  stats_mib2
                   
                  struct  stats_mib2_netif_ctrs
                   
                  struct  stats_
                   
                  + + + +

                  +Functions

                  void stats_init (void)
                   
                  + + + +

                  +Variables

                  struct stats_ lwip_stats
                   
                  +

                  Detailed Description

                  +

                  Statistics API (to be used from TCPIP thread)

                  +

                  Function Documentation

                  + +

                  ◆ stats_init()

                  + +
                  +
                  + + + + + + + + +
                  void stats_init (void )
                  +
                  +

                  Init statistics

                  + +
                  +
                  +

                  Variable Documentation

                  + +

                  ◆ lwip_stats

                  + +
                  +
                  + + + + +
                  struct stats_ lwip_stats
                  +
                  +

                  Global variable containing lwIP internal statistics. Add this to your debugger's watchlist.

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/stats_8h.js b/Libraries/LwIP/doc/doxygen/output/html/stats_8h.js new file mode 100644 index 0000000..f293e4f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/stats_8h.js @@ -0,0 +1,12 @@ +var stats_8h = +[ + [ "stats_proto", "structstats__proto.html", null ], + [ "stats_igmp", "structstats__igmp.html", null ], + [ "stats_mem", "structstats__mem.html", null ], + [ "stats_syselem", "structstats__syselem.html", null ], + [ "stats_sys", "structstats__sys.html", null ], + [ "stats_mib2", "structstats__mib2.html", null ], + [ "stats_", "structstats__.html", "structstats__" ], + [ "stats_init", "stats_8h.html#aeaa149d6c0445b22e944a063e0884d0d", null ], + [ "lwip_stats", "stats_8h.html#a614735db0145db9ba944ede600d1d19b", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/struct__lwiperf__settings.html b/Libraries/LwIP/doc/doxygen/output/html/struct__lwiperf__settings.html new file mode 100644 index 0000000..e552e8d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/struct__lwiperf__settings.html @@ -0,0 +1,105 @@ + + + + + + + +lwIP: _lwiperf_settings Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  _lwiperf_settings Struct Reference
                  +
                  +
                  +

                  Detailed Description

                  +

                  This is the Iperf settings struct sent from the client

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/struct__lwiperf__state__tcp.html b/Libraries/LwIP/doc/doxygen/output/html/struct__lwiperf__state__tcp.html new file mode 100644 index 0000000..002e31b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/struct__lwiperf__state__tcp.html @@ -0,0 +1,105 @@ + + + + + + + +lwIP: _lwiperf_state_tcp Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  _lwiperf_state_tcp Struct Reference
                  +
                  +
                  +

                  Detailed Description

                  +

                  Connection handle for a TCP iperf session

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structaltcp__allocator__s.html b/Libraries/LwIP/doc/doxygen/output/html/structaltcp__allocator__s.html new file mode 100644 index 0000000..9908bb2 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structaltcp__allocator__s.html @@ -0,0 +1,145 @@ + + + + + + + +lwIP: altcp_allocator_s Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + + +
                  + + + + + + +

                  +Data Fields

                  altcp_new_fn alloc
                   
                  void * arg
                   
                  +

                  Detailed Description

                  +

                  Field Documentation

                  + +

                  ◆ alloc

                  + +
                  +
                  + + + + +
                  altcp_new_fn altcp_allocator_s::alloc
                  +
                  +

                  Allocator function

                  + +
                  +
                  + +

                  ◆ arg

                  + +
                  +
                  + + + + +
                  void* altcp_allocator_s::arg
                  +
                  +

                  Argument to allocator function

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structaltcp__allocator__s.js b/Libraries/LwIP/doc/doxygen/output/html/structaltcp__allocator__s.js new file mode 100644 index 0000000..e28e5a9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structaltcp__allocator__s.js @@ -0,0 +1,5 @@ +var structaltcp__allocator__s = +[ + [ "alloc", "structaltcp__allocator__s.html#aaf07ebf181a11d0320381ef46d40e687", null ], + [ "arg", "structaltcp__allocator__s.html#a8d8aa48e9a105e9d25ad4b90d259d0b1", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structapi__msg.html b/Libraries/LwIP/doc/doxygen/output/html/structapi__msg.html new file mode 100644 index 0000000..d0f5175 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structapi__msg.html @@ -0,0 +1,394 @@ + + + + + + + +lwIP: api_msg Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  api_msg Struct Reference
                  +
                  +
                  + +

                  #include <api_msg.h>

                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Data Fields

                  struct netconnconn
                   
                  err_t err
                   
                  union {
                     struct netbuf *   b
                   
                     struct {
                     }   n
                   
                     struct {
                     }   bc
                   
                     struct {
                     }   ad
                   
                     struct {
                        const struct netvector *   vector
                   
                        u16_t   vector_cnt
                   
                        size_t   vector_off
                   
                        size_t   len
                   
                        size_t   offset
                   
                     }   w
                   
                     struct {
                     }   r
                   
                     struct {
                     }   sd
                   
                     struct {
                     }   jl
                   
                  msg
                   
                  +

                  Detailed Description

                  +

                  This struct includes everything that is necessary to execute a function for a netconn in another thread context (mainly used to process netconns in the tcpip_thread context to be thread safe).

                  +

                  Field Documentation

                  + +

                  ◆ ad

                  + +
                  +
                  + + + + +
                  struct { ... } api_msg::ad
                  +
                  +

                  used for lwip_netconn_do_getaddr

                  + +
                  +
                  + +

                  ◆ b

                  + +
                  +
                  + + + + +
                  struct netbuf* api_msg::b
                  +
                  +

                  used for lwip_netconn_do_send

                  + +
                  +
                  + +

                  ◆ bc

                  + +
                  +
                  + + + + +
                  struct { ... } api_msg::bc
                  +
                  +

                  used for lwip_netconn_do_bind and lwip_netconn_do_connect

                  + +
                  +
                  + +

                  ◆ conn

                  + +
                  +
                  + + + + +
                  struct netconn* api_msg::conn
                  +
                  +

                  The netconn which to process - always needed: it includes the semaphore which is used to block the application thread until the function finished.

                  + +
                  +
                  + +

                  ◆ err

                  + +
                  +
                  + + + + +
                  err_t api_msg::err
                  +
                  +

                  The return value of the function executed in tcpip_thread.

                  + +
                  +
                  + +

                  ◆ jl

                  + +
                  +
                  + + + + +
                  struct { ... } api_msg::jl
                  +
                  +

                  used for lwip_netconn_do_join_leave_group

                  + +
                  +
                  + +

                  ◆ len

                  + +
                  +
                  + + + + +
                  size_t api_msg::len
                  +
                  +

                  total length across vectors

                  + +
                  +
                  + +

                  ◆ msg

                  + +
                  +
                  + + + + +
                  union { ... } api_msg::msg
                  +
                  +

                  Depending on the executed function, one of these union members is used

                  + +
                  +
                  + +

                  ◆ n

                  + +
                  +
                  + + + + +
                  struct { ... } api_msg::n
                  +
                  +

                  used for lwip_netconn_do_newconn

                  + +
                  +
                  + +

                  ◆ offset

                  + +
                  +
                  + + + + +
                  size_t api_msg::offset
                  +
                  +

                  offset into total length/output of bytes written when err == ERR_OK

                  + +
                  +
                  + +

                  ◆ r

                  + +
                  +
                  + + + + +
                  struct { ... } api_msg::r
                  +
                  +

                  used for lwip_netconn_do_recv

                  + +
                  +
                  + +

                  ◆ sd

                  + +
                  +
                  + + + + +
                  struct { ... } api_msg::sd
                  +
                  +

                  used for lwip_netconn_do_close (/shutdown)

                  + +
                  +
                  + +

                  ◆ vector

                  + +
                  +
                  + + + + +
                  const struct netvector* api_msg::vector
                  +
                  +

                  current vector to write

                  + +
                  +
                  + +

                  ◆ vector_cnt

                  + +
                  +
                  + + + + +
                  u16_t api_msg::vector_cnt
                  +
                  +

                  number of unwritten vectors

                  + +
                  +
                  + +

                  ◆ vector_off

                  + +
                  +
                  + + + + +
                  size_t api_msg::vector_off
                  +
                  +

                  offset into current vector

                  + +
                  +
                  + +

                  ◆ w

                  + +
                  +
                  + + + + +
                  struct { ... } api_msg::w
                  +
                  +

                  used for lwip_netconn_do_write

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structapi__msg.js b/Libraries/LwIP/doc/doxygen/output/html/structapi__msg.js new file mode 100644 index 0000000..da05cbc --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structapi__msg.js @@ -0,0 +1,19 @@ +var structapi__msg = +[ + [ "ad", "structapi__msg.html#a36dedcbd9ecca67043a8e1d1e715be94", null ], + [ "b", "structapi__msg.html#ab0abd60527e96cc24c2c20c835cdac05", null ], + [ "bc", "structapi__msg.html#a1705127c6cd22c2c6dbbcc59834e41e0", null ], + [ "conn", "structapi__msg.html#abec5e33802d69f1b601543d60699f028", null ], + [ "err", "structapi__msg.html#a8c66bd95217fa627f13f2f0847bbb25f", null ], + [ "jl", "structapi__msg.html#a6387bddb309c218ac0ccc5ef6d7a033e", null ], + [ "len", "structapi__msg.html#a40624c398d1939bfee54bffa708a363e", null ], + [ "msg", "structapi__msg.html#aef71459b5251d796434f741ca630d528", null ], + [ "n", "structapi__msg.html#adbbfc2baa8088b31fc722365237e5807", null ], + [ "offset", "structapi__msg.html#a4bd9382dd42b18120803e246a0203353", null ], + [ "r", "structapi__msg.html#aebd72e07e711e7135294563b82c98cdf", null ], + [ "sd", "structapi__msg.html#ad5e8bf133bc5ba4c78822af297330ce4", null ], + [ "vector", "structapi__msg.html#a1ceb9822ba49ba439e30d98492593612", null ], + [ "vector_cnt", "structapi__msg.html#ab6f14157a3e6735b69a569249d3286a2", null ], + [ "vector_off", "structapi__msg.html#a6896ae78ebddefdf2d8358ab5f21f444", null ], + [ "w", "structapi__msg.html#a8a71456d1199d10af5c1d8760cc0ce73", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structautoip.html b/Libraries/LwIP/doc/doxygen/output/html/structautoip.html new file mode 100644 index 0000000..f4e8cb0 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structautoip.html @@ -0,0 +1,216 @@ + + + + + + + +lwIP: autoip Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  autoip Struct Reference
                  +
                  +
                  + +

                  #include <autoip.h>

                  + + + + + + + + + + + + + + +

                  +Data Fields

                  ip4_addr_t llipaddr
                   
                  u8_t state
                   
                  u8_t sent_num
                   
                  u16_t ttw
                   
                  u8_t lastconflict
                   
                  u8_t tried_llipaddr
                   
                  +

                  Detailed Description

                  +

                  AutoIP state information per netif

                  +

                  Field Documentation

                  + +

                  ◆ lastconflict

                  + +
                  +
                  + + + + +
                  u8_t autoip::lastconflict
                  +
                  +

                  ticks until a conflict can be solved by defending

                  + +
                  +
                  + +

                  ◆ llipaddr

                  + +
                  +
                  + + + + +
                  ip4_addr_t autoip::llipaddr
                  +
                  +

                  the currently selected, probed, announced or used LL IP-Address

                  + +
                  +
                  + +

                  ◆ sent_num

                  + +
                  +
                  + + + + +
                  u8_t autoip::sent_num
                  +
                  +

                  sent number of probes or announces, dependent on state

                  + +
                  +
                  + +

                  ◆ state

                  + +
                  +
                  + + + + +
                  u8_t autoip::state
                  +
                  +

                  current AutoIP state machine state

                  + +
                  +
                  + +

                  ◆ tried_llipaddr

                  + +
                  +
                  + + + + +
                  u8_t autoip::tried_llipaddr
                  +
                  +

                  total number of probed/used Link Local IP-Addresses

                  + +
                  +
                  + +

                  ◆ ttw

                  + +
                  +
                  + + + + +
                  u16_t autoip::ttw
                  +
                  +

                  ticks to wait, tick is AUTOIP_TMR_INTERVAL long

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structautoip.js b/Libraries/LwIP/doc/doxygen/output/html/structautoip.js new file mode 100644 index 0000000..efcee3b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structautoip.js @@ -0,0 +1,9 @@ +var structautoip = +[ + [ "lastconflict", "structautoip.html#a2f51d8cde73e20d6e0ae3ec8053afb55", null ], + [ "llipaddr", "structautoip.html#a13b5da8a86839b4cd9bd9f5400ac9dc7", null ], + [ "sent_num", "structautoip.html#a9d3e3bab2f12b7c7283177fbf039fb25", null ], + [ "state", "structautoip.html#a51af55190548e378e310aeaddfa1fdef", null ], + [ "tried_llipaddr", "structautoip.html#a472f3d18c07b3df024a0cde8f4ffa853", null ], + [ "ttw", "structautoip.html#a7510d9a2961ea7c28ebfcde6390284bf", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structbridgeif__initdata__s.html b/Libraries/LwIP/doc/doxygen/output/html/structbridgeif__initdata__s.html new file mode 100644 index 0000000..ea094e3 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structbridgeif__initdata__s.html @@ -0,0 +1,182 @@ + + + + + + + +lwIP: bridgeif_initdata_s Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  bridgeif_initdata_s Struct Reference
                  +
                  +
                  + +

                  #include <bridgeif.h>

                  + + + + + + + + + + +

                  +Data Fields

                  struct eth_addr ethaddr
                   
                  u8_t max_ports
                   
                  u16_t max_fdb_dynamic_entries
                   
                  u16_t max_fdb_static_entries
                   
                  +

                  Detailed Description

                  +

                  Initialisation data for bridgeif_init. An instance of this type must be passed as parameter 'state' to netif_add when the bridge is added.

                  +

                  Field Documentation

                  + +

                  ◆ ethaddr

                  + +
                  +
                  + + + + +
                  struct eth_addr bridgeif_initdata_s::ethaddr
                  +
                  +

                  MAC address of the bridge (cannot use the netif's addresses)

                  + +
                  +
                  + +

                  ◆ max_fdb_dynamic_entries

                  + +
                  +
                  + + + + +
                  u16_t bridgeif_initdata_s::max_fdb_dynamic_entries
                  +
                  +

                  Maximum number of dynamic/learning entries in the bridge's forwarding database. In the default implementation, this controls memory consumption only.

                  + +
                  +
                  + +

                  ◆ max_fdb_static_entries

                  + +
                  +
                  + + + + +
                  u16_t bridgeif_initdata_s::max_fdb_static_entries
                  +
                  +

                  Maximum number of static forwarding entries. Influences memory consumption!

                  + +
                  +
                  + +

                  ◆ max_ports

                  + +
                  +
                  + + + + +
                  u8_t bridgeif_initdata_s::max_ports
                  +
                  +

                  Maximum number of ports in the bridge (ports are stored in an array, this influences memory allocated for netif->state of the bridge netif).

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structbridgeif__initdata__s.js b/Libraries/LwIP/doc/doxygen/output/html/structbridgeif__initdata__s.js new file mode 100644 index 0000000..c852cb2 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structbridgeif__initdata__s.js @@ -0,0 +1,7 @@ +var structbridgeif__initdata__s = +[ + [ "ethaddr", "structbridgeif__initdata__s.html#a8e0048db5e021f5d79411492dc9330bc", null ], + [ "max_fdb_dynamic_entries", "structbridgeif__initdata__s.html#aeb312c2e698513c6416d5c8459ad622f", null ], + [ "max_fdb_static_entries", "structbridgeif__initdata__s.html#a210915aa1b0436ccabc7e8d9fd3c3fe6", null ], + [ "max_ports", "structbridgeif__initdata__s.html#a0e0bb6a885967b5fcfef09a8f0adc63f", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structdhcp6__msg.html b/Libraries/LwIP/doc/doxygen/output/html/structdhcp6__msg.html new file mode 100644 index 0000000..bb86b16 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structdhcp6__msg.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: dhcp6_msg Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  dhcp6_msg Struct Reference
                  +
                  +
                  + +

                  #include <dhcp6.h>

                  +

                  Detailed Description

                  +

                  minimum set of fields of any DHCPv6 message

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structdhcp__msg.html b/Libraries/LwIP/doc/doxygen/output/html/structdhcp__msg.html new file mode 100644 index 0000000..3ca2262 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structdhcp__msg.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: dhcp_msg Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  dhcp_msg Struct Reference
                  +
                  +
                  + +

                  #include <dhcp.h>

                  +

                  Detailed Description

                  +

                  minimum set of fields of any DHCP message

                  +

                  The documentation for this struct was generated from the following file:
                    +
                  • src/include/lwip/prot/dhcp.h
                  • +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structdns__answer.html b/Libraries/LwIP/doc/doxygen/output/html/structdns__answer.html new file mode 100644 index 0000000..0742e9f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structdns__answer.html @@ -0,0 +1,105 @@ + + + + + + + +lwIP: dns_answer Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  dns_answer Struct Reference
                  +
                  +
                  +

                  Detailed Description

                  +

                  DNS answer message structure. No packing needed: only used locally on the stack.

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structdns__api__msg.html b/Libraries/LwIP/doc/doxygen/output/html/structdns__api__msg.html new file mode 100644 index 0000000..da979f8 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structdns__api__msg.html @@ -0,0 +1,199 @@ + + + + + + + +lwIP: dns_api_msg Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  dns_api_msg Struct Reference
                  +
                  +
                  + +

                  #include <api_msg.h>

                  + + + + + + + + + + + + +

                  +Data Fields

                  const char * name
                   
                  ip_addr_taddr
                   
                  u8_t dns_addrtype
                   
                  sys_sem_t * sem
                   
                  err_terr
                   
                  +

                  Detailed Description

                  +

                  As lwip_netconn_do_gethostbyname requires more arguments but doesn't require a netconn, it has its own struct (to avoid struct api_msg getting bigger than necessary). lwip_netconn_do_gethostbyname must be called using tcpip_callback instead of tcpip_apimsg (see netconn_gethostbyname).

                  +

                  Field Documentation

                  + +

                  ◆ addr

                  + +
                  +
                  + + + + +
                  ip_addr_t* dns_api_msg::addr
                  +
                  +

                  The resolved address is stored here

                  + +
                  +
                  + +

                  ◆ dns_addrtype

                  + +
                  +
                  + + + + +
                  u8_t dns_api_msg::dns_addrtype
                  +
                  +

                  Type of resolve call

                  + +
                  +
                  + +

                  ◆ err

                  + +
                  +
                  + + + + +
                  err_t* dns_api_msg::err
                  +
                  +

                  Errors are given back here

                  + +
                  +
                  + +

                  ◆ name

                  + +
                  +
                  + + + + +
                  const char* dns_api_msg::name
                  +
                  +

                  Hostname to query or dotted IP address string

                  + +
                  +
                  + +

                  ◆ sem

                  + +
                  +
                  + + + + +
                  sys_sem_t* dns_api_msg::sem
                  +
                  +

                  This semaphore is posted when the name is resolved, the application thread should wait on it.

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structdns__api__msg.js b/Libraries/LwIP/doc/doxygen/output/html/structdns__api__msg.js new file mode 100644 index 0000000..5ea0e4c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structdns__api__msg.js @@ -0,0 +1,8 @@ +var structdns__api__msg = +[ + [ "addr", "structdns__api__msg.html#a217814594564077d21b0f2696280b2a8", null ], + [ "dns_addrtype", "structdns__api__msg.html#afb2536a6c342bed4c4ad9d75982f7493", null ], + [ "err", "structdns__api__msg.html#a6536d91adb146555461359bd451b30de", null ], + [ "name", "structdns__api__msg.html#ada44a0eb6c9181cac80cfbbee01d3b53", null ], + [ "sem", "structdns__api__msg.html#a15e01e675ebc46b5aede42342be445e2", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structdns__hdr.html b/Libraries/LwIP/doc/doxygen/output/html/structdns__hdr.html new file mode 100644 index 0000000..8eb3e2d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structdns__hdr.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: dns_hdr Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  dns_hdr Struct Reference
                  +
                  +
                  + +

                  #include <dns.h>

                  +

                  Detailed Description

                  +

                  DNS message header

                  +

                  The documentation for this struct was generated from the following file:
                    +
                  • src/include/lwip/prot/dns.h
                  • +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structdns__query.html b/Libraries/LwIP/doc/doxygen/output/html/structdns__query.html new file mode 100644 index 0000000..6b823a9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structdns__query.html @@ -0,0 +1,105 @@ + + + + + + + +lwIP: dns_query Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  dns_query Struct Reference
                  +
                  +
                  +

                  Detailed Description

                  +

                  DNS query message structure. No packing needed: only used locally on the stack.

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structdns__req__entry.html b/Libraries/LwIP/doc/doxygen/output/html/structdns__req__entry.html new file mode 100644 index 0000000..8e041ca --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structdns__req__entry.html @@ -0,0 +1,105 @@ + + + + + + + +lwIP: dns_req_entry Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  dns_req_entry Struct Reference
                  +
                  +
                  +

                  Detailed Description

                  +

                  DNS request table entry: used when dns_gehostbyname cannot answer the request from the DNS table

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structdns__table__entry.html b/Libraries/LwIP/doc/doxygen/output/html/structdns__table__entry.html new file mode 100644 index 0000000..b7d2e81 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structdns__table__entry.html @@ -0,0 +1,105 @@ + + + + + + + +lwIP: dns_table_entry Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  dns_table_entry Struct Reference
                  +
                  +
                  +

                  Detailed Description

                  +

                  DNS table entry

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structeth__addr.html b/Libraries/LwIP/doc/doxygen/output/html/structeth__addr.html new file mode 100644 index 0000000..5b91343 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structeth__addr.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: eth_addr Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  eth_addr Struct Reference
                  +
                  +
                  + +

                  #include <ethernet.h>

                  +

                  Detailed Description

                  +

                  An Ethernet MAC address

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structeth__hdr.html b/Libraries/LwIP/doc/doxygen/output/html/structeth__hdr.html new file mode 100644 index 0000000..299c039 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structeth__hdr.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: eth_hdr Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  eth_hdr Struct Reference
                  +
                  +
                  + +

                  #include <ethernet.h>

                  +

                  Detailed Description

                  +

                  Ethernet header

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structeth__vlan__hdr.html b/Libraries/LwIP/doc/doxygen/output/html/structeth__vlan__hdr.html new file mode 100644 index 0000000..6a3acc6 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structeth__vlan__hdr.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: eth_vlan_hdr Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  eth_vlan_hdr Struct Reference
                  +
                  +
                  + +

                  #include <ethernet.h>

                  +

                  Detailed Description

                  +

                  VLAN header inserted between ethernet header and payload if 'type' in ethernet header is ETHTYPE_VLAN. See IEEE802.Q

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structetharp__hdr.html b/Libraries/LwIP/doc/doxygen/output/html/structetharp__hdr.html new file mode 100644 index 0000000..8613579 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structetharp__hdr.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: etharp_hdr Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  etharp_hdr Struct Reference
                  +
                  +
                  + +

                  #include <etharp.h>

                  +

                  Detailed Description

                  +

                  the ARP message, see RFC 826 ("Packet format")

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structetharp__q__entry.html b/Libraries/LwIP/doc/doxygen/output/html/structetharp__q__entry.html new file mode 100644 index 0000000..2d904d9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structetharp__q__entry.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: etharp_q_entry Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  etharp_q_entry Struct Reference
                  +
                  +
                  + +

                  #include <etharp.h>

                  +

                  Detailed Description

                  +

                  struct for queueing outgoing packets for unknown address defined here to be accessed by memp.h

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structgethostbyname__r__helper.html b/Libraries/LwIP/doc/doxygen/output/html/structgethostbyname__r__helper.html new file mode 100644 index 0000000..81d219f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structgethostbyname__r__helper.html @@ -0,0 +1,105 @@ + + + + + + + +lwIP: gethostbyname_r_helper Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  gethostbyname_r_helper Struct Reference
                  +
                  +
                  +

                  Detailed Description

                  +

                  helper struct for gethostbyname_r to access the char* buffer

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structicmp6__echo__hdr.html b/Libraries/LwIP/doc/doxygen/output/html/structicmp6__echo__hdr.html new file mode 100644 index 0000000..ed5a4bd --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structicmp6__echo__hdr.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: icmp6_echo_hdr Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  icmp6_echo_hdr Struct Reference
                  +
                  +
                  + +

                  #include <icmp6.h>

                  +

                  Detailed Description

                  +

                  This is the ICMP6 header adapted for echo req/resp.

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structicmp6__hdr.html b/Libraries/LwIP/doc/doxygen/output/html/structicmp6__hdr.html new file mode 100644 index 0000000..563fcc6 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structicmp6__hdr.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: icmp6_hdr Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  icmp6_hdr Struct Reference
                  +
                  +
                  + +

                  #include <icmp6.h>

                  +

                  Detailed Description

                  +

                  This is the standard ICMP6 header.

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structicmp__echo__hdr.html b/Libraries/LwIP/doc/doxygen/output/html/structicmp__echo__hdr.html new file mode 100644 index 0000000..776032b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structicmp__echo__hdr.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: icmp_echo_hdr Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  icmp_echo_hdr Struct Reference
                  +
                  +
                  + +

                  #include <icmp.h>

                  +

                  Detailed Description

                  +

                  This is the standard ICMP header only that the u32_t data is split to two u16_t like ICMP echo needs it. This header is also used for other ICMP types that do not use the data part.

                  +

                  The documentation for this struct was generated from the following file:
                    +
                  • src/include/lwip/prot/icmp.h
                  • +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structieee__802154__hdr.html b/Libraries/LwIP/doc/doxygen/output/html/structieee__802154__hdr.html new file mode 100644 index 0000000..ddf85f4 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structieee__802154__hdr.html @@ -0,0 +1,216 @@ + + + + + + + +lwIP: ieee_802154_hdr Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  ieee_802154_hdr Struct Reference
                  +
                  +
                  + +

                  #include <ieee802154.h>

                  + + + + + + + + + + + + + + +

                  +Data Fields

                  u16_t frame_control
                   
                  u8_t sequence_number
                   
                  u16_t destination_pan_id
                   
                  u8_t destination_address [8]
                   
                  u16_t source_pan_id
                   
                  u8_t source_address [8]
                   
                  +

                  Detailed Description

                  +

                  General MAC frame format This shows the full featured header, mainly for documentation. Some fields are omitted or shortened to achieve frame compression.

                  +

                  Field Documentation

                  + +

                  ◆ destination_address

                  + +
                  +
                  + + + + +
                  u8_t ieee_802154_hdr::destination_address[8]
                  +
                  +

                  Destination Address is omitted if Destination Addressing Mode is 0

                  + +
                  +
                  + +

                  ◆ destination_pan_id

                  + +
                  +
                  + + + + +
                  u16_t ieee_802154_hdr::destination_pan_id
                  +
                  +

                  Destination PAN ID is omitted if Destination Addressing Mode is 0

                  + +
                  +
                  + +

                  ◆ frame_control

                  + +
                  +
                  + + + + +
                  u16_t ieee_802154_hdr::frame_control
                  +
                  +

                  See IEEE_802154_FC_* defines

                  + +
                  +
                  + +

                  ◆ sequence_number

                  + +
                  +
                  + + + + +
                  u8_t ieee_802154_hdr::sequence_number
                  +
                  +

                  Sequence number is omitted if IEEE_802154_FC_SEQNO_SUPPR is set in frame_control

                  + +
                  +
                  + +

                  ◆ source_address

                  + +
                  +
                  + + + + +
                  u8_t ieee_802154_hdr::source_address[8]
                  +
                  +

                  Source Address is omitted if Source Addressing Mode is 0

                  + +
                  +
                  + +

                  ◆ source_pan_id

                  + +
                  +
                  + + + + +
                  u16_t ieee_802154_hdr::source_pan_id
                  +
                  +

                  Source PAN ID is omitted if Source Addressing Mode is 0 or if IEEE_802154_FC_PANID_COMPR is set in frame control

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structieee__802154__hdr.js b/Libraries/LwIP/doc/doxygen/output/html/structieee__802154__hdr.js new file mode 100644 index 0000000..aeaa83c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structieee__802154__hdr.js @@ -0,0 +1,9 @@ +var structieee__802154__hdr = +[ + [ "destination_address", "structieee__802154__hdr.html#a87ce59d2804cacc5a58411c8b6c47f33", null ], + [ "destination_pan_id", "structieee__802154__hdr.html#ac1ad9159d3bb70b1a7223060c6c81efd", null ], + [ "frame_control", "structieee__802154__hdr.html#a1d1e2cef0e0c1b1e1fd02a8a5f07fb10", null ], + [ "sequence_number", "structieee__802154__hdr.html#a870001205f5a3ce45ce0b2f323275869", null ], + [ "source_address", "structieee__802154__hdr.html#aa96c037381583756e79bc6ecede27937", null ], + [ "source_pan_id", "structieee__802154__hdr.html#ab67fc612a7fd7dcaf46401e4719fa2b2", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structigmp__group.html b/Libraries/LwIP/doc/doxygen/output/html/structigmp__group.html new file mode 100644 index 0000000..a6a2d40 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structigmp__group.html @@ -0,0 +1,217 @@ + + + + + + + +lwIP: igmp_group Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  igmp_group Struct Reference
                  +
                  +
                  + +

                  #include <igmp.h>

                  + + + + + + + + + + + + + + +

                  +Data Fields

                  struct igmp_groupnext
                   
                  ip4_addr_t group_address
                   
                  u8_t last_reporter_flag
                   
                  u8_t group_state
                   
                  u16_t timer
                   
                  u8_t use
                   
                  +

                  Detailed Description

                  +

                  igmp group structure - there is a list of groups for each interface these should really be linked from the interface, but if we keep them separate we will not affect the lwip original code too much

                  +

                  There will be a group for the all systems group address but this will not run the state machine as it is used to kick off reports from all the other groups

                  +

                  Field Documentation

                  + +

                  ◆ group_address

                  + +
                  +
                  + + + + +
                  ip4_addr_t igmp_group::group_address
                  +
                  +

                  multicast address

                  + +
                  +
                  + +

                  ◆ group_state

                  + +
                  +
                  + + + + +
                  u8_t igmp_group::group_state
                  +
                  +

                  current state of the group

                  + +
                  +
                  + +

                  ◆ last_reporter_flag

                  + +
                  +
                  + + + + +
                  u8_t igmp_group::last_reporter_flag
                  +
                  +

                  signifies we were the last person to report

                  + +
                  +
                  + +

                  ◆ next

                  + +
                  +
                  + + + + +
                  struct igmp_group* igmp_group::next
                  +
                  +

                  next link

                  + +
                  +
                  + +

                  ◆ timer

                  + +
                  +
                  + + + + +
                  u16_t igmp_group::timer
                  +
                  +

                  timer for reporting, negative is OFF

                  + +
                  +
                  + +

                  ◆ use

                  + +
                  +
                  + + + + +
                  u8_t igmp_group::use
                  +
                  +

                  counter of simultaneous uses

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structigmp__group.js b/Libraries/LwIP/doc/doxygen/output/html/structigmp__group.js new file mode 100644 index 0000000..8a511a9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structigmp__group.js @@ -0,0 +1,9 @@ +var structigmp__group = +[ + [ "group_address", "structigmp__group.html#ae26e6041f865880bf46cd21b6f9af854", null ], + [ "group_state", "structigmp__group.html#add0d24f719ad4b598abad254689ad911", null ], + [ "last_reporter_flag", "structigmp__group.html#a8fa72062d168d81c1c5ae5209eb0a874", null ], + [ "next", "structigmp__group.html#a95c41b9e7de6a14bb8a7910913395e78", null ], + [ "timer", "structigmp__group.html#a8e2227e486652603fcd7f88681d4c75b", null ], + [ "use", "structigmp__group.html#ab3625aeb3689e3626f73138eb0e41852", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structigmp__msg.html b/Libraries/LwIP/doc/doxygen/output/html/structigmp__msg.html new file mode 100644 index 0000000..6e589e0 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structigmp__msg.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: igmp_msg Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  igmp_msg Struct Reference
                  +
                  +
                  + +

                  #include <igmp.h>

                  +

                  Detailed Description

                  +

                  IGMP packet format.

                  +

                  The documentation for this struct was generated from the following file:
                    +
                  • src/include/lwip/prot/igmp.h
                  • +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structip4__addr.html b/Libraries/LwIP/doc/doxygen/output/html/structip4__addr.html new file mode 100644 index 0000000..fd81101 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structip4__addr.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: ip4_addr Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  ip4_addr Struct Reference
                  +
                  +
                  + +

                  #include <ip4_addr.h>

                  +

                  Detailed Description

                  +

                  This is the aligned version of ip4_addr_t, used as local variable, on the stack, etc.

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structip4__addr__packed.html b/Libraries/LwIP/doc/doxygen/output/html/structip4__addr__packed.html new file mode 100644 index 0000000..a49720f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structip4__addr__packed.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: ip4_addr_packed Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  ip4_addr_packed Struct Reference
                  +
                  +
                  + +

                  #include <ip4.h>

                  +

                  Detailed Description

                  +

                  This is the packed version of ip4_addr_t, used in network headers that are itself packed

                  +

                  The documentation for this struct was generated from the following file:
                    +
                  • src/include/lwip/prot/ip4.h
                  • +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structip4__addr__wordaligned.html b/Libraries/LwIP/doc/doxygen/output/html/structip4__addr__wordaligned.html new file mode 100644 index 0000000..4e55310 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structip4__addr__wordaligned.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: ip4_addr_wordaligned Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  ip4_addr_wordaligned Struct Reference
                  +
                  +
                  + +

                  #include <etharp.h>

                  +

                  Detailed Description

                  +

                  struct ip4_addr_wordaligned is used in the definition of the ARP packet format in order to support compilers that don't have structure packing.

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structip6__addr.html b/Libraries/LwIP/doc/doxygen/output/html/structip6__addr.html new file mode 100644 index 0000000..a6ad876 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structip6__addr.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: ip6_addr Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  ip6_addr Struct Reference
                  +
                  +
                  + +

                  #include <ip6_addr.h>

                  +

                  Detailed Description

                  +

                  This is the aligned version of ip6_addr_t, used as local variable, on the stack, etc.

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structip6__addr__packed.html b/Libraries/LwIP/doc/doxygen/output/html/structip6__addr__packed.html new file mode 100644 index 0000000..203b6a4 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structip6__addr__packed.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: ip6_addr_packed Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  ip6_addr_packed Struct Reference
                  +
                  +
                  + +

                  #include <ip6.h>

                  +

                  Detailed Description

                  +

                  This is the packed version of ip6_addr_t, used in network headers that are itself packed

                  +

                  The documentation for this struct was generated from the following file:
                    +
                  • src/include/lwip/prot/ip6.h
                  • +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structip6__hdr.html b/Libraries/LwIP/doc/doxygen/output/html/structip6__hdr.html new file mode 100644 index 0000000..2cc74d4 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structip6__hdr.html @@ -0,0 +1,199 @@ + + + + + + + +lwIP: ip6_hdr Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  ip6_hdr Struct Reference
                  +
                  +
                  + +

                  #include <ip6.h>

                  + + + + + + + + + + + + +

                  +Data Fields

                  u32_t _v_tc_fl
                   
                  u16_t _plen
                   
                  u8_t _nexth
                   
                  u8_t _hoplim
                   
                  ip6_addr_p_t src
                   
                  +

                  Detailed Description

                  +

                  The IPv6 header.

                  +

                  Field Documentation

                  + +

                  ◆ _hoplim

                  + +
                  +
                  + + + + +
                  u8_t ip6_hdr::_hoplim
                  +
                  +

                  hop limit

                  + +
                  +
                  + +

                  ◆ _nexth

                  + +
                  +
                  + + + + +
                  u8_t ip6_hdr::_nexth
                  +
                  +

                  next header

                  + +
                  +
                  + +

                  ◆ _plen

                  + +
                  +
                  + + + + +
                  u16_t ip6_hdr::_plen
                  +
                  +

                  payload length

                  + +
                  +
                  + +

                  ◆ _v_tc_fl

                  + +
                  +
                  + + + + +
                  u32_t ip6_hdr::_v_tc_fl
                  +
                  +

                  version / traffic class / flow label

                  + +
                  +
                  + +

                  ◆ src

                  + +
                  +
                  + + + + +
                  ip6_addr_p_t ip6_hdr::src
                  +
                  +

                  source and destination IP addresses

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file:
                    +
                  • src/include/lwip/prot/ip6.h
                  • +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structip6__hdr.js b/Libraries/LwIP/doc/doxygen/output/html/structip6__hdr.js new file mode 100644 index 0000000..8bcd854 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structip6__hdr.js @@ -0,0 +1,8 @@ +var structip6__hdr = +[ + [ "_hoplim", "structip6__hdr.html#af9cbfa5fa280a7a982a1c6268fa13a5a", null ], + [ "_nexth", "structip6__hdr.html#abe3d612d4570864c922e18ed838292f6", null ], + [ "_plen", "structip6__hdr.html#a9d225109d601ae8b34bab6ca3528fa94", null ], + [ "_v_tc_fl", "structip6__hdr.html#ad3b638f503a3f7e7724cf4c7b2c0a0b5", null ], + [ "src", "structip6__hdr.html#af0df3214134f29827c27e66b2970c6ef", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structip6__reass__helper.html b/Libraries/LwIP/doc/doxygen/output/html/structip6__reass__helper.html new file mode 100644 index 0000000..348f650 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structip6__reass__helper.html @@ -0,0 +1,105 @@ + + + + + + + +lwIP: ip6_reass_helper Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  ip6_reass_helper Struct Reference
                  +
                  +
                  +

                  Detailed Description

                  +

                  This is a helper struct which holds the starting offset and the ending offset of this fragment to easily chain the fragments. It has the same packing requirements as the IPv6 header, since it replaces the Fragment Header in memory in incoming fragments to keep track of the various fragments.

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structip6__reassdata.html b/Libraries/LwIP/doc/doxygen/output/html/structip6__reassdata.html new file mode 100644 index 0000000..9d8d99b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structip6__reassdata.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: ip6_reassdata Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  ip6_reassdata Struct Reference
                  +
                  +
                  + +

                  #include <ip6_frag.h>

                  +

                  Detailed Description

                  +

                  IPv6 reassembly helper struct. This is exported because memp needs to know the size.

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structip__addr.html b/Libraries/LwIP/doc/doxygen/output/html/structip__addr.html new file mode 100644 index 0000000..f055001 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structip__addr.html @@ -0,0 +1,131 @@ + + + + + + + +lwIP: ip_addr Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  ip_addr Struct Reference
                  +
                  +
                  + +

                  #include <ip_addr.h>

                  + + + + +

                  +Data Fields

                  u8_t type
                   
                  +

                  Detailed Description

                  +

                  A union struct for both IP version's addresses. ATTENTION: watch out for its size when adding IPv6 address scope!

                  +

                  Field Documentation

                  + +

                  ◆ type

                  + +
                  +
                  + + + + +
                  u8_t ip_addr::type
                  +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structip__addr.js b/Libraries/LwIP/doc/doxygen/output/html/structip__addr.js new file mode 100644 index 0000000..f62a7ca --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structip__addr.js @@ -0,0 +1,4 @@ +var structip__addr = +[ + [ "type", "structip__addr.html#a66eaa8e9051e7102bf9f0c195fbe555a", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structip__globals.html b/Libraries/LwIP/doc/doxygen/output/html/structip__globals.html new file mode 100644 index 0000000..443188e --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structip__globals.html @@ -0,0 +1,233 @@ + + + + + + + +lwIP: ip_globals Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  ip_globals Struct Reference
                  +
                  +
                  + +

                  #include <ip.h>

                  + + + + + + + + + + + + + + + + +

                  +Data Fields

                  struct netifcurrent_netif
                   
                  struct netifcurrent_input_netif
                   
                  const struct ip_hdr * current_ip4_header
                   
                  struct ip6_hdrcurrent_ip6_header
                   
                  u16_t current_ip_header_tot_len
                   
                  ip_addr_t current_iphdr_src
                   
                  ip_addr_t current_iphdr_dest
                   
                  +

                  Detailed Description

                  +

                  Global variables of this module, kept in a struct for efficient access using base+index.

                  +

                  Field Documentation

                  + +

                  ◆ current_input_netif

                  + +
                  +
                  + + + + +
                  struct netif* ip_globals::current_input_netif
                  +
                  +

                  The interface that received the packet for the current callback invocation.

                  + +
                  +
                  + +

                  ◆ current_ip4_header

                  + +
                  +
                  + + + + +
                  const struct ip_hdr* ip_globals::current_ip4_header
                  +
                  +

                  Header of the input packet currently being processed.

                  + +
                  +
                  + +

                  ◆ current_ip6_header

                  + +
                  +
                  + + + + +
                  struct ip6_hdr* ip_globals::current_ip6_header
                  +
                  +

                  Header of the input IPv6 packet currently being processed.

                  + +
                  +
                  + +

                  ◆ current_ip_header_tot_len

                  + +
                  +
                  + + + + +
                  u16_t ip_globals::current_ip_header_tot_len
                  +
                  +

                  Total header length of current_ip4/6_header (i.e. after this, the UDP/TCP header starts)

                  + +
                  +
                  + +

                  ◆ current_iphdr_dest

                  + +
                  +
                  + + + + +
                  ip_addr_t ip_globals::current_iphdr_dest
                  +
                  +

                  Destination IP address of current_header

                  + +
                  +
                  + +

                  ◆ current_iphdr_src

                  + +
                  +
                  + + + + +
                  ip_addr_t ip_globals::current_iphdr_src
                  +
                  +

                  Source IP address of current_header

                  + +
                  +
                  + +

                  ◆ current_netif

                  + +
                  +
                  + + + + +
                  struct netif* ip_globals::current_netif
                  +
                  +

                  The interface that accepted the packet for the current callback invocation.

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file:
                    +
                  • src/include/lwip/ip.h
                  • +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structip__globals.js b/Libraries/LwIP/doc/doxygen/output/html/structip__globals.js new file mode 100644 index 0000000..170b958 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structip__globals.js @@ -0,0 +1,10 @@ +var structip__globals = +[ + [ "current_input_netif", "structip__globals.html#a7da899c663b1d560b61d92ba6d544701", null ], + [ "current_ip4_header", "structip__globals.html#a2e810f97cf3e8e855e3baafc3be8c0d4", null ], + [ "current_ip6_header", "structip__globals.html#aa5cfc3ac29dc746a4cbe844206b0ed41", null ], + [ "current_ip_header_tot_len", "structip__globals.html#a17004526e6f1a164c0bab01aeac5e34a", null ], + [ "current_iphdr_dest", "structip__globals.html#a0b4e54250c692c638408de54593d2aa1", null ], + [ "current_iphdr_src", "structip__globals.html#a04d85a3dc2c417050b3e088fa58a74b0", null ], + [ "current_netif", "structip__globals.html#a7803dc5950d143e4433a0df689989bab", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structip__reass__helper.html b/Libraries/LwIP/doc/doxygen/output/html/structip__reass__helper.html new file mode 100644 index 0000000..96f57b2 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structip__reass__helper.html @@ -0,0 +1,105 @@ + + + + + + + +lwIP: ip_reass_helper Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  ip_reass_helper Struct Reference
                  +
                  +
                  +

                  Detailed Description

                  +

                  This is a helper struct which holds the starting offset and the ending offset of this fragment to easily chain the fragments. It has the same packing requirements as the IP header, since it replaces the IP header in memory in incoming fragments (after copying it) to keep track of the various fragments. (-> If the IP header doesn't need packing, this struct doesn't need packing, too.)

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structip__reassdata.html b/Libraries/LwIP/doc/doxygen/output/html/structip__reassdata.html new file mode 100644 index 0000000..bf17565 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structip__reassdata.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: ip_reassdata Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  ip_reassdata Struct Reference
                  +
                  +
                  + +

                  #include <ip4_frag.h>

                  +

                  Detailed Description

                  +

                  IP reassembly helper struct. This is exported because memp needs to know the size.

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structlowpan6__ieee802154__data.html b/Libraries/LwIP/doc/doxygen/output/html/structlowpan6__ieee802154__data.html new file mode 100644 index 0000000..fe84e17 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structlowpan6__ieee802154__data.html @@ -0,0 +1,197 @@ + + + + + + + +lwIP: lowpan6_ieee802154_data Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  lowpan6_ieee802154_data Struct Reference
                  +
                  +
                  + + + + + + + + + + + + +

                  +Data Fields

                  struct lowpan6_reass_helperreass_list
                   
                  ip6_addr_t lowpan6_context [10]
                   
                  u16_t tx_datagram_tag
                   
                  u16_t ieee_802154_pan_id
                   
                  u8_t tx_frame_seq_num
                   
                  +

                  Detailed Description

                  +

                  This struct keeps track of per-netif state

                  +

                  Field Documentation

                  + +

                  ◆ ieee_802154_pan_id

                  + +
                  +
                  + + + + +
                  u16_t lowpan6_ieee802154_data::ieee_802154_pan_id
                  +
                  +

                  local PAN ID for IEEE 802.15.4 header

                  + +
                  +
                  + +

                  ◆ lowpan6_context

                  + +
                  +
                  + + + + +
                  ip6_addr_t lowpan6_ieee802154_data::lowpan6_context[10]
                  +
                  +

                  address context for compression

                  + +
                  +
                  + +

                  ◆ reass_list

                  + +
                  +
                  + + + + +
                  struct lowpan6_reass_helper* lowpan6_ieee802154_data::reass_list
                  +
                  +

                  fragment reassembly list

                  + +
                  +
                  + +

                  ◆ tx_datagram_tag

                  + +
                  +
                  + + + + +
                  u16_t lowpan6_ieee802154_data::tx_datagram_tag
                  +
                  +

                  Datagram Tag for fragmentation

                  + +
                  +
                  + +

                  ◆ tx_frame_seq_num

                  + +
                  +
                  + + + + +
                  u8_t lowpan6_ieee802154_data::tx_frame_seq_num
                  +
                  +

                  Sequence Number for IEEE 802.15.4 transmission

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structlowpan6__ieee802154__data.js b/Libraries/LwIP/doc/doxygen/output/html/structlowpan6__ieee802154__data.js new file mode 100644 index 0000000..df767bd --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structlowpan6__ieee802154__data.js @@ -0,0 +1,8 @@ +var structlowpan6__ieee802154__data = +[ + [ "ieee_802154_pan_id", "structlowpan6__ieee802154__data.html#a017fc6f447215e4b65955ee7b1ed798f", null ], + [ "lowpan6_context", "structlowpan6__ieee802154__data.html#a190c9c06dfe1075abb7399f99553b507", null ], + [ "reass_list", "structlowpan6__ieee802154__data.html#a8c33e7a2026e6e93a2085f3d14378d35", null ], + [ "tx_datagram_tag", "structlowpan6__ieee802154__data.html#a64560b289f86efe1d39ece603cd14b5c", null ], + [ "tx_frame_seq_num", "structlowpan6__ieee802154__data.html#ad9cd994385c4d1d8ef0a22686c17720c", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structlowpan6__link__addr.html b/Libraries/LwIP/doc/doxygen/output/html/structlowpan6__link__addr.html new file mode 100644 index 0000000..8cbad04 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structlowpan6__link__addr.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: lowpan6_link_addr Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  lowpan6_link_addr Struct Reference
                  +
                  +
                  + +

                  #include <lowpan6_common.h>

                  +

                  Detailed Description

                  +

                  Helper define for a link layer address, which can be encoded as 0, 2 or 8 bytes

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structlowpan6__reass__helper.html b/Libraries/LwIP/doc/doxygen/output/html/structlowpan6__reass__helper.html new file mode 100644 index 0000000..04d5f3e --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structlowpan6__reass__helper.html @@ -0,0 +1,105 @@ + + + + + + + +lwIP: lowpan6_reass_helper Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  lowpan6_reass_helper Struct Reference
                  +
                  +
                  +

                  Detailed Description

                  +

                  This is a helper struct for reassembly of fragments (IEEE 802.15.4 limits to 127 bytes)

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structlwip__cyclic__timer.html b/Libraries/LwIP/doc/doxygen/output/html/structlwip__cyclic__timer.html new file mode 100644 index 0000000..c853d44 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structlwip__cyclic__timer.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: lwip_cyclic_timer Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  lwip_cyclic_timer Struct Reference
                  +
                  +
                  + +

                  #include <timeouts.h>

                  +

                  Detailed Description

                  +

                  This struct contains information about a stack-internal timer function that has to be called at a defined interval

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structlwip__select__cb.html b/Libraries/LwIP/doc/doxygen/output/html/structlwip__select__cb.html new file mode 100644 index 0000000..5a01a9b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structlwip__select__cb.html @@ -0,0 +1,267 @@ + + + + + + + +lwIP: lwip_select_cb Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  lwip_select_cb Struct Reference
                  +
                  +
                  + +

                  #include <sockets_priv.h>

                  + + + + + + + + + + + + + + + + + + + + +

                  +Data Fields

                  struct lwip_select_cbnext
                   
                  struct lwip_select_cbprev
                   
                  fd_set * readset
                   
                  fd_set * writeset
                   
                  fd_set * exceptset
                   
                  struct pollfd * poll_fds
                   
                  nfds_t poll_nfds
                   
                  int sem_signalled
                   
                  sys_sem_t sem
                   
                  +

                  Detailed Description

                  +

                  Description for a task waiting in select

                  +

                  Field Documentation

                  + +

                  ◆ exceptset

                  + +
                  +
                  + + + + +
                  fd_set* lwip_select_cb::exceptset
                  +
                  +

                  unimplemented: exceptset passed to select

                  + +
                  +
                  + +

                  ◆ next

                  + +
                  +
                  + + + + +
                  struct lwip_select_cb* lwip_select_cb::next
                  +
                  +

                  Pointer to the next waiting task

                  + +
                  +
                  + +

                  ◆ poll_fds

                  + +
                  +
                  + + + + +
                  struct pollfd* lwip_select_cb::poll_fds
                  +
                  +

                  fds passed to poll; NULL if select

                  + +
                  +
                  + +

                  ◆ poll_nfds

                  + +
                  +
                  + + + + +
                  nfds_t lwip_select_cb::poll_nfds
                  +
                  +

                  nfds passed to poll; 0 if select

                  + +
                  +
                  + +

                  ◆ prev

                  + +
                  +
                  + + + + +
                  struct lwip_select_cb* lwip_select_cb::prev
                  +
                  +

                  Pointer to the previous waiting task

                  + +
                  +
                  + +

                  ◆ readset

                  + +
                  +
                  + + + + +
                  fd_set* lwip_select_cb::readset
                  +
                  +

                  readset passed to select

                  + +
                  +
                  + +

                  ◆ sem

                  + +
                  +
                  + + + + +
                  sys_sem_t lwip_select_cb::sem
                  +
                  +

                  semaphore to wake up a task waiting for select

                  + +
                  +
                  + +

                  ◆ sem_signalled

                  + +
                  +
                  + + + + +
                  int lwip_select_cb::sem_signalled
                  +
                  +

                  don't signal the same semaphore twice: set to 1 when signalled

                  + +
                  +
                  + +

                  ◆ writeset

                  + +
                  +
                  + + + + +
                  fd_set* lwip_select_cb::writeset
                  +
                  +

                  writeset passed to select

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structlwip__select__cb.js b/Libraries/LwIP/doc/doxygen/output/html/structlwip__select__cb.js new file mode 100644 index 0000000..ddd4871 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structlwip__select__cb.js @@ -0,0 +1,12 @@ +var structlwip__select__cb = +[ + [ "exceptset", "structlwip__select__cb.html#a2a1e68993ed887fca326d1373ea6caed", null ], + [ "next", "structlwip__select__cb.html#a94128f0e164f895226f20fe75fddd35a", null ], + [ "poll_fds", "structlwip__select__cb.html#ae39fc1bef3938380d15085e0141639de", null ], + [ "poll_nfds", "structlwip__select__cb.html#a39c4980c261380481f79af2b536ebfba", null ], + [ "prev", "structlwip__select__cb.html#a21a98e316bb7001d8750b20f5a7d0aa7", null ], + [ "readset", "structlwip__select__cb.html#a8694a2ce0dd5f91be84056982b96978e", null ], + [ "sem", "structlwip__select__cb.html#ac9e790cac8b5eae607a8ef95dcc68482", null ], + [ "sem_signalled", "structlwip__select__cb.html#a1c00f1159e9e8eb7cca02c497605cd99", null ], + [ "writeset", "structlwip__select__cb.html#aa89638b1c2c6b2c88030560861aba04c", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structlwip__sock.html b/Libraries/LwIP/doc/doxygen/output/html/structlwip__sock.html new file mode 100644 index 0000000..545068d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structlwip__sock.html @@ -0,0 +1,216 @@ + + + + + + + +lwIP: lwip_sock Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  lwip_sock Struct Reference
                  +
                  +
                  + +

                  #include <sockets_priv.h>

                  + + + + + + + + + + + + + + +

                  +Data Fields

                  struct netconnconn
                   
                  union lwip_sock_lastdata lastdata
                   
                  s16_t rcvevent
                   
                  u16_t sendevent
                   
                  u16_t errevent
                   
                  u8_t select_waiting
                   
                  +

                  Detailed Description

                  +

                  Contains all internal pointers and states used for a socket

                  +

                  Field Documentation

                  + +

                  ◆ conn

                  + +
                  +
                  + + + + +
                  struct netconn* lwip_sock::conn
                  +
                  +

                  sockets currently are built on netconns, each socket has one netconn

                  + +
                  +
                  + +

                  ◆ errevent

                  + +
                  +
                  + + + + +
                  u16_t lwip_sock::errevent
                  +
                  +

                  error happened for this socket, set by event_callback(), tested by select

                  + +
                  +
                  + +

                  ◆ lastdata

                  + +
                  +
                  + + + + +
                  union lwip_sock_lastdata lwip_sock::lastdata
                  +
                  +

                  data that was left from the previous read

                  + +
                  +
                  + +

                  ◆ rcvevent

                  + +
                  +
                  + + + + +
                  s16_t lwip_sock::rcvevent
                  +
                  +

                  number of times data was received, set by event_callback(), tested by the receive and select functions

                  + +
                  +
                  + +

                  ◆ select_waiting

                  + +
                  +
                  + + + + +
                  u8_t lwip_sock::select_waiting
                  +
                  +

                  counter of how many threads are waiting for this socket using select

                  + +
                  +
                  + +

                  ◆ sendevent

                  + +
                  +
                  + + + + +
                  u16_t lwip_sock::sendevent
                  +
                  +

                  number of times data was ACKed (free send buffer), set by event_callback(), tested by select

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structlwip__sock.js b/Libraries/LwIP/doc/doxygen/output/html/structlwip__sock.js new file mode 100644 index 0000000..ce30dd6 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structlwip__sock.js @@ -0,0 +1,9 @@ +var structlwip__sock = +[ + [ "conn", "structlwip__sock.html#a3a3fee485b3361ed7054cde149355fb4", null ], + [ "errevent", "structlwip__sock.html#a9245a7ab9471bfb6fac94c66d26fba5e", null ], + [ "lastdata", "structlwip__sock.html#aa487ac16b7e5b6a2a618b7b5060247e1", null ], + [ "rcvevent", "structlwip__sock.html#af40d67cbaef4318d26e560988b6e1b3a", null ], + [ "select_waiting", "structlwip__sock.html#aadbcf5ec3d50631d8821200163d88d38", null ], + [ "sendevent", "structlwip__sock.html#a7e282776681ea4b7bd389950a8a64fa8", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structmdns__host.html b/Libraries/LwIP/doc/doxygen/output/html/structmdns__host.html new file mode 100644 index 0000000..b842f4b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structmdns__host.html @@ -0,0 +1,197 @@ + + + + + + + +lwIP: mdns_host Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  mdns_host Struct Reference
                  +
                  +
                  + + + + + + + + + + + + +

                  +Data Fields

                  char name [63+1]
                   
                  struct mdns_serviceservices [1]
                   
                  u32_t dns_ttl
                   
                  u8_t probes_sent
                   
                  u8_t probing_state
                   
                  +

                  Detailed Description

                  +

                  Description of a host/netif

                  +

                  Field Documentation

                  + +

                  ◆ dns_ttl

                  + +
                  +
                  + + + + +
                  u32_t mdns_host::dns_ttl
                  +
                  +

                  TTL in seconds of A/AAAA/PTR replies

                  + +
                  +
                  + +

                  ◆ name

                  + +
                  +
                  + + + + +
                  char mdns_host::name[63+1]
                  +
                  +

                  Hostname

                  + +
                  +
                  + +

                  ◆ probes_sent

                  + +
                  +
                  + + + + +
                  u8_t mdns_host::probes_sent
                  +
                  +

                  Number of probes sent for the current name

                  + +
                  +
                  + +

                  ◆ probing_state

                  + +
                  +
                  + + + + +
                  u8_t mdns_host::probing_state
                  +
                  +

                  State in probing sequence

                  + +
                  +
                  + +

                  ◆ services

                  + +
                  +
                  + + + + +
                  struct mdns_service* mdns_host::services[1]
                  +
                  +

                  Pointer to services

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structmdns__host.js b/Libraries/LwIP/doc/doxygen/output/html/structmdns__host.js new file mode 100644 index 0000000..0099119 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structmdns__host.js @@ -0,0 +1,8 @@ +var structmdns__host = +[ + [ "dns_ttl", "structmdns__host.html#a4547e5a8375fc1f1372546268a80d51b", null ], + [ "name", "structmdns__host.html#a560447b364854eb5480e137e09d3cd24", null ], + [ "probes_sent", "structmdns__host.html#ac8f6e3c6e1251bf73f043e489c840922", null ], + [ "probing_state", "structmdns__host.html#af9ced31c35de6a281e5b13f01e5aae61", null ], + [ "services", "structmdns__host.html#a750c31340c22e51375e4dc3e6e94f2ed", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structmdns__outpacket.html b/Libraries/LwIP/doc/doxygen/output/html/structmdns__outpacket.html new file mode 100644 index 0000000..398f6b1 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structmdns__outpacket.html @@ -0,0 +1,333 @@ + + + + + + + +lwIP: mdns_outpacket Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  mdns_outpacket Struct Reference
                  +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Data Fields

                  struct netifnetif
                   
                  struct pbufpbuf
                   
                  u16_t write_offset
                   
                  u16_t tx_id
                   
                  ip_addr_t dest_addr
                   
                  u16_t questions
                   
                  u16_t answers
                   
                  u16_t authoritative
                   
                  u16_t additional
                   
                  u16_t domain_offsets [10]
                   
                  u8_t cache_flush
                   
                  u8_t unicast_reply
                   
                  u8_t legacy_query
                   
                  +

                  Detailed Description

                  +

                  Information about outgoing packet

                  +

                  Field Documentation

                  + +

                  ◆ additional

                  + +
                  +
                  + + + + +
                  u16_t mdns_outpacket::additional
                  +
                  +

                  Number of additional answers written

                  + +
                  +
                  + +

                  ◆ answers

                  + +
                  +
                  + + + + +
                  u16_t mdns_outpacket::answers
                  +
                  +

                  Number of normal answers written

                  + +
                  +
                  + +

                  ◆ authoritative

                  + +
                  +
                  + + + + +
                  u16_t mdns_outpacket::authoritative
                  +
                  +

                  Number of authoritative answers written

                  + +
                  +
                  + +

                  ◆ cache_flush

                  + +
                  +
                  + + + + +
                  u8_t mdns_outpacket::cache_flush
                  +
                  +

                  If all answers in packet should set cache_flush bit

                  + +
                  +
                  + +

                  ◆ dest_addr

                  + +
                  +
                  + + + + +
                  ip_addr_t mdns_outpacket::dest_addr
                  +
                  +

                  Destination IP/port if sent unicast

                  + +
                  +
                  + +

                  ◆ domain_offsets

                  + +
                  +
                  + + + + +
                  u16_t mdns_outpacket::domain_offsets[10]
                  +
                  +

                  Offsets for written domain names in packet. Used for compression

                  + +
                  +
                  + +

                  ◆ legacy_query

                  + +
                  +
                  + + + + +
                  u8_t mdns_outpacket::legacy_query
                  +
                  +

                  If legacy query. (tx_id needed, and write question again in reply before answer)

                  + +
                  +
                  + +

                  ◆ netif

                  + +
                  +
                  + + + + +
                  struct netif* mdns_outpacket::netif
                  +
                  +

                  Netif to send the packet on

                  + +
                  +
                  + +

                  ◆ pbuf

                  + +
                  +
                  + + + + +
                  struct pbuf* mdns_outpacket::pbuf
                  +
                  +

                  Packet data

                  + +
                  +
                  + +

                  ◆ questions

                  + +
                  +
                  + + + + +
                  u16_t mdns_outpacket::questions
                  +
                  +

                  Number of questions written

                  + +
                  +
                  + +

                  ◆ tx_id

                  + +
                  +
                  + + + + +
                  u16_t mdns_outpacket::tx_id
                  +
                  +

                  Identifier. Used in legacy queries

                  + +
                  +
                  + +

                  ◆ unicast_reply

                  + +
                  +
                  + + + + +
                  u8_t mdns_outpacket::unicast_reply
                  +
                  +

                  If reply should be sent unicast

                  + +
                  +
                  + +

                  ◆ write_offset

                  + +
                  +
                  + + + + +
                  u16_t mdns_outpacket::write_offset
                  +
                  +

                  Current write offset in packet

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structmdns__outpacket.js b/Libraries/LwIP/doc/doxygen/output/html/structmdns__outpacket.js new file mode 100644 index 0000000..f1a4c5c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structmdns__outpacket.js @@ -0,0 +1,16 @@ +var structmdns__outpacket = +[ + [ "additional", "structmdns__outpacket.html#acda83121a9bb785d20f979a0a3a312ce", null ], + [ "answers", "structmdns__outpacket.html#aad2c24d4d5a935a209966ceace82f9ad", null ], + [ "authoritative", "structmdns__outpacket.html#a1a689ea7094a3569878f15477e725035", null ], + [ "cache_flush", "structmdns__outpacket.html#a9bd0fd91dda48baa2938dddd747d3195", null ], + [ "dest_addr", "structmdns__outpacket.html#a1fdc90b48d8cf1fc24895f0c7a5798e4", null ], + [ "domain_offsets", "structmdns__outpacket.html#aee97e98c4869aa63ffe348d38d87221f", null ], + [ "legacy_query", "structmdns__outpacket.html#aff8c520bffa87c78e0ee2440571bbd65", null ], + [ "netif", "structmdns__outpacket.html#ad0bd066f127d35a0ce67193e1cd07430", null ], + [ "pbuf", "structmdns__outpacket.html#a83d4504736f2bf315fc8b712c6a446e9", null ], + [ "questions", "structmdns__outpacket.html#a0d402cde040728d361dec8f7d86f504c", null ], + [ "tx_id", "structmdns__outpacket.html#ac470f02a9f332f18e027437dc293d348", null ], + [ "unicast_reply", "structmdns__outpacket.html#a68255725575af086a3afa76bc5c8e64d", null ], + [ "write_offset", "structmdns__outpacket.html#a8ead21e392b21c3e872c0cab874cdcf5", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structmdns__packet.html b/Libraries/LwIP/doc/doxygen/output/html/structmdns__packet.html new file mode 100644 index 0000000..bc0f2c0 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structmdns__packet.html @@ -0,0 +1,282 @@ + + + + + + + +lwIP: mdns_packet Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  mdns_packet Struct Reference
                  +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + +

                  +Data Fields

                  ip_addr_t source_addr
                   
                  u16_t recv_unicast
                   
                  struct netifnetif
                   
                  struct pbufpbuf
                   
                  u16_t parse_offset
                   
                  u16_t tx_id
                   
                  u16_t questions
                   
                  u16_t questions_left
                   
                  u16_t answers
                   
                  u16_t answers_left
                   
                  +

                  Detailed Description

                  +

                  Information about received packet

                  +

                  Field Documentation

                  + +

                  ◆ answers

                  + +
                  +
                  + + + + +
                  u16_t mdns_packet::answers
                  +
                  +

                  Number of answers in packet, (sum of normal, authoritative and additional answers) read from packet header

                  + +
                  +
                  + +

                  ◆ answers_left

                  + +
                  +
                  + + + + +
                  u16_t mdns_packet::answers_left
                  +
                  +

                  Number of unparsed answers

                  + +
                  +
                  + +

                  ◆ netif

                  + +
                  +
                  + + + + +
                  struct netif* mdns_packet::netif
                  +
                  +

                  Netif that received the packet

                  + +
                  +
                  + +

                  ◆ parse_offset

                  + +
                  +
                  + + + + +
                  u16_t mdns_packet::parse_offset
                  +
                  +

                  Current parsing offset in packet

                  + +
                  +
                  + +

                  ◆ pbuf

                  + +
                  +
                  + + + + +
                  struct pbuf* mdns_packet::pbuf
                  +
                  +

                  Packet data

                  + +
                  +
                  + +

                  ◆ questions

                  + +
                  +
                  + + + + +
                  u16_t mdns_packet::questions
                  +
                  +

                  Number of questions in packet, read from packet header

                  + +
                  +
                  + +

                  ◆ questions_left

                  + +
                  +
                  + + + + +
                  u16_t mdns_packet::questions_left
                  +
                  +

                  Number of unparsed questions

                  + +
                  +
                  + +

                  ◆ recv_unicast

                  + +
                  +
                  + + + + +
                  u16_t mdns_packet::recv_unicast
                  +
                  +

                  If packet was received unicast

                  + +
                  +
                  + +

                  ◆ source_addr

                  + +
                  +
                  + + + + +
                  ip_addr_t mdns_packet::source_addr
                  +
                  +

                  Sender IP/port

                  + +
                  +
                  + +

                  ◆ tx_id

                  + +
                  +
                  + + + + +
                  u16_t mdns_packet::tx_id
                  +
                  +

                  Identifier. Used in legacy queries

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structmdns__packet.js b/Libraries/LwIP/doc/doxygen/output/html/structmdns__packet.js new file mode 100644 index 0000000..cf5b334 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structmdns__packet.js @@ -0,0 +1,13 @@ +var structmdns__packet = +[ + [ "answers", "structmdns__packet.html#a918feee242cfb3934d9f5c3de1c298e7", null ], + [ "answers_left", "structmdns__packet.html#a56ba495a1458a21982e65d746468849d", null ], + [ "netif", "structmdns__packet.html#ac7307f344f654cb954f92d578dc7c989", null ], + [ "parse_offset", "structmdns__packet.html#a4c3c3a28ac113b3ee40d5cf07d851f68", null ], + [ "pbuf", "structmdns__packet.html#a2ec02a67fd82f0df695e94745eddaf45", null ], + [ "questions", "structmdns__packet.html#a09211e78f7f773c492b5856d31423699", null ], + [ "questions_left", "structmdns__packet.html#afdb9c14dd0c915119b8adb584381a437", null ], + [ "recv_unicast", "structmdns__packet.html#a8659b4f582be0df84b6ae91308737377", null ], + [ "source_addr", "structmdns__packet.html#aaa64cc21495dc6bb76ed9125904dd07a", null ], + [ "tx_id", "structmdns__packet.html#a0cd71fd9af6d2529e6a41c451c037e00", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structmdns__rr__info.html b/Libraries/LwIP/doc/doxygen/output/html/structmdns__rr__info.html new file mode 100644 index 0000000..eddce4b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structmdns__rr__info.html @@ -0,0 +1,105 @@ + + + + + + + +lwIP: mdns_rr_info Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  mdns_rr_info Struct Reference
                  +
                  +
                  +

                  Detailed Description

                  +

                  Domain, type and class. Shared between questions and answers

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structmdns__service.html b/Libraries/LwIP/doc/doxygen/output/html/structmdns__service.html new file mode 100644 index 0000000..3e0f58c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structmdns__service.html @@ -0,0 +1,231 @@ + + + + + + + +lwIP: mdns_service Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  mdns_service Struct Reference
                  +
                  +
                  + + + + + + + + + + + + + + + + +

                  +Data Fields

                  struct mdns_domain txtdata
                   
                  char name [63+1]
                   
                  char service [63+1]
                   
                  service_get_txt_fn_t txt_fn
                   
                  u32_t dns_ttl
                   
                  u16_t proto
                   
                  u16_t port
                   
                  +

                  Detailed Description

                  +

                  Description of a service

                  +

                  Field Documentation

                  + +

                  ◆ dns_ttl

                  + +
                  +
                  + + + + +
                  u32_t mdns_service::dns_ttl
                  +
                  +

                  TTL in seconds of SRV/TXT replies

                  + +
                  +
                  + +

                  ◆ name

                  + +
                  +
                  + + + + +
                  char mdns_service::name[63+1]
                  +
                  +

                  Name of service, like 'myweb'

                  + +
                  +
                  + +

                  ◆ port

                  + +
                  +
                  + + + + +
                  u16_t mdns_service::port
                  +
                  +

                  Port of the service

                  + +
                  +
                  + +

                  ◆ proto

                  + +
                  +
                  + + + + +
                  u16_t mdns_service::proto
                  +
                  +

                  Protocol, TCP or UDP

                  + +
                  +
                  + +

                  ◆ service

                  + +
                  +
                  + + + + +
                  char mdns_service::service[63+1]
                  +
                  +

                  Type of service, like '_http'

                  + +
                  +
                  + +

                  ◆ txt_fn

                  + +
                  +
                  + + + + +
                  service_get_txt_fn_t mdns_service::txt_fn
                  +
                  +

                  Callback function and userdata to update txtdata buffer

                  + +
                  +
                  + +

                  ◆ txtdata

                  + +
                  +
                  + + + + +
                  struct mdns_domain mdns_service::txtdata
                  +
                  +

                  TXT record to answer with

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structmdns__service.js b/Libraries/LwIP/doc/doxygen/output/html/structmdns__service.js new file mode 100644 index 0000000..d905e66 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structmdns__service.js @@ -0,0 +1,10 @@ +var structmdns__service = +[ + [ "dns_ttl", "structmdns__service.html#a5a939a4da01cb50c74cd53b352e4fa14", null ], + [ "name", "structmdns__service.html#ac6d92cf213e3647d3ca1520595c3b784", null ], + [ "port", "structmdns__service.html#abbf317cde8fb7ba8d834ad9746dd780c", null ], + [ "proto", "structmdns__service.html#aa9f2e0bb67d3848152e6076e92e8018d", null ], + [ "service", "structmdns__service.html#a42583986e24b5a4a13b6d647c1a281ad", null ], + [ "txt_fn", "structmdns__service.html#a79bc4946c96a3b2d0713bc0897c4bd9c", null ], + [ "txtdata", "structmdns__service.html#a35daff90a18d19b14f23fa02df424f94", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structmem.html b/Libraries/LwIP/doc/doxygen/output/html/structmem.html new file mode 100644 index 0000000..d84709f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structmem.html @@ -0,0 +1,163 @@ + + + + + + + +lwIP: mem Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  mem Struct Reference
                  +
                  +
                  + + + + + + + + +

                  +Data Fields

                  mem_size_t next
                   
                  mem_size_t prev
                   
                  u8_t used
                   
                  +

                  Detailed Description

                  +

                  The heap is made up as a list of structs of this type. This does not have to be aligned since for getting its size, we only use the macro SIZEOF_STRUCT_MEM, which automatically aligns.

                  +

                  Field Documentation

                  + +

                  ◆ next

                  + +
                  +
                  + + + + +
                  mem_size_t mem::next
                  +
                  +

                  index (-> ram[next]) of the next struct

                  + +
                  +
                  + +

                  ◆ prev

                  + +
                  +
                  + + + + +
                  mem_size_t mem::prev
                  +
                  +

                  index (-> ram[prev]) of the previous struct

                  + +
                  +
                  + +

                  ◆ used

                  + +
                  +
                  + + + + +
                  u8_t mem::used
                  +
                  +

                  1: this area is used; 0: this area is unused

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structmem.js b/Libraries/LwIP/doc/doxygen/output/html/structmem.js new file mode 100644 index 0000000..b2d06a2 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structmem.js @@ -0,0 +1,6 @@ +var structmem = +[ + [ "next", "structmem.html#a5abf13a11156e92c417f7ff66ef0b5cf", null ], + [ "prev", "structmem.html#a9d7722ed10adf965fa98563d502f98ac", null ], + [ "used", "structmem.html#aa76b6a39425617435978dce903f0d456", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structmemp__desc.html b/Libraries/LwIP/doc/doxygen/output/html/structmemp__desc.html new file mode 100644 index 0000000..b2c29f1 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structmemp__desc.html @@ -0,0 +1,199 @@ + + + + + + + +lwIP: memp_desc Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  memp_desc Struct Reference
                  +
                  +
                  + +

                  #include <memp_priv.h>

                  + + + + + + + + + + + + +

                  +Data Fields

                  struct stats_memstats
                   
                  u16_t size
                   
                  u16_t num
                   
                  u8_t * base
                   
                  struct memp ** tab
                   
                  +

                  Detailed Description

                  +

                  Memory pool descriptor

                  +

                  Field Documentation

                  + +

                  ◆ base

                  + +
                  +
                  + + + + +
                  u8_t* memp_desc::base
                  +
                  +

                  Base address

                  + +
                  +
                  + +

                  ◆ num

                  + +
                  +
                  + + + + +
                  u16_t memp_desc::num
                  +
                  +

                  Number of elements

                  + +
                  +
                  + +

                  ◆ size

                  + +
                  +
                  + + + + +
                  u16_t memp_desc::size
                  +
                  +

                  Element size

                  + +
                  +
                  + +

                  ◆ stats

                  + +
                  +
                  + + + + +
                  struct stats_mem* memp_desc::stats
                  +
                  +

                  Statistics

                  + +
                  +
                  + +

                  ◆ tab

                  + +
                  +
                  + + + + +
                  struct memp** memp_desc::tab
                  +
                  +

                  First free element of each pool. Elements form a linked list.

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structmemp__desc.js b/Libraries/LwIP/doc/doxygen/output/html/structmemp__desc.js new file mode 100644 index 0000000..e47f06b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structmemp__desc.js @@ -0,0 +1,8 @@ +var structmemp__desc = +[ + [ "base", "structmemp__desc.html#a9aec58adcbcd88167247296ca4346558", null ], + [ "num", "structmemp__desc.html#a2c32db78e565b8812ca0e20fe929a8a7", null ], + [ "size", "structmemp__desc.html#a1688d2bdd5a7b77700e1fa627f025ba3", null ], + [ "stats", "structmemp__desc.html#a05cb67eb408e4736cc0f5e32b5db7500", null ], + [ "tab", "structmemp__desc.html#a9d6b758ce5c3b47a67a7568d38fb3926", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structmld__group.html b/Libraries/LwIP/doc/doxygen/output/html/structmld__group.html new file mode 100644 index 0000000..716afb4 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structmld__group.html @@ -0,0 +1,216 @@ + + + + + + + +lwIP: mld_group Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  mld_group Struct Reference
                  +
                  +
                  + +

                  #include <mld6.h>

                  + + + + + + + + + + + + + + +

                  +Data Fields

                  struct mld_groupnext
                   
                  ip6_addr_t group_address
                   
                  u8_t last_reporter_flag
                   
                  u8_t group_state
                   
                  u16_t timer
                   
                  u8_t use
                   
                  +

                  Detailed Description

                  +

                  MLD group

                  +

                  Field Documentation

                  + +

                  ◆ group_address

                  + +
                  +
                  + + + + +
                  ip6_addr_t mld_group::group_address
                  +
                  +

                  multicast address

                  + +
                  +
                  + +

                  ◆ group_state

                  + +
                  +
                  + + + + +
                  u8_t mld_group::group_state
                  +
                  +

                  current state of the group

                  + +
                  +
                  + +

                  ◆ last_reporter_flag

                  + +
                  +
                  + + + + +
                  u8_t mld_group::last_reporter_flag
                  +
                  +

                  signifies we were the last person to report

                  + +
                  +
                  + +

                  ◆ next

                  + +
                  +
                  + + + + +
                  struct mld_group* mld_group::next
                  +
                  +

                  next link

                  + +
                  +
                  + +

                  ◆ timer

                  + +
                  +
                  + + + + +
                  u16_t mld_group::timer
                  +
                  +

                  timer for reporting

                  + +
                  +
                  + +

                  ◆ use

                  + +
                  +
                  + + + + +
                  u8_t mld_group::use
                  +
                  +

                  counter of simultaneous uses

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structmld__group.js b/Libraries/LwIP/doc/doxygen/output/html/structmld__group.js new file mode 100644 index 0000000..574e9ec --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structmld__group.js @@ -0,0 +1,9 @@ +var structmld__group = +[ + [ "group_address", "structmld__group.html#a781abf78d835627ded1202166b44b88e", null ], + [ "group_state", "structmld__group.html#ae9cfd3f126257aa3aff4a24e05c04059", null ], + [ "last_reporter_flag", "structmld__group.html#aa8eb75f4dfaefbf0d2853b0e31ceb53b", null ], + [ "next", "structmld__group.html#a9273a345a5754241bf26ddc835d27ddc", null ], + [ "timer", "structmld__group.html#a21f31e845cb11d2aca4ae7120736f69a", null ], + [ "use", "structmld__group.html#addc67094f83c9352fe039c392c480f9e", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structmld__header.html b/Libraries/LwIP/doc/doxygen/output/html/structmld__header.html new file mode 100644 index 0000000..c79df99 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structmld__header.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: mld_header Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  mld_header Struct Reference
                  +
                  +
                  + +

                  #include <mld6.h>

                  +

                  Detailed Description

                  +

                  Multicast listener report/query/done message header.

                  +

                  The documentation for this struct was generated from the following file:
                    +
                  • src/include/lwip/prot/mld6.h
                  • +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structmqtt__client__s.html b/Libraries/LwIP/doc/doxygen/output/html/structmqtt__client__s.html new file mode 100644 index 0000000..f9cff0e --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structmqtt__client__s.html @@ -0,0 +1,267 @@ + + + + + + + +lwIP: mqtt_client_s Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  mqtt_client_s Struct Reference
                  +
                  +
                  + +

                  #include <mqtt_priv.h>

                  + + + + + + + + + + + + + + + + + + + + +

                  +Data Fields

                  u16_t cyclic_tick
                   
                  u16_t pkt_id_seq
                   
                  u16_t inpub_pkt_id
                   
                  u8_t conn_state
                   
                  void * connect_arg
                   
                  struct mqtt_request_tpend_req_queue
                   
                  mqtt_incoming_data_cb_t data_cb
                   
                  u32_t msg_idx
                   
                  struct mqtt_ringbuf_t output
                   
                  +

                  Detailed Description

                  +

                  MQTT client

                  +

                  Field Documentation

                  + +

                  ◆ conn_state

                  + +
                  +
                  + + + + +
                  u8_t mqtt_client_s::conn_state
                  +
                  +

                  Connection state

                  + +
                  +
                  + +

                  ◆ connect_arg

                  + +
                  +
                  + + + + +
                  void* mqtt_client_s::connect_arg
                  +
                  +

                  Connection callback

                  + +
                  +
                  + +

                  ◆ cyclic_tick

                  + +
                  +
                  + + + + +
                  u16_t mqtt_client_s::cyclic_tick
                  +
                  +

                  Timers and timeouts

                  + +
                  +
                  + +

                  ◆ data_cb

                  + +
                  +
                  + + + + +
                  mqtt_incoming_data_cb_t mqtt_client_s::data_cb
                  +
                  +

                  Incoming data callback

                  + +
                  +
                  + +

                  ◆ inpub_pkt_id

                  + +
                  +
                  + + + + +
                  u16_t mqtt_client_s::inpub_pkt_id
                  +
                  +

                  Packet identifier of pending incoming publish

                  + +
                  +
                  + +

                  ◆ msg_idx

                  + +
                  +
                  + + + + +
                  u32_t mqtt_client_s::msg_idx
                  +
                  +

                  Input

                  + +
                  +
                  + +

                  ◆ output

                  + +
                  +
                  + + + + +
                  struct mqtt_ringbuf_t mqtt_client_s::output
                  +
                  +

                  Output ring-buffer

                  + +
                  +
                  + +

                  ◆ pend_req_queue

                  + +
                  +
                  + + + + +
                  struct mqtt_request_t* mqtt_client_s::pend_req_queue
                  +
                  +

                  Pending requests to server

                  + +
                  +
                  + +

                  ◆ pkt_id_seq

                  + +
                  +
                  + + + + +
                  u16_t mqtt_client_s::pkt_id_seq
                  +
                  +

                  Packet identifier generator

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structmqtt__client__s.js b/Libraries/LwIP/doc/doxygen/output/html/structmqtt__client__s.js new file mode 100644 index 0000000..78958c2 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structmqtt__client__s.js @@ -0,0 +1,12 @@ +var structmqtt__client__s = +[ + [ "conn_state", "structmqtt__client__s.html#af4a07c1079e2e2a336f1939d8b9677e6", null ], + [ "connect_arg", "structmqtt__client__s.html#ae6d53359ec6d70533dab7c0d2717ce1a", null ], + [ "cyclic_tick", "structmqtt__client__s.html#a6274ba2eb2fe6afa970b1c8a650d8cef", null ], + [ "data_cb", "structmqtt__client__s.html#a26dc9112351c042594a41703197925a7", null ], + [ "inpub_pkt_id", "structmqtt__client__s.html#a6c81d0dd14e786222425ea04fd060824", null ], + [ "msg_idx", "structmqtt__client__s.html#aae7bd1da3461efef9616934feb166aa5", null ], + [ "output", "structmqtt__client__s.html#a667c1dc7a6008055b63877acb06f333c", null ], + [ "pend_req_queue", "structmqtt__client__s.html#a1897eeefe64f9e2d2d953adca858f439", null ], + [ "pkt_id_seq", "structmqtt__client__s.html#ab4100f6e0867c212d5923f10024f2e32", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structmqtt__connect__client__info__t.html b/Libraries/LwIP/doc/doxygen/output/html/structmqtt__connect__client__info__t.html new file mode 100644 index 0000000..e460e29 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structmqtt__connect__client__info__t.html @@ -0,0 +1,267 @@ + + + + + + + +lwIP: mqtt_connect_client_info_t Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  mqtt_connect_client_info_t Struct Reference
                  +
                  +
                  + +

                  #include <mqtt.h>

                  + + + + + + + + + + + + + + + + + + + + +

                  +Data Fields

                  const char * client_id
                   
                  const char * client_user
                   
                  const char * client_pass
                   
                  u16_t keep_alive
                   
                  const char * will_topic
                   
                  const char * will_msg
                   
                  u8_t will_qos
                   
                  u8_t will_retain
                   
                  struct altcp_tls_config * tls_config
                   
                  +

                  Detailed Description

                  +

                  Client information and connection parameters

                  +

                  Field Documentation

                  + +

                  ◆ client_id

                  + +
                  +
                  + + + + +
                  const char* mqtt_connect_client_info_t::client_id
                  +
                  +

                  Client identifier, must be set by caller

                  + +
                  +
                  + +

                  ◆ client_pass

                  + +
                  +
                  + + + + +
                  const char* mqtt_connect_client_info_t::client_pass
                  +
                  +

                  Password, set to NULL if not used

                  + +
                  +
                  + +

                  ◆ client_user

                  + +
                  +
                  + + + + +
                  const char* mqtt_connect_client_info_t::client_user
                  +
                  +

                  User name, set to NULL if not used

                  + +
                  +
                  + +

                  ◆ keep_alive

                  + +
                  +
                  + + + + +
                  u16_t mqtt_connect_client_info_t::keep_alive
                  +
                  +

                  keep alive time in seconds, 0 to disable keep alive functionality

                  + +
                  +
                  + +

                  ◆ tls_config

                  + +
                  +
                  + + + + +
                  struct altcp_tls_config* mqtt_connect_client_info_t::tls_config
                  +
                  +

                  TLS configuration for secure connections

                  + +
                  +
                  + +

                  ◆ will_msg

                  + +
                  +
                  + + + + +
                  const char* mqtt_connect_client_info_t::will_msg
                  +
                  +

                  will_msg, see will_topic

                  + +
                  +
                  + +

                  ◆ will_qos

                  + +
                  +
                  + + + + +
                  u8_t mqtt_connect_client_info_t::will_qos
                  +
                  +

                  will_qos, see will_topic

                  + +
                  +
                  + +

                  ◆ will_retain

                  + +
                  +
                  + + + + +
                  u8_t mqtt_connect_client_info_t::will_retain
                  +
                  +

                  will_retain, see will_topic

                  + +
                  +
                  + +

                  ◆ will_topic

                  + +
                  +
                  + + + + +
                  const char* mqtt_connect_client_info_t::will_topic
                  +
                  +

                  will topic, set to NULL if will is not to be used, will_msg, will_qos and will retain are then ignored

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file:
                    +
                  • src/include/lwip/apps/mqtt.h
                  • +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structmqtt__connect__client__info__t.js b/Libraries/LwIP/doc/doxygen/output/html/structmqtt__connect__client__info__t.js new file mode 100644 index 0000000..8977c9b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structmqtt__connect__client__info__t.js @@ -0,0 +1,12 @@ +var structmqtt__connect__client__info__t = +[ + [ "client_id", "structmqtt__connect__client__info__t.html#ad35f7850df21f001d5c5ffaa1a18c05a", null ], + [ "client_pass", "structmqtt__connect__client__info__t.html#a8f68efe91c5311418151256c96102d4b", null ], + [ "client_user", "structmqtt__connect__client__info__t.html#aec961673d5c3e8dc853c91f30d9333b5", null ], + [ "keep_alive", "structmqtt__connect__client__info__t.html#ac80262a7456812e9eefffd8c3b9ac21a", null ], + [ "tls_config", "structmqtt__connect__client__info__t.html#a45987acc116de5d27fff6856778e55b4", null ], + [ "will_msg", "structmqtt__connect__client__info__t.html#a925fcebd15555afdc0820e196e2fd3a7", null ], + [ "will_qos", "structmqtt__connect__client__info__t.html#a07954934f4fecf54fa190997848229d9", null ], + [ "will_retain", "structmqtt__connect__client__info__t.html#a49c10873f44d7534140a63eef2a6a4e3", null ], + [ "will_topic", "structmqtt__connect__client__info__t.html#a32e77415460752ba0484eb3ba0faf0c8", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structmqtt__request__t.html b/Libraries/LwIP/doc/doxygen/output/html/structmqtt__request__t.html new file mode 100644 index 0000000..36dd4d1 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structmqtt__request__t.html @@ -0,0 +1,182 @@ + + + + + + + +lwIP: mqtt_request_t Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  mqtt_request_t Struct Reference
                  +
                  +
                  + +

                  #include <mqtt_priv.h>

                  + + + + + + + + + + +

                  +Data Fields

                  struct mqtt_request_tnext
                   
                  mqtt_request_cb_t cb
                   
                  u16_t pkt_id
                   
                  u16_t timeout_diff
                   
                  +

                  Detailed Description

                  +

                  Pending request item, binds application callback to pending server requests

                  +

                  Field Documentation

                  + +

                  ◆ cb

                  + +
                  +
                  + + + + +
                  mqtt_request_cb_t mqtt_request_t::cb
                  +
                  +

                  Callback to upper layer

                  + +
                  +
                  + +

                  ◆ next

                  + +
                  +
                  + + + + +
                  struct mqtt_request_t* mqtt_request_t::next
                  +
                  +

                  Next item in list, NULL means this is the last in chain, next pointing at itself means request is unallocated

                  + +
                  +
                  + +

                  ◆ pkt_id

                  + +
                  +
                  + + + + +
                  u16_t mqtt_request_t::pkt_id
                  +
                  +

                  MQTT packet identifier

                  + +
                  +
                  + +

                  ◆ timeout_diff

                  + +
                  +
                  + + + + +
                  u16_t mqtt_request_t::timeout_diff
                  +
                  +

                  Expire time relative to element before this

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structmqtt__request__t.js b/Libraries/LwIP/doc/doxygen/output/html/structmqtt__request__t.js new file mode 100644 index 0000000..16897c1 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structmqtt__request__t.js @@ -0,0 +1,7 @@ +var structmqtt__request__t = +[ + [ "cb", "structmqtt__request__t.html#a32a4b14b0b8b5b8ce8db1074e53f4a79", null ], + [ "next", "structmqtt__request__t.html#aca8de21579f51e7742076a4975a4177b", null ], + [ "pkt_id", "structmqtt__request__t.html#af2dc3cd85cdad25b9b3e1534ecc0cb58", null ], + [ "timeout_diff", "structmqtt__request__t.html#a65a7292669bc1f2d9df8f30bbcd77073", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structmqtt__ringbuf__t.html b/Libraries/LwIP/doc/doxygen/output/html/structmqtt__ringbuf__t.html new file mode 100644 index 0000000..15dccfe --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structmqtt__ringbuf__t.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: mqtt_ringbuf_t Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  mqtt_ringbuf_t Struct Reference
                  +
                  +
                  + +

                  #include <mqtt_priv.h>

                  +

                  Detailed Description

                  +

                  Ring buffer

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structna__header.html b/Libraries/LwIP/doc/doxygen/output/html/structna__header.html new file mode 100644 index 0000000..21b8471 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structna__header.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: na_header Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  na_header Struct Reference
                  +
                  +
                  + +

                  #include <nd6.h>

                  +

                  Detailed Description

                  +

                  Neighbor advertisement message header.

                  +

                  The documentation for this struct was generated from the following file:
                    +
                  • src/include/lwip/prot/nd6.h
                  • +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structnd6__neighbor__cache__entry.html b/Libraries/LwIP/doc/doxygen/output/html/structnd6__neighbor__cache__entry.html new file mode 100644 index 0000000..203d5a0 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structnd6__neighbor__cache__entry.html @@ -0,0 +1,131 @@ + + + + + + + +lwIP: nd6_neighbor_cache_entry Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  nd6_neighbor_cache_entry Struct Reference
                  +
                  +
                  + +

                  #include <nd6_priv.h>

                  + + + + +

                  +Data Fields

                  struct nd6_q_entryq
                   
                  +

                  Detailed Description

                  +

                  Struct for tables.

                  +

                  Field Documentation

                  + +

                  ◆ q

                  + +
                  +
                  + + + + +
                  struct nd6_q_entry* nd6_neighbor_cache_entry::q
                  +
                  +

                  Pointer to queue of pending outgoing packets on this entry.

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structnd6__neighbor__cache__entry.js b/Libraries/LwIP/doc/doxygen/output/html/structnd6__neighbor__cache__entry.js new file mode 100644 index 0000000..f35bd41 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structnd6__neighbor__cache__entry.js @@ -0,0 +1,4 @@ +var structnd6__neighbor__cache__entry = +[ + [ "q", "structnd6__neighbor__cache__entry.html#a830674446a45eb200d38a45fbdd5c5df", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structnd6__q__entry.html b/Libraries/LwIP/doc/doxygen/output/html/structnd6__q__entry.html new file mode 100644 index 0000000..613b8cc --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structnd6__q__entry.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: nd6_q_entry Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  nd6_q_entry Struct Reference
                  +
                  +
                  + +

                  #include <nd6_priv.h>

                  +

                  Detailed Description

                  +

                  struct for queueing outgoing packets for unknown address defined here to be accessed by memp.h

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structnetbios__answer.html b/Libraries/LwIP/doc/doxygen/output/html/structnetbios__answer.html new file mode 100644 index 0000000..bbfd13a --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structnetbios__answer.html @@ -0,0 +1,537 @@ + + + + + + + +lwIP: netbios_answer Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  netbios_answer Struct Reference
                  +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Data Fields

                  u8_t name_size
                   
                  u8_t query_name [(16 *2)+1]
                   
                  u8_t number_of_names
                   
                  u8_t answer_name [16]
                   
                  u16_t answer_name_flags
                   
                  u8_t unit_id [6]
                   
                  u8_t jumpers
                   
                  u8_t test_result
                   
                  u16_t version_number
                   
                  u16_t period_of_statistics
                   
                  u16_t number_of_crcs
                   
                  u16_t number_of_alignment_errors
                   
                  u16_t number_of_collisions
                   
                  u16_t number_of_send_aborts
                   
                  u32_t number_of_good_sends
                   
                  u32_t number_of_good_receives
                   
                  u16_t number_of_retransmits
                   
                  u16_t number_of_no_resource_condition
                   
                  u16_t number_of_free_command_blocks
                   
                  u16_t total_number_of_command_blocks
                   
                  u16_t max_total_number_of_command_blocks
                   
                  u16_t number_of_pending_sessions
                   
                  u16_t max_number_of_pending_sessions
                   
                  u16_t max_total_sessions_possible
                   
                  u16_t session_data_packet_size
                   
                  +

                  Detailed Description

                  +

                  The NBNS Structure Responds to a Name Query

                  +

                  Field Documentation

                  + +

                  ◆ answer_name

                  + +
                  +
                  + + + + +
                  u8_t netbios_answer::answer_name[16]
                  +
                  +

                  node name

                  + +
                  +
                  + +

                  ◆ answer_name_flags

                  + +
                  +
                  + + + + +
                  u16_t netbios_answer::answer_name_flags
                  +
                  +

                  node flags

                  + +
                  +
                  + +

                  ◆ jumpers

                  + +
                  +
                  + + + + +
                  u8_t netbios_answer::jumpers
                  +
                  +

                  Jumpers

                  + +
                  +
                  + +

                  ◆ max_number_of_pending_sessions

                  + +
                  +
                  + + + + +
                  u16_t netbios_answer::max_number_of_pending_sessions
                  +
                  +

                  Statistics

                  + +
                  +
                  + +

                  ◆ max_total_number_of_command_blocks

                  + +
                  +
                  + + + + +
                  u16_t netbios_answer::max_total_number_of_command_blocks
                  +
                  +

                  Statistics

                  + +
                  +
                  + +

                  ◆ max_total_sessions_possible

                  + +
                  +
                  + + + + +
                  u16_t netbios_answer::max_total_sessions_possible
                  +
                  +

                  Statistics

                  + +
                  +
                  + +

                  ◆ name_size

                  + +
                  +
                  + + + + +
                  u8_t netbios_answer::name_size
                  +
                  +

                  the length of the next string

                  + +
                  +
                  + +

                  ◆ number_of_alignment_errors

                  + +
                  +
                  + + + + +
                  u16_t netbios_answer::number_of_alignment_errors
                  +
                  +

                  Statistics

                  + +
                  +
                  + +

                  ◆ number_of_collisions

                  + +
                  +
                  + + + + +
                  u16_t netbios_answer::number_of_collisions
                  +
                  +

                  Statistics

                  + +
                  +
                  + +

                  ◆ number_of_crcs

                  + +
                  +
                  + + + + +
                  u16_t netbios_answer::number_of_crcs
                  +
                  +

                  Statistics

                  + +
                  +
                  + +

                  ◆ number_of_free_command_blocks

                  + +
                  +
                  + + + + +
                  u16_t netbios_answer::number_of_free_command_blocks
                  +
                  +

                  Statistics

                  + +
                  +
                  + +

                  ◆ number_of_good_receives

                  + +
                  +
                  + + + + +
                  u32_t netbios_answer::number_of_good_receives
                  +
                  +

                  Statistics

                  + +
                  +
                  + +

                  ◆ number_of_good_sends

                  + +
                  +
                  + + + + +
                  u32_t netbios_answer::number_of_good_sends
                  +
                  +

                  Statistics

                  + +
                  +
                  + +

                  ◆ number_of_names

                  + +
                  +
                  + + + + +
                  u8_t netbios_answer::number_of_names
                  +
                  +

                  number of names

                  + +
                  +
                  + +

                  ◆ number_of_no_resource_condition

                  + +
                  +
                  + + + + +
                  u16_t netbios_answer::number_of_no_resource_condition
                  +
                  +

                  Statistics

                  + +
                  +
                  + +

                  ◆ number_of_pending_sessions

                  + +
                  +
                  + + + + +
                  u16_t netbios_answer::number_of_pending_sessions
                  +
                  +

                  Statistics

                  + +
                  +
                  + +

                  ◆ number_of_retransmits

                  + +
                  +
                  + + + + +
                  u16_t netbios_answer::number_of_retransmits
                  +
                  +

                  Statistics

                  + +
                  +
                  + +

                  ◆ number_of_send_aborts

                  + +
                  +
                  + + + + +
                  u16_t netbios_answer::number_of_send_aborts
                  +
                  +

                  Statistics

                  + +
                  +
                  + +

                  ◆ period_of_statistics

                  + +
                  +
                  + + + + +
                  u16_t netbios_answer::period_of_statistics
                  +
                  +

                  Period of statistics

                  + +
                  +
                  + +

                  ◆ query_name

                  + +
                  +
                  + + + + +
                  u8_t netbios_answer::query_name[(16 *2)+1]
                  +
                  +

                  WARNING!!! this item may be of a different length (we use this struct for transmission)

                  + +
                  +
                  + +

                  ◆ session_data_packet_size

                  + +
                  +
                  + + + + +
                  u16_t netbios_answer::session_data_packet_size
                  +
                  +

                  Statistics

                  + +
                  +
                  + +

                  ◆ test_result

                  + +
                  +
                  + + + + +
                  u8_t netbios_answer::test_result
                  +
                  +

                  Test result

                  + +
                  +
                  + +

                  ◆ total_number_of_command_blocks

                  + +
                  +
                  + + + + +
                  u16_t netbios_answer::total_number_of_command_blocks
                  +
                  +

                  Statistics

                  + +
                  +
                  + +

                  ◆ unit_id

                  + +
                  +
                  + + + + +
                  u8_t netbios_answer::unit_id[6]
                  +
                  +

                  Unit ID

                  + +
                  +
                  + +

                  ◆ version_number

                  + +
                  +
                  + + + + +
                  u16_t netbios_answer::version_number
                  +
                  +

                  Version number

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structnetbios__answer.js b/Libraries/LwIP/doc/doxygen/output/html/structnetbios__answer.js new file mode 100644 index 0000000..bfb0d2c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structnetbios__answer.js @@ -0,0 +1,28 @@ +var structnetbios__answer = +[ + [ "answer_name", "structnetbios__answer.html#abf746cd54add594216ddc3683c741406", null ], + [ "answer_name_flags", "structnetbios__answer.html#a2729b7249e3d23309624cb19fa0dbfc4", null ], + [ "jumpers", "structnetbios__answer.html#a69cd3e8b8265531a7ce3e5cbd4911683", null ], + [ "max_number_of_pending_sessions", "structnetbios__answer.html#a58aba600ed34b7c689606c296ef57c8c", null ], + [ "max_total_number_of_command_blocks", "structnetbios__answer.html#a9cf85c173fe0d99c1c4e7e09aaeed9b8", null ], + [ "max_total_sessions_possible", "structnetbios__answer.html#a0069c9ae014881298828660787fa945e", null ], + [ "name_size", "structnetbios__answer.html#a5828dc04e01a1f7b734019db428fd46d", null ], + [ "number_of_alignment_errors", "structnetbios__answer.html#ab4f9ff63bd5529418c07762506189ad2", null ], + [ "number_of_collisions", "structnetbios__answer.html#a45b7aec200434d3aaabc3ea6ebc46c1e", null ], + [ "number_of_crcs", "structnetbios__answer.html#ab23a11db86a170b46aa8f8af434534d8", null ], + [ "number_of_free_command_blocks", "structnetbios__answer.html#af41cbffb0ac6a9db3305b3fc64646219", null ], + [ "number_of_good_receives", "structnetbios__answer.html#a0eab7dbe733cc50f515126649de596ea", null ], + [ "number_of_good_sends", "structnetbios__answer.html#aa6088bca2a59ffcd077a474330511abd", null ], + [ "number_of_names", "structnetbios__answer.html#ac4a95ccabbb945c9470e0cfd470be491", null ], + [ "number_of_no_resource_condition", "structnetbios__answer.html#a62946dd0f27e9f9b9f295dcde4d3ea42", null ], + [ "number_of_pending_sessions", "structnetbios__answer.html#a66098747155d5bd56f1c92aa8da10c1d", null ], + [ "number_of_retransmits", "structnetbios__answer.html#ab175ad0f89102b3b3f81a41b5a72b321", null ], + [ "number_of_send_aborts", "structnetbios__answer.html#a1560e3864a0821acea9410e8c1d21408", null ], + [ "period_of_statistics", "structnetbios__answer.html#a31ec9ea28b5801b9bb5f1b240d3412de", null ], + [ "query_name", "structnetbios__answer.html#aa024ce7e0e233c42393f5c3c378d3f9b", null ], + [ "session_data_packet_size", "structnetbios__answer.html#abec38f20bb460ddc2d6e8c9b9208608c", null ], + [ "test_result", "structnetbios__answer.html#a91116fe26c8050ee166053f377b40c7f", null ], + [ "total_number_of_command_blocks", "structnetbios__answer.html#a4c7ea5d1839fd27232877880e43485a2", null ], + [ "unit_id", "structnetbios__answer.html#aeed6aa8ba4f8bb107d141b3b3d0a1787", null ], + [ "version_number", "structnetbios__answer.html#a151dce0f0bf626b2a54fbb75775237ba", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structnetbios__hdr.html b/Libraries/LwIP/doc/doxygen/output/html/structnetbios__hdr.html new file mode 100644 index 0000000..af65104 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structnetbios__hdr.html @@ -0,0 +1,105 @@ + + + + + + + +lwIP: netbios_hdr Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  netbios_hdr Struct Reference
                  +
                  +
                  +

                  Detailed Description

                  +

                  NetBIOS message header

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structnetbios__name__hdr.html b/Libraries/LwIP/doc/doxygen/output/html/structnetbios__name__hdr.html new file mode 100644 index 0000000..35ab674 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structnetbios__name__hdr.html @@ -0,0 +1,105 @@ + + + + + + + +lwIP: netbios_name_hdr Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  netbios_name_hdr Struct Reference
                  +
                  +
                  +

                  Detailed Description

                  +

                  NetBIOS message name part

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structnetbios__question__hdr.html b/Libraries/LwIP/doc/doxygen/output/html/structnetbios__question__hdr.html new file mode 100644 index 0000000..7a7de39 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structnetbios__question__hdr.html @@ -0,0 +1,105 @@ + + + + + + + +lwIP: netbios_question_hdr Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  netbios_question_hdr Struct Reference
                  +
                  +
                  +

                  Detailed Description

                  +

                  NetBIOS message question part

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structnetbios__resp.html b/Libraries/LwIP/doc/doxygen/output/html/structnetbios__resp.html new file mode 100644 index 0000000..2f64bde --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structnetbios__resp.html @@ -0,0 +1,105 @@ + + + + + + + +lwIP: netbios_resp Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  netbios_resp Struct Reference
                  +
                  +
                  +

                  Detailed Description

                  +

                  NetBIOS message

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structnetbuf.html b/Libraries/LwIP/doc/doxygen/output/html/structnetbuf.html new file mode 100644 index 0000000..7918e7a --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structnetbuf.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: netbuf Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  netbuf Struct Reference
                  +
                  +
                  + +

                  #include <netbuf.h>

                  +

                  Detailed Description

                  +

                  "Network buffer" - contains data and addressing info

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structnetconn.html b/Libraries/LwIP/doc/doxygen/output/html/structnetconn.html new file mode 100644 index 0000000..e94caff --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structnetconn.html @@ -0,0 +1,370 @@ + + + + + + + +lwIP: netconn Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  netconn Struct Reference
                  +
                  +
                  + +

                  #include <api.h>

                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Data Fields

                  enum netconn_type type
                   
                  enum netconn_state state
                   
                  union {
                  pcb
                   
                  err_t pending_err
                   
                  sys_sem_t op_completed
                   
                  sys_mbox_t recvmbox
                   
                  sys_mbox_t acceptmbox
                   
                  int socket
                   
                  s32_t send_timeout
                   
                  int recv_bufsize
                   
                  int recv_avail
                   
                  s16_t linger
                   
                  u8_t flags
                   
                  struct api_msgcurrent_msg
                   
                  netconn_callback callback
                   
                  +

                  Detailed Description

                  +

                  A netconn descriptor

                  +

                  Field Documentation

                  + +

                  ◆ acceptmbox

                  + +
                  +
                  + + + + +
                  sys_mbox_t netconn::acceptmbox
                  +
                  +

                  mbox where new connections are stored until processed by the application thread

                  + +
                  +
                  + +

                  ◆ callback

                  + +
                  +
                  + + + + +
                  netconn_callback netconn::callback
                  +
                  +

                  A callback function that is informed about events for this netconn

                  + +
                  +
                  + +

                  ◆ current_msg

                  + +
                  +
                  + + + + +
                  struct api_msg* netconn::current_msg
                  +
                  +

                  TCP: when data passed to netconn_write doesn't fit into the send buffer, this temporarily stores the message. Also used during connect and close.

                  + +
                  +
                  + +

                  ◆ flags

                  + +
                  +
                  + + + + +
                  u8_t netconn::flags
                  +
                  +

                  flags holding more netconn-internal state, see NETCONN_FLAG_* defines

                  + +
                  +
                  + +

                  ◆ linger

                  + +
                  +
                  + + + + +
                  s16_t netconn::linger
                  +
                  +

                  values <0 mean linger is disabled, values > 0 are seconds to linger

                  + +
                  +
                  + +

                  ◆ op_completed

                  + +
                  +
                  + + + + +
                  sys_sem_t netconn::op_completed
                  +
                  +

                  sem that is used to synchronously execute functions in the core context

                  + +
                  +
                  + +

                  ◆ pcb

                  + +
                  +
                  + + + + +
                  union { ... } netconn::pcb
                  +
                  +

                  the lwIP internal protocol control block

                  + +
                  +
                  + +

                  ◆ pending_err

                  + +
                  +
                  + + + + +
                  err_t netconn::pending_err
                  +
                  +

                  the last asynchronous unreported error this netconn had

                  + +
                  +
                  + +

                  ◆ recv_avail

                  + +
                  +
                  + + + + +
                  int netconn::recv_avail
                  +
                  +

                  number of bytes currently in recvmbox to be received, tested against recv_bufsize to limit bytes on recvmbox for UDP and RAW, used for FIONREAD

                  + +
                  +
                  + +

                  ◆ recv_bufsize

                  + +
                  +
                  + + + + +
                  int netconn::recv_bufsize
                  +
                  +

                  maximum amount of bytes queued in recvmbox not used for TCP: adjust TCP_WND instead!

                  + +
                  +
                  + +

                  ◆ recvmbox

                  + +
                  +
                  + + + + +
                  sys_mbox_t netconn::recvmbox
                  +
                  +

                  mbox where received packets are stored until they are fetched by the netconn application thread (can grow quite big)

                  + +
                  +
                  + +

                  ◆ send_timeout

                  + +
                  +
                  + + + + +
                  s32_t netconn::send_timeout
                  +
                  +

                  timeout to wait for sending data (which means enqueueing data for sending in internal buffers) in milliseconds

                  + +
                  +
                  + +

                  ◆ socket

                  + +
                  +
                  + + + + +
                  int netconn::socket
                  +
                  +

                  only used for socket layer

                  + +
                  +
                  + +

                  ◆ state

                  + +
                  +
                  + + + + +
                  enum netconn_state netconn::state
                  +
                  +

                  current state of the netconn

                  + +
                  +
                  + +

                  ◆ type

                  + +
                  +
                  + + + + +
                  enum netconn_type netconn::type
                  +
                  +

                  type of the netconn (TCP, UDP or RAW)

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file:
                    +
                  • src/include/lwip/api.h
                  • +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structnetconn.js b/Libraries/LwIP/doc/doxygen/output/html/structnetconn.js new file mode 100644 index 0000000..ff5ad3d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structnetconn.js @@ -0,0 +1,18 @@ +var structnetconn = +[ + [ "acceptmbox", "structnetconn.html#a9b59188f300828d2b5814e27ab27cad0", null ], + [ "callback", "structnetconn.html#abe796060bb06e585333ca9a87862b624", null ], + [ "current_msg", "structnetconn.html#a49ba09038b2f2563fd3a38e38f8b8ab9", null ], + [ "flags", "structnetconn.html#a96cb9a3830248699bd07a1a447e5630c", null ], + [ "linger", "structnetconn.html#a25ed06d944da0b0b9e7db5265be3fa3d", null ], + [ "op_completed", "structnetconn.html#a982506698a59f185ff3f16d1675ea4ae", null ], + [ "pcb", "structnetconn.html#a2af6773c9f6ee91e7f462dd8acc07de6", null ], + [ "pending_err", "structnetconn.html#a2a54e90fa370cf0df46dfd0b97f1cce7", null ], + [ "recv_avail", "structnetconn.html#a05b15a28b0803bea3729b1da2047541e", null ], + [ "recv_bufsize", "structnetconn.html#a6febc9717418ddba16f16e988061cfac", null ], + [ "recvmbox", "structnetconn.html#a9f2bf6a3865b6a22a8a71ec2f3e770da", null ], + [ "send_timeout", "structnetconn.html#a44e55724482b8e447134f5ba4f01551a", null ], + [ "socket", "structnetconn.html#ac8e05eb65774665e364a3dcf0f139b36", null ], + [ "state", "structnetconn.html#a936c33090ec35e5e8c0011be5515a589", null ], + [ "type", "structnetconn.html#a61af908d1d2e4e7345ac65d3b390d7b6", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structnetif.html b/Libraries/LwIP/doc/doxygen/output/html/structnetif.html new file mode 100644 index 0000000..e9a3b7e --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structnetif.html @@ -0,0 +1,590 @@ + + + + + + + +lwIP: netif Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  netif Struct Reference
                  +
                  +
                  + +

                  #include <netif.h>

                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Data Fields

                  struct netifnext
                   
                  ip_addr_t ip_addr
                   
                  ip_addr_t ip6_addr [3]
                   
                  u8_t ip6_addr_state [3]
                   
                  u32_t ip6_addr_valid_life [3]
                   
                  netif_input_fn input
                   
                  netif_output_fn output
                   
                  netif_linkoutput_fn linkoutput
                   
                  netif_output_ip6_fn output_ip6
                   
                  netif_status_callback_fn status_callback
                   
                  netif_status_callback_fn link_callback
                   
                  netif_status_callback_fn remove_callback
                   
                  void * state
                   
                  u16_t mtu
                   
                  u16_t mtu6
                   
                  u8_t hwaddr [6U]
                   
                  u8_t hwaddr_len
                   
                  u8_t flags
                   
                  char name [2]
                   
                  u8_t num
                   
                  u8_t ip6_autoconfig_enabled
                   
                  u8_t rs_count
                   
                  u8_t link_type
                   
                  u32_t link_speed
                   
                  u32_t ts
                   
                  struct stats_mib2_netif_ctrs mib2_counters
                   
                  netif_igmp_mac_filter_fn igmp_mac_filter
                   
                  netif_mld_mac_filter_fn mld_mac_filter
                   
                  +

                  Detailed Description

                  +

                  Generic data structure used for all lwIP network interfaces. The following fields should be filled in by the initialization function for the device driver: hwaddr_len, hwaddr[], mtu, flags

                  +

                  Field Documentation

                  + +

                  ◆ flags

                  + +
                  +
                  + + + + +
                  u8_t netif::flags
                  +
                  +

                  flags (

                  See also
                  Flags)
                  + +
                  +
                  + +

                  ◆ hwaddr

                  + +
                  +
                  + + + + +
                  u8_t netif::hwaddr[6U]
                  +
                  +

                  link level hardware address of this interface

                  + +
                  +
                  + +

                  ◆ hwaddr_len

                  + +
                  +
                  + + + + +
                  u8_t netif::hwaddr_len
                  +
                  +

                  number of bytes used in hwaddr

                  + +
                  +
                  + +

                  ◆ igmp_mac_filter

                  + +
                  +
                  + + + + +
                  netif_igmp_mac_filter_fn netif::igmp_mac_filter
                  +
                  +

                  This function could be called to add or delete an entry in the multicast filter table of the ethernet MAC.

                  + +
                  +
                  + +

                  ◆ input

                  + +
                  +
                  + + + + +
                  netif_input_fn netif::input
                  +
                  +

                  This function is called by the network device driver to pass a packet up the TCP/IP stack.

                  + +
                  +
                  + +

                  ◆ ip6_addr

                  + +
                  +
                  + + + + +
                  ip_addr_t netif::ip6_addr[3]
                  +
                  +

                  Array of IPv6 addresses for this netif.

                  + +
                  +
                  + +

                  ◆ ip6_addr_state

                  + +
                  +
                  + + + + +
                  u8_t netif::ip6_addr_state[3]
                  +
                  +

                  The state of each IPv6 address (Tentative, Preferred, etc).

                  See also
                  ip6_addr.h
                  + +
                  +
                  + +

                  ◆ ip6_addr_valid_life

                  + +
                  +
                  + + + + +
                  u32_t netif::ip6_addr_valid_life[3]
                  +
                  +

                  Remaining valid and preferred lifetime of each IPv6 address, in seconds. For valid lifetimes, the special value of IP6_ADDR_LIFE_STATIC (0) indicates the address is static and has no lifetimes.

                  + +
                  +
                  + +

                  ◆ ip6_autoconfig_enabled

                  + +
                  +
                  + + + + +
                  u8_t netif::ip6_autoconfig_enabled
                  +
                  +

                  is this netif enabled for IPv6 autoconfiguration

                  + +
                  +
                  + +

                  ◆ ip_addr

                  + +
                  +
                  + + + + +
                  ip_addr_t netif::ip_addr
                  +
                  +

                  IP address configuration in network byte order

                  + +
                  +
                  + +

                  ◆ link_callback

                  + +
                  +
                  + + + + +
                  netif_status_callback_fn netif::link_callback
                  +
                  +

                  This function is called when the netif link is set to up or down

                  + +
                  +
                  + +

                  ◆ link_speed

                  + +
                  +
                  + + + + +
                  u32_t netif::link_speed
                  +
                  +

                  (estimate) link speed

                  + +
                  +
                  + +

                  ◆ link_type

                  + +
                  +
                  + + + + +
                  u8_t netif::link_type
                  +
                  +

                  link type (from "snmp_ifType" enum from snmp_mib2.h)

                  + +
                  +
                  + +

                  ◆ linkoutput

                  + +
                  +
                  + + + + +
                  netif_linkoutput_fn netif::linkoutput
                  +
                  +

                  This function is called by ethernet_output() when it wants to send a packet on the interface. This function outputs the pbuf as-is on the link medium.

                  + +
                  +
                  + +

                  ◆ mib2_counters

                  + +
                  +
                  + + + + +
                  struct stats_mib2_netif_ctrs netif::mib2_counters
                  +
                  +

                  counters

                  + +
                  +
                  + +

                  ◆ mld_mac_filter

                  + +
                  +
                  + + + + +
                  netif_mld_mac_filter_fn netif::mld_mac_filter
                  +
                  +

                  This function could be called to add or delete an entry in the IPv6 multicast filter table of the ethernet MAC.

                  + +
                  +
                  + +

                  ◆ mtu

                  + +
                  +
                  + + + + +
                  u16_t netif::mtu
                  +
                  +

                  maximum transfer unit (in bytes)

                  + +
                  +
                  + +

                  ◆ mtu6

                  + +
                  +
                  + + + + +
                  u16_t netif::mtu6
                  +
                  +

                  maximum transfer unit (in bytes), updated by RA

                  + +
                  +
                  + +

                  ◆ name

                  + +
                  +
                  + + + + +
                  char netif::name[2]
                  +
                  +

                  descriptive abbreviation

                  + +
                  +
                  + +

                  ◆ next

                  + +
                  +
                  + + + + +
                  struct netif* netif::next
                  +
                  +

                  pointer to next in linked list

                  + +
                  +
                  + +

                  ◆ num

                  + +
                  +
                  + + + + +
                  u8_t netif::num
                  +
                  +

                  number of this interface. Used for Interface Identification API and NETIF related, as well as for IPv6 zones

                  + +
                  +
                  + +

                  ◆ output

                  + +
                  +
                  + + + + +
                  netif_output_fn netif::output
                  +
                  +

                  This function is called by the IP module when it wants to send a packet on the interface. This function typically first resolves the hardware address, then sends the packet. For ethernet physical layer, this is usually etharp_output()

                  + +
                  +
                  + +

                  ◆ output_ip6

                  + +
                  +
                  + + + + +
                  netif_output_ip6_fn netif::output_ip6
                  +
                  +

                  This function is called by the IPv6 module when it wants to send a packet on the interface. This function typically first resolves the hardware address, then sends the packet. For ethernet physical layer, this is usually ethip6_output()

                  + +
                  +
                  + +

                  ◆ remove_callback

                  + +
                  +
                  + + + + +
                  netif_status_callback_fn netif::remove_callback
                  +
                  +

                  This function is called when the netif has been removed

                  + +
                  +
                  + +

                  ◆ rs_count

                  + +
                  +
                  + + + + +
                  u8_t netif::rs_count
                  +
                  +

                  Number of Router Solicitation messages that remain to be sent.

                  + +
                  +
                  + +

                  ◆ state

                  + +
                  +
                  + + + + +
                  void* netif::state
                  +
                  +

                  This field can be set by the device driver and could point to state information for the device.

                  + +
                  +
                  + +

                  ◆ status_callback

                  + +
                  +
                  + + + + +
                  netif_status_callback_fn netif::status_callback
                  +
                  +

                  This function is called when the netif state is set to up or down

                  + +
                  +
                  + +

                  ◆ ts

                  + +
                  +
                  + + + + +
                  u32_t netif::ts
                  +
                  +

                  timestamp at last change made (up/down)

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structnetif.js b/Libraries/LwIP/doc/doxygen/output/html/structnetif.js new file mode 100644 index 0000000..445654d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structnetif.js @@ -0,0 +1,31 @@ +var structnetif = +[ + [ "flags", "structnetif.html#a1c171db6097bbb6f09f63549a66e00ea", null ], + [ "hwaddr", "structnetif.html#aee967965d999fc1a4c40a66709304e69", null ], + [ "hwaddr_len", "structnetif.html#afe1181561cb16241f3cb5ed01e567d42", null ], + [ "igmp_mac_filter", "structnetif.html#ae64e56581bf0f136601f24c5395c19f0", null ], + [ "input", "structnetif.html#a8fe4f1b7b0d710216287da9615164a5c", null ], + [ "ip6_addr", "structnetif.html#ab7ef575d4ab398a182bc6e592f4d53a4", null ], + [ "ip6_addr_state", "structnetif.html#a54e81344084e9840a51cc4abab3b059b", null ], + [ "ip6_addr_valid_life", "structnetif.html#a26f6e26d4a54c998716c10b7b85c8230", null ], + [ "ip6_autoconfig_enabled", "structnetif.html#ad98bafb7733b40ef898e53d91fbfa20f", null ], + [ "ip_addr", "structnetif.html#a9776aaee37ea8f07b9ddc0f8b4e7e866", null ], + [ "link_callback", "structnetif.html#a4388cfadc8b4e9a9c1c93ce777bc3673", null ], + [ "link_speed", "structnetif.html#a908452e854180941054ed89f52bb8094", null ], + [ "link_type", "structnetif.html#ad0ee2a2169e384a2977ece2c471e0062", null ], + [ "linkoutput", "structnetif.html#acaaac9b415a7be73eb8a287c8ed18a8d", null ], + [ "mib2_counters", "structnetif.html#ab32cbe1851154fd020bac4be558f5fd5", null ], + [ "mld_mac_filter", "structnetif.html#abc67963ff9f574e98ef9c50138a3e470", null ], + [ "mtu", "structnetif.html#aca7d56b4e0f822b0ced2885f222b8d48", null ], + [ "mtu6", "structnetif.html#acd78fca5dad6468605f38e327b3a5e72", null ], + [ "name", "structnetif.html#a32fca6ffd28bb9af3f891a378827a67e", null ], + [ "next", "structnetif.html#ae77736b64df442242795220d76be6b86", null ], + [ "num", "structnetif.html#ab7ef01e505dd2feb781fe86756b1c973", null ], + [ "output", "structnetif.html#a8e1dcfe65db487feecd244355f39215e", null ], + [ "output_ip6", "structnetif.html#ac38383379cff22c402156fec71c19617", null ], + [ "remove_callback", "structnetif.html#ae06deb532ead2e3009ba4e58aae6ca07", null ], + [ "rs_count", "structnetif.html#a9c1f9f28bde60aa868bc3296bee7b1b6", null ], + [ "state", "structnetif.html#a809cc57c0dff09c5c9ae45b02c2002f3", null ], + [ "status_callback", "structnetif.html#a1513e81d02557d2a950e965f18b53a45", null ], + [ "ts", "structnetif.html#a1bb4e3aed6e0fd4b6b31ee82d806f971", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1ipv4__changed__s.html b/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1ipv4__changed__s.html new file mode 100644 index 0000000..3bf1ac8 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1ipv4__changed__s.html @@ -0,0 +1,131 @@ + + + + + + + +lwIP: netif_ext_callback_args_t::ipv4_changed_s Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  netif_ext_callback_args_t::ipv4_changed_s Struct Reference
                  +
                  +
                  + +

                  #include <netif.h>

                  + + + + +

                  +Data Fields

                  const ip_addr_told_address
                   
                  +

                  Detailed Description

                  +

                  Args to LWIP_NSC_IPV4_ADDRESS_CHANGED|LWIP_NSC_IPV4_GATEWAY_CHANGED|LWIP_NSC_IPV4_NETMASK_CHANGED|LWIP_NSC_IPV4_SETTINGS_CHANGED callback

                  +

                  Field Documentation

                  + +

                  ◆ old_address

                  + +
                  +
                  + + + + +
                  const ip_addr_t* netif_ext_callback_args_t::ipv4_changed_s::old_address
                  +
                  +

                  Old IPv4 address

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1ipv4__changed__s.js b/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1ipv4__changed__s.js new file mode 100644 index 0000000..691aad6 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1ipv4__changed__s.js @@ -0,0 +1,4 @@ +var structnetif__ext__callback__args__t_1_1ipv4__changed__s = +[ + [ "old_address", "structnetif__ext__callback__args__t_1_1ipv4__changed__s.html#a0f6e5c1318218d95f1d3dc8c29c30ade", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1ipv6__addr__state__changed__s.html b/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1ipv6__addr__state__changed__s.html new file mode 100644 index 0000000..cbb6b52 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1ipv6__addr__state__changed__s.html @@ -0,0 +1,165 @@ + + + + + + + +lwIP: netif_ext_callback_args_t::ipv6_addr_state_changed_s Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  netif_ext_callback_args_t::ipv6_addr_state_changed_s Struct Reference
                  +
                  +
                  + +

                  #include <netif.h>

                  + + + + + + + + +

                  +Data Fields

                  s8_t addr_index
                   
                  u8_t old_state
                   
                  const ip_addr_taddress
                   
                  +

                  Detailed Description

                  +

                  Args to LWIP_NSC_IPV6_ADDR_STATE_CHANGED callback

                  +

                  Field Documentation

                  + +

                  ◆ addr_index

                  + +
                  +
                  + + + + +
                  s8_t netif_ext_callback_args_t::ipv6_addr_state_changed_s::addr_index
                  +
                  +

                  Index of affected IPv6 address

                  + +
                  +
                  + +

                  ◆ address

                  + +
                  +
                  + + + + +
                  const ip_addr_t* netif_ext_callback_args_t::ipv6_addr_state_changed_s::address
                  +
                  +

                  Affected IPv6 address

                  + +
                  +
                  + +

                  ◆ old_state

                  + +
                  +
                  + + + + +
                  u8_t netif_ext_callback_args_t::ipv6_addr_state_changed_s::old_state
                  +
                  +

                  Old IPv6 address state

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1ipv6__addr__state__changed__s.js b/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1ipv6__addr__state__changed__s.js new file mode 100644 index 0000000..28ab5d6 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1ipv6__addr__state__changed__s.js @@ -0,0 +1,6 @@ +var structnetif__ext__callback__args__t_1_1ipv6__addr__state__changed__s = +[ + [ "addr_index", "structnetif__ext__callback__args__t_1_1ipv6__addr__state__changed__s.html#aebf2aa0b26b07ca1977c676a0404323f", null ], + [ "address", "structnetif__ext__callback__args__t_1_1ipv6__addr__state__changed__s.html#acd24c243c866f8f9169b89af11974f17", null ], + [ "old_state", "structnetif__ext__callback__args__t_1_1ipv6__addr__state__changed__s.html#a9b58712e82a73803391523324e19a776", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1ipv6__set__s.html b/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1ipv6__set__s.html new file mode 100644 index 0000000..1074a1f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1ipv6__set__s.html @@ -0,0 +1,148 @@ + + + + + + + +lwIP: netif_ext_callback_args_t::ipv6_set_s Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  netif_ext_callback_args_t::ipv6_set_s Struct Reference
                  +
                  +
                  + +

                  #include <netif.h>

                  + + + + + + +

                  +Data Fields

                  s8_t addr_index
                   
                  const ip_addr_told_address
                   
                  +

                  Detailed Description

                  +

                  Args to LWIP_NSC_IPV6_SET callback

                  +

                  Field Documentation

                  + +

                  ◆ addr_index

                  + +
                  +
                  + + + + +
                  s8_t netif_ext_callback_args_t::ipv6_set_s::addr_index
                  +
                  +

                  Index of changed IPv6 address

                  + +
                  +
                  + +

                  ◆ old_address

                  + +
                  +
                  + + + + +
                  const ip_addr_t* netif_ext_callback_args_t::ipv6_set_s::old_address
                  +
                  +

                  Old IPv6 address

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1ipv6__set__s.js b/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1ipv6__set__s.js new file mode 100644 index 0000000..1784a4a --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1ipv6__set__s.js @@ -0,0 +1,5 @@ +var structnetif__ext__callback__args__t_1_1ipv6__set__s = +[ + [ "addr_index", "structnetif__ext__callback__args__t_1_1ipv6__set__s.html#ad44a5f52ad695ea90b15a1e29ff823dd", null ], + [ "old_address", "structnetif__ext__callback__args__t_1_1ipv6__set__s.html#aafda237ad0c20d25fa2ad83d63051226", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1link__changed__s.html b/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1link__changed__s.html new file mode 100644 index 0000000..e92dafd --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1link__changed__s.html @@ -0,0 +1,131 @@ + + + + + + + +lwIP: netif_ext_callback_args_t::link_changed_s Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  netif_ext_callback_args_t::link_changed_s Struct Reference
                  +
                  +
                  + +

                  #include <netif.h>

                  + + + + +

                  +Data Fields

                  u8_t state
                   
                  +

                  Detailed Description

                  +

                  Args to LWIP_NSC_LINK_CHANGED callback

                  +

                  Field Documentation

                  + +

                  ◆ state

                  + +
                  +
                  + + + + +
                  u8_t netif_ext_callback_args_t::link_changed_s::state
                  +
                  +

                  1: up; 0: down

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1link__changed__s.js b/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1link__changed__s.js new file mode 100644 index 0000000..5861879 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1link__changed__s.js @@ -0,0 +1,4 @@ +var structnetif__ext__callback__args__t_1_1link__changed__s = +[ + [ "state", "structnetif__ext__callback__args__t_1_1link__changed__s.html#a39870f966a2a64a7f51747b45977296c", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1status__changed__s.html b/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1status__changed__s.html new file mode 100644 index 0000000..c2844b4 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1status__changed__s.html @@ -0,0 +1,131 @@ + + + + + + + +lwIP: netif_ext_callback_args_t::status_changed_s Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  netif_ext_callback_args_t::status_changed_s Struct Reference
                  +
                  +
                  + +

                  #include <netif.h>

                  + + + + +

                  +Data Fields

                  u8_t state
                   
                  +

                  Detailed Description

                  +

                  Args to LWIP_NSC_STATUS_CHANGED callback

                  +

                  Field Documentation

                  + +

                  ◆ state

                  + +
                  +
                  + + + + +
                  u8_t netif_ext_callback_args_t::status_changed_s::state
                  +
                  +

                  1: up; 0: down

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1status__changed__s.js b/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1status__changed__s.js new file mode 100644 index 0000000..e504937 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structnetif__ext__callback__args__t_1_1status__changed__s.js @@ -0,0 +1,4 @@ +var structnetif__ext__callback__args__t_1_1status__changed__s = +[ + [ "state", "structnetif__ext__callback__args__t_1_1status__changed__s.html#a207d3afdf0a37d16a61d1253e264d7a7", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structnetvector.html b/Libraries/LwIP/doc/doxygen/output/html/structnetvector.html new file mode 100644 index 0000000..d786d87 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structnetvector.html @@ -0,0 +1,148 @@ + + + + + + + +lwIP: netvector Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  netvector Struct Reference
                  +
                  +
                  + +

                  #include <api.h>

                  + + + + + + +

                  +Data Fields

                  const void * ptr
                   
                  size_t len
                   
                  +

                  Detailed Description

                  +

                  This vector type is passed to netconn_write_vectors_partly to send multiple buffers at once. ATTENTION: This type has to directly map struct iovec since one is casted into the other!

                  +

                  Field Documentation

                  + +

                  ◆ len

                  + +
                  +
                  + + + + +
                  size_t netvector::len
                  +
                  +

                  size of the application data to send

                  + +
                  +
                  + +

                  ◆ ptr

                  + +
                  +
                  + + + + +
                  const void* netvector::ptr
                  +
                  +

                  pointer to the application buffer that contains the data to send

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file:
                    +
                  • src/include/lwip/api.h
                  • +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structnetvector.js b/Libraries/LwIP/doc/doxygen/output/html/structnetvector.js new file mode 100644 index 0000000..cdf8d41 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structnetvector.js @@ -0,0 +1,5 @@ +var structnetvector = +[ + [ "len", "structnetvector.html#a8a95e6dcf57067e4354b9c2b6b391dbd", null ], + [ "ptr", "structnetvector.html#a523362737ea7764f9aaa73a050a0b983", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structns__header.html b/Libraries/LwIP/doc/doxygen/output/html/structns__header.html new file mode 100644 index 0000000..8c7d5fd --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structns__header.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: ns_header Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  ns_header Struct Reference
                  +
                  +
                  + +

                  #include <nd6.h>

                  +

                  Detailed Description

                  +

                  Neighbor solicitation message header.

                  +

                  The documentation for this struct was generated from the following file:
                    +
                  • src/include/lwip/prot/nd6.h
                  • +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structpbuf.html b/Libraries/LwIP/doc/doxygen/output/html/structpbuf.html new file mode 100644 index 0000000..fc9cae5 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structpbuf.html @@ -0,0 +1,251 @@ + + + + + + + +lwIP: pbuf Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  pbuf Struct Reference
                  +
                  +
                  + +

                  #include <pbuf.h>

                  + + + + + + + + + + + + + + + + + + +

                  +Data Fields

                  struct pbufnext
                   
                  void * payload
                   
                  u16_t tot_len
                   
                  u16_t len
                   
                  u8_t type_internal
                   
                  u8_t flags
                   
                  u8_t ref
                   
                  u8_t if_idx
                   
                  +

                  Detailed Description

                  +

                  Main packet buffer struct

                  +

                  Field Documentation

                  + +

                  ◆ flags

                  + +
                  +
                  + + + + +
                  u8_t pbuf::flags
                  +
                  +

                  misc flags

                  + +
                  +
                  + +

                  ◆ if_idx

                  + +
                  +
                  + + + + +
                  u8_t pbuf::if_idx
                  +
                  +

                  For incoming packets, this contains the input netif's index

                  + +
                  +
                  + +

                  ◆ len

                  + +
                  +
                  + + + + +
                  u16_t pbuf::len
                  +
                  +

                  length of this buffer

                  + +
                  +
                  + +

                  ◆ next

                  + +
                  +
                  + + + + +
                  struct pbuf* pbuf::next
                  +
                  +

                  next pbuf in singly linked pbuf chain

                  + +
                  +
                  + +

                  ◆ payload

                  + +
                  +
                  + + + + +
                  void* pbuf::payload
                  +
                  +

                  pointer to the actual data in the buffer

                  + +
                  +
                  + +

                  ◆ ref

                  + +
                  +
                  + + + + +
                  u8_t pbuf::ref
                  +
                  +

                  the reference count always equals the number of pointers that refer to this pbuf. This can be pointers from an application, the stack itself, or pbuf->next pointers from a chain.

                  + +
                  +
                  + +

                  ◆ tot_len

                  + +
                  +
                  + + + + +
                  u16_t pbuf::tot_len
                  +
                  +

                  total length of this buffer and all next buffers in chain belonging to the same packet.

                  +

                  For non-queue packet chains this is the invariant: p->tot_len == p->len + (p->next? p->next->tot_len: 0)

                  + +
                  +
                  + +

                  ◆ type_internal

                  + +
                  +
                  + + + + +
                  u8_t pbuf::type_internal
                  +
                  +

                  a bit field indicating pbuf type and allocation sources (see PBUF_TYPE_FLAG_*, PBUF_ALLOC_FLAG_* and PBUF_TYPE_ALLOC_SRC_MASK)

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structpbuf.js b/Libraries/LwIP/doc/doxygen/output/html/structpbuf.js new file mode 100644 index 0000000..17ab831 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structpbuf.js @@ -0,0 +1,11 @@ +var structpbuf = +[ + [ "flags", "structpbuf.html#aa4d1af2cab3d9280d29212095b5b872a", null ], + [ "if_idx", "structpbuf.html#a6a58e90efbb4751608e9a1fdbd91e697", null ], + [ "len", "structpbuf.html#a6f82449625e36e294f5d210268c0703f", null ], + [ "next", "structpbuf.html#a5e5763c94fd18d78937b0b58ce7df341", null ], + [ "payload", "structpbuf.html#a8d32dc3e964369d4eec638fc37fbc460", null ], + [ "ref", "structpbuf.html#a62fe38eb0cf31027dc1fb9cbe7b55ba7", null ], + [ "tot_len", "structpbuf.html#a5259e7ec29bab9c0999b64f2e86b411f", null ], + [ "type_internal", "structpbuf.html#a61a26ac8393dc9e549016b86c2cf5131", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structpbuf__custom.html b/Libraries/LwIP/doc/doxygen/output/html/structpbuf__custom.html new file mode 100644 index 0000000..7785397 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structpbuf__custom.html @@ -0,0 +1,148 @@ + + + + + + + +lwIP: pbuf_custom Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  pbuf_custom Struct Reference
                  +
                  +
                  + +

                  #include <pbuf.h>

                  + + + + + + +

                  +Data Fields

                  struct pbuf pbuf
                   
                  pbuf_free_custom_fn custom_free_function
                   
                  +

                  Detailed Description

                  +

                  A custom pbuf: like a pbuf, but following a function pointer to free it.

                  +

                  Field Documentation

                  + +

                  ◆ custom_free_function

                  + +
                  +
                  + + + + +
                  pbuf_free_custom_fn pbuf_custom::custom_free_function
                  +
                  +

                  This function is called when pbuf_free deallocates this pbuf(_custom)

                  + +
                  +
                  + +

                  ◆ pbuf

                  + +
                  +
                  + + + + +
                  struct pbuf pbuf_custom::pbuf
                  +
                  +

                  The actual pbuf

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structpbuf__custom.js b/Libraries/LwIP/doc/doxygen/output/html/structpbuf__custom.js new file mode 100644 index 0000000..62d2829 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structpbuf__custom.js @@ -0,0 +1,5 @@ +var structpbuf__custom = +[ + [ "custom_free_function", "structpbuf__custom.html#af614d17874746cbbf778dc4ca9eac2e9", null ], + [ "pbuf", "structpbuf__custom.html#a100e338f13464e76b46896647b962ed8", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structpbuf__custom__ref.html b/Libraries/LwIP/doc/doxygen/output/html/structpbuf__custom__ref.html new file mode 100644 index 0000000..ebee988 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structpbuf__custom__ref.html @@ -0,0 +1,149 @@ + + + + + + + +lwIP: pbuf_custom_ref Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  pbuf_custom_ref Struct Reference
                  +
                  +
                  + +

                  #include <ip6_frag.h>

                  + + + + + + +

                  +Data Fields

                  struct pbuf_custom pc
                   
                  struct pbuforiginal
                   
                  +

                  Detailed Description

                  +

                  A custom pbuf that holds a reference to another pbuf, which is freed when this custom pbuf is freed. This is used to create a custom PBUF_REF that points into the original pbuf.

                  +

                  Field Documentation

                  + +

                  ◆ original

                  + +
                  +
                  + + + + +
                  struct pbuf * pbuf_custom_ref::original
                  +
                  +

                  pointer to the original pbuf that is referenced

                  + +
                  +
                  + +

                  ◆ pc

                  + +
                  +
                  + + + + +
                  struct pbuf_custom pbuf_custom_ref::pc
                  +
                  +

                  'base class'

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following files: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structpbuf__custom__ref.js b/Libraries/LwIP/doc/doxygen/output/html/structpbuf__custom__ref.js new file mode 100644 index 0000000..c94f6ab --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structpbuf__custom__ref.js @@ -0,0 +1,5 @@ +var structpbuf__custom__ref = +[ + [ "original", "structpbuf__custom__ref.html#a135a1476908337d8073241fd7f68fa1d", null ], + [ "pc", "structpbuf__custom__ref.html#af5884b6a7031d73406cb9596a51382b7", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structpbuf__rom.html b/Libraries/LwIP/doc/doxygen/output/html/structpbuf__rom.html new file mode 100644 index 0000000..ee0c9c9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structpbuf__rom.html @@ -0,0 +1,148 @@ + + + + + + + +lwIP: pbuf_rom Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  pbuf_rom Struct Reference
                  +
                  +
                  + +

                  #include <pbuf.h>

                  + + + + + + +

                  +Data Fields

                  struct pbufnext
                   
                  const void * payload
                   
                  +

                  Detailed Description

                  +

                  Helper struct for const-correctness only. The only meaning of this one is to provide a const payload pointer for PBUF_ROM type.

                  +

                  Field Documentation

                  + +

                  ◆ next

                  + +
                  +
                  + + + + +
                  struct pbuf* pbuf_rom::next
                  +
                  +

                  next pbuf in singly linked pbuf chain

                  + +
                  +
                  + +

                  ◆ payload

                  + +
                  +
                  + + + + +
                  const void* pbuf_rom::payload
                  +
                  +

                  pointer to the actual data in the buffer

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structpbuf__rom.js b/Libraries/LwIP/doc/doxygen/output/html/structpbuf__rom.js new file mode 100644 index 0000000..727af4d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structpbuf__rom.js @@ -0,0 +1,5 @@ +var structpbuf__rom = +[ + [ "next", "structpbuf__rom.html#a5ffdf590ed65b217e2d96f648e1bd3e7", null ], + [ "payload", "structpbuf__rom.html#a5cd0dcc590038629644ad775d76230a1", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structraw__pcb.html b/Libraries/LwIP/doc/doxygen/output/html/structraw__pcb.html new file mode 100644 index 0000000..7715aad --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structraw__pcb.html @@ -0,0 +1,165 @@ + + + + + + + +lwIP: raw_pcb Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  raw_pcb Struct Reference
                  +
                  +
                  + +

                  #include <raw.h>

                  + + + + + + + + +

                  +Data Fields

                  u8_t mcast_ifindex
                   
                  u8_t mcast_ttl
                   
                  raw_recv_fn recv
                   
                  +

                  Detailed Description

                  +

                  the RAW protocol control block

                  +

                  Field Documentation

                  + +

                  ◆ mcast_ifindex

                  + +
                  +
                  + + + + +
                  u8_t raw_pcb::mcast_ifindex
                  +
                  +

                  outgoing network interface for multicast packets, by interface index (if nonzero)

                  + +
                  +
                  + +

                  ◆ mcast_ttl

                  + +
                  +
                  + + + + +
                  u8_t raw_pcb::mcast_ttl
                  +
                  +

                  TTL for outgoing multicast packets

                  + +
                  +
                  + +

                  ◆ recv

                  + +
                  +
                  + + + + +
                  raw_recv_fn raw_pcb::recv
                  +
                  +

                  receive callback function

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file:
                    +
                  • src/include/lwip/raw.h
                  • +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structraw__pcb.js b/Libraries/LwIP/doc/doxygen/output/html/structraw__pcb.js new file mode 100644 index 0000000..d489dea --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structraw__pcb.js @@ -0,0 +1,6 @@ +var structraw__pcb = +[ + [ "mcast_ifindex", "structraw__pcb.html#a5124a21e1523c774bd76c0eabc7c7ca8", null ], + [ "mcast_ttl", "structraw__pcb.html#a2ecc77e919de9bb552d1c70e771e2cad", null ], + [ "recv", "structraw__pcb.html#a963b023239ad97c05536046ed7058a10", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structredirect__header.html b/Libraries/LwIP/doc/doxygen/output/html/structredirect__header.html new file mode 100644 index 0000000..5d2bba3 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structredirect__header.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: redirect_header Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  redirect_header Struct Reference
                  +
                  +
                  + +

                  #include <nd6.h>

                  +

                  Detailed Description

                  +

                  Redirect message header.

                  +

                  The documentation for this struct was generated from the following file:
                    +
                  • src/include/lwip/prot/nd6.h
                  • +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structrs__header.html b/Libraries/LwIP/doc/doxygen/output/html/structrs__header.html new file mode 100644 index 0000000..02da703 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structrs__header.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: rs_header Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  rs_header Struct Reference
                  +
                  +
                  + +

                  #include <nd6.h>

                  +

                  Detailed Description

                  +

                  Router solicitation message header.

                  +

                  The documentation for this struct was generated from the following file:
                    +
                  • src/include/lwip/prot/nd6.h
                  • +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsmtp__send__request.html b/Libraries/LwIP/doc/doxygen/output/html/structsmtp__send__request.html new file mode 100644 index 0000000..e125ecb --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsmtp__send__request.html @@ -0,0 +1,132 @@ + + + + + + + +lwIP: smtp_send_request Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  smtp_send_request Struct Reference
                  +
                  +
                  + +

                  #include <smtp.h>

                  + + + + +

                  +Data Fields

                  u8_t static_data
                   
                  +

                  Detailed Description

                  +

                  This structure is used as argument for smtp_send_mail_int(), which in turn can be used with tcpip_callback() to send mail from interrupt context, e.g. like this: struct smtp_send_request req; (to be filled) tcpip_try_callback(smtp_send_mail_int, (void)req);

                  +

                  For member description, see parameter description of smtp_send_mail(). When using with tcpip_callback, this structure has to stay allocated (e.g. using mem_malloc/mem_free) until its 'callback_fn' is called.

                  +

                  Field Documentation

                  + +

                  ◆ static_data

                  + +
                  +
                  + + + + +
                  u8_t smtp_send_request::static_data
                  +
                  +

                  If this is != 0, data is not copied into an extra buffer but used from the pointers supplied in this struct. This means less memory usage, but data must stay untouched until the callback function is called.

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file:
                    +
                  • src/include/lwip/apps/smtp.h
                  • +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsmtp__send__request.js b/Libraries/LwIP/doc/doxygen/output/html/structsmtp__send__request.js new file mode 100644 index 0000000..935d8dd --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsmtp__send__request.js @@ -0,0 +1,4 @@ +var structsmtp__send__request = +[ + [ "static_data", "structsmtp__send__request.html#a4d517ae8b29caa4f0b371923379d9ef4", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsmtp__session.html b/Libraries/LwIP/doc/doxygen/output/html/structsmtp__session.html new file mode 100644 index 0000000..d8d6f4b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsmtp__session.html @@ -0,0 +1,418 @@ + + + + + + + +lwIP: smtp_session Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  smtp_session Struct Reference
                  +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Data Fields

                  enum smtp_session_state state
                   
                  u16_t timer
                   
                  char tx_buf [255+1]
                   
                  const char * from
                   
                  u16_t from_len
                   
                  const char * to
                   
                  u16_t to_len
                   
                  const char * subject
                   
                  u16_t subject_len
                   
                  const char * body
                   
                  u16_t body_len
                   
                  u16_t body_sent
                   
                  smtp_result_fn callback_fn
                   
                  void * callback_arg
                   
                  char * username
                   
                  char * pass
                   
                  char auth_plain [32+32+3]
                   
                  size_t auth_plain_len
                   
                  +

                  Detailed Description

                  +

                  struct keeping the body and state of an smtp session

                  +

                  Field Documentation

                  + +

                  ◆ auth_plain

                  + +
                  +
                  + + + + +
                  char smtp_session::auth_plain[32+ 32+3]
                  +
                  +

                  Username and password combined as necessary for PLAIN authentication

                  + +
                  +
                  + +

                  ◆ auth_plain_len

                  + +
                  +
                  + + + + +
                  size_t smtp_session::auth_plain_len
                  +
                  +

                  Length of smtp_auth_plain string (cannot use strlen since it includes \0)

                  + +
                  +
                  + +

                  ◆ body

                  + +
                  +
                  + + + + +
                  const char* smtp_session::body
                  +
                  +

                  this is the body of the mail to be sent

                  + +
                  +
                  + +

                  ◆ body_len

                  + +
                  +
                  + + + + +
                  u16_t smtp_session::body_len
                  +
                  +

                  this is the length of the body to be sent

                  + +
                  +
                  + +

                  ◆ body_sent

                  + +
                  +
                  + + + + +
                  u16_t smtp_session::body_sent
                  +
                  +

                  amount of data from body already sent

                  + +
                  +
                  + +

                  ◆ callback_arg

                  + +
                  +
                  + + + + +
                  void* smtp_session::callback_arg
                  +
                  +

                  argument for callback function

                  + +
                  +
                  + +

                  ◆ callback_fn

                  + +
                  +
                  + + + + +
                  smtp_result_fn smtp_session::callback_fn
                  +
                  +

                  callback function to call when closed

                  + +
                  +
                  + +

                  ◆ from

                  + +
                  +
                  + + + + +
                  const char* smtp_session::from
                  +
                  +

                  source email address

                  + +
                  +
                  + +

                  ◆ from_len

                  + +
                  +
                  + + + + +
                  u16_t smtp_session::from_len
                  +
                  +

                  size of the sourceemail address

                  + +
                  +
                  + +

                  ◆ pass

                  + +
                  +
                  + + + + +
                  char* smtp_session::pass
                  +
                  +

                  Password to use for this request

                  + +
                  +
                  + +

                  ◆ state

                  + +
                  +
                  + + + + +
                  enum smtp_session_state smtp_session::state
                  +
                  +

                  keeping the state of the smtp session

                  + +
                  +
                  + +

                  ◆ subject

                  + +
                  +
                  + + + + +
                  const char* smtp_session::subject
                  +
                  +

                  subject of the email

                  + +
                  +
                  + +

                  ◆ subject_len

                  + +
                  +
                  + + + + +
                  u16_t smtp_session::subject_len
                  +
                  +

                  length of the subject string

                  + +
                  +
                  + +

                  ◆ timer

                  + +
                  +
                  + + + + +
                  u16_t smtp_session::timer
                  +
                  +

                  timeout handling, if this reaches 0, the connection is closed

                  + +
                  +
                  + +

                  ◆ to

                  + +
                  +
                  + + + + +
                  const char* smtp_session::to
                  +
                  +

                  target email address

                  + +
                  +
                  + +

                  ◆ to_len

                  + +
                  +
                  + + + + +
                  u16_t smtp_session::to_len
                  +
                  +

                  size of the target email address

                  + +
                  +
                  + +

                  ◆ tx_buf

                  + +
                  +
                  + + + + +
                  char smtp_session::tx_buf[255+1]
                  +
                  +

                  helper buffer for transmit, not used for sending body

                  + +
                  +
                  + +

                  ◆ username

                  + +
                  +
                  + + + + +
                  char* smtp_session::username
                  +
                  +

                  Username to use for this request

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsmtp__session.js b/Libraries/LwIP/doc/doxygen/output/html/structsmtp__session.js new file mode 100644 index 0000000..85a9855 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsmtp__session.js @@ -0,0 +1,21 @@ +var structsmtp__session = +[ + [ "auth_plain", "structsmtp__session.html#a9da4e424e22892fae51987665eca85a9", null ], + [ "auth_plain_len", "structsmtp__session.html#a003dfd03ac58252b575a7c965e532461", null ], + [ "body", "structsmtp__session.html#a7bb4bf5cc209e073341b56845e5cbd49", null ], + [ "body_len", "structsmtp__session.html#a0da8b775ddfe5f8891464037a6b4bb4d", null ], + [ "body_sent", "structsmtp__session.html#a5893c61d863b4846a81d8a4bbcaebb5b", null ], + [ "callback_arg", "structsmtp__session.html#af0544df7a935a092d825d8f2380f970f", null ], + [ "callback_fn", "structsmtp__session.html#a24c13d621e18311a613ab68b856a7f7b", null ], + [ "from", "structsmtp__session.html#a8dc4651c67618e33c56dc66790bc12ee", null ], + [ "from_len", "structsmtp__session.html#a191b09e7142414a671da82fece888e65", null ], + [ "pass", "structsmtp__session.html#a7a5a3c00378ce076ce70236525afd431", null ], + [ "state", "structsmtp__session.html#aed9c182738767279c2b58b1e3322db09", null ], + [ "subject", "structsmtp__session.html#ab8240801e229ee260f3feeaa270520c7", null ], + [ "subject_len", "structsmtp__session.html#aea48a6edd3ede02b26882c7b8d72646c", null ], + [ "timer", "structsmtp__session.html#a5884425cb5ce964d8383b29cc20208d7", null ], + [ "to", "structsmtp__session.html#a70b3753bc70e65f779279c246617faea", null ], + [ "to_len", "structsmtp__session.html#a66b8e1dd314976788e9ac9a81f59a402", null ], + [ "tx_buf", "structsmtp__session.html#a42cedb495f7423b9e28979ce1e460c61", null ], + [ "username", "structsmtp__session.html#a568e3def9d0ec54e3c079f577717a6bb", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsnmp__leaf__node.html b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__leaf__node.html new file mode 100644 index 0000000..e106c33 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__leaf__node.html @@ -0,0 +1,131 @@ + + + + + + + +lwIP: snmp_leaf_node Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  snmp_leaf_node Struct Reference
                  +
                  +
                  + +

                  #include <snmp_core.h>

                  + + + + +

                  +Data Fields

                  struct snmp_node node
                   
                  +

                  Detailed Description

                  +

                  SNMP leaf node

                  +

                  Field Documentation

                  + +

                  ◆ node

                  + +
                  +
                  + + + + +
                  struct snmp_node snmp_leaf_node::node
                  +
                  +

                  inherited "base class" members

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsnmp__leaf__node.js b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__leaf__node.js new file mode 100644 index 0000000..a99e947 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__leaf__node.js @@ -0,0 +1,4 @@ +var structsnmp__leaf__node = +[ + [ "node", "structsnmp__leaf__node.html#aa9e43030b5229d8425082c595c576992", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsnmp__mib.html b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__mib.html new file mode 100644 index 0000000..dab19b7 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__mib.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: snmp_mib Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  snmp_mib Struct Reference
                  +
                  +
                  + +

                  #include <snmp_core.h>

                  +

                  Detailed Description

                  +

                  represents a single mib with its base oid and root node

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsnmp__next__oid__state.html b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__next__oid__state.html new file mode 100644 index 0000000..7f02f40 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__next__oid__state.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: snmp_next_oid_state Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  snmp_next_oid_state Struct Reference
                  +
                  +
                  + +

                  #include <snmp_core.h>

                  +

                  Detailed Description

                  +

                  state for next_oid_init / next_oid_check functions

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsnmp__node.html b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__node.html new file mode 100644 index 0000000..cd62cf7 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__node.html @@ -0,0 +1,148 @@ + + + + + + + +lwIP: snmp_node Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  snmp_node Struct Reference
                  +
                  +
                  + +

                  #include <snmp_core.h>

                  + + + + + + +

                  +Data Fields

                  u8_t node_type
                   
                  u32_t oid
                   
                  +

                  Detailed Description

                  +

                  node "base class" layout, the mandatory fields for a node

                  +

                  Field Documentation

                  + +

                  ◆ node_type

                  + +
                  +
                  + + + + +
                  u8_t snmp_node::node_type
                  +
                  +

                  one out of SNMP_NODE_TREE or any leaf node type (like SNMP_NODE_SCALAR)

                  + +
                  +
                  + +

                  ◆ oid

                  + +
                  +
                  + + + + +
                  u32_t snmp_node::oid
                  +
                  +

                  the number assigned to this node which used as part of the full OID

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsnmp__node.js b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__node.js new file mode 100644 index 0000000..74e5577 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__node.js @@ -0,0 +1,5 @@ +var structsnmp__node = +[ + [ "node_type", "structsnmp__node.html#a1af8e20a688943a419b307bf123b1851", null ], + [ "oid", "structsnmp__node.html#ae7a3bb0eb49ac527d461be414937f271", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsnmp__node__instance.html b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__node__instance.html new file mode 100644 index 0000000..f864b23 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__node__instance.html @@ -0,0 +1,284 @@ + + + + + + + +lwIP: snmp_node_instance Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  snmp_node_instance Struct Reference
                  +
                  +
                  + +

                  #include <snmp_core.h>

                  + + + + + + + + + + + + + + + + + + + + + + +

                  +Data Fields

                  const struct snmp_nodenode
                   
                  struct snmp_obj_id instance_oid
                   
                  u8_t asn1_type
                   
                  snmp_access_t access
                   
                  node_instance_get_value_method get_value
                   
                  node_instance_set_test_method set_test
                   
                  node_instance_set_value_method set_value
                   
                  node_instance_release_method release_instance
                   
                  union snmp_variant_value reference
                   
                  u32_t reference_len
                   
                  +

                  Detailed Description

                  +

                  SNMP node instance

                  +

                  Field Documentation

                  + +

                  ◆ access

                  + +
                  +
                  + + + + +
                  snmp_access_t snmp_node_instance::access
                  +
                  +

                  one out of instance access types defined above (SNMP_NODE_INSTANCE_READ_ONLY,...)

                  + +
                  +
                  + +

                  ◆ asn1_type

                  + +
                  +
                  + + + + +
                  u8_t snmp_node_instance::asn1_type
                  +
                  +

                  ASN type for this object (see snmp_asn1.h for definitions)

                  + +
                  +
                  + +

                  ◆ get_value

                  + +
                  +
                  + + + + +
                  node_instance_get_value_method snmp_node_instance::get_value
                  +
                  +

                  returns object value for the given object identifier. Return values <0 to indicate an error

                  + +
                  +
                  + +

                  ◆ instance_oid

                  + +
                  +
                  + + + + +
                  struct snmp_obj_id snmp_node_instance::instance_oid
                  +
                  +

                  prefilled with the instance id requested; for get_instance() this is the exact oid requested; for get_next_instance() this is the relative starting point, stack expects relative oid of next node here

                  + +
                  +
                  + +

                  ◆ node

                  + +
                  +
                  + + + + +
                  const struct snmp_node* snmp_node_instance::node
                  +
                  +

                  prefilled with the node, get_instance() is called on; may be changed by user to any value to pass an arbitrary node between calls to get_instance() and get_value/test_value/set_value

                  + +
                  +
                  + +

                  ◆ reference

                  + +
                  +
                  + + + + +
                  union snmp_variant_value snmp_node_instance::reference
                  +
                  +

                  reference to pass arbitrary value between calls to get_instance() and get_value/test_value/set_value

                  + +
                  +
                  + +

                  ◆ reference_len

                  + +
                  +
                  + + + + +
                  u32_t snmp_node_instance::reference_len
                  +
                  +

                  see reference (if reference is a pointer, the length of underlying data may be stored here or anything else)

                  + +
                  +
                  + +

                  ◆ release_instance

                  + +
                  +
                  + + + + +
                  node_instance_release_method snmp_node_instance::release_instance
                  +
                  +

                  called in any case when the instance is not required anymore by stack (useful for freeing memory allocated in get_instance/get_next_instance methods)

                  + +
                  +
                  + +

                  ◆ set_test

                  + +
                  +
                  + + + + +
                  node_instance_set_test_method snmp_node_instance::set_test
                  +
                  +

                  tests length and/or range BEFORE setting

                  + +
                  +
                  + +

                  ◆ set_value

                  + +
                  +
                  + + + + +
                  node_instance_set_value_method snmp_node_instance::set_value
                  +
                  +

                  sets object value, only called when set_test() was successful

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsnmp__node__instance.js b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__node__instance.js new file mode 100644 index 0000000..f90a663 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__node__instance.js @@ -0,0 +1,13 @@ +var structsnmp__node__instance = +[ + [ "access", "structsnmp__node__instance.html#a4af17d17a971f1d11a186e6e1fc4411c", null ], + [ "asn1_type", "structsnmp__node__instance.html#af51206e0912a8402c395dcf3b623f8b9", null ], + [ "get_value", "structsnmp__node__instance.html#a17aa954aa34672f4a399bf0d91c0a649", null ], + [ "instance_oid", "structsnmp__node__instance.html#aedb358729c310c8e5b391dd256726a23", null ], + [ "node", "structsnmp__node__instance.html#a4136f44404b25f4d4dacc6b6b76e77ac", null ], + [ "reference", "structsnmp__node__instance.html#a55f53419cd5b369b771153ca2598ebc5", null ], + [ "reference_len", "structsnmp__node__instance.html#ad289957b34b4e55915fa79f37c4d9d54", null ], + [ "release_instance", "structsnmp__node__instance.html#a20a256c54fab19a455ecf6deff76c6de", null ], + [ "set_test", "structsnmp__node__instance.html#a03c1fec3764f6b48337238b3355ee5bd", null ], + [ "set_value", "structsnmp__node__instance.html#a55fb4cadefcab9c74c3fb529c2560834", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsnmp__obj__id.html b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__obj__id.html new file mode 100644 index 0000000..ff735c7 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__obj__id.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: snmp_obj_id Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  snmp_obj_id Struct Reference
                  +
                  +
                  + +

                  #include <snmp_core.h>

                  +

                  Detailed Description

                  +

                  internal object identifier representation

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsnmp__oid__range.html b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__oid__range.html new file mode 100644 index 0000000..87e173f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__oid__range.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: snmp_oid_range Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  snmp_oid_range Struct Reference
                  +
                  +
                  + +

                  #include <snmp_core.h>

                  +

                  Detailed Description

                  +

                  OID range structure

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsnmp__scalar__array__node.html b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__scalar__array__node.html new file mode 100644 index 0000000..26b9580 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__scalar__array__node.html @@ -0,0 +1,131 @@ + + + + + + + +lwIP: snmp_scalar_array_node Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  snmp_scalar_array_node Struct Reference
                  +
                  +
                  + +

                  #include <snmp_scalar.h>

                  + + + + +

                  +Data Fields

                  struct snmp_leaf_node node
                   
                  +

                  Detailed Description

                  +

                  basic scalar array node

                  +

                  Field Documentation

                  + +

                  ◆ node

                  + +
                  +
                  + + + + +
                  struct snmp_leaf_node snmp_scalar_array_node::node
                  +
                  +

                  inherited "base class" members

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsnmp__scalar__array__node.js b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__scalar__array__node.js new file mode 100644 index 0000000..a485aec --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__scalar__array__node.js @@ -0,0 +1,4 @@ +var structsnmp__scalar__array__node = +[ + [ "node", "structsnmp__scalar__array__node.html#a34753e75ec873c92381bf9b6d00d411b", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsnmp__scalar__array__node__def.html b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__scalar__array__node__def.html new file mode 100644 index 0000000..d180761 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__scalar__array__node__def.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: snmp_scalar_array_node_def Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  snmp_scalar_array_node_def Struct Reference
                  +
                  +
                  + +

                  #include <snmp_scalar.h>

                  +

                  Detailed Description

                  +

                  scalar array node - a tree node which contains scalars only as children

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsnmp__scalar__node.html b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__scalar__node.html new file mode 100644 index 0000000..7d74ea9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__scalar__node.html @@ -0,0 +1,131 @@ + + + + + + + +lwIP: snmp_scalar_node Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  snmp_scalar_node Struct Reference
                  +
                  +
                  + +

                  #include <snmp_scalar.h>

                  + + + + +

                  +Data Fields

                  struct snmp_leaf_node node
                   
                  +

                  Detailed Description

                  +

                  basic scalar node

                  +

                  Field Documentation

                  + +

                  ◆ node

                  + +
                  +
                  + + + + +
                  struct snmp_leaf_node snmp_scalar_node::node
                  +
                  +

                  inherited "base class" members

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsnmp__scalar__node.js b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__scalar__node.js new file mode 100644 index 0000000..99caa25 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__scalar__node.js @@ -0,0 +1,4 @@ +var structsnmp__scalar__node = +[ + [ "node", "structsnmp__scalar__node.html#a3c9e5cc0a5e22ececeeb3c512d25e3a1", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsnmp__table__col__def.html b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__table__col__def.html new file mode 100644 index 0000000..6a412b4 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__table__col__def.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: snmp_table_col_def Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  snmp_table_col_def Struct Reference
                  +
                  +
                  + +

                  #include <snmp_table.h>

                  +

                  Detailed Description

                  +

                  default (customizable) read/write table

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsnmp__table__node.html b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__table__node.html new file mode 100644 index 0000000..97cf153 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__table__node.html @@ -0,0 +1,182 @@ + + + + + + + +lwIP: snmp_table_node Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  snmp_table_node Struct Reference
                  +
                  +
                  + +

                  #include <snmp_table.h>

                  + + + + + + + + + + +

                  +Data Fields

                  struct snmp_leaf_node node
                   
                  node_instance_get_value_method get_value
                   
                  node_instance_set_test_method set_test
                   
                  node_instance_set_value_method set_value
                   
                  +

                  Detailed Description

                  +

                  table node

                  +

                  Field Documentation

                  + +

                  ◆ get_value

                  + +
                  +
                  + + + + +
                  node_instance_get_value_method snmp_table_node::get_value
                  +
                  +

                  returns object value for the given object identifier

                  + +
                  +
                  + +

                  ◆ node

                  + +
                  +
                  + + + + +
                  struct snmp_leaf_node snmp_table_node::node
                  +
                  +

                  inherited "base class" members

                  + +
                  +
                  + +

                  ◆ set_test

                  + +
                  +
                  + + + + +
                  node_instance_set_test_method snmp_table_node::set_test
                  +
                  +

                  tests length and/or range BEFORE setting

                  + +
                  +
                  + +

                  ◆ set_value

                  + +
                  +
                  + + + + +
                  node_instance_set_value_method snmp_table_node::set_value
                  +
                  +

                  sets object value, only called when set_test() was successful

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsnmp__table__node.js b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__table__node.js new file mode 100644 index 0000000..2cfead6 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__table__node.js @@ -0,0 +1,7 @@ +var structsnmp__table__node = +[ + [ "get_value", "structsnmp__table__node.html#ac65c57e29faa456a9a710185109fe272", null ], + [ "node", "structsnmp__table__node.html#a3f12334e8d1556c36ce3e2206001ab18", null ], + [ "set_test", "structsnmp__table__node.html#acfbc5fa3361117fc4fa83642dde8aef0", null ], + [ "set_value", "structsnmp__table__node.html#a2a3e8ac0dcce64604fc17e1de3c5a804", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsnmp__table__simple__node.html b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__table__simple__node.html new file mode 100644 index 0000000..b22740d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__table__simple__node.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: snmp_table_simple_node Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  snmp_table_simple_node Struct Reference
                  +
                  +
                  + +

                  #include <snmp_table.h>

                  +

                  Detailed Description

                  +

                  simple read-only table node

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsnmp__threadsync__instance.html b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__threadsync__instance.html new file mode 100644 index 0000000..1e94694 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__threadsync__instance.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: snmp_threadsync_instance Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  snmp_threadsync_instance Struct Reference
                  +
                  +
                  + +

                  #include <snmp_threadsync.h>

                  +

                  Detailed Description

                  +

                  Thread sync instance. Needed EXCATLY once for every thread to be synced into.

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsnmp__threadsync__node.html b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__threadsync__node.html new file mode 100644 index 0000000..38f893f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__threadsync__node.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: snmp_threadsync_node Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  snmp_threadsync_node Struct Reference
                  +
                  +
                  + +

                  #include <snmp_threadsync.h>

                  +

                  Detailed Description

                  +

                  SNMP thread sync proxy leaf node

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsnmp__tree__node.html b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__tree__node.html new file mode 100644 index 0000000..f1c7e14 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__tree__node.html @@ -0,0 +1,131 @@ + + + + + + + +lwIP: snmp_tree_node Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  snmp_tree_node Struct Reference
                  +
                  +
                  + +

                  #include <snmp_core.h>

                  + + + + +

                  +Data Fields

                  struct snmp_node node
                   
                  +

                  Detailed Description

                  +

                  SNMP tree node

                  +

                  Field Documentation

                  + +

                  ◆ node

                  + +
                  +
                  + + + + +
                  struct snmp_node snmp_tree_node::node
                  +
                  +

                  inherited "base class" members

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsnmp__tree__node.js b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__tree__node.js new file mode 100644 index 0000000..e2730af --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__tree__node.js @@ -0,0 +1,4 @@ +var structsnmp__tree__node = +[ + [ "node", "structsnmp__tree__node.html#ad851f80c809606947c99cb26a9163386", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsnmp__varbind.html b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__varbind.html new file mode 100644 index 0000000..fd001fd --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__varbind.html @@ -0,0 +1,216 @@ + + + + + + + +lwIP: snmp_varbind Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  snmp_varbind Struct Reference
                  +
                  +
                  + +

                  #include <snmp.h>

                  + + + + + + + + + + + + + + +

                  +Data Fields

                  struct snmp_varbindnext
                   
                  struct snmp_varbindprev
                   
                  struct snmp_obj_id oid
                   
                  u8_t type
                   
                  u16_t value_len
                   
                  void * value
                   
                  +

                  Detailed Description

                  +

                  SNMP variable binding descriptor (publically needed for traps)

                  +

                  Field Documentation

                  + +

                  ◆ next

                  + +
                  +
                  + + + + +
                  struct snmp_varbind* snmp_varbind::next
                  +
                  +

                  pointer to next varbind, NULL for last in list

                  + +
                  +
                  + +

                  ◆ oid

                  + +
                  +
                  + + + + +
                  struct snmp_obj_id snmp_varbind::oid
                  +
                  +

                  object identifier

                  + +
                  +
                  + +

                  ◆ prev

                  + +
                  +
                  + + + + +
                  struct snmp_varbind* snmp_varbind::prev
                  +
                  +

                  pointer to previous varbind, NULL for first in list

                  + +
                  +
                  + +

                  ◆ type

                  + +
                  +
                  + + + + +
                  u8_t snmp_varbind::type
                  +
                  +

                  value ASN1 type

                  + +
                  +
                  + +

                  ◆ value

                  + +
                  +
                  + + + + +
                  void* snmp_varbind::value
                  +
                  +

                  object value

                  + +
                  +
                  + +

                  ◆ value_len

                  + +
                  +
                  + + + + +
                  u16_t snmp_varbind::value_len
                  +
                  +

                  object value length

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file:
                    +
                  • src/include/lwip/apps/snmp.h
                  • +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsnmp__varbind.js b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__varbind.js new file mode 100644 index 0000000..88579d2 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__varbind.js @@ -0,0 +1,9 @@ +var structsnmp__varbind = +[ + [ "next", "structsnmp__varbind.html#a7388422ffb0607b209a39d6d3fcad40e", null ], + [ "oid", "structsnmp__varbind.html#ace3a9e4dcdc9a5ec79a20c84946418a4", null ], + [ "prev", "structsnmp__varbind.html#a365abcc1f80d28dc8ffd07193099c760", null ], + [ "type", "structsnmp__varbind.html#ad63223e45e04c08ea97859b8ba767950", null ], + [ "value", "structsnmp__varbind.html#a328227d7ae188a0a2feb95f8000aac45", null ], + [ "value_len", "structsnmp__varbind.html#ab094577fac6c7cc16ad666c9970cdb85", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsnmp__varbind__len.html b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__varbind__len.html new file mode 100644 index 0000000..ec27dfd --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsnmp__varbind__len.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: snmp_varbind_len Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  snmp_varbind_len Struct Reference
                  +
                  +
                  + +

                  #include <snmp_msg.h>

                  +

                  Detailed Description

                  +

                  A helper struct keeping length information about varbinds

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsntp__msg.html b/Libraries/LwIP/doc/doxygen/output/html/structsntp__msg.html new file mode 100644 index 0000000..8d0611a --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsntp__msg.html @@ -0,0 +1,108 @@ + + + + + + + +lwIP: sntp_msg Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  sntp_msg Struct Reference
                  +
                  +
                  +

                  Detailed Description

                  +

                  SNTP packet format (without optional fields) Timestamps are coded as 64 bits:

                    +
                  • signed 32 bits seconds since Feb 07, 2036, 06:28:16 UTC (epoch 1)
                  • +
                  • unsigned 32 bits seconds fraction (2^32 = 1 second)
                  • +
                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsntp__server.html b/Libraries/LwIP/doc/doxygen/output/html/structsntp__server.html new file mode 100644 index 0000000..a4e0c01 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsntp__server.html @@ -0,0 +1,129 @@ + + + + + + + +lwIP: sntp_server Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  sntp_server Struct Reference
                  +
                  +
                  + + + + +

                  +Data Fields

                  u8_t reachability
                   
                  +

                  Detailed Description

                  +

                  Names/Addresses of servers

                  +

                  Field Documentation

                  + +

                  ◆ reachability

                  + +
                  +
                  + + + + +
                  u8_t sntp_server::reachability
                  +
                  +

                  Reachability shift register as described in RFC 5905

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsntp__server.js b/Libraries/LwIP/doc/doxygen/output/html/structsntp__server.js new file mode 100644 index 0000000..5d64202 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsntp__server.js @@ -0,0 +1,4 @@ +var structsntp__server = +[ + [ "reachability", "structsntp__server.html#a2e9283bb8f94930fd2a2c3f24fc4b40d", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsntp__time.html b/Libraries/LwIP/doc/doxygen/output/html/structsntp__time.html new file mode 100644 index 0000000..9522f00 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsntp__time.html @@ -0,0 +1,105 @@ + + + + + + + +lwIP: sntp_time Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  sntp_time Struct Reference
                  +
                  +
                  +

                  Detailed Description

                  +

                  64-bit NTP timestamp, in network byte order.

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structsntp__timestamps.html b/Libraries/LwIP/doc/doxygen/output/html/structsntp__timestamps.html new file mode 100644 index 0000000..b5add6d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structsntp__timestamps.html @@ -0,0 +1,105 @@ + + + + + + + +lwIP: sntp_timestamps Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  sntp_timestamps Struct Reference
                  +
                  +
                  +

                  Detailed Description

                  +

                  Timestamps to be extracted from the NTP header.

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structstats__.html b/Libraries/LwIP/doc/doxygen/output/html/structstats__.html new file mode 100644 index 0000000..dfd3bc9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structstats__.html @@ -0,0 +1,403 @@ + + + + + + + +lwIP: stats_ Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  stats_ Struct Reference
                  +
                  +
                  + +

                  #include <stats.h>

                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Data Fields

                  struct stats_proto link
                   
                  struct stats_proto etharp
                   
                  struct stats_proto ip_frag
                   
                  struct stats_proto ip
                   
                  struct stats_proto icmp
                   
                  struct stats_igmp igmp
                   
                  struct stats_proto udp
                   
                  struct stats_proto tcp
                   
                  struct stats_mem mem
                   
                  struct stats_memmemp [MEMP_MAX]
                   
                  struct stats_sys sys
                   
                  struct stats_proto ip6
                   
                  struct stats_proto icmp6
                   
                  struct stats_proto ip6_frag
                   
                  struct stats_igmp mld6
                   
                  struct stats_proto nd6
                   
                  struct stats_mib2 mib2
                   
                  +

                  Detailed Description

                  +

                  lwIP stats container

                  +

                  Field Documentation

                  + +

                  ◆ etharp

                  + +
                  +
                  + + + + +
                  struct stats_proto stats_::etharp
                  +
                  +

                  ARP

                  + +
                  +
                  + +

                  ◆ icmp

                  + +
                  +
                  + + + + +
                  struct stats_proto stats_::icmp
                  +
                  +

                  ICMP

                  + +
                  +
                  + +

                  ◆ icmp6

                  + +
                  +
                  + + + + +
                  struct stats_proto stats_::icmp6
                  +
                  +

                  ICMP6

                  + +
                  +
                  + +

                  ◆ igmp

                  + +
                  +
                  + + + + +
                  struct stats_igmp stats_::igmp
                  +
                  +

                  IGMP

                  + +
                  +
                  + +

                  ◆ ip

                  + +
                  +
                  + + + + +
                  struct stats_proto stats_::ip
                  +
                  +

                  IP

                  + +
                  +
                  + +

                  ◆ ip6

                  + +
                  +
                  + + + + +
                  struct stats_proto stats_::ip6
                  +
                  +

                  IPv6

                  + +
                  +
                  + +

                  ◆ ip6_frag

                  + +
                  +
                  + + + + +
                  struct stats_proto stats_::ip6_frag
                  +
                  +

                  IPv6 fragmentation

                  + +
                  +
                  + +

                  ◆ ip_frag

                  + +
                  +
                  + + + + +
                  struct stats_proto stats_::ip_frag
                  +
                  +

                  Fragmentation

                  + +
                  +
                  + +

                  ◆ link

                  + +
                  +
                  + + + + +
                  struct stats_proto stats_::link
                  +
                  +

                  Link level

                  + +
                  +
                  + +

                  ◆ mem

                  + +
                  +
                  + + + + +
                  struct stats_mem stats_::mem
                  +
                  +

                  Heap

                  + +
                  +
                  + +

                  ◆ memp

                  + +
                  +
                  + + + + +
                  struct stats_mem* stats_::memp[MEMP_MAX]
                  +
                  +

                  Internal memory pools

                  + +
                  +
                  + +

                  ◆ mib2

                  + +
                  +
                  + + + + +
                  struct stats_mib2 stats_::mib2
                  +
                  +

                  SNMP MIB2

                  + +
                  +
                  + +

                  ◆ mld6

                  + +
                  +
                  + + + + +
                  struct stats_igmp stats_::mld6
                  +
                  +

                  Multicast listener discovery

                  + +
                  +
                  + +

                  ◆ nd6

                  + +
                  +
                  + + + + +
                  struct stats_proto stats_::nd6
                  +
                  +

                  Neighbor discovery

                  + +
                  +
                  + +

                  ◆ sys

                  + +
                  +
                  + + + + +
                  struct stats_sys stats_::sys
                  +
                  +

                  System

                  + +
                  +
                  + +

                  ◆ tcp

                  + +
                  +
                  + + + + +
                  struct stats_proto stats_::tcp
                  +
                  +

                  TCP

                  + +
                  +
                  + +

                  ◆ udp

                  + +
                  +
                  + + + + +
                  struct stats_proto stats_::udp
                  +
                  +

                  UDP

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structstats__.js b/Libraries/LwIP/doc/doxygen/output/html/structstats__.js new file mode 100644 index 0000000..f82a7a4 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structstats__.js @@ -0,0 +1,20 @@ +var structstats__ = +[ + [ "etharp", "structstats__.html#aa52547cb08dc828927494dc485bb69f3", null ], + [ "icmp", "structstats__.html#a10bc430163b0e6db91338aded5b7019a", null ], + [ "icmp6", "structstats__.html#a25a6b5940e32d53a066aa1bbc2028c03", null ], + [ "igmp", "structstats__.html#a877e369c2abef97f13492faa838e2271", null ], + [ "ip", "structstats__.html#a40f5b637d083896a07a3482ede23b7ed", null ], + [ "ip6", "structstats__.html#afc0942a5bc26735cf059099636b85336", null ], + [ "ip6_frag", "structstats__.html#a7373df7bc44bb9913a42c0bc7b3039cf", null ], + [ "ip_frag", "structstats__.html#a81fcccf03ab0d4e31423f39d0c880302", null ], + [ "link", "structstats__.html#a67759c9b0059bf569f9f771df23924eb", null ], + [ "mem", "structstats__.html#a656444f95080c6a3d474f73a6fcd9b1c", null ], + [ "memp", "structstats__.html#aa75d6b389e94b0f619b5db0daaf569fc", null ], + [ "mib2", "structstats__.html#ac001c065c56c26c3952b19b9ce0d5832", null ], + [ "mld6", "structstats__.html#ab0ad1d07dff25cd3e4a8e5be607497f8", null ], + [ "nd6", "structstats__.html#ab348a3a4b593b05d7df1293a06af8adf", null ], + [ "sys", "structstats__.html#a317123da6c92aa9d2fa40e8060357035", null ], + [ "tcp", "structstats__.html#a32ef1aaa427d62a5c7890de0ac23fe86", null ], + [ "udp", "structstats__.html#a626e03d4bded6480582789cfd17d4063", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structstats__igmp.html b/Libraries/LwIP/doc/doxygen/output/html/structstats__igmp.html new file mode 100644 index 0000000..4bbc388 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structstats__igmp.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: stats_igmp Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  stats_igmp Struct Reference
                  +
                  +
                  + +

                  #include <stats.h>

                  +

                  Detailed Description

                  +

                  IGMP stats

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structstats__mem.html b/Libraries/LwIP/doc/doxygen/output/html/structstats__mem.html new file mode 100644 index 0000000..c1a57d0 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structstats__mem.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: stats_mem Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  stats_mem Struct Reference
                  +
                  +
                  + +

                  #include <stats.h>

                  +

                  Detailed Description

                  +

                  Memory stats

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structstats__mib2.html b/Libraries/LwIP/doc/doxygen/output/html/structstats__mib2.html new file mode 100644 index 0000000..c3a6aa1 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structstats__mib2.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: stats_mib2 Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  stats_mib2 Struct Reference
                  +
                  +
                  + +

                  #include <stats.h>

                  +

                  Detailed Description

                  +

                  SNMP MIB2 stats

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structstats__mib2__netif__ctrs.html b/Libraries/LwIP/doc/doxygen/output/html/structstats__mib2__netif__ctrs.html new file mode 100644 index 0000000..6c805fb --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structstats__mib2__netif__ctrs.html @@ -0,0 +1,301 @@ + + + + + + + +lwIP: stats_mib2_netif_ctrs Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  stats_mib2_netif_ctrs Struct Reference
                  +
                  +
                  + +

                  #include <stats.h>

                  + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Data Fields

                  u32_t ifinoctets
                   
                  u32_t ifinucastpkts
                   
                  u32_t ifinnucastpkts
                   
                  u32_t ifindiscards
                   
                  u32_t ifinerrors
                   
                  u32_t ifinunknownprotos
                   
                  u32_t ifoutoctets
                   
                  u32_t ifoutucastpkts
                   
                  u32_t ifoutnucastpkts
                   
                  u32_t ifoutdiscards
                   
                  u32_t ifouterrors
                   
                  +

                  Detailed Description

                  +

                  SNMP MIB2 interface stats

                  +

                  Field Documentation

                  + +

                  ◆ ifindiscards

                  + +
                  +
                  + + + + +
                  u32_t stats_mib2_netif_ctrs::ifindiscards
                  +
                  +

                  The number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space

                  + +
                  +
                  + +

                  ◆ ifinerrors

                  + +
                  +
                  + + + + +
                  u32_t stats_mib2_netif_ctrs::ifinerrors
                  +
                  +

                  For packet-oriented interfaces, the number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character- oriented or fixed-length interfaces, the number of inbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol.

                  + +
                  +
                  + +

                  ◆ ifinnucastpkts

                  + +
                  +
                  + + + + +
                  u32_t stats_mib2_netif_ctrs::ifinnucastpkts
                  +
                  +

                  The number of packets, delivered by this sub-layer to a higher (sub-)layer, which were addressed to a multicast or broadcast address at this sub-layer

                  + +
                  +
                  + +

                  ◆ ifinoctets

                  + +
                  +
                  + + + + +
                  u32_t stats_mib2_netif_ctrs::ifinoctets
                  +
                  +

                  The total number of octets received on the interface, including framing characters

                  + +
                  +
                  + +

                  ◆ ifinucastpkts

                  + +
                  +
                  + + + + +
                  u32_t stats_mib2_netif_ctrs::ifinucastpkts
                  +
                  +

                  The number of packets, delivered by this sub-layer to a higher (sub-)layer, which were not addressed to a multicast or broadcast address at this sub-layer

                  + +
                  +
                  + +

                  ◆ ifinunknownprotos

                  + +
                  +
                  + + + + +
                  u32_t stats_mib2_netif_ctrs::ifinunknownprotos
                  +
                  +

                  For packet-oriented interfaces, the number of packets received via the interface which were discarded because of an unknown or unsupported protocol. For character-oriented or fixed-length interfaces that support protocol multiplexing the number of transmission units received via the interface which were discarded because of an unknown or unsupported protocol. For any interface that does not support protocol multiplexing, this counter will always be 0

                  + +
                  +
                  + +

                  ◆ ifoutdiscards

                  + +
                  +
                  + + + + +
                  u32_t stats_mib2_netif_ctrs::ifoutdiscards
                  +
                  +

                  The number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being transmitted. One possible reason for discarding such a packet could be to free up buffer space.

                  + +
                  +
                  + +

                  ◆ ifouterrors

                  + +
                  +
                  + + + + +
                  u32_t stats_mib2_netif_ctrs::ifouterrors
                  +
                  +

                  For packet-oriented interfaces, the number of outbound packets that could not be transmitted because of errors. For character-oriented or fixed-length interfaces, the number of outbound transmission units that could not be transmitted because of errors.

                  + +
                  +
                  + +

                  ◆ ifoutnucastpkts

                  + +
                  +
                  + + + + +
                  u32_t stats_mib2_netif_ctrs::ifoutnucastpkts
                  +
                  +

                  The total number of packets that higher-level protocols requested be transmitted, and which were addressed to a multicast or broadcast address at this sub-layer, including those that were discarded or not sent.

                  + +
                  +
                  + +

                  ◆ ifoutoctets

                  + +
                  +
                  + + + + +
                  u32_t stats_mib2_netif_ctrs::ifoutoctets
                  +
                  +

                  The total number of octets transmitted out of the interface, including framing characters.

                  + +
                  +
                  + +

                  ◆ ifoutucastpkts

                  + +
                  +
                  + + + + +
                  u32_t stats_mib2_netif_ctrs::ifoutucastpkts
                  +
                  +

                  The total number of packets that higher-level protocols requested be transmitted, and which were not addressed to a multicast or broadcast address at this sub-layer, including those that were discarded or not sent.

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structstats__mib2__netif__ctrs.js b/Libraries/LwIP/doc/doxygen/output/html/structstats__mib2__netif__ctrs.js new file mode 100644 index 0000000..ab2b5e9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structstats__mib2__netif__ctrs.js @@ -0,0 +1,14 @@ +var structstats__mib2__netif__ctrs = +[ + [ "ifindiscards", "structstats__mib2__netif__ctrs.html#a4a767e6b835d5ad2f9b73751de2b0947", null ], + [ "ifinerrors", "structstats__mib2__netif__ctrs.html#afda1a14dc79bb65a33f97f9fb467ec1d", null ], + [ "ifinnucastpkts", "structstats__mib2__netif__ctrs.html#a111f08290b3c6944108237cefba066dd", null ], + [ "ifinoctets", "structstats__mib2__netif__ctrs.html#a7e9ddf9b4a17748a9d3f041c1d24ba8e", null ], + [ "ifinucastpkts", "structstats__mib2__netif__ctrs.html#a9ed42d6329a9616669ba21789fa001d8", null ], + [ "ifinunknownprotos", "structstats__mib2__netif__ctrs.html#ac34eb01b42f22b1e49ca7c9734e737aa", null ], + [ "ifoutdiscards", "structstats__mib2__netif__ctrs.html#a3a2aec508fd4466ca8bab10d8dc2c842", null ], + [ "ifouterrors", "structstats__mib2__netif__ctrs.html#a91b60bb78759c9b655a74bb4fae3346e", null ], + [ "ifoutnucastpkts", "structstats__mib2__netif__ctrs.html#afd3264670c39cc0d721a35cb6650f8d7", null ], + [ "ifoutoctets", "structstats__mib2__netif__ctrs.html#a24151d13a55452518e5f7832f48bd5a7", null ], + [ "ifoutucastpkts", "structstats__mib2__netif__ctrs.html#a24aba9660a2951027b23d4118b57c471", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structstats__proto.html b/Libraries/LwIP/doc/doxygen/output/html/structstats__proto.html new file mode 100644 index 0000000..6ff17cf --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structstats__proto.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: stats_proto Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  stats_proto Struct Reference
                  +
                  +
                  + +

                  #include <stats.h>

                  +

                  Detailed Description

                  +

                  Protocol related stats

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structstats__sys.html b/Libraries/LwIP/doc/doxygen/output/html/structstats__sys.html new file mode 100644 index 0000000..c47100d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structstats__sys.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: stats_sys Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  stats_sys Struct Reference
                  +
                  +
                  + +

                  #include <stats.h>

                  +

                  Detailed Description

                  +

                  System stats

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structstats__syselem.html b/Libraries/LwIP/doc/doxygen/output/html/structstats__syselem.html new file mode 100644 index 0000000..e8ebf5c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structstats__syselem.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: stats_syselem Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  stats_syselem Struct Reference
                  +
                  +
                  + +

                  #include <stats.h>

                  +

                  Detailed Description

                  +

                  System element stats

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structt_c_g_i.html b/Libraries/LwIP/doc/doxygen/output/html/structt_c_g_i.html new file mode 100644 index 0000000..527a218 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structt_c_g_i.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: tCGI Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  tCGI Struct Reference
                  +
                  +
                  + +

                  #include <httpd.h>

                  +

                  Detailed Description

                  +

                  Structure defining the base filename (URL) of a CGI and the associated function which is to be called when that URL is requested.

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structtcp__ext__arg__callbacks.html b/Libraries/LwIP/doc/doxygen/output/html/structtcp__ext__arg__callbacks.html new file mode 100644 index 0000000..c321c05 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structtcp__ext__arg__callbacks.html @@ -0,0 +1,148 @@ + + + + + + + +lwIP: tcp_ext_arg_callbacks Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  tcp_ext_arg_callbacks Struct Reference
                  +
                  +
                  + +

                  #include <tcp.h>

                  + + + + + + +

                  +Data Fields

                  tcp_extarg_callback_pcb_destroyed_fn destroy
                   
                  tcp_extarg_callback_passive_open_fn passive_open
                   
                  +

                  Detailed Description

                  +

                  A table of callback functions that is invoked for ext arguments

                  +

                  Field Documentation

                  + +

                  ◆ destroy

                  + +
                  +
                  + + + + +
                  tcp_extarg_callback_pcb_destroyed_fn tcp_ext_arg_callbacks::destroy
                  +
                  +
                  + +

                  ◆ passive_open

                  + +
                  +
                  + + + + +
                  tcp_extarg_callback_passive_open_fn tcp_ext_arg_callbacks::passive_open
                  +
                  +
                  +
                  The documentation for this struct was generated from the following file:
                    +
                  • src/include/lwip/tcp.h
                  • +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structtcp__ext__arg__callbacks.js b/Libraries/LwIP/doc/doxygen/output/html/structtcp__ext__arg__callbacks.js new file mode 100644 index 0000000..a1e6524 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structtcp__ext__arg__callbacks.js @@ -0,0 +1,5 @@ +var structtcp__ext__arg__callbacks = +[ + [ "destroy", "structtcp__ext__arg__callbacks.html#ace586d5d376b42465927a4fd8688c24b", null ], + [ "passive_open", "structtcp__ext__arg__callbacks.html#a86b5816e8285378813963d09272b050a", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structtcp__pcb.html b/Libraries/LwIP/doc/doxygen/output/html/structtcp__pcb.html new file mode 100644 index 0000000..69e19b0 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structtcp__pcb.html @@ -0,0 +1,148 @@ + + + + + + + +lwIP: tcp_pcb Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  tcp_pcb Struct Reference
                  +
                  +
                  + +

                  #include <tcp.h>

                  + + + + + + +

                  +Data Fields

                  ip_addr_t local_ip
                   
                  struct tcp_pcbnext
                   
                  +

                  Detailed Description

                  +

                  the TCP protocol control block

                  +

                  Field Documentation

                  + +

                  ◆ local_ip

                  + +
                  +
                  + + + + +
                  ip_addr_t tcp_pcb::local_ip
                  +
                  +

                  common PCB members

                  + +
                  +
                  + +

                  ◆ next

                  + +
                  +
                  + + + + +
                  struct tcp_pcb* tcp_pcb::next
                  +
                  +

                  protocol specific PCB members

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file:
                    +
                  • src/include/lwip/tcp.h
                  • +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structtcp__pcb.js b/Libraries/LwIP/doc/doxygen/output/html/structtcp__pcb.js new file mode 100644 index 0000000..2e5675a --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structtcp__pcb.js @@ -0,0 +1,5 @@ +var structtcp__pcb = +[ + [ "local_ip", "structtcp__pcb.html#a0c4f101d55debee0d8fad86a7eb4f76f", null ], + [ "next", "structtcp__pcb.html#a2aed7ffb5fb83aabe68b36f097d99260", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structtcp__pcb__listen.html b/Libraries/LwIP/doc/doxygen/output/html/structtcp__pcb__listen.html new file mode 100644 index 0000000..26030f4 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structtcp__pcb__listen.html @@ -0,0 +1,148 @@ + + + + + + + +lwIP: tcp_pcb_listen Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  tcp_pcb_listen Struct Reference
                  +
                  +
                  + +

                  #include <tcp.h>

                  + + + + + + +

                  +Data Fields

                  ip_addr_t local_ip
                   
                  struct tcp_pcb_listennext
                   
                  +

                  Detailed Description

                  +

                  the TCP protocol control block for listening pcbs

                  +

                  Field Documentation

                  + +

                  ◆ local_ip

                  + +
                  +
                  + + + + +
                  ip_addr_t tcp_pcb_listen::local_ip
                  +
                  +

                  Common members of all PCB types

                  + +
                  +
                  + +

                  ◆ next

                  + +
                  +
                  + + + + +
                  struct tcp_pcb_listen* tcp_pcb_listen::next
                  +
                  +

                  Protocol specific PCB members

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file:
                    +
                  • src/include/lwip/tcp.h
                  • +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structtcp__pcb__listen.js b/Libraries/LwIP/doc/doxygen/output/html/structtcp__pcb__listen.js new file mode 100644 index 0000000..7df06d3 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structtcp__pcb__listen.js @@ -0,0 +1,5 @@ +var structtcp__pcb__listen = +[ + [ "local_ip", "structtcp__pcb__listen.html#a8a4f7b0551a0c6926a08ea5b6b3d5987", null ], + [ "next", "structtcp__pcb__listen.html#a0483d0c2a2758dcef18689be2efbdf34", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structtftp__context.html b/Libraries/LwIP/doc/doxygen/output/html/structtftp__context.html new file mode 100644 index 0000000..1db6561 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structtftp__context.html @@ -0,0 +1,210 @@ + + + + + + + +lwIP: tftp_context Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  tftp_context Struct Reference
                  +
                  +
                  + +

                  #include <tftp_server.h>

                  + + + + + + + + + + +

                  +Data Fields

                  void *(* open )(const char *fname, const char *mode, u8_t write)
                   
                  void(* close )(void *handle)
                   
                  int(* read )(void *handle, void *buf, int bytes)
                   
                  int(* write )(void *handle, struct pbuf *p)
                   
                  +

                  Detailed Description

                  +

                  TFTP context containing callback functions for TFTP transfers

                  +

                  Field Documentation

                  + +

                  ◆ close

                  + +
                  +
                  + + + + +
                  void(* tftp_context::close) (void *handle)
                  +
                  +

                  Close file handle

                  Parameters
                  + + +
                  handleFile handle returned by open()
                  +
                  +
                  + +
                  +
                  + +

                  ◆ open

                  + +
                  +
                  + + + + +
                  void*(* tftp_context::open) (const char *fname, const char *mode, u8_t write)
                  +
                  +

                  Open file for read/write.

                  Parameters
                  + + + + +
                  fnameFilename
                  modeMode string from TFTP RFC 1350 (netascii, octet, mail)
                  writeFlag indicating read (0) or write (!= 0) access
                  +
                  +
                  +
                  Returns
                  File handle supplied to other functions
                  + +
                  +
                  + +

                  ◆ read

                  + +
                  +
                  + + + + +
                  int(* tftp_context::read) (void *handle, void *buf, int bytes)
                  +
                  +

                  Read from file

                  Parameters
                  + + + + +
                  handleFile handle returned by open()
                  bufTarget buffer to copy read data to
                  bytesNumber of bytes to copy to buf
                  +
                  +
                  +
                  Returns
                  >= 0: Success; < 0: Error
                  + +
                  +
                  + +

                  ◆ write

                  + +
                  +
                  + + + + +
                  int(* tftp_context::write) (void *handle, struct pbuf *p)
                  +
                  +

                  Write to file

                  Parameters
                  + + + +
                  handleFile handle returned by open()
                  pbufPBUF adjusted such that payload pointer points to the beginning of write data. In other words, TFTP headers are stripped off.
                  +
                  +
                  +
                  Returns
                  >= 0: Success; < 0: Error
                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structtftp__context.js b/Libraries/LwIP/doc/doxygen/output/html/structtftp__context.js new file mode 100644 index 0000000..e42f4fd --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structtftp__context.js @@ -0,0 +1,7 @@ +var structtftp__context = +[ + [ "close", "structtftp__context.html#ae9181c57d1cf89bc263f7671e5630a65", null ], + [ "open", "structtftp__context.html#ae70d64e8e20328cc492d766506df4cba", null ], + [ "read", "structtftp__context.html#a748e37df0c8b84b3adda78d603b9033c", null ], + [ "write", "structtftp__context.html#a9e6e4ec803ec9597822923369701754d", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structthreadsync__data.html b/Libraries/LwIP/doc/doxygen/output/html/structthreadsync__data.html new file mode 100644 index 0000000..b97ca44 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structthreadsync__data.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: threadsync_data Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  threadsync_data Struct Reference
                  +
                  +
                  + +

                  #include <snmp_threadsync.h>

                  +

                  Detailed Description

                  +

                  Thread sync runtime data. For internal usage only.

                  +

                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structudp__pcb.html b/Libraries/LwIP/doc/doxygen/output/html/structudp__pcb.html new file mode 100644 index 0000000..01110d4 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structudp__pcb.html @@ -0,0 +1,250 @@ + + + + + + + +lwIP: udp_pcb Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  udp_pcb Struct Reference
                  +
                  +
                  + +

                  #include <udp.h>

                  + + + + + + + + + + + + + + + + + + +

                  +Data Fields

                  ip_addr_t local_ip
                   
                  u16_t local_port
                   
                  ip4_addr_t mcast_ip4
                   
                  u8_t mcast_ifindex
                   
                  u8_t mcast_ttl
                   
                  u16_t chksum_len_rx
                   
                  udp_recv_fn recv
                   
                  void * recv_arg
                   
                  +

                  Detailed Description

                  +

                  the UDP protocol control block

                  +

                  Field Documentation

                  + +

                  ◆ chksum_len_rx

                  + +
                  +
                  + + + + +
                  u16_t udp_pcb::chksum_len_rx
                  +
                  +

                  used for UDP_LITE only

                  + +
                  +
                  + +

                  ◆ local_ip

                  + +
                  +
                  + + + + +
                  ip_addr_t udp_pcb::local_ip
                  +
                  +

                  Common members of all PCB types

                  + +
                  +
                  + +

                  ◆ local_port

                  + +
                  +
                  + + + + +
                  u16_t udp_pcb::local_port
                  +
                  +

                  ports are in host byte order

                  + +
                  +
                  + +

                  ◆ mcast_ifindex

                  + +
                  +
                  + + + + +
                  u8_t udp_pcb::mcast_ifindex
                  +
                  +

                  outgoing network interface for multicast packets, by interface index (if nonzero)

                  + +
                  +
                  + +

                  ◆ mcast_ip4

                  + +
                  +
                  + + + + +
                  ip4_addr_t udp_pcb::mcast_ip4
                  +
                  +

                  outgoing network interface for multicast packets, by IPv4 address (if not 'any')

                  + +
                  +
                  + +

                  ◆ mcast_ttl

                  + +
                  +
                  + + + + +
                  u8_t udp_pcb::mcast_ttl
                  +
                  +

                  TTL for outgoing multicast packets

                  + +
                  +
                  + +

                  ◆ recv

                  + +
                  +
                  + + + + +
                  udp_recv_fn udp_pcb::recv
                  +
                  +

                  receive callback function

                  + +
                  +
                  + +

                  ◆ recv_arg

                  + +
                  +
                  + + + + +
                  void* udp_pcb::recv_arg
                  +
                  +

                  user-supplied argument for the recv callback

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file:
                    +
                  • src/include/lwip/udp.h
                  • +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structudp__pcb.js b/Libraries/LwIP/doc/doxygen/output/html/structudp__pcb.js new file mode 100644 index 0000000..6e9d47f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structudp__pcb.js @@ -0,0 +1,11 @@ +var structudp__pcb = +[ + [ "chksum_len_rx", "structudp__pcb.html#a5e2833df51760c83c6032608eb5d0d4d", null ], + [ "local_ip", "structudp__pcb.html#a6160ea5e52f0d33e51b16b853ea1cd63", null ], + [ "local_port", "structudp__pcb.html#a8cc805631142eefc5593ae8ba3302d7c", null ], + [ "mcast_ifindex", "structudp__pcb.html#ac80ae56333b88cea08bfa3563b0dd3cd", null ], + [ "mcast_ip4", "structudp__pcb.html#a1c32c7ebd76898cf8f1227c10d34dbe0", null ], + [ "mcast_ttl", "structudp__pcb.html#aaab9255f7f1186aef12d45c9bb90d3f4", null ], + [ "recv", "structudp__pcb.html#ac05dee75a3d6666267f7e626c2ec56a8", null ], + [ "recv_arg", "structudp__pcb.html#a11e4c40b8868aa40d923756a60598cab", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/structzepif__init.html b/Libraries/LwIP/doc/doxygen/output/html/structzepif__init.html new file mode 100644 index 0000000..4bc5d9c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structzepif__init.html @@ -0,0 +1,216 @@ + + + + + + + +lwIP: zepif_init Struct Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  zepif_init Struct Reference
                  +
                  +
                  + +

                  #include <zepif.h>

                  + + + + + + + + + + + + + + +

                  +Data Fields

                  u16_t zep_src_udp_port
                   
                  u16_t zep_dst_udp_port
                   
                  const ip_addr_tzep_src_ip_addr
                   
                  const ip_addr_tzep_dst_ip_addr
                   
                  const struct netifzep_netif
                   
                  u8_t addr [6]
                   
                  +

                  Detailed Description

                  +

                  Pass this struct as 'state' to netif_add to control the behaviour of this netif. If NULL is passed, default behaviour is chosen

                  +

                  Field Documentation

                  + +

                  ◆ addr

                  + +
                  +
                  + + + + +
                  u8_t zepif_init::addr[6]
                  +
                  +

                  MAC address of the 6LowPAN device

                  + +
                  +
                  + +

                  ◆ zep_dst_ip_addr

                  + +
                  +
                  + + + + +
                  const ip_addr_t* zepif_init::zep_dst_ip_addr
                  +
                  +

                  The IP address to sed ZEP frames to (NULL = BROADCAST)

                  + +
                  +
                  + +

                  ◆ zep_dst_udp_port

                  + +
                  +
                  + + + + +
                  u16_t zepif_init::zep_dst_udp_port
                  +
                  +

                  The UDP port used to ZEP frames to (0 = default)

                  + +
                  +
                  + +

                  ◆ zep_netif

                  + +
                  +
                  + + + + +
                  const struct netif* zepif_init::zep_netif
                  +
                  +

                  If != NULL, the udp pcb is bound to this netif

                  + +
                  +
                  + +

                  ◆ zep_src_ip_addr

                  + +
                  +
                  + + + + +
                  const ip_addr_t* zepif_init::zep_src_ip_addr
                  +
                  +

                  The IP address to sed ZEP frames from (NULL = ANY)

                  + +
                  +
                  + +

                  ◆ zep_src_udp_port

                  + +
                  +
                  + + + + +
                  u16_t zepif_init::zep_src_udp_port
                  +
                  +

                  The UDP port used to ZEP frames from (0 = default)

                  + +
                  +
                  +
                  The documentation for this struct was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/structzepif__init.js b/Libraries/LwIP/doc/doxygen/output/html/structzepif__init.js new file mode 100644 index 0000000..a79fe50 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/structzepif__init.js @@ -0,0 +1,9 @@ +var structzepif__init = +[ + [ "addr", "structzepif__init.html#a5a9a7ee6e687a7c1ae85b103d39de61d", null ], + [ "zep_dst_ip_addr", "structzepif__init.html#a851efb99a973348f1064a31b97ce779d", null ], + [ "zep_dst_udp_port", "structzepif__init.html#a86c6229ed3010158e601666afe91a286", null ], + [ "zep_netif", "structzepif__init.html#a3d97bf90b6bd4dd8258a3b1caf7890e3", null ], + [ "zep_src_ip_addr", "structzepif__init.html#adbe989f1f5cba623d742187def36f02c", null ], + [ "zep_src_udp_port", "structzepif__init.html#ad739032585841b126b4c0eab5899d40f", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/sys_8c.html b/Libraries/LwIP/doc/doxygen/output/html/sys_8c.html new file mode 100644 index 0000000..8f1f43a --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/sys_8c.html @@ -0,0 +1,112 @@ + + + + + + + +lwIP: src/core/sys.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  sys.c File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/sys.h"
                  +
                  + + + +

                  +Functions

                  void sys_msleep (u32_t ms)
                   
                  +

                  Detailed Description

                  +

                  lwIP Operating System abstraction

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/sys_8c.js b/Libraries/LwIP/doc/doxygen/output/html/sys_8c.js new file mode 100644 index 0000000..05b7660 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/sys_8c.js @@ -0,0 +1,4 @@ +var sys_8c = +[ + [ "sys_msleep", "group__sys__misc.html#ga6b8786f43e779953e8b74e983c88682e", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/sys_8h.html b/Libraries/LwIP/doc/doxygen/output/html/sys_8h.html new file mode 100644 index 0000000..7e45e18 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/sys_8h.html @@ -0,0 +1,403 @@ + + + + + + + +lwIP: src/include/lwip/sys.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  sys.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/err.h"
                  +#include "arch/sys_arch.h"
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Macros

                  #define SYS_ARCH_TIMEOUT   0xffffffffUL
                   
                  #define SYS_MBOX_EMPTY   SYS_ARCH_TIMEOUT
                   
                  #define LWIP_COMPAT_MUTEX   0
                   
                  #define sys_sem_wait(sem)   sys_arch_sem_wait(sem, 0)
                   
                  #define sys_sem_valid_val(sem)   sys_sem_valid(&(sem))
                   
                  #define sys_sem_set_invalid_val(sem)   sys_sem_set_invalid(&(sem))
                   
                  #define sys_mbox_tryfetch(mbox, msg)   sys_arch_mbox_tryfetch(mbox, msg)
                   
                  #define sys_mbox_valid_val(mbox)   sys_mbox_valid(&(mbox))
                   
                  #define sys_mbox_set_invalid_val(mbox)   sys_mbox_set_invalid(&(mbox))
                   
                  #define SYS_ARCH_DECL_PROTECT(lev)   sys_prot_t lev
                   
                  #define SYS_ARCH_PROTECT(lev)   lev = sys_arch_protect()
                   
                  #define SYS_ARCH_UNPROTECT(lev)   sys_arch_unprotect(lev)
                   
                  + + + +

                  +Typedefs

                  typedef void(* lwip_thread_fn) (void *arg)
                   
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  err_t sys_mutex_new (sys_mutex_t *mutex)
                   
                  void sys_mutex_lock (sys_mutex_t *mutex)
                   
                  void sys_mutex_unlock (sys_mutex_t *mutex)
                   
                  void sys_mutex_free (sys_mutex_t *mutex)
                   
                  int sys_mutex_valid (sys_mutex_t *mutex)
                   
                  void sys_mutex_set_invalid (sys_mutex_t *mutex)
                   
                  err_t sys_sem_new (sys_sem_t *sem, u8_t count)
                   
                  void sys_sem_signal (sys_sem_t *sem)
                   
                  u32_t sys_arch_sem_wait (sys_sem_t *sem, u32_t timeout)
                   
                  void sys_sem_free (sys_sem_t *sem)
                   
                  int sys_sem_valid (sys_sem_t *sem)
                   
                  void sys_sem_set_invalid (sys_sem_t *sem)
                   
                  void sys_msleep (u32_t ms)
                   
                  err_t sys_mbox_new (sys_mbox_t *mbox, int size)
                   
                  void sys_mbox_post (sys_mbox_t *mbox, void *msg)
                   
                  err_t sys_mbox_trypost (sys_mbox_t *mbox, void *msg)
                   
                  err_t sys_mbox_trypost_fromisr (sys_mbox_t *mbox, void *msg)
                   
                  u32_t sys_arch_mbox_fetch (sys_mbox_t *mbox, void **msg, u32_t timeout)
                   
                  u32_t sys_arch_mbox_tryfetch (sys_mbox_t *mbox, void **msg)
                   
                  void sys_mbox_free (sys_mbox_t *mbox)
                   
                  int sys_mbox_valid (sys_mbox_t *mbox)
                   
                  void sys_mbox_set_invalid (sys_mbox_t *mbox)
                   
                  sys_thread_t sys_thread_new (const char *name, lwip_thread_fn thread, void *arg, int stacksize, int prio)
                   
                  void sys_init (void)
                   
                  u32_t sys_jiffies (void)
                   
                  u32_t sys_now (void)
                   
                  +

                  Detailed Description

                  +

                  OS abstraction layer

                  +

                  Macro Definition Documentation

                  + +

                  ◆ LWIP_COMPAT_MUTEX

                  + +
                  +
                  + + + + +
                  #define LWIP_COMPAT_MUTEX   0
                  +
                  +

                  Define LWIP_COMPAT_MUTEX if the port has no mutexes and binary semaphores should be used instead

                  + +
                  +
                  + +

                  ◆ SYS_ARCH_TIMEOUT

                  + +
                  +
                  + + + + +
                  #define SYS_ARCH_TIMEOUT   0xffffffffUL
                  +
                  +

                  Return code for timeouts from sys_arch_mbox_fetch and sys_arch_sem_wait

                  + +
                  +
                  + +

                  ◆ SYS_MBOX_EMPTY

                  + +
                  +
                  + + + + +
                  #define SYS_MBOX_EMPTY   SYS_ARCH_TIMEOUT
                  +
                  +

                  sys_mbox_tryfetch() returns SYS_MBOX_EMPTY if appropriate. For now we use the same magic value, but we allow this to change in future.

                  + +
                  +
                  + +

                  ◆ sys_mbox_set_invalid_val

                  + +
                  +
                  + + + + + + + + +
                  #define sys_mbox_set_invalid_val( mbox)   sys_mbox_set_invalid(&(mbox))
                  +
                  +

                  Same as sys_mbox_set_invalid() but taking a value, not a pointer

                  + +
                  +
                  + +

                  ◆ sys_mbox_tryfetch

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  #define sys_mbox_tryfetch( mbox,
                   msg 
                  )   sys_arch_mbox_tryfetch(mbox, msg)
                  +
                  +

                  For now, we map straight to sys_arch implementation.

                  + +
                  +
                  + +

                  ◆ sys_mbox_valid_val

                  + +
                  +
                  + + + + + + + + +
                  #define sys_mbox_valid_val( mbox)   sys_mbox_valid(&(mbox))
                  +
                  +

                  Same as sys_mbox_valid() but taking a value, not a pointer

                  + +
                  +
                  + +

                  ◆ sys_sem_set_invalid_val

                  + +
                  +
                  + + + + + + + + +
                  #define sys_sem_set_invalid_val( sem)   sys_sem_set_invalid(&(sem))
                  +
                  +

                  Same as sys_sem_set_invalid() but taking a value, not a pointer

                  + +
                  +
                  + +

                  ◆ sys_sem_valid_val

                  + +
                  +
                  + + + + + + + + +
                  #define sys_sem_valid_val( sem)   sys_sem_valid(&(sem))
                  +
                  +

                  Same as sys_sem_valid() but taking a value, not a pointer

                  + +
                  +
                  + +

                  ◆ sys_sem_wait

                  + +
                  +
                  + + + + + + + + +
                  #define sys_sem_wait( sem)   sys_arch_sem_wait(sem, 0)
                  +
                  +

                  Wait for a semaphore - forever/no timeout

                  + +
                  +
                  +

                  Typedef Documentation

                  + +

                  ◆ lwip_thread_fn

                  + +
                  +
                  + + + + +
                  typedef void(* lwip_thread_fn) (void *arg)
                  +
                  +

                  Function prototype for thread functions

                  + +
                  +
                  +

                  Function Documentation

                  + +

                  ◆ sys_jiffies()

                  + +
                  +
                  + + + + + + + + +
                  u32_t sys_jiffies (void )
                  +
                  +

                  Ticks/jiffies since power up.

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/sys_8h.js b/Libraries/LwIP/doc/doxygen/output/html/sys_8h.js new file mode 100644 index 0000000..54279aa --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/sys_8h.js @@ -0,0 +1,42 @@ +var sys_8h = +[ + [ "LWIP_COMPAT_MUTEX", "sys_8h.html#a7bada49634cd3b28b28bdcedd763a1e6", null ], + [ "SYS_ARCH_DECL_PROTECT", "group__sys__prot.html#ga945395fa326214fc9736487242710a90", null ], + [ "SYS_ARCH_PROTECT", "group__sys__prot.html#ga3d0e48feafd378e9c26c64567ecd8bab", null ], + [ "SYS_ARCH_TIMEOUT", "sys_8h.html#ac1495030a8ab5e1f3c89e42ced527c5b", null ], + [ "SYS_ARCH_UNPROTECT", "group__sys__prot.html#ga2f48e97047945642ddeb27e65bf4ffe2", null ], + [ "SYS_MBOX_EMPTY", "sys_8h.html#ab0571e67edca0132b144106e9b319ef9", null ], + [ "sys_mbox_set_invalid_val", "sys_8h.html#ae293feebb61d36f2db99be53702b8203", null ], + [ "sys_mbox_tryfetch", "sys_8h.html#ab7841780b31ba9c0a39a440aad1fca13", null ], + [ "sys_mbox_valid_val", "sys_8h.html#aae82640d0bdbeec7b9b6511b3f8d99cb", null ], + [ "sys_sem_set_invalid_val", "sys_8h.html#a2556e570f6973a6f4d57d0e76ef190d8", null ], + [ "sys_sem_valid_val", "sys_8h.html#a9e8ad541356786936f23ab83b8f550cc", null ], + [ "sys_sem_wait", "sys_8h.html#a84e7e4bc00255aee84e6e7289a985703", null ], + [ "lwip_thread_fn", "sys_8h.html#ae30a77bf6bd69bfcc5f235eaad54f2b9", null ], + [ "sys_arch_mbox_fetch", "group__sys__mbox.html#ga6464cd77cf6799bd8b3d6c840166a2e8", null ], + [ "sys_arch_mbox_tryfetch", "group__sys__mbox.html#gafab441b130b4ec417012835dbe1e497c", null ], + [ "sys_arch_sem_wait", "group__sys__sem.html#ga8d364c5037778acb21c3df675db81b4f", null ], + [ "sys_init", "group__sys__misc.html#gaf411a8bc6b7ed4b0af9114e10c959448", null ], + [ "sys_jiffies", "sys_8h.html#ac89f307e8b360eaf821b461a4f26753a", null ], + [ "sys_mbox_free", "group__sys__mbox.html#gac641a45812155d2234ef80dd6412882f", null ], + [ "sys_mbox_new", "group__sys__mbox.html#gab9793f30642de06ce87827e9adbe30cc", null ], + [ "sys_mbox_post", "group__sys__mbox.html#ga9d068386a3c53dd01b8af99c3ef77555", null ], + [ "sys_mbox_set_invalid", "group__sys__mbox.html#ga53ddec9d7f5500c5b1d982cd17493172", null ], + [ "sys_mbox_trypost", "group__sys__mbox.html#gaa36345e48a49d67cbb0878cd4cbd2195", null ], + [ "sys_mbox_trypost_fromisr", "group__sys__mbox.html#gaf677a6e76adb7650a3020fdb3cb8429a", null ], + [ "sys_mbox_valid", "group__sys__mbox.html#ga8bcfab4bd791dd33f69a778e7585275d", null ], + [ "sys_msleep", "group__sys__misc.html#ga6b8786f43e779953e8b74e983c88682e", null ], + [ "sys_mutex_free", "group__sys__mutex.html#ga16336ce68b741e98204102ca4bc84dd9", null ], + [ "sys_mutex_lock", "group__sys__mutex.html#ga4d4eb9afe5965fa2661dd54ff55d616a", null ], + [ "sys_mutex_new", "group__sys__mutex.html#ga38e7dae1fd88b338eb1cd97f110f3897", null ], + [ "sys_mutex_set_invalid", "group__sys__mutex.html#ga3f392725971dc837aa56dd7e45fa7ca8", null ], + [ "sys_mutex_unlock", "group__sys__mutex.html#ga5568f68898fe9d5735f9ce2f665624fb", null ], + [ "sys_mutex_valid", "group__sys__mutex.html#gaebe83ba90a6d9c23cdb3eb5d49562c4a", null ], + [ "sys_now", "group__sys__time.html#ga11316ac1e77418c6fa4ab8869e3fa199", null ], + [ "sys_sem_free", "group__sys__sem.html#ga83b781f96c30e915c752065a757da283", null ], + [ "sys_sem_new", "group__sys__sem.html#gaf99da9e34a71855285c535183133dfde", null ], + [ "sys_sem_set_invalid", "group__sys__sem.html#ga42a2ab32afbf41a4146a9d135224ef33", null ], + [ "sys_sem_signal", "group__sys__sem.html#gaaf800273061fcc3f8200fd4e1b9ca875", null ], + [ "sys_sem_valid", "group__sys__sem.html#ga09a6c052ddaf799139efc56adfa087e4", null ], + [ "sys_thread_new", "group__sys__misc.html#ga0d596afdd8dbcfad320172d39b0f607a", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/sys_init.html b/Libraries/LwIP/doc/doxygen/output/html/sys_init.html new file mode 100644 index 0000000..174b537 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/sys_init.html @@ -0,0 +1,116 @@ + + + + + + + +lwIP: System initalization + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  System initalization
                  +
                  +
                  +

                  A truly complete and generic sequence for initializing the lwIP stack cannot be given because it depends on additional initializations for your runtime environment (e.g. timers).

                  +

                  We can give you some idea on how to proceed when using the raw API. We assume a configuration using a single Ethernet netif and the UDP and TCP transport layers, IPv4 and the DHCP client.

                  +

                  Call these functions in the order of appearance:

                  +
                    +
                  • lwip_init(): Initialize the lwIP stack and all of its subsystems.
                  • +
                  • netif_add(struct netif *netif, ...): Adds your network interface to the netif_list. Allocate a struct netif and pass a pointer to this structure as the first argument. Give pointers to cleared ip_addr structures when using DHCP, or fill them with sane numbers otherwise. The state pointer may be NULL.

                    +

                    The init function pointer must point to a initialization function for your Ethernet netif interface. The following code illustrates its use.

                    +
                  • +
                  +
                  err_t netif_if_init(struct netif *netif)
                  {
                  u8_t i;
                  for (i = 0; i < ETHARP_HWADDR_LEN; i++) {
                  netif->hwaddr[i] = some_eth_addr[i];
                  }
                  init_my_eth_device();
                  return ERR_OK;
                  }

                  For Ethernet drivers, the input function pointer must point to the lwIP function ethernet_input() declared in "netif/etharp.h". Other drivers must use ip_input() declared in "lwip/ip.h".

                  +
                    +
                  • netif_set_default(struct netif *netif) Registers the default network interface.
                  • +
                  • netif_set_link_up(struct netif *netif) This is the hardware link state; e.g. whether cable is plugged for wired Ethernet interface. This function must be called even if you don't know the current state. Having link up and link down events is optional but DHCP and IPv6 discover benefit well from those events.
                  • +
                  • netif_set_up(struct netif *netif) This is the administrative (= software) state of the netif, when the netif is fully configured this function must be called.
                  • +
                  • dhcp_start(struct netif *netif) Creates a new DHCP client for this interface on the first call. You can peek in the netif->dhcp struct for the actual DHCP status.
                  • +
                  • sys_check_timeouts() When the system is running, you have to periodically call sys_check_timeouts() which will handle all timers for all protocols in the stack; add this to your main loop or equivalent.
                  • +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/tabs.css b/Libraries/LwIP/doc/doxygen/output/html/tabs.css new file mode 100644 index 0000000..a28614b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/tabs.css @@ -0,0 +1 @@ +.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#doc-content{overflow:auto;display:block;padding:0;margin:0;-webkit-overflow-scrolling:touch}.sm-dox{background-image:url("tab_b.png")}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:"Lucida Grande","Geneva","Helvetica",Arial,sans-serif;font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:0 1px 1px rgba(255,255,255,0.9);color:#283a5d;outline:0}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace!important;text-align:center;text-shadow:none;background:rgba(255,255,255,0.5);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:rgba(162,162,162,0.1)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:white;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:url("tab_b.png");line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:#283a5d transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:url("tab_s.png");background-repeat:no-repeat;background-position:right;-moz-border-radius:0!important;-webkit-border-radius:0;border-radius:0!important}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a:hover span.sub-arrow{border-color:white transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent #fff transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:#fff;-moz-border-radius:5px!important;-webkit-border-radius:5px;border-radius:5px!important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent #555;border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:#555;background-image:none;border:0!important;color:#555;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent white}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:#fff;height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent #555 transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:#555 transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px!important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:url("tab_b.png")}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:#fff}} \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/tcp_8c.html b/Libraries/LwIP/doc/doxygen/output/html/tcp_8c.html new file mode 100644 index 0000000..11bfe8d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/tcp_8c.html @@ -0,0 +1,855 @@ + + + + + + + +lwIP: src/core/tcp.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  tcp.c File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/def.h"
                  +#include "lwip/mem.h"
                  +#include "lwip/memp.h"
                  +#include "lwip/tcp.h"
                  +#include "lwip/priv/tcp_priv.h"
                  +#include "lwip/debug.h"
                  +#include "lwip/stats.h"
                  +#include "lwip/ip6.h"
                  +#include "lwip/ip6_addr.h"
                  +#include "lwip/nd6.h"
                  +#include <string.h>
                  +#include "path/to/my/lwip_hooks.h"
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  void tcp_init (void)
                   
                  void tcp_free (struct tcp_pcb *pcb)
                   
                  void tcp_tmr (void)
                   
                  void tcp_backlog_delayed (struct tcp_pcb *pcb)
                   
                  void tcp_backlog_accepted (struct tcp_pcb *pcb)
                   
                  err_t tcp_close (struct tcp_pcb *pcb)
                   
                  err_t tcp_shutdown (struct tcp_pcb *pcb, int shut_rx, int shut_tx)
                   
                  void tcp_abandon (struct tcp_pcb *pcb, int reset)
                   
                  void tcp_abort (struct tcp_pcb *pcb)
                   
                  err_t tcp_bind (struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port)
                   
                  void tcp_bind_netif (struct tcp_pcb *pcb, const struct netif *netif)
                   
                  struct tcp_pcbtcp_listen_with_backlog (struct tcp_pcb *pcb, u8_t backlog)
                   
                  struct tcp_pcbtcp_listen_with_backlog_and_err (struct tcp_pcb *pcb, u8_t backlog, err_t *err)
                   
                  u32_t tcp_update_rcv_ann_wnd (struct tcp_pcb *pcb)
                   
                  void tcp_recved (struct tcp_pcb *pcb, u16_t len)
                   
                  err_t tcp_connect (struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port, tcp_connected_fn connected)
                   
                  void tcp_slowtmr (void)
                   
                  void tcp_fasttmr (void)
                   
                  void tcp_txnow (void)
                   
                  err_t tcp_process_refused_data (struct tcp_pcb *pcb)
                   
                  void tcp_segs_free (struct tcp_seg *seg)
                   
                  void tcp_seg_free (struct tcp_seg *seg)
                   
                  void tcp_setprio (struct tcp_pcb *pcb, u8_t prio)
                   
                  struct tcp_seg * tcp_seg_copy (struct tcp_seg *seg)
                   
                  err_t tcp_recv_null (void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err)
                   
                  struct tcp_pcbtcp_alloc (u8_t prio)
                   
                  struct tcp_pcbtcp_new (void)
                   
                  struct tcp_pcbtcp_new_ip_type (u8_t type)
                   
                  void tcp_arg (struct tcp_pcb *pcb, void *arg)
                   
                  void tcp_recv (struct tcp_pcb *pcb, tcp_recv_fn recv)
                   
                  void tcp_sent (struct tcp_pcb *pcb, tcp_sent_fn sent)
                   
                  void tcp_err (struct tcp_pcb *pcb, tcp_err_fn err)
                   
                  void tcp_accept (struct tcp_pcb *pcb, tcp_accept_fn accept)
                   
                  void tcp_poll (struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval)
                   
                  void tcp_pcb_purge (struct tcp_pcb *pcb)
                   
                  void tcp_pcb_remove (struct tcp_pcb **pcblist, struct tcp_pcb *pcb)
                   
                  u32_t tcp_next_iss (struct tcp_pcb *pcb)
                   
                  u16_t tcp_eff_send_mss_netif (u16_t sendmss, struct netif *outif, const ip_addr_t *dest)
                   
                  void tcp_netif_ip_addr_changed (const ip_addr_t *old_addr, const ip_addr_t *new_addr)
                   
                  u8_t tcp_ext_arg_alloc_id (void)
                   
                  void tcp_ext_arg_set_callbacks (struct tcp_pcb *pcb, uint8_t id, const struct tcp_ext_arg_callbacks *const callbacks)
                   
                  void tcp_ext_arg_set (struct tcp_pcb *pcb, uint8_t id, void *arg)
                   
                  void * tcp_ext_arg_get (const struct tcp_pcb *pcb, uint8_t id)
                   
                  err_t tcp_ext_arg_invoke_callbacks_passive_open (struct tcp_pcb_listen *lpcb, struct tcp_pcb *cpcb)
                   
                  + + + + + + + + + + + +

                  +Variables

                  struct tcp_pcbtcp_bound_pcbs
                   
                  union tcp_listen_pcbs_t tcp_listen_pcbs
                   
                  struct tcp_pcbtcp_active_pcbs
                   
                  struct tcp_pcbtcp_tw_pcbs
                   
                  struct tcp_pcb **const tcp_pcb_lists []
                   
                  +

                  Detailed Description

                  +

                  Transmission Control Protocol for IP See also TCP

                  +

                  Function Documentation

                  + +

                  ◆ tcp_abandon()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void tcp_abandon (struct tcp_pcbpcb,
                  int reset 
                  )
                  +
                  +

                  Abandons a connection and optionally sends a RST to the remote host. Deletes the local protocol control block. This is done when a connection is killed because of shortage of memory.

                  +
                  Parameters
                  + + + +
                  pcbthe tcp_pcb to abort
                  resetboolean to indicate whether a reset should be sent
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_alloc()

                  + +
                  +
                  + + + + + + + + +
                  struct tcp_pcb* tcp_alloc (u8_t prio)
                  +
                  +

                  Allocate a new tcp_pcb structure.

                  +
                  Parameters
                  + + +
                  priopriority for the new pcb
                  +
                  +
                  +
                  Returns
                  a new tcp_pcb that initially is in state CLOSED
                  + +
                  +
                  + +

                  ◆ tcp_eff_send_mss_netif()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  u16_t tcp_eff_send_mss_netif (u16_t sendmss,
                  struct netifoutif,
                  const ip_addr_tdest 
                  )
                  +
                  +

                  Calculates the effective send mss that can be used for a specific IP address by calculating the minimum of TCP_MSS and the mtu (if set) of the target netif (if not NULL).

                  + +
                  +
                  + +

                  ◆ tcp_ext_arg_invoke_callbacks_passive_open()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  err_t tcp_ext_arg_invoke_callbacks_passive_open (struct tcp_pcb_listenlpcb,
                  struct tcp_pcbcpcb 
                  )
                  +
                  +

                  This function calls the "passive_open" callback for all ext_args if a connection is in the process of being accepted. This is called just after the SYN is received and before a SYN/ACK is sent, to allow to modify the very first segment sent even on passive open. Naturally, the "accepted" callback of the pcb has not been called yet!

                  + +
                  +
                  + +

                  ◆ tcp_fasttmr()

                  + +
                  +
                  + + + + + + + + +
                  void tcp_fasttmr (void )
                  +
                  +

                  Is called every TCP_FAST_INTERVAL (250 ms) and process data previously "refused" by upper layer (application) and sends delayed ACKs or pending FINs.

                  +

                  Automatically called from tcp_tmr().

                  + +
                  +
                  + +

                  ◆ tcp_free()

                  + +
                  +
                  + + + + + + + + +
                  void tcp_free (struct tcp_pcbpcb)
                  +
                  +

                  Free a tcp pcb

                  + +
                  +
                  + +

                  ◆ tcp_init()

                  + +
                  +
                  + + + + + + + + +
                  void tcp_init (void )
                  +
                  +

                  Initialize this module.

                  + +
                  +
                  + +

                  ◆ tcp_netif_ip_addr_changed()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void tcp_netif_ip_addr_changed (const ip_addr_told_addr,
                  const ip_addr_tnew_addr 
                  )
                  +
                  +

                  This function is called from netif.c when address is changed or netif is removed

                  +
                  Parameters
                  + + + +
                  old_addrIP address of the netif before change
                  new_addrIP address of the netif after change or NULL if netif has been removed
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_next_iss()

                  + +
                  +
                  + + + + + + + + +
                  u32_t tcp_next_iss (struct tcp_pcbpcb)
                  +
                  +

                  Calculates a new initial sequence number for new connections.

                  +
                  Returns
                  u32_t pseudo random sequence number
                  + +
                  +
                  + +

                  ◆ tcp_pcb_purge()

                  + +
                  +
                  + + + + + + + + +
                  void tcp_pcb_purge (struct tcp_pcbpcb)
                  +
                  +

                  Purges a TCP PCB. Removes any buffered data and frees the buffer memory (pcb->ooseq, pcb->unsent and pcb->unacked are freed).

                  +
                  Parameters
                  + + +
                  pcbtcp_pcb to purge. The pcb itself is not deallocated!
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_pcb_remove()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void tcp_pcb_remove (struct tcp_pcb ** pcblist,
                  struct tcp_pcbpcb 
                  )
                  +
                  +

                  Purges the PCB and removes it from a PCB list. Any delayed ACKs are sent first.

                  +
                  Parameters
                  + + + +
                  pcblistPCB list to purge.
                  pcbtcp_pcb to purge. The pcb itself is NOT deallocated!
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_process_refused_data()

                  + +
                  +
                  + + + + + + + + +
                  err_t tcp_process_refused_data (struct tcp_pcbpcb)
                  +
                  +

                  Pass pcb->refused_data to the recv callback

                  + +
                  +
                  + +

                  ◆ tcp_recv_null()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t tcp_recv_null (void * arg,
                  struct tcp_pcbpcb,
                  struct pbufp,
                  err_t err 
                  )
                  +
                  +

                  Default receive callback that is called if the user didn't register a recv callback for the pcb.

                  + +
                  +
                  + +

                  ◆ tcp_seg_copy()

                  + +
                  +
                  + + + + + + + + +
                  struct tcp_seg* tcp_seg_copy (struct tcp_seg * seg)
                  +
                  +

                  Returns a copy of the given TCP segment. The pbuf and data are not copied, only the pointers

                  +
                  Parameters
                  + + +
                  segthe old tcp_seg
                  +
                  +
                  +
                  Returns
                  a copy of seg
                  + +
                  +
                  + +

                  ◆ tcp_seg_free()

                  + +
                  +
                  + + + + + + + + +
                  void tcp_seg_free (struct tcp_seg * seg)
                  +
                  +

                  Frees a TCP segment (tcp_seg structure).

                  +
                  Parameters
                  + + +
                  segsingle tcp_seg to free
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_segs_free()

                  + +
                  +
                  + + + + + + + + +
                  void tcp_segs_free (struct tcp_seg * seg)
                  +
                  +

                  Deallocates a list of TCP segments (tcp_seg structures).

                  +
                  Parameters
                  + + +
                  segtcp_seg list of TCP segments to free
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_setprio()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void tcp_setprio (struct tcp_pcbpcb,
                  u8_t prio 
                  )
                  +
                  +

                  Sets the priority of a connection.

                  +
                  Parameters
                  + + + +
                  pcbthe tcp_pcb to manipulate
                  prionew priority
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_slowtmr()

                  + +
                  +
                  + + + + + + + + +
                  void tcp_slowtmr (void )
                  +
                  +

                  Called every 500 ms and implements the retransmission timer and the timer that removes PCBs that have been in TIME-WAIT for enough time. It also increments various timers such as the inactivity timer in each PCB.

                  +

                  Automatically called from tcp_tmr().

                  + +
                  +
                  + +

                  ◆ tcp_tmr()

                  + +
                  +
                  + + + + + + + + +
                  void tcp_tmr (void )
                  +
                  +

                  Called periodically to dispatch TCP timers.

                  + +
                  +
                  + +

                  ◆ tcp_txnow()

                  + +
                  +
                  + + + + + + + + +
                  void tcp_txnow (void )
                  +
                  +

                  Call tcp_output for all active pcbs that have TF_NAGLEMEMERR set

                  + +
                  +
                  + +

                  ◆ tcp_update_rcv_ann_wnd()

                  + +
                  +
                  + + + + + + + + +
                  u32_t tcp_update_rcv_ann_wnd (struct tcp_pcbpcb)
                  +
                  +

                  Update the state that tracks the available window space to advertise.

                  +

                  Returns how much extra window would be advertised if we sent an update now.

                  + +
                  +
                  +

                  Variable Documentation

                  + +

                  ◆ tcp_active_pcbs

                  + +
                  +
                  + + + + +
                  struct tcp_pcb* tcp_active_pcbs
                  +
                  +

                  List of all TCP PCBs that are in a state in which they accept or send data.

                  + +
                  +
                  + +

                  ◆ tcp_bound_pcbs

                  + +
                  +
                  + + + + +
                  struct tcp_pcb* tcp_bound_pcbs
                  +
                  +

                  List of all TCP PCBs bound but not yet (connected || listening)

                  + +
                  +
                  + +

                  ◆ tcp_listen_pcbs

                  + +
                  +
                  + + + + +
                  union tcp_listen_pcbs_t tcp_listen_pcbs
                  +
                  +

                  List of all TCP PCBs in LISTEN state

                  + +
                  +
                  + +

                  ◆ tcp_pcb_lists

                  + +
                  +
                  + + + + +
                  struct tcp_pcb** const tcp_pcb_lists[]
                  +
                  +Initial value:
                  }
                  struct tcp_pcb * tcp_bound_pcbs
                  Definition: tcp.c:171
                  +
                  struct tcp_pcb * tcp_tw_pcbs
                  Definition: tcp.c:178
                  +
                  struct tcp_pcb * tcp_active_pcbs
                  Definition: tcp.c:176
                  +
                  union tcp_listen_pcbs_t tcp_listen_pcbs
                  Definition: tcp.c:173
                  +

                  An array with all (non-temporary) PCB lists, mainly used for smaller code size

                  + +
                  +
                  + +

                  ◆ tcp_tw_pcbs

                  + +
                  +
                  + + + + +
                  struct tcp_pcb* tcp_tw_pcbs
                  +
                  +

                  List of all TCP PCBs in TIME-WAIT state

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/tcp_8c.js b/Libraries/LwIP/doc/doxygen/output/html/tcp_8c.js new file mode 100644 index 0000000..4923436 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/tcp_8c.js @@ -0,0 +1,52 @@ +var tcp_8c = +[ + [ "tcp_abandon", "tcp_8c.html#ae4f0f1ca01dbccd680eaa2d8433cd7fe", null ], + [ "tcp_abort", "group__tcp__raw.html#ga468c2260ddb01582e966ddcf3c25ce61", null ], + [ "tcp_accept", "group__tcp__raw.html#gaff4c3e380fc60c8fb9b3aa95eda94c62", null ], + [ "tcp_alloc", "tcp_8c.html#a1dd6830a42b3c464b5a72f62ae312d0a", null ], + [ "tcp_arg", "group__tcp__raw.html#gac10926e6f76f73e17c0d37aaab3e56b6", null ], + [ "tcp_backlog_accepted", "group__tcp__raw.html#ga619154658137a23839ca3b94882131ca", null ], + [ "tcp_backlog_delayed", "group__tcp__raw.html#ga427b11c7b98c748ec487cd43093bd2f8", null ], + [ "tcp_bind", "group__tcp__raw.html#gacf5aa67bd7fc66fef43f77a55a1201ee", null ], + [ "tcp_bind_netif", "group__tcp__raw.html#ga6469a15709088e80024258dbe80fcd1f", null ], + [ "tcp_close", "group__tcp__raw.html#ga87093e137fcc53ea82a134a3f5b33623", null ], + [ "tcp_connect", "group__tcp__raw.html#ga9a31deea4cadacd39f9485f37cfdd012", null ], + [ "tcp_eff_send_mss_netif", "tcp_8c.html#a08a3b5396c40f32dd8b21e7d63b3e1b3", null ], + [ "tcp_err", "group__tcp__raw.html#gae1346c4e34d3bc7c01e1b47142ab3121", null ], + [ "tcp_ext_arg_alloc_id", "group__tcp__raw__extargs.html#ga4836e0b4f66439493e106a50400d1616", null ], + [ "tcp_ext_arg_get", "group__tcp__raw__extargs.html#gaa8ac7a74407cb3e0e01a30314805f990", null ], + [ "tcp_ext_arg_invoke_callbacks_passive_open", "tcp_8c.html#a5265b1df024d04287ed3edc02b1b9ccc", null ], + [ "tcp_ext_arg_set", "group__tcp__raw__extargs.html#ga58500cb2ce22438e16a37373595af318", null ], + [ "tcp_ext_arg_set_callbacks", "group__tcp__raw__extargs.html#ga36e60dc02bfe0437c8da368a62e2f316", null ], + [ "tcp_fasttmr", "tcp_8c.html#abf446b07e52161b8a53cea07bc6c366d", null ], + [ "tcp_free", "tcp_8c.html#aa2b6b075c27c64dfb8c402ac961fb910", null ], + [ "tcp_init", "tcp_8c.html#a51de4ded7d342456d31722493c92c969", null ], + [ "tcp_listen_with_backlog", "group__tcp__raw.html#gaeff14f321d1eecd0431611f382fcd338", null ], + [ "tcp_listen_with_backlog_and_err", "group__tcp__raw.html#gac86ad8ded4d1db15a5b5fb42eb7c1436", null ], + [ "tcp_netif_ip_addr_changed", "tcp_8c.html#a4d0c2d1ad02134c79fc72fe95ee2a703", null ], + [ "tcp_new", "group__tcp__raw.html#ga7427c5d237fe66a8097bfa8d24ceb943", null ], + [ "tcp_new_ip_type", "group__tcp__raw.html#gac14e757a21a4a87c6aa52372c210b937", null ], + [ "tcp_next_iss", "tcp_8c.html#afd5dc2fa74855a84b2da642ba31059ea", null ], + [ "tcp_pcb_purge", "tcp_8c.html#a44fc672b9d14a65e61040707c45302ba", null ], + [ "tcp_pcb_remove", "tcp_8c.html#aaaef096f6a03bf5b778329bb66ee06f6", null ], + [ "tcp_poll", "group__tcp__raw.html#gafba47015098ed7ce523dcf7bdf70f7e5", null ], + [ "tcp_process_refused_data", "tcp_8c.html#a0075b56ad4b0eca7c9d439cf150e1973", null ], + [ "tcp_recv", "group__tcp__raw.html#ga8afd0b316a87a5eeff4726dc95006ed0", null ], + [ "tcp_recv_null", "tcp_8c.html#a0cb3f604fc8d20870d8cab291da5701c", null ], + [ "tcp_recved", "group__tcp__raw.html#gabdac0856a52b5789dc897d4c7137ec44", null ], + [ "tcp_seg_copy", "tcp_8c.html#a569d79451d2570e4ef406775725ef6ef", null ], + [ "tcp_seg_free", "tcp_8c.html#ac6283651b26f74dba2444159aee88b20", null ], + [ "tcp_segs_free", "tcp_8c.html#a3d9bb9809769197bce9b2499d55cf28c", null ], + [ "tcp_sent", "group__tcp__raw.html#ga1596332b93bb6249179f3b89f24bd808", null ], + [ "tcp_setprio", "tcp_8c.html#a2c4234f1e95b6bde0e84d4ea97ae95bc", null ], + [ "tcp_shutdown", "group__tcp__raw.html#ga5b94d57f1891b9287f88525a2ac561dd", null ], + [ "tcp_slowtmr", "tcp_8c.html#a421fb42ef919018e14ae413adfee9905", null ], + [ "tcp_tmr", "tcp_8c.html#a3846a756b13214ed88ea47d0ff8279eb", null ], + [ "tcp_txnow", "tcp_8c.html#a5ae0268e59fda0665fdd08c6e77ec547", null ], + [ "tcp_update_rcv_ann_wnd", "tcp_8c.html#a6d2c254b779db4e517cb34e41301588d", null ], + [ "tcp_active_pcbs", "tcp_8c.html#a78c09dbae67ccc06b659d9f1a388f911", null ], + [ "tcp_bound_pcbs", "tcp_8c.html#a1b42a7ac0fc173a42d575f86853d32a8", null ], + [ "tcp_listen_pcbs", "tcp_8c.html#a96fe1350e510d4308ac9969ffb4c9c81", null ], + [ "tcp_pcb_lists", "tcp_8c.html#a51515507dec664e9d69a870e6b627610", null ], + [ "tcp_tw_pcbs", "tcp_8c.html#a9a522a66c5e1f1a4e28fe7a672cc64e3", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/tcp_8h.html b/Libraries/LwIP/doc/doxygen/output/html/tcp_8h.html new file mode 100644 index 0000000..27872f1 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/tcp_8h.html @@ -0,0 +1,501 @@ + + + + + + + +lwIP: src/include/lwip/tcp.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  tcp.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/tcpbase.h"
                  +#include "lwip/mem.h"
                  +#include "lwip/pbuf.h"
                  +#include "lwip/ip.h"
                  +#include "lwip/icmp.h"
                  +#include "lwip/err.h"
                  +#include "lwip/ip6.h"
                  +#include "lwip/ip6_addr.h"
                  +
                  + + + + + + + +

                  +Data Structures

                  struct  tcp_ext_arg_callbacks
                   
                  struct  tcp_pcb_listen
                   
                  struct  tcp_pcb
                   
                  + + + + + + + + + + + + + + + + + +

                  +Macros

                  #define TCP_PCB_COMMON(type)
                   
                  #define tcp_mss(pcb)   ((pcb)->mss)
                   
                  #define tcp_sndbuf(pcb)   (TCPWND16((pcb)->snd_buf))
                   
                  #define tcp_sndqueuelen(pcb)   ((pcb)->snd_queuelen)
                   
                  #define tcp_nagle_disable(pcb)   tcp_set_flags(pcb, TF_NODELAY)
                   
                  #define tcp_nagle_enable(pcb)   tcp_clear_flags(pcb, TF_NODELAY)
                   
                  #define tcp_nagle_disabled(pcb)   tcp_is_flag_set(pcb, TF_NODELAY)
                   
                  #define tcp_listen(pcb)   tcp_listen_with_backlog(pcb, TCP_DEFAULT_LISTEN_BACKLOG)
                   
                  + + + + + + + + + + + + + + + + + +

                  +Typedefs

                  typedef err_t(* tcp_accept_fn) (void *arg, struct tcp_pcb *newpcb, err_t err)
                   
                  typedef err_t(* tcp_recv_fn) (void *arg, struct tcp_pcb *tpcb, struct pbuf *p, err_t err)
                   
                  typedef err_t(* tcp_sent_fn) (void *arg, struct tcp_pcb *tpcb, u16_t len)
                   
                  typedef err_t(* tcp_poll_fn) (void *arg, struct tcp_pcb *tpcb)
                   
                  typedef void(* tcp_err_fn) (void *arg, err_t err)
                   
                  typedef err_t(* tcp_connected_fn) (void *arg, struct tcp_pcb *tpcb, err_t err)
                   
                  typedef void(* tcp_extarg_callback_pcb_destroyed_fn) (u8_t id, void *data)
                   
                  typedef err_t(* tcp_extarg_callback_passive_open_fn) (u8_t id, struct tcp_pcb_listen *lpcb, struct tcp_pcb *cpcb)
                   
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  struct tcp_pcbtcp_new (void)
                   
                  struct tcp_pcbtcp_new_ip_type (u8_t type)
                   
                  void tcp_arg (struct tcp_pcb *pcb, void *arg)
                   
                  void tcp_recv (struct tcp_pcb *pcb, tcp_recv_fn recv)
                   
                  void tcp_sent (struct tcp_pcb *pcb, tcp_sent_fn sent)
                   
                  void tcp_err (struct tcp_pcb *pcb, tcp_err_fn err)
                   
                  void tcp_accept (struct tcp_pcb *pcb, tcp_accept_fn accept)
                   
                  void tcp_poll (struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval)
                   
                  void tcp_backlog_delayed (struct tcp_pcb *pcb)
                   
                  void tcp_backlog_accepted (struct tcp_pcb *pcb)
                   
                  void tcp_recved (struct tcp_pcb *pcb, u16_t len)
                   
                  err_t tcp_bind (struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port)
                   
                  void tcp_bind_netif (struct tcp_pcb *pcb, const struct netif *netif)
                   
                  err_t tcp_connect (struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port, tcp_connected_fn connected)
                   
                  struct tcp_pcbtcp_listen_with_backlog_and_err (struct tcp_pcb *pcb, u8_t backlog, err_t *err)
                   
                  struct tcp_pcbtcp_listen_with_backlog (struct tcp_pcb *pcb, u8_t backlog)
                   
                  void tcp_abort (struct tcp_pcb *pcb)
                   
                  err_t tcp_close (struct tcp_pcb *pcb)
                   
                  err_t tcp_shutdown (struct tcp_pcb *pcb, int shut_rx, int shut_tx)
                   
                  err_t tcp_write (struct tcp_pcb *pcb, const void *dataptr, u16_t len, u8_t apiflags)
                   
                  void tcp_setprio (struct tcp_pcb *pcb, u8_t prio)
                   
                  err_t tcp_output (struct tcp_pcb *pcb)
                   
                  u8_t tcp_ext_arg_alloc_id (void)
                   
                  void tcp_ext_arg_set_callbacks (struct tcp_pcb *pcb, uint8_t id, const struct tcp_ext_arg_callbacks *const callbacks)
                   
                  void tcp_ext_arg_set (struct tcp_pcb *pcb, uint8_t id, void *arg)
                   
                  void * tcp_ext_arg_get (const struct tcp_pcb *pcb, uint8_t id)
                   
                  +

                  Detailed Description

                  +

                  TCP API (to be used from TCPIP thread)
                  +See also TCP

                  +

                  Macro Definition Documentation

                  + +

                  ◆ TCP_PCB_COMMON

                  + +
                  +
                  + + + + + + + + +
                  #define TCP_PCB_COMMON( type)
                  +
                  +Value:
                  type *next; /* for the linked list */ \
                  void *callback_arg; \
                  TCP_PCB_EXTARGS \
                  enum tcp_state state; /* TCP state */ \
                  u8_t prio; \
                  /* ports are in host byte order */ \
                  u16_t local_port

                  members common to struct tcp_pcb and struct tcp_listen_pcb

                  + +
                  +
                  +

                  Typedef Documentation

                  + +

                  ◆ tcp_accept_fn

                  + +
                  +
                  + + + + +
                  typedef err_t(* tcp_accept_fn) (void *arg, struct tcp_pcb *newpcb, err_t err)
                  +
                  +

                  Function prototype for tcp accept callback functions. Called when a new connection can be accepted on a listening pcb.

                  +
                  Parameters
                  + + +
                  argAdditional argument to pass to the callback function (
                  +
                  +
                  +
                  See also
                  tcp_arg())
                  +
                  Parameters
                  + + + +
                  newpcbThe new connection pcb
                  errAn error code if there has been an error accepting. Only return ERR_ABRT if you have called tcp_abort from within the callback function!
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_connected_fn

                  + +
                  +
                  + + + + +
                  typedef err_t(* tcp_connected_fn) (void *arg, struct tcp_pcb *tpcb, err_t err)
                  +
                  +

                  Function prototype for tcp connected callback functions. Called when a pcb is connected to the remote side after initiating a connection attempt by calling tcp_connect().

                  +
                  Parameters
                  + + +
                  argAdditional argument to pass to the callback function (
                  +
                  +
                  +
                  See also
                  tcp_arg())
                  +
                  Parameters
                  + + + +
                  tpcbThe connection pcb which is connected
                  errAn unused error code, always ERR_OK currently ;-)
                  +
                  +
                  +
                  Note
                  When a connection attempt fails, the error callback is currently called!
                  + +
                  +
                  + +

                  ◆ tcp_err_fn

                  + +
                  +
                  + + + + +
                  typedef void(* tcp_err_fn) (void *arg, err_t err)
                  +
                  +

                  Function prototype for tcp error callback functions. Called when the pcb receives a RST or is unexpectedly closed for any other reason.

                  +
                  Note
                  The corresponding pcb is already freed when this callback is called!
                  +
                  Parameters
                  + + +
                  argAdditional argument to pass to the callback function (
                  +
                  +
                  +
                  See also
                  tcp_arg())
                  +
                  Parameters
                  + + +
                  errError code to indicate why the pcb has been closed ERR_ABRT: aborted through tcp_abort or by a TCP timer ERR_RST: the connection was reset by the remote host
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_extarg_callback_passive_open_fn

                  + +
                  +
                  + + + + +
                  typedef err_t(* tcp_extarg_callback_passive_open_fn) (u8_t id, struct tcp_pcb_listen *lpcb, struct tcp_pcb *cpcb)
                  +
                  +

                  Function prototype to transition arguments from a listening pcb to an accepted pcb

                  +
                  Parameters
                  + + + + +
                  idext arg id (allocated via tcp_ext_arg_alloc_id)
                  lpcbthe listening pcb accepting a connection
                  cpcbthe newly allocated connection pcb
                  +
                  +
                  +
                  Returns
                  ERR_OK if OK, any error if connection should be dropped
                  + +
                  +
                  + +

                  ◆ tcp_extarg_callback_pcb_destroyed_fn

                  + +
                  +
                  + + + + +
                  typedef void(* tcp_extarg_callback_pcb_destroyed_fn) (u8_t id, void *data)
                  +
                  +

                  Function prototype for deallocation of arguments. Called just before the pcb is freed, so don't expect to be able to do anything with this pcb!

                  +
                  Parameters
                  + + + +
                  idext arg id (allocated via tcp_ext_arg_alloc_id)
                  datapointer to the data (set via tcp_ext_arg_set before)
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_poll_fn

                  + +
                  +
                  + + + + +
                  typedef err_t(* tcp_poll_fn) (void *arg, struct tcp_pcb *tpcb)
                  +
                  +

                  Function prototype for tcp poll callback functions. Called periodically as specified by

                  See also
                  tcp_poll.
                  +
                  Parameters
                  + + +
                  argAdditional argument to pass to the callback function (
                  +
                  +
                  +
                  See also
                  tcp_arg())
                  +
                  Parameters
                  + + +
                  tpcbtcp pcb
                  +
                  +
                  +
                  Returns
                  ERR_OK: try to send some data by calling tcp_output Only return ERR_ABRT if you have called tcp_abort from within the callback function!
                  + +
                  +
                  + +

                  ◆ tcp_recv_fn

                  + +
                  +
                  + + + + +
                  typedef err_t(* tcp_recv_fn) (void *arg, struct tcp_pcb *tpcb, struct pbuf *p, err_t err)
                  +
                  +

                  Function prototype for tcp receive callback functions. Called when data has been received.

                  +
                  Parameters
                  + + +
                  argAdditional argument to pass to the callback function (
                  +
                  +
                  +
                  See also
                  tcp_arg())
                  +
                  Parameters
                  + + + + +
                  tpcbThe connection pcb which received data
                  pThe received data (or NULL when the connection has been closed!)
                  errAn error code if there has been an error receiving Only return ERR_ABRT if you have called tcp_abort from within the callback function!
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_sent_fn

                  + +
                  +
                  + + + + +
                  typedef err_t(* tcp_sent_fn) (void *arg, struct tcp_pcb *tpcb, u16_t len)
                  +
                  +

                  Function prototype for tcp sent callback functions. Called when sent data has been acknowledged by the remote side. Use it to free corresponding resources. This also means that the pcb has now space available to send new data.

                  +
                  Parameters
                  + + +
                  argAdditional argument to pass to the callback function (
                  +
                  +
                  +
                  See also
                  tcp_arg())
                  +
                  Parameters
                  + + + +
                  tpcbThe connection pcb for which data has been acknowledged
                  lenThe amount of bytes acknowledged
                  +
                  +
                  +
                  Returns
                  ERR_OK: try to send some data by calling tcp_output Only return ERR_ABRT if you have called tcp_abort from within the callback function!
                  + +
                  +
                  +

                  Function Documentation

                  + +

                  ◆ tcp_setprio()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void tcp_setprio (struct tcp_pcbpcb,
                  u8_t prio 
                  )
                  +
                  +

                  Sets the priority of a connection.

                  +
                  Parameters
                  + + + +
                  pcbthe tcp_pcb to manipulate
                  prionew priority
                  +
                  +
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/tcp_8h.js b/Libraries/LwIP/doc/doxygen/output/html/tcp_8h.js new file mode 100644 index 0000000..03b754f --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/tcp_8h.js @@ -0,0 +1,48 @@ +var tcp_8h = +[ + [ "tcp_ext_arg_callbacks", "structtcp__ext__arg__callbacks.html", "structtcp__ext__arg__callbacks" ], + [ "tcp_pcb_listen", "structtcp__pcb__listen.html", "structtcp__pcb__listen" ], + [ "tcp_pcb", "structtcp__pcb.html", "structtcp__pcb" ], + [ "tcp_listen", "group__tcp__raw.html#ga6b2a4efb1fc15d7d85cb71cb2a1d1066", null ], + [ "tcp_mss", "group__tcp__raw.html#gab0b45a01dcd461e5b8df2a1d9ddda134", null ], + [ "tcp_nagle_disable", "group__tcp__raw.html#ga5b5c0093efff4466bda06d45f12a4633", null ], + [ "tcp_nagle_disabled", "group__tcp__raw.html#ga9398061411b4af900160233aa3b1a286", null ], + [ "tcp_nagle_enable", "group__tcp__raw.html#ga9dfcdb8a05533b07dca91cf7e784f88f", null ], + [ "TCP_PCB_COMMON", "tcp_8h.html#a874630045102fc5f1442704a790c8bb8", null ], + [ "tcp_sndbuf", "group__tcp__raw.html#gad1a95f09deb49cd7341d35527d6d3e2f", null ], + [ "tcp_sndqueuelen", "group__tcp__raw.html#ga53ee4364718e84dc42cb1e0179deb1f4", null ], + [ "tcp_accept_fn", "tcp_8h.html#a00517abce6856d6c82f0efebdafb734d", null ], + [ "tcp_connected_fn", "tcp_8h.html#a939867106bd492caf2d85852fb7f6ae8", null ], + [ "tcp_err_fn", "tcp_8h.html#a1b4f9e3551e575c0ef06d6daa7f06e55", null ], + [ "tcp_extarg_callback_passive_open_fn", "tcp_8h.html#aba649c5bdf19d47e39643392b6d88588", null ], + [ "tcp_extarg_callback_pcb_destroyed_fn", "tcp_8h.html#a20881e537f5be7847d88fe2a0c8fd2cd", null ], + [ "tcp_poll_fn", "tcp_8h.html#a66deb97618a9cd9d57fca28c5245e073", null ], + [ "tcp_recv_fn", "tcp_8h.html#a780cfac08b02c66948ab94ea974202e8", null ], + [ "tcp_sent_fn", "tcp_8h.html#aa60622ffaa099e97f66fb56e437fca18", null ], + [ "tcp_abort", "group__tcp__raw.html#ga468c2260ddb01582e966ddcf3c25ce61", null ], + [ "tcp_accept", "group__tcp__raw.html#gaff4c3e380fc60c8fb9b3aa95eda94c62", null ], + [ "tcp_arg", "group__tcp__raw.html#gac10926e6f76f73e17c0d37aaab3e56b6", null ], + [ "tcp_backlog_accepted", "group__tcp__raw.html#ga619154658137a23839ca3b94882131ca", null ], + [ "tcp_backlog_delayed", "group__tcp__raw.html#ga427b11c7b98c748ec487cd43093bd2f8", null ], + [ "tcp_bind", "group__tcp__raw.html#gacf5aa67bd7fc66fef43f77a55a1201ee", null ], + [ "tcp_bind_netif", "group__tcp__raw.html#ga6469a15709088e80024258dbe80fcd1f", null ], + [ "tcp_close", "group__tcp__raw.html#ga87093e137fcc53ea82a134a3f5b33623", null ], + [ "tcp_connect", "group__tcp__raw.html#ga9a31deea4cadacd39f9485f37cfdd012", null ], + [ "tcp_err", "group__tcp__raw.html#gae1346c4e34d3bc7c01e1b47142ab3121", null ], + [ "tcp_ext_arg_alloc_id", "group__tcp__raw__extargs.html#ga4836e0b4f66439493e106a50400d1616", null ], + [ "tcp_ext_arg_get", "group__tcp__raw__extargs.html#gaa8ac7a74407cb3e0e01a30314805f990", null ], + [ "tcp_ext_arg_set", "group__tcp__raw__extargs.html#ga58500cb2ce22438e16a37373595af318", null ], + [ "tcp_ext_arg_set_callbacks", "group__tcp__raw__extargs.html#ga36e60dc02bfe0437c8da368a62e2f316", null ], + [ "tcp_listen_with_backlog", "group__tcp__raw.html#gaeff14f321d1eecd0431611f382fcd338", null ], + [ "tcp_listen_with_backlog_and_err", "group__tcp__raw.html#gac86ad8ded4d1db15a5b5fb42eb7c1436", null ], + [ "tcp_new", "group__tcp__raw.html#ga7427c5d237fe66a8097bfa8d24ceb943", null ], + [ "tcp_new_ip_type", "group__tcp__raw.html#gac14e757a21a4a87c6aa52372c210b937", null ], + [ "tcp_output", "group__tcp__raw.html#ga0cbcc6d628f644a530daf629fa3e5f7f", null ], + [ "tcp_poll", "group__tcp__raw.html#gafba47015098ed7ce523dcf7bdf70f7e5", null ], + [ "tcp_recv", "group__tcp__raw.html#ga8afd0b316a87a5eeff4726dc95006ed0", null ], + [ "tcp_recved", "group__tcp__raw.html#gabdac0856a52b5789dc897d4c7137ec44", null ], + [ "tcp_sent", "group__tcp__raw.html#ga1596332b93bb6249179f3b89f24bd808", null ], + [ "tcp_setprio", "tcp_8h.html#a2c4234f1e95b6bde0e84d4ea97ae95bc", null ], + [ "tcp_shutdown", "group__tcp__raw.html#ga5b94d57f1891b9287f88525a2ac561dd", null ], + [ "tcp_write", "group__tcp__raw.html#ga6b2aa0efbf10e254930332b7c89cd8c5", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/tcp__in_8c.html b/Libraries/LwIP/doc/doxygen/output/html/tcp__in_8c.html new file mode 100644 index 0000000..64995ae --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/tcp__in_8c.html @@ -0,0 +1,189 @@ + + + + + + + +lwIP: src/core/tcp_in.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  tcp_in.c File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/priv/tcp_priv.h"
                  +#include "lwip/def.h"
                  +#include "lwip/ip_addr.h"
                  +#include "lwip/netif.h"
                  +#include "lwip/mem.h"
                  +#include "lwip/memp.h"
                  +#include "lwip/inet_chksum.h"
                  +#include "lwip/stats.h"
                  +#include "lwip/ip6.h"
                  +#include "lwip/ip6_addr.h"
                  +#include "lwip/nd6.h"
                  +#include <string.h>
                  +#include "path/to/my/lwip_hooks.h"
                  +
                  + + + +

                  +Macros

                  #define LWIP_TCP_CALC_INITIAL_CWND(mss)   ((tcpwnd_size_t)LWIP_MIN((4U * (mss)), LWIP_MAX((2U * (mss)), 4380U)))
                   
                  + + + +

                  +Functions

                  void tcp_input (struct pbuf *p, struct netif *inp)
                   
                  +

                  Detailed Description

                  +

                  Transmission Control Protocol, incoming traffic

                  +

                  The input processing functions of the TCP layer.

                  +

                  These functions are generally called in the order (ip_input() ->) tcp_input() -> * tcp_process() -> tcp_receive() (-> application).

                  +

                  Macro Definition Documentation

                  + +

                  ◆ LWIP_TCP_CALC_INITIAL_CWND

                  + +
                  +
                  + + + + + + + + +
                  #define LWIP_TCP_CALC_INITIAL_CWND( mss)   ((tcpwnd_size_t)LWIP_MIN((4U * (mss)), LWIP_MAX((2U * (mss)), 4380U)))
                  +
                  +

                  Initial CWND calculation as defined RFC 2581

                  + +
                  +
                  +

                  Function Documentation

                  + +

                  ◆ tcp_input()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void tcp_input (struct pbufp,
                  struct netifinp 
                  )
                  +
                  +

                  The initial input processing of TCP. It verifies the TCP header, demultiplexes the segment between the PCBs and passes it on to tcp_process(), which implements the TCP finite state machine. This function is called by the IP layer (in ip_input()).

                  +
                  Parameters
                  + + + +
                  preceived TCP segment to process (p->payload pointing to the TCP header)
                  inpnetwork interface on which this segment was received
                  +
                  +
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/tcp__in_8c.js b/Libraries/LwIP/doc/doxygen/output/html/tcp__in_8c.js new file mode 100644 index 0000000..b0d0b6a --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/tcp__in_8c.js @@ -0,0 +1,5 @@ +var tcp__in_8c = +[ + [ "LWIP_TCP_CALC_INITIAL_CWND", "tcp__in_8c.html#aea174f2c6ca4cb0ad270dd8d0faf0c84", null ], + [ "tcp_input", "tcp__in_8c.html#ae70c3c99d9dd6b07f7e11f7ba5eedcb5", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/tcp__out_8c.html b/Libraries/LwIP/doc/doxygen/output/html/tcp__out_8c.html new file mode 100644 index 0000000..99b966b --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/tcp__out_8c.html @@ -0,0 +1,592 @@ + + + + + + + +lwIP: src/core/tcp_out.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  tcp_out.c File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/priv/tcp_priv.h"
                  +#include "lwip/def.h"
                  +#include "lwip/mem.h"
                  +#include "lwip/memp.h"
                  +#include "lwip/ip_addr.h"
                  +#include "lwip/netif.h"
                  +#include "lwip/inet_chksum.h"
                  +#include "lwip/stats.h"
                  +#include "lwip/ip6.h"
                  +#include "lwip/ip6_addr.h"
                  +#include <string.h>
                  +#include "path/to/my/lwip_hooks.h"
                  +
                  + + + + + +

                  +Macros

                  #define TCP_CHECKSUM_ON_COPY_SANITY_CHECK   0
                   
                  #define TCP_OVERSIZE_CALC_LENGTH(length)   ((length) + TCP_OVERSIZE)
                   
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  err_t tcp_write (struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags)
                   
                  err_t tcp_split_unsent_seg (struct tcp_pcb *pcb, u16_t split)
                   
                  err_t tcp_send_fin (struct tcp_pcb *pcb)
                   
                  err_t tcp_enqueue_flags (struct tcp_pcb *pcb, u8_t flags)
                   
                  err_t tcp_output (struct tcp_pcb *pcb)
                   
                  err_t tcp_rexmit_rto_prepare (struct tcp_pcb *pcb)
                   
                  void tcp_rexmit_rto_commit (struct tcp_pcb *pcb)
                   
                  void tcp_rexmit_rto (struct tcp_pcb *pcb)
                   
                  err_t tcp_rexmit (struct tcp_pcb *pcb)
                   
                  void tcp_rexmit_fast (struct tcp_pcb *pcb)
                   
                  void tcp_rst (const struct tcp_pcb *pcb, u32_t seqno, u32_t ackno, const ip_addr_t *local_ip, const ip_addr_t *remote_ip, u16_t local_port, u16_t remote_port)
                   
                  err_t tcp_send_empty_ack (struct tcp_pcb *pcb)
                   
                  err_t tcp_keepalive (struct tcp_pcb *pcb)
                   
                  err_t tcp_zero_window_probe (struct tcp_pcb *pcb)
                   
                  +

                  Detailed Description

                  +

                  Transmission Control Protocol, outgoing traffic

                  +

                  The output functions of TCP.

                  +

                  There are two distinct ways for TCP segments to get sent:

                    +
                  • queued data: these are segments transferring data or segments containing SYN or FIN (which both count as one sequence number). They are created as struct Packet buffers (PBUF) together with a struct tcp_seg and enqueue to the unsent list of the pcb. They are sent by tcp_output:
                      +
                    • tcp_write : creates data segments
                    • +
                    • tcp_split_unsent_seg : splits a data segment
                    • +
                    • tcp_enqueue_flags : creates SYN-only or FIN-only segments
                    • +
                    • tcp_output / tcp_output_segment : finalize the tcp header (e.g. sequence numbers, options, checksum) and output to IP
                    • +
                    • the various tcp_rexmit functions shuffle around segments between the unsent an unacked lists to retransmit them
                    • +
                    • tcp_create_segment and tcp_pbuf_prealloc allocate pbuf and segment for these functions
                    • +
                    +
                  • +
                  • direct send: these segments don't contain data but control the connection behaviour. They are created as pbuf only and sent directly without enqueueing them: +
                  • +
                  +

                  Macro Definition Documentation

                  + +

                  ◆ TCP_CHECKSUM_ON_COPY_SANITY_CHECK

                  + +
                  +
                  + + + + +
                  #define TCP_CHECKSUM_ON_COPY_SANITY_CHECK   0
                  +
                  +

                  Define this to 1 for an extra check that the output checksum is valid (usefule when the checksum is generated by the application, not the stack)

                  + +
                  +
                  + +

                  ◆ TCP_OVERSIZE_CALC_LENGTH

                  + +
                  +
                  + + + + + + + + +
                  #define TCP_OVERSIZE_CALC_LENGTH( length)   ((length) + TCP_OVERSIZE)
                  +
                  +

                  The size of segment pbufs created when TCP_OVERSIZE is enabled

                  + +
                  +
                  +

                  Function Documentation

                  + +

                  ◆ tcp_enqueue_flags()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  err_t tcp_enqueue_flags (struct tcp_pcbpcb,
                  u8_t flags 
                  )
                  +
                  +

                  Enqueue SYN or FIN for transmission.

                  +

                  Called by tcp_connect, tcp_listen_input, and tcp_close (via tcp_send_fin)

                  +
                  Parameters
                  + + + +
                  pcbProtocol control block for the TCP connection.
                  flagsTCP header flags to set in the outgoing segment.
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_keepalive()

                  + +
                  +
                  + + + + + + + + +
                  err_t tcp_keepalive (struct tcp_pcbpcb)
                  +
                  +

                  Send keepalive packets to keep a connection active although no data is sent over it.

                  +

                  Called by tcp_slowtmr()

                  +
                  Parameters
                  + + +
                  pcbthe tcp_pcb for which to send a keepalive packet
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_rexmit()

                  + +
                  +
                  + + + + + + + + +
                  err_t tcp_rexmit (struct tcp_pcbpcb)
                  +
                  +

                  Requeue the first unacked segment for retransmission

                  +

                  Called by tcp_receive() for fast retransmit.

                  +
                  Parameters
                  + + +
                  pcbthe tcp_pcb for which to retransmit the first unacked segment
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_rexmit_fast()

                  + +
                  +
                  + + + + + + + + +
                  void tcp_rexmit_fast (struct tcp_pcbpcb)
                  +
                  +

                  Handle retransmission after three dupacks received

                  +
                  Parameters
                  + + +
                  pcbthe tcp_pcb for which to retransmit the first unacked segment
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_rexmit_rto()

                  + +
                  +
                  + + + + + + + + +
                  void tcp_rexmit_rto (struct tcp_pcbpcb)
                  +
                  +

                  Requeue all unacked segments for retransmission

                  +

                  Called by tcp_process() only, tcp_slowtmr() needs to do some things between "prepare" and "commit".

                  +
                  Parameters
                  + + +
                  pcbthe tcp_pcb for which to re-enqueue all unacked segments
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_rexmit_rto_commit()

                  + +
                  +
                  + + + + + + + + +
                  void tcp_rexmit_rto_commit (struct tcp_pcbpcb)
                  +
                  +

                  Requeue all unacked segments for retransmission

                  +

                  Called by tcp_slowtmr() for slow retransmission.

                  +
                  Parameters
                  + + +
                  pcbthe tcp_pcb for which to re-enqueue all unacked segments
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_rexmit_rto_prepare()

                  + +
                  +
                  + + + + + + + + +
                  err_t tcp_rexmit_rto_prepare (struct tcp_pcbpcb)
                  +
                  +

                  Requeue all unacked segments for retransmission

                  +

                  Called by tcp_slowtmr() for slow retransmission.

                  +
                  Parameters
                  + + +
                  pcbthe tcp_pcb for which to re-enqueue all unacked segments
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_rst()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  void tcp_rst (const struct tcp_pcbpcb,
                  u32_t seqno,
                  u32_t ackno,
                  const ip_addr_tlocal_ip,
                  const ip_addr_tremote_ip,
                  u16_t local_port,
                  u16_t remote_port 
                  )
                  +
                  +

                  Send a TCP RESET packet (empty segment with RST flag set) either to abort a connection or to show that there is no matching local connection for a received segment.

                  +

                  Called by tcp_abort() (to abort a local connection), tcp_input() (if no matching local pcb was found), tcp_listen_input() (if incoming segment has ACK flag set) and tcp_process() (received segment in the wrong state)

                  +

                  Since a RST segment is in most cases not sent for an active connection, tcp_rst() has a number of arguments that are taken from a tcp_pcb for most other segment output functions.

                  +
                  Parameters
                  + + + + + + + + +
                  pcbTCP pcb (may be NULL if no pcb is available)
                  seqnothe sequence number to use for the outgoing segment
                  acknothe acknowledge number to use for the outgoing segment
                  local_ipthe local IP address to send the segment from
                  remote_ipthe remote IP address to send the segment to
                  local_portthe local TCP port to send the segment from
                  remote_portthe remote TCP port to send the segment to
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_send_empty_ack()

                  + +
                  +
                  + + + + + + + + +
                  err_t tcp_send_empty_ack (struct tcp_pcbpcb)
                  +
                  +

                  Send an ACK without data.

                  +
                  Parameters
                  + + +
                  pcbProtocol control block for the TCP connection to send the ACK
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_send_fin()

                  + +
                  +
                  + + + + + + + + +
                  err_t tcp_send_fin (struct tcp_pcbpcb)
                  +
                  +

                  Called by tcp_close() to send a segment including FIN flag but not data. This FIN may be added to an existing segment or a new, otherwise empty segment is enqueued.

                  +
                  Parameters
                  + + +
                  pcbthe tcp_pcb over which to send a segment
                  +
                  +
                  +
                  Returns
                  ERR_OK if sent, another err_t otherwise
                  + +
                  +
                  + +

                  ◆ tcp_split_unsent_seg()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  err_t tcp_split_unsent_seg (struct tcp_pcbpcb,
                  u16_t split 
                  )
                  +
                  +

                  Split segment on the head of the unsent queue. If return is not ERR_OK, existing head remains intact

                  +

                  The split is accomplished by creating a new TCP segment and pbuf which holds the remainder payload after the split. The original pbuf is trimmed to new length. This allows splitting of read-only pbufs

                  +
                  Parameters
                  + + + +
                  pcbthe tcp_pcb for which to split the unsent head
                  splitthe amount of payload to remain in the head
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_zero_window_probe()

                  + +
                  +
                  + + + + + + + + +
                  err_t tcp_zero_window_probe (struct tcp_pcbpcb)
                  +
                  +

                  Send persist timer zero-window probes to keep a connection active when a window update is lost.

                  +

                  Called by tcp_slowtmr()

                  +
                  Parameters
                  + + +
                  pcbthe tcp_pcb for which to send a zero-window probe packet
                  +
                  +
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/tcp__out_8c.js b/Libraries/LwIP/doc/doxygen/output/html/tcp__out_8c.js new file mode 100644 index 0000000..39712b9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/tcp__out_8c.js @@ -0,0 +1,19 @@ +var tcp__out_8c = +[ + [ "TCP_CHECKSUM_ON_COPY_SANITY_CHECK", "tcp__out_8c.html#a25d7e9081baa5c84f2ebd34b0eb4169b", null ], + [ "TCP_OVERSIZE_CALC_LENGTH", "tcp__out_8c.html#aa2ef22d2384225a1b5fee187411cc129", null ], + [ "tcp_enqueue_flags", "tcp__out_8c.html#aa7d5d552647d567095876aab202bfd1a", null ], + [ "tcp_keepalive", "tcp__out_8c.html#a0d8bb5fc8522515aa35d305774cc5332", null ], + [ "tcp_output", "group__tcp__raw.html#ga0cbcc6d628f644a530daf629fa3e5f7f", null ], + [ "tcp_rexmit", "tcp__out_8c.html#af75fefe4fe509845be156d6e424eb6f1", null ], + [ "tcp_rexmit_fast", "tcp__out_8c.html#adb6ee7b4d59f125cc8bfac3bb5ca3937", null ], + [ "tcp_rexmit_rto", "tcp__out_8c.html#ab5ef9c8ab4629eb721987ae316b9f30f", null ], + [ "tcp_rexmit_rto_commit", "tcp__out_8c.html#a9ef9dc094e21bdf0779aed25ab0b08d4", null ], + [ "tcp_rexmit_rto_prepare", "tcp__out_8c.html#a1f318930bd6d49074343cc79c5166f39", null ], + [ "tcp_rst", "tcp__out_8c.html#aa90f8051c9633d3017c588245cdc4014", null ], + [ "tcp_send_empty_ack", "tcp__out_8c.html#aefde3e34b2cc8df9654986484c44a996", null ], + [ "tcp_send_fin", "tcp__out_8c.html#af40ba9d645a8910436c3d7cf13dba342", null ], + [ "tcp_split_unsent_seg", "tcp__out_8c.html#ac930859c4e4ad9fcf6bb25ef5e91bcd5", null ], + [ "tcp_write", "group__tcp__raw.html#ga6b2aa0efbf10e254930332b7c89cd8c5", null ], + [ "tcp_zero_window_probe", "tcp__out_8c.html#a6c20490aa45c771c38ce8ad3031cbdf6", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/tcp__priv_8h.html b/Libraries/LwIP/doc/doxygen/output/html/tcp__priv_8h.html new file mode 100644 index 0000000..5d6feed --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/tcp__priv_8h.html @@ -0,0 +1,1333 @@ + + + + + + + +lwIP: src/include/lwip/priv/tcp_priv.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  tcp_priv.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/tcp.h"
                  +#include "lwip/mem.h"
                  +#include "lwip/pbuf.h"
                  +#include "lwip/ip.h"
                  +#include "lwip/icmp.h"
                  +#include "lwip/err.h"
                  +#include "lwip/ip6.h"
                  +#include "lwip/ip6_addr.h"
                  +#include "lwip/prot/tcp.h"
                  +
                  + + + + + + + + + + + +

                  +Macros

                  #define tcp_do_output_nagle(tpcb)
                   
                  #define TF_RESET   (u8_t)0x08U /* Connection was reset. */
                   
                  #define TCP_OVERSIZE_DBGCHECK   0
                   
                  #define TCP_CHECKSUM_ON_COPY   (LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_TCP)
                   
                  #define TCP_BUILD_MSS_OPTION(mss)   lwip_htonl(0x02040000 | ((mss) & 0xFFFF))
                   
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  void tcp_init (void)
                   
                  void tcp_tmr (void)
                   
                  void tcp_slowtmr (void)
                   
                  void tcp_fasttmr (void)
                   
                  void tcp_txnow (void)
                   
                  void tcp_input (struct pbuf *p, struct netif *inp)
                   
                  struct tcp_pcbtcp_alloc (u8_t prio)
                   
                  void tcp_free (struct tcp_pcb *pcb)
                   
                  void tcp_abandon (struct tcp_pcb *pcb, int reset)
                   
                  err_t tcp_send_empty_ack (struct tcp_pcb *pcb)
                   
                  err_t tcp_rexmit (struct tcp_pcb *pcb)
                   
                  err_t tcp_rexmit_rto_prepare (struct tcp_pcb *pcb)
                   
                  void tcp_rexmit_rto_commit (struct tcp_pcb *pcb)
                   
                  void tcp_rexmit_rto (struct tcp_pcb *pcb)
                   
                  void tcp_rexmit_fast (struct tcp_pcb *pcb)
                   
                  u32_t tcp_update_rcv_ann_wnd (struct tcp_pcb *pcb)
                   
                  err_t tcp_process_refused_data (struct tcp_pcb *pcb)
                   
                  void tcp_pcb_purge (struct tcp_pcb *pcb)
                   
                  void tcp_pcb_remove (struct tcp_pcb **pcblist, struct tcp_pcb *pcb)
                   
                  void tcp_segs_free (struct tcp_seg *seg)
                   
                  void tcp_seg_free (struct tcp_seg *seg)
                   
                  struct tcp_seg * tcp_seg_copy (struct tcp_seg *seg)
                   
                  err_t tcp_send_fin (struct tcp_pcb *pcb)
                   
                  err_t tcp_enqueue_flags (struct tcp_pcb *pcb, u8_t flags)
                   
                  void tcp_rst (const struct tcp_pcb *pcb, u32_t seqno, u32_t ackno, const ip_addr_t *local_ip, const ip_addr_t *remote_ip, u16_t local_port, u16_t remote_port)
                   
                  u32_t tcp_next_iss (struct tcp_pcb *pcb)
                   
                  err_t tcp_keepalive (struct tcp_pcb *pcb)
                   
                  err_t tcp_split_unsent_seg (struct tcp_pcb *pcb, u16_t split)
                   
                  err_t tcp_zero_window_probe (struct tcp_pcb *pcb)
                   
                  u16_t tcp_eff_send_mss_netif (u16_t sendmss, struct netif *outif, const ip_addr_t *dest)
                   
                  err_t tcp_recv_null (void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err)
                   
                  void tcp_timer_needed (void)
                   
                  void tcp_netif_ip_addr_changed (const ip_addr_t *old_addr, const ip_addr_t *new_addr)
                   
                  err_t tcp_ext_arg_invoke_callbacks_passive_open (struct tcp_pcb_listen *lpcb, struct tcp_pcb *cpcb)
                   
                  + + + + + + + + + + + +

                  +Variables

                  struct tcp_pcbtcp_bound_pcbs
                   
                  union tcp_listen_pcbs_t tcp_listen_pcbs
                   
                  struct tcp_pcbtcp_active_pcbs
                   
                  struct tcp_pcbtcp_tw_pcbs
                   
                  struct tcp_pcb **const tcp_pcb_lists [4]
                   
                  +

                  Detailed Description

                  +

                  TCP internal implementations (do not use in application code)

                  +

                  Macro Definition Documentation

                  + +

                  ◆ TCP_BUILD_MSS_OPTION

                  + +
                  +
                  + + + + + + + + +
                  #define TCP_BUILD_MSS_OPTION( mss)   lwip_htonl(0x02040000 | ((mss) & 0xFFFF))
                  +
                  +

                  This returns a TCP header option for MSS in an u32_t

                  + +
                  +
                  + +

                  ◆ TCP_CHECKSUM_ON_COPY

                  + +
                  +
                  + + + + +
                  #define TCP_CHECKSUM_ON_COPY   (LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_TCP)
                  +
                  +

                  Don't generate checksum on copy if CHECKSUM_GEN_TCP is disabled

                  + +
                  +
                  + +

                  ◆ tcp_do_output_nagle

                  + +
                  +
                  + + + + + + + + +
                  #define tcp_do_output_nagle( tpcb)
                  +
                  +Value:
                  ((((tpcb)->unacked == NULL) || \
                  ((tpcb)->flags & (TF_NODELAY | TF_INFR)) || \
                  (((tpcb)->unsent != NULL) && (((tpcb)->unsent->next != NULL) || \
                  ((tpcb)->unsent->len >= (tpcb)->mss))) || \
                  ((tcp_sndbuf(tpcb) == 0) || (tcp_sndqueuelen(tpcb) >= TCP_SND_QUEUELEN)) \
                  ) ? 1 : 0)
                  #define tcp_sndbuf(pcb)
                  Definition: tcp.h:434
                  +
                  #define tcp_sndqueuelen(pcb)
                  Definition: tcp.h:436
                  +
                  #define TCP_SND_QUEUELEN
                  Definition: opt.h:1322
                  +

                  This is the Nagle algorithm: try to combine user data to send as few TCP segments as possible. Only send if

                    +
                  • no previously transmitted data on the connection remains unacknowledged or
                  • +
                  • the TF_NODELAY flag is set (nagle algorithm turned off for this pcb) or
                  • +
                  • the only unsent segment is at least pcb->mss bytes long (or there is more than one unsent segment - with lwIP, this can happen although unsent->len < mss)
                  • +
                  • or if we are in fast-retransmit (TF_INFR)
                  • +
                  + +
                  +
                  + +

                  ◆ TCP_OVERSIZE_DBGCHECK

                  + +
                  +
                  + + + + +
                  #define TCP_OVERSIZE_DBGCHECK   0
                  +
                  +

                  Enabled extra-check for TCP_OVERSIZE if LWIP_DEBUG is enabled

                  + +
                  +
                  + +

                  ◆ TF_RESET

                  + +
                  +
                  + + + + +
                  #define TF_RESET   (u8_t)0x08U /* Connection was reset. */
                  +
                  +

                  Flags used on input processing, not on pcb->flags

                  + +
                  +
                  +

                  Function Documentation

                  + +

                  ◆ tcp_abandon()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void tcp_abandon (struct tcp_pcbpcb,
                  int reset 
                  )
                  +
                  +

                  Abandons a connection and optionally sends a RST to the remote host. Deletes the local protocol control block. This is done when a connection is killed because of shortage of memory.

                  +
                  Parameters
                  + + + +
                  pcbthe tcp_pcb to abort
                  resetboolean to indicate whether a reset should be sent
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_alloc()

                  + +
                  +
                  + + + + + + + + +
                  struct tcp_pcb* tcp_alloc (u8_t prio)
                  +
                  +

                  Allocate a new tcp_pcb structure.

                  +
                  Parameters
                  + + +
                  priopriority for the new pcb
                  +
                  +
                  +
                  Returns
                  a new tcp_pcb that initially is in state CLOSED
                  + +
                  +
                  + +

                  ◆ tcp_eff_send_mss_netif()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  u16_t tcp_eff_send_mss_netif (u16_t sendmss,
                  struct netifoutif,
                  const ip_addr_tdest 
                  )
                  +
                  +

                  Calculates the effective send mss that can be used for a specific IP address by calculating the minimum of TCP_MSS and the mtu (if set) of the target netif (if not NULL).

                  + +
                  +
                  + +

                  ◆ tcp_enqueue_flags()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  err_t tcp_enqueue_flags (struct tcp_pcbpcb,
                  u8_t flags 
                  )
                  +
                  +

                  Enqueue SYN or FIN for transmission.

                  +

                  Called by tcp_connect, tcp_listen_input, and tcp_close (via tcp_send_fin)

                  +
                  Parameters
                  + + + +
                  pcbProtocol control block for the TCP connection.
                  flagsTCP header flags to set in the outgoing segment.
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_ext_arg_invoke_callbacks_passive_open()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  err_t tcp_ext_arg_invoke_callbacks_passive_open (struct tcp_pcb_listenlpcb,
                  struct tcp_pcbcpcb 
                  )
                  +
                  +

                  This function calls the "passive_open" callback for all ext_args if a connection is in the process of being accepted. This is called just after the SYN is received and before a SYN/ACK is sent, to allow to modify the very first segment sent even on passive open. Naturally, the "accepted" callback of the pcb has not been called yet!

                  + +
                  +
                  + +

                  ◆ tcp_fasttmr()

                  + +
                  +
                  + + + + + + + + +
                  void tcp_fasttmr (void )
                  +
                  +

                  Is called every TCP_FAST_INTERVAL (250 ms) and process data previously "refused" by upper layer (application) and sends delayed ACKs or pending FINs.

                  +

                  Automatically called from tcp_tmr().

                  + +
                  +
                  + +

                  ◆ tcp_free()

                  + +
                  +
                  + + + + + + + + +
                  void tcp_free (struct tcp_pcbpcb)
                  +
                  +

                  Free a tcp pcb

                  + +
                  +
                  + +

                  ◆ tcp_init()

                  + +
                  +
                  + + + + + + + + +
                  void tcp_init (void )
                  +
                  +

                  Initialize this module.

                  + +
                  +
                  + +

                  ◆ tcp_input()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void tcp_input (struct pbufp,
                  struct netifinp 
                  )
                  +
                  +

                  The initial input processing of TCP. It verifies the TCP header, demultiplexes the segment between the PCBs and passes it on to tcp_process(), which implements the TCP finite state machine. This function is called by the IP layer (in ip_input()).

                  +
                  Parameters
                  + + + +
                  preceived TCP segment to process (p->payload pointing to the TCP header)
                  inpnetwork interface on which this segment was received
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_keepalive()

                  + +
                  +
                  + + + + + + + + +
                  err_t tcp_keepalive (struct tcp_pcbpcb)
                  +
                  +

                  Send keepalive packets to keep a connection active although no data is sent over it.

                  +

                  Called by tcp_slowtmr()

                  +
                  Parameters
                  + + +
                  pcbthe tcp_pcb for which to send a keepalive packet
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_netif_ip_addr_changed()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void tcp_netif_ip_addr_changed (const ip_addr_told_addr,
                  const ip_addr_tnew_addr 
                  )
                  +
                  +

                  This function is called from netif.c when address is changed or netif is removed

                  +
                  Parameters
                  + + + +
                  old_addrIP address of the netif before change
                  new_addrIP address of the netif after change or NULL if netif has been removed
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_next_iss()

                  + +
                  +
                  + + + + + + + + +
                  u32_t tcp_next_iss (struct tcp_pcbpcb)
                  +
                  +

                  Calculates a new initial sequence number for new connections.

                  +
                  Returns
                  u32_t pseudo random sequence number
                  + +
                  +
                  + +

                  ◆ tcp_pcb_purge()

                  + +
                  +
                  + + + + + + + + +
                  void tcp_pcb_purge (struct tcp_pcbpcb)
                  +
                  +

                  Purges a TCP PCB. Removes any buffered data and frees the buffer memory (pcb->ooseq, pcb->unsent and pcb->unacked are freed).

                  +
                  Parameters
                  + + +
                  pcbtcp_pcb to purge. The pcb itself is not deallocated!
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_pcb_remove()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void tcp_pcb_remove (struct tcp_pcb ** pcblist,
                  struct tcp_pcbpcb 
                  )
                  +
                  +

                  Purges the PCB and removes it from a PCB list. Any delayed ACKs are sent first.

                  +
                  Parameters
                  + + + +
                  pcblistPCB list to purge.
                  pcbtcp_pcb to purge. The pcb itself is NOT deallocated!
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_process_refused_data()

                  + +
                  +
                  + + + + + + + + +
                  err_t tcp_process_refused_data (struct tcp_pcbpcb)
                  +
                  +

                  Pass pcb->refused_data to the recv callback

                  + +
                  +
                  + +

                  ◆ tcp_recv_null()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t tcp_recv_null (void * arg,
                  struct tcp_pcbpcb,
                  struct pbufp,
                  err_t err 
                  )
                  +
                  +

                  Default receive callback that is called if the user didn't register a recv callback for the pcb.

                  + +
                  +
                  + +

                  ◆ tcp_rexmit()

                  + +
                  +
                  + + + + + + + + +
                  err_t tcp_rexmit (struct tcp_pcbpcb)
                  +
                  +

                  Requeue the first unacked segment for retransmission

                  +

                  Called by tcp_receive() for fast retransmit.

                  +
                  Parameters
                  + + +
                  pcbthe tcp_pcb for which to retransmit the first unacked segment
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_rexmit_fast()

                  + +
                  +
                  + + + + + + + + +
                  void tcp_rexmit_fast (struct tcp_pcbpcb)
                  +
                  +

                  Handle retransmission after three dupacks received

                  +
                  Parameters
                  + + +
                  pcbthe tcp_pcb for which to retransmit the first unacked segment
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_rexmit_rto()

                  + +
                  +
                  + + + + + + + + +
                  void tcp_rexmit_rto (struct tcp_pcbpcb)
                  +
                  +

                  Requeue all unacked segments for retransmission

                  +

                  Called by tcp_process() only, tcp_slowtmr() needs to do some things between "prepare" and "commit".

                  +
                  Parameters
                  + + +
                  pcbthe tcp_pcb for which to re-enqueue all unacked segments
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_rexmit_rto_commit()

                  + +
                  +
                  + + + + + + + + +
                  void tcp_rexmit_rto_commit (struct tcp_pcbpcb)
                  +
                  +

                  Requeue all unacked segments for retransmission

                  +

                  Called by tcp_slowtmr() for slow retransmission.

                  +
                  Parameters
                  + + +
                  pcbthe tcp_pcb for which to re-enqueue all unacked segments
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_rexmit_rto_prepare()

                  + +
                  +
                  + + + + + + + + +
                  err_t tcp_rexmit_rto_prepare (struct tcp_pcbpcb)
                  +
                  +

                  Requeue all unacked segments for retransmission

                  +

                  Called by tcp_slowtmr() for slow retransmission.

                  +
                  Parameters
                  + + +
                  pcbthe tcp_pcb for which to re-enqueue all unacked segments
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_rst()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  void tcp_rst (const struct tcp_pcbpcb,
                  u32_t seqno,
                  u32_t ackno,
                  const ip_addr_tlocal_ip,
                  const ip_addr_tremote_ip,
                  u16_t local_port,
                  u16_t remote_port 
                  )
                  +
                  +

                  Send a TCP RESET packet (empty segment with RST flag set) either to abort a connection or to show that there is no matching local connection for a received segment.

                  +

                  Called by tcp_abort() (to abort a local connection), tcp_input() (if no matching local pcb was found), tcp_listen_input() (if incoming segment has ACK flag set) and tcp_process() (received segment in the wrong state)

                  +

                  Since a RST segment is in most cases not sent for an active connection, tcp_rst() has a number of arguments that are taken from a tcp_pcb for most other segment output functions.

                  +
                  Parameters
                  + + + + + + + + +
                  pcbTCP pcb (may be NULL if no pcb is available)
                  seqnothe sequence number to use for the outgoing segment
                  acknothe acknowledge number to use for the outgoing segment
                  local_ipthe local IP address to send the segment from
                  remote_ipthe remote IP address to send the segment to
                  local_portthe local TCP port to send the segment from
                  remote_portthe remote TCP port to send the segment to
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_seg_copy()

                  + +
                  +
                  + + + + + + + + +
                  struct tcp_seg* tcp_seg_copy (struct tcp_seg * seg)
                  +
                  +

                  Returns a copy of the given TCP segment. The pbuf and data are not copied, only the pointers

                  +
                  Parameters
                  + + +
                  segthe old tcp_seg
                  +
                  +
                  +
                  Returns
                  a copy of seg
                  + +
                  +
                  + +

                  ◆ tcp_seg_free()

                  + +
                  +
                  + + + + + + + + +
                  void tcp_seg_free (struct tcp_seg * seg)
                  +
                  +

                  Frees a TCP segment (tcp_seg structure).

                  +
                  Parameters
                  + + +
                  segsingle tcp_seg to free
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_segs_free()

                  + +
                  +
                  + + + + + + + + +
                  void tcp_segs_free (struct tcp_seg * seg)
                  +
                  +

                  Deallocates a list of TCP segments (tcp_seg structures).

                  +
                  Parameters
                  + + +
                  segtcp_seg list of TCP segments to free
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_send_empty_ack()

                  + +
                  +
                  + + + + + + + + +
                  err_t tcp_send_empty_ack (struct tcp_pcbpcb)
                  +
                  +

                  Send an ACK without data.

                  +
                  Parameters
                  + + +
                  pcbProtocol control block for the TCP connection to send the ACK
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_send_fin()

                  + +
                  +
                  + + + + + + + + +
                  err_t tcp_send_fin (struct tcp_pcbpcb)
                  +
                  +

                  Called by tcp_close() to send a segment including FIN flag but not data. This FIN may be added to an existing segment or a new, otherwise empty segment is enqueued.

                  +
                  Parameters
                  + + +
                  pcbthe tcp_pcb over which to send a segment
                  +
                  +
                  +
                  Returns
                  ERR_OK if sent, another err_t otherwise
                  + +
                  +
                  + +

                  ◆ tcp_slowtmr()

                  + +
                  +
                  + + + + + + + + +
                  void tcp_slowtmr (void )
                  +
                  +

                  Called every 500 ms and implements the retransmission timer and the timer that removes PCBs that have been in TIME-WAIT for enough time. It also increments various timers such as the inactivity timer in each PCB.

                  +

                  Automatically called from tcp_tmr().

                  + +
                  +
                  + +

                  ◆ tcp_split_unsent_seg()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  err_t tcp_split_unsent_seg (struct tcp_pcbpcb,
                  u16_t split 
                  )
                  +
                  +

                  Split segment on the head of the unsent queue. If return is not ERR_OK, existing head remains intact

                  +

                  The split is accomplished by creating a new TCP segment and pbuf which holds the remainder payload after the split. The original pbuf is trimmed to new length. This allows splitting of read-only pbufs

                  +
                  Parameters
                  + + + +
                  pcbthe tcp_pcb for which to split the unsent head
                  splitthe amount of payload to remain in the head
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_timer_needed()

                  + +
                  +
                  + + + + + + + + +
                  void tcp_timer_needed (void )
                  +
                  +

                  External function (implemented in timers.c), called when TCP detects that a timer is needed (i.e. active- or time-wait-pcb found).

                  +

                  Called from TCP_REG when registering a new PCB: the reason is to have the TCP timer only running when there are active (or time-wait) PCBs.

                  + +
                  +
                  + +

                  ◆ tcp_tmr()

                  + +
                  +
                  + + + + + + + + +
                  void tcp_tmr (void )
                  +
                  +

                  Called periodically to dispatch TCP timers.

                  + +
                  +
                  + +

                  ◆ tcp_txnow()

                  + +
                  +
                  + + + + + + + + +
                  void tcp_txnow (void )
                  +
                  +

                  Call tcp_output for all active pcbs that have TF_NAGLEMEMERR set

                  + +
                  +
                  + +

                  ◆ tcp_update_rcv_ann_wnd()

                  + +
                  +
                  + + + + + + + + +
                  u32_t tcp_update_rcv_ann_wnd (struct tcp_pcbpcb)
                  +
                  +

                  Update the state that tracks the available window space to advertise.

                  +

                  Returns how much extra window would be advertised if we sent an update now.

                  + +
                  +
                  + +

                  ◆ tcp_zero_window_probe()

                  + +
                  +
                  + + + + + + + + +
                  err_t tcp_zero_window_probe (struct tcp_pcbpcb)
                  +
                  +

                  Send persist timer zero-window probes to keep a connection active when a window update is lost.

                  +

                  Called by tcp_slowtmr()

                  +
                  Parameters
                  + + +
                  pcbthe tcp_pcb for which to send a zero-window probe packet
                  +
                  +
                  + +
                  +
                  +

                  Variable Documentation

                  + +

                  ◆ tcp_active_pcbs

                  + +
                  +
                  + + + + +
                  struct tcp_pcb* tcp_active_pcbs
                  +
                  +

                  List of all TCP PCBs that are in a state in which they accept or send data.

                  + +
                  +
                  + +

                  ◆ tcp_bound_pcbs

                  + +
                  +
                  + + + + +
                  struct tcp_pcb* tcp_bound_pcbs
                  +
                  +

                  List of all TCP PCBs bound but not yet (connected || listening)

                  + +
                  +
                  + +

                  ◆ tcp_listen_pcbs

                  + +
                  +
                  + + + + +
                  union tcp_listen_pcbs_t tcp_listen_pcbs
                  +
                  +

                  List of all TCP PCBs in LISTEN state

                  + +
                  +
                  + +

                  ◆ tcp_pcb_lists

                  + +
                  +
                  + + + + +
                  struct tcp_pcb** const tcp_pcb_lists[4]
                  +
                  +

                  An array with all (non-temporary) PCB lists, mainly used for smaller code size

                  + +
                  +
                  + +

                  ◆ tcp_tw_pcbs

                  + +
                  +
                  + + + + +
                  struct tcp_pcb* tcp_tw_pcbs
                  +
                  +

                  List of all TCP PCBs in TIME-WAIT state

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/tcp__priv_8h.js b/Libraries/LwIP/doc/doxygen/output/html/tcp__priv_8h.js new file mode 100644 index 0000000..00c0cb3 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/tcp__priv_8h.js @@ -0,0 +1,47 @@ +var tcp__priv_8h = +[ + [ "TCP_BUILD_MSS_OPTION", "tcp__priv_8h.html#abdc99c343efc6c81abf60bb62b361dd8", null ], + [ "TCP_CHECKSUM_ON_COPY", "tcp__priv_8h.html#aea0c47b916a8a25f82d2063335033aee", null ], + [ "tcp_do_output_nagle", "tcp__priv_8h.html#afbd7a2997e3a3b7569efc3298e2e409f", null ], + [ "TCP_OVERSIZE_DBGCHECK", "tcp__priv_8h.html#a178a6e9966d03c3326b9e0568666bb69", null ], + [ "TF_RESET", "tcp__priv_8h.html#ac9dbdaeac3e25f5badf3a763a1b0b990", null ], + [ "tcp_abandon", "tcp__priv_8h.html#ae4f0f1ca01dbccd680eaa2d8433cd7fe", null ], + [ "tcp_alloc", "tcp__priv_8h.html#a1dd6830a42b3c464b5a72f62ae312d0a", null ], + [ "tcp_eff_send_mss_netif", "tcp__priv_8h.html#a08a3b5396c40f32dd8b21e7d63b3e1b3", null ], + [ "tcp_enqueue_flags", "tcp__priv_8h.html#aa7d5d552647d567095876aab202bfd1a", null ], + [ "tcp_ext_arg_invoke_callbacks_passive_open", "tcp__priv_8h.html#a5265b1df024d04287ed3edc02b1b9ccc", null ], + [ "tcp_fasttmr", "tcp__priv_8h.html#abf446b07e52161b8a53cea07bc6c366d", null ], + [ "tcp_free", "tcp__priv_8h.html#aa2b6b075c27c64dfb8c402ac961fb910", null ], + [ "tcp_init", "tcp__priv_8h.html#a51de4ded7d342456d31722493c92c969", null ], + [ "tcp_input", "tcp__priv_8h.html#ae70c3c99d9dd6b07f7e11f7ba5eedcb5", null ], + [ "tcp_keepalive", "tcp__priv_8h.html#a0d8bb5fc8522515aa35d305774cc5332", null ], + [ "tcp_netif_ip_addr_changed", "tcp__priv_8h.html#a4d0c2d1ad02134c79fc72fe95ee2a703", null ], + [ "tcp_next_iss", "tcp__priv_8h.html#afd5dc2fa74855a84b2da642ba31059ea", null ], + [ "tcp_pcb_purge", "tcp__priv_8h.html#a44fc672b9d14a65e61040707c45302ba", null ], + [ "tcp_pcb_remove", "tcp__priv_8h.html#aaaef096f6a03bf5b778329bb66ee06f6", null ], + [ "tcp_process_refused_data", "tcp__priv_8h.html#a0075b56ad4b0eca7c9d439cf150e1973", null ], + [ "tcp_recv_null", "tcp__priv_8h.html#a0cb3f604fc8d20870d8cab291da5701c", null ], + [ "tcp_rexmit", "tcp__priv_8h.html#af75fefe4fe509845be156d6e424eb6f1", null ], + [ "tcp_rexmit_fast", "tcp__priv_8h.html#adb6ee7b4d59f125cc8bfac3bb5ca3937", null ], + [ "tcp_rexmit_rto", "tcp__priv_8h.html#ab5ef9c8ab4629eb721987ae316b9f30f", null ], + [ "tcp_rexmit_rto_commit", "tcp__priv_8h.html#a9ef9dc094e21bdf0779aed25ab0b08d4", null ], + [ "tcp_rexmit_rto_prepare", "tcp__priv_8h.html#a1f318930bd6d49074343cc79c5166f39", null ], + [ "tcp_rst", "tcp__priv_8h.html#aa90f8051c9633d3017c588245cdc4014", null ], + [ "tcp_seg_copy", "tcp__priv_8h.html#a569d79451d2570e4ef406775725ef6ef", null ], + [ "tcp_seg_free", "tcp__priv_8h.html#ac6283651b26f74dba2444159aee88b20", null ], + [ "tcp_segs_free", "tcp__priv_8h.html#a3d9bb9809769197bce9b2499d55cf28c", null ], + [ "tcp_send_empty_ack", "tcp__priv_8h.html#aefde3e34b2cc8df9654986484c44a996", null ], + [ "tcp_send_fin", "tcp__priv_8h.html#af40ba9d645a8910436c3d7cf13dba342", null ], + [ "tcp_slowtmr", "tcp__priv_8h.html#a421fb42ef919018e14ae413adfee9905", null ], + [ "tcp_split_unsent_seg", "tcp__priv_8h.html#ac930859c4e4ad9fcf6bb25ef5e91bcd5", null ], + [ "tcp_timer_needed", "tcp__priv_8h.html#a8181bc316fdf61b85f787c5cadfcd249", null ], + [ "tcp_tmr", "tcp__priv_8h.html#a3846a756b13214ed88ea47d0ff8279eb", null ], + [ "tcp_txnow", "tcp__priv_8h.html#a5ae0268e59fda0665fdd08c6e77ec547", null ], + [ "tcp_update_rcv_ann_wnd", "tcp__priv_8h.html#a6d2c254b779db4e517cb34e41301588d", null ], + [ "tcp_zero_window_probe", "tcp__priv_8h.html#a6c20490aa45c771c38ce8ad3031cbdf6", null ], + [ "tcp_active_pcbs", "tcp__priv_8h.html#a78c09dbae67ccc06b659d9f1a388f911", null ], + [ "tcp_bound_pcbs", "tcp__priv_8h.html#a1b42a7ac0fc173a42d575f86853d32a8", null ], + [ "tcp_listen_pcbs", "tcp__priv_8h.html#a96fe1350e510d4308ac9969ffb4c9c81", null ], + [ "tcp_pcb_lists", "tcp__priv_8h.html#af5e1079ab223e1cb27208c45e3c84df7", null ], + [ "tcp_tw_pcbs", "tcp__priv_8h.html#a9a522a66c5e1f1a4e28fe7a672cc64e3", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/tcpbase_8h.html b/Libraries/LwIP/doc/doxygen/output/html/tcpbase_8h.html new file mode 100644 index 0000000..768730c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/tcpbase_8h.html @@ -0,0 +1,104 @@ + + + + + + + +lwIP: src/include/lwip/tcpbase.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  tcpbase.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +

                  Detailed Description

                  +

                  Base TCP API definitions shared by TCP and ALTCP
                  +See also TCP

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/tcpip_8c.html b/Libraries/LwIP/doc/doxygen/output/html/tcpip_8c.html new file mode 100644 index 0000000..284f2e1 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/tcpip_8c.html @@ -0,0 +1,342 @@ + + + + + + + +lwIP: src/api/tcpip.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  tcpip.c File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/priv/tcpip_priv.h"
                  +#include "lwip/sys.h"
                  +#include "lwip/memp.h"
                  +#include "lwip/mem.h"
                  +#include "lwip/init.h"
                  +#include "lwip/ip.h"
                  +#include "lwip/pbuf.h"
                  +#include "lwip/etharp.h"
                  +#include "netif/ethernet.h"
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  err_t tcpip_inpkt (struct pbuf *p, struct netif *inp, netif_input_fn input_fn)
                   
                  err_t tcpip_input (struct pbuf *p, struct netif *inp)
                   
                  err_t tcpip_callback (tcpip_callback_fn function, void *ctx)
                   
                  err_t tcpip_try_callback (tcpip_callback_fn function, void *ctx)
                   
                  err_t tcpip_send_msg_wait_sem (tcpip_callback_fn fn, void *apimsg, sys_sem_t *sem)
                   
                  err_t tcpip_api_call (tcpip_api_call_fn fn, struct tcpip_api_call_data *call)
                   
                  struct tcpip_callback_msg * tcpip_callbackmsg_new (tcpip_callback_fn function, void *ctx)
                   
                  void tcpip_callbackmsg_delete (struct tcpip_callback_msg *msg)
                   
                  err_t tcpip_callbackmsg_trycallback (struct tcpip_callback_msg *msg)
                   
                  err_t tcpip_callbackmsg_trycallback_fromisr (struct tcpip_callback_msg *msg)
                   
                  void tcpip_init (tcpip_init_done_fn initfunc, void *arg)
                   
                  err_t pbuf_free_callback (struct pbuf *p)
                   
                  err_t mem_free_callback (void *m)
                   
                  + + + +

                  +Variables

                  sys_mutex_t lock_tcpip_core
                   
                  +

                  Detailed Description

                  +

                  Sequential API Main thread module

                  +

                  Function Documentation

                  + +

                  ◆ mem_free_callback()

                  + +
                  +
                  + + + + + + + + +
                  err_t mem_free_callback (void * m)
                  +
                  +

                  A simple wrapper function that allows you to free heap memory from interrupt context.

                  +
                  Parameters
                  + + +
                  mthe heap memory to free
                  +
                  +
                  +
                  Returns
                  ERR_OK if callback could be enqueued, an err_t if not
                  + +
                  +
                  + +

                  ◆ pbuf_free_callback()

                  + +
                  +
                  + + + + + + + + +
                  err_t pbuf_free_callback (struct pbufp)
                  +
                  +

                  A simple wrapper function that allows you to free a pbuf from interrupt context.

                  +
                  Parameters
                  + + +
                  pThe pbuf (chain) to be dereferenced.
                  +
                  +
                  +
                  Returns
                  ERR_OK if callback could be enqueued, an err_t if not
                  + +
                  +
                  + +

                  ◆ tcpip_api_call()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  err_t tcpip_api_call (tcpip_api_call_fn fn,
                  struct tcpip_api_call_data * call 
                  )
                  +
                  +

                  Synchronously calls function in TCPIP thread and waits for its completion. It is recommended to use LWIP_TCPIP_CORE_LOCKING (preferred) or LWIP_NETCONN_SEM_PER_THREAD. If not, a semaphore is created and destroyed on every call which is usually an expensive/slow operation.

                  Parameters
                  + + + +
                  fnFunction to call
                  callCall parameters
                  +
                  +
                  +
                  Returns
                  Return value from tcpip_api_call_fn
                  + +
                  +
                  + +

                  ◆ tcpip_inpkt()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t tcpip_inpkt (struct pbufp,
                  struct netifinp,
                  netif_input_fn input_fn 
                  )
                  +
                  +

                  Pass a received packet to tcpip_thread for input processing

                  +
                  Parameters
                  + + + + +
                  pthe received packet
                  inpthe network interface on which the packet was received
                  input_fninput function to call
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcpip_send_msg_wait_sem()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t tcpip_send_msg_wait_sem (tcpip_callback_fn fn,
                  void * apimsg,
                  sys_sem_t * sem 
                  )
                  +
                  +

                  Sends a message to TCPIP thread to call a function. Caller thread blocks on on a provided semaphore, which ist NOT automatically signalled by TCPIP thread, this has to be done by the user. It is recommended to use LWIP_TCPIP_CORE_LOCKING since this is the way with least runtime overhead.

                  +
                  Parameters
                  + + + + +
                  fnfunction to be called from TCPIP thread
                  apimsgargument to API function
                  semsemaphore to wait on
                  +
                  +
                  +
                  Returns
                  ERR_OK if the function was called, another err_t if not
                  + +
                  +
                  +

                  Variable Documentation

                  + +

                  ◆ lock_tcpip_core

                  + +
                  +
                  + + + + +
                  sys_mutex_t lock_tcpip_core
                  +
                  +

                  The global semaphore to lock the stack.

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/tcpip_8c.js b/Libraries/LwIP/doc/doxygen/output/html/tcpip_8c.js new file mode 100644 index 0000000..28dfc89 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/tcpip_8c.js @@ -0,0 +1,17 @@ +var tcpip_8c = +[ + [ "mem_free_callback", "tcpip_8c.html#a55b4de3765c6a37b3f2b26a11603771c", null ], + [ "pbuf_free_callback", "tcpip_8c.html#a5cdcb6b784fe0e8736a5b31a5cfbed6c", null ], + [ "tcpip_api_call", "tcpip_8c.html#a3d42b0c46607f91aedcc7745ed466b08", null ], + [ "tcpip_callback", "group__lwip__os.html#gaab838fe3417ab3a1f61f0728009a0c2a", null ], + [ "tcpip_callbackmsg_delete", "group__lwip__os.html#gac5b7a59f4c3f5f721ab9ee81f231c9fd", null ], + [ "tcpip_callbackmsg_new", "group__lwip__os.html#gaee14fa2587a9ba9d23e4c7e16c4526ac", null ], + [ "tcpip_callbackmsg_trycallback", "group__lwip__os.html#ga83fe5fb2ea33e8c262567ac46f4db3f8", null ], + [ "tcpip_callbackmsg_trycallback_fromisr", "group__lwip__os.html#ga56a234f3d895791225c3c850bfadb666", null ], + [ "tcpip_init", "group__lwip__os.html#ga1f3a88b8df6ba3b9ed1c00e0a305e3db", null ], + [ "tcpip_inpkt", "tcpip_8c.html#a93043b3c66dbe4a15a60299c6199d102", null ], + [ "tcpip_input", "group__lwip__os.html#gae510f195171bed8499ae94e264a92717", null ], + [ "tcpip_send_msg_wait_sem", "tcpip_8c.html#a12bdf37eddcd72c4178e3ea7d370395d", null ], + [ "tcpip_try_callback", "group__lwip__os.html#gaeb7b3c7414c76ad8dde14d2fba6cb020", null ], + [ "lock_tcpip_core", "tcpip_8c.html#acd7be2108e9a47fd8f1ab0a49f76241d", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/tcpip_8h.html b/Libraries/LwIP/doc/doxygen/output/html/tcpip_8h.html new file mode 100644 index 0000000..d1d1edf --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/tcpip_8h.html @@ -0,0 +1,338 @@ + + + + + + + +lwIP: src/include/lwip/tcpip.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  tcpip.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/err.h"
                  +#include "lwip/timeouts.h"
                  +#include "lwip/netif.h"
                  +
                  + + + + + + + +

                  +Macros

                  #define LOCK_TCPIP_CORE()   sys_mutex_lock(&lock_tcpip_core)
                   
                  #define UNLOCK_TCPIP_CORE()   sys_mutex_unlock(&lock_tcpip_core)
                   
                  #define tcpip_callback_with_block(function, ctx, block)   ((block != 0)? tcpip_callback(function, ctx) : tcpip_try_callback(function, ctx))
                   
                  + + + + + +

                  +Typedefs

                  typedef void(* tcpip_init_done_fn) (void *arg)
                   
                  typedef void(* tcpip_callback_fn) (void *ctx)
                   
                  + + + + + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  void tcpip_init (tcpip_init_done_fn tcpip_init_done, void *arg)
                   
                  err_t tcpip_inpkt (struct pbuf *p, struct netif *inp, netif_input_fn input_fn)
                   
                  err_t tcpip_input (struct pbuf *p, struct netif *inp)
                   
                  err_t tcpip_try_callback (tcpip_callback_fn function, void *ctx)
                   
                  err_t tcpip_callback (tcpip_callback_fn function, void *ctx)
                   
                  struct tcpip_callback_msg * tcpip_callbackmsg_new (tcpip_callback_fn function, void *ctx)
                   
                  void tcpip_callbackmsg_delete (struct tcpip_callback_msg *msg)
                   
                  err_t tcpip_callbackmsg_trycallback (struct tcpip_callback_msg *msg)
                   
                  err_t tcpip_callbackmsg_trycallback_fromisr (struct tcpip_callback_msg *msg)
                   
                  err_t pbuf_free_callback (struct pbuf *p)
                   
                  err_t mem_free_callback (void *m)
                   
                  + + + +

                  +Variables

                  sys_mutex_t lock_tcpip_core
                   
                  +

                  Detailed Description

                  +

                  Functions to sync with TCPIP thread

                  +

                  Macro Definition Documentation

                  + +

                  ◆ LOCK_TCPIP_CORE

                  + +
                  +
                  + + + + + + + +
                  #define LOCK_TCPIP_CORE()   sys_mutex_lock(&lock_tcpip_core)
                  +
                  +

                  Lock lwIP core mutex (needs LWIP_TCPIP_CORE_LOCKING 1)

                  + +
                  +
                  + +

                  ◆ UNLOCK_TCPIP_CORE

                  + +
                  +
                  + + + + + + + +
                  #define UNLOCK_TCPIP_CORE()   sys_mutex_unlock(&lock_tcpip_core)
                  +
                  +

                  Unlock lwIP core mutex (needs LWIP_TCPIP_CORE_LOCKING 1)

                  + +
                  +
                  +

                  Typedef Documentation

                  + +

                  ◆ tcpip_callback_fn

                  + +
                  +
                  + + + + +
                  typedef void(* tcpip_callback_fn) (void *ctx)
                  +
                  +

                  Function prototype for functions passed to tcpip_callback()

                  + +
                  +
                  + +

                  ◆ tcpip_init_done_fn

                  + +
                  +
                  + + + + +
                  typedef void(* tcpip_init_done_fn) (void *arg)
                  +
                  +

                  Function prototype for the init_done function passed to tcpip_init

                  + +
                  +
                  +

                  Function Documentation

                  + +

                  ◆ mem_free_callback()

                  + +
                  +
                  + + + + + + + + +
                  err_t mem_free_callback (void * m)
                  +
                  +

                  A simple wrapper function that allows you to free heap memory from interrupt context.

                  +
                  Parameters
                  + + +
                  mthe heap memory to free
                  +
                  +
                  +
                  Returns
                  ERR_OK if callback could be enqueued, an err_t if not
                  + +
                  +
                  + +

                  ◆ pbuf_free_callback()

                  + +
                  +
                  + + + + + + + + +
                  err_t pbuf_free_callback (struct pbufp)
                  +
                  +

                  A simple wrapper function that allows you to free a pbuf from interrupt context.

                  +
                  Parameters
                  + + +
                  pThe pbuf (chain) to be dereferenced.
                  +
                  +
                  +
                  Returns
                  ERR_OK if callback could be enqueued, an err_t if not
                  + +
                  +
                  + +

                  ◆ tcpip_inpkt()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t tcpip_inpkt (struct pbufp,
                  struct netifinp,
                  netif_input_fn input_fn 
                  )
                  +
                  +

                  Pass a received packet to tcpip_thread for input processing

                  +
                  Parameters
                  + + + + +
                  pthe received packet
                  inpthe network interface on which the packet was received
                  input_fninput function to call
                  +
                  +
                  + +
                  +
                  +

                  Variable Documentation

                  + +

                  ◆ lock_tcpip_core

                  + +
                  +
                  + + + + +
                  sys_mutex_t lock_tcpip_core
                  +
                  +

                  The global semaphore to lock the stack.

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/tcpip_8h.js b/Libraries/LwIP/doc/doxygen/output/html/tcpip_8h.js new file mode 100644 index 0000000..bb12665 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/tcpip_8h.js @@ -0,0 +1,20 @@ +var tcpip_8h = +[ + [ "LOCK_TCPIP_CORE", "tcpip_8h.html#a4700525e737fc025fea4887b172e0c95", null ], + [ "tcpip_callback_with_block", "group__lwip__os.html#gacd0a865623921ada2dd08962eb82c9df", null ], + [ "UNLOCK_TCPIP_CORE", "tcpip_8h.html#a915effea029b9c4891e1ec635eb1826d", null ], + [ "tcpip_callback_fn", "tcpip_8h.html#a35203296bb838f3b493839ffc6e7285d", null ], + [ "tcpip_init_done_fn", "tcpip_8h.html#a5fe07216c441e27c3028bcac60fa0992", null ], + [ "mem_free_callback", "tcpip_8h.html#a55b4de3765c6a37b3f2b26a11603771c", null ], + [ "pbuf_free_callback", "tcpip_8h.html#a5cdcb6b784fe0e8736a5b31a5cfbed6c", null ], + [ "tcpip_callback", "group__lwip__os.html#gaab838fe3417ab3a1f61f0728009a0c2a", null ], + [ "tcpip_callbackmsg_delete", "group__lwip__os.html#gac5b7a59f4c3f5f721ab9ee81f231c9fd", null ], + [ "tcpip_callbackmsg_new", "group__lwip__os.html#gaee14fa2587a9ba9d23e4c7e16c4526ac", null ], + [ "tcpip_callbackmsg_trycallback", "group__lwip__os.html#ga83fe5fb2ea33e8c262567ac46f4db3f8", null ], + [ "tcpip_callbackmsg_trycallback_fromisr", "group__lwip__os.html#ga56a234f3d895791225c3c850bfadb666", null ], + [ "tcpip_init", "group__lwip__os.html#ga1f3a88b8df6ba3b9ed1c00e0a305e3db", null ], + [ "tcpip_inpkt", "tcpip_8h.html#a93043b3c66dbe4a15a60299c6199d102", null ], + [ "tcpip_input", "group__lwip__os.html#gae510f195171bed8499ae94e264a92717", null ], + [ "tcpip_try_callback", "group__lwip__os.html#gaeb7b3c7414c76ad8dde14d2fba6cb020", null ], + [ "lock_tcpip_core", "tcpip_8h.html#acd7be2108e9a47fd8f1ab0a49f76241d", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/tcpip__priv_8h.html b/Libraries/LwIP/doc/doxygen/output/html/tcpip__priv_8h.html new file mode 100644 index 0000000..29733ee --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/tcpip__priv_8h.html @@ -0,0 +1,197 @@ + + + + + + + +lwIP: src/include/lwip/priv/tcpip_priv.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  tcpip_priv.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/tcpip.h"
                  +#include "lwip/sys.h"
                  +#include "lwip/timeouts.h"
                  +
                  + + + + + +

                  +Functions

                  err_t tcpip_send_msg_wait_sem (tcpip_callback_fn fn, void *apimsg, sys_sem_t *sem)
                   
                  err_t tcpip_api_call (tcpip_api_call_fn fn, struct tcpip_api_call_data *call)
                   
                  +

                  Detailed Description

                  +

                  TCPIP API internal implementations (do not use in application code)

                  +

                  Function Documentation

                  + +

                  ◆ tcpip_api_call()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  err_t tcpip_api_call (tcpip_api_call_fn fn,
                  struct tcpip_api_call_data * call 
                  )
                  +
                  +

                  Synchronously calls function in TCPIP thread and waits for its completion. It is recommended to use LWIP_TCPIP_CORE_LOCKING (preferred) or LWIP_NETCONN_SEM_PER_THREAD. If not, a semaphore is created and destroyed on every call which is usually an expensive/slow operation.

                  Parameters
                  + + + +
                  fnFunction to call
                  callCall parameters
                  +
                  +
                  +
                  Returns
                  Return value from tcpip_api_call_fn
                  + +
                  +
                  + +

                  ◆ tcpip_send_msg_wait_sem()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  err_t tcpip_send_msg_wait_sem (tcpip_callback_fn fn,
                  void * apimsg,
                  sys_sem_t * sem 
                  )
                  +
                  +

                  Sends a message to TCPIP thread to call a function. Caller thread blocks on on a provided semaphore, which ist NOT automatically signalled by TCPIP thread, this has to be done by the user. It is recommended to use LWIP_TCPIP_CORE_LOCKING since this is the way with least runtime overhead.

                  +
                  Parameters
                  + + + + +
                  fnfunction to be called from TCPIP thread
                  apimsgargument to API function
                  semsemaphore to wait on
                  +
                  +
                  +
                  Returns
                  ERR_OK if the function was called, another err_t if not
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/tcpip__priv_8h.js b/Libraries/LwIP/doc/doxygen/output/html/tcpip__priv_8h.js new file mode 100644 index 0000000..7cf5cad --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/tcpip__priv_8h.js @@ -0,0 +1,5 @@ +var tcpip__priv_8h = +[ + [ "tcpip_api_call", "tcpip__priv_8h.html#a3d42b0c46607f91aedcc7745ed466b08", null ], + [ "tcpip_send_msg_wait_sem", "tcpip__priv_8h.html#a12bdf37eddcd72c4178e3ea7d370395d", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/tftp__opts_8h.html b/Libraries/LwIP/doc/doxygen/output/html/tftp__opts_8h.html new file mode 100644 index 0000000..c78fa38 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/tftp__opts_8h.html @@ -0,0 +1,129 @@ + + + + + + + +lwIP: src/include/lwip/apps/tftp_opts.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  tftp_opts.h File Reference
                  +
                  +
                  + +

                  Trivial File Transfer Protocol (RFC 1350) implementation options. +More...

                  +
                  #include "lwip/opt.h"
                  +#include "lwip/prot/iana.h"
                  +
                  + + + + + + + + + + + + + + + +

                  +Macros

                  #define TFTP_DEBUG   LWIP_DBG_OFF
                   
                  #define TFTP_PORT   LWIP_IANA_PORT_TFTP
                   
                  #define TFTP_TIMEOUT_MSECS   10000
                   
                  #define TFTP_MAX_RETRIES   5
                   
                  #define TFTP_TIMER_MSECS   (TFTP_TIMEOUT_MSECS / 10)
                   
                  #define TFTP_MAX_FILENAME_LEN   20
                   
                  #define TFTP_MAX_MODE_LEN   7
                   
                  +

                  Detailed Description

                  +

                  Trivial File Transfer Protocol (RFC 1350) implementation options.

                  +
                  Author
                  Logan Gunthorpe logan.nosp@m.g@de.nosp@m.ltate.nosp@m.e.co.nosp@m.m
                  +

                  Copyright (c) Deltatee Enterprises Ltd. 2013 All rights reserved.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/tftp__opts_8h.js b/Libraries/LwIP/doc/doxygen/output/html/tftp__opts_8h.js new file mode 100644 index 0000000..a7819da --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/tftp__opts_8h.js @@ -0,0 +1,10 @@ +var tftp__opts_8h = +[ + [ "TFTP_DEBUG", "group__tftp__opts.html#ga2dd54a1d0c3006527b8a7a8604b81981", null ], + [ "TFTP_MAX_FILENAME_LEN", "group__tftp__opts.html#ga8e975900b4397313f1a649ff76a3063b", null ], + [ "TFTP_MAX_MODE_LEN", "group__tftp__opts.html#gaa8a449c25e37be757f5efccd422c9055", null ], + [ "TFTP_MAX_RETRIES", "group__tftp__opts.html#ga6a01757ad942eb602e8a87e2be42d313", null ], + [ "TFTP_PORT", "group__tftp__opts.html#gad9230620a5d3bb87a7ac280ff99875d1", null ], + [ "TFTP_TIMEOUT_MSECS", "group__tftp__opts.html#ga36986e5465dc2ccb6184fc57f9a37d63", null ], + [ "TFTP_TIMER_MSECS", "group__tftp__opts.html#ga3e6caacb3f4d43f780b2d68ffe4258ea", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/tftp__server_8c.html b/Libraries/LwIP/doc/doxygen/output/html/tftp__server_8c.html new file mode 100644 index 0000000..3d8aa56 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/tftp__server_8c.html @@ -0,0 +1,122 @@ + + + + + + + +lwIP: src/apps/tftp/tftp_server.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  tftp_server.c File Reference
                  +
                  +
                  + +

                  Trivial File Transfer Protocol (RFC 1350) +More...

                  +
                  #include "lwip/apps/tftp_server.h"
                  +#include "lwip/udp.h"
                  +#include "lwip/timeouts.h"
                  +#include "lwip/debug.h"
                  +#include <string.h>
                  +
                  + + + + + +

                  +Functions

                  err_t tftp_init (const struct tftp_context *ctx)
                   
                  void tftp_cleanup (void)
                   
                  +

                  Detailed Description

                  +

                  Trivial File Transfer Protocol (RFC 1350)

                  +
                  Author
                  Logan Gunthorpe logan.nosp@m.g@de.nosp@m.ltate.nosp@m.e.co.nosp@m.m Dirk Ziegelmeier dzieg.nosp@m.el@g.nosp@m.mx.de
                  +

                  Copyright (c) Deltatee Enterprises Ltd. 2013 All rights reserved.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/tftp__server_8c.js b/Libraries/LwIP/doc/doxygen/output/html/tftp__server_8c.js new file mode 100644 index 0000000..868e743 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/tftp__server_8c.js @@ -0,0 +1,5 @@ +var tftp__server_8c = +[ + [ "tftp_cleanup", "group__tftp.html#gabb4a4e24b5c7ec8df70ec5a68a206dec", null ], + [ "tftp_init", "group__tftp.html#ga7a80673a1324da5c8ae2440af7b008a3", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/tftp__server_8h.html b/Libraries/LwIP/doc/doxygen/output/html/tftp__server_8h.html new file mode 100644 index 0000000..792e01d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/tftp__server_8h.html @@ -0,0 +1,126 @@ + + + + + + + +lwIP: src/include/lwip/apps/tftp_server.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  tftp_server.h File Reference
                  +
                  +
                  + +

                  Trivial File Transfer Protocol (RFC 1350) +More...

                  +
                  #include "lwip/apps/tftp_opts.h"
                  +#include "lwip/err.h"
                  +#include "lwip/pbuf.h"
                  +
                  + + + +

                  +Data Structures

                  struct  tftp_context
                   
                  + + + + + +

                  +Functions

                  err_t tftp_init (const struct tftp_context *ctx)
                   
                  void tftp_cleanup (void)
                   
                  +

                  Detailed Description

                  +

                  Trivial File Transfer Protocol (RFC 1350)

                  +
                  Author
                  Logan Gunthorpe logan.nosp@m.g@de.nosp@m.ltate.nosp@m.e.co.nosp@m.m
                  +

                  Copyright (c) Deltatee Enterprises Ltd. 2013 All rights reserved.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/tftp__server_8h.js b/Libraries/LwIP/doc/doxygen/output/html/tftp__server_8h.js new file mode 100644 index 0000000..3fc62f9 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/tftp__server_8h.js @@ -0,0 +1,5 @@ +var tftp__server_8h = +[ + [ "tftp_cleanup", "group__tftp.html#gabb4a4e24b5c7ec8df70ec5a68a206dec", null ], + [ "tftp_init", "group__tftp.html#ga7a80673a1324da5c8ae2440af7b008a3", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/timeouts_8c.html b/Libraries/LwIP/doc/doxygen/output/html/timeouts_8c.html new file mode 100644 index 0000000..958565d --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/timeouts_8c.html @@ -0,0 +1,338 @@ + + + + + + + +lwIP: src/core/timeouts.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  timeouts.c File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/timeouts.h"
                  +#include "lwip/priv/tcp_priv.h"
                  +#include "lwip/def.h"
                  +#include "lwip/memp.h"
                  +#include "lwip/priv/tcpip_priv.h"
                  +#include "lwip/ip4_frag.h"
                  +#include "lwip/etharp.h"
                  +#include "lwip/dhcp.h"
                  +#include "lwip/autoip.h"
                  +#include "lwip/igmp.h"
                  +#include "lwip/dns.h"
                  +#include "lwip/nd6.h"
                  +#include "lwip/ip6_frag.h"
                  +#include "lwip/mld6.h"
                  +#include "lwip/dhcp6.h"
                  +#include "lwip/sys.h"
                  +#include "lwip/pbuf.h"
                  +
                  + + + + + + + + + + + + + + + +

                  +Functions

                  void tcp_timer_needed (void)
                   
                  void sys_timeouts_init (void)
                   
                  void sys_timeout (u32_t msecs, sys_timeout_handler handler, void *arg)
                   
                  void sys_untimeout (sys_timeout_handler handler, void *arg)
                   
                  void sys_check_timeouts (void)
                   
                  void sys_restart_timeouts (void)
                   
                  u32_t sys_timeouts_sleeptime (void)
                   
                  + + + + + +

                  +Variables

                  const struct lwip_cyclic_timer lwip_cyclic_timers []
                   
                  const int lwip_num_cyclic_timers = (sizeof( lwip_cyclic_timers )/sizeof(( lwip_cyclic_timers )[0]))
                   
                  +

                  Detailed Description

                  +

                  Stack-internal timers implementation. This file includes timer callbacks for stack-internal timers as well as functions to set up or stop timers and check for expired timers.

                  +

                  Function Documentation

                  + +

                  ◆ sys_restart_timeouts()

                  + +
                  +
                  + + + + + + + + +
                  void sys_restart_timeouts (void )
                  +
                  +

                  Rebase the timeout times to the current time. This is necessary if sys_check_timeouts() hasn't been called for a long time (e.g. while saving energy) to prevent all timer functions of that period being called.

                  + +
                  +
                  + +

                  ◆ sys_timeout()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  void sys_timeout (u32_t msecs,
                  sys_timeout_handler handler,
                  void * arg 
                  )
                  +
                  +

                  Create a one-shot timer (aka timeout). Timeouts are processed in the following cases:

                    +
                  • while waiting for a message using sys_timeouts_mbox_fetch()
                  • +
                  • by calling sys_check_timeouts() (NO_SYS==1 only)
                  • +
                  +
                  Parameters
                  + + + + +
                  msecstime in milliseconds after that the timer should expire
                  handlercallback function to call when msecs have elapsed
                  argargument to pass to the callback function
                  +
                  +
                  + +
                  +
                  + +

                  ◆ sys_timeouts_init()

                  + +
                  +
                  + + + + + + + + +
                  void sys_timeouts_init (void )
                  +
                  +

                  Initialize this module

                  + +
                  +
                  + +

                  ◆ sys_timeouts_sleeptime()

                  + +
                  +
                  + + + + + + + + +
                  u32_t sys_timeouts_sleeptime (void )
                  +
                  +

                  Return the time left before the next timeout is due. If no timeouts are enqueued, returns 0xffffffff

                  + +
                  +
                  + +

                  ◆ sys_untimeout()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void sys_untimeout (sys_timeout_handler handler,
                  void * arg 
                  )
                  +
                  +

                  Go through timeout list (for this task only) and remove the first matching entry (subsequent entries remain untouched), even though the timeout has not triggered yet.

                  +
                  Parameters
                  + + + +
                  handlercallback function that would be called by the timeout
                  argcallback argument that would be passed to handler
                  +
                  +
                  + +
                  +
                  + +

                  ◆ tcp_timer_needed()

                  + +
                  +
                  + + + + + + + + +
                  void tcp_timer_needed (void )
                  +
                  +

                  Called from TCP_REG when registering a new PCB: the reason is to have the TCP timer only running when there are active (or time-wait) PCBs.

                  + +
                  +
                  +

                  Variable Documentation

                  + +

                  ◆ lwip_cyclic_timers

                  + +
                  +
                  + + + + +
                  const struct lwip_cyclic_timer lwip_cyclic_timers[]
                  +
                  +

                  This array contains all stack-internal cyclic timers. To get the number of timers, use LWIP_ARRAYSIZE()

                  + +
                  +
                  + +

                  ◆ lwip_num_cyclic_timers

                  + +
                  +
                  + + + + +
                  const int lwip_num_cyclic_timers = (sizeof( lwip_cyclic_timers )/sizeof(( lwip_cyclic_timers )[0]))
                  +
                  +

                  Array size of lwip_cyclic_timers[]

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/timeouts_8c.js b/Libraries/LwIP/doc/doxygen/output/html/timeouts_8c.js new file mode 100644 index 0000000..f903345 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/timeouts_8c.js @@ -0,0 +1,12 @@ +var timeouts_8c = +[ + [ "sys_check_timeouts", "group__lwip__nosys.html#ga83cffdf69ab60fd0eba9d17d363f9883", null ], + [ "sys_restart_timeouts", "timeouts_8c.html#a6913959cf264dbe876b7e7c4db1cc13e", null ], + [ "sys_timeout", "timeouts_8c.html#a8deed391626ec8b5423998e33782d7a8", null ], + [ "sys_timeouts_init", "timeouts_8c.html#a60f42f167f496f6f740c8df48f4dd26c", null ], + [ "sys_timeouts_sleeptime", "timeouts_8c.html#aa9971a14a5810cfeb1efd7104cde6664", null ], + [ "sys_untimeout", "timeouts_8c.html#adbfcaa78f4b8d71ae0d7f0bcab6f8fb6", null ], + [ "tcp_timer_needed", "timeouts_8c.html#a8181bc316fdf61b85f787c5cadfcd249", null ], + [ "lwip_cyclic_timers", "timeouts_8c.html#addc06ab816f051a0fe6f280972eed142", null ], + [ "lwip_num_cyclic_timers", "timeouts_8c.html#a9d01f287a19f20b073d3a1c306ecbfcd", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/timeouts_8h.html b/Libraries/LwIP/doc/doxygen/output/html/timeouts_8h.html new file mode 100644 index 0000000..9ff7abe --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/timeouts_8h.html @@ -0,0 +1,376 @@ + + + + + + + +lwIP: src/include/lwip/timeouts.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  timeouts.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/err.h"
                  +#include "lwip/sys.h"
                  +
                  + + + +

                  +Data Structures

                  struct  lwip_cyclic_timer
                   
                  + + + +

                  +Macros

                  #define SYS_TIMEOUTS_SLEEPTIME_INFINITE   0xFFFFFFFF
                   
                  + + + + + +

                  +Typedefs

                  typedef void(* lwip_cyclic_timer_handler) (void)
                   
                  typedef void(* sys_timeout_handler) (void *arg)
                   
                  + + + + + + + + + + + + + +

                  +Functions

                  void sys_timeouts_init (void)
                   
                  void sys_timeout (u32_t msecs, sys_timeout_handler handler, void *arg)
                   
                  void sys_untimeout (sys_timeout_handler handler, void *arg)
                   
                  void sys_restart_timeouts (void)
                   
                  void sys_check_timeouts (void)
                   
                  u32_t sys_timeouts_sleeptime (void)
                   
                  + + + + + +

                  +Variables

                  const struct lwip_cyclic_timer lwip_cyclic_timers []
                   
                  const int lwip_num_cyclic_timers
                   
                  +

                  Detailed Description

                  +

                  Timer implementations

                  +

                  Macro Definition Documentation

                  + +

                  ◆ SYS_TIMEOUTS_SLEEPTIME_INFINITE

                  + +
                  +
                  + + + + +
                  #define SYS_TIMEOUTS_SLEEPTIME_INFINITE   0xFFFFFFFF
                  +
                  +

                  Returned by sys_timeouts_sleeptime() to indicate there is no timer, so we can sleep forever.

                  + +
                  +
                  +

                  Typedef Documentation

                  + +

                  ◆ lwip_cyclic_timer_handler

                  + +
                  +
                  + + + + +
                  typedef void(* lwip_cyclic_timer_handler) (void)
                  +
                  +

                  Function prototype for a stack-internal timer function that has to be called at a defined interval

                  + +
                  +
                  + +

                  ◆ sys_timeout_handler

                  + +
                  +
                  + + + + +
                  typedef void(* sys_timeout_handler) (void *arg)
                  +
                  +

                  Function prototype for a timeout callback function. Register such a function using sys_timeout().

                  +
                  Parameters
                  + + +
                  argAdditional argument to pass to the function - set up by sys_timeout()
                  +
                  +
                  + +
                  +
                  +

                  Function Documentation

                  + +

                  ◆ sys_restart_timeouts()

                  + +
                  +
                  + + + + + + + + +
                  void sys_restart_timeouts (void )
                  +
                  +

                  Rebase the timeout times to the current time. This is necessary if sys_check_timeouts() hasn't been called for a long time (e.g. while saving energy) to prevent all timer functions of that period being called.

                  + +
                  +
                  + +

                  ◆ sys_timeout()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + +
                  void sys_timeout (u32_t msecs,
                  sys_timeout_handler handler,
                  void * arg 
                  )
                  +
                  +

                  Create a one-shot timer (aka timeout). Timeouts are processed in the following cases:

                    +
                  • while waiting for a message using sys_timeouts_mbox_fetch()
                  • +
                  • by calling sys_check_timeouts() (NO_SYS==1 only)
                  • +
                  +
                  Parameters
                  + + + + +
                  msecstime in milliseconds after that the timer should expire
                  handlercallback function to call when msecs have elapsed
                  argargument to pass to the callback function
                  +
                  +
                  + +
                  +
                  + +

                  ◆ sys_timeouts_init()

                  + +
                  +
                  + + + + + + + + +
                  void sys_timeouts_init (void )
                  +
                  +

                  Initialize this module

                  + +
                  +
                  + +

                  ◆ sys_timeouts_sleeptime()

                  + +
                  +
                  + + + + + + + + +
                  u32_t sys_timeouts_sleeptime (void )
                  +
                  +

                  Return the time left before the next timeout is due. If no timeouts are enqueued, returns 0xffffffff

                  + +
                  +
                  + +

                  ◆ sys_untimeout()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void sys_untimeout (sys_timeout_handler handler,
                  void * arg 
                  )
                  +
                  +

                  Go through timeout list (for this task only) and remove the first matching entry (subsequent entries remain untouched), even though the timeout has not triggered yet.

                  +
                  Parameters
                  + + + +
                  handlercallback function that would be called by the timeout
                  argcallback argument that would be passed to handler
                  +
                  +
                  + +
                  +
                  +

                  Variable Documentation

                  + +

                  ◆ lwip_cyclic_timers

                  + +
                  +
                  + + + + +
                  const struct lwip_cyclic_timer lwip_cyclic_timers[]
                  +
                  +

                  This array contains all stack-internal cyclic timers. To get the number of timers, use lwip_num_cyclic_timers

                  +

                  This array contains all stack-internal cyclic timers. To get the number of timers, use LWIP_ARRAYSIZE()

                  + +
                  +
                  + +

                  ◆ lwip_num_cyclic_timers

                  + +
                  +
                  + + + + +
                  const int lwip_num_cyclic_timers
                  +
                  +

                  Array size of lwip_cyclic_timers[]

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/timeouts_8h.js b/Libraries/LwIP/doc/doxygen/output/html/timeouts_8h.js new file mode 100644 index 0000000..341de0a --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/timeouts_8h.js @@ -0,0 +1,15 @@ +var timeouts_8h = +[ + [ "lwip_cyclic_timer", "structlwip__cyclic__timer.html", null ], + [ "SYS_TIMEOUTS_SLEEPTIME_INFINITE", "timeouts_8h.html#a9e2b2593e709ff54c7e3c0b003f6f1b0", null ], + [ "lwip_cyclic_timer_handler", "timeouts_8h.html#a985c5d366b62bd179195e093ffcb7ecd", null ], + [ "sys_timeout_handler", "timeouts_8h.html#a2ab5bb8173f492563f70a519011b0ac1", null ], + [ "sys_check_timeouts", "group__lwip__nosys.html#ga83cffdf69ab60fd0eba9d17d363f9883", null ], + [ "sys_restart_timeouts", "timeouts_8h.html#a6913959cf264dbe876b7e7c4db1cc13e", null ], + [ "sys_timeout", "timeouts_8h.html#a8deed391626ec8b5423998e33782d7a8", null ], + [ "sys_timeouts_init", "timeouts_8h.html#a60f42f167f496f6f740c8df48f4dd26c", null ], + [ "sys_timeouts_sleeptime", "timeouts_8h.html#aa9971a14a5810cfeb1efd7104cde6664", null ], + [ "sys_untimeout", "timeouts_8h.html#adbfcaa78f4b8d71ae0d7f0bcab6f8fb6", null ], + [ "lwip_cyclic_timers", "timeouts_8h.html#addc06ab816f051a0fe6f280972eed142", null ], + [ "lwip_num_cyclic_timers", "timeouts_8h.html#a9d01f287a19f20b073d3a1c306ecbfcd", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/udp_8c.html b/Libraries/LwIP/doc/doxygen/output/html/udp_8c.html new file mode 100644 index 0000000..b5f3b7c --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/udp_8c.html @@ -0,0 +1,248 @@ + + + + + + + +lwIP: src/core/udp.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  udp.c File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/udp.h"
                  +#include "lwip/def.h"
                  +#include "lwip/memp.h"
                  +#include "lwip/inet_chksum.h"
                  +#include "lwip/ip_addr.h"
                  +#include "lwip/ip6.h"
                  +#include "lwip/ip6_addr.h"
                  +#include "lwip/netif.h"
                  +#include "lwip/icmp.h"
                  +#include "lwip/icmp6.h"
                  +#include "lwip/stats.h"
                  +#include "lwip/snmp.h"
                  +#include "lwip/dhcp.h"
                  +#include <string.h>
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  void udp_init (void)
                   
                  void udp_input (struct pbuf *p, struct netif *inp)
                   
                  err_t udp_send (struct udp_pcb *pcb, struct pbuf *p)
                   
                  err_t udp_sendto (struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, u16_t dst_port)
                   
                  err_t udp_sendto_if (struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif)
                   
                  err_t udp_sendto_if_src (struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif, const ip_addr_t *src_ip)
                   
                  err_t udp_bind (struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port)
                   
                  void udp_bind_netif (struct udp_pcb *pcb, const struct netif *netif)
                   
                  err_t udp_connect (struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port)
                   
                  void udp_disconnect (struct udp_pcb *pcb)
                   
                  void udp_recv (struct udp_pcb *pcb, udp_recv_fn recv, void *recv_arg)
                   
                  void udp_remove (struct udp_pcb *pcb)
                   
                  struct udp_pcbudp_new (void)
                   
                  struct udp_pcbudp_new_ip_type (u8_t type)
                   
                  void udp_netif_ip_addr_changed (const ip_addr_t *old_addr, const ip_addr_t *new_addr)
                   
                  +

                  Detailed Description

                  +

                  User Datagram Protocol module
                  +The code for the User Datagram Protocol UDP & UDPLite (RFC 3828).
                  +See also UDP

                  +

                  Function Documentation

                  + +

                  ◆ udp_init()

                  + +
                  +
                  + + + + + + + + +
                  void udp_init (void )
                  +
                  +

                  Initialize this module.

                  + +
                  +
                  + +

                  ◆ udp_input()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void udp_input (struct pbufp,
                  struct netifinp 
                  )
                  +
                  +

                  Process an incoming UDP datagram.

                  +

                  Given an incoming UDP datagram (as a chain of pbufs) this function finds a corresponding UDP PCB and hands over the pbuf to the pcbs recv function. If no pcb is found or the datagram is incorrect, the pbuf is freed.

                  +
                  Parameters
                  + + + +
                  ppbuf to be demultiplexed to a UDP PCB (p->payload pointing to the UDP header)
                  inpnetwork interface on which the datagram was received.
                  +
                  +
                  + +
                  +
                  + +

                  ◆ udp_netif_ip_addr_changed()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void udp_netif_ip_addr_changed (const ip_addr_told_addr,
                  const ip_addr_tnew_addr 
                  )
                  +
                  +

                  This function is called from netif.c when address is changed

                  +
                  Parameters
                  + + + +
                  old_addrIP address of the netif before change
                  new_addrIP address of the netif after change
                  +
                  +
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/udp_8c.js b/Libraries/LwIP/doc/doxygen/output/html/udp_8c.js new file mode 100644 index 0000000..6ca7a00 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/udp_8c.js @@ -0,0 +1,18 @@ +var udp_8c = +[ + [ "udp_bind", "group__udp__raw.html#gac7fbda8b12b9b9360e92b51e805e799e", null ], + [ "udp_bind_netif", "group__udp__raw.html#ga4360535ae72e77019721c9637a1051a8", null ], + [ "udp_connect", "group__udp__raw.html#ga83625967670477aa254643129a53971b", null ], + [ "udp_disconnect", "group__udp__raw.html#ga8d26559743e59e4b409c92a268ee67fc", null ], + [ "udp_init", "udp_8c.html#ae7f7431ce99333577d7b82b26619309e", null ], + [ "udp_input", "udp_8c.html#a7b338a5515606bd51976fbc5bcec9611", null ], + [ "udp_netif_ip_addr_changed", "udp_8c.html#ab857f86a0b15d02b864292b161b2c3fc", null ], + [ "udp_new", "group__udp__raw.html#gaa6d6430499acae43d342f0e68ddbb209", null ], + [ "udp_new_ip_type", "group__udp__raw.html#gaf1ab236050dd351e93f112cfbc1ada88", null ], + [ "udp_recv", "group__udp__raw.html#gada6d02b9a5f35e1fb2e1bc71b11e6027", null ], + [ "udp_remove", "group__udp__raw.html#ga3aed8e469f74f960837ebf9f34acf646", null ], + [ "udp_send", "group__udp__raw.html#gaa4546c43981f043c0ae4514d625cc3fc", null ], + [ "udp_sendto", "group__udp__raw.html#gaa0e135a5958f1f0cc83cbeb609e18743", null ], + [ "udp_sendto_if", "group__udp__raw.html#ga83f8c873671ca7f307d14b29a0a7a142", null ], + [ "udp_sendto_if_src", "group__udp__raw.html#gaa389827c979c766c1dae301239f7bbb7", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/udp_8h.html b/Libraries/LwIP/doc/doxygen/output/html/udp_8h.html new file mode 100644 index 0000000..155f04a --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/udp_8h.html @@ -0,0 +1,278 @@ + + + + + + + +lwIP: src/include/lwip/udp.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  udp.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "lwip/pbuf.h"
                  +#include "lwip/netif.h"
                  +#include "lwip/ip_addr.h"
                  +#include "lwip/ip.h"
                  +#include "lwip/ip6_addr.h"
                  +#include "lwip/prot/udp.h"
                  +
                  + + + +

                  +Data Structures

                  struct  udp_pcb
                   
                  + + + +

                  +Typedefs

                  typedef void(* udp_recv_fn) (void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port)
                   
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                  +Functions

                  struct udp_pcbudp_new (void)
                   
                  struct udp_pcbudp_new_ip_type (u8_t type)
                   
                  void udp_remove (struct udp_pcb *pcb)
                   
                  err_t udp_bind (struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port)
                   
                  void udp_bind_netif (struct udp_pcb *pcb, const struct netif *netif)
                   
                  err_t udp_connect (struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port)
                   
                  void udp_disconnect (struct udp_pcb *pcb)
                   
                  void udp_recv (struct udp_pcb *pcb, udp_recv_fn recv, void *recv_arg)
                   
                  err_t udp_sendto_if (struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif)
                   
                  err_t udp_sendto_if_src (struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif, const ip_addr_t *src_ip)
                   
                  err_t udp_sendto (struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, u16_t dst_port)
                   
                  err_t udp_send (struct udp_pcb *pcb, struct pbuf *p)
                   
                  void udp_input (struct pbuf *p, struct netif *inp)
                   
                  void udp_init (void)
                   
                  void udp_netif_ip_addr_changed (const ip_addr_t *old_addr, const ip_addr_t *new_addr)
                   
                  +

                  Detailed Description

                  +

                  UDP API (to be used from TCPIP thread)
                  +See also UDP

                  +

                  Typedef Documentation

                  + +

                  ◆ udp_recv_fn

                  + +
                  +
                  + + + + +
                  typedef void(* udp_recv_fn) (void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port)
                  +
                  +

                  Function prototype for udp pcb receive callback functions addr and port are in same byte order as in the pcb The callback is responsible for freeing the pbuf if it's not used any more.

                  +

                  ATTENTION: Be aware that 'addr' might point into the pbuf 'p' so freeing this pbuf can make 'addr' invalid, too.

                  +
                  Parameters
                  + + + + + + +
                  arguser supplied argument (udp_pcb.recv_arg)
                  pcbthe udp_pcb which received data
                  pthe packet buffer that was received
                  addrthe remote IP address from which the packet was received
                  portthe remote port from which the packet was received
                  +
                  +
                  + +
                  +
                  +

                  Function Documentation

                  + +

                  ◆ udp_init()

                  + +
                  +
                  + + + + + + + + +
                  void udp_init (void )
                  +
                  +

                  Initialize this module.

                  + +
                  +
                  + +

                  ◆ udp_input()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void udp_input (struct pbufp,
                  struct netifinp 
                  )
                  +
                  +

                  Process an incoming UDP datagram.

                  +

                  Given an incoming UDP datagram (as a chain of pbufs) this function finds a corresponding UDP PCB and hands over the pbuf to the pcbs recv function. If no pcb is found or the datagram is incorrect, the pbuf is freed.

                  +
                  Parameters
                  + + + +
                  ppbuf to be demultiplexed to a UDP PCB (p->payload pointing to the UDP header)
                  inpnetwork interface on which the datagram was received.
                  +
                  +
                  + +
                  +
                  + +

                  ◆ udp_netif_ip_addr_changed()

                  + +
                  +
                  + + + + + + + + + + + + + + + + + + +
                  void udp_netif_ip_addr_changed (const ip_addr_told_addr,
                  const ip_addr_tnew_addr 
                  )
                  +
                  +

                  This function is called from netif.c when address is changed

                  +
                  Parameters
                  + + + +
                  old_addrIP address of the netif before change
                  new_addrIP address of the netif after change
                  +
                  +
                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/udp_8h.js b/Libraries/LwIP/doc/doxygen/output/html/udp_8h.js new file mode 100644 index 0000000..ce86569 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/udp_8h.js @@ -0,0 +1,20 @@ +var udp_8h = +[ + [ "udp_pcb", "structudp__pcb.html", "structudp__pcb" ], + [ "udp_recv_fn", "udp_8h.html#af0ec7feb31acdb6e11b928f438c8a64b", null ], + [ "udp_bind", "group__udp__raw.html#gac7fbda8b12b9b9360e92b51e805e799e", null ], + [ "udp_bind_netif", "group__udp__raw.html#ga4360535ae72e77019721c9637a1051a8", null ], + [ "udp_connect", "group__udp__raw.html#ga83625967670477aa254643129a53971b", null ], + [ "udp_disconnect", "group__udp__raw.html#ga8d26559743e59e4b409c92a268ee67fc", null ], + [ "udp_init", "udp_8h.html#ae7f7431ce99333577d7b82b26619309e", null ], + [ "udp_input", "udp_8h.html#a7b338a5515606bd51976fbc5bcec9611", null ], + [ "udp_netif_ip_addr_changed", "udp_8h.html#ab857f86a0b15d02b864292b161b2c3fc", null ], + [ "udp_new", "group__udp__raw.html#gaa6d6430499acae43d342f0e68ddbb209", null ], + [ "udp_new_ip_type", "group__udp__raw.html#gaf1ab236050dd351e93f112cfbc1ada88", null ], + [ "udp_recv", "group__udp__raw.html#gada6d02b9a5f35e1fb2e1bc71b11e6027", null ], + [ "udp_remove", "group__udp__raw.html#ga3aed8e469f74f960837ebf9f34acf646", null ], + [ "udp_send", "group__udp__raw.html#gaa4546c43981f043c0ae4514d625cc3fc", null ], + [ "udp_sendto", "group__udp__raw.html#gaa0e135a5958f1f0cc83cbeb609e18743", null ], + [ "udp_sendto_if", "group__udp__raw.html#ga83f8c873671ca7f307d14b29a0a7a142", null ], + [ "udp_sendto_if_src", "group__udp__raw.html#gaa389827c979c766c1dae301239f7bbb7", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/unionnetif__ext__callback__args__t.html b/Libraries/LwIP/doc/doxygen/output/html/unionnetif__ext__callback__args__t.html new file mode 100644 index 0000000..e8a72b3 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/unionnetif__ext__callback__args__t.html @@ -0,0 +1,123 @@ + + + + + + + +lwIP: netif_ext_callback_args_t Union Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  netif_ext_callback_args_t Union Reference
                  +
                  +
                  + +

                  #include <netif.h>

                  + + + + + + + + + + + + +

                  +Data Structures

                  struct  ipv4_changed_s
                   
                  struct  ipv6_addr_state_changed_s
                   
                  struct  ipv6_set_s
                   
                  struct  link_changed_s
                   
                  struct  status_changed_s
                   
                  +

                  Detailed Description

                  +

                  Argument supplied to netif_ext_callback_fn.

                  +

                  The documentation for this union was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/unionnetif__ext__callback__args__t.js b/Libraries/LwIP/doc/doxygen/output/html/unionnetif__ext__callback__args__t.js new file mode 100644 index 0000000..22b73ea --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/unionnetif__ext__callback__args__t.js @@ -0,0 +1,8 @@ +var unionnetif__ext__callback__args__t = +[ + [ "ipv4_changed_s", "structnetif__ext__callback__args__t_1_1ipv4__changed__s.html", "structnetif__ext__callback__args__t_1_1ipv4__changed__s" ], + [ "ipv6_addr_state_changed_s", "structnetif__ext__callback__args__t_1_1ipv6__addr__state__changed__s.html", "structnetif__ext__callback__args__t_1_1ipv6__addr__state__changed__s" ], + [ "ipv6_set_s", "structnetif__ext__callback__args__t_1_1ipv6__set__s.html", "structnetif__ext__callback__args__t_1_1ipv6__set__s" ], + [ "link_changed_s", "structnetif__ext__callback__args__t_1_1link__changed__s.html", "structnetif__ext__callback__args__t_1_1link__changed__s" ], + [ "status_changed_s", "structnetif__ext__callback__args__t_1_1status__changed__s.html", "structnetif__ext__callback__args__t_1_1status__changed__s" ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/unionsnmp__variant__value.html b/Libraries/LwIP/doc/doxygen/output/html/unionsnmp__variant__value.html new file mode 100644 index 0000000..f7136c8 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/unionsnmp__variant__value.html @@ -0,0 +1,107 @@ + + + + + + + +lwIP: snmp_variant_value Union Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  snmp_variant_value Union Reference
                  +
                  +
                  + +

                  #include <snmp_core.h>

                  +

                  Detailed Description

                  +

                  SNMP variant value, used as reference in struct snmp_node_instance and table implementation

                  +

                  The documentation for this union was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/unionsockaddr__aligned.html b/Libraries/LwIP/doc/doxygen/output/html/unionsockaddr__aligned.html new file mode 100644 index 0000000..d947a42 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/unionsockaddr__aligned.html @@ -0,0 +1,105 @@ + + + + + + + +lwIP: sockaddr_aligned Union Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  sockaddr_aligned Union Reference
                  +
                  +
                  +

                  Detailed Description

                  +

                  A struct sockaddr replacement that has the same alignment as sockaddr_in/ sockaddr_in6 if instantiated.

                  +

                  The documentation for this union was generated from the following file: +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/upgrading.html b/Libraries/LwIP/doc/doxygen/output/html/upgrading.html new file mode 100644 index 0000000..2f248e1 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/upgrading.html @@ -0,0 +1,377 @@ + + + + + + + +lwIP: Upgrading + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  Upgrading
                  +
                  +
                  +
                  This file lists major changes between release versions that require
                  +ports or applications to be changed. Use it to update a port or an
                  +application written for an older version of lwIP to correctly work
                  +with newer versions.
                  +
                  +
                  +(git master)
                  +
                  +  * [Enter new changes just after this line - do not remove this line]
                  +
                  +(2.1.0)
                  +
                  +  ++ Application changes:
                  +
                  +  * Use the new altcp API for seamless TLS integration into existing TCP applications (see changelog)
                  +  * TCP only kills existing connections with a LOWER priority than the one currently being opened.
                  +    Previous implementations also kill existing connections of the SAME priority.
                  +  * ip4_route_src: parameter order is reversed: ip4_route_src(dest, src) -> ip4_route_src(src, dest)
                  +    to make parameter order consistent with other ip*_route*() functions.
                  +    Same also applies to LWIP_HOOK_IP4_ROUTE_SRC() parameter order.
                  +  * pbuf API: pbuf->type (an u8_t holding the enum 'pbuf_type') has changed to only hold a
                  +    description of the pbuf (e.g. data following pbuf struct, data volatile, allocation
                  +    source heap/pool/etc.). As a consequence, applications can't test pbuf->type any more.
                  +    Use pbuf_match_type(pbuf, type) instead.
                  +  * socket API: according to the standard, SO_ERROR now only returns asynchronous errors.
                  +    All other/normal/synchronous errors are (and always were) available via 'errno'.
                  +    LWIP_SOCKET_SET_ERRNO has been removed - 'errno' is always set - and required!
                  +  * httpd LWIP_HTTPD_CGI_SSI: httpd_cgi_handler() has an additional parameter "struct fs_file *"
                  +
                  +  ++ Port changes:
                  +
                  +  * tcpip_trycallback() was renamed to tcpip_callbackmsg_trycallback() to avoid confusion
                  +    with tcpip_try_callback()
                  +  * compatibility headers: moved from 'src/include/posix' to 'src/include/compat/posix',
                  +    'src/include/compat/stdc' etc.
                  +  * The IPv6 implementation now supports address scopes. (See LWIP_IPV6_SCOPES documentation
                  +    and ip6_zone.h for more documentation)
                  +  * LWIP_HOOK_DHCP_APPEND_OPTIONS() has changed, see description in opt.h (options_out_len is not
                  +    available in struct dhcp any more)
                  +  * Added debug helper asserts to ensure threading/locking requirements are met (define
                  +    LWIP_MARK_TCPIP_THREAD() and LWIP_ASSERT_CORE_LOCKED()).
                  +  * Added sys_mbox_trypost_fromisr() and tcpip_callbackmsg_trycallback_fromisr()
                  +    These can be used to post preallocated messages from an ISR to the tcpip thread
                  +    (e.g. when using FreeRTOS)
                  +
                  +(2.0.2)
                  +
                  +  ++ Application changes:
                  +
                  +  * slipif: The way to pass serial port number has changed. netif->num is not
                  +    supported any more, netif->state is interpreted as an u8_t port number now
                  +    (it's not a POINTER to an u8_t any more!)
                  +
                  +(2.0.1)
                  +
                  +  ++ Application changes:
                  +
                  +  * UDP does NOT receive multicast traffic from ALL netifs on an UDP PCB bound to a specific
                  +    netif any more. Users need to bind to IP_ADDR_ANY to receive multicast traffic and compare 
                  +    ip_current_netif() to the desired netif for every packet.
                  +    See bug #49662 for an explanation.
                  +
                  +(2.0.0)
                  +
                  +  ++ Application changes:
                  +
                  +  * Changed netif "up" flag handling to be an administrative flag (as opposed to the previous meaning of
                  +    "ip4-address-valid", a netif will now not be used for transmission if not up) -> even a DHCP netif
                  +    has to be set "up" before starting the DHCP client
                  +  * Added IPv6 support (dual-stack or IPv4/IPv6 only)
                  +  * Changed ip_addr_t to be a union in dual-stack mode (use ip4_addr_t where referring to IPv4 only).
                  +  * Major rewrite of SNMP (added MIB parser that creates code stubs for custom MIBs);
                  +    supports SNMPv2c (experimental v3 support)
                  +  * Moved some core applications from contrib repository to src/apps (and include/lwip/apps)
                  +
                  +  +++ Raw API:
                  +    * Changed TCP listen backlog: removed tcp_accepted(), added the function pair tcp_backlog_delayed()/
                  +      tcp_backlog_accepted() to explicitly delay backlog handling on a connection pcb
                  +
                  +  +++ Socket API:
                  +    * Added an implementation for posix sendmsg()
                  +    * Added LWIP_FIONREAD_LINUXMODE that makes ioctl/FIONREAD return the size of the next pending datagram
                  +
                  +  ++ Port changes
                  +
                  +  +++ new files:
                  +    * MANY new and moved files! 
                  +    * Added src/Filelists.mk for use in Makefile projects
                  +    * Continued moving stack-internal parts from abc.h to abc_priv.h in sub-folder "priv"
                  +      to let abc.h only contain the actual application programmer's API
                  +
                  +  +++ sys layer:
                  +    * Made LWIP_TCPIP_CORE_LOCKING==1 the default as it usually performs better than
                  +      the traditional message passing (although with LWIP_COMPAT_MUTEX you are still
                  +      open to priority inversion, so this is not recommended any more)
                  +    * Added LWIP_NETCONN_SEM_PER_THREAD to use one "op_completed" semaphore per thread
                  +      instead of using one per netconn (these semaphores are used even with core locking
                  +      enabled as some longer lasting functions like big writes still need to delay)
                  +    * Added generalized abstraction for itoa(), strnicmp(), stricmp() and strnstr()
                  +      in def.h (to be overridden in cc.h) instead of config 
                  +      options for netbiosns, httpd, dns, etc. ...
                  +    * New abstraction for hton* and ntoh* functions in def.h.
                  +      To override them, use the following in cc.h: 
                  +      #define lwip_htons(x) <your_htons>
                  +      #define lwip_htonl(x) <your_htonl>
                  +
                  +  +++ new options:
                  +     * TODO
                  +
                  +  +++ new pools:
                  +     * Added LWIP_MEMPOOL_* (declare/init/alloc/free) to declare private memp pools
                  +       that share memp.c code but do not have to be made global via lwippools.h
                  +     * Added pools for IPv6, MPU_COMPATIBLE, dns-api, netif-api, etc.
                  +     * added hook LWIP_HOOK_MEMP_AVAILABLE() to get informed when a memp pool was empty and an item
                  +       is now available
                  +
                  +  * Signature of LWIP_HOOK_VLAN_SET macro was changed
                  +
                  +  * LWIP_DECLARE_MEMORY_ALIGNED() may be used to declare aligned memory buffers (mem/memp)
                  +    or to move buffers to dedicated memory using compiler attributes
                  +
                  +  * Standard C headers are used to define sized types and printf formatters
                  +    (disable by setting LWIP_NO_STDINT_H=1 or LWIP_NO_INTTYPES_H=1 if your compiler
                  +    does not support these)
                  +
                  +
                  +  ++ Major bugfixes/improvements
                  +
                  +  * Added IPv6 support (dual-stack or IPv4/IPv6 only)
                  +  * Major rewrite of PPP (incl. keep-up with apache pppd)
                  +    see doc/ppp.txt for an upgrading how-to
                  +  * Major rewrite of SNMP (incl. MIB parser)
                  +  * Fixed timing issues that might have lead to losing a DHCP lease
                  +  * Made rx processing path more robust against crafted errors
                  +  * TCP window scaling support
                  +  * modification of api modules to support FreeRTOS-MPU (don't pass stack-pointers to other threads)
                  +  * made DNS client more robust
                  +  * support PBUF_REF for RX packets
                  +  * LWIP_NETCONN_FULLDUPLEX allows netconn/sockets to be used for reading/writing from separate
                  +    threads each (needs LWIP_NETCONN_SEM_PER_THREAD)
                  +  * Moved and reordered stats (mainly memp/mib2)
                  +
                  +(1.4.0)
                  +
                  +  ++ Application changes:
                  +
                  +  * Replaced struct ip_addr by typedef ip_addr_t (struct ip_addr is kept for
                  +    compatibility to old applications, but will be removed in the future).
                  +
                  +  * Renamed mem_realloc() to mem_trim() to prevent confusion with realloc()
                  +
                  +  +++ Raw API:
                  +    * Changed the semantics of tcp_close() (since it was rather a
                  +      shutdown before): Now the application does *NOT* get any calls to the recv
                  +      callback (aside from NULL/closed) after calling tcp_close()
                  +
                  +    * When calling tcp_abort() from a raw API TCP callback function,
                  +      make sure you return ERR_ABRT to prevent accessing unallocated memory.
                  +      (ERR_ABRT now means the applicaiton has called tcp_abort!)
                  +
                  +  +++ Netconn API:
                  +    * Changed netconn_receive() and netconn_accept() to return
                  +      err_t, not a pointer to new data/netconn.
                  +
                  +  +++ Socket API:
                  +    * LWIP_SO_RCVTIMEO: when accept() or recv() time out, they
                  +      now set errno to EWOULDBLOCK/EAGAIN, not ETIMEDOUT.
                  +
                  +    * Added a minimal version of posix fctl() to have a
                  +      standardised way to set O_NONBLOCK for nonblocking sockets.
                  +
                  +  +++ all APIs:
                  +    * correctly implemented SO(F)_REUSEADDR
                  +
                  +  ++ Port changes
                  +
                  +  +++ new files:
                  +
                  +    * Added 4 new files: def.c, timers.c, timers.h, tcp_impl.h:
                  +
                  +    * Moved stack-internal parts of tcp.h to tcp_impl.h, tcp.h now only contains
                  +      the actual application programmer's API
                  +  
                  +    * Separated timer implementation from sys.h/.c, moved to timers.h/.c;
                  +      Added timer implementation for NO_SYS==1, set NO_SYS_NO_TIMERS==1 if you
                  +      still want to use your own timer implementation for NO_SYS==0 (as before).
                  +
                  +  +++ sys layer:
                  +
                  +    * Converted mbox- and semaphore-functions to take pointers to sys_mbox_t/
                  +      sys_sem_t;
                  +
                  +    * Converted sys_mbox_new/sys_sem_new to take pointers and return err_t;
                  +
                  +    * Added Mutex concept in sys_arch (define LWIP_COMPAT_MUTEX to let sys.h use
                  +      binary semaphores instead of mutexes - as before)
                  +
                  +  +++ new options:
                  +
                  +     * Don't waste memory when chaining segments, added option TCP_OVERSIZE to
                  +       prevent creating many small pbufs when calling tcp_write with many small
                  +       blocks of data. Instead, pbufs are allocated larger than needed and the
                  +       space is used for later calls to tcp_write.
                  +
                  +     * Added LWIP_NETIF_TX_SINGLE_PBUF to always copy to try to create single pbufs
                  +       in tcp_write/udp_send.
                  +
                  +    * Added an additional option LWIP_ETHERNET to support ethernet without ARP
                  +      (necessary for pure PPPoE)
                  +
                  +    * Add MEMP_SEPARATE_POOLS to place memory pools in separate arrays. This may
                  +      be used to place these pools into user-defined memory by using external
                  +      declaration.
                  +
                  +    * Added TCP_SNDQUEUELOWAT corresponding to TCP_SNDLOWAT
                  +
                  +  +++ new pools:
                  +
                  +     * Netdb uses a memp pool for allocating memory when getaddrinfo() is called,
                  +       so MEMP_NUM_NETDB has to be set accordingly.
                  +
                  +     * DNS_LOCAL_HOSTLIST_IS_DYNAMIC uses a memp pool instead of the heap, so
                  +       MEMP_NUM_LOCALHOSTLIST has to be set accordingly.
                  +
                  +     * Snmp-agent uses a memp pools instead of the heap, so MEMP_NUM_SNMP_* have
                  +       to be set accordingly.
                  +
                  +     * PPPoE uses a MEMP pool instead of the heap, so MEMP_NUM_PPPOE_INTERFACES
                  +       has to be set accordingly
                  +
                  +  * Integrated loopif into netif.c - loopif does not have to be created by the
                  +    port any more, just define LWIP_HAVE_LOOPIF to 1.
                  +
                  +  * Added define LWIP_RAND() for lwip-wide randomization (needs to be defined
                  +    in cc.h, e.g. used by igmp)
                  +
                  +  * Added printf-formatter X8_F to printf u8_t as hex
                  +
                  +  * The heap now may be moved to user-defined memory by defining
                  +    LWIP_RAM_HEAP_POINTER as a void pointer to that memory's address
                  +
                  +  * added autoip_set_struct() and dhcp_set_struct() to let autoip and dhcp work
                  +    with user-allocated structs instead of calling mem_malloc
                  +
                  +  * Added const char* name to mem- and memp-stats for easier debugging.
                  +
                  +  * Calculate the TCP/UDP checksum while copying to only fetch data once:
                  +    Define LWIP_CHKSUM_COPY to a memcpy-like function that returns the checksum
                  +
                  +  * Added SO_REUSE_RXTOALL to pass received UDP broadcast/multicast packets to
                  +    more than one pcb.
                  +
                  +  * Changed the semantics of ARP_QUEUEING==0: ARP_QUEUEING now cannot be turned
                  +    off any more, if this is set to 0, only one packet (the most recent one) is
                  +    queued (like demanded by RFC 1122).
                  +
                  +  
                  +  ++ Major bugfixes/improvements
                  +
                  +  * Implemented tcp_shutdown() to only shut down one end of a connection
                  +  * Implemented shutdown() at socket- and netconn-level
                  +  * Added errorset support to select() + improved select speed overhead
                  +  * Merged pppd to v2.3.11 (including some backported bugfixes from 2.4.x)
                  +  * Added timer implementation for NO_SYS==1 (may be disabled with NO_SYS_NO_TIMERS==1
                  +  * Use macros defined in ip_addr.h to work with IP addresses
                  +  * Implemented many nonblocking socket/netconn functions
                  +  * Fixed ARP input processing: only add a new entry if a request was directed as us
                  +  * mem_realloc() to mem_trim() to prevent confusion with realloc()
                  +  * Some improvements for AutoIP (don't route/forward link-local addresses, don't break
                  +    existing connections when assigning a routable address)
                  +  * Correctly handle remote side overrunning our rcv_wnd in ooseq case
                  +  * Removed packing from ip_addr_t, the packed version is now only used in protocol headers
                  +  * Corrected PBUF_POOL_BUFSIZE for ports where ETH_PAD_SIZE > 0
                  +  * Added support for static ARP table entries
                  +
                  +(STABLE-1.3.2)
                  +
                  +  * initial version of this file
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/zepif_8c.html b/Libraries/LwIP/doc/doxygen/output/html/zepif_8c.html new file mode 100644 index 0000000..9a5a591 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/zepif_8c.html @@ -0,0 +1,137 @@ + + + + + + + +lwIP: src/netif/zepif.c File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  zepif.c File Reference
                  +
                  +
                  +
                  #include "netif/zepif.h"
                  +#include "netif/lowpan6.h"
                  +#include "lwip/udp.h"
                  +#include "lwip/timeouts.h"
                  +#include <string.h>
                  +#include "arch/bpstruct.h"
                  +#include "arch/epstruct.h"
                  +
                  + + + +

                  +Macros

                  #define ZEPIF_LOOPBACK   0
                   
                  + + + +

                  +Functions

                  err_t zepif_init (struct netif *netif)
                   
                  +

                  Macro Definition Documentation

                  + +

                  ◆ ZEPIF_LOOPBACK

                  + +
                  +
                  + + + + +
                  #define ZEPIF_LOOPBACK   0
                  +
                  +

                  Define this to 1 to loop back TX packets for testing

                  + +
                  +
                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/zepif_8c.js b/Libraries/LwIP/doc/doxygen/output/html/zepif_8c.js new file mode 100644 index 0000000..2d08c21 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/zepif_8c.js @@ -0,0 +1,5 @@ +var zepif_8c = +[ + [ "ZEPIF_LOOPBACK", "zepif_8c.html#a8cae594e71cf385076f7bda166729dcd", null ], + [ "zepif_init", "group__zepif.html#gad61a6d9c1ab17e5b2c2c3eb9b42cc004", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/zepif_8h.html b/Libraries/LwIP/doc/doxygen/output/html/zepif_8h.html new file mode 100644 index 0000000..d3ae9a6 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/zepif_8h.html @@ -0,0 +1,119 @@ + + + + + + + +lwIP: src/include/netif/zepif.h File Reference + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  + +
                  +
                  zepif.h File Reference
                  +
                  +
                  +
                  #include "lwip/opt.h"
                  +#include "netif/lowpan6.h"
                  +#include "lwip/netif.h"
                  +
                  + + + +

                  +Data Structures

                  struct  zepif_init
                   
                  + + + +

                  +Functions

                  err_t zepif_init (struct netif *netif)
                   
                  +

                  Detailed Description

                  +

                  A netif implementing the ZigBee Eencapsulation Protocol (ZEP). This is used to tunnel 6LowPAN over UDP.

                  +
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/doxygen/output/html/zepif_8h.js b/Libraries/LwIP/doc/doxygen/output/html/zepif_8h.js new file mode 100644 index 0000000..420ffab --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/zepif_8h.js @@ -0,0 +1,5 @@ +var zepif_8h = +[ + [ "zepif_init", "structzepif__init.html", "structzepif__init" ], + [ "zepif_init", "group__zepif.html#gad61a6d9c1ab17e5b2c2c3eb9b42cc004", null ] +]; \ No newline at end of file diff --git a/Libraries/LwIP/doc/doxygen/output/html/zerocopyrx.html b/Libraries/LwIP/doc/doxygen/output/html/zerocopyrx.html new file mode 100644 index 0000000..0060401 --- /dev/null +++ b/Libraries/LwIP/doc/doxygen/output/html/zerocopyrx.html @@ -0,0 +1,99 @@ + + + + + + + +lwIP: Zero-copy RX + + + + + + + + + + + + + + +
                  +
                  + + + + + + +
                  +
                  lwIP +  2.1.2 +
                  +
                  Lightweight IP stack
                  +
                  +
                  + + + + + + + +
                  +
                  + +
                  +
                  +
                  + +
                  + +
                  +
                  + + +
                  + +
                  + +
                  +
                  +
                  Zero-copy RX
                  +
                  +
                  +

                  The following code is an example for zero-copy RX ethernet driver:

                  typedef struct my_custom_pbuf
                  {
                  struct pbuf_custom p;
                  void* dma_descriptor;
                  } my_custom_pbuf_t;
                  LWIP_MEMPOOL_DECLARE(RX_POOL, 10, sizeof(my_custom_pbuf_t), "Zero-copy RX PBUF pool");
                  void my_pbuf_free_custom(void* p)
                  {
                  my_custom_pbuf_t* my_puf = (my_custom_pbuf_t*)p;
                  // invalidate data cache here - lwIP and/or application may have written into buffer!
                  // (invalidate is faster than flushing, and noone needs the correct data in the buffer)
                  invalidate_cpu_cache(p->payload, p->tot_len);
                  SYS_ARCH_PROTECT(old_level);
                  free_rx_dma_descriptor(my_pbuf->dma_descriptor);
                  LWIP_MEMPOOL_FREE(RX_POOL, my_pbuf);
                  SYS_ARCH_UNPROTECT(old_level);
                  }
                  void eth_rx_irq()
                  {
                  dma_descriptor* dma_desc = get_RX_DMA_descriptor_from_ethernet();
                  my_custom_pbuf_t* my_pbuf = (my_custom_pbuf_t*)LWIP_MEMPOOL_ALLOC(RX_POOL);
                  my_pbuf->p.custom_free_function = my_pbuf_free_custom;
                  my_pbuf->dma_descriptor = dma_desc;
                  invalidate_cpu_cache(dma_desc->rx_data, dma_desc->rx_length);
                  dma_desc->rx_length,
                  &my_pbuf->p,
                  dma_desc->rx_data,
                  dma_desc->max_buffer_size);
                  if(netif->input(p, netif) != ERR_OK) {
                  }
                  }
                  +
                  + + + + diff --git a/Libraries/LwIP/doc/mdns.txt b/Libraries/LwIP/doc/mdns.txt index f208528..a876562 100755 --- a/Libraries/LwIP/doc/mdns.txt +++ b/Libraries/LwIP/doc/mdns.txt @@ -32,8 +32,8 @@ generated. The MDNS code puts its structs on the stack where suitable to reduce dynamic memory allocation. It may use up to 1kB of stack. -MDNS needs a strncasecmp() implementation. If you have one, define -LWIP_MDNS_STRNCASECMP to it. Otherwise the code will provide an implementation +MDNS (like other apps) needs a strncasecmp() implementation. If you have one, define +'lwip_strnicmp' to it. Otherwise the code will provide an implementation for you. @@ -57,11 +57,11 @@ Answers will use the supplied TTL (in seconds) MDNS allows UTF-8 names, but it is recommended to stay within ASCII, since the default case-insensitive comparison assumes this. -It is recommended to call this function after an IPv4 address has been set, -since there is currently no check if the v4 address is valid. +Call mdns_resp_announce() every time the IP address on the netif has changed. -Call mdns_resp_netif_settings_changed() every time the IP address -on the netif has changed. +Call mdns_resp_restart() every time the network interface comes up after being +down, for example cable connected after being disconnected, administrative +interface comes up after being down, or the device wakes up from sleep. To stop responding on a netif, run mdns_resp_remove_netif(struct netif *netif) @@ -108,6 +108,5 @@ and point them to .local:80 Relevant information will be sent as additional records to reduce number of requests required from a client. -Removing services is currently not supported. Services are removed when the -netif is removed. - +To remove a service from a netif, run + mdns_resp_del_service(struct netif *netif, s8_t slot) \ No newline at end of file diff --git a/Libraries/LwIP/doc/mqtt_client.txt b/Libraries/LwIP/doc/mqtt_client.txt index a63dbd9..041f263 100755 --- a/Libraries/LwIP/doc/mqtt_client.txt +++ b/Libraries/LwIP/doc/mqtt_client.txt @@ -40,7 +40,7 @@ void example_do_connect(mqtt_client_t *client) err = mqtt_client_connect(client, ip_addr, MQTT_PORT, mqtt_connection_cb, 0, &ci); - /* For now just print the result code if something goes wrong + /* For now just print the result code if something goes wrong */ if(err != ERR_OK) { printf("mqtt_connect return %d\n", err); } diff --git a/Libraries/LwIP/doc/savannah.txt b/Libraries/LwIP/doc/savannah.txt index ba16511..1cae3b9 100755 --- a/Libraries/LwIP/doc/savannah.txt +++ b/Libraries/LwIP/doc/savannah.txt @@ -29,12 +29,12 @@ Or, obtain a specific (fixed) release as follows: The Savannah server uses SSH (Secure Shell) protocol 2 authentication and encryption. As such, Git commits to the server occur through a SSH tunnel for project members. To create a SSH2 key pair in UNIX-like environments, do this: - ssh-keygen -t dsa + ssh-keygen Under Windows, a recommended SSH client is "PuTTY", freely available with good documentation and a graphic user interface. Use its key generator. -Now paste the id_dsa.pub contents into your Savannah account public key list. Wait +Now paste the id_rsa.pub contents into your Savannah account public key list. Wait a while so that Savannah can update its configuration (This can take minutes). Try to login using SSH: diff --git a/Libraries/LwIP/src/Filelists.cmake b/Libraries/LwIP/src/Filelists.cmake new file mode 100644 index 0000000..c765628 --- /dev/null +++ b/Libraries/LwIP/src/Filelists.cmake @@ -0,0 +1,279 @@ +# This file is indended to be included in end-user CMakeLists.txt +# include(/path/to/Filelists.cmake) +# It assumes the variable LWIP_DIR is defined pointing to the +# root path of lwIP sources. +# +# This file is NOT designed (on purpose) to be used as cmake +# subdir via add_subdirectory() +# The intention is to provide greater flexibility to users to +# create their own targets using the *_SRCS variables. + +set(LWIP_VERSION_MAJOR "2") +set(LWIP_VERSION_MINOR "1") +set(LWIP_VERSION_REVISION "2") +# LWIP_VERSION_RC is set to LWIP_RC_RELEASE for official releases +# LWIP_VERSION_RC is set to LWIP_RC_DEVELOPMENT for Git versions +# Numbers 1..31 are reserved for release candidates +set(LWIP_VERSION_RC "LWIP_RC_RELEASE") + +if ("${LWIP_VERSION_RC}" STREQUAL "LWIP_RC_RELEASE") + set(LWIP_VERSION_STRING + "${LWIP_VERSION_MAJOR}.${LWIP_VERSION_MINOR}.${LWIP_VERSION_REVISION}" + ) +elseif ("${LWIP_VERSION_RC}" STREQUAL "LWIP_RC_DEVELOPMENT") + set(LWIP_VERSION_STRING + "${LWIP_VERSION_MAJOR}.${LWIP_VERSION_MINOR}.${LWIP_VERSION_REVISION}.dev" + ) +else ("${LWIP_VERSION_RC}" STREQUAL "LWIP_RC_RELEASE") + set(LWIP_VERSION_STRING + "${LWIP_VERSION_MAJOR}.${LWIP_VERSION_MINOR}.${LWIP_VERSION_REVISION}.rc${LWIP_VERSION_RC}" + ) +endif ("${LWIP_VERSION_RC}" STREQUAL "LWIP_RC_RELEASE") + +# The minimum set of files needed for lwIP. +set(lwipcore_SRCS + ${LWIP_DIR}/src/core/init.c + ${LWIP_DIR}/src/core/def.c + ${LWIP_DIR}/src/core/dns.c + ${LWIP_DIR}/src/core/inet_chksum.c + ${LWIP_DIR}/src/core/ip.c + ${LWIP_DIR}/src/core/mem.c + ${LWIP_DIR}/src/core/memp.c + ${LWIP_DIR}/src/core/netif.c + ${LWIP_DIR}/src/core/pbuf.c + ${LWIP_DIR}/src/core/raw.c + ${LWIP_DIR}/src/core/stats.c + ${LWIP_DIR}/src/core/sys.c + ${LWIP_DIR}/src/core/altcp.c + ${LWIP_DIR}/src/core/altcp_alloc.c + ${LWIP_DIR}/src/core/altcp_tcp.c + ${LWIP_DIR}/src/core/tcp.c + ${LWIP_DIR}/src/core/tcp_in.c + ${LWIP_DIR}/src/core/tcp_out.c + ${LWIP_DIR}/src/core/timeouts.c + ${LWIP_DIR}/src/core/udp.c +) +set(lwipcore4_SRCS + ${LWIP_DIR}/src/core/ipv4/autoip.c + ${LWIP_DIR}/src/core/ipv4/dhcp.c + ${LWIP_DIR}/src/core/ipv4/etharp.c + ${LWIP_DIR}/src/core/ipv4/icmp.c + ${LWIP_DIR}/src/core/ipv4/igmp.c + ${LWIP_DIR}/src/core/ipv4/ip4_frag.c + ${LWIP_DIR}/src/core/ipv4/ip4.c + ${LWIP_DIR}/src/core/ipv4/ip4_addr.c +) +set(lwipcore6_SRCS + ${LWIP_DIR}/src/core/ipv6/dhcp6.c + ${LWIP_DIR}/src/core/ipv6/ethip6.c + ${LWIP_DIR}/src/core/ipv6/icmp6.c + ${LWIP_DIR}/src/core/ipv6/inet6.c + ${LWIP_DIR}/src/core/ipv6/ip6.c + ${LWIP_DIR}/src/core/ipv6/ip6_addr.c + ${LWIP_DIR}/src/core/ipv6/ip6_frag.c + ${LWIP_DIR}/src/core/ipv6/mld6.c + ${LWIP_DIR}/src/core/ipv6/nd6.c +) + +# APIFILES: The files which implement the sequential and socket APIs. +set(lwipapi_SRCS + ${LWIP_DIR}/src/api/api_lib.c + ${LWIP_DIR}/src/api/api_msg.c + ${LWIP_DIR}/src/api/err.c + ${LWIP_DIR}/src/api/if_api.c + ${LWIP_DIR}/src/api/netbuf.c + ${LWIP_DIR}/src/api/netdb.c + ${LWIP_DIR}/src/api/netifapi.c + ${LWIP_DIR}/src/api/sockets.c + ${LWIP_DIR}/src/api/tcpip.c +) + +# Files implementing various generic network interface functions +set(lwipnetif_SRCS + ${LWIP_DIR}/src/netif/ethernet.c + ${LWIP_DIR}/src/netif/bridgeif.c + ${LWIP_DIR}/src/netif/bridgeif_fdb.c + ${LWIP_DIR}/src/netif/slipif.c +) + +# 6LoWPAN +set(lwipsixlowpan_SRCS + ${LWIP_DIR}/src/netif/lowpan6_common.c + ${LWIP_DIR}/src/netif/lowpan6.c + ${LWIP_DIR}/src/netif/lowpan6_ble.c + ${LWIP_DIR}/src/netif/zepif.c +) + +# PPP +set(lwipppp_SRCS + ${LWIP_DIR}/src/netif/ppp/auth.c + ${LWIP_DIR}/src/netif/ppp/ccp.c + ${LWIP_DIR}/src/netif/ppp/chap-md5.c + ${LWIP_DIR}/src/netif/ppp/chap_ms.c + ${LWIP_DIR}/src/netif/ppp/chap-new.c + ${LWIP_DIR}/src/netif/ppp/demand.c + ${LWIP_DIR}/src/netif/ppp/eap.c + ${LWIP_DIR}/src/netif/ppp/ecp.c + ${LWIP_DIR}/src/netif/ppp/eui64.c + ${LWIP_DIR}/src/netif/ppp/fsm.c + ${LWIP_DIR}/src/netif/ppp/ipcp.c + ${LWIP_DIR}/src/netif/ppp/ipv6cp.c + ${LWIP_DIR}/src/netif/ppp/lcp.c + ${LWIP_DIR}/src/netif/ppp/magic.c + ${LWIP_DIR}/src/netif/ppp/mppe.c + ${LWIP_DIR}/src/netif/ppp/multilink.c + ${LWIP_DIR}/src/netif/ppp/ppp.c + ${LWIP_DIR}/src/netif/ppp/pppapi.c + ${LWIP_DIR}/src/netif/ppp/pppcrypt.c + ${LWIP_DIR}/src/netif/ppp/pppoe.c + ${LWIP_DIR}/src/netif/ppp/pppol2tp.c + ${LWIP_DIR}/src/netif/ppp/pppos.c + ${LWIP_DIR}/src/netif/ppp/upap.c + ${LWIP_DIR}/src/netif/ppp/utils.c + ${LWIP_DIR}/src/netif/ppp/vj.c + ${LWIP_DIR}/src/netif/ppp/polarssl/arc4.c + ${LWIP_DIR}/src/netif/ppp/polarssl/des.c + ${LWIP_DIR}/src/netif/ppp/polarssl/md4.c + ${LWIP_DIR}/src/netif/ppp/polarssl/md5.c + ${LWIP_DIR}/src/netif/ppp/polarssl/sha1.c +) + +# SNMPv3 agent +set(lwipsnmp_SRCS + ${LWIP_DIR}/src/apps/snmp/snmp_asn1.c + ${LWIP_DIR}/src/apps/snmp/snmp_core.c + ${LWIP_DIR}/src/apps/snmp/snmp_mib2.c + ${LWIP_DIR}/src/apps/snmp/snmp_mib2_icmp.c + ${LWIP_DIR}/src/apps/snmp/snmp_mib2_interfaces.c + ${LWIP_DIR}/src/apps/snmp/snmp_mib2_ip.c + ${LWIP_DIR}/src/apps/snmp/snmp_mib2_snmp.c + ${LWIP_DIR}/src/apps/snmp/snmp_mib2_system.c + ${LWIP_DIR}/src/apps/snmp/snmp_mib2_tcp.c + ${LWIP_DIR}/src/apps/snmp/snmp_mib2_udp.c + ${LWIP_DIR}/src/apps/snmp/snmp_snmpv2_framework.c + ${LWIP_DIR}/src/apps/snmp/snmp_snmpv2_usm.c + ${LWIP_DIR}/src/apps/snmp/snmp_msg.c + ${LWIP_DIR}/src/apps/snmp/snmpv3.c + ${LWIP_DIR}/src/apps/snmp/snmp_netconn.c + ${LWIP_DIR}/src/apps/snmp/snmp_pbuf_stream.c + ${LWIP_DIR}/src/apps/snmp/snmp_raw.c + ${LWIP_DIR}/src/apps/snmp/snmp_scalar.c + ${LWIP_DIR}/src/apps/snmp/snmp_table.c + ${LWIP_DIR}/src/apps/snmp/snmp_threadsync.c + ${LWIP_DIR}/src/apps/snmp/snmp_traps.c +) + +# HTTP server + client +set(lwiphttp_SRCS + ${LWIP_DIR}/src/apps/http/altcp_proxyconnect.c + ${LWIP_DIR}/src/apps/http/fs.c + ${LWIP_DIR}/src/apps/http/http_client.c + ${LWIP_DIR}/src/apps/http/httpd.c +) + +# MAKEFSDATA HTTP server host utility +set(lwipmakefsdata_SRCS + ${LWIP_DIR}/src/apps/http/makefsdata/makefsdata.c +) + +# IPERF server +set(lwipiperf_SRCS + ${LWIP_DIR}/src/apps/lwiperf/lwiperf.c +) + +# SMTP client +set(lwipsmtp_SRCS + ${LWIP_DIR}/src/apps/smtp/smtp.c +) + +# SNTP client +set(lwipsntp_SRCS + ${LWIP_DIR}/src/apps/sntp/sntp.c +) + +# MDNS responder +set(lwipmdns_SRCS + ${LWIP_DIR}/src/apps/mdns/mdns.c +) + +# NetBIOS name server +set(lwipnetbios_SRCS + ${LWIP_DIR}/src/apps/netbiosns/netbiosns.c +) + +# TFTP server files +set(lwiptftp_SRCS + ${LWIP_DIR}/src/apps/tftp/tftp_server.c +) + +# MQTT client files +set(lwipmqtt_SRCS + ${LWIP_DIR}/src/apps/mqtt/mqtt.c +) + +# ARM MBEDTLS related files of lwIP rep +set(lwipmbedtls_SRCS + ${LWIP_DIR}/src/apps/altcp_tls/altcp_tls_mbedtls.c + ${LWIP_DIR}/src/apps/altcp_tls/altcp_tls_mbedtls_mem.c + ${LWIP_DIR}/src/apps/snmp/snmpv3_mbedtls.c +) + +# All LWIP files without apps +set(lwipnoapps_SRCS + ${lwipcore_SRCS} + ${lwipcore4_SRCS} + ${lwipcore6_SRCS} + ${lwipapi_SRCS} + ${lwipnetif_SRCS} + ${lwipsixlowpan_SRCS} + ${lwipppp_SRCS} +) + +# LWIPAPPFILES: All LWIP APPs +set(lwipallapps_SRCS + ${lwipsnmp_SRCS} + ${lwiphttp_SRCS} + ${lwipiperf_SRCS} + ${lwipsmtp_SRCS} + ${lwipsntp_SRCS} + ${lwipmdns_SRCS} + ${lwipnetbios_SRCS} + ${lwiptftp_SRCS} + ${lwipmqtt_SRCS} + ${lwipmbedtls_SRCS} +) + +# Generate lwip/init.h (version info) +configure_file(${LWIP_DIR}/src/include/lwip/init.h.cmake.in ${LWIP_DIR}/src/include/lwip/init.h) + +# Documentation +set(DOXYGEN_DIR ${LWIP_DIR}/doc/doxygen) +set(DOXYGEN_OUTPUT_DIR output) +set(DOXYGEN_IN ${LWIP_DIR}/doc/doxygen/lwip.Doxyfile.cmake.in) +set(DOXYGEN_OUT ${LWIP_DIR}/doc/doxygen/lwip.Doxyfile) +configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT}) + +find_package(Doxygen) +if (DOXYGEN_FOUND) + message("Doxygen build started") + + add_custom_target(lwipdocs + COMMAND ${CMAKE_COMMAND} -E remove_directory ${DOXYGEN_DIR}/${DOXYGEN_OUTPUT_DIR}/html + COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT} + WORKING_DIRECTORY ${DOXYGEN_DIR} + COMMENT "Generating API documentation with Doxygen" + VERBATIM) +else (DOXYGEN_FOUND) + message("Doxygen needs to be installed to generate the doxygen documentation") +endif (DOXYGEN_FOUND) + +# lwIP libraries +add_library(lwipcore EXCLUDE_FROM_ALL ${lwipnoapps_SRCS}) +target_compile_options(lwipcore PRIVATE ${LWIP_COMPILER_FLAGS}) +target_compile_definitions(lwipcore PRIVATE ${LWIP_DEFINITIONS} ${LWIP_MBEDTLS_DEFINITIONS}) +target_include_directories(lwipcore PRIVATE ${LWIP_INCLUDE_DIRS} ${LWIP_MBEDTLS_INCLUDE_DIRS}) + +add_library(lwipallapps EXCLUDE_FROM_ALL ${lwipallapps_SRCS}) +target_compile_options(lwipallapps PRIVATE ${LWIP_COMPILER_FLAGS}) +target_compile_definitions(lwipallapps PRIVATE ${LWIP_DEFINITIONS} ${LWIP_MBEDTLS_DEFINITIONS}) +target_include_directories(lwipallapps PRIVATE ${LWIP_INCLUDE_DIRS} ${LWIP_MBEDTLS_INCLUDE_DIRS}) diff --git a/Libraries/LwIP/src/Filelists.mk b/Libraries/LwIP/src/Filelists.mk index 86366bb..12e1b40 100755 --- a/Libraries/LwIP/src/Filelists.mk +++ b/Libraries/LwIP/src/Filelists.mk @@ -42,6 +42,9 @@ COREFILES=$(LWIPDIR)/core/init.c \ $(LWIPDIR)/core/raw.c \ $(LWIPDIR)/core/stats.c \ $(LWIPDIR)/core/sys.c \ + $(LWIPDIR)/core/altcp.c \ + $(LWIPDIR)/core/altcp_alloc.c \ + $(LWIPDIR)/core/altcp_tcp.c \ $(LWIPDIR)/core/tcp.c \ $(LWIPDIR)/core/tcp_in.c \ $(LWIPDIR)/core/tcp_out.c \ @@ -71,6 +74,7 @@ CORE6FILES=$(LWIPDIR)/core/ipv6/dhcp6.c \ APIFILES=$(LWIPDIR)/api/api_lib.c \ $(LWIPDIR)/api/api_msg.c \ $(LWIPDIR)/api/err.c \ + $(LWIPDIR)/api/if_api.c \ $(LWIPDIR)/api/netbuf.c \ $(LWIPDIR)/api/netdb.c \ $(LWIPDIR)/api/netifapi.c \ @@ -79,10 +83,15 @@ APIFILES=$(LWIPDIR)/api/api_lib.c \ # NETIFFILES: Files implementing various generic network interface functions NETIFFILES=$(LWIPDIR)/netif/ethernet.c \ + $(LWIPDIR)/netif/bridgeif.c \ + $(LWIPDIR)/netif/bridgeif_fdb.c \ $(LWIPDIR)/netif/slipif.c # SIXLOWPAN: 6LoWPAN -SIXLOWPAN=$(LWIPDIR)/netif/lowpan6.c \ +SIXLOWPAN=$(LWIPDIR)/netif/lowpan6_common.c \ + $(LWIPDIR)/netif/lowpan6.c \ + $(LWIPDIR)/netif/lowpan6_ble.c \ + $(LWIPDIR)/netif/zepif.c # PPPFILES: PPP PPPFILES=$(LWIPDIR)/netif/ppp/auth.c \ @@ -136,6 +145,8 @@ SNMPFILES=$(LWIPDIR)/apps/snmp/snmp_asn1.c \ $(LWIPDIR)/apps/snmp/snmp_mib2_system.c \ $(LWIPDIR)/apps/snmp/snmp_mib2_tcp.c \ $(LWIPDIR)/apps/snmp/snmp_mib2_udp.c \ + $(LWIPDIR)/apps/snmp/snmp_snmpv2_framework.c \ + $(LWIPDIR)/apps/snmp/snmp_snmpv2_usm.c \ $(LWIPDIR)/apps/snmp/snmp_msg.c \ $(LWIPDIR)/apps/snmp/snmpv3.c \ $(LWIPDIR)/apps/snmp/snmp_netconn.c \ @@ -144,17 +155,23 @@ SNMPFILES=$(LWIPDIR)/apps/snmp/snmp_asn1.c \ $(LWIPDIR)/apps/snmp/snmp_scalar.c \ $(LWIPDIR)/apps/snmp/snmp_table.c \ $(LWIPDIR)/apps/snmp/snmp_threadsync.c \ - $(LWIPDIR)/apps/snmp/snmp_traps.c \ - $(LWIPDIR)/apps/snmp/snmpv3_mbedtls.c \ - $(LWIPDIR)/apps/snmp/snmpv3_dummy.c + $(LWIPDIR)/apps/snmp/snmp_traps.c -# HTTPDFILES: HTTP server -HTTPDFILES=$(LWIPDIR)/apps/httpd/fs.c \ - $(LWIPDIR)/apps/httpd/httpd.c +# HTTPFILES: HTTP server + client +HTTPFILES=$(LWIPDIR)/apps/http/altcp_proxyconnect.c \ + $(LWIPDIR)/apps/http/fs.c \ + $(LWIPDIR)/apps/http/http_client.c \ + $(LWIPDIR)/apps/http/httpd.c + +# MAKEFSDATA: MAKEFSDATA HTTP server host utility +MAKEFSDATAFILES=$(LWIPDIR)/apps/http/makefsdata/makefsdata.c # LWIPERFFILES: IPERF server LWIPERFFILES=$(LWIPDIR)/apps/lwiperf/lwiperf.c +# SMTPFILES: SMTP client +SMTPFILES=$(LWIPDIR)/apps/smtp/smtp.c + # SNTPFILES: SNTP client SNTPFILES=$(LWIPDIR)/apps/sntp/sntp.c @@ -170,12 +187,19 @@ TFTPFILES=$(LWIPDIR)/apps/tftp/tftp_server.c # MQTTFILES: MQTT client files MQTTFILES=$(LWIPDIR)/apps/mqtt/mqtt.c +# MBEDTLS_FILES: MBEDTLS related files of lwIP rep +MBEDTLS_FILES=$(LWIPDIR)/apps/altcp_tls/altcp_tls_mbedtls.c \ + $(LWIPDIR)/apps/altcp_tls/altcp_tls_mbedtls_mem.c \ + $(LWIPDIR)/apps/snmp/snmpv3_mbedtls.c + # LWIPAPPFILES: All LWIP APPs LWIPAPPFILES=$(SNMPFILES) \ - $(HTTPDFILES) \ + $(HTTPFILES) \ $(LWIPERFFILES) \ + $(SMTPFILES) \ $(SNTPFILES) \ $(MDNSFILES) \ $(NETBIOSNSFILES) \ $(TFTPFILES) \ - $(MQTTFILES) + $(MQTTFILES) \ + $(MBEDTLS_FILES) diff --git a/Libraries/LwIP/src/api/api_lib.c b/Libraries/LwIP/src/api/api_lib.c index dda05d3..9a30ec0 100755 --- a/Libraries/LwIP/src/api/api_lib.c +++ b/Libraries/LwIP/src/api/api_lib.c @@ -1,21 +1,21 @@ /** * @file * Sequential API External module - * + * * @defgroup netconn Netconn API * @ingroup sequential_api * Thread-safe, to be called from non-TCPIP threads only. * TX/RX handling based on @ref netbuf (containing @ref pbuf) * to avoid copying data around. - * + * * @defgroup netconn_common Common functions * @ingroup netconn * For use with TCP and UDP - * + * * @defgroup netconn_tcp TCP only * @ingroup netconn * TCP only functions - * + * * @defgroup netconn_udp UDP only * @ingroup netconn * UDP only functions @@ -69,6 +69,10 @@ #include "lwip/priv/tcp_priv.h" #include "lwip/priv/tcpip_priv.h" +#ifdef LWIP_HOOK_FILENAME +#include LWIP_HOOK_FILENAME +#endif + #include #define API_MSG_VAR_REF(name) API_VAR_REF(name) @@ -77,6 +81,28 @@ #define API_MSG_VAR_ALLOC_RETURN_NULL(name) API_VAR_ALLOC(struct api_msg, MEMP_API_MSG, name, NULL) #define API_MSG_VAR_FREE(name) API_VAR_FREE(MEMP_API_MSG, name) +#if TCP_LISTEN_BACKLOG +/* need to allocate API message for accept so empty message pool does not result in event loss + * see bug #47512: MPU_COMPATIBLE may fail on empty pool */ +#define API_MSG_VAR_ALLOC_ACCEPT(msg) API_MSG_VAR_ALLOC(msg) +#define API_MSG_VAR_FREE_ACCEPT(msg) API_MSG_VAR_FREE(msg) +#else /* TCP_LISTEN_BACKLOG */ +#define API_MSG_VAR_ALLOC_ACCEPT(msg) +#define API_MSG_VAR_FREE_ACCEPT(msg) +#endif /* TCP_LISTEN_BACKLOG */ + +#if LWIP_NETCONN_FULLDUPLEX +#define NETCONN_RECVMBOX_WAITABLE(conn) (sys_mbox_valid(&(conn)->recvmbox) && (((conn)->flags & NETCONN_FLAG_MBOXINVALID) == 0)) +#define NETCONN_ACCEPTMBOX_WAITABLE(conn) (sys_mbox_valid(&(conn)->acceptmbox) && (((conn)->flags & (NETCONN_FLAG_MBOXCLOSED|NETCONN_FLAG_MBOXINVALID)) == 0)) +#define NETCONN_MBOX_WAITING_INC(conn) SYS_ARCH_INC(conn->mbox_threads_waiting, 1) +#define NETCONN_MBOX_WAITING_DEC(conn) SYS_ARCH_DEC(conn->mbox_threads_waiting, 1) +#else /* LWIP_NETCONN_FULLDUPLEX */ +#define NETCONN_RECVMBOX_WAITABLE(conn) sys_mbox_valid(&(conn)->recvmbox) +#define NETCONN_ACCEPTMBOX_WAITABLE(conn) (sys_mbox_valid(&(conn)->acceptmbox) && (((conn)->flags & NETCONN_FLAG_MBOXCLOSED) == 0)) +#define NETCONN_MBOX_WAITING_INC(conn) +#define NETCONN_MBOX_WAITING_DEC(conn) +#endif /* LWIP_NETCONN_FULLDUPLEX */ + static err_t netconn_close_shutdown(struct netconn *conn, u8_t how); /** @@ -119,7 +145,7 @@ netconn_apimsg(tcpip_callback_fn fn, struct api_msg *apimsg) * @return a newly allocated struct netconn or * NULL on memory error */ -struct netconn* +struct netconn * netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto, netconn_callback callback) { struct netconn *conn; @@ -155,7 +181,7 @@ netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto, netconn_cal /** * @ingroup netconn_common - * Close a netconn 'connection' and free its resources. + * Close a netconn 'connection' and free all its resources but not the netconn itself. * UDP and RAW connection are completely closed, TCP pcbs might still be in a waitstate * after this returns. * @@ -163,7 +189,7 @@ netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto, netconn_cal * @return ERR_OK if the connection was deleted */ err_t -netconn_delete(struct netconn *conn) +netconn_prepare_delete(struct netconn *conn) { err_t err; API_MSG_VAR_DECLARE(msg); @@ -191,12 +217,43 @@ netconn_delete(struct netconn *conn) if (err != ERR_OK) { return err; } - - netconn_free(conn); - return ERR_OK; } +/** + * @ingroup netconn_common + * Close a netconn 'connection' and free its resources. + * UDP and RAW connection are completely closed, TCP pcbs might still be in a waitstate + * after this returns. + * + * @param conn the netconn to delete + * @return ERR_OK if the connection was deleted + */ +err_t +netconn_delete(struct netconn *conn) +{ + err_t err; + + /* No ASSERT here because possible to get a (conn == NULL) if we got an accept error */ + if (conn == NULL) { + return ERR_OK; + } + +#if LWIP_NETCONN_FULLDUPLEX + if (conn->flags & NETCONN_FLAG_MBOXINVALID) { + /* Already called netconn_prepare_delete() before */ + err = ERR_OK; + } else +#endif /* LWIP_NETCONN_FULLDUPLEX */ + { + err = netconn_prepare_delete(conn); + } + if (err == ERR_OK) { + netconn_free(conn); + } + return err; +} + /** * Get the local or remote IP address and port of a netconn. * For RAW netconns, this returns the protocol instead of a port! @@ -241,7 +298,7 @@ netconn_getaddr(struct netconn *conn, ip_addr_t *addr, u16_t *port, u8_t local) * Binding one netconn twice might not always be checked correctly! * * @param conn the netconn to bind - * @param addr the local IP address to bind the netconn to + * @param addr the local IP address to bind the netconn to * (use IP4_ADDR_ANY/IP6_ADDR_ANY to bind to all addresses) * @param port the local port to bind the netconn to (not used for RAW) * @return ERR_OK if bound, any other err_t on failure @@ -251,7 +308,7 @@ netconn_bind(struct netconn *conn, const ip_addr_t *addr, u16_t port) { API_MSG_VAR_DECLARE(msg); err_t err; - + LWIP_ERROR("netconn_bind: invalid conn", (conn != NULL), return ERR_ARG;); #if LWIP_IPV4 @@ -260,13 +317,13 @@ netconn_bind(struct netconn *conn, const ip_addr_t *addr, u16_t port) addr = IP4_ADDR_ANY; } #endif /* LWIP_IPV4 */ - + #if LWIP_IPV4 && LWIP_IPV6 /* "Socket API like" dual-stack support: If IP to bind to is IP6_ADDR_ANY, * and NETCONN_FLAG_IPV6_V6ONLY is 0, use IP_ANY_TYPE to bind */ if ((netconn_get_ipv6only(conn) == 0) && - ip_addr_cmp(addr, IP6_ADDR_ANY)) { + ip_addr_cmp(addr, IP6_ADDR_ANY)) { addr = IP_ANY_TYPE; } #endif /* LWIP_IPV4 && LWIP_IPV6 */ @@ -281,6 +338,32 @@ netconn_bind(struct netconn *conn, const ip_addr_t *addr, u16_t port) return err; } +/** + * @ingroup netconn_common + * Bind a netconn to a specific interface and port. + * Binding one netconn twice might not always be checked correctly! + * + * @param conn the netconn to bind + * @param if_idx the local interface index to bind the netconn to + * @return ERR_OK if bound, any other err_t on failure + */ +err_t +netconn_bind_if(struct netconn *conn, u8_t if_idx) +{ + API_MSG_VAR_DECLARE(msg); + err_t err; + + LWIP_ERROR("netconn_bind_if: invalid conn", (conn != NULL), return ERR_ARG;); + + API_MSG_VAR_ALLOC(msg); + API_MSG_VAR_REF(msg).conn = conn; + API_MSG_VAR_REF(msg).msg.bc.if_idx = if_idx; + err = netconn_apimsg(lwip_netconn_do_bind_if, &API_MSG_VAR_REF(msg)); + API_MSG_VAR_FREE(msg); + + return err; +} + /** * @ingroup netconn_common * Connect a netconn to a specific remote IP address and port. @@ -388,6 +471,7 @@ err_t netconn_accept(struct netconn *conn, struct netconn **new_conn) { #if LWIP_TCP + err_t err; void *accept_ptr; struct netconn *newconn; #if TCP_LISTEN_BACKLOG @@ -398,52 +482,65 @@ netconn_accept(struct netconn *conn, struct netconn **new_conn) *new_conn = NULL; LWIP_ERROR("netconn_accept: invalid conn", (conn != NULL), return ERR_ARG;); - if (ERR_IS_FATAL(conn->last_err)) { - /* don't recv on fatal errors: this might block the application task - waiting on acceptmbox forever! */ - return conn->last_err; + /* NOTE: Although the opengroup spec says a pending error shall be returned to + send/recv/getsockopt(SO_ERROR) only, we return it for listening + connections also, to handle embedded-system errors */ + err = netconn_err(conn); + if (err != ERR_OK) { + /* return pending error */ + return err; } - if (!sys_mbox_valid(&conn->acceptmbox)) { + if (!NETCONN_ACCEPTMBOX_WAITABLE(conn)) { + /* don't accept if closed: this might block the application task + waiting on acceptmbox forever! */ return ERR_CLSD; } -#if TCP_LISTEN_BACKLOG - API_MSG_VAR_ALLOC(msg); -#endif /* TCP_LISTEN_BACKLOG */ + API_MSG_VAR_ALLOC_ACCEPT(msg); + NETCONN_MBOX_WAITING_INC(conn); + if (netconn_is_nonblocking(conn)) { + if (sys_arch_mbox_tryfetch(&conn->acceptmbox, &accept_ptr) == SYS_ARCH_TIMEOUT) { + API_MSG_VAR_FREE_ACCEPT(msg); + NETCONN_MBOX_WAITING_DEC(conn); + return ERR_WOULDBLOCK; + } + } else { #if LWIP_SO_RCVTIMEO - if (sys_arch_mbox_fetch(&conn->acceptmbox, &accept_ptr, conn->recv_timeout) == SYS_ARCH_TIMEOUT) { -#if TCP_LISTEN_BACKLOG - API_MSG_VAR_FREE(msg); -#endif /* TCP_LISTEN_BACKLOG */ - return ERR_TIMEOUT; - } + if (sys_arch_mbox_fetch(&conn->acceptmbox, &accept_ptr, conn->recv_timeout) == SYS_ARCH_TIMEOUT) { + API_MSG_VAR_FREE_ACCEPT(msg); + NETCONN_MBOX_WAITING_DEC(conn); + return ERR_TIMEOUT; + } #else - sys_arch_mbox_fetch(&conn->acceptmbox, &accept_ptr, 0); + sys_arch_mbox_fetch(&conn->acceptmbox, &accept_ptr, 0); #endif /* LWIP_SO_RCVTIMEO*/ - newconn = (struct netconn *)accept_ptr; + } + NETCONN_MBOX_WAITING_DEC(conn); +#if LWIP_NETCONN_FULLDUPLEX + if (conn->flags & NETCONN_FLAG_MBOXINVALID) { + if (lwip_netconn_is_deallocated_msg(accept_ptr)) { + /* the netconn has been closed from another thread */ + API_MSG_VAR_FREE_ACCEPT(msg); + return ERR_CONN; + } + } +#endif + /* Register event with callback */ API_EVENT(conn, NETCONN_EVT_RCVMINUS, 0); - if (accept_ptr == &netconn_aborted) { - /* a connection has been aborted: out of pcbs or out of netconns during accept */ - /* @todo: set netconn error, but this would be fatal and thus block further accepts */ -#if TCP_LISTEN_BACKLOG - API_MSG_VAR_FREE(msg); -#endif /* TCP_LISTEN_BACKLOG */ - return ERR_ABRT; + if (lwip_netconn_is_err_msg(accept_ptr, &err)) { + /* a connection has been aborted: e.g. out of pcbs or out of netconns during accept */ + API_MSG_VAR_FREE_ACCEPT(msg); + return err; } - if (newconn == NULL) { + if (accept_ptr == NULL) { /* connection has been aborted */ - /* in this special case, we set the netconn error from application thread, as - on a ready-to-accept listening netconn, there should not be anything running - in tcpip_thread */ - NETCONN_SET_SAFE_ERR(conn, ERR_CLSD); -#if TCP_LISTEN_BACKLOG - API_MSG_VAR_FREE(msg); -#endif /* TCP_LISTEN_BACKLOG */ + API_MSG_VAR_FREE_ACCEPT(msg); return ERR_CLSD; } + newconn = (struct netconn *)accept_ptr; #if TCP_LISTEN_BACKLOG /* Let the stack know that we have accepted the connection. */ API_MSG_VAR_REF(msg).conn = newconn; @@ -465,103 +562,89 @@ netconn_accept(struct netconn *conn, struct netconn **new_conn) /** * @ingroup netconn_common * Receive data: actual implementation that doesn't care whether pbuf or netbuf - * is received + * is received (this is internal, it's just here for describing common errors) * * @param conn the netconn from which to receive data * @param new_buf pointer where a new pbuf/netbuf is stored when received data + * @param apiflags flags that control function behaviour. For now only: + * - NETCONN_DONTBLOCK: only read data that is available now, don't wait for more data * @return ERR_OK if data has been received, an error code otherwise (timeout, * memory error or another error) + * ERR_CONN if not connected + * ERR_CLSD if TCP connection has been closed + * ERR_WOULDBLOCK if the netconn is nonblocking but would block to wait for data + * ERR_TIMEOUT if the netconn has a receive timeout and no data was received */ static err_t -netconn_recv_data(struct netconn *conn, void **new_buf) +netconn_recv_data(struct netconn *conn, void **new_buf, u8_t apiflags) { void *buf = NULL; u16_t len; -#if LWIP_TCP - API_MSG_VAR_DECLARE(msg); -#if LWIP_MPU_COMPATIBLE - msg = NULL; -#endif -#endif /* LWIP_TCP */ LWIP_ERROR("netconn_recv: invalid pointer", (new_buf != NULL), return ERR_ARG;); *new_buf = NULL; LWIP_ERROR("netconn_recv: invalid conn", (conn != NULL), return ERR_ARG;); -#if LWIP_TCP -#if (LWIP_UDP || LWIP_RAW) - if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) -#endif /* (LWIP_UDP || LWIP_RAW) */ - { - if (!sys_mbox_valid(&conn->recvmbox)) { - /* This happens when calling this function after receiving FIN */ - return sys_mbox_valid(&conn->acceptmbox) ? ERR_CONN : ERR_CLSD; + + if (!NETCONN_RECVMBOX_WAITABLE(conn)) { + err_t err = netconn_err(conn); + if (err != ERR_OK) { + /* return pending error */ + return err; } + return ERR_CONN; } -#endif /* LWIP_TCP */ - LWIP_ERROR("netconn_recv: invalid recvmbox", sys_mbox_valid(&conn->recvmbox), return ERR_CONN;); - if (ERR_IS_FATAL(conn->last_err)) { - /* don't recv on fatal errors: this might block the application task - waiting on recvmbox forever! */ - /* @todo: this does not allow us to fetch data that has been put into recvmbox - before the fatal error occurred - is that a problem? */ - return conn->last_err; - } -#if LWIP_TCP -#if (LWIP_UDP || LWIP_RAW) - if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) -#endif /* (LWIP_UDP || LWIP_RAW) */ - { - API_MSG_VAR_ALLOC(msg); - } -#endif /* LWIP_TCP */ - -#if LWIP_SO_RCVTIMEO - if (sys_arch_mbox_fetch(&conn->recvmbox, &buf, conn->recv_timeout) == SYS_ARCH_TIMEOUT) { -#if LWIP_TCP -#if (LWIP_UDP || LWIP_RAW) - if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) -#endif /* (LWIP_UDP || LWIP_RAW) */ - { - API_MSG_VAR_FREE(msg); - } -#endif /* LWIP_TCP */ - return ERR_TIMEOUT; - } -#else - sys_arch_mbox_fetch(&conn->recvmbox, &buf, 0); -#endif /* LWIP_SO_RCVTIMEO*/ - -#if LWIP_TCP -#if (LWIP_UDP || LWIP_RAW) - if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) -#endif /* (LWIP_UDP || LWIP_RAW) */ - { - /* Let the stack know that we have taken the data. */ - /* @todo: Speedup: Don't block and wait for the answer here - (to prevent multiple thread-switches). */ - API_MSG_VAR_REF(msg).conn = conn; - if (buf != NULL) { - API_MSG_VAR_REF(msg).msg.r.len = ((struct pbuf *)buf)->tot_len; - } else { - API_MSG_VAR_REF(msg).msg.r.len = 1; - } - - /* don't care for the return value of lwip_netconn_do_recv */ - netconn_apimsg(lwip_netconn_do_recv, &API_MSG_VAR_REF(msg)); - API_MSG_VAR_FREE(msg); - - /* If we are closed, we indicate that we no longer wish to use the socket */ - if (buf == NULL) { - API_EVENT(conn, NETCONN_EVT_RCVMINUS, 0); - if (conn->pcb.ip == NULL) { - /* race condition: RST during recv */ - return conn->last_err == ERR_OK ? ERR_RST : conn->last_err; + NETCONN_MBOX_WAITING_INC(conn); + if (netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK) || + (conn->flags & NETCONN_FLAG_MBOXCLOSED) || (conn->pending_err != ERR_OK)) { + if (sys_arch_mbox_tryfetch(&conn->recvmbox, &buf) == SYS_ARCH_TIMEOUT) { + err_t err; + NETCONN_MBOX_WAITING_DEC(conn); + err = netconn_err(conn); + if (err != ERR_OK) { + /* return pending error */ + return err; } - /* RX side is closed, so deallocate the recvmbox */ - netconn_close_shutdown(conn, NETCONN_SHUT_RD); - /* Don' store ERR_CLSD as conn->err since we are only half-closed */ - return ERR_CLSD; + if (conn->flags & NETCONN_FLAG_MBOXCLOSED) { + return ERR_CONN; + } + return ERR_WOULDBLOCK; + } + } else { +#if LWIP_SO_RCVTIMEO + if (sys_arch_mbox_fetch(&conn->recvmbox, &buf, conn->recv_timeout) == SYS_ARCH_TIMEOUT) { + NETCONN_MBOX_WAITING_DEC(conn); + return ERR_TIMEOUT; + } +#else + sys_arch_mbox_fetch(&conn->recvmbox, &buf, 0); +#endif /* LWIP_SO_RCVTIMEO*/ + } + NETCONN_MBOX_WAITING_DEC(conn); +#if LWIP_NETCONN_FULLDUPLEX + if (conn->flags & NETCONN_FLAG_MBOXINVALID) { + if (lwip_netconn_is_deallocated_msg(buf)) { + /* the netconn has been closed from another thread */ + API_MSG_VAR_FREE_ACCEPT(msg); + return ERR_CONN; + } + } +#endif + +#if LWIP_TCP +#if (LWIP_UDP || LWIP_RAW) + if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) +#endif /* (LWIP_UDP || LWIP_RAW) */ + { + err_t err; + /* Check if this is an error message or a pbuf */ + if (lwip_netconn_is_err_msg(buf, &err)) { + /* new_buf has been zeroed above already */ + if (err == ERR_CLSD) { + /* connection closed translates to ERR_OK with *new_buf == NULL */ + return ERR_OK; + } + return err; } len = ((struct pbuf *)buf)->tot_len; } @@ -572,7 +655,7 @@ netconn_recv_data(struct netconn *conn, void **new_buf) #if (LWIP_UDP || LWIP_RAW) { LWIP_ASSERT("buf != NULL", buf != NULL); - len = netbuf_len((struct netbuf*)buf); + len = netbuf_len((struct netbuf *)buf); } #endif /* (LWIP_UDP || LWIP_RAW) */ @@ -589,6 +672,102 @@ netconn_recv_data(struct netconn *conn, void **new_buf) return ERR_OK; } +#if LWIP_TCP +static err_t +netconn_tcp_recvd_msg(struct netconn *conn, size_t len, struct api_msg *msg) +{ + LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) && + NETCONNTYPE_GROUP(netconn_type(conn)) == NETCONN_TCP, return ERR_ARG;); + + msg->conn = conn; + msg->msg.r.len = len; + + return netconn_apimsg(lwip_netconn_do_recv, msg); +} + +err_t +netconn_tcp_recvd(struct netconn *conn, size_t len) +{ + err_t err; + API_MSG_VAR_DECLARE(msg); + LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) && + NETCONNTYPE_GROUP(netconn_type(conn)) == NETCONN_TCP, return ERR_ARG;); + + API_MSG_VAR_ALLOC(msg); + err = netconn_tcp_recvd_msg(conn, len, &API_VAR_REF(msg)); + API_MSG_VAR_FREE(msg); + return err; +} + +static err_t +netconn_recv_data_tcp(struct netconn *conn, struct pbuf **new_buf, u8_t apiflags) +{ + err_t err; + struct pbuf *buf; + API_MSG_VAR_DECLARE(msg); +#if LWIP_MPU_COMPATIBLE + msg = NULL; +#endif + + if (!NETCONN_RECVMBOX_WAITABLE(conn)) { + /* This only happens when calling this function more than once *after* receiving FIN */ + return ERR_CONN; + } + if (netconn_is_flag_set(conn, NETCONN_FIN_RX_PENDING)) { + netconn_clear_flags(conn, NETCONN_FIN_RX_PENDING); + goto handle_fin; + } + + if (!(apiflags & NETCONN_NOAUTORCVD)) { + /* need to allocate API message here so empty message pool does not result in event loss + * see bug #47512: MPU_COMPATIBLE may fail on empty pool */ + API_MSG_VAR_ALLOC(msg); + } + + err = netconn_recv_data(conn, (void **)new_buf, apiflags); + if (err != ERR_OK) { + if (!(apiflags & NETCONN_NOAUTORCVD)) { + API_MSG_VAR_FREE(msg); + } + return err; + } + buf = *new_buf; + if (!(apiflags & NETCONN_NOAUTORCVD)) { + /* Let the stack know that we have taken the data. */ + u16_t len = buf ? buf->tot_len : 1; + /* don't care for the return value of lwip_netconn_do_recv */ + /* @todo: this should really be fixed, e.g. by retrying in poll on error */ + netconn_tcp_recvd_msg(conn, len, &API_VAR_REF(msg)); + API_MSG_VAR_FREE(msg); + } + + /* If we are closed, we indicate that we no longer wish to use the socket */ + if (buf == NULL) { + if (apiflags & NETCONN_NOFIN) { + /* received a FIN but the caller cannot handle it right now: + re-enqueue it and return "no data" */ + netconn_set_flags(conn, NETCONN_FIN_RX_PENDING); + return ERR_WOULDBLOCK; + } else { +handle_fin: + API_EVENT(conn, NETCONN_EVT_RCVMINUS, 0); + if (conn->pcb.ip == NULL) { + /* race condition: RST during recv */ + err = netconn_err(conn); + if (err != ERR_OK) { + return err; + } + return ERR_RST; + } + /* RX side is closed, so deallocate the recvmbox */ + netconn_close_shutdown(conn, NETCONN_SHUT_RD); + /* Don' store ERR_CLSD as conn->err since we are only half-closed */ + return ERR_CLSD; + } + } + return err; +} + /** * @ingroup netconn_tcp * Receive data (in form of a pbuf) from a TCP netconn @@ -596,16 +775,76 @@ netconn_recv_data(struct netconn *conn, void **new_buf) * @param conn the netconn from which to receive data * @param new_buf pointer where a new pbuf is stored when received data * @return ERR_OK if data has been received, an error code otherwise (timeout, - * memory error or another error) + * memory error or another error, @see netconn_recv_data) * ERR_ARG if conn is not a TCP netconn */ err_t netconn_recv_tcp_pbuf(struct netconn *conn, struct pbuf **new_buf) { - LWIP_ERROR("netconn_recv: invalid conn", (conn != NULL) && + LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) && NETCONNTYPE_GROUP(netconn_type(conn)) == NETCONN_TCP, return ERR_ARG;); - return netconn_recv_data(conn, (void **)new_buf); + return netconn_recv_data_tcp(conn, new_buf, 0); +} + +/** + * @ingroup netconn_tcp + * Receive data (in form of a pbuf) from a TCP netconn + * + * @param conn the netconn from which to receive data + * @param new_buf pointer where a new pbuf is stored when received data + * @param apiflags flags that control function behaviour. For now only: + * - NETCONN_DONTBLOCK: only read data that is available now, don't wait for more data + * @return ERR_OK if data has been received, an error code otherwise (timeout, + * memory error or another error, @see netconn_recv_data) + * ERR_ARG if conn is not a TCP netconn + */ +err_t +netconn_recv_tcp_pbuf_flags(struct netconn *conn, struct pbuf **new_buf, u8_t apiflags) +{ + LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) && + NETCONNTYPE_GROUP(netconn_type(conn)) == NETCONN_TCP, return ERR_ARG;); + + return netconn_recv_data_tcp(conn, new_buf, apiflags); +} +#endif /* LWIP_TCP */ + +/** + * Receive data (in form of a netbuf) from a UDP or RAW netconn + * + * @param conn the netconn from which to receive data + * @param new_buf pointer where a new netbuf is stored when received data + * @return ERR_OK if data has been received, an error code otherwise (timeout, + * memory error or another error) + * ERR_ARG if conn is not a UDP/RAW netconn + */ +err_t +netconn_recv_udp_raw_netbuf(struct netconn *conn, struct netbuf **new_buf) +{ + LWIP_ERROR("netconn_recv_udp_raw_netbuf: invalid conn", (conn != NULL) && + NETCONNTYPE_GROUP(netconn_type(conn)) != NETCONN_TCP, return ERR_ARG;); + + return netconn_recv_data(conn, (void **)new_buf, 0); +} + +/** + * Receive data (in form of a netbuf) from a UDP or RAW netconn + * + * @param conn the netconn from which to receive data + * @param new_buf pointer where a new netbuf is stored when received data + * @param apiflags flags that control function behaviour. For now only: + * - NETCONN_DONTBLOCK: only read data that is available now, don't wait for more data + * @return ERR_OK if data has been received, an error code otherwise (timeout, + * memory error or another error) + * ERR_ARG if conn is not a UDP/RAW netconn + */ +err_t +netconn_recv_udp_raw_netbuf_flags(struct netconn *conn, struct netbuf **new_buf, u8_t apiflags) +{ + LWIP_ERROR("netconn_recv_udp_raw_netbuf: invalid conn", (conn != NULL) && + NETCONNTYPE_GROUP(netconn_type(conn)) != NETCONN_TCP, return ERR_ARG;); + + return netconn_recv_data(conn, (void **)new_buf, apiflags); } /** @@ -642,7 +881,7 @@ netconn_recv(struct netconn *conn, struct netbuf **new_buf) return ERR_MEM; } - err = netconn_recv_data(conn, (void **)&p); + err = netconn_recv_data_tcp(conn, &p, 0); if (err != ERR_OK) { memp_free(MEMP_NETBUF, buf); return err; @@ -663,7 +902,7 @@ netconn_recv(struct netconn *conn, struct netbuf **new_buf) #endif /* LWIP_TCP && (LWIP_UDP || LWIP_RAW) */ { #if (LWIP_UDP || LWIP_RAW) - return netconn_recv_data(conn, (void **)new_buf); + return netconn_recv_data(conn, (void **)new_buf, 0); #endif /* (LWIP_UDP || LWIP_RAW) */ } } @@ -734,16 +973,38 @@ netconn_send(struct netconn *conn, struct netbuf *buf) err_t netconn_write_partly(struct netconn *conn, const void *dataptr, size_t size, u8_t apiflags, size_t *bytes_written) +{ + struct netvector vector; + vector.ptr = dataptr; + vector.len = size; + return netconn_write_vectors_partly(conn, &vector, 1, apiflags, bytes_written); +} + +/** + * Send vectorized data atomically over a TCP netconn. + * + * @param conn the TCP netconn over which to send data + * @param vectors array of vectors containing data to send + * @param vectorcnt number of vectors in the array + * @param apiflags combination of following flags : + * - NETCONN_COPY: data will be copied into memory belonging to the stack + * - NETCONN_MORE: for TCP connection, PSH flag will be set on last segment sent + * - NETCONN_DONTBLOCK: only write the data if all data can be written at once + * @param bytes_written pointer to a location that receives the number of written bytes + * @return ERR_OK if data was sent, any other err_t on error + */ +err_t +netconn_write_vectors_partly(struct netconn *conn, struct netvector *vectors, u16_t vectorcnt, + u8_t apiflags, size_t *bytes_written) { API_MSG_VAR_DECLARE(msg); err_t err; u8_t dontblock; + size_t size; + int i; LWIP_ERROR("netconn_write: invalid conn", (conn != NULL), return ERR_ARG;); - LWIP_ERROR("netconn_write: invalid conn->type", (NETCONNTYPE_GROUP(conn->type)== NETCONN_TCP), return ERR_VAL;); - if (size == 0) { - return ERR_OK; - } + LWIP_ERROR("netconn_write: invalid conn->type", (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP), return ERR_VAL;); dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK); #if LWIP_SO_SNDTIMEO if (conn->send_timeout != 0) { @@ -756,12 +1017,37 @@ netconn_write_partly(struct netconn *conn, const void *dataptr, size_t size, return ERR_VAL; } + /* sum up the total size */ + size = 0; + for (i = 0; i < vectorcnt; i++) { + size += vectors[i].len; + if (size < vectors[i].len) { + /* overflow */ + return ERR_VAL; + } + } + if (size == 0) { + return ERR_OK; + } else if (size > SSIZE_MAX) { + ssize_t limited; + /* this is required by the socket layer (cannot send full size_t range) */ + if (!bytes_written) { + return ERR_VAL; + } + /* limit the amount of data to send */ + limited = SSIZE_MAX; + size = (size_t)limited; + } + API_MSG_VAR_ALLOC(msg); /* non-blocking write sends as much */ API_MSG_VAR_REF(msg).conn = conn; - API_MSG_VAR_REF(msg).msg.w.dataptr = dataptr; + API_MSG_VAR_REF(msg).msg.w.vector = vectors; + API_MSG_VAR_REF(msg).msg.w.vector_cnt = vectorcnt; + API_MSG_VAR_REF(msg).msg.w.vector_off = 0; API_MSG_VAR_REF(msg).msg.w.apiflags = apiflags; API_MSG_VAR_REF(msg).msg.w.len = size; + API_MSG_VAR_REF(msg).msg.w.offset = 0; #if LWIP_SO_SNDTIMEO if (conn->send_timeout != 0) { /* get the time we started, which is later compared to @@ -776,13 +1062,14 @@ netconn_write_partly(struct netconn *conn, const void *dataptr, size_t size, but if it is, this is done inside api_msg.c:do_write(), so we can use the non-blocking version here. */ err = netconn_apimsg(lwip_netconn_do_write, &API_MSG_VAR_REF(msg)); - if ((err == ERR_OK) && (bytes_written != NULL)) { - if (dontblock) { - /* nonblocking write: maybe the data has been sent partly */ - *bytes_written = API_MSG_VAR_REF(msg).msg.w.len; - } else { - /* blocking call succeeded: all data has been sent if it */ - *bytes_written = size; + if (err == ERR_OK) { + if (bytes_written != NULL) { + *bytes_written = API_MSG_VAR_REF(msg).msg.w.offset; + } + /* for blocking, check all requested bytes were written, NOTE: send_timeout is + treated as dontblock (see dontblock assignment above) */ + if (!dontblock) { + LWIP_ASSERT("do_write failed to write all bytes", API_MSG_VAR_REF(msg).msg.w.offset == size); } } API_MSG_VAR_FREE(msg); @@ -841,6 +1128,28 @@ netconn_close(struct netconn *conn) return netconn_close_shutdown(conn, NETCONN_SHUT_RDWR); } +/** + * @ingroup netconn_common + * Get and reset pending error on a netconn + * + * @param conn the netconn to get the error from + * @return and pending error or ERR_OK if no error was pending + */ +err_t +netconn_err(struct netconn *conn) +{ + err_t err; + SYS_ARCH_DECL_PROTECT(lev); + if (conn == NULL) { + return ERR_OK; + } + SYS_ARCH_PROTECT(lev); + err = conn->pending_err; + conn->pending_err = ERR_OK; + SYS_ARCH_UNPROTECT(lev); + return err; +} + /** * @ingroup netconn_tcp * Shut down one or both sides of a TCP netconn (doesn't delete it). @@ -853,7 +1162,7 @@ netconn_close(struct netconn *conn) err_t netconn_shutdown(struct netconn *conn, u8_t shut_rx, u8_t shut_tx) { - return netconn_close_shutdown(conn, (shut_rx ? NETCONN_SHUT_RD : 0) | (shut_tx ? NETCONN_SHUT_WR : 0)); + return netconn_close_shutdown(conn, (u8_t)((shut_rx ? NETCONN_SHUT_RD : 0) | (shut_tx ? NETCONN_SHUT_WR : 0))); } #if LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) @@ -900,6 +1209,48 @@ netconn_join_leave_group(struct netconn *conn, return err; } +/** + * @ingroup netconn_udp + * Join multicast groups for UDP netconns. + * + * @param conn the UDP netconn for which to change multicast addresses + * @param multiaddr IP address of the multicast group to join or leave + * @param if_idx the index of the netif + * @param join_or_leave flag whether to send a join- or leave-message + * @return ERR_OK if the action was taken, any err_t on error + */ +err_t +netconn_join_leave_group_netif(struct netconn *conn, + const ip_addr_t *multiaddr, + u8_t if_idx, + enum netconn_igmp join_or_leave) +{ + API_MSG_VAR_DECLARE(msg); + err_t err; + + LWIP_ERROR("netconn_join_leave_group: invalid conn", (conn != NULL), return ERR_ARG;); + + API_MSG_VAR_ALLOC(msg); + +#if LWIP_IPV4 + /* Don't propagate NULL pointer (IP_ADDR_ANY alias) to subsequent functions */ + if (multiaddr == NULL) { + multiaddr = IP4_ADDR_ANY; + } + if (if_idx == NETIF_NO_INDEX) { + return ERR_IF; + } +#endif /* LWIP_IPV4 */ + + API_MSG_VAR_REF(msg).conn = conn; + API_MSG_VAR_REF(msg).msg.jl.multiaddr = API_MSG_VAR_REF(multiaddr); + API_MSG_VAR_REF(msg).msg.jl.if_idx = if_idx; + API_MSG_VAR_REF(msg).msg.jl.join_or_leave = join_or_leave; + err = netconn_apimsg(lwip_netconn_do_join_leave_group_netif, &API_MSG_VAR_REF(msg)); + API_MSG_VAR_FREE(msg); + + return err; +} #endif /* LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) */ #if LWIP_DNS @@ -938,10 +1289,20 @@ netconn_gethostbyname(const char *name, ip_addr_t *addr) } #endif +#ifdef LWIP_HOOK_NETCONN_EXTERNAL_RESOLVE +#if LWIP_IPV4 && LWIP_IPV6 + if (LWIP_HOOK_NETCONN_EXTERNAL_RESOLVE(name, addr, dns_addrtype, &err)) { +#else + if (LWIP_HOOK_NETCONN_EXTERNAL_RESOLVE(name, addr, NETCONN_DNS_DEFAULT, &err)) { +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + return err; + } +#endif /* LWIP_HOOK_NETCONN_EXTERNAL_RESOLVE */ + API_VAR_ALLOC(struct dns_api_msg, MEMP_DNS_API_MSG, msg, ERR_MEM); #if LWIP_MPU_COMPATIBLE - strncpy(API_VAR_REF(msg).name, name, DNS_MAX_NAME_LENGTH-1); - API_VAR_REF(msg).name[DNS_MAX_NAME_LENGTH-1] = 0; + strncpy(API_VAR_REF(msg).name, name, DNS_MAX_NAME_LENGTH - 1); + API_VAR_REF(msg).name[DNS_MAX_NAME_LENGTH - 1] = 0; #else /* LWIP_MPU_COMPATIBLE */ msg.err = &err; msg.sem = &sem; @@ -961,18 +1322,14 @@ netconn_gethostbyname(const char *name, ip_addr_t *addr) } #endif /* LWIP_NETCONN_SEM_PER_THREAD */ - cberr = tcpip_callback(lwip_netconn_do_gethostbyname, &API_VAR_REF(msg)); - if (cberr != ERR_OK) { -#if !LWIP_NETCONN_SEM_PER_THREAD - sys_sem_free(API_EXPR_REF(API_VAR_REF(msg).sem)); -#endif /* !LWIP_NETCONN_SEM_PER_THREAD */ - API_VAR_FREE(MEMP_DNS_API_MSG, msg); - return cberr; - } - sys_sem_wait(API_EXPR_REF_SEM(API_VAR_REF(msg).sem)); + cberr = tcpip_send_msg_wait_sem(lwip_netconn_do_gethostbyname, &API_VAR_REF(msg), API_EXPR_REF(API_VAR_REF(msg).sem)); #if !LWIP_NETCONN_SEM_PER_THREAD sys_sem_free(API_EXPR_REF(API_VAR_REF(msg).sem)); #endif /* !LWIP_NETCONN_SEM_PER_THREAD */ + if (cberr != ERR_OK) { + API_VAR_FREE(MEMP_DNS_API_MSG, msg); + return cberr; + } #if LWIP_MPU_COMPATIBLE *addr = msg->addr; diff --git a/Libraries/LwIP/src/api/api_msg.c b/Libraries/LwIP/src/api/api_msg.c index a609017..8952baa 100755 --- a/Libraries/LwIP/src/api/api_msg.c +++ b/Libraries/LwIP/src/api/api_msg.c @@ -60,10 +60,16 @@ #define NETCONN_TCP_POLL_INTERVAL 2 #define SET_NONBLOCKING_CONNECT(conn, val) do { if (val) { \ - (conn)->flags |= NETCONN_FLAG_IN_NONBLOCKING_CONNECT; \ + netconn_set_flags(conn, NETCONN_FLAG_IN_NONBLOCKING_CONNECT); \ } else { \ - (conn)->flags &= ~ NETCONN_FLAG_IN_NONBLOCKING_CONNECT; }} while(0) -#define IN_NONBLOCKING_CONNECT(conn) (((conn)->flags & NETCONN_FLAG_IN_NONBLOCKING_CONNECT) != 0) + netconn_clear_flags(conn, NETCONN_FLAG_IN_NONBLOCKING_CONNECT); }} while(0) +#define IN_NONBLOCKING_CONNECT(conn) netconn_is_flag_set(conn, NETCONN_FLAG_IN_NONBLOCKING_CONNECT) + +#if LWIP_NETCONN_FULLDUPLEX +#define NETCONN_MBOX_VALID(conn, mbox) (sys_mbox_valid(mbox) && ((conn->flags & NETCONN_FLAG_MBOXINVALID) == 0)) +#else +#define NETCONN_MBOX_VALID(conn, mbox) sys_mbox_valid(mbox) +#endif /* forward declarations */ #if LWIP_TCP @@ -78,16 +84,69 @@ static err_t lwip_netconn_do_writemore(struct netconn *conn WRITE_DELAYED_PARAM static err_t lwip_netconn_do_close_internal(struct netconn *conn WRITE_DELAYED_PARAM); #endif +static void netconn_drain(struct netconn *conn); + #if LWIP_TCPIP_CORE_LOCKING -#define TCPIP_APIMSG_ACK(m) NETCONN_SET_SAFE_ERR((m)->conn, (m)->err) +#define TCPIP_APIMSG_ACK(m) #else /* LWIP_TCPIP_CORE_LOCKING */ -#define TCPIP_APIMSG_ACK(m) do { NETCONN_SET_SAFE_ERR((m)->conn, (m)->err); sys_sem_signal(LWIP_API_MSG_SEM(m)); } while(0) +#define TCPIP_APIMSG_ACK(m) do { sys_sem_signal(LWIP_API_MSG_SEM(m)); } while(0) #endif /* LWIP_TCPIP_CORE_LOCKING */ +#if LWIP_NETCONN_FULLDUPLEX +const u8_t netconn_deleted = 0; + +int +lwip_netconn_is_deallocated_msg(void *msg) +{ + if (msg == &netconn_deleted) { + return 1; + } + return 0; +} +#endif /* LWIP_NETCONN_FULLDUPLEX */ + #if LWIP_TCP -u8_t netconn_aborted; +const u8_t netconn_aborted = 0; +const u8_t netconn_reset = 0; +const u8_t netconn_closed = 0; + +/** Translate an error to a unique void* passed via an mbox */ +static void * +lwip_netconn_err_to_msg(err_t err) +{ + switch (err) { + case ERR_ABRT: + return LWIP_CONST_CAST(void *, &netconn_aborted); + case ERR_RST: + return LWIP_CONST_CAST(void *, &netconn_reset); + case ERR_CLSD: + return LWIP_CONST_CAST(void *, &netconn_closed); + default: + LWIP_ASSERT("unhandled error", err == ERR_OK); + return NULL; + } +} + +int +lwip_netconn_is_err_msg(void *msg, err_t *err) +{ + LWIP_ASSERT("err != NULL", err != NULL); + + if (msg == &netconn_aborted) { + *err = ERR_ABRT; + return 1; + } else if (msg == &netconn_reset) { + *err = ERR_RST; + return 1; + } else if (msg == &netconn_closed) { + *err = ERR_CLSD; + return 1; + } + return 0; +} #endif /* LWIP_TCP */ + #if LWIP_RAW /** * Receive callback function for RAW netconns. @@ -98,7 +157,7 @@ u8_t netconn_aborted; */ static u8_t recv_raw(void *arg, struct raw_pcb *pcb, struct pbuf *p, - const ip_addr_t *addr) + const ip_addr_t *addr) { struct pbuf *q; struct netbuf *buf; @@ -107,7 +166,7 @@ recv_raw(void *arg, struct raw_pcb *pcb, struct pbuf *p, LWIP_UNUSED_ARG(addr); conn = (struct netconn *)arg; - if ((conn != NULL) && sys_mbox_valid(&conn->recvmbox)) { + if ((conn != NULL) && NETCONN_MBOX_VALID(conn, &conn->recvmbox)) { #if LWIP_SO_RCVBUF int recv_avail; SYS_ARCH_GET(conn->recv_avail, recv_avail); @@ -116,14 +175,7 @@ recv_raw(void *arg, struct raw_pcb *pcb, struct pbuf *p, } #endif /* LWIP_SO_RCVBUF */ /* copy the whole packet into new pbufs */ - q = pbuf_alloc(PBUF_RAW, p->tot_len, PBUF_RAM); - if (q != NULL) { - if (pbuf_copy(q, p) != ERR_OK) { - pbuf_free(q); - q = NULL; - } - } - + q = pbuf_clone(PBUF_RAW, PBUF_RAM, p); if (q != NULL) { u16_t len; buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); @@ -164,7 +216,7 @@ recv_raw(void *arg, struct raw_pcb *pcb, struct pbuf *p, */ static void recv_udp(void *arg, struct udp_pcb *pcb, struct pbuf *p, - const ip_addr_t *addr, u16_t port) + const ip_addr_t *addr, u16_t port) { struct netbuf *buf; struct netconn *conn; @@ -187,10 +239,10 @@ recv_udp(void *arg, struct udp_pcb *pcb, struct pbuf *p, #if LWIP_SO_RCVBUF SYS_ARCH_GET(conn->recv_avail, recv_avail); - if (!sys_mbox_valid(&conn->recvmbox) || + if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox) || ((recv_avail + (int)(p->tot_len)) > conn->recv_bufsize)) { #else /* LWIP_SO_RCVBUF */ - if (!sys_mbox_valid(&conn->recvmbox)) { + if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox)) { #endif /* LWIP_SO_RCVBUF */ pbuf_free(p); return; @@ -206,12 +258,10 @@ recv_udp(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_set(&buf->addr, addr); buf->port = port; #if LWIP_NETBUF_RECVINFO - { + if (conn->flags & NETCONN_FLAG_PKTINFO) { /* get the UDP header - always in the first pbuf, ensured by udp_input */ - const struct udp_hdr* udphdr = (const struct udp_hdr*)ip_next_header_ptr(); -#if LWIP_CHECKSUM_ON_COPY + const struct udp_hdr *udphdr = (const struct udp_hdr *)ip_next_header_ptr(); buf->flags = NETBUF_FLAG_DESTADDR; -#endif /* LWIP_CHECKSUM_ON_COPY */ ip_addr_set(&buf->toaddr, ip_current_dest_addr()); buf->toport_chksum = udphdr->dest; } @@ -244,10 +294,13 @@ recv_tcp(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) { struct netconn *conn; u16_t len; + void *msg; LWIP_UNUSED_ARG(pcb); LWIP_ASSERT("recv_tcp must have a pcb argument", pcb != NULL); LWIP_ASSERT("recv_tcp must have an argument", arg != NULL); + LWIP_ASSERT("err != ERR_OK unhandled", err == ERR_OK); + LWIP_UNUSED_ARG(err); /* for LWIP_NOASSERT */ conn = (struct netconn *)arg; if (conn == NULL) { @@ -255,7 +308,7 @@ recv_tcp(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) } LWIP_ASSERT("recv_tcp: recv for wrong pcb!", conn->pcb.tcp == pcb); - if (!sys_mbox_valid(&conn->recvmbox)) { + if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox)) { /* recvmbox already deleted */ if (p != NULL) { tcp_recved(pcb, p->tot_len); @@ -267,18 +320,15 @@ recv_tcp(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) using recv_avail since that could break the connection (data is already ACKed) */ - /* don't overwrite fatal errors! */ - if (err != ERR_OK) { - NETCONN_SET_SAFE_ERR(conn, err); - } - if (p != NULL) { + msg = p; len = p->tot_len; } else { + msg = LWIP_CONST_CAST(void *, &netconn_closed); len = 0; } - if (sys_mbox_trypost(&conn->recvmbox, p) != ERR_OK) { + if (sys_mbox_trypost(&conn->recvmbox, msg) != ERR_OK) { /* don't deallocate p: it is presented to us later again from tcp_fasttmr! */ return ERR_MEM; } else { @@ -328,8 +378,8 @@ poll_tcp(void *arg, struct tcp_pcb *pcb) /* If the queued byte- or pbuf-count drops below the configured low-water limit, let select mark this pcb as writable again. */ if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) && - (tcp_sndqueuelen(conn->pcb.tcp) < TCP_SNDQUEUELOWAT)) { - conn->flags &= ~NETCONN_FLAG_CHECK_WRITESPACE; + (tcp_sndqueuelen(conn->pcb.tcp) < TCP_SNDQUEUELOWAT)) { + netconn_clear_flags(conn, NETCONN_FLAG_CHECK_WRITESPACE); API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); } } @@ -362,8 +412,8 @@ sent_tcp(void *arg, struct tcp_pcb *pcb, u16_t len) /* If the queued byte- or pbuf-count drops below the configured low-water limit, let select mark this pcb as writable again. */ if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) && - (tcp_sndqueuelen(conn->pcb.tcp) < TCP_SNDQUEUELOWAT)) { - conn->flags &= ~NETCONN_FLAG_CHECK_WRITESPACE; + (tcp_sndqueuelen(conn->pcb.tcp) < TCP_SNDQUEUELOWAT)) { + netconn_clear_flags(conn, NETCONN_FLAG_CHECK_WRITESPACE); API_EVENT(conn, NETCONN_EVT_SENDPLUS, len); } } @@ -383,26 +433,26 @@ err_tcp(void *arg, err_t err) { struct netconn *conn; enum netconn_state old_state; + void *mbox_msg; + SYS_ARCH_DECL_PROTECT(lev); conn = (struct netconn *)arg; LWIP_ASSERT("conn != NULL", (conn != NULL)); + SYS_ARCH_PROTECT(lev); + + /* when err is called, the pcb is deallocated, so delete the reference */ conn->pcb.tcp = NULL; + /* store pending error */ + conn->pending_err = err; + /* prevent application threads from blocking on 'recvmbox'/'acceptmbox' */ + conn->flags |= NETCONN_FLAG_MBOXCLOSED; /* reset conn->state now before waking up other threads */ old_state = conn->state; conn->state = NETCONN_NONE; - if (old_state == NETCONN_CLOSE) { - /* RST during close: let close return success & dealloc the netconn */ - err = ERR_OK; - NETCONN_SET_SAFE_ERR(conn, ERR_OK); - } else { - /* no check since this is always fatal! */ - SYS_ARCH_SET(conn->last_err, err); - } - - /* @todo: the type of NETCONN_EVT created should depend on 'old_state' */ + SYS_ARCH_UNPROTECT(lev); /* Notify the user layer about a connection error. Used to signal select. */ API_EVENT(conn, NETCONN_EVT_ERROR, 0); @@ -411,15 +461,16 @@ err_tcp(void *arg, err_t err) API_EVENT(conn, NETCONN_EVT_RCVPLUS, 0); API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); - /* pass NULL-message to recvmbox to wake up pending recv */ - if (sys_mbox_valid(&conn->recvmbox)) { + mbox_msg = lwip_netconn_err_to_msg(err); + /* pass error message to recvmbox to wake up pending recv */ + if (NETCONN_MBOX_VALID(conn, &conn->recvmbox)) { /* use trypost to prevent deadlock */ - sys_mbox_trypost(&conn->recvmbox, NULL); + sys_mbox_trypost(&conn->recvmbox, mbox_msg); } - /* pass NULL-message to acceptmbox to wake up pending accept */ - if (sys_mbox_valid(&conn->acceptmbox)) { + /* pass error message to acceptmbox to wake up pending accept */ + if (NETCONN_MBOX_VALID(conn, &conn->acceptmbox)) { /* use trypost to preven deadlock */ - sys_mbox_trypost(&conn->acceptmbox, NULL); + sys_mbox_trypost(&conn->acceptmbox, mbox_msg); } if ((old_state == NETCONN_WRITE) || (old_state == NETCONN_CLOSE) || @@ -430,16 +481,23 @@ err_tcp(void *arg, err_t err) SET_NONBLOCKING_CONNECT(conn, 0); if (!was_nonblocking_connect) { - sys_sem_t* op_completed_sem; + sys_sem_t *op_completed_sem; /* set error return code */ LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); - conn->current_msg->err = err; + if (old_state == NETCONN_CLOSE) { + /* let close succeed: the connection is closed after all... */ + conn->current_msg->err = ERR_OK; + } else { + /* Write and connect fail */ + conn->current_msg->err = err; + } op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg); LWIP_ASSERT("inavlid op_completed_sem", sys_sem_valid(op_completed_sem)); conn->current_msg = NULL; /* wake up the waiting task */ - NETCONN_SET_SAFE_ERR(conn, err); sys_sem_signal(op_completed_sem); + } else { + /* @todo: test what happens for error on nonblocking connect */ } } else { LWIP_ASSERT("conn->current_msg == NULL", conn->current_msg == NULL); @@ -480,28 +538,30 @@ accept_function(void *arg, struct tcp_pcb *newpcb, err_t err) if (conn == NULL) { return ERR_VAL; } - if (!sys_mbox_valid(&conn->acceptmbox)) { + if (!NETCONN_MBOX_VALID(conn, &conn->acceptmbox)) { LWIP_DEBUGF(API_MSG_DEBUG, ("accept_function: acceptmbox already deleted\n")); return ERR_VAL; } if (newpcb == NULL) { /* out-of-pcbs during connect: pass on this error to the application */ - if (sys_mbox_trypost(&conn->acceptmbox, &netconn_aborted) == ERR_OK) { + if (sys_mbox_trypost(&conn->acceptmbox, lwip_netconn_err_to_msg(ERR_ABRT)) == ERR_OK) { /* Register event with callback */ API_EVENT(conn, NETCONN_EVT_RCVPLUS, 0); } return ERR_VAL; } + LWIP_ASSERT("expect newpcb == NULL or err == ERR_OK", err == ERR_OK); + LWIP_UNUSED_ARG(err); /* for LWIP_NOASSERT */ - LWIP_DEBUGF(API_MSG_DEBUG, ("accept_function: newpcb->tate: %s\n", tcp_debug_state_str(newpcb->state))); + LWIP_DEBUGF(API_MSG_DEBUG, ("accept_function: newpcb->state: %s\n", tcp_debug_state_str(newpcb->state))); /* We have to set the callback here even though * the new socket is unknown. newconn->socket is marked as -1. */ newconn = netconn_alloc(conn->type, conn->callback); if (newconn == NULL) { /* outof netconns: pass on this error to the application */ - if (sys_mbox_trypost(&conn->acceptmbox, &netconn_aborted) == ERR_OK) { + if (sys_mbox_trypost(&conn->acceptmbox, lwip_netconn_err_to_msg(ERR_ABRT)) == ERR_OK) { /* Register event with callback */ API_EVENT(conn, NETCONN_EVT_RCVPLUS, 0); } @@ -509,9 +569,6 @@ accept_function(void *arg, struct tcp_pcb *newpcb, err_t err) } newconn->pcb.tcp = newpcb; setup_tcp(newconn); - /* no protection: when creating the pcb, the netconn is not yet known - to the application thread */ - newconn->last_err = err; /* handle backlog counter */ tcp_backlog_delayed(newpcb); @@ -520,7 +577,7 @@ accept_function(void *arg, struct tcp_pcb *newpcb, err_t err) /* When returning != ERR_OK, the pcb is aborted in tcp_process(), so do nothing here! */ /* remove all references to this netconn from the pcb */ - struct tcp_pcb* pcb = newconn->pcb.tcp; + struct tcp_pcb *pcb = newconn->pcb.tcp; tcp_arg(pcb, NULL); tcp_recv(pcb, NULL); tcp_sent(pcb, NULL); @@ -546,7 +603,7 @@ accept_function(void *arg, struct tcp_pcb *newpcb, err_t err) * Create a new pcb of a specific type. * Called from lwip_netconn_do_newconn(). * - * @param msg the api_msg_msg describing the connection type + * @param msg the api_msg describing the connection type */ static void pcb_new(struct api_msg *msg) @@ -554,59 +611,59 @@ pcb_new(struct api_msg *msg) enum lwip_ip_addr_type iptype = IPADDR_TYPE_V4; LWIP_ASSERT("pcb_new: pcb already allocated", msg->conn->pcb.tcp == NULL); - + #if LWIP_IPV6 && LWIP_IPV4 /* IPv6: Dual-stack by default, unless netconn_set_ipv6only() is called */ - if(NETCONNTYPE_ISIPV6(netconn_type(msg->conn))) { + if (NETCONNTYPE_ISIPV6(netconn_type(msg->conn))) { iptype = IPADDR_TYPE_ANY; } #endif - + /* Allocate a PCB for this connection */ - switch(NETCONNTYPE_GROUP(msg->conn->type)) { + switch (NETCONNTYPE_GROUP(msg->conn->type)) { #if LWIP_RAW - case NETCONN_RAW: - msg->conn->pcb.raw = raw_new_ip_type(iptype, msg->msg.n.proto); - if (msg->conn->pcb.raw != NULL) { + case NETCONN_RAW: + msg->conn->pcb.raw = raw_new_ip_type(iptype, msg->msg.n.proto); + if (msg->conn->pcb.raw != NULL) { #if LWIP_IPV6 - /* ICMPv6 packets should always have checksum calculated by the stack as per RFC 3542 chapter 3.1 */ - if (NETCONNTYPE_ISIPV6(msg->conn->type) && msg->conn->pcb.raw->protocol == IP6_NEXTH_ICMP6) { - msg->conn->pcb.raw->chksum_reqd = 1; - msg->conn->pcb.raw->chksum_offset = 2; - } + /* ICMPv6 packets should always have checksum calculated by the stack as per RFC 3542 chapter 3.1 */ + if (NETCONNTYPE_ISIPV6(msg->conn->type) && msg->conn->pcb.raw->protocol == IP6_NEXTH_ICMP6) { + msg->conn->pcb.raw->chksum_reqd = 1; + msg->conn->pcb.raw->chksum_offset = 2; + } #endif /* LWIP_IPV6 */ - raw_recv(msg->conn->pcb.raw, recv_raw, msg->conn); - } - break; + raw_recv(msg->conn->pcb.raw, recv_raw, msg->conn); + } + break; #endif /* LWIP_RAW */ #if LWIP_UDP - case NETCONN_UDP: - msg->conn->pcb.udp = udp_new_ip_type(iptype); - if (msg->conn->pcb.udp != NULL) { + case NETCONN_UDP: + msg->conn->pcb.udp = udp_new_ip_type(iptype); + if (msg->conn->pcb.udp != NULL) { #if LWIP_UDPLITE - if (NETCONNTYPE_ISUDPLITE(msg->conn->type)) { - udp_setflags(msg->conn->pcb.udp, UDP_FLAGS_UDPLITE); - } + if (NETCONNTYPE_ISUDPLITE(msg->conn->type)) { + udp_setflags(msg->conn->pcb.udp, UDP_FLAGS_UDPLITE); + } #endif /* LWIP_UDPLITE */ - if (NETCONNTYPE_ISUDPNOCHKSUM(msg->conn->type)) { - udp_setflags(msg->conn->pcb.udp, UDP_FLAGS_NOCHKSUM); + if (NETCONNTYPE_ISUDPNOCHKSUM(msg->conn->type)) { + udp_setflags(msg->conn->pcb.udp, UDP_FLAGS_NOCHKSUM); + } + udp_recv(msg->conn->pcb.udp, recv_udp, msg->conn); } - udp_recv(msg->conn->pcb.udp, recv_udp, msg->conn); - } - break; + break; #endif /* LWIP_UDP */ #if LWIP_TCP - case NETCONN_TCP: - msg->conn->pcb.tcp = tcp_new_ip_type(iptype); - if (msg->conn->pcb.tcp != NULL) { - setup_tcp(msg->conn); - } - break; + case NETCONN_TCP: + msg->conn->pcb.tcp = tcp_new_ip_type(iptype); + if (msg->conn->pcb.tcp != NULL) { + setup_tcp(msg->conn); + } + break; #endif /* LWIP_TCP */ - default: - /* Unsupported netconn type, e.g. protocol disabled */ - msg->err = ERR_VAL; - return; + default: + /* Unsupported netconn type, e.g. protocol disabled */ + msg->err = ERR_VAL; + return; } if (msg->conn->pcb.ip == NULL) { msg->err = ERR_MEM; @@ -617,12 +674,12 @@ pcb_new(struct api_msg *msg) * Create a new pcb of a specific type inside a netconn. * Called from netconn_new_with_proto_and_callback. * - * @param m the api_msg_msg describing the connection type + * @param m the api_msg describing the connection type */ void lwip_netconn_do_newconn(void *m) { - struct api_msg *msg = (struct api_msg*)m; + struct api_msg *msg = (struct api_msg *)m; msg->err = ERR_OK; if (msg->conn->pcb.tcp == NULL) { @@ -644,41 +701,45 @@ lwip_netconn_do_newconn(void *m) * @return a newly allocated struct netconn or * NULL on memory error */ -struct netconn* +struct netconn * netconn_alloc(enum netconn_type t, netconn_callback callback) { struct netconn *conn; int size; + u8_t init_flags = 0; conn = (struct netconn *)memp_malloc(MEMP_NETCONN); if (conn == NULL) { return NULL; } - conn->last_err = ERR_OK; + conn->pending_err = ERR_OK; conn->type = t; conn->pcb.tcp = NULL; /* If all sizes are the same, every compiler should optimize this switch to nothing */ - switch(NETCONNTYPE_GROUP(t)) { + switch (NETCONNTYPE_GROUP(t)) { #if LWIP_RAW - case NETCONN_RAW: - size = DEFAULT_RAW_RECVMBOX_SIZE; - break; + case NETCONN_RAW: + size = DEFAULT_RAW_RECVMBOX_SIZE; + break; #endif /* LWIP_RAW */ #if LWIP_UDP - case NETCONN_UDP: - size = DEFAULT_UDP_RECVMBOX_SIZE; - break; + case NETCONN_UDP: + size = DEFAULT_UDP_RECVMBOX_SIZE; +#if LWIP_NETBUF_RECVINFO + init_flags |= NETCONN_FLAG_PKTINFO; +#endif /* LWIP_NETBUF_RECVINFO */ + break; #endif /* LWIP_UDP */ #if LWIP_TCP - case NETCONN_TCP: - size = DEFAULT_TCP_RECVMBOX_SIZE; - break; + case NETCONN_TCP: + size = DEFAULT_TCP_RECVMBOX_SIZE; + break; #endif /* LWIP_TCP */ - default: - LWIP_ASSERT("netconn_alloc: undefined netconn_type", 0); - goto free_and_return; + default: + LWIP_ASSERT("netconn_alloc: undefined netconn_type", 0); + goto free_and_return; } if (sys_mbox_new(&conn->recvmbox, size) != ERR_OK) { @@ -702,7 +763,6 @@ netconn_alloc(enum netconn_type t, netconn_callback callback) conn->callback = callback; #if LWIP_TCP conn->current_msg = NULL; - conn->write_offset = 0; #endif /* LWIP_TCP */ #if LWIP_SO_SNDTIMEO conn->send_timeout = 0; @@ -717,7 +777,7 @@ netconn_alloc(enum netconn_type t, netconn_callback callback) #if LWIP_SO_LINGER conn->linger = -1; #endif /* LWIP_SO_LINGER */ - conn->flags = 0; + conn->flags = init_flags; return conn; free_and_return: memp_free(MEMP_NETCONN, conn); @@ -734,11 +794,17 @@ void netconn_free(struct netconn *conn) { LWIP_ASSERT("PCB must be deallocated outside this function", conn->pcb.tcp == NULL); + +#if LWIP_NETCONN_FULLDUPLEX + /* in fullduplex, netconn is drained here */ + netconn_drain(conn); +#endif /* LWIP_NETCONN_FULLDUPLEX */ + LWIP_ASSERT("recvmbox must be deallocated before calling this function", - !sys_mbox_valid(&conn->recvmbox)); + !sys_mbox_valid(&conn->recvmbox)); #if LWIP_TCP LWIP_ASSERT("acceptmbox must be deallocated before calling this function", - !sys_mbox_valid(&conn->acceptmbox)); + !sys_mbox_valid(&conn->acceptmbox)); #endif /* LWIP_TCP */ #if !LWIP_NETCONN_SEM_PER_THREAD @@ -761,29 +827,31 @@ static void netconn_drain(struct netconn *conn) { void *mem; -#if LWIP_TCP - struct pbuf *p; -#endif /* LWIP_TCP */ - /* This runs in tcpip_thread, so we don't need to lock against rx packets */ + /* This runs when mbox and netconn are marked as closed, + so we don't need to lock against rx packets */ +#if LWIP_NETCONN_FULLDUPLEX + LWIP_ASSERT("netconn marked closed", conn->flags & NETCONN_FLAG_MBOXINVALID); +#endif /* LWIP_NETCONN_FULLDUPLEX */ /* Delete and drain the recvmbox. */ if (sys_mbox_valid(&conn->recvmbox)) { while (sys_mbox_tryfetch(&conn->recvmbox, &mem) != SYS_MBOX_EMPTY) { -#if LWIP_TCP - if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) { - if (mem != NULL) { - p = (struct pbuf*)mem; - /* pcb might be set to NULL already by err_tcp() */ - if (conn->pcb.tcp != NULL) { - tcp_recved(conn->pcb.tcp, p->tot_len); - } - pbuf_free(p); - } - } else -#endif /* LWIP_TCP */ +#if LWIP_NETCONN_FULLDUPLEX + if (!lwip_netconn_is_deallocated_msg(mem)) +#endif /* LWIP_NETCONN_FULLDUPLEX */ { - netbuf_delete((struct netbuf *)mem); +#if LWIP_TCP + if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) { + err_t err; + if (!lwip_netconn_is_err_msg(mem, &err)) { + pbuf_free((struct pbuf *)mem); + } + } else +#endif /* LWIP_TCP */ + { + netbuf_delete((struct netbuf *)mem); + } } } sys_mbox_free(&conn->recvmbox); @@ -794,17 +862,23 @@ netconn_drain(struct netconn *conn) #if LWIP_TCP if (sys_mbox_valid(&conn->acceptmbox)) { while (sys_mbox_tryfetch(&conn->acceptmbox, &mem) != SYS_MBOX_EMPTY) { - if (mem != &netconn_aborted) { - struct netconn *newconn = (struct netconn *)mem; - /* Only tcp pcbs have an acceptmbox, so no need to check conn->type */ - /* pcb might be set to NULL already by err_tcp() */ - /* drain recvmbox */ - netconn_drain(newconn); - if (newconn->pcb.tcp != NULL) { - tcp_abort(newconn->pcb.tcp); - newconn->pcb.tcp = NULL; +#if LWIP_NETCONN_FULLDUPLEX + if (!lwip_netconn_is_deallocated_msg(mem)) +#endif /* LWIP_NETCONN_FULLDUPLEX */ + { + err_t err; + if (!lwip_netconn_is_err_msg(mem, &err)) { + struct netconn *newconn = (struct netconn *)mem; + /* Only tcp pcbs have an acceptmbox, so no need to check conn->type */ + /* pcb might be set to NULL already by err_tcp() */ + /* drain recvmbox */ + netconn_drain(newconn); + if (newconn->pcb.tcp != NULL) { + tcp_abort(newconn->pcb.tcp); + newconn->pcb.tcp = NULL; + } + netconn_free(newconn); } - netconn_free(newconn); } } sys_mbox_free(&conn->acceptmbox); @@ -813,6 +887,27 @@ netconn_drain(struct netconn *conn) #endif /* LWIP_TCP */ } +#if LWIP_NETCONN_FULLDUPLEX +static void +netconn_mark_mbox_invalid(struct netconn *conn) +{ + int i, num_waiting; + void *msg = LWIP_CONST_CAST(void *, &netconn_deleted); + + /* Prevent new calls/threads from reading from the mbox */ + conn->flags |= NETCONN_FLAG_MBOXINVALID; + + SYS_ARCH_LOCKED(num_waiting = conn->mbox_threads_waiting); + for (i = 0; i < num_waiting; i++) { + if (sys_mbox_valid_val(conn->recvmbox)) { + sys_mbox_trypost(&conn->recvmbox, msg); + } else { + sys_mbox_trypost(&conn->acceptmbox, msg); + } + } +} +#endif /* LWIP_NETCONN_FULLDUPLEX */ + #if LWIP_TCP /** * Internal helper function to close a TCP netconn: since this sometimes @@ -825,9 +920,9 @@ static err_t lwip_netconn_do_close_internal(struct netconn *conn WRITE_DELAYED_PARAM) { err_t err; - u8_t shut, shut_rx, shut_tx, close; + u8_t shut, shut_rx, shut_tx, shut_close; u8_t close_finished = 0; - struct tcp_pcb* tpcb; + struct tcp_pcb *tpcb; #if LWIP_SO_LINGER u8_t linger_wait_required = 0; #endif /* LWIP_SO_LINGER */ @@ -845,20 +940,20 @@ lwip_netconn_do_close_internal(struct netconn *conn WRITE_DELAYED_PARAM) /* shutting down both ends is the same as closing (also if RD or WR side was shut down before already) */ if (shut == NETCONN_SHUT_RDWR) { - close = 1; + shut_close = 1; } else if (shut_rx && ((tpcb->state == FIN_WAIT_1) || (tpcb->state == FIN_WAIT_2) || (tpcb->state == CLOSING))) { - close = 1; + shut_close = 1; } else if (shut_tx && ((tpcb->flags & TF_RXCLOSED) != 0)) { - close = 1; + shut_close = 1; } else { - close = 0; + shut_close = 0; } /* Set back some callback pointers */ - if (close) { + if (shut_close) { tcp_arg(tpcb, NULL); } if (tpcb->state == LISTEN) { @@ -872,13 +967,13 @@ lwip_netconn_do_close_internal(struct netconn *conn WRITE_DELAYED_PARAM) if (shut_tx) { tcp_sent(tpcb, NULL); } - if (close) { + if (shut_close) { tcp_poll(tpcb, NULL, 0); tcp_err(tpcb, NULL); } } /* Try to close the connection */ - if (close) { + if (shut_close) { #if LWIP_SO_LINGER /* check linger possibilites before calling tcp_close */ err = ERR_OK; @@ -894,7 +989,7 @@ lwip_netconn_do_close_internal(struct netconn *conn WRITE_DELAYED_PARAM) /* data left on a nonblocking netconn -> cannot linger */ err = ERR_WOULDBLOCK; } else if ((s32_t)(sys_now() - conn->current_msg->msg.sd.time_started) >= - (conn->linger * 1000)) { + (conn->linger * 1000)) { /* data left but linger timeout has expired (this happens on further calls to this function through poll_tcp */ tcp_abort(tpcb); @@ -947,7 +1042,7 @@ lwip_netconn_do_close_internal(struct netconn *conn WRITE_DELAYED_PARAM) if (conn->current_msg->msg.sd.polls_left == 0) { #endif /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */ close_finished = 1; - if (close) { + if (shut_close) { /* in this case, we want to RST the connection */ tcp_abort(tpcb); err = ERR_OK; @@ -960,12 +1055,12 @@ lwip_netconn_do_close_internal(struct netconn *conn WRITE_DELAYED_PARAM) } if (close_finished) { /* Closing done (succeeded, non-memory error, nonblocking error or timeout) */ - sys_sem_t* op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg); + sys_sem_t *op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg); conn->current_msg->err = err; conn->current_msg = NULL; conn->state = NETCONN_NONE; if (err == ERR_OK) { - if (close) { + if (shut_close) { /* Set back some callback pointers as conn is going away */ conn->pcb.tcp = NULL; /* Trigger select() in socket layer. Make sure everybody notices activity @@ -979,7 +1074,6 @@ lwip_netconn_do_close_internal(struct netconn *conn WRITE_DELAYED_PARAM) API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); } } - NETCONN_SET_SAFE_ERR(conn, err); #if LWIP_TCPIP_CORE_LOCKING if (delayed) #endif @@ -1013,30 +1107,28 @@ lwip_netconn_do_close_internal(struct netconn *conn WRITE_DELAYED_PARAM) * Delete the pcb inside a netconn. * Called from netconn_delete. * - * @param m the api_msg_msg pointing to the connection + * @param m the api_msg pointing to the connection */ void lwip_netconn_do_delconn(void *m) { - struct api_msg *msg = (struct api_msg*)m; + struct api_msg *msg = (struct api_msg *)m; enum netconn_state state = msg->conn->state; LWIP_ASSERT("netconn state error", /* this only happens for TCP netconns */ - (state == NETCONN_NONE) || (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP)); + (state == NETCONN_NONE) || (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP)); #if LWIP_NETCONN_FULLDUPLEX /* In full duplex mode, blocking write/connect is aborted with ERR_CLSD */ if (state != NETCONN_NONE) { if ((state == NETCONN_WRITE) || ((state == NETCONN_CONNECT) && !IN_NONBLOCKING_CONNECT(msg->conn))) { /* close requested, abort running write/connect */ - sys_sem_t* op_completed_sem; + sys_sem_t *op_completed_sem; LWIP_ASSERT("msg->conn->current_msg != NULL", msg->conn->current_msg != NULL); op_completed_sem = LWIP_API_MSG_SEM(msg->conn->current_msg); msg->conn->current_msg->err = ERR_CLSD; msg->conn->current_msg = NULL; - msg->conn->write_offset = 0; msg->conn->state = NETCONN_NONE; - NETCONN_SET_SAFE_ERR(msg->conn, ERR_CLSD); sys_sem_signal(op_completed_sem); } } @@ -1052,49 +1144,52 @@ lwip_netconn_do_delconn(void *m) #endif /* LWIP_NETCONN_FULLDUPLEX */ { LWIP_ASSERT("blocking connect in progress", - (state != NETCONN_CONNECT) || IN_NONBLOCKING_CONNECT(msg->conn)); + (state != NETCONN_CONNECT) || IN_NONBLOCKING_CONNECT(msg->conn)); msg->err = ERR_OK; - /* Drain and delete mboxes */ +#if LWIP_NETCONN_FULLDUPLEX + /* Mark mboxes invalid */ + netconn_mark_mbox_invalid(msg->conn); +#else /* LWIP_NETCONN_FULLDUPLEX */ netconn_drain(msg->conn); +#endif /* LWIP_NETCONN_FULLDUPLEX */ if (msg->conn->pcb.tcp != NULL) { switch (NETCONNTYPE_GROUP(msg->conn->type)) { #if LWIP_RAW - case NETCONN_RAW: - raw_remove(msg->conn->pcb.raw); - break; + case NETCONN_RAW: + raw_remove(msg->conn->pcb.raw); + break; #endif /* LWIP_RAW */ #if LWIP_UDP - case NETCONN_UDP: - msg->conn->pcb.udp->recv_arg = NULL; - udp_remove(msg->conn->pcb.udp); - break; + case NETCONN_UDP: + msg->conn->pcb.udp->recv_arg = NULL; + udp_remove(msg->conn->pcb.udp); + break; #endif /* LWIP_UDP */ #if LWIP_TCP - case NETCONN_TCP: - LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL && - msg->conn->write_offset == 0); - msg->conn->state = NETCONN_CLOSE; - msg->msg.sd.shut = NETCONN_SHUT_RDWR; - msg->conn->current_msg = msg; + case NETCONN_TCP: + LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL); + msg->conn->state = NETCONN_CLOSE; + msg->msg.sd.shut = NETCONN_SHUT_RDWR; + msg->conn->current_msg = msg; #if LWIP_TCPIP_CORE_LOCKING - if (lwip_netconn_do_close_internal(msg->conn, 0) != ERR_OK) { - LWIP_ASSERT("state!", msg->conn->state == NETCONN_CLOSE); - UNLOCK_TCPIP_CORE(); - sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); - LOCK_TCPIP_CORE(); - LWIP_ASSERT("state!", msg->conn->state == NETCONN_NONE); - } + if (lwip_netconn_do_close_internal(msg->conn, 0) != ERR_OK) { + LWIP_ASSERT("state!", msg->conn->state == NETCONN_CLOSE); + UNLOCK_TCPIP_CORE(); + sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); + LOCK_TCPIP_CORE(); + LWIP_ASSERT("state!", msg->conn->state == NETCONN_NONE); + } #else /* LWIP_TCPIP_CORE_LOCKING */ - lwip_netconn_do_close_internal(msg->conn); + lwip_netconn_do_close_internal(msg->conn); #endif /* LWIP_TCPIP_CORE_LOCKING */ - /* API_EVENT is called inside lwip_netconn_do_close_internal, before releasing - the application thread, so we can return at this point! */ - return; + /* API_EVENT is called inside lwip_netconn_do_close_internal, before releasing + the application thread, so we can return at this point! */ + return; #endif /* LWIP_TCP */ - default: - break; + default: + break; } msg->conn->pcb.tcp = NULL; } @@ -1114,40 +1209,84 @@ lwip_netconn_do_delconn(void *m) * Bind a pcb contained in a netconn * Called from netconn_bind. * - * @param m the api_msg_msg pointing to the connection and containing + * @param m the api_msg pointing to the connection and containing * the IP address and port to bind to */ void lwip_netconn_do_bind(void *m) { - struct api_msg *msg = (struct api_msg*)m; + struct api_msg *msg = (struct api_msg *)m; + err_t err; - if (ERR_IS_FATAL(msg->conn->last_err)) { - msg->err = msg->conn->last_err; - } else { - msg->err = ERR_VAL; - if (msg->conn->pcb.tcp != NULL) { - switch (NETCONNTYPE_GROUP(msg->conn->type)) { + if (msg->conn->pcb.tcp != NULL) { + switch (NETCONNTYPE_GROUP(msg->conn->type)) { #if LWIP_RAW case NETCONN_RAW: - msg->err = raw_bind(msg->conn->pcb.raw, API_EXPR_REF(msg->msg.bc.ipaddr)); + err = raw_bind(msg->conn->pcb.raw, API_EXPR_REF(msg->msg.bc.ipaddr)); break; #endif /* LWIP_RAW */ #if LWIP_UDP case NETCONN_UDP: - msg->err = udp_bind(msg->conn->pcb.udp, API_EXPR_REF(msg->msg.bc.ipaddr), msg->msg.bc.port); + err = udp_bind(msg->conn->pcb.udp, API_EXPR_REF(msg->msg.bc.ipaddr), msg->msg.bc.port); break; #endif /* LWIP_UDP */ #if LWIP_TCP case NETCONN_TCP: - msg->err = tcp_bind(msg->conn->pcb.tcp, API_EXPR_REF(msg->msg.bc.ipaddr), msg->msg.bc.port); + err = tcp_bind(msg->conn->pcb.tcp, API_EXPR_REF(msg->msg.bc.ipaddr), msg->msg.bc.port); break; #endif /* LWIP_TCP */ default: + err = ERR_VAL; break; - } } + } else { + err = ERR_VAL; } + msg->err = err; + TCPIP_APIMSG_ACK(msg); +} +/** + * Bind a pcb contained in a netconn to an interface + * Called from netconn_bind_if. + * + * @param m the api_msg pointing to the connection and containing + * the IP address and port to bind to + */ +void +lwip_netconn_do_bind_if(void *m) +{ + struct netif *netif; + struct api_msg *msg = (struct api_msg *)m; + err_t err; + + netif = netif_get_by_index(msg->msg.bc.if_idx); + + if ((netif != NULL) && (msg->conn->pcb.tcp != NULL)) { + err = ERR_OK; + switch (NETCONNTYPE_GROUP(msg->conn->type)) { +#if LWIP_RAW + case NETCONN_RAW: + raw_bind_netif(msg->conn->pcb.raw, netif); + break; +#endif /* LWIP_RAW */ +#if LWIP_UDP + case NETCONN_UDP: + udp_bind_netif(msg->conn->pcb.udp, netif); + break; +#endif /* LWIP_UDP */ +#if LWIP_TCP + case NETCONN_TCP: + tcp_bind_netif(msg->conn->pcb.tcp, netif); + break; +#endif /* LWIP_TCP */ + default: + err = ERR_VAL; + break; + } + } else { + err = ERR_VAL; + } + msg->err = err; TCPIP_APIMSG_ACK(msg); } @@ -1163,7 +1302,7 @@ lwip_netconn_do_connected(void *arg, struct tcp_pcb *pcb, err_t err) { struct netconn *conn; int was_blocking; - sys_sem_t* op_completed_sem = NULL; + sys_sem_t *op_completed_sem = NULL; LWIP_UNUSED_ARG(pcb); @@ -1175,7 +1314,7 @@ lwip_netconn_do_connected(void *arg, struct tcp_pcb *pcb, err_t err) LWIP_ASSERT("conn->state == NETCONN_CONNECT", conn->state == NETCONN_CONNECT); LWIP_ASSERT("(conn->current_msg != NULL) || conn->in_non_blocking_connect", - (conn->current_msg != NULL) || IN_NONBLOCKING_CONNECT(conn)); + (conn->current_msg != NULL) || IN_NONBLOCKING_CONNECT(conn)); if (conn->current_msg != NULL) { conn->current_msg->err = err; @@ -1187,11 +1326,10 @@ lwip_netconn_do_connected(void *arg, struct tcp_pcb *pcb, err_t err) was_blocking = !IN_NONBLOCKING_CONNECT(conn); SET_NONBLOCKING_CONNECT(conn, 0); LWIP_ASSERT("blocking connect state error", - (was_blocking && op_completed_sem != NULL) || - (!was_blocking && op_completed_sem == NULL)); + (was_blocking && op_completed_sem != NULL) || + (!was_blocking && op_completed_sem == NULL)); conn->current_msg = NULL; conn->state = NETCONN_NONE; - NETCONN_SET_SAFE_ERR(conn, ERR_OK); API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); if (was_blocking) { @@ -1205,69 +1343,73 @@ lwip_netconn_do_connected(void *arg, struct tcp_pcb *pcb, err_t err) * Connect a pcb contained inside a netconn * Called from netconn_connect. * - * @param m the api_msg_msg pointing to the connection and containing + * @param m the api_msg pointing to the connection and containing * the IP address and port to connect to */ void lwip_netconn_do_connect(void *m) { - struct api_msg *msg = (struct api_msg*)m; + struct api_msg *msg = (struct api_msg *)m; + err_t err; if (msg->conn->pcb.tcp == NULL) { /* This may happen when calling netconn_connect() a second time */ - msg->err = ERR_CLSD; + err = ERR_CLSD; } else { switch (NETCONNTYPE_GROUP(msg->conn->type)) { #if LWIP_RAW - case NETCONN_RAW: - msg->err = raw_connect(msg->conn->pcb.raw, API_EXPR_REF(msg->msg.bc.ipaddr)); - break; + case NETCONN_RAW: + err = raw_connect(msg->conn->pcb.raw, API_EXPR_REF(msg->msg.bc.ipaddr)); + break; #endif /* LWIP_RAW */ #if LWIP_UDP - case NETCONN_UDP: - msg->err = udp_connect(msg->conn->pcb.udp, API_EXPR_REF(msg->msg.bc.ipaddr), msg->msg.bc.port); - break; + case NETCONN_UDP: + err = udp_connect(msg->conn->pcb.udp, API_EXPR_REF(msg->msg.bc.ipaddr), msg->msg.bc.port); + break; #endif /* LWIP_UDP */ #if LWIP_TCP - case NETCONN_TCP: - /* Prevent connect while doing any other action. */ - if (msg->conn->state == NETCONN_CONNECT) { - msg->err = ERR_ALREADY; - } else if (msg->conn->state != NETCONN_NONE) { - msg->err = ERR_ISCONN; - } else { - setup_tcp(msg->conn); - msg->err = tcp_connect(msg->conn->pcb.tcp, API_EXPR_REF(msg->msg.bc.ipaddr), - msg->msg.bc.port, lwip_netconn_do_connected); - if (msg->err == ERR_OK) { - u8_t non_blocking = netconn_is_nonblocking(msg->conn); - msg->conn->state = NETCONN_CONNECT; - SET_NONBLOCKING_CONNECT(msg->conn, non_blocking); - if (non_blocking) { - msg->err = ERR_INPROGRESS; - } else { - msg->conn->current_msg = msg; - /* sys_sem_signal() is called from lwip_netconn_do_connected (or err_tcp()), - when the connection is established! */ + case NETCONN_TCP: + /* Prevent connect while doing any other action. */ + if (msg->conn->state == NETCONN_CONNECT) { + err = ERR_ALREADY; + } else if (msg->conn->state != NETCONN_NONE) { + err = ERR_ISCONN; + } else { + setup_tcp(msg->conn); + err = tcp_connect(msg->conn->pcb.tcp, API_EXPR_REF(msg->msg.bc.ipaddr), + msg->msg.bc.port, lwip_netconn_do_connected); + if (err == ERR_OK) { + u8_t non_blocking = netconn_is_nonblocking(msg->conn); + msg->conn->state = NETCONN_CONNECT; + SET_NONBLOCKING_CONNECT(msg->conn, non_blocking); + if (non_blocking) { + err = ERR_INPROGRESS; + } else { + msg->conn->current_msg = msg; + /* sys_sem_signal() is called from lwip_netconn_do_connected (or err_tcp()), + when the connection is established! */ #if LWIP_TCPIP_CORE_LOCKING - LWIP_ASSERT("state!", msg->conn->state == NETCONN_CONNECT); - UNLOCK_TCPIP_CORE(); - sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); - LOCK_TCPIP_CORE(); - LWIP_ASSERT("state!", msg->conn->state != NETCONN_CONNECT); + LWIP_ASSERT("state!", msg->conn->state == NETCONN_CONNECT); + UNLOCK_TCPIP_CORE(); + sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); + LOCK_TCPIP_CORE(); + LWIP_ASSERT("state!", msg->conn->state != NETCONN_CONNECT); #endif /* LWIP_TCPIP_CORE_LOCKING */ - return; + return; + } } } - } - break; + break; #endif /* LWIP_TCP */ - default: - LWIP_ERROR("Invalid netconn type", 0, do{ msg->err = ERR_VAL; }while(0)); - break; + default: + LWIP_ERROR("Invalid netconn type", 0, do { + err = ERR_VAL; + } while (0)); + break; } } - /* For all other protocols, netconn_connect() calls TCPIP_APIMSG(), + msg->err = err; + /* For all other protocols, netconn_connect() calls netconn_apimsg(), so use TCPIP_APIMSG_ACK() here. */ TCPIP_APIMSG_ACK(msg); } @@ -1277,12 +1419,12 @@ lwip_netconn_do_connect(void *m) * Only used for UDP netconns. * Called from netconn_disconnect. * - * @param m the api_msg_msg pointing to the connection to disconnect + * @param m the api_msg pointing to the connection to disconnect */ void lwip_netconn_do_disconnect(void *m) { - struct api_msg *msg = (struct api_msg*)m; + struct api_msg *msg = (struct api_msg *)m; #if LWIP_UDP if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_UDP) { @@ -1301,82 +1443,81 @@ lwip_netconn_do_disconnect(void *m) * Set a TCP pcb contained in a netconn into listen mode * Called from netconn_listen. * - * @param m the api_msg_msg pointing to the connection + * @param m the api_msg pointing to the connection */ void lwip_netconn_do_listen(void *m) { - struct api_msg *msg = (struct api_msg*)m; + struct api_msg *msg = (struct api_msg *)m; + err_t err; - if (ERR_IS_FATAL(msg->conn->last_err)) { - msg->err = msg->conn->last_err; - } else { - msg->err = ERR_CONN; - if (msg->conn->pcb.tcp != NULL) { - if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) { - if (msg->conn->state == NETCONN_NONE) { - struct tcp_pcb* lpcb; - if (msg->conn->pcb.tcp->state != CLOSED) { - /* connection is not closed, cannot listen */ - msg->err = ERR_VAL; - } else { - err_t err; - u8_t backlog; + if (msg->conn->pcb.tcp != NULL) { + if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) { + if (msg->conn->state == NETCONN_NONE) { + struct tcp_pcb *lpcb; + if (msg->conn->pcb.tcp->state != CLOSED) { + /* connection is not closed, cannot listen */ + err = ERR_VAL; + } else { + u8_t backlog; #if TCP_LISTEN_BACKLOG - backlog = msg->msg.lb.backlog; + backlog = msg->msg.lb.backlog; #else /* TCP_LISTEN_BACKLOG */ - backlog = TCP_DEFAULT_LISTEN_BACKLOG; + backlog = TCP_DEFAULT_LISTEN_BACKLOG; #endif /* TCP_LISTEN_BACKLOG */ #if LWIP_IPV4 && LWIP_IPV6 - /* "Socket API like" dual-stack support: If IP to listen to is IP6_ADDR_ANY, - * and NETCONN_FLAG_IPV6_V6ONLY is NOT set, use IP_ANY_TYPE to listen - */ - if (ip_addr_cmp(&msg->conn->pcb.ip->local_ip, IP6_ADDR_ANY) && - (netconn_get_ipv6only(msg->conn) == 0)) { - /* change PCB type to IPADDR_TYPE_ANY */ - IP_SET_TYPE_VAL(msg->conn->pcb.tcp->local_ip, IPADDR_TYPE_ANY); - IP_SET_TYPE_VAL(msg->conn->pcb.tcp->remote_ip, IPADDR_TYPE_ANY); - } + /* "Socket API like" dual-stack support: If IP to listen to is IP6_ADDR_ANY, + * and NETCONN_FLAG_IPV6_V6ONLY is NOT set, use IP_ANY_TYPE to listen + */ + if (ip_addr_cmp(&msg->conn->pcb.ip->local_ip, IP6_ADDR_ANY) && + (netconn_get_ipv6only(msg->conn) == 0)) { + /* change PCB type to IPADDR_TYPE_ANY */ + IP_SET_TYPE_VAL(msg->conn->pcb.tcp->local_ip, IPADDR_TYPE_ANY); + IP_SET_TYPE_VAL(msg->conn->pcb.tcp->remote_ip, IPADDR_TYPE_ANY); + } #endif /* LWIP_IPV4 && LWIP_IPV6 */ - lpcb = tcp_listen_with_backlog_and_err(msg->conn->pcb.tcp, backlog, &err); + lpcb = tcp_listen_with_backlog_and_err(msg->conn->pcb.tcp, backlog, &err); - if (lpcb == NULL) { - /* in this case, the old pcb is still allocated */ - msg->err = err; + if (lpcb == NULL) { + /* in this case, the old pcb is still allocated */ + } else { + /* delete the recvmbox and allocate the acceptmbox */ + if (sys_mbox_valid(&msg->conn->recvmbox)) { + /** @todo: should we drain the recvmbox here? */ + sys_mbox_free(&msg->conn->recvmbox); + sys_mbox_set_invalid(&msg->conn->recvmbox); + } + err = ERR_OK; + if (!sys_mbox_valid(&msg->conn->acceptmbox)) { + err = sys_mbox_new(&msg->conn->acceptmbox, DEFAULT_ACCEPTMBOX_SIZE); + } + if (err == ERR_OK) { + msg->conn->state = NETCONN_LISTEN; + msg->conn->pcb.tcp = lpcb; + tcp_arg(msg->conn->pcb.tcp, msg->conn); + tcp_accept(msg->conn->pcb.tcp, accept_function); } else { - /* delete the recvmbox and allocate the acceptmbox */ - if (sys_mbox_valid(&msg->conn->recvmbox)) { - /** @todo: should we drain the recvmbox here? */ - sys_mbox_free(&msg->conn->recvmbox); - sys_mbox_set_invalid(&msg->conn->recvmbox); - } - msg->err = ERR_OK; - if (!sys_mbox_valid(&msg->conn->acceptmbox)) { - msg->err = sys_mbox_new(&msg->conn->acceptmbox, DEFAULT_ACCEPTMBOX_SIZE); - } - if (msg->err == ERR_OK) { - msg->conn->state = NETCONN_LISTEN; - msg->conn->pcb.tcp = lpcb; - tcp_arg(msg->conn->pcb.tcp, msg->conn); - tcp_accept(msg->conn->pcb.tcp, accept_function); - } else { - /* since the old pcb is already deallocated, free lpcb now */ - tcp_close(lpcb); - msg->conn->pcb.tcp = NULL; - } + /* since the old pcb is already deallocated, free lpcb now */ + tcp_close(lpcb); + msg->conn->pcb.tcp = NULL; } } - } else if (msg->conn->state == NETCONN_LISTEN) { - /* already listening, allow updating of the backlog */ - msg->err = ERR_OK; - tcp_backlog_set(msg->conn->pcb.tcp, msg->msg.lb.backlog); } + } else if (msg->conn->state == NETCONN_LISTEN) { + /* already listening, allow updating of the backlog */ + err = ERR_OK; + tcp_backlog_set(msg->conn->pcb.tcp, msg->msg.lb.backlog); } else { - msg->err = ERR_ARG; + err = ERR_CONN; } + } else { + err = ERR_ARG; } + } else { + err = ERR_CONN; } + msg->err = err; TCPIP_APIMSG_ACK(msg); } #endif /* LWIP_TCP */ @@ -1385,53 +1526,55 @@ lwip_netconn_do_listen(void *m) * Send some data on a RAW or UDP pcb contained in a netconn * Called from netconn_send * - * @param m the api_msg_msg pointing to the connection + * @param m the api_msg pointing to the connection */ void lwip_netconn_do_send(void *m) { - struct api_msg *msg = (struct api_msg*)m; + struct api_msg *msg = (struct api_msg *)m; - if (ERR_IS_FATAL(msg->conn->last_err)) { - msg->err = msg->conn->last_err; - } else { - msg->err = ERR_CONN; + err_t err = netconn_err(msg->conn); + if (err == ERR_OK) { if (msg->conn->pcb.tcp != NULL) { switch (NETCONNTYPE_GROUP(msg->conn->type)) { #if LWIP_RAW - case NETCONN_RAW: - if (ip_addr_isany(&msg->msg.b->addr) || IP_IS_ANY_TYPE_VAL(msg->msg.b->addr)) { - msg->err = raw_send(msg->conn->pcb.raw, msg->msg.b->p); - } else { - msg->err = raw_sendto(msg->conn->pcb.raw, msg->msg.b->p, &msg->msg.b->addr); - } - break; + case NETCONN_RAW: + if (ip_addr_isany(&msg->msg.b->addr) || IP_IS_ANY_TYPE_VAL(msg->msg.b->addr)) { + err = raw_send(msg->conn->pcb.raw, msg->msg.b->p); + } else { + err = raw_sendto(msg->conn->pcb.raw, msg->msg.b->p, &msg->msg.b->addr); + } + break; #endif #if LWIP_UDP - case NETCONN_UDP: + case NETCONN_UDP: #if LWIP_CHECKSUM_ON_COPY - if (ip_addr_isany(&msg->msg.b->addr) || IP_IS_ANY_TYPE_VAL(msg->msg.b->addr)) { - msg->err = udp_send_chksum(msg->conn->pcb.udp, msg->msg.b->p, - msg->msg.b->flags & NETBUF_FLAG_CHKSUM, msg->msg.b->toport_chksum); - } else { - msg->err = udp_sendto_chksum(msg->conn->pcb.udp, msg->msg.b->p, - &msg->msg.b->addr, msg->msg.b->port, - msg->msg.b->flags & NETBUF_FLAG_CHKSUM, msg->msg.b->toport_chksum); - } + if (ip_addr_isany(&msg->msg.b->addr) || IP_IS_ANY_TYPE_VAL(msg->msg.b->addr)) { + err = udp_send_chksum(msg->conn->pcb.udp, msg->msg.b->p, + msg->msg.b->flags & NETBUF_FLAG_CHKSUM, msg->msg.b->toport_chksum); + } else { + err = udp_sendto_chksum(msg->conn->pcb.udp, msg->msg.b->p, + &msg->msg.b->addr, msg->msg.b->port, + msg->msg.b->flags & NETBUF_FLAG_CHKSUM, msg->msg.b->toport_chksum); + } #else /* LWIP_CHECKSUM_ON_COPY */ - if (ip_addr_isany_val(msg->msg.b->addr) || IP_IS_ANY_TYPE_VAL(msg->msg.b->addr)) { - msg->err = udp_send(msg->conn->pcb.udp, msg->msg.b->p); - } else { - msg->err = udp_sendto(msg->conn->pcb.udp, msg->msg.b->p, &msg->msg.b->addr, msg->msg.b->port); - } + if (ip_addr_isany_val(msg->msg.b->addr) || IP_IS_ANY_TYPE_VAL(msg->msg.b->addr)) { + err = udp_send(msg->conn->pcb.udp, msg->msg.b->p); + } else { + err = udp_sendto(msg->conn->pcb.udp, msg->msg.b->p, &msg->msg.b->addr, msg->msg.b->port); + } #endif /* LWIP_CHECKSUM_ON_COPY */ - break; + break; #endif /* LWIP_UDP */ - default: - break; + default: + err = ERR_CONN; + break; } + } else { + err = ERR_CONN; } } + msg->err = err; TCPIP_APIMSG_ACK(msg); } @@ -1440,19 +1583,19 @@ lwip_netconn_do_send(void *m) * Indicate data has been received from a TCP pcb contained in a netconn * Called from netconn_recv * - * @param m the api_msg_msg pointing to the connection + * @param m the api_msg pointing to the connection */ void lwip_netconn_do_recv(void *m) { - struct api_msg *msg = (struct api_msg*)m; + struct api_msg *msg = (struct api_msg *)m; msg->err = ERR_OK; if (msg->conn->pcb.tcp != NULL) { if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) { - u32_t remaining = msg->msg.r.len; + size_t remaining = msg->msg.r.len; do { - u16_t recved = (remaining > 0xffff) ? 0xffff : (u16_t)remaining; + u16_t recved = (u16_t)((remaining > 0xffff) ? 0xffff : remaining); tcp_recved(msg->conn->pcb.tcp, recved); remaining -= recved; } while (remaining != 0); @@ -1465,12 +1608,12 @@ lwip_netconn_do_recv(void *m) /** Indicate that a TCP pcb has been accepted * Called from netconn_accept * - * @param m the api_msg_msg pointing to the connection + * @param m the api_msg pointing to the connection */ void lwip_netconn_do_accepted(void *m) { - struct api_msg *msg = (struct api_msg*)m; + struct api_msg *msg = (struct api_msg *)m; msg->err = ERR_OK; if (msg->conn->pcb.tcp != NULL) { @@ -1503,13 +1646,15 @@ lwip_netconn_do_writemore(struct netconn *conn WRITE_DELAYED_PARAM) size_t diff; u8_t dontblock; u8_t apiflags; + u8_t write_more; LWIP_ASSERT("conn != NULL", conn != NULL); LWIP_ASSERT("conn->state == NETCONN_WRITE", (conn->state == NETCONN_WRITE)); LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); LWIP_ASSERT("conn->pcb.tcp != NULL", conn->pcb.tcp != NULL); - LWIP_ASSERT("conn->write_offset < conn->current_msg->msg.w.len", - conn->write_offset < conn->current_msg->msg.w.len); + LWIP_ASSERT("conn->current_msg->msg.w.offset < conn->current_msg->msg.w.len", + conn->current_msg->msg.w.offset < conn->current_msg->msg.w.len); + LWIP_ASSERT("conn->current_msg->msg.w.vector_cnt > 0", conn->current_msg->msg.w.vector_cnt > 0); apiflags = conn->current_msg->msg.w.apiflags; dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK); @@ -1518,75 +1663,96 @@ lwip_netconn_do_writemore(struct netconn *conn WRITE_DELAYED_PARAM) if ((conn->send_timeout != 0) && ((s32_t)(sys_now() - conn->current_msg->msg.w.time_started) >= conn->send_timeout)) { write_finished = 1; - if (conn->write_offset == 0) { + if (conn->current_msg->msg.w.offset == 0) { /* nothing has been written */ err = ERR_WOULDBLOCK; - conn->current_msg->msg.w.len = 0; } else { /* partial write */ err = ERR_OK; - conn->current_msg->msg.w.len = conn->write_offset; - conn->write_offset = 0; } } else #endif /* LWIP_SO_SNDTIMEO */ { - dataptr = (const u8_t*)conn->current_msg->msg.w.dataptr + conn->write_offset; - diff = conn->current_msg->msg.w.len - conn->write_offset; - if (diff > 0xffffUL) { /* max_u16_t */ - len = 0xffff; - apiflags |= TCP_WRITE_FLAG_MORE; - } else { - len = (u16_t)diff; - } - available = tcp_sndbuf(conn->pcb.tcp); - if (available < len) { - /* don't try to write more than sendbuf */ - len = available; - if (dontblock) { - if (!len) { - err = ERR_WOULDBLOCK; - goto err_mem; - } - } else { + do { + dataptr = (const u8_t *)conn->current_msg->msg.w.vector->ptr + conn->current_msg->msg.w.vector_off; + diff = conn->current_msg->msg.w.vector->len - conn->current_msg->msg.w.vector_off; + if (diff > 0xffffUL) { /* max_u16_t */ + len = 0xffff; apiflags |= TCP_WRITE_FLAG_MORE; + } else { + len = (u16_t)diff; } - } - LWIP_ASSERT("lwip_netconn_do_writemore: invalid length!", ((conn->write_offset + len) <= conn->current_msg->msg.w.len)); - err = tcp_write(conn->pcb.tcp, dataptr, len, apiflags); + available = tcp_sndbuf(conn->pcb.tcp); + if (available < len) { + /* don't try to write more than sendbuf */ + len = available; + if (dontblock) { + if (!len) { + /* set error according to partial write or not */ + err = (conn->current_msg->msg.w.offset == 0) ? ERR_WOULDBLOCK : ERR_OK; + goto err_mem; + } + } else { + apiflags |= TCP_WRITE_FLAG_MORE; + } + } + LWIP_ASSERT("lwip_netconn_do_writemore: invalid length!", + ((conn->current_msg->msg.w.vector_off + len) <= conn->current_msg->msg.w.vector->len)); + /* we should loop around for more sending in the following cases: + 1) We couldn't finish the current vector because of 16-bit size limitations. + tcp_write() and tcp_sndbuf() both are limited to 16-bit sizes + 2) We are sending the remainder of the current vector and have more */ + if ((len == 0xffff && diff > 0xffffUL) || + (len == (u16_t)diff && conn->current_msg->msg.w.vector_cnt > 1)) { + write_more = 1; + apiflags |= TCP_WRITE_FLAG_MORE; + } else { + write_more = 0; + } + err = tcp_write(conn->pcb.tcp, dataptr, len, apiflags); + if (err == ERR_OK) { + conn->current_msg->msg.w.offset += len; + conn->current_msg->msg.w.vector_off += len; + /* check if current vector is finished */ + if (conn->current_msg->msg.w.vector_off == conn->current_msg->msg.w.vector->len) { + conn->current_msg->msg.w.vector_cnt--; + /* if we have additional vectors, move on to them */ + if (conn->current_msg->msg.w.vector_cnt > 0) { + conn->current_msg->msg.w.vector++; + conn->current_msg->msg.w.vector_off = 0; + } + } + } + } while (write_more && err == ERR_OK); /* if OK or memory error, check available space */ if ((err == ERR_OK) || (err == ERR_MEM)) { err_mem: - if (dontblock && (len < conn->current_msg->msg.w.len)) { + if (dontblock && (conn->current_msg->msg.w.offset < conn->current_msg->msg.w.len)) { /* non-blocking write did not write everything: mark the pcb non-writable and let poll_tcp check writable space to mark the pcb writable again */ - API_EVENT(conn, NETCONN_EVT_SENDMINUS, len); + API_EVENT(conn, NETCONN_EVT_SENDMINUS, 0); conn->flags |= NETCONN_FLAG_CHECK_WRITESPACE; } else if ((tcp_sndbuf(conn->pcb.tcp) <= TCP_SNDLOWAT) || (tcp_sndqueuelen(conn->pcb.tcp) >= TCP_SNDQUEUELOWAT)) { /* The queued byte- or pbuf-count exceeds the configured low-water limit, let select mark this pcb as non-writable. */ - API_EVENT(conn, NETCONN_EVT_SENDMINUS, len); + API_EVENT(conn, NETCONN_EVT_SENDMINUS, 0); } } if (err == ERR_OK) { err_t out_err; - conn->write_offset += len; - if ((conn->write_offset == conn->current_msg->msg.w.len) || dontblock) { - /* return sent length */ - conn->current_msg->msg.w.len = conn->write_offset; - /* everything was written */ + if ((conn->current_msg->msg.w.offset == conn->current_msg->msg.w.len) || dontblock) { + /* return sent length (caller reads length from msg.w.offset) */ write_finished = 1; } out_err = tcp_output(conn->pcb.tcp); - if (ERR_IS_FATAL(out_err) || (out_err == ERR_RTE)) { - /* If tcp_output fails with fatal error or no route is found, + if (out_err == ERR_RTE) { + /* If tcp_output fails because no route is found, don't try writing any more but return the error to the application thread. */ err = out_err; write_finished = 1; - conn->current_msg->msg.w.len = 0; } } else if (err == ERR_MEM) { /* If ERR_MEM, we wait for sent_tcp or poll_tcp to be called. @@ -1596,35 +1762,31 @@ err_mem: /* tcp_write returned ERR_MEM, try tcp_output anyway */ err_t out_err = tcp_output(conn->pcb.tcp); - if (ERR_IS_FATAL(out_err) || (out_err == ERR_RTE)) { - /* If tcp_output fails with fatal error or no route is found, + if (out_err == ERR_RTE) { + /* If tcp_output fails because no route is found, don't try writing any more but return the error to the application thread. */ err = out_err; write_finished = 1; - conn->current_msg->msg.w.len = 0; } else if (dontblock) { - /* non-blocking write is done on ERR_MEM */ - err = ERR_WOULDBLOCK; + /* non-blocking write is done on ERR_MEM, set error according + to partial write or not */ + err = (conn->current_msg->msg.w.offset == 0) ? ERR_WOULDBLOCK : ERR_OK; write_finished = 1; - conn->current_msg->msg.w.len = 0; } } else { /* On errors != ERR_MEM, we don't try writing any more but return the error to the application thread. */ write_finished = 1; - conn->current_msg->msg.w.len = 0; } } if (write_finished) { /* everything was written: set back connection state and back to application task */ - sys_sem_t* op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg); + sys_sem_t *op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg); conn->current_msg->err = err; conn->current_msg = NULL; - conn->write_offset = 0; conn->state = NETCONN_NONE; - NETCONN_SET_SAFE_ERR(conn, err); #if LWIP_TCPIP_CORE_LOCKING if (delayed) #endif @@ -1645,29 +1807,26 @@ err_mem: * Send some data on a TCP pcb contained in a netconn * Called from netconn_write * - * @param m the api_msg_msg pointing to the connection + * @param m the api_msg pointing to the connection */ void lwip_netconn_do_write(void *m) { - struct api_msg *msg = (struct api_msg*)m; + struct api_msg *msg = (struct api_msg *)m; - if (ERR_IS_FATAL(msg->conn->last_err)) { - msg->err = msg->conn->last_err; - } else { + err_t err = netconn_err(msg->conn); + if (err == ERR_OK) { if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) { #if LWIP_TCP if (msg->conn->state != NETCONN_NONE) { /* netconn is connecting, closing or in blocking write */ - msg->err = ERR_INPROGRESS; + err = ERR_INPROGRESS; } else if (msg->conn->pcb.tcp != NULL) { msg->conn->state = NETCONN_WRITE; /* set all the variables used by lwip_netconn_do_writemore */ - LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL && - msg->conn->write_offset == 0); + LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL); LWIP_ASSERT("msg->msg.w.len != 0", msg->msg.w.len != 0); msg->conn->current_msg = msg; - msg->conn->write_offset = 0; #if LWIP_TCPIP_CORE_LOCKING if (lwip_netconn_do_writemore(msg->conn, 0) != ERR_OK) { LWIP_ASSERT("state!", msg->conn->state == NETCONN_WRITE); @@ -1683,17 +1842,18 @@ lwip_netconn_do_write(void *m) since lwip_netconn_do_writemore ACKs it! */ return; } else { - msg->err = ERR_CONN; + err = ERR_CONN; } #else /* LWIP_TCP */ - msg->err = ERR_VAL; + err = ERR_VAL; #endif /* LWIP_TCP */ #if (LWIP_UDP || LWIP_RAW) } else { - msg->err = ERR_VAL; + err = ERR_VAL; #endif /* (LWIP_UDP || LWIP_RAW) */ } } + msg->err = err; TCPIP_APIMSG_ACK(msg); } @@ -1701,61 +1861,61 @@ lwip_netconn_do_write(void *m) * Return a connection's local or remote address * Called from netconn_getaddr * - * @param m the api_msg_msg pointing to the connection + * @param m the api_msg pointing to the connection */ void lwip_netconn_do_getaddr(void *m) { - struct api_msg *msg = (struct api_msg*)m; + struct api_msg *msg = (struct api_msg *)m; if (msg->conn->pcb.ip != NULL) { if (msg->msg.ad.local) { ip_addr_copy(API_EXPR_DEREF(msg->msg.ad.ipaddr), - msg->conn->pcb.ip->local_ip); + msg->conn->pcb.ip->local_ip); } else { ip_addr_copy(API_EXPR_DEREF(msg->msg.ad.ipaddr), - msg->conn->pcb.ip->remote_ip); + msg->conn->pcb.ip->remote_ip); } msg->err = ERR_OK; switch (NETCONNTYPE_GROUP(msg->conn->type)) { #if LWIP_RAW - case NETCONN_RAW: - if (msg->msg.ad.local) { - API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.raw->protocol; - } else { - /* return an error as connecting is only a helper for upper layers */ - msg->err = ERR_CONN; - } - break; + case NETCONN_RAW: + if (msg->msg.ad.local) { + API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.raw->protocol; + } else { + /* return an error as connecting is only a helper for upper layers */ + msg->err = ERR_CONN; + } + break; #endif /* LWIP_RAW */ #if LWIP_UDP - case NETCONN_UDP: - if (msg->msg.ad.local) { - API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.udp->local_port; - } else { - if ((msg->conn->pcb.udp->flags & UDP_FLAGS_CONNECTED) == 0) { - msg->err = ERR_CONN; + case NETCONN_UDP: + if (msg->msg.ad.local) { + API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.udp->local_port; } else { - API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.udp->remote_port; + if ((msg->conn->pcb.udp->flags & UDP_FLAGS_CONNECTED) == 0) { + msg->err = ERR_CONN; + } else { + API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.udp->remote_port; + } } - } - break; + break; #endif /* LWIP_UDP */ #if LWIP_TCP - case NETCONN_TCP: - if ((msg->msg.ad.local == 0) && - ((msg->conn->pcb.tcp->state == CLOSED) || (msg->conn->pcb.tcp->state == LISTEN))) { - /* pcb is not connected and remote name is requested */ - msg->err = ERR_CONN; - } else { - API_EXPR_DEREF(msg->msg.ad.port) = (msg->msg.ad.local ? msg->conn->pcb.tcp->local_port : msg->conn->pcb.tcp->remote_port); - } - break; + case NETCONN_TCP: + if ((msg->msg.ad.local == 0) && + ((msg->conn->pcb.tcp->state == CLOSED) || (msg->conn->pcb.tcp->state == LISTEN))) { + /* pcb is not connected and remote name is requested */ + msg->err = ERR_CONN; + } else { + API_EXPR_DEREF(msg->msg.ad.port) = (msg->msg.ad.local ? msg->conn->pcb.tcp->local_port : msg->conn->pcb.tcp->remote_port); + } + break; #endif /* LWIP_TCP */ - default: - LWIP_ASSERT("invalid netconn_type", 0); - break; + default: + LWIP_ASSERT("invalid netconn_type", 0); + break; } } else { msg->err = ERR_CONN; @@ -1768,12 +1928,12 @@ lwip_netconn_do_getaddr(void *m) * Called from netconn_close * In contrast to closing sockets, the netconn is not deallocated. * - * @param m the api_msg_msg pointing to the connection + * @param m the api_msg pointing to the connection */ void lwip_netconn_do_close(void *m) { - struct api_msg *msg = (struct api_msg*)m; + struct api_msg *msg = (struct api_msg *)m; #if LWIP_TCP enum netconn_state state = msg->conn->state; @@ -1790,15 +1950,13 @@ lwip_netconn_do_close(void *m) #if LWIP_NETCONN_FULLDUPLEX if (msg->msg.sd.shut & NETCONN_SHUT_WR) { /* close requested, abort running write */ - sys_sem_t* write_completed_sem; + sys_sem_t *write_completed_sem; LWIP_ASSERT("msg->conn->current_msg != NULL", msg->conn->current_msg != NULL); write_completed_sem = LWIP_API_MSG_SEM(msg->conn->current_msg); msg->conn->current_msg->err = ERR_CLSD; msg->conn->current_msg = NULL; - msg->conn->write_offset = 0; msg->conn->state = NETCONN_NONE; state = NETCONN_NONE; - NETCONN_SET_SAFE_ERR(msg->conn, ERR_CLSD); sys_sem_signal(write_completed_sem); } else { LWIP_ASSERT("msg->msg.sd.shut == NETCONN_SHUT_RD", msg->msg.sd.shut == NETCONN_SHUT_RD); @@ -1813,11 +1971,14 @@ lwip_netconn_do_close(void *m) } else { #endif /* LWIP_NETCONN_FULLDUPLEX */ if (msg->msg.sd.shut & NETCONN_SHUT_RD) { - /* Drain and delete mboxes */ +#if LWIP_NETCONN_FULLDUPLEX + /* Mark mboxes invalid */ + netconn_mark_mbox_invalid(msg->conn); +#else /* LWIP_NETCONN_FULLDUPLEX */ netconn_drain(msg->conn); +#endif /* LWIP_NETCONN_FULLDUPLEX */ } - LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL && - msg->conn->write_offset == 0); + LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL); msg->conn->state = NETCONN_CLOSE; msg->conn->current_msg = msg; #if LWIP_TCPIP_CORE_LOCKING @@ -1847,54 +2008,103 @@ lwip_netconn_do_close(void *m) * Join multicast groups for UDP netconns. * Called from netconn_join_leave_group * - * @param m the api_msg_msg pointing to the connection + * @param m the api_msg pointing to the connection */ void lwip_netconn_do_join_leave_group(void *m) { - struct api_msg *msg = (struct api_msg*)m; + struct api_msg *msg = (struct api_msg *)m; - if (ERR_IS_FATAL(msg->conn->last_err)) { - msg->err = msg->conn->last_err; - } else { - if (msg->conn->pcb.tcp != NULL) { - if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_UDP) { + msg->err = ERR_CONN; + if (msg->conn->pcb.tcp != NULL) { + if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_UDP) { #if LWIP_UDP #if LWIP_IPV6 && LWIP_IPV6_MLD - if (NETCONNTYPE_ISIPV6(msg->conn->type)) { - if (msg->msg.jl.join_or_leave == NETCONN_JOIN) { - msg->err = mld6_joingroup(ip_2_ip6(API_EXPR_REF(msg->msg.jl.netif_addr)), - ip_2_ip6(API_EXPR_REF(msg->msg.jl.multiaddr))); - } else { - msg->err = mld6_leavegroup(ip_2_ip6(API_EXPR_REF(msg->msg.jl.netif_addr)), - ip_2_ip6(API_EXPR_REF(msg->msg.jl.multiaddr))); - } + if (NETCONNTYPE_ISIPV6(msg->conn->type)) { + if (msg->msg.jl.join_or_leave == NETCONN_JOIN) { + msg->err = mld6_joingroup(ip_2_ip6(API_EXPR_REF(msg->msg.jl.netif_addr)), + ip_2_ip6(API_EXPR_REF(msg->msg.jl.multiaddr))); + } else { + msg->err = mld6_leavegroup(ip_2_ip6(API_EXPR_REF(msg->msg.jl.netif_addr)), + ip_2_ip6(API_EXPR_REF(msg->msg.jl.multiaddr))); } - else + } else #endif /* LWIP_IPV6 && LWIP_IPV6_MLD */ - { + { #if LWIP_IGMP - if (msg->msg.jl.join_or_leave == NETCONN_JOIN) { - msg->err = igmp_joingroup(ip_2_ip4(API_EXPR_REF(msg->msg.jl.netif_addr)), - ip_2_ip4(API_EXPR_REF(msg->msg.jl.multiaddr))); - } else { - msg->err = igmp_leavegroup(ip_2_ip4(API_EXPR_REF(msg->msg.jl.netif_addr)), - ip_2_ip4(API_EXPR_REF(msg->msg.jl.multiaddr))); - } -#endif /* LWIP_IGMP */ + if (msg->msg.jl.join_or_leave == NETCONN_JOIN) { + msg->err = igmp_joingroup(ip_2_ip4(API_EXPR_REF(msg->msg.jl.netif_addr)), + ip_2_ip4(API_EXPR_REF(msg->msg.jl.multiaddr))); + } else { + msg->err = igmp_leavegroup(ip_2_ip4(API_EXPR_REF(msg->msg.jl.netif_addr)), + ip_2_ip4(API_EXPR_REF(msg->msg.jl.multiaddr))); } +#endif /* LWIP_IGMP */ + } #endif /* LWIP_UDP */ #if (LWIP_TCP || LWIP_RAW) - } else { - msg->err = ERR_VAL; -#endif /* (LWIP_TCP || LWIP_RAW) */ - } } else { - msg->err = ERR_CONN; + msg->err = ERR_VAL; +#endif /* (LWIP_TCP || LWIP_RAW) */ } } TCPIP_APIMSG_ACK(msg); } +/** + * Join multicast groups for UDP netconns. + * Called from netconn_join_leave_group_netif + * + * @param m the api_msg pointing to the connection + */ +void +lwip_netconn_do_join_leave_group_netif(void *m) +{ + struct api_msg *msg = (struct api_msg *)m; + struct netif *netif; + + netif = netif_get_by_index(msg->msg.jl.if_idx); + if (netif == NULL) { + msg->err = ERR_IF; + goto done; + } + + msg->err = ERR_CONN; + if (msg->conn->pcb.tcp != NULL) { + if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_UDP) { +#if LWIP_UDP +#if LWIP_IPV6 && LWIP_IPV6_MLD + if (NETCONNTYPE_ISIPV6(msg->conn->type)) { + if (msg->msg.jl.join_or_leave == NETCONN_JOIN) { + msg->err = mld6_joingroup_netif(netif, + ip_2_ip6(API_EXPR_REF(msg->msg.jl.multiaddr))); + } else { + msg->err = mld6_leavegroup_netif(netif, + ip_2_ip6(API_EXPR_REF(msg->msg.jl.multiaddr))); + } + } else +#endif /* LWIP_IPV6 && LWIP_IPV6_MLD */ + { +#if LWIP_IGMP + if (msg->msg.jl.join_or_leave == NETCONN_JOIN) { + msg->err = igmp_joingroup_netif(netif, + ip_2_ip4(API_EXPR_REF(msg->msg.jl.multiaddr))); + } else { + msg->err = igmp_leavegroup_netif(netif, + ip_2_ip4(API_EXPR_REF(msg->msg.jl.multiaddr))); + } +#endif /* LWIP_IGMP */ + } +#endif /* LWIP_UDP */ +#if (LWIP_TCP || LWIP_RAW) + } else { + msg->err = ERR_VAL; +#endif /* (LWIP_TCP || LWIP_RAW) */ + } + } + +done: + TCPIP_APIMSG_ACK(msg); +} #endif /* LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) */ #if LWIP_DNS @@ -1906,7 +2116,7 @@ lwip_netconn_do_join_leave_group(void *m) static void lwip_netconn_do_dns_found(const char *name, const ip_addr_t *ipaddr, void *arg) { - struct dns_api_msg *msg = (struct dns_api_msg*)arg; + struct dns_api_msg *msg = (struct dns_api_msg *)arg; /* we trust the internal implementation to be correct :-) */ LWIP_UNUSED_ARG(name); @@ -1932,7 +2142,7 @@ lwip_netconn_do_dns_found(const char *name, const ip_addr_t *ipaddr, void *arg) void lwip_netconn_do_gethostbyname(void *arg) { - struct dns_api_msg *msg = (struct dns_api_msg*)arg; + struct dns_api_msg *msg = (struct dns_api_msg *)arg; u8_t addrtype = #if LWIP_IPV4 && LWIP_IPV6 msg->dns_addrtype; @@ -1941,12 +2151,22 @@ lwip_netconn_do_gethostbyname(void *arg) #endif API_EXPR_DEREF(msg->err) = dns_gethostbyname_addrtype(msg->name, - API_EXPR_REF(msg->addr), lwip_netconn_do_dns_found, msg, addrtype); + API_EXPR_REF(msg->addr), lwip_netconn_do_dns_found, msg, addrtype); +#if LWIP_TCPIP_CORE_LOCKING + /* For core locking, only block if we need to wait for answer/timeout */ + if (API_EXPR_DEREF(msg->err) == ERR_INPROGRESS) { + UNLOCK_TCPIP_CORE(); + sys_sem_wait(API_EXPR_REF_SEM(msg->sem)); + LOCK_TCPIP_CORE(); + LWIP_ASSERT("do_gethostbyname still in progress!!", API_EXPR_DEREF(msg->err) != ERR_INPROGRESS); + } +#else /* LWIP_TCPIP_CORE_LOCKING */ if (API_EXPR_DEREF(msg->err) != ERR_INPROGRESS) { /* on error or immediate success, wake up the application * task waiting in netconn_gethostbyname */ sys_sem_signal(API_EXPR_REF_SEM(msg->sem)); } +#endif /* LWIP_TCPIP_CORE_LOCKING */ } #endif /* LWIP_DNS */ diff --git a/Libraries/LwIP/src/api/err.c b/Libraries/LwIP/src/api/err.c index 6e9ab76..f2d7180 100755 --- a/Libraries/LwIP/src/api/err.c +++ b/Libraries/LwIP/src/api/err.c @@ -78,23 +78,23 @@ err_to_errno(err_t err) #ifdef LWIP_DEBUG static const char *err_strerr[] = { - "Ok.", /* ERR_OK 0 */ - "Out of memory error.", /* ERR_MEM -1 */ - "Buffer error.", /* ERR_BUF -2 */ - "Timeout.", /* ERR_TIMEOUT -3 */ - "Routing problem.", /* ERR_RTE -4 */ - "Operation in progress.", /* ERR_INPROGRESS -5 */ - "Illegal value.", /* ERR_VAL -6 */ - "Operation would block.", /* ERR_WOULDBLOCK -7 */ - "Address in use.", /* ERR_USE -8 */ - "Already connecting.", /* ERR_ALREADY -9 */ - "Already connected.", /* ERR_ISCONN -10 */ - "Not connected.", /* ERR_CONN -11 */ - "Low-level netif error.", /* ERR_IF -12 */ - "Connection aborted.", /* ERR_ABRT -13 */ - "Connection reset.", /* ERR_RST -14 */ - "Connection closed.", /* ERR_CLSD -15 */ - "Illegal argument." /* ERR_ARG -16 */ + "Ok.", /* ERR_OK 0 */ + "Out of memory error.", /* ERR_MEM -1 */ + "Buffer error.", /* ERR_BUF -2 */ + "Timeout.", /* ERR_TIMEOUT -3 */ + "Routing problem.", /* ERR_RTE -4 */ + "Operation in progress.", /* ERR_INPROGRESS -5 */ + "Illegal value.", /* ERR_VAL -6 */ + "Operation would block.", /* ERR_WOULDBLOCK -7 */ + "Address in use.", /* ERR_USE -8 */ + "Already connecting.", /* ERR_ALREADY -9 */ + "Already connected.", /* ERR_ISCONN -10 */ + "Not connected.", /* ERR_CONN -11 */ + "Low-level netif error.", /* ERR_IF -12 */ + "Connection aborted.", /* ERR_ABRT -13 */ + "Connection reset.", /* ERR_RST -14 */ + "Connection closed.", /* ERR_CLSD -15 */ + "Illegal argument." /* ERR_ARG -16 */ }; /** diff --git a/Libraries/LwIP/src/api/if_api.c b/Libraries/LwIP/src/api/if_api.c new file mode 100644 index 0000000..8e094d0 --- /dev/null +++ b/Libraries/LwIP/src/api/if_api.c @@ -0,0 +1,102 @@ +/** + * @file + * Interface Identification APIs from: + * RFC 3493: Basic Socket Interface Extensions for IPv6 + * Section 4: Interface Identification + * + * @defgroup if_api Interface Identification API + * @ingroup socket + */ + +/* + * Copyright (c) 2017 Joel Cunningham, Garmin International, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Joel Cunningham + * + */ +#include "lwip/opt.h" + +#if LWIP_SOCKET + +#include "lwip/errno.h" +#include "lwip/if_api.h" +#include "lwip/netifapi.h" +#include "lwip/priv/sockets_priv.h" + +/** + * @ingroup if_api + * Maps an interface index to its corresponding name. + * @param ifindex interface index + * @param ifname shall point to a buffer of at least {IF_NAMESIZE} bytes + * @return If ifindex is an interface index, then the function shall return the + * value supplied in ifname, which points to a buffer now containing the interface name. + * Otherwise, the function shall return a NULL pointer. + */ +char * +lwip_if_indextoname(unsigned int ifindex, char *ifname) +{ +#if LWIP_NETIF_API + if (ifindex <= 0xff) { + err_t err = netifapi_netif_index_to_name((u8_t)ifindex, ifname); + if (!err && ifname[0] != '\0') { + return ifname; + } + } +#else /* LWIP_NETIF_API */ + LWIP_UNUSED_ARG(ifindex); + LWIP_UNUSED_ARG(ifname); +#endif /* LWIP_NETIF_API */ + set_errno(ENXIO); + return NULL; +} + +/** + * @ingroup if_api + * Returs the interface index corresponding to name ifname. + * @param ifname Interface name + * @return The corresponding index if ifname is the name of an interface; + * otherwise, zero. + */ +unsigned int +lwip_if_nametoindex(const char *ifname) +{ +#if LWIP_NETIF_API + err_t err; + u8_t idx; + + err = netifapi_netif_name_to_index(ifname, &idx); + if (!err) { + return idx; + } +#else /* LWIP_NETIF_API */ + LWIP_UNUSED_ARG(ifname); +#endif /* LWIP_NETIF_API */ + return 0; /* invalid index */ +} + +#endif /* LWIP_SOCKET */ diff --git a/Libraries/LwIP/src/api/netbuf.c b/Libraries/LwIP/src/api/netbuf.c index 6a5a182..b464440 100755 --- a/Libraries/LwIP/src/api/netbuf.c +++ b/Libraries/LwIP/src/api/netbuf.c @@ -109,10 +109,10 @@ netbuf_alloc(struct netbuf *buf, u16_t size) } buf->p = pbuf_alloc(PBUF_TRANSPORT, size, PBUF_RAM); if (buf->p == NULL) { - return NULL; + return NULL; } LWIP_ASSERT("check that first pbuf can hold size", - (buf->p->len >= size)); + (buf->p->len >= size)); buf->ptr = buf->p; return buf->p->payload; } @@ -131,6 +131,10 @@ netbuf_free(struct netbuf *buf) pbuf_free(buf->p); } buf->p = buf->ptr = NULL; +#if LWIP_CHECKSUM_ON_COPY + buf->flags = 0; + buf->toport_chksum = 0; +#endif /* LWIP_CHECKSUM_ON_COPY */ } /** @@ -155,7 +159,7 @@ netbuf_ref(struct netbuf *buf, const void *dataptr, u16_t size) buf->ptr = NULL; return ERR_MEM; } - ((struct pbuf_rom*)buf->p)->payload = dataptr; + ((struct pbuf_rom *)buf->p)->payload = dataptr; buf->p->len = buf->p->tot_len = size; buf->ptr = buf->p; return ERR_OK; diff --git a/Libraries/LwIP/src/api/netdb.c b/Libraries/LwIP/src/api/netdb.c index deff495..9ffc75a 100755 --- a/Libraries/LwIP/src/api/netdb.c +++ b/Libraries/LwIP/src/api/netdb.c @@ -83,7 +83,7 @@ int h_errno; * @return an entry containing addresses of address family AF_INET * for the host with name name */ -struct hostent* +struct hostent * lwip_gethostbyname(const char *name) { err_t err; @@ -115,21 +115,21 @@ lwip_gethostbyname(const char *name) s_hostent.h_aliases = &s_aliases; s_hostent.h_addrtype = AF_INET; s_hostent.h_length = sizeof(ip_addr_t); - s_hostent.h_addr_list = (char**)&s_phostent_addr; + s_hostent.h_addr_list = (char **)&s_phostent_addr; #if DNS_DEBUG /* dump hostent */ LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_name == %s\n", s_hostent.h_name)); - LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_aliases == %p\n", (void*)s_hostent.h_aliases)); + LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_aliases == %p\n", (void *)s_hostent.h_aliases)); /* h_aliases are always empty */ LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_addrtype == %d\n", s_hostent.h_addrtype)); LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_length == %d\n", s_hostent.h_length)); - LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_addr_list == %p\n", (void*)s_hostent.h_addr_list)); + LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_addr_list == %p\n", (void *)s_hostent.h_addr_list)); if (s_hostent.h_addr_list != NULL) { u8_t idx; - for (idx=0; s_hostent.h_addr_list[idx]; idx++) { + for (idx = 0; s_hostent.h_addr_list[idx]; idx++) { LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_addr_list[%i] == %p\n", idx, s_hostent.h_addr_list[idx])); - LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_addr_list[%i]-> == %s\n", idx, ipaddr_ntoa((ip_addr_t*)s_hostent.h_addr_list[idx]))); + LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_addr_list[%i]-> == %s\n", idx, ipaddr_ntoa((ip_addr_t *)s_hostent.h_addr_list[idx]))); } } #endif /* DNS_DEBUG */ @@ -160,7 +160,7 @@ lwip_gethostbyname(const char *name) */ int lwip_gethostbyname_r(const char *name, struct hostent *ret, char *buf, - size_t buflen, struct hostent **result, int *h_errnop) + size_t buflen, struct hostent **result, int *h_errnop) { err_t err; struct gethostbyname_r_helper *h; @@ -187,14 +187,14 @@ lwip_gethostbyname_r(const char *name, struct hostent *ret, char *buf, } namelen = strlen(name); - if (buflen < (sizeof(struct gethostbyname_r_helper) + namelen + 1 + (MEM_ALIGNMENT - 1))) { + if (buflen < (sizeof(struct gethostbyname_r_helper) + LWIP_MEM_ALIGN_BUFFER(namelen + 1))) { /* buf can't hold the data needed + a copy of name */ *h_errnop = ERANGE; return -1; } - h = (struct gethostbyname_r_helper*)LWIP_MEM_ALIGN(buf); - hostname = ((char*)h) + sizeof(struct gethostbyname_r_helper); + h = (struct gethostbyname_r_helper *)LWIP_MEM_ALIGN(buf); + hostname = ((char *)h) + sizeof(struct gethostbyname_r_helper); /* query host IP address */ err = netconn_gethostbyname(name, &h->addr); @@ -216,7 +216,7 @@ lwip_gethostbyname_r(const char *name, struct hostent *ret, char *buf, ret->h_aliases = &h->aliases; ret->h_addrtype = AF_INET; ret->h_length = sizeof(ip_addr_t); - ret->h_addr_list = (char**)&h->addr_list; + ret->h_addr_list = (char **)&h->addr_list; /* set result != NULL */ *result = ret; @@ -267,7 +267,7 @@ lwip_freeaddrinfo(struct addrinfo *ai) */ int lwip_getaddrinfo(const char *nodename, const char *servname, - const struct addrinfo *hints, struct addrinfo **res) + const struct addrinfo *hints, struct addrinfo **res) { err_t err; ip_addr_t addr; @@ -290,12 +290,12 @@ lwip_getaddrinfo(const char *nodename, const char *servname, ai_family = hints->ai_family; if ((ai_family != AF_UNSPEC) #if LWIP_IPV4 - && (ai_family != AF_INET) + && (ai_family != AF_INET) #endif /* LWIP_IPV4 */ #if LWIP_IPV6 - && (ai_family != AF_INET6) + && (ai_family != AF_INET6) #endif /* LWIP_IPV6 */ - ) { + ) { return EAI_FAMILY; } } else { @@ -342,9 +342,9 @@ lwip_getaddrinfo(const char *nodename, const char *servname, } else { /* service location specified, use loopback address */ if ((hints != NULL) && (hints->ai_flags & AI_PASSIVE)) { - ip_addr_set_any(ai_family == AF_INET6, &addr); + ip_addr_set_any_val(ai_family == AF_INET6, addr); } else { - ip_addr_set_loopback(ai_family == AF_INET6, &addr); + ip_addr_set_loopback_val(ai_family == AF_INET6, addr); } } @@ -360,27 +360,28 @@ lwip_getaddrinfo(const char *nodename, const char *servname, } /* If this fails, please report to lwip-devel! :-) */ LWIP_ASSERT("total_size <= NETDB_ELEM_SIZE: please report this!", - total_size <= NETDB_ELEM_SIZE); + total_size <= NETDB_ELEM_SIZE); ai = (struct addrinfo *)memp_malloc(MEMP_NETDB); if (ai == NULL) { return EAI_MEMORY; } memset(ai, 0, total_size); /* cast through void* to get rid of alignment warnings */ - sa = (struct sockaddr_storage *)(void*)((u8_t*)ai + sizeof(struct addrinfo)); + sa = (struct sockaddr_storage *)(void *)((u8_t *)ai + sizeof(struct addrinfo)); if (IP_IS_V6_VAL(addr)) { #if LWIP_IPV6 - struct sockaddr_in6 *sa6 = (struct sockaddr_in6*)sa; + struct sockaddr_in6 *sa6 = (struct sockaddr_in6 *)sa; /* set up sockaddr */ inet6_addr_from_ip6addr(&sa6->sin6_addr, ip_2_ip6(&addr)); sa6->sin6_family = AF_INET6; sa6->sin6_len = sizeof(struct sockaddr_in6); sa6->sin6_port = lwip_htons((u16_t)port_nr); + sa6->sin6_scope_id = ip6_addr_zone(ip_2_ip6(&addr)); ai->ai_family = AF_INET6; #endif /* LWIP_IPV6 */ } else { #if LWIP_IPV4 - struct sockaddr_in *sa4 = (struct sockaddr_in*)sa; + struct sockaddr_in *sa4 = (struct sockaddr_in *)sa; /* set up sockaddr */ inet_addr_from_ip4addr(&sa4->sin_addr, ip_2_ip4(&addr)); sa4->sin_family = AF_INET; @@ -398,12 +399,12 @@ lwip_getaddrinfo(const char *nodename, const char *servname, } if (nodename != NULL) { /* copy nodename to canonname if specified */ - ai->ai_canonname = ((char*)ai + sizeof(struct addrinfo) + sizeof(struct sockaddr_storage)); + ai->ai_canonname = ((char *)ai + sizeof(struct addrinfo) + sizeof(struct sockaddr_storage)); MEMCPY(ai->ai_canonname, nodename, namelen); ai->ai_canonname[namelen] = 0; } ai->ai_addrlen = sizeof(struct sockaddr_storage); - ai->ai_addr = (struct sockaddr*)sa; + ai->ai_addr = (struct sockaddr *)sa; *res = ai; diff --git a/Libraries/LwIP/src/api/netifapi.c b/Libraries/LwIP/src/api/netifapi.c index aac0975..7c2011f 100755 --- a/Libraries/LwIP/src/api/netifapi.c +++ b/Libraries/LwIP/src/api/netifapi.c @@ -5,10 +5,10 @@ * @defgroup netifapi NETIF API * @ingroup sequential_api * Thread-safe functions to be called from non-TCPIP threads - * + * * @defgroup netifapi_netif NETIF related * @ingroup netifapi - * To be called from non-TCPIP threads + * To be called from non-TCPIP threads */ /* @@ -42,10 +42,13 @@ #if LWIP_NETIF_API /* don't build if not configured for use in lwipopts.h */ +#include "lwip/etharp.h" #include "lwip/netifapi.h" #include "lwip/memp.h" #include "lwip/priv/tcpip_priv.h" +#include /* strncpy */ + #define NETIFAPI_VAR_REF(name) API_VAR_REF(name) #define NETIFAPI_VAR_DECLARE(name) API_VAR_DECLARE(struct netifapi_msg, name) #define NETIFAPI_VAR_ALLOC(name) API_VAR_ALLOC(struct netifapi_msg, MEMP_NETIFAPI_MSG, name, ERR_MEM) @@ -57,10 +60,10 @@ static err_t netifapi_do_netif_add(struct tcpip_api_call_data *m) { - /* cast through void* to silence alignment warnings. + /* cast through void* to silence alignment warnings. * We know it works because the structs have been instantiated as struct netifapi_msg */ - struct netifapi_msg *msg = (struct netifapi_msg*)(void*)m; - + struct netifapi_msg *msg = (struct netifapi_msg *)(void *)m; + if (!netif_add( msg->netif, #if LWIP_IPV4 API_EXPR_REF(msg->msg.add.ipaddr), @@ -83,9 +86,9 @@ netifapi_do_netif_add(struct tcpip_api_call_data *m) static err_t netifapi_do_netif_set_addr(struct tcpip_api_call_data *m) { - /* cast through void* to silence alignment warnings. + /* cast through void* to silence alignment warnings. * We know it works because the structs have been instantiated as struct netifapi_msg */ - struct netifapi_msg *msg = (struct netifapi_msg*)(void*)m; + struct netifapi_msg *msg = (struct netifapi_msg *)(void *)m; netif_set_addr( msg->netif, API_EXPR_REF(msg->msg.add.ipaddr), @@ -95,6 +98,37 @@ netifapi_do_netif_set_addr(struct tcpip_api_call_data *m) } #endif /* LWIP_IPV4 */ +/** +* Call netif_name_to_index() inside the tcpip_thread context. +*/ +static err_t +netifapi_do_name_to_index(struct tcpip_api_call_data *m) +{ + /* cast through void* to silence alignment warnings. + * We know it works because the structs have been instantiated as struct netifapi_msg */ + struct netifapi_msg *msg = (struct netifapi_msg *)(void *)m; + + msg->msg.ifs.index = netif_name_to_index(msg->msg.ifs.name); + return ERR_OK; +} + +/** +* Call netif_index_to_name() inside the tcpip_thread context. +*/ +static err_t +netifapi_do_index_to_name(struct tcpip_api_call_data *m) +{ + /* cast through void* to silence alignment warnings. + * We know it works because the structs have been instantiated as struct netifapi_msg */ + struct netifapi_msg *msg = (struct netifapi_msg *)(void *)m; + + if (!netif_index_to_name(msg->msg.ifs.index, msg->msg.ifs.name)) { + /* return failure via empty name */ + msg->msg.ifs.name[0] = '\0'; + } + return ERR_OK; +} + /** * Call the "errtfunc" (or the "voidfunc" if "errtfunc" is NULL) inside the * tcpip_thread context. @@ -102,9 +136,9 @@ netifapi_do_netif_set_addr(struct tcpip_api_call_data *m) static err_t netifapi_do_netif_common(struct tcpip_api_call_data *m) { - /* cast through void* to silence alignment warnings. + /* cast through void* to silence alignment warnings. * We know it works because the structs have been instantiated as struct netifapi_msg */ - struct netifapi_msg *msg = (struct netifapi_msg*)(void*)m; + struct netifapi_msg *msg = (struct netifapi_msg *)(void *)m; if (msg->msg.common.errtfunc != NULL) { return msg->msg.common.errtfunc(msg->netif); @@ -114,6 +148,69 @@ netifapi_do_netif_common(struct tcpip_api_call_data *m) } } +#if LWIP_ARP && LWIP_IPV4 +/** + * @ingroup netifapi_arp + * Add or update an entry in the ARP cache. + * For an update, ipaddr is used to find the cache entry. + * + * @param ipaddr IPv4 address of cache entry + * @param ethaddr hardware address mapped to ipaddr + * @param type type of ARP cache entry + * @return ERR_OK: entry added/updated, else error from err_t + */ +err_t +netifapi_arp_add(const ip4_addr_t *ipaddr, struct eth_addr *ethaddr, enum netifapi_arp_entry type) +{ + err_t err; + + /* We only support permanent entries currently */ + LWIP_UNUSED_ARG(type); + +#if ETHARP_SUPPORT_STATIC_ENTRIES && LWIP_TCPIP_CORE_LOCKING + LOCK_TCPIP_CORE(); + err = etharp_add_static_entry(ipaddr, ethaddr); + UNLOCK_TCPIP_CORE(); +#else + /* @todo add new vars to struct netifapi_msg and create a 'do' func */ + LWIP_UNUSED_ARG(ipaddr); + LWIP_UNUSED_ARG(ethaddr); + err = ERR_VAL; +#endif /* ETHARP_SUPPORT_STATIC_ENTRIES && LWIP_TCPIP_CORE_LOCKING */ + + return err; +} + +/** + * @ingroup netifapi_arp + * Remove an entry in the ARP cache identified by ipaddr + * + * @param ipaddr IPv4 address of cache entry + * @param type type of ARP cache entry + * @return ERR_OK: entry removed, else error from err_t + */ +err_t +netifapi_arp_remove(const ip4_addr_t *ipaddr, enum netifapi_arp_entry type) +{ + err_t err; + + /* We only support permanent entries currently */ + LWIP_UNUSED_ARG(type); + +#if ETHARP_SUPPORT_STATIC_ENTRIES && LWIP_TCPIP_CORE_LOCKING + LOCK_TCPIP_CORE(); + err = etharp_remove_static_entry(ipaddr); + UNLOCK_TCPIP_CORE(); +#else + /* @todo add new vars to struct netifapi_msg and create a 'do' func */ + LWIP_UNUSED_ARG(ipaddr); + err = ERR_VAL; +#endif /* ETHARP_SUPPORT_STATIC_ENTRIES && LWIP_TCPIP_CORE_LOCKING */ + + return err; +} +#endif /* LWIP_ARP && LWIP_IPV4 */ + /** * @ingroup netifapi_netif * Call netif_add() in a thread-safe way by running that function inside the @@ -204,7 +301,7 @@ netifapi_netif_set_addr(struct netif *netif, */ err_t netifapi_netif_common(struct netif *netif, netifapi_void_fn voidfunc, - netifapi_errt_fn errtfunc) + netifapi_errt_fn errtfunc) { err_t err; NETIFAPI_VAR_DECLARE(msg); @@ -218,4 +315,66 @@ netifapi_netif_common(struct netif *netif, netifapi_void_fn voidfunc, return err; } +/** +* @ingroup netifapi_netif +* Call netif_name_to_index() in a thread-safe way by running that function inside the +* tcpip_thread context. +* +* @param name the interface name of the netif +* @param idx output index of the found netif +*/ +err_t +netifapi_netif_name_to_index(const char *name, u8_t *idx) +{ + err_t err; + NETIFAPI_VAR_DECLARE(msg); + NETIFAPI_VAR_ALLOC(msg); + + *idx = 0; + +#if LWIP_MPU_COMPATIBLE + strncpy(NETIFAPI_VAR_REF(msg).msg.ifs.name, name, NETIF_NAMESIZE - 1); + NETIFAPI_VAR_REF(msg).msg.ifs.name[NETIF_NAMESIZE - 1] = '\0'; +#else + NETIFAPI_VAR_REF(msg).msg.ifs.name = LWIP_CONST_CAST(char *, name); +#endif /* LWIP_MPU_COMPATIBLE */ + err = tcpip_api_call(netifapi_do_name_to_index, &API_VAR_REF(msg).call); + if (!err) { + *idx = NETIFAPI_VAR_REF(msg).msg.ifs.index; + } + NETIFAPI_VAR_FREE(msg); + return err; +} + +/** +* @ingroup netifapi_netif +* Call netif_index_to_name() in a thread-safe way by running that function inside the +* tcpip_thread context. +* +* @param idx the interface index of the netif +* @param name output name of the found netif, empty '\0' string if netif not found. +* name should be of at least NETIF_NAMESIZE bytes +*/ +err_t +netifapi_netif_index_to_name(u8_t idx, char *name) +{ + err_t err; + NETIFAPI_VAR_DECLARE(msg); + NETIFAPI_VAR_ALLOC(msg); + + NETIFAPI_VAR_REF(msg).msg.ifs.index = idx; +#if !LWIP_MPU_COMPATIBLE + NETIFAPI_VAR_REF(msg).msg.ifs.name = name; +#endif /* LWIP_MPU_COMPATIBLE */ + err = tcpip_api_call(netifapi_do_index_to_name, &API_VAR_REF(msg).call); +#if LWIP_MPU_COMPATIBLE + if (!err) { + strncpy(name, NETIFAPI_VAR_REF(msg).msg.ifs.name, NETIF_NAMESIZE - 1); + name[NETIF_NAMESIZE - 1] = '\0'; + } +#endif /* LWIP_MPU_COMPATIBLE */ + NETIFAPI_VAR_FREE(msg); + return err; +} + #endif /* LWIP_NETIF_API */ diff --git a/Libraries/LwIP/src/api/sockets.c b/Libraries/LwIP/src/api/sockets.c index d72724f..0e968b8 100755 --- a/Libraries/LwIP/src/api/sockets.c +++ b/Libraries/LwIP/src/api/sockets.c @@ -1,13 +1,6 @@ /** * @file * Sockets BSD-Like API module - * - * @defgroup socket Socket API - * @ingroup sequential_api - * BSD-style socket API.\n - * Thread-safe, to be called from non-TCPIP threads only.\n - * Can be activated by defining @ref LWIP_SOCKET to 1.\n - * Header is in posix/sys/socket.h\b */ /* @@ -49,8 +42,8 @@ #if LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */ #include "lwip/sockets.h" +#include "lwip/priv/sockets_priv.h" #include "lwip/api.h" -#include "lwip/sys.h" #include "lwip/igmp.h" #include "lwip/inet.h" #include "lwip/tcp.h" @@ -58,13 +51,23 @@ #include "lwip/udp.h" #include "lwip/memp.h" #include "lwip/pbuf.h" +#include "lwip/netif.h" #include "lwip/priv/tcpip_priv.h" +#include "lwip/mld6.h" #if LWIP_CHECKSUM_ON_COPY #include "lwip/inet_chksum.h" #endif +#if LWIP_COMPAT_SOCKETS == 2 && LWIP_POSIX_SOCKETS_IO_NAMES +#include +#endif + #include +#ifdef LWIP_HOOK_FILENAME +#include LWIP_HOOK_FILENAME +#endif + /* If the netconn API is not required publicly, then we include the necessary files here to get the implementation */ #if !LWIP_NETCONN @@ -77,6 +80,11 @@ #define LWIP_NETCONN 0 #endif +#define API_SELECT_CB_VAR_REF(name) API_VAR_REF(name) +#define API_SELECT_CB_VAR_DECLARE(name) API_VAR_DECLARE(struct lwip_select_cb, name) +#define API_SELECT_CB_VAR_ALLOC(name, retblock) API_VAR_ALLOC_EXT(struct lwip_select_cb, MEMP_SELECT_CB, name, retblock) +#define API_SELECT_CB_VAR_FREE(name) API_VAR_FREE(MEMP_SELECT_CB, name) + #if LWIP_IPV4 #define IP4ADDR_PORT_TO_SOCKADDR(sin, ipaddr, port) do { \ (sin)->sin_len = sizeof(struct sockaddr_in); \ @@ -96,14 +104,17 @@ (sin6)->sin6_port = lwip_htons((port)); \ (sin6)->sin6_flowinfo = 0; \ inet6_addr_from_ip6addr(&(sin6)->sin6_addr, ipaddr); \ - (sin6)->sin6_scope_id = 0; }while(0) + (sin6)->sin6_scope_id = ip6_addr_zone(ipaddr); }while(0) #define SOCKADDR6_TO_IP6ADDR_PORT(sin6, ipaddr, port) do { \ inet6_addr_to_ip6addr(ip_2_ip6(ipaddr), &((sin6)->sin6_addr)); \ + if (ip6_addr_has_scope(ip_2_ip6(ipaddr), IP6_UNKNOWN)) { \ + ip6_addr_set_zone(ip_2_ip6(ipaddr), (u8_t)((sin6)->sin6_scope_id)); \ + } \ (port) = lwip_ntohs((sin6)->sin6_port); }while(0) #endif /* LWIP_IPV6 */ #if LWIP_IPV4 && LWIP_IPV6 -static void sockaddr_to_ipaddr_port(const struct sockaddr* sockaddr, ip_addr_t* ipaddr, u16_t* port); +static void sockaddr_to_ipaddr_port(const struct sockaddr *sockaddr, ip_addr_t *ipaddr, u16_t *port); #define IS_SOCK_ADDR_LEN_VALID(namelen) (((namelen) == sizeof(struct sockaddr_in)) || \ ((namelen) == sizeof(struct sockaddr_in6))) @@ -113,7 +124,7 @@ static void sockaddr_to_ipaddr_port(const struct sockaddr* sockaddr, ip_addr_t* ((((name)->sa_family == AF_INET) && !(NETCONNTYPE_ISIPV6((sock)->conn->type))) || \ (((name)->sa_family == AF_INET6) && (NETCONNTYPE_ISIPV6((sock)->conn->type)))) #define IPADDR_PORT_TO_SOCKADDR(sockaddr, ipaddr, port) do { \ - if (IP_IS_V6(ipaddr)) { \ + if (IP_IS_ANY_TYPE_VAL(*ipaddr) || IP_IS_V6_VAL(*ipaddr)) { \ IP6ADDR_PORT_TO_SOCKADDR((struct sockaddr_in6*)(void*)(sockaddr), ip_2_ip6(ipaddr), port); \ } else { \ IP4ADDR_PORT_TO_SOCKADDR((struct sockaddr_in*)(void*)(sockaddr), ip_2_ip4(ipaddr), port); \ @@ -148,16 +159,16 @@ static void sockaddr_to_ipaddr_port(const struct sockaddr* sockaddr, ip_addr_t* #define IS_SOCK_ADDR_ALIGNED(name) ((((mem_ptr_t)(name)) % 4) == 0) -#define LWIP_SOCKOPT_CHECK_OPTLEN(optlen, opttype) do { if ((optlen) < sizeof(opttype)) { return EINVAL; }}while(0) +#define LWIP_SOCKOPT_CHECK_OPTLEN(sock, optlen, opttype) do { if ((optlen) < sizeof(opttype)) { done_socket(sock); return EINVAL; }}while(0) #define LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, optlen, opttype) do { \ - LWIP_SOCKOPT_CHECK_OPTLEN(optlen, opttype); \ - if ((sock)->conn == NULL) { return EINVAL; } }while(0) + LWIP_SOCKOPT_CHECK_OPTLEN(sock, optlen, opttype); \ + if ((sock)->conn == NULL) { done_socket(sock); return EINVAL; } }while(0) #define LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, opttype) do { \ - LWIP_SOCKOPT_CHECK_OPTLEN(optlen, opttype); \ - if (((sock)->conn == NULL) || ((sock)->conn->pcb.tcp == NULL)) { return EINVAL; } }while(0) + LWIP_SOCKOPT_CHECK_OPTLEN(sock, optlen, opttype); \ + if (((sock)->conn == NULL) || ((sock)->conn->pcb.tcp == NULL)) { done_socket(sock); return EINVAL; } }while(0) #define LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, opttype, netconntype) do { \ LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, opttype); \ - if (NETCONNTYPE_GROUP(netconn_type((sock)->conn)) != netconntype) { return ENOPROTOOPT; } }while(0) + if (NETCONNTYPE_GROUP(netconn_type((sock)->conn)) != netconntype) { done_socket(sock); return ENOPROTOOPT; } }while(0) #define LWIP_SETGETSOCKOPT_DATA_VAR_REF(name) API_VAR_REF(name) @@ -168,6 +179,7 @@ static void sockaddr_to_ipaddr_port(const struct sockaddr* sockaddr, ip_addr_t* name = (struct lwip_setgetsockopt_data *)memp_malloc(MEMP_SOCKET_SETGETSOCKOPT_DATA); \ if (name == NULL) { \ sock_set_errno(sock, ENOMEM); \ + done_socket(sock); \ return -1; \ } }while(0) #else /* LWIP_MPU_COMPATIBLE */ @@ -177,150 +189,127 @@ static void sockaddr_to_ipaddr_port(const struct sockaddr* sockaddr, ip_addr_t* #if LWIP_SO_SNDRCVTIMEO_NONSTANDARD #define LWIP_SO_SNDRCVTIMEO_OPTTYPE int #define LWIP_SO_SNDRCVTIMEO_SET(optval, val) (*(int *)(optval) = (val)) -#define LWIP_SO_SNDRCVTIMEO_GET_MS(optval) ((s32_t)*(const int*)(optval)) +#define LWIP_SO_SNDRCVTIMEO_GET_MS(optval) ((long)*(const int*)(optval)) #else #define LWIP_SO_SNDRCVTIMEO_OPTTYPE struct timeval #define LWIP_SO_SNDRCVTIMEO_SET(optval, val) do { \ - s32_t loc = (val); \ - ((struct timeval *)(optval))->tv_sec = (loc) / 1000U; \ - ((struct timeval *)(optval))->tv_usec = ((loc) % 1000U) * 1000U; }while(0) -#define LWIP_SO_SNDRCVTIMEO_GET_MS(optval) ((((const struct timeval *)(optval))->tv_sec * 1000U) + (((const struct timeval *)(optval))->tv_usec / 1000U)) + u32_t loc = (val); \ + ((struct timeval *)(optval))->tv_sec = (long)((loc) / 1000U); \ + ((struct timeval *)(optval))->tv_usec = (long)(((loc) % 1000U) * 1000U); }while(0) +#define LWIP_SO_SNDRCVTIMEO_GET_MS(optval) ((((const struct timeval *)(optval))->tv_sec * 1000) + (((const struct timeval *)(optval))->tv_usec / 1000)) #endif -#define NUM_SOCKETS MEMP_NUM_NETCONN - -/** This is overridable for the rare case where more than 255 threads - * select on the same socket... - */ -#ifndef SELWAIT_T -#define SELWAIT_T u8_t -#endif - -/** Contains all internal pointers and states used for a socket */ -struct lwip_sock { - /** sockets currently are built on netconns, each socket has one netconn */ - struct netconn *conn; - /** data that was left from the previous read */ - void *lastdata; - /** offset in the data that was left from the previous read */ - u16_t lastoffset; - /** number of times data was received, set by event_callback(), - tested by the receive and select functions */ - s16_t rcvevent; - /** number of times data was ACKed (free send buffer), set by event_callback(), - tested by select */ - u16_t sendevent; - /** error happened for this socket, set by event_callback(), tested by select */ - u16_t errevent; - /** last error that occurred on this socket (in fact, all our errnos fit into an u8_t) */ - u8_t err; - /** counter of how many threads are waiting for this socket using select */ - SELWAIT_T select_waiting; -}; - -#if LWIP_NETCONN_SEM_PER_THREAD -#define SELECT_SEM_T sys_sem_t* -#define SELECT_SEM_PTR(sem) (sem) -#else /* LWIP_NETCONN_SEM_PER_THREAD */ -#define SELECT_SEM_T sys_sem_t -#define SELECT_SEM_PTR(sem) (&(sem)) -#endif /* LWIP_NETCONN_SEM_PER_THREAD */ - -/** Description for a task waiting in select */ -struct lwip_select_cb { - /** Pointer to the next waiting task */ - struct lwip_select_cb *next; - /** Pointer to the previous waiting task */ - struct lwip_select_cb *prev; - /** readset passed to select */ - fd_set *readset; - /** writeset passed to select */ - fd_set *writeset; - /** unimplemented: exceptset passed to select */ - fd_set *exceptset; - /** don't signal the same semaphore twice: set to 1 when signalled */ - int sem_signalled; - /** semaphore to wake up a task waiting for select */ - SELECT_SEM_T sem; -}; /** A struct sockaddr replacement that has the same alignment as sockaddr_in/ * sockaddr_in6 if instantiated. */ union sockaddr_aligned { - struct sockaddr sa; + struct sockaddr sa; #if LWIP_IPV6 - struct sockaddr_in6 sin6; + struct sockaddr_in6 sin6; #endif /* LWIP_IPV6 */ #if LWIP_IPV4 - struct sockaddr_in sin; + struct sockaddr_in sin; #endif /* LWIP_IPV4 */ }; -#if LWIP_IGMP /* Define the number of IPv4 multicast memberships, default is one per socket */ #ifndef LWIP_SOCKET_MAX_MEMBERSHIPS #define LWIP_SOCKET_MAX_MEMBERSHIPS NUM_SOCKETS #endif +#if LWIP_IGMP /* This is to keep track of IP_ADD_MEMBERSHIP calls to drop the membership when a socket is closed */ struct lwip_socket_multicast_pair { /** the socket */ - struct lwip_sock* sock; + struct lwip_sock *sock; /** the interface address */ ip4_addr_t if_addr; /** the group address */ ip4_addr_t multi_addr; }; -struct lwip_socket_multicast_pair socket_ipv4_multicast_memberships[LWIP_SOCKET_MAX_MEMBERSHIPS]; +static struct lwip_socket_multicast_pair socket_ipv4_multicast_memberships[LWIP_SOCKET_MAX_MEMBERSHIPS]; static int lwip_socket_register_membership(int s, const ip4_addr_t *if_addr, const ip4_addr_t *multi_addr); static void lwip_socket_unregister_membership(int s, const ip4_addr_t *if_addr, const ip4_addr_t *multi_addr); static void lwip_socket_drop_registered_memberships(int s); #endif /* LWIP_IGMP */ +#if LWIP_IPV6_MLD +/* This is to keep track of IP_JOIN_GROUP calls to drop the membership when + a socket is closed */ +struct lwip_socket_multicast_mld6_pair { + /** the socket */ + struct lwip_sock *sock; + /** the interface index */ + u8_t if_idx; + /** the group address */ + ip6_addr_t multi_addr; +}; + +static struct lwip_socket_multicast_mld6_pair socket_ipv6_multicast_memberships[LWIP_SOCKET_MAX_MEMBERSHIPS]; + +static int lwip_socket_register_mld6_membership(int s, unsigned int if_idx, const ip6_addr_t *multi_addr); +static void lwip_socket_unregister_mld6_membership(int s, unsigned int if_idx, const ip6_addr_t *multi_addr); +static void lwip_socket_drop_registered_mld6_memberships(int s); +#endif /* LWIP_IPV6_MLD */ + /** The global array of available sockets */ static struct lwip_sock sockets[NUM_SOCKETS]; + +#if LWIP_SOCKET_SELECT || LWIP_SOCKET_POLL +#if LWIP_TCPIP_CORE_LOCKING +/* protect the select_cb_list using core lock */ +#define LWIP_SOCKET_SELECT_DECL_PROTECT(lev) +#define LWIP_SOCKET_SELECT_PROTECT(lev) LOCK_TCPIP_CORE() +#define LWIP_SOCKET_SELECT_UNPROTECT(lev) UNLOCK_TCPIP_CORE() +#else /* LWIP_TCPIP_CORE_LOCKING */ +/* protect the select_cb_list using SYS_LIGHTWEIGHT_PROT */ +#define LWIP_SOCKET_SELECT_DECL_PROTECT(lev) SYS_ARCH_DECL_PROTECT(lev) +#define LWIP_SOCKET_SELECT_PROTECT(lev) SYS_ARCH_PROTECT(lev) +#define LWIP_SOCKET_SELECT_UNPROTECT(lev) SYS_ARCH_UNPROTECT(lev) +/** This counter is increased from lwip_select when the list is changed + and checked in select_check_waiters to see if it has changed. */ +static volatile int select_cb_ctr; +#endif /* LWIP_TCPIP_CORE_LOCKING */ /** The global list of tasks waiting for select */ static struct lwip_select_cb *select_cb_list; -/** This counter is increased from lwip_select when the list is changed - and checked in event_callback to see if it has changed. */ -static volatile int select_cb_ctr; - -#if LWIP_SOCKET_SET_ERRNO -#ifndef set_errno -#define set_errno(err) do { if (err) { errno = (err); } } while(0) -#endif -#else /* LWIP_SOCKET_SET_ERRNO */ -#define set_errno(err) -#endif /* LWIP_SOCKET_SET_ERRNO */ +#endif /* LWIP_SOCKET_SELECT || LWIP_SOCKET_POLL */ #define sock_set_errno(sk, e) do { \ const int sockerr = (e); \ - sk->err = (u8_t)sockerr; \ set_errno(sockerr); \ } while (0) /* Forward declaration of some functions */ +#if LWIP_SOCKET_SELECT || LWIP_SOCKET_POLL static void event_callback(struct netconn *conn, enum netconn_evt evt, u16_t len); +#define DEFAULT_SOCKET_EVENTCB event_callback +static void select_check_waiters(int s, int has_recvevent, int has_sendevent, int has_errevent); +#else +#define DEFAULT_SOCKET_EVENTCB NULL +#endif #if !LWIP_TCPIP_CORE_LOCKING static void lwip_getsockopt_callback(void *arg); static void lwip_setsockopt_callback(void *arg); #endif -static u8_t lwip_getsockopt_impl(int s, int level, int optname, void *optval, socklen_t *optlen); -static u8_t lwip_setsockopt_impl(int s, int level, int optname, const void *optval, socklen_t optlen); +static int lwip_getsockopt_impl(int s, int level, int optname, void *optval, socklen_t *optlen); +static int lwip_setsockopt_impl(int s, int level, int optname, const void *optval, socklen_t optlen); +static int free_socket_locked(struct lwip_sock *sock, int is_tcp, struct netconn **conn, + union lwip_sock_lastdata *lastdata); +static void free_socket_free_elements(int is_tcp, struct netconn *conn, union lwip_sock_lastdata *lastdata); #if LWIP_IPV4 && LWIP_IPV6 static void -sockaddr_to_ipaddr_port(const struct sockaddr* sockaddr, ip_addr_t* ipaddr, u16_t* port) +sockaddr_to_ipaddr_port(const struct sockaddr *sockaddr, ip_addr_t *ipaddr, u16_t *port) { if ((sockaddr->sa_family) == AF_INET6) { - SOCKADDR6_TO_IP6ADDR_PORT((const struct sockaddr_in6*)(const void*)(sockaddr), ipaddr, *port); + SOCKADDR6_TO_IP6ADDR_PORT((const struct sockaddr_in6 *)(const void *)(sockaddr), ipaddr, *port); ipaddr->type = IPADDR_TYPE_V6; } else { - SOCKADDR4_TO_IP4ADDR_PORT((const struct sockaddr_in*)(const void*)(sockaddr), ipaddr, *port); + SOCKADDR4_TO_IP4ADDR_PORT((const struct sockaddr_in *)(const void *)(sockaddr), ipaddr, *port); ipaddr->type = IPADDR_TYPE_V4; } } @@ -330,63 +319,174 @@ sockaddr_to_ipaddr_port(const struct sockaddr* sockaddr, ip_addr_t* ipaddr, u16_ void lwip_socket_thread_init(void) { - netconn_thread_init(); + netconn_thread_init(); } /** LWIP_NETCONN_SEM_PER_THREAD==1: destroy thread-local semaphore */ void lwip_socket_thread_cleanup(void) { - netconn_thread_cleanup(); + netconn_thread_cleanup(); } -/** - * Map a externally used socket index to the internal socket representation. - * - * @param s externally used socket index - * @return struct lwip_sock for the socket or NULL if not found - */ -static struct lwip_sock * -get_socket(int s) +#if LWIP_NETCONN_FULLDUPLEX +/* Thread-safe increment of sock->fd_used, with overflow check */ +static int +sock_inc_used(struct lwip_sock *sock) { - struct lwip_sock *sock; + int ret; + SYS_ARCH_DECL_PROTECT(lev); - s -= LWIP_SOCKET_OFFSET; + LWIP_ASSERT("sock != NULL", sock != NULL); + SYS_ARCH_PROTECT(lev); + if (sock->fd_free_pending) { + /* prevent new usage of this socket if free is pending */ + ret = 0; + } else { + ++sock->fd_used; + ret = 1; + LWIP_ASSERT("sock->fd_used != 0", sock->fd_used != 0); + } + SYS_ARCH_UNPROTECT(lev); + return ret; +} + +/* Like sock_inc_used(), but called under SYS_ARCH_PROTECT lock. */ +static int +sock_inc_used_locked(struct lwip_sock *sock) +{ + LWIP_ASSERT("sock != NULL", sock != NULL); + + if (sock->fd_free_pending) { + LWIP_ASSERT("sock->fd_used != 0", sock->fd_used != 0); + return 0; + } + + ++sock->fd_used; + LWIP_ASSERT("sock->fd_used != 0", sock->fd_used != 0); + return 1; +} + +/* In full-duplex mode,sock->fd_used != 0 prevents a socket descriptor from being + * released (and possibly reused) when used from more than one thread + * (e.g. read-while-write or close-while-write, etc) + * This function is called at the end of functions using (try)get_socket*(). + */ +static void +done_socket(struct lwip_sock *sock) +{ + int freed = 0; + int is_tcp = 0; + struct netconn *conn = NULL; + union lwip_sock_lastdata lastdata; + SYS_ARCH_DECL_PROTECT(lev); + LWIP_ASSERT("sock != NULL", sock != NULL); + + SYS_ARCH_PROTECT(lev); + LWIP_ASSERT("sock->fd_used > 0", sock->fd_used > 0); + if (--sock->fd_used == 0) { + if (sock->fd_free_pending) { + /* free the socket */ + sock->fd_used = 1; + is_tcp = sock->fd_free_pending & LWIP_SOCK_FD_FREE_TCP; + freed = free_socket_locked(sock, is_tcp, &conn, &lastdata); + } + } + SYS_ARCH_UNPROTECT(lev); + + if (freed) { + free_socket_free_elements(is_tcp, conn, &lastdata); + } +} + +#else /* LWIP_NETCONN_FULLDUPLEX */ +#define sock_inc_used(sock) 1 +#define sock_inc_used_locked(sock) 1 +#define done_socket(sock) +#endif /* LWIP_NETCONN_FULLDUPLEX */ + +/* Translate a socket 'int' into a pointer (only fails if the index is invalid) */ +static struct lwip_sock * +tryget_socket_unconn_nouse(int fd) +{ + int s = fd - LWIP_SOCKET_OFFSET; if ((s < 0) || (s >= NUM_SOCKETS)) { - LWIP_DEBUGF(SOCKETS_DEBUG, ("get_socket(%d): invalid\n", s + LWIP_SOCKET_OFFSET)); - set_errno(EBADF); + LWIP_DEBUGF(SOCKETS_DEBUG, ("tryget_socket_unconn(%d): invalid\n", fd)); return NULL; } + return &sockets[s]; +} - sock = &sockets[s]; +struct lwip_sock * +lwip_socket_dbg_get_socket(int fd) +{ + return tryget_socket_unconn_nouse(fd); +} - if (!sock->conn) { - LWIP_DEBUGF(SOCKETS_DEBUG, ("get_socket(%d): not active\n", s + LWIP_SOCKET_OFFSET)); - set_errno(EBADF); - return NULL; +/* Translate a socket 'int' into a pointer (only fails if the index is invalid) */ +static struct lwip_sock * +tryget_socket_unconn(int fd) +{ + struct lwip_sock *ret = tryget_socket_unconn_nouse(fd); + if (ret != NULL) { + if (!sock_inc_used(ret)) { + return NULL; + } } + return ret; +} - return sock; +/* Like tryget_socket_unconn(), but called under SYS_ARCH_PROTECT lock. */ +static struct lwip_sock * +tryget_socket_unconn_locked(int fd) +{ + struct lwip_sock *ret = tryget_socket_unconn_nouse(fd); + if (ret != NULL) { + if (!sock_inc_used_locked(ret)) { + return NULL; + } + } + return ret; } /** * Same as get_socket but doesn't set errno * - * @param s externally used socket index + * @param fd externally used socket index * @return struct lwip_sock for the socket or NULL if not found */ static struct lwip_sock * -tryget_socket(int s) +tryget_socket(int fd) { - s -= LWIP_SOCKET_OFFSET; - if ((s < 0) || (s >= NUM_SOCKETS)) { + struct lwip_sock *sock = tryget_socket_unconn(fd); + if (sock != NULL) { + if (sock->conn) { + return sock; + } + done_socket(sock); + } + return NULL; +} + +/** + * Map a externally used socket index to the internal socket representation. + * + * @param fd externally used socket index + * @return struct lwip_sock for the socket or NULL if not found + */ +static struct lwip_sock * +get_socket(int fd) +{ + struct lwip_sock *sock = tryget_socket(fd); + if (!sock) { + if ((fd < LWIP_SOCKET_OFFSET) || (fd >= (LWIP_SOCKET_OFFSET + NUM_SOCKETS))) { + LWIP_DEBUGF(SOCKETS_DEBUG, ("get_socket(%d): invalid\n", fd)); + } + set_errno(EBADF); return NULL; } - if (!sockets[s].conn) { - return NULL; - } - return &sockets[s]; + return sock; } /** @@ -402,24 +502,34 @@ alloc_socket(struct netconn *newconn, int accepted) { int i; SYS_ARCH_DECL_PROTECT(lev); + LWIP_UNUSED_ARG(accepted); /* allocate a new socket identifier */ for (i = 0; i < NUM_SOCKETS; ++i) { /* Protect socket array */ SYS_ARCH_PROTECT(lev); - if (!sockets[i].conn && (sockets[i].select_waiting == 0)) { + if (!sockets[i].conn) { +#if LWIP_NETCONN_FULLDUPLEX + if (sockets[i].fd_used) { + SYS_ARCH_UNPROTECT(lev); + continue; + } + sockets[i].fd_used = 1; + sockets[i].fd_free_pending = 0; +#endif sockets[i].conn = newconn; /* The socket is not yet known to anyone, so no need to protect after having marked it as used. */ SYS_ARCH_UNPROTECT(lev); - sockets[i].lastdata = NULL; - sockets[i].lastoffset = 0; + sockets[i].lastdata.pbuf = NULL; +#if LWIP_SOCKET_SELECT || LWIP_SOCKET_POLL + LWIP_ASSERT("sockets[i].select_waiting == 0", sockets[i].select_waiting == 0); sockets[i].rcvevent = 0; /* TCP sendbuf is empty, but the socket is not yet writable until connected * (unless it has been created by accept()). */ sockets[i].sendevent = (NETCONNTYPE_GROUP(newconn->type) == NETCONN_TCP ? (accepted != 0) : 1); sockets[i].errevent = 0; - sockets[i].err = 0; +#endif /* LWIP_SOCKET_SELECT || LWIP_SOCKET_POLL */ return i + LWIP_SOCKET_OFFSET; } SYS_ARCH_UNPROTECT(lev); @@ -427,6 +537,53 @@ alloc_socket(struct netconn *newconn, int accepted) return -1; } +/** Free a socket (under lock) + * + * @param sock the socket to free + * @param is_tcp != 0 for TCP sockets, used to free lastdata + * @param conn the socekt's netconn is stored here, must be freed externally + * @param lastdata lastdata is stored here, must be freed externally + */ +static int +free_socket_locked(struct lwip_sock *sock, int is_tcp, struct netconn **conn, + union lwip_sock_lastdata *lastdata) +{ +#if LWIP_NETCONN_FULLDUPLEX + LWIP_ASSERT("sock->fd_used > 0", sock->fd_used > 0); + sock->fd_used--; + if (sock->fd_used > 0) { + sock->fd_free_pending = LWIP_SOCK_FD_FREE_FREE | (is_tcp ? LWIP_SOCK_FD_FREE_TCP : 0); + return 0; + } +#else /* LWIP_NETCONN_FULLDUPLEX */ + LWIP_UNUSED_ARG(is_tcp); +#endif /* LWIP_NETCONN_FULLDUPLEX */ + + *lastdata = sock->lastdata; + sock->lastdata.pbuf = NULL; + *conn = sock->conn; + sock->conn = NULL; + return 1; +} + +/** Free a socket's leftover members. + */ +static void +free_socket_free_elements(int is_tcp, struct netconn *conn, union lwip_sock_lastdata *lastdata) +{ + if (lastdata->pbuf != NULL) { + if (is_tcp) { + pbuf_free(lastdata->pbuf); + } else { + netbuf_delete(lastdata->netbuf); + } + } + if (conn != NULL) { + /* netconn_prepare_delete() has already been called, here we only free the conn */ + netconn_delete(conn); + } +} + /** Free a socket. The socket's netconn must have been * delete before! * @@ -436,23 +593,20 @@ alloc_socket(struct netconn *newconn, int accepted) static void free_socket(struct lwip_sock *sock, int is_tcp) { - void *lastdata; - - lastdata = sock->lastdata; - sock->lastdata = NULL; - sock->lastoffset = 0; - sock->err = 0; + int freed; + struct netconn *conn; + union lwip_sock_lastdata lastdata; + SYS_ARCH_DECL_PROTECT(lev); /* Protect socket array */ - SYS_ARCH_SET(sock->conn, NULL); + SYS_ARCH_PROTECT(lev); + + freed = free_socket_locked(sock, is_tcp, &conn, &lastdata); + SYS_ARCH_UNPROTECT(lev); /* don't use 'sock' after this line, as another task might have allocated it */ - if (lastdata != NULL) { - if (is_tcp) { - pbuf_free((struct pbuf *)lastdata); - } else { - netbuf_delete((struct netbuf *)lastdata); - } + if (freed) { + free_socket_free_elements(is_tcp, conn, &lastdata); } } @@ -471,6 +625,7 @@ lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen) u16_t port = 0; int newsock; err_t err; + int recvevent; SYS_ARCH_DECL_PROTECT(lev); LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_accept(%d)...\n", s)); @@ -479,12 +634,6 @@ lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen) return -1; } - if (netconn_is_nonblocking(sock->conn) && (sock->rcvevent <= 0)) { - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_accept(%d): returning EWOULDBLOCK\n", s)); - set_errno(EWOULDBLOCK); - return -1; - } - /* wait for a new connection */ err = netconn_accept(sock->conn, &newconn); if (err != ERR_OK) { @@ -496,6 +645,7 @@ lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen) } else { sock_set_errno(sock, err_to_errno(err)); } + done_socket(sock); return -1; } LWIP_ASSERT("newconn != NULL", newconn != NULL); @@ -504,10 +654,10 @@ lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen) if (newsock == -1) { netconn_delete(newconn); sock_set_errno(sock, ENFILE); + done_socket(sock); return -1; } LWIP_ASSERT("invalid socket index", (newsock >= LWIP_SOCKET_OFFSET) && (newsock < NUM_SOCKETS + LWIP_SOCKET_OFFSET)); - LWIP_ASSERT("newconn->callback == event_callback", newconn->callback == event_callback); nsock = &sockets[newsock - LWIP_SOCKET_OFFSET]; /* See event_callback: If data comes in right away after an accept, even @@ -516,14 +666,23 @@ lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen) * so nsock->rcvevent is >= 1 here! */ SYS_ARCH_PROTECT(lev); - nsock->rcvevent += (s16_t)(-1 - newconn->socket); + recvevent = (s16_t)(-1 - newconn->socket); newconn->socket = newsock; SYS_ARCH_UNPROTECT(lev); + if (newconn->callback) { + LOCK_TCPIP_CORE(); + while (recvevent > 0) { + recvevent--; + newconn->callback(newconn, NETCONN_EVT_RCVPLUS, 0); + } + UNLOCK_TCPIP_CORE(); + } + /* Note that POSIX only requires us to check addr is non-NULL. addrlen must * not be NULL if addr is valid. */ - if (addr != NULL) { + if ((addr != NULL) && (addrlen != NULL)) { union sockaddr_aligned tempaddr; /* get the IP address and port of the remote host */ err = netconn_peer(newconn, &naddr, &port); @@ -532,9 +691,9 @@ lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen) netconn_delete(newconn); free_socket(nsock, 1); sock_set_errno(sock, err_to_errno(err)); + done_socket(sock); return -1; } - LWIP_ASSERT("addr valid but addrlen NULL", addrlen != NULL); IPADDR_PORT_TO_SOCKADDR(&tempaddr, &naddr, port); if (*addrlen > tempaddr.sa.sa_len) { @@ -550,6 +709,8 @@ lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen) } sock_set_errno(sock, 0); + done_socket(sock); + done_socket(nsock); return newsock; } @@ -569,13 +730,14 @@ lwip_bind(int s, const struct sockaddr *name, socklen_t namelen) if (!SOCK_ADDR_TYPE_MATCH(name, sock)) { /* sockaddr does not match socket type (IPv4/IPv6) */ sock_set_errno(sock, err_to_errno(ERR_VAL)); + done_socket(sock); return -1; } /* check size, family and alignment of 'name' */ LWIP_ERROR("lwip_bind: invalid address", (IS_SOCK_ADDR_LEN_VALID(namelen) && IS_SOCK_ADDR_TYPE_VALID(name) && IS_SOCK_ADDR_ALIGNED(name)), - sock_set_errno(sock, err_to_errno(ERR_ARG)); return -1;); + sock_set_errno(sock, err_to_errno(ERR_ARG)); done_socket(sock); return -1;); LWIP_UNUSED_ARG(namelen); SOCKADDR_TO_IPADDR_PORT(name, &local_addr, local_port); @@ -596,11 +758,13 @@ lwip_bind(int s, const struct sockaddr *name, socklen_t namelen) if (err != ERR_OK) { LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_bind(%d) failed, err=%d\n", s, err)); sock_set_errno(sock, err_to_errno(err)); + done_socket(sock); return -1; } LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_bind(%d) succeeded\n", s)); sock_set_errno(sock, 0); + done_socket(sock); return 0; } @@ -621,17 +785,22 @@ lwip_close(int s) if (sock->conn != NULL) { is_tcp = NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP; } else { - LWIP_ASSERT("sock->lastdata == NULL", sock->lastdata == NULL); + LWIP_ASSERT("sock->lastdata == NULL", sock->lastdata.pbuf == NULL); } #if LWIP_IGMP /* drop all possibly joined IGMP memberships */ lwip_socket_drop_registered_memberships(s); #endif /* LWIP_IGMP */ +#if LWIP_IPV6_MLD + /* drop all possibly joined MLD6 memberships */ + lwip_socket_drop_registered_mld6_memberships(s); +#endif /* LWIP_IPV6_MLD */ - err = netconn_delete(sock->conn); + err = netconn_prepare_delete(sock->conn); if (err != ERR_OK) { sock_set_errno(sock, err_to_errno(err)); + done_socket(sock); return -1; } @@ -654,6 +823,7 @@ lwip_connect(int s, const struct sockaddr *name, socklen_t namelen) if (!SOCK_ADDR_TYPE_MATCH_OR_UNSPEC(name, sock)) { /* sockaddr does not match socket type (IPv4/IPv6) */ sock_set_errno(sock, err_to_errno(ERR_VAL)); + done_socket(sock); return -1; } @@ -668,7 +838,7 @@ lwip_connect(int s, const struct sockaddr *name, socklen_t namelen) /* check size, family and alignment of 'name' */ LWIP_ERROR("lwip_connect: invalid address", IS_SOCK_ADDR_LEN_VALID(namelen) && IS_SOCK_ADDR_TYPE_VALID_OR_UNSPEC(name) && IS_SOCK_ADDR_ALIGNED(name), - sock_set_errno(sock, err_to_errno(ERR_ARG)); return -1;); + sock_set_errno(sock, err_to_errno(ERR_ARG)); done_socket(sock); return -1;); SOCKADDR_TO_IPADDR_PORT(name, &remote_addr, remote_port); LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_connect(%d, addr=", s)); @@ -689,11 +859,13 @@ lwip_connect(int s, const struct sockaddr *name, socklen_t namelen) if (err != ERR_OK) { LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_connect(%d) failed, err=%d\n", s, err)); sock_set_errno(sock, err_to_errno(err)); + done_socket(sock); return -1; } LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_connect(%d) succeeded\n", s)); sock_set_errno(sock, 0); + done_socket(sock); return 0; } @@ -727,76 +899,62 @@ lwip_listen(int s, int backlog) LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_listen(%d) failed, err=%d\n", s, err)); if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) { sock_set_errno(sock, EOPNOTSUPP); - return -1; + } else { + sock_set_errno(sock, err_to_errno(err)); } - sock_set_errno(sock, err_to_errno(err)); + done_socket(sock); return -1; } sock_set_errno(sock, 0); + done_socket(sock); return 0; } -int -lwip_recvfrom(int s, void *mem, size_t len, int flags, - struct sockaddr *from, socklen_t *fromlen) +#if LWIP_TCP +/* Helper function to loop over receiving pbufs from netconn + * until "len" bytes are received or we're otherwise done. + * Keeps sock->lastdata for peeking or partly copying. + */ +static ssize_t +lwip_recv_tcp(struct lwip_sock *sock, void *mem, size_t len, int flags) { - struct lwip_sock *sock; - void *buf = NULL; - struct pbuf *p; - u16_t buflen, copylen; - int off = 0; - u8_t done = 0; - err_t err; + u8_t apiflags = NETCONN_NOAUTORCVD; + ssize_t recvd = 0; + ssize_t recv_left = (len <= SSIZE_MAX) ? (ssize_t)len : SSIZE_MAX; - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom(%d, %p, %"SZT_F", 0x%x, ..)\n", s, mem, len, flags)); - sock = get_socket(s); - if (!sock) { - return -1; + LWIP_ASSERT("no socket given", sock != NULL); + LWIP_ASSERT("this should be checked internally", NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP); + + if (flags & MSG_DONTWAIT) { + apiflags |= NETCONN_DONTBLOCK; } do { - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: top while sock->lastdata=%p\n", sock->lastdata)); - /* Check if there is data left from the last recv operation. */ - if (sock->lastdata) { - buf = sock->lastdata; - } else { - /* If this is non-blocking call, then check first */ - if (((flags & MSG_DONTWAIT) || netconn_is_nonblocking(sock->conn)) && - (sock->rcvevent <= 0)) { - if (off > 0) { - /* already received data, return that */ - sock_set_errno(sock, 0); - return off; - } - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom(%d): returning EWOULDBLOCK\n", s)); - set_errno(EWOULDBLOCK); - return -1; - } + struct pbuf *p; + err_t err; + u16_t copylen; + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recv_tcp: top while sock->lastdata=%p\n", (void *)sock->lastdata.pbuf)); + /* Check if there is data left from the last recv operation. */ + if (sock->lastdata.pbuf) { + p = sock->lastdata.pbuf; + } else { /* No data was left from the previous operation, so we try to get some from the network. */ - if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { - err = netconn_recv_tcp_pbuf(sock->conn, (struct pbuf **)&buf); - } else { - err = netconn_recv(sock->conn, (struct netbuf **)&buf); - } - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: netconn_recv err=%d, netbuf=%p\n", - err, buf)); + err = netconn_recv_tcp_pbuf_flags(sock->conn, &p, apiflags); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recv_tcp: netconn_recv err=%d, pbuf=%p\n", + err, (void *)p)); if (err != ERR_OK) { - if (off > 0) { - if (err == ERR_CLSD) { - /* closed but already received data, ensure select gets the FIN, too */ - event_callback(sock->conn, NETCONN_EVT_RCVPLUS, 0); - } - /* already received data, return that */ - sock_set_errno(sock, 0); - return off; + if (recvd > 0) { + /* already received data, return that (this trusts in getting the same error from + netconn layer again next time netconn_recv is called) */ + goto lwip_recv_tcp_done; } /* We should really do some error checking here. */ - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom(%d): buf == NULL, error is \"%s\"!\n", - s, lwip_strerr(err))); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recv_tcp: p == NULL, error is \"%s\"!\n", + lwip_strerr(err))); sock_set_errno(sock, err_to_errno(err)); if (err == ERR_CLSD) { return 0; @@ -804,128 +962,423 @@ lwip_recvfrom(int s, void *mem, size_t len, int flags, return -1; } } - LWIP_ASSERT("buf != NULL", buf != NULL); - sock->lastdata = buf; + LWIP_ASSERT("p != NULL", p != NULL); + sock->lastdata.pbuf = p; } - if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { - p = (struct pbuf *)buf; + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recv_tcp: buflen=%"U16_F" recv_left=%d off=%d\n", + p->tot_len, (int)recv_left, (int)recvd)); + + if (recv_left > p->tot_len) { + copylen = p->tot_len; } else { - p = ((struct netbuf *)buf)->p; + copylen = (u16_t)recv_left; } - buflen = p->tot_len; - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: buflen=%"U16_F" len=%"SZT_F" off=%d sock->lastoffset=%"U16_F"\n", - buflen, len, off, sock->lastoffset)); - - buflen -= sock->lastoffset; - - if (len > buflen) { - copylen = buflen; - } else { - copylen = (u16_t)len; + if (recvd + copylen < recvd) { + /* overflow */ + copylen = (u16_t)(SSIZE_MAX - recvd); } /* copy the contents of the received buffer into the supplied memory pointer mem */ - pbuf_copy_partial(p, (u8_t*)mem + off, copylen, sock->lastoffset); + pbuf_copy_partial(p, (u8_t *)mem + recvd, copylen, 0); - off += copylen; + recvd += copylen; - if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { - LWIP_ASSERT("invalid copylen, len would underflow", len >= copylen); - len -= copylen; - if ((len <= 0) || - (p->flags & PBUF_FLAG_PUSH) || - (sock->rcvevent <= 0) || - ((flags & MSG_PEEK) != 0)) { - done = 1; + /* TCP combines multiple pbufs for one recv */ + LWIP_ASSERT("invalid copylen, len would underflow", recv_left >= copylen); + recv_left -= copylen; + + /* Unless we peek the incoming message... */ + if ((flags & MSG_PEEK) == 0) { + /* ... check if there is data left in the pbuf */ + LWIP_ASSERT("invalid copylen", p->tot_len >= copylen); + if (p->tot_len - copylen > 0) { + /* If so, it should be saved in the sock structure for the next recv call. + We store the pbuf but hide/free the consumed data: */ + sock->lastdata.pbuf = pbuf_free_header(p, copylen); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recv_tcp: lastdata now pbuf=%p\n", (void *)sock->lastdata.pbuf)); + } else { + sock->lastdata.pbuf = NULL; + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recv_tcp: deleting pbuf=%p\n", (void *)p)); + pbuf_free(p); } - } else { - done = 1; } + /* once we have some data to return, only add more if we don't need to wait */ + apiflags |= NETCONN_DONTBLOCK | NETCONN_NOFIN; + /* @todo: do we need to support peeking more than one pbuf? */ + } while ((recv_left > 0) && !(flags & MSG_PEEK)); +lwip_recv_tcp_done: + if ((recvd > 0) && !(flags & MSG_PEEK)) { + /* ensure window update after copying all data */ + netconn_tcp_recvd(sock->conn, (size_t)recvd); + } + sock_set_errno(sock, 0); + return recvd; +} +#endif - /* Check to see from where the data was.*/ - if (done) { -#if !SOCKETS_DEBUG - if (from && fromlen) -#endif /* !SOCKETS_DEBUG */ - { - u16_t port; - ip_addr_t tmpaddr; - ip_addr_t *fromaddr; - union sockaddr_aligned saddr; - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom(%d): addr=", s)); - if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { - fromaddr = &tmpaddr; - netconn_getaddr(sock->conn, fromaddr, &port, 0); - } else { - port = netbuf_fromport((struct netbuf *)buf); - fromaddr = netbuf_fromaddr((struct netbuf *)buf); - } +/* Convert a netbuf's address data to struct sockaddr */ +static int +lwip_sock_make_addr(struct netconn *conn, ip_addr_t *fromaddr, u16_t port, + struct sockaddr *from, socklen_t *fromlen) +{ + int truncated = 0; + union sockaddr_aligned saddr; + + LWIP_UNUSED_ARG(conn); + + LWIP_ASSERT("fromaddr != NULL", fromaddr != NULL); + LWIP_ASSERT("from != NULL", from != NULL); + LWIP_ASSERT("fromlen != NULL", fromlen != NULL); #if LWIP_IPV4 && LWIP_IPV6 - /* Dual-stack: Map IPv4 addresses to IPv4 mapped IPv6 */ - if (NETCONNTYPE_ISIPV6(netconn_type(sock->conn)) && IP_IS_V4(fromaddr)) { - ip4_2_ipv4_mapped_ipv6(ip_2_ip6(fromaddr), ip_2_ip4(fromaddr)); - IP_SET_TYPE(fromaddr, IPADDR_TYPE_V6); - } + /* Dual-stack: Map IPv4 addresses to IPv4 mapped IPv6 */ + if (NETCONNTYPE_ISIPV6(netconn_type(conn)) && IP_IS_V4(fromaddr)) { + ip4_2_ipv4_mapped_ipv6(ip_2_ip6(fromaddr), ip_2_ip4(fromaddr)); + IP_SET_TYPE(fromaddr, IPADDR_TYPE_V6); + } #endif /* LWIP_IPV4 && LWIP_IPV6 */ - IPADDR_PORT_TO_SOCKADDR(&saddr, fromaddr, port); - ip_addr_debug_print(SOCKETS_DEBUG, fromaddr); - LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%"U16_F" len=%d\n", port, off)); -#if SOCKETS_DEBUG - if (from && fromlen) -#endif /* SOCKETS_DEBUG */ - { - if (*fromlen > saddr.sa.sa_len) { - *fromlen = saddr.sa.sa_len; - } - MEMCPY(from, &saddr, *fromlen); - } - } - } - - /* If we don't peek the incoming message... */ - if ((flags & MSG_PEEK) == 0) { - /* If this is a TCP socket, check if there is data left in the - buffer. If so, it should be saved in the sock structure for next - time around. */ - if ((NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) && (buflen - copylen > 0)) { - sock->lastdata = buf; - sock->lastoffset += copylen; - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: lastdata now netbuf=%p\n", buf)); - } else { - sock->lastdata = NULL; - sock->lastoffset = 0; - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: deleting netbuf=%p\n", buf)); - if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { - pbuf_free((struct pbuf *)buf); - } else { - netbuf_delete((struct netbuf *)buf); - } - buf = NULL; - } - } - } while (!done); - - sock_set_errno(sock, 0); - return off; + IPADDR_PORT_TO_SOCKADDR(&saddr, fromaddr, port); + if (*fromlen < saddr.sa.sa_len) { + truncated = 1; + } else if (*fromlen > saddr.sa.sa_len) { + *fromlen = saddr.sa.sa_len; + } + MEMCPY(from, &saddr, *fromlen); + return truncated; } -int +#if LWIP_TCP +/* Helper function to get a tcp socket's remote address info */ +static int +lwip_recv_tcp_from(struct lwip_sock *sock, struct sockaddr *from, socklen_t *fromlen, const char *dbg_fn, int dbg_s, ssize_t dbg_ret) +{ + if (sock == NULL) { + return 0; + } + LWIP_UNUSED_ARG(dbg_fn); + LWIP_UNUSED_ARG(dbg_s); + LWIP_UNUSED_ARG(dbg_ret); + +#if !SOCKETS_DEBUG + if (from && fromlen) +#endif /* !SOCKETS_DEBUG */ + { + /* get remote addr/port from tcp_pcb */ + u16_t port; + ip_addr_t tmpaddr; + netconn_getaddr(sock->conn, &tmpaddr, &port, 0); + LWIP_DEBUGF(SOCKETS_DEBUG, ("%s(%d): addr=", dbg_fn, dbg_s)); + ip_addr_debug_print_val(SOCKETS_DEBUG, tmpaddr); + LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%"U16_F" len=%d\n", port, (int)dbg_ret)); + if (from && fromlen) { + return lwip_sock_make_addr(sock->conn, &tmpaddr, port, from, fromlen); + } + } + return 0; +} +#endif + +/* Helper function to receive a netbuf from a udp or raw netconn. + * Keeps sock->lastdata for peeking. + */ +static err_t +lwip_recvfrom_udp_raw(struct lwip_sock *sock, int flags, struct msghdr *msg, u16_t *datagram_len, int dbg_s) +{ + struct netbuf *buf; + u8_t apiflags; + err_t err; + u16_t buflen, copylen, copied; + int i; + + LWIP_UNUSED_ARG(dbg_s); + LWIP_ERROR("lwip_recvfrom_udp_raw: invalid arguments", (msg->msg_iov != NULL) || (msg->msg_iovlen <= 0), return ERR_ARG;); + + if (flags & MSG_DONTWAIT) { + apiflags = NETCONN_DONTBLOCK; + } else { + apiflags = 0; + } + + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom_udp_raw[UDP/RAW]: top sock->lastdata=%p\n", (void *)sock->lastdata.netbuf)); + /* Check if there is data left from the last recv operation. */ + buf = sock->lastdata.netbuf; + if (buf == NULL) { + /* No data was left from the previous operation, so we try to get + some from the network. */ + err = netconn_recv_udp_raw_netbuf_flags(sock->conn, &buf, apiflags); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom_udp_raw[UDP/RAW]: netconn_recv err=%d, netbuf=%p\n", + err, (void *)buf)); + + if (err != ERR_OK) { + return err; + } + LWIP_ASSERT("buf != NULL", buf != NULL); + sock->lastdata.netbuf = buf; + } + buflen = buf->p->tot_len; + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom_udp_raw: buflen=%"U16_F"\n", buflen)); + + copied = 0; + /* copy the pbuf payload into the iovs */ + for (i = 0; (i < msg->msg_iovlen) && (copied < buflen); i++) { + u16_t len_left = (u16_t)(buflen - copied); + if (msg->msg_iov[i].iov_len > len_left) { + copylen = len_left; + } else { + copylen = (u16_t)msg->msg_iov[i].iov_len; + } + + /* copy the contents of the received buffer into + the supplied memory buffer */ + pbuf_copy_partial(buf->p, (u8_t *)msg->msg_iov[i].iov_base, copylen, copied); + copied = (u16_t)(copied + copylen); + } + + /* Check to see from where the data was.*/ +#if !SOCKETS_DEBUG + if (msg->msg_name && msg->msg_namelen) +#endif /* !SOCKETS_DEBUG */ + { + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom_udp_raw(%d): addr=", dbg_s)); + ip_addr_debug_print_val(SOCKETS_DEBUG, *netbuf_fromaddr(buf)); + LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%"U16_F" len=%d\n", netbuf_fromport(buf), copied)); + if (msg->msg_name && msg->msg_namelen) { + lwip_sock_make_addr(sock->conn, netbuf_fromaddr(buf), netbuf_fromport(buf), + (struct sockaddr *)msg->msg_name, &msg->msg_namelen); + } + } + + /* Initialize flag output */ + msg->msg_flags = 0; + + if (msg->msg_control) { + u8_t wrote_msg = 0; +#if LWIP_NETBUF_RECVINFO + /* Check if packet info was recorded */ + if (buf->flags & NETBUF_FLAG_DESTADDR) { + if (IP_IS_V4(&buf->toaddr)) { +#if LWIP_IPV4 + if (msg->msg_controllen >= CMSG_SPACE(sizeof(struct in_pktinfo))) { + struct cmsghdr *chdr = CMSG_FIRSTHDR(msg); /* This will always return a header!! */ + struct in_pktinfo *pkti = (struct in_pktinfo *)CMSG_DATA(chdr); + chdr->cmsg_level = IPPROTO_IP; + chdr->cmsg_type = IP_PKTINFO; + chdr->cmsg_len = CMSG_LEN(sizeof(struct in_pktinfo)); + pkti->ipi_ifindex = buf->p->if_idx; + inet_addr_from_ip4addr(&pkti->ipi_addr, ip_2_ip4(netbuf_destaddr(buf))); + msg->msg_controllen = CMSG_SPACE(sizeof(struct in_pktinfo)); + wrote_msg = 1; + } else { + msg->msg_flags |= MSG_CTRUNC; + } +#endif /* LWIP_IPV4 */ + } + } +#endif /* LWIP_NETBUF_RECVINFO */ + + if (!wrote_msg) { + msg->msg_controllen = 0; + } + } + + /* If we don't peek the incoming message: zero lastdata pointer and free the netbuf */ + if ((flags & MSG_PEEK) == 0) { + sock->lastdata.netbuf = NULL; + netbuf_delete(buf); + } + if (datagram_len) { + *datagram_len = buflen; + } + return ERR_OK; +} + +ssize_t +lwip_recvfrom(int s, void *mem, size_t len, int flags, + struct sockaddr *from, socklen_t *fromlen) +{ + struct lwip_sock *sock; + ssize_t ret; + + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom(%d, %p, %"SZT_F", 0x%x, ..)\n", s, mem, len, flags)); + sock = get_socket(s); + if (!sock) { + return -1; + } +#if LWIP_TCP + if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { + ret = lwip_recv_tcp(sock, mem, len, flags); + lwip_recv_tcp_from(sock, from, fromlen, "lwip_recvfrom", s, ret); + done_socket(sock); + return ret; + } else +#endif + { + u16_t datagram_len = 0; + struct iovec vec; + struct msghdr msg; + err_t err; + vec.iov_base = mem; + vec.iov_len = len; + msg.msg_control = NULL; + msg.msg_controllen = 0; + msg.msg_flags = 0; + msg.msg_iov = &vec; + msg.msg_iovlen = 1; + msg.msg_name = from; + msg.msg_namelen = (fromlen ? *fromlen : 0); + err = lwip_recvfrom_udp_raw(sock, flags, &msg, &datagram_len, s); + if (err != ERR_OK) { + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom[UDP/RAW](%d): buf == NULL, error is \"%s\"!\n", + s, lwip_strerr(err))); + sock_set_errno(sock, err_to_errno(err)); + done_socket(sock); + return -1; + } + ret = (ssize_t)LWIP_MIN(LWIP_MIN(len, datagram_len), SSIZE_MAX); + if (fromlen) { + *fromlen = msg.msg_namelen; + } + } + + sock_set_errno(sock, 0); + done_socket(sock); + return ret; +} + +ssize_t lwip_read(int s, void *mem, size_t len) { return lwip_recvfrom(s, mem, len, 0, NULL, NULL); } -int +ssize_t +lwip_readv(int s, const struct iovec *iov, int iovcnt) +{ + struct msghdr msg; + + msg.msg_name = NULL; + msg.msg_namelen = 0; + /* Hack: we have to cast via number to cast from 'const' pointer to non-const. + Blame the opengroup standard for this inconsistency. */ + msg.msg_iov = LWIP_CONST_CAST(struct iovec *, iov); + msg.msg_iovlen = iovcnt; + msg.msg_control = NULL; + msg.msg_controllen = 0; + msg.msg_flags = 0; + return lwip_recvmsg(s, &msg, 0); +} + +ssize_t lwip_recv(int s, void *mem, size_t len, int flags) { return lwip_recvfrom(s, mem, len, flags, NULL, NULL); } -int +ssize_t +lwip_recvmsg(int s, struct msghdr *message, int flags) +{ + struct lwip_sock *sock; + int i; + ssize_t buflen; + + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvmsg(%d, message=%p, flags=0x%x)\n", s, (void *)message, flags)); + LWIP_ERROR("lwip_recvmsg: invalid message pointer", message != NULL, return ERR_ARG;); + LWIP_ERROR("lwip_recvmsg: unsupported flags", (flags & ~(MSG_PEEK|MSG_DONTWAIT)) == 0, + set_errno(EOPNOTSUPP); return -1;); + + if ((message->msg_iovlen <= 0) || (message->msg_iovlen > IOV_MAX)) { + set_errno(EMSGSIZE); + return -1; + } + + sock = get_socket(s); + if (!sock) { + return -1; + } + + /* check for valid vectors */ + buflen = 0; + for (i = 0; i < message->msg_iovlen; i++) { + if ((message->msg_iov[i].iov_base == NULL) || ((ssize_t)message->msg_iov[i].iov_len <= 0) || + ((size_t)(ssize_t)message->msg_iov[i].iov_len != message->msg_iov[i].iov_len) || + ((ssize_t)(buflen + (ssize_t)message->msg_iov[i].iov_len) <= 0)) { + sock_set_errno(sock, err_to_errno(ERR_VAL)); + done_socket(sock); + return -1; + } + buflen = (ssize_t)(buflen + (ssize_t)message->msg_iov[i].iov_len); + } + + if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { +#if LWIP_TCP + int recv_flags = flags; + message->msg_flags = 0; + /* recv the data */ + buflen = 0; + for (i = 0; i < message->msg_iovlen; i++) { + /* try to receive into this vector's buffer */ + ssize_t recvd_local = lwip_recv_tcp(sock, message->msg_iov[i].iov_base, message->msg_iov[i].iov_len, recv_flags); + if (recvd_local > 0) { + /* sum up received bytes */ + buflen += recvd_local; + } + if ((recvd_local < 0) || (recvd_local < (int)message->msg_iov[i].iov_len) || + (flags & MSG_PEEK)) { + /* returned prematurely (or peeking, which might actually be limitated to the first iov) */ + if (buflen <= 0) { + /* nothing received at all, propagate the error */ + buflen = recvd_local; + } + break; + } + /* pass MSG_DONTWAIT to lwip_recv_tcp() to prevent waiting for more data */ + recv_flags |= MSG_DONTWAIT; + } + if (buflen > 0) { + /* reset socket error since we have received something */ + sock_set_errno(sock, 0); + } + /* " If the socket is connected, the msg_name and msg_namelen members shall be ignored." */ + done_socket(sock); + return buflen; +#else /* LWIP_TCP */ + sock_set_errno(sock, err_to_errno(ERR_ARG)); + done_socket(sock); + return -1; +#endif /* LWIP_TCP */ + } + /* else, UDP and RAW NETCONNs */ +#if LWIP_UDP || LWIP_RAW + { + u16_t datagram_len = 0; + err_t err; + err = lwip_recvfrom_udp_raw(sock, flags, message, &datagram_len, s); + if (err != ERR_OK) { + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvmsg[UDP/RAW](%d): buf == NULL, error is \"%s\"!\n", + s, lwip_strerr(err))); + sock_set_errno(sock, err_to_errno(err)); + done_socket(sock); + return -1; + } + if (datagram_len > buflen) { + message->msg_flags |= MSG_TRUNC; + } + + sock_set_errno(sock, 0); + done_socket(sock); + return (int)datagram_len; + } +#else /* LWIP_UDP || LWIP_RAW */ + sock_set_errno(sock, err_to_errno(ERR_ARG)); + done_socket(sock); + return -1; +#endif /* LWIP_UDP || LWIP_RAW */ +} + +ssize_t lwip_send(int s, const void *data, size_t size, int flags) { struct lwip_sock *sock; @@ -943,34 +1396,36 @@ lwip_send(int s, const void *data, size_t size, int flags) if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) { #if (LWIP_UDP || LWIP_RAW) + done_socket(sock); return lwip_sendto(s, data, size, flags, NULL, 0); #else /* (LWIP_UDP || LWIP_RAW) */ sock_set_errno(sock, err_to_errno(ERR_ARG)); + done_socket(sock); return -1; #endif /* (LWIP_UDP || LWIP_RAW) */ } - write_flags = NETCONN_COPY | - ((flags & MSG_MORE) ? NETCONN_MORE : 0) | - ((flags & MSG_DONTWAIT) ? NETCONN_DONTBLOCK : 0); + write_flags = (u8_t)(NETCONN_COPY | + ((flags & MSG_MORE) ? NETCONN_MORE : 0) | + ((flags & MSG_DONTWAIT) ? NETCONN_DONTBLOCK : 0)); written = 0; err = netconn_write_partly(sock->conn, data, size, write_flags, &written); LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_send(%d) err=%d written=%"SZT_F"\n", s, err, written)); sock_set_errno(sock, err_to_errno(err)); - return (err == ERR_OK ? (int)written : -1); + done_socket(sock); + /* casting 'written' to ssize_t is OK here since the netconn API limits it to SSIZE_MAX */ + return (err == ERR_OK ? (ssize_t)written : -1); } -int +ssize_t lwip_sendmsg(int s, const struct msghdr *msg, int flags) { struct lwip_sock *sock; - int i; #if LWIP_TCP u8_t write_flags; size_t written; #endif - int size = 0; err_t err = ERR_OK; sock = get_socket(s); @@ -979,90 +1434,82 @@ lwip_sendmsg(int s, const struct msghdr *msg, int flags) } LWIP_ERROR("lwip_sendmsg: invalid msghdr", msg != NULL, - sock_set_errno(sock, err_to_errno(ERR_ARG)); return -1;); + sock_set_errno(sock, err_to_errno(ERR_ARG)); done_socket(sock); return -1;); + LWIP_ERROR("lwip_sendmsg: invalid msghdr iov", msg->msg_iov != NULL, + sock_set_errno(sock, err_to_errno(ERR_ARG)); done_socket(sock); return -1;); + LWIP_ERROR("lwip_sendmsg: maximum iovs exceeded", (msg->msg_iovlen > 0) && (msg->msg_iovlen <= IOV_MAX), + sock_set_errno(sock, EMSGSIZE); done_socket(sock); return -1;); + LWIP_ERROR("lwip_sendmsg: unsupported flags", (flags & ~(MSG_DONTWAIT | MSG_MORE)) == 0, + sock_set_errno(sock, EOPNOTSUPP); done_socket(sock); return -1;); LWIP_UNUSED_ARG(msg->msg_control); LWIP_UNUSED_ARG(msg->msg_controllen); LWIP_UNUSED_ARG(msg->msg_flags); - LWIP_ERROR("lwip_sendmsg: invalid msghdr iov", (msg->msg_iov != NULL && msg->msg_iovlen != 0), - sock_set_errno(sock, err_to_errno(ERR_ARG)); return -1;); if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { #if LWIP_TCP - write_flags = NETCONN_COPY | - ((flags & MSG_MORE) ? NETCONN_MORE : 0) | - ((flags & MSG_DONTWAIT) ? NETCONN_DONTBLOCK : 0); + write_flags = (u8_t)(NETCONN_COPY | + ((flags & MSG_MORE) ? NETCONN_MORE : 0) | + ((flags & MSG_DONTWAIT) ? NETCONN_DONTBLOCK : 0)); - for (i = 0; i < msg->msg_iovlen; i++) { - u8_t apiflags = write_flags; - if (i + 1 < msg->msg_iovlen) { - apiflags |= NETCONN_MORE; - } - written = 0; - err = netconn_write_partly(sock->conn, msg->msg_iov[i].iov_base, msg->msg_iov[i].iov_len, write_flags, &written); - if (err == ERR_OK) { - size += written; - /* check that the entire IO vector was accepected, if not return a partial write */ - if (written != msg->msg_iov[i].iov_len) - break; - } - /* none of this IO vector was accepted, but previous was, return partial write and conceal ERR_WOULDBLOCK */ - else if (err == ERR_WOULDBLOCK && size > 0) { - err = ERR_OK; - /* let ERR_WOULDBLOCK persist on the netconn since we are returning ERR_OK */ - break; - } else { - size = -1; - break; - } - } + written = 0; + err = netconn_write_vectors_partly(sock->conn, (struct netvector *)msg->msg_iov, (u16_t)msg->msg_iovlen, write_flags, &written); sock_set_errno(sock, err_to_errno(err)); - return size; + done_socket(sock); + /* casting 'written' to ssize_t is OK here since the netconn API limits it to SSIZE_MAX */ + return (err == ERR_OK ? (ssize_t)written : -1); #else /* LWIP_TCP */ sock_set_errno(sock, err_to_errno(ERR_ARG)); + done_socket(sock); return -1; #endif /* LWIP_TCP */ } /* else, UDP and RAW NETCONNs */ #if LWIP_UDP || LWIP_RAW { - struct netbuf *chain_buf; + struct netbuf chain_buf; + int i; + ssize_t size = 0; LWIP_UNUSED_ARG(flags); LWIP_ERROR("lwip_sendmsg: invalid msghdr name", (((msg->msg_name == NULL) && (msg->msg_namelen == 0)) || - IS_SOCK_ADDR_LEN_VALID(msg->msg_namelen)) , - sock_set_errno(sock, err_to_errno(ERR_ARG)); return -1;); + IS_SOCK_ADDR_LEN_VALID(msg->msg_namelen)), + sock_set_errno(sock, err_to_errno(ERR_ARG)); done_socket(sock); return -1;); /* initialize chain buffer with destination */ - chain_buf = netbuf_new(); - if (!chain_buf) { - sock_set_errno(sock, err_to_errno(ERR_MEM)); - return -1; - } + memset(&chain_buf, 0, sizeof(struct netbuf)); if (msg->msg_name) { u16_t remote_port; - SOCKADDR_TO_IPADDR_PORT((const struct sockaddr *)msg->msg_name, &chain_buf->addr, remote_port); - netbuf_fromport(chain_buf) = remote_port; + SOCKADDR_TO_IPADDR_PORT((const struct sockaddr *)msg->msg_name, &chain_buf.addr, remote_port); + netbuf_fromport(&chain_buf) = remote_port; } #if LWIP_NETIF_TX_SINGLE_PBUF for (i = 0; i < msg->msg_iovlen; i++) { size += msg->msg_iov[i].iov_len; + if ((msg->msg_iov[i].iov_len > INT_MAX) || (size < (int)msg->msg_iov[i].iov_len)) { + /* overflow */ + goto sendmsg_emsgsize; + } + } + if (size > 0xFFFF) { + /* overflow */ + goto sendmsg_emsgsize; } /* Allocate a new netbuf and copy the data into it. */ - if (netbuf_alloc(chain_buf, (u16_t)size) == NULL) { - err = ERR_MEM; + if (netbuf_alloc(&chain_buf, (u16_t)size) == NULL) { + err = ERR_MEM; } else { /* flatten the IO vectors */ size_t offset = 0; for (i = 0; i < msg->msg_iovlen; i++) { - MEMCPY(&((u8_t*)chain_buf->p->payload)[offset], msg->msg_iov[i].iov_base, msg->msg_iov[i].iov_len); + MEMCPY(&((u8_t *)chain_buf.p->payload)[offset], msg->msg_iov[i].iov_base, msg->msg_iov[i].iov_len); offset += msg->msg_iov[i].iov_len; } #if LWIP_CHECKSUM_ON_COPY { /* This can be improved by using LWIP_CHKSUM_COPY() and aggregating the checksum for each IO vector */ - u16_t chksum = ~inet_chksum_pbuf(chain_buf->p); - netbuf_set_chksum(chain_buf, chksum); + u16_t chksum = ~inet_chksum_pbuf(chain_buf.p); + netbuf_set_chksum(&chain_buf, chksum); } #endif /* LWIP_CHECKSUM_ON_COPY */ err = ERR_OK; @@ -1071,56 +1518,72 @@ lwip_sendmsg(int s, const struct msghdr *msg, int flags) /* create a chained netbuf from the IO vectors. NOTE: we assemble a pbuf chain manually to avoid having to allocate, chain, and delete a netbuf for each iov */ for (i = 0; i < msg->msg_iovlen; i++) { - struct pbuf *p = pbuf_alloc(PBUF_TRANSPORT, 0, PBUF_REF); + struct pbuf *p; + if (msg->msg_iov[i].iov_len > 0xFFFF) { + /* overflow */ + goto sendmsg_emsgsize; + } + p = pbuf_alloc(PBUF_TRANSPORT, 0, PBUF_REF); if (p == NULL) { err = ERR_MEM; /* let netbuf_delete() cleanup chain_buf */ break; } p->payload = msg->msg_iov[i].iov_base; - LWIP_ASSERT("iov_len < u16_t", msg->msg_iov[i].iov_len <= 0xFFFF); p->len = p->tot_len = (u16_t)msg->msg_iov[i].iov_len; /* netbuf empty, add new pbuf */ - if (chain_buf->p == NULL) { - chain_buf->p = chain_buf->ptr = p; + if (chain_buf.p == NULL) { + chain_buf.p = chain_buf.ptr = p; /* add pbuf to existing pbuf chain */ } else { - pbuf_cat(chain_buf->p, p); + if (chain_buf.p->tot_len + p->len > 0xffff) { + /* overflow */ + pbuf_free(p); + goto sendmsg_emsgsize; + } + pbuf_cat(chain_buf.p, p); } } /* save size of total chain */ if (err == ERR_OK) { - size = netbuf_len(chain_buf); + size = netbuf_len(&chain_buf); } #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ if (err == ERR_OK) { #if LWIP_IPV4 && LWIP_IPV6 /* Dual-stack: Unmap IPv4 mapped IPv6 addresses */ - if (IP_IS_V6_VAL(chain_buf->addr) && ip6_addr_isipv4mappedipv6(ip_2_ip6(&chain_buf->addr))) { - unmap_ipv4_mapped_ipv6(ip_2_ip4(&chain_buf->addr), ip_2_ip6(&chain_buf->addr)); - IP_SET_TYPE_VAL(chain_buf->addr, IPADDR_TYPE_V4); + if (IP_IS_V6_VAL(chain_buf.addr) && ip6_addr_isipv4mappedipv6(ip_2_ip6(&chain_buf.addr))) { + unmap_ipv4_mapped_ipv6(ip_2_ip4(&chain_buf.addr), ip_2_ip6(&chain_buf.addr)); + IP_SET_TYPE_VAL(chain_buf.addr, IPADDR_TYPE_V4); } #endif /* LWIP_IPV4 && LWIP_IPV6 */ /* send the data */ - err = netconn_send(sock->conn, chain_buf); + err = netconn_send(sock->conn, &chain_buf); } /* deallocated the buffer */ - netbuf_delete(chain_buf); + netbuf_free(&chain_buf); sock_set_errno(sock, err_to_errno(err)); + done_socket(sock); return (err == ERR_OK ? size : -1); +sendmsg_emsgsize: + sock_set_errno(sock, EMSGSIZE); + netbuf_free(&chain_buf); + done_socket(sock); + return -1; } #else /* LWIP_UDP || LWIP_RAW */ sock_set_errno(sock, err_to_errno(ERR_ARG)); + done_socket(sock); return -1; #endif /* LWIP_UDP || LWIP_RAW */ } -int +ssize_t lwip_sendto(int s, const void *data, size_t size, int flags, - const struct sockaddr *to, socklen_t tolen) + const struct sockaddr *to, socklen_t tolen) { struct lwip_sock *sock; err_t err; @@ -1135,21 +1598,27 @@ lwip_sendto(int s, const void *data, size_t size, int flags, if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { #if LWIP_TCP + done_socket(sock); return lwip_send(s, data, size, flags); #else /* LWIP_TCP */ LWIP_UNUSED_ARG(flags); sock_set_errno(sock, err_to_errno(ERR_ARG)); + done_socket(sock); return -1; #endif /* LWIP_TCP */ } - /* @todo: split into multiple sendto's? */ - LWIP_ASSERT("lwip_sendto: size must fit in u16_t", size <= 0xffff); + if (size > LWIP_MIN(0xFFFF, SSIZE_MAX)) { + /* cannot fit into one datagram (at least for us) */ + sock_set_errno(sock, EMSGSIZE); + done_socket(sock); + return -1; + } short_size = (u16_t)size; LWIP_ERROR("lwip_sendto: invalid address", (((to == NULL) && (tolen == 0)) || (IS_SOCK_ADDR_LEN_VALID(tolen) && - IS_SOCK_ADDR_TYPE_VALID(to) && IS_SOCK_ADDR_ALIGNED(to))), - sock_set_errno(sock, err_to_errno(ERR_ARG)); return -1;); + ((to != NULL) && (IS_SOCK_ADDR_TYPE_VALID(to) && IS_SOCK_ADDR_ALIGNED(to))))), + sock_set_errno(sock, err_to_errno(ERR_ARG)); done_socket(sock); return -1;); LWIP_UNUSED_ARG(tolen); /* initialize a buffer */ @@ -1167,8 +1636,8 @@ lwip_sendto(int s, const void *data, size_t size, int flags, LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_sendto(%d, data=%p, short_size=%"U16_F", flags=0x%x to=", - s, data, short_size, flags)); - ip_addr_debug_print(SOCKETS_DEBUG, &buf.addr); + s, data, short_size, flags)); + ip_addr_debug_print_val(SOCKETS_DEBUG, buf.addr); LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%"U16_F"\n", remote_port)); /* make the buffer point to the data that should be sent */ @@ -1208,6 +1677,7 @@ lwip_sendto(int s, const void *data, size_t size, int flags, netbuf_free(&buf); sock_set_errno(sock, err_to_errno(err)); + done_socket(sock); return (err == ERR_OK ? short_size : -1); } @@ -1221,29 +1691,35 @@ lwip_socket(int domain, int type, int protocol) /* create a netconn */ switch (type) { - case SOCK_RAW: - conn = netconn_new_with_proto_and_callback(DOMAIN_TO_NETCONN_TYPE(domain, NETCONN_RAW), - (u8_t)protocol, event_callback); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_socket(%s, SOCK_RAW, %d) = ", - domain == PF_INET ? "PF_INET" : "UNKNOWN", protocol)); - break; - case SOCK_DGRAM: - conn = netconn_new_with_callback(DOMAIN_TO_NETCONN_TYPE(domain, - ((protocol == IPPROTO_UDPLITE) ? NETCONN_UDPLITE : NETCONN_UDP)) , - event_callback); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_socket(%s, SOCK_DGRAM, %d) = ", - domain == PF_INET ? "PF_INET" : "UNKNOWN", protocol)); - break; - case SOCK_STREAM: - conn = netconn_new_with_callback(DOMAIN_TO_NETCONN_TYPE(domain, NETCONN_TCP), event_callback); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_socket(%s, SOCK_STREAM, %d) = ", - domain == PF_INET ? "PF_INET" : "UNKNOWN", protocol)); - break; - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_socket(%d, %d/UNKNOWN, %d) = -1\n", - domain, type, protocol)); - set_errno(EINVAL); - return -1; + case SOCK_RAW: + conn = netconn_new_with_proto_and_callback(DOMAIN_TO_NETCONN_TYPE(domain, NETCONN_RAW), + (u8_t)protocol, DEFAULT_SOCKET_EVENTCB); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_socket(%s, SOCK_RAW, %d) = ", + domain == PF_INET ? "PF_INET" : "UNKNOWN", protocol)); + break; + case SOCK_DGRAM: + conn = netconn_new_with_callback(DOMAIN_TO_NETCONN_TYPE(domain, + ((protocol == IPPROTO_UDPLITE) ? NETCONN_UDPLITE : NETCONN_UDP)), + DEFAULT_SOCKET_EVENTCB); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_socket(%s, SOCK_DGRAM, %d) = ", + domain == PF_INET ? "PF_INET" : "UNKNOWN", protocol)); +#if LWIP_NETBUF_RECVINFO + if (conn) { + /* netconn layer enables pktinfo by default, sockets default to off */ + conn->flags &= ~NETCONN_FLAG_PKTINFO; + } +#endif /* LWIP_NETBUF_RECVINFO */ + break; + case SOCK_STREAM: + conn = netconn_new_with_callback(DOMAIN_TO_NETCONN_TYPE(domain, NETCONN_TCP), DEFAULT_SOCKET_EVENTCB); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_socket(%s, SOCK_STREAM, %d) = ", + domain == PF_INET ? "PF_INET" : "UNKNOWN", protocol)); + break; + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_socket(%d, %d/UNKNOWN, %d) = -1\n", + domain, type, protocol)); + set_errno(EINVAL); + return -1; } if (!conn) { @@ -1260,18 +1736,19 @@ lwip_socket(int domain, int type, int protocol) return -1; } conn->socket = i; + done_socket(&sockets[i - LWIP_SOCKET_OFFSET]); LWIP_DEBUGF(SOCKETS_DEBUG, ("%d\n", i)); set_errno(0); return i; } -int +ssize_t lwip_write(int s, const void *data, size_t size) { return lwip_send(s, data, size, 0); } -int +ssize_t lwip_writev(int s, const struct iovec *iov, int iovcnt) { struct msghdr msg; @@ -1288,6 +1765,58 @@ lwip_writev(int s, const struct iovec *iov, int iovcnt) return lwip_sendmsg(s, &msg, 0); } +#if LWIP_SOCKET_SELECT || LWIP_SOCKET_POLL +/* Add select_cb to select_cb_list. */ +static void +lwip_link_select_cb(struct lwip_select_cb *select_cb) +{ + LWIP_SOCKET_SELECT_DECL_PROTECT(lev); + + /* Protect the select_cb_list */ + LWIP_SOCKET_SELECT_PROTECT(lev); + + /* Put this select_cb on top of list */ + select_cb->next = select_cb_list; + if (select_cb_list != NULL) { + select_cb_list->prev = select_cb; + } + select_cb_list = select_cb; +#if !LWIP_TCPIP_CORE_LOCKING + /* Increasing this counter tells select_check_waiters that the list has changed. */ + select_cb_ctr++; +#endif + + /* Now we can safely unprotect */ + LWIP_SOCKET_SELECT_UNPROTECT(lev); +} + +/* Remove select_cb from select_cb_list. */ +static void +lwip_unlink_select_cb(struct lwip_select_cb *select_cb) +{ + LWIP_SOCKET_SELECT_DECL_PROTECT(lev); + + /* Take us off the list */ + LWIP_SOCKET_SELECT_PROTECT(lev); + if (select_cb->next != NULL) { + select_cb->next->prev = select_cb->prev; + } + if (select_cb_list == select_cb) { + LWIP_ASSERT("select_cb->prev == NULL", select_cb->prev == NULL); + select_cb_list = select_cb->next; + } else { + LWIP_ASSERT("select_cb->prev != NULL", select_cb->prev != NULL); + select_cb->prev->next = select_cb->next; + } +#if !LWIP_TCPIP_CORE_LOCKING + /* Increasing this counter tells select_check_waiters that the list has changed. */ + select_cb_ctr++; +#endif + LWIP_SOCKET_SELECT_UNPROTECT(lev); +} +#endif /* LWIP_SOCKET_SELECT || LWIP_SOCKET_POLL */ + +#if LWIP_SOCKET_SELECT /** * Go through the readset and writeset lists and see which socket of the sockets * set in the sets has events. On return, readset, writeset and exceptset have @@ -1326,9 +1855,9 @@ lwip_selscan(int maxfdp1, fd_set *readset_in, fd_set *writeset_in, fd_set *excep } /* First get the socket's status (protected)... */ SYS_ARCH_PROTECT(lev); - sock = tryget_socket(i); + sock = tryget_socket_unconn_locked(i); if (sock != NULL) { - void* lastdata = sock->lastdata; + void *lastdata = sock->lastdata.pbuf; s16_t rcvevent = sock->rcvevent; u16_t sendevent = sock->sendevent; u16_t errevent = sock->errevent; @@ -1353,9 +1882,11 @@ lwip_selscan(int maxfdp1, fd_set *readset_in, fd_set *writeset_in, fd_set *excep LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_selscan: fd=%d ready for exception\n", i)); nready++; } + done_socket(sock); } else { SYS_ARCH_UNPROTECT(lev); - /* continue on to next FD in list */ + /* no a valid open socket */ + return -1; } } /* copy local sets to the ones provided as arguments */ @@ -1367,6 +1898,68 @@ lwip_selscan(int maxfdp1, fd_set *readset_in, fd_set *writeset_in, fd_set *excep return nready; } +#if LWIP_NETCONN_FULLDUPLEX +/* Mark all of the set sockets in one of the three fdsets passed to select as used. + * All sockets are marked (and later unmarked), whether they are open or not. + * This is OK as lwip_selscan aborts select when non-open sockets are found. + */ +static void +lwip_select_inc_sockets_used_set(int maxfdp, fd_set *fdset, fd_set *used_sockets) +{ + SYS_ARCH_DECL_PROTECT(lev); + if (fdset) { + int i; + for (i = LWIP_SOCKET_OFFSET; i < maxfdp; i++) { + /* if this FD is in the set, lock it (unless already done) */ + if (FD_ISSET(i, fdset) && !FD_ISSET(i, used_sockets)) { + struct lwip_sock *sock; + SYS_ARCH_PROTECT(lev); + sock = tryget_socket_unconn_locked(i); + if (sock != NULL) { + /* leave the socket used until released by lwip_select_dec_sockets_used */ + FD_SET(i, used_sockets); + } + SYS_ARCH_UNPROTECT(lev); + } + } + } +} + +/* Mark all sockets passed to select as used to prevent them from being freed + * from other threads while select is running. + * Marked sockets are added to 'used_sockets' to mark them only once an be able + * to unmark them correctly. + */ +static void +lwip_select_inc_sockets_used(int maxfdp, fd_set *fdset1, fd_set *fdset2, fd_set *fdset3, fd_set *used_sockets) +{ + FD_ZERO(used_sockets); + lwip_select_inc_sockets_used_set(maxfdp, fdset1, used_sockets); + lwip_select_inc_sockets_used_set(maxfdp, fdset2, used_sockets); + lwip_select_inc_sockets_used_set(maxfdp, fdset3, used_sockets); +} + +/* Let go all sockets that were marked as used when starting select */ +static void +lwip_select_dec_sockets_used(int maxfdp, fd_set *used_sockets) +{ + int i; + for (i = LWIP_SOCKET_OFFSET; i < maxfdp; i++) { + /* if this FD is not in the set, continue */ + if (FD_ISSET(i, used_sockets)) { + struct lwip_sock *sock = tryget_socket_unconn_nouse(i); + LWIP_ASSERT("socket gone at the end of select", sock != NULL); + if (sock != NULL) { + done_socket(sock); + } + } + } +} +#else /* LWIP_NETCONN_FULLDUPLEX */ +#define lwip_select_inc_sockets_used(maxfdp1, readset, writeset, exceptset, used_sockets) +#define lwip_select_dec_sockets_used(maxfdp1, used_sockets) +#endif /* LWIP_NETCONN_FULLDUPLEX */ + int lwip_select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *exceptset, struct timeval *timeout) @@ -1375,181 +1968,190 @@ lwip_select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *exceptset, int nready; fd_set lreadset, lwriteset, lexceptset; u32_t msectimeout; - struct lwip_select_cb select_cb; int i; int maxfdp2; #if LWIP_NETCONN_SEM_PER_THREAD int waited = 0; +#endif +#if LWIP_NETCONN_FULLDUPLEX + fd_set used_sockets; #endif SYS_ARCH_DECL_PROTECT(lev); LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_select(%d, %p, %p, %p, tvsec=%"S32_F" tvusec=%"S32_F")\n", - maxfdp1, (void *)readset, (void *) writeset, (void *) exceptset, - timeout ? (s32_t)timeout->tv_sec : (s32_t)-1, - timeout ? (s32_t)timeout->tv_usec : (s32_t)-1)); + maxfdp1, (void *)readset, (void *) writeset, (void *) exceptset, + timeout ? (s32_t)timeout->tv_sec : (s32_t) - 1, + timeout ? (s32_t)timeout->tv_usec : (s32_t) - 1)); + + if ((maxfdp1 < 0) || (maxfdp1 > LWIP_SELECT_MAXNFDS)) { + set_errno(EINVAL); + return -1; + } + + lwip_select_inc_sockets_used(maxfdp1, readset, writeset, exceptset, &used_sockets); /* Go through each socket in each list to count number of sockets which currently match */ nready = lwip_selscan(maxfdp1, readset, writeset, exceptset, &lreadset, &lwriteset, &lexceptset); - /* If we don't have any current events, then suspend if we are supposed to */ - if (!nready) { + if (nready < 0) { + /* one of the sockets in one of the fd_sets was invalid */ + set_errno(EBADF); + lwip_select_dec_sockets_used(maxfdp1, &used_sockets); + return -1; + } else if (nready > 0) { + /* one or more sockets are set, no need to wait */ + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_select: nready=%d\n", nready)); + } else { + /* If we don't have any current events, then suspend if we are supposed to */ if (timeout && timeout->tv_sec == 0 && timeout->tv_usec == 0) { LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_select: no timeout, returning 0\n")); /* This is OK as the local fdsets are empty and nready is zero, or we would have returned earlier. */ - goto return_copy_fdsets; - } - - /* None ready: add our semaphore to list: - We don't actually need any dynamic memory. Our entry on the - list is only valid while we are in this function, so it's ok - to use local variables. */ - - select_cb.next = NULL; - select_cb.prev = NULL; - select_cb.readset = readset; - select_cb.writeset = writeset; - select_cb.exceptset = exceptset; - select_cb.sem_signalled = 0; -#if LWIP_NETCONN_SEM_PER_THREAD - select_cb.sem = LWIP_NETCONN_THREAD_SEM_GET(); -#else /* LWIP_NETCONN_SEM_PER_THREAD */ - if (sys_sem_new(&select_cb.sem, 0) != ERR_OK) { - /* failed to create semaphore */ - set_errno(ENOMEM); - return -1; - } -#endif /* LWIP_NETCONN_SEM_PER_THREAD */ - - /* Protect the select_cb_list */ - SYS_ARCH_PROTECT(lev); - - /* Put this select_cb on top of list */ - select_cb.next = select_cb_list; - if (select_cb_list != NULL) { - select_cb_list->prev = &select_cb; - } - select_cb_list = &select_cb; - /* Increasing this counter tells event_callback that the list has changed. */ - select_cb_ctr++; - - /* Now we can safely unprotect */ - SYS_ARCH_UNPROTECT(lev); - - /* Increase select_waiting for each socket we are interested in */ - maxfdp2 = maxfdp1; - for (i = LWIP_SOCKET_OFFSET; i < maxfdp1; i++) { - if ((readset && FD_ISSET(i, readset)) || - (writeset && FD_ISSET(i, writeset)) || - (exceptset && FD_ISSET(i, exceptset))) { - struct lwip_sock *sock; - SYS_ARCH_PROTECT(lev); - sock = tryget_socket(i); - if (sock != NULL) { - sock->select_waiting++; - LWIP_ASSERT("sock->select_waiting > 0", sock->select_waiting > 0); - } else { - /* Not a valid socket */ - nready = -1; - maxfdp2 = i; - SYS_ARCH_UNPROTECT(lev); - break; - } - SYS_ARCH_UNPROTECT(lev); - } - } - - if (nready >= 0) { - /* Call lwip_selscan again: there could have been events between - the last scan (without us on the list) and putting us on the list! */ - nready = lwip_selscan(maxfdp1, readset, writeset, exceptset, &lreadset, &lwriteset, &lexceptset); - if (!nready) { - /* Still none ready, just wait to be woken */ - if (timeout == 0) { - /* Wait forever */ - msectimeout = 0; - } else { - msectimeout = ((timeout->tv_sec * 1000) + ((timeout->tv_usec + 500)/1000)); - if (msectimeout == 0) { - /* Wait 1ms at least (0 means wait forever) */ - msectimeout = 1; - } - } - - waitres = sys_arch_sem_wait(SELECT_SEM_PTR(select_cb.sem), msectimeout); -#if LWIP_NETCONN_SEM_PER_THREAD - waited = 1; -#endif - } - } - - /* Decrease select_waiting for each socket we are interested in */ - for (i = LWIP_SOCKET_OFFSET; i < maxfdp2; i++) { - if ((readset && FD_ISSET(i, readset)) || - (writeset && FD_ISSET(i, writeset)) || - (exceptset && FD_ISSET(i, exceptset))) { - struct lwip_sock *sock; - SYS_ARCH_PROTECT(lev); - sock = tryget_socket(i); - if (sock != NULL) { - /* for now, handle select_waiting==0... */ - LWIP_ASSERT("sock->select_waiting > 0", sock->select_waiting > 0); - if (sock->select_waiting > 0) { - sock->select_waiting--; - } - } else { - /* Not a valid socket */ - nready = -1; - } - SYS_ARCH_UNPROTECT(lev); - } - } - /* Take us off the list */ - SYS_ARCH_PROTECT(lev); - if (select_cb.next != NULL) { - select_cb.next->prev = select_cb.prev; - } - if (select_cb_list == &select_cb) { - LWIP_ASSERT("select_cb.prev == NULL", select_cb.prev == NULL); - select_cb_list = select_cb.next; } else { - LWIP_ASSERT("select_cb.prev != NULL", select_cb.prev != NULL); - select_cb.prev->next = select_cb.next; - } - /* Increasing this counter tells event_callback that the list has changed. */ - select_cb_ctr++; - SYS_ARCH_UNPROTECT(lev); + /* None ready: add our semaphore to list: + We don't actually need any dynamic memory. Our entry on the + list is only valid while we are in this function, so it's ok + to use local variables (unless we're running in MPU compatible + mode). */ + API_SELECT_CB_VAR_DECLARE(select_cb); + API_SELECT_CB_VAR_ALLOC(select_cb, set_errno(ENOMEM); lwip_select_dec_sockets_used(maxfdp1, &used_sockets); return -1); + memset(&API_SELECT_CB_VAR_REF(select_cb), 0, sizeof(struct lwip_select_cb)); + API_SELECT_CB_VAR_REF(select_cb).readset = readset; + API_SELECT_CB_VAR_REF(select_cb).writeset = writeset; + API_SELECT_CB_VAR_REF(select_cb).exceptset = exceptset; #if LWIP_NETCONN_SEM_PER_THREAD - if (select_cb.sem_signalled && (!waited || (waitres == SYS_ARCH_TIMEOUT))) { - /* don't leave the thread-local semaphore signalled */ - sys_arch_sem_wait(select_cb.sem, 1); - } + API_SELECT_CB_VAR_REF(select_cb).sem = LWIP_NETCONN_THREAD_SEM_GET(); #else /* LWIP_NETCONN_SEM_PER_THREAD */ - sys_sem_free(&select_cb.sem); + if (sys_sem_new(&API_SELECT_CB_VAR_REF(select_cb).sem, 0) != ERR_OK) { + /* failed to create semaphore */ + set_errno(ENOMEM); + lwip_select_dec_sockets_used(maxfdp1, &used_sockets); + API_SELECT_CB_VAR_FREE(select_cb); + return -1; + } #endif /* LWIP_NETCONN_SEM_PER_THREAD */ - if (nready < 0) { - /* This happens when a socket got closed while waiting */ - set_errno(EBADF); - return -1; - } + lwip_link_select_cb(&API_SELECT_CB_VAR_REF(select_cb)); - if (waitres == SYS_ARCH_TIMEOUT) { - /* Timeout */ - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_select: timeout expired\n")); - /* This is OK as the local fdsets are empty and nready is zero, - or we would have returned earlier. */ - goto return_copy_fdsets; - } + /* Increase select_waiting for each socket we are interested in */ + maxfdp2 = maxfdp1; + for (i = LWIP_SOCKET_OFFSET; i < maxfdp1; i++) { + if ((readset && FD_ISSET(i, readset)) || + (writeset && FD_ISSET(i, writeset)) || + (exceptset && FD_ISSET(i, exceptset))) { + struct lwip_sock *sock; + SYS_ARCH_PROTECT(lev); + sock = tryget_socket_unconn_locked(i); + if (sock != NULL) { + sock->select_waiting++; + if (sock->select_waiting == 0) { + /* overflow - too many threads waiting */ + sock->select_waiting--; + nready = -1; + maxfdp2 = i; + SYS_ARCH_UNPROTECT(lev); + done_socket(sock); + set_errno(EBUSY); + break; + } + SYS_ARCH_UNPROTECT(lev); + done_socket(sock); + } else { + /* Not a valid socket */ + nready = -1; + maxfdp2 = i; + SYS_ARCH_UNPROTECT(lev); + set_errno(EBADF); + break; + } + } + } - /* See what's set */ - nready = lwip_selscan(maxfdp1, readset, writeset, exceptset, &lreadset, &lwriteset, &lexceptset); + if (nready >= 0) { + /* Call lwip_selscan again: there could have been events between + the last scan (without us on the list) and putting us on the list! */ + nready = lwip_selscan(maxfdp1, readset, writeset, exceptset, &lreadset, &lwriteset, &lexceptset); + if (!nready) { + /* Still none ready, just wait to be woken */ + if (timeout == 0) { + /* Wait forever */ + msectimeout = 0; + } else { + long msecs_long = ((timeout->tv_sec * 1000) + ((timeout->tv_usec + 500) / 1000)); + if (msecs_long <= 0) { + /* Wait 1ms at least (0 means wait forever) */ + msectimeout = 1; + } else { + msectimeout = (u32_t)msecs_long; + } + } + + waitres = sys_arch_sem_wait(SELECT_SEM_PTR(API_SELECT_CB_VAR_REF(select_cb).sem), msectimeout); +#if LWIP_NETCONN_SEM_PER_THREAD + waited = 1; +#endif + } + } + + /* Decrease select_waiting for each socket we are interested in */ + for (i = LWIP_SOCKET_OFFSET; i < maxfdp2; i++) { + if ((readset && FD_ISSET(i, readset)) || + (writeset && FD_ISSET(i, writeset)) || + (exceptset && FD_ISSET(i, exceptset))) { + struct lwip_sock *sock; + SYS_ARCH_PROTECT(lev); + sock = tryget_socket_unconn_locked(i); + if (sock != NULL) { + /* for now, handle select_waiting==0... */ + LWIP_ASSERT("sock->select_waiting > 0", sock->select_waiting > 0); + if (sock->select_waiting > 0) { + sock->select_waiting--; + } + SYS_ARCH_UNPROTECT(lev); + done_socket(sock); + } else { + SYS_ARCH_UNPROTECT(lev); + /* Not a valid socket */ + nready = -1; + set_errno(EBADF); + } + } + } + + lwip_unlink_select_cb(&API_SELECT_CB_VAR_REF(select_cb)); + +#if LWIP_NETCONN_SEM_PER_THREAD + if (API_SELECT_CB_VAR_REF(select_cb).sem_signalled && (!waited || (waitres == SYS_ARCH_TIMEOUT))) { + /* don't leave the thread-local semaphore signalled */ + sys_arch_sem_wait(API_SELECT_CB_VAR_REF(select_cb).sem, 1); + } +#else /* LWIP_NETCONN_SEM_PER_THREAD */ + sys_sem_free(&API_SELECT_CB_VAR_REF(select_cb).sem); +#endif /* LWIP_NETCONN_SEM_PER_THREAD */ + API_SELECT_CB_VAR_FREE(select_cb); + + if (nready < 0) { + /* This happens when a socket got closed while waiting */ + lwip_select_dec_sockets_used(maxfdp1, &used_sockets); + return -1; + } + + if (waitres == SYS_ARCH_TIMEOUT) { + /* Timeout */ + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_select: timeout expired\n")); + /* This is OK as the local fdsets are empty and nready is zero, + or we would have returned earlier. */ + } else { + /* See what's set now after waiting */ + nready = lwip_selscan(maxfdp1, readset, writeset, exceptset, &lreadset, &lwriteset, &lexceptset); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_select: nready=%d\n", nready)); + } + } } - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_select: nready=%d\n", nready)); -return_copy_fdsets: + lwip_select_dec_sockets_used(maxfdp1, &used_sockets); set_errno(0); if (readset) { *readset = lreadset; @@ -1562,18 +2164,320 @@ return_copy_fdsets: } return nready; } +#endif /* LWIP_SOCKET_SELECT */ +#if LWIP_SOCKET_POLL +/** Options for the lwip_pollscan function. */ +enum lwip_pollscan_opts +{ + /** Clear revents in each struct pollfd. */ + LWIP_POLLSCAN_CLEAR = 1, + + /** Increment select_waiting in each struct lwip_sock. */ + LWIP_POLLSCAN_INC_WAIT = 2, + + /** Decrement select_waiting in each struct lwip_sock. */ + LWIP_POLLSCAN_DEC_WAIT = 4 +}; + +/** + * Update revents in each struct pollfd. + * Optionally update select_waiting in struct lwip_sock. + * + * @param fds array of structures to update + * @param nfds number of structures in fds + * @param opts what to update and how + * @return number of structures that have revents != 0 + */ +static int +lwip_pollscan(struct pollfd *fds, nfds_t nfds, enum lwip_pollscan_opts opts) +{ + int nready = 0; + nfds_t fdi; + struct lwip_sock *sock; + SYS_ARCH_DECL_PROTECT(lev); + + /* Go through each struct pollfd in the array. */ + for (fdi = 0; fdi < nfds; fdi++) { + if ((opts & LWIP_POLLSCAN_CLEAR) != 0) { + fds[fdi].revents = 0; + } + + /* Negative fd means the caller wants us to ignore this struct. + POLLNVAL means we already detected that the fd is invalid; + if another thread has since opened a new socket with that fd, + we must not use that socket. */ + if (fds[fdi].fd >= 0 && (fds[fdi].revents & POLLNVAL) == 0) { + /* First get the socket's status (protected)... */ + SYS_ARCH_PROTECT(lev); + sock = tryget_socket_unconn_locked(fds[fdi].fd); + if (sock != NULL) { + void* lastdata = sock->lastdata.pbuf; + s16_t rcvevent = sock->rcvevent; + u16_t sendevent = sock->sendevent; + u16_t errevent = sock->errevent; + + if ((opts & LWIP_POLLSCAN_INC_WAIT) != 0) { + sock->select_waiting++; + if (sock->select_waiting == 0) { + /* overflow - too many threads waiting */ + sock->select_waiting--; + nready = -1; + SYS_ARCH_UNPROTECT(lev); + done_socket(sock); + break; + } + } else if ((opts & LWIP_POLLSCAN_DEC_WAIT) != 0) { + /* for now, handle select_waiting==0... */ + LWIP_ASSERT("sock->select_waiting > 0", sock->select_waiting > 0); + if (sock->select_waiting > 0) { + sock->select_waiting--; + } + } + SYS_ARCH_UNPROTECT(lev); + done_socket(sock); + + /* ... then examine it: */ + /* See if netconn of this socket is ready for read */ + if ((fds[fdi].events & POLLIN) != 0 && ((lastdata != NULL) || (rcvevent > 0))) { + fds[fdi].revents |= POLLIN; + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_pollscan: fd=%d ready for reading\n", fds[fdi].fd)); + } + /* See if netconn of this socket is ready for write */ + if ((fds[fdi].events & POLLOUT) != 0 && (sendevent != 0)) { + fds[fdi].revents |= POLLOUT; + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_pollscan: fd=%d ready for writing\n", fds[fdi].fd)); + } + /* See if netconn of this socket had an error */ + if (errevent != 0) { + /* POLLERR is output only. */ + fds[fdi].revents |= POLLERR; + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_pollscan: fd=%d ready for exception\n", fds[fdi].fd)); + } + } else { + /* Not a valid socket */ + SYS_ARCH_UNPROTECT(lev); + /* POLLNVAL is output only. */ + fds[fdi].revents |= POLLNVAL; + return -1; + } + } + + /* Will return the number of structures that have events, + not the number of events. */ + if (fds[fdi].revents != 0) { + nready++; + } + } + + LWIP_ASSERT("nready >= 0", nready >= 0); + return nready; +} + +#if LWIP_NETCONN_FULLDUPLEX +/* Mark all sockets as used. + * + * All sockets are marked (and later unmarked), whether they are open or not. + * This is OK as lwip_pollscan aborts select when non-open sockets are found. + */ +static void +lwip_poll_inc_sockets_used(struct pollfd *fds, nfds_t nfds) +{ + nfds_t fdi; + + if(fds) { + /* Go through each struct pollfd in the array. */ + for (fdi = 0; fdi < nfds; fdi++) { + /* Increase the reference counter */ + tryget_socket_unconn(fds[fdi].fd); + } + } +} + +/* Let go all sockets that were marked as used when starting poll */ +static void +lwip_poll_dec_sockets_used(struct pollfd *fds, nfds_t nfds) +{ + nfds_t fdi; + + if(fds) { + /* Go through each struct pollfd in the array. */ + for (fdi = 0; fdi < nfds; fdi++) { + struct lwip_sock *sock = tryget_socket_unconn_nouse(fds[fdi].fd); + if (sock != NULL) { + done_socket(sock); + } + } + } +} +#else /* LWIP_NETCONN_FULLDUPLEX */ +#define lwip_poll_inc_sockets_used(fds, nfds) +#define lwip_poll_dec_sockets_used(fds, nfds) +#endif /* LWIP_NETCONN_FULLDUPLEX */ + +int +lwip_poll(struct pollfd *fds, nfds_t nfds, int timeout) +{ + u32_t waitres = 0; + int nready; + u32_t msectimeout; +#if LWIP_NETCONN_SEM_PER_THREAD + int waited = 0; +#endif + + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_poll(%p, %d, %d)\n", + (void*)fds, (int)nfds, timeout)); + LWIP_ERROR("lwip_poll: invalid fds", ((fds != NULL && nfds > 0) || (fds == NULL && nfds == 0)), + set_errno(EINVAL); return -1;); + + lwip_poll_inc_sockets_used(fds, nfds); + + /* Go through each struct pollfd to count number of structures + which currently match */ + nready = lwip_pollscan(fds, nfds, LWIP_POLLSCAN_CLEAR); + + if (nready < 0) { + lwip_poll_dec_sockets_used(fds, nfds); + return -1; + } + + /* If we don't have any current events, then suspend if we are supposed to */ + if (!nready) { + API_SELECT_CB_VAR_DECLARE(select_cb); + + if (timeout == 0) { + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_poll: no timeout, returning 0\n")); + goto return_success; + } + API_SELECT_CB_VAR_ALLOC(select_cb, set_errno(EAGAIN); lwip_poll_dec_sockets_used(fds, nfds); return -1); + memset(&API_SELECT_CB_VAR_REF(select_cb), 0, sizeof(struct lwip_select_cb)); + + /* None ready: add our semaphore to list: + We don't actually need any dynamic memory. Our entry on the + list is only valid while we are in this function, so it's ok + to use local variables. */ + + API_SELECT_CB_VAR_REF(select_cb).poll_fds = fds; + API_SELECT_CB_VAR_REF(select_cb).poll_nfds = nfds; +#if LWIP_NETCONN_SEM_PER_THREAD + API_SELECT_CB_VAR_REF(select_cb).sem = LWIP_NETCONN_THREAD_SEM_GET(); +#else /* LWIP_NETCONN_SEM_PER_THREAD */ + if (sys_sem_new(&API_SELECT_CB_VAR_REF(select_cb).sem, 0) != ERR_OK) { + /* failed to create semaphore */ + set_errno(EAGAIN); + lwip_poll_dec_sockets_used(fds, nfds); + API_SELECT_CB_VAR_FREE(select_cb); + return -1; + } +#endif /* LWIP_NETCONN_SEM_PER_THREAD */ + + lwip_link_select_cb(&API_SELECT_CB_VAR_REF(select_cb)); + + /* Increase select_waiting for each socket we are interested in. + Also, check for events again: there could have been events between + the last scan (without us on the list) and putting us on the list! */ + nready = lwip_pollscan(fds, nfds, LWIP_POLLSCAN_INC_WAIT); + + if (!nready) { + /* Still none ready, just wait to be woken */ + if (timeout < 0) { + /* Wait forever */ + msectimeout = 0; + } else { + /* timeout == 0 would have been handled earlier. */ + LWIP_ASSERT("timeout > 0", timeout > 0); + msectimeout = timeout; + } + waitres = sys_arch_sem_wait(SELECT_SEM_PTR(API_SELECT_CB_VAR_REF(select_cb).sem), msectimeout); +#if LWIP_NETCONN_SEM_PER_THREAD + waited = 1; +#endif + } + + /* Decrease select_waiting for each socket we are interested in, + and check which events occurred while we waited. */ + nready = lwip_pollscan(fds, nfds, LWIP_POLLSCAN_DEC_WAIT); + + lwip_unlink_select_cb(&API_SELECT_CB_VAR_REF(select_cb)); + +#if LWIP_NETCONN_SEM_PER_THREAD + if (select_cb.sem_signalled && (!waited || (waitres == SYS_ARCH_TIMEOUT))) { + /* don't leave the thread-local semaphore signalled */ + sys_arch_sem_wait(API_SELECT_CB_VAR_REF(select_cb).sem, 1); + } +#else /* LWIP_NETCONN_SEM_PER_THREAD */ + sys_sem_free(&API_SELECT_CB_VAR_REF(select_cb).sem); +#endif /* LWIP_NETCONN_SEM_PER_THREAD */ + API_SELECT_CB_VAR_FREE(select_cb); + + if (nready < 0) { + /* This happens when a socket got closed while waiting */ + lwip_poll_dec_sockets_used(fds, nfds); + return -1; + } + + if (waitres == SYS_ARCH_TIMEOUT) { + /* Timeout */ + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_poll: timeout expired\n")); + goto return_success; + } + } + + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_poll: nready=%d\n", nready)); +return_success: + lwip_poll_dec_sockets_used(fds, nfds); + set_errno(0); + return nready; +} + +/** + * Check whether event_callback should wake up a thread waiting in + * lwip_poll. + */ +static int +lwip_poll_should_wake(const struct lwip_select_cb *scb, int fd, int has_recvevent, int has_sendevent, int has_errevent) +{ + nfds_t fdi; + for (fdi = 0; fdi < scb->poll_nfds; fdi++) { + const struct pollfd *pollfd = &scb->poll_fds[fdi]; + if (pollfd->fd == fd) { + /* Do not update pollfd->revents right here; + that would be a data race because lwip_pollscan + accesses revents without protecting. */ + if (has_recvevent && (pollfd->events & POLLIN) != 0) { + return 1; + } + if (has_sendevent && (pollfd->events & POLLOUT) != 0) { + return 1; + } + if (has_errevent) { + /* POLLERR is output only. */ + return 1; + } + } + } + return 0; +} +#endif /* LWIP_SOCKET_POLL */ + +#if LWIP_SOCKET_SELECT || LWIP_SOCKET_POLL /** * Callback registered in the netconn layer for each socket-netconn. * Processes recvevent (data available) and wakes up tasks waiting for select. + * + * @note for LWIP_TCPIP_CORE_LOCKING any caller of this function + * must have the core lock held when signaling the following events + * as they might cause select_list_cb to be checked: + * NETCONN_EVT_RCVPLUS + * NETCONN_EVT_SENDPLUS + * NETCONN_EVT_ERROR + * This requirement will be asserted in select_check_waiters() */ static void event_callback(struct netconn *conn, enum netconn_evt evt, u16_t len) { - int s; + int s, check_waiters; struct lwip_sock *sock; - struct lwip_select_cb *scb; - int last_select_cb_ctr; SYS_ARCH_DECL_PROTECT(lev); LWIP_UNUSED_ARG(len); @@ -1590,6 +2494,8 @@ event_callback(struct netconn *conn, enum netconn_evt evt, u16_t len) SYS_ARCH_PROTECT(lev); if (conn->socket < 0) { if (evt == NETCONN_EVT_RCVPLUS) { + /* conn->socket is -1 on initialization + lwip_accept adjusts sock->recvevent if conn->socket < -1 */ conn->socket--; } SYS_ARCH_UNPROTECT(lev); @@ -1607,20 +2513,29 @@ event_callback(struct netconn *conn, enum netconn_evt evt, u16_t len) return; } + check_waiters = 1; SYS_ARCH_PROTECT(lev); /* Set event as required */ switch (evt) { case NETCONN_EVT_RCVPLUS: sock->rcvevent++; + if (sock->rcvevent > 1) { + check_waiters = 0; + } break; case NETCONN_EVT_RCVMINUS: sock->rcvevent--; + check_waiters = 0; break; case NETCONN_EVT_SENDPLUS: + if (sock->sendevent) { + check_waiters = 0; + } sock->sendevent = 1; break; case NETCONN_EVT_SENDMINUS: sock->sendevent = 0; + check_waiters = 0; break; case NETCONN_EVT_ERROR: sock->errevent = 1; @@ -1630,48 +2545,93 @@ event_callback(struct netconn *conn, enum netconn_evt evt, u16_t len) break; } - if (sock->select_waiting == 0) { - /* noone is waiting for this socket, no need to check select_cb_list */ + if (sock->select_waiting && check_waiters) { + /* Save which events are active */ + int has_recvevent, has_sendevent, has_errevent; + has_recvevent = sock->rcvevent > 0; + has_sendevent = sock->sendevent != 0; + has_errevent = sock->errevent != 0; + SYS_ARCH_UNPROTECT(lev); + /* Check any select calls waiting on this socket */ + select_check_waiters(s, has_recvevent, has_sendevent, has_errevent); + } else { SYS_ARCH_UNPROTECT(lev); - return; } + done_socket(sock); +} - /* Now decide if anyone is waiting for this socket */ - /* NOTE: This code goes through the select_cb_list list multiple times - ONLY IF a select was actually waiting. We go through the list the number - of waiting select calls + 1. This list is expected to be small. */ +/** + * Check if any select waiters are waiting on this socket and its events + * + * @note on synchronization of select_cb_list: + * LWIP_TCPIP_CORE_LOCKING: the select_cb_list must only be accessed while holding + * the core lock. We do a single pass through the list and signal any waiters. + * Core lock should already be held when calling here!!!! - /* At this point, SYS_ARCH is still protected! */ + * !LWIP_TCPIP_CORE_LOCKING: we use SYS_ARCH_PROTECT but unlock on each iteration + * of the loop, thus creating a possibility where a thread could modify the + * select_cb_list during our UNPROTECT/PROTECT. We use a generational counter to + * detect this change and restart the list walk. The list is expected to be small + */ +static void select_check_waiters(int s, int has_recvevent, int has_sendevent, int has_errevent) +{ + struct lwip_select_cb *scb; +#if !LWIP_TCPIP_CORE_LOCKING + int last_select_cb_ctr; + SYS_ARCH_DECL_PROTECT(lev); +#endif /* !LWIP_TCPIP_CORE_LOCKING */ + + LWIP_ASSERT_CORE_LOCKED(); + +#if !LWIP_TCPIP_CORE_LOCKING + SYS_ARCH_PROTECT(lev); again: + /* remember the state of select_cb_list to detect changes */ + last_select_cb_ctr = select_cb_ctr; +#endif /* !LWIP_TCPIP_CORE_LOCKING */ for (scb = select_cb_list; scb != NULL; scb = scb->next) { - /* remember the state of select_cb_list to detect changes */ - last_select_cb_ctr = select_cb_ctr; if (scb->sem_signalled == 0) { /* semaphore not signalled yet */ int do_signal = 0; - /* Test this select call for our socket */ - if (sock->rcvevent > 0) { - if (scb->readset && FD_ISSET(s, scb->readset)) { - do_signal = 1; - } - } - if (sock->sendevent != 0) { - if (!do_signal && scb->writeset && FD_ISSET(s, scb->writeset)) { - do_signal = 1; - } - } - if (sock->errevent != 0) { - if (!do_signal && scb->exceptset && FD_ISSET(s, scb->exceptset)) { - do_signal = 1; +#if LWIP_SOCKET_POLL + if (scb->poll_fds != NULL) { + do_signal = lwip_poll_should_wake(scb, s, has_recvevent, has_sendevent, has_errevent); + } +#endif /* LWIP_SOCKET_POLL */ +#if LWIP_SOCKET_SELECT && LWIP_SOCKET_POLL + else +#endif /* LWIP_SOCKET_SELECT && LWIP_SOCKET_POLL */ +#if LWIP_SOCKET_SELECT + { + /* Test this select call for our socket */ + if (has_recvevent) { + if (scb->readset && FD_ISSET(s, scb->readset)) { + do_signal = 1; + } + } + if (has_sendevent) { + if (!do_signal && scb->writeset && FD_ISSET(s, scb->writeset)) { + do_signal = 1; + } + } + if (has_errevent) { + if (!do_signal && scb->exceptset && FD_ISSET(s, scb->exceptset)) { + do_signal = 1; + } } } +#endif /* LWIP_SOCKET_SELECT */ if (do_signal) { scb->sem_signalled = 1; - /* Don't call SYS_ARCH_UNPROTECT() before signaling the semaphore, as this might - lead to the select thread taking itself off the list, invalidating the semaphore. */ + /* For !LWIP_TCPIP_CORE_LOCKING, we don't call SYS_ARCH_UNPROTECT() before signaling + the semaphore, as this might lead to the select thread taking itself off the list, + invalidating the semaphore. */ sys_sem_signal(SELECT_SEM_PTR(scb->sem)); } } +#if LWIP_TCPIP_CORE_LOCKING + } +#else /* unlock interrupts with each step */ SYS_ARCH_UNPROTECT(lev); /* this makes sure interrupt protection time is short */ @@ -1680,9 +2640,13 @@ again: /* someone has changed select_cb_list, restart at the beginning */ goto again; } + /* remember the state of select_cb_list to detect changes */ + last_select_cb_ctr = select_cb_ctr; } SYS_ARCH_UNPROTECT(lev); +#endif } +#endif /* LWIP_SOCKET_SELECT || LWIP_SOCKET_POLL */ /** * Close one end of a full-duplex connection. @@ -1704,10 +2668,12 @@ lwip_shutdown(int s, int how) if (sock->conn != NULL) { if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) { sock_set_errno(sock, EOPNOTSUPP); + done_socket(sock); return -1; } } else { sock_set_errno(sock, ENOTCONN); + done_socket(sock); return -1; } @@ -1720,11 +2686,13 @@ lwip_shutdown(int s, int how) shut_tx = 1; } else { sock_set_errno(sock, EINVAL); + done_socket(sock); return -1; } err = netconn_shutdown(sock->conn, shut_rx, shut_tx); sock_set_errno(sock, err_to_errno(err)); + done_socket(sock); return (err == ERR_OK ? 0 : -1); } @@ -1746,6 +2714,7 @@ lwip_getaddrname(int s, struct sockaddr *name, socklen_t *namelen, u8_t local) err = netconn_getaddr(sock->conn, &naddr, &port, local); if (err != ERR_OK) { sock_set_errno(sock, err_to_errno(err)); + done_socket(sock); return -1; } @@ -1770,6 +2739,7 @@ lwip_getaddrname(int s, struct sockaddr *name, socklen_t *namelen, u8_t local) MEMCPY(name, &saddr, *namelen); sock_set_errno(sock, 0); + done_socket(sock); return 0; } @@ -1788,9 +2758,10 @@ lwip_getsockname(int s, struct sockaddr *name, socklen_t *namelen) int lwip_getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen) { - u8_t err; + int err; struct lwip_sock *sock = get_socket(s); #if !LWIP_TCPIP_CORE_LOCKING + err_t cberr; LWIP_SETGETSOCKOPT_DATA_VAR_DECLARE(data); #endif /* !LWIP_TCPIP_CORE_LOCKING */ @@ -1800,6 +2771,7 @@ lwip_getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen) if ((NULL == optval) || (NULL == optlen)) { sock_set_errno(sock, EFAULT); + done_socket(sock); return -1; } @@ -1815,6 +2787,7 @@ lwip_getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen) /* MPU_COMPATIBLE copies the optval data, so check for max size here */ if (*optlen > LWIP_SETGETSOCKOPT_MAXOPTLEN) { sock_set_errno(sock, ENOBUFS); + done_socket(sock); return -1; } #endif /* LWIP_MPU_COMPATIBLE */ @@ -1833,19 +2806,20 @@ lwip_getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen) #else LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).completed_sem = &sock->conn->op_completed; #endif - err = tcpip_callback(lwip_getsockopt_callback, &LWIP_SETGETSOCKOPT_DATA_VAR_REF(data)); - if (err != ERR_OK) { + cberr = tcpip_callback(lwip_getsockopt_callback, &LWIP_SETGETSOCKOPT_DATA_VAR_REF(data)); + if (cberr != ERR_OK) { LWIP_SETGETSOCKOPT_DATA_VAR_FREE(data); - sock_set_errno(sock, err_to_errno(err)); + sock_set_errno(sock, err_to_errno(cberr)); + done_socket(sock); return -1; } - sys_arch_sem_wait((sys_sem_t*)(LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).completed_sem), 0); + sys_arch_sem_wait((sys_sem_t *)(LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).completed_sem), 0); /* write back optlen and optval */ *optlen = LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optlen; #if LWIP_MPU_COMPATIBLE MEMCPY(optval, LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optval, - LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optlen); + LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optlen); #endif /* LWIP_MPU_COMPATIBLE */ /* maybe lwip_getsockopt_internal has changed err */ @@ -1854,6 +2828,7 @@ lwip_getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen) #endif /* LWIP_TCPIP_CORE_LOCKING */ sock_set_errno(sock, err); + done_socket(sock); return err ? -1 : 0; } @@ -1866,337 +2841,373 @@ lwip_getsockopt_callback(void *arg) { struct lwip_setgetsockopt_data *data; LWIP_ASSERT("arg != NULL", arg != NULL); - data = (struct lwip_setgetsockopt_data*)arg; + data = (struct lwip_setgetsockopt_data *)arg; data->err = lwip_getsockopt_impl(data->s, data->level, data->optname, #if LWIP_MPU_COMPATIBLE - data->optval, + data->optval, #else /* LWIP_MPU_COMPATIBLE */ - data->optval.p, + data->optval.p, #endif /* LWIP_MPU_COMPATIBLE */ - &data->optlen); + &data->optlen); - sys_sem_signal((sys_sem_t*)(data->completed_sem)); + sys_sem_signal((sys_sem_t *)(data->completed_sem)); } #endif /* LWIP_TCPIP_CORE_LOCKING */ +static int +lwip_sockopt_to_ipopt(int optname) +{ + /* Map SO_* values to our internal SOF_* values + * We should not rely on #defines in socket.h + * being in sync with ip.h. + */ + switch (optname) { + case SO_BROADCAST: + return SOF_BROADCAST; + case SO_KEEPALIVE: + return SOF_KEEPALIVE; + case SO_REUSEADDR: + return SOF_REUSEADDR; + default: + LWIP_ASSERT("Unknown socket option", 0); + return 0; + } +} + /** lwip_getsockopt_impl: the actual implementation of getsockopt: * same argument as lwip_getsockopt, either called directly or through callback */ -static u8_t +static int lwip_getsockopt_impl(int s, int level, int optname, void *optval, socklen_t *optlen) { - u8_t err = 0; + int err = 0; struct lwip_sock *sock = tryget_socket(s); if (!sock) { return EBADF; } +#ifdef LWIP_HOOK_SOCKETS_GETSOCKOPT + if (LWIP_HOOK_SOCKETS_GETSOCKOPT(s, sock, level, optname, optval, optlen, &err)) { + return err; + } +#endif + switch (level) { -/* Level: SOL_SOCKET */ - case SOL_SOCKET: - switch (optname) { + /* Level: SOL_SOCKET */ + case SOL_SOCKET: + switch (optname) { #if LWIP_TCP - case SO_ACCEPTCONN: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, int); - if (NETCONNTYPE_GROUP(sock->conn->type) != NETCONN_TCP) { - return ENOPROTOOPT; - } - if ((sock->conn->pcb.tcp != NULL) && (sock->conn->pcb.tcp->state == LISTEN)) { - *(int*)optval = 1; - } else { - *(int*)optval = 0; - } - break; + case SO_ACCEPTCONN: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, int); + if (NETCONNTYPE_GROUP(sock->conn->type) != NETCONN_TCP) { + done_socket(sock); + return ENOPROTOOPT; + } + if ((sock->conn->pcb.tcp != NULL) && (sock->conn->pcb.tcp->state == LISTEN)) { + *(int *)optval = 1; + } else { + *(int *)optval = 0; + } + break; #endif /* LWIP_TCP */ - /* The option flags */ - case SO_BROADCAST: - case SO_KEEPALIVE: + /* The option flags */ + case SO_BROADCAST: + case SO_KEEPALIVE: #if SO_REUSE - case SO_REUSEADDR: + case SO_REUSEADDR: #endif /* SO_REUSE */ - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, int); - *(int*)optval = ip_get_option(sock->conn->pcb.ip, optname); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, SOL_SOCKET, optname=0x%x, ..) = %s\n", - s, optname, (*(int*)optval?"on":"off"))); - break; + if ((optname == SO_BROADCAST) && + (NETCONNTYPE_GROUP(sock->conn->type) != NETCONN_UDP)) { + done_socket(sock); + return ENOPROTOOPT; + } - case SO_TYPE: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, int); - switch (NETCONNTYPE_GROUP(netconn_type(sock->conn))) { - case NETCONN_RAW: - *(int*)optval = SOCK_RAW; - break; - case NETCONN_TCP: - *(int*)optval = SOCK_STREAM; - break; - case NETCONN_UDP: - *(int*)optval = SOCK_DGRAM; - break; - default: /* unrecognized socket type */ - *(int*)optval = netconn_type(sock->conn); - LWIP_DEBUGF(SOCKETS_DEBUG, - ("lwip_getsockopt(%d, SOL_SOCKET, SO_TYPE): unrecognized socket type %d\n", - s, *(int *)optval)); - } /* switch (netconn_type(sock->conn)) */ - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, SOL_SOCKET, SO_TYPE) = %d\n", - s, *(int *)optval)); - break; + optname = lwip_sockopt_to_ipopt(optname); - case SO_ERROR: - LWIP_SOCKOPT_CHECK_OPTLEN(*optlen, int); - /* only overwrite ERR_OK or temporary errors */ - if (((sock->err == 0) || (sock->err == EINPROGRESS)) && (sock->conn != NULL)) { - sock_set_errno(sock, err_to_errno(sock->conn->last_err)); - } - *(int *)optval = (sock->err == 0xFF ? (int)-1 : (int)sock->err); - sock->err = 0; - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, SOL_SOCKET, SO_ERROR) = %d\n", - s, *(int *)optval)); - break; + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, int); + *(int *)optval = ip_get_option(sock->conn->pcb.ip, optname); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, SOL_SOCKET, optname=0x%x, ..) = %s\n", + s, optname, (*(int *)optval ? "on" : "off"))); + break; + + case SO_TYPE: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, int); + switch (NETCONNTYPE_GROUP(netconn_type(sock->conn))) { + case NETCONN_RAW: + *(int *)optval = SOCK_RAW; + break; + case NETCONN_TCP: + *(int *)optval = SOCK_STREAM; + break; + case NETCONN_UDP: + *(int *)optval = SOCK_DGRAM; + break; + default: /* unrecognized socket type */ + *(int *)optval = netconn_type(sock->conn); + LWIP_DEBUGF(SOCKETS_DEBUG, + ("lwip_getsockopt(%d, SOL_SOCKET, SO_TYPE): unrecognized socket type %d\n", + s, *(int *)optval)); + } /* switch (netconn_type(sock->conn)) */ + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, SOL_SOCKET, SO_TYPE) = %d\n", + s, *(int *)optval)); + break; + + case SO_ERROR: + LWIP_SOCKOPT_CHECK_OPTLEN(sock, *optlen, int); + *(int *)optval = err_to_errno(netconn_err(sock->conn)); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, SOL_SOCKET, SO_ERROR) = %d\n", + s, *(int *)optval)); + break; #if LWIP_SO_SNDTIMEO - case SO_SNDTIMEO: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, LWIP_SO_SNDRCVTIMEO_OPTTYPE); - LWIP_SO_SNDRCVTIMEO_SET(optval, netconn_get_sendtimeout(sock->conn)); - break; + case SO_SNDTIMEO: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, LWIP_SO_SNDRCVTIMEO_OPTTYPE); + LWIP_SO_SNDRCVTIMEO_SET(optval, netconn_get_sendtimeout(sock->conn)); + break; #endif /* LWIP_SO_SNDTIMEO */ #if LWIP_SO_RCVTIMEO - case SO_RCVTIMEO: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, LWIP_SO_SNDRCVTIMEO_OPTTYPE); - LWIP_SO_SNDRCVTIMEO_SET(optval, netconn_get_recvtimeout(sock->conn)); - break; + case SO_RCVTIMEO: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, LWIP_SO_SNDRCVTIMEO_OPTTYPE); + LWIP_SO_SNDRCVTIMEO_SET(optval, netconn_get_recvtimeout(sock->conn)); + break; #endif /* LWIP_SO_RCVTIMEO */ #if LWIP_SO_RCVBUF - case SO_RCVBUF: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, int); - *(int *)optval = netconn_get_recvbufsize(sock->conn); - break; + case SO_RCVBUF: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, int); + *(int *)optval = netconn_get_recvbufsize(sock->conn); + break; #endif /* LWIP_SO_RCVBUF */ #if LWIP_SO_LINGER - case SO_LINGER: - { - s16_t conn_linger; - struct linger* linger = (struct linger*)optval; - LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, struct linger); - conn_linger = sock->conn->linger; - if (conn_linger >= 0) { - linger->l_onoff = 1; - linger->l_linger = (int)conn_linger; - } else { - linger->l_onoff = 0; - linger->l_linger = 0; + case SO_LINGER: { + s16_t conn_linger; + struct linger *linger = (struct linger *)optval; + LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, struct linger); + conn_linger = sock->conn->linger; + if (conn_linger >= 0) { + linger->l_onoff = 1; + linger->l_linger = (int)conn_linger; + } else { + linger->l_onoff = 0; + linger->l_linger = 0; + } } - } - break; + break; #endif /* LWIP_SO_LINGER */ #if LWIP_UDP - case SO_NO_CHECK: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, *optlen, int, NETCONN_UDP); + case SO_NO_CHECK: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, *optlen, int, NETCONN_UDP); #if LWIP_UDPLITE - if ((udp_flags(sock->conn->pcb.udp) & UDP_FLAGS_UDPLITE) != 0) { - /* this flag is only available for UDP, not for UDP lite */ - return EAFNOSUPPORT; - } + if (udp_is_flag_set(sock->conn->pcb.udp, UDP_FLAGS_UDPLITE)) { + /* this flag is only available for UDP, not for UDP lite */ + done_socket(sock); + return EAFNOSUPPORT; + } #endif /* LWIP_UDPLITE */ - *(int*)optval = (udp_flags(sock->conn->pcb.udp) & UDP_FLAGS_NOCHKSUM) ? 1 : 0; - break; + *(int *)optval = udp_is_flag_set(sock->conn->pcb.udp, UDP_FLAGS_NOCHKSUM) ? 1 : 0; + break; #endif /* LWIP_UDP*/ - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, SOL_SOCKET, UNIMPL: optname=0x%x, ..)\n", - s, optname)); - err = ENOPROTOOPT; + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, SOL_SOCKET, UNIMPL: optname=0x%x, ..)\n", + s, optname)); + err = ENOPROTOOPT; + break; + } /* switch (optname) */ break; - } /* switch (optname) */ - break; -/* Level: IPPROTO_IP */ - case IPPROTO_IP: - switch (optname) { - case IP_TTL: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, int); - *(int*)optval = sock->conn->pcb.ip->ttl; - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IP, IP_TTL) = %d\n", - s, *(int *)optval)); + /* Level: IPPROTO_IP */ + case IPPROTO_IP: + switch (optname) { + case IP_TTL: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, int); + *(int *)optval = sock->conn->pcb.ip->ttl; + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IP, IP_TTL) = %d\n", + s, *(int *)optval)); + break; + case IP_TOS: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, int); + *(int *)optval = sock->conn->pcb.ip->tos; + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IP, IP_TOS) = %d\n", + s, *(int *)optval)); + break; +#if LWIP_IPV4 && LWIP_MULTICAST_TX_OPTIONS && LWIP_UDP + case IP_MULTICAST_TTL: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, u8_t); + if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_UDP) { + done_socket(sock); + return ENOPROTOOPT; + } + *(u8_t *)optval = udp_get_multicast_ttl(sock->conn->pcb.udp); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IP, IP_MULTICAST_TTL) = %d\n", + s, *(int *)optval)); + break; + case IP_MULTICAST_IF: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, struct in_addr); + if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_UDP) { + done_socket(sock); + return ENOPROTOOPT; + } + inet_addr_from_ip4addr((struct in_addr *)optval, udp_get_multicast_netif_addr(sock->conn->pcb.udp)); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IP, IP_MULTICAST_IF) = 0x%"X32_F"\n", + s, *(u32_t *)optval)); + break; + case IP_MULTICAST_LOOP: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, u8_t); + if ((sock->conn->pcb.udp->flags & UDP_FLAGS_MULTICAST_LOOP) != 0) { + *(u8_t *)optval = 1; + } else { + *(u8_t *)optval = 0; + } + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IP, IP_MULTICAST_LOOP) = %d\n", + s, *(int *)optval)); + break; +#endif /* LWIP_IPV4 && LWIP_MULTICAST_TX_OPTIONS && LWIP_UDP */ + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IP, UNIMPL: optname=0x%x, ..)\n", + s, optname)); + err = ENOPROTOOPT; + break; + } /* switch (optname) */ break; - case IP_TOS: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, int); - *(int*)optval = sock->conn->pcb.ip->tos; - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IP, IP_TOS) = %d\n", - s, *(int *)optval)); - break; -#if LWIP_MULTICAST_TX_OPTIONS - case IP_MULTICAST_TTL: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, u8_t); - if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_UDP) { - return ENOPROTOOPT; - } - *(u8_t*)optval = udp_get_multicast_ttl(sock->conn->pcb.udp); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IP, IP_MULTICAST_TTL) = %d\n", - s, *(int *)optval)); - break; - case IP_MULTICAST_IF: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, struct in_addr); - if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_UDP) { - return ENOPROTOOPT; - } - inet_addr_from_ip4addr((struct in_addr*)optval, udp_get_multicast_netif_addr(sock->conn->pcb.udp)); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IP, IP_MULTICAST_IF) = 0x%"X32_F"\n", - s, *(u32_t *)optval)); - break; - case IP_MULTICAST_LOOP: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, u8_t); - if ((sock->conn->pcb.udp->flags & UDP_FLAGS_MULTICAST_LOOP) != 0) { - *(u8_t*)optval = 1; - } else { - *(u8_t*)optval = 0; - } - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IP, IP_MULTICAST_LOOP) = %d\n", - s, *(int *)optval)); - break; -#endif /* LWIP_MULTICAST_TX_OPTIONS */ - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IP, UNIMPL: optname=0x%x, ..)\n", - s, optname)); - err = ENOPROTOOPT; - break; - } /* switch (optname) */ - break; #if LWIP_TCP -/* Level: IPPROTO_TCP */ - case IPPROTO_TCP: - /* Special case: all IPPROTO_TCP option take an int */ - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, *optlen, int, NETCONN_TCP); - if (sock->conn->pcb.tcp->state == LISTEN) { - return EINVAL; - } - switch (optname) { - case TCP_NODELAY: - *(int*)optval = tcp_nagle_disabled(sock->conn->pcb.tcp); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_TCP, TCP_NODELAY) = %s\n", - s, (*(int*)optval)?"on":"off") ); - break; - case TCP_KEEPALIVE: - *(int*)optval = (int)sock->conn->pcb.tcp->keep_idle; - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_TCP, TCP_KEEPALIVE) = %d\n", - s, *(int *)optval)); - break; + /* Level: IPPROTO_TCP */ + case IPPROTO_TCP: + /* Special case: all IPPROTO_TCP option take an int */ + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, *optlen, int, NETCONN_TCP); + if (sock->conn->pcb.tcp->state == LISTEN) { + done_socket(sock); + return EINVAL; + } + switch (optname) { + case TCP_NODELAY: + *(int *)optval = tcp_nagle_disabled(sock->conn->pcb.tcp); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_TCP, TCP_NODELAY) = %s\n", + s, (*(int *)optval) ? "on" : "off") ); + break; + case TCP_KEEPALIVE: + *(int *)optval = (int)sock->conn->pcb.tcp->keep_idle; + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_TCP, TCP_KEEPALIVE) = %d\n", + s, *(int *)optval)); + break; #if LWIP_TCP_KEEPALIVE - case TCP_KEEPIDLE: - *(int*)optval = (int)(sock->conn->pcb.tcp->keep_idle/1000); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_TCP, TCP_KEEPIDLE) = %d\n", - s, *(int *)optval)); - break; - case TCP_KEEPINTVL: - *(int*)optval = (int)(sock->conn->pcb.tcp->keep_intvl/1000); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_TCP, TCP_KEEPINTVL) = %d\n", - s, *(int *)optval)); - break; - case TCP_KEEPCNT: - *(int*)optval = (int)sock->conn->pcb.tcp->keep_cnt; - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_TCP, TCP_KEEPCNT) = %d\n", - s, *(int *)optval)); - break; + case TCP_KEEPIDLE: + *(int *)optval = (int)(sock->conn->pcb.tcp->keep_idle / 1000); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_TCP, TCP_KEEPIDLE) = %d\n", + s, *(int *)optval)); + break; + case TCP_KEEPINTVL: + *(int *)optval = (int)(sock->conn->pcb.tcp->keep_intvl / 1000); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_TCP, TCP_KEEPINTVL) = %d\n", + s, *(int *)optval)); + break; + case TCP_KEEPCNT: + *(int *)optval = (int)sock->conn->pcb.tcp->keep_cnt; + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_TCP, TCP_KEEPCNT) = %d\n", + s, *(int *)optval)); + break; #endif /* LWIP_TCP_KEEPALIVE */ - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_TCP, UNIMPL: optname=0x%x, ..)\n", - s, optname)); - err = ENOPROTOOPT; + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_TCP, UNIMPL: optname=0x%x, ..)\n", + s, optname)); + err = ENOPROTOOPT; + break; + } /* switch (optname) */ break; - } /* switch (optname) */ - break; #endif /* LWIP_TCP */ #if LWIP_IPV6 -/* Level: IPPROTO_IPV6 */ - case IPPROTO_IPV6: - switch (optname) { - case IPV6_V6ONLY: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, int); - *(int*)optval = (netconn_get_ipv6only(sock->conn) ? 1 : 0); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IPV6, IPV6_V6ONLY) = %d\n", - s, *(int *)optval)); + /* Level: IPPROTO_IPV6 */ + case IPPROTO_IPV6: + switch (optname) { + case IPV6_V6ONLY: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, int); + *(int *)optval = (netconn_get_ipv6only(sock->conn) ? 1 : 0); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IPV6, IPV6_V6ONLY) = %d\n", + s, *(int *)optval)); + break; + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IPV6, UNIMPL: optname=0x%x, ..)\n", + s, optname)); + err = ENOPROTOOPT; + break; + } /* switch (optname) */ break; - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IPV6, UNIMPL: optname=0x%x, ..)\n", - s, optname)); - err = ENOPROTOOPT; - break; - } /* switch (optname) */ - break; #endif /* LWIP_IPV6 */ #if LWIP_UDP && LWIP_UDPLITE - /* Level: IPPROTO_UDPLITE */ - case IPPROTO_UDPLITE: - /* Special case: all IPPROTO_UDPLITE option take an int */ - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, int); - /* If this is no UDP lite socket, ignore any options. */ - if (!NETCONNTYPE_ISUDPLITE(netconn_type(sock->conn))) { - return ENOPROTOOPT; - } - switch (optname) { - case UDPLITE_SEND_CSCOV: - *(int*)optval = sock->conn->pcb.udp->chksum_len_tx; - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_UDPLITE, UDPLITE_SEND_CSCOV) = %d\n", - s, (*(int*)optval)) ); - break; - case UDPLITE_RECV_CSCOV: - *(int*)optval = sock->conn->pcb.udp->chksum_len_rx; - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_UDPLITE, UDPLITE_RECV_CSCOV) = %d\n", - s, (*(int*)optval)) ); - break; - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_UDPLITE, UNIMPL: optname=0x%x, ..)\n", - s, optname)); - err = ENOPROTOOPT; - break; - } /* switch (optname) */ - break; -#endif /* LWIP_UDP */ - /* Level: IPPROTO_RAW */ - case IPPROTO_RAW: - switch (optname) { -#if LWIP_IPV6 && LWIP_RAW - case IPV6_CHECKSUM: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, *optlen, int, NETCONN_RAW); - if (sock->conn->pcb.raw->chksum_reqd == 0) { - *(int *)optval = -1; - } else { - *(int *)optval = sock->conn->pcb.raw->chksum_offset; + /* Level: IPPROTO_UDPLITE */ + case IPPROTO_UDPLITE: + /* Special case: all IPPROTO_UDPLITE option take an int */ + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, int); + /* If this is no UDP lite socket, ignore any options. */ + if (!NETCONNTYPE_ISUDPLITE(netconn_type(sock->conn))) { + done_socket(sock); + return ENOPROTOOPT; } - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_RAW, IPV6_CHECKSUM) = %d\n", - s, (*(int*)optval)) ); + switch (optname) { + case UDPLITE_SEND_CSCOV: + *(int *)optval = sock->conn->pcb.udp->chksum_len_tx; + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_UDPLITE, UDPLITE_SEND_CSCOV) = %d\n", + s, (*(int *)optval)) ); + break; + case UDPLITE_RECV_CSCOV: + *(int *)optval = sock->conn->pcb.udp->chksum_len_rx; + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_UDPLITE, UDPLITE_RECV_CSCOV) = %d\n", + s, (*(int *)optval)) ); + break; + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_UDPLITE, UNIMPL: optname=0x%x, ..)\n", + s, optname)); + err = ENOPROTOOPT; + break; + } /* switch (optname) */ break; +#endif /* LWIP_UDP */ + /* Level: IPPROTO_RAW */ + case IPPROTO_RAW: + switch (optname) { +#if LWIP_IPV6 && LWIP_RAW + case IPV6_CHECKSUM: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, *optlen, int, NETCONN_RAW); + if (sock->conn->pcb.raw->chksum_reqd == 0) { + *(int *)optval = -1; + } else { + *(int *)optval = sock->conn->pcb.raw->chksum_offset; + } + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_RAW, IPV6_CHECKSUM) = %d\n", + s, (*(int *)optval)) ); + break; #endif /* LWIP_IPV6 && LWIP_RAW */ + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_RAW, UNIMPL: optname=0x%x, ..)\n", + s, optname)); + err = ENOPROTOOPT; + break; + } /* switch (optname) */ + break; default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_RAW, UNIMPL: optname=0x%x, ..)\n", - s, optname)); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, level=0x%x, UNIMPL: optname=0x%x, ..)\n", + s, level, optname)); err = ENOPROTOOPT; break; - } /* switch (optname) */ - break; - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, level=0x%x, UNIMPL: optname=0x%x, ..)\n", - s, level, optname)); - err = ENOPROTOOPT; - break; } /* switch (level) */ + done_socket(sock); return err; } int lwip_setsockopt(int s, int level, int optname, const void *optval, socklen_t optlen) { - u8_t err = 0; + int err = 0; struct lwip_sock *sock = get_socket(s); #if !LWIP_TCPIP_CORE_LOCKING + err_t cberr; LWIP_SETGETSOCKOPT_DATA_VAR_DECLARE(data); #endif /* !LWIP_TCPIP_CORE_LOCKING */ @@ -2206,6 +3217,7 @@ lwip_setsockopt(int s, int level, int optname, const void *optval, socklen_t opt if (NULL == optval) { sock_set_errno(sock, EFAULT); + done_socket(sock); return -1; } @@ -2221,6 +3233,7 @@ lwip_setsockopt(int s, int level, int optname, const void *optval, socklen_t opt /* MPU_COMPATIBLE copies the optval data, so check for max size here */ if (optlen > LWIP_SETGETSOCKOPT_MAXOPTLEN) { sock_set_errno(sock, ENOBUFS); + done_socket(sock); return -1; } #endif /* LWIP_MPU_COMPATIBLE */ @@ -2233,7 +3246,7 @@ lwip_setsockopt(int s, int level, int optname, const void *optval, socklen_t opt #if LWIP_MPU_COMPATIBLE MEMCPY(LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optval, optval, optlen); #else /* LWIP_MPU_COMPATIBLE */ - LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optval.pc = (const void*)optval; + LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optval.pc = (const void *)optval; #endif /* LWIP_MPU_COMPATIBLE */ LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).err = 0; #if LWIP_NETCONN_SEM_PER_THREAD @@ -2241,13 +3254,14 @@ lwip_setsockopt(int s, int level, int optname, const void *optval, socklen_t opt #else LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).completed_sem = &sock->conn->op_completed; #endif - err = tcpip_callback(lwip_setsockopt_callback, &LWIP_SETGETSOCKOPT_DATA_VAR_REF(data)); - if (err != ERR_OK) { + cberr = tcpip_callback(lwip_setsockopt_callback, &LWIP_SETGETSOCKOPT_DATA_VAR_REF(data)); + if (cberr != ERR_OK) { LWIP_SETGETSOCKOPT_DATA_VAR_FREE(data); - sock_set_errno(sock, err_to_errno(err)); + sock_set_errno(sock, err_to_errno(cberr)); + done_socket(sock); return -1; } - sys_arch_sem_wait((sys_sem_t*)(LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).completed_sem), 0); + sys_arch_sem_wait((sys_sem_t *)(LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).completed_sem), 0); /* maybe lwip_getsockopt_internal has changed err */ err = LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).err; @@ -2255,6 +3269,7 @@ lwip_setsockopt(int s, int level, int optname, const void *optval, socklen_t opt #endif /* LWIP_TCPIP_CORE_LOCKING */ sock_set_errno(sock, err); + done_socket(sock); return err ? -1 : 0; } @@ -2267,347 +3282,460 @@ lwip_setsockopt_callback(void *arg) { struct lwip_setgetsockopt_data *data; LWIP_ASSERT("arg != NULL", arg != NULL); - data = (struct lwip_setgetsockopt_data*)arg; + data = (struct lwip_setgetsockopt_data *)arg; data->err = lwip_setsockopt_impl(data->s, data->level, data->optname, #if LWIP_MPU_COMPATIBLE - data->optval, + data->optval, #else /* LWIP_MPU_COMPATIBLE */ - data->optval.pc, + data->optval.pc, #endif /* LWIP_MPU_COMPATIBLE */ - data->optlen); + data->optlen); - sys_sem_signal((sys_sem_t*)(data->completed_sem)); + sys_sem_signal((sys_sem_t *)(data->completed_sem)); } #endif /* LWIP_TCPIP_CORE_LOCKING */ /** lwip_setsockopt_impl: the actual implementation of setsockopt: * same argument as lwip_setsockopt, either called directly or through callback */ -static u8_t +static int lwip_setsockopt_impl(int s, int level, int optname, const void *optval, socklen_t optlen) { - u8_t err = 0; + int err = 0; struct lwip_sock *sock = tryget_socket(s); if (!sock) { return EBADF; } +#ifdef LWIP_HOOK_SOCKETS_SETSOCKOPT + if (LWIP_HOOK_SOCKETS_SETSOCKOPT(s, sock, level, optname, optval, optlen, &err)) { + return err; + } +#endif + switch (level) { -/* Level: SOL_SOCKET */ - case SOL_SOCKET: - switch (optname) { + /* Level: SOL_SOCKET */ + case SOL_SOCKET: + switch (optname) { - /* SO_ACCEPTCONN is get-only */ + /* SO_ACCEPTCONN is get-only */ - /* The option flags */ - case SO_BROADCAST: - case SO_KEEPALIVE: + /* The option flags */ + case SO_BROADCAST: + case SO_KEEPALIVE: #if SO_REUSE - case SO_REUSEADDR: + case SO_REUSEADDR: #endif /* SO_REUSE */ - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, int); - if (*(const int*)optval) { - ip_set_option(sock->conn->pcb.ip, optname); - } else { - ip_reset_option(sock->conn->pcb.ip, optname); - } - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, SOL_SOCKET, optname=0x%x, ..) -> %s\n", - s, optname, (*(const int*)optval?"on":"off"))); - break; + if ((optname == SO_BROADCAST) && + (NETCONNTYPE_GROUP(sock->conn->type) != NETCONN_UDP)) { + done_socket(sock); + return ENOPROTOOPT; + } - /* SO_TYPE is get-only */ - /* SO_ERROR is get-only */ + optname = lwip_sockopt_to_ipopt(optname); + + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, int); + if (*(const int *)optval) { + ip_set_option(sock->conn->pcb.ip, optname); + } else { + ip_reset_option(sock->conn->pcb.ip, optname); + } + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, SOL_SOCKET, optname=0x%x, ..) -> %s\n", + s, optname, (*(const int *)optval ? "on" : "off"))); + break; + + /* SO_TYPE is get-only */ + /* SO_ERROR is get-only */ #if LWIP_SO_SNDTIMEO - case SO_SNDTIMEO: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, optlen, LWIP_SO_SNDRCVTIMEO_OPTTYPE); - netconn_set_sendtimeout(sock->conn, LWIP_SO_SNDRCVTIMEO_GET_MS(optval)); - break; -#endif /* LWIP_SO_SNDTIMEO */ -#if LWIP_SO_RCVTIMEO - case SO_RCVTIMEO: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, optlen, LWIP_SO_SNDRCVTIMEO_OPTTYPE); - netconn_set_recvtimeout(sock->conn, (int)LWIP_SO_SNDRCVTIMEO_GET_MS(optval)); - break; -#endif /* LWIP_SO_RCVTIMEO */ -#if LWIP_SO_RCVBUF - case SO_RCVBUF: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, optlen, int); - netconn_set_recvbufsize(sock->conn, *(const int*)optval); - break; -#endif /* LWIP_SO_RCVBUF */ -#if LWIP_SO_LINGER - case SO_LINGER: - { - const struct linger* linger = (const struct linger*)optval; - LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, optlen, struct linger); - if (linger->l_onoff) { - int lingersec = linger->l_linger; - if (lingersec < 0) { + case SO_SNDTIMEO: { + long ms_long; + LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, optlen, LWIP_SO_SNDRCVTIMEO_OPTTYPE); + ms_long = LWIP_SO_SNDRCVTIMEO_GET_MS(optval); + if (ms_long < 0) { + done_socket(sock); return EINVAL; } - if (lingersec > 0xFFFF) { - lingersec = 0xFFFF; - } - sock->conn->linger = (s16_t)lingersec; - } else { - sock->conn->linger = -1; + netconn_set_sendtimeout(sock->conn, ms_long); + break; } - } - break; +#endif /* LWIP_SO_SNDTIMEO */ +#if LWIP_SO_RCVTIMEO + case SO_RCVTIMEO: { + long ms_long; + LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, optlen, LWIP_SO_SNDRCVTIMEO_OPTTYPE); + ms_long = LWIP_SO_SNDRCVTIMEO_GET_MS(optval); + if (ms_long < 0) { + done_socket(sock); + return EINVAL; + } + netconn_set_recvtimeout(sock->conn, (u32_t)ms_long); + break; + } +#endif /* LWIP_SO_RCVTIMEO */ +#if LWIP_SO_RCVBUF + case SO_RCVBUF: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, optlen, int); + netconn_set_recvbufsize(sock->conn, *(const int *)optval); + break; +#endif /* LWIP_SO_RCVBUF */ +#if LWIP_SO_LINGER + case SO_LINGER: { + const struct linger *linger = (const struct linger *)optval; + LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, optlen, struct linger); + if (linger->l_onoff) { + int lingersec = linger->l_linger; + if (lingersec < 0) { + done_socket(sock); + return EINVAL; + } + if (lingersec > 0xFFFF) { + lingersec = 0xFFFF; + } + sock->conn->linger = (s16_t)lingersec; + } else { + sock->conn->linger = -1; + } + } + break; #endif /* LWIP_SO_LINGER */ #if LWIP_UDP - case SO_NO_CHECK: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, int, NETCONN_UDP); + case SO_NO_CHECK: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, int, NETCONN_UDP); #if LWIP_UDPLITE - if ((udp_flags(sock->conn->pcb.udp) & UDP_FLAGS_UDPLITE) != 0) { - /* this flag is only available for UDP, not for UDP lite */ - return EAFNOSUPPORT; - } -#endif /* LWIP_UDPLITE */ - if (*(const int*)optval) { - udp_setflags(sock->conn->pcb.udp, udp_flags(sock->conn->pcb.udp) | UDP_FLAGS_NOCHKSUM); - } else { - udp_setflags(sock->conn->pcb.udp, udp_flags(sock->conn->pcb.udp) & ~UDP_FLAGS_NOCHKSUM); - } - break; -#endif /* LWIP_UDP */ - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, SOL_SOCKET, UNIMPL: optname=0x%x, ..)\n", - s, optname)); - err = ENOPROTOOPT; - break; - } /* switch (optname) */ - break; - -/* Level: IPPROTO_IP */ - case IPPROTO_IP: - switch (optname) { - case IP_TTL: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, int); - sock->conn->pcb.ip->ttl = (u8_t)(*(const int*)optval); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_IP, IP_TTL, ..) -> %d\n", - s, sock->conn->pcb.ip->ttl)); - break; - case IP_TOS: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, int); - sock->conn->pcb.ip->tos = (u8_t)(*(const int*)optval); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_IP, IP_TOS, ..)-> %d\n", - s, sock->conn->pcb.ip->tos)); - break; -#if LWIP_MULTICAST_TX_OPTIONS - case IP_MULTICAST_TTL: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, u8_t, NETCONN_UDP); - udp_set_multicast_ttl(sock->conn->pcb.udp, (u8_t)(*(const u8_t*)optval)); - break; - case IP_MULTICAST_IF: - { - ip4_addr_t if_addr; - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, struct in_addr, NETCONN_UDP); - inet_addr_to_ip4addr(&if_addr, (const struct in_addr*)optval); - udp_set_multicast_netif_addr(sock->conn->pcb.udp, &if_addr); - } - break; - case IP_MULTICAST_LOOP: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, u8_t, NETCONN_UDP); - if (*(const u8_t*)optval) { - udp_setflags(sock->conn->pcb.udp, udp_flags(sock->conn->pcb.udp) | UDP_FLAGS_MULTICAST_LOOP); - } else { - udp_setflags(sock->conn->pcb.udp, udp_flags(sock->conn->pcb.udp) & ~UDP_FLAGS_MULTICAST_LOOP); - } - break; -#endif /* LWIP_MULTICAST_TX_OPTIONS */ -#if LWIP_IGMP - case IP_ADD_MEMBERSHIP: - case IP_DROP_MEMBERSHIP: - { - /* If this is a TCP or a RAW socket, ignore these options. */ - /* @todo: assign membership to this socket so that it is dropped when closing the socket */ - err_t igmp_err; - const struct ip_mreq *imr = (const struct ip_mreq *)optval; - ip4_addr_t if_addr; - ip4_addr_t multi_addr; - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, struct ip_mreq, NETCONN_UDP); - inet_addr_to_ip4addr(&if_addr, &imr->imr_interface); - inet_addr_to_ip4addr(&multi_addr, &imr->imr_multiaddr); - if (optname == IP_ADD_MEMBERSHIP) { - if (!lwip_socket_register_membership(s, &if_addr, &multi_addr)) { - /* cannot track membership (out of memory) */ - err = ENOMEM; - igmp_err = ERR_OK; - } else { - igmp_err = igmp_joingroup(&if_addr, &multi_addr); + if (udp_is_flag_set(sock->conn->pcb.udp, UDP_FLAGS_UDPLITE)) { + /* this flag is only available for UDP, not for UDP lite */ + done_socket(sock); + return EAFNOSUPPORT; + } +#endif /* LWIP_UDPLITE */ + if (*(const int *)optval) { + udp_set_flags(sock->conn->pcb.udp, UDP_FLAGS_NOCHKSUM); + } else { + udp_clear_flags(sock->conn->pcb.udp, UDP_FLAGS_NOCHKSUM); + } + break; +#endif /* LWIP_UDP */ + case SO_BINDTODEVICE: { + const struct ifreq *iface; + struct netif *n = NULL; + + LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, optlen, struct ifreq); + + iface = (const struct ifreq *)optval; + if (iface->ifr_name[0] != 0) { + n = netif_find(iface->ifr_name); + if (n == NULL) { + done_socket(sock); + return ENODEV; + } + } + + switch (NETCONNTYPE_GROUP(netconn_type(sock->conn))) { +#if LWIP_TCP + case NETCONN_TCP: + tcp_bind_netif(sock->conn->pcb.tcp, n); + break; +#endif +#if LWIP_UDP + case NETCONN_UDP: + udp_bind_netif(sock->conn->pcb.udp, n); + break; +#endif +#if LWIP_RAW + case NETCONN_RAW: + raw_bind_netif(sock->conn->pcb.raw, n); + break; +#endif + default: + LWIP_ASSERT("Unhandled netconn type in SO_BINDTODEVICE", 0); + break; } - } else { - igmp_err = igmp_leavegroup(&if_addr, &multi_addr); - lwip_socket_unregister_membership(s, &if_addr, &multi_addr); } - if (igmp_err != ERR_OK) { - err = EADDRNOTAVAIL; - } - } + break; + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, SOL_SOCKET, UNIMPL: optname=0x%x, ..)\n", + s, optname)); + err = ENOPROTOOPT; + break; + } /* switch (optname) */ break; + + /* Level: IPPROTO_IP */ + case IPPROTO_IP: + switch (optname) { + case IP_TTL: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, int); + sock->conn->pcb.ip->ttl = (u8_t)(*(const int *)optval); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_IP, IP_TTL, ..) -> %d\n", + s, sock->conn->pcb.ip->ttl)); + break; + case IP_TOS: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, int); + sock->conn->pcb.ip->tos = (u8_t)(*(const int *)optval); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_IP, IP_TOS, ..)-> %d\n", + s, sock->conn->pcb.ip->tos)); + break; +#if LWIP_NETBUF_RECVINFO + case IP_PKTINFO: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, int, NETCONN_UDP); + if (*(const int *)optval) { + sock->conn->flags |= NETCONN_FLAG_PKTINFO; + } else { + sock->conn->flags &= ~NETCONN_FLAG_PKTINFO; + } + break; +#endif /* LWIP_NETBUF_RECVINFO */ +#if LWIP_IPV4 && LWIP_MULTICAST_TX_OPTIONS && LWIP_UDP + case IP_MULTICAST_TTL: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, u8_t, NETCONN_UDP); + udp_set_multicast_ttl(sock->conn->pcb.udp, (u8_t)(*(const u8_t *)optval)); + break; + case IP_MULTICAST_IF: { + ip4_addr_t if_addr; + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, struct in_addr, NETCONN_UDP); + inet_addr_to_ip4addr(&if_addr, (const struct in_addr *)optval); + udp_set_multicast_netif_addr(sock->conn->pcb.udp, &if_addr); + } + break; + case IP_MULTICAST_LOOP: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, u8_t, NETCONN_UDP); + if (*(const u8_t *)optval) { + udp_set_flags(sock->conn->pcb.udp, UDP_FLAGS_MULTICAST_LOOP); + } else { + udp_clear_flags(sock->conn->pcb.udp, UDP_FLAGS_MULTICAST_LOOP); + } + break; +#endif /* LWIP_IPV4 && LWIP_MULTICAST_TX_OPTIONS && LWIP_UDP */ +#if LWIP_IGMP + case IP_ADD_MEMBERSHIP: + case IP_DROP_MEMBERSHIP: { + /* If this is a TCP or a RAW socket, ignore these options. */ + err_t igmp_err; + const struct ip_mreq *imr = (const struct ip_mreq *)optval; + ip4_addr_t if_addr; + ip4_addr_t multi_addr; + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, struct ip_mreq, NETCONN_UDP); + inet_addr_to_ip4addr(&if_addr, &imr->imr_interface); + inet_addr_to_ip4addr(&multi_addr, &imr->imr_multiaddr); + if (optname == IP_ADD_MEMBERSHIP) { + if (!lwip_socket_register_membership(s, &if_addr, &multi_addr)) { + /* cannot track membership (out of memory) */ + err = ENOMEM; + igmp_err = ERR_OK; + } else { + igmp_err = igmp_joingroup(&if_addr, &multi_addr); + } + } else { + igmp_err = igmp_leavegroup(&if_addr, &multi_addr); + lwip_socket_unregister_membership(s, &if_addr, &multi_addr); + } + if (igmp_err != ERR_OK) { + err = EADDRNOTAVAIL; + } + } + break; #endif /* LWIP_IGMP */ - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_IP, UNIMPL: optname=0x%x, ..)\n", - s, optname)); - err = ENOPROTOOPT; + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_IP, UNIMPL: optname=0x%x, ..)\n", + s, optname)); + err = ENOPROTOOPT; + break; + } /* switch (optname) */ break; - } /* switch (optname) */ - break; #if LWIP_TCP -/* Level: IPPROTO_TCP */ - case IPPROTO_TCP: - /* Special case: all IPPROTO_TCP option take an int */ - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, int, NETCONN_TCP); - if (sock->conn->pcb.tcp->state == LISTEN) { - return EINVAL; - } - switch (optname) { - case TCP_NODELAY: - if (*(const int*)optval) { - tcp_nagle_disable(sock->conn->pcb.tcp); - } else { - tcp_nagle_enable(sock->conn->pcb.tcp); + /* Level: IPPROTO_TCP */ + case IPPROTO_TCP: + /* Special case: all IPPROTO_TCP option take an int */ + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, int, NETCONN_TCP); + if (sock->conn->pcb.tcp->state == LISTEN) { + done_socket(sock); + return EINVAL; } - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_TCP, TCP_NODELAY) -> %s\n", - s, (*(const int *)optval)?"on":"off") ); - break; - case TCP_KEEPALIVE: - sock->conn->pcb.tcp->keep_idle = (u32_t)(*(const int*)optval); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_TCP, TCP_KEEPALIVE) -> %"U32_F"\n", - s, sock->conn->pcb.tcp->keep_idle)); - break; + switch (optname) { + case TCP_NODELAY: + if (*(const int *)optval) { + tcp_nagle_disable(sock->conn->pcb.tcp); + } else { + tcp_nagle_enable(sock->conn->pcb.tcp); + } + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_TCP, TCP_NODELAY) -> %s\n", + s, (*(const int *)optval) ? "on" : "off") ); + break; + case TCP_KEEPALIVE: + sock->conn->pcb.tcp->keep_idle = (u32_t)(*(const int *)optval); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_TCP, TCP_KEEPALIVE) -> %"U32_F"\n", + s, sock->conn->pcb.tcp->keep_idle)); + break; #if LWIP_TCP_KEEPALIVE - case TCP_KEEPIDLE: - sock->conn->pcb.tcp->keep_idle = 1000*(u32_t)(*(const int*)optval); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_TCP, TCP_KEEPIDLE) -> %"U32_F"\n", - s, sock->conn->pcb.tcp->keep_idle)); - break; - case TCP_KEEPINTVL: - sock->conn->pcb.tcp->keep_intvl = 1000*(u32_t)(*(const int*)optval); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_TCP, TCP_KEEPINTVL) -> %"U32_F"\n", - s, sock->conn->pcb.tcp->keep_intvl)); - break; - case TCP_KEEPCNT: - sock->conn->pcb.tcp->keep_cnt = (u32_t)(*(const int*)optval); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_TCP, TCP_KEEPCNT) -> %"U32_F"\n", - s, sock->conn->pcb.tcp->keep_cnt)); - break; + case TCP_KEEPIDLE: + sock->conn->pcb.tcp->keep_idle = 1000 * (u32_t)(*(const int *)optval); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_TCP, TCP_KEEPIDLE) -> %"U32_F"\n", + s, sock->conn->pcb.tcp->keep_idle)); + break; + case TCP_KEEPINTVL: + sock->conn->pcb.tcp->keep_intvl = 1000 * (u32_t)(*(const int *)optval); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_TCP, TCP_KEEPINTVL) -> %"U32_F"\n", + s, sock->conn->pcb.tcp->keep_intvl)); + break; + case TCP_KEEPCNT: + sock->conn->pcb.tcp->keep_cnt = (u32_t)(*(const int *)optval); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_TCP, TCP_KEEPCNT) -> %"U32_F"\n", + s, sock->conn->pcb.tcp->keep_cnt)); + break; #endif /* LWIP_TCP_KEEPALIVE */ - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_TCP, UNIMPL: optname=0x%x, ..)\n", - s, optname)); - err = ENOPROTOOPT; + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_TCP, UNIMPL: optname=0x%x, ..)\n", + s, optname)); + err = ENOPROTOOPT; + break; + } /* switch (optname) */ break; - } /* switch (optname) */ - break; #endif /* LWIP_TCP*/ #if LWIP_IPV6 -/* Level: IPPROTO_IPV6 */ - case IPPROTO_IPV6: - switch (optname) { - case IPV6_V6ONLY: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, int, NETCONN_TCP); - if (*(const int*)optval) { - netconn_set_ipv6only(sock->conn, 1); - } else { - netconn_set_ipv6only(sock->conn, 0); - } - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_IPV6, IPV6_V6ONLY, ..) -> %d\n", - s, (netconn_get_ipv6only(sock->conn) ? 1 : 0))); + /* Level: IPPROTO_IPV6 */ + case IPPROTO_IPV6: + switch (optname) { + case IPV6_V6ONLY: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, int); + if (*(const int *)optval) { + netconn_set_ipv6only(sock->conn, 1); + } else { + netconn_set_ipv6only(sock->conn, 0); + } + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_IPV6, IPV6_V6ONLY, ..) -> %d\n", + s, (netconn_get_ipv6only(sock->conn) ? 1 : 0))); + break; +#if LWIP_IPV6_MLD + case IPV6_JOIN_GROUP: + case IPV6_LEAVE_GROUP: { + /* If this is a TCP or a RAW socket, ignore these options. */ + err_t mld6_err; + struct netif *netif; + ip6_addr_t multi_addr; + const struct ipv6_mreq *imr = (const struct ipv6_mreq *)optval; + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, struct ipv6_mreq, NETCONN_UDP); + inet6_addr_to_ip6addr(&multi_addr, &imr->ipv6mr_multiaddr); + LWIP_ASSERT("Invalid netif index", imr->ipv6mr_interface <= 0xFFu); + netif = netif_get_by_index((u8_t)imr->ipv6mr_interface); + if (netif == NULL) { + err = EADDRNOTAVAIL; + break; + } + + if (optname == IPV6_JOIN_GROUP) { + if (!lwip_socket_register_mld6_membership(s, imr->ipv6mr_interface, &multi_addr)) { + /* cannot track membership (out of memory) */ + err = ENOMEM; + mld6_err = ERR_OK; + } else { + mld6_err = mld6_joingroup_netif(netif, &multi_addr); + } + } else { + mld6_err = mld6_leavegroup_netif(netif, &multi_addr); + lwip_socket_unregister_mld6_membership(s, imr->ipv6mr_interface, &multi_addr); + } + if (mld6_err != ERR_OK) { + err = EADDRNOTAVAIL; + } + } + break; +#endif /* LWIP_IPV6_MLD */ + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_IPV6, UNIMPL: optname=0x%x, ..)\n", + s, optname)); + err = ENOPROTOOPT; + break; + } /* switch (optname) */ break; - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_IPV6, UNIMPL: optname=0x%x, ..)\n", - s, optname)); - err = ENOPROTOOPT; - break; - } /* switch (optname) */ - break; #endif /* LWIP_IPV6 */ #if LWIP_UDP && LWIP_UDPLITE - /* Level: IPPROTO_UDPLITE */ - case IPPROTO_UDPLITE: - /* Special case: all IPPROTO_UDPLITE option take an int */ - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, int); - /* If this is no UDP lite socket, ignore any options. */ - if (!NETCONNTYPE_ISUDPLITE(netconn_type(sock->conn))) { - return ENOPROTOOPT; - } - switch (optname) { - case UDPLITE_SEND_CSCOV: - if ((*(const int*)optval != 0) && ((*(const int*)optval < 8) || (*(const int*)optval > 0xffff))) { - /* don't allow illegal values! */ - sock->conn->pcb.udp->chksum_len_tx = 8; - } else { - sock->conn->pcb.udp->chksum_len_tx = (u16_t)*(const int*)optval; + /* Level: IPPROTO_UDPLITE */ + case IPPROTO_UDPLITE: + /* Special case: all IPPROTO_UDPLITE option take an int */ + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, int); + /* If this is no UDP lite socket, ignore any options. */ + if (!NETCONNTYPE_ISUDPLITE(netconn_type(sock->conn))) { + done_socket(sock); + return ENOPROTOOPT; } - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_UDPLITE, UDPLITE_SEND_CSCOV) -> %d\n", - s, (*(const int*)optval)) ); + switch (optname) { + case UDPLITE_SEND_CSCOV: + if ((*(const int *)optval != 0) && ((*(const int *)optval < 8) || (*(const int *)optval > 0xffff))) { + /* don't allow illegal values! */ + sock->conn->pcb.udp->chksum_len_tx = 8; + } else { + sock->conn->pcb.udp->chksum_len_tx = (u16_t) * (const int *)optval; + } + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_UDPLITE, UDPLITE_SEND_CSCOV) -> %d\n", + s, (*(const int *)optval)) ); + break; + case UDPLITE_RECV_CSCOV: + if ((*(const int *)optval != 0) && ((*(const int *)optval < 8) || (*(const int *)optval > 0xffff))) { + /* don't allow illegal values! */ + sock->conn->pcb.udp->chksum_len_rx = 8; + } else { + sock->conn->pcb.udp->chksum_len_rx = (u16_t) * (const int *)optval; + } + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_UDPLITE, UDPLITE_RECV_CSCOV) -> %d\n", + s, (*(const int *)optval)) ); + break; + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_UDPLITE, UNIMPL: optname=0x%x, ..)\n", + s, optname)); + err = ENOPROTOOPT; + break; + } /* switch (optname) */ break; - case UDPLITE_RECV_CSCOV: - if ((*(const int*)optval != 0) && ((*(const int*)optval < 8) || (*(const int*)optval > 0xffff))) { - /* don't allow illegal values! */ - sock->conn->pcb.udp->chksum_len_rx = 8; - } else { - sock->conn->pcb.udp->chksum_len_rx = (u16_t)*(const int*)optval; - } - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_UDPLITE, UDPLITE_RECV_CSCOV) -> %d\n", - s, (*(const int*)optval)) ); - break; - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_UDPLITE, UNIMPL: optname=0x%x, ..)\n", - s, optname)); - err = ENOPROTOOPT; - break; - } /* switch (optname) */ - break; #endif /* LWIP_UDP */ - /* Level: IPPROTO_RAW */ - case IPPROTO_RAW: - switch (optname) { + /* Level: IPPROTO_RAW */ + case IPPROTO_RAW: + switch (optname) { #if LWIP_IPV6 && LWIP_RAW - case IPV6_CHECKSUM: - /* It should not be possible to disable the checksum generation with ICMPv6 - * as per RFC 3542 chapter 3.1 */ - if(sock->conn->pcb.raw->protocol == IPPROTO_ICMPV6) { - return EINVAL; - } + case IPV6_CHECKSUM: + /* It should not be possible to disable the checksum generation with ICMPv6 + * as per RFC 3542 chapter 3.1 */ + if (sock->conn->pcb.raw->protocol == IPPROTO_ICMPV6) { + done_socket(sock); + return EINVAL; + } - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, int, NETCONN_RAW); - if (*(const int *)optval < 0) { - sock->conn->pcb.raw->chksum_reqd = 0; - } else if (*(const int *)optval & 1) { - /* Per RFC3542, odd offsets are not allowed */ - return EINVAL; - } else { - sock->conn->pcb.raw->chksum_reqd = 1; - sock->conn->pcb.raw->chksum_offset = (u16_t)*(const int *)optval; - } - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_RAW, IPV6_CHECKSUM, ..) -> %d\n", - s, sock->conn->pcb.raw->chksum_reqd)); - break; + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, int, NETCONN_RAW); + if (*(const int *)optval < 0) { + sock->conn->pcb.raw->chksum_reqd = 0; + } else if (*(const int *)optval & 1) { + /* Per RFC3542, odd offsets are not allowed */ + done_socket(sock); + return EINVAL; + } else { + sock->conn->pcb.raw->chksum_reqd = 1; + sock->conn->pcb.raw->chksum_offset = (u16_t) * (const int *)optval; + } + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_RAW, IPV6_CHECKSUM, ..) -> %d\n", + s, sock->conn->pcb.raw->chksum_reqd)); + break; #endif /* LWIP_IPV6 && LWIP_RAW */ + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_RAW, UNIMPL: optname=0x%x, ..)\n", + s, optname)); + err = ENOPROTOOPT; + break; + } /* switch (optname) */ + break; default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_RAW, UNIMPL: optname=0x%x, ..)\n", - s, optname)); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, level=0x%x, UNIMPL: optname=0x%x, ..)\n", + s, level, optname)); err = ENOPROTOOPT; break; - } /* switch (optname) */ - break; - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, level=0x%x, UNIMPL: optname=0x%x, ..)\n", - s, level, optname)); - err = ENOPROTOOPT; - break; } /* switch (level) */ + done_socket(sock); return err; } @@ -2617,7 +3745,6 @@ lwip_ioctl(int s, long cmd, void *argp) struct lwip_sock *sock = get_socket(s); u8_t val; #if LWIP_SO_RCVBUF - u16_t buflen = 0; int recv_avail; #endif /* LWIP_SO_RCVBUF */ @@ -2627,120 +3754,230 @@ lwip_ioctl(int s, long cmd, void *argp) switch (cmd) { #if LWIP_SO_RCVBUF || LWIP_FIONREAD_LINUXMODE - case FIONREAD: - if (!argp) { - sock_set_errno(sock, EINVAL); - return -1; - } + case FIONREAD: + if (!argp) { + sock_set_errno(sock, EINVAL); + done_socket(sock); + return -1; + } #if LWIP_FIONREAD_LINUXMODE - if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) { - struct pbuf *p; - if (sock->lastdata) { - p = ((struct netbuf *)sock->lastdata)->p; - *((int*)argp) = p->tot_len - sock->lastoffset; - } else { - struct netbuf *rxbuf; - err_t err; - if (sock->rcvevent <= 0) { - *((int*)argp) = 0; + if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) { + struct netbuf *nb; + if (sock->lastdata.netbuf) { + nb = sock->lastdata.netbuf; + *((int *)argp) = nb->p->tot_len; } else { - err = netconn_recv(sock->conn, &rxbuf); + struct netbuf *rxbuf; + err_t err = netconn_recv_udp_raw_netbuf_flags(sock->conn, &rxbuf, NETCONN_DONTBLOCK); if (err != ERR_OK) { - *((int*)argp) = 0; + *((int *)argp) = 0; } else { - sock->lastdata = rxbuf; - sock->lastoffset = 0; - *((int*)argp) = rxbuf->p->tot_len; + sock->lastdata.netbuf = rxbuf; + *((int *)argp) = rxbuf->p->tot_len; } } + done_socket(sock); + return 0; } - return 0; - } #endif /* LWIP_FIONREAD_LINUXMODE */ #if LWIP_SO_RCVBUF - /* we come here if either LWIP_FIONREAD_LINUXMODE==0 or this is a TCP socket */ - SYS_ARCH_GET(sock->conn->recv_avail, recv_avail); - if (recv_avail < 0) { - recv_avail = 0; - } - *((int*)argp) = recv_avail; - - /* Check if there is data left from the last recv operation. /maq 041215 */ - if (sock->lastdata) { - struct pbuf *p = (struct pbuf *)sock->lastdata; - if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) { - p = ((struct netbuf *)p)->p; + /* we come here if either LWIP_FIONREAD_LINUXMODE==0 or this is a TCP socket */ + SYS_ARCH_GET(sock->conn->recv_avail, recv_avail); + if (recv_avail < 0) { + recv_avail = 0; } - buflen = p->tot_len; - buflen -= sock->lastoffset; - *((int*)argp) += buflen; - } + /* Check if there is data left from the last recv operation. /maq 041215 */ + if (sock->lastdata.netbuf) { + if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { + recv_avail += sock->lastdata.pbuf->tot_len; + } else { + recv_avail += sock->lastdata.netbuf->p->tot_len; + } + } + *((int *)argp) = recv_avail; - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_ioctl(%d, FIONREAD, %p) = %"U16_F"\n", s, argp, *((u16_t*)argp))); - sock_set_errno(sock, 0); - return 0; + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_ioctl(%d, FIONREAD, %p) = %"U16_F"\n", s, argp, *((u16_t *)argp))); + sock_set_errno(sock, 0); + done_socket(sock); + return 0; #else /* LWIP_SO_RCVBUF */ - break; + break; #endif /* LWIP_SO_RCVBUF */ #endif /* LWIP_SO_RCVBUF || LWIP_FIONREAD_LINUXMODE */ - case (long)FIONBIO: - val = 0; - if (argp && *(u32_t*)argp) { - val = 1; - } - netconn_set_nonblocking(sock->conn, val); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_ioctl(%d, FIONBIO, %d)\n", s, val)); - sock_set_errno(sock, 0); - return 0; + case (long)FIONBIO: + val = 0; + if (argp && *(int *)argp) { + val = 1; + } + netconn_set_nonblocking(sock->conn, val); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_ioctl(%d, FIONBIO, %d)\n", s, val)); + sock_set_errno(sock, 0); + done_socket(sock); + return 0; - default: - break; + default: + break; } /* switch (cmd) */ LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_ioctl(%d, UNIMPL: 0x%lx, %p)\n", s, cmd, argp)); sock_set_errno(sock, ENOSYS); /* not yet implemented */ + done_socket(sock); return -1; } /** A minimal implementation of fcntl. * Currently only the commands F_GETFL and F_SETFL are implemented. - * Only the flag O_NONBLOCK is implemented. + * The flag O_NONBLOCK and access modes are supported for F_GETFL, only + * the flag O_NONBLOCK is implemented for F_SETFL. */ int lwip_fcntl(int s, int cmd, int val) { struct lwip_sock *sock = get_socket(s); int ret = -1; + int op_mode = 0; if (!sock) { return -1; } switch (cmd) { - case F_GETFL: - ret = netconn_is_nonblocking(sock->conn) ? O_NONBLOCK : 0; - sock_set_errno(sock, 0); - break; - case F_SETFL: - if ((val & ~O_NONBLOCK) == 0) { - /* only O_NONBLOCK, all other bits are zero */ - netconn_set_nonblocking(sock->conn, val & O_NONBLOCK); - ret = 0; + case F_GETFL: + ret = netconn_is_nonblocking(sock->conn) ? O_NONBLOCK : 0; sock_set_errno(sock, 0); - } else { + + if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { +#if LWIP_TCPIP_CORE_LOCKING + LOCK_TCPIP_CORE(); +#else + SYS_ARCH_DECL_PROTECT(lev); + /* the proper thing to do here would be to get into the tcpip_thread, + but locking should be OK as well since we only *read* some flags */ + SYS_ARCH_PROTECT(lev); +#endif +#if LWIP_TCP + if (sock->conn->pcb.tcp) { + if (!(sock->conn->pcb.tcp->flags & TF_RXCLOSED)) { + op_mode |= O_RDONLY; + } + if (!(sock->conn->pcb.tcp->flags & TF_FIN)) { + op_mode |= O_WRONLY; + } + } +#endif +#if LWIP_TCPIP_CORE_LOCKING + UNLOCK_TCPIP_CORE(); +#else + SYS_ARCH_UNPROTECT(lev); +#endif + } else { + op_mode |= O_RDWR; + } + + /* ensure O_RDWR for (O_RDONLY|O_WRONLY) != O_RDWR cases */ + ret |= (op_mode == (O_RDONLY | O_WRONLY)) ? O_RDWR : op_mode; + + break; + case F_SETFL: + /* Bits corresponding to the file access mode and the file creation flags [..] that are set in arg shall be ignored */ + val &= ~(O_RDONLY | O_WRONLY | O_RDWR); + if ((val & ~O_NONBLOCK) == 0) { + /* only O_NONBLOCK, all other bits are zero */ + netconn_set_nonblocking(sock->conn, val & O_NONBLOCK); + ret = 0; + sock_set_errno(sock, 0); + } else { + sock_set_errno(sock, ENOSYS); /* not yet implemented */ + } + break; + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_fcntl(%d, UNIMPL: %d, %d)\n", s, cmd, val)); sock_set_errno(sock, ENOSYS); /* not yet implemented */ - } - break; - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_fcntl(%d, UNIMPL: %d, %d)\n", s, cmd, val)); - sock_set_errno(sock, ENOSYS); /* not yet implemented */ - break; + break; + } + done_socket(sock); + return ret; +} + +#if LWIP_COMPAT_SOCKETS == 2 && LWIP_POSIX_SOCKETS_IO_NAMES +int +fcntl(int s, int cmd, ...) +{ + va_list ap; + int val; + + va_start(ap, cmd); + val = va_arg(ap, int); + va_end(ap); + return lwip_fcntl(s, cmd, val); +} +#endif + +const char * +lwip_inet_ntop(int af, const void *src, char *dst, socklen_t size) +{ + const char *ret = NULL; + int size_int = (int)size; + if (size_int < 0) { + set_errno(ENOSPC); + return NULL; + } + switch (af) { +#if LWIP_IPV4 + case AF_INET: + ret = ip4addr_ntoa_r((const ip4_addr_t *)src, dst, size_int); + if (ret == NULL) { + set_errno(ENOSPC); + } + break; +#endif +#if LWIP_IPV6 + case AF_INET6: + ret = ip6addr_ntoa_r((const ip6_addr_t *)src, dst, size_int); + if (ret == NULL) { + set_errno(ENOSPC); + } + break; +#endif + default: + set_errno(EAFNOSUPPORT); + break; } return ret; } +int +lwip_inet_pton(int af, const char *src, void *dst) +{ + int err; + switch (af) { +#if LWIP_IPV4 + case AF_INET: + err = ip4addr_aton(src, (ip4_addr_t *)dst); + break; +#endif +#if LWIP_IPV6 + case AF_INET6: { + /* convert into temporary variable since ip6_addr_t might be larger + than in6_addr when scopes are enabled */ + ip6_addr_t addr; + err = ip6addr_aton(src, &addr); + if (err) { + memcpy(dst, &addr.addr, sizeof(addr.addr)); + } + break; + } +#endif + default: + err = -1; + set_errno(EAFNOSUPPORT); + break; + } + return err; +} + #if LWIP_IGMP /** Register a new IGMP membership. On socket close, the membership is dropped automatically. * @@ -2763,9 +4000,11 @@ lwip_socket_register_membership(int s, const ip4_addr_t *if_addr, const ip4_addr socket_ipv4_multicast_memberships[i].sock = sock; ip4_addr_copy(socket_ipv4_multicast_memberships[i].if_addr, *if_addr); ip4_addr_copy(socket_ipv4_multicast_memberships[i].multi_addr, *multi_addr); + done_socket(sock); return 1; } } + done_socket(sock); return 0; } @@ -2791,9 +4030,10 @@ lwip_socket_unregister_membership(int s, const ip4_addr_t *if_addr, const ip4_ad socket_ipv4_multicast_memberships[i].sock = NULL; ip4_addr_set_zero(&socket_ipv4_multicast_memberships[i].if_addr); ip4_addr_set_zero(&socket_ipv4_multicast_memberships[i].multi_addr); - return; + break; } } + done_socket(sock); } /** Drop all memberships of a socket that were not dropped explicitly via setsockopt. @@ -2822,6 +4062,99 @@ lwip_socket_drop_registered_memberships(int s) netconn_join_leave_group(sock->conn, &multi_addr, &if_addr, NETCONN_LEAVE); } } + done_socket(sock); } #endif /* LWIP_IGMP */ + +#if LWIP_IPV6_MLD +/** Register a new MLD6 membership. On socket close, the membership is dropped automatically. + * + * ATTENTION: this function is called from tcpip_thread (or under CORE_LOCK). + * + * @return 1 on success, 0 on failure + */ +static int +lwip_socket_register_mld6_membership(int s, unsigned int if_idx, const ip6_addr_t *multi_addr) +{ + struct lwip_sock *sock = get_socket(s); + int i; + + if (!sock) { + return 0; + } + + for (i = 0; i < LWIP_SOCKET_MAX_MEMBERSHIPS; i++) { + if (socket_ipv6_multicast_memberships[i].sock == NULL) { + socket_ipv6_multicast_memberships[i].sock = sock; + socket_ipv6_multicast_memberships[i].if_idx = (u8_t)if_idx; + ip6_addr_copy(socket_ipv6_multicast_memberships[i].multi_addr, *multi_addr); + done_socket(sock); + return 1; + } + } + done_socket(sock); + return 0; +} + +/** Unregister a previously registered MLD6 membership. This prevents dropping the membership + * on socket close. + * + * ATTENTION: this function is called from tcpip_thread (or under CORE_LOCK). + */ +static void +lwip_socket_unregister_mld6_membership(int s, unsigned int if_idx, const ip6_addr_t *multi_addr) +{ + struct lwip_sock *sock = get_socket(s); + int i; + + if (!sock) { + return; + } + + for (i = 0; i < LWIP_SOCKET_MAX_MEMBERSHIPS; i++) { + if ((socket_ipv6_multicast_memberships[i].sock == sock) && + (socket_ipv6_multicast_memberships[i].if_idx == if_idx) && + ip6_addr_cmp(&socket_ipv6_multicast_memberships[i].multi_addr, multi_addr)) { + socket_ipv6_multicast_memberships[i].sock = NULL; + socket_ipv6_multicast_memberships[i].if_idx = NETIF_NO_INDEX; + ip6_addr_set_zero(&socket_ipv6_multicast_memberships[i].multi_addr); + break; + } + } + done_socket(sock); +} + +/** Drop all MLD6 memberships of a socket that were not dropped explicitly via setsockopt. + * + * ATTENTION: this function is NOT called from tcpip_thread (or under CORE_LOCK). + */ +static void +lwip_socket_drop_registered_mld6_memberships(int s) +{ + struct lwip_sock *sock = get_socket(s); + int i; + + if (!sock) { + return; + } + + for (i = 0; i < LWIP_SOCKET_MAX_MEMBERSHIPS; i++) { + if (socket_ipv6_multicast_memberships[i].sock == sock) { + ip_addr_t multi_addr; + u8_t if_idx; + + ip_addr_copy_from_ip6(multi_addr, socket_ipv6_multicast_memberships[i].multi_addr); + if_idx = socket_ipv6_multicast_memberships[i].if_idx; + + socket_ipv6_multicast_memberships[i].sock = NULL; + socket_ipv6_multicast_memberships[i].if_idx = NETIF_NO_INDEX; + ip6_addr_set_zero(&socket_ipv6_multicast_memberships[i].multi_addr); + + netconn_join_leave_group_netif(sock->conn, &multi_addr, if_idx, NETCONN_LEAVE); + } + } + done_socket(sock); +} +#endif /* LWIP_IPV6_MLD */ + #endif /* LWIP_SOCKET */ diff --git a/Libraries/LwIP/src/api/tcpip.c b/Libraries/LwIP/src/api/tcpip.c index 48ba5fb..34c9a99 100755 --- a/Libraries/LwIP/src/api/tcpip.c +++ b/Libraries/LwIP/src/api/tcpip.c @@ -58,20 +58,60 @@ /* global variables */ static tcpip_init_done_fn tcpip_init_done; static void *tcpip_init_done_arg; -static sys_mbox_t mbox; +static sys_mbox_t tcpip_mbox; #if LWIP_TCPIP_CORE_LOCKING /** The global semaphore to lock the stack. */ sys_mutex_t lock_tcpip_core; #endif /* LWIP_TCPIP_CORE_LOCKING */ -#if LWIP_TIMERS -/* wait for a message, timeouts are processed while waiting */ -#define TCPIP_MBOX_FETCH(mbox, msg) sys_timeouts_mbox_fetch(mbox, msg) -#else /* LWIP_TIMERS */ +static void tcpip_thread_handle_msg(struct tcpip_msg *msg); + +#if !LWIP_TIMERS /* wait for a message with timers disabled (e.g. pass a timer-check trigger into tcpip_thread) */ #define TCPIP_MBOX_FETCH(mbox, msg) sys_mbox_fetch(mbox, msg) -#endif /* LWIP_TIMERS */ +#else /* !LWIP_TIMERS */ +/* wait for a message, timeouts are processed while waiting */ +#define TCPIP_MBOX_FETCH(mbox, msg) tcpip_timeouts_mbox_fetch(mbox, msg) +/** + * Wait (forever) for a message to arrive in an mbox. + * While waiting, timeouts are processed. + * + * @param mbox the mbox to fetch the message from + * @param msg the place to store the message + */ +static void +tcpip_timeouts_mbox_fetch(sys_mbox_t *mbox, void **msg) +{ + u32_t sleeptime, res; + +again: + LWIP_ASSERT_CORE_LOCKED(); + + sleeptime = sys_timeouts_sleeptime(); + if (sleeptime == SYS_TIMEOUTS_SLEEPTIME_INFINITE) { + UNLOCK_TCPIP_CORE(); + sys_arch_mbox_fetch(mbox, msg, 0); + LOCK_TCPIP_CORE(); + return; + } else if (sleeptime == 0) { + sys_check_timeouts(); + /* We try again to fetch a message from the mbox. */ + goto again; + } + + UNLOCK_TCPIP_CORE(); + res = sys_arch_mbox_fetch(mbox, msg, sleeptime); + LOCK_TCPIP_CORE(); + if (res == SYS_ARCH_TIMEOUT) { + /* If a SYS_ARCH_TIMEOUT value is returned, a timeout occurred + before a message could be fetched. */ + sys_check_timeouts(); + /* We try again to fetch a message from the mbox. */ + goto again; + } +} +#endif /* !LWIP_TIMERS */ /** * The main lwIP thread. This thread has exclusive access to lwIP core functions @@ -89,23 +129,33 @@ tcpip_thread(void *arg) struct tcpip_msg *msg; LWIP_UNUSED_ARG(arg); + LWIP_MARK_TCPIP_THREAD(); + + LOCK_TCPIP_CORE(); if (tcpip_init_done != NULL) { tcpip_init_done(tcpip_init_done_arg); } - LOCK_TCPIP_CORE(); while (1) { /* MAIN Loop */ - UNLOCK_TCPIP_CORE(); LWIP_TCPIP_THREAD_ALIVE(); /* wait for a message, timeouts are processed while waiting */ - TCPIP_MBOX_FETCH(&mbox, (void **)&msg); - LOCK_TCPIP_CORE(); + TCPIP_MBOX_FETCH(&tcpip_mbox, (void **)&msg); if (msg == NULL) { LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: invalid message: NULL\n")); LWIP_ASSERT("tcpip_thread: invalid message", 0); continue; } - switch (msg->type) { + tcpip_thread_handle_msg(msg); + } +} + +/* Handle a single tcpip_msg + * This is in its own function for access by tests only. + */ +static void +tcpip_thread_handle_msg(struct tcpip_msg *msg) +{ + switch (msg->type) { #if !LWIP_TCPIP_CORE_LOCKING case TCPIP_MSG_API: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: API message %p\n", (void *)msg)); @@ -121,7 +171,9 @@ tcpip_thread(void *arg) #if !LWIP_TCPIP_CORE_LOCKING_INPUT case TCPIP_MSG_INPKT: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: PACKET %p\n", (void *)msg)); - msg->msg.inp.input_fn(msg->msg.inp.p, msg->msg.inp.netif); + if (msg->msg.inp.input_fn(msg->msg.inp.p, msg->msg.inp.netif) != ERR_OK) { + pbuf_free(msg->msg.inp.p); + } memp_free(MEMP_TCPIP_MSG_INPKT, msg); break; #endif /* !LWIP_TCPIP_CORE_LOCKING_INPUT */ @@ -154,10 +206,29 @@ tcpip_thread(void *arg) LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: invalid message: %d\n", msg->type)); LWIP_ASSERT("tcpip_thread: invalid message", 0); break; - } } } +#ifdef TCPIP_THREAD_TEST +/** Work on queued items in single-threaded test mode */ +int +tcpip_thread_poll_one(void) +{ + int ret = 0; + struct tcpip_msg *msg; + + if (sys_arch_mbox_tryfetch(&tcpip_mbox, (void **)&msg) != SYS_ARCH_TIMEOUT) { + LOCK_TCPIP_CORE(); + if (msg != NULL) { + tcpip_thread_handle_msg(msg); + ret = 1; + } + UNLOCK_TCPIP_CORE(); + } + return ret; +} +#endif + /** * Pass a received packet to tcpip_thread for input processing * @@ -178,7 +249,7 @@ tcpip_inpkt(struct pbuf *p, struct netif *inp, netif_input_fn input_fn) #else /* LWIP_TCPIP_CORE_LOCKING_INPUT */ struct tcpip_msg *msg; - LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(mbox)); + LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox)); msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT); if (msg == NULL) { @@ -189,7 +260,7 @@ tcpip_inpkt(struct pbuf *p, struct netif *inp, netif_input_fn input_fn) msg->msg.inp.p = p; msg->msg.inp.netif = inp; msg->msg.inp.input_fn = input_fn; - if (sys_mbox_trypost(&mbox, msg) != ERR_OK) { + if (sys_mbox_trypost(&tcpip_mbox, msg) != ERR_OK) { memp_free(MEMP_TCPIP_MSG_INPKT, msg); return ERR_MEM; } @@ -216,26 +287,30 @@ tcpip_input(struct pbuf *p, struct netif *inp) return tcpip_inpkt(p, inp, ethernet_input); } else #endif /* LWIP_ETHERNET */ - return tcpip_inpkt(p, inp, ip_input); + return tcpip_inpkt(p, inp, ip_input); } /** + * @ingroup lwip_os * Call a specific function in the thread context of * tcpip_thread for easy access synchronization. * A function called in that way may access lwIP core code * without fearing concurrent access. + * Blocks until the request is posted. + * Must not be called from interrupt context! * * @param function the function to call * @param ctx parameter passed to f - * @param block 1 to block until the request is posted, 0 to non-blocking mode * @return ERR_OK if the function was called, another err_t if not + * + * @see tcpip_try_callback */ err_t -tcpip_callback_with_block(tcpip_callback_fn function, void *ctx, u8_t block) +tcpip_callback(tcpip_callback_fn function, void *ctx) { struct tcpip_msg *msg; - LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(mbox)); + LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox)); msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_API); if (msg == NULL) { @@ -245,13 +320,46 @@ tcpip_callback_with_block(tcpip_callback_fn function, void *ctx, u8_t block) msg->type = TCPIP_MSG_CALLBACK; msg->msg.cb.function = function; msg->msg.cb.ctx = ctx; - if (block) { - sys_mbox_post(&mbox, msg); - } else { - if (sys_mbox_trypost(&mbox, msg) != ERR_OK) { - memp_free(MEMP_TCPIP_MSG_API, msg); - return ERR_MEM; - } + + sys_mbox_post(&tcpip_mbox, msg); + return ERR_OK; +} + +/** + * @ingroup lwip_os + * Call a specific function in the thread context of + * tcpip_thread for easy access synchronization. + * A function called in that way may access lwIP core code + * without fearing concurrent access. + * Does NOT block when the request cannot be posted because the + * tcpip_mbox is full, but returns ERR_MEM instead. + * Can be called from interrupt context. + * + * @param function the function to call + * @param ctx parameter passed to f + * @return ERR_OK if the function was called, another err_t if not + * + * @see tcpip_callback + */ +err_t +tcpip_try_callback(tcpip_callback_fn function, void *ctx) +{ + struct tcpip_msg *msg; + + LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox)); + + msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_API); + if (msg == NULL) { + return ERR_MEM; + } + + msg->type = TCPIP_MSG_CALLBACK; + msg->msg.cb.function = function; + msg->msg.cb.ctx = ctx; + + if (sys_mbox_trypost(&tcpip_mbox, msg) != ERR_OK) { + memp_free(MEMP_TCPIP_MSG_API, msg); + return ERR_MEM; } return ERR_OK; } @@ -270,7 +378,7 @@ tcpip_timeout(u32_t msecs, sys_timeout_handler h, void *arg) { struct tcpip_msg *msg; - LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(mbox)); + LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox)); msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_API); if (msg == NULL) { @@ -281,7 +389,7 @@ tcpip_timeout(u32_t msecs, sys_timeout_handler h, void *arg) msg->msg.tmo.msecs = msecs; msg->msg.tmo.h = h; msg->msg.tmo.arg = arg; - sys_mbox_post(&mbox, msg); + sys_mbox_post(&tcpip_mbox, msg); return ERR_OK; } @@ -297,7 +405,7 @@ tcpip_untimeout(sys_timeout_handler h, void *arg) { struct tcpip_msg *msg; - LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(mbox)); + LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox)); msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_API); if (msg == NULL) { @@ -307,7 +415,7 @@ tcpip_untimeout(sys_timeout_handler h, void *arg) msg->type = TCPIP_MSG_UNTIMEOUT; msg->msg.tmo.h = h; msg->msg.tmo.arg = arg; - sys_mbox_post(&mbox, msg); + sys_mbox_post(&tcpip_mbox, msg); return ERR_OK; } #endif /* LWIP_TCPIP_TIMEOUT && LWIP_TIMERS */ @@ -326,7 +434,7 @@ tcpip_untimeout(sys_timeout_handler h, void *arg) * @return ERR_OK if the function was called, another err_t if not */ err_t -tcpip_send_msg_wait_sem(tcpip_callback_fn fn, void *apimsg, sys_sem_t* sem) +tcpip_send_msg_wait_sem(tcpip_callback_fn fn, void *apimsg, sys_sem_t *sem) { #if LWIP_TCPIP_CORE_LOCKING LWIP_UNUSED_ARG(sem); @@ -338,13 +446,13 @@ tcpip_send_msg_wait_sem(tcpip_callback_fn fn, void *apimsg, sys_sem_t* sem) TCPIP_MSG_VAR_DECLARE(msg); LWIP_ASSERT("semaphore not initialized", sys_sem_valid(sem)); - LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(mbox)); + LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox)); TCPIP_MSG_VAR_ALLOC(msg); TCPIP_MSG_VAR_REF(msg).type = TCPIP_MSG_API; TCPIP_MSG_VAR_REF(msg).msg.api_msg.function = fn; TCPIP_MSG_VAR_REF(msg).msg.api_msg.msg = apimsg; - sys_mbox_post(&mbox, &TCPIP_MSG_VAR_REF(msg)); + sys_mbox_post(&tcpip_mbox, &TCPIP_MSG_VAR_REF(msg)); sys_arch_sem_wait(sem, 0); TCPIP_MSG_VAR_FREE(msg); return ERR_OK; @@ -354,7 +462,7 @@ tcpip_send_msg_wait_sem(tcpip_callback_fn fn, void *apimsg, sys_sem_t* sem) /** * Synchronously calls function in TCPIP thread and waits for its completion. * It is recommended to use LWIP_TCPIP_CORE_LOCKING (preferred) or - * LWIP_NETCONN_SEM_PER_THREAD. + * LWIP_NETCONN_SEM_PER_THREAD. * If not, a semaphore is created and destroyed on every call which is usually * an expensive/slow operation. * @param fn Function to call @@ -380,7 +488,7 @@ tcpip_api_call(tcpip_api_call_fn fn, struct tcpip_api_call_data *call) } #endif /* LWIP_NETCONN_SEM_PER_THREAD */ - LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(mbox)); + LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox)); TCPIP_MSG_VAR_ALLOC(msg); TCPIP_MSG_VAR_REF(msg).type = TCPIP_MSG_API_CALL; @@ -391,7 +499,7 @@ tcpip_api_call(tcpip_api_call_fn fn, struct tcpip_api_call_data *call) #else /* LWIP_NETCONN_SEM_PER_THREAD */ TCPIP_MSG_VAR_REF(msg).msg.api_call.sem = &call->sem; #endif /* LWIP_NETCONN_SEM_PER_THREAD */ - sys_mbox_post(&mbox, &TCPIP_MSG_VAR_REF(msg)); + sys_mbox_post(&tcpip_mbox, &TCPIP_MSG_VAR_REF(msg)); sys_arch_sem_wait(TCPIP_MSG_VAR_REF(msg).msg.api_call.sem, 0); TCPIP_MSG_VAR_FREE(msg); @@ -404,14 +512,22 @@ tcpip_api_call(tcpip_api_call_fn fn, struct tcpip_api_call_data *call) } /** + * @ingroup lwip_os * Allocate a structure for a static callback message and initialize it. - * This is intended to be used to send "static" messages from interrupt context. - * + * The message has a special type such that lwIP never frees it. + * This is intended to be used to send "static" messages from interrupt context, + * e.g. the message is allocated once and posted several times from an IRQ + * using tcpip_callbackmsg_trycallback(). + * Example usage: Trigger execution of an ethernet IRQ DPC routine in lwIP thread context. + * * @param function the function to call * @param ctx parameter passed to function - * @return a struct pointer to pass to tcpip_trycallback(). + * @return a struct pointer to pass to tcpip_callbackmsg_trycallback(). + * + * @see tcpip_callbackmsg_trycallback() + * @see tcpip_callbackmsg_delete() */ -struct tcpip_callback_msg* +struct tcpip_callback_msg * tcpip_callbackmsg_new(tcpip_callback_fn function, void *ctx) { struct tcpip_msg *msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_API); @@ -421,32 +537,56 @@ tcpip_callbackmsg_new(tcpip_callback_fn function, void *ctx) msg->type = TCPIP_MSG_CALLBACK_STATIC; msg->msg.cb.function = function; msg->msg.cb.ctx = ctx; - return (struct tcpip_callback_msg*)msg; + return (struct tcpip_callback_msg *)msg; } /** + * @ingroup lwip_os * Free a callback message allocated by tcpip_callbackmsg_new(). * * @param msg the message to free + * + * @see tcpip_callbackmsg_new() */ void -tcpip_callbackmsg_delete(struct tcpip_callback_msg* msg) +tcpip_callbackmsg_delete(struct tcpip_callback_msg *msg) { memp_free(MEMP_TCPIP_MSG_API, msg); } /** - * Try to post a callback-message to the tcpip_thread mbox - * This is intended to be used to send "static" messages from interrupt context. + * @ingroup lwip_os + * Try to post a callback-message to the tcpip_thread tcpip_mbox. * * @param msg pointer to the message to post * @return sys_mbox_trypost() return code + * + * @see tcpip_callbackmsg_new() */ err_t -tcpip_trycallback(struct tcpip_callback_msg* msg) +tcpip_callbackmsg_trycallback(struct tcpip_callback_msg *msg) { - LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(mbox)); - return sys_mbox_trypost(&mbox, msg); + LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox)); + return sys_mbox_trypost(&tcpip_mbox, msg); +} + +/** + * @ingroup lwip_os + * Try to post a callback-message to the tcpip_thread mbox. + * Same as @ref tcpip_callbackmsg_trycallback but calls sys_mbox_trypost_fromisr(), + * mainly to help FreeRTOS, where calls differ between task level and ISR level. + * + * @param msg pointer to the message to post + * @return sys_mbox_trypost_fromisr() return code (without change, so this + * knowledge can be used to e.g. propagate "bool needs_scheduling") + * + * @see tcpip_callbackmsg_new() + */ +err_t +tcpip_callbackmsg_trycallback_fromisr(struct tcpip_callback_msg *msg) +{ + LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox)); + return sys_mbox_trypost_fromisr(&tcpip_mbox, msg); } /** @@ -465,7 +605,7 @@ tcpip_init(tcpip_init_done_fn initfunc, void *arg) tcpip_init_done = initfunc; tcpip_init_done_arg = arg; - if (sys_mbox_new(&mbox, TCPIP_MBOX_SIZE) != ERR_OK) { + if (sys_mbox_new(&tcpip_mbox, TCPIP_MBOX_SIZE) != ERR_OK) { LWIP_ASSERT("failed to create tcpip_thread mbox", 0); } #if LWIP_TCPIP_CORE_LOCKING @@ -499,7 +639,7 @@ pbuf_free_int(void *p) err_t pbuf_free_callback(struct pbuf *p) { - return tcpip_callback_with_block(pbuf_free_int, p, 0); + return tcpip_try_callback(pbuf_free_int, p); } /** @@ -512,7 +652,7 @@ pbuf_free_callback(struct pbuf *p) err_t mem_free_callback(void *m) { - return tcpip_callback_with_block(mem_free, m, 0); + return tcpip_try_callback(mem_free, m); } #endif /* !NO_SYS */ diff --git a/Libraries/LwIP/src/apps/altcp_tls/altcp_tls_mbedtls.c b/Libraries/LwIP/src/apps/altcp_tls/altcp_tls_mbedtls.c new file mode 100644 index 0000000..d642dec --- /dev/null +++ b/Libraries/LwIP/src/apps/altcp_tls/altcp_tls_mbedtls.c @@ -0,0 +1,1178 @@ +/** + * @file + * Application layered TCP/TLS connection API (to be used from TCPIP thread) + * + * This file provides a TLS layer using mbedTLS + */ + +/* + * Copyright (c) 2017 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + * Watch out: + * - 'sent' is always called with len==0 to the upper layer. This is because keeping + * track of the ratio of application data and TLS overhead would be too much. + * + * Mandatory security-related configuration: + * - define ALTCP_MBEDTLS_RNG_FN to mbedtls_entropy_func to use the standard mbedTLS + * entropy and ensure to add at least one strong entropy source to your mbedtls port + * (implement mbedtls_platform_entropy_poll or mbedtls_hardware_poll providing strong + * entropy) + * - define ALTCP_MBEDTLS_ENTROPY_PTR and ALTCP_MBEDTLS_ENTROPY_LEN to something providing + * GOOD custom entropy + * + * Missing things / @todo: + * - some unhandled/untested things migh be caught by LWIP_ASSERTs... + */ + +#include "lwip/opt.h" + +#if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/apps/altcp_tls_mbedtls_opts.h" + +#if LWIP_ALTCP_TLS && LWIP_ALTCP_TLS_MBEDTLS + +#include "lwip/altcp.h" +#include "lwip/altcp_tls.h" +#include "lwip/priv/altcp_priv.h" + +#include "altcp_tls_mbedtls_structs.h" +#include "altcp_tls_mbedtls_mem.h" + +/* @todo: which includes are really needed? */ +#include "mbedtls/entropy.h" +#include "mbedtls/ctr_drbg.h" +#include "mbedtls/certs.h" +#include "mbedtls/x509.h" +#include "mbedtls/ssl.h" +#include "mbedtls/net.h" +#include "mbedtls/error.h" +#include "mbedtls/debug.h" +#include "mbedtls/platform.h" +#include "mbedtls/memory_buffer_alloc.h" +#include "mbedtls/ssl_cache.h" + +#include "mbedtls/ssl_internal.h" /* to call mbedtls_flush_output after ERR_MEM */ + +#include + +#ifndef ALTCP_MBEDTLS_ENTROPY_PTR +#define ALTCP_MBEDTLS_ENTROPY_PTR NULL +#endif +#ifndef ALTCP_MBEDTLS_ENTROPY_LEN +#define ALTCP_MBEDTLS_ENTROPY_LEN 0 +#endif + +/* Variable prototype, the actual declaration is at the end of this file + since it contains pointers to static functions declared here */ +extern const struct altcp_functions altcp_mbedtls_functions; + +/** Our global mbedTLS configuration (server-specific, not connection-specific) */ +struct altcp_tls_config { + mbedtls_ssl_config conf; + mbedtls_entropy_context entropy; + mbedtls_ctr_drbg_context ctr_drbg; + mbedtls_x509_crt *cert; + mbedtls_pk_context *pkey; + mbedtls_x509_crt *ca; +#if defined(MBEDTLS_SSL_CACHE_C) && ALTCP_MBEDTLS_SESSION_CACHE_TIMEOUT_SECONDS + /** Inter-connection cache for fast connection startup */ + struct mbedtls_ssl_cache_context cache; +#endif +}; + +static err_t altcp_mbedtls_lower_recv(void *arg, struct altcp_pcb *inner_conn, struct pbuf *p, err_t err); +static err_t altcp_mbedtls_setup(void *conf, struct altcp_pcb *conn, struct altcp_pcb *inner_conn); +static err_t altcp_mbedtls_lower_recv_process(struct altcp_pcb *conn, altcp_mbedtls_state_t *state); +static err_t altcp_mbedtls_handle_rx_appldata(struct altcp_pcb *conn, altcp_mbedtls_state_t *state); +static int altcp_mbedtls_bio_send(void *ctx, const unsigned char *dataptr, size_t size); + + +/* callback functions from inner/lower connection: */ + +/** Accept callback from lower connection (i.e. TCP) + * Allocate one of our structures, assign it to the new connection's 'state' and + * call the new connection's 'accepted' callback. If that succeeds, we wait + * to receive connection setup handshake bytes from the client. + */ +static err_t +altcp_mbedtls_lower_accept(void *arg, struct altcp_pcb *accepted_conn, err_t err) +{ + struct altcp_pcb *listen_conn = (struct altcp_pcb *)arg; + if (listen_conn && listen_conn->state && listen_conn->accept) { + err_t setup_err; + altcp_mbedtls_state_t *listen_state = (altcp_mbedtls_state_t *)listen_conn->state; + /* create a new altcp_conn to pass to the next 'accept' callback */ + struct altcp_pcb *new_conn = altcp_alloc(); + if (new_conn == NULL) { + return ERR_MEM; + } + setup_err = altcp_mbedtls_setup(listen_state->conf, new_conn, accepted_conn); + if (setup_err != ERR_OK) { + altcp_free(new_conn); + return setup_err; + } + return listen_conn->accept(listen_conn->arg, new_conn, err); + } + return ERR_ARG; +} + +/** Connected callback from lower connection (i.e. TCP). + * Not really implemented/tested yet... + */ +static err_t +altcp_mbedtls_lower_connected(void *arg, struct altcp_pcb *inner_conn, err_t err) +{ + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + LWIP_UNUSED_ARG(inner_conn); /* for LWIP_NOASSERT */ + if (conn && conn->state) { + LWIP_ASSERT("pcb mismatch", conn->inner_conn == inner_conn); + /* upper connected is called when handshake is done */ + if (err != ERR_OK) { + if (conn->connected) { + return conn->connected(conn->arg, conn, err); + } + } + return altcp_mbedtls_lower_recv_process(conn, (altcp_mbedtls_state_t *)conn->state); + } + return ERR_VAL; +} + +/* Call recved for possibly more than an u16_t */ +static void +altcp_mbedtls_lower_recved(struct altcp_pcb *inner_conn, int recvd_cnt) +{ + while (recvd_cnt > 0) { + u16_t recvd_part = (u16_t)LWIP_MIN(recvd_cnt, 0xFFFF); + altcp_recved(inner_conn, recvd_part); + recvd_cnt -= recvd_part; + } +} + +/** Recv callback from lower connection (i.e. TCP) + * This one mainly differs between connection setup/handshake (data is fed into mbedTLS only) + * and application phase (data is decoded by mbedTLS and passed on to the application). + */ +static err_t +altcp_mbedtls_lower_recv(void *arg, struct altcp_pcb *inner_conn, struct pbuf *p, err_t err) +{ + altcp_mbedtls_state_t *state; + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + + LWIP_ASSERT("no err expected", err == ERR_OK); + LWIP_UNUSED_ARG(err); + + if (!conn) { + /* no connection given as arg? should not happen, but prevent pbuf/conn leaks */ + if (p != NULL) { + pbuf_free(p); + } + altcp_close(inner_conn); + return ERR_CLSD; + } + state = (altcp_mbedtls_state_t *)conn->state; + LWIP_ASSERT("pcb mismatch", conn->inner_conn == inner_conn); + if (!state) { + /* already closed */ + if (p != NULL) { + pbuf_free(p); + } + altcp_close(inner_conn); + return ERR_CLSD; + } + + /* handle NULL pbuf (inner connection closed) */ + if (p == NULL) { + /* remote host sent FIN, remember this (SSL state is destroyed + when both sides are closed only!) */ + if ((state->flags & (ALTCP_MBEDTLS_FLAGS_HANDSHAKE_DONE | ALTCP_MBEDTLS_FLAGS_UPPER_CALLED)) == + (ALTCP_MBEDTLS_FLAGS_HANDSHAKE_DONE | ALTCP_MBEDTLS_FLAGS_UPPER_CALLED)) { + /* need to notify upper layer (e.g. 'accept' called or 'connect' succeeded) */ + if ((state->rx != NULL) || (state->rx_app != NULL)) { + state->flags |= ALTCP_MBEDTLS_FLAGS_RX_CLOSE_QUEUED; + /* this is a normal close (FIN) but we have unprocessed data, so delay the FIN */ + altcp_mbedtls_handle_rx_appldata(conn, state); + return ERR_OK; + } + state->flags |= ALTCP_MBEDTLS_FLAGS_RX_CLOSED; + if (conn->recv) { + return conn->recv(conn->arg, conn, NULL, ERR_OK); + } + } else { + /* before connection setup is done: call 'err' */ + if (conn->err) { + conn->err(conn->arg, ERR_CLSD); + } + altcp_close(conn); + } + return ERR_OK; + } + + /* If we come here, the connection is in good state (handshake phase or application data phase). + Queue up the pbuf for processing as handshake data or application data. */ + if (state->rx == NULL) { + state->rx = p; + } else { + LWIP_ASSERT("rx pbuf overflow", (int)p->tot_len + (int)p->len <= 0xFFFF); + pbuf_cat(state->rx, p); + } + return altcp_mbedtls_lower_recv_process(conn, state); +} + +static err_t +altcp_mbedtls_lower_recv_process(struct altcp_pcb *conn, altcp_mbedtls_state_t *state) +{ + if (!(state->flags & ALTCP_MBEDTLS_FLAGS_HANDSHAKE_DONE)) { + /* handle connection setup (handshake not done) */ + int ret = mbedtls_ssl_handshake(&state->ssl_context); + /* try to send data... */ + altcp_output(conn->inner_conn); + if (state->bio_bytes_read) { + /* acknowledge all bytes read */ + altcp_mbedtls_lower_recved(conn->inner_conn, state->bio_bytes_read); + state->bio_bytes_read = 0; + } + + if (ret == MBEDTLS_ERR_SSL_WANT_READ || ret == MBEDTLS_ERR_SSL_WANT_WRITE) { + /* handshake not done, wait for more recv calls */ + LWIP_ASSERT("in this state, the rx chain should be empty", state->rx == NULL); + return ERR_OK; + } + if (ret != 0) { + LWIP_DEBUGF(ALTCP_MBEDTLS_DEBUG, ("mbedtls_ssl_handshake failed: %d\n", ret)); + /* handshake failed, connection has to be closed */ + if (conn->err) { + conn->err(conn->arg, ERR_CLSD); + } + + if (altcp_close(conn) != ERR_OK) { + altcp_abort(conn); + } + return ERR_OK; + } + /* If we come here, handshake succeeded. */ + LWIP_ASSERT("state", state->bio_bytes_read == 0); + LWIP_ASSERT("state", state->bio_bytes_appl == 0); + state->flags |= ALTCP_MBEDTLS_FLAGS_HANDSHAKE_DONE; + /* issue "connect" callback" to upper connection (this can only happen for active open) */ + if (conn->connected) { + err_t err; + err = conn->connected(conn->arg, conn, ERR_OK); + if (err != ERR_OK) { + return err; + } + } + if (state->rx == NULL) { + return ERR_OK; + } + } + /* handle application data */ + return altcp_mbedtls_handle_rx_appldata(conn, state); +} + +/* Pass queued decoded rx data to application */ +static err_t +altcp_mbedtls_pass_rx_data(struct altcp_pcb *conn, altcp_mbedtls_state_t *state) +{ + err_t err; + struct pbuf *buf; + LWIP_ASSERT("conn != NULL", conn != NULL); + LWIP_ASSERT("state != NULL", state != NULL); + buf = state->rx_app; + if (buf) { + state->rx_app = NULL; + if (conn->recv) { + u16_t tot_len = buf->tot_len; + /* this needs to be increased first because the 'recved' call may come nested */ + state->rx_passed_unrecved += tot_len; + state->flags |= ALTCP_MBEDTLS_FLAGS_UPPER_CALLED; + err = conn->recv(conn->arg, conn, buf, ERR_OK); + if (err != ERR_OK) { + if (err == ERR_ABRT) { + return ERR_ABRT; + } + /* not received, leave the pbuf(s) queued (and decrease 'unrecved' again) */ + LWIP_ASSERT("state == conn->state", state == conn->state); + state->rx_app = buf; + state->rx_passed_unrecved -= tot_len; + LWIP_ASSERT("state->rx_passed_unrecved >= 0", state->rx_passed_unrecved >= 0); + if (state->rx_passed_unrecved < 0) { + state->rx_passed_unrecved = 0; + } + return err; + } + } else { + pbuf_free(buf); + } + } else if ((state->flags & (ALTCP_MBEDTLS_FLAGS_RX_CLOSE_QUEUED | ALTCP_MBEDTLS_FLAGS_RX_CLOSED)) == + ALTCP_MBEDTLS_FLAGS_RX_CLOSE_QUEUED) { + state->flags |= ALTCP_MBEDTLS_FLAGS_RX_CLOSED; + if (conn->recv) { + return conn->recv(conn->arg, conn, NULL, ERR_OK); + } + } + + /* application may have close the connection */ + if (conn->state != state) { + /* return error code to ensure altcp_mbedtls_handle_rx_appldata() exits the loop */ + return ERR_CLSD; + } + return ERR_OK; +} + +/* Helper function that processes rx application data stored in rx pbuf chain */ +static err_t +altcp_mbedtls_handle_rx_appldata(struct altcp_pcb *conn, altcp_mbedtls_state_t *state) +{ + int ret; + LWIP_ASSERT("state != NULL", state != NULL); + if (!(state->flags & ALTCP_MBEDTLS_FLAGS_HANDSHAKE_DONE)) { + /* handshake not done yet */ + return ERR_VAL; + } + do { + /* allocate a full-sized unchained PBUF_POOL: this is for RX! */ + struct pbuf *buf = pbuf_alloc(PBUF_RAW, PBUF_POOL_BUFSIZE, PBUF_POOL); + if (buf == NULL) { + /* We're short on pbufs, try again later from 'poll' or 'recv' callbacks. + @todo: close on excessive allocation failures or leave this up to upper conn? */ + return ERR_OK; + } + + /* decrypt application data, this pulls encrypted RX data off state->rx pbuf chain */ + ret = mbedtls_ssl_read(&state->ssl_context, (unsigned char *)buf->payload, PBUF_POOL_BUFSIZE); + if (ret < 0) { + if (ret == MBEDTLS_ERR_SSL_CLIENT_RECONNECT) { + /* client is initiating a new connection using the same source port -> close connection or make handshake */ + LWIP_DEBUGF(ALTCP_MBEDTLS_DEBUG, ("new connection on same source port\n")); + LWIP_ASSERT("TODO: new connection on same source port, close this connection", 0); + } else if ((ret != MBEDTLS_ERR_SSL_WANT_READ) && (ret != MBEDTLS_ERR_SSL_WANT_WRITE)) { + if (ret == MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY) { + LWIP_DEBUGF(ALTCP_MBEDTLS_DEBUG, ("connection was closed gracefully\n")); + } else if (ret == MBEDTLS_ERR_NET_CONN_RESET) { + LWIP_DEBUGF(ALTCP_MBEDTLS_DEBUG, ("connection was reset by peer\n")); + } + pbuf_free(buf); + return ERR_OK; + } else { + pbuf_free(buf); + return ERR_OK; + } + pbuf_free(buf); + altcp_abort(conn); + return ERR_ABRT; + } else { + err_t err; + if (ret) { + LWIP_ASSERT("bogus receive length", ret <= PBUF_POOL_BUFSIZE); + /* trim pool pbuf to actually decoded length */ + pbuf_realloc(buf, (u16_t)ret); + + state->bio_bytes_appl += ret; + if (mbedtls_ssl_get_bytes_avail(&state->ssl_context) == 0) { + /* Record is done, now we know the share between application and protocol bytes + and can adjust the RX window by the protocol bytes. + The rest is 'recved' by the application calling our 'recved' fn. */ + int overhead_bytes; + LWIP_ASSERT("bogus byte counts", state->bio_bytes_read > state->bio_bytes_appl); + overhead_bytes = state->bio_bytes_read - state->bio_bytes_appl; + altcp_mbedtls_lower_recved(conn->inner_conn, overhead_bytes); + state->bio_bytes_read = 0; + state->bio_bytes_appl = 0; + } + + if (state->rx_app == NULL) { + state->rx_app = buf; + } else { + pbuf_cat(state->rx_app, buf); + } + } else { + pbuf_free(buf); + buf = NULL; + } + err = altcp_mbedtls_pass_rx_data(conn, state); + if (err != ERR_OK) { + if (err == ERR_ABRT) { + /* recv callback needs to return this as the pcb is deallocated */ + return ERR_ABRT; + } + /* we hide all other errors as we retry feeding the pbuf to the app later */ + return ERR_OK; + } + } + } while (ret > 0); + return ERR_OK; +} + +/** Receive callback function called from mbedtls (set via mbedtls_ssl_set_bio) + * This function mainly copies data from pbufs and frees the pbufs after copying. + */ +static int +altcp_mbedtls_bio_recv(void *ctx, unsigned char *buf, size_t len) +{ + struct altcp_pcb *conn = (struct altcp_pcb *)ctx; + altcp_mbedtls_state_t *state; + struct pbuf *p; + u16_t ret; + u16_t copy_len; + err_t err; + + LWIP_UNUSED_ARG(err); /* for LWIP_NOASSERT */ + if ((conn == NULL) || (conn->state == NULL)) { + return MBEDTLS_ERR_NET_INVALID_CONTEXT; + } + state = (altcp_mbedtls_state_t *)conn->state; + p = state->rx; + + /* @todo: return MBEDTLS_ERR_NET_CONN_RESET/MBEDTLS_ERR_NET_RECV_FAILED? */ + + if ((p == NULL) || ((p->len == 0) && (p->next == NULL))) { + if (p) { + pbuf_free(p); + } + state->rx = NULL; + if ((state->flags & (ALTCP_MBEDTLS_FLAGS_RX_CLOSE_QUEUED | ALTCP_MBEDTLS_FLAGS_RX_CLOSED)) == + ALTCP_MBEDTLS_FLAGS_RX_CLOSE_QUEUED) { + /* close queued but not passed up yet */ + return 0; + } + return MBEDTLS_ERR_SSL_WANT_READ; + } + /* limit number of bytes again to copy from first pbuf in a chain only */ + copy_len = (u16_t)LWIP_MIN(len, p->len); + /* copy the data */ + ret = pbuf_copy_partial(p, buf, copy_len, 0); + LWIP_ASSERT("ret == copy_len", ret == copy_len); + /* hide the copied bytes from the pbuf */ + err = pbuf_remove_header(p, ret); + LWIP_ASSERT("error", err == ERR_OK); + if (p->len == 0) { + /* the first pbuf has been fully read, free it */ + state->rx = p->next; + p->next = NULL; + pbuf_free(p); + } + + state->bio_bytes_read += (int)ret; + return ret; +} + +/** Sent callback from lower connection (i.e. TCP) + * This only informs the upper layer to try to send more, not about + * the number of ACKed bytes. + */ +static err_t +altcp_mbedtls_lower_sent(void *arg, struct altcp_pcb *inner_conn, u16_t len) +{ + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + LWIP_UNUSED_ARG(inner_conn); /* for LWIP_NOASSERT */ + LWIP_UNUSED_ARG(len); + if (conn) { + altcp_mbedtls_state_t *state = (altcp_mbedtls_state_t *)conn->state; + LWIP_ASSERT("pcb mismatch", conn->inner_conn == inner_conn); + if (!state || !(state->flags & ALTCP_MBEDTLS_FLAGS_HANDSHAKE_DONE)) { + /* @todo: do something here? */ + return ERR_OK; + } + /* try to send more if we failed before */ + mbedtls_ssl_flush_output(&state->ssl_context); + /* call upper sent with len==0 if the application already sent data */ + if ((state->flags & ALTCP_MBEDTLS_FLAGS_APPLDATA_SENT) && conn->sent) { + return conn->sent(conn->arg, conn, 0); + } + } + return ERR_OK; +} + +/** Poll callback from lower connection (i.e. TCP) + * Just pass this on to the application. + * @todo: retry sending? + */ +static err_t +altcp_mbedtls_lower_poll(void *arg, struct altcp_pcb *inner_conn) +{ + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + LWIP_UNUSED_ARG(inner_conn); /* for LWIP_NOASSERT */ + if (conn) { + LWIP_ASSERT("pcb mismatch", conn->inner_conn == inner_conn); + /* check if there's unreceived rx data */ + if (conn->state) { + altcp_mbedtls_state_t *state = (altcp_mbedtls_state_t *)conn->state; + /* try to send more if we failed before */ + mbedtls_ssl_flush_output(&state->ssl_context); + if (altcp_mbedtls_handle_rx_appldata(conn, state) == ERR_ABRT) { + return ERR_ABRT; + } + } + if (conn->poll) { + return conn->poll(conn->arg, conn); + } + } + return ERR_OK; +} + +static void +altcp_mbedtls_lower_err(void *arg, err_t err) +{ + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + if (conn) { + conn->inner_conn = NULL; /* already freed */ + if (conn->err) { + conn->err(conn->arg, err); + } + altcp_free(conn); + } +} + +/* setup functions */ + +static void +altcp_mbedtls_remove_callbacks(struct altcp_pcb *inner_conn) +{ + altcp_arg(inner_conn, NULL); + altcp_recv(inner_conn, NULL); + altcp_sent(inner_conn, NULL); + altcp_err(inner_conn, NULL); + altcp_poll(inner_conn, NULL, inner_conn->pollinterval); +} + +static void +altcp_mbedtls_setup_callbacks(struct altcp_pcb *conn, struct altcp_pcb *inner_conn) +{ + altcp_arg(inner_conn, conn); + altcp_recv(inner_conn, altcp_mbedtls_lower_recv); + altcp_sent(inner_conn, altcp_mbedtls_lower_sent); + altcp_err(inner_conn, altcp_mbedtls_lower_err); + /* tcp_poll is set when interval is set by application */ + /* listen is set totally different :-) */ +} + +static err_t +altcp_mbedtls_setup(void *conf, struct altcp_pcb *conn, struct altcp_pcb *inner_conn) +{ + int ret; + struct altcp_tls_config *config = (struct altcp_tls_config *)conf; + altcp_mbedtls_state_t *state; + if (!conf) { + return ERR_ARG; + } + LWIP_ASSERT("invalid inner_conn", conn != inner_conn); + + /* allocate mbedtls context */ + state = altcp_mbedtls_alloc(conf); + if (state == NULL) { + return ERR_MEM; + } + /* initialize mbedtls context: */ + mbedtls_ssl_init(&state->ssl_context); + ret = mbedtls_ssl_setup(&state->ssl_context, &config->conf); + if (ret != 0) { + LWIP_DEBUGF(ALTCP_MBEDTLS_DEBUG, ("mbedtls_ssl_setup failed\n")); + /* @todo: convert 'ret' to err_t */ + altcp_mbedtls_free(conf, state); + return ERR_MEM; + } + /* tell mbedtls about our I/O functions */ + mbedtls_ssl_set_bio(&state->ssl_context, conn, altcp_mbedtls_bio_send, altcp_mbedtls_bio_recv, NULL); + + altcp_mbedtls_setup_callbacks(conn, inner_conn); + conn->inner_conn = inner_conn; + conn->fns = &altcp_mbedtls_functions; + conn->state = state; + return ERR_OK; +} + +struct altcp_pcb * +altcp_tls_wrap(struct altcp_tls_config *config, struct altcp_pcb *inner_pcb) +{ + struct altcp_pcb *ret; + if (inner_pcb == NULL) { + return NULL; + } + ret = altcp_alloc(); + if (ret != NULL) { + if (altcp_mbedtls_setup(config, ret, inner_pcb) != ERR_OK) { + altcp_free(ret); + return NULL; + } + } + return ret; +} + +void * +altcp_tls_context(struct altcp_pcb *conn) +{ + if (conn && conn->state) { + altcp_mbedtls_state_t *state = (altcp_mbedtls_state_t *)conn->state; + return &state->ssl_context; + } + return NULL; +} + +#if ALTCP_MBEDTLS_DEBUG != LWIP_DBG_OFF +static void +altcp_mbedtls_debug(void *ctx, int level, const char *file, int line, const char *str) +{ + LWIP_UNUSED_ARG(ctx); + LWIP_UNUSED_ARG(level); + LWIP_UNUSED_ARG(file); + LWIP_UNUSED_ARG(line); + LWIP_UNUSED_ARG(str); + + LWIP_DEBUGF(ALTCP_MBEDTLS_DEBUG, ("%s:%04d: %s", file, line, str)); +} +#endif + +#ifndef ALTCP_MBEDTLS_RNG_FN +/** ATTENTION: It is *really* important to *NOT* use this dummy RNG in production code!!!! */ +static int +dummy_rng(void *ctx, unsigned char *buffer, size_t len) +{ + static size_t ctr; + size_t i; + LWIP_UNUSED_ARG(ctx); + for (i = 0; i < len; i++) { + buffer[i] = (unsigned char)++ctr; + } + return 0; +} +#define ALTCP_MBEDTLS_RNG_FN dummy_rng +#endif /* ALTCP_MBEDTLS_RNG_FN */ + +/** Create new TLS configuration + * ATTENTION: Server certificate and private key have to be added outside this function! + */ +static struct altcp_tls_config * +altcp_tls_create_config(int is_server, int have_cert, int have_pkey, int have_ca) +{ + size_t sz; + int ret; + struct altcp_tls_config *conf; + mbedtls_x509_crt *mem; + + if (TCP_WND < MBEDTLS_SSL_MAX_CONTENT_LEN) { + LWIP_DEBUGF(ALTCP_MBEDTLS_DEBUG|LWIP_DBG_LEVEL_SERIOUS, + ("altcp_tls: TCP_WND is smaller than the RX decryption buffer, connection RX might stall!\n")); + } + + altcp_mbedtls_mem_init(); + + sz = sizeof(struct altcp_tls_config); + if (have_cert) { + sz += sizeof(mbedtls_x509_crt); + } + if (have_ca) { + sz += sizeof(mbedtls_x509_crt); + } + if (have_pkey) { + sz += sizeof(mbedtls_pk_context); + } + + conf = (struct altcp_tls_config *)altcp_mbedtls_alloc_config(sz); + if (conf == NULL) { + return NULL; + } + mem = (mbedtls_x509_crt *)(conf + 1); + if (have_cert) { + conf->cert = mem; + mem++; + } + if (have_ca) { + conf->ca = mem; + mem++; + } + if (have_pkey) { + conf->pkey = (mbedtls_pk_context *)mem; + } + + mbedtls_ssl_config_init(&conf->conf); + mbedtls_entropy_init(&conf->entropy); + mbedtls_ctr_drbg_init(&conf->ctr_drbg); + + /* Seed the RNG */ + ret = mbedtls_ctr_drbg_seed(&conf->ctr_drbg, ALTCP_MBEDTLS_RNG_FN, &conf->entropy, ALTCP_MBEDTLS_ENTROPY_PTR, ALTCP_MBEDTLS_ENTROPY_LEN); + if (ret != 0) { + LWIP_DEBUGF(ALTCP_MBEDTLS_DEBUG, ("mbedtls_ctr_drbg_seed failed: %d\n", ret)); + altcp_mbedtls_free_config(conf); + return NULL; + } + + /* Setup ssl context (@todo: what's different for a client here? -> might better be done on listen/connect) */ + ret = mbedtls_ssl_config_defaults(&conf->conf, is_server ? MBEDTLS_SSL_IS_SERVER : MBEDTLS_SSL_IS_CLIENT, + MBEDTLS_SSL_TRANSPORT_STREAM, MBEDTLS_SSL_PRESET_DEFAULT); + if (ret != 0) { + LWIP_DEBUGF(ALTCP_MBEDTLS_DEBUG, ("mbedtls_ssl_config_defaults failed: %d\n", ret)); + altcp_mbedtls_free_config(conf); + return NULL; + } + mbedtls_ssl_conf_authmode(&conf->conf, MBEDTLS_SSL_VERIFY_OPTIONAL); + + mbedtls_ssl_conf_rng(&conf->conf, mbedtls_ctr_drbg_random, &conf->ctr_drbg); +#if ALTCP_MBEDTLS_DEBUG != LWIP_DBG_OFF + mbedtls_ssl_conf_dbg(&conf->conf, altcp_mbedtls_debug, stdout); +#endif +#if defined(MBEDTLS_SSL_CACHE_C) && ALTCP_MBEDTLS_SESSION_CACHE_TIMEOUT_SECONDS + mbedtls_ssl_conf_session_cache(&conf->conf, &conf->cache, mbedtls_ssl_cache_get, mbedtls_ssl_cache_set); + mbedtls_ssl_cache_set_timeout(&conf->cache, 30); + mbedtls_ssl_cache_set_max_entries(&conf->cache, 30); +#endif + + return conf; +} + +/** Create new TLS configuration + * This is a suboptimal version that gets the encrypted private key and its password, + * as well as the server certificate. + */ +struct altcp_tls_config * +altcp_tls_create_config_server_privkey_cert(const u8_t *privkey, size_t privkey_len, + const u8_t *privkey_pass, size_t privkey_pass_len, + const u8_t *cert, size_t cert_len) +{ + int ret; + mbedtls_x509_crt *srvcert; + mbedtls_pk_context *pkey; + struct altcp_tls_config *conf = altcp_tls_create_config(1, 1, 1, 0); + if (conf == NULL) { + return NULL; + } + + srvcert = conf->cert; + mbedtls_x509_crt_init(srvcert); + + pkey = conf->pkey; + mbedtls_pk_init(pkey); + + /* Load the certificates and private key */ + ret = mbedtls_x509_crt_parse(srvcert, cert, cert_len); + if (ret != 0) { + LWIP_DEBUGF(ALTCP_MBEDTLS_DEBUG, ("mbedtls_x509_crt_parse failed: %d\n", ret)); + altcp_mbedtls_free_config(conf); + return NULL; + } + + ret = mbedtls_pk_parse_key(pkey, (const unsigned char *) privkey, privkey_len, privkey_pass, privkey_pass_len); + if (ret != 0) { + LWIP_DEBUGF(ALTCP_MBEDTLS_DEBUG, ("mbedtls_pk_parse_public_key failed: %d\n", ret)); + mbedtls_x509_crt_free(srvcert); + altcp_mbedtls_free_config(conf); + return NULL; + } + + mbedtls_ssl_conf_ca_chain(&conf->conf, srvcert->next, NULL); + ret = mbedtls_ssl_conf_own_cert(&conf->conf, srvcert, pkey); + if (ret != 0) { + LWIP_DEBUGF(ALTCP_MBEDTLS_DEBUG, ("mbedtls_ssl_conf_own_cert failed: %d\n", ret)); + mbedtls_x509_crt_free(srvcert); + mbedtls_pk_free(pkey); + altcp_mbedtls_free_config(conf); + return NULL; + } + return conf; +} + +static struct altcp_tls_config * +altcp_tls_create_config_client_common(const u8_t *ca, size_t ca_len, int is_2wayauth) +{ + int ret; + struct altcp_tls_config *conf = altcp_tls_create_config(0, is_2wayauth, is_2wayauth, ca != NULL); + if (conf == NULL) { + return NULL; + } + + /* Initialize the CA certificate if provided + * CA certificate is optional (to save memory) but recommended for production environment + * Without CA certificate, connection will be prone to man-in-the-middle attacks */ + if (ca) { + mbedtls_x509_crt_init(conf->ca); + ret = mbedtls_x509_crt_parse(conf->ca, ca, ca_len); + if (ret != 0) { + LWIP_DEBUGF(ALTCP_MBEDTLS_DEBUG, ("mbedtls_x509_crt_parse ca failed: %d 0x%x", ret, -1*ret)); + altcp_mbedtls_free_config(conf); + return NULL; + } + + mbedtls_ssl_conf_ca_chain(&conf->conf, conf->ca, NULL); + } + return conf; +} + +struct altcp_tls_config * +altcp_tls_create_config_client(const u8_t *ca, size_t ca_len) +{ + return altcp_tls_create_config_client_common(ca, ca_len, 0); +} + +struct altcp_tls_config * +altcp_tls_create_config_client_2wayauth(const u8_t *ca, size_t ca_len, const u8_t *privkey, size_t privkey_len, + const u8_t *privkey_pass, size_t privkey_pass_len, + const u8_t *cert, size_t cert_len) +{ + int ret; + struct altcp_tls_config *conf; + + if (!cert || !privkey) { + LWIP_DEBUGF(ALTCP_MBEDTLS_DEBUG, ("altcp_tls_create_config_client_2wayauth: certificate and priv key required")); + return NULL; + } + + conf = altcp_tls_create_config_client_common(ca, ca_len, 1); + if (conf == NULL) { + return NULL; + } + + /* Initialize the client certificate and corresponding private key */ + mbedtls_x509_crt_init(conf->cert); + ret = mbedtls_x509_crt_parse(conf->cert, cert, cert_len); + if (ret != 0) { + LWIP_DEBUGF(ALTCP_MBEDTLS_DEBUG, ("mbedtls_x509_crt_parse cert failed: %d 0x%x", ret, -1*ret)); + altcp_mbedtls_free_config(conf->cert); + return NULL; + } + + mbedtls_pk_init(conf->pkey); + ret = mbedtls_pk_parse_key(conf->pkey, privkey, privkey_len, privkey_pass, privkey_pass_len); + if (ret != 0) { + LWIP_DEBUGF(ALTCP_MBEDTLS_DEBUG, ("mbedtls_pk_parse_key failed: %d 0x%x", ret, -1*ret)); + altcp_mbedtls_free_config(conf); + return NULL; + } + + ret = mbedtls_ssl_conf_own_cert(&conf->conf, conf->cert, conf->pkey); + if (ret != 0) { + LWIP_DEBUGF(ALTCP_MBEDTLS_DEBUG, ("mbedtls_ssl_conf_own_cert failed: %d 0x%x", ret, -1*ret)); + altcp_mbedtls_free_config(conf); + return NULL; + } + + return conf; +} + +void +altcp_tls_free_config(struct altcp_tls_config *conf) +{ + if (conf->pkey) { + mbedtls_pk_free(conf->pkey); + } + if (conf->cert) { + mbedtls_x509_crt_free(conf->cert); + } + if (conf->ca) { + mbedtls_x509_crt_free(conf->ca); + } + altcp_mbedtls_free_config(conf); +} + +/* "virtual" functions */ +static void +altcp_mbedtls_set_poll(struct altcp_pcb *conn, u8_t interval) +{ + if (conn != NULL) { + altcp_poll(conn->inner_conn, altcp_mbedtls_lower_poll, interval); + } +} + +static void +altcp_mbedtls_recved(struct altcp_pcb *conn, u16_t len) +{ + u16_t lower_recved; + altcp_mbedtls_state_t *state; + if (conn == NULL) { + return; + } + state = (altcp_mbedtls_state_t *)conn->state; + if (state == NULL) { + return; + } + if (!(state->flags & ALTCP_MBEDTLS_FLAGS_HANDSHAKE_DONE)) { + return; + } + lower_recved = len; + if (lower_recved > state->rx_passed_unrecved) { + LWIP_DEBUGF(ALTCP_MBEDTLS_DEBUG, ("bogus recved count (len > state->rx_passed_unrecved / %d / %d)", + len, state->rx_passed_unrecved)); + lower_recved = (u16_t)state->rx_passed_unrecved; + } + state->rx_passed_unrecved -= lower_recved; + + altcp_recved(conn->inner_conn, lower_recved); +} + +static err_t +altcp_mbedtls_connect(struct altcp_pcb *conn, const ip_addr_t *ipaddr, u16_t port, altcp_connected_fn connected) +{ + if (conn == NULL) { + return ERR_VAL; + } + conn->connected = connected; + return altcp_connect(conn->inner_conn, ipaddr, port, altcp_mbedtls_lower_connected); +} + +static struct altcp_pcb * +altcp_mbedtls_listen(struct altcp_pcb *conn, u8_t backlog, err_t *err) +{ + struct altcp_pcb *lpcb; + if (conn == NULL) { + return NULL; + } + lpcb = altcp_listen_with_backlog_and_err(conn->inner_conn, backlog, err); + if (lpcb != NULL) { + conn->inner_conn = lpcb; + altcp_accept(lpcb, altcp_mbedtls_lower_accept); + return conn; + } + return NULL; +} + +static void +altcp_mbedtls_abort(struct altcp_pcb *conn) +{ + if (conn != NULL) { + altcp_abort(conn->inner_conn); + } +} + +static err_t +altcp_mbedtls_close(struct altcp_pcb *conn) +{ + struct altcp_pcb *inner_conn; + if (conn == NULL) { + return ERR_VAL; + } + inner_conn = conn->inner_conn; + if (inner_conn) { + err_t err; + altcp_poll_fn oldpoll = inner_conn->poll; + altcp_mbedtls_remove_callbacks(conn->inner_conn); + err = altcp_close(conn->inner_conn); + if (err != ERR_OK) { + /* not closed, set up all callbacks again */ + altcp_mbedtls_setup_callbacks(conn, inner_conn); + /* poll callback is not included in the above */ + altcp_poll(inner_conn, oldpoll, inner_conn->pollinterval); + return err; + } + conn->inner_conn = NULL; + } + altcp_free(conn); + return ERR_OK; +} + +/** Allow caller of altcp_write() to limit to negotiated chunk size + * or remaining sndbuf space of inner_conn. + */ +static u16_t +altcp_mbedtls_sndbuf(struct altcp_pcb *conn) +{ + if (conn) { + altcp_mbedtls_state_t *state; + state = (altcp_mbedtls_state_t*)conn->state; + if (!state || !(state->flags & ALTCP_MBEDTLS_FLAGS_HANDSHAKE_DONE)) { + return 0; + } + if (conn->inner_conn) { + u16_t sndbuf = altcp_sndbuf(conn->inner_conn); + /* Take care of record header, IV, AuthTag */ + int ssl_expan = mbedtls_ssl_get_record_expansion(&state->ssl_context); + if (ssl_expan > 0) { + size_t ssl_added = (u16_t)LWIP_MIN(ssl_expan, 0xFFFF); + /* internal sndbuf smaller than our offset */ + if (ssl_added < sndbuf) { + size_t max_len = 0xFFFF; + size_t ret; +#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) + /* @todo: adjust ssl_added to real value related to negociated cipher */ + size_t max_frag_len = mbedtls_ssl_get_max_frag_len(&state->ssl_context); + max_len = LWIP_MIN(max_frag_len, max_len); +#endif + /* Adjust sndbuf of inner_conn with what added by SSL */ + ret = LWIP_MIN(sndbuf - ssl_added, max_len); + LWIP_ASSERT("sndbuf overflow", ret <= 0xFFFF); + return (u16_t)ret; + } + } + } + } + /* fallback: use sendbuf of the inner connection */ + return altcp_default_sndbuf(conn); +} + +/** Write data to a TLS connection. Calls into mbedTLS, which in turn calls into + * @ref altcp_mbedtls_bio_send() to send the encrypted data + */ +static err_t +altcp_mbedtls_write(struct altcp_pcb *conn, const void *dataptr, u16_t len, u8_t apiflags) +{ + int ret; + altcp_mbedtls_state_t *state; + + LWIP_UNUSED_ARG(apiflags); + + if (conn == NULL) { + return ERR_VAL; + } + + state = (altcp_mbedtls_state_t *)conn->state; + if (state == NULL) { + /* @todo: which error? */ + return ERR_CLSD; + } + if (!(state->flags & ALTCP_MBEDTLS_FLAGS_HANDSHAKE_DONE)) { + /* @todo: which error? */ + return ERR_VAL; + } + + /* HACK: if thre is something left to send, try to flush it and only + allow sending more if this succeeded (this is a hack because neither + returning 0 nor MBEDTLS_ERR_SSL_WANT_WRITE worked for me) */ + if (state->ssl_context.out_left) { + mbedtls_ssl_flush_output(&state->ssl_context); + if (state->ssl_context.out_left) { + return ERR_MEM; + } + } + ret = mbedtls_ssl_write(&state->ssl_context, (const unsigned char *)dataptr, len); + /* try to send data... */ + altcp_output(conn->inner_conn); + if (ret >= 0) { + if (ret == len) { + state->flags |= ALTCP_MBEDTLS_FLAGS_APPLDATA_SENT; + return ERR_OK; + } else { + /* @todo/@fixme: assumption: either everything sent or error */ + LWIP_ASSERT("ret <= 0", 0); + return ERR_MEM; + } + } else { + if (ret == MBEDTLS_ERR_SSL_WANT_WRITE) { + /* @todo: convert error to err_t */ + return ERR_MEM; + } + LWIP_ASSERT("unhandled error", 0); + return ERR_VAL; + } +} + +/** Send callback function called from mbedtls (set via mbedtls_ssl_set_bio) + * This function is either called during handshake or when sending application + * data via @ref altcp_mbedtls_write (or altcp_write) + */ +static int +altcp_mbedtls_bio_send(void *ctx, const unsigned char *dataptr, size_t size) +{ + struct altcp_pcb *conn = (struct altcp_pcb *) ctx; + int written = 0; + size_t size_left = size; + u8_t apiflags = TCP_WRITE_FLAG_COPY; + + LWIP_ASSERT("conn != NULL", conn != NULL); + if ((conn == NULL) || (conn->inner_conn == NULL)) { + return MBEDTLS_ERR_NET_INVALID_CONTEXT; + } + + while (size_left) { + u16_t write_len = (u16_t)LWIP_MIN(size_left, 0xFFFF); + err_t err = altcp_write(conn->inner_conn, (const void *)dataptr, write_len, apiflags); + if (err == ERR_OK) { + written += write_len; + size_left -= write_len; + } else if (err == ERR_MEM) { + if (written) { + return written; + } + return 0; /* MBEDTLS_ERR_SSL_WANT_WRITE; */ + } else { + LWIP_ASSERT("tls_write, tcp_write: err != ERR MEM", 0); + /* @todo: return MBEDTLS_ERR_NET_CONN_RESET or MBEDTLS_ERR_NET_SEND_FAILED */ + return MBEDTLS_ERR_NET_SEND_FAILED; + } + } + return written; +} + +static u16_t +altcp_mbedtls_mss(struct altcp_pcb *conn) +{ + if (conn == NULL) { + return 0; + } + /* @todo: LWIP_MIN(mss, mbedtls_ssl_get_max_frag_len()) ? */ + return altcp_mss(conn->inner_conn); +} + +static void +altcp_mbedtls_dealloc(struct altcp_pcb *conn) +{ + /* clean up and free tls state */ + if (conn) { + altcp_mbedtls_state_t *state = (altcp_mbedtls_state_t *)conn->state; + if (state) { + mbedtls_ssl_free(&state->ssl_context); + state->flags = 0; + if (state->rx) { + /* free leftover (unhandled) rx pbufs */ + pbuf_free(state->rx); + state->rx = NULL; + } + altcp_mbedtls_free(state->conf, state); + conn->state = NULL; + } + } +} + +const struct altcp_functions altcp_mbedtls_functions = { + altcp_mbedtls_set_poll, + altcp_mbedtls_recved, + altcp_default_bind, + altcp_mbedtls_connect, + altcp_mbedtls_listen, + altcp_mbedtls_abort, + altcp_mbedtls_close, + altcp_default_shutdown, + altcp_mbedtls_write, + altcp_default_output, + altcp_mbedtls_mss, + altcp_mbedtls_sndbuf, + altcp_default_sndqueuelen, + altcp_default_nagle_disable, + altcp_default_nagle_enable, + altcp_default_nagle_disabled, + altcp_default_setprio, + altcp_mbedtls_dealloc, + altcp_default_get_tcp_addrinfo, + altcp_default_get_ip, + altcp_default_get_port +#ifdef LWIP_DEBUG + , altcp_default_dbg_get_tcp_state +#endif +}; + +#endif /* LWIP_ALTCP_TLS && LWIP_ALTCP_TLS_MBEDTLS */ +#endif /* LWIP_ALTCP */ diff --git a/Libraries/LwIP/src/apps/altcp_tls/altcp_tls_mbedtls_mem.c b/Libraries/LwIP/src/apps/altcp_tls/altcp_tls_mbedtls_mem.c new file mode 100644 index 0000000..04d47ae --- /dev/null +++ b/Libraries/LwIP/src/apps/altcp_tls/altcp_tls_mbedtls_mem.c @@ -0,0 +1,210 @@ +/** + * @file + * Application layered TCP connection API (to be used from TCPIP thread) + * + * This file contains memory management functions for a TLS layer using mbedTLS. + * + * ATTENTION: For production usage, you might want to override this file with + * your own implementation since this implementation simply uses the + * lwIP heap without caring for fragmentation or leaving heap for + * other parts of lwIP! + */ + +/* + * Copyright (c) 2017 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + * Missing things / @todo: + * - RX data is acknowledged after receiving (tcp_recved is called when enqueueing + * the pbuf for mbedTLS receive, not when processed by mbedTLS or the inner + * connection; altcp_recved() from inner connection does nothing) + * - TX data is marked as 'sent' (i.e. acknowledged; sent callback is called) right + * after enqueueing for transmission, not when actually ACKed be the remote host. + */ + +#include "lwip/opt.h" + +#if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/apps/altcp_tls_mbedtls_opts.h" + +#if LWIP_ALTCP_TLS && LWIP_ALTCP_TLS_MBEDTLS + +#include "altcp_tls_mbedtls_mem.h" +#include "altcp_tls_mbedtls_structs.h" +#include "lwip/mem.h" + +#include "mbedtls/platform.h" + +#include + +#ifndef ALTCP_MBEDTLS_MEM_DEBUG +#define ALTCP_MBEDTLS_MEM_DEBUG LWIP_DBG_OFF +#endif + +#if defined(MBEDTLS_PLATFORM_MEMORY) && \ + (!defined(MBEDTLS_PLATFORM_FREE_MACRO) || \ + defined(MBEDTLS_PLATFORM_CALLOC_MACRO)) +#define ALTCP_MBEDTLS_PLATFORM_ALLOC 1 +#else +#define ALTCP_MBEDTLS_PLATFORM_ALLOC 0 +#endif + +#if ALTCP_MBEDTLS_PLATFORM_ALLOC + +#ifndef ALTCP_MBEDTLS_PLATFORM_ALLOC_STATS +#define ALTCP_MBEDTLS_PLATFORM_ALLOC_STATS 0 +#endif + +/* This is an example/debug implementation of alloc/free functions only */ +typedef struct altcp_mbedtls_malloc_helper_s { + size_t c; + size_t len; +} altcp_mbedtls_malloc_helper_t; + +#if ALTCP_MBEDTLS_PLATFORM_ALLOC_STATS +typedef struct altcp_mbedtls_malloc_stats_s { + size_t allocedBytes; + size_t allocCnt; + size_t maxBytes; + size_t totalBytes; +} altcp_mbedtls_malloc_stats_t; +altcp_mbedtls_malloc_stats_t altcp_mbedtls_malloc_stats; +volatile int altcp_mbedtls_malloc_clear_stats; +#endif + +static void * +tls_malloc(size_t c, size_t len) +{ + altcp_mbedtls_malloc_helper_t *hlpr; + void *ret; + size_t alloc_size; +#if ALTCP_MBEDTLS_PLATFORM_ALLOC_STATS + if (altcp_mbedtls_malloc_clear_stats) { + altcp_mbedtls_malloc_clear_stats = 0; + memset(&altcp_mbedtls_malloc_stats, 0, sizeof(altcp_mbedtls_malloc_stats)); + } +#endif + alloc_size = sizeof(altcp_mbedtls_malloc_helper_t) + (c * len); + /* check for maximum allocation size, mainly to prevent mem_size_t overflow */ + if (alloc_size > MEM_SIZE) { + LWIP_DEBUGF(ALTCP_MBEDTLS_MEM_DEBUG, ("mbedtls allocation too big: %c * %d bytes vs MEM_SIZE=%d", + (int)c, (int)len, (int)MEM_SIZE)); + return NULL; + } + hlpr = (altcp_mbedtls_malloc_helper_t *)mem_malloc((mem_size_t)alloc_size); + if (hlpr == NULL) { + LWIP_DEBUGF(ALTCP_MBEDTLS_MEM_DEBUG, ("mbedtls alloc callback failed for %c * %d bytes", (int)c, (int)len)); + return NULL; + } +#if ALTCP_MBEDTLS_PLATFORM_ALLOC_STATS + altcp_mbedtls_malloc_stats.allocCnt++; + altcp_mbedtls_malloc_stats.allocedBytes += c * len; + if (altcp_mbedtls_malloc_stats.allocedBytes > altcp_mbedtls_malloc_stats.maxBytes) { + altcp_mbedtls_malloc_stats.maxBytes = altcp_mbedtls_malloc_stats.allocedBytes; + } + altcp_mbedtls_malloc_stats.totalBytes += c * len; +#endif + hlpr->c = c; + hlpr->len = len; + ret = hlpr + 1; + /* zeroing the allocated chunk is required by mbedTLS! */ + memset(ret, 0, c * len); + return ret; +} + +static void +tls_free(void *ptr) +{ + altcp_mbedtls_malloc_helper_t *hlpr; + if (ptr == NULL) { + /* this obviously happened in mbedtls... */ + return; + } + hlpr = ((altcp_mbedtls_malloc_helper_t *)ptr) - 1; +#if ALTCP_MBEDTLS_PLATFORM_ALLOC_STATS + if (!altcp_mbedtls_malloc_clear_stats) { + altcp_mbedtls_malloc_stats.allocedBytes -= hlpr->c * hlpr->len; + } +#endif + mem_free(hlpr); +} +#endif /* ALTCP_MBEDTLS_PLATFORM_ALLOC*/ + +void +altcp_mbedtls_mem_init(void) +{ + /* not much to do here when using the heap */ + +#if ALTCP_MBEDTLS_PLATFORM_ALLOC + /* set mbedtls allocation methods */ + mbedtls_platform_set_calloc_free(&tls_malloc, &tls_free); +#endif +} + +altcp_mbedtls_state_t * +altcp_mbedtls_alloc(void *conf) +{ + altcp_mbedtls_state_t *ret = (altcp_mbedtls_state_t *)mem_calloc(1, sizeof(altcp_mbedtls_state_t)); + if (ret != NULL) { + ret->conf = conf; + } + return ret; +} + +void +altcp_mbedtls_free(void *conf, altcp_mbedtls_state_t *state) +{ + LWIP_UNUSED_ARG(conf); + LWIP_ASSERT("state != NULL", state != NULL); + mem_free(state); +} + +void * +altcp_mbedtls_alloc_config(size_t size) +{ + void *ret; + size_t checked_size = (mem_size_t)size; + if (size != checked_size) { + /* allocation too big (mem_size_t overflow) */ + return NULL; + } + ret = (altcp_mbedtls_state_t *)mem_calloc(1, (mem_size_t)size); + return ret; +} + +void +altcp_mbedtls_free_config(void *item) +{ + LWIP_ASSERT("item != NULL", item != NULL); + mem_free(item); +} + +#endif /* LWIP_ALTCP_TLS && LWIP_ALTCP_TLS_MBEDTLS */ +#endif /* LWIP_ALTCP */ diff --git a/Libraries/LwIP/src/apps/altcp_tls/altcp_tls_mbedtls_mem.h b/Libraries/LwIP/src/apps/altcp_tls/altcp_tls_mbedtls_mem.h new file mode 100644 index 0000000..b391bf8 --- /dev/null +++ b/Libraries/LwIP/src/apps/altcp_tls/altcp_tls_mbedtls_mem.h @@ -0,0 +1,72 @@ +/** + * @file + * Application layered TCP/TLS connection API (to be used from TCPIP thread) + * + * This file contains memory management function prototypes for a TLS layer using mbedTLS. + * + * Memory management contains: + * - allocating/freeing altcp_mbedtls_state_t + * - allocating/freeing memory used in the mbedTLS library + */ + +/* + * Copyright (c) 2017 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ +#ifndef LWIP_HDR_ALTCP_MBEDTLS_MEM_H +#define LWIP_HDR_ALTCP_MBEDTLS_MEM_H + +#include "lwip/opt.h" + +#if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/apps/altcp_tls_mbedtls_opts.h" + +#if LWIP_ALTCP_TLS && LWIP_ALTCP_TLS_MBEDTLS + +#include "altcp_tls_mbedtls_structs.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void altcp_mbedtls_mem_init(void); +altcp_mbedtls_state_t *altcp_mbedtls_alloc(void *conf); +void altcp_mbedtls_free(void *conf, altcp_mbedtls_state_t *state); +void *altcp_mbedtls_alloc_config(size_t size); +void altcp_mbedtls_free_config(void *item); + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_ALTCP_TLS && LWIP_ALTCP_TLS_MBEDTLS */ +#endif /* LWIP_ALTCP */ +#endif /* LWIP_HDR_ALTCP_MBEDTLS_MEM_H */ diff --git a/Libraries/LwIP/src/apps/altcp_tls/altcp_tls_mbedtls_structs.h b/Libraries/LwIP/src/apps/altcp_tls/altcp_tls_mbedtls_structs.h new file mode 100644 index 0000000..17efaaf --- /dev/null +++ b/Libraries/LwIP/src/apps/altcp_tls/altcp_tls_mbedtls_structs.h @@ -0,0 +1,83 @@ +/** + * @file + * Application layered TCP/TLS connection API (to be used from TCPIP thread) + * + * This file contains structure definitions for a TLS layer using mbedTLS. + */ + +/* + * Copyright (c) 2017 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ +#ifndef LWIP_HDR_ALTCP_MBEDTLS_STRUCTS_H +#define LWIP_HDR_ALTCP_MBEDTLS_STRUCTS_H + +#include "lwip/opt.h" + +#if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/apps/altcp_tls_mbedtls_opts.h" + +#if LWIP_ALTCP_TLS && LWIP_ALTCP_TLS_MBEDTLS + +#include "lwip/altcp.h" +#include "lwip/pbuf.h" + +#include "mbedtls/ssl.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define ALTCP_MBEDTLS_FLAGS_HANDSHAKE_DONE 0x01 +#define ALTCP_MBEDTLS_FLAGS_UPPER_CALLED 0x02 +#define ALTCP_MBEDTLS_FLAGS_RX_CLOSE_QUEUED 0x04 +#define ALTCP_MBEDTLS_FLAGS_RX_CLOSED 0x08 +#define ALTCP_MBEDTLS_FLAGS_APPLDATA_SENT 0x10 + +typedef struct altcp_mbedtls_state_s { + void *conf; + mbedtls_ssl_context ssl_context; + /* chain of rx pbufs (before decryption) */ + struct pbuf *rx; + struct pbuf *rx_app; + u8_t flags; + int rx_passed_unrecved; + int bio_bytes_read; + int bio_bytes_appl; +} altcp_mbedtls_state_t; + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_ALTCP_TLS && LWIP_ALTCP_TLS_MBEDTLS */ +#endif /* LWIP_ALTCP */ +#endif /* LWIP_HDR_ALTCP_MBEDTLS_STRUCTS_H */ diff --git a/Libraries/LwIP/src/apps/http/altcp_proxyconnect.c b/Libraries/LwIP/src/apps/http/altcp_proxyconnect.c new file mode 100644 index 0000000..9a0b2ba --- /dev/null +++ b/Libraries/LwIP/src/apps/http/altcp_proxyconnect.c @@ -0,0 +1,584 @@ +/** + * @file + * Application layered TCP connection API that executes a proxy-connect. + * + * This file provides a starting layer that executes a proxy-connect e.g. to + * set up TLS connections through a http proxy. + */ + +/* + * Copyright (c) 2018 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ + +#include "lwip/apps/altcp_proxyconnect.h" + +#if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/altcp.h" +#include "lwip/priv/altcp_priv.h" + +#include "lwip/altcp_tcp.h" +#include "lwip/altcp_tls.h" + +#include "lwip/mem.h" +#include "lwip/init.h" + +#include + +/** This string is passed in the HTTP header as "User-Agent: " */ +#ifndef ALTCP_PROXYCONNECT_CLIENT_AGENT +#define ALTCP_PROXYCONNECT_CLIENT_AGENT "lwIP/" LWIP_VERSION_STRING " (http://savannah.nongnu.org/projects/lwip)" +#endif + +#define ALTCP_PROXYCONNECT_FLAGS_CONNECT_STARTED 0x01 +#define ALTCP_PROXYCONNECT_FLAGS_HANDSHAKE_DONE 0x02 + +typedef struct altcp_proxyconnect_state_s +{ + ip_addr_t outer_addr; + u16_t outer_port; + struct altcp_proxyconnect_config *conf; + u8_t flags; +} altcp_proxyconnect_state_t; + +/* Variable prototype, the actual declaration is at the end of this file + since it contains pointers to static functions declared here */ +extern const struct altcp_functions altcp_proxyconnect_functions; + +/* memory management functions: */ + +static altcp_proxyconnect_state_t * +altcp_proxyconnect_state_alloc(void) +{ + altcp_proxyconnect_state_t *ret = (altcp_proxyconnect_state_t *)mem_calloc(1, sizeof(altcp_proxyconnect_state_t)); + return ret; +} + +static void +altcp_proxyconnect_state_free(altcp_proxyconnect_state_t *state) +{ + LWIP_ASSERT("state != NULL", state != NULL); + mem_free(state); +} + +/* helper functions */ + +#define PROXY_CONNECT "CONNECT %s:%d HTTP/1.1\r\n" /* HOST, PORT */ \ + "User-Agent: %s\r\n" /* User-Agent */\ + "Proxy-Connection: keep-alive\r\n" \ + "Connection: keep-alive\r\n" \ + "\r\n" +#define PROXY_CONNECT_FORMAT(host, port) PROXY_CONNECT, host, port, ALTCP_PROXYCONNECT_CLIENT_AGENT + +/* Format the http proxy connect request via snprintf */ +static int +altcp_proxyconnect_format_request(char *buffer, size_t bufsize, const char *host, int port) +{ + return snprintf(buffer, bufsize, PROXY_CONNECT_FORMAT(host, port)); +} + +/* Create and send the http proxy connect request */ +static err_t +altcp_proxyconnect_send_request(struct altcp_pcb *conn) +{ + int len, len2; + mem_size_t alloc_len; + char *buffer, *host; + altcp_proxyconnect_state_t *state = (altcp_proxyconnect_state_t *)conn->state; + + if (!state) { + return ERR_VAL; + } + /* Use printf with zero length to get the required allocation size */ + len = altcp_proxyconnect_format_request(NULL, 0, "", state->outer_port); + if (len < 0) { + return ERR_VAL; + } + /* add allocation size for IP address strings */ +#if LWIP_IPV6 + len += 40; /* worst-case IPv6 address length */ +#else + len += 16; /* worst-case IPv4 address length */ +#endif + alloc_len = (mem_size_t)len; + if ((len < 0) || (int)alloc_len != len) { + /* overflow */ + return ERR_MEM; + } + /* Allocate a bufer for the request string */ + buffer = (char *)mem_malloc(alloc_len); + if (buffer == NULL) { + return ERR_MEM; + } + host = ipaddr_ntoa(&state->outer_addr); + len2 = altcp_proxyconnect_format_request(buffer, alloc_len, host, state->outer_port); + if ((len2 > 0) && (len2 <= len) && (len2 <= 0xFFFF)) { + err_t err = altcp_write(conn->inner_conn, buffer, (u16_t)len2, TCP_WRITE_FLAG_COPY); + if (err != ERR_OK) { + /* @todo: abort? */ + mem_free(buffer); + return err; + } + } + mem_free(buffer); + return ERR_OK; +} + +/* callback functions from inner/lower connection: */ + +/** Connected callback from lower connection (i.e. TCP). + * Not really implemented/tested yet... + */ +static err_t +altcp_proxyconnect_lower_connected(void *arg, struct altcp_pcb *inner_conn, err_t err) +{ + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + if (conn && conn->state) { + LWIP_ASSERT("pcb mismatch", conn->inner_conn == inner_conn); + LWIP_UNUSED_ARG(inner_conn); /* for LWIP_NOASSERT */ + /* upper connected is called when handshake is done */ + if (err != ERR_OK) { + if (conn->connected) { + if (conn->connected(conn->arg, conn, err) == ERR_ABRT) { + return ERR_ABRT; + } + return ERR_OK; + } + } + /* send proxy connect request here */ + return altcp_proxyconnect_send_request(conn); + } + return ERR_VAL; +} + +/** Recv callback from lower connection (i.e. TCP) + * This one mainly differs between connection setup (wait for proxy OK string) + * and application phase (data is passed on to the application). + */ +static err_t +altcp_proxyconnect_lower_recv(void *arg, struct altcp_pcb *inner_conn, struct pbuf *p, err_t err) +{ + altcp_proxyconnect_state_t *state; + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + + LWIP_ASSERT("no err expected", err == ERR_OK); + LWIP_UNUSED_ARG(err); + + if (!conn) { + /* no connection given as arg? should not happen, but prevent pbuf/conn leaks */ + if (p != NULL) { + pbuf_free(p); + } + altcp_close(inner_conn); + return ERR_CLSD; + } + state = (altcp_proxyconnect_state_t *)conn->state; + LWIP_ASSERT("pcb mismatch", conn->inner_conn == inner_conn); + if (!state) { + /* already closed */ + if (p != NULL) { + pbuf_free(p); + } + altcp_close(inner_conn); + return ERR_CLSD; + } + if (state->flags & ALTCP_PROXYCONNECT_FLAGS_HANDSHAKE_DONE) { + /* application phase, just pass this through */ + if (conn->recv) { + return conn->recv(conn->arg, conn, p, err); + } + pbuf_free(p); + return ERR_OK; + } else { + /* setup phase */ + /* handle NULL pbuf (inner connection closed) */ + if (p == NULL) { + if (altcp_close(conn) != ERR_OK) { + altcp_abort(conn); + return ERR_ABRT; + } + return ERR_OK; + } else { + /* @todo: parse setup phase rx data + for now, we just wait for the end of the header... */ + u16_t idx = pbuf_memfind(p, "\r\n\r\n", 4, 0); + altcp_recved(inner_conn, p->tot_len); + pbuf_free(p); + if (idx != 0xFFFF) { + state->flags |= ALTCP_PROXYCONNECT_FLAGS_HANDSHAKE_DONE; + if (conn->connected) { + return conn->connected(conn->arg, conn, ERR_OK); + } + } + return ERR_OK; + } + } +} + +/** Sent callback from lower connection (i.e. TCP) + * This only informs the upper layer to try to send more, not about + * the number of ACKed bytes. + */ +static err_t +altcp_proxyconnect_lower_sent(void *arg, struct altcp_pcb *inner_conn, u16_t len) +{ + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + LWIP_UNUSED_ARG(len); + if (conn) { + altcp_proxyconnect_state_t *state = (altcp_proxyconnect_state_t *)conn->state; + LWIP_ASSERT("pcb mismatch", conn->inner_conn == inner_conn); + LWIP_UNUSED_ARG(inner_conn); /* for LWIP_NOASSERT */ + if (!state || !(state->flags & ALTCP_PROXYCONNECT_FLAGS_HANDSHAKE_DONE)) { + /* @todo: do something here? */ + return ERR_OK; + } + /* pass this on to upper sent */ + if (conn->sent) { + return conn->sent(conn->arg, conn, len); + } + } + return ERR_OK; +} + +/** Poll callback from lower connection (i.e. TCP) + * Just pass this on to the application. + * @todo: retry sending? + */ +static err_t +altcp_proxyconnect_lower_poll(void *arg, struct altcp_pcb *inner_conn) +{ + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + if (conn) { + LWIP_ASSERT("pcb mismatch", conn->inner_conn == inner_conn); + LWIP_UNUSED_ARG(inner_conn); /* for LWIP_NOASSERT */ + if (conn->poll) { + return conn->poll(conn->arg, conn); + } + } + return ERR_OK; +} + +static void +altcp_proxyconnect_lower_err(void *arg, err_t err) +{ + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + if (conn) { + conn->inner_conn = NULL; /* already freed */ + if (conn->err) { + conn->err(conn->arg, err); + } + altcp_free(conn); + } +} + + +/* setup functions */ + +static void +altcp_proxyconnect_setup_callbacks(struct altcp_pcb *conn, struct altcp_pcb *inner_conn) +{ + altcp_arg(inner_conn, conn); + altcp_recv(inner_conn, altcp_proxyconnect_lower_recv); + altcp_sent(inner_conn, altcp_proxyconnect_lower_sent); + altcp_err(inner_conn, altcp_proxyconnect_lower_err); + /* tcp_poll is set when interval is set by application */ + /* listen is set totally different :-) */ +} + +static err_t +altcp_proxyconnect_setup(struct altcp_proxyconnect_config *config, struct altcp_pcb *conn, struct altcp_pcb *inner_conn) +{ + altcp_proxyconnect_state_t *state; + if (!config) { + return ERR_ARG; + } + LWIP_ASSERT("invalid inner_conn", conn != inner_conn); + + /* allocate proxyconnect context */ + state = altcp_proxyconnect_state_alloc(); + if (state == NULL) { + return ERR_MEM; + } + state->flags = 0; + state->conf = config; + altcp_proxyconnect_setup_callbacks(conn, inner_conn); + conn->inner_conn = inner_conn; + conn->fns = &altcp_proxyconnect_functions; + conn->state = state; + return ERR_OK; +} + +/** Allocate a new altcp layer connecting through a proxy. + * This function gets the inner pcb passed. + * + * @param config struct altcp_proxyconnect_config that contains the proxy settings + * @param inner_pcb pcb that makes the connection to the proxy (i.e. tcp pcb) + */ +struct altcp_pcb * +altcp_proxyconnect_new(struct altcp_proxyconnect_config *config, struct altcp_pcb *inner_pcb) +{ + struct altcp_pcb *ret; + if (inner_pcb == NULL) { + return NULL; + } + ret = altcp_alloc(); + if (ret != NULL) { + if (altcp_proxyconnect_setup(config, ret, inner_pcb) != ERR_OK) { + altcp_free(ret); + return NULL; + } + } + return ret; +} + +/** Allocate a new altcp layer connecting through a proxy. + * This function allocates the inner pcb as tcp pcb, resulting in a direct tcp + * connection to the proxy. + * + * @param config struct altcp_proxyconnect_config that contains the proxy settings + * @param ip_type IP type of the connection (@ref lwip_ip_addr_type) + */ +struct altcp_pcb * +altcp_proxyconnect_new_tcp(struct altcp_proxyconnect_config *config, u8_t ip_type) +{ + struct altcp_pcb *inner_pcb, *ret; + + /* inner pcb is tcp */ + inner_pcb = altcp_tcp_new_ip_type(ip_type); + if (inner_pcb == NULL) { + return NULL; + } + ret = altcp_proxyconnect_new(config, inner_pcb); + if (ret == NULL) { + altcp_close(inner_pcb); + } + return ret; +} + +/** Allocator function to allocate a proxy connect altcp pcb connecting directly + * via tcp to the proxy. + * + * The returned pcb is a chain: altcp_proxyconnect - altcp_tcp - tcp pcb + * + * This function is meant for use with @ref altcp_new. + * + * @param arg struct altcp_proxyconnect_config that contains the proxy settings + * @param ip_type IP type of the connection (@ref lwip_ip_addr_type) + */ +struct altcp_pcb * +altcp_proxyconnect_alloc(void *arg, u8_t ip_type) +{ + return altcp_proxyconnect_new_tcp((struct altcp_proxyconnect_config *)arg, ip_type); +} + + +#if LWIP_ALTCP_TLS + +/** Allocator function to allocate a TLS connection through a proxy. + * + * The returned pcb is a chain: altcp_tls - altcp_proxyconnect - altcp_tcp - tcp pcb + * + * This function is meant for use with @ref altcp_new. + * + * @param arg struct altcp_proxyconnect_tls_config that contains the proxy settings + * and tls settings + * @param ip_type IP type of the connection (@ref lwip_ip_addr_type) + */ +struct altcp_pcb * +altcp_proxyconnect_tls_alloc(void *arg, u8_t ip_type) +{ + struct altcp_proxyconnect_tls_config *cfg = (struct altcp_proxyconnect_tls_config *)arg; + struct altcp_pcb *proxy_pcb; + struct altcp_pcb *tls_pcb; + + proxy_pcb = altcp_proxyconnect_new_tcp(&cfg->proxy, ip_type); + tls_pcb = altcp_tls_wrap(cfg->tls_config, proxy_pcb); + + if (tls_pcb == NULL) { + altcp_close(proxy_pcb); + } + return tls_pcb; +} +#endif /* LWIP_ALTCP_TLS */ + +/* "virtual" functions */ +static void +altcp_proxyconnect_set_poll(struct altcp_pcb *conn, u8_t interval) +{ + if (conn != NULL) { + altcp_poll(conn->inner_conn, altcp_proxyconnect_lower_poll, interval); + } +} + +static void +altcp_proxyconnect_recved(struct altcp_pcb *conn, u16_t len) +{ + altcp_proxyconnect_state_t *state; + if (conn == NULL) { + return; + } + state = (altcp_proxyconnect_state_t *)conn->state; + if (state == NULL) { + return; + } + if (!(state->flags & ALTCP_PROXYCONNECT_FLAGS_HANDSHAKE_DONE)) { + return; + } + altcp_recved(conn->inner_conn, len); +} + +static err_t +altcp_proxyconnect_connect(struct altcp_pcb *conn, const ip_addr_t *ipaddr, u16_t port, altcp_connected_fn connected) +{ + altcp_proxyconnect_state_t *state; + + if ((conn == NULL) || (ipaddr == NULL)) { + return ERR_VAL; + } + state = (altcp_proxyconnect_state_t *)conn->state; + if (state == NULL) { + return ERR_VAL; + } + if (state->flags & ALTCP_PROXYCONNECT_FLAGS_CONNECT_STARTED) { + return ERR_VAL; + } + state->flags |= ALTCP_PROXYCONNECT_FLAGS_CONNECT_STARTED; + + conn->connected = connected; + /* connect to our proxy instead, but store the requested address and port */ + ip_addr_copy(state->outer_addr, *ipaddr); + state->outer_port = port; + + return altcp_connect(conn->inner_conn, &state->conf->proxy_addr, state->conf->proxy_port, altcp_proxyconnect_lower_connected); +} + +static struct altcp_pcb * +altcp_proxyconnect_listen(struct altcp_pcb *conn, u8_t backlog, err_t *err) +{ + LWIP_UNUSED_ARG(conn); + LWIP_UNUSED_ARG(backlog); + LWIP_UNUSED_ARG(err); + /* listen not supported! */ + return NULL; +} + +static void +altcp_proxyconnect_abort(struct altcp_pcb *conn) +{ + if (conn != NULL) { + if (conn->inner_conn != NULL) { + altcp_abort(conn->inner_conn); + } + altcp_free(conn); + } +} + +static err_t +altcp_proxyconnect_close(struct altcp_pcb *conn) +{ + if (conn == NULL) { + return ERR_VAL; + } + if (conn->inner_conn != NULL) { + err_t err = altcp_close(conn->inner_conn); + if (err != ERR_OK) { + /* closing inner conn failed, return the error */ + return err; + } + } + /* no inner conn or closing it succeeded, deallocate myself */ + altcp_free(conn); + return ERR_OK; +} + +static err_t +altcp_proxyconnect_write(struct altcp_pcb *conn, const void *dataptr, u16_t len, u8_t apiflags) +{ + altcp_proxyconnect_state_t *state; + + LWIP_UNUSED_ARG(apiflags); + + if (conn == NULL) { + return ERR_VAL; + } + + state = (altcp_proxyconnect_state_t *)conn->state; + if (state == NULL) { + /* @todo: which error? */ + return ERR_CLSD; + } + if (!(state->flags & ALTCP_PROXYCONNECT_FLAGS_HANDSHAKE_DONE)) { + /* @todo: which error? */ + return ERR_VAL; + } + return altcp_write(conn->inner_conn, dataptr, len, apiflags); +} + +static void +altcp_proxyconnect_dealloc(struct altcp_pcb *conn) +{ + /* clean up and free tls state */ + if (conn) { + altcp_proxyconnect_state_t *state = (altcp_proxyconnect_state_t *)conn->state; + if (state) { + altcp_proxyconnect_state_free(state); + conn->state = NULL; + } + } +} +const struct altcp_functions altcp_proxyconnect_functions = { + altcp_proxyconnect_set_poll, + altcp_proxyconnect_recved, + altcp_default_bind, + altcp_proxyconnect_connect, + altcp_proxyconnect_listen, + altcp_proxyconnect_abort, + altcp_proxyconnect_close, + altcp_default_shutdown, + altcp_proxyconnect_write, + altcp_default_output, + altcp_default_mss, + altcp_default_sndbuf, + altcp_default_sndqueuelen, + altcp_default_nagle_disable, + altcp_default_nagle_enable, + altcp_default_nagle_disabled, + altcp_default_setprio, + altcp_proxyconnect_dealloc, + altcp_default_get_tcp_addrinfo, + altcp_default_get_ip, + altcp_default_get_port +#ifdef LWIP_DEBUG + , altcp_default_dbg_get_tcp_state +#endif +}; + +#endif /* LWIP_ALTCP */ diff --git a/Libraries/LwIP/src/apps/http/fs.c b/Libraries/LwIP/src/apps/http/fs.c new file mode 100644 index 0000000..ba3055f --- /dev/null +++ b/Libraries/LwIP/src/apps/http/fs.c @@ -0,0 +1,178 @@ +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#include "lwip/apps/httpd_opts.h" +#include "lwip/def.h" +#include "lwip/apps/fs.h" +#include "fsdata.h" +#include + +#if HTTPD_USE_CUSTOM_FSDATA +#include "fsdata_custom.c" +#else /* HTTPD_USE_CUSTOM_FSDATA */ +#include "fsdata.c" +#endif /* HTTPD_USE_CUSTOM_FSDATA */ + +/*-----------------------------------------------------------------------------------*/ + +#if LWIP_HTTPD_CUSTOM_FILES +int fs_open_custom(struct fs_file *file, const char *name); +void fs_close_custom(struct fs_file *file); +#if LWIP_HTTPD_FS_ASYNC_READ +u8_t fs_canread_custom(struct fs_file *file); +u8_t fs_wait_read_custom(struct fs_file *file, fs_wait_cb callback_fn, void *callback_arg); +int fs_read_async_custom(struct fs_file *file, char *buffer, int count, fs_wait_cb callback_fn, void *callback_arg); +#else /* LWIP_HTTPD_FS_ASYNC_READ */ +int fs_read_custom(struct fs_file *file, char *buffer, int count); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + +/*-----------------------------------------------------------------------------------*/ +err_t +fs_open(struct fs_file *file, const char *name) +{ + const struct fsdata_file *f; + + if ((file == NULL) || (name == NULL)) { + return ERR_ARG; + } + +#if LWIP_HTTPD_CUSTOM_FILES + if (fs_open_custom(file, name)) { + file->is_custom_file = 1; + return ERR_OK; + } + file->is_custom_file = 0; +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + + for (f = FS_ROOT; f != NULL; f = f->next) { + if (!strcmp(name, (const char *)f->name)) { + file->data = (const char *)f->data; + file->len = f->len; + file->index = f->len; + file->pextension = NULL; + file->flags = f->flags; +#if HTTPD_PRECALCULATED_CHECKSUM + file->chksum_count = f->chksum_count; + file->chksum = f->chksum; +#endif /* HTTPD_PRECALCULATED_CHECKSUM */ +#if LWIP_HTTPD_FILE_STATE + file->state = fs_state_init(file, name); +#endif /* #if LWIP_HTTPD_FILE_STATE */ + return ERR_OK; + } + } + /* file not found */ + return ERR_VAL; +} + +/*-----------------------------------------------------------------------------------*/ +void +fs_close(struct fs_file *file) +{ +#if LWIP_HTTPD_CUSTOM_FILES + if (file->is_custom_file) { + fs_close_custom(file); + } +#endif /* LWIP_HTTPD_CUSTOM_FILES */ +#if LWIP_HTTPD_FILE_STATE + fs_state_free(file, file->state); +#endif /* #if LWIP_HTTPD_FILE_STATE */ + LWIP_UNUSED_ARG(file); +} +/*-----------------------------------------------------------------------------------*/ +#if LWIP_HTTPD_DYNAMIC_FILE_READ +#if LWIP_HTTPD_FS_ASYNC_READ +int +fs_read_async(struct fs_file *file, char *buffer, int count, fs_wait_cb callback_fn, void *callback_arg) +#else /* LWIP_HTTPD_FS_ASYNC_READ */ +int +fs_read(struct fs_file *file, char *buffer, int count) +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +{ + int read; + if(file->index == file->len) { + return FS_READ_EOF; + } +#if LWIP_HTTPD_FS_ASYNC_READ + LWIP_UNUSED_ARG(callback_fn); + LWIP_UNUSED_ARG(callback_arg); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +#if LWIP_HTTPD_CUSTOM_FILES + if (file->is_custom_file) { +#if LWIP_HTTPD_FS_ASYNC_READ + return fs_read_async_custom(file, buffer, count, callback_fn, callback_arg); +#else /* LWIP_HTTPD_FS_ASYNC_READ */ + return fs_read_custom(file, buffer, count); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + } +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + + read = file->len - file->index; + if(read > count) { + read = count; + } + + MEMCPY(buffer, (file->data + file->index), read); + file->index += read; + + return(read); +} +#endif /* LWIP_HTTPD_DYNAMIC_FILE_READ */ +/*-----------------------------------------------------------------------------------*/ +#if LWIP_HTTPD_FS_ASYNC_READ +int +fs_is_file_ready(struct fs_file *file, fs_wait_cb callback_fn, void *callback_arg) +{ + if (file != NULL) { +#if LWIP_HTTPD_FS_ASYNC_READ +#if LWIP_HTTPD_CUSTOM_FILES + if (!fs_canread_custom(file)) { + if (fs_wait_read_custom(file, callback_fn, callback_arg)) { + return 0; + } + } +#else /* LWIP_HTTPD_CUSTOM_FILES */ + LWIP_UNUSED_ARG(callback_fn); + LWIP_UNUSED_ARG(callback_arg); +#endif /* LWIP_HTTPD_CUSTOM_FILES */ +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + } + return 1; +} +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +/*-----------------------------------------------------------------------------------*/ +int +fs_bytes_left(struct fs_file *file) +{ + return file->len - file->index; +} diff --git a/Libraries/LwIP/src/apps/http/fs/404.html b/Libraries/LwIP/src/apps/http/fs/404.html new file mode 100644 index 0000000..40b343a --- /dev/null +++ b/Libraries/LwIP/src/apps/http/fs/404.html @@ -0,0 +1,21 @@ + +lwIP - A Lightweight TCP/IP Stack + + + + +
                  + SICS logo + +

                  lwIP - A Lightweight TCP/IP Stack

                  +

                  404 - Page not found

                  +

                  + Sorry, the page you are requesting was not found on this + server. +

                  +
                  +   +
                  + + diff --git a/Libraries/LwIP/src/apps/http/fs/img/sics.gif b/Libraries/LwIP/src/apps/http/fs/img/sics.gif new file mode 100644 index 0000000000000000000000000000000000000000..0a4fc7bb07050eec9226ca93bc9ad237f35502c8 GIT binary patch literal 724 zcmZ?wbhEHbbYoCrSjxa~Q`<5tD{KG${gWq8=I7_%uwlcpWy=~G8p_Jb4zT=SA;^3z!7uBu>UZ()&> z+r1;Oh0mFly?klC)5cAV$sD}98F{LBUHERS_hGGKac5`W-mvIltqUt73*&`X?UVf< z%Uqmm^}K~z9MaFS-jwgVGIUF9Z77P_s7Vc}y?@_XT+GT)AcZF$6%$qQsA+Q0bF z!Mss%ktc&>+n*qp2aIzy6-8A8zNf3ovHkU%wPnH@(O;*7g5`QX{a~M@%VFg!JaWkVUk6yFE1wL^V{({yi?^s!by^W;pXIz%mY}~L;uBR^JK|)kW|Avap zVzxyL+2N;b1q1f77^T<4c)gUoN8c;6;F^+^0^VN o#HPS7gPr3^SVM!%(d|c@c+6frXclnOc-SHmma$O4k%7S)08~d;ZvX%Q literal 0 HcmV?d00001 diff --git a/Libraries/LwIP/src/apps/http/fs/index.html b/Libraries/LwIP/src/apps/http/fs/index.html new file mode 100644 index 0000000..ab575ef --- /dev/null +++ b/Libraries/LwIP/src/apps/http/fs/index.html @@ -0,0 +1,47 @@ + +lwIP - A Lightweight TCP/IP Stack + + + + +
                  + SICS logo + +

                  lwIP - A Lightweight TCP/IP Stack

                  +

                  + The web page you are watching was served by a simple web + server running on top of the lightweight TCP/IP stack lwIP. +

                  +

                  + lwIP is an open source implementation of the TCP/IP + protocol suite that was originally written by Adam Dunkels + of the Swedish Institute of Computer Science but now is + being actively developed by a team of developers + distributed world-wide. Since it's release, lwIP has + spurred a lot of interest and has been ported to several + platforms and operating systems. lwIP can be used either + with or without an underlying OS. +

                  +

                  + The focus of the lwIP TCP/IP implementation is to reduce + the RAM usage while still having a full scale TCP. This + makes lwIP suitable for use in embedded systems with tens + of kilobytes of free RAM and room for around 40 kilobytes + of code ROM. +

                  +

                  + More information about lwIP can be found at the lwIP + homepage at http://savannah.nongnu.org/projects/lwip/ + or at the lwIP wiki at http://lwip.wikia.com/. +

                  +
                  +   +
                  + + + diff --git a/Libraries/LwIP/src/apps/http/fs_new.c b/Libraries/LwIP/src/apps/http/fs_new.c new file mode 100644 index 0000000..f15a480 --- /dev/null +++ b/Libraries/LwIP/src/apps/http/fs_new.c @@ -0,0 +1,174 @@ +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#include "lwip/apps/httpd_opts.h" +#include "lwip/def.h" +#include "lwip/apps/fs.h" +#include + + +#include HTTPD_FSDATA_FILE + +/*-----------------------------------------------------------------------------------*/ + +#if LWIP_HTTPD_CUSTOM_FILES +int fs_open_custom(struct fs_file *file, const char *name); +void fs_close_custom(struct fs_file *file); +#if LWIP_HTTPD_FS_ASYNC_READ +u8_t fs_canread_custom(struct fs_file *file); +u8_t fs_wait_read_custom(struct fs_file *file, fs_wait_cb callback_fn, void *callback_arg); +int fs_read_async_custom(struct fs_file *file, char *buffer, int count, fs_wait_cb callback_fn, void *callback_arg); +#else /* LWIP_HTTPD_FS_ASYNC_READ */ +int fs_read_custom(struct fs_file *file, char *buffer, int count); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + +/*-----------------------------------------------------------------------------------*/ +err_t +fs_open(struct fs_file *file, const char *name) +{ + const struct fsdata_file *f; + + if ((file == NULL) || (name == NULL)) { + return ERR_ARG; + } + +#if LWIP_HTTPD_CUSTOM_FILES + if (fs_open_custom(file, name)) { + file->is_custom_file = 1; + return ERR_OK; + } + file->is_custom_file = 0; +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + + for (f = FS_ROOT; f != NULL; f = f->next) { + if (!strcmp(name, (const char *)f->name)) { + file->data = (const char *)f->data; + file->len = f->len; + file->index = f->len; + file->pextension = NULL; + file->flags = f->flags; +#if HTTPD_PRECALCULATED_CHECKSUM + file->chksum_count = f->chksum_count; + file->chksum = f->chksum; +#endif /* HTTPD_PRECALCULATED_CHECKSUM */ +#if LWIP_HTTPD_FILE_STATE + file->state = fs_state_init(file, name); +#endif /* #if LWIP_HTTPD_FILE_STATE */ + return ERR_OK; + } + } + /* file not found */ + return ERR_VAL; +} + +/*-----------------------------------------------------------------------------------*/ +void +fs_close(struct fs_file *file) +{ +#if LWIP_HTTPD_CUSTOM_FILES + if (file->is_custom_file) { + fs_close_custom(file); + } +#endif /* LWIP_HTTPD_CUSTOM_FILES */ +#if LWIP_HTTPD_FILE_STATE + fs_state_free(file, file->state); +#endif /* #if LWIP_HTTPD_FILE_STATE */ + LWIP_UNUSED_ARG(file); +} +/*-----------------------------------------------------------------------------------*/ +#if LWIP_HTTPD_DYNAMIC_FILE_READ +#if LWIP_HTTPD_FS_ASYNC_READ +int +fs_read_async(struct fs_file *file, char *buffer, int count, fs_wait_cb callback_fn, void *callback_arg) +#else /* LWIP_HTTPD_FS_ASYNC_READ */ +int +fs_read(struct fs_file *file, char *buffer, int count) +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +{ + int read; + if (file->index == file->len) { + return FS_READ_EOF; + } +#if LWIP_HTTPD_FS_ASYNC_READ + LWIP_UNUSED_ARG(callback_fn); + LWIP_UNUSED_ARG(callback_arg); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +#if LWIP_HTTPD_CUSTOM_FILES + if (file->is_custom_file) { +#if LWIP_HTTPD_FS_ASYNC_READ + return fs_read_async_custom(file, buffer, count, callback_fn, callback_arg); +#else /* LWIP_HTTPD_FS_ASYNC_READ */ + return fs_read_custom(file, buffer, count); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + } +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + + read = file->len - file->index; + if (read > count) { + read = count; + } + + MEMCPY(buffer, (file->data + file->index), read); + file->index += read; + + return (read); +} +#endif /* LWIP_HTTPD_DYNAMIC_FILE_READ */ +/*-----------------------------------------------------------------------------------*/ +#if LWIP_HTTPD_FS_ASYNC_READ +int +fs_is_file_ready(struct fs_file *file, fs_wait_cb callback_fn, void *callback_arg) +{ + if (file != NULL) { +#if LWIP_HTTPD_FS_ASYNC_READ +#if LWIP_HTTPD_CUSTOM_FILES + if (!fs_canread_custom(file)) { + if (fs_wait_read_custom(file, callback_fn, callback_arg)) { + return 0; + } + } +#else /* LWIP_HTTPD_CUSTOM_FILES */ + LWIP_UNUSED_ARG(callback_fn); + LWIP_UNUSED_ARG(callback_arg); +#endif /* LWIP_HTTPD_CUSTOM_FILES */ +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + } + return 1; +} +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +/*-----------------------------------------------------------------------------------*/ +int +fs_bytes_left(struct fs_file *file) +{ + return file->len - file->index; +} diff --git a/Libraries/LwIP/src/apps/http/fsdata.c b/Libraries/LwIP/src/apps/http/fsdata.c new file mode 100644 index 0000000..6170ce6 --- /dev/null +++ b/Libraries/LwIP/src/apps/http/fsdata.c @@ -0,0 +1,298 @@ +#include "lwip/apps/fs.h" +#include "lwip/def.h" +#include "fsdata.h" + + +#define file_NULL (struct fsdata_file *) NULL + + +static const unsigned int dummy_align__img_sics_gif = 0; +static const unsigned char data__img_sics_gif[] = { +/* /img/sics.gif (14 chars) */ +0x2f,0x69,0x6d,0x67,0x2f,0x73,0x69,0x63,0x73,0x2e,0x67,0x69,0x66,0x00,0x00,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) +" (63 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, +0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, +0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, +0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, +/* "Content-type: image/gif + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x69,0x6d, +0x61,0x67,0x65,0x2f,0x67,0x69,0x66,0x0d,0x0a,0x0d,0x0a, +/* raw file data (724 bytes) */ +0x47,0x49,0x46,0x38,0x39,0x61,0x46,0x00,0x22,0x00,0xa5,0x00,0x00,0xd9,0x2b,0x39, +0x6a,0x6a,0x6a,0xbf,0xbf,0xbf,0x93,0x93,0x93,0x0f,0x0f,0x0f,0xb0,0xb0,0xb0,0xa6, +0xa6,0xa6,0x80,0x80,0x80,0x76,0x76,0x76,0x1e,0x1e,0x1e,0x9d,0x9d,0x9d,0x2e,0x2e, +0x2e,0x49,0x49,0x49,0x54,0x54,0x54,0x8a,0x8a,0x8a,0x60,0x60,0x60,0xc6,0xa6,0x99, +0xbd,0xb5,0xb2,0xc2,0xab,0xa1,0xd9,0x41,0x40,0xd5,0x67,0x55,0xc0,0xb0,0xaa,0xd5, +0x5e,0x4e,0xd6,0x50,0x45,0xcc,0x93,0x7d,0xc8,0xa1,0x90,0xce,0x8b,0x76,0xd2,0x7b, +0x65,0xd1,0x84,0x6d,0xc9,0x99,0x86,0x3a,0x3a,0x3a,0x00,0x00,0x00,0xb8,0xb8,0xb8, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2c,0x00,0x00, +0x00,0x00,0x46,0x00,0x22,0x00,0x00,0x06,0xfe,0x40,0x90,0x70,0x48,0x2c,0x1a,0x8f, +0xc8,0xa4,0x72,0xc9,0x6c,0x3a,0x9f,0xd0,0xa8,0x74,0x4a,0xad,0x5a,0xaf,0xd8,0xac, +0x76,0xa9,0x40,0x04,0xbe,0x83,0xe2,0x60,0x3c,0x50,0x20,0x0d,0x8e,0x6f,0x00,0x31, +0x28,0x1c,0x0d,0x07,0xb5,0xc3,0x60,0x75,0x24,0x3e,0xf8,0xfc,0x87,0x11,0x06,0xe9, +0x3d,0x46,0x07,0x0b,0x7a,0x7a,0x7c,0x43,0x06,0x1e,0x84,0x78,0x0b,0x07,0x6e,0x51, +0x01,0x8a,0x84,0x08,0x7e,0x79,0x80,0x87,0x89,0x91,0x7a,0x93,0x0a,0x04,0x99,0x78, +0x96,0x4f,0x03,0x9e,0x79,0x01,0x94,0x9f,0x43,0x9c,0xa3,0xa4,0x05,0x77,0xa3,0xa0, +0x4e,0x98,0x79,0x0b,0x1e,0x83,0xa4,0xa6,0x1f,0x96,0x05,0x9d,0xaa,0x78,0x01,0x07, +0x84,0x04,0x1e,0x1e,0xbb,0xb8,0x51,0x84,0x0e,0x43,0x05,0x07,0x77,0xa5,0x7f,0x42, +0xb1,0xb2,0x01,0x63,0x08,0x0d,0xbb,0x01,0x0c,0x7a,0x0d,0x44,0x0e,0xd8,0xaf,0x4c, +0x05,0x7a,0x04,0x47,0x07,0x07,0xb7,0x80,0xa2,0xe1,0x7d,0x44,0x05,0x01,0x04,0x01, +0xd0,0xea,0x87,0x93,0x4f,0xe0,0x9a,0x49,0xce,0xd8,0x79,0x04,0x66,0x20,0x15,0x10, +0x10,0x11,0x92,0x29,0x80,0xb6,0xc0,0x91,0x15,0x45,0x1e,0x90,0x19,0x71,0x46,0xa8, +0x5c,0x04,0x0e,0x00,0x22,0x4e,0xe8,0x40,0x24,0x9f,0x3e,0x04,0x06,0xa7,0x58,0xd4, +0x93,0xa0,0x1c,0x91,0x3f,0xe8,0xf0,0x88,0x03,0xb1,0x21,0xa2,0x49,0x00,0x19,0x86, +0xfc,0x52,0x44,0xe0,0x01,0x9d,0x29,0x21,0x15,0x25,0x50,0xf7,0x67,0x25,0x1e,0x06, +0xfd,0x4e,0x9a,0xb4,0x90,0xac,0x15,0xfa,0xcb,0x52,0x53,0x1e,0x8c,0xf2,0xf8,0x07, +0x92,0x2d,0x08,0x3a,0x4d,0x12,0x49,0x95,0x49,0xdb,0x14,0x04,0xc4,0x14,0x85,0x29, +0xaa,0xe7,0x01,0x08,0xa4,0x49,0x01,0x14,0x51,0xe0,0x53,0x91,0xd5,0x29,0x06,0x1a, +0x64,0x02,0xf4,0xc7,0x81,0x9e,0x05,0x20,0x22,0x64,0xa5,0x30,0xae,0xab,0x9e,0x97, +0x53,0xd8,0xb9,0xfd,0x50,0xef,0x93,0x02,0x42,0x74,0x34,0xe8,0x9c,0x20,0x21,0xc9, +0x01,0x68,0x78,0xe6,0x55,0x29,0x20,0x56,0x4f,0x4c,0x40,0x51,0x71,0x82,0xc0,0x70, +0x21,0x22,0x85,0xbe,0x4b,0x1c,0x44,0x05,0xea,0xa4,0x01,0xbf,0x22,0xb5,0xf0,0x1c, +0x06,0x51,0x38,0x8f,0xe0,0x22,0xec,0x18,0xac,0x39,0x22,0xd4,0xd6,0x93,0x44,0x01, +0x32,0x82,0xc8,0xfc,0x61,0xb3,0x01,0x45,0x0c,0x2e,0x83,0x30,0xd0,0x0e,0x17,0x24, +0x0f,0x70,0x85,0x94,0xee,0x05,0x05,0x53,0x4b,0x32,0x1b,0x3f,0x98,0xd3,0x1d,0x29, +0x81,0xb0,0xae,0x1e,0x8c,0x7e,0x68,0xe0,0x60,0x5a,0x54,0x8f,0xb0,0x78,0x69,0x73, +0x06,0xa2,0x00,0x6b,0x57,0xca,0x3d,0x11,0x50,0xbd,0x04,0x30,0x4b,0x3a,0xd4,0xab, +0x5f,0x1f,0x9b,0x3d,0x13,0x74,0x27,0x88,0x3c,0x25,0xe0,0x17,0xbe,0x7a,0x79,0x45, +0x0d,0x0c,0xb0,0x8b,0xda,0x90,0xca,0x80,0x06,0x5d,0x17,0x60,0x1c,0x22,0x4c,0xd8, +0x57,0x22,0x06,0x20,0x00,0x98,0x07,0x08,0xe4,0x56,0x80,0x80,0x1c,0xc5,0xb7,0xc5, +0x82,0x0c,0x36,0xe8,0xe0,0x83,0x10,0x46,0x28,0xe1,0x84,0x14,0x56,0x68,0xa1,0x10, +0x41,0x00,0x00,0x3b,}; + +static const unsigned int dummy_align__404_html = 1; +static const unsigned char data__404_html[] = { +/* /404.html (10 chars) */ +0x2f,0x34,0x30,0x34,0x2e,0x68,0x74,0x6d,0x6c,0x00,0x00,0x00, + +/* HTTP header */ +/* "HTTP/1.0 404 File not found +" (29 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x34,0x30,0x34,0x20,0x46,0x69,0x6c, +0x65,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x0d,0x0a, +/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) +" (63 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, +0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, +0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, +0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, +/* "Content-type: text/html + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, +0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x0d,0x0a, +/* raw file data (565 bytes) */ +0x3c,0x68,0x74,0x6d,0x6c,0x3e,0x0d,0x0a,0x3c,0x68,0x65,0x61,0x64,0x3e,0x3c,0x74, +0x69,0x74,0x6c,0x65,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c,0x69, +0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50, +0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x74,0x69,0x74,0x6c,0x65,0x3e,0x3c,0x2f, +0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x3c,0x62,0x6f,0x64,0x79,0x20,0x62,0x67,0x63, +0x6f,0x6c,0x6f,0x72,0x3d,0x22,0x77,0x68,0x69,0x74,0x65,0x22,0x20,0x74,0x65,0x78, +0x74,0x3d,0x22,0x62,0x6c,0x61,0x63,0x6b,0x22,0x3e,0x0d,0x0a,0x0d,0x0a,0x20,0x20, +0x20,0x20,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22, +0x31,0x30,0x30,0x25,0x22,0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74, +0x72,0x20,0x76,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22,0x3e,0x3c, +0x74,0x64,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x38,0x30,0x22,0x3e,0x09,0x20, +0x20,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68, +0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73, +0x65,0x2f,0x22,0x3e,0x3c,0x69,0x6d,0x67,0x20,0x73,0x72,0x63,0x3d,0x22,0x2f,0x69, +0x6d,0x67,0x2f,0x73,0x69,0x63,0x73,0x2e,0x67,0x69,0x66,0x22,0x0d,0x0a,0x09,0x20, +0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x30,0x22,0x20,0x61,0x6c,0x74,0x3d, +0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x20,0x74,0x69,0x74,0x6c, +0x65,0x3d,0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x3e,0x3c,0x2f, +0x61,0x3e,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x20,0x77,0x69, +0x64,0x74,0x68,0x3d,0x22,0x35,0x30,0x30,0x22,0x3e,0x09,0x20,0x20,0x0d,0x0a,0x09, +0x20,0x20,0x3c,0x68,0x31,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c, +0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49, +0x50,0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x68,0x31,0x3e,0x0d,0x0a,0x09,0x20, +0x20,0x3c,0x68,0x32,0x3e,0x34,0x30,0x34,0x20,0x2d,0x20,0x50,0x61,0x67,0x65,0x20, +0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x3c,0x2f,0x68,0x32,0x3e,0x0d,0x0a, +0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x53,0x6f,0x72, +0x72,0x79,0x2c,0x20,0x74,0x68,0x65,0x20,0x70,0x61,0x67,0x65,0x20,0x79,0x6f,0x75, +0x20,0x61,0x72,0x65,0x20,0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x69,0x6e,0x67,0x20, +0x77,0x61,0x73,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x20,0x6f,0x6e, +0x20,0x74,0x68,0x69,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x73,0x65,0x72,0x76, +0x65,0x72,0x2e,0x20,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09, +0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x2f,0x74,0x72, +0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65, +0x3e,0x0d,0x0a,0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x68,0x74, +0x6d,0x6c,0x3e,0x0d,0x0a,}; + +static const unsigned int dummy_align__index_html = 2; +static const unsigned char data__index_html[] = { +/* /index.html (12 chars) */ +0x2f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x68,0x74,0x6d,0x6c,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) +" (63 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, +0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, +0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, +0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, +/* "Content-type: text/html + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, +0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x0d,0x0a, +/* raw file data (1751 bytes) */ +0x3c,0x68,0x74,0x6d,0x6c,0x3e,0x0d,0x0a,0x3c,0x68,0x65,0x61,0x64,0x3e,0x3c,0x74, +0x69,0x74,0x6c,0x65,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c,0x69, +0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50, +0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x74,0x69,0x74,0x6c,0x65,0x3e,0x3c,0x2f, +0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x3c,0x62,0x6f,0x64,0x79,0x20,0x62,0x67,0x63, +0x6f,0x6c,0x6f,0x72,0x3d,0x22,0x77,0x68,0x69,0x74,0x65,0x22,0x20,0x74,0x65,0x78, +0x74,0x3d,0x22,0x62,0x6c,0x61,0x63,0x6b,0x22,0x3e,0x0d,0x0a,0x0d,0x0a,0x20,0x20, +0x20,0x20,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22, +0x31,0x30,0x30,0x25,0x22,0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74, +0x72,0x20,0x76,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22,0x3e,0x3c, +0x74,0x64,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x38,0x30,0x22,0x3e,0x09,0x20, +0x20,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68, +0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73, +0x65,0x2f,0x22,0x3e,0x3c,0x69,0x6d,0x67,0x20,0x73,0x72,0x63,0x3d,0x22,0x2f,0x69, +0x6d,0x67,0x2f,0x73,0x69,0x63,0x73,0x2e,0x67,0x69,0x66,0x22,0x0d,0x0a,0x09,0x20, +0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x30,0x22,0x20,0x61,0x6c,0x74,0x3d, +0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x20,0x74,0x69,0x74,0x6c, +0x65,0x3d,0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x3e,0x3c,0x2f, +0x61,0x3e,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x20,0x77,0x69, +0x64,0x74,0x68,0x3d,0x22,0x35,0x30,0x30,0x22,0x3e,0x09,0x20,0x20,0x0d,0x0a,0x09, +0x20,0x20,0x3c,0x68,0x31,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c, +0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49, +0x50,0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x68,0x31,0x3e,0x0d,0x0a,0x09,0x20, +0x20,0x3c,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x54,0x68,0x65,0x20,0x77, +0x65,0x62,0x20,0x70,0x61,0x67,0x65,0x20,0x79,0x6f,0x75,0x20,0x61,0x72,0x65,0x20, +0x77,0x61,0x74,0x63,0x68,0x69,0x6e,0x67,0x20,0x77,0x61,0x73,0x20,0x73,0x65,0x72, +0x76,0x65,0x64,0x20,0x62,0x79,0x20,0x61,0x20,0x73,0x69,0x6d,0x70,0x6c,0x65,0x20, +0x77,0x65,0x62,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x73,0x65,0x72,0x76,0x65,0x72, +0x20,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x20,0x6f,0x6e,0x20,0x74,0x6f,0x70,0x20, +0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x6c,0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67, +0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50,0x20,0x73,0x74,0x61,0x63,0x6b,0x20, +0x3c,0x61,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68, +0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73, +0x65,0x2f,0x7e,0x61,0x64,0x61,0x6d,0x2f,0x6c,0x77,0x69,0x70,0x2f,0x22,0x3e,0x6c, +0x77,0x49,0x50,0x3c,0x2f,0x61,0x3e,0x2e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x2f,0x70, +0x3e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20, +0x6c,0x77,0x49,0x50,0x20,0x69,0x73,0x20,0x61,0x6e,0x20,0x6f,0x70,0x65,0x6e,0x20, +0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74, +0x61,0x74,0x69,0x6f,0x6e,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x54,0x43,0x50, +0x2f,0x49,0x50,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x70,0x72,0x6f,0x74,0x6f,0x63, +0x6f,0x6c,0x20,0x73,0x75,0x69,0x74,0x65,0x20,0x74,0x68,0x61,0x74,0x20,0x77,0x61, +0x73,0x20,0x6f,0x72,0x69,0x67,0x69,0x6e,0x61,0x6c,0x6c,0x79,0x20,0x77,0x72,0x69, +0x74,0x74,0x65,0x6e,0x20,0x62,0x79,0x20,0x3c,0x61,0x0d,0x0a,0x09,0x20,0x20,0x20, +0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77, +0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73,0x65,0x2f,0x7e,0x61,0x64,0x61,0x6d,0x2f, +0x6c,0x77,0x69,0x70,0x2f,0x22,0x3e,0x41,0x64,0x61,0x6d,0x20,0x44,0x75,0x6e,0x6b, +0x65,0x6c,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x6f,0x66,0x20,0x74,0x68,0x65, +0x20,0x53,0x77,0x65,0x64,0x69,0x73,0x68,0x20,0x49,0x6e,0x73,0x74,0x69,0x74,0x75, +0x74,0x65,0x20,0x6f,0x66,0x20,0x43,0x6f,0x6d,0x70,0x75,0x74,0x65,0x72,0x20,0x53, +0x63,0x69,0x65,0x6e,0x63,0x65,0x3c,0x2f,0x61,0x3e,0x20,0x62,0x75,0x74,0x20,0x6e, +0x6f,0x77,0x20,0x69,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x62,0x65,0x69,0x6e, +0x67,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x6c,0x79,0x20,0x64,0x65,0x76,0x65,0x6c, +0x6f,0x70,0x65,0x64,0x20,0x62,0x79,0x20,0x61,0x20,0x74,0x65,0x61,0x6d,0x20,0x6f, +0x66,0x20,0x64,0x65,0x76,0x65,0x6c,0x6f,0x70,0x65,0x72,0x73,0x0d,0x0a,0x09,0x20, +0x20,0x20,0x20,0x64,0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x64,0x20,0x77, +0x6f,0x72,0x6c,0x64,0x2d,0x77,0x69,0x64,0x65,0x2e,0x20,0x53,0x69,0x6e,0x63,0x65, +0x20,0x69,0x74,0x27,0x73,0x20,0x72,0x65,0x6c,0x65,0x61,0x73,0x65,0x2c,0x20,0x6c, +0x77,0x49,0x50,0x20,0x68,0x61,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x73,0x70, +0x75,0x72,0x72,0x65,0x64,0x20,0x61,0x20,0x6c,0x6f,0x74,0x20,0x6f,0x66,0x20,0x69, +0x6e,0x74,0x65,0x72,0x65,0x73,0x74,0x20,0x61,0x6e,0x64,0x20,0x68,0x61,0x73,0x20, +0x62,0x65,0x65,0x6e,0x20,0x70,0x6f,0x72,0x74,0x65,0x64,0x20,0x74,0x6f,0x20,0x73, +0x65,0x76,0x65,0x72,0x61,0x6c,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x70,0x6c,0x61, +0x74,0x66,0x6f,0x72,0x6d,0x73,0x20,0x61,0x6e,0x64,0x20,0x6f,0x70,0x65,0x72,0x61, +0x74,0x69,0x6e,0x67,0x20,0x73,0x79,0x73,0x74,0x65,0x6d,0x73,0x2e,0x20,0x6c,0x77, +0x49,0x50,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x75,0x73,0x65,0x64,0x20,0x65, +0x69,0x74,0x68,0x65,0x72,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x77,0x69,0x74,0x68, +0x20,0x6f,0x72,0x20,0x77,0x69,0x74,0x68,0x6f,0x75,0x74,0x20,0x61,0x6e,0x20,0x75, +0x6e,0x64,0x65,0x72,0x6c,0x79,0x69,0x6e,0x67,0x20,0x4f,0x53,0x2e,0x0d,0x0a,0x09, +0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d,0x0a, +0x09,0x20,0x20,0x20,0x20,0x54,0x68,0x65,0x20,0x66,0x6f,0x63,0x75,0x73,0x20,0x6f, +0x66,0x20,0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x20,0x54,0x43,0x50,0x2f,0x49, +0x50,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e, +0x20,0x69,0x73,0x20,0x74,0x6f,0x20,0x72,0x65,0x64,0x75,0x63,0x65,0x0d,0x0a,0x09, +0x20,0x20,0x20,0x20,0x74,0x68,0x65,0x20,0x52,0x41,0x4d,0x20,0x75,0x73,0x61,0x67, +0x65,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,0x73,0x74,0x69,0x6c,0x6c,0x20,0x68,0x61, +0x76,0x69,0x6e,0x67,0x20,0x61,0x20,0x66,0x75,0x6c,0x6c,0x20,0x73,0x63,0x61,0x6c, +0x65,0x20,0x54,0x43,0x50,0x2e,0x20,0x54,0x68,0x69,0x73,0x0d,0x0a,0x09,0x20,0x20, +0x20,0x20,0x6d,0x61,0x6b,0x65,0x73,0x20,0x6c,0x77,0x49,0x50,0x20,0x73,0x75,0x69, +0x74,0x61,0x62,0x6c,0x65,0x20,0x66,0x6f,0x72,0x20,0x75,0x73,0x65,0x20,0x69,0x6e, +0x20,0x65,0x6d,0x62,0x65,0x64,0x64,0x65,0x64,0x20,0x73,0x79,0x73,0x74,0x65,0x6d, +0x73,0x20,0x77,0x69,0x74,0x68,0x20,0x74,0x65,0x6e,0x73,0x0d,0x0a,0x09,0x20,0x20, +0x20,0x20,0x6f,0x66,0x20,0x6b,0x69,0x6c,0x6f,0x62,0x79,0x74,0x65,0x73,0x20,0x6f, +0x66,0x20,0x66,0x72,0x65,0x65,0x20,0x52,0x41,0x4d,0x20,0x61,0x6e,0x64,0x20,0x72, +0x6f,0x6f,0x6d,0x20,0x66,0x6f,0x72,0x20,0x61,0x72,0x6f,0x75,0x6e,0x64,0x20,0x34, +0x30,0x20,0x6b,0x69,0x6c,0x6f,0x62,0x79,0x74,0x65,0x73,0x0d,0x0a,0x09,0x20,0x20, +0x20,0x20,0x6f,0x66,0x20,0x63,0x6f,0x64,0x65,0x20,0x52,0x4f,0x4d,0x2e,0x0d,0x0a, +0x09,0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d, +0x0a,0x09,0x20,0x20,0x20,0x20,0x4d,0x6f,0x72,0x65,0x20,0x69,0x6e,0x66,0x6f,0x72, +0x6d,0x61,0x74,0x69,0x6f,0x6e,0x20,0x61,0x62,0x6f,0x75,0x74,0x20,0x6c,0x77,0x49, +0x50,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x66,0x6f,0x75,0x6e,0x64,0x20,0x61, +0x74,0x20,0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x0d,0x0a,0x09,0x20,0x20,0x20, +0x20,0x68,0x6f,0x6d,0x65,0x70,0x61,0x67,0x65,0x20,0x61,0x74,0x20,0x3c,0x61,0x0d, +0x0a,0x09,0x20,0x20,0x20,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68,0x74,0x74,0x70, +0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67, +0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f, +0x6c,0x77,0x69,0x70,0x2f,0x22,0x3e,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61, +0x76,0x61,0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72, +0x67,0x2f,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x2f, +0x3c,0x2f,0x61,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x6f,0x72,0x20,0x61,0x74, +0x20,0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x20,0x77,0x69,0x6b,0x69,0x20,0x61, +0x74,0x20,0x3c,0x61,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x68,0x72,0x65,0x66,0x3d, +0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6c,0x77,0x69,0x70,0x2e,0x77,0x69,0x6b, +0x69,0x61,0x2e,0x63,0x6f,0x6d,0x2f,0x22,0x3e,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f, +0x6c,0x77,0x69,0x70,0x2e,0x77,0x69,0x6b,0x69,0x61,0x2e,0x63,0x6f,0x6d,0x2f,0x3c, +0x2f,0x61,0x3e,0x2e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09, +0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x2f,0x74,0x72, +0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65, +0x3e,0x0d,0x0a,0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x68,0x74, +0x6d,0x6c,0x3e,0x0d,0x0a,0x0d,0x0a,}; + + + +const struct fsdata_file file__img_sics_gif[] = { { +file_NULL, +data__img_sics_gif, +data__img_sics_gif + 16, +sizeof(data__img_sics_gif) - 16, +1, +}}; + +const struct fsdata_file file__404_html[] = { { +file__img_sics_gif, +data__404_html, +data__404_html + 12, +sizeof(data__404_html) - 12, +1, +}}; + +const struct fsdata_file file__index_html[] = { { +file__404_html, +data__index_html, +data__index_html + 12, +sizeof(data__index_html) - 12, +1, +}}; + +#define FS_ROOT file__index_html +#define FS_NUMFILES 3 + diff --git a/Libraries/LwIP/src/apps/http/fsdata.h b/Libraries/LwIP/src/apps/http/fsdata.h new file mode 100644 index 0000000..ad4bbf9 --- /dev/null +++ b/Libraries/LwIP/src/apps/http/fsdata.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_FSDATA_H +#define LWIP_FSDATA_H + +#include "lwip/apps/httpd_opts.h" +#include "lwip/apps/fs.h" + +//struct fsdata_file { +// const struct fsdata_file *next; +// const unsigned char *name; +// const unsigned char *data; +// int len; +// u8_t flags; +//#if HTTPD_PRECALCULATED_CHECKSUM +// u16_t chksum_count; +// const struct fsdata_chksum *chksum; +//#endif /* HTTPD_PRECALCULATED_CHECKSUM */ +//}; + +#endif /* LWIP_FSDATA_H */ diff --git a/Libraries/LwIP/src/apps/http/fsdata_new.c b/Libraries/LwIP/src/apps/http/fsdata_new.c new file mode 100644 index 0000000..ab9da7e --- /dev/null +++ b/Libraries/LwIP/src/apps/http/fsdata_new.c @@ -0,0 +1,337 @@ +#include "lwip/apps/fs.h" +#include "lwip/def.h" + + +#define file_NULL (struct fsdata_file *) NULL + + +#ifndef FS_FILE_FLAGS_HEADER_INCLUDED +#define FS_FILE_FLAGS_HEADER_INCLUDED 1 +#endif +#ifndef FS_FILE_FLAGS_HEADER_PERSISTENT +#define FS_FILE_FLAGS_HEADER_PERSISTENT 0 +#endif +/* FSDATA_FILE_ALIGNMENT: 0=off, 1=by variable, 2=by include */ +#ifndef FSDATA_FILE_ALIGNMENT +#define FSDATA_FILE_ALIGNMENT 0 +#endif +#ifndef FSDATA_ALIGN_PRE +#define FSDATA_ALIGN_PRE +#endif +#ifndef FSDATA_ALIGN_POST +#define FSDATA_ALIGN_POST +#endif +#if FSDATA_FILE_ALIGNMENT==2 +#include "fsdata_alignment.h" +#endif +#if FSDATA_FILE_ALIGNMENT==1 +static const unsigned int dummy_align__img_sics_gif = 0; +#endif +static const unsigned char FSDATA_ALIGN_PRE data__img_sics_gif[] FSDATA_ALIGN_POST = { +/* /img/sics.gif (14 chars) */ +0x2f,0x69,0x6d,0x67,0x2f,0x73,0x69,0x63,0x73,0x2e,0x67,0x69,0x66,0x00,0x00,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/2.0.3d (http://savannah.nongnu.org/projects/lwip) +" (64 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x32,0x2e,0x30, +0x2e,0x33,0x64,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61, +0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f, +0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, + +/* "Content-Length: 724 +" (18+ bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x4c,0x65,0x6e,0x67,0x74,0x68,0x3a,0x20, +0x37,0x32,0x34,0x0d,0x0a, +/* "Content-Type: image/gif + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x54,0x79,0x70,0x65,0x3a,0x20,0x69,0x6d, +0x61,0x67,0x65,0x2f,0x67,0x69,0x66,0x0d,0x0a,0x0d,0x0a, +/* raw file data (724 bytes) */ +0x47,0x49,0x46,0x38,0x39,0x61,0x46,0x00,0x22,0x00,0xa5,0x00,0x00,0xd9,0x2b,0x39, +0x6a,0x6a,0x6a,0xbf,0xbf,0xbf,0x93,0x93,0x93,0x0f,0x0f,0x0f,0xb0,0xb0,0xb0,0xa6, +0xa6,0xa6,0x80,0x80,0x80,0x76,0x76,0x76,0x1e,0x1e,0x1e,0x9d,0x9d,0x9d,0x2e,0x2e, +0x2e,0x49,0x49,0x49,0x54,0x54,0x54,0x8a,0x8a,0x8a,0x60,0x60,0x60,0xc6,0xa6,0x99, +0xbd,0xb5,0xb2,0xc2,0xab,0xa1,0xd9,0x41,0x40,0xd5,0x67,0x55,0xc0,0xb0,0xaa,0xd5, +0x5e,0x4e,0xd6,0x50,0x45,0xcc,0x93,0x7d,0xc8,0xa1,0x90,0xce,0x8b,0x76,0xd2,0x7b, +0x65,0xd1,0x84,0x6d,0xc9,0x99,0x86,0x3a,0x3a,0x3a,0x00,0x00,0x00,0xb8,0xb8,0xb8, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2c,0x00,0x00, +0x00,0x00,0x46,0x00,0x22,0x00,0x00,0x06,0xfe,0x40,0x90,0x70,0x48,0x2c,0x1a,0x8f, +0xc8,0xa4,0x72,0xc9,0x6c,0x3a,0x9f,0xd0,0xa8,0x74,0x4a,0xad,0x5a,0xaf,0xd8,0xac, +0x76,0xa9,0x40,0x04,0xbe,0x83,0xe2,0x60,0x3c,0x50,0x20,0x0d,0x8e,0x6f,0x00,0x31, +0x28,0x1c,0x0d,0x07,0xb5,0xc3,0x60,0x75,0x24,0x3e,0xf8,0xfc,0x87,0x11,0x06,0xe9, +0x3d,0x46,0x07,0x0b,0x7a,0x7a,0x7c,0x43,0x06,0x1e,0x84,0x78,0x0b,0x07,0x6e,0x51, +0x01,0x8a,0x84,0x08,0x7e,0x79,0x80,0x87,0x89,0x91,0x7a,0x93,0x0a,0x04,0x99,0x78, +0x96,0x4f,0x03,0x9e,0x79,0x01,0x94,0x9f,0x43,0x9c,0xa3,0xa4,0x05,0x77,0xa3,0xa0, +0x4e,0x98,0x79,0x0b,0x1e,0x83,0xa4,0xa6,0x1f,0x96,0x05,0x9d,0xaa,0x78,0x01,0x07, +0x84,0x04,0x1e,0x1e,0xbb,0xb8,0x51,0x84,0x0e,0x43,0x05,0x07,0x77,0xa5,0x7f,0x42, +0xb1,0xb2,0x01,0x63,0x08,0x0d,0xbb,0x01,0x0c,0x7a,0x0d,0x44,0x0e,0xd8,0xaf,0x4c, +0x05,0x7a,0x04,0x47,0x07,0x07,0xb7,0x80,0xa2,0xe1,0x7d,0x44,0x05,0x01,0x04,0x01, +0xd0,0xea,0x87,0x93,0x4f,0xe0,0x9a,0x49,0xce,0xd8,0x79,0x04,0x66,0x20,0x15,0x10, +0x10,0x11,0x92,0x29,0x80,0xb6,0xc0,0x91,0x15,0x45,0x1e,0x90,0x19,0x71,0x46,0xa8, +0x5c,0x04,0x0e,0x00,0x22,0x4e,0xe8,0x40,0x24,0x9f,0x3e,0x04,0x06,0xa7,0x58,0xd4, +0x93,0xa0,0x1c,0x91,0x3f,0xe8,0xf0,0x88,0x03,0xb1,0x21,0xa2,0x49,0x00,0x19,0x86, +0xfc,0x52,0x44,0xe0,0x01,0x9d,0x29,0x21,0x15,0x25,0x50,0xf7,0x67,0x25,0x1e,0x06, +0xfd,0x4e,0x9a,0xb4,0x90,0xac,0x15,0xfa,0xcb,0x52,0x53,0x1e,0x8c,0xf2,0xf8,0x07, +0x92,0x2d,0x08,0x3a,0x4d,0x12,0x49,0x95,0x49,0xdb,0x14,0x04,0xc4,0x14,0x85,0x29, +0xaa,0xe7,0x01,0x08,0xa4,0x49,0x01,0x14,0x51,0xe0,0x53,0x91,0xd5,0x29,0x06,0x1a, +0x64,0x02,0xf4,0xc7,0x81,0x9e,0x05,0x20,0x22,0x64,0xa5,0x30,0xae,0xab,0x9e,0x97, +0x53,0xd8,0xb9,0xfd,0x50,0xef,0x93,0x02,0x42,0x74,0x34,0xe8,0x9c,0x20,0x21,0xc9, +0x01,0x68,0x78,0xe6,0x55,0x29,0x20,0x56,0x4f,0x4c,0x40,0x51,0x71,0x82,0xc0,0x70, +0x21,0x22,0x85,0xbe,0x4b,0x1c,0x44,0x05,0xea,0xa4,0x01,0xbf,0x22,0xb5,0xf0,0x1c, +0x06,0x51,0x38,0x8f,0xe0,0x22,0xec,0x18,0xac,0x39,0x22,0xd4,0xd6,0x93,0x44,0x01, +0x32,0x82,0xc8,0xfc,0x61,0xb3,0x01,0x45,0x0c,0x2e,0x83,0x30,0xd0,0x0e,0x17,0x24, +0x0f,0x70,0x85,0x94,0xee,0x05,0x05,0x53,0x4b,0x32,0x1b,0x3f,0x98,0xd3,0x1d,0x29, +0x81,0xb0,0xae,0x1e,0x8c,0x7e,0x68,0xe0,0x60,0x5a,0x54,0x8f,0xb0,0x78,0x69,0x73, +0x06,0xa2,0x00,0x6b,0x57,0xca,0x3d,0x11,0x50,0xbd,0x04,0x30,0x4b,0x3a,0xd4,0xab, +0x5f,0x1f,0x9b,0x3d,0x13,0x74,0x27,0x88,0x3c,0x25,0xe0,0x17,0xbe,0x7a,0x79,0x45, +0x0d,0x0c,0xb0,0x8b,0xda,0x90,0xca,0x80,0x06,0x5d,0x17,0x60,0x1c,0x22,0x4c,0xd8, +0x57,0x22,0x06,0x20,0x00,0x98,0x07,0x08,0xe4,0x56,0x80,0x80,0x1c,0xc5,0xb7,0xc5, +0x82,0x0c,0x36,0xe8,0xe0,0x83,0x10,0x46,0x28,0xe1,0x84,0x14,0x56,0x68,0xa1,0x10, +0x41,0x00,0x00,0x3b,}; + +#if FSDATA_FILE_ALIGNMENT==1 +static const unsigned int dummy_align__404_html = 1; +#endif +static const unsigned char FSDATA_ALIGN_PRE data__404_html[] FSDATA_ALIGN_POST = { +/* /404.html (10 chars) */ +0x2f,0x34,0x30,0x34,0x2e,0x68,0x74,0x6d,0x6c,0x00,0x00,0x00, + +/* HTTP header */ +/* "HTTP/1.0 404 File not found +" (29 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x34,0x30,0x34,0x20,0x46,0x69,0x6c, +0x65,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x0d,0x0a, +/* "Server: lwIP/2.0.3d (http://savannah.nongnu.org/projects/lwip) +" (64 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x32,0x2e,0x30, +0x2e,0x33,0x64,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61, +0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f, +0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, + +/* "Content-Length: 565 +" (18+ bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x4c,0x65,0x6e,0x67,0x74,0x68,0x3a,0x20, +0x35,0x36,0x35,0x0d,0x0a, +/* "Content-Type: text/html + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x54,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, +0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x0d,0x0a, +/* raw file data (565 bytes) */ +0x3c,0x68,0x74,0x6d,0x6c,0x3e,0x0d,0x0a,0x3c,0x68,0x65,0x61,0x64,0x3e,0x3c,0x74, +0x69,0x74,0x6c,0x65,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c,0x69, +0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50, +0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x74,0x69,0x74,0x6c,0x65,0x3e,0x3c,0x2f, +0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x3c,0x62,0x6f,0x64,0x79,0x20,0x62,0x67,0x63, +0x6f,0x6c,0x6f,0x72,0x3d,0x22,0x77,0x68,0x69,0x74,0x65,0x22,0x20,0x74,0x65,0x78, +0x74,0x3d,0x22,0x62,0x6c,0x61,0x63,0x6b,0x22,0x3e,0x0d,0x0a,0x0d,0x0a,0x20,0x20, +0x20,0x20,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22, +0x31,0x30,0x30,0x25,0x22,0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74, +0x72,0x20,0x76,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22,0x3e,0x3c, +0x74,0x64,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x38,0x30,0x22,0x3e,0x09,0x20, +0x20,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68, +0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73, +0x65,0x2f,0x22,0x3e,0x3c,0x69,0x6d,0x67,0x20,0x73,0x72,0x63,0x3d,0x22,0x2f,0x69, +0x6d,0x67,0x2f,0x73,0x69,0x63,0x73,0x2e,0x67,0x69,0x66,0x22,0x0d,0x0a,0x09,0x20, +0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x30,0x22,0x20,0x61,0x6c,0x74,0x3d, +0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x20,0x74,0x69,0x74,0x6c, +0x65,0x3d,0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x3e,0x3c,0x2f, +0x61,0x3e,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x20,0x77,0x69, +0x64,0x74,0x68,0x3d,0x22,0x35,0x30,0x30,0x22,0x3e,0x09,0x20,0x20,0x0d,0x0a,0x09, +0x20,0x20,0x3c,0x68,0x31,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c, +0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49, +0x50,0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x68,0x31,0x3e,0x0d,0x0a,0x09,0x20, +0x20,0x3c,0x68,0x32,0x3e,0x34,0x30,0x34,0x20,0x2d,0x20,0x50,0x61,0x67,0x65,0x20, +0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x3c,0x2f,0x68,0x32,0x3e,0x0d,0x0a, +0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x53,0x6f,0x72, +0x72,0x79,0x2c,0x20,0x74,0x68,0x65,0x20,0x70,0x61,0x67,0x65,0x20,0x79,0x6f,0x75, +0x20,0x61,0x72,0x65,0x20,0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x69,0x6e,0x67,0x20, +0x77,0x61,0x73,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x20,0x6f,0x6e, +0x20,0x74,0x68,0x69,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x73,0x65,0x72,0x76, +0x65,0x72,0x2e,0x20,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09, +0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x2f,0x74,0x72, +0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65, +0x3e,0x0d,0x0a,0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x68,0x74, +0x6d,0x6c,0x3e,0x0d,0x0a,}; + +#if FSDATA_FILE_ALIGNMENT==1 +static const unsigned int dummy_align__index_html = 2; +#endif +static const unsigned char FSDATA_ALIGN_PRE data__index_html[] FSDATA_ALIGN_POST = { +/* /index.html (12 chars) */ +0x2f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x68,0x74,0x6d,0x6c,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/2.0.3d (http://savannah.nongnu.org/projects/lwip) +" (64 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x32,0x2e,0x30, +0x2e,0x33,0x64,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61, +0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f, +0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, + +/* "Content-Length: 1751 +" (18+ bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x4c,0x65,0x6e,0x67,0x74,0x68,0x3a,0x20, +0x31,0x37,0x35,0x31,0x0d,0x0a, +/* "Content-Type: text/html + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x54,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, +0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x0d,0x0a, +/* raw file data (1751 bytes) */ +0x3c,0x68,0x74,0x6d,0x6c,0x3e,0x0d,0x0a,0x3c,0x68,0x65,0x61,0x64,0x3e,0x3c,0x74, +0x69,0x74,0x6c,0x65,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c,0x69, +0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50, +0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x74,0x69,0x74,0x6c,0x65,0x3e,0x3c,0x2f, +0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x3c,0x62,0x6f,0x64,0x79,0x20,0x62,0x67,0x63, +0x6f,0x6c,0x6f,0x72,0x3d,0x22,0x77,0x68,0x69,0x74,0x65,0x22,0x20,0x74,0x65,0x78, +0x74,0x3d,0x22,0x62,0x6c,0x61,0x63,0x6b,0x22,0x3e,0x0d,0x0a,0x0d,0x0a,0x20,0x20, +0x20,0x20,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22, +0x31,0x30,0x30,0x25,0x22,0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74, +0x72,0x20,0x76,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22,0x3e,0x3c, +0x74,0x64,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x38,0x30,0x22,0x3e,0x09,0x20, +0x20,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68, +0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73, +0x65,0x2f,0x22,0x3e,0x3c,0x69,0x6d,0x67,0x20,0x73,0x72,0x63,0x3d,0x22,0x2f,0x69, +0x6d,0x67,0x2f,0x73,0x69,0x63,0x73,0x2e,0x67,0x69,0x66,0x22,0x0d,0x0a,0x09,0x20, +0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x30,0x22,0x20,0x61,0x6c,0x74,0x3d, +0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x20,0x74,0x69,0x74,0x6c, +0x65,0x3d,0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x3e,0x3c,0x2f, +0x61,0x3e,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x20,0x77,0x69, +0x64,0x74,0x68,0x3d,0x22,0x35,0x30,0x30,0x22,0x3e,0x09,0x20,0x20,0x0d,0x0a,0x09, +0x20,0x20,0x3c,0x68,0x31,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c, +0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49, +0x50,0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x68,0x31,0x3e,0x0d,0x0a,0x09,0x20, +0x20,0x3c,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x54,0x68,0x65,0x20,0x77, +0x65,0x62,0x20,0x70,0x61,0x67,0x65,0x20,0x79,0x6f,0x75,0x20,0x61,0x72,0x65,0x20, +0x77,0x61,0x74,0x63,0x68,0x69,0x6e,0x67,0x20,0x77,0x61,0x73,0x20,0x73,0x65,0x72, +0x76,0x65,0x64,0x20,0x62,0x79,0x20,0x61,0x20,0x73,0x69,0x6d,0x70,0x6c,0x65,0x20, +0x77,0x65,0x62,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x73,0x65,0x72,0x76,0x65,0x72, +0x20,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x20,0x6f,0x6e,0x20,0x74,0x6f,0x70,0x20, +0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x6c,0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67, +0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50,0x20,0x73,0x74,0x61,0x63,0x6b,0x20, +0x3c,0x61,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68, +0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73, +0x65,0x2f,0x7e,0x61,0x64,0x61,0x6d,0x2f,0x6c,0x77,0x69,0x70,0x2f,0x22,0x3e,0x6c, +0x77,0x49,0x50,0x3c,0x2f,0x61,0x3e,0x2e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x2f,0x70, +0x3e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20, +0x6c,0x77,0x49,0x50,0x20,0x69,0x73,0x20,0x61,0x6e,0x20,0x6f,0x70,0x65,0x6e,0x20, +0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74, +0x61,0x74,0x69,0x6f,0x6e,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x54,0x43,0x50, +0x2f,0x49,0x50,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x70,0x72,0x6f,0x74,0x6f,0x63, +0x6f,0x6c,0x20,0x73,0x75,0x69,0x74,0x65,0x20,0x74,0x68,0x61,0x74,0x20,0x77,0x61, +0x73,0x20,0x6f,0x72,0x69,0x67,0x69,0x6e,0x61,0x6c,0x6c,0x79,0x20,0x77,0x72,0x69, +0x74,0x74,0x65,0x6e,0x20,0x62,0x79,0x20,0x3c,0x61,0x0d,0x0a,0x09,0x20,0x20,0x20, +0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77, +0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73,0x65,0x2f,0x7e,0x61,0x64,0x61,0x6d,0x2f, +0x6c,0x77,0x69,0x70,0x2f,0x22,0x3e,0x41,0x64,0x61,0x6d,0x20,0x44,0x75,0x6e,0x6b, +0x65,0x6c,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x6f,0x66,0x20,0x74,0x68,0x65, +0x20,0x53,0x77,0x65,0x64,0x69,0x73,0x68,0x20,0x49,0x6e,0x73,0x74,0x69,0x74,0x75, +0x74,0x65,0x20,0x6f,0x66,0x20,0x43,0x6f,0x6d,0x70,0x75,0x74,0x65,0x72,0x20,0x53, +0x63,0x69,0x65,0x6e,0x63,0x65,0x3c,0x2f,0x61,0x3e,0x20,0x62,0x75,0x74,0x20,0x6e, +0x6f,0x77,0x20,0x69,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x62,0x65,0x69,0x6e, +0x67,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x6c,0x79,0x20,0x64,0x65,0x76,0x65,0x6c, +0x6f,0x70,0x65,0x64,0x20,0x62,0x79,0x20,0x61,0x20,0x74,0x65,0x61,0x6d,0x20,0x6f, +0x66,0x20,0x64,0x65,0x76,0x65,0x6c,0x6f,0x70,0x65,0x72,0x73,0x0d,0x0a,0x09,0x20, +0x20,0x20,0x20,0x64,0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x64,0x20,0x77, +0x6f,0x72,0x6c,0x64,0x2d,0x77,0x69,0x64,0x65,0x2e,0x20,0x53,0x69,0x6e,0x63,0x65, +0x20,0x69,0x74,0x27,0x73,0x20,0x72,0x65,0x6c,0x65,0x61,0x73,0x65,0x2c,0x20,0x6c, +0x77,0x49,0x50,0x20,0x68,0x61,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x73,0x70, +0x75,0x72,0x72,0x65,0x64,0x20,0x61,0x20,0x6c,0x6f,0x74,0x20,0x6f,0x66,0x20,0x69, +0x6e,0x74,0x65,0x72,0x65,0x73,0x74,0x20,0x61,0x6e,0x64,0x20,0x68,0x61,0x73,0x20, +0x62,0x65,0x65,0x6e,0x20,0x70,0x6f,0x72,0x74,0x65,0x64,0x20,0x74,0x6f,0x20,0x73, +0x65,0x76,0x65,0x72,0x61,0x6c,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x70,0x6c,0x61, +0x74,0x66,0x6f,0x72,0x6d,0x73,0x20,0x61,0x6e,0x64,0x20,0x6f,0x70,0x65,0x72,0x61, +0x74,0x69,0x6e,0x67,0x20,0x73,0x79,0x73,0x74,0x65,0x6d,0x73,0x2e,0x20,0x6c,0x77, +0x49,0x50,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x75,0x73,0x65,0x64,0x20,0x65, +0x69,0x74,0x68,0x65,0x72,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x77,0x69,0x74,0x68, +0x20,0x6f,0x72,0x20,0x77,0x69,0x74,0x68,0x6f,0x75,0x74,0x20,0x61,0x6e,0x20,0x75, +0x6e,0x64,0x65,0x72,0x6c,0x79,0x69,0x6e,0x67,0x20,0x4f,0x53,0x2e,0x0d,0x0a,0x09, +0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d,0x0a, +0x09,0x20,0x20,0x20,0x20,0x54,0x68,0x65,0x20,0x66,0x6f,0x63,0x75,0x73,0x20,0x6f, +0x66,0x20,0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x20,0x54,0x43,0x50,0x2f,0x49, +0x50,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e, +0x20,0x69,0x73,0x20,0x74,0x6f,0x20,0x72,0x65,0x64,0x75,0x63,0x65,0x0d,0x0a,0x09, +0x20,0x20,0x20,0x20,0x74,0x68,0x65,0x20,0x52,0x41,0x4d,0x20,0x75,0x73,0x61,0x67, +0x65,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,0x73,0x74,0x69,0x6c,0x6c,0x20,0x68,0x61, +0x76,0x69,0x6e,0x67,0x20,0x61,0x20,0x66,0x75,0x6c,0x6c,0x20,0x73,0x63,0x61,0x6c, +0x65,0x20,0x54,0x43,0x50,0x2e,0x20,0x54,0x68,0x69,0x73,0x0d,0x0a,0x09,0x20,0x20, +0x20,0x20,0x6d,0x61,0x6b,0x65,0x73,0x20,0x6c,0x77,0x49,0x50,0x20,0x73,0x75,0x69, +0x74,0x61,0x62,0x6c,0x65,0x20,0x66,0x6f,0x72,0x20,0x75,0x73,0x65,0x20,0x69,0x6e, +0x20,0x65,0x6d,0x62,0x65,0x64,0x64,0x65,0x64,0x20,0x73,0x79,0x73,0x74,0x65,0x6d, +0x73,0x20,0x77,0x69,0x74,0x68,0x20,0x74,0x65,0x6e,0x73,0x0d,0x0a,0x09,0x20,0x20, +0x20,0x20,0x6f,0x66,0x20,0x6b,0x69,0x6c,0x6f,0x62,0x79,0x74,0x65,0x73,0x20,0x6f, +0x66,0x20,0x66,0x72,0x65,0x65,0x20,0x52,0x41,0x4d,0x20,0x61,0x6e,0x64,0x20,0x72, +0x6f,0x6f,0x6d,0x20,0x66,0x6f,0x72,0x20,0x61,0x72,0x6f,0x75,0x6e,0x64,0x20,0x34, +0x30,0x20,0x6b,0x69,0x6c,0x6f,0x62,0x79,0x74,0x65,0x73,0x0d,0x0a,0x09,0x20,0x20, +0x20,0x20,0x6f,0x66,0x20,0x63,0x6f,0x64,0x65,0x20,0x52,0x4f,0x4d,0x2e,0x0d,0x0a, +0x09,0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d, +0x0a,0x09,0x20,0x20,0x20,0x20,0x4d,0x6f,0x72,0x65,0x20,0x69,0x6e,0x66,0x6f,0x72, +0x6d,0x61,0x74,0x69,0x6f,0x6e,0x20,0x61,0x62,0x6f,0x75,0x74,0x20,0x6c,0x77,0x49, +0x50,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x66,0x6f,0x75,0x6e,0x64,0x20,0x61, +0x74,0x20,0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x0d,0x0a,0x09,0x20,0x20,0x20, +0x20,0x68,0x6f,0x6d,0x65,0x70,0x61,0x67,0x65,0x20,0x61,0x74,0x20,0x3c,0x61,0x0d, +0x0a,0x09,0x20,0x20,0x20,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68,0x74,0x74,0x70, +0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67, +0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f, +0x6c,0x77,0x69,0x70,0x2f,0x22,0x3e,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61, +0x76,0x61,0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72, +0x67,0x2f,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x2f, +0x3c,0x2f,0x61,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x6f,0x72,0x20,0x61,0x74, +0x20,0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x20,0x77,0x69,0x6b,0x69,0x20,0x61, +0x74,0x20,0x3c,0x61,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x68,0x72,0x65,0x66,0x3d, +0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6c,0x77,0x69,0x70,0x2e,0x77,0x69,0x6b, +0x69,0x61,0x2e,0x63,0x6f,0x6d,0x2f,0x22,0x3e,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f, +0x6c,0x77,0x69,0x70,0x2e,0x77,0x69,0x6b,0x69,0x61,0x2e,0x63,0x6f,0x6d,0x2f,0x3c, +0x2f,0x61,0x3e,0x2e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09, +0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x2f,0x74,0x72, +0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65, +0x3e,0x0d,0x0a,0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x68,0x74, +0x6d,0x6c,0x3e,0x0d,0x0a,0x0d,0x0a,}; + + + +const struct fsdata_file file__img_sics_gif[] = { { +file_NULL, +data__img_sics_gif, +data__img_sics_gif + 16, +sizeof(data__img_sics_gif) - 16, +FS_FILE_FLAGS_HEADER_INCLUDED | FS_FILE_FLAGS_HEADER_PERSISTENT, +}}; + +const struct fsdata_file file__404_html[] = { { +file__img_sics_gif, +data__404_html, +data__404_html + 12, +sizeof(data__404_html) - 12, +FS_FILE_FLAGS_HEADER_INCLUDED | FS_FILE_FLAGS_HEADER_PERSISTENT, +}}; + +const struct fsdata_file file__index_html[] = { { +file__404_html, +data__index_html, +data__index_html + 12, +sizeof(data__index_html) - 12, +FS_FILE_FLAGS_HEADER_INCLUDED | FS_FILE_FLAGS_HEADER_PERSISTENT, +}}; + +#define FS_ROOT file__index_html +#define FS_NUMFILES 3 + diff --git a/Libraries/LwIP/src/apps/http/fsdata_new.h b/Libraries/LwIP/src/apps/http/fsdata_new.h new file mode 100644 index 0000000..d31550d --- /dev/null +++ b/Libraries/LwIP/src/apps/http/fsdata_new.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_FSDATA_H +#define LWIP_FSDATA_H + +#include "lwip/apps/httpd_opts.h" +#include "lwip/apps/fs.h" + +/* THIS FILE IS DEPRECATED AND WILL BE REMOVED IN THE FUTURE */ +/* content was moved to fs.h to simplify #include structure */ + +#endif /* LWIP_FSDATA_H */ diff --git a/Libraries/LwIP/src/apps/http/http_client.c b/Libraries/LwIP/src/apps/http/http_client.c new file mode 100644 index 0000000..82da60d --- /dev/null +++ b/Libraries/LwIP/src/apps/http/http_client.c @@ -0,0 +1,909 @@ +/** + * @file + * HTTP client + */ + +/* + * Copyright (c) 2018 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + */ + +/** + * @defgroup httpc HTTP client + * @ingroup apps + * @todo: + * - persistent connections + * - select outgoing http version + * - optionally follow redirect + * - check request uri for invalid characters? (e.g. encode spaces) + * - IPv6 support + */ + +#include "lwip/apps/http_client.h" + +#include "lwip/altcp_tcp.h" +#include "lwip/dns.h" +#include "lwip/debug.h" +#include "lwip/mem.h" +#include "lwip/altcp_tls.h" +#include "lwip/init.h" + +#include +#include +#include + +#if LWIP_TCP && LWIP_CALLBACK_API + +/** + * HTTPC_DEBUG: Enable debugging for HTTP client. + */ +#ifndef HTTPC_DEBUG +#define HTTPC_DEBUG LWIP_DBG_OFF +#endif + +/** Set this to 1 to keep server name and uri in request state */ +#ifndef HTTPC_DEBUG_REQUEST +#define HTTPC_DEBUG_REQUEST 0 +#endif + +/** This string is passed in the HTTP header as "User-Agent: " */ +#ifndef HTTPC_CLIENT_AGENT +#define HTTPC_CLIENT_AGENT "lwIP/" LWIP_VERSION_STRING " (http://savannah.nongnu.org/projects/lwip)" +#endif + +/* the various debug levels for this file */ +#define HTTPC_DEBUG_TRACE (HTTPC_DEBUG | LWIP_DBG_TRACE) +#define HTTPC_DEBUG_STATE (HTTPC_DEBUG | LWIP_DBG_STATE) +#define HTTPC_DEBUG_WARN (HTTPC_DEBUG | LWIP_DBG_LEVEL_WARNING) +#define HTTPC_DEBUG_WARN_STATE (HTTPC_DEBUG | LWIP_DBG_LEVEL_WARNING | LWIP_DBG_STATE) +#define HTTPC_DEBUG_SERIOUS (HTTPC_DEBUG | LWIP_DBG_LEVEL_SERIOUS) + +#define HTTPC_POLL_INTERVAL 1 +#define HTTPC_POLL_TIMEOUT 30 /* 15 seconds */ + +#define HTTPC_CONTENT_LEN_INVALID 0xFFFFFFFF + +/* GET request basic */ +#define HTTPC_REQ_11 "GET %s HTTP/1.1\r\n" /* URI */\ + "User-Agent: %s\r\n" /* User-Agent */ \ + "Accept: */*\r\n" \ + "Connection: Close\r\n" /* we don't support persistent connections, yet */ \ + "\r\n" +#define HTTPC_REQ_11_FORMAT(uri) HTTPC_REQ_11, uri, HTTPC_CLIENT_AGENT + +/* GET request with host */ +#define HTTPC_REQ_11_HOST "GET %s HTTP/1.1\r\n" /* URI */\ + "User-Agent: %s\r\n" /* User-Agent */ \ + "Accept: */*\r\n" \ + "Host: %s\r\n" /* server name */ \ + "Connection: Close\r\n" /* we don't support persistent connections, yet */ \ + "\r\n" +#define HTTPC_REQ_11_HOST_FORMAT(uri, srv_name) HTTPC_REQ_11_HOST, uri, HTTPC_CLIENT_AGENT, srv_name + +/* GET request with proxy */ +#define HTTPC_REQ_11_PROXY "GET http://%s%s HTTP/1.1\r\n" /* HOST, URI */\ + "User-Agent: %s\r\n" /* User-Agent */ \ + "Accept: */*\r\n" \ + "Host: %s\r\n" /* server name */ \ + "Connection: Close\r\n" /* we don't support persistent connections, yet */ \ + "\r\n" +#define HTTPC_REQ_11_PROXY_FORMAT(host, uri, srv_name) HTTPC_REQ_11_PROXY, host, uri, HTTPC_CLIENT_AGENT, srv_name + +/* GET request with proxy (non-default server port) */ +#define HTTPC_REQ_11_PROXY_PORT "GET http://%s:%d%s HTTP/1.1\r\n" /* HOST, host-port, URI */\ + "User-Agent: %s\r\n" /* User-Agent */ \ + "Accept: */*\r\n" \ + "Host: %s\r\n" /* server name */ \ + "Connection: Close\r\n" /* we don't support persistent connections, yet */ \ + "\r\n" +#define HTTPC_REQ_11_PROXY_PORT_FORMAT(host, host_port, uri, srv_name) HTTPC_REQ_11_PROXY_PORT, host, host_port, uri, HTTPC_CLIENT_AGENT, srv_name + +typedef enum ehttpc_parse_state { + HTTPC_PARSE_WAIT_FIRST_LINE = 0, + HTTPC_PARSE_WAIT_HEADERS, + HTTPC_PARSE_RX_DATA +} httpc_parse_state_t; + +typedef struct _httpc_state +{ + struct altcp_pcb* pcb; + ip_addr_t remote_addr; + u16_t remote_port; + int timeout_ticks; + struct pbuf *request; + struct pbuf *rx_hdrs; + u16_t rx_http_version; + u16_t rx_status; + altcp_recv_fn recv_fn; + const httpc_connection_t *conn_settings; + void* callback_arg; + u32_t rx_content_len; + u32_t hdr_content_len; + httpc_parse_state_t parse_state; +#if HTTPC_DEBUG_REQUEST + char* server_name; + char* uri; +#endif +} httpc_state_t; + +/** Free http client state and deallocate all resources within */ +static err_t +httpc_free_state(httpc_state_t* req) +{ + struct altcp_pcb* tpcb; + + if (req->request != NULL) { + pbuf_free(req->request); + req->request = NULL; + } + if (req->rx_hdrs != NULL) { + pbuf_free(req->rx_hdrs); + req->rx_hdrs = NULL; + } + + tpcb = req->pcb; + mem_free(req); + req = NULL; + + if (tpcb != NULL) { + err_t r; + altcp_arg(tpcb, NULL); + altcp_recv(tpcb, NULL); + altcp_err(tpcb, NULL); + altcp_poll(tpcb, NULL, 0); + altcp_sent(tpcb, NULL); + r = altcp_close(tpcb); + if (r != ERR_OK) { + altcp_abort(tpcb); + return ERR_ABRT; + } + } + return ERR_OK; +} + +/** Close the connection: call finished callback and free the state */ +static err_t +httpc_close(httpc_state_t* req, httpc_result_t result, u32_t server_response, err_t err) +{ + if (req != NULL) { + if (req->conn_settings != NULL) { + if (req->conn_settings->result_fn != NULL) { + req->conn_settings->result_fn(req->callback_arg, result, req->rx_content_len, server_response, err); + } + } + return httpc_free_state(req); + } + return ERR_OK; +} + +/** Parse http header response line 1 */ +static err_t +http_parse_response_status(struct pbuf *p, u16_t *http_version, u16_t *http_status, u16_t *http_status_str_offset) +{ + u16_t end1 = pbuf_memfind(p, "\r\n", 2, 0); + if (end1 != 0xFFFF) { + /* get parts of first line */ + u16_t space1, space2; + space1 = pbuf_memfind(p, " ", 1, 0); + if (space1 != 0xFFFF) { + if ((pbuf_memcmp(p, 0, "HTTP/", 5) == 0) && (pbuf_get_at(p, 6) == '.')) { + char status_num[10]; + size_t status_num_len; + /* parse http version */ + u16_t version = pbuf_get_at(p, 5) - '0'; + version <<= 8; + version |= pbuf_get_at(p, 7) - '0'; + *http_version = version; + + /* parse http status number */ + space2 = pbuf_memfind(p, " ", 1, space1 + 1); + if (space2 != 0xFFFF) { + *http_status_str_offset = space2 + 1; + status_num_len = space2 - space1 - 1; + } else { + status_num_len = end1 - space1 - 1; + } + memset(status_num, 0, sizeof(status_num)); + if (pbuf_copy_partial(p, status_num, (u16_t)status_num_len, space1 + 1) == status_num_len) { + int status = atoi(status_num); + if ((status > 0) && (status <= 0xFFFF)) { + *http_status = (u16_t)status; + return ERR_OK; + } + } + } + } + } + return ERR_VAL; +} + +/** Wait for all headers to be received, return its length and content-length (if available) */ +static err_t +http_wait_headers(struct pbuf *p, u32_t *content_length, u16_t *total_header_len) +{ + u16_t end1 = pbuf_memfind(p, "\r\n\r\n", 4, 0); + if (end1 < (0xFFFF - 2)) { + /* all headers received */ + /* check if we have a content length (@todo: case insensitive?) */ + u16_t content_len_hdr; + *content_length = HTTPC_CONTENT_LEN_INVALID; + *total_header_len = end1 + 4; + + content_len_hdr = pbuf_memfind(p, "Content-Length: ", 16, 0); + if (content_len_hdr != 0xFFFF) { + u16_t content_len_line_end = pbuf_memfind(p, "\r\n", 2, content_len_hdr); + if (content_len_line_end != 0xFFFF) { + char content_len_num[16]; + u16_t content_len_num_len = (u16_t)(content_len_line_end - content_len_hdr - 16); + memset(content_len_num, 0, sizeof(content_len_num)); + if (pbuf_copy_partial(p, content_len_num, content_len_num_len, content_len_hdr + 16) == content_len_num_len) { + int len = atoi(content_len_num); + if ((len >= 0) && ((u32_t)len < HTTPC_CONTENT_LEN_INVALID)) { + *content_length = (u32_t)len; + } + } + } + } + return ERR_OK; + } + return ERR_VAL; +} + +/** http client tcp recv callback */ +static err_t +httpc_tcp_recv(void *arg, struct altcp_pcb *pcb, struct pbuf *p, err_t r) +{ + httpc_state_t* req = (httpc_state_t*)arg; + LWIP_UNUSED_ARG(r); + + if (p == NULL) { + httpc_result_t result; + if (req->parse_state != HTTPC_PARSE_RX_DATA) { + /* did not get RX data yet */ + result = HTTPC_RESULT_ERR_CLOSED; + } else if ((req->hdr_content_len != HTTPC_CONTENT_LEN_INVALID) && + (req->hdr_content_len != req->rx_content_len)) { + /* header has been received with content length but not all data received */ + result = HTTPC_RESULT_ERR_CONTENT_LEN; + } else { + /* receiving data and either all data received or no content length header */ + result = HTTPC_RESULT_OK; + } + return httpc_close(req, result, req->rx_status, ERR_OK); + } + if (req->parse_state != HTTPC_PARSE_RX_DATA) { + if (req->rx_hdrs == NULL) { + req->rx_hdrs = p; + } else { + pbuf_cat(req->rx_hdrs, p); + } + if (req->parse_state == HTTPC_PARSE_WAIT_FIRST_LINE) { + u16_t status_str_off; + err_t err = http_parse_response_status(req->rx_hdrs, &req->rx_http_version, &req->rx_status, &status_str_off); + if (err == ERR_OK) { + /* don't care status string */ + req->parse_state = HTTPC_PARSE_WAIT_HEADERS; + } + } + if (req->parse_state == HTTPC_PARSE_WAIT_HEADERS) { + u16_t total_header_len; + err_t err = http_wait_headers(req->rx_hdrs, &req->hdr_content_len, &total_header_len); + if (err == ERR_OK) { + struct pbuf *q; + /* full header received, send window update for header bytes and call into client callback */ + altcp_recved(pcb, total_header_len); + if (req->conn_settings) { + if (req->conn_settings->headers_done_fn) { + err = req->conn_settings->headers_done_fn(req, req->callback_arg, req->rx_hdrs, total_header_len, req->hdr_content_len); + if (err != ERR_OK) { + return httpc_close(req, HTTPC_RESULT_LOCAL_ABORT, req->rx_status, err); + } + } + } + /* hide header bytes in pbuf */ + q = pbuf_free_header(req->rx_hdrs, total_header_len); + p = q; + req->rx_hdrs = NULL; + /* go on with data */ + req->parse_state = HTTPC_PARSE_RX_DATA; + } + } + } + if ((p != NULL) && (req->parse_state == HTTPC_PARSE_RX_DATA)) { + req->rx_content_len += p->tot_len; + if (req->recv_fn != NULL) { + /* directly return here: the connection migth already be aborted from the callback! */ + return req->recv_fn(req->callback_arg, pcb, p, r); + } else { + altcp_recved(pcb, p->tot_len); + pbuf_free(p); + } + } + return ERR_OK; +} + +/** http client tcp err callback */ +static void +httpc_tcp_err(void *arg, err_t err) +{ + httpc_state_t* req = (httpc_state_t*)arg; + if (req != NULL) { + /* pcb has already been deallocated */ + req->pcb = NULL; + httpc_close(req, HTTPC_RESULT_ERR_CLOSED, 0, err); + } +} + +/** http client tcp poll callback */ +static err_t +httpc_tcp_poll(void *arg, struct altcp_pcb *pcb) +{ + /* implement timeout */ + httpc_state_t* req = (httpc_state_t*)arg; + LWIP_UNUSED_ARG(pcb); + if (req != NULL) { + if (req->timeout_ticks) { + req->timeout_ticks--; + } + if (!req->timeout_ticks) { + return httpc_close(req, HTTPC_RESULT_ERR_TIMEOUT, 0, ERR_OK); + } + } + return ERR_OK; +} + +/** http client tcp sent callback */ +static err_t +httpc_tcp_sent(void *arg, struct altcp_pcb *pcb, u16_t len) +{ + /* nothing to do here for now */ + LWIP_UNUSED_ARG(arg); + LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(len); + return ERR_OK; +} + +/** http client tcp connected callback */ +static err_t +httpc_tcp_connected(void *arg, struct altcp_pcb *pcb, err_t err) +{ + err_t r; + httpc_state_t* req = (httpc_state_t*)arg; + LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(err); + + /* send request; last char is zero termination */ + r = altcp_write(req->pcb, req->request->payload, req->request->len - 1, TCP_WRITE_FLAG_COPY); + if (r != ERR_OK) { + /* could not write the single small request -> fail, don't retry */ + return httpc_close(req, HTTPC_RESULT_ERR_MEM, 0, r); + } + /* everything written, we can free the request */ + pbuf_free(req->request); + req->request = NULL; + + altcp_output(req->pcb); + return ERR_OK; +} + +/** Start the http request when the server IP addr is known */ +static err_t +httpc_get_internal_addr(httpc_state_t* req, const ip_addr_t *ipaddr) +{ + err_t err; + LWIP_ASSERT("req != NULL", req != NULL); + + if (&req->remote_addr != ipaddr) { + /* fill in remote addr if called externally */ + req->remote_addr = *ipaddr; + } + + err = altcp_connect(req->pcb, &req->remote_addr, req->remote_port, httpc_tcp_connected); + if (err == ERR_OK) { + return ERR_OK; + } + LWIP_DEBUGF(HTTPC_DEBUG_WARN_STATE, ("tcp_connect failed: %d\n", (int)err)); + return err; +} + +#if LWIP_DNS +/** DNS callback + * If ipaddr is non-NULL, resolving succeeded and the request can be sent, otherwise it failed. + */ +static void +httpc_dns_found(const char* hostname, const ip_addr_t *ipaddr, void *arg) +{ + httpc_state_t* req = (httpc_state_t*)arg; + err_t err; + httpc_result_t result; + + LWIP_UNUSED_ARG(hostname); + + if (ipaddr != NULL) { + err = httpc_get_internal_addr(req, ipaddr); + if (err == ERR_OK) { + return; + } + result = HTTPC_RESULT_ERR_CONNECT; + } else { + LWIP_DEBUGF(HTTPC_DEBUG_WARN_STATE, ("httpc_dns_found: failed to resolve hostname: %s\n", + hostname)); + result = HTTPC_RESULT_ERR_HOSTNAME; + err = ERR_ARG; + } + httpc_close(req, result, 0, err); +} +#endif /* LWIP_DNS */ + +/** Start the http request after converting 'server_name' to ip address (DNS or address string) */ +static err_t +httpc_get_internal_dns(httpc_state_t* req, const char* server_name) +{ + err_t err; + LWIP_ASSERT("req != NULL", req != NULL); + +#if LWIP_DNS + err = dns_gethostbyname(server_name, &req->remote_addr, httpc_dns_found, req); +#else + err = ipaddr_aton(server_name, &req->remote_addr) ? ERR_OK : ERR_ARG; +#endif + + if (err == ERR_OK) { + /* cached or IP-string */ + err = httpc_get_internal_addr(req, &req->remote_addr); + } else if (err == ERR_INPROGRESS) { + return ERR_OK; + } + return err; +} + +static int +httpc_create_request_string(const httpc_connection_t *settings, const char* server_name, int server_port, const char* uri, + int use_host, char *buffer, size_t buffer_size) +{ + if (settings->use_proxy) { + LWIP_ASSERT("server_name != NULL", server_name != NULL); + if (server_port != HTTP_DEFAULT_PORT) { + return snprintf(buffer, buffer_size, HTTPC_REQ_11_PROXY_PORT_FORMAT(server_name, server_port, uri, server_name)); + } else { + return snprintf(buffer, buffer_size, HTTPC_REQ_11_PROXY_FORMAT(server_name, uri, server_name)); + } + } else if (use_host) { + LWIP_ASSERT("server_name != NULL", server_name != NULL); + return snprintf(buffer, buffer_size, HTTPC_REQ_11_HOST_FORMAT(uri, server_name)); + } else { + return snprintf(buffer, buffer_size, HTTPC_REQ_11_FORMAT(uri)); + } +} + +/** Initialize the connection struct */ +static err_t +httpc_init_connection_common(httpc_state_t **connection, const httpc_connection_t *settings, const char* server_name, + u16_t server_port, const char* uri, altcp_recv_fn recv_fn, void* callback_arg, int use_host) +{ + size_t alloc_len; + mem_size_t mem_alloc_len; + int req_len, req_len2; + httpc_state_t *req; +#if HTTPC_DEBUG_REQUEST + size_t server_name_len, uri_len; +#endif + + LWIP_ASSERT("uri != NULL", uri != NULL); + + /* get request len */ + req_len = httpc_create_request_string(settings, server_name, server_port, uri, use_host, NULL, 0); + if ((req_len < 0) || (req_len > 0xFFFF)) { + return ERR_VAL; + } + /* alloc state and request in one block */ + alloc_len = sizeof(httpc_state_t); +#if HTTPC_DEBUG_REQUEST + server_name_len = server_name ? strlen(server_name) : 0; + uri_len = strlen(uri); + alloc_len += server_name_len + 1 + uri_len + 1; +#endif + mem_alloc_len = (mem_size_t)alloc_len; + if ((mem_alloc_len < alloc_len) || (req_len + 1 > 0xFFFF)) { + return ERR_VAL; + } + + req = (httpc_state_t*)mem_malloc((mem_size_t)alloc_len); + if(req == NULL) { + return ERR_MEM; + } + memset(req, 0, sizeof(httpc_state_t)); + req->timeout_ticks = HTTPC_POLL_TIMEOUT; + req->request = pbuf_alloc(PBUF_RAW, (u16_t)(req_len + 1), PBUF_RAM); + if (req->request == NULL) { + httpc_free_state(req); + return ERR_MEM; + } + if (req->request->next != NULL) { + /* need a pbuf in one piece */ + httpc_free_state(req); + return ERR_MEM; + } + req->hdr_content_len = HTTPC_CONTENT_LEN_INVALID; +#if HTTPC_DEBUG_REQUEST + req->server_name = (char*)(req + 1); + if (server_name) { + memcpy(req->server_name, server_name, server_name_len + 1); + } + req->uri = req->server_name + server_name_len + 1; + memcpy(req->uri, uri, uri_len + 1); +#endif + req->pcb = altcp_new(settings->altcp_allocator); + if(req->pcb == NULL) { + httpc_free_state(req); + return ERR_MEM; + } + req->remote_port = settings->use_proxy ? settings->proxy_port : server_port; + altcp_arg(req->pcb, req); + altcp_recv(req->pcb, httpc_tcp_recv); + altcp_err(req->pcb, httpc_tcp_err); + altcp_poll(req->pcb, httpc_tcp_poll, HTTPC_POLL_INTERVAL); + altcp_sent(req->pcb, httpc_tcp_sent); + + /* set up request buffer */ + req_len2 = httpc_create_request_string(settings, server_name, server_port, uri, use_host, + (char *)req->request->payload, req_len + 1); + if (req_len2 != req_len) { + httpc_free_state(req); + return ERR_VAL; + } + + req->recv_fn = recv_fn; + req->conn_settings = settings; + req->callback_arg = callback_arg; + + *connection = req; + return ERR_OK; +} + +/** + * Initialize the connection struct + */ +static err_t +httpc_init_connection(httpc_state_t **connection, const httpc_connection_t *settings, const char* server_name, + u16_t server_port, const char* uri, altcp_recv_fn recv_fn, void* callback_arg) +{ + return httpc_init_connection_common(connection, settings, server_name, server_port, uri, recv_fn, callback_arg, 1); +} + + +/** + * Initialize the connection struct (from IP address) + */ +static err_t +httpc_init_connection_addr(httpc_state_t **connection, const httpc_connection_t *settings, + const ip_addr_t* server_addr, u16_t server_port, const char* uri, + altcp_recv_fn recv_fn, void* callback_arg) +{ + char *server_addr_str = ipaddr_ntoa(server_addr); + if (server_addr_str == NULL) { + return ERR_VAL; + } + return httpc_init_connection_common(connection, settings, server_addr_str, server_port, uri, + recv_fn, callback_arg, 1); +} + +/** + * @ingroup httpc + * HTTP client API: get a file by passing server IP address + * + * @param server_addr IP address of the server to connect + * @param port tcp port of the server + * @param uri uri to get from the server, remember leading "/"! + * @param settings connection settings (callbacks, proxy, etc.) + * @param recv_fn the http body (not the headers) are passed to this callback + * @param callback_arg argument passed to all the callbacks + * @param connection retreives the connection handle (to match in callbacks) + * @return ERR_OK if starting the request succeeds (callback_fn will be called later) + * or an error code + */ +err_t +httpc_get_file(const ip_addr_t* server_addr, u16_t port, const char* uri, const httpc_connection_t *settings, + altcp_recv_fn recv_fn, void* callback_arg, httpc_state_t **connection) +{ + err_t err; + httpc_state_t* req; + + LWIP_ERROR("invalid parameters", (server_addr != NULL) && (uri != NULL) && (recv_fn != NULL), return ERR_ARG;); + + err = httpc_init_connection_addr(&req, settings, server_addr, port, + uri, recv_fn, callback_arg); + if (err != ERR_OK) { + return err; + } + + if (settings->use_proxy) { + err = httpc_get_internal_addr(req, &settings->proxy_addr); + } else { + err = httpc_get_internal_addr(req, server_addr); + } + if(err != ERR_OK) { + httpc_free_state(req); + return err; + } + + if (connection != NULL) { + *connection = req; + } + return ERR_OK; +} + +/** + * @ingroup httpc + * HTTP client API: get a file by passing server name as string (DNS name or IP address string) + * + * @param server_name server name as string (DNS name or IP address string) + * @param port tcp port of the server + * @param uri uri to get from the server, remember leading "/"! + * @param settings connection settings (callbacks, proxy, etc.) + * @param recv_fn the http body (not the headers) are passed to this callback + * @param callback_arg argument passed to all the callbacks + * @param connection retreives the connection handle (to match in callbacks) + * @return ERR_OK if starting the request succeeds (callback_fn will be called later) + * or an error code + */ +err_t +httpc_get_file_dns(const char* server_name, u16_t port, const char* uri, const httpc_connection_t *settings, + altcp_recv_fn recv_fn, void* callback_arg, httpc_state_t **connection) +{ + err_t err; + httpc_state_t* req; + + LWIP_ERROR("invalid parameters", (server_name != NULL) && (uri != NULL) && (recv_fn != NULL), return ERR_ARG;); + + err = httpc_init_connection(&req, settings, server_name, port, uri, recv_fn, callback_arg); + if (err != ERR_OK) { + return err; + } + + if (settings->use_proxy) { + err = httpc_get_internal_addr(req, &settings->proxy_addr); + } else { + err = httpc_get_internal_dns(req, server_name); + } + if(err != ERR_OK) { + httpc_free_state(req); + return err; + } + + if (connection != NULL) { + *connection = req; + } + return ERR_OK; +} + +#if LWIP_HTTPC_HAVE_FILE_IO +/* Implementation to disk via fopen/fwrite/fclose follows */ + +typedef struct _httpc_filestate +{ + const char* local_file_name; + FILE *file; + httpc_connection_t settings; + const httpc_connection_t *client_settings; + void *callback_arg; +} httpc_filestate_t; + +static void httpc_fs_result(void *arg, httpc_result_t httpc_result, u32_t rx_content_len, + u32_t srv_res, err_t err); + +/** Initalize http client state for download to file system */ +static err_t +httpc_fs_init(httpc_filestate_t **filestate_out, const char* local_file_name, + const httpc_connection_t *settings, void* callback_arg) +{ + httpc_filestate_t *filestate; + size_t file_len, alloc_len; + FILE *f; + + file_len = strlen(local_file_name); + alloc_len = sizeof(httpc_filestate_t) + file_len + 1; + + filestate = (httpc_filestate_t *)mem_malloc((mem_size_t)alloc_len); + if (filestate == NULL) { + return ERR_MEM; + } + memset(filestate, 0, sizeof(httpc_filestate_t)); + filestate->local_file_name = (const char *)(filestate + 1); + memcpy((char *)(filestate + 1), local_file_name, file_len + 1); + filestate->file = NULL; + filestate->client_settings = settings; + filestate->callback_arg = callback_arg; + /* copy client settings but override result callback */ + memcpy(&filestate->settings, settings, sizeof(httpc_connection_t)); + filestate->settings.result_fn = httpc_fs_result; + + f = fopen(local_file_name, "wb"); + if(f == NULL) { + /* could not open file */ + mem_free(filestate); + return ERR_VAL; + } + filestate->file = f; + *filestate_out = filestate; + return ERR_OK; +} + +/** Free http client state for download to file system */ +static void +httpc_fs_free(httpc_filestate_t *filestate) +{ + if (filestate != NULL) { + if (filestate->file != NULL) { + fclose(filestate->file); + filestate->file = NULL; + } + mem_free(filestate); + } +} + +/** Connection closed (success or error) */ +static void +httpc_fs_result(void *arg, httpc_result_t httpc_result, u32_t rx_content_len, + u32_t srv_res, err_t err) +{ + httpc_filestate_t *filestate = (httpc_filestate_t *)arg; + if (filestate != NULL) { + if (filestate->client_settings->result_fn != NULL) { + filestate->client_settings->result_fn(filestate->callback_arg, httpc_result, rx_content_len, + srv_res, err); + } + httpc_fs_free(filestate); + } +} + +/** tcp recv callback */ +static err_t +httpc_fs_tcp_recv(void *arg, struct altcp_pcb *pcb, struct pbuf *p, err_t err) +{ + httpc_filestate_t *filestate = (httpc_filestate_t*)arg; + struct pbuf* q; + LWIP_UNUSED_ARG(err); + + LWIP_ASSERT("p != NULL", p != NULL); + + for (q = p; q != NULL; q = q->next) { + fwrite(q->payload, 1, q->len, filestate->file); + } + altcp_recved(pcb, p->tot_len); + pbuf_free(p); + return ERR_OK; +} + +/** + * @ingroup httpc + * HTTP client API: get a file to disk by passing server IP address + * + * @param server_addr IP address of the server to connect + * @param port tcp port of the server + * @param uri uri to get from the server, remember leading "/"! + * @param settings connection settings (callbacks, proxy, etc.) + * @param callback_arg argument passed to all the callbacks + * @param connection retreives the connection handle (to match in callbacks) + * @return ERR_OK if starting the request succeeds (callback_fn will be called later) + * or an error code + */ +err_t +httpc_get_file_to_disk(const ip_addr_t* server_addr, u16_t port, const char* uri, const httpc_connection_t *settings, + void* callback_arg, const char* local_file_name, httpc_state_t **connection) +{ + err_t err; + httpc_state_t* req; + httpc_filestate_t *filestate; + + LWIP_ERROR("invalid parameters", (server_addr != NULL) && (uri != NULL) && (local_file_name != NULL), return ERR_ARG;); + + err = httpc_fs_init(&filestate, local_file_name, settings, callback_arg); + if (err != ERR_OK) { + return err; + } + + err = httpc_init_connection_addr(&req, &filestate->settings, server_addr, port, + uri, httpc_fs_tcp_recv, filestate); + if (err != ERR_OK) { + httpc_fs_free(filestate); + return err; + } + + if (settings->use_proxy) { + err = httpc_get_internal_addr(req, &settings->proxy_addr); + } else { + err = httpc_get_internal_addr(req, server_addr); + } + if(err != ERR_OK) { + httpc_fs_free(filestate); + httpc_free_state(req); + return err; + } + + if (connection != NULL) { + *connection = req; + } + return ERR_OK; +} + +/** + * @ingroup httpc + * HTTP client API: get a file to disk by passing server name as string (DNS name or IP address string) + * + * @param server_name server name as string (DNS name or IP address string) + * @param port tcp port of the server + * @param uri uri to get from the server, remember leading "/"! + * @param settings connection settings (callbacks, proxy, etc.) + * @param callback_arg argument passed to all the callbacks + * @param connection retreives the connection handle (to match in callbacks) + * @return ERR_OK if starting the request succeeds (callback_fn will be called later) + * or an error code + */ +err_t +httpc_get_file_dns_to_disk(const char* server_name, u16_t port, const char* uri, const httpc_connection_t *settings, + void* callback_arg, const char* local_file_name, httpc_state_t **connection) +{ + err_t err; + httpc_state_t* req; + httpc_filestate_t *filestate; + + LWIP_ERROR("invalid parameters", (server_name != NULL) && (uri != NULL) && (local_file_name != NULL), return ERR_ARG;); + + err = httpc_fs_init(&filestate, local_file_name, settings, callback_arg); + if (err != ERR_OK) { + return err; + } + + err = httpc_init_connection(&req, &filestate->settings, server_name, port, + uri, httpc_fs_tcp_recv, filestate); + if (err != ERR_OK) { + httpc_fs_free(filestate); + return err; + } + + if (settings->use_proxy) { + err = httpc_get_internal_addr(req, &settings->proxy_addr); + } else { + err = httpc_get_internal_dns(req, server_name); + } + if(err != ERR_OK) { + httpc_fs_free(filestate); + httpc_free_state(req); + return err; + } + + if (connection != NULL) { + *connection = req; + } + return ERR_OK; +} +#endif /* LWIP_HTTPC_HAVE_FILE_IO */ + +#endif /* LWIP_TCP && LWIP_CALLBACK_API */ diff --git a/Libraries/LwIP/src/apps/http/httpd.c b/Libraries/LwIP/src/apps/http/httpd.c new file mode 100644 index 0000000..ccc9ba7 --- /dev/null +++ b/Libraries/LwIP/src/apps/http/httpd.c @@ -0,0 +1,2746 @@ +/** + * @file + * LWIP HTTP server implementation + */ + +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * Simon Goldschmidt + * + */ + +/** + * @defgroup httpd HTTP server + * @ingroup apps + * + * This httpd supports for a + * rudimentary server-side-include facility which will replace tags of the form + * in any file whose extension is .shtml, .shtm or .ssi with + * strings provided by an include handler whose pointer is provided to the + * module via function http_set_ssi_handler(). + * Additionally, a simple common + * gateway interface (CGI) handling mechanism has been added to allow clients + * to hook functions to particular request URIs. + * + * To enable SSI support, define label LWIP_HTTPD_SSI in lwipopts.h. + * To enable CGI support, define label LWIP_HTTPD_CGI in lwipopts.h. + * + * By default, the server assumes that HTTP headers are already present in + * each file stored in the file system. By defining LWIP_HTTPD_DYNAMIC_HEADERS in + * lwipopts.h, this behavior can be changed such that the server inserts the + * headers automatically based on the extension of the file being served. If + * this mode is used, be careful to ensure that the file system image used + * does not already contain the header information. + * + * File system images without headers can be created using the makefsfile + * tool with the -h command line option. + * + * + * Notes about valid SSI tags + * -------------------------- + * + * The following assumptions are made about tags used in SSI markers: + * + * 1. No tag may contain '-' or whitespace characters within the tag name. + * 2. Whitespace is allowed between the tag leadin "". + * 3. The maximum tag name length is LWIP_HTTPD_MAX_TAG_NAME_LEN, currently 8 characters. + * + * Notes on CGI usage + * ------------------ + * + * The simple CGI support offered here works with GET method requests only + * and can handle up to 16 parameters encoded into the URI. The handler + * function may not write directly to the HTTP output but must return a + * filename that the HTTP server will send to the browser as a response to + * the incoming CGI request. + * + * + * + * The list of supported file types is quite short, so if makefsdata complains + * about an unknown extension, make sure to add it (and its doctype) to + * the 'g_psHTTPHeaders' list. + */ +#include "lwip/init.h" +#include "lwip/apps/httpd.h" +#include "lwip/debug.h" +#include "lwip/stats.h" +#include "lwip/apps/fs.h" +#include "httpd_structs.h" +#include "lwip/def.h" + +#include "lwip/altcp.h" +#include "lwip/altcp_tcp.h" +#if HTTPD_ENABLE_HTTPS +#include "lwip/altcp_tls.h" +#endif +#ifdef LWIP_HOOK_FILENAME +#include LWIP_HOOK_FILENAME +#endif +#if LWIP_HTTPD_TIMING +#include "lwip/sys.h" +#endif /* LWIP_HTTPD_TIMING */ + +#include /* memset */ +#include /* atoi */ +#include + +#if LWIP_TCP && LWIP_CALLBACK_API + +/** Minimum length for a valid HTTP/0.9 request: "GET /\r\n" -> 7 bytes */ +#define MIN_REQ_LEN 7 + +#define CRLF "\r\n" +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE +#define HTTP11_CONNECTIONKEEPALIVE "Connection: keep-alive" +#define HTTP11_CONNECTIONKEEPALIVE2 "Connection: Keep-Alive" +#endif + +#if LWIP_HTTPD_DYNAMIC_FILE_READ +#define HTTP_IS_DYNAMIC_FILE(hs) ((hs)->buf != NULL) +#else +#define HTTP_IS_DYNAMIC_FILE(hs) 0 +#endif + +/* This defines checks whether tcp_write has to copy data or not */ + +#ifndef HTTP_IS_DATA_VOLATILE +/** tcp_write does not have to copy data when sent from rom-file-system directly */ +#define HTTP_IS_DATA_VOLATILE(hs) (HTTP_IS_DYNAMIC_FILE(hs) ? TCP_WRITE_FLAG_COPY : 0) +#endif +/** Default: dynamic headers are sent from ROM (non-dynamic headers are handled like file data) */ +#ifndef HTTP_IS_HDR_VOLATILE +#define HTTP_IS_HDR_VOLATILE(hs, ptr) 0 +#endif + +/* Return values for http_send_*() */ +#define HTTP_DATA_TO_SEND_FREED 3 +#define HTTP_DATA_TO_SEND_BREAK 2 +#define HTTP_DATA_TO_SEND_CONTINUE 1 +#define HTTP_NO_DATA_TO_SEND 0 + +typedef struct { + const char *name; + u8_t shtml; +} default_filename; + +static const default_filename httpd_default_filenames[] = { + {"/index.shtml", 1 }, + {"/index.ssi", 1 }, + {"/index.shtm", 1 }, + {"/index.html", 0 }, + {"/index.htm", 0 } +}; + +#define NUM_DEFAULT_FILENAMES LWIP_ARRAYSIZE(httpd_default_filenames) + +#if LWIP_HTTPD_SUPPORT_REQUESTLIST +/** HTTP request is copied here from pbufs for simple parsing */ +static char httpd_req_buf[LWIP_HTTPD_MAX_REQ_LENGTH + 1]; +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + +#if LWIP_HTTPD_SUPPORT_POST +#if LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN > LWIP_HTTPD_MAX_REQUEST_URI_LEN +#define LWIP_HTTPD_URI_BUF_LEN LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN +#endif +#endif +#ifndef LWIP_HTTPD_URI_BUF_LEN +#define LWIP_HTTPD_URI_BUF_LEN LWIP_HTTPD_MAX_REQUEST_URI_LEN +#endif +#if LWIP_HTTPD_URI_BUF_LEN +/* Filename for response file to send when POST is finished or + * search for default files when a directory is requested. */ +static char http_uri_buf[LWIP_HTTPD_URI_BUF_LEN + 1]; +#endif + +#if LWIP_HTTPD_DYNAMIC_HEADERS +/* The number of individual strings that comprise the headers sent before each + * requested file. + */ +#define NUM_FILE_HDR_STRINGS 5 +#define HDR_STRINGS_IDX_HTTP_STATUS 0 /* e.g. "HTTP/1.0 200 OK\r\n" */ +#define HDR_STRINGS_IDX_SERVER_NAME 1 /* e.g. "Server: "HTTPD_SERVER_AGENT"\r\n" */ +#define HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE 2 /* e.g. "Content-Length: xy\r\n" and/or "Connection: keep-alive\r\n" */ +#define HDR_STRINGS_IDX_CONTENT_LEN_NR 3 /* the byte count, when content-length is used */ +#define HDR_STRINGS_IDX_CONTENT_TYPE 4 /* the content type (or default answer content type including default document) */ + +/* The dynamically generated Content-Length buffer needs space for CRLF + NULL */ +#define LWIP_HTTPD_MAX_CONTENT_LEN_OFFSET 3 +#ifndef LWIP_HTTPD_MAX_CONTENT_LEN_SIZE +/* The dynamically generated Content-Length buffer shall be able to work with + ~953 MB (9 digits) */ +#define LWIP_HTTPD_MAX_CONTENT_LEN_SIZE (9 + LWIP_HTTPD_MAX_CONTENT_LEN_OFFSET) +#endif +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ + +#if LWIP_HTTPD_SSI + +#define HTTPD_LAST_TAG_PART 0xFFFF + +enum tag_check_state { + TAG_NONE, /* Not processing an SSI tag */ + TAG_LEADIN, /* Tag lead in "" being processed */ + TAG_SENDING /* Sending tag replacement string */ +}; + +struct http_ssi_state { + const char *parsed; /* Pointer to the first unparsed byte in buf. */ +#if !LWIP_HTTPD_SSI_INCLUDE_TAG + const char *tag_started;/* Pointer to the first opening '<' of the tag. */ +#endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG */ + const char *tag_end; /* Pointer to char after the closing '>' of the tag. */ + u32_t parse_left; /* Number of unparsed bytes in buf. */ + u16_t tag_index; /* Counter used by tag parsing state machine */ + u16_t tag_insert_len; /* Length of insert in string tag_insert */ +#if LWIP_HTTPD_SSI_MULTIPART + u16_t tag_part; /* Counter passed to and changed by tag insertion function to insert multiple times */ +#endif /* LWIP_HTTPD_SSI_MULTIPART */ + u8_t tag_type; /* index into http_ssi_tag_desc array */ + u8_t tag_name_len; /* Length of the tag name in string tag_name */ + char tag_name[LWIP_HTTPD_MAX_TAG_NAME_LEN + 1]; /* Last tag name extracted */ + char tag_insert[LWIP_HTTPD_MAX_TAG_INSERT_LEN + 1]; /* Insert string for tag_name */ + enum tag_check_state tag_state; /* State of the tag processor */ +}; + +struct http_ssi_tag_description { + const char *lead_in; + const char *lead_out; +}; + +#endif /* LWIP_HTTPD_SSI */ + +struct http_state { +#if LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED + struct http_state *next; +#endif /* LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED */ + struct fs_file file_handle; + struct fs_file *handle; + const char *file; /* Pointer to first unsent byte in buf. */ + + struct altcp_pcb *pcb; +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + struct pbuf *req; +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + +#if LWIP_HTTPD_DYNAMIC_FILE_READ + char *buf; /* File read buffer. */ + int buf_len; /* Size of file read buffer, buf. */ +#endif /* LWIP_HTTPD_DYNAMIC_FILE_READ */ + u32_t left; /* Number of unsent bytes in buf. */ + u8_t retries; +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + u8_t keepalive; +#endif /* LWIP_HTTPD_SUPPORT_11_KEEPALIVE */ +#if LWIP_HTTPD_SSI + struct http_ssi_state *ssi; +#endif /* LWIP_HTTPD_SSI */ +#if LWIP_HTTPD_CGI + char *params[LWIP_HTTPD_MAX_CGI_PARAMETERS]; /* Params extracted from the request URI */ + char *param_vals[LWIP_HTTPD_MAX_CGI_PARAMETERS]; /* Values for each extracted param */ +#endif /* LWIP_HTTPD_CGI */ +#if LWIP_HTTPD_DYNAMIC_HEADERS + const char *hdrs[NUM_FILE_HDR_STRINGS]; /* HTTP headers to be sent. */ + char hdr_content_len[LWIP_HTTPD_MAX_CONTENT_LEN_SIZE]; + u16_t hdr_pos; /* The position of the first unsent header byte in the + current string */ + u16_t hdr_index; /* The index of the hdr string currently being sent. */ +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ +#if LWIP_HTTPD_TIMING + u32_t time_started; +#endif /* LWIP_HTTPD_TIMING */ +#if LWIP_HTTPD_SUPPORT_POST + u32_t post_content_len_left; +#if LWIP_HTTPD_POST_MANUAL_WND + u32_t unrecved_bytes; + u8_t no_auto_wnd; + u8_t post_finished; +#endif /* LWIP_HTTPD_POST_MANUAL_WND */ +#endif /* LWIP_HTTPD_SUPPORT_POST*/ +}; + +#if HTTPD_USE_MEM_POOL +LWIP_MEMPOOL_DECLARE(HTTPD_STATE, MEMP_NUM_PARALLEL_HTTPD_CONNS, sizeof(struct http_state), "HTTPD_STATE") +#if LWIP_HTTPD_SSI +LWIP_MEMPOOL_DECLARE(HTTPD_SSI_STATE, MEMP_NUM_PARALLEL_HTTPD_SSI_CONNS, sizeof(struct http_ssi_state), "HTTPD_SSI_STATE") +#define HTTP_FREE_SSI_STATE(x) LWIP_MEMPOOL_FREE(HTTPD_SSI_STATE, (x)) +#define HTTP_ALLOC_SSI_STATE() (struct http_ssi_state *)LWIP_MEMPOOL_ALLOC(HTTPD_SSI_STATE) +#endif /* LWIP_HTTPD_SSI */ +#define HTTP_ALLOC_HTTP_STATE() (struct http_state *)LWIP_MEMPOOL_ALLOC(HTTPD_STATE) +#define HTTP_FREE_HTTP_STATE(x) LWIP_MEMPOOL_FREE(HTTPD_STATE, (x)) +#else /* HTTPD_USE_MEM_POOL */ +#define HTTP_ALLOC_HTTP_STATE() (struct http_state *)mem_malloc(sizeof(struct http_state)) +#define HTTP_FREE_HTTP_STATE(x) mem_free(x) +#if LWIP_HTTPD_SSI +#define HTTP_ALLOC_SSI_STATE() (struct http_ssi_state *)mem_malloc(sizeof(struct http_ssi_state)) +#define HTTP_FREE_SSI_STATE(x) mem_free(x) +#endif /* LWIP_HTTPD_SSI */ +#endif /* HTTPD_USE_MEM_POOL */ + +static err_t http_close_conn(struct altcp_pcb *pcb, struct http_state *hs); +static err_t http_close_or_abort_conn(struct altcp_pcb *pcb, struct http_state *hs, u8_t abort_conn); +static err_t http_find_file(struct http_state *hs, const char *uri, int is_09); +static err_t http_init_file(struct http_state *hs, struct fs_file *file, int is_09, const char *uri, u8_t tag_check, char *params); +static err_t http_poll(void *arg, struct altcp_pcb *pcb); +static u8_t http_check_eof(struct altcp_pcb *pcb, struct http_state *hs); +#if LWIP_HTTPD_FS_ASYNC_READ +static void http_continue(void *connection); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + +#if LWIP_HTTPD_SSI +/* SSI insert handler function pointer. */ +static tSSIHandler httpd_ssi_handler; +#if !LWIP_HTTPD_SSI_RAW +static int httpd_num_tags; +static const char **httpd_tags; +#endif /* !LWIP_HTTPD_SSI_RAW */ + +/* Define the available tag lead-ins and corresponding lead-outs. + * ATTENTION: for the algorithm below using this array, it is essential + * that the lead in differs in the first character! */ +const struct http_ssi_tag_description http_ssi_tag_desc[] = { + {""}, + {"/*#", "*/"} +}; + +#endif /* LWIP_HTTPD_SSI */ + +#if LWIP_HTTPD_CGI +/* CGI handler information */ +static const tCGI *httpd_cgis; +static int httpd_num_cgis; +static int http_cgi_paramcount; +#define http_cgi_params hs->params +#define http_cgi_param_vals hs->param_vals +#elif LWIP_HTTPD_CGI_SSI +static char *http_cgi_params[LWIP_HTTPD_MAX_CGI_PARAMETERS]; /* Params extracted from the request URI */ +static char *http_cgi_param_vals[LWIP_HTTPD_MAX_CGI_PARAMETERS]; /* Values for each extracted param */ +#endif /* LWIP_HTTPD_CGI */ + +#if LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED +/** global list of active HTTP connections, use to kill the oldest when + running out of memory */ +static struct http_state *http_connections; + +static void +http_add_connection(struct http_state *hs) +{ + /* add the connection to the list */ + hs->next = http_connections; + http_connections = hs; +} + +static void +http_remove_connection(struct http_state *hs) +{ + /* take the connection off the list */ + if (http_connections) { + if (http_connections == hs) { + http_connections = hs->next; + } else { + struct http_state *last; + for (last = http_connections; last->next != NULL; last = last->next) { + if (last->next == hs) { + last->next = hs->next; + break; + } + } + } + } +} + +static void +http_kill_oldest_connection(u8_t ssi_required) +{ + struct http_state *hs = http_connections; + struct http_state *hs_free_next = NULL; + while (hs && hs->next) { +#if LWIP_HTTPD_SSI + if (ssi_required) { + if (hs->next->ssi != NULL) { + hs_free_next = hs; + } + } else +#else /* LWIP_HTTPD_SSI */ + LWIP_UNUSED_ARG(ssi_required); +#endif /* LWIP_HTTPD_SSI */ + { + hs_free_next = hs; + } + LWIP_ASSERT("broken list", hs != hs->next); + hs = hs->next; + } + if (hs_free_next != NULL) { + LWIP_ASSERT("hs_free_next->next != NULL", hs_free_next->next != NULL); + LWIP_ASSERT("hs_free_next->next->pcb != NULL", hs_free_next->next->pcb != NULL); + /* send RST when killing a connection because of memory shortage */ + http_close_or_abort_conn(hs_free_next->next->pcb, hs_free_next->next, 1); /* this also unlinks the http_state from the list */ + } +} +#else /* LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED */ + +#define http_add_connection(hs) +#define http_remove_connection(hs) + +#endif /* LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED */ + +#if LWIP_HTTPD_SSI +/** Allocate as struct http_ssi_state. */ +static struct http_ssi_state * +http_ssi_state_alloc(void) +{ + struct http_ssi_state *ret = HTTP_ALLOC_SSI_STATE(); +#if LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED + if (ret == NULL) { + http_kill_oldest_connection(1); + ret = HTTP_ALLOC_SSI_STATE(); + } +#endif /* LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED */ + if (ret != NULL) { + memset(ret, 0, sizeof(struct http_ssi_state)); + } + return ret; +} + +/** Free a struct http_ssi_state. */ +static void +http_ssi_state_free(struct http_ssi_state *ssi) +{ + if (ssi != NULL) { + HTTP_FREE_SSI_STATE(ssi); + } +} +#endif /* LWIP_HTTPD_SSI */ + +/** Initialize a struct http_state. + */ +static void +http_state_init(struct http_state *hs) +{ + /* Initialize the structure. */ + memset(hs, 0, sizeof(struct http_state)); +#if LWIP_HTTPD_DYNAMIC_HEADERS + /* Indicate that the headers are not yet valid */ + hs->hdr_index = NUM_FILE_HDR_STRINGS; +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ +} + +/** Allocate a struct http_state. */ +static struct http_state * +http_state_alloc(void) +{ + struct http_state *ret = HTTP_ALLOC_HTTP_STATE(); +#if LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED + if (ret == NULL) { + http_kill_oldest_connection(0); + ret = HTTP_ALLOC_HTTP_STATE(); + } +#endif /* LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED */ + if (ret != NULL) { + http_state_init(ret); + http_add_connection(ret); + } + return ret; +} + +/** Free a struct http_state. + * Also frees the file data if dynamic. + */ +static void +http_state_eof(struct http_state *hs) +{ + if (hs->handle) { +#if LWIP_HTTPD_TIMING + u32_t ms_needed = sys_now() - hs->time_started; + u32_t needed = LWIP_MAX(1, (ms_needed / 100)); + LWIP_DEBUGF(HTTPD_DEBUG_TIMING, ("httpd: needed %"U32_F" ms to send file of %d bytes -> %"U32_F" bytes/sec\n", + ms_needed, hs->handle->len, ((((u32_t)hs->handle->len) * 10) / needed))); +#endif /* LWIP_HTTPD_TIMING */ + fs_close(hs->handle); + hs->handle = NULL; + } +#if LWIP_HTTPD_DYNAMIC_FILE_READ + if (hs->buf != NULL) { + mem_free(hs->buf); + hs->buf = NULL; + } +#endif /* LWIP_HTTPD_DYNAMIC_FILE_READ */ +#if LWIP_HTTPD_SSI + if (hs->ssi) { + http_ssi_state_free(hs->ssi); + hs->ssi = NULL; + } +#endif /* LWIP_HTTPD_SSI */ +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + if (hs->req) { + pbuf_free(hs->req); + hs->req = NULL; + } +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ +} + +/** Free a struct http_state. + * Also frees the file data if dynamic. + */ +static void +http_state_free(struct http_state *hs) +{ + if (hs != NULL) { + http_state_eof(hs); + http_remove_connection(hs); + HTTP_FREE_HTTP_STATE(hs); + } +} + +/** Call tcp_write() in a loop trying smaller and smaller length + * + * @param pcb altcp_pcb to send + * @param ptr Data to send + * @param length Length of data to send (in/out: on return, contains the + * amount of data sent) + * @param apiflags directly passed to tcp_write + * @return the return value of tcp_write + */ +static err_t +http_write(struct altcp_pcb *pcb, const void *ptr, u16_t *length, u8_t apiflags) +{ + u16_t len, max_len; + err_t err; + LWIP_ASSERT("length != NULL", length != NULL); + len = *length; + if (len == 0) { + return ERR_OK; + } + /* We cannot send more data than space available in the send buffer. */ + max_len = altcp_sndbuf(pcb); + if (max_len < len) { + len = max_len; + } +#ifdef HTTPD_MAX_WRITE_LEN + /* Additional limitation: e.g. don't enqueue more than 2*mss at once */ + max_len = HTTPD_MAX_WRITE_LEN(pcb); + if (len > max_len) { + len = max_len; + } +#endif /* HTTPD_MAX_WRITE_LEN */ + do { + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Trying to send %d bytes\n", len)); + err = altcp_write(pcb, ptr, len, apiflags); + if (err == ERR_MEM) { + if ((altcp_sndbuf(pcb) == 0) || + (altcp_sndqueuelen(pcb) >= TCP_SND_QUEUELEN)) { + /* no need to try smaller sizes */ + len = 1; + } else { + len /= 2; + } + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, + ("Send failed, trying less (%d bytes)\n", len)); + } + } while ((err == ERR_MEM) && (len > 1)); + + if (err == ERR_OK) { + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Sent %d bytes\n", len)); + *length = len; + } else { + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Send failed with err %d (\"%s\")\n", err, lwip_strerr(err))); + *length = 0; + } + +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + /* ensure nagle is normally enabled (only disabled for persistent connections + when all data has been enqueued but the connection stays open for the next + request */ + altcp_nagle_enable(pcb); +#endif + + return err; +} + +/** + * The connection shall be actively closed (using RST to close from fault states). + * Reset the sent- and recv-callbacks. + * + * @param pcb the tcp pcb to reset callbacks + * @param hs connection state to free + */ +static err_t +http_close_or_abort_conn(struct altcp_pcb *pcb, struct http_state *hs, u8_t abort_conn) +{ + err_t err; + LWIP_DEBUGF(HTTPD_DEBUG, ("Closing connection %p\n", (void *)pcb)); + +#if LWIP_HTTPD_SUPPORT_POST + if (hs != NULL) { + if ((hs->post_content_len_left != 0) +#if LWIP_HTTPD_POST_MANUAL_WND + || ((hs->no_auto_wnd != 0) && (hs->unrecved_bytes != 0)) +#endif /* LWIP_HTTPD_POST_MANUAL_WND */ + ) { + /* make sure the post code knows that the connection is closed */ + http_uri_buf[0] = 0; + httpd_post_finished(hs, http_uri_buf, LWIP_HTTPD_URI_BUF_LEN); + } + } +#endif /* LWIP_HTTPD_SUPPORT_POST*/ + + + altcp_arg(pcb, NULL); + altcp_recv(pcb, NULL); + altcp_err(pcb, NULL); + altcp_poll(pcb, NULL, 0); + altcp_sent(pcb, NULL); + if (hs != NULL) { + http_state_free(hs); + } + + if (abort_conn) { + altcp_abort(pcb); + return ERR_OK; + } + err = altcp_close(pcb); + if (err != ERR_OK) { + LWIP_DEBUGF(HTTPD_DEBUG, ("Error %d closing %p\n", err, (void *)pcb)); + /* error closing, try again later in poll */ + altcp_poll(pcb, http_poll, HTTPD_POLL_INTERVAL); + } + return err; +} + +/** + * The connection shall be actively closed. + * Reset the sent- and recv-callbacks. + * + * @param pcb the tcp pcb to reset callbacks + * @param hs connection state to free + */ +static err_t +http_close_conn(struct altcp_pcb *pcb, struct http_state *hs) +{ + return http_close_or_abort_conn(pcb, hs, 0); +} + +/** End of file: either close the connection (Connection: close) or + * close the file (Connection: keep-alive) + */ +static void +http_eof(struct altcp_pcb *pcb, struct http_state *hs) +{ + /* HTTP/1.1 persistent connection? (Not supported for SSI) */ +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + if (hs->keepalive) { + http_remove_connection(hs); + + http_state_eof(hs); + http_state_init(hs); + /* restore state: */ + hs->pcb = pcb; + hs->keepalive = 1; + http_add_connection(hs); + /* ensure nagle doesn't interfere with sending all data as fast as possible: */ + altcp_nagle_disable(pcb); + } else +#endif /* LWIP_HTTPD_SUPPORT_11_KEEPALIVE */ + { + http_close_conn(pcb, hs); + } +} + +#if LWIP_HTTPD_CGI || LWIP_HTTPD_CGI_SSI +/** + * Extract URI parameters from the parameter-part of an URI in the form + * "test.cgi?x=y" @todo: better explanation! + * Pointers to the parameters are stored in hs->param_vals. + * + * @param hs http connection state + * @param params pointer to the NULL-terminated parameter string from the URI + * @return number of parameters extracted + */ +static int +extract_uri_parameters(struct http_state *hs, char *params) +{ + char *pair; + char *equals; + int loop; + + LWIP_UNUSED_ARG(hs); + + /* If we have no parameters at all, return immediately. */ + if (!params || (params[0] == '\0')) { + return (0); + } + + /* Get a pointer to our first parameter */ + pair = params; + + /* Parse up to LWIP_HTTPD_MAX_CGI_PARAMETERS from the passed string and ignore the + * remainder (if any) */ + for (loop = 0; (loop < LWIP_HTTPD_MAX_CGI_PARAMETERS) && pair; loop++) { + + /* Save the name of the parameter */ + http_cgi_params[loop] = pair; + + /* Remember the start of this name=value pair */ + equals = pair; + + /* Find the start of the next name=value pair and replace the delimiter + * with a 0 to terminate the previous pair string. */ + pair = strchr(pair, '&'); + if (pair) { + *pair = '\0'; + pair++; + } else { + /* We didn't find a new parameter so find the end of the URI and + * replace the space with a '\0' */ + pair = strchr(equals, ' '); + if (pair) { + *pair = '\0'; + } + + /* Revert to NULL so that we exit the loop as expected. */ + pair = NULL; + } + + /* Now find the '=' in the previous pair, replace it with '\0' and save + * the parameter value string. */ + equals = strchr(equals, '='); + if (equals) { + *equals = '\0'; + http_cgi_param_vals[loop] = equals + 1; + } else { + http_cgi_param_vals[loop] = NULL; + } + } + + return loop; +} +#endif /* LWIP_HTTPD_CGI || LWIP_HTTPD_CGI_SSI */ + +#if LWIP_HTTPD_SSI +/** + * Insert a tag (found in an shtml in the form of "" into the file. + * The tag's name is stored in ssi->tag_name (NULL-terminated), the replacement + * should be written to hs->tag_insert (up to a length of LWIP_HTTPD_MAX_TAG_INSERT_LEN). + * The amount of data written is stored to ssi->tag_insert_len. + * + * @todo: return tag_insert_len - maybe it can be removed from struct http_state? + * + * @param hs http connection state + */ +static void +get_tag_insert(struct http_state *hs) +{ +#if LWIP_HTTPD_SSI_RAW + const char *tag; +#else /* LWIP_HTTPD_SSI_RAW */ + int tag; +#endif /* LWIP_HTTPD_SSI_RAW */ + size_t len; + struct http_ssi_state *ssi; +#if LWIP_HTTPD_SSI_MULTIPART + u16_t current_tag_part; +#endif /* LWIP_HTTPD_SSI_MULTIPART */ + + LWIP_ASSERT("hs != NULL", hs != NULL); + ssi = hs->ssi; + LWIP_ASSERT("ssi != NULL", ssi != NULL); +#if LWIP_HTTPD_SSI_MULTIPART + current_tag_part = ssi->tag_part; + ssi->tag_part = HTTPD_LAST_TAG_PART; +#endif /* LWIP_HTTPD_SSI_MULTIPART */ +#if LWIP_HTTPD_SSI_RAW + tag = ssi->tag_name; +#endif + + if (httpd_ssi_handler +#if !LWIP_HTTPD_SSI_RAW + && httpd_tags && httpd_num_tags +#endif /* !LWIP_HTTPD_SSI_RAW */ + ) { + + /* Find this tag in the list we have been provided. */ +#if LWIP_HTTPD_SSI_RAW + { +#else /* LWIP_HTTPD_SSI_RAW */ + for (tag = 0; tag < httpd_num_tags; tag++) { + if (strcmp(ssi->tag_name, httpd_tags[tag]) == 0) +#endif /* LWIP_HTTPD_SSI_RAW */ + { + ssi->tag_insert_len = httpd_ssi_handler(tag, ssi->tag_insert, + LWIP_HTTPD_MAX_TAG_INSERT_LEN +#if LWIP_HTTPD_SSI_MULTIPART + , current_tag_part, &ssi->tag_part +#endif /* LWIP_HTTPD_SSI_MULTIPART */ +#if LWIP_HTTPD_FILE_STATE + , (hs->handle ? hs->handle->state : NULL) +#endif /* LWIP_HTTPD_FILE_STATE */ + ); +#if LWIP_HTTPD_SSI_RAW + if (ssi->tag_insert_len != HTTPD_SSI_TAG_UNKNOWN) +#endif /* LWIP_HTTPD_SSI_RAW */ + { + return; + } + } + } + } + + /* If we drop out, we were asked to serve a page which contains tags that + * we don't have a handler for. Merely echo back the tags with an error + * marker. */ +#define UNKNOWN_TAG1_TEXT "***UNKNOWN TAG " +#define UNKNOWN_TAG1_LEN 18 +#define UNKNOWN_TAG2_TEXT "***" +#define UNKNOWN_TAG2_LEN 7 + len = LWIP_MIN(sizeof(ssi->tag_name), LWIP_MIN(strlen(ssi->tag_name), + LWIP_HTTPD_MAX_TAG_INSERT_LEN - (UNKNOWN_TAG1_LEN + UNKNOWN_TAG2_LEN))); + MEMCPY(ssi->tag_insert, UNKNOWN_TAG1_TEXT, UNKNOWN_TAG1_LEN); + MEMCPY(&ssi->tag_insert[UNKNOWN_TAG1_LEN], ssi->tag_name, len); + MEMCPY(&ssi->tag_insert[UNKNOWN_TAG1_LEN + len], UNKNOWN_TAG2_TEXT, UNKNOWN_TAG2_LEN); + ssi->tag_insert[UNKNOWN_TAG1_LEN + len + UNKNOWN_TAG2_LEN] = 0; + + len = strlen(ssi->tag_insert); + LWIP_ASSERT("len <= 0xffff", len <= 0xffff); + ssi->tag_insert_len = (u16_t)len; +} +#endif /* LWIP_HTTPD_SSI */ + +#if LWIP_HTTPD_DYNAMIC_HEADERS +/** + * Generate the relevant HTTP headers for the given filename and write + * them into the supplied buffer. + */ +static void +get_http_headers(struct http_state *hs, const char *uri) +{ + size_t content_type; + char *tmp; + char *ext; + char *vars; + + /* In all cases, the second header we send is the server identification + so set it here. */ + hs->hdrs[HDR_STRINGS_IDX_SERVER_NAME] = g_psHTTPHeaderStrings[HTTP_HDR_SERVER]; + hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE] = NULL; + hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_NR] = NULL; + + /* Is this a normal file or the special case we use to send back the + default "404: Page not found" response? */ + if (uri == NULL) { + hs->hdrs[HDR_STRINGS_IDX_HTTP_STATUS] = g_psHTTPHeaderStrings[HTTP_HDR_NOT_FOUND]; +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + if (hs->keepalive) { + hs->hdrs[HDR_STRINGS_IDX_CONTENT_TYPE] = g_psHTTPHeaderStrings[DEFAULT_404_HTML_PERSISTENT]; + } else +#endif + { + hs->hdrs[HDR_STRINGS_IDX_CONTENT_TYPE] = g_psHTTPHeaderStrings[DEFAULT_404_HTML]; + } + + /* Set up to send the first header string. */ + hs->hdr_index = 0; + hs->hdr_pos = 0; + return; + } + /* We are dealing with a particular filename. Look for one other + special case. We assume that any filename with "404" in it must be + indicative of a 404 server error whereas all other files require + the 200 OK header. */ + if (strstr(uri, "404")) { + hs->hdrs[HDR_STRINGS_IDX_HTTP_STATUS] = g_psHTTPHeaderStrings[HTTP_HDR_NOT_FOUND]; + } else if (strstr(uri, "400")) { + hs->hdrs[HDR_STRINGS_IDX_HTTP_STATUS] = g_psHTTPHeaderStrings[HTTP_HDR_BAD_REQUEST]; + } else if (strstr(uri, "501")) { + hs->hdrs[HDR_STRINGS_IDX_HTTP_STATUS] = g_psHTTPHeaderStrings[HTTP_HDR_NOT_IMPL]; + } else { + hs->hdrs[HDR_STRINGS_IDX_HTTP_STATUS] = g_psHTTPHeaderStrings[HTTP_HDR_OK]; + } + + /* Determine if the URI has any variables and, if so, temporarily remove + them. */ + vars = strchr(uri, '?'); + if (vars) { + *vars = '\0'; + } + + /* Get a pointer to the file extension. We find this by looking for the + last occurrence of "." in the filename passed. */ + ext = NULL; + tmp = strchr(uri, '.'); + while (tmp) { + ext = tmp + 1; + tmp = strchr(ext, '.'); + } + if (ext != NULL) { + /* Now determine the content type and add the relevant header for that. */ + for (content_type = 0; content_type < NUM_HTTP_HEADERS; content_type++) { + /* Have we found a matching extension? */ + if (!lwip_stricmp(g_psHTTPHeaders[content_type].extension, ext)) { + break; + } + } + } else { + content_type = NUM_HTTP_HEADERS; + } + + /* Reinstate the parameter marker if there was one in the original URI. */ + if (vars) { + *vars = '?'; + } + +#if LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI + /* Does the URL passed have any file extension? If not, we assume it + is a special-case URL used for control state notification and we do + not send any HTTP headers with the response. */ + if (!ext) { + /* Force the header index to a value indicating that all headers + have already been sent. */ + hs->hdr_index = NUM_FILE_HDR_STRINGS; + return; + } +#endif /* LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI */ + /* Did we find a matching extension? */ + if (content_type < NUM_HTTP_HEADERS) { + /* yes, store it */ + hs->hdrs[HDR_STRINGS_IDX_CONTENT_TYPE] = g_psHTTPHeaders[content_type].content_type; + } else if (!ext) { + /* no, no extension found -> use binary transfer to prevent the browser adding '.txt' on save */ + hs->hdrs[HDR_STRINGS_IDX_CONTENT_TYPE] = HTTP_HDR_APP; + } else { + /* No - use the default, plain text file type. */ + hs->hdrs[HDR_STRINGS_IDX_CONTENT_TYPE] = HTTP_HDR_DEFAULT_TYPE; + } + /* Set up to send the first header string. */ + hs->hdr_index = 0; + hs->hdr_pos = 0; +} + +/* Add content-length header? */ +static void +get_http_content_length(struct http_state *hs) +{ + u8_t add_content_len = 0; + + LWIP_ASSERT("already been here?", hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE] == NULL); + + add_content_len = 0; +#if LWIP_HTTPD_SSI + if (hs->ssi == NULL) /* @todo: get maximum file length from SSI */ +#endif /* LWIP_HTTPD_SSI */ + { + if ((hs->handle != NULL) && (hs->handle->flags & FS_FILE_FLAGS_HEADER_PERSISTENT)) { + add_content_len = 1; + } + } + if (add_content_len) { + size_t len; + lwip_itoa(hs->hdr_content_len, (size_t)LWIP_HTTPD_MAX_CONTENT_LEN_SIZE, + hs->handle->len); + len = strlen(hs->hdr_content_len); + if (len <= LWIP_HTTPD_MAX_CONTENT_LEN_SIZE - LWIP_HTTPD_MAX_CONTENT_LEN_OFFSET) { + SMEMCPY(&hs->hdr_content_len[len], CRLF, 3); + hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_NR] = hs->hdr_content_len; + } else { + add_content_len = 0; + } + } +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + if (add_content_len) { + hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE] = g_psHTTPHeaderStrings[HTTP_HDR_KEEPALIVE_LEN]; + } else { + hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE] = g_psHTTPHeaderStrings[HTTP_HDR_CONN_CLOSE]; + hs->keepalive = 0; + } +#else /* LWIP_HTTPD_SUPPORT_11_KEEPALIVE */ + if (add_content_len) { + hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE] = g_psHTTPHeaderStrings[HTTP_HDR_CONTENT_LENGTH]; + } +#endif /* LWIP_HTTPD_SUPPORT_11_KEEPALIVE */ +} + +/** Sub-function of http_send(): send dynamic headers + * + * @returns: - HTTP_NO_DATA_TO_SEND: no new data has been enqueued + * - HTTP_DATA_TO_SEND_CONTINUE: continue with sending HTTP body + * - HTTP_DATA_TO_SEND_BREAK: data has been enqueued, headers pending, + * so don't send HTTP body yet + * - HTTP_DATA_TO_SEND_FREED: http_state and pcb are already freed + */ +static u8_t +http_send_headers(struct altcp_pcb *pcb, struct http_state *hs) +{ + err_t err; + u16_t len; + u8_t data_to_send = HTTP_NO_DATA_TO_SEND; + u16_t hdrlen, sendlen; + + if (hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE] == NULL) { + /* set up "content-length" and "connection:" headers */ + get_http_content_length(hs); + } + + /* How much data can we send? */ + len = altcp_sndbuf(pcb); + sendlen = len; + + while (len && (hs->hdr_index < NUM_FILE_HDR_STRINGS) && sendlen) { + const void *ptr; + u16_t old_sendlen; + u8_t apiflags; + /* How much do we have to send from the current header? */ + hdrlen = (u16_t)strlen(hs->hdrs[hs->hdr_index]); + + /* How much of this can we send? */ + sendlen = (len < (hdrlen - hs->hdr_pos)) ? len : (hdrlen - hs->hdr_pos); + + /* Send this amount of data or as much as we can given memory + * constraints. */ + ptr = (const void *)(hs->hdrs[hs->hdr_index] + hs->hdr_pos); + old_sendlen = sendlen; + apiflags = HTTP_IS_HDR_VOLATILE(hs, ptr); + if (hs->hdr_index == HDR_STRINGS_IDX_CONTENT_LEN_NR) { + /* content-length is always volatile */ + apiflags |= TCP_WRITE_FLAG_COPY; + } + if (hs->hdr_index < NUM_FILE_HDR_STRINGS - 1) { + apiflags |= TCP_WRITE_FLAG_MORE; + } + err = http_write(pcb, ptr, &sendlen, apiflags); + if ((err == ERR_OK) && (old_sendlen != sendlen)) { + /* Remember that we added some more data to be transmitted. */ + data_to_send = HTTP_DATA_TO_SEND_CONTINUE; + } else if (err != ERR_OK) { + /* special case: http_write does not try to send 1 byte */ + sendlen = 0; + } + + /* Fix up the header position for the next time round. */ + hs->hdr_pos += sendlen; + len -= sendlen; + + /* Have we finished sending this string? */ + if (hs->hdr_pos == hdrlen) { + /* Yes - move on to the next one */ + hs->hdr_index++; + /* skip headers that are NULL (not all headers are required) */ + while ((hs->hdr_index < NUM_FILE_HDR_STRINGS) && + (hs->hdrs[hs->hdr_index] == NULL)) { + hs->hdr_index++; + } + hs->hdr_pos = 0; + } + } + + if ((hs->hdr_index >= NUM_FILE_HDR_STRINGS) && (hs->file == NULL)) { + /* When we are at the end of the headers, check for data to send + * instead of waiting for ACK from remote side to continue + * (which would happen when sending files from async read). */ + if (http_check_eof(pcb, hs)) { + data_to_send = HTTP_DATA_TO_SEND_BREAK; + } else { + /* At this point, for non-keepalive connections, hs is deallocated an + pcb is closed. */ + return HTTP_DATA_TO_SEND_FREED; + } + } + /* If we get here and there are still header bytes to send, we send + * the header information we just wrote immediately. If there are no + * more headers to send, but we do have file data to send, drop through + * to try to send some file data too. */ + if ((hs->hdr_index < NUM_FILE_HDR_STRINGS) || !hs->file) { + LWIP_DEBUGF(HTTPD_DEBUG, ("tcp_output\n")); + return HTTP_DATA_TO_SEND_BREAK; + } + return data_to_send; +} +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ + +/** Sub-function of http_send(): end-of-file (or block) is reached, + * either close the file or read the next block (if supported). + * + * @returns: 0 if the file is finished or no data has been read + * 1 if the file is not finished and data has been read + */ +static u8_t +http_check_eof(struct altcp_pcb *pcb, struct http_state *hs) +{ + int bytes_left; +#if LWIP_HTTPD_DYNAMIC_FILE_READ + int count; +#ifdef HTTPD_MAX_WRITE_LEN + int max_write_len; +#endif /* HTTPD_MAX_WRITE_LEN */ +#endif /* LWIP_HTTPD_DYNAMIC_FILE_READ */ + + /* Do we have a valid file handle? */ + if (hs->handle == NULL) { + /* No - close the connection. */ + http_eof(pcb, hs); + return 0; + } + bytes_left = fs_bytes_left(hs->handle); + if (bytes_left <= 0) { + /* We reached the end of the file so this request is done. */ + LWIP_DEBUGF(HTTPD_DEBUG, ("End of file.\n")); + http_eof(pcb, hs); + return 0; + } +#if LWIP_HTTPD_DYNAMIC_FILE_READ + /* Do we already have a send buffer allocated? */ + if (hs->buf) { + /* Yes - get the length of the buffer */ + count = LWIP_MIN(hs->buf_len, bytes_left); + } else { + /* We don't have a send buffer so allocate one now */ + count = altcp_sndbuf(pcb); + if (bytes_left < count) { + count = bytes_left; + } +#ifdef HTTPD_MAX_WRITE_LEN + /* Additional limitation: e.g. don't enqueue more than 2*mss at once */ + max_write_len = HTTPD_MAX_WRITE_LEN(pcb); + if (count > max_write_len) { + count = max_write_len; + } +#endif /* HTTPD_MAX_WRITE_LEN */ + do { + hs->buf = (char *)mem_malloc((mem_size_t)count); + if (hs->buf != NULL) { + hs->buf_len = count; + break; + } + count = count / 2; + } while (count > 100); + + /* Did we get a send buffer? If not, return immediately. */ + if (hs->buf == NULL) { + LWIP_DEBUGF(HTTPD_DEBUG, ("No buff\n")); + return 0; + } + } + + /* Read a block of data from the file. */ + LWIP_DEBUGF(HTTPD_DEBUG, ("Trying to read %d bytes.\n", count)); + +#if LWIP_HTTPD_FS_ASYNC_READ + count = fs_read_async(hs->handle, hs->buf, count, http_continue, hs); +#else /* LWIP_HTTPD_FS_ASYNC_READ */ + count = fs_read(hs->handle, hs->buf, count); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + if (count < 0) { + if (count == FS_READ_DELAYED) { + /* Delayed read, wait for FS to unblock us */ + return 0; + } + /* We reached the end of the file so this request is done. + * @todo: close here for HTTP/1.1 when reading file fails */ + LWIP_DEBUGF(HTTPD_DEBUG, ("End of file.\n")); + http_eof(pcb, hs); + return 0; + } + + /* Set up to send the block of data we just read */ + LWIP_DEBUGF(HTTPD_DEBUG, ("Read %d bytes.\n", count)); + hs->left = count; + hs->file = hs->buf; +#if LWIP_HTTPD_SSI + if (hs->ssi) { + hs->ssi->parse_left = count; + hs->ssi->parsed = hs->buf; + } +#endif /* LWIP_HTTPD_SSI */ +#else /* LWIP_HTTPD_DYNAMIC_FILE_READ */ + LWIP_ASSERT("SSI and DYNAMIC_HEADERS turned off but eof not reached", 0); +#endif /* LWIP_HTTPD_SSI || LWIP_HTTPD_DYNAMIC_HEADERS */ + return 1; +} + +/** Sub-function of http_send(): This is the normal send-routine for non-ssi files + * + * @returns: - 1: data has been written (so call tcp_ouput) + * - 0: no data has been written (no need to call tcp_output) + */ +static u8_t +http_send_data_nonssi(struct altcp_pcb *pcb, struct http_state *hs) +{ + err_t err; + u16_t len; + u8_t data_to_send = 0; + + /* We are not processing an SHTML file so no tag checking is necessary. + * Just send the data as we received it from the file. */ + len = (u16_t)LWIP_MIN(hs->left, 0xffff); + + err = http_write(pcb, hs->file, &len, HTTP_IS_DATA_VOLATILE(hs)); + if (err == ERR_OK) { + data_to_send = 1; + hs->file += len; + hs->left -= len; + } + + return data_to_send; +} + +#if LWIP_HTTPD_SSI +/** Sub-function of http_send(): This is the send-routine for ssi files + * + * @returns: - 1: data has been written (so call tcp_ouput) + * - 0: no data has been written (no need to call tcp_output) + */ +static u8_t +http_send_data_ssi(struct altcp_pcb *pcb, struct http_state *hs) +{ + err_t err = ERR_OK; + u16_t len; + u8_t data_to_send = 0; + u8_t tag_type; + + struct http_ssi_state *ssi = hs->ssi; + LWIP_ASSERT("ssi != NULL", ssi != NULL); + /* We are processing an SHTML file so need to scan for tags and replace + * them with insert strings. We need to be careful here since a tag may + * straddle the boundary of two blocks read from the file and we may also + * have to split the insert string between two tcp_write operations. */ + + /* How much data could we send? */ + len = altcp_sndbuf(pcb); + + /* Do we have remaining data to send before parsing more? */ + if (ssi->parsed > hs->file) { + len = (u16_t)LWIP_MIN(ssi->parsed - hs->file, 0xffff); + + err = http_write(pcb, hs->file, &len, HTTP_IS_DATA_VOLATILE(hs)); + if (err == ERR_OK) { + data_to_send = 1; + hs->file += len; + hs->left -= len; + } + + /* If the send buffer is full, return now. */ + if (altcp_sndbuf(pcb) == 0) { + return data_to_send; + } + } + + LWIP_DEBUGF(HTTPD_DEBUG, ("State %d, %d left\n", ssi->tag_state, (int)ssi->parse_left)); + + /* We have sent all the data that was already parsed so continue parsing + * the buffer contents looking for SSI tags. */ + while (((ssi->tag_state == TAG_SENDING) || ssi->parse_left) && (err == ERR_OK)) { + if (len == 0) { + return data_to_send; + } + switch (ssi->tag_state) { + case TAG_NONE: + /* We are not currently processing an SSI tag so scan for the + * start of the lead-in marker. */ + for (tag_type = 0; tag_type < LWIP_ARRAYSIZE(http_ssi_tag_desc); tag_type++) { + if (*ssi->parsed == http_ssi_tag_desc[tag_type].lead_in[0]) { + /* We found what could be the lead-in for a new tag so change + * state appropriately. */ + ssi->tag_type = tag_type; + ssi->tag_state = TAG_LEADIN; + ssi->tag_index = 1; + #if !LWIP_HTTPD_SSI_INCLUDE_TAG + ssi->tag_started = ssi->parsed; + #endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG */ + break; + } + } + + /* Move on to the next character in the buffer */ + ssi->parse_left--; + ssi->parsed++; + break; + + case TAG_LEADIN: + /* We are processing the lead-in marker, looking for the start of + * the tag name. */ + + /* Have we reached the end of the leadin? */ + if (http_ssi_tag_desc[ssi->tag_type].lead_in[ssi->tag_index] == 0) { + ssi->tag_index = 0; + ssi->tag_state = TAG_FOUND; + } else { + /* Have we found the next character we expect for the tag leadin? */ + if (*ssi->parsed == http_ssi_tag_desc[ssi->tag_type].lead_in[ssi->tag_index]) { + /* Yes - move to the next one unless we have found the complete + * leadin, in which case we start looking for the tag itself */ + ssi->tag_index++; + } else { + /* We found an unexpected character so this is not a tag. Move + * back to idle state. */ + ssi->tag_state = TAG_NONE; + } + + /* Move on to the next character in the buffer */ + ssi->parse_left--; + ssi->parsed++; + } + break; + + case TAG_FOUND: + /* We are reading the tag name, looking for the start of the + * lead-out marker and removing any whitespace found. */ + + /* Remove leading whitespace between the tag leading and the first + * tag name character. */ + if ((ssi->tag_index == 0) && ((*ssi->parsed == ' ') || + (*ssi->parsed == '\t') || (*ssi->parsed == '\n') || + (*ssi->parsed == '\r'))) { + /* Move on to the next character in the buffer */ + ssi->parse_left--; + ssi->parsed++; + break; + } + + /* Have we found the end of the tag name? This is signalled by + * us finding the first leadout character or whitespace */ + if ((*ssi->parsed == http_ssi_tag_desc[ssi->tag_type].lead_out[0]) || + (*ssi->parsed == ' ') || (*ssi->parsed == '\t') || + (*ssi->parsed == '\n') || (*ssi->parsed == '\r')) { + + if (ssi->tag_index == 0) { + /* We read a zero length tag so ignore it. */ + ssi->tag_state = TAG_NONE; + } else { + /* We read a non-empty tag so go ahead and look for the + * leadout string. */ + ssi->tag_state = TAG_LEADOUT; + LWIP_ASSERT("ssi->tag_index <= 0xff", ssi->tag_index <= 0xff); + ssi->tag_name_len = (u8_t)ssi->tag_index; + ssi->tag_name[ssi->tag_index] = '\0'; + if (*ssi->parsed == http_ssi_tag_desc[ssi->tag_type].lead_out[0]) { + ssi->tag_index = 1; + } else { + ssi->tag_index = 0; + } + } + } else { + /* This character is part of the tag name so save it */ + if (ssi->tag_index < LWIP_HTTPD_MAX_TAG_NAME_LEN) { + ssi->tag_name[ssi->tag_index++] = *ssi->parsed; + } else { + /* The tag was too long so ignore it. */ + ssi->tag_state = TAG_NONE; + } + } + + /* Move on to the next character in the buffer */ + ssi->parse_left--; + ssi->parsed++; + + break; + + /* We are looking for the end of the lead-out marker. */ + case TAG_LEADOUT: + /* Remove leading whitespace between the tag leading and the first + * tag leadout character. */ + if ((ssi->tag_index == 0) && ((*ssi->parsed == ' ') || + (*ssi->parsed == '\t') || (*ssi->parsed == '\n') || + (*ssi->parsed == '\r'))) { + /* Move on to the next character in the buffer */ + ssi->parse_left--; + ssi->parsed++; + break; + } + + /* Have we found the next character we expect for the tag leadout? */ + if (*ssi->parsed == http_ssi_tag_desc[ssi->tag_type].lead_out[ssi->tag_index]) { + /* Yes - move to the next one unless we have found the complete + * leadout, in which case we need to call the client to process + * the tag. */ + + /* Move on to the next character in the buffer */ + ssi->parse_left--; + ssi->parsed++; + ssi->tag_index++; + + if (http_ssi_tag_desc[ssi->tag_type].lead_out[ssi->tag_index] == 0) { + /* Call the client to ask for the insert string for the + * tag we just found. */ +#if LWIP_HTTPD_SSI_MULTIPART + ssi->tag_part = 0; /* start with tag part 0 */ +#endif /* LWIP_HTTPD_SSI_MULTIPART */ + get_tag_insert(hs); + + /* Next time through, we are going to be sending data + * immediately, either the end of the block we start + * sending here or the insert string. */ + ssi->tag_index = 0; + ssi->tag_state = TAG_SENDING; + ssi->tag_end = ssi->parsed; +#if !LWIP_HTTPD_SSI_INCLUDE_TAG + ssi->parsed = ssi->tag_started; +#endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG*/ + + /* If there is any unsent data in the buffer prior to the + * tag, we need to send it now. */ + if (ssi->tag_end > hs->file) { + /* How much of the data can we send? */ +#if LWIP_HTTPD_SSI_INCLUDE_TAG + len = (u16_t)LWIP_MIN(ssi->tag_end - hs->file, 0xffff); +#else /* LWIP_HTTPD_SSI_INCLUDE_TAG*/ + /* we would include the tag in sending */ + len = (u16_t)LWIP_MIN(ssi->tag_started - hs->file, 0xffff); +#endif /* LWIP_HTTPD_SSI_INCLUDE_TAG*/ + + err = http_write(pcb, hs->file, &len, HTTP_IS_DATA_VOLATILE(hs)); + if (err == ERR_OK) { + data_to_send = 1; +#if !LWIP_HTTPD_SSI_INCLUDE_TAG + if (ssi->tag_started <= hs->file) { + /* pretend to have sent the tag, too */ + len += (u16_t)(ssi->tag_end - ssi->tag_started); + } +#endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG*/ + hs->file += len; + hs->left -= len; + } + } + } + } else { + /* We found an unexpected character so this is not a tag. Move + * back to idle state. */ + ssi->parse_left--; + ssi->parsed++; + ssi->tag_state = TAG_NONE; + } + break; + + /* + * We have found a valid tag and are in the process of sending + * data as a result of that discovery. We send either remaining data + * from the file prior to the insert point or the insert string itself. + */ + case TAG_SENDING: + /* Do we have any remaining file data to send from the buffer prior + * to the tag? */ + if (ssi->tag_end > hs->file) { + /* How much of the data can we send? */ +#if LWIP_HTTPD_SSI_INCLUDE_TAG + len = (u16_t)LWIP_MIN(ssi->tag_end - hs->file, 0xffff); +#else /* LWIP_HTTPD_SSI_INCLUDE_TAG*/ + LWIP_ASSERT("hs->started >= hs->file", ssi->tag_started >= hs->file); + /* we would include the tag in sending */ + len = (u16_t)LWIP_MIN(ssi->tag_started - hs->file, 0xffff); +#endif /* LWIP_HTTPD_SSI_INCLUDE_TAG*/ + if (len != 0) { + err = http_write(pcb, hs->file, &len, HTTP_IS_DATA_VOLATILE(hs)); + } else { + err = ERR_OK; + } + if (err == ERR_OK) { + data_to_send = 1; +#if !LWIP_HTTPD_SSI_INCLUDE_TAG + if (ssi->tag_started <= hs->file) { + /* pretend to have sent the tag, too */ + len += (u16_t)(ssi->tag_end - ssi->tag_started); + } +#endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG*/ + hs->file += len; + hs->left -= len; + } + } else { +#if LWIP_HTTPD_SSI_MULTIPART + if (ssi->tag_index >= ssi->tag_insert_len) { + /* Did the last SSIHandler have more to send? */ + if (ssi->tag_part != HTTPD_LAST_TAG_PART) { + /* If so, call it again */ + ssi->tag_index = 0; + get_tag_insert(hs); + } + } +#endif /* LWIP_HTTPD_SSI_MULTIPART */ + + /* Do we still have insert data left to send? */ + if (ssi->tag_index < ssi->tag_insert_len) { + /* We are sending the insert string itself. How much of the + * insert can we send? */ + len = (ssi->tag_insert_len - ssi->tag_index); + + /* Note that we set the copy flag here since we only have a + * single tag insert buffer per connection. If we don't do + * this, insert corruption can occur if more than one insert + * is processed before we call tcp_output. */ + err = http_write(pcb, &(ssi->tag_insert[ssi->tag_index]), &len, + HTTP_IS_TAG_VOLATILE(hs)); + if (err == ERR_OK) { + data_to_send = 1; + ssi->tag_index += len; + /* Don't return here: keep on sending data */ + } + } else { +#if LWIP_HTTPD_SSI_MULTIPART + if (ssi->tag_part == HTTPD_LAST_TAG_PART) +#endif /* LWIP_HTTPD_SSI_MULTIPART */ + { + /* We have sent all the insert data so go back to looking for + * a new tag. */ + LWIP_DEBUGF(HTTPD_DEBUG, ("Everything sent.\n")); + ssi->tag_index = 0; + ssi->tag_state = TAG_NONE; +#if !LWIP_HTTPD_SSI_INCLUDE_TAG + ssi->parsed = ssi->tag_end; +#endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG*/ + } + } + break; + default: + break; + } + } + } + + /* If we drop out of the end of the for loop, this implies we must have + * file data to send so send it now. In TAG_SENDING state, we've already + * handled this so skip the send if that's the case. */ + if ((ssi->tag_state != TAG_SENDING) && (ssi->parsed > hs->file)) { +#if LWIP_HTTPD_DYNAMIC_FILE_READ && !LWIP_HTTPD_SSI_INCLUDE_TAG + if ((ssi->tag_state != TAG_NONE) && (ssi->tag_started > ssi->tag_end)) { + /* If we found tag on the edge of the read buffer: just throw away the first part + (we have copied/saved everything required for parsing on later). */ + len = (u16_t)(ssi->tag_started - hs->file); + hs->left -= (ssi->parsed - ssi->tag_started); + ssi->parsed = ssi->tag_started; + ssi->tag_started = hs->buf; + } else +#endif /* LWIP_HTTPD_DYNAMIC_FILE_READ && !LWIP_HTTPD_SSI_INCLUDE_TAG */ + { + len = (u16_t)LWIP_MIN(ssi->parsed - hs->file, 0xffff); + } + + err = http_write(pcb, hs->file, &len, HTTP_IS_DATA_VOLATILE(hs)); + if (err == ERR_OK) { + data_to_send = 1; + hs->file += len; + hs->left -= len; + } + } + return data_to_send; +} +#endif /* LWIP_HTTPD_SSI */ + +/** + * Try to send more data on this pcb. + * + * @param pcb the pcb to send data + * @param hs connection state + */ +static u8_t +http_send(struct altcp_pcb *pcb, struct http_state *hs) +{ + u8_t data_to_send = HTTP_NO_DATA_TO_SEND; + + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_send: pcb=%p hs=%p left=%d\n", (void *)pcb, + (void *)hs, hs != NULL ? (int)hs->left : 0)); + +#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND + if (hs->unrecved_bytes != 0) { + return 0; + } +#endif /* LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND */ + + /* If we were passed a NULL state structure pointer, ignore the call. */ + if (hs == NULL) { + return 0; + } + +#if LWIP_HTTPD_FS_ASYNC_READ + /* Check if we are allowed to read from this file. + (e.g. SSI might want to delay sending until data is available) */ + if (!fs_is_file_ready(hs->handle, http_continue, hs)) { + return 0; + } +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + +#if LWIP_HTTPD_DYNAMIC_HEADERS + /* Do we have any more header data to send for this file? */ + if (hs->hdr_index < NUM_FILE_HDR_STRINGS) { + data_to_send = http_send_headers(pcb, hs); + if ((data_to_send == HTTP_DATA_TO_SEND_FREED) || + ((data_to_send != HTTP_DATA_TO_SEND_CONTINUE) && + (hs->hdr_index < NUM_FILE_HDR_STRINGS))) { + return data_to_send; + } + } +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ + + /* Have we run out of file data to send? If so, we need to read the next + * block from the file. */ + if (hs->left == 0) { + if (!http_check_eof(pcb, hs)) { + return 0; + } + } + +#if LWIP_HTTPD_SSI + if (hs->ssi) { + data_to_send = http_send_data_ssi(pcb, hs); + } else +#endif /* LWIP_HTTPD_SSI */ + { + data_to_send = http_send_data_nonssi(pcb, hs); + } + + if ((hs->left == 0) && (fs_bytes_left(hs->handle) <= 0)) { + /* We reached the end of the file so this request is done. + * This adds the FIN flag right into the last data segment. */ + LWIP_DEBUGF(HTTPD_DEBUG, ("End of file.\n")); + http_eof(pcb, hs); + return 0; + } + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("send_data end.\n")); + return data_to_send; +} + +#if LWIP_HTTPD_SUPPORT_EXTSTATUS +/** Initialize a http connection with a file to send for an error message + * + * @param hs http connection state + * @param error_nr HTTP error number + * @return ERR_OK if file was found and hs has been initialized correctly + * another err_t otherwise + */ +static err_t +http_find_error_file(struct http_state *hs, u16_t error_nr) +{ + const char *uri, *uri1, *uri2, *uri3; + + if (error_nr == 501) { + uri1 = "/501.html"; + uri2 = "/501.htm"; + uri3 = "/501.shtml"; + } else { + /* 400 (bad request is the default) */ + uri1 = "/400.html"; + uri2 = "/400.htm"; + uri3 = "/400.shtml"; + } + if (fs_open(&hs->file_handle, uri1) == ERR_OK) { + uri = uri1; + } else if (fs_open(&hs->file_handle, uri2) == ERR_OK) { + uri = uri2; + } else if (fs_open(&hs->file_handle, uri3) == ERR_OK) { + uri = uri3; + } else { + LWIP_DEBUGF(HTTPD_DEBUG, ("Error page for error %"U16_F" not found\n", + error_nr)); + return ERR_ARG; + } + return http_init_file(hs, &hs->file_handle, 0, uri, 0, NULL); +} +#else /* LWIP_HTTPD_SUPPORT_EXTSTATUS */ +#define http_find_error_file(hs, error_nr) ERR_ARG +#endif /* LWIP_HTTPD_SUPPORT_EXTSTATUS */ + +/** + * Get the file struct for a 404 error page. + * Tries some file names and returns NULL if none found. + * + * @param uri pointer that receives the actual file name URI + * @return file struct for the error page or NULL no matching file was found + */ +static struct fs_file * +http_get_404_file(struct http_state *hs, const char **uri) +{ + err_t err; + + *uri = "/404.html"; + err = fs_open(&hs->file_handle, *uri); + if (err != ERR_OK) { + /* 404.html doesn't exist. Try 404.htm instead. */ + *uri = "/404.htm"; + err = fs_open(&hs->file_handle, *uri); + if (err != ERR_OK) { + /* 404.htm doesn't exist either. Try 404.shtml instead. */ + *uri = "/404.shtml"; + err = fs_open(&hs->file_handle, *uri); + if (err != ERR_OK) { + /* 404.htm doesn't exist either. Indicate to the caller that it should + * send back a default 404 page. + */ + *uri = NULL; + return NULL; + } + } + } + + return &hs->file_handle; +} + +#if LWIP_HTTPD_SUPPORT_POST +static err_t +http_handle_post_finished(struct http_state *hs) +{ +#if LWIP_HTTPD_POST_MANUAL_WND + /* Prevent multiple calls to httpd_post_finished, since it might have already + been called before from httpd_post_data_recved(). */ + if (hs->post_finished) { + return ERR_OK; + } + hs->post_finished = 1; +#endif /* LWIP_HTTPD_POST_MANUAL_WND */ + /* application error or POST finished */ + /* NULL-terminate the buffer */ + http_uri_buf[0] = 0; + httpd_post_finished(hs, http_uri_buf, LWIP_HTTPD_URI_BUF_LEN); + return http_find_file(hs, http_uri_buf, 0); +} + +/** Pass received POST body data to the application and correctly handle + * returning a response document or closing the connection. + * ATTENTION: The application is responsible for the pbuf now, so don't free it! + * + * @param hs http connection state + * @param p pbuf to pass to the application + * @return ERR_OK if passed successfully, another err_t if the response file + * hasn't been found (after POST finished) + */ +static err_t +http_post_rxpbuf(struct http_state *hs, struct pbuf *p) +{ + err_t err; + + if (p != NULL) { + /* adjust remaining Content-Length */ + if (hs->post_content_len_left < p->tot_len) { + hs->post_content_len_left = 0; + } else { + hs->post_content_len_left -= p->tot_len; + } + } +#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND + /* prevent connection being closed if httpd_post_data_recved() is called nested */ + hs->unrecved_bytes++; +#endif + if (p != NULL) { + err = httpd_post_receive_data(hs, p); + } else { + err = ERR_OK; + } +#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND + hs->unrecved_bytes--; +#endif + if (err != ERR_OK) { + /* Ignore remaining content in case of application error */ + hs->post_content_len_left = 0; + } + if (hs->post_content_len_left == 0) { +#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND + if (hs->unrecved_bytes != 0) { + return ERR_OK; + } +#endif /* LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND */ + /* application error or POST finished */ + return http_handle_post_finished(hs); + } + + return ERR_OK; +} + +/** Handle a post request. Called from http_parse_request when method 'POST' + * is found. + * + * @param p The input pbuf (containing the POST header and body). + * @param hs The http connection state. + * @param data HTTP request (header and part of body) from input pbuf(s). + * @param data_len Size of 'data'. + * @param uri The HTTP URI parsed from input pbuf(s). + * @param uri_end Pointer to the end of 'uri' (here, the rest of the HTTP + * header starts). + * @return ERR_OK: POST correctly parsed and accepted by the application. + * ERR_INPROGRESS: POST not completely parsed (no error yet) + * another err_t: Error parsing POST or denied by the application + */ +static err_t +http_post_request(struct pbuf *inp, struct http_state *hs, + char *data, u16_t data_len, char *uri, char *uri_end) +{ + err_t err; + /* search for end-of-header (first double-CRLF) */ + char *crlfcrlf = lwip_strnstr(uri_end + 1, CRLF CRLF, data_len - (uri_end + 1 - data)); + + if (crlfcrlf != NULL) { + /* search for "Content-Length: " */ +#define HTTP_HDR_CONTENT_LEN "Content-Length: " +#define HTTP_HDR_CONTENT_LEN_LEN 16 +#define HTTP_HDR_CONTENT_LEN_DIGIT_MAX_LEN 10 + char *scontent_len = lwip_strnstr(uri_end + 1, HTTP_HDR_CONTENT_LEN, crlfcrlf - (uri_end + 1)); + if (scontent_len != NULL) { + char *scontent_len_end = lwip_strnstr(scontent_len + HTTP_HDR_CONTENT_LEN_LEN, CRLF, HTTP_HDR_CONTENT_LEN_DIGIT_MAX_LEN); + if (scontent_len_end != NULL) { + int content_len; + char *content_len_num = scontent_len + HTTP_HDR_CONTENT_LEN_LEN; + content_len = atoi(content_len_num); + if (content_len == 0) { + /* if atoi returns 0 on error, fix this */ + if ((content_len_num[0] != '0') || (content_len_num[1] != '\r')) { + content_len = -1; + } + } + if (content_len >= 0) { + /* adjust length of HTTP header passed to application */ + const char *hdr_start_after_uri = uri_end + 1; + u16_t hdr_len = (u16_t)LWIP_MIN(data_len, crlfcrlf + 4 - data); + u16_t hdr_data_len = (u16_t)LWIP_MIN(data_len, crlfcrlf + 4 - hdr_start_after_uri); + u8_t post_auto_wnd = 1; + http_uri_buf[0] = 0; + /* trim http header */ + *crlfcrlf = 0; + err = httpd_post_begin(hs, uri, hdr_start_after_uri, hdr_data_len, content_len, + http_uri_buf, LWIP_HTTPD_URI_BUF_LEN, &post_auto_wnd); + if (err == ERR_OK) { + /* try to pass in data of the first pbuf(s) */ + struct pbuf *q = inp; + u16_t start_offset = hdr_len; +#if LWIP_HTTPD_POST_MANUAL_WND + hs->no_auto_wnd = !post_auto_wnd; +#endif /* LWIP_HTTPD_POST_MANUAL_WND */ + /* set the Content-Length to be received for this POST */ + hs->post_content_len_left = (u32_t)content_len; + + /* get to the pbuf where the body starts */ + while ((q != NULL) && (q->len <= start_offset)) { + start_offset -= q->len; + q = q->next; + } + if (q != NULL) { + /* hide the remaining HTTP header */ + pbuf_remove_header(q, start_offset); +#if LWIP_HTTPD_POST_MANUAL_WND + if (!post_auto_wnd) { + /* already tcp_recved() this data... */ + hs->unrecved_bytes = q->tot_len; + } +#endif /* LWIP_HTTPD_POST_MANUAL_WND */ + pbuf_ref(q); + return http_post_rxpbuf(hs, q); + } else if (hs->post_content_len_left == 0) { + q = pbuf_alloc(PBUF_RAW, 0, PBUF_REF); + return http_post_rxpbuf(hs, q); + } else { + return ERR_OK; + } + } else { + /* return file passed from application */ + return http_find_file(hs, http_uri_buf, 0); + } + } else { + LWIP_DEBUGF(HTTPD_DEBUG, ("POST received invalid Content-Length: %s\n", + content_len_num)); + return ERR_ARG; + } + } + } + /* If we come here, headers are fully received (double-crlf), but Content-Length + was not included. Since this is currently the only supported method, we have + to fail in this case! */ + LWIP_DEBUGF(HTTPD_DEBUG, ("Error when parsing Content-Length\n")); + return ERR_ARG; + } + /* if we come here, the POST is incomplete */ +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + return ERR_INPROGRESS; +#else /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + return ERR_ARG; +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ +} + +#if LWIP_HTTPD_POST_MANUAL_WND +/** + * @ingroup httpd + * A POST implementation can call this function to update the TCP window. + * This can be used to throttle data reception (e.g. when received data is + * programmed to flash and data is received faster than programmed). + * + * @param connection A connection handle passed to httpd_post_begin for which + * httpd_post_finished has *NOT* been called yet! + * @param recved_len Length of data received (for window update) + */ +void httpd_post_data_recved(void *connection, u16_t recved_len) +{ + struct http_state *hs = (struct http_state *)connection; + if (hs != NULL) { + if (hs->no_auto_wnd) { + u16_t len = recved_len; + if (hs->unrecved_bytes >= recved_len) { + hs->unrecved_bytes -= recved_len; + } else { + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_LEVEL_WARNING, ("httpd_post_data_recved: recved_len too big\n")); + len = (u16_t)hs->unrecved_bytes; + hs->unrecved_bytes = 0; + } + if (hs->pcb != NULL) { + if (len != 0) { + altcp_recved(hs->pcb, len); + } + if ((hs->post_content_len_left == 0) && (hs->unrecved_bytes == 0)) { + /* finished handling POST */ + http_handle_post_finished(hs); + http_send(hs->pcb, hs); + } + } + } + } +} +#endif /* LWIP_HTTPD_POST_MANUAL_WND */ + +#endif /* LWIP_HTTPD_SUPPORT_POST */ + +#if LWIP_HTTPD_FS_ASYNC_READ +/** Try to send more data if file has been blocked before + * This is a callback function passed to fs_read_async(). + */ +static void +http_continue(void *connection) +{ + struct http_state *hs = (struct http_state *)connection; + LWIP_ASSERT_CORE_LOCKED(); + if (hs && (hs->pcb) && (hs->handle)) { + LWIP_ASSERT("hs->pcb != NULL", hs->pcb != NULL); + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("httpd_continue: try to send more data\n")); + if (http_send(hs->pcb, hs)) { + /* If we wrote anything to be sent, go ahead and send it now. */ + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("tcp_output\n")); + altcp_output(hs->pcb); + } + } +} +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + +/** + * When data has been received in the correct state, try to parse it + * as a HTTP request. + * + * @param inp the received pbuf + * @param hs the connection state + * @param pcb the altcp_pcb which received this packet + * @return ERR_OK if request was OK and hs has been initialized correctly + * ERR_INPROGRESS if request was OK so far but not fully received + * another err_t otherwise + */ +static err_t +http_parse_request(struct pbuf *inp, struct http_state *hs, struct altcp_pcb *pcb) +{ + char *data; + char *crlf; + u16_t data_len; + struct pbuf *p = inp; +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + u16_t clen; +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ +#if LWIP_HTTPD_SUPPORT_POST + err_t err; +#endif /* LWIP_HTTPD_SUPPORT_POST */ + + LWIP_UNUSED_ARG(pcb); /* only used for post */ + LWIP_ASSERT("p != NULL", p != NULL); + LWIP_ASSERT("hs != NULL", hs != NULL); + + if ((hs->handle != NULL) || (hs->file != NULL)) { + LWIP_DEBUGF(HTTPD_DEBUG, ("Received data while sending a file\n")); + /* already sending a file */ + /* @todo: abort? */ + return ERR_USE; + } + +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + + LWIP_DEBUGF(HTTPD_DEBUG, ("Received %"U16_F" bytes\n", p->tot_len)); + + /* first check allowed characters in this pbuf? */ + + /* enqueue the pbuf */ + if (hs->req == NULL) { + LWIP_DEBUGF(HTTPD_DEBUG, ("First pbuf\n")); + hs->req = p; + } else { + LWIP_DEBUGF(HTTPD_DEBUG, ("pbuf enqueued\n")); + pbuf_cat(hs->req, p); + } + /* increase pbuf ref counter as it is freed when we return but we want to + keep it on the req list */ + pbuf_ref(p); + + if (hs->req->next != NULL) { + data_len = LWIP_MIN(hs->req->tot_len, LWIP_HTTPD_MAX_REQ_LENGTH); + pbuf_copy_partial(hs->req, httpd_req_buf, data_len, 0); + data = httpd_req_buf; + } else +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + { + data = (char *)p->payload; + data_len = p->len; + if (p->len != p->tot_len) { + LWIP_DEBUGF(HTTPD_DEBUG, ("Warning: incomplete header due to chained pbufs\n")); + } + } + + /* received enough data for minimal request? */ + if (data_len >= MIN_REQ_LEN) { + /* wait for CRLF before parsing anything */ + crlf = lwip_strnstr(data, CRLF, data_len); + if (crlf != NULL) { +#if LWIP_HTTPD_SUPPORT_POST + int is_post = 0; +#endif /* LWIP_HTTPD_SUPPORT_POST */ + int is_09 = 0; + char *sp1, *sp2; + u16_t left_len, uri_len; + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("CRLF received, parsing request\n")); + /* parse method */ + if (!strncmp(data, "GET ", 4)) { + sp1 = data + 3; + /* received GET request */ + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Received GET request\"\n")); +#if LWIP_HTTPD_SUPPORT_POST + } else if (!strncmp(data, "POST ", 5)) { + /* store request type */ + is_post = 1; + sp1 = data + 4; + /* received GET request */ + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Received POST request\n")); +#endif /* LWIP_HTTPD_SUPPORT_POST */ + } else { + /* null-terminate the METHOD (pbuf is freed anyway wen returning) */ + data[4] = 0; + /* unsupported method! */ + LWIP_DEBUGF(HTTPD_DEBUG, ("Unsupported request method (not implemented): \"%s\"\n", + data)); + return http_find_error_file(hs, 501); + } + /* if we come here, method is OK, parse URI */ + left_len = (u16_t)(data_len - ((sp1 + 1) - data)); + sp2 = lwip_strnstr(sp1 + 1, " ", left_len); +#if LWIP_HTTPD_SUPPORT_V09 + if (sp2 == NULL) { + /* HTTP 0.9: respond with correct protocol version */ + sp2 = lwip_strnstr(sp1 + 1, CRLF, left_len); + is_09 = 1; +#if LWIP_HTTPD_SUPPORT_POST + if (is_post) { + /* HTTP/0.9 does not support POST */ + goto badrequest; + } +#endif /* LWIP_HTTPD_SUPPORT_POST */ + } +#endif /* LWIP_HTTPD_SUPPORT_V09 */ + uri_len = (u16_t)(sp2 - (sp1 + 1)); + if ((sp2 != 0) && (sp2 > sp1)) { + /* wait for CRLFCRLF (indicating end of HTTP headers) before parsing anything */ + if (lwip_strnstr(data, CRLF CRLF, data_len) != NULL) { + char *uri = sp1 + 1; +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + /* This is HTTP/1.0 compatible: for strict 1.1, a connection + would always be persistent unless "close" was specified. */ + if (!is_09 && (lwip_strnstr(data, HTTP11_CONNECTIONKEEPALIVE, data_len) || + lwip_strnstr(data, HTTP11_CONNECTIONKEEPALIVE2, data_len))) { + hs->keepalive = 1; + } else { + hs->keepalive = 0; + } +#endif /* LWIP_HTTPD_SUPPORT_11_KEEPALIVE */ + /* null-terminate the METHOD (pbuf is freed anyway wen returning) */ + *sp1 = 0; + uri[uri_len] = 0; + LWIP_DEBUGF(HTTPD_DEBUG, ("Received \"%s\" request for URI: \"%s\"\n", + data, uri)); +#if LWIP_HTTPD_SUPPORT_POST + if (is_post) { +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + struct pbuf *q = hs->req; +#else /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + struct pbuf *q = inp; +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + err = http_post_request(q, hs, data, data_len, uri, sp2); + if (err != ERR_OK) { + /* restore header for next try */ + *sp1 = ' '; + *sp2 = ' '; + uri[uri_len] = ' '; + } + if (err == ERR_ARG) { + goto badrequest; + } + return err; + } else +#endif /* LWIP_HTTPD_SUPPORT_POST */ + { + return http_find_file(hs, uri, is_09); + } + } + } else { + LWIP_DEBUGF(HTTPD_DEBUG, ("invalid URI\n")); + } + } + } + +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + clen = pbuf_clen(hs->req); + if ((hs->req->tot_len <= LWIP_HTTPD_REQ_BUFSIZE) && + (clen <= LWIP_HTTPD_REQ_QUEUELEN)) { + /* request not fully received (too short or CRLF is missing) */ + return ERR_INPROGRESS; + } else +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + { +#if LWIP_HTTPD_SUPPORT_POST +badrequest: +#endif /* LWIP_HTTPD_SUPPORT_POST */ + LWIP_DEBUGF(HTTPD_DEBUG, ("bad request\n")); + /* could not parse request */ + return http_find_error_file(hs, 400); + } +} + +#if LWIP_HTTPD_SSI && (LWIP_HTTPD_SSI_BY_FILE_EXTENSION == 1) +/* Check if SSI should be parsed for this file/URL + * (With LWIP_HTTPD_SSI_BY_FILE_EXTENSION == 2, this function can be + * overridden by an external implementation.) + * + * @return 1 for SSI, 0 for standard files + */ +static u8_t +http_uri_is_ssi(struct fs_file *file, const char *uri) +{ + size_t loop; + u8_t tag_check = 0; + if (file != NULL) { + /* See if we have been asked for an shtml file and, if so, + enable tag checking. */ + const char *ext = NULL, *sub; + char *param = (char *)strstr(uri, "?"); + if (param != NULL) { + /* separate uri from parameters for now, set back later */ + *param = 0; + } + sub = uri; + ext = uri; + for (sub = strstr(sub, "."); sub != NULL; sub = strstr(sub, ".")) { + ext = sub; + sub++; + } + for (loop = 0; loop < NUM_SHTML_EXTENSIONS; loop++) { + if (!lwip_stricmp(ext, g_pcSSIExtensions[loop])) { + tag_check = 1; + break; + } + } + if (param != NULL) { + *param = '?'; + } + } + return tag_check; +} +#endif /* LWIP_HTTPD_SSI */ + +/** Try to find the file specified by uri and, if found, initialize hs + * accordingly. + * + * @param hs the connection state + * @param uri the HTTP header URI + * @param is_09 1 if the request is HTTP/0.9 (no HTTP headers in response) + * @return ERR_OK if file was found and hs has been initialized correctly + * another err_t otherwise + */ +static err_t +http_find_file(struct http_state *hs, const char *uri, int is_09) +{ + size_t loop; + struct fs_file *file = NULL; + char *params = NULL; + err_t err; +#if LWIP_HTTPD_CGI + int i; +#endif /* LWIP_HTTPD_CGI */ +#if !LWIP_HTTPD_SSI + const +#endif /* !LWIP_HTTPD_SSI */ + /* By default, assume we will not be processing server-side-includes tags */ + u8_t tag_check = 0; + + /* Have we been asked for the default file (in root or a directory) ? */ +#if LWIP_HTTPD_MAX_REQUEST_URI_LEN + size_t uri_len = strlen(uri); + if ((uri_len > 0) && (uri[uri_len - 1] == '/') && + ((uri != http_uri_buf) || (uri_len == 1))) { + size_t copy_len = LWIP_MIN(sizeof(http_uri_buf) - 1, uri_len - 1); + if (copy_len > 0) { + MEMCPY(http_uri_buf, uri, copy_len); + http_uri_buf[copy_len] = 0; + } +#else /* LWIP_HTTPD_MAX_REQUEST_URI_LEN */ + if ((uri[0] == '/') && (uri[1] == 0)) { +#endif /* LWIP_HTTPD_MAX_REQUEST_URI_LEN */ + /* Try each of the configured default filenames until we find one + that exists. */ + for (loop = 0; loop < NUM_DEFAULT_FILENAMES; loop++) { + const char *file_name; +#if LWIP_HTTPD_MAX_REQUEST_URI_LEN + if (copy_len > 0) { + size_t len_left = sizeof(http_uri_buf) - copy_len - 1; + if (len_left > 0) { + size_t name_len = strlen(httpd_default_filenames[loop].name); + size_t name_copy_len = LWIP_MIN(len_left, name_len); + MEMCPY(&http_uri_buf[copy_len], httpd_default_filenames[loop].name, name_copy_len); + http_uri_buf[copy_len + name_copy_len] = 0; + } + file_name = http_uri_buf; + } else +#endif /* LWIP_HTTPD_MAX_REQUEST_URI_LEN */ + { + file_name = httpd_default_filenames[loop].name; + } + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Looking for %s...\n", file_name)); + err = fs_open(&hs->file_handle, file_name); + if (err == ERR_OK) { + uri = file_name; + file = &hs->file_handle; + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Opened.\n")); +#if LWIP_HTTPD_SSI + tag_check = httpd_default_filenames[loop].shtml; +#endif /* LWIP_HTTPD_SSI */ + break; + } + } + } + if (file == NULL) { + /* No - we've been asked for a specific file. */ + /* First, isolate the base URI (without any parameters) */ + params = (char *)strchr(uri, '?'); + if (params != NULL) { + /* URI contains parameters. NULL-terminate the base URI */ + *params = '\0'; + params++; + } + +#if LWIP_HTTPD_CGI + http_cgi_paramcount = -1; + /* Does the base URI we have isolated correspond to a CGI handler? */ + if (httpd_num_cgis && httpd_cgis) { + for (i = 0; i < httpd_num_cgis; i++) { + if (strcmp(uri, httpd_cgis[i].pcCGIName) == 0) { + /* + * We found a CGI that handles this URI so extract the + * parameters and call the handler. + */ + http_cgi_paramcount = extract_uri_parameters(hs, params); + uri = httpd_cgis[i].pfnCGIHandler(i, http_cgi_paramcount, hs->params, + hs->param_vals); + break; + } + } + } +#endif /* LWIP_HTTPD_CGI */ + + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Opening %s\n", uri)); + + err = fs_open(&hs->file_handle, uri); + if (err == ERR_OK) { + file = &hs->file_handle; + } else { + file = http_get_404_file(hs, &uri); + } +#if LWIP_HTTPD_SSI + if (file != NULL) { + if (file->flags & FS_FILE_FLAGS_SSI) { + tag_check = 1; + } else { +#if LWIP_HTTPD_SSI_BY_FILE_EXTENSION + tag_check = http_uri_is_ssi(file, uri); +#endif /* LWIP_HTTPD_SSI_BY_FILE_EXTENSION */ + } + } +#endif /* LWIP_HTTPD_SSI */ + } + if (file == NULL) { + /* None of the default filenames exist so send back a 404 page */ + file = http_get_404_file(hs, &uri); + } + return http_init_file(hs, file, is_09, uri, tag_check, params); +} + +/** Initialize a http connection with a file to send (if found). + * Called by http_find_file and http_find_error_file. + * + * @param hs http connection state + * @param file file structure to send (or NULL if not found) + * @param is_09 1 if the request is HTTP/0.9 (no HTTP headers in response) + * @param uri the HTTP header URI + * @param tag_check enable SSI tag checking + * @param params != NULL if URI has parameters (separated by '?') + * @return ERR_OK if file was found and hs has been initialized correctly + * another err_t otherwise + */ +static err_t +http_init_file(struct http_state *hs, struct fs_file *file, int is_09, const char *uri, + u8_t tag_check, char *params) +{ +#if !LWIP_HTTPD_SUPPORT_V09 + LWIP_UNUSED_ARG(is_09); +#endif + if (file != NULL) { + /* file opened, initialise struct http_state */ +#if !LWIP_HTTPD_DYNAMIC_FILE_READ + /* If dynamic read is disabled, file data must be in one piece and available now */ + LWIP_ASSERT("file->data != NULL", file->data != NULL); +#endif + +#if LWIP_HTTPD_SSI + if (tag_check) { + struct http_ssi_state *ssi = http_ssi_state_alloc(); + if (ssi != NULL) { + ssi->tag_index = 0; + ssi->tag_state = TAG_NONE; + ssi->parsed = file->data; + ssi->parse_left = file->len; + ssi->tag_end = file->data; + hs->ssi = ssi; + } + } +#else /* LWIP_HTTPD_SSI */ + LWIP_UNUSED_ARG(tag_check); +#endif /* LWIP_HTTPD_SSI */ + hs->handle = file; +#if LWIP_HTTPD_CGI_SSI + if (params != NULL) { + /* URI contains parameters, call generic CGI handler */ + int count; +#if LWIP_HTTPD_CGI + if (http_cgi_paramcount >= 0) { + count = http_cgi_paramcount; + } else +#endif + { + count = extract_uri_parameters(hs, params); + } + httpd_cgi_handler(file, uri, count, http_cgi_params, http_cgi_param_vals +#if defined(LWIP_HTTPD_FILE_STATE) && LWIP_HTTPD_FILE_STATE + , file->state +#endif /* LWIP_HTTPD_FILE_STATE */ + ); + } +#else /* LWIP_HTTPD_CGI_SSI */ + LWIP_UNUSED_ARG(params); +#endif /* LWIP_HTTPD_CGI_SSI */ + hs->file = file->data; + LWIP_ASSERT("File length must be positive!", (file->len >= 0)); +#if LWIP_HTTPD_CUSTOM_FILES + if (file->is_custom_file && (file->data == NULL)) { + /* custom file, need to read data first (via fs_read_custom) */ + hs->left = 0; + } else +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + { + hs->left = (u32_t)file->len; + } + hs->retries = 0; +#if LWIP_HTTPD_TIMING + hs->time_started = sys_now(); +#endif /* LWIP_HTTPD_TIMING */ +#if !LWIP_HTTPD_DYNAMIC_HEADERS + LWIP_ASSERT("HTTP headers not included in file system", + (hs->handle->flags & FS_FILE_FLAGS_HEADER_INCLUDED) != 0); +#endif /* !LWIP_HTTPD_DYNAMIC_HEADERS */ +#if LWIP_HTTPD_SUPPORT_V09 + if (is_09 && ((hs->handle->flags & FS_FILE_FLAGS_HEADER_INCLUDED) != 0)) { + /* HTTP/0.9 responses are sent without HTTP header, + search for the end of the header. */ + char *file_start = lwip_strnstr(hs->file, CRLF CRLF, hs->left); + if (file_start != NULL) { + int diff = file_start + 4 - hs->file; + hs->file += diff; + hs->left -= (u32_t)diff; + } + } +#endif /* LWIP_HTTPD_SUPPORT_V09*/ + } else { + hs->handle = NULL; + hs->file = NULL; + hs->left = 0; + hs->retries = 0; + } +#if LWIP_HTTPD_DYNAMIC_HEADERS + /* Determine the HTTP headers to send based on the file extension of + * the requested URI. */ + if ((hs->handle == NULL) || ((hs->handle->flags & FS_FILE_FLAGS_HEADER_INCLUDED) == 0)) { + get_http_headers(hs, uri); + } +#else /* LWIP_HTTPD_DYNAMIC_HEADERS */ + LWIP_UNUSED_ARG(uri); +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + if (hs->keepalive) { +#if LWIP_HTTPD_SSI + if (hs->ssi != NULL) { + hs->keepalive = 0; + } else +#endif /* LWIP_HTTPD_SSI */ + { + if ((hs->handle != NULL) && + ((hs->handle->flags & (FS_FILE_FLAGS_HEADER_INCLUDED | FS_FILE_FLAGS_HEADER_PERSISTENT)) == FS_FILE_FLAGS_HEADER_INCLUDED)) { + hs->keepalive = 0; + } + } + } +#endif /* LWIP_HTTPD_SUPPORT_11_KEEPALIVE */ + return ERR_OK; +} + +/** + * The pcb had an error and is already deallocated. + * The argument might still be valid (if != NULL). + */ +static void +http_err(void *arg, err_t err) +{ + struct http_state *hs = (struct http_state *)arg; + LWIP_UNUSED_ARG(err); + + LWIP_DEBUGF(HTTPD_DEBUG, ("http_err: %s", lwip_strerr(err))); + + if (hs != NULL) { + http_state_free(hs); + } +} + +/** + * Data has been sent and acknowledged by the remote host. + * This means that more data can be sent. + */ +static err_t +http_sent(void *arg, struct altcp_pcb *pcb, u16_t len) +{ + struct http_state *hs = (struct http_state *)arg; + + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_sent %p\n", (void *)pcb)); + + LWIP_UNUSED_ARG(len); + + if (hs == NULL) { + return ERR_OK; + } + + hs->retries = 0; + + http_send(pcb, hs); + + return ERR_OK; +} + +/** + * The poll function is called every 2nd second. + * If there has been no data sent (which resets the retries) in 8 seconds, close. + * If the last portion of a file has not been sent in 2 seconds, close. + * + * This could be increased, but we don't want to waste resources for bad connections. + */ +static err_t +http_poll(void *arg, struct altcp_pcb *pcb) +{ + struct http_state *hs = (struct http_state *)arg; + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_poll: pcb=%p hs=%p pcb_state=%s\n", + (void *)pcb, (void *)hs, tcp_debug_state_str(altcp_dbg_get_tcp_state(pcb)))); + + if (hs == NULL) { + err_t closed; + /* arg is null, close. */ + LWIP_DEBUGF(HTTPD_DEBUG, ("http_poll: arg is NULL, close\n")); + closed = http_close_conn(pcb, NULL); + LWIP_UNUSED_ARG(closed); +#if LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR + if (closed == ERR_MEM) { + altcp_abort(pcb); + return ERR_ABRT; + } +#endif /* LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR */ + return ERR_OK; + } else { + hs->retries++; + if (hs->retries == HTTPD_MAX_RETRIES) { + LWIP_DEBUGF(HTTPD_DEBUG, ("http_poll: too many retries, close\n")); + http_close_conn(pcb, hs); + return ERR_OK; + } + + /* If this connection has a file open, try to send some more data. If + * it has not yet received a GET request, don't do this since it will + * cause the connection to close immediately. */ + if (hs->handle) { + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_poll: try to send more data\n")); + if (http_send(pcb, hs)) { + /* If we wrote anything to be sent, go ahead and send it now. */ + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("tcp_output\n")); + altcp_output(pcb); + } + } + } + + return ERR_OK; +} + +/** + * Data has been received on this pcb. + * For HTTP 1.0, this should normally only happen once (if the request fits in one packet). + */ +static err_t +http_recv(void *arg, struct altcp_pcb *pcb, struct pbuf *p, err_t err) +{ + struct http_state *hs = (struct http_state *)arg; + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_recv: pcb=%p pbuf=%p err=%s\n", (void *)pcb, + (void *)p, lwip_strerr(err))); + + if ((err != ERR_OK) || (p == NULL) || (hs == NULL)) { + /* error or closed by other side? */ + if (p != NULL) { + /* Inform TCP that we have taken the data. */ + altcp_recved(pcb, p->tot_len); + pbuf_free(p); + } + if (hs == NULL) { + /* this should not happen, only to be robust */ + LWIP_DEBUGF(HTTPD_DEBUG, ("Error, http_recv: hs is NULL, close\n")); + } + http_close_conn(pcb, hs); + return ERR_OK; + } + +#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND + if (hs->no_auto_wnd) { + hs->unrecved_bytes += p->tot_len; + } else +#endif /* LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND */ + { + /* Inform TCP that we have taken the data. */ + altcp_recved(pcb, p->tot_len); + } + +#if LWIP_HTTPD_SUPPORT_POST + if (hs->post_content_len_left > 0) { + /* reset idle counter when POST data is received */ + hs->retries = 0; + /* this is data for a POST, pass the complete pbuf to the application */ + http_post_rxpbuf(hs, p); + /* pbuf is passed to the application, don't free it! */ + if (hs->post_content_len_left == 0) { + /* all data received, send response or close connection */ + http_send(pcb, hs); + } + return ERR_OK; + } else +#endif /* LWIP_HTTPD_SUPPORT_POST */ + { + if (hs->handle == NULL) { + err_t parsed = http_parse_request(p, hs, pcb); + LWIP_ASSERT("http_parse_request: unexpected return value", parsed == ERR_OK + || parsed == ERR_INPROGRESS || parsed == ERR_ARG || parsed == ERR_USE); +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + if (parsed != ERR_INPROGRESS) { + /* request fully parsed or error */ + if (hs->req != NULL) { + pbuf_free(hs->req); + hs->req = NULL; + } + } +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + pbuf_free(p); + if (parsed == ERR_OK) { +#if LWIP_HTTPD_SUPPORT_POST + if (hs->post_content_len_left == 0) +#endif /* LWIP_HTTPD_SUPPORT_POST */ + { + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_recv: data %p len %"S32_F"\n", (const void *)hs->file, hs->left)); + http_send(pcb, hs); + } + } else if (parsed == ERR_ARG) { + /* @todo: close on ERR_USE? */ + http_close_conn(pcb, hs); + } + } else { + LWIP_DEBUGF(HTTPD_DEBUG, ("http_recv: already sending data\n")); + /* already sending but still receiving data, we might want to RST here? */ + pbuf_free(p); + } + } + return ERR_OK; +} + +/** + * A new incoming connection has been accepted. + */ +static err_t +http_accept(void *arg, struct altcp_pcb *pcb, err_t err) +{ + struct http_state *hs; + LWIP_UNUSED_ARG(err); + LWIP_UNUSED_ARG(arg); + LWIP_DEBUGF(HTTPD_DEBUG, ("http_accept %p / %p\n", (void *)pcb, arg)); + + if ((err != ERR_OK) || (pcb == NULL)) { + return ERR_VAL; + } + + /* Set priority */ + altcp_setprio(pcb, HTTPD_TCP_PRIO); + + /* Allocate memory for the structure that holds the state of the + connection - initialized by that function. */ + hs = http_state_alloc(); + if (hs == NULL) { + LWIP_DEBUGF(HTTPD_DEBUG, ("http_accept: Out of memory, RST\n")); + return ERR_MEM; + } + hs->pcb = pcb; + + /* Tell TCP that this is the structure we wish to be passed for our + callbacks. */ + altcp_arg(pcb, hs); + + /* Set up the various callback functions */ + altcp_recv(pcb, http_recv); + altcp_err(pcb, http_err); + altcp_poll(pcb, http_poll, HTTPD_POLL_INTERVAL); + altcp_sent(pcb, http_sent); + + return ERR_OK; +} + +static void +httpd_init_pcb(struct altcp_pcb *pcb, u16_t port) +{ + err_t err; + + if (pcb) { + altcp_setprio(pcb, HTTPD_TCP_PRIO); + /* set SOF_REUSEADDR here to explicitly bind httpd to multiple interfaces */ + err = altcp_bind(pcb, IP_ANY_TYPE, port); + LWIP_UNUSED_ARG(err); /* in case of LWIP_NOASSERT */ + LWIP_ASSERT("httpd_init: tcp_bind failed", err == ERR_OK); + pcb = altcp_listen(pcb); + LWIP_ASSERT("httpd_init: tcp_listen failed", pcb != NULL); + altcp_accept(pcb, http_accept); + } +} + +/** + * @ingroup httpd + * Initialize the httpd: set up a listening PCB and bind it to the defined port + */ +void +httpd_init(void) +{ + struct altcp_pcb *pcb; + +#if HTTPD_USE_MEM_POOL + LWIP_MEMPOOL_INIT(HTTPD_STATE); +#if LWIP_HTTPD_SSI + LWIP_MEMPOOL_INIT(HTTPD_SSI_STATE); +#endif +#endif + LWIP_DEBUGF(HTTPD_DEBUG, ("httpd_init\n")); + + /* LWIP_ASSERT_CORE_LOCKED(); is checked by tcp_new() */ + + pcb = altcp_tcp_new_ip_type(IPADDR_TYPE_ANY); + LWIP_ASSERT("httpd_init: tcp_new failed", pcb != NULL); + httpd_init_pcb(pcb, HTTPD_SERVER_PORT); +} + +#if HTTPD_ENABLE_HTTPS +/** + * @ingroup httpd + * Initialize the httpd: set up a listening PCB and bind it to the defined port. + * Also set up TLS connection handling (HTTPS). + */ +void +httpd_inits(struct altcp_tls_config *conf) +{ +#if LWIP_ALTCP_TLS + struct altcp_pcb *pcb_tls = altcp_tls_new(conf, IPADDR_TYPE_ANY); + LWIP_ASSERT("httpd_init: altcp_tls_new failed", pcb_tls != NULL); + httpd_init_pcb(pcb_tls, HTTPD_SERVER_PORT_HTTPS); +#else /* LWIP_ALTCP_TLS */ + LWIP_UNUSED_ARG(conf); +#endif /* LWIP_ALTCP_TLS */ +} +#endif /* HTTPD_ENABLE_HTTPS */ + +#if LWIP_HTTPD_SSI +/** + * @ingroup httpd + * Set the SSI handler function. + * + * @param ssi_handler the SSI handler function + * @param tags an array of SSI tag strings to search for in SSI-enabled files + * @param num_tags number of tags in the 'tags' array + */ +void +http_set_ssi_handler(tSSIHandler ssi_handler, const char **tags, int num_tags) +{ + LWIP_DEBUGF(HTTPD_DEBUG, ("http_set_ssi_handler\n")); + + LWIP_ASSERT("no ssi_handler given", ssi_handler != NULL); + httpd_ssi_handler = ssi_handler; + +#if LWIP_HTTPD_SSI_RAW + LWIP_UNUSED_ARG(tags); + LWIP_UNUSED_ARG(num_tags); +#else /* LWIP_HTTPD_SSI_RAW */ + LWIP_ASSERT("no tags given", tags != NULL); + LWIP_ASSERT("invalid number of tags", num_tags > 0); + + httpd_tags = tags; + httpd_num_tags = num_tags; +#endif /* !LWIP_HTTPD_SSI_RAW */ +} +#endif /* LWIP_HTTPD_SSI */ + +#if LWIP_HTTPD_CGI +/** + * @ingroup httpd + * Set an array of CGI filenames/handler functions + * + * @param cgis an array of CGI filenames/handler functions + * @param num_handlers number of elements in the 'cgis' array + */ +void +http_set_cgi_handlers(const tCGI *cgis, int num_handlers) +{ + LWIP_ASSERT("no cgis given", cgis != NULL); + LWIP_ASSERT("invalid number of handlers", num_handlers > 0); + + httpd_cgis = cgis; + httpd_num_cgis = num_handlers; +} +#endif /* LWIP_HTTPD_CGI */ + +#endif /* LWIP_TCP && LWIP_CALLBACK_API */ diff --git a/Libraries/LwIP/src/apps/http/httpd_structs.h b/Libraries/LwIP/src/apps/http/httpd_structs.h new file mode 100644 index 0000000..56b97a3 --- /dev/null +++ b/Libraries/LwIP/src/apps/http/httpd_structs.h @@ -0,0 +1,123 @@ +#ifndef LWIP_HTTPD_STRUCTS_H +#define LWIP_HTTPD_STRUCTS_H + +#include "lwip/apps/httpd.h" + +#if LWIP_HTTPD_DYNAMIC_HEADERS +/** This struct is used for a list of HTTP header strings for various + * filename extensions. */ +typedef struct { + const char *extension; + const char *content_type; +} tHTTPHeader; + +/** A list of strings used in HTTP headers (see RFC 1945 HTTP/1.0 and + * RFC 2616 HTTP/1.1 for header field definitions) */ +static const char *const g_psHTTPHeaderStrings[] = { + "HTTP/1.0 200 OK\r\n", + "HTTP/1.0 404 File not found\r\n", + "HTTP/1.0 400 Bad Request\r\n", + "HTTP/1.0 501 Not Implemented\r\n", + "HTTP/1.1 200 OK\r\n", + "HTTP/1.1 404 File not found\r\n", + "HTTP/1.1 400 Bad Request\r\n", + "HTTP/1.1 501 Not Implemented\r\n", + "Content-Length: ", + "Connection: Close\r\n", + "Connection: keep-alive\r\n", + "Connection: keep-alive\r\nContent-Length: ", + "Server: "HTTPD_SERVER_AGENT"\r\n", + "\r\n

                  404: The requested file cannot be found.

                  \r\n" +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + , "Connection: keep-alive\r\nContent-Length: 77\r\n\r\n

                  404: The requested file cannot be found.

                  \r\n" +#endif +}; + +/* Indexes into the g_psHTTPHeaderStrings array */ +#define HTTP_HDR_OK 0 /* 200 OK */ +#define HTTP_HDR_NOT_FOUND 1 /* 404 File not found */ +#define HTTP_HDR_BAD_REQUEST 2 /* 400 Bad request */ +#define HTTP_HDR_NOT_IMPL 3 /* 501 Not Implemented */ +#define HTTP_HDR_OK_11 4 /* 200 OK */ +#define HTTP_HDR_NOT_FOUND_11 5 /* 404 File not found */ +#define HTTP_HDR_BAD_REQUEST_11 6 /* 400 Bad request */ +#define HTTP_HDR_NOT_IMPL_11 7 /* 501 Not Implemented */ +#define HTTP_HDR_CONTENT_LENGTH 8 /* Content-Length: (HTTP 1.0)*/ +#define HTTP_HDR_CONN_CLOSE 9 /* Connection: Close (HTTP 1.1) */ +#define HTTP_HDR_CONN_KEEPALIVE 10 /* Connection: keep-alive (HTTP 1.1) */ +#define HTTP_HDR_KEEPALIVE_LEN 11 /* Connection: keep-alive + Content-Length: (HTTP 1.1)*/ +#define HTTP_HDR_SERVER 12 /* Server: HTTPD_SERVER_AGENT */ +#define DEFAULT_404_HTML 13 /* default 404 body */ +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE +#define DEFAULT_404_HTML_PERSISTENT 14 /* default 404 body, but including Connection: keep-alive */ +#endif + +#define HTTP_CONTENT_TYPE(contenttype) "Content-Type: "contenttype"\r\n\r\n" +#define HTTP_CONTENT_TYPE_ENCODING(contenttype, encoding) "Content-Type: "contenttype"\r\nContent-Encoding: "encoding"\r\n\r\n" + +#define HTTP_HDR_HTML HTTP_CONTENT_TYPE("text/html") +#define HTTP_HDR_SSI HTTP_CONTENT_TYPE("text/html\r\nExpires: Fri, 10 Apr 2008 14:00:00 GMT\r\nPragma: no-cache") +#define HTTP_HDR_GIF HTTP_CONTENT_TYPE("image/gif") +#define HTTP_HDR_PNG HTTP_CONTENT_TYPE("image/png") +#define HTTP_HDR_JPG HTTP_CONTENT_TYPE("image/jpeg") +#define HTTP_HDR_BMP HTTP_CONTENT_TYPE("image/bmp") +#define HTTP_HDR_ICO HTTP_CONTENT_TYPE("image/x-icon") +#define HTTP_HDR_APP HTTP_CONTENT_TYPE("application/octet-stream") +#define HTTP_HDR_JS HTTP_CONTENT_TYPE("application/javascript") +#define HTTP_HDR_RA HTTP_CONTENT_TYPE("application/javascript") +#define HTTP_HDR_CSS HTTP_CONTENT_TYPE("text/css") +#define HTTP_HDR_SWF HTTP_CONTENT_TYPE("application/x-shockwave-flash") +#define HTTP_HDR_XML HTTP_CONTENT_TYPE("text/xml") +#define HTTP_HDR_PDF HTTP_CONTENT_TYPE("application/pdf") +#define HTTP_HDR_JSON HTTP_CONTENT_TYPE("application/json") +#define HTTP_HDR_CSV HTTP_CONTENT_TYPE("text/csv") +#define HTTP_HDR_TSV HTTP_CONTENT_TYPE("text/tsv") +#define HTTP_HDR_SVG HTTP_CONTENT_TYPE("image/svg+xml") +#define HTTP_HDR_SVGZ HTTP_CONTENT_TYPE_ENCODING("image/svg+xml", "gzip") + +#define HTTP_HDR_DEFAULT_TYPE HTTP_CONTENT_TYPE("text/plain") + +/** A list of extension-to-HTTP header strings (see outdated RFC 1700 MEDIA TYPES + * and http://www.iana.org/assignments/media-types for registered content types + * and subtypes) */ +static const tHTTPHeader g_psHTTPHeaders[] = { + { "html", HTTP_HDR_HTML}, + { "htm", HTTP_HDR_HTML}, + { "shtml", HTTP_HDR_SSI}, + { "shtm", HTTP_HDR_SSI}, + { "ssi", HTTP_HDR_SSI}, + { "gif", HTTP_HDR_GIF}, + { "png", HTTP_HDR_PNG}, + { "jpg", HTTP_HDR_JPG}, + { "bmp", HTTP_HDR_BMP}, + { "ico", HTTP_HDR_ICO}, + { "class", HTTP_HDR_APP}, + { "cls", HTTP_HDR_APP}, + { "js", HTTP_HDR_JS}, + { "ram", HTTP_HDR_RA}, + { "css", HTTP_HDR_CSS}, + { "swf", HTTP_HDR_SWF}, + { "xml", HTTP_HDR_XML}, + { "xsl", HTTP_HDR_XML}, + { "pdf", HTTP_HDR_PDF}, + { "json", HTTP_HDR_JSON} +#ifdef HTTPD_ADDITIONAL_CONTENT_TYPES + /* If you need to add content types not listed here: + * #define HTTPD_ADDITIONAL_CONTENT_TYPES {"ct1", HTTP_CONTENT_TYPE("text/ct1")}, {"exe", HTTP_CONTENT_TYPE("application/exe")} + */ + , HTTPD_ADDITIONAL_CONTENT_TYPES +#endif +}; + +#define NUM_HTTP_HEADERS LWIP_ARRAYSIZE(g_psHTTPHeaders) + +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ + +#if LWIP_HTTPD_SSI +static const char *const g_pcSSIExtensions[] = { + ".shtml", ".shtm", ".ssi", ".xml", ".json" +}; +#define NUM_SHTML_EXTENSIONS LWIP_ARRAYSIZE(g_pcSSIExtensions) +#endif /* LWIP_HTTPD_SSI */ + +#endif /* LWIP_HTTPD_STRUCTS_H */ diff --git a/Libraries/LwIP/src/apps/http/makefsdata/makefsdata b/Libraries/LwIP/src/apps/http/makefsdata/makefsdata new file mode 100644 index 0000000..37b4203 --- /dev/null +++ b/Libraries/LwIP/src/apps/http/makefsdata/makefsdata @@ -0,0 +1,97 @@ +#!/usr/bin/perl + +open(OUTPUT, "> fsdata.c"); + +chdir("fs"); +open(FILES, "find . -type f |"); + +while($file = ) { + + # Do not include files in CVS directories nor backup files. + if($file =~ /(CVS|~)/) { + next; + } + + chop($file); + + open(HEADER, "> /tmp/header") || die $!; + if($file =~ /404/) { + print(HEADER "HTTP/1.0 404 File not found\r\n"); + } else { + print(HEADER "HTTP/1.0 200 OK\r\n"); + } + print(HEADER "Server: lwIP/pre-0.6 (http://www.sics.se/~adam/lwip/)\r\n"); + if($file =~ /\.html$/) { + print(HEADER "Content-type: text/html\r\n"); + } elsif($file =~ /\.gif$/) { + print(HEADER "Content-type: image/gif\r\n"); + } elsif($file =~ /\.png$/) { + print(HEADER "Content-type: image/png\r\n"); + } elsif($file =~ /\.jpg$/) { + print(HEADER "Content-type: image/jpeg\r\n"); + } elsif($file =~ /\.class$/) { + print(HEADER "Content-type: application/octet-stream\r\n"); + } elsif($file =~ /\.ram$/) { + print(HEADER "Content-type: audio/x-pn-realaudio\r\n"); + } else { + print(HEADER "Content-type: text/plain\r\n"); + } + print(HEADER "\r\n"); + close(HEADER); + + unless($file =~ /\.plain$/ || $file =~ /cgi/) { + system("cat /tmp/header $file > /tmp/file"); + } else { + system("cp $file /tmp/file"); + } + + open(FILE, "/tmp/file"); + unlink("/tmp/file"); + unlink("/tmp/header"); + + $file =~ s/\.//; + $fvar = $file; + $fvar =~ s-/-_-g; + $fvar =~ s-\.-_-g; + print(OUTPUT "static const unsigned char data".$fvar."[] = {\n"); + print(OUTPUT "\t/* $file */\n\t"); + for($j = 0; $j < length($file); $j++) { + printf(OUTPUT "%#02x, ", unpack("C", substr($file, $j, 1))); + } + printf(OUTPUT "0,\n"); + + + $i = 0; + while(read(FILE, $data, 1)) { + if($i == 0) { + print(OUTPUT "\t"); + } + printf(OUTPUT "%#02x, ", unpack("C", $data)); + $i++; + if($i == 10) { + print(OUTPUT "\n"); + $i = 0; + } + } + print(OUTPUT "};\n\n"); + close(FILE); + push(@fvars, $fvar); + push(@files, $file); +} + +for($i = 0; $i < @fvars; $i++) { + $file = $files[$i]; + $fvar = $fvars[$i]; + + if($i == 0) { + $prevfile = "NULL"; + } else { + $prevfile = "file" . $fvars[$i - 1]; + } + print(OUTPUT "const struct fsdata_file file".$fvar."[] = {{$prevfile, data$fvar, "); + print(OUTPUT "data$fvar + ". (length($file) + 1) .", "); + print(OUTPUT "sizeof(data$fvar) - ". (length($file) + 1) ."}};\n\n"); +} + +print(OUTPUT "#define FS_ROOT file$fvars[$i - 1]\n\n"); +print(OUTPUT "#define FS_NUMFILES $i\n"); diff --git a/Libraries/LwIP/src/apps/http/makefsdata/makefsdata.c b/Libraries/LwIP/src/apps/http/makefsdata/makefsdata.c new file mode 100644 index 0000000..695e94f --- /dev/null +++ b/Libraries/LwIP/src/apps/http/makefsdata/makefsdata.c @@ -0,0 +1,1251 @@ +/** + * makefsdata: Converts a directory structure for use with the lwIP httpd. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Jim Pettinato + * Simon Goldschmidt + * + * @todo: + * - take TCP_MSS, LWIP_TCP_TIMESTAMPS and + * PAYLOAD_ALIGN_TYPE/PAYLOAD_ALIGNMENT as arguments + */ + +#include +#include +#include +#include +#include + +#include "tinydir.h" + +/** Makefsdata can generate *all* files deflate-compressed (where file size shrinks). + * Since nearly all browsers support this, this is a good way to reduce ROM size. + * To compress the files, "miniz.c" must be downloaded seperately. + */ +#ifndef MAKEFS_SUPPORT_DEFLATE +#define MAKEFS_SUPPORT_DEFLATE 0 +#endif + +#define COPY_BUFSIZE (1024*1024) /* 1 MByte */ + +#if MAKEFS_SUPPORT_DEFLATE +#include "../miniz.c" + +typedef unsigned char uint8; +typedef unsigned short uint16; +typedef unsigned int uint; + +#define my_max(a,b) (((a) > (b)) ? (a) : (b)) +#define my_min(a,b) (((a) < (b)) ? (a) : (b)) + +/* COMP_OUT_BUF_SIZE is the size of the output buffer used during compression. + COMP_OUT_BUF_SIZE must be >= 1 and <= OUT_BUF_SIZE */ +#define COMP_OUT_BUF_SIZE COPY_BUFSIZE + +/* OUT_BUF_SIZE is the size of the output buffer used during decompression. + OUT_BUF_SIZE must be a power of 2 >= TINFL_LZ_DICT_SIZE (because the low-level decompressor not only writes, but reads from the output buffer as it decompresses) */ +#define OUT_BUF_SIZE COPY_BUFSIZE +static uint8 s_outbuf[OUT_BUF_SIZE]; +static uint8 s_checkbuf[OUT_BUF_SIZE]; + +/* tdefl_compressor contains all the state needed by the low-level compressor so it's a pretty big struct (~300k). + This example makes it a global vs. putting it on the stack, of course in real-world usage you'll probably malloc() or new it. */ +tdefl_compressor g_deflator; +tinfl_decompressor g_inflator; + +int deflate_level = 10; /* default compression level, can be changed via command line */ +#define USAGE_ARG_DEFLATE " [-defl<:compr_level>]" +#else /* MAKEFS_SUPPORT_DEFLATE */ +#define USAGE_ARG_DEFLATE "" +#endif /* MAKEFS_SUPPORT_DEFLATE */ + +#ifdef WIN32 + +#define GETCWD(path, len) GetCurrentDirectoryA(len, path) +#define CHDIR(path) SetCurrentDirectoryA(path) +#define CHDIR_SUCCEEDED(ret) (ret == TRUE) + +#elif __linux__ + +#define GETCWD(path, len) getcwd(path, len) +#define CHDIR(path) chdir(path) +#define CHDIR_SUCCEEDED(ret) (ret == 0) + +#else + +#error makefsdata not supported on this platform + +#endif + +#define NEWLINE "\r\n" +#define NEWLINE_LEN 2 + +/* define this to get the header variables we use to build HTTP headers */ +#define LWIP_HTTPD_DYNAMIC_HEADERS 1 +#define LWIP_HTTPD_SSI 1 +#include "lwip/init.h" +#include "../httpd_structs.h" +#include "lwip/apps/fs.h" + +#include "../core/inet_chksum.c" +#include "../core/def.c" + +/** (Your server name here) */ +const char *serverID = "Server: "HTTPD_SERVER_AGENT"\r\n"; +char serverIDBuffer[1024]; + +/* change this to suit your MEM_ALIGNMENT */ +#define PAYLOAD_ALIGNMENT 4 +/* set this to 0 to prevent aligning payload */ +#define ALIGN_PAYLOAD 1 +/* define this to a type that has the required alignment */ +#define PAYLOAD_ALIGN_TYPE "unsigned int" +static int payload_alingment_dummy_counter = 0; + +#define HEX_BYTES_PER_LINE 16 + +#define MAX_PATH_LEN 256 + +struct file_entry { + struct file_entry *next; + const char *filename_c; +}; + +int process_sub(FILE *data_file, FILE *struct_file); +int process_file(FILE *data_file, FILE *struct_file, const char *filename); +int file_write_http_header(FILE *data_file, const char *filename, int file_size, u16_t *http_hdr_len, + u16_t *http_hdr_chksum, u8_t provide_content_len, int is_compressed); +int file_put_ascii(FILE *file, const char *ascii_string, int len, int *i); +int s_put_ascii(char *buf, const char *ascii_string, int len, int *i); +void concat_files(const char *file1, const char *file2, const char *targetfile); +int check_path(char *path, size_t size); +static int checkSsiByFilelist(const char* filename_listfile); +static int ext_in_list(const char* filename, const char *ext_list); +static int file_to_exclude(const char* filename); +static int file_can_be_compressed(const char* filename); + +/* 5 bytes per char + 3 bytes per line */ +static char file_buffer_c[COPY_BUFSIZE * 5 + ((COPY_BUFSIZE / HEX_BYTES_PER_LINE) * 3)]; + +char curSubdir[MAX_PATH_LEN]; +char lastFileVar[MAX_PATH_LEN]; +char hdr_buf[4096]; + +unsigned char processSubs = 1; +unsigned char includeHttpHeader = 1; +unsigned char useHttp11 = 0; +unsigned char supportSsi = 1; +unsigned char precalcChksum = 0; +unsigned char includeLastModified = 0; +#if MAKEFS_SUPPORT_DEFLATE +unsigned char deflateNonSsiFiles = 0; +size_t deflatedBytesReduced = 0; +size_t overallDataBytes = 0; +#endif +const char *exclude_list = NULL; +const char *ncompress_list = NULL; + +struct file_entry *first_file = NULL; +struct file_entry *last_file = NULL; + +static char *ssi_file_buffer; +static char **ssi_file_lines; +static size_t ssi_file_num_lines; + +static void print_usage(void) +{ + printf(" Usage: htmlgen [targetdir] [-s] [-e] [-11] [-nossi] [-ssi:] [-c] [-f:] [-m] [-svr:] [-x:] [-xc:" USAGE_ARG_DEFLATE NEWLINE NEWLINE); + printf(" targetdir: relative or absolute path to files to convert" NEWLINE); + printf(" switch -s: toggle processing of subdirectories (default is on)" NEWLINE); + printf(" switch -e: exclude HTTP header from file (header is created at runtime, default is off)" NEWLINE); + printf(" switch -11: include HTTP 1.1 header (1.0 is default)" NEWLINE); + printf(" switch -nossi: no support for SSI (cannot calculate Content-Length for SSI)" NEWLINE); + printf(" switch -ssi: ssi filename (ssi support controlled by file list, not by extension)" NEWLINE); + printf(" switch -c: precalculate checksums for all pages (default is off)" NEWLINE); + printf(" switch -f: target filename (default is \"fsdata.c\")" NEWLINE); + printf(" switch -m: include \"Last-Modified\" header based on file time" NEWLINE); + printf(" switch -svr: server identifier sent in HTTP response header ('Server' field)" NEWLINE); + printf(" switch -x: comma separated list of extensions of files to exclude (e.g., -x:json,txt)" NEWLINE); + printf(" switch -xc: comma separated list of extensions of files to not compress (e.g., -xc:mp3,jpg)" NEWLINE); +#if MAKEFS_SUPPORT_DEFLATE + printf(" switch -defl: deflate-compress all non-SSI files (with opt. compr.-level, default=10)" NEWLINE); + printf(" ATTENTION: browser has to support \"Content-Encoding: deflate\"!" NEWLINE); +#endif + printf(" if targetdir not specified, htmlgen will attempt to" NEWLINE); + printf(" process files in subdirectory 'fs'" NEWLINE); +} + +int main(int argc, char *argv[]) +{ + char path[MAX_PATH_LEN]; + char appPath[MAX_PATH_LEN]; + FILE *data_file; + FILE *struct_file; + int filesProcessed; + int i; + char targetfile[MAX_PATH_LEN]; + strcpy(targetfile, "fsdata.c"); + + memset(path, 0, sizeof(path)); + memset(appPath, 0, sizeof(appPath)); + + printf(NEWLINE " makefsdata - HTML to C source converter" NEWLINE); + printf(" by Jim Pettinato - circa 2003 " NEWLINE); + printf(" extended by Simon Goldschmidt - 2009 " NEWLINE NEWLINE); + + LWIP_ASSERT("sizeof(hdr_buf) must fit into an u16_t", sizeof(hdr_buf) <= 0xffff); + + strcpy(path, "fs"); + for (i = 1; i < argc; i++) { + if (argv[i] == NULL) { + continue; + } + if (argv[i][0] == '-') { + if (strstr(argv[i], "-svr:") == argv[i]) { + snprintf(serverIDBuffer, sizeof(serverIDBuffer), "Server: %s\r\n", &argv[i][5]); + serverID = serverIDBuffer; + printf("Using Server-ID: \"%s\"\n", serverID); + } else if (!strcmp(argv[i], "-s")) { + processSubs = 0; + } else if (!strcmp(argv[i], "-e")) { + includeHttpHeader = 0; + } else if (!strcmp(argv[i], "-11")) { + useHttp11 = 1; + } else if (!strcmp(argv[i], "-nossi")) { + supportSsi = 0; + } else if (strstr(argv[i], "-ssi:") == argv[i]) { + const char* ssi_list_filename = &argv[i][5]; + if (checkSsiByFilelist(ssi_list_filename)) { + printf("Reading list of SSI files from \"%s\"\n", ssi_list_filename); + } else { + printf("Failed to load list of SSI files from \"%s\"\n", ssi_list_filename); + } + } else if (!strcmp(argv[i], "-c")) { + precalcChksum = 1; + } else if (strstr(argv[i], "-f:") == argv[i]) { + strncpy(targetfile, &argv[i][3], sizeof(targetfile) - 1); + targetfile[sizeof(targetfile) - 1] = 0; + printf("Writing to file \"%s\"\n", targetfile); + } else if (!strcmp(argv[i], "-m")) { + includeLastModified = 1; + } else if (!strcmp(argv[i], "-defl")) { +#if MAKEFS_SUPPORT_DEFLATE + char *colon = strstr(argv[i], ":"); + if (colon) { + if (colon[1] != 0) { + int defl_level = atoi(&colon[1]); + if ((defl_level >= 0) && (defl_level <= 10)) { + deflate_level = defl_level; + } else { + printf("ERROR: deflate level must be [0..10]" NEWLINE); + exit(0); + } + } + } + deflateNonSsiFiles = 1; + printf("Deflating all non-SSI files with level %d (but only if size is reduced)" NEWLINE, deflate_level); +#else + printf("WARNING: Deflate support is disabled\n"); +#endif + } else if (strstr(argv[i], "-x:") == argv[i]) { + exclude_list = &argv[i][3]; + printf("Excluding files with extensions %s" NEWLINE, exclude_list); + } else if (strstr(argv[i], "-xc:") == argv[i]) { + ncompress_list = &argv[i][4]; + printf("Skipping compresion for files with extensions %s" NEWLINE, ncompress_list); + } else if ((strstr(argv[i], "-?")) || (strstr(argv[i], "-h"))) { + print_usage(); + exit(0); + } + } else if ((argv[i][0] == '/') && (argv[i][1] == '?') && (argv[i][2] == 0)) { + print_usage(); + exit(0); + } else { + strncpy(path, argv[i], sizeof(path) - 1); + path[sizeof(path) - 1] = 0; + } + } + + if (!check_path(path, sizeof(path))) { + printf("Invalid path: \"%s\"." NEWLINE, path); + exit(-1); + } + + GETCWD(appPath, MAX_PATH_LEN); + /* if command line param or subdir named 'fs' not found spout usage verbiage */ + if (!CHDIR_SUCCEEDED(CHDIR(path))) { + /* if no subdir named 'fs' (or the one which was given) exists, spout usage verbiage */ + printf(" Failed to open directory \"%s\"." NEWLINE NEWLINE, path); + print_usage(); + exit(-1); + } + CHDIR(appPath); + + printf("HTTP %sheader will %s statically included." NEWLINE, + (includeHttpHeader ? (useHttp11 ? "1.1 " : "1.0 ") : ""), + (includeHttpHeader ? "be" : "not be")); + + curSubdir[0] = '\0'; /* start off in web page's root directory - relative paths */ + printf(" Processing all files in directory %s", path); + if (processSubs) { + printf(" and subdirectories..." NEWLINE NEWLINE); + } else { + printf("..." NEWLINE NEWLINE); + } + + data_file = fopen("fsdata.tmp", "wb"); + if (data_file == NULL) { + printf("Failed to create file \"fsdata.tmp\"\n"); + exit(-1); + } + struct_file = fopen("fshdr.tmp", "wb"); + if (struct_file == NULL) { + printf("Failed to create file \"fshdr.tmp\"\n"); + fclose(data_file); + exit(-1); + } + + CHDIR(path); + + fprintf(data_file, "#include \"lwip/apps/fs.h\"" NEWLINE); + fprintf(data_file, "#include \"lwip/def.h\"" NEWLINE NEWLINE NEWLINE); + + fprintf(data_file, "#define file_NULL (struct fsdata_file *) NULL" NEWLINE NEWLINE NEWLINE); + /* define FS_FILE_FLAGS_HEADER_INCLUDED to 1 if not defined (compatibility with older httpd/fs) */ + fprintf(data_file, "#ifndef FS_FILE_FLAGS_HEADER_INCLUDED" NEWLINE "#define FS_FILE_FLAGS_HEADER_INCLUDED 1" NEWLINE "#endif" NEWLINE); + /* define FS_FILE_FLAGS_HEADER_PERSISTENT to 0 if not defined (compatibility with older httpd/fs: wasn't supported back then) */ + fprintf(data_file, "#ifndef FS_FILE_FLAGS_HEADER_PERSISTENT" NEWLINE "#define FS_FILE_FLAGS_HEADER_PERSISTENT 0" NEWLINE "#endif" NEWLINE); + + /* define alignment defines */ +#if ALIGN_PAYLOAD + fprintf(data_file, "/* FSDATA_FILE_ALIGNMENT: 0=off, 1=by variable, 2=by include */" NEWLINE "#ifndef FSDATA_FILE_ALIGNMENT" NEWLINE "#define FSDATA_FILE_ALIGNMENT 0" NEWLINE "#endif" NEWLINE); +#endif + fprintf(data_file, "#ifndef FSDATA_ALIGN_PRE" NEWLINE "#define FSDATA_ALIGN_PRE" NEWLINE "#endif" NEWLINE); + fprintf(data_file, "#ifndef FSDATA_ALIGN_POST" NEWLINE "#define FSDATA_ALIGN_POST" NEWLINE "#endif" NEWLINE); +#if ALIGN_PAYLOAD + fprintf(data_file, "#if FSDATA_FILE_ALIGNMENT==2" NEWLINE "#include \"fsdata_alignment.h\"" NEWLINE "#endif" NEWLINE); +#endif + + sprintf(lastFileVar, "NULL"); + + filesProcessed = process_sub(data_file, struct_file); + + /* data_file now contains all of the raw data.. now append linked list of + * file header structs to allow embedded app to search for a file name */ + fprintf(data_file, NEWLINE NEWLINE); + fprintf(struct_file, "#define FS_ROOT file_%s" NEWLINE, lastFileVar); + fprintf(struct_file, "#define FS_NUMFILES %d" NEWLINE NEWLINE, filesProcessed); + + fclose(data_file); + fclose(struct_file); + + CHDIR(appPath); + /* append struct_file to data_file */ + printf(NEWLINE "Creating target file..." NEWLINE NEWLINE); + concat_files("fsdata.tmp", "fshdr.tmp", targetfile); + + /* if succeeded, delete the temporary files */ + if (remove("fsdata.tmp") != 0) { + printf("Warning: failed to delete fsdata.tmp\n"); + } + if (remove("fshdr.tmp") != 0) { + printf("Warning: failed to delete fshdr.tmp\n"); + } + + printf(NEWLINE "Processed %d files - done." NEWLINE, filesProcessed); +#if MAKEFS_SUPPORT_DEFLATE + if (deflateNonSsiFiles) { + printf("(Deflated total byte reduction: %d bytes -> %d bytes (%.02f%%)" NEWLINE, + (int)overallDataBytes, (int)deflatedBytesReduced, (float)((deflatedBytesReduced * 100.0) / overallDataBytes)); + } +#endif + printf(NEWLINE); + + while (first_file != NULL) { + struct file_entry *fe = first_file; + first_file = fe->next; + free(fe); + } + + if (ssi_file_buffer) { + free(ssi_file_buffer); + } + if (ssi_file_lines) { + free(ssi_file_lines); + } + + return 0; +} + +int check_path(char *path, size_t size) +{ + size_t slen; + if (path[0] == 0) { + /* empty */ + return 0; + } + slen = strlen(path); + if (slen >= size) { + /* not NULL-terminated */ + return 0; + } + while ((slen > 0) && ((path[slen] == '\\') || (path[slen] == '/'))) { + /* path should not end with trailing backslash */ + path[slen] = 0; + slen--; + } + if (slen == 0) { + return 0; + } + return 1; +} + +static void copy_file(const char *filename_in, FILE *fout) +{ + FILE *fin; + size_t len; + void *buf; + fin = fopen(filename_in, "rb"); + if (fin == NULL) { + printf("Failed to open file \"%s\"\n", filename_in); + exit(-1); + } + buf = malloc(COPY_BUFSIZE); + while ((len = fread(buf, 1, COPY_BUFSIZE, fin)) > 0) { + fwrite(buf, 1, len, fout); + } + free(buf); + fclose(fin); +} + +void concat_files(const char *file1, const char *file2, const char *targetfile) +{ + FILE *fout; + fout = fopen(targetfile, "wb"); + if (fout == NULL) { + printf("Failed to open file \"%s\"\n", targetfile); + exit(-1); + } + copy_file(file1, fout); + copy_file(file2, fout); + fclose(fout); +} + +int process_sub(FILE *data_file, FILE *struct_file) +{ + tinydir_dir dir; + int filesProcessed = 0; + + if (processSubs) { + /* process subs recursively */ + size_t sublen = strlen(curSubdir); + size_t freelen = sizeof(curSubdir) - sublen - 1; + int ret; + LWIP_ASSERT("sublen < sizeof(curSubdir)", sublen < sizeof(curSubdir)); + + ret = tinydir_open_sorted(&dir, TINYDIR_STRING(".")); + + if (ret == 0) { + unsigned int i; + for (i = 0; i < dir.n_files; i++) { + tinydir_file file; + + ret = tinydir_readfile_n(&dir, &file, i); + + if (ret == 0) { +#if (defined _MSC_VER || defined __MINGW32__) && (defined _UNICODE) + size_t num_char_converted; + char currName[256]; + wcstombs_s(&num_char_converted, currName, sizeof(currName), file.name, sizeof(currName)); +#else + const char *currName = file.name; +#endif + + if (currName[0] == '.') { + continue; + } + if (!file.is_dir) { + continue; + } + if (freelen > 0) { + CHDIR(currName); + strncat(curSubdir, "/", freelen); + strncat(curSubdir, currName, freelen - 1); + curSubdir[sizeof(curSubdir) - 1] = 0; + printf("processing subdirectory %s/..." NEWLINE, curSubdir); + filesProcessed += process_sub(data_file, struct_file); + CHDIR(".."); + curSubdir[sublen] = 0; + } else { + printf("WARNING: cannot process sub due to path length restrictions: \"%s/%s\"\n", curSubdir, currName); + } + } + } + } + + ret = tinydir_open_sorted(&dir, TINYDIR_STRING(".")); + if (ret == 0) { + unsigned int i; + for (i = 0; i < dir.n_files; i++) { + tinydir_file file; + + ret = tinydir_readfile_n(&dir, &file, i); + + if (ret == 0) { + if (!file.is_dir) { +#if (defined _MSC_VER || defined __MINGW32__) && (defined _UNICODE) + size_t num_char_converted; + char curName[256]; + wcstombs_s(&num_char_converted, curName, sizeof(curName), file.name, sizeof(curName)); +#else + const char *curName = file.name; +#endif + + if (strcmp(curName, "fsdata.tmp") == 0) { + continue; + } + if (strcmp(curName, "fshdr.tmp") == 0) { + continue; + } + if (file_to_exclude(curName)) { + printf("skipping %s/%s by exclude list (-x option)..." NEWLINE, curSubdir, curName); + continue; + } + + printf("processing %s/%s..." NEWLINE, curSubdir, curName); + + if (process_file(data_file, struct_file, curName) < 0) { + printf(NEWLINE "Error... aborting" NEWLINE); + return -1; + } + filesProcessed++; + } + } + } + } + } + + return filesProcessed; +} + +static u8_t *get_file_data(const char *filename, int *file_size, int can_be_compressed, int *is_compressed) +{ + FILE *inFile; + size_t fsize = 0; + u8_t *buf; + size_t r; + int rs; + LWIP_UNUSED_ARG(r); /* for LWIP_NOASSERT */ + inFile = fopen(filename, "rb"); + if (inFile == NULL) { + printf("Failed to open file \"%s\"\n", filename); + exit(-1); + } + fseek(inFile, 0, SEEK_END); + rs = ftell(inFile); + if (rs < 0) { + printf("ftell failed with %d\n", errno); + exit(-1); + } + fsize = (size_t)rs; + fseek(inFile, 0, SEEK_SET); + buf = (u8_t *)malloc(fsize); + LWIP_ASSERT("buf != NULL", buf != NULL); + r = fread(buf, 1, fsize, inFile); + LWIP_ASSERT("r == fsize", r == fsize); + *file_size = fsize; + *is_compressed = 0; +#if MAKEFS_SUPPORT_DEFLATE + overallDataBytes += fsize; + if (deflateNonSsiFiles) { + if (can_be_compressed) { + if (fsize < OUT_BUF_SIZE) { + u8_t *ret_buf; + tdefl_status status; + size_t in_bytes = fsize; + size_t out_bytes = OUT_BUF_SIZE; + const void *next_in = buf; + void *next_out = s_outbuf; + /* create tdefl() compatible flags (we have to compose the low-level flags ourselves, or use tdefl_create_comp_flags_from_zip_params() but that means MINIZ_NO_ZLIB_APIS can't be defined). */ + mz_uint comp_flags = s_tdefl_num_probes[MZ_MIN(10, deflate_level)] | ((deflate_level <= 3) ? TDEFL_GREEDY_PARSING_FLAG : 0); + if (!deflate_level) { + comp_flags |= TDEFL_FORCE_ALL_RAW_BLOCKS; + } + status = tdefl_init(&g_deflator, NULL, NULL, comp_flags); + if (status != TDEFL_STATUS_OKAY) { + printf("tdefl_init() failed!\n"); + exit(-1); + } + memset(s_outbuf, 0, sizeof(s_outbuf)); + status = tdefl_compress(&g_deflator, next_in, &in_bytes, next_out, &out_bytes, TDEFL_FINISH); + if (status != TDEFL_STATUS_DONE) { + printf("deflate failed: %d\n", status); + exit(-1); + } + LWIP_ASSERT("out_bytes <= COPY_BUFSIZE", out_bytes <= OUT_BUF_SIZE); + if (out_bytes < fsize) { + ret_buf = (u8_t *)malloc(out_bytes); + LWIP_ASSERT("ret_buf != NULL", ret_buf != NULL); + memcpy(ret_buf, s_outbuf, out_bytes); + { + /* sanity-check compression be inflating and comparing to the original */ + tinfl_status dec_status; + tinfl_decompressor inflator; + size_t dec_in_bytes = out_bytes; + size_t dec_out_bytes = OUT_BUF_SIZE; + next_out = s_checkbuf; + + tinfl_init(&inflator); + memset(s_checkbuf, 0, sizeof(s_checkbuf)); + dec_status = tinfl_decompress(&inflator, (const mz_uint8 *)ret_buf, &dec_in_bytes, s_checkbuf, (mz_uint8 *)next_out, &dec_out_bytes, 0); + LWIP_ASSERT("tinfl_decompress failed", dec_status == TINFL_STATUS_DONE); + LWIP_ASSERT("tinfl_decompress size mismatch", fsize == dec_out_bytes); + LWIP_ASSERT("decompressed memcmp failed", !memcmp(s_checkbuf, buf, fsize)); + } + /* free original buffer, use compressed data + size */ + free(buf); + buf = ret_buf; + *file_size = out_bytes; + printf(" - deflate: %d bytes -> %d bytes (%.02f%%)" NEWLINE, (int)fsize, (int)out_bytes, (float)((out_bytes * 100.0) / fsize)); + deflatedBytesReduced += (size_t)(fsize - out_bytes); + *is_compressed = 1; + } else { + printf(" - uncompressed: (would be %d bytes larger using deflate)" NEWLINE, (int)(out_bytes - fsize)); + } + } else { + printf(" - uncompressed: (file is larger than deflate bufer)" NEWLINE); + } + } else { + printf(" - cannot be compressed" NEWLINE); + } + } +#else + LWIP_UNUSED_ARG(can_be_compressed); +#endif + fclose(inFile); + return buf; +} + +static void process_file_data(FILE *data_file, u8_t *file_data, size_t file_size) +{ + size_t written, i, src_off = 0; + size_t off = 0; + LWIP_UNUSED_ARG(written); /* for LWIP_NOASSERT */ + for (i = 0; i < file_size; i++) { + LWIP_ASSERT("file_buffer_c overflow", off < sizeof(file_buffer_c) - 5); + sprintf(&file_buffer_c[off], "0x%02x,", file_data[i]); + off += 5; + if ((++src_off % HEX_BYTES_PER_LINE) == 0) { + LWIP_ASSERT("file_buffer_c overflow", off < sizeof(file_buffer_c) - NEWLINE_LEN); + memcpy(&file_buffer_c[off], NEWLINE, NEWLINE_LEN); + off += NEWLINE_LEN; + } + if (off + 20 >= sizeof(file_buffer_c)) { + written = fwrite(file_buffer_c, 1, off, data_file); + LWIP_ASSERT("written == off", written == off); + off = 0; + } + } + written = fwrite(file_buffer_c, 1, off, data_file); + LWIP_ASSERT("written == off", written == off); +} + +static int write_checksums(FILE *struct_file, const char *varname, + u16_t hdr_len, u16_t hdr_chksum, const u8_t *file_data, size_t file_size) +{ + int chunk_size = TCP_MSS; + int offset, src_offset; + size_t len; + int i = 0; +#if LWIP_TCP_TIMESTAMPS + /* when timestamps are used, usable space is 12 bytes less per segment */ + chunk_size -= 12; +#endif + + fprintf(struct_file, "#if HTTPD_PRECALCULATED_CHECKSUM" NEWLINE); + fprintf(struct_file, "const struct fsdata_chksum chksums_%s[] = {" NEWLINE, varname); + + if (hdr_len > 0) { + /* add checksum for HTTP header */ + fprintf(struct_file, "{%d, 0x%04x, %d}," NEWLINE, 0, hdr_chksum, hdr_len); + i++; + } + src_offset = 0; + for (offset = hdr_len; ; offset += len) { + unsigned short chksum; + const void *data = (const void *)&file_data[src_offset]; + len = LWIP_MIN(chunk_size, (int)file_size - src_offset); + if (len == 0) { + break; + } + chksum = ~inet_chksum(data, (u16_t)len); + /* add checksum for data */ + fprintf(struct_file, "{%d, 0x%04x, %"SZT_F"}," NEWLINE, offset, chksum, len); + i++; + } + fprintf(struct_file, "};" NEWLINE); + fprintf(struct_file, "#endif /* HTTPD_PRECALCULATED_CHECKSUM */" NEWLINE); + return i; +} + +static int is_valid_char_for_c_var(char x) +{ + if (((x >= 'A') && (x <= 'Z')) || + ((x >= 'a') && (x <= 'z')) || + ((x >= '0') && (x <= '9')) || + (x == '_')) { + return 1; + } + return 0; +} + +static void fix_filename_for_c(char *qualifiedName, size_t max_len) +{ + struct file_entry *f; + size_t len = strlen(qualifiedName); + char *new_name = (char *)malloc(len + 2); + int filename_ok; + int cnt = 0; + size_t i; + if (len + 3 == max_len) { + printf("File name too long: \"%s\"\n", qualifiedName); + exit(-1); + } + strcpy(new_name, qualifiedName); + for (i = 0; i < len; i++) { + if (!is_valid_char_for_c_var(new_name[i])) { + new_name[i] = '_'; + } + } + do { + filename_ok = 1; + for (f = first_file; f != NULL; f = f->next) { + if (!strcmp(f->filename_c, new_name)) { + filename_ok = 0; + cnt++; + /* try next unique file name */ + sprintf(&new_name[len], "%d", cnt); + break; + } + } + } while (!filename_ok && (cnt < 999)); + if (!filename_ok) { + printf("Failed to get unique file name: \"%s\"\n", qualifiedName); + exit(-1); + } + strcpy(qualifiedName, new_name); + free(new_name); +} + +static void register_filename(const char *qualifiedName) +{ + struct file_entry *fe = (struct file_entry *)malloc(sizeof(struct file_entry)); + fe->filename_c = strdup(qualifiedName); + fe->next = NULL; + if (first_file == NULL) { + first_file = last_file = fe; + } else { + last_file->next = fe; + last_file = fe; + } +} + +static int checkSsiByFilelist(const char* filename_listfile) +{ + FILE *f = fopen(filename_listfile, "r"); + if (f != NULL) { + char *buf; + long rs; + size_t fsize, readcount; + size_t i, l, num_lines; + char **lines; + int state; + + fseek(f, 0, SEEK_END); + rs = ftell(f); + if (rs < 0) { + printf("ftell failed with %d\n", errno); + fclose(f); + return 0; + } + fsize = (size_t)rs; + fseek(f, 0, SEEK_SET); + buf = (char*)malloc(fsize); + if (!buf) { + printf("failed to allocate ssi file buffer\n"); + fclose(f); + return 0; + } + memset(buf, 0, fsize); + readcount = fread(buf, 1, fsize, f); + fclose(f); + if ((readcount > fsize) || !readcount) { + printf("failed to read data from ssi file\n"); + free(buf); + return 0; + } + + /* first pass: get the number of lines (and convert newlines to '0') */ + num_lines = 1; + for (i = 0; i < readcount; i++) { + if (buf[i] == '\n') { + num_lines++; + buf[i] = 0; + } else if (buf[i] == '\r') { + buf[i] = 0; + } + } + /* allocate the line pointer array */ + lines = (char**)malloc(sizeof(char*) * num_lines); + if (!lines) { + printf("failed to allocate ssi line buffer\n"); + free(buf); + return 0; + } + memset(lines, 0, sizeof(char*) * num_lines); + l = 0; + state = 0; + for (i = 0; i < readcount; i++) { + if (state) { + /* waiting for null */ + if (buf[i] == 0) { + state = 0; + } + } else { + /* waiting for beginning of new string */ + if (buf[i] != 0) { + LWIP_ASSERT("lines array overflow", l < num_lines); + lines[l] = &buf[i]; + state = 1; + l++; + } + } + } + LWIP_ASSERT("lines array overflow", l < num_lines); + + ssi_file_buffer = buf; + ssi_file_lines = lines; + ssi_file_num_lines = l; + } + return 0; +} + +static int is_ssi_file(const char *filename) +{ + if (supportSsi) { + if (ssi_file_buffer) { + /* compare by list */ + size_t i; + int ret = 0; + /* build up the relative path to this file */ + size_t sublen = strlen(curSubdir); + size_t freelen = sizeof(curSubdir) - sublen - 1; + strncat(curSubdir, "/", freelen); + strncat(curSubdir, filename, freelen - 1); + curSubdir[sizeof(curSubdir) - 1] = 0; + for (i = 0; i < ssi_file_num_lines; i++) { + const char *listed_file = ssi_file_lines[i]; + /* compare without the leading '/' */ + if (!strcmp(&curSubdir[1], listed_file)) { + ret = 1; + } + } + curSubdir[sublen] = 0; + return ret; + } else { + /* check file extension */ + size_t loop; + for (loop = 0; loop < NUM_SHTML_EXTENSIONS; loop++) { + if (strstr(filename, g_pcSSIExtensions[loop])) { + return 1; + } + } + } + } + return 0; +} + +static int ext_in_list(const char* filename, const char *ext_list) +{ + int found = 0; + const char *ext = ext_list; + if (ext_list == NULL) { + return 0; + } + while(*ext != '\0') { + const char *comma = strchr(ext, ','); + size_t ext_size; + size_t filename_size = strlen(filename); + if (comma == NULL) { + comma = strchr(ext, '\0'); + } + ext_size = comma - ext; + if ((filename[filename_size - ext_size - 1] == '.') && + !strncmp(&filename[filename_size - ext_size], ext, ext_size)) { + found = 1; + break; + } + ext = comma + 1; + } + + return found; +} + +static int file_to_exclude(const char *filename) +{ + return (exclude_list != NULL) && ext_in_list(filename, exclude_list); +} + +static int file_can_be_compressed(const char *filename) +{ + return (ncompress_list == NULL) || !ext_in_list(filename, ncompress_list); +} + +int process_file(FILE *data_file, FILE *struct_file, const char *filename) +{ + char varname[MAX_PATH_LEN]; + int i = 0; + char qualifiedName[MAX_PATH_LEN]; + int file_size; + u16_t http_hdr_chksum = 0; + u16_t http_hdr_len = 0; + int chksum_count = 0; + u8_t flags = 0; + u8_t has_content_len; + u8_t *file_data; + int is_ssi; + int can_be_compressed; + int is_compressed = 0; + int flags_printed; + + /* create qualified name (@todo: prepend slash or not?) */ + sprintf(qualifiedName, "%s/%s", curSubdir, filename); + /* create C variable name */ + strcpy(varname, qualifiedName); + /* convert slashes & dots to underscores */ + fix_filename_for_c(varname, MAX_PATH_LEN); + register_filename(varname); +#if ALIGN_PAYLOAD + /* to force even alignment of array, type 1 */ + fprintf(data_file, "#if FSDATA_FILE_ALIGNMENT==1" NEWLINE); + fprintf(data_file, "static const " PAYLOAD_ALIGN_TYPE " dummy_align_%s = %d;" NEWLINE, varname, payload_alingment_dummy_counter++); + fprintf(data_file, "#endif" NEWLINE); +#endif /* ALIGN_PAYLOAD */ + fprintf(data_file, "static const unsigned char FSDATA_ALIGN_PRE data_%s[] FSDATA_ALIGN_POST = {" NEWLINE, varname); + /* encode source file name (used by file system, not returned to browser) */ + fprintf(data_file, "/* %s (%"SZT_F" chars) */" NEWLINE, qualifiedName, strlen(qualifiedName) + 1); + file_put_ascii(data_file, qualifiedName, strlen(qualifiedName) + 1, &i); +#if ALIGN_PAYLOAD + /* pad to even number of bytes to assure payload is on aligned boundary */ + while (i % PAYLOAD_ALIGNMENT != 0) { + fprintf(data_file, "0x%02x,", 0); + i++; + } +#endif /* ALIGN_PAYLOAD */ + fprintf(data_file, NEWLINE); + + is_ssi = is_ssi_file(filename); + if (is_ssi) { + flags |= FS_FILE_FLAGS_SSI; + } + has_content_len = !is_ssi; + can_be_compressed = includeHttpHeader && !is_ssi && file_can_be_compressed(filename); + file_data = get_file_data(filename, &file_size, can_be_compressed, &is_compressed); + if (includeHttpHeader) { + file_write_http_header(data_file, filename, file_size, &http_hdr_len, &http_hdr_chksum, has_content_len, is_compressed); + flags |= FS_FILE_FLAGS_HEADER_INCLUDED; + if (has_content_len) { + flags |= FS_FILE_FLAGS_HEADER_PERSISTENT; + if (useHttp11) { + flags |= FS_FILE_FLAGS_HEADER_HTTPVER_1_1; + } + } + } + if (precalcChksum) { + chksum_count = write_checksums(struct_file, varname, http_hdr_len, http_hdr_chksum, file_data, file_size); + } + + /* build declaration of struct fsdata_file in temp file */ + fprintf(struct_file, "const struct fsdata_file file_%s[] = { {" NEWLINE, varname); + fprintf(struct_file, "file_%s," NEWLINE, lastFileVar); + fprintf(struct_file, "data_%s," NEWLINE, varname); + fprintf(struct_file, "data_%s + %d," NEWLINE, varname, i); + fprintf(struct_file, "sizeof(data_%s) - %d," NEWLINE, varname, i); + + flags_printed = 0; + if (flags & FS_FILE_FLAGS_HEADER_INCLUDED) { + fputs("FS_FILE_FLAGS_HEADER_INCLUDED", struct_file); + flags_printed = 1; + } + if (flags & FS_FILE_FLAGS_HEADER_PERSISTENT) { + if (flags_printed) { + fputs(" | ", struct_file); + } + fputs("FS_FILE_FLAGS_HEADER_PERSISTENT", struct_file); + flags_printed = 1; + } + if (flags & FS_FILE_FLAGS_HEADER_HTTPVER_1_1) { + if (flags_printed) { + fputs(" | ", struct_file); + } + fputs("FS_FILE_FLAGS_HEADER_HTTPVER_1_1", struct_file); + flags_printed = 1; + } + if (flags & FS_FILE_FLAGS_SSI) { + if (flags_printed) { + fputs(" | ", struct_file); + } + fputs("FS_FILE_FLAGS_SSI", struct_file); + flags_printed = 1; + } + if (!flags_printed) { + fputs("0", struct_file); + } + fputs("," NEWLINE, struct_file); + if (precalcChksum) { + fprintf(struct_file, "#if HTTPD_PRECALCULATED_CHECKSUM" NEWLINE); + fprintf(struct_file, "%d, chksums_%s," NEWLINE, chksum_count, varname); + fprintf(struct_file, "#endif /* HTTPD_PRECALCULATED_CHECKSUM */" NEWLINE); + } + fprintf(struct_file, "}};" NEWLINE NEWLINE); + strcpy(lastFileVar, varname); + + /* write actual file contents */ + i = 0; + fprintf(data_file, NEWLINE "/* raw file data (%d bytes) */" NEWLINE, file_size); + process_file_data(data_file, file_data, file_size); + fprintf(data_file, "};" NEWLINE NEWLINE); + free(file_data); + return 0; +} + +int file_write_http_header(FILE *data_file, const char *filename, int file_size, u16_t *http_hdr_len, + u16_t *http_hdr_chksum, u8_t provide_content_len, int is_compressed) +{ + int i = 0; + int response_type = HTTP_HDR_OK; + const char *file_type; + const char *cur_string; + size_t cur_len; + int written = 0; + size_t hdr_len = 0; + u16_t acc; + const char *file_ext; + size_t j; + u8_t provide_last_modified = includeLastModified; + + memset(hdr_buf, 0, sizeof(hdr_buf)); + + if (useHttp11) { + response_type = HTTP_HDR_OK_11; + } + + fprintf(data_file, NEWLINE "/* HTTP header */"); + if (strstr(filename, "404") == filename) { + response_type = HTTP_HDR_NOT_FOUND; + if (useHttp11) { + response_type = HTTP_HDR_NOT_FOUND_11; + } + } else if (strstr(filename, "400") == filename) { + response_type = HTTP_HDR_BAD_REQUEST; + if (useHttp11) { + response_type = HTTP_HDR_BAD_REQUEST_11; + } + } else if (strstr(filename, "501") == filename) { + response_type = HTTP_HDR_NOT_IMPL; + if (useHttp11) { + response_type = HTTP_HDR_NOT_IMPL_11; + } + } + cur_string = g_psHTTPHeaderStrings[response_type]; + cur_len = strlen(cur_string); + fprintf(data_file, NEWLINE "/* \"%s\" (%"SZT_F" bytes) */" NEWLINE, cur_string, cur_len); + written += file_put_ascii(data_file, cur_string, cur_len, &i); + i = 0; + if (precalcChksum) { + memcpy(&hdr_buf[hdr_len], cur_string, cur_len); + hdr_len += cur_len; + } + + cur_string = serverID; + cur_len = strlen(cur_string); + fprintf(data_file, NEWLINE "/* \"%s\" (%"SZT_F" bytes) */" NEWLINE, cur_string, cur_len); + written += file_put_ascii(data_file, cur_string, cur_len, &i); + i = 0; + if (precalcChksum) { + memcpy(&hdr_buf[hdr_len], cur_string, cur_len); + hdr_len += cur_len; + } + + file_ext = filename; + if (file_ext != NULL) { + while (strstr(file_ext, ".") != NULL) { + file_ext = strstr(file_ext, "."); + file_ext++; + } + } + if ((file_ext == NULL) || (*file_ext == 0)) { + printf("failed to get extension for file \"%s\", using default.\n", filename); + file_type = HTTP_HDR_DEFAULT_TYPE; + } else { + file_type = NULL; + for (j = 0; j < NUM_HTTP_HEADERS; j++) { + if (!strcmp(file_ext, g_psHTTPHeaders[j].extension)) { + file_type = g_psHTTPHeaders[j].content_type; + break; + } + } + if (file_type == NULL) { + printf("failed to get file type for extension \"%s\", using default.\n", file_ext); + file_type = HTTP_HDR_DEFAULT_TYPE; + } + } + + /* Content-Length is used for persistent connections in HTTP/1.1 but also for + download progress in older versions + @todo: just use a big-enough buffer and let the HTTPD send spaces? */ + if (provide_content_len) { + char intbuf[MAX_PATH_LEN]; + int content_len = file_size; + memset(intbuf, 0, sizeof(intbuf)); + cur_string = g_psHTTPHeaderStrings[HTTP_HDR_CONTENT_LENGTH]; + cur_len = strlen(cur_string); + fprintf(data_file, NEWLINE "/* \"%s%d\r\n\" (%"SZT_F"+ bytes) */" NEWLINE, cur_string, content_len, cur_len + 2); + written += file_put_ascii(data_file, cur_string, cur_len, &i); + if (precalcChksum) { + memcpy(&hdr_buf[hdr_len], cur_string, cur_len); + hdr_len += cur_len; + } + + lwip_itoa(intbuf, sizeof(intbuf), content_len); + strcat(intbuf, "\r\n"); + cur_len = strlen(intbuf); + written += file_put_ascii(data_file, intbuf, cur_len, &i); + i = 0; + if (precalcChksum) { + memcpy(&hdr_buf[hdr_len], intbuf, cur_len); + hdr_len += cur_len; + } + } + if (provide_last_modified) { + char modbuf[256]; + struct stat stat_data; + struct tm *t; + memset(modbuf, 0, sizeof(modbuf)); + memset(&stat_data, 0, sizeof(stat_data)); + cur_string = modbuf; + strcpy(modbuf, "Last-Modified: "); + if (stat(filename, &stat_data) != 0) { + printf("stat(%s) failed with error %d\n", filename, errno); + exit(-1); + } + t = gmtime(&stat_data.st_mtime); + if (t == NULL) { + printf("gmtime() failed with error %d\n", errno); + exit(-1); + } + strftime(&modbuf[15], sizeof(modbuf) - 15, "%a, %d %b %Y %H:%M:%S GMT", t); + cur_len = strlen(cur_string); + fprintf(data_file, NEWLINE "/* \"%s\"\r\n\" (%"SZT_F"+ bytes) */" NEWLINE, cur_string, cur_len + 2); + written += file_put_ascii(data_file, cur_string, cur_len, &i); + if (precalcChksum) { + memcpy(&hdr_buf[hdr_len], cur_string, cur_len); + hdr_len += cur_len; + } + + modbuf[0] = 0; + strcat(modbuf, "\r\n"); + cur_len = strlen(modbuf); + written += file_put_ascii(data_file, modbuf, cur_len, &i); + i = 0; + if (precalcChksum) { + memcpy(&hdr_buf[hdr_len], modbuf, cur_len); + hdr_len += cur_len; + } + } + + /* HTTP/1.1 implements persistent connections */ + if (useHttp11) { + if (provide_content_len) { + cur_string = g_psHTTPHeaderStrings[HTTP_HDR_CONN_KEEPALIVE]; + } else { + /* no Content-Length available, so a persistent connection is no possible + because the client does not know the data length */ + cur_string = g_psHTTPHeaderStrings[HTTP_HDR_CONN_CLOSE]; + } + cur_len = strlen(cur_string); + fprintf(data_file, NEWLINE "/* \"%s\" (%"SZT_F" bytes) */" NEWLINE, cur_string, cur_len); + written += file_put_ascii(data_file, cur_string, cur_len, &i); + i = 0; + if (precalcChksum) { + memcpy(&hdr_buf[hdr_len], cur_string, cur_len); + hdr_len += cur_len; + } + } + +#if MAKEFS_SUPPORT_DEFLATE + if (is_compressed) { + /* tell the client about the deflate encoding */ + LWIP_ASSERT("error", deflateNonSsiFiles); + cur_string = "Content-Encoding: deflate\r\n"; + cur_len = strlen(cur_string); + fprintf(data_file, NEWLINE "/* \"%s\" (%d bytes) */" NEWLINE, cur_string, cur_len); + written += file_put_ascii(data_file, cur_string, cur_len, &i); + i = 0; + } +#else + LWIP_UNUSED_ARG(is_compressed); +#endif + + /* write content-type, ATTENTION: this includes the double-CRLF! */ + cur_string = file_type; + cur_len = strlen(cur_string); + fprintf(data_file, NEWLINE "/* \"%s\" (%"SZT_F" bytes) */" NEWLINE, cur_string, cur_len); + written += file_put_ascii(data_file, cur_string, cur_len, &i); + i = 0; + + /* ATTENTION: headers are done now (double-CRLF has been written!) */ + + if (precalcChksum) { + LWIP_ASSERT("hdr_len + cur_len <= sizeof(hdr_buf)", hdr_len + cur_len <= sizeof(hdr_buf)); + memcpy(&hdr_buf[hdr_len], cur_string, cur_len); + hdr_len += cur_len; + + LWIP_ASSERT("strlen(hdr_buf) == hdr_len", strlen(hdr_buf) == hdr_len); + acc = ~inet_chksum(hdr_buf, (u16_t)hdr_len); + *http_hdr_len = (u16_t)hdr_len; + *http_hdr_chksum = acc; + } + + return written; +} + +int file_put_ascii(FILE *file, const char *ascii_string, int len, int *i) +{ + int x; + for (x = 0; x < len; x++) { + unsigned char cur = ascii_string[x]; + fprintf(file, "0x%02x,", cur); + if ((++(*i) % HEX_BYTES_PER_LINE) == 0) { + fprintf(file, NEWLINE); + } + } + return len; +} + +int s_put_ascii(char *buf, const char *ascii_string, int len, int *i) +{ + int x; + int idx = 0; + for (x = 0; x < len; x++) { + unsigned char cur = ascii_string[x]; + sprintf(&buf[idx], "0x%02x,", cur); + idx += 5; + if ((++(*i) % HEX_BYTES_PER_LINE) == 0) { + sprintf(&buf[idx], NEWLINE); + idx += NEWLINE_LEN; + } + } + return len; +} diff --git a/Libraries/LwIP/src/apps/http/makefsdata/readme.txt b/Libraries/LwIP/src/apps/http/makefsdata/readme.txt new file mode 100644 index 0000000..3768585 --- /dev/null +++ b/Libraries/LwIP/src/apps/http/makefsdata/readme.txt @@ -0,0 +1,13 @@ +This directory contains a script ('makefsdata') to create C code suitable for +httpd for given html pages (or other files) in a directory. + +There is also a plain C console application doing the same and extended a bit. + +Usage: htmlgen [targetdir] [-s] [-i]s + targetdir: relative or absolute path to files to convert + switch -s: toggle processing of subdirectories (default is on) + switch -e: exclude HTTP header from file (header is created at runtime, default is on) + switch -11: include HTTP 1.1 header (1.0 is default) + + if targetdir not specified, makefsdata will attempt to + process files in subdirectory 'fs'. diff --git a/Libraries/LwIP/src/apps/http/makefsdata/tinydir.h b/Libraries/LwIP/src/apps/http/makefsdata/tinydir.h new file mode 100644 index 0000000..32ae5e8 --- /dev/null +++ b/Libraries/LwIP/src/apps/http/makefsdata/tinydir.h @@ -0,0 +1,808 @@ +/* +Copyright (c) 2013-2017, tinydir authors: +- Cong Xu +- Lautis Sun +- Baudouin Feildel +- Andargor +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. 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. + +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. +*/ +#ifndef TINYDIR_H +#define TINYDIR_H + +#ifdef __cplusplus +extern "C" { +#endif + +#if ((defined _UNICODE) && !(defined UNICODE)) +#define UNICODE +#endif + +#if ((defined UNICODE) && !(defined _UNICODE)) +#define _UNICODE +#endif + +#include +#include +#include +#ifdef _MSC_VER +# define WIN32_LEAN_AND_MEAN +# include +# include +# pragma warning(push) +# pragma warning (disable : 4996) +#else +# include +# include +# include +# include +#endif +#ifdef __MINGW32__ +# include +#endif + + +/* types */ + +/* Windows UNICODE wide character support */ +#if defined _MSC_VER || defined __MINGW32__ +#define _tinydir_char_t TCHAR +#define TINYDIR_STRING(s) _TEXT(s) +#define _tinydir_strlen _tcslen +#define _tinydir_strcpy _tcscpy +#define _tinydir_strcat _tcscat +#define _tinydir_strcmp _tcscmp +#define _tinydir_strrchr _tcsrchr +#define _tinydir_strncmp _tcsncmp +#else +#define _tinydir_char_t char +#define TINYDIR_STRING(s) s +#define _tinydir_strlen strlen +#define _tinydir_strcpy strcpy +#define _tinydir_strcat strcat +#define _tinydir_strcmp strcmp +#define _tinydir_strrchr strrchr +#define _tinydir_strncmp strncmp +#endif + +#if (defined _MSC_VER || defined __MINGW32__) +#include +#define _TINYDIR_PATH_MAX MAX_PATH +#elif defined __linux__ +#include +#define _TINYDIR_PATH_MAX PATH_MAX +#else +#define _TINYDIR_PATH_MAX 4096 +#endif + +#ifdef _MSC_VER +/* extra chars for the "\\*" mask */ +# define _TINYDIR_PATH_EXTRA 2 +#else +# define _TINYDIR_PATH_EXTRA 0 +#endif + +#define _TINYDIR_FILENAME_MAX 256 + +#if (defined _MSC_VER || defined __MINGW32__) +#define _TINYDIR_DRIVE_MAX 3 +#endif + +#ifdef _MSC_VER +# define _TINYDIR_FUNC static __inline +#elif !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L +# define _TINYDIR_FUNC static __inline__ +#else +# define _TINYDIR_FUNC static inline +#endif + +/* readdir_r usage; define TINYDIR_USE_READDIR_R to use it (if supported) */ +#ifdef TINYDIR_USE_READDIR_R + +/* readdir_r is a POSIX-only function, and may not be available under various + * environments/settings, e.g. MinGW. Use readdir fallback */ +#if _POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE ||\ + _POSIX_SOURCE +# define _TINYDIR_HAS_READDIR_R +#endif +#if _POSIX_C_SOURCE >= 200112L +# define _TINYDIR_HAS_FPATHCONF +# include +#endif +#if _BSD_SOURCE || _SVID_SOURCE || \ + (_POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700) +# define _TINYDIR_HAS_DIRFD +# include +#endif +#if defined _TINYDIR_HAS_FPATHCONF && defined _TINYDIR_HAS_DIRFD &&\ + defined _PC_NAME_MAX +# define _TINYDIR_USE_FPATHCONF +#endif +#if defined __MINGW32__ || !defined _TINYDIR_HAS_READDIR_R ||\ + !(defined _TINYDIR_USE_FPATHCONF || defined NAME_MAX) +# define _TINYDIR_USE_READDIR +#endif + +/* Use readdir by default */ +#else +# define _TINYDIR_USE_READDIR +#endif + +/* MINGW32 has two versions of dirent, ASCII and UNICODE*/ +#ifndef _MSC_VER +#if (defined __MINGW32__) && (defined _UNICODE) +#define _TINYDIR_DIR _WDIR +#define _tinydir_dirent _wdirent +#define _tinydir_opendir _wopendir +#define _tinydir_readdir _wreaddir +#define _tinydir_closedir _wclosedir +#else +#define _TINYDIR_DIR DIR +#define _tinydir_dirent dirent +#define _tinydir_opendir opendir +#define _tinydir_readdir readdir +#define _tinydir_closedir closedir +#endif +#endif + +/* Allow user to use a custom allocator by defining _TINYDIR_MALLOC and _TINYDIR_FREE. */ +#if defined(_TINYDIR_MALLOC) && defined(_TINYDIR_FREE) +#elif !defined(_TINYDIR_MALLOC) && !defined(_TINYDIR_FREE) +#else +#error "Either define both alloc and free or none of them!" +#endif + +#if !defined(_TINYDIR_MALLOC) + #define _TINYDIR_MALLOC(_size) malloc(_size) + #define _TINYDIR_FREE(_ptr) free(_ptr) +#endif /* !defined(_TINYDIR_MALLOC) */ + +typedef struct tinydir_file +{ + _tinydir_char_t path[_TINYDIR_PATH_MAX]; + _tinydir_char_t name[_TINYDIR_FILENAME_MAX]; + _tinydir_char_t *extension; + int is_dir; + int is_reg; + +#ifndef _MSC_VER +#ifdef __MINGW32__ + struct _stat _s; +#else + struct stat _s; +#endif +#endif +} tinydir_file; + +typedef struct tinydir_dir +{ + _tinydir_char_t path[_TINYDIR_PATH_MAX]; + int has_next; + size_t n_files; + + tinydir_file *_files; +#ifdef _MSC_VER + HANDLE _h; + WIN32_FIND_DATA _f; +#else + _TINYDIR_DIR *_d; + struct _tinydir_dirent *_e; +#ifndef _TINYDIR_USE_READDIR + struct _tinydir_dirent *_ep; +#endif +#endif +} tinydir_dir; + + +/* declarations */ + +_TINYDIR_FUNC +int tinydir_open(tinydir_dir *dir, const _tinydir_char_t *path); +_TINYDIR_FUNC +int tinydir_open_sorted(tinydir_dir *dir, const _tinydir_char_t *path); +_TINYDIR_FUNC +void tinydir_close(tinydir_dir *dir); + +_TINYDIR_FUNC +int tinydir_next(tinydir_dir *dir); +_TINYDIR_FUNC +int tinydir_readfile(const tinydir_dir *dir, tinydir_file *file); +_TINYDIR_FUNC +int tinydir_readfile_n(const tinydir_dir *dir, tinydir_file *file, size_t i); +_TINYDIR_FUNC +int tinydir_open_subdir_n(tinydir_dir *dir, size_t i); + +_TINYDIR_FUNC +int tinydir_file_open(tinydir_file *file, const _tinydir_char_t *path); +_TINYDIR_FUNC +void _tinydir_get_ext(tinydir_file *file); +_TINYDIR_FUNC +int _tinydir_file_cmp(const void *a, const void *b); +#ifndef _MSC_VER +#ifndef _TINYDIR_USE_READDIR +_TINYDIR_FUNC +size_t _tinydir_dirent_buf_size(_TINYDIR_DIR *dirp); +#endif +#endif + + +/* definitions*/ + +_TINYDIR_FUNC +int tinydir_open(tinydir_dir *dir, const _tinydir_char_t *path) +{ +#ifndef _MSC_VER +#ifndef _TINYDIR_USE_READDIR + int error; + int size; /* using int size */ +#endif +#else + _tinydir_char_t path_buf[_TINYDIR_PATH_MAX]; +#endif + _tinydir_char_t *pathp; + + if (dir == NULL || path == NULL || _tinydir_strlen(path) == 0) + { + errno = EINVAL; + return -1; + } + if (_tinydir_strlen(path) + _TINYDIR_PATH_EXTRA >= _TINYDIR_PATH_MAX) + { + errno = ENAMETOOLONG; + return -1; + } + + /* initialise dir */ + dir->_files = NULL; +#ifdef _MSC_VER + dir->_h = INVALID_HANDLE_VALUE; +#else + dir->_d = NULL; +#ifndef _TINYDIR_USE_READDIR + dir->_ep = NULL; +#endif +#endif + tinydir_close(dir); + + _tinydir_strcpy(dir->path, path); + /* Remove trailing slashes */ + pathp = &dir->path[_tinydir_strlen(dir->path) - 1]; + while (pathp != dir->path && (*pathp == TINYDIR_STRING('\\') || *pathp == TINYDIR_STRING('/'))) + { + *pathp = TINYDIR_STRING('\0'); + pathp++; + } +#ifdef _MSC_VER + _tinydir_strcpy(path_buf, dir->path); + _tinydir_strcat(path_buf, TINYDIR_STRING("\\*")); +#if (defined WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP) + dir->_h = FindFirstFileEx(path_buf, FindExInfoStandard, &dir->_f, FindExSearchNameMatch, NULL, 0); +#else + dir->_h = FindFirstFile(path_buf, &dir->_f); +#endif + if (dir->_h == INVALID_HANDLE_VALUE) + { + errno = ENOENT; +#else + dir->_d = _tinydir_opendir(path); + if (dir->_d == NULL) + { +#endif + goto bail; + } + + /* read first file */ + dir->has_next = 1; +#ifndef _MSC_VER +#ifdef _TINYDIR_USE_READDIR + dir->_e = _tinydir_readdir(dir->_d); +#else + /* allocate dirent buffer for readdir_r */ + size = _tinydir_dirent_buf_size(dir->_d); /* conversion to int */ + if (size == -1) return -1; + dir->_ep = (struct _tinydir_dirent*)_TINYDIR_MALLOC(size); + if (dir->_ep == NULL) return -1; + + error = readdir_r(dir->_d, dir->_ep, &dir->_e); + if (error != 0) return -1; +#endif + if (dir->_e == NULL) + { + dir->has_next = 0; + } +#endif + + return 0; + +bail: + tinydir_close(dir); + return -1; +} + +_TINYDIR_FUNC +int tinydir_open_sorted(tinydir_dir *dir, const _tinydir_char_t *path) +{ + /* Count the number of files first, to pre-allocate the files array */ + size_t n_files = 0; + if (tinydir_open(dir, path) == -1) + { + return -1; + } + while (dir->has_next) + { + n_files++; + if (tinydir_next(dir) == -1) + { + goto bail; + } + } + tinydir_close(dir); + + if (tinydir_open(dir, path) == -1) + { + return -1; + } + + dir->n_files = 0; + dir->_files = (tinydir_file *)_TINYDIR_MALLOC(sizeof *dir->_files * n_files); + if (dir->_files == NULL) + { + goto bail; + } + while (dir->has_next) + { + tinydir_file *p_file; + dir->n_files++; + + p_file = &dir->_files[dir->n_files - 1]; + if (tinydir_readfile(dir, p_file) == -1) + { + goto bail; + } + + if (tinydir_next(dir) == -1) + { + goto bail; + } + + /* Just in case the number of files has changed between the first and + second reads, terminate without writing into unallocated memory */ + if (dir->n_files == n_files) + { + break; + } + } + + qsort(dir->_files, dir->n_files, sizeof(tinydir_file), _tinydir_file_cmp); + + return 0; + +bail: + tinydir_close(dir); + return -1; +} + +_TINYDIR_FUNC +void tinydir_close(tinydir_dir *dir) +{ + if (dir == NULL) + { + return; + } + + memset(dir->path, 0, sizeof(dir->path)); + dir->has_next = 0; + dir->n_files = 0; + _TINYDIR_FREE(dir->_files); + dir->_files = NULL; +#ifdef _MSC_VER + if (dir->_h != INVALID_HANDLE_VALUE) + { + FindClose(dir->_h); + } + dir->_h = INVALID_HANDLE_VALUE; +#else + if (dir->_d) + { + _tinydir_closedir(dir->_d); + } + dir->_d = NULL; + dir->_e = NULL; +#ifndef _TINYDIR_USE_READDIR + _TINYDIR_FREE(dir->_ep); + dir->_ep = NULL; +#endif +#endif +} + +_TINYDIR_FUNC +int tinydir_next(tinydir_dir *dir) +{ + if (dir == NULL) + { + errno = EINVAL; + return -1; + } + if (!dir->has_next) + { + errno = ENOENT; + return -1; + } + +#ifdef _MSC_VER + if (FindNextFile(dir->_h, &dir->_f) == 0) +#else +#ifdef _TINYDIR_USE_READDIR + dir->_e = _tinydir_readdir(dir->_d); +#else + if (dir->_ep == NULL) + { + return -1; + } + if (readdir_r(dir->_d, dir->_ep, &dir->_e) != 0) + { + return -1; + } +#endif + if (dir->_e == NULL) +#endif + { + dir->has_next = 0; +#ifdef _MSC_VER + if (GetLastError() != ERROR_SUCCESS && + GetLastError() != ERROR_NO_MORE_FILES) + { + tinydir_close(dir); + errno = EIO; + return -1; + } +#endif + } + + return 0; +} + +_TINYDIR_FUNC +int tinydir_readfile(const tinydir_dir *dir, tinydir_file *file) +{ + if (dir == NULL || file == NULL) + { + errno = EINVAL; + return -1; + } +#ifdef _MSC_VER + if (dir->_h == INVALID_HANDLE_VALUE) +#else + if (dir->_e == NULL) +#endif + { + errno = ENOENT; + return -1; + } + if (_tinydir_strlen(dir->path) + + _tinydir_strlen( +#ifdef _MSC_VER + dir->_f.cFileName +#else + dir->_e->d_name +#endif + ) + 1 + _TINYDIR_PATH_EXTRA >= + _TINYDIR_PATH_MAX) + { + /* the path for the file will be too long */ + errno = ENAMETOOLONG; + return -1; + } + if (_tinydir_strlen( +#ifdef _MSC_VER + dir->_f.cFileName +#else + dir->_e->d_name +#endif + ) >= _TINYDIR_FILENAME_MAX) + { + errno = ENAMETOOLONG; + return -1; + } + + _tinydir_strcpy(file->path, dir->path); + _tinydir_strcat(file->path, TINYDIR_STRING("/")); + _tinydir_strcpy(file->name, +#ifdef _MSC_VER + dir->_f.cFileName +#else + dir->_e->d_name +#endif + ); + _tinydir_strcat(file->path, file->name); +#ifndef _MSC_VER +#ifdef __MINGW32__ + if (_tstat( +#else + if (stat( +#endif + file->path, &file->_s) == -1) + { + return -1; + } +#endif + _tinydir_get_ext(file); + + file->is_dir = +#ifdef _MSC_VER + !!(dir->_f.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY); +#else + S_ISDIR(file->_s.st_mode); +#endif + file->is_reg = +#ifdef _MSC_VER + !!(dir->_f.dwFileAttributes & FILE_ATTRIBUTE_NORMAL) || + ( + !(dir->_f.dwFileAttributes & FILE_ATTRIBUTE_DEVICE) && + !(dir->_f.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && + !(dir->_f.dwFileAttributes & FILE_ATTRIBUTE_ENCRYPTED) && +#ifdef FILE_ATTRIBUTE_INTEGRITY_STREAM + !(dir->_f.dwFileAttributes & FILE_ATTRIBUTE_INTEGRITY_STREAM) && +#endif +#ifdef FILE_ATTRIBUTE_NO_SCRUB_DATA + !(dir->_f.dwFileAttributes & FILE_ATTRIBUTE_NO_SCRUB_DATA) && +#endif + !(dir->_f.dwFileAttributes & FILE_ATTRIBUTE_OFFLINE) && + !(dir->_f.dwFileAttributes & FILE_ATTRIBUTE_TEMPORARY)); +#else + S_ISREG(file->_s.st_mode); +#endif + + return 0; +} + +_TINYDIR_FUNC +int tinydir_readfile_n(const tinydir_dir *dir, tinydir_file *file, size_t i) +{ + if (dir == NULL || file == NULL) + { + errno = EINVAL; + return -1; + } + if (i >= dir->n_files) + { + errno = ENOENT; + return -1; + } + + memcpy(file, &dir->_files[i], sizeof(tinydir_file)); + _tinydir_get_ext(file); + + return 0; +} + +_TINYDIR_FUNC +int tinydir_open_subdir_n(tinydir_dir *dir, size_t i) +{ + _tinydir_char_t path[_TINYDIR_PATH_MAX]; + if (dir == NULL) + { + errno = EINVAL; + return -1; + } + if (i >= dir->n_files || !dir->_files[i].is_dir) + { + errno = ENOENT; + return -1; + } + + _tinydir_strcpy(path, dir->_files[i].path); + tinydir_close(dir); + if (tinydir_open_sorted(dir, path) == -1) + { + return -1; + } + + return 0; +} + +/* Open a single file given its path */ +_TINYDIR_FUNC +int tinydir_file_open(tinydir_file *file, const _tinydir_char_t *path) +{ + tinydir_dir dir; + int result = 0; + int found = 0; + _tinydir_char_t dir_name_buf[_TINYDIR_PATH_MAX]; + _tinydir_char_t file_name_buf[_TINYDIR_FILENAME_MAX]; + _tinydir_char_t *dir_name; + _tinydir_char_t *base_name; +#if (defined _MSC_VER || defined __MINGW32__) + _tinydir_char_t drive_buf[_TINYDIR_PATH_MAX]; + _tinydir_char_t ext_buf[_TINYDIR_FILENAME_MAX]; +#endif + + if (file == NULL || path == NULL || _tinydir_strlen(path) == 0) + { + errno = EINVAL; + return -1; + } + if (_tinydir_strlen(path) + _TINYDIR_PATH_EXTRA >= _TINYDIR_PATH_MAX) + { + errno = ENAMETOOLONG; + return -1; + } + + /* Get the parent path */ +#if (defined _MSC_VER || defined __MINGW32__) +#if ((defined _MSC_VER) && (_MSC_VER >= 1400)) + _tsplitpath_s( + path, + drive_buf, _TINYDIR_DRIVE_MAX, + dir_name_buf, _TINYDIR_FILENAME_MAX, + file_name_buf, _TINYDIR_FILENAME_MAX, + ext_buf, _TINYDIR_FILENAME_MAX); +#else + _tsplitpath( + path, + drive_buf, + dir_name_buf, + file_name_buf, + ext_buf); +#endif + +/* _splitpath_s not work fine with only filename and widechar support */ +#ifdef _UNICODE + if (drive_buf[0] == L'\xFEFE') + drive_buf[0] = '\0'; + if (dir_name_buf[0] == L'\xFEFE') + dir_name_buf[0] = '\0'; +#endif + + if (errno) + { + errno = EINVAL; + return -1; + } + /* Emulate the behavior of dirname by returning "." for dir name if it's + empty */ + if (drive_buf[0] == '\0' && dir_name_buf[0] == '\0') + { + _tinydir_strcpy(dir_name_buf, TINYDIR_STRING(".")); + } + /* Concatenate the drive letter and dir name to form full dir name */ + _tinydir_strcat(drive_buf, dir_name_buf); + dir_name = drive_buf; + /* Concatenate the file name and extension to form base name */ + _tinydir_strcat(file_name_buf, ext_buf); + base_name = file_name_buf; +#else + _tinydir_strcpy(dir_name_buf, path); + dir_name = dirname(dir_name_buf); + _tinydir_strcpy(file_name_buf, path); + base_name =basename(file_name_buf); +#endif + + /* Open the parent directory */ + if (tinydir_open(&dir, dir_name) == -1) + { + return -1; + } + + /* Read through the parent directory and look for the file */ + while (dir.has_next) + { + if (tinydir_readfile(&dir, file) == -1) + { + result = -1; + goto bail; + } + if (_tinydir_strcmp(file->name, base_name) == 0) + { + /* File found */ + found = 1; + break; + } + tinydir_next(&dir); + } + if (!found) + { + result = -1; + errno = ENOENT; + } + +bail: + tinydir_close(&dir); + return result; +} + +_TINYDIR_FUNC +void _tinydir_get_ext(tinydir_file *file) +{ + _tinydir_char_t *period = _tinydir_strrchr(file->name, TINYDIR_STRING('.')); + if (period == NULL) + { + file->extension = &(file->name[_tinydir_strlen(file->name)]); + } + else + { + file->extension = period + 1; + } +} + +_TINYDIR_FUNC +int _tinydir_file_cmp(const void *a, const void *b) +{ + const tinydir_file *fa = (const tinydir_file *)a; + const tinydir_file *fb = (const tinydir_file *)b; + if (fa->is_dir != fb->is_dir) + { + return -(fa->is_dir - fb->is_dir); + } + return _tinydir_strncmp(fa->name, fb->name, _TINYDIR_FILENAME_MAX); +} + +#ifndef _MSC_VER +#ifndef _TINYDIR_USE_READDIR +/* +The following authored by Ben Hutchings +from https://womble.decadent.org.uk/readdir_r-advisory.html +*/ +/* Calculate the required buffer size (in bytes) for directory * +* entries read from the given directory handle. Return -1 if this * +* this cannot be done. * +* * +* This code does not trust values of NAME_MAX that are less than * +* 255, since some systems (including at least HP-UX) incorrectly * +* define it to be a smaller value. */ +_TINYDIR_FUNC +size_t _tinydir_dirent_buf_size(_TINYDIR_DIR *dirp) +{ + long name_max; + size_t name_end; + /* parameter may be unused */ + (void)dirp; + +#if defined _TINYDIR_USE_FPATHCONF + name_max = fpathconf(dirfd(dirp), _PC_NAME_MAX); + if (name_max == -1) +#if defined(NAME_MAX) + name_max = (NAME_MAX > 255) ? NAME_MAX : 255; +#else + return (size_t)(-1); +#endif +#elif defined(NAME_MAX) + name_max = (NAME_MAX > 255) ? NAME_MAX : 255; +#else +#error "buffer size for readdir_r cannot be determined" +#endif + name_end = (size_t)offsetof(struct _tinydir_dirent, d_name) + name_max + 1; + return (name_end > sizeof(struct _tinydir_dirent) ? + name_end : sizeof(struct _tinydir_dirent)); +} +#endif +#endif + +#ifdef __cplusplus +} +#endif + +# if defined (_MSC_VER) +# pragma warning(pop) +# endif + +#endif diff --git a/Libraries/LwIP/src/apps/httpd/fsdata.h b/Libraries/LwIP/src/apps/httpd/fsdata.h index c004a3f..638a973 100755 --- a/Libraries/LwIP/src/apps/httpd/fsdata.h +++ b/Libraries/LwIP/src/apps/httpd/fsdata.h @@ -35,16 +35,16 @@ #include "lwip/apps/httpd_opts.h" #include "lwip/apps/fs.h" -struct fsdata_file { - const struct fsdata_file *next; - const unsigned char *name; - const unsigned char *data; - int len; - u8_t flags; -#if HTTPD_PRECALCULATED_CHECKSUM - u16_t chksum_count; - const struct fsdata_chksum *chksum; -#endif /* HTTPD_PRECALCULATED_CHECKSUM */ -}; +//struct fsdata_file { +// const struct fsdata_file *next; +// const unsigned char *name; +// const unsigned char *data; +// int len; +// u8_t flags; +//#if HTTPD_PRECALCULATED_CHECKSUM +// u16_t chksum_count; +// const struct fsdata_chksum *chksum; +//#endif /* HTTPD_PRECALCULATED_CHECKSUM */ +//}; #endif /* LWIP_FSDATA_H */ diff --git a/Libraries/LwIP/src/apps/lwiperf/lwiperf.c b/Libraries/LwIP/src/apps/lwiperf/lwiperf.c index a50e19a..ec2c9bb 100755 --- a/Libraries/LwIP/src/apps/lwiperf/lwiperf.c +++ b/Libraries/LwIP/src/apps/lwiperf/lwiperf.c @@ -7,11 +7,15 @@ * @defgroup iperf Iperf server * @ingroup apps * - * This is a simple performance measuring server to check your bandwith using - * iPerf2 on a PC as client. - * It is currently a minimal implementation providing an IPv4 TCP server only. + * This is a simple performance measuring client/server to check your bandwith using + * iPerf2 on a PC as server/client. + * It is currently a minimal implementation providing a TCP client/server only. * - * @todo: implement UDP mode and IPv6 + * @todo: + * - implement UDP mode + * - protect combined sessions handling (via 'related_master_state') against reallocation + * (this is a pointer address, currently, so if the same memory is allocated again, + * session pairs (tx/rx) can be confused on reallocation) */ /* @@ -52,8 +56,8 @@ #include -/* Currently, only TCP-over-IPv4 is implemented (does iperf support IPv6 anyway?) */ -#if LWIP_IPV4 && LWIP_TCP && LWIP_CALLBACK_API +/* Currently, only TCP is implemented */ +#if LWIP_TCP && LWIP_CALLBACK_API /** Specify the idle timeout (in seconds) after that the test fails */ #ifndef LWIPERF_TCP_MAX_IDLE_SEC @@ -63,6 +67,11 @@ #error LWIPERF_TCP_MAX_IDLE_SEC must fit into an u8_t #endif +/** Change this if you don't want to lwiperf to listen to any IP version */ +#ifndef LWIPERF_SERVER_IP_TYPE +#define LWIPERF_SERVER_IP_TYPE IPADDR_TYPE_ANY +#endif + /* File internal memory allocation (struct lwiperf_*): this defaults to the heap */ #ifndef LWIPERF_ALLOC @@ -91,101 +100,108 @@ typedef struct _lwiperf_settings { struct _lwiperf_state_base; typedef struct _lwiperf_state_base lwiperf_state_base_t; struct _lwiperf_state_base { + /* linked list */ + lwiperf_state_base_t *next; /* 1=tcp, 0=udp */ u8_t tcp; /* 1=server, 0=client */ u8_t server; - lwiperf_state_base_t* next; - lwiperf_state_base_t* related_server_state; + /* master state used to abort sessions (e.g. listener, main client) */ + lwiperf_state_base_t *related_master_state; }; /** Connection handle for a TCP iperf session */ typedef struct _lwiperf_state_tcp { lwiperf_state_base_t base; - struct tcp_pcb* server_pcb; - struct tcp_pcb* conn_pcb; + struct tcp_pcb *server_pcb; + struct tcp_pcb *conn_pcb; u32_t time_started; lwiperf_report_fn report_fn; - void* report_arg; + void *report_arg; u8_t poll_count; u8_t next_num; + /* 1=start server when client is closed */ + u8_t client_tradeoff_mode; u32_t bytes_transferred; lwiperf_settings_t settings; u8_t have_settings_buf; + u8_t specific_remote; + ip_addr_t remote_addr; } lwiperf_state_tcp_t; /** List of active iperf sessions */ -static lwiperf_state_base_t* lwiperf_all_connections; +static lwiperf_state_base_t *lwiperf_all_connections; /** A const buffer to send from: we want to measure sending, not copying! */ static const u8_t lwiperf_txbuf_const[1600] = { - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', - '0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', }; static err_t lwiperf_tcp_poll(void *arg, struct tcp_pcb *tpcb); static void lwiperf_tcp_err(void *arg, err_t err); +static err_t lwiperf_start_tcp_server_impl(const ip_addr_t *local_addr, u16_t local_port, + lwiperf_report_fn report_fn, void *report_arg, + lwiperf_state_base_t *related_master_state, lwiperf_state_tcp_t **state); + /** Add an iperf session to the 'active' list */ static void -lwiperf_list_add(lwiperf_state_base_t* item) +lwiperf_list_add(lwiperf_state_base_t *item) { - if (lwiperf_all_connections == NULL) { - lwiperf_all_connections = item; - } else { - item = lwiperf_all_connections; - } + item->next = lwiperf_all_connections; + lwiperf_all_connections = item; } /** Remove an iperf session from the 'active' list */ static void -lwiperf_list_remove(lwiperf_state_base_t* item) +lwiperf_list_remove(lwiperf_state_base_t *item) { - lwiperf_state_base_t* prev = NULL; - lwiperf_state_base_t* iter; + lwiperf_state_base_t *prev = NULL; + lwiperf_state_base_t *iter; for (iter = lwiperf_all_connections; iter != NULL; prev = iter, iter = iter->next) { if (iter == item) { if (prev == NULL) { lwiperf_all_connections = iter->next; } else { - prev->next = item; + prev->next = iter->next; } /* @debug: ensure this item is listed only once */ for (iter = iter->next; iter != NULL; iter = iter->next) { @@ -196,9 +212,21 @@ lwiperf_list_remove(lwiperf_state_base_t* item) } } +static lwiperf_state_base_t * +lwiperf_list_find(lwiperf_state_base_t *item) +{ + lwiperf_state_base_t *iter; + for (iter = lwiperf_all_connections; iter != NULL; iter = iter->next) { + if (iter == item) { + return item; + } + } + return NULL; +} + /** Call the report function of an iperf tcp session */ static void -lwip_tcp_conn_report(lwiperf_state_tcp_t* conn, enum lwiperf_report_type report_type) +lwip_tcp_conn_report(lwiperf_state_tcp_t *conn, enum lwiperf_report_type report_type) { if ((conn != NULL) && (conn->report_fn != NULL)) { u32_t now, duration_ms, bandwidth_kbitpsec; @@ -210,20 +238,20 @@ lwip_tcp_conn_report(lwiperf_state_tcp_t* conn, enum lwiperf_report_type report_ bandwidth_kbitpsec = (conn->bytes_transferred / duration_ms) * 8U; } conn->report_fn(conn->report_arg, report_type, - &conn->conn_pcb->local_ip, conn->conn_pcb->local_port, - &conn->conn_pcb->remote_ip, conn->conn_pcb->remote_port, - conn->bytes_transferred, duration_ms, bandwidth_kbitpsec); + &conn->conn_pcb->local_ip, conn->conn_pcb->local_port, + &conn->conn_pcb->remote_ip, conn->conn_pcb->remote_port, + conn->bytes_transferred, duration_ms, bandwidth_kbitpsec); } } /** Close an iperf tcp session */ static void -lwiperf_tcp_close(lwiperf_state_tcp_t* conn, enum lwiperf_report_type report_type) +lwiperf_tcp_close(lwiperf_state_tcp_t *conn, enum lwiperf_report_type report_type) { err_t err; - lwip_tcp_conn_report(conn, report_type); lwiperf_list_remove(&conn->base); + lwip_tcp_conn_report(conn, report_type); if (conn->conn_pcb != NULL) { tcp_arg(conn->conn_pcb, NULL); tcp_poll(conn->conn_pcb, NULL, 0); @@ -236,22 +264,22 @@ lwiperf_tcp_close(lwiperf_state_tcp_t* conn, enum lwiperf_report_type report_typ tcp_abort(conn->conn_pcb); } } else { - /* no conn pcb, this is the server pcb */ + /* no conn pcb, this is the listener pcb */ err = tcp_close(conn->server_pcb); - LWIP_ASSERT("error", err != ERR_OK); + LWIP_ASSERT("error", err == ERR_OK); } LWIPERF_FREE(lwiperf_state_tcp_t, conn); } /** Try to send more data on an iperf tcp session */ static err_t -lwiperf_tcp_client_send_more(lwiperf_state_tcp_t* conn) +lwiperf_tcp_client_send_more(lwiperf_state_tcp_t *conn) { int send_more; err_t err; u16_t txlen; u16_t txlen_max; - void* txptr; + void *txptr; u8_t apiflags; LWIP_ASSERT("conn invalid", (conn != NULL) && conn->base.tcp && (conn->base.server == 0)); @@ -262,7 +290,7 @@ lwiperf_tcp_client_send_more(lwiperf_state_tcp_t* conn) /* this session is time-limited */ u32_t now = sys_now(); u32_t diff_ms = now - conn->time_started; - u32_t time = (u32_t)-(s32_t)lwip_htonl(conn->settings.amount); + u32_t time = (u32_t) - (s32_t)lwip_htonl(conn->settings.amount); u32_t time_ms = time * 10; if (diff_ms >= time_ms) { /* time specified by the client is over -> close the connection */ @@ -282,19 +310,19 @@ lwiperf_tcp_client_send_more(lwiperf_state_tcp_t* conn) if (conn->bytes_transferred < 24) { /* transmit the settings a first time */ - txptr = &((u8_t*)&conn->settings)[conn->bytes_transferred]; + txptr = &((u8_t *)&conn->settings)[conn->bytes_transferred]; txlen_max = (u16_t)(24 - conn->bytes_transferred); apiflags = TCP_WRITE_FLAG_COPY; } else if (conn->bytes_transferred < 48) { /* transmit the settings a second time */ - txptr = &((u8_t*)&conn->settings)[conn->bytes_transferred - 24]; + txptr = &((u8_t *)&conn->settings)[conn->bytes_transferred - 24]; txlen_max = (u16_t)(48 - conn->bytes_transferred); apiflags = TCP_WRITE_FLAG_COPY | TCP_WRITE_FLAG_MORE; send_more = 1; } else { /* transmit data */ /* @todo: every x bytes, transmit the settings again */ - txptr = LWIP_CONST_CAST(void*, &lwiperf_txbuf_const[conn->bytes_transferred % 10]); + txptr = LWIP_CONST_CAST(void *, &lwiperf_txbuf_const[conn->bytes_transferred % 10]); txlen_max = TCP_MSS; if (conn->bytes_transferred == 48) { /* @todo: fix this for intermediate settings, too */ txlen_max = TCP_MSS - 24; @@ -308,14 +336,14 @@ lwiperf_tcp_client_send_more(lwiperf_state_tcp_t* conn) if (err == ERR_MEM) { txlen /= 2; } - } while ((err == ERR_MEM) && (txlen >= (TCP_MSS/2))); + } while ((err == ERR_MEM) && (txlen >= (TCP_MSS / 2))); if (err == ERR_OK) { conn->bytes_transferred += txlen; } else { send_more = 0; } - } while(send_more); + } while (send_more); tcp_output(conn->conn_pcb); return ERR_OK; @@ -325,7 +353,7 @@ lwiperf_tcp_client_send_more(lwiperf_state_tcp_t* conn) static err_t lwiperf_tcp_client_sent(void *arg, struct tcp_pcb *tpcb, u16_t len) { - lwiperf_state_tcp_t* conn = (lwiperf_state_tcp_t*)arg; + lwiperf_state_tcp_t *conn = (lwiperf_state_tcp_t *)arg; /* @todo: check 'len' (e.g. to time ACK of all data)? for now, we just send more... */ LWIP_ASSERT("invalid conn", conn->conn_pcb == tpcb); LWIP_UNUSED_ARG(tpcb); @@ -340,7 +368,7 @@ lwiperf_tcp_client_sent(void *arg, struct tcp_pcb *tpcb, u16_t len) static err_t lwiperf_tcp_client_connected(void *arg, struct tcp_pcb *tpcb, err_t err) { - lwiperf_state_tcp_t* conn = (lwiperf_state_tcp_t*)arg; + lwiperf_state_tcp_t *conn = (lwiperf_state_tcp_t *)arg; LWIP_ASSERT("invalid conn", conn->conn_pcb == tpcb); LWIP_UNUSED_ARG(tpcb); if (err != ERR_OK) { @@ -356,41 +384,46 @@ lwiperf_tcp_client_connected(void *arg, struct tcp_pcb *tpcb, err_t err) * receive test has finished. */ static err_t -lwiperf_tx_start(lwiperf_state_tcp_t* conn) +lwiperf_tx_start_impl(const ip_addr_t *remote_ip, u16_t remote_port, lwiperf_settings_t *settings, lwiperf_report_fn report_fn, + void *report_arg, lwiperf_state_base_t *related_master_state, lwiperf_state_tcp_t **new_conn) { err_t err; - lwiperf_state_tcp_t* client_conn; - struct tcp_pcb* newpcb; + lwiperf_state_tcp_t *client_conn; + struct tcp_pcb *newpcb; ip_addr_t remote_addr; - u16_t remote_port; - client_conn = (lwiperf_state_tcp_t*)LWIPERF_ALLOC(lwiperf_state_tcp_t); + LWIP_ASSERT("remote_ip != NULL", remote_ip != NULL); + LWIP_ASSERT("remote_ip != NULL", settings != NULL); + LWIP_ASSERT("new_conn != NULL", new_conn != NULL); + *new_conn = NULL; + + client_conn = (lwiperf_state_tcp_t *)LWIPERF_ALLOC(lwiperf_state_tcp_t); if (client_conn == NULL) { return ERR_MEM; } - newpcb = tcp_new(); + newpcb = tcp_new_ip_type(IP_GET_TYPE(remote_ip)); if (newpcb == NULL) { LWIPERF_FREE(lwiperf_state_tcp_t, client_conn); return ERR_MEM; } - - MEMCPY(client_conn, conn, sizeof(lwiperf_state_tcp_t)); - client_conn->base.server = 0; - client_conn->server_pcb = NULL; + memset(client_conn, 0, sizeof(lwiperf_state_tcp_t)); + client_conn->base.tcp = 1; + client_conn->base.related_master_state = related_master_state; client_conn->conn_pcb = newpcb; client_conn->time_started = sys_now(); /* @todo: set this again on 'connected' */ - client_conn->poll_count = 0; + client_conn->report_fn = report_fn; + client_conn->report_arg = report_arg; client_conn->next_num = 4; /* initial nr is '4' since the header has 24 byte */ client_conn->bytes_transferred = 0; - client_conn->settings.flags = 0; /* prevent the remote side starting back as client again */ + memcpy(&client_conn->settings, settings, sizeof(*settings)); + client_conn->have_settings_buf = 1; tcp_arg(newpcb, client_conn); tcp_sent(newpcb, lwiperf_tcp_client_sent); tcp_poll(newpcb, lwiperf_tcp_poll, 2U); tcp_err(newpcb, lwiperf_tcp_err); - ip_addr_copy(remote_addr, conn->conn_pcb->remote_ip); - remote_port = (u16_t)lwip_htonl(client_conn->settings.remote_port); + ip_addr_copy(remote_addr, *remote_ip); err = tcp_connect(newpcb, &remote_addr, remote_port, lwiperf_tcp_client_connected); if (err != ERR_OK) { @@ -398,9 +431,26 @@ lwiperf_tx_start(lwiperf_state_tcp_t* conn) return err; } lwiperf_list_add(&client_conn->base); + *new_conn = client_conn; return ERR_OK; } +static err_t +lwiperf_tx_start_passive(lwiperf_state_tcp_t *conn) +{ + err_t ret; + lwiperf_state_tcp_t *new_conn = NULL; + u16_t remote_port = (u16_t)lwip_htonl(conn->settings.remote_port); + + ret = lwiperf_tx_start_impl(&conn->conn_pcb->remote_ip, remote_port, &conn->settings, conn->report_fn, conn->report_arg, + conn->base.related_master_state, &new_conn); + if (ret == ERR_OK) { + LWIP_ASSERT("new_conn != NULL", new_conn != NULL); + new_conn->settings.flags = 0; /* prevent the remote side starting back as client again */ + } + return ret; +} + /** Receive data on an iperf tcp session */ static err_t lwiperf_tcp_recv(void *arg, struct tcp_pcb *tpcb, struct pbuf *p, err_t err) @@ -408,8 +458,8 @@ lwiperf_tcp_recv(void *arg, struct tcp_pcb *tpcb, struct pbuf *p, err_t err) u8_t tmp; u16_t tot_len; u32_t packet_idx; - struct pbuf* q; - lwiperf_state_tcp_t* conn = (lwiperf_state_tcp_t*)arg; + struct pbuf *q; + lwiperf_state_tcp_t *conn = (lwiperf_state_tcp_t *)arg; LWIP_ASSERT("pcb mismatch", conn->conn_pcb == tpcb); LWIP_UNUSED_ARG(tpcb); @@ -420,10 +470,11 @@ lwiperf_tcp_recv(void *arg, struct tcp_pcb *tpcb, struct pbuf *p, err_t err) } if (p == NULL) { /* connection closed -> test done */ - if ((conn->settings.flags & PP_HTONL(LWIPERF_FLAGS_ANSWER_TEST|LWIPERF_FLAGS_ANSWER_NOW)) == - PP_HTONL(LWIPERF_FLAGS_ANSWER_TEST)) { - /* client requested transmission after end of test */ - lwiperf_tx_start(conn); + if (conn->settings.flags & PP_HTONL(LWIPERF_FLAGS_ANSWER_TEST)) { + if ((conn->settings.flags & PP_HTONL(LWIPERF_FLAGS_ANSWER_NOW)) == 0) { + /* client requested transmission after end of test */ + lwiperf_tx_start_passive(conn); + } } lwiperf_tcp_close(conn, LWIPERF_TCP_DONE_SERVER); return ERR_OK; @@ -432,35 +483,38 @@ lwiperf_tcp_recv(void *arg, struct tcp_pcb *tpcb, struct pbuf *p, err_t err) conn->poll_count = 0; - if ((!conn->have_settings_buf) || ((conn->bytes_transferred -24) % (1024*128) == 0)) { + if ((!conn->have_settings_buf) || ((conn->bytes_transferred - 24) % (1024 * 128) == 0)) { /* wait for 24-byte header */ if (p->tot_len < sizeof(lwiperf_settings_t)) { lwiperf_tcp_close(conn, LWIPERF_TCP_ABORTED_LOCAL_DATAERROR); pbuf_free(p); - return ERR_VAL; + return ERR_OK; } if (!conn->have_settings_buf) { if (pbuf_copy_partial(p, &conn->settings, sizeof(lwiperf_settings_t), 0) != sizeof(lwiperf_settings_t)) { lwiperf_tcp_close(conn, LWIPERF_TCP_ABORTED_LOCAL); pbuf_free(p); - return ERR_VAL; + return ERR_OK; } conn->have_settings_buf = 1; - if ((conn->settings.flags & PP_HTONL(LWIPERF_FLAGS_ANSWER_TEST|LWIPERF_FLAGS_ANSWER_NOW)) == - PP_HTONL(LWIPERF_FLAGS_ANSWER_TEST|LWIPERF_FLAGS_ANSWER_NOW)) { + if (conn->settings.flags & PP_HTONL(LWIPERF_FLAGS_ANSWER_TEST)) { + if (conn->settings.flags & PP_HTONL(LWIPERF_FLAGS_ANSWER_NOW)) { /* client requested parallel transmission test */ - err_t err2 = lwiperf_tx_start(conn); + err_t err2 = lwiperf_tx_start_passive(conn); if (err2 != ERR_OK) { lwiperf_tcp_close(conn, LWIPERF_TCP_ABORTED_LOCAL_TXERROR); pbuf_free(p); - return err2; + return ERR_OK; } + } } } else { - if (pbuf_memcmp(p, 0, &conn->settings, sizeof(lwiperf_settings_t)) != 0) { - lwiperf_tcp_close(conn, LWIPERF_TCP_ABORTED_LOCAL_DATAERROR); - pbuf_free(p); - return ERR_VAL; + if (conn->settings.flags & PP_HTONL(LWIPERF_FLAGS_ANSWER_TEST)) { + if (pbuf_memcmp(p, 0, &conn->settings, sizeof(lwiperf_settings_t)) != 0) { + lwiperf_tcp_close(conn, LWIPERF_TCP_ABORTED_LOCAL_DATAERROR); + pbuf_free(p); + return ERR_OK; + } } } conn->bytes_transferred += sizeof(lwiperf_settings_t); @@ -471,14 +525,15 @@ lwiperf_tcp_recv(void *arg, struct tcp_pcb *tpcb, struct pbuf *p, err_t err) return ERR_OK; } conn->next_num = 4; /* 24 bytes received... */ - tmp = pbuf_header(p, -24); - LWIP_ASSERT("pbuf_header failed", tmp == 0); + tmp = pbuf_remove_header(p, 24); + LWIP_ASSERT("pbuf_remove_header failed", tmp == 0); + LWIP_UNUSED_ARG(tmp); /* for LWIP_NOASSERT */ } packet_idx = 0; for (q = p; q != NULL; q = q->next) { #if LWIPERF_CHECK_RX_DATA - const u8_t* payload = (const u8_t*)q->payload; + const u8_t *payload = (const u8_t *)q->payload; u16_t i; for (i = 0; i < q->len; i++) { u8_t val = payload[i]; @@ -491,7 +546,7 @@ lwiperf_tcp_recv(void *arg, struct tcp_pcb *tpcb, struct pbuf *p, err_t err) } else { lwiperf_tcp_close(conn, LWIPERF_TCP_ABORTED_LOCAL_DATAERROR); pbuf_free(p); - return ERR_VAL; + return ERR_OK; } } #endif @@ -508,7 +563,7 @@ lwiperf_tcp_recv(void *arg, struct tcp_pcb *tpcb, struct pbuf *p, err_t err) static void lwiperf_tcp_err(void *arg, err_t err) { - lwiperf_state_tcp_t* conn = (lwiperf_state_tcp_t*)arg; + lwiperf_state_tcp_t *conn = (lwiperf_state_tcp_t *)arg; LWIP_UNUSED_ARG(err); lwiperf_tcp_close(conn, LWIPERF_TCP_ABORTED_REMOTE); } @@ -517,7 +572,7 @@ lwiperf_tcp_err(void *arg, err_t err) static err_t lwiperf_tcp_poll(void *arg, struct tcp_pcb *tpcb) { - lwiperf_state_tcp_t* conn = (lwiperf_state_tcp_t*)arg; + lwiperf_state_tcp_t *conn = (lwiperf_state_tcp_t *)arg; LWIP_ASSERT("pcb mismatch", conn->conn_pcb == tpcb); LWIP_UNUSED_ARG(tpcb); if (++conn->poll_count >= LWIPERF_TCP_MAX_IDLE_SEC) { @@ -541,16 +596,28 @@ lwiperf_tcp_accept(void *arg, struct tcp_pcb *newpcb, err_t err) return ERR_VAL; } - s = (lwiperf_state_tcp_t*)arg; - conn = (lwiperf_state_tcp_t*)LWIPERF_ALLOC(lwiperf_state_tcp_t); + s = (lwiperf_state_tcp_t *)arg; + LWIP_ASSERT("invalid session", s->base.server); + LWIP_ASSERT("invalid listen pcb", s->server_pcb != NULL); + LWIP_ASSERT("invalid conn pcb", s->conn_pcb == NULL); + if (s->specific_remote) { + LWIP_ASSERT("s->base.related_master_state != NULL", s->base.related_master_state != NULL); + if (!ip_addr_cmp(&newpcb->remote_ip, &s->remote_addr)) { + /* this listener belongs to a client session, and this is not the correct remote */ + return ERR_VAL; + } + } else { + LWIP_ASSERT("s->base.related_master_state == NULL", s->base.related_master_state == NULL); + } + + conn = (lwiperf_state_tcp_t *)LWIPERF_ALLOC(lwiperf_state_tcp_t); if (conn == NULL) { return ERR_MEM; } memset(conn, 0, sizeof(lwiperf_state_tcp_t)); conn->base.tcp = 1; conn->base.server = 1; - conn->base.related_server_state = &s->base; - conn->server_pcb = s->server_pcb; + conn->base.related_master_state = &s->base; conn->conn_pcb = newpcb; conn->time_started = sys_now(); conn->report_fn = s->report_fn; @@ -562,11 +629,21 @@ lwiperf_tcp_accept(void *arg, struct tcp_pcb *newpcb, err_t err) tcp_poll(newpcb, lwiperf_tcp_poll, 2U); tcp_err(conn->conn_pcb, lwiperf_tcp_err); + if (s->specific_remote) { + /* this listener belongs to a client, so make the client the master of the newly created connection */ + conn->base.related_master_state = s->base.related_master_state; + /* if dual mode or (tradeoff mode AND client is done): close the listener */ + if (!s->client_tradeoff_mode || !lwiperf_list_find(s->base.related_master_state)) { + /* prevent report when closing: this is expected */ + s->report_fn = NULL; + lwiperf_tcp_close(s, LWIPERF_TCP_ABORTED_LOCAL); + } + } lwiperf_list_add(&conn->base); return ERR_OK; } -/** +/** * @ingroup iperf * Start a TCP iperf server on the default TCP port (5001) and listen for * incoming connections from iperf clients. @@ -574,11 +651,11 @@ lwiperf_tcp_accept(void *arg, struct tcp_pcb *newpcb, err_t err) * @returns a connection handle that can be used to abort the server * by calling @ref lwiperf_abort() */ -void* -lwiperf_start_tcp_server_default(lwiperf_report_fn report_fn, void* report_arg) +void * +lwiperf_start_tcp_server_default(lwiperf_report_fn report_fn, void *report_arg) { return lwiperf_start_tcp_server(IP_ADDR_ANY, LWIPERF_TCP_PORT_DEFAULT, - report_fn, report_arg); + report_fn, report_arg); } /** @@ -589,41 +666,63 @@ lwiperf_start_tcp_server_default(lwiperf_report_fn report_fn, void* report_arg) * @returns a connection handle that can be used to abort the server * by calling @ref lwiperf_abort() */ -void* -lwiperf_start_tcp_server(const ip_addr_t* local_addr, u16_t local_port, - lwiperf_report_fn report_fn, void* report_arg) +void * +lwiperf_start_tcp_server(const ip_addr_t *local_addr, u16_t local_port, + lwiperf_report_fn report_fn, void *report_arg) { err_t err; - struct tcp_pcb* pcb; - lwiperf_state_tcp_t* s; + lwiperf_state_tcp_t *state = NULL; + + err = lwiperf_start_tcp_server_impl(local_addr, local_port, report_fn, report_arg, + NULL, &state); + if (err == ERR_OK) { + return state; + } + return NULL; +} + +static err_t lwiperf_start_tcp_server_impl(const ip_addr_t *local_addr, u16_t local_port, + lwiperf_report_fn report_fn, void *report_arg, + lwiperf_state_base_t *related_master_state, lwiperf_state_tcp_t **state) +{ + err_t err; + struct tcp_pcb *pcb; + lwiperf_state_tcp_t *s; + + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ASSERT("state != NULL", state != NULL); if (local_addr == NULL) { - return NULL; + return ERR_ARG; } - s = (lwiperf_state_tcp_t*)LWIPERF_ALLOC(lwiperf_state_tcp_t); + s = (lwiperf_state_tcp_t *)LWIPERF_ALLOC(lwiperf_state_tcp_t); if (s == NULL) { - return NULL; + return ERR_MEM; } memset(s, 0, sizeof(lwiperf_state_tcp_t)); s->base.tcp = 1; s->base.server = 1; + s->base.related_master_state = related_master_state; s->report_fn = report_fn; s->report_arg = report_arg; - pcb = tcp_new(); - if (pcb != NULL) { - err = tcp_bind(pcb, local_addr, local_port); - if (err == ERR_OK) { - s->server_pcb = tcp_listen_with_backlog(pcb, 1); - } + pcb = tcp_new_ip_type(LWIPERF_SERVER_IP_TYPE); + if (pcb == NULL) { + return ERR_MEM; } + err = tcp_bind(pcb, local_addr, local_port); + if (err != ERR_OK) { + return err; + } + s->server_pcb = tcp_listen_with_backlog(pcb, 1); if (s->server_pcb == NULL) { if (pcb != NULL) { tcp_close(pcb); } LWIPERF_FREE(lwiperf_state_tcp_t, s); - return NULL; + return ERR_MEM; } pcb = NULL; @@ -631,7 +730,86 @@ lwiperf_start_tcp_server(const ip_addr_t* local_addr, u16_t local_port, tcp_accept(s->server_pcb, lwiperf_tcp_accept); lwiperf_list_add(&s->base); - return s; + *state = s; + return ERR_OK; +} + +/** + * @ingroup iperf + * Start a TCP iperf client to the default TCP port (5001). + * + * @returns a connection handle that can be used to abort the client + * by calling @ref lwiperf_abort() + */ +void* lwiperf_start_tcp_client_default(const ip_addr_t* remote_addr, + lwiperf_report_fn report_fn, void* report_arg) +{ + return lwiperf_start_tcp_client(remote_addr, LWIPERF_TCP_PORT_DEFAULT, LWIPERF_CLIENT, + report_fn, report_arg); +} + +/** + * @ingroup iperf + * Start a TCP iperf client to a specific IP address and port. + * + * @returns a connection handle that can be used to abort the client + * by calling @ref lwiperf_abort() + */ +void* lwiperf_start_tcp_client(const ip_addr_t* remote_addr, u16_t remote_port, + enum lwiperf_client_type type, lwiperf_report_fn report_fn, void* report_arg) +{ + err_t ret; + lwiperf_settings_t settings; + lwiperf_state_tcp_t *state = NULL; + + memset(&settings, 0, sizeof(settings)); + switch (type) { + case LWIPERF_CLIENT: + /* Unidirectional tx only test */ + settings.flags = 0; + break; + case LWIPERF_DUAL: + /* Do a bidirectional test simultaneously */ + settings.flags = htonl(LWIPERF_FLAGS_ANSWER_TEST | LWIPERF_FLAGS_ANSWER_NOW); + break; + case LWIPERF_TRADEOFF: + /* Do a bidirectional test individually */ + settings.flags = htonl(LWIPERF_FLAGS_ANSWER_TEST); + break; + default: + /* invalid argument */ + return NULL; + } + settings.num_threads = htonl(1); + settings.remote_port = htonl(LWIPERF_TCP_PORT_DEFAULT); + /* TODO: implement passing duration/amount of bytes to transfer */ + settings.amount = htonl((u32_t)-1000); + + ret = lwiperf_tx_start_impl(remote_addr, remote_port, &settings, report_fn, report_arg, NULL, &state); + if (ret == ERR_OK) { + LWIP_ASSERT("state != NULL", state != NULL); + if (type != LWIPERF_CLIENT) { + /* start corresponding server now */ + lwiperf_state_tcp_t *server = NULL; + ret = lwiperf_start_tcp_server_impl(&state->conn_pcb->local_ip, LWIPERF_TCP_PORT_DEFAULT, + report_fn, report_arg, (lwiperf_state_base_t *)state, &server); + if (ret != ERR_OK) { + /* starting server failed, abort client */ + lwiperf_abort(state); + return NULL; + } + /* make this server accept one connection only */ + server->specific_remote = 1; + server->remote_addr = state->conn_pcb->remote_ip; + if (type == LWIPERF_TRADEOFF) { + /* tradeoff means that the remote host connects only after the client is done, + so keep the listen pcb open until the client is done */ + server->client_tradeoff_mode = 1; + } + } + return state; + } + return NULL; } /** @@ -639,12 +817,14 @@ lwiperf_start_tcp_server(const ip_addr_t* local_addr, u16_t local_port, * Abort an iperf session (handle returned by lwiperf_start_tcp_server*()) */ void -lwiperf_abort(void* lwiperf_session) +lwiperf_abort(void *lwiperf_session) { - lwiperf_state_base_t* i, *dealloc, *last = NULL; + lwiperf_state_base_t *i, *dealloc, *last = NULL; + + LWIP_ASSERT_CORE_LOCKED(); for (i = lwiperf_all_connections; i != NULL; ) { - if ((i == lwiperf_session) || (i->related_server_state == lwiperf_session)) { + if ((i == lwiperf_session) || (i->related_master_state == lwiperf_session)) { dealloc = i; i = i->next; if (last != NULL) { @@ -658,4 +838,4 @@ lwiperf_abort(void* lwiperf_session) } } -#endif /* LWIP_IPV4 && LWIP_TCP && LWIP_CALLBACK_API */ +#endif /* LWIP_TCP && LWIP_CALLBACK_API */ diff --git a/Libraries/LwIP/src/apps/mdns/mdns.c b/Libraries/LwIP/src/apps/mdns/mdns.c index 5b6aa7c..46314d2 100755 --- a/Libraries/LwIP/src/apps/mdns/mdns.c +++ b/Libraries/LwIP/src/apps/mdns/mdns.c @@ -7,18 +7,17 @@ * * RFC 6762 - Multicast DNS\n * RFC 6763 - DNS-Based Service Discovery\n - * + * * @verbinclude mdns.txt - * + * * Things left to implement: * ------------------------- * - * - Probing/conflict resolution + * - Tiebreaking for simultaneous probing * - Sending goodbye messages (zero ttl) - shutdown, DHCP lease about to expire, DHCP turned off... * - Checking that source address of unicast requests are on the same network * - Limiting multicast responses to 1 per second per resource record * - Fragmenting replies if required - * - Subscribe to netif address/link change events and act on them (currently needs to be done manually) * - Handling multi-packet known answers * - Individual known answer detection for all local IPv6 addresses * - Dynamic size of outgoing packet @@ -63,19 +62,21 @@ #include "lwip/ip_addr.h" #include "lwip/mem.h" #include "lwip/prot/dns.h" +#include "lwip/prot/iana.h" +#include "lwip/timeouts.h" #include #if LWIP_MDNS_RESPONDER #if (LWIP_IPV4 && !LWIP_IGMP) - #error "If you want to use MDNS with IPv4, you have to define LWIP_IGMP=1 in your lwipopts.h" +#error "If you want to use MDNS with IPv4, you have to define LWIP_IGMP=1 in your lwipopts.h" #endif #if (LWIP_IPV6 && !LWIP_IPV6_MLD) #error "If you want to use MDNS with IPv6, you have to define LWIP_IPV6_MLD=1 in your lwipopts.h" #endif #if (!LWIP_UDP) - #error "If you want to use MDNS, you have to define LWIP_UDP=1 in your lwipopts.h" +#error "If you want to use MDNS, you have to define LWIP_UDP=1 in your lwipopts.h" #endif #if LWIP_IPV4 @@ -90,7 +91,6 @@ static const ip_addr_t v4group = DNS_MQUERY_IPV4_GROUP_INIT; static const ip_addr_t v6group = DNS_MQUERY_IPV6_GROUP_INIT; #endif -#define MDNS_PORT 5353 #define MDNS_TTL 255 /* Stored offsets to beginning of domain names @@ -102,6 +102,10 @@ static const ip_addr_t v6group = DNS_MQUERY_IPV6_GROUP_INIT; static u8_t mdns_netif_client_id; static struct udp_pcb *mdns_pcb; +#if MDNS_RESP_USENETIF_EXTCALLBACK +NETIF_DECLARE_EXT_CALLBACK(netif_callback) +#endif +static mdns_name_result_cb_t mdns_name_result_cb; #define NETIF_TO_HOST(netif) (struct mdns_host*)(netif_get_client_data(netif, mdns_netif_client_id)) @@ -135,9 +139,22 @@ static struct udp_pcb *mdns_pcb; /* Lookup for text info on service instance */ #define REPLY_SERVICE_TXT 0x80 +#define MDNS_PROBE_DELAY_MS 250 +#define MDNS_PROBE_COUNT 3 +#ifdef LWIP_RAND +/* first probe timeout SHOULD be random 0-250 ms*/ +#define MDNS_INITIAL_PROBE_DELAY_MS (LWIP_RAND() % MDNS_PROBE_DELAY_MS) +#else +#define MDNS_INITIAL_PROBE_DELAY_MS MDNS_PROBE_DELAY_MS +#endif + +#define MDNS_PROBING_NOT_STARTED 0 +#define MDNS_PROBING_ONGOING 1 +#define MDNS_PROBING_COMPLETE 2 + static const char *dnssd_protos[] = { - "_udp", /* DNSSD_PROTO_UDP */ - "_tcp", /* DNSSD_PROTO_TCP */ + "_udp", /* DNSSD_PROTO_UDP */ + "_tcp", /* DNSSD_PROTO_TCP */ }; /** Description of a service */ @@ -168,6 +185,10 @@ struct mdns_host { struct mdns_service *services[MDNS_MAX_SERVICES]; /** TTL in seconds of A/AAAA/PTR replies */ u32_t dns_ttl; + /** Number of probes sent for the current name */ + u8_t probes_sent; + /** State in probing sequence */ + u8_t probing_state; }; /** Information about received packet */ @@ -191,7 +212,7 @@ struct mdns_packet { /** Number of unparsed questions */ u16_t questions_left; /** Number of answers in packet, - * (sum of normal, authorative and additional answers) + * (sum of normal, authoritative and additional answers) * read from packet header */ u16_t answers; /** Number of unparsed answers */ @@ -215,6 +236,8 @@ struct mdns_outpacket { u16_t questions; /** Number of normal answers written */ u16_t answers; + /** Number of authoritative answers written */ + u16_t authoritative; /** Number of additional answers written */ u16_t additional; /** Offsets for written domain names in packet. @@ -261,15 +284,11 @@ struct mdns_answer { u16_t rd_offset; }; -/** - * Add a label part to a domain - * @param domain The domain to add a label to - * @param label The label to add, like <hostname>, 'local', 'com' or '' - * @param len The length of the label - * @return ERR_OK on success, an err_t otherwise if label too long - */ -err_t -mdns_domain_add_label(struct mdns_domain *domain, const char *label, u8_t len) +static err_t mdns_send_outpacket(struct mdns_outpacket *outpkt, u8_t flags); +static void mdns_probe(void* arg); + +static err_t +mdns_domain_add_label_base(struct mdns_domain *domain, u8_t len) { if (len > MDNS_LABEL_MAXLEN) { return ERR_VAL; @@ -283,6 +302,23 @@ mdns_domain_add_label(struct mdns_domain *domain, const char *label, u8_t len) } domain->name[domain->length] = len; domain->length++; + return ERR_OK; +} + +/** + * Add a label part to a domain + * @param domain The domain to add a label to + * @param label The label to add, like <hostname>, 'local', 'com' or '' + * @param len The length of the label + * @return ERR_OK on success, an err_t otherwise if label too long + */ +err_t +mdns_domain_add_label(struct mdns_domain *domain, const char *label, u8_t len) +{ + err_t err = mdns_domain_add_label_base(domain, len); + if (err != ERR_OK) { + return err; + } if (len) { MEMCPY(&domain->name[domain->length], label, len); domain->length += len; @@ -290,6 +326,27 @@ mdns_domain_add_label(struct mdns_domain *domain, const char *label, u8_t len) return ERR_OK; } +/** + * Add a label part to a domain (@see mdns_domain_add_label but copy directly from pbuf) + */ +static err_t +mdns_domain_add_label_pbuf(struct mdns_domain *domain, const struct pbuf *p, u16_t offset, u8_t len) +{ + err_t err = mdns_domain_add_label_base(domain, len); + if (err != ERR_OK) { + return err; + } + if (len) { + if (pbuf_copy_partial(p, &domain->name[domain->length], len, offset) != len) { + /* take back the ++ done before */ + domain->length--; + return ERR_ARG; + } + domain->length += len; + } + return ERR_OK; +} + /** * Internal readname function with max 6 levels of recursion following jumps * while decompressing name @@ -309,7 +366,7 @@ mdns_readname_loop(struct pbuf *p, u16_t offset, struct mdns_domain *domain, uns offset++; /* is this a compressed label? */ - if((c & 0xc0) == 0xc0) { + if ((c & 0xc0) == 0xc0) { u16_t jumpaddr; if (offset >= p->tot_len) { /* Make sure both jump bytes fit in the packet */ @@ -319,7 +376,7 @@ mdns_readname_loop(struct pbuf *p, u16_t offset, struct mdns_domain *domain, uns offset++; if (jumpaddr >= SIZEOF_DNS_HDR && jumpaddr < p->tot_len) { u16_t res; - /* Recursive call, maximum depth will be checked */ + /* Recursive call, maximum depth will be checked */ res = mdns_readname_loop(p, jumpaddr, domain, depth + 1); /* Dont return offset since new bytes were not read (jumped to somewhere in packet) */ if (res == MDNS_READNAME_ERROR) { @@ -333,22 +390,16 @@ mdns_readname_loop(struct pbuf *p, u16_t offset, struct mdns_domain *domain, uns /* normal label */ if (c <= MDNS_LABEL_MAXLEN) { - u8_t label[MDNS_LABEL_MAXLEN]; err_t res; if (c + domain->length >= MDNS_DOMAIN_MAXLEN) { return MDNS_READNAME_ERROR; } - if (c != 0) { - if (pbuf_copy_partial(p, label, c, offset) != c) { - return MDNS_READNAME_ERROR; - } - offset += c; - } - res = mdns_domain_add_label(domain, (char *) label, c); + res = mdns_domain_add_label_pbuf(domain, p, offset, c); if (res != ERR_OK) { return MDNS_READNAME_ERROR; } + offset += c; } else { /* bad length byte */ return MDNS_READNAME_ERROR; @@ -460,6 +511,8 @@ mdns_build_reverse_v4_domain(struct mdns_domain *domain, const ip4_addr_t *addr) int i; err_t res; const u8_t *ptr; + + LWIP_UNUSED_ARG(res); if (!domain || !addr) { return ERR_ARG; } @@ -473,9 +526,9 @@ mdns_build_reverse_v4_domain(struct mdns_domain *domain, const ip4_addr_t *addr) res = mdns_domain_add_label(domain, buf, (u8_t)strlen(buf)); LWIP_ERROR("mdns_build_reverse_v4_domain: Failed to add label", (res == ERR_OK), return res); } - res = mdns_domain_add_label(domain, REVERSE_PTR_V4_DOMAIN, (u8_t)(sizeof(REVERSE_PTR_V4_DOMAIN)-1)); + res = mdns_domain_add_label(domain, REVERSE_PTR_V4_DOMAIN, (u8_t)(sizeof(REVERSE_PTR_V4_DOMAIN) - 1)); LWIP_ERROR("mdns_build_reverse_v4_domain: Failed to add label", (res == ERR_OK), return res); - res = mdns_domain_add_label(domain, REVERSE_PTR_TOPDOMAIN, (u8_t)(sizeof(REVERSE_PTR_TOPDOMAIN)-1)); + res = mdns_domain_add_label(domain, REVERSE_PTR_TOPDOMAIN, (u8_t)(sizeof(REVERSE_PTR_TOPDOMAIN) - 1)); LWIP_ERROR("mdns_build_reverse_v4_domain: Failed to add label", (res == ERR_OK), return res); res = mdns_domain_add_label(domain, NULL, 0); LWIP_ERROR("mdns_build_reverse_v4_domain: Failed to add label", (res == ERR_OK), return res); @@ -498,12 +551,13 @@ mdns_build_reverse_v6_domain(struct mdns_domain *domain, const ip6_addr_t *addr) int i; err_t res; const u8_t *ptr; + LWIP_UNUSED_ARG(res); if (!domain || !addr) { return ERR_ARG; } memset(domain, 0, sizeof(struct mdns_domain)); ptr = (const u8_t *) addr; - for (i = sizeof(ip6_addr_t) - 1; i >= 0; i--) { + for (i = sizeof(ip6_addr_p_t) - 1; i >= 0; i--) { char buf; u8_t byte = ptr[i]; int j; @@ -518,9 +572,9 @@ mdns_build_reverse_v6_domain(struct mdns_domain *domain, const ip6_addr_t *addr) byte >>= 4; } } - res = mdns_domain_add_label(domain, REVERSE_PTR_V6_DOMAIN, (u8_t)(sizeof(REVERSE_PTR_V6_DOMAIN)-1)); + res = mdns_domain_add_label(domain, REVERSE_PTR_V6_DOMAIN, (u8_t)(sizeof(REVERSE_PTR_V6_DOMAIN) - 1)); LWIP_ERROR("mdns_build_reverse_v6_domain: Failed to add label", (res == ERR_OK), return res); - res = mdns_domain_add_label(domain, REVERSE_PTR_TOPDOMAIN, (u8_t)(sizeof(REVERSE_PTR_TOPDOMAIN)-1)); + res = mdns_domain_add_label(domain, REVERSE_PTR_TOPDOMAIN, (u8_t)(sizeof(REVERSE_PTR_TOPDOMAIN) - 1)); LWIP_ERROR("mdns_build_reverse_v6_domain: Failed to add label", (res == ERR_OK), return res); res = mdns_domain_add_label(domain, NULL, 0); LWIP_ERROR("mdns_build_reverse_v6_domain: Failed to add label", (res == ERR_OK), return res); @@ -533,7 +587,8 @@ mdns_build_reverse_v6_domain(struct mdns_domain *domain, const ip6_addr_t *addr) static err_t mdns_add_dotlocal(struct mdns_domain *domain) { - err_t res = mdns_domain_add_label(domain, TOPDOMAIN_LOCAL, (u8_t)(sizeof(TOPDOMAIN_LOCAL)-1)); + err_t res = mdns_domain_add_label(domain, TOPDOMAIN_LOCAL, (u8_t)(sizeof(TOPDOMAIN_LOCAL) - 1)); + LWIP_UNUSED_ARG(res); LWIP_ERROR("mdns_add_dotlocal: Failed to add label", (res == ERR_OK), return res); return mdns_domain_add_label(domain, NULL, 0); } @@ -548,6 +603,7 @@ static err_t mdns_build_host_domain(struct mdns_domain *domain, struct mdns_host *mdns) { err_t res; + LWIP_UNUSED_ARG(res); memset(domain, 0, sizeof(struct mdns_domain)); LWIP_ERROR("mdns_build_host_domain: mdns != NULL", (mdns != NULL), return ERR_VAL); res = mdns_domain_add_label(domain, mdns->name, (u8_t)strlen(mdns->name)); @@ -564,10 +620,11 @@ static err_t mdns_build_dnssd_domain(struct mdns_domain *domain) { err_t res; + LWIP_UNUSED_ARG(res); memset(domain, 0, sizeof(struct mdns_domain)); - res = mdns_domain_add_label(domain, "_services", (u8_t)(sizeof("_services")-1)); + res = mdns_domain_add_label(domain, "_services", (u8_t)(sizeof("_services") - 1)); LWIP_ERROR("mdns_build_dnssd_domain: Failed to add label", (res == ERR_OK), return res); - res = mdns_domain_add_label(domain, "_dns-sd", (u8_t)(sizeof("_dns-sd")-1)); + res = mdns_domain_add_label(domain, "_dns-sd", (u8_t)(sizeof("_dns-sd") - 1)); LWIP_ERROR("mdns_build_dnssd_domain: Failed to add label", (res == ERR_OK), return res); res = mdns_domain_add_label(domain, dnssd_protos[DNSSD_PROTO_UDP], (u8_t)strlen(dnssd_protos[DNSSD_PROTO_UDP])); LWIP_ERROR("mdns_build_dnssd_domain: Failed to add label", (res == ERR_OK), return res); @@ -587,6 +644,7 @@ static err_t mdns_build_service_domain(struct mdns_domain *domain, struct mdns_service *service, int include_name) { err_t res; + LWIP_UNUSED_ARG(res); memset(domain, 0, sizeof(struct mdns_domain)); if (include_name) { res = mdns_domain_add_label(domain, service->name, (u8_t)strlen(service->name)); @@ -785,7 +843,7 @@ mdns_write_domain(struct mdns_outpacket *outpkt, struct mdns_domain *domain) u16_t jump; if (!domain->skip_compression) { - for (i = 0; i < NUM_DOMAIN_OFFSETS; ++i) { + for (i = 0; i < NUM_DOMAIN_OFFSETS; i++) { u16_t offset = outpkt->domain_offsets[i]; if (offset) { u16_t len = mdns_compress_domain(outpkt->pbuf, &offset, domain); @@ -805,7 +863,7 @@ mdns_write_domain(struct mdns_outpacket *outpkt, struct mdns_domain *domain) } /* Store offset of this new domain */ - for (i = 0; i < NUM_DOMAIN_OFFSETS; ++i) { + for (i = 0; i < NUM_DOMAIN_OFFSETS; i++) { if (outpkt->domain_offsets[i] == 0) { outpkt->domain_offsets[i] = outpkt->write_offset; break; @@ -1138,7 +1196,7 @@ mdns_add_aaaa_answer(struct mdns_outpacket *reply, u16_t cache_flush, struct net struct mdns_domain host; mdns_build_host_domain(&host, NETIF_TO_HOST(netif)); LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Responding with AAAA record\n")); - return mdns_add_answer(reply, &host, DNS_RRTYPE_AAAA, DNS_RRCLASS_IN, cache_flush, (NETIF_TO_HOST(netif))->dns_ttl, (const u8_t *) netif_ip6_addr(netif, addrindex), sizeof(ip6_addr_t), NULL); + return mdns_add_answer(reply, &host, DNS_RRTYPE_AAAA, DNS_RRCLASS_IN, cache_flush, (NETIF_TO_HOST(netif))->dns_ttl, (const u8_t *) netif_ip6_addr(netif, addrindex), sizeof(ip6_addr_p_t), NULL); } /** Write a x.y.z.ip6.arpa -> hostname.local PTR RR to outpacket */ @@ -1226,7 +1284,7 @@ mdns_init_outpacket(struct mdns_outpacket *out, struct mdns_packet *in) SMEMCPY(&out->dest_addr, &in->source_addr, sizeof(ip_addr_t)); out->dest_port = in->source_port; - if (in->source_port != MDNS_PORT) { + if (in->source_port != LWIP_IANA_PORT_MDNS) { out->unicast_reply = 1; out->cache_flush = 0; if (in->questions == 1) { @@ -1247,13 +1305,14 @@ mdns_init_outpacket(struct mdns_outpacket *out, struct mdns_packet *in) * Add additional answers based on the selected answers * Send the packet */ -static void -mdns_send_outpacket(struct mdns_outpacket *outpkt) +static err_t +mdns_send_outpacket(struct mdns_outpacket *outpkt, u8_t flags) { struct mdns_service *service; - err_t res; + err_t res = ERR_ARG; int i; - struct mdns_host* mdns = NETIF_TO_HOST(outpkt->netif); + struct mdns_host *mdns = NETIF_TO_HOST(outpkt->netif); + u16_t answers = 0; /* Write answers to host questions */ #if LWIP_IPV4 @@ -1262,26 +1321,26 @@ mdns_send_outpacket(struct mdns_outpacket *outpkt) if (res != ERR_OK) { goto cleanup; } - outpkt->answers++; + answers++; } if (outpkt->host_replies & REPLY_HOST_PTR_V4) { res = mdns_add_hostv4_ptr_answer(outpkt, outpkt->cache_flush, outpkt->netif); if (res != ERR_OK) { goto cleanup; } - outpkt->answers++; + answers++; } #endif #if LWIP_IPV6 if (outpkt->host_replies & REPLY_HOST_AAAA) { int addrindex; - for (addrindex = 0; addrindex < LWIP_IPV6_NUM_ADDRESSES; ++addrindex) { + for (addrindex = 0; addrindex < LWIP_IPV6_NUM_ADDRESSES; addrindex++) { if (ip6_addr_isvalid(netif_ip6_addr_state(outpkt->netif, addrindex))) { res = mdns_add_aaaa_answer(outpkt, outpkt->cache_flush, outpkt->netif, addrindex); if (res != ERR_OK) { goto cleanup; } - outpkt->answers++; + answers++; } } } @@ -1294,7 +1353,7 @@ mdns_send_outpacket(struct mdns_outpacket *outpkt) if (res != ERR_OK) { goto cleanup; } - outpkt->answers++; + answers++; } addrindex++; rev_addrs >>= 1; @@ -1303,7 +1362,7 @@ mdns_send_outpacket(struct mdns_outpacket *outpkt) #endif /* Write answers to service questions */ - for (i = 0; i < MDNS_MAX_SERVICES; ++i) { + for (i = 0; i < MDNS_MAX_SERVICES; i++) { service = mdns->services[i]; if (!service) { continue; @@ -1314,7 +1373,7 @@ mdns_send_outpacket(struct mdns_outpacket *outpkt) if (res != ERR_OK) { goto cleanup; } - outpkt->answers++; + answers++; } if (outpkt->serv_replies[i] & REPLY_SERVICE_NAME_PTR) { @@ -1322,7 +1381,7 @@ mdns_send_outpacket(struct mdns_outpacket *outpkt) if (res != ERR_OK) { goto cleanup; } - outpkt->answers++; + answers++; } if (outpkt->serv_replies[i] & REPLY_SERVICE_SRV) { @@ -1330,7 +1389,7 @@ mdns_send_outpacket(struct mdns_outpacket *outpkt) if (res != ERR_OK) { goto cleanup; } - outpkt->answers++; + answers++; } if (outpkt->serv_replies[i] & REPLY_SERVICE_TXT) { @@ -1338,12 +1397,19 @@ mdns_send_outpacket(struct mdns_outpacket *outpkt) if (res != ERR_OK) { goto cleanup; } - outpkt->answers++; + answers++; } } + /* if this is a response, the data above is anwers, else this is a probe and the answers above goes into auth section */ + if (flags & DNS_FLAG1_RESPONSE) { + outpkt->answers += answers; + } else { + outpkt->authoritative += answers; + } + /* All answers written, add additional RRs */ - for (i = 0; i < MDNS_MAX_SERVICES; ++i) { + for (i = 0; i < MDNS_MAX_SERVICES; i++) { service = mdns->services[i]; if (!service) { continue; @@ -1377,7 +1443,7 @@ mdns_send_outpacket(struct mdns_outpacket *outpkt) #if LWIP_IPV6 if (!(outpkt->host_replies & REPLY_HOST_AAAA)) { int addrindex; - for (addrindex = 0; addrindex < LWIP_IPV6_NUM_ADDRESSES; ++addrindex) { + for (addrindex = 0; addrindex < LWIP_IPV6_NUM_ADDRESSES; addrindex++) { if (ip6_addr_isvalid(netif_ip6_addr_state(outpkt->netif, addrindex))) { res = mdns_add_aaaa_answer(outpkt, outpkt->cache_flush, outpkt->netif, addrindex); if (res != ERR_OK) { @@ -1389,7 +1455,8 @@ mdns_send_outpacket(struct mdns_outpacket *outpkt) } #endif #if LWIP_IPV4 - if (!(outpkt->host_replies & REPLY_HOST_A)) { + if (!(outpkt->host_replies & REPLY_HOST_A) && + !ip4_addr_isany_val(*netif_ip4_addr(outpkt->netif))) { res = mdns_add_a_answer(outpkt, outpkt->cache_flush, outpkt->netif); if (res != ERR_OK) { goto cleanup; @@ -1406,13 +1473,12 @@ mdns_send_outpacket(struct mdns_outpacket *outpkt) /* Write header */ memset(&hdr, 0, sizeof(hdr)); - hdr.flags1 = DNS_FLAG1_RESPONSE | DNS_FLAG1_AUTHORATIVE; + hdr.flags1 = flags; + hdr.numquestions = lwip_htons(outpkt->questions); hdr.numanswers = lwip_htons(outpkt->answers); + hdr.numauthrr = lwip_htons(outpkt->authoritative); hdr.numextrarr = lwip_htons(outpkt->additional); - if (outpkt->legacy_query) { - hdr.numquestions = lwip_htons(1); - hdr.id = lwip_htons(outpkt->tx_id); - } + hdr.id = lwip_htons(outpkt->tx_id); pbuf_take(outpkt->pbuf, &hdr, sizeof(hdr)); /* Shrink packet */ @@ -1430,9 +1496,9 @@ mdns_send_outpacket(struct mdns_outpacket *outpkt) /* Send created packet */ LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Sending packet, len=%d, unicast=%d\n", outpkt->write_offset, outpkt->unicast_reply)); if (outpkt->unicast_reply) { - udp_sendto_if(mdns_pcb, outpkt->pbuf, &outpkt->dest_addr, outpkt->dest_port, outpkt->netif); + res = udp_sendto_if(mdns_pcb, outpkt->pbuf, &outpkt->dest_addr, outpkt->dest_port, outpkt->netif); } else { - udp_sendto_if(mdns_pcb, outpkt->pbuf, mcast_destaddr, MDNS_PORT, outpkt->netif); + res = udp_sendto_if(mdns_pcb, outpkt->pbuf, mcast_destaddr, LWIP_IANA_PORT_MDNS, outpkt->netif); } } @@ -1441,6 +1507,7 @@ cleanup: pbuf_free(outpkt->pbuf); outpkt->pbuf = NULL; } + return res; } /** @@ -1453,17 +1520,18 @@ mdns_announce(struct netif *netif, const ip_addr_t *destination) { struct mdns_outpacket announce; int i; - struct mdns_host* mdns = NETIF_TO_HOST(netif); + struct mdns_host *mdns = NETIF_TO_HOST(netif); memset(&announce, 0, sizeof(announce)); announce.netif = netif; announce.cache_flush = 1; #if LWIP_IPV4 - if (!ip4_addr_isany_val(*netif_ip4_addr(netif))) + if (!ip4_addr_isany_val(*netif_ip4_addr(netif))) { announce.host_replies = REPLY_HOST_A | REPLY_HOST_PTR_V4; + } #endif #if LWIP_IPV6 - for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; ++i) { + for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i))) { announce.host_replies |= REPLY_HOST_AAAA | REPLY_HOST_PTR_V6; announce.host_reverse_v6_replies |= (1 << i); @@ -1475,13 +1543,13 @@ mdns_announce(struct netif *netif, const ip_addr_t *destination) struct mdns_service *serv = mdns->services[i]; if (serv) { announce.serv_replies[i] = REPLY_SERVICE_TYPE_PTR | REPLY_SERVICE_NAME_PTR | - REPLY_SERVICE_SRV | REPLY_SERVICE_TXT; + REPLY_SERVICE_SRV | REPLY_SERVICE_TXT; } } - announce.dest_port = MDNS_PORT; + announce.dest_port = LWIP_IANA_PORT_MDNS; SMEMCPY(&announce.dest_addr, destination, sizeof(announce.dest_addr)); - mdns_send_outpacket(&announce); + mdns_send_outpacket(&announce, DNS_FLAG1_RESPONSE | DNS_FLAG1_AUTHORATIVE); } /** @@ -1498,7 +1566,13 @@ mdns_handle_question(struct mdns_packet *pkt) int replies = 0; int i; err_t res; - struct mdns_host* mdns = NETIF_TO_HOST(pkt->netif); + struct mdns_host *mdns = NETIF_TO_HOST(pkt->netif); + + if (mdns->probing_state != MDNS_PROBING_COMPLETE) { + /* Don't answer questions until we've verified our domains via probing */ + /* @todo we should check incoming questions during probing for tiebreaking */ + return; + } mdns_init_outpacket(&reply, pkt); @@ -1523,7 +1597,7 @@ mdns_handle_question(struct mdns_packet *pkt) reply.host_replies |= check_host(pkt->netif, &q.info, &reply.host_reverse_v6_replies); replies |= reply.host_replies; - for (i = 0; i < MDNS_MAX_SERVICES; ++i) { + for (i = 0; i < MDNS_MAX_SERVICES; i++) { service = mdns->services[i]; if (!service) { continue; @@ -1535,6 +1609,7 @@ mdns_handle_question(struct mdns_packet *pkt) if (replies && reply.legacy_query) { /* Add question to reply packet (legacy packet only has 1 question) */ res = mdns_add_question(&reply, &q.info.domain, q.info.type, q.info.klass, 0); + reply.questions = 1; if (res != ERR_OK) { goto cleanup; } @@ -1579,17 +1654,17 @@ mdns_handle_question(struct mdns_packet *pkt) if (len != MDNS_READNAME_ERROR && res == ERR_OK && mdns_domain_eq(&known_ans, &my_ans)) { #if LWIP_IPV4 if (match & REPLY_HOST_PTR_V4) { - LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Skipping known answer: v4 PTR\n")); - reply.host_replies &= ~REPLY_HOST_PTR_V4; + LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Skipping known answer: v4 PTR\n")); + reply.host_replies &= ~REPLY_HOST_PTR_V4; } #endif #if LWIP_IPV6 if (match & REPLY_HOST_PTR_V6) { - LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Skipping known answer: v6 PTR\n")); - reply.host_reverse_v6_replies &= ~rev_v6; - if (reply.host_reverse_v6_replies == 0) { - reply.host_replies &= ~REPLY_HOST_PTR_V6; - } + LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Skipping known answer: v6 PTR\n")); + reply.host_reverse_v6_replies &= ~rev_v6; + if (reply.host_reverse_v6_replies == 0) { + reply.host_replies &= ~REPLY_HOST_PTR_V6; + } } #endif } @@ -1603,7 +1678,7 @@ mdns_handle_question(struct mdns_packet *pkt) #endif } else if (match & REPLY_HOST_AAAA) { #if LWIP_IPV6 - if (ans.rd_length == sizeof(ip6_addr_t) && + if (ans.rd_length == sizeof(ip6_addr_p_t) && /* TODO this clears all AAAA responses if first addr is set as known */ pbuf_memcmp(pkt->pbuf, ans.rd_offset, netif_ip6_addr(pkt->netif, 0), ans.rd_length) == 0) { LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Skipping known answer: AAAA\n")); @@ -1613,7 +1688,7 @@ mdns_handle_question(struct mdns_packet *pkt) } } - for (i = 0; i < MDNS_MAX_SERVICES; ++i) { + for (i = 0; i < MDNS_MAX_SERVICES; i++) { service = mdns->services[i]; if (!service) { continue; @@ -1690,7 +1765,7 @@ mdns_handle_question(struct mdns_packet *pkt) } } - mdns_send_outpacket(&reply); + mdns_send_outpacket(&reply, DNS_FLAG1_RESPONSE | DNS_FLAG1_AUTHORATIVE); cleanup: if (reply.pbuf) { @@ -1707,6 +1782,8 @@ cleanup: static void mdns_handle_response(struct mdns_packet *pkt) { + struct mdns_host* mdns = NETIF_TO_HOST(pkt->netif); + /* Ignore all questions */ while (pkt->questions_left) { struct mdns_question q; @@ -1732,6 +1809,39 @@ mdns_handle_response(struct mdns_packet *pkt) LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Answer for domain ")); mdns_domain_debug_print(&ans.info.domain); LWIP_DEBUGF(MDNS_DEBUG, (" type %d class %d\n", ans.info.type, ans.info.klass)); + + /*"Apparently conflicting Multicast DNS responses received *before* the first probe packet is sent MUST + be silently ignored" so drop answer if we haven't started probing yet*/ + if ((mdns->probing_state == MDNS_PROBING_ONGOING) && (mdns->probes_sent > 0)) { + struct mdns_domain domain; + u8_t i; + u8_t conflict = 0; + + res = mdns_build_host_domain(&domain, mdns); + if (res == ERR_OK && mdns_domain_eq(&ans.info.domain, &domain)) { + LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Probe response matches host domain!")); + conflict = 1; + } + + for (i = 0; i < MDNS_MAX_SERVICES; i++) { + struct mdns_service* service = mdns->services[i]; + if (!service) { + continue; + } + res = mdns_build_service_domain(&domain, service, 1); + if ((res == ERR_OK) && mdns_domain_eq(&ans.info.domain, &domain)) { + LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Probe response matches service domain!")); + conflict = 1; + } + } + + if (conflict != 0) { + sys_untimeout(mdns_probe, pkt->netif); + if (mdns_name_result_cb != NULL) { + mdns_name_result_cb(pkt->netif, MDNS_PROBING_CONFLICT); + } + } + } } } @@ -1750,7 +1860,7 @@ mdns_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, LWIP_UNUSED_ARG(arg); LWIP_UNUSED_ARG(pcb); - LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Received IPv%d MDNS packet, len %d\n", IP_IS_V6(addr)? 6 : 4, p->tot_len)); + LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Received IPv%d MDNS packet, len %d\n", IP_IS_V6(addr) ? 6 : 4, p->tot_len)); if (NETIF_TO_HOST(recv_netif) == NULL) { /* From netif not configured for MDNS */ @@ -1780,7 +1890,8 @@ mdns_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, #if LWIP_IPV6 if (IP_IS_V6(ip_current_dest_addr())) { - if (!ip_addr_cmp(ip_current_dest_addr(), &v6group)) { + /* instead of having one 'v6group' per netif, just compare zoneless here */ + if (!ip_addr_cmp_zoneless(ip_current_dest_addr(), &v6group)) { packet.recv_unicast = 1; } } @@ -1803,59 +1914,141 @@ dealloc: pbuf_free(p); } -/** - * @ingroup mdns - * Initiate MDNS responder. Will open UDP sockets on port 5353 - */ -void -mdns_resp_init(void) +#if LWIP_NETIF_EXT_STATUS_CALLBACK && MDNS_RESP_USENETIF_EXTCALLBACK +static void +mdns_netif_ext_status_callback(struct netif *netif, netif_nsc_reason_t reason, const netif_ext_callback_args_t *args) { - err_t res; - - mdns_pcb = udp_new_ip_type(IPADDR_TYPE_ANY); - LWIP_ASSERT("Failed to allocate pcb", mdns_pcb != NULL); -#if LWIP_MULTICAST_TX_OPTIONS - udp_set_multicast_ttl(mdns_pcb, MDNS_TTL); -#else - mdns_pcb->ttl = MDNS_TTL; -#endif - res = udp_bind(mdns_pcb, IP_ANY_TYPE, MDNS_PORT); - LWIP_UNUSED_ARG(res); /* in case of LWIP_NOASSERT */ - LWIP_ASSERT("Failed to bind pcb", res == ERR_OK); - udp_recv(mdns_pcb, mdns_recv, NULL); - - mdns_netif_client_id = netif_alloc_client_data_id(); -} - -/** - * @ingroup mdns - * Announce IP settings have changed on netif. - * Call this in your callback registered by netif_set_status_callback(). - * This function may go away in the future when netif supports registering - * multiple callback functions. - * @param netif The network interface where settings have changed. - */ -void -mdns_resp_netif_settings_changed(struct netif *netif) -{ - LWIP_ERROR("mdns_resp_netif_ip_changed: netif != NULL", (netif != NULL), return); + LWIP_UNUSED_ARG(args); + /* MDNS enabled on netif? */ if (NETIF_TO_HOST(netif) == NULL) { return; } - /* Announce on IPv6 and IPv4 */ -#if LWIP_IPV6 - mdns_announce(netif, IP6_ADDR_ANY); -#endif + if (reason & LWIP_NSC_STATUS_CHANGED) { + if (args->status_changed.state != 0) { + mdns_resp_restart(netif); + } + /* TODO: send goodbye message */ + } + if (reason & LWIP_NSC_LINK_CHANGED) { + if (args->link_changed.state != 0) { + mdns_resp_restart(netif); + } + } + if (reason & (LWIP_NSC_IPV4_ADDRESS_CHANGED | LWIP_NSC_IPV4_GATEWAY_CHANGED | + LWIP_NSC_IPV4_NETMASK_CHANGED | LWIP_NSC_IPV4_SETTINGS_CHANGED | + LWIP_NSC_IPV6_SET | LWIP_NSC_IPV6_ADDR_STATE_CHANGED)) { + mdns_resp_announce(netif); + } +} +#endif /* LWIP_NETIF_EXT_STATUS_CALLBACK && MDNS_RESP_USENETIF_EXTCALLBACK */ + +static err_t +mdns_send_probe(struct netif* netif, const ip_addr_t *destination) +{ + struct mdns_host* mdns; + struct mdns_outpacket pkt; + struct mdns_domain domain; + u8_t i; + err_t res; + + mdns = NETIF_TO_HOST(netif); + + memset(&pkt, 0, sizeof(pkt)); + pkt.netif = netif; + + /* Add unicast questions with rtype ANY for all our desired records */ + mdns_build_host_domain(&domain, mdns); + res = mdns_add_question(&pkt, &domain, DNS_RRTYPE_ANY, DNS_RRCLASS_IN, 1); + if (res != ERR_OK) { + goto cleanup; + } + pkt.questions++; + for (i = 0; i < MDNS_MAX_SERVICES; i++) { + struct mdns_service* service = mdns->services[i]; + if (!service) { + continue; + } + mdns_build_service_domain(&domain, service, 1); + res = mdns_add_question(&pkt, &domain, DNS_RRTYPE_ANY, DNS_RRCLASS_IN, 1); + if (res != ERR_OK) { + goto cleanup; + } + pkt.questions++; + } + + /* Add answers to the questions above into the authority section for tiebreaking */ #if LWIP_IPV4 - mdns_announce(netif, IP4_ADDR_ANY); + if (!ip4_addr_isany_val(*netif_ip4_addr(netif))) { + pkt.host_replies = REPLY_HOST_A; + } #endif +#if LWIP_IPV6 + for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { + if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i))) { + pkt.host_replies |= REPLY_HOST_AAAA; + } + } +#endif + + for (i = 0; i < MDNS_MAX_SERVICES; i++) { + struct mdns_service *serv = mdns->services[i]; + if (serv) { + pkt.serv_replies[i] = REPLY_SERVICE_SRV | REPLY_SERVICE_TXT; + } + } + + pkt.tx_id = 0; + pkt.dest_port = LWIP_IANA_PORT_MDNS; + SMEMCPY(&pkt.dest_addr, destination, sizeof(pkt.dest_addr)); + res = mdns_send_outpacket(&pkt, 0); + +cleanup: + if (pkt.pbuf) { + pbuf_free(pkt.pbuf); + pkt.pbuf = NULL; + } + return res; +} + +/** + * Timer callback for probing network. + */ +static void +mdns_probe(void* arg) +{ + struct netif *netif = (struct netif *)arg; + struct mdns_host* mdns = NETIF_TO_HOST(netif); + + if(mdns->probes_sent >= MDNS_PROBE_COUNT) { + /* probing successful, announce the new name */ + mdns->probing_state = MDNS_PROBING_COMPLETE; + mdns_resp_announce(netif); + if (mdns_name_result_cb != NULL) { + mdns_name_result_cb(netif, MDNS_PROBING_SUCCESSFUL); + } + } else { +#if LWIP_IPV4 + /*if ipv4 wait with probing until address is set*/ + if (!ip4_addr_isany_val(*netif_ip4_addr(netif)) && + mdns_send_probe(netif, IP4_ADDR_ANY) == ERR_OK) +#endif + { +#if LWIP_IPV6 + if (mdns_send_probe(netif, IP6_ADDR_ANY) == ERR_OK) +#endif + { + mdns->probes_sent++; + } + } + sys_timeout(MDNS_PROBE_DELAY_MS, mdns_probe, netif); + } } /** * @ingroup mdns - * Activate MDNS responder for a network interface and send announce packets. + * Activate MDNS responder for a network interface. * @param netif The network interface to activate. * @param hostname Name to use. Queries for <hostname>.local will be answered * with the IP addresses of the netif. The hostname will be copied, the @@ -1867,20 +2060,22 @@ err_t mdns_resp_add_netif(struct netif *netif, const char *hostname, u32_t dns_ttl) { err_t res; - struct mdns_host* mdns; + struct mdns_host *mdns; + LWIP_ASSERT_CORE_LOCKED(); LWIP_ERROR("mdns_resp_add_netif: netif != NULL", (netif != NULL), return ERR_VAL); LWIP_ERROR("mdns_resp_add_netif: Hostname too long", (strlen(hostname) <= MDNS_LABEL_MAXLEN), return ERR_VAL); LWIP_ASSERT("mdns_resp_add_netif: Double add", NETIF_TO_HOST(netif) == NULL); - mdns = (struct mdns_host *) mem_malloc(sizeof(struct mdns_host)); + mdns = (struct mdns_host *) mem_calloc(1, sizeof(struct mdns_host)); LWIP_ERROR("mdns_resp_add_netif: Alloc failed", (mdns != NULL), return ERR_MEM); netif_set_client_data(netif, mdns_netif_client_id, mdns); - memset(mdns, 0, sizeof(struct mdns_host)); MEMCPY(&mdns->name, hostname, LWIP_MIN(MDNS_LABEL_MAXLEN, strlen(hostname))); mdns->dns_ttl = dns_ttl; + mdns->probes_sent = 0; + mdns->probing_state = MDNS_PROBING_NOT_STARTED; /* Join multicast groups */ #if LWIP_IPV4 @@ -1896,7 +2091,8 @@ mdns_resp_add_netif(struct netif *netif, const char *hostname, u32_t dns_ttl) } #endif - mdns_resp_netif_settings_changed(netif); + mdns_resp_restart(netif); + return ERR_OK; cleanup: @@ -1916,12 +2112,17 @@ err_t mdns_resp_remove_netif(struct netif *netif) { int i; - struct mdns_host* mdns; + struct mdns_host *mdns; + LWIP_ASSERT_CORE_LOCKED(); LWIP_ASSERT("mdns_resp_remove_netif: Null pointer", netif); mdns = NETIF_TO_HOST(netif); LWIP_ERROR("mdns_resp_remove_netif: Not an active netif", (mdns != NULL), return ERR_VAL); + if (mdns->probing_state == MDNS_PROBING_ONGOING) { + sys_untimeout(mdns_probe, netif); + } + for (i = 0; i < MDNS_MAX_SERVICES; i++) { struct mdns_service *service = mdns->services[i]; if (service) { @@ -1942,6 +2143,36 @@ mdns_resp_remove_netif(struct netif *netif) return ERR_OK; } +/** + * @ingroup mdns + * Update MDNS hostname for a network interface. + * @param netif The network interface to activate. + * @param hostname Name to use. Queries for <hostname>.local will be answered + * with the IP addresses of the netif. The hostname will be copied, the + * given pointer can be on the stack. + * @return ERR_OK if name could be set on netif, an err_t otherwise + */ +err_t +mdns_resp_rename_netif(struct netif *netif, const char *hostname) +{ + struct mdns_host *mdns; + size_t len; + + LWIP_ASSERT_CORE_LOCKED(); + len = strlen(hostname); + LWIP_ERROR("mdns_resp_rename_netif: netif != NULL", (netif != NULL), return ERR_VAL); + LWIP_ERROR("mdns_resp_rename_netif: Hostname too long", (len <= MDNS_LABEL_MAXLEN), return ERR_VAL); + mdns = NETIF_TO_HOST(netif); + LWIP_ERROR("mdns_resp_rename_netif: Not an mdns netif", (mdns != NULL), return ERR_VAL); + + MEMCPY(&mdns->name, hostname, LWIP_MIN(MDNS_LABEL_MAXLEN, len)); + mdns->name[len] = '\0'; /* null termination in case new name is shorter than previous */ + + mdns_resp_restart(netif); + + return ERR_OK; +} + /** * @ingroup mdns * Add a service to the selected network interface. @@ -1955,16 +2186,17 @@ mdns_resp_remove_netif(struct netif *netif) * @param txt_fn Callback to get TXT data. Will be called each time a TXT reply is created to * allow dynamic replies. * @param txt_data Userdata pointer for txt_fn - * @return ERR_OK if the service was added to the netif, an err_t otherwise + * @return service_id if the service was added to the netif, an err_t otherwise */ -err_t +s8_t mdns_resp_add_service(struct netif *netif, const char *name, const char *service, enum mdns_sd_proto proto, u16_t port, u32_t dns_ttl, service_get_txt_fn_t txt_fn, void *txt_data) { - int i; - int slot = -1; + s8_t i; + s8_t slot = -1; struct mdns_service *srv; - struct mdns_host* mdns; + struct mdns_host *mdns; + LWIP_ASSERT_CORE_LOCKED(); LWIP_ASSERT("mdns_resp_add_service: netif != NULL", netif); mdns = NETIF_TO_HOST(netif); LWIP_ERROR("mdns_resp_add_service: Not an mdns netif", (mdns != NULL), return ERR_VAL); @@ -1981,11 +2213,9 @@ mdns_resp_add_service(struct netif *netif, const char *name, const char *service } LWIP_ERROR("mdns_resp_add_service: Service list full (increase MDNS_MAX_SERVICES)", (slot >= 0), return ERR_MEM); - srv = (struct mdns_service*)mem_malloc(sizeof(struct mdns_service)); + srv = (struct mdns_service *)mem_calloc(1, sizeof(struct mdns_service)); LWIP_ERROR("mdns_resp_add_service: Alloc failed", (srv != NULL), return ERR_MEM); - memset(srv, 0, sizeof(struct mdns_service)); - MEMCPY(&srv->name, name, LWIP_MIN(MDNS_LABEL_MAXLEN, strlen(name))); MEMCPY(&srv->service, service, LWIP_MIN(MDNS_LABEL_MAXLEN, strlen(service))); srv->txt_fn = txt_fn; @@ -1996,13 +2226,65 @@ mdns_resp_add_service(struct netif *netif, const char *name, const char *service mdns->services[slot] = srv; - /* Announce on IPv6 and IPv4 */ -#if LWIP_IPV6 - mdns_announce(netif, IP6_ADDR_ANY); -#endif -#if LWIP_IPV4 - mdns_announce(netif, IP4_ADDR_ANY); -#endif + mdns_resp_restart(netif); + + return slot; +} + +/** + * @ingroup mdns + * Delete a service on the selected network interface. + * @param netif The network interface on which service should be removed + * @param slot The service slot number returned by mdns_resp_add_service + * @return ERR_OK if the service was removed from the netif, an err_t otherwise + */ +err_t +mdns_resp_del_service(struct netif *netif, s8_t slot) +{ + struct mdns_host *mdns; + struct mdns_service *srv; + LWIP_ASSERT("mdns_resp_del_service: netif != NULL", netif); + mdns = NETIF_TO_HOST(netif); + LWIP_ERROR("mdns_resp_del_service: Not an mdns netif", (mdns != NULL), return ERR_VAL); + LWIP_ERROR("mdns_resp_del_service: Invalid Service ID", (slot >= 0) && (slot < MDNS_MAX_SERVICES), return ERR_VAL); + LWIP_ERROR("mdns_resp_del_service: Invalid Service ID", (mdns->services[slot] != NULL), return ERR_VAL); + + srv = mdns->services[slot]; + mdns->services[slot] = NULL; + mem_free(srv); + return ERR_OK; +} + +/** + * @ingroup mdns + * Update name for an MDNS service. + * @param netif The network interface to activate. + * @param slot The service slot number returned by mdns_resp_add_service + * @param name The new name for the service + * @return ERR_OK if name could be set on service, an err_t otherwise + */ +err_t +mdns_resp_rename_service(struct netif *netif, s8_t slot, const char *name) +{ + struct mdns_service *srv; + struct mdns_host *mdns; + size_t len; + + LWIP_ASSERT_CORE_LOCKED(); + len = strlen(name); + LWIP_ASSERT("mdns_resp_rename_service: netif != NULL", netif); + mdns = NETIF_TO_HOST(netif); + LWIP_ERROR("mdns_resp_rename_service: Not an mdns netif", (mdns != NULL), return ERR_VAL); + LWIP_ERROR("mdns_resp_rename_service: Name too long", (len <= MDNS_LABEL_MAXLEN), return ERR_VAL); + LWIP_ERROR("mdns_resp_rename_service: Invalid Service ID", (slot >= 0) && (slot < MDNS_MAX_SERVICES), return ERR_VAL); + LWIP_ERROR("mdns_resp_rename_service: Invalid Service ID", (mdns->services[slot] != NULL), return ERR_VAL); + + srv = mdns->services[slot]; + + MEMCPY(&srv->name, name, LWIP_MIN(MDNS_LABEL_MAXLEN, len)); + srv->name[len] = '\0'; /* null termination in case new name is shorter than previous */ + + mdns_resp_restart(netif); return ERR_OK; } @@ -2019,10 +2301,107 @@ mdns_resp_add_service(struct netif *netif, const char *name, const char *service err_t mdns_resp_add_service_txtitem(struct mdns_service *service, const char *txt, u8_t txt_len) { + LWIP_ASSERT_CORE_LOCKED(); LWIP_ASSERT("mdns_resp_add_service_txtitem: service != NULL", service); /* Use a mdns_domain struct to store txt chunks since it is the same encoding */ return mdns_domain_add_label(&service->txtdata, txt, txt_len); } +/** + * @ingroup mdns + * Send unsolicited answer containing all our known data + * @param netif The network interface to send on + */ +void +mdns_resp_announce(struct netif *netif) +{ + struct mdns_host* mdns; + LWIP_ASSERT_CORE_LOCKED(); + LWIP_ERROR("mdns_resp_announce: netif != NULL", (netif != NULL), return); + + mdns = NETIF_TO_HOST(netif); + if (mdns == NULL) { + return; + } + + if (mdns->probing_state == MDNS_PROBING_COMPLETE) { + /* Announce on IPv6 and IPv4 */ +#if LWIP_IPV6 + mdns_announce(netif, IP6_ADDR_ANY); +#endif +#if LWIP_IPV4 + if (!ip4_addr_isany_val(*netif_ip4_addr(netif))) { + mdns_announce(netif, IP4_ADDR_ANY); + } +#endif + } /* else: ip address changed while probing was ongoing? @todo reset counter to restart? */ +} + +/** Register a callback function that is called if probing is completed successfully + * or with a conflict. */ +void +mdns_resp_register_name_result_cb(mdns_name_result_cb_t cb) +{ + mdns_name_result_cb = cb; +} + +/** + * @ingroup mdns + * Restart mdns responder. Call this when cable is connected after being disconnected or + * administrative interface is set up after being down + * @param netif The network interface to send on + */ +void +mdns_resp_restart(struct netif *netif) +{ + struct mdns_host* mdns; + LWIP_ASSERT_CORE_LOCKED(); + LWIP_ERROR("mdns_resp_restart: netif != NULL", (netif != NULL), return); + + mdns = NETIF_TO_HOST(netif); + if (mdns == NULL) { + return; + } + + if (mdns->probing_state == MDNS_PROBING_ONGOING) { + sys_untimeout(mdns_probe, netif); + } + /* @todo if we've failed 15 times within a 10 second period we MUST wait 5 seconds (or wait 5 seconds every time except first)*/ + mdns->probes_sent = 0; + mdns->probing_state = MDNS_PROBING_ONGOING; + sys_timeout(MDNS_INITIAL_PROBE_DELAY_MS, mdns_probe, netif); +} + +/** + * @ingroup mdns + * Initiate MDNS responder. Will open UDP sockets on port 5353 + */ +void +mdns_resp_init(void) +{ + err_t res; + + /* LWIP_ASSERT_CORE_LOCKED(); is checked by udp_new() */ + + mdns_pcb = udp_new_ip_type(IPADDR_TYPE_ANY); + LWIP_ASSERT("Failed to allocate pcb", mdns_pcb != NULL); +#if LWIP_MULTICAST_TX_OPTIONS + udp_set_multicast_ttl(mdns_pcb, MDNS_TTL); +#else + mdns_pcb->ttl = MDNS_TTL; +#endif + res = udp_bind(mdns_pcb, IP_ANY_TYPE, LWIP_IANA_PORT_MDNS); + LWIP_UNUSED_ARG(res); /* in case of LWIP_NOASSERT */ + LWIP_ASSERT("Failed to bind pcb", res == ERR_OK); + udp_recv(mdns_pcb, mdns_recv, NULL); + + mdns_netif_client_id = netif_alloc_client_data_id(); + +#if MDNS_RESP_USENETIF_EXTCALLBACK + /* register for netif events when started on first netif */ + netif_add_ext_callback(&netif_callback, mdns_netif_ext_status_callback); +#endif +} + #endif /* LWIP_MDNS_RESPONDER */ diff --git a/Libraries/LwIP/src/apps/mqtt/mqtt.c b/Libraries/LwIP/src/apps/mqtt/mqtt.c index 565c34a..f785ebe 100755 --- a/Libraries/LwIP/src/apps/mqtt/mqtt.c +++ b/Libraries/LwIP/src/apps/mqtt/mqtt.c @@ -48,12 +48,15 @@ * */ #include "lwip/apps/mqtt.h" +#include "lwip/apps/mqtt_priv.h" #include "lwip/timeouts.h" #include "lwip/ip_addr.h" #include "lwip/mem.h" #include "lwip/err.h" #include "lwip/pbuf.h" -#include "lwip/tcp.h" +#include "lwip/altcp.h" +#include "lwip/altcp_tcp.h" +#include "lwip/altcp_tls.h" #include #if LWIP_TCP && LWIP_CALLBACK_API @@ -71,7 +74,7 @@ #define MQTT_DEBUG_WARN_STATE (MQTT_DEBUG | LWIP_DBG_LEVEL_WARNING | LWIP_DBG_STATE) #define MQTT_DEBUG_SERIOUS (MQTT_DEBUG | LWIP_DBG_LEVEL_SERIOUS) -static void mqtt_cyclic_timer(void *arg); + /** * MQTT client connection states @@ -119,9 +122,10 @@ enum mqtt_connect_flag { }; +static void mqtt_cyclic_timer(void *arg); + #if defined(LWIP_DEBUG) -static const char * const mqtt_message_type_str[15] = -{ +static const char *const mqtt_message_type_str[15] = { "UNDEFINED", "CONNECT", "CONNACK", @@ -142,7 +146,7 @@ static const char * const mqtt_message_type_str[15] = /** * Message type value to string * @param msg_type see enum mqtt_message_type - * + * * @return Control message type text string */ static const char * @@ -175,26 +179,51 @@ msg_generate_packet_id(mqtt_client_t *client) /*--------------------------------------------------------------------------------------------------------------------- */ /* Output ring buffer */ - -#define MQTT_RINGBUF_IDX_MASK ((MQTT_OUTPUT_RINGBUF_SIZE) - 1) - /** Add single item to ring buffer */ -#define mqtt_ringbuf_put(rb, item) ((rb)->buf)[(rb)->put++ & MQTT_RINGBUF_IDX_MASK] = (item) +static void +mqtt_ringbuf_put(struct mqtt_ringbuf_t *rb, u8_t item) +{ + rb->buf[rb->put] = item; + rb->put++; + if (rb->put >= MQTT_OUTPUT_RINGBUF_SIZE) { + rb->put = 0; + } +} + +/** Return pointer to ring buffer get position */ +static u8_t * +mqtt_ringbuf_get_ptr(struct mqtt_ringbuf_t *rb) +{ + return &rb->buf[rb->get]; +} + +static void +mqtt_ringbuf_advance_get_idx(struct mqtt_ringbuf_t *rb, u16_t len) +{ + LWIP_ASSERT("mqtt_ringbuf_advance_get_idx: len < MQTT_OUTPUT_RINGBUF_SIZE", len < MQTT_OUTPUT_RINGBUF_SIZE); + + rb->get += len; + if (rb->get >= MQTT_OUTPUT_RINGBUF_SIZE) { + rb->get = rb->get - MQTT_OUTPUT_RINGBUF_SIZE; + } +} /** Return number of bytes in ring buffer */ -#define mqtt_ringbuf_len(rb) ((u16_t)((rb)->put - (rb)->get)) +static u16_t +mqtt_ringbuf_len(struct mqtt_ringbuf_t *rb) +{ + u32_t len = rb->put - rb->get; + if (len > 0xFFFF) { + len += MQTT_OUTPUT_RINGBUF_SIZE; + } + return (u16_t)len; +} /** Return number of bytes free in ring buffer */ #define mqtt_ringbuf_free(rb) (MQTT_OUTPUT_RINGBUF_SIZE - mqtt_ringbuf_len(rb)) /** Return number of bytes possible to read without wrapping around */ -#define mqtt_ringbuf_linear_read_length(rb) LWIP_MIN(mqtt_ringbuf_len(rb), (MQTT_OUTPUT_RINGBUF_SIZE - ((rb)->get & MQTT_RINGBUF_IDX_MASK))) - -/** Return pointer to ring buffer get position */ -#define mqtt_ringbuf_get_ptr(rb) (&(rb)->buf[(rb)->get & MQTT_RINGBUF_IDX_MASK]) - -#define mqtt_ringbuf_advance_get_idx(rb, len) ((rb)->get += (len)) - +#define mqtt_ringbuf_linear_read_length(rb) LWIP_MIN(mqtt_ringbuf_len(rb), (MQTT_OUTPUT_RINGBUF_SIZE - (rb)->get)) /** * Try send as many bytes as possible from output ring buffer @@ -202,20 +231,20 @@ msg_generate_packet_id(mqtt_client_t *client) * @param tpcb TCP connection handle */ static void -mqtt_output_send(struct mqtt_ringbuf_t *rb, struct tcp_pcb *tpcb) +mqtt_output_send(struct mqtt_ringbuf_t *rb, struct altcp_pcb *tpcb) { err_t err; u8_t wrap = 0; u16_t ringbuf_lin_len = mqtt_ringbuf_linear_read_length(rb); - u16_t send_len = tcp_sndbuf(tpcb); + u16_t send_len = altcp_sndbuf(tpcb); LWIP_ASSERT("mqtt_output_send: tpcb != NULL", tpcb != NULL); if (send_len == 0 || ringbuf_lin_len == 0) { return; } - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_output_send: tcp_sndbuf: %d bytes, ringbuf_linear_available: %d, get %d, put %d\n", - send_len, ringbuf_lin_len, ((rb)->get & MQTT_RINGBUF_IDX_MASK), ((rb)->put & MQTT_RINGBUF_IDX_MASK))); + LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_output_send: tcp_sndbuf: %d bytes, ringbuf_linear_available: %d, get %d, put %d\n", + send_len, ringbuf_lin_len, rb->get, rb->put)); if (send_len > ringbuf_lin_len) { /* Space in TCP output buffer is larger than available in ring buffer linear portion */ @@ -223,18 +252,18 @@ mqtt_output_send(struct mqtt_ringbuf_t *rb, struct tcp_pcb *tpcb) /* Wrap around if more data in ring buffer after linear portion */ wrap = (mqtt_ringbuf_len(rb) > ringbuf_lin_len); } - err = tcp_write(tpcb, mqtt_ringbuf_get_ptr(rb), send_len, TCP_WRITE_FLAG_COPY | (wrap ? TCP_WRITE_FLAG_MORE : 0)); + err = altcp_write(tpcb, mqtt_ringbuf_get_ptr(rb), send_len, TCP_WRITE_FLAG_COPY | (wrap ? TCP_WRITE_FLAG_MORE : 0)); if ((err == ERR_OK) && wrap) { mqtt_ringbuf_advance_get_idx(rb, send_len); /* Use the lesser one of ring buffer linear length and TCP send buffer size */ - send_len = LWIP_MIN(tcp_sndbuf(tpcb), mqtt_ringbuf_linear_read_length(rb)); - err = tcp_write(tpcb, mqtt_ringbuf_get_ptr(rb), send_len, TCP_WRITE_FLAG_COPY); + send_len = LWIP_MIN(altcp_sndbuf(tpcb), mqtt_ringbuf_linear_read_length(rb)); + err = altcp_write(tpcb, mqtt_ringbuf_get_ptr(rb), send_len, TCP_WRITE_FLAG_COPY); } if (err == ERR_OK) { mqtt_ringbuf_advance_get_idx(rb, send_len); /* Flush */ - tcp_output(tpcb); + altcp_output(tpcb); } else { LWIP_DEBUGF(MQTT_DEBUG_WARN, ("mqtt_output_send: Send failed with err %d (\"%s\")\n", err, lwip_strerr(err))); } @@ -248,18 +277,19 @@ mqtt_output_send(struct mqtt_ringbuf_t *rb, struct tcp_pcb *tpcb) /** * Create request item * @param r_objs Pointer to request objects + * @param r_objs_len Number of array entries * @param pkt_id Packet identifier of request * @param cb Packet callback to call when requests lifetime ends * @param arg Parameter following callback * @return Request or NULL if failed to create */ static struct mqtt_request_t * -mqtt_create_request(struct mqtt_request_t *r_objs, u16_t pkt_id, mqtt_request_cb_t cb, void *arg) +mqtt_create_request(struct mqtt_request_t *r_objs, size_t r_objs_len, u16_t pkt_id, mqtt_request_cb_t cb, void *arg) { struct mqtt_request_t *r = NULL; u8_t n; LWIP_ASSERT("mqtt_create_request: r_objs != NULL", r_objs != NULL); - for (n = 0; n < MQTT_REQ_MAX_IN_FLIGHT; n++) { + for (n = 0; n < r_objs_len; n++) { /* Item point to itself if not in use */ if (r_objs[n].next == &r_objs[n]) { r = &r_objs[n]; @@ -339,7 +369,7 @@ mqtt_take_request(struct mqtt_request_t **tail, u16_t pkt_id) if (iter != NULL) { /* unchain */ if (prev == NULL) { - *tail= iter->next; + *tail = iter->next; } else { prev->next = iter->next; } @@ -374,7 +404,7 @@ mqtt_request_time_elapsed(struct mqtt_request_t **tail, u8_t t) } mqtt_delete_request(r); /* Tail might be be modified in callback, so re-read it in every iteration */ - r = *(struct mqtt_request_t * const volatile *)tail; + r = *(struct mqtt_request_t *const volatile *)tail; } else { r->timeout_diff -= t; t = 0; @@ -400,13 +430,14 @@ mqtt_clear_requests(struct mqtt_request_t **tail) /** * Initialize all request items * @param r_objs Pointer to request objects + * @param r_objs_len Number of array entries */ static void -mqtt_init_requests(struct mqtt_request_t *r_objs) +mqtt_init_requests(struct mqtt_request_t *r_objs, size_t r_objs_len) { u8_t n; LWIP_ASSERT("mqtt_init_requests: r_objs != NULL", r_objs != NULL); - for (n = 0; n < MQTT_REQ_MAX_IN_FLIGHT; n++) { + for (n = 0; n < r_objs_len; n++) { /* Item pointing to itself indicates unused */ r_objs[n].next = &r_objs[n]; } @@ -453,18 +484,18 @@ mqtt_output_append_string(struct mqtt_ringbuf_t *rb, const char *str, u16_t leng * Append fixed header * @param rb Output ring buffer * @param msg_type see enum mqtt_message_type - * @param dup MQTT DUP flag - * @param qos MQTT QoS field - * @param retain MQTT retain flag + * @param fdup MQTT DUP flag + * @param fqos MQTT QoS field + * @param fretain MQTT retain flag * @param r_length Remaining length after fixed header */ static void -mqtt_output_append_fixed_header(struct mqtt_ringbuf_t *rb, u8_t msg_type, u8_t dup, - u8_t qos, u8_t retain, u16_t r_length) +mqtt_output_append_fixed_header(struct mqtt_ringbuf_t *rb, u8_t msg_type, u8_t fdup, + u8_t fqos, u8_t fretain, u16_t r_length) { /* Start with control byte */ - mqtt_output_append_u8(rb, (((msg_type & 0x0f) << 4) | ((dup & 1) << 3) | ((qos & 3) << 1) | (retain & 1))); + mqtt_output_append_u8(rb, (((msg_type & 0x0f) << 4) | ((fdup & 1) << 3) | ((fqos & 3) << 1) | (fretain & 1))); /* Encode remaining length field */ do { mqtt_output_append_u8(rb, (r_length & 0x7f) | (r_length >= 128 ? 0x80 : 0)); @@ -487,7 +518,7 @@ mqtt_output_check_space(struct mqtt_ringbuf_t *rb, u16_t r_length) LWIP_ASSERT("mqtt_output_check_space: rb != NULL", rb != NULL); - /* Calculate number of required bytes to contain the remaining bytes field and add to total*/ + /* Calculate number of required bytes to contain the remaining bytes field and add to total*/ do { total_len++; r_length >>= 7; @@ -510,13 +541,13 @@ mqtt_close(mqtt_client_t *client, mqtt_connection_status_t reason) /* Bring down TCP connection if not already done */ if (client->conn != NULL) { err_t res; - tcp_recv(client->conn, NULL); - tcp_err(client->conn, NULL); - tcp_sent(client->conn, NULL); - res = tcp_close(client->conn); + altcp_recv(client->conn, NULL); + altcp_err(client->conn, NULL); + altcp_sent(client->conn, NULL); + res = altcp_close(client->conn); if (res != ERR_OK) { - tcp_abort(client->conn); - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_close: Close err=%s\n", lwip_strerr(res))); + altcp_abort(client->conn); + LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_close: Close err=%s\n", lwip_strerr(res))); } client->conn = NULL; } @@ -551,7 +582,7 @@ mqtt_cyclic_timer(void *arg) if (client->conn_state == MQTT_CONNECTING) { client->cyclic_tick++; if ((client->cyclic_tick * MQTT_CYCLIC_TIMER_INTERVAL) >= MQTT_CONNECT_TIMOUT) { - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_cyclic_timer: CONNECT attempt to server timed out\n")); + LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_cyclic_timer: CONNECT attempt to server timed out\n")); /* Disconnect TCP */ mqtt_close(client, MQTT_CONNECT_TIMEOUT); restart_timer = 0; @@ -565,15 +596,15 @@ mqtt_cyclic_timer(void *arg) client->server_watchdog++; /* If reception from server has been idle for 1.5*keep_alive time, server is considered unresponsive */ - if ((client->server_watchdog * MQTT_CYCLIC_TIMER_INTERVAL) > (client->keep_alive + client->keep_alive/2)) { - LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_cyclic_timer: Server incoming keep-alive timeout\n")); + if ((client->server_watchdog * MQTT_CYCLIC_TIMER_INTERVAL) > (client->keep_alive + client->keep_alive / 2)) { + LWIP_DEBUGF(MQTT_DEBUG_WARN, ("mqtt_cyclic_timer: Server incoming keep-alive timeout\n")); mqtt_close(client, MQTT_CONNECT_TIMEOUT); restart_timer = 0; } /* If time for a keep alive message to be sent, transmission has been idle for keep_alive time */ if ((client->cyclic_tick * MQTT_CYCLIC_TIMER_INTERVAL) >= client->keep_alive) { - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_cyclic_timer: Sending keep-alive message to server\n")); + LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_cyclic_timer: Sending keep-alive message to server\n")); if (mqtt_output_check_space(&client->output, 0) != 0) { mqtt_output_append_fixed_header(&client->output, MQTT_MSG_TYPE_PINGREQ, 0, 0, 0, 0); client->cyclic_tick = 0; @@ -583,11 +614,11 @@ mqtt_cyclic_timer(void *arg) } } } else { - LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_cyclic_timer: Timer should not be running in state %d\n", client->conn_state)); + LWIP_DEBUGF(MQTT_DEBUG_WARN, ("mqtt_cyclic_timer: Timer should not be running in state %d\n", client->conn_state)); restart_timer = 0; } if (restart_timer) { - sys_timeout(MQTT_CYCLIC_TIMER_INTERVAL*1000, mqtt_cyclic_timer, arg); + sys_timeout(MQTT_CYCLIC_TIMER_INTERVAL * 1000, mqtt_cyclic_timer, arg); } } @@ -609,8 +640,8 @@ pub_ack_rec_rel_response(mqtt_client_t *client, u8_t msg, u16_t pkt_id, u8_t qos mqtt_output_append_u16(&client->output, pkt_id); mqtt_output_send(&client->output, client->conn); } else { - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("pub_ack_rec_rel_response: OOM creating response: %s with pkt_id: %d\n", - mqtt_msg_type_to_str(msg), pkt_id)); + LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("pub_ack_rec_rel_response: OOM creating response: %s with pkt_id: %d\n", + mqtt_msg_type_to_str(msg), pkt_id)); err = ERR_MEM; } return err; @@ -638,21 +669,31 @@ mqtt_incomming_suback(struct mqtt_request_t *r, u8_t result) * @param remaining_length Remaining length of complete message */ static mqtt_connection_status_t - mqtt_message_received(mqtt_client_t *client, u8_t fixed_hdr_idx, u16_t length, u32_t remaining_length) +mqtt_message_received(mqtt_client_t *client, u8_t fixed_hdr_idx, u16_t length, u32_t remaining_length) { mqtt_connection_status_t res = MQTT_CONNECT_ACCEPTED; u8_t *var_hdr_payload = client->rx_buffer + fixed_hdr_idx; + size_t var_hdr_payload_bufsize = sizeof(client->rx_buffer) - fixed_hdr_idx; /* Control packet type */ u8_t pkt_type = MQTT_CTL_PACKET_TYPE(client->rx_buffer[0]); u16_t pkt_id = 0; + LWIP_ASSERT("client->msg_idx < MQTT_VAR_HEADER_BUFFER_LEN", client->msg_idx < MQTT_VAR_HEADER_BUFFER_LEN); + LWIP_ASSERT("fixed_hdr_idx <= client->msg_idx", fixed_hdr_idx <= client->msg_idx); + LWIP_ERROR("buffer length mismatch", fixed_hdr_idx + length <= MQTT_VAR_HEADER_BUFFER_LEN, + return MQTT_CONNECT_DISCONNECTED); + if (pkt_type == MQTT_MSG_TYPE_CONNACK) { if (client->conn_state == MQTT_CONNECTING) { + if (length < 2) { + LWIP_DEBUGF(MQTT_DEBUG_WARN,( "mqtt_message_received: Received short CONNACK message\n")); + goto out_disconnect; + } /* Get result code from CONNACK */ res = (mqtt_connection_status_t)var_hdr_payload[1]; - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_message_received: Connect response code %d\n", res)); + LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_message_received: Connect response code %d\n", res)); if (res == MQTT_CONNECT_ACCEPTED) { /* Reset cyclic_tick when changing to connected state */ client->cyclic_tick = 0; @@ -663,10 +704,10 @@ static mqtt_connection_status_t } } } else { - LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_message_received: Received CONNACK in connected state\n")); + LWIP_DEBUGF(MQTT_DEBUG_WARN, ("mqtt_message_received: Received CONNACK in connected state\n")); } } else if (pkt_type == MQTT_MSG_TYPE_PINGRESP) { - LWIP_DEBUGF(MQTT_DEBUG_TRACE,( "mqtt_message_received: Received PINGRESP from server\n")); + LWIP_DEBUGF(MQTT_DEBUG_TRACE, ( "mqtt_message_received: Received PINGRESP from server\n")); } else if (pkt_type == MQTT_MSG_TYPE_PUBLISH) { u16_t payload_offset = 0; @@ -675,22 +716,37 @@ static mqtt_connection_status_t if (client->msg_idx <= MQTT_VAR_HEADER_BUFFER_LEN) { /* Should have topic and pkt id*/ - uint8_t *topic; - uint16_t after_topic; + u8_t *topic; + u16_t after_topic; u8_t bkp; - u16_t topic_len = var_hdr_payload[0]; + u16_t topic_len; + u16_t qos_len = (qos ? 2U : 0U); + if (length < 2 + qos_len) { + LWIP_DEBUGF(MQTT_DEBUG_WARN,( "mqtt_message_received: Received short PUBLISH packet\n")); + goto out_disconnect; + } + topic_len = var_hdr_payload[0]; topic_len = (topic_len << 8) + (u16_t)(var_hdr_payload[1]); + if ((topic_len > length - (2 + qos_len)) || + (topic_len > var_hdr_payload_bufsize - (2 + qos_len))) { + LWIP_DEBUGF(MQTT_DEBUG_WARN,( "mqtt_message_received: Received short PUBLISH packet (topic)\n")); + goto out_disconnect; + } topic = var_hdr_payload + 2; after_topic = 2 + topic_len; - /* Check length, add one byte even for QoS 0 so that zero termination will fit */ - if ((after_topic + (qos? 2 : 1)) > length) { - LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_message_received: Receive buffer can not fit topic + pkt_id\n")); + /* Check buffer length, add one byte even for QoS 0 so that zero termination will fit */ + if ((after_topic + (qos ? 2U : 1U)) > var_hdr_payload_bufsize) { + LWIP_DEBUGF(MQTT_DEBUG_WARN, ("mqtt_message_received: Receive buffer can not fit topic + pkt_id\n")); goto out_disconnect; } /* id for QoS 1 and 2 */ if (qos > 0) { + if (length < after_topic + 2U) { + LWIP_DEBUGF(MQTT_DEBUG_WARN,( "mqtt_message_received: Received short PUBLISH packet (after_topic)\n")); + goto out_disconnect; + } client->inpub_pkt_id = ((u16_t)var_hdr_payload[after_topic] << 8) + (u16_t)var_hdr_payload[after_topic + 1]; after_topic += 2; } else { @@ -704,8 +760,8 @@ static mqtt_connection_status_t payload_length = length - after_topic; payload_offset = after_topic; - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_incomming_publish: Received message with QoS %d at topic: %s, payload length %d\n", - qos, topic, remaining_length + payload_length)); + LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_incomming_publish: Received message with QoS %d at topic: %s, payload length %"U32_F"\n", + qos, topic, remaining_length + payload_length)); if (client->pub_cb != NULL) { client->pub_cb(client->inpub_arg, (const char *)topic, remaining_length + payload_length); } @@ -713,13 +769,17 @@ static mqtt_connection_status_t topic[topic_len] = bkp; } if (payload_length > 0 || remaining_length == 0) { + if (length < (size_t)(payload_offset + payload_length)) { + LWIP_DEBUGF(MQTT_DEBUG_WARN,( "mqtt_message_received: Received short packet (payload)\n")); + goto out_disconnect; + } client->data_cb(client->inpub_arg, var_hdr_payload + payload_offset, payload_length, remaining_length == 0 ? MQTT_DATA_FLAG_LAST : 0); /* Reply if QoS > 0 */ if (remaining_length == 0 && qos > 0) { /* Send PUBACK for QoS 1 or PUBREC for QoS 2 */ u8_t resp_msg = (qos == 1) ? MQTT_MSG_TYPE_PUBACK : MQTT_MSG_TYPE_PUBREC; - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_incomming_publish: Sending publish response: %s with pkt_id: %d\n", - mqtt_msg_type_to_str(resp_msg), client->inpub_pkt_id)); + LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_incomming_publish: Sending publish response: %s with pkt_id: %d\n", + mqtt_msg_type_to_str(resp_msg), client->inpub_pkt_id)); pub_ack_rec_rel_response(client, resp_msg, client->inpub_pkt_id, 0); } } @@ -728,25 +788,25 @@ static mqtt_connection_status_t pkt_id = (u16_t)var_hdr_payload[0] << 8; pkt_id |= (u16_t)var_hdr_payload[1]; if (pkt_id == 0) { - LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_message_received: Got message with illegal packet identifier: 0\n")); + LWIP_DEBUGF(MQTT_DEBUG_WARN, ("mqtt_message_received: Got message with illegal packet identifier: 0\n")); goto out_disconnect; } if (pkt_type == MQTT_MSG_TYPE_PUBREC) { - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_message_received: PUBREC, sending PUBREL with pkt_id: %d\n",pkt_id)); + LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_message_received: PUBREC, sending PUBREL with pkt_id: %d\n", pkt_id)); pub_ack_rec_rel_response(client, MQTT_MSG_TYPE_PUBREL, pkt_id, 1); } else if (pkt_type == MQTT_MSG_TYPE_PUBREL) { - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_message_received: PUBREL, sending PUBCOMP response with pkt_id: %d\n",pkt_id)); + LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_message_received: PUBREL, sending PUBCOMP response with pkt_id: %d\n", pkt_id)); pub_ack_rec_rel_response(client, MQTT_MSG_TYPE_PUBCOMP, pkt_id, 0); } else if (pkt_type == MQTT_MSG_TYPE_SUBACK || pkt_type == MQTT_MSG_TYPE_UNSUBACK || - pkt_type == MQTT_MSG_TYPE_PUBCOMP || pkt_type == MQTT_MSG_TYPE_PUBACK) { + pkt_type == MQTT_MSG_TYPE_PUBCOMP || pkt_type == MQTT_MSG_TYPE_PUBACK) { struct mqtt_request_t *r = mqtt_take_request(&client->pend_req_queue, pkt_id); if (r != NULL) { - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_message_received: %s response with id %d\n", mqtt_msg_type_to_str(pkt_type), pkt_id)); + LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_message_received: %s response with id %d\n", mqtt_msg_type_to_str(pkt_type), pkt_id)); if (pkt_type == MQTT_MSG_TYPE_SUBACK) { if (length < 3) { - LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_message_received: To small SUBACK packet\n")); + LWIP_DEBUGF(MQTT_DEBUG_WARN, ("mqtt_message_received: To small SUBACK packet\n")); goto out_disconnect; } else { mqtt_incomming_suback(r, var_hdr_payload[2]); @@ -756,10 +816,10 @@ static mqtt_connection_status_t } mqtt_delete_request(r); } else { - LWIP_DEBUGF(MQTT_DEBUG_WARN,( "mqtt_message_received: Received %s reply, with wrong pkt_id: %d\n", mqtt_msg_type_to_str(pkt_type), pkt_id)); + LWIP_DEBUGF(MQTT_DEBUG_WARN, ( "mqtt_message_received: Received %s reply, with wrong pkt_id: %d\n", mqtt_msg_type_to_str(pkt_type), pkt_id)); } } else { - LWIP_DEBUGF(MQTT_DEBUG_WARN,( "mqtt_message_received: Received unknown message type: %d\n", pkt_type)); + LWIP_DEBUGF(MQTT_DEBUG_WARN, ( "mqtt_message_received: Received unknown message type: %d\n", pkt_type)); goto out_disconnect; } } @@ -784,32 +844,44 @@ mqtt_parse_incoming(mqtt_client_t *client, struct pbuf *p) u8_t b = 0; while (p->tot_len > in_offset) { + /* We ALWAYS parse the header here first. Even if the header was not + included in this segment, we re-parse it here by buffering it in + client->rx_buffer. client->msg_idx keeps track of this. */ if ((fixed_hdr_idx < 2) || ((b & 0x80) != 0)) { if (fixed_hdr_idx < client->msg_idx) { + /* parse header from old pbuf (buffered in client->rx_buffer) */ b = client->rx_buffer[fixed_hdr_idx]; } else { + /* parse header from this pbuf and save it in client->rx_buffer in case + it comes in segmented */ b = pbuf_get_at(p, in_offset++); client->rx_buffer[client->msg_idx++] = b; } fixed_hdr_idx++; if (fixed_hdr_idx >= 2) { + /* fixed header contains at least 2 bytes but can contain more, depending on + 'remaining length'. All bytes but the last of this have 0x80 set to + indicate more bytes are coming. */ msg_rem_len |= (u32_t)(b & 0x7f) << ((fixed_hdr_idx - 2) * 7); if ((b & 0x80) == 0) { - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_parse_incoming: Remaining length after fixed header: %d\n", msg_rem_len)); + /* fixed header is done */ + LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_parse_incoming: Remaining length after fixed header: %"U32_F"\n", msg_rem_len)); if (msg_rem_len == 0) { /* Complete message with no extra headers of payload received */ mqtt_message_received(client, fixed_hdr_idx, 0, 0); client->msg_idx = 0; fixed_hdr_idx = 0; } else { - /* Bytes remaining in message */ + /* Bytes remaining in message (changes remaining length if this is + not the first segment of this message) */ msg_rem_len = (msg_rem_len + fixed_hdr_idx) - client->msg_idx; } } } } else { + /* Fixed header has been parsed, parse variable header */ u16_t cpy_len, cpy_start, buffer_space; cpy_start = (client->msg_idx - fixed_hdr_idx) % (MQTT_VAR_HEADER_BUFFER_LEN - fixed_hdr_idx) + fixed_hdr_idx; @@ -822,15 +894,15 @@ mqtt_parse_incoming(mqtt_client_t *client, struct pbuf *p) if (cpy_len > buffer_space) { cpy_len = buffer_space; } - pbuf_copy_partial(p, client->rx_buffer+cpy_start, cpy_len, in_offset); + pbuf_copy_partial(p, client->rx_buffer + cpy_start, cpy_len, in_offset); /* Advance get and put indexes */ client->msg_idx += cpy_len; in_offset += cpy_len; msg_rem_len -= cpy_len; - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_parse_incoming: msg_idx: %d, cpy_len: %d, remaining %d\n", client->msg_idx, cpy_len, msg_rem_len)); - if (msg_rem_len == 0 || cpy_len == buffer_space) { + LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_parse_incoming: msg_idx: %"U32_F", cpy_len: %"U16_F", remaining %"U32_F"\n", client->msg_idx, cpy_len, msg_rem_len)); + if ((msg_rem_len == 0) || (cpy_len == buffer_space)) { /* Whole message received or buffer is full */ mqtt_connection_status_t res = mqtt_message_received(client, fixed_hdr_idx, (cpy_start + cpy_len) - fixed_hdr_idx, msg_rem_len); if (res != MQTT_CONNECT_ACCEPTED) { @@ -857,25 +929,25 @@ mqtt_parse_incoming(mqtt_client_t *client, struct pbuf *p) * @return ERR_OK or err passed into callback */ static err_t -mqtt_tcp_recv_cb(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) +mqtt_tcp_recv_cb(void *arg, struct altcp_pcb *pcb, struct pbuf *p, err_t err) { mqtt_client_t *client = (mqtt_client_t *)arg; LWIP_ASSERT("mqtt_tcp_recv_cb: client != NULL", client != NULL); LWIP_ASSERT("mqtt_tcp_recv_cb: client->conn == pcb", client->conn == pcb); if (p == NULL) { - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_tcp_recv_cb: Recv pbuf=NULL, remote has closed connection\n")); + LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_tcp_recv_cb: Recv pbuf=NULL, remote has closed connection\n")); mqtt_close(client, MQTT_CONNECT_DISCONNECTED); } else { mqtt_connection_status_t res; if (err != ERR_OK) { - LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_tcp_recv_cb: Recv err=%d\n", err)); + LWIP_DEBUGF(MQTT_DEBUG_WARN, ("mqtt_tcp_recv_cb: Recv err=%d\n", err)); pbuf_free(p); return err; } /* Tell remote that data has been received */ - tcp_recved(pcb, p->tot_len); + altcp_recved(pcb, p->tot_len); res = mqtt_parse_incoming(client, p); pbuf_free(p); @@ -901,7 +973,7 @@ mqtt_tcp_recv_cb(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) * @return ERR_OK */ static err_t -mqtt_tcp_sent_cb(void *arg, struct tcp_pcb *tpcb, u16_t len) +mqtt_tcp_sent_cb(void *arg, struct altcp_pcb *tpcb, u16_t len) { mqtt_client_t *client = (mqtt_client_t *)arg; @@ -916,7 +988,7 @@ mqtt_tcp_sent_cb(void *arg, struct tcp_pcb *tpcb, u16_t len) client->server_watchdog = 0; /* QoS 0 publish has no response from server, so call its callbacks here */ while ((r = mqtt_take_request(&client->pend_req_queue, 0)) != NULL) { - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_tcp_sent_cb: Calling QoS 0 publish complete callback\n")); + LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_tcp_sent_cb: Calling QoS 0 publish complete callback\n")); if (r->cb != NULL) { r->cb(r->arg, ERR_OK); } @@ -938,7 +1010,7 @@ mqtt_tcp_err_cb(void *arg, err_t err) { mqtt_client_t *client = (mqtt_client_t *)arg; LWIP_UNUSED_ARG(err); /* only used for debug output */ - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_tcp_err_cb: TCP error callback: error %d, arg: %p\n", err, arg)); + LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_tcp_err_cb: TCP error callback: error %d, arg: %p\n", err, arg)); LWIP_ASSERT("mqtt_tcp_err_cb: client != NULL", client != NULL); /* Set conn to null before calling close as pcb is already deallocated*/ client->conn = 0; @@ -952,7 +1024,7 @@ mqtt_tcp_err_cb(void *arg, err_t err) * @return err ERR_OK */ static err_t -mqtt_tcp_poll_cb(void *arg, struct tcp_pcb *tpcb) +mqtt_tcp_poll_cb(void *arg, struct altcp_pcb *tpcb) { mqtt_client_t *client = (mqtt_client_t *)arg; if (client->conn_state == MQTT_CONNECTED) { @@ -969,12 +1041,12 @@ mqtt_tcp_poll_cb(void *arg, struct tcp_pcb *tpcb) * @return ERR_OK */ static err_t -mqtt_tcp_connect_cb(void *arg, struct tcp_pcb *tpcb, err_t err) +mqtt_tcp_connect_cb(void *arg, struct altcp_pcb *tpcb, err_t err) { - mqtt_client_t* client = (mqtt_client_t *)arg; + mqtt_client_t *client = (mqtt_client_t *)arg; if (err != ERR_OK) { - LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_tcp_connect_cb: TCP connect error %d\n", err)); + LWIP_DEBUGF(MQTT_DEBUG_WARN, ("mqtt_tcp_connect_cb: TCP connect error %d\n", err)); return err; } @@ -982,16 +1054,16 @@ mqtt_tcp_connect_cb(void *arg, struct tcp_pcb *tpcb, err_t err) client->msg_idx = 0; /* Setup TCP callbacks */ - tcp_recv(tpcb, mqtt_tcp_recv_cb); - tcp_sent(tpcb, mqtt_tcp_sent_cb); - tcp_poll(tpcb, mqtt_tcp_poll_cb, 2); + altcp_recv(tpcb, mqtt_tcp_recv_cb); + altcp_sent(tpcb, mqtt_tcp_sent_cb); + altcp_poll(tpcb, mqtt_tcp_poll_cb, 2); - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_tcp_connect_cb: TCP connection established to server\n")); + LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_tcp_connect_cb: TCP connection established to server\n")); /* Enter MQTT connect state */ client->conn_state = MQTT_CONNECTING; /* Start cyclic timer */ - sys_timeout(MQTT_CYCLIC_TIMER_INTERVAL*1000, mqtt_cyclic_timer, client); + sys_timeout(MQTT_CYCLIC_TIMER_INTERVAL * 1000, mqtt_cyclic_timer, client); client->cyclic_tick = 0; /* Start transmission from output queue, connect message is the first one out*/ @@ -1012,7 +1084,7 @@ mqtt_tcp_connect_cb(void *arg, struct tcp_pcb *tpcb, err_t err) * @param client MQTT client * @param topic Publish topic string * @param payload Data to publish (NULL is allowed) - * @param payload_length: Length of payload (0 is allowed) + * @param payload_length Length of payload (0 is allowed) * @param qos Quality of service, 0 1 or 2 * @param retain MQTT retain flag * @param cb Callback to call when publish is complete or has timed out @@ -1032,6 +1104,7 @@ mqtt_publish(mqtt_client_t *client, const char *topic, const void *payload, u16_ u16_t topic_len; u16_t remaining_length; + LWIP_ASSERT_CORE_LOCKED(); LWIP_ASSERT("mqtt_publish: client != NULL", client); LWIP_ASSERT("mqtt_publish: topic != NULL", topic); LWIP_ERROR("mqtt_publish: TCP disconnected", (client->conn_state != TCP_DISCONNECTED), return ERR_CONN); @@ -1040,21 +1113,21 @@ mqtt_publish(mqtt_client_t *client, const char *topic, const void *payload, u16_ LWIP_ERROR("mqtt_publish: topic length overflow", (topic_strlen <= (0xFFFF - 2)), return ERR_ARG); topic_len = (u16_t)topic_strlen; total_len = 2 + topic_len + payload_length; - LWIP_ERROR("mqtt_publish: total length overflow", (total_len <= 0xFFFF), return ERR_ARG); - remaining_length = (u16_t)total_len; - - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_publish: Publish with payload length %d to topic \"%s\"\n", payload_length, topic)); if (qos > 0) { - remaining_length += 2; + total_len += 2; /* Generate pkt_id id for QoS1 and 2 */ pkt_id = msg_generate_packet_id(client); } else { /* Use reserved value pkt_id 0 for QoS 0 in request handle */ pkt_id = 0; } + LWIP_ERROR("mqtt_publish: total length overflow", (total_len <= 0xFFFF), return ERR_ARG); + remaining_length = (u16_t)total_len; - r = mqtt_create_request(client->req_list, pkt_id, cb, arg); + LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_publish: Publish with payload length %d to topic \"%s\"\n", payload_length, topic)); + + r = mqtt_create_request(client->req_list, LWIP_ARRAYSIZE(client->req_list), pkt_id, cb, arg); if (r == NULL) { return ERR_MEM; } @@ -1106,6 +1179,7 @@ mqtt_sub_unsub(mqtt_client_t *client, const char *topic, u8_t qos, mqtt_request_ u16_t pkt_id; struct mqtt_request_t *r; + LWIP_ASSERT_CORE_LOCKED(); LWIP_ASSERT("mqtt_sub_unsub: client != NULL", client); LWIP_ASSERT("mqtt_sub_unsub: topic != NULL", topic); @@ -1119,12 +1193,12 @@ mqtt_sub_unsub(mqtt_client_t *client, const char *topic, u8_t qos, mqtt_request_ LWIP_ASSERT("mqtt_sub_unsub: qos < 3", qos < 3); if (client->conn_state == TCP_DISCONNECTED) { - LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_sub_unsub: Can not (un)subscribe in disconnected state\n")); + LWIP_DEBUGF(MQTT_DEBUG_WARN, ("mqtt_sub_unsub: Can not (un)subscribe in disconnected state\n")); return ERR_CONN; } pkt_id = msg_generate_packet_id(client); - r = mqtt_create_request(client->req_list, pkt_id, cb, arg); + r = mqtt_create_request(client->req_list, LWIP_ARRAYSIZE(client->req_list), pkt_id, cb, arg); if (r == NULL) { return ERR_MEM; } @@ -1134,7 +1208,7 @@ mqtt_sub_unsub(mqtt_client_t *client, const char *topic, u8_t qos, mqtt_request_ return ERR_MEM; } - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_sub_unsub: Client (un)subscribe to topic \"%s\", id: %d\n", topic, pkt_id)); + LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_sub_unsub: Client (un)subscribe to topic \"%s\", id: %d\n", topic, pkt_id)); mqtt_output_append_fixed_header(&client->output, sub ? MQTT_MSG_TYPE_SUBSCRIBE : MQTT_MSG_TYPE_UNSUBSCRIBE, 0, 1, 0, remaining_length); /* Packet id */ @@ -1162,8 +1236,9 @@ mqtt_sub_unsub(mqtt_client_t *client, const char *topic, u8_t qos, mqtt_request_ */ void mqtt_set_inpub_callback(mqtt_client_t *client, mqtt_incoming_publish_cb_t pub_cb, - mqtt_incoming_data_cb_t data_cb, void *arg) + mqtt_incoming_data_cb_t data_cb, void *arg) { + LWIP_ASSERT_CORE_LOCKED(); LWIP_ASSERT("mqtt_set_inpub_callback: client != NULL", client != NULL); client->data_cb = data_cb; client->pub_cb = pub_cb; @@ -1178,13 +1253,20 @@ mqtt_set_inpub_callback(mqtt_client_t *client, mqtt_incoming_publish_cb_t pub_cb mqtt_client_t * mqtt_client_new(void) { - mqtt_client_t *client = (mqtt_client_t *)mem_malloc(sizeof(mqtt_client_t)); - if (client != NULL) { - memset(client, 0, sizeof(mqtt_client_t)); - } - return client; + LWIP_ASSERT_CORE_LOCKED(); + return (mqtt_client_t *)mem_calloc(1, sizeof(mqtt_client_t)); } +/** + * @ingroup mqtt + * Free MQTT client instance + * @param client Pointer to instance to be freed + */ +void +mqtt_client_free(mqtt_client_t *client) +{ + mem_free(client); +} /** * @ingroup mqtt @@ -1207,14 +1289,16 @@ mqtt_client_connect(mqtt_client_t *client, const ip_addr_t *ip_addr, u16_t port, /* Length is the sum of 2+"MQTT", protocol level, flags and keep alive */ u16_t remaining_length = 2 + 4 + 1 + 1 + 2; u8_t flags = 0, will_topic_len = 0, will_msg_len = 0; + u16_t client_user_len = 0, client_pass_len = 0; + LWIP_ASSERT_CORE_LOCKED(); LWIP_ASSERT("mqtt_client_connect: client != NULL", client != NULL); LWIP_ASSERT("mqtt_client_connect: ip_addr != NULL", ip_addr != NULL); LWIP_ASSERT("mqtt_client_connect: client_info != NULL", client_info != NULL); LWIP_ASSERT("mqtt_client_connect: client_info->client_id != NULL", client_info->client_id != NULL); if (client->conn_state != TCP_DISCONNECTED) { - LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_client_connect: Already connected\n")); + LWIP_DEBUGF(MQTT_DEBUG_WARN, ("mqtt_client_connect: Already connected\n")); return ERR_ISCONN; } @@ -1223,7 +1307,7 @@ mqtt_client_connect(mqtt_client_t *client, const ip_addr_t *ip_addr, u16_t port, client->connect_arg = arg; client->connect_cb = cb; client->keep_alive = client_info->keep_alive; - mqtt_init_requests(client->req_list); + mqtt_init_requests(client->req_list, LWIP_ARRAYSIZE(client->req_list)); /* Build connect message */ if (client_info->will_topic != NULL && client_info->will_msg != NULL) { @@ -1243,6 +1327,26 @@ mqtt_client_connect(mqtt_client_t *client, const ip_addr_t *ip_addr, u16_t port, LWIP_ERROR("mqtt_client_connect: remaining_length overflow", len <= 0xFFFF, return ERR_VAL); remaining_length = (u16_t)len; } + if (client_info->client_user != NULL) { + flags |= MQTT_CONNECT_FLAG_USERNAME; + len = strlen(client_info->client_user); + LWIP_ERROR("mqtt_client_connect: client_info->client_user length overflow", len <= 0xFFFF, return ERR_VAL); + LWIP_ERROR("mqtt_client_connect: client_info->client_user length must be > 0", len > 0, return ERR_VAL); + client_user_len = (u16_t)len; + len = remaining_length + 2 + client_user_len; + LWIP_ERROR("mqtt_client_connect: remaining_length overflow", len <= 0xFFFF, return ERR_VAL); + remaining_length = (u16_t)len; + } + if (client_info->client_pass != NULL) { + flags |= MQTT_CONNECT_FLAG_PASSWORD; + len = strlen(client_info->client_pass); + LWIP_ERROR("mqtt_client_connect: client_info->client_pass length overflow", len <= 0xFFFF, return ERR_VAL); + LWIP_ERROR("mqtt_client_connect: client_info->client_pass length must be > 0", len > 0, return ERR_VAL); + client_pass_len = (u16_t)len; + len = remaining_length + 2 + client_pass_len; + LWIP_ERROR("mqtt_client_connect: remaining_length overflow", len <= 0xFFFF, return ERR_VAL); + remaining_length = (u16_t)len; + } /* Don't complicate things, always connect using clean session */ flags |= MQTT_CONNECT_FLAG_CLEAN_SESSION; @@ -1258,29 +1362,36 @@ mqtt_client_connect(mqtt_client_t *client, const ip_addr_t *ip_addr, u16_t port, return ERR_MEM; } - client->conn = tcp_new(); +#if LWIP_ALTCP && LWIP_ALTCP_TLS + if (client_info->tls_config) { + client->conn = altcp_tls_new(client_info->tls_config, IP_GET_TYPE(ip_addr)); + } else +#endif + { + client->conn = altcp_tcp_new_ip_type(IP_GET_TYPE(ip_addr)); + } if (client->conn == NULL) { return ERR_MEM; } /* Set arg pointer for callbacks */ - tcp_arg(client->conn, client); + altcp_arg(client->conn, client); /* Any local address, pick random local port number */ - err = tcp_bind(client->conn, IP_ADDR_ANY, 0); + err = altcp_bind(client->conn, IP_ADDR_ANY, 0); if (err != ERR_OK) { - LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_client_connect: Error binding to local ip/port, %d\n", err)); + LWIP_DEBUGF(MQTT_DEBUG_WARN, ("mqtt_client_connect: Error binding to local ip/port, %d\n", err)); goto tcp_fail; } - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_client_connect: Connecting to host: %s at port:%"U16_F"\n", ipaddr_ntoa(ip_addr), port)); + LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_client_connect: Connecting to host: %s at port:%"U16_F"\n", ipaddr_ntoa(ip_addr), port)); /* Connect to server */ - err = tcp_connect(client->conn, ip_addr, port, mqtt_tcp_connect_cb); + err = altcp_connect(client->conn, ip_addr, port, mqtt_tcp_connect_cb); if (err != ERR_OK) { - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_client_connect: Error connecting to remote ip/port, %d\n", err)); + LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_client_connect: Error connecting to remote ip/port, %d\n", err)); goto tcp_fail; } /* Set error callback */ - tcp_err(client->conn, mqtt_tcp_err_cb); + altcp_err(client->conn, mqtt_tcp_err_cb); client->conn_state = TCP_CONNECTING; /* Append fixed header */ @@ -1300,10 +1411,18 @@ mqtt_client_connect(mqtt_client_t *client, const ip_addr_t *ip_addr, u16_t port, mqtt_output_append_string(&client->output, client_info->will_topic, will_topic_len); mqtt_output_append_string(&client->output, client_info->will_msg, will_msg_len); } + /* Append user name if given */ + if ((flags & MQTT_CONNECT_FLAG_USERNAME) != 0) { + mqtt_output_append_string(&client->output, client_info->client_user, client_user_len); + } + /* Append password if given */ + if ((flags & MQTT_CONNECT_FLAG_PASSWORD) != 0) { + mqtt_output_append_string(&client->output, client_info->client_pass, client_pass_len); + } return ERR_OK; tcp_fail: - tcp_abort(client->conn); + altcp_abort(client->conn); client->conn = NULL; return err; } @@ -1317,6 +1436,7 @@ tcp_fail: void mqtt_disconnect(mqtt_client_t *client) { + LWIP_ASSERT_CORE_LOCKED(); LWIP_ASSERT("mqtt_disconnect: client != NULL", client); /* If connection in not already closed */ if (client->conn_state != TCP_DISCONNECTED) { @@ -1335,6 +1455,7 @@ mqtt_disconnect(mqtt_client_t *client) u8_t mqtt_client_is_connected(mqtt_client_t *client) { + LWIP_ASSERT_CORE_LOCKED(); LWIP_ASSERT("mqtt_client_is_connected: client != NULL", client); return client->conn_state == MQTT_CONNECTED; } diff --git a/Libraries/LwIP/src/apps/netbiosns/netbiosns.c b/Libraries/LwIP/src/apps/netbiosns/netbiosns.c index 1fe5526..6a605c8 100755 --- a/Libraries/LwIP/src/apps/netbiosns/netbiosns.c +++ b/Libraries/LwIP/src/apps/netbiosns/netbiosns.c @@ -1,4 +1,4 @@ -/** + /** * @file * NetBIOS name service responder */ @@ -40,6 +40,10 @@ * * This file is part of the lwIP TCP/IP stack. * + * Modifications by Ray Abram to respond to NetBIOS name requests when Incoming name = * + * - based on code from "https://github.com/esp8266/Arduino/commit/1f7989b31d26d7df9776a08f36d685eae7ac8f99" + * - with permission to relicense to BSD from original author: + * http://www.xpablo.cz/?p=751#more-751 */ #include "lwip/apps/netbiosns.h" @@ -48,13 +52,12 @@ #include "lwip/def.h" #include "lwip/udp.h" +#include "lwip/ip.h" #include "lwip/netif.h" +#include "lwip/prot/iana.h" #include -/** default port number for "NetBIOS Name service */ -#define NETBIOS_PORT 137 - /** size of a NetBIOS name */ #define NETBIOS_NAME_LEN 16 @@ -74,6 +77,10 @@ #define NETB_HFLAG_REPLYCODE 0x0008U #define NETB_HFLAG_REPLYCODE_NOERROR 0x0000U +/* NetBIOS question types */ +#define NETB_QTYPE_NB 0x0020U +#define NETB_QTYPE_NBSTAT 0x0021U + /** NetBIOS name flags */ #define NETB_NFLAG_UNIQUE 0x8000U #define NETB_NFLAG_NODETYPE 0x6000U @@ -82,6 +89,10 @@ #define NETB_NFLAG_NODETYPE_PNODE 0x2000U #define NETB_NFLAG_NODETYPE_BNODE 0x0000U +#define NETB_NFLAG_NAME_IN_CONFLICT 0x0800U /* 1=Yes, 0=No */ +#define NETB_NFLAG_NAME_IS_ACTIVE 0x0400U /* 1=Yes, 0=No */ +#define NETB_NFLAG_NAME_IS_PERMANENT 0x0200U /* 1=Yes (Name is Permanent Node Name), 0=No */ + /** NetBIOS message header */ #ifdef PACK_STRUCT_USE_INCLUDES # include "arch/bpstruct.h" @@ -100,6 +111,22 @@ PACK_STRUCT_END # include "arch/epstruct.h" #endif +/** NetBIOS message question part */ +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct netbios_question_hdr { + PACK_STRUCT_FLD_8(u8_t nametype); + PACK_STRUCT_FLD_8(u8_t encname[(NETBIOS_NAME_LEN * 2) + 1]); + PACK_STRUCT_FIELD(u16_t type); + PACK_STRUCT_FIELD(u16_t cls); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + /** NetBIOS message name part */ #ifdef PACK_STRUCT_USE_INCLUDES # include "arch/bpstruct.h" @@ -107,7 +134,7 @@ PACK_STRUCT_END PACK_STRUCT_BEGIN struct netbios_name_hdr { PACK_STRUCT_FLD_8(u8_t nametype); - PACK_STRUCT_FLD_8(u8_t encname[(NETBIOS_NAME_LEN*2)+1]); + PACK_STRUCT_FLD_8(u8_t encname[(NETBIOS_NAME_LEN * 2) + 1]); PACK_STRUCT_FIELD(u16_t type); PACK_STRUCT_FIELD(u16_t cls); PACK_STRUCT_FIELD(u32_t ttl); @@ -125,8 +152,7 @@ PACK_STRUCT_END # include "arch/bpstruct.h" #endif PACK_STRUCT_BEGIN -struct netbios_resp -{ +struct netbios_resp { struct netbios_hdr resp_hdr; struct netbios_name_hdr resp_name; } PACK_STRUCT_STRUCT; @@ -135,6 +161,74 @@ PACK_STRUCT_END # include "arch/epstruct.h" #endif +/** The NBNS Structure Responds to a Name Query */ +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct netbios_answer { + struct netbios_hdr answer_hdr; + /** the length of the next string */ + PACK_STRUCT_FIELD(u8_t name_size); + /** WARNING!!! this item may be of a different length (we use this struct for transmission) */ + PACK_STRUCT_FLD_8(u8_t query_name[(NETBIOS_NAME_LEN * 2) + 1]); + PACK_STRUCT_FIELD(u16_t packet_type); + PACK_STRUCT_FIELD(u16_t cls); + PACK_STRUCT_FIELD(u32_t ttl); + PACK_STRUCT_FIELD(u16_t data_length); +#define OFFSETOF_STRUCT_NETBIOS_ANSWER_NUMBER_OF_NAMES 56 + /** number of names */ + PACK_STRUCT_FLD_8(u8_t number_of_names); + /** node name */ + PACK_STRUCT_FLD_8(u8_t answer_name[NETBIOS_NAME_LEN]); + /** node flags */ + PACK_STRUCT_FIELD(u16_t answer_name_flags); + /** Unit ID */ + PACK_STRUCT_FLD_8(u8_t unit_id[6]); + /** Jumpers */ + PACK_STRUCT_FLD_8(u8_t jumpers); + /** Test result */ + PACK_STRUCT_FLD_8(u8_t test_result); + /** Version number */ + PACK_STRUCT_FIELD(u16_t version_number); + /** Period of statistics */ + PACK_STRUCT_FIELD(u16_t period_of_statistics); + /** Statistics */ + PACK_STRUCT_FIELD(u16_t number_of_crcs); + /** Statistics */ + PACK_STRUCT_FIELD(u16_t number_of_alignment_errors); + /** Statistics */ + PACK_STRUCT_FIELD(u16_t number_of_collisions); + /** Statistics */ + PACK_STRUCT_FIELD(u16_t number_of_send_aborts); + /** Statistics */ + PACK_STRUCT_FIELD(u32_t number_of_good_sends); + /** Statistics */ + PACK_STRUCT_FIELD(u32_t number_of_good_receives); + /** Statistics */ + PACK_STRUCT_FIELD(u16_t number_of_retransmits); + /** Statistics */ + PACK_STRUCT_FIELD(u16_t number_of_no_resource_condition); + /** Statistics */ + PACK_STRUCT_FIELD(u16_t number_of_free_command_blocks); + /** Statistics */ + PACK_STRUCT_FIELD(u16_t total_number_of_command_blocks); + /** Statistics */ + PACK_STRUCT_FIELD(u16_t max_total_number_of_command_blocks); + /** Statistics */ + PACK_STRUCT_FIELD(u16_t number_of_pending_sessions); + /** Statistics */ + PACK_STRUCT_FIELD(u16_t max_number_of_pending_sessions); + /** Statistics */ + PACK_STRUCT_FIELD(u16_t max_total_sessions_possible); + /** Statistics */ + PACK_STRUCT_FIELD(u16_t session_data_packet_size); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + #ifdef NETBIOS_LWIP_NAME #define NETBIOS_LOCAL_NAME NETBIOS_LWIP_NAME #else @@ -142,7 +236,7 @@ static char netbiosns_local_name[NETBIOS_NAME_LEN]; #define NETBIOS_LOCAL_NAME netbiosns_local_name #endif -struct udp_pcb *netbiosns_pcb; +static struct udp_pcb *netbiosns_pcb; /** Decode a NetBIOS name (from packet to string) */ static int @@ -161,11 +255,13 @@ netbiosns_name_decode(char *name_enc, char *name_dec, int name_dec_len) /* Every two characters of the first level-encoded name * turn into one character in the decoded name. */ cname = *pname; - if (cname == '\0') - break; /* no more characters */ - if (cname == '.') - break; /* scope ID follows */ - if (cname < 'A' || cname > 'Z') { + if (cname == '\0') { + break; /* no more characters */ + } + if (cname == '.') { + break; /* scope ID follows */ + } + if (!lwip_isupper(cname)) { /* Not legal. */ return -1; } @@ -174,12 +270,7 @@ netbiosns_name_decode(char *name_enc, char *name_dec, int name_dec_len) pname++; cname = *pname; - if (cname == '\0' || cname == '.') { - /* No more characters in the name - but we're in - * the middle of a pair. Not legal. */ - return -1; - } - if (cname < 'A' || cname > 'Z') { + if (!lwip_isupper(cname)) { /* Not legal. */ return -1; } @@ -190,7 +281,7 @@ netbiosns_name_decode(char *name_enc, char *name_dec, int name_dec_len) /* Do we have room to store the character? */ if (idx < NETBIOS_NAME_LEN) { /* Yes - store the character. */ - name_dec[idx++] = (cnbname!=' '?cnbname:'\0'); + name_dec[idx++] = (cnbname != ' ' ? cnbname : '\0'); } } @@ -215,10 +306,12 @@ netbiosns_name_encode(char *name_enc, char *name_dec, int name_dec_len) /* Every two characters of the first level-encoded name * turn into one character in the decoded name. */ cname = *pname; - if (cname == '\0') - break; /* no more characters */ - if (cname == '.') - break; /* scope ID follows */ + if (cname == '\0') { + break; /* no more characters */ + } + if (cname == '.') { + break; /* scope ID follows */ + } if ((cname < 'A' || cname > 'Z') && (cname < '0' || cname > '9')) { /* Not legal. */ return -1; @@ -231,13 +324,13 @@ netbiosns_name_encode(char *name_enc, char *name_dec, int name_dec_len) /* Yes - store the character. */ ucname = cname; - name_dec[idx++] = ('A'+((ucname>>4) & 0x0F)); - name_dec[idx++] = ('A'+( ucname & 0x0F)); + name_dec[idx++] = ('A' + ((ucname >> 4) & 0x0F)); + name_dec[idx++] = ('A' + ( ucname & 0x0F)); pname++; } /* Fill with "space" coding */ - for (;idx < name_dec_len - 1;) { + for (; idx < name_dec_len - 1;) { name_dec[idx++] = 'C'; name_dec[idx++] = 'A'; } @@ -257,55 +350,118 @@ netbiosns_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t /* if packet is valid */ if (p != NULL) { - char netbios_name[NETBIOS_NAME_LEN+1]; - struct netbios_hdr* netbios_hdr = (struct netbios_hdr*)p->payload; - struct netbios_name_hdr* netbios_name_hdr = (struct netbios_name_hdr*)(netbios_hdr+1); + char netbios_name[NETBIOS_NAME_LEN + 1]; + struct netbios_hdr *netbios_hdr = (struct netbios_hdr *)p->payload; + struct netbios_question_hdr *netbios_question_hdr = (struct netbios_question_hdr *)(netbios_hdr + 1); + /* is the packet long enough (we need the header in one piece) */ + if (p->len < (sizeof(struct netbios_hdr) + sizeof(struct netbios_question_hdr))) { + /* packet too short */ + pbuf_free(p); + return; + } /* we only answer if we got a default interface */ if (netif_default != NULL) { /* @todo: do we need to check answerRRs/authorityRRs/additionalRRs? */ /* if the packet is a NetBIOS name query question */ if (((netbios_hdr->flags & PP_NTOHS(NETB_HFLAG_OPCODE)) == PP_NTOHS(NETB_HFLAG_OPCODE_NAME_QUERY)) && ((netbios_hdr->flags & PP_NTOHS(NETB_HFLAG_RESPONSE)) == 0) && - (netbios_hdr->questions == PP_NTOHS(1))) { + (netbios_hdr->questions == PP_NTOHS(1))) { /* decode the NetBIOS name */ - netbiosns_name_decode((char*)(netbios_name_hdr->encname), netbios_name, sizeof(netbios_name)); - /* if the packet is for us */ - if (lwip_strnicmp(netbios_name, NETBIOS_LOCAL_NAME, sizeof(NETBIOS_LOCAL_NAME)) == 0) { - struct pbuf *q; - struct netbios_resp *resp; + netbiosns_name_decode((char *)(netbios_question_hdr->encname), netbios_name, sizeof(netbios_name)); + /* check the request type */ + if (netbios_question_hdr->type == PP_HTONS(NETB_QTYPE_NB)) { + /* if the packet is for us */ + if (lwip_strnicmp(netbios_name, NETBIOS_LOCAL_NAME, sizeof(NETBIOS_LOCAL_NAME)) == 0) { + struct pbuf *q; + struct netbios_resp *resp; - q = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct netbios_resp), PBUF_RAM); - if (q != NULL) { - resp = (struct netbios_resp*)q->payload; + q = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct netbios_resp), PBUF_RAM); + if (q != NULL) { + resp = (struct netbios_resp *)q->payload; - /* prepare NetBIOS header response */ - resp->resp_hdr.trans_id = netbios_hdr->trans_id; - resp->resp_hdr.flags = PP_HTONS(NETB_HFLAG_RESPONSE | - NETB_HFLAG_OPCODE_NAME_QUERY | - NETB_HFLAG_AUTHORATIVE | - NETB_HFLAG_RECURS_DESIRED); - resp->resp_hdr.questions = 0; - resp->resp_hdr.answerRRs = PP_HTONS(1); - resp->resp_hdr.authorityRRs = 0; - resp->resp_hdr.additionalRRs = 0; + /* prepare NetBIOS header response */ + resp->resp_hdr.trans_id = netbios_hdr->trans_id; + resp->resp_hdr.flags = PP_HTONS(NETB_HFLAG_RESPONSE | + NETB_HFLAG_OPCODE_NAME_QUERY | + NETB_HFLAG_AUTHORATIVE | + NETB_HFLAG_RECURS_DESIRED); + resp->resp_hdr.questions = 0; + resp->resp_hdr.answerRRs = PP_HTONS(1); + resp->resp_hdr.authorityRRs = 0; + resp->resp_hdr.additionalRRs = 0; - /* prepare NetBIOS header datas */ - MEMCPY( resp->resp_name.encname, netbios_name_hdr->encname, sizeof(netbios_name_hdr->encname)); - resp->resp_name.nametype = netbios_name_hdr->nametype; - resp->resp_name.type = netbios_name_hdr->type; - resp->resp_name.cls = netbios_name_hdr->cls; - resp->resp_name.ttl = PP_HTONL(NETBIOS_NAME_TTL); - resp->resp_name.datalen = PP_HTONS(sizeof(resp->resp_name.flags)+sizeof(resp->resp_name.addr)); - resp->resp_name.flags = PP_HTONS(NETB_NFLAG_NODETYPE_BNODE); - ip4_addr_copy(resp->resp_name.addr, *netif_ip4_addr(netif_default)); + /* prepare NetBIOS header datas */ + MEMCPY( resp->resp_name.encname, netbios_question_hdr->encname, sizeof(netbios_question_hdr->encname)); + resp->resp_name.nametype = netbios_question_hdr->nametype; + resp->resp_name.type = netbios_question_hdr->type; + resp->resp_name.cls = netbios_question_hdr->cls; + resp->resp_name.ttl = PP_HTONL(NETBIOS_NAME_TTL); + resp->resp_name.datalen = PP_HTONS(sizeof(resp->resp_name.flags) + sizeof(resp->resp_name.addr)); + resp->resp_name.flags = PP_HTONS(NETB_NFLAG_NODETYPE_BNODE); + ip4_addr_copy(resp->resp_name.addr, *netif_ip4_addr(netif_default)); - /* send the NetBIOS response */ - udp_sendto(upcb, q, addr, port); + /* send the NetBIOS response */ + udp_sendto(upcb, q, addr, port); - /* free the "reference" pbuf */ - pbuf_free(q); + /* free the "reference" pbuf */ + pbuf_free(q); + } } +#if LWIP_NETBIOS_RESPOND_NAME_QUERY + } else if (netbios_question_hdr->type == PP_HTONS(NETB_QTYPE_NBSTAT)) { + /* if the packet is for us or general query */ + if (!lwip_strnicmp(netbios_name, NETBIOS_LOCAL_NAME, sizeof(NETBIOS_LOCAL_NAME)) || + !lwip_strnicmp(netbios_name, "*", sizeof(NETBIOS_LOCAL_NAME))) { + /* general query - ask for our IP address */ + struct pbuf *q; + struct netbios_answer *resp; + + q = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct netbios_answer), PBUF_RAM); + if (q != NULL) { + /* buffer to which a response is compiled */ + resp = (struct netbios_answer *) q->payload; + + /* Init response to zero, especially the statistics fields */ + memset(resp, 0, sizeof(*resp)); + + /* copy the query to the response ID */ + resp->answer_hdr.trans_id = netbios_hdr->trans_id; + /* acknowledgment of termination */ + resp->answer_hdr.flags = PP_HTONS(NETB_HFLAG_RESPONSE | NETB_HFLAG_OPCODE_NAME_QUERY | NETB_HFLAG_AUTHORATIVE); + /* resp->answer_hdr.questions = PP_HTONS(0); done by memset() */ + /* serial number of the answer */ + resp->answer_hdr.answerRRs = PP_HTONS(1); + /* resp->answer_hdr.authorityRRs = PP_HTONS(0); done by memset() */ + /* resp->answer_hdr.additionalRRs = PP_HTONS(0); done by memset() */ + /* we will copy the length of the station name */ + resp->name_size = netbios_question_hdr->nametype; + /* we will copy the queried name */ + MEMCPY(resp->query_name, netbios_question_hdr->encname, (NETBIOS_NAME_LEN * 2) + 1); + /* NBSTAT */ + resp->packet_type = PP_HTONS(0x21); + /* Internet name */ + resp->cls = PP_HTONS(1); + /* resp->ttl = PP_HTONL(0); done by memset() */ + resp->data_length = PP_HTONS(sizeof(struct netbios_answer) - offsetof(struct netbios_answer, number_of_names)); + resp->number_of_names = 1; + + /* make windows see us as workstation, not as a server */ + memset(resp->answer_name, 0x20, NETBIOS_NAME_LEN - 1); + /* strlen is checked to be < NETBIOS_NAME_LEN during initialization */ + MEMCPY(resp->answer_name, NETBIOS_LOCAL_NAME, strlen(NETBIOS_LOCAL_NAME)); + + /* b-node, unique, active */ + resp->answer_name_flags = PP_HTONS(NETB_NFLAG_NAME_IS_ACTIVE); + + /* Set responder netif MAC address */ + SMEMCPY(resp->unit_id, ip_current_input_netif()->hwaddr, sizeof(resp->unit_id)); + + udp_sendto(upcb, q, addr, port); + pbuf_free(q); + } + } +#endif /* LWIP_NETBIOS_RESPOND_NAME_QUERY */ } } } @@ -315,12 +471,13 @@ netbiosns_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t } /** - * @ingroup netbiosns + * @ingroup netbiosns * Init netbios responder */ void netbiosns_init(void) { + /* LWIP_ASSERT_CORE_LOCKED(); is checked by udp_new() */ #ifdef NETBIOS_LWIP_NAME LWIP_ASSERT("NetBIOS name is too long!", strlen(NETBIOS_LWIP_NAME) < NETBIOS_NAME_LEN); #endif @@ -329,35 +486,44 @@ netbiosns_init(void) if (netbiosns_pcb != NULL) { /* we have to be allowed to send broadcast packets! */ ip_set_option(netbiosns_pcb, SOF_BROADCAST); - udp_bind(netbiosns_pcb, IP_ANY_TYPE, NETBIOS_PORT); + udp_bind(netbiosns_pcb, IP_ANY_TYPE, LWIP_IANA_PORT_NETBIOS); udp_recv(netbiosns_pcb, netbiosns_recv, netbiosns_pcb); } } #ifndef NETBIOS_LWIP_NAME /** - * @ingroup netbiosns + * @ingroup netbiosns * Set netbios name. ATTENTION: the hostname must be less than 15 characters! + * the NetBIOS name spec says the name MUST be upper case, so incoming name is forced into uppercase :-) */ void -netbiosns_set_name(const char* hostname) +netbiosns_set_name(const char *hostname) { + size_t i; size_t copy_len = strlen(hostname); + LWIP_ASSERT_CORE_LOCKED(); LWIP_ASSERT("NetBIOS name is too long!", copy_len < NETBIOS_NAME_LEN); if (copy_len >= NETBIOS_NAME_LEN) { copy_len = NETBIOS_NAME_LEN - 1; } - MEMCPY(netbiosns_local_name, hostname, copy_len + 1); + + /* make name into upper case */ + for (i = 0; i < copy_len; i++ ) { + netbiosns_local_name[i] = (char)lwip_toupper(hostname[i]); + } + netbiosns_local_name[copy_len] = '\0'; } -#endif +#endif /* NETBIOS_LWIP_NAME */ /** - * @ingroup netbiosns + * @ingroup netbiosns * Stop netbios responder */ void netbiosns_stop(void) { + LWIP_ASSERT_CORE_LOCKED(); if (netbiosns_pcb != NULL) { udp_remove(netbiosns_pcb); netbiosns_pcb = NULL; diff --git a/Libraries/LwIP/src/apps/smtp/smtp.c b/Libraries/LwIP/src/apps/smtp/smtp.c new file mode 100644 index 0000000..55303c3 --- /dev/null +++ b/Libraries/LwIP/src/apps/smtp/smtp.c @@ -0,0 +1,1555 @@ +/** + * @file + * SMTP client module + * + * Author: Simon Goldschmidt + * + * @defgroup smtp SMTP client + * @ingroup apps + * + * This is simple SMTP client for raw API. + * It is a minimal implementation of SMTP as specified in RFC 5321. + * + * Example usage: +@code{.c} + void my_smtp_result_fn(void *arg, u8_t smtp_result, u16_t srv_err, err_t err) + { + printf("mail (%p) sent with results: 0x%02x, 0x%04x, 0x%08x\n", arg, + smtp_result, srv_err, err); + } + static void my_smtp_test(void) + { + smtp_set_server_addr("mymailserver.org"); + -> set both username and password as NULL if no auth needed + smtp_set_auth("username", "password"); + smtp_send_mail("sender", "recipient", "subject", "body", my_smtp_result_fn, + some_argument); + } +@endcode + + * When using from any other thread than the tcpip_thread (for NO_SYS==0), use + * smtp_send_mail_int()! + * + * SMTP_BODYDH usage: +@code{.c} + int my_smtp_bodydh_fn(void *arg, struct smtp_bodydh *bdh) + { + if(bdh->state >= 10) { + return BDH_DONE; + } + sprintf(bdh->buffer,"Line #%2d\r\n",bdh->state); + bdh->length = strlen(bdh->buffer); + ++bdh->state; + return BDH_WORKING; + } + + smtp_send_mail_bodycback("sender", "recipient", "subject", + my_smtp_bodydh_fn, my_smtp_result_fn, some_argument); +@endcode + * + * @todo: + * - attachments (the main difficulty here is streaming base64-encoding to + * prevent having to allocate a buffer for the whole encoded file at once) + * - test with more mail servers... + * + */ + +#include "lwip/apps/smtp.h" + +#if LWIP_TCP && LWIP_CALLBACK_API +#include "lwip/sys.h" +#include "lwip/sockets.h" +#include "lwip/altcp.h" +#include "lwip/dns.h" +#include "lwip/mem.h" +#include "lwip/altcp_tcp.h" +#include "lwip/altcp_tls.h" + +#include /* strlen, memcpy */ +#include + +/** TCP poll interval. Unit is 0.5 sec. */ +#define SMTP_POLL_INTERVAL 4 +/** TCP poll timeout while sending message body, reset after every + * successful write. 3 minutes */ +#define SMTP_TIMEOUT_DATABLOCK ( 3 * 60 * SMTP_POLL_INTERVAL / 2) +/** TCP poll timeout while waiting for confirmation after sending the body. + * 10 minutes */ +#define SMTP_TIMEOUT_DATATERM (10 * 60 * SMTP_POLL_INTERVAL / 2) +/** TCP poll timeout while not sending the body. + * This is somewhat lower than the RFC states (5 minutes for initial, MAIL + * and RCPT) but still OK for us here. + * 2 minutes */ +#define SMTP_TIMEOUT ( 2 * 60 * SMTP_POLL_INTERVAL / 2) + +/* the various debug levels for this file */ +#define SMTP_DEBUG_TRACE (SMTP_DEBUG | LWIP_DBG_TRACE) +#define SMTP_DEBUG_STATE (SMTP_DEBUG | LWIP_DBG_STATE) +#define SMTP_DEBUG_WARN (SMTP_DEBUG | LWIP_DBG_LEVEL_WARNING) +#define SMTP_DEBUG_WARN_STATE (SMTP_DEBUG | LWIP_DBG_LEVEL_WARNING | LWIP_DBG_STATE) +#define SMTP_DEBUG_SERIOUS (SMTP_DEBUG | LWIP_DBG_LEVEL_SERIOUS) + + +#define SMTP_RX_BUF_LEN 255 +#define SMTP_TX_BUF_LEN 255 +#define SMTP_CRLF "\r\n" +#define SMTP_CRLF_LEN 2 + +#define SMTP_RESP_220 "220" +#define SMTP_RESP_235 "235" +#define SMTP_RESP_250 "250" +#define SMTP_RESP_334 "334" +#define SMTP_RESP_354 "354" +#define SMTP_RESP_LOGIN_UNAME "VXNlcm5hbWU6" +#define SMTP_RESP_LOGIN_PASS "UGFzc3dvcmQ6" + +#define SMTP_KEYWORD_AUTH_SP "AUTH " +#define SMTP_KEYWORD_AUTH_EQ "AUTH=" +#define SMTP_KEYWORD_AUTH_LEN 5 +#define SMTP_AUTH_PARAM_PLAIN "PLAIN" +#define SMTP_AUTH_PARAM_LOGIN "LOGIN" + +#define SMTP_CMD_EHLO_1 "EHLO [" +#define SMTP_CMD_EHLO_1_LEN 6 +#define SMTP_CMD_EHLO_2 "]\r\n" +#define SMTP_CMD_EHLO_2_LEN 3 +#define SMTP_CMD_AUTHPLAIN_1 "AUTH PLAIN " +#define SMTP_CMD_AUTHPLAIN_1_LEN 11 +#define SMTP_CMD_AUTHPLAIN_2 "\r\n" +#define SMTP_CMD_AUTHPLAIN_2_LEN 2 +#define SMTP_CMD_AUTHLOGIN "AUTH LOGIN\r\n" +#define SMTP_CMD_AUTHLOGIN_LEN 12 +#define SMTP_CMD_MAIL_1 "MAIL FROM: <" +#define SMTP_CMD_MAIL_1_LEN 12 +#define SMTP_CMD_MAIL_2 ">\r\n" +#define SMTP_CMD_MAIL_2_LEN 3 +#define SMTP_CMD_RCPT_1 "RCPT TO: <" +#define SMTP_CMD_RCPT_1_LEN 10 +#define SMTP_CMD_RCPT_2 ">\r\n" +#define SMTP_CMD_RCPT_2_LEN 3 +#define SMTP_CMD_DATA "DATA\r\n" +#define SMTP_CMD_DATA_LEN 6 +#define SMTP_CMD_HEADER_1 "From: <" +#define SMTP_CMD_HEADER_1_LEN 7 +#define SMTP_CMD_HEADER_2 ">\r\nTo: <" +#define SMTP_CMD_HEADER_2_LEN 8 +#define SMTP_CMD_HEADER_3 ">\r\nSubject: " +#define SMTP_CMD_HEADER_3_LEN 12 +#define SMTP_CMD_HEADER_4 "\r\n\r\n" +#define SMTP_CMD_HEADER_4_LEN 4 +#define SMTP_CMD_BODY_FINISHED "\r\n.\r\n" +#define SMTP_CMD_BODY_FINISHED_LEN 5 +#define SMTP_CMD_QUIT "QUIT\r\n" +#define SMTP_CMD_QUIT_LEN 6 + +#if defined(SMTP_STAT_TX_BUF_MAX) && SMTP_STAT_TX_BUF_MAX +#define SMTP_TX_BUF_MAX(len) LWIP_MACRO(if((len) > smtp_tx_buf_len_max) smtp_tx_buf_len_max = (len);) +#else /* SMTP_STAT_TX_BUF_MAX */ +#define SMTP_TX_BUF_MAX(len) +#endif /* SMTP_STAT_TX_BUF_MAX */ + +#if SMTP_COPY_AUTHDATA +#define SMTP_USERNAME(session) (session)->username +#define SMTP_PASS(session) (session)->pass +#define SMTP_AUTH_PLAIN_DATA(session) (session)->auth_plain +#define SMTP_AUTH_PLAIN_LEN(session) (session)->auth_plain_len +#else /* SMTP_COPY_AUTHDATA */ +#define SMTP_USERNAME(session) smtp_username +#define SMTP_PASS(session) smtp_pass +#define SMTP_AUTH_PLAIN_DATA(session) smtp_auth_plain +#define SMTP_AUTH_PLAIN_LEN(session) smtp_auth_plain_len +#endif /* SMTP_COPY_AUTHDATA */ + +#if SMTP_BODYDH +#ifndef SMTP_BODYDH_MALLOC +#define SMTP_BODYDH_MALLOC(size) mem_malloc(size) +#define SMTP_BODYDH_FREE(ptr) mem_free(ptr) +#endif + +/* Some internal state return values */ +#define BDHALLDATASENT 2 +#define BDHSOMEDATASENT 1 + +enum bdh_handler_state { + BDH_SENDING, /* Serving the user function generating body content */ + BDH_STOP /* User function stopped, closing */ +}; +#endif + +/** State for SMTP client state machine */ +enum smtp_session_state { + SMTP_NULL, + SMTP_HELO, + SMTP_AUTH_PLAIN, + SMTP_AUTH_LOGIN_UNAME, + SMTP_AUTH_LOGIN_PASS, + SMTP_AUTH_LOGIN, + SMTP_MAIL, + SMTP_RCPT, + SMTP_DATA, + SMTP_BODY, + SMTP_QUIT, + SMTP_CLOSED +}; + +#ifdef LWIP_DEBUG +/** State-to-string table for debugging */ +static const char *smtp_state_str[] = { + "SMTP_NULL", + "SMTP_HELO", + "SMTP_AUTH_PLAIN", + "SMTP_AUTH_LOGIN_UNAME", + "SMTP_AUTH_LOGIN_PASS", + "SMTP_AUTH_LOGIN", + "SMTP_MAIL", + "SMTP_RCPT", + "SMTP_DATA", + "SMTP_BODY", + "SMTP_QUIT", + "SMTP_CLOSED", +}; + +static const char *smtp_result_strs[] = { + "SMTP_RESULT_OK", + "SMTP_RESULT_ERR_UNKNOWN", + "SMTP_RESULT_ERR_CONNECT", + "SMTP_RESULT_ERR_HOSTNAME", + "SMTP_RESULT_ERR_CLOSED", + "SMTP_RESULT_ERR_TIMEOUT", + "SMTP_RESULT_ERR_SVR_RESP", + "SMTP_RESULT_ERR_MEM" +}; +#endif /* LWIP_DEBUG */ + +#if SMTP_BODYDH +struct smtp_bodydh_state { + smtp_bodycback_fn callback_fn; /* The function to call (again) */ + u16_t state; + struct smtp_bodydh exposed; /* the user function structure */ +}; +#endif /* SMTP_BODYDH */ + +/** struct keeping the body and state of an smtp session */ +struct smtp_session { + /** keeping the state of the smtp session */ + enum smtp_session_state state; + /** timeout handling, if this reaches 0, the connection is closed */ + u16_t timer; + /** helper buffer for transmit, not used for sending body */ + char tx_buf[SMTP_TX_BUF_LEN + 1]; + struct pbuf* p; + /** source email address */ + const char* from; + /** size of the sourceemail address */ + u16_t from_len; + /** target email address */ + const char* to; + /** size of the target email address */ + u16_t to_len; + /** subject of the email */ + const char *subject; + /** length of the subject string */ + u16_t subject_len; + /** this is the body of the mail to be sent */ + const char* body; + /** this is the length of the body to be sent */ + u16_t body_len; + /** amount of data from body already sent */ + u16_t body_sent; + /** callback function to call when closed */ + smtp_result_fn callback_fn; + /** argument for callback function */ + void *callback_arg; +#if SMTP_COPY_AUTHDATA + /** Username to use for this request */ + char *username; + /** Password to use for this request */ + char *pass; + /** Username and password combined as necessary for PLAIN authentication */ + char auth_plain[SMTP_MAX_USERNAME_LEN + SMTP_MAX_PASS_LEN + 3]; + /** Length of smtp_auth_plain string (cannot use strlen since it includes \0) */ + size_t auth_plain_len; +#endif /* SMTP_COPY_AUTHDATA */ +#if SMTP_BODYDH + struct smtp_bodydh_state *bodydh; +#endif /* SMTP_BODYDH */ +}; + +/** IP address or DNS name of the server to use for next SMTP request */ +static char smtp_server[SMTP_MAX_SERVERNAME_LEN + 1]; +/** TCP port of the server to use for next SMTP request */ +static u16_t smtp_server_port = SMTP_DEFAULT_PORT; +#if LWIP_ALTCP && LWIP_ALTCP_TLS +/** If this is set, mail is sent using SMTPS */ +static struct altcp_tls_config *smtp_server_tls_config; +#endif +/** Username to use for the next SMTP request */ +static char *smtp_username; +/** Password to use for the next SMTP request */ +static char *smtp_pass; +/** Username and password combined as necessary for PLAIN authentication */ +static char smtp_auth_plain[SMTP_MAX_USERNAME_LEN + SMTP_MAX_PASS_LEN + 3]; +/** Length of smtp_auth_plain string (cannot use strlen since it includes \0) */ +static size_t smtp_auth_plain_len; + +#if SMTP_CHECK_DATA +static err_t smtp_verify(const char *data, size_t data_len, u8_t linebreaks_allowed); +#endif /* SMTP_CHECK_DATA */ +static err_t smtp_tcp_recv(void *arg, struct altcp_pcb *pcb, struct pbuf *p, err_t err); +static void smtp_tcp_err(void *arg, err_t err); +static err_t smtp_tcp_poll(void *arg, struct altcp_pcb *pcb); +static err_t smtp_tcp_sent(void *arg, struct altcp_pcb *pcb, u16_t len); +static err_t smtp_tcp_connected(void *arg, struct altcp_pcb *pcb, err_t err); +#if LWIP_DNS +static void smtp_dns_found(const char* hostname, const ip_addr_t *ipaddr, void *arg); +#endif /* LWIP_DNS */ +#if SMTP_SUPPORT_AUTH_PLAIN || SMTP_SUPPORT_AUTH_LOGIN +static size_t smtp_base64_encode(char* target, size_t target_len, const char* source, size_t source_len); +#endif /* SMTP_SUPPORT_AUTH_PLAIN || SMTP_SUPPORT_AUTH_LOGIN */ +static enum smtp_session_state smtp_prepare_mail(struct smtp_session *s, u16_t *tx_buf_len); +static void smtp_send_body(struct smtp_session *s, struct altcp_pcb *pcb); +static void smtp_process(void *arg, struct altcp_pcb *pcb, struct pbuf *p); +#if SMTP_BODYDH +static void smtp_send_body_data_handler(struct smtp_session *s, struct altcp_pcb *pcb); +#endif /* SMTP_BODYDH */ + + +#ifdef LWIP_DEBUG +/** Convert an smtp result to a string */ +const char* +smtp_result_str(u8_t smtp_result) +{ + if (smtp_result >= LWIP_ARRAYSIZE(smtp_result_strs)) { + return "UNKNOWN"; + } + return smtp_result_strs[smtp_result]; +} + +/** Null-terminates the payload of p for printing out messages. + * WARNING: use this only if p is not needed any more as the last byte of + * payload is deleted! + */ +static const char* +smtp_pbuf_str(struct pbuf* p) +{ + if ((p == NULL) || (p->len == 0)) { + return ""; + } + ((char*)p->payload)[p->len] = 0; + return (const char*)p->payload; +} +#endif /* LWIP_DEBUG */ + +/** @ingroup smtp + * Set IP address or DNS name for next SMTP connection + * + * @param server IP address (in ASCII representation) or DNS name of the server + */ +err_t +smtp_set_server_addr(const char* server) +{ + size_t len = 0; + + LWIP_ASSERT_CORE_LOCKED(); + + if (server != NULL) { + /* strlen: returns length WITHOUT terminating 0 byte */ + len = strlen(server); + } + if (len > SMTP_MAX_SERVERNAME_LEN) { + return ERR_MEM; + } + if (len != 0) { + MEMCPY(smtp_server, server, len); + } + smtp_server[len] = 0; /* always OK because of smtp_server[SMTP_MAX_SERVERNAME_LEN + 1] */ + return ERR_OK; +} + +/** @ingroup smtp + * Set TCP port for next SMTP connection + * + * @param port TCP port + */ +void +smtp_set_server_port(u16_t port) +{ + LWIP_ASSERT_CORE_LOCKED(); + smtp_server_port = port; +} + +#if LWIP_ALTCP && LWIP_ALTCP_TLS +/** @ingroup smtp + * Set TLS configuration for next SMTP connection + * + * @param tls_config TLS configuration + */ +void +smtp_set_tls_config(struct altcp_tls_config *tls_config) +{ + LWIP_ASSERT_CORE_LOCKED(); + smtp_server_tls_config = tls_config; +} +#endif + +/** @ingroup smtp + * Set authentication parameters for next SMTP connection + * + * @param username login name as passed to the server + * @param pass password passed to the server together with username + */ +err_t +smtp_set_auth(const char* username, const char* pass) +{ + size_t uname_len = 0; + size_t pass_len = 0; + + LWIP_ASSERT_CORE_LOCKED(); + + memset(smtp_auth_plain, 0xfa, 64); + if (username != NULL) { + uname_len = strlen(username); + if (uname_len > SMTP_MAX_USERNAME_LEN) { + LWIP_DEBUGF(SMTP_DEBUG_SERIOUS, ("Username is too long, %d instead of %d\n", + (int)uname_len, SMTP_MAX_USERNAME_LEN)); + return ERR_ARG; + } + } + if (pass != NULL) { +#if SMTP_SUPPORT_AUTH_LOGIN || SMTP_SUPPORT_AUTH_PLAIN + pass_len = strlen(pass); + if (pass_len > SMTP_MAX_PASS_LEN) { + LWIP_DEBUGF(SMTP_DEBUG_SERIOUS, ("Password is too long, %d instead of %d\n", + (int)uname_len, SMTP_MAX_USERNAME_LEN)); + return ERR_ARG; + } +#else /* SMTP_SUPPORT_AUTH_LOGIN || SMTP_SUPPORT_AUTH_PLAIN */ + LWIP_DEBUGF(SMTP_DEBUG_WARN, ("Password not supported as no authentication methods are activated\n")); +#endif /* SMTP_SUPPORT_AUTH_LOGIN || SMTP_SUPPORT_AUTH_PLAIN */ + } + *smtp_auth_plain = 0; + if (username != NULL) { + smtp_username = smtp_auth_plain + 1; + strcpy(smtp_username, username); + } + if (pass != NULL) { + smtp_pass = smtp_auth_plain + uname_len + 2; + strcpy(smtp_pass, pass); + } + smtp_auth_plain_len = uname_len + pass_len + 2; + + return ERR_OK; +} + +#if SMTP_BODYDH +static void smtp_free_struct(struct smtp_session *s) +{ + if (s->bodydh != NULL) { + SMTP_BODYDH_FREE(s->bodydh); + } + SMTP_STATE_FREE(s); +} +#else /* SMTP_BODYDH */ +#define smtp_free_struct(x) SMTP_STATE_FREE(x) +#endif /* SMTP_BODYDH */ + +static struct altcp_pcb* +smtp_setup_pcb(struct smtp_session *s, const ip_addr_t* remote_ip) +{ + struct altcp_pcb* pcb; + LWIP_UNUSED_ARG(remote_ip); + +#if LWIP_ALTCP && LWIP_ALTCP_TLS + if (smtp_server_tls_config) { + pcb = altcp_tls_new(smtp_server_tls_config, IP_GET_TYPE(remote_ip)); + } else +#endif + { + pcb = altcp_tcp_new_ip_type(IP_GET_TYPE(remote_ip)); + } + if (pcb != NULL) { + altcp_arg(pcb, s); + altcp_recv(pcb, smtp_tcp_recv); + altcp_err(pcb, smtp_tcp_err); + altcp_poll(pcb, smtp_tcp_poll, SMTP_POLL_INTERVAL); + altcp_sent(pcb, smtp_tcp_sent); + } + return pcb; +} + +/** The actual mail-sending function, called by smtp_send_mail and + * smtp_send_mail_static after setting up the struct smtp_session. + */ +static err_t +smtp_send_mail_alloced(struct smtp_session *s) +{ + err_t err; + struct altcp_pcb* pcb = NULL; + ip_addr_t addr; + + LWIP_ASSERT("no smtp_session supplied", s != NULL); + +#if SMTP_CHECK_DATA + /* check that body conforms to RFC: + * - convert all single-CR or -LF in body to CRLF + * - only 7-bit ASCII is allowed + */ + if (smtp_verify(s->to, s->to_len, 0) != ERR_OK) { + err = ERR_ARG; + goto leave; + } + if (smtp_verify(s->from, s->from_len, 0) != ERR_OK) { + err = ERR_ARG; + goto leave; + } + if (smtp_verify(s->subject, s->subject_len, 0) != ERR_OK) { + err = ERR_ARG; + goto leave; + } +#if SMTP_BODYDH + if (s->bodydh == NULL) +#endif /* SMTP_BODYDH */ + { + if (smtp_verify(s->body, s->body_len, 0) != ERR_OK) { + err = ERR_ARG; + goto leave; + } + } +#endif /* SMTP_CHECK_DATA */ + +#if SMTP_COPY_AUTHDATA + /* copy auth data, ensuring the first byte is always zero */ + MEMCPY(s->auth_plain + 1, smtp_auth_plain + 1, smtp_auth_plain_len - 1); + s->auth_plain_len = smtp_auth_plain_len; + /* default username and pass is empty string */ + s->username = s->auth_plain; + s->pass = s->auth_plain; + if (smtp_username != NULL) { + s->username += smtp_username - smtp_auth_plain; + } + if (smtp_pass != NULL) { + s->pass += smtp_pass - smtp_auth_plain; + } +#endif /* SMTP_COPY_AUTHDATA */ + + s->state = SMTP_NULL; + s->timer = SMTP_TIMEOUT; + +#if LWIP_DNS + err = dns_gethostbyname(smtp_server, &addr, smtp_dns_found, s); +#else /* LWIP_DNS */ + err = ipaddr_aton(smtp_server, &addr) ? ERR_OK : ERR_ARG; +#endif /* LWIP_DNS */ + if (err == ERR_OK) { + pcb = smtp_setup_pcb(s, &addr); + if (pcb == NULL) { + err = ERR_MEM; + goto leave; + } + err = altcp_connect(pcb, &addr, smtp_server_port, smtp_tcp_connected); + if (err != ERR_OK) { + LWIP_DEBUGF(SMTP_DEBUG_WARN_STATE, ("tcp_connect failed: %d\n", (int)err)); + goto deallocate_and_leave; + } + } else if (err != ERR_INPROGRESS) { + LWIP_DEBUGF(SMTP_DEBUG_WARN_STATE, ("dns_gethostbyname failed: %d\n", (int)err)); + goto deallocate_and_leave; + } + return ERR_OK; + +deallocate_and_leave: + if (pcb != NULL) { + altcp_arg(pcb, NULL); + altcp_close(pcb); + } +leave: + smtp_free_struct(s); + /* no need to call the callback here since we return != ERR_OK */ + return err; +} + +/** @ingroup smtp + * Send an email via the currently selected server, username and password. + * + * @param from source email address (must be NULL-terminated) + * @param to target email address (must be NULL-terminated) + * @param subject email subject (must be NULL-terminated) + * @param body email body (must be NULL-terminated) + * @param callback_fn callback function + * @param callback_arg user argument to callback_fn + * @returns - ERR_OK if structures were allocated and no error occured starting the connection + * (this does not mean the email has been successfully sent!) + * - another err_t on error. + */ +err_t +smtp_send_mail(const char* from, const char* to, const char* subject, const char* body, + smtp_result_fn callback_fn, void* callback_arg) +{ + struct smtp_session* s; + size_t from_len = strlen(from); + size_t to_len = strlen(to); + size_t subject_len = strlen(subject); + size_t body_len = strlen(body); + size_t mem_len = sizeof(struct smtp_session); + char *sfrom, *sto, *ssubject, *sbody; + + LWIP_ASSERT_CORE_LOCKED(); + + mem_len += from_len + to_len + subject_len + body_len + 4; + if (mem_len > 0xffff) { + /* too long! */ + return ERR_MEM; + } + + /* Allocate memory to keep this email's session state */ + s = (struct smtp_session *)SMTP_STATE_MALLOC((mem_size_t)mem_len); + if (s == NULL) { + return ERR_MEM; + } + /* initialize the structure */ + memset(s, 0, mem_len); + s->from = sfrom = (char*)s + sizeof(struct smtp_session); + s->from_len = (u16_t)from_len; + s->to = sto = sfrom + from_len + 1; + s->to_len = (u16_t)to_len; + s->subject = ssubject = sto + to_len + 1; + s->subject_len = (u16_t)subject_len; + s->body = sbody = ssubject + subject_len + 1; + s->body_len = (u16_t)body_len; + /* copy source and target email address */ + /* cast to size_t is a hack to cast away constness */ + MEMCPY(sfrom, from, from_len + 1); + MEMCPY(sto, to, to_len + 1); + MEMCPY(ssubject, subject, subject_len + 1); + MEMCPY(sbody, body, body_len + 1); + + s->callback_fn = callback_fn; + s->callback_arg = callback_arg; + + /* call the actual implementation of this function */ + return smtp_send_mail_alloced(s); +} + +/** @ingroup smtp + * Same as smtp_send_mail, but doesn't copy from, to, subject and body into + * an internal buffer to save memory. + * WARNING: the above data must stay untouched until the callback function is + * called (unless the function returns != ERR_OK) + */ +err_t +smtp_send_mail_static(const char *from, const char* to, const char* subject, + const char* body, smtp_result_fn callback_fn, void* callback_arg) +{ + struct smtp_session* s; + size_t len; + + LWIP_ASSERT_CORE_LOCKED(); + + s = (struct smtp_session*)SMTP_STATE_MALLOC(sizeof(struct smtp_session)); + if (s == NULL) { + return ERR_MEM; + } + memset(s, 0, sizeof(struct smtp_session)); + /* initialize the structure */ + s->from = from; + len = strlen(from); + LWIP_ASSERT("string is too long", len <= 0xffff); + s->from_len = (u16_t)len; + s->to = to; + len = strlen(to); + LWIP_ASSERT("string is too long", len <= 0xffff); + s->to_len = (u16_t)len; + s->subject = subject; + len = strlen(subject); + LWIP_ASSERT("string is too long", len <= 0xffff); + s->subject_len = (u16_t)len; + s->body = body; + len = strlen(body); + LWIP_ASSERT("string is too long", len <= 0xffff); + s->body_len = (u16_t)len; + s->callback_fn = callback_fn; + s->callback_arg = callback_arg; + /* call the actual implementation of this function */ + return smtp_send_mail_alloced(s); +} + + +/** @ingroup smtp + * Same as smtp_send_mail but takes a struct smtp_send_request as single + * parameter which contains all the other parameters. + * To be used with tcpip_callback to send mail from interrupt context or from + * another thread. + * + * WARNING: server and authentication must stay untouched until this function has run! + * + * Usage example: + * - allocate a struct smtp_send_request (in a way that is allowed in interrupt context) + * - fill the members of the struct as if calling smtp_send_mail + * - specify a callback_function + * - set callback_arg to the structure itself + * - call this function + * - wait for the callback function to be called + * - in the callback function, deallocate the structure (passed as arg) + */ +void +smtp_send_mail_int(void *arg) +{ + struct smtp_send_request *req = (struct smtp_send_request*)arg; + err_t err; + + LWIP_ASSERT_CORE_LOCKED(); + LWIP_ASSERT("smtp_send_mail_int: no argument given", arg != NULL); + + if (req->static_data) { + err = smtp_send_mail_static(req->from, req->to, req->subject, req->body, + req->callback_fn, req->callback_arg); + } else { + err = smtp_send_mail(req->from, req->to, req->subject, req->body, + req->callback_fn, req->callback_arg); + } + if ((err != ERR_OK) && (req->callback_fn != NULL)) { + req->callback_fn(req->callback_arg, SMTP_RESULT_ERR_UNKNOWN, 0, err); + } +} + +#if SMTP_CHECK_DATA +/** Verify that a given string conforms to the SMTP rules + * (7-bit only, no single CR or LF, + * @todo: no line consisting of a single dot only) + */ +static err_t +smtp_verify(const char *data, size_t data_len, u8_t linebreaks_allowed) +{ + size_t i; + u8_t last_was_cr = 0; + for (i = 0; i < data_len; i++) { + char current = data[i]; + if ((current & 0x80) != 0) { + LWIP_DEBUGF(SMTP_DEBUG_WARN, ("smtp_verify: no 8-bit data supported: %s\n", data)); + return ERR_ARG; + } + if (current == '\r') { + if (!linebreaks_allowed) { + LWIP_DEBUGF(SMTP_DEBUG_WARN, ("smtp_verify: found CR where no linebreaks allowed: %s\n", data)); + return ERR_ARG; + } + if (last_was_cr) { + LWIP_DEBUGF(SMTP_DEBUG_WARN, ("smtp_verify: found double CR: %s\n", data)); + return ERR_ARG; + } + last_was_cr = 1; + } else { + if (current == '\n') { + if (!last_was_cr) { + LWIP_DEBUGF(SMTP_DEBUG_WARN, ("smtp_verify: found LF without CR before: %s\n", data)); + return ERR_ARG; + } + } + last_was_cr = 0; + } + } + return ERR_OK; +} +#endif /* SMTP_CHECK_DATA */ + +/** Frees the smtp_session and calls the callback function */ +static void +smtp_free(struct smtp_session *s, u8_t result, u16_t srv_err, err_t err) +{ + smtp_result_fn fn = s->callback_fn; + void *arg = s->callback_arg; + if (s->p != NULL) { + pbuf_free(s->p); + } + smtp_free_struct(s); + if (fn != NULL) { + fn(arg, result, srv_err, err); + } +} + +/** Try to close a pcb and free the arg if successful */ +static void +smtp_close(struct smtp_session *s, struct altcp_pcb *pcb, u8_t result, + u16_t srv_err, err_t err) +{ + if (pcb != NULL) { + altcp_arg(pcb, NULL); + if (altcp_close(pcb) == ERR_OK) { + if (s != NULL) { + smtp_free(s, result, srv_err, err); + } + } else { + /* close failed, set back arg */ + altcp_arg(pcb, s); + } + } else { + if (s != NULL) { + smtp_free(s, result, srv_err, err); + } + } +} + +/** Raw API TCP err callback: pcb is already deallocated */ +static void +smtp_tcp_err(void *arg, err_t err) +{ + LWIP_UNUSED_ARG(err); + if (arg != NULL) { + LWIP_DEBUGF(SMTP_DEBUG_WARN_STATE, ("smtp_tcp_err: connection reset by remote host\n")); + smtp_free((struct smtp_session*)arg, SMTP_RESULT_ERR_CLOSED, 0, err); + } +} + +/** Raw API TCP poll callback */ +static err_t +smtp_tcp_poll(void *arg, struct altcp_pcb *pcb) +{ + if (arg != NULL) { + struct smtp_session *s = (struct smtp_session*)arg; + if (s->timer != 0) { + s->timer--; + } + } + smtp_process(arg, pcb, NULL); + return ERR_OK; +} + +/** Raw API TCP sent callback */ +static err_t +smtp_tcp_sent(void *arg, struct altcp_pcb *pcb, u16_t len) +{ + LWIP_UNUSED_ARG(len); + + smtp_process(arg, pcb, NULL); + + return ERR_OK; +} + +/** Raw API TCP recv callback */ +static err_t +smtp_tcp_recv(void *arg, struct altcp_pcb *pcb, struct pbuf *p, err_t err) +{ + LWIP_UNUSED_ARG(err); + if (p != NULL) { + altcp_recved(pcb, p->tot_len); + smtp_process(arg, pcb, p); + } else { + LWIP_DEBUGF(SMTP_DEBUG_WARN_STATE, ("smtp_tcp_recv: connection closed by remote host\n")); + smtp_close((struct smtp_session*)arg, pcb, SMTP_RESULT_ERR_CLOSED, 0, err); + } + return ERR_OK; +} + +static err_t +smtp_tcp_connected(void *arg, struct altcp_pcb *pcb, err_t err) +{ + LWIP_UNUSED_ARG(arg); + + if (err == ERR_OK) { + LWIP_DEBUGF(SMTP_DEBUG_STATE, ("smtp_connected: Waiting for 220\n")); + } else { + /* shouldn't happen, but we still check 'err', only to be sure */ + LWIP_DEBUGF(SMTP_DEBUG_WARN, ("smtp_connected: %d\n", (int)err)); + smtp_close((struct smtp_session*)arg, pcb, SMTP_RESULT_ERR_CONNECT, 0, err); + } + return ERR_OK; +} + +#if LWIP_DNS +/** DNS callback + * If ipaddr is non-NULL, resolving succeeded, otherwise it failed. + */ +static void +smtp_dns_found(const char* hostname, const ip_addr_t *ipaddr, void *arg) +{ + struct smtp_session *s = (struct smtp_session*)arg; + struct altcp_pcb *pcb; + err_t err; + u8_t result; + + LWIP_UNUSED_ARG(hostname); + + if (ipaddr != NULL) { + pcb = smtp_setup_pcb(s, ipaddr); + if (pcb != NULL) { + LWIP_DEBUGF(SMTP_DEBUG_STATE, ("smtp_dns_found: hostname resolved, connecting\n")); + err = altcp_connect(pcb, ipaddr, smtp_server_port, smtp_tcp_connected); + if (err == ERR_OK) { + return; + } + LWIP_DEBUGF(SMTP_DEBUG_WARN_STATE, ("tcp_connect failed: %d\n", (int)err)); + result = SMTP_RESULT_ERR_CONNECT; + } else { + LWIP_DEBUGF(SMTP_DEBUG_STATE, ("smtp_dns_found: failed to allocate tcp pcb\n")); + result = SMTP_RESULT_ERR_MEM; + err = ERR_MEM; + } + } else { + LWIP_DEBUGF(SMTP_DEBUG_WARN_STATE, ("smtp_dns_found: failed to resolve hostname: %s\n", + hostname)); + pcb = NULL; + result = SMTP_RESULT_ERR_HOSTNAME; + err = ERR_ARG; + } + smtp_close(s, pcb, result, 0, err); +} +#endif /* LWIP_DNS */ + +#if SMTP_SUPPORT_AUTH_PLAIN || SMTP_SUPPORT_AUTH_LOGIN + +/** Table 6-bit-index-to-ASCII used for base64-encoding */ +static const char base64_table[] = { + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', + 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', + 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', + 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '+', '/' +}; + +/** Base64 encoding */ +static size_t +smtp_base64_encode(char* target, size_t target_len, const char* source, size_t source_len) +{ + size_t i; + s8_t j; + size_t target_idx = 0; + size_t longer = (source_len % 3) ? (3 - (source_len % 3)) : 0; + size_t source_len_b64 = source_len + longer; + size_t len = (((source_len_b64) * 4) / 3); + u8_t x = 5; + u8_t current = 0; + LWIP_UNUSED_ARG(target_len); + + LWIP_ASSERT("target_len is too short", target_len >= len); + + for (i = 0; i < source_len_b64; i++) { + u8_t b = (i < source_len ? (u8_t)source[i] : 0); + for (j = 7; j >= 0; j--, x--) { + if ((b & (1 << j)) != 0) { + current = (u8_t)(current | (1U << x)); + } + if (x == 0) { + target[target_idx++] = base64_table[current]; + x = 6; + current = 0; + } + } + } + for (i = len - longer; i < len; i++) { + target[i] = '='; + } + return len; +} +#endif /* SMTP_SUPPORT_AUTH_PLAIN || SMTP_SUPPORT_AUTH_LOGIN */ + +/** Parse pbuf to see if it contains the beginning of an answer. + * If so, it returns the contained response code as number between 1 and 999. + * If not, zero is returned. + * + * @param s smtp session struct + */ +static u16_t +smtp_is_response(struct smtp_session *s) +{ + char digits[4]; + long num; + + if (s->p == NULL) { + return 0; + } + /* copy three digits and convert them to int */ + if (pbuf_copy_partial(s->p, digits, 3, 0) != 3) { + /* pbuf was too short */ + return 0; + } + digits[3] = 0; + num = strtol(digits, NULL, 10); + if ((num <= 0) || (num >= 1000)) { + /* failed to find response code at start of line */ + return 0; + } + return (u16_t)num; +} + +/** Parse pbuf to see if it contains a fully received answer. + * If one is found, ERR_OK is returned. + * If none is found, ERR_VAL is returned. + * + * A fully received answer is a 3-digit number followed by a space, + * some string and a CRLF as line ending. + * + * @param s smtp session struct + */ +static err_t +smtp_is_response_finished(struct smtp_session *s) +{ + u8_t sp; + u16_t crlf; + u16_t offset; + + if (s->p == NULL) { + return ERR_VAL; + } + offset = 0; +again: + /* We could check the response number here, but we trust the + * protocol definition which says the client can rely on it being + * the same on every line. */ + + /* find CRLF */ + if (offset > 0xFFFF - 4) { + /* would overflow */ + return ERR_VAL; + } + crlf = pbuf_memfind(s->p, SMTP_CRLF, SMTP_CRLF_LEN, (u16_t)(offset + 4)); + if (crlf == 0xFFFF) { + /* no CRLF found */ + return ERR_VAL; + } + sp = pbuf_get_at(s->p, (u16_t)(offset + 3)); + if (sp == '-') { + /* no space after response code -> try next line */ + offset = (u16_t)(crlf + 2); + if (offset < crlf) { + /* overflow */ + return ERR_VAL; + } + goto again; + } else if (sp == ' ') { + /* CRLF found after response code + space -> valid response */ + return ERR_OK; + } + /* sp contains invalid character */ + return ERR_VAL; +} + +/** Prepare HELO/EHLO message */ +static enum smtp_session_state +smtp_prepare_helo(struct smtp_session *s, u16_t *tx_buf_len, struct altcp_pcb *pcb) +{ + size_t ipa_len; + const char *ipa = ipaddr_ntoa(altcp_get_ip(pcb, 1)); + LWIP_ASSERT("ipaddr_ntoa returned NULL", ipa != NULL); + ipa_len = strlen(ipa); + LWIP_ASSERT("string too long", ipa_len <= (SMTP_TX_BUF_LEN-SMTP_CMD_EHLO_1_LEN-SMTP_CMD_EHLO_2_LEN)); + + *tx_buf_len = (u16_t)(SMTP_CMD_EHLO_1_LEN + (u16_t)ipa_len + SMTP_CMD_EHLO_2_LEN); + LWIP_ASSERT("tx_buf overflow detected", *tx_buf_len <= SMTP_TX_BUF_LEN); + + SMEMCPY(s->tx_buf, SMTP_CMD_EHLO_1, SMTP_CMD_EHLO_1_LEN); + MEMCPY(&s->tx_buf[SMTP_CMD_EHLO_1_LEN], ipa, ipa_len); + SMEMCPY(&s->tx_buf[SMTP_CMD_EHLO_1_LEN + ipa_len], SMTP_CMD_EHLO_2, SMTP_CMD_EHLO_2_LEN); + return SMTP_HELO; +} + +#if SMTP_SUPPORT_AUTH_PLAIN || SMTP_SUPPORT_AUTH_LOGIN +/** Parse last server response (in rx_buf) for supported authentication method, + * create data to send out (to tx_buf), set tx_data_len correctly + * and return the next state. + */ +static enum smtp_session_state +smtp_prepare_auth_or_mail(struct smtp_session *s, u16_t *tx_buf_len) +{ + /* check response for supported authentication method */ + u16_t auth = pbuf_strstr(s->p, SMTP_KEYWORD_AUTH_SP); + if (auth == 0xFFFF) { + auth = pbuf_strstr(s->p, SMTP_KEYWORD_AUTH_EQ); + } + if (auth != 0xFFFF) { + u16_t crlf = pbuf_memfind(s->p, SMTP_CRLF, SMTP_CRLF_LEN, auth); + if ((crlf != 0xFFFF) && (crlf > auth)) { + /* use tx_buf temporarily */ + u16_t copied = pbuf_copy_partial(s->p, s->tx_buf, (u16_t)(crlf - auth), auth); + if (copied != 0) { + char *sep = s->tx_buf + SMTP_KEYWORD_AUTH_LEN; + s->tx_buf[copied] = 0; +#if SMTP_SUPPORT_AUTH_PLAIN + /* favour PLAIN over LOGIN since it involves less requests */ + if (strstr(sep, SMTP_AUTH_PARAM_PLAIN) != NULL) { + size_t auth_len; + /* server supports AUTH PLAIN */ + SMEMCPY(s->tx_buf, SMTP_CMD_AUTHPLAIN_1, SMTP_CMD_AUTHPLAIN_1_LEN); + + /* add base64-encoded string "\0username\0password" */ + auth_len = smtp_base64_encode(&s->tx_buf[SMTP_CMD_AUTHPLAIN_1_LEN], + SMTP_TX_BUF_LEN - SMTP_CMD_AUTHPLAIN_1_LEN, SMTP_AUTH_PLAIN_DATA(s), + SMTP_AUTH_PLAIN_LEN(s)); + LWIP_ASSERT("string too long", auth_len <= (SMTP_TX_BUF_LEN-SMTP_CMD_AUTHPLAIN_1_LEN-SMTP_CMD_AUTHPLAIN_2_LEN)); + *tx_buf_len = (u16_t)(SMTP_CMD_AUTHPLAIN_1_LEN + SMTP_CMD_AUTHPLAIN_2_LEN + (u16_t)auth_len); + SMEMCPY(&s->tx_buf[SMTP_CMD_AUTHPLAIN_1_LEN + auth_len], SMTP_CMD_AUTHPLAIN_2, + SMTP_CMD_AUTHPLAIN_2_LEN); + return SMTP_AUTH_PLAIN; + } else +#endif /* SMTP_SUPPORT_AUTH_PLAIN */ + { +#if SMTP_SUPPORT_AUTH_LOGIN + if (strstr(sep, SMTP_AUTH_PARAM_LOGIN) != NULL) { + /* server supports AUTH LOGIN */ + *tx_buf_len = SMTP_CMD_AUTHLOGIN_LEN; + SMEMCPY(s->tx_buf, SMTP_CMD_AUTHLOGIN, SMTP_CMD_AUTHLOGIN_LEN); + return SMTP_AUTH_LOGIN_UNAME; + } +#endif /* SMTP_SUPPORT_AUTH_LOGIN */ + } + } + } + } + /* server didnt's send correct keywords for AUTH, try sending directly */ + return smtp_prepare_mail(s, tx_buf_len); +} +#endif /* SMTP_SUPPORT_AUTH_PLAIN || SMTP_SUPPORT_AUTH_LOGIN */ + +#if SMTP_SUPPORT_AUTH_LOGIN +/** Send base64-encoded username */ +static enum smtp_session_state +smtp_prepare_auth_login_uname(struct smtp_session *s, u16_t *tx_buf_len) +{ + size_t base64_len = smtp_base64_encode(s->tx_buf, SMTP_TX_BUF_LEN, + SMTP_USERNAME(s), strlen(SMTP_USERNAME(s))); + /* @todo: support base64-encoded longer than 64k */ + LWIP_ASSERT("string too long", base64_len <= 0xffff); + LWIP_ASSERT("tx_buf overflow detected", base64_len <= SMTP_TX_BUF_LEN - SMTP_CRLF_LEN); + *tx_buf_len = (u16_t)(base64_len + SMTP_CRLF_LEN); + + SMEMCPY(&s->tx_buf[base64_len], SMTP_CRLF, SMTP_CRLF_LEN); + s->tx_buf[*tx_buf_len] = 0; + return SMTP_AUTH_LOGIN_PASS; +} + +/** Send base64-encoded password */ +static enum smtp_session_state +smtp_prepare_auth_login_pass(struct smtp_session *s, u16_t *tx_buf_len) +{ + size_t base64_len = smtp_base64_encode(s->tx_buf, SMTP_TX_BUF_LEN, + SMTP_PASS(s), strlen(SMTP_PASS(s))); + /* @todo: support base64-encoded longer than 64k */ + LWIP_ASSERT("string too long", base64_len <= 0xffff); + LWIP_ASSERT("tx_buf overflow detected", base64_len <= SMTP_TX_BUF_LEN - SMTP_CRLF_LEN); + *tx_buf_len = (u16_t)(base64_len + SMTP_CRLF_LEN); + + SMEMCPY(&s->tx_buf[base64_len], SMTP_CRLF, SMTP_CRLF_LEN); + s->tx_buf[*tx_buf_len] = 0; + return SMTP_AUTH_LOGIN; +} +#endif /* SMTP_SUPPORT_AUTH_LOGIN */ + +/** Prepare MAIL message */ +static enum smtp_session_state +smtp_prepare_mail(struct smtp_session *s, u16_t *tx_buf_len) +{ + char *target = s->tx_buf; + LWIP_ASSERT("tx_buf overflow detected", s->from_len <= (SMTP_TX_BUF_LEN - SMTP_CMD_MAIL_1_LEN - SMTP_CMD_MAIL_2_LEN)); + *tx_buf_len = (u16_t)(SMTP_CMD_MAIL_1_LEN + SMTP_CMD_MAIL_2_LEN + s->from_len); + target[*tx_buf_len] = 0; + + SMEMCPY(target, SMTP_CMD_MAIL_1, SMTP_CMD_MAIL_1_LEN); + target += SMTP_CMD_MAIL_1_LEN; + MEMCPY(target, s->from, s->from_len); + target += s->from_len; + SMEMCPY(target, SMTP_CMD_MAIL_2, SMTP_CMD_MAIL_2_LEN); + return SMTP_MAIL; +} + +/** Prepare RCPT message */ +static enum smtp_session_state +smtp_prepare_rcpt(struct smtp_session *s, u16_t *tx_buf_len) +{ + char *target = s->tx_buf; + LWIP_ASSERT("tx_buf overflow detected", s->to_len <= (SMTP_TX_BUF_LEN - SMTP_CMD_RCPT_1_LEN - SMTP_CMD_RCPT_2_LEN)); + *tx_buf_len = (u16_t)(SMTP_CMD_RCPT_1_LEN + SMTP_CMD_RCPT_2_LEN + s->to_len); + target[*tx_buf_len] = 0; + + SMEMCPY(target, SMTP_CMD_RCPT_1, SMTP_CMD_RCPT_1_LEN); + target += SMTP_CMD_RCPT_1_LEN; + MEMCPY(target, s->to, s->to_len); + target += s->to_len; + SMEMCPY(target, SMTP_CMD_RCPT_2, SMTP_CMD_RCPT_2_LEN); + return SMTP_RCPT; +} + +/** Prepare header of body */ +static enum smtp_session_state +smtp_prepare_header(struct smtp_session *s, u16_t *tx_buf_len) +{ + char *target = s->tx_buf; + int len = SMTP_CMD_HEADER_1_LEN + SMTP_CMD_HEADER_2_LEN + + SMTP_CMD_HEADER_3_LEN + SMTP_CMD_HEADER_4_LEN + s->from_len + s->to_len + + s->subject_len; + LWIP_ASSERT("tx_buf overflow detected", len > 0 && len <= SMTP_TX_BUF_LEN); + *tx_buf_len = (u16_t)len; + target[*tx_buf_len] = 0; + + SMEMCPY(target, SMTP_CMD_HEADER_1, SMTP_CMD_HEADER_1_LEN); + target += SMTP_CMD_HEADER_1_LEN; + MEMCPY(target, s->from, s->from_len); + target += s->from_len; + SMEMCPY(target, SMTP_CMD_HEADER_2, SMTP_CMD_HEADER_2_LEN); + target += SMTP_CMD_HEADER_2_LEN; + MEMCPY(target, s->to, s->to_len); + target += s->to_len; + SMEMCPY(target, SMTP_CMD_HEADER_3, SMTP_CMD_HEADER_3_LEN); + target += SMTP_CMD_HEADER_3_LEN; + MEMCPY(target, s->subject, s->subject_len); + target += s->subject_len; + SMEMCPY(target, SMTP_CMD_HEADER_4, SMTP_CMD_HEADER_4_LEN); + + return SMTP_BODY; +} + +/** Prepare QUIT message */ +static enum smtp_session_state +smtp_prepare_quit(struct smtp_session *s, u16_t *tx_buf_len) +{ + *tx_buf_len = SMTP_CMD_QUIT_LEN; + s->tx_buf[*tx_buf_len] = 0; + SMEMCPY(s->tx_buf, SMTP_CMD_QUIT, SMTP_CMD_QUIT_LEN); + LWIP_ASSERT("tx_buf overflow detected", *tx_buf_len <= SMTP_TX_BUF_LEN); + return SMTP_CLOSED; +} + +/** If in state SMTP_BODY, try to send more body data */ +static void +smtp_send_body(struct smtp_session *s, struct altcp_pcb *pcb) +{ + err_t err; + + if (s->state == SMTP_BODY) { +#if SMTP_BODYDH + if (s->bodydh) { + smtp_send_body_data_handler(s, pcb); + } else +#endif /* SMTP_BODYDH */ + { + u16_t send_len = (u16_t)(s->body_len - s->body_sent); + if (send_len > 0) { + u16_t snd_buf = altcp_sndbuf(pcb); + if (send_len > snd_buf) { + send_len = snd_buf; + } + if (send_len > 0) { + /* try to send something out */ + err = altcp_write(pcb, &s->body[s->body_sent], (u16_t)send_len, TCP_WRITE_FLAG_COPY); + if (err == ERR_OK) { + s->timer = SMTP_TIMEOUT_DATABLOCK; + s->body_sent = (u16_t)(s->body_sent + send_len); + if (s->body_sent < s->body_len) { + LWIP_DEBUGF(SMTP_DEBUG_STATE, ("smtp_send_body: %d of %d bytes written\n", + s->body_sent, s->body_len)); + } + } + } + } + } + if (s->body_sent == s->body_len) { + /* the whole body has been written, write last line */ + LWIP_DEBUGF(SMTP_DEBUG_STATE, ("smtp_send_body: body completely written (%d bytes), appending end-of-body\n", + s->body_len)); + err = altcp_write(pcb, SMTP_CMD_BODY_FINISHED, SMTP_CMD_BODY_FINISHED_LEN, 0); + if (err == ERR_OK) { + s->timer = SMTP_TIMEOUT_DATATERM; + LWIP_DEBUGF(SMTP_DEBUG_STATE, ("smtp_send_body: end-of-body written, changing state to %s\n", + smtp_state_str[SMTP_QUIT])); + /* last line written, change state, wait for confirmation */ + s->state = SMTP_QUIT; + } + } + } +} + +/** State machine-like implementation of an SMTP client. + */ +static void +smtp_process(void *arg, struct altcp_pcb *pcb, struct pbuf *p) +{ + struct smtp_session* s = (struct smtp_session*)arg; + u16_t response_code = 0; + u16_t tx_buf_len = 0; + enum smtp_session_state next_state; + + if (arg == NULL) { + /* already closed SMTP connection */ + if (p != NULL) { + LWIP_DEBUGF(SMTP_DEBUG_TRACE, ("Received %d bytes after closing: %s\n", + p->tot_len, smtp_pbuf_str(p))); + pbuf_free(p); + } + return; + } + + next_state = s->state; + + if (p != NULL) { + /* received data */ + if (s->p == NULL) { + s->p = p; + } else { + pbuf_cat(s->p, p); + } + } else { + /* idle timer, close connection if timed out */ + if (s->timer == 0) { + LWIP_DEBUGF(SMTP_DEBUG_WARN_STATE, ("smtp_process: connection timed out, closing\n")); + smtp_close(s, pcb, SMTP_RESULT_ERR_TIMEOUT, 0, ERR_TIMEOUT); + return; + } + if (s->state == SMTP_BODY) { + smtp_send_body(s, pcb); + return; + } + } + response_code = smtp_is_response(s); + if (response_code) { + LWIP_DEBUGF(SMTP_DEBUG_TRACE, ("smtp_process: received response code: %d\n", response_code)); + if (smtp_is_response_finished(s) != ERR_OK) { + LWIP_DEBUGF(SMTP_DEBUG_TRACE, ("smtp_process: partly received response code: %d\n", response_code)); + /* wait for next packet to complete the respone */ + return; + } + } else { + if (s->p != NULL) { + LWIP_DEBUGF(SMTP_DEBUG_WARN, ("smtp_process: unknown data received (%s)\n", + smtp_pbuf_str(s->p))); + pbuf_free(s->p); + s->p = NULL; + } + return; + } + + switch(s->state) + { + case(SMTP_NULL): + /* wait for 220 */ + if (response_code == 220) { + /* then send EHLO */ + next_state = smtp_prepare_helo(s, &tx_buf_len, pcb); + } + break; + case(SMTP_HELO): + /* wait for 250 */ + if (response_code == 250) { +#if SMTP_SUPPORT_AUTH_PLAIN || SMTP_SUPPORT_AUTH_LOGIN + /* then send AUTH or MAIL */ + next_state = smtp_prepare_auth_or_mail(s, &tx_buf_len); + } + break; + case(SMTP_AUTH_LOGIN): + case(SMTP_AUTH_PLAIN): + /* wait for 235 */ + if (response_code == 235) { +#endif /* SMTP_SUPPORT_AUTH_PLAIN || SMTP_SUPPORT_AUTH_LOGIN */ + /* send MAIL */ + next_state = smtp_prepare_mail(s, &tx_buf_len); + } + break; +#if SMTP_SUPPORT_AUTH_LOGIN + case(SMTP_AUTH_LOGIN_UNAME): + /* wait for 334 Username */ + if (response_code == 334) { + if (pbuf_strstr(s->p, SMTP_RESP_LOGIN_UNAME) != 0xFFFF) { + /* send username */ + next_state = smtp_prepare_auth_login_uname(s, &tx_buf_len); + } + } + break; + case(SMTP_AUTH_LOGIN_PASS): + /* wait for 334 Password */ + if (response_code == 334) { + if (pbuf_strstr(s->p, SMTP_RESP_LOGIN_PASS) != 0xFFFF) { + /* send username */ + next_state = smtp_prepare_auth_login_pass(s, &tx_buf_len); + } + } + break; +#endif /* SMTP_SUPPORT_AUTH_LOGIN */ + case(SMTP_MAIL): + /* wait for 250 */ + if (response_code == 250) { + /* send RCPT */ + next_state = smtp_prepare_rcpt(s, &tx_buf_len); + } + break; + case(SMTP_RCPT): + /* wait for 250 */ + if (response_code == 250) { + /* send DATA */ + SMEMCPY(s->tx_buf, SMTP_CMD_DATA, SMTP_CMD_DATA_LEN); + tx_buf_len = SMTP_CMD_DATA_LEN; + next_state = SMTP_DATA; + } + break; + case(SMTP_DATA): + /* wait for 354 */ + if (response_code == 354) { + /* send email header */ + next_state = smtp_prepare_header(s, &tx_buf_len); + } + break; + case(SMTP_BODY): + /* nothing to be done here, handled somewhere else */ + break; + case(SMTP_QUIT): + /* wait for 250 */ + if (response_code == 250) { + /* send QUIT */ + next_state = smtp_prepare_quit(s, &tx_buf_len); + } + break; + case(SMTP_CLOSED): + /* nothing to do, wait for connection closed from server */ + return; + default: + LWIP_DEBUGF(SMTP_DEBUG_SERIOUS, ("Invalid state: %d/%s\n", (int)s->state, + smtp_state_str[s->state])); + break; + } + if (s->state == next_state) { + LWIP_DEBUGF(SMTP_DEBUG_WARN_STATE, ("smtp_process[%s]: unexpected response_code, closing: %d (%s)\n", + smtp_state_str[s->state], response_code, smtp_pbuf_str(s->p))); + /* close connection */ + smtp_close(s, pcb, SMTP_RESULT_ERR_SVR_RESP, response_code, ERR_OK); + return; + } + if (tx_buf_len > 0) { + SMTP_TX_BUF_MAX(tx_buf_len); + if (altcp_write(pcb, s->tx_buf, tx_buf_len, TCP_WRITE_FLAG_COPY) == ERR_OK) { + LWIP_DEBUGF(SMTP_DEBUG_TRACE, ("smtp_process[%s]: received command %d (%s)\n", + smtp_state_str[s->state], response_code, smtp_pbuf_str(s->p))); + LWIP_DEBUGF(SMTP_DEBUG_TRACE, ("smtp_process[%s]: sent %"U16_F" bytes: \"%s\"\n", + smtp_state_str[s->state], tx_buf_len, s->tx_buf)); + s->timer = SMTP_TIMEOUT; + pbuf_free(s->p); + s->p = NULL; + LWIP_DEBUGF(SMTP_DEBUG_STATE, ("smtp_process: changing state from %s to %s\n", + smtp_state_str[s->state], smtp_state_str[next_state])); + s->state = next_state; + if (next_state == SMTP_BODY) { + /* try to stream-send body data right now */ + smtp_send_body(s, pcb); + } else if (next_state == SMTP_CLOSED) { + /* sent out all data, delete structure */ + altcp_arg(pcb, NULL); + smtp_free(s, SMTP_RESULT_OK, 0, ERR_OK); + } + } + } +} + +#if SMTP_BODYDH +/** Elementary sub-function to send data + * + * @returns: BDHALLDATASENT all data has been written + * BDHSOMEDATASENT some data has been written + * 0 no data has been written + */ +static int +smtp_send_bodyh_data(struct altcp_pcb *pcb, const char **from, u16_t *howmany) +{ + err_t err; + u16_t len = *howmany; + + len = (u16_t)LWIP_MIN(len, altcp_sndbuf(pcb)); + err = altcp_write(pcb, *from, len, TCP_WRITE_FLAG_COPY); + if (err == ERR_OK) { + *from += len; + if ((*howmany -= len) > 0) { + return BDHSOMEDATASENT; + } + return BDHALLDATASENT; + } + return 0; +} + +/** Same as smtp_send_mail_static, but uses a callback function to send body data + */ +err_t +smtp_send_mail_bodycback(const char *from, const char* to, const char* subject, + smtp_bodycback_fn bodycback_fn, smtp_result_fn callback_fn, void* callback_arg) +{ + struct smtp_session* s; + size_t len; + + LWIP_ASSERT_CORE_LOCKED(); + + s = (struct smtp_session*)SMTP_STATE_MALLOC(sizeof(struct smtp_session)); + if (s == NULL) { + return ERR_MEM; + } + memset(s, 0, sizeof(struct smtp_session)); + s->bodydh = (struct smtp_bodydh_state*)SMTP_BODYDH_MALLOC(sizeof(struct smtp_bodydh_state)); + if (s->bodydh == NULL) { + SMTP_STATE_FREE(s); + return ERR_MEM; + } + memset(s->bodydh, 0, sizeof(struct smtp_bodydh_state)); + /* initialize the structure */ + s->from = from; + len = strlen(from); + LWIP_ASSERT("string is too long", len <= 0xffff); + s->from_len = (u16_t)len; + s->to = to; + len = strlen(to); + LWIP_ASSERT("string is too long", len <= 0xffff); + s->to_len = (u16_t)len; + s->subject = subject; + len = strlen(subject); + LWIP_ASSERT("string is too long", len <= 0xffff); + s->subject_len = (u16_t)len; + s->body = NULL; + LWIP_ASSERT("string is too long", len <= 0xffff); + s->callback_fn = callback_fn; + s->callback_arg = callback_arg; + s->bodydh->callback_fn = bodycback_fn; + s->bodydh->state = BDH_SENDING; + /* call the actual implementation of this function */ + return smtp_send_mail_alloced(s); +} + +static void +smtp_send_body_data_handler(struct smtp_session *s, struct altcp_pcb *pcb) +{ + struct smtp_bodydh_state *bdh; + int res = 0, ret; + LWIP_ASSERT("s != NULL", s != NULL); + bdh = s->bodydh; + LWIP_ASSERT("bodydh != NULL", bdh != NULL); + + /* resume any leftovers from prior memory constraints */ + if (s->body_len) { + LWIP_DEBUGF(SMTP_DEBUG_TRACE, ("smtp_send_body_data_handler: resume\n")); + if((res = smtp_send_bodyh_data(pcb, (const char **)&s->body, &s->body_len)) + != BDHALLDATASENT) { + s->body_sent = s->body_len - 1; + return; + } + } + ret = res; + /* all data on buffer has been queued, resume execution */ + if (bdh->state == BDH_SENDING) { + LWIP_DEBUGF(SMTP_DEBUG_TRACE, ("smtp_send_body_data_handler: run\n")); + do { + ret |= res; /* remember if we once queued something to send */ + bdh->exposed.length = 0; + if (bdh->callback_fn(s->callback_arg, &bdh->exposed) == BDH_DONE) { + bdh->state = BDH_STOP; + } + s->body = bdh->exposed.buffer; + s->body_len = bdh->exposed.length; + LWIP_DEBUGF(SMTP_DEBUG_TRACE, ("smtp_send_body_data_handler: trying to send %u bytes\n", (unsigned int)s->body_len)); + } while (s->body_len && + ((res = smtp_send_bodyh_data(pcb, (const char **)&s->body, &s->body_len)) == BDHALLDATASENT) + && (bdh->state != BDH_STOP)); + } + if ((bdh->state != BDH_SENDING) && (ret != BDHSOMEDATASENT)) { + LWIP_DEBUGF(SMTP_DEBUG_TRACE, ("smtp_send_body_data_handler: stop\n")); + s->body_sent = s->body_len; + } else { + LWIP_DEBUGF(SMTP_DEBUG_TRACE, ("smtp_send_body_data_handler: pause\n")); + s->body_sent = s->body_len - 1; + } +} +#endif /* SMTP_BODYDH */ + +#endif /* LWIP_TCP && LWIP_CALLBACK_API */ diff --git a/Libraries/LwIP/src/apps/snmp/snmp_asn1.c b/Libraries/LwIP/src/apps/snmp/snmp_asn1.c index 695af39..8e91e75 100755 --- a/Libraries/LwIP/src/apps/snmp/snmp_asn1.c +++ b/Libraries/LwIP/src/apps/snmp/snmp_asn1.c @@ -54,7 +54,7 @@ * @return ERR_OK if successful, ERR_ARG if we can't (or won't) encode */ err_t -snmp_ans1_enc_tlv(struct snmp_pbuf_stream* pbuf_stream, struct snmp_asn1_tlv* tlv) +snmp_ans1_enc_tlv(struct snmp_pbuf_stream *pbuf_stream, struct snmp_asn1_tlv *tlv) { u8_t data; u8_t length_bytes_required; @@ -130,7 +130,7 @@ snmp_ans1_enc_tlv(struct snmp_pbuf_stream* pbuf_stream, struct snmp_asn1_tlv* tl * @return ERR_OK if successful, ERR_ARG if we can't (or won't) encode */ err_t -snmp_asn1_enc_raw(struct snmp_pbuf_stream* pbuf_stream, const u8_t *raw, u16_t raw_len) +snmp_asn1_enc_raw(struct snmp_pbuf_stream *pbuf_stream, const u8_t *raw, u16_t raw_len) { PBUF_OP_EXEC(snmp_pbuf_stream_writebuf(pbuf_stream, raw, raw_len)); @@ -148,7 +148,7 @@ snmp_asn1_enc_raw(struct snmp_pbuf_stream* pbuf_stream, const u8_t *raw, u16_t r * @see snmp_asn1_enc_u32t_cnt() */ err_t -snmp_asn1_enc_u32t(struct snmp_pbuf_stream* pbuf_stream, u16_t octets_needed, u32_t value) +snmp_asn1_enc_u32t(struct snmp_pbuf_stream *pbuf_stream, u16_t octets_needed, u32_t value) { if (octets_needed > 5) { return ERR_ARG; @@ -169,48 +169,6 @@ snmp_asn1_enc_u32t(struct snmp_pbuf_stream* pbuf_stream, u16_t octets_needed, u3 return ERR_OK; } - -/** - * Encodes u64_t (counter64) into a pbuf chained ASN1 msg. - * - * @param pbuf_stream points to a pbuf stream - * @param octets_needed encoding length (from snmp_asn1_enc_u32t_cnt()) - * @param value is the host order u32_t value to be encoded - * @return ERR_OK if successful, ERR_ARG if we can't (or won't) encode - * - * @see snmp_asn1_enc_u64t_cnt() - */ -err_t -snmp_asn1_enc_u64t(struct snmp_pbuf_stream* pbuf_stream, u16_t octets_needed, const u32_t* value) -{ - if (octets_needed > 9) { - return ERR_ARG; - } - if (octets_needed == 9) { - /* not enough bits in 'value' add leading 0x00 */ - PBUF_OP_EXEC(snmp_pbuf_stream_write(pbuf_stream, 0x00)); - octets_needed--; - } - - while (octets_needed > 4) { - octets_needed--; - PBUF_OP_EXEC(snmp_pbuf_stream_write(pbuf_stream, (u8_t)(*value >> ((octets_needed-4) << 3)))); - } - - /* skip to low u32 */ - value++; - - while (octets_needed > 1) { - octets_needed--; - PBUF_OP_EXEC(snmp_pbuf_stream_write(pbuf_stream, (u8_t)(*value >> (octets_needed << 3)))); - } - - /* always write at least one octet (also in case of value == 0) */ - PBUF_OP_EXEC(snmp_pbuf_stream_write(pbuf_stream, (u8_t)(*value))); - - return ERR_OK; -} - /** * Encodes s32_t integer into a pbuf chained ASN1 msg. * @@ -222,7 +180,7 @@ snmp_asn1_enc_u64t(struct snmp_pbuf_stream* pbuf_stream, u16_t octets_needed, co * @see snmp_asn1_enc_s32t_cnt() */ err_t -snmp_asn1_enc_s32t(struct snmp_pbuf_stream* pbuf_stream, u16_t octets_needed, s32_t value) +snmp_asn1_enc_s32t(struct snmp_pbuf_stream *pbuf_stream, u16_t octets_needed, s32_t value) { while (octets_needed > 1) { octets_needed--; @@ -245,7 +203,7 @@ snmp_asn1_enc_s32t(struct snmp_pbuf_stream* pbuf_stream, u16_t octets_needed, s3 * @return ERR_OK if successful, ERR_ARG if we can't (or won't) encode */ err_t -snmp_asn1_enc_oid(struct snmp_pbuf_stream* pbuf_stream, const u32_t *oid, u16_t oid_len) +snmp_asn1_enc_oid(struct snmp_pbuf_stream *pbuf_stream, const u32_t *oid, u16_t oid_len) { if (oid_len > 1) { /* write compressed first two sub id's */ @@ -329,31 +287,6 @@ snmp_asn1_enc_u32t_cnt(u32_t value, u16_t *octets_needed) } } -/** - * Returns octet count for an u64_t. - * - * @param value value to be encoded - * @param octets_needed points to the return value - * - * @note ASN coded integers are _always_ signed. E.g. +0xFFFF is coded - * as 0x00,0xFF,0xFF. Note the leading sign octet. A positive value - * of 0xFFFFFFFF is preceded with 0x00 and the length is 5 octets!! - */ -void -snmp_asn1_enc_u64t_cnt(const u32_t *value, u16_t *octets_needed) -{ - /* check if high u32 is 0 */ - if (*value == 0x00) { - /* only low u32 is important */ - value++; - snmp_asn1_enc_u32t_cnt(*value, octets_needed); - } else { - /* low u32 does not matter for length determination */ - snmp_asn1_enc_u32t_cnt(*value, octets_needed); - *octets_needed = *octets_needed + 4; /* add the 4 bytes of low u32 */ - } -} - /** * Returns octet count for an s32_t. * @@ -420,7 +353,7 @@ snmp_asn1_enc_oid_cnt(const u32_t *oid, u16_t oid_len, u16_t *octets_needed) * @return ERR_OK if successful, ERR_VAL if we can't decode */ err_t -snmp_asn1_dec_tlv(struct snmp_pbuf_stream* pbuf_stream, struct snmp_asn1_tlv* tlv) +snmp_asn1_dec_tlv(struct snmp_pbuf_stream *pbuf_stream, struct snmp_asn1_tlv *tlv) { u8_t data; @@ -442,6 +375,9 @@ snmp_asn1_dec_tlv(struct snmp_pbuf_stream* pbuf_stream, struct snmp_asn1_tlv* tl tlv->value_len = data; } else if (data > 0x80) { /* long form */ u8_t length_bytes = data - 0x80; + if (length_bytes > pbuf_stream->length) { + return ERR_VAL; + } tlv->length_len = length_bytes + 1; /* this byte + defined number of length bytes following */ tlv->value_len = 0; @@ -509,60 +445,6 @@ snmp_asn1_dec_u32t(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u32_t *value return ERR_VAL; } -/** - * Decodes large positive integer (counter64) into 2x u32_t. - * - * @param pbuf_stream points to a pbuf stream - * @param len length of the coded integer field - * @param value return host order integer - * @return ERR_OK if successful, ERR_ARG if we can't (or won't) decode - * - * @note ASN coded integers are _always_ signed. E.g. +0xFFFF is coded - * as 0x00,0xFF,0xFF. Note the leading sign octet. A positive value - * of 0xFFFFFFFF is preceded with 0x00 and the length is 5 octets!! - */ -err_t -snmp_asn1_dec_u64t(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u32_t *value) -{ - u8_t data; - - if (len <= 4) { - /* high u32 is 0 */ - *value = 0; - /* directly skip to low u32 */ - value++; - } - - if ((len > 0) && (len <= 9)) { - PBUF_OP_EXEC(snmp_pbuf_stream_read(pbuf_stream, &data)); - - /* expecting sign bit to be zero, only unsigned please! */ - if (((len == 9) && (data == 0x00)) || ((len < 9) && ((data & 0x80) == 0))) { - *value = data; - len--; - - while (len > 0) { - PBUF_OP_EXEC(snmp_pbuf_stream_read(pbuf_stream, &data)); - - if (len == 4) { - /* skip to low u32 */ - value++; - *value = 0; - } else { - *value <<= 8; - } - - *value |= data; - len--; - } - - return ERR_OK; - } - } - - return ERR_VAL; -} - /** * Decodes integer into s32_t. * @@ -576,51 +458,26 @@ snmp_asn1_dec_u64t(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u32_t *value err_t snmp_asn1_dec_s32t(struct snmp_pbuf_stream *pbuf_stream, u16_t len, s32_t *value) { -#if BYTE_ORDER == LITTLE_ENDIAN - u8_t *lsb_ptr = (u8_t*)value; -#endif -#if BYTE_ORDER == BIG_ENDIAN - u8_t *lsb_ptr = (u8_t*)value + sizeof(s32_t) - 1; -#endif - u8_t sign; u8_t data; if ((len > 0) && (len < 5)) { PBUF_OP_EXEC(snmp_pbuf_stream_read(pbuf_stream, &data)); - len--; if (data & 0x80) { /* negative, start from -1 */ *value = -1; - sign = 1; - *lsb_ptr &= data; + *value = (*value << 8) | data; } else { /* positive, start from 0 */ - *value = 0; - sign = 0; - *lsb_ptr |= data; + *value = data; } - - /* OR/AND octets with value */ + len--; + /* shift in the remaining value */ while (len > 0) { PBUF_OP_EXEC(snmp_pbuf_stream_read(pbuf_stream, &data)); + *value = (*value << 8) | data; len--; - -#if BYTE_ORDER == LITTLE_ENDIAN - *value <<= 8; -#endif -#if BYTE_ORDER == BIG_ENDIAN - *value >>= 8; -#endif - - if (sign) { - *lsb_ptr |= 255; - *lsb_ptr &= data; - } else { - *lsb_ptr |= data; - } } - return ERR_OK; } @@ -638,7 +495,7 @@ snmp_asn1_dec_s32t(struct snmp_pbuf_stream *pbuf_stream, u16_t len, s32_t *value * @return ERR_OK if successful, ERR_ARG if we can't (or won't) decode */ err_t -snmp_asn1_dec_oid(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u32_t* oid, u8_t* oid_len, u8_t oid_max_len) +snmp_asn1_dec_oid(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u32_t *oid, u8_t *oid_len, u8_t oid_max_len) { u32_t *oid_ptr; u8_t data; @@ -729,7 +586,7 @@ snmp_asn1_dec_oid(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u32_t* oid, u * @return ERR_OK if successful, ERR_ARG if we can't (or won't) decode */ err_t -snmp_asn1_dec_raw(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u8_t *buf, u16_t* buf_len, u16_t buf_max_len) +snmp_asn1_dec_raw(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u8_t *buf, u16_t *buf_len, u16_t buf_max_len) { if (len > buf_max_len) { /* not enough dst space */ @@ -746,4 +603,102 @@ snmp_asn1_dec_raw(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u8_t *buf, u1 return ERR_OK; } +#if LWIP_HAVE_INT64 +/** + * Returns octet count for an u64_t. + * + * @param value value to be encoded + * @param octets_needed points to the return value + * + * @note ASN coded integers are _always_ signed. E.g. +0xFFFF is coded + * as 0x00,0xFF,0xFF. Note the leading sign octet. A positive value + * of 0xFFFFFFFFFFFFFFFF is preceded with 0x00 and the length is 9 octets!! + */ +void +snmp_asn1_enc_u64t_cnt(u64_t value, u16_t *octets_needed) +{ + /* check if high u32 is 0 */ + if ((value >> 32) == 0) { + /* only low u32 is important */ + snmp_asn1_enc_u32t_cnt((u32_t)value, octets_needed); + } else { + /* low u32 does not matter for length determination */ + snmp_asn1_enc_u32t_cnt((u32_t)(value >> 32), octets_needed); + *octets_needed = *octets_needed + 4; /* add the 4 bytes of low u32 */ + } +} + +/** + * Decodes large positive integer (counter64) into 2x u32_t. + * + * @param pbuf_stream points to a pbuf stream + * @param len length of the coded integer field + * @param value return 64 bit integer + * @return ERR_OK if successful, ERR_ARG if we can't (or won't) decode + * + * @note ASN coded integers are _always_ signed. E.g. +0xFFFF is coded + * as 0x00,0xFF,0xFF. Note the leading sign octet. A positive value + * of 0xFFFFFFFFFFFFFFFF is preceded with 0x00 and the length is 9 octets!! + */ +err_t +snmp_asn1_dec_u64t(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u64_t *value) +{ + u8_t data; + + if ((len > 0) && (len <= 9)) { + PBUF_OP_EXEC(snmp_pbuf_stream_read(pbuf_stream, &data)); + + /* expecting sign bit to be zero, only unsigned please! */ + if (((len == 9) && (data == 0x00)) || ((len < 9) && ((data & 0x80) == 0))) { + *value = data; + len--; + + while (len > 0) { + PBUF_OP_EXEC(snmp_pbuf_stream_read(pbuf_stream, &data)); + *value <<= 8; + *value |= data; + len--; + } + + return ERR_OK; + } + } + + return ERR_VAL; +} + +/** + * Encodes u64_t (counter64) into a pbuf chained ASN1 msg. + * + * @param pbuf_stream points to a pbuf stream + * @param octets_needed encoding length (from snmp_asn1_enc_u32t_cnt()) + * @param value is the value to be encoded + * @return ERR_OK if successful, ERR_ARG if we can't (or won't) encode + * + * @see snmp_asn1_enc_u64t_cnt() + */ +err_t +snmp_asn1_enc_u64t(struct snmp_pbuf_stream *pbuf_stream, u16_t octets_needed, u64_t value) +{ + if (octets_needed > 9) { + return ERR_ARG; + } + if (octets_needed == 9) { + /* not enough bits in 'value' add leading 0x00 */ + PBUF_OP_EXEC(snmp_pbuf_stream_write(pbuf_stream, 0x00)); + octets_needed--; + } + + while (octets_needed > 1) { + octets_needed--; + PBUF_OP_EXEC(snmp_pbuf_stream_write(pbuf_stream, (u8_t)(value >> (octets_needed << 3)))); + } + + /* always write at least one octet (also in case of value == 0) */ + PBUF_OP_EXEC(snmp_pbuf_stream_write(pbuf_stream, (u8_t)(value))); + + return ERR_OK; +} +#endif + #endif /* LWIP_SNMP */ diff --git a/Libraries/LwIP/src/apps/snmp/snmp_asn1.h b/Libraries/LwIP/src/apps/snmp/snmp_asn1.h index 49e71e1..c9daf06 100755 --- a/Libraries/LwIP/src/apps/snmp/snmp_asn1.h +++ b/Libraries/LwIP/src/apps/snmp/snmp_asn1.h @@ -57,19 +57,21 @@ extern "C" { #define SNMP_ASN1_DATATYPE_MASK 0x1F #define SNMP_ASN1_DATATYPE_EXTENDED 0x1F /* DataType indicating that datatype is encoded in following bytes */ -/* context specific (SNMP) tags (from SNMP spec. RFC1157) */ +/* context specific (SNMP) tags (from SNMP spec. RFC1157 and RFC1905) */ #define SNMP_ASN1_CONTEXT_PDU_GET_REQ 0 #define SNMP_ASN1_CONTEXT_PDU_GET_NEXT_REQ 1 #define SNMP_ASN1_CONTEXT_PDU_GET_RESP 2 #define SNMP_ASN1_CONTEXT_PDU_SET_REQ 3 #define SNMP_ASN1_CONTEXT_PDU_TRAP 4 #define SNMP_ASN1_CONTEXT_PDU_GET_BULK_REQ 5 +#define SNMP_ASN1_CONTEXT_PDU_INFORM_REQ 6 +#define SNMP_ASN1_CONTEXT_PDU_V2_TRAP 7 +#define SNMP_ASN1_CONTEXT_PDU_REPORT 8 #define SNMP_ASN1_CONTEXT_VARBIND_NO_SUCH_OBJECT 0 #define SNMP_ASN1_CONTEXT_VARBIND_END_OF_MIB_VIEW 2 -struct snmp_asn1_tlv -{ +struct snmp_asn1_tlv { u8_t type; /* only U8 because extended types are not specified by SNMP */ u8_t type_len; /* encoded length of 'type' field (normally 1) */ u8_t length_len; /* indicates how many bytes are required to encode the 'value_len' field */ @@ -79,25 +81,28 @@ struct snmp_asn1_tlv #define SNMP_ASN1_TLV_LENGTH(tlv) ((tlv).type_len + (tlv).length_len + (tlv).value_len) #define SNMP_ASN1_SET_TLV_PARAMS(tlv, type_, length_len_, value_len_) do { (tlv).type = (type_); (tlv).type_len = 0; (tlv).length_len = (length_len_); (tlv).value_len = (value_len_); } while (0); -err_t snmp_asn1_dec_tlv(struct snmp_pbuf_stream* pbuf_stream, struct snmp_asn1_tlv* tlv); +err_t snmp_asn1_dec_tlv(struct snmp_pbuf_stream *pbuf_stream, struct snmp_asn1_tlv *tlv); err_t snmp_asn1_dec_u32t(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u32_t *value); -err_t snmp_asn1_dec_u64t(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u32_t *value); err_t snmp_asn1_dec_s32t(struct snmp_pbuf_stream *pbuf_stream, u16_t len, s32_t *value); -err_t snmp_asn1_dec_oid(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u32_t* oid, u8_t* oid_len, u8_t oid_max_len); -err_t snmp_asn1_dec_raw(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u8_t *buf, u16_t* buf_len, u16_t buf_max_len); +err_t snmp_asn1_dec_oid(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u32_t *oid, u8_t *oid_len, u8_t oid_max_len); +err_t snmp_asn1_dec_raw(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u8_t *buf, u16_t *buf_len, u16_t buf_max_len); -err_t snmp_ans1_enc_tlv(struct snmp_pbuf_stream* pbuf_stream, struct snmp_asn1_tlv* tlv); +err_t snmp_ans1_enc_tlv(struct snmp_pbuf_stream *pbuf_stream, struct snmp_asn1_tlv *tlv); void snmp_asn1_enc_length_cnt(u16_t length, u8_t *octets_needed); void snmp_asn1_enc_u32t_cnt(u32_t value, u16_t *octets_needed); -void snmp_asn1_enc_u64t_cnt(const u32_t *value, u16_t *octets_needed); void snmp_asn1_enc_s32t_cnt(s32_t value, u16_t *octets_needed); void snmp_asn1_enc_oid_cnt(const u32_t *oid, u16_t oid_len, u16_t *octets_needed); -err_t snmp_asn1_enc_oid(struct snmp_pbuf_stream* pbuf_stream, const u32_t *oid, u16_t oid_len); -err_t snmp_asn1_enc_s32t(struct snmp_pbuf_stream* pbuf_stream, u16_t octets_needed, s32_t value); -err_t snmp_asn1_enc_u32t(struct snmp_pbuf_stream* pbuf_stream, u16_t octets_needed, u32_t value); -err_t snmp_asn1_enc_u64t(struct snmp_pbuf_stream* pbuf_stream, u16_t octets_needed, const u32_t* value); -err_t snmp_asn1_enc_raw(struct snmp_pbuf_stream* pbuf_stream, const u8_t *raw, u16_t raw_len); +err_t snmp_asn1_enc_oid(struct snmp_pbuf_stream *pbuf_stream, const u32_t *oid, u16_t oid_len); +err_t snmp_asn1_enc_s32t(struct snmp_pbuf_stream *pbuf_stream, u16_t octets_needed, s32_t value); +err_t snmp_asn1_enc_u32t(struct snmp_pbuf_stream *pbuf_stream, u16_t octets_needed, u32_t value); +err_t snmp_asn1_enc_raw(struct snmp_pbuf_stream *pbuf_stream, const u8_t *raw, u16_t raw_len); + +#if LWIP_HAVE_INT64 +err_t snmp_asn1_dec_u64t(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u64_t *value); +void snmp_asn1_enc_u64t_cnt(u64_t value, u16_t *octets_needed); +err_t snmp_asn1_enc_u64t(struct snmp_pbuf_stream *pbuf_stream, u16_t octets_needed, u64_t value); +#endif #ifdef __cplusplus } diff --git a/Libraries/LwIP/src/apps/snmp/snmp_core.c b/Libraries/LwIP/src/apps/snmp/snmp_core.c index a4f02f1..2b50716 100755 --- a/Libraries/LwIP/src/apps/snmp/snmp_core.c +++ b/Libraries/LwIP/src/apps/snmp/snmp_core.c @@ -34,24 +34,24 @@ */ /** - * @defgroup snmp SNMPv2c agent + * @defgroup snmp SNMPv2c/v3 agent * @ingroup apps - * SNMPv2c compatible agent\n + * SNMPv2c and SNMPv3 compatible agent\n * There is also a MIB compiler and a MIB viewer in lwIP contrib repository * (lwip-contrib/apps/LwipMibCompiler).\n * The agent implements the most important MIB2 MIBs including IPv6 support * (interfaces, UDP, TCP, SNMP, ICMP, SYSTEM). IP MIB is an older version - * whithout IPv6 statistics (TODO).\n + * without IPv6 statistics (TODO).\n * Rewritten by Martin Hentschel and * Dirk Ziegelmeier \n - * Work on SNMPv3 has started, but is not finished.\n * * 0 Agent Capabilities * ==================== - * + * * Features: * --------- * - SNMPv2c support. + * - SNMPv3 support (a port to ARM mbedtls is provided, LWIP_SNMP_V3_MBEDTLS option). * - Low RAM usage - no memory pools, stack only. * - MIB2 implementation is separated from SNMP stack. * - Support for multiple MIBs (snmp_set_mibs() call) - e.g. for private MIB. @@ -66,7 +66,7 @@ * - Simplified thread sync support for MIBs - useful when MIBs * need to access variables shared with other threads where no locking is * possible. Used in MIB2 to access lwIP stats from lwIP thread. - * + * * MIB compiler (code generator): * ------------------------------ * - Provided in lwIP contrib repository. @@ -78,92 +78,100 @@ * - MIB parser, C file generation framework and LWIP code generation are cleanly * separated, which means the code may be useful as a base for code generation * of other SNMP agents. - * + * * Notes: * ------ * - Stack and MIB compiler were used to implement a Profinet device. * Compiled/implemented MIBs: LLDP-MIB, LLDP-EXT-DOT3-MIB, LLDP-EXT-PNO-MIB. - * + * * SNMPv1 per RFC1157 and SNMPv2c per RFC 3416 * ------------------------------------------- * Note the S in SNMP stands for "Simple". Note that "Simple" is * relative. SNMP is simple compared to the complex ISO network * management protocols CMIP (Common Management Information Protocol) * and CMOT (CMip Over Tcp). - * + * + * SNMPv3 + * ------ + * When SNMPv3 is used, several functions from snmpv3.h must be implemented + * by the user. This is mainly user management and persistence handling. + * The sample provided in lwip-contrib is insecure, don't use it in production + * systems, especially the missing persistence for engine boots variable + * simplifies replay attacks. + * * MIB II * ------ * The standard lwIP stack management information base. * This is a required MIB, so this is always enabled. * The groups EGP, CMOT and transmission are disabled by default. - * + * * Most mib-2 objects are not writable except: * sysName, sysLocation, sysContact, snmpEnableAuthenTraps. * Writing to or changing the ARP and IP address and route * tables is not possible. - * + * * Note lwIP has a very limited notion of IP routing. It currently * doen't have a route table and doesn't have a notion of the U,G,H flags. * Instead lwIP uses the interface list with only one default interface * acting as a single gateway interface (G) for the default route. - * + * * The agent returns a "virtual table" with the default route 0.0.0.0 * for the default interface and network routes (no H) for each * network interface in the netif_list. * All routes are considered to be up (U). - * + * * Loading additional MIBs * ----------------------- * MIBs can only be added in compile-time, not in run-time. - * - * + * + * * 1 Building the Agent * ==================== * First of all you'll need to add the following define * to your local lwipopts.h: * \#define LWIP_SNMP 1 - * + * * and add the source files your makefile. - * + * * Note you'll might need to adapt you network driver to update * the mib2 variables for your interface. - * + * * 2 Running the Agent * =================== * The following function calls must be made in your program to * actually get the SNMP agent running. - * + * * Before starting the agent you should supply pointers * for sysContact, sysLocation, and snmpEnableAuthenTraps. * You can do this by calling - * + * * - snmp_mib2_set_syscontact() * - snmp_mib2_set_syslocation() * - snmp_set_auth_traps_enabled() - * - * You can register a callback which is called on successful write access: + * + * You can register a callback which is called on successful write access: * snmp_set_write_callback(). - * + * * Additionally you may want to set - * + * * - snmp_mib2_set_sysdescr() * - snmp_set_device_enterprise_oid() * - snmp_mib2_set_sysname() - * + * * Also before starting the agent you need to setup * one or more trap destinations using these calls: - * + * * - snmp_trap_dst_enable() * - snmp_trap_dst_ip_set() - * + * * If you need more than MIB2, set the MIBs you want to use * by snmp_set_mibs(). - * + * * Finally, enable the agent by calling snmp_init() * * @defgroup snmp_core Core * @ingroup snmp - * + * * @defgroup snmp_traps Traps * @ingroup snmp */ @@ -180,31 +188,39 @@ #if (LWIP_SNMP && (SNMP_TRAP_DESTINATIONS<=0)) - #error "If you want to use SNMP, you have to define SNMP_TRAP_DESTINATIONS>=1 in your lwipopts.h" +#error "If you want to use SNMP, you have to define SNMP_TRAP_DESTINATIONS>=1 in your lwipopts.h" #endif #if (!LWIP_UDP && LWIP_SNMP) - #error "If you want to use SNMP, you have to define LWIP_UDP=1 in your lwipopts.h" +#error "If you want to use SNMP, you have to define LWIP_UDP=1 in your lwipopts.h" +#endif +#if SNMP_MAX_OBJ_ID_LEN > 255 +#error "SNMP_MAX_OBJ_ID_LEN must fit into an u8_t" #endif struct snmp_statistics snmp_stats; static const struct snmp_obj_id snmp_device_enterprise_oid_default = {SNMP_DEVICE_ENTERPRISE_OID_LEN, SNMP_DEVICE_ENTERPRISE_OID}; -static const struct snmp_obj_id* snmp_device_enterprise_oid = &snmp_device_enterprise_oid_default; +static const struct snmp_obj_id *snmp_device_enterprise_oid = &snmp_device_enterprise_oid_default; const u32_t snmp_zero_dot_zero_values[] = { 0, 0 }; const struct snmp_obj_id_const_ref snmp_zero_dot_zero = { LWIP_ARRAYSIZE(snmp_zero_dot_zero_values), snmp_zero_dot_zero_values }; - -#if SNMP_LWIP_MIB2 +#if SNMP_LWIP_MIB2 && LWIP_SNMP_V3 #include "lwip/apps/snmp_mib2.h" -static const struct snmp_mib* const default_mibs[] = { &mib2 }; -static u8_t snmp_num_mibs = 1; +#include "lwip/apps/snmp_snmpv2_framework.h" +#include "lwip/apps/snmp_snmpv2_usm.h" +static const struct snmp_mib *const default_mibs[] = { &mib2, &snmpframeworkmib, &snmpusmmib }; +static u8_t snmp_num_mibs = LWIP_ARRAYSIZE(default_mibs); +#elif SNMP_LWIP_MIB2 +#include "lwip/apps/snmp_mib2.h" +static const struct snmp_mib *const default_mibs[] = { &mib2 }; +static u8_t snmp_num_mibs = LWIP_ARRAYSIZE(default_mibs); #else -static const struct snmp_mib* const default_mibs[] = { NULL }; +static const struct snmp_mib *const default_mibs[] = { NULL }; static u8_t snmp_num_mibs = 0; #endif /* List of known mibs */ -static struct snmp_mib const * const *snmp_mibs = default_mibs; +static struct snmp_mib const *const *snmp_mibs = default_mibs; /** * @ingroup snmp_core @@ -219,6 +235,7 @@ static struct snmp_mib const * const *snmp_mibs = default_mibs; void snmp_set_mibs(const struct snmp_mib **mibs, u8_t num_mibs) { + LWIP_ASSERT_CORE_LOCKED(); LWIP_ASSERT("mibs pointer must be != NULL", (mibs != NULL)); LWIP_ASSERT("num_mibs pointer must be != 0", (num_mibs != 0)); snmp_mibs = mibs; @@ -232,15 +249,16 @@ snmp_set_mibs(const struct snmp_mib **mibs, u8_t num_mibs) * The 'device enterprise oid' shall point to an OID located under 'private-enterprises' branch (1.3.6.1.4.1.XXX). If a vendor * wants to provide a custom object there, he has to get its own enterprise oid from IANA (http://www.iana.org). It * is not allowed to use LWIP enterprise ID! - * In order to identify a specific device it is recommended to create a dedicated OID for each device type under its own + * In order to identify a specific device it is recommended to create a dedicated OID for each device type under its own * enterprise oid. * e.g. * device a > 1.3.6.1.4.1.XXX(ent-oid).1(devices).1(device a) * device b > 1.3.6.1.4.1.XXX(ent-oid).1(devices).2(device b) * for more details see description of 'sysObjectID' field in RFC1213-MIB */ -void snmp_set_device_enterprise_oid(const struct snmp_obj_id* device_enterprise_oid) +void snmp_set_device_enterprise_oid(const struct snmp_obj_id *device_enterprise_oid) { + LWIP_ASSERT_CORE_LOCKED(); if (device_enterprise_oid == NULL) { snmp_device_enterprise_oid = &snmp_device_enterprise_oid_default; } else { @@ -250,10 +268,11 @@ void snmp_set_device_enterprise_oid(const struct snmp_obj_id* device_enterprise_ /** * @ingroup snmp_core - * Get 'device enterprise oid' + * Get 'device enterprise oid' */ -const struct snmp_obj_id* snmp_get_device_enterprise_oid(void) +const struct snmp_obj_id *snmp_get_device_enterprise_oid(void) { + LWIP_ASSERT_CORE_LOCKED(); return snmp_device_enterprise_oid; } @@ -496,16 +515,16 @@ snmp_oid_to_ip(const u32_t *oid, u8_t oid_len, ip_addr_t *ip) u8_t snmp_oid_to_ip_port(const u32_t *oid, u8_t oid_len, ip_addr_t *ip, u16_t *port) { - u8_t idx = 0; + u8_t idx; /* InetAddressType + InetAddress */ - idx += snmp_oid_to_ip(&oid[idx], oid_len-idx, ip); + idx = snmp_oid_to_ip(&oid[0], oid_len, ip); if (idx == 0) { return 0; } /* InetPortNumber */ - if (oid_len < (idx+1)) { + if (oid_len < (idx + 1)) { return 0; } if (oid[idx] > 0xffff) { @@ -521,14 +540,14 @@ snmp_oid_to_ip_port(const u32_t *oid, u8_t oid_len, ip_addr_t *ip, u16_t *port) /** * Assign an OID to struct snmp_obj_id - * @param target Assignment target + * @param target Assignment target * @param oid OID * @param oid_len OID length */ void -snmp_oid_assign(struct snmp_obj_id* target, const u32_t *oid, u8_t oid_len) +snmp_oid_assign(struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len) { - LWIP_ASSERT("oid_len <= LWIP_SNMP_OBJ_ID_LEN", oid_len <= SNMP_MAX_OBJ_ID_LEN); + LWIP_ASSERT("oid_len <= SNMP_MAX_OBJ_ID_LEN", oid_len <= SNMP_MAX_OBJ_ID_LEN); target->len = oid_len; @@ -544,14 +563,14 @@ snmp_oid_assign(struct snmp_obj_id* target, const u32_t *oid, u8_t oid_len) * @param oid_len OID length */ void -snmp_oid_prefix(struct snmp_obj_id* target, const u32_t *oid, u8_t oid_len) +snmp_oid_prefix(struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len) { - LWIP_ASSERT("target->len + oid_len <= LWIP_SNMP_OBJ_ID_LEN", (target->len + oid_len) <= SNMP_MAX_OBJ_ID_LEN); + LWIP_ASSERT("target->len + oid_len <= SNMP_MAX_OBJ_ID_LEN", (target->len + oid_len) <= SNMP_MAX_OBJ_ID_LEN); if (oid_len > 0) { /* move existing OID to make room at the beginning for OID to insert */ int i; - for (i = target->len-1; i>=0; i--) { + for (i = target->len - 1; i >= 0; i--) { target->id[i + oid_len] = target->id[i]; } @@ -569,7 +588,7 @@ snmp_oid_prefix(struct snmp_obj_id* target, const u32_t *oid, u8_t oid_len) * @param oid2_len OID 2 length */ void -snmp_oid_combine(struct snmp_obj_id* target, const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len) +snmp_oid_combine(struct snmp_obj_id *target, const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len) { snmp_oid_assign(target, oid1, oid1_len); snmp_oid_append(target, oid2, oid2_len); @@ -582,13 +601,13 @@ snmp_oid_combine(struct snmp_obj_id* target, const u32_t *oid1, u8_t oid1_len, c * @param oid_len OID length */ void -snmp_oid_append(struct snmp_obj_id* target, const u32_t *oid, u8_t oid_len) +snmp_oid_append(struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len) { - LWIP_ASSERT("offset + oid_len <= LWIP_SNMP_OBJ_ID_LEN", (target->len + oid_len) <= SNMP_MAX_OBJ_ID_LEN); + LWIP_ASSERT("offset + oid_len <= SNMP_MAX_OBJ_ID_LEN", (target->len + oid_len) <= SNMP_MAX_OBJ_ID_LEN); if (oid_len > 0) { MEMCPY(&target->id[target->len], oid, oid_len * sizeof(u32_t)); - target->len += oid_len; + target->len = (u8_t)(target->len + oid_len); } } @@ -644,7 +663,7 @@ snmp_oid_compare(const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_ u8_t snmp_oid_equal(const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len) { - return (snmp_oid_compare(oid1, oid1_len, oid2, oid2_len) == 0)? 1 : 0; + return (snmp_oid_compare(oid1, oid1_len, oid2, oid2_len) == 0) ? 1 : 0; } /** @@ -655,32 +674,18 @@ snmp_oid_equal(const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_le u8_t netif_to_num(const struct netif *netif) { - u8_t result = 0; - struct netif *netif_iterator = netif_list; - - while (netif_iterator != NULL) { - result++; - - if (netif_iterator == netif) { - return result; - } - - netif_iterator = netif_iterator->next; - } - - LWIP_ASSERT("netif not found in netif_list", 0); - return 0; + return netif_get_index(netif); } -static const struct snmp_mib* +static const struct snmp_mib * snmp_get_mib_from_oid(const u32_t *oid, u8_t oid_len) { - const u32_t* list_oid; - const u32_t* searched_oid; + const u32_t *list_oid; + const u32_t *searched_oid; u8_t i, l; u8_t max_match_len = 0; - const struct snmp_mib* matched_mib = NULL; + const struct snmp_mib *matched_mib = NULL; LWIP_ASSERT("'oid' param must not be NULL!", (oid != NULL)); @@ -717,11 +722,11 @@ snmp_get_mib_from_oid(const u32_t *oid, u8_t oid_len) return matched_mib; } -static const struct snmp_mib* +static const struct snmp_mib * snmp_get_next_mib(const u32_t *oid, u8_t oid_len) { u8_t i; - const struct snmp_mib* next_mib = NULL; + const struct snmp_mib *next_mib = NULL; LWIP_ASSERT("'oid' param must not be NULL!", (oid != NULL)); @@ -745,10 +750,10 @@ snmp_get_next_mib(const u32_t *oid, u8_t oid_len) return next_mib; } -static const struct snmp_mib* +static const struct snmp_mib * snmp_get_mib_between(const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len) { - const struct snmp_mib* next_mib = snmp_get_next_mib(oid1, oid1_len); + const struct snmp_mib *next_mib = snmp_get_next_mib(oid1, oid1_len); LWIP_ASSERT("'oid2' param must not be NULL!", (oid2 != NULL)); LWIP_ASSERT("'oid2_len' param must be greater than 0!", (oid2_len > 0)); @@ -763,7 +768,7 @@ snmp_get_mib_between(const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t o } u8_t -snmp_get_node_instance_from_oid(const u32_t *oid, u8_t oid_len, struct snmp_node_instance* node_instance) +snmp_get_node_instance_from_oid(const u32_t *oid, u8_t oid_len, struct snmp_node_instance *node_instance) { u8_t result = SNMP_ERR_NOSUCHOBJECT; const struct snmp_mib *mib; @@ -776,15 +781,15 @@ snmp_get_node_instance_from_oid(const u32_t *oid, u8_t oid_len, struct snmp_node mn = snmp_mib_tree_resolve_exact(mib, oid, oid_len, &oid_instance_len); if ((mn != NULL) && (mn->node_type != SNMP_NODE_TREE)) { /* get instance */ - const struct snmp_leaf_node* leaf_node = (const struct snmp_leaf_node*)(const void*)mn; + const struct snmp_leaf_node *leaf_node = (const struct snmp_leaf_node *)(const void *)mn; node_instance->node = mn; snmp_oid_assign(&node_instance->instance_oid, oid + (oid_len - oid_instance_len), oid_instance_len); result = leaf_node->get_instance( - oid, - oid_len - oid_instance_len, - node_instance); + oid, + oid_len - oid_instance_len, + node_instance); #ifdef LWIP_DEBUG if (result == SNMP_ERR_NOERROR) { @@ -803,11 +808,11 @@ snmp_get_node_instance_from_oid(const u32_t *oid, u8_t oid_len, struct snmp_node } u8_t -snmp_get_next_node_instance_from_oid(const u32_t *oid, u8_t oid_len, snmp_validate_node_instance_method validate_node_instance_method, void* validate_node_instance_arg, struct snmp_obj_id* node_oid, struct snmp_node_instance* node_instance) +snmp_get_next_node_instance_from_oid(const u32_t *oid, u8_t oid_len, snmp_validate_node_instance_method validate_node_instance_method, void *validate_node_instance_arg, struct snmp_obj_id *node_oid, struct snmp_node_instance *node_instance) { const struct snmp_mib *mib; const struct snmp_node *mn = NULL; - const u32_t* start_oid = NULL; + const u32_t *start_oid = NULL; u8_t start_oid_len = 0; /* resolve target MIB from passed OID */ @@ -843,7 +848,7 @@ snmp_get_next_node_instance_from_oid(const u32_t *oid, u8_t oid_len, snmp_valida /* validate the node; if the node has no further instance or the returned instance is invalid, search for the next in MIB and validate again */ node_instance->node = mn; while (mn != NULL) { - u8_t result; + u8_t result; /* clear fields which may have values from previous loops */ node_instance->asn1_type = 0; @@ -855,10 +860,10 @@ snmp_get_next_node_instance_from_oid(const u32_t *oid, u8_t oid_len, snmp_valida node_instance->reference.ptr = NULL; node_instance->reference_len = 0; - result = ((const struct snmp_leaf_node*)(const void*)mn)->get_next_instance( - node_oid->id, - node_oid->len, - node_instance); + result = ((const struct snmp_leaf_node *)(const void *)mn)->get_next_instance( + node_oid->id, + node_oid->len, + node_instance); if (result == SNMP_ERR_NOERROR) { #ifdef LWIP_DEBUG @@ -906,7 +911,7 @@ snmp_get_next_node_instance_from_oid(const u32_t *oid, u8_t oid_len, snmp_valida /* we found a suitable next node, now we have to check if a inner MIB is located between the searched OID and the resulting OID. - this is possible because MIB's may be located anywhere in the global tree, that means also in + this is possible because MIB's may be located anywhere in the global tree, that means also in the subtree of another MIB (e.g. if searched OID is .2 and resulting OID is .4, then another MIB having .3 as root node may exist) */ @@ -975,17 +980,17 @@ snmp_get_next_node_instance_from_oid(const u32_t *oid, u8_t oid_len, snmp_valida * */ const struct snmp_node * -snmp_mib_tree_resolve_exact(const struct snmp_mib *mib, const u32_t *oid, u8_t oid_len, u8_t* oid_instance_len) +snmp_mib_tree_resolve_exact(const struct snmp_mib *mib, const u32_t *oid, u8_t oid_len, u8_t *oid_instance_len) { - const struct snmp_node* const* node = &mib->root_node; + const struct snmp_node *const *node = &mib->root_node; u8_t oid_offset = mib->base_oid_len; while ((oid_offset < oid_len) && ((*node)->node_type == SNMP_NODE_TREE)) { /* search for matching sub node */ u32_t subnode_oid = *(oid + oid_offset); - u32_t i = (*(const struct snmp_tree_node* const*)node)->subnode_count; - node = (*(const struct snmp_tree_node* const*)node)->subnodes; + u32_t i = (*(const struct snmp_tree_node * const *)node)->subnode_count; + node = (*(const struct snmp_tree_node * const *)node)->subnodes; while ((i > 0) && ((*node)->oid != subnode_oid)) { node++; i--; @@ -1008,12 +1013,12 @@ snmp_mib_tree_resolve_exact(const struct snmp_mib *mib, const u32_t *oid, u8_t o return NULL; } -const struct snmp_node* -snmp_mib_tree_resolve_next(const struct snmp_mib *mib, const u32_t *oid, u8_t oid_len, struct snmp_obj_id* oidret) +const struct snmp_node * +snmp_mib_tree_resolve_next(const struct snmp_mib *mib, const u32_t *oid, u8_t oid_len, struct snmp_obj_id *oidret) { u8_t oid_offset = mib->base_oid_len; - const struct snmp_node* const* node; - const struct snmp_tree_node* node_stack[SNMP_MAX_OBJ_ID_LEN]; + const struct snmp_node *const *node; + const struct snmp_tree_node *node_stack[SNMP_MAX_OBJ_ID_LEN]; s32_t nsi = 0; /* NodeStackIndex */ u32_t subnode_oid; @@ -1023,7 +1028,7 @@ snmp_mib_tree_resolve_next(const struct snmp_mib *mib, const u32_t *oid, u8_t oi } /* first build node stack related to passed oid (as far as possible), then go backwards to determine the next node */ - node_stack[nsi] = (const struct snmp_tree_node*)(const void*)mib->root_node; + node_stack[nsi] = (const struct snmp_tree_node *)(const void *)mib->root_node; while (oid_offset < oid_len) { /* search for matching sub node */ u32_t i = node_stack[nsi]->subnode_count; @@ -1041,7 +1046,7 @@ snmp_mib_tree_resolve_next(const struct snmp_mib *mib, const u32_t *oid, u8_t oi break; } nsi++; - node_stack[nsi] = (const struct snmp_tree_node*)(const void*)(*node); + node_stack[nsi] = (const struct snmp_tree_node *)(const void *)(*node); oid_offset++; } @@ -1055,7 +1060,7 @@ snmp_mib_tree_resolve_next(const struct snmp_mib *mib, const u32_t *oid, u8_t oi } while (nsi >= 0) { - const struct snmp_node* subnode = NULL; + const struct snmp_node *subnode = NULL; /* find next node on current level */ s32_t i = node_stack[nsi]->subnode_count; @@ -1080,7 +1085,7 @@ snmp_mib_tree_resolve_next(const struct snmp_mib *mib, const u32_t *oid, u8_t oi if (subnode->node_type == SNMP_NODE_TREE) { /* next is a tree node, go into it and start searching */ nsi++; - node_stack[nsi] = (const struct snmp_tree_node*)(const void*)subnode; + node_stack[nsi] = (const struct snmp_tree_node *)(const void *)subnode; subnode_oid = 0; } else { /* we found a leaf node -> fill oidret and return it */ @@ -1106,8 +1111,8 @@ snmp_mib_tree_resolve_next(const struct snmp_mib *mib, const u32_t *oid, u8_t oi /** initialize struct next_oid_state using this function before passing it to next_oid_check */ void snmp_next_oid_init(struct snmp_next_oid_state *state, - const u32_t *start_oid, u8_t start_oid_len, - u32_t *next_oid_buf, u8_t next_oid_max_len) + const u32_t *start_oid, u8_t start_oid_len, + u32_t *next_oid_buf, u8_t next_oid_max_len) { state->start_oid = start_oid; state->start_oid_len = start_oid_len; @@ -1121,7 +1126,7 @@ snmp_next_oid_init(struct snmp_next_oid_state *state, this methid is intended if the complete OID is not yet known but it is very expensive to build it up, so it is possible to test the starting part before building up the complete oid and pass it to snmp_next_oid_check()*/ u8_t -snmp_next_oid_precheck(struct snmp_next_oid_state *state, const u32_t *oid, const u8_t oid_len) +snmp_next_oid_precheck(struct snmp_next_oid_state *state, const u32_t *oid, u8_t oid_len) { if (state->status != SNMP_NEXT_OID_STATUS_BUF_TO_SMALL) { u8_t start_oid_len = (oid_len < state->start_oid_len) ? oid_len : state->start_oid_len; @@ -1130,7 +1135,7 @@ snmp_next_oid_precheck(struct snmp_next_oid_state *state, const u32_t *oid, cons if (snmp_oid_compare(oid, oid_len, state->start_oid, start_oid_len) >= 0) { /* check if new oid is located closer to start oid than current closest oid */ if ((state->status == SNMP_NEXT_OID_STATUS_NO_MATCH) || - (snmp_oid_compare(oid, oid_len, state->next_oid, state->next_oid_len) < 0)) { + (snmp_oid_compare(oid, oid_len, state->next_oid, state->next_oid_len) < 0)) { return 1; } } @@ -1141,7 +1146,7 @@ snmp_next_oid_precheck(struct snmp_next_oid_state *state, const u32_t *oid, cons /** checks the passed OID if it is a candidate to be the next one (get_next); returns !=0 if passed oid is currently closest, otherwise 0 */ u8_t -snmp_next_oid_check(struct snmp_next_oid_state *state, const u32_t *oid, const u8_t oid_len, void* reference) +snmp_next_oid_check(struct snmp_next_oid_state *state, const u32_t *oid, u8_t oid_len, void *reference) { /* do not overwrite a fail result */ if (state->status != SNMP_NEXT_OID_STATUS_BUF_TO_SMALL) { @@ -1149,7 +1154,7 @@ snmp_next_oid_check(struct snmp_next_oid_state *state, const u32_t *oid, const u if (snmp_oid_compare(oid, oid_len, state->start_oid, state->start_oid_len) > 0) { /* check if new oid is located closer to start oid than current closest oid */ if ((state->status == SNMP_NEXT_OID_STATUS_NO_MATCH) || - (snmp_oid_compare(oid, oid_len, state->next_oid, state->next_oid_len) < 0)) { + (snmp_oid_compare(oid, oid_len, state->next_oid, state->next_oid_len) < 0)) { if (oid_len <= state->next_oid_max_len) { MEMCPY(state->next_oid, oid, oid_len * sizeof(u32_t)); state->next_oid_len = oid_len; @@ -1185,7 +1190,7 @@ snmp_oid_in_range(const u32_t *oid_in, u8_t oid_len, const struct snmp_oid_range } snmp_err_t -snmp_set_test_ok(struct snmp_node_instance* instance, u16_t value_len, void* value) +snmp_set_test_ok(struct snmp_node_instance *instance, u16_t value_len, void *value) { LWIP_UNUSED_ARG(instance); LWIP_UNUSED_ARG(value_len); @@ -1228,8 +1233,7 @@ snmp_decode_bits(const u8_t *buf, u32_t buf_len, u32_t *bit_value) } bits_processed++; b <<= 1; - } - while ((bits_processed & 0x07) != 0); /* &0x07 -> % 8 */ + } while ((bits_processed & 0x07) != 0); /* &0x07 -> % 8 */ } else { bits_processed += 8; } diff --git a/Libraries/LwIP/src/apps/snmp/snmp_core_priv.h b/Libraries/LwIP/src/apps/snmp/snmp_core_priv.h index 1603b28..5e54864 100755 --- a/Libraries/LwIP/src/apps/snmp/snmp_core_priv.h +++ b/Libraries/LwIP/src/apps/snmp/snmp_core_priv.h @@ -55,17 +55,24 @@ extern "C" { */ #define SNMP_ERR_TOOBIG 1 #define SNMP_ERR_AUTHORIZATIONERROR 16 + +#define SNMP_ERR_UNKNOWN_ENGINEID 30 +#define SNMP_ERR_UNKNOWN_SECURITYNAME 31 +#define SNMP_ERR_UNSUPPORTED_SECLEVEL 32 +#define SNMP_ERR_NOTINTIMEWINDOW 33 +#define SNMP_ERR_DECRYIPTION_ERROR 34 + #define SNMP_ERR_NOSUCHOBJECT SNMP_VARBIND_EXCEPTION_OFFSET + SNMP_ASN1_CONTEXT_VARBIND_NO_SUCH_OBJECT #define SNMP_ERR_ENDOFMIBVIEW SNMP_VARBIND_EXCEPTION_OFFSET + SNMP_ASN1_CONTEXT_VARBIND_END_OF_MIB_VIEW -const struct snmp_node* snmp_mib_tree_resolve_exact(const struct snmp_mib *mib, const u32_t *oid, u8_t oid_len, u8_t* oid_instance_len); -const struct snmp_node* snmp_mib_tree_resolve_next(const struct snmp_mib *mib, const u32_t *oid, u8_t oid_len, struct snmp_obj_id* oidret); +const struct snmp_node *snmp_mib_tree_resolve_exact(const struct snmp_mib *mib, const u32_t *oid, u8_t oid_len, u8_t *oid_instance_len); +const struct snmp_node *snmp_mib_tree_resolve_next(const struct snmp_mib *mib, const u32_t *oid, u8_t oid_len, struct snmp_obj_id *oidret); -typedef u8_t (*snmp_validate_node_instance_method)(struct snmp_node_instance*, void*); +typedef u8_t (*snmp_validate_node_instance_method)(struct snmp_node_instance *, void *); -u8_t snmp_get_node_instance_from_oid(const u32_t *oid, u8_t oid_len, struct snmp_node_instance* node_instance); -u8_t snmp_get_next_node_instance_from_oid(const u32_t *oid, u8_t oid_len, snmp_validate_node_instance_method validate_node_instance_method, void* validate_node_instance_arg, struct snmp_obj_id* node_oid, struct snmp_node_instance* node_instance); +u8_t snmp_get_node_instance_from_oid(const u32_t *oid, u8_t oid_len, struct snmp_node_instance *node_instance); +u8_t snmp_get_next_node_instance_from_oid(const u32_t *oid, u8_t oid_len, snmp_validate_node_instance_method validate_node_instance_method, void *validate_node_instance_arg, struct snmp_obj_id *node_oid, struct snmp_node_instance *node_instance); #ifdef __cplusplus } diff --git a/Libraries/LwIP/src/apps/snmp/snmp_mib2.c b/Libraries/LwIP/src/apps/snmp/snmp_mib2.c index afee88f..dc49ae6 100755 --- a/Libraries/LwIP/src/apps/snmp/snmp_mib2.c +++ b/Libraries/LwIP/src/apps/snmp/snmp_mib2.c @@ -59,7 +59,7 @@ #include "lwip/tcpip.h" #include "lwip/priv/tcpip_priv.h" void -snmp_mib2_lwip_synchronizer(snmp_threadsync_called_fn fn, void* arg) +snmp_mib2_lwip_synchronizer(snmp_threadsync_called_fn fn, void *arg) { #if LWIP_TCPIP_CORE_LOCKING LOCK_TCPIP_CORE(); @@ -87,7 +87,7 @@ extern const struct snmp_scalar_array_node snmp_mib2_system_node; extern const struct snmp_tree_node snmp_mib2_at_root; extern const struct snmp_tree_node snmp_mib2_ip_root; -static const struct snmp_node* const mib2_nodes[] = { +static const struct snmp_node *const mib2_nodes[] = { &snmp_mib2_system_node.node.node, &snmp_mib2_interface_root.node, #if LWIP_ARP && LWIP_IPV4 @@ -110,7 +110,7 @@ static const struct snmp_node* const mib2_nodes[] = { static const struct snmp_tree_node mib2_root = SNMP_CREATE_TREE_NODE(1, mib2_nodes); -static const u32_t mib2_base_oid_arr[] = { 1,3,6,1,2,1 }; +static const u32_t mib2_base_oid_arr[] = { 1, 3, 6, 1, 2, 1 }; const struct snmp_mib mib2 = SNMP_MIB_CREATE(mib2_base_oid_arr, &mib2_root.node); #endif /* LWIP_SNMP && SNMP_LWIP_MIB2 */ diff --git a/Libraries/LwIP/src/apps/snmp/snmp_mib2_icmp.c b/Libraries/LwIP/src/apps/snmp/snmp_mib2_icmp.c index 00e187b..0a82375 100755 --- a/Libraries/LwIP/src/apps/snmp/snmp_mib2_icmp.c +++ b/Libraries/LwIP/src/apps/snmp/snmp_mib2_icmp.c @@ -58,90 +58,90 @@ static s16_t icmp_get_value(const struct snmp_scalar_array_node_def *node, void *value) { - u32_t *uint_ptr = (u32_t*)value; + u32_t *uint_ptr = (u32_t *)value; switch (node->oid) { - case 1: /* icmpInMsgs */ - *uint_ptr = STATS_GET(mib2.icmpinmsgs); - return sizeof(*uint_ptr); - case 2: /* icmpInErrors */ - *uint_ptr = STATS_GET(mib2.icmpinerrors); - return sizeof(*uint_ptr); - case 3: /* icmpInDestUnreachs */ - *uint_ptr = STATS_GET(mib2.icmpindestunreachs); - return sizeof(*uint_ptr); - case 4: /* icmpInTimeExcds */ - *uint_ptr = STATS_GET(mib2.icmpintimeexcds); - return sizeof(*uint_ptr); - case 5: /* icmpInParmProbs */ - *uint_ptr = STATS_GET(mib2.icmpinparmprobs); - return sizeof(*uint_ptr); - case 6: /* icmpInSrcQuenchs */ - *uint_ptr = STATS_GET(mib2.icmpinsrcquenchs); - return sizeof(*uint_ptr); - case 7: /* icmpInRedirects */ - *uint_ptr = STATS_GET(mib2.icmpinredirects); - return sizeof(*uint_ptr); - case 8: /* icmpInEchos */ - *uint_ptr = STATS_GET(mib2.icmpinechos); - return sizeof(*uint_ptr); - case 9: /* icmpInEchoReps */ - *uint_ptr = STATS_GET(mib2.icmpinechoreps); - return sizeof(*uint_ptr); - case 10: /* icmpInTimestamps */ - *uint_ptr = STATS_GET(mib2.icmpintimestamps); - return sizeof(*uint_ptr); - case 11: /* icmpInTimestampReps */ - *uint_ptr = STATS_GET(mib2.icmpintimestampreps); - return sizeof(*uint_ptr); - case 12: /* icmpInAddrMasks */ - *uint_ptr = STATS_GET(mib2.icmpinaddrmasks); - return sizeof(*uint_ptr); - case 13: /* icmpInAddrMaskReps */ - *uint_ptr = STATS_GET(mib2.icmpinaddrmaskreps); - return sizeof(*uint_ptr); - case 14: /* icmpOutMsgs */ - *uint_ptr = STATS_GET(mib2.icmpoutmsgs); - return sizeof(*uint_ptr); - case 15: /* icmpOutErrors */ - *uint_ptr = STATS_GET(mib2.icmpouterrors); - return sizeof(*uint_ptr); - case 16: /* icmpOutDestUnreachs */ - *uint_ptr = STATS_GET(mib2.icmpoutdestunreachs); - return sizeof(*uint_ptr); - case 17: /* icmpOutTimeExcds */ - *uint_ptr = STATS_GET(mib2.icmpouttimeexcds); - return sizeof(*uint_ptr); - case 18: /* icmpOutParmProbs: not supported -> always 0 */ - *uint_ptr = 0; - return sizeof(*uint_ptr); - case 19: /* icmpOutSrcQuenchs: not supported -> always 0 */ - *uint_ptr = 0; - return sizeof(*uint_ptr); - case 20: /* icmpOutRedirects: not supported -> always 0 */ - *uint_ptr = 0; - return sizeof(*uint_ptr); - case 21: /* icmpOutEchos */ - *uint_ptr = STATS_GET(mib2.icmpoutechos); - return sizeof(*uint_ptr); - case 22: /* icmpOutEchoReps */ - *uint_ptr = STATS_GET(mib2.icmpoutechoreps); - return sizeof(*uint_ptr); - case 23: /* icmpOutTimestamps: not supported -> always 0 */ - *uint_ptr = 0; - return sizeof(*uint_ptr); - case 24: /* icmpOutTimestampReps: not supported -> always 0 */ - *uint_ptr = 0; - return sizeof(*uint_ptr); - case 25: /* icmpOutAddrMasks: not supported -> always 0 */ - *uint_ptr = 0; - return sizeof(*uint_ptr); - case 26: /* icmpOutAddrMaskReps: not supported -> always 0 */ - *uint_ptr = 0; - return sizeof(*uint_ptr); - default: - LWIP_DEBUGF(SNMP_MIB_DEBUG,("icmp_get_value(): unknown id: %"S32_F"\n", node->oid)); - break; + case 1: /* icmpInMsgs */ + *uint_ptr = STATS_GET(mib2.icmpinmsgs); + return sizeof(*uint_ptr); + case 2: /* icmpInErrors */ + *uint_ptr = STATS_GET(mib2.icmpinerrors); + return sizeof(*uint_ptr); + case 3: /* icmpInDestUnreachs */ + *uint_ptr = STATS_GET(mib2.icmpindestunreachs); + return sizeof(*uint_ptr); + case 4: /* icmpInTimeExcds */ + *uint_ptr = STATS_GET(mib2.icmpintimeexcds); + return sizeof(*uint_ptr); + case 5: /* icmpInParmProbs */ + *uint_ptr = STATS_GET(mib2.icmpinparmprobs); + return sizeof(*uint_ptr); + case 6: /* icmpInSrcQuenchs */ + *uint_ptr = STATS_GET(mib2.icmpinsrcquenchs); + return sizeof(*uint_ptr); + case 7: /* icmpInRedirects */ + *uint_ptr = STATS_GET(mib2.icmpinredirects); + return sizeof(*uint_ptr); + case 8: /* icmpInEchos */ + *uint_ptr = STATS_GET(mib2.icmpinechos); + return sizeof(*uint_ptr); + case 9: /* icmpInEchoReps */ + *uint_ptr = STATS_GET(mib2.icmpinechoreps); + return sizeof(*uint_ptr); + case 10: /* icmpInTimestamps */ + *uint_ptr = STATS_GET(mib2.icmpintimestamps); + return sizeof(*uint_ptr); + case 11: /* icmpInTimestampReps */ + *uint_ptr = STATS_GET(mib2.icmpintimestampreps); + return sizeof(*uint_ptr); + case 12: /* icmpInAddrMasks */ + *uint_ptr = STATS_GET(mib2.icmpinaddrmasks); + return sizeof(*uint_ptr); + case 13: /* icmpInAddrMaskReps */ + *uint_ptr = STATS_GET(mib2.icmpinaddrmaskreps); + return sizeof(*uint_ptr); + case 14: /* icmpOutMsgs */ + *uint_ptr = STATS_GET(mib2.icmpoutmsgs); + return sizeof(*uint_ptr); + case 15: /* icmpOutErrors */ + *uint_ptr = STATS_GET(mib2.icmpouterrors); + return sizeof(*uint_ptr); + case 16: /* icmpOutDestUnreachs */ + *uint_ptr = STATS_GET(mib2.icmpoutdestunreachs); + return sizeof(*uint_ptr); + case 17: /* icmpOutTimeExcds */ + *uint_ptr = STATS_GET(mib2.icmpouttimeexcds); + return sizeof(*uint_ptr); + case 18: /* icmpOutParmProbs: not supported -> always 0 */ + *uint_ptr = 0; + return sizeof(*uint_ptr); + case 19: /* icmpOutSrcQuenchs: not supported -> always 0 */ + *uint_ptr = 0; + return sizeof(*uint_ptr); + case 20: /* icmpOutRedirects: not supported -> always 0 */ + *uint_ptr = 0; + return sizeof(*uint_ptr); + case 21: /* icmpOutEchos */ + *uint_ptr = STATS_GET(mib2.icmpoutechos); + return sizeof(*uint_ptr); + case 22: /* icmpOutEchoReps */ + *uint_ptr = STATS_GET(mib2.icmpoutechoreps); + return sizeof(*uint_ptr); + case 23: /* icmpOutTimestamps: not supported -> always 0 */ + *uint_ptr = 0; + return sizeof(*uint_ptr); + case 24: /* icmpOutTimestampReps: not supported -> always 0 */ + *uint_ptr = 0; + return sizeof(*uint_ptr); + case 25: /* icmpOutAddrMasks: not supported -> always 0 */ + *uint_ptr = 0; + return sizeof(*uint_ptr); + case 26: /* icmpOutAddrMaskReps: not supported -> always 0 */ + *uint_ptr = 0; + return sizeof(*uint_ptr); + default: + LWIP_DEBUGF(SNMP_MIB_DEBUG, ("icmp_get_value(): unknown id: %"S32_F"\n", node->oid)); + break; } return 0; diff --git a/Libraries/LwIP/src/apps/snmp/snmp_mib2_interfaces.c b/Libraries/LwIP/src/apps/snmp/snmp_mib2_interfaces.c index ac9e8dc..c53ce9e 100755 --- a/Libraries/LwIP/src/apps/snmp/snmp_mib2_interfaces.c +++ b/Libraries/LwIP/src/apps/snmp/snmp_mib2_interfaces.c @@ -59,16 +59,15 @@ /* --- interfaces .1.3.6.1.2.1.2 ----------------------------------------------------- */ static s16_t -interfaces_get_value(struct snmp_node_instance* instance, void* value) +interfaces_get_value(struct snmp_node_instance *instance, void *value) { if (instance->node->oid == 1) { - s32_t *sint_ptr = (s32_t*)value; + s32_t *sint_ptr = (s32_t *)value; s32_t num_netifs = 0; - struct netif *netif = netif_list; - while (netif != NULL) { + struct netif *netif; + NETIF_FOREACH(netif) { num_netifs++; - netif = netif->next; } *sint_ptr = num_netifs; @@ -93,7 +92,7 @@ static const u8_t iftable_ifAdminStatus_lowerLayerDown = 7; static const u8_t iftable_ifAdminStatus_down = 2; static snmp_err_t -interfaces_Table_get_cell_instance(const u32_t* column, const u32_t* row_oid, u8_t row_oid_len, struct snmp_node_instance* cell_instance) +interfaces_Table_get_cell_instance(const u32_t *column, const u32_t *row_oid, u8_t row_oid_len, struct snmp_node_instance *cell_instance) { u32_t ifIndex; struct netif *netif; @@ -109,14 +108,12 @@ interfaces_Table_get_cell_instance(const u32_t* column, const u32_t* row_oid, u8 ifIndex = row_oid[0]; /* find netif with index */ - netif = netif_list; - while (netif != NULL) { + NETIF_FOREACH(netif) { if (netif_to_num(netif) == ifIndex) { /* store netif pointer for subsequent operations (get/test/set) */ cell_instance->reference.ptr = netif; return SNMP_ERR_NOERROR; } - netif = netif->next; } /* not found */ @@ -124,7 +121,7 @@ interfaces_Table_get_cell_instance(const u32_t* column, const u32_t* row_oid, u8 } static snmp_err_t -interfaces_Table_get_next_cell_instance(const u32_t* column, struct snmp_obj_id* row_oid, struct snmp_node_instance* cell_instance) +interfaces_Table_get_next_cell_instance(const u32_t *column, struct snmp_obj_id *row_oid, struct snmp_node_instance *cell_instance) { struct netif *netif; struct snmp_next_oid_state state; @@ -136,15 +133,12 @@ interfaces_Table_get_next_cell_instance(const u32_t* column, struct snmp_obj_id* snmp_next_oid_init(&state, row_oid->id, row_oid->len, result_temp, LWIP_ARRAYSIZE(interfaces_Table_oid_ranges)); /* iterate over all possible OIDs to find the next one */ - netif = netif_list; - while (netif != NULL) { + NETIF_FOREACH(netif) { u32_t test_oid[LWIP_ARRAYSIZE(interfaces_Table_oid_ranges)]; test_oid[0] = netif_to_num(netif); /* check generated OID: is it a candidate for the next one? */ snmp_next_oid_check(&state, test_oid, LWIP_ARRAYSIZE(interfaces_Table_oid_ranges), netif); - - netif = netif->next; } /* did we find a next one? */ @@ -160,118 +154,117 @@ interfaces_Table_get_next_cell_instance(const u32_t* column, struct snmp_obj_id* } static s16_t -interfaces_Table_get_value(struct snmp_node_instance* instance, void* value) +interfaces_Table_get_value(struct snmp_node_instance *instance, void *value) { - struct netif *netif = (struct netif*)instance->reference.ptr; - u32_t* value_u32 = (u32_t*)value; - s32_t* value_s32 = (s32_t*)value; + struct netif *netif = (struct netif *)instance->reference.ptr; + u32_t *value_u32 = (u32_t *)value; + s32_t *value_s32 = (s32_t *)value; u16_t value_len; - switch (SNMP_TABLE_GET_COLUMN_FROM_OID(instance->instance_oid.id)) - { - case 1: /* ifIndex */ - *value_s32 = netif_to_num(netif); - value_len = sizeof(*value_s32); - break; - case 2: /* ifDescr */ - value_len = sizeof(netif->name); - MEMCPY(value, netif->name, value_len); - break; - case 3: /* ifType */ - *value_s32 = netif->link_type; - value_len = sizeof(*value_s32); - break; - case 4: /* ifMtu */ - *value_s32 = netif->mtu; - value_len = sizeof(*value_s32); - break; - case 5: /* ifSpeed */ - *value_u32 = netif->link_speed; - value_len = sizeof(*value_u32); - break; - case 6: /* ifPhysAddress */ - value_len = sizeof(netif->hwaddr); - MEMCPY(value, &netif->hwaddr, value_len); - break; - case 7: /* ifAdminStatus */ - if (netif_is_up(netif)) { - *value_s32 = iftable_ifOperStatus_up; - } else { - *value_s32 = iftable_ifOperStatus_down; - } - value_len = sizeof(*value_s32); - break; - case 8: /* ifOperStatus */ - if (netif_is_up(netif)) { - if (netif_is_link_up(netif)) { - *value_s32 = iftable_ifAdminStatus_up; + switch (SNMP_TABLE_GET_COLUMN_FROM_OID(instance->instance_oid.id)) { + case 1: /* ifIndex */ + *value_s32 = netif_to_num(netif); + value_len = sizeof(*value_s32); + break; + case 2: /* ifDescr */ + value_len = sizeof(netif->name); + MEMCPY(value, netif->name, value_len); + break; + case 3: /* ifType */ + *value_s32 = netif->link_type; + value_len = sizeof(*value_s32); + break; + case 4: /* ifMtu */ + *value_s32 = netif->mtu; + value_len = sizeof(*value_s32); + break; + case 5: /* ifSpeed */ + *value_u32 = netif->link_speed; + value_len = sizeof(*value_u32); + break; + case 6: /* ifPhysAddress */ + value_len = sizeof(netif->hwaddr); + MEMCPY(value, &netif->hwaddr, value_len); + break; + case 7: /* ifAdminStatus */ + if (netif_is_up(netif)) { + *value_s32 = iftable_ifOperStatus_up; } else { - *value_s32 = iftable_ifAdminStatus_lowerLayerDown; + *value_s32 = iftable_ifOperStatus_down; } - } else { - *value_s32 = iftable_ifAdminStatus_down; - } - value_len = sizeof(*value_s32); - break; - case 9: /* ifLastChange */ - *value_u32 = netif->ts; - value_len = sizeof(*value_u32); - break; - case 10: /* ifInOctets */ - *value_u32 = netif->mib2_counters.ifinoctets; - value_len = sizeof(*value_u32); - break; - case 11: /* ifInUcastPkts */ - *value_u32 = netif->mib2_counters.ifinucastpkts; - value_len = sizeof(*value_u32); - break; - case 12: /* ifInNUcastPkts */ - *value_u32 = netif->mib2_counters.ifinnucastpkts; - value_len = sizeof(*value_u32); - break; - case 13: /* ifInDiscards */ - *value_u32 = netif->mib2_counters.ifindiscards; - value_len = sizeof(*value_u32); - break; - case 14: /* ifInErrors */ - *value_u32 = netif->mib2_counters.ifinerrors; - value_len = sizeof(*value_u32); - break; - case 15: /* ifInUnkownProtos */ - *value_u32 = netif->mib2_counters.ifinunknownprotos; - value_len = sizeof(*value_u32); - break; - case 16: /* ifOutOctets */ - *value_u32 = netif->mib2_counters.ifoutoctets; - value_len = sizeof(*value_u32); - break; - case 17: /* ifOutUcastPkts */ - *value_u32 = netif->mib2_counters.ifoutucastpkts; - value_len = sizeof(*value_u32); - break; - case 18: /* ifOutNUcastPkts */ - *value_u32 = netif->mib2_counters.ifoutnucastpkts; - value_len = sizeof(*value_u32); - break; - case 19: /* ifOutDiscarts */ - *value_u32 = netif->mib2_counters.ifoutdiscards; - value_len = sizeof(*value_u32); - break; - case 20: /* ifOutErrors */ - *value_u32 = netif->mib2_counters.ifouterrors; - value_len = sizeof(*value_u32); - break; - case 21: /* ifOutQLen */ - *value_u32 = iftable_ifOutQLen; - value_len = sizeof(*value_u32); - break; - /** @note returning zeroDotZero (0.0) no media specific MIB support */ - case 22: /* ifSpecific */ - value_len = snmp_zero_dot_zero.len * sizeof(u32_t); - MEMCPY(value, snmp_zero_dot_zero.id, value_len); - break; - default: - return 0; + value_len = sizeof(*value_s32); + break; + case 8: /* ifOperStatus */ + if (netif_is_up(netif)) { + if (netif_is_link_up(netif)) { + *value_s32 = iftable_ifAdminStatus_up; + } else { + *value_s32 = iftable_ifAdminStatus_lowerLayerDown; + } + } else { + *value_s32 = iftable_ifAdminStatus_down; + } + value_len = sizeof(*value_s32); + break; + case 9: /* ifLastChange */ + *value_u32 = netif->ts; + value_len = sizeof(*value_u32); + break; + case 10: /* ifInOctets */ + *value_u32 = netif->mib2_counters.ifinoctets; + value_len = sizeof(*value_u32); + break; + case 11: /* ifInUcastPkts */ + *value_u32 = netif->mib2_counters.ifinucastpkts; + value_len = sizeof(*value_u32); + break; + case 12: /* ifInNUcastPkts */ + *value_u32 = netif->mib2_counters.ifinnucastpkts; + value_len = sizeof(*value_u32); + break; + case 13: /* ifInDiscards */ + *value_u32 = netif->mib2_counters.ifindiscards; + value_len = sizeof(*value_u32); + break; + case 14: /* ifInErrors */ + *value_u32 = netif->mib2_counters.ifinerrors; + value_len = sizeof(*value_u32); + break; + case 15: /* ifInUnkownProtos */ + *value_u32 = netif->mib2_counters.ifinunknownprotos; + value_len = sizeof(*value_u32); + break; + case 16: /* ifOutOctets */ + *value_u32 = netif->mib2_counters.ifoutoctets; + value_len = sizeof(*value_u32); + break; + case 17: /* ifOutUcastPkts */ + *value_u32 = netif->mib2_counters.ifoutucastpkts; + value_len = sizeof(*value_u32); + break; + case 18: /* ifOutNUcastPkts */ + *value_u32 = netif->mib2_counters.ifoutnucastpkts; + value_len = sizeof(*value_u32); + break; + case 19: /* ifOutDiscarts */ + *value_u32 = netif->mib2_counters.ifoutdiscards; + value_len = sizeof(*value_u32); + break; + case 20: /* ifOutErrors */ + *value_u32 = netif->mib2_counters.ifouterrors; + value_len = sizeof(*value_u32); + break; + case 21: /* ifOutQLen */ + *value_u32 = iftable_ifOutQLen; + value_len = sizeof(*value_u32); + break; + /** @note returning zeroDotZero (0.0) no media specific MIB support */ + case 22: /* ifSpecific */ + value_len = snmp_zero_dot_zero.len * sizeof(u32_t); + MEMCPY(value, snmp_zero_dot_zero.id, value_len); + break; + default: + return 0; } return value_len; @@ -280,9 +273,9 @@ interfaces_Table_get_value(struct snmp_node_instance* instance, void* value) #if !SNMP_SAFE_REQUESTS static snmp_err_t -interfaces_Table_set_test(struct snmp_node_instance* instance, u16_t len, void *value) +interfaces_Table_set_test(struct snmp_node_instance *instance, u16_t len, void *value) { - s32_t *sint_ptr = (s32_t*)value; + s32_t *sint_ptr = (s32_t *)value; /* stack should never call this method for another column, because all other columns are set to readonly */ @@ -297,10 +290,10 @@ interfaces_Table_set_test(struct snmp_node_instance* instance, u16_t len, void * } static snmp_err_t -interfaces_Table_set_value(struct snmp_node_instance* instance, u16_t len, void *value) +interfaces_Table_set_value(struct snmp_node_instance *instance, u16_t len, void *value) { - struct netif *netif = (struct netif*)instance->reference.ptr; - s32_t *sint_ptr = (s32_t*)value; + struct netif *netif = (struct netif *)instance->reference.ptr; + s32_t *sint_ptr = (s32_t *)value; /* stack should never call this method for another column, because all other columns are set to readonly */ @@ -351,21 +344,21 @@ static const struct snmp_table_col_def interfaces_Table_columns[] = { #if !SNMP_SAFE_REQUESTS static const struct snmp_table_node interfaces_Table = SNMP_TABLE_CREATE( - 2, interfaces_Table_columns, - interfaces_Table_get_cell_instance, interfaces_Table_get_next_cell_instance, - interfaces_Table_get_value, interfaces_Table_set_test, interfaces_Table_set_value); + 2, interfaces_Table_columns, + interfaces_Table_get_cell_instance, interfaces_Table_get_next_cell_instance, + interfaces_Table_get_value, interfaces_Table_set_test, interfaces_Table_set_value); #else static const struct snmp_table_node interfaces_Table = SNMP_TABLE_CREATE( - 2, interfaces_Table_columns, - interfaces_Table_get_cell_instance, interfaces_Table_get_next_cell_instance, - interfaces_Table_get_value, NULL, NULL); + 2, interfaces_Table_columns, + interfaces_Table_get_cell_instance, interfaces_Table_get_next_cell_instance, + interfaces_Table_get_value, NULL, NULL); #endif /* the following nodes access variables in LWIP stack from SNMP worker thread and must therefore be synced to LWIP (TCPIP) thread */ CREATE_LWIP_SYNC_NODE(1, interfaces_Number) CREATE_LWIP_SYNC_NODE(2, interfaces_Table) -static const struct snmp_node* const interface_nodes[] = { +static const struct snmp_node *const interface_nodes[] = { &SYNC_NODE_NAME(interfaces_Number).node.node, &SYNC_NODE_NAME(interfaces_Table).node.node }; diff --git a/Libraries/LwIP/src/apps/snmp/snmp_mib2_ip.c b/Libraries/LwIP/src/apps/snmp/snmp_mib2_ip.c index 35122fc..de10990 100755 --- a/Libraries/LwIP/src/apps/snmp/snmp_mib2_ip.c +++ b/Libraries/LwIP/src/apps/snmp/snmp_mib2_ip.c @@ -59,85 +59,85 @@ /* --- ip .1.3.6.1.2.1.4 ----------------------------------------------------- */ static s16_t -ip_get_value(struct snmp_node_instance* instance, void* value) +ip_get_value(struct snmp_node_instance *instance, void *value) { - s32_t* sint_ptr = (s32_t*)value; - u32_t* uint_ptr = (u32_t*)value; + s32_t *sint_ptr = (s32_t *)value; + u32_t *uint_ptr = (u32_t *)value; switch (instance->node->oid) { - case 1: /* ipForwarding */ + case 1: /* ipForwarding */ #if IP_FORWARD - /* forwarding */ - *sint_ptr = 1; + /* forwarding */ + *sint_ptr = 1; #else - /* not-forwarding */ - *sint_ptr = 2; + /* not-forwarding */ + *sint_ptr = 2; #endif - return sizeof(*sint_ptr); - case 2: /* ipDefaultTTL */ - *sint_ptr = IP_DEFAULT_TTL; - return sizeof(*sint_ptr); - case 3: /* ipInReceives */ - *uint_ptr = STATS_GET(mib2.ipinreceives); - return sizeof(*uint_ptr); - case 4: /* ipInHdrErrors */ - *uint_ptr = STATS_GET(mib2.ipinhdrerrors); - return sizeof(*uint_ptr); - case 5: /* ipInAddrErrors */ - *uint_ptr = STATS_GET(mib2.ipinaddrerrors); - return sizeof(*uint_ptr); - case 6: /* ipForwDatagrams */ - *uint_ptr = STATS_GET(mib2.ipforwdatagrams); - return sizeof(*uint_ptr); - case 7: /* ipInUnknownProtos */ - *uint_ptr = STATS_GET(mib2.ipinunknownprotos); - return sizeof(*uint_ptr); - case 8: /* ipInDiscards */ - *uint_ptr = STATS_GET(mib2.ipindiscards); - return sizeof(*uint_ptr); - case 9: /* ipInDelivers */ - *uint_ptr = STATS_GET(mib2.ipindelivers); - return sizeof(*uint_ptr); - case 10: /* ipOutRequests */ - *uint_ptr = STATS_GET(mib2.ipoutrequests); - return sizeof(*uint_ptr); - case 11: /* ipOutDiscards */ - *uint_ptr = STATS_GET(mib2.ipoutdiscards); - return sizeof(*uint_ptr); - case 12: /* ipOutNoRoutes */ - *uint_ptr = STATS_GET(mib2.ipoutnoroutes); - return sizeof(*uint_ptr); - case 13: /* ipReasmTimeout */ + return sizeof(*sint_ptr); + case 2: /* ipDefaultTTL */ + *sint_ptr = IP_DEFAULT_TTL; + return sizeof(*sint_ptr); + case 3: /* ipInReceives */ + *uint_ptr = STATS_GET(mib2.ipinreceives); + return sizeof(*uint_ptr); + case 4: /* ipInHdrErrors */ + *uint_ptr = STATS_GET(mib2.ipinhdrerrors); + return sizeof(*uint_ptr); + case 5: /* ipInAddrErrors */ + *uint_ptr = STATS_GET(mib2.ipinaddrerrors); + return sizeof(*uint_ptr); + case 6: /* ipForwDatagrams */ + *uint_ptr = STATS_GET(mib2.ipforwdatagrams); + return sizeof(*uint_ptr); + case 7: /* ipInUnknownProtos */ + *uint_ptr = STATS_GET(mib2.ipinunknownprotos); + return sizeof(*uint_ptr); + case 8: /* ipInDiscards */ + *uint_ptr = STATS_GET(mib2.ipindiscards); + return sizeof(*uint_ptr); + case 9: /* ipInDelivers */ + *uint_ptr = STATS_GET(mib2.ipindelivers); + return sizeof(*uint_ptr); + case 10: /* ipOutRequests */ + *uint_ptr = STATS_GET(mib2.ipoutrequests); + return sizeof(*uint_ptr); + case 11: /* ipOutDiscards */ + *uint_ptr = STATS_GET(mib2.ipoutdiscards); + return sizeof(*uint_ptr); + case 12: /* ipOutNoRoutes */ + *uint_ptr = STATS_GET(mib2.ipoutnoroutes); + return sizeof(*uint_ptr); + case 13: /* ipReasmTimeout */ #if IP_REASSEMBLY - *sint_ptr = IP_REASS_MAXAGE; + *sint_ptr = IP_REASS_MAXAGE; #else - *sint_ptr = 0; + *sint_ptr = 0; #endif - return sizeof(*sint_ptr); - case 14: /* ipReasmReqds */ - *uint_ptr = STATS_GET(mib2.ipreasmreqds); - return sizeof(*uint_ptr); - case 15: /* ipReasmOKs */ - *uint_ptr = STATS_GET(mib2.ipreasmoks); - return sizeof(*uint_ptr); - case 16: /* ipReasmFails */ - *uint_ptr = STATS_GET(mib2.ipreasmfails); - return sizeof(*uint_ptr); - case 17: /* ipFragOKs */ - *uint_ptr = STATS_GET(mib2.ipfragoks); - return sizeof(*uint_ptr); - case 18: /* ipFragFails */ - *uint_ptr = STATS_GET(mib2.ipfragfails); - return sizeof(*uint_ptr); - case 19: /* ipFragCreates */ - *uint_ptr = STATS_GET(mib2.ipfragcreates); - return sizeof(*uint_ptr); - case 23: /* ipRoutingDiscards: not supported -> always 0 */ - *uint_ptr = 0; - return sizeof(*uint_ptr); - default: - LWIP_DEBUGF(SNMP_MIB_DEBUG,("ip_get_value(): unknown id: %"S32_F"\n", instance->node->oid)); - break; + return sizeof(*sint_ptr); + case 14: /* ipReasmReqds */ + *uint_ptr = STATS_GET(mib2.ipreasmreqds); + return sizeof(*uint_ptr); + case 15: /* ipReasmOKs */ + *uint_ptr = STATS_GET(mib2.ipreasmoks); + return sizeof(*uint_ptr); + case 16: /* ipReasmFails */ + *uint_ptr = STATS_GET(mib2.ipreasmfails); + return sizeof(*uint_ptr); + case 17: /* ipFragOKs */ + *uint_ptr = STATS_GET(mib2.ipfragoks); + return sizeof(*uint_ptr); + case 18: /* ipFragFails */ + *uint_ptr = STATS_GET(mib2.ipfragfails); + return sizeof(*uint_ptr); + case 19: /* ipFragCreates */ + *uint_ptr = STATS_GET(mib2.ipfragcreates); + return sizeof(*uint_ptr); + case 23: /* ipRoutingDiscards: not supported -> always 0 */ + *uint_ptr = 0; + return sizeof(*uint_ptr); + default: + LWIP_DEBUGF(SNMP_MIB_DEBUG, ("ip_get_value(): unknown id: %"S32_F"\n", instance->node->oid)); + break; } return 0; @@ -154,40 +154,40 @@ ip_get_value(struct snmp_node_instance* instance, void* value) * otherwise return badvalue. */ static snmp_err_t -ip_set_test(struct snmp_node_instance* instance, u16_t len, void *value) +ip_set_test(struct snmp_node_instance *instance, u16_t len, void *value) { snmp_err_t ret = SNMP_ERR_WRONGVALUE; - s32_t *sint_ptr = (s32_t*)value; + s32_t *sint_ptr = (s32_t *)value; LWIP_UNUSED_ARG(len); switch (instance->node->oid) { - case 1: /* ipForwarding */ + case 1: /* ipForwarding */ #if IP_FORWARD - /* forwarding */ - if (*sint_ptr == 1) + /* forwarding */ + if (*sint_ptr == 1) #else - /* not-forwarding */ - if (*sint_ptr == 2) + /* not-forwarding */ + if (*sint_ptr == 2) #endif - { - ret = SNMP_ERR_NOERROR; - } - break; - case 2: /* ipDefaultTTL */ - if (*sint_ptr == IP_DEFAULT_TTL) { - ret = SNMP_ERR_NOERROR; - } - break; - default: - LWIP_DEBUGF(SNMP_MIB_DEBUG,("ip_set_test(): unknown id: %"S32_F"\n", instance->node->oid)); - break; + { + ret = SNMP_ERR_NOERROR; + } + break; + case 2: /* ipDefaultTTL */ + if (*sint_ptr == IP_DEFAULT_TTL) { + ret = SNMP_ERR_NOERROR; + } + break; + default: + LWIP_DEBUGF(SNMP_MIB_DEBUG, ("ip_set_test(): unknown id: %"S32_F"\n", instance->node->oid)); + break; } return ret; } static snmp_err_t -ip_set_value(struct snmp_node_instance* instance, u16_t len, void *value) +ip_set_value(struct snmp_node_instance *instance, u16_t len, void *value) { LWIP_UNUSED_ARG(instance); LWIP_UNUSED_ARG(len); @@ -207,48 +207,48 @@ static const struct snmp_oid_range ip_AddrTable_oid_ranges[] = { }; static snmp_err_t -ip_AddrTable_get_cell_value_core(struct netif *netif, const u32_t* column, union snmp_variant_value* value, u32_t* value_len) +ip_AddrTable_get_cell_value_core(struct netif *netif, const u32_t *column, union snmp_variant_value *value, u32_t *value_len) { LWIP_UNUSED_ARG(value_len); switch (*column) { - case 1: /* ipAdEntAddr */ - value->u32 = netif_ip4_addr(netif)->addr; - break; - case 2: /* ipAdEntIfIndex */ - value->u32 = netif_to_num(netif); - break; - case 3: /* ipAdEntNetMask */ - value->u32 = netif_ip4_netmask(netif)->addr; - break; - case 4: /* ipAdEntBcastAddr */ - /* lwIP oddity, there's no broadcast - address in the netif we can rely on */ - value->u32 = IPADDR_BROADCAST & 1; - break; - case 5: /* ipAdEntReasmMaxSize */ + case 1: /* ipAdEntAddr */ + value->u32 = netif_ip4_addr(netif)->addr; + break; + case 2: /* ipAdEntIfIndex */ + value->u32 = netif_to_num(netif); + break; + case 3: /* ipAdEntNetMask */ + value->u32 = netif_ip4_netmask(netif)->addr; + break; + case 4: /* ipAdEntBcastAddr */ + /* lwIP oddity, there's no broadcast + address in the netif we can rely on */ + value->u32 = IPADDR_BROADCAST & 1; + break; + case 5: /* ipAdEntReasmMaxSize */ #if IP_REASSEMBLY - /* @todo The theoretical maximum is IP_REASS_MAX_PBUFS * size of the pbufs, - * but only if receiving one fragmented packet at a time. - * The current solution is to calculate for 2 simultaneous packets... - */ - value->u32 = (IP_HLEN + ((IP_REASS_MAX_PBUFS/2) * - (PBUF_POOL_BUFSIZE - PBUF_LINK_ENCAPSULATION_HLEN - PBUF_LINK_HLEN - IP_HLEN))); + /* @todo The theoretical maximum is IP_REASS_MAX_PBUFS * size of the pbufs, + * but only if receiving one fragmented packet at a time. + * The current solution is to calculate for 2 simultaneous packets... + */ + value->u32 = (IP_HLEN + ((IP_REASS_MAX_PBUFS / 2) * + (PBUF_POOL_BUFSIZE - PBUF_LINK_ENCAPSULATION_HLEN - PBUF_LINK_HLEN - IP_HLEN))); #else - /** @todo returning MTU would be a bad thing and - returning a wild guess like '576' isn't good either */ - value->u32 = 0; + /** @todo returning MTU would be a bad thing and + returning a wild guess like '576' isn't good either */ + value->u32 = 0; #endif - break; - default: - return SNMP_ERR_NOSUCHINSTANCE; + break; + default: + return SNMP_ERR_NOSUCHINSTANCE; } return SNMP_ERR_NOERROR; } static snmp_err_t -ip_AddrTable_get_cell_value(const u32_t* column, const u32_t* row_oid, u8_t row_oid_len, union snmp_variant_value* value, u32_t* value_len) +ip_AddrTable_get_cell_value(const u32_t *column, const u32_t *row_oid, u8_t row_oid_len, union snmp_variant_value *value, u32_t *value_len) { ip4_addr_t ip; struct netif *netif; @@ -262,14 +262,11 @@ ip_AddrTable_get_cell_value(const u32_t* column, const u32_t* row_oid, u8_t row_ snmp_oid_to_ip4(&row_oid[0], &ip); /* we know it succeeds because of oid_in_range check above */ /* find netif with requested ip */ - netif = netif_list; - while (netif != NULL) { + NETIF_FOREACH(netif) { if (ip4_addr_cmp(&ip, netif_ip4_addr(netif))) { /* fill in object properties */ return ip_AddrTable_get_cell_value_core(netif, column, value, value_len); } - - netif = netif->next; } /* not found */ @@ -277,7 +274,7 @@ ip_AddrTable_get_cell_value(const u32_t* column, const u32_t* row_oid, u8_t row_ } static snmp_err_t -ip_AddrTable_get_next_cell_instance_and_value(const u32_t* column, struct snmp_obj_id* row_oid, union snmp_variant_value* value, u32_t* value_len) +ip_AddrTable_get_next_cell_instance_and_value(const u32_t *column, struct snmp_obj_id *row_oid, union snmp_variant_value *value, u32_t *value_len) { struct netif *netif; struct snmp_next_oid_state state; @@ -287,22 +284,19 @@ ip_AddrTable_get_next_cell_instance_and_value(const u32_t* column, struct snmp_o snmp_next_oid_init(&state, row_oid->id, row_oid->len, result_temp, LWIP_ARRAYSIZE(ip_AddrTable_oid_ranges)); /* iterate over all possible OIDs to find the next one */ - netif = netif_list; - while (netif != NULL) { + NETIF_FOREACH(netif) { u32_t test_oid[LWIP_ARRAYSIZE(ip_AddrTable_oid_ranges)]; snmp_ip4_to_oid(netif_ip4_addr(netif), &test_oid[0]); /* check generated OID: is it a candidate for the next one? */ snmp_next_oid_check(&state, test_oid, LWIP_ARRAYSIZE(ip_AddrTable_oid_ranges), netif); - - netif = netif->next; } /* did we find a next one? */ if (state.status == SNMP_NEXT_OID_STATUS_SUCCESS) { snmp_oid_assign(row_oid, state.next_oid, state.next_oid_len); /* fill in object properties */ - return ip_AddrTable_get_cell_value_core((struct netif*)state.reference, column, value, value_len); + return ip_AddrTable_get_cell_value_core((struct netif *)state.reference, column, value, value_len); } /* not found */ @@ -320,86 +314,86 @@ static const struct snmp_oid_range ip_RouteTable_oid_ranges[] = { }; static snmp_err_t -ip_RouteTable_get_cell_value_core(struct netif *netif, u8_t default_route, const u32_t* column, union snmp_variant_value* value, u32_t* value_len) +ip_RouteTable_get_cell_value_core(struct netif *netif, u8_t default_route, const u32_t *column, union snmp_variant_value *value, u32_t *value_len) { switch (*column) { - case 1: /* ipRouteDest */ - if (default_route) { - /* default rte has 0.0.0.0 dest */ - value->u32 = IP4_ADDR_ANY4->addr; - } else { - /* netifs have netaddress dest */ - ip4_addr_t tmp; - ip4_addr_get_network(&tmp, netif_ip4_addr(netif), netif_ip4_netmask(netif)); - value->u32 = tmp.addr; - } - break; - case 2: /* ipRouteIfIndex */ - value->u32 = netif_to_num(netif); - break; - case 3: /* ipRouteMetric1 */ - if (default_route) { - value->s32 = 1; /* default */ - } else { - value->s32 = 0; /* normal */ - } - break; - case 4: /* ipRouteMetric2 */ - case 5: /* ipRouteMetric3 */ - case 6: /* ipRouteMetric4 */ - value->s32 = -1; /* none */ - break; - case 7: /* ipRouteNextHop */ - if (default_route) { - /* default rte: gateway */ - value->u32 = netif_ip4_gw(netif)->addr; - } else { - /* other rtes: netif ip_addr */ - value->u32 = netif_ip4_addr(netif)->addr; - } - break; - case 8: /* ipRouteType */ - if (default_route) { - /* default rte is indirect */ - value->u32 = 4; /* indirect */ - } else { - /* other rtes are direct */ - value->u32 = 3; /* direct */ - } - break; - case 9: /* ipRouteProto */ - /* locally defined routes */ - value->u32 = 2; /* local */ - break; - case 10: /* ipRouteAge */ - /* @todo (sysuptime - timestamp last change) / 100 */ - value->u32 = 0; - break; - case 11: /* ipRouteMask */ - if (default_route) { - /* default rte use 0.0.0.0 mask */ - value->u32 = IP4_ADDR_ANY4->addr; - } else { - /* other rtes use netmask */ - value->u32 = netif_ip4_netmask(netif)->addr; - } - break; - case 12: /* ipRouteMetric5 */ - value->s32 = -1; /* none */ - break; - case 13: /* ipRouteInfo */ - value->const_ptr = snmp_zero_dot_zero.id; - *value_len = snmp_zero_dot_zero.len * sizeof(u32_t); - break; - default: - return SNMP_ERR_NOSUCHINSTANCE; + case 1: /* ipRouteDest */ + if (default_route) { + /* default rte has 0.0.0.0 dest */ + value->u32 = IP4_ADDR_ANY4->addr; + } else { + /* netifs have netaddress dest */ + ip4_addr_t tmp; + ip4_addr_get_network(&tmp, netif_ip4_addr(netif), netif_ip4_netmask(netif)); + value->u32 = tmp.addr; + } + break; + case 2: /* ipRouteIfIndex */ + value->u32 = netif_to_num(netif); + break; + case 3: /* ipRouteMetric1 */ + if (default_route) { + value->s32 = 1; /* default */ + } else { + value->s32 = 0; /* normal */ + } + break; + case 4: /* ipRouteMetric2 */ + case 5: /* ipRouteMetric3 */ + case 6: /* ipRouteMetric4 */ + value->s32 = -1; /* none */ + break; + case 7: /* ipRouteNextHop */ + if (default_route) { + /* default rte: gateway */ + value->u32 = netif_ip4_gw(netif)->addr; + } else { + /* other rtes: netif ip_addr */ + value->u32 = netif_ip4_addr(netif)->addr; + } + break; + case 8: /* ipRouteType */ + if (default_route) { + /* default rte is indirect */ + value->u32 = 4; /* indirect */ + } else { + /* other rtes are direct */ + value->u32 = 3; /* direct */ + } + break; + case 9: /* ipRouteProto */ + /* locally defined routes */ + value->u32 = 2; /* local */ + break; + case 10: /* ipRouteAge */ + /* @todo (sysuptime - timestamp last change) / 100 */ + value->u32 = 0; + break; + case 11: /* ipRouteMask */ + if (default_route) { + /* default rte use 0.0.0.0 mask */ + value->u32 = IP4_ADDR_ANY4->addr; + } else { + /* other rtes use netmask */ + value->u32 = netif_ip4_netmask(netif)->addr; + } + break; + case 12: /* ipRouteMetric5 */ + value->s32 = -1; /* none */ + break; + case 13: /* ipRouteInfo */ + value->const_ptr = snmp_zero_dot_zero.id; + *value_len = snmp_zero_dot_zero.len * sizeof(u32_t); + break; + default: + return SNMP_ERR_NOSUCHINSTANCE; } return SNMP_ERR_NOERROR; } static snmp_err_t -ip_RouteTable_get_cell_value(const u32_t* column, const u32_t* row_oid, u8_t row_oid_len, union snmp_variant_value* value, u32_t* value_len) +ip_RouteTable_get_cell_value(const u32_t *column, const u32_t *row_oid, u8_t row_oid_len, union snmp_variant_value *value, u32_t *value_len) { ip4_addr_t test_ip; struct netif *netif; @@ -419,8 +413,7 @@ ip_RouteTable_get_cell_value(const u32_t* column, const u32_t* row_oid, u8_t row } /* find netif with requested route */ - netif = netif_list; - while (netif != NULL) { + NETIF_FOREACH(netif) { ip4_addr_t dst; ip4_addr_get_network(&dst, netif_ip4_addr(netif), netif_ip4_netmask(netif)); @@ -428,8 +421,6 @@ ip_RouteTable_get_cell_value(const u32_t* column, const u32_t* row_oid, u8_t row /* fill in object properties */ return ip_RouteTable_get_cell_value_core(netif, 0, column, value, value_len); } - - netif = netif->next; } /* not found */ @@ -437,7 +428,7 @@ ip_RouteTable_get_cell_value(const u32_t* column, const u32_t* row_oid, u8_t row } static snmp_err_t -ip_RouteTable_get_next_cell_instance_and_value(const u32_t* column, struct snmp_obj_id* row_oid, union snmp_variant_value* value, u32_t* value_len) +ip_RouteTable_get_next_cell_instance_and_value(const u32_t *column, struct snmp_obj_id *row_oid, union snmp_variant_value *value, u32_t *value_len) { struct netif *netif; struct snmp_next_oid_state state; @@ -454,8 +445,7 @@ ip_RouteTable_get_next_cell_instance_and_value(const u32_t* column, struct snmp_ } /* iterate over all possible OIDs to find the next one */ - netif = netif_list; - while (netif != NULL) { + NETIF_FOREACH(netif) { ip4_addr_t dst; ip4_addr_get_network(&dst, netif_ip4_addr(netif), netif_ip4_netmask(netif)); @@ -464,8 +454,6 @@ ip_RouteTable_get_next_cell_instance_and_value(const u32_t* column, struct snmp_ snmp_ip4_to_oid(&dst, &test_oid[0]); snmp_next_oid_check(&state, test_oid, LWIP_ARRAYSIZE(ip_RouteTable_oid_ranges), netif); } - - netif = netif->next; } /* did we find a next one? */ @@ -474,7 +462,7 @@ ip_RouteTable_get_next_cell_instance_and_value(const u32_t* column, struct snmp_ snmp_oid_to_ip4(&result_temp[0], &dst); snmp_oid_assign(row_oid, state.next_oid, state.next_oid_len); /* fill in object properties */ - return ip_RouteTable_get_cell_value_core((struct netif*)state.reference, ip4_addr_isany_val(dst), column, value, value_len); + return ip_RouteTable_get_cell_value_core((struct netif *)state.reference, ip4_addr_isany_val(dst), column, value, value_len); } else { /* not found */ return SNMP_ERR_NOSUCHINSTANCE; @@ -494,7 +482,7 @@ static const struct snmp_oid_range ip_NetToMediaTable_oid_ranges[] = { }; static snmp_err_t -ip_NetToMediaTable_get_cell_value_core(u8_t arp_table_index, const u32_t* column, union snmp_variant_value* value, u32_t* value_len) +ip_NetToMediaTable_get_cell_value_core(size_t arp_table_index, const u32_t *column, union snmp_variant_value *value, u32_t *value_len) { ip4_addr_t *ip; struct netif *netif; @@ -504,32 +492,32 @@ ip_NetToMediaTable_get_cell_value_core(u8_t arp_table_index, const u32_t* column /* value */ switch (*column) { - case 1: /* atIfIndex / ipNetToMediaIfIndex */ - value->u32 = netif_to_num(netif); - break; - case 2: /* atPhysAddress / ipNetToMediaPhysAddress */ - value->ptr = ethaddr; - *value_len = sizeof(*ethaddr); - break; - case 3: /* atNetAddress / ipNetToMediaNetAddress */ - value->u32 = ip->addr; - break; - case 4: /* ipNetToMediaType */ - value->u32 = 3; /* dynamic*/ - break; - default: - return SNMP_ERR_NOSUCHINSTANCE; + case 1: /* atIfIndex / ipNetToMediaIfIndex */ + value->u32 = netif_to_num(netif); + break; + case 2: /* atPhysAddress / ipNetToMediaPhysAddress */ + value->ptr = ethaddr; + *value_len = sizeof(*ethaddr); + break; + case 3: /* atNetAddress / ipNetToMediaNetAddress */ + value->u32 = ip->addr; + break; + case 4: /* ipNetToMediaType */ + value->u32 = 3; /* dynamic*/ + break; + default: + return SNMP_ERR_NOSUCHINSTANCE; } return SNMP_ERR_NOERROR; } static snmp_err_t -ip_NetToMediaTable_get_cell_value(const u32_t* column, const u32_t* row_oid, u8_t row_oid_len, union snmp_variant_value* value, u32_t* value_len) +ip_NetToMediaTable_get_cell_value(const u32_t *column, const u32_t *row_oid, u8_t row_oid_len, union snmp_variant_value *value, u32_t *value_len) { ip4_addr_t ip_in; u8_t netif_index; - u8_t i; + size_t i; /* check if incoming OID length and if values are in plausible range */ if (!snmp_oid_in_range(row_oid, row_oid_len, ip_NetToMediaTable_oid_ranges, LWIP_ARRAYSIZE(ip_NetToMediaTable_oid_ranges))) { @@ -541,7 +529,7 @@ ip_NetToMediaTable_get_cell_value(const u32_t* column, const u32_t* row_oid, u8_ snmp_oid_to_ip4(&row_oid[1], &ip_in); /* we know it succeeds because of oid_in_range check above */ /* find requested entry */ - for (i=0; iid, row_oid->len, result_temp, LWIP_ARRAYSIZE(ip_NetToMediaTable_oid_ranges)); /* iterate over all possible OIDs to find the next one */ - for (i=0; ioid) { - case 1: /* snmpInPkts */ - *uint_ptr = snmp_stats.inpkts; - break; - case 2: /* snmpOutPkts */ - *uint_ptr = snmp_stats.outpkts; - break; - case 3: /* snmpInBadVersions */ - *uint_ptr = snmp_stats.inbadversions; - break; - case 4: /* snmpInBadCommunityNames */ - *uint_ptr = snmp_stats.inbadcommunitynames; - break; - case 5: /* snmpInBadCommunityUses */ - *uint_ptr = snmp_stats.inbadcommunityuses; - break; - case 6: /* snmpInASNParseErrs */ - *uint_ptr = snmp_stats.inasnparseerrs; - break; - case 8: /* snmpInTooBigs */ - *uint_ptr = snmp_stats.intoobigs; - break; - case 9: /* snmpInNoSuchNames */ - *uint_ptr = snmp_stats.innosuchnames; - break; - case 10: /* snmpInBadValues */ - *uint_ptr = snmp_stats.inbadvalues; - break; - case 11: /* snmpInReadOnlys */ - *uint_ptr = snmp_stats.inreadonlys; - break; - case 12: /* snmpInGenErrs */ - *uint_ptr = snmp_stats.ingenerrs; - break; - case 13: /* snmpInTotalReqVars */ - *uint_ptr = snmp_stats.intotalreqvars; - break; - case 14: /* snmpInTotalSetVars */ - *uint_ptr = snmp_stats.intotalsetvars; - break; - case 15: /* snmpInGetRequests */ - *uint_ptr = snmp_stats.ingetrequests; - break; - case 16: /* snmpInGetNexts */ - *uint_ptr = snmp_stats.ingetnexts; - break; - case 17: /* snmpInSetRequests */ - *uint_ptr = snmp_stats.insetrequests; - break; - case 18: /* snmpInGetResponses */ - *uint_ptr = snmp_stats.ingetresponses; - break; - case 19: /* snmpInTraps */ - *uint_ptr = snmp_stats.intraps; - break; - case 20: /* snmpOutTooBigs */ - *uint_ptr = snmp_stats.outtoobigs; - break; - case 21: /* snmpOutNoSuchNames */ - *uint_ptr = snmp_stats.outnosuchnames; - break; - case 22: /* snmpOutBadValues */ - *uint_ptr = snmp_stats.outbadvalues; - break; - case 24: /* snmpOutGenErrs */ - *uint_ptr = snmp_stats.outgenerrs; - break; - case 25: /* snmpOutGetRequests */ - *uint_ptr = snmp_stats.outgetrequests; - break; - case 26: /* snmpOutGetNexts */ - *uint_ptr = snmp_stats.outgetnexts; - break; - case 27: /* snmpOutSetRequests */ - *uint_ptr = snmp_stats.outsetrequests; - break; - case 28: /* snmpOutGetResponses */ - *uint_ptr = snmp_stats.outgetresponses; - break; - case 29: /* snmpOutTraps */ - *uint_ptr = snmp_stats.outtraps; - break; - case 30: /* snmpEnableAuthenTraps */ - if (snmp_get_auth_traps_enabled() == SNMP_AUTH_TRAPS_DISABLED) { - *uint_ptr = MIB2_AUTH_TRAPS_DISABLED; - } else { - *uint_ptr = MIB2_AUTH_TRAPS_ENABLED; - } - break; - case 31: /* snmpSilentDrops */ - *uint_ptr = 0; /* not supported */ - break; - case 32: /* snmpProxyDrops */ - *uint_ptr = 0; /* not supported */ - break; - default: - LWIP_DEBUGF(SNMP_MIB_DEBUG,("snmp_get_value(): unknown id: %"S32_F"\n", node->oid)); - return 0; + case 1: /* snmpInPkts */ + *uint_ptr = snmp_stats.inpkts; + break; + case 2: /* snmpOutPkts */ + *uint_ptr = snmp_stats.outpkts; + break; + case 3: /* snmpInBadVersions */ + *uint_ptr = snmp_stats.inbadversions; + break; + case 4: /* snmpInBadCommunityNames */ + *uint_ptr = snmp_stats.inbadcommunitynames; + break; + case 5: /* snmpInBadCommunityUses */ + *uint_ptr = snmp_stats.inbadcommunityuses; + break; + case 6: /* snmpInASNParseErrs */ + *uint_ptr = snmp_stats.inasnparseerrs; + break; + case 8: /* snmpInTooBigs */ + *uint_ptr = snmp_stats.intoobigs; + break; + case 9: /* snmpInNoSuchNames */ + *uint_ptr = snmp_stats.innosuchnames; + break; + case 10: /* snmpInBadValues */ + *uint_ptr = snmp_stats.inbadvalues; + break; + case 11: /* snmpInReadOnlys */ + *uint_ptr = snmp_stats.inreadonlys; + break; + case 12: /* snmpInGenErrs */ + *uint_ptr = snmp_stats.ingenerrs; + break; + case 13: /* snmpInTotalReqVars */ + *uint_ptr = snmp_stats.intotalreqvars; + break; + case 14: /* snmpInTotalSetVars */ + *uint_ptr = snmp_stats.intotalsetvars; + break; + case 15: /* snmpInGetRequests */ + *uint_ptr = snmp_stats.ingetrequests; + break; + case 16: /* snmpInGetNexts */ + *uint_ptr = snmp_stats.ingetnexts; + break; + case 17: /* snmpInSetRequests */ + *uint_ptr = snmp_stats.insetrequests; + break; + case 18: /* snmpInGetResponses */ + *uint_ptr = snmp_stats.ingetresponses; + break; + case 19: /* snmpInTraps */ + *uint_ptr = snmp_stats.intraps; + break; + case 20: /* snmpOutTooBigs */ + *uint_ptr = snmp_stats.outtoobigs; + break; + case 21: /* snmpOutNoSuchNames */ + *uint_ptr = snmp_stats.outnosuchnames; + break; + case 22: /* snmpOutBadValues */ + *uint_ptr = snmp_stats.outbadvalues; + break; + case 24: /* snmpOutGenErrs */ + *uint_ptr = snmp_stats.outgenerrs; + break; + case 25: /* snmpOutGetRequests */ + *uint_ptr = snmp_stats.outgetrequests; + break; + case 26: /* snmpOutGetNexts */ + *uint_ptr = snmp_stats.outgetnexts; + break; + case 27: /* snmpOutSetRequests */ + *uint_ptr = snmp_stats.outsetrequests; + break; + case 28: /* snmpOutGetResponses */ + *uint_ptr = snmp_stats.outgetresponses; + break; + case 29: /* snmpOutTraps */ + *uint_ptr = snmp_stats.outtraps; + break; + case 30: /* snmpEnableAuthenTraps */ + if (snmp_get_auth_traps_enabled() == SNMP_AUTH_TRAPS_DISABLED) { + *uint_ptr = MIB2_AUTH_TRAPS_DISABLED; + } else { + *uint_ptr = MIB2_AUTH_TRAPS_ENABLED; + } + break; + case 31: /* snmpSilentDrops */ + *uint_ptr = 0; /* not supported */ + break; + case 32: /* snmpProxyDrops */ + *uint_ptr = 0; /* not supported */ + break; + default: + LWIP_DEBUGF(SNMP_MIB_DEBUG, ("snmp_get_value(): unknown id: %"S32_F"\n", node->oid)); + return 0; } return sizeof(*uint_ptr); @@ -160,7 +160,7 @@ snmp_set_test(const struct snmp_scalar_array_node_def *node, u16_t len, void *va if (node->oid == 30) { /* snmpEnableAuthenTraps */ - s32_t *sint_ptr = (s32_t*)value; + s32_t *sint_ptr = (s32_t *)value; /* we should have writable non-volatile mem here */ if ((*sint_ptr == MIB2_AUTH_TRAPS_DISABLED) || (*sint_ptr == MIB2_AUTH_TRAPS_ENABLED)) { @@ -177,7 +177,7 @@ snmp_set_value(const struct snmp_scalar_array_node_def *node, u16_t len, void *v if (node->oid == 30) { /* snmpEnableAuthenTraps */ - s32_t *sint_ptr = (s32_t*)value; + s32_t *sint_ptr = (s32_t *)value; if (*sint_ptr == MIB2_AUTH_TRAPS_DISABLED) { snmp_set_auth_traps_enabled(SNMP_AUTH_TRAPS_DISABLED); } else { diff --git a/Libraries/LwIP/src/apps/snmp/snmp_mib2_system.c b/Libraries/LwIP/src/apps/snmp/snmp_mib2_system.c index 4aa2926..ce28892 100755 --- a/Libraries/LwIP/src/apps/snmp/snmp_mib2_system.c +++ b/Libraries/LwIP/src/apps/snmp/snmp_mib2_system.c @@ -58,31 +58,31 @@ /** mib-2.system.sysDescr */ static const u8_t sysdescr_default[] = SNMP_LWIP_MIB2_SYSDESC; -static const u8_t* sysdescr = sysdescr_default; -static const u16_t* sysdescr_len = NULL; /* use strlen for determining len */ +static const u8_t *sysdescr = sysdescr_default; +static const u16_t *sysdescr_len = NULL; /* use strlen for determining len */ /** mib-2.system.sysContact */ static const u8_t syscontact_default[] = SNMP_LWIP_MIB2_SYSCONTACT; -static const u8_t* syscontact = syscontact_default; -static const u16_t* syscontact_len = NULL; /* use strlen for determining len */ -static u8_t* syscontact_wr = NULL; /* if writable, points to the same buffer as syscontact (required for correct constness) */ -static u16_t* syscontact_wr_len = NULL; /* if writable, points to the same buffer as syscontact_len (required for correct constness) */ +static const u8_t *syscontact = syscontact_default; +static const u16_t *syscontact_len = NULL; /* use strlen for determining len */ +static u8_t *syscontact_wr = NULL; /* if writable, points to the same buffer as syscontact (required for correct constness) */ +static u16_t *syscontact_wr_len = NULL; /* if writable, points to the same buffer as syscontact_len (required for correct constness) */ static u16_t syscontact_bufsize = 0; /* 0=not writable */ /** mib-2.system.sysName */ static const u8_t sysname_default[] = SNMP_LWIP_MIB2_SYSNAME; -static const u8_t* sysname = sysname_default; -static const u16_t* sysname_len = NULL; /* use strlen for determining len */ -static u8_t* sysname_wr = NULL; /* if writable, points to the same buffer as sysname (required for correct constness) */ -static u16_t* sysname_wr_len = NULL; /* if writable, points to the same buffer as sysname_len (required for correct constness) */ +static const u8_t *sysname = sysname_default; +static const u16_t *sysname_len = NULL; /* use strlen for determining len */ +static u8_t *sysname_wr = NULL; /* if writable, points to the same buffer as sysname (required for correct constness) */ +static u16_t *sysname_wr_len = NULL; /* if writable, points to the same buffer as sysname_len (required for correct constness) */ static u16_t sysname_bufsize = 0; /* 0=not writable */ /** mib-2.system.sysLocation */ static const u8_t syslocation_default[] = SNMP_LWIP_MIB2_SYSLOCATION; -static const u8_t* syslocation = syslocation_default; -static const u16_t* syslocation_len = NULL; /* use strlen for determining len */ -static u8_t* syslocation_wr = NULL; /* if writable, points to the same buffer as syslocation (required for correct constness) */ -static u16_t* syslocation_wr_len = NULL; /* if writable, points to the same buffer as syslocation_len (required for correct constness) */ +static const u8_t *syslocation = syslocation_default; +static const u16_t *syslocation_len = NULL; /* use strlen for determining len */ +static u8_t *syslocation_wr = NULL; /* if writable, points to the same buffer as syslocation (required for correct constness) */ +static u16_t *syslocation_wr_len = NULL; /* if writable, points to the same buffer as syslocation_len (required for correct constness) */ static u16_t syslocation_bufsize = 0; /* 0=not writable */ /** @@ -229,48 +229,47 @@ snmp_mib2_set_syslocation_readonly(const u8_t *ocstr, const u16_t *ocstrlen) static s16_t system_get_value(const struct snmp_scalar_array_node_def *node, void *value) { - const u8_t* var = NULL; - const s16_t* var_len; + const u8_t *var = NULL; + const s16_t *var_len; u16_t result; switch (node->oid) { - case 1: /* sysDescr */ - var = sysdescr; - var_len = (const s16_t*)sysdescr_len; - break; - case 2: /* sysObjectID */ - { - const struct snmp_obj_id* dev_enterprise_oid = snmp_get_device_enterprise_oid(); + case 1: /* sysDescr */ + var = sysdescr; + var_len = (const s16_t *)sysdescr_len; + break; + case 2: { /* sysObjectID */ + const struct snmp_obj_id *dev_enterprise_oid = snmp_get_device_enterprise_oid(); MEMCPY(value, dev_enterprise_oid->id, dev_enterprise_oid->len * sizeof(u32_t)); return dev_enterprise_oid->len * sizeof(u32_t); } - case 3: /* sysUpTime */ - MIB2_COPY_SYSUPTIME_TO((u32_t*)value); - return sizeof(u32_t); - case 4: /* sysContact */ - var = syscontact; - var_len = (const s16_t*)syscontact_len; - break; - case 5: /* sysName */ - var = sysname; - var_len = (const s16_t*)sysname_len; - break; - case 6: /* sysLocation */ - var = syslocation; - var_len = (const s16_t*)syslocation_len; - break; - case 7: /* sysServices */ - *(s32_t*)value = SNMP_SYSSERVICES; - return sizeof(s32_t); - default: - LWIP_DEBUGF(SNMP_MIB_DEBUG,("system_get_value(): unknown id: %"S32_F"\n", node->oid)); - return 0; + case 3: /* sysUpTime */ + MIB2_COPY_SYSUPTIME_TO((u32_t *)value); + return sizeof(u32_t); + case 4: /* sysContact */ + var = syscontact; + var_len = (const s16_t *)syscontact_len; + break; + case 5: /* sysName */ + var = sysname; + var_len = (const s16_t *)sysname_len; + break; + case 6: /* sysLocation */ + var = syslocation; + var_len = (const s16_t *)syslocation_len; + break; + case 7: /* sysServices */ + *(s32_t *)value = SNMP_SYSSERVICES; + return sizeof(s32_t); + default: + LWIP_DEBUGF(SNMP_MIB_DEBUG, ("system_get_value(): unknown id: %"S32_F"\n", node->oid)); + return 0; } /* handle string values (OID 1,4,5 and 6) */ LWIP_ASSERT("", (value != NULL)); if (var_len == NULL) { - result = (s16_t)strlen((const char*)var); + result = (s16_t)strlen((const char *)var); } else { result = *var_len; } @@ -282,27 +281,27 @@ static snmp_err_t system_set_test(const struct snmp_scalar_array_node_def *node, u16_t len, void *value) { snmp_err_t ret = SNMP_ERR_WRONGVALUE; - const u16_t* var_bufsize = NULL; - const u16_t* var_wr_len; + const u16_t *var_bufsize = NULL; + const u16_t *var_wr_len; LWIP_UNUSED_ARG(value); switch (node->oid) { - case 4: /* sysContact */ - var_bufsize = &syscontact_bufsize; - var_wr_len = syscontact_wr_len; - break; - case 5: /* sysName */ - var_bufsize = &sysname_bufsize; - var_wr_len = sysname_wr_len; - break; - case 6: /* sysLocation */ - var_bufsize = &syslocation_bufsize; - var_wr_len = syslocation_wr_len; - break; - default: - LWIP_DEBUGF(SNMP_MIB_DEBUG,("system_set_test(): unknown id: %"S32_F"\n", node->oid)); - return ret; + case 4: /* sysContact */ + var_bufsize = &syscontact_bufsize; + var_wr_len = syscontact_wr_len; + break; + case 5: /* sysName */ + var_bufsize = &sysname_bufsize; + var_wr_len = sysname_wr_len; + break; + case 6: /* sysLocation */ + var_bufsize = &syslocation_bufsize; + var_wr_len = syslocation_wr_len; + break; + default: + LWIP_DEBUGF(SNMP_MIB_DEBUG, ("system_set_test(): unknown id: %"S32_F"\n", node->oid)); + return ret; } /* check if value is writable at all */ @@ -327,31 +326,31 @@ system_set_test(const struct snmp_scalar_array_node_def *node, u16_t len, void * static snmp_err_t system_set_value(const struct snmp_scalar_array_node_def *node, u16_t len, void *value) { - u8_t* var_wr = NULL; - u16_t* var_wr_len; + u8_t *var_wr = NULL; + u16_t *var_wr_len; switch (node->oid) { - case 4: /* sysContact */ - var_wr = syscontact_wr; - var_wr_len = syscontact_wr_len; - break; - case 5: /* sysName */ - var_wr = sysname_wr; - var_wr_len = sysname_wr_len; - break; - case 6: /* sysLocation */ - var_wr = syslocation_wr; - var_wr_len = syslocation_wr_len; - break; - default: - LWIP_DEBUGF(SNMP_MIB_DEBUG,("system_set_value(): unknown id: %"S32_F"\n", node->oid)); - return SNMP_ERR_GENERROR; + case 4: /* sysContact */ + var_wr = syscontact_wr; + var_wr_len = syscontact_wr_len; + break; + case 5: /* sysName */ + var_wr = sysname_wr; + var_wr_len = sysname_wr_len; + break; + case 6: /* sysLocation */ + var_wr = syslocation_wr; + var_wr_len = syslocation_wr_len; + break; + default: + LWIP_DEBUGF(SNMP_MIB_DEBUG, ("system_set_value(): unknown id: %"S32_F"\n", node->oid)); + return SNMP_ERR_GENERROR; } /* no need to check size of target buffer, this was already done in set_test method */ LWIP_ASSERT("", var_wr != NULL); MEMCPY(var_wr, value, len); - + if (var_wr_len == NULL) { /* add terminating 0 */ var_wr[len] = 0; diff --git a/Libraries/LwIP/src/apps/snmp/snmp_mib2_tcp.c b/Libraries/LwIP/src/apps/snmp/snmp_mib2_tcp.c index 4a66b95..61cf2db 100755 --- a/Libraries/LwIP/src/apps/snmp/snmp_mib2_tcp.c +++ b/Libraries/LwIP/src/apps/snmp/snmp_mib2_tcp.c @@ -59,42 +59,41 @@ /* --- tcp .1.3.6.1.2.1.6 ----------------------------------------------------- */ static s16_t -tcp_get_value(struct snmp_node_instance* instance, void* value) +tcp_get_value(struct snmp_node_instance *instance, void *value) { - u32_t *uint_ptr = (u32_t*)value; - s32_t *sint_ptr = (s32_t*)value; + u32_t *uint_ptr = (u32_t *)value; + s32_t *sint_ptr = (s32_t *)value; switch (instance->node->oid) { - case 1: /* tcpRtoAlgorithm, vanj(4) */ - *sint_ptr = 4; - return sizeof(*sint_ptr); - case 2: /* tcpRtoMin */ - /* @todo not the actual value, a guess, - needs to be calculated */ - *sint_ptr = 1000; - return sizeof(*sint_ptr); - case 3: /* tcpRtoMax */ - /* @todo not the actual value, a guess, - needs to be calculated */ - *sint_ptr = 60000; - return sizeof(*sint_ptr); - case 4: /* tcpMaxConn */ - *sint_ptr = MEMP_NUM_TCP_PCB; - return sizeof(*sint_ptr); - case 5: /* tcpActiveOpens */ - *uint_ptr = STATS_GET(mib2.tcpactiveopens); - return sizeof(*uint_ptr); - case 6: /* tcpPassiveOpens */ - *uint_ptr = STATS_GET(mib2.tcppassiveopens); - return sizeof(*uint_ptr); - case 7: /* tcpAttemptFails */ - *uint_ptr = STATS_GET(mib2.tcpattemptfails); - return sizeof(*uint_ptr); - case 8: /* tcpEstabResets */ - *uint_ptr = STATS_GET(mib2.tcpestabresets); - return sizeof(*uint_ptr); - case 9: /* tcpCurrEstab */ - { + case 1: /* tcpRtoAlgorithm, vanj(4) */ + *sint_ptr = 4; + return sizeof(*sint_ptr); + case 2: /* tcpRtoMin */ + /* @todo not the actual value, a guess, + needs to be calculated */ + *sint_ptr = 1000; + return sizeof(*sint_ptr); + case 3: /* tcpRtoMax */ + /* @todo not the actual value, a guess, + needs to be calculated */ + *sint_ptr = 60000; + return sizeof(*sint_ptr); + case 4: /* tcpMaxConn */ + *sint_ptr = MEMP_NUM_TCP_PCB; + return sizeof(*sint_ptr); + case 5: /* tcpActiveOpens */ + *uint_ptr = STATS_GET(mib2.tcpactiveopens); + return sizeof(*uint_ptr); + case 6: /* tcpPassiveOpens */ + *uint_ptr = STATS_GET(mib2.tcppassiveopens); + return sizeof(*uint_ptr); + case 7: /* tcpAttemptFails */ + *uint_ptr = STATS_GET(mib2.tcpattemptfails); + return sizeof(*uint_ptr); + case 8: /* tcpEstabResets */ + *uint_ptr = STATS_GET(mib2.tcpestabresets); + return sizeof(*uint_ptr); + case 9: { /* tcpCurrEstab */ u16_t tcpcurrestab = 0; struct tcp_pcb *pcb = tcp_active_pcbs; while (pcb != NULL) { @@ -107,30 +106,38 @@ tcp_get_value(struct snmp_node_instance* instance, void* value) *uint_ptr = tcpcurrestab; } return sizeof(*uint_ptr); - case 10: /* tcpInSegs */ - *uint_ptr = STATS_GET(mib2.tcpinsegs); - return sizeof(*uint_ptr); - case 11: /* tcpOutSegs */ - *uint_ptr = STATS_GET(mib2.tcpoutsegs); - return sizeof(*uint_ptr); - case 12: /* tcpRetransSegs */ - *uint_ptr = STATS_GET(mib2.tcpretranssegs); - return sizeof(*uint_ptr); - case 14: /* tcpInErrs */ - *uint_ptr = STATS_GET(mib2.tcpinerrs); - return sizeof(*uint_ptr); - case 15: /* tcpOutRsts */ - *uint_ptr = STATS_GET(mib2.tcpoutrsts); - return sizeof(*uint_ptr); - case 17: /* tcpHCInSegs */ - memset(value, 0, 2*sizeof(u32_t)); /* not supported */ - return 2*sizeof(u32_t); - case 18: /* tcpHCOutSegs */ - memset(value, 0, 2*sizeof(u32_t)); /* not supported */ - return 2*sizeof(u32_t); - default: - LWIP_DEBUGF(SNMP_MIB_DEBUG,("tcp_get_value(): unknown id: %"S32_F"\n", instance->node->oid)); - break; + case 10: /* tcpInSegs */ + *uint_ptr = STATS_GET(mib2.tcpinsegs); + return sizeof(*uint_ptr); + case 11: /* tcpOutSegs */ + *uint_ptr = STATS_GET(mib2.tcpoutsegs); + return sizeof(*uint_ptr); + case 12: /* tcpRetransSegs */ + *uint_ptr = STATS_GET(mib2.tcpretranssegs); + return sizeof(*uint_ptr); + case 14: /* tcpInErrs */ + *uint_ptr = STATS_GET(mib2.tcpinerrs); + return sizeof(*uint_ptr); + case 15: /* tcpOutRsts */ + *uint_ptr = STATS_GET(mib2.tcpoutrsts); + return sizeof(*uint_ptr); +#if LWIP_HAVE_INT64 + case 17: { /* tcpHCInSegs */ + /* use the 32 bit counter for now... */ + u64_t val64 = STATS_GET(mib2.tcpinsegs); + *((u64_t *)value) = val64; + } + return sizeof(u64_t); + case 18: { /* tcpHCOutSegs */ + /* use the 32 bit counter for now... */ + u64_t val64 = STATS_GET(mib2.tcpoutsegs); + *((u64_t *)value) = val64; + } + return sizeof(u64_t); +#endif + default: + LWIP_DEBUGF(SNMP_MIB_DEBUG, ("tcp_get_value(): unknown id: %"S32_F"\n", instance->node->oid)); + break; } return 0; @@ -155,45 +162,45 @@ static const struct snmp_oid_range tcp_ConnTable_oid_ranges[] = { }; static snmp_err_t -tcp_ConnTable_get_cell_value_core(struct tcp_pcb *pcb, const u32_t* column, union snmp_variant_value* value, u32_t* value_len) +tcp_ConnTable_get_cell_value_core(struct tcp_pcb *pcb, const u32_t *column, union snmp_variant_value *value, u32_t *value_len) { LWIP_UNUSED_ARG(value_len); /* value */ switch (*column) { - case 1: /* tcpConnState */ - value->u32 = pcb->state + 1; - break; - case 2: /* tcpConnLocalAddress */ - value->u32 = ip_2_ip4(&pcb->local_ip)->addr; - break; - case 3: /* tcpConnLocalPort */ - value->u32 = pcb->local_port; - break; - case 4: /* tcpConnRemAddress */ - if (pcb->state == LISTEN) { - value->u32 = IP4_ADDR_ANY4->addr; - } else { - value->u32 = ip_2_ip4(&pcb->remote_ip)->addr; - } - break; - case 5: /* tcpConnRemPort */ - if (pcb->state == LISTEN) { - value->u32 = 0; - } else { - value->u32 = pcb->remote_port; - } - break; - default: - LWIP_ASSERT("invalid id", 0); - return SNMP_ERR_NOSUCHINSTANCE; + case 1: /* tcpConnState */ + value->u32 = pcb->state + 1; + break; + case 2: /* tcpConnLocalAddress */ + value->u32 = ip_2_ip4(&pcb->local_ip)->addr; + break; + case 3: /* tcpConnLocalPort */ + value->u32 = pcb->local_port; + break; + case 4: /* tcpConnRemAddress */ + if (pcb->state == LISTEN) { + value->u32 = IP4_ADDR_ANY4->addr; + } else { + value->u32 = ip_2_ip4(&pcb->remote_ip)->addr; + } + break; + case 5: /* tcpConnRemPort */ + if (pcb->state == LISTEN) { + value->u32 = 0; + } else { + value->u32 = pcb->remote_port; + } + break; + default: + LWIP_ASSERT("invalid id", 0); + return SNMP_ERR_NOSUCHINSTANCE; } return SNMP_ERR_NOERROR; } static snmp_err_t -tcp_ConnTable_get_cell_value(const u32_t* column, const u32_t* row_oid, u8_t row_oid_len, union snmp_variant_value* value, u32_t* value_len) +tcp_ConnTable_get_cell_value(const u32_t *column, const u32_t *row_oid, u8_t row_oid_len, union snmp_variant_value *value, u32_t *value_len) { u8_t i; ip4_addr_t local_ip; @@ -220,7 +227,7 @@ tcp_ConnTable_get_cell_value(const u32_t* column, const u32_t* row_oid, u8_t row while (pcb != NULL) { /* do local IP and local port match? */ if (IP_IS_V4_VAL(pcb->local_ip) && - ip4_addr_cmp(&local_ip, ip_2_ip4(&pcb->local_ip)) && (local_port == pcb->local_port)) { + ip4_addr_cmp(&local_ip, ip_2_ip4(&pcb->local_ip)) && (local_port == pcb->local_port)) { /* PCBs in state LISTEN are not connected and have no remote_ip or remote_port */ if (pcb->state == LISTEN) { @@ -230,7 +237,7 @@ tcp_ConnTable_get_cell_value(const u32_t* column, const u32_t* row_oid, u8_t row } } else { if (IP_IS_V4_VAL(pcb->remote_ip) && - ip4_addr_cmp(&remote_ip, ip_2_ip4(&pcb->remote_ip)) && (remote_port == pcb->remote_port)) { + ip4_addr_cmp(&remote_ip, ip_2_ip4(&pcb->remote_ip)) && (remote_port == pcb->remote_port)) { /* fill in object properties */ return tcp_ConnTable_get_cell_value_core(pcb, column, value, value_len); } @@ -246,7 +253,7 @@ tcp_ConnTable_get_cell_value(const u32_t* column, const u32_t* row_oid, u8_t row } static snmp_err_t -tcp_ConnTable_get_next_cell_instance_and_value(const u32_t* column, struct snmp_obj_id* row_oid, union snmp_variant_value* value, u32_t* value_len) +tcp_ConnTable_get_next_cell_instance_and_value(const u32_t *column, struct snmp_obj_id *row_oid, union snmp_variant_value *value, u32_t *value_len) { u8_t i; struct tcp_pcb *pcb; @@ -290,7 +297,7 @@ tcp_ConnTable_get_next_cell_instance_and_value(const u32_t* column, struct snmp_ if (state.status == SNMP_NEXT_OID_STATUS_SUCCESS) { snmp_oid_assign(row_oid, state.next_oid, state.next_oid_len); /* fill in object properties */ - return tcp_ConnTable_get_cell_value_core((struct tcp_pcb*)state.reference, column, value, value_len); + return tcp_ConnTable_get_cell_value_core((struct tcp_pcb *)state.reference, column, value, value_len); } /* not found */ @@ -302,43 +309,43 @@ tcp_ConnTable_get_next_cell_instance_and_value(const u32_t* column, struct snmp_ /* --- tcpConnectionTable --- */ static snmp_err_t -tcp_ConnectionTable_get_cell_value_core(const u32_t* column, struct tcp_pcb *pcb, union snmp_variant_value* value) +tcp_ConnectionTable_get_cell_value_core(const u32_t *column, struct tcp_pcb *pcb, union snmp_variant_value *value) { /* all items except tcpConnectionState and tcpConnectionProcess are declared as not-accessible */ switch (*column) { - case 7: /* tcpConnectionState */ - value->u32 = pcb->state + 1; - break; - case 8: /* tcpConnectionProcess */ - value->u32 = 0; /* not supported */ - break; - default: - return SNMP_ERR_NOSUCHINSTANCE; + case 7: /* tcpConnectionState */ + value->u32 = pcb->state + 1; + break; + case 8: /* tcpConnectionProcess */ + value->u32 = 0; /* not supported */ + break; + default: + return SNMP_ERR_NOSUCHINSTANCE; } return SNMP_ERR_NOERROR; } static snmp_err_t -tcp_ConnectionTable_get_cell_value(const u32_t* column, const u32_t* row_oid, u8_t row_oid_len, union snmp_variant_value* value, u32_t* value_len) +tcp_ConnectionTable_get_cell_value(const u32_t *column, const u32_t *row_oid, u8_t row_oid_len, union snmp_variant_value *value, u32_t *value_len) { ip_addr_t local_ip, remote_ip; u16_t local_port, remote_port; struct tcp_pcb *pcb; u8_t idx = 0; u8_t i; - struct tcp_pcb ** const tcp_pcb_nonlisten_lists[] = {&tcp_bound_pcbs, &tcp_active_pcbs, &tcp_tw_pcbs}; + struct tcp_pcb **const tcp_pcb_nonlisten_lists[] = {&tcp_bound_pcbs, &tcp_active_pcbs, &tcp_tw_pcbs}; LWIP_UNUSED_ARG(value_len); /* tcpConnectionLocalAddressType + tcpConnectionLocalAddress + tcpConnectionLocalPort */ - idx += snmp_oid_to_ip_port(&row_oid[idx], row_oid_len-idx, &local_ip, &local_port); + idx += snmp_oid_to_ip_port(&row_oid[idx], row_oid_len - idx, &local_ip, &local_port); if (idx == 0) { return SNMP_ERR_NOSUCHINSTANCE; } /* tcpConnectionRemAddressType + tcpConnectionRemAddress + tcpConnectionRemPort */ - idx += snmp_oid_to_ip_port(&row_oid[idx], row_oid_len-idx, &remote_ip, &remote_port); + idx += snmp_oid_to_ip_port(&row_oid[idx], row_oid_len - idx, &remote_ip, &remote_port); if (idx == 0) { return SNMP_ERR_NOSUCHINSTANCE; } @@ -349,9 +356,9 @@ tcp_ConnectionTable_get_cell_value(const u32_t* column, const u32_t* row_oid, u8 while (pcb != NULL) { if (ip_addr_cmp(&local_ip, &pcb->local_ip) && - (local_port == pcb->local_port) && - ip_addr_cmp(&remote_ip, &pcb->remote_ip) && - (remote_port == pcb->remote_port)) { + (local_port == pcb->local_port) && + ip_addr_cmp(&remote_ip, &pcb->remote_ip) && + (remote_port == pcb->remote_port)) { /* fill in object properties */ return tcp_ConnectionTable_get_cell_value_core(column, pcb, value); } @@ -364,7 +371,7 @@ tcp_ConnectionTable_get_cell_value(const u32_t* column, const u32_t* row_oid, u8 } static snmp_err_t -tcp_ConnectionTable_get_next_cell_instance_and_value(const u32_t* column, struct snmp_obj_id* row_oid, union snmp_variant_value* value, u32_t* value_len) +tcp_ConnectionTable_get_next_cell_instance_and_value(const u32_t *column, struct snmp_obj_id *row_oid, union snmp_variant_value *value, u32_t *value_len) { struct tcp_pcb *pcb; struct snmp_next_oid_state state; @@ -372,7 +379,7 @@ tcp_ConnectionTable_get_next_cell_instance_and_value(const u32_t* column, struct * 1x tcpConnectionRemAddressType + 1x OID len + 16x tcpConnectionRemAddress + 1x tcpConnectionRemPort */ u32_t result_temp[38]; u8_t i; - struct tcp_pcb ** const tcp_pcb_nonlisten_lists[] = {&tcp_bound_pcbs, &tcp_active_pcbs, &tcp_tw_pcbs}; + struct tcp_pcb **const tcp_pcb_nonlisten_lists[] = {&tcp_bound_pcbs, &tcp_active_pcbs, &tcp_tw_pcbs}; LWIP_UNUSED_ARG(value_len); @@ -404,7 +411,7 @@ tcp_ConnectionTable_get_next_cell_instance_and_value(const u32_t* column, struct if (state.status == SNMP_NEXT_OID_STATUS_SUCCESS) { snmp_oid_assign(row_oid, state.next_oid, state.next_oid_len); /* fill in object properties */ - return tcp_ConnectionTable_get_cell_value_core(column, (struct tcp_pcb*)state.reference, value); + return tcp_ConnectionTable_get_cell_value_core(column, (struct tcp_pcb *)state.reference, value); } else { /* not found */ return SNMP_ERR_NOSUCHINSTANCE; @@ -414,22 +421,22 @@ tcp_ConnectionTable_get_next_cell_instance_and_value(const u32_t* column, struct /* --- tcpListenerTable --- */ static snmp_err_t -tcp_ListenerTable_get_cell_value_core(const u32_t* column, union snmp_variant_value* value) +tcp_ListenerTable_get_cell_value_core(const u32_t *column, union snmp_variant_value *value) { /* all items except tcpListenerProcess are declared as not-accessible */ switch (*column) { - case 4: /* tcpListenerProcess */ - value->u32 = 0; /* not supported */ - break; - default: - return SNMP_ERR_NOSUCHINSTANCE; + case 4: /* tcpListenerProcess */ + value->u32 = 0; /* not supported */ + break; + default: + return SNMP_ERR_NOSUCHINSTANCE; } return SNMP_ERR_NOERROR; } static snmp_err_t -tcp_ListenerTable_get_cell_value(const u32_t* column, const u32_t* row_oid, u8_t row_oid_len, union snmp_variant_value* value, u32_t* value_len) +tcp_ListenerTable_get_cell_value(const u32_t *column, const u32_t *row_oid, u8_t row_oid_len, union snmp_variant_value *value, u32_t *value_len) { ip_addr_t local_ip; u16_t local_port; @@ -439,7 +446,7 @@ tcp_ListenerTable_get_cell_value(const u32_t* column, const u32_t* row_oid, u8_t LWIP_UNUSED_ARG(value_len); /* tcpListenerLocalAddressType + tcpListenerLocalAddress + tcpListenerLocalPort */ - idx += snmp_oid_to_ip_port(&row_oid[idx], row_oid_len-idx, &local_ip, &local_port); + idx += snmp_oid_to_ip_port(&row_oid[idx], row_oid_len - idx, &local_ip, &local_port); if (idx == 0) { return SNMP_ERR_NOSUCHINSTANCE; } @@ -448,7 +455,7 @@ tcp_ListenerTable_get_cell_value(const u32_t* column, const u32_t* row_oid, u8_t pcb = tcp_listen_pcbs.listen_pcbs; while (pcb != NULL) { if (ip_addr_cmp(&local_ip, &pcb->local_ip) && - (local_port == pcb->local_port)) { + (local_port == pcb->local_port)) { /* fill in object properties */ return tcp_ListenerTable_get_cell_value_core(column, value); } @@ -460,7 +467,7 @@ tcp_ListenerTable_get_cell_value(const u32_t* column, const u32_t* row_oid, u8_t } static snmp_err_t -tcp_ListenerTable_get_next_cell_instance_and_value(const u32_t* column, struct snmp_obj_id* row_oid, union snmp_variant_value* value, u32_t* value_len) +tcp_ListenerTable_get_next_cell_instance_and_value(const u32_t *column, struct snmp_obj_id *row_oid, union snmp_variant_value *value, u32_t *value_len) { struct tcp_pcb_listen *pcb; struct snmp_next_oid_state state; @@ -512,8 +519,10 @@ static const struct snmp_scalar_node tcp_OutSegs = SNMP_SCALAR_CREATE_NODE static const struct snmp_scalar_node tcp_RetransSegs = SNMP_SCALAR_CREATE_NODE_READONLY(12, SNMP_ASN1_TYPE_COUNTER, tcp_get_value); static const struct snmp_scalar_node tcp_InErrs = SNMP_SCALAR_CREATE_NODE_READONLY(14, SNMP_ASN1_TYPE_COUNTER, tcp_get_value); static const struct snmp_scalar_node tcp_OutRsts = SNMP_SCALAR_CREATE_NODE_READONLY(15, SNMP_ASN1_TYPE_COUNTER, tcp_get_value); +#if LWIP_HAVE_INT64 static const struct snmp_scalar_node tcp_HCInSegs = SNMP_SCALAR_CREATE_NODE_READONLY(17, SNMP_ASN1_TYPE_COUNTER64, tcp_get_value); static const struct snmp_scalar_node tcp_HCOutSegs = SNMP_SCALAR_CREATE_NODE_READONLY(18, SNMP_ASN1_TYPE_COUNTER64, tcp_get_value); +#endif #if LWIP_IPV4 static const struct snmp_table_simple_col_def tcp_ConnTable_columns[] = { @@ -561,12 +570,14 @@ CREATE_LWIP_SYNC_NODE(13, tcp_ConnTable) #endif /* LWIP_IPV4 */ CREATE_LWIP_SYNC_NODE(14, tcp_InErrs) CREATE_LWIP_SYNC_NODE(15, tcp_OutRsts) +#if LWIP_HAVE_INT64 CREATE_LWIP_SYNC_NODE(17, tcp_HCInSegs) CREATE_LWIP_SYNC_NODE(18, tcp_HCOutSegs) +#endif CREATE_LWIP_SYNC_NODE(19, tcp_ConnectionTable) CREATE_LWIP_SYNC_NODE(20, tcp_ListenerTable) -static const struct snmp_node* const tcp_nodes[] = { +static const struct snmp_node *const tcp_nodes[] = { &SYNC_NODE_NAME(tcp_RtoAlgorithm).node.node, &SYNC_NODE_NAME(tcp_RtoMin).node.node, &SYNC_NODE_NAME(tcp_RtoMax).node.node, @@ -585,8 +596,10 @@ static const struct snmp_node* const tcp_nodes[] = { &SYNC_NODE_NAME(tcp_InErrs).node.node, &SYNC_NODE_NAME(tcp_OutRsts).node.node, &SYNC_NODE_NAME(tcp_HCInSegs).node.node, +#if LWIP_HAVE_INT64 &SYNC_NODE_NAME(tcp_HCOutSegs).node.node, &SYNC_NODE_NAME(tcp_ConnectionTable).node.node, +#endif &SYNC_NODE_NAME(tcp_ListenerTable).node.node }; diff --git a/Libraries/LwIP/src/apps/snmp/snmp_mib2_udp.c b/Libraries/LwIP/src/apps/snmp/snmp_mib2_udp.c index f2e95e7..3c89029 100755 --- a/Libraries/LwIP/src/apps/snmp/snmp_mib2_udp.c +++ b/Libraries/LwIP/src/apps/snmp/snmp_mib2_udp.c @@ -58,32 +58,40 @@ /* --- udp .1.3.6.1.2.1.7 ----------------------------------------------------- */ static s16_t -udp_get_value(struct snmp_node_instance* instance, void* value) +udp_get_value(struct snmp_node_instance *instance, void *value) { - u32_t *uint_ptr = (u32_t*)value; + u32_t *uint_ptr = (u32_t *)value; switch (instance->node->oid) { - case 1: /* udpInDatagrams */ - *uint_ptr = STATS_GET(mib2.udpindatagrams); - return sizeof(*uint_ptr); - case 2: /* udpNoPorts */ - *uint_ptr = STATS_GET(mib2.udpnoports); - return sizeof(*uint_ptr); - case 3: /* udpInErrors */ - *uint_ptr = STATS_GET(mib2.udpinerrors); - return sizeof(*uint_ptr); - case 4: /* udpOutDatagrams */ - *uint_ptr = STATS_GET(mib2.udpoutdatagrams); - return sizeof(*uint_ptr); - case 8: /* udpHCInDatagrams */ - memset(value, 0, 2*sizeof(u32_t)); /* not supported */ - return 2*sizeof(u32_t); - case 9: /* udpHCOutDatagrams */ - memset(value, 0, 2*sizeof(u32_t)); /* not supported */ - return 2*sizeof(u32_t); - default: - LWIP_DEBUGF(SNMP_MIB_DEBUG,("udp_get_value(): unknown id: %"S32_F"\n", instance->node->oid)); - break; + case 1: /* udpInDatagrams */ + *uint_ptr = STATS_GET(mib2.udpindatagrams); + return sizeof(*uint_ptr); + case 2: /* udpNoPorts */ + *uint_ptr = STATS_GET(mib2.udpnoports); + return sizeof(*uint_ptr); + case 3: /* udpInErrors */ + *uint_ptr = STATS_GET(mib2.udpinerrors); + return sizeof(*uint_ptr); + case 4: /* udpOutDatagrams */ + *uint_ptr = STATS_GET(mib2.udpoutdatagrams); + return sizeof(*uint_ptr); +#if LWIP_HAVE_INT64 + case 8: { /* udpHCInDatagrams */ + /* use the 32 bit counter for now... */ + u64_t val64 = STATS_GET(mib2.udpindatagrams); + *((u64_t *)value) = val64; + } + return sizeof(u64_t); + case 9: { /* udpHCOutDatagrams */ + /* use the 32 bit counter for now... */ + u64_t val64 = STATS_GET(mib2.udpoutdatagrams); + *((u64_t *)value) = val64; + } + return sizeof(u64_t); +#endif + default: + LWIP_DEBUGF(SNMP_MIB_DEBUG, ("udp_get_value(): unknown id: %"S32_F"\n", instance->node->oid)); + break; } return 0; @@ -92,22 +100,22 @@ udp_get_value(struct snmp_node_instance* instance, void* value) /* --- udpEndpointTable --- */ static snmp_err_t -udp_endpointTable_get_cell_value_core(const u32_t* column, union snmp_variant_value* value) +udp_endpointTable_get_cell_value_core(const u32_t *column, union snmp_variant_value *value) { /* all items except udpEndpointProcess are declared as not-accessible */ switch (*column) { - case 8: /* udpEndpointProcess */ - value->u32 = 0; /* not supported */ - break; - default: - return SNMP_ERR_NOSUCHINSTANCE; + case 8: /* udpEndpointProcess */ + value->u32 = 0; /* not supported */ + break; + default: + return SNMP_ERR_NOSUCHINSTANCE; } return SNMP_ERR_NOERROR; } static snmp_err_t -udp_endpointTable_get_cell_value(const u32_t* column, const u32_t* row_oid, u8_t row_oid_len, union snmp_variant_value* value, u32_t* value_len) +udp_endpointTable_get_cell_value(const u32_t *column, const u32_t *row_oid, u8_t row_oid_len, union snmp_variant_value *value, u32_t *value_len) { ip_addr_t local_ip, remote_ip; u16_t local_port, remote_port; @@ -117,32 +125,32 @@ udp_endpointTable_get_cell_value(const u32_t* column, const u32_t* row_oid, u8_t LWIP_UNUSED_ARG(value_len); /* udpEndpointLocalAddressType + udpEndpointLocalAddress + udpEndpointLocalPort */ - idx += snmp_oid_to_ip_port(&row_oid[idx], row_oid_len-idx, &local_ip, &local_port); + idx += snmp_oid_to_ip_port(&row_oid[idx], row_oid_len - idx, &local_ip, &local_port); if (idx == 0) { return SNMP_ERR_NOSUCHINSTANCE; } /* udpEndpointRemoteAddressType + udpEndpointRemoteAddress + udpEndpointRemotePort */ - idx += snmp_oid_to_ip_port(&row_oid[idx], row_oid_len-idx, &remote_ip, &remote_port); + idx += snmp_oid_to_ip_port(&row_oid[idx], row_oid_len - idx, &remote_ip, &remote_port); if (idx == 0) { return SNMP_ERR_NOSUCHINSTANCE; } /* udpEndpointInstance */ - if (row_oid_len < (idx+1)) { + if (row_oid_len < (idx + 1)) { return SNMP_ERR_NOSUCHINSTANCE; } if (row_oid[idx] != 0) { return SNMP_ERR_NOSUCHINSTANCE; } - + /* find udp_pcb with requested ip and port*/ pcb = udp_pcbs; while (pcb != NULL) { if (ip_addr_cmp(&local_ip, &pcb->local_ip) && - (local_port == pcb->local_port) && - ip_addr_cmp(&remote_ip, &pcb->remote_ip) && - (remote_port == pcb->remote_port)) { + (local_port == pcb->local_port) && + ip_addr_cmp(&remote_ip, &pcb->remote_ip) && + (remote_port == pcb->remote_port)) { /* fill in object properties */ return udp_endpointTable_get_cell_value_core(column, value); } @@ -153,8 +161,8 @@ udp_endpointTable_get_cell_value(const u32_t* column, const u32_t* row_oid, u8_t return SNMP_ERR_NOSUCHINSTANCE; } -static snmp_err_t -udp_endpointTable_get_next_cell_instance_and_value(const u32_t* column, struct snmp_obj_id* row_oid, union snmp_variant_value* value, u32_t* value_len) +static snmp_err_t +udp_endpointTable_get_next_cell_instance_and_value(const u32_t *column, struct snmp_obj_id *row_oid, union snmp_variant_value *value, u32_t *value_len) { struct udp_pcb *pcb; struct snmp_next_oid_state state; @@ -181,12 +189,12 @@ udp_endpointTable_get_next_cell_instance_and_value(const u32_t* column, struct s /* udpEndpointRemoteAddressType + udpEndpointRemoteAddress + udpEndpointRemotePort */ idx += snmp_ip_port_to_oid(&pcb->remote_ip, pcb->remote_port, &test_oid[idx]); - test_oid[idx] = 0; /* udpEndpointInstance */ + test_oid[idx] = 0; /* udpEndpointInstance */ idx++; - + /* check generated OID: is it a candidate for the next one? */ snmp_next_oid_check(&state, test_oid, idx, NULL); - + pcb = pcb->next; } @@ -214,29 +222,29 @@ static const struct snmp_oid_range udp_Table_oid_ranges[] = { { 1, 0xffff } /* Port */ }; -static snmp_err_t -udp_Table_get_cell_value_core(struct udp_pcb *pcb, const u32_t* column, union snmp_variant_value* value, u32_t* value_len) +static snmp_err_t +udp_Table_get_cell_value_core(struct udp_pcb *pcb, const u32_t *column, union snmp_variant_value *value, u32_t *value_len) { LWIP_UNUSED_ARG(value_len); switch (*column) { - case 1: /* udpLocalAddress */ - /* set reference to PCB local IP and return a generic node that copies IP4 addresses */ - value->u32 = ip_2_ip4(&pcb->local_ip)->addr; - break; - case 2: /* udpLocalPort */ - /* set reference to PCB local port and return a generic node that copies u16_t values */ - value->u32 = pcb->local_port; - break; - default: - return SNMP_ERR_NOSUCHINSTANCE; + case 1: /* udpLocalAddress */ + /* set reference to PCB local IP and return a generic node that copies IP4 addresses */ + value->u32 = ip_2_ip4(&pcb->local_ip)->addr; + break; + case 2: /* udpLocalPort */ + /* set reference to PCB local port and return a generic node that copies u16_t values */ + value->u32 = pcb->local_port; + break; + default: + return SNMP_ERR_NOSUCHINSTANCE; } return SNMP_ERR_NOERROR; } -static snmp_err_t -udp_Table_get_cell_value(const u32_t* column, const u32_t* row_oid, u8_t row_oid_len, union snmp_variant_value* value, u32_t* value_len) +static snmp_err_t +udp_Table_get_cell_value(const u32_t *column, const u32_t *row_oid, u8_t row_oid_len, union snmp_variant_value *value, u32_t *value_len) { ip4_addr_t ip; u16_t port; @@ -267,8 +275,8 @@ udp_Table_get_cell_value(const u32_t* column, const u32_t* row_oid, u8_t row_oid return SNMP_ERR_NOSUCHINSTANCE; } -static snmp_err_t -udp_Table_get_next_cell_instance_and_value(const u32_t* column, struct snmp_obj_id* row_oid, union snmp_variant_value* value, u32_t* value_len) +static snmp_err_t +udp_Table_get_next_cell_instance_and_value(const u32_t *column, struct snmp_obj_id *row_oid, union snmp_variant_value *value, u32_t *value_len) { struct udp_pcb *pcb; struct snmp_next_oid_state state; @@ -289,7 +297,7 @@ udp_Table_get_next_cell_instance_and_value(const u32_t* column, struct snmp_obj_ /* check generated OID: is it a candidate for the next one? */ snmp_next_oid_check(&state, test_oid, LWIP_ARRAYSIZE(udp_Table_oid_ranges), pcb); } - + pcb = pcb->next; } @@ -297,7 +305,7 @@ udp_Table_get_next_cell_instance_and_value(const u32_t* column, struct snmp_obj_ if (state.status == SNMP_NEXT_OID_STATUS_SUCCESS) { snmp_oid_assign(row_oid, state.next_oid, state.next_oid_len); /* fill in object properties */ - return udp_Table_get_cell_value_core((struct udp_pcb*)state.reference, column, value, value_len); + return udp_Table_get_cell_value_core((struct udp_pcb *)state.reference, column, value, value_len); } else { /* not found */ return SNMP_ERR_NOSUCHINSTANCE; @@ -310,8 +318,10 @@ static const struct snmp_scalar_node udp_inDatagrams = SNMP_SCALAR_CREATE_NOD static const struct snmp_scalar_node udp_noPorts = SNMP_SCALAR_CREATE_NODE_READONLY(2, SNMP_ASN1_TYPE_COUNTER, udp_get_value); static const struct snmp_scalar_node udp_inErrors = SNMP_SCALAR_CREATE_NODE_READONLY(3, SNMP_ASN1_TYPE_COUNTER, udp_get_value); static const struct snmp_scalar_node udp_outDatagrams = SNMP_SCALAR_CREATE_NODE_READONLY(4, SNMP_ASN1_TYPE_COUNTER, udp_get_value); +#if LWIP_HAVE_INT64 static const struct snmp_scalar_node udp_HCInDatagrams = SNMP_SCALAR_CREATE_NODE_READONLY(8, SNMP_ASN1_TYPE_COUNTER64, udp_get_value); static const struct snmp_scalar_node udp_HCOutDatagrams = SNMP_SCALAR_CREATE_NODE_READONLY(9, SNMP_ASN1_TYPE_COUNTER64, udp_get_value); +#endif #if LWIP_IPV4 static const struct snmp_table_simple_col_def udp_Table_columns[] = { @@ -322,13 +332,13 @@ static const struct snmp_table_simple_node udp_Table = SNMP_TABLE_CREATE_SIMPLE( #endif /* LWIP_IPV4 */ static const struct snmp_table_simple_col_def udp_endpointTable_columns[] = { - /* all items except udpEndpointProcess are declared as not-accessible */ + /* all items except udpEndpointProcess are declared as not-accessible */ { 8, SNMP_ASN1_TYPE_UNSIGNED32, SNMP_VARIANT_VALUE_TYPE_U32 } /* udpEndpointProcess */ }; static const struct snmp_table_simple_node udp_endpointTable = SNMP_TABLE_CREATE_SIMPLE(7, udp_endpointTable_columns, udp_endpointTable_get_cell_value, udp_endpointTable_get_next_cell_instance_and_value); -/* the following nodes access variables in LWIP stack from SNMP worker thread and must therefore be synced to LWIP (TCPIP) thread */ +/* the following nodes access variables in LWIP stack from SNMP worker thread and must therefore be synced to LWIP (TCPIP) thread */ CREATE_LWIP_SYNC_NODE(1, udp_inDatagrams) CREATE_LWIP_SYNC_NODE(2, udp_noPorts) CREATE_LWIP_SYNC_NODE(3, udp_inErrors) @@ -337,10 +347,12 @@ CREATE_LWIP_SYNC_NODE(4, udp_outDatagrams) CREATE_LWIP_SYNC_NODE(5, udp_Table) #endif /* LWIP_IPV4 */ CREATE_LWIP_SYNC_NODE(7, udp_endpointTable) +#if LWIP_HAVE_INT64 CREATE_LWIP_SYNC_NODE(8, udp_HCInDatagrams) CREATE_LWIP_SYNC_NODE(9, udp_HCOutDatagrams) +#endif -static const struct snmp_node* const udp_nodes[] = { +static const struct snmp_node *const udp_nodes[] = { &SYNC_NODE_NAME(udp_inDatagrams).node.node, &SYNC_NODE_NAME(udp_noPorts).node.node, &SYNC_NODE_NAME(udp_inErrors).node.node, @@ -348,9 +360,12 @@ static const struct snmp_node* const udp_nodes[] = { #if LWIP_IPV4 &SYNC_NODE_NAME(udp_Table).node.node, #endif /* LWIP_IPV4 */ - &SYNC_NODE_NAME(udp_endpointTable).node.node, + &SYNC_NODE_NAME(udp_endpointTable).node.node +#if LWIP_HAVE_INT64 + , &SYNC_NODE_NAME(udp_HCInDatagrams).node.node, &SYNC_NODE_NAME(udp_HCOutDatagrams).node.node +#endif }; const struct snmp_tree_node snmp_mib2_udp_root = SNMP_CREATE_TREE_NODE(7, udp_nodes); diff --git a/Libraries/LwIP/src/apps/snmp/snmp_msg.c b/Libraries/LwIP/src/apps/snmp/snmp_msg.c index e43df93..a2e9057 100755 --- a/Libraries/LwIP/src/apps/snmp/snmp_msg.c +++ b/Libraries/LwIP/src/apps/snmp/snmp_msg.c @@ -48,13 +48,21 @@ #if LWIP_SNMP_V3 #include "lwip/apps/snmpv3.h" #include "snmpv3_priv.h" -#ifdef LWIP_SNMPV3_INCLUDE_ENGINE -#include LWIP_SNMPV3_INCLUDE_ENGINE +#ifdef LWIP_HOOK_FILENAME +#include LWIP_HOOK_FILENAME #endif #endif #include +#define SNMP_V3_AUTH_FLAG 0x01 +#define SNMP_V3_PRIV_FLAG 0x02 + +/* Security levels */ +#define SNMP_V3_NOAUTHNOPRIV 0x00 +#define SNMP_V3_AUTHNOPRIV SNMP_V3_AUTH_FLAG +#define SNMP_V3_AUTHPRIV (SNMP_V3_AUTH_FLAG | SNMP_V3_PRIV_FLAG) + /* public (non-static) constants */ /** SNMP community string */ const char *snmp_community = SNMP_COMMUNITY; @@ -64,7 +72,88 @@ const char *snmp_community_write = SNMP_COMMUNITY_WRITE; const char *snmp_community_trap = SNMP_COMMUNITY_TRAP; snmp_write_callback_fct snmp_write_callback = NULL; -void* snmp_write_callback_arg = NULL; +void *snmp_write_callback_arg = NULL; + +#if LWIP_SNMP_CONFIGURE_VERSIONS + +static u8_t v1_enabled = 1; +static u8_t v2c_enabled = 1; +static u8_t v3_enabled = 1; + +static u8_t +snmp_version_enabled(u8_t version) +{ + if (version == SNMP_VERSION_1) { + return v1_enabled; + } else if (version == SNMP_VERSION_2c) { + return v2c_enabled; + } +#if LWIP_SNMP_V3 + else if (version == SNMP_VERSION_3) { + return v3_enabled; + } +#endif + else { + LWIP_ASSERT("Invalid SNMP version", 0); + return 0; + } +} + +u8_t +snmp_v1_enabled(void) +{ + return snmp_version_enabled(SNMP_VERSION_1); +} + +u8_t +snmp_v2c_enabled(void) +{ + return snmp_version_enabled(SNMP_VERSION_2c); +} + +u8_t +snmp_v3_enabled(void) +{ + return snmp_version_enabled(SNMP_VERSION_3); +} + +static void +snmp_version_enable(u8_t version, u8_t enable) +{ + if (version == SNMP_VERSION_1) { + v1_enabled = enable; + } else if (version == SNMP_VERSION_2c) { + v2c_enabled = enable; + } +#if LWIP_SNMP_V3 + else if (version == SNMP_VERSION_3) { + v3_enabled = enable; + } +#endif + else { + LWIP_ASSERT("Invalid SNMP version", 0); + } +} + +void +snmp_v1_enable(u8_t enable) +{ + snmp_version_enable(SNMP_VERSION_1, enable); +} + +void +snmp_v2c_enable(u8_t enable) +{ + snmp_version_enable(SNMP_VERSION_2c, enable); +} + +void +snmp_v3_enable(u8_t enable) +{ + snmp_version_enable(SNMP_VERSION_3, enable); +} + +#endif /** * @ingroup snmp_core @@ -86,8 +175,9 @@ snmp_get_community(void) * @param community is a pointer to new community string */ void -snmp_set_community(const char * const community) +snmp_set_community(const char *const community) { + LWIP_ASSERT_CORE_LOCKED(); LWIP_ASSERT("community string is too long!", strlen(community) <= SNMP_MAX_COMMUNITY_STR_LEN); snmp_community = community; } @@ -123,8 +213,9 @@ snmp_get_community_trap(void) * @param community is a pointer to new write-access community string */ void -snmp_set_community_write(const char * const community) +snmp_set_community_write(const char *const community) { + LWIP_ASSERT_CORE_LOCKED(); LWIP_ASSERT("community string must not be NULL", community != NULL); LWIP_ASSERT("community string is too long!", strlen(community) <= SNMP_MAX_COMMUNITY_STR_LEN); snmp_community_write = community; @@ -139,8 +230,9 @@ snmp_set_community_write(const char * const community) * @param community is a pointer to new trap community string */ void -snmp_set_community_trap(const char * const community) +snmp_set_community_trap(const char *const community) { + LWIP_ASSERT_CORE_LOCKED(); LWIP_ASSERT("community string is too long!", strlen(community) <= SNMP_MAX_COMMUNITY_STR_LEN); snmp_community_trap = community; } @@ -149,9 +241,10 @@ snmp_set_community_trap(const char * const community) * @ingroup snmp_core * Callback fired on every successful write access */ -void -snmp_set_write_callback(snmp_write_callback_fct write_callback, void* callback_arg) +void +snmp_set_write_callback(snmp_write_callback_fct write_callback, void *callback_arg) { + LWIP_ASSERT_CORE_LOCKED(); snmp_write_callback = write_callback; snmp_write_callback_arg = callback_arg; } @@ -180,7 +273,7 @@ snmp_receive(void *handle, struct pbuf *p, const ip_addr_t *source_ip, u16_t por { err_t err; struct snmp_request request; - + memset(&request, 0, sizeof(request)); request.handle = handle; request.source_ip = source_ip; @@ -206,23 +299,83 @@ snmp_receive(void *handle, struct pbuf *p, const ip_addr_t *source_ip, u16_t por err = snmp_process_set_request(&request); } } +#if LWIP_SNMP_V3 + else { + struct snmp_varbind vb; + + vb.next = NULL; + vb.prev = NULL; + vb.type = SNMP_ASN1_TYPE_COUNTER32; + vb.value_len = sizeof(u32_t); + + switch (request.error_status) { + case SNMP_ERR_AUTHORIZATIONERROR: { + static const u32_t oid[] = { 1, 3, 6, 1, 6, 3, 15, 1, 1, 5, 0 }; + snmp_oid_assign(&vb.oid, oid, LWIP_ARRAYSIZE(oid)); + vb.value = &snmp_stats.wrongdigests; + } + break; + case SNMP_ERR_UNKNOWN_ENGINEID: { + static const u32_t oid[] = { 1, 3, 6, 1, 6, 3, 15, 1, 1, 4, 0 }; + snmp_oid_assign(&vb.oid, oid, LWIP_ARRAYSIZE(oid)); + vb.value = &snmp_stats.unknownengineids; + } + break; + case SNMP_ERR_UNKNOWN_SECURITYNAME: { + static const u32_t oid[] = { 1, 3, 6, 1, 6, 3, 15, 1, 1, 3, 0 }; + snmp_oid_assign(&vb.oid, oid, LWIP_ARRAYSIZE(oid)); + vb.value = &snmp_stats.unknownusernames; + } + break; + case SNMP_ERR_UNSUPPORTED_SECLEVEL: { + static const u32_t oid[] = { 1, 3, 6, 1, 6, 3, 15, 1, 1, 1, 0 }; + snmp_oid_assign(&vb.oid, oid, LWIP_ARRAYSIZE(oid)); + vb.value = &snmp_stats.unsupportedseclevels; + } + break; + case SNMP_ERR_NOTINTIMEWINDOW: { + static const u32_t oid[] = { 1, 3, 6, 1, 6, 3, 15, 1, 1, 2, 0 }; + snmp_oid_assign(&vb.oid, oid, LWIP_ARRAYSIZE(oid)); + vb.value = &snmp_stats.notintimewindows; + } + break; + case SNMP_ERR_DECRYIPTION_ERROR: { + static const u32_t oid[] = { 1, 3, 6, 1, 6, 3, 15, 1, 1, 6, 0 }; + snmp_oid_assign(&vb.oid, oid, LWIP_ARRAYSIZE(oid)); + vb.value = &snmp_stats.decryptionerrors; + } + break; + default: + /* Unknown or unhandled error_status */ + err = ERR_ARG; + } + + if (err == ERR_OK) { + snmp_append_outbound_varbind(&(request.outbound_pbuf_stream), &vb); + request.error_status = SNMP_ERR_NOERROR; + } + + request.request_out_type = (SNMP_ASN1_CLASS_CONTEXT | SNMP_ASN1_CONTENTTYPE_CONSTRUCTED | SNMP_ASN1_CONTEXT_PDU_REPORT); + request.request_id = request.msg_id; + } +#endif if (err == ERR_OK) { err = snmp_complete_outbound_frame(&request); - + if (err == ERR_OK) { err = snmp_sendto(request.handle, request.outbound_pbuf, request.source_ip, request.source_port); - if ((request.request_type == SNMP_ASN1_CONTEXT_PDU_SET_REQ) - && (request.error_status == SNMP_ERR_NOERROR) - && (snmp_write_callback != NULL)) { + if ((request.request_type == SNMP_ASN1_CONTEXT_PDU_SET_REQ) + && (request.error_status == SNMP_ERR_NOERROR) + && (snmp_write_callback != NULL)) { /* raise write notification for all written objects */ snmp_execute_write_callbacks(&request); } } } } - + if (request.outbound_pbuf != NULL) { pbuf_free(request.outbound_pbuf); } @@ -230,21 +383,23 @@ snmp_receive(void *handle, struct pbuf *p, const ip_addr_t *source_ip, u16_t por } static u8_t -snmp_msg_getnext_validate_node_inst(struct snmp_node_instance* node_instance, void* validate_arg) +snmp_msg_getnext_validate_node_inst(struct snmp_node_instance *node_instance, void *validate_arg) { if (((node_instance->access & SNMP_NODE_INSTANCE_ACCESS_READ) != SNMP_NODE_INSTANCE_ACCESS_READ) || (node_instance->get_value == NULL)) { return SNMP_ERR_NOSUCHINSTANCE; } - if ((node_instance->asn1_type == SNMP_ASN1_TYPE_COUNTER64) && (((struct snmp_request*)validate_arg)->version == SNMP_VERSION_1)) { +#if LWIP_HAVE_INT64 + if ((node_instance->asn1_type == SNMP_ASN1_TYPE_COUNTER64) && (((struct snmp_request *)validate_arg)->version == SNMP_VERSION_1)) { /* according to RFC 2089 skip Counter64 objects in GetNext requests from v1 clients */ return SNMP_ERR_NOSUCHINSTANCE; } +#endif return SNMP_ERR_NOERROR; } -static void +static void snmp_process_varbind(struct snmp_request *request, struct snmp_varbind *vb, u8_t get_next) { err_t err; @@ -296,10 +451,10 @@ snmp_process_varbind(struct snmp_request *request, struct snmp_varbind *vb, u8_t } } else { s16_t len = node_instance.get_value(&node_instance, vb->value); - vb->type = node_instance.asn1_type; - if(len >= 0) { + if (len >= 0) { vb->value_len = (u16_t)len; /* cast is OK because we checked >= 0 above */ + vb->type = node_instance.asn1_type; LWIP_ASSERT("SNMP_MAX_VALUE_SIZE is configured too low", (vb->value_len & ~SNMP_GET_VALUE_RAW_DATA) <= SNMP_MAX_VALUE_SIZE); err = snmp_append_outbound_varbind(&request->outbound_pbuf_stream, vb); @@ -388,7 +543,7 @@ snmp_process_getnext_request(struct snmp_request *request) request->error_status = SNMP_ERR_GENERROR; } } - + return ERR_OK; } @@ -447,7 +602,7 @@ snmp_process_getbulk_request(struct snmp_request *request) while ((request->error_status == SNMP_ERR_NOERROR) && (repetitions > 0) && (request->outbound_pbuf_stream.offset != repetition_offset)) { u8_t all_endofmibview = 1; - + snmp_vb_enumerator_init(&repetition_varbind_enumerator, request->outbound_pbuf, repetition_offset, request->outbound_pbuf_stream.offset - repetition_offset); repetition_offset = request->outbound_pbuf_stream.offset; /* for next loop */ @@ -478,7 +633,7 @@ snmp_process_getbulk_request(struct snmp_request *request) /* stop when all varbinds in a loop return EndOfMibView */ break; } - + repetitions--; } @@ -510,7 +665,7 @@ snmp_process_set_request(struct snmp_request *request) if (err == SNMP_VB_ENUMERATOR_ERR_OK) { struct snmp_node_instance node_instance; memset(&node_instance, 0, sizeof(node_instance)); - + request->error_status = snmp_get_node_instance_from_oid(vb.oid.id, vb.oid.len, &node_instance); if (request->error_status == SNMP_ERR_NOERROR) { if (node_instance.asn1_type != vb.type) { @@ -615,9 +770,13 @@ snmp_parse_inbound_frame(struct snmp_request *request) s32_t parent_tlv_value_len; s32_t s32_value; err_t err; +#if LWIP_SNMP_V3 + snmpv3_auth_algo_t auth; + snmpv3_priv_algo_t priv; +#endif IF_PARSE_EXEC(snmp_pbuf_stream_init(&pbuf_stream, request->inbound_pbuf, 0, request->inbound_pbuf->tot_len)); - + /* decode main container consisting of version, community and PDU */ IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); IF_PARSE_ASSERT((tlv.type == SNMP_ASN1_TYPE_SEQUENCE) && (tlv.value_len == pbuf_stream.length)); @@ -628,15 +787,19 @@ snmp_parse_inbound_frame(struct snmp_request *request) IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_INTEGER); parent_tlv_value_len -= SNMP_ASN1_TLV_LENGTH(tlv); IF_PARSE_ASSERT(parent_tlv_value_len > 0); - + IF_PARSE_EXEC(snmp_asn1_dec_s32t(&pbuf_stream, tlv.value_len, &s32_value)); - if ((s32_value != SNMP_VERSION_1) && - (s32_value != SNMP_VERSION_2c) + + if (((s32_value != SNMP_VERSION_1) && + (s32_value != SNMP_VERSION_2c) #if LWIP_SNMP_V3 - && (s32_value != SNMP_VERSION_3) + && (s32_value != SNMP_VERSION_3) #endif - ) - { + ) +#if LWIP_SNMP_CONFIGURE_VERSIONS + || (!snmp_version_enabled(s32_value)) +#endif + ) { /* unsupported SNMP version */ snmp_stats.inbadversions++; return ERR_ARG; @@ -650,8 +813,9 @@ snmp_parse_inbound_frame(struct snmp_request *request) /* SNMPv3 doesn't use communities */ /* @todo: Differentiate read/write access */ - strcpy((char*)request->community, snmp_community); - request->community_strlen = (u16_t)strlen(snmp_community); + strncpy((char *)request->community, snmp_community, SNMP_MAX_COMMUNITY_STR_LEN); + request->community[SNMP_MAX_COMMUNITY_STR_LEN] = 0; /* ensure NULL termination (strncpy does NOT guarantee it!) */ + request->community_strlen = (u16_t)strnlen((char *)request->community, SNMP_MAX_COMMUNITY_STR_LEN); /* RFC3414 globalData */ IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); @@ -720,7 +884,7 @@ snmp_parse_inbound_frame(struct snmp_request *request) IF_PARSE_ASSERT(parent_tlv_value_len > 0); IF_PARSE_EXEC(snmp_asn1_dec_raw(&pbuf_stream, tlv.value_len, request->msg_authoritative_engine_id, - &u16_value, SNMP_V3_MAX_ENGINE_ID_LENGTH)); + &u16_value, SNMP_V3_MAX_ENGINE_ID_LENGTH)); request->msg_authoritative_engine_id_len = (u8_t)u16_value; /* msgAuthoritativeEngineBoots */ @@ -736,7 +900,6 @@ snmp_parse_inbound_frame(struct snmp_request *request) parent_tlv_value_len -= SNMP_ASN1_TLV_LENGTH(tlv); IF_PARSE_ASSERT(parent_tlv_value_len > 0); IF_PARSE_EXEC(snmp_asn1_dec_s32t(&pbuf_stream, tlv.value_len, &request->msg_authoritative_engine_time)); - /* @todo: Implement time window checking */ /* msgUserName */ IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); @@ -745,10 +908,8 @@ snmp_parse_inbound_frame(struct snmp_request *request) IF_PARSE_ASSERT(parent_tlv_value_len > 0); IF_PARSE_EXEC(snmp_asn1_dec_raw(&pbuf_stream, tlv.value_len, request->msg_user_name, - &u16_value, SNMP_V3_MAX_USER_LENGTH)); + &u16_value, SNMP_V3_MAX_USER_LENGTH)); request->msg_user_name_len = (u8_t)u16_value; - /* @todo: Implement unknown user error response */ - IF_PARSE_EXEC(snmpv3_get_user((char*)request->msg_user_name, NULL, NULL, NULL, NULL)); /* msgAuthenticationParameters */ memset(request->msg_authentication_parameters, 0, SNMP_V3_MAX_AUTH_PARAM_LENGTH); @@ -760,38 +921,10 @@ snmp_parse_inbound_frame(struct snmp_request *request) inbound_msgAuthenticationParameters_offset = pbuf_stream.offset; LWIP_UNUSED_ARG(inbound_msgAuthenticationParameters_offset); /* Read auth parameters */ - IF_PARSE_ASSERT(tlv.value_len <= SNMP_V3_MAX_AUTH_PARAM_LENGTH); + /* IF_PARSE_ASSERT(tlv.value_len <= SNMP_V3_MAX_AUTH_PARAM_LENGTH); */ IF_PARSE_EXEC(snmp_asn1_dec_raw(&pbuf_stream, tlv.value_len, request->msg_authentication_parameters, - &u16_value, tlv.value_len)); - -#if LWIP_SNMP_V3_CRYPTO - if (request->msg_flags & SNMP_V3_AUTH_FLAG) { - const u8_t zero_arr[SNMP_V3_MAX_AUTH_PARAM_LENGTH] = { 0 }; - u8_t key[20]; - u8_t algo; - u8_t hmac[LWIP_MAX(SNMP_V3_SHA_LEN, SNMP_V3_MD5_LEN)]; - struct snmp_pbuf_stream auth_stream; - - /* Rewind stream */ - IF_PARSE_EXEC(snmp_pbuf_stream_init(&pbuf_stream, request->inbound_pbuf, 0, request->inbound_pbuf->tot_len)); - IF_PARSE_EXEC(snmp_pbuf_stream_seek_abs(&pbuf_stream, inbound_msgAuthenticationParameters_offset)); - /* Set auth parameters to zero for verification */ - IF_PARSE_EXEC(snmp_asn1_enc_raw(&pbuf_stream, zero_arr, tlv.value_len)); - - /* Verify authentication */ - IF_PARSE_EXEC(snmp_pbuf_stream_init(&auth_stream, request->inbound_pbuf, 0, request->inbound_pbuf->tot_len)); - - IF_PARSE_EXEC(snmpv3_get_user((char*)request->msg_user_name, &algo, key, NULL, NULL)); - IF_PARSE_EXEC(snmpv3_auth(&auth_stream, request->inbound_pbuf->tot_len, key, algo, hmac)); - /* @todo: Implement error response */ - IF_PARSE_EXEC(memcmp(request->msg_authentication_parameters, hmac, SNMP_V3_MAX_AUTH_PARAM_LENGTH)); - } -#else - /* Ungraceful exit if we encounter cryptography and don't support it. - * @todo: Implement error response - */ - IF_PARSE_ASSERT(!(request->msg_flags & (SNMP_V3_AUTH_FLAG | SNMP_V3_PRIV_FLAG))); -#endif + &u16_value, tlv.value_len)); + request->msg_authentication_parameters_len = (u8_t)u16_value; /* msgPrivacyParameters */ memset(request->msg_privacy_parameters, 0, SNMP_V3_MAX_PRIV_PARAM_LENGTH); @@ -801,25 +934,168 @@ snmp_parse_inbound_frame(struct snmp_request *request) IF_PARSE_ASSERT(parent_tlv_value_len > 0); IF_PARSE_EXEC(snmp_asn1_dec_raw(&pbuf_stream, tlv.value_len, request->msg_privacy_parameters, - &u16_value, SNMP_V3_MAX_PRIV_PARAM_LENGTH)); + &u16_value, SNMP_V3_MAX_PRIV_PARAM_LENGTH)); + request->msg_privacy_parameters_len = (u8_t)u16_value; + /* validate securityParameters here (do this after decoding because we don't want to increase other counters for wrong frames) + * 1) securityParameters was correctly serialized if we reach here. + * 2) securityParameters are already cached. + * 3) if msgAuthoritativeEngineID is unknown, zero-length or too long: + b) https://tools.ietf.org/html/rfc3414#section-7 + */ + { + const char *eid; + u8_t eid_len; + + snmpv3_get_engine_id(&eid, &eid_len); + + if ((request->msg_authoritative_engine_id_len == 0) || + (request->msg_authoritative_engine_id_len != eid_len) || + (memcmp(eid, request->msg_authoritative_engine_id, eid_len) != 0)) { + snmp_stats.unknownengineids++; + request->msg_flags = 0; /* noauthnopriv */ + request->error_status = SNMP_ERR_UNKNOWN_ENGINEID; + return ERR_OK; + } + } + + /* 4) verify username */ + if (snmpv3_get_user((char *)request->msg_user_name, &auth, NULL, &priv, NULL)) { + snmp_stats.unknownusernames++; + request->msg_flags = 0; /* noauthnopriv */ + request->error_status = SNMP_ERR_UNKNOWN_SECURITYNAME; + return ERR_OK; + } + + /* 5) verify security level */ + switch (request->msg_flags & (SNMP_V3_AUTH_FLAG | SNMP_V3_PRIV_FLAG)) { + case SNMP_V3_NOAUTHNOPRIV: + if ((auth != SNMP_V3_AUTH_ALGO_INVAL) || (priv != SNMP_V3_PRIV_ALGO_INVAL)) { + /* Invalid security level for user */ + snmp_stats.unsupportedseclevels++; + request->msg_flags = SNMP_V3_NOAUTHNOPRIV; + request->error_status = SNMP_ERR_UNSUPPORTED_SECLEVEL; + return ERR_OK; + } + break; #if LWIP_SNMP_V3_CRYPTO - /* Decrypt message */ - if (request->msg_flags & SNMP_V3_PRIV_FLAG) { + case SNMP_V3_AUTHNOPRIV: + if ((auth == SNMP_V3_AUTH_ALGO_INVAL) || (priv != SNMP_V3_PRIV_ALGO_INVAL)) { + /* Invalid security level for user */ + snmp_stats.unsupportedseclevels++; + request->msg_flags = SNMP_V3_NOAUTHNOPRIV; + request->error_status = SNMP_ERR_UNSUPPORTED_SECLEVEL; + return ERR_OK; + } + break; + case SNMP_V3_AUTHPRIV: + if ((auth == SNMP_V3_AUTH_ALGO_INVAL) || (priv == SNMP_V3_PRIV_ALGO_INVAL)) { + /* Invalid security level for user */ + snmp_stats.unsupportedseclevels++; + request->msg_flags = SNMP_V3_NOAUTHNOPRIV; + request->error_status = SNMP_ERR_UNSUPPORTED_SECLEVEL; + return ERR_OK; + } + break; +#endif + default: + snmp_stats.unsupportedseclevels++; + request->msg_flags = SNMP_V3_NOAUTHNOPRIV; + request->error_status = SNMP_ERR_UNSUPPORTED_SECLEVEL; + return ERR_OK; + } + + /* 6) if securitylevel specifies authentication, authenticate message. */ +#if LWIP_SNMP_V3_CRYPTO + if (request->msg_flags & SNMP_V3_AUTH_FLAG) { + const u8_t zero_arr[SNMP_V3_MAX_AUTH_PARAM_LENGTH] = { 0 }; + u8_t key[20]; + u8_t hmac[LWIP_MAX(SNMP_V3_SHA_LEN, SNMP_V3_MD5_LEN)]; + struct snmp_pbuf_stream auth_stream; + + if (request->msg_authentication_parameters_len > SNMP_V3_MAX_AUTH_PARAM_LENGTH) { + snmp_stats.wrongdigests++; + request->msg_flags = SNMP_V3_NOAUTHNOPRIV; + request->error_status = SNMP_ERR_AUTHORIZATIONERROR; + return ERR_OK; + } + + /* Rewind stream */ + IF_PARSE_EXEC(snmp_pbuf_stream_init(&auth_stream, request->inbound_pbuf, 0, request->inbound_pbuf->tot_len)); + IF_PARSE_EXEC(snmp_pbuf_stream_seek_abs(&auth_stream, inbound_msgAuthenticationParameters_offset)); + /* Set auth parameters to zero for verification */ + IF_PARSE_EXEC(snmp_asn1_enc_raw(&auth_stream, zero_arr, request->msg_authentication_parameters_len)); + + /* Verify authentication */ + IF_PARSE_EXEC(snmp_pbuf_stream_init(&auth_stream, request->inbound_pbuf, 0, request->inbound_pbuf->tot_len)); + + IF_PARSE_EXEC(snmpv3_get_user((char *)request->msg_user_name, &auth, key, NULL, NULL)); + IF_PARSE_EXEC(snmpv3_auth(&auth_stream, request->inbound_pbuf->tot_len, key, auth, hmac)); + + if (memcmp(request->msg_authentication_parameters, hmac, SNMP_V3_MAX_AUTH_PARAM_LENGTH)) { + snmp_stats.wrongdigests++; + request->msg_flags = SNMP_V3_NOAUTHNOPRIV; + request->error_status = SNMP_ERR_AUTHORIZATIONERROR; + return ERR_OK; + } + + /* 7) if securitylevel specifies authentication, verify engineboots, enginetime and lastenginetime */ + { + s32_t boots = snmpv3_get_engine_boots_internal(); + if ((request->msg_authoritative_engine_boots != boots) || (boots == 2147483647UL)) { + snmp_stats.notintimewindows++; + request->msg_flags = SNMP_V3_AUTHNOPRIV; + request->error_status = SNMP_ERR_NOTINTIMEWINDOW; + return ERR_OK; + } + } + { + s32_t time = snmpv3_get_engine_time_internal(); + if (request->msg_authoritative_engine_time > (time + 150)) { + snmp_stats.notintimewindows++; + request->msg_flags = SNMP_V3_AUTHNOPRIV; + request->error_status = SNMP_ERR_NOTINTIMEWINDOW; + return ERR_OK; + } else if (time > 150) { + if (request->msg_authoritative_engine_time < (time - 150)) { + snmp_stats.notintimewindows++; + request->msg_flags = SNMP_V3_AUTHNOPRIV; + request->error_status = SNMP_ERR_NOTINTIMEWINDOW; + return ERR_OK; + } + } + } + } +#endif + + /* 8) if securitylevel specifies privacy, decrypt message. */ +#if LWIP_SNMP_V3_CRYPTO + if (request->msg_flags & SNMP_V3_PRIV_FLAG) { + /* Decrypt message */ + u8_t key[20]; - u8_t algo; IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_OCTET_STRING); parent_tlv_value_len -= SNMP_ASN1_TLV_HDR_LENGTH(tlv); IF_PARSE_ASSERT(parent_tlv_value_len > 0); - IF_PARSE_EXEC(snmpv3_get_user((char*)request->msg_user_name, NULL, NULL, &algo, key)); - IF_PARSE_EXEC(snmpv3_crypt(&pbuf_stream, tlv.value_len, key, - request->msg_privacy_parameters, request->msg_authoritative_engine_boots, - request->msg_authoritative_engine_time, algo, SNMP_V3_PRIV_MODE_DECRYPT)); + IF_PARSE_EXEC(snmpv3_get_user((char *)request->msg_user_name, NULL, NULL, &priv, key)); + if (snmpv3_crypt(&pbuf_stream, tlv.value_len, key, + request->msg_privacy_parameters, request->msg_authoritative_engine_boots, + request->msg_authoritative_engine_time, priv, SNMP_V3_PRIV_MODE_DECRYPT) != ERR_OK) { + snmp_stats.decryptionerrors++; + request->msg_flags = SNMP_V3_AUTHNOPRIV; + request->error_status = SNMP_ERR_DECRYIPTION_ERROR; + return ERR_OK; + } } #endif + /* 9) calculate max size of scoped pdu? + * 10) securityname for user is retrieved from usertable? + * 11) security data is cached? + * 12) + */ /* Scoped PDU * Encryption context @@ -836,8 +1112,9 @@ snmp_parse_inbound_frame(struct snmp_request *request) IF_PARSE_ASSERT(parent_tlv_value_len > 0); IF_PARSE_EXEC(snmp_asn1_dec_raw(&pbuf_stream, tlv.value_len, request->context_engine_id, - &u16_value, SNMP_V3_MAX_ENGINE_ID_LENGTH)); + &u16_value, SNMP_V3_MAX_ENGINE_ID_LENGTH)); request->context_engine_id_len = (u8_t)u16_value; + /* TODO: do we need to verify this contextengineid too? */ /* contextName */ IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); @@ -846,27 +1123,28 @@ snmp_parse_inbound_frame(struct snmp_request *request) IF_PARSE_ASSERT(parent_tlv_value_len > 0); IF_PARSE_EXEC(snmp_asn1_dec_raw(&pbuf_stream, tlv.value_len, request->context_name, - &u16_value, SNMP_V3_MAX_ENGINE_ID_LENGTH)); + &u16_value, SNMP_V3_MAX_ENGINE_ID_LENGTH)); request->context_name_len = (u8_t)u16_value; + /* TODO: do we need to verify this contextname too? */ } else #endif { - /* decode community */ - IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); - IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_OCTET_STRING); - parent_tlv_value_len -= SNMP_ASN1_TLV_LENGTH(tlv); - IF_PARSE_ASSERT(parent_tlv_value_len > 0); + /* decode community */ + IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); + IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_OCTET_STRING); + parent_tlv_value_len -= SNMP_ASN1_TLV_LENGTH(tlv); + IF_PARSE_ASSERT(parent_tlv_value_len > 0); - err = snmp_asn1_dec_raw(&pbuf_stream, tlv.value_len, request->community, &request->community_strlen, SNMP_MAX_COMMUNITY_STR_LEN); - if (err == ERR_MEM) { - /* community string does not fit in our buffer -> its too long -> its invalid */ - request->community_strlen = 0; - snmp_pbuf_stream_seek(&pbuf_stream, tlv.value_len); - } else { - IF_PARSE_ASSERT(err == ERR_OK); - } - /* add zero terminator */ - request->community[request->community_strlen] = 0; + err = snmp_asn1_dec_raw(&pbuf_stream, tlv.value_len, request->community, &request->community_strlen, SNMP_MAX_COMMUNITY_STR_LEN); + if (err == ERR_MEM) { + /* community string does not fit in our buffer -> its too long -> its invalid */ + request->community_strlen = 0; + snmp_pbuf_stream_seek(&pbuf_stream, tlv.value_len); + } else { + IF_PARSE_ASSERT(err == ERR_OK); + } + /* add zero terminator */ + request->community[request->community_strlen] = 0; } /* decode PDU type (next container level) */ @@ -876,7 +1154,7 @@ snmp_parse_inbound_frame(struct snmp_request *request) parent_tlv_value_len = tlv.value_len; /* validate PDU type */ - switch(tlv.type) { + switch (tlv.type) { case (SNMP_ASN1_CLASS_CONTEXT | SNMP_ASN1_CONTENTTYPE_CONSTRUCTED | SNMP_ASN1_CONTEXT_PDU_GET_REQ): /* GetRequest PDU */ snmp_stats.ingetrequests++; @@ -900,9 +1178,9 @@ snmp_parse_inbound_frame(struct snmp_request *request) /* unsupported input PDU for this agent (no parse error) */ LWIP_DEBUGF(SNMP_DEBUG, ("Unknown/Invalid SNMP PDU type received: %d", tlv.type)); \ return ERR_ARG; - break; } request->request_type = tlv.type & SNMP_ASN1_DATATYPE_MASK; + request->request_out_type = (SNMP_ASN1_CLASS_CONTEXT | SNMP_ASN1_CONTENTTYPE_CONSTRUCTED | SNMP_ASN1_CONTEXT_PDU_GET_RESP); /* validate community (do this after decoding PDU type because we don't want to increase 'inbadcommunitynames' for wrong frame types */ if (request->community_strlen == 0) { @@ -915,27 +1193,27 @@ snmp_parse_inbound_frame(struct snmp_request *request) /* our write community is empty, that means all our objects are readonly */ request->error_status = SNMP_ERR_NOTWRITABLE; request->error_index = 1; - } else if (strncmp(snmp_community_write, (const char*)request->community, SNMP_MAX_COMMUNITY_STR_LEN) != 0) { + } else if (strncmp(snmp_community_write, (const char *)request->community, SNMP_MAX_COMMUNITY_STR_LEN) != 0) { /* community name does not match */ snmp_stats.inbadcommunitynames++; snmp_authfail_trap(); return ERR_ARG; } - } else { - if (strncmp(snmp_community, (const char*)request->community, SNMP_MAX_COMMUNITY_STR_LEN) != 0) { + } else { + if (strncmp(snmp_community, (const char *)request->community, SNMP_MAX_COMMUNITY_STR_LEN) != 0) { /* community name does not match */ snmp_stats.inbadcommunitynames++; snmp_authfail_trap(); return ERR_ARG; } } - + /* decode request ID */ IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_INTEGER); parent_tlv_value_len -= SNMP_ASN1_TLV_LENGTH(tlv); IF_PARSE_ASSERT(parent_tlv_value_len > 0); - + IF_PARSE_EXEC(snmp_asn1_dec_s32t(&pbuf_stream, tlv.value_len, &request->request_id)); /* decode error status / non-repeaters */ @@ -976,7 +1254,7 @@ snmp_parse_inbound_frame(struct snmp_request *request) /* decode varbind-list type (next container level) */ IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); IF_PARSE_ASSERT((tlv.type == SNMP_ASN1_TYPE_SEQUENCE) && (tlv.value_len <= pbuf_stream.length)); - + request->inbound_varbind_offset = pbuf_stream.offset; request->inbound_varbind_len = pbuf_stream.length - request->inbound_padding_len; snmp_vb_enumerator_init(&(request->inbound_varbind_enumerator), request->inbound_pbuf, request->inbound_varbind_offset, request->inbound_varbind_len); @@ -990,7 +1268,7 @@ static err_t snmp_prepare_outbound_frame(struct snmp_request *request) { struct snmp_asn1_tlv tlv; - struct snmp_pbuf_stream* pbuf_stream = &(request->outbound_pbuf_stream); + struct snmp_pbuf_stream *pbuf_stream = &(request->outbound_pbuf_stream); /* try allocating pbuf(s) for maximum response size */ request->outbound_pbuf = pbuf_alloc(PBUF_TRANSPORT, 1472, PBUF_RAM); @@ -1013,13 +1291,13 @@ snmp_prepare_outbound_frame(struct snmp_request *request) #if LWIP_SNMP_V3 if (request->version < SNMP_VERSION_3) { #endif - /* community */ - SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_OCTET_STRING, 0, request->community_strlen); - OF_BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) ); - OF_BUILD_EXEC( snmp_asn1_enc_raw(pbuf_stream, request->community, request->community_strlen) ); + /* community */ + SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_OCTET_STRING, 0, request->community_strlen); + OF_BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) ); + OF_BUILD_EXEC( snmp_asn1_enc_raw(pbuf_stream, request->community, request->community_strlen) ); #if LWIP_SNMP_V3 } else { - const char* id; + const char *id; /* globalData */ request->outbound_msg_global_data_offset = pbuf_stream->offset; @@ -1152,7 +1430,7 @@ snmp_prepare_outbound_frame(struct snmp_request *request) /* 'PDU' sequence */ request->outbound_pdu_offset = pbuf_stream->offset; - SNMP_ASN1_SET_TLV_PARAMS(tlv, (SNMP_ASN1_CLASS_CONTEXT | SNMP_ASN1_CONTENTTYPE_CONSTRUCTED | SNMP_ASN1_CONTEXT_PDU_GET_RESP), 3, 0); + SNMP_ASN1_SET_TLV_PARAMS(tlv, request->request_out_type, 3, 0); OF_BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) ); /* request ID */ @@ -1200,7 +1478,7 @@ snmp_varbind_length(struct snmp_varbind *varbind, struct snmp_varbind_len *len) if (varbind->value_len != sizeof (s32_t)) { return ERR_VAL; } - snmp_asn1_enc_s32t_cnt(*((s32_t*) varbind->value), &len->value_value_len); + snmp_asn1_enc_s32t_cnt(*((s32_t *) varbind->value), &len->value_value_len); break; case SNMP_ASN1_TYPE_COUNTER: case SNMP_ASN1_TYPE_GAUGE: @@ -1208,7 +1486,7 @@ snmp_varbind_length(struct snmp_varbind *varbind, struct snmp_varbind_len *len) if (varbind->value_len != sizeof (u32_t)) { return ERR_VAL; } - snmp_asn1_enc_u32t_cnt(*((u32_t*) varbind->value), &len->value_value_len); + snmp_asn1_enc_u32t_cnt(*((u32_t *) varbind->value), &len->value_value_len); break; case SNMP_ASN1_TYPE_OCTET_STRING: case SNMP_ASN1_TYPE_IPADDR: @@ -1225,14 +1503,16 @@ snmp_varbind_length(struct snmp_varbind *varbind, struct snmp_varbind_len *len) if ((varbind->value_len & 0x03) != 0) { return ERR_VAL; } - snmp_asn1_enc_oid_cnt((u32_t*) varbind->value, varbind->value_len >> 2, &len->value_value_len); + snmp_asn1_enc_oid_cnt((u32_t *) varbind->value, varbind->value_len >> 2, &len->value_value_len); break; +#if LWIP_HAVE_INT64 case SNMP_ASN1_TYPE_COUNTER64: - if (varbind->value_len != (2 * sizeof (u32_t))) { + if (varbind->value_len != sizeof(u64_t)) { return ERR_VAL; } - snmp_asn1_enc_u64t_cnt((u32_t*) varbind->value, &len->value_value_len); + snmp_asn1_enc_u64t_cnt(*(u64_t *)varbind->value, &len->value_value_len); break; +#endif default: /* unsupported type */ return ERR_VAL; @@ -1249,7 +1529,7 @@ snmp_varbind_length(struct snmp_varbind *varbind, struct snmp_varbind_len *len) #define OVB_BUILD_EXEC(code) BUILD_EXEC(code, ERR_ARG) err_t -snmp_append_outbound_varbind(struct snmp_pbuf_stream *pbuf_stream, struct snmp_varbind* varbind) +snmp_append_outbound_varbind(struct snmp_pbuf_stream *pbuf_stream, struct snmp_varbind *varbind) { struct snmp_asn1_tlv tlv; struct snmp_varbind_len len; @@ -1283,29 +1563,31 @@ snmp_append_outbound_varbind(struct snmp_pbuf_stream *pbuf_stream, struct snmp_v if (len.value_value_len > 0) { if (varbind->value_len & SNMP_GET_VALUE_RAW_DATA) { - OVB_BUILD_EXEC(snmp_asn1_enc_raw(pbuf_stream, (u8_t*) varbind->value, len.value_value_len)); + OVB_BUILD_EXEC(snmp_asn1_enc_raw(pbuf_stream, (u8_t *) varbind->value, len.value_value_len)); } else { switch (varbind->type) { case SNMP_ASN1_TYPE_INTEGER: - OVB_BUILD_EXEC(snmp_asn1_enc_s32t(pbuf_stream, len.value_value_len, *((s32_t*) varbind->value))); + OVB_BUILD_EXEC(snmp_asn1_enc_s32t(pbuf_stream, len.value_value_len, *((s32_t *) varbind->value))); break; case SNMP_ASN1_TYPE_COUNTER: case SNMP_ASN1_TYPE_GAUGE: case SNMP_ASN1_TYPE_TIMETICKS: - OVB_BUILD_EXEC(snmp_asn1_enc_u32t(pbuf_stream, len.value_value_len, *((u32_t*) varbind->value))); + OVB_BUILD_EXEC(snmp_asn1_enc_u32t(pbuf_stream, len.value_value_len, *((u32_t *) varbind->value))); break; case SNMP_ASN1_TYPE_OCTET_STRING: case SNMP_ASN1_TYPE_IPADDR: case SNMP_ASN1_TYPE_OPAQUE: - OVB_BUILD_EXEC(snmp_asn1_enc_raw(pbuf_stream, (u8_t*) varbind->value, len.value_value_len)); + OVB_BUILD_EXEC(snmp_asn1_enc_raw(pbuf_stream, (u8_t *) varbind->value, len.value_value_len)); len.value_value_len = varbind->value_len; break; case SNMP_ASN1_TYPE_OBJECT_ID: - OVB_BUILD_EXEC(snmp_asn1_enc_oid(pbuf_stream, (u32_t*) varbind->value, varbind->value_len / sizeof (u32_t))); + OVB_BUILD_EXEC(snmp_asn1_enc_oid(pbuf_stream, (u32_t *) varbind->value, varbind->value_len / sizeof (u32_t))); break; +#if LWIP_HAVE_INT64 case SNMP_ASN1_TYPE_COUNTER64: - OVB_BUILD_EXEC(snmp_asn1_enc_u64t(pbuf_stream, len.value_value_len, (u32_t*) varbind->value)); + OVB_BUILD_EXEC(snmp_asn1_enc_u64t(pbuf_stream, len.value_value_len, *(u64_t *) varbind->value)); break; +#endif default: LWIP_ASSERT("Unknown variable type", 0); break; @@ -1327,8 +1609,8 @@ snmp_complete_outbound_frame(struct snmp_request *request) if (request->error_status != SNMP_ERR_NOERROR) { /* map v2c error codes to v1 compliant error code (according to RFC 2089) */ switch (request->error_status) { - /* mapping of implementation specific "virtual" error codes - * (during processing of frame we already stored them in error_status field, + /* mapping of implementation specific "virtual" error codes + * (during processing of frame we already stored them in error_status field, * so no need to check all varbinds here for those exceptions as suggested by RFC) */ case SNMP_ERR_NOSUCHINSTANCE: case SNMP_ERR_NOSUCHOBJECT: @@ -1356,7 +1638,7 @@ snmp_complete_outbound_frame(struct snmp_request *request) default: request->error_status = SNMP_ERR_GENERROR; break; - } + } } } else { if (request->request_type == SNMP_ASN1_CONTEXT_PDU_SET_REQ) { @@ -1384,7 +1666,7 @@ snmp_complete_outbound_frame(struct snmp_request *request) struct snmp_pbuf_stream inbound_stream; OF_BUILD_EXEC( snmp_pbuf_stream_init(&inbound_stream, request->inbound_pbuf, request->inbound_varbind_offset, request->inbound_varbind_len) ); OF_BUILD_EXEC( snmp_pbuf_stream_init(&(request->outbound_pbuf_stream), request->outbound_pbuf, request->outbound_varbind_offset, request->outbound_pbuf->tot_len - request->outbound_varbind_offset) ); - snmp_pbuf_stream_writeto(&inbound_stream, &(request->outbound_pbuf_stream), 0); + OF_BUILD_EXEC( snmp_pbuf_stream_writeto(&inbound_stream, &(request->outbound_pbuf_stream), 0) ); } frame_size = request->outbound_pbuf_stream.offset; @@ -1395,7 +1677,7 @@ snmp_complete_outbound_frame(struct snmp_request *request) u8_t i; outbound_padding = (8 - (u8_t)((frame_size - request->outbound_scoped_pdu_seq_offset) & 0x07)) & 0x07; for (i = 0; i < outbound_padding; i++) { - snmp_pbuf_stream_write(&request->outbound_pbuf_stream, 0); + OF_BUILD_EXEC( snmp_pbuf_stream_write(&request->outbound_pbuf_stream, 0) ); } } #endif @@ -1410,18 +1692,18 @@ snmp_complete_outbound_frame(struct snmp_request *request) /* complete missing length in 'globalData' sequence */ /* - type - length_len(fixed, see snmp_prepare_outbound_frame()) */ SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_SEQUENCE, 1, request->outbound_msg_global_data_end - - request->outbound_msg_global_data_offset - 1 - 1); + - request->outbound_msg_global_data_offset - 1 - 1); OF_BUILD_EXEC(snmp_pbuf_stream_seek_abs(&(request->outbound_pbuf_stream), request->outbound_msg_global_data_offset)); OF_BUILD_EXEC(snmp_ans1_enc_tlv(&(request->outbound_pbuf_stream), &tlv)); /* complete missing length in 'msgSecurityParameters' sequence */ SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_OCTET_STRING, 1, request->outbound_msg_security_parameters_end - - request->outbound_msg_security_parameters_str_offset - 1 - 1); + - request->outbound_msg_security_parameters_str_offset - 1 - 1); OF_BUILD_EXEC(snmp_pbuf_stream_seek_abs(&(request->outbound_pbuf_stream), request->outbound_msg_security_parameters_str_offset)); OF_BUILD_EXEC(snmp_ans1_enc_tlv(&(request->outbound_pbuf_stream), &tlv)); SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_SEQUENCE, 1, request->outbound_msg_security_parameters_end - - request->outbound_msg_security_parameters_seq_offset - 1 - 1); + - request->outbound_msg_security_parameters_seq_offset - 1 - 1); OF_BUILD_EXEC(snmp_pbuf_stream_seek_abs(&(request->outbound_pbuf_stream), request->outbound_msg_security_parameters_seq_offset)); OF_BUILD_EXEC(snmp_ans1_enc_tlv(&(request->outbound_pbuf_stream), &tlv)); @@ -1433,8 +1715,8 @@ snmp_complete_outbound_frame(struct snmp_request *request) #endif /* complete missing length in 'PDU' sequence */ - SNMP_ASN1_SET_TLV_PARAMS(tlv, (SNMP_ASN1_CLASS_CONTEXT | SNMP_ASN1_CONTENTTYPE_CONSTRUCTED | SNMP_ASN1_CONTEXT_PDU_GET_RESP), 3, - frame_size - request->outbound_pdu_offset - 1 - 3); /* - type - length_len(fixed, see snmp_prepare_outbound_frame()) */ + SNMP_ASN1_SET_TLV_PARAMS(tlv, request->request_out_type, 3, + frame_size - request->outbound_pdu_offset - 1 - 3); /* - type - length_len(fixed, see snmp_prepare_outbound_frame()) */ OF_BUILD_EXEC( snmp_pbuf_stream_seek_abs(&(request->outbound_pbuf_stream), request->outbound_pdu_offset) ); OF_BUILD_EXEC( snmp_ans1_enc_tlv(&(request->outbound_pbuf_stream), &tlv) ); @@ -1502,42 +1784,42 @@ snmp_complete_outbound_frame(struct snmp_request *request) /* Encrypt response */ if (request->version == SNMP_VERSION_3 && (request->msg_flags & SNMP_V3_PRIV_FLAG)) { u8_t key[20]; - u8_t algo; + snmpv3_priv_algo_t algo; /* complete missing length in PDU sequence */ OF_BUILD_EXEC(snmp_pbuf_stream_init(&request->outbound_pbuf_stream, request->outbound_pbuf, 0, request->outbound_pbuf->tot_len)); OF_BUILD_EXEC(snmp_pbuf_stream_seek_abs(&(request->outbound_pbuf_stream), request->outbound_scoped_pdu_string_offset)); SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_OCTET_STRING, 3, frame_size + outbound_padding - - request->outbound_scoped_pdu_string_offset - 1 - 3); + - request->outbound_scoped_pdu_string_offset - 1 - 3); OF_BUILD_EXEC(snmp_ans1_enc_tlv(&(request->outbound_pbuf_stream), &tlv)); - OF_BUILD_EXEC(snmpv3_get_user((char*)request->msg_user_name, NULL, NULL, &algo, key)); + OF_BUILD_EXEC(snmpv3_get_user((char *)request->msg_user_name, NULL, NULL, &algo, key)); OF_BUILD_EXEC(snmpv3_crypt(&request->outbound_pbuf_stream, tlv.value_len, key, - request->msg_privacy_parameters, request->msg_authoritative_engine_boots, - request->msg_authoritative_engine_time, algo, SNMP_V3_PRIV_MODE_ENCRYPT)); + request->msg_privacy_parameters, request->msg_authoritative_engine_boots, + request->msg_authoritative_engine_time, algo, SNMP_V3_PRIV_MODE_ENCRYPT)); } if (request->version == SNMP_VERSION_3 && (request->msg_flags & SNMP_V3_AUTH_FLAG)) { u8_t key[20]; - u8_t algo; + snmpv3_auth_algo_t algo; u8_t hmac[20]; - OF_BUILD_EXEC(snmpv3_get_user((char*)request->msg_user_name, &algo, key, NULL, NULL)); + OF_BUILD_EXEC(snmpv3_get_user((char *)request->msg_user_name, &algo, key, NULL, NULL)); OF_BUILD_EXEC(snmp_pbuf_stream_init(&(request->outbound_pbuf_stream), - request->outbound_pbuf, 0, request->outbound_pbuf->tot_len)); + request->outbound_pbuf, 0, request->outbound_pbuf->tot_len)); OF_BUILD_EXEC(snmpv3_auth(&request->outbound_pbuf_stream, frame_size + outbound_padding, key, algo, hmac)); MEMCPY(request->msg_authentication_parameters, hmac, SNMP_V3_MAX_AUTH_PARAM_LENGTH); OF_BUILD_EXEC(snmp_pbuf_stream_init(&request->outbound_pbuf_stream, - request->outbound_pbuf, 0, request->outbound_pbuf->tot_len)); + request->outbound_pbuf, 0, request->outbound_pbuf->tot_len)); OF_BUILD_EXEC(snmp_pbuf_stream_seek_abs(&request->outbound_pbuf_stream, - request->outbound_msg_authentication_parameters_offset)); + request->outbound_msg_authentication_parameters_offset)); SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_OCTET_STRING, 1, SNMP_V3_MAX_AUTH_PARAM_LENGTH); OF_BUILD_EXEC(snmp_ans1_enc_tlv(&request->outbound_pbuf_stream, &tlv)); OF_BUILD_EXEC(snmp_asn1_enc_raw(&request->outbound_pbuf_stream, - request->msg_authentication_parameters, SNMP_V3_MAX_AUTH_PARAM_LENGTH)); + request->msg_authentication_parameters, SNMP_V3_MAX_AUTH_PARAM_LENGTH)); } #endif @@ -1549,7 +1831,7 @@ snmp_complete_outbound_frame(struct snmp_request *request) return ERR_OK; } -static void +static void snmp_execute_write_callbacks(struct snmp_request *request) { struct snmp_varbind_enumerator inbound_varbind_enumerator; @@ -1569,7 +1851,7 @@ snmp_execute_write_callbacks(struct snmp_request *request) /* ----------------------------------------------------------------------- */ void -snmp_vb_enumerator_init(struct snmp_varbind_enumerator* enumerator, struct pbuf* p, u16_t offset, u16_t length) +snmp_vb_enumerator_init(struct snmp_varbind_enumerator *enumerator, struct pbuf *p, u16_t offset, u16_t length) { snmp_pbuf_stream_init(&(enumerator->pbuf_stream), p, offset, length); enumerator->varbind_count = 0; @@ -1579,14 +1861,13 @@ snmp_vb_enumerator_init(struct snmp_varbind_enumerator* enumerator, struct pbuf* #define VB_PARSE_ASSERT(code) PARSE_ASSERT(code, SNMP_VB_ENUMERATOR_ERR_ASN1ERROR) snmp_vb_enumerator_err_t -snmp_vb_enumerator_get_next(struct snmp_varbind_enumerator* enumerator, struct snmp_varbind* varbind) +snmp_vb_enumerator_get_next(struct snmp_varbind_enumerator *enumerator, struct snmp_varbind *varbind) { struct snmp_asn1_tlv tlv; u16_t varbind_len; err_t err; - - if (enumerator->pbuf_stream.length == 0) - { + + if (enumerator->pbuf_stream.length == 0) { return SNMP_VB_ENUMERATOR_ERR_EOVB; } enumerator->varbind_count++; @@ -1599,7 +1880,7 @@ snmp_vb_enumerator_get_next(struct snmp_varbind_enumerator* enumerator, struct s /* decode varbind name (object id) */ VB_PARSE_EXEC(snmp_asn1_dec_tlv(&(enumerator->pbuf_stream), &tlv)); VB_PARSE_ASSERT((tlv.type == SNMP_ASN1_TYPE_OBJECT_ID) && (SNMP_ASN1_TLV_LENGTH(tlv) < varbind_len) && (tlv.value_len < enumerator->pbuf_stream.length)); - + VB_PARSE_EXEC(snmp_asn1_dec_oid(&(enumerator->pbuf_stream), tlv.value_len, varbind->oid.id, &(varbind->oid.len), SNMP_MAX_OBJ_ID_LEN)); varbind_len -= SNMP_ASN1_TLV_LENGTH(tlv); @@ -1612,18 +1893,18 @@ snmp_vb_enumerator_get_next(struct snmp_varbind_enumerator* enumerator, struct s if (varbind->value != NULL) { switch (varbind->type) { case SNMP_ASN1_TYPE_INTEGER: - VB_PARSE_EXEC(snmp_asn1_dec_s32t(&(enumerator->pbuf_stream), tlv.value_len, (s32_t*)varbind->value)); - varbind->value_len = sizeof(s32_t*); + VB_PARSE_EXEC(snmp_asn1_dec_s32t(&(enumerator->pbuf_stream), tlv.value_len, (s32_t *)varbind->value)); + varbind->value_len = sizeof(s32_t); break; case SNMP_ASN1_TYPE_COUNTER: case SNMP_ASN1_TYPE_GAUGE: case SNMP_ASN1_TYPE_TIMETICKS: - VB_PARSE_EXEC(snmp_asn1_dec_u32t(&(enumerator->pbuf_stream), tlv.value_len, (u32_t*)varbind->value)); - varbind->value_len = sizeof(u32_t*); + VB_PARSE_EXEC(snmp_asn1_dec_u32t(&(enumerator->pbuf_stream), tlv.value_len, (u32_t *)varbind->value)); + varbind->value_len = sizeof(u32_t); break; case SNMP_ASN1_TYPE_OCTET_STRING: case SNMP_ASN1_TYPE_OPAQUE: - err = snmp_asn1_dec_raw(&(enumerator->pbuf_stream), tlv.value_len, (u8_t*)varbind->value, &varbind->value_len, SNMP_MAX_VALUE_SIZE); + err = snmp_asn1_dec_raw(&(enumerator->pbuf_stream), tlv.value_len, (u8_t *)varbind->value, &varbind->value_len, SNMP_MAX_VALUE_SIZE); if (err == ERR_MEM) { return SNMP_VB_ENUMERATOR_ERR_INVALIDLENGTH; } @@ -1634,7 +1915,7 @@ snmp_vb_enumerator_get_next(struct snmp_varbind_enumerator* enumerator, struct s break; case SNMP_ASN1_TYPE_OBJECT_ID: /* misuse tlv.length_len as OID_length transporter */ - err = snmp_asn1_dec_oid(&(enumerator->pbuf_stream), tlv.value_len, (u32_t*)varbind->value, &tlv.length_len, SNMP_MAX_OBJ_ID_LEN); + err = snmp_asn1_dec_oid(&(enumerator->pbuf_stream), tlv.value_len, (u32_t *)varbind->value, &tlv.length_len, SNMP_MAX_OBJ_ID_LEN); if (err == ERR_MEM) { return SNMP_VB_ENUMERATOR_ERR_INVALIDLENGTH; } @@ -1644,15 +1925,17 @@ snmp_vb_enumerator_get_next(struct snmp_varbind_enumerator* enumerator, struct s case SNMP_ASN1_TYPE_IPADDR: if (tlv.value_len == 4) { /* must be exactly 4 octets! */ - VB_PARSE_EXEC(snmp_asn1_dec_raw(&(enumerator->pbuf_stream), tlv.value_len, (u8_t*)varbind->value, &varbind->value_len, SNMP_MAX_VALUE_SIZE)); + VB_PARSE_EXEC(snmp_asn1_dec_raw(&(enumerator->pbuf_stream), tlv.value_len, (u8_t *)varbind->value, &varbind->value_len, SNMP_MAX_VALUE_SIZE)); } else { VB_PARSE_ASSERT(0); } break; +#if LWIP_HAVE_INT64 case SNMP_ASN1_TYPE_COUNTER64: - VB_PARSE_EXEC(snmp_asn1_dec_u64t(&(enumerator->pbuf_stream), tlv.value_len, (u32_t*)varbind->value)); - varbind->value_len = 2 * sizeof(u32_t*); + VB_PARSE_EXEC(snmp_asn1_dec_u64t(&(enumerator->pbuf_stream), tlv.value_len, (u64_t *)varbind->value)); + varbind->value_len = sizeof(u64_t); break; +#endif default: VB_PARSE_ASSERT(0); break; diff --git a/Libraries/LwIP/src/apps/snmp/snmp_msg.h b/Libraries/LwIP/src/apps/snmp/snmp_msg.h index c9fdb33..a3b072f 100755 --- a/Libraries/LwIP/src/apps/snmp/snmp_msg.h +++ b/Libraries/LwIP/src/apps/snmp/snmp_msg.h @@ -57,24 +57,12 @@ extern "C" { #endif -/* The listen port of the SNMP agent. Clients have to make their requests to - this port. Most standard clients won't work if you change this! */ -#ifndef SNMP_IN_PORT -#define SNMP_IN_PORT 161 -#endif -/* The remote port the SNMP agent sends traps to. Most standard trap sinks won't - work if you change this! */ -#ifndef SNMP_TRAP_PORT -#define SNMP_TRAP_PORT 162 -#endif - /* version defines used in PDU */ #define SNMP_VERSION_1 0 #define SNMP_VERSION_2c 1 #define SNMP_VERSION_3 3 -struct snmp_varbind_enumerator -{ +struct snmp_varbind_enumerator { struct snmp_pbuf_stream pbuf_stream; u16_t varbind_count; }; @@ -86,11 +74,10 @@ typedef enum { SNMP_VB_ENUMERATOR_ERR_INVALIDLENGTH = 3 } snmp_vb_enumerator_err_t; -void snmp_vb_enumerator_init(struct snmp_varbind_enumerator* enumerator, struct pbuf* p, u16_t offset, u16_t length); -snmp_vb_enumerator_err_t snmp_vb_enumerator_get_next(struct snmp_varbind_enumerator* enumerator, struct snmp_varbind* varbind); +void snmp_vb_enumerator_init(struct snmp_varbind_enumerator *enumerator, struct pbuf *p, u16_t offset, u16_t length); +snmp_vb_enumerator_err_t snmp_vb_enumerator_get_next(struct snmp_varbind_enumerator *enumerator, struct snmp_varbind *varbind); -struct snmp_request -{ +struct snmp_request { /* Communication handle */ void *handle; /* source IP address */ @@ -115,7 +102,10 @@ struct snmp_request s32_t non_repeaters; /* max-repetitions (getBulkRequest (SNMPv2c)) */ s32_t max_repetitions; - + + /* Usually response-pdu (2). When snmpv3 errors are detected report-pdu(8) */ + u8_t request_out_type; + #if LWIP_SNMP_V3 s32_t msg_id; s32_t msg_max_size; @@ -128,7 +118,9 @@ struct snmp_request u8_t msg_user_name[SNMP_V3_MAX_USER_LENGTH]; u8_t msg_user_name_len; u8_t msg_authentication_parameters[SNMP_V3_MAX_AUTH_PARAM_LENGTH]; + u8_t msg_authentication_parameters_len; u8_t msg_privacy_parameters[SNMP_V3_MAX_PRIV_PARAM_LENGTH]; + u8_t msg_privacy_parameters_len; u8_t context_engine_id[SNMP_V3_MAX_ENGINE_ID_LENGTH]; u8_t context_engine_id_len; u8_t context_name[SNMP_V3_MAX_ENGINE_ID_LENGTH]; @@ -162,8 +154,7 @@ struct snmp_request }; /** A helper struct keeping length information about varbinds */ -struct snmp_varbind_len -{ +struct snmp_varbind_len { u8_t vb_len_len; u16_t vb_value_len; u8_t oid_len_len; @@ -177,13 +168,13 @@ extern const char *snmp_community; /** Agent community string for write access */ extern const char *snmp_community_write; /** handle for sending traps */ -extern void* snmp_traps_handle; +extern void *snmp_traps_handle; void snmp_receive(void *handle, struct pbuf *p, const ip_addr_t *source_ip, u16_t port); err_t snmp_sendto(void *handle, struct pbuf *p, const ip_addr_t *dst, u16_t port); -u8_t snmp_get_local_ip_for_dst(void* handle, const ip_addr_t *dst, ip_addr_t *result); +u8_t snmp_get_local_ip_for_dst(void *handle, const ip_addr_t *dst, ip_addr_t *result); err_t snmp_varbind_length(struct snmp_varbind *varbind, struct snmp_varbind_len *len); -err_t snmp_append_outbound_varbind(struct snmp_pbuf_stream *pbuf_stream, struct snmp_varbind* varbind); +err_t snmp_append_outbound_varbind(struct snmp_pbuf_stream *pbuf_stream, struct snmp_varbind *varbind); #ifdef __cplusplus } diff --git a/Libraries/LwIP/src/apps/snmp/snmp_netconn.c b/Libraries/LwIP/src/apps/snmp/snmp_netconn.c index 9a9a294..57d98f6 100755 --- a/Libraries/LwIP/src/apps/snmp/snmp_netconn.c +++ b/Libraries/LwIP/src/apps/snmp/snmp_netconn.c @@ -42,6 +42,7 @@ #include "lwip/udp.h" #include "snmp_msg.h" #include "lwip/sys.h" +#include "lwip/prot/iana.h" /** SNMP netconn API worker thread */ static void @@ -51,17 +52,17 @@ snmp_netconn_thread(void *arg) struct netbuf *buf; err_t err; LWIP_UNUSED_ARG(arg); - + /* Bind to SNMP port with default IP address */ #if LWIP_IPV6 conn = netconn_new(NETCONN_UDP_IPV6); - netconn_bind(conn, IP6_ADDR_ANY, SNMP_IN_PORT); + netconn_bind(conn, IP6_ADDR_ANY, LWIP_IANA_PORT_SNMP); #else /* LWIP_IPV6 */ conn = netconn_new(NETCONN_UDP); - netconn_bind(conn, IP4_ADDR_ANY, SNMP_IN_PORT); + netconn_bind(conn, IP4_ADDR_ANY, LWIP_IANA_PORT_SNMP); #endif /* LWIP_IPV6 */ LWIP_ERROR("snmp_netconn: invalid conn", (conn != NULL), return;); - + snmp_traps_handle = conn; do { @@ -74,28 +75,28 @@ snmp_netconn_thread(void *arg) if (buf != NULL) { netbuf_delete(buf); } - } while(1); + } while (1); } -err_t +err_t snmp_sendto(void *handle, struct pbuf *p, const ip_addr_t *dst, u16_t port) { err_t result; struct netbuf buf; - + memset(&buf, 0, sizeof(buf)); buf.p = p; - result = netconn_sendto((struct netconn*)handle, &buf, dst, port); - + result = netconn_sendto((struct netconn *)handle, &buf, dst, port); + return result; } u8_t -snmp_get_local_ip_for_dst(void* handle, const ip_addr_t *dst, ip_addr_t *result) +snmp_get_local_ip_for_dst(void *handle, const ip_addr_t *dst, ip_addr_t *result) { - struct netconn* conn = (struct netconn*)handle; + struct netconn *conn = (struct netconn *)handle; struct netif *dst_if; - const ip_addr_t* dst_ip; + const ip_addr_t *dst_ip; LWIP_UNUSED_ARG(conn); /* unused in case of IPV4 only configuration */ @@ -115,6 +116,7 @@ snmp_get_local_ip_for_dst(void* handle, const ip_addr_t *dst, ip_addr_t *result) void snmp_init(void) { + LWIP_ASSERT_CORE_LOCKED(); sys_thread_new("snmp_netconn", snmp_netconn_thread, NULL, SNMP_STACK_SIZE, SNMP_THREAD_PRIO); } diff --git a/Libraries/LwIP/src/apps/snmp/snmp_pbuf_stream.c b/Libraries/LwIP/src/apps/snmp/snmp_pbuf_stream.c index 6d05fd7..e33c6ec 100755 --- a/Libraries/LwIP/src/apps/snmp/snmp_pbuf_stream.c +++ b/Libraries/LwIP/src/apps/snmp/snmp_pbuf_stream.c @@ -44,7 +44,7 @@ #include err_t -snmp_pbuf_stream_init(struct snmp_pbuf_stream* pbuf_stream, struct pbuf* p, u16_t offset, u16_t length) +snmp_pbuf_stream_init(struct snmp_pbuf_stream *pbuf_stream, struct pbuf *p, u16_t offset, u16_t length) { pbuf_stream->offset = offset; pbuf_stream->length = length; @@ -54,7 +54,7 @@ snmp_pbuf_stream_init(struct snmp_pbuf_stream* pbuf_stream, struct pbuf* p, u16_ } err_t -snmp_pbuf_stream_read(struct snmp_pbuf_stream* pbuf_stream, u8_t* data) +snmp_pbuf_stream_read(struct snmp_pbuf_stream *pbuf_stream, u8_t *data) { if (pbuf_stream->length == 0) { return ERR_BUF; @@ -71,13 +71,13 @@ snmp_pbuf_stream_read(struct snmp_pbuf_stream* pbuf_stream, u8_t* data) } err_t -snmp_pbuf_stream_write(struct snmp_pbuf_stream* pbuf_stream, u8_t data) +snmp_pbuf_stream_write(struct snmp_pbuf_stream *pbuf_stream, u8_t data) { return snmp_pbuf_stream_writebuf(pbuf_stream, &data, 1); } err_t -snmp_pbuf_stream_writebuf(struct snmp_pbuf_stream* pbuf_stream, const void* buf, u16_t buf_len) +snmp_pbuf_stream_writebuf(struct snmp_pbuf_stream *pbuf_stream, const void *buf, u16_t buf_len) { if (pbuf_stream->length < buf_len) { return ERR_BUF; @@ -94,7 +94,7 @@ snmp_pbuf_stream_writebuf(struct snmp_pbuf_stream* pbuf_stream, const void* buf, } err_t -snmp_pbuf_stream_writeto(struct snmp_pbuf_stream* pbuf_stream, struct snmp_pbuf_stream* target_pbuf_stream, u16_t len) +snmp_pbuf_stream_writeto(struct snmp_pbuf_stream *pbuf_stream, struct snmp_pbuf_stream *target_pbuf_stream, u16_t len) { if ((pbuf_stream == NULL) || (target_pbuf_stream == NULL)) { @@ -112,14 +112,14 @@ snmp_pbuf_stream_writeto(struct snmp_pbuf_stream* pbuf_stream, struct snmp_pbuf_ u16_t chunk_len; err_t err; u16_t target_offset; - struct pbuf* pbuf = pbuf_skip(pbuf_stream->pbuf, pbuf_stream->offset, &target_offset); + struct pbuf *pbuf = pbuf_skip(pbuf_stream->pbuf, pbuf_stream->offset, &target_offset); if ((pbuf == NULL) || (pbuf->len == 0)) { return ERR_BUF; } chunk_len = LWIP_MIN(len, pbuf->len); - err = snmp_pbuf_stream_writebuf(target_pbuf_stream, &((u8_t*)pbuf->payload)[target_offset], chunk_len); + err = snmp_pbuf_stream_writebuf(target_pbuf_stream, &((u8_t *)pbuf->payload)[target_offset], chunk_len); if (err != ERR_OK) { return err; } @@ -133,7 +133,7 @@ snmp_pbuf_stream_writeto(struct snmp_pbuf_stream* pbuf_stream, struct snmp_pbuf_ } err_t -snmp_pbuf_stream_seek(struct snmp_pbuf_stream* pbuf_stream, s32_t offset) +snmp_pbuf_stream_seek(struct snmp_pbuf_stream *pbuf_stream, s32_t offset) { if ((offset < 0) || (offset > pbuf_stream->length)) { /* we cannot seek backwards or forward behind stream end */ @@ -147,7 +147,7 @@ snmp_pbuf_stream_seek(struct snmp_pbuf_stream* pbuf_stream, s32_t offset) } err_t -snmp_pbuf_stream_seek_abs(struct snmp_pbuf_stream* pbuf_stream, u32_t offset) +snmp_pbuf_stream_seek_abs(struct snmp_pbuf_stream *pbuf_stream, u32_t offset) { s32_t rel_offset = offset - pbuf_stream->offset; return snmp_pbuf_stream_seek(pbuf_stream, rel_offset); diff --git a/Libraries/LwIP/src/apps/snmp/snmp_pbuf_stream.h b/Libraries/LwIP/src/apps/snmp/snmp_pbuf_stream.h index 78e37a1..d094fb1 100755 --- a/Libraries/LwIP/src/apps/snmp/snmp_pbuf_stream.h +++ b/Libraries/LwIP/src/apps/snmp/snmp_pbuf_stream.h @@ -49,20 +49,19 @@ extern "C" { #endif -struct snmp_pbuf_stream -{ - struct pbuf* pbuf; +struct snmp_pbuf_stream { + struct pbuf *pbuf; u16_t offset; u16_t length; }; -err_t snmp_pbuf_stream_init(struct snmp_pbuf_stream* pbuf_stream, struct pbuf* p, u16_t offset, u16_t length); -err_t snmp_pbuf_stream_read(struct snmp_pbuf_stream* pbuf_stream, u8_t* data); -err_t snmp_pbuf_stream_write(struct snmp_pbuf_stream* pbuf_stream, u8_t data); -err_t snmp_pbuf_stream_writebuf(struct snmp_pbuf_stream* pbuf_stream, const void* buf, u16_t buf_len); -err_t snmp_pbuf_stream_writeto(struct snmp_pbuf_stream* pbuf_stream, struct snmp_pbuf_stream* target_pbuf_stream, u16_t len); -err_t snmp_pbuf_stream_seek(struct snmp_pbuf_stream* pbuf_stream, s32_t offset); -err_t snmp_pbuf_stream_seek_abs(struct snmp_pbuf_stream* pbuf_stream, u32_t offset); +err_t snmp_pbuf_stream_init(struct snmp_pbuf_stream *pbuf_stream, struct pbuf *p, u16_t offset, u16_t length); +err_t snmp_pbuf_stream_read(struct snmp_pbuf_stream *pbuf_stream, u8_t *data); +err_t snmp_pbuf_stream_write(struct snmp_pbuf_stream *pbuf_stream, u8_t data); +err_t snmp_pbuf_stream_writebuf(struct snmp_pbuf_stream *pbuf_stream, const void *buf, u16_t buf_len); +err_t snmp_pbuf_stream_writeto(struct snmp_pbuf_stream *pbuf_stream, struct snmp_pbuf_stream *target_pbuf_stream, u16_t len); +err_t snmp_pbuf_stream_seek(struct snmp_pbuf_stream *pbuf_stream, s32_t offset); +err_t snmp_pbuf_stream_seek_abs(struct snmp_pbuf_stream *pbuf_stream, u32_t offset); #ifdef __cplusplus } diff --git a/Libraries/LwIP/src/apps/snmp/snmp_raw.c b/Libraries/LwIP/src/apps/snmp/snmp_raw.c index 8d0a07e..912606f 100755 --- a/Libraries/LwIP/src/apps/snmp/snmp_raw.c +++ b/Libraries/LwIP/src/apps/snmp/snmp_raw.c @@ -39,6 +39,7 @@ #include "lwip/udp.h" #include "lwip/ip.h" +#include "lwip/prot/iana.h" #include "snmp_msg.h" /* lwIP UDP receive callback function */ @@ -52,18 +53,18 @@ snmp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, pbuf_free(p); } -err_t +err_t snmp_sendto(void *handle, struct pbuf *p, const ip_addr_t *dst, u16_t port) { - return udp_sendto((struct udp_pcb*)handle, p, dst, port); + return udp_sendto((struct udp_pcb *)handle, p, dst, port); } u8_t -snmp_get_local_ip_for_dst(void* handle, const ip_addr_t *dst, ip_addr_t *result) +snmp_get_local_ip_for_dst(void *handle, const ip_addr_t *dst, ip_addr_t *result) { - struct udp_pcb* udp_pcb = (struct udp_pcb*)handle; + struct udp_pcb *udp_pcb = (struct udp_pcb *)handle; struct netif *dst_if; - const ip_addr_t* dst_ip; + const ip_addr_t *dst_ip; LWIP_UNUSED_ARG(udp_pcb); /* unused in case of IPV4 only configuration */ @@ -86,14 +87,16 @@ void snmp_init(void) { err_t err; - + struct udp_pcb *snmp_pcb = udp_new_ip_type(IPADDR_TYPE_ANY); LWIP_ERROR("snmp_raw: no PCB", (snmp_pcb != NULL), return;); + LWIP_ASSERT_CORE_LOCKED(); + snmp_traps_handle = snmp_pcb; - udp_recv(snmp_pcb, snmp_recv, (void *)SNMP_IN_PORT); - err = udp_bind(snmp_pcb, IP_ANY_TYPE, SNMP_IN_PORT); + udp_recv(snmp_pcb, snmp_recv, NULL); + err = udp_bind(snmp_pcb, IP_ANY_TYPE, LWIP_IANA_PORT_SNMP); LWIP_ERROR("snmp_raw: Unable to bind PCB", (err == ERR_OK), return;); } diff --git a/Libraries/LwIP/src/apps/snmp/snmp_scalar.c b/Libraries/LwIP/src/apps/snmp/snmp_scalar.c index c3f16c6..51eaed1 100755 --- a/Libraries/LwIP/src/apps/snmp/snmp_scalar.c +++ b/Libraries/LwIP/src/apps/snmp/snmp_scalar.c @@ -42,14 +42,14 @@ #include "lwip/apps/snmp_scalar.h" #include "lwip/apps/snmp_core.h" -static s16_t snmp_scalar_array_get_value(struct snmp_node_instance* instance, void* value); -static snmp_err_t snmp_scalar_array_set_test(struct snmp_node_instance* instance, u16_t value_len, void* value); -static snmp_err_t snmp_scalar_array_set_value(struct snmp_node_instance* instance, u16_t value_len, void* value); +static s16_t snmp_scalar_array_get_value(struct snmp_node_instance *instance, void *value); +static snmp_err_t snmp_scalar_array_set_test(struct snmp_node_instance *instance, u16_t value_len, void *value); +static snmp_err_t snmp_scalar_array_set_value(struct snmp_node_instance *instance, u16_t value_len, void *value); -snmp_err_t -snmp_scalar_get_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance) +snmp_err_t +snmp_scalar_get_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance *instance) { - const struct snmp_scalar_node* scalar_node = (const struct snmp_scalar_node*)(const void*)instance->node; + const struct snmp_scalar_node *scalar_node = (const struct snmp_scalar_node *)(const void *)instance->node; LWIP_UNUSED_ARG(root_oid); LWIP_UNUSED_ARG(root_oid_len); @@ -67,8 +67,8 @@ snmp_scalar_get_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_n return SNMP_ERR_NOERROR; } -snmp_err_t -snmp_scalar_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance) +snmp_err_t +snmp_scalar_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance *instance) { /* because our only instance is .0 we can only return a next instance if no instance oid is passed */ if (instance->instance_oid.len == 0) { @@ -83,14 +83,14 @@ snmp_scalar_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, struct s snmp_err_t -snmp_scalar_array_get_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance) +snmp_scalar_array_get_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance *instance) { LWIP_UNUSED_ARG(root_oid); LWIP_UNUSED_ARG(root_oid_len); if ((instance->instance_oid.len == 2) && (instance->instance_oid.id[1] == 0)) { - const struct snmp_scalar_array_node* array_node = (const struct snmp_scalar_array_node*)(const void*)instance->node; - const struct snmp_scalar_array_node_def* array_node_def = array_node->array_nodes; + const struct snmp_scalar_array_node *array_node = (const struct snmp_scalar_array_node *)(const void *)instance->node; + const struct snmp_scalar_array_node_def *array_node_def = array_node->array_nodes; u32_t i = 0; while (i < array_node->array_node_count) { @@ -118,11 +118,11 @@ snmp_scalar_array_get_instance(const u32_t *root_oid, u8_t root_oid_len, struct } snmp_err_t -snmp_scalar_array_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance) +snmp_scalar_array_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance *instance) { - const struct snmp_scalar_array_node* array_node = (const struct snmp_scalar_array_node*)(const void*)instance->node; - const struct snmp_scalar_array_node_def* array_node_def = array_node->array_nodes; - const struct snmp_scalar_array_node_def* result = NULL; + const struct snmp_scalar_array_node *array_node = (const struct snmp_scalar_array_node *)(const void *)instance->node; + const struct snmp_scalar_array_node_def *array_node_def = array_node->array_nodes; + const struct snmp_scalar_array_node_def *result = NULL; LWIP_UNUSED_ARG(root_oid); LWIP_UNUSED_ARG(root_oid_len); @@ -130,7 +130,7 @@ snmp_scalar_array_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, st if ((instance->instance_oid.len == 0) && (array_node->array_node_count > 0)) { /* return node with lowest OID */ u16_t i = 0; - + result = array_node_def; array_node_def++; @@ -142,7 +142,7 @@ snmp_scalar_array_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, st } } else if (instance->instance_oid.len >= 1) { if (instance->instance_oid.len == 1) { - /* if we have the requested OID we return its instance, otherwise we search for the next available */ + /* if we have the requested OID we return its instance, otherwise we search for the next available */ u16_t i = 0; while (i < array_node->array_node_count) { if (array_node_def->oid == instance->instance_oid.id[0]) { @@ -179,7 +179,7 @@ snmp_scalar_array_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, st instance->instance_oid.len = 2; instance->instance_oid.id[0] = result->oid; instance->instance_oid.id[1] = 0; - + instance->access = result->access; instance->asn1_type = result->asn1_type; instance->get_value = snmp_scalar_array_get_value; @@ -191,30 +191,42 @@ snmp_scalar_array_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, st } static s16_t -snmp_scalar_array_get_value(struct snmp_node_instance* instance, void* value) +snmp_scalar_array_get_value(struct snmp_node_instance *instance, void *value) { - const struct snmp_scalar_array_node* array_node = (const struct snmp_scalar_array_node*)(const void*)instance->node; - const struct snmp_scalar_array_node_def* array_node_def = (const struct snmp_scalar_array_node_def*)instance->reference.const_ptr; + s16_t result = -1; + const struct snmp_scalar_array_node *array_node = (const struct snmp_scalar_array_node *)(const void *)instance->node; + const struct snmp_scalar_array_node_def *array_node_def = (const struct snmp_scalar_array_node_def *)instance->reference.const_ptr; - return array_node->get_value(array_node_def, value); + if (array_node->get_value != NULL) { + result = array_node->get_value(array_node_def, value); + } + return result; } static snmp_err_t -snmp_scalar_array_set_test(struct snmp_node_instance* instance, u16_t value_len, void* value) +snmp_scalar_array_set_test(struct snmp_node_instance *instance, u16_t value_len, void *value) { - const struct snmp_scalar_array_node* array_node = (const struct snmp_scalar_array_node*)(const void*)instance->node; - const struct snmp_scalar_array_node_def* array_node_def = (const struct snmp_scalar_array_node_def*)instance->reference.const_ptr; + snmp_err_t result = SNMP_ERR_NOTWRITABLE; + const struct snmp_scalar_array_node *array_node = (const struct snmp_scalar_array_node *)(const void *)instance->node; + const struct snmp_scalar_array_node_def *array_node_def = (const struct snmp_scalar_array_node_def *)instance->reference.const_ptr; - return array_node->set_test(array_node_def, value_len, value); + if (array_node->set_test != NULL) { + result = array_node->set_test(array_node_def, value_len, value); + } + return result; } static snmp_err_t -snmp_scalar_array_set_value(struct snmp_node_instance* instance, u16_t value_len, void* value) +snmp_scalar_array_set_value(struct snmp_node_instance *instance, u16_t value_len, void *value) { - const struct snmp_scalar_array_node* array_node = (const struct snmp_scalar_array_node*)(const void*)instance->node; - const struct snmp_scalar_array_node_def* array_node_def = (const struct snmp_scalar_array_node_def*)instance->reference.const_ptr; + snmp_err_t result = SNMP_ERR_NOTWRITABLE; + const struct snmp_scalar_array_node *array_node = (const struct snmp_scalar_array_node *)(const void *)instance->node; + const struct snmp_scalar_array_node_def *array_node_def = (const struct snmp_scalar_array_node_def *)instance->reference.const_ptr; - return array_node->set_value(array_node_def, value_len, value); + if (array_node->set_value != NULL) { + result = array_node->set_value(array_node_def, value_len, value); + } + return result; } #endif /* LWIP_SNMP */ diff --git a/Libraries/LwIP/src/apps/snmp/snmp_snmpv2_framework.c b/Libraries/LwIP/src/apps/snmp/snmp_snmpv2_framework.c new file mode 100644 index 0000000..a5611db --- /dev/null +++ b/Libraries/LwIP/src/apps/snmp/snmp_snmpv2_framework.c @@ -0,0 +1,90 @@ +/* +Generated by LwipMibCompiler +*/ + +#include "lwip/apps/snmp_opts.h" + +#if LWIP_SNMP && LWIP_SNMP_V3 /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/apps/snmp_snmpv2_framework.h" +#include "lwip/apps/snmp.h" +#include "lwip/apps/snmp_core.h" +#include "lwip/apps/snmp_scalar.h" +#include "lwip/apps/snmp_table.h" +#include "lwip/apps/snmpv3.h" +#include "snmpv3_priv.h" + +#include "lwip/sys.h" + +#include + +const struct snmp_obj_id usmNoAuthProtocol = { 10, { 1, 3, 6, 1, 6, 3, 10, 1, 1, 1 } }; +const struct snmp_obj_id usmHMACMD5AuthProtocol = { 10, { 1, 3, 6, 1, 6, 3, 10, 1, 1, 2 } }; +const struct snmp_obj_id usmHMACSHAAuthProtocol = { 10, { 1, 3, 6, 1, 6, 3, 10, 1, 1, 3 } }; +/* .4 sha-224 + * .5 sha-256 + * .6 sha-384 + * .7 sha-512 + */ + +const struct snmp_obj_id usmNoPrivProtocol = { 10, { 1, 3, 6, 1, 6, 3, 10, 1, 2, 1 } }; +const struct snmp_obj_id usmDESPrivProtocol = { 10, { 1, 3, 6, 1, 6, 3, 10, 1, 2, 2 } }; +/* .3 3des-ede */ +const struct snmp_obj_id usmAESPrivProtocol = { 10, { 1, 3, 6, 1, 6, 3, 10, 1, 2, 4 } }; +/* .5 unknown + * .6 unknown + * .7 unknown + */ + +/* TODO: where should this value come from? */ +#define SNMP_FRAMEWORKMIB_SNMPENGINEMAXMESSAGESIZE 1500 + +/* --- snmpFrameworkMIBObjects 1.3.6.1.6.3.10.2 ----------------------------------------------------- */ +static s16_t snmpengine_scalars_get_value(const struct snmp_scalar_array_node_def *node, void *value) +{ + const char *engineid; + u8_t engineid_len; + + switch (node->oid) { + case 1: /* snmpEngineID */ + snmpv3_get_engine_id(&engineid, &engineid_len); + MEMCPY(value, engineid, engineid_len); + return engineid_len; + case 2: /* snmpEngineBoots */ + *(s32_t *)value = snmpv3_get_engine_boots_internal(); + return sizeof(s32_t); + case 3: /* snmpEngineTime */ + *(s32_t *)value = snmpv3_get_engine_time_internal(); + return sizeof(s32_t); + case 4: /* snmpEngineMaxMessageSize */ + *(s32_t *)value = SNMP_FRAMEWORKMIB_SNMPENGINEMAXMESSAGESIZE; + return sizeof(s32_t); + default: + LWIP_DEBUGF(SNMP_MIB_DEBUG, ("snmpengine_scalars_get_value(): unknown id: %"S32_F"\n", node->oid)); + return 0; + } +} + +static const struct snmp_scalar_array_node_def snmpengine_scalars_nodes[] = { + {1, SNMP_ASN1_TYPE_OCTET_STRING, SNMP_NODE_INSTANCE_READ_ONLY}, /* snmpEngineID */ + {2, SNMP_ASN1_TYPE_INTEGER, SNMP_NODE_INSTANCE_READ_ONLY}, /* snmpEngineBoots */ + {3, SNMP_ASN1_TYPE_INTEGER, SNMP_NODE_INSTANCE_READ_ONLY}, /* snmpEngineTime */ + {4, SNMP_ASN1_TYPE_INTEGER, SNMP_NODE_INSTANCE_READ_ONLY}, /* snmpEngineMaxMessageSize */ +}; +static const struct snmp_scalar_array_node snmpengine_scalars = SNMP_SCALAR_CREATE_ARRAY_NODE(1, snmpengine_scalars_nodes, snmpengine_scalars_get_value, NULL, NULL); + +static const struct snmp_node *const snmpframeworkmibobjects_subnodes[] = { + &snmpengine_scalars.node.node +}; +static const struct snmp_tree_node snmpframeworkmibobjects_treenode = SNMP_CREATE_TREE_NODE(2, snmpframeworkmibobjects_subnodes); + +/* --- snmpFrameworkMIB ----------------------------------------------------- */ +static const struct snmp_node *const snmpframeworkmib_subnodes[] = { + &snmpframeworkmibobjects_treenode.node +}; +static const struct snmp_tree_node snmpframeworkmib_root = SNMP_CREATE_TREE_NODE(10, snmpframeworkmib_subnodes); +static const u32_t snmpframeworkmib_base_oid[] = {1, 3, 6, 1, 6, 3, 10}; +const struct snmp_mib snmpframeworkmib = {snmpframeworkmib_base_oid, LWIP_ARRAYSIZE(snmpframeworkmib_base_oid), &snmpframeworkmib_root.node}; + +/* --- snmpFrameworkMIB ----------------------------------------------------- */ +#endif /* LWIP_SNMP */ diff --git a/Libraries/LwIP/src/apps/snmp/snmp_snmpv2_usm.c b/Libraries/LwIP/src/apps/snmp/snmp_snmpv2_usm.c new file mode 100644 index 0000000..7490c9c --- /dev/null +++ b/Libraries/LwIP/src/apps/snmp/snmp_snmpv2_usm.c @@ -0,0 +1,410 @@ +/* +Generated by LwipMibCompiler +*/ + +#include "lwip/apps/snmp_opts.h" +#if LWIP_SNMP && LWIP_SNMP_V3 + +#include "lwip/apps/snmp_snmpv2_usm.h" +#include "lwip/apps/snmp.h" +#include "lwip/apps/snmp_core.h" +#include "lwip/apps/snmp_scalar.h" +#include "lwip/apps/snmp_table.h" +#include "lwip/apps/snmpv3.h" +#include "snmpv3_priv.h" + +#include "lwip/apps/snmp_snmpv2_framework.h" + +#include + +/* --- usmUser 1.3.6.1.6.3.15.1.2 ----------------------------------------------------- */ + +static const struct snmp_oid_range usmUserTable_oid_ranges[] = { + { 0, 0xff }, { 0, 0xff }, { 0, 0xff }, { 0, 0xff }, + { 0, 0xff }, { 0, 0xff }, { 0, 0xff }, { 0, 0xff }, + { 0, 0xff }, { 0, 0xff }, { 0, 0xff }, { 0, 0xff }, + { 0, 0xff }, { 0, 0xff }, { 0, 0xff }, { 0, 0xff }, + { 0, 0xff }, { 0, 0xff }, { 0, 0xff }, { 0, 0xff }, + { 0, 0xff }, { 0, 0xff }, { 0, 0xff }, { 0, 0xff }, + { 0, 0xff }, { 0, 0xff }, { 0, 0xff }, { 0, 0xff }, + { 0, 0xff }, { 0, 0xff }, { 0, 0xff }, { 0, 0xff } +}; + +static void snmp_engineid_to_oid(const char *engineid, u32_t *oid, u32_t len) +{ + u8_t i; + + for (i = 0; i < len; i++) { + oid[i] = engineid[i]; + } +} + +static void snmp_oid_to_name(char *name, const u32_t *oid, size_t len) +{ + u8_t i; + + for (i = 0; i < len; i++) { + name[i] = (char)oid[i]; + } +} + +static void snmp_name_to_oid(const char *name, u32_t *oid, size_t len) +{ + u8_t i; + + for (i = 0; i < len; i++) { + oid[i] = name[i]; + } +} + +static const struct snmp_obj_id *snmp_auth_algo_to_oid(snmpv3_auth_algo_t algo) +{ + if (algo == SNMP_V3_AUTH_ALGO_MD5) { + return &usmHMACMD5AuthProtocol; + } else if (algo == SNMP_V3_AUTH_ALGO_SHA) { + return &usmHMACMD5AuthProtocol; + } + + return &usmNoAuthProtocol; +} + +static const struct snmp_obj_id *snmp_priv_algo_to_oid(snmpv3_priv_algo_t algo) +{ + if (algo == SNMP_V3_PRIV_ALGO_DES) { + return &usmDESPrivProtocol; + } else if (algo == SNMP_V3_PRIV_ALGO_AES) { + return &usmAESPrivProtocol; + } + + return &usmNoPrivProtocol; +} + +char username[32]; + +static snmp_err_t usmusertable_get_instance(const u32_t *column, const u32_t *row_oid, u8_t row_oid_len, struct snmp_node_instance *cell_instance) +{ + const char *engineid; + u8_t eid_len; + + u32_t engineid_oid[SNMP_V3_MAX_ENGINE_ID_LENGTH]; + + u8_t name_len; + u8_t engineid_len; + + u8_t name_start; + u8_t engineid_start; + + LWIP_UNUSED_ARG(column); + + snmpv3_get_engine_id(&engineid, &eid_len); + + engineid_len = (u8_t)row_oid[0]; + engineid_start = 1; + + if (engineid_len != eid_len) { + /* EngineID length does not match! */ + return SNMP_ERR_NOSUCHINSTANCE; + } + + if (engineid_len > row_oid_len) { + /* row OID doesn't contain enough data according to engineid_len.*/ + return SNMP_ERR_NOSUCHINSTANCE; + } + + /* check if incoming OID length and if values are in plausible range */ + if (!snmp_oid_in_range(&row_oid[engineid_start], engineid_len, usmUserTable_oid_ranges, engineid_len)) { + return SNMP_ERR_NOSUCHINSTANCE; + } + + snmp_engineid_to_oid(engineid, engineid_oid, engineid_len); + + /* Verify EngineID */ + if (snmp_oid_equal(&row_oid[engineid_start], engineid_len, engineid_oid, engineid_len)) { + return SNMP_ERR_NOSUCHINSTANCE; + } + + name_len = (u8_t)row_oid[engineid_start + engineid_len]; + name_start = engineid_start + engineid_len + 1; + + if (name_len > SNMP_V3_MAX_USER_LENGTH) { + /* specified name is too long */ + return SNMP_ERR_NOSUCHINSTANCE; + } + + if (1 + engineid_len + 1 + name_len != row_oid_len) { + /* Length of EngineID and name does not match row oid length. (+2 for length fields)*/ + return SNMP_ERR_NOSUCHINSTANCE; + } + + /* check if incoming OID length and if values are in plausible range */ + if (!snmp_oid_in_range(&row_oid[name_start], name_len, usmUserTable_oid_ranges, name_len)) { + return SNMP_ERR_NOSUCHINSTANCE; + } + + /* Verify if user exists */ + memset(username, 0, sizeof(username)); + snmp_oid_to_name(username, &row_oid[name_start], name_len); + if (snmpv3_get_user(username, NULL, NULL, NULL, NULL) != ERR_OK) { + return SNMP_ERR_NOSUCHINSTANCE; + } + + /* Save name in reference pointer to make it easier to handle later on */ + cell_instance->reference.ptr = username; + cell_instance->reference_len = name_len; + + /* user was found */ + return SNMP_ERR_NOERROR; +} + +/* + * valid oid options + * + * . + * .. + * .. + * ... + * .... + * .... + * + */ +static snmp_err_t usmusertable_get_next_instance(const u32_t *column, struct snmp_obj_id *row_oid, struct snmp_node_instance *cell_instance) +{ + const char *engineid; + u8_t eid_len; + + u32_t engineid_oid[SNMP_V3_MAX_ENGINE_ID_LENGTH]; + + u8_t name_len; + u8_t engineid_len; + + u8_t name_start; + u8_t engineid_start = 1; + u8_t i; + + struct snmp_next_oid_state state; + + u32_t result_temp[LWIP_ARRAYSIZE(usmUserTable_oid_ranges)]; + + LWIP_UNUSED_ARG(column); + + snmpv3_get_engine_id(&engineid, &eid_len); + + /* If EngineID might be given */ + if (row_oid->len > 0) { + engineid_len = (u8_t)row_oid->id[0]; + engineid_start = 1; + + if (engineid_len != eid_len) { + /* EngineID length does not match! */ + return SNMP_ERR_NOSUCHINSTANCE; + } + + if (engineid_len > row_oid->len) { + /* Verify partial EngineID */ + snmp_engineid_to_oid(engineid, engineid_oid, row_oid->len - 1); + if (!snmp_oid_equal(&row_oid->id[engineid_start], row_oid->len - 1, engineid_oid, row_oid->len - 1)) { + return SNMP_ERR_NOSUCHINSTANCE; + } + } else { + /* Verify complete EngineID */ + snmp_engineid_to_oid(engineid, engineid_oid, engineid_len); + if (!snmp_oid_equal(&row_oid->id[engineid_start], engineid_len, engineid_oid, engineid_len)) { + return SNMP_ERR_NOSUCHINSTANCE; + } + } + + /* At this point, the given EngineID (partially) matches the local EngineID.*/ + + /* If name might also be given */ + if (row_oid->len > engineid_start + engineid_len) { + name_len = (u8_t)row_oid->id[engineid_start + engineid_len]; + name_start = engineid_start + engineid_len + 1; + + if (name_len > SNMP_V3_MAX_USER_LENGTH) { + /* specified name is too long, max length is 32 according to mib file.*/ + return SNMP_ERR_NOSUCHINSTANCE; + } + + if (row_oid->len < engineid_len + name_len + 2) { + /* Partial name given according to oid.*/ + u8_t tmplen = row_oid->len - engineid_len - 2; + if (!snmp_oid_in_range(&row_oid->id[name_start], tmplen, usmUserTable_oid_ranges, tmplen)) { + return SNMP_ERR_NOSUCHINSTANCE; + } + } else { + /* Full name given according to oid. Also test for too much data.*/ + u8_t tmplen = row_oid->len - engineid_len - 2; + if (!snmp_oid_in_range(&row_oid->id[name_start], name_len, usmUserTable_oid_ranges, tmplen)) { + return SNMP_ERR_NOSUCHINSTANCE; + } + } + + /* At this point the EngineID and (partial) UserName match the local EngineID and UserName.*/ + } + } + + /* init struct to search next oid */ + snmp_next_oid_init(&state, row_oid->id, row_oid->len, result_temp, LWIP_ARRAYSIZE(usmUserTable_oid_ranges)); + + for (i = 0; i < snmpv3_get_amount_of_users(); i++) { + u32_t test_oid[LWIP_ARRAYSIZE(usmUserTable_oid_ranges)]; + + test_oid[0] = eid_len; + snmp_engineid_to_oid(engineid, &test_oid[1], eid_len); + + snmpv3_get_username(username, i); + + test_oid[1 + eid_len] = strlen(username); + snmp_name_to_oid(username, &test_oid[2 + eid_len], strlen(username)); + + /* check generated OID: is it a candidate for the next one? */ + snmp_next_oid_check(&state, test_oid, (u8_t)(1 + eid_len + 1 + strlen(username)), LWIP_PTR_NUMERIC_CAST(void *, i)); + } + + /* did we find a next one? */ + if (state.status == SNMP_NEXT_OID_STATUS_SUCCESS) { + snmp_oid_assign(row_oid, state.next_oid, state.next_oid_len); + /* store username for subsequent operations (get/test/set) */ + memset(username, 0, sizeof(username)); + snmpv3_get_username(username, LWIP_PTR_NUMERIC_CAST(u8_t, state.reference)); + cell_instance->reference.ptr = username; + cell_instance->reference_len = strlen(username); + return SNMP_ERR_NOERROR; + } + + /* not found */ + return SNMP_ERR_NOSUCHINSTANCE; +} + +static s16_t usmusertable_get_value(struct snmp_node_instance *cell_instance, void *value) +{ + snmpv3_user_storagetype_t storage_type; + + switch (SNMP_TABLE_GET_COLUMN_FROM_OID(cell_instance->instance_oid.id)) { + case 3: /* usmUserSecurityName */ + MEMCPY(value, cell_instance->reference.ptr, cell_instance->reference_len); + return (s16_t)cell_instance->reference_len; + case 4: /* usmUserCloneFrom */ + MEMCPY(value, snmp_zero_dot_zero.id, snmp_zero_dot_zero.len * sizeof(u32_t)); + return snmp_zero_dot_zero.len * sizeof(u32_t); + case 5: { /* usmUserAuthProtocol */ + const struct snmp_obj_id *auth_algo; + snmpv3_auth_algo_t auth_algo_val; + snmpv3_get_user((const char *)cell_instance->reference.ptr, &auth_algo_val, NULL, NULL, NULL); + auth_algo = snmp_auth_algo_to_oid(auth_algo_val); + MEMCPY(value, auth_algo->id, auth_algo->len * sizeof(u32_t)); + return auth_algo->len * sizeof(u32_t); + } + case 6: /* usmUserAuthKeyChange */ + return 0; + case 7: /* usmUserOwnAuthKeyChange */ + return 0; + case 8: { /* usmUserPrivProtocol */ + const struct snmp_obj_id *priv_algo; + snmpv3_priv_algo_t priv_algo_val; + snmpv3_get_user((const char *)cell_instance->reference.ptr, NULL, NULL, &priv_algo_val, NULL); + priv_algo = snmp_priv_algo_to_oid(priv_algo_val); + MEMCPY(value, priv_algo->id, priv_algo->len * sizeof(u32_t)); + return priv_algo->len * sizeof(u32_t); + } + case 9: /* usmUserPrivKeyChange */ + return 0; + case 10: /* usmUserOwnPrivKeyChange */ + return 0; + case 11: /* usmUserPublic */ + /* TODO: Implement usmUserPublic */ + return 0; + case 12: /* usmUserStorageType */ + snmpv3_get_user_storagetype((const char *)cell_instance->reference.ptr, &storage_type); + *(s32_t *)value = storage_type; + return sizeof(s32_t); + case 13: /* usmUserStatus */ + *(s32_t *)value = 1; /* active */ + return sizeof(s32_t); + default: + LWIP_DEBUGF(SNMP_MIB_DEBUG, ("usmusertable_get_value(): unknown id: %"S32_F"\n", SNMP_TABLE_GET_COLUMN_FROM_OID(cell_instance->instance_oid.id))); + return 0; + } +} + +/* --- usmMIBObjects 1.3.6.1.6.3.15.1 ----------------------------------------------------- */ +static s16_t usmstats_scalars_get_value(const struct snmp_scalar_array_node_def *node, void *value) +{ + u32_t *uint_ptr = (u32_t *)value; + switch (node->oid) { + case 1: /* usmStatsUnsupportedSecLevels */ + *uint_ptr = snmp_stats.unsupportedseclevels; + break; + case 2: /* usmStatsNotInTimeWindows */ + *uint_ptr = snmp_stats.notintimewindows; + break; + case 3: /* usmStatsUnknownUserNames */ + *uint_ptr = snmp_stats.unknownusernames; + break; + case 4: /* usmStatsUnknownEngineIDs */ + *uint_ptr = snmp_stats.unknownengineids; + break; + case 5: /* usmStatsWrongDigests */ + *uint_ptr = snmp_stats.wrongdigests; + break; + case 6: /* usmStatsDecryptionErrors */ + *uint_ptr = snmp_stats.decryptionerrors; + break; + default: + LWIP_DEBUGF(SNMP_MIB_DEBUG, ("usmstats_scalars_get_value(): unknown id: %"S32_F"\n", node->oid)); + return 0; + } + + return sizeof(*uint_ptr); +} + +/* --- snmpUsmMIB ----------------------------------------------------- */ + +/* --- usmUser 1.3.6.1.6.3.15.1.2 ----------------------------------------------------- */ + +static const struct snmp_table_col_def usmusertable_columns[] = { + {3, SNMP_ASN1_TYPE_OCTET_STRING, SNMP_NODE_INSTANCE_READ_ONLY}, /* usmUserSecurityName */ + {4, SNMP_ASN1_TYPE_OBJECT_ID, SNMP_NODE_INSTANCE_READ_ONLY}, /* usmUserCloneFrom */ + {5, SNMP_ASN1_TYPE_OBJECT_ID, SNMP_NODE_INSTANCE_READ_ONLY}, /* usmUserAuthProtocol */ + {6, SNMP_ASN1_TYPE_OCTET_STRING, SNMP_NODE_INSTANCE_READ_ONLY}, /* usmUserAuthKeyChange */ + {7, SNMP_ASN1_TYPE_OCTET_STRING, SNMP_NODE_INSTANCE_READ_ONLY}, /* usmUserOwnAuthKeyChange */ + {8, SNMP_ASN1_TYPE_OBJECT_ID, SNMP_NODE_INSTANCE_READ_ONLY}, /* usmUserPrivProtocol */ + {9, SNMP_ASN1_TYPE_OCTET_STRING, SNMP_NODE_INSTANCE_READ_ONLY}, /* usmUserPrivKeyChange */ + {10, SNMP_ASN1_TYPE_OCTET_STRING, SNMP_NODE_INSTANCE_READ_ONLY}, /* usmUserOwnPrivKeyChange */ + {11, SNMP_ASN1_TYPE_OCTET_STRING, SNMP_NODE_INSTANCE_READ_ONLY}, /* usmUserPublic */ + {12, SNMP_ASN1_TYPE_INTEGER, SNMP_NODE_INSTANCE_READ_ONLY}, /* usmUserStorageType */ + {13, SNMP_ASN1_TYPE_INTEGER, SNMP_NODE_INSTANCE_READ_ONLY}, /* usmUserStatus */ +}; +static const struct snmp_table_node usmusertable = SNMP_TABLE_CREATE(2, usmusertable_columns, usmusertable_get_instance, usmusertable_get_next_instance, usmusertable_get_value, NULL, NULL); + +static const struct snmp_node *const usmuser_subnodes[] = { + &usmusertable.node.node +}; +static const struct snmp_tree_node usmuser_treenode = SNMP_CREATE_TREE_NODE(2, usmuser_subnodes); + +/* --- usmMIBObjects 1.3.6.1.6.3.15.1 ----------------------------------------------------- */ +static const struct snmp_scalar_array_node_def usmstats_scalars_nodes[] = { + {1, SNMP_ASN1_TYPE_COUNTER, SNMP_NODE_INSTANCE_READ_ONLY}, /* usmStatsUnsupportedSecLevels */ + {2, SNMP_ASN1_TYPE_COUNTER, SNMP_NODE_INSTANCE_READ_ONLY}, /* usmStatsNotInTimeWindows */ + {3, SNMP_ASN1_TYPE_COUNTER, SNMP_NODE_INSTANCE_READ_ONLY}, /* usmStatsUnknownUserNames */ + {4, SNMP_ASN1_TYPE_COUNTER, SNMP_NODE_INSTANCE_READ_ONLY}, /* usmStatsUnknownEngineIDs */ + {5, SNMP_ASN1_TYPE_COUNTER, SNMP_NODE_INSTANCE_READ_ONLY}, /* usmStatsWrongDigests */ + {6, SNMP_ASN1_TYPE_COUNTER, SNMP_NODE_INSTANCE_READ_ONLY}, /* usmStatsDecryptionErrors */ +}; +static const struct snmp_scalar_array_node usmstats_scalars = SNMP_SCALAR_CREATE_ARRAY_NODE(1, usmstats_scalars_nodes, usmstats_scalars_get_value, NULL, NULL); + +static const struct snmp_node *const usmmibobjects_subnodes[] = { + &usmstats_scalars.node.node, + &usmuser_treenode.node +}; +static const struct snmp_tree_node usmmibobjects_treenode = SNMP_CREATE_TREE_NODE(1, usmmibobjects_subnodes); + +/* --- snmpUsmMIB ----------------------------------------------------- */ +static const struct snmp_node *const snmpusmmib_subnodes[] = { + &usmmibobjects_treenode.node +}; +static const struct snmp_tree_node snmpusmmib_root = SNMP_CREATE_TREE_NODE(15, snmpusmmib_subnodes); +static const u32_t snmpusmmib_base_oid[] = {1, 3, 6, 1, 6, 3, 15}; +const struct snmp_mib snmpusmmib = {snmpusmmib_base_oid, LWIP_ARRAYSIZE(snmpusmmib_base_oid), &snmpusmmib_root.node}; + +#endif /* LWIP_SNMP */ diff --git a/Libraries/LwIP/src/apps/snmp/snmp_table.c b/Libraries/LwIP/src/apps/snmp/snmp_table.c index aeb41ca..55d744b 100755 --- a/Libraries/LwIP/src/apps/snmp/snmp_table.c +++ b/Libraries/LwIP/src/apps/snmp/snmp_table.c @@ -43,10 +43,10 @@ #include "lwip/apps/snmp_table.h" #include -snmp_err_t snmp_table_get_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance) +snmp_err_t snmp_table_get_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance *instance) { snmp_err_t ret = SNMP_ERR_NOSUCHINSTANCE; - const struct snmp_table_node* table_node = (const struct snmp_table_node*)(const void*)instance->node; + const struct snmp_table_node *table_node = (const struct snmp_table_node *)(const void *)instance->node; LWIP_UNUSED_ARG(root_oid); LWIP_UNUSED_ARG(root_oid_len); @@ -55,13 +55,13 @@ snmp_err_t snmp_table_get_instance(const u32_t *root_oid, u8_t root_oid_len, str /* fixed row entry always has oid 1 */ if ((instance->instance_oid.len >= 3) && (instance->instance_oid.id[0] == 1)) { /* search column */ - const struct snmp_table_col_def* col_def = table_node->columns; + const struct snmp_table_col_def *col_def = table_node->columns; u16_t i = table_node->column_count; while (i > 0) { if (col_def->index == instance->instance_oid.id[1]) { break; } - + col_def++; i--; } @@ -75,20 +75,20 @@ snmp_err_t snmp_table_get_instance(const u32_t *root_oid, u8_t root_oid_len, str instance->set_value = table_node->set_value; ret = table_node->get_cell_instance( - &(instance->instance_oid.id[1]), - &(instance->instance_oid.id[2]), - instance->instance_oid.len-2, - instance); + &(instance->instance_oid.id[1]), + &(instance->instance_oid.id[2]), + instance->instance_oid.len - 2, + instance); } } return ret; } -snmp_err_t snmp_table_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance) +snmp_err_t snmp_table_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance *instance) { - const struct snmp_table_node* table_node = (const struct snmp_table_node*)(const void*)instance->node; - const struct snmp_table_col_def* col_def; + const struct snmp_table_node *table_node = (const struct snmp_table_node *)(const void *)instance->node; + const struct snmp_table_col_def *col_def; struct snmp_obj_id row_oid; u32_t column = 0; snmp_err_t result; @@ -116,7 +116,7 @@ snmp_err_t snmp_table_get_next_instance(const u32_t *root_oid, u8_t root_oid_len /* resolve column and value */ do { u16_t i; - const struct snmp_table_col_def* next_col_def = NULL; + const struct snmp_table_col_def *next_col_def = NULL; col_def = table_node->columns; for (i = 0; i < table_node->column_count; i++) { @@ -138,9 +138,9 @@ snmp_err_t snmp_table_get_next_instance(const u32_t *root_oid, u8_t root_oid_len instance->access = next_col_def->access; result = table_node->get_next_cell_instance( - &next_col_def->index, - &row_oid, - instance); + &next_col_def->index, + &row_oid, + instance); if (result == SNMP_ERR_NOERROR) { col_def = next_col_def; @@ -161,10 +161,10 @@ snmp_err_t snmp_table_get_next_instance(const u32_t *root_oid, u8_t root_oid_len } -snmp_err_t snmp_table_simple_get_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance) +snmp_err_t snmp_table_simple_get_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance *instance) { snmp_err_t ret = SNMP_ERR_NOSUCHINSTANCE; - const struct snmp_table_simple_node* table_node = (const struct snmp_table_simple_node*)(const void*)instance->node; + const struct snmp_table_simple_node *table_node = (const struct snmp_table_simple_node *)(const void *)instance->node; LWIP_UNUSED_ARG(root_oid); LWIP_UNUSED_ARG(root_oid_len); @@ -173,15 +173,15 @@ snmp_err_t snmp_table_simple_get_instance(const u32_t *root_oid, u8_t root_oid_l /* fixed row entry always has oid 1 */ if ((instance->instance_oid.len >= 3) && (instance->instance_oid.id[0] == 1)) { ret = table_node->get_cell_value( - &(instance->instance_oid.id[1]), - &(instance->instance_oid.id[2]), - instance->instance_oid.len-2, - &instance->reference, - &instance->reference_len); + &(instance->instance_oid.id[1]), + &(instance->instance_oid.id[2]), + instance->instance_oid.len - 2, + &instance->reference, + &instance->reference_len); if (ret == SNMP_ERR_NOERROR) { /* search column */ - const struct snmp_table_simple_col_def* col_def = table_node->columns; + const struct snmp_table_simple_col_def *col_def = table_node->columns; u32_t i = table_node->column_count; while (i > 0) { if (col_def->index == instance->instance_oid.id[1]) { @@ -212,22 +212,22 @@ snmp_err_t snmp_table_simple_get_instance(const u32_t *root_oid, u8_t root_oid_l default: LWIP_DEBUGF(SNMP_DEBUG, ("snmp_table_simple_get_instance(): unknown column data_type: %d\n", col_def->data_type)); return SNMP_ERR_GENERROR; - } + } ret = SNMP_ERR_NOERROR; } else { ret = SNMP_ERR_NOSUCHINSTANCE; } - } + } } return ret; } -snmp_err_t snmp_table_simple_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance) +snmp_err_t snmp_table_simple_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance *instance) { - const struct snmp_table_simple_node* table_node = (const struct snmp_table_simple_node*)(const void*)instance->node; - const struct snmp_table_simple_col_def* col_def; + const struct snmp_table_simple_node *table_node = (const struct snmp_table_simple_node *)(const void *)instance->node; + const struct snmp_table_simple_col_def *col_def; struct snmp_obj_id row_oid; u32_t column = 0; snmp_err_t result; @@ -251,7 +251,7 @@ snmp_err_t snmp_table_simple_get_next_instance(const u32_t *root_oid, u8_t root_ /* resolve column and value */ do { u32_t i; - const struct snmp_table_simple_col_def* next_col_def = NULL; + const struct snmp_table_simple_col_def *next_col_def = NULL; col_def = table_node->columns; for (i = 0; i < table_node->column_count; i++) { @@ -271,10 +271,10 @@ snmp_err_t snmp_table_simple_get_next_instance(const u32_t *root_oid, u8_t root_ } result = table_node->get_next_cell_instance_and_value( - &next_col_def->index, - &row_oid, - &instance->reference, - &instance->reference_len); + &next_col_def->index, + &row_oid, + &instance->reference, + &instance->reference_len); if (result == SNMP_ERR_NOERROR) { col_def = next_col_def; @@ -283,8 +283,7 @@ snmp_err_t snmp_table_simple_get_next_instance(const u32_t *root_oid, u8_t root_ row_oid.len = 0; /* reset row_oid because we switch to next column and start with the first entry there */ column = next_col_def->index + 1; - } - while (1); + } while (1); instance->asn1_type = col_def->asn1_type; instance->access = SNMP_NODE_INSTANCE_READ_ONLY; @@ -318,23 +317,23 @@ snmp_err_t snmp_table_simple_get_next_instance(const u32_t *root_oid, u8_t root_ s16_t -snmp_table_extract_value_from_s32ref(struct snmp_node_instance* instance, void* value) +snmp_table_extract_value_from_s32ref(struct snmp_node_instance *instance, void *value) { - s32_t *dst = (s32_t*)value; + s32_t *dst = (s32_t *)value; *dst = instance->reference.s32; return sizeof(*dst); } s16_t -snmp_table_extract_value_from_u32ref(struct snmp_node_instance* instance, void* value) +snmp_table_extract_value_from_u32ref(struct snmp_node_instance *instance, void *value) { - u32_t *dst = (u32_t*)value; + u32_t *dst = (u32_t *)value; *dst = instance->reference.u32; return sizeof(*dst); } s16_t -snmp_table_extract_value_from_refconstptr(struct snmp_node_instance* instance, void* value) +snmp_table_extract_value_from_refconstptr(struct snmp_node_instance *instance, void *value) { MEMCPY(value, instance->reference.const_ptr, instance->reference_len); return (u16_t)instance->reference_len; diff --git a/Libraries/LwIP/src/apps/snmp/snmp_threadsync.c b/Libraries/LwIP/src/apps/snmp/snmp_threadsync.c index 1c7b0cf..764856d 100755 --- a/Libraries/LwIP/src/apps/snmp/snmp_threadsync.c +++ b/Libraries/LwIP/src/apps/snmp/snmp_threadsync.c @@ -40,7 +40,7 @@ #include "lwip/apps/snmp_core.h" #include "lwip/sys.h" #include - + static void call_synced_function(struct threadsync_data *call_data, snmp_threadsync_called_fn fn) { @@ -53,17 +53,21 @@ call_synced_function(struct threadsync_data *call_data, snmp_threadsync_called_f static void threadsync_get_value_synced(void *ctx) { - struct threadsync_data *call_data = (struct threadsync_data*)ctx; + struct threadsync_data *call_data = (struct threadsync_data *)ctx; - call_data->retval.s16 = call_data->proxy_instance.get_value(&call_data->proxy_instance, call_data->arg1.value); + if (call_data->proxy_instance.get_value != NULL) { + call_data->retval.s16 = call_data->proxy_instance.get_value(&call_data->proxy_instance, call_data->arg1.value); + } else { + call_data->retval.s16 = -1; + } sys_sem_signal(&call_data->threadsync_node->instance->sem); } static s16_t -threadsync_get_value(struct snmp_node_instance* instance, void* value) +threadsync_get_value(struct snmp_node_instance *instance, void *value) { - struct threadsync_data *call_data = (struct threadsync_data*)instance->reference.ptr; + struct threadsync_data *call_data = (struct threadsync_data *)instance->reference.ptr; call_data->arg1.value = value; call_synced_function(call_data, threadsync_get_value_synced); @@ -74,17 +78,21 @@ threadsync_get_value(struct snmp_node_instance* instance, void* value) static void threadsync_set_test_synced(void *ctx) { - struct threadsync_data *call_data = (struct threadsync_data*)ctx; + struct threadsync_data *call_data = (struct threadsync_data *)ctx; - call_data->retval.err = call_data->proxy_instance.set_test(&call_data->proxy_instance, call_data->arg2.len, call_data->arg1.value); + if (call_data->proxy_instance.set_test != NULL) { + call_data->retval.err = call_data->proxy_instance.set_test(&call_data->proxy_instance, call_data->arg2.len, call_data->arg1.value); + } else { + call_data->retval.err = SNMP_ERR_NOTWRITABLE; + } sys_sem_signal(&call_data->threadsync_node->instance->sem); } static snmp_err_t -threadsync_set_test(struct snmp_node_instance* instance, u16_t len, void *value) +threadsync_set_test(struct snmp_node_instance *instance, u16_t len, void *value) { - struct threadsync_data *call_data = (struct threadsync_data*)instance->reference.ptr; + struct threadsync_data *call_data = (struct threadsync_data *)instance->reference.ptr; call_data->arg1.value = value; call_data->arg2.len = len; @@ -96,30 +104,34 @@ threadsync_set_test(struct snmp_node_instance* instance, u16_t len, void *value) static void threadsync_set_value_synced(void *ctx) { - struct threadsync_data *call_data = (struct threadsync_data*)ctx; + struct threadsync_data *call_data = (struct threadsync_data *)ctx; - call_data->retval.err = call_data->proxy_instance.set_value(&call_data->proxy_instance, call_data->arg2.len, call_data->arg1.value); + if (call_data->proxy_instance.set_value != NULL) { + call_data->retval.err = call_data->proxy_instance.set_value(&call_data->proxy_instance, call_data->arg2.len, call_data->arg1.value); + } else { + call_data->retval.err = SNMP_ERR_NOTWRITABLE; + } sys_sem_signal(&call_data->threadsync_node->instance->sem); } static snmp_err_t -threadsync_set_value(struct snmp_node_instance* instance, u16_t len, void *value) +threadsync_set_value(struct snmp_node_instance *instance, u16_t len, void *value) { - struct threadsync_data *call_data = (struct threadsync_data*)instance->reference.ptr; + struct threadsync_data *call_data = (struct threadsync_data *)instance->reference.ptr; call_data->arg1.value = value; call_data->arg2.len = len; call_synced_function(call_data, threadsync_set_value_synced); - + return call_data->retval.err; } static void -threadsync_release_instance_synced(void* ctx) +threadsync_release_instance_synced(void *ctx) { - struct threadsync_data *call_data = (struct threadsync_data*)ctx; - + struct threadsync_data *call_data = (struct threadsync_data *)ctx; + call_data->proxy_instance.release_instance(&call_data->proxy_instance); sys_sem_signal(&call_data->threadsync_node->instance->sem); @@ -128,18 +140,18 @@ threadsync_release_instance_synced(void* ctx) static void threadsync_release_instance(struct snmp_node_instance *instance) { - struct threadsync_data *call_data = (struct threadsync_data*)instance->reference.ptr; - + struct threadsync_data *call_data = (struct threadsync_data *)instance->reference.ptr; + if (call_data->proxy_instance.release_instance != NULL) { call_synced_function(call_data, threadsync_release_instance_synced); } } static void -get_instance_synced(void* ctx) +get_instance_synced(void *ctx) { - struct threadsync_data *call_data = (struct threadsync_data*)ctx; - const struct snmp_leaf_node *leaf = (const struct snmp_leaf_node*)(const void*)call_data->proxy_instance.node; + struct threadsync_data *call_data = (struct threadsync_data *)ctx; + const struct snmp_leaf_node *leaf = (const struct snmp_leaf_node *)(const void *)call_data->proxy_instance.node; call_data->retval.err = leaf->get_instance(call_data->arg1.root_oid, call_data->arg2.root_oid_len, &call_data->proxy_instance); @@ -147,10 +159,10 @@ get_instance_synced(void* ctx) } static void -get_next_instance_synced(void* ctx) +get_next_instance_synced(void *ctx) { - struct threadsync_data *call_data = (struct threadsync_data*)ctx; - const struct snmp_leaf_node *leaf = (const struct snmp_leaf_node*)(const void*)call_data->proxy_instance.node; + struct threadsync_data *call_data = (struct threadsync_data *)ctx; + const struct snmp_leaf_node *leaf = (const struct snmp_leaf_node *)(const void *)call_data->proxy_instance.node; call_data->retval.err = leaf->get_next_instance(call_data->arg1.root_oid, call_data->arg2.root_oid_len, &call_data->proxy_instance); @@ -158,9 +170,9 @@ get_next_instance_synced(void* ctx) } static snmp_err_t -do_sync(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance, snmp_threadsync_called_fn fn) +do_sync(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance *instance, snmp_threadsync_called_fn fn) { - const struct snmp_threadsync_node *threadsync_node = (const struct snmp_threadsync_node*)(const void*)instance->node; + const struct snmp_threadsync_node *threadsync_node = (const struct snmp_threadsync_node *)(const void *)instance->node; struct threadsync_data *call_data = &threadsync_node->instance->data; if (threadsync_node->node.node.oid != threadsync_node->target->node.oid) { @@ -184,9 +196,9 @@ do_sync(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* ins instance->access = call_data->proxy_instance.access; instance->asn1_type = call_data->proxy_instance.asn1_type; instance->release_instance = threadsync_release_instance; - instance->get_value = (call_data->proxy_instance.get_value != NULL)? threadsync_get_value : NULL; - instance->set_value = (call_data->proxy_instance.set_value != NULL)? threadsync_set_value : NULL; - instance->set_test = (call_data->proxy_instance.set_test != NULL)? threadsync_set_test : NULL; + instance->get_value = (call_data->proxy_instance.get_value != NULL) ? threadsync_get_value : NULL; + instance->set_value = (call_data->proxy_instance.set_value != NULL) ? threadsync_set_value : NULL; + instance->set_test = (call_data->proxy_instance.set_test != NULL) ? threadsync_set_test : NULL; snmp_oid_assign(&instance->instance_oid, call_data->proxy_instance.instance_oid.id, call_data->proxy_instance.instance_oid.len); } @@ -194,13 +206,13 @@ do_sync(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* ins } snmp_err_t -snmp_threadsync_get_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance) +snmp_threadsync_get_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance *instance) { return do_sync(root_oid, root_oid_len, instance, get_instance_synced); } snmp_err_t -snmp_threadsync_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance) +snmp_threadsync_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance *instance) { return do_sync(root_oid, root_oid_len, instance, get_next_instance_synced); } diff --git a/Libraries/LwIP/src/apps/snmp/snmp_traps.c b/Libraries/LwIP/src/apps/snmp/snmp_traps.c index 4a4aa3b..002596a 100755 --- a/Libraries/LwIP/src/apps/snmp/snmp_traps.c +++ b/Libraries/LwIP/src/apps/snmp/snmp_traps.c @@ -46,12 +46,12 @@ #include "lwip/sys.h" #include "lwip/apps/snmp.h" #include "lwip/apps/snmp_core.h" +#include "lwip/prot/iana.h" #include "snmp_msg.h" #include "snmp_asn1.h" #include "snmp_core_priv.h" -struct snmp_msg_trap -{ +struct snmp_msg_trap { /* source enterprise ID (sysObjectID) */ const struct snmp_obj_id *enterprise; /* source IP address, raw network order format */ @@ -78,16 +78,21 @@ struct snmp_msg_trap static u16_t snmp_trap_varbind_sum(struct snmp_msg_trap *trap, struct snmp_varbind *varbinds); static u16_t snmp_trap_header_sum(struct snmp_msg_trap *trap, u16_t vb_len); -static void snmp_trap_header_enc(struct snmp_msg_trap *trap, struct snmp_pbuf_stream *pbuf_stream); -static void snmp_trap_varbind_enc(struct snmp_msg_trap *trap, struct snmp_pbuf_stream *pbuf_stream, struct snmp_varbind *varbinds); +static err_t snmp_trap_header_enc(struct snmp_msg_trap *trap, struct snmp_pbuf_stream *pbuf_stream); +static err_t snmp_trap_varbind_enc(struct snmp_msg_trap *trap, struct snmp_pbuf_stream *pbuf_stream, struct snmp_varbind *varbinds); + +#define BUILD_EXEC(code) \ + if ((code) != ERR_OK) { \ + LWIP_DEBUGF(SNMP_DEBUG, ("SNMP error during creation of outbound trap frame!")); \ + return ERR_ARG; \ + } /** Agent community string for sending traps */ extern const char *snmp_community_trap; -void* snmp_traps_handle; +void *snmp_traps_handle; -struct snmp_trap_dst -{ +struct snmp_trap_dst { /* destination IP address in network order */ ip_addr_t dip; /* set to 0 when disabled, >0 when enabled */ @@ -106,6 +111,7 @@ static u8_t snmp_auth_traps_enabled = 0; void snmp_trap_dst_enable(u8_t dst_idx, u8_t enable) { + LWIP_ASSERT_CORE_LOCKED(); if (dst_idx < SNMP_TRAP_DESTINATIONS) { trap_dst[dst_idx].enable = enable; } @@ -120,6 +126,7 @@ snmp_trap_dst_enable(u8_t dst_idx, u8_t enable) void snmp_trap_dst_ip_set(u8_t dst_idx, const ip_addr_t *dst) { + LWIP_ASSERT_CORE_LOCKED(); if (dst_idx < SNMP_TRAP_DESTINATIONS) { ip_addr_set(&trap_dst[dst_idx].dip, dst); } @@ -163,7 +170,7 @@ snmp_get_auth_traps_enabled(void) * (sysObjectID) for specific traps. */ err_t -snmp_send_trap(const struct snmp_obj_id* eoid, s32_t generic_trap, s32_t specific_trap, struct snmp_varbind *varbinds) +snmp_send_trap(const struct snmp_obj_id *eoid, s32_t generic_trap, s32_t specific_trap, struct snmp_varbind *varbinds) { struct snmp_msg_trap trap_msg; struct snmp_trap_dst *td; @@ -171,6 +178,8 @@ snmp_send_trap(const struct snmp_obj_id* eoid, s32_t generic_trap, s32_t specifi u16_t i, tot_len; err_t err = ERR_OK; + LWIP_ASSERT_CORE_LOCKED(); + trap_msg.snmp_version = 0; for (i = 0, td = &trap_dst[0]; i < SNMP_TRAP_DESTINATIONS; i++, td++) { @@ -202,7 +211,7 @@ snmp_send_trap(const struct snmp_obj_id* eoid, s32_t generic_trap, s32_t specifi struct snmp_pbuf_stream pbuf_stream; snmp_pbuf_stream_init(&pbuf_stream, p, 0, tot_len); - /* pass 1, encode packet ino the pbuf(s) */ + /* pass 1, encode packet into the pbuf(s) */ snmp_trap_header_enc(&trap_msg, &pbuf_stream); snmp_trap_varbind_enc(&trap_msg, &pbuf_stream, varbinds); @@ -210,7 +219,7 @@ snmp_send_trap(const struct snmp_obj_id* eoid, s32_t generic_trap, s32_t specifi snmp_stats.outpkts++; /** send to the TRAP destination */ - snmp_sendto(snmp_traps_handle, p, &td->dip, SNMP_TRAP_PORT); + snmp_sendto(snmp_traps_handle, p, &td->dip, LWIP_IANA_PORT_SNMP_TRAP); pbuf_free(p); } else { err = ERR_MEM; @@ -228,7 +237,7 @@ snmp_send_trap(const struct snmp_obj_id* eoid, s32_t generic_trap, s32_t specifi * @ingroup snmp_traps * Send generic SNMP trap */ -err_t +err_t snmp_send_trap_generic(s32_t generic_trap) { static const struct snmp_obj_id oid = { 7, { 1, 3, 6, 1, 2, 1, 11 } }; @@ -257,7 +266,7 @@ snmp_coldstart_trap(void) /** * @ingroup snmp_traps - * Send authentication failure trap (used internally by agent) + * Send authentication failure trap (used internally by agent) */ void snmp_authfail_trap(void) @@ -357,7 +366,7 @@ snmp_trap_header_sum(struct snmp_msg_trap *trap, u16_t vb_len) return tot_len; } -static void +static err_t snmp_trap_varbind_enc(struct snmp_msg_trap *trap, struct snmp_pbuf_stream *pbuf_stream, struct snmp_varbind *varbinds) { struct snmp_asn1_tlv tlv; @@ -366,80 +375,84 @@ snmp_trap_varbind_enc(struct snmp_msg_trap *trap, struct snmp_pbuf_stream *pbuf_ varbind = varbinds; SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_SEQUENCE, 0, trap->vbseqlen); - snmp_ans1_enc_tlv(pbuf_stream, &tlv); + BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) ); while (varbind != NULL) { - snmp_append_outbound_varbind(pbuf_stream, varbind); + BUILD_EXEC( snmp_append_outbound_varbind(pbuf_stream, varbind) ); varbind = varbind->next; } + + return ERR_OK; } /** * Encodes trap header from head to tail. */ -static void +static err_t snmp_trap_header_enc(struct snmp_msg_trap *trap, struct snmp_pbuf_stream *pbuf_stream) { struct snmp_asn1_tlv tlv; /* 'Message' sequence */ SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_SEQUENCE, 0, trap->seqlen); - snmp_ans1_enc_tlv(pbuf_stream, &tlv); + BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) ); /* version */ SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_INTEGER, 0, 0); snmp_asn1_enc_s32t_cnt(trap->snmp_version, &tlv.value_len); - snmp_ans1_enc_tlv(pbuf_stream, &tlv); - snmp_asn1_enc_s32t(pbuf_stream, tlv.value_len, trap->snmp_version); + BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) ); + BUILD_EXEC( snmp_asn1_enc_s32t(pbuf_stream, tlv.value_len, trap->snmp_version) ); /* community */ SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_OCTET_STRING, 0, trap->comlen); - snmp_ans1_enc_tlv(pbuf_stream, &tlv); - snmp_asn1_enc_raw(pbuf_stream, (const u8_t *)snmp_community_trap, trap->comlen); + BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) ); + BUILD_EXEC( snmp_asn1_enc_raw(pbuf_stream, (const u8_t *)snmp_community_trap, trap->comlen) ); /* 'PDU' sequence */ SNMP_ASN1_SET_TLV_PARAMS(tlv, (SNMP_ASN1_CLASS_CONTEXT | SNMP_ASN1_CONTENTTYPE_CONSTRUCTED | SNMP_ASN1_CONTEXT_PDU_TRAP), 0, trap->pdulen); - snmp_ans1_enc_tlv(pbuf_stream, &tlv); + BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) ); /* object ID */ SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_OBJECT_ID, 0, 0); snmp_asn1_enc_oid_cnt(trap->enterprise->id, trap->enterprise->len, &tlv.value_len); - snmp_ans1_enc_tlv(pbuf_stream, &tlv); - snmp_asn1_enc_oid(pbuf_stream, trap->enterprise->id, trap->enterprise->len); + BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) ); + BUILD_EXEC( snmp_asn1_enc_oid(pbuf_stream, trap->enterprise->id, trap->enterprise->len) ); /* IP addr */ if (IP_IS_V6_VAL(trap->sip)) { #if LWIP_IPV6 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_IPADDR, 0, sizeof(ip_2_ip6(&trap->sip)->addr)); - snmp_ans1_enc_tlv(pbuf_stream, &tlv); - snmp_asn1_enc_raw(pbuf_stream, (const u8_t *)&ip_2_ip6(&trap->sip)->addr, sizeof(ip_2_ip6(&trap->sip)->addr)); + BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) ); + BUILD_EXEC( snmp_asn1_enc_raw(pbuf_stream, (const u8_t *)&ip_2_ip6(&trap->sip)->addr, sizeof(ip_2_ip6(&trap->sip)->addr)) ); #endif } else { #if LWIP_IPV4 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_IPADDR, 0, sizeof(ip_2_ip4(&trap->sip)->addr)); - snmp_ans1_enc_tlv(pbuf_stream, &tlv); - snmp_asn1_enc_raw(pbuf_stream, (const u8_t *)&ip_2_ip4(&trap->sip)->addr, sizeof(ip_2_ip4(&trap->sip)->addr)); + BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) ); + BUILD_EXEC( snmp_asn1_enc_raw(pbuf_stream, (const u8_t *)&ip_2_ip4(&trap->sip)->addr, sizeof(ip_2_ip4(&trap->sip)->addr)) ); #endif } /* trap length */ SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_INTEGER, 0, 0); snmp_asn1_enc_s32t_cnt(trap->gen_trap, &tlv.value_len); - snmp_ans1_enc_tlv(pbuf_stream, &tlv); - snmp_asn1_enc_s32t(pbuf_stream, tlv.value_len, trap->gen_trap); + BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) ); + BUILD_EXEC( snmp_asn1_enc_s32t(pbuf_stream, tlv.value_len, trap->gen_trap) ); /* specific trap */ SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_INTEGER, 0, 0); snmp_asn1_enc_s32t_cnt(trap->spc_trap, &tlv.value_len); - snmp_ans1_enc_tlv(pbuf_stream, &tlv); - snmp_asn1_enc_s32t(pbuf_stream, tlv.value_len, trap->spc_trap); + BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) ); + BUILD_EXEC( snmp_asn1_enc_s32t(pbuf_stream, tlv.value_len, trap->spc_trap) ); /* timestamp */ SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_TIMETICKS, 0, 0); snmp_asn1_enc_s32t_cnt(trap->ts, &tlv.value_len); - snmp_ans1_enc_tlv(pbuf_stream, &tlv); - snmp_asn1_enc_s32t(pbuf_stream, tlv.value_len, trap->ts); + BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) ); + BUILD_EXEC( snmp_asn1_enc_s32t(pbuf_stream, tlv.value_len, trap->ts) ); + + return ERR_OK; } #endif /* LWIP_SNMP */ diff --git a/Libraries/LwIP/src/apps/snmp/snmpv3.c b/Libraries/LwIP/src/apps/snmp/snmpv3.c index 54882ff..df7bb5c 100755 --- a/Libraries/LwIP/src/apps/snmp/snmpv3.c +++ b/Libraries/LwIP/src/apps/snmp/snmpv3.c @@ -58,7 +58,7 @@ snmpv3_engine_id_changed(void) * (re-)initialized itself since snmpEngineID * was last configured. */ -u32_t +s32_t snmpv3_get_engine_boots_internal(void) { if (snmpv3_get_engine_boots() == 0 || @@ -75,7 +75,7 @@ snmpv3_get_engine_boots_internal(void) * Once the timer reaches 2147483647 it gets reset to zero and the * engine boot ups get incremented. */ -u32_t +s32_t snmpv3_get_engine_time_internal(void) { if (snmpv3_get_engine_time() >= SNMP_MAX_TIME_BOOT) { @@ -101,7 +101,7 @@ snmpv3_get_engine_time_internal(void) * @todo: This is a potential thread safety issue. */ err_t -snmpv3_build_priv_param(u8_t* priv_param) +snmpv3_build_priv_param(u8_t *priv_param) { #ifdef LWIP_RAND /* Based on RFC3826 */ static u8_t init; @@ -124,7 +124,7 @@ snmpv3_build_priv_param(u8_t* priv_param) } #else /* Based on RFC3414 */ static u32_t ctr; - u32_t boots = LWIP_SNMPV3_GET_ENGINE_BOOTS(); + u32_t boots = snmpv3_get_engine_boots_internal(); SMEMCPY(&priv_param[0], &boots, 4); SMEMCPY(&priv_param[4], &ctr, 4); ctr++; diff --git a/Libraries/LwIP/src/apps/snmp/snmpv3_mbedtls.c b/Libraries/LwIP/src/apps/snmp/snmpv3_mbedtls.c index 89d4972..fe20f78 100755 --- a/Libraries/LwIP/src/apps/snmp/snmpv3_mbedtls.c +++ b/Libraries/LwIP/src/apps/snmp/snmpv3_mbedtls.c @@ -49,8 +49,8 @@ #include "mbedtls/sha1.h" err_t -snmpv3_auth(struct snmp_pbuf_stream* stream, u16_t length, - const u8_t* key, u8_t algo, u8_t* hmac_out) +snmpv3_auth(struct snmp_pbuf_stream *stream, u16_t length, + const u8_t *key, snmpv3_auth_algo_t algo, u8_t *hmac_out) { u32_t i; u8_t key_len; @@ -70,10 +70,10 @@ snmpv3_auth(struct snmp_pbuf_stream* stream, u16_t length, } mbedtls_md_init(&ctx); - if(mbedtls_md_setup(&ctx, md_info, 1) != 0) { + if (mbedtls_md_setup(&ctx, md_info, 1) != 0) { return ERR_ARG; } - + if (mbedtls_md_hmac_starts(&ctx, key, key_len) != 0) { goto free_md; } @@ -96,7 +96,7 @@ snmpv3_auth(struct snmp_pbuf_stream* stream, u16_t length, mbedtls_md_free(&ctx); return ERR_OK; - + free_md: mbedtls_md_free(&ctx); return ERR_ARG; @@ -105,9 +105,9 @@ free_md: #if LWIP_SNMP_V3_CRYPTO err_t -snmpv3_crypt(struct snmp_pbuf_stream* stream, u16_t length, - const u8_t* key, const u8_t* priv_param, const u32_t engine_boots, - const u32_t engine_time, u8_t algo, u8_t mode) +snmpv3_crypt(struct snmp_pbuf_stream *stream, u16_t length, + const u8_t *key, const u8_t *priv_param, const u32_t engine_boots, + const u32_t engine_time, snmpv3_priv_algo_t algo, snmpv3_priv_mode_t mode) { size_t i; mbedtls_cipher_context_t ctx; @@ -130,21 +130,21 @@ snmpv3_crypt(struct snmp_pbuf_stream* stream, u16_t length, } cipher_info = mbedtls_cipher_info_from_type(MBEDTLS_CIPHER_DES_CBC); - if(mbedtls_cipher_setup(&ctx, cipher_info) != 0) { + if (mbedtls_cipher_setup(&ctx, cipher_info) != 0) { return ERR_ARG; } - if(mbedtls_cipher_set_padding_mode(&ctx, MBEDTLS_PADDING_NONE) != 0) { + if (mbedtls_cipher_set_padding_mode(&ctx, MBEDTLS_PADDING_NONE) != 0) { return ERR_ARG; } - if(mbedtls_cipher_setkey(&ctx, key, 8*8, (mode == SNMP_V3_PRIV_MODE_ENCRYPT)? MBEDTLS_ENCRYPT : MBEDTLS_DECRYPT) != 0) { + if (mbedtls_cipher_setkey(&ctx, key, 8 * 8, (mode == SNMP_V3_PRIV_MODE_ENCRYPT) ? MBEDTLS_ENCRYPT : MBEDTLS_DECRYPT) != 0) { goto error; } - /* Prepare IV */ + /* Prepare IV */ for (i = 0; i < LWIP_ARRAYSIZE(iv_local); i++) { iv_local[i] = priv_param[i] ^ key[i + 8]; } - if(mbedtls_cipher_set_iv(&ctx, iv_local, LWIP_ARRAYSIZE(iv_local)) != 0) { + if (mbedtls_cipher_set_iv(&ctx, iv_local, LWIP_ARRAYSIZE(iv_local)) != 0) { goto error; } @@ -152,31 +152,38 @@ snmpv3_crypt(struct snmp_pbuf_stream* stream, u16_t length, size_t j; u8_t in_bytes[8]; out_len = LWIP_ARRAYSIZE(out_bytes) ; - + for (j = 0; j < LWIP_ARRAYSIZE(in_bytes); j++) { - snmp_pbuf_stream_read(&read_stream, &in_bytes[j]); + if (snmp_pbuf_stream_read(&read_stream, &in_bytes[j]) != ERR_OK) { + goto error; + } } - if(mbedtls_cipher_update(&ctx, in_bytes, LWIP_ARRAYSIZE(in_bytes), out_bytes, &out_len) != 0) { + if (mbedtls_cipher_update(&ctx, in_bytes, LWIP_ARRAYSIZE(in_bytes), out_bytes, &out_len) != 0) { goto error; } - snmp_pbuf_stream_writebuf(&write_stream, out_bytes, out_len); + if (snmp_pbuf_stream_writebuf(&write_stream, out_bytes, (u16_t)out_len) != ERR_OK) { + goto error; + } } - + out_len = LWIP_ARRAYSIZE(out_bytes); - if(mbedtls_cipher_finish(&ctx, out_bytes, &out_len) != 0) { + if (mbedtls_cipher_finish(&ctx, out_bytes, &out_len) != 0) { + goto error; + } + + if (snmp_pbuf_stream_writebuf(&write_stream, out_bytes, (u16_t)out_len) != ERR_OK) { goto error; } - snmp_pbuf_stream_writebuf(&write_stream, out_bytes, out_len); } else if (algo == SNMP_V3_PRIV_ALGO_AES) { u8_t iv_local[16]; cipher_info = mbedtls_cipher_info_from_type(MBEDTLS_CIPHER_AES_128_CFB128); - if(mbedtls_cipher_setup(&ctx, cipher_info) != 0) { + if (mbedtls_cipher_setup(&ctx, cipher_info) != 0) { return ERR_ARG; } - if(mbedtls_cipher_setkey(&ctx, key, 16*8, (mode == SNMP_V3_PRIV_MODE_ENCRYPT)? MBEDTLS_ENCRYPT : MBEDTLS_DECRYPT) != 0) { + if (mbedtls_cipher_setkey(&ctx, key, 16 * 8, (mode == SNMP_V3_PRIV_MODE_ENCRYPT) ? MBEDTLS_ENCRYPT : MBEDTLS_DECRYPT) != 0) { goto error; } @@ -193,7 +200,7 @@ snmpv3_crypt(struct snmp_pbuf_stream* stream, u16_t length, iv_local[4 + 2] = (engine_time >> 8) & 0xFF; iv_local[4 + 3] = (engine_time >> 0) & 0xFF; SMEMCPY(iv_local + 8, priv_param, 8); - if(mbedtls_cipher_set_iv(&ctx, iv_local, LWIP_ARRAYSIZE(iv_local)) != 0) { + if (mbedtls_cipher_set_iv(&ctx, iv_local, LWIP_ARRAYSIZE(iv_local)) != 0) { goto error; } @@ -201,12 +208,16 @@ snmpv3_crypt(struct snmp_pbuf_stream* stream, u16_t length, u8_t in_byte; u8_t out_byte; size_t out_len = sizeof(out_byte); - - snmp_pbuf_stream_read(&read_stream, &in_byte); - if(mbedtls_cipher_update(&ctx, &in_byte, sizeof(in_byte), &out_byte, &out_len) != 0) { + + if (snmp_pbuf_stream_read(&read_stream, &in_byte) != ERR_OK) { + goto error; + } + if (mbedtls_cipher_update(&ctx, &in_byte, sizeof(in_byte), &out_byte, &out_len) != 0) { + goto error; + } + if (snmp_pbuf_stream_write(&write_stream, out_byte) != ERR_OK) { goto error; } - snmp_pbuf_stream_write(&write_stream, out_byte); } } else { return ERR_ARG; @@ -223,13 +234,13 @@ error: #endif /* LWIP_SNMP_V3_CRYPTO */ /* A.2.1. Password to Key Sample Code for MD5 */ -void +void snmpv3_password_to_key_md5( - const u8_t *password, /* IN */ - u8_t passwordlen, /* IN */ - const u8_t *engineID, /* IN - pointer to snmpEngineID */ - u8_t engineLength,/* IN - length of snmpEngineID */ - u8_t *key) /* OUT - pointer to caller 16-octet buffer */ + const u8_t *password, /* IN */ + size_t passwordlen, /* IN */ + const u8_t *engineID, /* IN - pointer to snmpEngineID */ + u8_t engineLength,/* IN - length of snmpEngineID */ + u8_t *key) /* OUT - pointer to caller 16-octet buffer */ { mbedtls_md5_context MD; u8_t *cp, password_buf[64]; @@ -276,13 +287,13 @@ snmpv3_password_to_key_md5( } /* A.2.2. Password to Key Sample Code for SHA */ -void +void snmpv3_password_to_key_sha( - const u8_t *password, /* IN */ - u8_t passwordlen, /* IN */ - const u8_t *engineID, /* IN - pointer to snmpEngineID */ - u8_t engineLength,/* IN - length of snmpEngineID */ - u8_t *key) /* OUT - pointer to caller 20-octet buffer */ + const u8_t *password, /* IN */ + size_t passwordlen, /* IN */ + const u8_t *engineID, /* IN - pointer to snmpEngineID */ + u8_t engineLength,/* IN - length of snmpEngineID */ + u8_t *key) /* OUT - pointer to caller 20-octet buffer */ { mbedtls_sha1_context SH; u8_t *cp, password_buf[72]; @@ -323,7 +334,7 @@ snmpv3_password_to_key_sha( mbedtls_sha1_starts(&SH); mbedtls_sha1_update(&SH, password_buf, 40 + engineLength); mbedtls_sha1_finish(&SH, key); - + mbedtls_sha1_free(&SH); return; } diff --git a/Libraries/LwIP/src/apps/snmp/snmpv3_priv.h b/Libraries/LwIP/src/apps/snmp/snmpv3_priv.h index 34e2862..8ea710a 100755 --- a/Libraries/LwIP/src/apps/snmp/snmpv3_priv.h +++ b/Libraries/LwIP/src/apps/snmp/snmpv3_priv.h @@ -39,6 +39,7 @@ #if LWIP_SNMP && LWIP_SNMP_V3 +#include "lwip/apps/snmpv3.h" #include "snmp_pbuf_stream.h" /* According to RFC 3411 */ @@ -48,18 +49,20 @@ #define SNMP_V3_MAX_AUTH_PARAM_LENGTH 12 #define SNMP_V3_MAX_PRIV_PARAM_LENGTH 8 -#define SNMP_V3_AUTH_FLAG 0x01 -#define SNMP_V3_PRIV_FLAG 0x02 - #define SNMP_V3_MD5_LEN 16 #define SNMP_V3_SHA_LEN 20 -u32_t snmpv3_get_engine_boots_internal(void); -u32_t snmpv3_get_engine_time_internal(void); -err_t snmpv3_auth(struct snmp_pbuf_stream* stream, u16_t length, const u8_t* key, u8_t algo, u8_t* hmac_out); -err_t snmpv3_crypt(struct snmp_pbuf_stream* stream, u16_t length, const u8_t* key, - const u8_t* priv_param, const u32_t engine_boots, const u32_t engine_time, u8_t algo, u8_t mode); -err_t snmpv3_build_priv_param(u8_t* priv_param); +typedef enum { + SNMP_V3_PRIV_MODE_DECRYPT = 0, + SNMP_V3_PRIV_MODE_ENCRYPT = 1 +} snmpv3_priv_mode_t; + +s32_t snmpv3_get_engine_boots_internal(void); +err_t snmpv3_auth(struct snmp_pbuf_stream *stream, u16_t length, const u8_t *key, snmpv3_auth_algo_t algo, u8_t *hmac_out); +err_t snmpv3_crypt(struct snmp_pbuf_stream *stream, u16_t length, const u8_t *key, + const u8_t *priv_param, const u32_t engine_boots, const u32_t engine_time, snmpv3_priv_algo_t algo, snmpv3_priv_mode_t mode); +err_t snmpv3_build_priv_param(u8_t *priv_param); +void snmpv3_enginetime_timer(void *arg); #endif diff --git a/Libraries/LwIP/src/apps/sntp/sntp.c b/Libraries/LwIP/src/apps/sntp/sntp.c index 7bfd85b..0952a63 100755 --- a/Libraries/LwIP/src/apps/sntp/sntp.c +++ b/Libraries/LwIP/src/apps/sntp/sntp.c @@ -42,11 +42,10 @@ * This is simple "SNTP" client for the lwIP raw API. * It is a minimal implementation of SNTPv4 as specified in RFC 4330. * - * For a list of some public NTP servers, see this link : + * For a list of some public NTP servers, see this link: * http://support.ntp.org/bin/view/Servers/NTPPoolServers * * @todo: - * - set/change servers at runtime * - complete SNTP_CHECK_RESPONSE checks 3 and 4 */ @@ -72,21 +71,12 @@ #define SNTP_SUPPORT_MULTIPLE_SERVERS 0 #endif /* NTP_MAX_SERVERS > 1 */ -#if (SNTP_UPDATE_DELAY < 15000) && !defined(SNTP_SUPPRESS_DELAY_CHECK) +#ifndef SNTP_SUPPRESS_DELAY_CHECK +#if SNTP_UPDATE_DELAY < 15000 #error "SNTPv4 RFC 4330 enforces a minimum update time of 15 seconds (define SNTP_SUPPRESS_DELAY_CHECK to disable this error)!" #endif - -/* Configure behaviour depending on microsecond or second precision */ -#ifdef SNTP_SET_SYSTEM_TIME_US -#define SNTP_CALC_TIME_US 1 -#define SNTP_RECEIVE_TIME_SIZE 2 -#else -#define SNTP_SET_SYSTEM_TIME_US(sec, us) -#define SNTP_CALC_TIME_US 0 -#define SNTP_RECEIVE_TIME_SIZE 1 #endif - /* the various debug levels for this file */ #define SNTP_DEBUG_TRACE (SNTP_DEBUG | LWIP_DBG_TRACE) #define SNTP_DEBUG_STATE (SNTP_DEBUG | LWIP_DBG_STATE) @@ -101,10 +91,10 @@ #define SNTP_OFFSET_LI_VN_MODE 0 #define SNTP_LI_MASK 0xC0 -#define SNTP_LI_NO_WARNING 0x00 -#define SNTP_LI_LAST_MINUTE_61_SEC 0x01 -#define SNTP_LI_LAST_MINUTE_59_SEC 0x02 -#define SNTP_LI_ALARM_CONDITION 0x03 /* (clock not synchronized) */ +#define SNTP_LI_NO_WARNING (0x00 << 6) +#define SNTP_LI_LAST_MINUTE_61_SEC (0x01 << 6) +#define SNTP_LI_LAST_MINUTE_59_SEC (0x02 << 6) +#define SNTP_LI_ALARM_CONDITION (0x03 << 6) /* (clock not synchronized) */ #define SNTP_VERSION_MASK 0x38 #define SNTP_VERSION (4/* NTP Version 4*/<<3) @@ -121,18 +111,89 @@ #define SNTP_OFFSET_RECEIVE_TIME 32 #define SNTP_OFFSET_TRANSMIT_TIME 40 -/* number of seconds between 1900 and 1970 (MSB=1)*/ -#define DIFF_SEC_1900_1970 (2208988800UL) -/* number of seconds between 1970 and Feb 7, 2036 (6:28:16 UTC) (MSB=0) */ -#define DIFF_SEC_1970_2036 (2085978496UL) +/* Number of seconds between 1970 and Feb 7, 2036 06:28:16 UTC (epoch 1) */ +#define DIFF_SEC_1970_2036 ((u32_t)2085978496L) + +/** Convert NTP timestamp fraction to microseconds. + */ +#ifndef SNTP_FRAC_TO_US +# if LWIP_HAVE_INT64 +# define SNTP_FRAC_TO_US(f) ((u32_t)(((u64_t)(f) * 1000000UL) >> 32)) +# else +# define SNTP_FRAC_TO_US(f) ((u32_t)(f) / 4295) +# endif +#endif /* !SNTP_FRAC_TO_US */ + +/* Configure behaviour depending on native, microsecond or second precision. + * Treat NTP timestamps as signed two's-complement integers. This way, + * timestamps that have the MSB set simply become negative offsets from + * the epoch (Feb 7, 2036 06:28:16 UTC). Representable dates range from + * 1968 to 2104. + */ +#ifndef SNTP_SET_SYSTEM_TIME_NTP +# ifdef SNTP_SET_SYSTEM_TIME_US +# define SNTP_SET_SYSTEM_TIME_NTP(s, f) \ + SNTP_SET_SYSTEM_TIME_US((u32_t)((s) + DIFF_SEC_1970_2036), SNTP_FRAC_TO_US(f)) +# else +# define SNTP_SET_SYSTEM_TIME_NTP(s, f) \ + SNTP_SET_SYSTEM_TIME((u32_t)((s) + DIFF_SEC_1970_2036)) +# endif +#endif /* !SNTP_SET_SYSTEM_TIME_NTP */ + +/* Get the system time either natively as NTP timestamp or convert from + * Unix time in seconds and microseconds. Take care to avoid overflow if the + * microsecond value is at the maximum of 999999. Also add 0.5 us fudge to + * avoid special values like 0, and to mask round-off errors that would + * otherwise break round-trip conversion identity. + */ +#ifndef SNTP_GET_SYSTEM_TIME_NTP +# define SNTP_GET_SYSTEM_TIME_NTP(s, f) do { \ + u32_t sec_, usec_; \ + SNTP_GET_SYSTEM_TIME(sec_, usec_); \ + (s) = (s32_t)(sec_ - DIFF_SEC_1970_2036); \ + (f) = usec_ * 4295 - ((usec_ * 2143) >> 16) + 2147; \ + } while (0) +#endif /* !SNTP_GET_SYSTEM_TIME_NTP */ + +/* Start offset of the timestamps to extract from the SNTP packet */ +#define SNTP_OFFSET_TIMESTAMPS \ + (SNTP_OFFSET_TRANSMIT_TIME + 8 - sizeof(struct sntp_timestamps)) + +/* Round-trip delay arithmetic helpers */ +#if SNTP_COMP_ROUNDTRIP +# if !LWIP_HAVE_INT64 +# error "SNTP round-trip delay compensation requires 64-bit arithmetic" +# endif +# define SNTP_SEC_FRAC_TO_S64(s, f) \ + ((s64_t)(((u64_t)(s) << 32) | (u32_t)(f))) +# define SNTP_TIMESTAMP_TO_S64(t) \ + SNTP_SEC_FRAC_TO_S64(lwip_ntohl((t).sec), lwip_ntohl((t).frac)) +#endif /* SNTP_COMP_ROUNDTRIP */ + +/** + * 64-bit NTP timestamp, in network byte order. + */ +struct sntp_time { + u32_t sec; + u32_t frac; +}; + +/** + * Timestamps to be extracted from the NTP header. + */ +struct sntp_timestamps { +#if SNTP_COMP_ROUNDTRIP || SNTP_CHECK_RESPONSE >= 2 + struct sntp_time orig; + struct sntp_time recv; +#endif + struct sntp_time xmit; +}; /** * SNTP packet format (without optional fields) * Timestamps are coded as 64 bits: - * - 32 bits seconds since Jan 01, 1970, 00:00 - * - 32 bits seconds fraction (0-padded) - * For future use, if the MSB in the seconds part is set, seconds are based - * on Feb 07, 2036, 06:28:16. + * - signed 32 bits seconds since Feb 07, 2036, 06:28:16 UTC (epoch 1) + * - unsigned 32 bits seconds fraction (2^32 = 1 second) */ #ifdef PACK_STRUCT_USE_INCLUDES # include "arch/bpstruct.h" @@ -163,13 +224,17 @@ static void sntp_request(void *arg); static u8_t sntp_opmode; /** The UDP pcb used by the SNTP client */ -static struct udp_pcb* sntp_pcb; +static struct udp_pcb *sntp_pcb; /** Names/Addresses of servers */ struct sntp_server { #if SNTP_SERVER_DNS - char* name; + const char *name; #endif /* SNTP_SERVER_DNS */ ip_addr_t addr; +#if SNTP_MONITOR_SERVER_REACHABILITY + /** Reachability shift register as described in RFC 5905 */ + u8_t reachability; +#endif /* SNTP_MONITOR_SERVER_REACHABILITY */ }; static struct sntp_server sntp_servers[SNTP_MAX_SERVERS]; @@ -199,38 +264,69 @@ static ip_addr_t sntp_last_server_address; #if SNTP_CHECK_RESPONSE >= 2 /** Saves the last timestamp sent (which is sent back by the server) - * to compare against in response */ -static u32_t sntp_last_timestamp_sent[2]; + * to compare against in response. Stored in network byte order. */ +static struct sntp_time sntp_last_timestamp_sent; #endif /* SNTP_CHECK_RESPONSE >= 2 */ +#if defined(LWIP_DEBUG) && !defined(sntp_format_time) +/* Debug print helper. */ +static const char * +sntp_format_time(s32_t sec) +{ + time_t ut; + ut = (u32_t)((u32_t)sec + DIFF_SEC_1970_2036); + return ctime(&ut); +} +#endif /* LWIP_DEBUG && !sntp_format_time */ + /** * SNTP processing of received timestamp */ static void -sntp_process(u32_t *receive_timestamp) +sntp_process(const struct sntp_timestamps *timestamps) { - /* convert SNTP time (1900-based) to unix GMT time (1970-based) - * if MSB is 0, SNTP time is 2036-based! - */ - u32_t rx_secs = lwip_ntohl(receive_timestamp[0]); - int is_1900_based = ((rx_secs & 0x80000000) != 0); - u32_t t = is_1900_based ? (rx_secs - DIFF_SEC_1900_1970) : (rx_secs + DIFF_SEC_1970_2036); - time_t tim = t; + s32_t sec; + u32_t frac; -#if SNTP_CALC_TIME_US - u32_t us = lwip_ntohl(receive_timestamp[1]) / 4295; - SNTP_SET_SYSTEM_TIME_US(t, us); - /* display local time from GMT time */ - LWIP_DEBUGF(SNTP_DEBUG_TRACE, ("sntp_process: %s, %"U32_F" us", ctime(&tim), us)); + sec = (s32_t)lwip_ntohl(timestamps->xmit.sec); + frac = lwip_ntohl(timestamps->xmit.frac); -#else /* SNTP_CALC_TIME_US */ +#if SNTP_COMP_ROUNDTRIP +# if SNTP_CHECK_RESPONSE >= 2 + if (timestamps->recv.sec != 0 || timestamps->recv.frac != 0) +# endif + { + s32_t dest_sec; + u32_t dest_frac; + u32_t step_sec; - /* change system time and/or the update the RTC clock */ - SNTP_SET_SYSTEM_TIME(t); - /* display local time from GMT time */ - LWIP_DEBUGF(SNTP_DEBUG_TRACE, ("sntp_process: %s", ctime(&tim))); -#endif /* SNTP_CALC_TIME_US */ - LWIP_UNUSED_ARG(tim); + /* Get the destination time stamp, i.e. the current system time */ + SNTP_GET_SYSTEM_TIME_NTP(dest_sec, dest_frac); + + step_sec = (dest_sec < sec) ? ((u32_t)sec - (u32_t)dest_sec) + : ((u32_t)dest_sec - (u32_t)sec); + /* In order to avoid overflows, skip the compensation if the clock step + * is larger than about 34 years. */ + if ((step_sec >> 30) == 0) { + s64_t t1, t2, t3, t4; + + t4 = SNTP_SEC_FRAC_TO_S64(dest_sec, dest_frac); + t3 = SNTP_SEC_FRAC_TO_S64(sec, frac); + t1 = SNTP_TIMESTAMP_TO_S64(timestamps->orig); + t2 = SNTP_TIMESTAMP_TO_S64(timestamps->recv); + /* Clock offset calculation according to RFC 4330 */ + t4 += ((t2 - t1) + (t3 - t4)) / 2; + + sec = (s32_t)((u64_t)t4 >> 32); + frac = (u32_t)((u64_t)t4); + } + } +#endif /* SNTP_COMP_ROUNDTRIP */ + + SNTP_SET_SYSTEM_TIME_NTP(sec, frac); + LWIP_UNUSED_ARG(frac); /* might be unused if only seconds are set */ + LWIP_DEBUGF(SNTP_DEBUG_TRACE, ("sntp_process: %s, %" U32_F " us\n", + sntp_format_time(sec), SNTP_FRAC_TO_US(frac))); } /** @@ -242,18 +338,23 @@ sntp_initialize_request(struct sntp_msg *req) memset(req, 0, SNTP_MSG_LEN); req->li_vn_mode = SNTP_LI_NO_WARNING | SNTP_VERSION | SNTP_MODE_CLIENT; -#if SNTP_CHECK_RESPONSE >= 2 +#if SNTP_CHECK_RESPONSE >= 2 || SNTP_COMP_ROUNDTRIP { - u32_t sntp_time_sec, sntp_time_us; - /* fill in transmit timestamp and save it in 'sntp_last_timestamp_sent' */ - SNTP_GET_SYSTEM_TIME(sntp_time_sec, sntp_time_us); - sntp_last_timestamp_sent[0] = lwip_htonl(sntp_time_sec + DIFF_SEC_1900_1970); - req->transmit_timestamp[0] = sntp_last_timestamp_sent[0]; - /* we send/save us instead of fraction to be faster... */ - sntp_last_timestamp_sent[1] = lwip_htonl(sntp_time_us); - req->transmit_timestamp[1] = sntp_last_timestamp_sent[1]; + s32_t secs; + u32_t sec, frac; + /* Get the transmit timestamp */ + SNTP_GET_SYSTEM_TIME_NTP(secs, frac); + sec = lwip_htonl((u32_t)secs); + frac = lwip_htonl(frac); + +# if SNTP_CHECK_RESPONSE >= 2 + sntp_last_timestamp_sent.sec = sec; + sntp_last_timestamp_sent.frac = frac; +# endif + req->transmit_timestamp[0] = sec; + req->transmit_timestamp[1] = frac; } -#endif /* SNTP_CHECK_RESPONSE >= 2 */ +#endif /* SNTP_CHECK_RESPONSE >= 2 || SNTP_COMP_ROUNDTRIP */ } /** @@ -262,12 +363,12 @@ sntp_initialize_request(struct sntp_msg *req) * @param arg is unused (only necessary to conform to sys_timeout) */ static void -sntp_retry(void* arg) +sntp_retry(void *arg) { LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(SNTP_DEBUG_STATE, ("sntp_retry: Next request will be sent in %"U32_F" ms\n", - sntp_retry_timeout)); + sntp_retry_timeout)); /* set up a timer to send a retry and increase the retry delay */ sys_timeout(sntp_retry_timeout, sntp_request, NULL); @@ -296,7 +397,7 @@ sntp_retry(void* arg) * @param arg is unused (only necessary to conform to sys_timeout) */ static void -sntp_try_next_server(void* arg) +sntp_try_next_server(void *arg) { u8_t old_server, i; LWIP_UNUSED_ARG(arg); @@ -311,9 +412,9 @@ sntp_try_next_server(void* arg) #if SNTP_SERVER_DNS || (sntp_servers[sntp_current_server].name != NULL) #endif - ) { + ) { LWIP_DEBUGF(SNTP_DEBUG_STATE, ("sntp_try_next_server: Sending request to server %"U16_F"\n", - (u16_t)sntp_current_server)); + (u16_t)sntp_current_server)); /* new server: reset retry timeout */ SNTP_RESET_RETRY_TIMEOUT(); /* instantly send a request to the next server */ @@ -332,25 +433,21 @@ sntp_try_next_server(void* arg) /** UDP recv callback for the sntp pcb */ static void -sntp_recv(void *arg, struct udp_pcb* pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port) +sntp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port) { + struct sntp_timestamps timestamps; u8_t mode; u8_t stratum; - u32_t receive_timestamp[SNTP_RECEIVE_TIME_SIZE]; err_t err; LWIP_UNUSED_ARG(arg); LWIP_UNUSED_ARG(pcb); - /* packet received: stop retry timeout */ - sys_untimeout(sntp_try_next_server, NULL); - sys_untimeout(sntp_request, NULL); - err = ERR_ARG; #if SNTP_CHECK_RESPONSE >= 1 /* check server address and port */ if (((sntp_opmode != SNTP_OPMODE_POLL) || ip_addr_cmp(addr, &sntp_last_server_address)) && - (port == SNTP_PORT)) + (port == SNTP_PORT)) #else /* SNTP_CHECK_RESPONSE >= 1 */ LWIP_UNUSED_ARG(addr); LWIP_UNUSED_ARG(port); @@ -358,32 +455,30 @@ sntp_recv(void *arg, struct udp_pcb* pcb, struct pbuf *p, const ip_addr_t *addr, { /* process the response */ if (p->tot_len == SNTP_MSG_LEN) { - pbuf_copy_partial(p, &mode, 1, SNTP_OFFSET_LI_VN_MODE); - mode &= SNTP_MODE_MASK; + mode = pbuf_get_at(p, SNTP_OFFSET_LI_VN_MODE) & SNTP_MODE_MASK; /* if this is a SNTP response... */ - if (((sntp_opmode == SNTP_OPMODE_POLL) && (mode == SNTP_MODE_SERVER)) || + if (((sntp_opmode == SNTP_OPMODE_POLL) && (mode == SNTP_MODE_SERVER)) || ((sntp_opmode == SNTP_OPMODE_LISTENONLY) && (mode == SNTP_MODE_BROADCAST))) { - pbuf_copy_partial(p, &stratum, 1, SNTP_OFFSET_STRATUM); + stratum = pbuf_get_at(p, SNTP_OFFSET_STRATUM); + if (stratum == SNTP_STRATUM_KOD) { /* Kiss-of-death packet. Use another server or increase UPDATE_DELAY. */ err = SNTP_ERR_KOD; LWIP_DEBUGF(SNTP_DEBUG_STATE, ("sntp_recv: Received Kiss-of-Death\n")); } else { + pbuf_copy_partial(p, ×tamps, sizeof(timestamps), SNTP_OFFSET_TIMESTAMPS); #if SNTP_CHECK_RESPONSE >= 2 /* check originate_timetamp against sntp_last_timestamp_sent */ - u32_t originate_timestamp[2]; - pbuf_copy_partial(p, &originate_timestamp, 8, SNTP_OFFSET_ORIGINATE_TIME); - if ((originate_timestamp[0] != sntp_last_timestamp_sent[0]) || - (originate_timestamp[1] != sntp_last_timestamp_sent[1])) - { - LWIP_DEBUGF(SNTP_DEBUG_WARN, ("sntp_recv: Invalid originate timestamp in response\n")); + if (timestamps.orig.sec != sntp_last_timestamp_sent.sec || + timestamps.orig.frac != sntp_last_timestamp_sent.frac) { + LWIP_DEBUGF(SNTP_DEBUG_WARN, + ("sntp_recv: Invalid originate timestamp in response\n")); } else #endif /* SNTP_CHECK_RESPONSE >= 2 */ - /* @todo: add code for SNTP_CHECK_RESPONSE >= 3 and >= 4 here */ + /* @todo: add code for SNTP_CHECK_RESPONSE >= 3 and >= 4 here */ { /* correct answer */ err = ERR_OK; - pbuf_copy_partial(p, &receive_timestamp, SNTP_RECEIVE_TIME_SIZE * 4, SNTP_OFFSET_TRANSMIT_TIME); } } } else { @@ -401,30 +496,39 @@ sntp_recv(void *arg, struct udp_pcb* pcb, struct pbuf *p, const ip_addr_t *addr, err = ERR_TIMEOUT; } #endif /* SNTP_CHECK_RESPONSE >= 1 */ - pbuf_free(p); - if (err == ERR_OK) { - sntp_process(receive_timestamp); + pbuf_free(p); + + if (err == ERR_OK) { + /* correct packet received: process it it */ + sntp_process(×tamps); + +#if SNTP_MONITOR_SERVER_REACHABILITY + /* indicate that server responded */ + sntp_servers[sntp_current_server].reachability |= 1; +#endif /* SNTP_MONITOR_SERVER_REACHABILITY */ /* Set up timeout for next request (only if poll response was received)*/ if (sntp_opmode == SNTP_OPMODE_POLL) { + u32_t sntp_update_delay; + sys_untimeout(sntp_try_next_server, NULL); + sys_untimeout(sntp_request, NULL); + /* Correct response, reset retry timeout */ SNTP_RESET_RETRY_TIMEOUT(); - sys_timeout((u32_t)SNTP_UPDATE_DELAY, sntp_request, NULL); + sntp_update_delay = (u32_t)SNTP_UPDATE_DELAY; + sys_timeout(sntp_update_delay, sntp_request, NULL); LWIP_DEBUGF(SNTP_DEBUG_STATE, ("sntp_recv: Scheduled next time request: %"U32_F" ms\n", - (u32_t)SNTP_UPDATE_DELAY)); + sntp_update_delay)); } - } else if (err != ERR_TIMEOUT) { - /* Errors are only processed in case of an explicit poll response */ + } else if (err == SNTP_ERR_KOD) { + /* KOD errors are only processed in case of an explicit poll response */ if (sntp_opmode == SNTP_OPMODE_POLL) { - if (err == SNTP_ERR_KOD) { - /* Kiss-of-death packet. Use another server or increase UPDATE_DELAY. */ - sntp_try_next_server(NULL); - } else { - /* another error, try the same server again */ - sntp_retry(NULL); - } + /* Kiss-of-death packet. Use another server or increase UPDATE_DELAY. */ + sntp_try_next_server(NULL); } + } else { + /* ignore any broken packet, poll mode: retry after timeout to avoid flooding */ } } @@ -435,7 +539,10 @@ sntp_recv(void *arg, struct udp_pcb* pcb, struct pbuf *p, const ip_addr_t *addr, static void sntp_send_request(const ip_addr_t *server_addr) { - struct pbuf* p; + struct pbuf *p; + + LWIP_ASSERT("server_addr != NULL", server_addr != NULL); + p = pbuf_alloc(PBUF_TRANSPORT, SNTP_MSG_LEN, PBUF_RAM); if (p != NULL) { struct sntp_msg *sntpmsg = (struct sntp_msg *)p->payload; @@ -446,15 +553,19 @@ sntp_send_request(const ip_addr_t *server_addr) udp_sendto(sntp_pcb, p, server_addr, SNTP_PORT); /* free the pbuf after sending it */ pbuf_free(p); +#if SNTP_MONITOR_SERVER_REACHABILITY + /* indicate new packet has been sent */ + sntp_servers[sntp_current_server].reachability <<= 1; +#endif /* SNTP_MONITOR_SERVER_REACHABILITY */ /* set up receive timeout: try next server or retry on timeout */ sys_timeout((u32_t)SNTP_RECV_TIMEOUT, sntp_try_next_server, NULL); #if SNTP_CHECK_RESPONSE >= 1 /* save server address to verify it in sntp_recv */ - ip_addr_set(&sntp_last_server_address, server_addr); + ip_addr_copy(sntp_last_server_address, *server_addr); #endif /* SNTP_CHECK_RESPONSE >= 1 */ } else { LWIP_DEBUGF(SNTP_DEBUG_SERIOUS, ("sntp_send_request: Out of memory, trying again in %"U32_F" ms\n", - (u32_t)SNTP_RETRY_TIMEOUT)); + (u32_t)SNTP_RETRY_TIMEOUT)); /* out of memory: set up a timer to send a retry */ sys_timeout((u32_t)SNTP_RETRY_TIMEOUT, sntp_request, NULL); } @@ -465,7 +576,7 @@ sntp_send_request(const ip_addr_t *server_addr) * DNS found callback when using DNS names as server address. */ static void -sntp_dns_found(const char* hostname, const ip_addr_t *ipaddr, void *arg) +sntp_dns_found(const char *hostname, const ip_addr_t *ipaddr, void *arg) { LWIP_UNUSED_ARG(hostname); LWIP_UNUSED_ARG(arg); @@ -473,6 +584,7 @@ sntp_dns_found(const char* hostname, const ip_addr_t *ipaddr, void *arg) if (ipaddr != NULL) { /* Address resolved, send request */ LWIP_DEBUGF(SNTP_DEBUG_STATE, ("sntp_dns_found: Server address resolved, sending request\n")); + sntp_servers[sntp_current_server].addr = *ipaddr; sntp_send_request(ipaddr); } else { /* DNS resolving failed -> try another server */ @@ -501,7 +613,7 @@ sntp_request(void *arg) /* always resolve the name and rely on dns-internal caching & timeout */ ip_addr_set_zero(&sntp_servers[sntp_current_server].addr); err = dns_gethostbyname(sntp_servers[sntp_current_server].name, &sntp_server_address, - sntp_dns_found, NULL); + sntp_dns_found, NULL); if (err == ERR_INPROGRESS) { /* DNS request sent, wait for sntp_dns_found being called */ LWIP_DEBUGF(SNTP_DEBUG_STATE, ("sntp_request: Waiting for server address to be resolved.\n")); @@ -518,7 +630,7 @@ sntp_request(void *arg) if (err == ERR_OK) { LWIP_DEBUGF(SNTP_DEBUG_TRACE, ("sntp_request: current server address is %s\n", - ipaddr_ntoa(&sntp_server_address))); + ipaddr_ntoa(&sntp_server_address))); sntp_send_request(&sntp_server_address); } else { /* address conversion failed, try another server */ @@ -535,6 +647,8 @@ sntp_request(void *arg) void sntp_init(void) { + /* LWIP_ASSERT_CORE_LOCKED(); is checked by udp_new() */ + #ifdef SNTP_SERVER_ADDRESS #if SNTP_SERVER_DNS sntp_setservername(0, SNTP_SERVER_ADDRESS); @@ -571,7 +685,14 @@ sntp_init(void) void sntp_stop(void) { + LWIP_ASSERT_CORE_LOCKED(); if (sntp_pcb != NULL) { +#if SNTP_MONITOR_SERVER_REACHABILITY + u8_t i; + for (i = 0; i < SNTP_MAX_SERVERS; i++) { + sntp_servers[i].reachability = 0; + } +#endif /* SNTP_MONITOR_SERVER_REACHABILITY */ sys_untimeout(sntp_request, NULL); sys_untimeout(sntp_try_next_server, NULL); udp_remove(sntp_pcb); @@ -585,7 +706,7 @@ sntp_stop(void) */ u8_t sntp_enabled(void) { - return (sntp_pcb != NULL)? 1 : 0; + return (sntp_pcb != NULL) ? 1 : 0; } /** @@ -596,6 +717,7 @@ u8_t sntp_enabled(void) void sntp_setoperatingmode(u8_t operating_mode) { + LWIP_ASSERT_CORE_LOCKED(); LWIP_ASSERT("Invalid operating mode", operating_mode <= SNTP_OPMODE_LISTENONLY); LWIP_ASSERT("Operating mode must not be set while SNTP client is running", sntp_pcb == NULL); sntp_opmode = operating_mode; @@ -611,6 +733,23 @@ sntp_getoperatingmode(void) return sntp_opmode; } +#if SNTP_MONITOR_SERVER_REACHABILITY +/** + * @ingroup sntp + * Gets the server reachability shift register as described in RFC 5905. + * + * @param idx the index of the NTP server + */ +u8_t +sntp_getreachability(u8_t idx) +{ + if (idx < SNTP_MAX_SERVERS) { + return sntp_servers[idx].reachability; + } + return 0; +} +#endif /* SNTP_MONITOR_SERVER_REACHABILITY */ + #if SNTP_GET_SERVERS_FROM_DHCP /** * Config SNTP server handling by IP address, name, or DHCP; clear table @@ -620,6 +759,7 @@ void sntp_servermode_dhcp(int set_servers_from_dhcp) { u8_t new_mode = set_servers_from_dhcp ? 1 : 0; + LWIP_ASSERT_CORE_LOCKED(); if (sntp_set_servers_from_dhcp != new_mode) { sntp_set_servers_from_dhcp = new_mode; } @@ -636,6 +776,7 @@ sntp_servermode_dhcp(int set_servers_from_dhcp) void sntp_setserver(u8_t idx, const ip_addr_t *server) { + LWIP_ASSERT_CORE_LOCKED(); if (idx < SNTP_MAX_SERVERS) { if (server != NULL) { sntp_servers[idx].addr = (*server); @@ -652,15 +793,15 @@ sntp_setserver(u8_t idx, const ip_addr_t *server) /** * Initialize one of the NTP servers by IP address, required by DHCP * - * @param numdns the index of the NTP server to set must be < SNTP_MAX_SERVERS - * @param dnsserver IP address of the NTP server to set + * @param num the index of the NTP server to set must be < SNTP_MAX_SERVERS + * @param server IP address of the NTP server to set */ void dhcp_set_ntp_servers(u8_t num, const ip4_addr_t *server) { LWIP_DEBUGF(SNTP_DEBUG_TRACE, ("sntp: %s %u.%u.%u.%u as NTP server #%u via DHCP\n", - (sntp_set_servers_from_dhcp ? "Got" : "Rejected"), - ip4_addr1(server), ip4_addr2(server), ip4_addr3(server), ip4_addr4(server), num)); + (sntp_set_servers_from_dhcp ? "Got" : "Rejected"), + ip4_addr1(server), ip4_addr2(server), ip4_addr3(server), ip4_addr4(server), num)); if (sntp_set_servers_from_dhcp && num) { u8_t i; for (i = 0; (i < num) && (i < SNTP_MAX_SERVERS); i++) { @@ -683,7 +824,7 @@ dhcp_set_ntp_servers(u8_t num, const ip4_addr_t *server) * @return IP address of the indexed NTP server or "ip_addr_any" if the NTP * server has not been configured by address (or at all). */ -const ip_addr_t* +const ip_addr_t * sntp_getserver(u8_t idx) { if (idx < SNTP_MAX_SERVERS) { @@ -696,12 +837,13 @@ sntp_getserver(u8_t idx) /** * Initialize one of the NTP servers by name * - * @param numdns the index of the NTP server to set must be < SNTP_MAX_SERVERS - * @param dnsserver DNS name of the NTP server to set, to be resolved at contact time + * @param idx the index of the NTP server to set must be < SNTP_MAX_SERVERS + * @param server DNS name of the NTP server to set, to be resolved at contact time */ void -sntp_setservername(u8_t idx, char *server) +sntp_setservername(u8_t idx, const char *server) { + LWIP_ASSERT_CORE_LOCKED(); if (idx < SNTP_MAX_SERVERS) { sntp_servers[idx].name = server; } @@ -710,11 +852,11 @@ sntp_setservername(u8_t idx, char *server) /** * Obtain one of the currently configured by name NTP servers. * - * @param numdns the index of the NTP server + * @param idx the index of the NTP server * @return IP address of the indexed NTP server or NULL if the NTP * server has not been configured by name (or at all) */ -char * +const char * sntp_getservername(u8_t idx) { if (idx < SNTP_MAX_SERVERS) { diff --git a/Libraries/LwIP/src/apps/tftp/tftp_server.c b/Libraries/LwIP/src/apps/tftp/tftp_server.c index 8a019c7..d6c75b4 100755 --- a/Libraries/LwIP/src/apps/tftp/tftp_server.c +++ b/Libraries/LwIP/src/apps/tftp/tftp_server.c @@ -1,4 +1,4 @@ -/****************************************************************//** +/** * * @file tftp_server.c * @@ -10,9 +10,9 @@ * Copyright (c) Deltatee Enterprises Ltd. 2013 * All rights reserved. * - ********************************************************************/ + */ -/* +/* * Redistribution and use in source and binary forms, with or without * modification,are permitted provided that the following conditions are met: * @@ -92,7 +92,7 @@ struct tftp_state { static struct tftp_state tftp_state; -static void tftp_tmr(void* arg); +static void tftp_tmr(void *arg); static void close_handle(void) @@ -100,13 +100,13 @@ close_handle(void) tftp_state.port = 0; ip_addr_set_any(0, &tftp_state.addr); - if(tftp_state.last_data != NULL) { + if (tftp_state.last_data != NULL) { pbuf_free(tftp_state.last_data); tftp_state.last_data = NULL; } sys_untimeout(tftp_tmr, NULL); - + if (tftp_state.handle) { tftp_state.ctx->close(tftp_state.handle); tftp_state.handle = NULL; @@ -118,15 +118,15 @@ static void send_error(const ip_addr_t *addr, u16_t port, enum tftp_error code, const char *str) { int str_length = strlen(str); - struct pbuf* p; - u16_t* payload; - + struct pbuf *p; + u16_t *payload; + p = pbuf_alloc(PBUF_TRANSPORT, (u16_t)(TFTP_HEADER_LENGTH + str_length + 1), PBUF_RAM); - if(p == NULL) { + if (p == NULL) { return; } - payload = (u16_t*) p->payload; + payload = (u16_t *) p->payload; payload[0] = PP_HTONS(TFTP_ERROR); payload[1] = lwip_htons(code); MEMCPY(&payload[2], str, str_length + 1); @@ -138,15 +138,15 @@ send_error(const ip_addr_t *addr, u16_t port, enum tftp_error code, const char * static void send_ack(u16_t blknum) { - struct pbuf* p; - u16_t* payload; - + struct pbuf *p; + u16_t *payload; + p = pbuf_alloc(PBUF_TRANSPORT, TFTP_HEADER_LENGTH, PBUF_RAM); - if(p == NULL) { + if (p == NULL) { return; } - payload = (u16_t*) p->payload; - + payload = (u16_t *) p->payload; + payload[0] = PP_HTONS(TFTP_ACK); payload[1] = lwip_htons(blknum); udp_sendto(tftp_state.upcb, p, &tftp_state.addr, tftp_state.port); @@ -157,15 +157,15 @@ static void resend_data(void) { struct pbuf *p = pbuf_alloc(PBUF_TRANSPORT, tftp_state.last_data->len, PBUF_RAM); - if(p == NULL) { + if (p == NULL) { return; } - if(pbuf_copy(p, tftp_state.last_data) != ERR_OK) { + if (pbuf_copy(p, tftp_state.last_data) != ERR_OK) { pbuf_free(p); return; } - + udp_sendto(tftp_state.upcb, p, &tftp_state.addr, tftp_state.port); pbuf_free(p); } @@ -176,12 +176,12 @@ send_data(void) u16_t *payload; int ret; - if(tftp_state.last_data != NULL) { + if (tftp_state.last_data != NULL) { pbuf_free(tftp_state.last_data); } - + tftp_state.last_data = pbuf_alloc(PBUF_TRANSPORT, TFTP_HEADER_LENGTH + TFTP_MAX_PAYLOAD_SIZE, PBUF_RAM); - if(tftp_state.last_data == NULL) { + if (tftp_state.last_data == NULL) { return; } @@ -208,7 +208,7 @@ recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr, u16 LWIP_UNUSED_ARG(arg); LWIP_UNUSED_ARG(upcb); - + if (((tftp_state.port != 0) && (port != tftp_state.port)) || (!ip_addr_isany_val(tftp_state.addr) && !ip_addr_cmp(&tftp_state.addr, addr))) { send_error(addr, port, TFTP_ERROR_ACCESS_VIOLATION, "Only one connection at a time is supported"); @@ -223,37 +223,36 @@ recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr, u16 switch (opcode) { case PP_HTONS(TFTP_RRQ): /* fall through */ - case PP_HTONS(TFTP_WRQ): - { + case PP_HTONS(TFTP_WRQ): { const char tftp_null = 0; - char filename[TFTP_MAX_FILENAME_LEN]; - char mode[TFTP_MAX_MODE_LEN]; + char filename[TFTP_MAX_FILENAME_LEN + 1]; + char mode[TFTP_MAX_MODE_LEN + 1]; u16_t filename_end_offset; u16_t mode_end_offset; - if(tftp_state.handle != NULL) { + if (tftp_state.handle != NULL) { send_error(addr, port, TFTP_ERROR_ACCESS_VIOLATION, "Only one connection at a time is supported"); break; } - + sys_timeout(TFTP_TIMER_MSECS, tftp_tmr, NULL); /* find \0 in pbuf -> end of filename string */ filename_end_offset = pbuf_memfind(p, &tftp_null, sizeof(tftp_null), 2); - if((u16_t)(filename_end_offset-2) > sizeof(filename)) { + if ((u16_t)(filename_end_offset - 1) > sizeof(filename)) { send_error(addr, port, TFTP_ERROR_ACCESS_VIOLATION, "Filename too long/not NULL terminated"); break; } - pbuf_copy_partial(p, filename, filename_end_offset-2, 2); + pbuf_copy_partial(p, filename, filename_end_offset - 1, 2); /* find \0 in pbuf -> end of mode string */ - mode_end_offset = pbuf_memfind(p, &tftp_null, sizeof(tftp_null), filename_end_offset+1); - if((u16_t)(mode_end_offset-filename_end_offset) > sizeof(mode)) { + mode_end_offset = pbuf_memfind(p, &tftp_null, sizeof(tftp_null), filename_end_offset + 1); + if ((u16_t)(mode_end_offset - filename_end_offset) > sizeof(mode)) { send_error(addr, port, TFTP_ERROR_ACCESS_VIOLATION, "Mode too long/not NULL terminated"); break; } - pbuf_copy_partial(p, mode, mode_end_offset-filename_end_offset, filename_end_offset+1); - + pbuf_copy_partial(p, mode, mode_end_offset - filename_end_offset, filename_end_offset + 1); + tftp_state.handle = tftp_state.ctx->open(filename, mode, opcode == PP_HTONS(TFTP_WRQ)); tftp_state.blknum = 1; @@ -279,12 +278,11 @@ recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr, u16 break; } - - case PP_HTONS(TFTP_DATA): - { + + case PP_HTONS(TFTP_DATA): { int ret; u16_t blknum; - + if (tftp_state.handle == NULL) { send_error(addr, port, TFTP_ERROR_ACCESS_VIOLATION, "No connection"); break; @@ -296,24 +294,32 @@ recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr, u16 } blknum = lwip_ntohs(sbuf[1]); - pbuf_header(p, -TFTP_HEADER_LENGTH); + if (blknum == tftp_state.blknum) { + pbuf_remove_header(p, TFTP_HEADER_LENGTH); - ret = tftp_state.ctx->write(tftp_state.handle, p); - if (ret < 0) { - send_error(addr, port, TFTP_ERROR_ACCESS_VIOLATION, "error writing file"); - close_handle(); - } else { + ret = tftp_state.ctx->write(tftp_state.handle, p); + if (ret < 0) { + send_error(addr, port, TFTP_ERROR_ACCESS_VIOLATION, "error writing file"); + close_handle(); + } else { + send_ack(blknum); + } + + if (p->tot_len < TFTP_MAX_PAYLOAD_SIZE) { + close_handle(); + } else { + tftp_state.blknum++; + } + } else if ((u16_t)(blknum + 1) == tftp_state.blknum) { + /* retransmit of previous block, ack again (casting to u16_t to care for overflow) */ send_ack(blknum); - } - - if (p->tot_len < TFTP_MAX_PAYLOAD_SIZE) { - close_handle(); + } else { + send_error(addr, port, TFTP_ERROR_UNKNOWN_TRFR_ID, "Wrong block number"); } break; } - case PP_HTONS(TFTP_ACK): - { + case PP_HTONS(TFTP_ACK): { u16_t blknum; int lastpkt; @@ -348,7 +354,7 @@ recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr, u16 break; } - + default: send_error(addr, port, TFTP_ERROR_ILLEGAL_OPERATION, "Unknown operation"); break; @@ -358,10 +364,10 @@ recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr, u16 } static void -tftp_tmr(void* arg) +tftp_tmr(void *arg) { LWIP_UNUSED_ARG(arg); - + tftp_state.timer++; if (tftp_state.handle == NULL) { @@ -386,11 +392,12 @@ tftp_tmr(void* arg) * Initialize TFTP server. * @param ctx TFTP callback struct */ -err_t +err_t tftp_init(const struct tftp_context *ctx) { err_t ret; + /* LWIP_ASSERT_CORE_LOCKED(); is checked by udp_new() */ struct udp_pcb *pcb = udp_new_ip_type(IPADDR_TYPE_ANY); if (pcb == NULL) { return ERR_MEM; @@ -414,4 +421,15 @@ tftp_init(const struct tftp_context *ctx) return ERR_OK; } +/** @ingroup tftp + * Deinitialize ("turn off") TFTP server. + */ +void tftp_cleanup(void) +{ + LWIP_ASSERT("Cleanup called on non-initialized TFTP", tftp_state.upcb != NULL); + udp_remove(tftp_state.upcb); + close_handle(); + memset(&tftp_state, 0, sizeof(tftp_state)); +} + #endif /* LWIP_UDP */ diff --git a/Libraries/LwIP/src/core/altcp.c b/Libraries/LwIP/src/core/altcp.c new file mode 100644 index 0000000..d46d6cd --- /dev/null +++ b/Libraries/LwIP/src/core/altcp.c @@ -0,0 +1,681 @@ +/** + * @file + * @defgroup altcp Application layered TCP Functions + * @ingroup altcp_api + * + * This file contains the common functions for altcp to work. + * For more details see @ref altcp_api. + */ + +/** + * @defgroup altcp_api Application layered TCP Introduction + * @ingroup callbackstyle_api + * + * Overview + * -------- + * altcp (application layered TCP connection API; to be used from TCPIP thread) + * is an abstraction layer that prevents applications linking hard against the + * @ref tcp.h functions while providing the same functionality. It is used to + * e.g. add SSL/TLS (see LWIP_ALTCP_TLS) or proxy-connect support to an application + * written for the tcp callback API without that application knowing the + * protocol details. + * + * * This interface mimics the tcp callback API to the application while preventing + * direct linking (much like virtual functions). + * * This way, an application can make use of other application layer protocols + * on top of TCP without knowing the details (e.g. TLS, proxy connection). + * * This is achieved by simply including "lwip/altcp.h" instead of "lwip/tcp.h", + * replacing "struct tcp_pcb" with "struct altcp_pcb" and prefixing all functions + * with "altcp_" instead of "tcp_". + * + * With altcp support disabled (LWIP_ALTCP==0), applications written against the + * altcp API can still be compiled but are directly linked against the tcp.h + * callback API and then cannot use layered protocols. To minimize code changes + * in this case, the use of altcp_allocators is strongly suggested. + * + * Usage + * ----- + * To make use of this API from an existing tcp raw API application: + * * Include "lwip/altcp.h" instead of "lwip/tcp.h" + * * Replace "struct tcp_pcb" with "struct altcp_pcb" + * * Prefix all called tcp API functions with "altcp_" instead of "tcp_" to link + * against the altcp functions + * * @ref altcp_new (and @ref altcp_new_ip_type/@ref altcp_new_ip6) take + * an @ref altcp_allocator_t as an argument, whereas the original tcp API + * functions take no arguments. + * * An @ref altcp_allocator_t allocator is an object that holds a pointer to an + * allocator object and a corresponding state (e.g. for TLS, the corresponding + * state may hold certificates or keys). This way, the application does not + * even need to know if it uses TLS or pure TCP, this is handled at runtime + * by passing a specific allocator. + * * An application can alternatively bind hard to the altcp_tls API by calling + * @ref altcp_tls_new or @ref altcp_tls_wrap. + * * The TLS layer is not directly implemented by lwIP, but a port to mbedTLS is + * provided. + * * Another altcp layer is proxy-connect to use TLS behind a HTTP proxy (see + * @ref altcp_proxyconnect.h) + * + * altcp_allocator_t + * ----------------- + * An altcp allocator is created by the application by combining an allocator + * callback function and a corresponding state, e.g.:\code{.c} + * static const unsigned char cert[] = {0x2D, ... (see mbedTLS doc for how to create this)}; + * struct altcp_tls_config * conf = altcp_tls_create_config_client(cert, sizeof(cert)); + * altcp_allocator_t tls_allocator = { + * altcp_tls_alloc, conf + * }; + * \endcode + * + * + * struct altcp_tls_config + * ----------------------- + * The struct altcp_tls_config holds state that is needed to create new TLS client + * or server connections (e.g. certificates and private keys). + * + * It is not defined by lwIP itself but by the TLS port (e.g. altcp_tls to mbedTLS + * adaption). However, the parameters used to create it are defined in @ref + * altcp_tls.h (see @ref altcp_tls_create_config_server_privkey_cert for servers + * and @ref altcp_tls_create_config_client/@ref altcp_tls_create_config_client_2wayauth + * for clients). + * + * For mbedTLS, ensure that certificates can be parsed by 'mbedtls_x509_crt_parse()' and + * private keys can be parsed by 'mbedtls_pk_parse_key()'. + */ + +/* + * Copyright (c) 2017 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ + +#include "lwip/opt.h" + +#if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/altcp.h" +#include "lwip/priv/altcp_priv.h" +#include "lwip/altcp_tcp.h" +#include "lwip/tcp.h" +#include "lwip/mem.h" + +#include + +extern const struct altcp_functions altcp_tcp_functions; + +/** + * For altcp layer implementations only: allocate a new struct altcp_pcb from the pool + * and zero the memory + */ +struct altcp_pcb * +altcp_alloc(void) +{ + struct altcp_pcb *ret = (struct altcp_pcb *)memp_malloc(MEMP_ALTCP_PCB); + if (ret != NULL) { + memset(ret, 0, sizeof(struct altcp_pcb)); + } + return ret; +} + +/** + * For altcp layer implementations only: return a struct altcp_pcb to the pool + */ +void +altcp_free(struct altcp_pcb *conn) +{ + if (conn) { + if (conn->fns && conn->fns->dealloc) { + conn->fns->dealloc(conn); + } + memp_free(MEMP_ALTCP_PCB, conn); + } +} + +/** + * @ingroup altcp + * altcp_new_ip6: @ref altcp_new for IPv6 + */ +struct altcp_pcb * +altcp_new_ip6(altcp_allocator_t *allocator) +{ + return altcp_new_ip_type(allocator, IPADDR_TYPE_V6); +} + +/** + * @ingroup altcp + * altcp_new: @ref altcp_new for IPv4 + */ +struct altcp_pcb * +altcp_new(altcp_allocator_t *allocator) +{ + return altcp_new_ip_type(allocator, IPADDR_TYPE_V4); +} + +/** + * @ingroup altcp + * altcp_new_ip_type: called by applications to allocate a new pcb with the help of an + * allocator function. + * + * @param allocator allocator function and argument + * @param ip_type IP version of the pcb (@ref lwip_ip_addr_type) + * @return a new altcp_pcb or NULL on error + */ +struct altcp_pcb * +altcp_new_ip_type(altcp_allocator_t *allocator, u8_t ip_type) +{ + struct altcp_pcb *conn; + if (allocator == NULL) { + /* no allocator given, create a simple TCP connection */ + return altcp_tcp_new_ip_type(ip_type); + } + if (allocator->alloc == NULL) { + /* illegal allocator */ + return NULL; + } + conn = allocator->alloc(allocator->arg, ip_type); + if (conn == NULL) { + /* allocation failed */ + return NULL; + } + return conn; +} + +/** + * @ingroup altcp + * @see tcp_arg() + */ +void +altcp_arg(struct altcp_pcb *conn, void *arg) +{ + if (conn) { + conn->arg = arg; + } +} + +/** + * @ingroup altcp + * @see tcp_accept() + */ +void +altcp_accept(struct altcp_pcb *conn, altcp_accept_fn accept) +{ + if (conn != NULL) { + conn->accept = accept; + } +} + +/** + * @ingroup altcp + * @see tcp_recv() + */ +void +altcp_recv(struct altcp_pcb *conn, altcp_recv_fn recv) +{ + if (conn) { + conn->recv = recv; + } +} + +/** + * @ingroup altcp + * @see tcp_sent() + */ +void +altcp_sent(struct altcp_pcb *conn, altcp_sent_fn sent) +{ + if (conn) { + conn->sent = sent; + } +} + +/** + * @ingroup altcp + * @see tcp_poll() + */ +void +altcp_poll(struct altcp_pcb *conn, altcp_poll_fn poll, u8_t interval) +{ + if (conn) { + conn->poll = poll; + conn->pollinterval = interval; + if (conn->fns && conn->fns->set_poll) { + conn->fns->set_poll(conn, interval); + } + } +} + +/** + * @ingroup altcp + * @see tcp_err() + */ +void +altcp_err(struct altcp_pcb *conn, altcp_err_fn err) +{ + if (conn) { + conn->err = err; + } +} + +/* Generic functions calling the "virtual" ones */ + +/** + * @ingroup altcp + * @see tcp_recved() + */ +void +altcp_recved(struct altcp_pcb *conn, u16_t len) +{ + if (conn && conn->fns && conn->fns->recved) { + conn->fns->recved(conn, len); + } +} + +/** + * @ingroup altcp + * @see tcp_bind() + */ +err_t +altcp_bind(struct altcp_pcb *conn, const ip_addr_t *ipaddr, u16_t port) +{ + if (conn && conn->fns && conn->fns->bind) { + return conn->fns->bind(conn, ipaddr, port); + } + return ERR_VAL; +} + +/** + * @ingroup altcp + * @see tcp_connect() + */ +err_t +altcp_connect(struct altcp_pcb *conn, const ip_addr_t *ipaddr, u16_t port, altcp_connected_fn connected) +{ + if (conn && conn->fns && conn->fns->connect) { + return conn->fns->connect(conn, ipaddr, port, connected); + } + return ERR_VAL; +} + +/** + * @ingroup altcp + * @see tcp_listen_with_backlog_and_err() + */ +struct altcp_pcb * +altcp_listen_with_backlog_and_err(struct altcp_pcb *conn, u8_t backlog, err_t *err) +{ + if (conn && conn->fns && conn->fns->listen) { + return conn->fns->listen(conn, backlog, err); + } + return NULL; +} + +/** + * @ingroup altcp + * @see tcp_abort() + */ +void +altcp_abort(struct altcp_pcb *conn) +{ + if (conn && conn->fns && conn->fns->abort) { + conn->fns->abort(conn); + } +} + +/** + * @ingroup altcp + * @see tcp_close() + */ +err_t +altcp_close(struct altcp_pcb *conn) +{ + if (conn && conn->fns && conn->fns->close) { + return conn->fns->close(conn); + } + return ERR_VAL; +} + +/** + * @ingroup altcp + * @see tcp_shutdown() + */ +err_t +altcp_shutdown(struct altcp_pcb *conn, int shut_rx, int shut_tx) +{ + if (conn && conn->fns && conn->fns->shutdown) { + return conn->fns->shutdown(conn, shut_rx, shut_tx); + } + return ERR_VAL; +} + +/** + * @ingroup altcp + * @see tcp_write() + */ +err_t +altcp_write(struct altcp_pcb *conn, const void *dataptr, u16_t len, u8_t apiflags) +{ + if (conn && conn->fns && conn->fns->write) { + return conn->fns->write(conn, dataptr, len, apiflags); + } + return ERR_VAL; +} + +/** + * @ingroup altcp + * @see tcp_output() + */ +err_t +altcp_output(struct altcp_pcb *conn) +{ + if (conn && conn->fns && conn->fns->output) { + return conn->fns->output(conn); + } + return ERR_VAL; +} + +/** + * @ingroup altcp + * @see tcp_mss() + */ +u16_t +altcp_mss(struct altcp_pcb *conn) +{ + if (conn && conn->fns && conn->fns->mss) { + return conn->fns->mss(conn); + } + return 0; +} + +/** + * @ingroup altcp + * @see tcp_sndbuf() + */ +u16_t +altcp_sndbuf(struct altcp_pcb *conn) +{ + if (conn && conn->fns && conn->fns->sndbuf) { + return conn->fns->sndbuf(conn); + } + return 0; +} + +/** + * @ingroup altcp + * @see tcp_sndqueuelen() + */ +u16_t +altcp_sndqueuelen(struct altcp_pcb *conn) +{ + if (conn && conn->fns && conn->fns->sndqueuelen) { + return conn->fns->sndqueuelen(conn); + } + return 0; +} + +void +altcp_nagle_disable(struct altcp_pcb *conn) +{ + if (conn && conn->fns && conn->fns->nagle_disable) { + conn->fns->nagle_disable(conn); + } +} + +void +altcp_nagle_enable(struct altcp_pcb *conn) +{ + if (conn && conn->fns && conn->fns->nagle_enable) { + conn->fns->nagle_enable(conn); + } +} + +int +altcp_nagle_disabled(struct altcp_pcb *conn) +{ + if (conn && conn->fns && conn->fns->nagle_disabled) { + return conn->fns->nagle_disabled(conn); + } + return 0; +} + +/** + * @ingroup altcp + * @see tcp_setprio() + */ +void +altcp_setprio(struct altcp_pcb *conn, u8_t prio) +{ + if (conn && conn->fns && conn->fns->setprio) { + conn->fns->setprio(conn, prio); + } +} + +err_t +altcp_get_tcp_addrinfo(struct altcp_pcb *conn, int local, ip_addr_t *addr, u16_t *port) +{ + if (conn && conn->fns && conn->fns->addrinfo) { + return conn->fns->addrinfo(conn, local, addr, port); + } + return ERR_VAL; +} + +ip_addr_t * +altcp_get_ip(struct altcp_pcb *conn, int local) +{ + if (conn && conn->fns && conn->fns->getip) { + return conn->fns->getip(conn, local); + } + return NULL; +} + +u16_t +altcp_get_port(struct altcp_pcb *conn, int local) +{ + if (conn && conn->fns && conn->fns->getport) { + return conn->fns->getport(conn, local); + } + return 0; +} + +#ifdef LWIP_DEBUG +enum tcp_state +altcp_dbg_get_tcp_state(struct altcp_pcb *conn) +{ + if (conn && conn->fns && conn->fns->dbg_get_tcp_state) { + return conn->fns->dbg_get_tcp_state(conn); + } + return CLOSED; +} +#endif + +/* Default implementations for the "virtual" functions */ + +void +altcp_default_set_poll(struct altcp_pcb *conn, u8_t interval) +{ + if (conn && conn->inner_conn) { + altcp_poll(conn->inner_conn, conn->poll, interval); + } +} + +void +altcp_default_recved(struct altcp_pcb *conn, u16_t len) +{ + if (conn && conn->inner_conn) { + altcp_recved(conn->inner_conn, len); + } +} + +err_t +altcp_default_bind(struct altcp_pcb *conn, const ip_addr_t *ipaddr, u16_t port) +{ + if (conn && conn->inner_conn) { + return altcp_bind(conn->inner_conn, ipaddr, port); + } + return ERR_VAL; +} + +err_t +altcp_default_shutdown(struct altcp_pcb *conn, int shut_rx, int shut_tx) +{ + if (conn) { + if (shut_rx && shut_tx && conn->fns && conn->fns->close) { + /* default shutdown for both sides is close */ + return conn->fns->close(conn); + } + if (conn->inner_conn) { + return altcp_shutdown(conn->inner_conn, shut_rx, shut_tx); + } + } + return ERR_VAL; +} + +err_t +altcp_default_write(struct altcp_pcb *conn, const void *dataptr, u16_t len, u8_t apiflags) +{ + if (conn && conn->inner_conn) { + return altcp_write(conn->inner_conn, dataptr, len, apiflags); + } + return ERR_VAL; +} + +err_t +altcp_default_output(struct altcp_pcb *conn) +{ + if (conn && conn->inner_conn) { + return altcp_output(conn->inner_conn); + } + return ERR_VAL; +} + +u16_t +altcp_default_mss(struct altcp_pcb *conn) +{ + if (conn && conn->inner_conn) { + return altcp_mss(conn->inner_conn); + } + return 0; +} + +u16_t +altcp_default_sndbuf(struct altcp_pcb *conn) +{ + if (conn && conn->inner_conn) { + return altcp_sndbuf(conn->inner_conn); + } + return 0; +} + +u16_t +altcp_default_sndqueuelen(struct altcp_pcb *conn) +{ + if (conn && conn->inner_conn) { + return altcp_sndqueuelen(conn->inner_conn); + } + return 0; +} + +void +altcp_default_nagle_disable(struct altcp_pcb *conn) +{ + if (conn && conn->inner_conn) { + altcp_nagle_disable(conn->inner_conn); + } +} + +void +altcp_default_nagle_enable(struct altcp_pcb *conn) +{ + if (conn && conn->inner_conn) { + altcp_nagle_enable(conn->inner_conn); + } +} + +int +altcp_default_nagle_disabled(struct altcp_pcb *conn) +{ + if (conn && conn->inner_conn) { + return altcp_nagle_disabled(conn->inner_conn); + } + return 0; +} + +void +altcp_default_setprio(struct altcp_pcb *conn, u8_t prio) +{ + if (conn && conn->inner_conn) { + altcp_setprio(conn->inner_conn, prio); + } +} + +void +altcp_default_dealloc(struct altcp_pcb *conn) +{ + LWIP_UNUSED_ARG(conn); + /* nothing to do */ +} + +err_t +altcp_default_get_tcp_addrinfo(struct altcp_pcb *conn, int local, ip_addr_t *addr, u16_t *port) +{ + if (conn && conn->inner_conn) { + return altcp_get_tcp_addrinfo(conn->inner_conn, local, addr, port); + } + return ERR_VAL; +} + +ip_addr_t * +altcp_default_get_ip(struct altcp_pcb *conn, int local) +{ + if (conn && conn->inner_conn) { + return altcp_get_ip(conn->inner_conn, local); + } + return NULL; +} + +u16_t +altcp_default_get_port(struct altcp_pcb *conn, int local) +{ + if (conn && conn->inner_conn) { + return altcp_get_port(conn->inner_conn, local); + } + return 0; +} + +#ifdef LWIP_DEBUG +enum tcp_state +altcp_default_dbg_get_tcp_state(struct altcp_pcb *conn) +{ + if (conn && conn->inner_conn) { + return altcp_dbg_get_tcp_state(conn->inner_conn); + } + return CLOSED; +} +#endif + + +#endif /* LWIP_ALTCP */ diff --git a/Libraries/LwIP/src/core/altcp_alloc.c b/Libraries/LwIP/src/core/altcp_alloc.c new file mode 100644 index 0000000..cd619bc --- /dev/null +++ b/Libraries/LwIP/src/core/altcp_alloc.c @@ -0,0 +1,87 @@ +/** + * @file + * Application layered TCP connection API (to be used from TCPIP thread)\n + * This interface mimics the tcp callback API to the application while preventing + * direct linking (much like virtual functions). + * This way, an application can make use of other application layer protocols + * on top of TCP without knowing the details (e.g. TLS, proxy connection). + * + * This file contains allocation implementation that combine several layers. + */ + +/* + * Copyright (c) 2017 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ + +#include "lwip/opt.h" + +#if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/altcp.h" +#include "lwip/altcp_tcp.h" +#include "lwip/altcp_tls.h" +#include "lwip/priv/altcp_priv.h" +#include "lwip/mem.h" + +#include + +#if LWIP_ALTCP_TLS + +/** This standard allocator function creates an altcp pcb for + * TLS over TCP */ +struct altcp_pcb * +altcp_tls_new(struct altcp_tls_config *config, u8_t ip_type) +{ + struct altcp_pcb *inner_conn, *ret; + LWIP_UNUSED_ARG(ip_type); + + inner_conn = altcp_tcp_new_ip_type(ip_type); + if (inner_conn == NULL) { + return NULL; + } + ret = altcp_tls_wrap(config, inner_conn); + if (ret == NULL) { + altcp_close(inner_conn); + } + return ret; +} + +/** This standard allocator function creates an altcp pcb for + * TLS over TCP */ +struct altcp_pcb * +altcp_tls_alloc(void *arg, u8_t ip_type) +{ + return altcp_tls_new((struct altcp_tls_config *)arg, ip_type); +} + +#endif /* LWIP_ALTCP_TLS */ + +#endif /* LWIP_ALTCP */ diff --git a/Libraries/LwIP/src/core/altcp_tcp.c b/Libraries/LwIP/src/core/altcp_tcp.c new file mode 100644 index 0000000..b715f04 --- /dev/null +++ b/Libraries/LwIP/src/core/altcp_tcp.c @@ -0,0 +1,543 @@ +/** + * @file + * Application layered TCP connection API (to be used from TCPIP thread)\n + * This interface mimics the tcp callback API to the application while preventing + * direct linking (much like virtual functions). + * This way, an application can make use of other application layer protocols + * on top of TCP without knowing the details (e.g. TLS, proxy connection). + * + * This file contains the base implementation calling into tcp. + */ + +/* + * Copyright (c) 2017 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ + +#include "lwip/opt.h" + +#if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/altcp.h" +#include "lwip/altcp_tcp.h" +#include "lwip/priv/altcp_priv.h" +#include "lwip/tcp.h" +#include "lwip/mem.h" + +#include + +#define ALTCP_TCP_ASSERT_CONN(conn) do { \ + LWIP_ASSERT("conn->inner_conn == NULL", (conn)->inner_conn == NULL); \ + LWIP_UNUSED_ARG(conn); /* for LWIP_NOASSERT */ } while(0) +#define ALTCP_TCP_ASSERT_CONN_PCB(conn, tpcb) do { \ + LWIP_ASSERT("pcb mismatch", (conn)->state == tpcb); \ + LWIP_UNUSED_ARG(tpcb); /* for LWIP_NOASSERT */ \ + ALTCP_TCP_ASSERT_CONN(conn); } while(0) + + +/* Variable prototype, the actual declaration is at the end of this file + since it contains pointers to static functions declared here */ +extern const struct altcp_functions altcp_tcp_functions; + +static void altcp_tcp_setup(struct altcp_pcb *conn, struct tcp_pcb *tpcb); + +/* callback functions for TCP */ +static err_t +altcp_tcp_accept(void *arg, struct tcp_pcb *new_tpcb, err_t err) +{ + struct altcp_pcb *listen_conn = (struct altcp_pcb *)arg; + if (listen_conn && listen_conn->accept) { + /* create a new altcp_conn to pass to the next 'accept' callback */ + struct altcp_pcb *new_conn = altcp_alloc(); + if (new_conn == NULL) { + return ERR_MEM; + } + altcp_tcp_setup(new_conn, new_tpcb); + return listen_conn->accept(listen_conn->arg, new_conn, err); + } + return ERR_ARG; +} + +static err_t +altcp_tcp_connected(void *arg, struct tcp_pcb *tpcb, err_t err) +{ + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + if (conn) { + ALTCP_TCP_ASSERT_CONN_PCB(conn, tpcb); + if (conn->connected) { + return conn->connected(conn->arg, conn, err); + } + } + return ERR_OK; +} + +static err_t +altcp_tcp_recv(void *arg, struct tcp_pcb *tpcb, struct pbuf *p, err_t err) +{ + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + if (conn) { + ALTCP_TCP_ASSERT_CONN_PCB(conn, tpcb); + if (conn->recv) { + return conn->recv(conn->arg, conn, p, err); + } + } + if (p != NULL) { + /* prevent memory leaks */ + pbuf_free(p); + } + return ERR_OK; +} + +static err_t +altcp_tcp_sent(void *arg, struct tcp_pcb *tpcb, u16_t len) +{ + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + if (conn) { + ALTCP_TCP_ASSERT_CONN_PCB(conn, tpcb); + if (conn->sent) { + return conn->sent(conn->arg, conn, len); + } + } + return ERR_OK; +} + +static err_t +altcp_tcp_poll(void *arg, struct tcp_pcb *tpcb) +{ + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + if (conn) { + ALTCP_TCP_ASSERT_CONN_PCB(conn, tpcb); + if (conn->poll) { + return conn->poll(conn->arg, conn); + } + } + return ERR_OK; +} + +static void +altcp_tcp_err(void *arg, err_t err) +{ + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + if (conn) { + conn->state = NULL; /* already freed */ + if (conn->err) { + conn->err(conn->arg, err); + } + altcp_free(conn); + } +} + +/* setup functions */ + +static void +altcp_tcp_remove_callbacks(struct tcp_pcb *tpcb) +{ + tcp_arg(tpcb, NULL); + tcp_recv(tpcb, NULL); + tcp_sent(tpcb, NULL); + tcp_err(tpcb, NULL); + tcp_poll(tpcb, NULL, tpcb->pollinterval); +} + +static void +altcp_tcp_setup_callbacks(struct altcp_pcb *conn, struct tcp_pcb *tpcb) +{ + tcp_arg(tpcb, conn); + tcp_recv(tpcb, altcp_tcp_recv); + tcp_sent(tpcb, altcp_tcp_sent); + tcp_err(tpcb, altcp_tcp_err); + /* tcp_poll is set when interval is set by application */ + /* listen is set totally different :-) */ +} + +static void +altcp_tcp_setup(struct altcp_pcb *conn, struct tcp_pcb *tpcb) +{ + altcp_tcp_setup_callbacks(conn, tpcb); + conn->state = tpcb; + conn->fns = &altcp_tcp_functions; +} + +struct altcp_pcb * +altcp_tcp_new_ip_type(u8_t ip_type) +{ + /* Allocate the tcp pcb first to invoke the priority handling code + if we're out of pcbs */ + struct tcp_pcb *tpcb = tcp_new_ip_type(ip_type); + if (tpcb != NULL) { + struct altcp_pcb *ret = altcp_alloc(); + if (ret != NULL) { + altcp_tcp_setup(ret, tpcb); + return ret; + } else { + /* altcp_pcb allocation failed -> free the tcp_pcb too */ + tcp_close(tpcb); + } + } + return NULL; +} + +/** altcp_tcp allocator function fitting to @ref altcp_allocator_t / @ref altcp_new. +* +* arg pointer is not used for TCP. +*/ +struct altcp_pcb * +altcp_tcp_alloc(void *arg, u8_t ip_type) +{ + LWIP_UNUSED_ARG(arg); + return altcp_tcp_new_ip_type(ip_type); +} + +struct altcp_pcb * +altcp_tcp_wrap(struct tcp_pcb *tpcb) +{ + if (tpcb != NULL) { + struct altcp_pcb *ret = altcp_alloc(); + if (ret != NULL) { + altcp_tcp_setup(ret, tpcb); + return ret; + } + } + return NULL; +} + + +/* "virtual" functions calling into tcp */ +static void +altcp_tcp_set_poll(struct altcp_pcb *conn, u8_t interval) +{ + if (conn != NULL) { + struct tcp_pcb *pcb = (struct tcp_pcb *)conn->state; + ALTCP_TCP_ASSERT_CONN(conn); + tcp_poll(pcb, altcp_tcp_poll, interval); + } +} + +static void +altcp_tcp_recved(struct altcp_pcb *conn, u16_t len) +{ + if (conn != NULL) { + struct tcp_pcb *pcb = (struct tcp_pcb *)conn->state; + ALTCP_TCP_ASSERT_CONN(conn); + tcp_recved(pcb, len); + } +} + +static err_t +altcp_tcp_bind(struct altcp_pcb *conn, const ip_addr_t *ipaddr, u16_t port) +{ + struct tcp_pcb *pcb; + if (conn == NULL) { + return ERR_VAL; + } + ALTCP_TCP_ASSERT_CONN(conn); + pcb = (struct tcp_pcb *)conn->state; + return tcp_bind(pcb, ipaddr, port); +} + +static err_t +altcp_tcp_connect(struct altcp_pcb *conn, const ip_addr_t *ipaddr, u16_t port, altcp_connected_fn connected) +{ + struct tcp_pcb *pcb; + if (conn == NULL) { + return ERR_VAL; + } + ALTCP_TCP_ASSERT_CONN(conn); + conn->connected = connected; + pcb = (struct tcp_pcb *)conn->state; + return tcp_connect(pcb, ipaddr, port, altcp_tcp_connected); +} + +static struct altcp_pcb * +altcp_tcp_listen(struct altcp_pcb *conn, u8_t backlog, err_t *err) +{ + struct tcp_pcb *pcb; + struct tcp_pcb *lpcb; + if (conn == NULL) { + return NULL; + } + ALTCP_TCP_ASSERT_CONN(conn); + pcb = (struct tcp_pcb *)conn->state; + lpcb = tcp_listen_with_backlog_and_err(pcb, backlog, err); + if (lpcb != NULL) { + conn->state = lpcb; + tcp_accept(lpcb, altcp_tcp_accept); + return conn; + } + return NULL; +} + +static void +altcp_tcp_abort(struct altcp_pcb *conn) +{ + if (conn != NULL) { + struct tcp_pcb *pcb = (struct tcp_pcb *)conn->state; + ALTCP_TCP_ASSERT_CONN(conn); + if (pcb) { + tcp_abort(pcb); + } + } +} + +static err_t +altcp_tcp_close(struct altcp_pcb *conn) +{ + struct tcp_pcb *pcb; + if (conn == NULL) { + return ERR_VAL; + } + ALTCP_TCP_ASSERT_CONN(conn); + pcb = (struct tcp_pcb *)conn->state; + if (pcb) { + err_t err; + tcp_poll_fn oldpoll = pcb->poll; + altcp_tcp_remove_callbacks(pcb); + err = tcp_close(pcb); + if (err != ERR_OK) { + /* not closed, set up all callbacks again */ + altcp_tcp_setup_callbacks(conn, pcb); + /* poll callback is not included in the above */ + tcp_poll(pcb, oldpoll, pcb->pollinterval); + return err; + } + conn->state = NULL; /* unsafe to reference pcb after tcp_close(). */ + } + altcp_free(conn); + return ERR_OK; +} + +static err_t +altcp_tcp_shutdown(struct altcp_pcb *conn, int shut_rx, int shut_tx) +{ + struct tcp_pcb *pcb; + if (conn == NULL) { + return ERR_VAL; + } + ALTCP_TCP_ASSERT_CONN(conn); + pcb = (struct tcp_pcb *)conn->state; + return tcp_shutdown(pcb, shut_rx, shut_tx); +} + +static err_t +altcp_tcp_write(struct altcp_pcb *conn, const void *dataptr, u16_t len, u8_t apiflags) +{ + struct tcp_pcb *pcb; + if (conn == NULL) { + return ERR_VAL; + } + ALTCP_TCP_ASSERT_CONN(conn); + pcb = (struct tcp_pcb *)conn->state; + return tcp_write(pcb, dataptr, len, apiflags); +} + +static err_t +altcp_tcp_output(struct altcp_pcb *conn) +{ + struct tcp_pcb *pcb; + if (conn == NULL) { + return ERR_VAL; + } + ALTCP_TCP_ASSERT_CONN(conn); + pcb = (struct tcp_pcb *)conn->state; + return tcp_output(pcb); +} + +static u16_t +altcp_tcp_mss(struct altcp_pcb *conn) +{ + struct tcp_pcb *pcb; + if (conn == NULL) { + return 0; + } + ALTCP_TCP_ASSERT_CONN(conn); + pcb = (struct tcp_pcb *)conn->state; + return tcp_mss(pcb); +} + +static u16_t +altcp_tcp_sndbuf(struct altcp_pcb *conn) +{ + struct tcp_pcb *pcb; + if (conn == NULL) { + return 0; + } + ALTCP_TCP_ASSERT_CONN(conn); + pcb = (struct tcp_pcb *)conn->state; + return tcp_sndbuf(pcb); +} + +static u16_t +altcp_tcp_sndqueuelen(struct altcp_pcb *conn) +{ + struct tcp_pcb *pcb; + if (conn == NULL) { + return 0; + } + ALTCP_TCP_ASSERT_CONN(conn); + pcb = (struct tcp_pcb *)conn->state; + return tcp_sndqueuelen(pcb); +} + +static void +altcp_tcp_nagle_disable(struct altcp_pcb *conn) +{ + if (conn && conn->state) { + struct tcp_pcb *pcb = (struct tcp_pcb *)conn->state; + ALTCP_TCP_ASSERT_CONN(conn); + tcp_nagle_disable(pcb); + } +} + +static void +altcp_tcp_nagle_enable(struct altcp_pcb *conn) +{ + if (conn && conn->state) { + struct tcp_pcb *pcb = (struct tcp_pcb *)conn->state; + ALTCP_TCP_ASSERT_CONN(conn); + tcp_nagle_enable(pcb); + } +} + +static int +altcp_tcp_nagle_disabled(struct altcp_pcb *conn) +{ + if (conn && conn->state) { + struct tcp_pcb *pcb = (struct tcp_pcb *)conn->state; + ALTCP_TCP_ASSERT_CONN(conn); + return tcp_nagle_disabled(pcb); + } + return 0; +} + +static void +altcp_tcp_setprio(struct altcp_pcb *conn, u8_t prio) +{ + if (conn != NULL) { + struct tcp_pcb *pcb = (struct tcp_pcb *)conn->state; + ALTCP_TCP_ASSERT_CONN(conn); + tcp_setprio(pcb, prio); + } +} + +static void +altcp_tcp_dealloc(struct altcp_pcb *conn) +{ + LWIP_UNUSED_ARG(conn); + ALTCP_TCP_ASSERT_CONN(conn); + /* no private state to clean up */ +} + +static err_t +altcp_tcp_get_tcp_addrinfo(struct altcp_pcb *conn, int local, ip_addr_t *addr, u16_t *port) +{ + if (conn) { + struct tcp_pcb *pcb = (struct tcp_pcb *)conn->state; + ALTCP_TCP_ASSERT_CONN(conn); + return tcp_tcp_get_tcp_addrinfo(pcb, local, addr, port); + } + return ERR_VAL; +} + +static ip_addr_t * +altcp_tcp_get_ip(struct altcp_pcb *conn, int local) +{ + if (conn) { + struct tcp_pcb *pcb = (struct tcp_pcb *)conn->state; + ALTCP_TCP_ASSERT_CONN(conn); + if (pcb) { + if (local) { + return &pcb->local_ip; + } else { + return &pcb->remote_ip; + } + } + } + return NULL; +} + +static u16_t +altcp_tcp_get_port(struct altcp_pcb *conn, int local) +{ + if (conn) { + struct tcp_pcb *pcb = (struct tcp_pcb *)conn->state; + ALTCP_TCP_ASSERT_CONN(conn); + if (pcb) { + if (local) { + return pcb->local_port; + } else { + return pcb->remote_port; + } + } + } + return 0; +} + +#ifdef LWIP_DEBUG +static enum tcp_state +altcp_tcp_dbg_get_tcp_state(struct altcp_pcb *conn) +{ + if (conn) { + struct tcp_pcb *pcb = (struct tcp_pcb *)conn->state; + ALTCP_TCP_ASSERT_CONN(conn); + if (pcb) { + return pcb->state; + } + } + return CLOSED; +} +#endif +const struct altcp_functions altcp_tcp_functions = { + altcp_tcp_set_poll, + altcp_tcp_recved, + altcp_tcp_bind, + altcp_tcp_connect, + altcp_tcp_listen, + altcp_tcp_abort, + altcp_tcp_close, + altcp_tcp_shutdown, + altcp_tcp_write, + altcp_tcp_output, + altcp_tcp_mss, + altcp_tcp_sndbuf, + altcp_tcp_sndqueuelen, + altcp_tcp_nagle_disable, + altcp_tcp_nagle_enable, + altcp_tcp_nagle_disabled, + altcp_tcp_setprio, + altcp_tcp_dealloc, + altcp_tcp_get_tcp_addrinfo, + altcp_tcp_get_ip, + altcp_tcp_get_port +#ifdef LWIP_DEBUG + , altcp_tcp_dbg_get_tcp_state +#endif +}; + +#endif /* LWIP_ALTCP */ diff --git a/Libraries/LwIP/src/core/def.c b/Libraries/LwIP/src/core/def.c index 63cb74b..004a528 100755 --- a/Libraries/LwIP/src/core/def.c +++ b/Libraries/LwIP/src/core/def.c @@ -11,7 +11,7 @@ * \#define lwip_htonl(x) your_htonl * * Note lwip_ntohs() and lwip_ntohl() are merely references to the htonx counterparts. - * + * * If you \#define them to htons() and htonl(), you should * \#define LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS to prevent lwIP from * defining htonx/ntohx compatibility macros. @@ -75,7 +75,7 @@ u16_t lwip_htons(u16_t n) { - return (u16_t)PP_HTONS(n); + return PP_HTONS(n); } #endif /* lwip_htons */ @@ -89,7 +89,7 @@ lwip_htons(u16_t n) u32_t lwip_htonl(u32_t n) { - return (u32_t)PP_HTONL(n); + return PP_HTONL(n); } #endif /* lwip_htonl */ @@ -101,10 +101,10 @@ lwip_htonl(u32_t n) * lwIP default implementation for strnstr() non-standard function. * This can be \#defined to strnstr() depending on your platform port. */ -char* -lwip_strnstr(const char* buffer, const char* token, size_t n) +char * +lwip_strnstr(const char *buffer, const char *token, size_t n) { - const char* p; + const char *p; size_t tokenlen = strlen(token); if (tokenlen == 0) { return LWIP_CONST_CAST(char *, buffer); @@ -125,7 +125,7 @@ lwip_strnstr(const char* buffer, const char* token, size_t n) * This can be \#defined to stricmp() depending on your platform port. */ int -lwip_stricmp(const char* str1, const char* str2) +lwip_stricmp(const char *str1, const char *str2) { char c1, c2; @@ -160,7 +160,7 @@ lwip_stricmp(const char* str1, const char* str2) * This can be \#defined to strnicmp() depending on your platform port. */ int -lwip_strnicmp(const char* str1, const char* str2, size_t len) +lwip_strnicmp(const char *str1, const char *str2, size_t len) { char c1, c2; @@ -183,7 +183,8 @@ lwip_strnicmp(const char* str1, const char* str2, size_t len) return 1; } } - } while (len-- && c1 != 0); + len--; + } while ((len != 0) && (c1 != 0)); return 0; } #endif @@ -195,28 +196,45 @@ lwip_strnicmp(const char* str1, const char* str2, size_t len) * This can be \#defined to itoa() or snprintf(result, bufsize, "%d", number) depending on your platform port. */ void -lwip_itoa(char* result, size_t bufsize, int number) +lwip_itoa(char *result, size_t bufsize, int number) { - const int base = 10; - char* ptr = result, *ptr1 = result, tmp_char; - int tmp_value; - LWIP_UNUSED_ARG(bufsize); + char *res = result; + char *tmp = result + bufsize - 1; + int n = (number >= 0) ? number : -number; - do { - tmp_value = number; - number /= base; - *ptr++ = "zyxwvutsrqponmlkjihgfedcba9876543210123456789abcdefghijklmnopqrstuvwxyz"[35 + (tmp_value - number * base)]; - } while(number); + /* handle invalid bufsize */ + if (bufsize < 2) { + if (bufsize == 1) { + *result = 0; + } + return; + } - /* Apply negative sign */ - if (tmp_value < 0) { - *ptr++ = '-'; + /* First, add sign */ + if (number < 0) { + *res++ = '-'; } - *ptr-- = '\0'; - while(ptr1 < ptr) { - tmp_char = *ptr; - *ptr--= *ptr1; - *ptr1++ = tmp_char; + /* Then create the string from the end and stop if buffer full, + and ensure output string is zero terminated */ + *tmp = 0; + while ((n != 0) && (tmp > res)) { + char val = (char)('0' + (n % 10)); + tmp--; + *tmp = val; + n = n / 10; } + if (n) { + /* buffer is too small */ + *result = 0; + return; + } + if (*tmp == 0) { + /* Nothing added? */ + *res++ = '0'; + *res++ = 0; + return; + } + /* move from temporary buffer to output buffer (sign is not moved) */ + memmove(res, tmp, (size_t)((result + bufsize) - tmp)); } #endif diff --git a/Libraries/LwIP/src/core/dns.c b/Libraries/LwIP/src/core/dns.c index bf6306f..737b339 100755 --- a/Libraries/LwIP/src/core/dns.c +++ b/Libraries/LwIP/src/core/dns.c @@ -23,14 +23,16 @@ * Once a hostname has been resolved (or found to be non-existent), * the resolver code calls a specified callback function (which * must be implemented by the module that uses the resolver). - * + * * Multicast DNS queries are supported for names ending on ".local". * However, only "One-Shot Multicast DNS Queries" are supported (RFC 6762 * chapter 5.1), this is not a fully compliant implementation of continuous * mDNS querying! * * All functions must be called from TCPIP thread. - * + * + * @see DNS_MAX_SERVERS + * @see LWIP_DHCP_MAX_DNS_SERVERS * @see @ref netconn_common for thread-safe access. */ @@ -110,11 +112,6 @@ static u16_t dns_txid; #define DNS_PORT_ALLOWED(port) ((port) >= 1024) #endif -/** DNS maximum number of retries when asking for a name, before "timeout". */ -#ifndef DNS_MAX_RETRIES -#define DNS_MAX_RETRIES 4 -#endif - /** DNS resource record max. TTL (one week as default) */ #ifndef DNS_MAX_TTL #define DNS_MAX_TTL 604800 @@ -287,7 +284,7 @@ static err_t dns_lookup_local(const char *hostname, ip_addr_t *addr LWIP_DNS_ADD /* forward declarations */ static void dns_recv(void *s, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port); static void dns_check_entries(void); -static void dns_call_found(u8_t idx, ip_addr_t* addr); +static void dns_call_found(u8_t idx, ip_addr_t *addr); /*----------------------------------------------------------------------------- * Globals @@ -325,9 +322,9 @@ dns_init(void) #endif /* DNS_SERVER_ADDRESS */ LWIP_ASSERT("sanity check SIZEOF_DNS_QUERY", - sizeof(struct dns_query) == SIZEOF_DNS_QUERY); + sizeof(struct dns_query) == SIZEOF_DNS_QUERY); LWIP_ASSERT("sanity check SIZEOF_DNS_ANSWER", - sizeof(struct dns_answer) <= SIZEOF_DNS_ANSWER_ASSERT); + sizeof(struct dns_answer) <= SIZEOF_DNS_ANSWER_ASSERT); LWIP_DEBUGF(DNS_DEBUG, ("dns_init: initializing\n")); @@ -340,7 +337,7 @@ dns_init(void) /* initialize DNS table not needed (initialized to zero since it is a * global variable) */ LWIP_ASSERT("For implicit initialization to work, DNS_STATE_UNUSED needs to be 0", - DNS_STATE_UNUSED == 0); + DNS_STATE_UNUSED == 0); /* initialize DNS client */ udp_bind(dns_pcbs[0], IP_ANY_TYPE, 0); @@ -380,7 +377,7 @@ dns_setserver(u8_t numdns, const ip_addr_t *dnsserver) * @return IP address of the indexed DNS server or "ip_addr_any" if the DNS * server has not been configured. */ -const ip_addr_t* +const ip_addr_t * dns_getserver(u8_t numdns) { if (numdns < DNS_MAX_SERVERS) { @@ -419,7 +416,7 @@ dns_init_local(void) entry = (struct local_hostlist_entry *)memp_malloc(MEMP_LOCALHOSTLIST); LWIP_ASSERT("mem-error in dns_init_local", entry != NULL); if (entry != NULL) { - char* entry_name = (char*)entry + sizeof(struct local_hostlist_entry); + char *entry_name = (char *)entry + sizeof(struct local_hostlist_entry); MEMCPY(entry_name, init_entry->name, namelen); entry_name[namelen] = 0; entry->name = entry_name; @@ -566,7 +563,7 @@ dns_local_addhost(const char *hostname, const ip_addr_t *addr) { struct local_hostlist_entry *entry; size_t namelen; - char* entry_name; + char *entry_name; LWIP_ASSERT("invalid host name (NULL)", hostname != NULL); namelen = strlen(hostname); LWIP_ASSERT("namelen <= DNS_LOCAL_HOSTLIST_MAX_NAMELEN", namelen <= DNS_LOCAL_HOSTLIST_MAX_NAMELEN); @@ -574,7 +571,7 @@ dns_local_addhost(const char *hostname, const ip_addr_t *addr) if (entry == NULL) { return ERR_MEM; } - entry_name = (char*)entry + sizeof(struct local_hostlist_entry); + entry_name = (char *)entry + sizeof(struct local_hostlist_entry); MEMCPY(entry_name, hostname, namelen); entry_name[namelen] = 0; entry->name = entry_name; @@ -605,8 +602,6 @@ static err_t dns_lookup(const char *name, ip_addr_t *addr LWIP_DNS_ADDRTYPE_ARG(u8_t dns_addrtype)) { u8_t i; -#if DNS_LOCAL_HOSTLIST || defined(DNS_LOOKUP_LOCAL_EXTERN) -#endif /* DNS_LOCAL_HOSTLIST || defined(DNS_LOOKUP_LOCAL_EXTERN) */ #if DNS_LOCAL_HOSTLIST if (dns_lookup_local(name, addr LWIP_DNS_ADDRTYPE_ARG(dns_addrtype)) == ERR_OK) { return ERR_OK; @@ -624,7 +619,7 @@ dns_lookup(const char *name, ip_addr_t *addr LWIP_DNS_ADDRTYPE_ARG(u8_t dns_addr (lwip_strnicmp(name, dns_table[i].name, sizeof(dns_table[i].name)) == 0) && LWIP_DNS_ADDRTYPE_MATCH_IP(dns_addrtype, dns_table[i].ipaddr)) { LWIP_DEBUGF(DNS_DEBUG, ("dns_lookup: \"%s\": found = ", name)); - ip_addr_debug_print(DNS_DEBUG, &(dns_table[i].ipaddr)); + ip_addr_debug_print_val(DNS_DEBUG, dns_table[i].ipaddr); LWIP_DEBUGF(DNS_DEBUG, ("\n")); if (addr) { ip_addr_copy(*addr, dns_table[i].ipaddr); @@ -642,22 +637,29 @@ dns_lookup(const char *name, ip_addr_t *addr LWIP_DNS_ADDRTYPE_ARG(u8_t dns_addr * entry (otherwise, answers might arrive late for hostname not on the list * any more). * + * For now, this function compares case-insensitive to cope with all kinds of + * servers. This also means that "dns 0x20 bit encoding" must be checked + * externally, if we want to implement it. + * Currently, the request is sent exactly as passed in by he user request. + * * @param query hostname (not encoded) from the dns_table * @param p pbuf containing the encoded hostname in the DNS response * @param start_offset offset into p where the name starts * @return 0xFFFF: names differ, other: names equal -> offset behind name */ static u16_t -dns_compare_name(const char *query, struct pbuf* p, u16_t start_offset) +dns_compare_name(const char *query, struct pbuf *p, u16_t start_offset) { int n; u16_t response_offset = start_offset; do { - n = pbuf_try_get_at(p, response_offset++); - if (n < 0) { + n = pbuf_try_get_at(p, response_offset); + if ((n < 0) || (response_offset == 0xFFFF)) { + /* error or overflow */ return 0xFFFF; } + response_offset++; /** @see RFC 1035 - 4.1.4. Message compression */ if ((n & 0xc0) == 0xc0) { /* Compressed name: cannot be equal since we don't send them */ @@ -669,10 +671,14 @@ dns_compare_name(const char *query, struct pbuf* p, u16_t start_offset) if (c < 0) { return 0xFFFF; } - if ((*query) != (u8_t)c) { + if (lwip_tolower((*query)) != lwip_tolower((u8_t)c)) { return 0xFFFF; } - ++response_offset; + if (response_offset == 0xFFFF) { + /* would overflow */ + return 0xFFFF; + } + response_offset++; ++query; --n; } @@ -684,7 +690,11 @@ dns_compare_name(const char *query, struct pbuf* p, u16_t start_offset) } } while (n != 0); - return response_offset + 1; + if (response_offset == 0xFFFF) { + /* would overflow */ + return 0xFFFF; + } + return (u16_t)(response_offset + 1); } /** @@ -695,14 +705,14 @@ dns_compare_name(const char *query, struct pbuf* p, u16_t start_offset) * @return index to end of the name */ static u16_t -dns_skip_name(struct pbuf* p, u16_t query_idx) +dns_skip_name(struct pbuf *p, u16_t query_idx) { int n; u16_t offset = query_idx; do { n = pbuf_try_get_at(p, offset++); - if (n < 0) { + if ((n < 0) || (offset == 0)) { return 0xFFFF; } /** @see RFC 1035 - 4.1.4. Message compression */ @@ -722,7 +732,10 @@ dns_skip_name(struct pbuf* p, u16_t query_idx) } } while (n != 0); - return offset + 1; + if (offset == 0xFFFF) { + return 0xFFFF; + } + return (u16_t)(offset + 1); } /** @@ -742,16 +755,16 @@ dns_send(u8_t idx) const char *hostname, *hostname_part; u8_t n; u8_t pcb_idx; - struct dns_table_entry* entry = &dns_table[idx]; + struct dns_table_entry *entry = &dns_table[idx]; LWIP_DEBUGF(DNS_DEBUG, ("dns_send: dns_servers[%"U16_F"] \"%s\": request\n", - (u16_t)(entry->server_idx), entry->name)); + (u16_t)(entry->server_idx), entry->name)); LWIP_ASSERT("dns server out of array", entry->server_idx < DNS_MAX_SERVERS); if (ip_addr_isany_val(dns_servers[entry->server_idx]) #if LWIP_DNS_SUPPORT_MDNS_QUERIES && !entry->is_mdns #endif - ) { + ) { /* DNS server not valid anymore, e.g. PPP netif has been shut down */ /* call specified callback function if provided */ dns_call_found(idx, NULL); @@ -762,9 +775,9 @@ dns_send(u8_t idx) /* if here, we have either a new query or a retry on a previous query to process */ p = pbuf_alloc(PBUF_TRANSPORT, (u16_t)(SIZEOF_DNS_HDR + strlen(entry->name) + 2 + - SIZEOF_DNS_QUERY), PBUF_RAM); + SIZEOF_DNS_QUERY), PBUF_RAM); if (p != NULL) { - const ip_addr_t* dst; + const ip_addr_t *dst; u16_t dst_port; /* fill dns header */ memset(&hdr, 0, SIZEOF_DNS_HDR); @@ -784,9 +797,13 @@ dns_send(u8_t idx) ++n; } copy_len = (u16_t)(hostname - hostname_part); + if (query_idx + n + 1 > 0xFFFF) { + /* u16_t overflow */ + goto overflow_return; + } pbuf_put_at(p, query_idx, n); - pbuf_take_at(p, hostname_part, copy_len, query_idx + 1); - query_idx += n + 1; + pbuf_take_at(p, hostname_part, copy_len, (u16_t)(query_idx + 1)); + query_idx = (u16_t)(query_idx + n + 1); } while (*hostname != 0); pbuf_put_at(p, query_idx, 0); query_idx++; @@ -807,13 +824,12 @@ dns_send(u8_t idx) #endif /* send dns packet */ LWIP_DEBUGF(DNS_DEBUG, ("sending DNS request ID %d for name \"%s\" to server %d\r\n", - entry->txid, entry->name, entry->server_idx)); + entry->txid, entry->name, entry->server_idx)); #if LWIP_DNS_SUPPORT_MDNS_QUERIES if (entry->is_mdns) { dst_port = DNS_MQUERY_PORT; #if LWIP_IPV6 - if (LWIP_DNS_ADDRTYPE_IS_IPV6(entry->reqaddrtype)) - { + if (LWIP_DNS_ADDRTYPE_IS_IPV6(entry->reqaddrtype)) { dst = &dns_mquery_v6group; } #endif @@ -840,35 +856,38 @@ dns_send(u8_t idx) } return err; +overflow_return: + pbuf_free(p); + return ERR_VAL; } #if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) != 0) -static struct udp_pcb* +static struct udp_pcb * dns_alloc_random_port(void) { err_t err; - struct udp_pcb* ret; + struct udp_pcb *pcb; - ret = udp_new_ip_type(IPADDR_TYPE_ANY); - if (ret == NULL) { + pcb = udp_new_ip_type(IPADDR_TYPE_ANY); + if (pcb == NULL) { /* out of memory, have to reuse an existing pcb */ return NULL; } do { u16_t port = (u16_t)DNS_RAND_TXID(); - if (!DNS_PORT_ALLOWED(port)) { + if (DNS_PORT_ALLOWED(port)) { + err = udp_bind(pcb, IP_ANY_TYPE, port); + } else { /* this port is not allowed, try again */ err = ERR_USE; - continue; } - err = udp_bind(ret, IP_ANY_TYPE, port); } while (err == ERR_USE); if (err != ERR_OK) { - udp_remove(ret); + udp_remove(pcb); return NULL; } - udp_recv(ret, dns_recv, NULL); - return ret; + udp_recv(pcb, dns_recv, NULL); + return pcb; } /** @@ -897,8 +916,8 @@ dns_alloc_pcb(void) } } /* if we come here, creating a new UDP pcb failed, so we have to use - an already existing one */ - for (i = 0, idx = dns_last_pcb_idx + 1; i < DNS_MAX_SOURCE_PORTS; i++, idx++) { + an already existing one (so overflow is no issue) */ + for (i = 0, idx = (u8_t)(dns_last_pcb_idx + 1); i < DNS_MAX_SOURCE_PORTS; i++, idx++) { if (idx >= DNS_MAX_SOURCE_PORTS) { idx = 0; } @@ -920,7 +939,7 @@ dns_alloc_pcb(void) * @param addr IP address for the hostname (or NULL on error or memory shortage) */ static void -dns_call_found(u8_t idx, ip_addr_t* addr) +dns_call_found(u8_t idx, ip_addr_t *addr) { #if ((LWIP_DNS_SECURE & (LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING | LWIP_DNS_SECURE_RAND_SRC_PORT)) != 0) u8_t i; @@ -998,6 +1017,23 @@ again: return txid; } +/** + * Check whether there are other backup DNS servers available to try + */ +static u8_t +dns_backupserver_available(struct dns_table_entry *pentry) +{ + u8_t ret = 0; + + if (pentry) { + if ((pentry->server_idx + 1 < DNS_MAX_SERVERS) && !ip_addr_isany_val(dns_servers[pentry->server_idx + 1])) { + ret = 1; + } + } + + return ret; +} + /** * dns_check_entry() - see if entry has not yet been queried and, if so, sends out a query. * Check an entry in the dns_table: @@ -1034,11 +1070,11 @@ dns_check_entry(u8_t i) case DNS_STATE_ASKING: if (--entry->tmr == 0) { if (++entry->retries == DNS_MAX_RETRIES) { - if ((entry->server_idx + 1 < DNS_MAX_SERVERS) && !ip_addr_isany_val(dns_servers[entry->server_idx + 1]) + if (dns_backupserver_available(entry) #if LWIP_DNS_SUPPORT_MDNS_QUERIES - && !entry->is_mdns + && !entry->is_mdns #endif /* LWIP_DNS_SUPPORT_MDNS_QUERIES */ - ) { + ) { /* change of server */ entry->server_idx++; entry->tmr = 1; @@ -1105,7 +1141,7 @@ dns_correct_response(u8_t idx, u32_t ttl) entry->state = DNS_STATE_DONE; LWIP_DEBUGF(DNS_DEBUG, ("dns_recv: \"%s\": response = ", entry->name)); - ip_addr_debug_print(DNS_DEBUG, (&(entry->ipaddr))); + ip_addr_debug_print_val(DNS_DEBUG, entry->ipaddr); LWIP_DEBUGF(DNS_DEBUG, ("\n")); /* read the answer resource record's TTL, and maximize it if needed */ @@ -1126,6 +1162,7 @@ dns_correct_response(u8_t idx, u32_t ttl) } } } + /** * Receive input function for DNS response packets arriving for the dns UDP pcb. */ @@ -1148,7 +1185,7 @@ dns_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, if (p->tot_len < (SIZEOF_DNS_HDR + SIZEOF_DNS_QUERY)) { LWIP_DEBUGF(DNS_DEBUG, ("dns_recv: pbuf too small\n")); /* free pbuf and return */ - goto memerr; + goto ignore_packet; } /* copy dns payload inside static buffer for processing */ @@ -1156,7 +1193,7 @@ dns_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, /* Match the ID in the DNS header with the name table. */ txid = lwip_htons(hdr.id); for (i = 0; i < DNS_TABLE_SIZE; i++) { - const struct dns_table_entry *entry = &dns_table[i]; + struct dns_table_entry *entry = &dns_table[i]; if ((entry->state == DNS_STATE_ASKING) && (entry->txid == txid)) { @@ -1168,11 +1205,11 @@ dns_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, /* Check for correct response. */ if ((hdr.flags1 & DNS_FLAG1_RESPONSE) == 0) { LWIP_DEBUGF(DNS_DEBUG, ("dns_recv: \"%s\": not a response\n", entry->name)); - goto memerr; /* ignore this packet */ + goto ignore_packet; /* ignore this packet */ } if (nquestions != 1) { LWIP_DEBUGF(DNS_DEBUG, ("dns_recv: \"%s\": response not match to query\n", entry->name)); - goto memerr; /* ignore this packet */ + goto ignore_packet; /* ignore this packet */ } #if LWIP_DNS_SUPPORT_MDNS_QUERIES @@ -1182,7 +1219,7 @@ dns_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, /* Check whether response comes from the same network address to which the question was sent. (RFC 5452) */ if (!ip_addr_cmp(addr, &dns_servers[entry->server_idx])) { - goto memerr; /* ignore this packet */ + goto ignore_packet; /* ignore this packet */ } } @@ -1191,38 +1228,58 @@ dns_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, res_idx = dns_compare_name(entry->name, p, SIZEOF_DNS_HDR); if (res_idx == 0xFFFF) { LWIP_DEBUGF(DNS_DEBUG, ("dns_recv: \"%s\": response not match to query\n", entry->name)); - goto memerr; /* ignore this packet */ + goto ignore_packet; /* ignore this packet */ } /* check if "question" part matches the request */ if (pbuf_copy_partial(p, &qry, SIZEOF_DNS_QUERY, res_idx) != SIZEOF_DNS_QUERY) { - goto memerr; /* ignore this packet */ + goto ignore_packet; /* ignore this packet */ } if ((qry.cls != PP_HTONS(DNS_RRCLASS_IN)) || - (LWIP_DNS_ADDRTYPE_IS_IPV6(entry->reqaddrtype) && (qry.type != PP_HTONS(DNS_RRTYPE_AAAA))) || - (!LWIP_DNS_ADDRTYPE_IS_IPV6(entry->reqaddrtype) && (qry.type != PP_HTONS(DNS_RRTYPE_A)))) { + (LWIP_DNS_ADDRTYPE_IS_IPV6(entry->reqaddrtype) && (qry.type != PP_HTONS(DNS_RRTYPE_AAAA))) || + (!LWIP_DNS_ADDRTYPE_IS_IPV6(entry->reqaddrtype) && (qry.type != PP_HTONS(DNS_RRTYPE_A)))) { LWIP_DEBUGF(DNS_DEBUG, ("dns_recv: \"%s\": response not match to query\n", entry->name)); - goto memerr; /* ignore this packet */ + goto ignore_packet; /* ignore this packet */ } /* skip the rest of the "question" part */ - res_idx += SIZEOF_DNS_QUERY; + if (res_idx + SIZEOF_DNS_QUERY > 0xFFFF) { + goto ignore_packet; + } + res_idx = (u16_t)(res_idx + SIZEOF_DNS_QUERY); /* Check for error. If so, call callback to inform. */ if (hdr.flags2 & DNS_FLAG2_ERR_MASK) { LWIP_DEBUGF(DNS_DEBUG, ("dns_recv: \"%s\": error in flags\n", entry->name)); + + /* if there is another backup DNS server to try + * then don't stop the DNS request + */ + if (dns_backupserver_available(entry)) { + /* avoid retrying the same server */ + entry->retries = DNS_MAX_RETRIES-1; + entry->tmr = 1; + + /* contact next available server for this entry */ + dns_check_entry(i); + + goto ignore_packet; + } } else { while ((nanswers > 0) && (res_idx < p->tot_len)) { /* skip answer resource record's host name */ res_idx = dns_skip_name(p, res_idx); if (res_idx == 0xFFFF) { - goto memerr; /* ignore this packet */ + goto ignore_packet; /* ignore this packet */ } /* Check for IP address type and Internet class. Others are discarded. */ if (pbuf_copy_partial(p, &ans, SIZEOF_DNS_ANSWER, res_idx) != SIZEOF_DNS_ANSWER) { - goto memerr; /* ignore this packet */ + goto ignore_packet; /* ignore this packet */ } - res_idx += SIZEOF_DNS_ANSWER; + if (res_idx + SIZEOF_DNS_ANSWER > 0xFFFF) { + goto ignore_packet; + } + res_idx = (u16_t)(res_idx + SIZEOF_DNS_ANSWER); if (ans.cls == PP_HTONS(DNS_RRCLASS_IN)) { #if LWIP_IPV4 @@ -1234,7 +1291,7 @@ dns_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, ip4_addr_t ip4addr; /* read the IP address after answer resource record's header */ if (pbuf_copy_partial(p, &ip4addr, sizeof(ip4_addr_t), res_idx) != sizeof(ip4_addr_t)) { - goto memerr; /* ignore this packet */ + goto ignore_packet; /* ignore this packet */ } ip_addr_copy_from_ip4(dns_table[i].ipaddr, ip4addr); pbuf_free(p); @@ -1245,17 +1302,18 @@ dns_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, } #endif /* LWIP_IPV4 */ #if LWIP_IPV6 - if ((ans.type == PP_HTONS(DNS_RRTYPE_AAAA)) && (ans.len == PP_HTONS(sizeof(ip6_addr_t)))) { + if ((ans.type == PP_HTONS(DNS_RRTYPE_AAAA)) && (ans.len == PP_HTONS(sizeof(ip6_addr_p_t)))) { #if LWIP_IPV4 && LWIP_IPV6 if (LWIP_DNS_ADDRTYPE_IS_IPV6(entry->reqaddrtype)) #endif /* LWIP_IPV4 && LWIP_IPV6 */ { - ip6_addr_t ip6addr; + ip6_addr_p_t ip6addr; /* read the IP address after answer resource record's header */ - if (pbuf_copy_partial(p, &ip6addr, sizeof(ip6_addr_t), res_idx) != sizeof(ip6_addr_t)) { - goto memerr; /* ignore this packet */ + if (pbuf_copy_partial(p, &ip6addr, sizeof(ip6_addr_p_t), res_idx) != sizeof(ip6_addr_p_t)) { + goto ignore_packet; /* ignore this packet */ } - ip_addr_copy_from_ip6(dns_table[i].ipaddr, ip6addr); + /* @todo: scope ip6addr? Might be required for link-local addresses at least? */ + ip_addr_copy_from_ip6_packed(dns_table[i].ipaddr, ip6addr); pbuf_free(p); /* handle correct response */ dns_correct_response(i, lwip_ntohl(ans.ttl)); @@ -1266,9 +1324,9 @@ dns_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, } /* skip this answer */ if ((int)(res_idx + lwip_htons(ans.len)) > 0xFFFF) { - goto memerr; /* ignore this packet */ + goto ignore_packet; /* ignore this packet */ } - res_idx += lwip_htons(ans.len); + res_idx = (u16_t)(res_idx + lwip_htons(ans.len)); --nanswers; } #if LWIP_IPV4 && LWIP_IPV6 @@ -1298,7 +1356,7 @@ dns_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, } } -memerr: +ignore_packet: /* deallocate memory and return */ pbuf_free(p); return; @@ -1321,7 +1379,7 @@ dns_enqueue(const char *name, size_t hostnamelen, dns_found_callback found, u8_t lseq, lseqi; struct dns_table_entry *entry = NULL; size_t namelen; - struct dns_req_entry* req; + struct dns_req_entry *req; #if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING) != 0) u8_t r; @@ -1364,7 +1422,7 @@ dns_enqueue(const char *name, size_t hostnamelen, dns_found_callback found, } /* check if this is the oldest completed entry */ if (entry->state == DNS_STATE_DONE) { - u8_t age = dns_seqno - entry->seqno; + u8_t age = (u8_t)(dns_seqno - entry->seqno); if (age > lseq) { lseq = age; lseqi = i; @@ -1415,7 +1473,7 @@ dns_enqueue(const char *name, size_t hostnamelen, dns_found_callback found, LWIP_DNS_SET_ADDRTYPE(req->reqaddrtype, dns_addrtype); req->found = found; req->arg = callback_arg; - namelen = LWIP_MIN(hostnamelen, DNS_MAX_NAME_LENGTH-1); + namelen = LWIP_MIN(hostnamelen, DNS_MAX_NAME_LENGTH - 1); MEMCPY(entry->name, name, namelen); entry->name[namelen] = 0; @@ -1567,7 +1625,7 @@ dns_gethostbyname_addrtype(const char *hostname, ip_addr_t *addr, dns_found_call /* queue query with specified callback */ return dns_enqueue(hostname, hostnamelen, found, callback_arg LWIP_DNS_ADDRTYPE_ARG(dns_addrtype) - LWIP_DNS_ISMDNS_ARG(is_mdns)); + LWIP_DNS_ISMDNS_ARG(is_mdns)); } #endif /* LWIP_DNS */ diff --git a/Libraries/LwIP/src/core/inet_chksum.c b/Libraries/LwIP/src/core/inet_chksum.c index 589157b..25255b9 100755 --- a/Libraries/LwIP/src/core/inet_chksum.c +++ b/Libraries/LwIP/src/core/inet_chksum.c @@ -1,6 +1,6 @@ /** * @file - * Incluse internet checksum functions.\n + * Internet checksum functions.\n * * These are some reference implementations of the checksum algorithm, with the * aim of being simple, correct and fully portable. Checksumming is the @@ -8,7 +8,7 @@ * your own version, link it in and in your cc.h put: * * \#define LWIP_CHKSUM your_checksum_routine - * + * * Or you can select from the implementations below by defining * LWIP_CHKSUM_ALGORITHM to 1, 2 or 3. */ @@ -85,7 +85,7 @@ lwip_standard_chksum(const void *dataptr, int len) acc = 0; /* dataptr may be at odd or even addresses */ - octetptr = (const u8_t*)dataptr; + octetptr = (const u8_t *)dataptr; while (len > 1) { /* declare first octet as most significant thus assume network order, ignoring host order */ @@ -201,14 +201,14 @@ lwip_standard_chksum(const void *dataptr, int len) len--; } - ps = (const u16_t *)(const void*)pb; + ps = (const u16_t *)(const void *)pb; if (((mem_ptr_t)ps & 3) && len > 1) { sum += *ps++; len -= 2; } - pl = (const u32_t *)(const void*)ps; + pl = (const u32_t *)(const void *)ps; while (len > 7) { tmp = sum + *pl++; /* ping */ @@ -260,19 +260,19 @@ static u16_t inet_cksum_pseudo_base(struct pbuf *p, u8_t proto, u16_t proto_len, u32_t acc) { struct pbuf *q; - u8_t swapped = 0; + int swapped = 0; /* iterate through all pbuf in chain */ for (q = p; q != NULL; q = q->next) { LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): checksumming pbuf %p (has next %p) \n", - (void *)q, (void *)q->next)); + (void *)q, (void *)q->next)); acc += LWIP_CHKSUM(q->payload, q->len); /*LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): unwrapped lwip_chksum()=%"X32_F" \n", acc));*/ /* just executing this next line is probably faster that the if statement needed to check whether we really need to execute it, and does no harm */ acc = FOLD_U32T(acc); if (q->len % 2 != 0) { - swapped = 1 - swapped; + swapped = !swapped; acc = SWAP_BYTES_IN_WORD(acc); } /*LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): wrapped lwip_chksum()=%"X32_F" \n", acc));*/ @@ -308,17 +308,17 @@ inet_cksum_pseudo_base(struct pbuf *p, u8_t proto, u16_t proto_len, u32_t acc) */ u16_t inet_chksum_pseudo(struct pbuf *p, u8_t proto, u16_t proto_len, - const ip4_addr_t *src, const ip4_addr_t *dest) + const ip4_addr_t *src, const ip4_addr_t *dest) { u32_t acc; u32_t addr; addr = ip4_addr_get_u32(src); acc = (addr & 0xffffUL); - acc += ((addr >> 16) & 0xffffUL); + acc = (u32_t)(acc + ((addr >> 16) & 0xffffUL)); addr = ip4_addr_get_u32(dest); - acc += (addr & 0xffffUL); - acc += ((addr >> 16) & 0xffffUL); + acc = (u32_t)(acc + (addr & 0xffffUL)); + acc = (u32_t)(acc + ((addr >> 16) & 0xffffUL)); /* fold down to 16 bits */ acc = FOLD_U32T(acc); acc = FOLD_U32T(acc); @@ -341,7 +341,7 @@ inet_chksum_pseudo(struct pbuf *p, u8_t proto, u16_t proto_len, */ u16_t ip6_chksum_pseudo(struct pbuf *p, u8_t proto, u16_t proto_len, - const ip6_addr_t *src, const ip6_addr_t *dest) + const ip6_addr_t *src, const ip6_addr_t *dest) { u32_t acc = 0; u32_t addr; @@ -349,11 +349,11 @@ ip6_chksum_pseudo(struct pbuf *p, u8_t proto, u16_t proto_len, for (addr_part = 0; addr_part < 4; addr_part++) { addr = src->addr[addr_part]; - acc += (addr & 0xffffUL); - acc += ((addr >> 16) & 0xffffUL); + acc = (u32_t)(acc + (addr & 0xffffUL)); + acc = (u32_t)(acc + ((addr >> 16) & 0xffffUL)); addr = dest->addr[addr_part]; - acc += (addr & 0xffffUL); - acc += ((addr >> 16) & 0xffffUL); + acc = (u32_t)(acc + (addr & 0xffffUL)); + acc = (u32_t)(acc + ((addr >> 16) & 0xffffUL)); } /* fold down to 16 bits */ acc = FOLD_U32T(acc); @@ -377,7 +377,7 @@ ip6_chksum_pseudo(struct pbuf *p, u8_t proto, u16_t proto_len, */ u16_t ip_chksum_pseudo(struct pbuf *p, u8_t proto, u16_t proto_len, - const ip_addr_t *src, const ip_addr_t *dest) + const ip_addr_t *src, const ip_addr_t *dest) { #if LWIP_IPV6 if (IP_IS_V6(dest)) { @@ -397,28 +397,28 @@ ip_chksum_pseudo(struct pbuf *p, u8_t proto, u16_t proto_len, /** Parts of the pseudo checksum which are common to IPv4 and IPv6 */ static u16_t inet_cksum_pseudo_partial_base(struct pbuf *p, u8_t proto, u16_t proto_len, - u16_t chksum_len, u32_t acc) + u16_t chksum_len, u32_t acc) { struct pbuf *q; - u8_t swapped = 0; + int swapped = 0; u16_t chklen; /* iterate through all pbuf in chain */ for (q = p; (q != NULL) && (chksum_len > 0); q = q->next) { LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): checksumming pbuf %p (has next %p) \n", - (void *)q, (void *)q->next)); + (void *)q, (void *)q->next)); chklen = q->len; if (chklen > chksum_len) { chklen = chksum_len; } acc += LWIP_CHKSUM(q->payload, chklen); - chksum_len -= chklen; + chksum_len = (u16_t)(chksum_len - chklen); LWIP_ASSERT("delete me", chksum_len < 0x7fff); /*LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): unwrapped lwip_chksum()=%"X32_F" \n", acc));*/ /* fold the upper bit down */ acc = FOLD_U32T(acc); if (q->len % 2 != 0) { - swapped = 1 - swapped; + swapped = !swapped; acc = SWAP_BYTES_IN_WORD(acc); } /*LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): wrapped lwip_chksum()=%"X32_F" \n", acc));*/ @@ -454,17 +454,17 @@ inet_cksum_pseudo_partial_base(struct pbuf *p, u8_t proto, u16_t proto_len, */ u16_t inet_chksum_pseudo_partial(struct pbuf *p, u8_t proto, u16_t proto_len, - u16_t chksum_len, const ip4_addr_t *src, const ip4_addr_t *dest) + u16_t chksum_len, const ip4_addr_t *src, const ip4_addr_t *dest) { u32_t acc; u32_t addr; addr = ip4_addr_get_u32(src); acc = (addr & 0xffffUL); - acc += ((addr >> 16) & 0xffffUL); + acc = (u32_t)(acc + ((addr >> 16) & 0xffffUL)); addr = ip4_addr_get_u32(dest); - acc += (addr & 0xffffUL); - acc += ((addr >> 16) & 0xffffUL); + acc = (u32_t)(acc + (addr & 0xffffUL)); + acc = (u32_t)(acc + ((addr >> 16) & 0xffffUL)); /* fold down to 16 bits */ acc = FOLD_U32T(acc); acc = FOLD_U32T(acc); @@ -489,7 +489,7 @@ inet_chksum_pseudo_partial(struct pbuf *p, u8_t proto, u16_t proto_len, */ u16_t ip6_chksum_pseudo_partial(struct pbuf *p, u8_t proto, u16_t proto_len, - u16_t chksum_len, const ip6_addr_t *src, const ip6_addr_t *dest) + u16_t chksum_len, const ip6_addr_t *src, const ip6_addr_t *dest) { u32_t acc = 0; u32_t addr; @@ -497,11 +497,11 @@ ip6_chksum_pseudo_partial(struct pbuf *p, u8_t proto, u16_t proto_len, for (addr_part = 0; addr_part < 4; addr_part++) { addr = src->addr[addr_part]; - acc += (addr & 0xffffUL); - acc += ((addr >> 16) & 0xffffUL); + acc = (u32_t)(acc + (addr & 0xffffUL)); + acc = (u32_t)(acc + ((addr >> 16) & 0xffffUL)); addr = dest->addr[addr_part]; - acc += (addr & 0xffffUL); - acc += ((addr >> 16) & 0xffffUL); + acc = (u32_t)(acc + (addr & 0xffffUL)); + acc = (u32_t)(acc + ((addr >> 16) & 0xffffUL)); } /* fold down to 16 bits */ acc = FOLD_U32T(acc); @@ -524,7 +524,7 @@ ip6_chksum_pseudo_partial(struct pbuf *p, u8_t proto, u16_t proto_len, */ u16_t ip_chksum_pseudo_partial(struct pbuf *p, u8_t proto, u16_t proto_len, - u16_t chksum_len, const ip_addr_t *src, const ip_addr_t *dest) + u16_t chksum_len, const ip_addr_t *src, const ip_addr_t *dest) { #if LWIP_IPV6 if (IP_IS_V6(dest)) { @@ -569,15 +569,14 @@ inet_chksum_pbuf(struct pbuf *p) { u32_t acc; struct pbuf *q; - u8_t swapped; + int swapped = 0; acc = 0; - swapped = 0; for (q = p; q != NULL; q = q->next) { acc += LWIP_CHKSUM(q->payload, q->len); acc = FOLD_U32T(acc); if (q->len % 2 != 0) { - swapped = 1 - swapped; + swapped = !swapped; acc = SWAP_BYTES_IN_WORD(acc); } } diff --git a/Libraries/LwIP/src/core/init.c b/Libraries/LwIP/src/core/init.c index 5e50858..b688536 100755 --- a/Libraries/LwIP/src/core/init.c +++ b/Libraries/LwIP/src/core/init.c @@ -67,8 +67,7 @@ # include "arch/bpstruct.h" #endif PACK_STRUCT_BEGIN -struct packed_struct_test -{ +struct packed_struct_test { PACK_STRUCT_FLD_8(u8_t dummy1); PACK_STRUCT_FIELD(u32_t dummy2); } PACK_STRUCT_STRUCT; @@ -84,187 +83,183 @@ PACK_STRUCT_END * These can be done independently of LWIP_DEBUG, without penalty. */ #ifndef BYTE_ORDER - #error "BYTE_ORDER is not defined, you have to define it in your cc.h" +#error "BYTE_ORDER is not defined, you have to define it in your cc.h" #endif #if (!IP_SOF_BROADCAST && IP_SOF_BROADCAST_RECV) - #error "If you want to use broadcast filter per pcb on recv operations, you have to define IP_SOF_BROADCAST=1 in your lwipopts.h" +#error "If you want to use broadcast filter per pcb on recv operations, you have to define IP_SOF_BROADCAST=1 in your lwipopts.h" #endif #if (!LWIP_UDP && LWIP_UDPLITE) - #error "If you want to use UDP Lite, you have to define LWIP_UDP=1 in your lwipopts.h" +#error "If you want to use UDP Lite, you have to define LWIP_UDP=1 in your lwipopts.h" #endif #if (!LWIP_UDP && LWIP_DHCP) - #error "If you want to use DHCP, you have to define LWIP_UDP=1 in your lwipopts.h" +#error "If you want to use DHCP, you have to define LWIP_UDP=1 in your lwipopts.h" #endif -#if (!LWIP_UDP && LWIP_MULTICAST_TX_OPTIONS) - #error "If you want to use IGMP/LWIP_MULTICAST_TX_OPTIONS, you have to define LWIP_UDP=1 in your lwipopts.h" +#if (!LWIP_UDP && !LWIP_RAW && LWIP_MULTICAST_TX_OPTIONS) +#error "If you want to use LWIP_MULTICAST_TX_OPTIONS, you have to define LWIP_UDP=1 and/or LWIP_RAW=1 in your lwipopts.h" #endif #if (!LWIP_UDP && LWIP_DNS) - #error "If you want to use DNS, you have to define LWIP_UDP=1 in your lwipopts.h" +#error "If you want to use DNS, you have to define LWIP_UDP=1 in your lwipopts.h" #endif #if !MEMP_MEM_MALLOC /* MEMP_NUM_* checks are disabled when not using the pool allocator */ #if (LWIP_ARP && ARP_QUEUEING && (MEMP_NUM_ARP_QUEUE<=0)) - #error "If you want to use ARP Queueing, you have to define MEMP_NUM_ARP_QUEUE>=1 in your lwipopts.h" +#error "If you want to use ARP Queueing, you have to define MEMP_NUM_ARP_QUEUE>=1 in your lwipopts.h" #endif #if (LWIP_RAW && (MEMP_NUM_RAW_PCB<=0)) - #error "If you want to use RAW, you have to define MEMP_NUM_RAW_PCB>=1 in your lwipopts.h" +#error "If you want to use RAW, you have to define MEMP_NUM_RAW_PCB>=1 in your lwipopts.h" #endif #if (LWIP_UDP && (MEMP_NUM_UDP_PCB<=0)) - #error "If you want to use UDP, you have to define MEMP_NUM_UDP_PCB>=1 in your lwipopts.h" +#error "If you want to use UDP, you have to define MEMP_NUM_UDP_PCB>=1 in your lwipopts.h" #endif #if (LWIP_TCP && (MEMP_NUM_TCP_PCB<=0)) - #error "If you want to use TCP, you have to define MEMP_NUM_TCP_PCB>=1 in your lwipopts.h" +#error "If you want to use TCP, you have to define MEMP_NUM_TCP_PCB>=1 in your lwipopts.h" #endif #if (LWIP_IGMP && (MEMP_NUM_IGMP_GROUP<=1)) - #error "If you want to use IGMP, you have to define MEMP_NUM_IGMP_GROUP>1 in your lwipopts.h" +#error "If you want to use IGMP, you have to define MEMP_NUM_IGMP_GROUP>1 in your lwipopts.h" #endif #if (LWIP_IGMP && !LWIP_MULTICAST_TX_OPTIONS) - #error "If you want to use IGMP, you have to define LWIP_MULTICAST_TX_OPTIONS==1 in your lwipopts.h" +#error "If you want to use IGMP, you have to define LWIP_MULTICAST_TX_OPTIONS==1 in your lwipopts.h" #endif #if (LWIP_IGMP && !LWIP_IPV4) - #error "IGMP needs LWIP_IPV4 enabled in your lwipopts.h" -#endif -#if (LWIP_MULTICAST_TX_OPTIONS && !LWIP_IPV4) - #error "LWIP_MULTICAST_TX_OPTIONS needs LWIP_IPV4 enabled in your lwipopts.h" +#error "IGMP needs LWIP_IPV4 enabled in your lwipopts.h" #endif #if ((LWIP_NETCONN || LWIP_SOCKET) && (MEMP_NUM_TCPIP_MSG_API<=0)) - #error "If you want to use Sequential API, you have to define MEMP_NUM_TCPIP_MSG_API>=1 in your lwipopts.h" +#error "If you want to use Sequential API, you have to define MEMP_NUM_TCPIP_MSG_API>=1 in your lwipopts.h" #endif /* There must be sufficient timeouts, taking into account requirements of the subsystems. */ -#if LWIP_TIMERS && (MEMP_NUM_SYS_TIMEOUT < (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + PPP_SUPPORT + (LWIP_IPV6 ? (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD) : 0))) - #error "MEMP_NUM_SYS_TIMEOUT is too low to accomodate all required timeouts" +#if LWIP_TIMERS && (MEMP_NUM_SYS_TIMEOUT < LWIP_NUM_SYS_TIMEOUT_INTERNAL) +#error "MEMP_NUM_SYS_TIMEOUT is too low to accomodate all required timeouts" #endif #if (IP_REASSEMBLY && (MEMP_NUM_REASSDATA > IP_REASS_MAX_PBUFS)) - #error "MEMP_NUM_REASSDATA > IP_REASS_MAX_PBUFS doesn't make sense since each struct ip_reassdata must hold 2 pbufs at least!" +#error "MEMP_NUM_REASSDATA > IP_REASS_MAX_PBUFS doesn't make sense since each struct ip_reassdata must hold 2 pbufs at least!" #endif #endif /* !MEMP_MEM_MALLOC */ #if LWIP_WND_SCALE #if (LWIP_TCP && (TCP_WND > 0xffffffff)) - #error "If you want to use TCP, TCP_WND must fit in an u32_t, so, you have to reduce it in your lwipopts.h" +#error "If you want to use TCP, TCP_WND must fit in an u32_t, so, you have to reduce it in your lwipopts.h" #endif #if (LWIP_TCP && (TCP_RCV_SCALE > 14)) - #error "The maximum valid window scale value is 14!" +#error "The maximum valid window scale value is 14!" #endif #if (LWIP_TCP && (TCP_WND > (0xFFFFU << TCP_RCV_SCALE))) - #error "TCP_WND is bigger than the configured LWIP_WND_SCALE allows!" +#error "TCP_WND is bigger than the configured LWIP_WND_SCALE allows!" #endif #if (LWIP_TCP && ((TCP_WND >> TCP_RCV_SCALE) == 0)) - #error "TCP_WND is too small for the configured LWIP_WND_SCALE (results in zero window)!" +#error "TCP_WND is too small for the configured LWIP_WND_SCALE (results in zero window)!" #endif #else /* LWIP_WND_SCALE */ #if (LWIP_TCP && (TCP_WND > 0xffff)) - #error "If you want to use TCP, TCP_WND must fit in an u16_t, so, you have to reduce it in your lwipopts.h (or enable window scaling)" +#error "If you want to use TCP, TCP_WND must fit in an u16_t, so, you have to reduce it in your lwipopts.h (or enable window scaling)" #endif #endif /* LWIP_WND_SCALE */ #if (LWIP_TCP && (TCP_SND_QUEUELEN > 0xffff)) - #error "If you want to use TCP, TCP_SND_QUEUELEN must fit in an u16_t, so, you have to reduce it in your lwipopts.h" +#error "If you want to use TCP, TCP_SND_QUEUELEN must fit in an u16_t, so, you have to reduce it in your lwipopts.h" #endif #if (LWIP_TCP && (TCP_SND_QUEUELEN < 2)) - #error "TCP_SND_QUEUELEN must be at least 2 for no-copy TCP writes to work" +#error "TCP_SND_QUEUELEN must be at least 2 for no-copy TCP writes to work" #endif #if (LWIP_TCP && ((TCP_MAXRTX > 12) || (TCP_SYNMAXRTX > 12))) - #error "If you want to use TCP, TCP_MAXRTX and TCP_SYNMAXRTX must less or equal to 12 (due to tcp_backoff table), so, you have to reduce them in your lwipopts.h" +#error "If you want to use TCP, TCP_MAXRTX and TCP_SYNMAXRTX must less or equal to 12 (due to tcp_backoff table), so, you have to reduce them in your lwipopts.h" #endif #if (LWIP_TCP && TCP_LISTEN_BACKLOG && ((TCP_DEFAULT_LISTEN_BACKLOG < 0) || (TCP_DEFAULT_LISTEN_BACKLOG > 0xff))) - #error "If you want to use TCP backlog, TCP_DEFAULT_LISTEN_BACKLOG must fit into an u8_t" +#error "If you want to use TCP backlog, TCP_DEFAULT_LISTEN_BACKLOG must fit into an u8_t" +#endif +#if (LWIP_TCP && LWIP_TCP_SACK_OUT && !TCP_QUEUE_OOSEQ) +#error "To use LWIP_TCP_SACK_OUT, TCP_QUEUE_OOSEQ needs to be enabled" +#endif +#if (LWIP_TCP && LWIP_TCP_SACK_OUT && (LWIP_TCP_MAX_SACK_NUM < 1)) +#error "LWIP_TCP_MAX_SACK_NUM must be greater than 0" #endif #if (LWIP_NETIF_API && (NO_SYS==1)) - #error "If you want to use NETIF API, you have to define NO_SYS=0 in your lwipopts.h" +#error "If you want to use NETIF API, you have to define NO_SYS=0 in your lwipopts.h" #endif #if ((LWIP_SOCKET || LWIP_NETCONN) && (NO_SYS==1)) - #error "If you want to use Sequential API, you have to define NO_SYS=0 in your lwipopts.h" +#error "If you want to use Sequential API, you have to define NO_SYS=0 in your lwipopts.h" #endif #if (LWIP_PPP_API && (NO_SYS==1)) - #error "If you want to use PPP API, you have to define NO_SYS=0 in your lwipopts.h" +#error "If you want to use PPP API, you have to define NO_SYS=0 in your lwipopts.h" #endif #if (LWIP_PPP_API && (PPP_SUPPORT==0)) - #error "If you want to use PPP API, you have to enable PPP_SUPPORT in your lwipopts.h" +#error "If you want to use PPP API, you have to enable PPP_SUPPORT in your lwipopts.h" #endif #if (((!LWIP_DHCP) || (!LWIP_AUTOIP)) && LWIP_DHCP_AUTOIP_COOP) - #error "If you want to use DHCP/AUTOIP cooperation mode, you have to define LWIP_DHCP=1 and LWIP_AUTOIP=1 in your lwipopts.h" +#error "If you want to use DHCP/AUTOIP cooperation mode, you have to define LWIP_DHCP=1 and LWIP_AUTOIP=1 in your lwipopts.h" #endif #if (((!LWIP_DHCP) || (!LWIP_ARP)) && DHCP_DOES_ARP_CHECK) - #error "If you want to use DHCP ARP checking, you have to define LWIP_DHCP=1 and LWIP_ARP=1 in your lwipopts.h" +#error "If you want to use DHCP ARP checking, you have to define LWIP_DHCP=1 and LWIP_ARP=1 in your lwipopts.h" #endif #if (!LWIP_ARP && LWIP_AUTOIP) - #error "If you want to use AUTOIP, you have to define LWIP_ARP=1 in your lwipopts.h" +#error "If you want to use AUTOIP, you have to define LWIP_ARP=1 in your lwipopts.h" #endif #if (LWIP_TCP && ((LWIP_EVENT_API && LWIP_CALLBACK_API) || (!LWIP_EVENT_API && !LWIP_CALLBACK_API))) - #error "One and exactly one of LWIP_EVENT_API and LWIP_CALLBACK_API has to be enabled in your lwipopts.h" +#error "One and exactly one of LWIP_EVENT_API and LWIP_CALLBACK_API has to be enabled in your lwipopts.h" +#endif +#if (LWIP_ALTCP && LWIP_EVENT_API) +#error "The application layered tcp API does not work with LWIP_EVENT_API" #endif #if (MEM_LIBC_MALLOC && MEM_USE_POOLS) - #error "MEM_LIBC_MALLOC and MEM_USE_POOLS may not both be simultaneously enabled in your lwipopts.h" +#error "MEM_LIBC_MALLOC and MEM_USE_POOLS may not both be simultaneously enabled in your lwipopts.h" #endif #if (MEM_USE_POOLS && !MEMP_USE_CUSTOM_POOLS) - #error "MEM_USE_POOLS requires custom pools (MEMP_USE_CUSTOM_POOLS) to be enabled in your lwipopts.h" +#error "MEM_USE_POOLS requires custom pools (MEMP_USE_CUSTOM_POOLS) to be enabled in your lwipopts.h" #endif #if (PBUF_POOL_BUFSIZE <= MEM_ALIGNMENT) - #error "PBUF_POOL_BUFSIZE must be greater than MEM_ALIGNMENT or the offset may take the full first pbuf" +#error "PBUF_POOL_BUFSIZE must be greater than MEM_ALIGNMENT or the offset may take the full first pbuf" #endif #if (DNS_LOCAL_HOSTLIST && !DNS_LOCAL_HOSTLIST_IS_DYNAMIC && !(defined(DNS_LOCAL_HOSTLIST_INIT))) - #error "you have to define define DNS_LOCAL_HOSTLIST_INIT {{'host1', 0x123}, {'host2', 0x234}} to initialize DNS_LOCAL_HOSTLIST" +#error "you have to define define DNS_LOCAL_HOSTLIST_INIT {{'host1', 0x123}, {'host2', 0x234}} to initialize DNS_LOCAL_HOSTLIST" #endif #if PPP_SUPPORT && !PPPOS_SUPPORT && !PPPOE_SUPPORT && !PPPOL2TP_SUPPORT - #error "PPP_SUPPORT needs at least one of PPPOS_SUPPORT, PPPOE_SUPPORT or PPPOL2TP_SUPPORT turned on" +#error "PPP_SUPPORT needs at least one of PPPOS_SUPPORT, PPPOE_SUPPORT or PPPOL2TP_SUPPORT turned on" #endif #if PPP_SUPPORT && !PPP_IPV4_SUPPORT && !PPP_IPV6_SUPPORT - #error "PPP_SUPPORT needs PPP_IPV4_SUPPORT and/or PPP_IPV6_SUPPORT turned on" +#error "PPP_SUPPORT needs PPP_IPV4_SUPPORT and/or PPP_IPV6_SUPPORT turned on" #endif #if PPP_SUPPORT && PPP_IPV4_SUPPORT && !LWIP_IPV4 - #error "PPP_IPV4_SUPPORT needs LWIP_IPV4 turned on" +#error "PPP_IPV4_SUPPORT needs LWIP_IPV4 turned on" #endif #if PPP_SUPPORT && PPP_IPV6_SUPPORT && !LWIP_IPV6 - #error "PPP_IPV6_SUPPORT needs LWIP_IPV6 turned on" +#error "PPP_IPV6_SUPPORT needs LWIP_IPV6 turned on" #endif #if !LWIP_ETHERNET && (LWIP_ARP || PPPOE_SUPPORT) - #error "LWIP_ETHERNET needs to be turned on for LWIP_ARP or PPPOE_SUPPORT" +#error "LWIP_ETHERNET needs to be turned on for LWIP_ARP or PPPOE_SUPPORT" #endif #if LWIP_TCPIP_CORE_LOCKING_INPUT && !LWIP_TCPIP_CORE_LOCKING - #error "When using LWIP_TCPIP_CORE_LOCKING_INPUT, LWIP_TCPIP_CORE_LOCKING must be enabled, too" +#error "When using LWIP_TCPIP_CORE_LOCKING_INPUT, LWIP_TCPIP_CORE_LOCKING must be enabled, too" #endif #if LWIP_TCP && LWIP_NETIF_TX_SINGLE_PBUF && !TCP_OVERSIZE - #error "LWIP_NETIF_TX_SINGLE_PBUF needs TCP_OVERSIZE enabled to create single-pbuf TCP packets" +#error "LWIP_NETIF_TX_SINGLE_PBUF needs TCP_OVERSIZE enabled to create single-pbuf TCP packets" #endif #if LWIP_NETCONN && LWIP_TCP #if NETCONN_COPY != TCP_WRITE_FLAG_COPY - #error "NETCONN_COPY != TCP_WRITE_FLAG_COPY" +#error "NETCONN_COPY != TCP_WRITE_FLAG_COPY" #endif #if NETCONN_MORE != TCP_WRITE_FLAG_MORE - #error "NETCONN_MORE != TCP_WRITE_FLAG_MORE" +#error "NETCONN_MORE != TCP_WRITE_FLAG_MORE" #endif #endif /* LWIP_NETCONN && LWIP_TCP */ #if LWIP_SOCKET -/* Check that the SO_* socket options and SOF_* lwIP-internal flags match */ -#if SO_REUSEADDR != SOF_REUSEADDR - #error "WARNING: SO_REUSEADDR != SOF_REUSEADDR" -#endif -#if SO_KEEPALIVE != SOF_KEEPALIVE - #error "WARNING: SO_KEEPALIVE != SOF_KEEPALIVE" -#endif -#if SO_BROADCAST != SOF_BROADCAST - #error "WARNING: SO_BROADCAST != SOF_BROADCAST" -#endif #endif /* LWIP_SOCKET */ /* Compile-time checks for deprecated options. */ #ifdef MEMP_NUM_TCPIP_MSG - #error "MEMP_NUM_TCPIP_MSG option is deprecated. Remove it from your lwipopts.h." +#error "MEMP_NUM_TCPIP_MSG option is deprecated. Remove it from your lwipopts.h." #endif #ifdef TCP_REXMIT_DEBUG - #error "TCP_REXMIT_DEBUG option is deprecated. Remove it from your lwipopts.h." +#error "TCP_REXMIT_DEBUG option is deprecated. Remove it from your lwipopts.h." #endif #ifdef RAW_STATS - #error "RAW_STATS option is deprecated. Remove it from your lwipopts.h." +#error "RAW_STATS option is deprecated. Remove it from your lwipopts.h." #endif #ifdef ETHARP_QUEUE_FIRST - #error "ETHARP_QUEUE_FIRST option is deprecated. Remove it from your lwipopts.h." +#error "ETHARP_QUEUE_FIRST option is deprecated. Remove it from your lwipopts.h." #endif #ifdef ETHARP_ALWAYS_INSERT - #error "ETHARP_ALWAYS_INSERT option is deprecated. Remove it from your lwipopts.h." +#error "ETHARP_ALWAYS_INSERT option is deprecated. Remove it from your lwipopts.h." #endif #if !NO_SYS && LWIP_TCPIP_CORE_LOCKING && LWIP_COMPAT_MUTEX && !defined(LWIP_COMPAT_MUTEX_ALLOWED) - #error "LWIP_COMPAT_MUTEX cannot prevent priority inversion. It is recommended to implement priority-aware mutexes. (Define LWIP_COMPAT_MUTEX_ALLOWED to disable this error.)" +#error "LWIP_COMPAT_MUTEX cannot prevent priority inversion. It is recommended to implement priority-aware mutexes. (Define LWIP_COMPAT_MUTEX_ALLOWED to disable this error.)" #endif #ifndef LWIP_DISABLE_TCP_SANITY_CHECKS @@ -299,31 +294,31 @@ PACK_STRUCT_END #if !LWIP_DISABLE_TCP_SANITY_CHECKS #if LWIP_TCP #if !MEMP_MEM_MALLOC && (MEMP_NUM_TCP_SEG < TCP_SND_QUEUELEN) - #error "lwip_sanity_check: WARNING: MEMP_NUM_TCP_SEG should be at least as big as TCP_SND_QUEUELEN. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." +#error "lwip_sanity_check: WARNING: MEMP_NUM_TCP_SEG should be at least as big as TCP_SND_QUEUELEN. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." #endif #if TCP_SND_BUF < (2 * TCP_MSS) - #error "lwip_sanity_check: WARNING: TCP_SND_BUF must be at least as much as (2 * TCP_MSS) for things to work smoothly. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." +#error "lwip_sanity_check: WARNING: TCP_SND_BUF must be at least as much as (2 * TCP_MSS) for things to work smoothly. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." #endif #if TCP_SND_QUEUELEN < (2 * (TCP_SND_BUF / TCP_MSS)) - #error "lwip_sanity_check: WARNING: TCP_SND_QUEUELEN must be at least as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." +#error "lwip_sanity_check: WARNING: TCP_SND_QUEUELEN must be at least as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." #endif #if TCP_SNDLOWAT >= TCP_SND_BUF - #error "lwip_sanity_check: WARNING: TCP_SNDLOWAT must be less than TCP_SND_BUF. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." +#error "lwip_sanity_check: WARNING: TCP_SNDLOWAT must be less than TCP_SND_BUF. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." #endif #if TCP_SNDLOWAT >= (0xFFFF - (4 * TCP_MSS)) - #error "lwip_sanity_check: WARNING: TCP_SNDLOWAT must at least be 4*MSS below u16_t overflow!" +#error "lwip_sanity_check: WARNING: TCP_SNDLOWAT must at least be 4*MSS below u16_t overflow!" #endif #if TCP_SNDQUEUELOWAT >= TCP_SND_QUEUELEN - #error "lwip_sanity_check: WARNING: TCP_SNDQUEUELOWAT must be less than TCP_SND_QUEUELEN. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." +#error "lwip_sanity_check: WARNING: TCP_SNDQUEUELOWAT must be less than TCP_SND_QUEUELEN. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." #endif #if !MEMP_MEM_MALLOC && PBUF_POOL_SIZE && (PBUF_POOL_BUFSIZE <= (PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN)) - #error "lwip_sanity_check: WARNING: PBUF_POOL_BUFSIZE does not provide enough space for protocol headers. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." +#error "lwip_sanity_check: WARNING: PBUF_POOL_BUFSIZE does not provide enough space for protocol headers. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." #endif #if !MEMP_MEM_MALLOC && PBUF_POOL_SIZE && (TCP_WND > (PBUF_POOL_SIZE * (PBUF_POOL_BUFSIZE - (PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN)))) - #error "lwip_sanity_check: WARNING: TCP_WND is larger than space provided by PBUF_POOL_SIZE * (PBUF_POOL_BUFSIZE - protocol headers). If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." +#error "lwip_sanity_check: WARNING: TCP_WND is larger than space provided by PBUF_POOL_SIZE * (PBUF_POOL_BUFSIZE - protocol headers). If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." #endif #if TCP_WND < TCP_MSS - #error "lwip_sanity_check: WARNING: TCP_WND is smaller than MSS. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." +#error "lwip_sanity_check: WARNING: TCP_WND is smaller than MSS. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." #endif #endif /* LWIP_TCP */ #endif /* !LWIP_DISABLE_TCP_SANITY_CHECKS */ @@ -339,7 +334,7 @@ lwip_init(void) #ifndef LWIP_SKIP_CONST_CHECK int a = 0; LWIP_UNUSED_ARG(a); - LWIP_ASSERT("LWIP_CONST_CAST not implemented correctly. Check your lwIP port.", LWIP_CONST_CAST(void*, &a) == &a); + LWIP_ASSERT("LWIP_CONST_CAST not implemented correctly. Check your lwIP port.", LWIP_CONST_CAST(void *, &a) == &a); #endif #ifndef LWIP_SKIP_PACKING_CHECK LWIP_ASSERT("Struct packing not implemented correctly. Check your lwIP port.", sizeof(struct packed_struct_test) == PACKED_STRUCT_TEST_EXPECTED_SIZE); @@ -378,7 +373,7 @@ lwip_init(void) #if PPP_SUPPORT ppp_init(); #endif - + #if LWIP_TIMERS sys_timeouts_init(); #endif /* LWIP_TIMERS */ diff --git a/Libraries/LwIP/src/core/ip.c b/Libraries/LwIP/src/core/ip.c index 1d65cf2..d611315 100755 --- a/Libraries/LwIP/src/core/ip.c +++ b/Libraries/LwIP/src/core/ip.c @@ -4,19 +4,19 @@ * * @defgroup ip IP * @ingroup callbackstyle_api - * + * * @defgroup ip4 IPv4 * @ingroup ip * * @defgroup ip6 IPv6 * @ingroup ip - * + * * @defgroup ipaddr IP address handling * @ingroup infrastructure - * + * * @defgroup ip4addr IPv4 only * @ingroup ipaddr - * + * * @defgroup ip6addr IPv6 only * @ingroup ipaddr */ @@ -67,6 +67,49 @@ struct ip_globals ip_data; const ip_addr_t ip_addr_any_type = IPADDR_ANY_TYPE_INIT; +/** + * @ingroup ipaddr + * Convert numeric IP address (both versions) into ASCII representation. + * returns ptr to static buffer; not reentrant! + * + * @param addr ip address in network order to convert + * @return pointer to a global static (!) buffer that holds the ASCII + * representation of addr + */ +char *ipaddr_ntoa(const ip_addr_t *addr) +{ + if (addr == NULL) { + return NULL; + } + if (IP_IS_V6(addr)) { + return ip6addr_ntoa(ip_2_ip6(addr)); + } else { + return ip4addr_ntoa(ip_2_ip4(addr)); + } +} + +/** + * @ingroup ipaddr + * Same as ipaddr_ntoa, but reentrant since a user-supplied buffer is used. + * + * @param addr ip address in network order to convert + * @param buf target buffer where the string is stored + * @param buflen length of buf + * @return either pointer to buf which now holds the ASCII + * representation of addr or NULL if buf was too small + */ +char *ipaddr_ntoa_r(const ip_addr_t *addr, char *buf, int buflen) +{ + if (addr == NULL) { + return NULL; + } + if (IP_IS_V6(addr)) { + return ip6addr_ntoa_r(ip_2_ip6(addr), buf, buflen); + } else { + return ip4addr_ntoa_r(ip_2_ip4(addr), buf, buflen); + } +} + /** * @ingroup ipaddr * Convert IP address string (both versions) to numeric. @@ -80,7 +123,7 @@ int ipaddr_aton(const char *cp, ip_addr_t *addr) { if (cp != NULL) { - const char* c; + const char *c; for (c = cp; *c != 0; c++) { if (*c == ':') { /* contains a colon: IPv6 address */ diff --git a/Libraries/LwIP/src/core/ipv4/autoip.c b/Libraries/LwIP/src/core/ipv4/autoip.c index 939d7f6..a454504 100755 --- a/Libraries/LwIP/src/core/ipv4/autoip.c +++ b/Libraries/LwIP/src/core/ipv4/autoip.c @@ -22,7 +22,7 @@ * With DHCP: * - define @ref LWIP_DHCP_AUTOIP_COOP 1 in your lwipopts.h. * - Configure your DHCP Client. - * + * * @see netifapi_autoip */ @@ -95,7 +95,7 @@ static err_t autoip_arp_announce(struct netif *netif); static void autoip_start_probing(struct netif *netif); /** - * @ingroup autoip + * @ingroup autoip * Set a statically allocated struct autoip to work with. * Using this prevents autoip_start to allocate it using mem_malloc. * @@ -105,6 +105,7 @@ static void autoip_start_probing(struct netif *netif); void autoip_set_struct(struct netif *netif, struct autoip *autoip) { + LWIP_ASSERT_CORE_LOCKED(); LWIP_ASSERT("netif != NULL", netif != NULL); LWIP_ASSERT("autoip != NULL", autoip != NULL); LWIP_ASSERT("netif already has a struct autoip set", @@ -123,7 +124,7 @@ autoip_set_struct(struct netif *netif, struct autoip *autoip) static void autoip_restart(struct netif *netif) { - struct autoip* autoip = netif_autoip_data(netif); + struct autoip *autoip = netif_autoip_data(netif); autoip->tried_llipaddr++; autoip_start(netif); } @@ -134,7 +135,7 @@ autoip_restart(struct netif *netif) static void autoip_handle_arp_conflict(struct netif *netif) { - struct autoip* autoip = netif_autoip_data(netif); + struct autoip *autoip = netif_autoip_data(netif); /* RFC3927, 2.5 "Conflict Detection and Defense" allows two options where a) means retreat on the first conflict and @@ -146,13 +147,13 @@ autoip_handle_arp_conflict(struct netif *netif) if (autoip->lastconflict > 0) { /* retreat, there was a conflicting ARP in the last DEFEND_INTERVAL seconds */ LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, - ("autoip_handle_arp_conflict(): we are defending, but in DEFEND_INTERVAL, retreating\n")); + ("autoip_handle_arp_conflict(): we are defending, but in DEFEND_INTERVAL, retreating\n")); /* Active TCP sessions are aborted when removing the ip addresss */ autoip_restart(netif); } else { LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, - ("autoip_handle_arp_conflict(): we are defend, send ARP Announce\n")); + ("autoip_handle_arp_conflict(): we are defend, send ARP Announce\n")); autoip_arp_announce(netif); autoip->lastconflict = DEFEND_INTERVAL * AUTOIP_TICKS_PER_SECOND; } @@ -167,7 +168,7 @@ autoip_handle_arp_conflict(struct netif *netif) static void autoip_create_addr(struct netif *netif, ip4_addr_t *ipaddr) { - struct autoip* autoip = netif_autoip_data(netif); + struct autoip *autoip = netif_autoip_data(netif); /* Here we create an IP-Address out of range 169.254.1.0 to 169.254.254.255 * compliant to RFC 3927 Section 2.1 @@ -185,13 +186,13 @@ autoip_create_addr(struct netif *netif, ip4_addr_t *ipaddr) addr -= AUTOIP_RANGE_END - AUTOIP_RANGE_START + 1; } LWIP_ASSERT("AUTOIP address not in range", (addr >= AUTOIP_RANGE_START) && - (addr <= AUTOIP_RANGE_END)); + (addr <= AUTOIP_RANGE_END)); ip4_addr_set_u32(ipaddr, lwip_htonl(addr)); LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, - ("autoip_create_addr(): tried_llipaddr=%"U16_F", %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - (u16_t)(autoip->tried_llipaddr), ip4_addr1_16(ipaddr), ip4_addr2_16(ipaddr), - ip4_addr3_16(ipaddr), ip4_addr4_16(ipaddr))); + ("autoip_create_addr(): tried_llipaddr=%"U16_F", %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", + (u16_t)(autoip->tried_llipaddr), ip4_addr1_16(ipaddr), ip4_addr2_16(ipaddr), + ip4_addr3_16(ipaddr), ip4_addr4_16(ipaddr))); } /** @@ -202,7 +203,7 @@ autoip_create_addr(struct netif *netif, ip4_addr_t *ipaddr) static err_t autoip_arp_probe(struct netif *netif) { - struct autoip* autoip = netif_autoip_data(netif); + struct autoip *autoip = netif_autoip_data(netif); /* this works because netif->ip_addr is ANY */ return etharp_request(netif, &autoip->llipaddr); } @@ -226,14 +227,14 @@ autoip_arp_announce(struct netif *netif) static err_t autoip_bind(struct netif *netif) { - struct autoip* autoip = netif_autoip_data(netif); + struct autoip *autoip = netif_autoip_data(netif); ip4_addr_t sn_mask, gw_addr; LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE, - ("autoip_bind(netif=%p) %c%c%"U16_F" %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num, - ip4_addr1_16(&autoip->llipaddr), ip4_addr2_16(&autoip->llipaddr), - ip4_addr3_16(&autoip->llipaddr), ip4_addr4_16(&autoip->llipaddr))); + ("autoip_bind(netif=%p) %c%c%"U16_F" %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", + (void *)netif, netif->name[0], netif->name[1], (u16_t)netif->num, + ip4_addr1_16(&autoip->llipaddr), ip4_addr2_16(&autoip->llipaddr), + ip4_addr3_16(&autoip->llipaddr), ip4_addr4_16(&autoip->llipaddr))); IP4_ADDR(&sn_mask, 255, 255, 0, 0); IP4_ADDR(&gw_addr, 0, 0, 0, 0); @@ -245,7 +246,7 @@ autoip_bind(struct netif *netif) } /** - * @ingroup autoip + * @ingroup autoip * Start AutoIP client * * @param netif network interface on which start the AutoIP client @@ -253,9 +254,10 @@ autoip_bind(struct netif *netif) err_t autoip_start(struct netif *netif) { - struct autoip* autoip = netif_autoip_data(netif); + struct autoip *autoip = netif_autoip_data(netif); err_t result = ERR_OK; + LWIP_ASSERT_CORE_LOCKED(); LWIP_ERROR("netif is not up, old style port?", netif_is_up(netif), return ERR_ARG;); /* Set IP-Address, Netmask and Gateway to 0 to make sure that @@ -264,19 +266,18 @@ autoip_start(struct netif *netif) netif_set_addr(netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4); LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, - ("autoip_start(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], - netif->name[1], (u16_t)netif->num)); + ("autoip_start(netif=%p) %c%c%"U16_F"\n", (void *)netif, netif->name[0], + netif->name[1], (u16_t)netif->num)); if (autoip == NULL) { /* no AutoIP client attached yet? */ LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE, - ("autoip_start(): starting new AUTOIP client\n")); - autoip = (struct autoip *)mem_malloc(sizeof(struct autoip)); + ("autoip_start(): starting new AUTOIP client\n")); + autoip = (struct autoip *)mem_calloc(1, sizeof(struct autoip)); if (autoip == NULL) { LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE, - ("autoip_start(): could not allocate autoip\n")); + ("autoip_start(): could not allocate autoip\n")); return ERR_MEM; } - memset(autoip, 0, sizeof(struct autoip)); /* store this AutoIP client in the netif */ netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_AUTOIP, autoip); LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE, ("autoip_start(): allocated autoip")); @@ -297,14 +298,14 @@ autoip_start(struct netif *netif) static void autoip_start_probing(struct netif *netif) { - struct autoip* autoip = netif_autoip_data(netif); + struct autoip *autoip = netif_autoip_data(netif); autoip->state = AUTOIP_STATE_PROBING; autoip->sent_num = 0; LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, - ("autoip_start_probing(): changing state to PROBING: %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - ip4_addr1_16(&autoip->llipaddr), ip4_addr2_16(&autoip->llipaddr), - ip4_addr3_16(&autoip->llipaddr), ip4_addr4_16(&autoip->llipaddr))); + ("autoip_start_probing(): changing state to PROBING: %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", + ip4_addr1_16(&autoip->llipaddr), ip4_addr2_16(&autoip->llipaddr), + ip4_addr3_16(&autoip->llipaddr), ip4_addr4_16(&autoip->llipaddr))); /* time to wait to first probe, this is randomly * chosen out of 0 to PROBE_WAIT seconds. @@ -331,7 +332,7 @@ autoip_start_probing(struct netif *netif) void autoip_network_changed(struct netif *netif) { - struct autoip* autoip = netif_autoip_data(netif); + struct autoip *autoip = netif_autoip_data(netif); if (autoip && (autoip->state != AUTOIP_STATE_OFF)) { autoip_start_probing(netif); @@ -339,7 +340,7 @@ autoip_network_changed(struct netif *netif) } /** - * @ingroup autoip + * @ingroup autoip * Stop AutoIP client * * @param netif network interface on which stop the AutoIP client @@ -347,8 +348,9 @@ autoip_network_changed(struct netif *netif) err_t autoip_stop(struct netif *netif) { - struct autoip* autoip = netif_autoip_data(netif); + struct autoip *autoip = netif_autoip_data(netif); + LWIP_ASSERT_CORE_LOCKED(); if (autoip != NULL) { autoip->state = AUTOIP_STATE_OFF; if (ip4_addr_islinklocal(netif_ip4_addr(netif))) { @@ -364,10 +366,10 @@ autoip_stop(struct netif *netif) void autoip_tmr(void) { - struct netif *netif = netif_list; + struct netif *netif; /* loop through netif's */ - while (netif != NULL) { - struct autoip* autoip = netif_autoip_data(netif); + NETIF_FOREACH(netif) { + struct autoip *autoip = netif_autoip_data(netif); /* only act on AutoIP configured interfaces */ if (autoip != NULL) { if (autoip->lastconflict > 0) { @@ -375,14 +377,14 @@ autoip_tmr(void) } LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE, - ("autoip_tmr() AutoIP-State: %"U16_F", ttw=%"U16_F"\n", - (u16_t)(autoip->state), autoip->ttw)); + ("autoip_tmr() AutoIP-State: %"U16_F", ttw=%"U16_F"\n", + (u16_t)(autoip->state), autoip->ttw)); if (autoip->ttw > 0) { autoip->ttw--; } - switch(autoip->state) { + switch (autoip->state) { case AUTOIP_STATE_PROBING: if (autoip->ttw == 0) { if (autoip->sent_num >= PROBE_NUM) { @@ -394,9 +396,9 @@ autoip_tmr(void) autoip->sent_num = 1; autoip->ttw = ANNOUNCE_WAIT * AUTOIP_TICKS_PER_SECOND; LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, - ("autoip_tmr(): changing state to ANNOUNCING: %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - ip4_addr1_16(&autoip->llipaddr), ip4_addr2_16(&autoip->llipaddr), - ip4_addr3_16(&autoip->llipaddr), ip4_addr4_16(&autoip->llipaddr))); + ("autoip_tmr(): changing state to ANNOUNCING: %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", + ip4_addr1_16(&autoip->llipaddr), ip4_addr2_16(&autoip->llipaddr), + ip4_addr3_16(&autoip->llipaddr), ip4_addr4_16(&autoip->llipaddr))); } else { autoip_arp_probe(netif); LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE, ("autoip_tmr() PROBING Sent Probe\n")); @@ -407,8 +409,8 @@ autoip_tmr(void) } else { /* calculate time to wait to next probe */ autoip->ttw = (u16_t)((LWIP_AUTOIP_RAND(netif) % - ((PROBE_MAX - PROBE_MIN) * AUTOIP_TICKS_PER_SECOND) ) + - PROBE_MIN * AUTOIP_TICKS_PER_SECOND); + ((PROBE_MAX - PROBE_MIN) * AUTOIP_TICKS_PER_SECOND) ) + + PROBE_MIN * AUTOIP_TICKS_PER_SECOND); } } } @@ -422,13 +424,13 @@ autoip_tmr(void) autoip->sent_num++; if (autoip->sent_num >= ANNOUNCE_NUM) { - autoip->state = AUTOIP_STATE_BOUND; - autoip->sent_num = 0; - autoip->ttw = 0; - LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, - ("autoip_tmr(): changing state to BOUND: %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - ip4_addr1_16(&autoip->llipaddr), ip4_addr2_16(&autoip->llipaddr), - ip4_addr3_16(&autoip->llipaddr), ip4_addr4_16(&autoip->llipaddr))); + autoip->state = AUTOIP_STATE_BOUND; + autoip->sent_num = 0; + autoip->ttw = 0; + LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, + ("autoip_tmr(): changing state to BOUND: %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", + ip4_addr1_16(&autoip->llipaddr), ip4_addr2_16(&autoip->llipaddr), + ip4_addr3_16(&autoip->llipaddr), ip4_addr4_16(&autoip->llipaddr))); } } break; @@ -438,8 +440,6 @@ autoip_tmr(void) break; } } - /* proceed to next network interface */ - netif = netif->next; } } @@ -452,49 +452,49 @@ autoip_tmr(void) void autoip_arp_reply(struct netif *netif, struct etharp_hdr *hdr) { - struct autoip* autoip = netif_autoip_data(netif); + struct autoip *autoip = netif_autoip_data(netif); LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE, ("autoip_arp_reply()\n")); if ((autoip != NULL) && (autoip->state != AUTOIP_STATE_OFF)) { - /* when ip.src == llipaddr && hw.src != netif->hwaddr - * - * when probing ip.dst == llipaddr && hw.src != netif->hwaddr - * we have a conflict and must solve it - */ + /* when ip.src == llipaddr && hw.src != netif->hwaddr + * + * when probing ip.dst == llipaddr && hw.src != netif->hwaddr + * we have a conflict and must solve it + */ ip4_addr_t sipaddr, dipaddr; struct eth_addr netifaddr; - ETHADDR16_COPY(netifaddr.addr, netif->hwaddr); + SMEMCPY(netifaddr.addr, netif->hwaddr, ETH_HWADDR_LEN); - /* Copy struct ip4_addr2 to aligned ip4_addr, to support compilers without + /* Copy struct ip4_addr_wordaligned to aligned ip4_addr, to support compilers without * structure packing (not using structure copy which breaks strict-aliasing rules). */ - IPADDR2_COPY(&sipaddr, &hdr->sipaddr); - IPADDR2_COPY(&dipaddr, &hdr->dipaddr); + IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T(&sipaddr, &hdr->sipaddr); + IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T(&dipaddr, &hdr->dipaddr); if (autoip->state == AUTOIP_STATE_PROBING) { - /* RFC 3927 Section 2.2.1: - * from beginning to after ANNOUNCE_WAIT - * seconds we have a conflict if - * ip.src == llipaddr OR - * ip.dst == llipaddr && hw.src != own hwaddr - */ + /* RFC 3927 Section 2.2.1: + * from beginning to after ANNOUNCE_WAIT + * seconds we have a conflict if + * ip.src == llipaddr OR + * ip.dst == llipaddr && hw.src != own hwaddr + */ if ((ip4_addr_cmp(&sipaddr, &autoip->llipaddr)) || (ip4_addr_isany_val(sipaddr) && ip4_addr_cmp(&dipaddr, &autoip->llipaddr) && !eth_addr_cmp(&netifaddr, &hdr->shwaddr))) { LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE | LWIP_DBG_LEVEL_WARNING, - ("autoip_arp_reply(): Probe Conflict detected\n")); + ("autoip_arp_reply(): Probe Conflict detected\n")); autoip_restart(netif); } } else { - /* RFC 3927 Section 2.5: - * in any state we have a conflict if - * ip.src == llipaddr && hw.src != own hwaddr - */ + /* RFC 3927 Section 2.5: + * in any state we have a conflict if + * ip.src == llipaddr && hw.src != own hwaddr + */ if (ip4_addr_cmp(&sipaddr, &autoip->llipaddr) && !eth_addr_cmp(&netifaddr, &hdr->shwaddr)) { LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE | LWIP_DBG_LEVEL_WARNING, - ("autoip_arp_reply(): Conflicting ARP-Packet detected\n")); + ("autoip_arp_reply(): Conflicting ARP-Packet detected\n")); autoip_handle_arp_conflict(netif); } } @@ -511,7 +511,7 @@ u8_t autoip_supplied_address(const struct netif *netif) { if ((netif != NULL) && (netif_autoip_data(netif) != NULL)) { - struct autoip* autoip = netif_autoip_data(netif); + struct autoip *autoip = netif_autoip_data(netif); return (autoip->state == AUTOIP_STATE_BOUND) || (autoip->state == AUTOIP_STATE_ANNOUNCING); } return 0; @@ -520,7 +520,7 @@ autoip_supplied_address(const struct netif *netif) u8_t autoip_accept_packet(struct netif *netif, const ip4_addr_t *addr) { - struct autoip* autoip = netif_autoip_data(netif); + struct autoip *autoip = netif_autoip_data(netif); return (autoip != NULL) && ip4_addr_cmp(addr, &(autoip->llipaddr)); } diff --git a/Libraries/LwIP/src/core/ipv4/dhcp.c b/Libraries/LwIP/src/core/ipv4/dhcp.c index 74f6b58..89f9c41 100755 --- a/Libraries/LwIP/src/core/ipv4/dhcp.c +++ b/Libraries/LwIP/src/core/ipv4/dhcp.c @@ -21,6 +21,9 @@ * Use dhcp_release() to end the lease and use dhcp_stop() * to remove the DHCP client. * + * @see LWIP_HOOK_DHCP_APPEND_OPTIONS + * @see LWIP_HOOK_DHCP_PARSE_OPTION + * * @see netifapi_dhcp4 */ @@ -75,9 +78,20 @@ #include "lwip/dns.h" #include "lwip/etharp.h" #include "lwip/prot/dhcp.h" +#include "lwip/prot/iana.h" #include +#ifdef LWIP_HOOK_FILENAME +#include LWIP_HOOK_FILENAME +#endif +#ifndef LWIP_HOOK_DHCP_APPEND_OPTIONS +#define LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, state, msg, msg_type, options_len_ptr) +#endif +#ifndef LWIP_HOOK_DHCP_PARSE_OPTION +#define LWIP_HOOK_DHCP_PARSE_OPTION(netif, dhcp, state, msg, msg_type, option, len, pbuf, offset) do { LWIP_UNUSED_ARG(msg); } while(0) +#endif + /** DHCP_CREATE_RAND_XID: if this is set to 1, the xid is created using * LWIP_RAND() (this overrides DHCP_GLOBAL_XID) */ @@ -156,7 +170,7 @@ static u8_t dhcp_discover_request_options[] = { #if LWIP_DHCP_GET_NTP_SRV , DHCP_OPTION_NTP #endif /* LWIP_DHCP_GET_NTP_SRV */ - }; +}; #ifdef DHCP_GLOBAL_XID static u32_t xid; @@ -194,20 +208,18 @@ static void dhcp_t2_timeout(struct netif *netif); /* build outgoing messages */ /* create a DHCP message, fill in common headers */ -static err_t dhcp_create_msg(struct netif *netif, struct dhcp *dhcp, u8_t message_type); -/* free a DHCP request */ -static void dhcp_delete_msg(struct dhcp *dhcp); +static struct pbuf *dhcp_create_msg(struct netif *netif, struct dhcp *dhcp, u8_t message_type, u16_t *options_out_len); /* add a DHCP option (type, then length in bytes) */ -static void dhcp_option(struct dhcp *dhcp, u8_t option_type, u8_t option_len); +static u16_t dhcp_option(u16_t options_out_len, u8_t *options, u8_t option_type, u8_t option_len); /* add option values */ -static void dhcp_option_byte(struct dhcp *dhcp, u8_t value); -static void dhcp_option_short(struct dhcp *dhcp, u16_t value); -static void dhcp_option_long(struct dhcp *dhcp, u32_t value); +static u16_t dhcp_option_byte(u16_t options_out_len, u8_t *options, u8_t value); +static u16_t dhcp_option_short(u16_t options_out_len, u8_t *options, u16_t value); +static u16_t dhcp_option_long(u16_t options_out_len, u8_t *options, u32_t value); #if LWIP_NETIF_HOSTNAME -static void dhcp_option_hostname(struct dhcp *dhcp, struct netif *netif); +static u16_t dhcp_option_hostname(u16_t options_out_len, u8_t *options, struct netif *netif); #endif /* LWIP_NETIF_HOSTNAME */ /* always add the DHCP options trailer to end and pad */ -static void dhcp_option_trailer(struct dhcp *dhcp); +static void dhcp_option_trailer(u16_t options_out_len, u8_t *options, struct pbuf *p_out); /** Ensure DHCP PCB is allocated and bound */ static err_t @@ -226,8 +238,8 @@ dhcp_inc_pcb_refcount(void) ip_set_option(dhcp_pcb, SOF_BROADCAST); /* set up local and remote port for the pcb -> listen on all interfaces on all src/dest IPs */ - udp_bind(dhcp_pcb, IP4_ADDR_ANY, DHCP_CLIENT_PORT); - udp_connect(dhcp_pcb, IP4_ADDR_ANY, DHCP_SERVER_PORT); + udp_bind(dhcp_pcb, IP4_ADDR_ANY, LWIP_IANA_PORT_DHCP_CLIENT); + udp_connect(dhcp_pcb, IP4_ADDR_ANY, LWIP_IANA_PORT_DHCP_SERVER); udp_recv(dhcp_pcb, dhcp_recv, NULL); } @@ -267,7 +279,7 @@ dhcp_handle_nak(struct netif *netif) struct dhcp *dhcp = netif_dhcp_data(netif); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_handle_nak(netif=%p) %c%c%"U16_F"\n", - (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); + (void *)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); /* Change to a defined state - set this before assigning the address to ensure the callback can use dhcp_supplied_address() */ dhcp_set_state(dhcp, DHCP_STATE_BACKING_OFF); @@ -294,7 +306,7 @@ dhcp_check(struct netif *netif) err_t result; u16_t msecs; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_check(netif=%p) %c%c\n", (void *)netif, (s16_t)netif->name[0], - (s16_t)netif->name[1])); + (s16_t)netif->name[1])); dhcp_set_state(dhcp, DHCP_STATE_CHECKING); /* create an ARP query for the offered IP address, expecting that no host responds, as the IP address should not be in use. */ @@ -306,7 +318,7 @@ dhcp_check(struct netif *netif) dhcp->tries++; } msecs = 500; - dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; + dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_check(): set request timeout %"U16_F" msecs\n", msecs)); } #endif /* DHCP_DOES_ARP_CHECK */ @@ -317,26 +329,28 @@ dhcp_check(struct netif *netif) * @param netif the netif under DHCP control */ static void -dhcp_handle_offer(struct netif *netif) +dhcp_handle_offer(struct netif *netif, struct dhcp_msg *msg_in) { struct dhcp *dhcp = netif_dhcp_data(netif); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_handle_offer(netif=%p) %c%c%"U16_F"\n", - (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); + (void *)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); /* obtain the server address */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SERVER_ID)) { + dhcp->request_timeout = 0; /* stop timer */ + ip_addr_set_ip4_u32(&dhcp->server_ip_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SERVER_ID))); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_handle_offer(): server 0x%08"X32_F"\n", - ip4_addr_get_u32(ip_2_ip4(&dhcp->server_ip_addr)))); + ip4_addr_get_u32(ip_2_ip4(&dhcp->server_ip_addr)))); /* remember offered address */ - ip4_addr_copy(dhcp->offered_ip_addr, dhcp->msg_in->yiaddr); + ip4_addr_copy(dhcp->offered_ip_addr, msg_in->yiaddr); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_handle_offer(): offer for 0x%08"X32_F"\n", - ip4_addr_get_u32(&dhcp->offered_ip_addr))); + ip4_addr_get_u32(&dhcp->offered_ip_addr))); dhcp_select(netif); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, - ("dhcp_handle_offer(netif=%p) did not get server ID!\n", (void*)netif)); + ("dhcp_handle_offer(netif=%p) did not get server ID!\n", (void *)netif)); } } @@ -351,52 +365,59 @@ dhcp_handle_offer(struct netif *netif) static err_t dhcp_select(struct netif *netif) { - struct dhcp *dhcp = netif_dhcp_data(netif); + struct dhcp *dhcp; err_t result; u16_t msecs; u8_t i; + struct pbuf *p_out; + u16_t options_out_len; - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_select(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); + LWIP_ERROR("dhcp_select: netif != NULL", (netif != NULL), return ERR_ARG;); + dhcp = netif_dhcp_data(netif); + LWIP_ERROR("dhcp_select: dhcp != NULL", (dhcp != NULL), return ERR_VAL;); + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_select(netif=%p) %c%c%"U16_F"\n", (void *)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); dhcp_set_state(dhcp, DHCP_STATE_REQUESTING); /* create and initialize the DHCP message header */ - result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); - if (result == ERR_OK) { - dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); - dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); + p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len); + if (p_out != NULL) { + struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; + options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); + options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif)); /* MUST request the offered IP address */ - dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); - dhcp_option_long(dhcp, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); + options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4); + options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); - dhcp_option(dhcp, DHCP_OPTION_SERVER_ID, 4); - dhcp_option_long(dhcp, lwip_ntohl(ip4_addr_get_u32(ip_2_ip4(&dhcp->server_ip_addr)))); + options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_SERVER_ID, 4); + options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(ip_2_ip4(&dhcp->server_ip_addr)))); - dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); + options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { - dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); + options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]); } #if LWIP_NETIF_HOSTNAME - dhcp_option_hostname(dhcp, netif); + options_out_len = dhcp_option_hostname(options_out_len, msg_out->options, netif); #endif /* LWIP_NETIF_HOSTNAME */ - dhcp_option_trailer(dhcp); - /* shrink the pbuf to the actual content length */ - pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); + LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, DHCP_STATE_REQUESTING, msg_out, DHCP_REQUEST, &options_out_len); + dhcp_option_trailer(options_out_len, msg_out->options, p_out); /* send broadcast to any DHCP server */ - udp_sendto_if_src(dhcp_pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif, IP4_ADDR_ANY); - dhcp_delete_msg(dhcp); + result = udp_sendto_if_src(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif, IP4_ADDR_ANY); + pbuf_free(p_out); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_select: REQUESTING\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("dhcp_select: could not allocate DHCP request\n")); + result = ERR_MEM; } if (dhcp->tries < 255) { dhcp->tries++; } - msecs = (dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000; - dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; + msecs = (u16_t)((dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000); + dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_select(): set request timeout %"U16_F" msecs\n", msecs)); return result; } @@ -408,10 +429,10 @@ dhcp_select(struct netif *netif) void dhcp_coarse_tmr(void) { - struct netif *netif = netif_list; + struct netif *netif; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_coarse_tmr()\n")); /* iterate through all network interfaces */ - while (netif != NULL) { + NETIF_FOREACH(netif) { /* only act on DHCP configured interfaces */ struct dhcp *dhcp = netif_dhcp_data(netif); if ((dhcp != NULL) && (dhcp->state != DHCP_STATE_OFF)) { @@ -419,22 +440,20 @@ dhcp_coarse_tmr(void) if (dhcp->t0_timeout && (++dhcp->lease_used == dhcp->t0_timeout)) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_coarse_tmr(): t0 timeout\n")); /* this clients' lease time has expired */ - dhcp_release(netif); - dhcp_discover(netif); - /* timer is active (non zero), and triggers (zeroes) now? */ + dhcp_release_and_stop(netif); + dhcp_start(netif); + /* timer is active (non zero), and triggers (zeroes) now? */ } else if (dhcp->t2_rebind_time && (dhcp->t2_rebind_time-- == 1)) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_coarse_tmr(): t2 timeout\n")); /* this clients' rebind timeout triggered */ dhcp_t2_timeout(netif); - /* timer is active (non zero), and triggers (zeroes) now */ + /* timer is active (non zero), and triggers (zeroes) now */ } else if (dhcp->t1_renew_time && (dhcp->t1_renew_time-- == 1)) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_coarse_tmr(): t1 timeout\n")); /* this clients' renewal timeout triggered */ dhcp_t1_timeout(netif); } } - /* proceed to next netif */ - netif = netif->next; } } @@ -448,26 +467,23 @@ dhcp_coarse_tmr(void) void dhcp_fine_tmr(void) { - struct netif *netif = netif_list; + struct netif *netif; /* loop through netif's */ - while (netif != NULL) { + NETIF_FOREACH(netif) { struct dhcp *dhcp = netif_dhcp_data(netif); /* only act on DHCP configured interfaces */ if (dhcp != NULL) { /* timer is active (non zero), and is about to trigger now */ if (dhcp->request_timeout > 1) { dhcp->request_timeout--; - } - else if (dhcp->request_timeout == 1) { + } else if (dhcp->request_timeout == 1) { dhcp->request_timeout--; - /* { netif->dhcp->request_timeout == 0 } */ + /* { dhcp->request_timeout == 0 } */ LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_fine_tmr(): request timeout\n")); /* this client's request timeout triggered */ dhcp_timeout(netif); } } - /* proceed to next network interface */ - netif = netif->next; } } @@ -489,24 +505,24 @@ dhcp_timeout(struct netif *netif) if ((dhcp->state == DHCP_STATE_BACKING_OFF) || (dhcp->state == DHCP_STATE_SELECTING)) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout(): restarting discovery\n")); dhcp_discover(netif); - /* receiving the requested lease timed out */ + /* receiving the requested lease timed out */ } else if (dhcp->state == DHCP_STATE_REQUESTING) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): REQUESTING, DHCP request timed out\n")); if (dhcp->tries <= 5) { dhcp_select(netif); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): REQUESTING, releasing, restarting\n")); - dhcp_release(netif); - dhcp_discover(netif); + dhcp_release_and_stop(netif); + dhcp_start(netif); } #if DHCP_DOES_ARP_CHECK - /* received no ARP reply for the offered address (which is good) */ + /* received no ARP reply for the offered address (which is good) */ } else if (dhcp->state == DHCP_STATE_CHECKING) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): CHECKING, ARP request timed out\n")); if (dhcp->tries <= 1) { dhcp_check(netif); - /* no ARP replies on the offered address, - looks like the IP address is indeed free */ + /* no ARP replies on the offered address, + looks like the IP address is indeed free */ } else { /* bind the interface to the offered address */ dhcp_bind(netif); @@ -542,9 +558,8 @@ dhcp_t1_timeout(struct netif *netif) DHCP_STATE_RENEWING, not DHCP_STATE_BOUND */ dhcp_renew(netif); /* Calculate next timeout */ - if (((dhcp->t2_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) - { - dhcp->t1_renew_time = ((dhcp->t2_timeout - dhcp->lease_used) / 2); + if (((dhcp->t2_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) { + dhcp->t1_renew_time = (u16_t)((dhcp->t2_timeout - dhcp->lease_used) / 2); } } } @@ -569,9 +584,8 @@ dhcp_t2_timeout(struct netif *netif) DHCP_STATE_REBINDING, not DHCP_STATE_BOUND */ dhcp_rebind(netif); /* Calculate next timeout */ - if (((dhcp->t0_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) - { - dhcp->t2_rebind_time = ((dhcp->t0_timeout - dhcp->lease_used) / 2); + if (((dhcp->t0_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) { + dhcp->t2_rebind_time = (u16_t)((dhcp->t0_timeout - dhcp->lease_used) / 2); } } } @@ -582,7 +596,7 @@ dhcp_t2_timeout(struct netif *netif) * @param netif the netif under DHCP control */ static void -dhcp_handle_ack(struct netif *netif) +dhcp_handle_ack(struct netif *netif, struct dhcp_msg *msg_in) { struct dhcp *dhcp = netif_dhcp_data(netif); @@ -624,12 +638,12 @@ dhcp_handle_ack(struct netif *netif) } /* (y)our internet address */ - ip4_addr_copy(dhcp->offered_ip_addr, dhcp->msg_in->yiaddr); + ip4_addr_copy(dhcp->offered_ip_addr, msg_in->yiaddr); #if LWIP_DHCP_BOOTP_FILE /* copy boot server address, boot file name copied in dhcp_parse_reply if not overloaded */ - ip4_addr_copy(dhcp->offered_si_addr, dhcp->msg_in->siaddr); + ip4_addr_copy(dhcp->offered_si_addr, msg_in->siaddr); #endif /* LWIP_DHCP_BOOTP_FILE */ /* subnet mask given? */ @@ -658,7 +672,7 @@ dhcp_handle_ack(struct netif *netif) /* DNS servers */ for (n = 0; (n < LWIP_DHCP_PROVIDE_DNS_SERVERS) && dhcp_option_given(dhcp, DHCP_OPTION_IDX_DNS_SERVER + n); n++) { ip_addr_t dns_addr; - ip_addr_set_ip4_u32(&dns_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_DNS_SERVER + n))); + ip_addr_set_ip4_u32_val(dns_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_DNS_SERVER + n))); dns_setserver(n, &dns_addr); } #endif /* LWIP_DHCP_PROVIDE_DNS_SERVERS */ @@ -675,6 +689,7 @@ dhcp_handle_ack(struct netif *netif) void dhcp_set_struct(struct netif *netif, struct dhcp *dhcp) { + LWIP_ASSERT_CORE_LOCKED(); LWIP_ASSERT("netif != NULL", netif != NULL); LWIP_ASSERT("dhcp != NULL", dhcp != NULL); LWIP_ASSERT("netif already has a struct dhcp set", netif_dhcp_data(netif) == NULL); @@ -696,6 +711,7 @@ dhcp_set_struct(struct netif *netif, struct dhcp *dhcp) */ void dhcp_cleanup(struct netif *netif) { + LWIP_ASSERT_CORE_LOCKED(); LWIP_ASSERT("netif != NULL", netif != NULL); if (netif_dhcp_data(netif) != NULL) { @@ -723,10 +739,11 @@ dhcp_start(struct netif *netif) struct dhcp *dhcp; err_t result; + LWIP_ASSERT_CORE_LOCKED(); LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;); LWIP_ERROR("netif is not up, old style port?", netif_is_up(netif), return ERR_ARG;); dhcp = netif_dhcp_data(netif); - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_start(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_start(netif=%p) %c%c%"U16_F"\n", (void *)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); /* check MTU of the netif */ if (netif->mtu < DHCP_MAX_MSG_LEN_MIN_REQUIRED) { @@ -746,11 +763,9 @@ dhcp_start(struct netif *netif) /* store this dhcp client in the netif */ netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, dhcp); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): allocated dhcp")); - /* already has DHCP client attached */ + /* already has DHCP client attached */ } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_start(): restarting DHCP configuration\n")); - LWIP_ASSERT("pbuf p_out wasn't freed", dhcp->p_out == NULL); - LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL ); if (dhcp->pcb_allocated != 0) { dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */ @@ -769,20 +784,17 @@ dhcp_start(struct netif *netif) } dhcp->pcb_allocated = 1; -#if LWIP_DHCP_CHECK_LINK_UP if (!netif_is_link_up(netif)) { /* set state INIT and wait for dhcp_network_changed() to call dhcp_discover() */ dhcp_set_state(dhcp, DHCP_STATE_INIT); return ERR_OK; } -#endif /* LWIP_DHCP_CHECK_LINK_UP */ - /* (re)start the DHCP negotiation */ result = dhcp_discover(netif); if (result != ERR_OK) { /* free resources allocated above */ - dhcp_stop(netif); + dhcp_release_and_stop(netif); return ERR_MEM; } return result; @@ -802,8 +814,10 @@ void dhcp_inform(struct netif *netif) { struct dhcp dhcp; - err_t result = ERR_OK; + struct pbuf *p_out; + u16_t options_out_len; + LWIP_ASSERT_CORE_LOCKED(); LWIP_ERROR("netif != NULL", (netif != NULL), return;); if (dhcp_inc_pcb_refcount() != ERR_OK) { /* ensure DHCP PCB is allocated */ @@ -814,20 +828,20 @@ dhcp_inform(struct netif *netif) dhcp_set_state(&dhcp, DHCP_STATE_INFORMING); /* create and initialize the DHCP message header */ - result = dhcp_create_msg(netif, &dhcp, DHCP_INFORM); - if (result == ERR_OK) { - dhcp_option(&dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); - dhcp_option_short(&dhcp, DHCP_MAX_MSG_LEN(netif)); + p_out = dhcp_create_msg(netif, &dhcp, DHCP_INFORM, &options_out_len); + if (p_out != NULL) { + struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; + options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); + options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif)); - dhcp_option_trailer(&dhcp); - - pbuf_realloc(dhcp.p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp.options_out_len); + LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, &dhcp, DHCP_STATE_INFORMING, msg_out, DHCP_INFORM, &options_out_len); + dhcp_option_trailer(options_out_len, msg_out->options, p_out); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_inform: INFORMING\n")); - udp_sendto_if(dhcp_pcb, dhcp.p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); + udp_sendto_if(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif); - dhcp_delete_msg(&dhcp); + pbuf_free(p_out); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_inform: could not allocate DHCP request\n")); } @@ -845,33 +859,35 @@ dhcp_network_changed(struct netif *netif) { struct dhcp *dhcp = netif_dhcp_data(netif); - if (!dhcp) + if (!dhcp) { return; + } switch (dhcp->state) { - case DHCP_STATE_REBINDING: - case DHCP_STATE_RENEWING: - case DHCP_STATE_BOUND: - case DHCP_STATE_REBOOTING: - dhcp->tries = 0; - dhcp_reboot(netif); - break; - case DHCP_STATE_OFF: - /* stay off */ - break; - default: - /* INIT/REQUESTING/CHECKING/BACKING_OFF restart with new 'rid' because the - state changes, SELECTING: continue with current 'rid' as we stay in the - same state */ + case DHCP_STATE_REBINDING: + case DHCP_STATE_RENEWING: + case DHCP_STATE_BOUND: + case DHCP_STATE_REBOOTING: + dhcp->tries = 0; + dhcp_reboot(netif); + break; + case DHCP_STATE_OFF: + /* stay off */ + break; + default: + LWIP_ASSERT("invalid dhcp->state", dhcp->state <= DHCP_STATE_BACKING_OFF); + /* INIT/REQUESTING/CHECKING/BACKING_OFF restart with new 'rid' because the + state changes, SELECTING: continue with current 'rid' as we stay in the + same state */ #if LWIP_DHCP_AUTOIP_COOP - if (dhcp->autoip_coop_state == DHCP_AUTOIP_COOP_STATE_ON) { - autoip_stop(netif); - dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF; - } + if (dhcp->autoip_coop_state == DHCP_AUTOIP_COOP_STATE_ON) { + autoip_stop(netif); + dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF; + } #endif /* LWIP_DHCP_AUTOIP_COOP */ - /* ensure we start with short timeouts, even if already discovering */ - dhcp->tries = 0; - dhcp_discover(netif); - break; + /* ensure we start with short timeouts, even if already discovering */ + dhcp->tries = 0; + dhcp_discover(netif); + break; } } @@ -894,13 +910,13 @@ dhcp_arp_reply(struct netif *netif, const ip4_addr_t *addr) /* is a DHCP client doing an ARP check? */ if ((dhcp != NULL) && (dhcp->state == DHCP_STATE_CHECKING)) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_arp_reply(): CHECKING, arp reply for 0x%08"X32_F"\n", - ip4_addr_get_u32(addr))); + ip4_addr_get_u32(addr))); /* did a host respond with the address we were offered by the DHCP server? */ if (ip4_addr_cmp(addr, &dhcp->offered_ip_addr)) { /* we will not accept the offered address */ LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE | LWIP_DBG_LEVEL_WARNING, - ("dhcp_arp_reply(): arp reply matched with offered address, declining\n")); + ("dhcp_arp_reply(): arp reply matched with offered address, declining\n")); dhcp_decline(netif); } } @@ -919,33 +935,37 @@ static err_t dhcp_decline(struct netif *netif) { struct dhcp *dhcp = netif_dhcp_data(netif); - err_t result = ERR_OK; + err_t result; u16_t msecs; + struct pbuf *p_out; + u16_t options_out_len; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_decline()\n")); dhcp_set_state(dhcp, DHCP_STATE_BACKING_OFF); /* create and initialize the DHCP message header */ - result = dhcp_create_msg(netif, dhcp, DHCP_DECLINE); - if (result == ERR_OK) { - dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); - dhcp_option_long(dhcp, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); + p_out = dhcp_create_msg(netif, dhcp, DHCP_DECLINE, &options_out_len); + if (p_out != NULL) { + struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; + options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4); + options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); - dhcp_option_trailer(dhcp); - /* resize pbuf to reflect true size of options */ - pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); + LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, DHCP_STATE_BACKING_OFF, msg_out, DHCP_DECLINE, &options_out_len); + dhcp_option_trailer(options_out_len, msg_out->options, p_out); /* per section 4.4.4, broadcast DECLINE messages */ - udp_sendto_if_src(dhcp_pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif, IP4_ADDR_ANY); - dhcp_delete_msg(dhcp); + result = udp_sendto_if_src(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif, IP4_ADDR_ANY); + pbuf_free(p_out); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_decline: BACKING OFF\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, - ("dhcp_decline: could not allocate DHCP request\n")); + ("dhcp_decline: could not allocate DHCP request\n")); + result = ERR_MEM; } if (dhcp->tries < 255) { dhcp->tries++; } - msecs = 10*1000; - dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; + msecs = 10 * 1000; + dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_decline(): set request timeout %"U16_F" msecs\n", msecs)); return result; } @@ -964,30 +984,33 @@ dhcp_discover(struct netif *netif) err_t result = ERR_OK; u16_t msecs; u8_t i; + struct pbuf *p_out; + u16_t options_out_len; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover()\n")); + ip4_addr_set_any(&dhcp->offered_ip_addr); dhcp_set_state(dhcp, DHCP_STATE_SELECTING); /* create and initialize the DHCP message header */ - result = dhcp_create_msg(netif, dhcp, DHCP_DISCOVER); - if (result == ERR_OK) { + p_out = dhcp_create_msg(netif, dhcp, DHCP_DISCOVER, &options_out_len); + if (p_out != NULL) { + struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: making request\n")); - dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); - dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); + options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); + options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif)); - dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); + options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { - dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); + options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]); } - dhcp_option_trailer(dhcp); + LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, DHCP_STATE_SELECTING, msg_out, DHCP_DISCOVER, &options_out_len); + dhcp_option_trailer(options_out_len, msg_out->options, p_out); - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: realloc()ing\n")); - pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, DHCP_SERVER_PORT)\n")); - udp_sendto_if_src(dhcp_pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif, IP4_ADDR_ANY); + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER)\n")); + udp_sendto_if_src(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif, IP4_ADDR_ANY); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: deleting()ing\n")); - dhcp_delete_msg(dhcp); + pbuf_free(p_out); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_discover: SELECTING\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_discover: could not allocate DHCP request\n")); @@ -1001,8 +1024,8 @@ dhcp_discover(struct netif *netif) autoip_start(netif); } #endif /* LWIP_DHCP_AUTOIP_COOP */ - msecs = (dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000; - dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; + msecs = (u16_t)((dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000); + dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_discover(): set request timeout %"U16_F" msecs\n", msecs)); return result; } @@ -1022,23 +1045,23 @@ dhcp_bind(struct netif *netif) LWIP_ERROR("dhcp_bind: netif != NULL", (netif != NULL), return;); dhcp = netif_dhcp_data(netif); LWIP_ERROR("dhcp_bind: dhcp != NULL", (dhcp != NULL), return;); - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(netif=%p) %c%c%"U16_F"\n", (void *)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); /* reset time used of lease */ dhcp->lease_used = 0; if (dhcp->offered_t0_lease != 0xffffffffUL) { - /* set renewal period timer */ - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(): t0 renewal timer %"U32_F" secs\n", dhcp->offered_t0_lease)); - timeout = (dhcp->offered_t0_lease + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS; - if (timeout > 0xffff) { - timeout = 0xffff; - } - dhcp->t0_timeout = (u16_t)timeout; - if (dhcp->t0_timeout == 0) { - dhcp->t0_timeout = 1; - } - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t0_lease*1000)); + /* set renewal period timer */ + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(): t0 renewal timer %"U32_F" secs\n", dhcp->offered_t0_lease)); + timeout = (dhcp->offered_t0_lease + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS; + if (timeout > 0xffff) { + timeout = 0xffff; + } + dhcp->t0_timeout = (u16_t)timeout; + if (dhcp->t0_timeout == 0) { + dhcp->t0_timeout = 1; + } + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t0_lease * 1000)); } /* temporary DHCP lease? */ @@ -1053,7 +1076,7 @@ dhcp_bind(struct netif *netif) if (dhcp->t1_timeout == 0) { dhcp->t1_timeout = 1; } - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t1_renew*1000)); + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t1_renew * 1000)); dhcp->t1_renew_time = dhcp->t1_timeout; } /* set renewal period timer */ @@ -1067,7 +1090,7 @@ dhcp_bind(struct netif *netif) if (dhcp->t2_timeout == 0) { dhcp->t2_timeout = 1; } - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t2_rebind*1000)); + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t2_rebind * 1000)); dhcp->t2_rebind_time = dhcp->t2_timeout; } @@ -1108,7 +1131,7 @@ dhcp_bind(struct netif *netif) #endif /* LWIP_DHCP_AUTOIP_COOP */ LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_bind(): IP: 0x%08"X32_F" SN: 0x%08"X32_F" GW: 0x%08"X32_F"\n", - ip4_addr_get_u32(&dhcp->offered_ip_addr), ip4_addr_get_u32(&sn_mask), ip4_addr_get_u32(&gw_addr))); + ip4_addr_get_u32(&dhcp->offered_ip_addr), ip4_addr_get_u32(&sn_mask), ip4_addr_get_u32(&gw_addr))); /* netif is now bound to DHCP leased address - set this before assigning the address to ensure the callback can use dhcp_supplied_address() */ dhcp_set_state(dhcp, DHCP_STATE_BOUND); @@ -1130,42 +1153,46 @@ dhcp_renew(struct netif *netif) err_t result; u16_t msecs; u8_t i; + struct pbuf *p_out; + u16_t options_out_len; + + LWIP_ASSERT_CORE_LOCKED(); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_renew()\n")); dhcp_set_state(dhcp, DHCP_STATE_RENEWING); /* create and initialize the DHCP message header */ - result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); - if (result == ERR_OK) { - dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); - dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); + p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len); + if (p_out != NULL) { + struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; + options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); + options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif)); - dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); + options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { - dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); + options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]); } #if LWIP_NETIF_HOSTNAME - dhcp_option_hostname(dhcp, netif); + options_out_len = dhcp_option_hostname(options_out_len, msg_out->options, netif); #endif /* LWIP_NETIF_HOSTNAME */ - /* append DHCP message trailer */ - dhcp_option_trailer(dhcp); + LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, DHCP_STATE_RENEWING, msg_out, DHCP_REQUEST, &options_out_len); + dhcp_option_trailer(options_out_len, msg_out->options, p_out); - pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); - - udp_sendto_if(dhcp_pcb, dhcp->p_out, &dhcp->server_ip_addr, DHCP_SERVER_PORT, netif); - dhcp_delete_msg(dhcp); + result = udp_sendto_if(dhcp_pcb, p_out, &dhcp->server_ip_addr, LWIP_IANA_PORT_DHCP_SERVER, netif); + pbuf_free(p_out); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_renew: RENEWING\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_renew: could not allocate DHCP request\n")); + result = ERR_MEM; } if (dhcp->tries < 255) { dhcp->tries++; } /* back-off on retries, but to a maximum of 20 seconds */ - msecs = dhcp->tries < 10 ? dhcp->tries * 2000 : 20 * 1000; - dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; + msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 2000 : 20 * 1000); + dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_renew(): set request timeout %"U16_F" msecs\n", msecs)); return result; } @@ -1182,40 +1209,44 @@ dhcp_rebind(struct netif *netif) err_t result; u16_t msecs; u8_t i; + struct pbuf *p_out; + u16_t options_out_len; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind()\n")); dhcp_set_state(dhcp, DHCP_STATE_REBINDING); /* create and initialize the DHCP message header */ - result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); - if (result == ERR_OK) { - dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); - dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); + p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len); + if (p_out != NULL) { + struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; + options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); + options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif)); - dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); + options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { - dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); + options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]); } #if LWIP_NETIF_HOSTNAME - dhcp_option_hostname(dhcp, netif); + options_out_len = dhcp_option_hostname(options_out_len, msg_out->options, netif); #endif /* LWIP_NETIF_HOSTNAME */ - dhcp_option_trailer(dhcp); - - pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); + LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, DHCP_STATE_REBINDING, msg_out, DHCP_DISCOVER, &options_out_len); + dhcp_option_trailer(options_out_len, msg_out->options, p_out); /* broadcast to server */ - udp_sendto_if(dhcp_pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); - dhcp_delete_msg(dhcp); + result = udp_sendto_if(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif); + pbuf_free(p_out); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind: REBINDING\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_rebind: could not allocate DHCP request\n")); + result = ERR_MEM; } if (dhcp->tries < 255) { dhcp->tries++; } - msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; - dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; + msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000); + dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind(): set request timeout %"U16_F" msecs\n", msecs)); return result; } @@ -1232,68 +1263,76 @@ dhcp_reboot(struct netif *netif) err_t result; u16_t msecs; u8_t i; + struct pbuf *p_out; + u16_t options_out_len; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot()\n")); dhcp_set_state(dhcp, DHCP_STATE_REBOOTING); /* create and initialize the DHCP message header */ - result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); - if (result == ERR_OK) { - dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); - dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN_MIN_REQUIRED); + p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len); + if (p_out != NULL) { + struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; + options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); + options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN_MIN_REQUIRED); - dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); - dhcp_option_long(dhcp, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); + options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4); + options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); - dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); + options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { - dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); + options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]); } - dhcp_option_trailer(dhcp); +#if LWIP_NETIF_HOSTNAME + options_out_len = dhcp_option_hostname(options_out_len, msg_out->options, netif); +#endif /* LWIP_NETIF_HOSTNAME */ - pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); + LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, DHCP_STATE_REBOOTING, msg_out, DHCP_REQUEST, &options_out_len); + dhcp_option_trailer(options_out_len, msg_out->options, p_out); /* broadcast to server */ - udp_sendto_if(dhcp_pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); - dhcp_delete_msg(dhcp); + result = udp_sendto_if(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif); + pbuf_free(p_out); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot: REBOOTING\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_reboot: could not allocate DHCP request\n")); + result = ERR_MEM; } if (dhcp->tries < 255) { dhcp->tries++; } - msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; - dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; + msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000); + dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot(): set request timeout %"U16_F" msecs\n", msecs)); return result; } - /** * @ingroup dhcp4 - * Release a DHCP lease (usually called before @ref dhcp_stop). + * Release a DHCP lease and stop DHCP statemachine (and AUTOIP if LWIP_DHCP_AUTOIP_COOP). * - * @param netif network interface which must release its lease + * @param netif network interface */ -err_t -dhcp_release(struct netif *netif) +void +dhcp_release_and_stop(struct netif *netif) { struct dhcp *dhcp = netif_dhcp_data(netif); - err_t result; ip_addr_t server_ip_addr; - u8_t is_dhcp_supplied_address; - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_release()\n")); + LWIP_ASSERT_CORE_LOCKED(); + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_release_and_stop()\n")); if (dhcp == NULL) { - return ERR_ARG; + return; } + + /* already off? -> nothing to do */ + if (dhcp->state == DHCP_STATE_OFF) { + return; + } + ip_addr_copy(server_ip_addr, dhcp->server_ip_addr); - is_dhcp_supplied_address = dhcp_supplied_address(netif); - - /* idle DHCP client */ - dhcp_set_state(dhcp, DHCP_STATE_OFF); /* clean old DHCP offer */ ip_addr_set_zero_ip4(&dhcp->server_ip_addr); ip4_addr_set_zero(&dhcp->offered_ip_addr); @@ -1305,65 +1344,68 @@ dhcp_release(struct netif *netif) dhcp->offered_t0_lease = dhcp->offered_t1_renew = dhcp->offered_t2_rebind = 0; dhcp->t1_renew_time = dhcp->t2_rebind_time = dhcp->lease_used = dhcp->t0_timeout = 0; - if (!is_dhcp_supplied_address) { - /* don't issue release message when address is not dhcp-assigned */ - return ERR_OK; + /* send release message when current IP was assigned via DHCP */ + if (dhcp_supplied_address(netif)) { + /* create and initialize the DHCP message header */ + struct pbuf *p_out; + u16_t options_out_len; + p_out = dhcp_create_msg(netif, dhcp, DHCP_RELEASE, &options_out_len); + if (p_out != NULL) { + struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; + options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_SERVER_ID, 4); + options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(ip_2_ip4(&server_ip_addr)))); + + LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, dhcp->state, msg_out, DHCP_RELEASE, &options_out_len); + dhcp_option_trailer(options_out_len, msg_out->options, p_out); + + udp_sendto_if(dhcp_pcb, p_out, &server_ip_addr, LWIP_IANA_PORT_DHCP_SERVER, netif); + pbuf_free(p_out); + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_release: RELEASED, DHCP_STATE_OFF\n")); + } else { + /* sending release failed, but that's not a problem since the correct behaviour of dhcp does not rely on release */ + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_release: could not allocate DHCP request\n")); + } } - /* create and initialize the DHCP message header */ - result = dhcp_create_msg(netif, dhcp, DHCP_RELEASE); - if (result == ERR_OK) { - dhcp_option(dhcp, DHCP_OPTION_SERVER_ID, 4); - dhcp_option_long(dhcp, lwip_ntohl(ip4_addr_get_u32(ip_2_ip4(&server_ip_addr)))); - - dhcp_option_trailer(dhcp); - - pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); - - udp_sendto_if(dhcp_pcb, dhcp->p_out, &server_ip_addr, DHCP_SERVER_PORT, netif); - dhcp_delete_msg(dhcp); - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_release: RELEASED, DHCP_STATE_OFF\n")); - } else { - /* sending release failed, but that's not a problem since the correct behaviour of dhcp does not rely on release */ - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_release: could not allocate DHCP request\n")); - } /* remove IP address from interface (prevents routing from selecting this interface) */ netif_set_addr(netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4); - return result; +#if LWIP_DHCP_AUTOIP_COOP + if (dhcp->autoip_coop_state == DHCP_AUTOIP_COOP_STATE_ON) { + autoip_stop(netif); + dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF; + } +#endif /* LWIP_DHCP_AUTOIP_COOP */ + + dhcp_set_state(dhcp, DHCP_STATE_OFF); + + if (dhcp->pcb_allocated != 0) { + dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */ + dhcp->pcb_allocated = 0; + } } /** * @ingroup dhcp4 - * Remove the DHCP client from the interface. - * - * @param netif The network interface to stop DHCP on + * This function calls dhcp_release_and_stop() internally. + * @deprecated Use dhcp_release_and_stop() instead. + */ +err_t +dhcp_release(struct netif *netif) +{ + dhcp_release_and_stop(netif); + return ERR_OK; +} + +/** + * @ingroup dhcp4 + * This function calls dhcp_release_and_stop() internally. + * @deprecated Use dhcp_release_and_stop() instead. */ void dhcp_stop(struct netif *netif) { - struct dhcp *dhcp; - LWIP_ERROR("dhcp_stop: netif != NULL", (netif != NULL), return;); - dhcp = netif_dhcp_data(netif); - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_stop()\n")); - /* netif is DHCP configured? */ - if (dhcp != NULL) { -#if LWIP_DHCP_AUTOIP_COOP - if (dhcp->autoip_coop_state == DHCP_AUTOIP_COOP_STATE_ON) { - autoip_stop(netif); - dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF; - } -#endif /* LWIP_DHCP_AUTOIP_COOP */ - - LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL); - dhcp_set_state(dhcp, DHCP_STATE_OFF); - - if (dhcp->pcb_allocated != 0) { - dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */ - dhcp->pcb_allocated = 0; - } - } + dhcp_release_and_stop(netif); } /* @@ -1386,45 +1428,49 @@ dhcp_set_state(struct dhcp *dhcp, u8_t new_state) * DHCP message. * */ -static void -dhcp_option(struct dhcp *dhcp, u8_t option_type, u8_t option_len) +static u16_t +dhcp_option(u16_t options_out_len, u8_t *options, u8_t option_type, u8_t option_len) { - LWIP_ASSERT("dhcp_option: dhcp->options_out_len + 2 + option_len <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 2U + option_len <= DHCP_OPTIONS_LEN); - dhcp->msg_out->options[dhcp->options_out_len++] = option_type; - dhcp->msg_out->options[dhcp->options_out_len++] = option_len; + LWIP_ASSERT("dhcp_option: options_out_len + 2 + option_len <= DHCP_OPTIONS_LEN", options_out_len + 2U + option_len <= DHCP_OPTIONS_LEN); + options[options_out_len++] = option_type; + options[options_out_len++] = option_len; + return options_out_len; } /* * Concatenate a single byte to the outgoing DHCP message. * */ -static void -dhcp_option_byte(struct dhcp *dhcp, u8_t value) +static u16_t +dhcp_option_byte(u16_t options_out_len, u8_t *options, u8_t value) { - LWIP_ASSERT("dhcp_option_byte: dhcp->options_out_len < DHCP_OPTIONS_LEN", dhcp->options_out_len < DHCP_OPTIONS_LEN); - dhcp->msg_out->options[dhcp->options_out_len++] = value; + LWIP_ASSERT("dhcp_option_byte: options_out_len < DHCP_OPTIONS_LEN", options_out_len < DHCP_OPTIONS_LEN); + options[options_out_len++] = value; + return options_out_len; } -static void -dhcp_option_short(struct dhcp *dhcp, u16_t value) +static u16_t +dhcp_option_short(u16_t options_out_len, u8_t *options, u16_t value) { - LWIP_ASSERT("dhcp_option_short: dhcp->options_out_len + 2 <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 2U <= DHCP_OPTIONS_LEN); - dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0xff00U) >> 8); - dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t) (value & 0x00ffU); + LWIP_ASSERT("dhcp_option_short: options_out_len + 2 <= DHCP_OPTIONS_LEN", options_out_len + 2U <= DHCP_OPTIONS_LEN); + options[options_out_len++] = (u8_t)((value & 0xff00U) >> 8); + options[options_out_len++] = (u8_t) (value & 0x00ffU); + return options_out_len; } -static void -dhcp_option_long(struct dhcp *dhcp, u32_t value) +static u16_t +dhcp_option_long(u16_t options_out_len, u8_t *options, u32_t value) { - LWIP_ASSERT("dhcp_option_long: dhcp->options_out_len + 4 <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 4U <= DHCP_OPTIONS_LEN); - dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24); - dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16); - dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8); - dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x000000ffUL)); + LWIP_ASSERT("dhcp_option_long: options_out_len + 4 <= DHCP_OPTIONS_LEN", options_out_len + 4U <= DHCP_OPTIONS_LEN); + options[options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24); + options[options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16); + options[options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8); + options[options_out_len++] = (u8_t)((value & 0x000000ffUL)); + return options_out_len; } #if LWIP_NETIF_HOSTNAME -static void -dhcp_option_hostname(struct dhcp *dhcp, struct netif *netif) +static u16_t +dhcp_option_hostname(u16_t options_out_len, u8_t *options, struct netif *netif) { if (netif->hostname != NULL) { size_t namelen = strlen(netif->hostname); @@ -1433,16 +1479,17 @@ dhcp_option_hostname(struct dhcp *dhcp, struct netif *netif) const char *p = netif->hostname; /* Shrink len to available bytes (need 2 bytes for OPTION_HOSTNAME and 1 byte for trailer) */ - size_t available = DHCP_OPTIONS_LEN - dhcp->options_out_len - 3; + size_t available = DHCP_OPTIONS_LEN - options_out_len - 3; LWIP_ASSERT("DHCP: hostname is too long!", namelen <= available); len = LWIP_MIN(namelen, available); LWIP_ASSERT("DHCP: hostname is too long!", len <= 0xFF); - dhcp_option(dhcp, DHCP_OPTION_HOSTNAME, (u8_t)len); + options_out_len = dhcp_option(options_out_len, options, DHCP_OPTION_HOSTNAME, (u8_t)len); while (len--) { - dhcp_option_byte(dhcp, *p++); + options_out_len = dhcp_option_byte(options_out_len, options, *p++); } } } + return options_out_len; } #endif /* LWIP_NETIF_HOSTNAME */ @@ -1457,7 +1504,7 @@ dhcp_option_hostname(struct dhcp *dhcp, struct netif *netif) * */ static err_t -dhcp_parse_reply(struct dhcp *dhcp, struct pbuf *p) +dhcp_parse_reply(struct pbuf *p, struct dhcp *dhcp) { u8_t *options; u16_t offset; @@ -1467,6 +1514,12 @@ dhcp_parse_reply(struct dhcp *dhcp, struct pbuf *p) struct pbuf *q; int parse_file_as_options = 0; int parse_sname_as_options = 0; + struct dhcp_msg *msg_in; +#if LWIP_DHCP_BOOTP_FILE + int file_overloaded = 0; +#endif + + LWIP_UNUSED_ARG(dhcp); /* clear received options */ dhcp_clear_all_options(dhcp); @@ -1474,7 +1527,7 @@ dhcp_parse_reply(struct dhcp *dhcp, struct pbuf *p) if (p->len < DHCP_SNAME_OFS) { return ERR_BUF; } - dhcp->msg_in = (struct dhcp_msg *)p->payload; + msg_in = (struct dhcp_msg *)p->payload; #if LWIP_DHCP_BOOTP_FILE /* clear boot file name */ dhcp->boot_file_name[0] = 0; @@ -1489,8 +1542,8 @@ dhcp_parse_reply(struct dhcp *dhcp, struct pbuf *p) again: q = p; while ((q != NULL) && (options_idx >= q->len)) { - options_idx -= q->len; - options_idx_max -= q->len; + options_idx = (u16_t)(options_idx - q->len); + options_idx_max = (u16_t)(options_idx_max - q->len); q = q->next; } if (q == NULL) { @@ -1498,41 +1551,44 @@ again: } offset = options_idx; offset_max = options_idx_max; - options = (u8_t*)q->payload; + options = (u8_t *)q->payload; /* at least 1 byte to read and no end marker, then at least 3 bytes to read? */ while ((q != NULL) && (offset < offset_max) && (options[offset] != DHCP_OPTION_END)) { u8_t op = options[offset]; u8_t len; u8_t decode_len = 0; int decode_idx = -1; - u16_t val_offset = offset + 2; + u16_t val_offset = (u16_t)(offset + 2); + if (val_offset < offset) { + /* overflow */ + return ERR_BUF; + } /* len byte might be in the next pbuf */ if ((offset + 1) < q->len) { len = options[offset + 1]; } else { - len = (q->next != NULL ? ((u8_t*)q->next->payload)[0] : 0); + len = (q->next != NULL ? ((u8_t *)q->next->payload)[0] : 0); } /* LWIP_DEBUGF(DHCP_DEBUG, ("msg_offset=%"U16_F", q->len=%"U16_F, msg_offset, q->len)); */ decode_len = len; - switch(op) { + switch (op) { /* case(DHCP_OPTION_END): handled above */ - case(DHCP_OPTION_PAD): + case (DHCP_OPTION_PAD): /* special option: no len encoded */ decode_len = len = 0; /* will be increased below */ - offset--; break; - case(DHCP_OPTION_SUBNET_MASK): + case (DHCP_OPTION_SUBNET_MASK): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); decode_idx = DHCP_OPTION_IDX_SUBNET_MASK; break; - case(DHCP_OPTION_ROUTER): + case (DHCP_OPTION_ROUTER): decode_len = 4; /* only copy the first given router */ LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); decode_idx = DHCP_OPTION_IDX_ROUTER; break; #if LWIP_DHCP_PROVIDE_DNS_SERVERS - case(DHCP_OPTION_DNS_SERVER): + case (DHCP_OPTION_DNS_SERVER): /* special case: there might be more than one server */ LWIP_ERROR("len %% 4 == 0", len % 4 == 0, return ERR_VAL;); /* limit number of DNS servers */ @@ -1541,12 +1597,12 @@ again: decode_idx = DHCP_OPTION_IDX_DNS_SERVER; break; #endif /* LWIP_DHCP_PROVIDE_DNS_SERVERS */ - case(DHCP_OPTION_LEASE_TIME): + case (DHCP_OPTION_LEASE_TIME): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); decode_idx = DHCP_OPTION_IDX_LEASE_TIME; break; #if LWIP_DHCP_GET_NTP_SRV - case(DHCP_OPTION_NTP): + case (DHCP_OPTION_NTP): /* special case: there might be more than one server */ LWIP_ERROR("len %% 4 == 0", len % 4 == 0, return ERR_VAL;); /* limit number of NTP servers */ @@ -1555,73 +1611,90 @@ again: decode_idx = DHCP_OPTION_IDX_NTP_SERVER; break; #endif /* LWIP_DHCP_GET_NTP_SRV*/ - case(DHCP_OPTION_OVERLOAD): + case (DHCP_OPTION_OVERLOAD): LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); /* decode overload only in options, not in file/sname: invalid packet */ LWIP_ERROR("overload in file/sname", options_idx == DHCP_OPTIONS_OFS, return ERR_VAL;); decode_idx = DHCP_OPTION_IDX_OVERLOAD; break; - case(DHCP_OPTION_MESSAGE_TYPE): + case (DHCP_OPTION_MESSAGE_TYPE): LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); decode_idx = DHCP_OPTION_IDX_MSG_TYPE; break; - case(DHCP_OPTION_SERVER_ID): + case (DHCP_OPTION_SERVER_ID): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); decode_idx = DHCP_OPTION_IDX_SERVER_ID; break; - case(DHCP_OPTION_T1): + case (DHCP_OPTION_T1): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); decode_idx = DHCP_OPTION_IDX_T1; break; - case(DHCP_OPTION_T2): + case (DHCP_OPTION_T2): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); decode_idx = DHCP_OPTION_IDX_T2; break; default: decode_len = 0; LWIP_DEBUGF(DHCP_DEBUG, ("skipping option %"U16_F" in options\n", (u16_t)op)); + LWIP_HOOK_DHCP_PARSE_OPTION(ip_current_netif(), dhcp, dhcp->state, msg_in, + dhcp_option_given(dhcp, DHCP_OPTION_IDX_MSG_TYPE) ? (u8_t)dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_MSG_TYPE) : 0, + op, len, q, val_offset); break; } - offset += len + 2; - if (decode_len > 0) { - u32_t value = 0; - u16_t copy_len; + if (op == DHCP_OPTION_PAD) { + offset++; + } else { + if (offset + len + 2 > 0xFFFF) { + /* overflow */ + return ERR_BUF; + } + offset = (u16_t)(offset + len + 2); + if (decode_len > 0) { + u32_t value = 0; + u16_t copy_len; decode_next: - LWIP_ASSERT("check decode_idx", decode_idx >= 0 && decode_idx < DHCP_OPTION_IDX_MAX); - if (!dhcp_option_given(dhcp, decode_idx)) { - copy_len = LWIP_MIN(decode_len, 4); - if (pbuf_copy_partial(q, &value, copy_len, val_offset) != copy_len) { - return ERR_BUF; - } - if (decode_len > 4) { - /* decode more than one u32_t */ - LWIP_ERROR("decode_len %% 4 == 0", decode_len % 4 == 0, return ERR_VAL;); + LWIP_ASSERT("check decode_idx", decode_idx >= 0 && decode_idx < DHCP_OPTION_IDX_MAX); + if (!dhcp_option_given(dhcp, decode_idx)) { + copy_len = LWIP_MIN(decode_len, 4); + if (pbuf_copy_partial(q, &value, copy_len, val_offset) != copy_len) { + return ERR_BUF; + } + if (decode_len > 4) { + /* decode more than one u32_t */ + u16_t next_val_offset; + LWIP_ERROR("decode_len %% 4 == 0", decode_len % 4 == 0, return ERR_VAL;); + dhcp_got_option(dhcp, decode_idx); + dhcp_set_option_value(dhcp, decode_idx, lwip_htonl(value)); + decode_len = (u8_t)(decode_len - 4); + next_val_offset = (u16_t)(val_offset + 4); + if (next_val_offset < val_offset) { + /* overflow */ + return ERR_BUF; + } + val_offset = next_val_offset; + decode_idx++; + goto decode_next; + } else if (decode_len == 4) { + value = lwip_ntohl(value); + } else { + LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;); + value = ((u8_t *)&value)[0]; + } dhcp_got_option(dhcp, decode_idx); - dhcp_set_option_value(dhcp, decode_idx, lwip_htonl(value)); - decode_len -= 4; - val_offset += 4; - decode_idx++; - goto decode_next; - } else if (decode_len == 4) { - value = lwip_ntohl(value); - } else { - LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;); - value = ((u8_t*)&value)[0]; + dhcp_set_option_value(dhcp, decode_idx, value); } - dhcp_got_option(dhcp, decode_idx); - dhcp_set_option_value(dhcp, decode_idx, value); } } if (offset >= q->len) { - offset -= q->len; - offset_max -= q->len; - if ((offset < offset_max) && offset_max) { + offset = (u16_t)(offset - q->len); + offset_max = (u16_t)(offset_max - q->len); + if (offset < offset_max) { q = q->next; LWIP_ERROR("next pbuf was null", q != NULL, return ERR_VAL;); - options = (u8_t*)q->payload; + options = (u8_t *)q->payload; } else { /* We've run out of bytes, probably no end marker. Don't proceed. */ - break; + return ERR_BUF; } } } @@ -1642,25 +1715,15 @@ decode_next: } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("invalid overload option: %d\n", (int)overload)); } -#if LWIP_DHCP_BOOTP_FILE - if (!parse_file_as_options) { - /* only do this for ACK messages */ - if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_MSG_TYPE) && - (dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_MSG_TYPE) == DHCP_ACK)) - /* copy bootp file name, don't care for sname (server hostname) */ - if (pbuf_copy_partial(p, dhcp->boot_file_name, DHCP_FILE_LEN-1, DHCP_FILE_OFS) != (DHCP_FILE_LEN-1)) { - return ERR_BUF; - } - /* make sure the string is really NULL-terminated */ - dhcp->boot_file_name[DHCP_FILE_LEN-1] = 0; - } -#endif /* LWIP_DHCP_BOOTP_FILE */ } if (parse_file_as_options) { /* if both are overloaded, parse file first and then sname (RFC 2131 ch. 4.1) */ parse_file_as_options = 0; options_idx = DHCP_FILE_OFS; options_idx_max = DHCP_FILE_OFS + DHCP_FILE_LEN; +#if LWIP_DHCP_BOOTP_FILE + file_overloaded = 1; +#endif goto again; } else if (parse_sname_as_options) { parse_sname_as_options = 0; @@ -1668,6 +1731,19 @@ decode_next: options_idx_max = DHCP_SNAME_OFS + DHCP_SNAME_LEN; goto again; } +#if LWIP_DHCP_BOOTP_FILE + if (!file_overloaded) { + /* only do this for ACK messages */ + if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_MSG_TYPE) && + (dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_MSG_TYPE) == DHCP_ACK)) + /* copy bootp file name, don't care for sname (server hostname) */ + if (pbuf_copy_partial(p, dhcp->boot_file_name, DHCP_FILE_LEN-1, DHCP_FILE_OFS) != (DHCP_FILE_LEN-1)) { + return ERR_BUF; + } + /* make sure the string is really NULL-terminated */ + dhcp->boot_file_name[DHCP_FILE_LEN-1] = 0; + } +#endif /* LWIP_DHCP_BOOTP_FILE */ return ERR_OK; } @@ -1682,6 +1758,7 @@ dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, struct dhcp_msg *reply_msg = (struct dhcp_msg *)p->payload; u8_t msg_type; u8_t i; + struct dhcp_msg *msg_in; LWIP_UNUSED_ARG(arg); @@ -1692,8 +1769,8 @@ dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, LWIP_ASSERT("invalid server address type", IP_IS_V4(addr)); - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_recv(pbuf = %p) from DHCP server %"U16_F".%"U16_F".%"U16_F".%"U16_F" port %"U16_F"\n", (void*)p, - ip4_addr1_16(ip_2_ip4(addr)), ip4_addr2_16(ip_2_ip4(addr)), ip4_addr3_16(ip_2_ip4(addr)), ip4_addr4_16(ip_2_ip4(addr)), port)); + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_recv(pbuf = %p) from DHCP server %"U16_F".%"U16_F".%"U16_F".%"U16_F" port %"U16_F"\n", (void *)p, + ip4_addr1_16(ip_2_ip4(addr)), ip4_addr2_16(ip_2_ip4(addr)), ip4_addr3_16(ip_2_ip4(addr)), ip4_addr4_16(ip_2_ip4(addr)), port)); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("pbuf->len = %"U16_F"\n", p->len)); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("pbuf->tot_len = %"U16_F"\n", p->tot_len)); /* prevent warnings about unused arguments */ @@ -1701,8 +1778,6 @@ dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, LWIP_UNUSED_ARG(addr); LWIP_UNUSED_ARG(port); - LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL); - if (p->len < DHCP_MIN_REPLY_LEN) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("DHCP reply message or pbuf too short\n")); goto free_pbuf_and_return; @@ -1713,24 +1788,24 @@ dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, goto free_pbuf_and_return; } /* iterate through hardware address and match against DHCP message */ - for (i = 0; i < netif->hwaddr_len && i < NETIF_MAX_HWADDR_LEN && i < DHCP_CHADDR_LEN; i++) { + for (i = 0; i < netif->hwaddr_len && i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) { if (netif->hwaddr[i] != reply_msg->chaddr[i]) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, - ("netif->hwaddr[%"U16_F"]==%02"X16_F" != reply_msg->chaddr[%"U16_F"]==%02"X16_F"\n", - (u16_t)i, (u16_t)netif->hwaddr[i], (u16_t)i, (u16_t)reply_msg->chaddr[i])); + ("netif->hwaddr[%"U16_F"]==%02"X16_F" != reply_msg->chaddr[%"U16_F"]==%02"X16_F"\n", + (u16_t)i, (u16_t)netif->hwaddr[i], (u16_t)i, (u16_t)reply_msg->chaddr[i])); goto free_pbuf_and_return; } } /* match transaction ID against what we expected */ if (lwip_ntohl(reply_msg->xid) != dhcp->xid) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, - ("transaction id mismatch reply_msg->xid(%"X32_F")!=dhcp->xid(%"X32_F")\n",lwip_ntohl(reply_msg->xid),dhcp->xid)); + ("transaction id mismatch reply_msg->xid(%"X32_F")!=dhcp->xid(%"X32_F")\n", lwip_ntohl(reply_msg->xid), dhcp->xid)); goto free_pbuf_and_return; } /* option fields could be unfold? */ - if (dhcp_parse_reply(dhcp, p) != ERR_OK) { + if (dhcp_parse_reply(p, dhcp) != ERR_OK) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, - ("problem unfolding DHCP message - too short on memory?\n")); + ("problem unfolding DHCP message - too short on memory?\n")); goto free_pbuf_and_return; } @@ -1741,6 +1816,7 @@ dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, goto free_pbuf_and_return; } + msg_in = (struct dhcp_msg *)p->payload; /* read DHCP message type */ msg_type = (u8_t)dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_MSG_TYPE); /* message type is DHCP ACK? */ @@ -1748,7 +1824,7 @@ dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_ACK received\n")); /* in requesting state? */ if (dhcp->state == DHCP_STATE_REQUESTING) { - dhcp_handle_ack(netif); + dhcp_handle_ack(netif, msg_in); #if DHCP_DOES_ARP_CHECK if ((netif->flags & NETIF_FLAG_ETHARP) != 0) { /* check if the acknowledged lease address is already in use */ @@ -1765,29 +1841,25 @@ dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, /* already bound to the given lease address? */ else if ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING)) { - dhcp_handle_ack(netif); + dhcp_handle_ack(netif, msg_in); dhcp_bind(netif); } } /* received a DHCP_NAK in appropriate state? */ else if ((msg_type == DHCP_NAK) && - ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) || - (dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) { + ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) || + (dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_NAK received\n")); dhcp_handle_nak(netif); } /* received a DHCP_OFFER in DHCP_STATE_SELECTING state? */ else if ((msg_type == DHCP_OFFER) && (dhcp->state == DHCP_STATE_SELECTING)) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_OFFER received in DHCP_STATE_SELECTING state\n")); - dhcp->request_timeout = 0; /* remember offered lease */ - dhcp_handle_offer(netif); + dhcp_handle_offer(netif, msg_in); } free_pbuf_and_return: - if (dhcp != NULL) { - dhcp->msg_in = NULL; - } pbuf_free(p); } @@ -1798,10 +1870,14 @@ free_pbuf_and_return: * @param dhcp dhcp control struct * @param message_type message type of the request */ -static err_t -dhcp_create_msg(struct netif *netif, struct dhcp *dhcp, u8_t message_type) +static struct pbuf * +dhcp_create_msg(struct netif *netif, struct dhcp *dhcp, u8_t message_type, u16_t *options_out_len) { u16_t i; + struct pbuf *p_out; + struct dhcp_msg *msg_out; + u16_t options_out_len_loc; + #ifndef DHCP_GLOBAL_XID /** default global transaction identifier starting value (easy to match * with a packet analyser). We simply increment for each new request. @@ -1818,18 +1894,16 @@ dhcp_create_msg(struct netif *netif, struct dhcp *dhcp, u8_t message_type) xid_initialised = !xid_initialised; } #endif - LWIP_ERROR("dhcp_create_msg: netif != NULL", (netif != NULL), return ERR_ARG;); - LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return ERR_VAL;); - LWIP_ASSERT("dhcp_create_msg: dhcp->p_out == NULL", dhcp->p_out == NULL); - LWIP_ASSERT("dhcp_create_msg: dhcp->msg_out == NULL", dhcp->msg_out == NULL); - dhcp->p_out = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct dhcp_msg), PBUF_RAM); - if (dhcp->p_out == NULL) { + LWIP_ERROR("dhcp_create_msg: netif != NULL", (netif != NULL), return NULL;); + LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return NULL;); + p_out = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct dhcp_msg), PBUF_RAM); + if (p_out == NULL) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, - ("dhcp_create_msg(): could not allocate pbuf\n")); - return ERR_MEM; + ("dhcp_create_msg(): could not allocate pbuf\n")); + return NULL; } LWIP_ASSERT("dhcp_create_msg: check that first pbuf can hold struct dhcp_msg", - (dhcp->p_out->len >= sizeof(struct dhcp_msg))); + (p_out->len >= sizeof(struct dhcp_msg))); /* DHCP_REQUEST should reuse 'xid' from DHCPOFFER */ if ((message_type != DHCP_REQUEST) || (dhcp->state == DHCP_STATE_REBOOTING)) { @@ -1846,66 +1920,34 @@ dhcp_create_msg(struct netif *netif, struct dhcp *dhcp, u8_t message_type) LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("transaction id xid(%"X32_F")\n", xid)); - dhcp->msg_out = (struct dhcp_msg *)dhcp->p_out->payload; + msg_out = (struct dhcp_msg *)p_out->payload; + memset(msg_out, 0, sizeof(struct dhcp_msg)); - dhcp->msg_out->op = DHCP_BOOTREQUEST; + msg_out->op = DHCP_BOOTREQUEST; /* @todo: make link layer independent */ - dhcp->msg_out->htype = DHCP_HTYPE_ETH; - dhcp->msg_out->hlen = netif->hwaddr_len; - dhcp->msg_out->hops = 0; - dhcp->msg_out->xid = lwip_htonl(dhcp->xid); - dhcp->msg_out->secs = 0; + msg_out->htype = LWIP_IANA_HWTYPE_ETHERNET; + msg_out->hlen = netif->hwaddr_len; + msg_out->xid = lwip_htonl(dhcp->xid); /* we don't need the broadcast flag since we can receive unicast traffic before being fully configured! */ - dhcp->msg_out->flags = 0; - ip4_addr_set_zero(&dhcp->msg_out->ciaddr); /* set ciaddr to netif->ip_addr based on message_type and state */ if ((message_type == DHCP_INFORM) || (message_type == DHCP_DECLINE) || (message_type == DHCP_RELEASE) || ((message_type == DHCP_REQUEST) && /* DHCP_STATE_BOUND not used for sending! */ - ((dhcp->state== DHCP_STATE_RENEWING) || dhcp->state== DHCP_STATE_REBINDING))) { - ip4_addr_copy(dhcp->msg_out->ciaddr, *netif_ip4_addr(netif)); + ((dhcp->state == DHCP_STATE_RENEWING) || dhcp->state == DHCP_STATE_REBINDING))) { + ip4_addr_copy(msg_out->ciaddr, *netif_ip4_addr(netif)); } - ip4_addr_set_zero(&dhcp->msg_out->yiaddr); - ip4_addr_set_zero(&dhcp->msg_out->siaddr); - ip4_addr_set_zero(&dhcp->msg_out->giaddr); - for (i = 0; i < DHCP_CHADDR_LEN; i++) { - /* copy netif hardware address, pad with zeroes */ - dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len && i < NETIF_MAX_HWADDR_LEN) ? netif->hwaddr[i] : 0/* pad byte*/; - } - for (i = 0; i < DHCP_SNAME_LEN; i++) { - dhcp->msg_out->sname[i] = 0; - } - for (i = 0; i < DHCP_FILE_LEN; i++) { - dhcp->msg_out->file[i] = 0; - } - dhcp->msg_out->cookie = PP_HTONL(DHCP_MAGIC_COOKIE); - dhcp->options_out_len = 0; - /* fill options field with an incrementing array (for debugging purposes) */ - for (i = 0; i < DHCP_OPTIONS_LEN; i++) { - dhcp->msg_out->options[i] = (u8_t)i; /* for debugging only, no matter if truncated */ + for (i = 0; i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) { + /* copy netif hardware address (padded with zeroes through memset already) */ + msg_out->chaddr[i] = netif->hwaddr[i]; } + msg_out->cookie = PP_HTONL(DHCP_MAGIC_COOKIE); /* Add option MESSAGE_TYPE */ - dhcp_option(dhcp, DHCP_OPTION_MESSAGE_TYPE, DHCP_OPTION_MESSAGE_TYPE_LEN); - dhcp_option_byte(dhcp, message_type); - return ERR_OK; -} - -/** - * Free previously allocated memory used to send a DHCP request. - * - * @param dhcp the dhcp struct to free the request from - */ -static void -dhcp_delete_msg(struct dhcp *dhcp) -{ - LWIP_ERROR("dhcp_delete_msg: dhcp != NULL", (dhcp != NULL), return;); - LWIP_ASSERT("dhcp_delete_msg: dhcp->p_out != NULL", dhcp->p_out != NULL); - LWIP_ASSERT("dhcp_delete_msg: dhcp->msg_out != NULL", dhcp->msg_out != NULL); - if (dhcp->p_out != NULL) { - pbuf_free(dhcp->p_out); + options_out_len_loc = dhcp_option(0, msg_out->options, DHCP_OPTION_MESSAGE_TYPE, DHCP_OPTION_MESSAGE_TYPE_LEN); + options_out_len_loc = dhcp_option_byte(options_out_len_loc, msg_out->options, message_type); + if (options_out_len) { + *options_out_len = options_out_len_loc; } - dhcp->p_out = NULL; - dhcp->msg_out = NULL; + return p_out; } /** @@ -1913,22 +1955,19 @@ dhcp_delete_msg(struct dhcp *dhcp) * * Adds the END option to the DHCP message, and if * necessary, up to three padding bytes. - * - * @param dhcp DHCP state structure */ static void -dhcp_option_trailer(struct dhcp *dhcp) +dhcp_option_trailer(u16_t options_out_len, u8_t *options, struct pbuf *p_out) { - LWIP_ERROR("dhcp_option_trailer: dhcp != NULL", (dhcp != NULL), return;); - LWIP_ASSERT("dhcp_option_trailer: dhcp->msg_out != NULL\n", dhcp->msg_out != NULL); - LWIP_ASSERT("dhcp_option_trailer: dhcp->options_out_len < DHCP_OPTIONS_LEN\n", dhcp->options_out_len < DHCP_OPTIONS_LEN); - dhcp->msg_out->options[dhcp->options_out_len++] = DHCP_OPTION_END; + options[options_out_len++] = DHCP_OPTION_END; /* packet is too small, or not 4 byte aligned? */ - while (((dhcp->options_out_len < DHCP_MIN_OPTIONS_LEN) || (dhcp->options_out_len & 3)) && - (dhcp->options_out_len < DHCP_OPTIONS_LEN)) { + while (((options_out_len < DHCP_MIN_OPTIONS_LEN) || (options_out_len & 3)) && + (options_out_len < DHCP_OPTIONS_LEN)) { /* add a fill/padding byte */ - dhcp->msg_out->options[dhcp->options_out_len++] = 0; + options[options_out_len++] = 0; } + /* shrink the pbuf to the actual content length */ + pbuf_realloc(p_out, (u16_t)(sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + options_out_len)); } /** check if DHCP supplied netif->ip_addr @@ -1941,7 +1980,7 @@ u8_t dhcp_supplied_address(const struct netif *netif) { if ((netif != NULL) && (netif_dhcp_data(netif) != NULL)) { - struct dhcp* dhcp = netif_dhcp_data(netif); + struct dhcp *dhcp = netif_dhcp_data(netif); return (dhcp->state == DHCP_STATE_BOUND) || (dhcp->state == DHCP_STATE_RENEWING) || (dhcp->state == DHCP_STATE_REBINDING); } diff --git a/Libraries/LwIP/src/core/ipv4/etharp.c b/Libraries/LwIP/src/core/ipv4/etharp.c index a5df46b..570aaa3 100755 --- a/Libraries/LwIP/src/core/ipv4/etharp.c +++ b/Libraries/LwIP/src/core/ipv4/etharp.c @@ -45,13 +45,14 @@ #include "lwip/opt.h" -#if LWIP_ARP || LWIP_ETHERNET +#if LWIP_IPV4 && LWIP_ARP /* don't build if not configured for use in lwipopts.h */ #include "lwip/etharp.h" #include "lwip/stats.h" #include "lwip/snmp.h" #include "lwip/dhcp.h" #include "lwip/autoip.h" +#include "lwip/prot/iana.h" #include "netif/ethernet.h" #include @@ -60,8 +61,6 @@ #include LWIP_HOOK_FILENAME #endif -#if LWIP_IPV4 && LWIP_ARP /* don't build if not configured for use in lwipopts.h */ - /** Re-request a used ARP entry 1 minute before it would expire to prevent * breaking a steadily used connection because the ARP entry timed out. */ #define ARP_AGE_REREQUEST_USED_UNICAST (ARP_MAXAGE - 30) @@ -84,7 +83,7 @@ enum etharp_state { ETHARP_STATE_STABLE_REREQUESTING_1, ETHARP_STATE_STABLE_REREQUESTING_2 #if ETHARP_SUPPORT_STATIC_ENTRIES - ,ETHARP_STATE_STATIC + , ETHARP_STATE_STATIC #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ }; @@ -106,7 +105,7 @@ struct etharp_entry { static struct etharp_entry arp_table[ARP_TABLE_SIZE]; #if !LWIP_NETIF_HWADDRHINT -static u8_t etharp_cached_entry; +static netif_addr_idx_t etharp_cached_entry; #endif /* !LWIP_NETIF_HWADDRHINT */ /** Try hard to create a new entry - we want the IP address to appear in @@ -118,20 +117,20 @@ static u8_t etharp_cached_entry; #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ #if LWIP_NETIF_HWADDRHINT -#define ETHARP_SET_HINT(netif, hint) if (((netif) != NULL) && ((netif)->addr_hint != NULL)) \ - *((netif)->addr_hint) = (hint); +#define ETHARP_SET_ADDRHINT(netif, addrhint) do { if (((netif) != NULL) && ((netif)->hints != NULL)) { \ + (netif)->hints->addr_hint = (addrhint); }} while(0) #else /* LWIP_NETIF_HWADDRHINT */ -#define ETHARP_SET_HINT(netif, hint) (etharp_cached_entry = (hint)) +#define ETHARP_SET_ADDRHINT(netif, addrhint) (etharp_cached_entry = (addrhint)) #endif /* LWIP_NETIF_HWADDRHINT */ -/* Some checks, instead of etharp_init(): */ -#if (LWIP_ARP && (ARP_TABLE_SIZE > 0x7f)) - #error "ARP_TABLE_SIZE must fit in an s8_t, you have to reduce it in your lwipopts.h" +/* Check for maximum ARP_TABLE_SIZE */ +#if (ARP_TABLE_SIZE > NETIF_ADDR_IDX_MAX) +#error "ARP_TABLE_SIZE must fit in an s16_t, you have to reduce it in your lwipopts.h" #endif -static err_t etharp_request_dst(struct netif *netif, const ip4_addr_t *ipaddr, const struct eth_addr* hw_dst_addr); +static err_t etharp_request_dst(struct netif *netif, const ip4_addr_t *ipaddr, const struct eth_addr *hw_dst_addr); static err_t etharp_raw(struct netif *netif, const struct eth_addr *ethsrc_addr, const struct eth_addr *ethdst_addr, const struct eth_addr *hwsrc_addr, const ip4_addr_t *ipsrc_addr, @@ -149,7 +148,6 @@ free_etharp_q(struct etharp_q_entry *q) { struct etharp_q_entry *r; LWIP_ASSERT("q != NULL", q != NULL); - LWIP_ASSERT("q->p != NULL", q->p != NULL); while (q) { r = q; q = q->next; @@ -198,7 +196,7 @@ etharp_free_entry(int i) void etharp_tmr(void) { - u8_t i; + int i; LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_timer\n")); /* remove expired entries from the ARP table */ @@ -206,16 +204,16 @@ etharp_tmr(void) u8_t state = arp_table[i].state; if (state != ETHARP_STATE_EMPTY #if ETHARP_SUPPORT_STATIC_ENTRIES - && (state != ETHARP_STATE_STATIC) + && (state != ETHARP_STATE_STATIC) #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ - ) { + ) { arp_table[i].ctime++; if ((arp_table[i].ctime >= ARP_MAXAGE) || ((arp_table[i].state == ETHARP_STATE_PENDING) && (arp_table[i].ctime >= ARP_MAXPENDING))) { /* pending or stable entry has become old! */ - LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_timer: expired %s entry %"U16_F".\n", - arp_table[i].state >= ETHARP_STATE_STABLE ? "stable" : "pending", (u16_t)i)); + LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_timer: expired %s entry %d.\n", + arp_table[i].state >= ETHARP_STATE_STABLE ? "stable" : "pending", i)); /* clean up entries that have just been expired */ etharp_free_entry(i); } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_1) { @@ -254,14 +252,14 @@ etharp_tmr(void) * @return The ARP entry index that matched or is created, ERR_MEM if no * entry is found or could be recycled. */ -static s8_t -etharp_find_entry(const ip4_addr_t *ipaddr, u8_t flags, struct netif* netif) +static s16_t +etharp_find_entry(const ip4_addr_t *ipaddr, u8_t flags, struct netif *netif) { - s8_t old_pending = ARP_TABLE_SIZE, old_stable = ARP_TABLE_SIZE; - s8_t empty = ARP_TABLE_SIZE; - u8_t i = 0; + s16_t old_pending = ARP_TABLE_SIZE, old_stable = ARP_TABLE_SIZE; + s16_t empty = ARP_TABLE_SIZE; + s16_t i = 0; /* oldest entry with packets on queue */ - s8_t old_queue = ARP_TABLE_SIZE; + s16_t old_queue = ARP_TABLE_SIZE; /* its age */ u16_t age_queue = 0, age_pending = 0, age_stable = 0; @@ -286,19 +284,19 @@ etharp_find_entry(const ip4_addr_t *ipaddr, u8_t flags, struct netif* netif) u8_t state = arp_table[i].state; /* no empty entry found yet and now we do find one? */ if ((empty == ARP_TABLE_SIZE) && (state == ETHARP_STATE_EMPTY)) { - LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_find_entry: found empty entry %"U16_F"\n", (u16_t)i)); + LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_find_entry: found empty entry %d\n", (int)i)); /* remember first empty entry */ empty = i; } else if (state != ETHARP_STATE_EMPTY) { LWIP_ASSERT("state == ETHARP_STATE_PENDING || state >= ETHARP_STATE_STABLE", - state == ETHARP_STATE_PENDING || state >= ETHARP_STATE_STABLE); + state == ETHARP_STATE_PENDING || state >= ETHARP_STATE_STABLE); /* if given, does IP address match IP address in ARP entry? */ if (ipaddr && ip4_addr_cmp(ipaddr, &arp_table[i].ipaddr) #if ETHARP_TABLE_MATCH_NETIF && ((netif == NULL) || (netif == arp_table[i].netif)) #endif /* ETHARP_TABLE_MATCH_NETIF */ - ) { - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: found matching entry %"U16_F"\n", (u16_t)i)); + ) { + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: found matching entry %d\n", (int)i)); /* found exact IP address match, simply bail out */ return i; } @@ -311,14 +309,14 @@ etharp_find_entry(const ip4_addr_t *ipaddr, u8_t flags, struct netif* netif) age_queue = arp_table[i].ctime; } } else - /* pending without queued packets? */ + /* pending without queued packets? */ { if (arp_table[i].ctime >= age_pending) { old_pending = i; age_pending = arp_table[i].ctime; } } - /* stable entry? */ + /* stable entry? */ } else if (state >= ETHARP_STATE_STABLE) { #if ETHARP_SUPPORT_STATIC_ENTRIES /* don't record old_stable for static entries since they never expire */ @@ -341,7 +339,7 @@ etharp_find_entry(const ip4_addr_t *ipaddr, u8_t flags, struct netif* netif) /* or no empty entry found and not allowed to recycle? */ ((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_FLAG_TRY_HARD) == 0))) { LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: no empty entry found and not allowed to recycle\n")); - return (s8_t)ERR_MEM; + return (s16_t)ERR_MEM; } /* b) choose the least destructive entry to recycle: @@ -356,29 +354,29 @@ etharp_find_entry(const ip4_addr_t *ipaddr, u8_t flags, struct netif* netif) /* 1) empty entry available? */ if (empty < ARP_TABLE_SIZE) { i = empty; - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting empty entry %"U16_F"\n", (u16_t)i)); + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting empty entry %d\n", (int)i)); } else { /* 2) found recyclable stable entry? */ if (old_stable < ARP_TABLE_SIZE) { /* recycle oldest stable*/ i = old_stable; - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest stable entry %"U16_F"\n", (u16_t)i)); + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest stable entry %d\n", (int)i)); /* no queued packets should exist on stable entries */ LWIP_ASSERT("arp_table[i].q == NULL", arp_table[i].q == NULL); - /* 3) found recyclable pending entry without queued packets? */ + /* 3) found recyclable pending entry without queued packets? */ } else if (old_pending < ARP_TABLE_SIZE) { /* recycle oldest pending */ i = old_pending; - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest pending entry %"U16_F" (without queue)\n", (u16_t)i)); - /* 4) found recyclable pending entry with queued packets? */ + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest pending entry %d (without queue)\n", (int)i)); + /* 4) found recyclable pending entry with queued packets? */ } else if (old_queue < ARP_TABLE_SIZE) { /* recycle oldest pending (queued packets are free in etharp_free_entry) */ i = old_queue; - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest pending entry %"U16_F", freeing packet queue %p\n", (u16_t)i, (void *)(arp_table[i].q))); + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest pending entry %d, freeing packet queue %p\n", (int)i, (void *)(arp_table[i].q))); /* no empty or recyclable entries found */ } else { LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: no empty or recyclable entries found\n")); - return (s8_t)ERR_MEM; + return (s16_t)ERR_MEM; } /* { empty or recyclable entry found } */ @@ -388,7 +386,7 @@ etharp_find_entry(const ip4_addr_t *ipaddr, u8_t flags, struct netif* netif) LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE); LWIP_ASSERT("arp_table[i].state == ETHARP_STATE_EMPTY", - arp_table[i].state == ETHARP_STATE_EMPTY); + arp_table[i].state == ETHARP_STATE_EMPTY); /* IP address given? */ if (ipaddr != NULL) { @@ -398,8 +396,8 @@ etharp_find_entry(const ip4_addr_t *ipaddr, u8_t flags, struct netif* netif) arp_table[i].ctime = 0; #if ETHARP_TABLE_MATCH_NETIF arp_table[i].netif = netif; -#endif /* ETHARP_TABLE_MATCH_NETIF*/ - return (err_t)i; +#endif /* ETHARP_TABLE_MATCH_NETIF */ + return (s16_t)i; } /** @@ -423,12 +421,12 @@ etharp_find_entry(const ip4_addr_t *ipaddr, u8_t flags, struct netif* netif) static err_t etharp_update_arp_entry(struct netif *netif, const ip4_addr_t *ipaddr, struct eth_addr *ethaddr, u8_t flags) { - s8_t i; + s16_t i; LWIP_ASSERT("netif->hwaddr_len == ETH_HWADDR_LEN", netif->hwaddr_len == ETH_HWADDR_LEN); LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_update_arp_entry: %"U16_F".%"U16_F".%"U16_F".%"U16_F" - %02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F"\n", - ip4_addr1_16(ipaddr), ip4_addr2_16(ipaddr), ip4_addr3_16(ipaddr), ip4_addr4_16(ipaddr), - (u16_t)ethaddr->addr[0], (u16_t)ethaddr->addr[1], (u16_t)ethaddr->addr[2], - (u16_t)ethaddr->addr[3], (u16_t)ethaddr->addr[4], (u16_t)ethaddr->addr[5])); + ip4_addr1_16(ipaddr), ip4_addr2_16(ipaddr), ip4_addr3_16(ipaddr), ip4_addr4_16(ipaddr), + (u16_t)ethaddr->addr[0], (u16_t)ethaddr->addr[1], (u16_t)ethaddr->addr[2], + (u16_t)ethaddr->addr[3], (u16_t)ethaddr->addr[4], (u16_t)ethaddr->addr[5])); /* non-unicast address? */ if (ip4_addr_isany(ipaddr) || ip4_addr_isbroadcast(ipaddr, netif) || @@ -462,9 +460,9 @@ etharp_update_arp_entry(struct netif *netif, const ip4_addr_t *ipaddr, struct et /* insert in SNMP ARP index tree */ mib2_add_arp_entry(netif, &arp_table[i].ipaddr); - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_update_arp_entry: updating stable entry %"S16_F"\n", (s16_t)i)); + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_update_arp_entry: updating stable entry %"S16_F"\n", i)); /* update address */ - ETHADDR32_COPY(&arp_table[i].ethaddr, ethaddr); + SMEMCPY(&arp_table[i].ethaddr, ethaddr, ETH_HWADDR_LEN); /* reset time stamp */ arp_table[i].ctime = 0; /* this is where we will send out queued packets! */ @@ -485,7 +483,7 @@ etharp_update_arp_entry(struct netif *netif, const ip4_addr_t *ipaddr, struct et arp_table[i].q = NULL; #endif /* ARP_QUEUEING */ /* send the queued IP packet */ - ethernet_output(netif, p, (struct eth_addr*)(netif->hwaddr), ethaddr, ETHTYPE_IP); + ethernet_output(netif, p, (struct eth_addr *)(netif->hwaddr), ethaddr, ETHTYPE_IP); /* free the queued IP packet */ pbuf_free(p); } @@ -505,10 +503,11 @@ err_t etharp_add_static_entry(const ip4_addr_t *ipaddr, struct eth_addr *ethaddr) { struct netif *netif; + LWIP_ASSERT_CORE_LOCKED(); LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_add_static_entry: %"U16_F".%"U16_F".%"U16_F".%"U16_F" - %02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F"\n", - ip4_addr1_16(ipaddr), ip4_addr2_16(ipaddr), ip4_addr3_16(ipaddr), ip4_addr4_16(ipaddr), - (u16_t)ethaddr->addr[0], (u16_t)ethaddr->addr[1], (u16_t)ethaddr->addr[2], - (u16_t)ethaddr->addr[3], (u16_t)ethaddr->addr[4], (u16_t)ethaddr->addr[5])); + ip4_addr1_16(ipaddr), ip4_addr2_16(ipaddr), ip4_addr3_16(ipaddr), ip4_addr4_16(ipaddr), + (u16_t)ethaddr->addr[0], (u16_t)ethaddr->addr[1], (u16_t)ethaddr->addr[2], + (u16_t)ethaddr->addr[3], (u16_t)ethaddr->addr[4], (u16_t)ethaddr->addr[5])); netif = ip4_route(ipaddr); if (netif == NULL) { @@ -529,9 +528,10 @@ etharp_add_static_entry(const ip4_addr_t *ipaddr, struct eth_addr *ethaddr) err_t etharp_remove_static_entry(const ip4_addr_t *ipaddr) { - s8_t i; + s16_t i; + LWIP_ASSERT_CORE_LOCKED(); LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_remove_static_entry: %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - ip4_addr1_16(ipaddr), ip4_addr2_16(ipaddr), ip4_addr3_16(ipaddr), ip4_addr4_16(ipaddr))); + ip4_addr1_16(ipaddr), ip4_addr2_16(ipaddr), ip4_addr3_16(ipaddr), ip4_addr4_16(ipaddr))); /* find or create ARP entry */ i = etharp_find_entry(ipaddr, ETHARP_FLAG_FIND_ONLY, NULL); @@ -558,7 +558,7 @@ etharp_remove_static_entry(const ip4_addr_t *ipaddr) void etharp_cleanup_netif(struct netif *netif) { - u8_t i; + int i; for (i = 0; i < ARP_TABLE_SIZE; ++i) { u8_t state = arp_table[i].state; @@ -579,22 +579,22 @@ etharp_cleanup_netif(struct netif *netif) * @param ip_ret points to return pointer * @return table index if found, -1 otherwise */ -s8_t +ssize_t etharp_find_addr(struct netif *netif, const ip4_addr_t *ipaddr, - struct eth_addr **eth_ret, const ip4_addr_t **ip_ret) + struct eth_addr **eth_ret, const ip4_addr_t **ip_ret) { - s8_t i; + s16_t i; LWIP_ASSERT("eth_ret != NULL && ip_ret != NULL", - eth_ret != NULL && ip_ret != NULL); + eth_ret != NULL && ip_ret != NULL); LWIP_UNUSED_ARG(netif); i = etharp_find_entry(ipaddr, ETHARP_FLAG_FIND_ONLY, netif); if ((i >= 0) && (arp_table[i].state >= ETHARP_STATE_STABLE)) { - *eth_ret = &arp_table[i].ethaddr; - *ip_ret = &arp_table[i].ipaddr; - return i; + *eth_ret = &arp_table[i].ethaddr; + *ip_ret = &arp_table[i].ipaddr; + return i; } return -1; } @@ -608,14 +608,14 @@ etharp_find_addr(struct netif *netif, const ip4_addr_t *ipaddr, * @param eth_ret return value: ETH address * @return 1 on valid index, 0 otherwise */ -u8_t -etharp_get_entry(u8_t i, ip4_addr_t **ipaddr, struct netif **netif, struct eth_addr **eth_ret) +int +etharp_get_entry(size_t i, ip4_addr_t **ipaddr, struct netif **netif, struct eth_addr **eth_ret) { LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL); LWIP_ASSERT("netif != NULL", netif != NULL); LWIP_ASSERT("eth_ret != NULL", eth_ret != NULL); - if((i < ARP_TABLE_SIZE) && (arp_table[i].state >= ETHARP_STATE_STABLE)) { + if ((i < ARP_TABLE_SIZE) && (arp_table[i].state >= ETHARP_STATE_STABLE)) { *ipaddr = &arp_table[i].ipaddr; *netif = arp_table[i].netif; *eth_ret = &arp_table[i].ethaddr; @@ -645,18 +645,20 @@ etharp_input(struct pbuf *p, struct netif *netif) ip4_addr_t sipaddr, dipaddr; u8_t for_us; + LWIP_ASSERT_CORE_LOCKED(); + LWIP_ERROR("netif != NULL", (netif != NULL), return;); hdr = (struct etharp_hdr *)p->payload; /* RFC 826 "Packet Reception": */ - if ((hdr->hwtype != PP_HTONS(HWTYPE_ETHERNET)) || + if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) || (hdr->hwlen != ETH_HWADDR_LEN) || (hdr->protolen != sizeof(ip4_addr_t)) || (hdr->proto != PP_HTONS(ETHTYPE_IP))) { LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, - ("etharp_input: packet dropped, wrong hw type, hwlen, proto, protolen or ethernet type (%"U16_F"/%"U16_F"/%"U16_F"/%"U16_F")\n", - hdr->hwtype, (u16_t)hdr->hwlen, hdr->proto, (u16_t)hdr->protolen)); + ("etharp_input: packet dropped, wrong hw type, hwlen, proto, protolen or ethernet type (%"U16_F"/%"U16_F"/%"U16_F"/%"U16_F")\n", + hdr->hwtype, (u16_t)hdr->hwlen, hdr->proto, (u16_t)hdr->protolen)); ETHARP_STATS_INC(etharp.proterr); ETHARP_STATS_INC(etharp.drop); pbuf_free(p); @@ -671,10 +673,10 @@ etharp_input(struct pbuf *p, struct netif *netif) autoip_arp_reply(netif, hdr); #endif /* LWIP_AUTOIP */ - /* Copy struct ip4_addr2 to aligned ip4_addr, to support compilers without + /* Copy struct ip4_addr_wordaligned to aligned ip4_addr, to support compilers without * structure packing (not using structure copy which breaks strict-aliasing rules). */ - IPADDR2_COPY(&sipaddr, &hdr->sipaddr); - IPADDR2_COPY(&dipaddr, &hdr->dipaddr); + IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T(&sipaddr, &hdr->sipaddr); + IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T(&dipaddr, &hdr->dipaddr); /* this interface is not configured? */ if (ip4_addr_isany_val(*netif_ip4_addr(netif))) { @@ -690,50 +692,50 @@ etharp_input(struct pbuf *p, struct netif *netif) ARP message not directed to us? -> update the source IP address in the cache, if present */ etharp_update_arp_entry(netif, &sipaddr, &(hdr->shwaddr), - for_us ? ETHARP_FLAG_TRY_HARD : ETHARP_FLAG_FIND_ONLY); + for_us ? ETHARP_FLAG_TRY_HARD : ETHARP_FLAG_FIND_ONLY); /* now act on the message itself */ switch (hdr->opcode) { - /* ARP request? */ - case PP_HTONS(ARP_REQUEST): - /* ARP request. If it asked for our address, we send out a - * reply. In any case, we time-stamp any existing ARP entry, - * and possibly send out an IP packet that was queued on it. */ + /* ARP request? */ + case PP_HTONS(ARP_REQUEST): + /* ARP request. If it asked for our address, we send out a + * reply. In any case, we time-stamp any existing ARP entry, + * and possibly send out an IP packet that was queued on it. */ - LWIP_DEBUGF (ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_input: incoming ARP request\n")); - /* ARP request for our address? */ - if (for_us) { - /* send ARP response */ - etharp_raw(netif, - (struct eth_addr *)netif->hwaddr, &hdr->shwaddr, - (struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), - &hdr->shwaddr, &sipaddr, - ARP_REPLY); - /* we are not configured? */ - } else if (ip4_addr_isany_val(*netif_ip4_addr(netif))) { - /* { for_us == 0 and netif->ip_addr.addr == 0 } */ - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_input: we are unconfigured, ARP request ignored.\n")); - /* request was not directed to us */ - } else { - /* { for_us == 0 and netif->ip_addr.addr != 0 } */ - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_input: ARP request was not for us.\n")); - } - break; - case PP_HTONS(ARP_REPLY): - /* ARP reply. We already updated the ARP cache earlier. */ - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_input: incoming ARP reply\n")); + LWIP_DEBUGF (ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_input: incoming ARP request\n")); + /* ARP request for our address? */ + if (for_us) { + /* send ARP response */ + etharp_raw(netif, + (struct eth_addr *)netif->hwaddr, &hdr->shwaddr, + (struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), + &hdr->shwaddr, &sipaddr, + ARP_REPLY); + /* we are not configured? */ + } else if (ip4_addr_isany_val(*netif_ip4_addr(netif))) { + /* { for_us == 0 and netif->ip_addr.addr == 0 } */ + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_input: we are unconfigured, ARP request ignored.\n")); + /* request was not directed to us */ + } else { + /* { for_us == 0 and netif->ip_addr.addr != 0 } */ + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_input: ARP request was not for us.\n")); + } + break; + case PP_HTONS(ARP_REPLY): + /* ARP reply. We already updated the ARP cache earlier. */ + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_input: incoming ARP reply\n")); #if (LWIP_DHCP && DHCP_DOES_ARP_CHECK) - /* DHCP wants to know about ARP replies from any host with an - * IP address also offered to us by the DHCP server. We do not - * want to take a duplicate IP address on a single network. - * @todo How should we handle redundant (fail-over) interfaces? */ - dhcp_arp_reply(netif, &sipaddr); + /* DHCP wants to know about ARP replies from any host with an + * IP address also offered to us by the DHCP server. We do not + * want to take a duplicate IP address on a single network. + * @todo How should we handle redundant (fail-over) interfaces? */ + dhcp_arp_reply(netif, &sipaddr); #endif /* (LWIP_DHCP && DHCP_DOES_ARP_CHECK) */ - break; - default: - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_input: ARP unknown opcode type %"S16_F"\n", lwip_htons(hdr->opcode))); - ETHARP_STATS_INC(etharp.err); - break; + break; + default: + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_input: ARP unknown opcode type %"S16_F"\n", lwip_htons(hdr->opcode))); + ETHARP_STATS_INC(etharp.err); + break; } /* free ARP packet */ pbuf_free(p); @@ -743,7 +745,7 @@ etharp_input(struct pbuf *p, struct netif *netif) * in the arp_table specified by the index 'arp_idx'. */ static err_t -etharp_output_to_arp_index(struct netif *netif, struct pbuf *q, u8_t arp_idx) +etharp_output_to_arp_index(struct netif *netif, struct pbuf *q, netif_addr_idx_t arp_idx) { LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE", arp_table[arp_idx].state >= ETHARP_STATE_STABLE); @@ -764,7 +766,7 @@ etharp_output_to_arp_index(struct netif *netif, struct pbuf *q, u8_t arp_idx) } } - return ethernet_output(netif, q, (struct eth_addr*)(netif->hwaddr), &arp_table[arp_idx].ethaddr, ETHTYPE_IP); + return ethernet_output(netif, q, (struct eth_addr *)(netif->hwaddr), &arp_table[arp_idx].ethaddr, ETHTYPE_IP); } /** @@ -792,6 +794,7 @@ etharp_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr) struct eth_addr mcastaddr; const ip4_addr_t *dst_addr = ipaddr; + LWIP_ASSERT_CORE_LOCKED(); LWIP_ASSERT("netif != NULL", netif != NULL); LWIP_ASSERT("q != NULL", q != NULL); LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL); @@ -803,7 +806,7 @@ etharp_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr) if (ip4_addr_isbroadcast(ipaddr, netif)) { /* broadcast on Ethernet also */ dest = (const struct eth_addr *)ðbroadcast; - /* multicast destination IP address? */ + /* multicast destination IP address? */ } else if (ip4_addr_ismulticast(ipaddr)) { /* Hash IP multicast address to MAC address.*/ mcastaddr.addr[0] = LL_IP4_MULTICAST_ADDR_0; @@ -814,15 +817,15 @@ etharp_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr) mcastaddr.addr[5] = ip4_addr4(ipaddr); /* destination Ethernet address is multicast */ dest = &mcastaddr; - /* unicast destination IP address? */ + /* unicast destination IP address? */ } else { - s8_t i; + netif_addr_idx_t i; /* outside local network? if so, this can neither be a global broadcast nor a subnet broadcast. */ if (!ip4_addr_netcmp(ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) && !ip4_addr_islinklocal(ipaddr)) { #if LWIP_AUTOIP - struct ip_hdr *iphdr = LWIP_ALIGNMENT_CAST(struct ip_hdr*, q->payload); + struct ip_hdr *iphdr = LWIP_ALIGNMENT_CAST(struct ip_hdr *, q->payload); /* According to RFC 3297, chapter 2.6.2 (Forwarding Rules), a packet with a link-local source address must always be "directly to its destination on the same physical link. The host MUST NOT send the packet to any @@ -841,7 +844,7 @@ etharp_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr) if (!ip4_addr_isany_val(*netif_ip4_gw(netif))) { /* send to hardware address of default gateway IP address */ dst_addr = netif_ip4_gw(netif); - /* no default gateway available */ + /* no default gateway available */ } else { /* no route to destination error (default gateway missing) */ return ERR_RTE; @@ -850,9 +853,9 @@ etharp_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr) } } #if LWIP_NETIF_HWADDRHINT - if (netif->addr_hint != NULL) { + if (netif->hints != NULL) { /* per-pcb cached entry was given */ - u8_t etharp_cached_entry = *(netif->addr_hint); + netif_addr_idx_t etharp_cached_entry = netif->hints->addr_hint; if (etharp_cached_entry < ARP_TABLE_SIZE) { #endif /* LWIP_NETIF_HWADDRHINT */ if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) && @@ -878,7 +881,7 @@ etharp_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr) #endif (ip4_addr_cmp(dst_addr, &arp_table[i].ipaddr))) { /* found an existing, stable entry */ - ETHARP_SET_HINT(netif, i); + ETHARP_SET_ADDRHINT(netif, i); return etharp_output_to_arp_index(netif, q, i); } } @@ -890,7 +893,7 @@ etharp_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr) /* continuation for multicast/broadcast destinations */ /* obtain source Ethernet address of the given interface */ /* send packet directly on the link */ - return ethernet_output(netif, q, (struct eth_addr*)(netif->hwaddr), dest, ETHTYPE_IP); + return ethernet_output(netif, q, (struct eth_addr *)(netif->hwaddr), dest, ETHTYPE_IP); } /** @@ -929,10 +932,11 @@ etharp_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr) err_t etharp_query(struct netif *netif, const ip4_addr_t *ipaddr, struct pbuf *q) { - struct eth_addr * srcaddr = (struct eth_addr *)netif->hwaddr; + struct eth_addr *srcaddr = (struct eth_addr *)netif->hwaddr; err_t result = ERR_MEM; int is_new_entry = 0; - s8_t i; /* ARP entry index */ + s16_t i_err; + netif_addr_idx_t i; /* non-unicast address? */ if (ip4_addr_isbroadcast(ipaddr, netif) || @@ -943,17 +947,19 @@ etharp_query(struct netif *netif, const ip4_addr_t *ipaddr, struct pbuf *q) } /* find entry in ARP cache, ask to create entry if queueing packet */ - i = etharp_find_entry(ipaddr, ETHARP_FLAG_TRY_HARD, netif); + i_err = etharp_find_entry(ipaddr, ETHARP_FLAG_TRY_HARD, netif); /* could not find or create entry? */ - if (i < 0) { + if (i_err < 0) { LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not create ARP entry\n")); if (q) { LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: packet dropped\n")); ETHARP_STATS_INC(etharp.memerr); } - return (err_t)i; + return (err_t)i_err; } + LWIP_ASSERT("type overflow", (size_t)i_err < NETIF_ADDR_IDX_MAX); + i = (netif_addr_idx_t)i_err; /* mark a fresh entry as pending (we just sent a request) */ if (arp_table[i].state == ETHARP_STATE_EMPTY) { @@ -965,8 +971,8 @@ etharp_query(struct netif *netif, const ip4_addr_t *ipaddr, struct pbuf *q) /* { i is either a STABLE or (new or existing) PENDING entry } */ LWIP_ASSERT("arp_table[i].state == PENDING or STABLE", - ((arp_table[i].state == ETHARP_STATE_PENDING) || - (arp_table[i].state >= ETHARP_STATE_STABLE))); + ((arp_table[i].state == ETHARP_STATE_PENDING) || + (arp_table[i].state >= ETHARP_STATE_STABLE))); /* do we have a new entry? or an implicit query request? */ if (is_new_entry || (q == NULL)) { @@ -988,21 +994,20 @@ etharp_query(struct netif *netif, const ip4_addr_t *ipaddr, struct pbuf *q) /* stable entry? */ if (arp_table[i].state >= ETHARP_STATE_STABLE) { /* we have a valid IP->Ethernet address mapping */ - ETHARP_SET_HINT(netif, i); + ETHARP_SET_ADDRHINT(netif, i); /* send the packet */ result = ethernet_output(netif, q, srcaddr, &(arp_table[i].ethaddr), ETHTYPE_IP); - /* pending entry? (either just created or already pending */ + /* pending entry? (either just created or already pending */ } else if (arp_table[i].state == ETHARP_STATE_PENDING) { /* entry is still pending, queue the given packet 'q' */ struct pbuf *p; int copy_needed = 0; - /* IF q includes a PBUF_REF, PBUF_POOL or PBUF_RAM, we have no choice but - * to copy the whole queue into a new PBUF_RAM (see bug #11400) - * PBUF_ROMs can be left as they are, since ROM must not get changed. */ + /* IF q includes a pbuf that must be copied, copy the whole chain into a + * new PBUF_RAM. See the definition of PBUF_NEEDS_COPY for details. */ p = q; while (p) { LWIP_ASSERT("no packet queues allowed!", (p->len != p->tot_len) || (p->next == 0)); - if (p->type != PBUF_ROM) { + if (PBUF_NEEDS_COPY(p)) { copy_needed = 1; break; } @@ -1010,13 +1015,7 @@ etharp_query(struct netif *netif, const ip4_addr_t *ipaddr, struct pbuf *q) } if (copy_needed) { /* copy the whole packet into new pbufs */ - p = pbuf_alloc(PBUF_LINK, p->tot_len, PBUF_RAM); - if (p != NULL) { - if (pbuf_copy(p, q) != ERR_OK) { - pbuf_free(p); - p = NULL; - } - } + p = pbuf_clone(PBUF_LINK, PBUF_RAM, q); } else { /* referencing the old pbuf is enough */ p = q; @@ -1056,7 +1055,7 @@ etharp_query(struct netif *netif, const ip4_addr_t *ipaddr, struct pbuf *q) memp_free(MEMP_ARP_QUEUE, old); } #endif - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: queued packet %p on ARP entry %"S16_F"\n", (void *)q, (s16_t)i)); + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: queued packet %p on ARP entry %"U16_F"\n", (void *)q, i)); result = ERR_OK; } else { /* the pool MEMP_ARP_QUEUE is empty */ @@ -1067,12 +1066,12 @@ etharp_query(struct netif *netif, const ip4_addr_t *ipaddr, struct pbuf *q) #else /* ARP_QUEUEING */ /* always queue one packet per ARP request only, freeing a previously queued packet */ if (arp_table[i].q != NULL) { - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: dropped previously queued packet %p for ARP entry %"S16_F"\n", (void *)q, (s16_t)i)); + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: dropped previously queued packet %p for ARP entry %"U16_F"\n", (void *)q, (u16_t)i)); pbuf_free(arp_table[i].q); } arp_table[i].q = p; result = ERR_OK; - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: queued packet %p on ARP entry %"S16_F"\n", (void *)q, (s16_t)i)); + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: queued packet %p on ARP entry %"U16_F"\n", (void *)q, (u16_t)i)); #endif /* ARP_QUEUEING */ } else { ETHARP_STATS_INC(etharp.memerr); @@ -1116,7 +1115,7 @@ etharp_raw(struct netif *netif, const struct eth_addr *ethsrc_addr, /* could allocate a pbuf for an ARP request? */ if (p == NULL) { LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, - ("etharp_raw: could not allocate pbuf for ARP request.\n")); + ("etharp_raw: could not allocate pbuf for ARP request.\n")); ETHARP_STATS_INC(etharp.memerr); return ERR_MEM; } @@ -1131,14 +1130,14 @@ etharp_raw(struct netif *netif, const struct eth_addr *ethsrc_addr, (netif->hwaddr_len == ETH_HWADDR_LEN)); /* Write the ARP MAC-Addresses */ - ETHADDR16_COPY(&hdr->shwaddr, hwsrc_addr); - ETHADDR16_COPY(&hdr->dhwaddr, hwdst_addr); - /* Copy struct ip4_addr2 to aligned ip4_addr, to support compilers without + SMEMCPY(&hdr->shwaddr, hwsrc_addr, ETH_HWADDR_LEN); + SMEMCPY(&hdr->dhwaddr, hwdst_addr, ETH_HWADDR_LEN); + /* Copy struct ip4_addr_wordaligned to aligned ip4_addr, to support compilers without * structure packing. */ - IPADDR2_COPY(&hdr->sipaddr, ipsrc_addr); - IPADDR2_COPY(&hdr->dipaddr, ipdst_addr); + IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T(&hdr->sipaddr, ipsrc_addr); + IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T(&hdr->dipaddr, ipdst_addr); - hdr->hwtype = PP_HTONS(HWTYPE_ETHERNET); + hdr->hwtype = PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET); hdr->proto = PP_HTONS(ETHTYPE_IP); /* set hwlen and protolen */ hdr->hwlen = ETH_HWADDR_LEN; @@ -1149,7 +1148,7 @@ etharp_raw(struct netif *netif, const struct eth_addr *ethsrc_addr, /* If we are using Link-Local, all ARP packets that contain a Link-Local * 'sender IP address' MUST be sent using link-layer broadcast instead of * link-layer unicast. (See RFC3927 Section 2.5, last paragraph) */ - if(ip4_addr_islinklocal(ipsrc_addr)) { + if (ip4_addr_islinklocal(ipsrc_addr)) { ethernet_output(netif, p, ethsrc_addr, ðbroadcast, ETHTYPE_ARP); } else #endif /* LWIP_AUTOIP */ @@ -1179,7 +1178,7 @@ etharp_raw(struct netif *netif, const struct eth_addr *ethsrc_addr, * any other err_t on failure */ static err_t -etharp_request_dst(struct netif *netif, const ip4_addr_t *ipaddr, const struct eth_addr* hw_dst_addr) +etharp_request_dst(struct netif *netif, const ip4_addr_t *ipaddr, const struct eth_addr *hw_dst_addr) { return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr, (struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), ðzero, @@ -1201,6 +1200,5 @@ etharp_request(struct netif *netif, const ip4_addr_t *ipaddr) LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_request: sending ARP request.\n")); return etharp_request_dst(netif, ipaddr, ðbroadcast); } -#endif /* LWIP_IPV4 && LWIP_ARP */ -#endif /* LWIP_ARP || LWIP_ETHERNET */ +#endif /* LWIP_IPV4 && LWIP_ARP */ diff --git a/Libraries/LwIP/src/core/ipv4/icmp.c b/Libraries/LwIP/src/core/ipv4/icmp.c index 774b72b..fd9054b 100755 --- a/Libraries/LwIP/src/core/ipv4/icmp.c +++ b/Libraries/LwIP/src/core/ipv4/icmp.c @@ -57,7 +57,7 @@ /** Small optimization: set to 0 if incoming PBUF_POOL pbuf always can be * used to modify and send a response packet (and to 1 if this is not the case, - * e.g. when link header is stripped of when receiving) */ + * e.g. when link header is stripped off when receiving) */ #ifndef LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN #define LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN 1 #endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */ @@ -86,191 +86,198 @@ icmp_input(struct pbuf *p, struct netif *inp) struct icmp_echo_hdr *iecho; const struct ip_hdr *iphdr_in; u16_t hlen; - const ip4_addr_t* src; + const ip4_addr_t *src; ICMP_STATS_INC(icmp.recv); MIB2_STATS_INC(mib2.icmpinmsgs); iphdr_in = ip4_current_header(); - hlen = IPH_HL(iphdr_in) * 4; + hlen = IPH_HL_BYTES(iphdr_in); if (hlen < IP_HLEN) { LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short IP header (%"S16_F" bytes) received\n", hlen)); goto lenerr; } - if (p->len < sizeof(u16_t)*2) { + if (p->len < sizeof(u16_t) * 2) { LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short ICMP (%"U16_F" bytes) received\n", p->tot_len)); goto lenerr; } type = *((u8_t *)p->payload); #ifdef LWIP_DEBUG - code = *(((u8_t *)p->payload)+1); + code = *(((u8_t *)p->payload) + 1); + /* if debug is enabled but debug statement below is somehow disabled: */ + LWIP_UNUSED_ARG(code); #endif /* LWIP_DEBUG */ switch (type) { - case ICMP_ER: - /* This is OK, echo reply might have been parsed by a raw PCB - (as obviously, an echo request has been sent, too). */ - MIB2_STATS_INC(mib2.icmpinechoreps); - break; - case ICMP_ECHO: - MIB2_STATS_INC(mib2.icmpinechos); - src = ip4_current_dest_addr(); - /* multicast destination address? */ - if (ip4_addr_ismulticast(ip4_current_dest_addr())) { + case ICMP_ER: + /* This is OK, echo reply might have been parsed by a raw PCB + (as obviously, an echo request has been sent, too). */ + MIB2_STATS_INC(mib2.icmpinechoreps); + break; + case ICMP_ECHO: + MIB2_STATS_INC(mib2.icmpinechos); + src = ip4_current_dest_addr(); + /* multicast destination address? */ + if (ip4_addr_ismulticast(ip4_current_dest_addr())) { #if LWIP_MULTICAST_PING - /* For multicast, use address of receiving interface as source address */ - src = netif_ip4_addr(inp); + /* For multicast, use address of receiving interface as source address */ + src = netif_ip4_addr(inp); #else /* LWIP_MULTICAST_PING */ - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: Not echoing to multicast pings\n")); - goto icmperr; + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: Not echoing to multicast pings\n")); + goto icmperr; #endif /* LWIP_MULTICAST_PING */ - } - /* broadcast destination address? */ - if (ip4_addr_isbroadcast(ip4_current_dest_addr(), ip_current_netif())) { + } + /* broadcast destination address? */ + if (ip4_addr_isbroadcast(ip4_current_dest_addr(), ip_current_netif())) { #if LWIP_BROADCAST_PING - /* For broadcast, use address of receiving interface as source address */ - src = netif_ip4_addr(inp); + /* For broadcast, use address of receiving interface as source address */ + src = netif_ip4_addr(inp); #else /* LWIP_BROADCAST_PING */ - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: Not echoing to broadcast pings\n")); - goto icmperr; + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: Not echoing to broadcast pings\n")); + goto icmperr; #endif /* LWIP_BROADCAST_PING */ - } - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ping\n")); - if (p->tot_len < sizeof(struct icmp_echo_hdr)) { - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: bad ICMP echo received\n")); - goto lenerr; - } + } + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ping\n")); + if (p->tot_len < sizeof(struct icmp_echo_hdr)) { + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: bad ICMP echo received\n")); + goto lenerr; + } #if CHECKSUM_CHECK_ICMP - IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_CHECK_ICMP) { - if (inet_chksum_pbuf(p) != 0) { - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: checksum failed for received ICMP echo\n")); - pbuf_free(p); - ICMP_STATS_INC(icmp.chkerr); - MIB2_STATS_INC(mib2.icmpinerrors); - return; - } - } -#endif -#if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN - if (pbuf_header(p, (s16_t)(hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN))) { - /* p is not big enough to contain link headers - * allocate a new one and copy p into it - */ - struct pbuf *r; - /* allocate new packet buffer with space for link headers */ - r = pbuf_alloc(PBUF_LINK, p->tot_len + hlen, PBUF_RAM); - if (r == NULL) { - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: allocating new pbuf failed\n")); - goto icmperr; - } - if (r->len < hlen + sizeof(struct icmp_echo_hdr)) { - LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("first pbuf cannot hold the ICMP header")); - pbuf_free(r); - goto icmperr; - } - /* copy the ip header */ - MEMCPY(r->payload, iphdr_in, hlen); - /* switch r->payload back to icmp header (cannot fail) */ - if (pbuf_header(r, (s16_t)-hlen)) { - LWIP_ASSERT("icmp_input: moving r->payload to icmp header failed\n", 0); - pbuf_free(r); - goto icmperr; - } - /* copy the rest of the packet without ip header */ - if (pbuf_copy(r, p) != ERR_OK) { - LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("icmp_input: copying to new pbuf failed")); - pbuf_free(r); - goto icmperr; - } - /* free the original p */ - pbuf_free(p); - /* we now have an identical copy of p that has room for link headers */ - p = r; - } else { - /* restore p->payload to point to icmp header (cannot fail) */ - if (pbuf_header(p, -(s16_t)(hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN))) { - LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0); - goto icmperr; - } - } -#endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */ - /* At this point, all checks are OK. */ - /* We generate an answer by switching the dest and src ip addresses, - * setting the icmp type to ECHO_RESPONSE and updating the checksum. */ - iecho = (struct icmp_echo_hdr *)p->payload; - if (pbuf_header(p, (s16_t)hlen)) { - LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("Can't move over header in packet")); - } else { - err_t ret; - struct ip_hdr *iphdr = (struct ip_hdr*)p->payload; - ip4_addr_copy(iphdr->src, *src); - ip4_addr_copy(iphdr->dest, *ip4_current_src_addr()); - ICMPH_TYPE_SET(iecho, ICMP_ER); -#if CHECKSUM_GEN_ICMP - IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_GEN_ICMP) { - /* adjust the checksum */ - if (iecho->chksum > PP_HTONS(0xffffU - (ICMP_ECHO << 8))) { - iecho->chksum += PP_HTONS(ICMP_ECHO << 8) + 1; - } else { - iecho->chksum += PP_HTONS(ICMP_ECHO << 8); + IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_CHECK_ICMP) { + if (inet_chksum_pbuf(p) != 0) { + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: checksum failed for received ICMP echo\n")); + pbuf_free(p); + ICMP_STATS_INC(icmp.chkerr); + MIB2_STATS_INC(mib2.icmpinerrors); + return; } } -#if LWIP_CHECKSUM_CTRL_PER_NETIF - else { - iecho->chksum = 0; +#endif +#if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN + if (pbuf_add_header(p, hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN)) { + /* p is not big enough to contain link headers + * allocate a new one and copy p into it + */ + struct pbuf *r; + u16_t alloc_len = (u16_t)(p->tot_len + hlen); + if (alloc_len < p->tot_len) { + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: allocating new pbuf failed (tot_len overflow)\n")); + goto icmperr; + } + /* allocate new packet buffer with space for link headers */ + r = pbuf_alloc(PBUF_LINK, alloc_len, PBUF_RAM); + if (r == NULL) { + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: allocating new pbuf failed\n")); + goto icmperr; + } + if (r->len < hlen + sizeof(struct icmp_echo_hdr)) { + LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("first pbuf cannot hold the ICMP header")); + pbuf_free(r); + goto icmperr; + } + /* copy the ip header */ + MEMCPY(r->payload, iphdr_in, hlen); + /* switch r->payload back to icmp header (cannot fail) */ + if (pbuf_remove_header(r, hlen)) { + LWIP_ASSERT("icmp_input: moving r->payload to icmp header failed\n", 0); + pbuf_free(r); + goto icmperr; + } + /* copy the rest of the packet without ip header */ + if (pbuf_copy(r, p) != ERR_OK) { + LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("icmp_input: copying to new pbuf failed")); + pbuf_free(r); + goto icmperr; + } + /* free the original p */ + pbuf_free(p); + /* we now have an identical copy of p that has room for link headers */ + p = r; + } else { + /* restore p->payload to point to icmp header (cannot fail) */ + if (pbuf_remove_header(p, hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN)) { + LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0); + goto icmperr; + } } +#endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */ + /* At this point, all checks are OK. */ + /* We generate an answer by switching the dest and src ip addresses, + * setting the icmp type to ECHO_RESPONSE and updating the checksum. */ + iecho = (struct icmp_echo_hdr *)p->payload; + if (pbuf_add_header(p, hlen)) { + LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("Can't move over header in packet")); + } else { + err_t ret; + struct ip_hdr *iphdr = (struct ip_hdr *)p->payload; + ip4_addr_copy(iphdr->src, *src); + ip4_addr_copy(iphdr->dest, *ip4_current_src_addr()); + ICMPH_TYPE_SET(iecho, ICMP_ER); +#if CHECKSUM_GEN_ICMP + IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_GEN_ICMP) { + /* adjust the checksum */ + if (iecho->chksum > PP_HTONS(0xffffU - (ICMP_ECHO << 8))) { + iecho->chksum = (u16_t)(iecho->chksum + PP_HTONS((u16_t)(ICMP_ECHO << 8)) + 1); + } else { + iecho->chksum = (u16_t)(iecho->chksum + PP_HTONS(ICMP_ECHO << 8)); + } + } +#if LWIP_CHECKSUM_CTRL_PER_NETIF + else { + iecho->chksum = 0; + } #endif /* LWIP_CHECKSUM_CTRL_PER_NETIF */ #else /* CHECKSUM_GEN_ICMP */ - iecho->chksum = 0; + iecho->chksum = 0; #endif /* CHECKSUM_GEN_ICMP */ - /* Set the correct TTL and recalculate the header checksum. */ - IPH_TTL_SET(iphdr, ICMP_TTL); - IPH_CHKSUM_SET(iphdr, 0); + /* Set the correct TTL and recalculate the header checksum. */ + IPH_TTL_SET(iphdr, ICMP_TTL); + IPH_CHKSUM_SET(iphdr, 0); #if CHECKSUM_GEN_IP - IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_GEN_IP) { - IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, hlen)); - } + IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_GEN_IP) { + IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, hlen)); + } #endif /* CHECKSUM_GEN_IP */ - ICMP_STATS_INC(icmp.xmit); - /* increase number of messages attempted to send */ - MIB2_STATS_INC(mib2.icmpoutmsgs); - /* increase number of echo replies attempted to send */ - MIB2_STATS_INC(mib2.icmpoutechoreps); + ICMP_STATS_INC(icmp.xmit); + /* increase number of messages attempted to send */ + MIB2_STATS_INC(mib2.icmpoutmsgs); + /* increase number of echo replies attempted to send */ + MIB2_STATS_INC(mib2.icmpoutechoreps); - /* send an ICMP packet */ - ret = ip4_output_if(p, src, LWIP_IP_HDRINCL, - ICMP_TTL, 0, IP_PROTO_ICMP, inp); - if (ret != ERR_OK) { - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ip_output_if returned an error: %s\n", lwip_strerr(ret))); + /* send an ICMP packet */ + ret = ip4_output_if(p, src, LWIP_IP_HDRINCL, + ICMP_TTL, 0, IP_PROTO_ICMP, inp); + if (ret != ERR_OK) { + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ip_output_if returned an error: %s\n", lwip_strerr(ret))); + } } - } - break; - default: - if (type == ICMP_DUR) { - MIB2_STATS_INC(mib2.icmpindestunreachs); - } else if (type == ICMP_TE) { - MIB2_STATS_INC(mib2.icmpintimeexcds); - } else if (type == ICMP_PP) { - MIB2_STATS_INC(mib2.icmpinparmprobs); - } else if (type == ICMP_SQ) { - MIB2_STATS_INC(mib2.icmpinsrcquenchs); - } else if (type == ICMP_RD) { - MIB2_STATS_INC(mib2.icmpinredirects); - } else if (type == ICMP_TS) { - MIB2_STATS_INC(mib2.icmpintimestamps); - } else if (type == ICMP_TSR) { - MIB2_STATS_INC(mib2.icmpintimestampreps); - } else if (type == ICMP_AM) { - MIB2_STATS_INC(mib2.icmpinaddrmasks); - } else if (type == ICMP_AMR) { - MIB2_STATS_INC(mib2.icmpinaddrmaskreps); - } - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ICMP type %"S16_F" code %"S16_F" not supported.\n", - (s16_t)type, (s16_t)code)); - ICMP_STATS_INC(icmp.proterr); - ICMP_STATS_INC(icmp.drop); + break; + default: + if (type == ICMP_DUR) { + MIB2_STATS_INC(mib2.icmpindestunreachs); + } else if (type == ICMP_TE) { + MIB2_STATS_INC(mib2.icmpintimeexcds); + } else if (type == ICMP_PP) { + MIB2_STATS_INC(mib2.icmpinparmprobs); + } else if (type == ICMP_SQ) { + MIB2_STATS_INC(mib2.icmpinsrcquenchs); + } else if (type == ICMP_RD) { + MIB2_STATS_INC(mib2.icmpinredirects); + } else if (type == ICMP_TS) { + MIB2_STATS_INC(mib2.icmpintimestamps); + } else if (type == ICMP_TSR) { + MIB2_STATS_INC(mib2.icmpintimestampreps); + } else if (type == ICMP_AM) { + MIB2_STATS_INC(mib2.icmpinaddrmasks); + } else if (type == ICMP_AMR) { + MIB2_STATS_INC(mib2.icmpinaddrmaskreps); + } + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ICMP type %"S16_F" code %"S16_F" not supported.\n", + (s16_t)type, (s16_t)code)); + ICMP_STATS_INC(icmp.proterr); + ICMP_STATS_INC(icmp.drop); } pbuf_free(p); return; @@ -351,7 +358,7 @@ icmp_send_response(struct pbuf *p, u8_t type, u8_t code) return; } LWIP_ASSERT("check that first pbuf can hold icmp message", - (q->len >= (sizeof(struct icmp_echo_hdr) + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE))); + (q->len >= (sizeof(struct icmp_echo_hdr) + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE))); iphdr = (struct ip_hdr *)p->payload; LWIP_DEBUGF(ICMP_DEBUG, ("icmp_time_exceeded from ")); @@ -375,7 +382,7 @@ icmp_send_response(struct pbuf *p, u8_t type, u8_t code) { ip4_addr_t iphdr_dst; ip4_addr_copy(iphdr_dst, iphdr->dest); - netif = ip4_route_src(&iphdr_src, &iphdr_dst); + netif = ip4_route_src(&iphdr_dst, &iphdr_src); } #else netif = ip4_route(&iphdr_src); diff --git a/Libraries/LwIP/src/core/ipv4/igmp.c b/Libraries/LwIP/src/core/ipv4/igmp.c index ddadbac..61f45d9 100755 --- a/Libraries/LwIP/src/core/ipv4/igmp.c +++ b/Libraries/LwIP/src/core/ipv4/igmp.c @@ -94,10 +94,10 @@ Steve Reynolds #include "lwip/stats.h" #include "lwip/prot/igmp.h" -#include "string.h" +#include static struct igmp_group *igmp_lookup_group(struct netif *ifp, const ip4_addr_t *addr); -static err_t igmp_remove_group(struct netif* netif, struct igmp_group *group); +static err_t igmp_remove_group(struct netif *netif, struct igmp_group *group); static void igmp_timeout(struct netif *netif, struct igmp_group *group); static void igmp_start_timer(struct igmp_group *group, u8_t max_time); static void igmp_delaying_member(struct igmp_group *group, u8_t maxresp); @@ -127,9 +127,9 @@ igmp_init(void) err_t igmp_start(struct netif *netif) { - struct igmp_group* group; + struct igmp_group *group; - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_start: starting IGMP processing on if %p\n", (void*)netif)); + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_start: starting IGMP processing on if %p\n", (void *)netif)); group = igmp_lookup_group(netif, &allsystems); @@ -141,7 +141,7 @@ igmp_start(struct netif *netif) if (netif->igmp_mac_filter != NULL) { LWIP_DEBUGF(IGMP_DEBUG, ("igmp_start: igmp_mac_filter(ADD ")); ip4_addr_debug_print_val(IGMP_DEBUG, allsystems); - LWIP_DEBUGF(IGMP_DEBUG, (") on if %p\n", (void*)netif)); + LWIP_DEBUGF(IGMP_DEBUG, (") on if %p\n", (void *)netif)); netif->igmp_mac_filter(netif, &allsystems, NETIF_ADD_MAC_FILTER); } @@ -169,8 +169,8 @@ igmp_stop(struct netif *netif) /* disable the group at the MAC level */ if (netif->igmp_mac_filter != NULL) { LWIP_DEBUGF(IGMP_DEBUG, ("igmp_stop: igmp_mac_filter(DEL ")); - ip4_addr_debug_print(IGMP_DEBUG, &group->group_address); - LWIP_DEBUGF(IGMP_DEBUG, (") on if %p\n", (void*)netif)); + ip4_addr_debug_print_val(IGMP_DEBUG, group->group_address); + LWIP_DEBUGF(IGMP_DEBUG, (") on if %p\n", (void *)netif)); netif->igmp_mac_filter(netif, &(group->group_address), NETIF_DEL_MAC_FILTER); } @@ -193,13 +193,13 @@ igmp_report_groups(struct netif *netif) { struct igmp_group *group = netif_igmp_data(netif); - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_report_groups: sending IGMP reports on if %p\n", (void*)netif)); + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_report_groups: sending IGMP reports on if %p\n", (void *)netif)); /* Skip the first group in the list, it is always the allsystems group added in igmp_start() */ - if(group != NULL) { + if (group != NULL) { group = group->next; } - + while (group != NULL) { igmp_delaying_member(group, IGMP_JOIN_DELAYING_MEMBER_TMR); group = group->next; @@ -207,7 +207,7 @@ igmp_report_groups(struct netif *netif) } /** - * Search for a group in the global igmp_group_list + * Search for a group in the netif's igmp group list * * @param ifp the network interface for which to look * @param addr the group ip address to search for @@ -252,7 +252,7 @@ igmp_lookup_group(struct netif *ifp, const ip4_addr_t *addr) /* Group already exists. */ return group; } - + /* Group doesn't exist yet, create a new one */ group = (struct igmp_group *)memp_malloc(MEMP_IGMP_GROUP); if (group != NULL) { @@ -262,37 +262,37 @@ igmp_lookup_group(struct netif *ifp, const ip4_addr_t *addr) group->last_reporter_flag = 0; group->use = 0; - /* Ensure allsystems group is always first in list */ + /* Ensure allsystems group is always first in list */ if (list_head == NULL) { /* this is the first entry in linked list */ LWIP_ASSERT("igmp_lookup_group: first group must be allsystems", - (ip4_addr_cmp(addr, &allsystems) != 0)); + (ip4_addr_cmp(addr, &allsystems) != 0)); group->next = NULL; netif_set_client_data(ifp, LWIP_NETIF_CLIENT_DATA_INDEX_IGMP, group); } else { /* append _after_ first entry */ LWIP_ASSERT("igmp_lookup_group: all except first group must not be allsystems", - (ip4_addr_cmp(addr, &allsystems) == 0)); + (ip4_addr_cmp(addr, &allsystems) == 0)); group->next = list_head->next; list_head->next = group; } } - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_lookup_group: %sallocated a new group with address ", (group?"":"impossible to "))); + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_lookup_group: %sallocated a new group with address ", (group ? "" : "impossible to "))); ip4_addr_debug_print(IGMP_DEBUG, addr); - LWIP_DEBUGF(IGMP_DEBUG, (" on if %p\n", (void*)ifp)); + LWIP_DEBUGF(IGMP_DEBUG, (" on if %p\n", (void *)ifp)); return group; } /** - * Remove a group in the global igmp_group_list, but don't free it yet + * Remove a group from netif's igmp group list, but don't free it yet * - * @param group the group to remove from the global igmp_group_list + * @param group the group to remove from the netif's igmp group list * @return ERR_OK if group was removed from the list, an err_t otherwise */ static err_t -igmp_remove_group(struct netif* netif, struct igmp_group *group) +igmp_remove_group(struct netif *netif, struct igmp_group *group) { err_t err = ERR_OK; struct igmp_group *tmp_group; @@ -304,7 +304,7 @@ igmp_remove_group(struct netif* netif, struct igmp_group *group) break; } } - /* Group not found in the global igmp_group_list */ + /* Group not found in netif's igmp group list */ if (tmp_group == NULL) { err = ERR_ARG; } @@ -322,9 +322,9 @@ igmp_remove_group(struct netif* netif, struct igmp_group *group) void igmp_input(struct pbuf *p, struct netif *inp, const ip4_addr_t *dest) { - struct igmp_msg* igmp; - struct igmp_group* group; - struct igmp_group* groupref; + struct igmp_msg *igmp; + struct igmp_group *group; + struct igmp_group *groupref; IGMP_STATS_INC(igmp.recv); @@ -337,10 +337,10 @@ igmp_input(struct pbuf *p, struct netif *inp, const ip4_addr_t *dest) } LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: message from ")); - ip4_addr_debug_print(IGMP_DEBUG, &(ip4_current_header()->src)); + ip4_addr_debug_print_val(IGMP_DEBUG, ip4_current_header()->src); LWIP_DEBUGF(IGMP_DEBUG, (" to address ")); - ip4_addr_debug_print(IGMP_DEBUG, &(ip4_current_header()->dest)); - LWIP_DEBUGF(IGMP_DEBUG, (" on if %p\n", (void*)inp)); + ip4_addr_debug_print_val(IGMP_DEBUG, ip4_current_header()->dest); + LWIP_DEBUGF(IGMP_DEBUG, (" on if %p\n", (void *)inp)); /* Now calculate and check the checksum */ igmp = (struct igmp_msg *)p->payload; @@ -364,73 +364,73 @@ igmp_input(struct pbuf *p, struct netif *inp, const ip4_addr_t *dest) /* NOW ACT ON THE INCOMING MESSAGE TYPE... */ switch (igmp->igmp_msgtype) { - case IGMP_MEMB_QUERY: - /* IGMP_MEMB_QUERY to the "all systems" address ? */ - if ((ip4_addr_cmp(dest, &allsystems)) && ip4_addr_isany(&igmp->igmp_group_address)) { - /* THIS IS THE GENERAL QUERY */ - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: General IGMP_MEMB_QUERY on \"ALL SYSTEMS\" address (224.0.0.1) [igmp_maxresp=%i]\n", (int)(igmp->igmp_maxresp))); + case IGMP_MEMB_QUERY: + /* IGMP_MEMB_QUERY to the "all systems" address ? */ + if ((ip4_addr_cmp(dest, &allsystems)) && ip4_addr_isany(&igmp->igmp_group_address)) { + /* THIS IS THE GENERAL QUERY */ + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: General IGMP_MEMB_QUERY on \"ALL SYSTEMS\" address (224.0.0.1) [igmp_maxresp=%i]\n", (int)(igmp->igmp_maxresp))); - if (igmp->igmp_maxresp == 0) { - IGMP_STATS_INC(igmp.rx_v1); - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: got an all hosts query with time== 0 - this is V1 and not implemented - treat as v2\n")); - igmp->igmp_maxresp = IGMP_V1_DELAYING_MEMBER_TMR; - } else { - IGMP_STATS_INC(igmp.rx_general); - } - - groupref = netif_igmp_data(inp); - - /* Do not send messages on the all systems group address! */ - /* Skip the first group in the list, it is always the allsystems group added in igmp_start() */ - if(groupref != NULL) { - groupref = groupref->next; - } - - while (groupref) { - igmp_delaying_member(groupref, igmp->igmp_maxresp); - groupref = groupref->next; - } - } else { - /* IGMP_MEMB_QUERY to a specific group ? */ - if (!ip4_addr_isany(&igmp->igmp_group_address)) { - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: IGMP_MEMB_QUERY to a specific group ")); - ip4_addr_debug_print(IGMP_DEBUG, &igmp->igmp_group_address); - if (ip4_addr_cmp(dest, &allsystems)) { - ip4_addr_t groupaddr; - LWIP_DEBUGF(IGMP_DEBUG, (" using \"ALL SYSTEMS\" address (224.0.0.1) [igmp_maxresp=%i]\n", (int)(igmp->igmp_maxresp))); - /* we first need to re-look for the group since we used dest last time */ - ip4_addr_copy(groupaddr, igmp->igmp_group_address); - group = igmp_lookfor_group(inp, &groupaddr); + if (igmp->igmp_maxresp == 0) { + IGMP_STATS_INC(igmp.rx_v1); + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: got an all hosts query with time== 0 - this is V1 and not implemented - treat as v2\n")); + igmp->igmp_maxresp = IGMP_V1_DELAYING_MEMBER_TMR; } else { - LWIP_DEBUGF(IGMP_DEBUG, (" with the group address as destination [igmp_maxresp=%i]\n", (int)(igmp->igmp_maxresp))); + IGMP_STATS_INC(igmp.rx_general); } - if (group != NULL) { - IGMP_STATS_INC(igmp.rx_group); - igmp_delaying_member(group, igmp->igmp_maxresp); - } else { - IGMP_STATS_INC(igmp.drop); + groupref = netif_igmp_data(inp); + + /* Do not send messages on the all systems group address! */ + /* Skip the first group in the list, it is always the allsystems group added in igmp_start() */ + if (groupref != NULL) { + groupref = groupref->next; + } + + while (groupref) { + igmp_delaying_member(groupref, igmp->igmp_maxresp); + groupref = groupref->next; } } else { - IGMP_STATS_INC(igmp.proterr); + /* IGMP_MEMB_QUERY to a specific group ? */ + if (!ip4_addr_isany(&igmp->igmp_group_address)) { + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: IGMP_MEMB_QUERY to a specific group ")); + ip4_addr_debug_print_val(IGMP_DEBUG, igmp->igmp_group_address); + if (ip4_addr_cmp(dest, &allsystems)) { + ip4_addr_t groupaddr; + LWIP_DEBUGF(IGMP_DEBUG, (" using \"ALL SYSTEMS\" address (224.0.0.1) [igmp_maxresp=%i]\n", (int)(igmp->igmp_maxresp))); + /* we first need to re-look for the group since we used dest last time */ + ip4_addr_copy(groupaddr, igmp->igmp_group_address); + group = igmp_lookfor_group(inp, &groupaddr); + } else { + LWIP_DEBUGF(IGMP_DEBUG, (" with the group address as destination [igmp_maxresp=%i]\n", (int)(igmp->igmp_maxresp))); + } + + if (group != NULL) { + IGMP_STATS_INC(igmp.rx_group); + igmp_delaying_member(group, igmp->igmp_maxresp); + } else { + IGMP_STATS_INC(igmp.drop); + } + } else { + IGMP_STATS_INC(igmp.proterr); + } } - } - break; - case IGMP_V2_MEMB_REPORT: - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: IGMP_V2_MEMB_REPORT\n")); - IGMP_STATS_INC(igmp.rx_report); - if (group->group_state == IGMP_GROUP_DELAYING_MEMBER) { - /* This is on a specific group we have already looked up */ - group->timer = 0; /* stopped */ - group->group_state = IGMP_GROUP_IDLE_MEMBER; - group->last_reporter_flag = 0; - } - break; - default: - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: unexpected msg %d in state %d on group %p on if %p\n", - igmp->igmp_msgtype, group->group_state, (void*)&group, (void*)inp)); - IGMP_STATS_INC(igmp.proterr); - break; + break; + case IGMP_V2_MEMB_REPORT: + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: IGMP_V2_MEMB_REPORT\n")); + IGMP_STATS_INC(igmp.rx_report); + if (group->group_state == IGMP_GROUP_DELAYING_MEMBER) { + /* This is on a specific group we have already looked up */ + group->timer = 0; /* stopped */ + group->group_state = IGMP_GROUP_IDLE_MEMBER; + group->last_reporter_flag = 0; + } + break; + default: + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: unexpected msg %d in state %d on group %p on if %p\n", + igmp->igmp_msgtype, group->group_state, (void *)&group, (void *)inp)); + IGMP_STATS_INC(igmp.proterr); + break; } pbuf_free(p); @@ -451,13 +451,14 @@ igmp_joingroup(const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr) err_t err = ERR_VAL; /* no matching interface */ struct netif *netif; + LWIP_ASSERT_CORE_LOCKED(); + /* make sure it is multicast address */ LWIP_ERROR("igmp_joingroup: attempt to join non-multicast address", ip4_addr_ismulticast(groupaddr), return ERR_VAL;); LWIP_ERROR("igmp_joingroup: attempt to join allsystems address", (!ip4_addr_cmp(groupaddr, &allsystems)), return ERR_VAL;); /* loop through netif's */ - netif = netif_list; - while (netif != NULL) { + NETIF_FOREACH(netif) { /* Should we join this interface ? */ if ((netif->flags & NETIF_FLAG_IGMP) && ((ip4_addr_isany(ifaddr) || ip4_addr_cmp(netif_ip4_addr(netif), ifaddr)))) { err = igmp_joingroup_netif(netif, groupaddr); @@ -467,8 +468,6 @@ igmp_joingroup(const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr) return err; } } - /* proceed to next network interface */ - netif = netif->next; } return err; @@ -487,6 +486,8 @@ igmp_joingroup_netif(struct netif *netif, const ip4_addr_t *groupaddr) { struct igmp_group *group; + LWIP_ASSERT_CORE_LOCKED(); + /* make sure it is multicast address */ LWIP_ERROR("igmp_joingroup_netif: attempt to join non-multicast address", ip4_addr_ismulticast(groupaddr), return ERR_VAL;); LWIP_ERROR("igmp_joingroup_netif: attempt to join allsystems address", (!ip4_addr_cmp(groupaddr, &allsystems)), return ERR_VAL;); @@ -508,10 +509,10 @@ igmp_joingroup_netif(struct netif *netif, const ip4_addr_t *groupaddr) LWIP_DEBUGF(IGMP_DEBUG, ("\n")); /* If first use of the group, allow the group at the MAC level */ - if ((group->use==0) && (netif->igmp_mac_filter != NULL)) { + if ((group->use == 0) && (netif->igmp_mac_filter != NULL)) { LWIP_DEBUGF(IGMP_DEBUG, ("igmp_joingroup_netif: igmp_mac_filter(ADD ")); ip4_addr_debug_print(IGMP_DEBUG, groupaddr); - LWIP_DEBUGF(IGMP_DEBUG, (") on if %p\n", (void*)netif)); + LWIP_DEBUGF(IGMP_DEBUG, (") on if %p\n", (void *)netif)); netif->igmp_mac_filter(netif, groupaddr, NETIF_ADD_MAC_FILTER); } @@ -547,13 +548,14 @@ igmp_leavegroup(const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr) err_t err = ERR_VAL; /* no matching interface */ struct netif *netif; + LWIP_ASSERT_CORE_LOCKED(); + /* make sure it is multicast address */ LWIP_ERROR("igmp_leavegroup: attempt to leave non-multicast address", ip4_addr_ismulticast(groupaddr), return ERR_VAL;); LWIP_ERROR("igmp_leavegroup: attempt to leave allsystems address", (!ip4_addr_cmp(groupaddr, &allsystems)), return ERR_VAL;); /* loop through netif's */ - netif = netif_list; - while (netif != NULL) { + NETIF_FOREACH(netif) { /* Should we leave this interface ? */ if ((netif->flags & NETIF_FLAG_IGMP) && ((ip4_addr_isany(ifaddr) || ip4_addr_cmp(netif_ip4_addr(netif), ifaddr)))) { err_t res = igmp_leavegroup_netif(netif, groupaddr); @@ -562,8 +564,6 @@ igmp_leavegroup(const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr) err = res; } } - /* proceed to next network interface */ - netif = netif->next; } return err; @@ -582,6 +582,8 @@ igmp_leavegroup_netif(struct netif *netif, const ip4_addr_t *groupaddr) { struct igmp_group *group; + LWIP_ASSERT_CORE_LOCKED(); + /* make sure it is multicast address */ LWIP_ERROR("igmp_leavegroup_netif: attempt to leave non-multicast address", ip4_addr_ismulticast(groupaddr), return ERR_VAL;); LWIP_ERROR("igmp_leavegroup_netif: attempt to leave allsystems address", (!ip4_addr_cmp(groupaddr, &allsystems)), return ERR_VAL;); @@ -614,7 +616,7 @@ igmp_leavegroup_netif(struct netif *netif, const ip4_addr_t *groupaddr) if (netif->igmp_mac_filter != NULL) { LWIP_DEBUGF(IGMP_DEBUG, ("igmp_leavegroup_netif: igmp_mac_filter(DEL ")); ip4_addr_debug_print(IGMP_DEBUG, groupaddr); - LWIP_DEBUGF(IGMP_DEBUG, (") on if %p\n", (void*)netif)); + LWIP_DEBUGF(IGMP_DEBUG, (") on if %p\n", (void *)netif)); netif->igmp_mac_filter(netif, groupaddr, NETIF_DEL_MAC_FILTER); } @@ -638,9 +640,9 @@ igmp_leavegroup_netif(struct netif *netif, const ip4_addr_t *groupaddr) void igmp_tmr(void) { - struct netif *netif = netif_list; + struct netif *netif; - while (netif != NULL) { + NETIF_FOREACH(netif) { struct igmp_group *group = netif_igmp_data(netif); while (group != NULL) { @@ -652,7 +654,6 @@ igmp_tmr(void) } group = group->next; } - netif = netif->next; } } @@ -670,11 +671,11 @@ igmp_timeout(struct netif *netif, struct igmp_group *group) if ((group->group_state == IGMP_GROUP_DELAYING_MEMBER) && (!(ip4_addr_cmp(&(group->group_address), &allsystems)))) { LWIP_DEBUGF(IGMP_DEBUG, ("igmp_timeout: report membership for group with address ")); - ip4_addr_debug_print(IGMP_DEBUG, &(group->group_address)); - LWIP_DEBUGF(IGMP_DEBUG, (" on if %p\n", (void*)netif)); + ip4_addr_debug_print_val(IGMP_DEBUG, group->group_address); + LWIP_DEBUGF(IGMP_DEBUG, (" on if %p\n", (void *)netif)); group->group_state = IGMP_GROUP_IDLE_MEMBER; - + IGMP_STATS_INC(igmp.tx_report); igmp_send(netif, group, IGMP_V2_MEMB_REPORT); } @@ -691,7 +692,7 @@ static void igmp_start_timer(struct igmp_group *group, u8_t max_time) { #ifdef LWIP_RAND - group->timer = max_time > 2 ? (LWIP_RAND() % max_time) : 1; + group->timer = (u16_t)(max_time > 2 ? (LWIP_RAND() % max_time) : 1); #else /* LWIP_RAND */ /* ATTENTION: use this only if absolutely necessary! */ group->timer = max_time / 2; @@ -712,8 +713,8 @@ static void igmp_delaying_member(struct igmp_group *group, u8_t maxresp) { if ((group->group_state == IGMP_GROUP_IDLE_MEMBER) || - ((group->group_state == IGMP_GROUP_DELAYING_MEMBER) && - ((group->timer == 0) || (maxresp < group->timer)))) { + ((group->group_state == IGMP_GROUP_DELAYING_MEMBER) && + ((group->timer == 0) || (maxresp < group->timer)))) { igmp_start_timer(group, maxresp); group->group_state = IGMP_GROUP_DELAYING_MEMBER; } @@ -756,10 +757,10 @@ igmp_ip_output_if(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, static void igmp_send(struct netif *netif, struct igmp_group *group, u8_t type) { - struct pbuf* p = NULL; - struct igmp_msg* igmp = NULL; + struct pbuf *p = NULL; + struct igmp_msg *igmp = NULL; ip4_addr_t src = *IP4_ADDR_ANY4; - ip4_addr_t* dest = NULL; + ip4_addr_t *dest = NULL; /* IP header + "router alert" option + IGMP header */ p = pbuf_alloc(PBUF_TRANSPORT, IGMP_MINLEN, PBUF_RAM); @@ -767,7 +768,7 @@ igmp_send(struct netif *netif, struct igmp_group *group, u8_t type) if (p) { igmp = (struct igmp_msg *)p->payload; LWIP_ASSERT("igmp_send: check that first pbuf can hold struct igmp_msg", - (p->len >= sizeof(struct igmp_msg))); + (p->len >= sizeof(struct igmp_msg))); ip4_addr_copy(src, *netif_ip4_addr(netif)); if (type == IGMP_V2_MEMB_REPORT) { diff --git a/Libraries/LwIP/src/core/ipv4/ip4.c b/Libraries/LwIP/src/core/ipv4/ip4.c index 5789712..00b09f9 100755 --- a/Libraries/LwIP/src/core/ipv4/ip4.c +++ b/Libraries/LwIP/src/core/ipv4/ip4.c @@ -50,12 +50,12 @@ #include "lwip/netif.h" #include "lwip/icmp.h" #include "lwip/igmp.h" -#include "lwip/raw.h" +#include "lwip/priv/raw_priv.h" #include "lwip/udp.h" #include "lwip/priv/tcp_priv.h" #include "lwip/autoip.h" #include "lwip/stats.h" -#include "lwip/prot/dhcp.h" +#include "lwip/prot/iana.h" #include @@ -89,14 +89,14 @@ */ #if LWIP_DHCP && defined(LWIP_IP_ACCEPT_UDP_PORT) /* accept DHCP client port and custom port */ -#define IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(port) (((port) == PP_NTOHS(DHCP_CLIENT_PORT)) \ +#define IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(port) (((port) == PP_NTOHS(LWIP_IANA_PORT_DHCP_CLIENT)) \ || (LWIP_IP_ACCEPT_UDP_PORT(port))) #elif defined(LWIP_IP_ACCEPT_UDP_PORT) /* LWIP_DHCP && defined(LWIP_IP_ACCEPT_UDP_PORT) */ /* accept custom port only */ #define IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(port) (LWIP_IP_ACCEPT_UDP_PORT(port)) #else /* LWIP_DHCP && defined(LWIP_IP_ACCEPT_UDP_PORT) */ /* accept DHCP client port only */ -#define IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(port) ((port) == PP_NTOHS(DHCP_CLIENT_PORT)) +#define IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(port) ((port) == PP_NTOHS(LWIP_IANA_PORT_DHCP_CLIENT)) #endif /* LWIP_DHCP && defined(LWIP_IP_ACCEPT_UDP_PORT) */ #else /* LWIP_DHCP */ @@ -108,13 +108,13 @@ static u16_t ip_id; #if LWIP_MULTICAST_TX_OPTIONS /** The default netif used for multicast */ -static struct netif* ip4_default_multicast_netif; +static struct netif *ip4_default_multicast_netif; /** * @ingroup ip4 * Set a default netif for IPv4 multicast. */ void -ip4_set_default_multicast_netif(struct netif* default_multicast_netif) +ip4_set_default_multicast_netif(struct netif *default_multicast_netif) { ip4_default_multicast_netif = default_multicast_netif; } @@ -123,14 +123,14 @@ ip4_set_default_multicast_netif(struct netif* default_multicast_netif) #ifdef LWIP_HOOK_IP4_ROUTE_SRC /** * Source based IPv4 routing must be fully implemented in - * LWIP_HOOK_IP4_ROUTE_SRC(). This function only provides he parameters. + * LWIP_HOOK_IP4_ROUTE_SRC(). This function only provides the parameters. */ struct netif * -ip4_route_src(const ip4_addr_t *dest, const ip4_addr_t *src) +ip4_route_src(const ip4_addr_t *src, const ip4_addr_t *dest) { if (src != NULL) { /* when src==NULL, the hook is called from ip4_route(dest) */ - struct netif *netif = LWIP_HOOK_IP4_ROUTE_SRC(dest, src); + struct netif *netif = LWIP_HOOK_IP4_ROUTE_SRC(src, dest); if (netif != NULL) { return netif; } @@ -151,8 +151,11 @@ ip4_route_src(const ip4_addr_t *dest, const ip4_addr_t *src) struct netif * ip4_route(const ip4_addr_t *dest) { +#if !LWIP_SINGLE_NETIF struct netif *netif; + LWIP_ASSERT_CORE_LOCKED(); + #if LWIP_MULTICAST_TX_OPTIONS /* Use administratively selected interface for multicast by default */ if (ip4_addr_ismulticast(dest) && ip4_default_multicast_netif) { @@ -160,8 +163,11 @@ ip4_route(const ip4_addr_t *dest) } #endif /* LWIP_MULTICAST_TX_OPTIONS */ + /* bug #54569: in case LWIP_SINGLE_NETIF=1 and LWIP_DEBUGF() disabled, the following loop is optimized away */ + LWIP_UNUSED_ARG(dest); + /* iterate through netifs */ - for (netif = netif_list; netif != NULL; netif = netif->next) { + NETIF_FOREACH(netif) { /* is the netif up, does it have a link and a valid address? */ if (netif_is_up(netif) && netif_is_link_up(netif) && !ip4_addr_isany_val(*netif_ip4_addr(netif))) { /* network mask matches? */ @@ -185,7 +191,7 @@ ip4_route(const ip4_addr_t *dest) return netif_default; } /* default netif is not up, just use any netif for loopback traffic */ - for (netif = netif_list; netif != NULL; netif = netif->next) { + NETIF_FOREACH(netif) { if (netif_is_up(netif)) { return netif; } @@ -195,7 +201,7 @@ ip4_route(const ip4_addr_t *dest) #endif /* LWIP_NETIF_LOOPBACK && !LWIP_HAVE_LOOPIF */ #ifdef LWIP_HOOK_IP4_ROUTE_SRC - netif = LWIP_HOOK_IP4_ROUTE_SRC(dest, NULL); + netif = LWIP_HOOK_IP4_ROUTE_SRC(NULL, dest); if (netif != NULL) { return netif; } @@ -205,13 +211,14 @@ ip4_route(const ip4_addr_t *dest) return netif; } #endif +#endif /* !LWIP_SINGLE_NETIF */ if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) || - ip4_addr_isany_val(*netif_ip4_addr(netif_default))) { + ip4_addr_isany_val(*netif_ip4_addr(netif_default)) || ip4_addr_isloopback(dest)) { /* No matching netif found and default netif is not usable. If this is not good enough for you, use LWIP_HOOK_IP4_ROUTE() */ LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip4_route: No route to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - ip4_addr1_16(dest), ip4_addr2_16(dest), ip4_addr3_16(dest), ip4_addr4_16(dest))); + ip4_addr1_16(dest), ip4_addr2_16(dest), ip4_addr3_16(dest), ip4_addr4_16(dest))); IP_STATS_INC(ip.rterr); MIB2_STATS_INC(mib2.ipoutnoroutes); return NULL; @@ -233,13 +240,19 @@ ip4_canforward(struct pbuf *p) { u32_t addr = lwip_htonl(ip4_addr_get_u32(ip4_current_dest_addr())); +#ifdef LWIP_HOOK_IP4_CANFORWARD + int ret = LWIP_HOOK_IP4_CANFORWARD(p, addr); + if (ret >= 0) { + return ret; + } +#endif /* LWIP_HOOK_IP4_CANFORWARD */ + if (p->flags & PBUF_FLAG_LLBCAST) { /* don't route link-layer broadcasts */ return 0; } - if ((p->flags & PBUF_FLAG_LLMCAST) && !IP_MULTICAST(addr)) { - /* don't route link-layer multicasts unless the destination address is an IP - multicast address */ + if ((p->flags & PBUF_FLAG_LLMCAST) || IP_MULTICAST(addr)) { + /* don't route link-layer multicasts (use LWIP_HOOK_IP4_CANFORWARD instead) */ return 0; } if (IP_EXPERIMENTAL(addr)) { @@ -279,17 +292,17 @@ ip4_forward(struct pbuf *p, struct ip_hdr *iphdr, struct netif *inp) /* RFC3927 2.7: do not forward link-local addresses */ if (ip4_addr_islinklocal(ip4_current_dest_addr())) { LWIP_DEBUGF(IP_DEBUG, ("ip4_forward: not forwarding LLA %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - ip4_addr1_16(ip4_current_dest_addr()), ip4_addr2_16(ip4_current_dest_addr()), - ip4_addr3_16(ip4_current_dest_addr()), ip4_addr4_16(ip4_current_dest_addr()))); + ip4_addr1_16(ip4_current_dest_addr()), ip4_addr2_16(ip4_current_dest_addr()), + ip4_addr3_16(ip4_current_dest_addr()), ip4_addr4_16(ip4_current_dest_addr()))); goto return_noroute; } /* Find network interface where to forward this IP packet to. */ - netif = ip4_route_src(ip4_current_dest_addr(), ip4_current_src_addr()); + netif = ip4_route_src(ip4_current_src_addr(), ip4_current_dest_addr()); if (netif == NULL) { LWIP_DEBUGF(IP_DEBUG, ("ip4_forward: no forwarding route for %"U16_F".%"U16_F".%"U16_F".%"U16_F" found\n", - ip4_addr1_16(ip4_current_dest_addr()), ip4_addr2_16(ip4_current_dest_addr()), - ip4_addr3_16(ip4_current_dest_addr()), ip4_addr4_16(ip4_current_dest_addr()))); + ip4_addr1_16(ip4_current_dest_addr()), ip4_addr2_16(ip4_current_dest_addr()), + ip4_addr3_16(ip4_current_dest_addr()), ip4_addr4_16(ip4_current_dest_addr()))); /* @todo: send ICMP_DUR_NET? */ goto return_noroute; } @@ -318,14 +331,14 @@ ip4_forward(struct pbuf *p, struct ip_hdr *iphdr, struct netif *inp) /* Incrementally update the IP checksum. */ if (IPH_CHKSUM(iphdr) >= PP_HTONS(0xffffU - 0x100)) { - IPH_CHKSUM_SET(iphdr, IPH_CHKSUM(iphdr) + PP_HTONS(0x100) + 1); + IPH_CHKSUM_SET(iphdr, (u16_t)(IPH_CHKSUM(iphdr) + PP_HTONS(0x100) + 1)); } else { - IPH_CHKSUM_SET(iphdr, IPH_CHKSUM(iphdr) + PP_HTONS(0x100)); + IPH_CHKSUM_SET(iphdr, (u16_t)(IPH_CHKSUM(iphdr) + PP_HTONS(0x100))); } LWIP_DEBUGF(IP_DEBUG, ("ip4_forward: forwarding packet to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - ip4_addr1_16(ip4_current_dest_addr()), ip4_addr2_16(ip4_current_dest_addr()), - ip4_addr3_16(ip4_current_dest_addr()), ip4_addr4_16(ip4_current_dest_addr()))); + ip4_addr1_16(ip4_current_dest_addr()), ip4_addr2_16(ip4_current_dest_addr()), + ip4_addr3_16(ip4_current_dest_addr()), ip4_addr4_16(ip4_current_dest_addr()))); IP_STATS_INC(ip.fw); MIB2_STATS_INC(mib2.ipforwdatagrams); @@ -356,6 +369,45 @@ return_noroute: } #endif /* IP_FORWARD */ +/** Return true if the current input packet should be accepted on this netif */ +static int +ip4_input_accept(struct netif *netif) +{ + LWIP_DEBUGF(IP_DEBUG, ("ip_input: iphdr->dest 0x%"X32_F" netif->ip_addr 0x%"X32_F" (0x%"X32_F", 0x%"X32_F", 0x%"X32_F")\n", + ip4_addr_get_u32(ip4_current_dest_addr()), ip4_addr_get_u32(netif_ip4_addr(netif)), + ip4_addr_get_u32(ip4_current_dest_addr()) & ip4_addr_get_u32(netif_ip4_netmask(netif)), + ip4_addr_get_u32(netif_ip4_addr(netif)) & ip4_addr_get_u32(netif_ip4_netmask(netif)), + ip4_addr_get_u32(ip4_current_dest_addr()) & ~ip4_addr_get_u32(netif_ip4_netmask(netif)))); + + /* interface is up and configured? */ + if ((netif_is_up(netif)) && (!ip4_addr_isany_val(*netif_ip4_addr(netif)))) { + /* unicast to this interface address? */ + if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) || + /* or broadcast on this interface network address? */ + ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) +#if LWIP_NETIF_LOOPBACK && !LWIP_HAVE_LOOPIF + || (ip4_addr_get_u32(ip4_current_dest_addr()) == PP_HTONL(IPADDR_LOOPBACK)) +#endif /* LWIP_NETIF_LOOPBACK && !LWIP_HAVE_LOOPIF */ + ) { + LWIP_DEBUGF(IP_DEBUG, ("ip4_input: packet accepted on interface %c%c\n", + netif->name[0], netif->name[1])); + /* accept on this netif */ + return 1; + } +#if LWIP_AUTOIP + /* connections to link-local addresses must persist after changing + the netif's address (RFC3927 ch. 1.9) */ + if (autoip_accept_packet(netif, ip4_current_dest_addr())) { + LWIP_DEBUGF(IP_DEBUG, ("ip4_input: LLA packet accepted on interface %c%c\n", + netif->name[0], netif->name[1])); + /* accept on this netif */ + return 1; + } +#endif /* LWIP_AUTOIP */ + } + return 0; +} + /** * This function is called by the network interface device driver when * an IP packet is received. The function does the basic checks of the @@ -373,13 +425,18 @@ return_noroute: err_t ip4_input(struct pbuf *p, struct netif *inp) { - struct ip_hdr *iphdr; + const struct ip_hdr *iphdr; struct netif *netif; u16_t iphdr_hlen; u16_t iphdr_len; #if IP_ACCEPT_LINK_LAYER_ADDRESSING || LWIP_IGMP int check_ip_src = 1; #endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING || LWIP_IGMP */ +#if LWIP_RAW + raw_input_state_t raw_status; +#endif /* LWIP_RAW */ + + LWIP_ASSERT_CORE_LOCKED(); IP_STATS_INC(ip.recv); MIB2_STATS_INC(mib2.ipinreceives); @@ -403,10 +460,8 @@ ip4_input(struct pbuf *p, struct netif *inp) } #endif - /* obtain IP header length in number of 32-bit words */ - iphdr_hlen = IPH_HL(iphdr); - /* calculate IP header length in bytes */ - iphdr_hlen *= 4; + /* obtain IP header length in bytes */ + iphdr_hlen = IPH_HL_BYTES(iphdr); /* obtain ip length in bytes */ iphdr_len = lwip_ntohs(IPH_LEN(iphdr)); @@ -419,17 +474,17 @@ ip4_input(struct pbuf *p, struct netif *inp) if ((iphdr_hlen > p->len) || (iphdr_len > p->tot_len) || (iphdr_hlen < IP_HLEN)) { if (iphdr_hlen < IP_HLEN) { LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("ip4_input: short IP header (%"U16_F" bytes) received, IP packet dropped\n", iphdr_hlen)); + ("ip4_input: short IP header (%"U16_F" bytes) received, IP packet dropped\n", iphdr_hlen)); } if (iphdr_hlen > p->len) { LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("IP header (len %"U16_F") does not fit in first pbuf (len %"U16_F"), IP packet dropped.\n", - iphdr_hlen, p->len)); + ("IP header (len %"U16_F") does not fit in first pbuf (len %"U16_F"), IP packet dropped.\n", + iphdr_hlen, p->len)); } if (iphdr_len > p->tot_len) { LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("IP (len %"U16_F") is longer than pbuf (len %"U16_F"), IP packet dropped.\n", - iphdr_len, p->tot_len)); + ("IP (len %"U16_F") is longer than pbuf (len %"U16_F"), IP packet dropped.\n", + iphdr_len, p->tot_len)); } /* free (drop) packet pbufs */ pbuf_free(p); @@ -445,7 +500,7 @@ ip4_input(struct pbuf *p, struct netif *inp) if (inet_chksum(iphdr, iphdr_hlen) != 0) { LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("Checksum (0x%"X16_F") failed, IP packet dropped.\n", inet_chksum(iphdr, iphdr_hlen))); + ("Checksum (0x%"X16_F") failed, IP packet dropped.\n", inet_chksum(iphdr, iphdr_hlen))); ip4_debug_print(p); pbuf_free(p); IP_STATS_INC(ip.chkerr); @@ -484,62 +539,31 @@ ip4_input(struct pbuf *p, struct netif *inp) #endif /* LWIP_IGMP */ } else { /* start trying with inp. if that's not acceptable, start walking the - list of configured netifs. - 'first' is used as a boolean to mark whether we started walking the list */ - int first = 1; - netif = inp; - do { - LWIP_DEBUGF(IP_DEBUG, ("ip_input: iphdr->dest 0x%"X32_F" netif->ip_addr 0x%"X32_F" (0x%"X32_F", 0x%"X32_F", 0x%"X32_F")\n", - ip4_addr_get_u32(&iphdr->dest), ip4_addr_get_u32(netif_ip4_addr(netif)), - ip4_addr_get_u32(&iphdr->dest) & ip4_addr_get_u32(netif_ip4_netmask(netif)), - ip4_addr_get_u32(netif_ip4_addr(netif)) & ip4_addr_get_u32(netif_ip4_netmask(netif)), - ip4_addr_get_u32(&iphdr->dest) & ~ip4_addr_get_u32(netif_ip4_netmask(netif)))); - - /* interface is up and configured? */ - if ((netif_is_up(netif)) && (!ip4_addr_isany_val(*netif_ip4_addr(netif)))) { - /* unicast to this interface address? */ - if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) || - /* or broadcast on this interface network address? */ - ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) -#if LWIP_NETIF_LOOPBACK && !LWIP_HAVE_LOOPIF - || (ip4_addr_get_u32(ip4_current_dest_addr()) == PP_HTONL(IPADDR_LOOPBACK)) -#endif /* LWIP_NETIF_LOOPBACK && !LWIP_HAVE_LOOPIF */ - ) { - LWIP_DEBUGF(IP_DEBUG, ("ip4_input: packet accepted on interface %c%c\n", - netif->name[0], netif->name[1])); - /* break out of for loop */ - break; - } -#if LWIP_AUTOIP - /* connections to link-local addresses must persist after changing - the netif's address (RFC3927 ch. 1.9) */ - if (autoip_accept_packet(netif, ip4_current_dest_addr())) { - LWIP_DEBUGF(IP_DEBUG, ("ip4_input: LLA packet accepted on interface %c%c\n", - netif->name[0], netif->name[1])); - /* break out of for loop */ - break; - } -#endif /* LWIP_AUTOIP */ - } - if (first) { + list of configured netifs. */ + if (ip4_input_accept(inp)) { + netif = inp; + } else { + netif = NULL; #if !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF - /* Packets sent to the loopback address must not be accepted on an - * interface that does not have the loopback address assigned to it, - * unless a non-loopback interface is used for loopback traffic. */ - if (ip4_addr_isloopback(ip4_current_dest_addr())) { - netif = NULL; - break; - } + /* Packets sent to the loopback address must not be accepted on an + * interface that does not have the loopback address assigned to it, + * unless a non-loopback interface is used for loopback traffic. */ + if (!ip4_addr_isloopback(ip4_current_dest_addr())) #endif /* !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF */ - first = 0; - netif = netif_list; - } else { - netif = netif->next; + { +#if !LWIP_SINGLE_NETIF + NETIF_FOREACH(netif) { + if (netif == inp) { + /* we checked that before already */ + continue; + } + if (ip4_input_accept(netif)) { + break; + } + } +#endif /* !LWIP_SINGLE_NETIF */ } - if (netif == inp) { - netif = netif->next; - } - } while (netif != NULL); + } } #if IP_ACCEPT_LINK_LAYER_ADDRESSING @@ -555,9 +579,9 @@ ip4_input(struct pbuf *p, struct netif *inp) if (netif == NULL) { /* remote port is DHCP server? */ if (IPH_PROTO(iphdr) == IP_PROTO_UDP) { - struct udp_hdr *udphdr = (struct udp_hdr *)((u8_t *)iphdr + iphdr_hlen); + const struct udp_hdr *udphdr = (const struct udp_hdr *)((const u8_t *)iphdr + iphdr_hlen); LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip4_input: UDP packet to DHCP client port %"U16_F"\n", - lwip_ntohs(udphdr->dest))); + lwip_ntohs(udphdr->dest))); if (IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(udphdr->dest)) { LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip4_input: DHCP packet accepted.\n")); netif = inp; @@ -571,7 +595,7 @@ ip4_input(struct pbuf *p, struct netif *inp) #if LWIP_IGMP || IP_ACCEPT_LINK_LAYER_ADDRESSING if (check_ip_src #if IP_ACCEPT_LINK_LAYER_ADDRESSING - /* DHCP servers need 0.0.0.0 to be allowed as source address (RFC 1.1.2.2: 3.2.1.3/a) */ + /* DHCP servers need 0.0.0.0 to be allowed as source address (RFC 1.1.2.2: 3.2.1.3/a) */ && !ip4_addr_isany_val(*ip4_current_src_addr()) #endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */ ) @@ -598,7 +622,7 @@ ip4_input(struct pbuf *p, struct netif *inp) /* non-broadcast packet? */ if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), inp)) { /* try to forward IP packet on (other) interfaces */ - ip4_forward(p, iphdr, inp); + ip4_forward(p, (struct ip_hdr *)p->payload, inp); } else #endif /* IP_FORWARD */ { @@ -613,18 +637,18 @@ ip4_input(struct pbuf *p, struct netif *inp) if ((IPH_OFFSET(iphdr) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) { #if IP_REASSEMBLY /* packet fragment reassembly code present? */ LWIP_DEBUGF(IP_DEBUG, ("IP packet is a fragment (id=0x%04"X16_F" tot_len=%"U16_F" len=%"U16_F" MF=%"U16_F" offset=%"U16_F"), calling ip4_reass()\n", - lwip_ntohs(IPH_ID(iphdr)), p->tot_len, lwip_ntohs(IPH_LEN(iphdr)), (u16_t)!!(IPH_OFFSET(iphdr) & PP_HTONS(IP_MF)), (u16_t)((lwip_ntohs(IPH_OFFSET(iphdr)) & IP_OFFMASK)*8))); + lwip_ntohs(IPH_ID(iphdr)), p->tot_len, lwip_ntohs(IPH_LEN(iphdr)), (u16_t)!!(IPH_OFFSET(iphdr) & PP_HTONS(IP_MF)), (u16_t)((lwip_ntohs(IPH_OFFSET(iphdr)) & IP_OFFMASK) * 8))); /* reassemble the packet*/ p = ip4_reass(p); /* packet not fully reassembled yet? */ if (p == NULL) { return ERR_OK; } - iphdr = (struct ip_hdr *)p->payload; + iphdr = (const struct ip_hdr *)p->payload; #else /* IP_REASSEMBLY == 0, no packet fragment reassembly code present */ pbuf_free(p); LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("IP packet dropped since it was fragmented (0x%"X16_F") (while IP_REASSEMBLY == 0).\n", - lwip_ntohs(IPH_OFFSET(iphdr)))); + lwip_ntohs(IPH_OFFSET(iphdr)))); IP_STATS_INC(ip.opterr); IP_STATS_INC(ip.drop); /* unsupported protocol feature */ @@ -659,59 +683,67 @@ ip4_input(struct pbuf *p, struct netif *inp) ip_data.current_netif = netif; ip_data.current_input_netif = inp; ip_data.current_ip4_header = iphdr; - ip_data.current_ip_header_tot_len = IPH_HL(iphdr) * 4; + ip_data.current_ip_header_tot_len = IPH_HL_BYTES(iphdr); #if LWIP_RAW /* raw input did not eat the packet? */ - if (raw_input(p, inp) == 0) + raw_status = raw_input(p, inp); + if (raw_status != RAW_INPUT_EATEN) #endif /* LWIP_RAW */ { - pbuf_header(p, -(s16_t)iphdr_hlen); /* Move to payload, no check necessary. */ + pbuf_remove_header(p, iphdr_hlen); /* Move to payload, no check necessary. */ switch (IPH_PROTO(iphdr)) { #if LWIP_UDP - case IP_PROTO_UDP: + case IP_PROTO_UDP: #if LWIP_UDPLITE - case IP_PROTO_UDPLITE: + case IP_PROTO_UDPLITE: #endif /* LWIP_UDPLITE */ - MIB2_STATS_INC(mib2.ipindelivers); - udp_input(p, inp); - break; + MIB2_STATS_INC(mib2.ipindelivers); + udp_input(p, inp); + break; #endif /* LWIP_UDP */ #if LWIP_TCP - case IP_PROTO_TCP: - MIB2_STATS_INC(mib2.ipindelivers); - tcp_input(p, inp); - break; + case IP_PROTO_TCP: + MIB2_STATS_INC(mib2.ipindelivers); + tcp_input(p, inp); + break; #endif /* LWIP_TCP */ #if LWIP_ICMP - case IP_PROTO_ICMP: - MIB2_STATS_INC(mib2.ipindelivers); - icmp_input(p, inp); - break; + case IP_PROTO_ICMP: + MIB2_STATS_INC(mib2.ipindelivers); + icmp_input(p, inp); + break; #endif /* LWIP_ICMP */ #if LWIP_IGMP - case IP_PROTO_IGMP: - igmp_input(p, inp, ip4_current_dest_addr()); - break; + case IP_PROTO_IGMP: + igmp_input(p, inp, ip4_current_dest_addr()); + break; #endif /* LWIP_IGMP */ - default: + default: +#if LWIP_RAW + if (raw_status == RAW_INPUT_DELIVERED) { + MIB2_STATS_INC(mib2.ipindelivers); + } else +#endif /* LWIP_RAW */ + { #if LWIP_ICMP - /* send ICMP destination protocol unreachable unless is was a broadcast */ - if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) && - !ip4_addr_ismulticast(ip4_current_dest_addr())) { - pbuf_header_force(p, iphdr_hlen); /* Move to ip header, no check necessary. */ - p->payload = iphdr; - icmp_dest_unreach(p, ICMP_DUR_PROTO); - } + /* send ICMP destination protocol unreachable unless is was a broadcast */ + if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) && + !ip4_addr_ismulticast(ip4_current_dest_addr())) { + pbuf_header_force(p, (s16_t)iphdr_hlen); /* Move to ip header, no check necessary. */ + icmp_dest_unreach(p, ICMP_DUR_PROTO); + } #endif /* LWIP_ICMP */ - pbuf_free(p); - LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("Unsupported transport protocol %"U16_F"\n", (u16_t)IPH_PROTO(iphdr))); + LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("Unsupported transport protocol %"U16_F"\n", (u16_t)IPH_PROTO(iphdr))); - IP_STATS_INC(ip.proterr); - IP_STATS_INC(ip.drop); - MIB2_STATS_INC(mib2.ipinunknownprotos); + IP_STATS_INC(ip.proterr); + IP_STATS_INC(ip.drop); + MIB2_STATS_INC(mib2.ipinunknownprotos); + } + pbuf_free(p); + break; } } @@ -753,8 +785,8 @@ ip4_input(struct pbuf *p, struct netif *inp) */ err_t ip4_output_if(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, - u8_t ttl, u8_t tos, - u8_t proto, struct netif *netif) + u8_t ttl, u8_t tos, + u8_t proto, struct netif *netif) { #if IP_OPTIONS_SEND return ip4_output_if_opt(p, src, dest, ttl, tos, proto, netif, NULL, 0); @@ -768,8 +800,8 @@ ip4_output_if(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, */ err_t ip4_output_if_opt(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, - u8_t ttl, u8_t tos, u8_t proto, struct netif *netif, void *ip_options, - u16_t optlen) + u8_t ttl, u8_t tos, u8_t proto, struct netif *netif, void *ip_options, + u16_t optlen) { #endif /* IP_OPTIONS_SEND */ const ip4_addr_t *src_used = src; @@ -781,7 +813,7 @@ ip4_output_if_opt(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, #if IP_OPTIONS_SEND return ip4_output_if_opt_src(p, src_used, dest, ttl, tos, proto, netif, - ip_options, optlen); + ip_options, optlen); #else /* IP_OPTIONS_SEND */ return ip4_output_if_src(p, src_used, dest, ttl, tos, proto, netif); #endif /* IP_OPTIONS_SEND */ @@ -793,8 +825,8 @@ ip4_output_if_opt(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, */ err_t ip4_output_if_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, - u8_t ttl, u8_t tos, - u8_t proto, struct netif *netif) + u8_t ttl, u8_t tos, + u8_t proto, struct netif *netif) { #if IP_OPTIONS_SEND return ip4_output_if_opt_src(p, src, dest, ttl, tos, proto, netif, NULL, 0); @@ -806,8 +838,8 @@ ip4_output_if_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, */ err_t ip4_output_if_opt_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, - u8_t ttl, u8_t tos, u8_t proto, struct netif *netif, void *ip_options, - u16_t optlen) + u8_t ttl, u8_t tos, u8_t proto, struct netif *netif, void *ip_options, + u16_t optlen) { #endif /* IP_OPTIONS_SEND */ struct ip_hdr *iphdr; @@ -816,6 +848,7 @@ ip4_output_if_opt_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *d u32_t chk_sum = 0; #endif /* CHECKSUM_GEN_IP_INLINE */ + LWIP_ASSERT_CORE_LOCKED(); LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p); MIB2_STATS_INC(mib2.ipoutrequests); @@ -829,11 +862,18 @@ ip4_output_if_opt_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *d #if CHECKSUM_GEN_IP_INLINE int i; #endif /* CHECKSUM_GEN_IP_INLINE */ + if (optlen > (IP_HLEN_MAX - IP_HLEN)) { + /* optlen too long */ + LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip4_output_if_opt: optlen too long\n")); + IP_STATS_INC(ip.err); + MIB2_STATS_INC(mib2.ipoutdiscards); + return ERR_VAL; + } /* round up to a multiple of 4 */ - optlen_aligned = ((optlen + 3) & ~3); - ip_hlen += optlen_aligned; + optlen_aligned = (u16_t)((optlen + 3) & ~3); + ip_hlen = (u16_t)(ip_hlen + optlen_aligned); /* First write in the IP options */ - if (pbuf_header(p, optlen_aligned)) { + if (pbuf_add_header(p, optlen_aligned)) { LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip4_output_if_opt: not enough room for IP options in pbuf\n")); IP_STATS_INC(ip.err); MIB2_STATS_INC(mib2.ipoutdiscards); @@ -842,17 +882,17 @@ ip4_output_if_opt_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *d MEMCPY(p->payload, ip_options, optlen); if (optlen < optlen_aligned) { /* zero the remaining bytes */ - memset(((char*)p->payload) + optlen, 0, optlen_aligned - optlen); + memset(((char *)p->payload) + optlen, 0, (size_t)(optlen_aligned - optlen)); } #if CHECKSUM_GEN_IP_INLINE - for (i = 0; i < optlen_aligned/2; i++) { - chk_sum += ((u16_t*)p->payload)[i]; + for (i = 0; i < optlen_aligned / 2; i++) { + chk_sum += ((u16_t *)p->payload)[i]; } #endif /* CHECKSUM_GEN_IP_INLINE */ } #endif /* IP_OPTIONS_SEND */ /* generate IP header */ - if (pbuf_header(p, IP_HLEN)) { + if (pbuf_add_header(p, IP_HLEN)) { LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip4_output: not enough room for IP header in pbuf\n")); IP_STATS_INC(ip.err); @@ -862,7 +902,7 @@ ip4_output_if_opt_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *d iphdr = (struct ip_hdr *)p->payload; LWIP_ASSERT("check that first pbuf can hold struct ip_hdr", - (p->len >= sizeof(struct ip_hdr))); + (p->len >= sizeof(struct ip_hdr))); IPH_TTL_SET(iphdr, ttl); IPH_PROTO_SET(iphdr, proto); @@ -924,6 +964,12 @@ ip4_output_if_opt_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *d #endif /* CHECKSUM_GEN_IP_INLINE */ } else { /* IP header already included in p */ + if (p->len < IP_HLEN) { + LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip4_output: LWIP_IP_HDRINCL but pbuf is too short\n")); + IP_STATS_INC(ip.err); + MIB2_STATS_INC(mib2.ipoutdiscards); + return ERR_BUF; + } iphdr = (struct ip_hdr *)p->payload; ip4_addr_copy(dest_addr, iphdr->dest); dest = &dest_addr; @@ -939,7 +985,7 @@ ip4_output_if_opt_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *d #if !LWIP_HAVE_LOOPIF || ip4_addr_isloopback(dest) #endif /* !LWIP_HAVE_LOOPIF */ - ) { + ) { /* Packet to self, enqueue it for loopback */ LWIP_DEBUGF(IP_DEBUG, ("netif_loop_output()")); return netif_loop_output(netif, p); @@ -980,15 +1026,15 @@ ip4_output_if_opt_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *d */ err_t ip4_output(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, - u8_t ttl, u8_t tos, u8_t proto) + u8_t ttl, u8_t tos, u8_t proto) { struct netif *netif; LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p); - if ((netif = ip4_route_src(dest, src)) == NULL) { + if ((netif = ip4_route_src(src, dest)) == NULL) { LWIP_DEBUGF(IP_DEBUG, ("ip4_output: No route to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - ip4_addr1_16(dest), ip4_addr2_16(dest), ip4_addr3_16(dest), ip4_addr4_16(dest))); + ip4_addr1_16(dest), ip4_addr2_16(dest), ip4_addr3_16(dest), ip4_addr4_16(dest))); IP_STATS_INC(ip.rterr); return ERR_RTE; } @@ -996,7 +1042,7 @@ ip4_output(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, return ip4_output_if(p, src, dest, ttl, tos, proto, netif); } -#if LWIP_NETIF_HWADDRHINT +#if LWIP_NETIF_USE_HINTS /** Like ip_output, but takes and addr_hint pointer that is passed on to netif->addr_hint * before calling ip_output_if. * @@ -1009,7 +1055,7 @@ ip4_output(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, * @param ttl the TTL value to be set in the IP header * @param tos the TOS value to be set in the IP header * @param proto the PROTOCOL to be set in the IP header - * @param addr_hint address hint pointer set to netif->addr_hint before + * @param netif_hint netif output hint pointer set to netif->hint before * calling ip_output_if() * * @return ERR_RTE if no route is found @@ -1017,27 +1063,27 @@ ip4_output(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, */ err_t ip4_output_hinted(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, - u8_t ttl, u8_t tos, u8_t proto, u8_t *addr_hint) + u8_t ttl, u8_t tos, u8_t proto, struct netif_hint *netif_hint) { struct netif *netif; err_t err; LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p); - if ((netif = ip4_route_src(dest, src)) == NULL) { + if ((netif = ip4_route_src(src, dest)) == NULL) { LWIP_DEBUGF(IP_DEBUG, ("ip4_output: No route to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - ip4_addr1_16(dest), ip4_addr2_16(dest), ip4_addr3_16(dest), ip4_addr4_16(dest))); + ip4_addr1_16(dest), ip4_addr2_16(dest), ip4_addr3_16(dest), ip4_addr4_16(dest))); IP_STATS_INC(ip.rterr); return ERR_RTE; } - NETIF_SET_HWADDRHINT(netif, addr_hint); + NETIF_SET_HINTS(netif, netif_hint); err = ip4_output_if(p, src, dest, ttl, tos, proto, netif); - NETIF_SET_HWADDRHINT(netif, NULL); + NETIF_RESET_HINTS(netif); return err; } -#endif /* LWIP_NETIF_HWADDRHINT*/ +#endif /* LWIP_NETIF_USE_HINTS*/ #if IP_DEBUG /* Print an IP header by using LWIP_DEBUGF @@ -1051,34 +1097,34 @@ ip4_debug_print(struct pbuf *p) LWIP_DEBUGF(IP_DEBUG, ("IP header:\n")); LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n")); LWIP_DEBUGF(IP_DEBUG, ("|%2"S16_F" |%2"S16_F" | 0x%02"X16_F" | %5"U16_F" | (v, hl, tos, len)\n", - (u16_t)IPH_V(iphdr), - (u16_t)IPH_HL(iphdr), - (u16_t)IPH_TOS(iphdr), - lwip_ntohs(IPH_LEN(iphdr)))); + (u16_t)IPH_V(iphdr), + (u16_t)IPH_HL(iphdr), + (u16_t)IPH_TOS(iphdr), + lwip_ntohs(IPH_LEN(iphdr)))); LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n")); LWIP_DEBUGF(IP_DEBUG, ("| %5"U16_F" |%"U16_F"%"U16_F"%"U16_F"| %4"U16_F" | (id, flags, offset)\n", - lwip_ntohs(IPH_ID(iphdr)), - (u16_t)(lwip_ntohs(IPH_OFFSET(iphdr)) >> 15 & 1), - (u16_t)(lwip_ntohs(IPH_OFFSET(iphdr)) >> 14 & 1), - (u16_t)(lwip_ntohs(IPH_OFFSET(iphdr)) >> 13 & 1), - (u16_t)(lwip_ntohs(IPH_OFFSET(iphdr)) & IP_OFFMASK))); + lwip_ntohs(IPH_ID(iphdr)), + (u16_t)(lwip_ntohs(IPH_OFFSET(iphdr)) >> 15 & 1), + (u16_t)(lwip_ntohs(IPH_OFFSET(iphdr)) >> 14 & 1), + (u16_t)(lwip_ntohs(IPH_OFFSET(iphdr)) >> 13 & 1), + (u16_t)(lwip_ntohs(IPH_OFFSET(iphdr)) & IP_OFFMASK))); LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n")); LWIP_DEBUGF(IP_DEBUG, ("| %3"U16_F" | %3"U16_F" | 0x%04"X16_F" | (ttl, proto, chksum)\n", - (u16_t)IPH_TTL(iphdr), - (u16_t)IPH_PROTO(iphdr), - lwip_ntohs(IPH_CHKSUM(iphdr)))); + (u16_t)IPH_TTL(iphdr), + (u16_t)IPH_PROTO(iphdr), + lwip_ntohs(IPH_CHKSUM(iphdr)))); LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n")); LWIP_DEBUGF(IP_DEBUG, ("| %3"U16_F" | %3"U16_F" | %3"U16_F" | %3"U16_F" | (src)\n", - ip4_addr1_16(&iphdr->src), - ip4_addr2_16(&iphdr->src), - ip4_addr3_16(&iphdr->src), - ip4_addr4_16(&iphdr->src))); + ip4_addr1_16_val(iphdr->src), + ip4_addr2_16_val(iphdr->src), + ip4_addr3_16_val(iphdr->src), + ip4_addr4_16_val(iphdr->src))); LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n")); LWIP_DEBUGF(IP_DEBUG, ("| %3"U16_F" | %3"U16_F" | %3"U16_F" | %3"U16_F" | (dest)\n", - ip4_addr1_16(&iphdr->dest), - ip4_addr2_16(&iphdr->dest), - ip4_addr3_16(&iphdr->dest), - ip4_addr4_16(&iphdr->dest))); + ip4_addr1_16_val(iphdr->dest), + ip4_addr2_16_val(iphdr->dest), + ip4_addr3_16_val(iphdr->dest), + ip4_addr4_16_val(iphdr->dest))); LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n")); } #endif /* IP_DEBUG */ diff --git a/Libraries/LwIP/src/core/ipv4/ip4_addr.c b/Libraries/LwIP/src/core/ipv4/ip4_addr.c index 40e9ffa..92077c2 100755 --- a/Libraries/LwIP/src/core/ipv4/ip4_addr.c +++ b/Libraries/LwIP/src/core/ipv4/ip4_addr.c @@ -64,19 +64,19 @@ ip4_addr_isbroadcast_u32(u32_t addr, const struct netif *netif) if ((~addr == IPADDR_ANY) || (addr == IPADDR_ANY)) { return 1; - /* no broadcast support on this network interface? */ + /* no broadcast support on this network interface? */ } else if ((netif->flags & NETIF_FLAG_BROADCAST) == 0) { /* the given address cannot be a broadcast address * nor can we check against any broadcast addresses */ return 0; - /* address matches network interface address exactly? => no broadcast */ + /* address matches network interface address exactly? => no broadcast */ } else if (addr == ip4_addr_get_u32(netif_ip4_addr(netif))) { return 0; - /* on the same (sub) network... */ + /* on the same (sub) network... */ } else if (ip4_addr_netcmp(&ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) - /* ...and host identifier bits are all ones? =>... */ - && ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) == - (IPADDR_BROADCAST & ~ip4_addr_get_u32(netif_ip4_netmask(netif))))) { + /* ...and host identifier bits are all ones? =>... */ + && ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) == + (IPADDR_BROADCAST & ~ip4_addr_get_u32(netif_ip4_netmask(netif))))) { /* => network broadcast address */ return 1; } else { @@ -112,16 +112,6 @@ ip4_addr_netmask_valid(u32_t netmask) return 1; } -/* Here for now until needed in other places in lwIP */ -#ifndef isprint -#define in_range(c, lo, up) ((u8_t)c >= lo && (u8_t)c <= up) -#define isprint(c) in_range(c, 0x20, 0x7f) -#define isdigit(c) in_range(c, '0', '9') -#define isxdigit(c) (isdigit(c) || in_range(c, 'a', 'f') || in_range(c, 'A', 'F')) -#define islower(c) in_range(c, 'a', 'z') -#define isspace(c) (c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v') -#endif - /** * Ascii internet address interpretation routine. * The value returned is in network order. @@ -167,7 +157,7 @@ ip4addr_aton(const char *cp, ip4_addr_t *addr) * Values are specified as for C: * 0x=hex, 0=octal, 1-9=decimal. */ - if (!isdigit(c)) { + if (!lwip_isdigit(c)) { return 0; } val = 0; @@ -182,11 +172,11 @@ ip4addr_aton(const char *cp, ip4_addr_t *addr) } } for (;;) { - if (isdigit(c)) { + if (lwip_isdigit(c)) { val = (val * base) + (u32_t)(c - '0'); c = *++cp; - } else if (base == 16 && isxdigit(c)) { - val = (val << 4) | (u32_t)(c + 10 - (islower(c) ? 'a' : 'A')); + } else if (base == 16 && lwip_isxdigit(c)) { + val = (val << 4) | (u32_t)(c + 10 - (lwip_islower(c) ? 'a' : 'A')); c = *++cp; } else { break; @@ -211,7 +201,7 @@ ip4addr_aton(const char *cp, ip4_addr_t *addr) /* * Check for trailing characters. */ - if (c != '\0' && !isspace(c)) { + if (c != '\0' && !lwip_isspace(c)) { return 0; } /* @@ -220,44 +210,44 @@ ip4addr_aton(const char *cp, ip4_addr_t *addr) */ switch (pp - parts + 1) { - case 0: - return 0; /* initial nondigit */ + case 0: + return 0; /* initial nondigit */ - case 1: /* a -- 32 bits */ - break; + case 1: /* a -- 32 bits */ + break; - case 2: /* a.b -- 8.24 bits */ - if (val > 0xffffffUL) { - return 0; - } - if (parts[0] > 0xff) { - return 0; - } - val |= parts[0] << 24; - break; + case 2: /* a.b -- 8.24 bits */ + if (val > 0xffffffUL) { + return 0; + } + if (parts[0] > 0xff) { + return 0; + } + val |= parts[0] << 24; + break; - case 3: /* a.b.c -- 8.8.16 bits */ - if (val > 0xffff) { - return 0; - } - if ((parts[0] > 0xff) || (parts[1] > 0xff)) { - return 0; - } - val |= (parts[0] << 24) | (parts[1] << 16); - break; + case 3: /* a.b.c -- 8.8.16 bits */ + if (val > 0xffff) { + return 0; + } + if ((parts[0] > 0xff) || (parts[1] > 0xff)) { + return 0; + } + val |= (parts[0] << 24) | (parts[1] << 16); + break; - case 4: /* a.b.c.d -- 8.8.8.8 bits */ - if (val > 0xff) { - return 0; - } - if ((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xff)) { - return 0; - } - val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); - break; - default: - LWIP_ASSERT("unhandled", 0); - break; + case 4: /* a.b.c.d -- 8.8.8.8 bits */ + if (val > 0xff) { + return 0; + } + if ((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xff)) { + return 0; + } + val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); + break; + default: + LWIP_ASSERT("unhandled", 0); + break; } if (addr) { ip4_addr_set_u32(addr, lwip_htonl(val)); @@ -273,7 +263,7 @@ ip4addr_aton(const char *cp, ip4_addr_t *addr) * @return pointer to a global static (!) buffer that holds the ASCII * representation of addr */ -char* +char * ip4addr_ntoa(const ip4_addr_t *addr) { static char str[IP4ADDR_STRLEN_MAX]; @@ -281,7 +271,7 @@ ip4addr_ntoa(const ip4_addr_t *addr) } /** - * Same as ipaddr_ntoa, but reentrant since a user-supplied buffer is used. + * Same as ip4addr_ntoa, but reentrant since a user-supplied buffer is used. * * @param addr ip address in network order to convert * @param buf target buffer where the string is stored @@ -289,7 +279,7 @@ ip4addr_ntoa(const ip4_addr_t *addr) * @return either pointer to buf which now holds the ASCII * representation of addr or NULL if buf was too small */ -char* +char * ip4addr_ntoa_r(const ip4_addr_t *addr, char *buf, int buflen) { u32_t s_addr; diff --git a/Libraries/LwIP/src/core/ipv4/ip4_frag.c b/Libraries/LwIP/src/core/ipv4/ip4_frag.c index 996c8be..b2fd14c 100755 --- a/Libraries/LwIP/src/core/ipv4/ip4_frag.c +++ b/Libraries/LwIP/src/core/ipv4/ip4_frag.c @@ -135,7 +135,7 @@ ip_reass_tmr(void) * clean up the incomplete fragment assembly */ if (r->timer > 0) { r->timer--; - LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer dec %"U16_F"\n",(u16_t)r->timer)); + LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer dec %"U16_F"\n", (u16_t)r->timer)); prev = r; r = r->next; } else { @@ -147,8 +147,8 @@ ip_reass_tmr(void) r = r->next; /* free the helper struct and all enqueued pbufs */ ip_reass_free_complete_datagram(tmp, prev); - } - } + } + } } /** @@ -186,7 +186,7 @@ ip_reass_free_complete_datagram(struct ip_reassdata *ipr, struct ip_reassdata *p icmp_time_exceeded(p, ICMP_TE_FRAG); clen = pbuf_clen(p); LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff); - pbufs_freed += clen; + pbufs_freed = (u16_t)(pbufs_freed + clen); pbuf_free(p); } #endif /* LWIP_ICMP */ @@ -202,13 +202,13 @@ ip_reass_free_complete_datagram(struct ip_reassdata *ipr, struct ip_reassdata *p p = iprh->next_pbuf; clen = pbuf_clen(pcur); LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff); - pbufs_freed += clen; + pbufs_freed = (u16_t)(pbufs_freed + clen); pbuf_free(pcur); } /* Then, unchain the struct ip_reassdata from the list and free it. */ ip_reass_dequeue_datagram(ipr, prev); - LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= pbufs_freed); - ip_reass_pbufcount -= pbufs_freed; + LWIP_ASSERT("ip_reass_pbufcount >= pbufs_freed", ip_reass_pbufcount >= pbufs_freed); + ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - pbufs_freed); return pbufs_freed; } @@ -274,10 +274,10 @@ ip_reass_remove_oldest_datagram(struct ip_hdr *fraghdr, int pbufs_needed) * @param clen number of pbufs needed to enqueue (used for freeing other datagrams if not enough space) * @return A pointer to the queue location into which the fragment was enqueued */ -static struct ip_reassdata* +static struct ip_reassdata * ip_reass_enqueue_new_datagram(struct ip_hdr *fraghdr, int clen) { - struct ip_reassdata* ipr; + struct ip_reassdata *ipr; #if ! IP_REASS_FREE_OLDEST LWIP_UNUSED_ARG(clen); #endif @@ -293,7 +293,7 @@ ip_reass_enqueue_new_datagram(struct ip_hdr *fraghdr, int clen) #endif /* IP_REASS_FREE_OLDEST */ { IPFRAG_STATS_INC(ip_frag.memerr); - LWIP_DEBUGF(IP_REASS_DEBUG,("Failed to alloc reassdata struct\n")); + LWIP_DEBUGF(IP_REASS_DEBUG, ("Failed to alloc reassdata struct\n")); return NULL; } } @@ -343,31 +343,42 @@ ip_reass_dequeue_datagram(struct ip_reassdata *ipr, struct ip_reassdata *prev) static int ip_reass_chain_frag_into_datagram_and_validate(struct ip_reassdata *ipr, struct pbuf *new_p, int is_last) { - struct ip_reass_helper *iprh, *iprh_tmp, *iprh_prev=NULL; + struct ip_reass_helper *iprh, *iprh_tmp, *iprh_prev = NULL; struct pbuf *q; u16_t offset, len; + u8_t hlen; struct ip_hdr *fraghdr; int valid = 1; /* Extract length and fragment offset from current fragment */ - fraghdr = (struct ip_hdr*)new_p->payload; - len = lwip_ntohs(IPH_LEN(fraghdr)) - IPH_HL(fraghdr) * 4; - offset = (lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) * 8; + fraghdr = (struct ip_hdr *)new_p->payload; + len = lwip_ntohs(IPH_LEN(fraghdr)); + hlen = IPH_HL_BYTES(fraghdr); + if (hlen > len) { + /* invalid datagram */ + return IP_REASS_VALIDATE_PBUF_DROPPED; + } + len = (u16_t)(len - hlen); + offset = IPH_OFFSET_BYTES(fraghdr); /* overwrite the fragment's ip header from the pbuf with our helper struct, * and setup the embedded helper structure. */ /* make sure the struct ip_reass_helper fits into the IP header */ LWIP_ASSERT("sizeof(struct ip_reass_helper) <= IP_HLEN", sizeof(struct ip_reass_helper) <= IP_HLEN); - iprh = (struct ip_reass_helper*)new_p->payload; + iprh = (struct ip_reass_helper *)new_p->payload; iprh->next_pbuf = NULL; iprh->start = offset; - iprh->end = offset + len; + iprh->end = (u16_t)(offset + len); + if (iprh->end < offset) { + /* u16_t overflow, cannot handle this */ + return IP_REASS_VALIDATE_PBUF_DROPPED; + } /* Iterate through until we either get to the end of the list (append), * or we find one with a larger offset (insert). */ for (q = ipr->p; q != NULL;) { - iprh_tmp = (struct ip_reass_helper*)q->payload; + iprh_tmp = (struct ip_reass_helper *)q->payload; if (iprh->start < iprh_tmp->start) { /* the new pbuf should be inserted before this */ iprh->next_pbuf = q; @@ -376,7 +387,7 @@ ip_reass_chain_frag_into_datagram_and_validate(struct ip_reassdata *ipr, struct #if IP_REASS_CHECK_OVERLAP if ((iprh->start < iprh_prev->end) || (iprh->end > iprh_tmp->start)) { /* fragment overlaps with previous or following, throw away */ - goto freepbuf; + return IP_REASS_VALIDATE_PBUF_DROPPED; } #endif /* IP_REASS_CHECK_OVERLAP */ iprh_prev->next_pbuf = new_p; @@ -389,7 +400,7 @@ ip_reass_chain_frag_into_datagram_and_validate(struct ip_reassdata *ipr, struct #if IP_REASS_CHECK_OVERLAP if (iprh->end > iprh_tmp->start) { /* fragment overlaps with following, throw away */ - goto freepbuf; + return IP_REASS_VALIDATE_PBUF_DROPPED; } #endif /* IP_REASS_CHECK_OVERLAP */ /* fragment with the lowest offset */ @@ -398,11 +409,11 @@ ip_reass_chain_frag_into_datagram_and_validate(struct ip_reassdata *ipr, struct break; } else if (iprh->start == iprh_tmp->start) { /* received the same datagram twice: no need to keep the datagram */ - goto freepbuf; + return IP_REASS_VALIDATE_PBUF_DROPPED; #if IP_REASS_CHECK_OVERLAP } else if (iprh->start < iprh_tmp->end) { /* overlap: no need to keep the new datagram */ - goto freepbuf; + return IP_REASS_VALIDATE_PBUF_DROPPED; #endif /* IP_REASS_CHECK_OVERLAP */ } else { /* Check if the fragments received so far have no holes. */ @@ -433,7 +444,7 @@ ip_reass_chain_frag_into_datagram_and_validate(struct ip_reassdata *ipr, struct } else { #if IP_REASS_CHECK_OVERLAP LWIP_ASSERT("no previous fragment, this must be the first fragment!", - ipr->p == NULL); + ipr->p == NULL); #endif /* IP_REASS_CHECK_OVERLAP */ /* this is the first fragment we ever received for this ip datagram */ ipr->p = new_p; @@ -447,14 +458,14 @@ ip_reass_chain_frag_into_datagram_and_validate(struct ip_reassdata *ipr, struct if (valid) { /* then check if the rest of the fragments is here */ /* Check if the queue starts with the first datagram */ - if ((ipr->p == NULL) || (((struct ip_reass_helper*)ipr->p->payload)->start != 0)) { + if ((ipr->p == NULL) || (((struct ip_reass_helper *)ipr->p->payload)->start != 0)) { valid = 0; } else { /* and check that there are no holes after this datagram */ iprh_prev = iprh; q = iprh->next_pbuf; while (q != NULL) { - iprh = (struct ip_reass_helper*)q->payload; + iprh = (struct ip_reass_helper *)q->payload; if (iprh_prev->end != iprh->start) { valid = 0; break; @@ -467,9 +478,9 @@ ip_reass_chain_frag_into_datagram_and_validate(struct ip_reassdata *ipr, struct if (valid) { LWIP_ASSERT("sanity check", ipr->p != NULL); LWIP_ASSERT("sanity check", - ((struct ip_reass_helper*)ipr->p->payload) != iprh); + ((struct ip_reass_helper *)ipr->p->payload) != iprh); LWIP_ASSERT("validate_datagram:next_pbuf!=NULL", - iprh->next_pbuf == NULL); + iprh->next_pbuf == NULL); } } } @@ -480,12 +491,6 @@ ip_reass_chain_frag_into_datagram_and_validate(struct ip_reassdata *ipr, struct } /* If we come here, not all fragments were received, yet! */ return IP_REASS_VALIDATE_PBUF_QUEUED; /* not yet valid! */ -#if IP_REASS_CHECK_OVERLAP -freepbuf: - ip_reass_pbufcount -= pbuf_clen(new_p); - pbuf_free(new_p); - return IP_REASS_VALIDATE_PBUF_DROPPED; -#endif /* IP_REASS_CHECK_OVERLAP */ } /** @@ -502,22 +507,29 @@ ip4_reass(struct pbuf *p) struct ip_reassdata *ipr; struct ip_reass_helper *iprh; u16_t offset, len, clen; + u8_t hlen; int valid; int is_last; IPFRAG_STATS_INC(ip_frag.recv); MIB2_STATS_INC(mib2.ipreasmreqds); - fraghdr = (struct ip_hdr*)p->payload; + fraghdr = (struct ip_hdr *)p->payload; - if ((IPH_HL(fraghdr) * 4) != IP_HLEN) { - LWIP_DEBUGF(IP_REASS_DEBUG,("ip4_reass: IP options currently not supported!\n")); + if (IPH_HL_BYTES(fraghdr) != IP_HLEN) { + LWIP_DEBUGF(IP_REASS_DEBUG, ("ip4_reass: IP options currently not supported!\n")); IPFRAG_STATS_INC(ip_frag.err); goto nullreturn; } - offset = (lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) * 8; - len = lwip_ntohs(IPH_LEN(fraghdr)) - IPH_HL(fraghdr) * 4; + offset = IPH_OFFSET_BYTES(fraghdr); + len = lwip_ntohs(IPH_LEN(fraghdr)); + hlen = IPH_HL_BYTES(fraghdr); + if (hlen > len) { + /* invalid datagram */ + goto nullreturn; + } + len = (u16_t)(len - hlen); /* Check if we are allowed to enqueue more datagrams. */ clen = pbuf_clen(p); @@ -528,8 +540,8 @@ ip4_reass(struct pbuf *p) #endif /* IP_REASS_FREE_OLDEST */ { /* No datagram could be freed and still too many pbufs enqueued */ - LWIP_DEBUGF(IP_REASS_DEBUG,("ip4_reass: Overflow condition: pbufct=%d, clen=%d, MAX=%d\n", - ip_reass_pbufcount, clen, IP_REASS_MAX_PBUFS)); + LWIP_DEBUGF(IP_REASS_DEBUG, ("ip4_reass: Overflow condition: pbufct=%d, clen=%d, MAX=%d\n", + ip_reass_pbufcount, clen, IP_REASS_MAX_PBUFS)); IPFRAG_STATS_INC(ip_frag.memerr); /* @todo: send ICMP time exceeded here? */ /* drop this pbuf */ @@ -545,14 +557,14 @@ ip4_reass(struct pbuf *p) fragment into the buffer. */ if (IP_ADDRESSES_AND_ID_MATCH(&ipr->iphdr, fraghdr)) { LWIP_DEBUGF(IP_REASS_DEBUG, ("ip4_reass: matching previous fragment ID=%"X16_F"\n", - lwip_ntohs(IPH_ID(fraghdr)))); + lwip_ntohs(IPH_ID(fraghdr)))); IPFRAG_STATS_INC(ip_frag.cachehit); break; } } if (ipr == NULL) { - /* Enqueue a new datagram into the datagram queue */ + /* Enqueue a new datagram into the datagram queue */ ipr = ip_reass_enqueue_new_datagram(fraghdr, clen); /* Bail if unable to enqueue */ if (ipr == NULL) { @@ -560,7 +572,7 @@ ip4_reass(struct pbuf *p) } } else { if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) && - ((lwip_ntohs(IPH_OFFSET(&ipr->iphdr)) & IP_OFFMASK) != 0)) { + ((lwip_ntohs(IPH_OFFSET(&ipr->iphdr)) & IP_OFFMASK) != 0)) { /* ipr->iphdr is not the header from the first fragment, but fraghdr is * -> copy fraghdr into ipr->iphdr since we want to have the header * of the first fragment (for ICMP time exceeded and later, for copying @@ -578,14 +590,14 @@ ip4_reass(struct pbuf *p) u16_t datagram_len = (u16_t)(offset + len); if ((datagram_len < offset) || (datagram_len > (0xFFFF - IP_HLEN))) { /* u16_t overflow, cannot handle this */ - goto nullreturn; + goto nullreturn_ipr; } } /* find the right place to insert this pbuf */ /* @todo: trim pbufs if fragments are overlapping */ valid = ip_reass_chain_frag_into_datagram_and_validate(ipr, p, is_last); if (valid == IP_REASS_VALIDATE_PBUF_DROPPED) { - goto nullreturn; + goto nullreturn_ipr; } /* if we come here, the pbuf has been enqueued */ @@ -598,23 +610,23 @@ ip4_reass(struct pbuf *p) ipr->datagram_len = datagram_len; ipr->flags |= IP_REASS_FLAG_LASTFRAG; LWIP_DEBUGF(IP_REASS_DEBUG, - ("ip4_reass: last fragment seen, total len %"S16_F"\n", - ipr->datagram_len)); + ("ip4_reass: last fragment seen, total len %"S16_F"\n", + ipr->datagram_len)); } if (valid == IP_REASS_VALIDATE_TELEGRAM_FINISHED) { struct ip_reassdata *ipr_prev; /* the totally last fragment (flag more fragments = 0) was received at least * once AND all fragments are received */ - ipr->datagram_len += IP_HLEN; + u16_t datagram_len = (u16_t)(ipr->datagram_len + IP_HLEN); /* save the second pbuf before copying the header over the pointer */ - r = ((struct ip_reass_helper*)ipr->p->payload)->next_pbuf; + r = ((struct ip_reass_helper *)ipr->p->payload)->next_pbuf; /* copy the original ip header back to the first pbuf */ - fraghdr = (struct ip_hdr*)(ipr->p->payload); + fraghdr = (struct ip_hdr *)(ipr->p->payload); SMEMCPY(fraghdr, &ipr->iphdr, IP_HLEN); - IPH_LEN_SET(fraghdr, lwip_htons(ipr->datagram_len)); + IPH_LEN_SET(fraghdr, lwip_htons(datagram_len)); IPH_OFFSET_SET(fraghdr, 0); IPH_CHKSUM_SET(fraghdr, 0); /* @todo: do we need to set/calculate the correct checksum? */ @@ -628,10 +640,10 @@ ip4_reass(struct pbuf *p) /* chain together the pbufs contained within the reass_data list. */ while (r != NULL) { - iprh = (struct ip_reass_helper*)r->payload; + iprh = (struct ip_reass_helper *)r->payload; /* hide the ip header for every succeeding fragment */ - pbuf_header(r, -IP_HLEN); + pbuf_remove_header(r, IP_HLEN); pbuf_cat(p, r); r = iprh->next_pbuf; } @@ -651,7 +663,9 @@ ip4_reass(struct pbuf *p) ip_reass_dequeue_datagram(ipr, ipr_prev); /* and adjust the number of pbufs currently queued for reassembly. */ - ip_reass_pbufcount -= pbuf_clen(p); + clen = pbuf_clen(p); + LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= clen); + ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - clen); MIB2_STATS_INC(mib2.ipreasmoks); @@ -659,11 +673,19 @@ ip4_reass(struct pbuf *p) return p; } /* the datagram is not (yet?) reassembled completely */ - LWIP_DEBUGF(IP_REASS_DEBUG,("ip_reass_pbufcount: %d out\n", ip_reass_pbufcount)); + LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_pbufcount: %d out\n", ip_reass_pbufcount)); return NULL; +nullreturn_ipr: + LWIP_ASSERT("ipr != NULL", ipr != NULL); + if (ipr->p == NULL) { + /* dropped pbuf after creating a new datagram entry: remove the entry, too */ + LWIP_ASSERT("not firstalthough just enqueued", ipr == reassdatagrams); + ip_reass_dequeue_datagram(ipr, NULL); + } + nullreturn: - LWIP_DEBUGF(IP_REASS_DEBUG,("ip4_reass: nullreturn\n")); + LWIP_DEBUGF(IP_REASS_DEBUG, ("ip4_reass: nullreturn\n")); IPFRAG_STATS_INC(ip_frag.drop); pbuf_free(p); return NULL; @@ -673,15 +695,15 @@ nullreturn: #if IP_FRAG #if !LWIP_NETIF_TX_SINGLE_PBUF /** Allocate a new struct pbuf_custom_ref */ -static struct pbuf_custom_ref* +static struct pbuf_custom_ref * ip_frag_alloc_pbuf_custom_ref(void) { - return (struct pbuf_custom_ref*)memp_malloc(MEMP_FRAG_PBUF); + return (struct pbuf_custom_ref *)memp_malloc(MEMP_FRAG_PBUF); } /** Free a struct pbuf_custom_ref */ static void -ip_frag_free_pbuf_custom_ref(struct pbuf_custom_ref* p) +ip_frag_free_pbuf_custom_ref(struct pbuf_custom_ref *p) { LWIP_ASSERT("p != NULL", p != NULL); memp_free(MEMP_FRAG_PBUF, p); @@ -692,9 +714,9 @@ ip_frag_free_pbuf_custom_ref(struct pbuf_custom_ref* p) static void ipfrag_free_pbuf_custom(struct pbuf *p) { - struct pbuf_custom_ref *pcr = (struct pbuf_custom_ref*)p; + struct pbuf_custom_ref *pcr = (struct pbuf_custom_ref *)p; LWIP_ASSERT("pcr != NULL", pcr != NULL); - LWIP_ASSERT("pcr == p", (void*)pcr == (void*)p); + LWIP_ASSERT("pcr == p", (void *)pcr == (void *)p); if (pcr->original != NULL) { pbuf_free(pcr->original); } @@ -725,27 +747,33 @@ ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest) #endif struct ip_hdr *original_iphdr; struct ip_hdr *iphdr; - const u16_t nfb = (netif->mtu - IP_HLEN) / 8; + const u16_t nfb = (u16_t)((netif->mtu - IP_HLEN) / 8); u16_t left, fragsize; u16_t ofo; int last; u16_t poff = IP_HLEN; u16_t tmp; + int mf_set; original_iphdr = (struct ip_hdr *)p->payload; iphdr = original_iphdr; - LWIP_ERROR("ip4_frag() does not support IP options", IPH_HL(iphdr) * 4 == IP_HLEN, return ERR_VAL); + if (IPH_HL_BYTES(iphdr) != IP_HLEN) { + /* ip4_frag() does not support IP options */ + return ERR_VAL; + } + LWIP_ERROR("ip4_frag(): pbuf too short", p->len >= IP_HLEN, return ERR_VAL); /* Save original offset */ tmp = lwip_ntohs(IPH_OFFSET(iphdr)); ofo = tmp & IP_OFFMASK; - LWIP_ERROR("ip_frag(): MF already set", (tmp & IP_MF) == 0, return ERR_VAL); + /* already fragmented? if so, the last fragment we create must have MF, too */ + mf_set = tmp & IP_MF; - left = p->tot_len - IP_HLEN; + left = (u16_t)(p->tot_len - IP_HLEN); while (left) { /* Fill this fragment */ - fragsize = LWIP_MIN(left, nfb * 8); + fragsize = LWIP_MIN(left, (u16_t)(nfb * 8)); #if LWIP_NETIF_TX_SINGLE_PBUF rambuf = pbuf_alloc(PBUF_IP, fragsize, PBUF_RAM); @@ -753,16 +781,16 @@ ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest) goto memerr; } LWIP_ASSERT("this needs a pbuf in one piece!", - (rambuf->len == rambuf->tot_len) && (rambuf->next == NULL)); + (rambuf->len == rambuf->tot_len) && (rambuf->next == NULL)); poff += pbuf_copy_partial(p, rambuf->payload, fragsize, poff); /* make room for the IP header */ - if (pbuf_header(rambuf, IP_HLEN)) { + if (pbuf_add_header(rambuf, IP_HLEN)) { pbuf_free(rambuf); goto memerr; } /* fill in the IP header */ SMEMCPY(rambuf->payload, original_iphdr, IP_HLEN); - iphdr = (struct ip_hdr*)rambuf->payload; + iphdr = (struct ip_hdr *)rambuf->payload; #else /* LWIP_NETIF_TX_SINGLE_PBUF */ /* When not using a static buffer, create a chain of pbufs. * The first will be a PBUF_RAM holding the link and IP header. @@ -774,14 +802,15 @@ ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest) goto memerr; } LWIP_ASSERT("this needs a pbuf in one piece!", - (p->len >= (IP_HLEN))); + (rambuf->len >= (IP_HLEN))); SMEMCPY(rambuf->payload, original_iphdr, IP_HLEN); iphdr = (struct ip_hdr *)rambuf->payload; left_to_copy = fragsize; while (left_to_copy) { struct pbuf_custom_ref *pcr; - u16_t plen = p->len - poff; + u16_t plen = (u16_t)(p->len - poff); + LWIP_ASSERT("p->len >= poff", p->len >= poff); newpbuflen = LWIP_MIN(left_to_copy, plen); /* Is this pbuf already empty? */ if (!newpbuflen) { @@ -796,7 +825,7 @@ ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest) } /* Mirror this pbuf, although we might not need all of it. */ newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc, - (u8_t*)p->payload + poff, newpbuflen); + (u8_t *)p->payload + poff, newpbuflen); if (newpbuf == NULL) { ip_frag_free_pbuf_custom_ref(pcr); pbuf_free(rambuf); @@ -810,13 +839,13 @@ ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest) * so that it is removed when pbuf_dechain is later called on rambuf. */ pbuf_cat(rambuf, newpbuf); - left_to_copy -= newpbuflen; + left_to_copy = (u16_t)(left_to_copy - newpbuflen); if (left_to_copy) { poff = 0; p = p->next; } } - poff += newpbuflen; + poff = (u16_t)(poff + newpbuflen); #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ /* Correct header */ @@ -824,11 +853,12 @@ ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest) /* Set new offset and MF flag */ tmp = (IP_OFFMASK & (ofo)); - if (!last) { + if (!last || mf_set) { + /* the last fragment has MF set if the input frame had it */ tmp = tmp | IP_MF; } IPH_OFFSET_SET(iphdr, lwip_htons(tmp)); - IPH_LEN_SET(iphdr, lwip_htons(fragsize + IP_HLEN)); + IPH_LEN_SET(iphdr, lwip_htons((u16_t)(fragsize + IP_HLEN))); IPH_CHKSUM_SET(iphdr, 0); #if CHECKSUM_GEN_IP IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_IP) { @@ -850,8 +880,8 @@ ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest) */ pbuf_free(rambuf); - left -= fragsize; - ofo += nfb; + left = (u16_t)(left - fragsize); + ofo = (u16_t)(ofo + nfb); } MIB2_STATS_INC(mib2.ipfragoks); return ERR_OK; diff --git a/Libraries/LwIP/src/core/ipv6/dhcp6.c b/Libraries/LwIP/src/core/ipv6/dhcp6.c index 015ced1..1ae8742 100755 --- a/Libraries/LwIP/src/core/ipv6/dhcp6.c +++ b/Libraries/LwIP/src/core/ipv6/dhcp6.c @@ -1,11 +1,31 @@ /** * @file * - * DHCPv6. + * @defgroup dhcp6 DHCPv6 + * @ingroup ip6 + * DHCPv6 client: IPv6 address autoconfiguration as per + * RFC 3315 (stateful DHCPv6) and + * RFC 3736 (stateless DHCPv6). + * + * For now, only stateless DHCPv6 is implemented! + * + * TODO: + * - enable/disable API to not always start when RA is received + * - stateful DHCPv6 (for now, only stateless DHCPv6 for DNS and NTP servers works) + * - create Client Identifier? + * - only start requests if a valid local address is available on the netif + * - only start information requests if required (not for every RA) + * + * dhcp6_enable_stateful() enables stateful DHCPv6 for a netif (stateless disabled)\n + * dhcp6_enable_stateless() enables stateless DHCPv6 for a netif (stateful disabled)\n + * dhcp6_disable() disable DHCPv6 for a netif + * + * When enabled, requests are only issued after receipt of RA with the + * corresponding bits set. */ /* - * Copyright (c) 2010 Inico Technologies Ltd. + * Copyright (c) 2018 Simon Goldschmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, @@ -32,19 +52,761 @@ * * This file is part of the lwIP TCP/IP stack. * - * Author: Ivan Delamer - * - * - * Please coordinate changes and requests with Ivan Delamer - * + * Author: Simon Goldschmidt */ #include "lwip/opt.h" #if LWIP_IPV6 && LWIP_IPV6_DHCP6 /* don't build if not configured for use in lwipopts.h */ -#include "lwip/ip6_addr.h" +#include "lwip/dhcp6.h" +#include "lwip/prot/dhcp6.h" #include "lwip/def.h" +#include "lwip/udp.h" +#include "lwip/dns.h" +#include + +#ifdef LWIP_HOOK_FILENAME +#include LWIP_HOOK_FILENAME +#endif +#ifndef LWIP_HOOK_DHCP6_APPEND_OPTIONS +#define LWIP_HOOK_DHCP6_APPEND_OPTIONS(netif, dhcp6, state, msg, msg_type, options_len_ptr, max_len) +#endif +#ifndef LWIP_HOOK_DHCP6_PARSE_OPTION +#define LWIP_HOOK_DHCP6_PARSE_OPTION(netif, dhcp6, state, msg, msg_type, option, len, pbuf, offset) do { LWIP_UNUSED_ARG(msg); } while(0) +#endif + +#if LWIP_DNS && LWIP_DHCP6_MAX_DNS_SERVERS +#if DNS_MAX_SERVERS > LWIP_DHCP6_MAX_DNS_SERVERS +#define LWIP_DHCP6_PROVIDE_DNS_SERVERS LWIP_DHCP6_MAX_DNS_SERVERS +#else +#define LWIP_DHCP6_PROVIDE_DNS_SERVERS DNS_MAX_SERVERS +#endif +#else +#define LWIP_DHCP6_PROVIDE_DNS_SERVERS 0 +#endif + + +/** Option handling: options are parsed in dhcp6_parse_reply + * and saved in an array where other functions can load them from. + * This might be moved into the struct dhcp6 (not necessarily since + * lwIP is single-threaded and the array is only used while in recv + * callback). */ +enum dhcp6_option_idx { + DHCP6_OPTION_IDX_CLI_ID = 0, + DHCP6_OPTION_IDX_SERVER_ID, +#if LWIP_DHCP6_PROVIDE_DNS_SERVERS + DHCP6_OPTION_IDX_DNS_SERVER, + DHCP6_OPTION_IDX_DOMAIN_LIST, +#endif /* LWIP_DHCP_PROVIDE_DNS_SERVERS */ +#if LWIP_DHCP6_GET_NTP_SRV + DHCP6_OPTION_IDX_NTP_SERVER, +#endif /* LWIP_DHCP_GET_NTP_SRV */ + DHCP6_OPTION_IDX_MAX +}; + +struct dhcp6_option_info { + u8_t option_given; + u16_t val_start; + u16_t val_length; +}; + +/** Holds the decoded option info, only valid while in dhcp6_recv. */ +struct dhcp6_option_info dhcp6_rx_options[DHCP6_OPTION_IDX_MAX]; + +#define dhcp6_option_given(dhcp6, idx) (dhcp6_rx_options[idx].option_given != 0) +#define dhcp6_got_option(dhcp6, idx) (dhcp6_rx_options[idx].option_given = 1) +#define dhcp6_clear_option(dhcp6, idx) (dhcp6_rx_options[idx].option_given = 0) +#define dhcp6_clear_all_options(dhcp6) (memset(dhcp6_rx_options, 0, sizeof(dhcp6_rx_options))) +#define dhcp6_get_option_start(dhcp6, idx) (dhcp6_rx_options[idx].val_start) +#define dhcp6_get_option_length(dhcp6, idx) (dhcp6_rx_options[idx].val_length) +#define dhcp6_set_option(dhcp6, idx, start, len) do { dhcp6_rx_options[idx].val_start = (start); dhcp6_rx_options[idx].val_length = (len); }while(0) + + +const ip_addr_t dhcp6_All_DHCP6_Relay_Agents_and_Servers = IPADDR6_INIT_HOST(0xFF020000, 0, 0, 0x00010002); +const ip_addr_t dhcp6_All_DHCP6_Servers = IPADDR6_INIT_HOST(0xFF020000, 0, 0, 0x00010003); + +static struct udp_pcb *dhcp6_pcb; +static u8_t dhcp6_pcb_refcount; + + +/* receive, unfold, parse and free incoming messages */ +static void dhcp6_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port); + +/** Ensure DHCP PCB is allocated and bound */ +static err_t +dhcp6_inc_pcb_refcount(void) +{ + if (dhcp6_pcb_refcount == 0) { + LWIP_ASSERT("dhcp6_inc_pcb_refcount(): memory leak", dhcp6_pcb == NULL); + + /* allocate UDP PCB */ + dhcp6_pcb = udp_new_ip6(); + + if (dhcp6_pcb == NULL) { + return ERR_MEM; + } + + ip_set_option(dhcp6_pcb, SOF_BROADCAST); + + /* set up local and remote port for the pcb -> listen on all interfaces on all src/dest IPs */ + udp_bind(dhcp6_pcb, IP6_ADDR_ANY, DHCP6_CLIENT_PORT); + udp_recv(dhcp6_pcb, dhcp6_recv, NULL); + } + + dhcp6_pcb_refcount++; + + return ERR_OK; +} + +/** Free DHCP PCB if the last netif stops using it */ +static void +dhcp6_dec_pcb_refcount(void) +{ + LWIP_ASSERT("dhcp6_pcb_refcount(): refcount error", (dhcp6_pcb_refcount > 0)); + dhcp6_pcb_refcount--; + + if (dhcp6_pcb_refcount == 0) { + udp_remove(dhcp6_pcb); + dhcp6_pcb = NULL; + } +} + +/** + * @ingroup dhcp6 + * Set a statically allocated struct dhcp6 to work with. + * Using this prevents dhcp6_start to allocate it using mem_malloc. + * + * @param netif the netif for which to set the struct dhcp + * @param dhcp6 (uninitialised) dhcp6 struct allocated by the application + */ +void +dhcp6_set_struct(struct netif *netif, struct dhcp6 *dhcp6) +{ + LWIP_ASSERT("netif != NULL", netif != NULL); + LWIP_ASSERT("dhcp6 != NULL", dhcp6 != NULL); + LWIP_ASSERT("netif already has a struct dhcp6 set", netif_dhcp6_data(netif) == NULL); + + /* clear data structure */ + memset(dhcp6, 0, sizeof(struct dhcp6)); + /* dhcp6_set_state(&dhcp, DHCP6_STATE_OFF); */ + netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP6, dhcp6); +} + +/** + * @ingroup dhcp6 + * Removes a struct dhcp6 from a netif. + * + * ATTENTION: Only use this when not using dhcp6_set_struct() to allocate the + * struct dhcp6 since the memory is passed back to the heap. + * + * @param netif the netif from which to remove the struct dhcp + */ +void dhcp6_cleanup(struct netif *netif) +{ + LWIP_ASSERT("netif != NULL", netif != NULL); + + if (netif_dhcp6_data(netif) != NULL) { + mem_free(netif_dhcp6_data(netif)); + netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP6, NULL); + } +} + +static struct dhcp6* +dhcp6_get_struct(struct netif *netif, const char *dbg_requester) +{ + struct dhcp6 *dhcp6 = netif_dhcp6_data(netif); + if (dhcp6 == NULL) { + LWIP_DEBUGF(DHCP6_DEBUG | LWIP_DBG_TRACE, ("%s: mallocing new DHCPv6 client\n", dbg_requester)); + dhcp6 = (struct dhcp6 *)mem_malloc(sizeof(struct dhcp6)); + if (dhcp6 == NULL) { + LWIP_DEBUGF(DHCP6_DEBUG | LWIP_DBG_TRACE, ("%s: could not allocate dhcp6\n", dbg_requester)); + return NULL; + } + + /* clear data structure, this implies DHCP6_STATE_OFF */ + memset(dhcp6, 0, sizeof(struct dhcp6)); + /* store this dhcp6 client in the netif */ + netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP6, dhcp6); + } else { + /* already has DHCP6 client attached */ + LWIP_DEBUGF(DHCP6_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("%s: using existing DHCPv6 client\n", dbg_requester)); + } + + if (!dhcp6->pcb_allocated) { + if (dhcp6_inc_pcb_refcount() != ERR_OK) { /* ensure DHCP6 PCB is allocated */ + mem_free(dhcp6); + netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP6, NULL); + return NULL; + } + LWIP_DEBUGF(DHCP6_DEBUG | LWIP_DBG_TRACE, ("%s: allocated dhcp6", dbg_requester)); + dhcp6->pcb_allocated = 1; + } + return dhcp6; +} + +/* + * Set the DHCPv6 state + * If the state changed, reset the number of tries. + */ +static void +dhcp6_set_state(struct dhcp6 *dhcp6, u8_t new_state, const char *dbg_caller) +{ + LWIP_DEBUGF(DHCP6_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("DHCPv6 state: %d -> %d (%s)\n", + dhcp6->state, new_state, dbg_caller)); + if (new_state != dhcp6->state) { + dhcp6->state = new_state; + dhcp6->tries = 0; + dhcp6->request_timeout = 0; + } +} + +static int +dhcp6_stateless_enabled(struct dhcp6 *dhcp6) +{ + if ((dhcp6->state == DHCP6_STATE_STATELESS_IDLE) || + (dhcp6->state == DHCP6_STATE_REQUESTING_CONFIG)) { + return 1; + } + return 0; +} + +/*static int +dhcp6_stateful_enabled(struct dhcp6 *dhcp6) +{ + if (dhcp6->state == DHCP6_STATE_OFF) { + return 0; + } + if (dhcp6_stateless_enabled(dhcp6)) { + return 0; + } + return 1; +}*/ + +/** + * @ingroup dhcp6 + * Enable stateful DHCPv6 on this netif + * Requests are sent on receipt of an RA message with the + * ND6_RA_FLAG_MANAGED_ADDR_CONFIG flag set. + * + * A struct dhcp6 will be allocated for this netif if not + * set via @ref dhcp6_set_struct before. + * + * @todo: stateful DHCPv6 not supported, yet + */ +err_t +dhcp6_enable_stateful(struct netif *netif) +{ + LWIP_UNUSED_ARG(netif); + LWIP_DEBUGF(DHCP6_DEBUG | LWIP_DBG_TRACE, ("stateful dhcp6 not implemented yet")); + return ERR_VAL; +} + +/** + * @ingroup dhcp6 + * Enable stateless DHCPv6 on this netif + * Requests are sent on receipt of an RA message with the + * ND6_RA_FLAG_OTHER_CONFIG flag set. + * + * A struct dhcp6 will be allocated for this netif if not + * set via @ref dhcp6_set_struct before. + */ +err_t +dhcp6_enable_stateless(struct netif *netif) +{ + struct dhcp6 *dhcp6; + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp6_enable_stateless(netif=%p) %c%c%"U16_F"\n", (void *)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); + + dhcp6 = dhcp6_get_struct(netif, "dhcp6_enable_stateless()"); + if (dhcp6 == NULL) { + return ERR_MEM; + } + if (dhcp6_stateless_enabled(dhcp6)) { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp6_enable_stateless(): stateless DHCPv6 already enabled")); + return ERR_OK; + } else if (dhcp6->state != DHCP6_STATE_OFF) { + /* stateful running */ + /* @todo: stop stateful once it is implemented */ + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp6_enable_stateless(): switching from stateful to stateless DHCPv6")); + } + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp6_enable_stateless(): stateless DHCPv6 enabled\n")); + dhcp6_set_state(dhcp6, DHCP6_STATE_STATELESS_IDLE, "dhcp6_enable_stateless"); + return ERR_OK; +} + +/** + * @ingroup dhcp6 + * Disable stateful or stateless DHCPv6 on this netif + * Requests are sent on receipt of an RA message with the + * ND6_RA_FLAG_OTHER_CONFIG flag set. + */ +void +dhcp6_disable(struct netif *netif) +{ + struct dhcp6 *dhcp6; + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp6_disable(netif=%p) %c%c%"U16_F"\n", (void *)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); + + dhcp6 = netif_dhcp6_data(netif); + if (dhcp6 != NULL) { + if (dhcp6->state != DHCP6_STATE_OFF) { + LWIP_DEBUGF(DHCP6_DEBUG | LWIP_DBG_TRACE, ("dhcp6_disable(): DHCPv6 disabled (old state: %s)\n", + (dhcp6_stateless_enabled(dhcp6) ? "stateless" : "stateful"))); + dhcp6_set_state(dhcp6, DHCP6_STATE_OFF, "dhcp6_disable"); + if (dhcp6->pcb_allocated != 0) { + dhcp6_dec_pcb_refcount(); /* free DHCPv6 PCB if not needed any more */ + dhcp6->pcb_allocated = 0; + } + } + } +} + +/** + * Create a DHCPv6 request, fill in common headers + * + * @param netif the netif under DHCPv6 control + * @param dhcp6 dhcp6 control struct + * @param message_type message type of the request + * @param opt_len_alloc option length to allocate + * @param options_out_len option length on exit + * @return a pbuf for the message + */ +static struct pbuf * +dhcp6_create_msg(struct netif *netif, struct dhcp6 *dhcp6, u8_t message_type, + u16_t opt_len_alloc, u16_t *options_out_len) +{ + struct pbuf *p_out; + struct dhcp6_msg *msg_out; + + LWIP_ERROR("dhcp6_create_msg: netif != NULL", (netif != NULL), return NULL;); + LWIP_ERROR("dhcp6_create_msg: dhcp6 != NULL", (dhcp6 != NULL), return NULL;); + p_out = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct dhcp6_msg) + opt_len_alloc, PBUF_RAM); + if (p_out == NULL) { + LWIP_DEBUGF(DHCP6_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, + ("dhcp6_create_msg(): could not allocate pbuf\n")); + return NULL; + } + LWIP_ASSERT("dhcp6_create_msg: check that first pbuf can hold struct dhcp6_msg", + (p_out->len >= sizeof(struct dhcp6_msg) + opt_len_alloc)); + + /* @todo: limit new xid for certain message types? */ + /* reuse transaction identifier in retransmissions */ + if (dhcp6->tries == 0) { + dhcp6->xid = LWIP_RAND() & 0xFFFFFF; + } + + LWIP_DEBUGF(DHCP6_DEBUG | LWIP_DBG_TRACE, + ("transaction id xid(%"X32_F")\n", dhcp6->xid)); + + msg_out = (struct dhcp6_msg *)p_out->payload; + memset(msg_out, 0, sizeof(struct dhcp6_msg) + opt_len_alloc); + + msg_out->msgtype = message_type; + msg_out->transaction_id[0] = (u8_t)(dhcp6->xid >> 16); + msg_out->transaction_id[1] = (u8_t)(dhcp6->xid >> 8); + msg_out->transaction_id[2] = (u8_t)dhcp6->xid; + *options_out_len = 0; + return p_out; +} + +static u16_t +dhcp6_option_short(u16_t options_out_len, u8_t *options, u16_t value) +{ + options[options_out_len++] = (u8_t)((value & 0xff00U) >> 8); + options[options_out_len++] = (u8_t) (value & 0x00ffU); + return options_out_len; +} + +static u16_t +dhcp6_option_optionrequest(u16_t options_out_len, u8_t *options, const u16_t *req_options, + u16_t num_req_options, u16_t max_len) +{ + size_t i; + u16_t ret; + + LWIP_ASSERT("dhcp6_option_optionrequest: options_out_len + sizeof(struct dhcp6_msg) + addlen <= max_len", + sizeof(struct dhcp6_msg) + options_out_len + 4U + (2U * num_req_options) <= max_len); + LWIP_UNUSED_ARG(max_len); + + ret = dhcp6_option_short(options_out_len, options, DHCP6_OPTION_ORO); + ret = dhcp6_option_short(ret, options, 2 * num_req_options); + for (i = 0; i < num_req_options; i++) { + ret = dhcp6_option_short(ret, options, req_options[i]); + } + return ret; +} + +/* All options are added, shrink the pbuf to the required size */ +static void +dhcp6_msg_finalize(u16_t options_out_len, struct pbuf *p_out) +{ + /* shrink the pbuf to the actual content length */ + pbuf_realloc(p_out, (u16_t)(sizeof(struct dhcp6_msg) + options_out_len)); +} + + +#if LWIP_IPV6_DHCP6_STATELESS +static void +dhcp6_information_request(struct netif *netif, struct dhcp6 *dhcp6) +{ + const u16_t requested_options[] = {DHCP6_OPTION_DNS_SERVERS, DHCP6_OPTION_DOMAIN_LIST, DHCP6_OPTION_SNTP_SERVERS}; + u16_t msecs; + struct pbuf *p_out; + u16_t options_out_len; + LWIP_DEBUGF(DHCP6_DEBUG | LWIP_DBG_TRACE, ("dhcp6_information_request()\n")); + /* create and initialize the DHCP message header */ + p_out = dhcp6_create_msg(netif, dhcp6, DHCP6_INFOREQUEST, 4 + sizeof(requested_options), &options_out_len); + if (p_out != NULL) { + err_t err; + struct dhcp6_msg *msg_out = (struct dhcp6_msg *)p_out->payload; + u8_t *options = (u8_t *)(msg_out + 1); + LWIP_DEBUGF(DHCP6_DEBUG | LWIP_DBG_TRACE, ("dhcp6_information_request: making request\n")); + + options_out_len = dhcp6_option_optionrequest(options_out_len, options, requested_options, + LWIP_ARRAYSIZE(requested_options), p_out->len); + LWIP_HOOK_DHCP6_APPEND_OPTIONS(netif, dhcp6, DHCP6_STATE_REQUESTING_CONFIG, msg_out, + DHCP6_INFOREQUEST, options_out_len, p_out->len); + dhcp6_msg_finalize(options_out_len, p_out); + + err = udp_sendto_if(dhcp6_pcb, p_out, &dhcp6_All_DHCP6_Relay_Agents_and_Servers, DHCP6_SERVER_PORT, netif); + pbuf_free(p_out); + LWIP_DEBUGF(DHCP6_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp6_information_request: INFOREQUESTING -> %d\n", (int)err)); + LWIP_UNUSED_ARG(err); + } else { + LWIP_DEBUGF(DHCP6_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp6_information_request: could not allocate DHCP6 request\n")); + } + dhcp6_set_state(dhcp6, DHCP6_STATE_REQUESTING_CONFIG, "dhcp6_information_request"); + if (dhcp6->tries < 255) { + dhcp6->tries++; + } + msecs = (u16_t)((dhcp6->tries < 6 ? 1 << dhcp6->tries : 60) * 1000); + dhcp6->request_timeout = (u16_t)((msecs + DHCP6_TIMER_MSECS - 1) / DHCP6_TIMER_MSECS); + LWIP_DEBUGF(DHCP6_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp6_information_request(): set request timeout %"U16_F" msecs\n", msecs)); +} + +static err_t +dhcp6_request_config(struct netif *netif, struct dhcp6 *dhcp6) +{ + /* stateless mode enabled and no request running? */ + if (dhcp6->state == DHCP6_STATE_STATELESS_IDLE) { + /* send Information-request and wait for answer; setup receive timeout */ + dhcp6_information_request(netif, dhcp6); + } + + return ERR_OK; +} + +static void +dhcp6_abort_config_request(struct dhcp6 *dhcp6) +{ + if (dhcp6->state == DHCP6_STATE_REQUESTING_CONFIG) { + /* abort running request */ + dhcp6_set_state(dhcp6, DHCP6_STATE_STATELESS_IDLE, "dhcp6_abort_config_request"); + } +} + +/* Handle a REPLY to INFOREQUEST + * This parses DNS and NTP server addresses from the reply. + */ +static void +dhcp6_handle_config_reply(struct netif *netif, struct pbuf *p_msg_in) +{ + struct dhcp6 *dhcp6 = netif_dhcp6_data(netif); + + LWIP_UNUSED_ARG(dhcp6); + LWIP_UNUSED_ARG(p_msg_in); + +#if LWIP_DHCP6_PROVIDE_DNS_SERVERS + if (dhcp6_option_given(dhcp6, DHCP6_OPTION_IDX_DNS_SERVER)) { + ip_addr_t dns_addr; + ip6_addr_t *dns_addr6; + u16_t op_start = dhcp6_get_option_start(dhcp6, DHCP6_OPTION_IDX_DNS_SERVER); + u16_t op_len = dhcp6_get_option_length(dhcp6, DHCP6_OPTION_IDX_DNS_SERVER); + u16_t idx; + u8_t n; + + memset(&dns_addr, 0, sizeof(dns_addr)); + dns_addr6 = ip_2_ip6(&dns_addr); + for (n = 0, idx = op_start; (idx < op_start + op_len) && (n < LWIP_DHCP6_PROVIDE_DNS_SERVERS); + n++, idx += sizeof(struct ip6_addr_packed)) { + u16_t copied = pbuf_copy_partial(p_msg_in, dns_addr6, sizeof(struct ip6_addr_packed), idx); + if (copied != sizeof(struct ip6_addr_packed)) { + /* pbuf length mismatch */ + return; + } + ip6_addr_assign_zone(dns_addr6, IP6_UNKNOWN, netif); + /* @todo: do we need a different offset than DHCP(v4)? */ + dns_setserver(n, &dns_addr); + } + } + /* @ todo: parse and set Domain Search List */ +#endif /* LWIP_DHCP6_PROVIDE_DNS_SERVERS */ + +#if LWIP_DHCP6_GET_NTP_SRV + if (dhcp6_option_given(dhcp6, DHCP6_OPTION_IDX_NTP_SERVER)) { + ip_addr_t ntp_server_addrs[LWIP_DHCP6_MAX_NTP_SERVERS]; + u16_t op_start = dhcp6_get_option_start(dhcp6, DHCP6_OPTION_IDX_NTP_SERVER); + u16_t op_len = dhcp6_get_option_length(dhcp6, DHCP6_OPTION_IDX_NTP_SERVER); + u16_t idx; + u8_t n; + + for (n = 0, idx = op_start; (idx < op_start + op_len) && (n < LWIP_DHCP6_MAX_NTP_SERVERS); + n++, idx += sizeof(struct ip6_addr_packed)) { + u16_t copied; + ip6_addr_t *ntp_addr6 = ip_2_ip6(&ntp_server_addrs[n]); + ip_addr_set_zero_ip6(&ntp_server_addrs[n]); + copied = pbuf_copy_partial(p_msg_in, ntp_addr6, sizeof(struct ip6_addr_packed), idx); + if (copied != sizeof(struct ip6_addr_packed)) { + /* pbuf length mismatch */ + return; + } + ip6_addr_assign_zone(ntp_addr6, IP6_UNKNOWN, netif); + } + dhcp6_set_ntp_servers(n, ntp_server_addrs); + } +#endif /* LWIP_DHCP6_GET_NTP_SRV */ +} +#endif /* LWIP_IPV6_DHCP6_STATELESS */ + +/** This function is called from nd6 module when an RA messsage is received + * It triggers DHCPv6 requests (if enabled). + */ +void +dhcp6_nd6_ra_trigger(struct netif *netif, u8_t managed_addr_config, u8_t other_config) +{ + struct dhcp6 *dhcp6; + + LWIP_ASSERT("netif != NULL", netif != NULL); + dhcp6 = netif_dhcp6_data(netif); + + LWIP_UNUSED_ARG(managed_addr_config); + LWIP_UNUSED_ARG(other_config); + LWIP_UNUSED_ARG(dhcp6); + +#if LWIP_IPV6_DHCP6_STATELESS + if (dhcp6 != NULL) { + if (dhcp6_stateless_enabled(dhcp6)) { + if (other_config) { + dhcp6_request_config(netif, dhcp6); + } else { + dhcp6_abort_config_request(dhcp6); + } + } + } +#endif /* LWIP_IPV6_DHCP6_STATELESS */ +} + +/** + * Parse the DHCPv6 message and extract the DHCPv6 options. + * + * Extract the DHCPv6 options (offset + length) so that we can later easily + * check for them or extract the contents. + */ +static err_t +dhcp6_parse_reply(struct pbuf *p, struct dhcp6 *dhcp6) +{ + u16_t offset; + u16_t offset_max; + u16_t options_idx; + struct dhcp6_msg *msg_in; + + LWIP_UNUSED_ARG(dhcp6); + + /* clear received options */ + dhcp6_clear_all_options(dhcp6); + msg_in = (struct dhcp6_msg *)p->payload; + + /* parse options */ + + options_idx = sizeof(struct dhcp6_msg); + /* parse options to the end of the received packet */ + offset_max = p->tot_len; + + offset = options_idx; + /* at least 4 byte to read? */ + while ((offset + 4 <= offset_max)) { + u8_t op_len_buf[4]; + u8_t *op_len; + u16_t op; + u16_t len; + u16_t val_offset = (u16_t)(offset + 4); + if (val_offset < offset) { + /* overflow */ + return ERR_BUF; + } + /* copy option + length, might be split accross pbufs */ + op_len = (u8_t *)pbuf_get_contiguous(p, op_len_buf, 4, 4, offset); + if (op_len == NULL) { + /* failed to get option and length */ + return ERR_VAL; + } + op = (op_len[0] << 8) | op_len[1]; + len = (op_len[2] << 8) | op_len[3]; + offset = val_offset + len; + if (offset < val_offset) { + /* overflow */ + return ERR_BUF; + } + + switch (op) { + case (DHCP6_OPTION_CLIENTID): + dhcp6_got_option(dhcp6, DHCP6_OPTION_IDX_CLI_ID); + dhcp6_set_option(dhcp6, DHCP6_OPTION_IDX_CLI_ID, val_offset, len); + break; + case (DHCP6_OPTION_SERVERID): + dhcp6_got_option(dhcp6, DHCP6_OPTION_IDX_SERVER_ID); + dhcp6_set_option(dhcp6, DHCP6_OPTION_IDX_SERVER_ID, val_offset, len); + break; +#if LWIP_DHCP6_PROVIDE_DNS_SERVERS + case (DHCP6_OPTION_DNS_SERVERS): + dhcp6_got_option(dhcp6, DHCP6_OPTION_IDX_DNS_SERVER); + dhcp6_set_option(dhcp6, DHCP6_OPTION_IDX_DNS_SERVER, val_offset, len); + break; + case (DHCP6_OPTION_DOMAIN_LIST): + dhcp6_got_option(dhcp6, DHCP6_OPTION_IDX_DOMAIN_LIST); + dhcp6_set_option(dhcp6, DHCP6_OPTION_IDX_DOMAIN_LIST, val_offset, len); + break; +#endif /* LWIP_DHCP6_PROVIDE_DNS_SERVERS */ +#if LWIP_DHCP6_GET_NTP_SRV + case (DHCP6_OPTION_SNTP_SERVERS): + dhcp6_got_option(dhcp6, DHCP6_OPTION_IDX_NTP_SERVER); + dhcp6_set_option(dhcp6, DHCP6_OPTION_IDX_NTP_SERVER, val_offset, len); + break; +#endif /* LWIP_DHCP6_GET_NTP_SRV*/ + default: + LWIP_DEBUGF(DHCP6_DEBUG, ("skipping option %"U16_F" in options\n", op)); + LWIP_HOOK_DHCP6_PARSE_OPTION(ip_current_netif(), dhcp6, dhcp6->state, msg_in, + msg_in->msgtype, op, len, q, val_offset); + break; + } + } + return ERR_OK; +} + +static void +dhcp6_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port) +{ + struct netif *netif = ip_current_input_netif(); + struct dhcp6 *dhcp6 = netif_dhcp6_data(netif); + struct dhcp6_msg *reply_msg = (struct dhcp6_msg *)p->payload; + u8_t msg_type; + u32_t xid; + + LWIP_UNUSED_ARG(arg); + + /* Caught DHCPv6 message from netif that does not have DHCPv6 enabled? -> not interested */ + if ((dhcp6 == NULL) || (dhcp6->pcb_allocated == 0)) { + goto free_pbuf_and_return; + } + + LWIP_ERROR("invalid server address type", IP_IS_V6(addr), goto free_pbuf_and_return;); + + LWIP_DEBUGF(DHCP6_DEBUG | LWIP_DBG_TRACE, ("dhcp6_recv(pbuf = %p) from DHCPv6 server %s port %"U16_F"\n", (void *)p, + ipaddr_ntoa(addr), port)); + LWIP_DEBUGF(DHCP6_DEBUG | LWIP_DBG_TRACE, ("pbuf->len = %"U16_F"\n", p->len)); + LWIP_DEBUGF(DHCP6_DEBUG | LWIP_DBG_TRACE, ("pbuf->tot_len = %"U16_F"\n", p->tot_len)); + /* prevent warnings about unused arguments */ + LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(addr); + LWIP_UNUSED_ARG(port); + + if (p->len < sizeof(struct dhcp6_msg)) { + LWIP_DEBUGF(DHCP6_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("DHCPv6 reply message or pbuf too short\n")); + goto free_pbuf_and_return; + } + + /* match transaction ID against what we expected */ + xid = reply_msg->transaction_id[0] << 16; + xid |= reply_msg->transaction_id[1] << 8; + xid |= reply_msg->transaction_id[2]; + if (xid != dhcp6->xid) { + LWIP_DEBUGF(DHCP6_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, + ("transaction id mismatch reply_msg->xid(%"X32_F")!= dhcp6->xid(%"X32_F")\n", xid, dhcp6->xid)); + goto free_pbuf_and_return; + } + /* option fields could be unfold? */ + if (dhcp6_parse_reply(p, dhcp6) != ERR_OK) { + LWIP_DEBUGF(DHCP6_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, + ("problem unfolding DHCPv6 message - too short on memory?\n")); + goto free_pbuf_and_return; + } + + /* read DHCP message type */ + msg_type = reply_msg->msgtype; + /* message type is DHCP6 REPLY? */ + if (msg_type == DHCP6_REPLY) { + LWIP_DEBUGF(DHCP6_DEBUG | LWIP_DBG_TRACE, ("DHCP6_REPLY received\n")); +#if LWIP_IPV6_DHCP6_STATELESS + /* in info-requesting state? */ + if (dhcp6->state == DHCP6_STATE_REQUESTING_CONFIG) { + dhcp6_set_state(dhcp6, DHCP6_STATE_STATELESS_IDLE, "dhcp6_recv"); + dhcp6_handle_config_reply(netif, p); + } else +#endif /* LWIP_IPV6_DHCP6_STATELESS */ + { + /* @todo: handle reply in other states? */ + } + } else { + /* @todo: handle other message types */ + } + +free_pbuf_and_return: + pbuf_free(p); +} + +/** + * A DHCPv6 request has timed out. + * + * The timer that was started with the DHCPv6 request has + * timed out, indicating no response was received in time. + */ +static void +dhcp6_timeout(struct netif *netif, struct dhcp6 *dhcp6) +{ + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp6_timeout()\n")); + + LWIP_UNUSED_ARG(netif); + LWIP_UNUSED_ARG(dhcp6); + +#if LWIP_IPV6_DHCP6_STATELESS + /* back-off period has passed, or server selection timed out */ + if (dhcp6->state == DHCP6_STATE_REQUESTING_CONFIG) { + LWIP_DEBUGF(DHCP6_DEBUG | LWIP_DBG_TRACE, ("dhcp6_timeout(): retrying information request\n")); + dhcp6_information_request(netif, dhcp6); + } +#endif /* LWIP_IPV6_DHCP6_STATELESS */ +} + +/** + * DHCPv6 timeout handling (this function must be called every 500ms, + * see @ref DHCP6_TIMER_MSECS). + * + * A DHCPv6 server is expected to respond within a short period of time. + * This timer checks whether an outstanding DHCPv6 request is timed out. + */ +void +dhcp6_tmr(void) +{ + struct netif *netif; + /* loop through netif's */ + NETIF_FOREACH(netif) { + struct dhcp6 *dhcp6 = netif_dhcp6_data(netif); + /* only act on DHCPv6 configured interfaces */ + if (dhcp6 != NULL) { + /* timer is active (non zero), and is about to trigger now */ + if (dhcp6->request_timeout > 1) { + dhcp6->request_timeout--; + } else if (dhcp6->request_timeout == 1) { + dhcp6->request_timeout--; + /* { dhcp6->request_timeout == 0 } */ + LWIP_DEBUGF(DHCP6_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp6_tmr(): request timeout\n")); + /* this client's request timeout triggered */ + dhcp6_timeout(netif, dhcp6); + } + } + } +} #endif /* LWIP_IPV6 && LWIP_IPV6_DHCP6 */ diff --git a/Libraries/LwIP/src/core/ipv6/ethip6.c b/Libraries/LwIP/src/core/ipv6/ethip6.c index 1d3ff9e..0a616b6 100755 --- a/Libraries/LwIP/src/core/ipv6/ethip6.c +++ b/Libraries/LwIP/src/core/ipv6/ethip6.c @@ -82,6 +82,11 @@ ethip6_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr) const u8_t *hwaddr; err_t result; + LWIP_ASSERT_CORE_LOCKED(); + + /* The destination IP address must be properly zoned from here on down. */ + IP6_ADDR_ZONECHECK_NETIF(ip6addr, netif); + /* multicast destination IP address? */ if (ip6_addr_ismulticast(ip6addr)) { /* Hash IP multicast address to MAC address.*/ diff --git a/Libraries/LwIP/src/core/ipv6/icmp6.c b/Libraries/LwIP/src/core/ipv6/icmp6.c index c8b1664..7c93668 100755 --- a/Libraries/LwIP/src/core/ipv6/icmp6.c +++ b/Libraries/LwIP/src/core/ipv6/icmp6.c @@ -57,15 +57,17 @@ #include -#ifndef LWIP_ICMP6_DATASIZE -#define LWIP_ICMP6_DATASIZE 8 -#endif #if LWIP_ICMP6_DATASIZE == 0 +#undef LWIP_ICMP6_DATASIZE #define LWIP_ICMP6_DATASIZE 8 #endif /* Forward declarations */ static void icmp6_send_response(struct pbuf *p, u8_t code, u32_t data, u8_t type); +static void icmp6_send_response_with_addrs(struct pbuf *p, u8_t code, u32_t data, + u8_t type, const ip6_addr_t *src_addr, const ip6_addr_t *dest_addr); +static void icmp6_send_response_with_addrs_and_netif(struct pbuf *p, u8_t code, u32_t data, + u8_t type, const ip6_addr_t *src_addr, const ip6_addr_t *dest_addr, struct netif *netif); /** @@ -118,7 +120,6 @@ icmp6_input(struct pbuf *p, struct netif *inp) case ICMP6_TYPE_PTB: /* Packet too big */ nd6_input(p, inp); return; - break; case ICMP6_TYPE_RS: #if LWIP_IPV6_FORWARD /* @todo implement router functionality */ @@ -130,7 +131,6 @@ icmp6_input(struct pbuf *p, struct netif *inp) case ICMP6_TYPE_MLD: mld6_input(p, inp); return; - break; #endif case ICMP6_TYPE_EREQ: #if !LWIP_MULTICAST_PING @@ -209,6 +209,9 @@ icmp6_input(struct pbuf *p, struct netif *inp) /** * Send an icmpv6 'destination unreachable' packet. * + * This function must be used only in direct response to a packet that is being + * received right now. Otherwise, address zones would be lost. + * * @param p the input packet for which the 'unreachable' should be sent, * p->payload pointing to the IPv6 header * @param c ICMPv6 code for the unreachable type @@ -222,6 +225,9 @@ icmp6_dest_unreach(struct pbuf *p, enum icmp6_dur_code c) /** * Send an icmpv6 'packet too big' packet. * + * This function must be used only in direct response to a packet that is being + * received right now. Otherwise, address zones would be lost. + * * @param p the input packet for which the 'packet too big' should be sent, * p->payload pointing to the IPv6 header * @param mtu the maximum mtu that we can accept @@ -235,7 +241,10 @@ icmp6_packet_too_big(struct pbuf *p, u32_t mtu) /** * Send an icmpv6 'time exceeded' packet. * - * @param p the input packet for which the 'unreachable' should be sent, + * This function must be used only in direct response to a packet that is being + * received right now. Otherwise, address zones would be lost. + * + * @param p the input packet for which the 'time exceeded' should be sent, * p->payload pointing to the IPv6 header * @param c ICMPv6 code for the time exceeded type */ @@ -245,22 +254,50 @@ icmp6_time_exceeded(struct pbuf *p, enum icmp6_te_code c) icmp6_send_response(p, c, 0, ICMP6_TYPE_TE); } +/** + * Send an icmpv6 'time exceeded' packet, with explicit source and destination + * addresses. + * + * This function may be used to send a response sometime after receiving the + * packet for which this response is meant. The provided source and destination + * addresses are used primarily to retain their zone information. + * + * @param p the input packet for which the 'time exceeded' should be sent, + * p->payload pointing to the IPv6 header + * @param c ICMPv6 code for the time exceeded type + * @param src_addr source address of the original packet, with zone information + * @param dest_addr destination address of the original packet, with zone + * information + */ +void +icmp6_time_exceeded_with_addrs(struct pbuf *p, enum icmp6_te_code c, + const ip6_addr_t *src_addr, const ip6_addr_t *dest_addr) +{ + icmp6_send_response_with_addrs(p, c, 0, ICMP6_TYPE_TE, src_addr, dest_addr); +} + /** * Send an icmpv6 'parameter problem' packet. * + * This function must be used only in direct response to a packet that is being + * received right now. Otherwise, address zones would be lost and the calculated + * offset would be wrong (calculated against ip6_current_header()). + * * @param p the input packet for which the 'param problem' should be sent, * p->payload pointing to the IP header * @param c ICMPv6 code for the param problem type * @param pointer the pointer to the byte where the parameter is found */ void -icmp6_param_problem(struct pbuf *p, enum icmp6_pp_code c, u32_t pointer) +icmp6_param_problem(struct pbuf *p, enum icmp6_pp_code c, const void *pointer) { - icmp6_send_response(p, c, pointer, ICMP6_TYPE_PP); + u32_t pointer_u32 = (u32_t)((const u8_t *)pointer - (const u8_t *)ip6_current_header()); + icmp6_send_response(p, c, pointer_u32, ICMP6_TYPE_PP); } /** * Send an ICMPv6 packet in response to an incoming packet. + * The packet is sent *to* ip_current_src_addr() on ip_current_netif(). * * @param p the input packet for which the response should be sent, * p->payload pointing to the IPv6 header @@ -270,14 +307,86 @@ icmp6_param_problem(struct pbuf *p, enum icmp6_pp_code c, u32_t pointer) */ static void icmp6_send_response(struct pbuf *p, u8_t code, u32_t data, u8_t type) +{ + const struct ip6_addr *reply_src, *reply_dest; + struct netif *netif = ip_current_netif(); + + LWIP_ASSERT("icmpv6 packet not a direct response", netif != NULL); + reply_dest = ip6_current_src_addr(); + + /* Select an address to use as source. */ + reply_src = ip_2_ip6(ip6_select_source_address(netif, reply_dest)); + if (reply_src == NULL) { + ICMP6_STATS_INC(icmp6.rterr); + return; + } + icmp6_send_response_with_addrs_and_netif(p, code, data, type, reply_src, reply_dest, netif); +} + +/** + * Send an ICMPv6 packet in response to an incoming packet. + * + * Call this function if the packet is NOT sent as a direct response to an + * incoming packet, but rather sometime later (e.g. for a fragment reassembly + * timeout). The caller must provide the zoned source and destination addresses + * from the original packet with the src_addr and dest_addr parameters. The + * reason for this approach is that while the addresses themselves are part of + * the original packet, their zone information is not, thus possibly resulting + * in a link-local response being sent over the wrong link. + * + * @param p the input packet for which the response should be sent, + * p->payload pointing to the IPv6 header + * @param code Code of the ICMPv6 header + * @param data Additional 32-bit parameter in the ICMPv6 header + * @param type Type of the ICMPv6 header + * @param src_addr original source address + * @param dest_addr original destination address + */ +static void +icmp6_send_response_with_addrs(struct pbuf *p, u8_t code, u32_t data, u8_t type, + const ip6_addr_t *src_addr, const ip6_addr_t *dest_addr) +{ + const struct ip6_addr *reply_src, *reply_dest; + struct netif *netif; + + /* Get the destination address and netif for this ICMP message. */ + LWIP_ASSERT("must provide both source and destination", src_addr != NULL); + LWIP_ASSERT("must provide both source and destination", dest_addr != NULL); + + /* Special case, as ip6_current_xxx is either NULL, or points + to a different packet than the one that expired. */ + IP6_ADDR_ZONECHECK(src_addr); + IP6_ADDR_ZONECHECK(dest_addr); + /* Swap source and destination for the reply. */ + reply_dest = src_addr; + reply_src = dest_addr; + netif = ip6_route(reply_src, reply_dest); + if (netif == NULL) { + ICMP6_STATS_INC(icmp6.rterr); + return; + } + icmp6_send_response_with_addrs_and_netif(p, code, data, type, reply_src, + reply_dest, netif); +} + +/** + * Send an ICMPv6 packet (with srd/dst address and netif given). + * + * @param p the input packet for which the response should be sent, + * p->payload pointing to the IPv6 header + * @param code Code of the ICMPv6 header + * @param data Additional 32-bit parameter in the ICMPv6 header + * @param type Type of the ICMPv6 header + * @param reply_src source address of the packet to send + * @param reply_dest destination address of the packet to send + * @param netif netif to send the packet + */ +static void +icmp6_send_response_with_addrs_and_netif(struct pbuf *p, u8_t code, u32_t data, u8_t type, + const ip6_addr_t *reply_src, const ip6_addr_t *reply_dest, struct netif *netif) { struct pbuf *q; struct icmp6_hdr *icmp6hdr; - const ip6_addr_t *reply_src; - ip6_addr_t *reply_dest; - ip6_addr_t reply_src_local, reply_dest_local; - struct ip6_hdr *ip6hdr; - struct netif *netif; /* ICMPv6 header + IPv6 header + data */ q = pbuf_alloc(PBUF_IP, sizeof(struct icmp6_hdr) + IP6_HLEN + LWIP_ICMP6_DATASIZE, @@ -293,46 +402,12 @@ icmp6_send_response(struct pbuf *p, u8_t code, u32_t data, u8_t type) icmp6hdr = (struct icmp6_hdr *)q->payload; icmp6hdr->type = type; icmp6hdr->code = code; - icmp6hdr->data = data; + icmp6hdr->data = lwip_htonl(data); /* copy fields from original packet */ SMEMCPY((u8_t *)q->payload + sizeof(struct icmp6_hdr), (u8_t *)p->payload, IP6_HLEN + LWIP_ICMP6_DATASIZE); - /* Get the destination address and netif for this ICMP message. */ - if ((ip_current_netif() == NULL) || - ((code == ICMP6_TE_FRAG) && (type == ICMP6_TYPE_TE))) { - /* Special case, as ip6_current_xxx is either NULL, or points - * to a different packet than the one that expired. - * We must use the addresses that are stored in the expired packet. */ - ip6hdr = (struct ip6_hdr *)p->payload; - /* copy from packed address to aligned address */ - ip6_addr_copy(reply_dest_local, ip6hdr->src); - ip6_addr_copy(reply_src_local, ip6hdr->dest); - reply_dest = &reply_dest_local; - reply_src = &reply_src_local; - netif = ip6_route(reply_src, reply_dest); - if (netif == NULL) { - /* drop */ - pbuf_free(q); - ICMP6_STATS_INC(icmp6.rterr); - return; - } - } - else { - netif = ip_current_netif(); - reply_dest = ip6_current_src_addr(); - - /* Select an address to use as source. */ - reply_src = ip_2_ip6(ip6_select_source_address(netif, reply_dest)); - if (reply_src == NULL) { - /* drop */ - pbuf_free(q); - ICMP6_STATS_INC(icmp6.rterr); - return; - } - } - /* calculate checksum */ icmp6hdr->chksum = 0; #if CHECKSUM_GEN_ICMP6 diff --git a/Libraries/LwIP/src/core/ipv6/ip6.c b/Libraries/LwIP/src/core/ipv6/ip6.c index e354087..b0906a3 100755 --- a/Libraries/LwIP/src/core/ipv6/ip6.c +++ b/Libraries/LwIP/src/core/ipv6/ip6.c @@ -51,7 +51,7 @@ #include "lwip/ip6_addr.h" #include "lwip/ip6_frag.h" #include "lwip/icmp6.h" -#include "lwip/raw.h" +#include "lwip/priv/raw_priv.h" #include "lwip/udp.h" #include "lwip/priv/tcp_priv.h" #include "lwip/dhcp6.h" @@ -68,13 +68,15 @@ * Finds the appropriate network interface for a given IPv6 address. It tries to select * a netif following a sequence of heuristics: * 1) if there is only 1 netif, return it - * 2) if the destination is a link-local address, try to match the src address to a netif. - * this is a tricky case because with multiple netifs, link-local addresses only have - * meaning within a particular subnet/link. - * 3) tries to match the destination subnet to a configured address - * 4) tries to find a router - * 5) tries to match the source address to the netif - * 6) returns the default netif, if configured + * 2) if the destination is a zoned address, match its zone to a netif + * 3) if the either the source or destination address is a scoped address, + * match the source address's zone (if set) or address (if not) to a netif + * 4) tries to match the destination subnet to a configured address + * 5) tries to find a router-announced route + * 6) tries to match the (unscoped) source address to the netif + * 7) returns the default netif, if configured + * + * Note that each of the two given addresses may or may not be properly zoned. * * @param src the source IPv6 address, if known * @param dest the destination IPv6 address for which to find the route @@ -83,50 +85,101 @@ struct netif * ip6_route(const ip6_addr_t *src, const ip6_addr_t *dest) { +#if LWIP_SINGLE_NETIF + LWIP_UNUSED_ARG(src); + LWIP_UNUSED_ARG(dest); +#else /* LWIP_SINGLE_NETIF */ struct netif *netif; s8_t i; + LWIP_ASSERT_CORE_LOCKED(); + /* If single netif configuration, fast return. */ if ((netif_list != NULL) && (netif_list->next == NULL)) { - if (!netif_is_up(netif_list) || !netif_is_link_up(netif_list)) { + if (!netif_is_up(netif_list) || !netif_is_link_up(netif_list) || + (ip6_addr_has_zone(dest) && !ip6_addr_test_zone(dest, netif_list))) { return NULL; } return netif_list; } - /* Special processing for link-local addresses. */ - if (ip6_addr_islinklocal(dest)) { - if (ip6_addr_isany(src)) { - /* Use default netif, if Up. */ - if (netif_default == NULL || !netif_is_up(netif_default) || - !netif_is_link_up(netif_default)) { - return NULL; +#if LWIP_IPV6_SCOPES + /* Special processing for zoned destination addresses. This includes link- + * local unicast addresses and interface/link-local multicast addresses. Use + * the zone to find a matching netif. If the address is not zoned, then there + * is technically no "wrong" netif to choose, and we leave routing to other + * rules; in most cases this should be the scoped-source rule below. */ + if (ip6_addr_has_zone(dest)) { + IP6_ADDR_ZONECHECK(dest); + /* Find a netif based on the zone. For custom mappings, one zone may map + * to multiple netifs, so find one that can actually send a packet. */ + NETIF_FOREACH(netif) { + if (ip6_addr_test_zone(dest, netif) && + netif_is_up(netif) && netif_is_link_up(netif)) { + return netif; } - return netif_default; } + /* No matching netif found. Do no try to route to a different netif, + * as that would be a zone violation, resulting in any packets sent to + * that netif being dropped on output. */ + return NULL; + } +#endif /* LWIP_IPV6_SCOPES */ - /* Try to find the netif for the source address, checking that link is up. */ - for (netif = netif_list; netif != NULL; netif = netif->next) { - if (!netif_is_up(netif) || !netif_is_link_up(netif)) { - continue; - } - for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { - if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && - ip6_addr_cmp(src, netif_ip6_addr(netif, i))) { + /* Special processing for scoped source and destination addresses. If we get + * here, the destination address does not have a zone, so either way we need + * to look at the source address, which may or may not have a zone. If it + * does, the zone is restrictive: there is (typically) only one matching + * netif for it, and we should avoid routing to any other netif as that would + * result in guaranteed zone violations. For scoped source addresses that do + * not have a zone, use (only) a netif that has that source address locally + * assigned. This case also applies to the loopback source address, which has + * an implied link-local scope. If only the destination address is scoped + * (but, again, not zoned), we still want to use only the source address to + * determine its zone because that's most likely what the user/application + * wants, regardless of whether the source address is scoped. Finally, some + * of this story also applies if scoping is disabled altogether. */ +#if LWIP_IPV6_SCOPES + if (ip6_addr_has_scope(dest, IP6_UNKNOWN) || + ip6_addr_has_scope(src, IP6_UNICAST) || +#else /* LWIP_IPV6_SCOPES */ + if (ip6_addr_islinklocal(dest) || ip6_addr_ismulticast_iflocal(dest) || + ip6_addr_ismulticast_linklocal(dest) || ip6_addr_islinklocal(src) || +#endif /* LWIP_IPV6_SCOPES */ + ip6_addr_isloopback(src)) { +#if LWIP_IPV6_SCOPES + if (ip6_addr_has_zone(src)) { + /* Find a netif matching the source zone (relatively cheap). */ + NETIF_FOREACH(netif) { + if (netif_is_up(netif) && netif_is_link_up(netif) && + ip6_addr_test_zone(src, netif)) { return netif; } } + } else +#endif /* LWIP_IPV6_SCOPES */ + { + /* Find a netif matching the source address (relatively expensive). */ + NETIF_FOREACH(netif) { + if (!netif_is_up(netif) || !netif_is_link_up(netif)) { + continue; + } + for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { + if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && + ip6_addr_cmp_zoneless(src, netif_ip6_addr(netif, i))) { + return netif; + } + } + } } - - /* netif not found, use default netif, if up */ - if (netif_default == NULL || !netif_is_up(netif_default) || - !netif_is_link_up(netif_default)) { - return NULL; - } - return netif_default; + /* Again, do not use any other netif in this case, as that could result in + * zone boundary violations. */ + return NULL; } - /* we come here for non-link-local addresses */ + /* We come here only if neither source nor destination is scoped. */ + IP6_ADDR_ZONECHECK(src); + #ifdef LWIP_HOOK_IP6_ROUTE netif = LWIP_HOOK_IP6_ROUTE(src, dest); if (netif != NULL) { @@ -134,28 +187,36 @@ ip6_route(const ip6_addr_t *src, const ip6_addr_t *dest) } #endif - /* See if the destination subnet matches a configured address. */ - for (netif = netif_list; netif != NULL; netif = netif->next) { + /* See if the destination subnet matches a configured address. In accordance + * with RFC 5942, dynamically configured addresses do not have an implied + * local subnet, and thus should be considered /128 assignments. However, as + * such, the destination address may still match a local address, and so we + * still need to check for exact matches here. By (lwIP) policy, statically + * configured addresses do always have an implied local /64 subnet. */ + NETIF_FOREACH(netif) { if (!netif_is_up(netif) || !netif_is_link_up(netif)) { continue; } for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && - ip6_addr_netcmp(dest, netif_ip6_addr(netif, i))) { + ip6_addr_netcmp(dest, netif_ip6_addr(netif, i)) && + (netif_ip6_addr_isstatic(netif, i) || + ip6_addr_nethostcmp(dest, netif_ip6_addr(netif, i)))) { return netif; } } } - /* Get the netif for a suitable router. */ + /* Get the netif for a suitable router-announced route. */ netif = nd6_find_route(dest); - if ((netif != NULL) && netif_is_up(netif) && netif_is_link_up(netif)) { + if (netif != NULL) { return netif; } - /* try with the netif that matches the source address. */ + /* Try with the netif that matches the source address. Given the earlier rule + * for scoped source addresses, this applies to unscoped addresses only. */ if (!ip6_addr_isany(src)) { - for (netif = netif_list; netif != NULL; netif = netif->next) { + NETIF_FOREACH(netif) { if (!netif_is_up(netif) || !netif_is_link_up(netif)) { continue; } @@ -176,7 +237,7 @@ ip6_route(const ip6_addr_t *src, const ip6_addr_t *dest) return netif_default; } /* default netif is not up, just use any netif for loopback traffic */ - for (netif = netif_list; netif != NULL; netif = netif->next) { + NETIF_FOREACH(netif) { if (netif_is_up(netif)) { return netif; } @@ -184,6 +245,7 @@ ip6_route(const ip6_addr_t *src, const ip6_addr_t *dest) return NULL; } #endif /* LWIP_NETIF_LOOPBACK && !LWIP_HAVE_LOOPIF */ +#endif /* !LWIP_SINGLE_NETIF */ /* no matching netif found, use default netif, if up */ if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default)) { @@ -194,85 +256,100 @@ ip6_route(const ip6_addr_t *src, const ip6_addr_t *dest) /** * @ingroup ip6 - * Select the best IPv6 source address for a given destination - * IPv6 address. Loosely follows RFC 3484. "Strong host" behavior - * is assumed. + * Select the best IPv6 source address for a given destination IPv6 address. + * + * This implementation follows RFC 6724 Sec. 5 to the following extent: + * - Rules 1, 2, 3: fully implemented + * - Rules 4, 5, 5.5: not applicable + * - Rule 6: not implemented + * - Rule 7: not applicable + * - Rule 8: limited to "prefer /64 subnet match over non-match" + * + * For Rule 2, we deliberately deviate from RFC 6724 Sec. 3.1 by considering + * ULAs to be of smaller scope than global addresses, to avoid that a preferred + * ULA is picked over a deprecated global address when given a global address + * as destination, as that would likely result in broken two-way communication. + * + * As long as temporary addresses are not supported (as used in Rule 7), a + * proper implementation of Rule 8 would obviate the need to implement Rule 6. * * @param netif the netif on which to send a packet - * @param dest the destination we are trying to reach + * @param dest the destination we are trying to reach (possibly not properly + * zoned) * @return the most suitable source address to use, or NULL if no suitable * source address is found */ const ip_addr_t * ip6_select_source_address(struct netif *netif, const ip6_addr_t *dest) { - const ip_addr_t *src = NULL; - u8_t i; + const ip_addr_t *best_addr; + const ip6_addr_t *cand_addr; + s8_t dest_scope, cand_scope; + s8_t best_scope = IP6_MULTICAST_SCOPE_RESERVED; + u8_t i, cand_pref, cand_bits; + u8_t best_pref = 0; + u8_t best_bits = 0; - /* If dest is link-local, choose a link-local source. */ - if (ip6_addr_islinklocal(dest) || ip6_addr_ismulticast_linklocal(dest) || ip6_addr_ismulticast_iflocal(dest)) { - for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { - if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && - ip6_addr_islinklocal(netif_ip6_addr(netif, i))) { - return netif_ip_addr6(netif, i); - } - } + /* Start by determining the scope of the given destination address. These + * tests are hopefully (roughly) in order of likeliness to match. */ + if (ip6_addr_isglobal(dest)) { + dest_scope = IP6_MULTICAST_SCOPE_GLOBAL; + } else if (ip6_addr_islinklocal(dest) || ip6_addr_isloopback(dest)) { + dest_scope = IP6_MULTICAST_SCOPE_LINK_LOCAL; + } else if (ip6_addr_isuniquelocal(dest)) { + dest_scope = IP6_MULTICAST_SCOPE_ORGANIZATION_LOCAL; + } else if (ip6_addr_ismulticast(dest)) { + dest_scope = ip6_addr_multicast_scope(dest); + } else if (ip6_addr_issitelocal(dest)) { + dest_scope = IP6_MULTICAST_SCOPE_SITE_LOCAL; + } else { + /* no match, consider scope global */ + dest_scope = IP6_MULTICAST_SCOPE_GLOBAL; } - /* Choose a site-local with matching prefix. */ - if (ip6_addr_issitelocal(dest) || ip6_addr_ismulticast_sitelocal(dest)) { - for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { - if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && - ip6_addr_issitelocal(netif_ip6_addr(netif, i)) && - ip6_addr_netcmp(dest, netif_ip6_addr(netif, i))) { - return netif_ip_addr6(netif, i); - } - } - } + best_addr = NULL; - /* Choose a unique-local with matching prefix. */ - if (ip6_addr_isuniquelocal(dest) || ip6_addr_ismulticast_orglocal(dest)) { - for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { - if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && - ip6_addr_isuniquelocal(netif_ip6_addr(netif, i)) && - ip6_addr_netcmp(dest, netif_ip6_addr(netif, i))) { - return netif_ip_addr6(netif, i); - } - } - } - - /* Choose a global with best matching prefix. */ - if (ip6_addr_isglobal(dest) || ip6_addr_ismulticast_global(dest)) { - for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { - if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && - ip6_addr_isglobal(netif_ip6_addr(netif, i))) { - if (src == NULL) { - src = netif_ip_addr6(netif, i); - } - else { - /* Replace src only if we find a prefix match. */ - /* @todo find longest matching prefix. */ - if ((!(ip6_addr_netcmp(ip_2_ip6(src), dest))) && - ip6_addr_netcmp(netif_ip6_addr(netif, i), dest)) { - src = netif_ip_addr6(netif, i); - } - } - } - } - if (src != NULL) { - return src; - } - } - - /* Last resort: see if arbitrary prefix matches. */ for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { - if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && - ip6_addr_netcmp(dest, netif_ip6_addr(netif, i))) { - return netif_ip_addr6(netif, i); + /* Consider only valid (= preferred and deprecated) addresses. */ + if (!ip6_addr_isvalid(netif_ip6_addr_state(netif, i))) { + continue; + } + /* Determine the scope of this candidate address. Same ordering idea. */ + cand_addr = netif_ip6_addr(netif, i); + if (ip6_addr_isglobal(cand_addr)) { + cand_scope = IP6_MULTICAST_SCOPE_GLOBAL; + } else if (ip6_addr_islinklocal(cand_addr)) { + cand_scope = IP6_MULTICAST_SCOPE_LINK_LOCAL; + } else if (ip6_addr_isuniquelocal(cand_addr)) { + cand_scope = IP6_MULTICAST_SCOPE_ORGANIZATION_LOCAL; + } else if (ip6_addr_issitelocal(cand_addr)) { + cand_scope = IP6_MULTICAST_SCOPE_SITE_LOCAL; + } else { + /* no match, treat as low-priority global scope */ + cand_scope = IP6_MULTICAST_SCOPE_RESERVEDF; + } + cand_pref = ip6_addr_ispreferred(netif_ip6_addr_state(netif, i)); + /* @todo compute the actual common bits, for longest matching prefix. */ + /* We cannot count on the destination address having a proper zone + * assignment, so do not compare zones in this case. */ + cand_bits = ip6_addr_netcmp_zoneless(cand_addr, dest); /* just 1 or 0 for now */ + if (cand_bits && ip6_addr_nethostcmp(cand_addr, dest)) { + return netif_ip_addr6(netif, i); /* Rule 1 */ + } + if ((best_addr == NULL) || /* no alternative yet */ + ((cand_scope < best_scope) && (cand_scope >= dest_scope)) || + ((cand_scope > best_scope) && (best_scope < dest_scope)) || /* Rule 2 */ + ((cand_scope == best_scope) && ((cand_pref > best_pref) || /* Rule 3 */ + ((cand_pref == best_pref) && (cand_bits > best_bits))))) { /* Rule 8 */ + /* We found a new "winning" candidate. */ + best_addr = netif_ip_addr6(netif, i); + best_scope = cand_scope; + best_pref = cand_pref; + best_bits = cand_bits; } } - return NULL; + return best_addr; /* may be NULL */ } #if LWIP_IPV6_FORWARD @@ -321,6 +398,20 @@ ip6_forward(struct pbuf *p, struct ip6_hdr *iphdr, struct netif *inp) IP6_STATS_INC(ip6.drop); return; } +#if LWIP_IPV6_SCOPES + /* Do not forward packets with a zoned (e.g., link-local) source address + * outside of their zone. We determined the zone a bit earlier, so we know + * that the address is properly zoned here, so we can safely use has_zone. + * Also skip packets with a loopback source address (link-local implied). */ + if ((ip6_addr_has_zone(ip6_current_src_addr()) && + !ip6_addr_test_zone(ip6_current_src_addr(), netif)) || + ip6_addr_isloopback(ip6_current_src_addr())) { + LWIP_DEBUGF(IP6_DEBUG, ("ip6_forward: not forwarding packet beyond its source address zone.\n")); + IP6_STATS_INC(ip6.rterr); + IP6_STATS_INC(ip6.drop); + return; + } +#endif /* LWIP_IPV6_SCOPES */ /* Do not forward packets onto the same network interface on which * they arrived. */ if (netif == inp) { @@ -373,6 +464,33 @@ ip6_forward(struct pbuf *p, struct ip6_hdr *iphdr, struct netif *inp) } #endif /* LWIP_IPV6_FORWARD */ +/** Return true if the current input packet should be accepted on this netif */ +static int +ip6_input_accept(struct netif *netif) +{ + /* interface is up? */ + if (netif_is_up(netif)) { + u8_t i; + /* unicast to this interface address? address configured? */ + /* If custom scopes are used, the destination zone will be tested as + * part of the local-address comparison, but we need to test the source + * scope as well (e.g., is this interface on the same link?). */ + for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { + if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && + ip6_addr_cmp(ip6_current_dest_addr(), netif_ip6_addr(netif, i)) +#if IPV6_CUSTOM_SCOPES + && (!ip6_addr_has_zone(ip6_current_src_addr()) || + ip6_addr_test_zone(ip6_current_src_addr(), netif)) +#endif /* IPV6_CUSTOM_SCOPES */ + ) { + /* accept on this netif */ + return 1; + } + } + } + return 0; +} + /** * This function is called by the network interface device driver when * an IPv6 packet is received. The function does the basic checks of the @@ -392,13 +510,17 @@ ip6_input(struct pbuf *p, struct netif *inp) { struct ip6_hdr *ip6hdr; struct netif *netif; - u8_t nexth; - u16_t hlen; /* the current header length */ - u8_t i; + const u8_t *nexth; + u16_t hlen, hlen_tot; /* the current header length */ #if 0 /*IP_ACCEPT_LINK_LAYER_ADDRESSING*/ @todo int check_ip_src=1; #endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */ +#if LWIP_RAW + raw_input_state_t raw_status; +#endif /* LWIP_RAW */ + + LWIP_ASSERT_CORE_LOCKED(); IP6_STATS_INC(ip6.recv); @@ -421,7 +543,7 @@ ip6_input(struct pbuf *p, struct netif *inp) #endif /* header length exceeds first pbuf length, or ip length exceeds total pbuf length? */ - if ((IP6_HLEN > p->len) || ((IP6H_PLEN(ip6hdr) + IP6_HLEN) > p->tot_len)) { + if ((IP6_HLEN > p->len) || (IP6H_PLEN(ip6hdr) > (p->tot_len - IP6_HLEN))) { if (IP6_HLEN > p->len) { LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("IPv6 header (len %"U16_F") does not fit in first pbuf (len %"U16_F"), IP packet dropped.\n", @@ -441,22 +563,28 @@ ip6_input(struct pbuf *p, struct netif *inp) /* Trim pbuf. This should have been done at the netif layer, * but we'll do it anyway just to be sure that its done. */ - pbuf_realloc(p, IP6_HLEN + IP6H_PLEN(ip6hdr)); + pbuf_realloc(p, (u16_t)(IP6_HLEN + IP6H_PLEN(ip6hdr))); /* copy IP addresses to aligned ip6_addr_t */ - ip_addr_copy_from_ip6(ip_data.current_iphdr_dest, ip6hdr->dest); - ip_addr_copy_from_ip6(ip_data.current_iphdr_src, ip6hdr->src); + ip_addr_copy_from_ip6_packed(ip_data.current_iphdr_dest, ip6hdr->dest); + ip_addr_copy_from_ip6_packed(ip_data.current_iphdr_src, ip6hdr->src); /* Don't accept virtual IPv4 mapped IPv6 addresses. * Don't accept multicast source addresses. */ if (ip6_addr_isipv4mappedipv6(ip_2_ip6(&ip_data.current_iphdr_dest)) || ip6_addr_isipv4mappedipv6(ip_2_ip6(&ip_data.current_iphdr_src)) || ip6_addr_ismulticast(ip_2_ip6(&ip_data.current_iphdr_src))) { + /* free (drop) packet pbufs */ + pbuf_free(p); IP6_STATS_INC(ip6.err); IP6_STATS_INC(ip6.drop); return ERR_OK; } + /* Set the appropriate zone identifier on the addresses. */ + ip6_addr_assign_zone(ip_2_ip6(&ip_data.current_iphdr_dest), IP6_UNKNOWN, inp); + ip6_addr_assign_zone(ip_2_ip6(&ip_data.current_iphdr_src), IP6_UNICAST, inp); + /* current header pointer. */ ip_data.current_ip6_header = ip6hdr; @@ -477,6 +605,7 @@ ip6_input(struct pbuf *p, struct netif *inp) } #else /* LWIP_IPV6_MLD */ else if (ip6_addr_issolicitednode(ip6_current_dest_addr())) { + u8_t i; /* Filter solicited node packets when MLD is not enabled * (for Neighbor discovery). */ netif = NULL; @@ -496,46 +625,44 @@ ip6_input(struct pbuf *p, struct netif *inp) } } else { /* start trying with inp. if that's not acceptable, start walking the - list of configured netifs. - 'first' is used as a boolean to mark whether we started walking the list */ - int first = 1; - netif = inp; - do { - /* interface is up? */ - if (netif_is_up(netif)) { - /* unicast to this interface address? address configured? */ - for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { - if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && - ip6_addr_cmp(ip6_current_dest_addr(), netif_ip6_addr(netif, i))) { - /* exit outer loop */ - goto netif_found; - } - } + list of configured netifs. */ + if (ip6_input_accept(inp)) { + netif = inp; + } else { + netif = NULL; +#if !IPV6_CUSTOM_SCOPES + /* Shortcut: stop looking for other interfaces if either the source or + * the destination has a scope constrained to this interface. Custom + * scopes may break the 1:1 link/interface mapping, however. */ + if (ip6_addr_islinklocal(ip6_current_dest_addr()) || + ip6_addr_islinklocal(ip6_current_src_addr())) { + goto netif_found; } - if (first) { - if (ip6_addr_islinklocal(ip6_current_dest_addr()) +#endif /* !IPV6_CUSTOM_SCOPES */ #if !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF - || ip6_addr_isloopback(ip6_current_dest_addr()) + /* The loopback address is to be considered link-local. Packets to it + * should be dropped on other interfaces, as per RFC 4291 Sec. 2.5.3. + * Its implied scope means packets *from* the loopback address should + * not be accepted on other interfaces, either. These requirements + * cannot be implemented in the case that loopback traffic is sent + * across a non-loopback interface, however. */ + if (ip6_addr_isloopback(ip6_current_dest_addr()) || + ip6_addr_isloopback(ip6_current_src_addr())) { + goto netif_found; + } #endif /* !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF */ - ) { - /* Do not match link-local addresses to other netifs. The loopback - * address is to be considered link-local and packets to it should be - * dropped on other interfaces, as per RFC 4291 Sec. 2.5.3. This - * requirement cannot be implemented in the case that loopback - * traffic is sent across a non-loopback interface, however. - */ - netif = NULL; +#if !LWIP_SINGLE_NETIF + NETIF_FOREACH(netif) { + if (netif == inp) { + /* we checked that before already */ + continue; + } + if (ip6_input_accept(netif)) { break; } - first = 0; - netif = netif_list; - } else { - netif = netif->next; } - if (netif == inp) { - netif = netif->next; - } - } while (netif != NULL); +#endif /* !LWIP_SINGLE_NETIF */ + } netif_found: LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet accepted on interface %c%c\n", netif ? netif->name[0] : 'X', netif? netif->name[1] : 'X')); @@ -571,29 +698,35 @@ netif_found: ip_data.current_netif = netif; /* Save next header type. */ - nexth = IP6H_NEXTH(ip6hdr); + nexth = &IP6H_NEXTH(ip6hdr); /* Init header length. */ - hlen = ip_data.current_ip_header_tot_len = IP6_HLEN; + hlen = hlen_tot = IP6_HLEN; /* Move to payload. */ - pbuf_header(p, -IP6_HLEN); + pbuf_remove_header(p, IP6_HLEN); /* Process known option extension headers, if present. */ - while (nexth != IP6_NEXTH_NONE) + while (*nexth != IP6_NEXTH_NONE) { - switch (nexth) { + switch (*nexth) { case IP6_NEXTH_HOPBYHOP: + { + s32_t opt_offset; + struct ip6_hbh_hdr *hbh_hdr; + struct ip6_opt_hdr *opt_hdr; LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with Hop-by-Hop options header\n")); + + /* Get and check the header length, while staying in packet bounds. */ + hbh_hdr = (struct ip6_hbh_hdr *)p->payload; + /* Get next header type. */ - nexth = *((u8_t *)p->payload); + nexth = &IP6_HBH_NEXTH(hbh_hdr); /* Get the header length. */ - hlen = 8 * (1 + *((u8_t *)p->payload + 1)); - ip_data.current_ip_header_tot_len += hlen; + hlen = (u16_t)(8 * (1 + hbh_hdr->_hlen)); - /* Skip over this header. */ - if (hlen > p->len) { + if ((p->len < 8) || (hlen > p->len)) { LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("IPv6 options header (hlen %"U16_F") does not fit in first pbuf (len %"U16_F"), IPv6 packet dropped.\n", hlen, p->len)); @@ -604,19 +737,85 @@ netif_found: goto ip6_input_cleanup; } - pbuf_header(p, -(s16_t)hlen); + hlen_tot = (u16_t)(hlen_tot + hlen); + + /* The extended option header starts right after Hop-by-Hop header. */ + opt_offset = IP6_HBH_HLEN; + while (opt_offset < hlen) + { + s32_t opt_dlen = 0; + + opt_hdr = (struct ip6_opt_hdr *)((u8_t *)hbh_hdr + opt_offset); + + switch (IP6_OPT_TYPE(opt_hdr)) { + /* @todo: process IPV6 Hop-by-Hop option data */ + case IP6_PAD1_OPTION: + /* PAD1 option doesn't have length and value field */ + opt_dlen = -1; + break; + case IP6_PADN_OPTION: + opt_dlen = IP6_OPT_DLEN(opt_hdr); + break; + case IP6_ROUTER_ALERT_OPTION: + opt_dlen = IP6_OPT_DLEN(opt_hdr); + break; + case IP6_JUMBO_OPTION: + opt_dlen = IP6_OPT_DLEN(opt_hdr); + break; + default: + /* Check 2 MSB of Hop-by-Hop header type. */ + switch (IP6_OPT_TYPE_ACTION(opt_hdr)) { + case 1: + /* Discard the packet. */ + LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with invalid Hop-by-Hop option type dropped.\n")); + pbuf_free(p); + IP6_STATS_INC(ip6.drop); + goto ip6_input_cleanup; + case 2: + /* Send ICMP Parameter Problem */ + icmp6_param_problem(p, ICMP6_PP_OPTION, opt_hdr); + LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with invalid Hop-by-Hop option type dropped.\n")); + pbuf_free(p); + IP6_STATS_INC(ip6.drop); + goto ip6_input_cleanup; + case 3: + /* Send ICMP Parameter Problem if destination address is not a multicast address */ + if (!ip6_addr_ismulticast(ip6_current_dest_addr())) { + icmp6_param_problem(p, ICMP6_PP_OPTION, opt_hdr); + } + LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with invalid Hop-by-Hop option type dropped.\n")); + pbuf_free(p); + IP6_STATS_INC(ip6.drop); + goto ip6_input_cleanup; + default: + /* Skip over this option. */ + opt_dlen = IP6_OPT_DLEN(opt_hdr); + break; + } + break; + } + + /* Adjust the offset to move to the next extended option header */ + opt_offset = opt_offset + IP6_OPT_HLEN + opt_dlen; + } + pbuf_remove_header(p, hlen); break; + } case IP6_NEXTH_DESTOPTS: + { + s32_t opt_offset; + struct ip6_dest_hdr *dest_hdr; + struct ip6_opt_hdr *opt_hdr; LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with Destination options header\n")); + + dest_hdr = (struct ip6_dest_hdr *)p->payload; + /* Get next header type. */ - nexth = *((u8_t *)p->payload); + nexth = &IP6_DEST_NEXTH(dest_hdr); /* Get the header length. */ - hlen = 8 * (1 + *((u8_t *)p->payload + 1)); - ip_data.current_ip_header_tot_len += hlen; - - /* Skip over this header. */ - if (hlen > p->len) { + hlen = 8 * (1 + dest_hdr->_hlen); + if ((p->len < 8) || (hlen > p->len)) { LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("IPv6 options header (hlen %"U16_F") does not fit in first pbuf (len %"U16_F"), IPv6 packet dropped.\n", hlen, p->len)); @@ -627,19 +826,90 @@ netif_found: goto ip6_input_cleanup; } - pbuf_header(p, -(s16_t)hlen); + hlen_tot = (u16_t)(hlen_tot + hlen); + + /* The extended option header starts right after Destination header. */ + opt_offset = IP6_DEST_HLEN; + while (opt_offset < hlen) + { + s32_t opt_dlen = 0; + + opt_hdr = (struct ip6_opt_hdr *)((u8_t *)dest_hdr + opt_offset); + + switch (IP6_OPT_TYPE(opt_hdr)) + { + /* @todo: process IPV6 Destination option data */ + case IP6_PAD1_OPTION: + /* PAD1 option deosn't have length and value field */ + opt_dlen = -1; + break; + case IP6_PADN_OPTION: + opt_dlen = IP6_OPT_DLEN(opt_hdr); + break; + case IP6_ROUTER_ALERT_OPTION: + opt_dlen = IP6_OPT_DLEN(opt_hdr); + break; + case IP6_JUMBO_OPTION: + opt_dlen = IP6_OPT_DLEN(opt_hdr); + break; + case IP6_HOME_ADDRESS_OPTION: + opt_dlen = IP6_OPT_DLEN(opt_hdr); + break; + default: + /* Check 2 MSB of Destination header type. */ + switch (IP6_OPT_TYPE_ACTION(opt_hdr)) + { + case 1: + /* Discard the packet. */ + LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with invalid destination option type dropped.\n")); + pbuf_free(p); + IP6_STATS_INC(ip6.drop); + goto ip6_input_cleanup; + case 2: + /* Send ICMP Parameter Problem */ + icmp6_param_problem(p, ICMP6_PP_OPTION, opt_hdr); + LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with invalid destination option type dropped.\n")); + pbuf_free(p); + IP6_STATS_INC(ip6.drop); + goto ip6_input_cleanup; + case 3: + /* Send ICMP Parameter Problem if destination address is not a multicast address */ + if (!ip6_addr_ismulticast(ip6_current_dest_addr())) { + icmp6_param_problem(p, ICMP6_PP_OPTION, opt_hdr); + } + LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with invalid destination option type dropped.\n")); + pbuf_free(p); + IP6_STATS_INC(ip6.drop); + goto ip6_input_cleanup; + default: + /* Skip over this option. */ + opt_dlen = IP6_OPT_DLEN(opt_hdr); + break; + } + break; + } + + /* Adjust the offset to move to the next extended option header */ + opt_offset = opt_offset + IP6_OPT_HLEN + opt_dlen; + } + + pbuf_remove_header(p, hlen); break; + } case IP6_NEXTH_ROUTING: + { + struct ip6_rout_hdr *rout_hdr; LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with Routing header\n")); + + rout_hdr = (struct ip6_rout_hdr *)p->payload; + /* Get next header type. */ - nexth = *((u8_t *)p->payload); + nexth = &IP6_ROUT_NEXTH(rout_hdr); /* Get the header length. */ - hlen = 8 * (1 + *((u8_t *)p->payload + 1)); - ip_data.current_ip_header_tot_len += hlen; + hlen = 8 * (1 + rout_hdr->_hlen); - /* Skip over this header. */ - if (hlen > p->len) { + if ((p->len < 8) || (hlen > p->len)) { LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("IPv6 options header (hlen %"U16_F") does not fit in first pbuf (len %"U16_F"), IPv6 packet dropped.\n", hlen, p->len)); @@ -650,9 +920,41 @@ netif_found: goto ip6_input_cleanup; } - pbuf_header(p, -(s16_t)hlen); - break; + /* Skip over this header. */ + hlen_tot = (u16_t)(hlen_tot + hlen); + /* if segment left value is 0 in routing header, ignore the option */ + if (IP6_ROUT_SEG_LEFT(rout_hdr)) { + /* The length field of routing option header must be even */ + if (rout_hdr->_hlen & 0x1) { + /* Discard and send parameter field error */ + icmp6_param_problem(p, ICMP6_PP_FIELD, &rout_hdr->_hlen); + LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with invalid routing type dropped\n")); + pbuf_free(p); + IP6_STATS_INC(ip6.drop); + goto ip6_input_cleanup; + } + + switch (IP6_ROUT_TYPE(rout_hdr)) + { + /* TODO: process routing by the type */ + case IP6_ROUT_TYPE2: + break; + case IP6_ROUT_RPL: + break; + default: + /* Discard unrecognized routing type and send parameter field error */ + icmp6_param_problem(p, ICMP6_PP_FIELD, &IP6_ROUT_TYPE(rout_hdr)); + LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with invalid routing type dropped\n")); + pbuf_free(p); + IP6_STATS_INC(ip6.drop); + goto ip6_input_cleanup; + } + } + + pbuf_remove_header(p, hlen); + break; + } case IP6_NEXTH_FRAGMENT: { struct ip6_frag_hdr *frag_hdr; @@ -661,11 +963,10 @@ netif_found: frag_hdr = (struct ip6_frag_hdr *)p->payload; /* Get next header type. */ - nexth = frag_hdr->_nexth; + nexth = &IP6_FRAG_NEXTH(frag_hdr); /* Fragment Header length. */ hlen = 8; - ip_data.current_ip_header_tot_len += hlen; /* Make sure this header fits in current pbuf. */ if (hlen > p->len) { @@ -679,16 +980,27 @@ netif_found: goto ip6_input_cleanup; } + hlen_tot = (u16_t)(hlen_tot + hlen); + + /* check payload length is multiple of 8 octets when mbit is set */ + if (IP6_FRAG_MBIT(frag_hdr) && (IP6H_PLEN(ip6hdr) & 0x7)) { + /* ipv6 payload length is not multiple of 8 octets */ + icmp6_param_problem(p, ICMP6_PP_FIELD, LWIP_PACKED_CAST(const void *, &ip6hdr->_plen)); + LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with invalid payload length dropped\n")); + pbuf_free(p); + IP6_STATS_INC(ip6.drop); + goto ip6_input_cleanup; + } + /* Offset == 0 and more_fragments == 0? */ if ((frag_hdr->_fragment_offset & PP_HTONS(IP6_FRAG_OFFSET_MASK | IP6_FRAG_MORE_FLAG)) == 0) { - /* This is a 1-fragment packet, usually a packet that we have - * already reassembled. Skip this header anc continue. */ - pbuf_header(p, -(s16_t)hlen); + /* This is a 1-fragment packet. Skip this header and continue. */ + pbuf_remove_header(p, hlen); } else { #if LWIP_IPV6_REASS - /* reassemble the packet */ + ip_data.current_ip_header_tot_len = hlen_tot; p = ip6_reass(p); /* packet not fully reassembled yet? */ if (p == NULL) { @@ -698,9 +1010,9 @@ netif_found: /* Returned p point to IPv6 header. * Update all our variables and pointers and continue. */ ip6hdr = (struct ip6_hdr *)p->payload; - nexth = IP6H_NEXTH(ip6hdr); - hlen = ip_data.current_ip_header_tot_len = IP6_HLEN; - pbuf_header(p, -IP6_HLEN); + nexth = &IP6H_NEXTH(ip6hdr); + hlen = hlen_tot = IP6_HLEN; + pbuf_remove_header(p, IP6_HLEN); #else /* LWIP_IPV6_REASS */ /* free (drop) packet pbufs */ @@ -715,25 +1027,40 @@ netif_found: } default: goto options_done; - break; + } + + if (*nexth == IP6_NEXTH_HOPBYHOP) { + /* Hop-by-Hop header comes only as a first option */ + icmp6_param_problem(p, ICMP6_PP_HEADER, nexth); + LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with Hop-by-Hop options header dropped (only valid as a first option)\n")); + pbuf_free(p); + IP6_STATS_INC(ip6.drop); + goto ip6_input_cleanup; } } -options_done: - /* p points to IPv6 header again. */ - pbuf_header_force(p, (s16_t)ip_data.current_ip_header_tot_len); +options_done: /* send to upper layers */ LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: \n")); ip6_debug_print(p); LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: p->len %"U16_F" p->tot_len %"U16_F"\n", p->len, p->tot_len)); + ip_data.current_ip_header_tot_len = hlen_tot; + #if LWIP_RAW + /* p points to IPv6 header again for raw_input. */ + pbuf_add_header_force(p, hlen_tot); /* raw input did not eat the packet? */ - if (raw_input(p, inp) == 0) -#endif /* LWIP_RAW */ + raw_status = raw_input(p, inp); + if (raw_status != RAW_INPUT_EATEN) { - switch (nexth) { + /* Point to payload. */ + pbuf_remove_header(p, hlen_tot); +#else /* LWIP_RAW */ + { +#endif /* LWIP_RAW */ + switch (*nexth) { case IP6_NEXTH_NONE: pbuf_free(p); break; @@ -742,37 +1069,40 @@ options_done: #if LWIP_UDPLITE case IP6_NEXTH_UDPLITE: #endif /* LWIP_UDPLITE */ - /* Point to payload. */ - pbuf_header(p, -(s16_t)ip_data.current_ip_header_tot_len); udp_input(p, inp); break; #endif /* LWIP_UDP */ #if LWIP_TCP case IP6_NEXTH_TCP: - /* Point to payload. */ - pbuf_header(p, -(s16_t)ip_data.current_ip_header_tot_len); tcp_input(p, inp); break; #endif /* LWIP_TCP */ #if LWIP_ICMP6 case IP6_NEXTH_ICMP6: - /* Point to payload. */ - pbuf_header(p, -(s16_t)ip_data.current_ip_header_tot_len); icmp6_input(p, inp); break; #endif /* LWIP_ICMP */ default: +#if LWIP_RAW + if (raw_status == RAW_INPUT_DELIVERED) { + /* @todo: ipv6 mib in-delivers? */ + } else +#endif /* LWIP_RAW */ + { #if LWIP_ICMP6 - /* send ICMP parameter problem unless it was a multicast or ICMPv6 */ - if ((!ip6_addr_ismulticast(ip6_current_dest_addr())) && - (IP6H_NEXTH(ip6hdr) != IP6_NEXTH_ICMP6)) { - icmp6_param_problem(p, ICMP6_PP_HEADER, ip_data.current_ip_header_tot_len - hlen); - } + /* p points to IPv6 header again for raw_input. */ + pbuf_add_header_force(p, hlen_tot); + /* send ICMP parameter problem unless it was a multicast or ICMPv6 */ + if ((!ip6_addr_ismulticast(ip6_current_dest_addr())) && + (IP6H_NEXTH(ip6hdr) != IP6_NEXTH_ICMP6)) { + icmp6_param_problem(p, ICMP6_PP_HEADER, nexth); + } #endif /* LWIP_ICMP */ - LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip6_input: Unsupported transport protocol %"U16_F"\n", (u16_t)IP6H_NEXTH(ip6hdr))); + LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip6_input: Unsupported transport protocol %"U16_F"\n", (u16_t)IP6H_NEXTH(ip6hdr))); + IP6_STATS_INC(ip6.proterr); + IP6_STATS_INC(ip6.drop); + } pbuf_free(p); - IP6_STATS_INC(ip6.proterr); - IP6_STATS_INC(ip6.drop); break; } } @@ -803,15 +1133,17 @@ ip6_input_cleanup: IPv6 header and p->payload points to that IPv6 header) * @param src the source IPv6 address to send from (if src == IP6_ADDR_ANY, an * IP address of the netif is selected and used as source address. - * if src == NULL, IP6_ADDR_ANY is used as source) - * @param dest the destination IPv6 address to send the packet to + * if src == NULL, IP6_ADDR_ANY is used as source) (src is possibly not + * properly zoned) + * @param dest the destination IPv6 address to send the packet to (possibly not + * properly zoned) * @param hl the Hop Limit value to be set in the IPv6 header * @param tc the Traffic Class value to be set in the IPv6 header * @param nexth the Next Header to be set in the IPv6 header * @param netif the netif on which to send this packet * @return ERR_OK if the packet was sent OK * ERR_BUF if p doesn't have enough space for IPv6/LINK headers - * returns errors returned by netif->output + * returns errors returned by netif->output_ip6 */ err_t ip6_output_if(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, @@ -845,12 +1177,27 @@ ip6_output_if_src(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, struct ip6_hdr *ip6hdr; ip6_addr_t dest_addr; + LWIP_ASSERT_CORE_LOCKED(); LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p); /* Should the IPv6 header be generated or is it already included in p? */ if (dest != LWIP_IP_HDRINCL) { +#if LWIP_IPV6_SCOPES + /* If the destination address is scoped but lacks a zone, add a zone now, + * based on the outgoing interface. The lower layers (e.g., nd6) absolutely + * require addresses to be properly zoned for correctness. In some cases, + * earlier attempts will have been made to add a zone to the destination, + * but this function is the only one that is called in all (other) cases, + * so we must do this here. */ + if (ip6_addr_lacks_zone(dest, IP6_UNKNOWN)) { + ip6_addr_copy(dest_addr, *dest); + ip6_addr_assign_zone(&dest_addr, IP6_UNKNOWN, netif); + dest = &dest_addr; + } +#endif /* LWIP_IPV6_SCOPES */ + /* generate IPv6 header */ - if (pbuf_header(p, IP6_HLEN)) { + if (pbuf_add_header(p, IP6_HLEN)) { LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip6_output: not enough room for IPv6 header in pbuf\n")); IP6_STATS_INC(ip6.err); return ERR_BUF; @@ -864,21 +1211,22 @@ ip6_output_if_src(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, IP6H_NEXTH_SET(ip6hdr, nexth); /* dest cannot be NULL here */ - ip6_addr_copy(ip6hdr->dest, *dest); + ip6_addr_copy_to_packed(ip6hdr->dest, *dest); IP6H_VTCFL_SET(ip6hdr, 6, tc, 0); - IP6H_PLEN_SET(ip6hdr, p->tot_len - IP6_HLEN); + IP6H_PLEN_SET(ip6hdr, (u16_t)(p->tot_len - IP6_HLEN)); if (src == NULL) { src = IP6_ADDR_ANY6; } /* src cannot be NULL here */ - ip6_addr_copy(ip6hdr->src, *src); + ip6_addr_copy_to_packed(ip6hdr->src, *src); } else { /* IP header already included in p */ ip6hdr = (struct ip6_hdr *)p->payload; - ip6_addr_copy(dest_addr, ip6hdr->dest); + ip6_addr_copy_from_packed(dest_addr, ip6hdr->dest); + ip6_addr_assign_zone(&dest_addr, IP6_UNKNOWN, netif); dest = &dest_addr; } @@ -904,10 +1252,15 @@ ip6_output_if_src(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, } } } +#if LWIP_MULTICAST_TX_OPTIONS + if ((p->flags & PBUF_FLAG_MCASTLOOP) != 0) { + netif_loop_output(netif, p); + } +#endif /* LWIP_MULTICAST_TX_OPTIONS */ #endif /* ENABLE_LOOPBACK */ #if LWIP_IPV6_FRAG /* don't fragment if interface has mtu set to 0 [loopif] */ - if (netif->mtu && (p->tot_len > nd6_get_destination_mtu(dest, netif))) { + if (netif_mtu6(netif) && (p->tot_len > nd6_get_destination_mtu(dest, netif))) { return ip6_frag(p, netif, dest); } #endif /* LWIP_IPV6_FRAG */ @@ -949,8 +1302,8 @@ ip6_output(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, } else { /* IP header included in p, read addresses. */ ip6hdr = (struct ip6_hdr *)p->payload; - ip6_addr_copy(src_addr, ip6hdr->src); - ip6_addr_copy(dest_addr, ip6hdr->dest); + ip6_addr_copy_from_packed(src_addr, ip6hdr->src); + ip6_addr_copy_from_packed(dest_addr, ip6hdr->dest); netif = ip6_route(&src_addr, &dest_addr); } @@ -972,7 +1325,7 @@ ip6_output(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, } -#if LWIP_NETIF_HWADDRHINT +#if LWIP_NETIF_USE_HINTS /** Like ip6_output, but takes and addr_hint pointer that is passed on to netif->addr_hint * before calling ip6_output_if. * @@ -986,7 +1339,7 @@ ip6_output(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, * @param hl the Hop Limit value to be set in the IPv6 header * @param tc the Traffic Class value to be set in the IPv6 header * @param nexth the Next Header to be set in the IPv6 header - * @param addr_hint address hint pointer set to netif->addr_hint before + * @param netif_hint netif output hint pointer set to netif->hint before * calling ip_output_if() * * @return ERR_RTE if no route is found @@ -994,7 +1347,7 @@ ip6_output(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, */ err_t ip6_output_hinted(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, - u8_t hl, u8_t tc, u8_t nexth, u8_t *addr_hint) + u8_t hl, u8_t tc, u8_t nexth, struct netif_hint *netif_hint) { struct netif *netif; struct ip6_hdr *ip6hdr; @@ -1008,8 +1361,8 @@ ip6_output_hinted(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, } else { /* IP header included in p, read addresses. */ ip6hdr = (struct ip6_hdr *)p->payload; - ip6_addr_copy(src_addr, ip6hdr->src); - ip6_addr_copy(dest_addr, ip6hdr->dest); + ip6_addr_copy_from_packed(src_addr, ip6hdr->src); + ip6_addr_copy_from_packed(dest_addr, ip6hdr->dest); netif = ip6_route(&src_addr, &dest_addr); } @@ -1027,13 +1380,13 @@ ip6_output_hinted(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, return ERR_RTE; } - NETIF_SET_HWADDRHINT(netif, addr_hint); + NETIF_SET_HINTS(netif, netif_hint); err = ip6_output_if(p, src, dest, hl, tc, nexth, netif); - NETIF_SET_HWADDRHINT(netif, NULL); + NETIF_RESET_HINTS(netif); return err; } -#endif /* LWIP_NETIF_HWADDRHINT*/ +#endif /* LWIP_NETIF_USE_HINTS*/ #if LWIP_IPV6_MLD /** @@ -1049,25 +1402,42 @@ ip6_output_hinted(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, err_t ip6_options_add_hbh_ra(struct pbuf *p, u8_t nexth, u8_t value) { + u8_t *opt_data; + u32_t offset = 0; struct ip6_hbh_hdr *hbh_hdr; + struct ip6_opt_hdr *opt_hdr; + /* fixed 4 bytes for router alert option and 2 bytes padding */ + const u8_t hlen = (sizeof(struct ip6_opt_hdr) * 2) + IP6_ROUTER_ALERT_DLEN; /* Move pointer to make room for hop-by-hop options header. */ - if (pbuf_header(p, sizeof(struct ip6_hbh_hdr))) { + if (pbuf_add_header(p, sizeof(struct ip6_hbh_hdr) + hlen)) { LWIP_DEBUGF(IP6_DEBUG, ("ip6_options: no space for options header\n")); IP6_STATS_INC(ip6.err); return ERR_BUF; } + /* Set fields of Hop-by-Hop header */ hbh_hdr = (struct ip6_hbh_hdr *)p->payload; - - /* Set fields. */ - hbh_hdr->_nexth = nexth; + IP6_HBH_NEXTH(hbh_hdr) = nexth; hbh_hdr->_hlen = 0; - hbh_hdr->_ra_opt_type = IP6_ROUTER_ALERT_OPTION; - hbh_hdr->_ra_opt_dlen = 2; - hbh_hdr->_ra_opt_data = value; - hbh_hdr->_padn_opt_type = IP6_PADN_ALERT_OPTION; - hbh_hdr->_padn_opt_dlen = 0; + offset = IP6_HBH_HLEN; + + /* Set router alert options to Hop-by-Hop extended option header */ + opt_hdr = (struct ip6_opt_hdr *)((u8_t *)hbh_hdr + offset); + IP6_OPT_TYPE(opt_hdr) = IP6_ROUTER_ALERT_OPTION; + IP6_OPT_DLEN(opt_hdr) = IP6_ROUTER_ALERT_DLEN; + offset += IP6_OPT_HLEN; + + /* Set router alert option data */ + opt_data = (u8_t *)hbh_hdr + offset; + opt_data[0] = value; + opt_data[1] = 0; + offset += IP6_OPT_DLEN(opt_hdr); + + /* add 2 bytes padding to make 8 bytes Hop-by-Hop header length */ + opt_hdr = (struct ip6_opt_hdr *)((u8_t *)hbh_hdr + offset); + IP6_OPT_TYPE(opt_hdr) = IP6_PADN_OPTION; + IP6_OPT_DLEN(opt_hdr) = 0; return ERR_OK; } diff --git a/Libraries/LwIP/src/core/ipv6/ip6_addr.c b/Libraries/LwIP/src/core/ipv6/ip6_addr.c index 2c685b2..aafba72 100755 --- a/Libraries/LwIP/src/core/ipv6/ip6_addr.c +++ b/Libraries/LwIP/src/core/ipv6/ip6_addr.c @@ -47,18 +47,16 @@ #include "lwip/ip_addr.h" #include "lwip/def.h" +#include + +#if LWIP_IPV4 +#include "lwip/ip4_addr.h" /* for ip6addr_aton to handle IPv4-mapped addresses */ +#endif /* LWIP_IPV4 */ + /* used by IP6_ADDR_ANY(6) in ip6_addr.h */ const ip_addr_t ip6_addr_any = IPADDR6_INIT(0ul, 0ul, 0ul, 0ul); -#ifndef isprint -#define in_range(c, lo, up) ((u8_t)c >= lo && (u8_t)c <= up) -#define isprint(c) in_range(c, 0x20, 0x7f) -#define isdigit(c) in_range(c, '0', '9') -#define isxdigit(c) (isdigit(c) || in_range(c, 'a', 'f') || in_range(c, 'A', 'F')) -#define islower(c) in_range(c, 'a', 'z') -#define isspace(c) (c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v') -#define xchar(i) ((i) < 10 ? '0' + (i) : 'A' + (i) - 10) -#endif +#define lwip_xchar(i) ((char)((i) < 10 ? '0' + (i) : 'A' + (i) - 10)) /** * Check whether "cp" is a valid ascii representation @@ -74,6 +72,9 @@ ip6addr_aton(const char *cp, ip6_addr_t *addr) { u32_t addr_index, zero_blocks, current_block_index, current_block_value; const char *s; +#if LWIP_IPV4 + int check_ipv4_mapped = 0; +#endif /* LWIP_IPV4 */ /* Count the number of colons, to count the number of blocks in a "::" sequence zero_blocks may be 1 even if there are no :: sequences */ @@ -81,7 +82,19 @@ ip6addr_aton(const char *cp, ip6_addr_t *addr) for (s = cp; *s != 0; s++) { if (*s == ':') { zero_blocks--; - } else if (!isxdigit(*s)) { +#if LWIP_IPV4 + } else if (*s == '.') { + if ((zero_blocks == 5) ||(zero_blocks == 2)) { + check_ipv4_mapped = 1; + /* last block could be the start of an IPv4 address */ + zero_blocks--; + } else { + /* invalid format */ + return 0; + } + break; +#endif /* LWIP_IPV4 */ + } else if (!lwip_isxdigit(*s)) { break; } } @@ -101,6 +114,22 @@ ip6addr_aton(const char *cp, ip6_addr_t *addr) } } current_block_index++; +#if LWIP_IPV4 + if (check_ipv4_mapped) { + if (current_block_index == 6) { + ip4_addr_t ip4; + int ret = ip4addr_aton(s + 1, &ip4); + if (ret) { + if (addr) { + addr->addr[3] = lwip_htonl(ip4.addr); + current_block_index++; + goto fix_byte_order_and_return; + } + return 1; + } + } + } +#endif /* LWIP_IPV4 */ current_block_value = 0; if (current_block_index > 7) { /* address too long! */ @@ -129,11 +158,11 @@ ip6addr_aton(const char *cp, ip6_addr_t *addr) } } } - } else if (isxdigit(*s)) { + } else if (lwip_isxdigit(*s)) { /* add current digit */ current_block_value = (current_block_value << 4) + - (isdigit(*s) ? (u32_t)(*s - '0') : - (u32_t)(10 + (islower(*s) ? *s - 'a' : *s - 'A'))); + (lwip_isdigit(*s) ? (u32_t)(*s - '0') : + (u32_t)(10 + (lwip_islower(*s) ? *s - 'a' : *s - 'A'))); } else { /* unexpected digit, space? CRLF? */ break; @@ -147,13 +176,15 @@ ip6addr_aton(const char *cp, ip6_addr_t *addr) else { addr->addr[addr_index] = current_block_value << 16; } - } - - /* convert to network byte order. */ - if (addr) { +#if LWIP_IPV4 +fix_byte_order_and_return: +#endif + /* convert to network byte order. */ for (addr_index = 0; addr_index < 4; addr_index++) { addr->addr[addr_index] = lwip_htonl(addr->addr[addr_index]); } + + ip6_addr_clear_zone(addr); } if (current_block_index != 7) { @@ -194,6 +225,26 @@ ip6addr_ntoa_r(const ip6_addr_t *addr, char *buf, int buflen) s32_t i; u8_t zero_flag, empty_block_flag; +#if LWIP_IPV4 + if (ip6_addr_isipv4mappedipv6(addr)) { + /* This is an IPv4 mapped address */ + ip4_addr_t addr4; + char *ret; +#define IP4MAPPED_HEADER "::FFFF:" + char *buf_ip4 = buf + sizeof(IP4MAPPED_HEADER) - 1; + int buflen_ip4 = buflen - sizeof(IP4MAPPED_HEADER) + 1; + if (buflen < (int)sizeof(IP4MAPPED_HEADER)) { + return NULL; + } + memcpy(buf, IP4MAPPED_HEADER, sizeof(IP4MAPPED_HEADER)); + addr4.addr = addr->addr[3]; + ret = ip4addr_ntoa_r(&addr4, buf_ip4, buflen_ip4); + if (ret != buf_ip4) { + return NULL; + } + return buf; + } +#endif /* LWIP_IPV4 */ i = 0; empty_block_flag = 0; /* used to indicate a zero chain for "::' */ @@ -250,7 +301,7 @@ ip6addr_ntoa_r(const ip6_addr_t *addr, char *buf, int buflen) if ((current_block_value & 0xf000) == 0) { zero_flag = 1; } else { - buf[i++] = xchar(((current_block_value & 0xf000) >> 12)); + buf[i++] = lwip_xchar(((current_block_value & 0xf000) >> 12)); zero_flag = 0; if (i >= buflen) { return NULL; @@ -260,7 +311,7 @@ ip6addr_ntoa_r(const ip6_addr_t *addr, char *buf, int buflen) if (((current_block_value & 0xf00) == 0) && (zero_flag)) { /* do nothing */ } else { - buf[i++] = xchar(((current_block_value & 0xf00) >> 8)); + buf[i++] = lwip_xchar(((current_block_value & 0xf00) >> 8)); zero_flag = 0; if (i >= buflen) { return NULL; @@ -271,14 +322,14 @@ ip6addr_ntoa_r(const ip6_addr_t *addr, char *buf, int buflen) /* do nothing */ } else { - buf[i++] = xchar(((current_block_value & 0xf0) >> 4)); + buf[i++] = lwip_xchar(((current_block_value & 0xf0) >> 4)); zero_flag = 0; if (i >= buflen) { return NULL; } } - buf[i++] = xchar((current_block_value & 0xf)); + buf[i++] = lwip_xchar((current_block_value & 0xf)); if (i >= buflen) { return NULL; } diff --git a/Libraries/LwIP/src/core/ipv6/ip6_frag.c b/Libraries/LwIP/src/core/ipv6/ip6_frag.c index e20f7cf..0f277b6 100755 --- a/Libraries/LwIP/src/core/ipv6/ip6_frag.c +++ b/Libraries/LwIP/src/core/ipv6/ip6_frag.c @@ -71,6 +71,8 @@ #endif /* IP_REASS_FREE_OLDEST */ #if IPV6_FRAG_COPYHEADER +/* The number of bytes we need to "borrow" from (i.e., overwrite in) the header + * that precedes the fragment header for reassembly pruposes. */ #define IPV6_FRAG_REQROOM ((s16_t)(sizeof(struct ip6_reass_helper) - IP6_FRAG_HLEN)) #endif @@ -158,17 +160,28 @@ ip6_reass_free_complete_datagram(struct ip6_reassdata *ipr) /* First, de-queue the first pbuf from r->p. */ p = ipr->p; ipr->p = iprh->next_pbuf; + /* Restore the part that we've overwritten with our helper structure, or we + * might send garbage (and disclose a pointer) in the ICMPv6 reply. */ + MEMCPY(p->payload, ipr->orig_hdr, sizeof(iprh)); /* Then, move back to the original ipv6 header (we are now pointing to Fragment header). This cannot fail since we already checked when receiving this fragment. */ - if (pbuf_header_force(p, (s16_t)((u8_t*)p->payload - (u8_t*)IPV6_FRAG_HDRREF(ipr->iphdr)))) { + if (pbuf_header_force(p, (s16_t)((u8_t*)p->payload - (u8_t*)ipr->iphdr))) { LWIP_ASSERT("ip6_reass_free: moving p->payload to ip6 header failed\n", 0); } else { - icmp6_time_exceeded(p, ICMP6_TE_FRAG); + /* Reconstruct the zoned source and destination addresses, so that we do + * not end up sending the ICMP response over the wrong link. */ + ip6_addr_t src_addr, dest_addr; + ip6_addr_copy_from_packed(src_addr, IPV6_FRAG_SRC(ipr)); + ip6_addr_set_zone(&src_addr, ipr->src_zone); + ip6_addr_copy_from_packed(dest_addr, IPV6_FRAG_DEST(ipr)); + ip6_addr_set_zone(&dest_addr, ipr->dest_zone); + /* Send the actual ICMP response. */ + icmp6_time_exceeded_with_addrs(p, ICMP6_TE_FRAG, &src_addr, &dest_addr); } clen = pbuf_clen(p); LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff); - pbufs_freed += clen; + pbufs_freed = (u16_t)(pbufs_freed + clen); pbuf_free(p); } #endif /* LWIP_ICMP6 */ @@ -184,7 +197,7 @@ ip6_reass_free_complete_datagram(struct ip6_reassdata *ipr) p = iprh->next_pbuf; clen = pbuf_clen(pcur); LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff); - pbufs_freed += clen; + pbufs_freed = (u16_t)(pbufs_freed + clen); pbuf_free(pcur); } @@ -207,7 +220,7 @@ ip6_reass_free_complete_datagram(struct ip6_reassdata *ipr) /* Finally, update number of pbufs in reassembly queue */ LWIP_ASSERT("ip_reass_pbufcount >= clen", ip6_reass_pbufcount >= pbufs_freed); - ip6_reass_pbufcount -= pbufs_freed; + ip6_reass_pbufcount = (u16_t)(ip6_reass_pbufcount - pbufs_freed); } #if IP_REASS_FREE_OLDEST @@ -261,19 +274,17 @@ ip6_reass(struct pbuf *p) struct ip6_reassdata *ipr, *ipr_prev; struct ip6_reass_helper *iprh, *iprh_tmp, *iprh_prev=NULL; struct ip6_frag_hdr *frag_hdr; - u16_t offset, len; + u16_t offset, len, start, end; + ptrdiff_t hdrdiff; u16_t clen; u8_t valid = 1; - struct pbuf *q; + struct pbuf *q, *next_pbuf; IP6_FRAG_STATS_INC(ip6_frag.recv); - if ((const void*)ip6_current_header() != ((u8_t*)p->payload) - IP6_HLEN) { - /* ip6_frag_hdr must be in the first pbuf, not chained */ - IP6_FRAG_STATS_INC(ip6_frag.proterr); - IP6_FRAG_STATS_INC(ip6_frag.drop); - goto nullreturn; - } + /* ip6_frag_hdr must be in the first pbuf, not chained. Checked by caller. */ + LWIP_ASSERT("IPv6 fragment header does not fit in first pbuf", + p->len >= sizeof(struct ip6_frag_hdr)); frag_hdr = (struct ip6_frag_hdr *) p->payload; @@ -285,8 +296,22 @@ ip6_reass(struct pbuf *p) * Adjust for headers before Fragment Header. * And finally adjust by Fragment Header length. */ len = lwip_ntohs(ip6_current_header()->_plen); - len -= (u16_t)(((u8_t*)p->payload - (const u8_t*)ip6_current_header()) - IP6_HLEN); - len -= IP6_FRAG_HLEN; + hdrdiff = (u8_t*)p->payload - (const u8_t*)ip6_current_header(); + LWIP_ASSERT("not a valid pbuf (ip6_input check missing?)", hdrdiff <= 0xFFFF); + LWIP_ASSERT("not a valid pbuf (ip6_input check missing?)", hdrdiff >= IP6_HLEN); + hdrdiff -= IP6_HLEN; + hdrdiff += IP6_FRAG_HLEN; + if (hdrdiff > len) { + IP6_FRAG_STATS_INC(ip6_frag.proterr); + goto nullreturn; + } + len = (u16_t)(len - hdrdiff); + start = (offset & IP6_FRAG_OFFSET_MASK); + if (start > (0xFFFF - len)) { + /* u16_t overflow, cannot handle this */ + IP6_FRAG_STATS_INC(ip6_frag.proterr); + goto nullreturn; + } /* Look for the datagram the fragment belongs to in the current datagram queue, * remembering the previous in the queue for later dequeueing. */ @@ -295,8 +320,8 @@ ip6_reass(struct pbuf *p) in the reassembly buffer. If so, we proceed with copying the fragment into the buffer. */ if ((frag_hdr->_identification == ipr->identification) && - ip6_addr_cmp(ip6_current_src_addr(), &(IPV6_FRAG_HDRREF(ipr->iphdr)->src)) && - ip6_addr_cmp(ip6_current_dest_addr(), &(IPV6_FRAG_HDRREF(ipr->iphdr)->dest))) { + ip6_addr_cmp_packed(ip6_current_src_addr(), &(IPV6_FRAG_SRC(ipr)), ipr->src_zone) && + ip6_addr_cmp_packed(ip6_current_dest_addr(), &(IPV6_FRAG_DEST(ipr)), ipr->dest_zone)) { IP6_FRAG_STATS_INC(ip6_frag.cachehit); break; } @@ -322,13 +347,12 @@ ip6_reass(struct pbuf *p) #endif /* IP_REASS_FREE_OLDEST */ { IP6_FRAG_STATS_INC(ip6_frag.memerr); - IP6_FRAG_STATS_INC(ip6_frag.drop); goto nullreturn; } } memset(ipr, 0, sizeof(struct ip6_reassdata)); - ipr->timer = IP_REASS_MAXAGE; + ipr->timer = IPV6_REASS_MAXAGE; /* enqueue the new structure to the front of the list */ ipr->next = reassdatagrams; @@ -337,13 +361,22 @@ ip6_reass(struct pbuf *p) /* Use the current IPv6 header for src/dest address reference. * Eventually, we will replace it when we get the first fragment * (it might be this one, in any case, it is done later). */ -#if IPV6_FRAG_COPYHEADER - MEMCPY(&ipr->iphdr, ip6_current_header(), IP6_HLEN); -#else /* IPV6_FRAG_COPYHEADER */ /* need to use the none-const pointer here: */ ipr->iphdr = ip_data.current_ip6_header; +#if IPV6_FRAG_COPYHEADER + MEMCPY(&ipr->src, &ip6_current_header()->src, sizeof(ipr->src)); + MEMCPY(&ipr->dest, &ip6_current_header()->dest, sizeof(ipr->dest)); #endif /* IPV6_FRAG_COPYHEADER */ - +#if LWIP_IPV6_SCOPES + /* Also store the address zone information. + * @todo It is possible that due to netif destruction and recreation, the + * stored zones end up resolving to a different interface. In that case, we + * risk sending a "time exceeded" ICMP response over the wrong link. + * Ideally, netif destruction would clean up matching pending reassembly + * structures, but custom zone mappings would make that non-trivial. */ + ipr->src_zone = ip6_addr_zone(ip6_current_src_addr()); + ipr->dest_zone = ip6_addr_zone(ip6_current_dest_addr()); +#endif /* LWIP_IPV6_SCOPES */ /* copy the fragmented packet id. */ ipr->identification = frag_hdr->_identification; @@ -368,7 +401,6 @@ ip6_reass(struct pbuf *p) /* @todo: send ICMPv6 time exceeded here? */ /* drop this pbuf */ IP6_FRAG_STATS_INC(ip6_frag.memerr); - IP6_FRAG_STATS_INC(ip6_frag.drop); goto nullreturn; } } @@ -386,35 +418,37 @@ ip6_reass(struct pbuf *p) LWIP_ASSERT("sizeof(struct ip6_reass_helper) <= IP6_FRAG_HLEN, set IPV6_FRAG_COPYHEADER to 1", sizeof(struct ip6_reass_helper) <= IP6_FRAG_HLEN); #endif /* IPV6_FRAG_COPYHEADER */ + + /* Prepare the pointer to the helper structure, and its initial values. + * Do not yet write to the structure itself, as we still have to make a + * backup of the original data, and we should not do that until we know for + * sure that we are going to add this packet to the list. */ iprh = (struct ip6_reass_helper *)p->payload; - iprh->next_pbuf = NULL; - iprh->start = (offset & IP6_FRAG_OFFSET_MASK); - iprh->end = (offset & IP6_FRAG_OFFSET_MASK) + len; + next_pbuf = NULL; + end = (u16_t)(start + len); /* find the right place to insert this pbuf */ /* Iterate through until we either get to the end of the list (append), * or we find on with a larger offset (insert). */ for (q = ipr->p; q != NULL;) { iprh_tmp = (struct ip6_reass_helper*)q->payload; - if (iprh->start < iprh_tmp->start) { + if (start < iprh_tmp->start) { #if IP_REASS_CHECK_OVERLAP - if (iprh->end > iprh_tmp->start) { + if (end > iprh_tmp->start) { /* fragment overlaps with following, throw away */ IP6_FRAG_STATS_INC(ip6_frag.proterr); - IP6_FRAG_STATS_INC(ip6_frag.drop); goto nullreturn; } if (iprh_prev != NULL) { - if (iprh->start < iprh_prev->end) { + if (start < iprh_prev->end) { /* fragment overlaps with previous, throw away */ IP6_FRAG_STATS_INC(ip6_frag.proterr); - IP6_FRAG_STATS_INC(ip6_frag.drop); goto nullreturn; } } #endif /* IP_REASS_CHECK_OVERLAP */ /* the new pbuf should be inserted before this */ - iprh->next_pbuf = q; + next_pbuf = q; if (iprh_prev != NULL) { /* not the fragment with the lowest offset */ iprh_prev->next_pbuf = p; @@ -423,15 +457,13 @@ ip6_reass(struct pbuf *p) ipr->p = p; } break; - } else if (iprh->start == iprh_tmp->start) { + } else if (start == iprh_tmp->start) { /* received the same datagram twice: no need to keep the datagram */ - IP6_FRAG_STATS_INC(ip6_frag.drop); goto nullreturn; #if IP_REASS_CHECK_OVERLAP - } else if (iprh->start < iprh_tmp->end) { + } else if (start < iprh_tmp->end) { /* overlap: no need to keep the new datagram */ IP6_FRAG_STATS_INC(ip6_frag.proterr); - IP6_FRAG_STATS_INC(ip6_frag.drop); goto nullreturn; #endif /* IP_REASS_CHECK_OVERLAP */ } else { @@ -454,10 +486,10 @@ ip6_reass(struct pbuf *p) /* this is (for now), the fragment with the highest offset: * chain it to the last fragment */ #if IP_REASS_CHECK_OVERLAP - LWIP_ASSERT("check fragments don't overlap", iprh_prev->end <= iprh->start); + LWIP_ASSERT("check fragments don't overlap", iprh_prev->end <= start); #endif /* IP_REASS_CHECK_OVERLAP */ iprh_prev->next_pbuf = p; - if (iprh_prev->end != iprh->start) { + if (iprh_prev->end != start) { valid = 0; } } else { @@ -472,19 +504,23 @@ ip6_reass(struct pbuf *p) /* Track the current number of pbufs current 'in-flight', in order to limit the number of fragments that may be enqueued at any one time */ - ip6_reass_pbufcount += clen; + ip6_reass_pbufcount = (u16_t)(ip6_reass_pbufcount + clen); /* Remember IPv6 header if this is the first fragment. */ - if (iprh->start == 0) { -#if IPV6_FRAG_COPYHEADER - if (iprh->next_pbuf != NULL) { - MEMCPY(&ipr->iphdr, ip6_current_header(), IP6_HLEN); - } -#else /* IPV6_FRAG_COPYHEADER */ + if (start == 0) { /* need to use the none-const pointer here: */ ipr->iphdr = ip_data.current_ip6_header; -#endif /* IPV6_FRAG_COPYHEADER */ + /* Make a backup of the part of the packet data that we are about to + * overwrite, so that we can restore the original later. */ + MEMCPY(ipr->orig_hdr, p->payload, sizeof(*iprh)); + /* For IPV6_FRAG_COPYHEADER there is no need to copy src/dst again, as they + * will be the same as they were. With LWIP_IPV6_SCOPES, the same applies + * to the source/destination zones. */ } + /* Only after the backup do we get to fill in the actual helper structure. */ + iprh->next_pbuf = next_pbuf; + iprh->start = start; + iprh->end = end; /* If this is the last fragment, calculate total packet length. */ if ((offset & IP6_FRAG_MORE_FLAG) == 0) { @@ -520,17 +556,17 @@ ip6_reass(struct pbuf *p) /* chain together the pbufs contained within the ip6_reassdata list. */ iprh = (struct ip6_reass_helper*) ipr->p->payload; while (iprh != NULL) { - struct pbuf* next_pbuf = iprh->next_pbuf; + next_pbuf = iprh->next_pbuf; if (next_pbuf != NULL) { /* Save next helper struct (will be hidden in next step). */ iprh_tmp = (struct ip6_reass_helper*)next_pbuf->payload; /* hide the fragment header for every succeeding fragment */ - pbuf_header(next_pbuf, -IP6_FRAG_HLEN); + pbuf_remove_header(next_pbuf, IP6_FRAG_HLEN); #if IPV6_FRAG_COPYHEADER if (IPV6_FRAG_REQROOM > 0) { /* hide the extra bytes borrowed from ip6_hdr for struct ip6_reass_helper */ - u8_t hdrerr = pbuf_header(next_pbuf, -(s16_t)(IPV6_FRAG_REQROOM)); + u8_t hdrerr = pbuf_remove_header(next_pbuf, IPV6_FRAG_REQROOM); LWIP_UNUSED_ARG(hdrerr); /* in case of LWIP_NOASSERT */ LWIP_ASSERT("no room for struct ip6_reass_helper", hdrerr == 0); } @@ -544,39 +580,61 @@ ip6_reass(struct pbuf *p) iprh = iprh_tmp; } + /* Get the first pbuf. */ + p = ipr->p; + #if IPV6_FRAG_COPYHEADER if (IPV6_FRAG_REQROOM > 0) { + u8_t hdrerr; + /* Restore (only) the bytes that we overwrote beyond the fragment header. + * Those bytes may belong to either the IPv6 header or an extension + * header placed before the fragment header. */ + MEMCPY(p->payload, ipr->orig_hdr, IPV6_FRAG_REQROOM); /* get back room for struct ip6_reass_helper (only required if sizeof(void*) > 4) */ - u8_t hdrerr = pbuf_header(ipr->p, -(s16_t)(IPV6_FRAG_REQROOM)); + hdrerr = pbuf_remove_header(p, IPV6_FRAG_REQROOM); LWIP_UNUSED_ARG(hdrerr); /* in case of LWIP_NOASSERT */ LWIP_ASSERT("no room for struct ip6_reass_helper", hdrerr == 0); } - iphdr_ptr = (struct ip6_hdr*)((u8_t*)ipr->p->payload - IP6_HLEN); - MEMCPY(iphdr_ptr, &ipr->iphdr, IP6_HLEN); -#else - iphdr_ptr = ipr->iphdr; #endif + /* We need to get rid of the fragment header itself, which is somewhere in + * the middle of the packet (but still in the first pbuf of the chain). + * Getting rid of the header is required by RFC 2460 Sec. 4.5 and necessary + * in order to be able to reassemble packets that are close to full size + * (i.e., around 65535 bytes). We simply move up all the headers before the + * fragment header, including the IPv6 header, and adjust the payload start + * accordingly. This works because all these headers are in the first pbuf + * of the chain, and because the caller adjusts all its pointers on + * successful reassembly. */ + MEMMOVE((u8_t*)ipr->iphdr + sizeof(struct ip6_frag_hdr), ipr->iphdr, + (size_t)((u8_t*)p->payload - (u8_t*)ipr->iphdr)); + + /* This is where the IPv6 header is now. */ + iphdr_ptr = (struct ip6_hdr*)((u8_t*)ipr->iphdr + + sizeof(struct ip6_frag_hdr)); + /* Adjust datagram length by adding header lengths. */ - ipr->datagram_len += (u16_t)(((u8_t*)ipr->p->payload - (u8_t*)iphdr_ptr) - + IP6_FRAG_HLEN + ipr->datagram_len = (u16_t)(ipr->datagram_len + ((u8_t*)p->payload - (u8_t*)iphdr_ptr) - IP6_HLEN); /* Set payload length in ip header. */ iphdr_ptr->_plen = lwip_htons(ipr->datagram_len); - /* Get the first pbuf. */ - p = ipr->p; + /* With the fragment header gone, we now need to adjust the next-header + * field of whatever header was originally before it. Since the packet made + * it through the original header processing routines at least up to the + * fragment header, we do not need any further sanity checks here. */ + if (IP6H_NEXTH(iphdr_ptr) == IP6_NEXTH_FRAGMENT) { + iphdr_ptr->_nexth = ipr->nexth; + } else { + u8_t *ptr = (u8_t *)iphdr_ptr + IP6_HLEN; + while (*ptr != IP6_NEXTH_FRAGMENT) { + ptr += 8 * (1 + ptr[1]); + } + *ptr = ipr->nexth; + } - /* Restore Fragment Header in first pbuf. Mark as "single fragment" - * packet. Restore nexth. */ - frag_hdr = (struct ip6_frag_hdr *) p->payload; - frag_hdr->_nexth = ipr->nexth; - frag_hdr->reserved = 0; - frag_hdr->_fragment_offset = 0; - frag_hdr->_identification = 0; - - /* release the sources allocate for the fragment queue entry */ + /* release the resources allocated for the fragment queue entry */ if (reassdatagrams == ipr) { /* it was the first in the list */ reassdatagrams = ipr->next; @@ -588,10 +646,11 @@ ip6_reass(struct pbuf *p) memp_free(MEMP_IP6_REASSDATA, ipr); /* adjust the number of pbufs currently queued for reassembly. */ - ip6_reass_pbufcount -= pbuf_clen(p); + clen = pbuf_clen(p); + LWIP_ASSERT("ip6_reass_pbufcount >= clen", ip6_reass_pbufcount >= clen); + ip6_reass_pbufcount = (u16_t)(ip6_reass_pbufcount - clen); - /* Move pbuf back to IPv6 header. - This cannot fail since we already checked when receiving this fragment. */ + /* Move pbuf back to IPv6 header. This should never fail. */ if (pbuf_header_force(p, (s16_t)((u8_t*)p->payload - (u8_t*)iphdr_ptr))) { LWIP_ASSERT("ip6_reass: moving p->payload to ip6 header failed\n", 0); pbuf_free(p); @@ -605,6 +664,7 @@ ip6_reass(struct pbuf *p) return NULL; nullreturn: + IP6_FRAG_STATS_INC(ip6_frag.drop); pbuf_free(p); return NULL; } @@ -669,9 +729,9 @@ ip6_frag(struct pbuf *p, struct netif *netif, const ip6_addr_t *dest) u16_t left_to_copy; #endif static u32_t identification; - u16_t nfb; u16_t left, cop; - u16_t mtu; + const u16_t mtu = nd6_get_destination_mtu(dest, netif); + const u16_t nfb = (u16_t)((mtu - (IP6_HLEN + IP6_FRAG_HLEN)) & IP6_FRAG_OFFSET_MASK); u16_t fragment_offset = 0; u16_t last; u16_t poff = IP6_HLEN; @@ -680,12 +740,9 @@ ip6_frag(struct pbuf *p, struct netif *netif, const ip6_addr_t *dest) original_ip6hdr = (struct ip6_hdr *)p->payload; - mtu = nd6_get_destination_mtu(dest, netif); - /* @todo we assume there are no options in the unfragmentable part (IPv6 header). */ - left = p->tot_len - IP6_HLEN; - - nfb = (mtu - (IP6_HLEN + IP6_FRAG_HLEN)) & IP6_FRAG_OFFSET_MASK; + LWIP_ASSERT("p->tot_len >= IP6_HLEN", p->tot_len >= IP6_HLEN); + left = (u16_t)(p->tot_len - IP6_HLEN); while (left) { last = (left <= nfb); @@ -703,7 +760,7 @@ ip6_frag(struct pbuf *p, struct netif *netif, const ip6_addr_t *dest) (rambuf->len == rambuf->tot_len) && (rambuf->next == NULL)); poff += pbuf_copy_partial(p, (u8_t*)rambuf->payload + IP6_FRAG_HLEN, cop, poff); /* make room for the IP header */ - if (pbuf_header(rambuf, IP6_HLEN)) { + if (pbuf_add_header(rambuf, IP6_HLEN)) { pbuf_free(rambuf); IP6_FRAG_STATS_INC(ip6_frag.memerr); return ERR_MEM; @@ -731,8 +788,8 @@ ip6_frag(struct pbuf *p, struct netif *netif, const ip6_addr_t *dest) /* Can just adjust p directly for needed offset. */ p->payload = (u8_t *)p->payload + poff; - p->len -= poff; - p->tot_len -= poff; + p->len = (u16_t)(p->len - poff); + p->tot_len = (u16_t)(p->tot_len - poff); left_to_copy = cop; while (left_to_copy) { @@ -765,7 +822,7 @@ ip6_frag(struct pbuf *p, struct netif *netif, const ip6_addr_t *dest) * so that it is removed when pbuf_dechain is later called on rambuf. */ pbuf_cat(rambuf, newpbuf); - left_to_copy -= newpbuflen; + left_to_copy = (u16_t)(left_to_copy - newpbuflen); if (left_to_copy) { p = p->next; } @@ -776,11 +833,11 @@ ip6_frag(struct pbuf *p, struct netif *netif, const ip6_addr_t *dest) /* Set headers */ frag_hdr->_nexth = original_ip6hdr->_nexth; frag_hdr->reserved = 0; - frag_hdr->_fragment_offset = lwip_htons((fragment_offset & IP6_FRAG_OFFSET_MASK) | (last ? 0 : IP6_FRAG_MORE_FLAG)); + frag_hdr->_fragment_offset = lwip_htons((u16_t)((fragment_offset & IP6_FRAG_OFFSET_MASK) | (last ? 0 : IP6_FRAG_MORE_FLAG))); frag_hdr->_identification = lwip_htonl(identification); IP6H_NEXTH_SET(ip6hdr, IP6_NEXTH_FRAGMENT); - IP6H_PLEN_SET(ip6hdr, cop + IP6_FRAG_HLEN); + IP6H_PLEN_SET(ip6hdr, (u16_t)(cop + IP6_FRAG_HLEN)); /* No need for separate header pbuf - we allowed room for it in rambuf * when allocated. @@ -796,8 +853,8 @@ ip6_frag(struct pbuf *p, struct netif *netif, const ip6_addr_t *dest) */ pbuf_free(rambuf); - left -= cop; - fragment_offset += cop; + left = (u16_t)(left - cop); + fragment_offset = (u16_t)(fragment_offset + cop); } return ERR_OK; } diff --git a/Libraries/LwIP/src/core/ipv6/mld6.c b/Libraries/LwIP/src/core/ipv6/mld6.c index 90bcd36..db1d09a 100755 --- a/Libraries/LwIP/src/core/ipv6/mld6.c +++ b/Libraries/LwIP/src/core/ipv6/mld6.c @@ -6,7 +6,12 @@ * @ingroup ip6 * Multicast listener discovery for IPv6. Aims to be compliant with RFC 2710. * No support for MLDv2.\n - * To be called from TCPIP thread + * Note: The allnodes (ff01::1, ff02::1) group is assumed be received by your + * netif since it must always be received for correct IPv6 operation (e.g. SLAAC). + * Ensure the netif filters are configured accordingly!\n + * The netif flags also need NETIF_FLAG_MLD6 flag set to enable MLD6 on a + * netif ("netif->flags |= NETIF_FLAG_MLD6;").\n + * To be called from TCPIP thread. */ /* @@ -293,11 +298,17 @@ mld6_input(struct pbuf *p, struct netif *inp) /** * @ingroup mld6 - * Join a group on a network interface. + * Join a group on one or all network interfaces. * - * @param srcaddr ipv6 address of the network interface which should - * join a new group. If IP6_ADDR_ANY, join on all netifs - * @param groupaddr the ipv6 address of the group to join + * If the group is to be joined on all interfaces, the given group address must + * not have a zone set (i.e., it must have its zone index set to IP6_NO_ZONE). + * If the group is to be joined on one particular interface, the given group + * address may or may not have a zone set. + * + * @param srcaddr ipv6 address (zoned) of the network interface which should + * join a new group. If IP6_ADDR_ANY6, join on all netifs + * @param groupaddr the ipv6 address of the group to join (possibly but not + * necessarily zoned) * @return ERR_OK if group was joined on the netif(s), an err_t otherwise */ err_t @@ -306,9 +317,10 @@ mld6_joingroup(const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr) err_t err = ERR_VAL; /* no matching interface */ struct netif *netif; + LWIP_ASSERT_CORE_LOCKED(); + /* loop through netif's */ - netif = netif_list; - while (netif != NULL) { + NETIF_FOREACH(netif) { /* Should we join this interface ? */ if (ip6_addr_isany(srcaddr) || netif_get_ip6_addr_match(netif, srcaddr) >= 0) { @@ -317,9 +329,6 @@ mld6_joingroup(const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr) return err; } } - - /* proceed to next network interface */ - netif = netif->next; } return err; @@ -330,13 +339,28 @@ mld6_joingroup(const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr) * Join a group on a network interface. * * @param netif the network interface which should join a new group. - * @param groupaddr the ipv6 address of the group to join + * @param groupaddr the ipv6 address of the group to join (possibly but not + * necessarily zoned) * @return ERR_OK if group was joined on the netif, an err_t otherwise */ err_t mld6_joingroup_netif(struct netif *netif, const ip6_addr_t *groupaddr) { struct mld_group *group; +#if LWIP_IPV6_SCOPES + ip6_addr_t ip6addr; + + /* If the address has a particular scope but no zone set, use the netif to + * set one now. Within the mld6 module, all addresses are properly zoned. */ + if (ip6_addr_lacks_zone(groupaddr, IP6_MULTICAST)) { + ip6_addr_set(&ip6addr, groupaddr); + ip6_addr_assign_zone(&ip6addr, IP6_MULTICAST, netif); + groupaddr = &ip6addr; + } + IP6_ADDR_ZONECHECK_NETIF(groupaddr, netif); +#endif /* LWIP_IPV6_SCOPES */ + + LWIP_ASSERT_CORE_LOCKED(); /* find group or create a new one if not found */ group = mld6_lookfor_group(netif, groupaddr); @@ -368,9 +392,12 @@ mld6_joingroup_netif(struct netif *netif, const ip6_addr_t *groupaddr) * @ingroup mld6 * Leave a group on a network interface. * - * @param srcaddr ipv6 address of the network interface which should - * leave the group. If IP6_ISANY, leave on all netifs - * @param groupaddr the ipv6 address of the group to leave + * Zoning of address follows the same rules as @ref mld6_joingroup. + * + * @param srcaddr ipv6 address (zoned) of the network interface which should + * leave the group. If IP6_ADDR_ANY6, leave on all netifs + * @param groupaddr the ipv6 address of the group to leave (possibly, but not + * necessarily zoned) * @return ERR_OK if group was left on the netif(s), an err_t otherwise */ err_t @@ -379,9 +406,10 @@ mld6_leavegroup(const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr) err_t err = ERR_VAL; /* no matching interface */ struct netif *netif; + LWIP_ASSERT_CORE_LOCKED(); + /* loop through netif's */ - netif = netif_list; - while (netif != NULL) { + NETIF_FOREACH(netif) { /* Should we leave this interface ? */ if (ip6_addr_isany(srcaddr) || netif_get_ip6_addr_match(netif, srcaddr) >= 0) { @@ -391,8 +419,6 @@ mld6_leavegroup(const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr) err = res; } } - /* proceed to next network interface */ - netif = netif->next; } return err; @@ -403,13 +429,26 @@ mld6_leavegroup(const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr) * Leave a group on a network interface. * * @param netif the network interface which should leave the group. - * @param groupaddr the ipv6 address of the group to leave + * @param groupaddr the ipv6 address of the group to leave (possibly, but not + * necessarily zoned) * @return ERR_OK if group was left on the netif, an err_t otherwise */ err_t mld6_leavegroup_netif(struct netif *netif, const ip6_addr_t *groupaddr) { struct mld_group *group; +#if LWIP_IPV6_SCOPES + ip6_addr_t ip6addr; + + if (ip6_addr_lacks_zone(groupaddr, IP6_MULTICAST)) { + ip6_addr_set(&ip6addr, groupaddr); + ip6_addr_assign_zone(&ip6addr, IP6_MULTICAST, netif); + groupaddr = &ip6addr; + } + IP6_ADDR_ZONECHECK_NETIF(groupaddr, netif); +#endif /* LWIP_IPV6_SCOPES */ + + LWIP_ASSERT_CORE_LOCKED(); /* find group */ group = mld6_lookfor_group(netif, groupaddr); @@ -456,9 +495,9 @@ mld6_leavegroup_netif(struct netif *netif, const ip6_addr_t *groupaddr) void mld6_tmr(void) { - struct netif *netif = netif_list; + struct netif *netif; - while (netif != NULL) { + NETIF_FOREACH(netif) { struct mld_group *group = netif_mld6_data(netif); while (group != NULL) { @@ -475,7 +514,6 @@ mld6_tmr(void) } group = group->next; } - netif = netif->next; } } @@ -484,20 +522,20 @@ mld6_tmr(void) * * @param group the mld_group for which "delaying" membership report * should be sent - * @param maxresp the max resp delay provided in the query + * @param maxresp_in the max resp delay provided in the query */ static void -mld6_delayed_report(struct mld_group *group, u16_t maxresp) +mld6_delayed_report(struct mld_group *group, u16_t maxresp_in) { /* Convert maxresp from milliseconds to tmr ticks */ - maxresp = maxresp / MLD6_TMR_INTERVAL; + u16_t maxresp = maxresp_in / MLD6_TMR_INTERVAL; if (maxresp == 0) { maxresp = 1; } #ifdef LWIP_RAND /* Randomize maxresp. (if LWIP_RAND is supported) */ - maxresp = LWIP_RAND() % maxresp; + maxresp = (u16_t)(LWIP_RAND() % maxresp); if (maxresp == 0) { maxresp = 1; } @@ -529,14 +567,14 @@ mld6_send(struct netif *netif, struct mld_group *group, u8_t type) const ip6_addr_t *src_addr; /* Allocate a packet. Size is MLD header + IPv6 Hop-by-hop options header. */ - p = pbuf_alloc(PBUF_IP, sizeof(struct mld_header) + sizeof(struct ip6_hbh_hdr), PBUF_RAM); + p = pbuf_alloc(PBUF_IP, sizeof(struct mld_header) + MLD6_HBH_HLEN, PBUF_RAM); if (p == NULL) { MLD6_STATS_INC(mld6.memerr); return; } /* Move to make room for Hop-by-hop options header. */ - if (pbuf_header(p, -IP6_HBH_HLEN)) { + if (pbuf_remove_header(p, MLD6_HBH_HLEN)) { pbuf_free(p); MLD6_STATS_INC(mld6.lenerr); return; @@ -561,7 +599,7 @@ mld6_send(struct netif *netif, struct mld_group *group, u8_t type) mld_hdr->chksum = 0; mld_hdr->max_resp_delay = 0; mld_hdr->reserved = 0; - ip6_addr_set(&(mld_hdr->multicast_address), &(group->group_address)); + ip6_addr_copy_to_packed(mld_hdr->multicast_address, group->group_address); #if CHECKSUM_GEN_ICMP6 IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_ICMP6) { diff --git a/Libraries/LwIP/src/core/ipv6/nd6.c b/Libraries/LwIP/src/core/ipv6/nd6.c index cb02ad9..5deb3f1 100755 --- a/Libraries/LwIP/src/core/ipv6/nd6.c +++ b/Libraries/LwIP/src/core/ipv6/nd6.c @@ -58,6 +58,7 @@ #include "lwip/netif.h" #include "lwip/icmp6.h" #include "lwip/mld6.h" +#include "lwip/dhcp6.h" #include "lwip/ip.h" #include "lwip/stats.h" #include "lwip/dns.h" @@ -84,31 +85,42 @@ u32_t retrans_timer = LWIP_ND6_RETRANS_TIMER; /* @todo implement this value in t /* Index for cache entries. */ static u8_t nd6_cached_neighbor_index; -static u8_t nd6_cached_destination_index; +static netif_addr_idx_t nd6_cached_destination_index; /* Multicast address holder. */ static ip6_addr_t multicast_address; -/* Static buffer to parse RA packet options (size of a prefix option, biggest option) */ -static u8_t nd6_ra_buffer[sizeof(struct prefix_option)]; +static u8_t nd6_tmr_rs_reduction; + +/* Static buffer to parse RA packet options */ +union ra_options { + struct lladdr_option lladdr; + struct mtu_option mtu; + struct prefix_option prefix; +#if LWIP_ND6_RDNSS_MAX_DNS_SERVERS + struct rdnss_option rdnss; +#endif +}; +static union ra_options nd6_ra_buffer; /* Forward declarations. */ static s8_t nd6_find_neighbor_cache_entry(const ip6_addr_t *ip6addr); static s8_t nd6_new_neighbor_cache_entry(void); static void nd6_free_neighbor_cache_entry(s8_t i); -static s8_t nd6_find_destination_cache_entry(const ip6_addr_t *ip6addr); -static s8_t nd6_new_destination_cache_entry(void); -static s8_t nd6_is_prefix_in_netif(const ip6_addr_t *ip6addr, struct netif *netif); +static s16_t nd6_find_destination_cache_entry(const ip6_addr_t *ip6addr); +static s16_t nd6_new_destination_cache_entry(void); +static int nd6_is_prefix_in_netif(const ip6_addr_t *ip6addr, struct netif *netif); static s8_t nd6_select_router(const ip6_addr_t *ip6addr, struct netif *netif); static s8_t nd6_get_router(const ip6_addr_t *router_addr, struct netif *netif); static s8_t nd6_new_router(const ip6_addr_t *router_addr, struct netif *netif); -static s8_t nd6_get_onlink_prefix(ip6_addr_t *prefix, struct netif *netif); -static s8_t nd6_new_onlink_prefix(ip6_addr_t *prefix, struct netif *netif); +static s8_t nd6_get_onlink_prefix(const ip6_addr_t *prefix, struct netif *netif); +static s8_t nd6_new_onlink_prefix(const ip6_addr_t *prefix, struct netif *netif); static s8_t nd6_get_next_hop_entry(const ip6_addr_t *ip6addr, struct netif *netif); static err_t nd6_queue_packet(s8_t neighbor_index, struct pbuf *q); #define ND6_SEND_FLAG_MULTICAST_DEST 0x01 #define ND6_SEND_FLAG_ALLNODES_DEST 0x02 +#define ND6_SEND_FLAG_ANY_SRC 0x04 static void nd6_send_ns(struct netif *netif, const ip6_addr_t *target_addr, u8_t flags); static void nd6_send_na(struct netif *netif, const ip6_addr_t *target_addr, u8_t flags); static void nd6_send_neighbor_cache_probe(struct nd6_neighbor_cache_entry *entry, u8_t flags); @@ -124,6 +136,147 @@ static void nd6_free_q(struct nd6_q_entry *q); static void nd6_send_q(s8_t i); +/** + * A local address has been determined to be a duplicate. Take the appropriate + * action(s) on the address and the interface as a whole. + * + * @param netif the netif that owns the address + * @param addr_idx the index of the address detected to be a duplicate + */ +static void +nd6_duplicate_addr_detected(struct netif *netif, s8_t addr_idx) +{ + + /* Mark the address as duplicate, but leave its lifetimes alone. If this was + * a manually assigned address, it will remain in existence as duplicate, and + * as such be unusable for any practical purposes until manual intervention. + * If this was an autogenerated address, the address will follow normal + * expiration rules, and thus disappear once its valid lifetime expires. */ + netif_ip6_addr_set_state(netif, addr_idx, IP6_ADDR_DUPLICATED); + +#if LWIP_IPV6_AUTOCONFIG + /* If the affected address was the link-local address that we use to generate + * all other addresses, then we should not continue to use those derived + * addresses either, so mark them as duplicate as well. For autoconfig-only + * setups, this will make the interface effectively unusable, approaching the + * intention of RFC 4862 Sec. 5.4.5. @todo implement the full requirements */ + if (addr_idx == 0) { + s8_t i; + for (i = 1; i < LWIP_IPV6_NUM_ADDRESSES; i++) { + if (!ip6_addr_isinvalid(netif_ip6_addr_state(netif, i)) && + !netif_ip6_addr_isstatic(netif, i)) { + netif_ip6_addr_set_state(netif, i, IP6_ADDR_DUPLICATED); + } + } + } +#endif /* LWIP_IPV6_AUTOCONFIG */ +} + +#if LWIP_IPV6_AUTOCONFIG +/** + * We received a router advertisement that contains a prefix with the + * autoconfiguration flag set. Add or update an associated autogenerated + * address. + * + * @param netif the netif on which the router advertisement arrived + * @param prefix_opt a pointer to the prefix option data + * @param prefix_addr an aligned copy of the prefix address + */ +static void +nd6_process_autoconfig_prefix(struct netif *netif, + struct prefix_option *prefix_opt, const ip6_addr_t *prefix_addr) +{ + ip6_addr_t ip6addr; + u32_t valid_life, pref_life; + u8_t addr_state; + s8_t i, free_idx; + + /* The caller already checks RFC 4862 Sec. 5.5.3 points (a) and (b). We do + * the rest, starting with checks for (c) and (d) here. */ + valid_life = lwip_htonl(prefix_opt->valid_lifetime); + pref_life = lwip_htonl(prefix_opt->preferred_lifetime); + if (pref_life > valid_life || prefix_opt->prefix_length != 64) { + return; /* silently ignore this prefix for autoconfiguration purposes */ + } + + /* If an autogenerated address already exists for this prefix, update its + * lifetimes. An address is considered autogenerated if 1) it is not static + * (i.e., manually assigned), and 2) there is an advertised autoconfiguration + * prefix for it (the one we are processing here). This does not necessarily + * exclude the possibility that the address was actually assigned by, say, + * DHCPv6. If that distinction becomes important in the future, more state + * must be kept. As explained elsewhere we also update lifetimes of tentative + * and duplicate addresses. Skip address slot 0 (the link-local address). */ + for (i = 1; i < LWIP_IPV6_NUM_ADDRESSES; i++) { + addr_state = netif_ip6_addr_state(netif, i); + if (!ip6_addr_isinvalid(addr_state) && !netif_ip6_addr_isstatic(netif, i) && + ip6_addr_netcmp(prefix_addr, netif_ip6_addr(netif, i))) { + /* Update the valid lifetime, as per RFC 4862 Sec. 5.5.3 point (e). + * The valid lifetime will never drop to zero as a result of this. */ + u32_t remaining_life = netif_ip6_addr_valid_life(netif, i); + if (valid_life > ND6_2HRS || valid_life > remaining_life) { + netif_ip6_addr_set_valid_life(netif, i, valid_life); + } else if (remaining_life > ND6_2HRS) { + netif_ip6_addr_set_valid_life(netif, i, ND6_2HRS); + } + LWIP_ASSERT("bad valid lifetime", !netif_ip6_addr_isstatic(netif, i)); + /* Update the preferred lifetime. No bounds checks are needed here. In + * rare cases the advertisement may un-deprecate the address, though. + * Deprecation is left to the timer code where it is handled anyway. */ + if (pref_life > 0 && addr_state == IP6_ADDR_DEPRECATED) { + netif_ip6_addr_set_state(netif, i, IP6_ADDR_PREFERRED); + } + netif_ip6_addr_set_pref_life(netif, i, pref_life); + return; /* there should be at most one matching address */ + } + } + + /* No autogenerated address exists for this prefix yet. See if we can add a + * new one. However, if IPv6 autoconfiguration is administratively disabled, + * do not generate new addresses, but do keep updating lifetimes for existing + * addresses. Also, when adding new addresses, we must protect explicitly + * against a valid lifetime of zero, because again, we use that as a special + * value. The generated address would otherwise expire immediately anyway. + * Finally, the original link-local address must be usable at all. We start + * creating addresses even if the link-local address is still in tentative + * state though, and deal with the fallout of that upon DAD collision. */ + addr_state = netif_ip6_addr_state(netif, 0); + if (!netif->ip6_autoconfig_enabled || valid_life == IP6_ADDR_LIFE_STATIC || + ip6_addr_isinvalid(addr_state) || ip6_addr_isduplicated(addr_state)) { + return; + } + + /* Construct the new address that we intend to use, and then see if that + * address really does not exist. It might have been added manually, after + * all. As a side effect, find a free slot. Note that we cannot use + * netif_add_ip6_address() here, as it would return ERR_OK if the address + * already did exist, resulting in that address being given lifetimes. */ + IP6_ADDR(&ip6addr, prefix_addr->addr[0], prefix_addr->addr[1], + netif_ip6_addr(netif, 0)->addr[2], netif_ip6_addr(netif, 0)->addr[3]); + ip6_addr_assign_zone(&ip6addr, IP6_UNICAST, netif); + + free_idx = 0; + for (i = 1; i < LWIP_IPV6_NUM_ADDRESSES; i++) { + if (!ip6_addr_isinvalid(netif_ip6_addr_state(netif, i))) { + if (ip6_addr_cmp(&ip6addr, netif_ip6_addr(netif, i))) { + return; /* formed address already exists */ + } + } else if (free_idx == 0) { + free_idx = i; + } + } + if (free_idx == 0) { + return; /* no address slots available, try again on next advertisement */ + } + + /* Assign the new address to the interface. */ + ip_addr_copy_from_ip6(netif->ip6_addr[free_idx], ip6addr); + netif_ip6_addr_set_valid_life(netif, free_idx, valid_life); + netif_ip6_addr_set_pref_life(netif, free_idx, pref_life); + netif_ip6_addr_set_state(netif, free_idx, IP6_ADDR_TENTATIVE); +} +#endif /* LWIP_IPV6_AUTOCONFIG */ + /** * Process an incoming neighbor discovery message * @@ -135,6 +288,7 @@ nd6_input(struct pbuf *p, struct netif *inp) { u8_t msg_type; s8_t i; + s16_t dest_idx; ND6_STATS_INC(nd6.recv); @@ -144,6 +298,7 @@ nd6_input(struct pbuf *p, struct netif *inp) { struct na_header *na_hdr; struct lladdr_option *lladdr_opt; + ip6_addr_t target_address; /* Check that na header fits in packet. */ if (p->len < (sizeof(struct na_header))) { @@ -156,36 +311,36 @@ nd6_input(struct pbuf *p, struct netif *inp) na_hdr = (struct na_header *)p->payload; + /* Create an aligned, zoned copy of the target address. */ + ip6_addr_copy_from_packed(target_address, na_hdr->target_address); + ip6_addr_assign_zone(&target_address, IP6_UNICAST, inp); + + /* Check a subset of the other RFC 4861 Sec. 7.1.2 requirements. */ + if (IP6H_HOPLIM(ip6_current_header()) != ND6_HOPLIM || na_hdr->code != 0 || + ip6_addr_ismulticast(&target_address)) { + pbuf_free(p); + ND6_STATS_INC(nd6.proterr); + ND6_STATS_INC(nd6.drop); + return; + } + + /* @todo RFC MUST: if IP destination is multicast, Solicited flag is zero */ + /* @todo RFC MUST: all included options have a length greater than zero */ + /* Unsolicited NA?*/ if (ip6_addr_ismulticast(ip6_current_dest_addr())) { - ip6_addr_t target_address; - /* This is an unsolicited NA. * link-layer changed? * part of DAD mechanism? */ - /* Create an aligned copy. */ - ip6_addr_set(&target_address, &(na_hdr->target_address)); - #if LWIP_IPV6_DUP_DETECT_ATTEMPTS /* If the target address matches this netif, it is a DAD response. */ for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { if (!ip6_addr_isinvalid(netif_ip6_addr_state(inp, i)) && + !ip6_addr_isduplicated(netif_ip6_addr_state(inp, i)) && ip6_addr_cmp(&target_address, netif_ip6_addr(inp, i))) { /* We are using a duplicate address. */ - netif_ip6_addr_set_state(inp, i, IP6_ADDR_INVALID); - -#if LWIP_IPV6_AUTOCONFIG - /* Check to see if this address was autoconfigured. */ - if (!ip6_addr_islinklocal(&target_address)) { - i = nd6_get_onlink_prefix(&target_address, inp); - if (i >= 0) { - /* Mark this prefix as duplicate, so that we don't use it - * to generate this address again. */ - prefix_list[i].flags |= ND6_PREFIX_AUTOCONFIG_ADDRESS_DUPLICATE; - } - } -#endif /* LWIP_IPV6_AUTOCONFIG */ + nd6_duplicate_addr_detected(inp, i); pbuf_free(p); return; @@ -220,15 +375,10 @@ nd6_input(struct pbuf *p, struct netif *inp) } } } else { - ip6_addr_t target_address; - /* This is a solicited NA. * neighbor address resolution response? * neighbor unreachability detection response? */ - /* Create an aligned copy. */ - ip6_addr_set(&target_address, &(na_hdr->target_address)); - /* Find the cache entry corresponding to this na. */ i = nd6_find_neighbor_cache_entry(&target_address); if (i < 0) { @@ -278,6 +428,7 @@ nd6_input(struct pbuf *p, struct netif *inp) { struct ns_header *ns_hdr; struct lladdr_option *lladdr_opt; + ip6_addr_t target_address; u8_t accepted; /* Check that ns header fits in packet. */ @@ -291,6 +442,23 @@ nd6_input(struct pbuf *p, struct netif *inp) ns_hdr = (struct ns_header *)p->payload; + /* Create an aligned, zoned copy of the target address. */ + ip6_addr_copy_from_packed(target_address, ns_hdr->target_address); + ip6_addr_assign_zone(&target_address, IP6_UNICAST, inp); + + /* Check a subset of the other RFC 4861 Sec. 7.1.1 requirements. */ + if (IP6H_HOPLIM(ip6_current_header()) != ND6_HOPLIM || ns_hdr->code != 0 || + ip6_addr_ismulticast(&target_address)) { + pbuf_free(p); + ND6_STATS_INC(nd6.proterr); + ND6_STATS_INC(nd6.drop); + return; + } + + /* @todo RFC MUST: all included options have a length greater than zero */ + /* @todo RFC MUST: if IP source is 'any', destination is solicited-node multicast address */ + /* @todo RFC MUST: if IP source is 'any', there is no source LL address option */ + /* Check if there is a link-layer address provided. Only point to it if in this buffer. */ if (p->len >= (sizeof(struct ns_header) + 2)) { lladdr_opt = (struct lladdr_option *)((u8_t*)p->payload + sizeof(struct ns_header)); @@ -307,7 +475,7 @@ nd6_input(struct pbuf *p, struct netif *inp) if ((ip6_addr_isvalid(netif_ip6_addr_state(inp, i)) || (ip6_addr_istentative(netif_ip6_addr_state(inp, i)) && ip6_addr_isany(ip6_current_src_addr()))) && - ip6_addr_cmp(&(ns_hdr->target_address), netif_ip6_addr(inp, i))) { + ip6_addr_cmp(&target_address, netif_ip6_addr(inp, i))) { accepted = 1; break; } @@ -324,18 +492,16 @@ nd6_input(struct pbuf *p, struct netif *inp) /* Sender is validating this address. */ for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; ++i) { if (!ip6_addr_isinvalid(netif_ip6_addr_state(inp, i)) && - ip6_addr_cmp(&(ns_hdr->target_address), netif_ip6_addr(inp, i))) { + ip6_addr_cmp(&target_address, netif_ip6_addr(inp, i))) { /* Send a NA back so that the sender does not use this address. */ nd6_send_na(inp, netif_ip6_addr(inp, i), ND6_FLAG_OVERRIDE | ND6_SEND_FLAG_ALLNODES_DEST); if (ip6_addr_istentative(netif_ip6_addr_state(inp, i))) { /* We shouldn't use this address either. */ - netif_ip6_addr_set_state(inp, i, IP6_ADDR_INVALID); + nd6_duplicate_addr_detected(inp, i); } } } } else { - ip6_addr_t target_address; - /* Sender is trying to resolve our address. */ /* Verify that they included their own link-layer address. */ if (lladdr_opt == NULL) { @@ -379,9 +545,6 @@ nd6_input(struct pbuf *p, struct netif *inp) neighbor_cache[i].counter.delay_time = LWIP_ND6_DELAY_FIRST_PROBE_TIME / ND6_TMR_INTERVAL; } - /* Create an aligned copy. */ - ip6_addr_set(&target_address, &(ns_hdr->target_address)); - /* Send back a NA for us. Allocate the reply pbuf. */ nd6_send_na(inp, &target_address, ND6_FLAG_SOLICITED | ND6_FLAG_OVERRIDE); } @@ -394,7 +557,7 @@ nd6_input(struct pbuf *p, struct netif *inp) u8_t *buffer; /* Used to copy options. */ u16_t offset; #if LWIP_ND6_RDNSS_MAX_DNS_SERVERS - /* There can by multiple RDNSS options per RA */ + /* There can be multiple RDNSS options per RA */ u8_t rdnss_server_idx = 0; #endif /* LWIP_ND6_RDNSS_MAX_DNS_SERVERS */ @@ -409,12 +572,25 @@ nd6_input(struct pbuf *p, struct netif *inp) ra_hdr = (struct ra_header *)p->payload; + /* Check a subset of the other RFC 4861 Sec. 6.1.2 requirements. */ + if (!ip6_addr_islinklocal(ip6_current_src_addr()) || + IP6H_HOPLIM(ip6_current_header()) != ND6_HOPLIM || ra_hdr->code != 0) { + pbuf_free(p); + ND6_STATS_INC(nd6.proterr); + ND6_STATS_INC(nd6.drop); + return; + } + + /* @todo RFC MUST: all included options have a length greater than zero */ + /* If we are sending RS messages, stop. */ #if LWIP_IPV6_SEND_ROUTER_SOLICIT - /* ensure at least one solicitation is sent */ + /* ensure at least one solicitation is sent (see RFC 4861, ch. 6.3.7) */ if ((inp->rs_count < LWIP_ND6_MAX_MULTICAST_SOLICIT) || (nd6_send_rs(inp) == ERR_OK)) { inp->rs_count = 0; + } else { + inp->rs_count = 1; } #endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */ @@ -451,34 +627,54 @@ nd6_input(struct pbuf *p, struct netif *inp) /* Update flags in local entry (incl. preference). */ default_router_list[i].flags = ra_hdr->flags; +#if LWIP_IPV6_DHCP6 + /* Trigger DHCPv6 if enabled */ + dhcp6_nd6_ra_trigger(inp, ra_hdr->flags & ND6_RA_FLAG_MANAGED_ADDR_CONFIG, + ra_hdr->flags & ND6_RA_FLAG_OTHER_CONFIG); +#endif + /* Offset to options. */ offset = sizeof(struct ra_header); /* Process each option. */ - while ((p->tot_len - offset) > 0) { + while ((p->tot_len - offset) >= 2) { + u8_t option_type; + u16_t option_len; + int option_len8 = pbuf_try_get_at(p, offset + 1); + if (option_len8 <= 0) { + /* read beyond end or zero length */ + goto lenerr_drop_free_return; + } + option_len = ((u8_t)option_len8) << 3; + if (option_len > p->tot_len - offset) { + /* short packet (option does not fit in) */ + goto lenerr_drop_free_return; + } if (p->len == p->tot_len) { /* no need to copy from contiguous pbuf */ buffer = &((u8_t*)p->payload)[offset]; } else { - buffer = nd6_ra_buffer; - if (pbuf_copy_partial(p, buffer, sizeof(struct prefix_option), offset) != sizeof(struct prefix_option)) { - pbuf_free(p); - ND6_STATS_INC(nd6.lenerr); - ND6_STATS_INC(nd6.drop); - return; + /* check if this option fits into our buffer */ + if (option_len > sizeof(nd6_ra_buffer)) { + option_type = pbuf_get_at(p, offset); + /* invalid option length */ + if (option_type != ND6_OPTION_TYPE_RDNSS) { + goto lenerr_drop_free_return; + } + /* we allow RDNSS option to be longer - we'll just drop some servers */ + option_len = sizeof(nd6_ra_buffer); } + buffer = (u8_t*)&nd6_ra_buffer; + option_len = pbuf_copy_partial(p, &nd6_ra_buffer, option_len, offset); } - if (buffer[1] == 0) { - /* zero-length extension. drop packet */ - pbuf_free(p); - ND6_STATS_INC(nd6.lenerr); - ND6_STATS_INC(nd6.drop); - return; - } - switch (buffer[0]) { + option_type = buffer[0]; + switch (option_type) { case ND6_OPTION_TYPE_SOURCE_LLADDR: { struct lladdr_option *lladdr_opt; + if (option_len < sizeof(struct lladdr_option)) { + goto lenerr_drop_free_return; + } lladdr_opt = (struct lladdr_option *)buffer; if ((default_router_list[i].neighbor_entry != NULL) && (default_router_list[i].neighbor_entry->state == ND6_INCOMPLETE)) { @@ -491,10 +687,20 @@ nd6_input(struct pbuf *p, struct netif *inp) case ND6_OPTION_TYPE_MTU: { struct mtu_option *mtu_opt; + u32_t mtu32; + if (option_len < sizeof(struct mtu_option)) { + goto lenerr_drop_free_return; + } mtu_opt = (struct mtu_option *)buffer; - if (lwip_htonl(mtu_opt->mtu) >= 1280) { + mtu32 = lwip_htonl(mtu_opt->mtu); + if ((mtu32 >= 1280) && (mtu32 <= 0xffff)) { #if LWIP_ND6_ALLOW_RA_UPDATES - inp->mtu = (u16_t)lwip_htonl(mtu_opt->mtu); + if (inp->mtu) { + /* don't set the mtu for IPv6 higher than the netif driver supports */ + inp->mtu6 = LWIP_MIN(inp->mtu, (u16_t)mtu32); + } else { + inp->mtu6 = (u16_t)mtu32; + } #endif /* LWIP_ND6_ALLOW_RA_UPDATES */ } break; @@ -502,35 +708,42 @@ nd6_input(struct pbuf *p, struct netif *inp) case ND6_OPTION_TYPE_PREFIX_INFO: { struct prefix_option *prefix_opt; + ip6_addr_t prefix_addr; + if (option_len < sizeof(struct prefix_option)) { + goto lenerr_drop_free_return; + } + prefix_opt = (struct prefix_option *)buffer; - if ((prefix_opt->flags & ND6_PREFIX_FLAG_ON_LINK) && - (prefix_opt->prefix_length == 64) && - !ip6_addr_islinklocal(&(prefix_opt->prefix))) { - /* Add to on-link prefix list. */ - s8_t prefix; - ip6_addr_t prefix_addr; + /* Get a memory-aligned copy of the prefix. */ + ip6_addr_copy_from_packed(prefix_addr, prefix_opt->prefix); + ip6_addr_assign_zone(&prefix_addr, IP6_UNICAST, inp); - /* Get a memory-aligned copy of the prefix. */ - ip6_addr_set(&prefix_addr, &(prefix_opt->prefix)); + if (!ip6_addr_islinklocal(&prefix_addr)) { + if ((prefix_opt->flags & ND6_PREFIX_FLAG_ON_LINK) && + (prefix_opt->prefix_length == 64)) { + /* Add to on-link prefix list. */ + u32_t valid_life; + s8_t prefix; - /* find cache entry for this prefix. */ - prefix = nd6_get_onlink_prefix(&prefix_addr, inp); - if (prefix < 0) { - /* Create a new cache entry. */ - prefix = nd6_new_onlink_prefix(&prefix_addr, inp); - } - if (prefix >= 0) { - prefix_list[prefix].invalidation_timer = lwip_htonl(prefix_opt->valid_lifetime); + valid_life = lwip_htonl(prefix_opt->valid_lifetime); -#if LWIP_IPV6_AUTOCONFIG - if (prefix_opt->flags & ND6_PREFIX_FLAG_AUTONOMOUS) { - /* Mark prefix as autonomous, so that address autoconfiguration can take place. - * Only OR flag, so that we don't over-write other flags (such as ADDRESS_DUPLICATE)*/ - prefix_list[prefix].flags |= ND6_PREFIX_AUTOCONFIG_AUTONOMOUS; + /* find cache entry for this prefix. */ + prefix = nd6_get_onlink_prefix(&prefix_addr, inp); + if (prefix < 0 && valid_life > 0) { + /* Create a new cache entry. */ + prefix = nd6_new_onlink_prefix(&prefix_addr, inp); + } + if (prefix >= 0) { + prefix_list[prefix].invalidation_timer = valid_life; } -#endif /* LWIP_IPV6_AUTOCONFIG */ } +#if LWIP_IPV6_AUTOCONFIG + if (prefix_opt->flags & ND6_PREFIX_FLAG_AUTONOMOUS) { + /* Perform processing for autoconfiguration. */ + nd6_process_autoconfig_prefix(inp, prefix_opt, &prefix_addr); + } +#endif /* LWIP_IPV6_AUTOCONFIG */ } break; @@ -545,26 +758,33 @@ nd6_input(struct pbuf *p, struct netif *inp) case ND6_OPTION_TYPE_RDNSS: { u8_t num, n; + u16_t copy_offset = offset + SIZEOF_RDNSS_OPTION_BASE; struct rdnss_option * rdnss_opt; + if (option_len < SIZEOF_RDNSS_OPTION_BASE) { + goto lenerr_drop_free_return; + } rdnss_opt = (struct rdnss_option *)buffer; num = (rdnss_opt->length - 1) / 2; for (n = 0; (rdnss_server_idx < DNS_MAX_SERVERS) && (n < num); n++) { ip_addr_t rdnss_address; - /* Get a memory-aligned copy of the prefix. */ - ip_addr_copy_from_ip6(rdnss_address, rdnss_opt->rdnss_address[n]); + /* Copy directly from pbuf to get an aligned, zoned copy of the prefix. */ + if (pbuf_copy_partial(p, &rdnss_address, sizeof(ip6_addr_p_t), copy_offset) == sizeof(ip6_addr_p_t)) { + IP_SET_TYPE_VAL(rdnss_address, IPADDR_TYPE_V6); + ip6_addr_assign_zone(ip_2_ip6(&rdnss_address), IP6_UNKNOWN, inp); - if (htonl(rdnss_opt->lifetime) > 0) { - /* TODO implement Lifetime > 0 */ - dns_setserver(rdnss_server_idx++, &rdnss_address); - } else { - /* TODO implement DNS removal in dns.c */ - u8_t s; - for (s = 0; s < DNS_MAX_SERVERS; s++) { - const ip_addr_t *addr = dns_getserver(s); - if(ip_addr_cmp(addr, &rdnss_address)) { - dns_setserver(s, NULL); + if (htonl(rdnss_opt->lifetime) > 0) { + /* TODO implement Lifetime > 0 */ + dns_setserver(rdnss_server_idx++, &rdnss_address); + } else { + /* TODO implement DNS removal in dns.c */ + u8_t s; + for (s = 0; s < DNS_MAX_SERVERS; s++) { + const ip_addr_t *addr = dns_getserver(s); + if(ip_addr_cmp(addr, &rdnss_address)) { + dns_setserver(s, NULL); + } } } } @@ -578,7 +798,7 @@ nd6_input(struct pbuf *p, struct netif *inp) break; } /* option length is checked earlier to be non-zero to make sure loop ends */ - offset += 8 * ((u16_t)buffer[1]); + offset += 8 * (u8_t)option_len8; } break; /* ICMP6_TYPE_RA */ @@ -587,7 +807,7 @@ nd6_input(struct pbuf *p, struct netif *inp) { struct redirect_header *redir_hdr; struct lladdr_option *lladdr_opt; - ip6_addr_t tmp; + ip6_addr_t destination_address, target_address; /* Check that Redir header fits in packet. */ if (p->len < sizeof(struct redirect_header)) { @@ -600,6 +820,24 @@ nd6_input(struct pbuf *p, struct netif *inp) redir_hdr = (struct redirect_header *)p->payload; + /* Create an aligned, zoned copy of the destination address. */ + ip6_addr_copy_from_packed(destination_address, redir_hdr->destination_address); + ip6_addr_assign_zone(&destination_address, IP6_UNICAST, inp); + + /* Check a subset of the other RFC 4861 Sec. 8.1 requirements. */ + if (!ip6_addr_islinklocal(ip6_current_src_addr()) || + IP6H_HOPLIM(ip6_current_header()) != ND6_HOPLIM || + redir_hdr->code != 0 || ip6_addr_ismulticast(&destination_address)) { + pbuf_free(p); + ND6_STATS_INC(nd6.proterr); + ND6_STATS_INC(nd6.drop); + return; + } + + /* @todo RFC MUST: IP source address equals first-hop router for destination_address */ + /* @todo RFC MUST: ICMP target address is either link-local address or same as destination_address */ + /* @todo RFC MUST: all included options have a length greater than zero */ + if (p->len >= (sizeof(struct redirect_header) + 2)) { lladdr_opt = (struct lladdr_option *)((u8_t*)p->payload + sizeof(struct redirect_header)); if (p->len < (sizeof(struct redirect_header) + (lladdr_opt->length << 3))) { @@ -609,33 +847,31 @@ nd6_input(struct pbuf *p, struct netif *inp) lladdr_opt = NULL; } - /* Copy original destination address to current source address, to have an aligned copy. */ - ip6_addr_set(&tmp, &(redir_hdr->destination_address)); - /* Find dest address in cache */ - i = nd6_find_destination_cache_entry(&tmp); - if (i < 0) { + dest_idx = nd6_find_destination_cache_entry(&destination_address); + if (dest_idx < 0) { /* Destination not in cache, drop packet. */ pbuf_free(p); return; } + /* Create an aligned, zoned copy of the target address. */ + ip6_addr_copy_from_packed(target_address, redir_hdr->target_address); + ip6_addr_assign_zone(&target_address, IP6_UNICAST, inp); + /* Set the new target address. */ - ip6_addr_set(&(destination_cache[i].next_hop_addr), &(redir_hdr->target_address)); + ip6_addr_copy(destination_cache[dest_idx].next_hop_addr, target_address); /* If Link-layer address of other router is given, try to add to neighbor cache. */ if (lladdr_opt != NULL) { if (lladdr_opt->type == ND6_OPTION_TYPE_TARGET_LLADDR) { - /* Copy target address to current source address, to have an aligned copy. */ - ip6_addr_set(&tmp, &(redir_hdr->target_address)); - - i = nd6_find_neighbor_cache_entry(&tmp); + i = nd6_find_neighbor_cache_entry(&target_address); if (i < 0) { i = nd6_new_neighbor_cache_entry(); if (i >= 0) { neighbor_cache[i].netif = inp; MEMCPY(neighbor_cache[i].lladdr, lladdr_opt->addr, inp->hwaddr_len); - ip6_addr_set(&(neighbor_cache[i].next_hop_address), &tmp); + ip6_addr_copy(neighbor_cache[i].next_hop_address, target_address); /* Receiving a message does not prove reachability: only in one direction. * Delay probe in case we get confirmation of reachability from upper layer (TCP). */ @@ -661,7 +897,7 @@ nd6_input(struct pbuf *p, struct netif *inp) struct icmp6_hdr *icmp6hdr; /* Packet too big message */ struct ip6_hdr *ip6hdr; /* IPv6 header of the packet which caused the error */ u32_t pmtu; - ip6_addr_t tmp; + ip6_addr_t destination_address; /* Check that ICMPv6 header + IPv6 header fit in payload */ if (p->len < (sizeof(struct icmp6_hdr) + IP6_HLEN)) { @@ -675,12 +911,13 @@ nd6_input(struct pbuf *p, struct netif *inp) icmp6hdr = (struct icmp6_hdr *)p->payload; ip6hdr = (struct ip6_hdr *)((u8_t*)p->payload + sizeof(struct icmp6_hdr)); - /* Copy original destination address to current source address, to have an aligned copy. */ - ip6_addr_set(&tmp, &(ip6hdr->dest)); + /* Create an aligned, zoned copy of the destination address. */ + ip6_addr_copy_from_packed(destination_address, ip6hdr->dest); + ip6_addr_assign_zone(&destination_address, IP6_UNKNOWN, inp); /* Look for entry in destination cache. */ - i = nd6_find_destination_cache_entry(&tmp); - if (i < 0) { + dest_idx = nd6_find_destination_cache_entry(&destination_address); + if (dest_idx < 0) { /* Destination not in cache, drop packet. */ pbuf_free(p); return; @@ -688,7 +925,7 @@ nd6_input(struct pbuf *p, struct netif *inp) /* Change the Path MTU. */ pmtu = lwip_htonl(icmp6hdr->data); - destination_cache[i].pmtu = (u16_t)LWIP_MIN(pmtu, 0xFFFF); + destination_cache[dest_idx].pmtu = (u16_t)LWIP_MIN(pmtu, 0xFFFF); break; /* ICMP6_TYPE_PTB */ } @@ -700,6 +937,11 @@ nd6_input(struct pbuf *p, struct netif *inp) } pbuf_free(p); + return; +lenerr_drop_free_return: + ND6_STATS_INC(nd6.lenerr); + ND6_STATS_INC(nd6.drop); + pbuf_free(p); } @@ -709,6 +951,7 @@ nd6_input(struct pbuf *p, struct netif *inp) * - Update neighbor reachability states * - Update destination cache entries age * - Update invalidation timers of default routers and on-link prefixes + * - Update lifetimes of our addresses * - Perform duplicate address detection (DAD) for our addresses * - Send router solicitations */ @@ -784,15 +1027,22 @@ nd6_tmr(void) for (i = 0; i < LWIP_ND6_NUM_ROUTERS; i++) { if (default_router_list[i].neighbor_entry != NULL) { /* Active entry. */ - if (default_router_list[i].invalidation_timer > 0) { - default_router_list[i].invalidation_timer -= ND6_TMR_INTERVAL / 1000; - } - if (default_router_list[i].invalidation_timer < ND6_TMR_INTERVAL / 1000) { - /* Less than 1 second remaining. Clear this entry. */ + if (default_router_list[i].invalidation_timer <= ND6_TMR_INTERVAL / 1000) { + /* No more than 1 second remaining. Clear this entry. Also clear any of + * its destination cache entries, as per RFC 4861 Sec. 5.3 and 6.3.5. */ + s8_t j; + for (j = 0; j < LWIP_ND6_NUM_DESTINATIONS; j++) { + if (ip6_addr_cmp(&destination_cache[j].next_hop_addr, + &default_router_list[i].neighbor_entry->next_hop_address)) { + ip6_addr_set_any(&destination_cache[j].destination_addr); + } + } default_router_list[i].neighbor_entry->isrouter = 0; default_router_list[i].neighbor_entry = NULL; default_router_list[i].invalidation_timer = 0; default_router_list[i].flags = 0; + } else { + default_router_list[i].invalidation_timer -= ND6_TMR_INTERVAL / 1000; } } } @@ -800,81 +1050,89 @@ nd6_tmr(void) /* Process prefix entries. */ for (i = 0; i < LWIP_ND6_NUM_PREFIXES; i++) { if (prefix_list[i].netif != NULL) { - if (prefix_list[i].invalidation_timer < ND6_TMR_INTERVAL / 1000) { + if (prefix_list[i].invalidation_timer <= ND6_TMR_INTERVAL / 1000) { /* Entry timed out, remove it */ prefix_list[i].invalidation_timer = 0; - -#if LWIP_IPV6_AUTOCONFIG - /* If any addresses were configured with this prefix, remove them */ - if (prefix_list[i].flags & ND6_PREFIX_AUTOCONFIG_ADDRESS_GENERATED) { - s8_t j; - - for (j = 1; j < LWIP_IPV6_NUM_ADDRESSES; j++) { - if ((netif_ip6_addr_state(prefix_list[i].netif, j) != IP6_ADDR_INVALID) && - ip6_addr_netcmp(&prefix_list[i].prefix, netif_ip6_addr(prefix_list[i].netif, j))) { - netif_ip6_addr_set_state(prefix_list[i].netif, j, IP6_ADDR_INVALID); - prefix_list[i].flags = 0; - - /* Exit loop. */ - break; - } - } - } -#endif /* LWIP_IPV6_AUTOCONFIG */ - prefix_list[i].netif = NULL; - prefix_list[i].flags = 0; } else { prefix_list[i].invalidation_timer -= ND6_TMR_INTERVAL / 1000; - -#if LWIP_IPV6_AUTOCONFIG - /* Initiate address autoconfiguration for this prefix, if conditions are met. */ - if (prefix_list[i].netif->ip6_autoconfig_enabled && - (prefix_list[i].flags & ND6_PREFIX_AUTOCONFIG_AUTONOMOUS) && - !(prefix_list[i].flags & ND6_PREFIX_AUTOCONFIG_ADDRESS_GENERATED)) { - s8_t j; - /* Try to get an address on this netif that is invalid. - * Skip 0 index (link-local address) */ - for (j = 1; j < LWIP_IPV6_NUM_ADDRESSES; j++) { - if (netif_ip6_addr_state(prefix_list[i].netif, j) == IP6_ADDR_INVALID) { - /* Generate an address using this prefix and interface ID from link-local address. */ - netif_ip6_addr_set_parts(prefix_list[i].netif, j, - prefix_list[i].prefix.addr[0], prefix_list[i].prefix.addr[1], - netif_ip6_addr(prefix_list[i].netif, 0)->addr[2], netif_ip6_addr(prefix_list[i].netif, 0)->addr[3]); - - /* Mark it as tentative (DAD will be performed if configured). */ - netif_ip6_addr_set_state(prefix_list[i].netif, j, IP6_ADDR_TENTATIVE); - - /* Mark this prefix with ADDRESS_GENERATED, so that we don't try again. */ - prefix_list[i].flags |= ND6_PREFIX_AUTOCONFIG_ADDRESS_GENERATED; - - /* Exit loop. */ - break; - } - } - } -#endif /* LWIP_IPV6_AUTOCONFIG */ } } } - - /* Process our own addresses, if DAD configured. */ - for (netif = netif_list; netif != NULL; netif = netif->next) { + /* Process our own addresses, updating address lifetimes and/or DAD state. */ + NETIF_FOREACH(netif) { for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; ++i) { - u8_t addr_state = netif_ip6_addr_state(netif, i); + u8_t addr_state; +#if LWIP_IPV6_ADDRESS_LIFETIMES + /* Step 1: update address lifetimes (valid and preferred). */ + addr_state = netif_ip6_addr_state(netif, i); + /* RFC 4862 is not entirely clear as to whether address lifetimes affect + * tentative addresses, and is even less clear as to what should happen + * with duplicate addresses. We choose to track and update lifetimes for + * both those types, although for different reasons: + * - for tentative addresses, the line of thought of Sec. 5.7 combined + * with the potentially long period that an address may be in tentative + * state (due to the interface being down) suggests that lifetimes + * should be independent of external factors which would include DAD; + * - for duplicate addresses, retiring them early could result in a new + * but unwanted attempt at marking them as valid, while retiring them + * late/never could clog up address slots on the netif. + * As a result, we may end up expiring addresses of either type here. + */ + if (!ip6_addr_isinvalid(addr_state) && + !netif_ip6_addr_isstatic(netif, i)) { + u32_t life = netif_ip6_addr_valid_life(netif, i); + if (life <= ND6_TMR_INTERVAL / 1000) { + /* The address has expired. */ + netif_ip6_addr_set_valid_life(netif, i, 0); + netif_ip6_addr_set_pref_life(netif, i, 0); + netif_ip6_addr_set_state(netif, i, IP6_ADDR_INVALID); + } else { + if (!ip6_addr_life_isinfinite(life)) { + life -= ND6_TMR_INTERVAL / 1000; + LWIP_ASSERT("bad valid lifetime", life != IP6_ADDR_LIFE_STATIC); + netif_ip6_addr_set_valid_life(netif, i, life); + } + /* The address is still here. Update the preferred lifetime too. */ + life = netif_ip6_addr_pref_life(netif, i); + if (life <= ND6_TMR_INTERVAL / 1000) { + /* This case must also trigger if 'life' was already zero, so as to + * deal correctly with advertised preferred-lifetime reductions. */ + netif_ip6_addr_set_pref_life(netif, i, 0); + if (addr_state == IP6_ADDR_PREFERRED) + netif_ip6_addr_set_state(netif, i, IP6_ADDR_DEPRECATED); + } else if (!ip6_addr_life_isinfinite(life)) { + life -= ND6_TMR_INTERVAL / 1000; + netif_ip6_addr_set_pref_life(netif, i, life); + } + } + } + /* The address state may now have changed, so reobtain it next. */ +#endif /* LWIP_IPV6_ADDRESS_LIFETIMES */ + /* Step 2: update DAD state. */ + addr_state = netif_ip6_addr_state(netif, i); if (ip6_addr_istentative(addr_state)) { if ((addr_state & IP6_ADDR_TENTATIVE_COUNT_MASK) >= LWIP_IPV6_DUP_DETECT_ATTEMPTS) { - /* No NA received in response. Mark address as valid. */ - netif_ip6_addr_set_state(netif, i, IP6_ADDR_PREFERRED); - /* @todo implement preferred and valid lifetimes. */ - } else if (netif->flags & NETIF_FLAG_UP) { - /* Send a NS for this address. */ - nd6_send_ns(netif, netif_ip6_addr(netif, i), ND6_SEND_FLAG_MULTICAST_DEST); + /* No NA received in response. Mark address as valid. For dynamic + * addresses with an expired preferred lifetime, the state is set to + * deprecated right away. That should almost never happen, though. */ + addr_state = IP6_ADDR_PREFERRED; +#if LWIP_IPV6_ADDRESS_LIFETIMES + if (!netif_ip6_addr_isstatic(netif, i) && + netif_ip6_addr_pref_life(netif, i) == 0) { + addr_state = IP6_ADDR_DEPRECATED; + } +#endif /* LWIP_IPV6_ADDRESS_LIFETIMES */ + netif_ip6_addr_set_state(netif, i, addr_state); + } else if (netif_is_up(netif) && netif_is_link_up(netif)) { /* tentative: set next state by increasing by one */ netif_ip6_addr_set_state(netif, i, addr_state + 1); - /* @todo send max 1 NS per tmr call? enable return*/ - /*return;*/ + /* Send a NS for this address. Use the unspecified address as source + * address in all cases (RFC 4862 Sec. 5.4.2), not in the least + * because as it is, we only consider multicast replies for DAD. */ + nd6_send_ns(netif, netif_ip6_addr(netif, i), + ND6_SEND_FLAG_MULTICAST_DEST | ND6_SEND_FLAG_ANY_SRC); } } } @@ -882,13 +1140,20 @@ nd6_tmr(void) #if LWIP_IPV6_SEND_ROUTER_SOLICIT /* Send router solicitation messages, if necessary. */ - for (netif = netif_list; netif != NULL; netif = netif->next) { - if ((netif->rs_count > 0) && (netif->flags & NETIF_FLAG_UP) && - (!ip6_addr_isinvalid(netif_ip6_addr_state(netif, 0)))) { - if (nd6_send_rs(netif) == ERR_OK) { - netif->rs_count--; + if (!nd6_tmr_rs_reduction) { + nd6_tmr_rs_reduction = (ND6_RTR_SOLICITATION_INTERVAL / ND6_TMR_INTERVAL) - 1; + NETIF_FOREACH(netif) { + if ((netif->rs_count > 0) && netif_is_up(netif) && + netif_is_link_up(netif) && + !ip6_addr_isinvalid(netif_ip6_addr_state(netif, 0)) && + !ip6_addr_isduplicated(netif_ip6_addr_state(netif, 0))) { + if (nd6_send_rs(netif) == ERR_OK) { + netif->rs_count--; + } } } + } else { + nd6_tmr_rs_reduction--; } #endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */ @@ -920,7 +1185,10 @@ nd6_send_ns(struct netif *netif, const ip6_addr_t *target_addr, u8_t flags) const ip6_addr_t *src_addr; u16_t lladdr_opt_len; - if (ip6_addr_isvalid(netif_ip6_addr_state(netif,0))) { + LWIP_ASSERT("target address is required", target_addr != NULL); + + if (!(flags & ND6_SEND_FLAG_ANY_SRC) && + ip6_addr_isvalid(netif_ip6_addr_state(netif,0))) { /* Use link-local address as source address. */ src_addr = netif_ip6_addr(netif, 0); /* calculate option length (in 8-byte-blocks) */ @@ -945,7 +1213,7 @@ nd6_send_ns(struct netif *netif, const ip6_addr_t *target_addr, u8_t flags) ns_hdr->code = 0; ns_hdr->chksum = 0; ns_hdr->reserved = 0; - ip6_addr_set(&(ns_hdr->target_address), target_addr); + ip6_addr_copy_to_packed(ns_hdr->target_address, *target_addr); if (lladdr_opt_len != 0) { struct lladdr_option *lladdr_opt = (struct lladdr_option *)((u8_t*)p->payload + sizeof(struct ns_header)); @@ -957,6 +1225,7 @@ nd6_send_ns(struct netif *netif, const ip6_addr_t *target_addr, u8_t flags) /* Generate the solicited node address for the target address. */ if (flags & ND6_SEND_FLAG_MULTICAST_DEST) { ip6_addr_set_solicitednode(&multicast_address, target_addr->addr[3]); + ip6_addr_assign_zone(&multicast_address, IP6_MULTICAST, netif); target_addr = &multicast_address; } @@ -970,7 +1239,7 @@ nd6_send_ns(struct netif *netif, const ip6_addr_t *target_addr, u8_t flags) /* Send the packet out. */ ND6_STATS_INC(nd6.xmit); ip6_output_if(p, (src_addr == IP6_ADDR_ANY6) ? NULL : src_addr, target_addr, - LWIP_ICMP6_HL, 0, IP6_NEXTH_ICMP6, netif); + ND6_HOPLIM, 0, IP6_NEXTH_ICMP6, netif); pbuf_free(p); } @@ -991,6 +1260,8 @@ nd6_send_na(struct netif *netif, const ip6_addr_t *target_addr, u8_t flags) const ip6_addr_t *dest_addr; u16_t lladdr_opt_len; + LWIP_ASSERT("target address is required", target_addr != NULL); + /* Use link-local address as source address. */ /* src_addr = netif_ip6_addr(netif, 0); */ /* Use target address as source address. */ @@ -1015,7 +1286,7 @@ nd6_send_na(struct netif *netif, const ip6_addr_t *target_addr, u8_t flags) na_hdr->reserved[0] = 0; na_hdr->reserved[1] = 0; na_hdr->reserved[2] = 0; - ip6_addr_set(&(na_hdr->target_address), target_addr); + ip6_addr_copy_to_packed(na_hdr->target_address, *target_addr); lladdr_opt->type = ND6_OPTION_TYPE_TARGET_LLADDR; lladdr_opt->length = (u8_t)lladdr_opt_len; @@ -1024,9 +1295,11 @@ nd6_send_na(struct netif *netif, const ip6_addr_t *target_addr, u8_t flags) /* Generate the solicited node address for the target address. */ if (flags & ND6_SEND_FLAG_MULTICAST_DEST) { ip6_addr_set_solicitednode(&multicast_address, target_addr->addr[3]); + ip6_addr_assign_zone(&multicast_address, IP6_MULTICAST, netif); dest_addr = &multicast_address; } else if (flags & ND6_SEND_FLAG_ALLNODES_DEST) { ip6_addr_set_allnodes_linklocal(&multicast_address); + ip6_addr_assign_zone(&multicast_address, IP6_MULTICAST, netif); dest_addr = &multicast_address; } else { dest_addr = ip6_current_src_addr(); @@ -1042,7 +1315,7 @@ nd6_send_na(struct netif *netif, const ip6_addr_t *target_addr, u8_t flags) /* Send the packet out. */ ND6_STATS_INC(nd6.xmit); ip6_output_if(p, src_addr, dest_addr, - LWIP_ICMP6_HL, 0, IP6_NEXTH_ICMP6, netif); + ND6_HOPLIM, 0, IP6_NEXTH_ICMP6, netif); pbuf_free(p); } @@ -1071,6 +1344,7 @@ nd6_send_rs(struct netif *netif) /* Generate the all routers target address. */ ip6_addr_set_allrouters_linklocal(&multicast_address); + ip6_addr_assign_zone(&multicast_address, IP6_MULTICAST, netif); /* Allocate a packet. */ if (src_addr != IP6_ADDR_ANY6) { @@ -1109,7 +1383,7 @@ nd6_send_rs(struct netif *netif) ND6_STATS_INC(nd6.xmit); err = ip6_output_if(p, (src_addr == IP6_ADDR_ANY6) ? NULL : src_addr, &multicast_address, - LWIP_ICMP6_HL, 0, IP6_NEXTH_ICMP6, netif); + ND6_HOPLIM, 0, IP6_NEXTH_ICMP6, netif); pbuf_free(p); return err; @@ -1282,10 +1556,13 @@ nd6_free_neighbor_cache_entry(s8_t i) * @return The destination cache entry index that matched, -1 if no * entry is found */ -static s8_t +static s16_t nd6_find_destination_cache_entry(const ip6_addr_t *ip6addr) { - s8_t i; + s16_t i; + + IP6_ADDR_ZONECHECK(ip6addr); + for (i = 0; i < LWIP_ND6_NUM_DESTINATIONS; i++) { if (ip6_addr_cmp(ip6addr, &(destination_cache[i].destination_addr))) { return i; @@ -1301,10 +1578,10 @@ nd6_find_destination_cache_entry(const ip6_addr_t *ip6addr) * @return The destination cache entry index that was created, -1 if no * entry was created */ -static s8_t +static s16_t nd6_new_destination_cache_entry(void) { - s8_t i, j; + s16_t i, j; u32_t age; /* Find an empty entry. */ @@ -1343,15 +1620,18 @@ nd6_clear_destination_cache(void) } /** - * Determine whether an address matches an on-link prefix. + * Determine whether an address matches an on-link prefix or the subnet of a + * statically assigned address. * * @param ip6addr the IPv6 address to match * @return 1 if the address is on-link, 0 otherwise */ -static s8_t +static int nd6_is_prefix_in_netif(const ip6_addr_t *ip6addr, struct netif *netif) { s8_t i; + + /* Check to see if the address matches an on-link prefix. */ for (i = 0; i < LWIP_ND6_NUM_PREFIXES; i++) { if ((prefix_list[i].netif == netif) && (prefix_list[i].invalidation_timer > 0) && @@ -1359,9 +1639,13 @@ nd6_is_prefix_in_netif(const ip6_addr_t *ip6addr, struct netif *netif) return 1; } } - /* Check to see if address prefix matches a (manually?) configured address. */ + /* Check to see if address prefix matches a manually configured (= static) + * address. Static addresses have an implied /64 subnet assignment. Dynamic + * addresses (from autoconfiguration) have no implied subnet assignment, and + * are thus effectively /128 assignments. See RFC 5942 for more on this. */ for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && + netif_ip6_addr_isstatic(netif, i) && ip6_addr_netcmp(ip6addr, netif_ip6_addr(netif, i))) { return 1; } @@ -1372,6 +1656,11 @@ nd6_is_prefix_in_netif(const ip6_addr_t *ip6addr, struct netif *netif) /** * Select a default router for a destination. * + * This function is used both for routing and for finding a next-hop target for + * a packet. In the former case, the given netif is NULL, and the returned + * router entry must be for a netif suitable for sending packets (up, link up). + * In the latter case, the given netif is not NULL and restricts router choice. + * * @param ip6addr the destination address * @param netif the netif for the outgoing packet, if known * @return the default router entry index, or -1 if no suitable @@ -1380,48 +1669,58 @@ nd6_is_prefix_in_netif(const ip6_addr_t *ip6addr, struct netif *netif) static s8_t nd6_select_router(const ip6_addr_t *ip6addr, struct netif *netif) { - s8_t i; - /* last_router is used for round-robin router selection (as recommended - * in RFC). This is more robust in case one router is not reachable, - * we are not stuck trying to resolve it. */ + struct netif *router_netif; + s8_t i, j, valid_router; static s8_t last_router; - (void)ip6addr; /* @todo match preferred routes!! (must implement ND6_OPTION_TYPE_ROUTE_INFO) */ + + LWIP_UNUSED_ARG(ip6addr); /* @todo match preferred routes!! (must implement ND6_OPTION_TYPE_ROUTE_INFO) */ /* @todo: implement default router preference */ - /* Look for reachable routers. */ + /* Look for valid routers. A reachable router is preferred. */ + valid_router = -1; for (i = 0; i < LWIP_ND6_NUM_ROUTERS; i++) { - if (++last_router >= LWIP_ND6_NUM_ROUTERS) { - last_router = 0; - } - if ((default_router_list[i].neighbor_entry != NULL) && - (netif != NULL ? netif == default_router_list[i].neighbor_entry->netif : 1) && - (default_router_list[i].invalidation_timer > 0) && - (default_router_list[i].neighbor_entry->state == ND6_REACHABLE)) { - return i; + /* Is the router netif both set and apppropriate? */ + if (default_router_list[i].neighbor_entry != NULL) { + router_netif = default_router_list[i].neighbor_entry->netif; + if ((router_netif != NULL) && (netif != NULL ? netif == router_netif : + (netif_is_up(router_netif) && netif_is_link_up(router_netif)))) { + /* Is the router valid, i.e., reachable or probably reachable as per + * RFC 4861 Sec. 6.3.6? Note that we will never return a router that + * has no neighbor cache entry, due to the netif association tests. */ + if (default_router_list[i].neighbor_entry->state != ND6_INCOMPLETE) { + /* Is the router known to be reachable? */ + if (default_router_list[i].neighbor_entry->state == ND6_REACHABLE) { + return i; /* valid and reachable - done! */ + } else if (valid_router < 0) { + valid_router = i; /* valid but not known to be reachable */ + } + } + } } } - - /* Look for router in other reachability states, but still valid according to timer. */ - for (i = 0; i < LWIP_ND6_NUM_ROUTERS; i++) { - if (++last_router >= LWIP_ND6_NUM_ROUTERS) { - last_router = 0; - } - if ((default_router_list[i].neighbor_entry != NULL) && - (netif != NULL ? netif == default_router_list[i].neighbor_entry->netif : 1) && - (default_router_list[i].invalidation_timer > 0)) { - return i; - } + if (valid_router >= 0) { + return valid_router; } /* Look for any router for which we have any information at all. */ - for (i = 0; i < LWIP_ND6_NUM_ROUTERS; i++) { - if (++last_router >= LWIP_ND6_NUM_ROUTERS) { - last_router = 0; + /* last_router is used for round-robin selection of incomplete routers, as + * recommended in RFC 4861 Sec. 6.3.6 point (2). Advance only when picking a + * route, to select the same router as next-hop target in the common case. */ + if ((netif == NULL) && (++last_router >= LWIP_ND6_NUM_ROUTERS)) { + last_router = 0; + } + i = last_router; + for (j = 0; j < LWIP_ND6_NUM_ROUTERS; j++) { + if (default_router_list[i].neighbor_entry != NULL) { + router_netif = default_router_list[i].neighbor_entry->netif; + if ((router_netif != NULL) && (netif != NULL ? netif == router_netif : + (netif_is_up(router_netif) && netif_is_link_up(router_netif)))) { + return i; + } } - if (default_router_list[i].neighbor_entry != NULL && - (netif != NULL ? netif == default_router_list[i].neighbor_entry->netif : 1)) { - return i; + if (++i >= LWIP_ND6_NUM_ROUTERS) { + i = 0; } } @@ -1430,10 +1729,11 @@ nd6_select_router(const ip6_addr_t *ip6addr, struct netif *netif) } /** - * Find a router-announced route to the given destination. + * Find a router-announced route to the given destination. This route may be + * based on an on-link prefix or a default router. * - * The caller is responsible for checking whether the returned netif, if any, - * is in a suitable state (up, link up) to be used for packet transmission. + * If a suitable route is found, the returned netif is guaranteed to be in a + * suitable state (up, link up) to be used for packet transmission. * * @param ip6addr the destination IPv6 address * @return the netif to use for the destination, or NULL if none found @@ -1441,13 +1741,27 @@ nd6_select_router(const ip6_addr_t *ip6addr, struct netif *netif) struct netif * nd6_find_route(const ip6_addr_t *ip6addr) { + struct netif *netif; s8_t i; + /* @todo decide if it makes sense to check the destination cache first */ + + /* Check if there is a matching on-link prefix. There may be multiple + * matches. Pick the first one that is associated with a suitable netif. */ + for (i = 0; i < LWIP_ND6_NUM_PREFIXES; ++i) { + netif = prefix_list[i].netif; + if ((netif != NULL) && ip6_addr_netcmp(&prefix_list[i].prefix, ip6addr) && + netif_is_up(netif) && netif_is_link_up(netif)) { + return netif; + } + } + + /* No on-link prefix match. Find a router that can forward the packet. */ i = nd6_select_router(ip6addr, NULL); if (i >= 0) { - if (default_router_list[i].neighbor_entry != NULL) { - return default_router_list[i].neighbor_entry->netif; /* may be NULL */ - } + LWIP_ASSERT("selected router must have a neighbor entry", + default_router_list[i].neighbor_entry != NULL); + return default_router_list[i].neighbor_entry->netif; } return NULL; @@ -1465,6 +1779,8 @@ nd6_get_router(const ip6_addr_t *router_addr, struct netif *netif) { s8_t i; + IP6_ADDR_ZONECHECK_NETIF(router_addr, netif); + /* Look for router. */ for (i = 0; i < LWIP_ND6_NUM_ROUTERS; i++) { if ((default_router_list[i].neighbor_entry != NULL) && @@ -1492,6 +1808,8 @@ nd6_new_router(const ip6_addr_t *router_addr, struct netif *netif) s8_t free_router_index; s8_t neighbor_index; + IP6_ADDR_ZONECHECK_NETIF(router_addr, netif); + /* Do we have a neighbor entry for this router? */ neighbor_index = nd6_find_neighbor_cache_entry(router_addr); if (neighbor_index < 0) { @@ -1547,7 +1865,7 @@ nd6_new_router(const ip6_addr_t *router_addr, struct netif *netif) * @return the index on the prefix table, or -1 if not found */ static s8_t -nd6_get_onlink_prefix(ip6_addr_t *prefix, struct netif *netif) +nd6_get_onlink_prefix(const ip6_addr_t *prefix, struct netif *netif) { s8_t i; @@ -1571,7 +1889,7 @@ nd6_get_onlink_prefix(ip6_addr_t *prefix, struct netif *netif) * @return the index on the prefix table, or -1 if not created */ static s8_t -nd6_new_onlink_prefix(ip6_addr_t *prefix, struct netif *netif) +nd6_new_onlink_prefix(const ip6_addr_t *prefix, struct netif *netif) { s8_t i; @@ -1582,9 +1900,6 @@ nd6_new_onlink_prefix(ip6_addr_t *prefix, struct netif *netif) /* Found empty prefix entry. */ prefix_list[i].netif = netif; ip6_addr_set(&(prefix_list[i].prefix), prefix); -#if LWIP_IPV6_AUTOCONFIG - prefix_list[i].flags = 0; -#endif /* LWIP_IPV6_AUTOCONFIG */ return i; } } @@ -1612,11 +1927,14 @@ nd6_get_next_hop_entry(const ip6_addr_t *ip6addr, struct netif *netif) const ip6_addr_t *next_hop_addr; #endif /* LWIP_HOOK_ND6_GET_GW */ s8_t i; + s16_t dst_idx; + + IP6_ADDR_ZONECHECK_NETIF(ip6addr, netif); #if LWIP_NETIF_HWADDRHINT - if (netif->addr_hint != NULL) { + if (netif->hints != NULL) { /* per-pcb cached entry was given */ - u8_t addr_hint = *(netif->addr_hint); + netif_addr_idx_t addr_hint = netif->hints->addr_hint; if (addr_hint < LWIP_ND6_NUM_DESTINATIONS) { nd6_cached_destination_index = addr_hint; } @@ -1630,16 +1948,18 @@ nd6_get_next_hop_entry(const ip6_addr_t *ip6addr, struct netif *netif) ND6_STATS_INC(nd6.cachehit); } else { /* Search destination cache. */ - i = nd6_find_destination_cache_entry(ip6addr); - if (i >= 0) { + dst_idx = nd6_find_destination_cache_entry(ip6addr); + if (dst_idx >= 0) { /* found destination entry. make it our new cached index. */ - nd6_cached_destination_index = i; + LWIP_ASSERT("type overflow", (size_t)dst_idx < NETIF_ADDR_IDX_MAX); + nd6_cached_destination_index = (netif_addr_idx_t)dst_idx; } else { /* Not found. Create a new destination entry. */ - i = nd6_new_destination_cache_entry(); - if (i >= 0) { + dst_idx = nd6_new_destination_cache_entry(); + if (dst_idx >= 0) { /* got new destination entry. make it our new cached index. */ - nd6_cached_destination_index = i; + LWIP_ASSERT("type overflow", (size_t)dst_idx < NETIF_ADDR_IDX_MAX); + nd6_cached_destination_index = (netif_addr_idx_t)dst_idx; } else { /* Could not create a destination cache entry. */ return ERR_MEM; @@ -1652,7 +1972,7 @@ nd6_get_next_hop_entry(const ip6_addr_t *ip6addr, struct netif *netif) if (ip6_addr_islinklocal(ip6addr) || nd6_is_prefix_in_netif(ip6addr, netif)) { /* Destination in local link. */ - destination_cache[nd6_cached_destination_index].pmtu = netif->mtu; + destination_cache[nd6_cached_destination_index].pmtu = netif_mtu6(netif); ip6_addr_copy(destination_cache[nd6_cached_destination_index].next_hop_addr, destination_cache[nd6_cached_destination_index].destination_addr); #ifdef LWIP_HOOK_ND6_GET_GW } else if ((next_hop_addr = LWIP_HOOK_ND6_GET_GW(netif, ip6addr)) != NULL) { @@ -1668,16 +1988,16 @@ nd6_get_next_hop_entry(const ip6_addr_t *ip6addr, struct netif *netif) ip6_addr_set_any(&(destination_cache[nd6_cached_destination_index].destination_addr)); return ERR_RTE; } - destination_cache[nd6_cached_destination_index].pmtu = netif->mtu; /* Start with netif mtu, correct through ICMPv6 if necessary */ + destination_cache[nd6_cached_destination_index].pmtu = netif_mtu6(netif); /* Start with netif mtu, correct through ICMPv6 if necessary */ ip6_addr_copy(destination_cache[nd6_cached_destination_index].next_hop_addr, default_router_list[i].neighbor_entry->next_hop_address); } } } #if LWIP_NETIF_HWADDRHINT - if (netif->addr_hint != NULL) { + if (netif->hints != NULL) { /* per-pcb cached entry was given */ - *(netif->addr_hint) = nd6_cached_destination_index; + netif->hints->addr_hint = nd6_cached_destination_index; } #endif /* LWIP_NETIF_HWADDRHINT */ @@ -1741,12 +2061,11 @@ nd6_queue_packet(s8_t neighbor_index, struct pbuf *q) return ERR_ARG; } - /* IF q includes a PBUF_REF, PBUF_POOL or PBUF_RAM, we have no choice but - * to copy the whole queue into a new PBUF_RAM (see bug #11400) - * PBUF_ROMs can be left as they are, since ROM must not get changed. */ + /* IF q includes a pbuf that must be copied, we have to copy the whole chain + * into a new PBUF_RAM. See the definition of PBUF_NEEDS_COPY for details. */ p = q; while (p) { - if (p->type != PBUF_ROM) { + if (PBUF_NEEDS_COPY(p)) { copy_needed = 1; break; } @@ -1754,7 +2073,7 @@ nd6_queue_packet(s8_t neighbor_index, struct pbuf *q) } if (copy_needed) { /* copy the whole packet into new pbufs */ - p = pbuf_alloc(PBUF_LINK, q->tot_len, PBUF_RAM); + p = pbuf_clone(PBUF_LINK, PBUF_RAM, q); while ((p == NULL) && (neighbor_cache[neighbor_index].q != NULL)) { /* Free oldest packet (as per RFC recommendation) */ #if LWIP_ND6_QUEUEING @@ -1766,13 +2085,7 @@ nd6_queue_packet(s8_t neighbor_index, struct pbuf *q) pbuf_free(neighbor_cache[neighbor_index].q); neighbor_cache[neighbor_index].q = NULL; #endif /* LWIP_ND6_QUEUEING */ - p = pbuf_alloc(PBUF_LINK, q->tot_len, PBUF_RAM); - } - if (p != NULL) { - if (pbuf_copy(p, q) != ERR_OK) { - pbuf_free(p); - p = NULL; - } + p = pbuf_clone(PBUF_LINK, PBUF_RAM, q); } } else { /* referencing the old pbuf is enough */ @@ -1881,7 +2194,9 @@ nd6_send_q(s8_t i) /* Get ipv6 header. */ ip6hdr = (struct ip6_hdr *)(q->p->payload); /* Create an aligned copy. */ - ip6_addr_set(&dest, &(ip6hdr->dest)); + ip6_addr_copy_from_packed(dest, ip6hdr->dest); + /* Restore the zone, if applicable. */ + ip6_addr_assign_zone(&dest, IP6_UNKNOWN, neighbor_cache[i].netif); /* send the queued IPv6 packet */ (neighbor_cache[i].netif)->output_ip6(neighbor_cache[i].netif, q->p, &dest); /* free the queued IP packet */ @@ -1894,7 +2209,9 @@ nd6_send_q(s8_t i) /* Get ipv6 header. */ ip6hdr = (struct ip6_hdr *)(neighbor_cache[i].q->payload); /* Create an aligned copy. */ - ip6_addr_set(&dest, &(ip6hdr->dest)); + ip6_addr_copy_from_packed(dest, ip6hdr->dest); + /* Restore the zone, if applicable. */ + ip6_addr_assign_zone(&dest, IP6_UNKNOWN, neighbor_cache[i].netif); /* send the queued IPv6 packet */ (neighbor_cache[i].netif)->output_ip6(neighbor_cache[i].netif, neighbor_cache[i].q, &dest); /* free the queued IP packet */ @@ -1970,7 +2287,7 @@ nd6_get_next_hop_addr_or_queue(struct netif *netif, struct pbuf *q, const ip6_ad u16_t nd6_get_destination_mtu(const ip6_addr_t *ip6addr, struct netif *netif) { - s8_t i; + s16_t i; i = nd6_find_destination_cache_entry(ip6addr); if (i >= 0) { @@ -1980,7 +2297,7 @@ nd6_get_destination_mtu(const ip6_addr_t *ip6addr, struct netif *netif) } if (netif != NULL) { - return netif->mtu; + return netif_mtu6(netif); } return 1280; /* Minimum MTU */ @@ -2001,24 +2318,25 @@ void nd6_reachability_hint(const ip6_addr_t *ip6addr) { s8_t i; + s16_t dst_idx; /* Find destination in cache. */ if (ip6_addr_cmp(ip6addr, &(destination_cache[nd6_cached_destination_index].destination_addr))) { - i = nd6_cached_destination_index; + dst_idx = nd6_cached_destination_index; ND6_STATS_INC(nd6.cachehit); } else { - i = nd6_find_destination_cache_entry(ip6addr); + dst_idx = nd6_find_destination_cache_entry(ip6addr); } - if (i < 0) { + if (dst_idx < 0) { return; } /* Find next hop neighbor in cache. */ - if (ip6_addr_cmp(&(destination_cache[i].next_hop_addr), &(neighbor_cache[nd6_cached_neighbor_index].next_hop_address))) { + if (ip6_addr_cmp(&(destination_cache[dst_idx].next_hop_addr), &(neighbor_cache[nd6_cached_neighbor_index].next_hop_address))) { i = nd6_cached_neighbor_index; ND6_STATS_INC(nd6.cachehit); } else { - i = nd6_find_neighbor_cache_entry(&(destination_cache[i].next_hop_addr)); + i = nd6_find_neighbor_cache_entry(&(destination_cache[dst_idx].next_hop_addr)); } if (i < 0) { return; @@ -2048,7 +2366,6 @@ nd6_cleanup_netif(struct netif *netif) for (i = 0; i < LWIP_ND6_NUM_PREFIXES; i++) { if (prefix_list[i].netif == netif) { prefix_list[i].netif = NULL; - prefix_list[i].flags = 0; } } for (i = 0; i < LWIP_ND6_NUM_NEIGHBORS; i++) { @@ -2063,6 +2380,10 @@ nd6_cleanup_netif(struct netif *netif) nd6_free_neighbor_cache_entry(i); } } + /* Clear the destination cache, since many entries may now have become + * invalid for one of several reasons. As destination cache entries have no + * netif association, use a sledgehammer approach (this can be improved). */ + nd6_clear_destination_cache(); } #if LWIP_IPV6_MLD @@ -2084,11 +2405,12 @@ nd6_adjust_mld_membership(struct netif *netif, s8_t addr_idx, u8_t new_state) /* Determine whether we were, and should be, a member of the solicited-node * multicast group for this address. For tentative addresses, the group is * not joined until the address enters the TENTATIVE_1 (or VALID) state. */ - old_member = (old_state != IP6_ADDR_INVALID && old_state != IP6_ADDR_TENTATIVE); - new_member = (new_state != IP6_ADDR_INVALID && new_state != IP6_ADDR_TENTATIVE); + old_member = (old_state != IP6_ADDR_INVALID && old_state != IP6_ADDR_DUPLICATED && old_state != IP6_ADDR_TENTATIVE); + new_member = (new_state != IP6_ADDR_INVALID && new_state != IP6_ADDR_DUPLICATED && new_state != IP6_ADDR_TENTATIVE); if (old_member != new_member) { ip6_addr_set_solicitednode(&multicast_address, netif_ip6_addr(netif, addr_idx)->addr[3]); + ip6_addr_assign_zone(&multicast_address, IP6_MULTICAST, netif); if (new_member) { mld6_joingroup_netif(netif, &multicast_address); @@ -2099,4 +2421,14 @@ nd6_adjust_mld_membership(struct netif *netif, s8_t addr_idx, u8_t new_state) } #endif /* LWIP_IPV6_MLD */ +/** Netif was added, set up, or reconnected (link up) */ +void +nd6_restart_netif(struct netif *netif) +{ +#if LWIP_IPV6_SEND_ROUTER_SOLICIT + /* Send Router Solicitation messages (see RFC 4861, ch. 6.3.7). */ + netif->rs_count = LWIP_ND6_MAX_MULTICAST_SOLICIT; +#endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */ +} + #endif /* LWIP_IPV6 */ diff --git a/Libraries/LwIP/src/core/mem.c b/Libraries/LwIP/src/core/mem.c index 0df6d28..16fd984 100755 --- a/Libraries/LwIP/src/core/mem.c +++ b/Libraries/LwIP/src/core/mem.c @@ -66,6 +66,91 @@ #include /* for malloc()/free() */ #endif +/* This is overridable for tests only... */ +#ifndef LWIP_MEM_ILLEGAL_FREE +#define LWIP_MEM_ILLEGAL_FREE(msg) LWIP_ASSERT(msg, 0) +#endif + +#define MEM_STATS_INC_LOCKED(x) SYS_ARCH_LOCKED(MEM_STATS_INC(x)) +#define MEM_STATS_INC_USED_LOCKED(x, y) SYS_ARCH_LOCKED(MEM_STATS_INC_USED(x, y)) +#define MEM_STATS_DEC_USED_LOCKED(x, y) SYS_ARCH_LOCKED(MEM_STATS_DEC_USED(x, y)) + +#if MEM_OVERFLOW_CHECK +#define MEM_SANITY_OFFSET MEM_SANITY_REGION_BEFORE_ALIGNED +#define MEM_SANITY_OVERHEAD (MEM_SANITY_REGION_BEFORE_ALIGNED + MEM_SANITY_REGION_AFTER_ALIGNED) +#else +#define MEM_SANITY_OFFSET 0 +#define MEM_SANITY_OVERHEAD 0 +#endif + +#if MEM_OVERFLOW_CHECK || MEMP_OVERFLOW_CHECK +/** + * Check if a mep element was victim of an overflow or underflow + * (e.g. the restricted area after/before it has been altered) + * + * @param p the mem element to check + * @param size allocated size of the element + * @param descr1 description of the element source shown on error + * @param descr2 description of the element source shown on error + */ +void +mem_overflow_check_raw(void *p, size_t size, const char *descr1, const char *descr2) +{ +#if MEM_SANITY_REGION_AFTER_ALIGNED || MEM_SANITY_REGION_BEFORE_ALIGNED + u16_t k; + u8_t *m; + +#if MEM_SANITY_REGION_AFTER_ALIGNED > 0 + m = (u8_t *)p + size; + for (k = 0; k < MEM_SANITY_REGION_AFTER_ALIGNED; k++) { + if (m[k] != 0xcd) { + char errstr[128]; + snprintf(errstr, sizeof(errstr), "detected mem overflow in %s%s", descr1, descr2); + LWIP_ASSERT(errstr, 0); + } + } +#endif /* MEM_SANITY_REGION_AFTER_ALIGNED > 0 */ + +#if MEM_SANITY_REGION_BEFORE_ALIGNED > 0 + m = (u8_t *)p - MEM_SANITY_REGION_BEFORE_ALIGNED; + for (k = 0; k < MEM_SANITY_REGION_BEFORE_ALIGNED; k++) { + if (m[k] != 0xcd) { + char errstr[128]; + snprintf(errstr, sizeof(errstr), "detected mem underflow in %s%s", descr1, descr2); + LWIP_ASSERT(errstr, 0); + } + } +#endif /* MEM_SANITY_REGION_BEFORE_ALIGNED > 0 */ +#else + LWIP_UNUSED_ARG(p); + LWIP_UNUSED_ARG(desc); + LWIP_UNUSED_ARG(descr); +#endif +} + +/** + * Initialize the restricted area of a mem element. + */ +void +mem_overflow_init_raw(void *p, size_t size) +{ +#if MEM_SANITY_REGION_BEFORE_ALIGNED > 0 || MEM_SANITY_REGION_AFTER_ALIGNED > 0 + u8_t *m; +#if MEM_SANITY_REGION_BEFORE_ALIGNED > 0 + m = (u8_t *)p - MEM_SANITY_REGION_BEFORE_ALIGNED; + memset(m, 0xcd, MEM_SANITY_REGION_BEFORE_ALIGNED); +#endif +#if MEM_SANITY_REGION_AFTER_ALIGNED > 0 + m = (u8_t *)p + size; + memset(m, 0xcd, MEM_SANITY_REGION_AFTER_ALIGNED); +#endif +#else /* MEM_SANITY_REGION_BEFORE_ALIGNED > 0 || MEM_SANITY_REGION_AFTER_ALIGNED > 0 */ + LWIP_UNUSED_ARG(p); + LWIP_UNUSED_ARG(desc); +#endif /* MEM_SANITY_REGION_BEFORE_ALIGNED > 0 || MEM_SANITY_REGION_AFTER_ALIGNED > 0 */ +} +#endif /* MEM_OVERFLOW_CHECK || MEMP_OVERFLOW_CHECK */ + #if MEM_LIBC_MALLOC || MEM_USE_POOLS /** mem_init is not used when using pools instead of a heap or using @@ -80,7 +165,7 @@ mem_init(void) * C library malloc(): we can't free part of a pool element and the stack * support mem_trim() to return a different pointer */ -void* +void * mem_trim(void *mem, mem_size_t size) { LWIP_UNUSED_ARG(size); @@ -121,15 +206,15 @@ mem_trim(void *mem, mem_size_t size) void * mem_malloc(mem_size_t size) { - void* ret = mem_clib_malloc(size + MEM_LIBC_STATSHELPER_SIZE); + void *ret = mem_clib_malloc(size + MEM_LIBC_STATSHELPER_SIZE); if (ret == NULL) { - MEM_STATS_INC(err); + MEM_STATS_INC_LOCKED(err); } else { LWIP_ASSERT("malloc() must return aligned memory", LWIP_MEM_ALIGN(ret) == ret); #if LWIP_STATS && MEM_STATS - *(mem_size_t*)ret = size; - ret = (u8_t*)ret + MEM_LIBC_STATSHELPER_SIZE; - MEM_STATS_INC_USED(used, size); + *(mem_size_t *)ret = size; + ret = (u8_t *)ret + MEM_LIBC_STATSHELPER_SIZE; + MEM_STATS_INC_USED_LOCKED(used, size); #endif } return ret; @@ -145,8 +230,8 @@ mem_free(void *rmem) LWIP_ASSERT("rmem != NULL", (rmem != NULL)); LWIP_ASSERT("rmem == MEM_ALIGN(rmem)", (rmem == LWIP_MEM_ALIGN(rmem))); #if LWIP_STATS && MEM_STATS - rmem = (u8_t*)rmem - MEM_LIBC_STATSHELPER_SIZE; - MEM_STATS_DEC_USED(used, *(mem_size_t*)rmem); + rmem = (u8_t *)rmem - MEM_LIBC_STATSHELPER_SIZE; + MEM_STATS_DEC_USED_LOCKED(used, *(mem_size_t *)rmem); #endif mem_clib_free(rmem); } @@ -174,7 +259,7 @@ mem_malloc(mem_size_t size) /* is this pool big enough to hold an element of the required size plus a struct memp_malloc_helper that saves the pool this element came from? */ if (required_size <= memp_pools[poolnr]->size) { - element = (struct memp_malloc_helper*)memp_malloc(poolnr); + element = (struct memp_malloc_helper *)memp_malloc(poolnr); if (element == NULL) { /* No need to DEBUGF or ASSERT: This error is already taken care of in memp.c */ #if MEM_USE_POOLS_TRY_BIGGER_POOL @@ -183,7 +268,7 @@ mem_malloc(mem_size_t size) continue; } #endif /* MEM_USE_POOLS_TRY_BIGGER_POOL */ - MEM_STATS_INC(err); + MEM_STATS_INC_LOCKED(err); return NULL; } break; @@ -191,23 +276,23 @@ mem_malloc(mem_size_t size) } if (poolnr > MEMP_POOL_LAST) { LWIP_ASSERT("mem_malloc(): no pool is that big!", 0); - MEM_STATS_INC(err); + MEM_STATS_INC_LOCKED(err); return NULL; } /* save the pool number this element came from */ element->poolnr = poolnr; /* and return a pointer to the memory directly after the struct memp_malloc_helper */ - ret = (u8_t*)element + LWIP_MEM_ALIGN_SIZE(sizeof(struct memp_malloc_helper)); + ret = (u8_t *)element + LWIP_MEM_ALIGN_SIZE(sizeof(struct memp_malloc_helper)); #if MEMP_OVERFLOW_CHECK || (LWIP_STATS && MEM_STATS) /* truncating to u16_t is safe because struct memp_desc::size is u16_t */ element->size = (u16_t)size; - MEM_STATS_INC_USED(used, element->size); + MEM_STATS_INC_USED_LOCKED(used, element->size); #endif /* MEMP_OVERFLOW_CHECK || (LWIP_STATS && MEM_STATS) */ #if MEMP_OVERFLOW_CHECK /* initialize unused memory (diff between requested size and selected pool's size) */ - memset((u8_t*)ret + size, 0xcd, memp_pools[poolnr]->size - size); + memset((u8_t *)ret + size, 0xcd, memp_pools[poolnr]->size - size); #endif /* MEMP_OVERFLOW_CHECK */ return ret; } @@ -229,23 +314,23 @@ mem_free(void *rmem) /* get the original struct memp_malloc_helper */ /* cast through void* to get rid of alignment warnings */ - hmem = (struct memp_malloc_helper*)(void*)((u8_t*)rmem - LWIP_MEM_ALIGN_SIZE(sizeof(struct memp_malloc_helper))); + hmem = (struct memp_malloc_helper *)(void *)((u8_t *)rmem - LWIP_MEM_ALIGN_SIZE(sizeof(struct memp_malloc_helper))); LWIP_ASSERT("hmem != NULL", (hmem != NULL)); LWIP_ASSERT("hmem == MEM_ALIGN(hmem)", (hmem == LWIP_MEM_ALIGN(hmem))); LWIP_ASSERT("hmem->poolnr < MEMP_MAX", (hmem->poolnr < MEMP_MAX)); - MEM_STATS_DEC_USED(used, hmem->size); + MEM_STATS_DEC_USED_LOCKED(used, hmem->size); #if MEMP_OVERFLOW_CHECK { - u16_t i; - LWIP_ASSERT("MEM_USE_POOLS: invalid chunk size", - hmem->size <= memp_pools[hmem->poolnr]->size); - /* check that unused memory remained untouched (diff between requested size and selected pool's size) */ - for (i = hmem->size; i < memp_pools[hmem->poolnr]->size; i++) { - u8_t data = *((u8_t*)rmem + i); - LWIP_ASSERT("MEM_USE_POOLS: mem overflow detected", data == 0xcd); - } + u16_t i; + LWIP_ASSERT("MEM_USE_POOLS: invalid chunk size", + hmem->size <= memp_pools[hmem->poolnr]->size); + /* check that unused memory remained untouched (diff between requested size and selected pool's size) */ + for (i = hmem->size; i < memp_pools[hmem->poolnr]->size; i++) { + u8_t data = *((u8_t *)rmem + i); + LWIP_ASSERT("MEM_USE_POOLS: mem overflow detected", data == 0xcd); + } } #endif /* MEMP_OVERFLOW_CHECK */ @@ -268,6 +353,10 @@ struct mem { mem_size_t prev; /** 1: this area is used; 0: this area is unused */ u8_t used; +#if MEM_OVERFLOW_CHECK + /** this keeps track of the user allocation size for guard checks */ + mem_size_t user_size; +#endif }; /** All allocated blocks will be MIN_SIZE bytes big, at least! @@ -287,7 +376,7 @@ struct mem { * how that space is calculated). */ #ifndef LWIP_RAM_HEAP_POINTER /** the heap. we need one struct mem at the end and some room for alignment */ -LWIP_DECLARE_MEMORY_ALIGNED(ram_heap, MEM_SIZE_ALIGNED + (2U*SIZEOF_STRUCT_MEM)); +LWIP_DECLARE_MEMORY_ALIGNED(ram_heap, MEM_SIZE_ALIGNED + (2U * SIZEOF_STRUCT_MEM)); #define LWIP_RAM_HEAP_POINTER ram_heap #endif /* LWIP_RAM_HEAP_POINTER */ @@ -295,8 +384,6 @@ LWIP_DECLARE_MEMORY_ALIGNED(ram_heap, MEM_SIZE_ALIGNED + (2U*SIZEOF_STRUCT_MEM)) static u8_t *ram; /** the last entry, always unused! */ static struct mem *ram_end; -/** pointer to the lowest free block, this is used for faster search */ -static struct mem *lfree; /** concurrent access protection */ #if !NO_SYS @@ -314,20 +401,63 @@ static volatile u8_t mem_free_count; #define LWIP_MEM_ALLOC_DECL_PROTECT() SYS_ARCH_DECL_PROTECT(lev_alloc) #define LWIP_MEM_ALLOC_PROTECT() SYS_ARCH_PROTECT(lev_alloc) #define LWIP_MEM_ALLOC_UNPROTECT() SYS_ARCH_UNPROTECT(lev_alloc) +#define LWIP_MEM_LFREE_VOLATILE volatile #else /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ -/* Protect the heap only by using a semaphore */ +/* Protect the heap only by using a mutex */ #define LWIP_MEM_FREE_DECL_PROTECT() #define LWIP_MEM_FREE_PROTECT() sys_mutex_lock(&mem_mutex) #define LWIP_MEM_FREE_UNPROTECT() sys_mutex_unlock(&mem_mutex) -/* mem_malloc is protected using semaphore AND LWIP_MEM_ALLOC_PROTECT */ +/* mem_malloc is protected using mutex AND LWIP_MEM_ALLOC_PROTECT */ #define LWIP_MEM_ALLOC_DECL_PROTECT() #define LWIP_MEM_ALLOC_PROTECT() #define LWIP_MEM_ALLOC_UNPROTECT() +#define LWIP_MEM_LFREE_VOLATILE #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ +/** pointer to the lowest free block, this is used for faster search */ +static struct mem * LWIP_MEM_LFREE_VOLATILE lfree; + +#if MEM_SANITY_CHECK +static void mem_sanity(void); +#define MEM_SANITY() mem_sanity() +#else +#define MEM_SANITY() +#endif + +#if MEM_OVERFLOW_CHECK +static void +mem_overflow_init_element(struct mem *mem, mem_size_t user_size) +{ + void *p = (u8_t *)mem + SIZEOF_STRUCT_MEM + MEM_SANITY_OFFSET; + mem->user_size = user_size; + mem_overflow_init_raw(p, user_size); +} + +static void +mem_overflow_check_element(struct mem *mem) +{ + void *p = (u8_t *)mem + SIZEOF_STRUCT_MEM + MEM_SANITY_OFFSET; + mem_overflow_check_raw(p, mem->user_size, "heap", ""); +} +#else /* MEM_OVERFLOW_CHECK */ +#define mem_overflow_init_element(mem, size) +#define mem_overflow_check_element(mem) +#endif /* MEM_OVERFLOW_CHECK */ + +static struct mem * +ptr_to_mem(mem_size_t ptr) +{ + return (struct mem *)(void *)&ram[ptr]; +} + +static mem_size_t +mem_to_ptr(void *mem) +{ + return (mem_size_t)((u8_t *)mem - ram); +} /** * "Plug holes" by combining adjacent empty struct mems. @@ -353,25 +483,29 @@ plug_holes(struct mem *mem) /* plug hole forward */ LWIP_ASSERT("plug_holes: mem->next <= MEM_SIZE_ALIGNED", mem->next <= MEM_SIZE_ALIGNED); - nmem = (struct mem *)(void *)&ram[mem->next]; + nmem = ptr_to_mem(mem->next); if (mem != nmem && nmem->used == 0 && (u8_t *)nmem != (u8_t *)ram_end) { /* if mem->next is unused and not end of ram, combine mem and mem->next */ if (lfree == nmem) { lfree = mem; } mem->next = nmem->next; - ((struct mem *)(void *)&ram[nmem->next])->prev = (mem_size_t)((u8_t *)mem - ram); + if (nmem->next != MEM_SIZE_ALIGNED) { + ptr_to_mem(nmem->next)->prev = mem_to_ptr(mem); + } } /* plug hole backward */ - pmem = (struct mem *)(void *)&ram[mem->prev]; + pmem = ptr_to_mem(mem->prev); if (pmem != mem && pmem->used == 0) { /* if mem->prev is unused, combine mem and mem->prev */ if (lfree == mem) { lfree = pmem; } pmem->next = mem->next; - ((struct mem *)(void *)&ram[mem->next])->prev = (mem_size_t)((u8_t *)pmem - ram); + if (mem->next != MEM_SIZE_ALIGNED) { + ptr_to_mem(mem->next)->prev = mem_to_ptr(pmem); + } } } @@ -384,7 +518,7 @@ mem_init(void) struct mem *mem; LWIP_ASSERT("Sanity check alignment", - (SIZEOF_STRUCT_MEM & (MEM_ALIGNMENT-1)) == 0); + (SIZEOF_STRUCT_MEM & (MEM_ALIGNMENT - 1)) == 0); /* align the heap */ ram = (u8_t *)LWIP_MEM_ALIGN(LWIP_RAM_HEAP_POINTER); @@ -394,10 +528,11 @@ mem_init(void) mem->prev = 0; mem->used = 0; /* initialize the end of the heap */ - ram_end = (struct mem *)(void *)&ram[MEM_SIZE_ALIGNED]; + ram_end = ptr_to_mem(MEM_SIZE_ALIGNED); ram_end->used = 1; ram_end->next = MEM_SIZE_ALIGNED; ram_end->prev = MEM_SIZE_ALIGNED; + MEM_SANITY(); /* initialize the lowest-free pointer to the start of the heap */ lfree = (struct mem *)(void *)ram; @@ -409,6 +544,69 @@ mem_init(void) } } +/* Check if a struct mem is correctly linked. + * If not, double-free is a possible reason. + */ +static int +mem_link_valid(struct mem *mem) +{ + struct mem *nmem, *pmem; + mem_size_t rmem_idx; + rmem_idx = mem_to_ptr(mem); + nmem = ptr_to_mem(mem->next); + pmem = ptr_to_mem(mem->prev); + if ((mem->next > MEM_SIZE_ALIGNED) || (mem->prev > MEM_SIZE_ALIGNED) || + ((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) || + ((nmem != ram_end) && (nmem->prev != rmem_idx))) { + return 0; + } + return 1; +} + +#if MEM_SANITY_CHECK +static void +mem_sanity(void) +{ + struct mem *mem; + u8_t last_used; + + /* begin with first element here */ + mem = (struct mem *)ram; + LWIP_ASSERT("heap element used valid", (mem->used == 0) || (mem->used == 1)); + last_used = mem->used; + LWIP_ASSERT("heap element prev ptr valid", mem->prev == 0); + LWIP_ASSERT("heap element next ptr valid", mem->next <= MEM_SIZE_ALIGNED); + LWIP_ASSERT("heap element next ptr aligned", LWIP_MEM_ALIGN(ptr_to_mem(mem->next) == ptr_to_mem(mem->next))); + + /* check all elements before the end of the heap */ + for (mem = ptr_to_mem(mem->next); + ((u8_t *)mem > ram) && (mem < ram_end); + mem = ptr_to_mem(mem->next)) { + LWIP_ASSERT("heap element aligned", LWIP_MEM_ALIGN(mem) == mem); + LWIP_ASSERT("heap element prev ptr valid", mem->prev <= MEM_SIZE_ALIGNED); + LWIP_ASSERT("heap element next ptr valid", mem->next <= MEM_SIZE_ALIGNED); + LWIP_ASSERT("heap element prev ptr aligned", LWIP_MEM_ALIGN(ptr_to_mem(mem->prev) == ptr_to_mem(mem->prev))); + LWIP_ASSERT("heap element next ptr aligned", LWIP_MEM_ALIGN(ptr_to_mem(mem->next) == ptr_to_mem(mem->next))); + + if (last_used == 0) { + /* 2 unused elements in a row? */ + LWIP_ASSERT("heap element unused?", mem->used == 1); + } else { + LWIP_ASSERT("heap element unused member", (mem->used == 0) || (mem->used == 1)); + } + + LWIP_ASSERT("heap element link valid", mem_link_valid(mem)); + + /* used/unused altering */ + last_used = mem->used; + } + LWIP_ASSERT("heap end ptr sanity", mem == ptr_to_mem(MEM_SIZE_ALIGNED)); + LWIP_ASSERT("heap element used valid", mem->used == 1); + LWIP_ASSERT("heap element prev ptr valid", mem->prev == MEM_SIZE_ALIGNED); + LWIP_ASSERT("heap element next ptr valid", mem->next == MEM_SIZE_ALIGNED); +} +#endif /* MEM_SANITY_CHECK */ + /** * Put a struct mem back on the heap * @@ -425,28 +623,50 @@ mem_free(void *rmem) LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("mem_free(p == NULL) was called.\n")); return; } - LWIP_ASSERT("mem_free: sanity check alignment", (((mem_ptr_t)rmem) & (MEM_ALIGNMENT-1)) == 0); - - LWIP_ASSERT("mem_free: legal memory", (u8_t *)rmem >= (u8_t *)ram && - (u8_t *)rmem < (u8_t *)ram_end); - - if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) { - SYS_ARCH_DECL_PROTECT(lev); - LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: illegal memory\n")); + if ((((mem_ptr_t)rmem) & (MEM_ALIGNMENT - 1)) != 0) { + LWIP_MEM_ILLEGAL_FREE("mem_free: sanity check alignment"); + LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: sanity check alignment\n")); /* protect mem stats from concurrent access */ - SYS_ARCH_PROTECT(lev); - MEM_STATS_INC(illegal); - SYS_ARCH_UNPROTECT(lev); + MEM_STATS_INC_LOCKED(illegal); return; } + + /* Get the corresponding struct mem: */ + /* cast through void* to get rid of alignment warnings */ + mem = (struct mem *)(void *)((u8_t *)rmem - (SIZEOF_STRUCT_MEM + MEM_SANITY_OFFSET)); + + if ((u8_t *)mem < ram || (u8_t *)rmem + MIN_SIZE_ALIGNED > (u8_t *)ram_end) { + LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory"); + LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: illegal memory\n")); + /* protect mem stats from concurrent access */ + MEM_STATS_INC_LOCKED(illegal); + return; + } +#if MEM_OVERFLOW_CHECK + mem_overflow_check_element(mem); +#endif /* protect the heap from concurrent access */ LWIP_MEM_FREE_PROTECT(); - /* Get the corresponding struct mem ... */ - /* cast through void* to get rid of alignment warnings */ - mem = (struct mem *)(void *)((u8_t *)rmem - SIZEOF_STRUCT_MEM); - /* ... which has to be in a used state ... */ - LWIP_ASSERT("mem_free: mem->used", mem->used); - /* ... and is now unused. */ + /* mem has to be in a used state */ + if (!mem->used) { + LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory: double free"); + LWIP_MEM_FREE_UNPROTECT(); + LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: illegal memory: double free?\n")); + /* protect mem stats from concurrent access */ + MEM_STATS_INC_LOCKED(illegal); + return; + } + + if (!mem_link_valid(mem)) { + LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory: non-linked: double free"); + LWIP_MEM_FREE_UNPROTECT(); + LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: illegal memory: non-linked: double free?\n")); + /* protect mem stats from concurrent access */ + MEM_STATS_INC_LOCKED(illegal); + return; + } + + /* mem is now unused. */ mem->used = 0; if (mem < lfree) { @@ -458,6 +678,7 @@ mem_free(void *rmem) /* finally, see if prev or next are free also */ plug_holes(mem); + MEM_SANITY(); #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT mem_free_count = 1; #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ @@ -468,16 +689,16 @@ mem_free(void *rmem) * Shrink memory returned by mem_malloc(). * * @param rmem pointer to memory allocated by mem_malloc the is to be shrinked - * @param newsize required size after shrinking (needs to be smaller than or + * @param new_size required size after shrinking (needs to be smaller than or * equal to the previous size) * @return for compatibility reasons: is always == rmem, at the moment * or NULL if newsize is > old size, in which case rmem is NOT touched * or freed! */ void * -mem_trim(void *rmem, mem_size_t newsize) +mem_trim(void *rmem, mem_size_t new_size) { - mem_size_t size; + mem_size_t size, newsize; mem_size_t ptr, ptr2; struct mem *mem, *mem2; /* use the FREE_PROTECT here: it protects with sem OR SYS_ARCH_PROTECT */ @@ -485,36 +706,37 @@ mem_trim(void *rmem, mem_size_t newsize) /* Expand the size of the allocated memory region so that we can adjust for alignment. */ - newsize = LWIP_MEM_ALIGN_SIZE(newsize); - + newsize = (mem_size_t)LWIP_MEM_ALIGN_SIZE(new_size); if (newsize < MIN_SIZE_ALIGNED) { /* every data block must be at least MIN_SIZE_ALIGNED long */ newsize = MIN_SIZE_ALIGNED; } - - if (newsize > MEM_SIZE_ALIGNED) { +#if MEM_OVERFLOW_CHECK + newsize += MEM_SANITY_REGION_BEFORE_ALIGNED + MEM_SANITY_REGION_AFTER_ALIGNED; +#endif + if ((newsize > MEM_SIZE_ALIGNED) || (newsize < new_size)) { return NULL; } LWIP_ASSERT("mem_trim: legal memory", (u8_t *)rmem >= (u8_t *)ram && - (u8_t *)rmem < (u8_t *)ram_end); + (u8_t *)rmem < (u8_t *)ram_end); if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) { - SYS_ARCH_DECL_PROTECT(lev); LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_trim: illegal memory\n")); /* protect mem stats from concurrent access */ - SYS_ARCH_PROTECT(lev); - MEM_STATS_INC(illegal); - SYS_ARCH_UNPROTECT(lev); + MEM_STATS_INC_LOCKED(illegal); return rmem; } /* Get the corresponding struct mem ... */ /* cast through void* to get rid of alignment warnings */ - mem = (struct mem *)(void *)((u8_t *)rmem - SIZEOF_STRUCT_MEM); + mem = (struct mem *)(void *)((u8_t *)rmem - (SIZEOF_STRUCT_MEM + MEM_SANITY_OFFSET)); +#if MEM_OVERFLOW_CHECK + mem_overflow_check_element(mem); +#endif /* ... and its offset pointer */ - ptr = (mem_size_t)((u8_t *)mem - ram); + ptr = mem_to_ptr(mem); - size = mem->next - ptr - SIZEOF_STRUCT_MEM; + size = (mem_size_t)((mem_size_t)(mem->next - ptr) - (SIZEOF_STRUCT_MEM + MEM_SANITY_OVERHEAD)); LWIP_ASSERT("mem_trim can only shrink memory", newsize <= size); if (newsize > size) { /* not supported */ @@ -528,18 +750,19 @@ mem_trim(void *rmem, mem_size_t newsize) /* protect the heap from concurrent access */ LWIP_MEM_FREE_PROTECT(); - mem2 = (struct mem *)(void *)&ram[mem->next]; + mem2 = ptr_to_mem(mem->next); if (mem2->used == 0) { /* The next struct is unused, we can simply move it at little */ mem_size_t next; + LWIP_ASSERT("invalid next ptr", mem->next != MEM_SIZE_ALIGNED); /* remember the old next pointer */ next = mem2->next; /* create new struct mem which is moved directly after the shrinked mem */ - ptr2 = ptr + SIZEOF_STRUCT_MEM + newsize; + ptr2 = (mem_size_t)(ptr + SIZEOF_STRUCT_MEM + newsize); if (lfree == mem2) { - lfree = (struct mem *)(void *)&ram[ptr2]; + lfree = ptr_to_mem(ptr2); } - mem2 = (struct mem *)(void *)&ram[ptr2]; + mem2 = ptr_to_mem(ptr2); mem2->used = 0; /* restore the next pointer */ mem2->next = next; @@ -551,7 +774,7 @@ mem_trim(void *rmem, mem_size_t newsize) * let 'mem2->next->prev' point to mem2 again. but only if mem2->next is not * the end of the heap */ if (mem2->next != MEM_SIZE_ALIGNED) { - ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; + ptr_to_mem(mem2->next)->prev = ptr2; } MEM_STATS_DEC_USED(used, (size - newsize)); /* no need to plug holes, we've already done that */ @@ -563,8 +786,9 @@ mem_trim(void *rmem, mem_size_t newsize) * @todo we could leave out MIN_SIZE_ALIGNED. We would create an empty * region that couldn't hold data, but when mem->next gets freed, * the 2 regions would be combined, resulting in more free memory */ - ptr2 = ptr + SIZEOF_STRUCT_MEM + newsize; - mem2 = (struct mem *)(void *)&ram[ptr2]; + ptr2 = (mem_size_t)(ptr + SIZEOF_STRUCT_MEM + newsize); + LWIP_ASSERT("invalid next ptr", mem->next != MEM_SIZE_ALIGNED); + mem2 = ptr_to_mem(ptr2); if (mem2 < lfree) { lfree = mem2; } @@ -573,7 +797,7 @@ mem_trim(void *rmem, mem_size_t newsize) mem2->prev = ptr; mem->next = ptr2; if (mem2->next != MEM_SIZE_ALIGNED) { - ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; + ptr_to_mem(mem2->next)->prev = ptr2; } MEM_STATS_DEC_USED(used, (size - newsize)); /* the original mem->next is used, so no need to plug holes! */ @@ -584,6 +808,10 @@ mem_trim(void *rmem, mem_size_t newsize) -> don't do anyhting. -> the remaining space stays unused since it is too small } */ +#if MEM_OVERFLOW_CHECK + mem_overflow_init_element(mem, new_size); +#endif + MEM_SANITY(); #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT mem_free_count = 1; #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ @@ -594,35 +822,36 @@ mem_trim(void *rmem, mem_size_t newsize) /** * Allocate a block of memory with a minimum of 'size' bytes. * - * @param size is the minimum size of the requested block in bytes. + * @param size_in is the minimum size of the requested block in bytes. * @return pointer to allocated memory or NULL if no free memory was found. * * Note that the returned value will always be aligned (as defined by MEM_ALIGNMENT). */ void * -mem_malloc(mem_size_t size) +mem_malloc(mem_size_t size_in) { - mem_size_t ptr, ptr2; + mem_size_t ptr, ptr2, size; struct mem *mem, *mem2; #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT u8_t local_mem_free_count = 0; #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ LWIP_MEM_ALLOC_DECL_PROTECT(); - if (size == 0) { + if (size_in == 0) { return NULL; } /* Expand the size of the allocated memory region so that we can adjust for alignment. */ - size = LWIP_MEM_ALIGN_SIZE(size); - + size = (mem_size_t)LWIP_MEM_ALIGN_SIZE(size_in); if (size < MIN_SIZE_ALIGNED) { /* every data block must be at least MIN_SIZE_ALIGNED long */ size = MIN_SIZE_ALIGNED; } - - if (size > MEM_SIZE_ALIGNED) { +#if MEM_OVERFLOW_CHECK + size += MEM_SANITY_REGION_BEFORE_ALIGNED + MEM_SANITY_REGION_AFTER_ALIGNED; +#endif + if ((size > MEM_SIZE_ALIGNED) || (size < size_in)) { return NULL; } @@ -638,9 +867,9 @@ mem_malloc(mem_size_t size) /* Scan through the heap searching for a free block that is big enough, * beginning with the lowest free block. */ - for (ptr = (mem_size_t)((u8_t *)lfree - ram); ptr < MEM_SIZE_ALIGNED - size; - ptr = ((struct mem *)(void *)&ram[ptr])->next) { - mem = (struct mem *)(void *)&ram[ptr]; + for (ptr = mem_to_ptr(lfree); ptr < MEM_SIZE_ALIGNED - size; + ptr = ptr_to_mem(ptr)->next) { + mem = ptr_to_mem(ptr); #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT mem_free_count = 0; LWIP_MEM_ALLOC_UNPROTECT(); @@ -670,9 +899,10 @@ mem_malloc(mem_size_t size) * region that couldn't hold data, but when mem->next gets freed, * the 2 regions would be combined, resulting in more free memory */ - ptr2 = ptr + SIZEOF_STRUCT_MEM + size; + ptr2 = (mem_size_t)(ptr + SIZEOF_STRUCT_MEM + size); + LWIP_ASSERT("invalid next ptr",ptr2 != MEM_SIZE_ALIGNED); /* create mem2 struct */ - mem2 = (struct mem *)(void *)&ram[ptr2]; + mem2 = ptr_to_mem(ptr2); mem2->used = 0; mem2->next = mem->next; mem2->prev = ptr; @@ -681,7 +911,7 @@ mem_malloc(mem_size_t size) mem->used = 1; if (mem2->next != MEM_SIZE_ALIGNED) { - ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; + ptr_to_mem(mem2->next)->prev = ptr2; } MEM_STATS_INC_USED(used, (size + SIZEOF_STRUCT_MEM)); } else { @@ -693,7 +923,7 @@ mem_malloc(mem_size_t size) * will always be used at this point! */ mem->used = 1; - MEM_STATS_INC_USED(used, mem->next - (mem_size_t)((u8_t *)mem - ram)); + MEM_STATS_INC_USED(used, mem->next - mem_to_ptr(mem)); } #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT mem_malloc_adjust_lfree: @@ -713,7 +943,7 @@ mem_malloc_adjust_lfree: goto mem_malloc_adjust_lfree; } #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ - cur = (struct mem *)(void *)&ram[cur->next]; + cur = ptr_to_mem(cur->next); } lfree = cur; LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used))); @@ -721,23 +951,27 @@ mem_malloc_adjust_lfree: LWIP_MEM_ALLOC_UNPROTECT(); sys_mutex_unlock(&mem_mutex); LWIP_ASSERT("mem_malloc: allocated memory not above ram_end.", - (mem_ptr_t)mem + SIZEOF_STRUCT_MEM + size <= (mem_ptr_t)ram_end); + (mem_ptr_t)mem + SIZEOF_STRUCT_MEM + size <= (mem_ptr_t)ram_end); LWIP_ASSERT("mem_malloc: allocated memory properly aligned.", - ((mem_ptr_t)mem + SIZEOF_STRUCT_MEM) % MEM_ALIGNMENT == 0); + ((mem_ptr_t)mem + SIZEOF_STRUCT_MEM) % MEM_ALIGNMENT == 0); LWIP_ASSERT("mem_malloc: sanity check alignment", - (((mem_ptr_t)mem) & (MEM_ALIGNMENT-1)) == 0); + (((mem_ptr_t)mem) & (MEM_ALIGNMENT - 1)) == 0); - return (u8_t *)mem + SIZEOF_STRUCT_MEM; +#if MEM_OVERFLOW_CHECK + mem_overflow_init_element(mem, size_in); +#endif + MEM_SANITY(); + return (u8_t *)mem + SIZEOF_STRUCT_MEM + MEM_SANITY_OFFSET; } } #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT /* if we got interrupted by a mem_free, try again */ } while (local_mem_free_count != 0); #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ - LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("mem_malloc: could not allocate %"S16_F" bytes\n", (s16_t)size)); MEM_STATS_INC(err); LWIP_MEM_ALLOC_UNPROTECT(); sys_mutex_unlock(&mem_mutex); + LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("mem_malloc: could not allocate %"S16_F" bytes\n", (s16_t)size)); return NULL; } @@ -765,12 +999,18 @@ void * mem_calloc(mem_size_t count, mem_size_t size) { void *p; + size_t alloc_size = (size_t)count * (size_t)size; + + if ((size_t)(mem_size_t)alloc_size != alloc_size) { + LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("mem_calloc: could not allocate %"SZT_F" bytes\n", alloc_size)); + return NULL; + } /* allocate 'count' objects of size 'size' */ - p = mem_malloc(count * size); + p = mem_malloc((mem_size_t)alloc_size); if (p) { /* zero the memory */ - memset(p, 0, (size_t)count * (size_t)size); + memset(p, 0, alloc_size); } return p; } diff --git a/Libraries/LwIP/src/core/memp.c b/Libraries/LwIP/src/core/memp.c index 727a0c2..18771f6 100755 --- a/Libraries/LwIP/src/core/memp.c +++ b/Libraries/LwIP/src/core/memp.c @@ -57,13 +57,13 @@ #include "lwip/udp.h" #include "lwip/tcp.h" #include "lwip/priv/tcp_priv.h" +#include "lwip/altcp.h" #include "lwip/ip4_frag.h" #include "lwip/netbuf.h" #include "lwip/api.h" #include "lwip/priv/tcpip_priv.h" #include "lwip/priv/api_msg.h" -#include "lwip/sockets.h" -#include "lwip/netifapi.h" +#include "lwip/priv/sockets_priv.h" #include "lwip/etharp.h" #include "lwip/igmp.h" #include "lwip/timeouts.h" @@ -78,7 +78,7 @@ #define LWIP_MEMPOOL(name,num,size,desc) LWIP_MEMPOOL_DECLARE(name,num,size,desc) #include "lwip/priv/memp_std.h" -const struct memp_desc* const memp_pools[MEMP_MAX] = { +const struct memp_desc *const memp_pools[MEMP_MAX] = { #define LWIP_MEMPOOL(name,num,size,desc) &memp_ ## name, #include "lwip/priv/memp_std.h" }; @@ -105,7 +105,7 @@ memp_sanity(const struct memp_desc *desc) t = *desc->tab; if (t != NULL) { for (h = t->next; (t != NULL) && (h != NULL); t = t->next, - h = ((h->next != NULL) ? h->next->next : NULL)) { + h = ((h->next != NULL) ? h->next->next : NULL)) { if (t == h) { return 0; } @@ -118,57 +118,16 @@ memp_sanity(const struct memp_desc *desc) #if MEMP_OVERFLOW_CHECK /** - * Check if a memp element was victim of an overflow - * (e.g. the restricted area after it has been altered) + * Check if a memp element was victim of an overflow or underflow + * (e.g. the restricted area after/before it has been altered) * * @param p the memp element to check * @param desc the pool p comes from */ static void -memp_overflow_check_element_overflow(struct memp *p, const struct memp_desc *desc) +memp_overflow_check_element(struct memp *p, const struct memp_desc *desc) { -#if MEMP_SANITY_REGION_AFTER_ALIGNED > 0 - u16_t k; - u8_t *m; - m = (u8_t*)p + MEMP_SIZE + desc->size; - for (k = 0; k < MEMP_SANITY_REGION_AFTER_ALIGNED; k++) { - if (m[k] != 0xcd) { - char errstr[128] = "detected memp overflow in pool "; - strcat(errstr, desc->desc); - LWIP_ASSERT(errstr, 0); - } - } -#else /* MEMP_SANITY_REGION_AFTER_ALIGNED > 0 */ - LWIP_UNUSED_ARG(p); - LWIP_UNUSED_ARG(desc); -#endif /* MEMP_SANITY_REGION_AFTER_ALIGNED > 0 */ -} - -/** - * Check if a memp element was victim of an underflow - * (e.g. the restricted area before it has been altered) - * - * @param p the memp element to check - * @param desc the pool p comes from - */ -static void -memp_overflow_check_element_underflow(struct memp *p, const struct memp_desc *desc) -{ -#if MEMP_SANITY_REGION_BEFORE_ALIGNED > 0 - u16_t k; - u8_t *m; - m = (u8_t*)p + MEMP_SIZE - MEMP_SANITY_REGION_BEFORE_ALIGNED; - for (k = 0; k < MEMP_SANITY_REGION_BEFORE_ALIGNED; k++) { - if (m[k] != 0xcd) { - char errstr[128] = "detected memp underflow in pool "; - strcat(errstr, desc->desc); - LWIP_ASSERT(errstr, 0); - } - } -#else /* MEMP_SANITY_REGION_BEFORE_ALIGNED > 0 */ - LWIP_UNUSED_ARG(p); - LWIP_UNUSED_ARG(desc); -#endif /* MEMP_SANITY_REGION_BEFORE_ALIGNED > 0 */ + mem_overflow_check_raw((u8_t *)p + MEMP_SIZE, desc->size, "pool ", desc->desc); } /** @@ -177,20 +136,7 @@ memp_overflow_check_element_underflow(struct memp *p, const struct memp_desc *de static void memp_overflow_init_element(struct memp *p, const struct memp_desc *desc) { -#if MEMP_SANITY_REGION_BEFORE_ALIGNED > 0 || MEMP_SANITY_REGION_AFTER_ALIGNED > 0 - u8_t *m; -#if MEMP_SANITY_REGION_BEFORE_ALIGNED > 0 - m = (u8_t*)p + MEMP_SIZE - MEMP_SANITY_REGION_BEFORE_ALIGNED; - memset(m, 0xcd, MEMP_SANITY_REGION_BEFORE_ALIGNED); -#endif -#if MEMP_SANITY_REGION_AFTER_ALIGNED > 0 - m = (u8_t*)p + MEMP_SIZE + desc->size; - memset(m, 0xcd, MEMP_SANITY_REGION_AFTER_ALIGNED); -#endif -#else /* MEMP_SANITY_REGION_BEFORE_ALIGNED > 0 || MEMP_SANITY_REGION_AFTER_ALIGNED > 0 */ - LWIP_UNUSED_ARG(p); - LWIP_UNUSED_ARG(desc); -#endif /* MEMP_SANITY_REGION_BEFORE_ALIGNED > 0 || MEMP_SANITY_REGION_AFTER_ALIGNED > 0 */ + mem_overflow_init_raw((u8_t *)p + MEMP_SIZE, desc->size); } #if MEMP_OVERFLOW_CHECK >= 2 @@ -208,11 +154,10 @@ memp_overflow_check_all(void) SYS_ARCH_PROTECT(old_level); for (i = 0; i < MEMP_MAX; ++i) { - p = (struct memp*)LWIP_MEM_ALIGN(memp_pools[i]->base); + p = (struct memp *)LWIP_MEM_ALIGN(memp_pools[i]->base); for (j = 0; j < memp_pools[i]->num; ++j) { - memp_overflow_check_element_overflow(p, memp_pools[i]); - memp_overflow_check_element_underflow(p, memp_pools[i]); - p = LWIP_ALIGNMENT_CAST(struct memp*, ((u8_t*)p + MEMP_SIZE + memp_pools[i]->size + MEMP_SANITY_REGION_AFTER_ALIGNED)); + memp_overflow_check_element(p, memp_pools[i]); + p = LWIP_ALIGNMENT_CAST(struct memp *, ((u8_t *)p + MEMP_SIZE + memp_pools[i]->size + MEM_SANITY_REGION_AFTER_ALIGNED)); } } SYS_ARCH_UNPROTECT(old_level); @@ -236,7 +181,15 @@ memp_init_pool(const struct memp_desc *desc) struct memp *memp; *desc->tab = NULL; - memp = (struct memp*)LWIP_MEM_ALIGN(desc->base); + memp = (struct memp *)LWIP_MEM_ALIGN(desc->base); +#if MEMP_MEM_INIT + /* force memset on pool memory */ + memset(memp, 0, (size_t)desc->num * (MEMP_SIZE + desc->size +#if MEMP_OVERFLOW_CHECK + + MEM_SANITY_REGION_AFTER_ALIGNED +#endif + )); +#endif /* create a linked list of memp elements */ for (i = 0; i < desc->num; ++i) { memp->next = *desc->tab; @@ -244,12 +197,12 @@ memp_init_pool(const struct memp_desc *desc) #if MEMP_OVERFLOW_CHECK memp_overflow_init_element(memp, desc); #endif /* MEMP_OVERFLOW_CHECK */ - /* cast through void* to get rid of alignment warnings */ - memp = (struct memp *)(void *)((u8_t *)memp + MEMP_SIZE + desc->size + /* cast through void* to get rid of alignment warnings */ + memp = (struct memp *)(void *)((u8_t *)memp + MEMP_SIZE + desc->size #if MEMP_OVERFLOW_CHECK - + MEMP_SANITY_REGION_AFTER_ALIGNED + + MEM_SANITY_REGION_AFTER_ALIGNED #endif - ); + ); } #if MEMP_STATS desc->stats->avail = desc->num; @@ -287,11 +240,11 @@ memp_init(void) #endif /* MEMP_OVERFLOW_CHECK >= 2 */ } -static void* +static void * #if !MEMP_OVERFLOW_CHECK do_memp_malloc_pool(const struct memp_desc *desc) #else -do_memp_malloc_pool_fn(const struct memp_desc *desc, const char* file, const int line) +do_memp_malloc_pool_fn(const struct memp_desc *desc, const char *file, const int line) #endif { struct memp *memp; @@ -309,8 +262,7 @@ do_memp_malloc_pool_fn(const struct memp_desc *desc, const char* file, const int if (memp != NULL) { #if !MEMP_MEM_MALLOC #if MEMP_OVERFLOW_CHECK == 1 - memp_overflow_check_element_overflow(memp, desc); - memp_overflow_check_element_underflow(memp, desc); + memp_overflow_check_element(memp, desc); #endif /* MEMP_OVERFLOW_CHECK */ *desc->tab = memp->next; @@ -335,15 +287,15 @@ do_memp_malloc_pool_fn(const struct memp_desc *desc, const char* file, const int #endif SYS_ARCH_UNPROTECT(old_level); /* cast through u8_t* to get rid of alignment warnings */ - return ((u8_t*)memp + MEMP_SIZE); + return ((u8_t *)memp + MEMP_SIZE); } else { - LWIP_DEBUGF(MEMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("memp_malloc: out of memory in pool %s\n", desc->desc)); #if MEMP_STATS desc->stats->err++; #endif + SYS_ARCH_UNPROTECT(old_level); + LWIP_DEBUGF(MEMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("memp_malloc: out of memory in pool %s\n", desc->desc)); } - SYS_ARCH_UNPROTECT(old_level); return NULL; } @@ -358,7 +310,7 @@ void * #if !MEMP_OVERFLOW_CHECK memp_malloc_pool(const struct memp_desc *desc) #else -memp_malloc_pool_fn(const struct memp_desc *desc, const char* file, const int line) +memp_malloc_pool_fn(const struct memp_desc *desc, const char *file, const int line) #endif { LWIP_ASSERT("invalid pool desc", desc != NULL); @@ -384,7 +336,7 @@ void * #if !MEMP_OVERFLOW_CHECK memp_malloc(memp_t type) #else -memp_malloc_fn(memp_t type, const char* file, const int line) +memp_malloc_fn(memp_t type, const char *file, const int line) #endif { void *memp; @@ -404,22 +356,21 @@ memp_malloc_fn(memp_t type, const char* file, const int line) } static void -do_memp_free_pool(const struct memp_desc* desc, void *mem) +do_memp_free_pool(const struct memp_desc *desc, void *mem) { struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); LWIP_ASSERT("memp_free: mem properly aligned", - ((mem_ptr_t)mem % MEM_ALIGNMENT) == 0); + ((mem_ptr_t)mem % MEM_ALIGNMENT) == 0); /* cast through void* to get rid of alignment warnings */ - memp = (struct memp *)(void *)((u8_t*)mem - MEMP_SIZE); + memp = (struct memp *)(void *)((u8_t *)mem - MEMP_SIZE); SYS_ARCH_PROTECT(old_level); #if MEMP_OVERFLOW_CHECK == 1 - memp_overflow_check_element_overflow(memp, desc); - memp_overflow_check_element_underflow(memp, desc); + memp_overflow_check_element(memp, desc); #endif /* MEMP_OVERFLOW_CHECK */ #if MEMP_STATS @@ -449,7 +400,7 @@ do_memp_free_pool(const struct memp_desc* desc, void *mem) * @param mem the memp element to free */ void -memp_free_pool(const struct memp_desc* desc, void *mem) +memp_free_pool(const struct memp_desc *desc, void *mem) { LWIP_ASSERT("invalid pool desc", desc != NULL); if ((desc == NULL) || (mem == NULL)) { diff --git a/Libraries/LwIP/src/core/netif.c b/Libraries/LwIP/src/core/netif.c index f16a0ff..a19018c 100755 --- a/Libraries/LwIP/src/core/netif.c +++ b/Libraries/LwIP/src/core/netif.c @@ -1,16 +1,16 @@ /** * @file * lwIP network interface abstraction - * + * * @defgroup netif Network interface (NETIF) * @ingroup callbackstyle_api - * + * * @defgroup netif_ip4 IPv4 address handling * @ingroup netif - * + * * @defgroup netif_ip6 IPv6 address handling * @ingroup netif - * + * * @defgroup netif_cd Client data handling * Store data (void*) on a netif for application usage. * @see @ref LWIP_NUM_NETIF_CLIENT_DATA @@ -50,7 +50,8 @@ #include "lwip/opt.h" -#include +#include /* memset */ +#include /* atoi */ #include "lwip/def.h" #include "lwip/ip_addr.h" @@ -58,7 +59,7 @@ #include "lwip/netif.h" #include "lwip/priv/tcp_priv.h" #include "lwip/udp.h" -#include "lwip/raw.h" +#include "lwip/priv/raw_priv.h" #include "lwip/snmp.h" #include "lwip/igmp.h" #include "lwip/etharp.h" @@ -101,9 +102,16 @@ #define NETIF_LINK_CALLBACK(n) #endif /* LWIP_NETIF_LINK_CALLBACK */ +#if LWIP_NETIF_EXT_STATUS_CALLBACK +static netif_ext_callback_t *ext_callback; +#endif + +#if !LWIP_SINGLE_NETIF struct netif *netif_list; +#endif /* !LWIP_SINGLE_NETIF */ struct netif *netif_default; +#define netif_index_to_num(index) ((index) - 1) static u8_t netif_num; #if LWIP_NUM_NETIF_CLIENT_DATA > 0 @@ -112,18 +120,21 @@ static u8_t netif_client_id; #define NETIF_REPORT_TYPE_IPV4 0x01 #define NETIF_REPORT_TYPE_IPV6 0x02 -static void netif_issue_reports(struct netif* netif, u8_t report_type); +static void netif_issue_reports(struct netif *netif, u8_t report_type); #if LWIP_IPV6 static err_t netif_null_output_ip6(struct netif *netif, struct pbuf *p, const ip6_addr_t *ipaddr); #endif /* LWIP_IPV6 */ +#if LWIP_IPV4 +static err_t netif_null_output_ip4(struct netif *netif, struct pbuf *p, const ip4_addr_t *ipaddr); +#endif /* LWIP_IPV4 */ #if LWIP_HAVE_LOOPIF #if LWIP_IPV4 -static err_t netif_loop_output_ipv4(struct netif *netif, struct pbuf *p, const ip4_addr_t* addr); +static err_t netif_loop_output_ipv4(struct netif *netif, struct pbuf *p, const ip4_addr_t *addr); #endif #if LWIP_IPV6 -static err_t netif_loop_output_ipv6(struct netif *netif, struct pbuf *p, const ip6_addr_t* addr); +static err_t netif_loop_output_ipv6(struct netif *netif, struct pbuf *p, const ip6_addr_t *addr); #endif @@ -139,6 +150,8 @@ static struct netif loop_netif; static err_t netif_loopif_init(struct netif *netif) { + LWIP_ASSERT("netif_loopif_init: invalid netif", netif != NULL); + /* initialize the snmp variables and counters inside the struct netif * ifSpeed: no assumption can be made! */ @@ -153,8 +166,9 @@ netif_loopif_init(struct netif *netif) netif->output_ip6 = netif_loop_output_ipv6; #endif #if LWIP_LOOPIF_MULTICAST - netif->flags |= NETIF_FLAG_IGMP; + netif_set_flags(netif, NETIF_FLAG_IGMP); #endif + NETIF_SET_CHECKSUM_CTRL(netif, NETIF_CHECKSUM_DISABLE_ALL); return ERR_OK; } #endif /* LWIP_HAVE_LOOPIF */ @@ -166,9 +180,9 @@ netif_init(void) #if LWIP_IPV4 #define LOOPIF_ADDRINIT &loop_ipaddr, &loop_netmask, &loop_gw, ip4_addr_t loop_ipaddr, loop_netmask, loop_gw; - IP4_ADDR(&loop_gw, 127,0,0,1); - IP4_ADDR(&loop_ipaddr, 127,0,0,1); - IP4_ADDR(&loop_netmask, 255,0,0,0); + IP4_ADDR(&loop_gw, 127, 0, 0, 1); + IP4_ADDR(&loop_ipaddr, 127, 0, 0, 1); + IP4_ADDR(&loop_netmask, 255, 0, 0, 0); #else /* LWIP_IPV4 */ #define LOOPIF_ADDRINIT #endif /* LWIP_IPV4 */ @@ -196,18 +210,39 @@ netif_init(void) * ethernet_input() or ip_input() depending on netif flags. * Don't call directly, pass to netif_add() and call * netif->input(). - * Only works if the netif driver correctly sets + * Only works if the netif driver correctly sets * NETIF_FLAG_ETHARP and/or NETIF_FLAG_ETHERNET flag! */ err_t netif_input(struct pbuf *p, struct netif *inp) { + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ASSERT("netif_input: invalid pbuf", p != NULL); + LWIP_ASSERT("netif_input: invalid netif", inp != NULL); + #if LWIP_ETHERNET if (inp->flags & (NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET)) { return ethernet_input(p, inp); } else #endif /* LWIP_ETHERNET */ - return ip_input(p, inp); + return ip_input(p, inp); +} + +/** + * @ingroup netif + * Add a network interface to the list of lwIP netifs. + * + * Same as @ref netif_add but without IPv4 addresses + */ +struct netif * +netif_add_noaddr(struct netif *netif, void *state, netif_init_fn init, netif_input_fn input) +{ + return netif_add(netif, +#if LWIP_IPV4 + NULL, NULL, NULL, +#endif /* LWIP_IPV4*/ + state, init, input); } /** @@ -229,12 +264,12 @@ netif_input(struct pbuf *p, struct netif *inp) * to decide whether to forward to ethernet_input() or ip_input(). * In other words, the functions only work when the netif * driver is implemented correctly!\n - * Most members of struct netif should be be initialized by the + * Most members of struct netif should be be initialized by the * netif init function = netif driver (init parameter of this function).\n * IPv6: Don't forget to call netif_create_ip6_linklocal_address() after * setting the MAC address in struct netif.hwaddr * (IPv6 requires a link-local address). - * + * * @return netif, or NULL if failed. */ struct netif * @@ -248,33 +283,59 @@ netif_add(struct netif *netif, s8_t i; #endif - LWIP_ASSERT("No init function given", init != NULL); + LWIP_ASSERT_CORE_LOCKED(); + +#if LWIP_SINGLE_NETIF + if (netif_default != NULL) { + LWIP_ASSERT("single netif already set", 0); + return NULL; + } +#endif + + LWIP_ERROR("netif_add: invalid netif", netif != NULL, return NULL); + LWIP_ERROR("netif_add: No init function given", init != NULL, return NULL); + +#if LWIP_IPV4 + if (ipaddr == NULL) { + ipaddr = ip_2_ip4(IP4_ADDR_ANY); + } + if (netmask == NULL) { + netmask = ip_2_ip4(IP4_ADDR_ANY); + } + if (gw == NULL) { + gw = ip_2_ip4(IP4_ADDR_ANY); + } /* reset new interface configuration state */ -#if LWIP_IPV4 ip_addr_set_zero_ip4(&netif->ip_addr); ip_addr_set_zero_ip4(&netif->netmask); ip_addr_set_zero_ip4(&netif->gw); + netif->output = netif_null_output_ip4; #endif /* LWIP_IPV4 */ #if LWIP_IPV6 for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { ip_addr_set_zero_ip6(&netif->ip6_addr[i]); netif->ip6_addr_state[i] = IP6_ADDR_INVALID; +#if LWIP_IPV6_ADDRESS_LIFETIMES + netif->ip6_addr_valid_life[i] = IP6_ADDR_LIFE_STATIC; + netif->ip6_addr_pref_life[i] = IP6_ADDR_LIFE_STATIC; +#endif /* LWIP_IPV6_ADDRESS_LIFETIMES */ } netif->output_ip6 = netif_null_output_ip6; #endif /* LWIP_IPV6 */ NETIF_SET_CHECKSUM_CTRL(netif, NETIF_CHECKSUM_ENABLE_ALL); + netif->mtu = 0; netif->flags = 0; #ifdef netif_get_client_data memset(netif->client_data, 0, sizeof(netif->client_data)); #endif /* LWIP_NUM_NETIF_CLIENT_DATA */ +#if LWIP_IPV6 #if LWIP_IPV6_AUTOCONFIG /* IPv6 address autoconfiguration not enabled by default */ netif->ip6_autoconfig_enabled = 0; #endif /* LWIP_IPV6_AUTOCONFIG */ -#if LWIP_IPV6_SEND_ROUTER_SOLICIT - netif->rs_count = LWIP_ND6_MAX_MULTICAST_SOLICIT; -#endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */ + nd6_restart_netif(netif); +#endif /* LWIP_IPV6 */ #if LWIP_NETIF_STATUS_CALLBACK netif->status_callback = NULL; #endif /* LWIP_NETIF_STATUS_CALLBACK */ @@ -294,10 +355,10 @@ netif_add(struct netif *netif, /* remember netif specific state information data */ netif->state = state; - netif->num = netif_num++; + netif->num = netif_num; netif->input = input; - NETIF_SET_HWADDRHINT(netif, NULL); + NETIF_RESET_HINTS(netif); #if ENABLE_LOOPBACK && LWIP_LOOPBACK_MAX_PBUFS netif->loop_cnt_current = 0; #endif /* ENABLE_LOOPBACK && LWIP_LOOPBACK_MAX_PBUFS */ @@ -310,10 +371,47 @@ netif_add(struct netif *netif, if (init(netif) != ERR_OK) { return NULL; } +#if LWIP_IPV6 && LWIP_ND6_ALLOW_RA_UPDATES + /* Initialize the MTU for IPv6 to the one set by the netif driver. + This can be updated later by RA. */ + netif->mtu6 = netif->mtu; +#endif /* LWIP_IPV6 && LWIP_ND6_ALLOW_RA_UPDATES */ + +#if !LWIP_SINGLE_NETIF + /* Assign a unique netif number in the range [0..254], so that (num+1) can + serve as an interface index that fits in a u8_t. + We assume that the new netif has not yet been added to the list here. + This algorithm is O(n^2), but that should be OK for lwIP. + */ + { + struct netif *netif2; + int num_netifs; + do { + if (netif->num == 255) { + netif->num = 0; + } + num_netifs = 0; + for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) { + LWIP_ASSERT("netif already added", netif2 != netif); + num_netifs++; + LWIP_ASSERT("too many netifs, max. supported number is 255", num_netifs <= 255); + if (netif2->num == netif->num) { + netif->num++; + break; + } + } + } while (netif2 != NULL); + } + if (netif->num == 254) { + netif_num = 0; + } else { + netif_num = (u8_t)(netif->num + 1); + } /* add this netif to the list */ netif->next = netif_list; netif_list = netif; +#endif /* "LWIP_SINGLE_NETIF */ mib2_netif_added(netif); #if LWIP_IGMP @@ -324,7 +422,7 @@ netif_add(struct netif *netif, #endif /* LWIP_IGMP */ LWIP_DEBUGF(NETIF_DEBUG, ("netif: added interface %c%c IP", - netif->name[0], netif->name[1])); + netif->name[0], netif->name[1])); #if LWIP_IPV4 LWIP_DEBUGF(NETIF_DEBUG, (" addr ")); ip4_addr_debug_print(NETIF_DEBUG, ipaddr); @@ -334,10 +432,218 @@ netif_add(struct netif *netif, ip4_addr_debug_print(NETIF_DEBUG, gw); #endif /* LWIP_IPV4 */ LWIP_DEBUGF(NETIF_DEBUG, ("\n")); + + netif_invoke_ext_callback(netif, LWIP_NSC_NETIF_ADDED, NULL); + return netif; } +static void +netif_do_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr) +{ +#if LWIP_TCP + tcp_netif_ip_addr_changed(old_addr, new_addr); +#endif /* LWIP_TCP */ +#if LWIP_UDP + udp_netif_ip_addr_changed(old_addr, new_addr); +#endif /* LWIP_UDP */ +#if LWIP_RAW + raw_netif_ip_addr_changed(old_addr, new_addr); +#endif /* LWIP_RAW */ +} + #if LWIP_IPV4 +static int +netif_do_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr, ip_addr_t *old_addr) +{ + LWIP_ASSERT("invalid pointer", ipaddr != NULL); + LWIP_ASSERT("invalid pointer", old_addr != NULL); + + /* address is actually being changed? */ + if (ip4_addr_cmp(ipaddr, netif_ip4_addr(netif)) == 0) { + ip_addr_t new_addr; + *ip_2_ip4(&new_addr) = *ipaddr; + IP_SET_TYPE_VAL(new_addr, IPADDR_TYPE_V4); + + ip_addr_copy(*old_addr, *netif_ip_addr4(netif)); + + LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: netif address being changed\n")); + netif_do_ip_addr_changed(old_addr, &new_addr); + + mib2_remove_ip4(netif); + mib2_remove_route_ip4(0, netif); + /* set new IP address to netif */ + ip4_addr_set(ip_2_ip4(&netif->ip_addr), ipaddr); + IP_SET_TYPE_VAL(netif->ip_addr, IPADDR_TYPE_V4); + mib2_add_ip4(netif); + mib2_add_route_ip4(0, netif); + + netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4); + + NETIF_STATUS_CALLBACK(netif); + return 1; /* address changed */ + } + return 0; /* address unchanged */ +} + +/** + * @ingroup netif_ip4 + * Change the IP address of a network interface + * + * @param netif the network interface to change + * @param ipaddr the new IP address + * + * @note call netif_set_addr() if you also want to change netmask and + * default gateway + */ +void +netif_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr) +{ + ip_addr_t old_addr; + + LWIP_ERROR("netif_set_ipaddr: invalid netif", netif != NULL, return); + + /* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */ + if (ipaddr == NULL) { + ipaddr = IP4_ADDR_ANY4; + } + + LWIP_ASSERT_CORE_LOCKED(); + + if (netif_do_set_ipaddr(netif, ipaddr, &old_addr)) { +#if LWIP_NETIF_EXT_STATUS_CALLBACK + netif_ext_callback_args_t args; + args.ipv4_changed.old_address = &old_addr; + netif_invoke_ext_callback(netif, LWIP_NSC_IPV4_ADDRESS_CHANGED, &args); +#endif + } +} + +static int +netif_do_set_netmask(struct netif *netif, const ip4_addr_t *netmask, ip_addr_t *old_nm) +{ + /* address is actually being changed? */ + if (ip4_addr_cmp(netmask, netif_ip4_netmask(netif)) == 0) { +#if LWIP_NETIF_EXT_STATUS_CALLBACK + LWIP_ASSERT("invalid pointer", old_nm != NULL); + ip_addr_copy(*old_nm, *netif_ip_netmask4(netif)); +#else + LWIP_UNUSED_ARG(old_nm); +#endif + mib2_remove_route_ip4(0, netif); + /* set new netmask to netif */ + ip4_addr_set(ip_2_ip4(&netif->netmask), netmask); + IP_SET_TYPE_VAL(netif->netmask, IPADDR_TYPE_V4); + mib2_add_route_ip4(0, netif); + LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("netif: netmask of interface %c%c set to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", + netif->name[0], netif->name[1], + ip4_addr1_16(netif_ip4_netmask(netif)), + ip4_addr2_16(netif_ip4_netmask(netif)), + ip4_addr3_16(netif_ip4_netmask(netif)), + ip4_addr4_16(netif_ip4_netmask(netif)))); + return 1; /* netmask changed */ + } + return 0; /* netmask unchanged */ +} + +/** + * @ingroup netif_ip4 + * Change the netmask of a network interface + * + * @param netif the network interface to change + * @param netmask the new netmask + * + * @note call netif_set_addr() if you also want to change ip address and + * default gateway + */ +void +netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask) +{ +#if LWIP_NETIF_EXT_STATUS_CALLBACK + ip_addr_t old_nm_val; + ip_addr_t *old_nm = &old_nm_val; +#else + ip_addr_t *old_nm = NULL; +#endif + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ERROR("netif_set_netmask: invalid netif", netif != NULL, return); + + /* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */ + if (netmask == NULL) { + netmask = IP4_ADDR_ANY4; + } + + if (netif_do_set_netmask(netif, netmask, old_nm)) { +#if LWIP_NETIF_EXT_STATUS_CALLBACK + netif_ext_callback_args_t args; + args.ipv4_changed.old_netmask = old_nm; + netif_invoke_ext_callback(netif, LWIP_NSC_IPV4_NETMASK_CHANGED, &args); +#endif + } +} + +static int +netif_do_set_gw(struct netif *netif, const ip4_addr_t *gw, ip_addr_t *old_gw) +{ + /* address is actually being changed? */ + if (ip4_addr_cmp(gw, netif_ip4_gw(netif)) == 0) { +#if LWIP_NETIF_EXT_STATUS_CALLBACK + LWIP_ASSERT("invalid pointer", old_gw != NULL); + ip_addr_copy(*old_gw, *netif_ip_gw4(netif)); +#else + LWIP_UNUSED_ARG(old_gw); +#endif + + ip4_addr_set(ip_2_ip4(&netif->gw), gw); + IP_SET_TYPE_VAL(netif->gw, IPADDR_TYPE_V4); + LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("netif: GW address of interface %c%c set to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", + netif->name[0], netif->name[1], + ip4_addr1_16(netif_ip4_gw(netif)), + ip4_addr2_16(netif_ip4_gw(netif)), + ip4_addr3_16(netif_ip4_gw(netif)), + ip4_addr4_16(netif_ip4_gw(netif)))); + return 1; /* gateway changed */ + } + return 0; /* gateway unchanged */ +} + +/** + * @ingroup netif_ip4 + * Change the default gateway for a network interface + * + * @param netif the network interface to change + * @param gw the new default gateway + * + * @note call netif_set_addr() if you also want to change ip address and netmask + */ +void +netif_set_gw(struct netif *netif, const ip4_addr_t *gw) +{ +#if LWIP_NETIF_EXT_STATUS_CALLBACK + ip_addr_t old_gw_val; + ip_addr_t *old_gw = &old_gw_val; +#else + ip_addr_t *old_gw = NULL; +#endif + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ERROR("netif_set_gw: invalid netif", netif != NULL, return); + + /* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */ + if (gw == NULL) { + gw = IP4_ADDR_ANY4; + } + + if (netif_do_set_gw(netif, gw, old_gw)) { +#if LWIP_NETIF_EXT_STATUS_CALLBACK + netif_ext_callback_args_t args; + args.ipv4_changed.old_gw = old_gw; + netif_invoke_ext_callback(netif, LWIP_NSC_IPV4_GATEWAY_CHANGED, &args); +#endif + } +} + /** * @ingroup netif_ip4 * Change IP address configuration for a network interface (including netmask @@ -350,20 +656,74 @@ netif_add(struct netif *netif, */ void netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, - const ip4_addr_t *gw) + const ip4_addr_t *gw) { - if (ip4_addr_isany(ipaddr)) { +#if LWIP_NETIF_EXT_STATUS_CALLBACK + netif_nsc_reason_t change_reason = LWIP_NSC_NONE; + netif_ext_callback_args_t cb_args; + ip_addr_t old_nm_val; + ip_addr_t old_gw_val; + ip_addr_t *old_nm = &old_nm_val; + ip_addr_t *old_gw = &old_gw_val; +#else + ip_addr_t *old_nm = NULL; + ip_addr_t *old_gw = NULL; +#endif + ip_addr_t old_addr; + int remove; + + LWIP_ASSERT_CORE_LOCKED(); + + /* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */ + if (ipaddr == NULL) { + ipaddr = IP4_ADDR_ANY4; + } + if (netmask == NULL) { + netmask = IP4_ADDR_ANY4; + } + if (gw == NULL) { + gw = IP4_ADDR_ANY4; + } + + remove = ip4_addr_isany(ipaddr); + if (remove) { /* when removing an address, we have to remove it *before* changing netmask/gw to ensure that tcp RST segment can be sent correctly */ - netif_set_ipaddr(netif, ipaddr); - netif_set_netmask(netif, netmask); - netif_set_gw(netif, gw); - } else { - netif_set_netmask(netif, netmask); - netif_set_gw(netif, gw); - /* set ipaddr last to ensure netmask/gw have been set when status callback is called */ - netif_set_ipaddr(netif, ipaddr); + if (netif_do_set_ipaddr(netif, ipaddr, &old_addr)) { +#if LWIP_NETIF_EXT_STATUS_CALLBACK + change_reason |= LWIP_NSC_IPV4_ADDRESS_CHANGED; + cb_args.ipv4_changed.old_address = &old_addr; +#endif + } } + if (netif_do_set_netmask(netif, netmask, old_nm)) { +#if LWIP_NETIF_EXT_STATUS_CALLBACK + change_reason |= LWIP_NSC_IPV4_NETMASK_CHANGED; + cb_args.ipv4_changed.old_netmask = old_nm; +#endif + } + if (netif_do_set_gw(netif, gw, old_gw)) { +#if LWIP_NETIF_EXT_STATUS_CALLBACK + change_reason |= LWIP_NSC_IPV4_GATEWAY_CHANGED; + cb_args.ipv4_changed.old_gw = old_gw; +#endif + } + if (!remove) { + /* set ipaddr last to ensure netmask/gw have been set when status callback is called */ + if (netif_do_set_ipaddr(netif, ipaddr, &old_addr)) { +#if LWIP_NETIF_EXT_STATUS_CALLBACK + change_reason |= LWIP_NSC_IPV4_ADDRESS_CHANGED; + cb_args.ipv4_changed.old_address = &old_addr; +#endif + } + } + +#if LWIP_NETIF_EXT_STATUS_CALLBACK + if (change_reason != LWIP_NSC_NONE) { + change_reason |= LWIP_NSC_IPV4_SETTINGS_CHANGED; + netif_invoke_ext_callback(netif, change_reason, &cb_args); + } +#endif } #endif /* LWIP_IPV4*/ @@ -380,21 +740,17 @@ netif_remove(struct netif *netif) int i; #endif + LWIP_ASSERT_CORE_LOCKED(); + if (netif == NULL) { return; } + netif_invoke_ext_callback(netif, LWIP_NSC_NETIF_REMOVED, NULL); + #if LWIP_IPV4 if (!ip4_addr_isany_val(*netif_ip4_addr(netif))) { -#if LWIP_TCP - tcp_netif_ip_addr_changed(netif_ip_addr4(netif), NULL); -#endif /* LWIP_TCP */ -#if LWIP_UDP - udp_netif_ip_addr_changed(netif_ip_addr4(netif), NULL); -#endif /* LWIP_UDP */ -#if LWIP_RAW - raw_netif_ip_addr_changed(netif_ip_addr4(netif), NULL); -#endif /* LWIP_RAW */ + netif_do_ip_addr_changed(netif_ip_addr4(netif), NULL); } #if LWIP_IGMP @@ -408,15 +764,7 @@ netif_remove(struct netif *netif) #if LWIP_IPV6 for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i))) { -#if LWIP_TCP - tcp_netif_ip_addr_changed(netif_ip_addr6(netif, i), NULL); -#endif /* LWIP_TCP */ -#if LWIP_UDP - udp_netif_ip_addr_changed(netif_ip_addr6(netif, i), NULL); -#endif /* LWIP_UDP */ -#if LWIP_RAW - raw_netif_ip_addr_changed(netif_ip_addr6(netif, i), NULL); -#endif /* LWIP_RAW */ + netif_do_ip_addr_changed(netif_ip_addr6(netif, i), NULL); } } #if LWIP_IPV6_MLD @@ -436,13 +784,14 @@ netif_remove(struct netif *netif) /* reset default netif */ netif_set_default(NULL); } +#if !LWIP_SINGLE_NETIF /* is it the first netif? */ if (netif_list == netif) { netif_list = netif->next; } else { /* look for netif further down the list */ - struct netif * tmp_netif; - for (tmp_netif = netif_list; tmp_netif != NULL; tmp_netif = tmp_netif->next) { + struct netif *tmp_netif; + NETIF_FOREACH(tmp_netif) { if (tmp_netif->next == netif) { tmp_netif->next = netif->next; break; @@ -452,6 +801,7 @@ netif_remove(struct netif *netif) return; /* netif is not on the list */ } } +#endif /* !LWIP_SINGLE_NETIF */ mib2_netif_removed(netif); #if LWIP_NETIF_REMOVE_CALLBACK if (netif->remove_callback) { @@ -461,138 +811,6 @@ netif_remove(struct netif *netif) LWIP_DEBUGF( NETIF_DEBUG, ("netif_remove: removed netif\n") ); } -/** - * @ingroup netif - * Find a network interface by searching for its name - * - * @param name the name of the netif (like netif->name) plus concatenated number - * in ascii representation (e.g. 'en0') - */ -struct netif * -netif_find(const char *name) -{ - struct netif *netif; - u8_t num; - - if (name == NULL) { - return NULL; - } - - num = (u8_t)(name[2] - '0'); - - for (netif = netif_list; netif != NULL; netif = netif->next) { - if (num == netif->num && - name[0] == netif->name[0] && - name[1] == netif->name[1]) { - LWIP_DEBUGF(NETIF_DEBUG, ("netif_find: found %c%c\n", name[0], name[1])); - return netif; - } - } - LWIP_DEBUGF(NETIF_DEBUG, ("netif_find: didn't find %c%c\n", name[0], name[1])); - return NULL; -} - -#if LWIP_IPV4 -/** - * @ingroup netif_ip4 - * Change the IP address of a network interface - * - * @param netif the network interface to change - * @param ipaddr the new IP address - * - * @note call netif_set_addr() if you also want to change netmask and - * default gateway - */ -void -netif_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr) -{ - ip_addr_t new_addr; - *ip_2_ip4(&new_addr) = (ipaddr ? *ipaddr : *IP4_ADDR_ANY4); - IP_SET_TYPE_VAL(new_addr, IPADDR_TYPE_V4); - - /* address is actually being changed? */ - if (ip4_addr_cmp(ip_2_ip4(&new_addr), netif_ip4_addr(netif)) == 0) { - LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: netif address being changed\n")); -#if LWIP_TCP - tcp_netif_ip_addr_changed(netif_ip_addr4(netif), &new_addr); -#endif /* LWIP_TCP */ -#if LWIP_UDP - udp_netif_ip_addr_changed(netif_ip_addr4(netif), &new_addr); -#endif /* LWIP_UDP */ -#if LWIP_RAW - raw_netif_ip_addr_changed(netif_ip_addr4(netif), &new_addr); -#endif /* LWIP_RAW */ - - mib2_remove_ip4(netif); - mib2_remove_route_ip4(0, netif); - /* set new IP address to netif */ - ip4_addr_set(ip_2_ip4(&netif->ip_addr), ipaddr); - IP_SET_TYPE_VAL(netif->ip_addr, IPADDR_TYPE_V4); - mib2_add_ip4(netif); - mib2_add_route_ip4(0, netif); - - netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4); - - NETIF_STATUS_CALLBACK(netif); - } - - LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("netif: IP address of interface %c%c set to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - netif->name[0], netif->name[1], - ip4_addr1_16(netif_ip4_addr(netif)), - ip4_addr2_16(netif_ip4_addr(netif)), - ip4_addr3_16(netif_ip4_addr(netif)), - ip4_addr4_16(netif_ip4_addr(netif)))); -} - -/** - * @ingroup netif_ip4 - * Change the default gateway for a network interface - * - * @param netif the network interface to change - * @param gw the new default gateway - * - * @note call netif_set_addr() if you also want to change ip address and netmask - */ -void -netif_set_gw(struct netif *netif, const ip4_addr_t *gw) -{ - ip4_addr_set(ip_2_ip4(&netif->gw), gw); - IP_SET_TYPE_VAL(netif->gw, IPADDR_TYPE_V4); - LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("netif: GW address of interface %c%c set to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - netif->name[0], netif->name[1], - ip4_addr1_16(netif_ip4_gw(netif)), - ip4_addr2_16(netif_ip4_gw(netif)), - ip4_addr3_16(netif_ip4_gw(netif)), - ip4_addr4_16(netif_ip4_gw(netif)))); -} - -/** - * @ingroup netif_ip4 - * Change the netmask of a network interface - * - * @param netif the network interface to change - * @param netmask the new netmask - * - * @note call netif_set_addr() if you also want to change ip address and - * default gateway - */ -void -netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask) -{ - mib2_remove_route_ip4(0, netif); - /* set new netmask to netif */ - ip4_addr_set(ip_2_ip4(&netif->netmask), netmask); - IP_SET_TYPE_VAL(netif->netmask, IPADDR_TYPE_V4); - mib2_add_route_ip4(0, netif); - LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("netif: netmask of interface %c%c set to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - netif->name[0], netif->name[1], - ip4_addr1_16(netif_ip4_netmask(netif)), - ip4_addr2_16(netif_ip4_netmask(netif)), - ip4_addr3_16(netif_ip4_netmask(netif)), - ip4_addr4_16(netif_ip4_netmask(netif)))); -} -#endif /* LWIP_IPV4 */ - /** * @ingroup netif * Set a network interface as the default network interface @@ -603,6 +821,8 @@ netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask) void netif_set_default(struct netif *netif) { + LWIP_ASSERT_CORE_LOCKED(); + if (netif == NULL) { /* remove default route */ mib2_remove_route_ip4(1, netif); @@ -612,7 +832,7 @@ netif_set_default(struct netif *netif) } netif_default = netif; LWIP_DEBUGF(NETIF_DEBUG, ("netif: setting default interface %c%c\n", - netif ? netif->name[0] : '\'', netif ? netif->name[1] : '\'')); + netif ? netif->name[0] : '\'', netif ? netif->name[1] : '\'')); } /** @@ -623,24 +843,45 @@ netif_set_default(struct netif *netif) void netif_set_up(struct netif *netif) { + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ERROR("netif_set_up: invalid netif", netif != NULL, return); + if (!(netif->flags & NETIF_FLAG_UP)) { - netif->flags |= NETIF_FLAG_UP; + netif_set_flags(netif, NETIF_FLAG_UP); MIB2_COPY_SYSUPTIME_TO(&netif->ts); NETIF_STATUS_CALLBACK(netif); - if (netif->flags & NETIF_FLAG_LINK_UP) { - netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4|NETIF_REPORT_TYPE_IPV6); +#if LWIP_NETIF_EXT_STATUS_CALLBACK + { + netif_ext_callback_args_t args; + args.status_changed.state = 1; + netif_invoke_ext_callback(netif, LWIP_NSC_STATUS_CHANGED, &args); } +#endif + + netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4 | NETIF_REPORT_TYPE_IPV6); +#if LWIP_IPV6 + nd6_restart_netif(netif); +#endif /* LWIP_IPV6 */ } } /** Send ARP/IGMP/MLD/RS events, e.g. on link-up/netif-up or addr-change */ static void -netif_issue_reports(struct netif* netif, u8_t report_type) +netif_issue_reports(struct netif *netif, u8_t report_type) { + LWIP_ASSERT("netif_issue_reports: invalid netif", netif != NULL); + + /* Only send reports when both link and admin states are up */ + if (!(netif->flags & NETIF_FLAG_LINK_UP) || + !(netif->flags & NETIF_FLAG_UP)) { + return; + } + #if LWIP_IPV4 if ((report_type & NETIF_REPORT_TYPE_IPV4) && !ip4_addr_isany_val(*netif_ip4_addr(netif))) { @@ -666,10 +907,6 @@ netif_issue_reports(struct netif* netif, u8_t report_type) /* send mld memberships */ mld6_report_groups(netif); #endif /* LWIP_IPV6_MLD */ -#if LWIP_IPV6_SEND_ROUTER_SOLICIT - /* Send Router Solicitation messages. */ - netif->rs_count = LWIP_ND6_MAX_MULTICAST_SOLICIT; -#endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */ } #endif /* LWIP_IPV6 */ } @@ -681,8 +918,20 @@ netif_issue_reports(struct netif* netif, u8_t report_type) void netif_set_down(struct netif *netif) { + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ERROR("netif_set_down: invalid netif", netif != NULL, return); + if (netif->flags & NETIF_FLAG_UP) { - netif->flags &= ~NETIF_FLAG_UP; +#if LWIP_NETIF_EXT_STATUS_CALLBACK + { + netif_ext_callback_args_t args; + args.status_changed.state = 0; + netif_invoke_ext_callback(netif, LWIP_NSC_STATUS_CHANGED, &args); + } +#endif + + netif_clear_flags(netif, NETIF_FLAG_UP); MIB2_COPY_SYSUPTIME_TO(&netif->ts); #if LWIP_IPV4 && LWIP_ARP @@ -707,6 +956,8 @@ netif_set_down(struct netif *netif) void netif_set_status_callback(struct netif *netif, netif_status_callback_fn status_callback) { + LWIP_ASSERT_CORE_LOCKED(); + if (netif) { netif->status_callback = status_callback; } @@ -721,6 +972,8 @@ netif_set_status_callback(struct netif *netif, netif_status_callback_fn status_c void netif_set_remove_callback(struct netif *netif, netif_status_callback_fn remove_callback) { + LWIP_ASSERT_CORE_LOCKED(); + if (netif) { netif->remove_callback = remove_callback; } @@ -734,8 +987,12 @@ netif_set_remove_callback(struct netif *netif, netif_status_callback_fn remove_c void netif_set_link_up(struct netif *netif) { + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ERROR("netif_set_link_up: invalid netif", netif != NULL, return); + if (!(netif->flags & NETIF_FLAG_LINK_UP)) { - netif->flags |= NETIF_FLAG_LINK_UP; + netif_set_flags(netif, NETIF_FLAG_LINK_UP); #if LWIP_DHCP dhcp_network_changed(netif); @@ -745,10 +1002,19 @@ netif_set_link_up(struct netif *netif) autoip_network_changed(netif); #endif /* LWIP_AUTOIP */ - if (netif->flags & NETIF_FLAG_UP) { - netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4|NETIF_REPORT_TYPE_IPV6); - } + netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4 | NETIF_REPORT_TYPE_IPV6); +#if LWIP_IPV6 + nd6_restart_netif(netif); +#endif /* LWIP_IPV6 */ + NETIF_LINK_CALLBACK(netif); +#if LWIP_NETIF_EXT_STATUS_CALLBACK + { + netif_ext_callback_args_t args; + args.link_changed.state = 1; + netif_invoke_ext_callback(netif, LWIP_NSC_LINK_CHANGED, &args); + } +#endif } } @@ -757,11 +1023,22 @@ netif_set_link_up(struct netif *netif) * Called by a driver when its link goes down */ void -netif_set_link_down(struct netif *netif ) +netif_set_link_down(struct netif *netif) { + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ERROR("netif_set_link_down: invalid netif", netif != NULL, return); + if (netif->flags & NETIF_FLAG_LINK_UP) { - netif->flags &= ~NETIF_FLAG_LINK_UP; + netif_clear_flags(netif, NETIF_FLAG_LINK_UP); NETIF_LINK_CALLBACK(netif); +#if LWIP_NETIF_EXT_STATUS_CALLBACK + { + netif_ext_callback_args_t args; + args.link_changed.state = 0; + netif_invoke_ext_callback(netif, LWIP_NSC_LINK_CHANGED, &args); + } +#endif } } @@ -773,6 +1050,8 @@ netif_set_link_down(struct netif *netif ) void netif_set_link_callback(struct netif *netif, netif_status_callback_fn link_callback) { + LWIP_ASSERT_CORE_LOCKED(); + if (netif) { netif->link_callback = link_callback; } @@ -812,8 +1091,14 @@ netif_loop_output(struct netif *netif, struct pbuf *p) struct netif *stats_if = netif; #endif /* LWIP_HAVE_LOOPIF */ #endif /* MIB2_STATS */ +#if LWIP_NETIF_LOOPBACK_MULTITHREADING + u8_t schedule_poll = 0; +#endif /* LWIP_NETIF_LOOPBACK_MULTITHREADING */ SYS_ARCH_DECL_PROTECT(lev); + LWIP_ASSERT("netif_loop_output: invalid netif", netif != NULL); + LWIP_ASSERT("netif_loop_output: invalid pbuf", p != NULL); + /* Allocate a new pbuf */ r = pbuf_alloc(PBUF_LINK, p->tot_len, PBUF_RAM); if (r == NULL) { @@ -826,14 +1111,14 @@ netif_loop_output(struct netif *netif, struct pbuf *p) clen = pbuf_clen(r); /* check for overflow or too many pbuf on queue */ if (((netif->loop_cnt_current + clen) < netif->loop_cnt_current) || - ((netif->loop_cnt_current + clen) > LWIP_LOOPBACK_MAX_PBUFS)) { + ((netif->loop_cnt_current + clen) > LWIP_MIN(LWIP_LOOPBACK_MAX_PBUFS, 0xFFFF))) { pbuf_free(r); LINK_STATS_INC(link.memerr); LINK_STATS_INC(link.drop); MIB2_STATS_NETIF_INC(stats_if, ifoutdiscards); return ERR_MEM; } - netif->loop_cnt_current += clen; + netif->loop_cnt_current = (u16_t)(netif->loop_cnt_current + clen); #endif /* LWIP_LOOPBACK_MAX_PBUFS */ /* Copy the whole pbuf queue p into the single pbuf r */ @@ -861,6 +1146,10 @@ netif_loop_output(struct netif *netif, struct pbuf *p) } else { netif->loop_first = r; netif->loop_last = last; +#if LWIP_NETIF_LOOPBACK_MULTITHREADING + /* No existing packets queued, schedule poll */ + schedule_poll = 1; +#endif /* LWIP_NETIF_LOOPBACK_MULTITHREADING */ } SYS_ARCH_UNPROTECT(lev); @@ -870,7 +1159,9 @@ netif_loop_output(struct netif *netif, struct pbuf *p) #if LWIP_NETIF_LOOPBACK_MULTITHREADING /* For multithreading environment, schedule a call to netif_poll */ - tcpip_callback_with_block((tcpip_callback_fn)netif_poll, netif, 0); + if (schedule_poll) { + tcpip_try_callback((tcpip_callback_fn)netif_poll, netif); + } #endif /* LWIP_NETIF_LOOPBACK_MULTITHREADING */ return ERR_OK; @@ -879,7 +1170,7 @@ netif_loop_output(struct netif *netif, struct pbuf *p) #if LWIP_HAVE_LOOPIF #if LWIP_IPV4 static err_t -netif_loop_output_ipv4(struct netif *netif, struct pbuf *p, const ip4_addr_t* addr) +netif_loop_output_ipv4(struct netif *netif, struct pbuf *p, const ip4_addr_t *addr) { LWIP_UNUSED_ARG(addr); return netif_loop_output(netif, p); @@ -888,7 +1179,7 @@ netif_loop_output_ipv4(struct netif *netif, struct pbuf *p, const ip4_addr_t* ad #if LWIP_IPV6 static err_t -netif_loop_output_ipv6(struct netif *netif, struct pbuf *p, const ip6_addr_t* addr) +netif_loop_output_ipv6(struct netif *netif, struct pbuf *p, const ip6_addr_t *addr) { LWIP_UNUSED_ARG(addr); return netif_loop_output(netif, p); @@ -917,6 +1208,8 @@ netif_poll(struct netif *netif) #endif /* MIB2_STATS */ SYS_ARCH_DECL_PROTECT(lev); + LWIP_ASSERT("netif_poll: invalid netif", netif != NULL); + /* Get a packet from the list. With SYS_LIGHTWEIGHT_PROT=1, this is protected */ SYS_ARCH_PROTECT(lev); while (netif->loop_first != NULL) { @@ -936,8 +1229,8 @@ netif_poll(struct netif *netif) #if LWIP_LOOPBACK_MAX_PBUFS /* adjust the number of pbufs on queue */ LWIP_ASSERT("netif->loop_cnt_current underflow", - ((netif->loop_cnt_current - clen) < netif->loop_cnt_current)); - netif->loop_cnt_current -= clen; + ((netif->loop_cnt_current - clen) < netif->loop_cnt_current)); + netif->loop_cnt_current = (u16_t)(netif->loop_cnt_current - clen); #endif /* LWIP_LOOPBACK_MAX_PBUFS */ /* 'in_end' now points to the last pbuf from 'in' */ @@ -953,6 +1246,8 @@ netif_poll(struct netif *netif) in_end->next = NULL; SYS_ARCH_UNPROTECT(lev); + in->if_idx = netif_get_index(netif); + LINK_STATS_INC(link.recv); MIB2_STATS_NETIF_ADD(stats_if, ifinoctets, in->tot_len); MIB2_STATS_NETIF_INC(stats_if, ifinucastpkts); @@ -972,12 +1267,10 @@ netif_poll(struct netif *netif) void netif_poll_all(void) { - struct netif *netif = netif_list; + struct netif *netif; /* loop through netifs */ - while (netif != NULL) { + NETIF_FOREACH(netif) { netif_poll(netif); - /* proceed to next network interface */ - netif = netif->next; } } #endif /* !LWIP_NETIF_LOOPBACK_MULTITHREADING */ @@ -996,8 +1289,13 @@ netif_alloc_client_data_id(void) u8_t result = netif_client_id; netif_client_id++; + LWIP_ASSERT_CORE_LOCKED(); + +#if LWIP_NUM_NETIF_CLIENT_DATA > 256 +#error LWIP_NUM_NETIF_CLIENT_DATA must be <= 256 +#endif LWIP_ASSERT("Increase LWIP_NUM_NETIF_CLIENT_DATA in lwipopts.h", result < LWIP_NUM_NETIF_CLIENT_DATA); - return result + LWIP_NETIF_CLIENT_DATA_INDEX_MAX; + return (u8_t)(result + LWIP_NETIF_CLIENT_DATA_INDEX_MAX); } #endif @@ -1015,9 +1313,13 @@ netif_alloc_client_data_id(void) void netif_ip6_addr_set(struct netif *netif, s8_t addr_idx, const ip6_addr_t *addr6) { - LWIP_ASSERT("addr6 != NULL", addr6 != NULL); + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ASSERT("netif_ip6_addr_set: invalid netif", netif != NULL); + LWIP_ASSERT("netif_ip6_addr_set: invalid addr6", addr6 != NULL); + netif_ip6_addr_set_parts(netif, addr_idx, addr6->addr[0], addr6->addr[1], - addr6->addr[2], addr6->addr[3]); + addr6->addr[2], addr6->addr[3]); } /* @@ -1033,45 +1335,48 @@ netif_ip6_addr_set(struct netif *netif, s8_t addr_idx, const ip6_addr_t *addr6) void netif_ip6_addr_set_parts(struct netif *netif, s8_t addr_idx, u32_t i0, u32_t i1, u32_t i2, u32_t i3) { - const ip6_addr_t *old_addr; + ip_addr_t old_addr; + ip_addr_t new_ipaddr; + LWIP_ASSERT_CORE_LOCKED(); LWIP_ASSERT("netif != NULL", netif != NULL); LWIP_ASSERT("invalid index", addr_idx < LWIP_IPV6_NUM_ADDRESSES); - old_addr = netif_ip6_addr(netif, addr_idx); + ip6_addr_copy(*ip_2_ip6(&old_addr), *netif_ip6_addr(netif, addr_idx)); + IP_SET_TYPE_VAL(old_addr, IPADDR_TYPE_V6); + /* address is actually being changed? */ - if ((old_addr->addr[0] != i0) || (old_addr->addr[1] != i1) || - (old_addr->addr[2] != i2) || (old_addr->addr[3] != i3)) { + if ((ip_2_ip6(&old_addr)->addr[0] != i0) || (ip_2_ip6(&old_addr)->addr[1] != i1) || + (ip_2_ip6(&old_addr)->addr[2] != i2) || (ip_2_ip6(&old_addr)->addr[3] != i3)) { LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_ip6_addr_set: netif address being changed\n")); - if (netif_ip6_addr_state(netif, addr_idx) & IP6_ADDR_VALID) { -#if LWIP_TCP || LWIP_UDP - ip_addr_t new_ipaddr; - IP_ADDR6(&new_ipaddr, i0, i1, i2, i3); -#endif /* LWIP_TCP || LWIP_UDP */ -#if LWIP_TCP - tcp_netif_ip_addr_changed(netif_ip_addr6(netif, addr_idx), &new_ipaddr); -#endif /* LWIP_TCP */ -#if LWIP_UDP - udp_netif_ip_addr_changed(netif_ip_addr6(netif, addr_idx), &new_ipaddr); -#endif /* LWIP_UDP */ -#if LWIP_RAW - raw_netif_ip_addr_changed(netif_ip_addr6(netif, addr_idx), &new_ipaddr); -#endif /* LWIP_RAW */ + IP_ADDR6(&new_ipaddr, i0, i1, i2, i3); + ip6_addr_assign_zone(ip_2_ip6(&new_ipaddr), IP6_UNICAST, netif); + + if (ip6_addr_isvalid(netif_ip6_addr_state(netif, addr_idx))) { + netif_do_ip_addr_changed(netif_ip_addr6(netif, addr_idx), &new_ipaddr); } /* @todo: remove/readd mib2 ip6 entries? */ - IP6_ADDR(ip_2_ip6(&(netif->ip6_addr[addr_idx])), i0, i1, i2, i3); - IP_SET_TYPE_VAL(netif->ip6_addr[addr_idx], IPADDR_TYPE_V6); + ip_addr_copy(netif->ip6_addr[addr_idx], new_ipaddr); - if (netif_ip6_addr_state(netif, addr_idx) & IP6_ADDR_VALID) { + if (ip6_addr_isvalid(netif_ip6_addr_state(netif, addr_idx))) { netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV6); NETIF_STATUS_CALLBACK(netif); } + +#if LWIP_NETIF_EXT_STATUS_CALLBACK + { + netif_ext_callback_args_t args; + args.ipv6_set.addr_index = addr_idx; + args.ipv6_set.old_address = &old_addr; + netif_invoke_ext_callback(netif, LWIP_NSC_IPV6_SET, &args); + } +#endif } LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("netif: IPv6 address %d of interface %c%c set to %s/0x%"X8_F"\n", - addr_idx, netif->name[0], netif->name[1], ip6addr_ntoa(netif_ip6_addr(netif, addr_idx)), - netif_ip6_addr_state(netif, addr_idx))); + addr_idx, netif->name[0], netif->name[1], ip6addr_ntoa(netif_ip6_addr(netif, addr_idx)), + netif_ip6_addr_state(netif, addr_idx))); } /** @@ -1085,9 +1390,10 @@ netif_ip6_addr_set_parts(struct netif *netif, s8_t addr_idx, u32_t i0, u32_t i1, * @param state the new IPv6 address state */ void -netif_ip6_addr_set_state(struct netif* netif, s8_t addr_idx, u8_t state) +netif_ip6_addr_set_state(struct netif *netif, s8_t addr_idx, u8_t state) { u8_t old_state; + LWIP_ASSERT_CORE_LOCKED(); LWIP_ASSERT("netif != NULL", netif != NULL); LWIP_ASSERT("invalid index", addr_idx < LWIP_IPV6_NUM_ADDRESSES); @@ -1107,39 +1413,47 @@ netif_ip6_addr_set_state(struct netif* netif, s8_t addr_idx, u8_t state) if (old_valid && !new_valid) { /* address about to be removed by setting invalid */ -#if LWIP_TCP - tcp_netif_ip_addr_changed(netif_ip_addr6(netif, addr_idx), NULL); -#endif /* LWIP_TCP */ -#if LWIP_UDP - udp_netif_ip_addr_changed(netif_ip_addr6(netif, addr_idx), NULL); -#endif /* LWIP_UDP */ -#if LWIP_RAW - raw_netif_ip_addr_changed(netif_ip_addr6(netif, addr_idx), NULL); -#endif /* LWIP_RAW */ + netif_do_ip_addr_changed(netif_ip_addr6(netif, addr_idx), NULL); /* @todo: remove mib2 ip6 entries? */ } netif->ip6_addr_state[addr_idx] = state; if (!old_valid && new_valid) { /* address added by setting valid */ + /* This is a good moment to check that the address is properly zoned. */ + IP6_ADDR_ZONECHECK_NETIF(netif_ip6_addr(netif, addr_idx), netif); /* @todo: add mib2 ip6 entries? */ netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV6); } - if ((old_state & IP6_ADDR_PREFERRED) != (state & IP6_ADDR_PREFERRED)) { - /* address state has changed (valid flag changed or switched between - preferred and deprecated) -> call the callback function */ + if ((old_state & ~IP6_ADDR_TENTATIVE_COUNT_MASK) != + (state & ~IP6_ADDR_TENTATIVE_COUNT_MASK)) { + /* address state has changed -> call the callback function */ NETIF_STATUS_CALLBACK(netif); } - } +#if LWIP_NETIF_EXT_STATUS_CALLBACK + { + netif_ext_callback_args_t args; + args.ipv6_addr_state_changed.addr_index = addr_idx; + args.ipv6_addr_state_changed.old_state = old_state; + args.ipv6_addr_state_changed.address = netif_ip_addr6(netif, addr_idx); + netif_invoke_ext_callback(netif, LWIP_NSC_IPV6_ADDR_STATE_CHANGED, &args); + } +#endif + } LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("netif: IPv6 address %d of interface %c%c set to %s/0x%"X8_F"\n", - addr_idx, netif->name[0], netif->name[1], ip6addr_ntoa(netif_ip6_addr(netif, addr_idx)), - netif_ip6_addr_state(netif, addr_idx))); + addr_idx, netif->name[0], netif->name[1], ip6addr_ntoa(netif_ip6_addr(netif, addr_idx)), + netif_ip6_addr_state(netif, addr_idx))); } /** - * Checks if a specific address is assigned to the netif and returns its - * index. + * Checks if a specific local address is present on the netif and returns its + * index. Depending on its state, it may or may not be assigned to the + * interface (as per RFC terminology). + * + * The given address may or may not be zoned (i.e., have a zone index other + * than IP6_NO_ZONE). If the address is zoned, it must have the correct zone + * for the given netif, or no match will be found. * * @param netif the netif to check * @param ip6addr the IPv6 address to find @@ -1150,9 +1464,21 @@ s8_t netif_get_ip6_addr_match(struct netif *netif, const ip6_addr_t *ip6addr) { s8_t i; + + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ASSERT("netif_get_ip6_addr_match: invalid netif", netif != NULL); + LWIP_ASSERT("netif_get_ip6_addr_match: invalid ip6addr", ip6addr != NULL); + +#if LWIP_IPV6_SCOPES + if (ip6_addr_has_zone(ip6addr) && !ip6_addr_test_zone(ip6addr, netif)) { + return -1; /* wrong zone, no match */ + } +#endif /* LWIP_IPV6_SCOPES */ + for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { if (!ip6_addr_isinvalid(netif_ip6_addr_state(netif, i)) && - ip6_addr_cmp(netif_ip6_addr(netif, i), ip6addr)) { + ip6_addr_cmp_zoneless(netif_ip6_addr(netif, i), ip6addr)) { return i; } } @@ -1172,6 +1498,10 @@ netif_create_ip6_linklocal_address(struct netif *netif, u8_t from_mac_48bit) { u8_t i, addr_index; + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ASSERT("netif_create_ip6_linklocal_address: invalid netif", netif != NULL); + /* Link-local prefix. */ ip_2_ip6(&netif->ip6_addr[0])->addr[0] = PP_HTONL(0xfe800000ul); ip_2_ip6(&netif->ip6_addr[0])->addr[1] = 0; @@ -1183,7 +1513,7 @@ netif_create_ip6_linklocal_address(struct netif *netif, u8_t from_mac_48bit) ((u32_t)(netif->hwaddr[1]) << 16) | ((u32_t)(netif->hwaddr[2]) << 8) | (0xff)); - ip_2_ip6(&netif->ip6_addr[0])->addr[3] = lwip_htonl((0xfeul << 24) | + ip_2_ip6(&netif->ip6_addr[0])->addr[3] = lwip_htonl((u32_t)(0xfeul << 24) | ((u32_t)(netif->hwaddr[3]) << 16) | ((u32_t)(netif->hwaddr[4]) << 8) | (netif->hwaddr[5])); @@ -1197,10 +1527,20 @@ netif_create_ip6_linklocal_address(struct netif *netif, u8_t from_mac_48bit) if (i == 4) { addr_index--; } - ip_2_ip6(&netif->ip6_addr[0])->addr[addr_index] |= ((u32_t)(netif->hwaddr[netif->hwaddr_len - i - 1])) << (8 * (i & 0x03)); + ip_2_ip6(&netif->ip6_addr[0])->addr[addr_index] |= lwip_htonl(((u32_t)(netif->hwaddr[netif->hwaddr_len - i - 1])) << (8 * (i & 0x03))); } } + /* Set a link-local zone. Even though the zone is implied by the owning + * netif, setting the zone anyway has two important conceptual advantages: + * 1) it avoids the need for a ton of exceptions in internal code, allowing + * e.g. ip6_addr_cmp() to be used on local addresses; + * 2) the properly zoned address is visible externally, e.g. when any outside + * code enumerates available addresses or uses one to bind a socket. + * Any external code unaware of address scoping is likely to just ignore the + * zone field, so this should not create any compatibility problems. */ + ip6_addr_assign_zone(ip_2_ip6(&netif->ip6_addr[0]), IP6_UNICAST, netif); + /* Set address state. */ #if LWIP_IPV6_DUP_DETECT_ATTEMPTS /* Will perform duplicate address detection (DAD). */ @@ -1226,6 +1566,11 @@ netif_add_ip6_address(struct netif *netif, const ip6_addr_t *ip6addr, s8_t *chos { s8_t i; + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ASSERT("netif_add_ip6_address: invalid netif", netif != NULL); + LWIP_ASSERT("netif_add_ip6_address: invalid ip6addr", ip6addr != NULL); + i = netif_get_ip6_addr_match(netif, ip6addr); if (i >= 0) { /* Address already added */ @@ -1235,10 +1580,11 @@ netif_add_ip6_address(struct netif *netif, const ip6_addr_t *ip6addr, s8_t *chos return ERR_OK; } - /* Find a free slot -- musn't be the first one (reserved for link local) */ - for (i = 1; i < LWIP_IPV6_NUM_ADDRESSES; i++) { + /* Find a free slot. The first one is reserved for link-local addresses. */ + for (i = ip6_addr_islinklocal(ip6addr) ? 0 : 1; i < LWIP_IPV6_NUM_ADDRESSES; i++) { if (ip6_addr_isinvalid(netif_ip6_addr_state(netif, i))) { ip_addr_copy_from_ip6(netif->ip6_addr[i], *ip6addr); + ip6_addr_assign_zone(ip_2_ip6(&netif->ip6_addr[i]), IP6_UNICAST, netif); netif_ip6_addr_set_state(netif, i, IP6_ADDR_TENTATIVE); if (chosen_idx != NULL) { *chosen_idx = i; @@ -1265,3 +1611,185 @@ netif_null_output_ip6(struct netif *netif, struct pbuf *p, const ip6_addr_t *ipa return ERR_IF; } #endif /* LWIP_IPV6 */ + +#if LWIP_IPV4 +/** Dummy IPv4 output function for netifs not supporting IPv4 + */ +static err_t +netif_null_output_ip4(struct netif *netif, struct pbuf *p, const ip4_addr_t *ipaddr) +{ + LWIP_UNUSED_ARG(netif); + LWIP_UNUSED_ARG(p); + LWIP_UNUSED_ARG(ipaddr); + + return ERR_IF; +} +#endif /* LWIP_IPV4 */ + +/** +* @ingroup netif +* Return the interface index for the netif with name +* or NETIF_NO_INDEX if not found/on error +* +* @param name the name of the netif +*/ +u8_t +netif_name_to_index(const char *name) +{ + struct netif *netif = netif_find(name); + if (netif != NULL) { + return netif_get_index(netif); + } + /* No name found, return invalid index */ + return NETIF_NO_INDEX; +} + +/** +* @ingroup netif +* Return the interface name for the netif matching index +* or NULL if not found/on error +* +* @param idx the interface index of the netif +* @param name char buffer of at least NETIF_NAMESIZE bytes +*/ +char * +netif_index_to_name(u8_t idx, char *name) +{ + struct netif *netif = netif_get_by_index(idx); + + if (netif != NULL) { + name[0] = netif->name[0]; + name[1] = netif->name[1]; + lwip_itoa(&name[2], NETIF_NAMESIZE - 2, netif_index_to_num(idx)); + return name; + } + return NULL; +} + +/** +* @ingroup netif +* Return the interface for the netif index +* +* @param idx index of netif to find +*/ +struct netif * +netif_get_by_index(u8_t idx) +{ + struct netif *netif; + + LWIP_ASSERT_CORE_LOCKED(); + + if (idx != NETIF_NO_INDEX) { + NETIF_FOREACH(netif) { + if (idx == netif_get_index(netif)) { + return netif; /* found! */ + } + } + } + + return NULL; +} + +/** + * @ingroup netif + * Find a network interface by searching for its name + * + * @param name the name of the netif (like netif->name) plus concatenated number + * in ascii representation (e.g. 'en0') + */ +struct netif * +netif_find(const char *name) +{ + struct netif *netif; + u8_t num; + + LWIP_ASSERT_CORE_LOCKED(); + + if (name == NULL) { + return NULL; + } + + num = (u8_t)atoi(&name[2]); + + NETIF_FOREACH(netif) { + if (num == netif->num && + name[0] == netif->name[0] && + name[1] == netif->name[1]) { + LWIP_DEBUGF(NETIF_DEBUG, ("netif_find: found %c%c\n", name[0], name[1])); + return netif; + } + } + LWIP_DEBUGF(NETIF_DEBUG, ("netif_find: didn't find %c%c\n", name[0], name[1])); + return NULL; +} + +#if LWIP_NETIF_EXT_STATUS_CALLBACK +/** + * @ingroup netif + * Add extended netif events listener + * @param callback pointer to listener structure + * @param fn callback function + */ +void +netif_add_ext_callback(netif_ext_callback_t *callback, netif_ext_callback_fn fn) +{ + LWIP_ASSERT_CORE_LOCKED(); + LWIP_ASSERT("callback must be != NULL", callback != NULL); + LWIP_ASSERT("fn must be != NULL", fn != NULL); + + callback->callback_fn = fn; + callback->next = ext_callback; + ext_callback = callback; +} + +/** + * @ingroup netif + * Remove extended netif events listener + * @param callback pointer to listener structure + */ +void +netif_remove_ext_callback(netif_ext_callback_t* callback) +{ + netif_ext_callback_t *last, *iter; + + LWIP_ASSERT_CORE_LOCKED(); + LWIP_ASSERT("callback must be != NULL", callback != NULL); + + if (ext_callback == NULL) { + return; + } + + if (callback == ext_callback) { + ext_callback = ext_callback->next; + } else { + last = ext_callback; + for (iter = ext_callback->next; iter != NULL; last = iter, iter = iter->next) { + if (iter == callback) { + LWIP_ASSERT("last != NULL", last != NULL); + last->next = callback->next; + callback->next = NULL; + return; + } + } + } +} + +/** + * Invoke extended netif status event + * @param netif netif that is affected by change + * @param reason change reason + * @param args depends on reason, see reason description + */ +void +netif_invoke_ext_callback(struct netif *netif, netif_nsc_reason_t reason, const netif_ext_callback_args_t *args) +{ + netif_ext_callback_t *callback = ext_callback; + + LWIP_ASSERT("netif must be != NULL", netif != NULL); + + while (callback != NULL) { + callback->callback_fn(netif, reason, args); + callback = callback->next; + } +} +#endif /* LWIP_NETIF_EXT_STATUS_CALLBACK */ diff --git a/Libraries/LwIP/src/core/pbuf.c b/Libraries/LwIP/src/core/pbuf.c index 95e762f..7579d86 100755 --- a/Libraries/LwIP/src/core/pbuf.c +++ b/Libraries/LwIP/src/core/pbuf.c @@ -33,48 +33,7 @@ * Therefore, looping through a pbuf of a single packet, has an * loop end condition (tot_len == p->len), NOT (next == NULL). * - * Example of custom pbuf usage for zero-copy RX: - @code{.c} -typedef struct my_custom_pbuf -{ - struct pbuf_custom p; - void* dma_descriptor; -} my_custom_pbuf_t; - -LWIP_MEMPOOL_DECLARE(RX_POOL, 10, sizeof(my_custom_pbuf_t), "Zero-copy RX PBUF pool"); - -void my_pbuf_free_custom(void* p) -{ - my_custom_pbuf_t* my_puf = (my_custom_pbuf_t*)p; - - LOCK_INTERRUPTS(); - free_rx_dma_descriptor(my_pbuf->dma_descriptor); - LWIP_MEMPOOL_FREE(RX_POOL, my_pbuf); - UNLOCK_INTERRUPTS(); -} - -void eth_rx_irq() -{ - dma_descriptor* dma_desc = get_RX_DMA_descriptor_from_ethernet(); - my_custom_pbuf_t* my_pbuf = (my_custom_pbuf_t*)LWIP_MEMPOOL_ALLOC(RX_POOL); - - my_pbuf->p.custom_free_function = my_pbuf_free_custom; - my_pbuf->dma_descriptor = dma_desc; - - invalidate_cpu_cache(dma_desc->rx_data, dma_desc->rx_length); - - struct pbuf* p = pbuf_alloced_custom(PBUF_RAW, - dma_desc->rx_length, - PBUF_REF, - &my_pbuf->p, - dma_desc->rx_data, - dma_desc->max_buffer_size); - - if(netif->input(p, netif) != ERR_OK) { - pbuf_free(p); - } -} - @endcode + * Example of custom pbuf usage: @ref zerocopyrx */ /* @@ -111,12 +70,13 @@ void eth_rx_irq() #include "lwip/opt.h" +#include "lwip/pbuf.h" #include "lwip/stats.h" #include "lwip/def.h" #include "lwip/mem.h" #include "lwip/memp.h" -#include "lwip/pbuf.h" #include "lwip/sys.h" +#include "lwip/netif.h" #if LWIP_TCP && TCP_QUEUE_OOSEQ #include "lwip/priv/tcp_priv.h" #endif @@ -131,6 +91,9 @@ void eth_rx_irq() aligned there. Therefore, PBUF_POOL_BUFSIZE_ALIGNED can be used here. */ #define PBUF_POOL_BUFSIZE_ALIGNED LWIP_MEM_ALIGN_SIZE(PBUF_POOL_BUFSIZE) +static const struct pbuf * +pbuf_skip_const(const struct pbuf *in, u16_t in_offset, u16_t *out_offset); + #if !LWIP_TCP || !TCP_QUEUE_OOSEQ || !PBUF_POOL_FREE_OOSEQ #define PBUF_POOL_IS_EMPTY() #else /* !LWIP_TCP || !TCP_QUEUE_OOSEQ || !PBUF_POOL_FREE_OOSEQ */ @@ -139,7 +102,7 @@ void eth_rx_irq() #ifndef PBUF_POOL_FREE_OOSEQ_QUEUE_CALL #include "lwip/tcpip.h" #define PBUF_POOL_FREE_OOSEQ_QUEUE_CALL() do { \ - if (tcpip_callback_with_block(pbuf_free_ooseq_callback, NULL, 0) != ERR_OK) { \ + if (tcpip_try_callback(pbuf_free_ooseq_callback, NULL) != ERR_OK) { \ SYS_ARCH_PROTECT(old_level); \ pbuf_free_ooseq_pending = 0; \ SYS_ARCH_UNPROTECT(old_level); \ @@ -164,15 +127,14 @@ static void pbuf_free_ooseq(void) { - struct tcp_pcb* pcb; + struct tcp_pcb *pcb; SYS_ARCH_SET(pbuf_free_ooseq_pending, 0); for (pcb = tcp_active_pcbs; NULL != pcb; pcb = pcb->next) { - if (NULL != pcb->ooseq) { + if (pcb->ooseq != NULL) { /** Free the ooseq pbufs of one PCB only */ LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free_ooseq: freeing out-of-sequence pbufs\n")); - tcp_segs_free(pcb->ooseq); - pcb->ooseq = NULL; + tcp_free_ooseq(pcb); return; } } @@ -212,6 +174,20 @@ pbuf_pool_is_empty(void) } #endif /* !LWIP_TCP || !TCP_QUEUE_OOSEQ || !PBUF_POOL_FREE_OOSEQ */ +/* Initialize members of struct pbuf after allocation */ +static void +pbuf_init_alloced_pbuf(struct pbuf *p, void *payload, u16_t tot_len, u16_t len, pbuf_type type, u8_t flags) +{ + p->next = NULL; + p->payload = payload; + p->tot_len = tot_len; + p->len = len; + p->type_internal = (u8_t)type; + p->flags = flags; + p->ref = 1; + p->if_idx = NETIF_NO_INDEX; +} + /** * @ingroup pbuf * Allocates a pbuf of the given type (possibly a chain for PBUF_POOL type). @@ -220,7 +196,7 @@ pbuf_pool_is_empty(void) * layer at which the pbuf is allocated and the requested size * (from the size parameter). * - * @param layer flag to define header size + * @param layer header size * @param length size of the pbuf's payload * @param type this parameter decides how and where the pbuf * should be allocated as follows: @@ -247,169 +223,131 @@ pbuf_pool_is_empty(void) struct pbuf * pbuf_alloc(pbuf_layer layer, u16_t length, pbuf_type type) { - struct pbuf *p, *q, *r; - u16_t offset; - s32_t rem_len; /* remaining length */ + struct pbuf *p; + u16_t offset = (u16_t)layer; LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F")\n", length)); - /* determine header offset */ - switch (layer) { - case PBUF_TRANSPORT: - /* add room for transport (often TCP) layer header */ - offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN; - break; - case PBUF_IP: - /* add room for IP layer header */ - offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN; - break; - case PBUF_LINK: - /* add room for link layer header */ - offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN; - break; - case PBUF_RAW_TX: - /* add room for encapsulating link layer headers (e.g. 802.11) */ - offset = PBUF_LINK_ENCAPSULATION_HLEN; - break; - case PBUF_RAW: - /* no offset (e.g. RX buffers or chain successors) */ - offset = 0; - break; - default: - LWIP_ASSERT("pbuf_alloc: bad pbuf layer", 0); - return NULL; - } - switch (type) { - case PBUF_POOL: - /* allocate head of pbuf chain into p */ - p = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc: allocated pbuf %p\n", (void *)p)); - if (p == NULL) { - PBUF_POOL_IS_EMPTY(); - return NULL; + case PBUF_REF: /* fall through */ + case PBUF_ROM: + p = pbuf_alloc_reference(NULL, length, type); + break; + case PBUF_POOL: { + struct pbuf *q, *last; + u16_t rem_len; /* remaining length */ + p = NULL; + last = NULL; + rem_len = length; + do { + u16_t qlen; + q = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); + if (q == NULL) { + PBUF_POOL_IS_EMPTY(); + /* free chain so far allocated */ + if (p) { + pbuf_free(p); + } + /* bail out unsuccessfully */ + return NULL; + } + qlen = LWIP_MIN(rem_len, (u16_t)(PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset))); + pbuf_init_alloced_pbuf(q, LWIP_MEM_ALIGN((void *)((u8_t *)q + SIZEOF_STRUCT_PBUF + offset)), + rem_len, qlen, type, 0); + LWIP_ASSERT("pbuf_alloc: pbuf q->payload properly aligned", + ((mem_ptr_t)q->payload % MEM_ALIGNMENT) == 0); + LWIP_ASSERT("PBUF_POOL_BUFSIZE must be bigger than MEM_ALIGNMENT", + (PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)) > 0 ); + if (p == NULL) { + /* allocated head of pbuf chain (into p) */ + p = q; + } else { + /* make previous pbuf point to this pbuf */ + last->next = q; + } + last = q; + rem_len = (u16_t)(rem_len - qlen); + offset = 0; + } while (rem_len > 0); + break; } - p->type = type; - p->next = NULL; + case PBUF_RAM: { + u16_t payload_len = (u16_t)(LWIP_MEM_ALIGN_SIZE(offset) + LWIP_MEM_ALIGN_SIZE(length)); + mem_size_t alloc_len = (mem_size_t)(LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF) + payload_len); - /* make the payload pointer point 'offset' bytes into pbuf data memory */ - p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + (SIZEOF_STRUCT_PBUF + offset))); - LWIP_ASSERT("pbuf_alloc: pbuf p->payload properly aligned", - ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); - /* the total length of the pbuf chain is the requested size */ - p->tot_len = length; - /* set the length of the first pbuf in the chain */ - p->len = LWIP_MIN(length, PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)); - LWIP_ASSERT("check p->payload + p->len does not overflow pbuf", - ((u8_t*)p->payload + p->len <= - (u8_t*)p + SIZEOF_STRUCT_PBUF + PBUF_POOL_BUFSIZE_ALIGNED)); - LWIP_ASSERT("PBUF_POOL_BUFSIZE must be bigger than MEM_ALIGNMENT", - (PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)) > 0 ); - /* set reference count (needed here in case we fail) */ - p->ref = 1; - - /* now allocate the tail of the pbuf chain */ - - /* remember first pbuf for linkage in next iteration */ - r = p; - /* remaining length to be allocated */ - rem_len = length - p->len; - /* any remaining pbufs to be allocated? */ - while (rem_len > 0) { - q = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); - if (q == NULL) { - PBUF_POOL_IS_EMPTY(); - /* free chain so far allocated */ - pbuf_free(p); - /* bail out unsuccessfully */ - return NULL; - } - q->type = type; - q->flags = 0; - q->next = NULL; - /* make previous pbuf point to this pbuf */ - r->next = q; - /* set total length of this pbuf and next in chain */ - LWIP_ASSERT("rem_len < max_u16_t", rem_len < 0xffff); - q->tot_len = (u16_t)rem_len; - /* this pbuf length is pool size, unless smaller sized tail */ - q->len = LWIP_MIN((u16_t)rem_len, PBUF_POOL_BUFSIZE_ALIGNED); - q->payload = (void *)((u8_t *)q + SIZEOF_STRUCT_PBUF); - LWIP_ASSERT("pbuf_alloc: pbuf q->payload properly aligned", - ((mem_ptr_t)q->payload % MEM_ALIGNMENT) == 0); - LWIP_ASSERT("check p->payload + p->len does not overflow pbuf", - ((u8_t*)p->payload + p->len <= - (u8_t*)p + SIZEOF_STRUCT_PBUF + PBUF_POOL_BUFSIZE_ALIGNED)); - q->ref = 1; - /* calculate remaining length to be allocated */ - rem_len -= q->len; - /* remember this pbuf for linkage in next iteration */ - r = q; - } - /* end of chain */ - /*r->next = NULL;*/ - - break; - case PBUF_RAM: - { - mem_size_t alloc_len = LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF + offset) + LWIP_MEM_ALIGN_SIZE(length); - /* bug #50040: Check for integer overflow when calculating alloc_len */ - if (alloc_len < LWIP_MEM_ALIGN_SIZE(length)) { + if ((payload_len < LWIP_MEM_ALIGN_SIZE(length)) || + (alloc_len < LWIP_MEM_ALIGN_SIZE(length))) { return NULL; } - + /* If pbuf is to be allocated in RAM, allocate memory for it. */ - p = (struct pbuf*)mem_malloc(alloc_len); + p = (struct pbuf *)mem_malloc(alloc_len); + if (p == NULL) { + return NULL; + } + pbuf_init_alloced_pbuf(p, LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)), + length, length, type, 0); + LWIP_ASSERT("pbuf_alloc: pbuf->payload properly aligned", + ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); + break; } - - if (p == NULL) { + default: + LWIP_ASSERT("pbuf_alloc: erroneous type", 0); return NULL; - } - /* Set up internal structure of the pbuf. */ - p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)); - p->len = p->tot_len = length; - p->next = NULL; - p->type = type; - - LWIP_ASSERT("pbuf_alloc: pbuf->payload properly aligned", - ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); - break; - /* pbuf references existing (non-volatile static constant) ROM payload? */ - case PBUF_ROM: - /* pbuf references existing (externally allocated) RAM payload? */ - case PBUF_REF: - /* only allocate memory for the pbuf structure */ - p = (struct pbuf *)memp_malloc(MEMP_PBUF); - if (p == NULL) { - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("pbuf_alloc: Could not allocate MEMP_PBUF for PBUF_%s.\n", - (type == PBUF_ROM) ? "ROM" : "REF")); - return NULL; - } - /* caller must set this field properly, afterwards */ - p->payload = NULL; - p->len = p->tot_len = length; - p->next = NULL; - p->type = type; - break; - default: - LWIP_ASSERT("pbuf_alloc: erroneous type", 0); - return NULL; } - /* set reference count */ - p->ref = 1; - /* set flags */ - p->flags = 0; LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F") == %p\n", length, (void *)p)); return p; } +/** + * @ingroup pbuf + * Allocates a pbuf for referenced data. + * Referenced data can be volatile (PBUF_REF) or long-lived (PBUF_ROM). + * + * The actual memory allocated for the pbuf is determined by the + * layer at which the pbuf is allocated and the requested size + * (from the size parameter). + * + * @param payload referenced payload + * @param length size of the pbuf's payload + * @param type this parameter decides how and where the pbuf + * should be allocated as follows: + * + * - PBUF_ROM: It is assumed that the memory used is really + * similar to ROM in that it is immutable and will not be + * changed. Memory which is dynamic should generally not + * be attached to PBUF_ROM pbufs. Use PBUF_REF instead. + * - PBUF_REF: It is assumed that the pbuf is only + * being used in a single thread. If the pbuf gets queued, + * then pbuf_take should be called to copy the buffer. + * + * @return the allocated pbuf. + */ +struct pbuf * +pbuf_alloc_reference(void *payload, u16_t length, pbuf_type type) +{ + struct pbuf *p; + LWIP_ASSERT("invalid pbuf_type", (type == PBUF_REF) || (type == PBUF_ROM)); + /* only allocate memory for the pbuf structure */ + p = (struct pbuf *)memp_malloc(MEMP_PBUF); + if (p == NULL) { + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_SERIOUS, + ("pbuf_alloc_reference: Could not allocate MEMP_PBUF for PBUF_%s.\n", + (type == PBUF_ROM) ? "ROM" : "REF")); + return NULL; + } + pbuf_init_alloced_pbuf(p, payload, length, length, type, 0); + return p; +} + + #if LWIP_SUPPORT_CUSTOM_PBUF /** * @ingroup pbuf * Initialize a custom pbuf (already allocated). + * Example of custom pbuf usage: @ref zerocopyrx * - * @param l flag to define header size + * @param l header size * @param length size of the pbuf's payload * @param type type of the pbuf (only used to treat the pbuf accordingly, as * this function allocates no memory) @@ -421,54 +359,25 @@ pbuf_alloc(pbuf_layer layer, u16_t length, pbuf_type type) * @param payload_mem_len the size of the 'payload_mem' buffer, must be at least * big enough to hold 'length' plus the header size */ -struct pbuf* +struct pbuf * pbuf_alloced_custom(pbuf_layer l, u16_t length, pbuf_type type, struct pbuf_custom *p, void *payload_mem, u16_t payload_mem_len) { - u16_t offset; + u16_t offset = (u16_t)l; + void *payload; LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloced_custom(length=%"U16_F")\n", length)); - /* determine header offset */ - switch (l) { - case PBUF_TRANSPORT: - /* add room for transport (often TCP) layer header */ - offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN; - break; - case PBUF_IP: - /* add room for IP layer header */ - offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN; - break; - case PBUF_LINK: - /* add room for link layer header */ - offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN; - break; - case PBUF_RAW_TX: - /* add room for encapsulating link layer headers (e.g. 802.11) */ - offset = PBUF_LINK_ENCAPSULATION_HLEN; - break; - case PBUF_RAW: - offset = 0; - break; - default: - LWIP_ASSERT("pbuf_alloced_custom: bad pbuf layer", 0); - return NULL; - } - if (LWIP_MEM_ALIGN_SIZE(offset) + length > payload_mem_len) { LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_WARNING, ("pbuf_alloced_custom(length=%"U16_F") buffer too short\n", length)); return NULL; } - p->pbuf.next = NULL; if (payload_mem != NULL) { - p->pbuf.payload = (u8_t *)payload_mem + LWIP_MEM_ALIGN_SIZE(offset); + payload = (u8_t *)payload_mem + LWIP_MEM_ALIGN_SIZE(offset); } else { - p->pbuf.payload = NULL; + payload = NULL; } - p->pbuf.flags = PBUF_FLAG_IS_CUSTOM; - p->pbuf.len = p->pbuf.tot_len = length; - p->pbuf.type = type; - p->pbuf.ref = 1; + pbuf_init_alloced_pbuf(&p->pbuf, payload, length, length, type, PBUF_FLAG_IS_CUSTOM); return &p->pbuf; } #endif /* LWIP_SUPPORT_CUSTOM_PBUF */ @@ -494,13 +403,9 @@ pbuf_realloc(struct pbuf *p, u16_t new_len) { struct pbuf *q; u16_t rem_len; /* remaining length */ - s32_t grow; + u16_t shrink; LWIP_ASSERT("pbuf_realloc: p != NULL", p != NULL); - LWIP_ASSERT("pbuf_realloc: sane p->type", p->type == PBUF_POOL || - p->type == PBUF_ROM || - p->type == PBUF_RAM || - p->type == PBUF_REF); /* desired length larger than current length? */ if (new_len >= p->tot_len) { @@ -510,7 +415,7 @@ pbuf_realloc(struct pbuf *p, u16_t new_len) /* the pbuf chain grows by (new_len - p->tot_len) bytes * (which may be negative in case of shrinking) */ - grow = new_len - p->tot_len; + shrink = (u16_t)(p->tot_len - new_len); /* first, step over any pbufs that should remain in the chain */ rem_len = new_len; @@ -518,10 +423,9 @@ pbuf_realloc(struct pbuf *p, u16_t new_len) /* should this pbuf be kept? */ while (rem_len > q->len) { /* decrease remaining length by pbuf length */ - rem_len -= q->len; + rem_len = (u16_t)(rem_len - q->len); /* decrease total length indicator */ - LWIP_ASSERT("grow < max_u16_t", grow < 0xffff); - q->tot_len += (u16_t)grow; + q->tot_len = (u16_t)(q->tot_len - shrink); /* proceed to next pbuf in chain */ q = q->next; LWIP_ASSERT("pbuf_realloc: q != NULL", q != NULL); @@ -531,13 +435,13 @@ pbuf_realloc(struct pbuf *p, u16_t new_len) /* shrink allocated memory for PBUF_RAM */ /* (other types merely adjust their length fields */ - if ((q->type == PBUF_RAM) && (rem_len != q->len) + if (pbuf_match_allocsrc(q, PBUF_TYPE_ALLOC_SRC_MASK_STD_HEAP) && (rem_len != q->len) #if LWIP_SUPPORT_CUSTOM_PBUF && ((q->flags & PBUF_FLAG_IS_CUSTOM) == 0) #endif /* LWIP_SUPPORT_CUSTOM_PBUF */ ) { /* reallocate and adjust the length of the pbuf that will be split */ - q = (struct pbuf *)mem_trim(q, (u16_t)((u8_t *)q->payload - (u8_t *)q) + rem_len); + q = (struct pbuf *)mem_trim(q, (mem_size_t)(((u8_t *)q->payload - (u8_t *)q) + rem_len)); LWIP_ASSERT("mem_trim returned q == NULL", q != NULL); } /* adjust length fields for new last pbuf */ @@ -555,8 +459,8 @@ pbuf_realloc(struct pbuf *p, u16_t new_len) } /** - * Adjusts the payload pointer to hide or reveal headers in the payload. - * @see pbuf_header. + * Adjusts the payload pointer to reveal headers in the payload. + * @see pbuf_add_header. * * @param p pbuf to change the header size. * @param header_size_increment Number of bytes to increment header size. @@ -566,81 +470,158 @@ pbuf_realloc(struct pbuf *p, u16_t new_len) * */ static u8_t -pbuf_header_impl(struct pbuf *p, s16_t header_size_increment, u8_t force) +pbuf_add_header_impl(struct pbuf *p, size_t header_size_increment, u8_t force) { - u16_t type; + u16_t type_internal; void *payload; u16_t increment_magnitude; LWIP_ASSERT("p != NULL", p != NULL); - if ((header_size_increment == 0) || (p == NULL)) { + if ((p == NULL) || (header_size_increment > 0xFFFF)) { + return 1; + } + if (header_size_increment == 0) { return 0; } - if (header_size_increment < 0) { - increment_magnitude = (u16_t)-header_size_increment; - /* Check that we aren't going to move off the end of the pbuf */ - LWIP_ERROR("increment_magnitude <= p->len", (increment_magnitude <= p->len), return 1;); - } else { - increment_magnitude = (u16_t)header_size_increment; -#if 0 - /* Can't assert these as some callers speculatively call - pbuf_header() to see if it's OK. Will return 1 below instead. */ - /* Check that we've got the correct type of pbuf to work with */ - LWIP_ASSERT("p->type == PBUF_RAM || p->type == PBUF_POOL", - p->type == PBUF_RAM || p->type == PBUF_POOL); - /* Check that we aren't going to move off the beginning of the pbuf */ - LWIP_ASSERT("p->payload - increment_magnitude >= p + SIZEOF_STRUCT_PBUF", - (u8_t *)p->payload - increment_magnitude >= (u8_t *)p + SIZEOF_STRUCT_PBUF); -#endif + increment_magnitude = (u16_t)header_size_increment; + /* Do not allow tot_len to wrap as a result. */ + if ((u16_t)(increment_magnitude + p->tot_len) < increment_magnitude) { + return 1; } - type = p->type; - /* remember current payload pointer */ - payload = p->payload; + type_internal = p->type_internal; /* pbuf types containing payloads? */ - if (type == PBUF_RAM || type == PBUF_POOL) { + if (type_internal & PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS) { /* set new payload pointer */ - p->payload = (u8_t *)p->payload - header_size_increment; + payload = (u8_t *)p->payload - header_size_increment; /* boundary check fails? */ - if ((u8_t *)p->payload < (u8_t *)p + SIZEOF_STRUCT_PBUF) { + if ((u8_t *)payload < (u8_t *)p + SIZEOF_STRUCT_PBUF) { LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE, - ("pbuf_header: failed as %p < %p (not enough space for new header size)\n", - (void *)p->payload, (void *)((u8_t *)p + SIZEOF_STRUCT_PBUF))); - /* restore old payload pointer */ - p->payload = payload; + ("pbuf_add_header: failed as %p < %p (not enough space for new header size)\n", + (void *)payload, (void *)((u8_t *)p + SIZEOF_STRUCT_PBUF))); /* bail out unsuccessfully */ return 1; } - /* pbuf types referring to external payloads? */ - } else if (type == PBUF_REF || type == PBUF_ROM) { + /* pbuf types referring to external payloads? */ + } else { /* hide a header in the payload? */ - if ((header_size_increment < 0) && (increment_magnitude <= p->len)) { - /* increase payload pointer */ - p->payload = (u8_t *)p->payload - header_size_increment; - } else if ((header_size_increment > 0) && force) { - p->payload = (u8_t *)p->payload - header_size_increment; + if (force) { + payload = (u8_t *)p->payload - header_size_increment; } else { /* cannot expand payload to front (yet!) * bail out unsuccessfully */ return 1; } - } else { - /* Unknown type */ - LWIP_ASSERT("bad pbuf type", 0); - return 1; } - /* modify pbuf length fields */ - p->len += header_size_increment; - p->tot_len += header_size_increment; + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_add_header: old %p new %p (%"U16_F")\n", + (void *)p->payload, (void *)payload, increment_magnitude)); + + /* modify pbuf fields */ + p->payload = payload; + p->len = (u16_t)(p->len + increment_magnitude); + p->tot_len = (u16_t)(p->tot_len + increment_magnitude); - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_header: old %p new %p (%"S16_F")\n", - (void *)payload, (void *)p->payload, header_size_increment)); return 0; } +/** + * Adjusts the payload pointer to reveal headers in the payload. + * + * Adjusts the ->payload pointer so that space for a header + * appears in the pbuf payload. + * + * The ->payload, ->tot_len and ->len fields are adjusted. + * + * @param p pbuf to change the header size. + * @param header_size_increment Number of bytes to increment header size which + * increases the size of the pbuf. New space is on the front. + * If header_size_increment is 0, this function does nothing and returns successful. + * + * PBUF_ROM and PBUF_REF type buffers cannot have their sizes increased, so + * the call will fail. A check is made that the increase in header size does + * not move the payload pointer in front of the start of the buffer. + * + * @return non-zero on failure, zero on success. + * + */ +u8_t +pbuf_add_header(struct pbuf *p, size_t header_size_increment) +{ + return pbuf_add_header_impl(p, header_size_increment, 0); +} + +/** + * Same as @ref pbuf_add_header but does not check if 'header_size > 0' is allowed. + * This is used internally only, to allow PBUF_REF for RX. + */ +u8_t +pbuf_add_header_force(struct pbuf *p, size_t header_size_increment) +{ + return pbuf_add_header_impl(p, header_size_increment, 1); +} + +/** + * Adjusts the payload pointer to hide headers in the payload. + * + * Adjusts the ->payload pointer so that space for a header + * disappears in the pbuf payload. + * + * The ->payload, ->tot_len and ->len fields are adjusted. + * + * @param p pbuf to change the header size. + * @param header_size_decrement Number of bytes to decrement header size which + * decreases the size of the pbuf. + * If header_size_decrement is 0, this function does nothing and returns successful. + * @return non-zero on failure, zero on success. + * + */ +u8_t +pbuf_remove_header(struct pbuf *p, size_t header_size_decrement) +{ + void *payload; + u16_t increment_magnitude; + + LWIP_ASSERT("p != NULL", p != NULL); + if ((p == NULL) || (header_size_decrement > 0xFFFF)) { + return 1; + } + if (header_size_decrement == 0) { + return 0; + } + + increment_magnitude = (u16_t)header_size_decrement; + /* Check that we aren't going to move off the end of the pbuf */ + LWIP_ERROR("increment_magnitude <= p->len", (increment_magnitude <= p->len), return 1;); + + /* remember current payload pointer */ + payload = p->payload; + LWIP_UNUSED_ARG(payload); /* only used in LWIP_DEBUGF below */ + + /* increase payload pointer (guarded by length check above) */ + p->payload = (u8_t *)p->payload + header_size_decrement; + /* modify pbuf length fields */ + p->len = (u16_t)(p->len - increment_magnitude); + p->tot_len = (u16_t)(p->tot_len - increment_magnitude); + + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_remove_header: old %p new %p (%"U16_F")\n", + (void *)payload, (void *)p->payload, increment_magnitude)); + + return 0; +} + +static u8_t +pbuf_header_impl(struct pbuf *p, s16_t header_size_increment, u8_t force) +{ + if (header_size_increment < 0) { + return pbuf_remove_header(p, (size_t) - header_size_increment); + } else { + return pbuf_add_header_impl(p, (size_t)header_size_increment, force); + } +} + /** * Adjusts the payload pointer to hide or reveal headers in the payload. * @@ -653,7 +634,7 @@ pbuf_header_impl(struct pbuf *p, s16_t header_size_increment, u8_t force) * @param header_size_increment Number of bytes to increment header size which * increases the size of the pbuf. New space is on the front. * (Using a negative value decreases the header size.) - * If hdr_size_inc is 0, this function does nothing and returns successful. + * If header_size_increment is 0, this function does nothing and returns successful. * * PBUF_ROM and PBUF_REF type buffers cannot have their sizes increased, so * the call will fail. A check is made that the increase in header size does @@ -664,7 +645,7 @@ pbuf_header_impl(struct pbuf *p, s16_t header_size_increment, u8_t force) u8_t pbuf_header(struct pbuf *p, s16_t header_size_increment) { - return pbuf_header_impl(p, header_size_increment, 0); + return pbuf_header_impl(p, header_size_increment, 0); } /** @@ -674,7 +655,36 @@ pbuf_header(struct pbuf *p, s16_t header_size_increment) u8_t pbuf_header_force(struct pbuf *p, s16_t header_size_increment) { - return pbuf_header_impl(p, header_size_increment, 1); + return pbuf_header_impl(p, header_size_increment, 1); +} + +/** Similar to pbuf_header(-size) but de-refs header pbufs for (size >= p->len) + * + * @param q pbufs to operate on + * @param size The number of bytes to remove from the beginning of the pbuf list. + * While size >= p->len, pbufs are freed. + * ATTENTION: this is the opposite direction as @ref pbuf_header, but + * takes an u16_t not s16_t! + * @return the new head pbuf + */ +struct pbuf * +pbuf_free_header(struct pbuf *q, u16_t size) +{ + struct pbuf *p = q; + u16_t free_left = size; + while (free_left && p) { + if (free_left >= p->len) { + struct pbuf *f = p; + free_left = (u16_t)(free_left - p->len); + p = p->next; + f->next = 0; + pbuf_free(f); + } else { + pbuf_remove_header(p, free_left); + free_left = 0; + } + } + return p; } /** @@ -714,7 +724,7 @@ pbuf_header_force(struct pbuf *p, s16_t header_size_increment) u8_t pbuf_free(struct pbuf *p) { - u16_t type; + u8_t alloc_src; struct pbuf *q; u8_t count; @@ -722,22 +732,18 @@ pbuf_free(struct pbuf *p) LWIP_ASSERT("p != NULL", p != NULL); /* if assertions are disabled, proceed with debug output */ LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("pbuf_free(p == NULL) was called.\n")); + ("pbuf_free(p == NULL) was called.\n")); return 0; } LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free(%p)\n", (void *)p)); PERF_START; - LWIP_ASSERT("pbuf_free: sane type", - p->type == PBUF_RAM || p->type == PBUF_ROM || - p->type == PBUF_REF || p->type == PBUF_POOL); - count = 0; /* de-allocate all consecutive pbufs from the head of the chain that * obtain a zero reference count after decrementing*/ while (p != NULL) { - u16_t ref; + LWIP_PBUF_REF_T ref; SYS_ARCH_DECL_PROTECT(old_level); /* Since decrementing ref cannot be guaranteed to be a single machine operation * we must protect it. We put the new ref into a local variable to prevent @@ -753,34 +759,37 @@ pbuf_free(struct pbuf *p) /* remember next pbuf in chain for next iteration */ q = p->next; LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free: deallocating %p\n", (void *)p)); - type = p->type; + alloc_src = pbuf_get_allocsrc(p); #if LWIP_SUPPORT_CUSTOM_PBUF /* is this a custom pbuf? */ if ((p->flags & PBUF_FLAG_IS_CUSTOM) != 0) { - struct pbuf_custom *pc = (struct pbuf_custom*)p; + struct pbuf_custom *pc = (struct pbuf_custom *)p; LWIP_ASSERT("pc->custom_free_function != NULL", pc->custom_free_function != NULL); pc->custom_free_function(p); } else #endif /* LWIP_SUPPORT_CUSTOM_PBUF */ { /* is this a pbuf from the pool? */ - if (type == PBUF_POOL) { + if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF_POOL) { memp_free(MEMP_PBUF_POOL, p); - /* is this a ROM or RAM referencing pbuf? */ - } else if (type == PBUF_ROM || type == PBUF_REF) { + /* is this a ROM or RAM referencing pbuf? */ + } else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF) { memp_free(MEMP_PBUF, p); - /* type == PBUF_RAM */ - } else { + /* type == PBUF_RAM */ + } else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_HEAP) { mem_free(p); + } else { + /* @todo: support freeing other types */ + LWIP_ASSERT("invalid pbuf type", 0); } } count++; /* proceed to next pbuf */ p = q; - /* p->ref > 0, this pbuf is still referenced to */ - /* (and so the remaining pbufs in chain as well) */ + /* p->ref > 0, this pbuf is still referenced to */ + /* (and so the remaining pbufs in chain as well) */ } else { - LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free: %p has ref %"U16_F", ending here.\n", (void *)p, ref)); + LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free: %p has ref %"U16_F", ending here.\n", (void *)p, (u16_t)ref)); /* stop walking through the chain */ p = NULL; } @@ -821,7 +830,7 @@ pbuf_ref(struct pbuf *p) { /* pbuf given? */ if (p != NULL) { - SYS_ARCH_INC(p->ref, 1); + SYS_ARCH_SET(p->ref, (LWIP_PBUF_REF_T)(p->ref + 1)); LWIP_ASSERT("pbuf ref overflow", p->ref > 0); } } @@ -834,6 +843,10 @@ pbuf_ref(struct pbuf *p) * @note The caller MAY NOT reference the tail pbuf afterwards. * Use pbuf_chain() for that purpose. * + * This function explicitly does not check for tot_len overflow to prevent + * failing to queue too long pbufs. This can produce invalid pbufs, so + * handle with care! + * * @see pbuf_chain() */ void @@ -847,13 +860,13 @@ pbuf_cat(struct pbuf *h, struct pbuf *t) /* proceed to last pbuf of chain */ for (p = h; p->next != NULL; p = p->next) { /* add total length of second chain to all totals of first chain */ - p->tot_len += t->tot_len; + p->tot_len = (u16_t)(p->tot_len + t->tot_len); } /* { p is last pbuf of first h chain, p->next == NULL } */ LWIP_ASSERT("p->tot_len == p->len (of last pbuf in chain)", p->tot_len == p->len); LWIP_ASSERT("p->next == NULL", p->next == NULL); /* add total length of second chain to last pbuf total of first chain */ - p->tot_len += t->tot_len; + p->tot_len = (u16_t)(p->tot_len + t->tot_len); /* chain last pbuf of head (p) with first of tail (t) */ p->next = t; /* p->next now references t, but the caller will drop its reference to t, @@ -907,7 +920,7 @@ pbuf_dechain(struct pbuf *p) /* assert tot_len invariant: (p->tot_len == p->len + (p->next? p->next->tot_len: 0) */ LWIP_ASSERT("p->tot_len == p->len + q->tot_len", q->tot_len == p->tot_len - p->len); /* enforce invariant if assertion is disabled */ - q->tot_len = p->tot_len - p->len; + q->tot_len = (u16_t)(p->tot_len - p->len); /* decouple pbuf from remainder */ p->next = NULL; /* total length of pbuf p is its own length only */ @@ -947,18 +960,17 @@ pbuf_dechain(struct pbuf *p) err_t pbuf_copy(struct pbuf *p_to, const struct pbuf *p_from) { - u16_t offset_to=0, offset_from=0, len; + size_t offset_to = 0, offset_from = 0, len; LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy(%p, %p)\n", - (const void*)p_to, (const void*)p_from)); + (const void *)p_to, (const void *)p_from)); /* is the target big enough to hold the source? */ LWIP_ERROR("pbuf_copy: target not big enough to hold source", ((p_to != NULL) && (p_from != NULL) && (p_to->tot_len >= p_from->tot_len)), return ERR_ARG;); /* iterate through pbuf chain */ - do - { + do { /* copy one part of the original chain */ if ((p_to->len - offset_to) >= (p_from->len - offset_from)) { /* complete current p_from fits into current p_to */ @@ -967,7 +979,7 @@ pbuf_copy(struct pbuf *p_to, const struct pbuf *p_from) /* current p_from does not fit into current p_to */ len = p_to->len - offset_to; } - MEMCPY((u8_t*)p_to->payload + offset_to, (u8_t*)p_from->payload + offset_from, len); + MEMCPY((u8_t *)p_to->payload + offset_to, (u8_t *)p_from->payload + offset_from, len); offset_to += len; offset_from += len; LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len); @@ -981,7 +993,7 @@ pbuf_copy(struct pbuf *p_to, const struct pbuf *p_from) /* on to next p_to (if any) */ offset_to = 0; p_to = p_to->next; - LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL) , return ERR_ARG;); + LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL), return ERR_ARG;); } if ((p_from != NULL) && (p_from->len == p_from->tot_len)) { @@ -992,7 +1004,7 @@ pbuf_copy(struct pbuf *p_to, const struct pbuf *p_from) if ((p_to != NULL) && (p_to->len == p_to->tot_len)) { /* don't copy more than one packet! */ LWIP_ERROR("pbuf_copy() does not allow packet queues!", - (p_to->next == NULL), return ERR_VAL;); + (p_to->next == NULL), return ERR_VAL;); } } while (p_from); LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy: end of chain reached.\n")); @@ -1015,41 +1027,76 @@ u16_t pbuf_copy_partial(const struct pbuf *buf, void *dataptr, u16_t len, u16_t offset) { const struct pbuf *p; - u16_t left; + u16_t left = 0; u16_t buf_copy_len; u16_t copied_total = 0; LWIP_ERROR("pbuf_copy_partial: invalid buf", (buf != NULL), return 0;); LWIP_ERROR("pbuf_copy_partial: invalid dataptr", (dataptr != NULL), return 0;); - left = 0; - - if ((buf == NULL) || (dataptr == NULL)) { - return 0; - } - /* Note some systems use byte copy if dataptr or one of the pbuf payload pointers are unaligned. */ for (p = buf; len != 0 && p != NULL; p = p->next) { if ((offset != 0) && (offset >= p->len)) { /* don't copy from this buffer -> on to the next */ - offset -= p->len; + offset = (u16_t)(offset - p->len); } else { /* copy from this buffer. maybe only partially. */ - buf_copy_len = p->len - offset; + buf_copy_len = (u16_t)(p->len - offset); if (buf_copy_len > len) { buf_copy_len = len; } /* copy the necessary parts of the buffer */ - MEMCPY(&((char*)dataptr)[left], &((char*)p->payload)[offset], buf_copy_len); - copied_total += buf_copy_len; - left += buf_copy_len; - len -= buf_copy_len; + MEMCPY(&((char *)dataptr)[left], &((char *)p->payload)[offset], buf_copy_len); + copied_total = (u16_t)(copied_total + buf_copy_len); + left = (u16_t)(left + buf_copy_len); + len = (u16_t)(len - buf_copy_len); offset = 0; } } return copied_total; } +/** + * @ingroup pbuf + * Get part of a pbuf's payload as contiguous memory. The returned memory is + * either a pointer into the pbuf's payload or, if split over multiple pbufs, + * a copy into the user-supplied buffer. + * + * @param p the pbuf from which to copy data + * @param buffer the application supplied buffer + * @param bufsize size of the application supplied buffer + * @param len length of data to copy (dataptr must be big enough). No more + * than buf->tot_len will be copied, irrespective of len + * @param offset offset into the packet buffer from where to begin copying len bytes + * @return the number of bytes copied, or 0 on failure + */ +void * +pbuf_get_contiguous(const struct pbuf *p, void *buffer, size_t bufsize, u16_t len, u16_t offset) +{ + const struct pbuf *q; + u16_t out_offset; + + LWIP_ERROR("pbuf_get_contiguous: invalid buf", (p != NULL), return NULL;); + LWIP_ERROR("pbuf_get_contiguous: invalid dataptr", (buffer != NULL), return NULL;); + LWIP_ERROR("pbuf_get_contiguous: invalid dataptr", (bufsize >= len), return NULL;); + + q = pbuf_skip_const(p, offset, &out_offset); + if (q != NULL) { + if (q->len >= (out_offset + len)) { + /* all data in this pbuf, return zero-copy */ + return (u8_t *)q->payload + out_offset; + } + /* need to copy */ + if (pbuf_copy_partial(q, buffer, len, out_offset) != len) { + /* copying failed: pbuf is too short */ + return NULL; + } + return buffer; + } + /* pbuf is too short (offset does not fit in) */ + return NULL; +} + #if LWIP_TCP && TCP_QUEUE_OOSEQ && LWIP_WND_SCALE /** * This method modifies a 'pbuf chain', so that its total length is @@ -1072,8 +1119,8 @@ void pbuf_split_64k(struct pbuf *p, struct pbuf **rest) struct pbuf *r = p->next; /* continue until the total length (summed up as u16_t) overflows */ - while ((r != NULL) && ((u16_t)(tot_len_front + r->len) > tot_len_front)) { - tot_len_front += r->len; + while ((r != NULL) && ((u16_t)(tot_len_front + r->len) >= tot_len_front)) { + tot_len_front = (u16_t)(tot_len_front + r->len); i = r; r = r->next; } @@ -1084,7 +1131,7 @@ void pbuf_split_64k(struct pbuf *p, struct pbuf **rest) if (r != NULL) { /* Update the tot_len field in the first part */ for (i = p; i != NULL; i = i->next) { - i->tot_len -= r->tot_len; + i->tot_len = (u16_t)(i->tot_len - r->tot_len); LWIP_ASSERT("tot_len/len mismatch in last pbuf", (i->next != NULL) || (i->tot_len == i->len)); } @@ -1101,15 +1148,15 @@ void pbuf_split_64k(struct pbuf *p, struct pbuf **rest) #endif /* LWIP_TCP && TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ /* Actual implementation of pbuf_skip() but returning const pointer... */ -static const struct pbuf* -pbuf_skip_const(const struct pbuf* in, u16_t in_offset, u16_t* out_offset) +static const struct pbuf * +pbuf_skip_const(const struct pbuf *in, u16_t in_offset, u16_t *out_offset) { u16_t offset_left = in_offset; - const struct pbuf* q = in; + const struct pbuf *q = in; /* get the correct pbuf */ while ((q != NULL) && (q->len <= offset_left)) { - offset_left -= q->len; + offset_left = (u16_t)(offset_left - q->len); q = q->next; } if (out_offset != NULL) { @@ -1127,11 +1174,11 @@ pbuf_skip_const(const struct pbuf* in, u16_t in_offset, u16_t* out_offset) * @param out_offset resulting offset in the returned pbuf * @return the pbuf in the queue where the offset is */ -struct pbuf* -pbuf_skip(struct pbuf* in, u16_t in_offset, u16_t* out_offset) +struct pbuf * +pbuf_skip(struct pbuf *in, u16_t in_offset, u16_t *out_offset) { - const struct pbuf* out = pbuf_skip_const(in, in_offset, out_offset); - return LWIP_CONST_CAST(struct pbuf*, out); + const struct pbuf *out = pbuf_skip_const(in, in_offset, out_offset); + return LWIP_CONST_CAST(struct pbuf *, out); } /** @@ -1149,9 +1196,9 @@ err_t pbuf_take(struct pbuf *buf, const void *dataptr, u16_t len) { struct pbuf *p; - u16_t buf_copy_len; - u16_t total_copy_len = len; - u16_t copied_total = 0; + size_t buf_copy_len; + size_t total_copy_len = len; + size_t copied_total = 0; LWIP_ERROR("pbuf_take: invalid buf", (buf != NULL), return ERR_ARG;); LWIP_ERROR("pbuf_take: invalid dataptr", (dataptr != NULL), return ERR_ARG;); @@ -1170,7 +1217,7 @@ pbuf_take(struct pbuf *buf, const void *dataptr, u16_t len) buf_copy_len = p->len; } /* copy the necessary parts of the buffer */ - MEMCPY(p->payload, &((const char*)dataptr)[copied_total], buf_copy_len); + MEMCPY(p->payload, &((const char *)dataptr)[copied_total], buf_copy_len); total_copy_len -= buf_copy_len; copied_total += buf_copy_len; } @@ -1193,16 +1240,18 @@ err_t pbuf_take_at(struct pbuf *buf, const void *dataptr, u16_t len, u16_t offset) { u16_t target_offset; - struct pbuf* q = pbuf_skip(buf, offset, &target_offset); + struct pbuf *q = pbuf_skip(buf, offset, &target_offset); /* return requested data if pbuf is OK */ if ((q != NULL) && (q->tot_len >= target_offset + len)) { u16_t remaining_len = len; - const u8_t* src_ptr = (const u8_t*)dataptr; + const u8_t *src_ptr = (const u8_t *)dataptr; /* copy the part that goes into the first pbuf */ - u16_t first_copy_len = LWIP_MIN(q->len - target_offset, len); - MEMCPY(((u8_t*)q->payload) + target_offset, dataptr, first_copy_len); - remaining_len -= first_copy_len; + u16_t first_copy_len; + LWIP_ASSERT("check pbuf_skip result", target_offset < q->len); + first_copy_len = (u16_t)LWIP_MIN(q->len - target_offset, len); + MEMCPY(((u8_t *)q->payload) + target_offset, dataptr, first_copy_len); + remaining_len = (u16_t)(remaining_len - first_copy_len); src_ptr += first_copy_len; if (remaining_len > 0) { return pbuf_take(q->next, src_ptr, remaining_len); @@ -1225,23 +1274,46 @@ pbuf_take_at(struct pbuf *buf, const void *dataptr, u16_t len, u16_t offset) * @return a new, single pbuf (p->next is NULL) * or the old pbuf if allocation fails */ -struct pbuf* +struct pbuf * pbuf_coalesce(struct pbuf *p, pbuf_layer layer) { struct pbuf *q; - err_t err; if (p->next == NULL) { return p; } - q = pbuf_alloc(layer, p->tot_len, PBUF_RAM); + q = pbuf_clone(layer, PBUF_RAM, p); if (q == NULL) { /* @todo: what do we do now? */ return p; } + pbuf_free(p); + return q; +} + +/** + * @ingroup pbuf + * Allocates a new pbuf of same length (via pbuf_alloc()) and copies the source + * pbuf into this new pbuf (using pbuf_copy()). + * + * @param layer pbuf_layer of the new pbuf + * @param type this parameter decides how and where the pbuf should be allocated + * (@see pbuf_alloc()) + * @param p the source pbuf + * + * @return a new pbuf or NULL if allocation fails + */ +struct pbuf * +pbuf_clone(pbuf_layer layer, pbuf_type type, struct pbuf *p) +{ + struct pbuf *q; + err_t err; + q = pbuf_alloc(layer, p->tot_len, type); + if (q == NULL) { + return NULL; + } err = pbuf_copy(q, p); LWIP_UNUSED_ARG(err); /* in case of LWIP_NOASSERT */ LWIP_ASSERT("pbuf_copy failed", err == ERR_OK); - pbuf_free(p); return q; } @@ -1274,7 +1346,7 @@ pbuf_fill_chksum(struct pbuf *p, u16_t start_offset, const void *dataptr, return ERR_ARG; } - dst_ptr = ((char*)p->payload) + start_offset; + dst_ptr = ((char *)p->payload) + start_offset; copy_chksum = LWIP_CHKSUM_COPY(dst_ptr, dataptr, len); if ((start_offset & 1) != 0) { copy_chksum = SWAP_BYTES_IN_WORD(copy_chksum); @@ -1296,7 +1368,7 @@ pbuf_fill_chksum(struct pbuf *p, u16_t start_offset, const void *dataptr, * @return byte at an offset into p OR ZERO IF 'offset' >= p->tot_len */ u8_t -pbuf_get_at(const struct pbuf* p, u16_t offset) +pbuf_get_at(const struct pbuf *p, u16_t offset) { int ret = pbuf_try_get_at(p, offset); if (ret >= 0) { @@ -1314,14 +1386,14 @@ pbuf_get_at(const struct pbuf* p, u16_t offset) * @return byte at an offset into p [0..0xFF] OR negative if 'offset' >= p->tot_len */ int -pbuf_try_get_at(const struct pbuf* p, u16_t offset) +pbuf_try_get_at(const struct pbuf *p, u16_t offset) { u16_t q_idx; - const struct pbuf* q = pbuf_skip_const(p, offset, &q_idx); + const struct pbuf *q = pbuf_skip_const(p, offset, &q_idx); /* return requested data if pbuf is OK */ if ((q != NULL) && (q->len > q_idx)) { - return ((u8_t*)q->payload)[q_idx]; + return ((u8_t *)q->payload)[q_idx]; } return -1; } @@ -1336,14 +1408,14 @@ pbuf_try_get_at(const struct pbuf* p, u16_t offset) * @param data byte to write at an offset into p */ void -pbuf_put_at(struct pbuf* p, u16_t offset, u8_t data) +pbuf_put_at(struct pbuf *p, u16_t offset, u8_t data) { u16_t q_idx; - struct pbuf* q = pbuf_skip(p, offset, &q_idx); + struct pbuf *q = pbuf_skip(p, offset, &q_idx); /* write requested data if pbuf is OK */ if ((q != NULL) && (q->len > q_idx)) { - ((u8_t*)q->payload)[q_idx] = data; + ((u8_t *)q->payload)[q_idx] = data; } } @@ -1359,30 +1431,30 @@ pbuf_put_at(struct pbuf* p, u16_t offset, u8_t data) * (0xffff if p is too short, diffoffset+1 otherwise) */ u16_t -pbuf_memcmp(const struct pbuf* p, u16_t offset, const void* s2, u16_t n) +pbuf_memcmp(const struct pbuf *p, u16_t offset, const void *s2, u16_t n) { u16_t start = offset; - const struct pbuf* q = p; + const struct pbuf *q = p; u16_t i; - + /* pbuf long enough to perform check? */ - if(p->tot_len < (offset + n)) { + if (p->tot_len < (offset + n)) { return 0xffff; } - + /* get the correct pbuf from chain. We know it succeeds because of p->tot_len check above. */ while ((q != NULL) && (q->len <= start)) { - start -= q->len; + start = (u16_t)(start - q->len); q = q->next; } - + /* return requested data if pbuf is OK */ for (i = 0; i < n; i++) { /* We know pbuf_get_at() succeeds because of p->tot_len check above. */ - u8_t a = pbuf_get_at(q, start + i); - u8_t b = ((const u8_t*)s2)[i]; + u8_t a = pbuf_get_at(q, (u16_t)(start + i)); + u8_t b = ((const u8_t *)s2)[i]; if (a != b) { - return i+1; + return (u16_t)LWIP_MIN(i + 1, 0xFFFF); } } return 0; @@ -1401,12 +1473,12 @@ pbuf_memcmp(const struct pbuf* p, u16_t offset, const void* s2, u16_t n) * @return 0xFFFF if substr was not found in p or the index where it was found */ u16_t -pbuf_memfind(const struct pbuf* p, const void* mem, u16_t mem_len, u16_t start_offset) +pbuf_memfind(const struct pbuf *p, const void *mem, u16_t mem_len, u16_t start_offset) { u16_t i; - u16_t max = p->tot_len - mem_len; + u16_t max_cmp_start = (u16_t)(p->tot_len - mem_len); if (p->tot_len >= mem_len + start_offset) { - for (i = start_offset; i <= max; i++) { + for (i = start_offset; i <= max_cmp_start; i++) { u16_t plus = pbuf_memcmp(p, i, mem, mem_len); if (plus == 0) { return i; @@ -1428,7 +1500,7 @@ pbuf_memfind(const struct pbuf* p, const void* mem, u16_t mem_len, u16_t start_o * @return 0xFFFF if substr was not found in p or the index where it was found */ u16_t -pbuf_strstr(const struct pbuf* p, const char* substr) +pbuf_strstr(const struct pbuf *p, const char *substr) { size_t substr_len; if ((substr == NULL) || (substr[0] == 0) || (p->tot_len == 0xFFFF)) { diff --git a/Libraries/LwIP/src/core/raw.c b/Libraries/LwIP/src/core/raw.c index 4ee7457..7a42432 100755 --- a/Libraries/LwIP/src/core/raw.c +++ b/Libraries/LwIP/src/core/raw.c @@ -4,13 +4,13 @@ * different types of protocols besides (or overriding) those * already available in lwIP.\n * See also @ref raw_raw - * + * * @defgroup raw_raw RAW * @ingroup callbackstyle_api * Implementation of raw protocol PCBs for low-level handling of * different types of protocols besides (or overriding) those * already available in lwIP.\n - * @see @ref raw_api + * @see @ref api */ /* @@ -54,6 +54,7 @@ #include "lwip/ip_addr.h" #include "lwip/netif.h" #include "lwip/raw.h" +#include "lwip/priv/raw_priv.h" #include "lwip/stats.h" #include "lwip/ip6.h" #include "lwip/ip6_addr.h" @@ -65,10 +66,16 @@ static struct raw_pcb *raw_pcbs; static u8_t -raw_input_match(struct raw_pcb *pcb, u8_t broadcast) +raw_input_local_match(struct raw_pcb *pcb, u8_t broadcast) { LWIP_UNUSED_ARG(broadcast); /* in IPv6 only case */ + /* check if PCB is bound to specific netif */ + if ((pcb->netif_idx != NETIF_NO_INDEX) && + (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { + return 0; + } + #if LWIP_IPV4 && LWIP_IPV6 /* Dual-stack: PCBs listening to any IP type also listen to any IP address */ if (IP_IS_ANY_TYPE_VAL(pcb->local_ip)) { @@ -97,11 +104,11 @@ raw_input_match(struct raw_pcb *pcb, u8_t broadcast) } } else #endif /* LWIP_IPV4 */ - /* Handle IPv4 and IPv6: catch all or exact match */ - if (ip_addr_isany(&pcb->local_ip) || - ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { - return 1; - } + /* Handle IPv4 and IPv6: catch all or exact match */ + if (ip_addr_isany(&pcb->local_ip) || + ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { + return 1; + } } return 0; @@ -124,12 +131,12 @@ raw_input_match(struct raw_pcb *pcb, u8_t broadcast) * caller). * */ -u8_t +raw_input_state_t raw_input(struct pbuf *p, struct netif *inp) { struct raw_pcb *pcb, *prev; s16_t proto; - u8_t eaten = 0; + raw_input_state_t ret = RAW_INPUT_NONE; u8_t broadcast = ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()); LWIP_UNUSED_ARG(inp); @@ -156,30 +163,34 @@ raw_input(struct pbuf *p, struct netif *inp) pcb = raw_pcbs; /* loop through all raw pcbs until the packet is eaten by one */ /* this allows multiple pcbs to match against the packet by design */ - while ((eaten == 0) && (pcb != NULL)) { - if ((pcb->protocol == proto) && raw_input_match(pcb, broadcast)) { + while (pcb != NULL) { + if ((pcb->protocol == proto) && raw_input_local_match(pcb, broadcast) && + (((pcb->flags & RAW_FLAGS_CONNECTED) == 0) || + ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()))) { /* receive callback function available? */ if (pcb->recv != NULL) { + u8_t eaten; #ifndef LWIP_NOASSERT - void* old_payload = p->payload; + void *old_payload = p->payload; #endif + ret = RAW_INPUT_DELIVERED; /* the receive callback function did not eat the packet? */ eaten = pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr()); if (eaten != 0) { /* receive function ate the packet */ p = NULL; - eaten = 1; if (prev != NULL) { - /* move the pcb to the front of raw_pcbs so that is - found faster next time */ + /* move the pcb to the front of raw_pcbs so that is + found faster next time */ prev->next = pcb->next; pcb->next = raw_pcbs; raw_pcbs = pcb; } + return RAW_INPUT_EATEN; } else { /* sanity-check that the receive callback did not alter the pbuf */ LWIP_ASSERT("raw pcb recv callback altered pbuf payload pointer without eating packet", - p->payload == old_payload); + p->payload == old_payload); } } /* no receive callback function was set for this raw PCB */ @@ -188,7 +199,7 @@ raw_input(struct pbuf *p, struct netif *inp) prev = pcb; pcb = pcb->next; } - return eaten; + return ret; } /** @@ -209,13 +220,46 @@ raw_input(struct pbuf *p, struct netif *inp) err_t raw_bind(struct raw_pcb *pcb, const ip_addr_t *ipaddr) { + LWIP_ASSERT_CORE_LOCKED(); if ((pcb == NULL) || (ipaddr == NULL)) { return ERR_VAL; } ip_addr_set_ipaddr(&pcb->local_ip, ipaddr); +#if LWIP_IPV6 && LWIP_IPV6_SCOPES + /* If the given IP address should have a zone but doesn't, assign one now. + * This is legacy support: scope-aware callers should always provide properly + * zoned source addresses. */ + if (IP_IS_V6(&pcb->local_ip) && + ip6_addr_lacks_zone(ip_2_ip6(&pcb->local_ip), IP6_UNKNOWN)) { + ip6_addr_select_zone(ip_2_ip6(&pcb->local_ip), ip_2_ip6(&pcb->local_ip)); + } +#endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */ return ERR_OK; } +/** + * @ingroup raw_raw + * Bind an RAW PCB to a specific netif. + * After calling this function, all packets received via this PCB + * are guaranteed to have come in via the specified netif, and all + * outgoing packets will go out via the specified netif. + * + * @param pcb RAW PCB to be bound with netif. + * @param netif netif to bind to. Can be NULL. + * + * @see raw_disconnect() + */ +void +raw_bind_netif(struct raw_pcb *pcb, const struct netif *netif) +{ + LWIP_ASSERT_CORE_LOCKED(); + if (netif != NULL) { + pcb->netif_idx = netif_get_index(netif); + } else { + pcb->netif_idx = NETIF_NO_INDEX; + } +} + /** * @ingroup raw_raw * Connect an RAW PCB. This function is required by upper layers @@ -233,13 +277,48 @@ raw_bind(struct raw_pcb *pcb, const ip_addr_t *ipaddr) err_t raw_connect(struct raw_pcb *pcb, const ip_addr_t *ipaddr) { + LWIP_ASSERT_CORE_LOCKED(); if ((pcb == NULL) || (ipaddr == NULL)) { return ERR_VAL; } ip_addr_set_ipaddr(&pcb->remote_ip, ipaddr); +#if LWIP_IPV6 && LWIP_IPV6_SCOPES + /* If the given IP address should have a zone but doesn't, assign one now, + * using the bound address to make a more informed decision when possible. */ + if (IP_IS_V6(&pcb->remote_ip) && + ip6_addr_lacks_zone(ip_2_ip6(&pcb->remote_ip), IP6_UNKNOWN)) { + ip6_addr_select_zone(ip_2_ip6(&pcb->remote_ip), ip_2_ip6(&pcb->local_ip)); + } +#endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */ + raw_set_flags(pcb, RAW_FLAGS_CONNECTED); return ERR_OK; } +/** + * @ingroup raw_raw + * Disconnect a RAW PCB. + * + * @param pcb the raw pcb to disconnect. + */ +void +raw_disconnect(struct raw_pcb *pcb) +{ + LWIP_ASSERT_CORE_LOCKED(); + /* reset remote address association */ +#if LWIP_IPV4 && LWIP_IPV6 + if (IP_IS_ANY_TYPE_VAL(pcb->local_ip)) { + ip_addr_copy(pcb->remote_ip, *IP_ANY_TYPE); + } else { +#endif + ip_addr_set_any(IP_IS_V6_VAL(pcb->remote_ip), &pcb->remote_ip); +#if LWIP_IPV4 && LWIP_IPV6 + } +#endif + pcb->netif_idx = NETIF_NO_INDEX; + /* mark PCB as unconnected */ + raw_clear_flags(pcb, RAW_FLAGS_CONNECTED); +} + /** * @ingroup raw_raw * Set the callback function for received packets that match the @@ -254,6 +333,7 @@ raw_connect(struct raw_pcb *pcb, const ip_addr_t *ipaddr) void raw_recv(struct raw_pcb *pcb, raw_recv_fn recv, void *recv_arg) { + LWIP_ASSERT_CORE_LOCKED(); /* remember recv() callback and user data */ pcb->recv = recv; pcb->recv_arg = recv_arg; @@ -261,11 +341,9 @@ raw_recv(struct raw_pcb *pcb, raw_recv_fn recv, void *recv_arg) /** * @ingroup raw_raw - * Send the raw IP packet to the given address. Note that actually you cannot - * modify the IP headers (this is inconsistent with the receive callback where - * you actually get the IP headers), you can only specify the IP payload here. - * It requires some more changes in lwIP. (there will be a raw_send() function - * then.) + * Send the raw IP packet to the given address. An IP header will be prepended + * to the packet, unless the RAW_FLAGS_HDRINCL flag is set on the PCB. In that + * case, the packet must include an IP header, which will then be sent as is. * * @param pcb the raw pcb which to send * @param p the IP payload to send @@ -275,11 +353,8 @@ raw_recv(struct raw_pcb *pcb, raw_recv_fn recv, void *recv_arg) err_t raw_sendto(struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *ipaddr) { - err_t err; struct netif *netif; const ip_addr_t *src_ip; - struct pbuf *q; /* q will be sent down the stack */ - s16_t header_size; if ((pcb == NULL) || (ipaddr == NULL) || !IP_ADDR_PCB_VERSION_MATCH(pcb, ipaddr)) { return ERR_VAL; @@ -287,17 +362,106 @@ raw_sendto(struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *ipaddr) LWIP_DEBUGF(RAW_DEBUG | LWIP_DBG_TRACE, ("raw_sendto\n")); + if (pcb->netif_idx != NETIF_NO_INDEX) { + netif = netif_get_by_index(pcb->netif_idx); + } else { +#if LWIP_MULTICAST_TX_OPTIONS + netif = NULL; + if (ip_addr_ismulticast(ipaddr)) { + /* For multicast-destined packets, use the user-provided interface index to + * determine the outgoing interface, if an interface index is set and a + * matching netif can be found. Otherwise, fall back to regular routing. */ + netif = netif_get_by_index(pcb->mcast_ifindex); + } + + if (netif == NULL) +#endif /* LWIP_MULTICAST_TX_OPTIONS */ + { + netif = ip_route(&pcb->local_ip, ipaddr); + } + } + + if (netif == NULL) { + LWIP_DEBUGF(RAW_DEBUG | LWIP_DBG_LEVEL_WARNING, ("raw_sendto: No route to ")); + ip_addr_debug_print(RAW_DEBUG | LWIP_DBG_LEVEL_WARNING, ipaddr); + return ERR_RTE; + } + + if (ip_addr_isany(&pcb->local_ip) || ip_addr_ismulticast(&pcb->local_ip)) { + /* use outgoing network interface IP address as source address */ + src_ip = ip_netif_get_local_ip(netif, ipaddr); +#if LWIP_IPV6 + if (src_ip == NULL) { + return ERR_RTE; + } +#endif /* LWIP_IPV6 */ + } else { + /* use RAW PCB local IP address as source address */ + src_ip = &pcb->local_ip; + } + + return raw_sendto_if_src(pcb, p, ipaddr, netif, src_ip); +} + +/** + * @ingroup raw_raw + * Send the raw IP packet to the given address, using a particular outgoing + * netif and source IP address. An IP header will be prepended to the packet, + * unless the RAW_FLAGS_HDRINCL flag is set on the PCB. In that case, the + * packet must include an IP header, which will then be sent as is. + * + * @param pcb RAW PCB used to send the data + * @param p chain of pbufs to be sent + * @param dst_ip destination IP address + * @param netif the netif used for sending + * @param src_ip source IP address + */ +err_t +raw_sendto_if_src(struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, + struct netif *netif, const ip_addr_t *src_ip) +{ + err_t err; + struct pbuf *q; /* q will be sent down the stack */ + u16_t header_size; + u8_t ttl; + + LWIP_ASSERT_CORE_LOCKED(); + + if ((pcb == NULL) || (dst_ip == NULL) || (netif == NULL) || (src_ip == NULL) || + !IP_ADDR_PCB_VERSION_MATCH(pcb, src_ip) || !IP_ADDR_PCB_VERSION_MATCH(pcb, dst_ip)) { + return ERR_VAL; + } + header_size = ( #if LWIP_IPV4 && LWIP_IPV6 - IP_IS_V6(ipaddr) ? IP6_HLEN : IP_HLEN); + IP_IS_V6(dst_ip) ? IP6_HLEN : IP_HLEN); #elif LWIP_IPV4 - IP_HLEN); + IP_HLEN); #else - IP6_HLEN); + IP6_HLEN); #endif + /* Handle the HDRINCL option as an exception: none of the code below applies + * to this case, and sending the packet needs to be done differently too. */ + if (pcb->flags & RAW_FLAGS_HDRINCL) { + /* A full header *must* be present in the first pbuf of the chain, as the + * output routines may access its fields directly. */ + if (p->len < header_size) { + return ERR_VAL; + } + /* @todo multicast loop support, if at all desired for this scenario.. */ + NETIF_SET_HINTS(netif, &pcb->netif_hints); + err = ip_output_if_hdrincl(p, src_ip, dst_ip, netif); + NETIF_RESET_HINTS(netif); + return err; + } + + /* packet too large to add an IP header without causing an overflow? */ + if ((u16_t)(p->tot_len + header_size) < p->tot_len) { + return ERR_MEM; + } /* not enough space to add an IP header to first pbuf in given p chain? */ - if (pbuf_header(p, header_size)) { + if (pbuf_add_header(p, header_size)) { /* allocate header in new pbuf */ q = pbuf_alloc(PBUF_IP, 0, PBUF_RAM); /* new header pbuf could not be allocated? */ @@ -314,34 +478,16 @@ raw_sendto(struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *ipaddr) } else { /* first pbuf q equals given pbuf */ q = p; - if (pbuf_header(q, -header_size)) { + if (pbuf_remove_header(q, header_size)) { LWIP_ASSERT("Can't restore header we just removed!", 0); return ERR_MEM; } } - if(IP_IS_ANY_TYPE_VAL(pcb->local_ip)) { - /* Don't call ip_route() with IP_ANY_TYPE */ - netif = ip_route(IP46_ADDR_ANY(IP_GET_TYPE(ipaddr)), ipaddr); - } else { - netif = ip_route(&pcb->local_ip, ipaddr); - } - - if (netif == NULL) { - LWIP_DEBUGF(RAW_DEBUG | LWIP_DBG_LEVEL_WARNING, ("raw_sendto: No route to ")); - ip_addr_debug_print(RAW_DEBUG | LWIP_DBG_LEVEL_WARNING, ipaddr); - /* free any temporary header pbuf allocated by pbuf_header() */ - if (q != p) { - pbuf_free(q); - } - return ERR_RTE; - } - #if IP_SOF_BROADCAST - if (IP_IS_V4(ipaddr)) - { + if (IP_IS_V4(dst_ip)) { /* broadcast filter? */ - if (!ip_get_option(pcb, SOF_BROADCAST) && ip_addr_isbroadcast(ipaddr, netif)) { + if (!ip_get_option(pcb, SOF_BROADCAST) && ip_addr_isbroadcast(dst_ip, netif)) { LWIP_DEBUGF(RAW_DEBUG | LWIP_DBG_LEVEL_WARNING, ("raw_sendto: SOF_BROADCAST not enabled on pcb %p\n", (void *)pcb)); /* free any temporary header pbuf allocated by pbuf_header() */ if (q != p) { @@ -352,35 +498,33 @@ raw_sendto(struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *ipaddr) } #endif /* IP_SOF_BROADCAST */ - if (ip_addr_isany(&pcb->local_ip)) { - /* use outgoing network interface IP address as source address */ - src_ip = ip_netif_get_local_ip(netif, ipaddr); -#if LWIP_IPV6 - if (src_ip == NULL) { - if (q != p) { - pbuf_free(q); - } - return ERR_RTE; - } -#endif /* LWIP_IPV6 */ - } else { - /* use RAW PCB local IP address as source address */ - src_ip = &pcb->local_ip; + /* Multicast Loop? */ +#if LWIP_MULTICAST_TX_OPTIONS + if (((pcb->flags & RAW_FLAGS_MULTICAST_LOOP) != 0) && ip_addr_ismulticast(dst_ip)) { + q->flags |= PBUF_FLAG_MCASTLOOP; } +#endif /* LWIP_MULTICAST_TX_OPTIONS */ #if LWIP_IPV6 /* If requested, based on the IPV6_CHECKSUM socket option per RFC3542, compute the checksum and update the checksum in the payload. */ - if (IP_IS_V6(ipaddr) && pcb->chksum_reqd) { - u16_t chksum = ip6_chksum_pseudo(p, pcb->protocol, p->tot_len, ip_2_ip6(src_ip), ip_2_ip6(ipaddr)); + if (IP_IS_V6(dst_ip) && pcb->chksum_reqd) { + u16_t chksum = ip6_chksum_pseudo(p, pcb->protocol, p->tot_len, ip_2_ip6(src_ip), ip_2_ip6(dst_ip)); LWIP_ASSERT("Checksum must fit into first pbuf", p->len >= (pcb->chksum_offset + 2)); SMEMCPY(((u8_t *)p->payload) + pcb->chksum_offset, &chksum, sizeof(u16_t)); } #endif - NETIF_SET_HWADDRHINT(netif, &pcb->addr_hint); - err = ip_output_if(q, src_ip, ipaddr, pcb->ttl, pcb->tos, pcb->protocol, netif); - NETIF_SET_HWADDRHINT(netif, NULL); + /* Determine TTL to use */ +#if LWIP_MULTICAST_TX_OPTIONS + ttl = (ip_addr_ismulticast(dst_ip) ? raw_get_multicast_ttl(pcb) : pcb->ttl); +#else /* LWIP_MULTICAST_TX_OPTIONS */ + ttl = pcb->ttl; +#endif /* LWIP_MULTICAST_TX_OPTIONS */ + + NETIF_SET_HINTS(netif, &pcb->netif_hints); + err = ip_output_if(q, src_ip, dst_ip, ttl, pcb->tos, pcb->protocol, netif); + NETIF_RESET_HINTS(netif); /* did we chain a header earlier? */ if (q != p) { @@ -417,6 +561,7 @@ void raw_remove(struct raw_pcb *pcb) { struct raw_pcb *pcb2; + LWIP_ASSERT_CORE_LOCKED(); /* pcb to be removed is first in list? */ if (raw_pcbs == pcb) { /* make list start at 2nd pcb */ @@ -452,6 +597,7 @@ raw_new(u8_t proto) struct raw_pcb *pcb; LWIP_DEBUGF(RAW_DEBUG | LWIP_DBG_TRACE, ("raw_new\n")); + LWIP_ASSERT_CORE_LOCKED(); pcb = (struct raw_pcb *)memp_malloc(MEMP_RAW_PCB); /* could allocate RAW PCB? */ @@ -460,6 +606,9 @@ raw_new(u8_t proto) memset(pcb, 0, sizeof(struct raw_pcb)); pcb->protocol = proto; pcb->ttl = RAW_TTL; +#if LWIP_MULTICAST_TX_OPTIONS + raw_set_multicast_ttl(pcb, RAW_TTL); +#endif /* LWIP_MULTICAST_TX_OPTIONS */ pcb->next = raw_pcbs; raw_pcbs = pcb; } @@ -485,6 +634,7 @@ struct raw_pcb * raw_new_ip_type(u8_t type, u8_t proto) { struct raw_pcb *pcb; + LWIP_ASSERT_CORE_LOCKED(); pcb = raw_new(proto); #if LWIP_IPV4 && LWIP_IPV6 if (pcb != NULL) { @@ -502,9 +652,9 @@ raw_new_ip_type(u8_t type, u8_t proto) * @param old_addr IP address of the netif before change * @param new_addr IP address of the netif after change */ -void raw_netif_ip_addr_changed(const ip_addr_t* old_addr, const ip_addr_t* new_addr) +void raw_netif_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr) { - struct raw_pcb* rpcb; + struct raw_pcb *rpcb; if (!ip_addr_isany(old_addr) && !ip_addr_isany(new_addr)) { for (rpcb = raw_pcbs; rpcb != NULL; rpcb = rpcb->next) { diff --git a/Libraries/LwIP/src/core/stats.c b/Libraries/LwIP/src/core/stats.c index 32981a6..4602842 100755 --- a/Libraries/LwIP/src/core/stats.c +++ b/Libraries/LwIP/src/core/stats.c @@ -105,17 +105,17 @@ void stats_display_mem(struct stats_mem *mem, const char *name) { LWIP_PLATFORM_DIAG(("\nMEM %s\n\t", name)); - LWIP_PLATFORM_DIAG(("avail: %"U32_F"\n\t", (u32_t)mem->avail)); - LWIP_PLATFORM_DIAG(("used: %"U32_F"\n\t", (u32_t)mem->used)); - LWIP_PLATFORM_DIAG(("max: %"U32_F"\n\t", (u32_t)mem->max)); - LWIP_PLATFORM_DIAG(("err: %"U32_F"\n", (u32_t)mem->err)); + LWIP_PLATFORM_DIAG(("avail: %"MEM_SIZE_F"\n\t", mem->avail)); + LWIP_PLATFORM_DIAG(("used: %"MEM_SIZE_F"\n\t", mem->used)); + LWIP_PLATFORM_DIAG(("max: %"MEM_SIZE_F"\n\t", mem->max)); + LWIP_PLATFORM_DIAG(("err: %"STAT_COUNTER_F"\n", mem->err)); } #if MEMP_STATS void -stats_display_memp(struct stats_mem *mem, int index) +stats_display_memp(struct stats_mem *mem, int idx) { - if (index < MEMP_MAX) { + if (idx < MEMP_MAX) { stats_display_mem(mem, mem->name); } } @@ -127,15 +127,15 @@ void stats_display_sys(struct stats_sys *sys) { LWIP_PLATFORM_DIAG(("\nSYS\n\t")); - LWIP_PLATFORM_DIAG(("sem.used: %"U32_F"\n\t", (u32_t)sys->sem.used)); - LWIP_PLATFORM_DIAG(("sem.max: %"U32_F"\n\t", (u32_t)sys->sem.max)); - LWIP_PLATFORM_DIAG(("sem.err: %"U32_F"\n\t", (u32_t)sys->sem.err)); - LWIP_PLATFORM_DIAG(("mutex.used: %"U32_F"\n\t", (u32_t)sys->mutex.used)); - LWIP_PLATFORM_DIAG(("mutex.max: %"U32_F"\n\t", (u32_t)sys->mutex.max)); - LWIP_PLATFORM_DIAG(("mutex.err: %"U32_F"\n\t", (u32_t)sys->mutex.err)); - LWIP_PLATFORM_DIAG(("mbox.used: %"U32_F"\n\t", (u32_t)sys->mbox.used)); - LWIP_PLATFORM_DIAG(("mbox.max: %"U32_F"\n\t", (u32_t)sys->mbox.max)); - LWIP_PLATFORM_DIAG(("mbox.err: %"U32_F"\n", (u32_t)sys->mbox.err)); + LWIP_PLATFORM_DIAG(("sem.used: %"STAT_COUNTER_F"\n\t", sys->sem.used)); + LWIP_PLATFORM_DIAG(("sem.max: %"STAT_COUNTER_F"\n\t", sys->sem.max)); + LWIP_PLATFORM_DIAG(("sem.err: %"STAT_COUNTER_F"\n\t", sys->sem.err)); + LWIP_PLATFORM_DIAG(("mutex.used: %"STAT_COUNTER_F"\n\t", sys->mutex.used)); + LWIP_PLATFORM_DIAG(("mutex.max: %"STAT_COUNTER_F"\n\t", sys->mutex.max)); + LWIP_PLATFORM_DIAG(("mutex.err: %"STAT_COUNTER_F"\n\t", sys->mutex.err)); + LWIP_PLATFORM_DIAG(("mbox.used: %"STAT_COUNTER_F"\n\t", sys->mbox.used)); + LWIP_PLATFORM_DIAG(("mbox.max: %"STAT_COUNTER_F"\n\t", sys->mbox.max)); + LWIP_PLATFORM_DIAG(("mbox.err: %"STAT_COUNTER_F"\n", sys->mbox.err)); } #endif /* SYS_STATS */ diff --git a/Libraries/LwIP/src/core/sys.c b/Libraries/LwIP/src/core/sys.c index 4d059a4..b95f4bd 100755 --- a/Libraries/LwIP/src/core/sys.c +++ b/Libraries/LwIP/src/core/sys.c @@ -39,14 +39,52 @@ /** * @defgroup sys_layer Porting (system abstraction layer) * @ingroup lwip - * @verbinclude "sys_arch.txt" * * @defgroup sys_os OS abstraction layer * @ingroup sys_layer * No need to implement functions in this section in NO_SYS mode. + * The OS-specific code should be implemented in arch/sys_arch.h + * and sys_arch.c of your port. + * + * The operating system emulation layer provides a common interface + * between the lwIP code and the underlying operating system kernel. The + * general idea is that porting lwIP to new architectures requires only + * small changes to a few header files and a new sys_arch + * implementation. It is also possible to do a sys_arch implementation + * that does not rely on any underlying operating system. + * + * The sys_arch provides semaphores, mailboxes and mutexes to lwIP. For the full + * lwIP functionality, multiple threads support can be implemented in the + * sys_arch, but this is not required for the basic lwIP + * functionality. Timer scheduling is implemented in lwIP, but can be implemented + * by the sys_arch port (LWIP_TIMERS_CUSTOM==1). + * + * In addition to the source file providing the functionality of sys_arch, + * the OS emulation layer must provide several header files defining + * macros used throughout lwip. The files required and the macros they + * must define are listed below the sys_arch description. + * + * Since lwIP 1.4.0, semaphore, mutexes and mailbox functions are prototyped in a way that + * allows both using pointers or actual OS structures to be used. This way, memory + * required for such types can be either allocated in place (globally or on the + * stack) or on the heap (allocated internally in the "*_new()" functions). + * + * Note: + * ----- + * Be careful with using mem_malloc() in sys_arch. When malloc() refers to + * mem_malloc() you can run into a circular function call problem. In mem.c + * mem_init() tries to allocate a semaphore using mem_malloc, which of course + * can't be performed when sys_arch uses mem_malloc. * * @defgroup sys_sem Semaphores * @ingroup sys_os + * Semaphores can be either counting or binary - lwIP works with both + * kinds. + * Semaphores are represented by the type "sys_sem_t" which is typedef'd + * in the sys_arch.h file. Mailboxes are equivalently represented by the + * type "sys_mbox_t". Mutexes are represented by the type "sys_mutex_t". + * lwIP does not place any restrictions on how these types are represented + * internally. * * @defgroup sys_mutex Mutexes * @ingroup sys_os @@ -55,6 +93,10 @@ * * @defgroup sys_mbox Mailboxes * @ingroup sys_os + * Mailboxes should be implemented as a queue which allows multiple messages + * to be posted (implementing as a rendez-vous point where only one message can be + * posted at a time can have a highly negative impact on performance). A message + * in a mailbox is just a pointer, nothing more. * * @defgroup sys_time Time * @ingroup sys_layer diff --git a/Libraries/LwIP/src/core/tcp.c b/Libraries/LwIP/src/core/tcp.c index 7103a52..2ff37ef 100755 --- a/Libraries/LwIP/src/core/tcp.c +++ b/Libraries/LwIP/src/core/tcp.c @@ -1,16 +1,68 @@ /** - * @file + * @file * Transmission Control Protocol for IP * See also @ref tcp_raw * * @defgroup tcp_raw TCP * @ingroup callbackstyle_api * Transmission Control Protocol for IP\n - * @see @ref raw_api and @ref netconn + * @see @ref api * - * Common functions for the TCP implementation, such as functinos + * Common functions for the TCP implementation, such as functions * for manipulating the data structures and the TCP timer functions. TCP functions * related to input and output is found in tcp_in.c and tcp_out.c respectively.\n + * + * TCP connection setup + * -------------------- + * The functions used for setting up connections is similar to that of + * the sequential API and of the BSD socket API. A new TCP connection + * identifier (i.e., a protocol control block - PCB) is created with the + * tcp_new() function. This PCB can then be either set to listen for new + * incoming connections or be explicitly connected to another host. + * - tcp_new() + * - tcp_bind() + * - tcp_listen() and tcp_listen_with_backlog() + * - tcp_accept() + * - tcp_connect() + * + * Sending TCP data + * ---------------- + * TCP data is sent by enqueueing the data with a call to tcp_write() and + * triggering to send by calling tcp_output(). When the data is successfully + * transmitted to the remote host, the application will be notified with a + * call to a specified callback function. + * - tcp_write() + * - tcp_output() + * - tcp_sent() + * + * Receiving TCP data + * ------------------ + * TCP data reception is callback based - an application specified + * callback function is called when new data arrives. When the + * application has taken the data, it has to call the tcp_recved() + * function to indicate that TCP can advertise increase the receive + * window. + * - tcp_recv() + * - tcp_recved() + * + * Application polling + * ------------------- + * When a connection is idle (i.e., no data is either transmitted or + * received), lwIP will repeatedly poll the application by calling a + * specified callback function. This can be used either as a watchdog + * timer for killing connections that have stayed idle for too long, or + * as a method of waiting for memory to become available. For instance, + * if a call to tcp_write() has failed because memory wasn't available, + * the application may use the polling functionality to call tcp_write() + * again when the connection has been idle for a while. + * - tcp_poll() + * + * Closing and aborting connections + * -------------------------------- + * - tcp_close() + * - tcp_abort() + * - tcp_err() + * */ /* @@ -71,7 +123,7 @@ "The Dynamic and/or Private Ports are those from 49152 through 65535" */ #define TCP_LOCAL_PORT_RANGE_START 0xc000 #define TCP_LOCAL_PORT_RANGE_END 0xffff -#define TCP_ENSURE_LOCAL_PORT_RANGE(port) ((u16_t)(((port) & ~TCP_LOCAL_PORT_RANGE_START) + TCP_LOCAL_PORT_RANGE_START)) +#define TCP_ENSURE_LOCAL_PORT_RANGE(port) ((u16_t)(((port) & (u16_t)~TCP_LOCAL_PORT_RANGE_START) + TCP_LOCAL_PORT_RANGE_START)) #endif #if LWIP_TCP_KEEPALIVE @@ -89,7 +141,7 @@ #define INITIAL_MSS TCP_MSS #endif -static const char * const tcp_state_str[] = { +static const char *const tcp_state_str[] = { "CLOSED", "LISTEN", "SYN_SENT", @@ -109,8 +161,8 @@ static u16_t tcp_port = TCP_LOCAL_PORT_RANGE_START; /* Incremented every coarse grained timer shot (typically every 500 ms). */ u32_t tcp_ticks; static const u8_t tcp_backoff[13] = - { 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7}; - /* Times per slowtmr hits */ +{ 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7}; +/* Times per slowtmr hits */ static const u8_t tcp_persist_backoff[7] = { 3, 6, 12, 24, 48, 96, 120 }; /* The TCP PCB lists. */ @@ -126,8 +178,9 @@ struct tcp_pcb *tcp_active_pcbs; struct tcp_pcb *tcp_tw_pcbs; /** An array with all (non-temporary) PCB lists, mainly used for smaller code size */ -struct tcp_pcb ** const tcp_pcb_lists[] = {&tcp_listen_pcbs.pcbs, &tcp_bound_pcbs, - &tcp_active_pcbs, &tcp_tw_pcbs}; +struct tcp_pcb **const tcp_pcb_lists[] = {&tcp_listen_pcbs.pcbs, &tcp_bound_pcbs, + &tcp_active_pcbs, &tcp_tw_pcbs +}; u8_t tcp_active_pcbs_changed; @@ -137,6 +190,9 @@ static u8_t tcp_timer_ctr; static u16_t tcp_new_port(void); static err_t tcp_close_shutdown_fin(struct tcp_pcb *pcb); +#if LWIP_TCP_PCB_NUM_EXT_ARGS +static void tcp_ext_arg_invoke_callbacks_destroyed(struct tcp_pcb_ext_args *ext_args); +#endif /** * Initialize this module. @@ -144,9 +200,31 @@ static err_t tcp_close_shutdown_fin(struct tcp_pcb *pcb); void tcp_init(void) { -#if LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS && defined(LWIP_RAND) +#ifdef LWIP_RAND tcp_port = TCP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND()); -#endif /* LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS && defined(LWIP_RAND) */ +#endif /* LWIP_RAND */ +} + +/** Free a tcp pcb */ +void +tcp_free(struct tcp_pcb *pcb) +{ + LWIP_ASSERT("tcp_free: LISTEN", pcb->state != LISTEN); +#if LWIP_TCP_PCB_NUM_EXT_ARGS + tcp_ext_arg_invoke_callbacks_destroyed(pcb->ext_args); +#endif + memp_free(MEMP_TCP_PCB, pcb); +} + +/** Free a tcp listen pcb */ +static void +tcp_free_listen(struct tcp_pcb *pcb) +{ + LWIP_ASSERT("tcp_free_listen: !LISTEN", pcb->state != LISTEN); +#if LWIP_TCP_PCB_NUM_EXT_ARGS + tcp_ext_arg_invoke_callbacks_destroyed(pcb->ext_args); +#endif + memp_free(MEMP_TCP_PCB_LISTEN, pcb); } /** @@ -172,12 +250,15 @@ tcp_tmr(void) static void tcp_remove_listener(struct tcp_pcb *list, struct tcp_pcb_listen *lpcb) { - struct tcp_pcb *pcb; - for (pcb = list; pcb != NULL; pcb = pcb->next) { - if (pcb->listener == lpcb) { - pcb->listener = NULL; - } - } + struct tcp_pcb *pcb; + + LWIP_ASSERT("tcp_remove_listener: invalid listener", lpcb != NULL); + + for (pcb = list; pcb != NULL; pcb = pcb->next) { + if (pcb->listener == lpcb) { + pcb->listener = NULL; + } + } } #endif @@ -192,7 +273,7 @@ tcp_listen_closed(struct tcp_pcb *pcb) LWIP_ASSERT("pcb != NULL", pcb != NULL); LWIP_ASSERT("pcb->state == LISTEN", pcb->state == LISTEN); for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) { - tcp_remove_listener(*tcp_pcb_lists[i], (struct tcp_pcb_listen*)pcb); + tcp_remove_listener(*tcp_pcb_lists[i], (struct tcp_pcb_listen *)pcb); } #endif LWIP_UNUSED_ARG(pcb); @@ -210,14 +291,15 @@ tcp_listen_closed(struct tcp_pcb *pcb) * @param pcb the connection pcb which is not fully accepted yet */ void -tcp_backlog_delayed(struct tcp_pcb* pcb) +tcp_backlog_delayed(struct tcp_pcb *pcb) { LWIP_ASSERT("pcb != NULL", pcb != NULL); + LWIP_ASSERT_CORE_LOCKED(); if ((pcb->flags & TF_BACKLOGPEND) == 0) { if (pcb->listener != NULL) { pcb->listener->accepts_pending++; LWIP_ASSERT("accepts_pending != 0", pcb->listener->accepts_pending != 0); - pcb->flags |= TF_BACKLOGPEND; + tcp_set_flags(pcb, TF_BACKLOGPEND); } } } @@ -232,14 +314,15 @@ tcp_backlog_delayed(struct tcp_pcb* pcb) * @param pcb the connection pcb which is now fully accepted (or closed/aborted) */ void -tcp_backlog_accepted(struct tcp_pcb* pcb) +tcp_backlog_accepted(struct tcp_pcb *pcb) { LWIP_ASSERT("pcb != NULL", pcb != NULL); + LWIP_ASSERT_CORE_LOCKED(); if ((pcb->flags & TF_BACKLOGPEND) != 0) { if (pcb->listener != NULL) { LWIP_ASSERT("accepts_pending != 0", pcb->listener->accepts_pending != 0); pcb->listener->accepts_pending--; - pcb->flags &= ~TF_BACKLOGPEND; + tcp_clear_flags(pcb, TF_BACKLOGPEND); } } } @@ -264,6 +347,8 @@ tcp_backlog_accepted(struct tcp_pcb* pcb) static err_t tcp_close_shutdown(struct tcp_pcb *pcb, u8_t rst_on_unacked_data) { + LWIP_ASSERT("tcp_close_shutdown: invalid pcb", pcb != NULL); + if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) { if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND_MAX(pcb))) { /* Not all data received by application, send RST to tell the remote @@ -272,23 +357,17 @@ tcp_close_shutdown(struct tcp_pcb *pcb, u8_t rst_on_unacked_data) /* don't call tcp_abort here: we must not deallocate the pcb since that might not be expected when calling tcp_close */ - tcp_rst(pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, - pcb->local_port, pcb->remote_port); + tcp_rst(pcb, pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, + pcb->local_port, pcb->remote_port); tcp_pcb_purge(pcb); TCP_RMV_ACTIVE(pcb); - if (pcb->state == ESTABLISHED) { - /* move to TIME_WAIT since we close actively */ - pcb->state = TIME_WAIT; - TCP_REG(&tcp_tw_pcbs, pcb); + /* Deallocate the pcb since we already sent a RST for it */ + if (tcp_input_pcb == pcb) { + /* prevent using a deallocated pcb: free it from tcp_input later */ + tcp_trigger_input_pcb_close(); } else { - /* CLOSE_WAIT: deallocate the pcb since we already sent a RST for it */ - if (tcp_input_pcb == pcb) { - /* prevent using a deallocated pcb: free it from tcp_input later */ - tcp_trigger_input_pcb_close(); - } else { - memp_free(MEMP_TCP_PCB, pcb); - } + tcp_free(pcb); } return ERR_OK; } @@ -297,31 +376,31 @@ tcp_close_shutdown(struct tcp_pcb *pcb, u8_t rst_on_unacked_data) /* - states which free the pcb are handled here, - states which send FIN and change state are handled in tcp_close_shutdown_fin() */ switch (pcb->state) { - case CLOSED: - /* Closing a pcb in the CLOSED state might seem erroneous, - * however, it is in this state once allocated and as yet unused - * and the user needs some way to free it should the need arise. - * Calling tcp_close() with a pcb that has already been closed, (i.e. twice) - * or for a pcb that has been used and then entered the CLOSED state - * is erroneous, but this should never happen as the pcb has in those cases - * been freed, and so any remaining handles are bogus. */ - if (pcb->local_port != 0) { - TCP_RMV(&tcp_bound_pcbs, pcb); - } - memp_free(MEMP_TCP_PCB, pcb); - break; - case LISTEN: - tcp_listen_closed(pcb); - tcp_pcb_remove(&tcp_listen_pcbs.pcbs, pcb); - memp_free(MEMP_TCP_PCB_LISTEN, pcb); - break; - case SYN_SENT: - TCP_PCB_REMOVE_ACTIVE(pcb); - memp_free(MEMP_TCP_PCB, pcb); - MIB2_STATS_INC(mib2.tcpattemptfails); - break; - default: - return tcp_close_shutdown_fin(pcb); + case CLOSED: + /* Closing a pcb in the CLOSED state might seem erroneous, + * however, it is in this state once allocated and as yet unused + * and the user needs some way to free it should the need arise. + * Calling tcp_close() with a pcb that has already been closed, (i.e. twice) + * or for a pcb that has been used and then entered the CLOSED state + * is erroneous, but this should never happen as the pcb has in those cases + * been freed, and so any remaining handles are bogus. */ + if (pcb->local_port != 0) { + TCP_RMV(&tcp_bound_pcbs, pcb); + } + tcp_free(pcb); + break; + case LISTEN: + tcp_listen_closed(pcb); + tcp_pcb_remove(&tcp_listen_pcbs.pcbs, pcb); + tcp_free_listen(pcb); + break; + case SYN_SENT: + TCP_PCB_REMOVE_ACTIVE(pcb); + tcp_free(pcb); + MIB2_STATS_INC(mib2.tcpattemptfails); + break; + default: + return tcp_close_shutdown_fin(pcb); } return ERR_OK; } @@ -333,31 +412,31 @@ tcp_close_shutdown_fin(struct tcp_pcb *pcb) LWIP_ASSERT("pcb != NULL", pcb != NULL); switch (pcb->state) { - case SYN_RCVD: - err = tcp_send_fin(pcb); - if (err == ERR_OK) { - tcp_backlog_accepted(pcb); - MIB2_STATS_INC(mib2.tcpattemptfails); - pcb->state = FIN_WAIT_1; - } - break; - case ESTABLISHED: - err = tcp_send_fin(pcb); - if (err == ERR_OK) { - MIB2_STATS_INC(mib2.tcpestabresets); - pcb->state = FIN_WAIT_1; - } - break; - case CLOSE_WAIT: - err = tcp_send_fin(pcb); - if (err == ERR_OK) { - MIB2_STATS_INC(mib2.tcpestabresets); - pcb->state = LAST_ACK; - } - break; - default: - /* Has already been closed, do nothing. */ - return ERR_OK; + case SYN_RCVD: + err = tcp_send_fin(pcb); + if (err == ERR_OK) { + tcp_backlog_accepted(pcb); + MIB2_STATS_INC(mib2.tcpattemptfails); + pcb->state = FIN_WAIT_1; + } + break; + case ESTABLISHED: + err = tcp_send_fin(pcb); + if (err == ERR_OK) { + MIB2_STATS_INC(mib2.tcpestabresets); + pcb->state = FIN_WAIT_1; + } + break; + case CLOSE_WAIT: + err = tcp_send_fin(pcb); + if (err == ERR_OK) { + MIB2_STATS_INC(mib2.tcpestabresets); + pcb->state = LAST_ACK; + } + break; + default: + /* Has already been closed, do nothing. */ + return ERR_OK; } if (err == ERR_OK) { @@ -369,7 +448,7 @@ tcp_close_shutdown_fin(struct tcp_pcb *pcb) tcp_output(pcb); } else if (err == ERR_MEM) { /* Mark this pcb for closing. Closing is retried from tcp_tmr. */ - pcb->flags |= TF_CLOSEPEND; + tcp_set_flags(pcb, TF_CLOSEPEND); /* We have to return ERR_OK from here to indicate to the callers that this pcb should not be used any more as it will be freed soon via tcp_tmr. This is OK here since sending FIN does not guarantee a time frime for @@ -390,6 +469,12 @@ tcp_close_shutdown_fin(struct tcp_pcb *pcb) * a closing state), the connection is closed, and put in a closing state. * The pcb is then automatically freed in tcp_slowtmr(). It is therefore * unsafe to reference it (unless an error is returned). + * + * The function may return ERR_MEM if no memory + * was available for closing the connection. If so, the application + * should wait and try again either by using the acknowledgment + * callback or the polling functionality. If the close succeeds, the + * function returns ERR_OK. * * @param pcb the tcp_pcb to close * @return ERR_OK if connection has been closed @@ -398,12 +483,16 @@ tcp_close_shutdown_fin(struct tcp_pcb *pcb) err_t tcp_close(struct tcp_pcb *pcb) { + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ERROR("tcp_close: invalid pcb", pcb != NULL, return ERR_ARG); LWIP_DEBUGF(TCP_DEBUG, ("tcp_close: closing in ")); + tcp_debug_print_state(pcb->state); if (pcb->state != LISTEN) { /* Set a flag not to receive any more data... */ - pcb->flags |= TF_RXCLOSED; + tcp_set_flags(pcb, TF_RXCLOSED); } /* ... and close */ return tcp_close_shutdown(pcb, 1); @@ -425,12 +514,16 @@ tcp_close(struct tcp_pcb *pcb) err_t tcp_shutdown(struct tcp_pcb *pcb, int shut_rx, int shut_tx) { + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ERROR("tcp_shutdown: invalid pcb", pcb != NULL, return ERR_ARG); + if (pcb->state == LISTEN) { return ERR_CONN; } if (shut_rx) { /* shut down the receive side: set a flag not to receive any more data... */ - pcb->flags |= TF_RXCLOSED; + tcp_set_flags(pcb, TF_RXCLOSED); if (shut_tx) { /* shutting down the tx AND rx side is the same as closing for the raw API */ return tcp_close_shutdown(pcb, 1); @@ -445,14 +538,14 @@ tcp_shutdown(struct tcp_pcb *pcb, int shut_rx, int shut_tx) /* This can't happen twice since if it succeeds, the pcb's state is changed. Only close in these states as the others directly deallocate the PCB */ switch (pcb->state) { - case SYN_RCVD: - case ESTABLISHED: - case CLOSE_WAIT: - return tcp_close_shutdown(pcb, (u8_t)shut_rx); - default: - /* Not (yet?) connected, cannot shutdown the TX side as that would bring us - into CLOSED state, where the PCB is deallocated. */ - return ERR_CONN; + case SYN_RCVD: + case ESTABLISHED: + case CLOSE_WAIT: + return tcp_close_shutdown(pcb, (u8_t)shut_rx); + default: + /* Not (yet?) connected, cannot shutdown the TX side as that would bring us + into CLOSED state, where the PCB is deallocated. */ + return ERR_CONN; } } return ERR_OK; @@ -475,15 +568,19 @@ tcp_abandon(struct tcp_pcb *pcb, int reset) #endif /* LWIP_CALLBACK_API */ void *errf_arg; + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ERROR("tcp_abandon: invalid pcb", pcb != NULL, return); + /* pcb->state LISTEN not allowed here */ LWIP_ASSERT("don't call tcp_abort/tcp_abandon for listen-pcbs", - pcb->state != LISTEN); + pcb->state != LISTEN); /* Figure out on which TCP PCB list we are, and remove us. If we are in an active state, call the receive function associated with the PCB with a NULL argument, and send an RST to the remote end. */ if (pcb->state == TIME_WAIT) { tcp_pcb_remove(&tcp_tw_pcbs, pcb); - memp_free(MEMP_TCP_PCB, pcb); + tcp_free(pcb); } else { int send_rst = 0; u16_t local_port = 0; @@ -518,10 +615,10 @@ tcp_abandon(struct tcp_pcb *pcb, int reset) tcp_backlog_accepted(pcb); if (send_rst) { LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_abandon: sending RST\n")); - tcp_rst(seqno, ackno, &pcb->local_ip, &pcb->remote_ip, local_port, pcb->remote_port); + tcp_rst(pcb, seqno, ackno, &pcb->local_ip, &pcb->remote_ip, local_port, pcb->remote_port); } last_state = pcb->state; - memp_free(MEMP_TCP_PCB, pcb); + tcp_free(pcb); TCP_EVENT_ERR(last_state, errf, errf_arg, ERR_ABRT); } } @@ -546,12 +643,14 @@ tcp_abort(struct tcp_pcb *pcb) /** * @ingroup tcp_raw * Binds the connection to a local port number and IP address. If the - * IP address is not given (i.e., ipaddr == NULL), the IP address of - * the outgoing network interface is used instead. + * IP address is not given (i.e., ipaddr == IP_ANY_TYPE), the connection is + * bound to all local IP addresses. + * If another connection is bound to the same port, the function will + * return ERR_USE, otherwise ERR_OK is returned. * * @param pcb the tcp_pcb to bind (no check is done whether this pcb is * already bound!) - * @param ipaddr the local ip address to bind to (use IP4_ADDR_ANY to bind + * @param ipaddr the local ip address to bind to (use IPx_ADDR_ANY to bind * to any local address * @param port the local port to bind to * @return ERR_USE if the port is already in use @@ -564,18 +663,22 @@ tcp_bind(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) int i; int max_pcb_list = NUM_TCP_PCB_LISTS; struct tcp_pcb *cpcb; +#if LWIP_IPV6 && LWIP_IPV6_SCOPES + ip_addr_t zoned_ipaddr; +#endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */ + + LWIP_ASSERT_CORE_LOCKED(); #if LWIP_IPV4 /* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */ if (ipaddr == NULL) { ipaddr = IP4_ADDR_ANY; } +#else /* LWIP_IPV4 */ + LWIP_ERROR("tcp_bind: invalid ipaddr", ipaddr != NULL, return ERR_ARG); #endif /* LWIP_IPV4 */ - /* still need to check for ipaddr == NULL in IPv6 only case */ - if ((pcb == NULL) || (ipaddr == NULL)) { - return ERR_VAL; - } + LWIP_ERROR("tcp_bind: invalid pcb", pcb != NULL, return ERR_ARG); LWIP_ERROR("tcp_bind: can only bind in state CLOSED", pcb->state == CLOSED, return ERR_VAL); @@ -590,6 +693,18 @@ tcp_bind(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) } #endif /* SO_REUSE */ +#if LWIP_IPV6 && LWIP_IPV6_SCOPES + /* If the given IP address should have a zone but doesn't, assign one now. + * This is legacy support: scope-aware callers should always provide properly + * zoned source addresses. Do the zone selection before the address-in-use + * check below; as such we have to make a temporary copy of the address. */ + if (IP_IS_V6(ipaddr) && ip6_addr_lacks_zone(ip_2_ip6(ipaddr), IP6_UNICAST)) { + ip_addr_copy(zoned_ipaddr, *ipaddr); + ip6_addr_select_zone(ip_2_ip6(&zoned_ipaddr), ip_2_ip6(&zoned_ipaddr)); + ipaddr = &zoned_ipaddr; + } +#endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */ + if (port == 0) { port = tcp_new_port(); if (port == 0) { @@ -611,8 +726,8 @@ tcp_bind(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) /* @todo: check accept_any_ip_version */ if ((IP_IS_V6(ipaddr) == IP_IS_V6_VAL(cpcb->local_ip)) && (ip_addr_isany(&cpcb->local_ip) || - ip_addr_isany(ipaddr) || - ip_addr_cmp(&cpcb->local_ip, ipaddr))) { + ip_addr_isany(ipaddr) || + ip_addr_cmp(&cpcb->local_ip, ipaddr))) { return ERR_USE; } } @@ -621,7 +736,11 @@ tcp_bind(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) } } - if (!ip_addr_isany(ipaddr)) { + if (!ip_addr_isany(ipaddr) +#if LWIP_IPV4 && LWIP_IPV6 + || (IP_GET_TYPE(ipaddr) != IP_GET_TYPE(&pcb->local_ip)) +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + ) { ip_addr_set(&pcb->local_ip, ipaddr); } pcb->local_port = port; @@ -629,6 +748,28 @@ tcp_bind(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) LWIP_DEBUGF(TCP_DEBUG, ("tcp_bind: bind to port %"U16_F"\n", port)); return ERR_OK; } + +/** + * @ingroup tcp_raw + * Binds the connection to a netif and IP address. + * After calling this function, all packets received via this PCB + * are guaranteed to have come in via the specified netif, and all + * outgoing packets will go out via the specified netif. + * + * @param pcb the tcp_pcb to bind. + * @param netif the netif to bind to. Can be NULL. + */ +void +tcp_bind_netif(struct tcp_pcb *pcb, const struct netif *netif) +{ + LWIP_ASSERT_CORE_LOCKED(); + if (netif != NULL) { + pcb->netif_idx = netif_get_index(netif); + } else { + pcb->netif_idx = NETIF_NO_INDEX; + } +} + #if LWIP_CALLBACK_API /** * Default accept callback if no accept callback is specified by the user. @@ -639,6 +780,8 @@ tcp_accept_null(void *arg, struct tcp_pcb *pcb, err_t err) LWIP_UNUSED_ARG(arg); LWIP_UNUSED_ARG(err); + LWIP_ASSERT("tcp_accept_null: invalid pcb", pcb != NULL); + tcp_abort(pcb); return ERR_ABRT; @@ -651,7 +794,25 @@ tcp_accept_null(void *arg, struct tcp_pcb *pcb, err_t err) * is able to accept incoming connections. The protocol control block * is reallocated in order to consume less memory. Setting the * connection to LISTEN is an irreversible process. + * When an incoming connection is accepted, the function specified with + * the tcp_accept() function will be called. The pcb has to be bound + * to a local port with the tcp_bind() function. + * + * The tcp_listen() function returns a new connection identifier, and + * the one passed as an argument to the function will be + * deallocated. The reason for this behavior is that less memory is + * needed for a connection that is listening, so tcp_listen() will + * reclaim the memory needed for the original connection and allocate a + * new smaller memory block for the listening connection. * + * tcp_listen() may return NULL if no memory was available for the + * listening connection. If so, the memory associated with the pcb + * passed as an argument to tcp_listen() will not be deallocated. + * + * The backlog limits the number of outstanding connections + * in the listen queue to the value specified by the backlog argument. + * To use it, your need to set TCP_LISTEN_BACKLOG=1 in your lwipopts.h. + * * @param pcb the original tcp_pcb * @param backlog the incoming connections queue limit * @return tcp_pcb used for listening, consumes less memory. @@ -663,6 +824,7 @@ tcp_accept_null(void *arg, struct tcp_pcb *pcb, err_t err) struct tcp_pcb * tcp_listen_with_backlog(struct tcp_pcb *pcb, u8_t backlog) { + LWIP_ASSERT_CORE_LOCKED(); return tcp_listen_with_backlog_and_err(pcb, backlog, NULL); } @@ -689,11 +851,15 @@ tcp_listen_with_backlog_and_err(struct tcp_pcb *pcb, u8_t backlog, err_t *err) err_t res; LWIP_UNUSED_ARG(backlog); - LWIP_ERROR("tcp_listen: pcb already connected", pcb->state == CLOSED, res = ERR_CLSD; goto done); + + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ERROR("tcp_listen_with_backlog_and_err: invalid pcb", pcb != NULL, res = ERR_ARG; goto done); + LWIP_ERROR("tcp_listen_with_backlog_and_err: pcb already connected", pcb->state == CLOSED, res = ERR_CLSD; goto done); /* already listening? */ if (pcb->state == LISTEN) { - lpcb = (struct tcp_pcb_listen*)pcb; + lpcb = (struct tcp_pcb_listen *)pcb; res = ERR_ALREADY; goto done; } @@ -723,6 +889,7 @@ tcp_listen_with_backlog_and_err(struct tcp_pcb *pcb, u8_t backlog, err_t *err) lpcb->state = LISTEN; lpcb->prio = pcb->prio; lpcb->so_options = pcb->so_options; + lpcb->netif_idx = NETIF_NO_INDEX; lpcb->ttl = pcb->ttl; lpcb->tos = pcb->tos; #if LWIP_IPV4 && LWIP_IPV6 @@ -732,7 +899,11 @@ tcp_listen_with_backlog_and_err(struct tcp_pcb *pcb, u8_t backlog, err_t *err) if (pcb->local_port != 0) { TCP_RMV(&tcp_bound_pcbs, pcb); } - memp_free(MEMP_TCP_PCB, pcb); +#if LWIP_TCP_PCB_NUM_EXT_ARGS + /* copy over ext_args to listening pcb */ + memcpy(&lpcb->ext_args, &pcb->ext_args, sizeof(pcb->ext_args)); +#endif + tcp_free(pcb); #if LWIP_CALLBACK_API lpcb->accept = tcp_accept_null; #endif /* LWIP_CALLBACK_API */ @@ -758,7 +929,10 @@ done: u32_t tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb) { - u32_t new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd; + u32_t new_right_edge; + + LWIP_ASSERT("tcp_update_rcv_ann_wnd: invalid pcb", pcb != NULL); + new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd; if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) { /* we can advertise more window */ @@ -793,25 +967,24 @@ tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb) void tcp_recved(struct tcp_pcb *pcb, u16_t len) { - int wnd_inflation; + u32_t wnd_inflation; + tcpwnd_size_t rcv_wnd; + + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ERROR("tcp_recved: invalid pcb", pcb != NULL, return); /* pcb->state LISTEN not allowed here */ LWIP_ASSERT("don't call tcp_recved for listen-pcbs", - pcb->state != LISTEN); + pcb->state != LISTEN); - pcb->rcv_wnd += len; - if (pcb->rcv_wnd > TCP_WND_MAX(pcb)) { + rcv_wnd = (tcpwnd_size_t)(pcb->rcv_wnd + len); + if ((rcv_wnd > TCP_WND_MAX(pcb)) || (rcv_wnd < pcb->rcv_wnd)) { + /* window got too big or tcpwnd_size_t overflow */ + LWIP_DEBUGF(TCP_DEBUG, ("tcp_recved: window got too big or tcpwnd_size_t overflow\n")); pcb->rcv_wnd = TCP_WND_MAX(pcb); - } else if (pcb->rcv_wnd == 0) { - /* rcv_wnd overflowed */ - if ((pcb->state == CLOSE_WAIT) || (pcb->state == LAST_ACK)) { - /* In passive close, we allow this, since the FIN bit is added to rcv_wnd - by the stack itself, since it is not mandatory for an application - to call tcp_recved() for the FIN bit, but e.g. the netconn API does so. */ - pcb->rcv_wnd = TCP_WND_MAX(pcb); - } else { - LWIP_ASSERT("tcp_recved: len wrapped rcv_wnd\n", 0); - } + } else { + pcb->rcv_wnd = rcv_wnd; } wnd_inflation = tcp_update_rcv_ann_wnd(pcb); @@ -826,7 +999,7 @@ tcp_recved(struct tcp_pcb *pcb, u16_t len) } LWIP_DEBUGF(TCP_DEBUG, ("tcp_recved: received %"U16_F" bytes, wnd %"TCPWNDSIZE_F" (%"TCPWNDSIZE_F").\n", - len, pcb->rcv_wnd, (u16_t)(TCP_WND_MAX(pcb) - pcb->rcv_wnd))); + len, pcb->rcv_wnd, (u16_t)(TCP_WND_MAX(pcb) - pcb->rcv_wnd))); } /** @@ -842,14 +1015,16 @@ tcp_new_port(void) struct tcp_pcb *pcb; again: - if (tcp_port++ == TCP_LOCAL_PORT_RANGE_END) { + tcp_port++; + if (tcp_port == TCP_LOCAL_PORT_RANGE_END) { tcp_port = TCP_LOCAL_PORT_RANGE_START; } /* Check all PCB lists. */ for (i = 0; i < NUM_TCP_PCB_LISTS; i++) { for (pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) { if (pcb->local_port == tcp_port) { - if (++n > (TCP_LOCAL_PORT_RANGE_END - TCP_LOCAL_PORT_RANGE_START)) { + n++; + if (n > (TCP_LOCAL_PORT_RANGE_END - TCP_LOCAL_PORT_RANGE_START)) { return 0; } goto again; @@ -863,6 +1038,21 @@ again: * @ingroup tcp_raw * Connects to another host. The function given as the "connected" * argument will be called when the connection has been established. + * Sets up the pcb to connect to the remote host and sends the + * initial SYN segment which opens the connection. + * + * The tcp_connect() function returns immediately; it does not wait for + * the connection to be properly setup. Instead, it will call the + * function specified as the fourth argument (the "connected" argument) + * when the connection is established. If the connection could not be + * properly established, either because the other host refused the + * connection or because the other host didn't answer, the "err" + * callback function of this pcb (registered with tcp_err, see below) + * will be called. + * + * The tcp_connect() function can return ERR_MEM if no memory is + * available for enqueueing the SYN segment. If the SYN indeed was + * enqueued successfully, the tcp_connect() function returns ERR_OK. * * @param pcb the tcp_pcb used to establish the connection * @param ipaddr the remote ip address to connect to @@ -875,15 +1065,17 @@ again: */ err_t tcp_connect(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port, - tcp_connected_fn connected) + tcp_connected_fn connected) { + struct netif *netif = NULL; err_t ret; u32_t iss; u16_t old_local_port; - if ((pcb == NULL) || (ipaddr == NULL)) { - return ERR_VAL; - } + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ERROR("tcp_connect: invalid pcb", pcb != NULL, return ERR_ARG); + LWIP_ERROR("tcp_connect: invalid ipaddr", ipaddr != NULL, return ERR_ARG); LWIP_ERROR("tcp_connect: can only connect from state CLOSED", pcb->state == CLOSED, return ERR_ISCONN); @@ -891,21 +1083,35 @@ tcp_connect(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port, ip_addr_set(&pcb->remote_ip, ipaddr); pcb->remote_port = port; - /* check if we have a route to the remote host */ + if (pcb->netif_idx != NETIF_NO_INDEX) { + netif = netif_get_by_index(pcb->netif_idx); + } else { + /* check if we have a route to the remote host */ + netif = ip_route(&pcb->local_ip, &pcb->remote_ip); + } + if (netif == NULL) { + /* Don't even try to send a SYN packet if we have no route since that will fail. */ + return ERR_RTE; + } + + /* check if local IP has been assigned to pcb, if not, get one */ if (ip_addr_isany(&pcb->local_ip)) { - /* no local IP address set, yet. */ - struct netif *netif; - const ip_addr_t *local_ip; - ip_route_get_local_ip(&pcb->local_ip, &pcb->remote_ip, netif, local_ip); - if ((netif == NULL) || (local_ip == NULL)) { - /* Don't even try to send a SYN packet if we have no route - since that will fail. */ + const ip_addr_t *local_ip = ip_netif_get_local_ip(netif, ipaddr); + if (local_ip == NULL) { return ERR_RTE; } - /* Use the address as local address of the pcb. */ ip_addr_copy(pcb->local_ip, *local_ip); } +#if LWIP_IPV6 && LWIP_IPV6_SCOPES + /* If the given IP address should have a zone but doesn't, assign one now. + * Given that we already have the target netif, this is easy and cheap. */ + if (IP_IS_V6(&pcb->remote_ip) && + ip6_addr_lacks_zone(ip_2_ip6(&pcb->remote_ip), IP6_UNICAST)) { + ip6_addr_assign_zone(ip_2_ip6(&pcb->remote_ip), IP6_UNICAST, netif); + } +#endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */ + old_local_port = pcb->local_port; if (pcb->local_port == 0) { pcb->local_port = tcp_new_port(); @@ -950,7 +1156,7 @@ tcp_connect(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port, The send MSS is updated when an MSS option is received. */ pcb->mss = INITIAL_MSS; #if TCP_CALCULATE_EFF_SEND_MSS - pcb->mss = tcp_eff_send_mss(pcb->mss, &pcb->local_ip, &pcb->remote_ip); + pcb->mss = tcp_eff_send_mss_netif(pcb->mss, netif, &pcb->remote_ip); #endif /* TCP_CALCULATE_EFF_SEND_MSS */ pcb->cwnd = 1; #if LWIP_CALLBACK_API @@ -1010,6 +1216,7 @@ tcp_slowtmr_start: LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT); if (pcb->last_timer == tcp_timer_ctr) { /* skip this pcb, we have already processed it */ + prev = pcb; pcb = pcb->next; continue; } @@ -1021,62 +1228,86 @@ tcp_slowtmr_start: if (pcb->state == SYN_SENT && pcb->nrtx >= TCP_SYNMAXRTX) { ++pcb_remove; LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max SYN retries reached\n")); - } - else if (pcb->nrtx >= TCP_MAXRTX) { + } else if (pcb->nrtx >= TCP_MAXRTX) { ++pcb_remove; LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max DATA retries reached\n")); } else { if (pcb->persist_backoff > 0) { - /* If snd_wnd is zero, use persist timer to send 1 byte probes - * instead of using the standard retransmission mechanism. */ - u8_t backoff_cnt = tcp_persist_backoff[pcb->persist_backoff-1]; - if (pcb->persist_cnt < backoff_cnt) { - pcb->persist_cnt++; - } - if (pcb->persist_cnt >= backoff_cnt) { - if (tcp_zero_window_probe(pcb) == ERR_OK) { - pcb->persist_cnt = 0; - if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) { - pcb->persist_backoff++; + LWIP_ASSERT("tcp_slowtimr: persist ticking with in-flight data", pcb->unacked == NULL); + LWIP_ASSERT("tcp_slowtimr: persist ticking with empty send buffer", pcb->unsent != NULL); + if (pcb->persist_probe >= TCP_MAXRTX) { + ++pcb_remove; /* max probes reached */ + } else { + u8_t backoff_cnt = tcp_persist_backoff[pcb->persist_backoff - 1]; + if (pcb->persist_cnt < backoff_cnt) { + pcb->persist_cnt++; + } + if (pcb->persist_cnt >= backoff_cnt) { + int next_slot = 1; /* increment timer to next slot */ + /* If snd_wnd is zero, send 1 byte probes */ + if (pcb->snd_wnd == 0) { + if (tcp_zero_window_probe(pcb) != ERR_OK) { + next_slot = 0; /* try probe again with current slot */ + } + /* snd_wnd not fully closed, split unsent head and fill window */ + } else { + if (tcp_split_unsent_seg(pcb, (u16_t)pcb->snd_wnd) == ERR_OK) { + if (tcp_output(pcb) == ERR_OK) { + /* sending will cancel persist timer, else retry with current slot */ + next_slot = 0; + } + } + } + if (next_slot) { + pcb->persist_cnt = 0; + if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) { + pcb->persist_backoff++; + } } } } } else { /* Increase the retransmission timer if it is running */ - if (pcb->rtime >= 0) { + if ((pcb->rtime >= 0) && (pcb->rtime < 0x7FFF)) { ++pcb->rtime; } - if (pcb->unacked != NULL && pcb->rtime >= pcb->rto) { + if (pcb->rtime >= pcb->rto) { /* Time for a retransmission. */ LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_slowtmr: rtime %"S16_F " pcb->rto %"S16_F"\n", pcb->rtime, pcb->rto)); + /* If prepare phase fails but we have unsent data but no unacked data, + still execute the backoff calculations below, as this means we somehow + failed to send segment. */ + if ((tcp_rexmit_rto_prepare(pcb) == ERR_OK) || ((pcb->unacked == NULL) && (pcb->unsent != NULL))) { + /* Double retransmission time-out unless we are trying to + * connect to somebody (i.e., we are in SYN_SENT). */ + if (pcb->state != SYN_SENT) { + u8_t backoff_idx = LWIP_MIN(pcb->nrtx, sizeof(tcp_backoff) - 1); + int calc_rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[backoff_idx]; + pcb->rto = (s16_t)LWIP_MIN(calc_rto, 0x7FFF); + } - /* Double retransmission time-out unless we are trying to - * connect to somebody (i.e., we are in SYN_SENT). */ - if (pcb->state != SYN_SENT) { - u8_t backoff_idx = LWIP_MIN(pcb->nrtx, sizeof(tcp_backoff)-1); - pcb->rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[backoff_idx]; + /* Reset the retransmission timer. */ + pcb->rtime = 0; + + /* Reduce congestion window and ssthresh. */ + eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); + pcb->ssthresh = eff_wnd >> 1; + if (pcb->ssthresh < (tcpwnd_size_t)(pcb->mss << 1)) { + pcb->ssthresh = (tcpwnd_size_t)(pcb->mss << 1); + } + pcb->cwnd = pcb->mss; + LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_slowtmr: cwnd %"TCPWNDSIZE_F + " ssthresh %"TCPWNDSIZE_F"\n", + pcb->cwnd, pcb->ssthresh)); + pcb->bytes_acked = 0; + + /* The following needs to be called AFTER cwnd is set to one + mss - STJ */ + tcp_rexmit_rto_commit(pcb); } - - /* Reset the retransmission timer. */ - pcb->rtime = 0; - - /* Reduce congestion window and ssthresh. */ - eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); - pcb->ssthresh = eff_wnd >> 1; - if (pcb->ssthresh < (tcpwnd_size_t)(pcb->mss << 1)) { - pcb->ssthresh = (pcb->mss << 1); - } - pcb->cwnd = pcb->mss; - LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_slowtmr: cwnd %"TCPWNDSIZE_F - " ssthresh %"TCPWNDSIZE_F"\n", - pcb->cwnd, pcb->ssthresh)); - - /* The following needs to be called AFTER cwnd is set to one - mss - STJ */ - tcp_rexmit_rto(pcb); } } } @@ -1096,21 +1327,19 @@ tcp_slowtmr_start: /* Check if KEEPALIVE should be sent */ if (ip_get_option(pcb, SOF_KEEPALIVE) && - ((pcb->state == ESTABLISHED) || - (pcb->state == CLOSE_WAIT))) { + ((pcb->state == ESTABLISHED) || + (pcb->state == CLOSE_WAIT))) { if ((u32_t)(tcp_ticks - pcb->tmr) > - (pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) - { + (pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) { LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: KEEPALIVE timeout. Aborting connection to ")); - ip_addr_debug_print(TCP_DEBUG, &pcb->remote_ip); + ip_addr_debug_print_val(TCP_DEBUG, pcb->remote_ip); LWIP_DEBUGF(TCP_DEBUG, ("\n")); ++pcb_remove; ++pcb_reset; } else if ((u32_t)(tcp_ticks - pcb->tmr) > - (pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb)) - / TCP_SLOW_INTERVAL) - { + (pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb)) + / TCP_SLOW_INTERVAL) { err = tcp_keepalive(pcb); if (err == ERR_OK) { pcb->keep_cnt_sent++; @@ -1123,10 +1352,9 @@ tcp_slowtmr_start: be retransmitted). */ #if TCP_QUEUE_OOSEQ if (pcb->ooseq != NULL && - (u32_t)tcp_ticks - pcb->tmr >= pcb->rto * TCP_OOSEQ_TIMEOUT) { - tcp_segs_free(pcb->ooseq); - pcb->ooseq = NULL; + (tcp_ticks - pcb->tmr >= (u32_t)pcb->rto * TCP_OOSEQ_TIMEOUT)) { LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_slowtmr: dropping OOSEQ queued data\n")); + tcp_free_ooseq(pcb); } #endif /* TCP_QUEUE_OOSEQ */ @@ -1167,15 +1395,15 @@ tcp_slowtmr_start: } if (pcb_reset) { - tcp_rst(pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, - pcb->local_port, pcb->remote_port); + tcp_rst(pcb, pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, + pcb->local_port, pcb->remote_port); } err_arg = pcb->callback_arg; last_state = pcb->state; pcb2 = pcb; pcb = pcb->next; - memp_free(MEMP_TCP_PCB, pcb2); + tcp_free(pcb2); tcp_active_pcbs_changed = 0; TCP_EVENT_ERR(last_state, err_fn, err_arg, ERR_ABRT); @@ -1233,7 +1461,7 @@ tcp_slowtmr_start: } pcb2 = pcb; pcb = pcb->next; - memp_free(MEMP_TCP_PCB, pcb2); + tcp_free(pcb2); } else { prev = pcb; pcb = pcb->next; @@ -1243,7 +1471,7 @@ tcp_slowtmr_start: /** * Is called every TCP_FAST_INTERVAL (250 ms) and process data previously - * "refused" by upper layer (application) and sends delayed ACKs. + * "refused" by upper layer (application) and sends delayed ACKs or pending FINs. * * Automatically called from tcp_tmr(). */ @@ -1266,12 +1494,12 @@ tcp_fasttmr_start: LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: delayed ACK\n")); tcp_ack_now(pcb); tcp_output(pcb); - pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); + tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); } /* send pending FIN */ if (pcb->flags & TF_CLOSEPEND) { LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: pending FIN\n")); - pcb->flags &= ~(TF_CLOSEPEND); + tcp_clear_flags(pcb, TF_CLOSEPEND); tcp_close_shutdown_fin(pcb); } @@ -1312,6 +1540,11 @@ tcp_process_refused_data(struct tcp_pcb *pcb) { #if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE struct pbuf *rest; +#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ + + LWIP_ERROR("tcp_process_refused_data: invalid pcb", pcb != NULL, return ERR_ARG); + +#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE while (pcb->refused_data != NULL) #endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ { @@ -1331,7 +1564,7 @@ tcp_process_refused_data(struct tcp_pcb *pcb) TCP_EVENT_RECV(pcb, refused_data, ERR_OK, err); if (err == ERR_OK) { /* did refused_data include a FIN? */ - if (refused_flags & PBUF_FLAG_TCP_FIN + if ((refused_flags & PBUF_FLAG_TCP_FIN) #if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE && (rest == NULL) #endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ @@ -1401,6 +1634,7 @@ tcp_seg_free(struct tcp_seg *seg) } /** + * @ingroup tcp * Sets the priority of a connection. * * @param pcb the tcp_pcb to manipulate @@ -1409,6 +1643,10 @@ tcp_seg_free(struct tcp_seg *seg) void tcp_setprio(struct tcp_pcb *pcb, u8_t prio) { + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ERROR("tcp_setprio: invalid pcb", pcb != NULL, return); + pcb->prio = prio; } @@ -1425,6 +1663,8 @@ tcp_seg_copy(struct tcp_seg *seg) { struct tcp_seg *cseg; + LWIP_ASSERT("tcp_seg_copy: invalid seg", seg != NULL); + cseg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG); if (cseg == NULL) { return NULL; @@ -1444,6 +1684,9 @@ err_t tcp_recv_null(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) { LWIP_UNUSED_ARG(arg); + + LWIP_ERROR("tcp_recv_null: invalid pcb", pcb != NULL, return ERR_ARG); + if (p != NULL) { tcp_recved(pcb, p->tot_len); pbuf_free(p); @@ -1455,8 +1698,7 @@ tcp_recv_null(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) #endif /* LWIP_CALLBACK_API */ /** - * Kills the oldest active connection that has the same or lower priority than - * 'prio'. + * Kills the oldest active connection that has a lower priority than 'prio'. * * @param prio minimum priority */ @@ -1469,20 +1711,35 @@ tcp_kill_prio(u8_t prio) mprio = LWIP_MIN(TCP_PRIO_MAX, prio); - /* We kill the oldest active connection that has lower priority than prio. */ + /* We want to kill connections with a lower prio, so bail out if + * supplied prio is 0 - there can never be a lower prio + */ + if (mprio == 0) { + return; + } + + /* We only want kill connections with a lower prio, so decrement prio by one + * and start searching for oldest connection with same or lower priority than mprio. + * We want to find the connections with the lowest possible prio, and among + * these the one with the longest inactivity time. + */ + mprio--; + inactivity = 0; inactive = NULL; for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { - if (pcb->prio <= mprio && - (u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { + /* lower prio is always a kill candidate */ + if ((pcb->prio < mprio) || + /* longer inactivity is also a kill candidate */ + ((pcb->prio == mprio) && ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity))) { inactivity = tcp_ticks - pcb->tmr; - inactive = pcb; - mprio = pcb->prio; + inactive = pcb; + mprio = pcb->prio; } } if (inactive != NULL) { LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_prio: killing oldest PCB %p (%"S32_F")\n", - (void *)inactive, inactivity)); + (void *)inactive, inactivity)); tcp_abort(inactive); } } @@ -1513,7 +1770,7 @@ tcp_kill_state(enum tcp_state state) } if (inactive != NULL) { LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_closing: killing oldest %s PCB %p (%"S32_F")\n", - tcp_state_str[state], (void *)inactive, inactivity)); + tcp_state_str[state], (void *)inactive, inactivity)); /* Don't send a RST, since no data is lost. */ tcp_abandon(inactive, 0); } @@ -1540,11 +1797,33 @@ tcp_kill_timewait(void) } if (inactive != NULL) { LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_timewait: killing oldest TIME-WAIT PCB %p (%"S32_F")\n", - (void *)inactive, inactivity)); + (void *)inactive, inactivity)); tcp_abort(inactive); } } +/* Called when allocating a pcb fails. + * In this case, we want to handle all pcbs that want to close first: if we can + * now send the FIN (which failed before), the pcb might be in a state that is + * OK for us to now free it. + */ +static void +tcp_handle_closepend(void) +{ + struct tcp_pcb *pcb = tcp_active_pcbs; + + while (pcb != NULL) { + struct tcp_pcb *next = pcb->next; + /* send pending FIN */ + if (pcb->flags & TF_CLOSEPEND) { + LWIP_DEBUGF(TCP_DEBUG, ("tcp_handle_closepend: pending FIN\n")); + tcp_clear_flags(pcb, TF_CLOSEPEND); + tcp_close_shutdown_fin(pcb); + } + pcb = next; + } +} + /** * Allocate a new tcp_pcb structure. * @@ -1556,8 +1835,13 @@ tcp_alloc(u8_t prio) { struct tcp_pcb *pcb; + LWIP_ASSERT_CORE_LOCKED(); + pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); if (pcb == NULL) { + /* Try to send FIN for all pcbs stuck in TF_CLOSEPEND first */ + tcp_handle_closepend(); + /* Try killing oldest connection in TIME-WAIT. */ LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest TIME-WAIT connection\n")); tcp_kill_timewait(); @@ -1576,8 +1860,8 @@ tcp_alloc(u8_t prio) /* Try to allocate a tcp_pcb again. */ pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); if (pcb == NULL) { - /* Try killing active connections with lower priority than the new one. */ - LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing connection with prio lower than %d\n", prio)); + /* Try killing oldest active connection with lower priority than the new one. */ + LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing oldest connection with prio lower than %d\n", prio)); tcp_kill_prio(prio); /* Try to allocate a tcp_pcb again. */ pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); @@ -1648,6 +1932,7 @@ tcp_alloc(u8_t prio) * Creates a new TCP protocol control block but doesn't place it on * any of the TCP PCB lists. * The pcb is not put on any list until binding using tcp_bind(). + * If memory is not available for creating the new pcb, NULL is returned. * * @internal: Maybe there should be a idle TCP PCB list where these * PCBs are put on. Port reservation using tcp_bind() is implemented but @@ -1676,7 +1961,7 @@ tcp_new(void) struct tcp_pcb * tcp_new_ip_type(u8_t type) { - struct tcp_pcb * pcb; + struct tcp_pcb *pcb; pcb = tcp_alloc(TCP_PRIO_NORMAL); #if LWIP_IPV4 && LWIP_IPV6 if (pcb != NULL) { @@ -1691,8 +1976,10 @@ tcp_new_ip_type(u8_t type) /** * @ingroup tcp_raw - * Used to specify the argument that should be passed callback - * functions. + * Specifies the program specific state that should be passed to all + * other callback functions. The "pcb" argument is the current TCP + * connection control block, and the "arg" argument is the argument + * that will be passed to the callbacks. * * @param pcb tcp_pcb to set the callback argument * @param arg void pointer argument to pass to callback functions @@ -1700,6 +1987,7 @@ tcp_new_ip_type(u8_t type) void tcp_arg(struct tcp_pcb *pcb, void *arg) { + LWIP_ASSERT_CORE_LOCKED(); /* This function is allowed to be called for both listen pcbs and connection pcbs. */ if (pcb != NULL) { @@ -1710,8 +1998,11 @@ tcp_arg(struct tcp_pcb *pcb, void *arg) /** * @ingroup tcp_raw - * Used to specify the function that should be called when a TCP - * connection receives data. + * Sets the callback function that will be called when new data + * arrives. The callback function will be passed a NULL pbuf to + * indicate that the remote host has closed the connection. If the + * callback function returns ERR_OK or ERR_ABRT it must have + * freed the pbuf, otherwise it must not have freed it. * * @param pcb tcp_pcb to set the recv callback * @param recv callback function to call for this pcb when data is received @@ -1719,6 +2010,7 @@ tcp_arg(struct tcp_pcb *pcb, void *arg) void tcp_recv(struct tcp_pcb *pcb, tcp_recv_fn recv) { + LWIP_ASSERT_CORE_LOCKED(); if (pcb != NULL) { LWIP_ASSERT("invalid socket state for recv callback", pcb->state != LISTEN); pcb->recv = recv; @@ -1727,8 +2019,10 @@ tcp_recv(struct tcp_pcb *pcb, tcp_recv_fn recv) /** * @ingroup tcp_raw - * Used to specify the function that should be called when TCP data - * has been successfully delivered to the remote host. + * Specifies the callback function that should be called when data has + * successfully been received (i.e., acknowledged) by the remote + * host. The len argument passed to the callback function gives the + * amount bytes that was acknowledged by the last acknowledgment. * * @param pcb tcp_pcb to set the sent callback * @param sent callback function to call for this pcb when data is successfully sent @@ -1736,6 +2030,7 @@ tcp_recv(struct tcp_pcb *pcb, tcp_recv_fn recv) void tcp_sent(struct tcp_pcb *pcb, tcp_sent_fn sent) { + LWIP_ASSERT_CORE_LOCKED(); if (pcb != NULL) { LWIP_ASSERT("invalid socket state for sent callback", pcb->state != LISTEN); pcb->sent = sent; @@ -1746,9 +2041,14 @@ tcp_sent(struct tcp_pcb *pcb, tcp_sent_fn sent) * @ingroup tcp_raw * Used to specify the function that should be called when a fatal error * has occurred on the connection. + * + * If a connection is aborted because of an error, the application is + * alerted of this event by the err callback. Errors that might abort a + * connection are when there is a shortage of memory. The callback + * function to be called is set using the tcp_err() function. * * @note The corresponding pcb is already freed when this callback is called! - * + * * @param pcb tcp_pcb to set the err callback * @param err callback function to call for this pcb when a fatal error * has occurred on the connection @@ -1756,6 +2056,7 @@ tcp_sent(struct tcp_pcb *pcb, tcp_sent_fn sent) void tcp_err(struct tcp_pcb *pcb, tcp_err_fn err) { + LWIP_ASSERT_CORE_LOCKED(); if (pcb != NULL) { LWIP_ASSERT("invalid socket state for err callback", pcb->state != LISTEN); pcb->errf = err; @@ -1774,8 +2075,9 @@ tcp_err(struct tcp_pcb *pcb, tcp_err_fn err) void tcp_accept(struct tcp_pcb *pcb, tcp_accept_fn accept) { + LWIP_ASSERT_CORE_LOCKED(); if ((pcb != NULL) && (pcb->state == LISTEN)) { - struct tcp_pcb_listen *lpcb = (struct tcp_pcb_listen*)pcb; + struct tcp_pcb_listen *lpcb = (struct tcp_pcb_listen *)pcb; lpcb->accept = accept; } } @@ -1784,15 +2086,29 @@ tcp_accept(struct tcp_pcb *pcb, tcp_accept_fn accept) /** * @ingroup tcp_raw - * Used to specify the function that should be called periodically - * from TCP. The interval is specified in terms of the TCP coarse - * timer interval, which is called twice a second. - * + * Specifies the polling interval and the callback function that should + * be called to poll the application. The interval is specified in + * number of TCP coarse grained timer shots, which typically occurs + * twice a second. An interval of 10 means that the application would + * be polled every 5 seconds. + * + * When a connection is idle (i.e., no data is either transmitted or + * received), lwIP will repeatedly poll the application by calling a + * specified callback function. This can be used either as a watchdog + * timer for killing connections that have stayed idle for too long, or + * as a method of waiting for memory to become available. For instance, + * if a call to tcp_write() has failed because memory wasn't available, + * the application may use the polling functionality to call tcp_write() + * again when the connection has been idle for a while. */ void tcp_poll(struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval) { + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ERROR("tcp_poll: invalid pcb", pcb != NULL, return); LWIP_ASSERT("invalid socket state for poll", pcb->state != LISTEN); + #if LWIP_CALLBACK_API pcb->poll = poll; #else /* LWIP_CALLBACK_API */ @@ -1810,9 +2126,11 @@ tcp_poll(struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval) void tcp_pcb_purge(struct tcp_pcb *pcb) { + LWIP_ERROR("tcp_pcb_purge: invalid pcb", pcb != NULL, return); + if (pcb->state != CLOSED && - pcb->state != TIME_WAIT && - pcb->state != LISTEN) { + pcb->state != TIME_WAIT && + pcb->state != LISTEN) { LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge\n")); @@ -1832,9 +2150,8 @@ tcp_pcb_purge(struct tcp_pcb *pcb) #if TCP_QUEUE_OOSEQ if (pcb->ooseq != NULL) { LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->ooseq\n")); + tcp_free_ooseq(pcb); } - tcp_segs_free(pcb->ooseq); - pcb->ooseq = NULL; #endif /* TCP_QUEUE_OOSEQ */ /* Stop the retransmission timer as it will expect data on unacked @@ -1859,15 +2176,18 @@ tcp_pcb_purge(struct tcp_pcb *pcb) void tcp_pcb_remove(struct tcp_pcb **pcblist, struct tcp_pcb *pcb) { + LWIP_ASSERT("tcp_pcb_remove: invalid pcb", pcb != NULL); + LWIP_ASSERT("tcp_pcb_remove: invalid pcblist", pcblist != NULL); + TCP_RMV(pcblist, pcb); tcp_pcb_purge(pcb); /* if there is an outstanding delayed ACKs, send it */ - if (pcb->state != TIME_WAIT && - pcb->state != LISTEN && - pcb->flags & TF_ACK_DELAY) { - pcb->flags |= TF_ACK_NOW; + if ((pcb->state != TIME_WAIT) && + (pcb->state != LISTEN) && + (pcb->flags & TF_ACK_DELAY)) { + tcp_ack_now(pcb); tcp_output(pcb); } @@ -1895,10 +2215,12 @@ u32_t tcp_next_iss(struct tcp_pcb *pcb) { #ifdef LWIP_HOOK_TCP_ISN + LWIP_ASSERT("tcp_next_iss: invalid pcb", pcb != NULL); return LWIP_HOOK_TCP_ISN(&pcb->local_ip, pcb->local_port, &pcb->remote_ip, pcb->remote_port); #else /* LWIP_HOOK_TCP_ISN */ static u32_t iss = 6510; + LWIP_ASSERT("tcp_next_iss: invalid pcb", pcb != NULL); LWIP_UNUSED_ARG(pcb); iss += tcp_ticks; /* XXX */ @@ -1909,21 +2231,19 @@ tcp_next_iss(struct tcp_pcb *pcb) #if TCP_CALCULATE_EFF_SEND_MSS /** * Calculates the effective send mss that can be used for a specific IP address - * by using ip_route to determine the netif used to send to the address and - * calculating the minimum of TCP_MSS and that netif's mtu (if set). + * by calculating the minimum of TCP_MSS and the mtu (if set) of the target + * netif (if not NULL). */ u16_t -tcp_eff_send_mss_impl(u16_t sendmss, const ip_addr_t *dest -#if LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING - , const ip_addr_t *src -#endif /* LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING */ - ) +tcp_eff_send_mss_netif(u16_t sendmss, struct netif *outif, const ip_addr_t *dest) { u16_t mss_s; - struct netif *outif; - s16_t mtu; + u16_t mtu; + + LWIP_UNUSED_ARG(dest); /* in case IPv6 is disabled */ + + LWIP_ASSERT("tcp_eff_send_mss_netif: invalid dst_ip", dest != NULL); - outif = ip_route(src, dest); #if LWIP_IPV6 #if LWIP_IPV4 if (IP_IS_V6(dest)) @@ -1946,12 +2266,13 @@ tcp_eff_send_mss_impl(u16_t sendmss, const ip_addr_t *dest #endif /* LWIP_IPV4 */ if (mtu != 0) { + u16_t offset; #if LWIP_IPV6 #if LWIP_IPV4 if (IP_IS_V6(dest)) #endif /* LWIP_IPV4 */ { - mss_s = mtu - IP6_HLEN - TCP_HLEN; + offset = IP6_HLEN + TCP_HLEN; } #if LWIP_IPV4 else @@ -1959,9 +2280,10 @@ tcp_eff_send_mss_impl(u16_t sendmss, const ip_addr_t *dest #endif /* LWIP_IPV6 */ #if LWIP_IPV4 { - mss_s = mtu - IP_HLEN - TCP_HLEN; + offset = IP_HLEN + TCP_HLEN; } #endif /* LWIP_IPV4 */ + mss_s = (mtu > offset) ? (u16_t)(mtu - offset) : 0; /* RFC 1122, chap 4.2.2.6: * Eff.snd.MSS = min(SendMSS+20, MMS_S) - TCPhdrsize - IPoptionsize * We correct for TCP options in tcp_write(), and don't support IP options. @@ -1974,18 +2296,21 @@ tcp_eff_send_mss_impl(u16_t sendmss, const ip_addr_t *dest /** Helper function for tcp_netif_ip_addr_changed() that iterates a pcb list */ static void -tcp_netif_ip_addr_changed_pcblist(const ip_addr_t* old_addr, struct tcp_pcb* pcb_list) +tcp_netif_ip_addr_changed_pcblist(const ip_addr_t *old_addr, struct tcp_pcb *pcb_list) { struct tcp_pcb *pcb; pcb = pcb_list; + + LWIP_ASSERT("tcp_netif_ip_addr_changed_pcblist: invalid old_addr", old_addr != NULL); + while (pcb != NULL) { /* PCB bound to current local interface address? */ if (ip_addr_cmp(&pcb->local_ip, old_addr) #if LWIP_AUTOIP - /* connections to link-local addresses must persist (RFC3927 ch. 1.9) */ - && (!IP_IS_V4_VAL(pcb->local_ip) || !ip4_addr_islinklocal(ip_2_ip4(&pcb->local_ip))) + /* connections to link-local addresses must persist (RFC3927 ch. 1.9) */ + && (!IP_IS_V4_VAL(pcb->local_ip) || !ip4_addr_islinklocal(ip_2_ip4(&pcb->local_ip))) #endif /* LWIP_AUTOIP */ - ) { + ) { /* this connection must be aborted */ struct tcp_pcb *next = pcb->next; LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: aborting TCP pcb %p\n", (void *)pcb)); @@ -2003,9 +2328,9 @@ tcp_netif_ip_addr_changed_pcblist(const ip_addr_t* old_addr, struct tcp_pcb* pcb * @param new_addr IP address of the netif after change or NULL if netif has been removed */ void -tcp_netif_ip_addr_changed(const ip_addr_t* old_addr, const ip_addr_t* new_addr) +tcp_netif_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr) { - struct tcp_pcb_listen *lpcb, *next; + struct tcp_pcb_listen *lpcb; if (!ip_addr_isany(old_addr)) { tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_active_pcbs); @@ -2013,8 +2338,7 @@ tcp_netif_ip_addr_changed(const ip_addr_t* old_addr, const ip_addr_t* new_addr) if (!ip_addr_isany(new_addr)) { /* PCB bound to current local interface address? */ - for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = next) { - next = lpcb->next; + for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { /* PCB bound to current local interface address? */ if (ip_addr_cmp(&lpcb->local_ip, old_addr)) { /* The PCB is listening to the old ipaddr and @@ -2026,12 +2350,51 @@ tcp_netif_ip_addr_changed(const ip_addr_t* old_addr, const ip_addr_t* new_addr) } } -const char* +const char * tcp_debug_state_str(enum tcp_state s) { return tcp_state_str[s]; } +err_t +tcp_tcp_get_tcp_addrinfo(struct tcp_pcb *pcb, int local, ip_addr_t *addr, u16_t *port) +{ + if (pcb) { + if (local) { + if (addr) { + *addr = pcb->local_ip; + } + if (port) { + *port = pcb->local_port; + } + } else { + if (addr) { + *addr = pcb->remote_ip; + } + if (port) { + *port = pcb->remote_port; + } + } + return ERR_OK; + } + return ERR_VAL; +} + +#if TCP_QUEUE_OOSEQ +/* Free all ooseq pbufs (and possibly reset SACK state) */ +void +tcp_free_ooseq(struct tcp_pcb *pcb) +{ + if (pcb->ooseq) { + tcp_segs_free(pcb->ooseq); + pcb->ooseq = NULL; +#if LWIP_TCP_SACK_OUT + memset(pcb->rcv_sacks, 0, sizeof(pcb->rcv_sacks)); +#endif /* LWIP_TCP_SACK_OUT */ + } +} +#endif /* TCP_QUEUE_OOSEQ */ + #if TCP_DEBUG || TCP_INPUT_DEBUG || TCP_OUTPUT_DEBUG /** * Print a tcp header for debugging purposes. @@ -2044,28 +2407,28 @@ tcp_debug_print(struct tcp_hdr *tcphdr) LWIP_DEBUGF(TCP_DEBUG, ("TCP header:\n")); LWIP_DEBUGF(TCP_DEBUG, ("+-------------------------------+\n")); LWIP_DEBUGF(TCP_DEBUG, ("| %5"U16_F" | %5"U16_F" | (src port, dest port)\n", - lwip_ntohs(tcphdr->src), lwip_ntohs(tcphdr->dest))); + lwip_ntohs(tcphdr->src), lwip_ntohs(tcphdr->dest))); LWIP_DEBUGF(TCP_DEBUG, ("+-------------------------------+\n")); LWIP_DEBUGF(TCP_DEBUG, ("| %010"U32_F" | (seq no)\n", - lwip_ntohl(tcphdr->seqno))); + lwip_ntohl(tcphdr->seqno))); LWIP_DEBUGF(TCP_DEBUG, ("+-------------------------------+\n")); LWIP_DEBUGF(TCP_DEBUG, ("| %010"U32_F" | (ack no)\n", - lwip_ntohl(tcphdr->ackno))); + lwip_ntohl(tcphdr->ackno))); LWIP_DEBUGF(TCP_DEBUG, ("+-------------------------------+\n")); LWIP_DEBUGF(TCP_DEBUG, ("| %2"U16_F" | |%"U16_F"%"U16_F"%"U16_F"%"U16_F"%"U16_F"%"U16_F"| %5"U16_F" | (hdrlen, flags (", - TCPH_HDRLEN(tcphdr), - (u16_t)(TCPH_FLAGS(tcphdr) >> 5 & 1), - (u16_t)(TCPH_FLAGS(tcphdr) >> 4 & 1), - (u16_t)(TCPH_FLAGS(tcphdr) >> 3 & 1), - (u16_t)(TCPH_FLAGS(tcphdr) >> 2 & 1), - (u16_t)(TCPH_FLAGS(tcphdr) >> 1 & 1), - (u16_t)(TCPH_FLAGS(tcphdr) & 1), - lwip_ntohs(tcphdr->wnd))); + TCPH_HDRLEN(tcphdr), + (u16_t)(TCPH_FLAGS(tcphdr) >> 5 & 1), + (u16_t)(TCPH_FLAGS(tcphdr) >> 4 & 1), + (u16_t)(TCPH_FLAGS(tcphdr) >> 3 & 1), + (u16_t)(TCPH_FLAGS(tcphdr) >> 2 & 1), + (u16_t)(TCPH_FLAGS(tcphdr) >> 1 & 1), + (u16_t)(TCPH_FLAGS(tcphdr) & 1), + lwip_ntohs(tcphdr->wnd))); tcp_debug_print_flags(TCPH_FLAGS(tcphdr)); LWIP_DEBUGF(TCP_DEBUG, ("), win)\n")); LWIP_DEBUGF(TCP_DEBUG, ("+-------------------------------+\n")); LWIP_DEBUGF(TCP_DEBUG, ("| 0x%04"X16_F" | %5"U16_F" | (chksum, urgp)\n", - lwip_ntohs(tcphdr->chksum), lwip_ntohs(tcphdr->urgp))); + lwip_ntohs(tcphdr->chksum), lwip_ntohs(tcphdr->urgp))); LWIP_DEBUGF(TCP_DEBUG, ("+-------------------------------+\n")); } @@ -2127,8 +2490,8 @@ tcp_debug_print_pcbs(void) LWIP_DEBUGF(TCP_DEBUG, ("Active PCB states:\n")); for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { LWIP_DEBUGF(TCP_DEBUG, ("Local port %"U16_F", foreign port %"U16_F" snd_nxt %"U32_F" rcv_nxt %"U32_F" ", - pcb->local_port, pcb->remote_port, - pcb->snd_nxt, pcb->rcv_nxt)); + pcb->local_port, pcb->remote_port, + pcb->snd_nxt, pcb->rcv_nxt)); tcp_debug_print_state(pcb->state); } @@ -2141,8 +2504,8 @@ tcp_debug_print_pcbs(void) LWIP_DEBUGF(TCP_DEBUG, ("TIME-WAIT PCB states:\n")); for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { LWIP_DEBUGF(TCP_DEBUG, ("Local port %"U16_F", foreign port %"U16_F" snd_nxt %"U32_F" rcv_nxt %"U32_F" ", - pcb->local_port, pcb->remote_port, - pcb->snd_nxt, pcb->rcv_nxt)); + pcb->local_port, pcb->remote_port, + pcb->snd_nxt, pcb->rcv_nxt)); tcp_debug_print_state(pcb->state); } } @@ -2166,4 +2529,158 @@ tcp_pcbs_sane(void) } #endif /* TCP_DEBUG */ +#if LWIP_TCP_PCB_NUM_EXT_ARGS +/** + * @defgroup tcp_raw_extargs ext arguments + * @ingroup tcp_raw + * Additional data storage per tcp pcb\n + * @see @ref tcp_raw + * + * When LWIP_TCP_PCB_NUM_EXT_ARGS is > 0, every tcp pcb (including listen pcb) + * includes a number of additional argument entries in an array. + * + * To support memory management, in addition to a 'void *', callbacks can be + * provided to manage transition from listening pcbs to connections and to + * deallocate memory when a pcb is deallocated (see struct @ref tcp_ext_arg_callbacks). + * + * After allocating this index, use @ref tcp_ext_arg_set and @ref tcp_ext_arg_get + * to store and load arguments from this index for a given pcb. + */ + +static u8_t tcp_ext_arg_id; + +/** + * @ingroup tcp_raw_extargs + * Allocate an index to store data in ext_args member of struct tcp_pcb. + * Returned value is an index in mentioned array. + * The index is *global* over all pcbs! + * + * When @ref LWIP_TCP_PCB_NUM_EXT_ARGS is > 0, every tcp pcb (including listen pcb) + * includes a number of additional argument entries in an array. + * + * To support memory management, in addition to a 'void *', callbacks can be + * provided to manage transition from listening pcbs to connections and to + * deallocate memory when a pcb is deallocated (see struct @ref tcp_ext_arg_callbacks). + * + * After allocating this index, use @ref tcp_ext_arg_set and @ref tcp_ext_arg_get + * to store and load arguments from this index for a given pcb. + * + * @return a unique index into struct tcp_pcb.ext_args + */ +u8_t +tcp_ext_arg_alloc_id(void) +{ + u8_t result = tcp_ext_arg_id; + tcp_ext_arg_id++; + + LWIP_ASSERT_CORE_LOCKED(); + +#if LWIP_TCP_PCB_NUM_EXT_ARGS >= 255 +#error LWIP_TCP_PCB_NUM_EXT_ARGS +#endif + LWIP_ASSERT("Increase LWIP_TCP_PCB_NUM_EXT_ARGS in lwipopts.h", result < LWIP_TCP_PCB_NUM_EXT_ARGS); + return result; +} + +/** + * @ingroup tcp_raw_extargs + * Set callbacks for a given index of ext_args on the specified pcb. + * + * @param pcb tcp_pcb for which to set the callback + * @param id ext_args index to set (allocated via @ref tcp_ext_arg_alloc_id) + * @param callbacks callback table (const since it is referenced, not copied!) + */ +void +tcp_ext_arg_set_callbacks(struct tcp_pcb *pcb, uint8_t id, const struct tcp_ext_arg_callbacks * const callbacks) +{ + LWIP_ASSERT("pcb != NULL", pcb != NULL); + LWIP_ASSERT("id < LWIP_TCP_PCB_NUM_EXT_ARGS", id < LWIP_TCP_PCB_NUM_EXT_ARGS); + LWIP_ASSERT("callbacks != NULL", callbacks != NULL); + + LWIP_ASSERT_CORE_LOCKED(); + + pcb->ext_args[id].callbacks = callbacks; +} + +/** + * @ingroup tcp_raw_extargs + * Set data for a given index of ext_args on the specified pcb. + * + * @param pcb tcp_pcb for which to set the data + * @param id ext_args index to set (allocated via @ref tcp_ext_arg_alloc_id) + * @param arg data pointer to set + */ +void tcp_ext_arg_set(struct tcp_pcb *pcb, uint8_t id, void *arg) +{ + LWIP_ASSERT("pcb != NULL", pcb != NULL); + LWIP_ASSERT("id < LWIP_TCP_PCB_NUM_EXT_ARGS", id < LWIP_TCP_PCB_NUM_EXT_ARGS); + + LWIP_ASSERT_CORE_LOCKED(); + + pcb->ext_args[id].data = arg; +} + +/** + * @ingroup tcp_raw_extargs + * Set data for a given index of ext_args on the specified pcb. + * + * @param pcb tcp_pcb for which to set the data + * @param id ext_args index to set (allocated via @ref tcp_ext_arg_alloc_id) + * @return data pointer at the given index + */ +void *tcp_ext_arg_get(const struct tcp_pcb *pcb, uint8_t id) +{ + LWIP_ASSERT("pcb != NULL", pcb != NULL); + LWIP_ASSERT("id < LWIP_TCP_PCB_NUM_EXT_ARGS", id < LWIP_TCP_PCB_NUM_EXT_ARGS); + + LWIP_ASSERT_CORE_LOCKED(); + + return pcb->ext_args[id].data; +} + +/** This function calls the "destroy" callback for all ext_args once a pcb is + * freed. + */ +static void +tcp_ext_arg_invoke_callbacks_destroyed(struct tcp_pcb_ext_args *ext_args) +{ + int i; + LWIP_ASSERT("ext_args != NULL", ext_args != NULL); + + for (i = 0; i < LWIP_TCP_PCB_NUM_EXT_ARGS; i++) { + if (ext_args[i].callbacks != NULL) { + if (ext_args[i].callbacks->destroy != NULL) { + ext_args[i].callbacks->destroy((u8_t)i, ext_args[i].data); + } + } + } +} + +/** This function calls the "passive_open" callback for all ext_args if a connection + * is in the process of being accepted. This is called just after the SYN is + * received and before a SYN/ACK is sent, to allow to modify the very first + * segment sent even on passive open. Naturally, the "accepted" callback of the + * pcb has not been called yet! + */ +err_t +tcp_ext_arg_invoke_callbacks_passive_open(struct tcp_pcb_listen *lpcb, struct tcp_pcb *cpcb) +{ + int i; + LWIP_ASSERT("lpcb != NULL", lpcb != NULL); + LWIP_ASSERT("cpcb != NULL", cpcb != NULL); + + for (i = 0; i < LWIP_TCP_PCB_NUM_EXT_ARGS; i++) { + if (lpcb->ext_args[i].callbacks != NULL) { + if (lpcb->ext_args[i].callbacks->passive_open != NULL) { + err_t err = lpcb->ext_args[i].callbacks->passive_open((u8_t)i, lpcb, cpcb); + if (err != ERR_OK) { + return err; + } + } + } + } + return ERR_OK; +} +#endif /* LWIP_TCP_PCB_NUM_EXT_ARGS */ + #endif /* LWIP_TCP */ diff --git a/Libraries/LwIP/src/core/tcp_in.c b/Libraries/LwIP/src/core/tcp_in.c index 17ceaff..4670178 100755 --- a/Libraries/LwIP/src/core/tcp_in.c +++ b/Libraries/LwIP/src/core/tcp_in.c @@ -59,8 +59,14 @@ #include "lwip/nd6.h" #endif /* LWIP_ND6_TCP_REACHABILITY_HINTS */ +#include + +#ifdef LWIP_HOOK_FILENAME +#include LWIP_HOOK_FILENAME +#endif + /** Initial CWND calculation as defined RFC 2581 */ -#define LWIP_TCP_CALC_INITIAL_CWND(mss) LWIP_MIN((4U * (mss)), LWIP_MAX((2U * (mss)), 4380U)); +#define LWIP_TCP_CALC_INITIAL_CWND(mss) ((tcpwnd_size_t)LWIP_MIN((4U * (mss)), LWIP_MAX((2U * (mss)), 4380U))) /* These variables are global to all functions involved in the input processing of TCP segments. They are set by the tcp_input() @@ -69,7 +75,7 @@ static struct tcp_seg inseg; static struct tcp_hdr *tcphdr; static u16_t tcphdr_optlen; static u16_t tcphdr_opt1len; -static u8_t* tcphdr_opt2; +static u8_t *tcphdr_opt2; static u16_t tcp_optidx; static u32_t seqno, ackno; static tcpwnd_size_t recv_acked; @@ -91,6 +97,14 @@ static void tcp_timewait_input(struct tcp_pcb *pcb); static int tcp_input_delayed_close(struct tcp_pcb *pcb); +#if LWIP_TCP_SACK_OUT +static void tcp_add_sack(struct tcp_pcb *pcb, u32_t left, u32_t right); +static void tcp_remove_sacks_lt(struct tcp_pcb *pcb, u32_t seq); +#if defined(TCP_OOSEQ_BYTES_LIMIT) || defined(TCP_OOSEQ_PBUFS_LIMIT) +static void tcp_remove_sacks_gt(struct tcp_pcb *pcb, u32_t seq); +#endif /* TCP_OOSEQ_BYTES_LIMIT || TCP_OOSEQ_PBUFS_LIMIT */ +#endif /* LWIP_TCP_SACK_OUT */ + /** * The initial input processing of TCP. It verifies the TCP header, demultiplexes * the segment between the PCBs and passes it on to tcp_process(), which implements @@ -113,6 +127,8 @@ tcp_input(struct pbuf *p, struct netif *inp) err_t err; LWIP_UNUSED_ARG(inp); + LWIP_ASSERT_CORE_LOCKED(); + LWIP_ASSERT("tcp_input: invalid pbuf", p != NULL); PERF_START; @@ -144,10 +160,10 @@ tcp_input(struct pbuf *p, struct netif *inp) IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_CHECK_TCP) { /* Verify TCP checksum. */ u16_t chksum = ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len, - ip_current_src_addr(), ip_current_dest_addr()); + ip_current_src_addr(), ip_current_dest_addr()); if (chksum != 0) { - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: packet discarded due to failing checksum 0x%04"X16_F"\n", - chksum)); + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: packet discarded due to failing checksum 0x%04"X16_F"\n", + chksum)); tcp_debug_print(tcphdr); TCP_STATS_INC(tcp.chkerr); goto dropped; @@ -156,7 +172,7 @@ tcp_input(struct pbuf *p, struct netif *inp) #endif /* CHECKSUM_CHECK_TCP */ /* sanity-check header length */ - hdrlen_bytes = TCPH_HDRLEN(tcphdr) * 4; + hdrlen_bytes = TCPH_HDRLEN_BYTES(tcphdr); if ((hdrlen_bytes < TCP_HLEN) || (hdrlen_bytes > p->tot_len)) { LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: invalid header length (%"U16_F")\n", (u16_t)hdrlen_bytes)); TCP_STATS_INC(tcp.lenerr); @@ -165,12 +181,12 @@ tcp_input(struct pbuf *p, struct netif *inp) /* Move the payload pointer in the pbuf so that it points to the TCP data instead of the TCP header. */ - tcphdr_optlen = hdrlen_bytes - TCP_HLEN; + tcphdr_optlen = (u16_t)(hdrlen_bytes - TCP_HLEN); tcphdr_opt2 = NULL; if (p->len >= hdrlen_bytes) { /* all options are in the first pbuf */ tcphdr_opt1len = tcphdr_optlen; - pbuf_header(p, -(s16_t)hdrlen_bytes); /* cannot fail */ + pbuf_remove_header(p, hdrlen_bytes); /* cannot fail */ } else { u16_t opt2len; /* TCP header fits into first pbuf, options don't - data is in the next pbuf */ @@ -178,15 +194,15 @@ tcp_input(struct pbuf *p, struct netif *inp) LWIP_ASSERT("p->next != NULL", p->next != NULL); /* advance over the TCP header (cannot fail) */ - pbuf_header(p, -TCP_HLEN); + pbuf_remove_header(p, TCP_HLEN); /* determine how long the first and second parts of the options are */ tcphdr_opt1len = p->len; - opt2len = tcphdr_optlen - tcphdr_opt1len; + opt2len = (u16_t)(tcphdr_optlen - tcphdr_opt1len); /* options continue in the next pbuf: set p to zero length and hide the options in the next pbuf (adjusting p->tot_len) */ - pbuf_header(p, -(s16_t)tcphdr_opt1len); + pbuf_remove_header(p, tcphdr_opt1len); /* check that the options fit in the second pbuf */ if (opt2len > p->next->len) { @@ -197,12 +213,12 @@ tcp_input(struct pbuf *p, struct netif *inp) } /* remember the pointer to the second part of the options */ - tcphdr_opt2 = (u8_t*)p->next->payload; + tcphdr_opt2 = (u8_t *)p->next->payload; /* advance p->next to point after the options, and manually adjust p->tot_len to keep it consistent with the changed p->next */ - pbuf_header(p->next, -(s16_t)opt2len); - p->tot_len -= opt2len; + pbuf_remove_header(p->next, opt2len); + p->tot_len = (u16_t)(p->tot_len - opt2len); LWIP_ASSERT("p->len == 0", p->len == 0); LWIP_ASSERT("p->tot_len == p->next->tot_len", p->tot_len == p->next->tot_len); @@ -216,7 +232,16 @@ tcp_input(struct pbuf *p, struct netif *inp) tcphdr->wnd = lwip_ntohs(tcphdr->wnd); flags = TCPH_FLAGS(tcphdr); - tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); + tcplen = p->tot_len; + if (flags & (TCP_FIN | TCP_SYN)) { + tcplen++; + if (tcplen < p->tot_len) { + /* u16_t overflow, cannot handle this */ + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: length u16_t overflow, cannot handle this\n")); + TCP_STATS_INC(tcp.lenerr); + goto dropped; + } + } /* Demultiplex an incoming segment. First, we check if it is destined for an active connection. */ @@ -226,6 +251,14 @@ tcp_input(struct pbuf *p, struct netif *inp) LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED); LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT); LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN); + + /* check if PCB is bound to specific netif */ + if ((pcb->netif_idx != NETIF_NO_INDEX) && + (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { + prev = pcb; + continue; + } + if (pcb->remote_port == tcphdr->src && pcb->local_port == tcphdr->dest && ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && @@ -252,6 +285,13 @@ tcp_input(struct pbuf *p, struct netif *inp) in the TIME-WAIT state. */ for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { LWIP_ASSERT("tcp_input: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); + + /* check if PCB is bound to specific netif */ + if ((pcb->netif_idx != NETIF_NO_INDEX) && + (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { + continue; + } + if (pcb->remote_port == tcphdr->src && pcb->local_port == tcphdr->dest && ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && @@ -260,7 +300,13 @@ tcp_input(struct pbuf *p, struct netif *inp) of the list since we are not very likely to receive that many segments for connections in TIME-WAIT. */ LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: packed for TIME_WAITing connection.\n")); - tcp_timewait_input(pcb); +#ifdef LWIP_HOOK_TCP_INPACKET_PCB + if (LWIP_HOOK_TCP_INPACKET_PCB(pcb, tcphdr, tcphdr_optlen, tcphdr_opt1len, + tcphdr_opt2, p) == ERR_OK) +#endif + { + tcp_timewait_input(pcb); + } pbuf_free(p); return; } @@ -270,6 +316,13 @@ tcp_input(struct pbuf *p, struct netif *inp) are LISTENing for incoming connections. */ prev = NULL; for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { + /* check if PCB is bound to specific netif */ + if ((lpcb->netif_idx != NETIF_NO_INDEX) && + (lpcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { + prev = (struct tcp_pcb *)lpcb; + continue; + } + if (lpcb->local_port == tcphdr->dest) { if (IP_IS_ANY_TYPE_VAL(lpcb->local_ip)) { /* found an ANY TYPE (IPv4/IPv6) match */ @@ -290,7 +343,7 @@ tcp_input(struct pbuf *p, struct netif *inp) lpcb_prev = prev; #else /* SO_REUSE */ break; - #endif /* SO_REUSE */ +#endif /* SO_REUSE */ } } } @@ -310,16 +363,22 @@ tcp_input(struct pbuf *p, struct netif *inp) arrivals). */ if (prev != NULL) { ((struct tcp_pcb_listen *)prev)->next = lpcb->next; - /* our successor is the remainder of the listening list */ + /* our successor is the remainder of the listening list */ lpcb->next = tcp_listen_pcbs.listen_pcbs; - /* put this listening pcb at the head of the listening list */ + /* put this listening pcb at the head of the listening list */ tcp_listen_pcbs.listen_pcbs = lpcb; } else { TCP_STATS_INC(tcp.cachehit); } LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: packed for LISTENing connection.\n")); - tcp_listen_input(lpcb); +#ifdef LWIP_HOOK_TCP_INPACKET_PCB + if (LWIP_HOOK_TCP_INPACKET_PCB((struct tcp_pcb *)lpcb, tcphdr, tcphdr_optlen, + tcphdr_opt1len, tcphdr_opt2, p) == ERR_OK) +#endif + { + tcp_listen_input(lpcb); + } pbuf_free(p); return; } @@ -332,6 +391,13 @@ tcp_input(struct pbuf *p, struct netif *inp) #endif /* TCP_INPUT_DEBUG */ +#ifdef LWIP_HOOK_TCP_INPACKET_PCB + if ((pcb != NULL) && LWIP_HOOK_TCP_INPACKET_PCB(pcb, tcphdr, tcphdr_optlen, + tcphdr_opt1len, tcphdr_opt2, p) != ERR_OK) { + pbuf_free(p); + return; + } +#endif if (pcb != NULL) { /* The incoming segment belongs to a connection. */ #if TCP_INPUT_DEBUG @@ -355,7 +421,7 @@ tcp_input(struct pbuf *p, struct netif *inp) /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { if ((tcp_process_refused_data(pcb) == ERR_ABRT) || - ((pcb->refused_data != NULL) && (tcplen > 0))) { + ((pcb->refused_data != NULL) && (tcplen > 0))) { /* pcb has been aborted or refused data is still refused and the new segment contains data */ if (pcb->rcv_ann_wnd == 0) { @@ -380,7 +446,7 @@ tcp_input(struct pbuf *p, struct netif *inp) deallocate the PCB. */ TCP_EVENT_ERR(pcb->state, pcb->errf, pcb->callback_arg, ERR_RST); tcp_pcb_remove(&tcp_active_pcbs, pcb); - memp_free(MEMP_TCP_PCB, pcb); + tcp_free(pcb); } else { err = ERR_OK; /* If the application has registered a "sent" function to be @@ -499,21 +565,19 @@ aborted: recv_data = NULL; /* give up our reference to inseg.p */ - if (inseg.p != NULL) - { + if (inseg.p != NULL) { pbuf_free(inseg.p); inseg.p = NULL; } } else { - /* If no matching PCB was found, send a TCP RST (reset) to the sender. */ LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_input: no PCB match found, resetting.\n")); if (!(TCPH_FLAGS(tcphdr) & TCP_RST)) { TCP_STATS_INC(tcp.proterr); TCP_STATS_INC(tcp.drop); - tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), - ip_current_src_addr(), tcphdr->dest, tcphdr->src); + tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(), + ip_current_src_addr(), tcphdr->dest, tcphdr->src); } pbuf_free(p); } @@ -535,6 +599,8 @@ dropped: static int tcp_input_delayed_close(struct tcp_pcb *pcb) { + LWIP_ASSERT("tcp_input_delayed_close: invalid pcb", pcb != NULL); + if (recv_flags & TF_CLOSED) { /* The connection has been closed and we will deallocate the PCB. */ @@ -545,7 +611,7 @@ tcp_input_delayed_close(struct tcp_pcb *pcb) TCP_EVENT_ERR(pcb->state, pcb->errf, pcb->callback_arg, ERR_CLSD); } tcp_pcb_remove(&tcp_active_pcbs, pcb); - memp_free(MEMP_TCP_PCB, pcb); + tcp_free(pcb); return 1; } return 0; @@ -572,14 +638,16 @@ tcp_listen_input(struct tcp_pcb_listen *pcb) return; } + LWIP_ASSERT("tcp_listen_input: invalid pcb", pcb != NULL); + /* In the LISTEN state, we check for incoming SYN segments, creates a new PCB, and responds with a SYN|ACK. */ if (flags & TCP_ACK) { /* For incoming segments with the ACK flag set, respond with a RST. */ LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_listen_input: ACK in LISTEN, sending reset\n")); - tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), - ip_current_src_addr(), tcphdr->dest, tcphdr->src); + tcp_rst((const struct tcp_pcb *)pcb, ackno, seqno + tcplen, ip_current_dest_addr(), + ip_current_src_addr(), tcphdr->dest, tcphdr->src); } else if (flags & TCP_SYN) { LWIP_DEBUGF(TCP_DEBUG, ("TCP connection request %"U16_F" -> %"U16_F".\n", tcphdr->src, tcphdr->dest)); #if TCP_LISTEN_BACKLOG @@ -602,7 +670,7 @@ tcp_listen_input(struct tcp_pcb_listen *pcb) } #if TCP_LISTEN_BACKLOG pcb->accepts_pending++; - npcb->flags |= TF_BACKLOGPEND; + tcp_set_flags(npcb, TF_BACKLOGPEND); #endif /* TCP_LISTEN_BACKLOG */ /* Set up the new PCB. */ ip_addr_copy(npcb->local_ip, *ip_current_dest_addr()); @@ -624,6 +692,7 @@ tcp_listen_input(struct tcp_pcb_listen *pcb) #endif /* LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG */ /* inherit socket options */ npcb->so_options = pcb->so_options & SOF_INHERITED; + npcb->netif_idx = pcb->netif_idx; /* Register the new PCB so that we can begin receiving segments for it. */ TCP_REG_ACTIVE(npcb); @@ -639,6 +708,13 @@ tcp_listen_input(struct tcp_pcb_listen *pcb) MIB2_STATS_INC(mib2.tcppassiveopens); +#if LWIP_TCP_PCB_NUM_EXT_ARGS + if (tcp_ext_arg_invoke_callbacks_passive_open(pcb, npcb) != ERR_OK) { + tcp_abandon(npcb, 0); + return; + } +#endif + /* Send a SYN|ACK together with the MSS option. */ rc = tcp_enqueue_flags(npcb, TCP_SYN | TCP_ACK); if (rc != ERR_OK) { @@ -670,14 +746,17 @@ tcp_timewait_input(struct tcp_pcb *pcb) if (flags & TCP_RST) { return; } + + LWIP_ASSERT("tcp_timewait_input: invalid pcb", pcb != NULL); + /* - fourth, check the SYN bit, */ if (flags & TCP_SYN) { /* If an incoming segment is not acceptable, an acknowledgment should be sent in reply */ if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt + pcb->rcv_wnd)) { /* If the SYN is in the window it is an error, send a reset */ - tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), - ip_current_src_addr(), tcphdr->dest, tcphdr->src); + tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), + ip_current_src_addr(), tcphdr->dest, tcphdr->src); return; } } else if (flags & TCP_FIN) { @@ -688,7 +767,7 @@ tcp_timewait_input(struct tcp_pcb *pcb) if ((tcplen > 0)) { /* Acknowledge data, FIN or out-of-window SYN */ - pcb->flags |= TF_ACK_NOW; + tcp_ack_now(pcb); tcp_output(pcb); } return; @@ -714,6 +793,8 @@ tcp_process(struct tcp_pcb *pcb) err = ERR_OK; + LWIP_ASSERT("tcp_process: invalid pcb", pcb != NULL); + /* Process incoming RST segments. */ if (flags & TCP_RST) { /* First, determine if the reset is acceptable. */ @@ -730,10 +811,10 @@ tcp_process(struct tcp_pcb *pcb) acceptable = 1; } else if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt + pcb->rcv_wnd)) { - /* If the sequence number is inside the window, we only send an ACK + /* If the sequence number is inside the window, we send a challenge ACK and wait for a re-send with matching sequence number. - This violates RFC 793, but is required to protection against - CVE-2004-0230 (RST spoofing attack). */ + This follows RFC 5961 section 3.2 and addresses CVE-2004-0230 + (RST spoofing attack), which is present in RFC 793 RST handling. */ tcp_ack_now(pcb); } } @@ -742,13 +823,13 @@ tcp_process(struct tcp_pcb *pcb) LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_process: Connection RESET\n")); LWIP_ASSERT("tcp_input: pcb->state != CLOSED", pcb->state != CLOSED); recv_flags |= TF_RESET; - pcb->flags &= ~TF_ACK_DELAY; + tcp_clear_flags(pcb, TF_ACK_DELAY); return ERR_RST; } else { LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_process: unacceptable reset seqno %"U32_F" rcv_nxt %"U32_F"\n", - seqno, pcb->rcv_nxt)); + seqno, pcb->rcv_nxt)); LWIP_DEBUGF(TCP_DEBUG, ("tcp_process: unacceptable reset seqno %"U32_F" rcv_nxt %"U32_F"\n", - seqno, pcb->rcv_nxt)); + seqno, pcb->rcv_nxt)); return ERR_OK; } } @@ -764,198 +845,198 @@ tcp_process(struct tcp_pcb *pcb) pcb->tmr = tcp_ticks; } pcb->keep_cnt_sent = 0; + pcb->persist_probe = 0; tcp_parseopt(pcb); /* Do different things depending on the TCP state. */ switch (pcb->state) { - case SYN_SENT: - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("SYN-SENT: ackno %"U32_F" pcb->snd_nxt %"U32_F" unacked %"U32_F"\n", ackno, - pcb->snd_nxt, lwip_ntohl(pcb->unacked->tcphdr->seqno))); - /* received SYN ACK with expected sequence number? */ - if ((flags & TCP_ACK) && (flags & TCP_SYN) - && (ackno == pcb->lastack + 1)) { - pcb->rcv_nxt = seqno + 1; - pcb->rcv_ann_right_edge = pcb->rcv_nxt; - pcb->lastack = ackno; - pcb->snd_wnd = tcphdr->wnd; - pcb->snd_wnd_max = pcb->snd_wnd; - pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ - pcb->state = ESTABLISHED; + case SYN_SENT: + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("SYN-SENT: ackno %"U32_F" pcb->snd_nxt %"U32_F" unacked %"U32_F"\n", ackno, + pcb->snd_nxt, lwip_ntohl(pcb->unacked->tcphdr->seqno))); + /* received SYN ACK with expected sequence number? */ + if ((flags & TCP_ACK) && (flags & TCP_SYN) + && (ackno == pcb->lastack + 1)) { + pcb->rcv_nxt = seqno + 1; + pcb->rcv_ann_right_edge = pcb->rcv_nxt; + pcb->lastack = ackno; + pcb->snd_wnd = tcphdr->wnd; + pcb->snd_wnd_max = pcb->snd_wnd; + pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ + pcb->state = ESTABLISHED; #if TCP_CALCULATE_EFF_SEND_MSS - pcb->mss = tcp_eff_send_mss(pcb->mss, &pcb->local_ip, &pcb->remote_ip); + pcb->mss = tcp_eff_send_mss(pcb->mss, &pcb->local_ip, &pcb->remote_ip); #endif /* TCP_CALCULATE_EFF_SEND_MSS */ - pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss); - LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_process (SENT): cwnd %"TCPWNDSIZE_F - " ssthresh %"TCPWNDSIZE_F"\n", - pcb->cwnd, pcb->ssthresh)); - LWIP_ASSERT("pcb->snd_queuelen > 0", (pcb->snd_queuelen > 0)); - --pcb->snd_queuelen; - LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_process: SYN-SENT --queuelen %"TCPWNDSIZE_F"\n", (tcpwnd_size_t)pcb->snd_queuelen)); - rseg = pcb->unacked; - if (rseg == NULL) { - /* might happen if tcp_output fails in tcp_rexmit_rto() - in which case the segment is on the unsent list */ - rseg = pcb->unsent; - LWIP_ASSERT("no segment to free", rseg != NULL); - pcb->unsent = rseg->next; - } else { - pcb->unacked = rseg->next; - } - tcp_seg_free(rseg); - - /* If there's nothing left to acknowledge, stop the retransmit - timer, otherwise reset it to start again */ - if (pcb->unacked == NULL) { - pcb->rtime = -1; - } else { - pcb->rtime = 0; - pcb->nrtx = 0; - } - - /* Call the user specified function to call when successfully - * connected. */ - TCP_EVENT_CONNECTED(pcb, ERR_OK, err); - if (err == ERR_ABRT) { - return ERR_ABRT; - } - tcp_ack_now(pcb); - } - /* received ACK? possibly a half-open connection */ - else if (flags & TCP_ACK) { - /* send a RST to bring the other side in a non-synchronized state. */ - tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), - ip_current_src_addr(), tcphdr->dest, tcphdr->src); - /* Resend SYN immediately (don't wait for rto timeout) to establish - connection faster, but do not send more SYNs than we otherwise would - have, or we might get caught in a loop on loopback interfaces. */ - if (pcb->nrtx < TCP_SYNMAXRTX) { - pcb->rtime = 0; - tcp_rexmit_rto(pcb); - } - } - break; - case SYN_RCVD: - if (flags & TCP_ACK) { - /* expected ACK number? */ - if (TCP_SEQ_BETWEEN(ackno, pcb->lastack+1, pcb->snd_nxt)) { - pcb->state = ESTABLISHED; - LWIP_DEBUGF(TCP_DEBUG, ("TCP connection established %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); -#if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG -#if LWIP_CALLBACK_API - LWIP_ASSERT("pcb->listener->accept != NULL", - (pcb->listener == NULL) || (pcb->listener->accept != NULL)); -#endif - if (pcb->listener == NULL) { - /* listen pcb might be closed by now */ - err = ERR_VAL; - } else -#endif /* LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG */ - { - tcp_backlog_accepted(pcb); - /* Call the accept function. */ - TCP_EVENT_ACCEPT(pcb->listener, pcb, pcb->callback_arg, ERR_OK, err); - } - if (err != ERR_OK) { - /* If the accept function returns with an error, we abort - * the connection. */ - /* Already aborted? */ - if (err != ERR_ABRT) { - tcp_abort(pcb); - } - return ERR_ABRT; - } - /* If there was any data contained within this ACK, - * we'd better pass it on to the application as well. */ - tcp_receive(pcb); - - /* Prevent ACK for SYN to generate a sent event */ - if (recv_acked != 0) { - recv_acked--; - } - pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss); - LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_process (SYN_RCVD): cwnd %"TCPWNDSIZE_F + LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_process (SENT): cwnd %"TCPWNDSIZE_F " ssthresh %"TCPWNDSIZE_F"\n", pcb->cwnd, pcb->ssthresh)); - - if (recv_flags & TF_GOT_FIN) { - tcp_ack_now(pcb); - pcb->state = CLOSE_WAIT; + LWIP_ASSERT("pcb->snd_queuelen > 0", (pcb->snd_queuelen > 0)); + --pcb->snd_queuelen; + LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_process: SYN-SENT --queuelen %"TCPWNDSIZE_F"\n", (tcpwnd_size_t)pcb->snd_queuelen)); + rseg = pcb->unacked; + if (rseg == NULL) { + /* might happen if tcp_output fails in tcp_rexmit_rto() + in which case the segment is on the unsent list */ + rseg = pcb->unsent; + LWIP_ASSERT("no segment to free", rseg != NULL); + pcb->unsent = rseg->next; + } else { + pcb->unacked = rseg->next; } - } else { - /* incorrect ACK number, send RST */ - tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), - ip_current_src_addr(), tcphdr->dest, tcphdr->src); + tcp_seg_free(rseg); + + /* If there's nothing left to acknowledge, stop the retransmit + timer, otherwise reset it to start again */ + if (pcb->unacked == NULL) { + pcb->rtime = -1; + } else { + pcb->rtime = 0; + pcb->nrtx = 0; + } + + /* Call the user specified function to call when successfully + * connected. */ + TCP_EVENT_CONNECTED(pcb, ERR_OK, err); + if (err == ERR_ABRT) { + return ERR_ABRT; + } + tcp_ack_now(pcb); } - } else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) { - /* Looks like another copy of the SYN - retransmit our SYN-ACK */ - tcp_rexmit(pcb); - } - break; - case CLOSE_WAIT: + /* received ACK? possibly a half-open connection */ + else if (flags & TCP_ACK) { + /* send a RST to bring the other side in a non-synchronized state. */ + tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), + ip_current_src_addr(), tcphdr->dest, tcphdr->src); + /* Resend SYN immediately (don't wait for rto timeout) to establish + connection faster, but do not send more SYNs than we otherwise would + have, or we might get caught in a loop on loopback interfaces. */ + if (pcb->nrtx < TCP_SYNMAXRTX) { + pcb->rtime = 0; + tcp_rexmit_rto(pcb); + } + } + break; + case SYN_RCVD: + if (flags & TCP_ACK) { + /* expected ACK number? */ + if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) { + pcb->state = ESTABLISHED; + LWIP_DEBUGF(TCP_DEBUG, ("TCP connection established %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); +#if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG + if (pcb->listener == NULL) { + /* listen pcb might be closed by now */ + err = ERR_VAL; + } else +#endif /* LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG */ + { +#if LWIP_CALLBACK_API + LWIP_ASSERT("pcb->listener->accept != NULL", pcb->listener->accept != NULL); +#endif + tcp_backlog_accepted(pcb); + /* Call the accept function. */ + TCP_EVENT_ACCEPT(pcb->listener, pcb, pcb->callback_arg, ERR_OK, err); + } + if (err != ERR_OK) { + /* If the accept function returns with an error, we abort + * the connection. */ + /* Already aborted? */ + if (err != ERR_ABRT) { + tcp_abort(pcb); + } + return ERR_ABRT; + } + /* If there was any data contained within this ACK, + * we'd better pass it on to the application as well. */ + tcp_receive(pcb); + + /* Prevent ACK for SYN to generate a sent event */ + if (recv_acked != 0) { + recv_acked--; + } + + pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss); + LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_process (SYN_RCVD): cwnd %"TCPWNDSIZE_F + " ssthresh %"TCPWNDSIZE_F"\n", + pcb->cwnd, pcb->ssthresh)); + + if (recv_flags & TF_GOT_FIN) { + tcp_ack_now(pcb); + pcb->state = CLOSE_WAIT; + } + } else { + /* incorrect ACK number, send RST */ + tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), + ip_current_src_addr(), tcphdr->dest, tcphdr->src); + } + } else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) { + /* Looks like another copy of the SYN - retransmit our SYN-ACK */ + tcp_rexmit(pcb); + } + break; + case CLOSE_WAIT: /* FALLTHROUGH */ - case ESTABLISHED: - tcp_receive(pcb); - if (recv_flags & TF_GOT_FIN) { /* passive close */ - tcp_ack_now(pcb); - pcb->state = CLOSE_WAIT; - } - break; - case FIN_WAIT_1: - tcp_receive(pcb); - if (recv_flags & TF_GOT_FIN) { - if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && - pcb->unsent == NULL) { - LWIP_DEBUGF(TCP_DEBUG, - ("TCP connection closed: FIN_WAIT_1 %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); + case ESTABLISHED: + tcp_receive(pcb); + if (recv_flags & TF_GOT_FIN) { /* passive close */ + tcp_ack_now(pcb); + pcb->state = CLOSE_WAIT; + } + break; + case FIN_WAIT_1: + tcp_receive(pcb); + if (recv_flags & TF_GOT_FIN) { + if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && + pcb->unsent == NULL) { + LWIP_DEBUGF(TCP_DEBUG, + ("TCP connection closed: FIN_WAIT_1 %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); + tcp_ack_now(pcb); + tcp_pcb_purge(pcb); + TCP_RMV_ACTIVE(pcb); + pcb->state = TIME_WAIT; + TCP_REG(&tcp_tw_pcbs, pcb); + } else { + tcp_ack_now(pcb); + pcb->state = CLOSING; + } + } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && + pcb->unsent == NULL) { + pcb->state = FIN_WAIT_2; + } + break; + case FIN_WAIT_2: + tcp_receive(pcb); + if (recv_flags & TF_GOT_FIN) { + LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: FIN_WAIT_2 %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); tcp_ack_now(pcb); tcp_pcb_purge(pcb); TCP_RMV_ACTIVE(pcb); pcb->state = TIME_WAIT; TCP_REG(&tcp_tw_pcbs, pcb); - } else { - tcp_ack_now(pcb); - pcb->state = CLOSING; } - } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && - pcb->unsent == NULL) { - pcb->state = FIN_WAIT_2; - } - break; - case FIN_WAIT_2: - tcp_receive(pcb); - if (recv_flags & TF_GOT_FIN) { - LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: FIN_WAIT_2 %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); - tcp_ack_now(pcb); - tcp_pcb_purge(pcb); - TCP_RMV_ACTIVE(pcb); - pcb->state = TIME_WAIT; - TCP_REG(&tcp_tw_pcbs, pcb); - } - break; - case CLOSING: - tcp_receive(pcb); - if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) { - LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: CLOSING %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); - tcp_pcb_purge(pcb); - TCP_RMV_ACTIVE(pcb); - pcb->state = TIME_WAIT; - TCP_REG(&tcp_tw_pcbs, pcb); - } - break; - case LAST_ACK: - tcp_receive(pcb); - if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) { - LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: LAST_ACK %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); - /* bugfix #21699: don't set pcb->state to CLOSED here or we risk leaking segments */ - recv_flags |= TF_CLOSED; - } - break; - default: - break; + break; + case CLOSING: + tcp_receive(pcb); + if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) { + LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: CLOSING %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); + tcp_pcb_purge(pcb); + TCP_RMV_ACTIVE(pcb); + pcb->state = TIME_WAIT; + TCP_REG(&tcp_tw_pcbs, pcb); + } + break; + case LAST_ACK: + tcp_receive(pcb); + if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) { + LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: LAST_ACK %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); + /* bugfix #21699: don't set pcb->state to CLOSED here or we risk leaking segments */ + recv_flags |= TF_CLOSED; + } + break; + default: + break; } return ERR_OK; } @@ -971,6 +1052,8 @@ tcp_oos_insert_segment(struct tcp_seg *cseg, struct tcp_seg *next) { struct tcp_seg *old_seg; + LWIP_ASSERT("tcp_oos_insert_segment: invalid cseg", cseg != NULL); + if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) { /* received segment overlaps all following segments */ tcp_segs_free(next); @@ -980,7 +1063,7 @@ tcp_oos_insert_segment(struct tcp_seg *cseg, struct tcp_seg *next) oos queue may have segments with FIN flag */ while (next && TCP_SEQ_GEQ((seqno + cseg->len), - (next->tcphdr->seqno + next->len))) { + (next->tcphdr->seqno + next->len))) { /* cseg with FIN already processed */ if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) { TCPH_SET_FLAG(cseg->tcphdr, TCP_FIN); @@ -1000,6 +1083,48 @@ tcp_oos_insert_segment(struct tcp_seg *cseg, struct tcp_seg *next) } #endif /* TCP_QUEUE_OOSEQ */ +/** Remove segments from a list if the incoming ACK acknowledges them */ +static struct tcp_seg * +tcp_free_acked_segments(struct tcp_pcb *pcb, struct tcp_seg *seg_list, const char *dbg_list_name, + struct tcp_seg *dbg_other_seg_list) +{ + struct tcp_seg *next; + u16_t clen; + + LWIP_UNUSED_ARG(dbg_list_name); + LWIP_UNUSED_ARG(dbg_other_seg_list); + + while (seg_list != NULL && + TCP_SEQ_LEQ(lwip_ntohl(seg_list->tcphdr->seqno) + + TCP_TCPLEN(seg_list), ackno)) { + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: removing %"U32_F":%"U32_F" from pcb->%s\n", + lwip_ntohl(seg_list->tcphdr->seqno), + lwip_ntohl(seg_list->tcphdr->seqno) + TCP_TCPLEN(seg_list), + dbg_list_name)); + + next = seg_list; + seg_list = seg_list->next; + + clen = pbuf_clen(next->p); + LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_receive: queuelen %"TCPWNDSIZE_F" ... ", + (tcpwnd_size_t)pcb->snd_queuelen)); + LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= clen)); + + pcb->snd_queuelen = (u16_t)(pcb->snd_queuelen - clen); + recv_acked = (tcpwnd_size_t)(recv_acked + next->len); + tcp_seg_free(next); + + LWIP_DEBUGF(TCP_QLEN_DEBUG, ("%"TCPWNDSIZE_F" (after freeing %s)\n", + (tcpwnd_size_t)pcb->snd_queuelen, + dbg_list_name)); + if (pcb->snd_queuelen != 0) { + LWIP_ASSERT("tcp_receive: valid queue length", + seg_list != NULL || dbg_other_seg_list != NULL); + } + } + return seg_list; +} + /** * Called by tcp_process. Checks if the given segment is an ACK for outstanding * data, and if so frees the memory of the buffered data. Next, it places the @@ -1015,20 +1140,11 @@ tcp_oos_insert_segment(struct tcp_seg *cseg, struct tcp_seg *next) static void tcp_receive(struct tcp_pcb *pcb) { - struct tcp_seg *next; -#if TCP_QUEUE_OOSEQ - struct tcp_seg *prev, *cseg; -#endif /* TCP_QUEUE_OOSEQ */ - s32_t off; s16_t m; u32_t right_wnd_edge; - u16_t new_tot_len; int found_dupack = 0; -#if TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS - u32_t ooseq_blen; - u16_t ooseq_qlen; -#endif /* TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS */ + LWIP_ASSERT("tcp_receive: invalid pcb", pcb != NULL); LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED); if (flags & TCP_ACK) { @@ -1036,8 +1152,8 @@ tcp_receive(struct tcp_pcb *pcb) /* Update window. */ if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || - (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || - (pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) { + (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || + (pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) { pcb->snd_wnd = SND_WND_SCALE(pcb, tcphdr->wnd); /* keep track of the biggest window announced by the remote host to calculate the maximum segment size */ @@ -1046,16 +1162,6 @@ tcp_receive(struct tcp_pcb *pcb) } pcb->snd_wl1 = seqno; pcb->snd_wl2 = ackno; - if (pcb->snd_wnd == 0) { - if (pcb->persist_backoff == 0) { - /* start persist timer */ - pcb->persist_cnt = 0; - pcb->persist_backoff = 1; - } - } else if (pcb->persist_backoff > 0) { - /* stop persist timer */ - pcb->persist_backoff = 0; - } LWIP_DEBUGF(TCP_WND_DEBUG, ("tcp_receive: window update %"TCPWNDSIZE_F"\n", pcb->snd_wnd)); #if TCP_WND_DEBUG } else { @@ -1103,13 +1209,11 @@ tcp_receive(struct tcp_pcb *pcb) ++pcb->dupacks; } if (pcb->dupacks > 3) { - /* Inflate the congestion window, but not if it means that - the value overflows. */ - if ((tcpwnd_size_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) { - pcb->cwnd += pcb->mss; - } - } else if (pcb->dupacks == 3) { - /* Do fast retransmit */ + /* Inflate the congestion window */ + TCP_WND_INC(pcb->cwnd, pcb->mss); + } + if (pcb->dupacks >= 3) { + /* Do fast retransmit (checked via TF_INFR, not via dupacks count) */ tcp_rexmit_fast(pcb); } } @@ -1121,22 +1225,27 @@ tcp_receive(struct tcp_pcb *pcb) if (!found_dupack) { pcb->dupacks = 0; } - } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack+1, pcb->snd_nxt)) { + } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) { /* We come here when the ACK acknowledges new data. */ + tcpwnd_size_t acked; /* Reset the "IN Fast Retransmit" flag, since we are no longer in fast retransmit. Also reset the congestion window to the slow start threshold. */ if (pcb->flags & TF_INFR) { - pcb->flags &= ~TF_INFR; + tcp_clear_flags(pcb, TF_INFR); pcb->cwnd = pcb->ssthresh; + pcb->bytes_acked = 0; } /* Reset the number of retransmissions. */ pcb->nrtx = 0; /* Reset the retransmission time-out. */ - pcb->rto = (pcb->sa >> 3) + pcb->sv; + pcb->rto = (s16_t)((pcb->sa >> 3) + pcb->sv); + + /* Record how much data this ACK acks */ + acked = (tcpwnd_size_t)(ackno - pcb->lastack); /* Reset the fast retransmit variables. */ pcb->dupacks = 0; @@ -1146,51 +1255,40 @@ tcp_receive(struct tcp_pcb *pcb) ssthresh). */ if (pcb->state >= ESTABLISHED) { if (pcb->cwnd < pcb->ssthresh) { - if ((tcpwnd_size_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) { - pcb->cwnd += pcb->mss; - } + tcpwnd_size_t increase; + /* limit to 1 SMSS segment during period following RTO */ + u8_t num_seg = (pcb->flags & TF_RTO) ? 1 : 2; + /* RFC 3465, section 2.2 Slow Start */ + increase = LWIP_MIN(acked, (tcpwnd_size_t)(num_seg * pcb->mss)); + TCP_WND_INC(pcb->cwnd, increase); LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_receive: slow start cwnd %"TCPWNDSIZE_F"\n", pcb->cwnd)); } else { - tcpwnd_size_t new_cwnd = (pcb->cwnd + pcb->mss * pcb->mss / pcb->cwnd); - if (new_cwnd > pcb->cwnd) { - pcb->cwnd = new_cwnd; + /* RFC 3465, section 2.1 Congestion Avoidance */ + TCP_WND_INC(pcb->bytes_acked, acked); + if (pcb->bytes_acked >= pcb->cwnd) { + pcb->bytes_acked = (tcpwnd_size_t)(pcb->bytes_acked - pcb->cwnd); + TCP_WND_INC(pcb->cwnd, pcb->mss); } LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_receive: congestion avoidance cwnd %"TCPWNDSIZE_F"\n", pcb->cwnd)); } } LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: ACK for %"U32_F", unacked->seqno %"U32_F":%"U32_F"\n", ackno, - pcb->unacked != NULL? - lwip_ntohl(pcb->unacked->tcphdr->seqno): 0, - pcb->unacked != NULL? - lwip_ntohl(pcb->unacked->tcphdr->seqno) + TCP_TCPLEN(pcb->unacked): 0)); + pcb->unacked != NULL ? + lwip_ntohl(pcb->unacked->tcphdr->seqno) : 0, + pcb->unacked != NULL ? + lwip_ntohl(pcb->unacked->tcphdr->seqno) + TCP_TCPLEN(pcb->unacked) : 0)); /* Remove segment from the unacknowledged list if the incoming ACK acknowledges them. */ - while (pcb->unacked != NULL && - TCP_SEQ_LEQ(lwip_ntohl(pcb->unacked->tcphdr->seqno) + - TCP_TCPLEN(pcb->unacked), ackno)) { - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: removing %"U32_F":%"U32_F" from pcb->unacked\n", - lwip_ntohl(pcb->unacked->tcphdr->seqno), - lwip_ntohl(pcb->unacked->tcphdr->seqno) + - TCP_TCPLEN(pcb->unacked))); - - next = pcb->unacked; - pcb->unacked = pcb->unacked->next; - - LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_receive: queuelen %"TCPWNDSIZE_F" ... ", (tcpwnd_size_t)pcb->snd_queuelen)); - LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= pbuf_clen(next->p))); - - pcb->snd_queuelen -= pbuf_clen(next->p); - recv_acked += next->len; - tcp_seg_free(next); - - LWIP_DEBUGF(TCP_QLEN_DEBUG, ("%"TCPWNDSIZE_F" (after freeing unacked)\n", (tcpwnd_size_t)pcb->snd_queuelen)); - if (pcb->snd_queuelen != 0) { - LWIP_ASSERT("tcp_receive: valid queue length", pcb->unacked != NULL || - pcb->unsent != NULL); - } - } + pcb->unacked = tcp_free_acked_segments(pcb, pcb->unacked, "unacked", pcb->unsent); + /* We go through the ->unsent list to see if any of the segments + on the list are acknowledged by the ACK. This may seem + strange since an "unsent" segment shouldn't be acked. The + rationale is that lwIP puts all outstanding segments on the + ->unsent list after a retransmission, so these segments may + in fact have been sent once. */ + pcb->unsent = tcp_free_acked_segments(pcb, pcb->unsent, "unsent", pcb->unacked); /* If there's nothing left to acknowledge, stop the retransmit timer, otherwise reset it to start again */ @@ -1202,52 +1300,41 @@ tcp_receive(struct tcp_pcb *pcb) pcb->polltmr = 0; +#if TCP_OVERSIZE + if (pcb->unsent == NULL) { + pcb->unsent_oversize = 0; + } +#endif /* TCP_OVERSIZE */ + #if LWIP_IPV6 && LWIP_ND6_TCP_REACHABILITY_HINTS if (ip_current_is_v6()) { /* Inform neighbor reachability of forward progress. */ nd6_reachability_hint(ip6_current_src_addr()); } #endif /* LWIP_IPV6 && LWIP_ND6_TCP_REACHABILITY_HINTS*/ + + pcb->snd_buf = (tcpwnd_size_t)(pcb->snd_buf + recv_acked); + /* check if this ACK ends our retransmission of in-flight data */ + if (pcb->flags & TF_RTO) { + /* RTO is done if + 1) both queues are empty or + 2) unacked is empty and unsent head contains data not part of RTO or + 3) unacked head contains data not part of RTO */ + if (pcb->unacked == NULL) { + if ((pcb->unsent == NULL) || + (TCP_SEQ_LEQ(pcb->rto_end, lwip_ntohl(pcb->unsent->tcphdr->seqno)))) { + tcp_clear_flags(pcb, TF_RTO); + } + } else if (TCP_SEQ_LEQ(pcb->rto_end, lwip_ntohl(pcb->unacked->tcphdr->seqno))) { + tcp_clear_flags(pcb, TF_RTO); + } + } + /* End of ACK for new data processing. */ } else { /* Out of sequence ACK, didn't really ack anything */ tcp_send_empty_ack(pcb); } - /* We go through the ->unsent list to see if any of the segments - on the list are acknowledged by the ACK. This may seem - strange since an "unsent" segment shouldn't be acked. The - rationale is that lwIP puts all outstanding segments on the - ->unsent list after a retransmission, so these segments may - in fact have been sent once. */ - while (pcb->unsent != NULL && - TCP_SEQ_BETWEEN(ackno, lwip_ntohl(pcb->unsent->tcphdr->seqno) + - TCP_TCPLEN(pcb->unsent), pcb->snd_nxt)) { - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: removing %"U32_F":%"U32_F" from pcb->unsent\n", - lwip_ntohl(pcb->unsent->tcphdr->seqno), lwip_ntohl(pcb->unsent->tcphdr->seqno) + - TCP_TCPLEN(pcb->unsent))); - - next = pcb->unsent; - pcb->unsent = pcb->unsent->next; -#if TCP_OVERSIZE - if (pcb->unsent == NULL) { - pcb->unsent_oversize = 0; - } -#endif /* TCP_OVERSIZE */ - LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_receive: queuelen %"TCPWNDSIZE_F" ... ", (tcpwnd_size_t)pcb->snd_queuelen)); - LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= pbuf_clen(next->p))); - /* Prevent ACK for FIN to generate a sent event */ - pcb->snd_queuelen -= pbuf_clen(next->p); - recv_acked += next->len; - tcp_seg_free(next); - LWIP_DEBUGF(TCP_QLEN_DEBUG, ("%"TCPWNDSIZE_F" (after freeing unsent)\n", (tcpwnd_size_t)pcb->snd_queuelen)); - if (pcb->snd_queuelen != 0) { - LWIP_ASSERT("tcp_receive: valid queue length", - pcb->unacked != NULL || pcb->unsent != NULL); - } - } - pcb->snd_buf += recv_acked; - /* End of ACK for new data processing. */ - LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_receive: pcb->rttest %"U32_F" rtseq %"U32_F" ackno %"U32_F"\n", pcb->rttest, pcb->rtseq, ackno)); @@ -1263,14 +1350,14 @@ tcp_receive(struct tcp_pcb *pcb) m, (u16_t)(m * TCP_SLOW_INTERVAL))); /* This is taken directly from VJs original code in his paper */ - m = m - (pcb->sa >> 3); - pcb->sa += m; + m = (s16_t)(m - (pcb->sa >> 3)); + pcb->sa = (s16_t)(pcb->sa + m); if (m < 0) { - m = -m; + m = (s16_t) - m; } - m = m - (pcb->sv >> 2); - pcb->sv += m; - pcb->rto = (pcb->sa >> 3) + pcb->sv; + m = (s16_t)(m - (pcb->sv >> 2)); + pcb->sv = (s16_t)(pcb->sv + m); + pcb->rto = (s16_t)((pcb->sa >> 3) + pcb->sv); LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_receive: RTO %"U16_F" (%"U16_F" milliseconds)\n", pcb->rto, (u16_t)(pcb->rto * TCP_SLOW_INTERVAL))); @@ -1336,35 +1423,25 @@ tcp_receive(struct tcp_pcb *pcb) length.*/ struct pbuf *p = inseg.p; - off = pcb->rcv_nxt - seqno; + u32_t off32 = pcb->rcv_nxt - seqno; + u16_t new_tot_len, off; LWIP_ASSERT("inseg.p != NULL", inseg.p); - LWIP_ASSERT("insane offset!", (off < 0x7fff)); - if (inseg.p->len < off) { - LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off)); - new_tot_len = (u16_t)(inseg.p->tot_len - off); - while (p->len < off) { - off -= p->len; - /* KJM following line changed (with addition of new_tot_len var) - to fix bug #9076 - inseg.p->tot_len -= p->len; */ - p->tot_len = new_tot_len; - p->len = 0; - p = p->next; - } - if (pbuf_header(p, (s16_t)-off)) { - /* Do we need to cope with this failing? Assert for now */ - LWIP_ASSERT("pbuf_header failed", 0); - } - } else { - if (pbuf_header(inseg.p, (s16_t)-off)) { - /* Do we need to cope with this failing? Assert for now */ - LWIP_ASSERT("pbuf_header failed", 0); - } + LWIP_ASSERT("insane offset!", (off32 < 0xffff)); + off = (u16_t)off32; + LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off)); + inseg.len -= off; + new_tot_len = (u16_t)(inseg.p->tot_len - off); + while (p->len < off) { + off -= p->len; + /* all pbufs up to and including this one have len==0, so tot_len is equal */ + p->tot_len = new_tot_len; + p->len = 0; + p = p->next; } - inseg.len -= (u16_t)(pcb->rcv_nxt - seqno); + /* cannot fail... */ + pbuf_remove_header(p, off); inseg.tcphdr->seqno = seqno = pcb->rcv_nxt; - } - else { + } else { if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)) { /* the whole segment is < rcv_nxt */ /* must be a duplicate of a packet that has already been correctly handled */ @@ -1423,21 +1500,22 @@ tcp_receive(struct tcp_pcb *pcb) tcp_seg_free(old_ooseq); } } else { - next = pcb->ooseq; + struct tcp_seg *next = pcb->ooseq; /* Remove all segments on ooseq that are covered by inseg already. * FIN is copied from ooseq to inseg if present. */ while (next && TCP_SEQ_GEQ(seqno + tcplen, next->tcphdr->seqno + next->len)) { + struct tcp_seg *tmp; /* inseg cannot have FIN here (already processed above) */ if ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0 && (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) == 0) { TCPH_SET_FLAG(inseg.tcphdr, TCP_FIN); tcplen = TCP_TCPLEN(&inseg); } - prev = next; + tmp = next; next = next->next; - tcp_seg_free(prev); + tcp_seg_free(tmp); } /* Now trim right side of inseg if it overlaps with the first * segment on ooseq */ @@ -1494,7 +1572,7 @@ tcp_receive(struct tcp_pcb *pcb) while (pcb->ooseq != NULL && pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) { - cseg = pcb->ooseq; + struct tcp_seg *cseg = pcb->ooseq; seqno = pcb->ooseq->tcphdr->seqno; pcb->rcv_nxt += TCP_TCPLEN(cseg); @@ -1528,12 +1606,34 @@ tcp_receive(struct tcp_pcb *pcb) pcb->ooseq = cseg->next; tcp_seg_free(cseg); } +#if LWIP_TCP_SACK_OUT + if (pcb->flags & TF_SACK) { + if (pcb->ooseq != NULL) { + /* Some segments may have been removed from ooseq, let's remove all SACKs that + describe anything before the new beginning of that list. */ + tcp_remove_sacks_lt(pcb, pcb->ooseq->tcphdr->seqno); + } else if (LWIP_TCP_SACK_VALID(pcb, 0)) { + /* ooseq has been cleared. Nothing to SACK */ + memset(pcb->rcv_sacks, 0, sizeof(pcb->rcv_sacks)); + } + } +#endif /* LWIP_TCP_SACK_OUT */ #endif /* TCP_QUEUE_OOSEQ */ /* Acknowledge the segment(s). */ tcp_ack(pcb); +#if LWIP_TCP_SACK_OUT + if (LWIP_TCP_SACK_VALID(pcb, 0)) { + /* Normally the ACK for the data received could be piggy-backed on a data packet, + but lwIP currently does not support including SACKs in data packets. So we force + it to respond with an empty ACK packet (only if there is at least one SACK to be sent). + NOTE: tcp_send_empty_ack() on success clears the ACK flags (set by tcp_ack()) */ + tcp_send_empty_ack(pcb); + } +#endif /* LWIP_TCP_SACK_OUT */ + #if LWIP_IPV6 && LWIP_ND6_TCP_REACHABILITY_HINTS if (ip_current_is_v6()) { /* Inform neighbor reachability of forward progress. */ @@ -1543,11 +1643,18 @@ tcp_receive(struct tcp_pcb *pcb) } else { /* We get here if the incoming segment is out-of-sequence. */ - tcp_send_empty_ack(pcb); + #if TCP_QUEUE_OOSEQ /* We queue the segment on the ->ooseq queue. */ if (pcb->ooseq == NULL) { pcb->ooseq = tcp_seg_copy(&inseg); +#if LWIP_TCP_SACK_OUT + if (pcb->flags & TF_SACK) { + /* All the SACKs should be invalid, so we can simply store the most recent one: */ + pcb->rcv_sacks[0].left = seqno; + pcb->rcv_sacks[0].right = seqno + inseg.len; + } +#endif /* LWIP_TCP_SACK_OUT */ } else { /* If the queue is not empty, we walk through the queue and try to find a place where the sequence number of the @@ -1561,7 +1668,12 @@ tcp_receive(struct tcp_pcb *pcb) segment on the ->ooseq queue, we discard the segment that contains less data. */ - prev = NULL; +#if LWIP_TCP_SACK_OUT + /* This is the left edge of the lowest possible SACK range. + It may start before the newly received segment (possibly adjusted below). */ + u32_t sackbeg = TCP_SEQ_LT(seqno, pcb->ooseq->tcphdr->seqno) ? seqno : pcb->ooseq->tcphdr->seqno; +#endif /* LWIP_TCP_SACK_OUT */ + struct tcp_seg *next, *prev = NULL; for (next = pcb->ooseq; next != NULL; next = next->next) { if (seqno == next->tcphdr->seqno) { /* The sequence number of the incoming segment is the @@ -1572,7 +1684,7 @@ tcp_receive(struct tcp_pcb *pcb) /* The incoming segment is larger than the old segment. We replace some segments with the new one. */ - cseg = tcp_seg_copy(&inseg); + struct tcp_seg *cseg = tcp_seg_copy(&inseg); if (cseg != NULL) { if (prev != NULL) { prev->next = cseg; @@ -1595,7 +1707,7 @@ tcp_receive(struct tcp_pcb *pcb) than the sequence number of the first segment on the queue. We put the incoming segment first on the queue. */ - cseg = tcp_seg_copy(&inseg); + struct tcp_seg *cseg = tcp_seg_copy(&inseg); if (cseg != NULL) { pcb->ooseq = cseg; tcp_oos_insert_segment(cseg, next); @@ -1605,13 +1717,13 @@ tcp_receive(struct tcp_pcb *pcb) } else { /*if (TCP_SEQ_LT(prev->tcphdr->seqno, seqno) && TCP_SEQ_LT(seqno, next->tcphdr->seqno)) {*/ - if (TCP_SEQ_BETWEEN(seqno, prev->tcphdr->seqno+1, next->tcphdr->seqno-1)) { + if (TCP_SEQ_BETWEEN(seqno, prev->tcphdr->seqno + 1, next->tcphdr->seqno - 1)) { /* The sequence number of the incoming segment is in between the sequence numbers of the previous and the next segment on ->ooseq. We trim trim the previous segment, delete next segments that included in received segment and trim received, if needed. */ - cseg = tcp_seg_copy(&inseg); + struct tcp_seg *cseg = tcp_seg_copy(&inseg); if (cseg != NULL) { if (TCP_SEQ_GT(prev->tcphdr->seqno + prev->len, seqno)) { /* We need to trim the prev segment. */ @@ -1624,6 +1736,20 @@ tcp_receive(struct tcp_pcb *pcb) break; } } + +#if LWIP_TCP_SACK_OUT + /* The new segment goes after the 'next' one. If there is a "hole" in sequence numbers + between 'prev' and the beginning of 'next', we want to move sackbeg. */ + if (prev != NULL && prev->tcphdr->seqno + prev->len != next->tcphdr->seqno) { + sackbeg = next->tcphdr->seqno; + } +#endif /* LWIP_TCP_SACK_OUT */ + + /* We don't use 'prev' below, so let's set it to current 'next'. + This way even if we break the loop below, 'prev' will be pointing + at the segment right in front of the newly added one. */ + prev = next; + /* If the "next" segment is the last segment on the ooseq queue, we add the incoming segment to the end of the list. */ @@ -1662,35 +1788,88 @@ tcp_receive(struct tcp_pcb *pcb) break; } } - prev = next; + } + +#if LWIP_TCP_SACK_OUT + if (pcb->flags & TF_SACK) { + if (prev == NULL) { + /* The new segment is at the beginning. sackbeg should already be set properly. + We need to find the right edge. */ + next = pcb->ooseq; + } else if (prev->next != NULL) { + /* The new segment was added after 'prev'. If there is a "hole" between 'prev' and 'prev->next', + we need to move sackbeg. After that we should find the right edge. */ + next = prev->next; + if (prev->tcphdr->seqno + prev->len != next->tcphdr->seqno) { + sackbeg = next->tcphdr->seqno; + } + } else { + next = NULL; + } + if (next != NULL) { + u32_t sackend = next->tcphdr->seqno; + for ( ; (next != NULL) && (sackend == next->tcphdr->seqno); next = next->next) { + sackend += next->len; + } + tcp_add_sack(pcb, sackbeg, sackend); + } + } +#endif /* LWIP_TCP_SACK_OUT */ + } +#if defined(TCP_OOSEQ_BYTES_LIMIT) || defined(TCP_OOSEQ_PBUFS_LIMIT) + { + /* Check that the data on ooseq doesn't exceed one of the limits + and throw away everything above that limit. */ +#ifdef TCP_OOSEQ_BYTES_LIMIT + const u32_t ooseq_max_blen = TCP_OOSEQ_BYTES_LIMIT(pcb); + u32_t ooseq_blen = 0; +#endif +#ifdef TCP_OOSEQ_PBUFS_LIMIT + const u16_t ooseq_max_qlen = TCP_OOSEQ_PBUFS_LIMIT(pcb); + u16_t ooseq_qlen = 0; +#endif + struct tcp_seg *next, *prev = NULL; + for (next = pcb->ooseq; next != NULL; prev = next, next = next->next) { + struct pbuf *p = next->p; + int stop_here = 0; +#ifdef TCP_OOSEQ_BYTES_LIMIT + ooseq_blen += p->tot_len; + if (ooseq_blen > ooseq_max_blen) { + stop_here = 1; + } +#endif +#ifdef TCP_OOSEQ_PBUFS_LIMIT + ooseq_qlen += pbuf_clen(p); + if (ooseq_qlen > ooseq_max_qlen) { + stop_here = 1; + } +#endif + if (stop_here) { +#if LWIP_TCP_SACK_OUT + if (pcb->flags & TF_SACK) { + /* Let's remove all SACKs from next's seqno up. */ + tcp_remove_sacks_gt(pcb, next->tcphdr->seqno); + } +#endif /* LWIP_TCP_SACK_OUT */ + /* too much ooseq data, dump this and everything after it */ + tcp_segs_free(next); + if (prev == NULL) { + /* first ooseq segment is too much, dump the whole queue */ + pcb->ooseq = NULL; + } else { + /* just dump 'next' and everything after it */ + prev->next = NULL; + } + break; + } } } -#if TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS - /* Check that the data on ooseq doesn't exceed one of the limits - and throw away everything above that limit. */ - ooseq_blen = 0; - ooseq_qlen = 0; - prev = NULL; - for (next = pcb->ooseq; next != NULL; prev = next, next = next->next) { - struct pbuf *p = next->p; - ooseq_blen += p->tot_len; - ooseq_qlen += pbuf_clen(p); - if ((ooseq_blen > TCP_OOSEQ_MAX_BYTES) || - (ooseq_qlen > TCP_OOSEQ_MAX_PBUFS)) { - /* too much ooseq data, dump this and everything after it */ - tcp_segs_free(next); - if (prev == NULL) { - /* first ooseq segment is too much, dump the whole queue */ - pcb->ooseq = NULL; - } else { - /* just dump 'next' and everything after it */ - prev->next = NULL; - } - break; - } - } -#endif /* TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS */ +#endif /* TCP_OOSEQ_BYTES_LIMIT || TCP_OOSEQ_PBUFS_LIMIT */ #endif /* TCP_QUEUE_OOSEQ */ + + /* We send the ACK packet after we've (potentially) dealt with SACKs, + so they can be included in the acknowledgment. */ + tcp_send_empty_ack(pcb); } } else { /* The incoming segment is not within the window. */ @@ -1706,13 +1885,14 @@ tcp_receive(struct tcp_pcb *pcb) } static u8_t -tcp_getoptbyte(void) +tcp_get_next_optbyte(void) { - if ((tcphdr_opt2 == NULL) || (tcp_optidx < tcphdr_opt1len)) { - u8_t* opts = (u8_t *)tcphdr + TCP_HLEN; - return opts[tcp_optidx++]; + u16_t optidx = tcp_optidx++; + if ((tcphdr_opt2 == NULL) || (optidx < tcphdr_opt1len)) { + u8_t *opts = (u8_t *)tcphdr + TCP_HLEN; + return opts[optidx]; } else { - u8_t idx = (u8_t)(tcp_optidx++ - tcphdr_opt1len); + u8_t idx = (u8_t)(optidx - tcphdr_opt1len); return tcphdr_opt2[idx]; } } @@ -1734,95 +1914,112 @@ tcp_parseopt(struct tcp_pcb *pcb) u32_t tsval; #endif + LWIP_ASSERT("tcp_parseopt: invalid pcb", pcb != NULL); + /* Parse the TCP MSS option, if present. */ if (tcphdr_optlen != 0) { for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) { - u8_t opt = tcp_getoptbyte(); + u8_t opt = tcp_get_next_optbyte(); switch (opt) { - case LWIP_TCP_OPT_EOL: - /* End of options. */ - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: EOL\n")); - return; - case LWIP_TCP_OPT_NOP: - /* NOP option. */ - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: NOP\n")); - break; - case LWIP_TCP_OPT_MSS: - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: MSS\n")); - if (tcp_getoptbyte() != LWIP_TCP_OPT_LEN_MSS || (tcp_optidx - 2 + LWIP_TCP_OPT_LEN_MSS) > tcphdr_optlen) { - /* Bad length */ - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: bad length\n")); + case LWIP_TCP_OPT_EOL: + /* End of options. */ + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: EOL\n")); return; - } - /* An MSS option with the right option length. */ - mss = (tcp_getoptbyte() << 8); - mss |= tcp_getoptbyte(); - /* Limit the mss to the configured TCP_MSS and prevent division by zero */ - pcb->mss = ((mss > TCP_MSS) || (mss == 0)) ? TCP_MSS : mss; - break; -#if LWIP_WND_SCALE - case LWIP_TCP_OPT_WS: - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: WND_SCALE\n")); - if (tcp_getoptbyte() != LWIP_TCP_OPT_LEN_WS || (tcp_optidx - 2 + LWIP_TCP_OPT_LEN_WS) > tcphdr_optlen) { - /* Bad length */ - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: bad length\n")); - return; - } - /* An WND_SCALE option with the right option length. */ - data = tcp_getoptbyte(); - /* If syn was received with wnd scale option, - activate wnd scale opt, but only if this is not a retransmission */ - if ((flags & TCP_SYN) && !(pcb->flags & TF_WND_SCALE)) { - pcb->snd_scale = data; - if (pcb->snd_scale > 14U) { - pcb->snd_scale = 14U; + case LWIP_TCP_OPT_NOP: + /* NOP option. */ + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: NOP\n")); + break; + case LWIP_TCP_OPT_MSS: + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: MSS\n")); + if (tcp_get_next_optbyte() != LWIP_TCP_OPT_LEN_MSS || (tcp_optidx - 2 + LWIP_TCP_OPT_LEN_MSS) > tcphdr_optlen) { + /* Bad length */ + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: bad length\n")); + return; } - pcb->rcv_scale = TCP_RCV_SCALE; - pcb->flags |= TF_WND_SCALE; - /* window scaling is enabled, we can use the full receive window */ - LWIP_ASSERT("window not at default value", pcb->rcv_wnd == TCPWND_MIN16(TCP_WND)); - LWIP_ASSERT("window not at default value", pcb->rcv_ann_wnd == TCPWND_MIN16(TCP_WND)); - pcb->rcv_wnd = pcb->rcv_ann_wnd = TCP_WND; - } - break; -#endif + /* An MSS option with the right option length. */ + mss = (u16_t)(tcp_get_next_optbyte() << 8); + mss |= tcp_get_next_optbyte(); + /* Limit the mss to the configured TCP_MSS and prevent division by zero */ + pcb->mss = ((mss > TCP_MSS) || (mss == 0)) ? TCP_MSS : mss; + break; +#if LWIP_WND_SCALE + case LWIP_TCP_OPT_WS: + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: WND_SCALE\n")); + if (tcp_get_next_optbyte() != LWIP_TCP_OPT_LEN_WS || (tcp_optidx - 2 + LWIP_TCP_OPT_LEN_WS) > tcphdr_optlen) { + /* Bad length */ + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: bad length\n")); + return; + } + /* An WND_SCALE option with the right option length. */ + data = tcp_get_next_optbyte(); + /* If syn was received with wnd scale option, + activate wnd scale opt, but only if this is not a retransmission */ + if ((flags & TCP_SYN) && !(pcb->flags & TF_WND_SCALE)) { + pcb->snd_scale = data; + if (pcb->snd_scale > 14U) { + pcb->snd_scale = 14U; + } + pcb->rcv_scale = TCP_RCV_SCALE; + tcp_set_flags(pcb, TF_WND_SCALE); + /* window scaling is enabled, we can use the full receive window */ + LWIP_ASSERT("window not at default value", pcb->rcv_wnd == TCPWND_MIN16(TCP_WND)); + LWIP_ASSERT("window not at default value", pcb->rcv_ann_wnd == TCPWND_MIN16(TCP_WND)); + pcb->rcv_wnd = pcb->rcv_ann_wnd = TCP_WND; + } + break; +#endif /* LWIP_WND_SCALE */ #if LWIP_TCP_TIMESTAMPS - case LWIP_TCP_OPT_TS: - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: TS\n")); - if (tcp_getoptbyte() != LWIP_TCP_OPT_LEN_TS || (tcp_optidx - 2 + LWIP_TCP_OPT_LEN_TS) > tcphdr_optlen) { - /* Bad length */ - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: bad length\n")); - return; - } - /* TCP timestamp option with valid length */ - tsval = tcp_getoptbyte(); - tsval |= (tcp_getoptbyte() << 8); - tsval |= (tcp_getoptbyte() << 16); - tsval |= (tcp_getoptbyte() << 24); - if (flags & TCP_SYN) { - pcb->ts_recent = lwip_ntohl(tsval); - /* Enable sending timestamps in every segment now that we know - the remote host supports it. */ - pcb->flags |= TF_TIMESTAMP; - } else if (TCP_SEQ_BETWEEN(pcb->ts_lastacksent, seqno, seqno+tcplen)) { - pcb->ts_recent = lwip_ntohl(tsval); - } - /* Advance to next option (6 bytes already read) */ - tcp_optidx += LWIP_TCP_OPT_LEN_TS - 6; - break; -#endif - default: - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: other\n")); - data = tcp_getoptbyte(); - if (data < 2) { - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: bad length\n")); - /* If the length field is zero, the options are malformed - and we don't process them further. */ - return; - } - /* All other options have a length field, so that we easily - can skip past them. */ - tcp_optidx += data - 2; + case LWIP_TCP_OPT_TS: + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: TS\n")); + if (tcp_get_next_optbyte() != LWIP_TCP_OPT_LEN_TS || (tcp_optidx - 2 + LWIP_TCP_OPT_LEN_TS) > tcphdr_optlen) { + /* Bad length */ + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: bad length\n")); + return; + } + /* TCP timestamp option with valid length */ + tsval = tcp_get_next_optbyte(); + tsval |= (tcp_get_next_optbyte() << 8); + tsval |= (tcp_get_next_optbyte() << 16); + tsval |= (tcp_get_next_optbyte() << 24); + if (flags & TCP_SYN) { + pcb->ts_recent = lwip_ntohl(tsval); + /* Enable sending timestamps in every segment now that we know + the remote host supports it. */ + tcp_set_flags(pcb, TF_TIMESTAMP); + } else if (TCP_SEQ_BETWEEN(pcb->ts_lastacksent, seqno, seqno + tcplen)) { + pcb->ts_recent = lwip_ntohl(tsval); + } + /* Advance to next option (6 bytes already read) */ + tcp_optidx += LWIP_TCP_OPT_LEN_TS - 6; + break; +#endif /* LWIP_TCP_TIMESTAMPS */ +#if LWIP_TCP_SACK_OUT + case LWIP_TCP_OPT_SACK_PERM: + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: SACK_PERM\n")); + if (tcp_get_next_optbyte() != LWIP_TCP_OPT_LEN_SACK_PERM || (tcp_optidx - 2 + LWIP_TCP_OPT_LEN_SACK_PERM) > tcphdr_optlen) { + /* Bad length */ + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: bad length\n")); + return; + } + /* TCP SACK_PERM option with valid length */ + if (flags & TCP_SYN) { + /* We only set it if we receive it in a SYN (or SYN+ACK) packet */ + tcp_set_flags(pcb, TF_SACK); + } + break; +#endif /* LWIP_TCP_SACK_OUT */ + default: + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: other\n")); + data = tcp_get_next_optbyte(); + if (data < 2) { + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: bad length\n")); + /* If the length field is zero, the options are malformed + and we don't process them further. */ + return; + } + /* All other options have a length field, so that we easily + can skip past them. */ + tcp_optidx += data - 2; } } } @@ -1834,4 +2031,148 @@ tcp_trigger_input_pcb_close(void) recv_flags |= TF_CLOSED; } +#if LWIP_TCP_SACK_OUT +/** + * Called by tcp_receive() to add new SACK entry. + * + * The new SACK entry will be placed at the beginning of rcv_sacks[], as the newest one. + * Existing SACK entries will be "pushed back", to preserve their order. + * This is the behavior described in RFC 2018, section 4. + * + * @param pcb the tcp_pcb for which a segment arrived + * @param left the left side of the SACK (the first sequence number) + * @param right the right side of the SACK (the first sequence number past this SACK) + */ +static void +tcp_add_sack(struct tcp_pcb *pcb, u32_t left, u32_t right) +{ + u8_t i; + u8_t unused_idx; + + if ((pcb->flags & TF_SACK) == 0 || !TCP_SEQ_LT(left, right)) { + return; + } + + /* First, let's remove all SACKs that are no longer needed (because they overlap with the newest one), + while moving all other SACKs forward. + We run this loop for all entries, until we find the first invalid one. + There is no point checking after that. */ + for (i = unused_idx = 0; (i < LWIP_TCP_MAX_SACK_NUM) && LWIP_TCP_SACK_VALID(pcb, i); ++i) { + /* We only want to use SACK at [i] if it doesn't overlap with left:right range. + It does not overlap if its right side is before the newly added SACK, + or if its left side is after the newly added SACK. + NOTE: The equality should not really happen, but it doesn't hurt. */ + if (TCP_SEQ_LEQ(pcb->rcv_sacks[i].right, left) || TCP_SEQ_LEQ(right, pcb->rcv_sacks[i].left)) { + if (unused_idx != i) { + /* We don't need to copy if it's already in the right spot */ + pcb->rcv_sacks[unused_idx] = pcb->rcv_sacks[i]; + } + ++unused_idx; + } + } + + /* Now 'unused_idx' is the index of the first invalid SACK entry, + anywhere between 0 (no valid entries) and LWIP_TCP_MAX_SACK_NUM (all entries are valid). + We want to clear this and all following SACKs. + However, we will be adding another one in the front (and shifting everything else back). + So let's just iterate from the back, and set each entry to the one to the left if it's valid, + or to 0 if it is not. */ + for (i = LWIP_TCP_MAX_SACK_NUM - 1; i > 0; --i) { + /* [i] is the index we are setting, and the value should be at index [i-1], + or 0 if that index is unused (>= unused_idx). */ + if (i - 1 >= unused_idx) { + /* [i-1] is unused. Let's clear [i]. */ + pcb->rcv_sacks[i].left = pcb->rcv_sacks[i].right = 0; + } else { + pcb->rcv_sacks[i] = pcb->rcv_sacks[i - 1]; + } + } + + /* And now we can store the newest SACK */ + pcb->rcv_sacks[0].left = left; + pcb->rcv_sacks[0].right = right; +} + +/** + * Called to remove a range of SACKs. + * + * SACK entries will be removed or adjusted to not acknowledge any sequence + * numbers that are less than 'seq' passed. It not only invalidates entries, + * but also moves all entries that are still valid to the beginning. + * + * @param pcb the tcp_pcb to modify + * @param seq the lowest sequence number to keep in SACK entries + */ +static void +tcp_remove_sacks_lt(struct tcp_pcb *pcb, u32_t seq) +{ + u8_t i; + u8_t unused_idx; + + /* We run this loop for all entries, until we find the first invalid one. + There is no point checking after that. */ + for (i = unused_idx = 0; (i < LWIP_TCP_MAX_SACK_NUM) && LWIP_TCP_SACK_VALID(pcb, i); ++i) { + /* We only want to use SACK at index [i] if its right side is > 'seq'. */ + if (TCP_SEQ_GT(pcb->rcv_sacks[i].right, seq)) { + if (unused_idx != i) { + /* We only copy it if it's not in the right spot already. */ + pcb->rcv_sacks[unused_idx] = pcb->rcv_sacks[i]; + } + /* NOTE: It is possible that its left side is < 'seq', in which case we should adjust it. */ + if (TCP_SEQ_LT(pcb->rcv_sacks[unused_idx].left, seq)) { + pcb->rcv_sacks[unused_idx].left = seq; + } + ++unused_idx; + } + } + + /* We also need to invalidate everything from 'unused_idx' till the end */ + for (i = unused_idx; i < LWIP_TCP_MAX_SACK_NUM; ++i) { + pcb->rcv_sacks[i].left = pcb->rcv_sacks[i].right = 0; + } +} + +#if defined(TCP_OOSEQ_BYTES_LIMIT) || defined(TCP_OOSEQ_PBUFS_LIMIT) +/** + * Called to remove a range of SACKs. + * + * SACK entries will be removed or adjusted to not acknowledge any sequence + * numbers that are greater than (or equal to) 'seq' passed. It not only invalidates entries, + * but also moves all entries that are still valid to the beginning. + * + * @param pcb the tcp_pcb to modify + * @param seq the highest sequence number to keep in SACK entries + */ +static void +tcp_remove_sacks_gt(struct tcp_pcb *pcb, u32_t seq) +{ + u8_t i; + u8_t unused_idx; + + /* We run this loop for all entries, until we find the first invalid one. + There is no point checking after that. */ + for (i = unused_idx = 0; (i < LWIP_TCP_MAX_SACK_NUM) && LWIP_TCP_SACK_VALID(pcb, i); ++i) { + /* We only want to use SACK at index [i] if its left side is < 'seq'. */ + if (TCP_SEQ_LT(pcb->rcv_sacks[i].left, seq)) { + if (unused_idx != i) { + /* We only copy it if it's not in the right spot already. */ + pcb->rcv_sacks[unused_idx] = pcb->rcv_sacks[i]; + } + /* NOTE: It is possible that its right side is > 'seq', in which case we should adjust it. */ + if (TCP_SEQ_GT(pcb->rcv_sacks[unused_idx].right, seq)) { + pcb->rcv_sacks[unused_idx].right = seq; + } + ++unused_idx; + } + } + + /* We also need to invalidate everything from 'unused_idx' till the end */ + for (i = unused_idx; i < LWIP_TCP_MAX_SACK_NUM; ++i) { + pcb->rcv_sacks[i].left = pcb->rcv_sacks[i].right = 0; + } +} +#endif /* TCP_OOSEQ_BYTES_LIMIT || TCP_OOSEQ_PBUFS_LIMIT */ + +#endif /* LWIP_TCP_SACK_OUT */ + #endif /* LWIP_TCP */ diff --git a/Libraries/LwIP/src/core/tcp_out.c b/Libraries/LwIP/src/core/tcp_out.c index babc67f..375e18d 100755 --- a/Libraries/LwIP/src/core/tcp_out.c +++ b/Libraries/LwIP/src/core/tcp_out.c @@ -4,6 +4,28 @@ * * The output functions of TCP. * + * There are two distinct ways for TCP segments to get sent: + * - queued data: these are segments transferring data or segments containing + * SYN or FIN (which both count as one sequence number). They are created as + * struct @ref pbuf together with a struct tcp_seg and enqueue to the + * unsent list of the pcb. They are sent by tcp_output: + * - @ref tcp_write : creates data segments + * - @ref tcp_split_unsent_seg : splits a data segment + * - @ref tcp_enqueue_flags : creates SYN-only or FIN-only segments + * - @ref tcp_output / tcp_output_segment : finalize the tcp header + * (e.g. sequence numbers, options, checksum) and output to IP + * - the various tcp_rexmit functions shuffle around segments between the + * unsent an unacked lists to retransmit them + * - tcp_create_segment and tcp_pbuf_prealloc allocate pbuf and + * segment for these functions + * - direct send: these segments don't contain data but control the connection + * behaviour. They are created as pbuf only and sent directly without + * enqueueing them: + * - @ref tcp_send_empty_ack sends an ACK-only segment + * - @ref tcp_rst sends a RST segment + * - @ref tcp_keepalive sends a keepalive segment + * - @ref tcp_zero_window_probe sends a window probe segment + * - tcp_output_alloc_header allocates a header-only pbuf for these functions */ /* @@ -58,6 +80,17 @@ #include +#ifdef LWIP_HOOK_FILENAME +#include LWIP_HOOK_FILENAME +#endif + +/* Allow to add custom TCP header options by defining this hook */ +#ifdef LWIP_HOOK_TCP_OUT_TCPOPT_LENGTH +#define LWIP_TCP_OPT_LENGTH_SEGMENT(flags, pcb) LWIP_HOOK_TCP_OUT_TCPOPT_LENGTH(pcb, LWIP_TCP_OPT_LENGTH(flags)) +#else +#define LWIP_TCP_OPT_LENGTH_SEGMENT(flags, pcb) LWIP_TCP_OPT_LENGTH(flags) +#endif + /* Define some copy-macros for checksum-on-copy so that the code looks nicer by preventing too many ifdef's. */ #if TCP_CHECKSUM_ON_COPY @@ -94,75 +127,27 @@ /* Forward declarations.*/ static err_t tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb, struct netif *netif); -/** Allocate a pbuf and create a tcphdr at p->payload, used for output - * functions other than the default tcp_output -> tcp_output_segment - * (e.g. tcp_send_empty_ack, etc.) - * - * @param pcb tcp pcb for which to send a packet (used to initialize tcp_hdr) - * @param optlen length of header-options - * @param datalen length of tcp data to reserve in pbuf - * @param seqno_be seqno in network byte order (big-endian) - * @return pbuf with p->payload being the tcp_hdr - */ -static struct pbuf * -tcp_output_alloc_header(struct tcp_pcb *pcb, u16_t optlen, u16_t datalen, - u32_t seqno_be /* already in network byte order */) +/* tcp_route: common code that returns a fixed bound netif or calls ip_route */ +static struct netif * +tcp_route(const struct tcp_pcb *pcb, const ip_addr_t *src, const ip_addr_t *dst) { - struct tcp_hdr *tcphdr; - struct pbuf *p = pbuf_alloc(PBUF_IP, TCP_HLEN + optlen + datalen, PBUF_RAM); - if (p != NULL) { - LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", - (p->len >= TCP_HLEN + optlen)); - tcphdr = (struct tcp_hdr *)p->payload; - tcphdr->src = lwip_htons(pcb->local_port); - tcphdr->dest = lwip_htons(pcb->remote_port); - tcphdr->seqno = seqno_be; - tcphdr->ackno = lwip_htonl(pcb->rcv_nxt); - TCPH_HDRLEN_FLAGS_SET(tcphdr, (5 + optlen / 4), TCP_ACK); - tcphdr->wnd = lwip_htons(TCPWND_MIN16(RCV_WND_SCALE(pcb, pcb->rcv_ann_wnd))); - tcphdr->chksum = 0; - tcphdr->urgp = 0; + LWIP_UNUSED_ARG(src); /* in case IPv4-only and source-based routing is disabled */ - /* If we're sending a packet, update the announced right window edge */ - pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; + if ((pcb != NULL) && (pcb->netif_idx != NETIF_NO_INDEX)) { + return netif_get_by_index(pcb->netif_idx); + } else { + return ip_route(src, dst); } - return p; -} - -/** - * Called by tcp_close() to send a segment including FIN flag but not data. - * - * @param pcb the tcp_pcb over which to send a segment - * @return ERR_OK if sent, another err_t otherwise - */ -err_t -tcp_send_fin(struct tcp_pcb *pcb) -{ - /* first, try to add the fin to the last unsent segment */ - if (pcb->unsent != NULL) { - struct tcp_seg *last_unsent; - for (last_unsent = pcb->unsent; last_unsent->next != NULL; - last_unsent = last_unsent->next); - - if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) { - /* no SYN/FIN/RST flag in the header, we can add the FIN flag */ - TCPH_SET_FLAG(last_unsent->tcphdr, TCP_FIN); - pcb->flags |= TF_FIN; - return ERR_OK; - } - } - /* no data, no length, flags, copy=1, no optdata */ - return tcp_enqueue_flags(pcb, TCP_FIN); } /** * Create a TCP segment with prefilled header. * - * Called by tcp_write and tcp_enqueue_flags. + * Called by @ref tcp_write, @ref tcp_enqueue_flags and @ref tcp_split_unsent_seg * * @param pcb Protocol control block for the TCP connection. * @param p pbuf that is used to hold the TCP header. - * @param flags TCP flags for header. + * @param hdrflags TCP flags for header. * @param seqno TCP sequence number of this packet * @param optflags options to include in TCP header * @return a new tcp_seg pointing to p, or NULL. @@ -170,10 +155,15 @@ tcp_send_fin(struct tcp_pcb *pcb) * p is freed on failure. */ static struct tcp_seg * -tcp_create_segment(struct tcp_pcb *pcb, struct pbuf *p, u8_t flags, u32_t seqno, u8_t optflags) +tcp_create_segment(const struct tcp_pcb *pcb, struct pbuf *p, u8_t hdrflags, u32_t seqno, u8_t optflags) { struct tcp_seg *seg; - u8_t optlen = LWIP_TCP_OPT_LENGTH(optflags); + u8_t optlen; + + LWIP_ASSERT("tcp_create_segment: invalid pcb", pcb != NULL); + LWIP_ASSERT("tcp_create_segment: invalid pbuf", p != NULL); + + optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb); if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) { LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_create_segment: no memory.\n")); @@ -197,7 +187,7 @@ tcp_create_segment(struct tcp_pcb *pcb, struct pbuf *p, u8_t flags, u32_t seqno, #endif /* TCP_CHECKSUM_ON_COPY */ /* build TCP header */ - if (pbuf_header(p, TCP_HLEN)) { + if (pbuf_add_header(p, TCP_HLEN)) { LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_create_segment: no room for TCP header in pbuf.\n")); TCP_STATS_INC(tcp.err); tcp_seg_free(seg); @@ -208,7 +198,7 @@ tcp_create_segment(struct tcp_pcb *pcb, struct pbuf *p, u8_t flags, u32_t seqno, seg->tcphdr->dest = lwip_htons(pcb->remote_port); seg->tcphdr->seqno = lwip_htonl(seqno); /* ackno is set in tcp_output */ - TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), flags); + TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), hdrflags); /* wnd and chksum are set in tcp_output */ seg->tcphdr->urgp = 0; return seg; @@ -220,6 +210,8 @@ tcp_create_segment(struct tcp_pcb *pcb, struct pbuf *p, u8_t flags, u32_t seqno, * This function is like pbuf_alloc(layer, length, PBUF_RAM) except * there may be extra bytes available at the end. * + * Called by @ref tcp_write + * * @param layer flag to define header size. * @param length size of the pbuf's payload. * @param max_length maximum usable size of payload+oversize. @@ -231,12 +223,15 @@ tcp_create_segment(struct tcp_pcb *pcb, struct pbuf *p, u8_t flags, u32_t seqno, #if TCP_OVERSIZE static struct pbuf * tcp_pbuf_prealloc(pbuf_layer layer, u16_t length, u16_t max_length, - u16_t *oversize, struct tcp_pcb *pcb, u8_t apiflags, + u16_t *oversize, const struct tcp_pcb *pcb, u8_t apiflags, u8_t first_seg) { struct pbuf *p; u16_t alloc = length; + LWIP_ASSERT("tcp_pbuf_prealloc: invalid oversize", oversize != NULL); + LWIP_ASSERT("tcp_pbuf_prealloc: invalid pcb", pcb != NULL); + #if LWIP_NETIF_TX_SINGLE_PBUF LWIP_UNUSED_ARG(max_length); LWIP_UNUSED_ARG(pcb); @@ -280,7 +275,10 @@ tcp_pbuf_prealloc(pbuf_layer layer, u16_t length, u16_t max_length, #endif /* TCP_OVERSIZE */ #if TCP_CHECKSUM_ON_COPY -/** Add a checksum of newly added data to the segment */ +/** Add a checksum of newly added data to the segment. + * + * Called by tcp_write and tcp_split_unsent_seg. + */ static void tcp_seg_add_chksum(u16_t chksum, u16_t len, u16_t *seg_chksum, u8_t *seg_chksum_swapped) @@ -306,6 +304,8 @@ tcp_seg_add_chksum(u16_t chksum, u16_t len, u16_t *seg_chksum, static err_t tcp_write_checks(struct tcp_pcb *pcb, u16_t len) { + LWIP_ASSERT("tcp_write_checks: invalid pcb", pcb != NULL); + /* connection is in invalid state for data transmission? */ if ((pcb->state != ESTABLISHED) && (pcb->state != CLOSE_WAIT) && @@ -320,8 +320,8 @@ tcp_write_checks(struct tcp_pcb *pcb, u16_t len) /* fail on too much data */ if (len > pcb->snd_buf) { LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("tcp_write: too much data (len=%"U16_F" > snd_buf=%"TCPWNDSIZE_F")\n", - len, pcb->snd_buf)); - pcb->flags |= TF_NAGLEMEMERR; + len, pcb->snd_buf)); + tcp_set_flags(pcb, TF_NAGLEMEMERR); return ERR_MEM; } @@ -330,19 +330,19 @@ tcp_write_checks(struct tcp_pcb *pcb, u16_t len) /* If total number of pbufs on the unsent/unacked queues exceeds the * configured maximum, return an error */ /* check for configured max queuelen and possible overflow */ - if ((pcb->snd_queuelen >= TCP_SND_QUEUELEN) || (pcb->snd_queuelen > TCP_SNDQUEUELEN_OVERFLOW)) { + if (pcb->snd_queuelen >= LWIP_MIN(TCP_SND_QUEUELEN, (TCP_SNDQUEUELEN_OVERFLOW + 1))) { LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("tcp_write: too long queue %"U16_F" (max %"U16_F")\n", - pcb->snd_queuelen, (u16_t)TCP_SND_QUEUELEN)); + pcb->snd_queuelen, (u16_t)TCP_SND_QUEUELEN)); TCP_STATS_INC(tcp.memerr); - pcb->flags |= TF_NAGLEMEMERR; + tcp_set_flags(pcb, TF_NAGLEMEMERR); return ERR_MEM; } if (pcb->snd_queuelen != 0) { LWIP_ASSERT("tcp_write: pbufs on queue => at least one queue non-empty", - pcb->unacked != NULL || pcb->unsent != NULL); + pcb->unacked != NULL || pcb->unsent != NULL); } else { LWIP_ASSERT("tcp_write: no pbufs on queue => both queues empty", - pcb->unacked == NULL && pcb->unsent == NULL); + pcb->unacked == NULL && pcb->unsent == NULL); } return ERR_OK; } @@ -355,6 +355,28 @@ tcp_write_checks(struct tcp_pcb *pcb, u16_t len) * it can send them more efficiently by combining them together). * To prompt the system to send data now, call tcp_output() after * calling tcp_write(). + * + * This function enqueues the data pointed to by the argument dataptr. The length of + * the data is passed as the len parameter. The apiflags can be one or more of: + * - TCP_WRITE_FLAG_COPY: indicates whether the new memory should be allocated + * for the data to be copied into. If this flag is not given, no new memory + * should be allocated and the data should only be referenced by pointer. This + * also means that the memory behind dataptr must not change until the data is + * ACKed by the remote host + * - TCP_WRITE_FLAG_MORE: indicates that more data follows. If this is omitted, + * the PSH flag is set in the last segment created by this call to tcp_write. + * If this flag is given, the PSH flag is not set. + * + * The tcp_write() function will fail and return ERR_MEM if the length + * of the data exceeds the current send buffer size or if the length of + * the queue of outgoing segment is larger than the upper limit defined + * in lwipopts.h. The number of bytes available in the output queue can + * be retrieved with the tcp_sndbuf() function. + * + * The proper way to use this function is to call the function with at + * most tcp_sndbuf() bytes of data. If the function returns ERR_MEM, + * the application should wait until some of the currently enqueued + * data has been successfully received by the other host and try again. * * @param pcb Protocol control block for the TCP connection to enqueue data for. * @param arg Pointer to the data to be enqueued for sending. @@ -371,7 +393,7 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL; u16_t pos = 0; /* position in 'arg' data */ u16_t queuelen; - u8_t optlen = 0; + u8_t optlen; u8_t optflags = 0; #if TCP_OVERSIZE u16_t oversize = 0; @@ -387,17 +409,23 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) u16_t concat_chksummed = 0; #endif /* TCP_CHECKSUM_ON_COPY */ err_t err; + u16_t mss_local; + + LWIP_ERROR("tcp_write: invalid pcb", pcb != NULL, return ERR_ARG); + /* don't allocate segments bigger than half the maximum window we ever received */ - u16_t mss_local = LWIP_MIN(pcb->mss, TCPWND_MIN16(pcb->snd_wnd_max/2)); + mss_local = LWIP_MIN(pcb->mss, TCPWND_MIN16(pcb->snd_wnd_max / 2)); mss_local = mss_local ? mss_local : pcb->mss; + LWIP_ASSERT_CORE_LOCKED(); + #if LWIP_NETIF_TX_SINGLE_PBUF /* Always copy to try to create single pbufs for TX */ apiflags |= TCP_WRITE_FLAG_COPY; #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_write(pcb=%p, data=%p, len=%"U16_F", apiflags=%"U16_F")\n", - (void *)pcb, arg, len, (u16_t)apiflags)); + (void *)pcb, arg, len, (u16_t)apiflags)); LWIP_ERROR("tcp_write: arg == NULL (programmer violates API)", arg != NULL, return ERR_ARG;); @@ -412,11 +440,14 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) /* Make sure the timestamp option is only included in data segments if we agreed about it with the remote host. */ optflags = TF_SEG_OPTS_TS; - optlen = LWIP_TCP_OPT_LENGTH(TF_SEG_OPTS_TS); + optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(TF_SEG_OPTS_TS, pcb); /* ensure that segments can hold at least one data byte... */ mss_local = LWIP_MAX(mss_local, LWIP_TCP_OPT_LEN_TS + 1); - } + } else #endif /* LWIP_TCP_TIMESTAMPS */ + { + optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb); + } /* @@ -451,7 +482,7 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) last_unsent = last_unsent->next); /* Usable space at the end of the last unsent segment */ - unsent_optlen = LWIP_TCP_OPT_LENGTH(last_unsent->flags); + unsent_optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(last_unsent->flags, pcb); LWIP_ASSERT("mss_local is too small", mss_local >= last_unsent->len + unsent_optlen); space = mss_local - (last_unsent->len + unsent_optlen); @@ -481,6 +512,7 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) LWIP_ASSERT("inconsistent oversize vs. len", (oversize == 0) || (pos == len)); #endif /* TCP_OVERSIZE */ +#if !LWIP_NETIF_TX_SINGLE_PBUF /* * Phase 2: Chain a new pbuf to the end of pcb->unsent. * @@ -491,6 +523,10 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) * We don't extend segments containing SYN/FIN flags or options * (len==0). The new pbuf is kept in concat_p and pbuf_cat'ed at * the end. + * + * This phase is skipped for LWIP_NETIF_TX_SINGLE_PBUF as we could only execute + * it after rexmit puts a segment from unacked to unsent and at this point, + * oversize info is lost. */ if ((pos < len) && (space > 0) && (last_unsent->len > 0)) { u16_t seglen = LWIP_MIN(space, len - pos); @@ -510,7 +546,7 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) #if TCP_OVERSIZE_DBGCHECK oversize_add = oversize; #endif /* TCP_OVERSIZE_DBGCHECK */ - TCP_DATA_COPY2(concat_p->payload, (const u8_t*)arg + pos, seglen, &concat_chksum, &concat_chksum_swapped); + TCP_DATA_COPY2(concat_p->payload, (const u8_t *)arg + pos, seglen, &concat_chksum, &concat_chksum_swapped); #if TCP_CHECKSUM_ON_COPY concat_chksummed += seglen; #endif /* TCP_CHECKSUM_ON_COPY */ @@ -520,7 +556,8 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) /* If the last unsent pbuf is of type PBUF_ROM, try to extend it. */ struct pbuf *p; for (p = last_unsent->p; p->next != NULL; p = p->next); - if (p->type == PBUF_ROM && (const u8_t *)p->payload + p->len == (const u8_t *)arg) { + if (((p->type_internal & (PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS | PBUF_TYPE_FLAG_DATA_VOLATILE)) == 0) && + (const u8_t *)p->payload + p->len == (const u8_t *)arg) { LWIP_ASSERT("tcp_write: ROM pbufs cannot be oversized", pos == 0); extendlen = seglen; } else { @@ -530,19 +567,20 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) goto memerr; } /* reference the non-volatile payload data */ - ((struct pbuf_rom*)concat_p)->payload = (const u8_t*)arg + pos; + ((struct pbuf_rom *)concat_p)->payload = (const u8_t *)arg + pos; queuelen += pbuf_clen(concat_p); } #if TCP_CHECKSUM_ON_COPY /* calculate the checksum of nocopy-data */ - tcp_seg_add_chksum(~inet_chksum((const u8_t*)arg + pos, seglen), seglen, - &concat_chksum, &concat_chksum_swapped); + tcp_seg_add_chksum(~inet_chksum((const u8_t *)arg + pos, seglen), seglen, + &concat_chksum, &concat_chksum_swapped); concat_chksummed += seglen; #endif /* TCP_CHECKSUM_ON_COPY */ } pos += seglen; } +#endif /* !LWIP_NETIF_TX_SINGLE_PBUF */ } else { #if TCP_OVERSIZE LWIP_ASSERT("unsent_oversize mismatch (pcb->unsent is NULL)", @@ -575,7 +613,7 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) } LWIP_ASSERT("tcp_write: check that first pbuf can hold the complete seglen", (p->len >= seglen)); - TCP_DATA_COPY2((char *)p->payload + optlen, (const u8_t*)arg + pos, seglen, &chksum, &chksum_swapped); + TCP_DATA_COPY2((char *)p->payload + optlen, (const u8_t *)arg + pos, seglen, &chksum, &chksum_swapped); } else { /* Copy is not set: First allocate a pbuf for holding the data. * Since the referenced data is available at least until it is @@ -592,14 +630,14 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) } #if TCP_CHECKSUM_ON_COPY /* calculate the checksum of nocopy-data */ - chksum = ~inet_chksum((const u8_t*)arg + pos, seglen); + chksum = ~inet_chksum((const u8_t *)arg + pos, seglen); if (seglen & 1) { chksum_swapped = 1; chksum = SWAP_BYTES_IN_WORD(chksum); } #endif /* TCP_CHECKSUM_ON_COPY */ /* reference the non-volatile payload data */ - ((struct pbuf_rom*)p2)->payload = (const u8_t*)arg + pos; + ((struct pbuf_rom *)p2)->payload = (const u8_t *)arg + pos; /* Second, allocate a pbuf for the headers. */ if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { @@ -618,9 +656,9 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) /* Now that there are more segments queued, we check again if the * length of the queue exceeds the configured maximum or * overflows. */ - if ((queuelen > TCP_SND_QUEUELEN) || (queuelen > TCP_SNDQUEUELEN_OVERFLOW)) { + if (queuelen > LWIP_MIN(TCP_SND_QUEUELEN, TCP_SNDQUEUELEN_OVERFLOW)) { LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_write: queue too long %"U16_F" (%d)\n", - queuelen, (int)TCP_SND_QUEUELEN)); + queuelen, (int)TCP_SND_QUEUELEN)); pbuf_free(p); goto memerr; } @@ -649,8 +687,8 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) prev_seg = seg; LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_TRACE, ("tcp_write: queueing %"U32_F":%"U32_F"\n", - lwip_ntohl(seg->tcphdr->seqno), - lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg))); + lwip_ntohl(seg->tcphdr->seqno), + lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg))); pos += seglen; } @@ -696,13 +734,13 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) */ if (concat_p != NULL) { LWIP_ASSERT("tcp_write: cannot concatenate when pcb->unsent is empty", - (last_unsent != NULL)); + (last_unsent != NULL)); pbuf_cat(last_unsent->p, concat_p); last_unsent->len += concat_p->tot_len; } else if (extendlen > 0) { struct pbuf *p; LWIP_ASSERT("tcp_write: extension of reference requires reference", - last_unsent != NULL && last_unsent->p != NULL); + last_unsent != NULL && last_unsent->p != NULL); for (p = last_unsent->p; p->next != NULL; p = p->next) { p->tot_len += extendlen; } @@ -714,13 +752,13 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) #if TCP_CHECKSUM_ON_COPY if (concat_chksummed) { LWIP_ASSERT("tcp_write: concat checksum needs concatenated data", - concat_p != NULL || extendlen > 0); + concat_p != NULL || extendlen > 0); /*if concat checksumm swapped - swap it back */ if (concat_chksum_swapped) { concat_chksum = SWAP_BYTES_IN_WORD(concat_chksum); } tcp_seg_add_chksum(concat_chksum, concat_chksummed, &last_unsent->chksum, - &last_unsent->chksum_swapped); + &last_unsent->chksum_swapped); last_unsent->flags |= TF_SEG_DATA_CHECKSUMMED; } #endif /* TCP_CHECKSUM_ON_COPY */ @@ -743,20 +781,20 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) pcb->snd_queuelen = queuelen; LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_write: %"S16_F" (after enqueued)\n", - pcb->snd_queuelen)); + pcb->snd_queuelen)); if (pcb->snd_queuelen != 0) { LWIP_ASSERT("tcp_write: valid queue length", pcb->unacked != NULL || pcb->unsent != NULL); } /* Set the PSH flag in the last segment that we enqueued. */ - if (seg != NULL && seg->tcphdr != NULL && ((apiflags & TCP_WRITE_FLAG_MORE)==0)) { + if (seg != NULL && seg->tcphdr != NULL && ((apiflags & TCP_WRITE_FLAG_MORE) == 0)) { TCPH_SET_FLAG(seg->tcphdr, TCP_PSH); } return ERR_OK; memerr: - pcb->flags |= TF_NAGLEMEMERR; + tcp_set_flags(pcb, TF_NAGLEMEMERR); TCP_STATS_INC(tcp.memerr); if (concat_p != NULL) { @@ -767,16 +805,225 @@ memerr: } if (pcb->snd_queuelen != 0) { LWIP_ASSERT("tcp_write: valid queue length", pcb->unacked != NULL || - pcb->unsent != NULL); + pcb->unsent != NULL); } LWIP_DEBUGF(TCP_QLEN_DEBUG | LWIP_DBG_STATE, ("tcp_write: %"S16_F" (with mem err)\n", pcb->snd_queuelen)); return ERR_MEM; } /** - * Enqueue TCP options for transmission. + * Split segment on the head of the unsent queue. If return is not + * ERR_OK, existing head remains intact * - * Called by tcp_connect(), tcp_listen_input(), and tcp_send_ctrl(). + * The split is accomplished by creating a new TCP segment and pbuf + * which holds the remainder payload after the split. The original + * pbuf is trimmed to new length. This allows splitting of read-only + * pbufs + * + * @param pcb the tcp_pcb for which to split the unsent head + * @param split the amount of payload to remain in the head + */ +err_t +tcp_split_unsent_seg(struct tcp_pcb *pcb, u16_t split) +{ + struct tcp_seg *seg = NULL, *useg = NULL; + struct pbuf *p = NULL; + u8_t optlen; + u8_t optflags; + u8_t split_flags; + u8_t remainder_flags; + u16_t remainder; + u16_t offset; +#if TCP_CHECKSUM_ON_COPY + u16_t chksum = 0; + u8_t chksum_swapped = 0; + struct pbuf *q; +#endif /* TCP_CHECKSUM_ON_COPY */ + + LWIP_ASSERT("tcp_split_unsent_seg: invalid pcb", pcb != NULL); + + useg = pcb->unsent; + if (useg == NULL) { + return ERR_MEM; + } + + if (split == 0) { + LWIP_ASSERT("Can't split segment into length 0", 0); + return ERR_VAL; + } + + if (useg->len <= split) { + return ERR_OK; + } + + LWIP_ASSERT("split <= mss", split <= pcb->mss); + LWIP_ASSERT("useg->len > 0", useg->len > 0); + + /* We should check that we don't exceed TCP_SND_QUEUELEN but we need + * to split this packet so we may actually exceed the max value by + * one! + */ + LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_enqueue: split_unsent_seg: %u\n", (unsigned int)pcb->snd_queuelen)); + + optflags = useg->flags; +#if TCP_CHECKSUM_ON_COPY + /* Remove since checksum is not stored until after tcp_create_segment() */ + optflags &= ~TF_SEG_DATA_CHECKSUMMED; +#endif /* TCP_CHECKSUM_ON_COPY */ + optlen = LWIP_TCP_OPT_LENGTH(optflags); + remainder = useg->len - split; + + /* Create new pbuf for the remainder of the split */ + p = pbuf_alloc(PBUF_TRANSPORT, remainder + optlen, PBUF_RAM); + if (p == NULL) { + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, + ("tcp_split_unsent_seg: could not allocate memory for pbuf remainder %u\n", remainder)); + goto memerr; + } + + /* Offset into the original pbuf is past TCP/IP headers, options, and split amount */ + offset = useg->p->tot_len - useg->len + split; + /* Copy remainder into new pbuf, headers and options will not be filled out */ + if (pbuf_copy_partial(useg->p, (u8_t *)p->payload + optlen, remainder, offset ) != remainder) { + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, + ("tcp_split_unsent_seg: could not copy pbuf remainder %u\n", remainder)); + goto memerr; + } +#if TCP_CHECKSUM_ON_COPY + /* calculate the checksum on remainder data */ + tcp_seg_add_chksum(~inet_chksum((const u8_t *)p->payload + optlen, remainder), remainder, + &chksum, &chksum_swapped); +#endif /* TCP_CHECKSUM_ON_COPY */ + + /* Options are created when calling tcp_output() */ + + /* Migrate flags from original segment */ + split_flags = TCPH_FLAGS(useg->tcphdr); + remainder_flags = 0; /* ACK added in tcp_output() */ + + if (split_flags & TCP_PSH) { + split_flags &= ~TCP_PSH; + remainder_flags |= TCP_PSH; + } + if (split_flags & TCP_FIN) { + split_flags &= ~TCP_FIN; + remainder_flags |= TCP_FIN; + } + /* SYN should be left on split, RST should not be present with data */ + + seg = tcp_create_segment(pcb, p, remainder_flags, lwip_ntohl(useg->tcphdr->seqno) + split, optflags); + if (seg == NULL) { + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, + ("tcp_split_unsent_seg: could not create new TCP segment\n")); + goto memerr; + } + +#if TCP_CHECKSUM_ON_COPY + seg->chksum = chksum; + seg->chksum_swapped = chksum_swapped; + seg->flags |= TF_SEG_DATA_CHECKSUMMED; +#endif /* TCP_CHECKSUM_ON_COPY */ + + /* Remove this segment from the queue since trimming it may free pbufs */ + pcb->snd_queuelen -= pbuf_clen(useg->p); + + /* Trim the original pbuf into our split size. At this point our remainder segment must be setup + successfully because we are modifying the original segment */ + pbuf_realloc(useg->p, useg->p->tot_len - remainder); + useg->len -= remainder; + TCPH_SET_FLAG(useg->tcphdr, split_flags); +#if TCP_OVERSIZE_DBGCHECK + /* By trimming, realloc may have actually shrunk the pbuf, so clear oversize_left */ + useg->oversize_left = 0; +#endif /* TCP_OVERSIZE_DBGCHECK */ + + /* Add back to the queue with new trimmed pbuf */ + pcb->snd_queuelen += pbuf_clen(useg->p); + +#if TCP_CHECKSUM_ON_COPY + /* The checksum on the split segment is now incorrect. We need to re-run it over the split */ + useg->chksum = 0; + useg->chksum_swapped = 0; + q = useg->p; + offset = q->tot_len - useg->len; /* Offset due to exposed headers */ + + /* Advance to the pbuf where the offset ends */ + while (q != NULL && offset > q->len) { + offset -= q->len; + q = q->next; + } + LWIP_ASSERT("Found start of payload pbuf", q != NULL); + /* Checksum the first payload pbuf accounting for offset, then other pbufs are all payload */ + for (; q != NULL; offset = 0, q = q->next) { + tcp_seg_add_chksum(~inet_chksum((const u8_t *)q->payload + offset, q->len - offset), q->len - offset, + &useg->chksum, &useg->chksum_swapped); + } +#endif /* TCP_CHECKSUM_ON_COPY */ + + /* Update number of segments on the queues. Note that length now may + * exceed TCP_SND_QUEUELEN! We don't have to touch pcb->snd_buf + * because the total amount of data is constant when packet is split */ + pcb->snd_queuelen += pbuf_clen(seg->p); + + /* Finally insert remainder into queue after split (which stays head) */ + seg->next = useg->next; + useg->next = seg; + +#if TCP_OVERSIZE + /* If remainder is last segment on the unsent, ensure we clear the oversize amount + * because the remainder is always sized to the exact remaining amount */ + if (seg->next == NULL) { + pcb->unsent_oversize = 0; + } +#endif /* TCP_OVERSIZE */ + + return ERR_OK; +memerr: + TCP_STATS_INC(tcp.memerr); + + LWIP_ASSERT("seg == NULL", seg == NULL); + if (p != NULL) { + pbuf_free(p); + } + + return ERR_MEM; +} + +/** + * Called by tcp_close() to send a segment including FIN flag but not data. + * This FIN may be added to an existing segment or a new, otherwise empty + * segment is enqueued. + * + * @param pcb the tcp_pcb over which to send a segment + * @return ERR_OK if sent, another err_t otherwise + */ +err_t +tcp_send_fin(struct tcp_pcb *pcb) +{ + LWIP_ASSERT("tcp_send_fin: invalid pcb", pcb != NULL); + + /* first, try to add the fin to the last unsent segment */ + if (pcb->unsent != NULL) { + struct tcp_seg *last_unsent; + for (last_unsent = pcb->unsent; last_unsent->next != NULL; + last_unsent = last_unsent->next); + + if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) { + /* no SYN/FIN/RST flag in the header, we can add the FIN flag */ + TCPH_SET_FLAG(last_unsent->tcphdr, TCP_FIN); + tcp_set_flags(pcb, TF_FIN); + return ERR_OK; + } + } + /* no data, no length, flags, copy=1, no optdata */ + return tcp_enqueue_flags(pcb, TCP_FIN); +} + +/** + * Enqueue SYN or FIN for transmission. + * + * Called by @ref tcp_connect, tcp_listen_input, and @ref tcp_close + * (via @ref tcp_send_fin) * * @param pcb Protocol control block for the TCP connection. * @param flags TCP header flags to set in the outgoing segment. @@ -793,17 +1040,12 @@ tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags) LWIP_ASSERT("tcp_enqueue_flags: need either TCP_SYN or TCP_FIN in flags (programmer violates API)", (flags & (TCP_SYN | TCP_FIN)) != 0); + LWIP_ASSERT("tcp_enqueue_flags: invalid pcb", pcb != NULL); - /* check for configured max queuelen and possible overflow (FIN flag should always come through!) */ - if (((pcb->snd_queuelen >= TCP_SND_QUEUELEN) || (pcb->snd_queuelen > TCP_SNDQUEUELEN_OVERFLOW)) && - ((flags & TCP_FIN) == 0)) { - LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("tcp_enqueue_flags: too long queue %"U16_F" (max %"U16_F")\n", - pcb->snd_queuelen, (u16_t)TCP_SND_QUEUELEN)); - TCP_STATS_INC(tcp.memerr); - pcb->flags |= TF_NAGLEMEMERR; - return ERR_MEM; - } + /* No need to check pcb->snd_queuelen if only SYN or FIN are allowed! */ + /* Get options for this segment. This is a special case since this is the + only place where a SYN can be sent. */ if (flags & TCP_SYN) { optflags = TF_SEG_OPTS_MSS; #if LWIP_WND_SCALE @@ -813,19 +1055,26 @@ tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags) optflags |= TF_SEG_OPTS_WND_SCALE; } #endif /* LWIP_WND_SCALE */ +#if LWIP_TCP_SACK_OUT + if ((pcb->state != SYN_RCVD) || (pcb->flags & TF_SACK)) { + /* In a (sent in state SYN_RCVD), the SACK_PERM option may only + be sent if we received a SACK_PERM option from the remote host. */ + optflags |= TF_SEG_OPTS_SACK_PERM; + } +#endif /* LWIP_TCP_SACK_OUT */ } #if LWIP_TCP_TIMESTAMPS - if ((pcb->flags & TF_TIMESTAMP)) { + if ((pcb->flags & TF_TIMESTAMP) || ((flags & TCP_SYN) && (pcb->state != SYN_RCVD))) { /* Make sure the timestamp option is only included in data segments if we - agreed about it with the remote host. */ + agreed about it with the remote host (and in active open SYN segments). */ optflags |= TF_SEG_OPTS_TS; } #endif /* LWIP_TCP_TIMESTAMPS */ - optlen = LWIP_TCP_OPT_LENGTH(optflags); + optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb); /* Allocate pbuf with room for TCP header + options */ if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { - pcb->flags |= TF_NAGLEMEMERR; + tcp_set_flags(pcb, TF_NAGLEMEMERR); TCP_STATS_INC(tcp.memerr); return ERR_MEM; } @@ -834,7 +1083,7 @@ tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags) /* Allocate memory for tcp_seg, and fill in fields. */ if ((seg = tcp_create_segment(pcb, p, flags, pcb->snd_lbb, optflags)) == NULL) { - pcb->flags |= TF_NAGLEMEMERR; + tcp_set_flags(pcb, TF_NAGLEMEMERR); TCP_STATS_INC(tcp.memerr); return ERR_MEM; } @@ -866,7 +1115,7 @@ tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags) /* optlen does not influence snd_buf */ } if (flags & TCP_FIN) { - pcb->flags |= TF_FIN; + tcp_set_flags(pcb, TF_FIN); } /* update number of segments on the queues */ @@ -874,7 +1123,7 @@ tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags) LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_enqueue_flags: %"S16_F" (after enqueued)\n", pcb->snd_queuelen)); if (pcb->snd_queuelen != 0) { LWIP_ASSERT("tcp_enqueue_flags: invalid queue length", - pcb->unacked != NULL || pcb->unsent != NULL); + pcb->unacked != NULL || pcb->unsent != NULL); } return ERR_OK; @@ -887,8 +1136,10 @@ tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags) * @param opts option pointer where to store the timestamp option */ static void -tcp_build_timestamp_option(struct tcp_pcb *pcb, u32_t *opts) +tcp_build_timestamp_option(const struct tcp_pcb *pcb, u32_t *opts) { + LWIP_ASSERT("tcp_build_timestamp_option: invalid pcb", pcb != NULL); + /* Pad with two NOP options to make everything nicely aligned */ opts[0] = PP_HTONL(0x0101080A); opts[1] = lwip_htonl(sys_now()); @@ -896,6 +1147,69 @@ tcp_build_timestamp_option(struct tcp_pcb *pcb, u32_t *opts) } #endif +#if LWIP_TCP_SACK_OUT +/** + * Calculates the number of SACK entries that should be generated. + * It takes into account whether TF_SACK flag is set, + * the number of SACK entries in tcp_pcb that are valid, + * as well as the available options size. + * + * @param pcb tcp_pcb + * @param optlen the length of other TCP options (in bytes) + * @return the number of SACK ranges that can be used + */ +static u8_t +tcp_get_num_sacks(const struct tcp_pcb *pcb, u8_t optlen) +{ + u8_t num_sacks = 0; + + LWIP_ASSERT("tcp_get_num_sacks: invalid pcb", pcb != NULL); + + if (pcb->flags & TF_SACK) { + u8_t i; + + /* The first SACK takes up 12 bytes (it includes SACK header and two NOP options), + each additional one - 8 bytes. */ + optlen += 12; + + /* Max options size = 40, number of SACK array entries = LWIP_TCP_MAX_SACK_NUM */ + for (i = 0; (i < LWIP_TCP_MAX_SACK_NUM) && (optlen <= TCP_MAX_OPTION_BYTES) && + LWIP_TCP_SACK_VALID(pcb, i); ++i) { + ++num_sacks; + optlen += 8; + } + } + + return num_sacks; +} + +/** Build a SACK option (12 or more bytes long) at the specified options pointer) + * + * @param pcb tcp_pcb + * @param opts option pointer where to store the SACK option + * @param num_sacks the number of SACKs to store + */ +static void +tcp_build_sack_option(const struct tcp_pcb *pcb, u32_t *opts, u8_t num_sacks) +{ + u8_t i; + + LWIP_ASSERT("tcp_build_sack_option: invalid pcb", pcb != NULL); + LWIP_ASSERT("tcp_build_sack_option: invalid opts", opts != NULL); + + /* Pad with two NOP options to make everything nicely aligned. + We add the length (of just the SACK option, not the NOPs in front of it), + which is 2B of header, plus 8B for each SACK. */ + *(opts++) = PP_HTONL(0x01010500 + 2 + num_sacks * 8); + + for (i = 0; i < num_sacks; ++i) { + *(opts++) = lwip_htonl(pcb->rcv_sacks[i].left); + *(opts++) = lwip_htonl(pcb->rcv_sacks[i].right); + } +} + +#endif + #if LWIP_WND_SCALE /** Build a window scale option (3 bytes long) at the specified options pointer) * @@ -904,83 +1218,13 @@ tcp_build_timestamp_option(struct tcp_pcb *pcb, u32_t *opts) static void tcp_build_wnd_scale_option(u32_t *opts) { + LWIP_ASSERT("tcp_build_wnd_scale_option: invalid opts", opts != NULL); + /* Pad with one NOP option to make everything nicely aligned */ opts[0] = PP_HTONL(0x01030300 | TCP_RCV_SCALE); } #endif -/** - * Send an ACK without data. - * - * @param pcb Protocol control block for the TCP connection to send the ACK - */ -err_t -tcp_send_empty_ack(struct tcp_pcb *pcb) -{ - err_t err; - struct pbuf *p; - u8_t optlen = 0; - struct netif *netif; -#if LWIP_TCP_TIMESTAMPS || CHECKSUM_GEN_TCP - struct tcp_hdr *tcphdr; -#endif /* LWIP_TCP_TIMESTAMPS || CHECKSUM_GEN_TCP */ - -#if LWIP_TCP_TIMESTAMPS - if (pcb->flags & TF_TIMESTAMP) { - optlen = LWIP_TCP_OPT_LENGTH(TF_SEG_OPTS_TS); - } -#endif - - p = tcp_output_alloc_header(pcb, optlen, 0, lwip_htonl(pcb->snd_nxt)); - if (p == NULL) { - /* let tcp_fasttmr retry sending this ACK */ - pcb->flags |= (TF_ACK_DELAY | TF_ACK_NOW); - LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: (ACK) could not allocate pbuf\n")); - return ERR_BUF; - } -#if LWIP_TCP_TIMESTAMPS || CHECKSUM_GEN_TCP - tcphdr = (struct tcp_hdr *)p->payload; -#endif /* LWIP_TCP_TIMESTAMPS || CHECKSUM_GEN_TCP */ - LWIP_DEBUGF(TCP_OUTPUT_DEBUG, - ("tcp_output: sending ACK for %"U32_F"\n", pcb->rcv_nxt)); - - /* NB. MSS and window scale options are only sent on SYNs, so ignore them here */ -#if LWIP_TCP_TIMESTAMPS - pcb->ts_lastacksent = pcb->rcv_nxt; - - if (pcb->flags & TF_TIMESTAMP) { - tcp_build_timestamp_option(pcb, (u32_t *)(tcphdr + 1)); - } -#endif - - netif = ip_route(&pcb->local_ip, &pcb->remote_ip); - if (netif == NULL) { - err = ERR_RTE; - } else { -#if CHECKSUM_GEN_TCP - IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_TCP) { - tcphdr->chksum = ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len, - &pcb->local_ip, &pcb->remote_ip); - } -#endif - NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); - err = ip_output_if(p, &pcb->local_ip, &pcb->remote_ip, - pcb->ttl, pcb->tos, IP_PROTO_TCP, netif); - NETIF_SET_HWADDRHINT(netif, NULL); - } - pbuf_free(p); - - if (err != ERR_OK) { - /* let tcp_fasttmr retry sending this ACK */ - pcb->flags |= (TF_ACK_DELAY | TF_ACK_NOW); - } else { - /* remove ACK flags from the PCB, as we sent an empty ACK now */ - pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); - } - - return err; -} - /** * @ingroup tcp_raw * Find out what we can send and send it @@ -1000,9 +1244,12 @@ tcp_output(struct tcp_pcb *pcb) s16_t i = 0; #endif /* TCP_CWND_DEBUG */ + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ASSERT("tcp_output: invalid pcb", pcb != NULL); /* pcb->state LISTEN not allowed here */ LWIP_ASSERT("don't call tcp_output for listen-pcbs", - pcb->state != LISTEN); + pcb->state != LISTEN); /* First, check if we are invoked by the TCP input processing code. If so, we do not output anything. Instead, we rely on the @@ -1016,25 +1263,31 @@ tcp_output(struct tcp_pcb *pcb) seg = pcb->unsent; - /* If the TF_ACK_NOW flag is set and no data will be sent (either - * because the ->unsent queue is empty or because the window does - * not allow it), construct an empty ACK segment and send it. - * - * If data is to be sent, we will just piggyback the ACK (see below). - */ - if (pcb->flags & TF_ACK_NOW && - (seg == NULL || - lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd)) { - return tcp_send_empty_ack(pcb); + if (seg == NULL) { + LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: nothing to send (%p)\n", + (void *)pcb->unsent)); + LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_output: snd_wnd %"TCPWNDSIZE_F + ", cwnd %"TCPWNDSIZE_F", wnd %"U32_F + ", seg == NULL, ack %"U32_F"\n", + pcb->snd_wnd, pcb->cwnd, wnd, pcb->lastack)); + + /* If the TF_ACK_NOW flag is set and the ->unsent queue is empty, construct + * an empty ACK segment and send it. */ + if (pcb->flags & TF_ACK_NOW) { + return tcp_send_empty_ack(pcb); + } + /* nothing to send: shortcut out of here */ + goto output_done; + } else { + LWIP_DEBUGF(TCP_CWND_DEBUG, + ("tcp_output: snd_wnd %"TCPWNDSIZE_F", cwnd %"TCPWNDSIZE_F", wnd %"U32_F + ", effwnd %"U32_F", seq %"U32_F", ack %"U32_F"\n", + pcb->snd_wnd, pcb->cwnd, wnd, + lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len, + lwip_ntohl(seg->tcphdr->seqno), pcb->lastack)); } - /* useg should point to last segment on unacked queue */ - useg = pcb->unacked; - if (useg != NULL) { - for (; useg->next != NULL; useg = useg->next); - } - - netif = ip_route(&pcb->local_ip, &pcb->remote_ip); + netif = tcp_route(pcb, &pcb->local_ip, &pcb->remote_ip); if (netif == NULL) { return ERR_RTE; } @@ -1048,45 +1301,33 @@ tcp_output(struct tcp_pcb *pcb) ip_addr_copy(pcb->local_ip, *local_ip); } -#if TCP_OUTPUT_DEBUG - if (seg == NULL) { - LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: nothing to send (%p)\n", - (void*)pcb->unsent)); - } -#endif /* TCP_OUTPUT_DEBUG */ -#if TCP_CWND_DEBUG - if (seg == NULL) { - LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_output: snd_wnd %"TCPWNDSIZE_F - ", cwnd %"TCPWNDSIZE_F", wnd %"U32_F - ", seg == NULL, ack %"U32_F"\n", - pcb->snd_wnd, pcb->cwnd, wnd, pcb->lastack)); - } else { - LWIP_DEBUGF(TCP_CWND_DEBUG, - ("tcp_output: snd_wnd %"TCPWNDSIZE_F", cwnd %"TCPWNDSIZE_F", wnd %"U32_F - ", effwnd %"U32_F", seq %"U32_F", ack %"U32_F"\n", - pcb->snd_wnd, pcb->cwnd, wnd, - lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len, - lwip_ntohl(seg->tcphdr->seqno), pcb->lastack)); - } -#endif /* TCP_CWND_DEBUG */ - /* Check if we need to start the persistent timer when the next unsent segment - * does not fit within the remaining send window and RTO timer is not running (we - * have no in-flight data). A traditional approach would fill the remaining window - * with part of the unsent segment (which will engage zero-window probing upon - * reception of the zero window update from the receiver). This ensures the - * subsequent window update is reliably received. With the goal of being lightweight, - * we avoid splitting the unsent segment and treat the window as already zero. - */ - if (seg != NULL && - lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd && - wnd > 0 && wnd == pcb->snd_wnd && pcb->unacked == NULL) { - /* Start the persist timer */ - if (pcb->persist_backoff == 0) { + /* Handle the current segment not fitting within the window */ + if (lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd) { + /* We need to start the persistent timer when the next unsent segment does not fit + * within the remaining (could be 0) send window and RTO timer is not running (we + * have no in-flight data). If window is still too small after persist timer fires, + * then we split the segment. We don't consider the congestion window since a cwnd + * smaller than 1 SMSS implies in-flight data + */ + if (wnd == pcb->snd_wnd && pcb->unacked == NULL && pcb->persist_backoff == 0) { pcb->persist_cnt = 0; pcb->persist_backoff = 1; + pcb->persist_probe = 0; + } + /* We need an ACK, but can't send data now, so send an empty ACK */ + if (pcb->flags & TF_ACK_NOW) { + return tcp_send_empty_ack(pcb); } goto output_done; } + /* Stop persist timer, above conditions are not active */ + pcb->persist_backoff = 0; + + /* useg should point to last segment on unacked queue */ + useg = pcb->unacked; + if (useg != NULL) { + for (; useg->next != NULL; useg = useg->next); + } /* data available and window allows it to be sent? */ while (seg != NULL && lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) { @@ -1100,15 +1341,15 @@ tcp_output(struct tcp_pcb *pcb) * RST is no sent using tcp_write/tcp_output. */ if ((tcp_do_output_nagle(pcb) == 0) && - ((pcb->flags & (TF_NAGLEMEMERR | TF_FIN)) == 0)) { + ((pcb->flags & (TF_NAGLEMEMERR | TF_FIN)) == 0)) { break; } #if TCP_CWND_DEBUG LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_output: snd_wnd %"TCPWNDSIZE_F", cwnd %"TCPWNDSIZE_F", wnd %"U32_F", effwnd %"U32_F", seq %"U32_F", ack %"U32_F", i %"S16_F"\n", - pcb->snd_wnd, pcb->cwnd, wnd, - lwip_ntohl(seg->tcphdr->seqno) + seg->len - - pcb->lastack, - lwip_ntohl(seg->tcphdr->seqno), pcb->lastack, i)); + pcb->snd_wnd, pcb->cwnd, wnd, + lwip_ntohl(seg->tcphdr->seqno) + seg->len - + pcb->lastack, + lwip_ntohl(seg->tcphdr->seqno), pcb->lastack, i)); ++i; #endif /* TCP_CWND_DEBUG */ @@ -1116,18 +1357,18 @@ tcp_output(struct tcp_pcb *pcb) TCPH_SET_FLAG(seg->tcphdr, TCP_ACK); } -#if TCP_OVERSIZE_DBGCHECK - seg->oversize_left = 0; -#endif /* TCP_OVERSIZE_DBGCHECK */ err = tcp_output_segment(seg, pcb, netif); if (err != ERR_OK) { /* segment could not be sent, for whatever reason */ - pcb->flags |= TF_NAGLEMEMERR; + tcp_set_flags(pcb, TF_NAGLEMEMERR); return err; } +#if TCP_OVERSIZE_DBGCHECK + seg->oversize_left = 0; +#endif /* TCP_OVERSIZE_DBGCHECK */ pcb->unsent = seg->next; if (pcb->state != SYN_SENT) { - pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); + tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); } snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg); if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { @@ -1140,7 +1381,7 @@ tcp_output(struct tcp_pcb *pcb) if (pcb->unacked == NULL) { pcb->unacked = seg; useg = seg; - /* unacked list is not empty? */ + /* unacked list is not empty? */ } else { /* In the case of fast retransmit, the packet should not go to the tail * of the unacked queue, but rather somewhere before it. We need to check for @@ -1149,8 +1390,8 @@ tcp_output(struct tcp_pcb *pcb) /* add segment to before tail of unacked list, keeping the list sorted */ struct tcp_seg **cur_seg = &(pcb->unacked); while (*cur_seg && - TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { - cur_seg = &((*cur_seg)->next ); + TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { + cur_seg = &((*cur_seg)->next ); } seg->next = (*cur_seg); (*cur_seg) = seg; @@ -1160,13 +1401,12 @@ tcp_output(struct tcp_pcb *pcb) useg = useg->next; } } - /* do not queue empty segments on the unacked list */ + /* do not queue empty segments on the unacked list */ } else { tcp_seg_free(seg); } seg = pcb->unsent; } -output_done: #if TCP_OVERSIZE if (pcb->unsent == NULL) { /* last unsent has been removed, reset unsent_oversize */ @@ -1174,10 +1414,36 @@ output_done: } #endif /* TCP_OVERSIZE */ - pcb->flags &= ~TF_NAGLEMEMERR; +output_done: + tcp_clear_flags(pcb, TF_NAGLEMEMERR); return ERR_OK; } +/** Check if a segment's pbufs are used by someone else than TCP. + * This can happen on retransmission if the pbuf of this segment is still + * referenced by the netif driver due to deferred transmission. + * This is the case (only!) if someone down the TX call path called + * pbuf_ref() on one of the pbufs! + * + * @arg seg the tcp segment to check + * @return 1 if ref != 1, 0 if ref == 1 + */ +static int +tcp_output_segment_busy(const struct tcp_seg *seg) +{ + LWIP_ASSERT("tcp_output_segment_busy: invalid seg", seg != NULL); + + /* We only need to check the first pbuf here: + If a pbuf is queued for transmission, a driver calls pbuf_ref(), + which only changes the ref count of the first pbuf */ + if (seg->p->ref != 1) { + /* other reference found */ + return 1; + } + /* no other references found */ + return 0; +} + /** * Called by tcp_output() to actually send a TCP segment over IP. * @@ -1191,11 +1457,18 @@ tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb, struct netif *netif err_t err; u16_t len; u32_t *opts; +#if TCP_CHECKSUM_ON_COPY + int seg_chksum_was_swapped = 0; +#endif - if (seg->p->ref != 1) { - /* This can happen if the pbuf of this segment is still referenced by the - netif driver due to deferred transmission. Since this function modifies - p->len, we must not continue in this case. */ + LWIP_ASSERT("tcp_output_segment: invalid seg", seg != NULL); + LWIP_ASSERT("tcp_output_segment: invalid pcb", pcb != NULL); + LWIP_ASSERT("tcp_output_segment: invalid netif", netif != NULL); + + if (tcp_output_segment_busy(seg)) { + /* This should not happen: rexmit functions should have checked this. + However, since this function modifies p->len, we must not continue in this case. */ + LWIP_DEBUGF(TCP_RTO_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_output_segment: segment busy\n")); return ERR_OK; } @@ -1224,7 +1497,7 @@ tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb, struct netif *netif if (seg->flags & TF_SEG_OPTS_MSS) { u16_t mss; #if TCP_CALCULATE_EFF_SEND_MSS - mss = tcp_eff_send_mss(TCP_MSS, &pcb->local_ip, &pcb->remote_ip); + mss = tcp_eff_send_mss_netif(TCP_MSS, netif, &pcb->remote_ip); #else /* TCP_CALCULATE_EFF_SEND_MSS */ mss = TCP_MSS; #endif /* TCP_CALCULATE_EFF_SEND_MSS */ @@ -1245,6 +1518,16 @@ tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb, struct netif *netif opts += 1; } #endif +#if LWIP_TCP_SACK_OUT + if (seg->flags & TF_SEG_OPTS_SACK_PERM) { + /* Pad with two NOP options to make everything nicely aligned + * NOTE: When we send both timestamp and SACK_PERM options, + * we could use the first two NOPs before the timestamp to store SACK_PERM option, + * but that would complicate the code. + */ + *(opts++) = PP_HTONL(0x01010402); + } +#endif /* Set retransmission timer running if it is not currently enabled This must be set before checking the route. */ @@ -1259,8 +1542,8 @@ tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb, struct netif *netif LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_output_segment: rtseq %"U32_F"\n", pcb->rtseq)); } LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output_segment: %"U32_F":%"U32_F"\n", - lwip_htonl(seg->tcphdr->seqno), lwip_htonl(seg->tcphdr->seqno) + - seg->len)); + lwip_htonl(seg->tcphdr->seqno), lwip_htonl(seg->tcphdr->seqno) + + seg->len)); len = (u16_t)((u8_t *)seg->tcphdr - (u8_t *)seg->p->payload); if (len == 0) { @@ -1274,120 +1557,69 @@ tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb, struct netif *netif seg->p->payload = seg->tcphdr; seg->tcphdr->chksum = 0; + +#ifdef LWIP_HOOK_TCP_OUT_ADD_TCPOPTS + opts = LWIP_HOOK_TCP_OUT_ADD_TCPOPTS(seg->p, seg->tcphdr, pcb, opts); +#endif + LWIP_ASSERT("options not filled", (u8_t *)opts == ((u8_t *)(seg->tcphdr + 1)) + LWIP_TCP_OPT_LENGTH_SEGMENT(seg->flags, pcb)); + #if CHECKSUM_GEN_TCP IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_TCP) { #if TCP_CHECKSUM_ON_COPY u32_t acc; #if TCP_CHECKSUM_ON_COPY_SANITY_CHECK u16_t chksum_slow = ip_chksum_pseudo(seg->p, IP_PROTO_TCP, - seg->p->tot_len, &pcb->local_ip, &pcb->remote_ip); + seg->p->tot_len, &pcb->local_ip, &pcb->remote_ip); #endif /* TCP_CHECKSUM_ON_COPY_SANITY_CHECK */ if ((seg->flags & TF_SEG_DATA_CHECKSUMMED) == 0) { LWIP_ASSERT("data included but not checksummed", - seg->p->tot_len == (TCPH_HDRLEN(seg->tcphdr) * 4)); + seg->p->tot_len == TCPH_HDRLEN_BYTES(seg->tcphdr)); } /* rebuild TCP header checksum (TCP header changes for retransmissions!) */ acc = ip_chksum_pseudo_partial(seg->p, IP_PROTO_TCP, - seg->p->tot_len, TCPH_HDRLEN(seg->tcphdr) * 4, &pcb->local_ip, &pcb->remote_ip); + seg->p->tot_len, TCPH_HDRLEN_BYTES(seg->tcphdr), &pcb->local_ip, &pcb->remote_ip); /* add payload checksum */ if (seg->chksum_swapped) { + seg_chksum_was_swapped = 1; seg->chksum = SWAP_BYTES_IN_WORD(seg->chksum); seg->chksum_swapped = 0; } - acc += (u16_t)~(seg->chksum); - seg->tcphdr->chksum = FOLD_U32T(acc); + acc = (u16_t)~acc + seg->chksum; + seg->tcphdr->chksum = (u16_t)~FOLD_U32T(acc); #if TCP_CHECKSUM_ON_COPY_SANITY_CHECK if (chksum_slow != seg->tcphdr->chksum) { TCP_CHECKSUM_ON_COPY_SANITY_CHECK_FAIL( - ("tcp_output_segment: calculated checksum is %"X16_F" instead of %"X16_F"\n", - seg->tcphdr->chksum, chksum_slow)); + ("tcp_output_segment: calculated checksum is %"X16_F" instead of %"X16_F"\n", + seg->tcphdr->chksum, chksum_slow)); seg->tcphdr->chksum = chksum_slow; } #endif /* TCP_CHECKSUM_ON_COPY_SANITY_CHECK */ #else /* TCP_CHECKSUM_ON_COPY */ seg->tcphdr->chksum = ip_chksum_pseudo(seg->p, IP_PROTO_TCP, - seg->p->tot_len, &pcb->local_ip, &pcb->remote_ip); + seg->p->tot_len, &pcb->local_ip, &pcb->remote_ip); #endif /* TCP_CHECKSUM_ON_COPY */ } #endif /* CHECKSUM_GEN_TCP */ TCP_STATS_INC(tcp.xmit); - NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); + NETIF_SET_HINTS(netif, &(pcb->netif_hints)); err = ip_output_if(seg->p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, - pcb->tos, IP_PROTO_TCP, netif); - NETIF_SET_HWADDRHINT(netif, NULL); + pcb->tos, IP_PROTO_TCP, netif); + NETIF_RESET_HINTS(netif); + +#if TCP_CHECKSUM_ON_COPY + if (seg_chksum_was_swapped) { + /* if data is added to this segment later, chksum needs to be swapped, + so restore this now */ + seg->chksum = SWAP_BYTES_IN_WORD(seg->chksum); + seg->chksum_swapped = 1; + } +#endif + return err; } -/** - * Send a TCP RESET packet (empty segment with RST flag set) either to - * abort a connection or to show that there is no matching local connection - * for a received segment. - * - * Called by tcp_abort() (to abort a local connection), tcp_input() (if no - * matching local pcb was found), tcp_listen_input() (if incoming segment - * has ACK flag set) and tcp_process() (received segment in the wrong state) - * - * Since a RST segment is in most cases not sent for an active connection, - * tcp_rst() has a number of arguments that are taken from a tcp_pcb for - * most other segment output functions. - * - * @param seqno the sequence number to use for the outgoing segment - * @param ackno the acknowledge number to use for the outgoing segment - * @param local_ip the local IP address to send the segment from - * @param remote_ip the remote IP address to send the segment to - * @param local_port the local TCP port to send the segment from - * @param remote_port the remote TCP port to send the segment to - */ -void -tcp_rst(u32_t seqno, u32_t ackno, - const ip_addr_t *local_ip, const ip_addr_t *remote_ip, - u16_t local_port, u16_t remote_port) -{ - struct pbuf *p; - struct tcp_hdr *tcphdr; - struct netif *netif; - p = pbuf_alloc(PBUF_IP, TCP_HLEN, PBUF_RAM); - if (p == NULL) { - LWIP_DEBUGF(TCP_DEBUG, ("tcp_rst: could not allocate memory for pbuf\n")); - return; - } - LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", - (p->len >= sizeof(struct tcp_hdr))); - - tcphdr = (struct tcp_hdr *)p->payload; - tcphdr->src = lwip_htons(local_port); - tcphdr->dest = lwip_htons(remote_port); - tcphdr->seqno = lwip_htonl(seqno); - tcphdr->ackno = lwip_htonl(ackno); - TCPH_HDRLEN_FLAGS_SET(tcphdr, TCP_HLEN/4, TCP_RST | TCP_ACK); -#if LWIP_WND_SCALE - tcphdr->wnd = PP_HTONS(((TCP_WND >> TCP_RCV_SCALE) & 0xFFFF)); -#else - tcphdr->wnd = PP_HTONS(TCP_WND); -#endif - tcphdr->chksum = 0; - tcphdr->urgp = 0; - - TCP_STATS_INC(tcp.xmit); - MIB2_STATS_INC(mib2.tcpoutrsts); - - netif = ip_route(local_ip, remote_ip); - if (netif != NULL) { -#if CHECKSUM_GEN_TCP - IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_TCP) { - tcphdr->chksum = ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len, - local_ip, remote_ip); - } -#endif - /* Send output with hardcoded TTL/HL since we have no access to the pcb */ - ip_output_if(p, local_ip, remote_ip, TCP_TTL, 0, IP_PROTO_TCP, netif); - } - pbuf_free(p); - LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno)); -} - /** * Requeue all unacked segments for retransmission * @@ -1395,17 +1627,31 @@ tcp_rst(u32_t seqno, u32_t ackno, * * @param pcb the tcp_pcb for which to re-enqueue all unacked segments */ -void -tcp_rexmit_rto(struct tcp_pcb *pcb) +err_t +tcp_rexmit_rto_prepare(struct tcp_pcb *pcb) { struct tcp_seg *seg; + LWIP_ASSERT("tcp_rexmit_rto_prepare: invalid pcb", pcb != NULL); + if (pcb->unacked == NULL) { - return; + return ERR_VAL; } - /* Move all unacked segments to the head of the unsent queue */ - for (seg = pcb->unacked; seg->next != NULL; seg = seg->next); + /* Move all unacked segments to the head of the unsent queue. + However, give up if any of the unsent pbufs are still referenced by the + netif driver due to deferred transmission. No point loading the link further + if it is struggling to flush its buffered writes. */ + for (seg = pcb->unacked; seg->next != NULL; seg = seg->next) { + if (tcp_output_segment_busy(seg)) { + LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit_rto: segment busy\n")); + return ERR_VAL; + } + } + if (tcp_output_segment_busy(seg)) { + LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit_rto: segment busy\n")); + return ERR_VAL; + } /* concatenate unsent queue after unacked queue */ seg->next = pcb->unsent; #if TCP_OVERSIZE_DBGCHECK @@ -1419,18 +1665,54 @@ tcp_rexmit_rto(struct tcp_pcb *pcb) /* unacked queue is now empty */ pcb->unacked = NULL; + /* Mark RTO in-progress */ + tcp_set_flags(pcb, TF_RTO); + /* Record the next byte following retransmit */ + pcb->rto_end = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg); + /* Don't take any RTT measurements after retransmitting. */ + pcb->rttest = 0; + + return ERR_OK; +} + +/** + * Requeue all unacked segments for retransmission + * + * Called by tcp_slowtmr() for slow retransmission. + * + * @param pcb the tcp_pcb for which to re-enqueue all unacked segments + */ +void +tcp_rexmit_rto_commit(struct tcp_pcb *pcb) +{ + LWIP_ASSERT("tcp_rexmit_rto_commit: invalid pcb", pcb != NULL); + /* increment number of retransmissions */ if (pcb->nrtx < 0xFF) { ++pcb->nrtx; } - - /* Don't take any RTT measurements after retransmitting. */ - pcb->rttest = 0; - /* Do the actual retransmission */ tcp_output(pcb); } +/** + * Requeue all unacked segments for retransmission + * + * Called by tcp_process() only, tcp_slowtmr() needs to do some things between + * "prepare" and "commit". + * + * @param pcb the tcp_pcb for which to re-enqueue all unacked segments + */ +void +tcp_rexmit_rto(struct tcp_pcb *pcb) +{ + LWIP_ASSERT("tcp_rexmit_rto: invalid pcb", pcb != NULL); + + if (tcp_rexmit_rto_prepare(pcb) == ERR_OK) { + tcp_rexmit_rto_commit(pcb); + } +} + /** * Requeue the first unacked segment for retransmission * @@ -1438,25 +1720,35 @@ tcp_rexmit_rto(struct tcp_pcb *pcb) * * @param pcb the tcp_pcb for which to retransmit the first unacked segment */ -void +err_t tcp_rexmit(struct tcp_pcb *pcb) { struct tcp_seg *seg; struct tcp_seg **cur_seg; + LWIP_ASSERT("tcp_rexmit: invalid pcb", pcb != NULL); + if (pcb->unacked == NULL) { - return; + return ERR_VAL; + } + + seg = pcb->unacked; + + /* Give up if the segment is still referenced by the netif driver + due to deferred transmission. */ + if (tcp_output_segment_busy(seg)) { + LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit busy\n")); + return ERR_VAL; } /* Move the first unacked segment to the unsent queue */ /* Keep the unsent queue sorted. */ - seg = pcb->unacked; pcb->unacked = seg->next; cur_seg = &(pcb->unsent); while (*cur_seg && - TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { - cur_seg = &((*cur_seg)->next ); + TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { + cur_seg = &((*cur_seg)->next ); } seg->next = *cur_seg; *cur_seg = seg; @@ -1478,6 +1770,7 @@ tcp_rexmit(struct tcp_pcb *pcb) MIB2_STATS_INC(mib2.tcpretranssegs); /* No need to call tcp_output: we are always called from tcp_input() and thus tcp_output directly returns. */ + return ERR_OK; } @@ -1489,6 +1782,8 @@ tcp_rexmit(struct tcp_pcb *pcb) void tcp_rexmit_fast(struct tcp_pcb *pcb) { + LWIP_ASSERT("tcp_rexmit_fast: invalid pcb", pcb != NULL); + if (pcb->unacked != NULL && !(pcb->flags & TF_INFR)) { /* This is fast retransmit. Retransmit the first unacked segment. */ LWIP_DEBUGF(TCP_FR_DEBUG, @@ -1496,29 +1791,280 @@ tcp_rexmit_fast(struct tcp_pcb *pcb) "), fast retransmit %"U32_F"\n", (u16_t)pcb->dupacks, pcb->lastack, lwip_ntohl(pcb->unacked->tcphdr->seqno))); - tcp_rexmit(pcb); + if (tcp_rexmit(pcb) == ERR_OK) { + /* Set ssthresh to half of the minimum of the current + * cwnd and the advertised window */ + pcb->ssthresh = LWIP_MIN(pcb->cwnd, pcb->snd_wnd) / 2; - /* Set ssthresh to half of the minimum of the current - * cwnd and the advertised window */ - pcb->ssthresh = LWIP_MIN(pcb->cwnd, pcb->snd_wnd) / 2; + /* The minimum value for ssthresh should be 2 MSS */ + if (pcb->ssthresh < (2U * pcb->mss)) { + LWIP_DEBUGF(TCP_FR_DEBUG, + ("tcp_receive: The minimum value for ssthresh %"TCPWNDSIZE_F + " should be min 2 mss %"U16_F"...\n", + pcb->ssthresh, (u16_t)(2 * pcb->mss))); + pcb->ssthresh = 2 * pcb->mss; + } - /* The minimum value for ssthresh should be 2 MSS */ - if (pcb->ssthresh < (2U * pcb->mss)) { - LWIP_DEBUGF(TCP_FR_DEBUG, - ("tcp_receive: The minimum value for ssthresh %"TCPWNDSIZE_F - " should be min 2 mss %"U16_F"...\n", - pcb->ssthresh, (u16_t)(2*pcb->mss))); - pcb->ssthresh = 2*pcb->mss; + pcb->cwnd = pcb->ssthresh + 3 * pcb->mss; + tcp_set_flags(pcb, TF_INFR); + + /* Reset the retransmission timer to prevent immediate rto retransmissions */ + pcb->rtime = 0; } - - pcb->cwnd = pcb->ssthresh + 3 * pcb->mss; - pcb->flags |= TF_INFR; - - /* Reset the retransmission timer to prevent immediate rto retransmissions */ - pcb->rtime = 0; } } +static struct pbuf * +tcp_output_alloc_header_common(u32_t ackno, u16_t optlen, u16_t datalen, + u32_t seqno_be /* already in network byte order */, + u16_t src_port, u16_t dst_port, u8_t flags, u16_t wnd) +{ + struct tcp_hdr *tcphdr; + struct pbuf *p; + + p = pbuf_alloc(PBUF_IP, TCP_HLEN + optlen + datalen, PBUF_RAM); + if (p != NULL) { + LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", + (p->len >= TCP_HLEN + optlen)); + tcphdr = (struct tcp_hdr *)p->payload; + tcphdr->src = lwip_htons(src_port); + tcphdr->dest = lwip_htons(dst_port); + tcphdr->seqno = seqno_be; + tcphdr->ackno = lwip_htonl(ackno); + TCPH_HDRLEN_FLAGS_SET(tcphdr, (5 + optlen / 4), flags); + tcphdr->wnd = lwip_htons(wnd); + tcphdr->chksum = 0; + tcphdr->urgp = 0; + } + return p; +} + +/** Allocate a pbuf and create a tcphdr at p->payload, used for output + * functions other than the default tcp_output -> tcp_output_segment + * (e.g. tcp_send_empty_ack, etc.) + * + * @param pcb tcp pcb for which to send a packet (used to initialize tcp_hdr) + * @param optlen length of header-options + * @param datalen length of tcp data to reserve in pbuf + * @param seqno_be seqno in network byte order (big-endian) + * @return pbuf with p->payload being the tcp_hdr + */ +static struct pbuf * +tcp_output_alloc_header(struct tcp_pcb *pcb, u16_t optlen, u16_t datalen, + u32_t seqno_be /* already in network byte order */) +{ + struct pbuf *p; + + LWIP_ASSERT("tcp_output_alloc_header: invalid pcb", pcb != NULL); + + p = tcp_output_alloc_header_common(pcb->rcv_nxt, optlen, datalen, + seqno_be, pcb->local_port, pcb->remote_port, TCP_ACK, + TCPWND_MIN16(RCV_WND_SCALE(pcb, pcb->rcv_ann_wnd))); + if (p != NULL) { + /* If we're sending a packet, update the announced right window edge */ + pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; + } + return p; +} + +/* Fill in options for control segments */ +static void +tcp_output_fill_options(const struct tcp_pcb *pcb, struct pbuf *p, u8_t optflags, u8_t num_sacks) +{ + struct tcp_hdr *tcphdr; + u32_t *opts; + u16_t sacks_len = 0; + + LWIP_ASSERT("tcp_output_fill_options: invalid pbuf", p != NULL); + + tcphdr = (struct tcp_hdr *)p->payload; + opts = (u32_t *)(void *)(tcphdr + 1); + + /* NB. MSS and window scale options are only sent on SYNs, so ignore them here */ + +#if LWIP_TCP_TIMESTAMPS + if (optflags & TF_SEG_OPTS_TS) { + tcp_build_timestamp_option(pcb, opts); + opts += 3; + } +#endif + +#if LWIP_TCP_SACK_OUT + if (pcb && (num_sacks > 0)) { + tcp_build_sack_option(pcb, opts, num_sacks); + /* 1 word for SACKs header (including 2xNOP), and 2 words for each SACK */ + sacks_len = 1 + num_sacks * 2; + opts += sacks_len; + } +#else + LWIP_UNUSED_ARG(num_sacks); +#endif + +#ifdef LWIP_HOOK_TCP_OUT_ADD_TCPOPTS + opts = LWIP_HOOK_TCP_OUT_ADD_TCPOPTS(p, tcphdr, pcb, opts); +#endif + + LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(sacks_len); + LWIP_ASSERT("options not filled", (u8_t *)opts == ((u8_t *)(tcphdr + 1)) + sacks_len * 4 + LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb)); + LWIP_UNUSED_ARG(optflags); /* for LWIP_NOASSERT */ + LWIP_UNUSED_ARG(opts); /* for LWIP_NOASSERT */ +} + +/** Output a control segment pbuf to IP. + * + * Called from tcp_rst, tcp_send_empty_ack, tcp_keepalive and tcp_zero_window_probe, + * this function combines selecting a netif for transmission, generating the tcp + * header checksum and calling ip_output_if while handling netif hints and stats. + */ +static err_t +tcp_output_control_segment(const struct tcp_pcb *pcb, struct pbuf *p, + const ip_addr_t *src, const ip_addr_t *dst) +{ + err_t err; + struct netif *netif; + + LWIP_ASSERT("tcp_output_control_segment: invalid pbuf", p != NULL); + + netif = tcp_route(pcb, src, dst); + if (netif == NULL) { + err = ERR_RTE; + } else { + u8_t ttl, tos; +#if CHECKSUM_GEN_TCP + IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_TCP) { + struct tcp_hdr *tcphdr = (struct tcp_hdr *)p->payload; + tcphdr->chksum = ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len, + src, dst); + } +#endif + if (pcb != NULL) { + NETIF_SET_HINTS(netif, LWIP_CONST_CAST(struct netif_hint*, &(pcb->netif_hints))); + ttl = pcb->ttl; + tos = pcb->tos; + } else { + /* Send output with hardcoded TTL/HL since we have no access to the pcb */ + ttl = TCP_TTL; + tos = 0; + } + TCP_STATS_INC(tcp.xmit); + err = ip_output_if(p, src, dst, ttl, tos, IP_PROTO_TCP, netif); + NETIF_RESET_HINTS(netif); + } + pbuf_free(p); + return err; +} + +/** + * Send a TCP RESET packet (empty segment with RST flag set) either to + * abort a connection or to show that there is no matching local connection + * for a received segment. + * + * Called by tcp_abort() (to abort a local connection), tcp_input() (if no + * matching local pcb was found), tcp_listen_input() (if incoming segment + * has ACK flag set) and tcp_process() (received segment in the wrong state) + * + * Since a RST segment is in most cases not sent for an active connection, + * tcp_rst() has a number of arguments that are taken from a tcp_pcb for + * most other segment output functions. + * + * @param pcb TCP pcb (may be NULL if no pcb is available) + * @param seqno the sequence number to use for the outgoing segment + * @param ackno the acknowledge number to use for the outgoing segment + * @param local_ip the local IP address to send the segment from + * @param remote_ip the remote IP address to send the segment to + * @param local_port the local TCP port to send the segment from + * @param remote_port the remote TCP port to send the segment to + */ +void +tcp_rst(const struct tcp_pcb *pcb, u32_t seqno, u32_t ackno, + const ip_addr_t *local_ip, const ip_addr_t *remote_ip, + u16_t local_port, u16_t remote_port) +{ + struct pbuf *p; + u16_t wnd; + u8_t optlen; + + LWIP_ASSERT("tcp_rst: invalid local_ip", local_ip != NULL); + LWIP_ASSERT("tcp_rst: invalid remote_ip", remote_ip != NULL); + + optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb); + +#if LWIP_WND_SCALE + wnd = PP_HTONS(((TCP_WND >> TCP_RCV_SCALE) & 0xFFFF)); +#else + wnd = PP_HTONS(TCP_WND); +#endif + + p = tcp_output_alloc_header_common(ackno, optlen, 0, lwip_htonl(seqno), local_port, + remote_port, TCP_RST | TCP_ACK, wnd); + if (p == NULL) { + LWIP_DEBUGF(TCP_DEBUG, ("tcp_rst: could not allocate memory for pbuf\n")); + return; + } + tcp_output_fill_options(pcb, p, 0, optlen); + + MIB2_STATS_INC(mib2.tcpoutrsts); + + tcp_output_control_segment(pcb, p, local_ip, remote_ip); + LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno)); +} + +/** + * Send an ACK without data. + * + * @param pcb Protocol control block for the TCP connection to send the ACK + */ +err_t +tcp_send_empty_ack(struct tcp_pcb *pcb) +{ + err_t err; + struct pbuf *p; + u8_t optlen, optflags = 0; + u8_t num_sacks = 0; + + LWIP_ASSERT("tcp_send_empty_ack: invalid pcb", pcb != NULL); + +#if LWIP_TCP_TIMESTAMPS + if (pcb->flags & TF_TIMESTAMP) { + optflags = TF_SEG_OPTS_TS; + } +#endif + optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb); + +#if LWIP_TCP_SACK_OUT + /* For now, SACKs are only sent with empty ACKs */ + if ((num_sacks = tcp_get_num_sacks(pcb, optlen)) > 0) { + optlen += 4 + num_sacks * 8; /* 4 bytes for header (including 2*NOP), plus 8B for each SACK */ + } +#endif + + p = tcp_output_alloc_header(pcb, optlen, 0, lwip_htonl(pcb->snd_nxt)); + if (p == NULL) { + /* let tcp_fasttmr retry sending this ACK */ + tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); + LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: (ACK) could not allocate pbuf\n")); + return ERR_BUF; + } + tcp_output_fill_options(pcb, p, optflags, num_sacks); + +#if LWIP_TCP_TIMESTAMPS + pcb->ts_lastacksent = pcb->rcv_nxt; +#endif + + LWIP_DEBUGF(TCP_OUTPUT_DEBUG, + ("tcp_output: sending ACK for %"U32_F"\n", pcb->rcv_nxt)); + err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip); + if (err != ERR_OK) { + /* let tcp_fasttmr retry sending this ACK */ + tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); + } else { + /* remove ACK flags from the PCB, as we sent an empty ACK now */ + tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); + } + + return err; +} /** * Send keepalive packets to keep a connection active although @@ -1533,47 +2079,31 @@ tcp_keepalive(struct tcp_pcb *pcb) { err_t err; struct pbuf *p; - struct netif *netif; + u8_t optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb); + + LWIP_ASSERT("tcp_keepalive: invalid pcb", pcb != NULL); LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: sending KEEPALIVE probe to ")); - ip_addr_debug_print(TCP_DEBUG, &pcb->remote_ip); + ip_addr_debug_print_val(TCP_DEBUG, pcb->remote_ip); LWIP_DEBUGF(TCP_DEBUG, ("\n")); LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: tcp_ticks %"U32_F" pcb->tmr %"U32_F" pcb->keep_cnt_sent %"U16_F"\n", tcp_ticks, pcb->tmr, (u16_t)pcb->keep_cnt_sent)); - p = tcp_output_alloc_header(pcb, 0, 0, lwip_htonl(pcb->snd_nxt - 1)); + p = tcp_output_alloc_header(pcb, optlen, 0, lwip_htonl(pcb->snd_nxt - 1)); if (p == NULL) { LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: could not allocate memory for pbuf\n")); return ERR_MEM; } - netif = ip_route(&pcb->local_ip, &pcb->remote_ip); - if (netif == NULL) { - err = ERR_RTE; - } else { -#if CHECKSUM_GEN_TCP - IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_TCP) { - struct tcp_hdr *tcphdr = (struct tcp_hdr *)p->payload; - tcphdr->chksum = ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len, - &pcb->local_ip, &pcb->remote_ip); - } -#endif /* CHECKSUM_GEN_TCP */ - TCP_STATS_INC(tcp.xmit); - - /* Send output to IP */ - NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); - err = ip_output_if(p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, 0, IP_PROTO_TCP, netif); - NETIF_SET_HWADDRHINT(netif, NULL); - } - pbuf_free(p); + tcp_output_fill_options(pcb, p, 0, optlen); + err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip); LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: seqno %"U32_F" ackno %"U32_F" err %d.\n", pcb->snd_nxt - 1, pcb->rcv_nxt, (int)err)); return err; } - /** * Send persist timer zero-window probes to keep a connection active * when a window update is lost. @@ -1592,10 +2122,12 @@ tcp_zero_window_probe(struct tcp_pcb *pcb) u16_t len; u8_t is_fin; u32_t snd_nxt; - struct netif *netif; + u8_t optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb); + + LWIP_ASSERT("tcp_zero_window_probe: invalid pcb", pcb != NULL); LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: sending ZERO WINDOW probe to ")); - ip_addr_debug_print(TCP_DEBUG, &pcb->remote_ip); + ip_addr_debug_print_val(TCP_DEBUG, pcb->remote_ip); LWIP_DEBUGF(TCP_DEBUG, ("\n")); LWIP_DEBUGF(TCP_DEBUG, @@ -1603,21 +2135,26 @@ tcp_zero_window_probe(struct tcp_pcb *pcb) " pcb->tmr %"U32_F" pcb->keep_cnt_sent %"U16_F"\n", tcp_ticks, pcb->tmr, (u16_t)pcb->keep_cnt_sent)); - seg = pcb->unacked; - + /* Only consider unsent, persist timer should be off when there is data in-flight */ + seg = pcb->unsent; if (seg == NULL) { - seg = pcb->unsent; - } - if (seg == NULL) { - /* nothing to send, zero window probe not needed */ + /* Not expected, persist timer should be off when the send buffer is empty */ return ERR_OK; } + /* increment probe count. NOTE: we record probe even if it fails + to actually transmit due to an error. This ensures memory exhaustion/ + routing problem doesn't leave a zero-window pcb as an indefinite zombie. + RTO mechanism has similar behavior, see pcb->nrtx */ + if (pcb->persist_probe < 0xFF) { + ++pcb->persist_probe; + } + is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0); /* we want to send one seqno: either FIN or data (no options) */ len = is_fin ? 0 : 1; - p = tcp_output_alloc_header(pcb, 0, len, seg->tcphdr->seqno); + p = tcp_output_alloc_header(pcb, optlen, len, seg->tcphdr->seqno); if (p == NULL) { LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: no memory for pbuf\n")); return ERR_MEM; @@ -1641,27 +2178,9 @@ tcp_zero_window_probe(struct tcp_pcb *pcb) if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { pcb->snd_nxt = snd_nxt; } + tcp_output_fill_options(pcb, p, 0, optlen); - netif = ip_route(&pcb->local_ip, &pcb->remote_ip); - if (netif == NULL) { - err = ERR_RTE; - } else { -#if CHECKSUM_GEN_TCP - IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_TCP) { - tcphdr->chksum = ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len, - &pcb->local_ip, &pcb->remote_ip); - } -#endif - TCP_STATS_INC(tcp.xmit); - - /* Send output to IP */ - NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); - err = ip_output_if(p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, - 0, IP_PROTO_TCP, netif); - NETIF_SET_HWADDRHINT(netif, NULL); - } - - pbuf_free(p); + err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip); LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: seqno %"U32_F " ackno %"U32_F" err %d.\n", diff --git a/Libraries/LwIP/src/core/timeouts.c b/Libraries/LwIP/src/core/timeouts.c index 5c9b29d..c3431e8 100755 --- a/Libraries/LwIP/src/core/timeouts.c +++ b/Libraries/LwIP/src/core/timeouts.c @@ -57,6 +57,7 @@ #include "lwip/nd6.h" #include "lwip/ip6_frag.h" #include "lwip/mld6.h" +#include "lwip/dhcp6.h" #include "lwip/sys.h" #include "lwip/pbuf.h" @@ -66,6 +67,11 @@ #define HANDLER(x) x #endif /* LWIP_DEBUG_TIMERNAMES */ +#define LWIP_MAX_TIMEOUT 0x7fffffff + +/* Check if timer's expiry time is greater than time and care about u32_t wraparounds */ +#define TIME_LESS_THAN(t, compare_to) ( (((u32_t)((t)-(compare_to))) > LWIP_MAX_TIMEOUT) ? 1 : 0 ) + /** This array contains all stack-internal cyclic timers. To get the number of * timers, use LWIP_ARRAYSIZE() */ const struct lwip_cyclic_timer lwip_cyclic_timers[] = { @@ -103,14 +109,27 @@ const struct lwip_cyclic_timer lwip_cyclic_timers[] = { #if LWIP_IPV6_MLD {MLD6_TMR_INTERVAL, HANDLER(mld6_tmr)}, #endif /* LWIP_IPV6_MLD */ +#if LWIP_IPV6_DHCP6 + {DHCP6_TIMER_MSECS, HANDLER(dhcp6_tmr)}, +#endif /* LWIP_IPV6_DHCP6 */ #endif /* LWIP_IPV6 */ }; +const int lwip_num_cyclic_timers = LWIP_ARRAYSIZE(lwip_cyclic_timers); #if LWIP_TIMERS && !LWIP_TIMERS_CUSTOM /** The one and only timeout list */ static struct sys_timeo *next_timeout; -static u32_t timeouts_last_time; + +static u32_t current_timeout_due_time; + +#if LWIP_TESTMODE +struct sys_timeo** +sys_timeouts_get_next_timeout(void) +{ + return &next_timeout; +} +#endif #if LWIP_TCP /** global variable that shows if the tcp timer is currently scheduled or not */ @@ -146,6 +165,8 @@ tcpip_tcp_timer(void *arg) void tcp_timer_needed(void) { + LWIP_ASSERT_CORE_LOCKED(); + /* timer is off but needed again? */ if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) { /* enable and start timer */ @@ -155,20 +176,88 @@ tcp_timer_needed(void) } #endif /* LWIP_TCP */ +static void +#if LWIP_DEBUG_TIMERNAMES +sys_timeout_abs(u32_t abs_time, sys_timeout_handler handler, void *arg, const char *handler_name) +#else /* LWIP_DEBUG_TIMERNAMES */ +sys_timeout_abs(u32_t abs_time, sys_timeout_handler handler, void *arg) +#endif +{ + struct sys_timeo *timeout, *t; + + timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT); + if (timeout == NULL) { + LWIP_ASSERT("sys_timeout: timeout != NULL, pool MEMP_SYS_TIMEOUT is empty", timeout != NULL); + return; + } + + timeout->next = NULL; + timeout->h = handler; + timeout->arg = arg; + timeout->time = abs_time; + +#if LWIP_DEBUG_TIMERNAMES + timeout->handler_name = handler_name; + LWIP_DEBUGF(TIMERS_DEBUG, ("sys_timeout: %p abs_time=%"U32_F" handler=%s arg=%p\n", + (void *)timeout, abs_time, handler_name, (void *)arg)); +#endif /* LWIP_DEBUG_TIMERNAMES */ + + if (next_timeout == NULL) { + next_timeout = timeout; + return; + } + if (TIME_LESS_THAN(timeout->time, next_timeout->time)) { + timeout->next = next_timeout; + next_timeout = timeout; + } else { + for (t = next_timeout; t != NULL; t = t->next) { + if ((t->next == NULL) || TIME_LESS_THAN(timeout->time, t->next->time)) { + timeout->next = t->next; + t->next = timeout; + break; + } + } + } +} + /** - * Timer callback function that calls mld6_tmr() and reschedules itself. + * Timer callback function that calls cyclic->handler() and reschedules itself. * * @param arg unused argument */ -static void -cyclic_timer(void *arg) +#if !LWIP_TESTMODE +static +#endif +void +lwip_cyclic_timer(void *arg) { - const struct lwip_cyclic_timer* cyclic = (const struct lwip_cyclic_timer*)arg; + u32_t now; + u32_t next_timeout_time; + const struct lwip_cyclic_timer *cyclic = (const struct lwip_cyclic_timer *)arg; + #if LWIP_DEBUG_TIMERNAMES LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: %s()\n", cyclic->handler_name)); #endif cyclic->handler(); - sys_timeout(cyclic->interval_ms, cyclic_timer, arg); + + now = sys_now(); + next_timeout_time = (u32_t)(current_timeout_due_time + cyclic->interval_ms); /* overflow handled by TIME_LESS_THAN macro */ + if (TIME_LESS_THAN(next_timeout_time, now)) { + /* timer would immediately expire again -> "overload" -> restart without any correction */ +#if LWIP_DEBUG_TIMERNAMES + sys_timeout_abs((u32_t)(now + cyclic->interval_ms), lwip_cyclic_timer, arg, cyclic->handler_name); +#else + sys_timeout_abs((u32_t)(now + cyclic->interval_ms), lwip_cyclic_timer, arg); +#endif + + } else { + /* correct cyclic interval with handler execution delay and sys_check_timeouts jitter */ +#if LWIP_DEBUG_TIMERNAMES + sys_timeout_abs(next_timeout_time, lwip_cyclic_timer, arg, cyclic->handler_name); +#else + sys_timeout_abs(next_timeout_time, lwip_cyclic_timer, arg); +#endif + } } /** Initialize this module */ @@ -179,11 +268,8 @@ void sys_timeouts_init(void) for (i = (LWIP_TCP ? 1 : 0); i < LWIP_ARRAYSIZE(lwip_cyclic_timers); i++) { /* we have to cast via size_t to get rid of const warning (this is OK as cyclic_timer() casts back to const* */ - sys_timeout(lwip_cyclic_timers[i].interval_ms, cyclic_timer, LWIP_CONST_CAST(void*, &lwip_cyclic_timers[i])); + sys_timeout(lwip_cyclic_timers[i].interval_ms, lwip_cyclic_timer, LWIP_CONST_CAST(void *, &lwip_cyclic_timers[i])); } - - /* Initialise timestamp for sys_check_timeouts */ - timeouts_last_time = sys_now(); } /** @@ -198,67 +284,25 @@ void sys_timeouts_init(void) */ #if LWIP_DEBUG_TIMERNAMES void -sys_timeout_debug(u32_t msecs, sys_timeout_handler handler, void *arg, const char* handler_name) +sys_timeout_debug(u32_t msecs, sys_timeout_handler handler, void *arg, const char *handler_name) #else /* LWIP_DEBUG_TIMERNAMES */ void sys_timeout(u32_t msecs, sys_timeout_handler handler, void *arg) #endif /* LWIP_DEBUG_TIMERNAMES */ { - struct sys_timeo *timeout, *t; - u32_t now, diff; + u32_t next_timeout_time; - timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT); - if (timeout == NULL) { - LWIP_ASSERT("sys_timeout: timeout != NULL, pool MEMP_SYS_TIMEOUT is empty", timeout != NULL); - return; - } + LWIP_ASSERT_CORE_LOCKED(); - now = sys_now(); - if (next_timeout == NULL) { - diff = 0; - timeouts_last_time = now; - } else { - diff = now - timeouts_last_time; - } + LWIP_ASSERT("Timeout time too long, max is LWIP_UINT32_MAX/4 msecs", msecs <= (LWIP_UINT32_MAX / 4)); + + next_timeout_time = (u32_t)(sys_now() + msecs); /* overflow handled by TIME_LESS_THAN macro */ - timeout->next = NULL; - timeout->h = handler; - timeout->arg = arg; - timeout->time = msecs + diff; #if LWIP_DEBUG_TIMERNAMES - timeout->handler_name = handler_name; - LWIP_DEBUGF(TIMERS_DEBUG, ("sys_timeout: %p msecs=%"U32_F" handler=%s arg=%p\n", - (void *)timeout, msecs, handler_name, (void *)arg)); -#endif /* LWIP_DEBUG_TIMERNAMES */ - - if (next_timeout == NULL) { - next_timeout = timeout; - return; - } - - if (next_timeout->time > msecs) { - next_timeout->time -= msecs; - timeout->next = next_timeout; - next_timeout = timeout; - } else { - for (t = next_timeout; t != NULL; t = t->next) { - timeout->time -= t->time; - if (t->next == NULL || t->next->time > timeout->time) { - if (t->next != NULL) { - t->next->time -= timeout->time; - } else if (timeout->time > msecs) { - /* If this is the case, 'timeouts_last_time' and 'now' differs too much. - This can be due to sys_check_timeouts() not being called at the right - times, but also when stopping in a breakpoint. Anyway, let's assume - this is not wanted, so add the first timer's time instead of 'diff' */ - timeout->time = msecs + next_timeout->time; - } - timeout->next = t->next; - t->next = timeout; - break; - } - } - } + sys_timeout_abs(next_timeout_time, handler, arg, handler_name); +#else + sys_timeout_abs(next_timeout_time, handler, arg); +#endif } /** @@ -274,6 +318,8 @@ sys_untimeout(sys_timeout_handler handler, void *arg) { struct sys_timeo *prev_t, *t; + LWIP_ASSERT_CORE_LOCKED(); + if (next_timeout == NULL) { return; } @@ -287,10 +333,6 @@ sys_untimeout(sys_timeout_handler handler, void *arg) } else { prev_t->next = t->next; } - /* If not the last one, add time of this one back to next */ - if (t->next != NULL) { - t->next->time += t->time; - } memp_free(MEMP_SYS_TIMEOUT, t); return; } @@ -306,61 +348,54 @@ sys_untimeout(sys_timeout_handler handler, void *arg) * * Must be called periodically from your main loop. */ -#if !NO_SYS && !defined __DOXYGEN__ -static -#endif /* !NO_SYS */ void sys_check_timeouts(void) { - if (next_timeout) { + u32_t now; + + LWIP_ASSERT_CORE_LOCKED(); + + /* Process only timers expired at the start of the function. */ + now = sys_now(); + + do { struct sys_timeo *tmptimeout; - u32_t diff; sys_timeout_handler handler; void *arg; - u8_t had_one; - u32_t now; - now = sys_now(); - /* this cares for wraparounds */ - diff = now - timeouts_last_time; - do { - PBUF_CHECK_FREE_OOSEQ(); - had_one = 0; - tmptimeout = next_timeout; - if (tmptimeout && (tmptimeout->time <= diff)) { - /* timeout has expired */ - had_one = 1; - timeouts_last_time += tmptimeout->time; - diff -= tmptimeout->time; - next_timeout = tmptimeout->next; - handler = tmptimeout->h; - arg = tmptimeout->arg; + PBUF_CHECK_FREE_OOSEQ(); + + tmptimeout = next_timeout; + if (tmptimeout == NULL) { + return; + } + + if (TIME_LESS_THAN(now, tmptimeout->time)) { + return; + } + + /* Timeout has expired */ + next_timeout = tmptimeout->next; + handler = tmptimeout->h; + arg = tmptimeout->arg; + current_timeout_due_time = tmptimeout->time; #if LWIP_DEBUG_TIMERNAMES - if (handler != NULL) { - LWIP_DEBUGF(TIMERS_DEBUG, ("sct calling h=%s arg=%p\n", - tmptimeout->handler_name, arg)); - } + if (handler != NULL) { + LWIP_DEBUGF(TIMERS_DEBUG, ("sct calling h=%s t=%"U32_F" arg=%p\n", + tmptimeout->handler_name, sys_now() - tmptimeout->time, arg)); + } #endif /* LWIP_DEBUG_TIMERNAMES */ - memp_free(MEMP_SYS_TIMEOUT, tmptimeout); - if (handler != NULL) { -#if !NO_SYS - /* For LWIP_TCPIP_CORE_LOCKING, lock the core before calling the - timeout handler function. */ - LOCK_TCPIP_CORE(); -#endif /* !NO_SYS */ - handler(arg); -#if !NO_SYS - UNLOCK_TCPIP_CORE(); -#endif /* !NO_SYS */ - } - LWIP_TCPIP_THREAD_ALIVE(); - } - /* repeat until all expired timers have been called */ - } while (had_one); - } + memp_free(MEMP_SYS_TIMEOUT, tmptimeout); + if (handler != NULL) { + handler(arg); + } + LWIP_TCPIP_THREAD_ALIVE(); + + /* Repeat until all expired timers have been called */ + } while (1); } -/** Set back the timestamp of the last call to sys_check_timeouts() +/** Rebase the timeout times to the current time. * This is necessary if sys_check_timeouts() hasn't been called for a long * time (e.g. while saving energy) to prevent all timer functions of that * period being called. @@ -368,62 +403,45 @@ sys_check_timeouts(void) void sys_restart_timeouts(void) { - timeouts_last_time = sys_now(); + u32_t now; + u32_t base; + struct sys_timeo *t; + + if (next_timeout == NULL) { + return; + } + + now = sys_now(); + base = next_timeout->time; + + for (t = next_timeout; t != NULL; t = t->next) { + t->time = (t->time - base) + now; + } } /** Return the time left before the next timeout is due. If no timeouts are * enqueued, returns 0xffffffff */ -#if !NO_SYS -static -#endif /* !NO_SYS */ u32_t sys_timeouts_sleeptime(void) { - u32_t diff; + u32_t now; + + LWIP_ASSERT_CORE_LOCKED(); + if (next_timeout == NULL) { - return 0xffffffff; + return SYS_TIMEOUTS_SLEEPTIME_INFINITE; } - diff = sys_now() - timeouts_last_time; - if (diff > next_timeout->time) { + now = sys_now(); + if (TIME_LESS_THAN(next_timeout->time, now)) { return 0; } else { - return next_timeout->time - diff; + u32_t ret = (u32_t)(next_timeout->time - now); + LWIP_ASSERT("invalid sleeptime", ret <= LWIP_MAX_TIMEOUT); + return ret; } } -#if !NO_SYS - -/** - * Wait (forever) for a message to arrive in an mbox. - * While waiting, timeouts are processed. - * - * @param mbox the mbox to fetch the message from - * @param msg the place to store the message - */ -void -sys_timeouts_mbox_fetch(sys_mbox_t *mbox, void **msg) -{ - u32_t sleeptime; - -again: - if (!next_timeout) { - sys_arch_mbox_fetch(mbox, msg, 0); - return; - } - - sleeptime = sys_timeouts_sleeptime(); - if (sleeptime == 0 || sys_arch_mbox_fetch(mbox, msg, sleeptime) == SYS_ARCH_TIMEOUT) { - /* If a SYS_ARCH_TIMEOUT value is returned, a timeout occurred - before a message could be fetched. */ - sys_check_timeouts(); - /* We try again to fetch a message from the mbox. */ - goto again; - } -} - -#endif /* NO_SYS */ - #else /* LWIP_TIMERS && !LWIP_TIMERS_CUSTOM */ /* Satisfy the TCP code which calls this function */ void diff --git a/Libraries/LwIP/src/core/udp.c b/Libraries/LwIP/src/core/udp.c index 0059259..4f45f8d 100755 --- a/Libraries/LwIP/src/core/udp.c +++ b/Libraries/LwIP/src/core/udp.c @@ -3,11 +3,11 @@ * User Datagram Protocol module\n * The code for the User Datagram Protocol UDP & UDPLite (RFC 3828).\n * See also @ref udp_raw - * + * * @defgroup udp_raw UDP * @ingroup callbackstyle_api * User Datagram Protocol module\n - * @see @ref raw_api and @ref netconn + * @see @ref api */ /* @@ -70,7 +70,7 @@ "The Dynamic and/or Private Ports are those from 49152 through 65535" */ #define UDP_LOCAL_PORT_RANGE_START 0xc000 #define UDP_LOCAL_PORT_RANGE_END 0xffff -#define UDP_ENSURE_LOCAL_PORT_RANGE(port) ((u16_t)(((port) & ~UDP_LOCAL_PORT_RANGE_START) + UDP_LOCAL_PORT_RANGE_START)) +#define UDP_ENSURE_LOCAL_PORT_RANGE(port) ((u16_t)(((port) & (u16_t)~UDP_LOCAL_PORT_RANGE_START) + UDP_LOCAL_PORT_RANGE_START)) #endif /* last local UDP port */ @@ -86,9 +86,9 @@ struct udp_pcb *udp_pcbs; void udp_init(void) { -#if LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS && defined(LWIP_RAND) +#ifdef LWIP_RAND udp_port = UDP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND()); -#endif /* LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS && defined(LWIP_RAND) */ +#endif /* LWIP_RAND */ } /** @@ -132,6 +132,15 @@ udp_input_local_match(struct udp_pcb *pcb, struct netif *inp, u8_t broadcast) LWIP_UNUSED_ARG(inp); /* in IPv6 only case */ LWIP_UNUSED_ARG(broadcast); /* in IPv6 only case */ + LWIP_ASSERT("udp_input_local_match: invalid pcb", pcb != NULL); + LWIP_ASSERT("udp_input_local_match: invalid netif", inp != NULL); + + /* check if PCB is bound to specific netif */ + if ((pcb->netif_idx != NETIF_NO_INDEX) && + (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { + return 0; + } + /* Dual-stack: PCBs listening to any IP type also listen to any IP address */ if (IP_IS_ANY_TYPE_VAL(pcb->local_ip)) { #if LWIP_IPV4 && IP_SOF_BROADCAST_RECV @@ -153,17 +162,17 @@ udp_input_local_match(struct udp_pcb *pcb, struct netif *inp, u8_t broadcast) #endif /* IP_SOF_BROADCAST_RECV */ { if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) || - ((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) || - ip4_addr_netcmp(ip_2_ip4(&pcb->local_ip), ip4_current_dest_addr(), netif_ip4_netmask(inp))) { + ((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) || + ip4_addr_netcmp(ip_2_ip4(&pcb->local_ip), ip4_current_dest_addr(), netif_ip4_netmask(inp))) { return 1; } } } else #endif /* LWIP_IPV4 */ - /* Handle IPv4 and IPv6: all or exact match */ - if (ip_addr_isany(&pcb->local_ip) || ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { - return 1; - } + /* Handle IPv4 and IPv6: all or exact match */ + if (ip_addr_isany(&pcb->local_ip) || ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { + return 1; + } } return 0; @@ -193,6 +202,11 @@ udp_input(struct pbuf *p, struct netif *inp) LWIP_UNUSED_ARG(inp); + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ASSERT("udp_input: invalid pbuf", p != NULL); + LWIP_ASSERT("udp_input: invalid netif", inp != NULL); + PERF_START; UDP_STATS_INC(udp.recv); @@ -224,9 +238,9 @@ udp_input(struct pbuf *p, struct netif *inp) /* print the UDP source and destination */ LWIP_DEBUGF(UDP_DEBUG, ("udp (")); - ip_addr_debug_print(UDP_DEBUG, ip_current_dest_addr()); + ip_addr_debug_print_val(UDP_DEBUG, *ip_current_dest_addr()); LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F") <-- (", lwip_ntohs(udphdr->dest))); - ip_addr_debug_print(UDP_DEBUG, ip_current_src_addr()); + ip_addr_debug_print_val(UDP_DEBUG, *ip_current_src_addr()); LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F")\n", lwip_ntohs(udphdr->src))); pcb = NULL; @@ -239,29 +253,42 @@ udp_input(struct pbuf *p, struct netif *inp) for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { /* print the PCB local and remote address */ LWIP_DEBUGF(UDP_DEBUG, ("pcb (")); - ip_addr_debug_print(UDP_DEBUG, &pcb->local_ip); + ip_addr_debug_print_val(UDP_DEBUG, pcb->local_ip); LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F") <-- (", pcb->local_port)); - ip_addr_debug_print(UDP_DEBUG, &pcb->remote_ip); + ip_addr_debug_print_val(UDP_DEBUG, pcb->remote_ip); LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F")\n", pcb->remote_port)); /* compare PCB local addr+port to UDP destination addr+port */ if ((pcb->local_port == dest) && (udp_input_local_match(pcb, inp, broadcast) != 0)) { - if (((pcb->flags & UDP_FLAGS_CONNECTED) == 0) && - ((uncon_pcb == NULL) + if ((pcb->flags & UDP_FLAGS_CONNECTED) == 0) { + if (uncon_pcb == NULL) { + /* the first unconnected matching PCB */ + uncon_pcb = pcb; +#if LWIP_IPV4 + } else if (broadcast && ip4_current_dest_addr()->addr == IPADDR_BROADCAST) { + /* global broadcast address (only valid for IPv4; match was checked before) */ + if (!IP_IS_V4_VAL(uncon_pcb->local_ip) || !ip4_addr_cmp(ip_2_ip4(&uncon_pcb->local_ip), netif_ip4_addr(inp))) { + /* uncon_pcb does not match the input netif, check this pcb */ + if (IP_IS_V4_VAL(pcb->local_ip) && ip4_addr_cmp(ip_2_ip4(&pcb->local_ip), netif_ip4_addr(inp))) { + /* better match */ + uncon_pcb = pcb; + } + } +#endif /* LWIP_IPV4 */ + } #if SO_REUSE - /* prefer specific IPs over cath-all */ - || !ip_addr_isany(&pcb->local_ip) + else if (!ip_addr_isany(&pcb->local_ip)) { + /* prefer specific IPs over catch-all */ + uncon_pcb = pcb; + } #endif /* SO_REUSE */ - )) { - /* the first unconnected matching PCB */ - uncon_pcb = pcb; } /* compare PCB remote addr+port to UDP source addr+port */ if ((pcb->remote_port == src) && (ip_addr_isany_val(pcb->remote_ip) || - ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()))) { + ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()))) { /* the first fully matching PCB */ if (prev != NULL) { /* move the pcb to the front of udp_pcbs so that is @@ -302,7 +329,7 @@ udp_input(struct pbuf *p, struct netif *inp) if (for_us) { LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_input: calculating checksum\n")); #if CHECKSUM_CHECK_UDP - IF__NETIF_CHECKSUM_ENABLED(inp, CHECKSUM_CHECK_UDP) { + IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_CHECK_UDP) { #if LWIP_UDPLITE if (ip_current_header_proto() == IP_PROTO_UDPLITE) { /* Do the UDP Lite checksum */ @@ -319,8 +346,8 @@ udp_input(struct pbuf *p, struct netif *inp) } } if (ip_chksum_pseudo_partial(p, IP_PROTO_UDPLITE, - p->tot_len, chklen, - ip_current_src_addr(), ip_current_dest_addr()) != 0) { + p->tot_len, chklen, + ip_current_src_addr(), ip_current_dest_addr()) != 0) { goto chkerr; } } else @@ -336,9 +363,9 @@ udp_input(struct pbuf *p, struct netif *inp) } } #endif /* CHECKSUM_CHECK_UDP */ - if (pbuf_header(p, -UDP_HLEN)) { + if (pbuf_remove_header(p, UDP_HLEN)) { /* Can we cope with this failing? Just assert for now */ - LWIP_ASSERT("pbuf_header failed\n", 0); + LWIP_ASSERT("pbuf_remove_header failed\n", 0); UDP_STATS_INC(udp.drop); MIB2_STATS_INC(mib2.udpinerrors); pbuf_free(p); @@ -353,8 +380,6 @@ udp_input(struct pbuf *p, struct netif *inp) /* pass broadcast- or multicast packets to all multicast pcbs if SOF_REUSEADDR is set on the first match */ struct udp_pcb *mpcb; - u8_t p_header_changed = 0; - s16_t hdrs_len = (s16_t)(ip_current_header_tot_len() + UDP_HLEN); for (mpcb = udp_pcbs; mpcb != NULL; mpcb = mpcb->next) { if (mpcb != pcb) { /* compare PCB local addr+port to UDP destination addr+port */ @@ -363,28 +388,14 @@ udp_input(struct pbuf *p, struct netif *inp) /* pass a copy of the packet to all local matches */ if (mpcb->recv != NULL) { struct pbuf *q; - /* for that, move payload to IP header again */ - if (p_header_changed == 0) { - pbuf_header_force(p, hdrs_len); - p_header_changed = 1; - } - q = pbuf_alloc(PBUF_RAW, p->tot_len, PBUF_RAM); + q = pbuf_clone(PBUF_RAW, PBUF_POOL, p); if (q != NULL) { - err_t err = pbuf_copy(q, p); - if (err == ERR_OK) { - /* move payload to UDP data */ - pbuf_header(q, -hdrs_len); - mpcb->recv(mpcb->recv_arg, mpcb, q, ip_current_src_addr(), src); - } + mpcb->recv(mpcb->recv_arg, mpcb, q, ip_current_src_addr(), src); } } } } } - if (p_header_changed) { - /* and move payload to UDP data again */ - pbuf_header(p, -hdrs_len); - } } #endif /* SO_REUSE && SO_REUSE_RXTOALL */ /* callback */ @@ -433,7 +444,8 @@ chkerr: /** * @ingroup udp_raw - * Send data using UDP. + * Sends the pbuf p using UDP. The pbuf is not deallocated. + * * * @param pcb UDP PCB used to send the data. * @param p chain of pbuf's to be sent. @@ -454,7 +466,10 @@ chkerr: err_t udp_send(struct udp_pcb *pcb, struct pbuf *p) { - if ((pcb == NULL) || IP_IS_ANY_TYPE_VAL(pcb->remote_ip)) { + LWIP_ERROR("udp_send: invalid pcb", pcb != NULL, return ERR_ARG); + LWIP_ERROR("udp_send: invalid pbuf", p != NULL, return ERR_ARG); + + if (IP_IS_ANY_TYPE_VAL(pcb->remote_ip)) { return ERR_VAL; } @@ -470,13 +485,16 @@ err_t udp_send_chksum(struct udp_pcb *pcb, struct pbuf *p, u8_t have_chksum, u16_t chksum) { - if ((pcb == NULL) || IP_IS_ANY_TYPE_VAL(pcb->remote_ip)) { + LWIP_ERROR("udp_send_chksum: invalid pcb", pcb != NULL, return ERR_ARG); + LWIP_ERROR("udp_send_chksum: invalid pbuf", p != NULL, return ERR_ARG); + + if (IP_IS_ANY_TYPE_VAL(pcb->remote_ip)) { return ERR_VAL; } /* send to the packet using remote ip and port stored in the pcb */ return udp_sendto_chksum(pcb, p, &pcb->remote_ip, pcb->remote_port, - have_chksum, chksum); + have_chksum, chksum); } #endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ @@ -500,7 +518,7 @@ udp_send_chksum(struct udp_pcb *pcb, struct pbuf *p, */ err_t udp_sendto(struct udp_pcb *pcb, struct pbuf *p, - const ip_addr_t *dst_ip, u16_t dst_port) + const ip_addr_t *dst_ip, u16_t dst_port) { #if LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP return udp_sendto_chksum(pcb, p, dst_ip, dst_port, 0, 0); @@ -514,43 +532,57 @@ udp_sendto_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, { #endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ struct netif *netif; - const ip_addr_t *dst_ip_route = dst_ip; - if ((pcb == NULL) || (dst_ip == NULL) || !IP_ADDR_PCB_VERSION_MATCH(pcb, dst_ip)) { + LWIP_ERROR("udp_sendto: invalid pcb", pcb != NULL, return ERR_ARG); + LWIP_ERROR("udp_sendto: invalid pbuf", p != NULL, return ERR_ARG); + LWIP_ERROR("udp_sendto: invalid dst_ip", dst_ip != NULL, return ERR_ARG); + + if (!IP_ADDR_PCB_VERSION_MATCH(pcb, dst_ip)) { return ERR_VAL; } LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_send\n")); -#if LWIP_IPV6 || (LWIP_IPV4 && LWIP_MULTICAST_TX_OPTIONS) - if (ip_addr_ismulticast(dst_ip_route)) { -#if LWIP_IPV6 - if (IP_IS_V6(dst_ip)) { - /* For multicast, find a netif based on source address. */ - dst_ip_route = &pcb->local_ip; - } else -#endif /* LWIP_IPV6 */ - { -#if LWIP_IPV4 && LWIP_MULTICAST_TX_OPTIONS - /* IPv4 does not use source-based routing by default, so we use an - administratively selected interface for multicast by default. - However, this can be overridden by setting an interface address - in pcb->multicast_ip that is used for routing. */ - if (!ip_addr_isany_val(pcb->multicast_ip) && - !ip4_addr_cmp(ip_2_ip4(&pcb->multicast_ip), IP4_ADDR_BROADCAST)) { - dst_ip_route = &pcb->multicast_ip; - } -#endif /* LWIP_IPV4 && LWIP_MULTICAST_TX_OPTIONS */ - } - } -#endif /* LWIP_IPV6 || (LWIP_IPV4 && LWIP_MULTICAST_TX_OPTIONS) */ - - /* find the outgoing network interface for this packet */ - if(IP_IS_ANY_TYPE_VAL(pcb->local_ip)) { - /* Don't call ip_route() with IP_ANY_TYPE */ - netif = ip_route(IP46_ADDR_ANY(IP_GET_TYPE(dst_ip_route)), dst_ip_route); + if (pcb->netif_idx != NETIF_NO_INDEX) { + netif = netif_get_by_index(pcb->netif_idx); } else { - netif = ip_route(&pcb->local_ip, dst_ip_route); +#if LWIP_MULTICAST_TX_OPTIONS + netif = NULL; + if (ip_addr_ismulticast(dst_ip)) { + /* For IPv6, the interface to use for packets with a multicast destination + * is specified using an interface index. The same approach may be used for + * IPv4 as well, in which case it overrides the IPv4 multicast override + * address below. Here we have to look up the netif by going through the + * list, but by doing so we skip a route lookup. If the interface index has + * gone stale, we fall through and do the regular route lookup after all. */ + if (pcb->mcast_ifindex != NETIF_NO_INDEX) { + netif = netif_get_by_index(pcb->mcast_ifindex); + } +#if LWIP_IPV4 + else +#if LWIP_IPV6 + if (IP_IS_V4(dst_ip)) +#endif /* LWIP_IPV6 */ + { + /* IPv4 does not use source-based routing by default, so we use an + administratively selected interface for multicast by default. + However, this can be overridden by setting an interface address + in pcb->mcast_ip4 that is used for routing. If this routing lookup + fails, we try regular routing as though no override was set. */ + if (!ip4_addr_isany_val(pcb->mcast_ip4) && + !ip4_addr_cmp(&pcb->mcast_ip4, IP4_ADDR_BROADCAST)) { + netif = ip4_route_src(ip_2_ip4(&pcb->local_ip), &pcb->mcast_ip4); + } + } +#endif /* LWIP_IPV4 */ + } + + if (netif == NULL) +#endif /* LWIP_MULTICAST_TX_OPTIONS */ + { + /* find the outgoing network interface for this packet */ + netif = ip_route(&pcb->local_ip, dst_ip); + } } /* no outgoing network interface could be found? */ @@ -590,7 +622,7 @@ udp_sendto_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, */ err_t udp_sendto_if(struct udp_pcb *pcb, struct pbuf *p, - const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif) + const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif) { #if LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP return udp_sendto_if_chksum(pcb, p, dst_ip, dst_port, netif, 0, 0); @@ -605,14 +637,20 @@ udp_sendto_if_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_i #endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ const ip_addr_t *src_ip; - if ((pcb == NULL) || (dst_ip == NULL) || !IP_ADDR_PCB_VERSION_MATCH(pcb, dst_ip)) { + LWIP_ERROR("udp_sendto_if: invalid pcb", pcb != NULL, return ERR_ARG); + LWIP_ERROR("udp_sendto_if: invalid pbuf", p != NULL, return ERR_ARG); + LWIP_ERROR("udp_sendto_if: invalid dst_ip", dst_ip != NULL, return ERR_ARG); + LWIP_ERROR("udp_sendto_if: invalid netif", netif != NULL, return ERR_ARG); + + if (!IP_ADDR_PCB_VERSION_MATCH(pcb, dst_ip)) { return ERR_VAL; } - /* PCB local address is IP_ANY_ADDR? */ + /* PCB local address is IP_ANY_ADDR or multicast? */ #if LWIP_IPV6 if (IP_IS_V6(dst_ip)) { - if (ip6_addr_isany(ip_2_ip6(&pcb->local_ip))) { + if (ip6_addr_isany(ip_2_ip6(&pcb->local_ip)) || + ip6_addr_ismulticast(ip_2_ip6(&pcb->local_ip))) { src_ip = ip6_select_source_address(netif, ip_2_ip6(dst_ip)); if (src_ip == NULL) { /* No suitable source address was found. */ @@ -632,21 +670,21 @@ udp_sendto_if_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_i else #endif /* LWIP_IPV4 && LWIP_IPV6 */ #if LWIP_IPV4 - if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) || - ip4_addr_ismulticast(ip_2_ip4(&pcb->local_ip))) { - /* if the local_ip is any or multicast - * use the outgoing network interface IP address as source address */ - src_ip = netif_ip_addr4(netif); - } else { - /* check if UDP PCB local IP address is correct - * this could be an old address if netif->ip_addr has changed */ - if (!ip4_addr_cmp(ip_2_ip4(&(pcb->local_ip)), netif_ip4_addr(netif))) { - /* local_ip doesn't match, drop the packet */ - return ERR_RTE; + if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) || + ip4_addr_ismulticast(ip_2_ip4(&pcb->local_ip))) { + /* if the local_ip is any or multicast + * use the outgoing network interface IP address as source address */ + src_ip = netif_ip_addr4(netif); + } else { + /* check if UDP PCB local IP address is correct + * this could be an old address if netif->ip_addr has changed */ + if (!ip4_addr_cmp(ip_2_ip4(&(pcb->local_ip)), netif_ip4_addr(netif))) { + /* local_ip doesn't match, drop the packet */ + return ERR_RTE; + } + /* use UDP PCB local IP address as source address */ + src_ip = &pcb->local_ip; } - /* use UDP PCB local IP address as source address */ - src_ip = &pcb->local_ip; - } #endif /* LWIP_IPV4 */ #if LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP return udp_sendto_if_src_chksum(pcb, p, dst_ip, dst_port, netif, have_chksum, chksum, src_ip); @@ -659,7 +697,7 @@ udp_sendto_if_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_i * Same as @ref udp_sendto_if, but with source address */ err_t udp_sendto_if_src(struct udp_pcb *pcb, struct pbuf *p, - const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif, const ip_addr_t *src_ip) + const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif, const ip_addr_t *src_ip) { #if LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP return udp_sendto_if_src_chksum(pcb, p, dst_ip, dst_port, netif, 0, 0, src_ip); @@ -668,8 +706,8 @@ udp_sendto_if_src(struct udp_pcb *pcb, struct pbuf *p, /** Same as udp_sendto_if_src(), but with checksum */ err_t udp_sendto_if_src_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, - u16_t dst_port, struct netif *netif, u8_t have_chksum, - u16_t chksum, const ip_addr_t *src_ip) + u16_t dst_port, struct netif *netif, u8_t have_chksum, + u16_t chksum, const ip_addr_t *src_ip) { #endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ struct udp_hdr *udphdr; @@ -678,7 +716,15 @@ udp_sendto_if_src_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *d u8_t ip_proto; u8_t ttl; - if ((pcb == NULL) || (dst_ip == NULL) || !IP_ADDR_PCB_VERSION_MATCH(pcb, src_ip) || + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ERROR("udp_sendto_if_src: invalid pcb", pcb != NULL, return ERR_ARG); + LWIP_ERROR("udp_sendto_if_src: invalid pbuf", p != NULL, return ERR_ARG); + LWIP_ERROR("udp_sendto_if_src: invalid dst_ip", dst_ip != NULL, return ERR_ARG); + LWIP_ERROR("udp_sendto_if_src: invalid src_ip", src_ip != NULL, return ERR_ARG); + LWIP_ERROR("udp_sendto_if_src: invalid netif", netif != NULL, return ERR_ARG); + + if (!IP_ADDR_PCB_VERSION_MATCH(pcb, src_ip) || !IP_ADDR_PCB_VERSION_MATCH(pcb, dst_ip)) { return ERR_VAL; } @@ -691,7 +737,7 @@ udp_sendto_if_src_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *d #endif /* LWIP_IPV6 */ ip_addr_isbroadcast(dst_ip, netif)) { LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("udp_sendto_if: SOF_BROADCAST not enabled on pcb %p\n", (void *)pcb)); + ("udp_sendto_if: SOF_BROADCAST not enabled on pcb %p\n", (void *)pcb)); return ERR_VAL; } #endif /* LWIP_IPV4 && IP_SOF_BROADCAST */ @@ -706,8 +752,12 @@ udp_sendto_if_src_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *d } } + /* packet too large to add a UDP header without causing an overflow? */ + if ((u16_t)(p->tot_len + UDP_HLEN) < p->tot_len) { + return ERR_MEM; + } /* not enough space to add an UDP header to first pbuf in given p chain? */ - if (pbuf_header(p, UDP_HLEN)) { + if (pbuf_add_header(p, UDP_HLEN)) { /* allocate header in a separate new pbuf */ q = pbuf_alloc(PBUF_IP, UDP_HLEN, PBUF_RAM); /* new header pbuf could not be allocated? */ @@ -738,11 +788,11 @@ udp_sendto_if_src_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *d udphdr->chksum = 0x0000; /* Multicast Loop? */ -#if (LWIP_IPV4 && LWIP_MULTICAST_TX_OPTIONS) || (LWIP_IPV6 && LWIP_IPV6_MLD) +#if LWIP_MULTICAST_TX_OPTIONS if (((pcb->flags & UDP_FLAGS_MULTICAST_LOOP) != 0) && ip_addr_ismulticast(dst_ip)) { q->flags |= PBUF_FLAG_MCASTLOOP; } -#endif /* (LWIP_IPV4 && LWIP_MULTICAST_TX_OPTIONS) || (LWIP_IPV6 && LWIP_IPV6_MLD) */ +#endif /* LWIP_MULTICAST_TX_OPTIONS */ LWIP_DEBUGF(UDP_DEBUG, ("udp_send: sending datagram of length %"U16_F"\n", q->tot_len)); @@ -776,7 +826,7 @@ udp_sendto_if_src_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *d } #endif /* LWIP_CHECKSUM_ON_COPY */ udphdr->chksum = ip_chksum_pseudo_partial(q, IP_PROTO_UDPLITE, - q->tot_len, chklen, src_ip, dst_ip); + q->tot_len, chklen, src_ip, dst_ip); #if LWIP_CHECKSUM_ON_COPY if (have_chksum) { u32_t acc; @@ -808,14 +858,14 @@ udp_sendto_if_src_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *d if (have_chksum) { u32_t acc; udpchksum = ip_chksum_pseudo_partial(q, IP_PROTO_UDP, - q->tot_len, UDP_HLEN, src_ip, dst_ip); + q->tot_len, UDP_HLEN, src_ip, dst_ip); acc = udpchksum + (u16_t)~(chksum); udpchksum = FOLD_U32T(acc); } else #endif /* LWIP_CHECKSUM_ON_COPY */ { udpchksum = ip_chksum_pseudo(q, IP_PROTO_UDP, q->tot_len, - src_ip, dst_ip); + src_ip, dst_ip); } /* chksum zero must become 0xffff, as zero means 'no checksum' */ @@ -839,9 +889,9 @@ udp_sendto_if_src_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *d LWIP_DEBUGF(UDP_DEBUG, ("udp_send: UDP checksum 0x%04"X16_F"\n", udphdr->chksum)); LWIP_DEBUGF(UDP_DEBUG, ("udp_send: ip_output_if (,,,,0x%02"X16_F",)\n", (u16_t)ip_proto)); /* output to IP */ - NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); + NETIF_SET_HINTS(netif, &(pcb->netif_hints)); err = ip_output_if_src(q, src_ip, dst_ip, ttl, pcb->tos, ip_proto, netif); - NETIF_SET_HWADDRHINT(netif, NULL); + NETIF_RESET_HINTS(netif); /* @todo: must this be increased even if error occurred? */ MIB2_STATS_INC(mib2.udpoutdatagrams); @@ -861,9 +911,9 @@ udp_sendto_if_src_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *d /** * @ingroup udp_raw * Bind an UDP PCB. - * + * * @param pcb UDP PCB to be bound with a local address ipaddr and port. - * @param ipaddr local IP address to bind with. Use IP4_ADDR_ANY to + * @param ipaddr local IP address to bind with. Use IP_ANY_TYPE to * bind to all local interfaces. * @param port local UDP port to bind with. Use 0 to automatically bind * to a random port between UDP_LOCAL_PORT_RANGE_START and @@ -883,18 +933,22 @@ udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) { struct udp_pcb *ipcb; u8_t rebind; +#if LWIP_IPV6 && LWIP_IPV6_SCOPES + ip_addr_t zoned_ipaddr; +#endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */ + + LWIP_ASSERT_CORE_LOCKED(); #if LWIP_IPV4 /* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */ if (ipaddr == NULL) { ipaddr = IP4_ADDR_ANY; } +#else /* LWIP_IPV4 */ + LWIP_ERROR("udp_bind: invalid ipaddr", ipaddr != NULL, return ERR_ARG); #endif /* LWIP_IPV4 */ - /* still need to check for ipaddr == NULL in IPv6 only case */ - if ((pcb == NULL) || (ipaddr == NULL)) { - return ERR_VAL; - } + LWIP_ERROR("udp_bind: invalid pcb", pcb != NULL, return ERR_ARG); LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_bind(ipaddr = ")); ip_addr_debug_print(UDP_DEBUG | LWIP_DBG_TRACE, ipaddr); @@ -910,6 +964,18 @@ udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) } } +#if LWIP_IPV6 && LWIP_IPV6_SCOPES + /* If the given IP address should have a zone but doesn't, assign one now. + * This is legacy support: scope-aware callers should always provide properly + * zoned source addresses. Do the zone selection before the address-in-use + * check below; as such we have to make a temporary copy of the address. */ + if (IP_IS_V6(ipaddr) && ip6_addr_lacks_zone(ip_2_ip6(ipaddr), IP6_UNKNOWN)) { + ip_addr_copy(zoned_ipaddr, *ipaddr); + ip6_addr_select_zone(ip_2_ip6(&zoned_ipaddr), ip_2_ip6(&zoned_ipaddr)); + ipaddr = &zoned_ipaddr; + } +#endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */ + /* no port specified? */ if (port == 0) { port = udp_new_port(); @@ -921,9 +987,9 @@ udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) } else { for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { if (pcb != ipcb) { - /* By default, we don't allow to bind to a port that any other udp - PCB is already bound to, unless *all* PCBs with that port have tha - REUSEADDR flag set. */ + /* By default, we don't allow to bind to a port that any other udp + PCB is already bound to, unless *all* PCBs with that port have tha + REUSEADDR flag set. */ #if SO_REUSE if (!ip_get_option(pcb, SOF_REUSEADDR) || !ip_get_option(ipcb, SOF_REUSEADDR)) @@ -931,8 +997,9 @@ udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) { /* port matches that of PCB in list and REUSEADDR not set -> reject */ if ((ipcb->local_port == port) && - /* IP address matches? */ - ip_addr_cmp(&ipcb->local_ip, ipaddr)) { + /* IP address matches or any IP used? */ + (ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) || + ip_addr_isany(&ipcb->local_ip))) { /* other PCB already binds to this local IP and port */ LWIP_DEBUGF(UDP_DEBUG, ("udp_bind: local port %"U16_F" already bound by another pcb\n", port)); @@ -954,16 +1021,39 @@ udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) udp_pcbs = pcb; } LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("udp_bind: bound to ")); - ip_addr_debug_print(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, &pcb->local_ip); + ip_addr_debug_print_val(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, pcb->local_ip); LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, (", port %"U16_F")\n", pcb->local_port)); return ERR_OK; } /** * @ingroup udp_raw - * Connect an UDP PCB. + * Bind an UDP PCB to a specific netif. + * After calling this function, all packets received via this PCB + * are guaranteed to have come in via the specified netif, and all + * outgoing packets will go out via the specified netif. * - * This will associate the UDP PCB with the remote address. + * @param pcb UDP PCB to be bound. + * @param netif netif to bind udp pcb to. Can be NULL. + * + * @see udp_disconnect() + */ +void +udp_bind_netif(struct udp_pcb *pcb, const struct netif *netif) +{ + LWIP_ASSERT_CORE_LOCKED(); + + if (netif != NULL) { + pcb->netif_idx = netif_get_index(netif); + } else { + pcb->netif_idx = NETIF_NO_INDEX; + } +} + +/** + * @ingroup udp_raw + * Sets the remote end of the pcb. This function does not generate any + * network traffic, but only sets the remote address of the pcb. * * @param pcb UDP PCB to be connected with remote address ipaddr and port. * @param ipaddr remote IP address to connect with. @@ -982,9 +1072,10 @@ udp_connect(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) { struct udp_pcb *ipcb; - if ((pcb == NULL) || (ipaddr == NULL)) { - return ERR_VAL; - } + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ERROR("udp_connect: invalid pcb", pcb != NULL, return ERR_ARG); + LWIP_ERROR("udp_connect: invalid ipaddr", ipaddr != NULL, return ERR_ARG); if (pcb->local_port == 0) { err_t err = udp_bind(pcb, &pcb->local_ip, pcb->local_port); @@ -994,12 +1085,21 @@ udp_connect(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) } ip_addr_set_ipaddr(&pcb->remote_ip, ipaddr); +#if LWIP_IPV6 && LWIP_IPV6_SCOPES + /* If the given IP address should have a zone but doesn't, assign one now, + * using the bound address to make a more informed decision when possible. */ + if (IP_IS_V6(&pcb->remote_ip) && + ip6_addr_lacks_zone(ip_2_ip6(&pcb->remote_ip), IP6_UNKNOWN)) { + ip6_addr_select_zone(ip_2_ip6(&pcb->remote_ip), ip_2_ip6(&pcb->local_ip)); + } +#endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */ + pcb->remote_port = port; pcb->flags |= UDP_FLAGS_CONNECTED; LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("udp_connect: connected to ")); - ip_addr_debug_print(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, - &pcb->remote_ip); + ip_addr_debug_print_val(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, + pcb->remote_ip); LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, (", port %"U16_F")\n", pcb->remote_port)); /* Insert UDP PCB into the list of active UDP PCBs. */ @@ -1017,13 +1117,18 @@ udp_connect(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) /** * @ingroup udp_raw - * Disconnect a UDP PCB + * Remove the remote end of the pcb. This function does not generate + * any network traffic, but only removes the remote address of the pcb. * * @param pcb the udp pcb to disconnect. */ void udp_disconnect(struct udp_pcb *pcb) { + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ERROR("udp_disconnect: invalid pcb", pcb != NULL, return); + /* reset remote address association */ #if LWIP_IPV4 && LWIP_IPV6 if (IP_IS_ANY_TYPE_VAL(pcb->local_ip)) { @@ -1035,14 +1140,14 @@ udp_disconnect(struct udp_pcb *pcb) } #endif pcb->remote_port = 0; + pcb->netif_idx = NETIF_NO_INDEX; /* mark PCB as unconnected */ - pcb->flags &= ~UDP_FLAGS_CONNECTED; + udp_clear_flags(pcb, UDP_FLAGS_CONNECTED); } /** * @ingroup udp_raw - * Set a receive callback for a UDP PCB - * + * Set a receive callback for a UDP PCB. * This callback will be called when receiving a datagram for the pcb. * * @param pcb the pcb for which to set the recv callback @@ -1052,6 +1157,10 @@ udp_disconnect(struct udp_pcb *pcb) void udp_recv(struct udp_pcb *pcb, udp_recv_fn recv, void *recv_arg) { + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ERROR("udp_recv: invalid pcb", pcb != NULL, return); + /* remember recv() callback and user data */ pcb->recv = recv; pcb->recv_arg = recv_arg; @@ -1059,8 +1168,8 @@ udp_recv(struct udp_pcb *pcb, udp_recv_fn recv, void *recv_arg) /** * @ingroup udp_raw - * Remove an UDP PCB. - * + * Removes and deallocates the pcb. + * * @param pcb UDP PCB to be removed. The PCB is removed from the list of * UDP PCB's and the data structure is freed from memory. * @@ -1071,6 +1180,10 @@ udp_remove(struct udp_pcb *pcb) { struct udp_pcb *pcb2; + LWIP_ASSERT_CORE_LOCKED(); + + LWIP_ERROR("udp_remove: invalid pcb", pcb != NULL, return); + mib2_udp_unbind(pcb); /* pcb to be removed is first in list? */ if (udp_pcbs == pcb) { @@ -1092,7 +1205,9 @@ udp_remove(struct udp_pcb *pcb) /** * @ingroup udp_raw - * Create a UDP PCB. + * Creates a new UDP pcb which can be used for UDP communication. The + * pcb is not active until it has either been bound to a local address + * or connected to a remote address. * * @return The UDP PCB which was created. NULL if the PCB data structure * could not be allocated. @@ -1103,6 +1218,9 @@ struct udp_pcb * udp_new(void) { struct udp_pcb *pcb; + + LWIP_ASSERT_CORE_LOCKED(); + pcb = (struct udp_pcb *)memp_malloc(MEMP_UDP_PCB); /* could allocate UDP PCB? */ if (pcb != NULL) { @@ -1122,7 +1240,9 @@ udp_new(void) /** * @ingroup udp_raw * Create a UDP PCB for specific IP type. - * + * The pcb is not active until it has either been bound to a local address + * or connected to a remote address. + * * @param type IP address type, see @ref lwip_ip_addr_type definitions. * If you want to listen to IPv4 and IPv6 (dual-stack) packets, * supply @ref IPADDR_TYPE_ANY as argument and bind to @ref IP_ANY_TYPE. @@ -1135,6 +1255,9 @@ struct udp_pcb * udp_new_ip_type(u8_t type) { struct udp_pcb *pcb; + + LWIP_ASSERT_CORE_LOCKED(); + pcb = udp_new(); #if LWIP_IPV4 && LWIP_IPV6 if (pcb != NULL) { @@ -1152,9 +1275,9 @@ udp_new_ip_type(u8_t type) * @param old_addr IP address of the netif before change * @param new_addr IP address of the netif after change */ -void udp_netif_ip_addr_changed(const ip_addr_t* old_addr, const ip_addr_t* new_addr) +void udp_netif_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr) { - struct udp_pcb* upcb; + struct udp_pcb *upcb; if (!ip_addr_isany(old_addr) && !ip_addr_isany(new_addr)) { for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) { diff --git a/Libraries/LwIP/src/include/compat/posix/arpa/inet.h b/Libraries/LwIP/src/include/compat/posix/arpa/inet.h new file mode 100644 index 0000000..0ed9baf --- /dev/null +++ b/Libraries/LwIP/src/include/compat/posix/arpa/inet.h @@ -0,0 +1,33 @@ +/** + * @file + * This file is a posix wrapper for lwip/sockets.h. + */ + +/* + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + */ + +#include "lwip/sockets.h" diff --git a/Libraries/LwIP/src/include/compat/posix/net/if.h b/Libraries/LwIP/src/include/compat/posix/net/if.h new file mode 100644 index 0000000..6b8e63a --- /dev/null +++ b/Libraries/LwIP/src/include/compat/posix/net/if.h @@ -0,0 +1,36 @@ +/** + * @file + * This file is a posix wrapper for lwip/if_api.h. + */ + +/* + * Copyright (c) 2017 Joel Cunningham, Garmin International, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + */ + +#include "lwip/if_api.h" diff --git a/Libraries/LwIP/src/include/compat/posix/netdb.h b/Libraries/LwIP/src/include/compat/posix/netdb.h new file mode 100644 index 0000000..12d4c7f --- /dev/null +++ b/Libraries/LwIP/src/include/compat/posix/netdb.h @@ -0,0 +1,33 @@ +/** + * @file + * This file is a posix wrapper for lwip/netdb.h. + */ + +/* + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + */ + +#include "lwip/netdb.h" diff --git a/Libraries/LwIP/src/include/compat/posix/sys/socket.h b/Libraries/LwIP/src/include/compat/posix/sys/socket.h new file mode 100644 index 0000000..0ed9baf --- /dev/null +++ b/Libraries/LwIP/src/include/compat/posix/sys/socket.h @@ -0,0 +1,33 @@ +/** + * @file + * This file is a posix wrapper for lwip/sockets.h. + */ + +/* + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + */ + +#include "lwip/sockets.h" diff --git a/Libraries/LwIP/src/include/compat/stdc/errno.h b/Libraries/LwIP/src/include/compat/stdc/errno.h new file mode 100644 index 0000000..98a9aec --- /dev/null +++ b/Libraries/LwIP/src/include/compat/stdc/errno.h @@ -0,0 +1,33 @@ +/** + * @file + * This file is a posix/stdc wrapper for lwip/errno.h. + */ + +/* + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + */ + +#include "lwip/errno.h" diff --git a/Libraries/LwIP/src/include/lwip/altcp.h b/Libraries/LwIP/src/include/lwip/altcp.h new file mode 100644 index 0000000..97abc54 --- /dev/null +++ b/Libraries/LwIP/src/include/lwip/altcp.h @@ -0,0 +1,201 @@ +/** + * @file + * Application layered TCP connection API (to be used from TCPIP thread)\n + * + * This file contains the generic API. + * For more details see @ref altcp_api. + */ + +/* + * Copyright (c) 2017 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ +#ifndef LWIP_HDR_ALTCP_H +#define LWIP_HDR_ALTCP_H + +#include "lwip/opt.h" + +#if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/tcpbase.h" +#include "lwip/err.h" +#include "lwip/pbuf.h" +#include "lwip/ip_addr.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct altcp_pcb; +struct altcp_functions; + +typedef err_t (*altcp_accept_fn)(void *arg, struct altcp_pcb *new_conn, err_t err); +typedef err_t (*altcp_connected_fn)(void *arg, struct altcp_pcb *conn, err_t err); +typedef err_t (*altcp_recv_fn)(void *arg, struct altcp_pcb *conn, struct pbuf *p, err_t err); +typedef err_t (*altcp_sent_fn)(void *arg, struct altcp_pcb *conn, u16_t len); +typedef err_t (*altcp_poll_fn)(void *arg, struct altcp_pcb *conn); +typedef void (*altcp_err_fn)(void *arg, err_t err); + +typedef struct altcp_pcb* (*altcp_new_fn)(void *arg, u8_t ip_type); + +struct altcp_pcb { + const struct altcp_functions *fns; + struct altcp_pcb *inner_conn; + void *arg; + void *state; + /* application callbacks */ + altcp_accept_fn accept; + altcp_connected_fn connected; + altcp_recv_fn recv; + altcp_sent_fn sent; + altcp_poll_fn poll; + altcp_err_fn err; + u8_t pollinterval; +}; + +/** @ingroup altcp */ +typedef struct altcp_allocator_s { + /** Allocator function */ + altcp_new_fn alloc; + /** Argument to allocator function */ + void *arg; +} altcp_allocator_t; + +struct altcp_pcb *altcp_new(altcp_allocator_t *allocator); +struct altcp_pcb *altcp_new_ip6(altcp_allocator_t *allocator); +struct altcp_pcb *altcp_new_ip_type(altcp_allocator_t *allocator, u8_t ip_type); + +void altcp_arg(struct altcp_pcb *conn, void *arg); +void altcp_accept(struct altcp_pcb *conn, altcp_accept_fn accept); +void altcp_recv(struct altcp_pcb *conn, altcp_recv_fn recv); +void altcp_sent(struct altcp_pcb *conn, altcp_sent_fn sent); +void altcp_poll(struct altcp_pcb *conn, altcp_poll_fn poll, u8_t interval); +void altcp_err(struct altcp_pcb *conn, altcp_err_fn err); + +void altcp_recved(struct altcp_pcb *conn, u16_t len); +err_t altcp_bind(struct altcp_pcb *conn, const ip_addr_t *ipaddr, u16_t port); +err_t altcp_connect(struct altcp_pcb *conn, const ip_addr_t *ipaddr, u16_t port, altcp_connected_fn connected); + +/* return conn for source code compatibility to tcp callback API only */ +struct altcp_pcb *altcp_listen_with_backlog_and_err(struct altcp_pcb *conn, u8_t backlog, err_t *err); +#define altcp_listen_with_backlog(conn, backlog) altcp_listen_with_backlog_and_err(conn, backlog, NULL) +/** @ingroup altcp */ +#define altcp_listen(conn) altcp_listen_with_backlog_and_err(conn, TCP_DEFAULT_LISTEN_BACKLOG, NULL) + +void altcp_abort(struct altcp_pcb *conn); +err_t altcp_close(struct altcp_pcb *conn); +err_t altcp_shutdown(struct altcp_pcb *conn, int shut_rx, int shut_tx); + +err_t altcp_write(struct altcp_pcb *conn, const void *dataptr, u16_t len, u8_t apiflags); +err_t altcp_output(struct altcp_pcb *conn); + +u16_t altcp_mss(struct altcp_pcb *conn); +u16_t altcp_sndbuf(struct altcp_pcb *conn); +u16_t altcp_sndqueuelen(struct altcp_pcb *conn); +void altcp_nagle_disable(struct altcp_pcb *conn); +void altcp_nagle_enable(struct altcp_pcb *conn); +int altcp_nagle_disabled(struct altcp_pcb *conn); + +void altcp_setprio(struct altcp_pcb *conn, u8_t prio); + +err_t altcp_get_tcp_addrinfo(struct altcp_pcb *conn, int local, ip_addr_t *addr, u16_t *port); +ip_addr_t *altcp_get_ip(struct altcp_pcb *conn, int local); +u16_t altcp_get_port(struct altcp_pcb *conn, int local); + +#ifdef LWIP_DEBUG +enum tcp_state altcp_dbg_get_tcp_state(struct altcp_pcb *conn); +#endif + +#ifdef __cplusplus +} +#endif + +#else /* LWIP_ALTCP */ + +/* ALTCP disabled, define everything to link against tcp callback API (e.g. to get a small non-ssl httpd) */ + +#include "lwip/tcp.h" + +#define altcp_accept_fn tcp_accept_fn +#define altcp_connected_fn tcp_connected_fn +#define altcp_recv_fn tcp_recv_fn +#define altcp_sent_fn tcp_sent_fn +#define altcp_poll_fn tcp_poll_fn +#define altcp_err_fn tcp_err_fn + +#define altcp_pcb tcp_pcb +#define altcp_tcp_new_ip_type tcp_new_ip_type +#define altcp_tcp_new tcp_new +#define altcp_tcp_new_ip6 tcp_new_ip6 + +#define altcp_new(allocator) tcp_new() +#define altcp_new_ip6(allocator) tcp_new_ip6() +#define altcp_new_ip_type(allocator, ip_type) tcp_new_ip_type(ip_type) + +#define altcp_arg tcp_arg +#define altcp_accept tcp_accept +#define altcp_recv tcp_recv +#define altcp_sent tcp_sent +#define altcp_poll tcp_poll +#define altcp_err tcp_err + +#define altcp_recved tcp_recved +#define altcp_bind tcp_bind +#define altcp_connect tcp_connect + +#define altcp_listen_with_backlog_and_err tcp_listen_with_backlog_and_err +#define altcp_listen_with_backlog tcp_listen_with_backlog +#define altcp_listen tcp_listen + +#define altcp_abort tcp_abort +#define altcp_close tcp_close +#define altcp_shutdown tcp_shutdown + +#define altcp_write tcp_write +#define altcp_output tcp_output + +#define altcp_mss tcp_mss +#define altcp_sndbuf tcp_sndbuf +#define altcp_sndqueuelen tcp_sndqueuelen +#define altcp_nagle_disable tcp_nagle_disable +#define altcp_nagle_enable tcp_nagle_enable +#define altcp_nagle_disabled tcp_nagle_disabled +#define altcp_setprio tcp_setprio + +#define altcp_get_tcp_addrinfo tcp_get_tcp_addrinfo +#define altcp_get_ip(pcb, local) ((local) ? (&(pcb)->local_ip) : (&(pcb)->remote_ip)) + +#ifdef LWIP_DEBUG +#define altcp_dbg_get_tcp_state tcp_dbg_get_tcp_state +#endif + +#endif /* LWIP_ALTCP */ + +#endif /* LWIP_HDR_ALTCP_H */ diff --git a/Libraries/LwIP/src/include/lwip/altcp_tcp.h b/Libraries/LwIP/src/include/lwip/altcp_tcp.h new file mode 100644 index 0000000..dbde584 --- /dev/null +++ b/Libraries/LwIP/src/include/lwip/altcp_tcp.h @@ -0,0 +1,72 @@ +/** + * @file + * Application layered TCP connection API (to be used from TCPIP thread)\n + * This interface mimics the tcp callback API to the application while preventing + * direct linking (much like virtual functions). + * This way, an application can make use of other application layer protocols + * on top of TCP without knowing the details (e.g. TLS, proxy connection). + * + * This file contains the base implementation calling into tcp. + */ + +/* + * Copyright (c) 2017 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ +#ifndef LWIP_HDR_ALTCP_TCP_H +#define LWIP_HDR_ALTCP_TCP_H + +#include "lwip/opt.h" + +#if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/altcp.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct altcp_pcb *altcp_tcp_new_ip_type(u8_t ip_type); + +#define altcp_tcp_new() altcp_tcp_new_ip_type(IPADDR_TYPE_V4) +#define altcp_tcp_new_ip6() altcp_tcp_new_ip_type(IPADDR_TYPE_V6) + +struct altcp_pcb *altcp_tcp_alloc(void *arg, u8_t ip_type); + +struct tcp_pcb; +struct altcp_pcb *altcp_tcp_wrap(struct tcp_pcb *tpcb); + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_ALTCP */ + +#endif /* LWIP_HDR_ALTCP_TCP_H */ diff --git a/Libraries/LwIP/src/include/lwip/altcp_tls.h b/Libraries/LwIP/src/include/lwip/altcp_tls.h new file mode 100644 index 0000000..7b17c60 --- /dev/null +++ b/Libraries/LwIP/src/include/lwip/altcp_tls.h @@ -0,0 +1,117 @@ +/** + * @file + * Application layered TCP/TLS connection API (to be used from TCPIP thread) + * + * @defgroup altcp_tls TLS layer + * @ingroup altcp + * This file contains function prototypes for a TLS layer. + * A port to ARM mbedtls is provided in the apps/ tree + * (LWIP_ALTCP_TLS_MBEDTLS option). + */ + +/* + * Copyright (c) 2017 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ +#ifndef LWIP_HDR_ALTCP_TLS_H +#define LWIP_HDR_ALTCP_TLS_H + +#include "lwip/opt.h" + +#if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */ + +#if LWIP_ALTCP_TLS + +#include "lwip/altcp.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** @ingroup altcp_tls + * ALTCP_TLS configuration handle, content depends on port (e.g. mbedtls) + */ +struct altcp_tls_config; + +/** @ingroup altcp_tls + * Create an ALTCP_TLS server configuration handle + */ +struct altcp_tls_config *altcp_tls_create_config_server_privkey_cert(const u8_t *privkey, size_t privkey_len, + const u8_t *privkey_pass, size_t privkey_pass_len, + const u8_t *cert, size_t cert_len); + +/** @ingroup altcp_tls + * Create an ALTCP_TLS client configuration handle + */ +struct altcp_tls_config *altcp_tls_create_config_client(const u8_t *cert, size_t cert_len); + +/** @ingroup altcp_tls + * Create an ALTCP_TLS client configuration handle with two-way server/client authentication + */ +struct altcp_tls_config *altcp_tls_create_config_client_2wayauth(const u8_t *ca, size_t ca_len, const u8_t *privkey, size_t privkey_len, + const u8_t *privkey_pass, size_t privkey_pass_len, + const u8_t *cert, size_t cert_len); + +/** @ingroup altcp_tls + * Free an ALTCP_TLS configuration handle + */ +void altcp_tls_free_config(struct altcp_tls_config *conf); + +/** @ingroup altcp_tls + * Create new ALTCP_TLS layer wrapping an existing pcb as inner connection (e.g. TLS over TCP) + */ +struct altcp_pcb *altcp_tls_wrap(struct altcp_tls_config *config, struct altcp_pcb *inner_pcb); + +/** @ingroup altcp_tls + * Create new ALTCP_TLS pcb and its inner tcp pcb + */ +struct altcp_pcb *altcp_tls_new(struct altcp_tls_config *config, u8_t ip_type); + +/** @ingroup altcp_tls + * Create new ALTCP_TLS layer pcb and its inner tcp pcb. + * Same as @ref altcp_tls_new but this allocator function fits to + * @ref altcp_allocator_t / @ref altcp_new.\n + 'arg' must contain a struct altcp_tls_config *. + */ +struct altcp_pcb *altcp_tls_alloc(void *arg, u8_t ip_type); + +/** @ingroup altcp_tls + * Return pointer to internal TLS context so application can tweak it. + * Real type depends on port (e.g. mbedtls) + */ +void *altcp_tls_context(struct altcp_pcb *conn); + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_ALTCP_TLS */ +#endif /* LWIP_ALTCP */ +#endif /* LWIP_HDR_ALTCP_TLS_H */ diff --git a/Libraries/LwIP/src/include/lwip/api.h b/Libraries/LwIP/src/include/lwip/api.h index 4b658c6..eca6ac2 100755 --- a/Libraries/LwIP/src/include/lwip/api.h +++ b/Libraries/LwIP/src/include/lwip/api.h @@ -58,17 +58,25 @@ extern "C" { */ /* Flags for netconn_write (u8_t) */ -#define NETCONN_NOFLAG 0x00 -#define NETCONN_NOCOPY 0x00 /* Only for source code compatibility */ -#define NETCONN_COPY 0x01 -#define NETCONN_MORE 0x02 -#define NETCONN_DONTBLOCK 0x04 +#define NETCONN_NOFLAG 0x00 +#define NETCONN_NOCOPY 0x00 /* Only for source code compatibility */ +#define NETCONN_COPY 0x01 +#define NETCONN_MORE 0x02 +#define NETCONN_DONTBLOCK 0x04 +#define NETCONN_NOAUTORCVD 0x08 /* prevent netconn_recv_data_tcp() from updating the tcp window - must be done manually via netconn_tcp_recvd() */ +#define NETCONN_NOFIN 0x10 /* upper layer already received data, leave FIN in queue until called again */ /* Flags for struct netconn.flags (u8_t) */ +/** This netconn had an error, don't block on recvmbox/acceptmbox any more */ +#define NETCONN_FLAG_MBOXCLOSED 0x01 /** Should this netconn avoid blocking? */ #define NETCONN_FLAG_NON_BLOCKING 0x02 /** Was the last connect action a non-blocking one? */ #define NETCONN_FLAG_IN_NONBLOCKING_CONNECT 0x04 +#if LWIP_NETCONN_FULLDUPLEX + /** The mbox of this netconn is being deallocated, don't use it anymore */ +#define NETCONN_FLAG_MBOXINVALID 0x08 +#endif /* LWIP_NETCONN_FULLDUPLEX */ /** If a nonblocking write has been rejected before, poll_tcp needs to check if the netconn is writable again */ #define NETCONN_FLAG_CHECK_WRITESPACE 0x10 @@ -78,7 +86,12 @@ extern "C" { dual-stack usage by default. */ #define NETCONN_FLAG_IPV6_V6ONLY 0x20 #endif /* LWIP_IPV6 */ - +#if LWIP_NETBUF_RECVINFO +/** Received packet info will be recorded for this netconn */ +#define NETCONN_FLAG_PKTINFO 0x40 +#endif /* LWIP_NETBUF_RECVINFO */ +/** A FIN has been received but not passed to the application yet */ +#define NETCONN_FIN_RX_PENDING 0x80 /* Helpers to process several netconn_types by the same code */ #define NETCONNTYPE_GROUP(t) ((t)&0xF0) @@ -214,8 +227,8 @@ struct netconn { struct udp_pcb *udp; struct raw_pcb *raw; } pcb; - /** the last error this netconn had */ - err_t last_err; + /** the last asynchronous unreported error this netconn had */ + err_t pending_err; #if !LWIP_NETCONN_SEM_PER_THREAD /** sem that is used to synchronously execute functions in the core context */ sys_sem_t op_completed; @@ -228,6 +241,11 @@ struct netconn { by the application thread */ sys_mbox_t acceptmbox; #endif /* LWIP_TCP */ +#if LWIP_NETCONN_FULLDUPLEX + /** number of threads waiting on an mbox. This is required to unblock + all threads when closing while threads are waiting. */ + int mbox_threads_waiting; +#endif /** only used for socket layer */ #if LWIP_SOCKET int socket; @@ -240,7 +258,7 @@ struct netconn { #if LWIP_SO_RCVTIMEO /** timeout in milliseconds to wait for new data to be received (or connections to arrive for listening netconns) */ - int recv_timeout; + u32_t recv_timeout; #endif /* LWIP_SO_RCVTIMEO */ #if LWIP_SO_RCVBUF /** maximum amount of bytes queued in recvmbox @@ -258,9 +276,6 @@ struct netconn { /** flags holding more netconn-internal state, see NETCONN_FLAG_* defines */ u8_t flags; #if LWIP_TCP - /** TCP: when data passed to netconn_write doesn't fit into the send buffer, - this temporarily stores how much is already sent. */ - size_t write_offset; /** TCP: when data passed to netconn_write doesn't fit into the send buffer, this temporarily stores the message. Also used during connect and close. */ @@ -270,21 +285,23 @@ struct netconn { netconn_callback callback; }; +/** This vector type is passed to @ref netconn_write_vectors_partly to send + * multiple buffers at once. + * ATTENTION: This type has to directly map struct iovec since one is casted + * into the other! + */ +struct netvector { + /** pointer to the application buffer that contains the data to send */ + const void *ptr; + /** size of the application data to send */ + size_t len; +}; + /** Register an Network connection event */ #define API_EVENT(c,e,l) if (c->callback) { \ (*c->callback)(c, e, l); \ } -/** Set conn->last_err to err but don't overwrite fatal errors */ -#define NETCONN_SET_SAFE_ERR(conn, err) do { if ((conn) != NULL) { \ - SYS_ARCH_DECL_PROTECT(netconn_set_safe_err_lev); \ - SYS_ARCH_PROTECT(netconn_set_safe_err_lev); \ - if (!ERR_IS_FATAL((conn)->last_err)) { \ - (conn)->last_err = err; \ - } \ - SYS_ARCH_UNPROTECT(netconn_set_safe_err_lev); \ -}} while(0); - /* Network connection functions: */ /** @ingroup netconn_common @@ -294,6 +311,7 @@ struct netconn { #define netconn_new_with_callback(t, c) netconn_new_with_proto_and_callback(t, 0, c) struct netconn *netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto, netconn_callback callback); +err_t netconn_prepare_delete(struct netconn *conn); err_t netconn_delete(struct netconn *conn); /** Get the type of a netconn (as enum netconn_type). */ #define netconn_type(conn) (conn->type) @@ -306,6 +324,7 @@ err_t netconn_getaddr(struct netconn *conn, ip_addr_t *addr, #define netconn_addr(c,i,p) netconn_getaddr(c,i,p,1) err_t netconn_bind(struct netconn *conn, const ip_addr_t *addr, u16_t port); +err_t netconn_bind_if(struct netconn *conn, u8_t if_idx); err_t netconn_connect(struct netconn *conn, const ip_addr_t *addr, u16_t port); err_t netconn_disconnect (struct netconn *conn); err_t netconn_listen_with_backlog(struct netconn *conn, u8_t backlog); @@ -313,12 +332,18 @@ err_t netconn_listen_with_backlog(struct netconn *conn, u8_t backlog); #define netconn_listen(conn) netconn_listen_with_backlog(conn, TCP_DEFAULT_LISTEN_BACKLOG) err_t netconn_accept(struct netconn *conn, struct netconn **new_conn); err_t netconn_recv(struct netconn *conn, struct netbuf **new_buf); +err_t netconn_recv_udp_raw_netbuf(struct netconn *conn, struct netbuf **new_buf); +err_t netconn_recv_udp_raw_netbuf_flags(struct netconn *conn, struct netbuf **new_buf, u8_t apiflags); err_t netconn_recv_tcp_pbuf(struct netconn *conn, struct pbuf **new_buf); +err_t netconn_recv_tcp_pbuf_flags(struct netconn *conn, struct pbuf **new_buf, u8_t apiflags); +err_t netconn_tcp_recvd(struct netconn *conn, size_t len); err_t netconn_sendto(struct netconn *conn, struct netbuf *buf, const ip_addr_t *addr, u16_t port); err_t netconn_send(struct netconn *conn, struct netbuf *buf); err_t netconn_write_partly(struct netconn *conn, const void *dataptr, size_t size, u8_t apiflags, size_t *bytes_written); +err_t netconn_write_vectors_partly(struct netconn *conn, struct netvector *vectors, u16_t vectorcnt, + u8_t apiflags, size_t *bytes_written); /** @ingroup netconn_tcp */ #define netconn_write(conn, dataptr, size, apiflags) \ netconn_write_partly(conn, dataptr, size, apiflags, NULL) @@ -328,6 +353,8 @@ err_t netconn_shutdown(struct netconn *conn, u8_t shut_rx, u8_t shut_tx); #if LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) err_t netconn_join_leave_group(struct netconn *conn, const ip_addr_t *multiaddr, const ip_addr_t *netif_addr, enum netconn_igmp join_or_leave); +err_t netconn_join_leave_group_netif(struct netconn *conn, const ip_addr_t *multiaddr, + u8_t if_idx, enum netconn_igmp join_or_leave); #endif /* LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) */ #if LWIP_DNS #if LWIP_IPV4 && LWIP_IPV6 @@ -339,14 +366,18 @@ err_t netconn_gethostbyname(const char *name, ip_addr_t *addr); #endif /* LWIP_IPV4 && LWIP_IPV6 */ #endif /* LWIP_DNS */ -#define netconn_err(conn) ((conn)->last_err) +err_t netconn_err(struct netconn *conn); #define netconn_recv_bufsize(conn) ((conn)->recv_bufsize) +#define netconn_set_flags(conn, set_flags) do { (conn)->flags = (u8_t)((conn)->flags | (set_flags)); } while(0) +#define netconn_clear_flags(conn, clr_flags) do { (conn)->flags = (u8_t)((conn)->flags & (u8_t)(~(clr_flags) & 0xff)); } while(0) +#define netconn_is_flag_set(conn, flag) (((conn)->flags & (flag)) != 0) + /** Set the blocking status of netconn calls (@todo: write/send is missing) */ #define netconn_set_nonblocking(conn, val) do { if(val) { \ - (conn)->flags |= NETCONN_FLAG_NON_BLOCKING; \ + netconn_set_flags(conn, NETCONN_FLAG_NON_BLOCKING); \ } else { \ - (conn)->flags &= ~ NETCONN_FLAG_NON_BLOCKING; }} while(0) + netconn_clear_flags(conn, NETCONN_FLAG_NON_BLOCKING); }} while(0) /** Get the blocking status of netconn calls (@todo: write/send is missing) */ #define netconn_is_nonblocking(conn) (((conn)->flags & NETCONN_FLAG_NON_BLOCKING) != 0) @@ -355,9 +386,9 @@ err_t netconn_gethostbyname(const char *name, ip_addr_t *addr); * TCP: Set the IPv6 ONLY status of netconn calls (see NETCONN_FLAG_IPV6_V6ONLY) */ #define netconn_set_ipv6only(conn, val) do { if(val) { \ - (conn)->flags |= NETCONN_FLAG_IPV6_V6ONLY; \ + netconn_set_flags(conn, NETCONN_FLAG_IPV6_V6ONLY); \ } else { \ - (conn)->flags &= ~ NETCONN_FLAG_IPV6_V6ONLY; }} while(0) + netconn_clear_flags(conn, NETCONN_FLAG_IPV6_V6ONLY); }} while(0) /** @ingroup netconn_common * TCP: Get the IPv6 ONLY status of netconn calls (see NETCONN_FLAG_IPV6_V6ONLY) */ diff --git a/Libraries/LwIP/src/include/lwip/apps/altcp_proxyconnect.h b/Libraries/LwIP/src/include/lwip/apps/altcp_proxyconnect.h new file mode 100644 index 0000000..65d3127 --- /dev/null +++ b/Libraries/LwIP/src/include/lwip/apps/altcp_proxyconnect.h @@ -0,0 +1,79 @@ +/** + * @file + * Application layered TCP connection API that executes a proxy-connect. + * + * This file provides a starting layer that executes a proxy-connect e.g. to + * set up TLS connections through a http proxy. + */ + +/* + * Copyright (c) 2018 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ + +#ifndef LWIP_HDR_APPS_ALTCP_PROXYCONNECT_H +#define LWIP_HDR_APPS_ALTCP_PROXYCONNECT_H + +#include "lwip/opt.h" + +#if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/ip_addr.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct altcp_proxyconnect_config { + ip_addr_t proxy_addr; + u16_t proxy_port; +}; + + +struct altcp_pcb *altcp_proxyconnect_new(struct altcp_proxyconnect_config *config, struct altcp_pcb *inner_pcb); +struct altcp_pcb *altcp_proxyconnect_new_tcp(struct altcp_proxyconnect_config *config, u8_t ip_type); + +struct altcp_pcb *altcp_proxyconnect_alloc(void *arg, u8_t ip_type); + +#if LWIP_ALTCP_TLS +struct altcp_proxyconnect_tls_config { + struct altcp_proxyconnect_config proxy; + struct altcp_tls_config *tls_config; +}; + +struct altcp_pcb *altcp_proxyconnect_tls_alloc(void *arg, u8_t ip_type); +#endif /* LWIP_ALTCP_TLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_ALTCP */ +#endif /* LWIP_HDR_APPS_ALTCP_PROXYCONNECT_H */ diff --git a/Libraries/LwIP/src/include/lwip/apps/altcp_tls_mbedtls_opts.h b/Libraries/LwIP/src/include/lwip/apps/altcp_tls_mbedtls_opts.h new file mode 100644 index 0000000..36cddd9 --- /dev/null +++ b/Libraries/LwIP/src/include/lwip/apps/altcp_tls_mbedtls_opts.h @@ -0,0 +1,67 @@ +/** + * @file + * Application layered TCP/TLS connection API (to be used from TCPIP thread) + * + * This file contains options for an mbedtls port of the TLS layer. + */ + +/* + * Copyright (c) 2017 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ +#ifndef LWIP_HDR_ALTCP_TLS_OPTS_H +#define LWIP_HDR_ALTCP_TLS_OPTS_H + +#include "lwip/opt.h" + +#if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */ + +/** LWIP_ALTCP_TLS_MBEDTLS==1: use mbedTLS for TLS support for altcp API + * mbedtls include directory must be reachable via include search path + */ +#ifndef LWIP_ALTCP_TLS_MBEDTLS +#define LWIP_ALTCP_TLS_MBEDTLS 0 +#endif + +/** Configure debug level of this file */ +#ifndef ALTCP_MBEDTLS_DEBUG +#define ALTCP_MBEDTLS_DEBUG LWIP_DBG_OFF +#endif + +/** Set a session timeout in seconds for the basic session cache + * ATTENTION: Using a session cache can lower security by reusing keys! + */ +#ifndef ALTCP_MBEDTLS_SESSION_CACHE_TIMEOUT_SECONDS +#define ALTCP_MBEDTLS_SESSION_CACHE_TIMEOUT_SECONDS 0 +#endif + +#endif /* LWIP_ALTCP */ + +#endif /* LWIP_HDR_ALTCP_TLS_OPTS_H */ diff --git a/Libraries/LwIP/src/include/lwip/apps/fs.h b/Libraries/LwIP/src/include/lwip/apps/fs.h index 0283a0b..02bde1f 100755 --- a/Libraries/LwIP/src/include/lwip/apps/fs.h +++ b/Libraries/LwIP/src/include/lwip/apps/fs.h @@ -52,12 +52,23 @@ struct fsdata_chksum { #define FS_FILE_FLAGS_HEADER_INCLUDED 0x01 #define FS_FILE_FLAGS_HEADER_PERSISTENT 0x02 +#define FS_FILE_FLAGS_HEADER_HTTPVER_1_1 0x04 +#define FS_FILE_FLAGS_SSI 0x08 + +/** Define FS_FILE_EXTENSION_T_DEFINED if you have typedef'ed to your private + * pointer type (defaults to 'void' so the default usage is 'void*') + */ +#ifndef FS_FILE_EXTENSION_T_DEFINED +typedef void fs_file_extension; +#endif struct fs_file { const char *data; int len; int index; - void *pextension; + /* pextension is free for implementations to hold private (extensional) + arbitrary data, e.g. holding some file state or file system handle */ + fs_file_extension *pextension; #if HTTPD_PRECALCULATED_CHECKSUM const struct fsdata_chksum *chksum; u16_t chksum_count; @@ -96,6 +107,18 @@ void *fs_state_init(struct fs_file *file, const char *name); void fs_state_free(struct fs_file *file, void *state); #endif /* #if LWIP_HTTPD_FILE_STATE */ +struct fsdata_file { + const struct fsdata_file *next; + const unsigned char *name; + const unsigned char *data; + int len; + u8_t flags; +#if HTTPD_PRECALCULATED_CHECKSUM + u16_t chksum_count; + const struct fsdata_chksum *chksum; +#endif /* HTTPD_PRECALCULATED_CHECKSUM */ +}; + #ifdef __cplusplus } #endif diff --git a/Libraries/LwIP/src/include/lwip/apps/http_client.h b/Libraries/LwIP/src/include/lwip/apps/http_client.h new file mode 100644 index 0000000..8a06308 --- /dev/null +++ b/Libraries/LwIP/src/include/lwip/apps/http_client.h @@ -0,0 +1,160 @@ +/** + * @file + * HTTP client + */ + +/* + * Copyright (c) 2018 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ + +#ifndef LWIP_HDR_APPS_HTTP_CLIENT_H +#define LWIP_HDR_APPS_HTTP_CLIENT_H + +#include "lwip/opt.h" +#include "lwip/ip_addr.h" +#include "lwip/err.h" +#include "lwip/altcp.h" +#include "lwip/prot/iana.h" +#include "lwip/pbuf.h" + +#if LWIP_TCP && LWIP_CALLBACK_API + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @ingroup httpc + * HTTPC_HAVE_FILE_IO: define this to 1 to have functions dowloading directly + * to disk via fopen/fwrite. + * These functions are example implementations of the interface only. + */ +#ifndef LWIP_HTTPC_HAVE_FILE_IO +#define LWIP_HTTPC_HAVE_FILE_IO 0 +#endif + +/** + * @ingroup httpc + * The default TCP port used for HTTP + */ +#define HTTP_DEFAULT_PORT LWIP_IANA_PORT_HTTP + +/** + * @ingroup httpc + * HTTP client result codes + */ +typedef enum ehttpc_result { + /** File successfully received */ + HTTPC_RESULT_OK = 0, + /** Unknown error */ + HTTPC_RESULT_ERR_UNKNOWN = 1, + /** Connection to server failed */ + HTTPC_RESULT_ERR_CONNECT = 2, + /** Failed to resolve server hostname */ + HTTPC_RESULT_ERR_HOSTNAME = 3, + /** Connection unexpectedly closed by remote server */ + HTTPC_RESULT_ERR_CLOSED = 4, + /** Connection timed out (server didn't respond in time) */ + HTTPC_RESULT_ERR_TIMEOUT = 5, + /** Server responded with an error code */ + HTTPC_RESULT_ERR_SVR_RESP = 6, + /** Local memory error */ + HTTPC_RESULT_ERR_MEM = 7, + /** Local abort */ + HTTPC_RESULT_LOCAL_ABORT = 8, + /** Content length mismatch */ + HTTPC_RESULT_ERR_CONTENT_LEN = 9 +} httpc_result_t; + +typedef struct _httpc_state httpc_state_t; + +/** + * @ingroup httpc + * Prototype of a http client callback function + * + * @param arg argument specified when initiating the request + * @param httpc_result result of the http transfer (see enum httpc_result_t) + * @param rx_content_len number of bytes received (without headers) + * @param srv_res this contains the http status code received (if any) + * @param err an error returned by internal lwip functions, can help to specify + * the source of the error but must not necessarily be != ERR_OK + */ +typedef void (*httpc_result_fn)(void *arg, httpc_result_t httpc_result, u32_t rx_content_len, u32_t srv_res, err_t err); + +/** + * @ingroup httpc + * Prototype of http client callback: called when the headers are received + * + * @param connection http client connection + * @param arg argument specified when initiating the request + * @param hdr header pbuf(s) (may contain data also) + * @param hdr_len length of the heders in 'hdr' + * @param content_len content length as received in the headers (-1 if not received) + * @return if != ERR_OK is returned, the connection is aborted + */ +typedef err_t (*httpc_headers_done_fn)(httpc_state_t *connection, void *arg, struct pbuf *hdr, u16_t hdr_len, u32_t content_len); + +typedef struct _httpc_connection { + ip_addr_t proxy_addr; + u16_t proxy_port; + u8_t use_proxy; + /* @todo: add username:pass? */ + +#if LWIP_ALTCP + altcp_allocator_t *altcp_allocator; +#endif + + /* this callback is called when the transfer is finished (or aborted) */ + httpc_result_fn result_fn; + /* this callback is called after receiving the http headers + It can abort the connection by returning != ERR_OK */ + httpc_headers_done_fn headers_done_fn; +} httpc_connection_t; + +err_t httpc_get_file(const ip_addr_t* server_addr, u16_t port, const char* uri, const httpc_connection_t *settings, + altcp_recv_fn recv_fn, void* callback_arg, httpc_state_t **connection); +err_t httpc_get_file_dns(const char* server_name, u16_t port, const char* uri, const httpc_connection_t *settings, + altcp_recv_fn recv_fn, void* callback_arg, httpc_state_t **connection); + +#if LWIP_HTTPC_HAVE_FILE_IO +err_t httpc_get_file_to_disk(const ip_addr_t* server_addr, u16_t port, const char* uri, const httpc_connection_t *settings, + void* callback_arg, const char* local_file_name, httpc_state_t **connection); +err_t httpc_get_file_dns_to_disk(const char* server_name, u16_t port, const char* uri, const httpc_connection_t *settings, + void* callback_arg, const char* local_file_name, httpc_state_t **connection); +#endif /* LWIP_HTTPC_HAVE_FILE_IO */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_TCP && LWIP_CALLBACK_API */ + +#endif /* LWIP_HDR_APPS_HTTP_CLIENT_H */ diff --git a/Libraries/LwIP/src/include/lwip/apps/httpd.h b/Libraries/LwIP/src/include/lwip/apps/httpd.h index 57831dd..615261e 100755 --- a/Libraries/LwIP/src/include/lwip/apps/httpd.h +++ b/Libraries/LwIP/src/include/lwip/apps/httpd.h @@ -51,13 +51,14 @@ extern "C" { #if LWIP_HTTPD_CGI -/* +/** + * @ingroup httpd * Function pointer for a CGI script handler. * * This function is called each time the HTTPD server is asked for a file * whose name was previously registered as a CGI function using a call to - * http_set_cgi_handler. The iIndex parameter provides the index of the - * CGI within the ppcURLs array passed to http_set_cgi_handler. Parameters + * http_set_cgi_handlers. The iIndex parameter provides the index of the + * CGI within the cgis array passed to http_set_cgi_handlers. Parameters * pcParam and pcValue provide access to the parameters provided along with * the URI. iNumParams provides a count of the entries in the pcParam and * pcValue arrays. Each entry in the pcParam array contains the name of a @@ -71,8 +72,8 @@ extern "C" { * browser, for example "/thanks.htm" or "/response/error.ssi". * * The maximum number of parameters that will be passed to this function via - * iNumParams is defined by LWIP_HTTPD_MAX_CGI_PARAMETERS. Any parameters in the incoming - * HTTP request above this number will be discarded. + * iNumParams is defined by LWIP_HTTPD_MAX_CGI_PARAMETERS. Any parameters in + * the incoming HTTP request above this number will be discarded. * * Requests intended for use by this CGI mechanism must be sent using the GET * method (which encodes all parameters within the URI rather than in a block @@ -83,7 +84,8 @@ extern "C" { typedef const char *(*tCGIHandler)(int iIndex, int iNumParams, char *pcParam[], char *pcValue[]); -/* +/** + * @ingroup httpd * Structure defining the base filename (URL) of a CGI and the associated * function which is to be called when that URL is requested. */ @@ -100,11 +102,17 @@ void http_set_cgi_handlers(const tCGI *pCGIs, int iNumHandlers); #if LWIP_HTTPD_CGI || LWIP_HTTPD_CGI_SSI #if LWIP_HTTPD_CGI_SSI +/* we have to prototype this struct here to make it available for the handler */ +struct fs_file; + /** Define this generic CGI handler in your application. * It is called once for every URI with parameters. - * The parameters can be stored to + * The parameters can be stored to the object passed as connection_state, which + * is allocated to file->state via fs_state_init() from fs_open() or fs_open_custom(). + * Content creation via SSI or complete dynamic files can retrieve the CGI params from there. */ -extern void httpd_cgi_handler(const char* uri, int iNumParams, char **pcParam, char **pcValue +extern void httpd_cgi_handler(struct fs_file *file, const char* uri, int iNumParams, + char **pcParam, char **pcValue #if defined(LWIP_HTTPD_FILE_STATE) && LWIP_HTTPD_FILE_STATE , void *connection_state #endif /* LWIP_HTTPD_FILE_STATE */ @@ -115,34 +123,35 @@ extern void httpd_cgi_handler(const char* uri, int iNumParams, char **pcParam, c #if LWIP_HTTPD_SSI -/* +/** + * @ingroup httpd * Function pointer for the SSI tag handler callback. * * This function will be called each time the HTTPD server detects a tag of the - * form in a .shtml, .ssi or .shtm file where "name" appears as - * one of the tags supplied to http_set_ssi_handler in the ppcTags array. The + * form in files with extensions mentioned in the g_pcSSIExtensions + * array (currently .shtml, .shtm, .ssi, .xml, .json) where "name" appears as + * one of the tags supplied to http_set_ssi_handler in the tags array. The * returned insert string, which will be appended after the the string - * "" in file sent back to the client,should be written to pointer - * pcInsert. iInsertLen contains the size of the buffer pointed to by - * pcInsert. The iIndex parameter provides the zero-based index of the tag as - * found in the ppcTags array and identifies the tag that is to be processed. + * "" in file sent back to the client, should be written to pointer + * pcInsert. iInsertLen contains the size of the buffer pointed to by + * pcInsert. The iIndex parameter provides the zero-based index of the tag as + * found in the tags array and identifies the tag that is to be processed. * * The handler returns the number of characters written to pcInsert excluding - * any terminating NULL or a negative number to indicate a failure (tag not - * recognized, for example). + * any terminating NULL or HTTPD_SSI_TAG_UNKNOWN when tag is not recognized. * * Note that the behavior of this SSI mechanism is somewhat different from the * "normal" SSI processing as found in, for example, the Apache web server. In * this case, the inserted text is appended following the SSI tag rather than * replacing the tag entirely. This allows for an implementation that does not * require significant additional buffering of output data yet which will still - * offer usable SSI functionality. One downside to this approach is when + * offer usable SSI functionality. One downside to this approach is when * attempting to use SSI within JavaScript. The SSI tag is structured to * resemble an HTML comment but this syntax does not constitute a comment * within JavaScript and, hence, leaving the tag in place will result in - * problems in these cases. To work around this, any SSI tag which needs to - * output JavaScript code must do so in an encapsulated way, sending the whole - * HTML section as a single include. + * problems in these cases. In order to avoid these problems, define + * LWIP_HTTPD_SSI_INCLUDE_TAG as zero in your lwip options file, or use JavaScript + * style block comments in the form / * # name * / (without the spaces). */ typedef u16_t (*tSSIHandler)( #if LWIP_HTTPD_SSI_RAW @@ -177,7 +186,9 @@ void http_set_ssi_handler(tSSIHandler pfnSSIHandler, /* These functions must be implemented by the application */ -/** Called when a POST request has been received. The application can decide +/** + * @ingroup httpd + * Called when a POST request has been received. The application can decide * whether to accept it or not. * * @param connection Unique connection identifier, valid until httpd_post_end @@ -199,7 +210,9 @@ err_t httpd_post_begin(void *connection, const char *uri, const char *http_reque u16_t http_request_len, int content_len, char *response_uri, u16_t response_uri_len, u8_t *post_auto_wnd); -/** Called for each pbuf of data that has been received for a POST. +/** + * @ingroup httpd + * Called for each pbuf of data that has been received for a POST. * ATTENTION: The application is responsible for freeing the pbufs passed in! * * @param connection Unique connection identifier. @@ -209,7 +222,9 @@ err_t httpd_post_begin(void *connection, const char *uri, const char *http_reque */ err_t httpd_post_receive_data(void *connection, struct pbuf *p); -/** Called when all data is received or when the connection is closed. +/** + * @ingroup httpd + * Called when all data is received or when the connection is closed. * The application must return the filename/URI of a file to send in response * to this POST request. If the response_uri buffer is untouched, a 404 * response is returned. @@ -228,9 +243,13 @@ void httpd_post_data_recved(void *connection, u16_t recved_len); void httpd_init(void); +#if HTTPD_ENABLE_HTTPS +struct altcp_tls_config; +void httpd_inits(struct altcp_tls_config *conf); +#endif #ifdef __cplusplus } #endif -#endif /* LWIP_HTTPD_H */ +#endif /* LWIP_HDR_APPS_HTTPD_H */ diff --git a/Libraries/LwIP/src/include/lwip/apps/httpd_opts.h b/Libraries/LwIP/src/include/lwip/apps/httpd_opts.h index 81302c2..733e117 100755 --- a/Libraries/LwIP/src/include/lwip/apps/httpd_opts.h +++ b/Libraries/LwIP/src/include/lwip/apps/httpd_opts.h @@ -42,6 +42,7 @@ #define LWIP_HDR_APPS_HTTPD_OPTS_H #include "lwip/opt.h" +#include "lwip/prot/iana.h" /** * @defgroup httpd_opts Options @@ -49,27 +50,77 @@ * @{ */ -/** Set this to 1 to support CGI (old style) */ +/** Set this to 1 to support CGI (old style). + * + * This old style CGI support works by registering an array of URLs and + * associated CGI handler functions (@ref http_set_cgi_handlers). + * This list is scanned just before fs_open is called from request handling. + * The handler can return a new URL that is used internally by the httpd to + * load the returned page (passed to fs_open). + * + * Use this CGI type e.g. to execute specific actions and return a page that + * does not depend on the CGI parameters. + */ #if !defined LWIP_HTTPD_CGI || defined __DOXYGEN__ #define LWIP_HTTPD_CGI 0 #endif -/** Set this to 1 to support CGI (new style) */ +/** Set this to 1 to support CGI (new style). + * + * This new style CGI support works by calling a global function + * (@ref tCGIHandler) for all URLs that are found. fs_open is called first + * and the URL can not be written by the CGI handler. Instead, this handler gets + * passed the http file state, an object where it can store information derived + * from the CGI URL or parameters. This file state is later passed to SSI, so + * the SSI code can return data depending on CGI input. + * + * Use this CGI handler if you want CGI information passed on to SSI. + */ #if !defined LWIP_HTTPD_CGI_SSI || defined __DOXYGEN__ #define LWIP_HTTPD_CGI_SSI 0 #endif -/** Set this to 1 to support SSI (Server-Side-Includes) */ +/** Set this to 1 to support SSI (Server-Side-Includes) + * + * In contrast to other http servers, this only calls a preregistered callback + * function (@see http_set_ssi_handler) for each tag (in the format of + * ) encountered in SSI-enabled pages. + * SSI-enabled pages must have one of the predefined SSI-enabled file extensions. + * All files with one of these extensions are parsed when sent. + * + * A downside of the current SSI implementation is that persistent connections + * don't work, as the file length is not known in advance (and httpd currently + * relies on the Content-Length header for persistent connections). + * + * To save memory, the maximum tag length is limited (@see LWIP_HTTPD_MAX_TAG_NAME_LEN). + * To save memory, the maximum insertion string length is limited (@see + * LWIP_HTTPD_MAX_TAG_INSERT_LEN). If this is not enought, @ref LWIP_HTTPD_SSI_MULTIPART + * can be used. + */ #if !defined LWIP_HTTPD_SSI || defined __DOXYGEN__ #define LWIP_HTTPD_SSI 0 #endif /** Set this to 1 to implement an SSI tag handler callback that gets a const char* - * to the tag (instead of an index into a pre-registered array of known tags) */ + * to the tag (instead of an index into a pre-registered array of known tags) + * If this is 0, the SSI handler callback function is only called pre-registered tags. + */ #if !defined LWIP_HTTPD_SSI_RAW || defined __DOXYGEN__ #define LWIP_HTTPD_SSI_RAW 0 #endif +/** Set this to 0 to prevent parsing the file extension at runtime to decide + * if a file should be scanned for SSI tags or not. + * Default is 1 (file extensions are checked using the g_pcSSIExtensions array) + * Set to 2 to override this runtime test function. + * + * This is enabled by default, but if you only use a newer version of makefsdata + * supporting the "-ssi" option, this info is already present in + */ +#if !defined LWIP_HTTPD_SSI_BY_FILE_EXTENSION || defined __DOXYGEN__ +#define LWIP_HTTPD_SSI_BY_FILE_EXTENSION 1 +#endif + /** Set this to 1 to support HTTP POST */ #if !defined LWIP_HTTPD_SUPPORT_POST || defined __DOXYGEN__ #define LWIP_HTTPD_SUPPORT_POST 0 @@ -88,12 +139,16 @@ #define LWIP_HTTPD_SSI_MULTIPART 0 #endif -/* The maximum length of the string comprising the tag name */ +/* The maximum length of the string comprising the SSI tag name + * ATTENTION: tags longer than this are ignored, not truncated! + */ #if !defined LWIP_HTTPD_MAX_TAG_NAME_LEN || defined __DOXYGEN__ #define LWIP_HTTPD_MAX_TAG_NAME_LEN 8 #endif -/* The maximum length of string that can be returned to replace any given tag */ +/* The maximum length of string that can be returned to replace any given tag + * If this buffer is not long enough, use LWIP_HTTPD_SSI_MULTIPART. + */ #if !defined LWIP_HTTPD_MAX_TAG_INSERT_LEN || defined __DOXYGEN__ #define LWIP_HTTPD_MAX_TAG_INSERT_LEN 192 #endif @@ -122,6 +177,9 @@ /** Set this to 1 to use a memp pool for allocating * struct http_state instead of the heap. + * If enabled, you'll need to define MEMP_NUM_PARALLEL_HTTPD_CONNS + * (and MEMP_NUM_PARALLEL_HTTPD_SSI_CONNS for SSI) to set the size of + * the pool(s). */ #if !defined HTTPD_USE_MEM_POOL || defined __DOXYGEN__ #define HTTPD_USE_MEM_POOL 0 @@ -129,7 +187,17 @@ /** The server port for HTTPD to use */ #if !defined HTTPD_SERVER_PORT || defined __DOXYGEN__ -#define HTTPD_SERVER_PORT 80 +#define HTTPD_SERVER_PORT LWIP_IANA_PORT_HTTP +#endif + +/** The https server port for HTTPD to use */ +#if !defined HTTPD_SERVER_PORT_HTTPS || defined __DOXYGEN__ +#define HTTPD_SERVER_PORT_HTTPS LWIP_IANA_PORT_HTTPS +#endif + +/** Enable https support? */ +#if !defined HTTPD_ENABLE_HTTPS || defined __DOXYGEN__ +#define HTTPD_ENABLE_HTTPS 0 #endif /** Maximum retries before the connection is aborted/closed. @@ -243,7 +311,8 @@ #define LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED 0 #endif -/** Set this to 1 to send URIs without extension without headers */ +/** Set this to 1 to send URIs without extension without headers + * (who uses this at all??) */ #if !defined LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI || defined __DOXYGEN__ #define LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI 0 #endif @@ -260,10 +329,11 @@ #endif /* Define this to a function that returns the maximum amount of data to enqueue. - The function have this signature: u16_t fn(struct tcp_pcb* pcb); */ + The function have this signature: u16_t fn(struct altcp_pcb* pcb); + The best place to define this is the hooks file (@see LWIP_HOOK_FILENAME) */ #if !defined HTTPD_MAX_WRITE_LEN || defined __DOXYGEN__ #if HTTPD_LIMIT_SENDING_TO_2MSS -#define HTTPD_MAX_WRITE_LEN(pcb) (2 * tcp_mss(pcb)) +#define HTTPD_MAX_WRITE_LEN(pcb) ((u16_t)(2 * altcp_mss(pcb))) #endif #endif @@ -309,10 +379,14 @@ #define LWIP_HTTPD_FS_ASYNC_READ 0 #endif -/** Set this to 1 to include "fsdata_custom.c" instead of "fsdata.c" for the - * file system (to prevent changing the file included in CVS) */ -#if !defined HTTPD_USE_CUSTOM_FSDATA || defined __DOXYGEN__ -#define HTTPD_USE_CUSTOM_FSDATA 1 +/** Filename (including path) to use as FS data file */ +#if !defined HTTPD_FSDATA_FILE || defined __DOXYGEN__ +/* HTTPD_USE_CUSTOM_FSDATA: Compatibility with deprecated lwIP option */ +#if defined(HTTPD_USE_CUSTOM_FSDATA) && (HTTPD_USE_CUSTOM_FSDATA != 0) +#define HTTPD_FSDATA_FILE "fsdata_custom.c" +#else +#define HTTPD_FSDATA_FILE "fsdata.c" +#endif #endif /** diff --git a/Libraries/LwIP/src/include/lwip/apps/lwiperf.h b/Libraries/LwIP/src/include/lwip/apps/lwiperf.h index 63a0c0c..ff4d6f7 100755 --- a/Libraries/LwIP/src/include/lwip/apps/lwiperf.h +++ b/Libraries/LwIP/src/include/lwip/apps/lwiperf.h @@ -63,6 +63,17 @@ enum lwiperf_report_type LWIPERF_TCP_ABORTED_REMOTE }; +/** Control */ +enum lwiperf_client_type +{ + /** Unidirectional tx only test */ + LWIPERF_CLIENT, + /** Do a bidirectional test simultaneously */ + LWIPERF_DUAL, + /** Do a bidirectional test individually */ + LWIPERF_TRADEOFF +}; + /** Prototype of a report function that is called when a session is finished. This report function can show the test results. @param report_type contains the test result */ @@ -70,10 +81,15 @@ typedef void (*lwiperf_report_fn)(void *arg, enum lwiperf_report_type report_typ const ip_addr_t* local_addr, u16_t local_port, const ip_addr_t* remote_addr, u16_t remote_port, u32_t bytes_transferred, u32_t ms_duration, u32_t bandwidth_kbitpsec); - void* lwiperf_start_tcp_server(const ip_addr_t* local_addr, u16_t local_port, lwiperf_report_fn report_fn, void* report_arg); void* lwiperf_start_tcp_server_default(lwiperf_report_fn report_fn, void* report_arg); +void* lwiperf_start_tcp_client(const ip_addr_t* remote_addr, u16_t remote_port, + enum lwiperf_client_type type, + lwiperf_report_fn report_fn, void* report_arg); +void* lwiperf_start_tcp_client_default(const ip_addr_t* remote_addr, + lwiperf_report_fn report_fn, void* report_arg); + void lwiperf_abort(void* lwiperf_session); diff --git a/Libraries/LwIP/src/include/lwip/apps/mdns.h b/Libraries/LwIP/src/include/lwip/apps/mdns.h index b19f80c..3c3d054 100755 --- a/Libraries/LwIP/src/include/lwip/apps/mdns.h +++ b/Libraries/LwIP/src/include/lwip/apps/mdns.h @@ -34,12 +34,17 @@ * Author: Erik Ekman * */ -#ifndef LWIP_HDR_MDNS_H -#define LWIP_HDR_MDNS_H + +#ifndef LWIP_HDR_APPS_MDNS_H +#define LWIP_HDR_APPS_MDNS_H #include "lwip/apps/mdns_opts.h" #include "lwip/netif.h" +#ifdef __cplusplus +extern "C" { +#endif + #if LWIP_MDNS_RESPONDER enum mdns_sd_proto { @@ -47,6 +52,9 @@ enum mdns_sd_proto { DNSSD_PROTO_TCP = 1 }; +#define MDNS_PROBING_CONFLICT 0 +#define MDNS_PROBING_SUCCESSFUL 1 + #define MDNS_LABEL_MAXLEN 63 struct mdns_host; @@ -55,15 +63,43 @@ struct mdns_service; /** Callback function to add text to a reply, called when generating the reply */ typedef void (*service_get_txt_fn_t)(struct mdns_service *service, void *txt_userdata); +/** Callback function to let application know the result of probing network for name + * uniqueness, called with result MDNS_PROBING_SUCCESSFUL if no other node claimed + * use for the name for the netif or a service and is safe to use, or MDNS_PROBING_CONFLICT + * if another node is already using it and mdns is disabled on this interface */ +typedef void (*mdns_name_result_cb_t)(struct netif* netif, u8_t result); + void mdns_resp_init(void); +void mdns_resp_register_name_result_cb(mdns_name_result_cb_t cb); + err_t mdns_resp_add_netif(struct netif *netif, const char *hostname, u32_t dns_ttl); err_t mdns_resp_remove_netif(struct netif *netif); +err_t mdns_resp_rename_netif(struct netif *netif, const char *hostname); + +s8_t mdns_resp_add_service(struct netif *netif, const char *name, const char *service, enum mdns_sd_proto proto, u16_t port, u32_t dns_ttl, service_get_txt_fn_t txt_fn, void *txt_userdata); +err_t mdns_resp_del_service(struct netif *netif, s8_t slot); +err_t mdns_resp_rename_service(struct netif *netif, s8_t slot, const char *name); -err_t mdns_resp_add_service(struct netif *netif, const char *name, const char *service, enum mdns_sd_proto proto, u16_t port, u32_t dns_ttl, service_get_txt_fn_t txt_fn, void *txt_userdata); err_t mdns_resp_add_service_txtitem(struct mdns_service *service, const char *txt, u8_t txt_len); -void mdns_resp_netif_settings_changed(struct netif *netif); + +void mdns_resp_restart(struct netif *netif); +void mdns_resp_announce(struct netif *netif); + +/** + * @ingroup mdns + * Announce IP settings have changed on netif. + * Call this in your callback registered by netif_set_status_callback(). + * No need to call this function when LWIP_NETIF_EXT_STATUS_CALLBACK==1, + * this handled automatically for you. + * @param netif The network interface where settings have changed. + */ +#define mdns_resp_netif_settings_changed(netif) mdns_resp_announce(netif) #endif /* LWIP_MDNS_RESPONDER */ -#endif /* LWIP_HDR_MDNS_H */ +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_APPS_MDNS_H */ diff --git a/Libraries/LwIP/src/include/lwip/apps/mdns_opts.h b/Libraries/LwIP/src/include/lwip/apps/mdns_opts.h index 9f8e5f5..74d3f41 100755 --- a/Libraries/LwIP/src/include/lwip/apps/mdns_opts.h +++ b/Libraries/LwIP/src/include/lwip/apps/mdns_opts.h @@ -59,6 +59,13 @@ #define MDNS_MAX_SERVICES 1 #endif +/** MDNS_RESP_USENETIF_EXTCALLBACK==1: register an ext_callback on the netif + * to automatically restart probing/announcing on status or address change. + */ +#ifndef MDNS_RESP_USENETIF_EXTCALLBACK +#define MDNS_RESP_USENETIF_EXTCALLBACK LWIP_NETIF_EXT_STATUS_CALLBACK +#endif + /** * MDNS_DEBUG: Enable debugging for multicast DNS. */ diff --git a/Libraries/LwIP/src/include/lwip/apps/mdns_priv.h b/Libraries/LwIP/src/include/lwip/apps/mdns_priv.h index 9a48b5f..2394157 100755 --- a/Libraries/LwIP/src/include/lwip/apps/mdns_priv.h +++ b/Libraries/LwIP/src/include/lwip/apps/mdns_priv.h @@ -40,6 +40,10 @@ #include "lwip/apps/mdns_opts.h" #include "lwip/pbuf.h" +#ifdef __cplusplus +extern "C" { +#endif + #if LWIP_MDNS_RESPONDER /* Domain struct and methods - visible for unit tests */ @@ -63,4 +67,8 @@ u16_t mdns_compress_domain(struct pbuf *pbuf, u16_t *offset, struct mdns_domain #endif /* LWIP_MDNS_RESPONDER */ +#ifdef __cplusplus +} +#endif + #endif /* LWIP_HDR_MDNS_PRIV_H */ diff --git a/Libraries/LwIP/src/include/lwip/apps/mqtt.h b/Libraries/LwIP/src/include/lwip/apps/mqtt.h index f0f5bab..e796ae1 100755 --- a/Libraries/LwIP/src/include/lwip/apps/mqtt.h +++ b/Libraries/LwIP/src/include/lwip/apps/mqtt.h @@ -40,16 +40,24 @@ #include "lwip/apps/mqtt_opts.h" #include "lwip/err.h" #include "lwip/ip_addr.h" +#include "lwip/prot/iana.h" #ifdef __cplusplus extern "C" { #endif -typedef struct mqtt_client_t mqtt_client_t; +typedef struct mqtt_client_s mqtt_client_t; + +#if LWIP_ALTCP && LWIP_ALTCP_TLS +struct altcp_tls_config; +#endif /** @ingroup mqtt - * Default MQTT port */ -#define MQTT_PORT 1883 + * Default MQTT port (non-TLS) */ +#define MQTT_PORT LWIP_IANA_PORT_MQTT +/** @ingroup mqtt + * Default MQTT TLS port */ +#define MQTT_TLS_PORT LWIP_IANA_PORT_SECURE_MQTT /*---------------------------------------------------------------------------------------------- */ /* Connection with server */ @@ -60,17 +68,25 @@ typedef struct mqtt_client_t mqtt_client_t; struct mqtt_connect_client_info_t { /** Client identifier, must be set by caller */ const char *client_id; - /** User name and password, set to NULL if not used */ + /** User name, set to NULL if not used */ const char* client_user; + /** Password, set to NULL if not used */ const char* client_pass; /** keep alive time in seconds, 0 to disable keep alive functionality*/ u16_t keep_alive; /** will topic, set to NULL if will is not to be used, will_msg, will_qos and will retain are then ignored */ const char* will_topic; + /** will_msg, see will_topic */ const char* will_msg; + /** will_qos, see will_topic */ u8_t will_qos; + /** will_retain, see will_topic */ u8_t will_retain; +#if LWIP_ALTCP && LWIP_ALTCP_TLS + /** TLS configuration for secure connections */ + struct altcp_tls_config *tls_config; +#endif }; /** @@ -78,13 +94,21 @@ struct mqtt_connect_client_info_t { * Connection status codes */ typedef enum { + /** Accepted */ MQTT_CONNECT_ACCEPTED = 0, + /** Refused protocol version */ MQTT_CONNECT_REFUSED_PROTOCOL_VERSION = 1, + /** Refused identifier */ MQTT_CONNECT_REFUSED_IDENTIFIER = 2, + /** Refused server */ MQTT_CONNECT_REFUSED_SERVER = 3, + /** Refused user credentials */ MQTT_CONNECT_REFUSED_USERNAME_PASS = 4, + /** Refused not authorized */ MQTT_CONNECT_REFUSED_NOT_AUTHORIZED_ = 5, + /** Disconnected */ MQTT_CONNECT_DISCONNECTED = 256, + /** Timeout */ MQTT_CONNECT_TIMEOUT = 257 } mqtt_connection_status_t; @@ -92,7 +116,7 @@ typedef enum * @ingroup mqtt * Function prototype for mqtt connection status callback. Called when * client has connected to the server after initiating a mqtt connection attempt by - * calling mqtt_connect() or when connection is closed by server or an error + * calling mqtt_client_connect() or when connection is closed by server or an error * * @param client MQTT client itself * @param arg Additional argument to pass to the callback function @@ -149,80 +173,19 @@ typedef void (*mqtt_incoming_publish_cb_t)(void *arg, const char *topic, u32_t t typedef void (*mqtt_request_cb_t)(void *arg, err_t err); -/** - * Pending request item, binds application callback to pending server requests - */ -struct mqtt_request_t -{ - /** Next item in list, NULL means this is the last in chain, - next pointing at itself means request is unallocated */ - struct mqtt_request_t *next; - /** Callback to upper layer */ - mqtt_request_cb_t cb; - void *arg; - /** MQTT packet identifier */ - u16_t pkt_id; - /** Expire time relative to element before this */ - u16_t timeout_diff; -}; - -/** Ring buffer */ -struct mqtt_ringbuf_t { - u16_t put; - u16_t get; - u8_t buf[MQTT_OUTPUT_RINGBUF_SIZE]; -}; - -/** MQTT client */ -struct mqtt_client_t -{ - /** Timers and timeouts */ - u16_t cyclic_tick; - u16_t keep_alive; - u16_t server_watchdog; - /** Packet identifier generator*/ - u16_t pkt_id_seq; - /** Packet identifier of pending incoming publish */ - u16_t inpub_pkt_id; - /** Connection state */ - u8_t conn_state; - struct tcp_pcb *conn; - /** Connection callback */ - void *connect_arg; - mqtt_connection_cb_t connect_cb; - /** Pending requests to server */ - struct mqtt_request_t *pend_req_queue; - struct mqtt_request_t req_list[MQTT_REQ_MAX_IN_FLIGHT]; - void *inpub_arg; - /** Incoming data callback */ - mqtt_incoming_data_cb_t data_cb; - mqtt_incoming_publish_cb_t pub_cb; - /** Input */ - u32_t msg_idx; - u8_t rx_buffer[MQTT_VAR_HEADER_BUFFER_LEN]; - /** Output ring-buffer */ - struct mqtt_ringbuf_t output; -}; - - -/** Connect to server */ err_t mqtt_client_connect(mqtt_client_t *client, const ip_addr_t *ipaddr, u16_t port, mqtt_connection_cb_t cb, void *arg, const struct mqtt_connect_client_info_t *client_info); -/** Disconnect from server */ void mqtt_disconnect(mqtt_client_t *client); -/** Create new client */ mqtt_client_t *mqtt_client_new(void); +void mqtt_client_free(mqtt_client_t* client); -/** Check connection status */ u8_t mqtt_client_is_connected(mqtt_client_t *client); -/** Set callback to call for incoming publish */ void mqtt_set_inpub_callback(mqtt_client_t *client, mqtt_incoming_publish_cb_t, mqtt_incoming_data_cb_t data_cb, void *arg); -/** Common function for subscribe and unsubscribe */ err_t mqtt_sub_unsub(mqtt_client_t *client, const char *topic, u8_t qos, mqtt_request_cb_t cb, void *arg, u8_t sub); /** @ingroup mqtt @@ -232,8 +195,6 @@ err_t mqtt_sub_unsub(mqtt_client_t *client, const char *topic, u8_t qos, mqtt_re * Unsubscribe to topic */ #define mqtt_unsubscribe(client, topic, cb, arg) mqtt_sub_unsub(client, topic, 0, cb, arg, 0) - -/** Publish data to topic */ err_t mqtt_publish(mqtt_client_t *client, const char *topic, const void *payload, u16_t payload_length, u8_t qos, u8_t retain, mqtt_request_cb_t cb, void *arg); diff --git a/Libraries/LwIP/src/include/lwip/apps/mqtt_opts.h b/Libraries/LwIP/src/include/lwip/apps/mqtt_opts.h index 414755f..e056130 100755 --- a/Libraries/LwIP/src/include/lwip/apps/mqtt_opts.h +++ b/Libraries/LwIP/src/include/lwip/apps/mqtt_opts.h @@ -39,7 +39,7 @@ #include "lwip/opt.h" -#ifdef __cplusplus +#ifdef __cplusplus extern "C" { #endif diff --git a/Libraries/LwIP/src/include/lwip/apps/mqtt_priv.h b/Libraries/LwIP/src/include/lwip/apps/mqtt_priv.h new file mode 100644 index 0000000..b775913 --- /dev/null +++ b/Libraries/LwIP/src/include/lwip/apps/mqtt_priv.h @@ -0,0 +1,104 @@ +/** + * @file + * MQTT client (private interface) + */ + +/* + * Copyright (c) 2016 Erik Andersson + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Erik Andersson + * + */ +#ifndef LWIP_HDR_APPS_MQTT_PRIV_H +#define LWIP_HDR_APPS_MQTT_PRIV_H + +#include "lwip/apps/mqtt.h" +#include "lwip/altcp.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** Pending request item, binds application callback to pending server requests */ +struct mqtt_request_t +{ + /** Next item in list, NULL means this is the last in chain, + next pointing at itself means request is unallocated */ + struct mqtt_request_t *next; + /** Callback to upper layer */ + mqtt_request_cb_t cb; + void *arg; + /** MQTT packet identifier */ + u16_t pkt_id; + /** Expire time relative to element before this */ + u16_t timeout_diff; +}; + +/** Ring buffer */ +struct mqtt_ringbuf_t { + u16_t put; + u16_t get; + u8_t buf[MQTT_OUTPUT_RINGBUF_SIZE]; +}; + +/** MQTT client */ +struct mqtt_client_s +{ + /** Timers and timeouts */ + u16_t cyclic_tick; + u16_t keep_alive; + u16_t server_watchdog; + /** Packet identifier generator*/ + u16_t pkt_id_seq; + /** Packet identifier of pending incoming publish */ + u16_t inpub_pkt_id; + /** Connection state */ + u8_t conn_state; + struct altcp_pcb *conn; + /** Connection callback */ + void *connect_arg; + mqtt_connection_cb_t connect_cb; + /** Pending requests to server */ + struct mqtt_request_t *pend_req_queue; + struct mqtt_request_t req_list[MQTT_REQ_MAX_IN_FLIGHT]; + void *inpub_arg; + /** Incoming data callback */ + mqtt_incoming_data_cb_t data_cb; + mqtt_incoming_publish_cb_t pub_cb; + /** Input */ + u32_t msg_idx; + u8_t rx_buffer[MQTT_VAR_HEADER_BUFFER_LEN]; + /** Output ring-buffer */ + struct mqtt_ringbuf_t output; +}; + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_APPS_MQTT_PRIV_H */ diff --git a/Libraries/LwIP/src/include/lwip/apps/netbiosns.h b/Libraries/LwIP/src/include/lwip/apps/netbiosns.h index 4126606..c5aedb6 100755 --- a/Libraries/LwIP/src/include/lwip/apps/netbiosns.h +++ b/Libraries/LwIP/src/include/lwip/apps/netbiosns.h @@ -34,10 +34,18 @@ #include "lwip/apps/netbiosns_opts.h" +#ifdef __cplusplus +extern "C" { +#endif + void netbiosns_init(void); #ifndef NETBIOS_LWIP_NAME void netbiosns_set_name(const char* hostname); #endif void netbiosns_stop(void); +#ifdef __cplusplus +} +#endif + #endif /* LWIP_HDR_APPS_NETBIOS_H */ diff --git a/Libraries/LwIP/src/include/lwip/apps/netbiosns_opts.h b/Libraries/LwIP/src/include/lwip/apps/netbiosns_opts.h index f4d2039..0bab59e 100755 --- a/Libraries/LwIP/src/include/lwip/apps/netbiosns_opts.h +++ b/Libraries/LwIP/src/include/lwip/apps/netbiosns_opts.h @@ -52,6 +52,13 @@ #define NETBIOS_LWIP_NAME "NETBIOSLWIPDEV" #endif +/** Respond to NetBIOS name queries + * Default is disabled + */ +#if !defined LWIP_NETBIOS_RESPOND_NAME_QUERY || defined __DOXYGEN__ +#define LWIP_NETBIOS_RESPOND_NAME_QUERY 0 +#endif + /** * @} */ diff --git a/Libraries/LwIP/src/include/lwip/apps/smtp.h b/Libraries/LwIP/src/include/lwip/apps/smtp.h new file mode 100644 index 0000000..fb4a4a7 --- /dev/null +++ b/Libraries/LwIP/src/include/lwip/apps/smtp.h @@ -0,0 +1,128 @@ +#ifndef LWIP_HDR_APPS_SMTP_H +#define LWIP_HDR_APPS_SMTP_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "lwip/apps/smtp_opts.h" +#include "lwip/err.h" +#include "lwip/prot/iana.h" + +/** The default TCP port used for SMTP */ +#define SMTP_DEFAULT_PORT LWIP_IANA_PORT_SMTP +/** The default TCP port used for SMTPS */ +#define SMTPS_DEFAULT_PORT LWIP_IANA_PORT_SMTPS + +/** Email successfully sent */ +#define SMTP_RESULT_OK 0 +/** Unknown error */ +#define SMTP_RESULT_ERR_UNKNOWN 1 +/** Connection to server failed */ +#define SMTP_RESULT_ERR_CONNECT 2 +/** Failed to resolve server hostname */ +#define SMTP_RESULT_ERR_HOSTNAME 3 +/** Connection unexpectedly closed by remote server */ +#define SMTP_RESULT_ERR_CLOSED 4 +/** Connection timed out (server didn't respond in time) */ +#define SMTP_RESULT_ERR_TIMEOUT 5 +/** Server responded with an unknown response code */ +#define SMTP_RESULT_ERR_SVR_RESP 6 +/** Out of resources locally */ +#define SMTP_RESULT_ERR_MEM 7 + +/** Prototype of an smtp callback function + * + * @param arg argument specified when initiating the email + * @param smtp_result result of the mail transfer (see defines SMTP_RESULT_*) + * @param srv_err if aborted by the server, this contains the error code received + * @param err an error returned by internal lwip functions, can help to specify + * the source of the error but must not necessarily be != ERR_OK + */ +typedef void (*smtp_result_fn)(void *arg, u8_t smtp_result, u16_t srv_err, err_t err); + +/** This structure is used as argument for smtp_send_mail_int(), + * which in turn can be used with tcpip_callback() to send mail + * from interrupt context, e.g. like this: + * struct smtp_send_request *req; (to be filled) + * tcpip_try_callback(smtp_send_mail_int, (void*)req); + * + * For member description, see parameter description of smtp_send_mail(). + * When using with tcpip_callback, this structure has to stay allocated + * (e.g. using mem_malloc/mem_free) until its 'callback_fn' is called. + */ +struct smtp_send_request { + const char *from; + const char* to; + const char* subject; + const char* body; + smtp_result_fn callback_fn; + void* callback_arg; + /** If this is != 0, data is *not* copied into an extra buffer + * but used from the pointers supplied in this struct. + * This means less memory usage, but data must stay untouched until + * the callback function is called. */ + u8_t static_data; +}; + + +#if SMTP_BODYDH + +#ifndef SMTP_BODYDH_BUFFER_SIZE +#define SMTP_BODYDH_BUFFER_SIZE 256 +#endif /* SMTP_BODYDH_BUFFER_SIZE */ + +struct smtp_bodydh { + u16_t state; + u16_t length; /* Length of content in buffer */ + char buffer[SMTP_BODYDH_BUFFER_SIZE]; /* buffer for generated content */ +#ifdef SMTP_BODYDH_USER_SIZE + u8_t user[SMTP_BODYDH_USER_SIZE]; +#endif /* SMTP_BODYDH_USER_SIZE */ +}; + +enum bdh_retvals_e { + BDH_DONE = 0, + BDH_WORKING +}; + +/** Prototype of an smtp body callback function + * It receives a struct smtp_bodydh, and a buffer to write data, + * must return BDH_WORKING to be called again and BDH_DONE when + * it has finished processing. This one tries to fill one TCP buffer with + * data, your function will be repeatedly called until that happens; so if you + * know you'll be taking too long to serve your request, pause once in a while + * by writing length=0 to avoid hogging system resources + * + * @param arg argument specified when initiating the email + * @param smtp_bodydh state handling + buffer structure + */ +typedef int (*smtp_bodycback_fn)(void *arg, struct smtp_bodydh *bodydh); + +err_t smtp_send_mail_bodycback(const char *from, const char* to, const char* subject, + smtp_bodycback_fn bodycback_fn, smtp_result_fn callback_fn, void* callback_arg); + +#endif /* SMTP_BODYDH */ + + +err_t smtp_set_server_addr(const char* server); +void smtp_set_server_port(u16_t port); +#if LWIP_ALTCP && LWIP_ALTCP_TLS +struct altcp_tls_config; +void smtp_set_tls_config(struct altcp_tls_config *tls_config); +#endif +err_t smtp_set_auth(const char* username, const char* pass); +err_t smtp_send_mail(const char *from, const char* to, const char* subject, const char* body, + smtp_result_fn callback_fn, void* callback_arg); +err_t smtp_send_mail_static(const char *from, const char* to, const char* subject, const char* body, + smtp_result_fn callback_fn, void* callback_arg); +void smtp_send_mail_int(void *arg); +#ifdef LWIP_DEBUG +const char* smtp_result_str(u8_t smtp_result); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_APPS_SMTP_H */ diff --git a/Libraries/LwIP/src/include/lwip/apps/smtp_opts.h b/Libraries/LwIP/src/include/lwip/apps/smtp_opts.h new file mode 100644 index 0000000..bc743f6 --- /dev/null +++ b/Libraries/LwIP/src/include/lwip/apps/smtp_opts.h @@ -0,0 +1,81 @@ +#ifndef LWIP_HDR_APPS_SMTP_OPTS_H +#define LWIP_HDR_APPS_SMTP_OPTS_H + +#include "lwip/opt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @defgroup smtp_opts Options + * @ingroup smtp + * + * @{ + */ + +/** Set this to 1 to enable data handler callback on BODY */ +#ifndef SMTP_BODYDH +#define SMTP_BODYDH 0 +#endif + +/** SMTP_DEBUG: Enable debugging for SNTP. */ +#ifndef SMTP_DEBUG +#define SMTP_DEBUG LWIP_DBG_OFF +#endif + +/** Maximum length reserved for server name including terminating 0 byte */ +#ifndef SMTP_MAX_SERVERNAME_LEN +#define SMTP_MAX_SERVERNAME_LEN 256 +#endif + +/** Maximum length reserved for username */ +#ifndef SMTP_MAX_USERNAME_LEN +#define SMTP_MAX_USERNAME_LEN 32 +#endif + +/** Maximum length reserved for password */ +#ifndef SMTP_MAX_PASS_LEN +#define SMTP_MAX_PASS_LEN 32 +#endif + +/** Set this to 0 if you know the authentication data will not change + * during the smtp session, which saves some heap space. */ +#ifndef SMTP_COPY_AUTHDATA +#define SMTP_COPY_AUTHDATA 1 +#endif + +/** Set this to 0 to save some code space if you know for sure that all data + * passed to this module conforms to the requirements in the SMTP RFC. + * WARNING: use this with care! + */ +#ifndef SMTP_CHECK_DATA +#define SMTP_CHECK_DATA 1 +#endif + +/** Set this to 1 to enable AUTH PLAIN support */ +#ifndef SMTP_SUPPORT_AUTH_PLAIN +#define SMTP_SUPPORT_AUTH_PLAIN 1 +#endif + +/** Set this to 1 to enable AUTH LOGIN support */ +#ifndef SMTP_SUPPORT_AUTH_LOGIN +#define SMTP_SUPPORT_AUTH_LOGIN 1 +#endif + +/* Memory allocation/deallocation can be overridden... */ +#ifndef SMTP_STATE_MALLOC +#define SMTP_STATE_MALLOC(size) mem_malloc(size) +#define SMTP_STATE_FREE(ptr) mem_free(ptr) +#endif + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* SMTP_OPTS_H */ + diff --git a/Libraries/LwIP/src/include/lwip/apps/snmp.h b/Libraries/LwIP/src/include/lwip/apps/snmp.h index 5f267be..15b154e 100755 --- a/Libraries/LwIP/src/include/lwip/apps/snmp.h +++ b/Libraries/LwIP/src/include/lwip/apps/snmp.h @@ -106,6 +106,13 @@ err_t snmp_send_trap(const struct snmp_obj_id* oid, s32_t generic_trap, s32_t sp void snmp_set_auth_traps_enabled(u8_t enable); u8_t snmp_get_auth_traps_enabled(void); +u8_t snmp_v1_enabled(void); +u8_t snmp_v2c_enabled(void); +u8_t snmp_v3_enabled(void); +void snmp_v1_enable(u8_t enable); +void snmp_v2c_enable(u8_t enable); +void snmp_v3_enable(u8_t enable); + const char * snmp_get_community(void); const char * snmp_get_community_write(void); const char * snmp_get_community_trap(void); diff --git a/Libraries/LwIP/src/include/lwip/apps/snmp_core.h b/Libraries/LwIP/src/include/lwip/apps/snmp_core.h index a832572..4748df6 100755 --- a/Libraries/LwIP/src/include/lwip/apps/snmp_core.h +++ b/Libraries/LwIP/src/include/lwip/apps/snmp_core.h @@ -91,7 +91,9 @@ extern "C" { #define SNMP_ASN1_TYPE_UNSIGNED32 SNMP_ASN1_TYPE_GAUGE #define SNMP_ASN1_TYPE_TIMETICKS (SNMP_ASN1_CLASS_APPLICATION | SNMP_ASN1_CONTENTTYPE_PRIMITIVE | SNMP_ASN1_APPLICATION_TIMETICKS) #define SNMP_ASN1_TYPE_OPAQUE (SNMP_ASN1_CLASS_APPLICATION | SNMP_ASN1_CONTENTTYPE_PRIMITIVE | SNMP_ASN1_APPLICATION_OPAQUE) +#if LWIP_HAVE_INT64 #define SNMP_ASN1_TYPE_COUNTER64 (SNMP_ASN1_CLASS_APPLICATION | SNMP_ASN1_CONTENTTYPE_PRIMITIVE | SNMP_ASN1_APPLICATION_COUNTER64) +#endif #define SNMP_VARBIND_EXCEPTION_OFFSET 0xF0 #define SNMP_VARBIND_EXCEPTION_MASK 0x0F @@ -144,6 +146,9 @@ union snmp_variant_value const void* const_ptr; u32_t u32; s32_t s32; +#if LWIP_HAVE_INT64 + u64_t u64; +#endif }; @@ -186,7 +191,7 @@ typedef snmp_err_t (*node_instance_set_test_method)(struct snmp_node_instance*, typedef snmp_err_t (*node_instance_set_value_method)(struct snmp_node_instance*, u16_t, void*); typedef void (*node_instance_release_method)(struct snmp_node_instance*); -#define SNMP_GET_VALUE_RAW_DATA 0x8000 +#define SNMP_GET_VALUE_RAW_DATA 0x4000 /* do not use 0x8000 because return value of node_instance_get_value_method is signed16 and 0x8000 would be the signed bit */ /** SNMP node instance */ struct snmp_node_instance @@ -286,8 +291,8 @@ struct snmp_next_oid_state void snmp_next_oid_init(struct snmp_next_oid_state *state, const u32_t *start_oid, u8_t start_oid_len, u32_t *next_oid_buf, u8_t next_oid_max_len); -u8_t snmp_next_oid_precheck(struct snmp_next_oid_state *state, const u32_t *oid, const u8_t oid_len); -u8_t snmp_next_oid_check(struct snmp_next_oid_state *state, const u32_t *oid, const u8_t oid_len, void* reference); +u8_t snmp_next_oid_precheck(struct snmp_next_oid_state *state, const u32_t *oid, u8_t oid_len); +u8_t snmp_next_oid_check(struct snmp_next_oid_state *state, const u32_t *oid, u8_t oid_len, void* reference); void snmp_oid_assign(struct snmp_obj_id* target, const u32_t *oid, u8_t oid_len); void snmp_oid_combine(struct snmp_obj_id* target, const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len); @@ -351,6 +356,14 @@ struct snmp_statistics u32_t outsetrequests; u32_t outgetresponses; u32_t outtraps; +#if LWIP_SNMP_V3 + u32_t unsupportedseclevels; + u32_t notintimewindows; + u32_t unknownusernames; + u32_t unknownengineids; + u32_t wrongdigests; + u32_t decryptionerrors; +#endif }; extern struct snmp_statistics snmp_stats; diff --git a/Libraries/LwIP/src/include/lwip/apps/snmp_opts.h b/Libraries/LwIP/src/include/lwip/apps/snmp_opts.h index d4ae068..1c63504 100755 --- a/Libraries/LwIP/src/include/lwip/apps/snmp_opts.h +++ b/Libraries/LwIP/src/include/lwip/apps/snmp_opts.h @@ -133,11 +133,11 @@ #if !defined SNMP_MAX_VALUE_SIZE || defined __DOXYGEN__ /** - * The maximum size of a value. + * The minimum size of a value. */ #define SNMP_MIN_VALUE_SIZE (2 * sizeof(u32_t*)) /* size required to store the basic types (8 bytes for counter64) */ /** - * The minimum size of a value. + * The maximum size of a value. */ #define SNMP_MAX_VALUE_SIZE LWIP_MAX(LWIP_MAX((SNMP_MAX_OCTET_STRING_LEN), sizeof(u32_t)*(SNMP_MAX_OBJ_ID_LEN)), SNMP_MIN_VALUE_SIZE) #endif @@ -282,12 +282,16 @@ #define LWIP_SNMP_V3 0 #endif -#ifndef LWIP_SNMP_V3_CRYPTO -#define LWIP_SNMP_V3_CRYPTO LWIP_SNMP_V3 -#endif - #ifndef LWIP_SNMP_V3_MBEDTLS #define LWIP_SNMP_V3_MBEDTLS LWIP_SNMP_V3 #endif +#ifndef LWIP_SNMP_V3_CRYPTO +#define LWIP_SNMP_V3_CRYPTO LWIP_SNMP_V3_MBEDTLS +#endif + +#ifndef LWIP_SNMP_CONFIGURE_VERSIONS +#define LWIP_SNMP_CONFIGURE_VERSIONS 0 +#endif + #endif /* LWIP_HDR_SNMP_OPTS_H */ diff --git a/Libraries/LwIP/src/include/lwip/apps/snmp_snmpv2_framework.h b/Libraries/LwIP/src/include/lwip/apps/snmp_snmpv2_framework.h new file mode 100644 index 0000000..47409cc --- /dev/null +++ b/Libraries/LwIP/src/include/lwip/apps/snmp_snmpv2_framework.h @@ -0,0 +1,32 @@ +/* +Generated by LwipMibCompiler +*/ + +#ifndef LWIP_HDR_APPS_SNMP_FRAMEWORK_MIB_H +#define LWIP_HDR_APPS_SNMP_FRAMEWORK_MIB_H + +#include "lwip/apps/snmp_opts.h" +#if LWIP_SNMP + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#include "lwip/apps/snmp_core.h" + +extern const struct snmp_obj_id usmNoAuthProtocol; +extern const struct snmp_obj_id usmHMACMD5AuthProtocol; +extern const struct snmp_obj_id usmHMACSHAAuthProtocol; + +extern const struct snmp_obj_id usmNoPrivProtocol; +extern const struct snmp_obj_id usmDESPrivProtocol; +extern const struct snmp_obj_id usmAESPrivProtocol; + +extern const struct snmp_mib snmpframeworkmib; + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* LWIP_SNMP */ +#endif /* LWIP_HDR_APPS_SNMP_FRAMEWORK_MIB_H */ diff --git a/Libraries/LwIP/src/include/lwip/apps/snmp_snmpv2_usm.h b/Libraries/LwIP/src/include/lwip/apps/snmp_snmpv2_usm.h new file mode 100644 index 0000000..88cfcd8 --- /dev/null +++ b/Libraries/LwIP/src/include/lwip/apps/snmp_snmpv2_usm.h @@ -0,0 +1,24 @@ +/* +Generated by LwipMibCompiler +*/ + +#ifndef LWIP_HDR_APPS_SNMP_USER_BASED_SM_MIB_H +#define LWIP_HDR_APPS_SNMP_USER_BASED_SM_MIB_H + +#include "lwip/apps/snmp_opts.h" +#if LWIP_SNMP + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#include "lwip/apps/snmp_core.h" + +extern const struct snmp_mib snmpusmmib; + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* LWIP_SNMP */ +#endif /* LWIP_HDR_APPS_SNMP_USER_BASED_SM_MIB_H */ diff --git a/Libraries/LwIP/src/include/lwip/apps/snmpv3.h b/Libraries/LwIP/src/include/lwip/apps/snmpv3.h index 99a7fd2..bd7d314 100755 --- a/Libraries/LwIP/src/include/lwip/apps/snmpv3.h +++ b/Libraries/LwIP/src/include/lwip/apps/snmpv3.h @@ -38,18 +38,34 @@ #include "lwip/apps/snmp_opts.h" #include "lwip/err.h" +#ifdef __cplusplus +extern "C" { +#endif + #if LWIP_SNMP && LWIP_SNMP_V3 -#define SNMP_V3_AUTH_ALGO_INVAL 0 -#define SNMP_V3_AUTH_ALGO_MD5 1 -#define SNMP_V3_AUTH_ALGO_SHA 2 +typedef enum +{ + SNMP_V3_AUTH_ALGO_INVAL = 0, + SNMP_V3_AUTH_ALGO_MD5 = 1, + SNMP_V3_AUTH_ALGO_SHA = 2 +} snmpv3_auth_algo_t; -#define SNMP_V3_PRIV_ALGO_INVAL 0 -#define SNMP_V3_PRIV_ALGO_DES 1 -#define SNMP_V3_PRIV_ALGO_AES 2 +typedef enum +{ + SNMP_V3_PRIV_ALGO_INVAL = 0, + SNMP_V3_PRIV_ALGO_DES = 1, + SNMP_V3_PRIV_ALGO_AES = 2 +} snmpv3_priv_algo_t; -#define SNMP_V3_PRIV_MODE_DECRYPT 0 -#define SNMP_V3_PRIV_MODE_ENCRYPT 1 +typedef enum +{ + SNMP_V3_USER_STORAGETYPE_OTHER = 1, + SNMP_V3_USER_STORAGETYPE_VOLATILE = 2, + SNMP_V3_USER_STORAGETYPE_NONVOLATILE = 3, + SNMP_V3_USER_STORAGETYPE_PERMANENT = 4, + SNMP_V3_USER_STORAGETYPE_READONLY = 5 +} snmpv3_user_storagetype_t; /* * The following callback functions must be implemented by the application. @@ -65,26 +81,34 @@ void snmpv3_set_engine_boots(u32_t boots); u32_t snmpv3_get_engine_time(void); void snmpv3_reset_engine_time(void); -err_t snmpv3_get_user(const char* username, u8_t *auth_algo, u8_t *auth_key, u8_t *priv_algo, u8_t *priv_key); +err_t snmpv3_get_user(const char* username, snmpv3_auth_algo_t *auth_algo, u8_t *auth_key, snmpv3_priv_algo_t *priv_algo, u8_t *priv_key); +u8_t snmpv3_get_amount_of_users(void); +err_t snmpv3_get_user_storagetype(const char *username, snmpv3_user_storagetype_t *storagetype); +err_t snmpv3_get_username(char *username, u8_t index); /* The following functions are provided by the SNMPv3 agent */ void snmpv3_engine_id_changed(void); +s32_t snmpv3_get_engine_time_internal(void); void snmpv3_password_to_key_md5( const u8_t *password, /* IN */ - u8_t passwordlen, /* IN */ + size_t passwordlen, /* IN */ const u8_t *engineID, /* IN - pointer to snmpEngineID */ u8_t engineLength, /* IN - length of snmpEngineID */ u8_t *key); /* OUT - pointer to caller 16-octet buffer */ void snmpv3_password_to_key_sha( const u8_t *password, /* IN */ - u8_t passwordlen, /* IN */ + size_t passwordlen, /* IN */ const u8_t *engineID, /* IN - pointer to snmpEngineID */ u8_t engineLength, /* IN - length of snmpEngineID */ u8_t *key); /* OUT - pointer to caller 20-octet buffer */ #endif +#ifdef __cplusplus +} +#endif + #endif /* LWIP_HDR_APPS_SNMP_V3_H */ diff --git a/Libraries/LwIP/src/include/lwip/apps/sntp.h b/Libraries/LwIP/src/include/lwip/apps/sntp.h index 3910917..00135b4 100755 --- a/Libraries/LwIP/src/include/lwip/apps/sntp.h +++ b/Libraries/LwIP/src/include/lwip/apps/sntp.h @@ -58,9 +58,13 @@ u8_t sntp_enabled(void); void sntp_setserver(u8_t idx, const ip_addr_t *addr); const ip_addr_t* sntp_getserver(u8_t idx); +#if SNTP_MONITOR_SERVER_REACHABILITY +u8_t sntp_getreachability(u8_t idx); +#endif /* SNTP_MONITOR_SERVER_REACHABILITY */ + #if SNTP_SERVER_DNS -void sntp_setservername(u8_t idx, char *server); -char *sntp_getservername(u8_t idx); +void sntp_setservername(u8_t idx, const char *server); +const char *sntp_getservername(u8_t idx); #endif /* SNTP_SERVER_DNS */ #if SNTP_GET_SERVERS_FROM_DHCP diff --git a/Libraries/LwIP/src/include/lwip/apps/sntp_opts.h b/Libraries/LwIP/src/include/lwip/apps/sntp_opts.h index c28b864..c25a386 100755 --- a/Libraries/LwIP/src/include/lwip/apps/sntp_opts.h +++ b/Libraries/LwIP/src/include/lwip/apps/sntp_opts.h @@ -38,6 +38,7 @@ #define LWIP_HDR_APPS_SNTP_OPTS_H #include "lwip/opt.h" +#include "lwip/prot/iana.h" /** * @defgroup sntp_opts Options @@ -46,8 +47,10 @@ */ /** SNTP macro to change system time in seconds - * Define SNTP_SET_SYSTEM_TIME_US(sec, us) to set the time in microseconds instead of this one - * if you need the additional precision. + * Define SNTP_SET_SYSTEM_TIME_US(sec, us) to set the time in microseconds + * instead of this one if you need the additional precision. Alternatively, + * define SNTP_SET_SYSTEM_TIME_NTP(sec, frac) in order to work with native + * NTP timestamps instead. */ #if !defined SNTP_SET_SYSTEM_TIME || defined __DOXYGEN__ #define SNTP_SET_SYSTEM_TIME(sec) LWIP_UNUSED_ARG(sec) @@ -81,12 +84,7 @@ /** SNTP server port */ #if !defined SNTP_PORT || defined __DOXYGEN__ -#define SNTP_PORT 123 -#endif - -/** Set this to 1 to allow config of SNTP server(s) by DNS name */ -#if !defined SNTP_SERVER_DNS || defined __DOXYGEN__ -#define SNTP_SERVER_DNS 0 +#define SNTP_PORT LWIP_IANA_PORT_SNTP #endif /** Sanity check: @@ -96,7 +94,7 @@ * response comes from the server we sent the request to. * - >= 2 to check returned Originate Timestamp against Transmit Timestamp * sent to the server (to ensure response to older request). - * - >= 3 @todo: discard reply if any of the LI, Stratum, or Transmit Timestamp + * - >= 3 @todo: discard reply if any of the VN, Stratum, or Transmit Timestamp * fields is 0 or the Mode field is not 4 (unicast) or 5 (broadcast). * - >= 4 @todo: to check that the Root Delay and Root Dispersion fields are each * greater than or equal to 0 and less than infinity, where infinity is @@ -107,6 +105,30 @@ #define SNTP_CHECK_RESPONSE 0 #endif +/** Enable round-trip delay compensation. + * Compensate for the round-trip delay by calculating the clock offset from + * the originate, receive, transmit and destination timestamps, as per RFC. + * + * The calculation requires compiler support for 64-bit integers. Also, either + * SNTP_SET_SYSTEM_TIME_US or SNTP_SET_SYSTEM_TIME_NTP has to be implemented + * for setting the system clock with sub-second precision. Likewise, either + * SNTP_GET_SYSTEM_TIME or SNTP_GET_SYSTEM_TIME_NTP needs to be implemented + * with sub-second precision. + * + * Although not strictly required, it makes sense to combine this option with + * SNTP_CHECK_RESPONSE >= 2 for sanity-checking of the received timestamps. + * Also, in order for the round-trip calculation to work, the difference + * between the local clock and the NTP server clock must not be larger than + * about 34 years. If that limit is exceeded, the implementation will fall back + * to setting the clock without compensation. In order to ensure that the local + * clock is always within the permitted range for compensation, even at first + * try, it may be necessary to store at least the current year in non-volatile + * memory. + */ +#if !defined SNTP_COMP_ROUNDTRIP || defined __DOXYGEN__ +#define SNTP_COMP_ROUNDTRIP 0 +#endif + /** According to the RFC, this shall be a random delay * between 1 and 5 minutes (in milliseconds) to prevent load peaks. * This can be defined to a random generation function, @@ -114,33 +136,40 @@ * Turned off by default. */ #if !defined SNTP_STARTUP_DELAY || defined __DOXYGEN__ +#ifdef LWIP_RAND +#define SNTP_STARTUP_DELAY 1 +#else #define SNTP_STARTUP_DELAY 0 #endif +#endif /** If you want the startup delay to be a function, define this * to a function (including the brackets) and define SNTP_STARTUP_DELAY to 1. */ #if !defined SNTP_STARTUP_DELAY_FUNC || defined __DOXYGEN__ -#define SNTP_STARTUP_DELAY_FUNC SNTP_STARTUP_DELAY +#define SNTP_STARTUP_DELAY_FUNC (LWIP_RAND() % 5000) #endif /** SNTP receive timeout - in milliseconds * Also used as retry timeout - this shouldn't be too low. - * Default is 3 seconds. + * Default is 15 seconds. Must not be beolw 15 seconds by specification (i.e. 15000) */ #if !defined SNTP_RECV_TIMEOUT || defined __DOXYGEN__ -#define SNTP_RECV_TIMEOUT 3000 +#define SNTP_RECV_TIMEOUT 15000 #endif /** SNTP update delay - in milliseconds - * Default is 1 hour. Must not be beolw 15 seconds by specification (i.e. 15000) + * Default is 1 hour. Must not be beolw 60 seconds by specification (i.e. 60000) */ #if !defined SNTP_UPDATE_DELAY || defined __DOXYGEN__ #define SNTP_UPDATE_DELAY 3600000 #endif /** SNTP macro to get system time, used with SNTP_CHECK_RESPONSE >= 2 - * to send in request and compare in response. + * to send in request and compare in response. Also used for round-trip + * delay compensation if SNTP_COMP_ROUNDTRIP != 0. + * Alternatively, define SNTP_GET_SYSTEM_TIME_NTP(sec, frac) in order to + * work with native NTP timestamps instead. */ #if !defined SNTP_GET_SYSTEM_TIME || defined __DOXYGEN__ #define SNTP_GET_SYSTEM_TIME(sec, us) do { (sec) = 0; (us) = 0; } while(0) @@ -166,6 +195,13 @@ #define SNTP_RETRY_TIMEOUT_EXP 1 #endif +/** Keep a reachability shift register per server + * Default is on to conform to RFC. + */ +#if !defined SNTP_MONITOR_SERVER_REACHABILITY || defined __DOXYGEN__ +#define SNTP_MONITOR_SERVER_REACHABILITY 1 +#endif + /** * @} */ diff --git a/Libraries/LwIP/src/include/lwip/apps/tftp_opts.h b/Libraries/LwIP/src/include/lwip/apps/tftp_opts.h index bf115dc..d187b82 100755 --- a/Libraries/LwIP/src/include/lwip/apps/tftp_opts.h +++ b/Libraries/LwIP/src/include/lwip/apps/tftp_opts.h @@ -1,4 +1,4 @@ -/****************************************************************//** +/** * * @file tftp_opts.h * @@ -9,7 +9,7 @@ * Copyright (c) Deltatee Enterprises Ltd. 2013 * All rights reserved. * - ********************************************************************/ + */ /* * Redistribution and use in source and binary forms, with or without @@ -42,6 +42,7 @@ #define LWIP_HDR_APPS_TFTP_OPTS_H #include "lwip/opt.h" +#include "lwip/prot/iana.h" /** * @defgroup tftp_opts Options @@ -53,14 +54,14 @@ * Enable TFTP debug messages */ #if !defined TFTP_DEBUG || defined __DOXYGEN__ -#define TFTP_DEBUG LWIP_DBG_ON +#define TFTP_DEBUG LWIP_DBG_OFF #endif /** * TFTP server port */ #if !defined TFTP_PORT || defined __DOXYGEN__ -#define TFTP_PORT 69 +#define TFTP_PORT LWIP_IANA_PORT_TFTP #endif /** @@ -81,7 +82,7 @@ * TFTP timer cyclic interval */ #if !defined TFTP_TIMER_MSECS || defined __DOXYGEN__ -#define TFTP_TIMER_MSECS 50 +#define TFTP_TIMER_MSECS (TFTP_TIMEOUT_MSECS / 10) #endif /** diff --git a/Libraries/LwIP/src/include/lwip/apps/tftp_server.h b/Libraries/LwIP/src/include/lwip/apps/tftp_server.h index 1ad91dc..3ce5e40 100755 --- a/Libraries/LwIP/src/include/lwip/apps/tftp_server.h +++ b/Libraries/LwIP/src/include/lwip/apps/tftp_server.h @@ -1,4 +1,4 @@ -/****************************************************************//** +/** * * @file tftp_server.h * @@ -9,7 +9,7 @@ * Copyright (c) Deltatee Enterprises Ltd. 2013 * All rights reserved. * - ********************************************************************/ + */ /* * Redistribution and use in source and binary forms, with or without @@ -86,6 +86,7 @@ struct tftp_context { }; err_t tftp_init(const struct tftp_context* ctx); +void tftp_cleanup(void); #ifdef __cplusplus } diff --git a/Libraries/LwIP/src/include/lwip/arch.h b/Libraries/LwIP/src/include/lwip/arch.h index f366ab5..d281da7 100755 --- a/Libraries/LwIP/src/include/lwip/arch.h +++ b/Libraries/LwIP/src/include/lwip/arch.h @@ -52,6 +52,8 @@ * @ingroup sys_layer * All defines related to this section must not be placed in lwipopts.h, * but in arch/cc.h! + * If the compiler does not provide memset() this file must include a + * definition of it, or include a file which defines it. * These options cannot be \#defined in lwipopts.h since they are not options * of lwIP itself, but options of the lwIP port to your system. * @{ @@ -116,12 +118,20 @@ /* Define generic types used in lwIP */ #if !LWIP_NO_STDINT_H #include +/* stdint.h is C99 which should also provide support for 64-bit integers */ +#if !defined(LWIP_HAVE_INT64) && defined(UINT64_MAX) +#define LWIP_HAVE_INT64 1 +#endif typedef uint8_t u8_t; typedef int8_t s8_t; typedef uint16_t u16_t; typedef int16_t s16_t; typedef uint32_t u32_t; typedef int32_t s32_t; +#if LWIP_HAVE_INT64 +typedef uint64_t u64_t; +typedef int64_t s64_t; +#endif typedef uintptr_t mem_ptr_t; #endif @@ -164,7 +174,7 @@ typedef uintptr_t mem_ptr_t; /** Define this to 1 in arch/cc.h of your port if your compiler does not provide * the limits.h header. You need to define the type limits yourself in this case - * (e.g. INT_MAX). + * (e.g. INT_MAX, SSIZE_MAX). */ #ifndef LWIP_NO_LIMITS_H #define LWIP_NO_LIMITS_H 0 @@ -175,6 +185,56 @@ typedef uintptr_t mem_ptr_t; #include #endif +/* Do we need to define ssize_t? This is a compatibility hack: + * Unfortunately, this type seems to be unavailable on some systems (even if + * sys/types or unistd.h are available). + * Being like that, we define it to 'int' if SSIZE_MAX is not defined. + */ +#ifdef SSIZE_MAX +/* If SSIZE_MAX is defined, unistd.h should provide the type as well */ +#ifndef LWIP_NO_UNISTD_H +#define LWIP_NO_UNISTD_H 0 +#endif +#if !LWIP_NO_UNISTD_H +#include +#endif +#else /* SSIZE_MAX */ +typedef int ssize_t; +#define SSIZE_MAX INT_MAX +#endif /* SSIZE_MAX */ + +/* some maximum values needed in lwip code */ +#define LWIP_UINT32_MAX 0xffffffff + +/** Define this to 1 in arch/cc.h of your port if your compiler does not provide + * the ctype.h header. If ctype.h is available, a few character functions + * are mapped to the appropriate functions (lwip_islower, lwip_isdigit...), if + * not, a private implementation is provided. + */ +#ifndef LWIP_NO_CTYPE_H +#define LWIP_NO_CTYPE_H 0 +#endif + +#if LWIP_NO_CTYPE_H +#define lwip_in_range(c, lo, up) ((u8_t)(c) >= (lo) && (u8_t)(c) <= (up)) +#define lwip_isdigit(c) lwip_in_range((c), '0', '9') +#define lwip_isxdigit(c) (lwip_isdigit(c) || lwip_in_range((c), 'a', 'f') || lwip_in_range((c), 'A', 'F')) +#define lwip_islower(c) lwip_in_range((c), 'a', 'z') +#define lwip_isspace(c) ((c) == ' ' || (c) == '\f' || (c) == '\n' || (c) == '\r' || (c) == '\t' || (c) == '\v') +#define lwip_isupper(c) lwip_in_range((c), 'A', 'Z') +#define lwip_tolower(c) (lwip_isupper(c) ? (c) - 'A' + 'a' : c) +#define lwip_toupper(c) (lwip_islower(c) ? (c) - 'a' + 'A' : c) +#else +#include +#define lwip_isdigit(c) isdigit((unsigned char)(c)) +#define lwip_isxdigit(c) isxdigit((unsigned char)(c)) +#define lwip_islower(c) islower((unsigned char)(c)) +#define lwip_isspace(c) isspace((unsigned char)(c)) +#define lwip_isupper(c) isupper((unsigned char)(c)) +#define lwip_tolower(c) tolower((unsigned char)(c)) +#define lwip_toupper(c) toupper((unsigned char)(c)) +#endif + /** C++ const_cast(val) equivalent to remove constness from a value (GCC -Wcast-qual) */ #ifndef LWIP_CONST_CAST #define LWIP_CONST_CAST(target_type, val) ((target_type)((ptrdiff_t)val)) @@ -192,6 +252,11 @@ typedef uintptr_t mem_ptr_t; #define LWIP_PTR_NUMERIC_CAST(target_type, val) LWIP_CONST_CAST(target_type, val) #endif +/** Avoid warnings/errors related to implicitly casting away packed attributes by doing a explicit cast */ +#ifndef LWIP_PACKED_CAST +#define LWIP_PACKED_CAST(target_type, val) LWIP_CONST_CAST(target_type, val) +#endif + /** Allocates a memory buffer of specified size that is of sufficient size to align * its start address using LWIP_MEM_ALIGN. * You can declare your own version here e.g. to enforce alignment without adding @@ -291,7 +356,7 @@ extern "C" { #define PACK_STRUCT_FLD_S(x) PACK_STRUCT_FIELD(x) #endif /* PACK_STRUCT_FLD_S */ -/** Packed structs support using \#include files before and after struct to be packed.\n +/** PACK_STRUCT_USE_INCLUDES==1: Packed structs support using \#include files before and after struct to be packed.\n * The file included BEFORE the struct is "arch/bpstruct.h".\n * The file included AFTER the struct is "arch/epstruct.h".\n * This can be used to implement struct packing on MS Visual C compilers, see @@ -308,6 +373,15 @@ extern "C" { #define LWIP_UNUSED_ARG(x) (void)x #endif /* LWIP_UNUSED_ARG */ +/** LWIP_PROVIDE_ERRNO==1: Let lwIP provide ERRNO values and the 'errno' variable. + * If this is disabled, cc.h must either define 'errno', include , + * define LWIP_ERRNO_STDINCLUDE to get included or + * define LWIP_ERRNO_INCLUDE to or equivalent. + */ +#if defined __DOXYGEN__ +#define LWIP_PROVIDE_ERRNO +#endif + /** * @} */ diff --git a/Libraries/LwIP/src/include/lwip/debug.h b/Libraries/LwIP/src/include/lwip/debug.h index d19e613..346ac47 100755 --- a/Libraries/LwIP/src/include/lwip/debug.h +++ b/Libraries/LwIP/src/include/lwip/debug.h @@ -115,9 +115,6 @@ #ifndef LWIP_NOASSERT #define LWIP_ASSERT(message, assertion) do { if (!(assertion)) { \ LWIP_PLATFORM_ASSERT(message); }} while(0) -#ifndef LWIP_PLATFORM_ASSERT -#error "If you want to use LWIP_ASSERT, LWIP_PLATFORM_ASSERT(message) needs to be defined in your arch/cc.h" -#endif #else /* LWIP_NOASSERT */ #define LWIP_ASSERT(message, assertion) #endif /* LWIP_NOASSERT */ @@ -145,9 +142,6 @@ #endif #ifdef LWIP_DEBUG -#ifndef LWIP_PLATFORM_DIAG -#error "If you want to use LWIP_DEBUG, LWIP_PLATFORM_DIAG(message) needs to be defined in your arch/cc.h" -#endif #define LWIP_DEBUGF(debug, message) do { \ if ( \ ((debug) & LWIP_DBG_ON) && \ diff --git a/Libraries/LwIP/src/include/lwip/def.h b/Libraries/LwIP/src/include/lwip/def.h index e34572f..10b5ac2 100755 --- a/Libraries/LwIP/src/include/lwip/def.h +++ b/Libraries/LwIP/src/include/lwip/def.h @@ -34,6 +34,17 @@ * Author: Adam Dunkels * */ + +/** + * @defgroup perf Performance measurement + * @ingroup sys_layer + * All defines related to this section must not be placed in lwipopts.h, + * but in arch/perf.h! + * Measurement calls made throughout lwip, these can be defined to nothing. + * - PERF_START: start measuring something. + * - PERF_STOP(x): stop measuring something, and record the result. + */ + #ifndef LWIP_HDR_DEF_H #define LWIP_HDR_DEF_H @@ -72,14 +83,14 @@ extern "C" { #endif #if BYTE_ORDER == BIG_ENDIAN -#define lwip_htons(x) (x) -#define lwip_ntohs(x) (x) -#define lwip_htonl(x) (x) -#define lwip_ntohl(x) (x) -#define PP_HTONS(x) (x) -#define PP_NTOHS(x) (x) -#define PP_HTONL(x) (x) -#define PP_NTOHL(x) (x) +#define lwip_htons(x) ((u16_t)(x)) +#define lwip_ntohs(x) ((u16_t)(x)) +#define lwip_htonl(x) ((u32_t)(x)) +#define lwip_ntohl(x) ((u32_t)(x)) +#define PP_HTONS(x) ((u16_t)(x)) +#define PP_NTOHS(x) ((u16_t)(x)) +#define PP_HTONL(x) ((u32_t)(x)) +#define PP_NTOHL(x) ((u32_t)(x)) #else /* BYTE_ORDER != BIG_ENDIAN */ #ifndef lwip_htons u16_t lwip_htons(u16_t x); @@ -94,18 +105,16 @@ u32_t lwip_htonl(u32_t x); /* These macros should be calculated by the preprocessor and are used with compile-time constants only (so that there is no little-endian overhead at runtime). */ -#define PP_HTONS(x) ((((x) & 0x00ffUL) << 8) | (((x) & 0xff00UL) >> 8)) +#define PP_HTONS(x) ((u16_t)((((x) & (u16_t)0x00ffU) << 8) | (((x) & (u16_t)0xff00U) >> 8))) #define PP_NTOHS(x) PP_HTONS(x) -#define PP_HTONL(x) ((((x) & 0x000000ffUL) << 24) | \ - (((x) & 0x0000ff00UL) << 8) | \ - (((x) & 0x00ff0000UL) >> 8) | \ - (((x) & 0xff000000UL) >> 24)) +#define PP_HTONL(x) ((((x) & (u32_t)0x000000ffUL) << 24) | \ + (((x) & (u32_t)0x0000ff00UL) << 8) | \ + (((x) & (u32_t)0x00ff0000UL) >> 8) | \ + (((x) & (u32_t)0xff000000UL) >> 24)) #define PP_NTOHL(x) PP_HTONL(x) #endif /* BYTE_ORDER == BIG_ENDIAN */ /* Provide usual function names as macros for users, but this can be turned off */ -#define LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS - #ifndef LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS #define htons(x) lwip_htons(x) #define ntohs(x) lwip_ntohs(x) diff --git a/Libraries/LwIP/src/include/lwip/dhcp.h b/Libraries/LwIP/src/include/lwip/dhcp.h index 9750491..a965efd 100755 --- a/Libraries/LwIP/src/include/lwip/dhcp.h +++ b/Libraries/LwIP/src/include/lwip/dhcp.h @@ -68,8 +68,6 @@ struct dhcp { /** transaction identifier of last sent request */ u32_t xid; - /** incoming msg */ - struct dhcp_msg *msg_in; /** track PCB allocation state */ u8_t pcb_allocated; /** current DHCP state machine state */ @@ -81,9 +79,6 @@ struct dhcp #endif u8_t subnet_mask_given; - struct pbuf *p_out; /* pbuf of outcoming msg */ - struct dhcp_msg *msg_out; /* outgoing msg */ - u16_t options_out_len; /* outgoing msg options length */ u16_t request_timeout; /* #ticks with period DHCP_FINE_TIMER_SECS for request timeout */ u16_t t1_timeout; /* #ticks with period DHCP_COARSE_TIMER_SECS for renewal time */ u16_t t2_timeout; /* #ticks with period DHCP_COARSE_TIMER_SECS for rebind time */ @@ -114,6 +109,7 @@ err_t dhcp_start(struct netif *netif); err_t dhcp_renew(struct netif *netif); err_t dhcp_release(struct netif *netif); void dhcp_stop(struct netif *netif); +void dhcp_release_and_stop(struct netif *netif); void dhcp_inform(struct netif *netif); void dhcp_network_changed(struct netif *netif); #if DHCP_DOES_ARP_CHECK diff --git a/Libraries/LwIP/src/include/lwip/dhcp6.h b/Libraries/LwIP/src/include/lwip/dhcp6.h index a6a4412..61ca4c4 100755 --- a/Libraries/LwIP/src/include/lwip/dhcp6.h +++ b/Libraries/LwIP/src/include/lwip/dhcp6.h @@ -1,11 +1,13 @@ /** * @file * - * IPv6 address autoconfiguration as per RFC 4862. + * DHCPv6 client: IPv6 address autoconfiguration as per + * RFC 3315 (stateful DHCPv6) and + * RFC 3736 (stateless DHCPv6). */ /* - * Copyright (c) 2010 Inico Technologies Ltd. + * Copyright (c) 2018 Simon Goldschmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, @@ -32,12 +34,7 @@ * * This file is part of the lwIP TCP/IP stack. * - * Author: Ivan Delamer - * - * IPv6 address autoconfiguration as per RFC 4862. - * - * Please coordinate changes and requests with Ivan Delamer - * + * Author: Simon Goldschmidt */ #ifndef LWIP_HDR_IP6_DHCP6_H @@ -47,12 +44,61 @@ #if LWIP_IPV6_DHCP6 /* don't build if not configured for use in lwipopts.h */ +#include "lwip/err.h" +#include "lwip/netif.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** period (in milliseconds) of the application calling dhcp6_tmr() */ +#define DHCP6_TIMER_MSECS 500 struct dhcp6 { - /*@todo: implement DHCP6*/ + /** transaction identifier of last sent request */ + u32_t xid; + /** track PCB allocation state */ + u8_t pcb_allocated; + /** current DHCPv6 state machine state */ + u8_t state; + /** retries of current request */ + u8_t tries; + /** if request config is triggered while another action is active, this keeps track of it */ + u8_t request_config_pending; + /** #ticks with period DHCP6_TIMER_MSECS for request timeout */ + u16_t request_timeout; +#if LWIP_IPV6_DHCP6_STATEFUL + /* @todo: add more members here to keep track of stateful DHCPv6 data, like lease times */ +#endif /* LWIP_IPV6_DHCP6_STATEFUL */ }; +void dhcp6_set_struct(struct netif *netif, struct dhcp6 *dhcp6); +/** Remove a struct dhcp6 previously set to the netif using dhcp6_set_struct() */ +#define dhcp6_remove_struct(netif) netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP6, NULL) +void dhcp6_cleanup(struct netif *netif); + +err_t dhcp6_enable_stateful(struct netif *netif); +err_t dhcp6_enable_stateless(struct netif *netif); +void dhcp6_disable(struct netif *netif); + +void dhcp6_tmr(void); + +void dhcp6_nd6_ra_trigger(struct netif *netif, u8_t managed_addr_config, u8_t other_config); + +#if LWIP_DHCP6_GET_NTP_SRV +/** This function must exist, in other to add offered NTP servers to + * the NTP (or SNTP) engine. + * See LWIP_DHCP6_MAX_NTP_SERVERS */ +extern void dhcp6_set_ntp_servers(u8_t num_ntp_servers, const ip_addr_t* ntp_server_addrs); +#endif /* LWIP_DHCP6_GET_NTP_SRV */ + +#define netif_dhcp6_data(netif) ((struct dhcp6*)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP6)) + +#ifdef __cplusplus +} +#endif + #endif /* LWIP_IPV6_DHCP6 */ #endif /* LWIP_HDR_IP6_DHCP6_H */ diff --git a/Libraries/LwIP/src/include/lwip/dns.h b/Libraries/LwIP/src/include/lwip/dns.h index 23fd4f5..eed6825 100755 --- a/Libraries/LwIP/src/include/lwip/dns.h +++ b/Libraries/LwIP/src/include/lwip/dns.h @@ -44,6 +44,7 @@ #if LWIP_DNS #include "lwip/ip_addr.h" +#include "lwip/err.h" #ifdef __cplusplus extern "C" { diff --git a/Libraries/LwIP/src/include/lwip/err.h b/Libraries/LwIP/src/include/lwip/err.h index 4b07ac8..63c138a 100755 --- a/Libraries/LwIP/src/include/lwip/err.h +++ b/Libraries/LwIP/src/include/lwip/err.h @@ -49,14 +49,6 @@ extern "C" { * @{ */ -/** Define LWIP_ERR_T in cc.h if you want to use - * a different type for your platform (must be signed). */ -#ifdef LWIP_ERR_T -typedef LWIP_ERR_T err_t; -#else /* LWIP_ERR_T */ -typedef s8_t err_t; -#endif /* LWIP_ERR_T*/ - /** Definitions for error constants. */ typedef enum { /** No error, everything OK. */ @@ -96,7 +88,13 @@ typedef enum { ERR_ARG = -16 } err_enum_t; -#define ERR_IS_FATAL(e) ((e) <= ERR_ABRT) +/** Define LWIP_ERR_T in cc.h if you want to use + * a different type for your platform (must be signed). */ +#ifdef LWIP_ERR_T +typedef LWIP_ERR_T err_t; +#else /* LWIP_ERR_T */ +typedef s8_t err_t; +#endif /* LWIP_ERR_T*/ /** * @} diff --git a/Libraries/LwIP/src/include/lwip/errno.h b/Libraries/LwIP/src/include/lwip/errno.h index 2d326cb..eae5d6e 100755 --- a/Libraries/LwIP/src/include/lwip/errno.h +++ b/Libraries/LwIP/src/include/lwip/errno.h @@ -179,10 +179,15 @@ extern int errno; #else /* LWIP_PROVIDE_ERRNO */ -/* Define LWIP_ERRNO_INCLUDE to to include the error defines here */ +/* Define LWIP_ERRNO_STDINCLUDE if you want to include here */ +#ifdef LWIP_ERRNO_STDINCLUDE +#include +#else /* LWIP_ERRNO_STDINCLUDE */ +/* Define LWIP_ERRNO_INCLUDE to an equivalent of to include the error defines here */ #ifdef LWIP_ERRNO_INCLUDE #include LWIP_ERRNO_INCLUDE #endif /* LWIP_ERRNO_INCLUDE */ +#endif /* LWIP_ERRNO_STDINCLUDE */ #endif /* LWIP_PROVIDE_ERRNO */ diff --git a/Libraries/LwIP/src/include/lwip/etharp.h b/Libraries/LwIP/src/include/lwip/etharp.h index be5badf..b018f07 100755 --- a/Libraries/LwIP/src/include/lwip/etharp.h +++ b/Libraries/LwIP/src/include/lwip/etharp.h @@ -52,14 +52,14 @@ #include "lwip/ip4.h" #include "lwip/prot/ethernet.h" -#ifdef __cplusplus -extern "C" { -#endif - #if LWIP_IPV4 && LWIP_ARP /* don't build if not configured for use in lwipopts.h */ #include "lwip/prot/etharp.h" +#ifdef __cplusplus +extern "C" { +#endif + /** 1 seconds period */ #define ARP_TMR_INTERVAL 1000 @@ -75,9 +75,9 @@ struct etharp_q_entry { #define etharp_init() /* Compatibility define, no init needed. */ void etharp_tmr(void); -s8_t etharp_find_addr(struct netif *netif, const ip4_addr_t *ipaddr, +ssize_t etharp_find_addr(struct netif *netif, const ip4_addr_t *ipaddr, struct eth_addr **eth_ret, const ip4_addr_t **ip_ret); -u8_t etharp_get_entry(u8_t i, ip4_addr_t **ipaddr, struct netif **netif, struct eth_addr **eth_ret); +int etharp_get_entry(size_t i, ip4_addr_t **ipaddr, struct netif **netif, struct eth_addr **eth_ret); err_t etharp_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr); err_t etharp_query(struct netif *netif, const ip4_addr_t *ipaddr, struct pbuf *q); err_t etharp_request(struct netif *netif, const ip4_addr_t *ipaddr); @@ -93,14 +93,13 @@ err_t etharp_add_static_entry(const ip4_addr_t *ipaddr, struct eth_addr *ethaddr err_t etharp_remove_static_entry(const ip4_addr_t *ipaddr); #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ -#endif /* LWIP_IPV4 && LWIP_ARP */ - void etharp_input(struct pbuf *p, struct netif *netif); #ifdef __cplusplus } #endif +#endif /* LWIP_IPV4 && LWIP_ARP */ #endif /* LWIP_ARP || LWIP_ETHERNET */ #endif /* LWIP_HDR_NETIF_ETHARP_H */ diff --git a/Libraries/LwIP/src/include/lwip/icmp6.h b/Libraries/LwIP/src/include/lwip/icmp6.h index a5f812f..cb383d9 100755 --- a/Libraries/LwIP/src/include/lwip/icmp6.h +++ b/Libraries/LwIP/src/include/lwip/icmp6.h @@ -57,7 +57,9 @@ void icmp6_input(struct pbuf *p, struct netif *inp); void icmp6_dest_unreach(struct pbuf *p, enum icmp6_dur_code c); void icmp6_packet_too_big(struct pbuf *p, u32_t mtu); void icmp6_time_exceeded(struct pbuf *p, enum icmp6_te_code c); -void icmp6_param_problem(struct pbuf *p, enum icmp6_pp_code c, u32_t pointer); +void icmp6_time_exceeded_with_addrs(struct pbuf *p, enum icmp6_te_code c, + const ip6_addr_t *src_addr, const ip6_addr_t *dest_addr); +void icmp6_param_problem(struct pbuf *p, enum icmp6_pp_code c, const void *pointer); #endif /* LWIP_ICMP6 && LWIP_IPV6 */ diff --git a/Libraries/LwIP/src/include/lwip/if_api.h b/Libraries/LwIP/src/include/lwip/if_api.h new file mode 100644 index 0000000..39017ab --- /dev/null +++ b/Libraries/LwIP/src/include/lwip/if_api.h @@ -0,0 +1,68 @@ +/** + * @file + * Interface Identification APIs from: + * RFC 3493: Basic Socket Interface Extensions for IPv6 + * Section 4: Interface Identification + */ + +/* + * Copyright (c) 2017 Joel Cunningham, Garmin International, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Joel Cunningham + * + */ +#ifndef LWIP_HDR_IF_H +#define LWIP_HDR_IF_H + +#include "lwip/opt.h" + +#if LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/netif.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define IF_NAMESIZE NETIF_NAMESIZE + +char * lwip_if_indextoname(unsigned int ifindex, char *ifname); +unsigned int lwip_if_nametoindex(const char *ifname); + +#if LWIP_COMPAT_SOCKETS +#define if_indextoname(ifindex, ifname) lwip_if_indextoname(ifindex,ifname) +#define if_nametoindex(ifname) lwip_if_nametoindex(ifname) +#endif /* LWIP_COMPAT_SOCKETS */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_SOCKET */ + +#endif /* LWIP_HDR_IF_H */ diff --git a/Libraries/LwIP/src/include/lwip/inet.h b/Libraries/LwIP/src/include/lwip/inet.h index 8d306fc..36f6ec7 100755 --- a/Libraries/LwIP/src/include/lwip/inet.h +++ b/Libraries/LwIP/src/include/lwip/inet.h @@ -134,8 +134,6 @@ extern const struct in6_addr in6addr_any; #define inet_addr_from_ip4addr(target_inaddr, source_ipaddr) ((target_inaddr)->s_addr = ip4_addr_get_u32(source_ipaddr)) #define inet_addr_to_ip4addr(target_ipaddr, source_inaddr) (ip4_addr_set_u32(target_ipaddr, (source_inaddr)->s_addr)) -/* ATTENTION: the next define only works because both s_addr and ip4_addr_t are an u32_t effectively! */ -#define inet_addr_to_ip4addr_p(target_ip4addr_p, source_inaddr) ((target_ip4addr_p) = (ip4_addr_t*)&((source_inaddr)->s_addr)) /* directly map this to the lwip internal functions */ #define inet_addr(cp) ipaddr_addr(cp) @@ -153,9 +151,8 @@ extern const struct in6_addr in6addr_any; #define inet6_addr_to_ip6addr(target_ip6addr, source_in6addr) {(target_ip6addr)->addr[0] = (source_in6addr)->un.u32_addr[0]; \ (target_ip6addr)->addr[1] = (source_in6addr)->un.u32_addr[1]; \ (target_ip6addr)->addr[2] = (source_in6addr)->un.u32_addr[2]; \ - (target_ip6addr)->addr[3] = (source_in6addr)->un.u32_addr[3];} -/* ATTENTION: the next define only works because both in6_addr and ip6_addr_t are an u32_t[4] effectively! */ -#define inet6_addr_to_ip6addr_p(target_ip6addr_p, source_in6addr) ((target_ip6addr_p) = (ip6_addr_t*)(source_in6addr)) + (target_ip6addr)->addr[3] = (source_in6addr)->un.u32_addr[3]; \ + ip6_addr_clear_zone(target_ip6addr);} /* directly map this to the lwip internal functions */ #define inet6_aton(cp, addr) ip6addr_aton(cp, (ip6_addr_t*)addr) diff --git a/Libraries/LwIP/src/include/lwip/inet_chksum.h b/Libraries/LwIP/src/include/lwip/inet_chksum.h index 799cab5..46ec2ae 100755 --- a/Libraries/LwIP/src/include/lwip/inet_chksum.h +++ b/Libraries/LwIP/src/include/lwip/inet_chksum.h @@ -49,7 +49,7 @@ /** Split an u32_t in two u16_ts and add them up */ #ifndef FOLD_U32T -#define FOLD_U32T(u) (((u) >> 16) + ((u) & 0x0000ffffUL)) +#define FOLD_U32T(u) ((u32_t)(((u) >> 16) + ((u) & 0x0000ffffUL))) #endif #if LWIP_CHECKSUM_ON_COPY diff --git a/Libraries/LwIP/src/include/lwip/init.h b/Libraries/LwIP/src/include/lwip/init.h index 721bb57..48c256b 100755 --- a/Libraries/LwIP/src/include/lwip/init.h +++ b/Libraries/LwIP/src/include/lwip/init.h @@ -52,9 +52,9 @@ extern "C" { /** X.x.x: Major version of the stack */ #define LWIP_VERSION_MAJOR 2 /** x.X.x: Minor version of the stack */ -#define LWIP_VERSION_MINOR 0 +#define LWIP_VERSION_MINOR 1 /** x.x.X: Revision of the stack */ -#define LWIP_VERSION_REVISION 3 +#define LWIP_VERSION_REVISION 2 /** For release candidates, this is set to 1..254 * For official releases, this is set to 255 (LWIP_RC_RELEASE) * For development versions (Git), this is set to 0 (LWIP_RC_DEVELOPMENT) */ @@ -81,8 +81,8 @@ extern "C" { #endif /** Provides the version of the stack */ -#define LWIP_VERSION (((u32_t)LWIP_VERSION_MAJOR) << 24 | ((u32_t)LWIP_VERSION_MINOR) << 16 | \ - ((u32_t)LWIP_VERSION_REVISION) << 8 | ((u32_t)LWIP_VERSION_RC)) +#define LWIP_VERSION ((LWIP_VERSION_MAJOR) << 24 | (LWIP_VERSION_MINOR) << 16 | \ + (LWIP_VERSION_REVISION) << 8 | (LWIP_VERSION_RC)) /** Provides the version of the stack as string */ #define LWIP_VERSION_STRING LWIP_VERSTR(LWIP_VERSION_MAJOR) "." LWIP_VERSTR(LWIP_VERSION_MINOR) "." LWIP_VERSTR(LWIP_VERSION_REVISION) LWIP_VERSION_STRING_SUFFIX diff --git a/Libraries/LwIP/src/include/lwip/init.h.cmake.in b/Libraries/LwIP/src/include/lwip/init.h.cmake.in new file mode 100644 index 0000000..9b609b7 --- /dev/null +++ b/Libraries/LwIP/src/include/lwip/init.h.cmake.in @@ -0,0 +1,100 @@ +/** + * @file + * lwIP initialization API + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_INIT_H +#define LWIP_HDR_INIT_H + +#include "lwip/opt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @defgroup lwip_version Version + * @ingroup lwip + * @{ + */ + +/** X.x.x: Major version of the stack */ +#define LWIP_VERSION_MAJOR ${LWIP_VERSION_MAJOR} +/** x.X.x: Minor version of the stack */ +#define LWIP_VERSION_MINOR ${LWIP_VERSION_MINOR} +/** x.x.X: Revision of the stack */ +#define LWIP_VERSION_REVISION ${LWIP_VERSION_REVISION} +/** For release candidates, this is set to 1..254 + * For official releases, this is set to 255 (LWIP_RC_RELEASE) + * For development versions (Git), this is set to 0 (LWIP_RC_DEVELOPMENT) */ +#define LWIP_VERSION_RC ${LWIP_VERSION_RC} + +/** LWIP_VERSION_RC is set to LWIP_RC_RELEASE for official releases */ +#define LWIP_RC_RELEASE 255 +/** LWIP_VERSION_RC is set to LWIP_RC_DEVELOPMENT for Git versions */ +#define LWIP_RC_DEVELOPMENT 0 + +#define LWIP_VERSION_IS_RELEASE (LWIP_VERSION_RC == LWIP_RC_RELEASE) +#define LWIP_VERSION_IS_DEVELOPMENT (LWIP_VERSION_RC == LWIP_RC_DEVELOPMENT) +#define LWIP_VERSION_IS_RC ((LWIP_VERSION_RC != LWIP_RC_RELEASE) && (LWIP_VERSION_RC != LWIP_RC_DEVELOPMENT)) + +/* Some helper defines to get a version string */ +#define LWIP_VERSTR2(x) #x +#define LWIP_VERSTR(x) LWIP_VERSTR2(x) +#if LWIP_VERSION_IS_RELEASE +#define LWIP_VERSION_STRING_SUFFIX "" +#elif LWIP_VERSION_IS_DEVELOPMENT +#define LWIP_VERSION_STRING_SUFFIX "d" +#else +#define LWIP_VERSION_STRING_SUFFIX "rc" LWIP_VERSTR(LWIP_VERSION_RC) +#endif + +/** Provides the version of the stack */ +#define LWIP_VERSION ((LWIP_VERSION_MAJOR) << 24 | (LWIP_VERSION_MINOR) << 16 | \ + (LWIP_VERSION_REVISION) << 8 | (LWIP_VERSION_RC)) +/** Provides the version of the stack as string */ +#define LWIP_VERSION_STRING LWIP_VERSTR(LWIP_VERSION_MAJOR) "." LWIP_VERSTR(LWIP_VERSION_MINOR) "." LWIP_VERSTR(LWIP_VERSION_REVISION) LWIP_VERSION_STRING_SUFFIX + +/** + * @} + */ + +/* Modules initialization */ +void lwip_init(void); + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_INIT_H */ diff --git a/Libraries/LwIP/src/include/lwip/ip.h b/Libraries/LwIP/src/include/lwip/ip.h index 356dd74..28889d5 100755 --- a/Libraries/LwIP/src/include/lwip/ip.h +++ b/Libraries/LwIP/src/include/lwip/ip.h @@ -63,31 +63,33 @@ extern "C" { #define LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p) LWIP_ASSERT("p->ref == 1", (p)->ref == 1) #endif -#if LWIP_NETIF_HWADDRHINT -#define IP_PCB_ADDRHINT ;u8_t addr_hint -#else -#define IP_PCB_ADDRHINT -#endif /* LWIP_NETIF_HWADDRHINT */ +#if LWIP_NETIF_USE_HINTS +#define IP_PCB_NETIFHINT ;struct netif_hint netif_hints +#else /* LWIP_NETIF_USE_HINTS */ +#define IP_PCB_NETIFHINT +#endif /* LWIP_NETIF_USE_HINTS */ /** This is the common part of all PCB types. It needs to be at the beginning of a PCB type definition. It is located here so that changes to this common part are made in one location instead of having to change all PCB structs. */ -#define IP_PCB \ +#define IP_PCB \ /* ip addresses in network byte order */ \ - ip_addr_t local_ip; \ - ip_addr_t remote_ip; \ - /* Socket options */ \ - u8_t so_options; \ - /* Type Of Service */ \ - u8_t tos; \ - /* Time To Live */ \ - u8_t ttl \ + ip_addr_t local_ip; \ + ip_addr_t remote_ip; \ + /* Bound netif index */ \ + u8_t netif_idx; \ + /* Socket options */ \ + u8_t so_options; \ + /* Type Of Service */ \ + u8_t tos; \ + /* Time To Live */ \ + u8_t ttl \ /* link layer address resolution hint */ \ - IP_PCB_ADDRHINT + IP_PCB_NETIFHINT struct ip_pcb { -/* Common members of all PCB types */ + /* Common members of all PCB types */ IP_PCB; }; @@ -110,7 +112,7 @@ struct ip_globals struct netif *current_input_netif; #if LWIP_IPV4 /** Header of the input packet currently being processed. */ - struct ip_hdr *current_ip4_header; + const struct ip_hdr *current_ip4_header; #endif /* LWIP_IPV4 */ #if LWIP_IPV6 /** Header of the input IPv6 packet currently being processed. */ @@ -146,7 +148,7 @@ extern struct ip_globals ip_data; /** Get the IPv4 header of the current packet. * This function must only be called from a receive callback (udp_recv, * raw_recv, tcp_accept). It will return NULL otherwise. */ -#define ip4_current_header() ((const struct ip_hdr*)(ip_data.current_ip4_header)) +#define ip4_current_header() ip_data.current_ip4_header /** Get the IPv6 header of the current packet. * This function must only be called from a receive callback (udp_recv, * raw_recv, tcp_accept). It will return NULL otherwise. */ @@ -175,7 +177,7 @@ extern struct ip_globals ip_data; /** Get the IPv4 header of the current packet. * This function must only be called from a receive callback (udp_recv, * raw_recv, tcp_accept). It will return NULL otherwise. */ -#define ip4_current_header() ((const struct ip_hdr*)(ip_data.current_ip4_header)) +#define ip4_current_header() ip_data.current_ip4_header /** Always returns FALSE when only supporting IPv4 only */ #define ip_current_is_v6() 0 /** Get the transport layer protocol */ @@ -198,7 +200,7 @@ extern struct ip_globals ip_data; /** Get the transport layer protocol */ #define ip_current_header_proto() IP6H_NEXTH(ip6_current_header()) /** Get the transport layer header */ -#define ip_next_header_ptr() ((const void*)((const u8_t*)ip6_current_header())) +#define ip_next_header_ptr() ((const void*)(((const u8_t*)ip6_current_header()) + ip_current_header_tot_len())) /** Source IP6 address of current_header */ #define ip6_current_src_addr() (&ip_data.current_iphdr_src) /** Destination IP6 address of current_header */ @@ -214,9 +216,9 @@ extern struct ip_globals ip_data; /** Gets an IP pcb option (SOF_* flags) */ #define ip_get_option(pcb, opt) ((pcb)->so_options & (opt)) /** Sets an IP pcb option (SOF_* flags) */ -#define ip_set_option(pcb, opt) ((pcb)->so_options |= (opt)) +#define ip_set_option(pcb, opt) ((pcb)->so_options = (u8_t)((pcb)->so_options | (opt))) /** Resets an IP pcb option (SOF_* flags) */ -#define ip_reset_option(pcb, opt) ((pcb)->so_options &= ~(opt)) +#define ip_reset_option(pcb, opt) ((pcb)->so_options = (u8_t)((pcb)->so_options & ~(opt))) #if LWIP_IPV4 && LWIP_IPV6 /** @@ -243,11 +245,16 @@ extern struct ip_globals ip_data; (IP_IS_V6(dest) ? \ ip6_output_if_src(p, ip_2_ip6(src), ip_2_ip6(dest), ttl, tos, proto, netif) : \ ip4_output_if_src(p, ip_2_ip4(src), ip_2_ip4(dest), ttl, tos, proto, netif)) -/** Output IP packet with addr_hint */ -#define ip_output_hinted(p, src, dest, ttl, tos, proto, addr_hint) \ +/** Output IP packet that already includes an IP header. */ +#define ip_output_if_hdrincl(p, src, dest, netif) \ (IP_IS_V6(dest) ? \ - ip6_output_hinted(p, ip_2_ip6(src), ip_2_ip6(dest), ttl, tos, proto, addr_hint) : \ - ip4_output_hinted(p, ip_2_ip4(src), ip_2_ip4(dest), ttl, tos, proto, addr_hint)) + ip6_output_if(p, ip_2_ip6(src), LWIP_IP_HDRINCL, 0, 0, 0, netif) : \ + ip4_output_if(p, ip_2_ip4(src), LWIP_IP_HDRINCL, 0, 0, 0, netif)) +/** Output IP packet with netif_hint */ +#define ip_output_hinted(p, src, dest, ttl, tos, proto, netif_hint) \ + (IP_IS_V6(dest) ? \ + ip6_output_hinted(p, ip_2_ip6(src), ip_2_ip6(dest), ttl, tos, proto, netif_hint) : \ + ip4_output_hinted(p, ip_2_ip4(src), ip_2_ip4(dest), ttl, tos, proto, netif_hint)) /** * @ingroup ip * Get netif for address combination. See \ref ip6_route and \ref ip4_route @@ -255,7 +262,7 @@ extern struct ip_globals ip_data; #define ip_route(src, dest) \ (IP_IS_V6(dest) ? \ ip6_route(ip_2_ip6(src), ip_2_ip6(dest)) : \ - ip4_route_src(ip_2_ip4(dest), ip_2_ip4(src))) + ip4_route_src(ip_2_ip4(src), ip_2_ip4(dest))) /** * @ingroup ip * Get netif for IP. @@ -275,10 +282,12 @@ err_t ip_input(struct pbuf *p, struct netif *inp); ip4_output_if(p, src, dest, ttl, tos, proto, netif) #define ip_output_if_src(p, src, dest, ttl, tos, proto, netif) \ ip4_output_if_src(p, src, dest, ttl, tos, proto, netif) -#define ip_output_hinted(p, src, dest, ttl, tos, proto, addr_hint) \ - ip4_output_hinted(p, src, dest, ttl, tos, proto, addr_hint) +#define ip_output_hinted(p, src, dest, ttl, tos, proto, netif_hint) \ + ip4_output_hinted(p, src, dest, ttl, tos, proto, netif_hint) +#define ip_output_if_hdrincl(p, src, dest, netif) \ + ip4_output_if(p, src, LWIP_IP_HDRINCL, 0, 0, 0, netif) #define ip_route(src, dest) \ - ip4_route_src(dest, src) + ip4_route_src(src, dest) #define ip_netif_get_local_ip(netif, dest) \ ip4_netif_get_local_ip(netif) #define ip_debug_print(is_ipv6, p) ip4_debug_print(p) @@ -293,8 +302,10 @@ err_t ip_input(struct pbuf *p, struct netif *inp); ip6_output_if(p, src, dest, ttl, tos, proto, netif) #define ip_output_if_src(p, src, dest, ttl, tos, proto, netif) \ ip6_output_if_src(p, src, dest, ttl, tos, proto, netif) -#define ip_output_hinted(p, src, dest, ttl, tos, proto, addr_hint) \ - ip6_output_hinted(p, src, dest, ttl, tos, proto, addr_hint) +#define ip_output_hinted(p, src, dest, ttl, tos, proto, netif_hint) \ + ip6_output_hinted(p, src, dest, ttl, tos, proto, netif_hint) +#define ip_output_if_hdrincl(p, src, dest, netif) \ + ip6_output_if(p, src, LWIP_IP_HDRINCL, 0, 0, 0, netif) #define ip_route(src, dest) \ ip6_route(src, dest) #define ip_netif_get_local_ip(netif, dest) \ diff --git a/Libraries/LwIP/src/include/lwip/ip4.h b/Libraries/LwIP/src/include/lwip/ip4.h index e8ac2bc..6409c4b 100755 --- a/Libraries/LwIP/src/include/lwip/ip4.h +++ b/Libraries/LwIP/src/include/lwip/ip4.h @@ -64,9 +64,9 @@ extern "C" { #define ip_init() /* Compatibility define, no init needed. */ struct netif *ip4_route(const ip4_addr_t *dest); #if LWIP_IPV4_SRC_ROUTING -struct netif *ip4_route_src(const ip4_addr_t *dest, const ip4_addr_t *src); +struct netif *ip4_route_src(const ip4_addr_t *src, const ip4_addr_t *dest); #else /* LWIP_IPV4_SRC_ROUTING */ -#define ip4_route_src(dest, src) ip4_route(dest) +#define ip4_route_src(src, dest) ip4_route(dest) #endif /* LWIP_IPV4_SRC_ROUTING */ err_t ip4_input(struct pbuf *p, struct netif *inp); err_t ip4_output(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, @@ -75,10 +75,10 @@ err_t ip4_output_if(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *des u8_t ttl, u8_t tos, u8_t proto, struct netif *netif); err_t ip4_output_if_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif); -#if LWIP_NETIF_HWADDRHINT +#if LWIP_NETIF_USE_HINTS err_t ip4_output_hinted(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, - u8_t ttl, u8_t tos, u8_t proto, u8_t *addr_hint); -#endif /* LWIP_NETIF_HWADDRHINT */ + u8_t ttl, u8_t tos, u8_t proto, struct netif_hint *netif_hint); +#endif /* LWIP_NETIF_USE_HINTS */ #if IP_OPTIONS_SEND err_t ip4_output_if_opt(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif, void *ip_options, diff --git a/Libraries/LwIP/src/include/lwip/ip4_addr.h b/Libraries/LwIP/src/include/lwip/ip4_addr.h index 106a261..9990756 100755 --- a/Libraries/LwIP/src/include/lwip/ip4_addr.h +++ b/Libraries/LwIP/src/include/lwip/ip4_addr.h @@ -56,22 +56,6 @@ struct ip4_addr { * operate both on ip4_addr_t as well as on ip4_addr_p_t. */ typedef struct ip4_addr ip4_addr_t; -/** - * struct ipaddr2 is used in the definition of the ARP packet format in - * order to support compilers that don't have structure packing. - */ -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct ip4_addr2 { - PACK_STRUCT_FIELD(u16_t addrw[2]); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - /* Forward declaration to not include netif.h */ struct netif; @@ -119,13 +103,6 @@ struct netif; /** Set an IP address given by the four byte-parts */ #define IP4_ADDR(ipaddr, a,b,c,d) (ipaddr)->addr = PP_HTONL(LWIP_MAKEU32(a,b,c,d)) -/** MEMCPY-like copying of IP addresses where addresses are known to be - * 16-bit-aligned if the port is correctly configured (so a port could define - * this to copying 2 u16_t's) - no NULL-pointer-checking needed. */ -#ifndef IPADDR2_COPY -#define IPADDR2_COPY(dest, src) SMEMCPY(dest, src, sizeof(ip4_addr_t)) -#endif - /** Copy IP address - faster than ip4_addr_set: no NULL check */ #define ip4_addr_copy(dest, src) ((dest).addr = (src).addr) /** Safely copy one IP address to another (src may be NULL) */ @@ -190,22 +167,34 @@ u8_t ip4_addr_netmask_valid(u32_t netmask); (u16_t)((ipaddr) != NULL ? ip4_addr4_16(ipaddr) : 0)) #define ip4_addr_debug_print_val(debug, ipaddr) \ ip4_addr_debug_print_parts(debug, \ - ip4_addr1_16(&(ipaddr)), \ - ip4_addr2_16(&(ipaddr)), \ - ip4_addr3_16(&(ipaddr)), \ - ip4_addr4_16(&(ipaddr))) + ip4_addr1_16_val(ipaddr), \ + ip4_addr2_16_val(ipaddr), \ + ip4_addr3_16_val(ipaddr), \ + ip4_addr4_16_val(ipaddr)) /* Get one byte from the 4-byte address */ -#define ip4_addr1(ipaddr) (((const u8_t*)(&(ipaddr)->addr))[0]) -#define ip4_addr2(ipaddr) (((const u8_t*)(&(ipaddr)->addr))[1]) -#define ip4_addr3(ipaddr) (((const u8_t*)(&(ipaddr)->addr))[2]) -#define ip4_addr4(ipaddr) (((const u8_t*)(&(ipaddr)->addr))[3]) +#define ip4_addr_get_byte(ipaddr, idx) (((const u8_t*)(&(ipaddr)->addr))[idx]) +#define ip4_addr1(ipaddr) ip4_addr_get_byte(ipaddr, 0) +#define ip4_addr2(ipaddr) ip4_addr_get_byte(ipaddr, 1) +#define ip4_addr3(ipaddr) ip4_addr_get_byte(ipaddr, 2) +#define ip4_addr4(ipaddr) ip4_addr_get_byte(ipaddr, 3) +/* Get one byte from the 4-byte address, but argument is 'ip4_addr_t', + * not a pointer */ +#define ip4_addr_get_byte_val(ipaddr, idx) ((u8_t)(((ipaddr).addr >> (idx * 8)) & 0xff)) +#define ip4_addr1_val(ipaddr) ip4_addr_get_byte_val(ipaddr, 0) +#define ip4_addr2_val(ipaddr) ip4_addr_get_byte_val(ipaddr, 1) +#define ip4_addr3_val(ipaddr) ip4_addr_get_byte_val(ipaddr, 2) +#define ip4_addr4_val(ipaddr) ip4_addr_get_byte_val(ipaddr, 3) /* These are cast to u16_t, with the intent that they are often arguments * to printf using the U16_F format from cc.h. */ #define ip4_addr1_16(ipaddr) ((u16_t)ip4_addr1(ipaddr)) #define ip4_addr2_16(ipaddr) ((u16_t)ip4_addr2(ipaddr)) #define ip4_addr3_16(ipaddr) ((u16_t)ip4_addr3(ipaddr)) #define ip4_addr4_16(ipaddr) ((u16_t)ip4_addr4(ipaddr)) +#define ip4_addr1_16_val(ipaddr) ((u16_t)ip4_addr1_val(ipaddr)) +#define ip4_addr2_16_val(ipaddr) ((u16_t)ip4_addr2_val(ipaddr)) +#define ip4_addr3_16_val(ipaddr) ((u16_t)ip4_addr3_val(ipaddr)) +#define ip4_addr4_16_val(ipaddr) ((u16_t)ip4_addr4_val(ipaddr)) #define IP4ADDR_STRLEN_MAX 16 diff --git a/Libraries/LwIP/src/include/lwip/ip6.h b/Libraries/LwIP/src/include/lwip/ip6.h index 9c6d593..706f66d 100755 --- a/Libraries/LwIP/src/include/lwip/ip6.h +++ b/Libraries/LwIP/src/include/lwip/ip6.h @@ -66,10 +66,10 @@ err_t ip6_output_if(struct pbuf *p, const ip6_addr_t *src, const ip6_add u8_t hl, u8_t tc, u8_t nexth, struct netif *netif); err_t ip6_output_if_src(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, u8_t hl, u8_t tc, u8_t nexth, struct netif *netif); -#if LWIP_NETIF_HWADDRHINT +#if LWIP_NETIF_USE_HINTS err_t ip6_output_hinted(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, - u8_t hl, u8_t tc, u8_t nexth, u8_t *addr_hint); -#endif /* LWIP_NETIF_HWADDRHINT */ + u8_t hl, u8_t tc, u8_t nexth, struct netif_hint *netif_hint); +#endif /* LWIP_NETIF_USE_HINTS */ #if LWIP_IPV6_MLD err_t ip6_options_add_hbh_ra(struct pbuf * p, u8_t nexth, u8_t value); #endif /* LWIP_IPV6_MLD */ diff --git a/Libraries/LwIP/src/include/lwip/ip6_addr.h b/Libraries/LwIP/src/include/lwip/ip6_addr.h index 8d6ff29..7c1f913 100755 --- a/Libraries/LwIP/src/include/lwip/ip6_addr.h +++ b/Libraries/LwIP/src/include/lwip/ip6_addr.h @@ -47,6 +47,7 @@ #if LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */ +#include "lwip/ip6_zone.h" #ifdef __cplusplus extern "C" { @@ -57,6 +58,9 @@ extern "C" { used as local variable, on the stack, etc. */ struct ip6_addr { u32_t addr[4]; +#if LWIP_IPV6_SCOPES + u8_t zone; +#endif /* LWIP_IPV6_SCOPES */ }; /** IPv6 address */ @@ -72,7 +76,8 @@ typedef struct ip6_addr ip6_addr_t; (ip6addr)->addr[0] = idx0; \ (ip6addr)->addr[1] = idx1; \ (ip6addr)->addr[2] = idx2; \ - (ip6addr)->addr[3] = idx3; } while(0) + (ip6addr)->addr[3] = idx3; \ + ip6_addr_clear_zone(ip6addr); } while(0) /** Access address in 16-bit block */ #define IP6_ADDR_BLOCK1(ip6addr) ((u16_t)((lwip_htonl((ip6addr)->addr[0]) >> 16) & 0xffff)) @@ -95,18 +100,34 @@ typedef struct ip6_addr ip6_addr_t; #define ip6_addr_copy(dest, src) do{(dest).addr[0] = (src).addr[0]; \ (dest).addr[1] = (src).addr[1]; \ (dest).addr[2] = (src).addr[2]; \ - (dest).addr[3] = (src).addr[3];}while(0) + (dest).addr[3] = (src).addr[3]; \ + ip6_addr_copy_zone((dest), (src)); }while(0) /** Safely copy one IPv6 address to another (src may be NULL) */ #define ip6_addr_set(dest, src) do{(dest)->addr[0] = (src) == NULL ? 0 : (src)->addr[0]; \ (dest)->addr[1] = (src) == NULL ? 0 : (src)->addr[1]; \ (dest)->addr[2] = (src) == NULL ? 0 : (src)->addr[2]; \ - (dest)->addr[3] = (src) == NULL ? 0 : (src)->addr[3];}while(0) + (dest)->addr[3] = (src) == NULL ? 0 : (src)->addr[3]; \ + ip6_addr_set_zone((dest), (src) == NULL ? IP6_NO_ZONE : ip6_addr_zone(src)); }while(0) + +/** Copy packed IPv6 address to unpacked IPv6 address; zone is not set */ +#define ip6_addr_copy_from_packed(dest, src) do{(dest).addr[0] = (src).addr[0]; \ + (dest).addr[1] = (src).addr[1]; \ + (dest).addr[2] = (src).addr[2]; \ + (dest).addr[3] = (src).addr[3]; \ + ip6_addr_clear_zone(&dest); }while(0) + +/** Copy unpacked IPv6 address to packed IPv6 address; zone is lost */ +#define ip6_addr_copy_to_packed(dest, src) do{(dest).addr[0] = (src).addr[0]; \ + (dest).addr[1] = (src).addr[1]; \ + (dest).addr[2] = (src).addr[2]; \ + (dest).addr[3] = (src).addr[3]; }while(0) /** Set complete address to zero */ #define ip6_addr_set_zero(ip6addr) do{(ip6addr)->addr[0] = 0; \ (ip6addr)->addr[1] = 0; \ (ip6addr)->addr[2] = 0; \ - (ip6addr)->addr[3] = 0;}while(0) + (ip6addr)->addr[3] = 0; \ + ip6_addr_clear_zone(ip6addr);}while(0) /** Set address to ipv6 'any' (no need for lwip_htonl()) */ #define ip6_addr_set_any(ip6addr) ip6_addr_set_zero(ip6addr) @@ -114,29 +135,57 @@ typedef struct ip6_addr ip6_addr_t; #define ip6_addr_set_loopback(ip6addr) do{(ip6addr)->addr[0] = 0; \ (ip6addr)->addr[1] = 0; \ (ip6addr)->addr[2] = 0; \ - (ip6addr)->addr[3] = PP_HTONL(0x00000001UL);}while(0) + (ip6addr)->addr[3] = PP_HTONL(0x00000001UL); \ + ip6_addr_clear_zone(ip6addr);}while(0) /** Safely copy one IPv6 address to another and change byte order * from host- to network-order. */ #define ip6_addr_set_hton(dest, src) do{(dest)->addr[0] = (src) == NULL ? 0 : lwip_htonl((src)->addr[0]); \ (dest)->addr[1] = (src) == NULL ? 0 : lwip_htonl((src)->addr[1]); \ (dest)->addr[2] = (src) == NULL ? 0 : lwip_htonl((src)->addr[2]); \ - (dest)->addr[3] = (src) == NULL ? 0 : lwip_htonl((src)->addr[3]);}while(0) + (dest)->addr[3] = (src) == NULL ? 0 : lwip_htonl((src)->addr[3]); \ + ip6_addr_set_zone((dest), (src) == NULL ? IP6_NO_ZONE : ip6_addr_zone(src));}while(0) +/** Compare IPv6 networks, ignoring zone information. To be used sparingly! */ +#define ip6_addr_netcmp_zoneless(addr1, addr2) (((addr1)->addr[0] == (addr2)->addr[0]) && \ + ((addr1)->addr[1] == (addr2)->addr[1])) + /** * Determine if two IPv6 address are on the same network. * - * @arg addr1 IPv6 address 1 - * @arg addr2 IPv6 address 2 - * @return !0 if the network identifiers of both address match + * @param addr1 IPv6 address 1 + * @param addr2 IPv6 address 2 + * @return 1 if the network identifiers of both address match, 0 if not */ -#define ip6_addr_netcmp(addr1, addr2) (((addr1)->addr[0] == (addr2)->addr[0]) && \ - ((addr1)->addr[1] == (addr2)->addr[1])) +#define ip6_addr_netcmp(addr1, addr2) (ip6_addr_netcmp_zoneless((addr1), (addr2)) && \ + ip6_addr_cmp_zone((addr1), (addr2))) -#define ip6_addr_cmp(addr1, addr2) (((addr1)->addr[0] == (addr2)->addr[0]) && \ +/* Exact-host comparison *after* ip6_addr_netcmp() succeeded, for efficiency. */ +#define ip6_addr_nethostcmp(addr1, addr2) (((addr1)->addr[2] == (addr2)->addr[2]) && \ + ((addr1)->addr[3] == (addr2)->addr[3])) + +/** Compare IPv6 addresses, ignoring zone information. To be used sparingly! */ +#define ip6_addr_cmp_zoneless(addr1, addr2) (((addr1)->addr[0] == (addr2)->addr[0]) && \ ((addr1)->addr[1] == (addr2)->addr[1]) && \ ((addr1)->addr[2] == (addr2)->addr[2]) && \ ((addr1)->addr[3] == (addr2)->addr[3])) +/** + * Determine if two IPv6 addresses are the same. In particular, the address + * part of both must be the same, and the zone must be compatible. + * + * @param addr1 IPv6 address 1 + * @param addr2 IPv6 address 2 + * @return 1 if the addresses are considered equal, 0 if not + */ +#define ip6_addr_cmp(addr1, addr2) (ip6_addr_cmp_zoneless((addr1), (addr2)) && \ + ip6_addr_cmp_zone((addr1), (addr2))) + +/** Compare IPv6 address to packed address and zone */ +#define ip6_addr_cmp_packed(ip6addr, paddr, zone_idx) (((ip6addr)->addr[0] == (paddr)->addr[0]) && \ + ((ip6addr)->addr[1] == (paddr)->addr[1]) && \ + ((ip6addr)->addr[2] == (paddr)->addr[2]) && \ + ((ip6addr)->addr[3] == (paddr)->addr[3]) && \ + ip6_addr_equals_zone((ip6addr), (zone_idx))) #define ip6_get_subnet_id(ip6addr) (lwip_htonl((ip6addr)->addr[2]) & 0x0000ffffUL) @@ -183,7 +232,13 @@ typedef struct ip6_addr ip6_addr_t; #define ip6_addr_ismulticast_orglocal(ip6addr) (((ip6addr)->addr[0] & PP_HTONL(0xff8f0000UL)) == PP_HTONL(0xff080000UL)) #define ip6_addr_ismulticast_global(ip6addr) (((ip6addr)->addr[0] & PP_HTONL(0xff8f0000UL)) == PP_HTONL(0xff0e0000UL)) -/* @todo define get/set for well-know multicast addresses, e.g. ff02::1 */ +/* Scoping note: while interface-local and link-local multicast addresses do + * have a scope (i.e., they are meaningful only in the context of a particular + * interface), the following functions are not assigning or comparing zone + * indices. The reason for this is backward compatibility. Any call site that + * produces a non-global multicast address must assign a multicast address as + * appropriate itself. */ + #define ip6_addr_isallnodes_iflocal(ip6addr) (((ip6addr)->addr[0] == PP_HTONL(0xff010000UL)) && \ ((ip6addr)->addr[1] == 0UL) && \ ((ip6addr)->addr[2] == 0UL) && \ @@ -196,7 +251,8 @@ typedef struct ip6_addr ip6_addr_t; #define ip6_addr_set_allnodes_linklocal(ip6addr) do{(ip6addr)->addr[0] = PP_HTONL(0xff020000UL); \ (ip6addr)->addr[1] = 0; \ (ip6addr)->addr[2] = 0; \ - (ip6addr)->addr[3] = PP_HTONL(0x00000001UL);}while(0) + (ip6addr)->addr[3] = PP_HTONL(0x00000001UL); \ + ip6_addr_clear_zone(ip6addr); }while(0) #define ip6_addr_isallrouters_linklocal(ip6addr) (((ip6addr)->addr[0] == PP_HTONL(0xff020000UL)) && \ ((ip6addr)->addr[1] == 0UL) && \ @@ -205,7 +261,8 @@ typedef struct ip6_addr ip6_addr_t; #define ip6_addr_set_allrouters_linklocal(ip6addr) do{(ip6addr)->addr[0] = PP_HTONL(0xff020000UL); \ (ip6addr)->addr[1] = 0; \ (ip6addr)->addr[2] = 0; \ - (ip6addr)->addr[3] = PP_HTONL(0x00000002UL);}while(0) + (ip6addr)->addr[3] = PP_HTONL(0x00000002UL); \ + ip6_addr_clear_zone(ip6addr); }while(0) #define ip6_addr_issolicitednode(ip6addr) ( ((ip6addr)->addr[0] == PP_HTONL(0xff020000UL)) && \ ((ip6addr)->addr[2] == PP_HTONL(0x00000001UL)) && \ @@ -214,7 +271,8 @@ typedef struct ip6_addr ip6_addr_t; #define ip6_addr_set_solicitednode(ip6addr, if_id) do{(ip6addr)->addr[0] = PP_HTONL(0xff020000UL); \ (ip6addr)->addr[1] = 0; \ (ip6addr)->addr[2] = PP_HTONL(0x00000001UL); \ - (ip6addr)->addr[3] = (PP_HTONL(0xff000000UL) | (if_id));}while(0) + (ip6addr)->addr[3] = (PP_HTONL(0xff000000UL) | (if_id)); \ + ip6_addr_clear_zone(ip6addr); }while(0) #define ip6_addr_cmp_solicitednode(ip6addr, sn_addr) (((ip6addr)->addr[0] == PP_HTONL(0xff020000UL)) && \ ((ip6addr)->addr[1] == 0) && \ @@ -234,6 +292,7 @@ typedef struct ip6_addr ip6_addr_t; #define IP6_ADDR_VALID 0x10 /* This bit marks an address as valid (preferred or deprecated) */ #define IP6_ADDR_PREFERRED 0x30 #define IP6_ADDR_DEPRECATED 0x10 /* Same as VALID (valid but not preferred) */ +#define IP6_ADDR_DUPLICATED 0x40 /* Failed DAD test, not valid */ #define IP6_ADDR_TENTATIVE_COUNT_MASK 0x07 /* 1-7 probes sent */ @@ -242,6 +301,14 @@ typedef struct ip6_addr ip6_addr_t; #define ip6_addr_isvalid(addr_state) (addr_state & IP6_ADDR_VALID) /* Include valid, preferred, and deprecated. */ #define ip6_addr_ispreferred(addr_state) (addr_state == IP6_ADDR_PREFERRED) #define ip6_addr_isdeprecated(addr_state) (addr_state == IP6_ADDR_DEPRECATED) +#define ip6_addr_isduplicated(addr_state) (addr_state == IP6_ADDR_DUPLICATED) + +#if LWIP_IPV6_ADDRESS_LIFETIMES +#define IP6_ADDR_LIFE_STATIC (0) +#define IP6_ADDR_LIFE_INFINITE (0xffffffffUL) +#define ip6_addr_life_isstatic(addr_life) ((addr_life) == IP6_ADDR_LIFE_STATIC) +#define ip6_addr_life_isinfinite(addr_life) ((addr_life) == IP6_ADDR_LIFE_INFINITE) +#endif /* LWIP_IPV6_ADDRESS_LIFETIMES */ #define ip6_addr_debug_print_parts(debug, a, b, c, d, e, f, g, h) \ LWIP_DEBUGF(debug, ("%" X16_F ":%" X16_F ":%" X16_F ":%" X16_F ":%" X16_F ":%" X16_F ":%" X16_F ":%" X16_F, \ diff --git a/Libraries/LwIP/src/include/lwip/ip6_frag.h b/Libraries/LwIP/src/include/lwip/ip6_frag.h index 2f94ee6..71940dd 100755 --- a/Libraries/LwIP/src/include/lwip/ip6_frag.h +++ b/Libraries/LwIP/src/include/lwip/ip6_frag.h @@ -54,24 +54,34 @@ extern "C" { #if LWIP_IPV6 && LWIP_IPV6_REASS /* don't build if not configured for use in lwipopts.h */ -/** IP6_FRAG_COPYHEADER==1: for platforms where sizeof(void*) > 4, this needs to - * be enabled (to not overwrite part of the data). When enabled, the IPv6 header - * is copied instead of referencing it, which gives more room for struct ip6_reass_helper */ +/** The IPv6 reassembly timer interval in milliseconds. */ +#define IP6_REASS_TMR_INTERVAL 1000 + +/** IP6_FRAG_COPYHEADER==1: for platforms where sizeof(void*) > 4, "struct + * ip6_reass_helper" is too large to be stored in the IPv6 fragment header, and + * will bleed into the header before it, which may be the IPv6 header or an + * extension header. This means that for each first fragment packet, we need to + * 1) make a copy of some IPv6 header fields (src+dest) that we need later on, + * just in case we do overwrite part of the IPv6 header, and 2) make a copy of + * the header data that we overwrote, so that we can restore it before either + * completing reassembly or sending an ICMPv6 reply. The last part is true even + * if this setting is disabled, but if it is enabled, we need to save a bit + * more data (up to the size of a pointer) because we overwrite more. */ #ifndef IPV6_FRAG_COPYHEADER #define IPV6_FRAG_COPYHEADER 0 #endif -/** The IPv6 reassembly timer interval in milliseconds. */ -#define IP6_REASS_TMR_INTERVAL 1000 - -/* Copy the complete header of the first fragment to struct ip6_reassdata - or just point to its original location in the first pbuf? */ +/* With IPV6_FRAG_COPYHEADER==1, a helper structure may (or, depending on the + * presence of extensions, may not) overwrite part of the IP header. Therefore, + * we copy the fields that we need from the IP header for as long as the helper + * structure may still be in place. This is easier than temporarily restoring + * those fields in the IP header each time we need to perform checks on them. */ #if IPV6_FRAG_COPYHEADER -#define IPV6_FRAG_HDRPTR -#define IPV6_FRAG_HDRREF(hdr) (&(hdr)) +#define IPV6_FRAG_SRC(ipr) ((ipr)->src) +#define IPV6_FRAG_DEST(ipr) ((ipr)->dest) #else /* IPV6_FRAG_COPYHEADER */ -#define IPV6_FRAG_HDRPTR * -#define IPV6_FRAG_HDRREF(hdr) (hdr) +#define IPV6_FRAG_SRC(ipr) ((ipr)->iphdr->src) +#define IPV6_FRAG_DEST(ipr) ((ipr)->iphdr->dest) #endif /* IPV6_FRAG_COPYHEADER */ /** IPv6 reassembly helper struct. @@ -80,11 +90,25 @@ extern "C" { struct ip6_reassdata { struct ip6_reassdata *next; struct pbuf *p; - struct ip6_hdr IPV6_FRAG_HDRPTR iphdr; + struct ip6_hdr *iphdr; /* pointer to the first (original) IPv6 header */ +#if IPV6_FRAG_COPYHEADER + ip6_addr_p_t src; /* copy of the source address in the IP header */ + ip6_addr_p_t dest; /* copy of the destination address in the IP header */ + /* This buffer (for the part of the original header that we overwrite) will + * be slightly oversized, but we cannot compute the exact size from here. */ + u8_t orig_hdr[sizeof(struct ip6_frag_hdr) + sizeof(void*)]; +#else /* IPV6_FRAG_COPYHEADER */ + /* In this case we still need the buffer, for sending ICMPv6 replies. */ + u8_t orig_hdr[sizeof(struct ip6_frag_hdr)]; +#endif /* IPV6_FRAG_COPYHEADER */ u32_t identification; u16_t datagram_len; u8_t nexth; u8_t timer; +#if LWIP_IPV6_SCOPES + u8_t src_zone; /* zone of original packet's source address */ + u8_t dest_zone; /* zone of original packet's destination address */ +#endif /* LWIP_IPV6_SCOPES */ }; #define ip6_reass_init() /* Compatibility define */ diff --git a/Libraries/LwIP/src/include/lwip/ip6_zone.h b/Libraries/LwIP/src/include/lwip/ip6_zone.h new file mode 100644 index 0000000..525790e --- /dev/null +++ b/Libraries/LwIP/src/include/lwip/ip6_zone.h @@ -0,0 +1,304 @@ +/** + * @file + * + * IPv6 address scopes, zones, and scoping policy. + * + * This header provides the means to implement support for IPv6 address scopes, + * as per RFC 4007. An address scope can be either global or more constrained. + * In lwIP, we say that an address "has a scope" or "is scoped" when its scope + * is constrained, in which case the address is meaningful only in a specific + * "zone." For unicast addresses, only link-local addresses have a scope; in + * that case, the scope is the link. For multicast addresses, there are various + * scopes defined by RFC 4007 and others. For any constrained scope, a system + * must establish a (potentially one-to-many) mapping between zones and local + * interfaces. For example, a link-local address is valid on only one link (its + * zone). That link may be attached to one or more local interfaces. The + * decisions on which scopes are constrained and the mapping between zones and + * interfaces is together what we refer to as the "scoping policy" - more on + * this in a bit. + * + * In lwIP, each IPv6 address has an associated zone index. This zone index may + * be set to "no zone" (IP6_NO_ZONE, 0) or an actual zone. We say that an + * address "has a zone" or "is zoned" when its zone index is *not* set to "no + * zone." In lwIP, in principle, each address should be "properly zoned," which + * means that if the address has a zone if and only if has a scope. As such, it + * is a rule that an unscoped (e.g., global) address must never have a zone. + * Even though one could argue that there is always one zone even for global + * scopes, this rule exists for implementation simplicity. Violation of the + * rule will trigger assertions or otherwise result in undesired behavior. + * + * Backward compatibility prevents us from requiring that applications always + * provide properly zoned addresses. We do enforce the rule that the in the + * lwIP link layer (everything below netif->output_ip6() and in particular ND6) + * *all* addresses are properly zoned. Thus, on the output paths down the + * stack, various places deal with the case of addresses that lack a zone. + * Some of them are best-effort for efficiency (e.g. the PCB bind and connect + * API calls' attempts to add missing zones); ultimately the IPv6 output + * handler (@ref ip6_output_if_src) will set a zone if necessary. + * + * Aside from dealing with scoped addresses lacking a zone, a proper IPv6 + * implementation must also ensure that a packet with a scoped source and/or + * destination address does not leave its zone. This is currently implemented + * in the input and forward functions. However, for output, these checks are + * deliberately omitted in order to keep the implementation lightweight. The + * routing algorithm in @ref ip6_route will take decisions such that it will + * not cause zone violations unless the application sets bad addresses, though. + * + * In terms of scoping policy, lwIP implements the default policy from RFC 4007 + * using macros in this file. This policy considers link-local unicast + * addresses and (only) interface-local and link-local multicast addresses as + * having a scope. For all these addresses, the zone is equal to the interface. + * As shown below in this file, it is possible to implement a custom policy. + */ + +/* + * Copyright (c) 2017 The MINIX 3 Project. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: David van Moolenbroek + * + */ +#ifndef LWIP_HDR_IP6_ZONE_H +#define LWIP_HDR_IP6_ZONE_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @defgroup ip6_zones IPv6 Zones + * @ingroup ip6 + * @{ + */ + +#if LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */ + +/** Identifier for "no zone". */ +#define IP6_NO_ZONE 0 + +#if LWIP_IPV6_SCOPES + +/** Zone initializer for static IPv6 address initialization, including comma. */ +#define IPADDR6_ZONE_INIT , IP6_NO_ZONE + +/** Return the zone index of the given IPv6 address; possibly "no zone". */ +#define ip6_addr_zone(ip6addr) ((ip6addr)->zone) + +/** Does the given IPv6 address have a zone set? (0/1) */ +#define ip6_addr_has_zone(ip6addr) (ip6_addr_zone(ip6addr) != IP6_NO_ZONE) + +/** Set the zone field of an IPv6 address to a particular value. */ +#define ip6_addr_set_zone(ip6addr, zone_idx) ((ip6addr)->zone = (zone_idx)) + +/** Clear the zone field of an IPv6 address, setting it to "no zone". */ +#define ip6_addr_clear_zone(ip6addr) ((ip6addr)->zone = IP6_NO_ZONE) + +/** Copy the zone field from the second IPv6 address to the first one. */ +#define ip6_addr_copy_zone(ip6addr1, ip6addr2) ((ip6addr1).zone = (ip6addr2).zone) + +/** Is the zone field of the given IPv6 address equal to the given zone index? (0/1) */ +#define ip6_addr_equals_zone(ip6addr, zone_idx) ((ip6addr)->zone == (zone_idx)) + +/** Are the zone fields of the given IPv6 addresses equal? (0/1) + * This macro must only be used on IPv6 addresses of the same scope. */ +#define ip6_addr_cmp_zone(ip6addr1, ip6addr2) ((ip6addr1)->zone == (ip6addr2)->zone) + +/** Symbolic constants for the 'type' parameters in some of the macros. + * These exist for efficiency only, allowing the macros to avoid certain tests + * when the address is known not to be of a certain type. Dead code elimination + * will do the rest. IP6_MULTICAST is supported but currently not optimized. + * @see ip6_addr_has_scope, ip6_addr_assign_zone, ip6_addr_lacks_zone. + */ +enum lwip_ipv6_scope_type +{ + /** Unknown */ + IP6_UNKNOWN = 0, + /** Unicast */ + IP6_UNICAST = 1, + /** Multicast */ + IP6_MULTICAST = 2 +}; + +/** IPV6_CUSTOM_SCOPES: together, the following three macro definitions, + * @ref ip6_addr_has_scope, @ref ip6_addr_assign_zone, and + * @ref ip6_addr_test_zone, completely define the lwIP scoping policy. + * The definitions below implement the default policy from RFC 4007 Sec. 6. + * Should an implementation desire to implement a different policy, it can + * define IPV6_CUSTOM_SCOPES to 1 and supply its own definitions for the three + * macros instead. + */ +#ifndef IPV6_CUSTOM_SCOPES +#define IPV6_CUSTOM_SCOPES 0 +#endif /* !IPV6_CUSTOM_SCOPES */ + +#if !IPV6_CUSTOM_SCOPES + +/** + * Determine whether an IPv6 address has a constrained scope, and as such is + * meaningful only if accompanied by a zone index to identify the scope's zone. + * The given address type may be used to eliminate at compile time certain + * checks that will evaluate to false at run time anyway. + * + * This default implementation follows the default model of RFC 4007, where + * only interface-local and link-local scopes are defined. + * + * Even though the unicast loopback address does have an implied link-local + * scope, in this implementation it does not have an explicitly assigned zone + * index. As such it should not be tested for in this macro. + * + * @param ip6addr the IPv6 address (const); only its address part is examined. + * @param type address type; see @ref lwip_ipv6_scope_type. + * @return 1 if the address has a constrained scope, 0 if it does not. + */ +#define ip6_addr_has_scope(ip6addr, type) \ + (ip6_addr_islinklocal(ip6addr) || (((type) != IP6_UNICAST) && \ + (ip6_addr_ismulticast_iflocal(ip6addr) || \ + ip6_addr_ismulticast_linklocal(ip6addr)))) + +/** + * Assign a zone index to an IPv6 address, based on a network interface. If the + * given address has a scope, the assigned zone index is that scope's zone of + * the given netif; otherwise, the assigned zone index is "no zone". + * + * This default implementation follows the default model of RFC 4007, where + * only interface-local and link-local scopes are defined, and the zone index + * of both of those scopes always equals the index of the network interface. + * As such, this default implementation need not distinguish between different + * constrained scopes when assigning the zone. + * + * @param ip6addr the IPv6 address; its address part is examined, and its zone + * index is assigned. + * @param type address type; see @ref lwip_ipv6_scope_type. + * @param netif the network interface (const). + */ +#define ip6_addr_assign_zone(ip6addr, type, netif) \ + (ip6_addr_set_zone((ip6addr), \ + ip6_addr_has_scope((ip6addr), (type)) ? netif_get_index(netif) : 0)) + +/** + * Test whether an IPv6 address is "zone-compatible" with a network interface. + * That is, test whether the network interface is part of the zone associated + * with the address. For efficiency, this macro is only ever called if the + * given address is either scoped or zoned, and thus, it need not test this. + * If an address is scoped but not zoned, or zoned and not scoped, it is + * considered not zone-compatible with any netif. + * + * This default implementation follows the default model of RFC 4007, where + * only interface-local and link-local scopes are defined, and the zone index + * of both of those scopes always equals the index of the network interface. + * As such, there is always only one matching netif for a specific zone index, + * but all call sites of this macro currently support multiple matching netifs + * as well (at no additional expense in the common case). + * + * @param ip6addr the IPv6 address (const). + * @param netif the network interface (const). + * @return 1 if the address is scope-compatible with the netif, 0 if not. + */ +#define ip6_addr_test_zone(ip6addr, netif) \ + (ip6_addr_equals_zone((ip6addr), netif_get_index(netif))) + +#endif /* !IPV6_CUSTOM_SCOPES */ + +/** Does the given IPv6 address have a scope, and as such should also have a + * zone to be meaningful, but does not actually have a zone? (0/1) */ +#define ip6_addr_lacks_zone(ip6addr, type) \ + (!ip6_addr_has_zone(ip6addr) && ip6_addr_has_scope((ip6addr), (type))) + +/** + * Try to select a zone for a scoped address that does not yet have a zone. + * Called from PCB bind and connect routines, for two reasons: 1) to save on + * this (relatively expensive) selection for every individual packet route + * operation and 2) to allow the application to obtain the selected zone from + * the PCB as is customary for e.g. getsockname/getpeername BSD socket calls. + * + * Ideally, callers would always supply a properly zoned address, in which case + * this function would not be needed. It exists both for compatibility with the + * BSD socket API (which accepts zoneless destination addresses) and for + * backward compatibility with pre-scoping lwIP code. + * + * It may be impossible to select a zone, e.g. if there are no netifs. In that + * case, the address's zone field will be left as is. + * + * @param dest the IPv6 address for which to select and set a zone. + * @param src source IPv6 address (const); may be equal to dest. + */ +#define ip6_addr_select_zone(dest, src) do { struct netif *selected_netif; \ + selected_netif = ip6_route((src), (dest)); \ + if (selected_netif != NULL) { \ + ip6_addr_assign_zone((dest), IP6_UNKNOWN, selected_netif); \ + } } while (0) + +/** + * @} + */ + +#else /* LWIP_IPV6_SCOPES */ + +#define IPADDR6_ZONE_INIT +#define ip6_addr_zone(ip6addr) (IP6_NO_ZONE) +#define ip6_addr_has_zone(ip6addr) (0) +#define ip6_addr_set_zone(ip6addr, zone_idx) +#define ip6_addr_clear_zone(ip6addr) +#define ip6_addr_copy_zone(ip6addr1, ip6addr2) +#define ip6_addr_equals_zone(ip6addr, zone_idx) (1) +#define ip6_addr_cmp_zone(ip6addr1, ip6addr2) (1) +#define IPV6_CUSTOM_SCOPES 0 +#define ip6_addr_has_scope(ip6addr, type) (0) +#define ip6_addr_assign_zone(ip6addr, type, netif) +#define ip6_addr_test_zone(ip6addr, netif) (1) +#define ip6_addr_lacks_zone(ip6addr, type) (0) +#define ip6_addr_select_zone(ip6addr, src) + +#endif /* LWIP_IPV6_SCOPES */ + +#if LWIP_IPV6_SCOPES && LWIP_IPV6_SCOPES_DEBUG + +/** Verify that the given IPv6 address is properly zoned. */ +#define IP6_ADDR_ZONECHECK(ip6addr) LWIP_ASSERT("IPv6 zone check failed", \ + ip6_addr_has_scope(ip6addr, IP6_UNKNOWN) == ip6_addr_has_zone(ip6addr)) + +/** Verify that the given IPv6 address is properly zoned for the given netif. */ +#define IP6_ADDR_ZONECHECK_NETIF(ip6addr, netif) LWIP_ASSERT("IPv6 netif zone check failed", \ + ip6_addr_has_scope(ip6addr, IP6_UNKNOWN) ? \ + (ip6_addr_has_zone(ip6addr) && \ + (((netif) == NULL) || ip6_addr_test_zone((ip6addr), (netif)))) : \ + !ip6_addr_has_zone(ip6addr)) + +#else /* LWIP_IPV6_SCOPES && LWIP_IPV6_SCOPES_DEBUG */ + +#define IP6_ADDR_ZONECHECK(ip6addr) +#define IP6_ADDR_ZONECHECK_NETIF(ip6addr, netif) + +#endif /* LWIP_IPV6_SCOPES && LWIP_IPV6_SCOPES_DEBUG */ + +#endif /* LWIP_IPV6 */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_IP6_ZONE_H */ diff --git a/Libraries/LwIP/src/include/lwip/ip_addr.h b/Libraries/LwIP/src/include/lwip/ip_addr.h index 4e989bf..f98fa8a 100755 --- a/Libraries/LwIP/src/include/lwip/ip_addr.h +++ b/Libraries/LwIP/src/include/lwip/ip_addr.h @@ -78,18 +78,19 @@ typedef struct ip_addr { extern const ip_addr_t ip_addr_any_type; /** @ingroup ip4addr */ -#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 } +#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } IPADDR6_ZONE_INIT } }, IPADDR_TYPE_V4 } /** @ingroup ip4addr */ #define IPADDR4_INIT_BYTES(a,b,c,d) IPADDR4_INIT(PP_HTONL(LWIP_MAKEU32(a,b,c,d))) + /** @ingroup ip6addr */ -#define IPADDR6_INIT(a, b, c, d) { { { { a, b, c, d } } }, IPADDR_TYPE_V6 } +#define IPADDR6_INIT(a, b, c, d) { { { { a, b, c, d } IPADDR6_ZONE_INIT } }, IPADDR_TYPE_V6 } /** @ingroup ip6addr */ -#define IPADDR6_INIT_HOST(a, b, c, d) { { { { PP_HTONL(a), PP_HTONL(b), PP_HTONL(c), PP_HTONL(d) } } }, IPADDR_TYPE_V6 } +#define IPADDR6_INIT_HOST(a, b, c, d) { { { { PP_HTONL(a), PP_HTONL(b), PP_HTONL(c), PP_HTONL(d) } IPADDR6_ZONE_INIT } }, IPADDR_TYPE_V6 } /** @ingroup ipaddr */ #define IP_IS_ANY_TYPE_VAL(ipaddr) (IP_GET_TYPE(&ipaddr) == IPADDR_TYPE_ANY) /** @ingroup ipaddr */ -#define IPADDR_ANY_TYPE_INIT { { { { 0ul, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_ANY } +#define IPADDR_ANY_TYPE_INIT { { { { 0ul, 0ul, 0ul, 0ul } IPADDR6_ZONE_INIT } }, IPADDR_TYPE_ANY } /** @ingroup ip4addr */ #define IP_IS_V4_VAL(ipaddr) (IP_GET_TYPE(&ipaddr) == IPADDR_TYPE_V4) @@ -104,6 +105,8 @@ extern const ip_addr_t ip_addr_any_type; #define IP_SET_TYPE(ipaddr, iptype) do { if((ipaddr) != NULL) { IP_SET_TYPE_VAL(*(ipaddr), iptype); }}while(0) #define IP_GET_TYPE(ipaddr) ((ipaddr)->type) +#define IP_ADDR_RAW_SIZE(ipaddr) (IP_GET_TYPE(&ipaddr) == IPADDR_TYPE_V4 ? sizeof(ip4_addr_t) : sizeof(ip6_addr_t)) + #define IP_ADDR_PCB_VERSION_MATCH_EXACT(pcb, ipaddr) (IP_GET_TYPE(&pcb->local_ip) == IP_GET_TYPE(ipaddr)) #define IP_ADDR_PCB_VERSION_MATCH(pcb, ipaddr) (IP_IS_ANY_TYPE_VAL(pcb->local_ip) || IP_ADDR_PCB_VERSION_MATCH_EXACT(pcb, ipaddr)) @@ -125,26 +128,37 @@ extern const ip_addr_t ip_addr_any_type; /** @ingroup ip6addr */ #define IP_ADDR6_HOST(ipaddr,i0,i1,i2,i3) IP_ADDR6(ipaddr,PP_HTONL(i0),PP_HTONL(i1),PP_HTONL(i2),PP_HTONL(i3)) +#define ip_clear_no4(ipaddr) do { ip_2_ip6(ipaddr)->addr[1] = \ + ip_2_ip6(ipaddr)->addr[2] = \ + ip_2_ip6(ipaddr)->addr[3] = 0; \ + ip6_addr_clear_zone(ip_2_ip6(ipaddr)); }while(0) + /** @ingroup ipaddr */ #define ip_addr_copy(dest, src) do{ IP_SET_TYPE_VAL(dest, IP_GET_TYPE(&src)); if(IP_IS_V6_VAL(src)){ \ ip6_addr_copy(*ip_2_ip6(&(dest)), *ip_2_ip6(&(src))); }else{ \ - ip4_addr_copy(*ip_2_ip4(&(dest)), *ip_2_ip4(&(src))); }}while(0) + ip4_addr_copy(*ip_2_ip4(&(dest)), *ip_2_ip4(&(src))); ip_clear_no4(&dest); }}while(0) /** @ingroup ip6addr */ #define ip_addr_copy_from_ip6(dest, src) do{ \ ip6_addr_copy(*ip_2_ip6(&(dest)), src); IP_SET_TYPE_VAL(dest, IPADDR_TYPE_V6); }while(0) +/** @ingroup ip6addr */ +#define ip_addr_copy_from_ip6_packed(dest, src) do{ \ + ip6_addr_copy_from_packed(*ip_2_ip6(&(dest)), src); IP_SET_TYPE_VAL(dest, IPADDR_TYPE_V6); }while(0) /** @ingroup ip4addr */ #define ip_addr_copy_from_ip4(dest, src) do{ \ - ip4_addr_copy(*ip_2_ip4(&(dest)), src); IP_SET_TYPE_VAL(dest, IPADDR_TYPE_V4); }while(0) + ip4_addr_copy(*ip_2_ip4(&(dest)), src); IP_SET_TYPE_VAL(dest, IPADDR_TYPE_V4); ip_clear_no4(&dest); }while(0) /** @ingroup ip4addr */ #define ip_addr_set_ip4_u32(ipaddr, val) do{if(ipaddr){ip4_addr_set_u32(ip_2_ip4(ipaddr), val); \ - IP_SET_TYPE(ipaddr, IPADDR_TYPE_V4); }}while(0) + IP_SET_TYPE(ipaddr, IPADDR_TYPE_V4); ip_clear_no4(ipaddr); }}while(0) +/** @ingroup ip4addr */ +#define ip_addr_set_ip4_u32_val(ipaddr, val) do{ ip4_addr_set_u32(ip_2_ip4(&(ipaddr)), val); \ + IP_SET_TYPE_VAL(ipaddr, IPADDR_TYPE_V4); ip_clear_no4(&ipaddr); }while(0) /** @ingroup ip4addr */ #define ip_addr_get_ip4_u32(ipaddr) (((ipaddr) && IP_IS_V4(ipaddr)) ? \ ip4_addr_get_u32(ip_2_ip4(ipaddr)) : 0) /** @ingroup ipaddr */ #define ip_addr_set(dest, src) do{ IP_SET_TYPE(dest, IP_GET_TYPE(src)); if(IP_IS_V6(src)){ \ ip6_addr_set(ip_2_ip6(dest), ip_2_ip6(src)); }else{ \ - ip4_addr_set(ip_2_ip4(dest), ip_2_ip4(src)); }}while(0) + ip4_addr_set(ip_2_ip4(dest), ip_2_ip4(src)); ip_clear_no4(dest); }}while(0) /** @ingroup ipaddr */ #define ip_addr_set_ipaddr(dest, src) ip_addr_set(dest, src) /** @ingroup ipaddr */ @@ -159,15 +173,23 @@ extern const ip_addr_t ip_addr_any_type; /** @ingroup ipaddr */ #define ip_addr_set_any(is_ipv6, ipaddr) do{if(is_ipv6){ \ ip6_addr_set_any(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V6); }else{ \ - ip4_addr_set_any(ip_2_ip4(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V4); }}while(0) + ip4_addr_set_any(ip_2_ip4(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V4); ip_clear_no4(ipaddr); }}while(0) +/** @ingroup ipaddr */ +#define ip_addr_set_any_val(is_ipv6, ipaddr) do{if(is_ipv6){ \ + ip6_addr_set_any(ip_2_ip6(&(ipaddr))); IP_SET_TYPE_VAL(ipaddr, IPADDR_TYPE_V6); }else{ \ + ip4_addr_set_any(ip_2_ip4(&(ipaddr))); IP_SET_TYPE_VAL(ipaddr, IPADDR_TYPE_V4); ip_clear_no4(&ipaddr); }}while(0) /** @ingroup ipaddr */ #define ip_addr_set_loopback(is_ipv6, ipaddr) do{if(is_ipv6){ \ ip6_addr_set_loopback(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V6); }else{ \ - ip4_addr_set_loopback(ip_2_ip4(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V4); }}while(0) + ip4_addr_set_loopback(ip_2_ip4(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V4); ip_clear_no4(ipaddr); }}while(0) +/** @ingroup ipaddr */ +#define ip_addr_set_loopback_val(is_ipv6, ipaddr) do{if(is_ipv6){ \ + ip6_addr_set_loopback(ip_2_ip6(&(ipaddr))); IP_SET_TYPE_VAL(ipaddr, IPADDR_TYPE_V6); }else{ \ + ip4_addr_set_loopback(ip_2_ip4(&(ipaddr))); IP_SET_TYPE_VAL(ipaddr, IPADDR_TYPE_V4); ip_clear_no4(&ipaddr); }}while(0) /** @ingroup ipaddr */ #define ip_addr_set_hton(dest, src) do{if(IP_IS_V6(src)){ \ - ip6_addr_set_hton(ip_2_ip6(ipaddr), (src)); IP_SET_TYPE(dest, IPADDR_TYPE_V6); }else{ \ - ip4_addr_set_hton(ip_2_ip4(ipaddr), (src)); IP_SET_TYPE(dest, IPADDR_TYPE_V4); }}while(0) + ip6_addr_set_hton(ip_2_ip6(dest), ip_2_ip6(src)); IP_SET_TYPE(dest, IPADDR_TYPE_V6); }else{ \ + ip4_addr_set_hton(ip_2_ip4(dest), ip_2_ip4(src)); IP_SET_TYPE(dest, IPADDR_TYPE_V4); ip_clear_no4(ipaddr); }}while(0) /** @ingroup ipaddr */ #define ip_addr_get_network(target, host, netmask) do{if(IP_IS_V6(host)){ \ ip4_addr_set_zero(ip_2_ip4(target)); IP_SET_TYPE(target, IPADDR_TYPE_V6); } else { \ @@ -181,9 +203,13 @@ extern const ip_addr_t ip_addr_any_type; ip6_addr_cmp(ip_2_ip6(addr1), ip_2_ip6(addr2)) : \ ip4_addr_cmp(ip_2_ip4(addr1), ip_2_ip4(addr2)))) /** @ingroup ipaddr */ -#define ip_addr_isany(ipaddr) ((IP_IS_V6(ipaddr)) ? \ +#define ip_addr_cmp_zoneless(addr1, addr2) ((IP_GET_TYPE(addr1) != IP_GET_TYPE(addr2)) ? 0 : (IP_IS_V6_VAL(*(addr1)) ? \ + ip6_addr_cmp_zoneless(ip_2_ip6(addr1), ip_2_ip6(addr2)) : \ + ip4_addr_cmp(ip_2_ip4(addr1), ip_2_ip4(addr2)))) +/** @ingroup ipaddr */ +#define ip_addr_isany(ipaddr) (((ipaddr) == NULL) ? 1 : ((IP_IS_V6(ipaddr)) ? \ ip6_addr_isany(ip_2_ip6(ipaddr)) : \ - ip4_addr_isany(ip_2_ip4(ipaddr))) + ip4_addr_isany(ip_2_ip4(ipaddr)))) /** @ingroup ipaddr */ #define ip_addr_isany_val(ipaddr) ((IP_IS_V6_VAL(ipaddr)) ? \ ip6_addr_isany_val(*ip_2_ip6(&(ipaddr))) : \ @@ -210,12 +236,8 @@ extern const ip_addr_t ip_addr_any_type; #define ip_addr_debug_print_val(debug, ipaddr) do { if(IP_IS_V6_VAL(ipaddr)) { \ ip6_addr_debug_print_val(debug, *ip_2_ip6(&(ipaddr))); } else { \ ip4_addr_debug_print_val(debug, *ip_2_ip4(&(ipaddr))); }}while(0) -/** @ingroup ipaddr */ -#define ipaddr_ntoa(addr) (((addr) == NULL) ? "NULL" : \ - ((IP_IS_V6(addr)) ? ip6addr_ntoa(ip_2_ip6(addr)) : ip4addr_ntoa(ip_2_ip4(addr)))) -/** @ingroup ipaddr */ -#define ipaddr_ntoa_r(addr, buf, buflen) (((addr) == NULL) ? "NULL" : \ - ((IP_IS_V6(addr)) ? ip6addr_ntoa_r(ip_2_ip6(addr), buf, buflen) : ip4addr_ntoa_r(ip_2_ip4(addr), buf, buflen))) +char *ipaddr_ntoa(const ip_addr_t *addr); +char *ipaddr_ntoa_r(const ip_addr_t *addr, char *buf, int buflen); int ipaddr_aton(const char *cp, ip_addr_t *addr); /** @ingroup ipaddr */ @@ -226,7 +248,8 @@ int ipaddr_aton(const char *cp, ip_addr_t *addr); (ip6addr)->addr[3] = (ip4addr)->addr; \ (ip6addr)->addr[2] = PP_HTONL(0x0000FFFFUL); \ (ip6addr)->addr[1] = 0; \ - (ip6addr)->addr[0] = 0; } while(0); + (ip6addr)->addr[0] = 0; \ + ip6_addr_clear_zone(ip6addr); } while(0); /** @ingroup ipaddr */ #define unmap_ipv4_mapped_ipv6(ip4addr, ip6addr) \ @@ -236,8 +259,11 @@ int ipaddr_aton(const char *cp, ip_addr_t *addr); #else /* LWIP_IPV4 && LWIP_IPV6 */ -#define IP_ADDR_PCB_VERSION_MATCH(addr, pcb) 1 -#define IP_ADDR_PCB_VERSION_MATCH_EXACT(pcb, ipaddr) 1 +#define IP_ADDR_PCB_VERSION_MATCH(addr, pcb) 1 +#define IP_ADDR_PCB_VERSION_MATCH_EXACT(pcb, ipaddr) 1 + +#define ip_addr_set_any_val(is_ipv6, ipaddr) ip_addr_set_any(is_ipv6, &(ipaddr)) +#define ip_addr_set_loopback_val(is_ipv6, ipaddr) ip_addr_set_loopback(is_ipv6, &(ipaddr)) #if LWIP_IPV4 @@ -252,12 +278,14 @@ typedef ip4_addr_t ip_addr_t; #define IP_SET_TYPE_VAL(ipaddr, iptype) #define IP_SET_TYPE(ipaddr, iptype) #define IP_GET_TYPE(ipaddr) IPADDR_TYPE_V4 +#define IP_ADDR_RAW_SIZE(ipaddr) sizeof(ip4_addr_t) #define ip_2_ip4(ipaddr) (ipaddr) #define IP_ADDR4(ipaddr,a,b,c,d) IP4_ADDR(ipaddr,a,b,c,d) #define ip_addr_copy(dest, src) ip4_addr_copy(dest, src) #define ip_addr_copy_from_ip4(dest, src) ip4_addr_copy(dest, src) #define ip_addr_set_ip4_u32(ipaddr, val) ip4_addr_set_u32(ip_2_ip4(ipaddr), val) +#define ip_addr_set_ip4_u32_val(ipaddr, val) ip_addr_set_ip4_u32(&(ipaddr), val) #define ip_addr_get_ip4_u32(ipaddr) ip4_addr_get_u32(ip_2_ip4(ipaddr)) #define ip_addr_set(dest, src) ip4_addr_set(dest, src) #define ip_addr_set_ipaddr(dest, src) ip4_addr_set(dest, src) @@ -288,8 +316,8 @@ typedef ip4_addr_t ip_addr_t; #else /* LWIP_IPV4 */ typedef ip6_addr_t ip_addr_t; -#define IPADDR6_INIT(a, b, c, d) { { a, b, c, d } } -#define IPADDR6_INIT_HOST(a, b, c, d) { { PP_HTONL(a), PP_HTONL(b), PP_HTONL(c), PP_HTONL(d) } } +#define IPADDR6_INIT(a, b, c, d) { { a, b, c, d } IPADDR6_ZONE_INIT } +#define IPADDR6_INIT_HOST(a, b, c, d) { { PP_HTONL(a), PP_HTONL(b), PP_HTONL(c), PP_HTONL(d) } IPADDR6_ZONE_INIT } #define IP_IS_V4_VAL(ipaddr) 0 #define IP_IS_V6_VAL(ipaddr) 1 #define IP_IS_V4(ipaddr) 0 @@ -298,12 +326,14 @@ typedef ip6_addr_t ip_addr_t; #define IP_SET_TYPE_VAL(ipaddr, iptype) #define IP_SET_TYPE(ipaddr, iptype) #define IP_GET_TYPE(ipaddr) IPADDR_TYPE_V6 +#define IP_ADDR_RAW_SIZE(ipaddr) sizeof(ip6_addr_t) #define ip_2_ip6(ipaddr) (ipaddr) #define IP_ADDR6(ipaddr,i0,i1,i2,i3) IP6_ADDR(ipaddr,i0,i1,i2,i3) #define IP_ADDR6_HOST(ipaddr,i0,i1,i2,i3) IP_ADDR6(ipaddr,PP_HTONL(i0),PP_HTONL(i1),PP_HTONL(i2),PP_HTONL(i3)) #define ip_addr_copy(dest, src) ip6_addr_copy(dest, src) #define ip_addr_copy_from_ip6(dest, src) ip6_addr_copy(dest, src) +#define ip_addr_copy_from_ip6_packed(dest, src) ip6_addr_copy_from_packed(dest, src) #define ip_addr_set(dest, src) ip6_addr_set(dest, src) #define ip_addr_set_ipaddr(dest, src) ip6_addr_set(dest, src) #define ip_addr_set_zero(ipaddr) ip6_addr_set_zero(ipaddr) @@ -314,6 +344,7 @@ typedef ip6_addr_t ip_addr_t; #define ip_addr_get_network(target, host, mask) ip6_addr_set_zero(target) #define ip_addr_netcmp(addr1, addr2, mask) 0 #define ip_addr_cmp(addr1, addr2) ip6_addr_cmp(addr1, addr2) +#define ip_addr_cmp_zoneless(addr1, addr2) ip6_addr_cmp_zoneless(addr1, addr2) #define ip_addr_isany(ipaddr) ip6_addr_isany(ipaddr) #define ip_addr_isany_val(ipaddr) ip6_addr_isany_val(ipaddr) #define ip_addr_isloopback(ipaddr) ip6_addr_isloopback(ipaddr) diff --git a/Libraries/LwIP/src/include/lwip/memp.h b/Libraries/LwIP/src/include/lwip/memp.h index c45aca8..74ac818 100755 --- a/Libraries/LwIP/src/include/lwip/memp.h +++ b/Libraries/LwIP/src/include/lwip/memp.h @@ -90,7 +90,7 @@ extern const struct memp_desc* const memp_pools[MEMP_MAX]; * - free: LWIP_MEMPOOL_FREE(my_private_pool, my_new_mem); * * To relocate a pool, declare it as extern in cc.h. Example for GCC: - * extern u8_t __attribute__((section(".onchip_mem"))) memp_memory_my_private_pool[]; + * extern u8_t \_\_attribute\_\_((section(".onchip_mem"))) memp_memory_my_private_pool_base[]; */ #define LWIP_MEMPOOL_DECLARE(name,num,size,desc) \ LWIP_DECLARE_MEMORY_ALIGNED(memp_memory_ ## name ## _base, ((num) * (MEMP_SIZE + MEMP_ALIGN_SIZE(size)))); \ diff --git a/Libraries/LwIP/src/include/lwip/nd6.h b/Libraries/LwIP/src/include/lwip/nd6.h index 3dc0278..89137d5 100755 --- a/Libraries/LwIP/src/include/lwip/nd6.h +++ b/Libraries/LwIP/src/include/lwip/nd6.h @@ -58,6 +58,11 @@ extern "C" { /** 1 second period */ #define ND6_TMR_INTERVAL 1000 +/** Router solicitations are sent in 4 second intervals (see RFC 4861, ch. 6.3.7) */ +#ifndef ND6_RTR_SOLICITATION_INTERVAL +#define ND6_RTR_SOLICITATION_INTERVAL 4000 +#endif + struct pbuf; struct netif; @@ -74,6 +79,7 @@ void nd6_cleanup_netif(struct netif *netif); #if LWIP_IPV6_MLD void nd6_adjust_mld_membership(struct netif *netif, s8_t addr_idx, u8_t new_state); #endif /* LWIP_IPV6_MLD */ +void nd6_restart_netif(struct netif *netif); #ifdef __cplusplus } diff --git a/Libraries/LwIP/src/include/lwip/netbuf.h b/Libraries/LwIP/src/include/lwip/netbuf.h index bfd7242..e92c934 100755 --- a/Libraries/LwIP/src/include/lwip/netbuf.h +++ b/Libraries/LwIP/src/include/lwip/netbuf.h @@ -62,9 +62,7 @@ struct netbuf { ip_addr_t addr; u16_t port; #if LWIP_NETBUF_RECVINFO || LWIP_CHECKSUM_ON_COPY -#if LWIP_CHECKSUM_ON_COPY u8_t flags; -#endif /* LWIP_CHECKSUM_ON_COPY */ u16_t toport_chksum; #if LWIP_NETBUF_RECVINFO ip_addr_t toaddr; diff --git a/Libraries/LwIP/src/include/lwip/netif.h b/Libraries/LwIP/src/include/lwip/netif.h index 61bac9f..d3ec064 100755 --- a/Libraries/LwIP/src/include/lwip/netif.h +++ b/Libraries/LwIP/src/include/lwip/netif.h @@ -63,6 +63,12 @@ extern "C" { #define NETIF_MAX_HWADDR_LEN 6U #endif +/** The size of a fully constructed netif name which the + * netif can be identified by in APIs. Composed of + * 2 chars, 3 (max) digits, and 1 \0 + */ +#define NETIF_NAMESIZE 6 + /** * @defgroup netif_flags Flags * @ingroup netif @@ -106,6 +112,7 @@ extern "C" { enum lwip_internal_netif_client_data_index { +#if LWIP_IPV4 #if LWIP_DHCP LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, #endif @@ -115,9 +122,15 @@ enum lwip_internal_netif_client_data_index #if LWIP_IGMP LWIP_NETIF_CLIENT_DATA_INDEX_IGMP, #endif +#endif /* LWIP_IPV4 */ +#if LWIP_IPV6 +#if LWIP_IPV6_DHCP6 + LWIP_NETIF_CLIENT_DATA_INDEX_DHCP6, +#endif #if LWIP_IPV6_MLD LWIP_NETIF_CLIENT_DATA_INDEX_MLD6, #endif +#endif /* LWIP_IPV6 */ LWIP_NETIF_CLIENT_DATA_INDEX_MAX }; @@ -158,6 +171,9 @@ typedef err_t (*netif_init_fn)(struct netif *netif); * * @param p The received packet, copied into a pbuf * @param inp The netif which received the packet + * @return ERR_OK if the packet was handled + * != ERR_OK is the packet was NOT handled, in this case, the caller has + * to free the pbuf */ typedef err_t (*netif_input_fn)(struct pbuf *p, struct netif *inp); @@ -207,8 +223,10 @@ typedef err_t (*netif_mld_mac_filter_fn)(struct netif *netif, const ip6_addr_t *group, enum netif_mac_filter_action action); #endif /* LWIP_IPV6 && LWIP_IPV6_MLD */ -#if LWIP_DHCP || LWIP_AUTOIP || LWIP_IGMP || LWIP_IPV6_MLD || (LWIP_NUM_NETIF_CLIENT_DATA > 0) +#if LWIP_DHCP || LWIP_AUTOIP || LWIP_IGMP || LWIP_IPV6_MLD || LWIP_IPV6_DHCP6 || (LWIP_NUM_NETIF_CLIENT_DATA > 0) +#if LWIP_NUM_NETIF_CLIENT_DATA > 0 u8_t netif_alloc_client_data_id(void); +#endif /** @ingroup netif_cd * Set client data. Obtain ID from netif_alloc_client_data_id(). */ @@ -217,14 +235,33 @@ u8_t netif_alloc_client_data_id(void); * Get client data. Obtain ID from netif_alloc_client_data_id(). */ #define netif_get_client_data(netif, id) (netif)->client_data[(id)] -#endif /* LWIP_DHCP || LWIP_AUTOIP || (LWIP_NUM_NETIF_CLIENT_DATA > 0) */ +#endif + +#if (LWIP_IPV4 && LWIP_ARP && (ARP_TABLE_SIZE > 0x7f)) || (LWIP_IPV6 && (LWIP_ND6_NUM_DESTINATIONS > 0x7f)) +typedef u16_t netif_addr_idx_t; +#define NETIF_ADDR_IDX_MAX 0x7FFF +#else +typedef u8_t netif_addr_idx_t; +#define NETIF_ADDR_IDX_MAX 0x7F +#endif + +#if LWIP_NETIF_HWADDRHINT +#define LWIP_NETIF_USE_HINTS 1 +struct netif_hint { + netif_addr_idx_t addr_hint; +}; +#else /* LWIP_NETIF_HWADDRHINT */ +#define LWIP_NETIF_USE_HINTS 0 +#endif /* LWIP_NETIF_HWADDRHINT */ /** Generic data structure used for all lwIP network interfaces. * The following fields should be filled in by the initialization * function for the device driver: hwaddr_len, hwaddr[], mtu, flags */ struct netif { +#if !LWIP_SINGLE_NETIF /** pointer to next in linked list */ struct netif *next; +#endif #if LWIP_IPV4 /** IP address configuration in network byte order */ @@ -238,6 +275,13 @@ struct netif { /** The state of each IPv6 address (Tentative, Preferred, etc). * @see ip6_addr.h */ u8_t ip6_addr_state[LWIP_IPV6_NUM_ADDRESSES]; +#if LWIP_IPV6_ADDRESS_LIFETIMES + /** Remaining valid and preferred lifetime of each IPv6 address, in seconds. + * For valid lifetimes, the special value of IP6_ADDR_LIFE_STATIC (0) + * indicates the address is static and has no lifetimes. */ + u32_t ip6_addr_valid_life[LWIP_IPV6_NUM_ADDRESSES]; + u32_t ip6_addr_pref_life[LWIP_IPV6_NUM_ADDRESSES]; +#endif /* LWIP_IPV6_ADDRESS_LIFETIMES */ #endif /* LWIP_IPV6 */ /** This function is called by the network device driver * to pass a packet up the TCP/IP stack. */ @@ -280,14 +324,6 @@ struct netif { #ifdef netif_get_client_data void* client_data[LWIP_NETIF_CLIENT_DATA_INDEX_MAX + LWIP_NUM_NETIF_CLIENT_DATA]; #endif -#if LWIP_IPV6_AUTOCONFIG - /** is this netif enabled for IPv6 autoconfiguration */ - u8_t ip6_autoconfig_enabled; -#endif /* LWIP_IPV6_AUTOCONFIG */ -#if LWIP_IPV6_SEND_ROUTER_SOLICIT - /** Number of Router Solicitation messages that remain to be sent. */ - u8_t rs_count; -#endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */ #if LWIP_NETIF_HOSTNAME /* the hostname for this netif, NULL is a valid value */ const char* hostname; @@ -297,16 +333,29 @@ struct netif { #endif /* LWIP_CHECKSUM_CTRL_PER_NETIF*/ /** maximum transfer unit (in bytes) */ u16_t mtu; - /** number of bytes used in hwaddr */ - u8_t hwaddr_len; +#if LWIP_IPV6 && LWIP_ND6_ALLOW_RA_UPDATES + /** maximum transfer unit (in bytes), updated by RA */ + u16_t mtu6; +#endif /* LWIP_IPV6 && LWIP_ND6_ALLOW_RA_UPDATES */ /** link level hardware address of this interface */ u8_t hwaddr[NETIF_MAX_HWADDR_LEN]; + /** number of bytes used in hwaddr */ + u8_t hwaddr_len; /** flags (@see @ref netif_flags) */ u8_t flags; /** descriptive abbreviation */ char name[2]; - /** number of this interface */ + /** number of this interface. Used for @ref if_api and @ref netifapi_netif, + * as well as for IPv6 zones */ u8_t num; +#if LWIP_IPV6_AUTOCONFIG + /** is this netif enabled for IPv6 autoconfiguration */ + u8_t ip6_autoconfig_enabled; +#endif /* LWIP_IPV6_AUTOCONFIG */ +#if LWIP_IPV6_SEND_ROUTER_SOLICIT + /** Number of Router Solicitation messages that remain to be sent. */ + u8_t rs_count; +#endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */ #if MIB2_STATS /** link type (from "snmp_ifType" enum from snmp_mib2.h) */ u8_t link_type; @@ -327,9 +376,9 @@ struct netif { filter table of the ethernet MAC. */ netif_mld_mac_filter_fn mld_mac_filter; #endif /* LWIP_IPV6 && LWIP_IPV6_MLD */ -#if LWIP_NETIF_HWADDRHINT - u8_t *addr_hint; -#endif /* LWIP_NETIF_HWADDRHINT */ +#if LWIP_NETIF_USE_HINTS + struct netif_hint *hints; +#endif /* LWIP_NETIF_USE_HINTS */ #if ENABLE_LOOPBACK /* List of packets to be queued for ourselves. */ struct pbuf *loop_first; @@ -349,21 +398,28 @@ struct netif { #define IF__NETIF_CHECKSUM_ENABLED(netif, chksumflag) #endif /* LWIP_CHECKSUM_CTRL_PER_NETIF */ +#if LWIP_SINGLE_NETIF +#define NETIF_FOREACH(netif) if (((netif) = netif_default) != NULL) +#else /* LWIP_SINGLE_NETIF */ /** The list of network interfaces. */ extern struct netif *netif_list; +#define NETIF_FOREACH(netif) for ((netif) = netif_list; (netif) != NULL; (netif) = (netif)->next) +#endif /* LWIP_SINGLE_NETIF */ /** The default network interface. */ extern struct netif *netif_default; void netif_init(void); +struct netif *netif_add_noaddr(struct netif *netif, void *state, netif_init_fn init, netif_input_fn input); + +#if LWIP_IPV4 struct netif *netif_add(struct netif *netif, -#if LWIP_IPV4 - const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, -#endif /* LWIP_IPV4 */ - void *state, netif_init_fn init, netif_input_fn input); -#if LWIP_IPV4 + const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, + void *state, netif_init_fn init, netif_input_fn input); void netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw); +#else /* LWIP_IPV4 */ +struct netif *netif_add(struct netif *netif, void *state, netif_init_fn init, netif_input_fn input); #endif /* LWIP_IPV4 */ void netif_remove(struct netif * netif); @@ -393,6 +449,10 @@ void netif_set_gw(struct netif *netif, const ip4_addr_t *gw); #define netif_ip_gw4(netif) ((const ip_addr_t*)&((netif)->gw)) #endif /* LWIP_IPV4 */ +#define netif_set_flags(netif, set_flags) do { (netif)->flags = (u8_t)((netif)->flags | (set_flags)); } while(0) +#define netif_clear_flags(netif, clr_flags) do { (netif)->flags = (u8_t)((netif)->flags & (u8_t)(~(clr_flags) & 0xff)); } while(0) +#define netif_is_flag_set(nefif, flag) (((netif)->flags & (flag)) != 0) + void netif_set_up(struct netif *netif); void netif_set_down(struct netif *netif); /** @ingroup netif @@ -459,13 +519,148 @@ s8_t netif_get_ip6_addr_match(struct netif *netif, const ip6_addr_t *ip6addr); void netif_create_ip6_linklocal_address(struct netif *netif, u8_t from_mac_48bit); err_t netif_add_ip6_address(struct netif *netif, const ip6_addr_t *ip6addr, s8_t *chosen_idx); #define netif_set_ip6_autoconfig_enabled(netif, action) do { if(netif) { (netif)->ip6_autoconfig_enabled = (action); }}while(0) +#if LWIP_IPV6_ADDRESS_LIFETIMES +#define netif_ip6_addr_valid_life(netif, i) \ + (((netif) != NULL) ? ((netif)->ip6_addr_valid_life[i]) : IP6_ADDR_LIFE_STATIC) +#define netif_ip6_addr_set_valid_life(netif, i, secs) \ + do { if (netif != NULL) { (netif)->ip6_addr_valid_life[i] = (secs); }} while (0) +#define netif_ip6_addr_pref_life(netif, i) \ + (((netif) != NULL) ? ((netif)->ip6_addr_pref_life[i]) : IP6_ADDR_LIFE_STATIC) +#define netif_ip6_addr_set_pref_life(netif, i, secs) \ + do { if (netif != NULL) { (netif)->ip6_addr_pref_life[i] = (secs); }} while (0) +#define netif_ip6_addr_isstatic(netif, i) \ + (netif_ip6_addr_valid_life((netif), (i)) == IP6_ADDR_LIFE_STATIC) +#else /* !LWIP_IPV6_ADDRESS_LIFETIMES */ +#define netif_ip6_addr_isstatic(netif, i) (1) /* all addresses are static */ +#endif /* !LWIP_IPV6_ADDRESS_LIFETIMES */ +#if LWIP_ND6_ALLOW_RA_UPDATES +#define netif_mtu6(netif) ((netif)->mtu6) +#else /* LWIP_ND6_ALLOW_RA_UPDATES */ +#define netif_mtu6(netif) ((netif)->mtu) +#endif /* LWIP_ND6_ALLOW_RA_UPDATES */ #endif /* LWIP_IPV6 */ -#if LWIP_NETIF_HWADDRHINT -#define NETIF_SET_HWADDRHINT(netif, hint) ((netif)->addr_hint = (hint)) -#else /* LWIP_NETIF_HWADDRHINT */ -#define NETIF_SET_HWADDRHINT(netif, hint) -#endif /* LWIP_NETIF_HWADDRHINT */ +#if LWIP_NETIF_USE_HINTS +#define NETIF_SET_HINTS(netif, netifhint) (netif)->hints = (netifhint) +#define NETIF_RESET_HINTS(netif) (netif)->hints = NULL +#else /* LWIP_NETIF_USE_HINTS */ +#define NETIF_SET_HINTS(netif, netifhint) +#define NETIF_RESET_HINTS(netif) +#endif /* LWIP_NETIF_USE_HINTS */ + +u8_t netif_name_to_index(const char *name); +char * netif_index_to_name(u8_t idx, char *name); +struct netif* netif_get_by_index(u8_t idx); + +/* Interface indexes always start at 1 per RFC 3493, section 4, num starts at 0 (internal index is 0..254)*/ +#define netif_get_index(netif) ((u8_t)((netif)->num + 1)) +#define NETIF_NO_INDEX (0) + +/** + * @ingroup netif + * Extended netif status callback (NSC) reasons flags. + * May be extended in the future! + */ +typedef u16_t netif_nsc_reason_t; + +/* used for initialization only */ +#define LWIP_NSC_NONE 0x0000 +/** netif was added. arg: NULL. Called AFTER netif was added. */ +#define LWIP_NSC_NETIF_ADDED 0x0001 +/** netif was removed. arg: NULL. Called BEFORE netif is removed. */ +#define LWIP_NSC_NETIF_REMOVED 0x0002 +/** link changed */ +#define LWIP_NSC_LINK_CHANGED 0x0004 +/** netif administrative status changed.\n + * up is called AFTER netif is set up.\n + * down is called BEFORE the netif is actually set down. */ +#define LWIP_NSC_STATUS_CHANGED 0x0008 +/** IPv4 address has changed */ +#define LWIP_NSC_IPV4_ADDRESS_CHANGED 0x0010 +/** IPv4 gateway has changed */ +#define LWIP_NSC_IPV4_GATEWAY_CHANGED 0x0020 +/** IPv4 netmask has changed */ +#define LWIP_NSC_IPV4_NETMASK_CHANGED 0x0040 +/** called AFTER IPv4 address/gateway/netmask changes have been applied */ +#define LWIP_NSC_IPV4_SETTINGS_CHANGED 0x0080 +/** IPv6 address was added */ +#define LWIP_NSC_IPV6_SET 0x0100 +/** IPv6 address state has changed */ +#define LWIP_NSC_IPV6_ADDR_STATE_CHANGED 0x0200 + +/** @ingroup netif + * Argument supplied to netif_ext_callback_fn. + */ +typedef union +{ + /** Args to LWIP_NSC_LINK_CHANGED callback */ + struct link_changed_s + { + /** 1: up; 0: down */ + u8_t state; + } link_changed; + /** Args to LWIP_NSC_STATUS_CHANGED callback */ + struct status_changed_s + { + /** 1: up; 0: down */ + u8_t state; + } status_changed; + /** Args to LWIP_NSC_IPV4_ADDRESS_CHANGED|LWIP_NSC_IPV4_GATEWAY_CHANGED|LWIP_NSC_IPV4_NETMASK_CHANGED|LWIP_NSC_IPV4_SETTINGS_CHANGED callback */ + struct ipv4_changed_s + { + /** Old IPv4 address */ + const ip_addr_t* old_address; + const ip_addr_t* old_netmask; + const ip_addr_t* old_gw; + } ipv4_changed; + /** Args to LWIP_NSC_IPV6_SET callback */ + struct ipv6_set_s + { + /** Index of changed IPv6 address */ + s8_t addr_index; + /** Old IPv6 address */ + const ip_addr_t* old_address; + } ipv6_set; + /** Args to LWIP_NSC_IPV6_ADDR_STATE_CHANGED callback */ + struct ipv6_addr_state_changed_s + { + /** Index of affected IPv6 address */ + s8_t addr_index; + /** Old IPv6 address state */ + u8_t old_state; + /** Affected IPv6 address */ + const ip_addr_t* address; + } ipv6_addr_state_changed; +} netif_ext_callback_args_t; + +/** + * @ingroup netif + * Function used for extended netif status callbacks + * Note: When parsing reason argument, keep in mind that more reasons may be added in the future! + * @param netif netif that is affected by change + * @param reason change reason + * @param args depends on reason, see reason description + */ +typedef void (*netif_ext_callback_fn)(struct netif* netif, netif_nsc_reason_t reason, const netif_ext_callback_args_t* args); + +#if LWIP_NETIF_EXT_STATUS_CALLBACK +struct netif_ext_callback; +typedef struct netif_ext_callback +{ + netif_ext_callback_fn callback_fn; + struct netif_ext_callback* next; +} netif_ext_callback_t; + +#define NETIF_DECLARE_EXT_CALLBACK(name) static netif_ext_callback_t name; +void netif_add_ext_callback(netif_ext_callback_t* callback, netif_ext_callback_fn fn); +void netif_remove_ext_callback(netif_ext_callback_t* callback); +void netif_invoke_ext_callback(struct netif* netif, netif_nsc_reason_t reason, const netif_ext_callback_args_t* args); +#else +#define NETIF_DECLARE_EXT_CALLBACK(name) +#define netif_add_ext_callback(callback, fn) +#define netif_remove_ext_callback(callback) +#define netif_invoke_ext_callback(netif, reason, args) +#endif #ifdef __cplusplus } diff --git a/Libraries/LwIP/src/include/lwip/netifapi.h b/Libraries/LwIP/src/include/lwip/netifapi.h index 6c1b56b..5bbd8f8 100755 --- a/Libraries/LwIP/src/include/lwip/netifapi.h +++ b/Libraries/LwIP/src/include/lwip/netifapi.h @@ -41,43 +41,27 @@ #include "lwip/dhcp.h" #include "lwip/autoip.h" #include "lwip/priv/tcpip_priv.h" +#include "lwip/priv/api_msg.h" +#include "lwip/prot/ethernet.h" #ifdef __cplusplus extern "C" { #endif -#if LWIP_MPU_COMPATIBLE -#define NETIFAPI_IPADDR_DEF(type, m) type m -#else /* LWIP_MPU_COMPATIBLE */ -#define NETIFAPI_IPADDR_DEF(type, m) const type * m -#endif /* LWIP_MPU_COMPATIBLE */ - -typedef void (*netifapi_void_fn)(struct netif *netif); -typedef err_t (*netifapi_errt_fn)(struct netif *netif); - -struct netifapi_msg { - struct tcpip_api_call_data call; - struct netif *netif; - union { - struct { -#if LWIP_IPV4 - NETIFAPI_IPADDR_DEF(ip4_addr_t, ipaddr); - NETIFAPI_IPADDR_DEF(ip4_addr_t, netmask); - NETIFAPI_IPADDR_DEF(ip4_addr_t, gw); -#endif /* LWIP_IPV4 */ - void *state; - netif_init_fn init; - netif_input_fn input; - } add; - struct { - netifapi_void_fn voidfunc; - netifapi_errt_fn errtfunc; - } common; - } msg; +/* API for application */ +#if LWIP_ARP && LWIP_IPV4 +/* Used for netfiapi_arp_* APIs */ +enum netifapi_arp_entry { + NETIFAPI_ARP_PERM /* Permanent entry */ + /* Other entry types can be added here */ }; +/** @ingroup netifapi_arp */ +err_t netifapi_arp_add(const ip4_addr_t *ipaddr, struct eth_addr *ethaddr, enum netifapi_arp_entry type); +/** @ingroup netifapi_arp */ +err_t netifapi_arp_remove(const ip4_addr_t *ipaddr, enum netifapi_arp_entry type); +#endif /* LWIP_ARP && LWIP_IPV4 */ -/* API for application */ err_t netifapi_netif_add(struct netif *netif, #if LWIP_IPV4 const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, @@ -93,16 +77,33 @@ err_t netifapi_netif_common(struct netif *netif, netifapi_void_fn voidfunc, netifapi_errt_fn errtfunc); /** @ingroup netifapi_netif */ +err_t netifapi_netif_name_to_index(const char *name, u8_t *index); +/** @ingroup netifapi_netif */ +err_t netifapi_netif_index_to_name(u8_t index, char *name); + +/** @ingroup netifapi_netif + * @see netif_remove() + */ #define netifapi_netif_remove(n) netifapi_netif_common(n, netif_remove, NULL) -/** @ingroup netifapi_netif */ +/** @ingroup netifapi_netif + * @see netif_set_up() + */ #define netifapi_netif_set_up(n) netifapi_netif_common(n, netif_set_up, NULL) -/** @ingroup netifapi_netif */ +/** @ingroup netifapi_netif + * @see netif_set_down() + */ #define netifapi_netif_set_down(n) netifapi_netif_common(n, netif_set_down, NULL) -/** @ingroup netifapi_netif */ +/** @ingroup netifapi_netif + * @see netif_set_default() + */ #define netifapi_netif_set_default(n) netifapi_netif_common(n, netif_set_default, NULL) -/** @ingroup netifapi_netif */ +/** @ingroup netifapi_netif + * @see netif_set_link_up() + */ #define netifapi_netif_set_link_up(n) netifapi_netif_common(n, netif_set_link_up, NULL) -/** @ingroup netifapi_netif */ +/** @ingroup netifapi_netif + * @see netif_set_link_down() + */ #define netifapi_netif_set_link_down(n) netifapi_netif_common(n, netif_set_link_down, NULL) /** @@ -110,25 +111,45 @@ err_t netifapi_netif_common(struct netif *netif, netifapi_void_fn voidfunc, * @ingroup netifapi * To be called from non-TCPIP threads */ -/** @ingroup netifapi_dhcp4 */ -#define netifapi_dhcp_start(n) netifapi_netif_common(n, NULL, dhcp_start) -/** @ingroup netifapi_dhcp4 */ -#define netifapi_dhcp_stop(n) netifapi_netif_common(n, dhcp_stop, NULL) -/** @ingroup netifapi_dhcp4 */ -#define netifapi_dhcp_inform(n) netifapi_netif_common(n, dhcp_inform, NULL) -/** @ingroup netifapi_dhcp4 */ -#define netifapi_dhcp_renew(n) netifapi_netif_common(n, NULL, dhcp_renew) -/** @ingroup netifapi_dhcp4 */ -#define netifapi_dhcp_release(n) netifapi_netif_common(n, NULL, dhcp_release) +/** @ingroup netifapi_dhcp4 + * @see dhcp_start() + */ +#define netifapi_dhcp_start(n) netifapi_netif_common(n, NULL, dhcp_start) +/** + * @ingroup netifapi_dhcp4 + * @deprecated Use netifapi_dhcp_release_and_stop() instead. + */ +#define netifapi_dhcp_stop(n) netifapi_netif_common(n, dhcp_stop, NULL) +/** @ingroup netifapi_dhcp4 + * @see dhcp_inform() + */ +#define netifapi_dhcp_inform(n) netifapi_netif_common(n, dhcp_inform, NULL) +/** @ingroup netifapi_dhcp4 + * @see dhcp_renew() + */ +#define netifapi_dhcp_renew(n) netifapi_netif_common(n, NULL, dhcp_renew) +/** + * @ingroup netifapi_dhcp4 + * @deprecated Use netifapi_dhcp_release_and_stop() instead. + */ +#define netifapi_dhcp_release(n) netifapi_netif_common(n, NULL, dhcp_release) +/** @ingroup netifapi_dhcp4 + * @see dhcp_release_and_stop() + */ +#define netifapi_dhcp_release_and_stop(n) netifapi_netif_common(n, dhcp_release_and_stop, NULL) /** * @defgroup netifapi_autoip AUTOIP * @ingroup netifapi * To be called from non-TCPIP threads */ -/** @ingroup netifapi_autoip */ +/** @ingroup netifapi_autoip + * @see autoip_start() + */ #define netifapi_autoip_start(n) netifapi_netif_common(n, NULL, autoip_start) -/** @ingroup netifapi_autoip */ +/** @ingroup netifapi_autoip + * @see autoip_stop() + */ #define netifapi_autoip_stop(n) netifapi_netif_common(n, NULL, autoip_stop) #ifdef __cplusplus diff --git a/Libraries/LwIP/src/include/lwip/opt.h b/Libraries/LwIP/src/include/lwip/opt.h index c04dd5b..bb6c33d 100755 --- a/Libraries/LwIP/src/include/lwip/opt.h +++ b/Libraries/LwIP/src/include/lwip/opt.h @@ -144,6 +144,15 @@ #if !defined SMEMCPY || defined __DOXYGEN__ #define SMEMCPY(dst,src,len) memcpy(dst,src,len) #endif + +/** + * MEMMOVE: override this if you have a faster implementation at hand than the + * one included in your C library. lwIP currently uses MEMMOVE only when IPv6 + * fragmentation support is enabled. + */ +#if !defined MEMMOVE || defined __DOXYGEN__ +#define MEMMOVE(dst,src,len) memmove(dst,src,len) +#endif /** * @} */ @@ -203,6 +212,29 @@ #if !defined SYS_LIGHTWEIGHT_PROT || defined __DOXYGEN__ #define SYS_LIGHTWEIGHT_PROT 1 #endif + +/** + * Macro/function to check whether lwIP's threading/locking + * requirements are satisfied during current function call. + * This macro usually calls a function that is implemented in the OS-dependent + * sys layer and performs the following checks: + * - Not in ISR (this should be checked for NO_SYS==1, too!) + * - If @ref LWIP_TCPIP_CORE_LOCKING = 1: TCPIP core lock is held + * - If @ref LWIP_TCPIP_CORE_LOCKING = 0: function is called from TCPIP thread + * @see @ref multithreading + */ +#if !defined LWIP_ASSERT_CORE_LOCKED || defined __DOXYGEN__ +#define LWIP_ASSERT_CORE_LOCKED() +#endif + +/** + * Called as first thing in the lwIP TCPIP thread. Can be used in conjunction + * with @ref LWIP_ASSERT_CORE_LOCKED to check core locking. + * @see @ref multithreading + */ +#if !defined LWIP_MARK_TCPIP_THREAD || defined __DOXYGEN__ +#define LWIP_MARK_TCPIP_THREAD() +#endif /** * @} */ @@ -239,6 +271,15 @@ #define MEMP_MEM_MALLOC 0 #endif +/** + * MEMP_MEM_INIT==1: Force use of memset to initialize pool memory. + * Useful if pool are moved in uninitialized section of memory. This will ensure + * default values in pcbs struct are well initialized in all conditions. + */ +#if !defined MEMP_MEM_INIT || defined __DOXYGEN__ +#define MEMP_MEM_INIT 0 +#endif + /** * MEM_ALIGNMENT: should be set to the alignment of the CPU * 4 byte alignment -> \#define MEM_ALIGNMENT 4 @@ -277,6 +318,27 @@ #define MEMP_SANITY_CHECK 0 #endif +/** + * MEM_OVERFLOW_CHECK: mem overflow protection reserves a configurable + * amount of bytes before and after each heap allocation chunk and fills + * it with a prominent default value. + * MEM_OVERFLOW_CHECK == 0 no checking + * MEM_OVERFLOW_CHECK == 1 checks each element when it is freed + * MEM_OVERFLOW_CHECK >= 2 checks all heap elements every time + * mem_malloc() or mem_free() is called (useful but slow!) + */ +#if !defined MEM_OVERFLOW_CHECK || defined __DOXYGEN__ +#define MEM_OVERFLOW_CHECK 0 +#endif + +/** + * MEM_SANITY_CHECK==1: run a sanity check after each mem_free() to make + * sure that the linked list of heap elements is not corrupted. + */ +#if !defined MEM_SANITY_CHECK || defined __DOXYGEN__ +#define MEM_SANITY_CHECK 0 +#endif + /** * MEM_USE_POOLS==1: Use an alternative to malloc() by allocating from a set * of memory pools of various sizes. When mem_malloc is called, an element of @@ -390,6 +452,16 @@ #define MEMP_NUM_TCP_SEG 16 #endif +/** + * MEMP_NUM_ALTCP_PCB: the number of simultaneously active altcp layer pcbs. + * (requires the LWIP_ALTCP option) + * Connections with multiple layers require more than one altcp_pcb (e.g. TLS + * over TCP requires 2 altcp_pcbs, one for TLS and one for TCP). + */ +#if !defined MEMP_NUM_ALTCP_PCB || defined __DOXYGEN__ +#define MEMP_NUM_ALTCP_PCB MEMP_NUM_TCP_PCB +#endif + /** * MEMP_NUM_REASSDATA: the number of IP packets simultaneously queued for * reassembly (whole packets, not fragments!) @@ -429,13 +501,19 @@ #define MEMP_NUM_IGMP_GROUP 8 #endif +/** + * The number of sys timeouts used by the core stack (not apps) + * The default number of timeouts is calculated here for all enabled modules. + */ +#define LWIP_NUM_SYS_TIMEOUT_INTERNAL (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + PPP_NUM_TIMEOUTS + (LWIP_IPV6 * (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD))) + /** * MEMP_NUM_SYS_TIMEOUT: the number of simultaneously active timeouts. * The default number of timeouts is calculated here for all enabled modules. * The formula expects settings to be either '0' or '1'. */ #if !defined MEMP_NUM_SYS_TIMEOUT || defined __DOXYGEN__ -#define MEMP_NUM_SYS_TIMEOUT (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + (PPP_SUPPORT*6*MEMP_NUM_PPP_PCB) + (LWIP_IPV6 ? (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD) : 0)) +#define MEMP_NUM_SYS_TIMEOUT LWIP_NUM_SYS_TIMEOUT_INTERNAL #endif /** @@ -454,6 +532,15 @@ #define MEMP_NUM_NETCONN 4 #endif +/** + * MEMP_NUM_SELECT_CB: the number of struct lwip_select_cb. + * (Only needed if you have LWIP_MPU_COMPATIBLE==1 and use the socket API. + * In that case, you need one per thread calling lwip_select.) + */ +#if !defined MEMP_NUM_SELECT_CB || defined __DOXYGEN__ +#define MEMP_NUM_SELECT_CB 4 +#endif + /** * MEMP_NUM_TCPIP_MSG_API: the number of struct tcpip_msg, which are used * for callback/timeout API communication. @@ -617,7 +704,7 @@ * (but this should only occur for AutoIP). */ #if !defined ETHARP_TABLE_MATCH_NETIF || defined __DOXYGEN__ -#define ETHARP_TABLE_MATCH_NETIF 0 +#define ETHARP_TABLE_MATCH_NETIF !LWIP_SINGLE_NETIF #endif /** * @} @@ -692,7 +779,7 @@ * in this time, the whole packet is discarded. */ #if !defined IP_REASS_MAXAGE || defined __DOXYGEN__ -#define IP_REASS_MAXAGE 3 +#define IP_REASS_MAXAGE 15 #endif /** @@ -700,6 +787,8 @@ * Since the received pbufs are enqueued, be sure to configure * PBUF_POOL_SIZE > IP_REASS_MAX_PBUFS so that the stack is still able to receive * packets even if the maximum amount of fragments is enqueued for reassembly! + * When IPv4 *and* IPv6 are enabled, this even changes to + * (PBUF_POOL_SIZE > 2 * IP_REASS_MAX_PBUFS)! */ #if !defined IP_REASS_MAX_PBUFS || defined __DOXYGEN__ #define IP_REASS_MAX_PBUFS 10 @@ -739,15 +828,6 @@ #if !defined IP_FORWARD_ALLOW_TX_ON_RX_NETIF || defined __DOXYGEN__ #define IP_FORWARD_ALLOW_TX_ON_RX_NETIF 0 #endif - -/** - * LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS==1: randomize the local port for the first - * local TCP/UDP pcb (default==0). This can prevent creating predictable port - * numbers after booting a device. - */ -#if !defined LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS || defined __DOXYGEN__ -#define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS 0 -#endif /** * @} */ @@ -774,7 +854,7 @@ * ICMP_TTL: Default value for Time-To-Live used by ICMP packets. */ #if !defined ICMP_TTL || defined __DOXYGEN__ -#define ICMP_TTL (IP_DEFAULT_TTL) +#define ICMP_TTL IP_DEFAULT_TTL #endif /** @@ -815,7 +895,7 @@ * LWIP_RAW==1: Enable application layer to hook into the IP layer itself. */ #if !defined RAW_TTL || defined __DOXYGEN__ -#define RAW_TTL (IP_DEFAULT_TTL) +#define RAW_TTL IP_DEFAULT_TTL #endif /** * @} @@ -847,17 +927,7 @@ * DHCP_DOES_ARP_CHECK==1: Do an ARP check on the offered address. */ #if !defined DHCP_DOES_ARP_CHECK || defined __DOXYGEN__ -#define DHCP_DOES_ARP_CHECK ((LWIP_DHCP) && (LWIP_ARP)) -#endif - -/** - * LWIP_DHCP_CHECK_LINK_UP==1: dhcp_start() only really starts if the netif has - * NETIF_FLAG_LINK_UP set in its flags. As this is only an optimization and - * netif drivers might not set this flag, the default is off. If enabled, - * netif_set_link_up() must be called to continue dhcp starting. - */ -#if !defined LWIP_DHCP_CHECK_LINK_UP -#define LWIP_DHCP_CHECK_LINK_UP 0 +#define DHCP_DOES_ARP_CHECK (LWIP_DHCP && LWIP_ARP) #endif /** @@ -885,7 +955,7 @@ /** * LWIP_DHCP_MAX_DNS_SERVERS > 0: Request DNS servers with discover/select. - * DHCP servers received in the response are passed to DNS via @ref dns_setserver() + * DNS servers received in the response are passed to DNS via @ref dns_setserver() * (up to the maximum limit defined here). */ #if !defined LWIP_DHCP_MAX_DNS_SERVERS || defined __DOXYGEN__ @@ -963,7 +1033,29 @@ /* ---------------------------------- - ----- Multicast/IGMP options ----- + -------- Multicast options ------- + ---------------------------------- +*/ +/** + * @defgroup lwip_opts_multicast Multicast + * @ingroup lwip_opts_infrastructure + * @{ + */ +/** + * LWIP_MULTICAST_TX_OPTIONS==1: Enable multicast TX support like the socket options + * IP_MULTICAST_TTL/IP_MULTICAST_IF/IP_MULTICAST_LOOP, as well as (currently only) + * core support for the corresponding IPv6 options. + */ +#if !defined LWIP_MULTICAST_TX_OPTIONS || defined __DOXYGEN__ +#define LWIP_MULTICAST_TX_OPTIONS ((LWIP_IGMP || LWIP_IPV6_MLD) && (LWIP_UDP || LWIP_RAW)) +#endif +/** + * @} + */ + +/* + ---------------------------------- + ---------- IGMP options ---------- ---------------------------------- */ /** @@ -981,14 +1073,6 @@ #undef LWIP_IGMP #define LWIP_IGMP 0 #endif - -/** - * LWIP_MULTICAST_TX_OPTIONS==1: Enable multicast TX support like the socket options - * IP_MULTICAST_TTL/IP_MULTICAST_IF/IP_MULTICAST_LOOP - */ -#if !defined LWIP_MULTICAST_TX_OPTIONS || defined __DOXYGEN__ -#define LWIP_MULTICAST_TX_OPTIONS (LWIP_IGMP && LWIP_UDP) -#endif /** * @} */ @@ -1029,6 +1113,11 @@ #define DNS_MAX_SERVERS 2 #endif +/** DNS maximum number of retries when asking for a name, before "timeout". */ +#if !defined DNS_MAX_RETRIES || defined __DOXYGEN__ +#define DNS_MAX_RETRIES 4 +#endif + /** DNS do a name checking between the query and the response. */ #if !defined DNS_DOES_NAME_CHECK || defined __DOXYGEN__ #define DNS_DOES_NAME_CHECK 1 @@ -1068,7 +1157,7 @@ /** Set this to 1 to enable querying ".local" names via mDNS * using a One-Shot Multicast DNS Query */ #if !defined LWIP_DNS_SUPPORT_MDNS_QUERIES || defined __DOXYGEN__ -#define LWIP_DNS_SUPPORT_MDNS_QUERIES 0 +#define LWIP_DNS_SUPPORT_MDNS_QUERIES 0 #endif /** * @} @@ -1102,7 +1191,7 @@ * UDP_TTL: Default Time-To-Live value. */ #if !defined UDP_TTL || defined __DOXYGEN__ -#define UDP_TTL (IP_DEFAULT_TTL) +#define UDP_TTL IP_DEFAULT_TTL #endif /** @@ -1136,7 +1225,7 @@ * TCP_TTL: Default Time-To-Live value. */ #if !defined TCP_TTL || defined __DOXYGEN__ -#define TCP_TTL (IP_DEFAULT_TTL) +#define TCP_TTL IP_DEFAULT_TTL #endif /** @@ -1169,7 +1258,28 @@ * Define to 0 if your device is low on memory. */ #if !defined TCP_QUEUE_OOSEQ || defined __DOXYGEN__ -#define TCP_QUEUE_OOSEQ (LWIP_TCP) +#define TCP_QUEUE_OOSEQ LWIP_TCP +#endif + +/** + * LWIP_TCP_SACK_OUT==1: TCP will support sending selective acknowledgements (SACKs). + */ +#if !defined LWIP_TCP_SACK_OUT || defined __DOXYGEN__ +#define LWIP_TCP_SACK_OUT 0 +#endif + +/** + * LWIP_TCP_MAX_SACK_NUM: The maximum number of SACK values to include in TCP segments. + * Must be at least 1, but is only used if LWIP_TCP_SACK_OUT is enabled. + * NOTE: Even though we never send more than 3 or 4 SACK ranges in a single segment + * (depending on other options), setting this option to values greater than 4 is not pointless. + * This is basically the max number of SACK ranges we want to keep track of. + * As new data is delivered, some of the SACK ranges may be removed or merged. + * In that case some of those older SACK ranges may be used again. + * The amount of memory used to store SACK ranges is LWIP_TCP_MAX_SACK_NUM * 8 bytes for each TCP PCB. + */ +#if !defined LWIP_TCP_MAX_SACK_NUM || defined __DOXYGEN__ +#define LWIP_TCP_MAX_SACK_NUM 4 #endif /** @@ -1231,21 +1341,51 @@ #endif /** - * TCP_OOSEQ_MAX_BYTES: The maximum number of bytes queued on ooseq per pcb. - * Default is 0 (no limit). Only valid for TCP_QUEUE_OOSEQ==1. + * TCP_OOSEQ_MAX_BYTES: The default maximum number of bytes queued on ooseq per + * pcb if TCP_OOSEQ_BYTES_LIMIT is not defined. Default is 0 (no limit). + * Only valid for TCP_QUEUE_OOSEQ==1. */ #if !defined TCP_OOSEQ_MAX_BYTES || defined __DOXYGEN__ #define TCP_OOSEQ_MAX_BYTES 0 #endif /** - * TCP_OOSEQ_MAX_PBUFS: The maximum number of pbufs queued on ooseq per pcb. - * Default is 0 (no limit). Only valid for TCP_QUEUE_OOSEQ==1. + * TCP_OOSEQ_BYTES_LIMIT(pcb): Return the maximum number of bytes to be queued + * on ooseq per pcb, given the pcb. Only valid for TCP_QUEUE_OOSEQ==1 && + * TCP_OOSEQ_MAX_BYTES==1. + * Use this to override TCP_OOSEQ_MAX_BYTES to a dynamic value per pcb. + */ +#if !defined TCP_OOSEQ_BYTES_LIMIT +#if TCP_OOSEQ_MAX_BYTES +#define TCP_OOSEQ_BYTES_LIMIT(pcb) TCP_OOSEQ_MAX_BYTES +#elif defined __DOXYGEN__ +#define TCP_OOSEQ_BYTES_LIMIT(pcb) +#endif +#endif + +/** + * TCP_OOSEQ_MAX_PBUFS: The default maximum number of pbufs queued on ooseq per + * pcb if TCP_OOSEQ_BYTES_LIMIT is not defined. Default is 0 (no limit). + * Only valid for TCP_QUEUE_OOSEQ==1. */ #if !defined TCP_OOSEQ_MAX_PBUFS || defined __DOXYGEN__ #define TCP_OOSEQ_MAX_PBUFS 0 #endif +/** + * TCP_OOSEQ_PBUFS_LIMIT(pcb): Return the maximum number of pbufs to be queued + * on ooseq per pcb, given the pcb. Only valid for TCP_QUEUE_OOSEQ==1 && + * TCP_OOSEQ_MAX_PBUFS==1. + * Use this to override TCP_OOSEQ_MAX_PBUFS to a dynamic value per pcb. + */ +#if !defined TCP_OOSEQ_PBUFS_LIMIT +#if TCP_OOSEQ_MAX_PBUFS +#define TCP_OOSEQ_PBUFS_LIMIT(pcb) TCP_OOSEQ_MAX_PBUFS +#elif defined __DOXYGEN__ +#define TCP_OOSEQ_PBUFS_LIMIT(pcb) +#endif +#endif + /** * TCP_LISTEN_BACKLOG: Enable the backlog option for tcp listen pcb. */ @@ -1295,7 +1435,7 @@ * explicit window update */ #if !defined TCP_WND_UPDATE_THRESHOLD || defined __DOXYGEN__ -#define TCP_WND_UPDATE_THRESHOLD LWIP_MIN((TCP_WND / 4), (TCP_MSS * 4)) +#define TCP_WND_UPDATE_THRESHOLD LWIP_MIN((TCP_WND / 4), (TCP_MSS * 4)) #endif /** @@ -1329,6 +1469,41 @@ #define LWIP_WND_SCALE 0 #define TCP_RCV_SCALE 0 #endif + +/** + * LWIP_TCP_PCB_NUM_EXT_ARGS: + * When this is > 0, every tcp pcb (including listen pcb) includes a number of + * additional argument entries in an array (see tcp_ext_arg_alloc_id) + */ +#if !defined LWIP_TCP_PCB_NUM_EXT_ARGS || defined __DOXYGEN__ +#define LWIP_TCP_PCB_NUM_EXT_ARGS 0 +#endif + +/** LWIP_ALTCP==1: enable the altcp API. + * altcp is an abstraction layer that prevents applications linking against the + * tcp.h functions but provides the same functionality. It is used to e.g. add + * SSL/TLS or proxy-connect support to an application written for the tcp callback + * API without that application knowing the protocol details. + * + * With LWIP_ALTCP==0, applications written against the altcp API can still be + * compiled but are directly linked against the tcp.h callback API and then + * cannot use layered protocols. + * + * See @ref altcp_api + */ +#if !defined LWIP_ALTCP || defined __DOXYGEN__ +#define LWIP_ALTCP 0 +#endif + +/** LWIP_ALTCP_TLS==1: enable TLS support for altcp API. + * This needs a port of the functions in altcp_tls.h to a TLS library. + * A port to ARM mbedtls is provided with lwIP, see apps/altcp_tls/ directory + * and LWIP_ALTCP_TLS_MBEDTLS option. + */ +#if !defined LWIP_ALTCP_TLS || defined __DOXYGEN__ +#define LWIP_ALTCP_TLS 0 +#endif + /** * @} */ @@ -1361,7 +1536,7 @@ * for an additional encapsulation header before ethernet headers (e.g. 802.11) */ #if !defined PBUF_LINK_ENCAPSULATION_HLEN || defined __DOXYGEN__ -#define PBUF_LINK_ENCAPSULATION_HLEN 0u +#define PBUF_LINK_ENCAPSULATION_HLEN 0 #endif /** @@ -1372,6 +1547,14 @@ #if !defined PBUF_POOL_BUFSIZE || defined __DOXYGEN__ #define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN) #endif + +/** + * LWIP_PBUF_REF_T: Refcount type in pbuf. + * Default width of u8_t can be increased if 255 refs are not enough for you. + */ +#if !defined LWIP_PBUF_REF_T || defined __DOXYGEN__ +#define LWIP_PBUF_REF_T u8_t +#endif /** * @} */ @@ -1386,6 +1569,14 @@ * @ingroup lwip_opts * @{ */ +/** + * LWIP_SINGLE_NETIF==1: use a single netif only. This is the common case for + * small real-life targets. Some code like routing etc. can be left out. + */ +#if !defined LWIP_SINGLE_NETIF || defined __DOXYGEN__ +#define LWIP_SINGLE_NETIF 0 +#endif + /** * LWIP_NETIF_HOSTNAME==1: use DHCP_OPTION_HOSTNAME with netif's hostname * field. @@ -1409,6 +1600,15 @@ #define LWIP_NETIF_STATUS_CALLBACK 0 #endif +/** + * LWIP_NETIF_EXT_STATUS_CALLBACK==1: Support an extended callback function + * for several netif related event that supports multiple subscribers. + * @see netif_ext_status_callback + */ +#if !defined LWIP_NETIF_EXT_STATUS_CALLBACK || defined __DOXYGEN__ +#define LWIP_NETIF_EXT_STATUS_CALLBACK 0 +#endif + /** * LWIP_NETIF_LINK_CALLBACK==1: Support a callback function from an interface * whenever the link changes (i.e., link down) @@ -1437,24 +1637,33 @@ #endif /** - * LWIP_NETIF_TX_SINGLE_PBUF: if this is set to 1, lwIP tries to put all data + * LWIP_NETIF_TX_SINGLE_PBUF: if this is set to 1, lwIP *tries* to put all data * to be sent into one single pbuf. This is for compatibility with DMA-enabled * MACs that do not support scatter-gather. * Beware that this might involve CPU-memcpy before transmitting that would not * be needed without this flag! Use this only if you need to! * - * @todo: TCP and IP-frag do not work with this, yet: + * ATTENTION: a driver should *NOT* rely on getting single pbufs but check TX + * pbufs for being in one piece. If not, @ref pbuf_clone can be used to get + * a single pbuf: + * if (p->next != NULL) { + * struct pbuf *q = pbuf_clone(PBUF_RAW, PBUF_RAM, p); + * if (q == NULL) { + * return ERR_MEM; + * } + * p = q; ATTENTION: do NOT free the old 'p' as the ref belongs to the caller! + * } */ #if !defined LWIP_NETIF_TX_SINGLE_PBUF || defined __DOXYGEN__ -#define LWIP_NETIF_TX_SINGLE_PBUF 0 +#define LWIP_NETIF_TX_SINGLE_PBUF 0 #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ /** * LWIP_NUM_NETIF_CLIENT_DATA: Number of clients that may store - * data in client_data member array of struct netif. + * data in client_data member array of struct netif (max. 256). */ #if !defined LWIP_NUM_NETIF_CLIENT_DATA || defined __DOXYGEN__ -#define LWIP_NUM_NETIF_CLIENT_DATA 0 +#define LWIP_NUM_NETIF_CLIENT_DATA 0 #endif /** * @} @@ -1476,14 +1685,14 @@ * netif is available, loopback traffic uses this netif. */ #if !defined LWIP_HAVE_LOOPIF || defined __DOXYGEN__ -#define LWIP_HAVE_LOOPIF LWIP_NETIF_LOOPBACK +#define LWIP_HAVE_LOOPIF (LWIP_NETIF_LOOPBACK && !LWIP_SINGLE_NETIF) #endif /** * LWIP_LOOPIF_MULTICAST==1: Support multicast/IGMP on loop interface (127.0.0.1). */ #if !defined LWIP_LOOPIF_MULTICAST || defined __DOXYGEN__ -#define LWIP_LOOPIF_MULTICAST 0 +#define LWIP_LOOPIF_MULTICAST 0 #endif /** @@ -1536,7 +1745,7 @@ * TCPIP_THREAD_NAME: The name assigned to the main tcpip thread. */ #if !defined TCPIP_THREAD_NAME || defined __DOXYGEN__ -#define TCPIP_THREAD_NAME "tcpip_thread" +#define TCPIP_THREAD_NAME "tcpip_thread" #endif /** @@ -1578,7 +1787,7 @@ * SLIPIF_THREAD_NAME: The name assigned to the slipif_loop thread. */ #if !defined SLIPIF_THREAD_NAME || defined __DOXYGEN__ -#define SLIPIF_THREAD_NAME "slipif_loop" +#define SLIPIF_THREAD_NAME "slipif_loop" #endif /** @@ -1603,7 +1812,7 @@ * DEFAULT_THREAD_NAME: The name assigned to any other lwIP thread. */ #if !defined DEFAULT_THREAD_NAME || defined __DOXYGEN__ -#define DEFAULT_THREAD_NAME "lwIP" +#define DEFAULT_THREAD_NAME "lwIP" #endif /** @@ -1733,13 +1942,6 @@ #define LWIP_SOCKET 1 #endif -/* LWIP_SOCKET_SET_ERRNO==1: Set errno when socket functions cannot complete - * successfully, as required by POSIX. Default is POSIX-compliant. - */ -#if !defined LWIP_SOCKET_SET_ERRNO || defined __DOXYGEN__ -#define LWIP_SOCKET_SET_ERRNO 1 -#endif - /** * LWIP_COMPAT_SOCKETS==1: Enable BSD-style sockets functions names through defines. * LWIP_COMPAT_SOCKETS==2: Same as ==1 but correctly named functions are created. @@ -1858,6 +2060,24 @@ #if !defined LWIP_FIONREAD_LINUXMODE || defined __DOXYGEN__ #define LWIP_FIONREAD_LINUXMODE 0 #endif + +/** + * LWIP_SOCKET_SELECT==1 (default): enable select() for sockets (uses a netconn + * callback to keep track of events). + * This saves RAM (counters per socket) and code (netconn event callback), which + * should improve performance a bit). + */ +#if !defined LWIP_SOCKET_SELECT || defined __DOXYGEN__ +#define LWIP_SOCKET_SELECT 1 +#endif + +/** + * LWIP_SOCKET_POLL==1 (default): enable poll() for sockets (including + * struct pollfd, nfds_t, and constants) + */ +#if !defined LWIP_SOCKET_POLL || defined __DOXYGEN__ +#define LWIP_SOCKET_POLL 1 +#endif /** * @} */ @@ -2153,6 +2373,46 @@ #define LWIP_IPV6 0 #endif +/** + * IPV6_REASS_MAXAGE: Maximum time (in multiples of IP6_REASS_TMR_INTERVAL - so seconds, normally) + * a fragmented IP packet waits for all fragments to arrive. If not all fragments arrived + * in this time, the whole packet is discarded. + */ +#if !defined IPV6_REASS_MAXAGE || defined __DOXYGEN__ +#define IPV6_REASS_MAXAGE 60 +#endif + +/** + * LWIP_IPV6_SCOPES==1: Enable support for IPv6 address scopes, ensuring that + * e.g. link-local addresses are really treated as link-local. Disable this + * setting only for single-interface configurations. + * All addresses that have a scope according to the default policy (link-local + * unicast addresses, interface-local and link-local multicast addresses) should + * now have a zone set on them before being passed to the core API, although + * lwIP will currently attempt to select a zone on the caller's behalf when + * necessary. Applications that directly assign IPv6 addresses to interfaces + * (which is NOT recommended) must now ensure that link-local addresses carry + * the netif's zone. See the new ip6_zone.h header file for more information and + * relevant macros. For now it is still possible to turn off scopes support + * through the new LWIP_IPV6_SCOPES option. When upgrading an implementation that + * uses the core API directly, it is highly recommended to enable + * LWIP_IPV6_SCOPES_DEBUG at least for a while, to ensure e.g. proper address + * initialization. + */ +#if !defined LWIP_IPV6_SCOPES || defined __DOXYGEN__ +#define LWIP_IPV6_SCOPES (LWIP_IPV6 && !LWIP_SINGLE_NETIF) +#endif + +/** + * LWIP_IPV6_SCOPES_DEBUG==1: Perform run-time checks to verify that addresses + * are properly zoned (see ip6_zone.h on what that means) where it matters. + * Enabling this setting is highly recommended when upgrading from an existing + * installation that is not yet scope-aware; otherwise it may be too expensive. + */ +#if !defined LWIP_IPV6_SCOPES_DEBUG || defined __DOXYGEN__ +#define LWIP_IPV6_SCOPES_DEBUG 0 +#endif + /** * LWIP_IPV6_NUM_ADDRESSES: Number of IPv6 addresses per netif. */ @@ -2171,14 +2431,14 @@ * LWIP_IPV6_FRAG==1: Fragment outgoing IPv6 packets that are too big. */ #if !defined LWIP_IPV6_FRAG || defined __DOXYGEN__ -#define LWIP_IPV6_FRAG 0 +#define LWIP_IPV6_FRAG 1 #endif /** * LWIP_IPV6_REASS==1: reassemble incoming IPv6 packets that fragmented */ #if !defined LWIP_IPV6_REASS || defined __DOXYGEN__ -#define LWIP_IPV6_REASS (LWIP_IPV6) +#define LWIP_IPV6_REASS LWIP_IPV6 #endif /** @@ -2193,7 +2453,18 @@ * LWIP_IPV6_AUTOCONFIG==1: Enable stateless address autoconfiguration as per RFC 4862. */ #if !defined LWIP_IPV6_AUTOCONFIG || defined __DOXYGEN__ -#define LWIP_IPV6_AUTOCONFIG (LWIP_IPV6) +#define LWIP_IPV6_AUTOCONFIG LWIP_IPV6 +#endif + +/** + * LWIP_IPV6_ADDRESS_LIFETIMES==1: Keep valid and preferred lifetimes for each + * IPv6 address. Required for LWIP_IPV6_AUTOCONFIG. May still be enabled + * otherwise, in which case the application may assign address lifetimes with + * the appropriate macros. Addresses with no lifetime are assumed to be static. + * If this option is disabled, all addresses are assumed to be static. + */ +#if !defined LWIP_IPV6_ADDRESS_LIFETIMES || defined __DOXYGEN__ +#define LWIP_IPV6_ADDRESS_LIFETIMES LWIP_IPV6_AUTOCONFIG #endif /** @@ -2215,7 +2486,7 @@ * LWIP_ICMP6==1: Enable ICMPv6 (mandatory per RFC) */ #if !defined LWIP_ICMP6 || defined __DOXYGEN__ -#define LWIP_ICMP6 (LWIP_IPV6) +#define LWIP_ICMP6 LWIP_IPV6 #endif /** @@ -2247,7 +2518,7 @@ * indiscriminately pass all inbound IPv6 multicast traffic to lwIP. */ #if !defined LWIP_IPV6_MLD || defined __DOXYGEN__ -#define LWIP_IPV6_MLD (LWIP_IPV6) +#define LWIP_IPV6_MLD LWIP_IPV6 #endif /** @@ -2273,7 +2544,7 @@ * is being resolved. */ #if !defined LWIP_ND6_QUEUEING || defined __DOXYGEN__ -#define LWIP_ND6_QUEUEING (LWIP_IPV6) +#define LWIP_ND6_QUEUEING LWIP_IPV6 #endif /** @@ -2394,12 +2665,60 @@ */ /** - * LWIP_IPV6_DHCP6==1: enable DHCPv6 stateful address autoconfiguration. + * @defgroup lwip_opts_dhcpv6 DHCPv6 + * @ingroup lwip_opts_ipv6 + * @{ + */ +/** + * LWIP_IPV6_DHCP6==1: enable DHCPv6 stateful/stateless address autoconfiguration. */ #if !defined LWIP_IPV6_DHCP6 || defined __DOXYGEN__ #define LWIP_IPV6_DHCP6 0 #endif +/** + * LWIP_IPV6_DHCP6_STATEFUL==1: enable DHCPv6 stateful address autoconfiguration. + * (not supported, yet!) + */ +#if !defined LWIP_IPV6_DHCP6_STATEFUL || defined __DOXYGEN__ +#define LWIP_IPV6_DHCP6_STATEFUL 0 +#endif + +/** + * LWIP_IPV6_DHCP6_STATELESS==1: enable DHCPv6 stateless address autoconfiguration. + */ +#if !defined LWIP_IPV6_DHCP6_STATELESS || defined __DOXYGEN__ +#define LWIP_IPV6_DHCP6_STATELESS LWIP_IPV6_DHCP6 +#endif + +/** + * LWIP_DHCP6_GETS_NTP==1: Request NTP servers via DHCPv6. For each + * response packet, a callback is called, which has to be provided by the port: + * void dhcp6_set_ntp_servers(u8_t num_ntp_servers, ip_addr_t* ntp_server_addrs); +*/ +#if !defined LWIP_DHCP6_GET_NTP_SRV || defined __DOXYGEN__ +#define LWIP_DHCP6_GET_NTP_SRV 0 +#endif + +/** + * The maximum of NTP servers requested + */ +#if !defined LWIP_DHCP6_MAX_NTP_SERVERS || defined __DOXYGEN__ +#define LWIP_DHCP6_MAX_NTP_SERVERS 1 +#endif + +/** + * LWIP_DHCP6_MAX_DNS_SERVERS > 0: Request DNS servers via DHCPv6. + * DNS servers received in the response are passed to DNS via @ref dns_setserver() + * (up to the maximum limit defined here). + */ +#if !defined LWIP_DHCP6_MAX_DNS_SERVERS || defined __DOXYGEN__ +#define LWIP_DHCP6_MAX_DNS_SERVERS DNS_MAX_SERVERS +#endif +/** + * @} + */ + /* --------------------------------------- ---------- Hook options --------------- @@ -2414,8 +2733,8 @@ */ /** - * LWIP_HOOK_FILENAME: Custom filename to #include in files that provide hooks. - * Declare your hook function prototypes in there, you may also #include all headers + * LWIP_HOOK_FILENAME: Custom filename to \#include in files that provide hooks. + * Declare your hook function prototypes in there, you may also \#include all headers * providing data types that are need in this file. */ #ifdef __DOXYGEN__ @@ -2431,7 +2750,9 @@ * or any other desired algorithm as a replacement. * Called from tcp_connect() and tcp_listen_input() when an ISN is needed for * a new TCP connection, if TCP support (@ref LWIP_TCP) is enabled.\n - * Signature: u32_t my_hook_tcp_isn(const ip_addr_t* local_ip, u16_t local_port, const ip_addr_t* remote_ip, u16_t remote_port); + * Signature:\code{.c} + * u32_t my_hook_tcp_isn(const ip_addr_t* local_ip, u16_t local_port, const ip_addr_t* remote_ip, u16_t remote_port); + * \endcode * - it may be necessary to use "struct ip_addr" (ip4_addr, ip6_addr) instead of "ip_addr_t" in function declarations\n * Arguments: * - local_ip: pointer to the local IP address of the connection @@ -2445,9 +2766,89 @@ #define LWIP_HOOK_TCP_ISN(local_ip, local_port, remote_ip, remote_port) #endif +/** + * LWIP_HOOK_TCP_INPACKET_PCB: + * Hook for intercepting incoming packets before they are passed to a pcb. This + * allows updating some state or even dropping a packet. + * Signature:\code{.c} + * err_t my_hook_tcp_inpkt(struct tcp_pcb *pcb, struct tcp_hdr *hdr, u16_t optlen, u16_t opt1len, u8_t *opt2, struct pbuf *p); + * \endcode + * Arguments: + * - pcb: tcp_pcb selected for input of this packet (ATTENTION: this may be + * struct tcp_pcb_listen if pcb->state == LISTEN) + * - hdr: pointer to tcp header (ATTENTION: tcp options may not be in one piece!) + * - optlen: tcp option length + * - opt1len: tcp option length 1st part + * - opt2: if this is != NULL, tcp options are split among 2 pbufs. In that case, + * options start at right after the tcp header ('(u8_t*)(hdr + 1)') for + * the first 'opt1len' bytes and the rest starts at 'opt2'. opt2len can + * be simply calculated: 'opt2len = optlen - opt1len;' + * - p: input packet, p->payload points to application data (that's why tcp hdr + * and options are passed in seperately) + * Return value: + * - ERR_OK: continue input of this packet as normal + * - != ERR_OK: drop this packet for input (don't continue input processing) + * + * ATTENTION: don't call any tcp api functions that might change tcp state (pcb + * state or any pcb lists) from this callback! + */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_TCP_INPACKET_PCB(pcb, hdr, optlen, opt1len, opt2, p) +#endif + +/** + * LWIP_HOOK_TCP_OUT_TCPOPT_LENGTH: + * Hook for increasing the size of the options allocated with a tcp header. + * Together with LWIP_HOOK_TCP_OUT_ADD_TCPOPTS, this can be used to add custom + * options to outgoing tcp segments. + * Signature:\code{.c} + * u8_t my_hook_tcp_out_tcpopt_length(const struct tcp_pcb *pcb, u8_t internal_option_length); + * \endcode + * Arguments: + * - pcb: tcp_pcb that transmits (ATTENTION: this may be NULL or + * struct tcp_pcb_listen if pcb->state == LISTEN) + * - internal_option_length: tcp option length used by the stack internally + * Return value: + * - a number of bytes to allocate for tcp options (internal_option_length <= ret <= 40) + * + * ATTENTION: don't call any tcp api functions that might change tcp state (pcb + * state or any pcb lists) from this callback! + */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_TCP_OUT_TCPOPT_LENGTH(pcb, internal_len) +#endif + +/** + * LWIP_HOOK_TCP_OUT_ADD_TCPOPTS: + * Hook for adding custom options to outgoing tcp segments. + * Space for these custom options has to be reserved via LWIP_HOOK_TCP_OUT_TCPOPT_LENGTH. + * Signature:\code{.c} + * u32_t *my_hook_tcp_out_add_tcpopts(struct pbuf *p, struct tcp_hdr *hdr, const struct tcp_pcb *pcb, u32_t *opts); + * \endcode + * Arguments: + * - p: output packet, p->payload pointing to tcp header, data follows + * - hdr: tcp header + * - pcb: tcp_pcb that transmits (ATTENTION: this may be NULL or + * struct tcp_pcb_listen if pcb->state == LISTEN) + * - opts: pointer where to add the custom options (there may already be options + * between the header and these) + * Return value: + * - pointer pointing directly after the inserted options + * + * ATTENTION: don't call any tcp api functions that might change tcp state (pcb + * state or any pcb lists) from this callback! + */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_TCP_OUT_ADD_TCPOPTS(p, hdr, pcb, opts) +#endif + /** * LWIP_HOOK_IP4_INPUT(pbuf, input_netif): - * - called from ip_input() (IPv4) + * Called from ip_input() (IPv4) + * Signature:\code{.c} + * int my_hook(struct pbuf *pbuf, struct netif *input_netif); + * \endcode + * Arguments: * - pbuf: received struct pbuf passed to ip_input() * - input_netif: struct netif on which the packet has been received * Return values: @@ -2462,30 +2863,71 @@ /** * LWIP_HOOK_IP4_ROUTE(dest): - * - called from ip_route() (IPv4) + * Called from ip_route() (IPv4) + * Signature:\code{.c} + * struct netif *my_hook(const ip4_addr_t *dest); + * \endcode + * Arguments: * - dest: destination IPv4 address - * Returns the destination netif or NULL if no destination netif is found. In - * that case, ip_route() continues as normal. + * Returns values: + * - the destination netif + * - NULL if no destination netif is found. In that case, ip_route() continues as normal. */ #ifdef __DOXYGEN__ #define LWIP_HOOK_IP4_ROUTE() #endif /** - * LWIP_HOOK_IP4_ROUTE_SRC(dest, src): - * - source-based routing for IPv4 (see LWIP_HOOK_IP4_ROUTE(), src may be NULL) + * LWIP_HOOK_IP4_ROUTE_SRC(src, dest): + * Source-based routing for IPv4 - called from ip_route() (IPv4) + * Signature:\code{.c} + * struct netif *my_hook(const ip4_addr_t *src, const ip4_addr_t *dest); + * \endcode + * Arguments: + * - src: local/source IPv4 address + * - dest: destination IPv4 address + * Returns values: + * - the destination netif + * - NULL if no destination netif is found. In that case, ip_route() continues as normal. */ #ifdef __DOXYGEN__ -#define LWIP_HOOK_IP4_ROUTE_SRC(dest, src) +#define LWIP_HOOK_IP4_ROUTE_SRC(src, dest) +#endif + +/** + * LWIP_HOOK_IP4_CANFORWARD(src, dest): + * Check if an IPv4 can be forwarded - called from: + * ip4_input() -> ip4_forward() -> ip4_canforward() (IPv4) + * - source address is available via ip4_current_src_addr() + * - calling an output function in this context (e.g. multicast router) is allowed + * Signature:\code{.c} + * int my_hook(struct pbuf *p, u32_t dest_addr_hostorder); + * \endcode + * Arguments: + * - p: packet to forward + * - dest: destination IPv4 address + * Returns values: + * - 1: forward + * - 0: don't forward + * - -1: no decision. In that case, ip4_canforward() continues as normal. + */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_IP4_CANFORWARD(src, dest) #endif /** * LWIP_HOOK_ETHARP_GET_GW(netif, dest): - * - called from etharp_output() (IPv4) + * Called from etharp_output() (IPv4) + * Signature:\code{.c} + * const ip4_addr_t *my_hook(struct netif *netif, const ip4_addr_t *dest); + * \endcode + * Arguments: * - netif: the netif used for sending * - dest: the destination IPv4 address - * Returns the IPv4 address of the gateway to handle the specified destination - * IPv4 address. If NULL is returned, the netif's default gateway is used. + * Return values: + * - the IPv4 address of the gateway to handle the specified destination IPv4 address + * - NULL, in which case the netif's default gateway is used + * * The returned address MUST be directly reachable on the specified netif! * This function is meant to implement advanced IPv4 routing together with * LWIP_HOOK_IP4_ROUTE(). The actual routing/gateway table implementation is @@ -2497,7 +2939,11 @@ /** * LWIP_HOOK_IP6_INPUT(pbuf, input_netif): - * - called from ip6_input() (IPv6) + * Called from ip6_input() (IPv6) + * Signature:\code{.c} + * int my_hook(struct pbuf *pbuf, struct netif *input_netif); + * \endcode + * Arguments: * - pbuf: received struct pbuf passed to ip6_input() * - input_netif: struct netif on which the packet has been received * Return values: @@ -2512,11 +2958,16 @@ /** * LWIP_HOOK_IP6_ROUTE(src, dest): - * - called from ip6_route() (IPv6) - * - src: sourc IPv6 address + * Called from ip_route() (IPv6) + * Signature:\code{.c} + * struct netif *my_hook(const ip6_addr_t *dest, const ip6_addr_t *src); + * \endcode + * Arguments: + * - src: source IPv6 address * - dest: destination IPv6 address - * Returns the destination netif or NULL if no destination netif is found. In - * that case, ip6_route() continues as normal. + * Return values: + * - the destination netif + * - NULL if no destination netif is found. In that case, ip6_route() continues as normal. */ #ifdef __DOXYGEN__ #define LWIP_HOOK_IP6_ROUTE(src, dest) @@ -2524,11 +2975,17 @@ /** * LWIP_HOOK_ND6_GET_GW(netif, dest): - * - called from nd6_get_next_hop_entry() (IPv6) + * Called from nd6_get_next_hop_entry() (IPv6) + * Signature:\code{.c} + * const ip6_addr_t *my_hook(struct netif *netif, const ip6_addr_t *dest); + * \endcode + * Arguments: * - netif: the netif used for sending * - dest: the destination IPv6 address - * Returns the IPv6 address of the next hop to handle the specified destination - * IPv6 address. If NULL is returned, a NDP-discovered router is used instead. + * Return values: + * - the IPv6 address of the next hop to handle the specified destination IPv6 address + * - NULL, in which case a NDP-discovered router is used instead + * * The returned address MUST be directly reachable on the specified netif! * This function is meant to implement advanced IPv6 routing together with * LWIP_HOOK_IP6_ROUTE(). The actual routing/gateway table implementation is @@ -2540,7 +2997,11 @@ /** * LWIP_HOOK_VLAN_CHECK(netif, eth_hdr, vlan_hdr): - * - called from ethernet_input() if VLAN support is enabled + * Called from ethernet_input() if VLAN support is enabled + * Signature:\code{.c} + * int my_hook(struct netif *netif, struct eth_hdr *eth_hdr, struct eth_vlan_hdr *vlan_hdr); + * \endcode + * Arguments: * - netif: struct netif on which the packet has been received * - eth_hdr: struct eth_hdr of the packet * - vlan_hdr: struct eth_vlan_hdr of the packet @@ -2557,7 +3018,9 @@ * Hook can be used to set prio_vid field of vlan_hdr. If you need to store data * on per-netif basis to implement this callback, see @ref netif_cd. * Called from ethernet_output() if VLAN support (@ref ETHARP_SUPPORT_VLAN) is enabled.\n - * Signature: s32_t my_hook_vlan_set(struct netif* netif, struct pbuf* pbuf, const struct eth_addr* src, const struct eth_addr* dst, u16_t eth_type);\n + * Signature:\code{.c} + * s32_t my_hook_vlan_set(struct netif* netif, struct pbuf* pbuf, const struct eth_addr* src, const struct eth_addr* dst, u16_t eth_type);\n + * \endcode * Arguments: * - netif: struct netif that the packet will be sent through * - p: struct pbuf packet to be sent @@ -2576,7 +3039,10 @@ /** * LWIP_HOOK_MEMP_AVAILABLE(memp_t_type): - * - called from memp_free() when a memp pool was empty and an item is now available + * Called from memp_free() when a memp pool was empty and an item is now available + * Signature:\code{.c} + * void my_hook(memp_t type); + * \endcode */ #ifdef __DOXYGEN__ #define LWIP_HOOK_MEMP_AVAILABLE(memp_t_type) @@ -2585,12 +3051,175 @@ /** * LWIP_HOOK_UNKNOWN_ETH_PROTOCOL(pbuf, netif): * Called from ethernet_input() when an unknown eth type is encountered. - * Return ERR_OK if packet is accepted, any error code otherwise. + * Signature:\code{.c} + * err_t my_hook(struct pbuf* pbuf, struct netif* netif); + * \endcode + * Arguments: + * - p: rx packet with unknown eth type + * - netif: netif on which the packet has been received + * Return values: + * - ERR_OK if packet is accepted (hook function now owns the pbuf) + * - any error code otherwise (pbuf is freed) + * * Payload points to ethernet header! */ #ifdef __DOXYGEN__ #define LWIP_HOOK_UNKNOWN_ETH_PROTOCOL(pbuf, netif) #endif + +/** + * LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, state, msg, msg_type, options_len_ptr): + * Called from various dhcp functions when sending a DHCP message. + * This hook is called just before the DHCP message trailer is added, so the + * options are at the end of a DHCP message. + * Signature:\code{.c} + * void my_hook(struct netif *netif, struct dhcp *dhcp, u8_t state, struct dhcp_msg *msg, + * u8_t msg_type, u16_t *options_len_ptr); + * \endcode + * Arguments: + * - netif: struct netif that the packet will be sent through + * - dhcp: struct dhcp on that netif + * - state: current dhcp state (dhcp_state_enum_t as an u8_t) + * - msg: struct dhcp_msg that will be sent + * - msg_type: dhcp message type to be sent (u8_t) + * - options_len_ptr: pointer to the current length of options in the dhcp_msg "msg" + * (must be increased when options are added!) + * + * Options need to appended like this: + * LWIP_ASSERT("dhcp option overflow", *options_len_ptr + option_len + 2 <= DHCP_OPTIONS_LEN); + * msg->options[(*options_len_ptr)++] = <option_number>; + * msg->options[(*options_len_ptr)++] = <option_len>; + * msg->options[(*options_len_ptr)++] = <option_bytes>; + * [...] + */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, state, msg, msg_type, options_len_ptr) +#endif + +/** + * LWIP_HOOK_DHCP_PARSE_OPTION(netif, dhcp, state, msg, msg_type, option, len, pbuf, option_value_offset): + * Called from dhcp_parse_reply when receiving a DHCP message. + * This hook is called for every option in the received message that is not handled internally. + * Signature:\code{.c} + * void my_hook(struct netif *netif, struct dhcp *dhcp, u8_t state, struct dhcp_msg *msg, + * u8_t msg_type, u8_t option, u8_t option_len, struct pbuf *pbuf, u16_t option_value_offset); + * \endcode + * Arguments: + * - netif: struct netif that the packet will be sent through + * - dhcp: struct dhcp on that netif + * - state: current dhcp state (dhcp_state_enum_t as an u8_t) + * - msg: struct dhcp_msg that was received + * - msg_type: dhcp message type received (u8_t, ATTENTION: only valid after + * the message type option has been parsed!) + * - option: option value (u8_t) + * - len: option data length (u8_t) + * - pbuf: pbuf where option data is contained + * - option_value_offset: offset in pbuf where option data begins + * + * A nice way to get the option contents is pbuf_get_contiguous(): + * u8_t buf[32]; + * u8_t *ptr = (u8_t*)pbuf_get_contiguous(p, buf, sizeof(buf), LWIP_MIN(option_len, sizeof(buf)), offset); + */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_DHCP_PARSE_OPTION(netif, dhcp, state, msg, msg_type, option, len, pbuf, offset) +#endif + +/** + * LWIP_HOOK_DHCP6_APPEND_OPTIONS(netif, dhcp6, state, msg, msg_type, options_len_ptr, max_len): + * Called from various dhcp6 functions when sending a DHCP6 message. + * This hook is called just before the DHCP6 message is sent, so the + * options are at the end of a DHCP6 message. + * Signature:\code{.c} + * void my_hook(struct netif *netif, struct dhcp6 *dhcp, u8_t state, struct dhcp6_msg *msg, + * u8_t msg_type, u16_t *options_len_ptr); + * \endcode + * Arguments: + * - netif: struct netif that the packet will be sent through + * - dhcp6: struct dhcp6 on that netif + * - state: current dhcp6 state (dhcp6_state_enum_t as an u8_t) + * - msg: struct dhcp6_msg that will be sent + * - msg_type: dhcp6 message type to be sent (u8_t) + * - options_len_ptr: pointer to the current length of options in the dhcp6_msg "msg" + * (must be increased when options are added!) + * + * Options need to appended like this: + * u8_t *options = (u8_t *)(msg + 1); + * LWIP_ASSERT("dhcp option overflow", sizeof(struct dhcp6_msg) + *options_len_ptr + newoptlen <= max_len); + * options[(*options_len_ptr)++] = <option_data>; + * [...] + */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_DHCP6_APPEND_OPTIONS(netif, dhcp6, state, msg, msg_type, options_len_ptr, max_len) +#endif + +/** + * LWIP_HOOK_SOCKETS_SETSOCKOPT(s, sock, level, optname, optval, optlen, err) + * Called from socket API to implement setsockopt() for options not provided by lwIP. + * Core lock is held when this hook is called. + * Signature:\code{.c} + * int my_hook(int s, struct lwip_sock *sock, int level, int optname, const void *optval, socklen_t optlen, int *err) + * \endcode + * Arguments: + * - s: socket file descriptor + * - sock: internal socket descriptor (see lwip/priv/sockets_priv.h) + * - level: protocol level at which the option resides + * - optname: option to set + * - optval: value to set + * - optlen: size of optval + * - err: output error + * Return values: + * - 0: Hook has not consumed the option, code continues as normal (to internal options) + * - != 0: Hook has consumed the option, 'err' is returned + */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_SOCKETS_SETSOCKOPT(s, sock, level, optname, optval, optlen, err) +#endif + +/** + * LWIP_HOOK_SOCKETS_GETSOCKOPT(s, sock, level, optname, optval, optlen, err) + * Called from socket API to implement getsockopt() for options not provided by lwIP. + * Core lock is held when this hook is called. + * Signature:\code{.c} + * int my_hook(int s, struct lwip_sock *sock, int level, int optname, void *optval, socklen_t *optlen, int *err) + * \endcode + * Arguments: + * - s: socket file descriptor + * - sock: internal socket descriptor (see lwip/priv/sockets_priv.h) + * - level: protocol level at which the option resides + * - optname: option to get + * - optval: value to get + * - optlen: size of optval + * - err: output error + * Return values: + * - 0: Hook has not consumed the option, code continues as normal (to internal options) + * - != 0: Hook has consumed the option, 'err' is returned + */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_SOCKETS_GETSOCKOPT(s, sock, level, optname, optval, optlen, err) +#endif + +/** + * LWIP_HOOK_NETCONN_EXTERNAL_RESOLVE(name, addr, addrtype, err) + * Called from netconn APIs (not usable with callback apps) allowing an + * external DNS resolver (which uses sequential API) to handle the query. + * Signature:\code{.c} + * int my_hook(const char *name, ip_addr_t *addr, u8_t addrtype, err_t *err) + * \endcode + * Arguments: + * - name: hostname to resolve + * - addr: output host address + * - addrtype: type of address to query + * - err: output error + * Return values: + * - 0: Hook has not consumed hostname query, query continues into DNS module + * - != 0: Hook has consumed the query + * + * err must also be checked to determine if the hook consumed the query, but + * the query failed + */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_NETCONN_EXTERNAL_RESOLVE(name, addr, addrtype, err) +#endif /** * @} */ @@ -2848,10 +3477,24 @@ #if !defined IP6_DEBUG || defined __DOXYGEN__ #define IP6_DEBUG LWIP_DBG_OFF #endif + +/** + * DHCP6_DEBUG: Enable debugging in dhcp6.c. + */ +#if !defined DHCP6_DEBUG || defined __DOXYGEN__ +#define DHCP6_DEBUG LWIP_DBG_OFF +#endif /** * @} */ +/** + * LWIP_TESTMODE: Changes to make unit test possible + */ +#if !defined LWIP_TESTMODE +#define LWIP_TESTMODE 0 +#endif + /* -------------------------------------------------- ---------- Performance tracking options ---------- diff --git a/Libraries/LwIP/src/include/lwip/pbuf.h b/Libraries/LwIP/src/include/lwip/pbuf.h index a8b00a0..328c772 100755 --- a/Libraries/LwIP/src/include/lwip/pbuf.h +++ b/Libraries/LwIP/src/include/lwip/pbuf.h @@ -55,6 +55,23 @@ extern "C" { #define LWIP_SUPPORT_CUSTOM_PBUF ((IP_FRAG && !LWIP_NETIF_TX_SINGLE_PBUF) || (LWIP_IPV6 && LWIP_IPV6_FRAG)) #endif +/** @ingroup pbuf + * PBUF_NEEDS_COPY(p): return a boolean value indicating whether the given + * pbuf needs to be copied in order to be kept around beyond the current call + * stack without risking being corrupted. The default setting provides safety: + * it will make a copy iof any pbuf chain that does not consist entirely of + * PBUF_ROM type pbufs. For setups with zero-copy support, it may be redefined + * to evaluate to true in all cases, for example. However, doing so also has an + * effect on the application side: any buffers that are *not* copied must also + * *not* be reused by the application after passing them to lwIP. For example, + * when setting PBUF_NEEDS_COPY to (0), after using udp_send() with a PBUF_RAM + * pbuf, the application must free the pbuf immediately, rather than reusing it + * for other purposes. For more background information on this, see tasks #6735 + * and #7896, and bugs #11400 and #49914. */ +#ifndef PBUF_NEEDS_COPY +#define PBUF_NEEDS_COPY(p) ((p)->type_internal & PBUF_TYPE_FLAG_DATA_VOLATILE) +#endif /* PBUF_NEEDS_COPY */ + /* @todo: We need a mechanism to prevent wasting memory in every pbuf (TCP vs. UDP, IPv4 vs. IPv6: UDP/IPv4 packets may waste up to 28 bytes) */ @@ -73,27 +90,54 @@ typedef enum { /** Includes spare room for transport layer header, e.g. UDP header. * Use this if you intend to pass the pbuf to functions like udp_send(). */ - PBUF_TRANSPORT, + PBUF_TRANSPORT = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN, /** Includes spare room for IP header. * Use this if you intend to pass the pbuf to functions like raw_send(). */ - PBUF_IP, + PBUF_IP = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN, /** Includes spare room for link layer header (ethernet header). * Use this if you intend to pass the pbuf to functions like ethernet_output(). * @see PBUF_LINK_HLEN */ - PBUF_LINK, + PBUF_LINK = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN, /** Includes spare room for additional encapsulation header before ethernet * headers (e.g. 802.11). * Use this if you intend to pass the pbuf to functions like netif->linkoutput(). * @see PBUF_LINK_ENCAPSULATION_HLEN */ - PBUF_RAW_TX, + PBUF_RAW_TX = PBUF_LINK_ENCAPSULATION_HLEN, /** Use this for input packets in a netif driver when calling netif->input() * in the most common case - ethernet-layer netif driver. */ - PBUF_RAW + PBUF_RAW = 0 } pbuf_layer; + +/* Base flags for pbuf_type definitions: */ + +/** Indicates that the payload directly follows the struct pbuf. + * This makes @ref pbuf_header work in both directions. */ +#define PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS 0x80 +/** Indicates the data stored in this pbuf can change. If this pbuf needs + * to be queued, it must be copied/duplicated. */ +#define PBUF_TYPE_FLAG_DATA_VOLATILE 0x40 +/** 4 bits are reserved for 16 allocation sources (e.g. heap, pool1, pool2, etc) + * Internally, we use: 0=heap, 1=MEMP_PBUF, 2=MEMP_PBUF_POOL -> 13 types free*/ +#define PBUF_TYPE_ALLOC_SRC_MASK 0x0F +/** Indicates this pbuf is used for RX (if not set, indicates use for TX). + * This information can be used to keep some spare RX buffers e.g. for + * receiving TCP ACKs to unblock a connection) */ +#define PBUF_ALLOC_FLAG_RX 0x0100 +/** Indicates the application needs the pbuf payload to be in one piece */ +#define PBUF_ALLOC_FLAG_DATA_CONTIGUOUS 0x0200 + +#define PBUF_TYPE_ALLOC_SRC_MASK_STD_HEAP 0x00 +#define PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF 0x01 +#define PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF_POOL 0x02 +/** First pbuf allocation type for applications */ +#define PBUF_TYPE_ALLOC_SRC_MASK_APP_MIN 0x03 +/** Last pbuf allocation type for applications */ +#define PBUF_TYPE_ALLOC_SRC_MASK_APP_MAX PBUF_TYPE_ALLOC_SRC_MASK + /** * @ingroup pbuf * Enumeration of pbuf types @@ -105,22 +149,22 @@ typedef enum { pbuf_alloc() allocates PBUF_RAM pbufs as unchained pbufs (although that might change in future versions). This should be used for all OUTGOING packets (TX).*/ - PBUF_RAM, + PBUF_RAM = (PBUF_ALLOC_FLAG_DATA_CONTIGUOUS | PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS | PBUF_TYPE_ALLOC_SRC_MASK_STD_HEAP), /** pbuf data is stored in ROM, i.e. struct pbuf and its payload are located in totally different memory areas. Since it points to ROM, payload does not have to be copied when queued for transmission. */ - PBUF_ROM, + PBUF_ROM = PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF, /** pbuf comes from the pbuf pool. Much like PBUF_ROM but payload might change so it has to be duplicated when queued before transmitting, depending on who has a 'ref' to it. */ - PBUF_REF, + PBUF_REF = (PBUF_TYPE_FLAG_DATA_VOLATILE | PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF), /** pbuf payload refers to RAM. This one comes from a pool and should be used for RX. Payload can be chained (scatter-gather RX) but like PBUF_RAM, struct pbuf and its payload are allocated in one piece of contiguous memory (so the first payload byte can be calculated from struct pbuf). Don't use this for TX, if the pool becomes empty e.g. because of TCP queuing, you are unable to receive TCP acks! */ - PBUF_POOL + PBUF_POOL = (PBUF_ALLOC_FLAG_RX | PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS | PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF_POOL) } pbuf_type; @@ -158,8 +202,10 @@ struct pbuf { /** length of this buffer */ u16_t len; - /** pbuf_type as u8_t instead of enum to save space */ - u8_t /*pbuf_type*/ type; + /** a bit field indicating pbuf type and allocation sources + (see PBUF_TYPE_FLAG_*, PBUF_ALLOC_FLAG_* and PBUF_TYPE_ALLOC_SRC_MASK) + */ + u8_t type_internal; /** misc flags */ u8_t flags; @@ -169,7 +215,10 @@ struct pbuf { * that refer to this pbuf. This can be pointers from an application, * the stack itself, or pbuf->next pointers from a chain. */ - u16_t ref; + LWIP_PBUF_REF_T ref; + + /** For incoming packets, this contains the input netif's index */ + u8_t if_idx; }; @@ -221,14 +270,22 @@ void pbuf_free_ooseq(void); #define pbuf_init() struct pbuf *pbuf_alloc(pbuf_layer l, u16_t length, pbuf_type type); +struct pbuf *pbuf_alloc_reference(void *payload, u16_t length, pbuf_type type); #if LWIP_SUPPORT_CUSTOM_PBUF struct pbuf *pbuf_alloced_custom(pbuf_layer l, u16_t length, pbuf_type type, struct pbuf_custom *p, void *payload_mem, u16_t payload_mem_len); #endif /* LWIP_SUPPORT_CUSTOM_PBUF */ void pbuf_realloc(struct pbuf *p, u16_t size); +#define pbuf_get_allocsrc(p) ((p)->type_internal & PBUF_TYPE_ALLOC_SRC_MASK) +#define pbuf_match_allocsrc(p, type) (pbuf_get_allocsrc(p) == ((type) & PBUF_TYPE_ALLOC_SRC_MASK)) +#define pbuf_match_type(p, type) pbuf_match_allocsrc(p, type) u8_t pbuf_header(struct pbuf *p, s16_t header_size); u8_t pbuf_header_force(struct pbuf *p, s16_t header_size); +u8_t pbuf_add_header(struct pbuf *p, size_t header_size_increment); +u8_t pbuf_add_header_force(struct pbuf *p, size_t header_size_increment); +u8_t pbuf_remove_header(struct pbuf *p, size_t header_size); +struct pbuf *pbuf_free_header(struct pbuf *q, u16_t size); void pbuf_ref(struct pbuf *p); u8_t pbuf_free(struct pbuf *p); u16_t pbuf_clen(const struct pbuf *p); @@ -237,10 +294,12 @@ void pbuf_chain(struct pbuf *head, struct pbuf *tail); struct pbuf *pbuf_dechain(struct pbuf *p); err_t pbuf_copy(struct pbuf *p_to, const struct pbuf *p_from); u16_t pbuf_copy_partial(const struct pbuf *p, void *dataptr, u16_t len, u16_t offset); +void *pbuf_get_contiguous(const struct pbuf *p, void *buffer, size_t bufsize, u16_t len, u16_t offset); err_t pbuf_take(struct pbuf *buf, const void *dataptr, u16_t len); err_t pbuf_take_at(struct pbuf *buf, const void *dataptr, u16_t len, u16_t offset); struct pbuf *pbuf_skip(struct pbuf* in, u16_t in_offset, u16_t* out_offset); struct pbuf *pbuf_coalesce(struct pbuf *p, pbuf_layer layer); +struct pbuf *pbuf_clone(pbuf_layer l, pbuf_type type, struct pbuf *p); #if LWIP_CHECKSUM_ON_COPY err_t pbuf_fill_chksum(struct pbuf *p, u16_t start_offset, const void *dataptr, u16_t len, u16_t *chksum); diff --git a/Libraries/LwIP/src/include/lwip/priv/altcp_priv.h b/Libraries/LwIP/src/include/lwip/priv/altcp_priv.h new file mode 100644 index 0000000..2d3b2fd --- /dev/null +++ b/Libraries/LwIP/src/include/lwip/priv/altcp_priv.h @@ -0,0 +1,146 @@ +/** + * @file + * Application layered TCP connection API (to be used from TCPIP thread)\n + * This interface mimics the tcp callback API to the application while preventing + * direct linking (much like virtual functions). + * This way, an application can make use of other application layer protocols + * on top of TCP without knowing the details (e.g. TLS, proxy connection). + */ + +/* + * Copyright (c) 2017 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ +#ifndef LWIP_HDR_ALTCP_PRIV_H +#define LWIP_HDR_ALTCP_PRIV_H + +#include "lwip/opt.h" + +#if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/altcp.h" +#include "lwip/ip_addr.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct altcp_pcb *altcp_alloc(void); +void altcp_free(struct altcp_pcb *conn); + +/* Function prototypes for application layers */ +typedef void (*altcp_set_poll_fn)(struct altcp_pcb *conn, u8_t interval); +typedef void (*altcp_recved_fn)(struct altcp_pcb *conn, u16_t len); +typedef err_t (*altcp_bind_fn)(struct altcp_pcb *conn, const ip_addr_t *ipaddr, u16_t port); +typedef err_t (*altcp_connect_fn)(struct altcp_pcb *conn, const ip_addr_t *ipaddr, u16_t port, altcp_connected_fn connected); + +typedef struct altcp_pcb *(*altcp_listen_fn)(struct altcp_pcb *conn, u8_t backlog, err_t *err); + +typedef void (*altcp_abort_fn)(struct altcp_pcb *conn); +typedef err_t (*altcp_close_fn)(struct altcp_pcb *conn); +typedef err_t (*altcp_shutdown_fn)(struct altcp_pcb *conn, int shut_rx, int shut_tx); + +typedef err_t (*altcp_write_fn)(struct altcp_pcb *conn, const void *dataptr, u16_t len, u8_t apiflags); +typedef err_t (*altcp_output_fn)(struct altcp_pcb *conn); + +typedef u16_t (*altcp_mss_fn)(struct altcp_pcb *conn); +typedef u16_t (*altcp_sndbuf_fn)(struct altcp_pcb *conn); +typedef u16_t (*altcp_sndqueuelen_fn)(struct altcp_pcb *conn); +typedef void (*altcp_nagle_disable_fn)(struct altcp_pcb *conn); +typedef void (*altcp_nagle_enable_fn)(struct altcp_pcb *conn); +typedef int (*altcp_nagle_disabled_fn)(struct altcp_pcb *conn); + +typedef void (*altcp_setprio_fn)(struct altcp_pcb *conn, u8_t prio); + +typedef void (*altcp_dealloc_fn)(struct altcp_pcb *conn); + +typedef err_t (*altcp_get_tcp_addrinfo_fn)(struct altcp_pcb *conn, int local, ip_addr_t *addr, u16_t *port); +typedef ip_addr_t *(*altcp_get_ip_fn)(struct altcp_pcb *conn, int local); +typedef u16_t (*altcp_get_port_fn)(struct altcp_pcb *conn, int local); + +#ifdef LWIP_DEBUG +typedef enum tcp_state (*altcp_dbg_get_tcp_state_fn)(struct altcp_pcb *conn); +#endif + +struct altcp_functions { + altcp_set_poll_fn set_poll; + altcp_recved_fn recved; + altcp_bind_fn bind; + altcp_connect_fn connect; + altcp_listen_fn listen; + altcp_abort_fn abort; + altcp_close_fn close; + altcp_shutdown_fn shutdown; + altcp_write_fn write; + altcp_output_fn output; + altcp_mss_fn mss; + altcp_sndbuf_fn sndbuf; + altcp_sndqueuelen_fn sndqueuelen; + altcp_nagle_disable_fn nagle_disable; + altcp_nagle_enable_fn nagle_enable; + altcp_nagle_disabled_fn nagle_disabled; + altcp_setprio_fn setprio; + altcp_dealloc_fn dealloc; + altcp_get_tcp_addrinfo_fn addrinfo; + altcp_get_ip_fn getip; + altcp_get_port_fn getport; +#ifdef LWIP_DEBUG + altcp_dbg_get_tcp_state_fn dbg_get_tcp_state; +#endif +}; + +void altcp_default_set_poll(struct altcp_pcb *conn, u8_t interval); +void altcp_default_recved(struct altcp_pcb *conn, u16_t len); +err_t altcp_default_bind(struct altcp_pcb *conn, const ip_addr_t *ipaddr, u16_t port); +err_t altcp_default_shutdown(struct altcp_pcb *conn, int shut_rx, int shut_tx); +err_t altcp_default_write(struct altcp_pcb *conn, const void *dataptr, u16_t len, u8_t apiflags); +err_t altcp_default_output(struct altcp_pcb *conn); +u16_t altcp_default_mss(struct altcp_pcb *conn); +u16_t altcp_default_sndbuf(struct altcp_pcb *conn); +u16_t altcp_default_sndqueuelen(struct altcp_pcb *conn); +void altcp_default_nagle_disable(struct altcp_pcb *conn); +void altcp_default_nagle_enable(struct altcp_pcb *conn); +int altcp_default_nagle_disabled(struct altcp_pcb *conn); +void altcp_default_setprio(struct altcp_pcb *conn, u8_t prio); +void altcp_default_dealloc(struct altcp_pcb *conn); +err_t altcp_default_get_tcp_addrinfo(struct altcp_pcb *conn, int local, ip_addr_t *addr, u16_t *port); +ip_addr_t *altcp_default_get_ip(struct altcp_pcb *conn, int local); +u16_t altcp_default_get_port(struct altcp_pcb *conn, int local); +#ifdef LWIP_DEBUG +enum tcp_state altcp_default_dbg_get_tcp_state(struct altcp_pcb *conn); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_ALTCP */ + +#endif /* LWIP_HDR_ALTCP_PRIV_H */ diff --git a/Libraries/LwIP/src/include/lwip/priv/api_msg.h b/Libraries/LwIP/src/include/lwip/priv/api_msg.h index 792e288..64c8763 100755 --- a/Libraries/LwIP/src/include/lwip/priv/api_msg.h +++ b/Libraries/LwIP/src/include/lwip/priv/api_msg.h @@ -39,10 +39,6 @@ #include "lwip/opt.h" -#if LWIP_NETCONN || LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */ -/* Note: Netconn API is always available when sockets are enabled - - * sockets are implemented on top of them */ - #include "lwip/arch.h" #include "lwip/ip_addr.h" #include "lwip/err.h" @@ -55,6 +51,10 @@ extern "C" { #endif +#if LWIP_NETCONN || LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */ +/* Note: Netconn API is always available when sockets are enabled - + * sockets are implemented on top of them */ + #if LWIP_MPU_COMPATIBLE #if LWIP_NETCONN_SEM_PER_THREAD #define API_MSG_M_DEF_SEM(m) *m @@ -94,6 +94,7 @@ struct api_msg { struct { API_MSG_M_DEF_C(ip_addr_t, ipaddr); u16_t port; + u8_t if_idx; } bc; /** used for lwip_netconn_do_getaddr */ struct { @@ -103,8 +104,16 @@ struct api_msg { } ad; /** used for lwip_netconn_do_write */ struct { - const void *dataptr; + /** current vector to write */ + const struct netvector *vector; + /** number of unwritten vectors */ + u16_t vector_cnt; + /** offset into current vector */ + size_t vector_off; + /** total length across vectors */ size_t len; + /** offset into total length/output of bytes written when err == ERR_OK */ + size_t offset; u8_t apiflags; #if LWIP_SO_SNDTIMEO u32_t time_started; @@ -112,7 +121,7 @@ struct api_msg { } w; /** used for lwip_netconn_do_recv */ struct { - u32_t len; + size_t len; } r; #if LWIP_TCP /** used for lwip_netconn_do_close (/shutdown) */ @@ -130,6 +139,7 @@ struct api_msg { struct { API_MSG_M_DEF_C(ip_addr_t, multiaddr); API_MSG_M_DEF_C(ip_addr_t, netif_addr); + u8_t if_idx; enum netconn_igmp join_or_leave; } jl; #endif /* LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) */ @@ -177,13 +187,14 @@ struct dns_api_msg { }; #endif /* LWIP_DNS */ -#if LWIP_TCP -extern u8_t netconn_aborted; -#endif /* LWIP_TCP */ - +#if LWIP_NETCONN_FULLDUPLEX +int lwip_netconn_is_deallocated_msg(void *msg); +#endif +int lwip_netconn_is_err_msg(void *msg, err_t *err); void lwip_netconn_do_newconn (void *m); void lwip_netconn_do_delconn (void *m); void lwip_netconn_do_bind (void *m); +void lwip_netconn_do_bind_if (void *m); void lwip_netconn_do_connect (void *m); void lwip_netconn_do_disconnect (void *m); void lwip_netconn_do_listen (void *m); @@ -198,6 +209,7 @@ void lwip_netconn_do_close (void *m); void lwip_netconn_do_shutdown (void *m); #if LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) void lwip_netconn_do_join_leave_group(void *m); +void lwip_netconn_do_join_leave_group_netif(void *m); #endif /* LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) */ #if LWIP_DNS @@ -207,10 +219,54 @@ void lwip_netconn_do_gethostbyname(void *arg); struct netconn* netconn_alloc(enum netconn_type t, netconn_callback callback); void netconn_free(struct netconn *conn); +#endif /* LWIP_NETCONN || LWIP_SOCKET */ + +#if LWIP_NETIF_API /* don't build if not configured for use in lwipopts.h */ + +/* netifapi related lwIP internal definitions */ + +#if LWIP_MPU_COMPATIBLE +#define NETIFAPI_IPADDR_DEF(type, m) type m +#else /* LWIP_MPU_COMPATIBLE */ +#define NETIFAPI_IPADDR_DEF(type, m) const type * m +#endif /* LWIP_MPU_COMPATIBLE */ + +typedef void (*netifapi_void_fn)(struct netif *netif); +typedef err_t (*netifapi_errt_fn)(struct netif *netif); + +struct netifapi_msg { + struct tcpip_api_call_data call; + struct netif *netif; + union { + struct { +#if LWIP_IPV4 + NETIFAPI_IPADDR_DEF(ip4_addr_t, ipaddr); + NETIFAPI_IPADDR_DEF(ip4_addr_t, netmask); + NETIFAPI_IPADDR_DEF(ip4_addr_t, gw); +#endif /* LWIP_IPV4 */ + void *state; + netif_init_fn init; + netif_input_fn input; + } add; + struct { + netifapi_void_fn voidfunc; + netifapi_errt_fn errtfunc; + } common; + struct { +#if LWIP_MPU_COMPATIBLE + char name[NETIF_NAMESIZE]; +#else /* LWIP_MPU_COMPATIBLE */ + char *name; +#endif /* LWIP_MPU_COMPATIBLE */ + u8_t index; + } ifs; + } msg; +}; + +#endif /* LWIP_NETIF_API */ + #ifdef __cplusplus } #endif -#endif /* LWIP_NETCONN || LWIP_SOCKET */ - #endif /* LWIP_HDR_API_MSG_H */ diff --git a/Libraries/LwIP/src/include/lwip/priv/mem_priv.h b/Libraries/LwIP/src/include/lwip/priv/mem_priv.h new file mode 100644 index 0000000..8630d75 --- /dev/null +++ b/Libraries/LwIP/src/include/lwip/priv/mem_priv.h @@ -0,0 +1,84 @@ +/** + * @file + * lwIP internal memory implementations (do not use in application code) + */ + +/* + * Copyright (c) 2018 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ + +#ifndef LWIP_HDR_MEM_PRIV_H +#define LWIP_HDR_MEM_PRIV_H + +#include "lwip/opt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#include "lwip/mem.h" + +#if MEM_OVERFLOW_CHECK || MEMP_OVERFLOW_CHECK +/* if MEM_OVERFLOW_CHECK or MEMP_OVERFLOW_CHECK is turned on, we reserve some + * bytes at the beginning and at the end of each element, initialize them as + * 0xcd and check them later. + * If MEM(P)_OVERFLOW_CHECK is >= 2, on every call to mem(p)_malloc or mem(p)_free, + * every single element in each pool/heap is checked! + * This is VERY SLOW but also very helpful. + * MEM_SANITY_REGION_BEFORE and MEM_SANITY_REGION_AFTER can be overridden in + * lwipopts.h to change the amount reserved for checking. */ +#ifndef MEM_SANITY_REGION_BEFORE +#define MEM_SANITY_REGION_BEFORE 16 +#endif /* MEM_SANITY_REGION_BEFORE*/ +#if MEM_SANITY_REGION_BEFORE > 0 +#define MEM_SANITY_REGION_BEFORE_ALIGNED LWIP_MEM_ALIGN_SIZE(MEM_SANITY_REGION_BEFORE) +#else +#define MEM_SANITY_REGION_BEFORE_ALIGNED 0 +#endif /* MEM_SANITY_REGION_BEFORE*/ +#ifndef MEM_SANITY_REGION_AFTER +#define MEM_SANITY_REGION_AFTER 16 +#endif /* MEM_SANITY_REGION_AFTER*/ +#if MEM_SANITY_REGION_AFTER > 0 +#define MEM_SANITY_REGION_AFTER_ALIGNED LWIP_MEM_ALIGN_SIZE(MEM_SANITY_REGION_AFTER) +#else +#define MEM_SANITY_REGION_AFTER_ALIGNED 0 +#endif /* MEM_SANITY_REGION_AFTER*/ + +void mem_overflow_init_raw(void *p, size_t size); +void mem_overflow_check_raw(void *p, size_t size, const char *descr1, const char *descr2); + +#endif /* MEM_OVERFLOW_CHECK || MEMP_OVERFLOW_CHECK */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_MEMP_PRIV_H */ diff --git a/Libraries/LwIP/src/include/lwip/priv/memp_priv.h b/Libraries/LwIP/src/include/lwip/priv/memp_priv.h index e4a7655..f9930fd 100755 --- a/Libraries/LwIP/src/include/lwip/priv/memp_priv.h +++ b/Libraries/LwIP/src/include/lwip/priv/memp_priv.h @@ -45,36 +45,14 @@ extern "C" { #endif #include "lwip/mem.h" +#include "lwip/priv/mem_priv.h" #if MEMP_OVERFLOW_CHECK -/* if MEMP_OVERFLOW_CHECK is turned on, we reserve some bytes at the beginning - * and at the end of each element, initialize them as 0xcd and check - * them later. */ -/* If MEMP_OVERFLOW_CHECK is >= 2, on every call to memp_malloc or memp_free, - * every single element in each pool is checked! - * This is VERY SLOW but also very helpful. */ -/* MEMP_SANITY_REGION_BEFORE and MEMP_SANITY_REGION_AFTER can be overridden in - * lwipopts.h to change the amount reserved for checking. */ -#ifndef MEMP_SANITY_REGION_BEFORE -#define MEMP_SANITY_REGION_BEFORE 16 -#endif /* MEMP_SANITY_REGION_BEFORE*/ -#if MEMP_SANITY_REGION_BEFORE > 0 -#define MEMP_SANITY_REGION_BEFORE_ALIGNED LWIP_MEM_ALIGN_SIZE(MEMP_SANITY_REGION_BEFORE) -#else -#define MEMP_SANITY_REGION_BEFORE_ALIGNED 0 -#endif /* MEMP_SANITY_REGION_BEFORE*/ -#ifndef MEMP_SANITY_REGION_AFTER -#define MEMP_SANITY_REGION_AFTER 16 -#endif /* MEMP_SANITY_REGION_AFTER*/ -#if MEMP_SANITY_REGION_AFTER > 0 -#define MEMP_SANITY_REGION_AFTER_ALIGNED LWIP_MEM_ALIGN_SIZE(MEMP_SANITY_REGION_AFTER) -#else -#define MEMP_SANITY_REGION_AFTER_ALIGNED 0 -#endif /* MEMP_SANITY_REGION_AFTER*/ + /* MEMP_SIZE: save space for struct memp and for sanity check */ -#define MEMP_SIZE (LWIP_MEM_ALIGN_SIZE(sizeof(struct memp)) + MEMP_SANITY_REGION_BEFORE_ALIGNED) -#define MEMP_ALIGN_SIZE(x) (LWIP_MEM_ALIGN_SIZE(x) + MEMP_SANITY_REGION_AFTER_ALIGNED) +#define MEMP_SIZE (LWIP_MEM_ALIGN_SIZE(sizeof(struct memp)) + MEM_SANITY_REGION_BEFORE_ALIGNED) +#define MEMP_ALIGN_SIZE(x) (LWIP_MEM_ALIGN_SIZE(x) + MEM_SANITY_REGION_AFTER_ALIGNED) #else /* MEMP_OVERFLOW_CHECK */ diff --git a/Libraries/LwIP/src/include/lwip/priv/memp_std.h b/Libraries/LwIP/src/include/lwip/priv/memp_std.h index fb91202..4d3b192 100755 --- a/Libraries/LwIP/src/include/lwip/priv/memp_std.h +++ b/Libraries/LwIP/src/include/lwip/priv/memp_std.h @@ -28,7 +28,7 @@ #ifndef LWIP_PBUF_MEMPOOL /* This treats "pbuf pools" just like any other pool. * Allocates buffers for a pbuf struct AND a payload size */ -#define LWIP_PBUF_MEMPOOL(name, num, payload, desc) LWIP_MEMPOOL(name, num, (MEMP_ALIGN_SIZE(sizeof(struct pbuf)) + MEMP_ALIGN_SIZE(payload)), desc) +#define LWIP_PBUF_MEMPOOL(name, num, payload, desc) LWIP_MEMPOOL(name, num, (LWIP_MEM_ALIGN_SIZE(sizeof(struct pbuf)) + LWIP_MEM_ALIGN_SIZE(payload)), desc) #endif /* LWIP_PBUF_MEMPOOL */ @@ -52,6 +52,10 @@ LWIP_MEMPOOL(TCP_PCB_LISTEN, MEMP_NUM_TCP_PCB_LISTEN, sizeof(struct tcp_pcb_lis LWIP_MEMPOOL(TCP_SEG, MEMP_NUM_TCP_SEG, sizeof(struct tcp_seg), "TCP_SEG") #endif /* LWIP_TCP */ +#if LWIP_ALTCP && LWIP_TCP +LWIP_MEMPOOL(ALTCP_PCB, MEMP_NUM_ALTCP_PCB, sizeof(struct altcp_pcb), "ALTCP_PCB") +#endif /* LWIP_ALTCP && LWIP_TCP */ + #if LWIP_IPV4 && IP_REASSEMBLY LWIP_MEMPOOL(REASSDATA, MEMP_NUM_REASSDATA, sizeof(struct ip_reassdata), "REASSDATA") #endif /* LWIP_IPV4 && IP_REASSEMBLY */ @@ -74,6 +78,9 @@ LWIP_MEMPOOL(DNS_API_MSG, MEMP_NUM_DNS_API_MSG, sizeof(struct dns_api_msg #if LWIP_SOCKET && !LWIP_TCPIP_CORE_LOCKING LWIP_MEMPOOL(SOCKET_SETGETSOCKOPT_DATA, MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA, sizeof(struct lwip_setgetsockopt_data), "SOCKET_SETGETSOCKOPT_DATA") #endif +#if LWIP_SOCKET && (LWIP_SOCKET_SELECT || LWIP_SOCKET_POLL) +LWIP_MEMPOOL(SELECT_CB, MEMP_NUM_SELECT_CB, sizeof(struct lwip_select_cb), "SELECT_CB") +#endif /* LWIP_SOCKET && (LWIP_SOCKET_SELECT || LWIP_SOCKET_POLL) */ #if LWIP_NETIF_API LWIP_MEMPOOL(NETIFAPI_MSG, MEMP_NUM_NETIFAPI_MSG, sizeof(struct netifapi_msg), "NETIFAPI_MSG") #endif @@ -103,15 +110,15 @@ LWIP_MEMPOOL(LOCALHOSTLIST, MEMP_NUM_LOCALHOSTLIST, LOCALHOSTLIST_ELEM_SIZE, #endif /* LWIP_DNS && DNS_LOCAL_HOSTLIST && DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ #if LWIP_IPV6 && LWIP_ND6_QUEUEING -LWIP_MEMPOOL(ND6_QUEUE, MEMP_NUM_ND6_QUEUE, sizeof(struct nd6_q_entry), "ND6_QUEUE") +LWIP_MEMPOOL(ND6_QUEUE, MEMP_NUM_ND6_QUEUE, sizeof(struct nd6_q_entry), "ND6_QUEUE") #endif /* LWIP_IPV6 && LWIP_ND6_QUEUEING */ #if LWIP_IPV6 && LWIP_IPV6_REASS -LWIP_MEMPOOL(IP6_REASSDATA, MEMP_NUM_REASSDATA, sizeof(struct ip6_reassdata), "IP6_REASSDATA") +LWIP_MEMPOOL(IP6_REASSDATA, MEMP_NUM_REASSDATA, sizeof(struct ip6_reassdata), "IP6_REASSDATA") #endif /* LWIP_IPV6 && LWIP_IPV6_REASS */ #if LWIP_IPV6 && LWIP_IPV6_MLD -LWIP_MEMPOOL(MLD6_GROUP, MEMP_NUM_MLD6_GROUP, sizeof(struct mld_group), "MLD6_GROUP") +LWIP_MEMPOOL(MLD6_GROUP, MEMP_NUM_MLD6_GROUP, sizeof(struct mld_group), "MLD6_GROUP") #endif /* LWIP_IPV6 && LWIP_IPV6_MLD */ @@ -123,7 +130,7 @@ LWIP_MEMPOOL(MLD6_GROUP, MEMP_NUM_MLD6_GROUP, sizeof(struct mld_group), * This allocates enough space for the pbuf struct and a payload. * (Example: pbuf_payload_size=0 allocates only size for the struct) */ -LWIP_PBUF_MEMPOOL(PBUF, MEMP_NUM_PBUF, 0, "PBUF_REF/ROM") +LWIP_MEMPOOL(PBUF, MEMP_NUM_PBUF, sizeof(struct pbuf), "PBUF_REF/ROM") LWIP_PBUF_MEMPOOL(PBUF_POOL, PBUF_POOL_SIZE, PBUF_POOL_BUFSIZE, "PBUF_POOL") diff --git a/Libraries/LwIP/src/include/lwip/priv/nd6_priv.h b/Libraries/LwIP/src/include/lwip/priv/nd6_priv.h index 3377dde..61c0b73 100755 --- a/Libraries/LwIP/src/include/lwip/priv/nd6_priv.h +++ b/Libraries/LwIP/src/include/lwip/priv/nd6_priv.h @@ -83,7 +83,7 @@ struct nd6_neighbor_cache_entry { u8_t state; u8_t isrouter; union { - u32_t reachable_time; /* in ms since value may originate from network packet */ + u32_t reachable_time; /* in seconds */ u32_t delay_time; /* ticks (ND6_TMR_INTERVAL) */ u32_t probes_sent; u32_t stale_time; /* ticks (ND6_TMR_INTERVAL) */ @@ -100,18 +100,12 @@ struct nd6_destination_cache_entry { struct nd6_prefix_list_entry { ip6_addr_t prefix; struct netif *netif; - u32_t invalidation_timer; /* in ms since value may originate from network packet */ -#if LWIP_IPV6_AUTOCONFIG - u8_t flags; -#define ND6_PREFIX_AUTOCONFIG_AUTONOMOUS 0x01 -#define ND6_PREFIX_AUTOCONFIG_ADDRESS_GENERATED 0x02 -#define ND6_PREFIX_AUTOCONFIG_ADDRESS_DUPLICATE 0x04 -#endif /* LWIP_IPV6_AUTOCONFIG */ + u32_t invalidation_timer; /* in seconds */ }; struct nd6_router_list_entry { struct nd6_neighbor_cache_entry *neighbor_entry; - u32_t invalidation_timer; /* in ms since value may originate from network packet */ + u32_t invalidation_timer; /* in seconds */ u8_t flags; }; @@ -124,6 +118,10 @@ enum nd6_neighbor_cache_entry_state { ND6_PROBE }; +#define ND6_HOPLIM 255 /* maximum hop limit, required in all ND packets */ + +#define ND6_2HRS 7200 /* two hours, expressed in number of seconds */ + /* Router tables. */ /* @todo make these static? and entries accessible through API? */ extern struct nd6_neighbor_cache_entry neighbor_cache[]; diff --git a/Libraries/LwIP/src/include/lwip/priv/raw_priv.h b/Libraries/LwIP/src/include/lwip/priv/raw_priv.h new file mode 100644 index 0000000..d4561d4 --- /dev/null +++ b/Libraries/LwIP/src/include/lwip/priv/raw_priv.h @@ -0,0 +1,69 @@ +/** + * @file + * raw API internal implementations (do not use in application code) + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_RAW_PRIV_H +#define LWIP_HDR_RAW_PRIV_H + +#include "lwip/opt.h" + +#if LWIP_RAW /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/raw.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** return codes for raw_input */ +typedef enum raw_input_state +{ + RAW_INPUT_NONE = 0, /* pbuf did not match any pcbs */ + RAW_INPUT_EATEN, /* pbuf handed off and delivered to pcb */ + RAW_INPUT_DELIVERED /* pbuf only delivered to pcb (pbuf can still be referenced) */ +} raw_input_state_t; + +/* The following functions are the lower layer interface to RAW. */ +raw_input_state_t raw_input(struct pbuf *p, struct netif *inp); + +void raw_netif_ip_addr_changed(const ip_addr_t* old_addr, const ip_addr_t* new_addr); + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_RAW */ + +#endif /* LWIP_HDR_RAW_PRIV_H */ diff --git a/Libraries/LwIP/src/include/lwip/priv/sockets_priv.h b/Libraries/LwIP/src/include/lwip/priv/sockets_priv.h new file mode 100644 index 0000000..d8f9904 --- /dev/null +++ b/Libraries/LwIP/src/include/lwip/priv/sockets_priv.h @@ -0,0 +1,175 @@ +/** + * @file + * Sockets API internal implementations (do not use in application code) + */ + +/* + * Copyright (c) 2017 Joel Cunningham, Garmin International, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Joel Cunningham + * + */ +#ifndef LWIP_HDR_SOCKETS_PRIV_H +#define LWIP_HDR_SOCKETS_PRIV_H + +#include "lwip/opt.h" + +#if LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/err.h" +#include "lwip/sockets.h" +#include "lwip/sys.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define NUM_SOCKETS MEMP_NUM_NETCONN + +/** This is overridable for the rare case where more than 255 threads + * select on the same socket... + */ +#ifndef SELWAIT_T +#define SELWAIT_T u8_t +#endif + +union lwip_sock_lastdata { + struct netbuf *netbuf; + struct pbuf *pbuf; +}; + +/** Contains all internal pointers and states used for a socket */ +struct lwip_sock { + /** sockets currently are built on netconns, each socket has one netconn */ + struct netconn *conn; + /** data that was left from the previous read */ + union lwip_sock_lastdata lastdata; +#if LWIP_SOCKET_SELECT || LWIP_SOCKET_POLL + /** number of times data was received, set by event_callback(), + tested by the receive and select functions */ + s16_t rcvevent; + /** number of times data was ACKed (free send buffer), set by event_callback(), + tested by select */ + u16_t sendevent; + /** error happened for this socket, set by event_callback(), tested by select */ + u16_t errevent; + /** counter of how many threads are waiting for this socket using select */ + SELWAIT_T select_waiting; +#endif /* LWIP_SOCKET_SELECT || LWIP_SOCKET_POLL */ +#if LWIP_NETCONN_FULLDUPLEX + /* counter of how many threads are using a struct lwip_sock (not the 'int') */ + u8_t fd_used; + /* status of pending close/delete actions */ + u8_t fd_free_pending; +#define LWIP_SOCK_FD_FREE_TCP 1 +#define LWIP_SOCK_FD_FREE_FREE 2 +#endif +}; + +#ifndef set_errno +#define set_errno(err) do { if (err) { errno = (err); } } while(0) +#endif + +#if !LWIP_TCPIP_CORE_LOCKING +/** Maximum optlen used by setsockopt/getsockopt */ +#define LWIP_SETGETSOCKOPT_MAXOPTLEN LWIP_MAX(16, sizeof(struct ifreq)) + +/** This struct is used to pass data to the set/getsockopt_internal + * functions running in tcpip_thread context (only a void* is allowed) */ +struct lwip_setgetsockopt_data { + /** socket index for which to change options */ + int s; + /** level of the option to process */ + int level; + /** name of the option to process */ + int optname; + /** set: value to set the option to + * get: value of the option is stored here */ +#if LWIP_MPU_COMPATIBLE + u8_t optval[LWIP_SETGETSOCKOPT_MAXOPTLEN]; +#else + union { + void *p; + const void *pc; + } optval; +#endif + /** size of *optval */ + socklen_t optlen; + /** if an error occurs, it is temporarily stored here */ + int err; + /** semaphore to wake up the calling task */ + void* completed_sem; +}; +#endif /* !LWIP_TCPIP_CORE_LOCKING */ + +#ifdef __cplusplus +} +#endif + +struct lwip_sock* lwip_socket_dbg_get_socket(int fd); + +#if LWIP_SOCKET_SELECT || LWIP_SOCKET_POLL + +#if LWIP_NETCONN_SEM_PER_THREAD +#define SELECT_SEM_T sys_sem_t* +#define SELECT_SEM_PTR(sem) (sem) +#else /* LWIP_NETCONN_SEM_PER_THREAD */ +#define SELECT_SEM_T sys_sem_t +#define SELECT_SEM_PTR(sem) (&(sem)) +#endif /* LWIP_NETCONN_SEM_PER_THREAD */ + +/** Description for a task waiting in select */ +struct lwip_select_cb { + /** Pointer to the next waiting task */ + struct lwip_select_cb *next; + /** Pointer to the previous waiting task */ + struct lwip_select_cb *prev; +#if LWIP_SOCKET_SELECT + /** readset passed to select */ + fd_set *readset; + /** writeset passed to select */ + fd_set *writeset; + /** unimplemented: exceptset passed to select */ + fd_set *exceptset; +#endif /* LWIP_SOCKET_SELECT */ +#if LWIP_SOCKET_POLL + /** fds passed to poll; NULL if select */ + struct pollfd *poll_fds; + /** nfds passed to poll; 0 if select */ + nfds_t poll_nfds; +#endif /* LWIP_SOCKET_POLL */ + /** don't signal the same semaphore twice: set to 1 when signalled */ + int sem_signalled; + /** semaphore to wake up a task waiting for select */ + SELECT_SEM_T sem; +}; +#endif /* LWIP_SOCKET_SELECT || LWIP_SOCKET_POLL */ + +#endif /* LWIP_SOCKET */ + +#endif /* LWIP_HDR_SOCKETS_PRIV_H */ diff --git a/Libraries/LwIP/src/include/lwip/priv/tcp_priv.h b/Libraries/LwIP/src/include/lwip/priv/tcp_priv.h index 7ae37e4..96e07e3 100755 --- a/Libraries/LwIP/src/include/lwip/priv/tcp_priv.h +++ b/Libraries/LwIP/src/include/lwip/priv/tcp_priv.h @@ -77,9 +77,12 @@ void tcp_txnow (void); void tcp_input (struct pbuf *p, struct netif *inp); /* Used within the TCP code only: */ struct tcp_pcb * tcp_alloc (u8_t prio); +void tcp_free (struct tcp_pcb *pcb); void tcp_abandon (struct tcp_pcb *pcb, int reset); err_t tcp_send_empty_ack(struct tcp_pcb *pcb); -void tcp_rexmit (struct tcp_pcb *pcb); +err_t tcp_rexmit (struct tcp_pcb *pcb); +err_t tcp_rexmit_rto_prepare(struct tcp_pcb *pcb); +void tcp_rexmit_rto_commit(struct tcp_pcb *pcb); void tcp_rexmit_rto (struct tcp_pcb *pcb); void tcp_rexmit_fast (struct tcp_pcb *pcb); u32_t tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb); @@ -174,6 +177,8 @@ err_t tcp_process_refused_data(struct tcp_pcb *pcb); ret = lwip_tcp_event((pcb)->callback_arg, (pcb), LWIP_EVENT_POLL, NULL, 0, ERR_OK); \ } else { \ ret = ERR_ARG; } } while(0) +/* For event API, last state SYN_RCVD must be excluded here: the application + has not seen this pcb, yet! */ #define TCP_EVENT_ERR(last_state,errf,arg,err) do { if (last_state != SYN_RCVD) { \ lwip_tcp_event((arg), NULL, LWIP_EVENT_ERR, NULL, 0, (err)); } } while(0) @@ -259,11 +264,12 @@ struct tcp_seg { u8_t chksum_swapped; #endif /* TCP_CHECKSUM_ON_COPY */ u8_t flags; -#define TF_SEG_OPTS_MSS (u8_t)0x01U /* Include MSS option. */ +#define TF_SEG_OPTS_MSS (u8_t)0x01U /* Include MSS option (only used in SYN segments) */ #define TF_SEG_OPTS_TS (u8_t)0x02U /* Include timestamp option. */ #define TF_SEG_DATA_CHECKSUMMED (u8_t)0x04U /* ALL data (not the header) is checksummed into 'chksum' */ -#define TF_SEG_OPTS_WND_SCALE (u8_t)0x08U /* Include WND SCALE option */ +#define TF_SEG_OPTS_WND_SCALE (u8_t)0x08U /* Include WND SCALE option (only used in SYN segments) */ +#define TF_SEG_OPTS_SACK_PERM (u8_t)0x10U /* Include SACK Permitted option (only used in SYN segments) */ struct tcp_hdr *tcphdr; /* the TCP header */ }; @@ -271,6 +277,7 @@ struct tcp_seg { #define LWIP_TCP_OPT_NOP 1 #define LWIP_TCP_OPT_MSS 2 #define LWIP_TCP_OPT_WS 3 +#define LWIP_TCP_OPT_SACK_PERM 4 #define LWIP_TCP_OPT_TS 8 #define LWIP_TCP_OPT_LEN_MSS 4 @@ -287,10 +294,18 @@ struct tcp_seg { #define LWIP_TCP_OPT_LEN_WS_OUT 0 #endif +#if LWIP_TCP_SACK_OUT +#define LWIP_TCP_OPT_LEN_SACK_PERM 2 +#define LWIP_TCP_OPT_LEN_SACK_PERM_OUT 4 /* aligned for output (includes NOP padding) */ +#else +#define LWIP_TCP_OPT_LEN_SACK_PERM_OUT 0 +#endif + #define LWIP_TCP_OPT_LENGTH(flags) \ - (flags & TF_SEG_OPTS_MSS ? LWIP_TCP_OPT_LEN_MSS : 0) + \ - (flags & TF_SEG_OPTS_TS ? LWIP_TCP_OPT_LEN_TS_OUT : 0) + \ - (flags & TF_SEG_OPTS_WND_SCALE ? LWIP_TCP_OPT_LEN_WS_OUT : 0) + ((flags) & TF_SEG_OPTS_MSS ? LWIP_TCP_OPT_LEN_MSS : 0) + \ + ((flags) & TF_SEG_OPTS_TS ? LWIP_TCP_OPT_LEN_TS_OUT : 0) + \ + ((flags) & TF_SEG_OPTS_WND_SCALE ? LWIP_TCP_OPT_LEN_WS_OUT : 0) + \ + ((flags) & TF_SEG_OPTS_SACK_PERM ? LWIP_TCP_OPT_LEN_SACK_PERM_OUT : 0) /** This returns a TCP header option for MSS in an u32_t */ #define TCP_BUILD_MSS_OPTION(mss) lwip_htonl(0x02040000 | ((mss) & 0xFFFF)) @@ -342,7 +357,7 @@ extern struct tcp_pcb ** const tcp_pcb_lists[NUM_TCP_PCB_LISTS]; #if TCP_DEBUG_PCB_LISTS #define TCP_REG(pcbs, npcb) do {\ struct tcp_pcb *tcp_tmp_pcb; \ - LWIP_DEBUGF(TCP_DEBUG, ("TCP_REG %p local port %d\n", (npcb), (npcb)->local_port)); \ + LWIP_DEBUGF(TCP_DEBUG, ("TCP_REG %p local port %"U16_F"\n", (void *)(npcb), (npcb)->local_port)); \ for (tcp_tmp_pcb = *(pcbs); \ tcp_tmp_pcb != NULL; \ tcp_tmp_pcb = tcp_tmp_pcb->next) { \ @@ -352,13 +367,13 @@ extern struct tcp_pcb ** const tcp_pcb_lists[NUM_TCP_PCB_LISTS]; (npcb)->next = *(pcbs); \ LWIP_ASSERT("TCP_REG: npcb->next != npcb", (npcb)->next != (npcb)); \ *(pcbs) = (npcb); \ - LWIP_ASSERT("TCP_RMV: tcp_pcbs sane", tcp_pcbs_sane()); \ + LWIP_ASSERT("TCP_REG: tcp_pcbs sane", tcp_pcbs_sane()); \ tcp_timer_needed(); \ } while(0) #define TCP_RMV(pcbs, npcb) do { \ struct tcp_pcb *tcp_tmp_pcb; \ LWIP_ASSERT("TCP_RMV: pcbs != NULL", *(pcbs) != NULL); \ - LWIP_DEBUGF(TCP_DEBUG, ("TCP_RMV: removing %p from %p\n", (npcb), *(pcbs))); \ + LWIP_DEBUGF(TCP_DEBUG, ("TCP_RMV: removing %p from %p\n", (void *)(npcb), (void *)(*(pcbs)))); \ if(*(pcbs) == (npcb)) { \ *(pcbs) = (*pcbs)->next; \ } else for (tcp_tmp_pcb = *(pcbs); tcp_tmp_pcb != NULL; tcp_tmp_pcb = tcp_tmp_pcb->next) { \ @@ -369,7 +384,7 @@ extern struct tcp_pcb ** const tcp_pcb_lists[NUM_TCP_PCB_LISTS]; } \ (npcb)->next = NULL; \ LWIP_ASSERT("TCP_RMV: tcp_pcbs sane", tcp_pcbs_sane()); \ - LWIP_DEBUGF(TCP_DEBUG, ("TCP_RMV: removed %p from %p\n", (npcb), *(pcbs))); \ + LWIP_DEBUGF(TCP_DEBUG, ("TCP_RMV: removed %p from %p\n", (void *)(npcb), (void *)(*(pcbs)))); \ } while(0) #else /* LWIP_DEBUG */ @@ -433,45 +448,38 @@ struct tcp_seg *tcp_seg_copy(struct tcp_seg *seg); #define tcp_ack(pcb) \ do { \ if((pcb)->flags & TF_ACK_DELAY) { \ - (pcb)->flags &= ~TF_ACK_DELAY; \ - (pcb)->flags |= TF_ACK_NOW; \ + tcp_clear_flags(pcb, TF_ACK_DELAY); \ + tcp_ack_now(pcb); \ } \ else { \ - (pcb)->flags |= TF_ACK_DELAY; \ + tcp_set_flags(pcb, TF_ACK_DELAY); \ } \ } while (0) #define tcp_ack_now(pcb) \ - do { \ - (pcb)->flags |= TF_ACK_NOW; \ - } while (0) + tcp_set_flags(pcb, TF_ACK_NOW) err_t tcp_send_fin(struct tcp_pcb *pcb); err_t tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags); void tcp_rexmit_seg(struct tcp_pcb *pcb, struct tcp_seg *seg); -void tcp_rst(u32_t seqno, u32_t ackno, +void tcp_rst(const struct tcp_pcb* pcb, u32_t seqno, u32_t ackno, const ip_addr_t *local_ip, const ip_addr_t *remote_ip, u16_t local_port, u16_t remote_port); u32_t tcp_next_iss(struct tcp_pcb *pcb); err_t tcp_keepalive(struct tcp_pcb *pcb); +err_t tcp_split_unsent_seg(struct tcp_pcb *pcb, u16_t split); err_t tcp_zero_window_probe(struct tcp_pcb *pcb); void tcp_trigger_input_pcb_close(void); #if TCP_CALCULATE_EFF_SEND_MSS -u16_t tcp_eff_send_mss_impl(u16_t sendmss, const ip_addr_t *dest -#if LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING - , const ip_addr_t *src -#endif /* LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING */ - ); -#if LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING -#define tcp_eff_send_mss(sendmss, src, dest) tcp_eff_send_mss_impl(sendmss, dest, src) -#else /* LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING */ -#define tcp_eff_send_mss(sendmss, src, dest) tcp_eff_send_mss_impl(sendmss, dest) -#endif /* LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING */ +u16_t tcp_eff_send_mss_netif(u16_t sendmss, struct netif *outif, + const ip_addr_t *dest); +#define tcp_eff_send_mss(sendmss, src, dest) \ + tcp_eff_send_mss_netif(sendmss, ip_route(src, dest), dest) #endif /* TCP_CALCULATE_EFF_SEND_MSS */ #if LWIP_CALLBACK_API @@ -498,6 +506,14 @@ void tcp_timer_needed(void); void tcp_netif_ip_addr_changed(const ip_addr_t* old_addr, const ip_addr_t* new_addr); +#if TCP_QUEUE_OOSEQ +void tcp_free_ooseq(struct tcp_pcb *pcb); +#endif + +#if LWIP_TCP_PCB_NUM_EXT_ARGS +err_t tcp_ext_arg_invoke_callbacks_passive_open(struct tcp_pcb_listen *lpcb, struct tcp_pcb *cpcb); +#endif + #ifdef __cplusplus } #endif diff --git a/Libraries/LwIP/src/include/lwip/priv/tcpip_priv.h b/Libraries/LwIP/src/include/lwip/priv/tcpip_priv.h index 41d078a..327673b 100755 --- a/Libraries/LwIP/src/include/lwip/priv/tcpip_priv.h +++ b/Libraries/LwIP/src/include/lwip/priv/tcpip_priv.h @@ -55,12 +55,13 @@ struct netif; #if LWIP_MPU_COMPATIBLE #define API_VAR_REF(name) (*(name)) #define API_VAR_DECLARE(type, name) type * name -#define API_VAR_ALLOC(type, pool, name, errorval) do { \ +#define API_VAR_ALLOC_EXT(type, pool, name, errorblock) do { \ name = (type *)memp_malloc(pool); \ if (name == NULL) { \ - return errorval; \ + errorblock; \ } \ } while(0) +#define API_VAR_ALLOC(type, pool, name, errorval) API_VAR_ALLOC_EXT(type, pool, name, return errorval) #define API_VAR_ALLOC_POOL(type, pool, name, errorval) do { \ name = (type *)LWIP_MEMPOOL_ALLOC(pool); \ if (name == NULL) { \ @@ -81,6 +82,7 @@ struct netif; #else /* LWIP_MPU_COMPATIBLE */ #define API_VAR_REF(name) name #define API_VAR_DECLARE(type, name) type name +#define API_VAR_ALLOC_EXT(type, pool, name, errorblock) #define API_VAR_ALLOC(type, pool, name, errorval) #define API_VAR_ALLOC_POOL(type, pool, name, errorval) #define API_VAR_FREE(pool, name) @@ -109,9 +111,13 @@ typedef err_t (*tcpip_api_call_fn)(struct tcpip_api_call_data* call); err_t tcpip_api_call(tcpip_api_call_fn fn, struct tcpip_api_call_data *call); enum tcpip_msg_type { +#if !LWIP_TCPIP_CORE_LOCKING TCPIP_MSG_API, TCPIP_MSG_API_CALL, +#endif /* !LWIP_TCPIP_CORE_LOCKING */ +#if !LWIP_TCPIP_CORE_LOCKING_INPUT TCPIP_MSG_INPKT, +#endif /* !LWIP_TCPIP_CORE_LOCKING_INPUT */ #if LWIP_TCPIP_TIMEOUT && LWIP_TIMERS TCPIP_MSG_TIMEOUT, TCPIP_MSG_UNTIMEOUT, @@ -123,6 +129,7 @@ enum tcpip_msg_type { struct tcpip_msg { enum tcpip_msg_type type; union { +#if !LWIP_TCPIP_CORE_LOCKING struct { tcpip_callback_fn function; void* msg; @@ -132,11 +139,14 @@ struct tcpip_msg { struct tcpip_api_call_data *arg; sys_sem_t *sem; } api_call; +#endif /* LWIP_TCPIP_CORE_LOCKING */ +#if !LWIP_TCPIP_CORE_LOCKING_INPUT struct { struct pbuf *p; struct netif *netif; netif_input_fn input_fn; } inp; +#endif /* !LWIP_TCPIP_CORE_LOCKING_INPUT */ struct { tcpip_callback_fn function; void *ctx; diff --git a/Libraries/LwIP/src/include/lwip/prot/dhcp.h b/Libraries/LwIP/src/include/lwip/prot/dhcp.h index 30f87b9..6d16ce3 100755 --- a/Libraries/LwIP/src/include/lwip/prot/dhcp.h +++ b/Libraries/LwIP/src/include/lwip/prot/dhcp.h @@ -39,15 +39,13 @@ #define LWIP_HDR_PROT_DHCP_H #include "lwip/opt.h" +#include "lwip/arch.h" +#include "lwip/prot/ip4.h" #ifdef __cplusplus extern "C" { #endif -#define DHCP_CLIENT_PORT 68 -#define DHCP_SERVER_PORT 67 - - /* DHCP message item offsets and length */ #define DHCP_CHADDR_LEN 16U #define DHCP_SNAME_OFS 44U @@ -128,9 +126,6 @@ typedef enum { #define DHCP_RELEASE 7 #define DHCP_INFORM 8 -/** DHCP hardware type, currently only ethernet is supported */ -#define DHCP_HTYPE_ETH 1 - #define DHCP_MAGIC_COOKIE 0x63825363UL /* This is a list of options for BOOTP and DHCP, see RFC 2132 for descriptions */ @@ -180,4 +175,4 @@ typedef enum { } #endif -#endif /*LWIP_HDR_PROT_DHCP_H*/ +#endif /* LWIP_HDR_PROT_DHCP_H */ diff --git a/Libraries/LwIP/src/include/lwip/prot/dhcp6.h b/Libraries/LwIP/src/include/lwip/prot/dhcp6.h new file mode 100644 index 0000000..0754c91 --- /dev/null +++ b/Libraries/LwIP/src/include/lwip/prot/dhcp6.h @@ -0,0 +1,138 @@ +/** + * @file + * DHCPv6 protocol definitions + */ + +/* + * Copyright (c) 2017 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ +#ifndef LWIP_HDR_PROT_DHCP6_H +#define LWIP_HDR_PROT_DHCP6_H + +#include "lwip/opt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define DHCP6_CLIENT_PORT 546 +#define DHCP6_SERVER_PORT 547 + + + /* DHCPv6 message item offsets and length */ +#define DHCP6_TRANSACTION_ID_LEN 3 + +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +/** minimum set of fields of any DHCPv6 message */ +struct dhcp6_msg +{ + PACK_STRUCT_FLD_8(u8_t msgtype); + PACK_STRUCT_FLD_8(u8_t transaction_id[DHCP6_TRANSACTION_ID_LEN]); + /* options follow */ +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + + +/* DHCP6 client states */ +typedef enum { + DHCP6_STATE_OFF = 0, + DHCP6_STATE_STATELESS_IDLE = 1, + DHCP6_STATE_REQUESTING_CONFIG = 2 +} dhcp6_state_enum_t; + +/* DHCPv6 message types */ +#define DHCP6_SOLICIT 1 +#define DHCP6_ADVERTISE 2 +#define DHCP6_REQUEST 3 +#define DHCP6_CONFIRM 4 +#define DHCP6_RENEW 5 +#define DHCP6_REBIND 6 +#define DHCP6_REPLY 7 +#define DHCP6_RELEASE 8 +#define DHCP6_DECLINE 9 +#define DHCP6_RECONFIGURE 10 +#define DHCP6_INFOREQUEST 11 +#define DHCP6_RELAYFORW 12 +#define DHCP6_RELAYREPL 13 +/* More message types see https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml */ + +/** DHCPv6 status codes */ +#define DHCP6_STATUS_SUCCESS 0 /* Success. */ +#define DHCP6_STATUS_UNSPECFAIL 1 /* Failure, reason unspecified; this status code is sent by either a client or a server to indicate a failure not explicitly specified in this document. */ +#define DHCP6_STATUS_NOADDRSAVAIL 2 /* Server has no addresses available to assign to the IA(s). */ +#define DHCP6_STATUS_NOBINDING 3 /* Client record (binding) unavailable. */ +#define DHCP6_STATUS_NOTONLINK 4 /* The prefix for the address is not appropriate for the link to which the client is attached. */ +#define DHCP6_STATUS_USEMULTICAST 5 /* Sent by a server to a client to force the client to send messages to the server using the All_DHCP_Relay_Agents_and_Servers address. */ +/* More status codes see https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml */ + +/** DHCPv6 DUID types */ +#define DHCP6_DUID_LLT 1 /* LLT: Link-layer Address Plus Time */ +#define DHCP6_DUID_EN 2 /* EN: Enterprise number */ +#define DHCP6_DUID_LL 3 /* LL: Link-layer Address */ +#define DHCP6_DUID_UUID 4 /* UUID (RFC 6355) */ + +/* DHCPv6 options */ +#define DHCP6_OPTION_CLIENTID 1 +#define DHCP6_OPTION_SERVERID 2 +#define DHCP6_OPTION_IA_NA 3 +#define DHCP6_OPTION_IA_TA 4 +#define DHCP6_OPTION_IAADDR 5 +#define DHCP6_OPTION_ORO 6 +#define DHCP6_OPTION_PREFERENCE 7 +#define DHCP6_OPTION_ELAPSED_TIME 8 +#define DHCP6_OPTION_RELAY_MSG 9 +#define DHCP6_OPTION_AUTH 11 +#define DHCP6_OPTION_UNICAST 12 +#define DHCP6_OPTION_STATUS_CODE 13 +#define DHCP6_OPTION_RAPID_COMMIT 14 +#define DHCP6_OPTION_USER_CLASS 15 +#define DHCP6_OPTION_VENDOR_CLASS 16 +#define DHCP6_OPTION_VENDOR_OPTS 17 +#define DHCP6_OPTION_INTERFACE_ID 18 +#define DHCP6_OPTION_RECONF_MSG 19 +#define DHCP6_OPTION_RECONF_ACCEPT 20 +/* More options see https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml */ +#define DHCP6_OPTION_DNS_SERVERS 23 /* RFC 3646 */ +#define DHCP6_OPTION_DOMAIN_LIST 24 /* RFC 3646 */ +#define DHCP6_OPTION_SNTP_SERVERS 31 /* RFC 4075 */ + + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_PROT_DHCP6_H */ diff --git a/Libraries/LwIP/src/include/lwip/prot/etharp.h b/Libraries/LwIP/src/include/lwip/prot/etharp.h index 175e6bc..9e4b02c 100755 --- a/Libraries/LwIP/src/include/lwip/prot/etharp.h +++ b/Libraries/LwIP/src/include/lwip/prot/etharp.h @@ -39,7 +39,6 @@ #include "lwip/arch.h" #include "lwip/prot/ethernet.h" -#include "lwip/ip4_addr.h" #ifdef __cplusplus extern "C" { @@ -49,6 +48,36 @@ extern "C" { #define ETHARP_HWADDR_LEN ETH_HWADDR_LEN #endif +/** + * struct ip4_addr_wordaligned is used in the definition of the ARP packet format in + * order to support compilers that don't have structure packing. + */ +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct ip4_addr_wordaligned { + PACK_STRUCT_FIELD(u16_t addrw[2]); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +/** MEMCPY-like copying of IP addresses where addresses are known to be + * 16-bit-aligned if the port is correctly configured (so a port could define + * this to copying 2 u16_t's) - no NULL-pointer-checking needed. */ +#ifndef IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T +#define IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T(dest, src) SMEMCPY(dest, src, sizeof(ip4_addr_t)) +#endif + + /** MEMCPY-like copying of IP addresses where addresses are known to be + * 16-bit-aligned if the port is correctly configured (so a port could define + * this to copying 2 u16_t's) - no NULL-pointer-checking needed. */ +#ifndef IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T +#define IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T(dest, src) SMEMCPY(dest, src, sizeof(ip4_addr_t)) +#endif + #ifdef PACK_STRUCT_USE_INCLUDES # include "arch/bpstruct.h" #endif @@ -61,9 +90,9 @@ struct etharp_hdr { PACK_STRUCT_FLD_8(u8_t protolen); PACK_STRUCT_FIELD(u16_t opcode); PACK_STRUCT_FLD_S(struct eth_addr shwaddr); - PACK_STRUCT_FLD_S(struct ip4_addr2 sipaddr); + PACK_STRUCT_FLD_S(struct ip4_addr_wordaligned sipaddr); PACK_STRUCT_FLD_S(struct eth_addr dhwaddr); - PACK_STRUCT_FLD_S(struct ip4_addr2 dipaddr); + PACK_STRUCT_FLD_S(struct ip4_addr_wordaligned dipaddr); } PACK_STRUCT_STRUCT; PACK_STRUCT_END #ifdef PACK_STRUCT_USE_INCLUDES @@ -72,12 +101,6 @@ PACK_STRUCT_END #define SIZEOF_ETHARP_HDR 28 -/* ARP hwtype values */ -enum etharp_hwtype { - HWTYPE_ETHERNET = 1 - /* others not used */ -}; - /* ARP message types (opcodes) */ enum etharp_opcode { ARP_REQUEST = 1, diff --git a/Libraries/LwIP/src/include/lwip/prot/ethernet.h b/Libraries/LwIP/src/include/lwip/prot/ethernet.h index 33dbe33..fef49e2 100755 --- a/Libraries/LwIP/src/include/lwip/prot/ethernet.h +++ b/Libraries/LwIP/src/include/lwip/prot/ethernet.h @@ -38,6 +38,7 @@ #define LWIP_HDR_PROT_ETHERNET_H #include "lwip/arch.h" +#include "lwip/prot/ieee.h" #ifdef __cplusplus extern "C" { @@ -55,6 +56,7 @@ extern "C" { # include "arch/bpstruct.h" #endif PACK_STRUCT_BEGIN +/** An Ethernet MAC address */ struct eth_addr { PACK_STRUCT_FLD_8(u8_t addr[ETH_HWADDR_LEN]); } PACK_STRUCT_STRUCT; @@ -63,6 +65,9 @@ PACK_STRUCT_END # include "arch/epstruct.h" #endif +/** Initialize a struct eth_addr with its 6 bytes (takes care of correct braces) */ +#define ETH_ADDR(b0, b1, b2, b3, b4, b5) {{b0, b1, b2, b3, b4, b5}} + #ifdef PACK_STRUCT_USE_INCLUDES # include "arch/bpstruct.h" #endif @@ -102,44 +107,6 @@ PACK_STRUCT_END #define SIZEOF_VLAN_HDR 4 #define VLAN_ID(vlan_hdr) (lwip_htons((vlan_hdr)->prio_vid) & 0xFFF) -/** - * @ingroup ethernet - * A list of often ethtypes (although lwIP does not use all of them): */ -enum eth_type { - /** Internet protocol v4 */ - ETHTYPE_IP = 0x0800U, - /** Address resolution protocol */ - ETHTYPE_ARP = 0x0806U, - /** Wake on lan */ - ETHTYPE_WOL = 0x0842U, - /** RARP */ - ETHTYPE_RARP = 0x8035U, - /** Virtual local area network */ - ETHTYPE_VLAN = 0x8100U, - /** Internet protocol v6 */ - ETHTYPE_IPV6 = 0x86DDU, - /** PPP Over Ethernet Discovery Stage */ - ETHTYPE_PPPOEDISC = 0x8863U, - /** PPP Over Ethernet Session Stage */ - ETHTYPE_PPPOE = 0x8864U, - /** Jumbo Frames */ - ETHTYPE_JUMBO = 0x8870U, - /** Process field network */ - ETHTYPE_PROFINET = 0x8892U, - /** Ethernet for control automation technology */ - ETHTYPE_ETHERCAT = 0x88A4U, - /** Link layer discovery protocol */ - ETHTYPE_LLDP = 0x88CCU, - /** Serial real-time communication system */ - ETHTYPE_SERCOS = 0x88CDU, - /** Media redundancy protocol */ - ETHTYPE_MRP = 0x88E3U, - /** Precision time protocol */ - ETHTYPE_PTP = 0x88F7U, - /** Q-in-Q, 802.1ad */ - ETHTYPE_QINQ = 0x9100U -}; - /** The 24-bit IANA IPv4-multicast OUI is 01-00-5e: */ #define LL_IP4_MULTICAST_ADDR_0 0x01 #define LL_IP4_MULTICAST_ADDR_1 0x00 @@ -149,18 +116,6 @@ enum eth_type { #define LL_IP6_MULTICAST_ADDR_0 0x33 #define LL_IP6_MULTICAST_ADDR_1 0x33 -/** MEMCPY-like macro to copy to/from struct eth_addr's that are local variables - * or known to be 32-bit aligned within the protocol header. */ -#ifndef ETHADDR32_COPY -#define ETHADDR32_COPY(dst, src) SMEMCPY(dst, src, ETH_HWADDR_LEN) -#endif - -/** MEMCPY-like macro to copy to/from struct eth_addr's that are no local - * variables and known to be 16-bit aligned within the protocol header. */ -#ifndef ETHADDR16_COPY -#define ETHADDR16_COPY(dst, src) SMEMCPY(dst, src, ETH_HWADDR_LEN) -#endif - #define eth_addr_cmp(addr1, addr2) (memcmp((addr1)->addr, (addr2)->addr, ETH_HWADDR_LEN) == 0) #ifdef __cplusplus diff --git a/Libraries/LwIP/src/include/lwip/prot/iana.h b/Libraries/LwIP/src/include/lwip/prot/iana.h new file mode 100644 index 0000000..32890cc --- /dev/null +++ b/Libraries/LwIP/src/include/lwip/prot/iana.h @@ -0,0 +1,97 @@ +/** + * @file + * IANA assigned numbers (RFC 1700 and successors) + * + * @defgroup iana IANA assigned numbers + * @ingroup infrastructure + */ + +/* + * Copyright (c) 2017 Dirk Ziegelmeier. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Dirk Ziegelmeier + * + */ + +#ifndef LWIP_HDR_PROT_IANA_H +#define LWIP_HDR_PROT_IANA_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @ingroup iana + * Hardware types + */ +enum lwip_iana_hwtype { + /** Ethernet */ + LWIP_IANA_HWTYPE_ETHERNET = 1 +}; + +/** + * @ingroup iana + * Port numbers + * https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.txt + */ +enum lwip_iana_port_number { + /** SMTP */ + LWIP_IANA_PORT_SMTP = 25, + /** DHCP server */ + LWIP_IANA_PORT_DHCP_SERVER = 67, + /** DHCP client */ + LWIP_IANA_PORT_DHCP_CLIENT = 68, + /** TFTP */ + LWIP_IANA_PORT_TFTP = 69, + /** HTTP */ + LWIP_IANA_PORT_HTTP = 80, + /** SNTP */ + LWIP_IANA_PORT_SNTP = 123, + /** NETBIOS */ + LWIP_IANA_PORT_NETBIOS = 137, + /** SNMP */ + LWIP_IANA_PORT_SNMP = 161, + /** SNMP traps */ + LWIP_IANA_PORT_SNMP_TRAP = 162, + /** HTTPS */ + LWIP_IANA_PORT_HTTPS = 443, + /** SMTPS */ + LWIP_IANA_PORT_SMTPS = 465, + /** MQTT */ + LWIP_IANA_PORT_MQTT = 1883, + /** MDNS */ + LWIP_IANA_PORT_MDNS = 5353, + /** Secure MQTT */ + LWIP_IANA_PORT_SECURE_MQTT = 8883 +}; + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_PROT_IANA_H */ diff --git a/Libraries/LwIP/src/include/lwip/prot/ieee.h b/Libraries/LwIP/src/include/lwip/prot/ieee.h new file mode 100644 index 0000000..abbb9e3 --- /dev/null +++ b/Libraries/LwIP/src/include/lwip/prot/ieee.h @@ -0,0 +1,91 @@ +/** + * @file + * IEEE assigned numbers + * + * @defgroup ieee IEEE assigned numbers + * @ingroup infrastructure + */ + +/* + * Copyright (c) 2017 Dirk Ziegelmeier. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Dirk Ziegelmeier + * + */ + +#ifndef LWIP_HDR_PROT_IEEE_H +#define LWIP_HDR_PROT_IEEE_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @ingroup ieee + * A list of often ethtypes (although lwIP does not use all of them). + */ +enum lwip_ieee_eth_type { + /** Internet protocol v4 */ + ETHTYPE_IP = 0x0800U, + /** Address resolution protocol */ + ETHTYPE_ARP = 0x0806U, + /** Wake on lan */ + ETHTYPE_WOL = 0x0842U, + /** RARP */ + ETHTYPE_RARP = 0x8035U, + /** Virtual local area network */ + ETHTYPE_VLAN = 0x8100U, + /** Internet protocol v6 */ + ETHTYPE_IPV6 = 0x86DDU, + /** PPP Over Ethernet Discovery Stage */ + ETHTYPE_PPPOEDISC = 0x8863U, + /** PPP Over Ethernet Session Stage */ + ETHTYPE_PPPOE = 0x8864U, + /** Jumbo Frames */ + ETHTYPE_JUMBO = 0x8870U, + /** Process field network */ + ETHTYPE_PROFINET = 0x8892U, + /** Ethernet for control automation technology */ + ETHTYPE_ETHERCAT = 0x88A4U, + /** Link layer discovery protocol */ + ETHTYPE_LLDP = 0x88CCU, + /** Serial real-time communication system */ + ETHTYPE_SERCOS = 0x88CDU, + /** Media redundancy protocol */ + ETHTYPE_MRP = 0x88E3U, + /** Precision time protocol */ + ETHTYPE_PTP = 0x88F7U, + /** Q-in-Q, 802.1ad */ + ETHTYPE_QINQ = 0x9100U +}; + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_PROT_IEEE_H */ diff --git a/Libraries/LwIP/src/include/lwip/prot/igmp.h b/Libraries/LwIP/src/include/lwip/prot/igmp.h index 73bc27c..41e4e67 100755 --- a/Libraries/LwIP/src/include/lwip/prot/igmp.h +++ b/Libraries/LwIP/src/include/lwip/prot/igmp.h @@ -38,7 +38,7 @@ #define LWIP_HDR_PROT_IGMP_H #include "lwip/arch.h" -#include "lwip/ip4_addr.h" +#include "lwip/prot/ip4.h" #ifdef __cplusplus extern "C" { diff --git a/Libraries/LwIP/src/include/lwip/prot/ip.h b/Libraries/LwIP/src/include/lwip/prot/ip.h index 077c93b..3ce496c 100755 --- a/Libraries/LwIP/src/include/lwip/prot/ip.h +++ b/Libraries/LwIP/src/include/lwip/prot/ip.h @@ -39,6 +39,10 @@ #include "lwip/arch.h" +#ifdef __cplusplus +extern "C" { +#endif + #define IP_PROTO_ICMP 1 #define IP_PROTO_IGMP 2 #define IP_PROTO_UDP 17 @@ -48,4 +52,8 @@ /** This operates on a void* by loading the first byte */ #define IP_HDR_GET_VERSION(ptr) ((*(u8_t*)(ptr)) >> 4) +#ifdef __cplusplus +} +#endif + #endif /* LWIP_HDR_PROT_IP_H */ diff --git a/Libraries/LwIP/src/include/lwip/prot/ip4.h b/Libraries/LwIP/src/include/lwip/prot/ip4.h index e791a06..4635a7a 100755 --- a/Libraries/LwIP/src/include/lwip/prot/ip4.h +++ b/Libraries/LwIP/src/include/lwip/prot/ip4.h @@ -62,6 +62,8 @@ typedef struct ip4_addr_packed ip4_addr_p_t; /* Size of the IPv4 header. Same as 'sizeof(struct ip_hdr)'. */ #define IP_HLEN 20 +/* Maximum size of the IPv4 header with options. */ +#define IP_HLEN_MAX 60 #ifdef PACK_STRUCT_USE_INCLUDES # include "arch/bpstruct.h" @@ -101,10 +103,12 @@ PACK_STRUCT_END /* Macros to get struct ip_hdr fields: */ #define IPH_V(hdr) ((hdr)->_v_hl >> 4) #define IPH_HL(hdr) ((hdr)->_v_hl & 0x0f) +#define IPH_HL_BYTES(hdr) ((u8_t)(IPH_HL(hdr) * 4)) #define IPH_TOS(hdr) ((hdr)->_tos) #define IPH_LEN(hdr) ((hdr)->_len) #define IPH_ID(hdr) ((hdr)->_id) #define IPH_OFFSET(hdr) ((hdr)->_offset) +#define IPH_OFFSET_BYTES(hdr) ((u16_t)((lwip_ntohs(IPH_OFFSET(hdr)) & IP_OFFMASK) * 8U)) #define IPH_TTL(hdr) ((hdr)->_ttl) #define IPH_PROTO(hdr) ((hdr)->_proto) #define IPH_CHKSUM(hdr) ((hdr)->_chksum) diff --git a/Libraries/LwIP/src/include/lwip/prot/ip6.h b/Libraries/LwIP/src/include/lwip/prot/ip6.h index 066bdb2..272d6ce 100755 --- a/Libraries/LwIP/src/include/lwip/prot/ip6.h +++ b/Libraries/LwIP/src/include/lwip/prot/ip6.h @@ -43,7 +43,7 @@ #ifdef __cplusplus extern "C" { #endif - + /** This is the packed version of ip6_addr_t, used in network headers that are itself packed */ #ifdef PACK_STRUCT_USE_INCLUDES @@ -94,13 +94,50 @@ PACK_STRUCT_END #ifdef PACK_STRUCT_USE_INCLUDES # include "arch/epstruct.h" #endif +#define IP6H_V(hdr) ((lwip_ntohl((hdr)->_v_tc_fl) >> 28) & 0x0f) +#define IP6H_TC(hdr) ((lwip_ntohl((hdr)->_v_tc_fl) >> 20) & 0xff) +#define IP6H_FL(hdr) (lwip_ntohl((hdr)->_v_tc_fl) & 0x000fffff) +#define IP6H_PLEN(hdr) (lwip_ntohs((hdr)->_plen)) +#define IP6H_NEXTH(hdr) ((hdr)->_nexth) +#define IP6H_NEXTH_P(hdr) ((u8_t *)(hdr) + 6) +#define IP6H_HOPLIM(hdr) ((hdr)->_hoplim) +#define IP6H_VTCFL_SET(hdr, v, tc, fl) (hdr)->_v_tc_fl = (lwip_htonl((((u32_t)(v)) << 28) | (((u32_t)(tc)) << 20) | (fl))) +#define IP6H_PLEN_SET(hdr, plen) (hdr)->_plen = lwip_htons(plen) +#define IP6H_NEXTH_SET(hdr, nexth) (hdr)->_nexth = (nexth) +#define IP6H_HOPLIM_SET(hdr, hl) (hdr)->_hoplim = (u8_t)(hl) + +/* ipv6 extended options header */ +#define IP6_PAD1_OPTION 0 +#define IP6_PADN_OPTION 1 +#define IP6_ROUTER_ALERT_OPTION 5 +#define IP6_JUMBO_OPTION 194 +#define IP6_HOME_ADDRESS_OPTION 201 +#define IP6_ROUTER_ALERT_DLEN 2 +#define IP6_ROUTER_ALERT_VALUE_MLD 0 + +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct ip6_opt_hdr { + /* router alert option type */ + PACK_STRUCT_FLD_8(u8_t _opt_type); + /* router alert option data len */ + PACK_STRUCT_FLD_8(u8_t _opt_dlen); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif +#define IP6_OPT_HLEN 2 +#define IP6_OPT_TYPE_ACTION(hdr) ((((hdr)->_opt_type) >> 6) & 0x3) +#define IP6_OPT_TYPE_CHANGE(hdr) ((((hdr)->_opt_type) >> 5) & 0x1) +#define IP6_OPT_TYPE(hdr) ((hdr)->_opt_type) +#define IP6_OPT_DLEN(hdr) ((hdr)->_opt_dlen) + +/* Hop-by-Hop header. */ +#define IP6_HBH_HLEN 2 -/* Hop-by-hop router alert option. */ -#define IP6_HBH_HLEN 8 -#define IP6_PAD1_OPTION 0 -#define IP6_PADN_ALERT_OPTION 1 -#define IP6_ROUTER_ALERT_OPTION 5 -#define IP6_ROUTER_ALERT_VALUE_MLD 0 #ifdef PACK_STRUCT_USE_INCLUDES # include "arch/bpstruct.h" #endif @@ -108,28 +145,65 @@ PACK_STRUCT_BEGIN struct ip6_hbh_hdr { /* next header */ PACK_STRUCT_FLD_8(u8_t _nexth); - /* header length */ + /* header length in 8-octet units */ PACK_STRUCT_FLD_8(u8_t _hlen); - /* router alert option type */ - PACK_STRUCT_FLD_8(u8_t _ra_opt_type); - /* router alert option data len */ - PACK_STRUCT_FLD_8(u8_t _ra_opt_dlen); - /* router alert option data */ - PACK_STRUCT_FIELD(u16_t _ra_opt_data); - /* PadN option type */ - PACK_STRUCT_FLD_8(u8_t _padn_opt_type); - /* PadN option data len */ - PACK_STRUCT_FLD_8(u8_t _padn_opt_dlen); } PACK_STRUCT_STRUCT; PACK_STRUCT_END #ifdef PACK_STRUCT_USE_INCLUDES # include "arch/epstruct.h" #endif +#define IP6_HBH_NEXTH(hdr) ((hdr)->_nexth) + +/* Destination header. */ +#define IP6_DEST_HLEN 2 + +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct ip6_dest_hdr { + /* next header */ + PACK_STRUCT_FLD_8(u8_t _nexth); + /* header length in 8-octet units */ + PACK_STRUCT_FLD_8(u8_t _hlen); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif +#define IP6_DEST_NEXTH(hdr) ((hdr)->_nexth) + +/* Routing header */ +#define IP6_ROUT_TYPE2 2 +#define IP6_ROUT_RPL 3 + +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct ip6_rout_hdr { + /* next header */ + PACK_STRUCT_FLD_8(u8_t _nexth); + /* reserved */ + PACK_STRUCT_FLD_8(u8_t _hlen); + /* fragment offset */ + PACK_STRUCT_FIELD(u8_t _routing_type); + /* fragmented packet identification */ + PACK_STRUCT_FIELD(u8_t _segments_left); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif +#define IP6_ROUT_NEXTH(hdr) ((hdr)->_nexth) +#define IP6_ROUT_TYPE(hdr) ((hdr)->_routing_type) +#define IP6_ROUT_SEG_LEFT(hdr) ((hdr)->_segments_left) /* Fragment header. */ #define IP6_FRAG_HLEN 8 #define IP6_FRAG_OFFSET_MASK 0xfff8 #define IP6_FRAG_MORE_FLAG 0x0001 + #ifdef PACK_STRUCT_USE_INCLUDES # include "arch/bpstruct.h" #endif @@ -148,19 +222,9 @@ PACK_STRUCT_END #ifdef PACK_STRUCT_USE_INCLUDES # include "arch/epstruct.h" #endif - -#define IP6H_V(hdr) ((lwip_ntohl((hdr)->_v_tc_fl) >> 28) & 0x0f) -#define IP6H_TC(hdr) ((lwip_ntohl((hdr)->_v_tc_fl) >> 20) & 0xff) -#define IP6H_FL(hdr) (lwip_ntohl((hdr)->_v_tc_fl) & 0x000fffff) -#define IP6H_PLEN(hdr) (lwip_ntohs((hdr)->_plen)) -#define IP6H_NEXTH(hdr) ((hdr)->_nexth) -#define IP6H_NEXTH_P(hdr) ((u8_t *)(hdr) + 6) -#define IP6H_HOPLIM(hdr) ((hdr)->_hoplim) - -#define IP6H_VTCFL_SET(hdr, v, tc, fl) (hdr)->_v_tc_fl = (lwip_htonl((((u32_t)(v)) << 28) | (((u32_t)(tc)) << 20) | (fl))) -#define IP6H_PLEN_SET(hdr, plen) (hdr)->_plen = lwip_htons(plen) -#define IP6H_NEXTH_SET(hdr, nexth) (hdr)->_nexth = (nexth) -#define IP6H_HOPLIM_SET(hdr, hl) (hdr)->_hoplim = (u8_t)(hl) +#define IP6_FRAG_NEXTH(hdr) ((hdr)->_nexth) +#define IP6_FRAG_MBIT(hdr) (lwip_ntohs((hdr)->_fragment_offset) & 0x1) +#define IP6_FRAG_ID(hdr) (lwip_ntohl((hdr)->_identification)) #ifdef __cplusplus } diff --git a/Libraries/LwIP/src/include/lwip/prot/mld6.h b/Libraries/LwIP/src/include/lwip/prot/mld6.h index 8989a57..27a63bf 100755 --- a/Libraries/LwIP/src/include/lwip/prot/mld6.h +++ b/Libraries/LwIP/src/include/lwip/prot/mld6.h @@ -44,6 +44,7 @@ extern "C" { #endif +#define MLD6_HBH_HLEN 8 /** Multicast listener report/query/done message header. */ #ifdef PACK_STRUCT_USE_INCLUDES # include "arch/bpstruct.h" diff --git a/Libraries/LwIP/src/include/lwip/prot/nd6.h b/Libraries/LwIP/src/include/lwip/prot/nd6.h index e6999df..af87e29 100755 --- a/Libraries/LwIP/src/include/lwip/prot/nd6.h +++ b/Libraries/LwIP/src/include/lwip/prot/nd6.h @@ -248,11 +248,6 @@ PACK_STRUCT_END #endif /** Recursive DNS Server Option. */ -#if LWIP_ND6_RDNSS_MAX_DNS_SERVERS -#define LWIP_RDNSS_OPTION_MAX_SERVERS LWIP_ND6_RDNSS_MAX_DNS_SERVERS -#else -#define LWIP_RDNSS_OPTION_MAX_SERVERS 1 -#endif #define ND6_OPTION_TYPE_RDNSS (25) #ifdef PACK_STRUCT_USE_INCLUDES # include "arch/bpstruct.h" @@ -263,13 +258,15 @@ struct rdnss_option { PACK_STRUCT_FLD_8(u8_t length); PACK_STRUCT_FIELD(u16_t reserved); PACK_STRUCT_FIELD(u32_t lifetime); - PACK_STRUCT_FLD_S(ip6_addr_p_t rdnss_address[LWIP_RDNSS_OPTION_MAX_SERVERS]); + PACK_STRUCT_FLD_S(ip6_addr_p_t rdnss_address[1]); } PACK_STRUCT_STRUCT; PACK_STRUCT_END #ifdef PACK_STRUCT_USE_INCLUDES # include "arch/epstruct.h" #endif +#define SIZEOF_RDNSS_OPTION_BASE 8 /* size without addresses */ + #ifdef __cplusplus } #endif diff --git a/Libraries/LwIP/src/include/lwip/prot/tcp.h b/Libraries/LwIP/src/include/lwip/prot/tcp.h index 0951d11..f5a3dc8 100755 --- a/Libraries/LwIP/src/include/lwip/prot/tcp.h +++ b/Libraries/LwIP/src/include/lwip/prot/tcp.h @@ -80,8 +80,11 @@ PACK_STRUCT_END /* Valid TCP header flags */ #define TCP_FLAGS 0x3fU +#define TCP_MAX_OPTION_BYTES 40 + #define TCPH_HDRLEN(phdr) ((u16_t)(lwip_ntohs((phdr)->_hdrlen_rsvd_flags) >> 12)) -#define TCPH_FLAGS(phdr) ((u16_t)(lwip_ntohs((phdr)->_hdrlen_rsvd_flags) & TCP_FLAGS)) +#define TCPH_HDRLEN_BYTES(phdr) ((u8_t)(TCPH_HDRLEN(phdr) << 2)) +#define TCPH_FLAGS(phdr) ((u8_t)((lwip_ntohs((phdr)->_hdrlen_rsvd_flags) & TCP_FLAGS))) #define TCPH_HDRLEN_SET(phdr, len) (phdr)->_hdrlen_rsvd_flags = lwip_htons(((len) << 12) | TCPH_FLAGS(phdr)) #define TCPH_FLAGS_SET(phdr, flags) (phdr)->_hdrlen_rsvd_flags = (((phdr)->_hdrlen_rsvd_flags & PP_HTONS(~TCP_FLAGS)) | lwip_htons(flags)) diff --git a/Libraries/LwIP/src/include/lwip/raw.h b/Libraries/LwIP/src/include/lwip/raw.h index 9f37a0f..1be1273 100755 --- a/Libraries/LwIP/src/include/lwip/raw.h +++ b/Libraries/LwIP/src/include/lwip/raw.h @@ -52,6 +52,10 @@ extern "C" { #endif +#define RAW_FLAGS_CONNECTED 0x01U +#define RAW_FLAGS_HDRINCL 0x02U +#define RAW_FLAGS_MULTICAST_LOOP 0x04U + struct raw_pcb; /** Function prototype for raw pcb receive callback functions. @@ -75,6 +79,14 @@ struct raw_pcb { struct raw_pcb *next; u8_t protocol; + u8_t flags; + +#if LWIP_MULTICAST_TX_OPTIONS + /** outgoing network interface for multicast packets, by interface index (if nonzero) */ + u8_t mcast_ifindex; + /** TTL for outgoing multicast packets */ + u8_t mcast_ttl; +#endif /* LWIP_MULTICAST_TX_OPTIONS */ /** receive callback function */ raw_recv_fn recv; @@ -93,22 +105,35 @@ struct raw_pcb * raw_new (u8_t proto); struct raw_pcb * raw_new_ip_type(u8_t type, u8_t proto); void raw_remove (struct raw_pcb *pcb); err_t raw_bind (struct raw_pcb *pcb, const ip_addr_t *ipaddr); +void raw_bind_netif (struct raw_pcb *pcb, const struct netif *netif); err_t raw_connect (struct raw_pcb *pcb, const ip_addr_t *ipaddr); +void raw_disconnect (struct raw_pcb *pcb); err_t raw_sendto (struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *ipaddr); +err_t raw_sendto_if_src(struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, struct netif *netif, const ip_addr_t *src_ip); err_t raw_send (struct raw_pcb *pcb, struct pbuf *p); void raw_recv (struct raw_pcb *pcb, raw_recv_fn recv, void *recv_arg); -/* The following functions are the lower layer interface to RAW. */ -u8_t raw_input (struct pbuf *p, struct netif *inp); -#define raw_init() /* Compatibility define, no init needed. */ +#define raw_flags(pcb) ((pcb)->flags) +#define raw_setflags(pcb,f) ((pcb)->flags = (f)) -void raw_netif_ip_addr_changed(const ip_addr_t* old_addr, const ip_addr_t* new_addr); +#define raw_set_flags(pcb, set_flags) do { (pcb)->flags = (u8_t)((pcb)->flags | (set_flags)); } while(0) +#define raw_clear_flags(pcb, clr_flags) do { (pcb)->flags = (u8_t)((pcb)->flags & (u8_t)(~(clr_flags) & 0xff)); } while(0) +#define raw_is_flag_set(pcb, flag) (((pcb)->flags & (flag)) != 0) + +#define raw_init() /* Compatibility define, no init needed. */ /* for compatibility with older implementation */ #define raw_new_ip6(proto) raw_new_ip_type(IPADDR_TYPE_V6, proto) +#if LWIP_MULTICAST_TX_OPTIONS +#define raw_set_multicast_netif_index(pcb, idx) ((pcb)->mcast_ifindex = (idx)) +#define raw_get_multicast_netif_index(pcb) ((pcb)->mcast_ifindex) +#define raw_set_multicast_ttl(pcb, value) ((pcb)->mcast_ttl = (value)) +#define raw_get_multicast_ttl(pcb) ((pcb)->mcast_ttl) +#endif /* LWIP_MULTICAST_TX_OPTIONS */ + #ifdef __cplusplus } #endif diff --git a/Libraries/LwIP/src/include/lwip/sockets.h b/Libraries/LwIP/src/include/lwip/sockets.h index ab33292..f448591 100755 --- a/Libraries/LwIP/src/include/lwip/sockets.h +++ b/Libraries/LwIP/src/include/lwip/sockets.h @@ -44,10 +44,13 @@ #if LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */ #include "lwip/ip_addr.h" +#include "lwip/netif.h" #include "lwip/err.h" #include "lwip/inet.h" #include "lwip/errno.h" +#include + #ifdef __cplusplus extern "C" { #endif @@ -108,39 +111,11 @@ struct sockaddr_storage { typedef u32_t socklen_t; #endif -struct lwip_sock; - -#if !LWIP_TCPIP_CORE_LOCKING -/** Maximum optlen used by setsockopt/getsockopt */ -#define LWIP_SETGETSOCKOPT_MAXOPTLEN 16 - -/** This struct is used to pass data to the set/getsockopt_internal - * functions running in tcpip_thread context (only a void* is allowed) */ -struct lwip_setgetsockopt_data { - /** socket index for which to change options */ - int s; - /** level of the option to process */ - int level; - /** name of the option to process */ - int optname; - /** set: value to set the option to - * get: value of the option is stored here */ -#if LWIP_MPU_COMPATIBLE - u8_t optval[LWIP_SETGETSOCKOPT_MAXOPTLEN]; -#else - union { - void *p; - const void *pc; - } optval; -#endif - /** size of *optval */ - socklen_t optlen; - /** if an error occurs, it is temporarily stored here */ - err_t err; - /** semaphore to wake up the calling task */ - void* completed_sem; -}; -#endif /* !LWIP_TCPIP_CORE_LOCKING */ +#if !defined IOV_MAX +#define IOV_MAX 0xFFFF +#elif IOV_MAX > 0xFFFF +#error "IOV_MAX larger than supported by LwIP" +#endif /* IOV_MAX */ #if !defined(iovec) struct iovec { @@ -159,6 +134,56 @@ struct msghdr { int msg_flags; }; +/* struct msghdr->msg_flags bit field values */ +#define MSG_TRUNC 0x04 +#define MSG_CTRUNC 0x08 + +/* RFC 3542, Section 20: Ancillary Data */ +struct cmsghdr { + socklen_t cmsg_len; /* number of bytes, including header */ + int cmsg_level; /* originating protocol */ + int cmsg_type; /* protocol-specific type */ +}; +/* Data section follows header and possible padding, typically referred to as + unsigned char cmsg_data[]; */ + +/* cmsg header/data alignment. NOTE: we align to native word size (double word +size on 16-bit arch) so structures are not placed at an unaligned address. +16-bit arch needs double word to ensure 32-bit alignment because socklen_t +could be 32 bits. If we ever have cmsg data with a 64-bit variable, alignment +will need to increase long long */ +#define ALIGN_H(size) (((size) + sizeof(long) - 1U) & ~(sizeof(long)-1U)) +#define ALIGN_D(size) ALIGN_H(size) + +#define CMSG_FIRSTHDR(mhdr) \ + ((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \ + (struct cmsghdr *)(mhdr)->msg_control : \ + (struct cmsghdr *)NULL) + +#define CMSG_NXTHDR(mhdr, cmsg) \ + (((cmsg) == NULL) ? CMSG_FIRSTHDR(mhdr) : \ + (((u8_t *)(cmsg) + ALIGN_H((cmsg)->cmsg_len) \ + + ALIGN_D(sizeof(struct cmsghdr)) > \ + (u8_t *)((mhdr)->msg_control) + (mhdr)->msg_controllen) ? \ + (struct cmsghdr *)NULL : \ + (struct cmsghdr *)((void*)((u8_t *)(cmsg) + \ + ALIGN_H((cmsg)->cmsg_len))))) + +#define CMSG_DATA(cmsg) ((void*)((u8_t *)(cmsg) + \ + ALIGN_D(sizeof(struct cmsghdr)))) + +#define CMSG_SPACE(length) (ALIGN_D(sizeof(struct cmsghdr)) + \ + ALIGN_H(length)) + +#define CMSG_LEN(length) (ALIGN_D(sizeof(struct cmsghdr)) + \ + length) + +/* Set socket options argument */ +#define IFNAMSIZ NETIF_NAMESIZE +struct ifreq { + char ifr_name[IFNAMSIZ]; /* Interface name */ +}; + /* Socket protocol types (TCP/UDP/RAW) */ #define SOCK_STREAM 1 #define SOCK_DGRAM 2 @@ -175,32 +200,32 @@ struct msghdr { /* * Additional options, not kept in so_options. */ -#define SO_DEBUG 0x0001 /* Unimplemented: turn on debugging info recording */ -#define SO_ACCEPTCONN 0x0002 /* socket has had listen() */ -#define SO_DONTROUTE 0x0010 /* Unimplemented: just use interface addresses */ -#define SO_USELOOPBACK 0x0040 /* Unimplemented: bypass hardware when possible */ -#define SO_LINGER 0x0080 /* linger on close if data present */ -#define SO_DONTLINGER ((int)(~SO_LINGER)) -#define SO_OOBINLINE 0x0100 /* Unimplemented: leave received OOB data in line */ -#define SO_REUSEPORT 0x0200 /* Unimplemented: allow local address & port reuse */ -#define SO_SNDBUF 0x1001 /* Unimplemented: send buffer size */ -#define SO_RCVBUF 0x1002 /* receive buffer size */ -#define SO_SNDLOWAT 0x1003 /* Unimplemented: send low-water mark */ -#define SO_RCVLOWAT 0x1004 /* Unimplemented: receive low-water mark */ -#define SO_SNDTIMEO 0x1005 /* send timeout */ -#define SO_RCVTIMEO 0x1006 /* receive timeout */ -#define SO_ERROR 0x1007 /* get error status and clear */ -#define SO_TYPE 0x1008 /* get socket type */ -#define SO_CONTIMEO 0x1009 /* Unimplemented: connect timeout */ -#define SO_NO_CHECK 0x100a /* don't create UDP checksum */ - +#define SO_DEBUG 0x0001 /* Unimplemented: turn on debugging info recording */ +#define SO_ACCEPTCONN 0x0002 /* socket has had listen() */ +#define SO_DONTROUTE 0x0010 /* Unimplemented: just use interface addresses */ +#define SO_USELOOPBACK 0x0040 /* Unimplemented: bypass hardware when possible */ +#define SO_LINGER 0x0080 /* linger on close if data present */ +#define SO_DONTLINGER ((int)(~SO_LINGER)) +#define SO_OOBINLINE 0x0100 /* Unimplemented: leave received OOB data in line */ +#define SO_REUSEPORT 0x0200 /* Unimplemented: allow local address & port reuse */ +#define SO_SNDBUF 0x1001 /* Unimplemented: send buffer size */ +#define SO_RCVBUF 0x1002 /* receive buffer size */ +#define SO_SNDLOWAT 0x1003 /* Unimplemented: send low-water mark */ +#define SO_RCVLOWAT 0x1004 /* Unimplemented: receive low-water mark */ +#define SO_SNDTIMEO 0x1005 /* send timeout */ +#define SO_RCVTIMEO 0x1006 /* receive timeout */ +#define SO_ERROR 0x1007 /* get error status and clear */ +#define SO_TYPE 0x1008 /* get socket type */ +#define SO_CONTIMEO 0x1009 /* Unimplemented: connect timeout */ +#define SO_NO_CHECK 0x100a /* don't create UDP checksum */ +#define SO_BINDTODEVICE 0x100b /* bind to device */ /* * Structure used for manipulating linger option. */ struct linger { - int l_onoff; /* option on/off */ - int l_linger; /* linger time in seconds */ + int l_onoff; /* option on/off */ + int l_linger; /* linger time in seconds */ }; /* @@ -237,6 +262,7 @@ struct linger { #define MSG_OOB 0x04 /* Unimplemented: Requests out-of-band data. The significance and semantics of out-of-band data are protocol-specific */ #define MSG_DONTWAIT 0x08 /* Nonblocking i/o for this operation only */ #define MSG_MORE 0x10 /* Sender will send more */ +#define MSG_NOSIGNAL 0x20 /* Uninmplemented: Requests not to send the SIGPIPE signal if an attempt to send is made on a stream-oriented socket that is no longer connected. */ /* @@ -244,6 +270,7 @@ struct linger { */ #define IP_TOS 1 #define IP_TTL 2 +#define IP_PKTINFO 8 #if LWIP_TCP /* @@ -295,6 +322,28 @@ typedef struct ip_mreq { } ip_mreq; #endif /* LWIP_IGMP */ +#if LWIP_IPV4 +struct in_pktinfo { + unsigned int ipi_ifindex; /* Interface index */ + struct in_addr ipi_addr; /* Destination (from header) address */ +}; +#endif /* LWIP_IPV4 */ + +#if LWIP_IPV6_MLD +/* + * Options and types related to IPv6 multicast membership + */ +#define IPV6_JOIN_GROUP 12 +#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP +#define IPV6_LEAVE_GROUP 13 +#define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP + +typedef struct ipv6_mreq { + struct in6_addr ipv6mr_multiaddr; /* IPv6 multicast addr */ + unsigned int ipv6mr_interface; /* interface index, or 0 */ +} ipv6_mreq; +#endif /* LWIP_IPV6_MLD */ + /* * The Type of Service provides an indication of the abstract * parameters of the quality of service desired. These parameters are @@ -358,11 +407,11 @@ typedef struct ip_mreq { #define IOC_INOUT (IOC_IN|IOC_OUT) /* 0x20000000 distinguishes new & old ioctl's */ -#define _IO(x,y) (IOC_VOID|((x)<<8)|(y)) +#define _IO(x,y) ((long)(IOC_VOID|((x)<<8)|(y))) -#define _IOR(x,y,t) (IOC_OUT|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y)) +#define _IOR(x,y,t) ((long)(IOC_OUT|((sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))) -#define _IOW(x,y,t) (IOC_IN|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y)) +#define _IOW(x,y,t) ((long)(IOC_IN|((sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))) #endif /* !defined(FIONREAD) || !defined(FIONBIO) */ #ifndef FIONREAD @@ -395,7 +444,16 @@ typedef struct ip_mreq { #define O_NONBLOCK 1 /* nonblocking I/O */ #endif #ifndef O_NDELAY -#define O_NDELAY 1 /* same as O_NONBLOCK, for compatibility */ +#define O_NDELAY O_NONBLOCK /* same as O_NONBLOCK, for compatibility */ +#endif +#ifndef O_RDONLY +#define O_RDONLY 2 +#endif +#ifndef O_WRONLY +#define O_WRONLY 4 +#endif +#ifndef O_RDWR +#define O_RDWR (O_RDONLY|O_WRONLY) #endif #ifndef SHUT_RD @@ -409,13 +467,14 @@ typedef struct ip_mreq { #undef FD_SETSIZE /* Make FD_SETSIZE match NUM_SOCKETS in socket.c */ #define FD_SETSIZE MEMP_NUM_NETCONN +#define LWIP_SELECT_MAXNFDS (FD_SETSIZE + LWIP_SOCKET_OFFSET) #define FDSETSAFESET(n, code) do { \ if (((n) - LWIP_SOCKET_OFFSET < MEMP_NUM_NETCONN) && (((int)(n) - LWIP_SOCKET_OFFSET) >= 0)) { \ code; }} while(0) #define FDSETSAFEGET(n, code) (((n) - LWIP_SOCKET_OFFSET < MEMP_NUM_NETCONN) && (((int)(n) - LWIP_SOCKET_OFFSET) >= 0) ?\ (code) : 0) -#define FD_SET(n, p) FDSETSAFESET(n, (p)->fd_bits[((n)-LWIP_SOCKET_OFFSET)/8] |= (1 << (((n)-LWIP_SOCKET_OFFSET) & 7))) -#define FD_CLR(n, p) FDSETSAFESET(n, (p)->fd_bits[((n)-LWIP_SOCKET_OFFSET)/8] &= ~(1 << (((n)-LWIP_SOCKET_OFFSET) & 7))) +#define FD_SET(n, p) FDSETSAFESET(n, (p)->fd_bits[((n)-LWIP_SOCKET_OFFSET)/8] = (u8_t)((p)->fd_bits[((n)-LWIP_SOCKET_OFFSET)/8] | (1 << (((n)-LWIP_SOCKET_OFFSET) & 7)))) +#define FD_CLR(n, p) FDSETSAFESET(n, (p)->fd_bits[((n)-LWIP_SOCKET_OFFSET)/8] = (u8_t)((p)->fd_bits[((n)-LWIP_SOCKET_OFFSET)/8] & ~(1 << (((n)-LWIP_SOCKET_OFFSET) & 7)))) #define FD_ISSET(n,p) FDSETSAFEGET(n, (p)->fd_bits[((n)-LWIP_SOCKET_OFFSET)/8] & (1 << (((n)-LWIP_SOCKET_OFFSET) & 7))) #define FD_ZERO(p) memset((void*)(p), 0, sizeof(*(p))) @@ -424,12 +483,35 @@ typedef struct fd_set unsigned char fd_bits [(FD_SETSIZE+7)/8]; } fd_set; -#elif LWIP_SOCKET_OFFSET -#error LWIP_SOCKET_OFFSET does not work with external FD_SET! -#elif FD_SETSIZE < MEMP_NUM_NETCONN +#elif FD_SETSIZE < (LWIP_SOCKET_OFFSET + MEMP_NUM_NETCONN) #error "external FD_SETSIZE too small for number of sockets" +#else +#define LWIP_SELECT_MAXNFDS FD_SETSIZE #endif /* FD_SET */ +/* poll-related defines and types */ +/* @todo: find a better way to guard the definition of these defines and types if already defined */ +#if !defined(POLLIN) && !defined(POLLOUT) +#define POLLIN 0x1 +#define POLLOUT 0x2 +#define POLLERR 0x4 +#define POLLNVAL 0x8 +/* Below values are unimplemented */ +#define POLLRDNORM 0x10 +#define POLLRDBAND 0x20 +#define POLLPRI 0x40 +#define POLLWRNORM 0x80 +#define POLLWRBAND 0x100 +#define POLLHUP 0x200 +typedef unsigned int nfds_t; +struct pollfd +{ + int fd; + short events; + short revents; +}; +#endif + /** LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided * by your system, set this to 0 and include in cc.h */ #ifndef LWIP_TIMEVAL_PRIVATE @@ -460,23 +542,34 @@ void lwip_socket_thread_cleanup(void); /* LWIP_NETCONN_SEM_PER_THREAD==1: destro #define lwip_connect connect #define lwip_listen listen #define lwip_recv recv +#define lwip_recvmsg recvmsg #define lwip_recvfrom recvfrom #define lwip_send send #define lwip_sendmsg sendmsg #define lwip_sendto sendto #define lwip_socket socket +#if LWIP_SOCKET_SELECT #define lwip_select select -#define lwip_ioctlsocket ioctl +#endif +#if LWIP_SOCKET_POLL +#define lwip_poll poll +#endif +#define lwip_ioctl ioctlsocket +#define lwip_inet_ntop inet_ntop +#define lwip_inet_pton inet_pton #if LWIP_POSIX_SOCKETS_IO_NAMES #define lwip_read read +#define lwip_readv readv #define lwip_write write #define lwip_writev writev #undef lwip_close #define lwip_close close #define closesocket(s) close(s) -#define lwip_fcntl fcntl +int fcntl(int s, int cmd, ...); +#undef lwip_ioctl #define lwip_ioctl ioctl +#define ioctlsocket ioctl #endif /* LWIP_POSIX_SOCKETS_IO_NAMES */ #endif /* LWIP_COMPAT_SOCKETS == 2 */ @@ -487,24 +580,33 @@ int lwip_getpeername (int s, struct sockaddr *name, socklen_t *namelen); int lwip_getsockname (int s, struct sockaddr *name, socklen_t *namelen); int lwip_getsockopt (int s, int level, int optname, void *optval, socklen_t *optlen); int lwip_setsockopt (int s, int level, int optname, const void *optval, socklen_t optlen); -int lwip_close(int s); + int lwip_close(int s); int lwip_connect(int s, const struct sockaddr *name, socklen_t namelen); int lwip_listen(int s, int backlog); -int lwip_recv(int s, void *mem, size_t len, int flags); -int lwip_read(int s, void *mem, size_t len); -int lwip_recvfrom(int s, void *mem, size_t len, int flags, +ssize_t lwip_recv(int s, void *mem, size_t len, int flags); +ssize_t lwip_read(int s, void *mem, size_t len); +ssize_t lwip_readv(int s, const struct iovec *iov, int iovcnt); +ssize_t lwip_recvfrom(int s, void *mem, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen); -int lwip_send(int s, const void *dataptr, size_t size, int flags); -int lwip_sendmsg(int s, const struct msghdr *message, int flags); -int lwip_sendto(int s, const void *dataptr, size_t size, int flags, +ssize_t lwip_recvmsg(int s, struct msghdr *message, int flags); +ssize_t lwip_send(int s, const void *dataptr, size_t size, int flags); +ssize_t lwip_sendmsg(int s, const struct msghdr *message, int flags); +ssize_t lwip_sendto(int s, const void *dataptr, size_t size, int flags, const struct sockaddr *to, socklen_t tolen); int lwip_socket(int domain, int type, int protocol); -int lwip_write(int s, const void *dataptr, size_t size); -int lwip_writev(int s, const struct iovec *iov, int iovcnt); +ssize_t lwip_write(int s, const void *dataptr, size_t size); +ssize_t lwip_writev(int s, const struct iovec *iov, int iovcnt); +#if LWIP_SOCKET_SELECT int lwip_select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *exceptset, struct timeval *timeout); +#endif +#if LWIP_SOCKET_POLL +int lwip_poll(struct pollfd *fds, nfds_t nfds, int timeout); +#endif int lwip_ioctl(int s, long cmd, void *argp); int lwip_fcntl(int s, int cmd, int val); +const char *lwip_inet_ntop(int af, const void *src, char *dst, socklen_t size); +int lwip_inet_pton(int af, const char *src, void *dst); #if LWIP_COMPAT_SOCKETS #if LWIP_COMPAT_SOCKETS != 2 @@ -531,6 +633,8 @@ int lwip_fcntl(int s, int cmd, int val); /** @ingroup socket */ #define recv(s,mem,len,flags) lwip_recv(s,mem,len,flags) /** @ingroup socket */ +#define recvmsg(s,message,flags) lwip_recvmsg(s,message,flags) +/** @ingroup socket */ #define recvfrom(s,mem,len,flags,from,fromlen) lwip_recvfrom(s,mem,len,flags,from,fromlen) /** @ingroup socket */ #define send(s,dataptr,size,flags) lwip_send(s,dataptr,size,flags) @@ -540,15 +644,27 @@ int lwip_fcntl(int s, int cmd, int val); #define sendto(s,dataptr,size,flags,to,tolen) lwip_sendto(s,dataptr,size,flags,to,tolen) /** @ingroup socket */ #define socket(domain,type,protocol) lwip_socket(domain,type,protocol) +#if LWIP_SOCKET_SELECT /** @ingroup socket */ #define select(maxfdp1,readset,writeset,exceptset,timeout) lwip_select(maxfdp1,readset,writeset,exceptset,timeout) +#endif +#if LWIP_SOCKET_POLL +/** @ingroup socket */ +#define poll(fds,nfds,timeout) lwip_poll(fds,nfds,timeout) +#endif /** @ingroup socket */ #define ioctlsocket(s,cmd,argp) lwip_ioctl(s,cmd,argp) +/** @ingroup socket */ +#define inet_ntop(af,src,dst,size) lwip_inet_ntop(af,src,dst,size) +/** @ingroup socket */ +#define inet_pton(af,src,dst) lwip_inet_pton(af,src,dst) #if LWIP_POSIX_SOCKETS_IO_NAMES /** @ingroup socket */ #define read(s,mem,len) lwip_read(s,mem,len) /** @ingroup socket */ +#define readv(s,iov,iovcnt) lwip_readv(s,iov,iovcnt) +/** @ingroup socket */ #define write(s,dataptr,len) lwip_write(s,dataptr,len) /** @ingroup socket */ #define writev(s,iov,iovcnt) lwip_writev(s,iov,iovcnt) @@ -561,27 +677,6 @@ int lwip_fcntl(int s, int cmd, int val); #endif /* LWIP_POSIX_SOCKETS_IO_NAMES */ #endif /* LWIP_COMPAT_SOCKETS != 2 */ -#if LWIP_IPV4 && LWIP_IPV6 -/** @ingroup socket */ -#define inet_ntop(af,src,dst,size) \ - (((af) == AF_INET6) ? ip6addr_ntoa_r((const ip6_addr_t*)(src),(dst),(size)) \ - : (((af) == AF_INET) ? ip4addr_ntoa_r((const ip4_addr_t*)(src),(dst),(size)) : NULL)) -/** @ingroup socket */ -#define inet_pton(af,src,dst) \ - (((af) == AF_INET6) ? ip6addr_aton((src),(ip6_addr_t*)(dst)) \ - : (((af) == AF_INET) ? ip4addr_aton((src),(ip4_addr_t*)(dst)) : 0)) -#elif LWIP_IPV4 /* LWIP_IPV4 && LWIP_IPV6 */ -#define inet_ntop(af,src,dst,size) \ - (((af) == AF_INET) ? ip4addr_ntoa_r((const ip4_addr_t*)(src),(dst),(size)) : NULL) -#define inet_pton(af,src,dst) \ - (((af) == AF_INET) ? ip4addr_aton((src),(ip4_addr_t*)(dst)) : 0) -#else /* LWIP_IPV4 && LWIP_IPV6 */ -#define inet_ntop(af,src,dst,size) \ - (((af) == AF_INET6) ? ip6addr_ntoa_r((const ip6_addr_t*)(src),(dst),(size)) : NULL) -#define inet_pton(af,src,dst) \ - (((af) == AF_INET6) ? ip6addr_aton((src),(ip6_addr_t*)(dst)) : 0) -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - #endif /* LWIP_COMPAT_SOCKETS */ #ifdef __cplusplus diff --git a/Libraries/LwIP/src/include/lwip/stats.h b/Libraries/LwIP/src/include/lwip/stats.h index a0c818b..1cf4e59 100755 --- a/Libraries/LwIP/src/include/lwip/stats.h +++ b/Libraries/LwIP/src/include/lwip/stats.h @@ -308,7 +308,7 @@ void stats_init(void); #define STATS_INC(x) ++lwip_stats.x #define STATS_DEC(x) --lwip_stats.x -#define STATS_INC_USED(x, y) do { lwip_stats.x.used += y; \ +#define STATS_INC_USED(x, y, type) do { lwip_stats.x.used = (type)(lwip_stats.x.used + y); \ if (lwip_stats.x.max < lwip_stats.x.used) { \ lwip_stats.x.max = lwip_stats.x.used; \ } \ @@ -318,7 +318,7 @@ void stats_init(void); #define stats_init() #define STATS_INC(x) #define STATS_DEC(x) -#define STATS_INC_USED(x) +#define STATS_INC_USED(x, y, type) #endif /* LWIP_STATS */ #if TCP_STATS @@ -387,9 +387,9 @@ void stats_init(void); #if MEM_STATS #define MEM_STATS_AVAIL(x, y) lwip_stats.mem.x = y -#define MEM_STATS_INC(x) SYS_ARCH_INC(lwip_stats.mem.x, 1) -#define MEM_STATS_INC_USED(x, y) SYS_ARCH_INC(lwip_stats.mem.x, y) -#define MEM_STATS_DEC_USED(x, y) SYS_ARCH_DEC(lwip_stats.mem.x, y) +#define MEM_STATS_INC(x) STATS_INC(mem.x) +#define MEM_STATS_INC_USED(x, y) STATS_INC_USED(mem, y, mem_size_t) +#define MEM_STATS_DEC_USED(x, y) lwip_stats.mem.x = (mem_size_t)((lwip_stats.mem.x) - (y)) #define MEM_STATS_DISPLAY() stats_display_mem(&lwip_stats.mem, "HEAP") #else #define MEM_STATS_AVAIL(x, y) @@ -412,7 +412,7 @@ void stats_init(void); #if SYS_STATS #define SYS_STATS_INC(x) STATS_INC(sys.x) #define SYS_STATS_DEC(x) STATS_DEC(sys.x) -#define SYS_STATS_INC_USED(x) STATS_INC_USED(sys.x, 1) +#define SYS_STATS_INC_USED(x) STATS_INC_USED(sys.x, 1, STAT_COUNTER) #define SYS_STATS_DISPLAY() stats_display_sys(&lwip_stats.sys) #else #define SYS_STATS_INC(x) diff --git a/Libraries/LwIP/src/include/lwip/sys.h b/Libraries/LwIP/src/include/lwip/sys.h index 98c38d7..cd83470 100755 --- a/Libraries/LwIP/src/include/lwip/sys.h +++ b/Libraries/LwIP/src/include/lwip/sys.h @@ -125,39 +125,51 @@ typedef void (*lwip_thread_fn)(void *arg); * Create a new mutex. * Note that mutexes are expected to not be taken recursively by the lwIP code, * so both implementation types (recursive or non-recursive) should work. + * The mutex is allocated to the memory that 'mutex' + * points to (which can be both a pointer or the actual OS structure). + * If the mutex has been created, ERR_OK should be returned. Returning any + * other error will provide a hint what went wrong, but except for assertions, + * no real error handling is implemented. + * * @param mutex pointer to the mutex to create * @return ERR_OK if successful, another err_t otherwise */ err_t sys_mutex_new(sys_mutex_t *mutex); /** * @ingroup sys_mutex - * Lock a mutex + * Blocks the thread until the mutex can be grabbed. * @param mutex the mutex to lock */ void sys_mutex_lock(sys_mutex_t *mutex); /** * @ingroup sys_mutex - * Unlock a mutex + * Releases the mutex previously locked through 'sys_mutex_lock()'. * @param mutex the mutex to unlock */ void sys_mutex_unlock(sys_mutex_t *mutex); /** * @ingroup sys_mutex - * Delete a semaphore + * Deallocates a mutex. * @param mutex the mutex to delete */ void sys_mutex_free(sys_mutex_t *mutex); #ifndef sys_mutex_valid /** * @ingroup sys_mutex - * Check if a mutex is valid/allocated: return 1 for valid, 0 for invalid + * Returns 1 if the mutes is valid, 0 if it is not valid. + * When using pointers, a simple way is to check the pointer for != NULL. + * When directly using OS structures, implementing this may be more complex. + * This may also be a define, in which case the function is not prototyped. */ int sys_mutex_valid(sys_mutex_t *mutex); #endif #ifndef sys_mutex_set_invalid /** * @ingroup sys_mutex - * Set a mutex invalid so that sys_mutex_valid returns 0 + * Invalidate a mutex so that sys_mutex_valid() returns 0. + * ATTENTION: This does NOT mean that the mutex shall be deallocated: + * sys_mutex_free() is always called before calling this function! + * This may also be a define, in which case the function is not prototyped. */ void sys_mutex_set_invalid(sys_mutex_t *mutex); #endif @@ -168,6 +180,14 @@ void sys_mutex_set_invalid(sys_mutex_t *mutex); /** * @ingroup sys_sem * Create a new semaphore + * Creates a new semaphore. The semaphore is allocated to the memory that 'sem' + * points to (which can be both a pointer or the actual OS structure). + * The "count" argument specifies the initial state of the semaphore (which is + * either 0 or 1). + * If the semaphore has been created, ERR_OK should be returned. Returning any + * other error will provide a hint what went wrong, but except for assertions, + * no real error handling is implemented. + * * @param sem pointer to the semaphore to create * @param count initial count of the semaphore * @return ERR_OK if successful, another err_t otherwise @@ -181,16 +201,25 @@ err_t sys_sem_new(sys_sem_t *sem, u8_t count); void sys_sem_signal(sys_sem_t *sem); /** * @ingroup sys_sem - * Wait for a semaphore for the specified timeout + * Blocks the thread while waiting for the semaphore to be signaled. If the + * "timeout" argument is non-zero, the thread should only be blocked for the + * specified time (measured in milliseconds). If the "timeout" argument is zero, + * the thread should be blocked until the semaphore is signalled. + * + * The return value is SYS_ARCH_TIMEOUT if the semaphore wasn't signaled within + * the specified time or any other value if it was signaled (with or without + * waiting). + * Notice that lwIP implements a function with a similar name, + * sys_sem_wait(), that uses the sys_arch_sem_wait() function. + * * @param sem the semaphore to wait for * @param timeout timeout in milliseconds to wait (0 = wait forever) - * @return time (in milliseconds) waited for the semaphore - * or SYS_ARCH_TIMEOUT on timeout + * @return SYS_ARCH_TIMEOUT on timeout, any other value on success */ u32_t sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout); /** * @ingroup sys_sem - * Delete a semaphore + * Deallocates a semaphore. * @param sem semaphore to delete */ void sys_sem_free(sys_sem_t *sem); @@ -199,14 +228,20 @@ void sys_sem_free(sys_sem_t *sem); #ifndef sys_sem_valid /** * @ingroup sys_sem - * Check if a semaphore is valid/allocated: return 1 for valid, 0 for invalid + * Returns 1 if the semaphore is valid, 0 if it is not valid. + * When using pointers, a simple way is to check the pointer for != NULL. + * When directly using OS structures, implementing this may be more complex. + * This may also be a define, in which case the function is not prototyped. */ int sys_sem_valid(sys_sem_t *sem); #endif #ifndef sys_sem_set_invalid /** * @ingroup sys_sem - * Set a semaphore invalid so that sys_sem_valid returns 0 + * Invalidate a semaphore so that sys_sem_valid() returns 0. + * ATTENTION: This does NOT mean that the semaphore shall be deallocated: + * sys_sem_free() is always called before calling this function! + * This may also be a define, in which case the function is not prototyped. */ void sys_sem_set_invalid(sys_sem_t *sem); #endif @@ -235,7 +270,14 @@ void sys_msleep(u32_t ms); /* only has a (close to) 1 ms resolution. */ /** * @ingroup sys_mbox - * Create a new mbox of specified size + * Creates an empty mailbox for maximum "size" elements. Elements stored + * in mailboxes are pointers. You have to define macros "_MBOX_SIZE" + * in your lwipopts.h, or ignore this parameter in your implementation + * and use a default size. + * If the mailbox has been created, ERR_OK should be returned. Returning any + * other error will provide a hint what went wrong, but except for assertions, + * no real error handling is implemented. + * * @param mbox pointer to the mbox to create * @param size (minimum) number of messages in this mbox * @return ERR_OK if successful, another err_t otherwise @@ -244,34 +286,67 @@ err_t sys_mbox_new(sys_mbox_t *mbox, int size); /** * @ingroup sys_mbox * Post a message to an mbox - may not fail - * -> blocks if full, only used from tasks not from ISR + * -> blocks if full, only to be used from tasks NOT from ISR! + * * @param mbox mbox to posts the message * @param msg message to post (ATTENTION: can be NULL) */ void sys_mbox_post(sys_mbox_t *mbox, void *msg); /** * @ingroup sys_mbox - * Try to post a message to an mbox - may fail if full or ISR + * Try to post a message to an mbox - may fail if full. + * Can be used from ISR (if the sys arch layer allows this). + * Returns ERR_MEM if it is full, else, ERR_OK if the "msg" is posted. + * * @param mbox mbox to posts the message * @param msg message to post (ATTENTION: can be NULL) */ err_t sys_mbox_trypost(sys_mbox_t *mbox, void *msg); /** * @ingroup sys_mbox - * Wait for a new message to arrive in the mbox + * Try to post a message to an mbox - may fail if full. + * To be be used from ISR. + * Returns ERR_MEM if it is full, else, ERR_OK if the "msg" is posted. + * + * @param mbox mbox to posts the message + * @param msg message to post (ATTENTION: can be NULL) + */ +err_t sys_mbox_trypost_fromisr(sys_mbox_t *mbox, void *msg); +/** + * @ingroup sys_mbox + * Blocks the thread until a message arrives in the mailbox, but does + * not block the thread longer than "timeout" milliseconds (similar to + * the sys_arch_sem_wait() function). If "timeout" is 0, the thread should + * be blocked until a message arrives. The "msg" argument is a result + * parameter that is set by the function (i.e., by doing "*msg = + * ptr"). The "msg" parameter maybe NULL to indicate that the message + * should be dropped. + * The return values are the same as for the sys_arch_sem_wait() function: + * SYS_ARCH_TIMEOUT if there was a timeout, any other value if a messages + * is received. + * + * Note that a function with a similar name, sys_mbox_fetch(), is + * implemented by lwIP. + * * @param mbox mbox to get a message from * @param msg pointer where the message is stored * @param timeout maximum time (in milliseconds) to wait for a message (0 = wait forever) - * @return time (in milliseconds) waited for a message, may be 0 if not waited - or SYS_ARCH_TIMEOUT on timeout - * The returned time has to be accurate to prevent timer jitter! + * @return SYS_ARCH_TIMEOUT on timeout, any other value if a message has been received */ u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout); /* Allow port to override with a macro, e.g. special timeout for sys_arch_mbox_fetch() */ #ifndef sys_arch_mbox_tryfetch /** * @ingroup sys_mbox - * Wait for a new message to arrive in the mbox + * This is similar to sys_arch_mbox_fetch, however if a message is not + * present in the mailbox, it immediately returns with the code + * SYS_MBOX_EMPTY. On success 0 is returned. + * To allow for efficient implementations, this can be defined as a + * function-like macro in sys_arch.h instead of a normal function. For + * example, a naive implementation could be: + * \#define sys_arch_mbox_tryfetch(mbox,msg) sys_arch_mbox_fetch(mbox,msg,1) + * although this would introduce unnecessary delays. + * * @param mbox mbox to get a message from * @param msg pointer where the message is stored * @return 0 (milliseconds) if a message has been received @@ -285,7 +360,10 @@ u32_t sys_arch_mbox_tryfetch(sys_mbox_t *mbox, void **msg); #define sys_mbox_tryfetch(mbox, msg) sys_arch_mbox_tryfetch(mbox, msg) /** * @ingroup sys_mbox - * Delete an mbox + * Deallocates a mailbox. If there are messages still present in the + * mailbox when the mailbox is deallocated, it is an indication of a + * programming error in lwIP and the developer should be notified. + * * @param mbox mbox to delete */ void sys_mbox_free(sys_mbox_t *mbox); @@ -293,14 +371,20 @@ void sys_mbox_free(sys_mbox_t *mbox); #ifndef sys_mbox_valid /** * @ingroup sys_mbox - * Check if an mbox is valid/allocated: return 1 for valid, 0 for invalid + * Returns 1 if the mailbox is valid, 0 if it is not valid. + * When using pointers, a simple way is to check the pointer for != NULL. + * When directly using OS structures, implementing this may be more complex. + * This may also be a define, in which case the function is not prototyped. */ int sys_mbox_valid(sys_mbox_t *mbox); #endif #ifndef sys_mbox_set_invalid /** * @ingroup sys_mbox - * Set an mbox invalid so that sys_mbox_valid returns 0 + * Invalidate a mailbox so that sys_mbox_valid() returns 0. + * ATTENTION: This does NOT mean that the mailbox shall be deallocated: + * sys_mbox_free() is always called before calling this function! + * This may also be a define, in which case the function is not prototyped. */ void sys_mbox_set_invalid(sys_mbox_t *mbox); #endif @@ -321,8 +405,13 @@ void sys_mbox_set_invalid(sys_mbox_t *mbox); /** * @ingroup sys_misc * The only thread function: - * Creates a new thread + * Starts a new thread named "name" with priority "prio" that will begin its + * execution in the function "thread()". The "arg" argument will be passed as an + * argument to the thread() function. The stack size to used for this thread is + * the "stacksize" parameter. The id of the new thread is returned. Both the id + * and the priority are system dependent. * ATTENTION: although this function returns a value, it MUST NOT FAIL (ports have to assert this!) + * * @param name human-readable name for the thread (used for debugging purposes) * @param thread thread-function * @param arg parameter passed to 'thread' @@ -332,7 +421,11 @@ sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread, void *arg, #endif /* NO_SYS */ -/* sys_init() must be called before anything else. */ +/** + * @ingroup sys_misc + * sys_init() must be called before anything else. + * Initialize the sys_arch layer. + */ void sys_init(void); #ifndef sys_jiffies @@ -346,6 +439,9 @@ u32_t sys_jiffies(void); * @ingroup sys_time * Returns the current time in milliseconds, * may be the same as sys_jiffies or at least based on it. + * Don't care for wraparound, this is only used for time diffs. + * Not implementing this function means you cannot use some modules (e.g. TCP + * timestamps, internal timeouts for NO_SYS==1). */ u32_t sys_now(void); @@ -447,6 +543,15 @@ void sys_arch_unprotect(sys_prot_t pval); } while(0) #endif /* SYS_ARCH_SET */ +#ifndef SYS_ARCH_LOCKED +#define SYS_ARCH_LOCKED(code) do { \ + SYS_ARCH_DECL_PROTECT(old_level); \ + SYS_ARCH_PROTECT(old_level); \ + code; \ + SYS_ARCH_UNPROTECT(old_level); \ + } while(0) +#endif /* SYS_ARCH_LOCKED */ + #ifdef __cplusplus } diff --git a/Libraries/LwIP/src/include/lwip/tcp.h b/Libraries/LwIP/src/include/lwip/tcp.h index 3845b9f..8c9ba98 100755 --- a/Libraries/LwIP/src/include/lwip/tcp.h +++ b/Libraries/LwIP/src/include/lwip/tcp.h @@ -42,6 +42,7 @@ #if LWIP_TCP /* don't build if not configured for use in lwipopts.h */ +#include "lwip/tcpbase.h" #include "lwip/mem.h" #include "lwip/pbuf.h" #include "lwip/ip.h" @@ -55,6 +56,7 @@ extern "C" { #endif struct tcp_pcb; +struct tcp_pcb_listen; /** Function prototype for tcp accept callback functions. Called when a new * connection can be accepted on a listening pcb. @@ -136,34 +138,73 @@ typedef err_t (*tcp_connected_fn)(void *arg, struct tcp_pcb *tpcb, err_t err); #define SND_WND_SCALE(pcb, wnd) (((wnd) << (pcb)->snd_scale)) #define TCPWND16(x) ((u16_t)LWIP_MIN((x), 0xFFFF)) #define TCP_WND_MAX(pcb) ((tcpwnd_size_t)(((pcb)->flags & TF_WND_SCALE) ? TCP_WND : TCPWND16(TCP_WND))) -typedef u32_t tcpwnd_size_t; #else #define RCV_WND_SCALE(pcb, wnd) (wnd) #define SND_WND_SCALE(pcb, wnd) (wnd) #define TCPWND16(x) (x) #define TCP_WND_MAX(pcb) TCP_WND -typedef u16_t tcpwnd_size_t; #endif +/* Increments a tcpwnd_size_t and holds at max value rather than rollover */ +#define TCP_WND_INC(wnd, inc) do { \ + if ((tcpwnd_size_t)(wnd + inc) >= wnd) { \ + wnd = (tcpwnd_size_t)(wnd + inc); \ + } else { \ + wnd = (tcpwnd_size_t)-1; \ + } \ + } while(0) -#if LWIP_WND_SCALE || TCP_LISTEN_BACKLOG || LWIP_TCP_TIMESTAMPS -typedef u16_t tcpflags_t; -#else -typedef u8_t tcpflags_t; -#endif - -enum tcp_state { - CLOSED = 0, - LISTEN = 1, - SYN_SENT = 2, - SYN_RCVD = 3, - ESTABLISHED = 4, - FIN_WAIT_1 = 5, - FIN_WAIT_2 = 6, - CLOSE_WAIT = 7, - CLOSING = 8, - LAST_ACK = 9, - TIME_WAIT = 10 +#if LWIP_TCP_SACK_OUT +/** SACK ranges to include in ACK packets. + * SACK entry is invalid if left==right. */ +struct tcp_sack_range { + /** Left edge of the SACK: the first acknowledged sequence number. */ + u32_t left; + /** Right edge of the SACK: the last acknowledged sequence number +1 (so first NOT acknowledged). */ + u32_t right; }; +#endif /* LWIP_TCP_SACK_OUT */ + +/** Function prototype for deallocation of arguments. Called *just before* the + * pcb is freed, so don't expect to be able to do anything with this pcb! + * + * @param id ext arg id (allocated via @ref tcp_ext_arg_alloc_id) + * @param data pointer to the data (set via @ref tcp_ext_arg_set before) + */ +typedef void (*tcp_extarg_callback_pcb_destroyed_fn)(u8_t id, void *data); + +/** Function prototype to transition arguments from a listening pcb to an accepted pcb + * + * @param id ext arg id (allocated via @ref tcp_ext_arg_alloc_id) + * @param lpcb the listening pcb accepting a connection + * @param cpcb the newly allocated connection pcb + * @return ERR_OK if OK, any error if connection should be dropped + */ +typedef err_t (*tcp_extarg_callback_passive_open_fn)(u8_t id, struct tcp_pcb_listen *lpcb, struct tcp_pcb *cpcb); + +/** A table of callback functions that is invoked for ext arguments */ +struct tcp_ext_arg_callbacks { + /** @ref tcp_extarg_callback_pcb_destroyed_fn */ + tcp_extarg_callback_pcb_destroyed_fn destroy; + /** @ref tcp_extarg_callback_passive_open_fn */ + tcp_extarg_callback_passive_open_fn passive_open; +}; + +#define LWIP_TCP_PCB_NUM_EXT_ARG_ID_INVALID 0xFF + +#if LWIP_TCP_PCB_NUM_EXT_ARGS +/* This is the structure for ext args in tcp pcbs (used as array) */ +struct tcp_pcb_ext_args { + const struct tcp_ext_arg_callbacks *callbacks; + void *data; +}; +/* This is a helper define to prevent zero size arrays if disabled */ +#define TCP_PCB_EXTARGS struct tcp_pcb_ext_args ext_args[LWIP_TCP_PCB_NUM_EXT_ARGS]; +#else +#define TCP_PCB_EXTARGS +#endif + +typedef u16_t tcpflags_t; +#define TCP_ALLFLAGS 0xffffU /** * members common to struct tcp_pcb and struct tcp_listen_pcb @@ -171,6 +212,7 @@ enum tcp_state { #define TCP_PCB_COMMON(type) \ type *next; /* for the linked list */ \ void *callback_arg; \ + TCP_PCB_EXTARGS \ enum tcp_state state; /* TCP state */ \ u8_t prio; \ /* ports are in host byte order */ \ @@ -223,6 +265,10 @@ struct tcp_pcb { #endif #if LWIP_TCP_TIMESTAMPS #define TF_TIMESTAMP 0x0400U /* Timestamp option enabled */ +#endif +#define TF_RTO 0x0800U /* RTO timer has fired, in-flight data moved to unsent and being retransmitted */ +#if LWIP_TCP_SACK_OUT +#define TF_SACK 0x1000U /* Selective ACKs enabled */ #endif /* the rest of the fields are in host byte order @@ -239,6 +285,12 @@ struct tcp_pcb { tcpwnd_size_t rcv_ann_wnd; /* receiver window to announce */ u32_t rcv_ann_right_edge; /* announced right edge of window */ +#if LWIP_TCP_SACK_OUT + /* SACK ranges to include in ACK packets (entry is invalid if left==right) */ + struct tcp_sack_range rcv_sacks[LWIP_TCP_MAX_SACK_NUM]; +#define LWIP_TCP_SACK_VALID(pcb, idx) ((pcb)->rcv_sacks[idx].left != (pcb)->rcv_sacks[idx].right) +#endif /* LWIP_TCP_SACK_OUT */ + /* Retransmission timer. */ s16_t rtime; @@ -247,9 +299,9 @@ struct tcp_pcb { /* RTT (round trip time) estimation variables */ u32_t rttest; /* RTT estimate in 500ms ticks */ u32_t rtseq; /* sequence number being timed */ - s16_t sa, sv; /* @todo document this */ + s16_t sa, sv; /* @see "Congestion Avoidance and Control" by Van Jacobson and Karels */ - s16_t rto; /* retransmission time-out */ + s16_t rto; /* retransmission time-out (in ticks of TCP_SLOW_INTERVAL) */ u8_t nrtx; /* number of retransmissions */ /* fast retransmit/recovery */ @@ -260,6 +312,9 @@ struct tcp_pcb { tcpwnd_size_t cwnd; tcpwnd_size_t ssthresh; + /* first byte following last rto byte */ + u32_t rto_end; + /* sender variables */ u32_t snd_nxt; /* next new seqno to be sent */ u32_t snd_wl1, snd_wl2; /* Sequence and acknowledgement numbers of last @@ -277,6 +332,8 @@ struct tcp_pcb { u16_t unsent_oversize; #endif /* TCP_OVERSIZE */ + tcpwnd_size_t bytes_acked; + /* These are ordered by sequence number: */ struct tcp_seg *unsent; /* Unsent (queued) segments. */ struct tcp_seg *unacked; /* Sent but unacknowledged segments. */ @@ -319,6 +376,8 @@ struct tcp_pcb { u8_t persist_cnt; /* Persist timer back-off */ u8_t persist_backoff; + /* Number of persist probes */ + u8_t persist_probe; /* KEEPALIVE counter */ u8_t keep_cnt_sent; @@ -361,19 +420,26 @@ void tcp_accept (struct tcp_pcb *pcb, tcp_accept_fn accept); #endif /* LWIP_CALLBACK_API */ void tcp_poll (struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval); +#define tcp_set_flags(pcb, set_flags) do { (pcb)->flags = (tcpflags_t)((pcb)->flags | (set_flags)); } while(0) +#define tcp_clear_flags(pcb, clr_flags) do { (pcb)->flags = (tcpflags_t)((pcb)->flags & (tcpflags_t)(~(clr_flags) & TCP_ALLFLAGS)); } while(0) +#define tcp_is_flag_set(pcb, flag) (((pcb)->flags & (flag)) != 0) + #if LWIP_TCP_TIMESTAMPS #define tcp_mss(pcb) (((pcb)->flags & TF_TIMESTAMP) ? ((pcb)->mss - 12) : (pcb)->mss) #else /* LWIP_TCP_TIMESTAMPS */ +/** @ingroup tcp_raw */ #define tcp_mss(pcb) ((pcb)->mss) #endif /* LWIP_TCP_TIMESTAMPS */ +/** @ingroup tcp_raw */ #define tcp_sndbuf(pcb) (TCPWND16((pcb)->snd_buf)) +/** @ingroup tcp_raw */ #define tcp_sndqueuelen(pcb) ((pcb)->snd_queuelen) /** @ingroup tcp_raw */ -#define tcp_nagle_disable(pcb) ((pcb)->flags |= TF_NODELAY) +#define tcp_nagle_disable(pcb) tcp_set_flags(pcb, TF_NODELAY) /** @ingroup tcp_raw */ -#define tcp_nagle_enable(pcb) ((pcb)->flags = (tcpflags_t)((pcb)->flags & ~TF_NODELAY)) +#define tcp_nagle_enable(pcb) tcp_clear_flags(pcb, TF_NODELAY) /** @ingroup tcp_raw */ -#define tcp_nagle_disabled(pcb) (((pcb)->flags & TF_NODELAY) != 0) +#define tcp_nagle_disabled(pcb) tcp_is_flag_set(pcb, TF_NODELAY) #if TCP_LISTEN_BACKLOG #define tcp_backlog_set(pcb, new_backlog) do { \ @@ -386,11 +452,12 @@ void tcp_backlog_accepted(struct tcp_pcb* pcb); #define tcp_backlog_delayed(pcb) #define tcp_backlog_accepted(pcb) #endif /* TCP_LISTEN_BACKLOG */ -#define tcp_accepted(pcb) /* compatibility define, not needed any more */ +#define tcp_accepted(pcb) do { LWIP_UNUSED_ARG(pcb); } while(0) /* compatibility define, not needed any more */ void tcp_recved (struct tcp_pcb *pcb, u16_t len); err_t tcp_bind (struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port); +void tcp_bind_netif(struct tcp_pcb *pcb, const struct netif *netif); err_t tcp_connect (struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port, tcp_connected_fn connected); @@ -403,27 +470,27 @@ void tcp_abort (struct tcp_pcb *pcb); err_t tcp_close (struct tcp_pcb *pcb); err_t tcp_shutdown(struct tcp_pcb *pcb, int shut_rx, int shut_tx); -/* Flags for "apiflags" parameter in tcp_write */ -#define TCP_WRITE_FLAG_COPY 0x01 -#define TCP_WRITE_FLAG_MORE 0x02 - err_t tcp_write (struct tcp_pcb *pcb, const void *dataptr, u16_t len, u8_t apiflags); void tcp_setprio (struct tcp_pcb *pcb, u8_t prio); -#define TCP_PRIO_MIN 1 -#define TCP_PRIO_NORMAL 64 -#define TCP_PRIO_MAX 127 - err_t tcp_output (struct tcp_pcb *pcb); +err_t tcp_tcp_get_tcp_addrinfo(struct tcp_pcb *pcb, int local, ip_addr_t *addr, u16_t *port); -const char* tcp_debug_state_str(enum tcp_state s); +#define tcp_dbg_get_tcp_state(pcb) ((pcb)->state) /* for compatibility with older implementation */ #define tcp_new_ip6() tcp_new_ip_type(IPADDR_TYPE_V6) +#if LWIP_TCP_PCB_NUM_EXT_ARGS +u8_t tcp_ext_arg_alloc_id(void); +void tcp_ext_arg_set_callbacks(struct tcp_pcb *pcb, uint8_t id, const struct tcp_ext_arg_callbacks * const callbacks); +void tcp_ext_arg_set(struct tcp_pcb *pcb, uint8_t id, void *arg); +void *tcp_ext_arg_get(const struct tcp_pcb *pcb, uint8_t id); +#endif + #ifdef __cplusplus } #endif diff --git a/Libraries/LwIP/src/include/lwip/tcpbase.h b/Libraries/LwIP/src/include/lwip/tcpbase.h new file mode 100644 index 0000000..0023074 --- /dev/null +++ b/Libraries/LwIP/src/include/lwip/tcpbase.h @@ -0,0 +1,88 @@ +/** + * @file + * Base TCP API definitions shared by TCP and ALTCP\n + * See also @ref tcp_raw + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_TCPBASE_H +#define LWIP_HDR_TCPBASE_H + +#include "lwip/opt.h" + +#if LWIP_TCP /* don't build if not configured for use in lwipopts.h */ + +#ifdef __cplusplus +extern "C" { +#endif + + +#if LWIP_WND_SCALE +typedef u32_t tcpwnd_size_t; +#else +typedef u16_t tcpwnd_size_t; +#endif + +enum tcp_state { + CLOSED = 0, + LISTEN = 1, + SYN_SENT = 2, + SYN_RCVD = 3, + ESTABLISHED = 4, + FIN_WAIT_1 = 5, + FIN_WAIT_2 = 6, + CLOSE_WAIT = 7, + CLOSING = 8, + LAST_ACK = 9, + TIME_WAIT = 10 +}; +/* ATTENTION: this depends on state number ordering! */ +#define TCP_STATE_IS_CLOSING(state) ((state) >= FIN_WAIT_1) + +/* Flags for "apiflags" parameter in tcp_write */ +#define TCP_WRITE_FLAG_COPY 0x01 +#define TCP_WRITE_FLAG_MORE 0x02 + +#define TCP_PRIO_MIN 1 +#define TCP_PRIO_NORMAL 64 +#define TCP_PRIO_MAX 127 + +const char* tcp_debug_state_str(enum tcp_state s); + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_TCP */ + +#endif /* LWIP_HDR_TCPBASE_H */ diff --git a/Libraries/LwIP/src/include/lwip/tcpip.h b/Libraries/LwIP/src/include/lwip/tcpip.h index 6bf7978..ec14701 100755 --- a/Libraries/LwIP/src/include/lwip/tcpip.h +++ b/Libraries/LwIP/src/include/lwip/tcpip.h @@ -52,10 +52,12 @@ extern "C" { #if LWIP_TCPIP_CORE_LOCKING /** The global semaphore to lock the stack. */ extern sys_mutex_t lock_tcpip_core; +#if !defined LOCK_TCPIP_CORE || defined __DOXYGEN__ /** Lock lwIP core mutex (needs @ref LWIP_TCPIP_CORE_LOCKING 1) */ #define LOCK_TCPIP_CORE() sys_mutex_lock(&lock_tcpip_core) /** Unlock lwIP core mutex (needs @ref LWIP_TCPIP_CORE_LOCKING 1) */ #define UNLOCK_TCPIP_CORE() sys_mutex_unlock(&lock_tcpip_core) +#endif /* LOCK_TCPIP_CORE */ #else /* LWIP_TCPIP_CORE_LOCKING */ #define LOCK_TCPIP_CORE() #define UNLOCK_TCPIP_CORE() @@ -77,16 +79,17 @@ void tcpip_init(tcpip_init_done_fn tcpip_init_done, void *arg); err_t tcpip_inpkt(struct pbuf *p, struct netif *inp, netif_input_fn input_fn); err_t tcpip_input(struct pbuf *p, struct netif *inp); -err_t tcpip_callback_with_block(tcpip_callback_fn function, void *ctx, u8_t block); -/** - * @ingroup lwip_os - * @see tcpip_callback_with_block +err_t tcpip_try_callback(tcpip_callback_fn function, void *ctx); +err_t tcpip_callback(tcpip_callback_fn function, void *ctx); +/** @ingroup lwip_os + * @deprecated use tcpip_try_callback() or tcpip_callback() instead */ -#define tcpip_callback(f, ctx) tcpip_callback_with_block(f, ctx, 1) +#define tcpip_callback_with_block(function, ctx, block) ((block != 0)? tcpip_callback(function, ctx) : tcpip_try_callback(function, ctx)) struct tcpip_callback_msg* tcpip_callbackmsg_new(tcpip_callback_fn function, void *ctx); void tcpip_callbackmsg_delete(struct tcpip_callback_msg* msg); -err_t tcpip_trycallback(struct tcpip_callback_msg* msg); +err_t tcpip_callbackmsg_trycallback(struct tcpip_callback_msg* msg); +err_t tcpip_callbackmsg_trycallback_fromisr(struct tcpip_callback_msg* msg); /* free pbufs or heap memory from another context without blocking */ err_t pbuf_free_callback(struct pbuf *p); @@ -97,6 +100,10 @@ err_t tcpip_timeout(u32_t msecs, sys_timeout_handler h, void *arg); err_t tcpip_untimeout(sys_timeout_handler h, void *arg); #endif /* LWIP_TCPIP_TIMEOUT && LWIP_TIMERS */ +#ifdef TCPIP_THREAD_TEST +int tcpip_thread_poll_one(void); +#endif + #ifdef __cplusplus } #endif diff --git a/Libraries/LwIP/src/include/lwip/timeouts.h b/Libraries/LwIP/src/include/lwip/timeouts.h index d119056..3ab3c0e 100755 --- a/Libraries/LwIP/src/include/lwip/timeouts.h +++ b/Libraries/LwIP/src/include/lwip/timeouts.h @@ -56,6 +56,11 @@ extern "C" { #endif /* LWIP_DEBUG*/ #endif +/** Returned by sys_timeouts_sleeptime() to indicate there is no timer, so we + * can sleep forever. + */ +#define SYS_TIMEOUTS_SLEEPTIME_INFINITE 0xFFFFFFFF + /** Function prototype for a stack-internal timer function that has to be * called at a defined interval */ typedef void (* lwip_cyclic_timer_handler)(void); @@ -71,8 +76,10 @@ struct lwip_cyclic_timer { }; /** This array contains all stack-internal cyclic timers. To get the number of - * timers, use LWIP_ARRAYSIZE() */ + * timers, use lwip_num_cyclic_timers */ extern const struct lwip_cyclic_timer lwip_cyclic_timers[]; +/** Array size of lwip_cyclic_timers[] */ +extern const int lwip_num_cyclic_timers; #if LWIP_TIMERS @@ -104,13 +111,13 @@ void sys_timeout(u32_t msecs, sys_timeout_handler handler, void *arg); void sys_untimeout(sys_timeout_handler handler, void *arg); void sys_restart_timeouts(void); -#if NO_SYS void sys_check_timeouts(void); u32_t sys_timeouts_sleeptime(void); -#else /* NO_SYS */ -void sys_timeouts_mbox_fetch(sys_mbox_t *mbox, void **msg); -#endif /* NO_SYS */ +#if LWIP_TESTMODE +struct sys_timeo** sys_timeouts_get_next_timeout(void); +void lwip_cyclic_timer(void *arg); +#endif #endif /* LWIP_TIMERS */ diff --git a/Libraries/LwIP/src/include/lwip/udp.h b/Libraries/LwIP/src/include/lwip/udp.h index 4671a64..3794af4 100755 --- a/Libraries/LwIP/src/include/lwip/udp.h +++ b/Libraries/LwIP/src/include/lwip/udp.h @@ -91,8 +91,12 @@ struct udp_pcb { u16_t local_port, remote_port; #if LWIP_MULTICAST_TX_OPTIONS - /** outgoing network interface for multicast packets */ - ip_addr_t multicast_ip; +#if LWIP_IPV4 + /** outgoing network interface for multicast packets, by IPv4 address (if not 'any') */ + ip4_addr_t mcast_ip4; +#endif /* LWIP_IPV4 */ + /** outgoing network interface for multicast packets, by interface index (if nonzero) */ + u8_t mcast_ifindex; /** TTL for outgoing multicast packets */ u8_t mcast_ttl; #endif /* LWIP_MULTICAST_TX_OPTIONS */ @@ -117,6 +121,7 @@ struct udp_pcb * udp_new_ip_type(u8_t type); void udp_remove (struct udp_pcb *pcb); err_t udp_bind (struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port); +void udp_bind_netif (struct udp_pcb *pcb, const struct netif* netif); err_t udp_connect (struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port); void udp_disconnect (struct udp_pcb *pcb); @@ -150,6 +155,10 @@ err_t udp_sendto_if_src_chksum(struct udp_pcb *pcb, struct pbuf *p, #define udp_flags(pcb) ((pcb)->flags) #define udp_setflags(pcb, f) ((pcb)->flags = (f)) +#define udp_set_flags(pcb, set_flags) do { (pcb)->flags = (u8_t)((pcb)->flags | (set_flags)); } while(0) +#define udp_clear_flags(pcb, clr_flags) do { (pcb)->flags = (u8_t)((pcb)->flags & (u8_t)(~(clr_flags) & 0xff)); } while(0) +#define udp_is_flag_set(pcb, flag) (((pcb)->flags & (flag)) != 0) + /* The following functions are the lower layer interface to UDP. */ void udp_input (struct pbuf *p, struct netif *inp); @@ -159,9 +168,13 @@ void udp_init (void); #define udp_new_ip6() udp_new_ip_type(IPADDR_TYPE_V6) #if LWIP_MULTICAST_TX_OPTIONS -#define udp_set_multicast_netif_addr(pcb, ip4addr) ip_addr_copy_from_ip4((pcb)->multicast_ip, *(ip4addr)) -#define udp_get_multicast_netif_addr(pcb) ip_2_ip4(&(pcb)->multicast_ip) -#define udp_set_multicast_ttl(pcb, value) do { (pcb)->mcast_ttl = value; } while(0) +#if LWIP_IPV4 +#define udp_set_multicast_netif_addr(pcb, ip4addr) ip4_addr_copy((pcb)->mcast_ip4, *(ip4addr)) +#define udp_get_multicast_netif_addr(pcb) (&(pcb)->mcast_ip4) +#endif /* LWIP_IPV4 */ +#define udp_set_multicast_netif_index(pcb, idx) ((pcb)->mcast_ifindex = (idx)) +#define udp_get_multicast_netif_index(pcb) ((pcb)->mcast_ifindex) +#define udp_set_multicast_ttl(pcb, value) ((pcb)->mcast_ttl = (value)) #define udp_get_multicast_ttl(pcb) ((pcb)->mcast_ttl) #endif /* LWIP_MULTICAST_TX_OPTIONS */ diff --git a/Libraries/LwIP/src/include/netif/bridgeif.h b/Libraries/LwIP/src/include/netif/bridgeif.h new file mode 100644 index 0000000..f4f8cf1 --- /dev/null +++ b/Libraries/LwIP/src/include/netif/bridgeif.h @@ -0,0 +1,127 @@ +/** + * @file + * lwIP netif implementing an IEEE 802.1D MAC Bridge + */ + +/* + * Copyright (c) 2017 Simon Goldschmidt. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ +#ifndef LWIP_HDR_NETIF_BRIDGEIF_H +#define LWIP_HDR_NETIF_BRIDGEIF_H + +#include "netif/bridgeif_opts.h" + +#include "lwip/err.h" +#include "lwip/prot/ethernet.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct netif; + +#if (BRIDGEIF_MAX_PORTS < 0) || (BRIDGEIF_MAX_PORTS >= 64) +#error BRIDGEIF_MAX_PORTS must be [1..63] +#elif BRIDGEIF_MAX_PORTS < 8 +typedef u8_t bridgeif_portmask_t; +#elif BRIDGEIF_MAX_PORTS < 16 +typedef u16_t bridgeif_portmask_t; +#elif BRIDGEIF_MAX_PORTS < 32 +typedef u32_t bridgeif_portmask_t; +#elif BRIDGEIF_MAX_PORTS < 64 +typedef u64_t bridgeif_portmask_t; +#endif + +#define BR_FLOOD ((bridgeif_portmask_t)-1) + +/** @ingroup bridgeif + * Initialisation data for @ref bridgeif_init. + * An instance of this type must be passed as parameter 'state' to @ref netif_add + * when the bridge is added. + */ +typedef struct bridgeif_initdata_s { + /** MAC address of the bridge (cannot use the netif's addresses) */ + struct eth_addr ethaddr; + /** Maximum number of ports in the bridge (ports are stored in an array, this + influences memory allocated for netif->state of the bridge netif). */ + u8_t max_ports; + /** Maximum number of dynamic/learning entries in the bridge's forwarding database. + In the default implementation, this controls memory consumption only. */ + u16_t max_fdb_dynamic_entries; + /** Maximum number of static forwarding entries. Influences memory consumption! */ + u16_t max_fdb_static_entries; +} bridgeif_initdata_t; + +/** @ingroup bridgeif + * Use this for constant initialization of a bridgeif_initdat_t + * (ethaddr must be passed as ETH_ADDR()) + */ +#define BRIDGEIF_INITDATA1(max_ports, max_fdb_dynamic_entries, max_fdb_static_entries, ethaddr) {ethaddr, max_ports, max_fdb_dynamic_entries, max_fdb_static_entries} +/** @ingroup bridgeif + * Use this for constant initialization of a bridgeif_initdat_t + * (each byte of ethaddr must be passed) + */ +#define BRIDGEIF_INITDATA2(max_ports, max_fdb_dynamic_entries, max_fdb_static_entries, e0, e1, e2, e3, e4, e5) {{e0, e1, e2, e3, e4, e5}, max_ports, max_fdb_dynamic_entries, max_fdb_static_entries} + +err_t bridgeif_init(struct netif *netif); +err_t bridgeif_add_port(struct netif *bridgeif, struct netif *portif); +err_t bridgeif_fdb_add(struct netif *bridgeif, const struct eth_addr *addr, bridgeif_portmask_t ports); +err_t bridgeif_fdb_remove(struct netif *bridgeif, const struct eth_addr *addr); + +/* FDB interface, can be replaced by own implementation */ +void bridgeif_fdb_update_src(void *fdb_ptr, struct eth_addr *src_addr, u8_t port_idx); +bridgeif_portmask_t bridgeif_fdb_get_dst_ports(void *fdb_ptr, struct eth_addr *dst_addr); +void* bridgeif_fdb_init(u16_t max_fdb_entries); + +#if BRIDGEIF_PORT_NETIFS_OUTPUT_DIRECT +#ifndef BRIDGEIF_DECL_PROTECT +/* define bridgeif protection to sys_arch_protect... */ +#include "lwip/sys.h" +#define BRIDGEIF_DECL_PROTECT(lev) SYS_ARCH_DECL_PROTECT(lev) +#define BRIDGEIF_READ_PROTECT(lev) SYS_ARCH_PROTECT(lev) +#define BRIDGEIF_READ_UNPROTECT(lev) SYS_ARCH_UNPROTECT(lev) +#define BRIDGEIF_WRITE_PROTECT(lev) +#define BRIDGEIF_WRITE_UNPROTECT(lev) +#endif +#else /* BRIDGEIF_PORT_NETIFS_OUTPUT_DIRECT */ +#include "lwip/tcpip.h" +#define BRIDGEIF_DECL_PROTECT(lev) +#define BRIDGEIF_READ_PROTECT(lev) +#define BRIDGEIF_READ_UNPROTECT(lev) +#define BRIDGEIF_WRITE_PROTECT(lev) +#define BRIDGEIF_WRITE_UNPROTECT(lev) +#endif /* BRIDGEIF_PORT_NETIFS_OUTPUT_DIRECT */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_NETIF_BRIDGEIF_H */ diff --git a/Libraries/LwIP/src/include/netif/bridgeif_opts.h b/Libraries/LwIP/src/include/netif/bridgeif_opts.h new file mode 100644 index 0000000..b85c301 --- /dev/null +++ b/Libraries/LwIP/src/include/netif/bridgeif_opts.h @@ -0,0 +1,90 @@ +/** + * @file + * lwIP netif implementing an IEEE 802.1D MAC Bridge + */ + +/* + * Copyright (c) 2017 Simon Goldschmidt. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ + +#ifndef LWIP_HDR_NETIF_BRIDGEIF_OPTS_H +#define LWIP_HDR_NETIF_BRIDGEIF_OPTS_H + +#include "lwip/opt.h" + +/** + * @defgroup bridgeif_opts Options + * @ingroup bridgeif + * @{ + */ + +/** BRIDGEIF_PORT_NETIFS_OUTPUT_DIRECT==1: set port netif's 'input' function + * to call directly into bridgeif code and on top of that, directly call into + * the selected forwarding port's 'linkoutput' function. + * This means that the bridgeif input/output path is protected from concurrent access + * but as well, *all* bridge port netif's drivers must correctly handle concurrent access! + * == 0: get into tcpip_thread for every input packet (no multithreading) + * ATTENTION: as ==0 relies on tcpip.h, the default depends on NO_SYS setting + */ +#ifndef BRIDGEIF_PORT_NETIFS_OUTPUT_DIRECT +#define BRIDGEIF_PORT_NETIFS_OUTPUT_DIRECT NO_SYS +#endif + +/** BRIDGEIF_MAX_PORTS: this is used to create a typedef used for forwarding + * bit-fields: the number of bits required is this + 1 (for the internal/cpu port) + * (63 is the maximum, resulting in an u64_t for the bit mask) + * ATTENTION: this controls the maximum number of the implementation only! + * The max. number of ports per bridge must still be passed via netif_add parameter! + */ +#ifndef BRIDGEIF_MAX_PORTS +#define BRIDGEIF_MAX_PORTS 7 +#endif + +/** BRIDGEIF_DEBUG: Enable generic debugging in bridgeif.c. */ +#ifndef BRIDGEIF_DEBUG +#define BRIDGEIF_DEBUG LWIP_DBG_OFF +#endif + +/** BRIDGEIF_DEBUG: Enable FDB debugging in bridgeif.c. */ +#ifndef BRIDGEIF_FDB_DEBUG +#define BRIDGEIF_FDB_DEBUG LWIP_DBG_OFF +#endif + +/** BRIDGEIF_DEBUG: Enable forwarding debugging in bridgeif.c. */ +#ifndef BRIDGEIF_FW_DEBUG +#define BRIDGEIF_FW_DEBUG LWIP_DBG_OFF +#endif + +/** + * @} + */ + +#endif /* LWIP_HDR_NETIF_BRIDGEIF_OPTS_H */ diff --git a/Libraries/LwIP/src/include/netif/ieee802154.h b/Libraries/LwIP/src/include/netif/ieee802154.h new file mode 100644 index 0000000..54e019f --- /dev/null +++ b/Libraries/LwIP/src/include/netif/ieee802154.h @@ -0,0 +1,112 @@ +/** + * @file + * Definitions for IEEE 802.15.4 MAC frames + */ + +/* + * Copyright (c) 2018 Simon Goldschmidt. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ +#ifndef LWIP_HDR_NETIF_IEEE802154_H +#define LWIP_HDR_NETIF_IEEE802154_H + +#include "lwip/opt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +/** General MAC frame format + * This shows the full featured header, mainly for documentation. + * Some fields are omitted or shortened to achieve frame compression. + */ +struct ieee_802154_hdr { + /** See IEEE_802154_FC_* defines */ + PACK_STRUCT_FIELD(u16_t frame_control); + /** Sequence number is omitted if IEEE_802154_FC_SEQNO_SUPPR is set in frame_control */ + PACK_STRUCT_FLD_8(u8_t sequence_number); + /** Destination PAN ID is omitted if Destination Addressing Mode is 0 */ + PACK_STRUCT_FIELD(u16_t destination_pan_id); + /** Destination Address is omitted if Destination Addressing Mode is 0 */ + PACK_STRUCT_FLD_8(u8_t destination_address[8]); + /** Source PAN ID is omitted if Source Addressing Mode is 0 + or if IEEE_802154_FC_PANID_COMPR is set in frame control*/ + PACK_STRUCT_FIELD(u16_t source_pan_id); + /** Source Address is omitted if Source Addressing Mode is 0 */ + PACK_STRUCT_FLD_8(u8_t source_address[8]); + /* The rest is variable */ +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +/* Addressing modes (2 bits) */ +#define IEEE_802154_ADDR_MODE_NO_ADDR 0x00 /* PAN ID and address fields are not present */ +#define IEEE_802154_ADDR_MODE_RESERVED 0x01 /* Reserved */ +#define IEEE_802154_ADDR_MODE_SHORT 0x02 /* Address field contains a short address (16 bit) */ +#define IEEE_802154_ADDR_MODE_EXT 0x03 /* Address field contains an extended address (64 bit) */ + +/* IEEE 802.15.4 Frame Control definitions (2 bytes; see IEEE 802.15.4-2015 ch. 7.2.1) */ +#define IEEE_802154_FC_FT_MASK 0x0007 /* bits 0..2: Frame Type */ +#define IEEE_802154_FC_FT_BEACON 0x00 +#define IEEE_802154_FC_FT_DATA 0x01 +#define IEEE_802154_FC_FT_ACK 0x02 +#define IEEE_802154_FC_FT_MAC_CMD 0x03 +#define IEEE_802154_FC_FT_RESERVED 0x04 +#define IEEE_802154_FC_FT_MULTIPURPOSE 0x05 +#define IEEE_802154_FC_FT_FRAG 0x06 +#define IEEE_802154_FC_FT_EXT 0x07 +#define IEEE_802154_FC_SEC_EN 0x0008 /* bit 3: Security Enabled */ +#define IEEE_802154_FC_FRAME_PEND 0x0010 /* bit 4: Frame Pending */ +#define IEEE_802154_FC_ACK_REQ 0x0020 /* bit 5: AR (ACK required) */ +#define IEEE_802154_FC_PANID_COMPR 0x0040 /* bit 6: PAN ID Compression (src and dst are equal, src PAN ID omitted) */ +#define IEEE_802154_FC_RESERVED 0x0080 +#define IEEE_802154_FC_SEQNO_SUPPR 0x0100 /* bit 8: Sequence Number Suppression */ +#define IEEE_802154_FC_IE_PRESENT 0x0200 /* bit 9: IE Present */ +#define IEEE_802154_FC_DST_ADDR_MODE_MASK 0x0c00 /* bits 10..11: Destination Addressing Mode */ +#define IEEE_802154_FC_DST_ADDR_MODE_NO_ADDR (IEEE_802154_ADDR_MODE_NO_ADDR << 10) +#define IEEE_802154_FC_DST_ADDR_MODE_SHORT (IEEE_802154_ADDR_MODE_SHORT << 10) +#define IEEE_802154_FC_DST_ADDR_MODE_EXT (IEEE_802154_ADDR_MODE_EXT << 10) +#define IEEE_802154_FC_FRAME_VERSION_MASK 0x3000 /* bits 12..13: Frame Version */ +#define IEEE_802154_FC_FRAME_VERSION_GET(x) (((x) & IEEE_802154_FC_FRAME_VERSION_MASK) >> 12) +#define IEEE_802154_FC_SRC_ADDR_MODE_MASK 0xc000 /* bits 14..15: Source Addressing Mode */ +#define IEEE_802154_FC_SRC_ADDR_MODE_SHORT (IEEE_802154_ADDR_MODE_SHORT << 14) +#define IEEE_802154_FC_SRC_ADDR_MODE_EXT (IEEE_802154_ADDR_MODE_EXT << 14) + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_NETIF_IEEE802154_H */ diff --git a/Libraries/LwIP/src/include/netif/lowpan6.h b/Libraries/LwIP/src/include/netif/lowpan6.h index db49e30..b84b838 100755 --- a/Libraries/LwIP/src/include/netif/lowpan6.h +++ b/Libraries/LwIP/src/include/netif/lowpan6.h @@ -44,8 +44,9 @@ #include "netif/lowpan6_opts.h" -#if LWIP_IPV6 && LWIP_6LOWPAN /* don't build if not configured for use in lwipopts.h */ +#if LWIP_IPV6 +#include "netif/lowpan6_common.h" #include "lwip/pbuf.h" #include "lwip/ip.h" #include "lwip/ip_addr.h" @@ -55,12 +56,12 @@ extern "C" { #endif -/** 1 second period */ +/** 1 second period for reassembly */ #define LOWPAN6_TMR_INTERVAL 1000 void lowpan6_tmr(void); -err_t lowpan6_set_context(u8_t index, const ip6_addr_t * context); +err_t lowpan6_set_context(u8_t idx, const ip6_addr_t * context); err_t lowpan6_set_short_addr(u8_t addr_high, u8_t addr_low); #if LWIP_IPV4 @@ -73,6 +74,8 @@ err_t lowpan6_if_init(struct netif *netif); /* pan_id in network byte order. */ err_t lowpan6_set_pan_id(u16_t pan_id); +u16_t lowpan6_calc_crc(const void *buf, u16_t len); + #if !NO_SYS err_t tcpip_6lowpan_input(struct pbuf *p, struct netif *inp); #endif /* !NO_SYS */ @@ -81,6 +84,6 @@ err_t tcpip_6lowpan_input(struct pbuf *p, struct netif *inp); } #endif -#endif /* LWIP_IPV6 && LWIP_6LOWPAN */ +#endif /* LWIP_IPV6 */ #endif /* LWIP_HDR_LOWPAN6_H */ diff --git a/Libraries/LwIP/src/include/netif/lowpan6_ble.h b/Libraries/LwIP/src/include/netif/lowpan6_ble.h new file mode 100644 index 0000000..01896a7 --- /dev/null +++ b/Libraries/LwIP/src/include/netif/lowpan6_ble.h @@ -0,0 +1,78 @@ +/** + * @file + * 6LowPAN over BLE for IPv6 (RFC7668). + */ + +/* + * Copyright (c) 2017 Benjamin Aigner + * Copyright (c) 2015 Inico Technologies Ltd. , Author: Ivan Delamer + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * Author: Benjamin Aigner + * + * Based on the original 6lowpan implementation of lwIP ( @see 6lowpan.c) + */ + +#ifndef LWIP_HDR_LOWPAN6_BLE_H +#define LWIP_HDR_LOWPAN6_BLE_H + +#include "netif/lowpan6_opts.h" + +#if LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */ + +#include "netif/lowpan6_common.h" +#include "lwip/pbuf.h" +#include "lwip/ip.h" +#include "lwip/ip_addr.h" +#include "lwip/netif.h" + +#ifdef __cplusplus +extern "C" { +#endif + +err_t rfc7668_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr); +err_t rfc7668_input(struct pbuf * p, struct netif *netif); +err_t rfc7668_set_local_addr_eui64(struct netif *netif, const u8_t *local_addr, size_t local_addr_len); +err_t rfc7668_set_local_addr_mac48(struct netif *netif, const u8_t *local_addr, size_t local_addr_len, int is_public_addr); +err_t rfc7668_set_peer_addr_eui64(struct netif *netif, const u8_t *peer_addr, size_t peer_addr_len); +err_t rfc7668_set_peer_addr_mac48(struct netif *netif, const u8_t *peer_addr, size_t peer_addr_len, int is_public_addr); +err_t rfc7668_set_context(u8_t index, const ip6_addr_t * context); +err_t rfc7668_if_init(struct netif *netif); + +#if !NO_SYS +err_t tcpip_rfc7668_input(struct pbuf *p, struct netif *inp); +#endif + +void ble_addr_to_eui64(uint8_t *dst, const uint8_t *src, int public_addr); +void eui64_to_ble_addr(uint8_t *dst, const uint8_t *src); + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_IPV6 */ + +#endif /* LWIP_HDR_LOWPAN6_BLE_H */ diff --git a/Libraries/LwIP/src/include/netif/lowpan6_common.h b/Libraries/LwIP/src/include/netif/lowpan6_common.h new file mode 100644 index 0000000..0dc13ab --- /dev/null +++ b/Libraries/LwIP/src/include/netif/lowpan6_common.h @@ -0,0 +1,82 @@ +/** + * @file + * + * Common 6LowPAN routines for IPv6. Uses ND tables for link-layer addressing. Fragments packets to 6LowPAN units. + */ + +/* + * Copyright (c) 2015 Inico Technologies Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Ivan Delamer + * + * + * Please coordinate changes and requests with Ivan Delamer + * + */ + +#ifndef LWIP_HDR_LOWPAN6_COMMON_H +#define LWIP_HDR_LOWPAN6_COMMON_H + +#include "netif/lowpan6_opts.h" + +#if LWIP_IPV6 /* don't build if IPv6 is disabled in lwipopts.h */ + +#include "lwip/pbuf.h" +#include "lwip/ip.h" +#include "lwip/ip6_addr.h" +#include "lwip/netif.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** Helper define for a link layer address, which can be encoded as 0, 2 or 8 bytes */ +struct lowpan6_link_addr { + /* encoded length of the address */ + u8_t addr_len; + /* address bytes */ + u8_t addr[8]; +}; + +s8_t lowpan6_get_address_mode(const ip6_addr_t *ip6addr, const struct lowpan6_link_addr *mac_addr); + +#if LWIP_6LOWPAN_IPHC +err_t lowpan6_compress_headers(struct netif *netif, u8_t *inbuf, size_t inbuf_size, u8_t *outbuf, size_t outbuf_size, + u8_t *lowpan6_header_len_out, u8_t *hidden_header_len_out, ip6_addr_t *lowpan6_contexts, + const struct lowpan6_link_addr *src, const struct lowpan6_link_addr *dst); +struct pbuf *lowpan6_decompress(struct pbuf *p, u16_t datagram_size, ip6_addr_t *lowpan6_contexts, + struct lowpan6_link_addr *src, struct lowpan6_link_addr *dest); +#endif /* LWIP_6LOWPAN_IPHC */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_IPV6 */ + +#endif /* LWIP_HDR_LOWPAN6_COMMON_H */ diff --git a/Libraries/LwIP/src/include/netif/lowpan6_opts.h b/Libraries/LwIP/src/include/netif/lowpan6_opts.h index 96d5780..5303c15 100755 --- a/Libraries/LwIP/src/include/netif/lowpan6_opts.h +++ b/Libraries/LwIP/src/include/netif/lowpan6_opts.h @@ -43,28 +43,80 @@ #include "lwip/opt.h" -#ifndef LWIP_6LOWPAN -#define LWIP_6LOWPAN 0 -#endif - +/** LWIP_6LOWPAN_NUM_CONTEXTS: define the number of compression + * contexts per netif type + */ #ifndef LWIP_6LOWPAN_NUM_CONTEXTS #define LWIP_6LOWPAN_NUM_CONTEXTS 10 #endif +/** LWIP_6LOWPAN_INFER_SHORT_ADDRESS: set this to 0 to disable creating + * short addresses for matching addresses (debug only) + */ #ifndef LWIP_6LOWPAN_INFER_SHORT_ADDRESS #define LWIP_6LOWPAN_INFER_SHORT_ADDRESS 1 #endif +/** LWIP_6LOWPAN_IPHC: set this to 0 to disable IP header compression as per + * RFC 6282 (which is mandatory for BLE) + */ #ifndef LWIP_6LOWPAN_IPHC #define LWIP_6LOWPAN_IPHC 1 #endif -#ifndef LWIP_6LOWPAN_HW_CRC -#define LWIP_6LOWPAN_HW_CRC 1 +/** Set this to 1 if your IEEE 802.15.4 interface can calculate and check the + * CRC in hardware. This means TX packets get 2 zero bytes added on transmission + * which are to be filled with the CRC. + */ +#ifndef LWIP_6LOWPAN_802154_HW_CRC +#define LWIP_6LOWPAN_802154_HW_CRC 0 #endif -#ifndef LOWPAN6_DEBUG -#define LOWPAN6_DEBUG LWIP_DBG_OFF +/** If LWIP_6LOWPAN_802154_HW_CRC==0, this can override the default slow + * implementation of the CRC used for 6LoWPAN over IEEE 802.15.4 (which uses + * a shift register). + */ +#ifndef LWIP_6LOWPAN_CALC_CRC +#define LWIP_6LOWPAN_CALC_CRC(buf, len) lowpan6_calc_crc(buf, len) #endif +/** Debug level for 6LoWPAN in general */ +#ifndef LWIP_LOWPAN6_DEBUG +#define LWIP_LOWPAN6_DEBUG LWIP_DBG_OFF +#endif + +/** Debug level for 6LoWPAN over IEEE 802.15.4 */ +#ifndef LWIP_LOWPAN6_802154_DEBUG +#define LWIP_LOWPAN6_802154_DEBUG LWIP_DBG_OFF +#endif + +/** LWIP_LOWPAN6_IP_COMPRESSED_DEBUG: enable compressed IP frame + * output debugging + */ +#ifndef LWIP_LOWPAN6_IP_COMPRESSED_DEBUG +#define LWIP_LOWPAN6_IP_COMPRESSED_DEBUG LWIP_DBG_OFF +#endif + +/** LWIP_LOWPAN6_DECOMPRESSION_DEBUG: enable decompression debug output + */ +#ifndef LWIP_LOWPAN6_DECOMPRESSION_DEBUG +#define LWIP_LOWPAN6_DECOMPRESSION_DEBUG LWIP_DBG_OFF +#endif + +/** LWIP_RFC7668_IP_UNCOMPRESSED_DEBUG: enable decompressed IP frame + * output debugging */ +#ifndef LWIP_RFC7668_IP_UNCOMPRESSED_DEBUG +#define LWIP_RFC7668_IP_UNCOMPRESSED_DEBUG LWIP_DBG_OFF +#endif + +/** LWIP_RFC7668_LINUX_WORKAROUND_PUBLIC_ADDRESS: + * Currently, the linux kernel driver for 6lowpan sets/clears a bit in + * the address, depending on the BD address (either public or not). + * Might not be RFC7668 conform, so you may select to do that (=1) or + * not (=0) */ +#ifndef LWIP_RFC7668_LINUX_WORKAROUND_PUBLIC_ADDRESS +#define LWIP_RFC7668_LINUX_WORKAROUND_PUBLIC_ADDRESS 1 +#endif + + #endif /* LWIP_HDR_LOWPAN6_OPTS_H */ diff --git a/Libraries/LwIP/src/include/netif/ppp/ccp.h b/Libraries/LwIP/src/include/netif/ppp/ccp.h index d993a3f..c35336f 100755 --- a/Libraries/LwIP/src/include/netif/ppp/ccp.h +++ b/Libraries/LwIP/src/include/netif/ppp/ccp.h @@ -36,52 +36,56 @@ #ifndef CCP_H #define CCP_H +#ifdef __cplusplus +extern "C" { +#endif + /* * CCP codes. */ -#define CCP_CONFREQ 1 -#define CCP_CONFACK 2 -#define CCP_TERMREQ 5 -#define CCP_TERMACK 6 -#define CCP_RESETREQ 14 -#define CCP_RESETACK 15 +#define CCP_CONFREQ 1 +#define CCP_CONFACK 2 +#define CCP_TERMREQ 5 +#define CCP_TERMACK 6 +#define CCP_RESETREQ 14 +#define CCP_RESETACK 15 /* * Max # bytes for a CCP option */ -#define CCP_MAX_OPTION_LENGTH 32 +#define CCP_MAX_OPTION_LENGTH 32 /* * Parts of a CCP packet. */ -#define CCP_CODE(dp) ((dp)[0]) -#define CCP_ID(dp) ((dp)[1]) -#define CCP_LENGTH(dp) (((dp)[2] << 8) + (dp)[3]) -#define CCP_HDRLEN 4 +#define CCP_CODE(dp) ((dp)[0]) +#define CCP_ID(dp) ((dp)[1]) +#define CCP_LENGTH(dp) (((dp)[2] << 8) + (dp)[3]) +#define CCP_HDRLEN 4 -#define CCP_OPT_CODE(dp) ((dp)[0]) -#define CCP_OPT_LENGTH(dp) ((dp)[1]) -#define CCP_OPT_MINLEN 2 +#define CCP_OPT_CODE(dp) ((dp)[0]) +#define CCP_OPT_LENGTH(dp) ((dp)[1]) +#define CCP_OPT_MINLEN 2 #if BSDCOMPRESS_SUPPORT /* * Definitions for BSD-Compress. */ -#define CI_BSD_COMPRESS 21 /* config. option for BSD-Compress */ -#define CILEN_BSD_COMPRESS 3 /* length of config. option */ +#define CI_BSD_COMPRESS 21 /* config. option for BSD-Compress */ +#define CILEN_BSD_COMPRESS 3 /* length of config. option */ /* Macros for handling the 3rd byte of the BSD-Compress config option. */ -#define BSD_NBITS(x) ((x) & 0x1F) /* number of bits requested */ -#define BSD_VERSION(x) ((x) >> 5) /* version of option format */ -#define BSD_CURRENT_VERSION 1 /* current version number */ -#define BSD_MAKE_OPT(v, n) (((v) << 5) | (n)) +#define BSD_NBITS(x) ((x) & 0x1F) /* number of bits requested */ +#define BSD_VERSION(x) ((x) >> 5) /* version of option format */ +#define BSD_CURRENT_VERSION 1 /* current version number */ +#define BSD_MAKE_OPT(v, n) (((v) << 5) | (n)) -#define BSD_MIN_BITS 9 /* smallest code size supported */ -#define BSD_MAX_BITS 15 /* largest code size supported */ +#define BSD_MIN_BITS 9 /* smallest code size supported */ +#define BSD_MAX_BITS 15 /* largest code size supported */ #endif /* BSDCOMPRESS_SUPPORT */ #if DEFLATE_SUPPORT @@ -89,17 +93,17 @@ * Definitions for Deflate. */ -#define CI_DEFLATE 26 /* config option for Deflate */ -#define CI_DEFLATE_DRAFT 24 /* value used in original draft RFC */ -#define CILEN_DEFLATE 4 /* length of its config option */ +#define CI_DEFLATE 26 /* config option for Deflate */ +#define CI_DEFLATE_DRAFT 24 /* value used in original draft RFC */ +#define CILEN_DEFLATE 4 /* length of its config option */ -#define DEFLATE_MIN_SIZE 9 -#define DEFLATE_MAX_SIZE 15 -#define DEFLATE_METHOD_VAL 8 -#define DEFLATE_SIZE(x) (((x) >> 4) + 8) -#define DEFLATE_METHOD(x) ((x) & 0x0F) -#define DEFLATE_MAKE_OPT(w) ((((w) - 8) << 4) + DEFLATE_METHOD_VAL) -#define DEFLATE_CHK_SEQUENCE 0 +#define DEFLATE_MIN_SIZE 9 +#define DEFLATE_MAX_SIZE 15 +#define DEFLATE_METHOD_VAL 8 +#define DEFLATE_SIZE(x) (((x) >> 4) + 8) +#define DEFLATE_METHOD(x) ((x) & 0x0F) +#define DEFLATE_MAKE_OPT(w) ((((w) - 8) << 4) + DEFLATE_METHOD_VAL) +#define DEFLATE_CHK_SEQUENCE 0 #endif /* DEFLATE_SUPPORT */ #if MPPE_SUPPORT @@ -116,10 +120,10 @@ * Definitions for other, as yet unsupported, compression methods. */ -#define CI_PREDICTOR_1 1 /* config option for Predictor-1 */ -#define CILEN_PREDICTOR_1 2 /* length of its config option */ -#define CI_PREDICTOR_2 2 /* config option for Predictor-2 */ -#define CILEN_PREDICTOR_2 2 /* length of its config option */ +#define CI_PREDICTOR_1 1 /* config option for Predictor-1 */ +#define CILEN_PREDICTOR_1 2 /* length of its config option */ +#define CI_PREDICTOR_2 2 /* config option for Predictor-2 */ +#define CILEN_PREDICTOR_2 2 /* length of its config option */ #endif /* PREDICTOR_SUPPORT */ typedef struct ccp_options { @@ -137,20 +141,24 @@ typedef struct ccp_options { #endif /* PREDICTOR_SUPPORT */ #if MPPE_SUPPORT - u8_t mppe; /* MPPE bitfield */ + u8_t mppe; /* MPPE bitfield */ #endif /* MPPE_SUPPORT */ #if BSDCOMPRESS_SUPPORT - u_short bsd_bits; /* # bits/code for BSD Compress */ + u_short bsd_bits; /* # bits/code for BSD Compress */ #endif /* BSDCOMPRESS_SUPPORT */ #if DEFLATE_SUPPORT - u_short deflate_size; /* lg(window size) for Deflate */ + u_short deflate_size; /* lg(window size) for Deflate */ #endif /* DEFLATE_SUPPORT */ - u8_t method; /* code for chosen compression method */ + u8_t method; /* code for chosen compression method */ } ccp_options; extern const struct protent ccp_protent; void ccp_resetrequest(ppp_pcb *pcb); /* Issue a reset-request. */ +#ifdef __cplusplus +} +#endif + #endif /* CCP_H */ #endif /* PPP_SUPPORT && CCP_SUPPORT */ diff --git a/Libraries/LwIP/src/include/netif/ppp/chap-new.h b/Libraries/LwIP/src/include/netif/ppp/chap-new.h index 171c702..dadd9c2 100755 --- a/Libraries/LwIP/src/include/netif/ppp/chap-new.h +++ b/Libraries/LwIP/src/include/netif/ppp/chap-new.h @@ -36,48 +36,52 @@ #include "ppp.h" +#ifdef __cplusplus +extern "C" { +#endif + /* * CHAP packets begin with a standard header with code, id, len (2 bytes). */ -#define CHAP_HDRLEN 4 +#define CHAP_HDRLEN 4 /* * Values for the code field. */ -#define CHAP_CHALLENGE 1 -#define CHAP_RESPONSE 2 -#define CHAP_SUCCESS 3 -#define CHAP_FAILURE 4 +#define CHAP_CHALLENGE 1 +#define CHAP_RESPONSE 2 +#define CHAP_SUCCESS 3 +#define CHAP_FAILURE 4 /* * CHAP digest codes. */ -#define CHAP_MD5 5 +#define CHAP_MD5 5 #if MSCHAP_SUPPORT -#define CHAP_MICROSOFT 0x80 -#define CHAP_MICROSOFT_V2 0x81 +#define CHAP_MICROSOFT 0x80 +#define CHAP_MICROSOFT_V2 0x81 #endif /* MSCHAP_SUPPORT */ /* * Semi-arbitrary limits on challenge and response fields. */ -#define MAX_CHALLENGE_LEN 64 -#define MAX_RESPONSE_LEN 64 +#define MAX_CHALLENGE_LEN 64 +#define MAX_RESPONSE_LEN 64 /* * These limits apply to challenge and response packets we send. * The +4 is the +1 that we actually need rounded up. */ -#define CHAL_MAX_PKTLEN (PPP_HDRLEN + CHAP_HDRLEN + 4 + MAX_CHALLENGE_LEN + MAXNAMELEN) -#define RESP_MAX_PKTLEN (PPP_HDRLEN + CHAP_HDRLEN + 4 + MAX_RESPONSE_LEN + MAXNAMELEN) +#define CHAL_MAX_PKTLEN (PPP_HDRLEN + CHAP_HDRLEN + 4 + MAX_CHALLENGE_LEN + MAXNAMELEN) +#define RESP_MAX_PKTLEN (PPP_HDRLEN + CHAP_HDRLEN + 4 + MAX_RESPONSE_LEN + MAXNAMELEN) /* bitmask of supported algorithms */ #if MSCHAP_SUPPORT -#define MDTYPE_MICROSOFT_V2 0x1 -#define MDTYPE_MICROSOFT 0x2 +#define MDTYPE_MICROSOFT_V2 0x1 +#define MDTYPE_MICROSOFT 0x2 #endif /* MSCHAP_SUPPORT */ -#define MDTYPE_MD5 0x4 -#define MDTYPE_NONE 0 +#define MDTYPE_MD5 0x4 +#define MDTYPE_NONE 0 #if MSCHAP_SUPPORT /* Return the digest alg. ID for the most preferred digest type. */ @@ -125,24 +129,24 @@ * The code for each digest type has to supply one of these. */ struct chap_digest_type { - int code; + int code; #if PPP_SERVER - /* - * Note: challenge and response arguments below are formatted as - * a length byte followed by the actual challenge/response data. - */ - void (*generate_challenge)(ppp_pcb *pcb, unsigned char *challenge); - int (*verify_response)(ppp_pcb *pcb, int id, const char *name, - const unsigned char *secret, int secret_len, - const unsigned char *challenge, const unsigned char *response, - char *message, int message_space); + /* + * Note: challenge and response arguments below are formatted as + * a length byte followed by the actual challenge/response data. + */ + void (*generate_challenge)(ppp_pcb *pcb, unsigned char *challenge); + int (*verify_response)(ppp_pcb *pcb, int id, const char *name, + const unsigned char *secret, int secret_len, + const unsigned char *challenge, const unsigned char *response, + char *message, int message_space); #endif /* PPP_SERVER */ - void (*make_response)(ppp_pcb *pcb, unsigned char *response, int id, const char *our_name, - const unsigned char *challenge, const char *secret, int secret_len, - unsigned char *priv); - int (*check_success)(ppp_pcb *pcb, unsigned char *pkt, int len, unsigned char *priv); - void (*handle_failure)(ppp_pcb *pcb, unsigned char *pkt, int len); + void (*make_response)(ppp_pcb *pcb, unsigned char *response, int id, const char *our_name, + const unsigned char *challenge, const char *secret, int secret_len, + unsigned char *priv); + int (*check_success)(ppp_pcb *pcb, unsigned char *pkt, int len, unsigned char *priv); + void (*handle_failure)(ppp_pcb *pcb, unsigned char *pkt, int len); }; /* @@ -150,21 +154,21 @@ struct chap_digest_type { */ #if CHAP_SUPPORT typedef struct chap_client_state { - u8_t flags; - const char *name; - const struct chap_digest_type *digest; - unsigned char priv[64]; /* private area for digest's use */ + u8_t flags; + const char *name; + const struct chap_digest_type *digest; + unsigned char priv[64]; /* private area for digest's use */ } chap_client_state; #if PPP_SERVER typedef struct chap_server_state { - u8_t flags; - u8_t id; - const char *name; - const struct chap_digest_type *digest; - int challenge_xmits; - int challenge_pktlen; - unsigned char challenge[CHAL_MAX_PKTLEN]; + u8_t flags; + u8_t id; + const char *name; + const struct chap_digest_type *digest; + int challenge_xmits; + int challenge_pktlen; + unsigned char challenge[CHAL_MAX_PKTLEN]; } chap_server_state; #endif /* PPP_SERVER */ #endif /* CHAP_SUPPORT */ @@ -172,9 +176,9 @@ typedef struct chap_server_state { #if 0 /* UNUSED */ /* Hook for a plugin to validate CHAP challenge */ extern int (*chap_verify_hook)(char *name, char *ourname, int id, - const struct chap_digest_type *digest, - unsigned char *challenge, unsigned char *response, - char *message, int message_space); + const struct chap_digest_type *digest, + unsigned char *challenge, unsigned char *response, + char *message, int message_space); #endif /* UNUSED */ #if PPP_SERVER @@ -188,5 +192,9 @@ extern void chap_auth_with_peer(ppp_pcb *pcb, const char *our_name, int digest_c /* Represents the CHAP protocol to the main pppd code */ extern const struct protent chap_protent; +#ifdef __cplusplus +} +#endif + #endif /* CHAP_H */ #endif /* PPP_SUPPORT && CHAP_SUPPORT */ diff --git a/Libraries/LwIP/src/include/netif/ppp/eap.h b/Libraries/LwIP/src/include/netif/ppp/eap.h index 4921ce9..61efdaf 100755 --- a/Libraries/LwIP/src/include/netif/ppp/eap.h +++ b/Libraries/LwIP/src/include/netif/ppp/eap.h @@ -24,135 +24,135 @@ #if PPP_SUPPORT && EAP_SUPPORT /* don't build if not configured for use in lwipopts.h */ #ifndef PPP_EAP_H -#define PPP_EAP_H +#define PPP_EAP_H #include "ppp.h" -#ifdef __cplusplus +#ifdef __cplusplus extern "C" { #endif /* * Packet header = Code, id, length. */ -#define EAP_HEADERLEN 4 +#define EAP_HEADERLEN 4 /* EAP message codes. */ -#define EAP_REQUEST 1 -#define EAP_RESPONSE 2 -#define EAP_SUCCESS 3 -#define EAP_FAILURE 4 +#define EAP_REQUEST 1 +#define EAP_RESPONSE 2 +#define EAP_SUCCESS 3 +#define EAP_FAILURE 4 /* EAP types */ -#define EAPT_IDENTITY 1 -#define EAPT_NOTIFICATION 2 -#define EAPT_NAK 3 /* (response only) */ -#define EAPT_MD5CHAP 4 -#define EAPT_OTP 5 /* One-Time Password; RFC 1938 */ -#define EAPT_TOKEN 6 /* Generic Token Card */ +#define EAPT_IDENTITY 1 +#define EAPT_NOTIFICATION 2 +#define EAPT_NAK 3 /* (response only) */ +#define EAPT_MD5CHAP 4 +#define EAPT_OTP 5 /* One-Time Password; RFC 1938 */ +#define EAPT_TOKEN 6 /* Generic Token Card */ /* 7 and 8 are unassigned. */ -#define EAPT_RSA 9 /* RSA Public Key Authentication */ -#define EAPT_DSS 10 /* DSS Unilateral */ -#define EAPT_KEA 11 /* KEA */ -#define EAPT_KEA_VALIDATE 12 /* KEA-VALIDATE */ -#define EAPT_TLS 13 /* EAP-TLS */ -#define EAPT_DEFENDER 14 /* Defender Token (AXENT) */ -#define EAPT_W2K 15 /* Windows 2000 EAP */ -#define EAPT_ARCOT 16 /* Arcot Systems */ -#define EAPT_CISCOWIRELESS 17 /* Cisco Wireless */ -#define EAPT_NOKIACARD 18 /* Nokia IP smart card */ -#define EAPT_SRP 19 /* Secure Remote Password */ +#define EAPT_RSA 9 /* RSA Public Key Authentication */ +#define EAPT_DSS 10 /* DSS Unilateral */ +#define EAPT_KEA 11 /* KEA */ +#define EAPT_KEA_VALIDATE 12 /* KEA-VALIDATE */ +#define EAPT_TLS 13 /* EAP-TLS */ +#define EAPT_DEFENDER 14 /* Defender Token (AXENT) */ +#define EAPT_W2K 15 /* Windows 2000 EAP */ +#define EAPT_ARCOT 16 /* Arcot Systems */ +#define EAPT_CISCOWIRELESS 17 /* Cisco Wireless */ +#define EAPT_NOKIACARD 18 /* Nokia IP smart card */ +#define EAPT_SRP 19 /* Secure Remote Password */ /* 20 is deprecated */ /* EAP SRP-SHA1 Subtypes */ -#define EAPSRP_CHALLENGE 1 /* Request 1 - Challenge */ -#define EAPSRP_CKEY 1 /* Response 1 - Client Key */ -#define EAPSRP_SKEY 2 /* Request 2 - Server Key */ -#define EAPSRP_CVALIDATOR 2 /* Response 2 - Client Validator */ -#define EAPSRP_SVALIDATOR 3 /* Request 3 - Server Validator */ -#define EAPSRP_ACK 3 /* Response 3 - final ack */ -#define EAPSRP_LWRECHALLENGE 4 /* Req/resp 4 - Lightweight rechal */ +#define EAPSRP_CHALLENGE 1 /* Request 1 - Challenge */ +#define EAPSRP_CKEY 1 /* Response 1 - Client Key */ +#define EAPSRP_SKEY 2 /* Request 2 - Server Key */ +#define EAPSRP_CVALIDATOR 2 /* Response 2 - Client Validator */ +#define EAPSRP_SVALIDATOR 3 /* Request 3 - Server Validator */ +#define EAPSRP_ACK 3 /* Response 3 - final ack */ +#define EAPSRP_LWRECHALLENGE 4 /* Req/resp 4 - Lightweight rechal */ -#define SRPVAL_EBIT 0x00000001 /* Use shared key for ECP */ +#define SRPVAL_EBIT 0x00000001 /* Use shared key for ECP */ -#define SRP_PSEUDO_ID "pseudo_" -#define SRP_PSEUDO_LEN 7 +#define SRP_PSEUDO_ID "pseudo_" +#define SRP_PSEUDO_LEN 7 -#define MD5_SIGNATURE_SIZE 16 -#define EAP_MIN_CHALLENGE_LENGTH 17 -#define EAP_MAX_CHALLENGE_LENGTH 24 +#define MD5_SIGNATURE_SIZE 16 +#define EAP_MIN_CHALLENGE_LENGTH 17 +#define EAP_MAX_CHALLENGE_LENGTH 24 #define EAP_MIN_MAX_POWER_OF_TWO_CHALLENGE_LENGTH 3 /* 2^3-1 = 7, 17+7 = 24 */ -#define EAP_STATES \ - "Initial", "Pending", "Closed", "Listen", "Identify", \ - "SRP1", "SRP2", "SRP3", "MD5Chall", "Open", "SRP4", "BadAuth" +#define EAP_STATES \ + "Initial", "Pending", "Closed", "Listen", "Identify", \ + "SRP1", "SRP2", "SRP3", "MD5Chall", "Open", "SRP4", "BadAuth" -#define eap_client_active(pcb) ((pcb)->eap.es_client.ea_state == eapListen) +#define eap_client_active(pcb) ((pcb)->eap.es_client.ea_state == eapListen) #if PPP_SERVER -#define eap_server_active(pcb) \ - ((pcb)->eap.es_server.ea_state >= eapIdentify && \ - (pcb)->eap.es_server.ea_state <= eapMD5Chall) +#define eap_server_active(pcb) \ + ((pcb)->eap.es_server.ea_state >= eapIdentify && \ + (pcb)->eap.es_server.ea_state <= eapMD5Chall) #endif /* PPP_SERVER */ /* * Complete EAP state for one PPP session. */ enum eap_state_code { - eapInitial = 0, /* No EAP authentication yet requested */ - eapPending, /* Waiting for LCP (no timer) */ - eapClosed, /* Authentication not in use */ - eapListen, /* Client ready (and timer running) */ - eapIdentify, /* EAP Identify sent */ - eapSRP1, /* Sent EAP SRP-SHA1 Subtype 1 */ - eapSRP2, /* Sent EAP SRP-SHA1 Subtype 2 */ - eapSRP3, /* Sent EAP SRP-SHA1 Subtype 3 */ - eapMD5Chall, /* Sent MD5-Challenge */ - eapOpen, /* Completed authentication */ - eapSRP4, /* Sent EAP SRP-SHA1 Subtype 4 */ - eapBadAuth /* Failed authentication */ + eapInitial = 0, /* No EAP authentication yet requested */ + eapPending, /* Waiting for LCP (no timer) */ + eapClosed, /* Authentication not in use */ + eapListen, /* Client ready (and timer running) */ + eapIdentify, /* EAP Identify sent */ + eapSRP1, /* Sent EAP SRP-SHA1 Subtype 1 */ + eapSRP2, /* Sent EAP SRP-SHA1 Subtype 2 */ + eapSRP3, /* Sent EAP SRP-SHA1 Subtype 3 */ + eapMD5Chall, /* Sent MD5-Challenge */ + eapOpen, /* Completed authentication */ + eapSRP4, /* Sent EAP SRP-SHA1 Subtype 4 */ + eapBadAuth /* Failed authentication */ }; struct eap_auth { - const char *ea_name; /* Our name */ - char ea_peer[MAXNAMELEN +1]; /* Peer's name */ - void *ea_session; /* Authentication library linkage */ - u_char *ea_skey; /* Shared encryption key */ - u_short ea_namelen; /* Length of our name */ - u_short ea_peerlen; /* Length of peer's name */ - enum eap_state_code ea_state; - u_char ea_id; /* Current id */ - u_char ea_requests; /* Number of Requests sent/received */ - u_char ea_responses; /* Number of Responses */ - u_char ea_type; /* One of EAPT_* */ - u32_t ea_keyflags; /* SRP shared key usage flags */ + const char *ea_name; /* Our name */ + char ea_peer[MAXNAMELEN +1]; /* Peer's name */ + void *ea_session; /* Authentication library linkage */ + u_char *ea_skey; /* Shared encryption key */ + u_short ea_namelen; /* Length of our name */ + u_short ea_peerlen; /* Length of peer's name */ + enum eap_state_code ea_state; + u_char ea_id; /* Current id */ + u_char ea_requests; /* Number of Requests sent/received */ + u_char ea_responses; /* Number of Responses */ + u_char ea_type; /* One of EAPT_* */ + u32_t ea_keyflags; /* SRP shared key usage flags */ }; #ifndef EAP_MAX_CHALLENGE_LENGTH -#define EAP_MAX_CHALLENGE_LENGTH 24 +#define EAP_MAX_CHALLENGE_LENGTH 24 #endif typedef struct eap_state { - struct eap_auth es_client; /* Client (authenticatee) data */ + struct eap_auth es_client; /* Client (authenticatee) data */ #if PPP_SERVER - struct eap_auth es_server; /* Server (authenticator) data */ + struct eap_auth es_server; /* Server (authenticator) data */ #endif /* PPP_SERVER */ - int es_savedtime; /* Saved timeout */ - int es_rechallenge; /* EAP rechallenge interval */ - int es_lwrechallenge; /* SRP lightweight rechallenge inter */ - u8_t es_usepseudo; /* Use SRP Pseudonym if offered one */ - int es_usedpseudo; /* Set if we already sent PN */ - int es_challen; /* Length of challenge string */ - u_char es_challenge[EAP_MAX_CHALLENGE_LENGTH]; + int es_savedtime; /* Saved timeout */ + int es_rechallenge; /* EAP rechallenge interval */ + int es_lwrechallenge; /* SRP lightweight rechallenge inter */ + u8_t es_usepseudo; /* Use SRP Pseudonym if offered one */ + int es_usedpseudo; /* Set if we already sent PN */ + int es_challen; /* Length of challenge string */ + u_char es_challenge[EAP_MAX_CHALLENGE_LENGTH]; } eap_state; /* * Timeouts. */ #if 0 /* moved to ppp_opts.h */ -#define EAP_DEFTIMEOUT 3 /* Timeout (seconds) for rexmit */ -#define EAP_DEFTRANSMITS 10 /* max # times to transmit */ -#define EAP_DEFREQTIME 20 /* Time to wait for peer request */ -#define EAP_DEFALLOWREQ 20 /* max # times to accept requests */ +#define EAP_DEFTIMEOUT 3 /* Timeout (seconds) for rexmit */ +#define EAP_DEFTRANSMITS 10 /* max # times to transmit */ +#define EAP_DEFREQTIME 20 /* Time to wait for peer request */ +#define EAP_DEFALLOWREQ 20 /* max # times to accept requests */ #endif /* moved to ppp_opts.h */ void eap_authwithpeer(ppp_pcb *pcb, const char *localname); @@ -160,7 +160,7 @@ void eap_authpeer(ppp_pcb *pcb, const char *localname); extern const struct protent eap_protent; -#ifdef __cplusplus +#ifdef __cplusplus } #endif diff --git a/Libraries/LwIP/src/include/netif/ppp/ecp.h b/Libraries/LwIP/src/include/netif/ppp/ecp.h index e389acb..8be1872 100755 --- a/Libraries/LwIP/src/include/netif/ppp/ecp.h +++ b/Libraries/LwIP/src/include/netif/ppp/ecp.h @@ -34,9 +34,16 @@ #include "netif/ppp/ppp_opts.h" #if PPP_SUPPORT && ECP_SUPPORT /* don't build if not configured for use in lwipopts.h */ +#ifndef ECP_H +#define ECP_H + +#ifdef __cplusplus +extern "C" { +#endif + typedef struct ecp_options { - bool required; /* Is ECP required? */ - unsigned enctype; /* Encryption type */ + bool required; /* Is ECP required? */ + unsigned enctype; /* Encryption type */ } ecp_options; extern fsm ecp_fsm[]; @@ -47,4 +54,9 @@ extern ecp_options ecp_hisoptions[]; extern const struct protent ecp_protent; +#ifdef __cplusplus +} +#endif + +#endif /* ECP_H */ #endif /* PPP_SUPPORT && ECP_SUPPORT */ diff --git a/Libraries/LwIP/src/include/netif/ppp/eui64.h b/Libraries/LwIP/src/include/netif/ppp/eui64.h index d9f4a2f..ad199ea 100755 --- a/Libraries/LwIP/src/include/netif/ppp/eui64.h +++ b/Libraries/LwIP/src/include/netif/ppp/eui64.h @@ -41,6 +41,10 @@ #ifndef EUI64_H #define EUI64_H +#ifdef __cplusplus +extern "C" { +#endif + /* * @todo: * @@ -53,42 +57,46 @@ typedef union u32_t e32[2]; } eui64_t; -#define eui64_iszero(e) (((e).e32[0] | (e).e32[1]) == 0) -#define eui64_equals(e, o) (((e).e32[0] == (o).e32[0]) && \ - ((e).e32[1] == (o).e32[1])) -#define eui64_zero(e) (e).e32[0] = (e).e32[1] = 0; +#define eui64_iszero(e) (((e).e32[0] | (e).e32[1]) == 0) +#define eui64_equals(e, o) (((e).e32[0] == (o).e32[0]) && \ + ((e).e32[1] == (o).e32[1])) +#define eui64_zero(e) (e).e32[0] = (e).e32[1] = 0; -#define eui64_copy(s, d) memcpy(&(d), &(s), sizeof(eui64_t)) +#define eui64_copy(s, d) memcpy(&(d), &(s), sizeof(eui64_t)) -#define eui64_magic(e) do { \ - (e).e32[0] = magic(); \ - (e).e32[1] = magic(); \ - (e).e8[0] &= ~2; \ - } while (0) -#define eui64_magic_nz(x) do { \ - eui64_magic(x); \ - } while (eui64_iszero(x)) -#define eui64_magic_ne(x, y) do { \ - eui64_magic(x); \ - } while (eui64_equals(x, y)) +#define eui64_magic(e) do { \ + (e).e32[0] = magic(); \ + (e).e32[1] = magic(); \ + (e).e8[0] &= ~2; \ + } while (0) +#define eui64_magic_nz(x) do { \ + eui64_magic(x); \ + } while (eui64_iszero(x)) +#define eui64_magic_ne(x, y) do { \ + eui64_magic(x); \ + } while (eui64_equals(x, y)) -#define eui64_get(ll, cp) do { \ - eui64_copy((*cp), (ll)); \ - (cp) += sizeof(eui64_t); \ - } while (0) +#define eui64_get(ll, cp) do { \ + eui64_copy((*cp), (ll)); \ + (cp) += sizeof(eui64_t); \ + } while (0) -#define eui64_put(ll, cp) do { \ - eui64_copy((ll), (*cp)); \ - (cp) += sizeof(eui64_t); \ - } while (0) +#define eui64_put(ll, cp) do { \ + eui64_copy((ll), (*cp)); \ + (cp) += sizeof(eui64_t); \ + } while (0) -#define eui64_set32(e, l) do { \ - (e).e32[0] = 0; \ - (e).e32[1] = lwip_htonl(l); \ - } while (0) -#define eui64_setlo32(e, l) eui64_set32(e, l) +#define eui64_set32(e, l) do { \ + (e).e32[0] = 0; \ + (e).e32[1] = lwip_htonl(l); \ + } while (0) +#define eui64_setlo32(e, l) eui64_set32(e, l) -char *eui64_ntoa(eui64_t); /* Returns ascii representation of id */ +char *eui64_ntoa(eui64_t); /* Returns ascii representation of id */ + +#ifdef __cplusplus +} +#endif #endif /* EUI64_H */ #endif /* PPP_SUPPORT && PPP_IPV6_SUPPORT */ diff --git a/Libraries/LwIP/src/include/netif/ppp/fsm.h b/Libraries/LwIP/src/include/netif/ppp/fsm.h index 3625a22..e91536d 100755 --- a/Libraries/LwIP/src/include/netif/ppp/fsm.h +++ b/Libraries/LwIP/src/include/netif/ppp/fsm.h @@ -46,115 +46,119 @@ #if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ #ifndef FSM_H -#define FSM_H +#define FSM_H #include "ppp.h" +#ifdef __cplusplus +extern "C" { +#endif + /* * Packet header = Code, id, length. */ -#define HEADERLEN 4 +#define HEADERLEN 4 /* * CP (LCP, IPCP, etc.) codes. */ -#define CONFREQ 1 /* Configuration Request */ -#define CONFACK 2 /* Configuration Ack */ -#define CONFNAK 3 /* Configuration Nak */ -#define CONFREJ 4 /* Configuration Reject */ -#define TERMREQ 5 /* Termination Request */ -#define TERMACK 6 /* Termination Ack */ -#define CODEREJ 7 /* Code Reject */ +#define CONFREQ 1 /* Configuration Request */ +#define CONFACK 2 /* Configuration Ack */ +#define CONFNAK 3 /* Configuration Nak */ +#define CONFREJ 4 /* Configuration Reject */ +#define TERMREQ 5 /* Termination Request */ +#define TERMACK 6 /* Termination Ack */ +#define CODEREJ 7 /* Code Reject */ /* * Each FSM is described by an fsm structure and fsm callbacks. */ typedef struct fsm { - ppp_pcb *pcb; /* PPP Interface */ - const struct fsm_callbacks *callbacks; /* Callback routines */ - const char *term_reason; /* Reason for closing protocol */ - u8_t seen_ack; /* Have received valid Ack/Nak/Rej to Req */ - /* -- This is our only flag, we might use u_int :1 if we have more flags */ - u16_t protocol; /* Data Link Layer Protocol field value */ - u8_t state; /* State */ - u8_t flags; /* Contains option bits */ - u8_t id; /* Current id */ - u8_t reqid; /* Current request id */ - u8_t retransmits; /* Number of retransmissions left */ - u8_t nakloops; /* Number of nak loops since last ack */ - u8_t rnakloops; /* Number of naks received */ - u8_t maxnakloops; /* Maximum number of nak loops tolerated - (necessary because IPCP require a custom large max nak loops value) */ - u8_t term_reason_len; /* Length of term_reason */ + ppp_pcb *pcb; /* PPP Interface */ + const struct fsm_callbacks *callbacks; /* Callback routines */ + const char *term_reason; /* Reason for closing protocol */ + u8_t seen_ack; /* Have received valid Ack/Nak/Rej to Req */ + /* -- This is our only flag, we might use u_int :1 if we have more flags */ + u16_t protocol; /* Data Link Layer Protocol field value */ + u8_t state; /* State */ + u8_t flags; /* Contains option bits */ + u8_t id; /* Current id */ + u8_t reqid; /* Current request id */ + u8_t retransmits; /* Number of retransmissions left */ + u8_t nakloops; /* Number of nak loops since last ack */ + u8_t rnakloops; /* Number of naks received */ + u8_t maxnakloops; /* Maximum number of nak loops tolerated + (necessary because IPCP require a custom large max nak loops value) */ + u8_t term_reason_len; /* Length of term_reason */ } fsm; typedef struct fsm_callbacks { - void (*resetci) /* Reset our Configuration Information */ - (fsm *); - int (*cilen) /* Length of our Configuration Information */ - (fsm *); - void (*addci) /* Add our Configuration Information */ - (fsm *, u_char *, int *); - int (*ackci) /* ACK our Configuration Information */ - (fsm *, u_char *, int); - int (*nakci) /* NAK our Configuration Information */ - (fsm *, u_char *, int, int); - int (*rejci) /* Reject our Configuration Information */ - (fsm *, u_char *, int); - int (*reqci) /* Request peer's Configuration Information */ - (fsm *, u_char *, int *, int); - void (*up) /* Called when fsm reaches PPP_FSM_OPENED state */ - (fsm *); - void (*down) /* Called when fsm leaves PPP_FSM_OPENED state */ - (fsm *); - void (*starting) /* Called when we want the lower layer */ - (fsm *); - void (*finished) /* Called when we don't want the lower layer */ - (fsm *); - void (*protreject) /* Called when Protocol-Reject received */ - (int); - void (*retransmit) /* Retransmission is necessary */ - (fsm *); - int (*extcode) /* Called when unknown code received */ - (fsm *, int, int, u_char *, int); - const char *proto_name; /* String name for protocol (for messages) */ + void (*resetci) /* Reset our Configuration Information */ + (fsm *); + int (*cilen) /* Length of our Configuration Information */ + (fsm *); + void (*addci) /* Add our Configuration Information */ + (fsm *, u_char *, int *); + int (*ackci) /* ACK our Configuration Information */ + (fsm *, u_char *, int); + int (*nakci) /* NAK our Configuration Information */ + (fsm *, u_char *, int, int); + int (*rejci) /* Reject our Configuration Information */ + (fsm *, u_char *, int); + int (*reqci) /* Request peer's Configuration Information */ + (fsm *, u_char *, int *, int); + void (*up) /* Called when fsm reaches PPP_FSM_OPENED state */ + (fsm *); + void (*down) /* Called when fsm leaves PPP_FSM_OPENED state */ + (fsm *); + void (*starting) /* Called when we want the lower layer */ + (fsm *); + void (*finished) /* Called when we don't want the lower layer */ + (fsm *); + void (*protreject) /* Called when Protocol-Reject received */ + (int); + void (*retransmit) /* Retransmission is necessary */ + (fsm *); + int (*extcode) /* Called when unknown code received */ + (fsm *, int, int, u_char *, int); + const char *proto_name; /* String name for protocol (for messages) */ } fsm_callbacks; /* * Link states. */ -#define PPP_FSM_INITIAL 0 /* Down, hasn't been opened */ -#define PPP_FSM_STARTING 1 /* Down, been opened */ -#define PPP_FSM_CLOSED 2 /* Up, hasn't been opened */ -#define PPP_FSM_STOPPED 3 /* Open, waiting for down event */ -#define PPP_FSM_CLOSING 4 /* Terminating the connection, not open */ -#define PPP_FSM_STOPPING 5 /* Terminating, but open */ -#define PPP_FSM_REQSENT 6 /* We've sent a Config Request */ -#define PPP_FSM_ACKRCVD 7 /* We've received a Config Ack */ -#define PPP_FSM_ACKSENT 8 /* We've sent a Config Ack */ -#define PPP_FSM_OPENED 9 /* Connection available */ +#define PPP_FSM_INITIAL 0 /* Down, hasn't been opened */ +#define PPP_FSM_STARTING 1 /* Down, been opened */ +#define PPP_FSM_CLOSED 2 /* Up, hasn't been opened */ +#define PPP_FSM_STOPPED 3 /* Open, waiting for down event */ +#define PPP_FSM_CLOSING 4 /* Terminating the connection, not open */ +#define PPP_FSM_STOPPING 5 /* Terminating, but open */ +#define PPP_FSM_REQSENT 6 /* We've sent a Config Request */ +#define PPP_FSM_ACKRCVD 7 /* We've received a Config Ack */ +#define PPP_FSM_ACKSENT 8 /* We've sent a Config Ack */ +#define PPP_FSM_OPENED 9 /* Connection available */ /* * Flags - indicate options controlling FSM operation */ -#define OPT_PASSIVE 1 /* Don't die if we don't get a response */ -#define OPT_RESTART 2 /* Treat 2nd OPEN as DOWN, UP */ -#define OPT_SILENT 4 /* Wait for peer to speak first */ +#define OPT_PASSIVE 1 /* Don't die if we don't get a response */ +#define OPT_RESTART 2 /* Treat 2nd OPEN as DOWN, UP */ +#define OPT_SILENT 4 /* Wait for peer to speak first */ /* * Timeouts. */ #if 0 /* moved to ppp_opts.h */ -#define DEFTIMEOUT 3 /* Timeout time in seconds */ -#define DEFMAXTERMREQS 2 /* Maximum Terminate-Request transmissions */ -#define DEFMAXCONFREQS 10 /* Maximum Configure-Request transmissions */ -#define DEFMAXNAKLOOPS 5 /* Maximum number of nak loops */ +#define DEFTIMEOUT 3 /* Timeout time in seconds */ +#define DEFMAXTERMREQS 2 /* Maximum Terminate-Request transmissions */ +#define DEFMAXCONFREQS 10 /* Maximum Configure-Request transmissions */ +#define DEFMAXNAKLOOPS 5 /* Maximum number of nak loops */ #endif /* moved to ppp_opts.h */ @@ -170,6 +174,9 @@ void fsm_input(fsm *f, u_char *inpacket, int l); void fsm_protreject(fsm *f); void fsm_sdata(fsm *f, u_char code, u_char id, const u_char *data, int datalen); +#ifdef __cplusplus +} +#endif #endif /* FSM_H */ #endif /* PPP_SUPPORT */ diff --git a/Libraries/LwIP/src/include/netif/ppp/ipcp.h b/Libraries/LwIP/src/include/netif/ppp/ipcp.h index 8eada11..1735158 100755 --- a/Libraries/LwIP/src/include/netif/ppp/ipcp.h +++ b/Libraries/LwIP/src/include/netif/ppp/ipcp.h @@ -46,37 +46,41 @@ #if PPP_SUPPORT && PPP_IPV4_SUPPORT /* don't build if not configured for use in lwipopts.h */ #ifndef IPCP_H -#define IPCP_H +#define IPCP_H + +#ifdef __cplusplus +extern "C" { +#endif /* * Options. */ -#define CI_ADDRS 1 /* IP Addresses */ +#define CI_ADDRS 1 /* IP Addresses */ #if VJ_SUPPORT -#define CI_COMPRESSTYPE 2 /* Compression Type */ +#define CI_COMPRESSTYPE 2 /* Compression Type */ #endif /* VJ_SUPPORT */ -#define CI_ADDR 3 +#define CI_ADDR 3 #if LWIP_DNS -#define CI_MS_DNS1 129 /* Primary DNS value */ +#define CI_MS_DNS1 129 /* Primary DNS value */ #define CI_MS_DNS2 131 /* Secondary DNS value */ #endif /* LWIP_DNS */ #if 0 /* UNUSED - WINS */ #define CI_MS_WINS1 130 /* Primary WINS value */ -#define CI_MS_WINS2 132 /* Secondary WINS value */ +#define CI_MS_WINS2 132 /* Secondary WINS value */ #endif /* UNUSED - WINS */ #if VJ_SUPPORT -#define MAX_STATES 16 /* from slcompress.h */ +#define MAX_STATES 16 /* from slcompress.h */ -#define IPCP_VJMODE_OLD 1 /* "old" mode (option # = 0x0037) */ -#define IPCP_VJMODE_RFC1172 2 /* "old-rfc"mode (option # = 0x002d) */ -#define IPCP_VJMODE_RFC1332 3 /* "new-rfc"mode (option # = 0x002d, */ +#define IPCP_VJMODE_OLD 1 /* "old" mode (option # = 0x0037) */ +#define IPCP_VJMODE_RFC1172 2 /* "old-rfc"mode (option # = 0x002d) */ +#define IPCP_VJMODE_RFC1332 3 /* "new-rfc"mode (option # = 0x002d, */ /* maxslot and slot number compression) */ -#define IPCP_VJ_COMP 0x002d /* current value for VJ compression option*/ -#define IPCP_VJ_COMP_OLD 0x0037 /* "old" (i.e, broken) value for VJ */ - /* compression option*/ +#define IPCP_VJ_COMP 0x002d /* current value for VJ compression option*/ +#define IPCP_VJ_COMP_OLD 0x0037 /* "old" (i.e, broken) value for VJ */ + /* compression option*/ #endif /* VJ_SUPPORT */ typedef struct ipcp_options { @@ -102,17 +106,17 @@ typedef struct ipcp_options { unsigned int req_dns2 :1; /* Ask peer to send secondary DNS address? */ #endif /* LWIP_DNS */ - u32_t ouraddr, hisaddr; /* Addresses in NETWORK BYTE ORDER */ + u32_t ouraddr, hisaddr; /* Addresses in NETWORK BYTE ORDER */ #if LWIP_DNS - u32_t dnsaddr[2]; /* Primary and secondary MS DNS entries */ + u32_t dnsaddr[2]; /* Primary and secondary MS DNS entries */ #endif /* LWIP_DNS */ #if 0 /* UNUSED - WINS */ - u32_t winsaddr[2]; /* Primary and secondary MS WINS entries */ + u32_t winsaddr[2]; /* Primary and secondary MS WINS entries */ #endif /* UNUSED - WINS */ #if VJ_SUPPORT - u16_t vj_protocol; /* protocol value to use in VJ option */ - u8_t maxslotindex; /* values for RFC1332 VJ compression neg. */ + u16_t vj_protocol; /* protocol value to use in VJ option */ + u8_t maxslotindex; /* values for RFC1332 VJ compression neg. */ #endif /* VJ_SUPPORT */ } ipcp_options; @@ -122,5 +126,9 @@ char *ip_ntoa (u32_t); extern const struct protent ipcp_protent; +#ifdef __cplusplus +} +#endif + #endif /* IPCP_H */ #endif /* PPP_SUPPORT && PPP_IPV4_SUPPORT */ diff --git a/Libraries/LwIP/src/include/netif/ppp/ipv6cp.h b/Libraries/LwIP/src/include/netif/ppp/ipv6cp.h index ae2ea8d..48b0715 100755 --- a/Libraries/LwIP/src/include/netif/ppp/ipv6cp.h +++ b/Libraries/LwIP/src/include/netif/ppp/ipv6cp.h @@ -142,20 +142,24 @@ #if PPP_SUPPORT && PPP_IPV6_SUPPORT /* don't build if not configured for use in lwipopts.h */ #ifndef IPV6CP_H -#define IPV6CP_H +#define IPV6CP_H #include "eui64.h" +#ifdef __cplusplus +extern "C" { +#endif + /* * Options. */ -#define CI_IFACEID 1 /* Interface Identifier */ +#define CI_IFACEID 1 /* Interface Identifier */ #ifdef IPV6CP_COMP -#define CI_COMPRESSTYPE 2 /* Compression Type */ +#define CI_COMPRESSTYPE 2 /* Compression Type */ #endif /* IPV6CP_COMP */ /* No compression types yet defined. - *#define IPV6CP_COMP 0x004f + *#define IPV6CP_COMP 0x004f */ typedef struct ipv6cp_options { unsigned int neg_ifaceid :1; /* Negotiate interface identifier? */ @@ -179,5 +183,9 @@ typedef struct ipv6cp_options { extern const struct protent ipv6cp_protent; +#ifdef __cplusplus +} +#endif + #endif /* IPV6CP_H */ #endif /* PPP_SUPPORT && PPP_IPV6_SUPPORT */ diff --git a/Libraries/LwIP/src/include/netif/ppp/lcp.h b/Libraries/LwIP/src/include/netif/ppp/lcp.h index fceb13f..37d0548 100755 --- a/Libraries/LwIP/src/include/netif/ppp/lcp.h +++ b/Libraries/LwIP/src/include/netif/ppp/lcp.h @@ -46,62 +46,66 @@ #if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ #ifndef LCP_H -#define LCP_H +#define LCP_H #include "ppp.h" +#ifdef __cplusplus +extern "C" { +#endif + /* * Options. */ -#define CI_VENDOR 0 /* Vendor Specific */ -#define CI_MRU 1 /* Maximum Receive Unit */ -#define CI_ASYNCMAP 2 /* Async Control Character Map */ -#define CI_AUTHTYPE 3 /* Authentication Type */ -#define CI_QUALITY 4 /* Quality Protocol */ -#define CI_MAGICNUMBER 5 /* Magic Number */ -#define CI_PCOMPRESSION 7 /* Protocol Field Compression */ -#define CI_ACCOMPRESSION 8 /* Address/Control Field Compression */ -#define CI_FCSALTERN 9 /* FCS-Alternatives */ -#define CI_SDP 10 /* Self-Describing-Pad */ -#define CI_NUMBERED 11 /* Numbered-Mode */ -#define CI_CALLBACK 13 /* callback */ -#define CI_MRRU 17 /* max reconstructed receive unit; multilink */ -#define CI_SSNHF 18 /* short sequence numbers for multilink */ -#define CI_EPDISC 19 /* endpoint discriminator */ -#define CI_MPPLUS 22 /* Multi-Link-Plus-Procedure */ -#define CI_LDISC 23 /* Link-Discriminator */ -#define CI_LCPAUTH 24 /* LCP Authentication */ -#define CI_COBS 25 /* Consistent Overhead Byte Stuffing */ -#define CI_PREFELIS 26 /* Prefix Elision */ -#define CI_MPHDRFMT 27 /* MP Header Format */ -#define CI_I18N 28 /* Internationalization */ -#define CI_SDL 29 /* Simple Data Link */ +#define CI_VENDOR 0 /* Vendor Specific */ +#define CI_MRU 1 /* Maximum Receive Unit */ +#define CI_ASYNCMAP 2 /* Async Control Character Map */ +#define CI_AUTHTYPE 3 /* Authentication Type */ +#define CI_QUALITY 4 /* Quality Protocol */ +#define CI_MAGICNUMBER 5 /* Magic Number */ +#define CI_PCOMPRESSION 7 /* Protocol Field Compression */ +#define CI_ACCOMPRESSION 8 /* Address/Control Field Compression */ +#define CI_FCSALTERN 9 /* FCS-Alternatives */ +#define CI_SDP 10 /* Self-Describing-Pad */ +#define CI_NUMBERED 11 /* Numbered-Mode */ +#define CI_CALLBACK 13 /* callback */ +#define CI_MRRU 17 /* max reconstructed receive unit; multilink */ +#define CI_SSNHF 18 /* short sequence numbers for multilink */ +#define CI_EPDISC 19 /* endpoint discriminator */ +#define CI_MPPLUS 22 /* Multi-Link-Plus-Procedure */ +#define CI_LDISC 23 /* Link-Discriminator */ +#define CI_LCPAUTH 24 /* LCP Authentication */ +#define CI_COBS 25 /* Consistent Overhead Byte Stuffing */ +#define CI_PREFELIS 26 /* Prefix Elision */ +#define CI_MPHDRFMT 27 /* MP Header Format */ +#define CI_I18N 28 /* Internationalization */ +#define CI_SDL 29 /* Simple Data Link */ /* * LCP-specific packet types (code numbers). */ -#define PROTREJ 8 /* Protocol Reject */ -#define ECHOREQ 9 /* Echo Request */ -#define ECHOREP 10 /* Echo Reply */ -#define DISCREQ 11 /* Discard Request */ -#define IDENTIF 12 /* Identification */ -#define TIMEREM 13 /* Time Remaining */ +#define PROTREJ 8 /* Protocol Reject */ +#define ECHOREQ 9 /* Echo Request */ +#define ECHOREP 10 /* Echo Reply */ +#define DISCREQ 11 /* Discard Request */ +#define IDENTIF 12 /* Identification */ +#define TIMEREM 13 /* Time Remaining */ /* Value used as data for CI_CALLBACK option */ -#define CBCP_OPT 6 /* Use callback control protocol */ +#define CBCP_OPT 6 /* Use callback control protocol */ #if 0 /* moved to ppp_opts.h */ -#define DEFMRU 1500 /* Try for this */ -#define MINMRU 128 /* No MRUs below this */ -#define MAXMRU 16384 /* Normally limit MRU to this */ +#define DEFMRU 1500 /* Try for this */ +#define MINMRU 128 /* No MRUs below this */ +#define MAXMRU 16384 /* Normally limit MRU to this */ #endif /* moved to ppp_opts.h */ /* An endpoint discriminator, used with multilink. */ -#define MAX_ENDP_LEN 20 /* maximum length of discriminator value */ +#define MAX_ENDP_LEN 20 /* maximum length of discriminator value */ struct epdisc { - unsigned char class_; /* -- The word "class" is reserved in C++. */ - unsigned char length; - unsigned char value[MAX_ENDP_LEN]; + unsigned char class_; /* -- The word "class" is reserved in C++. */ + unsigned char length; + unsigned char value[MAX_ENDP_LEN]; }; /* @@ -137,20 +141,20 @@ typedef struct lcp_options { unsigned int neg_ssnhf :1; /* negotiate short sequence numbers */ unsigned int neg_endpoint :1; /* negotiate endpoint discriminator */ - u16_t mru; /* Value of MRU */ + u16_t mru; /* Value of MRU */ #ifdef HAVE_MULTILINK - u16_t mrru; /* Value of MRRU, and multilink enable */ + u16_t mrru; /* Value of MRRU, and multilink enable */ #endif /* MULTILINK */ #if CHAP_SUPPORT - u8_t chap_mdtype; /* which MD types (hashing algorithm) */ + u8_t chap_mdtype; /* which MD types (hashing algorithm) */ #endif /* CHAP_SUPPORT */ - u32_t asyncmap; /* Value of async map */ + u32_t asyncmap; /* Value of async map */ u32_t magicnumber; - u8_t numloops; /* Number of loops during magic number neg. */ + u8_t numloops; /* Number of loops during magic number neg. */ #if LQR_SUPPORT - u32_t lqr_period; /* Reporting period for LQR 1/100ths second */ + u32_t lqr_period; /* Reporting period for LQR 1/100ths second */ #endif /* LQR_SUPPORT */ - struct epdisc endpoint; /* endpoint discriminator */ + struct epdisc endpoint; /* endpoint discriminator */ } lcp_options; void lcp_open(ppp_pcb *pcb); @@ -164,8 +168,12 @@ extern const struct protent lcp_protent; #if 0 /* moved to ppp_opts.h */ /* Default number of times we receive our magic number from the peer before deciding the link is looped-back. */ -#define DEFLOOPBACKFAIL 10 +#define DEFLOOPBACKFAIL 10 #endif /* moved to ppp_opts.h */ +#ifdef __cplusplus +} +#endif + #endif /* LCP_H */ #endif /* PPP_SUPPORT */ diff --git a/Libraries/LwIP/src/include/netif/ppp/magic.h b/Libraries/LwIP/src/include/netif/ppp/magic.h index 10c7786..ffbd073 100755 --- a/Libraries/LwIP/src/include/netif/ppp/magic.h +++ b/Libraries/LwIP/src/include/netif/ppp/magic.h @@ -80,6 +80,10 @@ #ifndef MAGIC_H #define MAGIC_H +#ifdef __cplusplus +extern "C" { +#endif + /*********************** *** PUBLIC FUNCTIONS *** ***********************/ @@ -98,7 +102,7 @@ void magic_randomize(void); /* * Return a new random number. */ -u32_t magic(void); /* Returns the next magic number */ +u32_t magic(void); /* Returns the next magic number */ /* * Fill buffer with random bytes @@ -117,6 +121,10 @@ void magic_random_bytes(unsigned char *buf, u32_t buf_len); */ u32_t magic_pow(u8_t pow); +#ifdef __cplusplus +} +#endif + #endif /* MAGIC_H */ #endif /* PPP_SUPPORT */ diff --git a/Libraries/LwIP/src/include/netif/ppp/mppe.h b/Libraries/LwIP/src/include/netif/ppp/mppe.h index 8a80dea..4f504fb 100755 --- a/Libraries/LwIP/src/include/netif/ppp/mppe.h +++ b/Libraries/LwIP/src/include/netif/ppp/mppe.h @@ -41,19 +41,23 @@ #include "netif/ppp/pppcrypt.h" -#define MPPE_PAD 4 /* MPPE growth per frame */ -#define MPPE_MAX_KEY_LEN 16 /* largest key length (128-bit) */ +#ifdef __cplusplus +extern "C" { +#endif + +#define MPPE_PAD 4 /* MPPE growth per frame */ +#define MPPE_MAX_KEY_LEN 16 /* largest key length (128-bit) */ /* option bits for ccp_options.mppe */ -#define MPPE_OPT_40 0x01 /* 40 bit */ -#define MPPE_OPT_128 0x02 /* 128 bit */ -#define MPPE_OPT_STATEFUL 0x04 /* stateful mode */ +#define MPPE_OPT_40 0x01 /* 40 bit */ +#define MPPE_OPT_128 0x02 /* 128 bit */ +#define MPPE_OPT_STATEFUL 0x04 /* stateful mode */ /* unsupported opts */ -#define MPPE_OPT_56 0x08 /* 56 bit */ -#define MPPE_OPT_MPPC 0x10 /* MPPC compression */ -#define MPPE_OPT_D 0x20 /* Unknown */ +#define MPPE_OPT_56 0x08 /* 56 bit */ +#define MPPE_OPT_MPPC 0x10 /* MPPC compression */ +#define MPPE_OPT_D 0x20 /* Unknown */ #define MPPE_OPT_UNSUPPORTED (MPPE_OPT_56|MPPE_OPT_MPPC|MPPE_OPT_D) -#define MPPE_OPT_UNKNOWN 0x40 /* Bits !defined in RFC 3078 were set */ +#define MPPE_OPT_UNKNOWN 0x40 /* Bits !defined in RFC 3078 were set */ /* * This is not nice ... the alternative is a bitfield struct though. @@ -62,70 +66,70 @@ * but then we have to do a lwip_htonl() all the time and/or we still need * to know which octet is which. */ -#define MPPE_C_BIT 0x01 /* MPPC */ -#define MPPE_D_BIT 0x10 /* Obsolete, usage unknown */ -#define MPPE_L_BIT 0x20 /* 40-bit */ -#define MPPE_S_BIT 0x40 /* 128-bit */ -#define MPPE_M_BIT 0x80 /* 56-bit, not supported */ -#define MPPE_H_BIT 0x01 /* Stateless (in a different byte) */ +#define MPPE_C_BIT 0x01 /* MPPC */ +#define MPPE_D_BIT 0x10 /* Obsolete, usage unknown */ +#define MPPE_L_BIT 0x20 /* 40-bit */ +#define MPPE_S_BIT 0x40 /* 128-bit */ +#define MPPE_M_BIT 0x80 /* 56-bit, not supported */ +#define MPPE_H_BIT 0x01 /* Stateless (in a different byte) */ /* Does not include H bit; used for least significant octet only. */ #define MPPE_ALL_BITS (MPPE_D_BIT|MPPE_L_BIT|MPPE_S_BIT|MPPE_M_BIT|MPPE_H_BIT) /* Build a CI from mppe opts (see RFC 3078) */ -#define MPPE_OPTS_TO_CI(opts, ci) \ - do { \ - u_char *ptr = ci; /* u_char[4] */ \ - \ - /* H bit */ \ - if (opts & MPPE_OPT_STATEFUL) \ - *ptr++ = 0x0; \ - else \ - *ptr++ = MPPE_H_BIT; \ - *ptr++ = 0; \ - *ptr++ = 0; \ - \ - /* S,L bits */ \ - *ptr = 0; \ - if (opts & MPPE_OPT_128) \ - *ptr |= MPPE_S_BIT; \ - if (opts & MPPE_OPT_40) \ - *ptr |= MPPE_L_BIT; \ - /* M,D,C bits not supported */ \ +#define MPPE_OPTS_TO_CI(opts, ci) \ + do { \ + u_char *ptr = ci; /* u_char[4] */ \ + \ + /* H bit */ \ + if (opts & MPPE_OPT_STATEFUL) \ + *ptr++ = 0x0; \ + else \ + *ptr++ = MPPE_H_BIT; \ + *ptr++ = 0; \ + *ptr++ = 0; \ + \ + /* S,L bits */ \ + *ptr = 0; \ + if (opts & MPPE_OPT_128) \ + *ptr |= MPPE_S_BIT; \ + if (opts & MPPE_OPT_40) \ + *ptr |= MPPE_L_BIT; \ + /* M,D,C bits not supported */ \ } while (/* CONSTCOND */ 0) /* The reverse of the above */ -#define MPPE_CI_TO_OPTS(ci, opts) \ - do { \ - const u_char *ptr = ci; /* u_char[4] */ \ - \ - opts = 0; \ - \ - /* H bit */ \ - if (!(ptr[0] & MPPE_H_BIT)) \ - opts |= MPPE_OPT_STATEFUL; \ - \ - /* S,L bits */ \ - if (ptr[3] & MPPE_S_BIT) \ - opts |= MPPE_OPT_128; \ - if (ptr[3] & MPPE_L_BIT) \ - opts |= MPPE_OPT_40; \ - \ - /* M,D,C bits */ \ - if (ptr[3] & MPPE_M_BIT) \ - opts |= MPPE_OPT_56; \ - if (ptr[3] & MPPE_D_BIT) \ - opts |= MPPE_OPT_D; \ - if (ptr[3] & MPPE_C_BIT) \ - opts |= MPPE_OPT_MPPC; \ - \ - /* Other bits */ \ - if (ptr[0] & ~MPPE_H_BIT) \ - opts |= MPPE_OPT_UNKNOWN; \ - if (ptr[1] || ptr[2]) \ - opts |= MPPE_OPT_UNKNOWN; \ - if (ptr[3] & ~MPPE_ALL_BITS) \ - opts |= MPPE_OPT_UNKNOWN; \ +#define MPPE_CI_TO_OPTS(ci, opts) \ + do { \ + const u_char *ptr = ci; /* u_char[4] */ \ + \ + opts = 0; \ + \ + /* H bit */ \ + if (!(ptr[0] & MPPE_H_BIT)) \ + opts |= MPPE_OPT_STATEFUL; \ + \ + /* S,L bits */ \ + if (ptr[3] & MPPE_S_BIT) \ + opts |= MPPE_OPT_128; \ + if (ptr[3] & MPPE_L_BIT) \ + opts |= MPPE_OPT_40; \ + \ + /* M,D,C bits */ \ + if (ptr[3] & MPPE_M_BIT) \ + opts |= MPPE_OPT_56; \ + if (ptr[3] & MPPE_D_BIT) \ + opts |= MPPE_OPT_D; \ + if (ptr[3] & MPPE_C_BIT) \ + opts |= MPPE_OPT_MPPC; \ + \ + /* Other bits */ \ + if (ptr[0] & ~MPPE_H_BIT) \ + opts |= MPPE_OPT_UNKNOWN; \ + if (ptr[1] || ptr[2]) \ + opts |= MPPE_OPT_UNKNOWN; \ + if (ptr[3] & ~MPPE_ALL_BITS) \ + opts |= MPPE_OPT_UNKNOWN; \ } while (/* CONSTCOND */ 0) /* Shared MPPE padding between MSCHAP and MPPE */ @@ -148,18 +152,18 @@ static const u8_t mppe_sha1_pad2[SHA1_PAD_SIZE] = { * State for an MPPE (de)compressor. */ typedef struct ppp_mppe_state { - lwip_arc4_context arc4; - u8_t master_key[MPPE_MAX_KEY_LEN]; - u8_t session_key[MPPE_MAX_KEY_LEN]; - u8_t keylen; /* key length in bytes */ - /* NB: 128-bit == 16, 40-bit == 8! - * If we want to support 56-bit, the unit has to change to bits - */ - u8_t bits; /* MPPE control bits */ - u16_t ccount; /* 12-bit coherency count (seqno) */ - u16_t sanity_errors; /* take down LCP if too many */ - unsigned int stateful :1; /* stateful mode flag */ - unsigned int discard :1; /* stateful mode packet loss flag */ + lwip_arc4_context arc4; + u8_t master_key[MPPE_MAX_KEY_LEN]; + u8_t session_key[MPPE_MAX_KEY_LEN]; + u8_t keylen; /* key length in bytes */ + /* NB: 128-bit == 16, 40-bit == 8! + * If we want to support 56-bit, the unit has to change to bits + */ + u8_t bits; /* MPPE control bits */ + u16_t ccount; /* 12-bit coherency count (seqno) */ + u16_t sanity_errors; /* take down LCP if too many */ + unsigned int stateful :1; /* stateful mode flag */ + unsigned int discard :1; /* stateful mode packet loss flag */ } ppp_mppe_state; void mppe_set_key(ppp_pcb *pcb, ppp_mppe_state *state, u8_t *key); @@ -169,5 +173,9 @@ err_t mppe_compress(ppp_pcb *pcb, ppp_mppe_state *state, struct pbuf **pb, u16_t void mppe_decomp_reset(ppp_pcb *pcb, ppp_mppe_state *state); err_t mppe_decompress(ppp_pcb *pcb, ppp_mppe_state *state, struct pbuf **pb); +#ifdef __cplusplus +} +#endif + #endif /* MPPE_H */ #endif /* PPP_SUPPORT && MPPE_SUPPORT */ diff --git a/Libraries/LwIP/src/include/netif/ppp/ppp.h b/Libraries/LwIP/src/include/netif/ppp/ppp.h index 6052bf6..3595b7b 100755 --- a/Libraries/LwIP/src/include/netif/ppp/ppp.h +++ b/Libraries/LwIP/src/include/netif/ppp/ppp.h @@ -47,6 +47,10 @@ #include "lwip/ip6_addr.h" #endif /* PPP_IPV6_SUPPORT */ +#ifdef __cplusplus +extern "C" { +#endif + /* Disable non-working or rarely used PPP feature, so rarely that we don't want to bloat ppp_opts.h with them */ #ifndef PPP_OPTIONS #define PPP_OPTIONS 0 @@ -103,8 +107,8 @@ /* * The basic PPP frame. */ -#define PPP_HDRLEN 4 /* octets for standard ppp header */ -#define PPP_FCSLEN 2 /* octets for FCS */ +#define PPP_HDRLEN 4 /* octets for standard ppp header */ +#define PPP_FCSLEN 2 /* octets for FCS */ /* * Values for phase. @@ -685,6 +689,10 @@ err_t ppp_ioctl(ppp_pcb *pcb, u8_t cmd, void *arg); #define ppp_set_netif_linkcallback(ppp, link_cb) \ netif_set_link_callback(ppp->netif, link_cb); +#ifdef __cplusplus +} +#endif + #endif /* PPP_H */ #endif /* PPP_SUPPORT */ diff --git a/Libraries/LwIP/src/include/netif/ppp/ppp_impl.h b/Libraries/LwIP/src/include/netif/ppp/ppp_impl.h index f9fd582..280ff00 100755 --- a/Libraries/LwIP/src/include/netif/ppp/ppp_impl.h +++ b/Libraries/LwIP/src/include/netif/ppp/ppp_impl.h @@ -53,6 +53,10 @@ #include "ppp.h" #include "pppdebug.h" +#ifdef __cplusplus +extern "C" { +#endif + /* * Memory used for control packets. * @@ -70,66 +74,66 @@ /* * The basic PPP frame. */ -#define PPP_ADDRESS(p) (((u_char *)(p))[0]) -#define PPP_CONTROL(p) (((u_char *)(p))[1]) -#define PPP_PROTOCOL(p) ((((u_char *)(p))[2] << 8) + ((u_char *)(p))[3]) +#define PPP_ADDRESS(p) (((u_char *)(p))[0]) +#define PPP_CONTROL(p) (((u_char *)(p))[1]) +#define PPP_PROTOCOL(p) ((((u_char *)(p))[2] << 8) + ((u_char *)(p))[3]) /* * Significant octet values. */ -#define PPP_ALLSTATIONS 0xff /* All-Stations broadcast address */ -#define PPP_UI 0x03 /* Unnumbered Information */ -#define PPP_FLAG 0x7e /* Flag Sequence */ -#define PPP_ESCAPE 0x7d /* Asynchronous Control Escape */ -#define PPP_TRANS 0x20 /* Asynchronous transparency modifier */ +#define PPP_ALLSTATIONS 0xff /* All-Stations broadcast address */ +#define PPP_UI 0x03 /* Unnumbered Information */ +#define PPP_FLAG 0x7e /* Flag Sequence */ +#define PPP_ESCAPE 0x7d /* Asynchronous Control Escape */ +#define PPP_TRANS 0x20 /* Asynchronous transparency modifier */ /* * Protocol field values. */ -#define PPP_IP 0x21 /* Internet Protocol */ +#define PPP_IP 0x21 /* Internet Protocol */ #if 0 /* UNUSED */ -#define PPP_AT 0x29 /* AppleTalk Protocol */ -#define PPP_IPX 0x2b /* IPX protocol */ +#define PPP_AT 0x29 /* AppleTalk Protocol */ +#define PPP_IPX 0x2b /* IPX protocol */ #endif /* UNUSED */ #if VJ_SUPPORT -#define PPP_VJC_COMP 0x2d /* VJ compressed TCP */ -#define PPP_VJC_UNCOMP 0x2f /* VJ uncompressed TCP */ +#define PPP_VJC_COMP 0x2d /* VJ compressed TCP */ +#define PPP_VJC_UNCOMP 0x2f /* VJ uncompressed TCP */ #endif /* VJ_SUPPORT */ #if PPP_IPV6_SUPPORT -#define PPP_IPV6 0x57 /* Internet Protocol Version 6 */ +#define PPP_IPV6 0x57 /* Internet Protocol Version 6 */ #endif /* PPP_IPV6_SUPPORT */ #if CCP_SUPPORT -#define PPP_COMP 0xfd /* compressed packet */ +#define PPP_COMP 0xfd /* compressed packet */ #endif /* CCP_SUPPORT */ -#define PPP_IPCP 0x8021 /* IP Control Protocol */ +#define PPP_IPCP 0x8021 /* IP Control Protocol */ #if 0 /* UNUSED */ -#define PPP_ATCP 0x8029 /* AppleTalk Control Protocol */ -#define PPP_IPXCP 0x802b /* IPX Control Protocol */ +#define PPP_ATCP 0x8029 /* AppleTalk Control Protocol */ +#define PPP_IPXCP 0x802b /* IPX Control Protocol */ #endif /* UNUSED */ #if PPP_IPV6_SUPPORT -#define PPP_IPV6CP 0x8057 /* IPv6 Control Protocol */ +#define PPP_IPV6CP 0x8057 /* IPv6 Control Protocol */ #endif /* PPP_IPV6_SUPPORT */ #if CCP_SUPPORT -#define PPP_CCP 0x80fd /* Compression Control Protocol */ +#define PPP_CCP 0x80fd /* Compression Control Protocol */ #endif /* CCP_SUPPORT */ #if ECP_SUPPORT -#define PPP_ECP 0x8053 /* Encryption Control Protocol */ +#define PPP_ECP 0x8053 /* Encryption Control Protocol */ #endif /* ECP_SUPPORT */ -#define PPP_LCP 0xc021 /* Link Control Protocol */ +#define PPP_LCP 0xc021 /* Link Control Protocol */ #if PAP_SUPPORT -#define PPP_PAP 0xc023 /* Password Authentication Protocol */ +#define PPP_PAP 0xc023 /* Password Authentication Protocol */ #endif /* PAP_SUPPORT */ #if LQR_SUPPORT -#define PPP_LQR 0xc025 /* Link Quality Report protocol */ +#define PPP_LQR 0xc025 /* Link Quality Report protocol */ #endif /* LQR_SUPPORT */ #if CHAP_SUPPORT -#define PPP_CHAP 0xc223 /* Cryptographic Handshake Auth. Protocol */ +#define PPP_CHAP 0xc223 /* Cryptographic Handshake Auth. Protocol */ #endif /* CHAP_SUPPORT */ #if CBCP_SUPPORT -#define PPP_CBCP 0xc029 /* Callback Control Protocol */ +#define PPP_CBCP 0xc029 /* Callback Control Protocol */ #endif /* CBCP_SUPPORT */ #if EAP_SUPPORT -#define PPP_EAP 0xc227 /* Extensible Authentication Protocol */ +#define PPP_EAP 0xc227 /* Extensible Authentication Protocol */ #endif /* EAP_SUPPORT */ /* @@ -161,59 +165,59 @@ struct link_callbacks { * What to do with network protocol (NP) packets. */ enum NPmode { - NPMODE_PASS, /* pass the packet through */ - NPMODE_DROP, /* silently drop the packet */ - NPMODE_ERROR, /* return an error */ - NPMODE_QUEUE /* save it up for later. */ + NPMODE_PASS, /* pass the packet through */ + NPMODE_DROP, /* silently drop the packet */ + NPMODE_ERROR, /* return an error */ + NPMODE_QUEUE /* save it up for later. */ }; /* * Statistics. */ #if PPP_STATS_SUPPORT -struct pppstat { - unsigned int ppp_ibytes; /* bytes received */ - unsigned int ppp_ipackets; /* packets received */ - unsigned int ppp_ierrors; /* receive errors */ - unsigned int ppp_obytes; /* bytes sent */ - unsigned int ppp_opackets; /* packets sent */ - unsigned int ppp_oerrors; /* transmit errors */ +struct pppstat { + unsigned int ppp_ibytes; /* bytes received */ + unsigned int ppp_ipackets; /* packets received */ + unsigned int ppp_ierrors; /* receive errors */ + unsigned int ppp_obytes; /* bytes sent */ + unsigned int ppp_opackets; /* packets sent */ + unsigned int ppp_oerrors; /* transmit errors */ }; #if VJ_SUPPORT struct vjstat { - unsigned int vjs_packets; /* outbound packets */ + unsigned int vjs_packets; /* outbound packets */ unsigned int vjs_compressed; /* outbound compressed packets */ - unsigned int vjs_searches; /* searches for connection state */ - unsigned int vjs_misses; /* times couldn't find conn. state */ + unsigned int vjs_searches; /* searches for connection state */ + unsigned int vjs_misses; /* times couldn't find conn. state */ unsigned int vjs_uncompressedin; /* inbound uncompressed packets */ unsigned int vjs_compressedin; /* inbound compressed packets */ - unsigned int vjs_errorin; /* inbound unknown type packets */ - unsigned int vjs_tossed; /* inbound packets tossed because of error */ + unsigned int vjs_errorin; /* inbound unknown type packets */ + unsigned int vjs_tossed; /* inbound packets tossed because of error */ }; #endif /* VJ_SUPPORT */ struct ppp_stats { - struct pppstat p; /* basic PPP statistics */ + struct pppstat p; /* basic PPP statistics */ #if VJ_SUPPORT - struct vjstat vj; /* VJ header compression statistics */ + struct vjstat vj; /* VJ header compression statistics */ #endif /* VJ_SUPPORT */ }; #if CCP_SUPPORT struct compstat { - unsigned int unc_bytes; /* total uncompressed bytes */ - unsigned int unc_packets; /* total uncompressed packets */ - unsigned int comp_bytes; /* compressed bytes */ - unsigned int comp_packets; /* compressed packets */ - unsigned int inc_bytes; /* incompressible bytes */ - unsigned int inc_packets; /* incompressible packets */ - unsigned int ratio; /* recent compression ratio << 8 */ + unsigned int unc_bytes; /* total uncompressed bytes */ + unsigned int unc_packets; /* total uncompressed packets */ + unsigned int comp_bytes; /* compressed bytes */ + unsigned int comp_packets; /* compressed packets */ + unsigned int inc_bytes; /* incompressible bytes */ + unsigned int inc_packets; /* incompressible packets */ + unsigned int ratio; /* recent compression ratio << 8 */ }; struct ppp_comp_stats { - struct compstat c; /* packet compression statistics */ - struct compstat d; /* packet decompression statistics */ + struct compstat c; /* packet compression statistics */ + struct compstat d; /* packet decompression statistics */ }; #endif /* CCP_SUPPORT */ @@ -225,37 +229,37 @@ struct ppp_comp_stats { * the last NP packet was sent or received. */ struct ppp_idle { - time_t xmit_idle; /* time since last NP packet sent */ - time_t recv_idle; /* time since last NP packet received */ + time_t xmit_idle; /* time since last NP packet sent */ + time_t recv_idle; /* time since last NP packet received */ }; #endif /* PPP_IDLETIMELIMIT */ /* values for epdisc.class */ -#define EPD_NULL 0 /* null discriminator, no data */ -#define EPD_LOCAL 1 -#define EPD_IP 2 -#define EPD_MAC 3 -#define EPD_MAGIC 4 -#define EPD_PHONENUM 5 +#define EPD_NULL 0 /* null discriminator, no data */ +#define EPD_LOCAL 1 +#define EPD_IP 2 +#define EPD_MAC 3 +#define EPD_MAGIC 4 +#define EPD_PHONENUM 5 /* * Global variables. */ #ifdef HAVE_MULTILINK -extern u8_t multilink; /* enable multilink operation */ -extern u8_t doing_multilink; -extern u8_t multilink_master; -extern u8_t bundle_eof; -extern u8_t bundle_terminating; +extern u8_t multilink; /* enable multilink operation */ +extern u8_t doing_multilink; +extern u8_t multilink_master; +extern u8_t bundle_eof; +extern u8_t bundle_terminating; #endif #ifdef MAXOCTETS -extern unsigned int maxoctets; /* Maximum octetes per session (in bytes) */ +extern unsigned int maxoctets; /* Maximum octetes per session (in bytes) */ extern int maxoctets_dir; /* Direction : - 0 - in+out (default) - 1 - in - 2 - out - 3 - max(in,out) */ + 0 - in+out (default) + 1 - in + 2 - out + 3 - max(in,out) */ extern int maxoctets_timeout; /* Timeout for check of octets limit */ #define PPP_OCTETS_DIRECTION_SUM 0 #define PPP_OCTETS_DIRECTION_IN 1 @@ -275,7 +279,7 @@ extern int maxoctets_timeout; /* Timeout for check of octets limit */ * for a particular protocol. */ struct protent { - u_short protocol; /* PPP protocol number */ + u_short protocol; /* PPP protocol number */ /* Initialization procedure */ void (*init) (ppp_pcb *pcb); /* Process a received packet */ @@ -293,19 +297,19 @@ struct protent { #if PRINTPKT_SUPPORT /* Print a packet in readable form */ int (*printpkt) (const u_char *pkt, int len, - void (*printer) (void *, const char *, ...), - void *arg); + void (*printer) (void *, const char *, ...), + void *arg); #endif /* PRINTPKT_SUPPORT */ #if PPP_DATAINPUT /* Process a received data packet */ void (*datainput) (ppp_pcb *pcb, u_char *pkt, int len); #endif /* PPP_DATAINPUT */ #if PRINTPKT_SUPPORT - const char *name; /* Text name of protocol */ - const char *data_name; /* Text name of corresponding data protocol */ + const char *name; /* Text name of protocol */ + const char *data_name; /* Text name of corresponding data protocol */ #endif /* PRINTPKT_SUPPORT */ #if PPP_OPTIONS - option_t *options; /* List of command-line options */ + option_t *options; /* List of command-line options */ /* Check requested options, assign defaults */ void (*check_options) (void); #endif /* PPP_OPTIONS */ @@ -323,28 +327,28 @@ extern const struct protent* const protocols[]; /* Values for auth_pending, auth_done */ #if PAP_SUPPORT -#define PAP_WITHPEER 0x1 -#define PAP_PEER 0x2 +#define PAP_WITHPEER 0x1 +#define PAP_PEER 0x2 #endif /* PAP_SUPPORT */ #if CHAP_SUPPORT -#define CHAP_WITHPEER 0x4 -#define CHAP_PEER 0x8 +#define CHAP_WITHPEER 0x4 +#define CHAP_PEER 0x8 #endif /* CHAP_SUPPORT */ #if EAP_SUPPORT -#define EAP_WITHPEER 0x10 -#define EAP_PEER 0x20 +#define EAP_WITHPEER 0x10 +#define EAP_PEER 0x20 #endif /* EAP_SUPPORT */ /* Values for auth_done only */ #if CHAP_SUPPORT -#define CHAP_MD5_WITHPEER 0x40 -#define CHAP_MD5_PEER 0x80 +#define CHAP_MD5_WITHPEER 0x40 +#define CHAP_MD5_PEER 0x80 #if MSCHAP_SUPPORT -#define CHAP_MS_SHIFT 8 /* LSB position for MS auths */ -#define CHAP_MS_WITHPEER 0x100 -#define CHAP_MS_PEER 0x200 -#define CHAP_MS2_WITHPEER 0x400 -#define CHAP_MS2_PEER 0x800 +#define CHAP_MS_SHIFT 8 /* LSB position for MS auths */ +#define CHAP_MS_WITHPEER 0x100 +#define CHAP_MS_PEER 0x200 +#define CHAP_MS2_WITHPEER 0x400 +#define CHAP_MS2_PEER 0x800 #endif /* MSCHAP_SUPPORT */ #endif /* CHAP_SUPPORT */ @@ -366,10 +370,10 @@ extern const struct protent* const protocols[]; * PPP statistics structure */ struct pppd_stats { - unsigned int bytes_in; - unsigned int bytes_out; - unsigned int pkts_in; - unsigned int pkts_out; + unsigned int bytes_in; + unsigned int bytes_out; + unsigned int pkts_in; + unsigned int pkts_out; }; #endif /* PPP_STATS_SUPPORT */ @@ -406,9 +410,6 @@ void ppp_link_end(ppp_pcb *pcb); /* function called to process input packet */ void ppp_input(ppp_pcb *pcb, struct pbuf *pb); -/* helper function, merge a pbuf chain into one pbuf */ -struct pbuf *ppp_singlebuf(struct pbuf *p); - /* * Functions called by PPP protocols. @@ -499,34 +500,34 @@ void update_link_stats(int u); /* Get stats at link termination */ * cp MUST be u_char *. */ #define GETCHAR(c, cp) { \ - (c) = *(cp)++; \ + (c) = *(cp)++; \ } #define PUTCHAR(c, cp) { \ - *(cp)++ = (u_char) (c); \ + *(cp)++ = (u_char) (c); \ } #define GETSHORT(s, cp) { \ - (s) = *(cp)++ << 8; \ - (s) |= *(cp)++; \ + (s) = *(cp)++ << 8; \ + (s) |= *(cp)++; \ } #define PUTSHORT(s, cp) { \ - *(cp)++ = (u_char) ((s) >> 8); \ - *(cp)++ = (u_char) (s); \ + *(cp)++ = (u_char) ((s) >> 8); \ + *(cp)++ = (u_char) (s); \ } #define GETLONG(l, cp) { \ - (l) = *(cp)++ << 8; \ - (l) |= *(cp)++; (l) <<= 8; \ - (l) |= *(cp)++; (l) <<= 8; \ - (l) |= *(cp)++; \ + (l) = *(cp)++ << 8; \ + (l) |= *(cp)++; (l) <<= 8; \ + (l) |= *(cp)++; (l) <<= 8; \ + (l) |= *(cp)++; \ } #define PUTLONG(l, cp) { \ - *(cp)++ = (u_char) ((l) >> 24); \ - *(cp)++ = (u_char) ((l) >> 16); \ - *(cp)++ = (u_char) ((l) >> 8); \ - *(cp)++ = (u_char) (l); \ + *(cp)++ = (u_char) ((l) >> 24); \ + *(cp)++ = (u_char) ((l) >> 16); \ + *(cp)++ = (u_char) ((l) >> 8); \ + *(cp)++ = (u_char) (l); \ } -#define INCPTR(n, cp) ((cp) += (n)) -#define DECPTR(n, cp) ((cp) -= (n)) +#define INCPTR(n, cp) ((cp) += (n)) +#define DECPTR(n, cp) ((cp) -= (n)) /* * System dependent definitions for user-level 4.3BSD UNIX implementation. @@ -535,10 +536,10 @@ void update_link_stats(int u); /* Get stats at link termination */ #define TIMEOUTMS(f, a, t) do { sys_untimeout((f), (a)); sys_timeout((t), (f), (a)); } while(0) #define UNTIMEOUT(f, a) sys_untimeout((f), (a)) -#define BZERO(s, n) memset(s, 0, n) -#define BCMP(s1, s2, l) memcmp(s1, s2, l) +#define BZERO(s, n) memset(s, 0, n) +#define BCMP(s1, s2, l) memcmp(s1, s2, l) -#define PRINTMSG(m, l) { ppp_info("Remote message: %0.*v", l, m); } +#define PRINTMSG(m, l) { ppp_info("Remote message: %0.*v", l, m); } /* * MAKEHEADER - Add Header fields to a packet. @@ -551,7 +552,7 @@ void update_link_stats(int u); /* Get stats at link termination */ /* Procedures exported from auth.c */ void link_required(ppp_pcb *pcb); /* we are starting to use the link */ void link_terminated(ppp_pcb *pcb); /* we are finished with the link */ -void link_down(ppp_pcb *pcb); /* the LCP layer has left the Opened state */ +void link_down(ppp_pcb *pcb); /* the LCP layer has left the Opened state */ void upper_layers_down(ppp_pcb *pcb); /* take all NCPs down */ void link_established(ppp_pcb *pcb); /* the link is up; authenticate now */ void start_networks(ppp_pcb *pcb); /* start all the network control protos */ @@ -561,21 +562,21 @@ void continue_networks(ppp_pcb *pcb); /* start network [ip, etc] control protos int auth_check_passwd(ppp_pcb *pcb, char *auser, int userlen, char *apasswd, int passwdlen, const char **msg, int *msglen); /* check the user name and passwd against configuration */ void auth_peer_fail(ppp_pcb *pcb, int protocol); - /* peer failed to authenticate itself */ + /* peer failed to authenticate itself */ void auth_peer_success(ppp_pcb *pcb, int protocol, int prot_flavor, const char *name, int namelen); - /* peer successfully authenticated itself */ + /* peer successfully authenticated itself */ #endif /* PPP_SERVER */ void auth_withpeer_fail(ppp_pcb *pcb, int protocol); - /* we failed to authenticate ourselves */ + /* we failed to authenticate ourselves */ void auth_withpeer_success(ppp_pcb *pcb, int protocol, int prot_flavor); - /* we successfully authenticated ourselves */ + /* we successfully authenticated ourselves */ #endif /* PPP_AUTH_SUPPORT */ void np_up(ppp_pcb *pcb, int proto); /* a network protocol has come up */ void np_down(ppp_pcb *pcb, int proto); /* a network protocol has gone down */ void np_finished(ppp_pcb *pcb, int proto); /* a network protocol no longer needs link */ #if PPP_AUTH_SUPPORT int get_secret(ppp_pcb *pcb, const char *client, const char *server, char *secret, int *secret_len, int am_server); - /* get "secret" for chap */ + /* get "secret" for chap */ #endif /* PPP_AUTH_SUPPORT */ /* Procedures exported from ipcp.c */ @@ -583,8 +584,8 @@ int get_secret(ppp_pcb *pcb, const char *client, const char *server, char *secre /* Procedures exported from demand.c */ #if DEMAND_SUPPORT -void demand_conf (void); /* config interface(s) for demand-dial */ -void demand_block (void); /* set all NPs to queue up packets */ +void demand_conf (void); /* config interface(s) for demand-dial */ +void demand_block (void); /* set all NPs to queue up packets */ void demand_unblock (void); /* set all NPs to pass packets */ void demand_discard (void); /* set all NPs to discard packets */ void demand_rexmit (int, u32_t); /* retransmit saved frames for an NP*/ @@ -601,10 +602,10 @@ void mp_bundle_terminated (void); char *epdisc_to_str (struct epdisc *); /* string from endpoint discrim. */ int str_to_epdisc (struct epdisc *, char *); /* endpt disc. from str */ #else -#define mp_bundle_terminated() /* nothing */ -#define mp_exit_bundle() /* nothing */ -#define doing_multilink 0 -#define multilink_master 0 +#define mp_bundle_terminated() /* nothing */ +#define mp_exit_bundle() /* nothing */ +#define doing_multilink 0 +#define multilink_master 0 #endif /* Procedures exported from utils.c. */ @@ -624,6 +625,98 @@ void ppp_dump_packet(ppp_pcb *pcb, const char *tag, unsigned char *p, int len); /* dump packet to debug log if interesting */ #endif /* PRINTPKT_SUPPORT */ +/* + * Number of necessary timers analysis. + * + * PPP use at least one timer per each of its protocol, but not all protocols are + * active at the same time, thus the number of necessary timeouts is actually + * lower than enabled protocols. Here is the actual necessary timeouts based + * on code analysis. + * + * Note that many features analysed here are not working at all and are only + * there for a comprehensive analysis of necessary timers in order to prevent + * having to redo that each time we add a feature. + * + * Timer list + * + * | holdoff timeout + * | low level protocol timeout (PPPoE or PPPoL2P) + * | LCP delayed UP + * | LCP retransmit (FSM) + * | LCP Echo timer + * .| PAP or CHAP or EAP authentication + * . | ECP retransmit (FSM) + * . | CCP retransmit (FSM) when MPPE is enabled + * . | CCP retransmit (FSM) when MPPE is NOT enabled + * . | IPCP retransmit (FSM) + * . .| IP6CP retransmit (FSM) + * . . | Idle time limit + * . . | Max connect time + * . . | Max octets + * . . | CCP RACK timeout + * . . . + * PPP_PHASE_DEAD + * PPP_PHASE_HOLDOFF + * | . . . + * PPP_PHASE_INITIALIZE + * | . . . + * PPP_PHASE_ESTABLISH + * | . . . + * |. . . + * | . . + * PPP_PHASE_AUTHENTICATE + * | . . + * || . . + * PPP_PHASE_NETWORK + * | || . . + * | ||| . + * PPP_PHASE_RUNNING + * | .||||| + * | . |||| + * PPP_PHASE_TERMINATE + * | . |||| + * PPP_PHASE_NETWORK + * |. . + * PPP_PHASE_ESTABLISH + * PPP_PHASE_DISCONNECT + * PPP_PHASE_DEAD + * + * Alright, PPP basic retransmission and LCP Echo consume one timer. + * 1 + * + * If authentication is enabled one timer is necessary during authentication. + * 1 + PPP_AUTH_SUPPORT + * + * If ECP is enabled one timer is necessary before IPCP and/or IP6CP, one more + * is necessary if CCP is enabled (only with MPPE support but we don't care much + * up to this detail level). + * 1 + ECP_SUPPORT + CCP_SUPPORT + * + * If CCP is enabled it might consume a timer during IPCP or IP6CP, thus + * we might use IPCP, IP6CP and CCP timers simultaneously. + * 1 + PPP_IPV4_SUPPORT + PPP_IPV6_SUPPORT + CCP_SUPPORT + * + * When entering running phase, IPCP or IP6CP is still running. If idle time limit + * is enabled one more timer is necessary. Same for max connect time and max + * octets features. Furthermore CCP RACK might be used past this point. + * 1 + PPP_IPV4_SUPPORT + PPP_IPV6_SUPPORT -1 + PPP_IDLETIMELIMIT + PPP_MAXCONNECT + MAXOCTETS + CCP_SUPPORT + * + * IPv4 or IPv6 must be enabled, therefore we don't need to take care the authentication + * and the CCP + ECP case, thus reducing overall complexity. + * 1 + LWIP_MAX(PPP_IPV4_SUPPORT + PPP_IPV6_SUPPORT + CCP_SUPPORT, PPP_IPV4_SUPPORT + PPP_IPV6_SUPPORT -1 + PPP_IDLETIMELIMIT + PPP_MAXCONNECT + MAXOCTETS + CCP_SUPPORT) + * + * We don't support PPP_IDLETIMELIMIT + PPP_MAXCONNECT + MAXOCTETS features + * and adding those defines to ppp_opts.h just for having the value always + * defined to 0 isn't worth it. + * 1 + LWIP_MAX(PPP_IPV4_SUPPORT + PPP_IPV6_SUPPORT + CCP_SUPPORT, PPP_IPV4_SUPPORT + PPP_IPV6_SUPPORT -1 + CCP_SUPPORT) + * + * Thus, the following is enough for now. + * 1 + PPP_IPV4_SUPPORT + PPP_IPV6_SUPPORT + CCP_SUPPORT + */ + +#ifdef __cplusplus +} +#endif #endif /* PPP_SUPPORT */ #endif /* LWIP_HDR_PPP_IMPL_H */ diff --git a/Libraries/LwIP/src/include/netif/ppp/ppp_opts.h b/Libraries/LwIP/src/include/netif/ppp/ppp_opts.h index 38e60d7..502a2cc 100755 --- a/Libraries/LwIP/src/include/netif/ppp/ppp_opts.h +++ b/Libraries/LwIP/src/include/netif/ppp/ppp_opts.h @@ -72,15 +72,27 @@ #define LWIP_PPP_API (PPP_SUPPORT && (NO_SYS == 0)) #endif +#if PPP_SUPPORT + /** * MEMP_NUM_PPP_PCB: the number of simultaneously active PPP * connections (requires the PPP_SUPPORT option) */ #ifndef MEMP_NUM_PPP_PCB -#define MEMP_NUM_PPP_PCB 1 +#define MEMP_NUM_PPP_PCB 1 #endif -#if PPP_SUPPORT +/** + * PPP_NUM_TIMEOUTS_PER_PCB: the number of sys_timeouts running in parallel per + * ppp_pcb. See the detailed explanation at the end of ppp_impl.h about simultaneous + * timers analysis. + */ +#ifndef PPP_NUM_TIMEOUTS_PER_PCB +#define PPP_NUM_TIMEOUTS_PER_PCB (1 + PPP_IPV4_SUPPORT + PPP_IPV6_SUPPORT + CCP_SUPPORT) +#endif + +/* The number of sys_timeouts required for the PPP module */ +#define PPP_NUM_TIMEOUTS (PPP_SUPPORT * PPP_NUM_TIMEOUTS_PER_PCB * MEMP_NUM_PPP_PCB) /** * MEMP_NUM_PPPOS_INTERFACES: the number of concurrently active PPPoS @@ -590,4 +602,9 @@ #endif /* PPP_SUPPORT */ +/* Default value if unset */ +#ifndef PPP_NUM_TIMEOUTS +#define PPP_NUM_TIMEOUTS 0 +#endif /* PPP_NUM_TIMEOUTS */ + #endif /* LWIP_PPP_OPTS_H */ diff --git a/Libraries/LwIP/src/include/netif/ppp/pppcrypt.h b/Libraries/LwIP/src/include/netif/ppp/pppcrypt.h index c08d202..968e532 100755 --- a/Libraries/LwIP/src/include/netif/ppp/pppcrypt.h +++ b/Libraries/LwIP/src/include/netif/ppp/pppcrypt.h @@ -36,7 +36,7 @@ /* This header file is included in all PPP modules needing hashes and/or ciphers */ #ifndef PPPCRYPT_H -#define PPPCRYPT_H +#define PPPCRYPT_H /* * If included PolarSSL copy is not used, user is expected to include @@ -44,6 +44,10 @@ */ #include "lwip/arch.h" +#ifdef __cplusplus +extern "C" { +#endif + /* * Map hashes and ciphers functions to PolarSSL */ @@ -131,6 +135,10 @@ void pppcrypt_56_to_64_bit_key(u_char *key, u_char *des_key); +#ifdef __cplusplus +} +#endif + #endif /* PPPCRYPT_H */ #endif /* PPP_SUPPORT */ diff --git a/Libraries/LwIP/src/include/netif/ppp/pppdebug.h b/Libraries/LwIP/src/include/netif/ppp/pppdebug.h index 6a9fac6..391b7c6 100755 --- a/Libraries/LwIP/src/include/netif/ppp/pppdebug.h +++ b/Libraries/LwIP/src/include/netif/ppp/pppdebug.h @@ -40,6 +40,10 @@ #ifndef PPPDEBUG_H #define PPPDEBUG_H +#ifdef __cplusplus +extern "C" { +#endif + /* Trace levels. */ #define LOG_CRITICAL (PPP_DEBUG | LWIP_DBG_LEVEL_SEVERE) #define LOG_ERR (PPP_DEBUG | LWIP_DBG_LEVEL_SEVERE) @@ -75,6 +79,10 @@ #endif /* PPP_DEBUG */ +#ifdef __cplusplus +} +#endif + #endif /* PPPDEBUG_H */ #endif /* PPP_SUPPORT */ diff --git a/Libraries/LwIP/src/include/netif/ppp/pppoe.h b/Libraries/LwIP/src/include/netif/ppp/pppoe.h index b0b2475..93acd4c 100755 --- a/Libraries/LwIP/src/include/netif/ppp/pppoe.h +++ b/Libraries/LwIP/src/include/netif/ppp/pppoe.h @@ -76,6 +76,10 @@ #include "ppp.h" #include "lwip/etharp.h" +#ifdef __cplusplus +extern "C" { +#endif + #ifdef PACK_STRUCT_USE_INCLUDES # include "arch/bpstruct.h" #endif @@ -174,6 +178,10 @@ ppp_pcb *pppoe_create(struct netif *pppif, void pppoe_disc_input(struct netif *netif, struct pbuf *p); void pppoe_data_input(struct netif *netif, struct pbuf *p); +#ifdef __cplusplus +} +#endif + #endif /* PPP_OE_H */ #endif /* PPP_SUPPORT && PPPOE_SUPPORT */ diff --git a/Libraries/LwIP/src/include/netif/ppp/pppol2tp.h b/Libraries/LwIP/src/include/netif/ppp/pppol2tp.h index ae428fa..e09d6e1 100755 --- a/Libraries/LwIP/src/include/netif/ppp/pppol2tp.h +++ b/Libraries/LwIP/src/include/netif/ppp/pppol2tp.h @@ -39,6 +39,10 @@ #include "ppp.h" +#ifdef __cplusplus +extern "C" { +#endif + /* Timeout */ #define PPPOL2TP_CONTROL_TIMEOUT (5*1000) /* base for quick timeout calculation */ #define PPPOL2TP_SLOW_RETRY (60*1000) /* persistent retry interval */ @@ -179,7 +183,7 @@ struct pppol2tp_pcb_s { u16_t tunnel_port; /* Tunnel port */ u16_t our_ns; /* NS to peer */ u16_t peer_nr; /* NR from peer */ - u16_t peer_ns; /* NS from peer */ + u16_t peer_ns; /* Expected NS from peer */ u16_t source_tunnel_id; /* Tunnel ID assigned by peer */ u16_t remote_tunnel_id; /* Tunnel ID assigned to peer */ u16_t source_session_id; /* Session ID assigned by peer */ @@ -197,5 +201,9 @@ ppp_pcb *pppol2tp_create(struct netif *pppif, const u8_t *secret, u8_t secret_len, ppp_link_status_cb_fn link_status_cb, void *ctx_cb); +#ifdef __cplusplus +} +#endif + #endif /* PPPOL2TP_H */ #endif /* PPP_SUPPORT && PPPOL2TP_SUPPORT */ diff --git a/Libraries/LwIP/src/include/netif/ppp/pppos.h b/Libraries/LwIP/src/include/netif/ppp/pppos.h index 2965284..acaedd7 100755 --- a/Libraries/LwIP/src/include/netif/ppp/pppos.h +++ b/Libraries/LwIP/src/include/netif/ppp/pppos.h @@ -42,6 +42,10 @@ #include "ppp.h" #include "vj.h" +#ifdef __cplusplus +extern "C" { +#endif + /* PPP packet parser states. Current state indicates operation yet to be * completed. */ enum { @@ -114,5 +118,9 @@ void pppos_input(ppp_pcb *ppp, u8_t* data, int len); err_t pppos_input_sys(struct pbuf *p, struct netif *inp); #endif /* !NO_SYS && !PPP_INPROC_IRQ_SAFE */ +#ifdef __cplusplus +} +#endif + #endif /* PPPOS_H */ #endif /* PPP_SUPPORT && PPPOL2TP_SUPPORT */ diff --git a/Libraries/LwIP/src/include/netif/ppp/upap.h b/Libraries/LwIP/src/include/netif/ppp/upap.h index 1533731..8d90e35 100755 --- a/Libraries/LwIP/src/include/netif/ppp/upap.h +++ b/Libraries/LwIP/src/include/netif/ppp/upap.h @@ -50,47 +50,51 @@ #include "ppp.h" +#ifdef __cplusplus +extern "C" { +#endif + /* * Packet header = Code, id, length. */ -#define UPAP_HEADERLEN 4 +#define UPAP_HEADERLEN 4 /* * UPAP codes. */ -#define UPAP_AUTHREQ 1 /* Authenticate-Request */ -#define UPAP_AUTHACK 2 /* Authenticate-Ack */ -#define UPAP_AUTHNAK 3 /* Authenticate-Nak */ +#define UPAP_AUTHREQ 1 /* Authenticate-Request */ +#define UPAP_AUTHACK 2 /* Authenticate-Ack */ +#define UPAP_AUTHNAK 3 /* Authenticate-Nak */ /* * Client states. */ -#define UPAPCS_INITIAL 0 /* Connection down */ -#define UPAPCS_CLOSED 1 /* Connection up, haven't requested auth */ -#define UPAPCS_PENDING 2 /* Connection down, have requested auth */ -#define UPAPCS_AUTHREQ 3 /* We've sent an Authenticate-Request */ -#define UPAPCS_OPEN 4 /* We've received an Ack */ -#define UPAPCS_BADAUTH 5 /* We've received a Nak */ +#define UPAPCS_INITIAL 0 /* Connection down */ +#define UPAPCS_CLOSED 1 /* Connection up, haven't requested auth */ +#define UPAPCS_PENDING 2 /* Connection down, have requested auth */ +#define UPAPCS_AUTHREQ 3 /* We've sent an Authenticate-Request */ +#define UPAPCS_OPEN 4 /* We've received an Ack */ +#define UPAPCS_BADAUTH 5 /* We've received a Nak */ /* * Server states. */ -#define UPAPSS_INITIAL 0 /* Connection down */ -#define UPAPSS_CLOSED 1 /* Connection up, haven't requested auth */ -#define UPAPSS_PENDING 2 /* Connection down, have requested auth */ -#define UPAPSS_LISTEN 3 /* Listening for an Authenticate */ -#define UPAPSS_OPEN 4 /* We've sent an Ack */ -#define UPAPSS_BADAUTH 5 /* We've sent a Nak */ +#define UPAPSS_INITIAL 0 /* Connection down */ +#define UPAPSS_CLOSED 1 /* Connection up, haven't requested auth */ +#define UPAPSS_PENDING 2 /* Connection down, have requested auth */ +#define UPAPSS_LISTEN 3 /* Listening for an Authenticate */ +#define UPAPSS_OPEN 4 /* We've sent an Ack */ +#define UPAPSS_BADAUTH 5 /* We've sent a Nak */ /* * Timeouts. */ #if 0 /* moved to ppp_opts.h */ -#define UPAP_DEFTIMEOUT 3 /* Timeout (seconds) for retransmitting req */ -#define UPAP_DEFREQTIME 30 /* Time to wait for auth-req from peer */ +#define UPAP_DEFTIMEOUT 3 /* Timeout (seconds) for retransmitting req */ +#define UPAP_DEFREQTIME 30 /* Time to wait for auth-req from peer */ #endif /* moved to ppp_opts.h */ /* @@ -98,16 +102,16 @@ */ #if PAP_SUPPORT typedef struct upap_state { - const char *us_user; /* User */ - u8_t us_userlen; /* User length */ - const char *us_passwd; /* Password */ - u8_t us_passwdlen; /* Password length */ - u8_t us_clientstate; /* Client state */ + const char *us_user; /* User */ + u8_t us_userlen; /* User length */ + const char *us_passwd; /* Password */ + u8_t us_passwdlen; /* Password length */ + u8_t us_clientstate; /* Client state */ #if PPP_SERVER - u8_t us_serverstate; /* Server state */ + u8_t us_serverstate; /* Server state */ #endif /* PPP_SERVER */ - u8_t us_id; /* Current id */ - u8_t us_transmits; /* Number of auth-reqs sent */ + u8_t us_id; /* Current id */ + u8_t us_transmits; /* Number of auth-reqs sent */ } upap_state; #endif /* PAP_SUPPORT */ @@ -119,5 +123,9 @@ void upap_authpeer(ppp_pcb *pcb); extern const struct protent pap_protent; +#ifdef __cplusplus +} +#endif + #endif /* UPAP_H */ #endif /* PPP_SUPPORT && PAP_SUPPORT */ diff --git a/Libraries/LwIP/src/include/netif/ppp/vj.h b/Libraries/LwIP/src/include/netif/ppp/vj.h index 17c33ee..1d91f25 100755 --- a/Libraries/LwIP/src/include/netif/ppp/vj.h +++ b/Libraries/LwIP/src/include/netif/ppp/vj.h @@ -31,6 +31,10 @@ #include "lwip/ip.h" #include "lwip/priv/tcp_priv.h" +#ifdef __cplusplus +extern "C" { +#endif + #define MAX_SLOTS 16 /* must be > 2 and < 256 */ #define MAX_HDR 128 @@ -156,6 +160,10 @@ extern void vj_uncompress_err (struct vjcompress *comp); extern int vj_uncompress_uncomp(struct pbuf *nb, struct vjcompress *comp); extern int vj_uncompress_tcp (struct pbuf **nb, struct vjcompress *comp); +#ifdef __cplusplus +} +#endif + #endif /* VJ_H */ #endif /* PPP_SUPPORT && VJ_SUPPORT */ diff --git a/Libraries/LwIP/src/include/netif/zepif.h b/Libraries/LwIP/src/include/netif/zepif.h new file mode 100644 index 0000000..2a801b4 --- /dev/null +++ b/Libraries/LwIP/src/include/netif/zepif.h @@ -0,0 +1,81 @@ +/** + * @file + * + * A netif implementing the ZigBee Eencapsulation Protocol (ZEP). + * This is used to tunnel 6LowPAN over UDP. + */ + +/* + * Copyright (c) 2018 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ + +#ifndef LWIP_HDR_ZEPIF_H +#define LWIP_HDR_ZEPIF_H + +#include "lwip/opt.h" +#include "netif/lowpan6.h" + +#if LWIP_IPV6 && LWIP_UDP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/netif.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define ZEPIF_DEFAULT_UDP_PORT 17754 + +/** Pass this struct as 'state' to netif_add to control the behaviour + * of this netif. If NULL is passed, default behaviour is chosen */ +struct zepif_init { + /** The UDP port used to ZEP frames from (0 = default) */ + u16_t zep_src_udp_port; + /** The UDP port used to ZEP frames to (0 = default) */ + u16_t zep_dst_udp_port; + /** The IP address to sed ZEP frames from (NULL = ANY) */ + const ip_addr_t *zep_src_ip_addr; + /** The IP address to sed ZEP frames to (NULL = BROADCAST) */ + const ip_addr_t *zep_dst_ip_addr; + /** If != NULL, the udp pcb is bound to this netif */ + const struct netif *zep_netif; + /** MAC address of the 6LowPAN device */ + u8_t addr[6]; +}; + +err_t zepif_init(struct netif *netif); + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_IPV6 && LWIP_UDP */ + +#endif /* LWIP_HDR_ZEPIF_H */ diff --git a/Libraries/LwIP/src/netif/FILES b/Libraries/LwIP/src/netif/FILES index 1689c77..1c193c0 100755 --- a/Libraries/LwIP/src/netif/FILES +++ b/Libraries/LwIP/src/netif/FILES @@ -5,14 +5,13 @@ are: ethernet.c Shared code for Ethernet based interfaces. -ethernetif.c - An example of how an Ethernet device driver could look. This - file can be used as a "skeleton" for developing new Ethernet - network device drivers. It uses the etharp.c ARP code. - lowpan6.c A 6LoWPAN implementation as a netif. +lowpan6_ble.c + A 6LoWPAN over Bluetooth Low Energy (BLE) implementation as netif, + according to RFC-7668. + slipif.c A generic implementation of the SLIP (Serial Line IP) protocol. It requires a sio (serial I/O) module to work. diff --git a/Libraries/LwIP/src/netif/bridgeif.c b/Libraries/LwIP/src/netif/bridgeif.c new file mode 100644 index 0000000..8a97bce --- /dev/null +++ b/Libraries/LwIP/src/netif/bridgeif.c @@ -0,0 +1,563 @@ +/** + * @file + * lwIP netif implementing an IEEE 802.1D MAC Bridge + */ + +/* + * Copyright (c) 2017 Simon Goldschmidt. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ + +/** + * @defgroup bridgeif IEEE 802.1D bridge + * @ingroup netifs + * This file implements an IEEE 802.1D bridge by using a multilayer netif approach + * (one hardware-independent netif for the bridge that uses hardware netifs for its ports). + * On transmit, the bridge selects the outgoing port(s). + * On receive, the port netif calls into the bridge (via its netif->input function) and + * the bridge selects the port(s) (and/or its netif->input function) to pass the received pbuf to. + * + * Usage: + * - add the port netifs just like you would when using them as dedicated netif without a bridge + * - only NETIF_FLAG_ETHARP/NETIF_FLAG_ETHERNET netifs are supported as bridge ports + * - add the bridge port netifs without IPv4 addresses (i.e. pass 'NULL, NULL, NULL') + * - don't add IPv6 addresses to the port netifs! + * - set up the bridge configuration in a global variable of type 'bridgeif_initdata_t' that contains + * - the MAC address of the bridge + * - some configuration options controlling the memory consumption (maximum number of ports + * and FDB entries) + * - e.g. for a bridge MAC address 00-01-02-03-04-05, 2 bridge ports, 1024 FDB entries + 16 static MAC entries: + * bridgeif_initdata_t mybridge_initdata = BRIDGEIF_INITDATA1(2, 1024, 16, ETH_ADDR(0, 1, 2, 3, 4, 5)); + * - add the bridge netif (with IPv4 config): + * struct netif bridge_netif; + * netif_add(&bridge_netif, &my_ip, &my_netmask, &my_gw, &mybridge_initdata, bridgeif_init, tcpip_input); + * NOTE: the passed 'input' function depends on BRIDGEIF_PORT_NETIFS_OUTPUT_DIRECT setting, + * which controls where the forwarding is done (netif low level input context vs. tcpip_thread) + * - set up all ports netifs and the bridge netif + * + * - When adding a port netif, NETIF_FLAG_ETHARP flag will be removed from a port + * to prevent ETHARP working on that port netif (we only want one IP per bridge not per port). + * - When adding a port netif, its input function is changed to call into the bridge. + * + * + * @todo: + * - compact static FDB entries (instead of walking the whole array) + * - add FDB query/read access + * - add FDB change callback (when learning or dropping auto-learned entries) + * - prefill FDB with MAC classes that should never be forwarded + * - multicast snooping? (and only forward group addresses to interested ports) + * - support removing ports + * - check SNMP integration + * - VLAN handling / trunk ports + * - priority handling? (although that largely depends on TX queue limitations and lwIP doesn't provide tx-done handling) + */ + +#include "netif/bridgeif.h" +#include "lwip/netif.h" +#include "lwip/sys.h" +#include "lwip/etharp.h" +#include "lwip/ethip6.h" +#include "lwip/snmp.h" +#include "lwip/timeouts.h" +#include + +#if LWIP_NUM_NETIF_CLIENT_DATA + +/* Define those to better describe your network interface. */ +#define IFNAME0 'b' +#define IFNAME1 'r' + +struct bridgeif_private_s; +typedef struct bridgeif_port_private_s { + struct bridgeif_private_s *bridge; + struct netif *port_netif; + u8_t port_num; +} bridgeif_port_t; + +typedef struct bridgeif_fdb_static_entry_s { + u8_t used; + bridgeif_portmask_t dst_ports; + struct eth_addr addr; +} bridgeif_fdb_static_entry_t; + +typedef struct bridgeif_private_s { + struct netif *netif; + struct eth_addr ethaddr; + u8_t max_ports; + u8_t num_ports; + bridgeif_port_t *ports; + u16_t max_fdbs_entries; + bridgeif_fdb_static_entry_t *fdbs; + u16_t max_fdbd_entries; + void *fdbd; +} bridgeif_private_t; + +/* netif data index to get the bridge on input */ +u8_t bridgeif_netif_client_id = 0xff; + +/** + * @ingroup bridgeif + * Add a static entry to the forwarding database. + * A static entry marks where frames to a specific eth address (unicast or group address) are + * forwarded. + * bits [0..(BRIDGEIF_MAX_PORTS-1)]: hw ports + * bit [BRIDGEIF_MAX_PORTS]: cpu port + * 0: drop + */ +err_t +bridgeif_fdb_add(struct netif *bridgeif, const struct eth_addr *addr, bridgeif_portmask_t ports) +{ + int i; + bridgeif_private_t *br; + BRIDGEIF_DECL_PROTECT(lev); + LWIP_ASSERT("invalid netif", bridgeif != NULL); + br = (bridgeif_private_t *)bridgeif->state; + LWIP_ASSERT("invalid state", br != NULL); + + BRIDGEIF_READ_PROTECT(lev); + for (i = 0; i < br->max_fdbs_entries; i++) { + if (!br->fdbs[i].used) { + BRIDGEIF_WRITE_PROTECT(lev); + if (!br->fdbs[i].used) { + br->fdbs[i].used = 1; + br->fdbs[i].dst_ports = ports; + memcpy(&br->fdbs[i].addr, addr, sizeof(struct eth_addr)); + BRIDGEIF_WRITE_UNPROTECT(lev); + BRIDGEIF_READ_UNPROTECT(lev); + return ERR_OK; + } + BRIDGEIF_WRITE_UNPROTECT(lev); + } + } + BRIDGEIF_READ_UNPROTECT(lev); + return ERR_MEM; +} + +/** + * @ingroup bridgeif + * Remove a static entry from the forwarding database + */ +err_t +bridgeif_fdb_remove(struct netif *bridgeif, const struct eth_addr *addr) +{ + int i; + bridgeif_private_t *br; + BRIDGEIF_DECL_PROTECT(lev); + LWIP_ASSERT("invalid netif", bridgeif != NULL); + br = (bridgeif_private_t *)bridgeif->state; + LWIP_ASSERT("invalid state", br != NULL); + + BRIDGEIF_READ_PROTECT(lev); + for (i = 0; i < br->max_fdbs_entries; i++) { + if (br->fdbs[i].used && !memcmp(&br->fdbs[i].addr, addr, sizeof(struct eth_addr))) { + BRIDGEIF_WRITE_PROTECT(lev); + if (br->fdbs[i].used && !memcmp(&br->fdbs[i].addr, addr, sizeof(struct eth_addr))) { + memset(&br->fdbs[i], 0, sizeof(bridgeif_fdb_static_entry_t)); + BRIDGEIF_WRITE_UNPROTECT(lev); + BRIDGEIF_READ_UNPROTECT(lev); + return ERR_OK; + } + BRIDGEIF_WRITE_UNPROTECT(lev); + } + } + BRIDGEIF_READ_UNPROTECT(lev); + return ERR_VAL; +} + +/** Get the forwarding port(s) (as bit mask) for the specified destination mac address */ +static bridgeif_portmask_t +bridgeif_find_dst_ports(bridgeif_private_t *br, struct eth_addr *dst_addr) +{ + int i; + BRIDGEIF_DECL_PROTECT(lev); + BRIDGEIF_READ_PROTECT(lev); + /* first check for static entries */ + for (i = 0; i < br->max_fdbs_entries; i++) { + if (br->fdbs[i].used) { + if (!memcmp(&br->fdbs[i].addr, dst_addr, sizeof(struct eth_addr))) { + bridgeif_portmask_t ret = br->fdbs[i].dst_ports; + BRIDGEIF_READ_UNPROTECT(lev); + return ret; + } + } + } + if (dst_addr->addr[0] & 1) { + /* no match found: flood remaining group address */ + BRIDGEIF_READ_UNPROTECT(lev); + return BR_FLOOD; + } + BRIDGEIF_READ_UNPROTECT(lev); + /* no match found: check dynamic fdb for port or fall back to flooding */ + return bridgeif_fdb_get_dst_ports(br->fdbd, dst_addr); +} + +/** Helper function to see if a destination mac belongs to the bridge + * (bridge netif or one of the port netifs), in which case the frame + * is sent to the cpu only. + */ +static int +bridgeif_is_local_mac(bridgeif_private_t *br, struct eth_addr *addr) +{ + int i; + BRIDGEIF_DECL_PROTECT(lev); + if (!memcmp(br->netif->hwaddr, addr, sizeof(struct eth_addr))) { + return 1; + } + BRIDGEIF_READ_PROTECT(lev); + for (i = 0; i < br->num_ports; i++) { + struct netif *portif = br->ports[i].port_netif; + if (portif != NULL) { + if (!memcmp(portif->hwaddr, addr, sizeof(struct eth_addr))) { + BRIDGEIF_READ_UNPROTECT(lev); + return 1; + } + } + } + BRIDGEIF_READ_UNPROTECT(lev); + return 0; +} + +/* Output helper function */ +static err_t +bridgeif_send_to_port(bridgeif_private_t *br, struct pbuf *p, u8_t dstport_idx) +{ + if (dstport_idx < BRIDGEIF_MAX_PORTS) { + /* possibly an external port */ + if (dstport_idx < br->max_ports) { + struct netif *portif = br->ports[dstport_idx].port_netif; + if ((portif != NULL) && (portif->linkoutput != NULL)) { + /* prevent sending out to rx port */ + if (netif_get_index(portif) != p->if_idx) { + if (netif_is_link_up(portif)) { + LWIP_DEBUGF(BRIDGEIF_FW_DEBUG, ("br -> flood(%p:%d) -> %d\n", (void *)p, p->if_idx, netif_get_index(portif))); + return portif->linkoutput(portif, p); + } + } + } + } + } else { + LWIP_ASSERT("invalid port index", dstport_idx == BRIDGEIF_MAX_PORTS); + } + return ERR_OK; +} + +/** Helper function to pass a pbuf to all ports marked in 'dstports' + */ +static err_t +bridgeif_send_to_ports(bridgeif_private_t *br, struct pbuf *p, bridgeif_portmask_t dstports) +{ + err_t err, ret_err = ERR_OK; + u8_t i; + bridgeif_portmask_t mask = 1; + BRIDGEIF_DECL_PROTECT(lev); + BRIDGEIF_READ_PROTECT(lev); + for (i = 0; i < BRIDGEIF_MAX_PORTS; i++, mask = (bridgeif_portmask_t)(mask << 1)) { + if (dstports & mask) { + err = bridgeif_send_to_port(br, p, i); + if (err != ERR_OK) { + ret_err = err; + } + } + } + BRIDGEIF_READ_UNPROTECT(lev); + return ret_err; +} + +/** Output function of the application port of the bridge (the one with an ip address). + * The forwarding port(s) where this pbuf is sent on is/are automatically selected + * from the FDB. + */ +static err_t +bridgeif_output(struct netif *netif, struct pbuf *p) +{ + err_t err; + bridgeif_private_t *br = (bridgeif_private_t *)netif->state; + struct eth_addr *dst = (struct eth_addr *)(p->payload); + + bridgeif_portmask_t dstports = bridgeif_find_dst_ports(br, dst); + err = bridgeif_send_to_ports(br, p, dstports); + + MIB2_STATS_NETIF_ADD(netif, ifoutoctets, p->tot_len); + if (((u8_t *)p->payload)[0] & 1) { + /* broadcast or multicast packet*/ + MIB2_STATS_NETIF_INC(netif, ifoutnucastpkts); + } else { + /* unicast packet */ + MIB2_STATS_NETIF_INC(netif, ifoutucastpkts); + } + /* increase ifoutdiscards or ifouterrors on error */ + + LINK_STATS_INC(link.xmit); + + return err; +} + +/** The actual bridge input function. Port netif's input is changed to call + * here. This function decides where the frame is forwarded. + */ +static err_t +bridgeif_input(struct pbuf *p, struct netif *netif) +{ + u8_t rx_idx; + bridgeif_portmask_t dstports; + struct eth_addr *src, *dst; + bridgeif_private_t *br; + bridgeif_port_t *port; + if (p == NULL || netif == NULL) { + return ERR_VAL; + } + port = (bridgeif_port_t *)netif_get_client_data(netif, bridgeif_netif_client_id); + LWIP_ASSERT("port data not set", port != NULL); + if (port == NULL || port->bridge == NULL) { + return ERR_VAL; + } + br = (bridgeif_private_t *)port->bridge; + rx_idx = netif_get_index(netif); + /* store receive index in pbuf */ + p->if_idx = rx_idx; + + dst = (struct eth_addr *)p->payload; + src = (struct eth_addr *)(((u8_t *)p->payload) + sizeof(struct eth_addr)); + + if ((src->addr[0] & 1) == 0) { + /* update src for all non-group addresses */ + bridgeif_fdb_update_src(br->fdbd, src, port->port_num); + } + + if (dst->addr[0] & 1) { + /* group address -> flood + cpu? */ + dstports = bridgeif_find_dst_ports(br, dst); + bridgeif_send_to_ports(br, p, dstports); + if (dstports & (1 << BRIDGEIF_MAX_PORTS)) { + /* we pass the reference to ->input or have to free it */ + LWIP_DEBUGF(BRIDGEIF_FW_DEBUG, ("br -> input(%p)\n", (void *)p)); + if (br->netif->input(p, br->netif) != ERR_OK) { + pbuf_free(p); + } + } else { + /* all references done */ + pbuf_free(p); + } + /* always return ERR_OK here to prevent the caller freeing the pbuf */ + return ERR_OK; + } else { + /* is this for one of the local ports? */ + if (bridgeif_is_local_mac(br, dst)) { + /* yes, send to cpu port only */ + LWIP_DEBUGF(BRIDGEIF_FW_DEBUG, ("br -> input(%p)\n", (void *)p)); + return br->netif->input(p, br->netif); + } + + /* get dst port */ + dstports = bridgeif_find_dst_ports(br, dst); + bridgeif_send_to_ports(br, p, dstports); + /* no need to send to cpu, flooding is for external ports only */ + /* by this, we consumed the pbuf */ + pbuf_free(p); + /* always return ERR_OK here to prevent the caller freeing the pbuf */ + return ERR_OK; + } +} + +#if !BRIDGEIF_PORT_NETIFS_OUTPUT_DIRECT +/** Input function for port netifs used to synchronize into tcpip_thread. + */ +static err_t +bridgeif_tcpip_input(struct pbuf *p, struct netif *netif) +{ + return tcpip_inpkt(p, netif, bridgeif_input); +} +#endif /* BRIDGEIF_PORT_NETIFS_OUTPUT_DIRECT */ + +/** + * @ingroup bridgeif + * Initialization function passed to netif_add(). + * + * ATTENTION: A pointer to a @ref bridgeif_initdata_t must be passed as 'state' + * to @ref netif_add when adding the bridge. I supplies MAC address + * and controls memory allocation (number of ports, FDB size). + * + * @param netif the lwip network interface structure for this ethernetif + * @return ERR_OK if the loopif is initialized + * ERR_MEM if private data couldn't be allocated + * any other err_t on error + */ +err_t +bridgeif_init(struct netif *netif) +{ + bridgeif_initdata_t *init_data; + bridgeif_private_t *br; + size_t alloc_len_sizet; + mem_size_t alloc_len; + + LWIP_ASSERT("netif != NULL", (netif != NULL)); + LWIP_ASSERT("bridgeif needs an input callback", (netif->input != NULL)); +#if !BRIDGEIF_PORT_NETIFS_OUTPUT_DIRECT + if (netif->input == tcpip_input) { + LWIP_DEBUGF(BRIDGEIF_DEBUG | LWIP_DBG_ON, ("bridgeif does not need tcpip_input, use netif_input/ethernet_input instead")); + } +#endif + + if (bridgeif_netif_client_id == 0xFF) { + bridgeif_netif_client_id = netif_alloc_client_data_id(); + } + + init_data = (bridgeif_initdata_t *)netif->state; + LWIP_ASSERT("init_data != NULL", (init_data != NULL)); + LWIP_ASSERT("init_data->max_ports <= BRIDGEIF_MAX_PORTS", + init_data->max_ports <= BRIDGEIF_MAX_PORTS); + + alloc_len_sizet = sizeof(bridgeif_private_t) + (init_data->max_ports * sizeof(bridgeif_port_t) + (init_data->max_fdb_static_entries * sizeof(bridgeif_fdb_static_entry_t))); + alloc_len = (mem_size_t)alloc_len_sizet; + LWIP_ASSERT("alloc_len == alloc_len_sizet", alloc_len == alloc_len_sizet); + LWIP_DEBUGF(BRIDGEIF_DEBUG, ("bridgeif_init: allocating %d bytes for private data\n", (int)alloc_len)); + br = (bridgeif_private_t *)mem_calloc(1, alloc_len); + if (br == NULL) { + LWIP_DEBUGF(NETIF_DEBUG, ("bridgeif_init: out of memory\n")); + return ERR_MEM; + } + memcpy(&br->ethaddr, &init_data->ethaddr, sizeof(br->ethaddr)); + br->netif = netif; + + br->max_ports = init_data->max_ports; + br->ports = (bridgeif_port_t *)(br + 1); + + br->max_fdbs_entries = init_data->max_fdb_static_entries; + br->fdbs = (bridgeif_fdb_static_entry_t *)(((u8_t *)(br + 1)) + (init_data->max_ports * sizeof(bridgeif_port_t))); + + br->max_fdbd_entries = init_data->max_fdb_dynamic_entries; + br->fdbd = bridgeif_fdb_init(init_data->max_fdb_dynamic_entries); + if (br->fdbd == NULL) { + LWIP_DEBUGF(NETIF_DEBUG, ("bridgeif_init: out of memory in fdb_init\n")); + mem_free(br); + return ERR_MEM; + } + +#if LWIP_NETIF_HOSTNAME + /* Initialize interface hostname */ + netif->hostname = "lwip"; +#endif /* LWIP_NETIF_HOSTNAME */ + + /* + * Initialize the snmp variables and counters inside the struct netif. + * The last argument should be replaced with your link speed, in units + * of bits per second. + */ + MIB2_INIT_NETIF(netif, snmp_ifType_ethernet_csmacd, 0); + + netif->state = br; + netif->name[0] = IFNAME0; + netif->name[1] = IFNAME1; + /* We directly use etharp_output() here to save a function call. + * You can instead declare your own function an call etharp_output() + * from it if you have to do some checks before sending (e.g. if link + * is available...) */ +#if LWIP_IPV4 + netif->output = etharp_output; +#endif /* LWIP_IPV4 */ +#if LWIP_IPV6 + netif->output_ip6 = ethip6_output; +#endif /* LWIP_IPV6 */ + netif->linkoutput = bridgeif_output; + + /* set MAC hardware address length */ + netif->hwaddr_len = ETH_HWADDR_LEN; + + /* set MAC hardware address */ + memcpy(netif->hwaddr, &br->ethaddr, ETH_HWADDR_LEN); + + /* maximum transfer unit */ + netif->mtu = 1500; + + /* device capabilities */ + /* don't set NETIF_FLAG_ETHARP if this device is not an ethernet one */ + netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET | NETIF_FLAG_IGMP | NETIF_FLAG_MLD6 | NETIF_FLAG_LINK_UP; + +#if LWIP_IPV6 && LWIP_IPV6_MLD + /* + * For hardware/netifs that implement MAC filtering. + * All-nodes link-local is handled by default, so we must let the hardware know + * to allow multicast packets in. + * Should set mld_mac_filter previously. */ + if (netif->mld_mac_filter != NULL) { + ip6_addr_t ip6_allnodes_ll; + ip6_addr_set_allnodes_linklocal(&ip6_allnodes_ll); + netif->mld_mac_filter(netif, &ip6_allnodes_ll, NETIF_ADD_MAC_FILTER); + } +#endif /* LWIP_IPV6 && LWIP_IPV6_MLD */ + + return ERR_OK; +} + +/** + * @ingroup bridgeif + * Add a port to the bridge + */ +err_t +bridgeif_add_port(struct netif *bridgeif, struct netif *portif) +{ + bridgeif_private_t *br; + bridgeif_port_t *port; + + LWIP_ASSERT("bridgeif != NULL", bridgeif != NULL); + LWIP_ASSERT("bridgeif->state != NULL", bridgeif->state != NULL); + LWIP_ASSERT("portif != NULL", portif != NULL); + + if (!(portif->flags & NETIF_FLAG_ETHARP) || !(portif->flags & NETIF_FLAG_ETHERNET)) { + /* can only add ETHERNET/ETHARP interfaces */ + return ERR_VAL; + } + + br = (bridgeif_private_t *)bridgeif->state; + + if (br->num_ports >= br->max_ports) { + return ERR_VAL; + } + port = &br->ports[br->num_ports]; + port->port_netif = portif; + port->port_num = br->num_ports; + port->bridge = br; + br->num_ports++; + + /* let the port call us on input */ +#if BRIDGEIF_PORT_NETIFS_OUTPUT_DIRECT + portif->input = bridgeif_input; +#else + portif->input = bridgeif_tcpip_input; +#endif + /* store pointer to bridge in netif */ + netif_set_client_data(portif, bridgeif_netif_client_id, port); + /* remove ETHARP flag to prevent sending report events on netif-up */ + netif_clear_flags(portif, NETIF_FLAG_ETHARP); + + return ERR_OK; +} + +#endif /* LWIP_NUM_NETIF_CLIENT_DATA */ diff --git a/Libraries/LwIP/src/netif/bridgeif_fdb.c b/Libraries/LwIP/src/netif/bridgeif_fdb.c new file mode 100644 index 0000000..6739fc2 --- /dev/null +++ b/Libraries/LwIP/src/netif/bridgeif_fdb.c @@ -0,0 +1,212 @@ +/** + * @file + * lwIP netif implementing an FDB for IEEE 802.1D MAC Bridge + */ + +/* + * Copyright (c) 2017 Simon Goldschmidt. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ + +/** + * @defgroup bridgeif_fdb FDB example code + * @ingroup bridgeif + * This file implements an example for an FDB (Forwarding DataBase) + */ + +#include "netif/bridgeif.h" +#include "lwip/sys.h" +#include "lwip/mem.h" +#include "lwip/timeouts.h" +#include + +#define BRIDGEIF_AGE_TIMER_MS 1000 + +#define BR_FDB_TIMEOUT_SEC (60*5) /* 5 minutes FDB timeout */ + +typedef struct bridgeif_dfdb_entry_s { + u8_t used; + u8_t port; + u32_t ts; + struct eth_addr addr; +} bridgeif_dfdb_entry_t; + +typedef struct bridgeif_dfdb_s { + u16_t max_fdb_entries; + bridgeif_dfdb_entry_t *fdb; +} bridgeif_dfdb_t; + +/** + * @ingroup bridgeif_fdb + * A real simple and slow implementation of an auto-learning forwarding database that + * remembers known src mac addresses to know which port to send frames destined for that + * mac address. + * + * ATTENTION: This is meant as an example only, in real-world use, you should + * provide a better implementation :-) + */ +void +bridgeif_fdb_update_src(void *fdb_ptr, struct eth_addr *src_addr, u8_t port_idx) +{ + int i; + bridgeif_dfdb_t *fdb = (bridgeif_dfdb_t *)fdb_ptr; + BRIDGEIF_DECL_PROTECT(lev); + BRIDGEIF_READ_PROTECT(lev); + for (i = 0; i < fdb->max_fdb_entries; i++) { + bridgeif_dfdb_entry_t *e = &fdb->fdb[i]; + if (e->used && e->ts) { + if (!memcmp(&e->addr, src_addr, sizeof(struct eth_addr))) { + LWIP_DEBUGF(BRIDGEIF_FDB_DEBUG, ("br: update src %02x:%02x:%02x:%02x:%02x:%02x (from %d) @ idx %d\n", + src_addr->addr[0], src_addr->addr[1], src_addr->addr[2], src_addr->addr[3], src_addr->addr[4], src_addr->addr[5], + port_idx, i)); + BRIDGEIF_WRITE_PROTECT(lev); + e->ts = BR_FDB_TIMEOUT_SEC; + e->port = port_idx; + BRIDGEIF_WRITE_UNPROTECT(lev); + BRIDGEIF_READ_UNPROTECT(lev); + return; + } + } + } + /* not found, allocate new entry from free */ + for (i = 0; i < fdb->max_fdb_entries; i++) { + bridgeif_dfdb_entry_t *e = &fdb->fdb[i]; + if (!e->used || !e->ts) { + BRIDGEIF_WRITE_PROTECT(lev); + /* check again when protected */ + if (!e->used || !e->ts) { + LWIP_DEBUGF(BRIDGEIF_FDB_DEBUG, ("br: create src %02x:%02x:%02x:%02x:%02x:%02x (from %d) @ idx %d\n", + src_addr->addr[0], src_addr->addr[1], src_addr->addr[2], src_addr->addr[3], src_addr->addr[4], src_addr->addr[5], + port_idx, i)); + memcpy(&e->addr, src_addr, sizeof(struct eth_addr)); + e->ts = BR_FDB_TIMEOUT_SEC; + e->port = port_idx; + e->used = 1; + BRIDGEIF_WRITE_UNPROTECT(lev); + BRIDGEIF_READ_UNPROTECT(lev); + return; + } + BRIDGEIF_WRITE_UNPROTECT(lev); + } + } + BRIDGEIF_READ_UNPROTECT(lev); + /* not found, no free entry -> flood */ +} + +/** + * @ingroup bridgeif_fdb + * Walk our list of auto-learnt fdb entries and return a port to forward or BR_FLOOD if unknown + */ +bridgeif_portmask_t +bridgeif_fdb_get_dst_ports(void *fdb_ptr, struct eth_addr *dst_addr) +{ + int i; + bridgeif_dfdb_t *fdb = (bridgeif_dfdb_t *)fdb_ptr; + BRIDGEIF_DECL_PROTECT(lev); + BRIDGEIF_READ_PROTECT(lev); + for (i = 0; i < fdb->max_fdb_entries; i++) { + bridgeif_dfdb_entry_t *e = &fdb->fdb[i]; + if (e->used && e->ts) { + if (!memcmp(&e->addr, dst_addr, sizeof(struct eth_addr))) { + bridgeif_portmask_t ret = (bridgeif_portmask_t)(1 << e->port); + BRIDGEIF_READ_UNPROTECT(lev); + return ret; + } + } + } + BRIDGEIF_READ_UNPROTECT(lev); + return BR_FLOOD; +} + +/** + * @ingroup bridgeif_fdb + * Aging implementation of our simple fdb + */ +static void +bridgeif_fdb_age_one_second(void *fdb_ptr) +{ + int i; + bridgeif_dfdb_t *fdb; + BRIDGEIF_DECL_PROTECT(lev); + + fdb = (bridgeif_dfdb_t *)fdb_ptr; + BRIDGEIF_READ_PROTECT(lev); + + for (i = 0; i < fdb->max_fdb_entries; i++) { + bridgeif_dfdb_entry_t *e = &fdb->fdb[i]; + if (e->used && e->ts) { + BRIDGEIF_WRITE_PROTECT(lev); + /* check again when protected */ + if (e->used && e->ts) { + if (--e->ts == 0) { + e->used = 0; + } + } + BRIDGEIF_WRITE_UNPROTECT(lev); + } + } + BRIDGEIF_READ_UNPROTECT(lev); +} + +/** Timer callback for fdb aging, called once per second */ +static void +bridgeif_age_tmr(void *arg) +{ + bridgeif_dfdb_t *fdb = (bridgeif_dfdb_t *)arg; + + LWIP_ASSERT("invalid arg", arg != NULL); + + bridgeif_fdb_age_one_second(fdb); + sys_timeout(BRIDGEIF_AGE_TIMER_MS, bridgeif_age_tmr, arg); +} + +/** + * @ingroup bridgeif_fdb + * Init our simple fdb list + */ +void * +bridgeif_fdb_init(u16_t max_fdb_entries) +{ + bridgeif_dfdb_t *fdb; + size_t alloc_len_sizet = sizeof(bridgeif_dfdb_t) + (max_fdb_entries * sizeof(bridgeif_dfdb_entry_t)); + mem_size_t alloc_len = (mem_size_t)alloc_len_sizet; + LWIP_ASSERT("alloc_len == alloc_len_sizet", alloc_len == alloc_len_sizet); + LWIP_DEBUGF(BRIDGEIF_DEBUG, ("bridgeif_fdb_init: allocating %d bytes for private FDB data\n", (int)alloc_len)); + fdb = (bridgeif_dfdb_t *)mem_calloc(1, alloc_len); + if (fdb == NULL) { + return NULL; + } + fdb->max_fdb_entries = max_fdb_entries; + fdb->fdb = (bridgeif_dfdb_entry_t *)(fdb + 1); + + sys_timeout(BRIDGEIF_AGE_TIMER_MS, bridgeif_age_tmr, fdb); + + return fdb; +} diff --git a/Libraries/LwIP/src/netif/ethernet.c b/Libraries/LwIP/src/netif/ethernet.c index 97a15d3..3c9eb02 100755 --- a/Libraries/LwIP/src/netif/ethernet.c +++ b/Libraries/LwIP/src/netif/ethernet.c @@ -1,7 +1,7 @@ /** * @file * Ethernet common functions - * + * * @defgroup ethernet Ethernet * @ingroup callbackstyle_api */ @@ -60,8 +60,8 @@ #include LWIP_HOOK_FILENAME #endif -const struct eth_addr ethbroadcast = {{0xff,0xff,0xff,0xff,0xff,0xff}}; -const struct eth_addr ethzero = {{0,0,0,0,0,0}}; +const struct eth_addr ethbroadcast = {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}}; +const struct eth_addr ethzero = {{0, 0, 0, 0, 0, 0}}; /** * @ingroup lwip_nosys @@ -72,7 +72,7 @@ const struct eth_addr ethzero = {{0,0,0,0,0,0}}; * * @param p the received packet, p->payload pointing to the ethernet header * @param netif the network interface on which the packet was received - * + * * @see LWIP_HOOK_UNKNOWN_ETH_PROTOCOL * @see ETHARP_SUPPORT_VLAN * @see LWIP_HOOK_VLAN_CHECK @@ -80,12 +80,14 @@ const struct eth_addr ethzero = {{0,0,0,0,0,0}}; err_t ethernet_input(struct pbuf *p, struct netif *netif) { - struct eth_hdr* ethhdr; + struct eth_hdr *ethhdr; u16_t type; #if LWIP_ARP || ETHARP_SUPPORT_VLAN || LWIP_IPV6 - s16_t ip_hdr_offset = SIZEOF_ETH_HDR; + u16_t next_hdr_offset = SIZEOF_ETH_HDR; #endif /* LWIP_ARP || ETHARP_SUPPORT_VLAN */ + LWIP_ASSERT_CORE_LOCKED(); + if (p->len <= SIZEOF_ETH_HDR) { /* a packet with only an ethernet header (or less) is not valid for us */ ETHARP_STATS_INC(etharp.proterr); @@ -94,20 +96,25 @@ ethernet_input(struct pbuf *p, struct netif *netif) goto free_and_return; } + if (p->if_idx == NETIF_NO_INDEX) { + p->if_idx = netif_get_index(netif); + } + /* points to packet payload, which starts with an Ethernet header */ ethhdr = (struct eth_hdr *)p->payload; LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, - ("ethernet_input: dest:%"X8_F":%"X8_F":%"X8_F":%"X8_F":%"X8_F":%"X8_F", src:%"X8_F":%"X8_F":%"X8_F":%"X8_F":%"X8_F":%"X8_F", type:%"X16_F"\n", - (unsigned)ethhdr->dest.addr[0], (unsigned)ethhdr->dest.addr[1], (unsigned)ethhdr->dest.addr[2], - (unsigned)ethhdr->dest.addr[3], (unsigned)ethhdr->dest.addr[4], (unsigned)ethhdr->dest.addr[5], - (unsigned)ethhdr->src.addr[0], (unsigned)ethhdr->src.addr[1], (unsigned)ethhdr->src.addr[2], - (unsigned)ethhdr->src.addr[3], (unsigned)ethhdr->src.addr[4], (unsigned)ethhdr->src.addr[5], - lwip_htons(ethhdr->type))); + ("ethernet_input: dest:%"X8_F":%"X8_F":%"X8_F":%"X8_F":%"X8_F":%"X8_F", src:%"X8_F":%"X8_F":%"X8_F":%"X8_F":%"X8_F":%"X8_F", type:%"X16_F"\n", + (unsigned char)ethhdr->dest.addr[0], (unsigned char)ethhdr->dest.addr[1], (unsigned char)ethhdr->dest.addr[2], + (unsigned char)ethhdr->dest.addr[3], (unsigned char)ethhdr->dest.addr[4], (unsigned char)ethhdr->dest.addr[5], + (unsigned char)ethhdr->src.addr[0], (unsigned char)ethhdr->src.addr[1], (unsigned char)ethhdr->src.addr[2], + (unsigned char)ethhdr->src.addr[3], (unsigned char)ethhdr->src.addr[4], (unsigned char)ethhdr->src.addr[5], + lwip_htons(ethhdr->type))); type = ethhdr->type; #if ETHARP_SUPPORT_VLAN if (type == PP_HTONS(ETHTYPE_VLAN)) { - struct eth_vlan_hdr *vlan = (struct eth_vlan_hdr*)(((char*)ethhdr) + SIZEOF_ETH_HDR); + struct eth_vlan_hdr *vlan = (struct eth_vlan_hdr *)(((char *)ethhdr) + SIZEOF_ETH_HDR); + next_hdr_offset = SIZEOF_ETH_HDR + SIZEOF_VLAN_HDR; if (p->len <= SIZEOF_ETH_HDR + SIZEOF_VLAN_HDR) { /* a packet with only an ethernet/vlan header (or less) is not valid for us */ ETHARP_STATS_INC(etharp.proterr); @@ -129,7 +136,6 @@ ethernet_input(struct pbuf *p, struct netif *netif) } #endif /* defined(LWIP_HOOK_VLAN_CHECK) || defined(ETHARP_VLAN_CHECK) || defined(ETHARP_VLAN_CHECK_FN) */ type = vlan->tpid; - ip_hdr_offset = SIZEOF_ETH_HDR + SIZEOF_VLAN_HDR; } #endif /* ETHARP_SUPPORT_VLAN */ @@ -151,8 +157,8 @@ ethernet_input(struct pbuf *p, struct netif *netif) #if LWIP_IPV6 else if ((ethhdr->dest.addr[0] == LL_IP6_MULTICAST_ADDR_0) && (ethhdr->dest.addr[1] == LL_IP6_MULTICAST_ADDR_1)) { - /* mark the pbuf as link-layer multicast */ - p->flags |= PBUF_FLAG_LLMCAST; + /* mark the pbuf as link-layer multicast */ + p->flags |= PBUF_FLAG_LLMCAST; } #endif /* LWIP_IPV6 */ else if (eth_addr_cmp(ðhdr->dest, ðbroadcast)) { @@ -168,11 +174,11 @@ ethernet_input(struct pbuf *p, struct netif *netif) if (!(netif->flags & NETIF_FLAG_ETHARP)) { goto free_and_return; } - /* skip Ethernet header */ - if ((p->len < ip_hdr_offset) || pbuf_header(p, (s16_t)-ip_hdr_offset)) { + /* skip Ethernet header (min. size checked above) */ + if (pbuf_remove_header(p, next_hdr_offset)) { LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, - ("ethernet_input: IPv4 packet dropped, too short (%"S16_F"/%"S16_F")\n", - p->tot_len, ip_hdr_offset)); + ("ethernet_input: IPv4 packet dropped, too short (%"U16_F"/%"U16_F")\n", + p->tot_len, next_hdr_offset)); LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("Can't move over header in packet")); goto free_and_return; } else { @@ -185,11 +191,11 @@ ethernet_input(struct pbuf *p, struct netif *netif) if (!(netif->flags & NETIF_FLAG_ETHARP)) { goto free_and_return; } - /* skip Ethernet header */ - if ((p->len < ip_hdr_offset) || pbuf_header(p, (s16_t)-ip_hdr_offset)) { + /* skip Ethernet header (min. size checked above) */ + if (pbuf_remove_header(p, next_hdr_offset)) { LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, - ("ethernet_input: ARP response packet dropped, too short (%"S16_F"/%"S16_F")\n", - p->tot_len, ip_hdr_offset)); + ("ethernet_input: ARP response packet dropped, too short (%"U16_F"/%"U16_F")\n", + p->tot_len, next_hdr_offset)); LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("Can't move over header in packet")); ETHARP_STATS_INC(etharp.lenerr); ETHARP_STATS_INC(etharp.drop); @@ -213,10 +219,10 @@ ethernet_input(struct pbuf *p, struct netif *netif) #if LWIP_IPV6 case PP_HTONS(ETHTYPE_IPV6): /* IPv6 */ /* skip Ethernet header */ - if ((p->len < ip_hdr_offset) || pbuf_header(p, (s16_t)-ip_hdr_offset)) { + if ((p->len < next_hdr_offset) || pbuf_remove_header(p, next_hdr_offset)) { LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, - ("ethernet_input: IPv6 packet dropped, too short (%"S16_F"/%"S16_F")\n", - p->tot_len, ip_hdr_offset)); + ("ethernet_input: IPv6 packet dropped, too short (%"U16_F"/%"U16_F")\n", + p->tot_len, next_hdr_offset)); goto free_and_return; } else { /* pass to IPv6 layer */ @@ -227,7 +233,7 @@ ethernet_input(struct pbuf *p, struct netif *netif) default: #ifdef LWIP_HOOK_UNKNOWN_ETH_PROTOCOL - if(LWIP_HOOK_UNKNOWN_ETH_PROTOCOL(p, netif) == ERR_OK) { + if (LWIP_HOOK_UNKNOWN_ETH_PROTOCOL(p, netif) == ERR_OK) { break; } #endif @@ -257,28 +263,27 @@ free_and_return: * @param p the packet to send. pbuf layer must be @ref PBUF_LINK. * @param src the source MAC address to be copied into the ethernet header * @param dst the destination MAC address to be copied into the ethernet header - * @param eth_type ethernet type (@ref eth_type) + * @param eth_type ethernet type (@ref lwip_ieee_eth_type) * @return ERR_OK if the packet was sent, any other err_t on failure */ err_t -ethernet_output(struct netif* netif, struct pbuf* p, - const struct eth_addr* src, const struct eth_addr* dst, - u16_t eth_type) -{ - struct eth_hdr* ethhdr; +ethernet_output(struct netif * netif, struct pbuf * p, + const struct eth_addr * src, const struct eth_addr * dst, + u16_t eth_type) { + struct eth_hdr *ethhdr; u16_t eth_type_be = lwip_htons(eth_type); #if ETHARP_SUPPORT_VLAN && defined(LWIP_HOOK_VLAN_SET) s32_t vlan_prio_vid = LWIP_HOOK_VLAN_SET(netif, p, src, dst, eth_type); if (vlan_prio_vid >= 0) { - struct eth_vlan_hdr* vlanhdr; + struct eth_vlan_hdr *vlanhdr; LWIP_ASSERT("prio_vid must be <= 0xFFFF", vlan_prio_vid <= 0xFFFF); - if (pbuf_header(p, SIZEOF_ETH_HDR + SIZEOF_VLAN_HDR) != 0) { + if (pbuf_add_header(p, SIZEOF_ETH_HDR + SIZEOF_VLAN_HDR) != 0) { goto pbuf_header_failed; } - vlanhdr = (struct eth_vlan_hdr*)(((u8_t*)p->payload) + SIZEOF_ETH_HDR); + vlanhdr = (struct eth_vlan_hdr *)(((u8_t *)p->payload) + SIZEOF_ETH_HDR); vlanhdr->tpid = eth_type_be; vlanhdr->prio_vid = lwip_htons((u16_t)vlan_prio_vid); @@ -286,27 +291,29 @@ ethernet_output(struct netif* netif, struct pbuf* p, } else #endif /* ETHARP_SUPPORT_VLAN && defined(LWIP_HOOK_VLAN_SET) */ { - if (pbuf_header(p, SIZEOF_ETH_HDR) != 0) { + if (pbuf_add_header(p, SIZEOF_ETH_HDR) != 0) { goto pbuf_header_failed; } } - ethhdr = (struct eth_hdr*)p->payload; + LWIP_ASSERT_CORE_LOCKED(); + + ethhdr = (struct eth_hdr *)p->payload; ethhdr->type = eth_type_be; - ETHADDR32_COPY(ðhdr->dest, dst); - ETHADDR16_COPY(ðhdr->src, src); + SMEMCPY(ðhdr->dest, dst, ETH_HWADDR_LEN); + SMEMCPY(ðhdr->src, src, ETH_HWADDR_LEN); LWIP_ASSERT("netif->hwaddr_len must be 6 for ethernet_output!", - (netif->hwaddr_len == ETH_HWADDR_LEN)); + (netif->hwaddr_len == ETH_HWADDR_LEN)); LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, - ("ethernet_output: sending packet %p\n", (void *)p)); + ("ethernet_output: sending packet %p\n", (void *)p)); /* send the packet */ return netif->linkoutput(netif, p); pbuf_header_failed: LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, - ("ethernet_output: could not allocate room for header.\n")); + ("ethernet_output: could not allocate room for header.\n")); LINK_STATS_INC(link.lenerr); return ERR_BUF; } diff --git a/Libraries/LwIP/src/netif/lowpan6.c b/Libraries/LwIP/src/netif/lowpan6.c index 5f2cd04..6c26f66 100755 --- a/Libraries/LwIP/src/netif/lowpan6.c +++ b/Libraries/LwIP/src/netif/lowpan6.c @@ -1,7 +1,10 @@ /** - * @file + * @file * * 6LowPAN output for IPv6. Uses ND tables for link-layer addressing. Fragments packets to 6LowPAN units. + * + * This implementation aims to conform to IEEE 802.15.4(-2015), RFC 4944 and RFC 6282. + * @todo: RFC 6775. */ /* @@ -40,14 +43,14 @@ */ /** - * @defgroup sixlowpan 6LowPAN netif - * @ingroup addons + * @defgroup sixlowpan 6LoWPAN (RFC4944) + * @ingroup netifs * 6LowPAN netif implementation */ #include "netif/lowpan6.h" -#if LWIP_IPV6 && LWIP_6LOWPAN +#if LWIP_IPV6 #include "lwip/ip.h" #include "lwip/pbuf.h" @@ -58,40 +61,255 @@ #include "lwip/udp.h" #include "lwip/tcpip.h" #include "lwip/snmp.h" +#include "netif/ieee802154.h" #include -struct ieee_802154_addr { - u8_t addr_len; - u8_t addr[8]; -}; +#if LWIP_6LOWPAN_802154_HW_CRC +#define LWIP_6LOWPAN_DO_CALC_CRC(buf, len) 0 +#else +#define LWIP_6LOWPAN_DO_CALC_CRC(buf, len) LWIP_6LOWPAN_CALC_CRC(buf, len) +#endif -/** This is a helper struct. +/** This is a helper struct for reassembly of fragments + * (IEEE 802.15.4 limits to 127 bytes) */ struct lowpan6_reass_helper { - struct pbuf *pbuf; struct lowpan6_reass_helper *next_packet; + struct pbuf *reass; + struct pbuf *frags; u8_t timer; - struct ieee_802154_addr sender_addr; + struct lowpan6_link_addr sender_addr; u16_t datagram_size; u16_t datagram_tag; }; -static struct lowpan6_reass_helper * reass_list; +/** This struct keeps track of per-netif state */ +struct lowpan6_ieee802154_data { + /** fragment reassembly list */ + struct lowpan6_reass_helper *reass_list; +#if LWIP_6LOWPAN_NUM_CONTEXTS > 0 + /** address context for compression */ + ip6_addr_t lowpan6_context[LWIP_6LOWPAN_NUM_CONTEXTS]; +#endif + /** Datagram Tag for fragmentation */ + u16_t tx_datagram_tag; + /** local PAN ID for IEEE 802.15.4 header */ + u16_t ieee_802154_pan_id; + /** Sequence Number for IEEE 802.15.4 transmission */ + u8_t tx_frame_seq_num; +}; + +/* Maximum frame size is 127 bytes minus CRC size */ +#define LOWPAN6_MAX_PAYLOAD (127 - 2) + +/** Currently, this state is global, since there's only one 6LoWPAN netif */ +static struct lowpan6_ieee802154_data lowpan6_data; #if LWIP_6LOWPAN_NUM_CONTEXTS > 0 -static ip6_addr_t lowpan6_context[LWIP_6LOWPAN_NUM_CONTEXTS]; +#define LWIP_6LOWPAN_CONTEXTS(netif) lowpan6_data.lowpan6_context +#else +#define LWIP_6LOWPAN_CONTEXTS(netif) NULL #endif -static u16_t ieee_802154_pan_id; - -static const struct ieee_802154_addr ieee_802154_broadcast = {2, {0xff, 0xff}}; +static const struct lowpan6_link_addr ieee_802154_broadcast = {2, {0xff, 0xff}}; #if LWIP_6LOWPAN_INFER_SHORT_ADDRESS -static struct ieee_802154_addr short_mac_addr = {2, {0,0}}; +static struct lowpan6_link_addr short_mac_addr = {2, {0, 0}}; #endif /* LWIP_6LOWPAN_INFER_SHORT_ADDRESS */ -static err_t dequeue_datagram(struct lowpan6_reass_helper *lrh); +/* IEEE 802.15.4 specific functions: */ + +/** Write the IEEE 802.15.4 header that encapsulates the 6LoWPAN frame. + * Src and dst PAN IDs are filled with the ID set by @ref lowpan6_set_pan_id. + * + * Since the length is variable: + * @returns the header length + */ +static u8_t +lowpan6_write_iee802154_header(struct ieee_802154_hdr *hdr, const struct lowpan6_link_addr *src, + const struct lowpan6_link_addr *dst) +{ + u8_t ieee_header_len; + u8_t *buffer; + u8_t i; + u16_t fc; + + fc = IEEE_802154_FC_FT_DATA; /* send data packet (2003 frame version) */ + fc |= IEEE_802154_FC_PANID_COMPR; /* set PAN ID compression, for now src and dst PANs are equal */ + if (dst != &ieee_802154_broadcast) { + fc |= IEEE_802154_FC_ACK_REQ; /* data packet, no broadcast: ack required. */ + } + if (dst->addr_len == 2) { + fc |= IEEE_802154_FC_DST_ADDR_MODE_SHORT; + } else { + LWIP_ASSERT("invalid dst address length", dst->addr_len == 8); + fc |= IEEE_802154_FC_DST_ADDR_MODE_EXT; + } + if (src->addr_len == 2) { + fc |= IEEE_802154_FC_SRC_ADDR_MODE_SHORT; + } else { + LWIP_ASSERT("invalid src address length", src->addr_len == 8); + fc |= IEEE_802154_FC_SRC_ADDR_MODE_EXT; + } + hdr->frame_control = fc; + hdr->sequence_number = lowpan6_data.tx_frame_seq_num++; + hdr->destination_pan_id = lowpan6_data.ieee_802154_pan_id; /* pan id */ + + buffer = (u8_t *)hdr; + ieee_header_len = 5; + i = dst->addr_len; + /* reverse memcpy of dst addr */ + while (i-- > 0) { + buffer[ieee_header_len++] = dst->addr[i]; + } + /* Source PAN ID skipped due to PAN ID Compression */ + i = src->addr_len; + /* reverse memcpy of src addr */ + while (i-- > 0) { + buffer[ieee_header_len++] = src->addr[i]; + } + return ieee_header_len; +} + +/** Parse the IEEE 802.15.4 header from a pbuf. + * If successful, the header is hidden from the pbuf. + * + * PAN IDs and seuqence number are not checked + * + * @param p input pbuf, p->payload pointing at the IEEE 802.15.4 header + * @param src pointer to source address filled from the header + * @param dest pointer to destination address filled from the header + * @returns ERR_OK if successful + */ +static err_t +lowpan6_parse_iee802154_header(struct pbuf *p, struct lowpan6_link_addr *src, + struct lowpan6_link_addr *dest) +{ + u8_t *puc; + s8_t i; + u16_t frame_control, addr_mode; + u16_t datagram_offset; + + /* Parse IEEE 802.15.4 header */ + puc = (u8_t *)p->payload; + frame_control = puc[0] | (puc[1] << 8); + datagram_offset = 2; + if (frame_control & IEEE_802154_FC_SEQNO_SUPPR) { + if (IEEE_802154_FC_FRAME_VERSION_GET(frame_control) <= 1) { + /* sequence number suppressed, this is not valid for versions 0/1 */ + return ERR_VAL; + } + } else { + datagram_offset++; + } + datagram_offset += 2; /* Skip destination PAN ID */ + addr_mode = frame_control & IEEE_802154_FC_DST_ADDR_MODE_MASK; + if (addr_mode == IEEE_802154_FC_DST_ADDR_MODE_EXT) { + /* extended address (64 bit) */ + dest->addr_len = 8; + /* reverse memcpy: */ + for (i = 0; i < 8; i++) { + dest->addr[i] = puc[datagram_offset + 7 - i]; + } + datagram_offset += 8; + } else if (addr_mode == IEEE_802154_FC_DST_ADDR_MODE_SHORT) { + /* short address (16 bit) */ + dest->addr_len = 2; + /* reverse memcpy: */ + dest->addr[0] = puc[datagram_offset + 1]; + dest->addr[1] = puc[datagram_offset]; + datagram_offset += 2; + } else { + /* unsupported address mode (do we need "no address"?) */ + return ERR_VAL; + } + + if (!(frame_control & IEEE_802154_FC_PANID_COMPR)) { + /* No PAN ID compression, skip source PAN ID */ + datagram_offset += 2; + } + + addr_mode = frame_control & IEEE_802154_FC_SRC_ADDR_MODE_MASK; + if (addr_mode == IEEE_802154_FC_SRC_ADDR_MODE_EXT) { + /* extended address (64 bit) */ + src->addr_len = 8; + /* reverse memcpy: */ + for (i = 0; i < 8; i++) { + src->addr[i] = puc[datagram_offset + 7 - i]; + } + datagram_offset += 8; + } else if (addr_mode == IEEE_802154_FC_DST_ADDR_MODE_SHORT) { + /* short address (16 bit) */ + src->addr_len = 2; + src->addr[0] = puc[datagram_offset + 1]; + src->addr[1] = puc[datagram_offset]; + datagram_offset += 2; + } else { + /* unsupported address mode (do we need "no address"?) */ + return ERR_VAL; + } + + /* hide IEEE802.15.4 header. */ + if (pbuf_remove_header(p, datagram_offset)) { + return ERR_VAL; + } + return ERR_OK; +} + +/** Calculate the 16-bit CRC as required by IEEE 802.15.4 */ +u16_t +lowpan6_calc_crc(const void* buf, u16_t len) +{ +#define CCITT_POLY_16 0x8408U + u16_t i; + u8_t b; + u16_t crc = 0; + const u8_t* p = (const u8_t*)buf; + + for (i = 0; i < len; i++) { + u8_t data = *p; + for (b = 0U; b < 8U; b++) { + if (((data ^ crc) & 1) != 0) { + crc = (u16_t)((crc >> 1) ^ CCITT_POLY_16); + } else { + crc = (u16_t)(crc >> 1); + } + data = (u8_t)(data >> 1); + } + p++; + } + return crc; +} + +/* Fragmentation specific functions: */ + +static void +free_reass_datagram(struct lowpan6_reass_helper *lrh) +{ + if (lrh->reass) { + pbuf_free(lrh->reass); + } + if (lrh->frags) { + pbuf_free(lrh->frags); + } + mem_free(lrh); +} + +/** + * Removes a datagram from the reassembly queue. + **/ +static void +dequeue_datagram(struct lowpan6_reass_helper *lrh, struct lowpan6_reass_helper *prev) +{ + if (lowpan6_data.reass_list == lrh) { + lowpan6_data.reass_list = lowpan6_data.reass_list->next_packet; + } else { + /* it wasn't the first, so it must have a valid 'prev' */ + LWIP_ASSERT("sanity check linked list", prev != NULL); + prev->next_packet = lrh->next_packet; + } +} /** * Periodic timer for 6LowPAN functions: @@ -101,362 +319,72 @@ static err_t dequeue_datagram(struct lowpan6_reass_helper *lrh); void lowpan6_tmr(void) { - struct lowpan6_reass_helper *lrh, *lrh_temp; + struct lowpan6_reass_helper *lrh, *lrh_next, *lrh_prev = NULL; - lrh = reass_list; + lrh = lowpan6_data.reass_list; while (lrh != NULL) { - lrh_temp = lrh->next_packet; + lrh_next = lrh->next_packet; if ((--lrh->timer) == 0) { - dequeue_datagram(lrh); - pbuf_free(lrh->pbuf); - mem_free(lrh); + dequeue_datagram(lrh, lrh_prev); + free_reass_datagram(lrh); + } else { + lrh_prev = lrh; } - lrh = lrh_temp; + lrh = lrh_next; } } -/** - * Removes a datagram from the reassembly queue. - **/ -static err_t -dequeue_datagram(struct lowpan6_reass_helper *lrh) -{ - struct lowpan6_reass_helper *lrh_temp; - - if (reass_list == lrh) { - reass_list = reass_list->next_packet; - } else { - lrh_temp = reass_list; - while (lrh_temp != NULL) { - if (lrh_temp->next_packet == lrh) { - lrh_temp->next_packet = lrh->next_packet; - break; - } - lrh_temp = lrh_temp->next_packet; - } - } - - return ERR_OK; -} - -static s8_t -lowpan6_context_lookup(const ip6_addr_t *ip6addr) -{ - s8_t i; - - for (i = 0; i < LWIP_6LOWPAN_NUM_CONTEXTS; i++) { - if (ip6_addr_netcmp(&lowpan6_context[i], ip6addr)) { - return i; - } - } - - return -1; -} - -/* Determine compression mode for unicast address. */ -static s8_t -lowpan6_get_address_mode(const ip6_addr_t *ip6addr, const struct ieee_802154_addr *mac_addr) -{ - if (mac_addr->addr_len == 2) { - if ((ip6addr->addr[2] == (u32_t)PP_HTONL(0x000000ff)) && - ((ip6addr->addr[3] & PP_HTONL(0xffff0000)) == PP_NTOHL(0xfe000000))) { - if ((ip6addr->addr[3] & PP_HTONL(0x0000ffff)) == lwip_ntohl((mac_addr->addr[0] << 8) | mac_addr->addr[1])) { - return 3; - } - } - } else if (mac_addr->addr_len == 8) { - if ((ip6addr->addr[2] == lwip_ntohl(((mac_addr->addr[0] ^ 2) << 24) | (mac_addr->addr[1] << 16) | mac_addr->addr[2] << 8 | mac_addr->addr[3])) && - (ip6addr->addr[3] == lwip_ntohl((mac_addr->addr[4] << 24) | (mac_addr->addr[5] << 16) | mac_addr->addr[6] << 8 | mac_addr->addr[7]))) { - return 3; - } - } - - if ((ip6addr->addr[2] == PP_HTONL(0x000000ffUL)) && - ((ip6addr->addr[3] & PP_HTONL(0xffff0000)) == PP_NTOHL(0xfe000000UL))) { - return 2; - } - - return 1; -} - -/* Determine compression mode for multicast address. */ -static s8_t -lowpan6_get_address_mode_mc(const ip6_addr_t *ip6addr) -{ - if ((ip6addr->addr[0] == PP_HTONL(0xff020000)) && - (ip6addr->addr[1] == 0) && - (ip6addr->addr[2] == 0) && - ((ip6addr->addr[3] & PP_HTONL(0xffffff00)) == 0)) { - return 3; - } else if (((ip6addr->addr[0] & PP_HTONL(0xff00ffff)) == PP_HTONL(0xff000000)) && - (ip6addr->addr[1] == 0)) { - if ((ip6addr->addr[2] == 0) && - ((ip6addr->addr[3] & PP_HTONL(0xff000000)) == 0)) { - return 2; - } else if ((ip6addr->addr[2] & PP_HTONL(0xffffff00)) == 0) { - return 1; - } - } - - return 0; -} - /* * Encapsulates data into IEEE 802.15.4 frames. * Fragments an IPv6 datagram into 6LowPAN units, which fit into IEEE 802.15.4 frames. * If configured, will compress IPv6 and or UDP headers. * */ static err_t -lowpan6_frag(struct netif *netif, struct pbuf *p, const struct ieee_802154_addr *src, const struct ieee_802154_addr *dst) +lowpan6_frag(struct netif *netif, struct pbuf *p, const struct lowpan6_link_addr *src, const struct lowpan6_link_addr *dst) { - struct pbuf * p_frag; - u16_t frag_len, remaining_len; - u8_t * buffer; + struct pbuf *p_frag; + u16_t frag_len, remaining_len, max_data_len; + u8_t *buffer; u8_t ieee_header_len; u8_t lowpan6_header_len; - s8_t i; - static u8_t frame_seq_num; - static u16_t datagram_tag; + u8_t hidden_header_len; + u16_t crc; u16_t datagram_offset; err_t err = ERR_IF; + LWIP_ASSERT("lowpan6_frag: netif->linkoutput not set", netif->linkoutput != NULL); + /* We'll use a dedicated pbuf for building 6LowPAN fragments. */ p_frag = pbuf_alloc(PBUF_RAW, 127, PBUF_RAM); if (p_frag == NULL) { MIB2_STATS_NETIF_INC(netif, ifoutdiscards); return ERR_MEM; } + LWIP_ASSERT("this needs a pbuf in one piece", p_frag->len == p_frag->tot_len); /* Write IEEE 802.15.4 header. */ - buffer = (u8_t*)p_frag->payload; - ieee_header_len = 0; - if (dst == &ieee_802154_broadcast) { - buffer[ieee_header_len++] = 0x01; /* data packet, no ack required. */ - } else { - buffer[ieee_header_len++] = 0x21; /* data packet, ack required. */ - } - buffer[ieee_header_len] = (0x00 << 4); /* 2003 frame version */ - buffer[ieee_header_len] |= (dst->addr_len == 2) ? (0x02 << 2) : (0x03 << 2); /* destination addressing mode */ - buffer[ieee_header_len] |= (src->addr_len == 2) ? (0x02 << 6) : (0x03 << 6); /* source addressing mode */ - ieee_header_len++; - buffer[ieee_header_len++] = frame_seq_num++; - - buffer[ieee_header_len++] = ieee_802154_pan_id & 0xff; /* pan id */ - buffer[ieee_header_len++] = (ieee_802154_pan_id >> 8) & 0xff; /* pan id */ - i = dst->addr_len; - while (i-- > 0) { - buffer[ieee_header_len++] = dst->addr[i]; - } - - buffer[ieee_header_len++] = ieee_802154_pan_id & 0xff; /* pan id */ - buffer[ieee_header_len++] = (ieee_802154_pan_id >> 8) & 0xff; /* pan id */ - i = src->addr_len; - while (i-- > 0) { - buffer[ieee_header_len++] = src->addr[i]; - } + buffer = (u8_t *)p_frag->payload; + ieee_header_len = lowpan6_write_iee802154_header((struct ieee_802154_hdr *)buffer, src, dst); + LWIP_ASSERT("ieee_header_len < p_frag->len", ieee_header_len < p_frag->len); #if LWIP_6LOWPAN_IPHC /* Perform 6LowPAN IPv6 header compression according to RFC 6282 */ - { - struct ip6_hdr *ip6hdr; - - /* Point to ip6 header and align copies of src/dest addresses. */ - ip6hdr = (struct ip6_hdr *)p->payload; - ip_addr_copy_from_ip6(ip_data.current_iphdr_dest, ip6hdr->dest); - ip_addr_copy_from_ip6(ip_data.current_iphdr_src, ip6hdr->src); - - /* Basic length of 6LowPAN header, set dispatch and clear fields. */ - lowpan6_header_len = 2; - buffer[ieee_header_len] = 0x60; - buffer[ieee_header_len + 1] = 0; - - /* Determine whether there will be a Context Identifier Extension byte or not. - * If so, set it already. */ -#if LWIP_6LOWPAN_NUM_CONTEXTS > 0 - buffer[ieee_header_len + 2] = 0; - - i = lowpan6_context_lookup(ip_2_ip6(&ip_data.current_iphdr_src)); - if (i >= 0) { - /* Stateful source address compression. */ - buffer[ieee_header_len + 1] |= 0x40; - buffer[ieee_header_len + 2] |= (i & 0x0f) << 4; - } - - i = lowpan6_context_lookup(ip_2_ip6(&ip_data.current_iphdr_dest)); - if (i >= 0) { - /* Stateful destination address compression. */ - buffer[ieee_header_len + 1] |= 0x04; - buffer[ieee_header_len + 2] |= i & 0x0f; - } - - if (buffer[ieee_header_len + 2] != 0x00) { - /* Context identifier extension byte is appended. */ - buffer[ieee_header_len + 1] |= 0x80; - lowpan6_header_len++; - } -#endif /* LWIP_6LOWPAN_NUM_CONTEXTS > 0 */ - - /* Determine TF field: Traffic Class, Flow Label */ - if (IP6H_FL(ip6hdr) == 0) { - /* Flow label is elided. */ - buffer[ieee_header_len] |= 0x10; - if (IP6H_TC(ip6hdr) == 0) { - /* Traffic class (ECN+DSCP) elided too. */ - buffer[ieee_header_len] |= 0x08; - } else { - /* Traffic class (ECN+DSCP) appended. */ - buffer[ieee_header_len + lowpan6_header_len++] = IP6H_TC(ip6hdr); - } - } else { - if (((IP6H_TC(ip6hdr) & 0x3f) == 0)) { - /* DSCP portion of Traffic Class is elided, ECN and FL are appended (3 bytes) */ - buffer[ieee_header_len] |= 0x08; - - buffer[ieee_header_len + lowpan6_header_len] = IP6H_TC(ip6hdr) & 0xc0; - buffer[ieee_header_len + lowpan6_header_len++] |= (IP6H_FL(ip6hdr) >> 16) & 0x0f; - buffer[ieee_header_len + lowpan6_header_len++] = (IP6H_FL(ip6hdr) >> 8) & 0xff; - buffer[ieee_header_len + lowpan6_header_len++] = IP6H_FL(ip6hdr) & 0xff; - } else { - /* Traffic class and flow label are appended (4 bytes) */ - buffer[ieee_header_len + lowpan6_header_len++] = IP6H_TC(ip6hdr); - buffer[ieee_header_len + lowpan6_header_len++] = (IP6H_FL(ip6hdr) >> 16) & 0x0f; - buffer[ieee_header_len + lowpan6_header_len++] = (IP6H_FL(ip6hdr) >> 8) & 0xff; - buffer[ieee_header_len + lowpan6_header_len++] = IP6H_FL(ip6hdr) & 0xff; - } - } - - /* Compress NH? - * Only if UDP for now. @todo support other NH compression. */ - if (IP6H_NEXTH(ip6hdr) == IP6_NEXTH_UDP) { - buffer[ieee_header_len] |= 0x04; - } else { - /* append nexth. */ - buffer[ieee_header_len + lowpan6_header_len++] = IP6H_NEXTH(ip6hdr); - } - - /* Compress hop limit? */ - if (IP6H_HOPLIM(ip6hdr) == 255) { - buffer[ieee_header_len] |= 0x03; - } else if (IP6H_HOPLIM(ip6hdr) == 64) { - buffer[ieee_header_len] |= 0x02; - } else if (IP6H_HOPLIM(ip6hdr) == 1) { - buffer[ieee_header_len] |= 0x01; - } else { - /* append hop limit */ - buffer[ieee_header_len + lowpan6_header_len++] = IP6H_HOPLIM(ip6hdr); - } - - /* Compress source address */ - if (((buffer[ieee_header_len + 1] & 0x40) != 0) || - (ip6_addr_islinklocal(ip_2_ip6(&ip_data.current_iphdr_src)))) { - /* Context-based or link-local source address compression. */ - i = lowpan6_get_address_mode(ip_2_ip6(&ip_data.current_iphdr_src), src); - buffer[ieee_header_len + 1] |= (i & 0x03) << 4; - if (i == 1) { - MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 16, 8); - lowpan6_header_len += 8; - } else if (i == 2) { - MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 22, 2); - lowpan6_header_len += 2; - } - } else if (ip6_addr_isany(ip_2_ip6(&ip_data.current_iphdr_src))) { - /* Special case: mark SAC and leave SAM=0 */ - buffer[ieee_header_len + 1] |= 0x40; - } else { - /* Append full address. */ - MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 8, 16); - lowpan6_header_len += 16; - } - - /* Compress destination address */ - if (ip6_addr_ismulticast(ip_2_ip6(&ip_data.current_iphdr_dest))) { - /* @todo support stateful multicast address compression */ - - buffer[ieee_header_len + 1] |= 0x08; - - i = lowpan6_get_address_mode_mc(ip_2_ip6(&ip_data.current_iphdr_dest)); - buffer[ieee_header_len + 1] |= i & 0x03; - if (i == 0) { - MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 24, 16); - lowpan6_header_len += 16; - } else if (i == 1) { - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[25]; - MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 35, 5); - lowpan6_header_len += 5; - } else if (i == 2) { - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[25]; - MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 37, 3); - lowpan6_header_len += 3; - } else if (i == 3) { - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[39]; - } - } else if (((buffer[ieee_header_len + 1] & 0x04) != 0) || - (ip6_addr_islinklocal(ip_2_ip6(&ip_data.current_iphdr_dest)))) { - /* Context-based or link-local destination address compression. */ - i = lowpan6_get_address_mode(ip_2_ip6(&ip_data.current_iphdr_dest), dst); - buffer[ieee_header_len + 1] |= i & 0x03; - if (i == 1) { - MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 32, 8); - lowpan6_header_len += 8; - } else if (i == 2) { - MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 38, 2); - lowpan6_header_len += 2; - } - } else { - /* Append full address. */ - MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 24, 16); - lowpan6_header_len += 16; - } - - /* Move to payload. */ - pbuf_header(p, -IP6_HLEN); - - /* Compress UDP header? */ - if (IP6H_NEXTH(ip6hdr) == IP6_NEXTH_UDP) { - /* @todo support optional checksum compression */ - - buffer[ieee_header_len + lowpan6_header_len] = 0xf0; - - /* determine port compression mode. */ - if ((((u8_t *)p->payload)[0] == 0xf0) && ((((u8_t *)p->payload)[1] & 0xf0) == 0xb0) && - (((u8_t *)p->payload)[2] == 0xf0) && ((((u8_t *)p->payload)[3] & 0xf0) == 0xb0)) { - /* Compress source and dest ports. */ - buffer[ieee_header_len + lowpan6_header_len++] |= 0x03; - buffer[ieee_header_len + lowpan6_header_len++] = ((((u8_t *)p->payload)[1] & 0x0f) << 4) | (((u8_t *)p->payload)[3] & 0x0f); - } else if (((u8_t *)p->payload)[0] == 0xf0) { - /* Compress source port. */ - buffer[ieee_header_len + lowpan6_header_len++] |= 0x02; - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[1]; - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[2]; - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[3]; - } else if (((u8_t *)p->payload)[2] == 0xf0) { - /* Compress dest port. */ - buffer[ieee_header_len + lowpan6_header_len++] |= 0x01; - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[0]; - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[1]; - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[3]; - } else { - /* append full ports. */ - lowpan6_header_len++; - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[0]; - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[1]; - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[2]; - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[3]; - } - - /* elide length and copy checksum */ - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[6]; - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[7]; - - pbuf_header(p, -UDP_HLEN); - } + /* do the header compression (this does NOT copy any non-compressed data) */ + err = lowpan6_compress_headers(netif, (u8_t *)p->payload, p->len, + &buffer[ieee_header_len], p_frag->len - ieee_header_len, &lowpan6_header_len, + &hidden_header_len, LWIP_6LOWPAN_CONTEXTS(netif), src, dst); + if (err != ERR_OK) { + MIB2_STATS_NETIF_INC(netif, ifoutdiscards); + pbuf_free(p_frag); + return err; } + pbuf_remove_header(p, hidden_header_len); -#else /* LWIP_6LOWPAN_HC */ +#else /* LWIP_6LOWPAN_IPHC */ /* Send uncompressed IPv6 header with appropriate dispatch byte. */ lowpan6_header_len = 1; buffer[ieee_header_len] = 0x41; /* IPv6 dispatch */ -#endif /* LWIP_6LOWPAN_HC */ +#endif /* LWIP_6LOWPAN_IPHC */ /* Calculate remaining packet length */ remaining_len = p->tot_len; @@ -469,49 +397,50 @@ lowpan6_frag(struct netif *netif, struct pbuf *p, const struct ieee_802154_addr } /* Fragment, or 1 packet? */ - if (remaining_len > (127 - ieee_header_len - lowpan6_header_len - 3)) { /* 127 - header - 1 byte dispatch - 2 bytes CRC */ + max_data_len = LOWPAN6_MAX_PAYLOAD - ieee_header_len - lowpan6_header_len; + if (remaining_len > max_data_len) { + u16_t data_len; /* We must move the 6LowPAN header to make room for the FRAG header. */ - i = lowpan6_header_len; - while (i-- != 0) { - buffer[ieee_header_len + i + 4] = buffer[ieee_header_len + i]; - } + memmove(&buffer[ieee_header_len + 4], &buffer[ieee_header_len], lowpan6_header_len); /* Now we need to fragment the packet. FRAG1 header first */ - buffer[ieee_header_len] = 0xc0 | (((p->tot_len + lowpan6_header_len) >> 8) & 0x7); - buffer[ieee_header_len + 1] = (p->tot_len + lowpan6_header_len) & 0xff; + buffer[ieee_header_len] = 0xc0 | (((p->tot_len + hidden_header_len) >> 8) & 0x7); + buffer[ieee_header_len + 1] = (p->tot_len + hidden_header_len) & 0xff; - datagram_tag++; - buffer[ieee_header_len + 2] = datagram_tag & 0xff; - buffer[ieee_header_len + 3] = (datagram_tag >> 8) & 0xff; + lowpan6_data.tx_datagram_tag++; + buffer[ieee_header_len + 2] = (lowpan6_data.tx_datagram_tag >> 8) & 0xff; + buffer[ieee_header_len + 3] = lowpan6_data.tx_datagram_tag & 0xff; /* Fragment follows. */ - frag_len = (127 - ieee_header_len - 4 - 2) & 0xf8; + data_len = (max_data_len - 4) & 0xf8; + frag_len = data_len + lowpan6_header_len; pbuf_copy_partial(p, buffer + ieee_header_len + lowpan6_header_len + 4, frag_len - lowpan6_header_len, 0); remaining_len -= frag_len - lowpan6_header_len; - datagram_offset = frag_len; - - /* 2 bytes CRC */ -#if LWIP_6LOWPAN_HW_CRC - /* Leave blank, will be filled by HW. */ -#else /* LWIP_6LOWPAN_HW_CRC */ - /* @todo calculate CRC */ -#endif /* LWIP_6LOWPAN_HW_CRC */ + /* datagram offset holds the offset before compression */ + datagram_offset = frag_len - lowpan6_header_len + hidden_header_len; + LWIP_ASSERT("datagram offset must be a multiple of 8", (datagram_offset & 7) == 0); /* Calculate frame length */ - p_frag->len = p_frag->tot_len = ieee_header_len + 4 + frag_len + 2; /* add 2 dummy bytes for crc*/ + p_frag->len = p_frag->tot_len = ieee_header_len + 4 + frag_len + 2; /* add 2 bytes for crc*/ + + /* 2 bytes CRC */ + crc = LWIP_6LOWPAN_DO_CALC_CRC(p_frag->payload, p_frag->len - 2); + pbuf_take_at(p_frag, &crc, 2, p_frag->len - 2); /* send the packet */ MIB2_STATS_NETIF_ADD(netif, ifoutoctets, p_frag->tot_len); - LWIP_DEBUGF(LOWPAN6_DEBUG | LWIP_DBG_TRACE, ("lowpan6_send: sending packet %p\n", (void *)p)); + LWIP_DEBUGF(LWIP_LOWPAN6_DEBUG | LWIP_DBG_TRACE, ("lowpan6_send: sending packet %p\n", (void *)p)); err = netif->linkoutput(netif, p_frag); while ((remaining_len > 0) && (err == ERR_OK)) { + struct ieee_802154_hdr *hdr = (struct ieee_802154_hdr *)buffer; /* new frame, new seq num for ACK */ - buffer[2] = frame_seq_num++; + hdr->sequence_number = lowpan6_data.tx_frame_seq_num++; buffer[ieee_header_len] |= 0x20; /* Change FRAG1 to FRAGN */ + LWIP_ASSERT("datagram offset must be a multiple of 8", (datagram_offset & 7) == 0); buffer[ieee_header_len + 4] = (u8_t)(datagram_offset >> 3); /* datagram offset in FRAGN header (datagram_offset is max. 11 bit) */ frag_len = (127 - ieee_header_len - 5 - 2) & 0xf8; @@ -523,19 +452,16 @@ lowpan6_frag(struct netif *netif, struct pbuf *p, const struct ieee_802154_addr remaining_len -= frag_len; datagram_offset += frag_len; - /* 2 bytes CRC */ -#if LWIP_6LOWPAN_HW_CRC - /* Leave blank, will be filled by HW. */ -#else /* LWIP_6LOWPAN_HW_CRC */ - /* @todo calculate CRC */ -#endif /* LWIP_6LOWPAN_HW_CRC */ - /* Calculate frame length */ p_frag->len = p_frag->tot_len = frag_len + 5 + ieee_header_len + 2; + /* 2 bytes CRC */ + crc = LWIP_6LOWPAN_DO_CALC_CRC(p_frag->payload, p_frag->len - 2); + pbuf_take_at(p_frag, &crc, 2, p_frag->len - 2); + /* send the packet */ MIB2_STATS_NETIF_ADD(netif, ifoutoctets, p_frag->tot_len); - LWIP_DEBUGF(LOWPAN6_DEBUG | LWIP_DBG_TRACE, ("lowpan6_send: sending packet %p\n", (void *)p)); + LWIP_DEBUGF(LWIP_LOWPAN6_DEBUG | LWIP_DBG_TRACE, ("lowpan6_send: sending packet %p\n", (void *)p)); err = netif->linkoutput(netif, p_frag); } } else { @@ -546,19 +472,17 @@ lowpan6_frag(struct netif *netif, struct pbuf *p, const struct ieee_802154_addr pbuf_copy_partial(p, buffer + ieee_header_len + lowpan6_header_len, frag_len, 0); remaining_len = 0; - /* 2 bytes CRC */ -#if LWIP_6LOWPAN_HW_CRC - /* Leave blank, will be filled by HW. */ -#else /* LWIP_6LOWPAN_HW_CRC */ - /* @todo calculate CRC */ -#endif /* LWIP_6LOWPAN_HW_CRC */ - /* Calculate frame length */ p_frag->len = p_frag->tot_len = frag_len + lowpan6_header_len + ieee_header_len + 2; + LWIP_ASSERT("", p_frag->len <= 127); + + /* 2 bytes CRC */ + crc = LWIP_6LOWPAN_DO_CALC_CRC(p_frag->payload, p_frag->len - 2); + pbuf_take_at(p_frag, &crc, 2, p_frag->len - 2); /* send the packet */ MIB2_STATS_NETIF_ADD(netif, ifoutoctets, p_frag->tot_len); - LWIP_DEBUGF(LOWPAN6_DEBUG | LWIP_DBG_TRACE, ("lowpan6_send: sending packet %p\n", (void *)p)); + LWIP_DEBUGF(LWIP_LOWPAN6_DEBUG | LWIP_DBG_TRACE, ("lowpan6_send: sending packet %p\n", (void *)p)); err = netif->linkoutput(netif, p_frag); } @@ -567,19 +491,35 @@ lowpan6_frag(struct netif *netif, struct pbuf *p, const struct ieee_802154_addr return err; } +/** + * @ingroup sixlowpan + * Set context + */ err_t -lowpan6_set_context(u8_t idx, const ip6_addr_t * context) +lowpan6_set_context(u8_t idx, const ip6_addr_t *context) { +#if LWIP_6LOWPAN_NUM_CONTEXTS > 0 if (idx >= LWIP_6LOWPAN_NUM_CONTEXTS) { return ERR_ARG; } - ip6_addr_set(&lowpan6_context[idx], context); + IP6_ADDR_ZONECHECK(context); + + ip6_addr_set(&lowpan6_data.lowpan6_context[idx], context); return ERR_OK; +#else + LWIP_UNUSED_ARG(idx); + LWIP_UNUSED_ARG(context); + return ERR_ARG; +#endif } #if LWIP_6LOWPAN_INFER_SHORT_ADDRESS +/** + * @ingroup sixlowpan + * Set short address + */ err_t lowpan6_set_short_addr(u8_t addr_high, u8_t addr_low) { @@ -590,19 +530,28 @@ lowpan6_set_short_addr(u8_t addr_high, u8_t addr_low) } #endif /* LWIP_6LOWPAN_INFER_SHORT_ADDRESS */ -#if LWIP_IPV4 -err_t -lowpan4_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr) +/* Create IEEE 802.15.4 address from netif address */ +static err_t +lowpan6_hwaddr_to_addr(struct netif *netif, struct lowpan6_link_addr *addr) { - (void)netif; - (void)q; - (void)ipaddr; - - return ERR_IF; + addr->addr_len = 8; + if (netif->hwaddr_len == 8) { + LWIP_ERROR("NETIF_MAX_HWADDR_LEN >= 8 required", sizeof(netif->hwaddr) >= 8, return ERR_VAL;); + SMEMCPY(addr->addr, netif->hwaddr, 8); + } else if (netif->hwaddr_len == 6) { + /* Copy from MAC-48 */ + SMEMCPY(addr->addr, netif->hwaddr, 3); + addr->addr[3] = addr->addr[4] = 0xff; + SMEMCPY(&addr->addr[5], &netif->hwaddr[3], 3); + } else { + /* Invalid address length, don't know how to convert this */ + return ERR_VAL; + } + return ERR_OK; } -#endif /* LWIP_IPV4 */ /** + * @ingroup sixlowpan * Resolve and fill-in IEEE 802.15.4 address header for outgoing IPv6 packet. * * Perform Header Compression and fragment if necessary. @@ -618,16 +567,17 @@ lowpan6_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr) { err_t result; const u8_t *hwaddr; - struct ieee_802154_addr src, dest; + struct lowpan6_link_addr src, dest; #if LWIP_6LOWPAN_INFER_SHORT_ADDRESS ip6_addr_t ip6_src; - struct ip6_hdr * ip6_hdr; + struct ip6_hdr *ip6_hdr; #endif /* LWIP_6LOWPAN_INFER_SHORT_ADDRESS */ #if LWIP_6LOWPAN_INFER_SHORT_ADDRESS /* Check if we can compress source address (use aligned copy) */ ip6_hdr = (struct ip6_hdr *)q->payload; - ip6_addr_set(&ip6_src, &ip6_hdr->src); + ip6_addr_copy_from_packed(ip6_src, ip6_hdr->src); + ip6_addr_assign_zone(&ip6_src, IP6_UNICAST, netif); if (lowpan6_get_address_mode(&ip6_src, &short_mac_addr) == 3) { src.addr_len = 2; src.addr[0] = short_mac_addr.addr[0]; @@ -635,8 +585,11 @@ lowpan6_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr) } else #endif /* LWIP_6LOWPAN_INFER_SHORT_ADDRESS */ { - src.addr_len = netif->hwaddr_len; - SMEMCPY(src.addr, netif->hwaddr, netif->hwaddr_len); + result = lowpan6_hwaddr_to_addr(netif, &src); + if (result != ERR_OK) { + MIB2_STATS_NETIF_INC(netif, ifoutdiscards); + return result; + } } /* multicast destination IP address? */ @@ -652,11 +605,11 @@ lowpan6_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr) #if LWIP_6LOWPAN_INFER_SHORT_ADDRESS if (src.addr_len == 2) { /* If source address was compressable to short_mac_addr, and dest has same subnet and - * is also compressable to 2-bytes, assume we can infer dest as a short address too. */ + * is also compressable to 2-bytes, assume we can infer dest as a short address too. */ dest.addr_len = 2; dest.addr[0] = ((u8_t *)q->payload)[38]; dest.addr[1] = ((u8_t *)q->payload)[39]; - if ((src.addr_len == 2) && (ip6_addr_netcmp(&ip6_hdr->src, &ip6_hdr->dest)) && + if ((src.addr_len == 2) && (ip6_addr_netcmp_zoneless(&ip6_hdr->src, &ip6_hdr->dest)) && (lowpan6_get_address_mode(ip6addr, &dest) == 3)) { MIB2_STATS_NETIF_INC(netif, ifoutucastpkts); return lowpan6_frag(netif, q, &src, &dest); @@ -678,378 +631,82 @@ lowpan6_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr) /* Send out the packet using the returned hardware address. */ dest.addr_len = netif->hwaddr_len; + /* XXX: Inferring the length of the source address from the destination address + * is not correct for IEEE 802.15.4, but currently we don't get this information + * from the neighbor cache */ SMEMCPY(dest.addr, hwaddr, netif->hwaddr_len); MIB2_STATS_NETIF_INC(netif, ifoutucastpkts); return lowpan6_frag(netif, q, &src, &dest); } - -static struct pbuf * -lowpan6_decompress(struct pbuf * p, struct ieee_802154_addr * src, struct ieee_802154_addr * dest) -{ - struct pbuf * q; - u8_t * lowpan6_buffer; - s8_t lowpan6_offset; - struct ip6_hdr *ip6hdr; - s8_t i; - s8_t ip6_offset = IP6_HLEN; - - - q = pbuf_alloc(PBUF_IP, p->len + IP6_HLEN + UDP_HLEN, PBUF_POOL); - if (q == NULL) { - pbuf_free(p); - return NULL; - } - - lowpan6_buffer = (u8_t *)p->payload; - ip6hdr = (struct ip6_hdr *)q->payload; - - lowpan6_offset = 2; - if (lowpan6_buffer[1] & 0x80) { - lowpan6_offset++; - } - - /* Set IPv6 version, traffic class and flow label. */ - if ((lowpan6_buffer[0] & 0x18) == 0x00) { - IP6H_VTCFL_SET(ip6hdr, 6, lowpan6_buffer[lowpan6_offset], ((lowpan6_buffer[lowpan6_offset+1] & 0x0f) << 16) | (lowpan6_buffer[lowpan6_offset + 2] << 8) | lowpan6_buffer[lowpan6_offset+3]); - lowpan6_offset += 4; - } else if ((lowpan6_buffer[0] & 0x18) == 0x08) { - IP6H_VTCFL_SET(ip6hdr, 6, lowpan6_buffer[lowpan6_offset] & 0xc0, ((lowpan6_buffer[lowpan6_offset] & 0x0f) << 16) | (lowpan6_buffer[lowpan6_offset + 1] << 8) | lowpan6_buffer[lowpan6_offset+2]); - lowpan6_offset += 3; - } else if ((lowpan6_buffer[0] & 0x18) == 0x10) { - IP6H_VTCFL_SET(ip6hdr, 6, lowpan6_buffer[lowpan6_offset],0); - lowpan6_offset += 1; - } else if ((lowpan6_buffer[0] & 0x18) == 0x18) { - IP6H_VTCFL_SET(ip6hdr, 6, 0, 0); - } - - /* Set Next Header */ - if ((lowpan6_buffer[0] & 0x04) == 0x00) { - IP6H_NEXTH_SET(ip6hdr, lowpan6_buffer[lowpan6_offset++]); - } else { - /* We should fill this later with NHC decoding */ - IP6H_NEXTH_SET(ip6hdr, 0); - } - - /* Set Hop Limit */ - if ((lowpan6_buffer[0] & 0x03) == 0x00) { - IP6H_HOPLIM_SET(ip6hdr, lowpan6_buffer[lowpan6_offset++]); - } else if ((lowpan6_buffer[0] & 0x03) == 0x01) { - IP6H_HOPLIM_SET(ip6hdr, 1); - } else if ((lowpan6_buffer[0] & 0x03) == 0x02) { - IP6H_HOPLIM_SET(ip6hdr, 64); - } else if ((lowpan6_buffer[0] & 0x03) == 0x03) { - IP6H_HOPLIM_SET(ip6hdr, 255); - } - - /* Source address decoding. */ - if ((lowpan6_buffer[1] & 0x40) == 0x00) { - /* Stateless compression */ - if ((lowpan6_buffer[1] & 0x30) == 0x00) { - /* copy full address */ - MEMCPY((void *)&ip6hdr->src.addr[0], lowpan6_buffer + lowpan6_offset, 16); - lowpan6_offset += 16; - } else if ((lowpan6_buffer[1] & 0x30) == 0x10) { - ip6hdr->src.addr[0] = PP_HTONL(0xfe800000UL); - ip6hdr->src.addr[1] = 0; - MEMCPY((void *)&ip6hdr->src.addr[2], lowpan6_buffer + lowpan6_offset, 8); - lowpan6_offset += 8; - } else if ((lowpan6_buffer[1] & 0x30) == 0x20) { - ip6hdr->src.addr[0] = PP_HTONL(0xfe800000UL); - ip6hdr->src.addr[1] = 0; - ip6hdr->src.addr[2] = PP_HTONL(0x000000ffUL); - ip6hdr->src.addr[3] = lwip_htonl(0xfe000000UL | (lowpan6_buffer[lowpan6_offset] << 8) | - lowpan6_buffer[lowpan6_offset+1]); - lowpan6_offset += 2; - } else if ((lowpan6_buffer[1] & 0x30) == 0x30) { - ip6hdr->src.addr[0] = PP_HTONL(0xfe800000UL); - ip6hdr->src.addr[1] = 0; - if (src->addr_len == 2) { - ip6hdr->src.addr[2] = PP_HTONL(0x000000ffUL); - ip6hdr->src.addr[3] = lwip_htonl(0xfe000000UL | (src->addr[0] << 8) | src->addr[1]); - } else { - ip6hdr->src.addr[2] = lwip_htonl(((src->addr[0] ^ 2) << 24) | (src->addr[1] << 16) | - (src->addr[2] << 8) | src->addr[3]); - ip6hdr->src.addr[3] = lwip_htonl((src->addr[4] << 24) | (src->addr[5] << 16) | - (src->addr[6] << 8) | src->addr[7]); - } - } - } else { - /* Stateful compression */ - if ((lowpan6_buffer[1] & 0x30) == 0x00) { - /* ANY address */ - ip6hdr->src.addr[0] = 0; - ip6hdr->src.addr[1] = 0; - ip6hdr->src.addr[2] = 0; - ip6hdr->src.addr[3] = 0; - } else { - /* Set prefix from context info */ - if (lowpan6_buffer[1] & 0x80) { - i = (lowpan6_buffer[2] >> 4) & 0x0f; - } else { - i = 0; - } - if (i >= LWIP_6LOWPAN_NUM_CONTEXTS) { - /* Error */ - pbuf_free(p); - pbuf_free(q); - return NULL; - } - - ip6hdr->src.addr[0] = lowpan6_context[i].addr[0]; - ip6hdr->src.addr[1] = lowpan6_context[i].addr[1]; - } - - if ((lowpan6_buffer[1] & 0x30) == 0x10) { - MEMCPY((void *)&ip6hdr->src.addr[2], lowpan6_buffer + lowpan6_offset, 8); - lowpan6_offset += 8; - } else if ((lowpan6_buffer[1] & 0x30) == 0x20) { - ip6hdr->src.addr[2] = PP_HTONL(0x000000ffUL); - ip6hdr->src.addr[3] = lwip_htonl(0xfe000000UL | (lowpan6_buffer[lowpan6_offset] << 8) | lowpan6_buffer[lowpan6_offset+1]); - lowpan6_offset += 2; - } else if ((lowpan6_buffer[1] & 0x30) == 0x30) { - if (src->addr_len == 2) { - ip6hdr->src.addr[2] = PP_HTONL(0x000000ffUL); - ip6hdr->src.addr[3] = lwip_htonl(0xfe000000UL | (src->addr[0] << 8) | src->addr[1]); - } else { - ip6hdr->src.addr[2] = lwip_htonl(((src->addr[0] ^ 2) << 24) | (src->addr[1] << 16) | (src->addr[2] << 8) | src->addr[3]); - ip6hdr->src.addr[3] = lwip_htonl((src->addr[4] << 24) | (src->addr[5] << 16) | (src->addr[6] << 8) | src->addr[7]); - } - } - } - - /* Destination address decoding. */ - if (lowpan6_buffer[1] & 0x08) { - /* Multicast destination */ - if (lowpan6_buffer[1] & 0x04) { - /* @todo support stateful multicast addressing */ - pbuf_free(p); - pbuf_free(q); - return NULL; - } - - if ((lowpan6_buffer[1] & 0x03) == 0x00) { - /* copy full address */ - MEMCPY((void *)&ip6hdr->dest.addr[0], lowpan6_buffer + lowpan6_offset, 16); - lowpan6_offset += 16; - } else if ((lowpan6_buffer[1] & 0x03) == 0x01) { - ip6hdr->dest.addr[0] = lwip_htonl(0xff000000UL | (lowpan6_buffer[lowpan6_offset++] << 16)); - ip6hdr->dest.addr[1] = 0; - ip6hdr->dest.addr[2] = lwip_htonl(lowpan6_buffer[lowpan6_offset++]); - ip6hdr->dest.addr[3] = lwip_htonl((lowpan6_buffer[lowpan6_offset] << 24) | (lowpan6_buffer[lowpan6_offset + 1] << 16) | (lowpan6_buffer[lowpan6_offset + 2] << 8) | lowpan6_buffer[lowpan6_offset + 3]); - lowpan6_offset += 4; - } else if ((lowpan6_buffer[1] & 0x03) == 0x02) { - ip6hdr->dest.addr[0] = lwip_htonl(0xff000000UL | lowpan6_buffer[lowpan6_offset++]); - ip6hdr->dest.addr[1] = 0; - ip6hdr->dest.addr[2] = 0; - ip6hdr->dest.addr[3] = lwip_htonl((lowpan6_buffer[lowpan6_offset] << 16) | (lowpan6_buffer[lowpan6_offset + 1] << 8) | lowpan6_buffer[lowpan6_offset + 2]); - lowpan6_offset += 3; - } else if ((lowpan6_buffer[1] & 0x03) == 0x03) { - ip6hdr->dest.addr[0] = PP_HTONL(0xff020000UL); - ip6hdr->dest.addr[1] = 0; - ip6hdr->dest.addr[2] = 0; - ip6hdr->dest.addr[3] = lwip_htonl(lowpan6_buffer[lowpan6_offset++]); - } - - } else { - if (lowpan6_buffer[1] & 0x04) { - /* Stateful destination compression */ - /* Set prefix from context info */ - if (lowpan6_buffer[1] & 0x80) { - i = lowpan6_buffer[2] & 0x0f; - } else { - i = 0; - } - if (i >= LWIP_6LOWPAN_NUM_CONTEXTS) { - /* Error */ - pbuf_free(p); - pbuf_free(q); - return NULL; - } - - ip6hdr->dest.addr[0] = lowpan6_context[i].addr[0]; - ip6hdr->dest.addr[1] = lowpan6_context[i].addr[1]; - } else { - /* Link local address compression */ - ip6hdr->dest.addr[0] = PP_HTONL(0xfe800000UL); - ip6hdr->dest.addr[1] = 0; - } - - if ((lowpan6_buffer[1] & 0x03) == 0x00) { - /* copy full address */ - MEMCPY((void *)&ip6hdr->dest.addr[0], lowpan6_buffer + lowpan6_offset, 16); - lowpan6_offset += 16; - } else if ((lowpan6_buffer[1] & 0x03) == 0x01) { - MEMCPY((void *)&ip6hdr->dest.addr[2], lowpan6_buffer + lowpan6_offset, 8); - lowpan6_offset += 8; - } else if ((lowpan6_buffer[1] & 0x03) == 0x02) { - ip6hdr->dest.addr[2] = PP_HTONL(0x000000ffUL); - ip6hdr->dest.addr[3] = lwip_htonl(0xfe000000UL | (lowpan6_buffer[lowpan6_offset] << 8) | lowpan6_buffer[lowpan6_offset + 1]); - lowpan6_offset += 2; - } else if ((lowpan6_buffer[1] & 0x03) == 0x03) { - if (dest->addr_len == 2) { - ip6hdr->dest.addr[2] = PP_HTONL(0x000000ffUL); - ip6hdr->dest.addr[3] = lwip_htonl(0xfe000000UL | (dest->addr[0] << 8) | dest->addr[1]); - } else { - ip6hdr->dest.addr[2] = lwip_htonl(((dest->addr[0] ^ 2) << 24) | (dest->addr[1] << 16) | dest->addr[2] << 8 | dest->addr[3]); - ip6hdr->dest.addr[3] = lwip_htonl((dest->addr[4] << 24) | (dest->addr[5] << 16) | dest->addr[6] << 8 | dest->addr[7]); - } - } - } - - - /* Next Header Compression (NHC) decoding? */ - if (lowpan6_buffer[0] & 0x04) { - if ((lowpan6_buffer[lowpan6_offset] & 0xf8) == 0xf0) { - struct udp_hdr *udphdr; - - /* UDP compression */ - IP6H_NEXTH_SET(ip6hdr, IP6_NEXTH_UDP); - udphdr = (struct udp_hdr *)((u8_t *)q->payload + ip6_offset); - - if (lowpan6_buffer[lowpan6_offset] & 0x04) { - /* @todo support checksum decompress */ - pbuf_free(p); - pbuf_free(q); - return NULL; - } - - /* Decompress ports */ - i = lowpan6_buffer[lowpan6_offset++] & 0x03; - if (i == 0) { - udphdr->src = lwip_htons(lowpan6_buffer[lowpan6_offset] << 8 | lowpan6_buffer[lowpan6_offset + 1]); - udphdr->dest = lwip_htons(lowpan6_buffer[lowpan6_offset + 2] << 8 | lowpan6_buffer[lowpan6_offset + 3]); - lowpan6_offset += 4; - } else if (i == 0x01) { - udphdr->src = lwip_htons(lowpan6_buffer[lowpan6_offset] << 8 | lowpan6_buffer[lowpan6_offset + 1]); - udphdr->dest = lwip_htons(0xf000 | lowpan6_buffer[lowpan6_offset + 2]); - lowpan6_offset += 3; - } else if (i == 0x02) { - udphdr->src = lwip_htons(0xf000 | lowpan6_buffer[lowpan6_offset]); - udphdr->dest = lwip_htons(lowpan6_buffer[lowpan6_offset + 1] << 8 | lowpan6_buffer[lowpan6_offset + 2]); - lowpan6_offset += 3; - } else if (i == 0x03) { - udphdr->src = lwip_htons(0xf0b0 | ((lowpan6_buffer[lowpan6_offset] >> 4) & 0x0f)); - udphdr->dest = lwip_htons(0xf0b0 | (lowpan6_buffer[lowpan6_offset] & 0x0f)); - lowpan6_offset += 1; - } - - udphdr->chksum = lwip_htons(lowpan6_buffer[lowpan6_offset] << 8 | lowpan6_buffer[lowpan6_offset + 1]); - lowpan6_offset += 2; - udphdr->len = lwip_htons(p->tot_len - lowpan6_offset + UDP_HLEN); - - ip6_offset += UDP_HLEN; - } else { - /* @todo support NHC other than UDP */ - pbuf_free(p); - pbuf_free(q); - return NULL; - } - } - - /* Now we copy leftover contents from p to q, so we have all L2 and L3 headers (and L4?) in a single PBUF. - * Replace p with q, and free p */ - pbuf_header(p, -lowpan6_offset); - MEMCPY((u8_t*)q->payload + ip6_offset, p->payload, p->len); - q->len = q->tot_len = ip6_offset + p->len; - if (p->next != NULL) { - pbuf_cat(q, p->next); - } - p->next = NULL; - pbuf_free(p); - - /* Infer IPv6 payload length for header */ - IP6H_PLEN_SET(ip6hdr, q->tot_len - IP6_HLEN); - - /* all done */ - return q; -} - +/** + * @ingroup sixlowpan + * NETIF input function: don't free the input pbuf when returning != ERR_OK! + */ err_t -lowpan6_input(struct pbuf * p, struct netif *netif) +lowpan6_input(struct pbuf *p, struct netif *netif) { - u8_t * puc; + u8_t *puc, b; s8_t i; - struct ieee_802154_addr src, dest; - u16_t datagram_size, datagram_offset, datagram_tag; - struct lowpan6_reass_helper *lrh, *lrh_temp; + struct lowpan6_link_addr src, dest; + u16_t datagram_size = 0; + u16_t datagram_offset, datagram_tag; + struct lowpan6_reass_helper *lrh, *lrh_next, *lrh_prev = NULL; + + if (p == NULL) { + return ERR_OK; + } MIB2_STATS_NETIF_ADD(netif, ifinoctets, p->tot_len); - /* Analyze header. @todo validate. */ - puc = (u8_t*)p->payload; - datagram_offset = 5; - if ((puc[1] & 0x0c) == 0x0c) { - dest.addr_len = 8; - for (i = 0; i < 8; i++) { - dest.addr[i] = puc[datagram_offset + 7 - i]; - } - datagram_offset += 8; - } else { - dest.addr_len = 2; - dest.addr[0] = puc[datagram_offset + 1]; - dest.addr[1] = puc[datagram_offset]; - datagram_offset += 2; + if (p->len != p->tot_len) { + /* for now, this needs a pbuf in one piece */ + goto lowpan6_input_discard; } - datagram_offset += 2; /* skip PAN ID. */ - - if ((puc[1] & 0xc0) == 0xc0) { - src.addr_len = 8; - for (i = 0; i < 8; i++) { - src.addr[i] = puc[datagram_offset + 7 - i]; - } - datagram_offset += 8; - } else { - src.addr_len = 2; - src.addr[0] = puc[datagram_offset + 1]; - src.addr[1] = puc[datagram_offset]; - datagram_offset += 2; + if (lowpan6_parse_iee802154_header(p, &src, &dest) != ERR_OK) { + goto lowpan6_input_discard; } - pbuf_header(p, -datagram_offset); /* hide IEEE802.15.4 header. */ - /* Check dispatch. */ - puc = (u8_t*)p->payload; + puc = (u8_t *)p->payload; - if ((*puc & 0xf8) == 0xc0) { + b = *puc; + if ((b & 0xf8) == 0xc0) { /* FRAG1 dispatch. add this packet to reassembly list. */ datagram_size = ((u16_t)(puc[0] & 0x07) << 8) | (u16_t)puc[1]; datagram_tag = ((u16_t)puc[2] << 8) | (u16_t)puc[3]; /* check for duplicate */ - lrh = reass_list; + lrh = lowpan6_data.reass_list; while (lrh != NULL) { + uint8_t discard = 0; + lrh_next = lrh->next_packet; if ((lrh->sender_addr.addr_len == src.addr_len) && (memcmp(lrh->sender_addr.addr, src.addr, src.addr_len) == 0)) { /* address match with packet in reassembly. */ if ((datagram_tag == lrh->datagram_tag) && (datagram_size == lrh->datagram_size)) { - MIB2_STATS_NETIF_INC(netif, ifindiscards); /* duplicate fragment. */ - pbuf_free(p); - return ERR_OK; + goto lowpan6_input_discard; } else { /* We are receiving the start of a new datagram. Discard old one (incomplete). */ - lrh_temp = lrh->next_packet; - dequeue_datagram(lrh); - pbuf_free(lrh->pbuf); - mem_free(lrh); - - /* Check next datagram in queue. */ - lrh = lrh_temp; + discard = 1; } - } else { - /* Check next datagram in queue. */ - lrh = lrh->next_packet; } + if (discard) { + dequeue_datagram(lrh, lrh_prev); + free_reass_datagram(lrh); + } else { + lrh_prev = lrh; + } + /* Check next datagram in queue. */ + lrh = lrh_next; } - pbuf_header(p, -4); /* hide frag1 dispatch */ + pbuf_remove_header(p, 4); /* hide frag1 dispatch */ lrh = (struct lowpan6_reass_helper *) mem_malloc(sizeof(struct lowpan6_reass_helper)); if (lrh == NULL) { - MIB2_STATS_NETIF_INC(netif, ifindiscards); - pbuf_free(p); - return ERR_MEM; + goto lowpan6_input_discard; } lrh->sender_addr.addr_len = src.addr_len; @@ -1058,20 +715,33 @@ lowpan6_input(struct pbuf * p, struct netif *netif) } lrh->datagram_size = datagram_size; lrh->datagram_tag = datagram_tag; - lrh->pbuf = p; - lrh->next_packet = reass_list; + lrh->frags = NULL; + if (*(u8_t *)p->payload == 0x41) { + /* This is a complete IPv6 packet, just skip dispatch byte. */ + pbuf_remove_header(p, 1); /* hide dispatch byte. */ + lrh->reass = p; + } else if ((*(u8_t *)p->payload & 0xe0 ) == 0x60) { + lrh->reass = lowpan6_decompress(p, datagram_size, LWIP_6LOWPAN_CONTEXTS(netif), &src, &dest); + if (lrh->reass == NULL) { + /* decompression failed */ + mem_free(lrh); + goto lowpan6_input_discard; + } + } + /* TODO: handle the case where we already have FRAGN received */ + lrh->next_packet = lowpan6_data.reass_list; lrh->timer = 2; - reass_list = lrh; + lowpan6_data.reass_list = lrh; return ERR_OK; - } else if ((*puc & 0xf8) == 0xe0) { + } else if ((b & 0xf8) == 0xe0) { /* FRAGN dispatch, find packet being reassembled. */ datagram_size = ((u16_t)(puc[0] & 0x07) << 8) | (u16_t)puc[1]; datagram_tag = ((u16_t)puc[2] << 8) | (u16_t)puc[3]; datagram_offset = (u16_t)puc[4] << 3; - pbuf_header(p, -5); /* hide frag1 dispatch */ + pbuf_remove_header(p, 4); /* hide frag1 dispatch but keep datagram offset for reassembly */ - for (lrh = reass_list; lrh != NULL; lrh = lrh->next_packet) { + for (lrh = lowpan6_data.reass_list; lrh != NULL; lrh_prev = lrh, lrh = lrh->next_packet) { if ((lrh->sender_addr.addr_len == src.addr_len) && (memcmp(lrh->sender_addr.addr, src.addr, src.addr_len) == 0) && (datagram_tag == lrh->datagram_tag) && @@ -1081,79 +751,131 @@ lowpan6_input(struct pbuf * p, struct netif *netif) } if (lrh == NULL) { /* rogue fragment */ - MIB2_STATS_NETIF_INC(netif, ifindiscards); - pbuf_free(p); - return ERR_OK; + goto lowpan6_input_discard; } - - if (lrh->pbuf->tot_len < datagram_offset) { - /* duplicate, ignore. */ - pbuf_free(p); - return ERR_OK; - } else if (lrh->pbuf->tot_len > datagram_offset) { - MIB2_STATS_NETIF_INC(netif, ifindiscards); - /* We have missed a fragment. Delete whole reassembly. */ - dequeue_datagram(lrh); - pbuf_free(lrh->pbuf); - mem_free(lrh); - pbuf_free(p); - return ERR_OK; + /* Insert new pbuf into list of fragments. Each fragment is a pbuf, + this only works for unchained pbufs. */ + LWIP_ASSERT("p->next == NULL", p->next == NULL); + if (lrh->reass != NULL) { + /* FRAG1 already received, check this offset against first len */ + if (datagram_offset < lrh->reass->len) { + /* fragment overlap, discard old fragments */ + dequeue_datagram(lrh, lrh_prev); + free_reass_datagram(lrh); + goto lowpan6_input_discard; + } } - pbuf_cat(lrh->pbuf, p); - p = NULL; - - /* is packet now complete?*/ - if (lrh->pbuf->tot_len >= lrh->datagram_size) { - /* dequeue from reass list. */ - dequeue_datagram(lrh); - - /* get pbuf */ - p = lrh->pbuf; - - /* release helper */ - mem_free(lrh); + if (lrh->frags == NULL) { + /* first FRAGN */ + lrh->frags = p; } else { - return ERR_OK; + /* find the correct place to insert */ + struct pbuf *q, *last; + u16_t new_frag_len = p->len - 1; /* p->len includes datagram_offset byte */ + for (q = lrh->frags, last = NULL; q != NULL; last = q, q = q->next) { + u16_t q_datagram_offset = ((u8_t *)q->payload)[0] << 3; + u16_t q_frag_len = q->len - 1; + if (datagram_offset < q_datagram_offset) { + if (datagram_offset + new_frag_len > q_datagram_offset) { + /* overlap, discard old fragments */ + dequeue_datagram(lrh, lrh_prev); + free_reass_datagram(lrh); + goto lowpan6_input_discard; + } + /* insert here */ + break; + } else if (datagram_offset == q_datagram_offset) { + if (q_frag_len != new_frag_len) { + /* fragment mismatch, discard old fragments */ + dequeue_datagram(lrh, lrh_prev); + free_reass_datagram(lrh); + goto lowpan6_input_discard; + } + /* duplicate, ignore */ + pbuf_free(p); + return ERR_OK; + } + } + /* insert fragment */ + if (last == NULL) { + lrh->frags = p; + } else { + last->next = p; + p->next = q; + } } - } + /* check if all fragments were received */ + if (lrh->reass) { + u16_t offset = lrh->reass->len; + struct pbuf *q; + for (q = lrh->frags; q != NULL; q = q->next) { + u16_t q_datagram_offset = ((u8_t *)q->payload)[0] << 3; + if (q_datagram_offset != offset) { + /* not complete, wait for more fragments */ + return ERR_OK; + } + offset += q->len - 1; + } + if (offset == datagram_size) { + /* all fragments received, combine pbufs */ + u16_t datagram_left = datagram_size - lrh->reass->len; + for (q = lrh->frags; q != NULL; q = q->next) { + /* hide datagram_offset byte now */ + pbuf_remove_header(q, 1); + q->tot_len = datagram_left; + datagram_left -= q->len; + } + LWIP_ASSERT("datagram_left == 0", datagram_left == 0); + q = lrh->reass; + q->tot_len = datagram_size; + q->next = lrh->frags; + lrh->frags = NULL; + lrh->reass = NULL; + dequeue_datagram(lrh, lrh_prev); + mem_free(lrh); - if (p == NULL) { + /* @todo: distinguish unicast/multicast */ + MIB2_STATS_NETIF_INC(netif, ifinucastpkts); + return ip6_input(q, netif); + } + } + /* pbuf enqueued, waiting for more fragments */ return ERR_OK; - } - - /* We have a complete packet, check dispatch for headers. */ - puc = (u8_t*)p->payload; - - if (*puc == 0x41) { - /* This is a complete IPv6 packet, just skip dispatch byte. */ - pbuf_header(p, -1); /* hide dispatch byte. */ - } else if ((*puc & 0xe0 )== 0x60) { - /* IPv6 headers are compressed using IPHC. */ - p = lowpan6_decompress(p, &src, &dest); - if (p == NULL) { - MIB2_STATS_NETIF_INC(netif, ifindiscards); - return ERR_OK; - } } else { - MIB2_STATS_NETIF_INC(netif, ifindiscards); - pbuf_free(p); - return ERR_OK; + if (b == 0x41) { + /* This is a complete IPv6 packet, just skip dispatch byte. */ + pbuf_remove_header(p, 1); /* hide dispatch byte. */ + } else if ((b & 0xe0 ) == 0x60) { + /* IPv6 headers are compressed using IPHC. */ + p = lowpan6_decompress(p, datagram_size, LWIP_6LOWPAN_CONTEXTS(netif), &src, &dest); + if (p == NULL) { + MIB2_STATS_NETIF_INC(netif, ifindiscards); + return ERR_OK; + } + } else { + goto lowpan6_input_discard; + } + + /* @todo: distinguish unicast/multicast */ + MIB2_STATS_NETIF_INC(netif, ifinucastpkts); + + return ip6_input(p, netif); } - - /* @todo: distinguish unicast/multicast */ - MIB2_STATS_NETIF_INC(netif, ifinucastpkts); - - return ip6_input(p, netif); +lowpan6_input_discard: + MIB2_STATS_NETIF_INC(netif, ifindiscards); + pbuf_free(p); + /* always return ERR_OK here to prevent the caller freeing the pbuf */ + return ERR_OK; } +/** + * @ingroup sixlowpan + */ err_t lowpan6_if_init(struct netif *netif) { netif->name[0] = 'L'; netif->name[1] = '6'; -#if LWIP_IPV4 - netif->output = lowpan4_output; -#endif /* LWIP_IPV4 */ netif->output_ip6 = lowpan6_output; MIB2_INIT_NETIF(netif, snmp_ifType_other, 0); @@ -1167,16 +889,21 @@ lowpan6_if_init(struct netif *netif) return ERR_OK; } +/** + * @ingroup sixlowpan + * Set PAN ID + */ err_t lowpan6_set_pan_id(u16_t pan_id) { - ieee_802154_pan_id = pan_id; + lowpan6_data.ieee_802154_pan_id = pan_id; return ERR_OK; } #if !NO_SYS /** + * @ingroup sixlowpan * Pass a received packet to tcpip_thread for input processing * * @param p the received packet, p->payload pointing to the @@ -1190,4 +917,4 @@ tcpip_6lowpan_input(struct pbuf *p, struct netif *inp) } #endif /* !NO_SYS */ -#endif /* LWIP_IPV6 && LWIP_6LOWPAN */ +#endif /* LWIP_IPV6 */ diff --git a/Libraries/LwIP/src/netif/lowpan6_ble.c b/Libraries/LwIP/src/netif/lowpan6_ble.c new file mode 100644 index 0000000..d89816d --- /dev/null +++ b/Libraries/LwIP/src/netif/lowpan6_ble.c @@ -0,0 +1,447 @@ +/** + * @file + * 6LowPAN over BLE output for IPv6 (RFC7668). +*/ + +/* + * Copyright (c) 2017 Benjamin Aigner + * Copyright (c) 2015 Inico Technologies Ltd. , Author: Ivan Delamer + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * Author: Benjamin Aigner + * + * Based on the original 6lowpan implementation of lwIP ( @see 6lowpan.c) + */ + + +/** + * @defgroup rfc7668if 6LoWPAN over BLE (RFC7668) + * @ingroup netifs + * This file implements a RFC7668 implementation for 6LoWPAN over + * Bluetooth Low Energy. The specification is very similar to 6LoWPAN, + * so most of the code is re-used. + * Compared to 6LoWPAN, much functionality is already implemented in + * lower BLE layers (fragmenting, session management,...). + * + * Usage: + * - add this netif + * - don't add IPv4 addresses (no IPv4 support in RFC7668), pass 'NULL','NULL','NULL' + * - use the BLE to EUI64 conversation util to create an IPv6 link-local address from the BLE MAC (@ref ble_addr_to_eui64) + * - input function: @ref rfc7668_input + * - set the link output function, which transmits output data to an established L2CAP channel + * - If data arrives (HCI event "L2CAP_DATA_PACKET"): + * - allocate a @ref PBUF_RAW buffer + * - let the pbuf struct point to the incoming data or copy it to the buffer + * - call netif->input + * + * @todo: + * - further testing + * - support compression contexts + * - support multiple addresses + * - support multicast + * - support neighbor discovery + */ + + +#include "netif/lowpan6_ble.h" + +#if LWIP_IPV6 + +#include "lwip/ip.h" +#include "lwip/pbuf.h" +#include "lwip/ip_addr.h" +#include "lwip/netif.h" +#include "lwip/nd6.h" +#include "lwip/mem.h" +#include "lwip/udp.h" +#include "lwip/tcpip.h" +#include "lwip/snmp.h" + +#include + +#if LWIP_6LOWPAN_NUM_CONTEXTS > 0 +/** context memory, containing IPv6 addresses */ +static ip6_addr_t rfc7668_context[LWIP_6LOWPAN_NUM_CONTEXTS]; +#else +#define rfc7668_context NULL +#endif + +static struct lowpan6_link_addr rfc7668_local_addr; +static struct lowpan6_link_addr rfc7668_peer_addr; + +/** + * @ingroup rfc7668if + * convert BT address to EUI64 addr + * + * This method converts a Bluetooth MAC address to an EUI64 address, + * which is used within IPv6 communication + * + * @param dst IPv6 destination space + * @param src BLE MAC address source + * @param public_addr If the LWIP_RFC7668_LINUX_WORKAROUND_PUBLIC_ADDRESS + * option is set, bit 0x02 will be set if param=0 (no public addr); cleared otherwise + * + * @see LWIP_RFC7668_LINUX_WORKAROUND_PUBLIC_ADDRESS + */ +void +ble_addr_to_eui64(uint8_t *dst, const uint8_t *src, int public_addr) +{ + /* according to RFC7668 ch 3.2.2. */ + memcpy(dst, src, 3); + dst[3] = 0xFF; + dst[4] = 0xFE; + memcpy(&dst[5], &src[3], 3); +#if LWIP_RFC7668_LINUX_WORKAROUND_PUBLIC_ADDRESS + if(public_addr) { + dst[0] &= ~0x02; + } else { + dst[0] |= 0x02; + } +#else + LWIP_UNUSED_ARG(public_addr); +#endif +} + +/** + * @ingroup rfc7668if + * convert EUI64 address to Bluetooth MAC addr + * + * This method converts an EUI64 address to a Bluetooth MAC address, + * + * @param dst BLE MAC address destination + * @param src IPv6 source + * + */ +void +eui64_to_ble_addr(uint8_t *dst, const uint8_t *src) +{ + /* according to RFC7668 ch 3.2.2. */ + memcpy(dst,src,3); + memcpy(&dst[3],&src[5],3); +} + +/** Set an address used for stateful compression. + * This expects an address of 6 or 8 bytes. + */ +static err_t +rfc7668_set_addr(struct lowpan6_link_addr *addr, const u8_t *in_addr, size_t in_addr_len, int is_mac_48, int is_public_addr) +{ + if ((in_addr == NULL) || (addr == NULL)) { + return ERR_VAL; + } + if (is_mac_48) { + if (in_addr_len != 6) { + return ERR_VAL; + } + addr->addr_len = 8; + ble_addr_to_eui64(addr->addr, in_addr, is_public_addr); + } else { + if (in_addr_len != 8) { + return ERR_VAL; + } + addr->addr_len = 8; + memcpy(addr->addr, in_addr, 8); + } + return ERR_OK; +} + + +/** Set the local address used for stateful compression. + * This expects an address of 8 bytes. + */ +err_t +rfc7668_set_local_addr_eui64(struct netif *netif, const u8_t *local_addr, size_t local_addr_len) +{ + /* netif not used for now, the address is stored globally... */ + LWIP_UNUSED_ARG(netif); + return rfc7668_set_addr(&rfc7668_local_addr, local_addr, local_addr_len, 0, 0); +} + +/** Set the local address used for stateful compression. + * This expects an address of 6 bytes. + */ +err_t +rfc7668_set_local_addr_mac48(struct netif *netif, const u8_t *local_addr, size_t local_addr_len, int is_public_addr) +{ + /* netif not used for now, the address is stored globally... */ + LWIP_UNUSED_ARG(netif); + return rfc7668_set_addr(&rfc7668_local_addr, local_addr, local_addr_len, 1, is_public_addr); +} + +/** Set the peer address used for stateful compression. + * This expects an address of 8 bytes. + */ +err_t +rfc7668_set_peer_addr_eui64(struct netif *netif, const u8_t *peer_addr, size_t peer_addr_len) +{ + /* netif not used for now, the address is stored globally... */ + LWIP_UNUSED_ARG(netif); + return rfc7668_set_addr(&rfc7668_peer_addr, peer_addr, peer_addr_len, 0, 0); +} + +/** Set the peer address used for stateful compression. + * This expects an address of 6 bytes. + */ +err_t +rfc7668_set_peer_addr_mac48(struct netif *netif, const u8_t *peer_addr, size_t peer_addr_len, int is_public_addr) +{ + /* netif not used for now, the address is stored globally... */ + LWIP_UNUSED_ARG(netif); + return rfc7668_set_addr(&rfc7668_peer_addr, peer_addr, peer_addr_len, 1, is_public_addr); +} + +/** Encapsulate IPv6 frames for BLE transmission + * + * This method implements the IPv6 header compression: + * *) According to RFC6282 + * *) See Figure 2, contains base format of bit positions + * *) Fragmentation not necessary (done at L2CAP layer of BLE) + * @note Currently the pbuf allocation uses 256 bytes. If longer packets are used (possible due to MTU=1480Bytes), increase it here! + * + * @param p Pbuf struct, containing the payload data + * @param netif Output network interface. Should be of RFC7668 type + * + * @return Same as netif->output. + */ +static err_t +rfc7668_compress(struct netif *netif, struct pbuf *p) +{ + struct pbuf *p_frag; + u16_t remaining_len; + u8_t *buffer; + u8_t lowpan6_header_len; + u8_t hidden_header_len; + err_t err; + + LWIP_ASSERT("lowpan6_frag: netif->linkoutput not set", netif->linkoutput != NULL); + +#if LWIP_6LOWPAN_IPHC + + /* We'll use a dedicated pbuf for building BLE fragments. + * We'll over-allocate it by the bytes saved for header compression. + */ + p_frag = pbuf_alloc(PBUF_RAW, p->tot_len, PBUF_RAM); + if (p_frag == NULL) { + MIB2_STATS_NETIF_INC(netif, ifoutdiscards); + return ERR_MEM; + } + LWIP_ASSERT("this needs a pbuf in one piece", p_frag->len == p_frag->tot_len); + + /* Write IP6 header (with IPHC). */ + buffer = (u8_t*)p_frag->payload; + + err = lowpan6_compress_headers(netif, (u8_t *)p->payload, p->len, buffer, p_frag->len, + &lowpan6_header_len, &hidden_header_len, rfc7668_context, &rfc7668_local_addr, &rfc7668_peer_addr); + if (err != ERR_OK) { + MIB2_STATS_NETIF_INC(netif, ifoutdiscards); + pbuf_free(p_frag); + return err; + } + pbuf_remove_header(p, hidden_header_len); + + /* Calculate remaining packet length */ + remaining_len = p->tot_len; + + /* Copy IPv6 packet */ + pbuf_copy_partial(p, buffer + lowpan6_header_len, remaining_len, 0); + + /* Calculate frame length */ + p_frag->len = p_frag->tot_len = remaining_len + lowpan6_header_len; + + /* send the packet */ + MIB2_STATS_NETIF_ADD(netif, ifoutoctets, p_frag->tot_len); + LWIP_DEBUGF(LWIP_LOWPAN6_DEBUG|LWIP_DBG_TRACE, ("rfc7668_output: sending packet %p\n", (void *)p)); + err = netif->linkoutput(netif, p_frag); + + pbuf_free(p_frag); + + return err; +#else /* LWIP_6LOWPAN_IPHC */ + /* 6LoWPAN over BLE requires IPHC! */ + return ERR_IF; +#endif/* LWIP_6LOWPAN_IPHC */ +} + +/** + * @ingroup rfc7668if + * Set context id IPv6 address + * + * Store one IPv6 address to a given context id. + * + * @param idx Context id + * @param context IPv6 addr for this context + * + * @return ERR_OK (if everything is fine), ERR_ARG (if the context id is out of range), ERR_VAL (if contexts disabled) + */ +err_t +rfc7668_set_context(u8_t idx, const ip6_addr_t *context) +{ +#if LWIP_6LOWPAN_NUM_CONTEXTS > 0 + /* check if the ID is possible */ + if (idx >= LWIP_6LOWPAN_NUM_CONTEXTS) { + return ERR_ARG; + } + /* copy IPv6 address to context storage */ + ip6_addr_set(&rfc7668_context[idx], context); + return ERR_OK; +#else + LWIP_UNUSED_ARG(idx); + LWIP_UNUSED_ARG(context); + return ERR_VAL; +#endif +} + +/** + * @ingroup rfc7668if + * Compress outgoing IPv6 packet and pass it on to netif->linkoutput + * + * @param netif The lwIP network interface which the IP packet will be sent on. + * @param q The pbuf(s) containing the IP packet to be sent. + * @param ip6addr The IP address of the packet destination. + * + * @return See rfc7668_compress + */ +err_t +rfc7668_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr) +{ + /* dst ip6addr is not used here, we only have one peer */ + LWIP_UNUSED_ARG(ip6addr); + + return rfc7668_compress(netif, q); +} + +/** + * @ingroup rfc7668if + * Process a received raw payload from an L2CAP channel + * + * @param p the received packet, p->payload pointing to the + * IPv6 header (maybe compressed) + * @param netif the network interface on which the packet was received + * + * @return ERR_OK if everything was fine + */ +err_t +rfc7668_input(struct pbuf * p, struct netif *netif) +{ + u8_t * puc; + + MIB2_STATS_NETIF_ADD(netif, ifinoctets, p->tot_len); + + /* Load first header byte */ + puc = (u8_t*)p->payload; + + /* no IP header compression */ + if (*puc == 0x41) { + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("Completed packet, removing dispatch: 0x%2x \n", *puc)); + /* This is a complete IPv6 packet, just skip header byte. */ + pbuf_remove_header(p, 1); + /* IPHC header compression */ + } else if ((*puc & 0xe0 )== 0x60) { + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("Completed packet, decompress dispatch: 0x%2x \n", *puc)); + /* IPv6 headers are compressed using IPHC. */ + p = lowpan6_decompress(p, 0, rfc7668_context, &rfc7668_peer_addr, &rfc7668_local_addr); + /* if no pbuf is returned, handle as discarded packet */ + if (p == NULL) { + MIB2_STATS_NETIF_INC(netif, ifindiscards); + return ERR_OK; + } + /* invalid header byte, discard */ + } else { + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("Completed packet, discarding: 0x%2x \n", *puc)); + MIB2_STATS_NETIF_INC(netif, ifindiscards); + pbuf_free(p); + return ERR_OK; + } + /* @todo: distinguish unicast/multicast */ + MIB2_STATS_NETIF_INC(netif, ifinucastpkts); + +#if LWIP_RFC7668_IP_UNCOMPRESSED_DEBUG + { + u16_t i; + LWIP_DEBUGF(LWIP_RFC7668_IP_UNCOMPRESSED_DEBUG, ("IPv6 payload:\n")); + for (i = 0; i < p->len; i++) { + if ((i%4)==0) { + LWIP_DEBUGF(LWIP_RFC7668_IP_UNCOMPRESSED_DEBUG, ("\n")); + } + LWIP_DEBUGF(LWIP_RFC7668_IP_UNCOMPRESSED_DEBUG, ("%2X ", *((uint8_t *)p->payload+i))); + } + LWIP_DEBUGF(LWIP_RFC7668_IP_UNCOMPRESSED_DEBUG, ("\np->len: %d\n", p->len)); + } +#endif + /* pass data to ip6_input */ + return ip6_input(p, netif); +} + +/** + * @ingroup rfc7668if + * Initialize the netif + * + * No flags are used (broadcast not possible, not ethernet, ...) + * The shortname for this netif is "BT" + * + * @param netif the network interface to be initialized as RFC7668 netif + * + * @return ERR_OK if everything went fine + */ +err_t +rfc7668_if_init(struct netif *netif) +{ + netif->name[0] = 'b'; + netif->name[1] = 't'; + /* local function as IPv6 output */ + netif->output_ip6 = rfc7668_output; + + MIB2_INIT_NETIF(netif, snmp_ifType_other, 0); + + /* maximum transfer unit, set according to RFC7668 ch2.4 */ + netif->mtu = 1280; + + /* no flags set (no broadcast, ethernet,...)*/ + netif->flags = 0; + + /* everything fine */ + return ERR_OK; +} + +#if !NO_SYS +/** + * Pass a received packet to tcpip_thread for input processing + * + * @param p the received packet, p->payload pointing to the + * IEEE 802.15.4 header. + * @param inp the network interface on which the packet was received + * + * @return see @ref tcpip_inpkt, same return values + */ +err_t +tcpip_rfc7668_input(struct pbuf *p, struct netif *inp) +{ + /* send data to upper layer, return the result */ + return tcpip_inpkt(p, inp, rfc7668_input); +} +#endif /* !NO_SYS */ + +#endif /* LWIP_IPV6 */ diff --git a/Libraries/LwIP/src/netif/lowpan6_common.c b/Libraries/LwIP/src/netif/lowpan6_common.c new file mode 100644 index 0000000..baea206 --- /dev/null +++ b/Libraries/LwIP/src/netif/lowpan6_common.c @@ -0,0 +1,841 @@ +/** + * @file + * + * Common 6LowPAN routines for IPv6. Uses ND tables for link-layer addressing. Fragments packets to 6LowPAN units. + * + * This implementation aims to conform to IEEE 802.15.4(-2015), RFC 4944 and RFC 6282. + * @todo: RFC 6775. + */ + +/* + * Copyright (c) 2015 Inico Technologies Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Ivan Delamer + * + * + * Please coordinate changes and requests with Ivan Delamer + * + */ + +/** + * @defgroup sixlowpan 6LoWPAN (RFC4944) + * @ingroup netifs + * 6LowPAN netif implementation + */ + +#include "netif/lowpan6_common.h" + +#if LWIP_IPV6 + +#include "lwip/ip.h" +#include "lwip/pbuf.h" +#include "lwip/ip_addr.h" +#include "lwip/netif.h" +#include "lwip/udp.h" + +#include + +/* Determine compression mode for unicast address. */ +s8_t +lowpan6_get_address_mode(const ip6_addr_t *ip6addr, const struct lowpan6_link_addr *mac_addr) +{ + if (mac_addr->addr_len == 2) { + if ((ip6addr->addr[2] == (u32_t)PP_HTONL(0x000000ff)) && + ((ip6addr->addr[3] & PP_HTONL(0xffff0000)) == PP_NTOHL(0xfe000000))) { + if ((ip6addr->addr[3] & PP_HTONL(0x0000ffff)) == lwip_ntohl((mac_addr->addr[0] << 8) | mac_addr->addr[1])) { + return 3; + } + } + } else if (mac_addr->addr_len == 8) { + if ((ip6addr->addr[2] == lwip_ntohl(((mac_addr->addr[0] ^ 2) << 24) | (mac_addr->addr[1] << 16) | mac_addr->addr[2] << 8 | mac_addr->addr[3])) && + (ip6addr->addr[3] == lwip_ntohl((mac_addr->addr[4] << 24) | (mac_addr->addr[5] << 16) | mac_addr->addr[6] << 8 | mac_addr->addr[7]))) { + return 3; + } + } + + if ((ip6addr->addr[2] == PP_HTONL(0x000000ffUL)) && + ((ip6addr->addr[3] & PP_HTONL(0xffff0000)) == PP_NTOHL(0xfe000000UL))) { + return 2; + } + + return 1; +} + +#if LWIP_6LOWPAN_IPHC + +/* Determine compression mode for multicast address. */ +static s8_t +lowpan6_get_address_mode_mc(const ip6_addr_t *ip6addr) +{ + if ((ip6addr->addr[0] == PP_HTONL(0xff020000)) && + (ip6addr->addr[1] == 0) && + (ip6addr->addr[2] == 0) && + ((ip6addr->addr[3] & PP_HTONL(0xffffff00)) == 0)) { + return 3; + } else if (((ip6addr->addr[0] & PP_HTONL(0xff00ffff)) == PP_HTONL(0xff000000)) && + (ip6addr->addr[1] == 0)) { + if ((ip6addr->addr[2] == 0) && + ((ip6addr->addr[3] & PP_HTONL(0xff000000)) == 0)) { + return 2; + } else if ((ip6addr->addr[2] & PP_HTONL(0xffffff00)) == 0) { + return 1; + } + } + + return 0; +} + +#if LWIP_6LOWPAN_NUM_CONTEXTS > 0 +static s8_t +lowpan6_context_lookup(const ip6_addr_t *lowpan6_contexts, const ip6_addr_t *ip6addr) +{ + s8_t i; + + for (i = 0; i < LWIP_6LOWPAN_NUM_CONTEXTS; i++) { + if (ip6_addr_netcmp(&lowpan6_contexts[i], ip6addr)) { + return i; + } + } + return -1; +} +#endif /* LWIP_6LOWPAN_NUM_CONTEXTS > 0 */ + +/* + * Compress IPv6 and/or UDP headers. + * */ +err_t +lowpan6_compress_headers(struct netif *netif, u8_t *inbuf, size_t inbuf_size, u8_t *outbuf, size_t outbuf_size, + u8_t *lowpan6_header_len_out, u8_t *hidden_header_len_out, ip6_addr_t *lowpan6_contexts, + const struct lowpan6_link_addr *src, const struct lowpan6_link_addr *dst) +{ + u8_t *buffer, *inptr; + u8_t lowpan6_header_len; + u8_t hidden_header_len = 0; + s8_t i; + struct ip6_hdr *ip6hdr; + ip_addr_t ip6src, ip6dst; + + LWIP_ASSERT("netif != NULL", netif != NULL); + LWIP_ASSERT("inbuf != NULL", inbuf != NULL); + LWIP_ASSERT("outbuf != NULL", outbuf != NULL); + LWIP_ASSERT("lowpan6_header_len_out != NULL", lowpan6_header_len_out != NULL); + LWIP_ASSERT("hidden_header_len_out != NULL", hidden_header_len_out != NULL); + + /* Perform 6LowPAN IPv6 header compression according to RFC 6282 */ + buffer = outbuf; + inptr = inbuf; + + if (inbuf_size < IP6_HLEN) { + /* input buffer too short */ + return ERR_VAL; + } + if (outbuf_size < IP6_HLEN) { + /* output buffer too short for worst case */ + return ERR_MEM; + } + + /* Point to ip6 header and align copies of src/dest addresses. */ + ip6hdr = (struct ip6_hdr *)inptr; + ip_addr_copy_from_ip6_packed(ip6dst, ip6hdr->dest); + ip6_addr_assign_zone(ip_2_ip6(&ip6dst), IP6_UNKNOWN, netif); + ip_addr_copy_from_ip6_packed(ip6src, ip6hdr->src); + ip6_addr_assign_zone(ip_2_ip6(&ip6src), IP6_UNKNOWN, netif); + + /* Basic length of 6LowPAN header, set dispatch and clear fields. */ + lowpan6_header_len = 2; + buffer[0] = 0x60; + buffer[1] = 0; + + /* Determine whether there will be a Context Identifier Extension byte or not. + * If so, set it already. */ +#if LWIP_6LOWPAN_NUM_CONTEXTS > 0 + buffer[2] = 0; + + i = lowpan6_context_lookup(lowpan6_contexts, ip_2_ip6(&ip6src)); + if (i >= 0) { + /* Stateful source address compression. */ + buffer[1] |= 0x40; + buffer[2] |= (i & 0x0f) << 4; + } + + i = lowpan6_context_lookup(lowpan6_contexts, ip_2_ip6(&ip6dst)); + if (i >= 0) { + /* Stateful destination address compression. */ + buffer[1] |= 0x04; + buffer[2] |= i & 0x0f; + } + + if (buffer[2] != 0x00) { + /* Context identifier extension byte is appended. */ + buffer[1] |= 0x80; + lowpan6_header_len++; + } +#else /* LWIP_6LOWPAN_NUM_CONTEXTS > 0 */ + LWIP_UNUSED_ARG(lowpan6_contexts); +#endif /* LWIP_6LOWPAN_NUM_CONTEXTS > 0 */ + + /* Determine TF field: Traffic Class, Flow Label */ + if (IP6H_FL(ip6hdr) == 0) { + /* Flow label is elided. */ + buffer[0] |= 0x10; + if (IP6H_TC(ip6hdr) == 0) { + /* Traffic class (ECN+DSCP) elided too. */ + buffer[0] |= 0x08; + } else { + /* Traffic class (ECN+DSCP) appended. */ + buffer[lowpan6_header_len++] = IP6H_TC(ip6hdr); + } + } else { + if (((IP6H_TC(ip6hdr) & 0x3f) == 0)) { + /* DSCP portion of Traffic Class is elided, ECN and FL are appended (3 bytes) */ + buffer[0] |= 0x08; + + buffer[lowpan6_header_len] = IP6H_TC(ip6hdr) & 0xc0; + buffer[lowpan6_header_len++] |= (IP6H_FL(ip6hdr) >> 16) & 0x0f; + buffer[lowpan6_header_len++] = (IP6H_FL(ip6hdr) >> 8) & 0xff; + buffer[lowpan6_header_len++] = IP6H_FL(ip6hdr) & 0xff; + } else { + /* Traffic class and flow label are appended (4 bytes) */ + buffer[lowpan6_header_len++] = IP6H_TC(ip6hdr); + buffer[lowpan6_header_len++] = (IP6H_FL(ip6hdr) >> 16) & 0x0f; + buffer[lowpan6_header_len++] = (IP6H_FL(ip6hdr) >> 8) & 0xff; + buffer[lowpan6_header_len++] = IP6H_FL(ip6hdr) & 0xff; + } + } + + /* Compress NH? + * Only if UDP for now. @todo support other NH compression. */ + if (IP6H_NEXTH(ip6hdr) == IP6_NEXTH_UDP) { + buffer[0] |= 0x04; + } else { + /* append nexth. */ + buffer[lowpan6_header_len++] = IP6H_NEXTH(ip6hdr); + } + + /* Compress hop limit? */ + if (IP6H_HOPLIM(ip6hdr) == 255) { + buffer[0] |= 0x03; + } else if (IP6H_HOPLIM(ip6hdr) == 64) { + buffer[0] |= 0x02; + } else if (IP6H_HOPLIM(ip6hdr) == 1) { + buffer[0] |= 0x01; + } else { + /* append hop limit */ + buffer[lowpan6_header_len++] = IP6H_HOPLIM(ip6hdr); + } + + /* Compress source address */ + if (((buffer[1] & 0x40) != 0) || + (ip6_addr_islinklocal(ip_2_ip6(&ip6src)))) { + /* Context-based or link-local source address compression. */ + i = lowpan6_get_address_mode(ip_2_ip6(&ip6src), src); + buffer[1] |= (i & 0x03) << 4; + if (i == 1) { + MEMCPY(buffer + lowpan6_header_len, inptr + 16, 8); + lowpan6_header_len += 8; + } else if (i == 2) { + MEMCPY(buffer + lowpan6_header_len, inptr + 22, 2); + lowpan6_header_len += 2; + } + } else if (ip6_addr_isany(ip_2_ip6(&ip6src))) { + /* Special case: mark SAC and leave SAM=0 */ + buffer[1] |= 0x40; + } else { + /* Append full address. */ + MEMCPY(buffer + lowpan6_header_len, inptr + 8, 16); + lowpan6_header_len += 16; + } + + /* Compress destination address */ + if (ip6_addr_ismulticast(ip_2_ip6(&ip6dst))) { + /* @todo support stateful multicast address compression */ + + buffer[1] |= 0x08; + + i = lowpan6_get_address_mode_mc(ip_2_ip6(&ip6dst)); + buffer[1] |= i & 0x03; + if (i == 0) { + MEMCPY(buffer + lowpan6_header_len, inptr + 24, 16); + lowpan6_header_len += 16; + } else if (i == 1) { + buffer[lowpan6_header_len++] = inptr[25]; + MEMCPY(buffer + lowpan6_header_len, inptr + 35, 5); + lowpan6_header_len += 5; + } else if (i == 2) { + buffer[lowpan6_header_len++] = inptr[25]; + MEMCPY(buffer + lowpan6_header_len, inptr + 37, 3); + lowpan6_header_len += 3; + } else if (i == 3) { + buffer[lowpan6_header_len++] = (inptr)[39]; + } + } else if (((buffer[1] & 0x04) != 0) || + (ip6_addr_islinklocal(ip_2_ip6(&ip6dst)))) { + /* Context-based or link-local destination address compression. */ + i = lowpan6_get_address_mode(ip_2_ip6(&ip6dst), dst); + buffer[1] |= i & 0x03; + if (i == 1) { + MEMCPY(buffer + lowpan6_header_len, inptr + 32, 8); + lowpan6_header_len += 8; + } else if (i == 2) { + MEMCPY(buffer + lowpan6_header_len, inptr + 38, 2); + lowpan6_header_len += 2; + } + } else { + /* Append full address. */ + MEMCPY(buffer + lowpan6_header_len, inptr + 24, 16); + lowpan6_header_len += 16; + } + + /* Move to payload. */ + inptr += IP6_HLEN; + hidden_header_len += IP6_HLEN; + +#if LWIP_UDP + /* Compress UDP header? */ + if (IP6H_NEXTH(ip6hdr) == IP6_NEXTH_UDP) { + /* @todo support optional checksum compression */ + + if (inbuf_size < IP6_HLEN + UDP_HLEN) { + /* input buffer too short */ + return ERR_VAL; + } + if (outbuf_size < (size_t)(hidden_header_len + 7)) { + /* output buffer too short for worst case */ + return ERR_MEM; + } + + buffer[lowpan6_header_len] = 0xf0; + + /* determine port compression mode. */ + if ((inptr[0] == 0xf0) && ((inptr[1] & 0xf0) == 0xb0) && + (inptr[2] == 0xf0) && ((inptr[3] & 0xf0) == 0xb0)) { + /* Compress source and dest ports. */ + buffer[lowpan6_header_len++] |= 0x03; + buffer[lowpan6_header_len++] = ((inptr[1] & 0x0f) << 4) | (inptr[3] & 0x0f); + } else if (inptr[0] == 0xf0) { + /* Compress source port. */ + buffer[lowpan6_header_len++] |= 0x02; + buffer[lowpan6_header_len++] = inptr[1]; + buffer[lowpan6_header_len++] = inptr[2]; + buffer[lowpan6_header_len++] = inptr[3]; + } else if (inptr[2] == 0xf0) { + /* Compress dest port. */ + buffer[lowpan6_header_len++] |= 0x01; + buffer[lowpan6_header_len++] = inptr[0]; + buffer[lowpan6_header_len++] = inptr[1]; + buffer[lowpan6_header_len++] = inptr[3]; + } else { + /* append full ports. */ + lowpan6_header_len++; + buffer[lowpan6_header_len++] = inptr[0]; + buffer[lowpan6_header_len++] = inptr[1]; + buffer[lowpan6_header_len++] = inptr[2]; + buffer[lowpan6_header_len++] = inptr[3]; + } + + /* elide length and copy checksum */ + buffer[lowpan6_header_len++] = inptr[6]; + buffer[lowpan6_header_len++] = inptr[7]; + + hidden_header_len += UDP_HLEN; + } +#endif /* LWIP_UDP */ + + *lowpan6_header_len_out = lowpan6_header_len; + *hidden_header_len_out = hidden_header_len; + + return ERR_OK; +} + +/** Decompress IPv6 and UDP headers compressed according to RFC 6282 + * + * @param lowpan6_buffer compressed headers, first byte is the dispatch byte + * @param lowpan6_bufsize size of lowpan6_buffer (may include data after headers) + * @param decomp_buffer buffer where the decompressed headers are stored + * @param decomp_bufsize size of decomp_buffer + * @param hdr_size_comp returns the size of the compressed headers (skip to get to data) + * @param hdr_size_decomp returns the size of the decompressed headers (IPv6 + UDP) + * @param datagram_size datagram size from fragments or 0 if unfragmented + * @param compressed_size compressed datagram size (for unfragmented rx) + * @param lowpan6_contexts context addresses + * @param src source address of the outer layer, used for address compression + * @param dest destination address of the outer layer, used for address compression + * @return ERR_OK if decompression succeeded, an error otherwise + */ +static err_t +lowpan6_decompress_hdr(u8_t *lowpan6_buffer, size_t lowpan6_bufsize, + u8_t *decomp_buffer, size_t decomp_bufsize, + u16_t *hdr_size_comp, u16_t *hdr_size_decomp, + u16_t datagram_size, u16_t compressed_size, + ip6_addr_t *lowpan6_contexts, + struct lowpan6_link_addr *src, struct lowpan6_link_addr *dest) +{ + u16_t lowpan6_offset; + struct ip6_hdr *ip6hdr; + s8_t i; + u32_t header_temp; + u16_t ip6_offset = IP6_HLEN; + + LWIP_ASSERT("lowpan6_buffer != NULL", lowpan6_buffer != NULL); + LWIP_ASSERT("decomp_buffer != NULL", decomp_buffer != NULL); + LWIP_ASSERT("src != NULL", src != NULL); + LWIP_ASSERT("dest != NULL", dest != NULL); + LWIP_ASSERT("hdr_size_comp != NULL", hdr_size_comp != NULL); + LWIP_ASSERT("dehdr_size_decompst != NULL", hdr_size_decomp != NULL); + + ip6hdr = (struct ip6_hdr *)decomp_buffer; + if (decomp_bufsize < IP6_HLEN) { + return ERR_MEM; + } + + /* output the full compressed packet, if set in @see lowpan6_opts.h */ +#if LWIP_LOWPAN6_IP_COMPRESSED_DEBUG + { + u16_t j; + LWIP_DEBUGF(LWIP_LOWPAN6_IP_COMPRESSED_DEBUG, ("lowpan6_decompress_hdr: IP6 payload (compressed): \n")); + for (j = 0; j < lowpan6_bufsize; j++) { + if ((j % 4) == 0) { + LWIP_DEBUGF(LWIP_LOWPAN6_IP_COMPRESSED_DEBUG, ("\n")); + } + LWIP_DEBUGF(LWIP_LOWPAN6_IP_COMPRESSED_DEBUG, ("%2X ", lowpan6_buffer[j])); + } + LWIP_DEBUGF(LWIP_LOWPAN6_IP_COMPRESSED_DEBUG, ("\np->len: %d", lowpan6_bufsize)); + } +#endif + + /* offset for inline IP headers (RFC 6282 ch3)*/ + lowpan6_offset = 2; + /* if CID is set (context identifier), the context byte + * follows immediately after the header, so other IPHC fields are @+3 */ + if (lowpan6_buffer[1] & 0x80) { + lowpan6_offset++; + } + + /* Set IPv6 version, traffic class and flow label. (RFC6282, ch 3.1.1.)*/ + if ((lowpan6_buffer[0] & 0x18) == 0x00) { + header_temp = ((lowpan6_buffer[lowpan6_offset+1] & 0x0f) << 16) | \ + (lowpan6_buffer[lowpan6_offset + 2] << 8) | lowpan6_buffer[lowpan6_offset+3]; + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("TF: 00, ECN: 0x%2x, Flowlabel+DSCP: 0x%8X\n", \ + lowpan6_buffer[lowpan6_offset],header_temp)); + IP6H_VTCFL_SET(ip6hdr, 6, lowpan6_buffer[lowpan6_offset], header_temp); + /* increase offset, processed 4 bytes here: + * TF=00: ECN + DSCP + 4-bit Pad + Flow Label (4 bytes)*/ + lowpan6_offset += 4; + } else if ((lowpan6_buffer[0] & 0x18) == 0x08) { + header_temp = ((lowpan6_buffer[lowpan6_offset] & 0x0f) << 16) | (lowpan6_buffer[lowpan6_offset + 1] << 8) | lowpan6_buffer[lowpan6_offset+2]; + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("TF: 01, ECN: 0x%2x, Flowlabel: 0x%2X, DSCP ignored\n", \ + lowpan6_buffer[lowpan6_offset] & 0xc0,header_temp)); + IP6H_VTCFL_SET(ip6hdr, 6, lowpan6_buffer[lowpan6_offset] & 0xc0, header_temp); + /* increase offset, processed 3 bytes here: + * TF=01: ECN + 2-bit Pad + Flow Label (3 bytes), DSCP is elided.*/ + lowpan6_offset += 3; + } else if ((lowpan6_buffer[0] & 0x18) == 0x10) { + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("TF: 10, DCSP+ECN: 0x%2x, Flowlabel ignored\n", lowpan6_buffer[lowpan6_offset])); + IP6H_VTCFL_SET(ip6hdr, 6, lowpan6_buffer[lowpan6_offset],0); + /* increase offset, processed 1 byte here: + * ECN + DSCP (1 byte), Flow Label is elided.*/ + lowpan6_offset += 1; + } else if ((lowpan6_buffer[0] & 0x18) == 0x18) { + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("TF: 11, DCSP/ECN & Flowlabel ignored\n")); + /* don't increase offset, no bytes processed here */ + IP6H_VTCFL_SET(ip6hdr, 6, 0, 0); + } + + /* Set Next Header (NH) */ + if ((lowpan6_buffer[0] & 0x04) == 0x00) { + /* 0: full next header byte carried inline (increase offset)*/ + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("NH: 0x%2X\n", lowpan6_buffer[lowpan6_offset+1])); + IP6H_NEXTH_SET(ip6hdr, lowpan6_buffer[lowpan6_offset++]); + } else { + /* 1: NH compression, LOWPAN_NHC (RFC6282, ch 4.1) */ + /* We should fill this later with NHC decoding */ + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("NH: skipped, later done with NHC\n")); + IP6H_NEXTH_SET(ip6hdr, 0); + } + + /* Set Hop Limit, either carried inline or 3 different hops (1,64,255) */ + if ((lowpan6_buffer[0] & 0x03) == 0x00) { + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("Hops: full value: %d\n", lowpan6_buffer[lowpan6_offset+1])); + IP6H_HOPLIM_SET(ip6hdr, lowpan6_buffer[lowpan6_offset++]); + } else if ((lowpan6_buffer[0] & 0x03) == 0x01) { + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("Hops: compressed: 1\n")); + IP6H_HOPLIM_SET(ip6hdr, 1); + } else if ((lowpan6_buffer[0] & 0x03) == 0x02) { + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("Hops: compressed: 64\n")); + IP6H_HOPLIM_SET(ip6hdr, 64); + } else if ((lowpan6_buffer[0] & 0x03) == 0x03) { + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("Hops: compressed: 255\n")); + IP6H_HOPLIM_SET(ip6hdr, 255); + } + + /* Source address decoding. */ + if ((lowpan6_buffer[1] & 0x40) == 0x00) { + /* Source address compression (SAC) = 0 -> stateless compression */ + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("SAC == 0, no context byte\n")); + /* Stateless compression */ + if ((lowpan6_buffer[1] & 0x30) == 0x00) { + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("SAM == 00, no src compression, fetching 128bits inline\n")); + /* copy full address, increase offset by 16 Bytes */ + MEMCPY(&ip6hdr->src.addr[0], lowpan6_buffer + lowpan6_offset, 16); + lowpan6_offset += 16; + } else if ((lowpan6_buffer[1] & 0x30) == 0x10) { + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("SAM == 01, src compression, 64bits inline\n")); + /* set 64 bits to link local */ + ip6hdr->src.addr[0] = PP_HTONL(0xfe800000UL); + ip6hdr->src.addr[1] = 0; + /* copy 8 Bytes, increase offset */ + MEMCPY(&ip6hdr->src.addr[2], lowpan6_buffer + lowpan6_offset, 8); + lowpan6_offset += 8; + } else if ((lowpan6_buffer[1] & 0x30) == 0x20) { + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("SAM == 10, src compression, 16bits inline\n")); + /* set 96 bits to link local */ + ip6hdr->src.addr[0] = PP_HTONL(0xfe800000UL); + ip6hdr->src.addr[1] = 0; + ip6hdr->src.addr[2] = PP_HTONL(0x000000ffUL); + /* extract remaining 16bits from inline bytes, increase offset */ + ip6hdr->src.addr[3] = lwip_htonl(0xfe000000UL | (lowpan6_buffer[lowpan6_offset] << 8) | + lowpan6_buffer[lowpan6_offset + 1]); + lowpan6_offset += 2; + } else if ((lowpan6_buffer[1] & 0x30) == 0x30) { + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("SAM == 11, src compression, 0bits inline, using other headers\n")); + /* no information avalaible, using other layers, see RFC6282 ch 3.2.2 */ + ip6hdr->src.addr[0] = PP_HTONL(0xfe800000UL); + ip6hdr->src.addr[1] = 0; + if (src->addr_len == 2) { + ip6hdr->src.addr[2] = PP_HTONL(0x000000ffUL); + ip6hdr->src.addr[3] = lwip_htonl(0xfe000000UL | (src->addr[0] << 8) | src->addr[1]); + } else if (src->addr_len == 8) { + ip6hdr->src.addr[2] = lwip_htonl(((src->addr[0] ^ 2) << 24) | (src->addr[1] << 16) | + (src->addr[2] << 8) | src->addr[3]); + ip6hdr->src.addr[3] = lwip_htonl((src->addr[4] << 24) | (src->addr[5] << 16) | + (src->addr[6] << 8) | src->addr[7]); + } else { + /* invalid source address length */ + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("Invalid source address length\n")); + return ERR_VAL; + } + } + } else { + /* Source address compression (SAC) = 1 -> stateful/context-based compression */ + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("SAC == 1, additional context byte\n")); + if ((lowpan6_buffer[1] & 0x30) == 0x00) { + /* SAM=00, address=> :: (ANY) */ + ip6hdr->src.addr[0] = 0; + ip6hdr->src.addr[1] = 0; + ip6hdr->src.addr[2] = 0; + ip6hdr->src.addr[3] = 0; + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("SAM == 00, context compression, ANY (::)\n")); + } else { + /* Set prefix from context info */ + if (lowpan6_buffer[1] & 0x80) { + i = (lowpan6_buffer[2] >> 4) & 0x0f; + } else { + i = 0; + } + if (i >= LWIP_6LOWPAN_NUM_CONTEXTS) { + /* Error */ + return ERR_VAL; + } +#if LWIP_6LOWPAN_NUM_CONTEXTS > 0 + ip6hdr->src.addr[0] = lowpan6_contexts[i].addr[0]; + ip6hdr->src.addr[1] = lowpan6_contexts[i].addr[1]; + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("SAM == xx, context compression found @%d: %8X, %8X\n", (int)i, ip6hdr->src.addr[0], ip6hdr->src.addr[1])); +#else + LWIP_UNUSED_ARG(lowpan6_contexts); +#endif + } + + /* determine further address bits */ + if ((lowpan6_buffer[1] & 0x30) == 0x10) { + /* SAM=01, load additional 64bits */ + MEMCPY(&ip6hdr->src.addr[2], lowpan6_buffer + lowpan6_offset, 8); + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("SAM == 01, context compression, 64bits inline\n")); + lowpan6_offset += 8; + } else if ((lowpan6_buffer[1] & 0x30) == 0x20) { + /* SAM=01, load additional 16bits */ + ip6hdr->src.addr[2] = PP_HTONL(0x000000ffUL); + ip6hdr->src.addr[3] = lwip_htonl(0xfe000000UL | (lowpan6_buffer[lowpan6_offset] << 8) | lowpan6_buffer[lowpan6_offset + 1]); + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("SAM == 10, context compression, 16bits inline\n")); + lowpan6_offset += 2; + } else if ((lowpan6_buffer[1] & 0x30) == 0x30) { + /* SAM=11, address is fully elided, load from other layers */ + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("SAM == 11, context compression, 0bits inline, using other headers\n")); + if (src->addr_len == 2) { + ip6hdr->src.addr[2] = PP_HTONL(0x000000ffUL); + ip6hdr->src.addr[3] = lwip_htonl(0xfe000000UL | (src->addr[0] << 8) | src->addr[1]); + } else if (src->addr_len == 8) { + ip6hdr->src.addr[2] = lwip_htonl(((src->addr[0] ^ 2) << 24) | (src->addr[1] << 16) | (src->addr[2] << 8) | src->addr[3]); + ip6hdr->src.addr[3] = lwip_htonl((src->addr[4] << 24) | (src->addr[5] << 16) | (src->addr[6] << 8) | src->addr[7]); + } else { + /* invalid source address length */ + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("Invalid source address length\n")); + return ERR_VAL; + } + } + } + + /* Destination address decoding. */ + if (lowpan6_buffer[1] & 0x08) { + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("M=1: multicast\n")); + /* Multicast destination */ + if (lowpan6_buffer[1] & 0x04) { + LWIP_DEBUGF(LWIP_DBG_ON,("DAC == 1, context multicast: unsupported!!!\n")); + /* @todo support stateful multicast addressing */ + return ERR_VAL; + } + + if ((lowpan6_buffer[1] & 0x03) == 0x00) { + /* DAM = 00, copy full address (128bits) */ + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("DAM == 00, no dst compression, fetching 128bits inline\n")); + MEMCPY(&ip6hdr->dest.addr[0], lowpan6_buffer + lowpan6_offset, 16); + lowpan6_offset += 16; + } else if ((lowpan6_buffer[1] & 0x03) == 0x01) { + /* DAM = 01, copy 4 bytes (32bits) */ + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("DAM == 01, dst address form (48bits): ffXX::00XX:XXXX:XXXX\n")); + ip6hdr->dest.addr[0] = lwip_htonl(0xff000000UL | (lowpan6_buffer[lowpan6_offset++] << 16)); + ip6hdr->dest.addr[1] = 0; + ip6hdr->dest.addr[2] = lwip_htonl(lowpan6_buffer[lowpan6_offset++]); + ip6hdr->dest.addr[3] = lwip_htonl((lowpan6_buffer[lowpan6_offset] << 24) | (lowpan6_buffer[lowpan6_offset + 1] << 16) | (lowpan6_buffer[lowpan6_offset + 2] << 8) | lowpan6_buffer[lowpan6_offset + 3]); + lowpan6_offset += 4; + } else if ((lowpan6_buffer[1] & 0x03) == 0x02) { + /* DAM = 10, copy 3 bytes (24bits) */ + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("DAM == 10, dst address form (32bits): ffXX::00XX:XXXX\n")); + ip6hdr->dest.addr[0] = lwip_htonl(0xff000000UL | (lowpan6_buffer[lowpan6_offset++] << 16)); + ip6hdr->dest.addr[1] = 0; + ip6hdr->dest.addr[2] = 0; + ip6hdr->dest.addr[3] = lwip_htonl((lowpan6_buffer[lowpan6_offset] << 16) | (lowpan6_buffer[lowpan6_offset + 1] << 8) | lowpan6_buffer[lowpan6_offset + 2]); + lowpan6_offset += 3; + } else if ((lowpan6_buffer[1] & 0x03) == 0x03) { + /* DAM = 11, copy 1 byte (8bits) */ + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("DAM == 11, dst address form (8bits): ff02::00XX\n")); + ip6hdr->dest.addr[0] = PP_HTONL(0xff020000UL); + ip6hdr->dest.addr[1] = 0; + ip6hdr->dest.addr[2] = 0; + ip6hdr->dest.addr[3] = lwip_htonl(lowpan6_buffer[lowpan6_offset++]); + } + + } else { + /* no Multicast (M=0) */ + if (lowpan6_buffer[1] & 0x04) { + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("DAC == 1, stateful compression\n")); + /* Stateful destination compression */ + /* Set prefix from context info */ + if (lowpan6_buffer[1] & 0x80) { + i = lowpan6_buffer[2] & 0x0f; + } else { + i = 0; + } + if (i >= LWIP_6LOWPAN_NUM_CONTEXTS) { + /* Error */ + return ERR_VAL; + } +#if LWIP_6LOWPAN_NUM_CONTEXTS > 0 + ip6hdr->dest.addr[0] = lowpan6_contexts[i].addr[0]; + ip6hdr->dest.addr[1] = lowpan6_contexts[i].addr[1]; +#endif + } else { + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("DAC == 0, stateless compression, setting link local prefix\n")); + /* Link local address compression */ + ip6hdr->dest.addr[0] = PP_HTONL(0xfe800000UL); + ip6hdr->dest.addr[1] = 0; + } + + /* M=0, DAC=0, determining destination address length via DAM=xx */ + if ((lowpan6_buffer[1] & 0x03) == 0x00) { + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("DAM == 00, no dst compression, fetching 128bits inline")); + /* DAM=00, copy full address */ + MEMCPY(&ip6hdr->dest.addr[0], lowpan6_buffer + lowpan6_offset, 16); + lowpan6_offset += 16; + } else if ((lowpan6_buffer[1] & 0x03) == 0x01) { + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("DAM == 01, dst compression, 64bits inline\n")); + /* DAM=01, copy 64 inline bits, increase offset */ + MEMCPY(&ip6hdr->dest.addr[2], lowpan6_buffer + lowpan6_offset, 8); + lowpan6_offset += 8; + } else if ((lowpan6_buffer[1] & 0x03) == 0x02) { + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("DAM == 01, dst compression, 16bits inline\n")); + /* DAM=10, copy 16 inline bits, increase offset */ + ip6hdr->dest.addr[2] = PP_HTONL(0x000000ffUL); + ip6hdr->dest.addr[3] = lwip_htonl(0xfe000000UL | (lowpan6_buffer[lowpan6_offset] << 8) | lowpan6_buffer[lowpan6_offset + 1]); + lowpan6_offset += 2; + } else if ((lowpan6_buffer[1] & 0x03) == 0x03) { + /* DAM=11, no bits available, use other headers (not done here) */ + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG,("DAM == 01, dst compression, 0bits inline, using other headers\n")); + if (dest->addr_len == 2) { + ip6hdr->dest.addr[2] = PP_HTONL(0x000000ffUL); + ip6hdr->dest.addr[3] = lwip_htonl(0xfe000000UL | (dest->addr[0] << 8) | dest->addr[1]); + } else if (dest->addr_len == 8) { + ip6hdr->dest.addr[2] = lwip_htonl(((dest->addr[0] ^ 2) << 24) | (dest->addr[1] << 16) | dest->addr[2] << 8 | dest->addr[3]); + ip6hdr->dest.addr[3] = lwip_htonl((dest->addr[4] << 24) | (dest->addr[5] << 16) | dest->addr[6] << 8 | dest->addr[7]); + } else { + /* invalid destination address length */ + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("Invalid destination address length\n")); + return ERR_VAL; + } + } + } + + + /* Next Header Compression (NHC) decoding? */ + if (lowpan6_buffer[0] & 0x04) { + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("NHC decoding\n")); +#if LWIP_UDP + if ((lowpan6_buffer[lowpan6_offset] & 0xf8) == 0xf0) { + /* NHC: UDP */ + struct udp_hdr *udphdr; + LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("NHC: UDP\n")); + + /* UDP compression */ + IP6H_NEXTH_SET(ip6hdr, IP6_NEXTH_UDP); + udphdr = (struct udp_hdr *)((u8_t *)decomp_buffer + ip6_offset); + if (decomp_bufsize < IP6_HLEN + UDP_HLEN) { + return ERR_MEM; + } + + /* Checksum decompression */ + if (lowpan6_buffer[lowpan6_offset] & 0x04) { + /* @todo support checksum decompress */ + LWIP_DEBUGF(LWIP_DBG_ON, ("NHC: UDP chechsum decompression UNSUPPORTED\n")); + return ERR_VAL; + } + + /* Decompress ports, according to RFC4944 */ + i = lowpan6_buffer[lowpan6_offset++] & 0x03; + if (i == 0) { + udphdr->src = lwip_htons(lowpan6_buffer[lowpan6_offset] << 8 | lowpan6_buffer[lowpan6_offset + 1]); + udphdr->dest = lwip_htons(lowpan6_buffer[lowpan6_offset + 2] << 8 | lowpan6_buffer[lowpan6_offset + 3]); + lowpan6_offset += 4; + } else if (i == 0x01) { + udphdr->src = lwip_htons(lowpan6_buffer[lowpan6_offset] << 8 | lowpan6_buffer[lowpan6_offset + 1]); + udphdr->dest = lwip_htons(0xf000 | lowpan6_buffer[lowpan6_offset + 2]); + lowpan6_offset += 3; + } else if (i == 0x02) { + udphdr->src = lwip_htons(0xf000 | lowpan6_buffer[lowpan6_offset]); + udphdr->dest = lwip_htons(lowpan6_buffer[lowpan6_offset + 1] << 8 | lowpan6_buffer[lowpan6_offset + 2]); + lowpan6_offset += 3; + } else if (i == 0x03) { + udphdr->src = lwip_htons(0xf0b0 | ((lowpan6_buffer[lowpan6_offset] >> 4) & 0x0f)); + udphdr->dest = lwip_htons(0xf0b0 | (lowpan6_buffer[lowpan6_offset] & 0x0f)); + lowpan6_offset += 1; + } + + udphdr->chksum = lwip_htons(lowpan6_buffer[lowpan6_offset] << 8 | lowpan6_buffer[lowpan6_offset + 1]); + lowpan6_offset += 2; + ip6_offset += UDP_HLEN; + if (datagram_size == 0) { + datagram_size = compressed_size - lowpan6_offset + ip6_offset; + } + udphdr->len = lwip_htons(datagram_size - IP6_HLEN); + + } else +#endif /* LWIP_UDP */ + { + LWIP_DEBUGF(LWIP_DBG_ON,("NHC: unsupported protocol!\n")); + /* @todo support NHC other than UDP */ + return ERR_VAL; + } + } + if (datagram_size == 0) { + datagram_size = compressed_size - lowpan6_offset + ip6_offset; + } + /* Infer IPv6 payload length for header */ + IP6H_PLEN_SET(ip6hdr, datagram_size - IP6_HLEN); + + if (lowpan6_offset > lowpan6_bufsize) { + /* input buffer overflow */ + return ERR_VAL; + } + *hdr_size_comp = lowpan6_offset; + *hdr_size_decomp = ip6_offset; + + return ERR_OK; +} + +struct pbuf * +lowpan6_decompress(struct pbuf *p, u16_t datagram_size, ip6_addr_t *lowpan6_contexts, + struct lowpan6_link_addr *src, struct lowpan6_link_addr *dest) +{ + struct pbuf *q; + u16_t lowpan6_offset, ip6_offset; + err_t err; + +#if LWIP_UDP +#define UDP_HLEN_ALLOC UDP_HLEN +#else +#define UDP_HLEN_ALLOC 0 +#endif + + /* Allocate a buffer for decompression. This buffer will be too big and will be + trimmed once the final size is known. */ + q = pbuf_alloc(PBUF_IP, p->len + IP6_HLEN + UDP_HLEN_ALLOC, PBUF_POOL); + if (q == NULL) { + pbuf_free(p); + return NULL; + } + if (q->len < IP6_HLEN + UDP_HLEN_ALLOC) { + /* The headers need to fit into the first pbuf */ + pbuf_free(p); + pbuf_free(q); + return NULL; + } + + /* Decompress the IPv6 (and possibly UDP) header(s) into the new pbuf */ + err = lowpan6_decompress_hdr((u8_t *)p->payload, p->len, (u8_t *)q->payload, q->len, + &lowpan6_offset, &ip6_offset, datagram_size, p->tot_len, lowpan6_contexts, src, dest); + if (err != ERR_OK) { + pbuf_free(p); + pbuf_free(q); + return NULL; + } + + /* Now we copy leftover contents from p to q, so we have all L2 and L3 headers + (and L4?) in a single pbuf: */ + + /* Hide the compressed headers in p */ + pbuf_remove_header(p, lowpan6_offset); + /* Temporarily hide the headers in q... */ + pbuf_remove_header(q, ip6_offset); + /* ... copy the rest of p into q... */ + pbuf_copy(q, p); + /* ... and reveal the headers again... */ + pbuf_add_header_force(q, ip6_offset); + /* ... trim the pbuf to its correct size... */ + pbuf_realloc(q, ip6_offset + p->len); + /* ... and cat possibly remaining (data-only) pbufs */ + if (p->next != NULL) { + pbuf_cat(q, p->next); + } + /* the original (first) pbuf can now be freed */ + p->next = NULL; + pbuf_free(p); + + /* all done */ + return q; +} + +#endif /* LWIP_6LOWPAN_IPHC */ +#endif /* LWIP_IPV6 */ diff --git a/Libraries/LwIP/src/netif/ppp/auth.c b/Libraries/LwIP/src/netif/ppp/auth.c index e913a68..fee01ae 100755 --- a/Libraries/LwIP/src/netif/ppp/auth.c +++ b/Libraries/LwIP/src/netif/ppp/auth.c @@ -133,10 +133,10 @@ #if 0 /* UNUSED */ /* Bits in scan_authfile return value */ -#define NONWILD_SERVER 1 -#define NONWILD_CLIENT 2 +#define NONWILD_SERVER 1 +#define NONWILD_CLIENT 2 -#define ISWILD(word) (word[0] == '*' && word[1] == 0) +#define ISWILD(word) (word[0] == '*' && word[1] == 0) #endif /* UNUSED */ #if 0 /* UNUSED */ @@ -169,8 +169,8 @@ int (*pap_check_hook) (void) = NULL; /* Hook for a plugin to check the PAP user and password */ int (*pap_auth_hook) (char *user, char *passwd, char **msgp, - struct wordlist **paddrs, - struct wordlist **popts) = NULL; + struct wordlist **paddrs, + struct wordlist **popts) = NULL; /* Hook for a plugin to know about the PAP user logout */ void (*pap_logout_hook) (void) = NULL; @@ -187,7 +187,7 @@ int (*chap_passwd_hook) (char *user, char *passwd) = NULL; /* Hook for a plugin to say whether it is OK if the peer refuses to authenticate. */ int (*null_auth_hook) (struct wordlist **paddrs, - struct wordlist **popts) = NULL; + struct wordlist **popts) = NULL; int (*allowed_address_hook) (u32_t addr) = NULL; #endif /* UNUSED */ @@ -210,27 +210,27 @@ struct notifier *link_down_notifier = NULL; * Option variables. */ #if 0 /* MOVED TO ppp_settings */ -bool uselogin = 0; /* Use /etc/passwd for checking PAP */ -bool session_mgmt = 0; /* Do session management (login records) */ -bool cryptpap = 0; /* Passwords in pap-secrets are encrypted */ -bool refuse_pap = 0; /* Don't wanna auth. ourselves with PAP */ -bool refuse_chap = 0; /* Don't wanna auth. ourselves with CHAP */ -bool refuse_eap = 0; /* Don't wanna auth. ourselves with EAP */ +bool uselogin = 0; /* Use /etc/passwd for checking PAP */ +bool session_mgmt = 0; /* Do session management (login records) */ +bool cryptpap = 0; /* Passwords in pap-secrets are encrypted */ +bool refuse_pap = 0; /* Don't wanna auth. ourselves with PAP */ +bool refuse_chap = 0; /* Don't wanna auth. ourselves with CHAP */ +bool refuse_eap = 0; /* Don't wanna auth. ourselves with EAP */ #if MSCHAP_SUPPORT -bool refuse_mschap = 0; /* Don't wanna auth. ourselves with MS-CHAP */ -bool refuse_mschap_v2 = 0; /* Don't wanna auth. ourselves with MS-CHAPv2 */ +bool refuse_mschap = 0; /* Don't wanna auth. ourselves with MS-CHAP */ +bool refuse_mschap_v2 = 0; /* Don't wanna auth. ourselves with MS-CHAPv2 */ #else /* MSCHAP_SUPPORT */ -bool refuse_mschap = 1; /* Don't wanna auth. ourselves with MS-CHAP */ -bool refuse_mschap_v2 = 1; /* Don't wanna auth. ourselves with MS-CHAPv2 */ +bool refuse_mschap = 1; /* Don't wanna auth. ourselves with MS-CHAP */ +bool refuse_mschap_v2 = 1; /* Don't wanna auth. ourselves with MS-CHAPv2 */ #endif /* MSCHAP_SUPPORT */ -bool usehostname = 0; /* Use hostname for our_name */ -bool auth_required = 0; /* Always require authentication from peer */ -bool allow_any_ip = 0; /* Allow peer to use any IP address */ -bool explicit_remote = 0; /* User specified explicit remote name */ -bool explicit_user = 0; /* Set if "user" option supplied */ -bool explicit_passwd = 0; /* Set if "password" option supplied */ -char remote_name[MAXNAMELEN]; /* Peer's name for authentication */ -static char *uafname; /* name of most recent +ua file */ +bool usehostname = 0; /* Use hostname for our_name */ +bool auth_required = 0; /* Always require authentication from peer */ +bool allow_any_ip = 0; /* Allow peer to use any IP address */ +bool explicit_remote = 0; /* User specified explicit remote name */ +bool explicit_user = 0; /* Set if "user" option supplied */ +bool explicit_passwd = 0; /* Set if "password" option supplied */ +char remote_name[MAXNAMELEN]; /* Peer's name for authentication */ +static char *uafname; /* name of most recent +ua file */ extern char *crypt (const char *, const char *); #endif /* UNUSED */ @@ -252,8 +252,8 @@ static int have_srp_secret (char *client, char *server, int need_ip, int *lacks_ipp); static int ip_addr_check (u32_t, struct permitted_ip *); static int scan_authfile (FILE *, char *, char *, char *, - struct wordlist **, struct wordlist **, - char *, int); + struct wordlist **, struct wordlist **, + char *, int); static void free_wordlist (struct wordlist *); static void set_allowed_addrs (int, struct wordlist *, struct wordlist *); static int some_ip_ok (struct wordlist *); @@ -427,46 +427,46 @@ setupapfile(argv) /* open user info file */ fname = strdup(*argv); if (fname == NULL) - novm("+ua file name"); + novm("+ua file name"); euid = geteuid(); if (seteuid(getuid()) == -1) { - option_error("unable to reset uid before opening %s: %m", fname); - return 0; + option_error("unable to reset uid before opening %s: %m", fname); + return 0; } ufile = fopen(fname, "r"); if (seteuid(euid) == -1) - fatal("unable to regain privileges: %m"); + fatal("unable to regain privileges: %m"); if (ufile == NULL) { - option_error("unable to open user login data file %s", fname); - return 0; + option_error("unable to open user login data file %s", fname); + return 0; } check_access(ufile, fname); uafname = fname; /* get username */ if (fgets(u, MAXNAMELEN - 1, ufile) == NULL - || fgets(p, MAXSECRETLEN - 1, ufile) == NULL) { - fclose(ufile); - option_error("unable to read user login data file %s", fname); - return 0; + || fgets(p, MAXSECRETLEN - 1, ufile) == NULL) { + fclose(ufile); + option_error("unable to read user login data file %s", fname); + return 0; } fclose(ufile); /* get rid of newlines */ l = strlen(u); if (l > 0 && u[l-1] == '\n') - u[l-1] = 0; + u[l-1] = 0; l = strlen(p); if (l > 0 && p[l-1] == '\n') - p[l-1] = 0; + p[l-1] = 0; if (override_value("user", option_priority, fname)) { - strlcpy(ppp_settings.user, u, sizeof(ppp_settings.user)); - explicit_user = 1; + strlcpy(ppp_settings.user, u, sizeof(ppp_settings.user)); + explicit_user = 1; } if (override_value("passwd", option_priority, fname)) { - strlcpy(ppp_settings.passwd, p, sizeof(ppp_settings.passwd)); - explicit_passwd = 1; + strlcpy(ppp_settings.passwd, p, sizeof(ppp_settings.passwd)); + explicit_passwd = 1; } return (1); @@ -484,14 +484,14 @@ privgroup(argv) g = getgrnam(*argv); if (g == 0) { - option_error("group %s is unknown", *argv); - return 0; + option_error("group %s is unknown", *argv); + return 0; } for (i = 0; i < ngroups; ++i) { - if (groups[i] == g->gr_gid) { - privileged = 1; - break; - } + if (groups[i] == g->gr_gid) { + privileged = 1; + break; + } } return 1; } @@ -511,7 +511,7 @@ set_noauth_addr(argv) wp = (struct wordlist *) malloc(sizeof(struct wordlist) + l); if (wp == NULL) - novm("allow-ip argument"); + novm("allow-ip argument"); wp->word = (char *) (wp + 1); wp->next = noauth_addrs; MEMCPY(wp->word, addr, l); @@ -533,7 +533,7 @@ set_permitted_number(argv) wp = (struct wordlist *) malloc(sizeof(struct wordlist) + l); if (wp == NULL) - novm("allow-number argument"); + novm("allow-number argument"); wp->word = (char *) (wp + 1); wp->next = permitted_numbers; MEMCPY(wp->word, number, l); @@ -566,7 +566,7 @@ void start_link(unit) devfd = the_channel->connect(); msg = "Connect script failed"; if (devfd < 0) - goto fail; + goto fail; /* set up the serial device as a ppp interface */ /* @@ -579,21 +579,21 @@ void start_link(unit) fd_ppp = the_channel->establish_ppp(devfd); msg = "ppp establishment failed"; if (fd_ppp < 0) { - status = EXIT_FATAL_ERROR; - goto disconnect; + status = EXIT_FATAL_ERROR; + goto disconnect; } if (!demand && ifunit >= 0) - set_ifunit(1); + set_ifunit(1); /* * Start opening the connection and wait for * incoming events (reply, timeout, etc.). */ if (ifunit >= 0) - ppp_notice("Connect: %s <--> %s", ifname, ppp_devnam); + ppp_notice("Connect: %s <--> %s", ifname, ppp_devnam); else - ppp_notice("Starting negotiation on %s", ppp_devnam); + ppp_notice("Starting negotiation on %s", ppp_devnam); add_fd(fd_ppp); new_phase(pcb, PPP_PHASE_ESTABLISH); @@ -604,12 +604,12 @@ void start_link(unit) disconnect: new_phase(pcb, PPP_PHASE_DISCONNECT); if (the_channel->disconnect) - the_channel->disconnect(); + the_channel->disconnect(); fail: new_phase(pcb, PPP_PHASE_DEAD); if (the_channel->cleanup) - (*the_channel->cleanup)(); + (*the_channel->cleanup)(); } #endif @@ -623,23 +623,23 @@ void link_terminated(ppp_pcb *pcb) { || pcb->phase == PPP_PHASE_MASTER #endif /* HAVE_MULTILINK */ ) - return; + return; new_phase(pcb, PPP_PHASE_DISCONNECT); #if 0 /* UNUSED */ if (pap_logout_hook) { - pap_logout_hook(); + pap_logout_hook(); } session_end(devnam); #endif /* UNUSED */ if (!doing_multilink) { - ppp_notice("Connection terminated."); + ppp_notice("Connection terminated."); #if PPP_STATS_SUPPORT - print_link_stats(); + print_link_stats(); #endif /* PPP_STATS_SUPPORT */ } else - ppp_notice("Link terminated."); + ppp_notice("Link terminated."); lcp_lowerdown(pcb); @@ -651,7 +651,7 @@ void link_terminated(ppp_pcb *pcb) { * we delete its pid file. */ if (!doing_multilink && !demand) - remove_pidfiles(); + remove_pidfiles(); /* * If we may want to bring the link up again, transfer @@ -659,36 +659,36 @@ void link_terminated(ppp_pcb *pcb) { * real serial device back to its normal mode of operation. */ if (fd_ppp >= 0) { - remove_fd(fd_ppp); - clean_check(); - the_channel->disestablish_ppp(devfd); - if (doing_multilink) - mp_exit_bundle(); - fd_ppp = -1; + remove_fd(fd_ppp); + clean_check(); + the_channel->disestablish_ppp(devfd); + if (doing_multilink) + mp_exit_bundle(); + fd_ppp = -1; } if (!hungup) - lcp_lowerdown(pcb); + lcp_lowerdown(pcb); if (!doing_multilink && !demand) - script_unsetenv("IFNAME"); + script_unsetenv("IFNAME"); /* * Run disconnector script, if requested. * XXX we may not be able to do this if the line has hung up! */ if (devfd >= 0 && the_channel->disconnect) { - the_channel->disconnect(); - devfd = -1; + the_channel->disconnect(); + devfd = -1; } if (the_channel->cleanup) - (*the_channel->cleanup)(); + (*the_channel->cleanup)(); if (doing_multilink && multilink_master) { - if (!bundle_terminating) - new_phase(pcb, PPP_PHASE_MASTER); - else - mp_bundle_terminated(); + if (!bundle_terminating) + new_phase(pcb, PPP_PHASE_MASTER); + else + mp_bundle_terminated(); } else - new_phase(pcb, PPP_PHASE_DEAD); + new_phase(pcb, PPP_PHASE_DEAD); #endif } @@ -701,13 +701,13 @@ void link_down(ppp_pcb *pcb) { #endif /* PPP_NOTIFY */ if (!doing_multilink) { - upper_layers_down(pcb); - if (pcb->phase != PPP_PHASE_DEAD + upper_layers_down(pcb); + if (pcb->phase != PPP_PHASE_DEAD #ifdef HAVE_MULTILINK - && pcb->phase != PPP_PHASE_MASTER + && pcb->phase != PPP_PHASE_MASTER #endif /* HAVE_MULTILINK */ - ) - new_phase(pcb, PPP_PHASE_ESTABLISH); + ) + new_phase(pcb, PPP_PHASE_ESTABLISH); } /* XXX if doing_multilink, should do something to stop network-layer traffic on the link */ @@ -719,9 +719,9 @@ void upper_layers_down(ppp_pcb *pcb) { for (i = 0; (protp = protocols[i]) != NULL; ++i) { if (protp->protocol != PPP_LCP && protp->lowerdown != NULL) - (*protp->lowerdown)(pcb); + (*protp->lowerdown)(pcb); if (protp->protocol < 0xC000 && protp->close != NULL) - (*protp->close)(pcb, "LCP down"); + (*protp->close)(pcb, "LCP down"); } pcb->num_np_open = 0; pcb->num_np_up = 0; @@ -749,56 +749,56 @@ void link_established(ppp_pcb *pcb) { * Tell higher-level protocols that LCP is up. */ if (!doing_multilink) { - for (i = 0; (protp = protocols[i]) != NULL; ++i) - if (protp->protocol != PPP_LCP - && protp->lowerup != NULL) - (*protp->lowerup)(pcb); + for (i = 0; (protp = protocols[i]) != NULL; ++i) + if (protp->protocol != PPP_LCP + && protp->lowerup != NULL) + (*protp->lowerup)(pcb); } #if PPP_AUTH_SUPPORT #if PPP_SERVER #if PPP_ALLOWED_ADDRS if (!auth_required && noauth_addrs != NULL) - set_allowed_addrs(unit, NULL, NULL); + set_allowed_addrs(unit, NULL, NULL); #endif /* PPP_ALLOWED_ADDRS */ if (pcb->settings.auth_required && !(0 #if PAP_SUPPORT - || go->neg_upap + || go->neg_upap #endif /* PAP_SUPPORT */ #if CHAP_SUPPORT - || go->neg_chap + || go->neg_chap #endif /* CHAP_SUPPORT */ #if EAP_SUPPORT - || go->neg_eap + || go->neg_eap #endif /* EAP_SUPPORT */ - )) { + )) { #if PPP_ALLOWED_ADDRS - /* - * We wanted the peer to authenticate itself, and it refused: - * if we have some address(es) it can use without auth, fine, - * otherwise treat it as though it authenticated with PAP using - * a username of "" and a password of "". If that's not OK, - * boot it out. - */ - if (noauth_addrs != NULL) { - set_allowed_addrs(unit, NULL, NULL); - } else + /* + * We wanted the peer to authenticate itself, and it refused: + * if we have some address(es) it can use without auth, fine, + * otherwise treat it as though it authenticated with PAP using + * a username of "" and a password of "". If that's not OK, + * boot it out. + */ + if (noauth_addrs != NULL) { + set_allowed_addrs(unit, NULL, NULL); + } else #endif /* PPP_ALLOWED_ADDRS */ - if (!pcb->settings.null_login + if (!pcb->settings.null_login #if PAP_SUPPORT - || !wo->neg_upap + || !wo->neg_upap #endif /* PAP_SUPPORT */ - ) { - ppp_warn("peer refused to authenticate: terminating link"); + ) { + ppp_warn("peer refused to authenticate: terminating link"); #if 0 /* UNUSED */ - status = EXIT_PEER_AUTH_FAILED; + status = EXIT_PEER_AUTH_FAILED; #endif /* UNUSED */ - pcb->err_code = PPPERR_AUTHFAIL; - lcp_close(pcb, "peer refused to authenticate"); - return; - } + pcb->err_code = PPPERR_AUTHFAIL; + lcp_close(pcb, "peer refused to authenticate"); + return; + } } #endif /* PPP_SERVER */ @@ -807,20 +807,20 @@ void link_established(ppp_pcb *pcb) { #if PPP_SERVER #if EAP_SUPPORT if (go->neg_eap) { - eap_authpeer(pcb, PPP_OUR_NAME); - auth |= EAP_PEER; + eap_authpeer(pcb, PPP_OUR_NAME); + auth |= EAP_PEER; } else #endif /* EAP_SUPPORT */ #if CHAP_SUPPORT if (go->neg_chap) { - chap_auth_peer(pcb, PPP_OUR_NAME, CHAP_DIGEST(go->chap_mdtype)); - auth |= CHAP_PEER; + chap_auth_peer(pcb, PPP_OUR_NAME, CHAP_DIGEST(go->chap_mdtype)); + auth |= CHAP_PEER; } else #endif /* CHAP_SUPPORT */ #if PAP_SUPPORT if (go->neg_upap) { - upap_authpeer(pcb); - auth |= PAP_PEER; + upap_authpeer(pcb); + auth |= PAP_PEER; } else #endif /* PAP_SUPPORT */ {} @@ -828,20 +828,20 @@ void link_established(ppp_pcb *pcb) { #if EAP_SUPPORT if (ho->neg_eap) { - eap_authwithpeer(pcb, pcb->settings.user); - auth |= EAP_WITHPEER; + eap_authwithpeer(pcb, pcb->settings.user); + auth |= EAP_WITHPEER; } else #endif /* EAP_SUPPORT */ #if CHAP_SUPPORT if (ho->neg_chap) { - chap_auth_with_peer(pcb, pcb->settings.user, CHAP_DIGEST(ho->chap_mdtype)); - auth |= CHAP_WITHPEER; + chap_auth_with_peer(pcb, pcb->settings.user, CHAP_DIGEST(ho->chap_mdtype)); + auth |= CHAP_WITHPEER; } else #endif /* CHAP_SUPPORT */ #if PAP_SUPPORT if (ho->neg_upap) { - upap_authwithpeer(pcb, pcb->settings.user, pcb->settings.passwd); - auth |= PAP_WITHPEER; + upap_authwithpeer(pcb, pcb->settings.user, pcb->settings.passwd); + auth |= PAP_WITHPEER; } else #endif /* PAP_SUPPORT */ {} @@ -851,7 +851,7 @@ void link_established(ppp_pcb *pcb) { if (!auth) #endif /* PPP_AUTH_SUPPORT */ - network_phase(pcb); + network_phase(pcb); } /* @@ -868,7 +868,7 @@ static void network_phase(ppp_pcb *pcb) { #if 0 /* UNUSED */ /* Log calling number. */ if (*remote_number) - ppp_notice("peer from calling number %q authorized", remote_number); + ppp_notice("peer from calling number %q authorized", remote_number); #endif /* UNUSED */ #if PPP_NOTIFY @@ -877,16 +877,16 @@ static void network_phase(ppp_pcb *pcb) { */ if (0 #if CHAP_SUPPORT - || go->neg_chap + || go->neg_chap #endif /* CHAP_SUPPORT */ #if PAP_SUPPORT - || go->neg_upap + || go->neg_upap #endif /* PAP_SUPPORT */ #if EAP_SUPPORT - || go->neg_eap + || go->neg_eap #endif /* EAP_SUPPORT */ - ) { - notify(auth_up_notifier, 0); + ) { + notify(auth_up_notifier, 0); } #endif /* PPP_NOTIFY */ @@ -895,9 +895,9 @@ static void network_phase(ppp_pcb *pcb) { * If we negotiated callback, do it now. */ if (go->neg_cbcp) { - new_phase(pcb, PPP_PHASE_CALLBACK); - (*cbcp_protent.open)(pcb); - return; + new_phase(pcb, PPP_PHASE_CALLBACK); + (*cbcp_protent.open)(pcb); + return; } #endif @@ -906,9 +906,9 @@ static void network_phase(ppp_pcb *pcb) { * Process extra options from the secrets file */ if (extra_options) { - options_from_list(extra_options, 1); - free_wordlist(extra_options); - extra_options = 0; + options_from_list(extra_options, 1); + free_wordlist(extra_options); + extra_options = 0; } #endif /* PPP_OPTIONS */ start_networks(pcb); @@ -924,34 +924,34 @@ void start_networks(ppp_pcb *pcb) { #ifdef HAVE_MULTILINK if (multilink) { - if (mp_join_bundle()) { - if (multilink_join_hook) - (*multilink_join_hook)(); - if (updetach && !nodetach) - detach(); - return; - } + if (mp_join_bundle()) { + if (multilink_join_hook) + (*multilink_join_hook)(); + if (updetach && !nodetach) + detach(); + return; + } } #endif /* HAVE_MULTILINK */ #ifdef PPP_FILTER if (!demand) - set_filters(&pass_filter, &active_filter); + set_filters(&pass_filter, &active_filter); #endif #if CCP_SUPPORT || ECP_SUPPORT /* Start CCP and ECP */ for (i = 0; (protp = protocols[i]) != NULL; ++i) - if ( - (0 + if ( + (0 #if ECP_SUPPORT - || protp->protocol == PPP_ECP + || protp->protocol == PPP_ECP #endif /* ECP_SUPPORT */ #if CCP_SUPPORT - || protp->protocol == PPP_CCP + || protp->protocol == PPP_CCP #endif /* CCP_SUPPORT */ - ) - && protp->open != NULL) - (*protp->open)(pcb); + ) + && protp->open != NULL) + (*protp->open)(pcb); #endif /* CCP_SUPPORT || ECP_SUPPORT */ /* @@ -965,7 +965,7 @@ void start_networks(ppp_pcb *pcb) { && !pcb->ccp_gotoptions.mppe #endif /* MPPE_SUPPORT */ ) - continue_networks(pcb); + continue_networks(pcb); } void continue_networks(ppp_pcb *pcb) { @@ -976,21 +976,21 @@ void continue_networks(ppp_pcb *pcb) { * Start the "real" network protocols. */ for (i = 0; (protp = protocols[i]) != NULL; ++i) - if (protp->protocol < 0xC000 + if (protp->protocol < 0xC000 #if CCP_SUPPORT - && protp->protocol != PPP_CCP + && protp->protocol != PPP_CCP #endif /* CCP_SUPPORT */ #if ECP_SUPPORT - && protp->protocol != PPP_ECP + && protp->protocol != PPP_ECP #endif /* ECP_SUPPORT */ - && protp->open != NULL) { - (*protp->open)(pcb); - ++pcb->num_np_open; - } + && protp->open != NULL) { + (*protp->open)(pcb); + ++pcb->num_np_open; + } if (pcb->num_np_open == 0) - /* nothing to do */ - lcp_close(pcb, "No network protocols running"); + /* nothing to do */ + lcp_close(pcb, "No network protocols running"); } #if PPP_AUTH_SUPPORT @@ -1053,37 +1053,37 @@ void auth_peer_success(ppp_pcb *pcb, int protocol, int prot_flavor, const char * switch (protocol) { #if CHAP_SUPPORT case PPP_CHAP: - bit = CHAP_PEER; - switch (prot_flavor) { - case CHAP_MD5: - bit |= CHAP_MD5_PEER; - break; + bit = CHAP_PEER; + switch (prot_flavor) { + case CHAP_MD5: + bit |= CHAP_MD5_PEER; + break; #if MSCHAP_SUPPORT - case CHAP_MICROSOFT: - bit |= CHAP_MS_PEER; - break; - case CHAP_MICROSOFT_V2: - bit |= CHAP_MS2_PEER; - break; + case CHAP_MICROSOFT: + bit |= CHAP_MS_PEER; + break; + case CHAP_MICROSOFT_V2: + bit |= CHAP_MS2_PEER; + break; #endif /* MSCHAP_SUPPORT */ - default: - break; - } - break; + default: + break; + } + break; #endif /* CHAP_SUPPORT */ #if PAP_SUPPORT case PPP_PAP: - bit = PAP_PEER; - break; + bit = PAP_PEER; + break; #endif /* PAP_SUPPORT */ #if EAP_SUPPORT case PPP_EAP: - bit = EAP_PEER; - break; + bit = EAP_PEER; + break; #endif /* EAP_SUPPORT */ default: - ppp_warn("auth_peer_success: unknown protocol %x", protocol); - return; + ppp_warn("auth_peer_success: unknown protocol %x", protocol); + return; } #ifdef HAVE_MULTILINK @@ -1091,7 +1091,7 @@ void auth_peer_success(ppp_pcb *pcb, int protocol, int prot_flavor, const char * * Save the authenticated name of the peer for later. */ if (namelen > (int)sizeof(pcb->peer_authname) - 1) - namelen = (int)sizeof(pcb->peer_authname) - 1; + namelen = (int)sizeof(pcb->peer_authname) - 1; MEMCPY(pcb->peer_authname, name, namelen); pcb->peer_authname[namelen] = 0; #endif /* HAVE_MULTILINK */ @@ -1140,41 +1140,41 @@ void auth_withpeer_success(ppp_pcb *pcb, int protocol, int prot_flavor) { switch (protocol) { #if CHAP_SUPPORT case PPP_CHAP: - bit = CHAP_WITHPEER; - prot = "CHAP"; - switch (prot_flavor) { - case CHAP_MD5: - bit |= CHAP_MD5_WITHPEER; - break; + bit = CHAP_WITHPEER; + prot = "CHAP"; + switch (prot_flavor) { + case CHAP_MD5: + bit |= CHAP_MD5_WITHPEER; + break; #if MSCHAP_SUPPORT - case CHAP_MICROSOFT: - bit |= CHAP_MS_WITHPEER; - break; - case CHAP_MICROSOFT_V2: - bit |= CHAP_MS2_WITHPEER; - break; + case CHAP_MICROSOFT: + bit |= CHAP_MS_WITHPEER; + break; + case CHAP_MICROSOFT_V2: + bit |= CHAP_MS2_WITHPEER; + break; #endif /* MSCHAP_SUPPORT */ - default: - break; - } - break; + default: + break; + } + break; #endif /* CHAP_SUPPORT */ #if PAP_SUPPORT case PPP_PAP: - bit = PAP_WITHPEER; - prot = "PAP"; - break; + bit = PAP_WITHPEER; + prot = "PAP"; + break; #endif /* PAP_SUPPORT */ #if EAP_SUPPORT case PPP_EAP: - bit = EAP_WITHPEER; - prot = "EAP"; - break; + bit = EAP_WITHPEER; + prot = "EAP"; + break; #endif /* EAP_SUPPORT */ default: - ppp_warn("auth_withpeer_success: unknown protocol %x", protocol); - bit = 0; - /* no break */ + ppp_warn("auth_withpeer_success: unknown protocol %x", protocol); + bit = 0; + /* no break */ } ppp_notice("%s authentication succeeded", prot); @@ -1187,7 +1187,7 @@ void auth_withpeer_success(ppp_pcb *pcb, int protocol, int prot_flavor) { * proceed to the network (or callback) phase. */ if ((pcb->auth_pending &= ~bit) == 0) - network_phase(pcb); + network_phase(pcb); } #endif /* PPP_AUTH_SUPPORT */ @@ -1202,42 +1202,42 @@ void np_up(ppp_pcb *pcb, int proto) { LWIP_UNUSED_ARG(proto); if (pcb->num_np_up == 0) { - /* - * At this point we consider that the link has come up successfully. - */ - new_phase(pcb, PPP_PHASE_RUNNING); + /* + * At this point we consider that the link has come up successfully. + */ + new_phase(pcb, PPP_PHASE_RUNNING); #if PPP_IDLETIMELIMIT #if 0 /* UNUSED */ - if (idle_time_hook != 0) - tlim = (*idle_time_hook)(NULL); - else + if (idle_time_hook != 0) + tlim = (*idle_time_hook)(NULL); + else #endif /* UNUSED */ - tlim = pcb->settings.idle_time_limit; - if (tlim > 0) - TIMEOUT(check_idle, (void*)pcb, tlim); + tlim = pcb->settings.idle_time_limit; + if (tlim > 0) + TIMEOUT(check_idle, (void*)pcb, tlim); #endif /* PPP_IDLETIMELIMIT */ #if PPP_MAXCONNECT - /* - * Set a timeout to close the connection once the maximum - * connect time has expired. - */ - if (pcb->settings.maxconnect > 0) - TIMEOUT(connect_time_expired, (void*)pcb, pcb->settings.maxconnect); + /* + * Set a timeout to close the connection once the maximum + * connect time has expired. + */ + if (pcb->settings.maxconnect > 0) + TIMEOUT(connect_time_expired, (void*)pcb, pcb->settings.maxconnect); #endif /* PPP_MAXCONNECT */ #ifdef MAXOCTETS - if (maxoctets > 0) - TIMEOUT(check_maxoctets, NULL, maxoctets_timeout); + if (maxoctets > 0) + TIMEOUT(check_maxoctets, NULL, maxoctets_timeout); #endif #if 0 /* Unused */ - /* - * Detach now, if the updetach option was given. - */ - if (updetach && !nodetach) - detach(); + /* + * Detach now, if the updetach option was given. + */ + if (updetach && !nodetach) + detach(); #endif /* Unused */ } ++pcb->num_np_up; @@ -1250,15 +1250,15 @@ void np_down(ppp_pcb *pcb, int proto) { LWIP_UNUSED_ARG(proto); if (--pcb->num_np_up == 0) { #if PPP_IDLETIMELIMIT - UNTIMEOUT(check_idle, (void*)pcb); + UNTIMEOUT(check_idle, (void*)pcb); #endif /* PPP_IDLETIMELIMIT */ #if PPP_MAXCONNECT - UNTIMEOUT(connect_time_expired, NULL); + UNTIMEOUT(connect_time_expired, NULL); #endif /* PPP_MAXCONNECT */ #ifdef MAXOCTETS - UNTIMEOUT(check_maxoctets, NULL); + UNTIMEOUT(check_maxoctets, NULL); #endif - new_phase(pcb, PPP_PHASE_NETWORK); + new_phase(pcb, PPP_PHASE_NETWORK); } } @@ -1268,8 +1268,8 @@ void np_down(ppp_pcb *pcb, int proto) { void np_finished(ppp_pcb *pcb, int proto) { LWIP_UNUSED_ARG(proto); if (--pcb->num_np_open <= 0) { - /* no further use for the link: shut up shop. */ - lcp_close(pcb, "No network protocols running"); + /* no further use for the link: shut up shop. */ + lcp_close(pcb, "No network protocols running"); } } @@ -1285,26 +1285,26 @@ check_maxoctets(arg) link_stats_valid=0; switch(maxoctets_dir) { - case PPP_OCTETS_DIRECTION_IN: - used = link_stats.bytes_in; - break; - case PPP_OCTETS_DIRECTION_OUT: - used = link_stats.bytes_out; - break; - case PPP_OCTETS_DIRECTION_MAXOVERAL: - case PPP_OCTETS_DIRECTION_MAXSESSION: - used = (link_stats.bytes_in > link_stats.bytes_out) ? link_stats.bytes_in : link_stats.bytes_out; - break; - default: - used = link_stats.bytes_in+link_stats.bytes_out; - break; + case PPP_OCTETS_DIRECTION_IN: + used = link_stats.bytes_in; + break; + case PPP_OCTETS_DIRECTION_OUT: + used = link_stats.bytes_out; + break; + case PPP_OCTETS_DIRECTION_MAXOVERAL: + case PPP_OCTETS_DIRECTION_MAXSESSION: + used = (link_stats.bytes_in > link_stats.bytes_out) ? link_stats.bytes_in : link_stats.bytes_out; + break; + default: + used = link_stats.bytes_in+link_stats.bytes_out; + break; } if (used > maxoctets) { - ppp_notice("Traffic limit reached. Limit: %u Used: %u", maxoctets, used); - status = EXIT_TRAFFIC_LIMIT; - lcp_close(pcb, "Traffic limit"); + ppp_notice("Traffic limit reached. Limit: %u Used: %u", maxoctets, used); + status = EXIT_TRAFFIC_LIMIT; + lcp_close(pcb, "Traffic limit"); #if 0 /* UNUSED */ - need_holdoff = 0; + need_holdoff = 0; #endif /* UNUSED */ } else { TIMEOUT(check_maxoctets, NULL, maxoctets_timeout); @@ -1325,27 +1325,27 @@ static void check_idle(void *arg) { int tlim; if (!get_idle_time(pcb, &idle)) - return; + return; #if 0 /* UNUSED */ if (idle_time_hook != 0) { - tlim = idle_time_hook(&idle); + tlim = idle_time_hook(&idle); } else { #endif /* UNUSED */ - itime = LWIP_MIN(idle.xmit_idle, idle.recv_idle); - tlim = pcb->settings.idle_time_limit - itime; + itime = LWIP_MIN(idle.xmit_idle, idle.recv_idle); + tlim = pcb->settings.idle_time_limit - itime; #if 0 /* UNUSED */ } #endif /* UNUSED */ if (tlim <= 0) { - /* link is idle: shut it down. */ - ppp_notice("Terminating connection due to lack of activity."); - pcb->err_code = PPPERR_IDLETIMEOUT; - lcp_close(pcb, "Link inactive"); + /* link is idle: shut it down. */ + ppp_notice("Terminating connection due to lack of activity."); + pcb->err_code = PPPERR_IDLETIMEOUT; + lcp_close(pcb, "Link inactive"); #if 0 /* UNUSED */ - need_holdoff = 0; + need_holdoff = 0; #endif /* UNUSED */ } else { - TIMEOUT(check_idle, (void*)pcb, tlim); + TIMEOUT(check_idle, (void*)pcb, tlim); } } #endif /* PPP_IDLETIMELIMIT */ @@ -1358,7 +1358,7 @@ static void connect_time_expired(void *arg) { ppp_pcb *pcb = (ppp_pcb*)arg; ppp_info("Connect time expired"); pcb->err_code = PPPERR_CONNECTTIME; - lcp_close(pcb, "Connect time expired"); /* Close connection */ + lcp_close(pcb, "Connect time expired"); /* Close connection */ } #endif /* PPP_MAXCONNECT */ @@ -1375,62 +1375,62 @@ auth_check_options() /* Default our_name to hostname, and user to our_name */ if (our_name[0] == 0 || usehostname) - strlcpy(our_name, hostname, sizeof(our_name)); + strlcpy(our_name, hostname, sizeof(our_name)); /* If a blank username was explicitly given as an option, trust the user and don't use our_name */ if (ppp_settings.user[0] == 0 && !explicit_user) - strlcpy(ppp_settings.user, our_name, sizeof(ppp_settings.user)); + strlcpy(ppp_settings.user, our_name, sizeof(ppp_settings.user)); /* * If we have a default route, require the peer to authenticate * unless the noauth option was given or the real user is root. */ if (!auth_required && !allow_any_ip && have_route_to(0) && !privileged) { - auth_required = 1; - default_auth = 1; + auth_required = 1; + default_auth = 1; } #if CHAP_SUPPORT /* If we selected any CHAP flavors, we should probably negotiate it. :-) */ if (wo->chap_mdtype) - wo->neg_chap = 1; + wo->neg_chap = 1; #endif /* CHAP_SUPPORT */ /* If authentication is required, ask peer for CHAP, PAP, or EAP. */ if (auth_required) { - allow_any_ip = 0; - if (1 + allow_any_ip = 0; + if (1 #if CHAP_SUPPORT - && !wo->neg_chap + && !wo->neg_chap #endif /* CHAP_SUPPORT */ #if PAP_SUPPORT - && !wo->neg_upap + && !wo->neg_upap #endif /* PAP_SUPPORT */ #if EAP_SUPPORT - && !wo->neg_eap + && !wo->neg_eap #endif /* EAP_SUPPORT */ - ) { + ) { #if CHAP_SUPPORT - wo->neg_chap = CHAP_MDTYPE_SUPPORTED != MDTYPE_NONE; - wo->chap_mdtype = CHAP_MDTYPE_SUPPORTED; + wo->neg_chap = CHAP_MDTYPE_SUPPORTED != MDTYPE_NONE; + wo->chap_mdtype = CHAP_MDTYPE_SUPPORTED; #endif /* CHAP_SUPPORT */ #if PAP_SUPPORT - wo->neg_upap = 1; + wo->neg_upap = 1; #endif /* PAP_SUPPORT */ #if EAP_SUPPORT - wo->neg_eap = 1; + wo->neg_eap = 1; #endif /* EAP_SUPPORT */ - } + } } else { #if CHAP_SUPPORT - wo->neg_chap = 0; - wo->chap_mdtype = MDTYPE_NONE; + wo->neg_chap = 0; + wo->chap_mdtype = MDTYPE_NONE; #endif /* CHAP_SUPPORT */ #if PAP_SUPPORT - wo->neg_upap = 0; + wo->neg_upap = 0; #endif /* PAP_SUPPORT */ #if EAP_SUPPORT - wo->neg_eap = 0; + wo->neg_eap = 0; #endif /* EAP_SUPPORT */ } @@ -1447,56 +1447,56 @@ auth_check_options() #endif /* PAP_SUPPORT */ if (!can_auth && (0 #if CHAP_SUPPORT - || wo->neg_chap + || wo->neg_chap #endif /* CHAP_SUPPORT */ #if EAP_SUPPORT - || wo->neg_eap + || wo->neg_eap #endif /* EAP_SUPPORT */ - )) { + )) { #if CHAP_SUPPORT - can_auth = have_chap_secret((explicit_remote? remote_name: NULL), - our_name, 1, &lacks_ip); + can_auth = have_chap_secret((explicit_remote? remote_name: NULL), + our_name, 1, &lacks_ip); #else - can_auth = 0; + can_auth = 0; #endif } if (!can_auth #if EAP_SUPPORT - && wo->neg_eap + && wo->neg_eap #endif /* EAP_SUPPORT */ - ) { - can_auth = have_srp_secret((explicit_remote? remote_name: NULL), - our_name, 1, &lacks_ip); + ) { + can_auth = have_srp_secret((explicit_remote? remote_name: NULL), + our_name, 1, &lacks_ip); } if (auth_required && !can_auth && noauth_addrs == NULL) { - if (default_auth) { - option_error( + if (default_auth) { + option_error( "By default the remote system is required to authenticate itself"); - option_error( + option_error( "(because this system has a default route to the internet)"); - } else if (explicit_remote) - option_error( + } else if (explicit_remote) + option_error( "The remote system (%s) is required to authenticate itself", - remote_name); - else - option_error( + remote_name); + else + option_error( "The remote system is required to authenticate itself"); - option_error( + option_error( "but I couldn't find any suitable secret (password) for it to use to do so."); - if (lacks_ip) - option_error( + if (lacks_ip) + option_error( "(None of the available passwords would let it use an IP address.)"); - exit(1); + exit(1); } /* * Early check for remote number authorization. */ if (!auth_number()) { - ppp_warn("calling number %q is not authorized", remote_number); - exit(EXIT_CNID_AUTH_FAILED); + ppp_warn("calling number %q is not authorized", remote_number); + exit(EXIT_CNID_AUTH_FAILED); } } #endif /* PPP_OPTIONS */ @@ -1518,30 +1518,30 @@ auth_reset(unit) hadchap = -1; ao->neg_upap = !refuse_pap && (passwd[0] != 0 || get_pap_passwd(NULL)); ao->neg_chap = (!refuse_chap || !refuse_mschap || !refuse_mschap_v2) - && (passwd[0] != 0 || - (hadchap = have_chap_secret(user, (explicit_remote? remote_name: - NULL), 0, NULL))); + && (passwd[0] != 0 || + (hadchap = have_chap_secret(user, (explicit_remote? remote_name: + NULL), 0, NULL))); ao->neg_eap = !refuse_eap && ( - passwd[0] != 0 || - (hadchap == 1 || (hadchap == -1 && have_chap_secret(user, - (explicit_remote? remote_name: NULL), 0, NULL))) || - have_srp_secret(user, (explicit_remote? remote_name: NULL), 0, NULL)); + passwd[0] != 0 || + (hadchap == 1 || (hadchap == -1 && have_chap_secret(user, + (explicit_remote? remote_name: NULL), 0, NULL))) || + have_srp_secret(user, (explicit_remote? remote_name: NULL), 0, NULL)); hadchap = -1; if (go->neg_upap && !uselogin && !have_pap_secret(NULL)) - go->neg_upap = 0; + go->neg_upap = 0; if (go->neg_chap) { - if (!(hadchap = have_chap_secret((explicit_remote? remote_name: NULL), - our_name, 1, NULL))) - go->neg_chap = 0; + if (!(hadchap = have_chap_secret((explicit_remote? remote_name: NULL), + our_name, 1, NULL))) + go->neg_chap = 0; } if (go->neg_eap && - (hadchap == 0 || (hadchap == -1 && - !have_chap_secret((explicit_remote? remote_name: NULL), our_name, - 1, NULL))) && - !have_srp_secret((explicit_remote? remote_name: NULL), our_name, 1, - NULL)) - go->neg_eap = 0; + (hadchap == 0 || (hadchap == -1 && + !have_chap_secret((explicit_remote? remote_name: NULL), our_name, + 1, NULL))) && + !have_srp_secret((explicit_remote? remote_name: NULL), our_name, 1, + NULL)) + go->neg_eap = 0; } /* @@ -1550,8 +1550,8 @@ auth_reset(unit) * and login the user if OK. * * returns: - * UPAP_AUTHNAK: Authentication failed. - * UPAP_AUTHACK: Authentication succeeded. + * UPAP_AUTHNAK: Authentication failed. + * UPAP_AUTHACK: Authentication succeeded. * In either case, msg points to an appropriate message. */ int @@ -1585,19 +1585,19 @@ check_passwd(unit, auser, userlen, apasswd, passwdlen, msg) * Check if a plugin wants to handle this. */ if (pap_auth_hook) { - ret = (*pap_auth_hook)(ppp_settings.user, ppp_settings.passwd, msg, &addrs, &opts); - if (ret >= 0) { - /* note: set_allowed_addrs() saves opts (but not addrs): - don't free it! */ - if (ret) - set_allowed_addrs(unit, addrs, opts); - else if (opts != 0) - free_wordlist(opts); - if (addrs != 0) - free_wordlist(addrs); - BZERO(ppp_settings.passwd, sizeof(ppp_settings.passwd)); - return ret? UPAP_AUTHACK: UPAP_AUTHNAK; - } + ret = (*pap_auth_hook)(ppp_settings.user, ppp_settings.passwd, msg, &addrs, &opts); + if (ret >= 0) { + /* note: set_allowed_addrs() saves opts (but not addrs): + don't free it! */ + if (ret) + set_allowed_addrs(unit, addrs, opts); + else if (opts != 0) + free_wordlist(opts); + if (addrs != 0) + free_wordlist(addrs); + BZERO(ppp_settings.passwd, sizeof(ppp_settings.passwd)); + return ret? UPAP_AUTHACK: UPAP_AUTHNAK; + } } /* @@ -1609,67 +1609,67 @@ check_passwd(unit, auser, userlen, apasswd, passwdlen, msg) ret = UPAP_AUTHNAK; f = fopen(filename, "r"); if (f == NULL) { - ppp_error("Can't open PAP password file %s: %m", filename); + ppp_error("Can't open PAP password file %s: %m", filename); } else { - check_access(f, filename); - if (scan_authfile(f, ppp_settings.user, our_name, secret, &addrs, &opts, filename, 0) < 0) { - ppp_warn("no PAP secret found for %s", user); - } else { - /* - * If the secret is "@login", it means to check - * the password against the login database. - */ - int login_secret = strcmp(secret, "@login") == 0; - ret = UPAP_AUTHACK; - if (uselogin || login_secret) { - /* login option or secret is @login */ - if (session_full(ppp_settings.user, ppp_settings.passwd, devnam, msg) == 0) { - ret = UPAP_AUTHNAK; - } - } else if (session_mgmt) { - if (session_check(ppp_settings.user, NULL, devnam, NULL) == 0) { - ppp_warn("Peer %q failed PAP Session verification", user); - ret = UPAP_AUTHNAK; - } - } - if (secret[0] != 0 && !login_secret) { - /* password given in pap-secrets - must match */ - if ((cryptpap || strcmp(ppp_settings.passwd, secret) != 0) - && strcmp(crypt(ppp_settings.passwd, secret), secret) != 0) - ret = UPAP_AUTHNAK; - } - } - fclose(f); + check_access(f, filename); + if (scan_authfile(f, ppp_settings.user, our_name, secret, &addrs, &opts, filename, 0) < 0) { + ppp_warn("no PAP secret found for %s", user); + } else { + /* + * If the secret is "@login", it means to check + * the password against the login database. + */ + int login_secret = strcmp(secret, "@login") == 0; + ret = UPAP_AUTHACK; + if (uselogin || login_secret) { + /* login option or secret is @login */ + if (session_full(ppp_settings.user, ppp_settings.passwd, devnam, msg) == 0) { + ret = UPAP_AUTHNAK; + } + } else if (session_mgmt) { + if (session_check(ppp_settings.user, NULL, devnam, NULL) == 0) { + ppp_warn("Peer %q failed PAP Session verification", user); + ret = UPAP_AUTHNAK; + } + } + if (secret[0] != 0 && !login_secret) { + /* password given in pap-secrets - must match */ + if ((cryptpap || strcmp(ppp_settings.passwd, secret) != 0) + && strcmp(crypt(ppp_settings.passwd, secret), secret) != 0) + ret = UPAP_AUTHNAK; + } + } + fclose(f); } if (ret == UPAP_AUTHNAK) { if (**msg == 0) - *msg = "Login incorrect"; - /* - * XXX can we ever get here more than once?? - * Frustrate passwd stealer programs. - * Allow 10 tries, but start backing off after 3 (stolen from login). - * On 10'th, drop the connection. - */ - if (attempts++ >= 10) { - ppp_warn("%d LOGIN FAILURES ON %s, %s", attempts, devnam, user); - lcp_close(pcb, "login failed"); - } - if (attempts > 3) - sleep((u_int) (attempts - 3) * 5); - if (opts != NULL) - free_wordlist(opts); + *msg = "Login incorrect"; + /* + * XXX can we ever get here more than once?? + * Frustrate passwd stealer programs. + * Allow 10 tries, but start backing off after 3 (stolen from login). + * On 10'th, drop the connection. + */ + if (attempts++ >= 10) { + ppp_warn("%d LOGIN FAILURES ON %s, %s", attempts, devnam, user); + lcp_close(pcb, "login failed"); + } + if (attempts > 3) + sleep((u_int) (attempts - 3) * 5); + if (opts != NULL) + free_wordlist(opts); } else { - attempts = 0; /* Reset count */ - if (**msg == 0) - *msg = "Login ok"; - set_allowed_addrs(unit, addrs, opts); + attempts = 0; /* Reset count */ + if (**msg == 0) + *msg = "Login ok"; + set_allowed_addrs(unit, addrs, opts); } if (addrs != NULL) - free_wordlist(addrs); + free_wordlist(addrs); BZERO(ppp_settings.passwd, sizeof(ppp_settings.passwd)); BZERO(secret, sizeof(secret)); @@ -1696,31 +1696,31 @@ null_login(unit) */ ret = -1; if (null_auth_hook) - ret = (*null_auth_hook)(&addrs, &opts); + ret = (*null_auth_hook)(&addrs, &opts); /* * Open the file of pap secrets and scan for a suitable secret. */ if (ret <= 0) { - filename = _PATH_UPAPFILE; - addrs = NULL; - f = fopen(filename, "r"); - if (f == NULL) - return 0; - check_access(f, filename); + filename = _PATH_UPAPFILE; + addrs = NULL; + f = fopen(filename, "r"); + if (f == NULL) + return 0; + check_access(f, filename); - i = scan_authfile(f, "", our_name, secret, &addrs, &opts, filename, 0); - ret = i >= 0 && secret[0] == 0; - BZERO(secret, sizeof(secret)); - fclose(f); + i = scan_authfile(f, "", our_name, secret, &addrs, &opts, filename, 0); + ret = i >= 0 && secret[0] == 0; + BZERO(secret, sizeof(secret)); + fclose(f); } if (ret) - set_allowed_addrs(unit, addrs, opts); + set_allowed_addrs(unit, addrs, opts); else if (opts != 0) - free_wordlist(opts); + free_wordlist(opts); if (addrs != 0) - free_wordlist(addrs); + free_wordlist(addrs); return ret; } @@ -1744,24 +1744,24 @@ get_pap_passwd(passwd) * Check whether a plugin wants to supply this. */ if (pap_passwd_hook) { - ret = (*pap_passwd_hook)(ppp_settings,user, ppp_settings.passwd); - if (ret >= 0) - return ret; + ret = (*pap_passwd_hook)(ppp_settings,user, ppp_settings.passwd); + if (ret >= 0) + return ret; } filename = _PATH_UPAPFILE; f = fopen(filename, "r"); if (f == NULL) - return 0; + return 0; check_access(f, filename); ret = scan_authfile(f, user, - (remote_name[0]? remote_name: NULL), - secret, NULL, NULL, filename, 0); + (remote_name[0]? remote_name: NULL), + secret, NULL, NULL, filename, 0); fclose(f); if (ret < 0) - return 0; + return 0; if (passwd != NULL) - strlcpy(passwd, secret, MAXSECRETLEN); + strlcpy(passwd, secret, MAXSECRETLEN); BZERO(secret, sizeof(secret)); return 1; } @@ -1781,26 +1781,26 @@ have_pap_secret(lacks_ipp) /* let the plugin decide, if there is one */ if (pap_check_hook) { - ret = (*pap_check_hook)(); - if (ret >= 0) - return ret; + ret = (*pap_check_hook)(); + if (ret >= 0) + return ret; } filename = _PATH_UPAPFILE; f = fopen(filename, "r"); if (f == NULL) - return 0; + return 0; ret = scan_authfile(f, (explicit_remote? remote_name: NULL), our_name, - NULL, &addrs, NULL, filename, 0); + NULL, &addrs, NULL, filename, 0); fclose(f); if (ret >= 0 && !some_ip_ok(addrs)) { - if (lacks_ipp != 0) - *lacks_ipp = 1; - ret = -1; + if (lacks_ipp != 0) + *lacks_ipp = 1; + ret = -1; } if (addrs != 0) - free_wordlist(addrs); + free_wordlist(addrs); return ret >= 0; } @@ -1824,31 +1824,31 @@ have_chap_secret(client, server, need_ip, lacks_ipp) struct wordlist *addrs; if (chap_check_hook) { - ret = (*chap_check_hook)(); - if (ret >= 0) { - return ret; - } + ret = (*chap_check_hook)(); + if (ret >= 0) { + return ret; + } } filename = _PATH_CHAPFILE; f = fopen(filename, "r"); if (f == NULL) - return 0; + return 0; if (client != NULL && client[0] == 0) - client = NULL; + client = NULL; else if (server != NULL && server[0] == 0) - server = NULL; + server = NULL; ret = scan_authfile(f, client, server, NULL, &addrs, NULL, filename, 0); fclose(f); if (ret >= 0 && need_ip && !some_ip_ok(addrs)) { - if (lacks_ipp != 0) - *lacks_ipp = 1; - ret = -1; + if (lacks_ipp != 0) + *lacks_ipp = 1; + ret = -1; } if (addrs != 0) - free_wordlist(addrs); + free_wordlist(addrs); return ret >= 0; } @@ -1874,22 +1874,22 @@ have_srp_secret(client, server, need_ip, lacks_ipp) filename = _PATH_SRPFILE; f = fopen(filename, "r"); if (f == NULL) - return 0; + return 0; if (client != NULL && client[0] == 0) - client = NULL; + client = NULL; else if (server != NULL && server[0] == 0) - server = NULL; + server = NULL; ret = scan_authfile(f, client, server, NULL, &addrs, NULL, filename, 0); fclose(f); if (ret >= 0 && need_ip && !some_ip_ok(addrs)) { - if (lacks_ipp != 0) - *lacks_ipp = 1; - ret = -1; + if (lacks_ipp != 0) + *lacks_ipp = 1; + ret = -1; } if (addrs != 0) - free_wordlist(addrs); + free_wordlist(addrs); return ret >= 0; } @@ -1930,42 +1930,42 @@ int get_secret(ppp_pcb *pcb, const char *client, const char *server, char *secre addrs = NULL; if (!am_server && ppp_settings.passwd[0] != 0) { - strlcpy(secbuf, ppp_settings.passwd, sizeof(secbuf)); + strlcpy(secbuf, ppp_settings.passwd, sizeof(secbuf)); } else if (!am_server && chap_passwd_hook) { - if ( (*chap_passwd_hook)(client, secbuf) < 0) { - ppp_error("Unable to obtain CHAP password for %s on %s from plugin", - client, server); - return 0; - } + if ( (*chap_passwd_hook)(client, secbuf) < 0) { + ppp_error("Unable to obtain CHAP password for %s on %s from plugin", + client, server); + return 0; + } } else { - filename = _PATH_CHAPFILE; - addrs = NULL; - secbuf[0] = 0; + filename = _PATH_CHAPFILE; + addrs = NULL; + secbuf[0] = 0; - f = fopen(filename, "r"); - if (f == NULL) { - ppp_error("Can't open chap secret file %s: %m", filename); - return 0; - } - check_access(f, filename); + f = fopen(filename, "r"); + if (f == NULL) { + ppp_error("Can't open chap secret file %s: %m", filename); + return 0; + } + check_access(f, filename); - ret = scan_authfile(f, client, server, secbuf, &addrs, &opts, filename, 0); - fclose(f); - if (ret < 0) - return 0; + ret = scan_authfile(f, client, server, secbuf, &addrs, &opts, filename, 0); + fclose(f); + if (ret < 0) + return 0; - if (am_server) - set_allowed_addrs(unit, addrs, opts); - else if (opts != 0) - free_wordlist(opts); - if (addrs != 0) - free_wordlist(addrs); + if (am_server) + set_allowed_addrs(unit, addrs, opts); + else if (opts != 0) + free_wordlist(opts); + if (addrs != 0) + free_wordlist(addrs); } len = strlen(secbuf); if (len > MAXSECRETLEN) { - ppp_error("Secret for %s on %s is too long", client, server); - len = MAXSECRETLEN; + ppp_error("Secret for %s on %s is too long", client, server); + len = MAXSECRETLEN; } MEMCPY(secret, secbuf, len); BZERO(secbuf, sizeof(secbuf)); @@ -1997,31 +1997,31 @@ get_srp_secret(unit, client, server, secret, am_server) struct wordlist *addrs, *opts; if (!am_server && ppp_settings.passwd[0] != '\0') { - strlcpy(secret, ppp_settings.passwd, MAXWORDLEN); + strlcpy(secret, ppp_settings.passwd, MAXWORDLEN); } else { - filename = _PATH_SRPFILE; - addrs = NULL; + filename = _PATH_SRPFILE; + addrs = NULL; - fp = fopen(filename, "r"); - if (fp == NULL) { - ppp_error("Can't open srp secret file %s: %m", filename); - return 0; - } - check_access(fp, filename); + fp = fopen(filename, "r"); + if (fp == NULL) { + ppp_error("Can't open srp secret file %s: %m", filename); + return 0; + } + check_access(fp, filename); - secret[0] = '\0'; - ret = scan_authfile(fp, client, server, secret, &addrs, &opts, - filename, am_server); - fclose(fp); - if (ret < 0) - return 0; + secret[0] = '\0'; + ret = scan_authfile(fp, client, server, secret, &addrs, &opts, + filename, am_server); + fclose(fp); + if (ret < 0) + return 0; - if (am_server) - set_allowed_addrs(unit, addrs, opts); - else if (opts != NULL) - free_wordlist(opts); - if (addrs != NULL) - free_wordlist(addrs); + if (am_server) + set_allowed_addrs(unit, addrs, opts); + else if (opts != NULL) + free_wordlist(opts); + if (addrs != NULL) + free_wordlist(addrs); } return 1; @@ -2049,10 +2049,10 @@ set_allowed_addrs(unit, addrs, opts) u32_t suggested_ip = 0; if (addresses[unit] != NULL) - free(addresses[unit]); + free(addresses[unit]); addresses[unit] = NULL; if (extra_options != NULL) - free_wordlist(extra_options); + free_wordlist(extra_options); extra_options = opts; /* @@ -2060,109 +2060,109 @@ set_allowed_addrs(unit, addrs, opts) */ n = wordlist_count(addrs) + wordlist_count(noauth_addrs); if (n == 0) - return; + return; ip = (struct permitted_ip *) malloc((n + 1) * sizeof(struct permitted_ip)); if (ip == 0) - return; + return; /* temporarily append the noauth_addrs list to addrs */ for (plink = &addrs; *plink != NULL; plink = &(*plink)->next) - ; + ; *plink = noauth_addrs; n = 0; for (ap = addrs; ap != NULL; ap = ap->next) { - /* "-" means no addresses authorized, "*" means any address allowed */ - ptr_word = ap->word; - if (strcmp(ptr_word, "-") == 0) - break; - if (strcmp(ptr_word, "*") == 0) { - ip[n].permit = 1; - ip[n].base = ip[n].mask = 0; - ++n; - break; - } + /* "-" means no addresses authorized, "*" means any address allowed */ + ptr_word = ap->word; + if (strcmp(ptr_word, "-") == 0) + break; + if (strcmp(ptr_word, "*") == 0) { + ip[n].permit = 1; + ip[n].base = ip[n].mask = 0; + ++n; + break; + } - ip[n].permit = 1; - if (*ptr_word == '!') { - ip[n].permit = 0; - ++ptr_word; - } + ip[n].permit = 1; + if (*ptr_word == '!') { + ip[n].permit = 0; + ++ptr_word; + } - mask = ~ (u32_t) 0; - offset = 0; - ptr_mask = strchr (ptr_word, '/'); - if (ptr_mask != NULL) { - int bit_count; - char *endp; + mask = ~ (u32_t) 0; + offset = 0; + ptr_mask = strchr (ptr_word, '/'); + if (ptr_mask != NULL) { + int bit_count; + char *endp; - bit_count = (int) strtol (ptr_mask+1, &endp, 10); - if (bit_count <= 0 || bit_count > 32) { - ppp_warn("invalid address length %v in auth. address list", - ptr_mask+1); - continue; - } - bit_count = 32 - bit_count; /* # bits in host part */ - if (*endp == '+') { - offset = ifunit + 1; - ++endp; - } - if (*endp != 0) { - ppp_warn("invalid address length syntax: %v", ptr_mask+1); - continue; - } - *ptr_mask = '\0'; - mask <<= bit_count; - } + bit_count = (int) strtol (ptr_mask+1, &endp, 10); + if (bit_count <= 0 || bit_count > 32) { + ppp_warn("invalid address length %v in auth. address list", + ptr_mask+1); + continue; + } + bit_count = 32 - bit_count; /* # bits in host part */ + if (*endp == '+') { + offset = ifunit + 1; + ++endp; + } + if (*endp != 0) { + ppp_warn("invalid address length syntax: %v", ptr_mask+1); + continue; + } + *ptr_mask = '\0'; + mask <<= bit_count; + } - hp = gethostbyname(ptr_word); - if (hp != NULL && hp->h_addrtype == AF_INET) { - a = *(u32_t *)hp->h_addr; - } else { - np = getnetbyname (ptr_word); - if (np != NULL && np->n_addrtype == AF_INET) { - a = lwip_htonl ((u32_t)np->n_net); - if (ptr_mask == NULL) { - /* calculate appropriate mask for net */ - ah = lwip_ntohl(a); - if (IN_CLASSA(ah)) - mask = IN_CLASSA_NET; - else if (IN_CLASSB(ah)) - mask = IN_CLASSB_NET; - else if (IN_CLASSC(ah)) - mask = IN_CLASSC_NET; - } - } else { - a = inet_addr (ptr_word); - } - } + hp = gethostbyname(ptr_word); + if (hp != NULL && hp->h_addrtype == AF_INET) { + a = *(u32_t *)hp->h_addr; + } else { + np = getnetbyname (ptr_word); + if (np != NULL && np->n_addrtype == AF_INET) { + a = lwip_htonl ((u32_t)np->n_net); + if (ptr_mask == NULL) { + /* calculate appropriate mask for net */ + ah = lwip_ntohl(a); + if (IN_CLASSA(ah)) + mask = IN_CLASSA_NET; + else if (IN_CLASSB(ah)) + mask = IN_CLASSB_NET; + else if (IN_CLASSC(ah)) + mask = IN_CLASSC_NET; + } + } else { + a = inet_addr (ptr_word); + } + } - if (ptr_mask != NULL) - *ptr_mask = '/'; + if (ptr_mask != NULL) + *ptr_mask = '/'; - if (a == (u32_t)-1L) { - ppp_warn("unknown host %s in auth. address list", ap->word); - continue; - } - if (offset != 0) { - if (offset >= ~mask) { - ppp_warn("interface unit %d too large for subnet %v", - ifunit, ptr_word); - continue; - } - a = lwip_htonl((lwip_ntohl(a) & mask) + offset); - mask = ~(u32_t)0; - } - ip[n].mask = lwip_htonl(mask); - ip[n].base = a & ip[n].mask; - ++n; - if (~mask == 0 && suggested_ip == 0) - suggested_ip = a; + if (a == (u32_t)-1L) { + ppp_warn("unknown host %s in auth. address list", ap->word); + continue; + } + if (offset != 0) { + if (offset >= ~mask) { + ppp_warn("interface unit %d too large for subnet %v", + ifunit, ptr_word); + continue; + } + a = lwip_htonl((lwip_ntohl(a) & mask) + offset); + mask = ~(u32_t)0; + } + ip[n].mask = lwip_htonl(mask); + ip[n].base = a & ip[n].mask; + ++n; + if (~mask == 0 && suggested_ip == 0) + suggested_ip = a; } *plink = NULL; - ip[n].permit = 0; /* make the last entry forbid all addresses */ - ip[n].base = 0; /* to terminate the list */ + ip[n].permit = 0; /* make the last entry forbid all addresses */ + ip[n].base = 0; /* to terminate the list */ ip[n].mask = 0; addresses[unit] = ip; @@ -2173,14 +2173,14 @@ set_allowed_addrs(unit, addrs, opts) * which is a single host, then use that if we find one. */ if (suggested_ip != 0 - && (wo->hisaddr == 0 || !auth_ip_addr(unit, wo->hisaddr))) { - wo->hisaddr = suggested_ip; - /* - * Do we insist on this address? No, if there are other - * addresses authorized than the suggested one. - */ - if (n > 1) - wo->accept_remote = 1; + && (wo->hisaddr == 0 || !auth_ip_addr(unit, wo->hisaddr))) { + wo->hisaddr = suggested_ip; + /* + * Do we insist on this address? No, if there are other + * addresses authorized than the suggested one. + */ + if (n > 1) + wo->accept_remote = 1; } } @@ -2197,21 +2197,21 @@ auth_ip_addr(unit, addr) /* don't allow loopback or multicast address */ if (bad_ip_adrs(addr)) - return 0; + return 0; if (allowed_address_hook) { - ok = allowed_address_hook(addr); - if (ok >= 0) return ok; + ok = allowed_address_hook(addr); + if (ok >= 0) return ok; } if (addresses[unit] != NULL) { - ok = ip_addr_check(addr, addresses[unit]); - if (ok >= 0) - return ok; + ok = ip_addr_check(addr, addresses[unit]); + if (ok >= 0) + return ok; } if (auth_required) - return 0; /* no addresses authorized */ + return 0; /* no addresses authorized */ return allow_any_ip || privileged || !have_route_to(addr); } @@ -2221,8 +2221,8 @@ ip_addr_check(addr, addrs) struct permitted_ip *addrs; { for (; ; ++addrs) - if ((addr & addrs->mask) == addrs->base) - return addrs->permit; + if ((addr & addrs->mask) == addrs->base) + return addrs->permit; } /* @@ -2236,7 +2236,7 @@ bad_ip_adrs(addr) { addr = lwip_ntohl(addr); return (addr >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET - || IN_MULTICAST(addr) || IN_BADCLASS(addr); + || IN_MULTICAST(addr) || IN_BADCLASS(addr); } /* @@ -2248,10 +2248,10 @@ some_ip_ok(addrs) struct wordlist *addrs; { for (; addrs != 0; addrs = addrs->next) { - if (addrs->word[0] == '-') - break; - if (addrs->word[0] != '!') - return 1; /* some IP address is allowed */ + if (addrs->word[0] == '-') + break; + if (addrs->word[0] != '!') + return 1; /* some IP address is allowed */ } return 0; } @@ -2268,17 +2268,17 @@ auth_number() /* Allow all if no authorization list. */ if (!wp) - return 1; + return 1; /* Allow if we have a match in the authorization list. */ while (wp) { - /* trailing '*' wildcard */ - l = strlen(wp->word); - if ((wp->word)[l - 1] == '*') - l--; - if (!strncasecmp(wp->word, remote_number, l)) - return 1; - wp = wp->next; + /* trailing '*' wildcard */ + l = strlen(wp->word); + if ((wp->word)[l - 1] == '*') + l--; + if (!strncasecmp(wp->word, remote_number, l)) + return 1; + wp = wp->next; } return 0; @@ -2295,10 +2295,10 @@ check_access(f, filename) struct stat sbuf; if (fstat(fileno(f), &sbuf) < 0) { - ppp_warn("cannot stat secret file %s: %m", filename); + ppp_warn("cannot stat secret file %s: %m", filename); } else if ((sbuf.st_mode & (S_IRWXG | S_IRWXO)) != 0) { - ppp_warn("Warning - secret file %s has world and/or group access", - filename); + ppp_warn("Warning - secret file %s has world and/or group access", + filename); } } @@ -2337,141 +2337,141 @@ scan_authfile(f, client, server, secret, addrs, opts, filename, flags) char *cp; if (addrs != NULL) - *addrs = NULL; + *addrs = NULL; if (opts != NULL) - *opts = NULL; + *opts = NULL; addr_list = NULL; if (!getword(f, word, &newline, filename)) - return -1; /* file is empty??? */ + return -1; /* file is empty??? */ newline = 1; best_flag = -1; for (;;) { - /* - * Skip until we find a word at the start of a line. - */ - while (!newline && getword(f, word, &newline, filename)) - ; - if (!newline) - break; /* got to end of file */ + /* + * Skip until we find a word at the start of a line. + */ + while (!newline && getword(f, word, &newline, filename)) + ; + if (!newline) + break; /* got to end of file */ - /* - * Got a client - check if it's a match or a wildcard. - */ - got_flag = 0; - if (client != NULL && strcmp(word, client) != 0 && !ISWILD(word)) { - newline = 0; - continue; - } - if (!ISWILD(word)) - got_flag = NONWILD_CLIENT; + /* + * Got a client - check if it's a match or a wildcard. + */ + got_flag = 0; + if (client != NULL && strcmp(word, client) != 0 && !ISWILD(word)) { + newline = 0; + continue; + } + if (!ISWILD(word)) + got_flag = NONWILD_CLIENT; - /* - * Now get a server and check if it matches. - */ - if (!getword(f, word, &newline, filename)) - break; - if (newline) - continue; - if (!ISWILD(word)) { - if (server != NULL && strcmp(word, server) != 0) - continue; - got_flag |= NONWILD_SERVER; - } + /* + * Now get a server and check if it matches. + */ + if (!getword(f, word, &newline, filename)) + break; + if (newline) + continue; + if (!ISWILD(word)) { + if (server != NULL && strcmp(word, server) != 0) + continue; + got_flag |= NONWILD_SERVER; + } - /* - * Got some sort of a match - see if it's better than what - * we have already. - */ - if (got_flag <= best_flag) - continue; + /* + * Got some sort of a match - see if it's better than what + * we have already. + */ + if (got_flag <= best_flag) + continue; - /* - * Get the secret. - */ - if (!getword(f, word, &newline, filename)) - break; - if (newline) - continue; + /* + * Get the secret. + */ + if (!getword(f, word, &newline, filename)) + break; + if (newline) + continue; - /* - * SRP-SHA1 authenticator should never be reading secrets from - * a file. (Authenticatee may, though.) - */ - if (flags && ((cp = strchr(word, ':')) == NULL || - strchr(cp + 1, ':') == NULL)) - continue; + /* + * SRP-SHA1 authenticator should never be reading secrets from + * a file. (Authenticatee may, though.) + */ + if (flags && ((cp = strchr(word, ':')) == NULL || + strchr(cp + 1, ':') == NULL)) + continue; - if (secret != NULL) { - /* - * Special syntax: @/pathname means read secret from file. - */ - if (word[0] == '@' && word[1] == '/') { - strlcpy(atfile, word+1, sizeof(atfile)); - if ((sf = fopen(atfile, "r")) == NULL) { - ppp_warn("can't open indirect secret file %s", atfile); - continue; - } - check_access(sf, atfile); - if (!getword(sf, word, &xxx, atfile)) { - ppp_warn("no secret in indirect secret file %s", atfile); - fclose(sf); - continue; - } - fclose(sf); - } - strlcpy(lsecret, word, sizeof(lsecret)); - } + if (secret != NULL) { + /* + * Special syntax: @/pathname means read secret from file. + */ + if (word[0] == '@' && word[1] == '/') { + strlcpy(atfile, word+1, sizeof(atfile)); + if ((sf = fopen(atfile, "r")) == NULL) { + ppp_warn("can't open indirect secret file %s", atfile); + continue; + } + check_access(sf, atfile); + if (!getword(sf, word, &xxx, atfile)) { + ppp_warn("no secret in indirect secret file %s", atfile); + fclose(sf); + continue; + } + fclose(sf); + } + strlcpy(lsecret, word, sizeof(lsecret)); + } - /* - * Now read address authorization info and make a wordlist. - */ - app = &alist; - for (;;) { - if (!getword(f, word, &newline, filename) || newline) - break; - ap = (struct wordlist *) - malloc(sizeof(struct wordlist) + strlen(word) + 1); - if (ap == NULL) - novm("authorized addresses"); - ap->word = (char *) (ap + 1); - strcpy(ap->word, word); - *app = ap; - app = &ap->next; - } - *app = NULL; + /* + * Now read address authorization info and make a wordlist. + */ + app = &alist; + for (;;) { + if (!getword(f, word, &newline, filename) || newline) + break; + ap = (struct wordlist *) + malloc(sizeof(struct wordlist) + strlen(word) + 1); + if (ap == NULL) + novm("authorized addresses"); + ap->word = (char *) (ap + 1); + strcpy(ap->word, word); + *app = ap; + app = &ap->next; + } + *app = NULL; - /* - * This is the best so far; remember it. - */ - best_flag = got_flag; - if (addr_list) - free_wordlist(addr_list); - addr_list = alist; - if (secret != NULL) - strlcpy(secret, lsecret, MAXWORDLEN); + /* + * This is the best so far; remember it. + */ + best_flag = got_flag; + if (addr_list) + free_wordlist(addr_list); + addr_list = alist; + if (secret != NULL) + strlcpy(secret, lsecret, MAXWORDLEN); - if (!newline) - break; + if (!newline) + break; } /* scan for a -- word indicating the start of options */ for (app = &addr_list; (ap = *app) != NULL; app = &ap->next) - if (strcmp(ap->word, "--") == 0) - break; + if (strcmp(ap->word, "--") == 0) + break; /* ap = start of options */ if (ap != NULL) { - ap = ap->next; /* first option */ - free(*app); /* free the "--" word */ - *app = NULL; /* terminate addr list */ + ap = ap->next; /* first option */ + free(*app); /* free the "--" word */ + *app = NULL; /* terminate addr list */ } if (opts != NULL) - *opts = ap; + *opts = ap; else if (ap != NULL) - free_wordlist(ap); + free_wordlist(ap); if (addrs != NULL) - *addrs = addr_list; + *addrs = addr_list; else if (addr_list != NULL) - free_wordlist(addr_list); + free_wordlist(addr_list); return best_flag; } @@ -2486,7 +2486,7 @@ wordlist_count(wp) int n; for (n = 0; wp != NULL; wp = wp->next) - ++n; + ++n; return n; } @@ -2500,9 +2500,9 @@ free_wordlist(wp) struct wordlist *next; while (wp != NULL) { - next = wp->next; - free(wp); - wp = next; + next = wp->next; + free(wp); + wp = next; } } #endif /* UNUSED */ diff --git a/Libraries/LwIP/src/netif/ppp/ccp.c b/Libraries/LwIP/src/netif/ppp/ccp.c index 58c62a9..b354a3f 100755 --- a/Libraries/LwIP/src/netif/ppp/ccp.c +++ b/Libraries/LwIP/src/netif/ppp/ccp.c @@ -40,8 +40,8 @@ #include "netif/ppp/ccp.h" #if MPPE_SUPPORT -#include "netif/ppp/lcp.h" /* lcp_close(), lcp_fsm */ -#include "netif/ppp/mppe.h" /* mppe_init() */ +#include "netif/ppp/lcp.h" /* lcp_close(), lcp_fsm */ +#include "netif/ppp/mppe.h" /* mppe_init() */ #endif /* MPPE_SUPPORT */ /* @@ -51,7 +51,7 @@ * Until this is fixed we only accept sizes in the range 9 .. 15. * Thanks to James Carlson for pointing this out. */ -#define DEFLATE_MIN_WORKS 9 +#define DEFLATE_MIN_WORKS 9 /* * Command-line options. @@ -66,7 +66,7 @@ static char deflate_value[8]; * Option variables. */ #if MPPE_SUPPORT -bool refuse_mppe_stateful = 1; /* Allow stateful mode? */ +bool refuse_mppe_stateful = 1; /* Allow stateful mode? */ #endif /* MPPE_SUPPORT */ static option_t ccp_option_list[] = { @@ -248,27 +248,27 @@ static const fsm_callbacks ccp_callbacks = { static int ccp_anycompress(ccp_options *opt) { return (0 #if DEFLATE_SUPPORT - || (opt)->deflate + || (opt)->deflate #endif /* DEFLATE_SUPPORT */ #if BSDCOMPRESS_SUPPORT - || (opt)->bsd_compress + || (opt)->bsd_compress #endif /* BSDCOMPRESS_SUPPORT */ #if PREDICTOR_SUPPORT - || (opt)->predictor_1 || (opt)->predictor_2 + || (opt)->predictor_1 || (opt)->predictor_2 #endif /* PREDICTOR_SUPPORT */ #if MPPE_SUPPORT - || (opt)->mppe + || (opt)->mppe #endif /* MPPE_SUPPORT */ - ); + ); } /* * Local state (mainly for handling reset-reqs and reset-acks). */ -#define RACK_PENDING 1 /* waiting for reset-ack */ -#define RREQ_REPEAT 2 /* send another reset-req if no reset-ack */ +#define RACK_PENDING 1 /* waiting for reset-ack */ +#define RREQ_REPEAT 2 /* send another reset-req if no reset-ack */ -#define RACKTIMEOUT 1 /* second */ +#define RACKTIMEOUT 1 /* second */ #if PPP_OPTIONS /* @@ -284,31 +284,31 @@ setbsdcomp(argv) str = *argv; abits = rbits = strtol(str, &endp, 0); if (endp != str && *endp == ',') { - str = endp + 1; - abits = strtol(str, &endp, 0); + str = endp + 1; + abits = strtol(str, &endp, 0); } if (*endp != 0 || endp == str) { - option_error("invalid parameter '%s' for bsdcomp option", *argv); - return 0; + option_error("invalid parameter '%s' for bsdcomp option", *argv); + return 0; } if ((rbits != 0 && (rbits < BSD_MIN_BITS || rbits > BSD_MAX_BITS)) - || (abits != 0 && (abits < BSD_MIN_BITS || abits > BSD_MAX_BITS))) { - option_error("bsdcomp option values must be 0 or %d .. %d", - BSD_MIN_BITS, BSD_MAX_BITS); - return 0; + || (abits != 0 && (abits < BSD_MIN_BITS || abits > BSD_MAX_BITS))) { + option_error("bsdcomp option values must be 0 or %d .. %d", + BSD_MIN_BITS, BSD_MAX_BITS); + return 0; } if (rbits > 0) { - ccp_wantoptions[0].bsd_compress = 1; - ccp_wantoptions[0].bsd_bits = rbits; + ccp_wantoptions[0].bsd_compress = 1; + ccp_wantoptions[0].bsd_bits = rbits; } else - ccp_wantoptions[0].bsd_compress = 0; + ccp_wantoptions[0].bsd_compress = 0; if (abits > 0) { - ccp_allowoptions[0].bsd_compress = 1; - ccp_allowoptions[0].bsd_bits = abits; + ccp_allowoptions[0].bsd_compress = 1; + ccp_allowoptions[0].bsd_bits = abits; } else - ccp_allowoptions[0].bsd_compress = 0; + ccp_allowoptions[0].bsd_compress = 0; ppp_slprintf(bsd_value, sizeof(bsd_value), - rbits == abits? "%d": "%d,%d", rbits, abits); + rbits == abits? "%d": "%d,%d", rbits, abits); return 1; } @@ -323,40 +323,40 @@ setdeflate(argv) str = *argv; abits = rbits = strtol(str, &endp, 0); if (endp != str && *endp == ',') { - str = endp + 1; - abits = strtol(str, &endp, 0); + str = endp + 1; + abits = strtol(str, &endp, 0); } if (*endp != 0 || endp == str) { - option_error("invalid parameter '%s' for deflate option", *argv); - return 0; + option_error("invalid parameter '%s' for deflate option", *argv); + return 0; } if ((rbits != 0 && (rbits < DEFLATE_MIN_SIZE || rbits > DEFLATE_MAX_SIZE)) - || (abits != 0 && (abits < DEFLATE_MIN_SIZE - || abits > DEFLATE_MAX_SIZE))) { - option_error("deflate option values must be 0 or %d .. %d", - DEFLATE_MIN_SIZE, DEFLATE_MAX_SIZE); - return 0; + || (abits != 0 && (abits < DEFLATE_MIN_SIZE + || abits > DEFLATE_MAX_SIZE))) { + option_error("deflate option values must be 0 or %d .. %d", + DEFLATE_MIN_SIZE, DEFLATE_MAX_SIZE); + return 0; } if (rbits == DEFLATE_MIN_SIZE || abits == DEFLATE_MIN_SIZE) { - if (rbits == DEFLATE_MIN_SIZE) - rbits = DEFLATE_MIN_WORKS; - if (abits == DEFLATE_MIN_SIZE) - abits = DEFLATE_MIN_WORKS; - warn("deflate option value of %d changed to %d to avoid zlib bug", - DEFLATE_MIN_SIZE, DEFLATE_MIN_WORKS); + if (rbits == DEFLATE_MIN_SIZE) + rbits = DEFLATE_MIN_WORKS; + if (abits == DEFLATE_MIN_SIZE) + abits = DEFLATE_MIN_WORKS; + warn("deflate option value of %d changed to %d to avoid zlib bug", + DEFLATE_MIN_SIZE, DEFLATE_MIN_WORKS); } if (rbits > 0) { - ccp_wantoptions[0].deflate = 1; - ccp_wantoptions[0].deflate_size = rbits; + ccp_wantoptions[0].deflate = 1; + ccp_wantoptions[0].deflate_size = rbits; } else - ccp_wantoptions[0].deflate = 0; + ccp_wantoptions[0].deflate = 0; if (abits > 0) { - ccp_allowoptions[0].deflate = 1; - ccp_allowoptions[0].deflate_size = abits; + ccp_allowoptions[0].deflate = 1; + ccp_allowoptions[0].deflate_size = abits; } else - ccp_allowoptions[0].deflate = 0; + ccp_allowoptions[0].deflate = 0; ppp_slprintf(deflate_value, sizeof(deflate_value), - rbits == abits? "%d": "%d,%d", rbits, abits); + rbits == abits? "%d": "%d,%d", rbits, abits); return 1; } @@ -411,7 +411,7 @@ static void ccp_open(ppp_pcb *pcb) { ccp_options *go = &pcb->ccp_gotoptions; if (f->state != PPP_FSM_OPENED) - ccp_set(pcb, 1, 0, 0, 0); + ccp_set(pcb, 1, 0, 0, 0); /* * Find out which compressors the kernel supports before @@ -419,7 +419,7 @@ static void ccp_open(ppp_pcb *pcb) { */ ccp_resetci(f); if (!ccp_anycompress(go)) - f->flags |= OPT_SILENT; + f->flags |= OPT_SILENT; fsm_open(f); } @@ -463,12 +463,12 @@ static void ccp_input(ppp_pcb *pcb, u_char *p, int len) { oldstate = f->state; fsm_input(f, p, len); if (oldstate == PPP_FSM_OPENED && p[0] == TERMREQ && f->state != PPP_FSM_OPENED) { - ppp_notice("Compression disabled by peer."); + ppp_notice("Compression disabled by peer."); #if MPPE_SUPPORT - if (go->mppe) { - ppp_error("MPPE disabled, closing LCP"); - lcp_close(pcb, "MPPE disabled by peer"); - } + if (go->mppe) { + ppp_error("MPPE disabled, closing LCP"); + lcp_close(pcb, "MPPE disabled by peer"); + } #endif /* MPPE_SUPPORT */ } @@ -477,8 +477,8 @@ static void ccp_input(ppp_pcb *pcb, u_char *p, int len) { * close CCP. */ if (oldstate == PPP_FSM_REQSENT && p[0] == TERMACK - && !ccp_anycompress(go)) - ccp_close(pcb, "No compression negotiated"); + && !ccp_anycompress(go)) + ccp_close(pcb, "No compression negotiated"); } /* @@ -491,24 +491,24 @@ static int ccp_extcode(fsm *f, int code, int id, u_char *p, int len) { switch (code) { case CCP_RESETREQ: - if (f->state != PPP_FSM_OPENED) - break; - ccp_reset_comp(pcb); - /* send a reset-ack, which the transmitter will see and - reset its compression state. */ - fsm_sdata(f, CCP_RESETACK, id, NULL, 0); - break; + if (f->state != PPP_FSM_OPENED) + break; + ccp_reset_comp(pcb); + /* send a reset-ack, which the transmitter will see and + reset its compression state. */ + fsm_sdata(f, CCP_RESETACK, id, NULL, 0); + break; case CCP_RESETACK: - if ((pcb->ccp_localstate & RACK_PENDING) && id == f->reqid) { - pcb->ccp_localstate &= ~(RACK_PENDING | RREQ_REPEAT); - UNTIMEOUT(ccp_rack_timeout, f); - ccp_reset_decomp(pcb); - } - break; + if ((pcb->ccp_localstate & RACK_PENDING) && id == f->reqid) { + pcb->ccp_localstate &= ~(RACK_PENDING | RREQ_REPEAT); + UNTIMEOUT(ccp_rack_timeout, f); + ccp_reset_decomp(pcb); + } + break; default: - return 0; + return 0; } return 1; @@ -528,8 +528,8 @@ static void ccp_protrej(ppp_pcb *pcb) { #if MPPE_SUPPORT if (go->mppe) { - ppp_error("MPPE required but peer negotiation failed"); - lcp_close(pcb, "MPPE required but peer negotiation failed"); + ppp_error("MPPE required but peer negotiation failed"); + lcp_close(pcb, "MPPE required but peer negotiation failed"); } #endif /* MPPE_SUPPORT */ @@ -554,9 +554,9 @@ static void ccp_resetci(fsm *f) { #if MPPE_SUPPORT if (pcb->settings.require_mppe) { - wo->mppe = ao->mppe = - (pcb->settings.refuse_mppe_40 ? 0 : MPPE_OPT_40) - | (pcb->settings.refuse_mppe_128 ? 0 : MPPE_OPT_128); + wo->mppe = ao->mppe = + (pcb->settings.refuse_mppe_40 ? 0 : MPPE_OPT_40) + | (pcb->settings.refuse_mppe_128 ? 0 : MPPE_OPT_128); } #endif /* MPPE_SUPPORT */ @@ -565,78 +565,78 @@ static void ccp_resetci(fsm *f) { #if MPPE_SUPPORT if (go->mppe) { - int auth_mschap_bits = pcb->auth_done; - int numbits; + int auth_mschap_bits = pcb->auth_done; + int numbits; - /* - * Start with a basic sanity check: mschap[v2] auth must be in - * exactly one direction. RFC 3079 says that the keys are - * 'derived from the credentials of the peer that initiated the call', - * however the PPP protocol doesn't have such a concept, and pppd - * cannot get this info externally. Instead we do the best we can. - * NB: If MPPE is required, all other compression opts are invalid. - * So, we return right away if we can't do it. - */ + /* + * Start with a basic sanity check: mschap[v2] auth must be in + * exactly one direction. RFC 3079 says that the keys are + * 'derived from the credentials of the peer that initiated the call', + * however the PPP protocol doesn't have such a concept, and pppd + * cannot get this info externally. Instead we do the best we can. + * NB: If MPPE is required, all other compression opts are invalid. + * So, we return right away if we can't do it. + */ - /* Leave only the mschap auth bits set */ - auth_mschap_bits &= (CHAP_MS_WITHPEER | CHAP_MS_PEER | - CHAP_MS2_WITHPEER | CHAP_MS2_PEER); - /* Count the mschap auths */ - auth_mschap_bits >>= CHAP_MS_SHIFT; - numbits = 0; - do { - numbits += auth_mschap_bits & 1; - auth_mschap_bits >>= 1; - } while (auth_mschap_bits); - if (numbits > 1) { - ppp_error("MPPE required, but auth done in both directions."); - lcp_close(pcb, "MPPE required but not available"); - return; - } - if (!numbits) { - ppp_error("MPPE required, but MS-CHAP[v2] auth not performed."); - lcp_close(pcb, "MPPE required but not available"); - return; - } + /* Leave only the mschap auth bits set */ + auth_mschap_bits &= (CHAP_MS_WITHPEER | CHAP_MS_PEER | + CHAP_MS2_WITHPEER | CHAP_MS2_PEER); + /* Count the mschap auths */ + auth_mschap_bits >>= CHAP_MS_SHIFT; + numbits = 0; + do { + numbits += auth_mschap_bits & 1; + auth_mschap_bits >>= 1; + } while (auth_mschap_bits); + if (numbits > 1) { + ppp_error("MPPE required, but auth done in both directions."); + lcp_close(pcb, "MPPE required but not available"); + return; + } + if (!numbits) { + ppp_error("MPPE required, but MS-CHAP[v2] auth not performed."); + lcp_close(pcb, "MPPE required but not available"); + return; + } - /* A plugin (eg radius) may not have obtained key material. */ - if (!pcb->mppe_keys_set) { - ppp_error("MPPE required, but keys are not available. " - "Possible plugin problem?"); - lcp_close(pcb, "MPPE required but not available"); - return; - } + /* A plugin (eg radius) may not have obtained key material. */ + if (!pcb->mppe_keys_set) { + ppp_error("MPPE required, but keys are not available. " + "Possible plugin problem?"); + lcp_close(pcb, "MPPE required but not available"); + return; + } - /* LM auth not supported for MPPE */ - if (pcb->auth_done & (CHAP_MS_WITHPEER | CHAP_MS_PEER)) { - /* This might be noise */ - if (go->mppe & MPPE_OPT_40) { - ppp_notice("Disabling 40-bit MPPE; MS-CHAP LM not supported"); - go->mppe &= ~MPPE_OPT_40; - wo->mppe &= ~MPPE_OPT_40; - } - } + /* LM auth not supported for MPPE */ + if (pcb->auth_done & (CHAP_MS_WITHPEER | CHAP_MS_PEER)) { + /* This might be noise */ + if (go->mppe & MPPE_OPT_40) { + ppp_notice("Disabling 40-bit MPPE; MS-CHAP LM not supported"); + go->mppe &= ~MPPE_OPT_40; + wo->mppe &= ~MPPE_OPT_40; + } + } - /* Last check: can we actually negotiate something? */ - if (!(go->mppe & (MPPE_OPT_40 | MPPE_OPT_128))) { - /* Could be misconfig, could be 40-bit disabled above. */ - ppp_error("MPPE required, but both 40-bit and 128-bit disabled."); - lcp_close(pcb, "MPPE required but not available"); - return; - } + /* Last check: can we actually negotiate something? */ + if (!(go->mppe & (MPPE_OPT_40 | MPPE_OPT_128))) { + /* Could be misconfig, could be 40-bit disabled above. */ + ppp_error("MPPE required, but both 40-bit and 128-bit disabled."); + lcp_close(pcb, "MPPE required but not available"); + return; + } - /* sync options */ - ao->mppe = go->mppe; - /* MPPE is not compatible with other compression types */ + /* sync options */ + ao->mppe = go->mppe; + /* MPPE is not compatible with other compression types */ #if BSDCOMPRESS_SUPPORT - ao->bsd_compress = go->bsd_compress = 0; + ao->bsd_compress = go->bsd_compress = 0; #endif /* BSDCOMPRESS_SUPPORT */ #if PREDICTOR_SUPPORT - ao->predictor_1 = go->predictor_1 = 0; - ao->predictor_2 = go->predictor_2 = 0; + ao->predictor_1 = go->predictor_1 = 0; + ao->predictor_2 = go->predictor_2 = 0; #endif /* PREDICTOR_SUPPORT */ #if DEFLATE_SUPPORT - ao->deflate = go->deflate = 0; + ao->deflate = go->deflate = 0; #endif /* DEFLATE_SUPPORT */ } #endif /* MPPE_SUPPORT */ @@ -650,23 +650,23 @@ static void ccp_resetci(fsm *f) { * if BSDCOMPRESS_SUPPORT is set, it is. */ if (go->bsd_compress) { - opt_buf[0] = CI_BSD_COMPRESS; - opt_buf[1] = CILEN_BSD_COMPRESS; - for (;;) { - if (go->bsd_bits < BSD_MIN_BITS) { - go->bsd_compress = 0; - break; - } - opt_buf[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits); - res = ccp_test(pcb, opt_buf, CILEN_BSD_COMPRESS, 0); - if (res > 0) { - break; - } else if (res < 0) { - go->bsd_compress = 0; - break; - } - go->bsd_bits--; - } + opt_buf[0] = CI_BSD_COMPRESS; + opt_buf[1] = CILEN_BSD_COMPRESS; + for (;;) { + if (go->bsd_bits < BSD_MIN_BITS) { + go->bsd_compress = 0; + break; + } + opt_buf[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits); + res = ccp_test(pcb, opt_buf, CILEN_BSD_COMPRESS, 0); + if (res > 0) { + break; + } else if (res < 0) { + go->bsd_compress = 0; + break; + } + go->bsd_bits--; + } } #endif /* BSDCOMPRESS_SUPPORT */ #if DEFLATE_SUPPORT @@ -674,48 +674,48 @@ static void ccp_resetci(fsm *f) { * if DEFLATE_SUPPORT is set, it is. */ if (go->deflate) { - if (go->deflate_correct) { - opt_buf[0] = CI_DEFLATE; - opt_buf[1] = CILEN_DEFLATE; - opt_buf[3] = DEFLATE_CHK_SEQUENCE; - for (;;) { - if (go->deflate_size < DEFLATE_MIN_WORKS) { - go->deflate_correct = 0; - break; - } - opt_buf[2] = DEFLATE_MAKE_OPT(go->deflate_size); - res = ccp_test(pcb, opt_buf, CILEN_DEFLATE, 0); - if (res > 0) { - break; - } else if (res < 0) { - go->deflate_correct = 0; - break; - } - go->deflate_size--; - } - } - if (go->deflate_draft) { - opt_buf[0] = CI_DEFLATE_DRAFT; - opt_buf[1] = CILEN_DEFLATE; - opt_buf[3] = DEFLATE_CHK_SEQUENCE; - for (;;) { - if (go->deflate_size < DEFLATE_MIN_WORKS) { - go->deflate_draft = 0; - break; - } - opt_buf[2] = DEFLATE_MAKE_OPT(go->deflate_size); - res = ccp_test(pcb, opt_buf, CILEN_DEFLATE, 0); - if (res > 0) { - break; - } else if (res < 0) { - go->deflate_draft = 0; - break; - } - go->deflate_size--; - } - } - if (!go->deflate_correct && !go->deflate_draft) - go->deflate = 0; + if (go->deflate_correct) { + opt_buf[0] = CI_DEFLATE; + opt_buf[1] = CILEN_DEFLATE; + opt_buf[3] = DEFLATE_CHK_SEQUENCE; + for (;;) { + if (go->deflate_size < DEFLATE_MIN_WORKS) { + go->deflate_correct = 0; + break; + } + opt_buf[2] = DEFLATE_MAKE_OPT(go->deflate_size); + res = ccp_test(pcb, opt_buf, CILEN_DEFLATE, 0); + if (res > 0) { + break; + } else if (res < 0) { + go->deflate_correct = 0; + break; + } + go->deflate_size--; + } + } + if (go->deflate_draft) { + opt_buf[0] = CI_DEFLATE_DRAFT; + opt_buf[1] = CILEN_DEFLATE; + opt_buf[3] = DEFLATE_CHK_SEQUENCE; + for (;;) { + if (go->deflate_size < DEFLATE_MIN_WORKS) { + go->deflate_draft = 0; + break; + } + opt_buf[2] = DEFLATE_MAKE_OPT(go->deflate_size); + res = ccp_test(pcb, opt_buf, CILEN_DEFLATE, 0); + if (res > 0) { + break; + } else if (res < 0) { + go->deflate_draft = 0; + break; + } + go->deflate_size--; + } + } + if (!go->deflate_correct && !go->deflate_draft) + go->deflate = 0; } #endif /* DEFLATE_SUPPORT */ #if PREDICTOR_SUPPORT @@ -723,16 +723,16 @@ static void ccp_resetci(fsm *f) { * if PREDICTOR_SUPPORT is set, it is. */ if (go->predictor_1) { - opt_buf[0] = CI_PREDICTOR_1; - opt_buf[1] = CILEN_PREDICTOR_1; - if (ccp_test(pcb, opt_buf, CILEN_PREDICTOR_1, 0) <= 0) - go->predictor_1 = 0; + opt_buf[0] = CI_PREDICTOR_1; + opt_buf[1] = CILEN_PREDICTOR_1; + if (ccp_test(pcb, opt_buf, CILEN_PREDICTOR_1, 0) <= 0) + go->predictor_1 = 0; } if (go->predictor_2) { - opt_buf[0] = CI_PREDICTOR_2; - opt_buf[1] = CILEN_PREDICTOR_2; - if (ccp_test(pcb, opt_buf, CILEN_PREDICTOR_2, 0) <= 0) - go->predictor_2 = 0; + opt_buf[0] = CI_PREDICTOR_2; + opt_buf[1] = CILEN_PREDICTOR_2; + if (ccp_test(pcb, opt_buf, CILEN_PREDICTOR_2, 0) <= 0) + go->predictor_2 = 0; } #endif /* PREDICTOR_SUPPORT */ } @@ -746,20 +746,20 @@ static int ccp_cilen(fsm *f) { return 0 #if BSDCOMPRESS_SUPPORT - + (go->bsd_compress? CILEN_BSD_COMPRESS: 0) + + (go->bsd_compress? CILEN_BSD_COMPRESS: 0) #endif /* BSDCOMPRESS_SUPPORT */ #if DEFLATE_SUPPORT - + (go->deflate && go->deflate_correct? CILEN_DEFLATE: 0) - + (go->deflate && go->deflate_draft? CILEN_DEFLATE: 0) + + (go->deflate && go->deflate_correct? CILEN_DEFLATE: 0) + + (go->deflate && go->deflate_draft? CILEN_DEFLATE: 0) #endif /* DEFLATE_SUPPORT */ #if PREDICTOR_SUPPORT - + (go->predictor_1? CILEN_PREDICTOR_1: 0) - + (go->predictor_2? CILEN_PREDICTOR_2: 0) + + (go->predictor_1? CILEN_PREDICTOR_1: 0) + + (go->predictor_2? CILEN_PREDICTOR_2: 0) #endif /* PREDICTOR_SUPPORT */ #if MPPE_SUPPORT - + (go->mppe? CILEN_MPPE: 0) + + (go->mppe? CILEN_MPPE: 0) #endif /* MPPE_SUPPORT */ - ; + ; } /* @@ -776,50 +776,50 @@ static void ccp_addci(fsm *f, u_char *p, int *lenp) { */ #if MPPE_SUPPORT if (go->mppe) { - p[0] = CI_MPPE; - p[1] = CILEN_MPPE; - MPPE_OPTS_TO_CI(go->mppe, &p[2]); - mppe_init(pcb, &pcb->mppe_decomp, go->mppe); - p += CILEN_MPPE; + p[0] = CI_MPPE; + p[1] = CILEN_MPPE; + MPPE_OPTS_TO_CI(go->mppe, &p[2]); + mppe_init(pcb, &pcb->mppe_decomp, go->mppe); + p += CILEN_MPPE; } #endif /* MPPE_SUPPORT */ #if DEFLATE_SUPPORT if (go->deflate) { - if (go->deflate_correct) { - p[0] = CI_DEFLATE; - p[1] = CILEN_DEFLATE; - p[2] = DEFLATE_MAKE_OPT(go->deflate_size); - p[3] = DEFLATE_CHK_SEQUENCE; - p += CILEN_DEFLATE; - } - if (go->deflate_draft) { - p[0] = CI_DEFLATE_DRAFT; - p[1] = CILEN_DEFLATE; - p[2] = p[2 - CILEN_DEFLATE]; - p[3] = DEFLATE_CHK_SEQUENCE; - p += CILEN_DEFLATE; - } + if (go->deflate_correct) { + p[0] = CI_DEFLATE; + p[1] = CILEN_DEFLATE; + p[2] = DEFLATE_MAKE_OPT(go->deflate_size); + p[3] = DEFLATE_CHK_SEQUENCE; + p += CILEN_DEFLATE; + } + if (go->deflate_draft) { + p[0] = CI_DEFLATE_DRAFT; + p[1] = CILEN_DEFLATE; + p[2] = p[2 - CILEN_DEFLATE]; + p[3] = DEFLATE_CHK_SEQUENCE; + p += CILEN_DEFLATE; + } } #endif /* DEFLATE_SUPPORT */ #if BSDCOMPRESS_SUPPORT if (go->bsd_compress) { - p[0] = CI_BSD_COMPRESS; - p[1] = CILEN_BSD_COMPRESS; - p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits); - p += CILEN_BSD_COMPRESS; + p[0] = CI_BSD_COMPRESS; + p[1] = CILEN_BSD_COMPRESS; + p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits); + p += CILEN_BSD_COMPRESS; } #endif /* BSDCOMPRESS_SUPPORT */ #if PREDICTOR_SUPPORT /* XXX Should Predictor 2 be preferable to Predictor 1? */ if (go->predictor_1) { - p[0] = CI_PREDICTOR_1; - p[1] = CILEN_PREDICTOR_1; - p += CILEN_PREDICTOR_1; + p[0] = CI_PREDICTOR_1; + p[1] = CILEN_PREDICTOR_1; + p += CILEN_PREDICTOR_1; } if (go->predictor_2) { - p[0] = CI_PREDICTOR_2; - p[1] = CILEN_PREDICTOR_2; - p += CILEN_PREDICTOR_2; + p[0] = CI_PREDICTOR_2; + p[1] = CILEN_PREDICTOR_2; + p += CILEN_PREDICTOR_2; } #endif /* PREDICTOR_SUPPORT */ @@ -841,83 +841,83 @@ static int ccp_ackci(fsm *f, u_char *p, int len) { #if MPPE_SUPPORT if (go->mppe) { - u_char opt_buf[CILEN_MPPE]; + u_char opt_buf[CILEN_MPPE]; - opt_buf[0] = CI_MPPE; - opt_buf[1] = CILEN_MPPE; - MPPE_OPTS_TO_CI(go->mppe, &opt_buf[2]); - if (len < CILEN_MPPE || memcmp(opt_buf, p, CILEN_MPPE)) - return 0; - p += CILEN_MPPE; - len -= CILEN_MPPE; - /* XXX Cope with first/fast ack */ - if (len == 0) - return 1; + opt_buf[0] = CI_MPPE; + opt_buf[1] = CILEN_MPPE; + MPPE_OPTS_TO_CI(go->mppe, &opt_buf[2]); + if (len < CILEN_MPPE || memcmp(opt_buf, p, CILEN_MPPE)) + return 0; + p += CILEN_MPPE; + len -= CILEN_MPPE; + /* XXX Cope with first/fast ack */ + if (len == 0) + return 1; } #endif /* MPPE_SUPPORT */ #if DEFLATE_SUPPORT if (go->deflate) { - if (len < CILEN_DEFLATE - || p[0] != (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT) - || p[1] != CILEN_DEFLATE - || p[2] != DEFLATE_MAKE_OPT(go->deflate_size) - || p[3] != DEFLATE_CHK_SEQUENCE) - return 0; - p += CILEN_DEFLATE; - len -= CILEN_DEFLATE; - /* XXX Cope with first/fast ack */ - if (len == 0) - return 1; - if (go->deflate_correct && go->deflate_draft) { - if (len < CILEN_DEFLATE - || p[0] != CI_DEFLATE_DRAFT - || p[1] != CILEN_DEFLATE - || p[2] != DEFLATE_MAKE_OPT(go->deflate_size) - || p[3] != DEFLATE_CHK_SEQUENCE) - return 0; - p += CILEN_DEFLATE; - len -= CILEN_DEFLATE; - } + if (len < CILEN_DEFLATE + || p[0] != (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT) + || p[1] != CILEN_DEFLATE + || p[2] != DEFLATE_MAKE_OPT(go->deflate_size) + || p[3] != DEFLATE_CHK_SEQUENCE) + return 0; + p += CILEN_DEFLATE; + len -= CILEN_DEFLATE; + /* XXX Cope with first/fast ack */ + if (len == 0) + return 1; + if (go->deflate_correct && go->deflate_draft) { + if (len < CILEN_DEFLATE + || p[0] != CI_DEFLATE_DRAFT + || p[1] != CILEN_DEFLATE + || p[2] != DEFLATE_MAKE_OPT(go->deflate_size) + || p[3] != DEFLATE_CHK_SEQUENCE) + return 0; + p += CILEN_DEFLATE; + len -= CILEN_DEFLATE; + } } #endif /* DEFLATE_SUPPORT */ #if BSDCOMPRESS_SUPPORT if (go->bsd_compress) { - if (len < CILEN_BSD_COMPRESS - || p[0] != CI_BSD_COMPRESS || p[1] != CILEN_BSD_COMPRESS - || p[2] != BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits)) - return 0; - p += CILEN_BSD_COMPRESS; - len -= CILEN_BSD_COMPRESS; - /* XXX Cope with first/fast ack */ - if (p == p0 && len == 0) - return 1; + if (len < CILEN_BSD_COMPRESS + || p[0] != CI_BSD_COMPRESS || p[1] != CILEN_BSD_COMPRESS + || p[2] != BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits)) + return 0; + p += CILEN_BSD_COMPRESS; + len -= CILEN_BSD_COMPRESS; + /* XXX Cope with first/fast ack */ + if (p == p0 && len == 0) + return 1; } #endif /* BSDCOMPRESS_SUPPORT */ #if PREDICTOR_SUPPORT if (go->predictor_1) { - if (len < CILEN_PREDICTOR_1 - || p[0] != CI_PREDICTOR_1 || p[1] != CILEN_PREDICTOR_1) - return 0; - p += CILEN_PREDICTOR_1; - len -= CILEN_PREDICTOR_1; - /* XXX Cope with first/fast ack */ - if (p == p0 && len == 0) - return 1; + if (len < CILEN_PREDICTOR_1 + || p[0] != CI_PREDICTOR_1 || p[1] != CILEN_PREDICTOR_1) + return 0; + p += CILEN_PREDICTOR_1; + len -= CILEN_PREDICTOR_1; + /* XXX Cope with first/fast ack */ + if (p == p0 && len == 0) + return 1; } if (go->predictor_2) { - if (len < CILEN_PREDICTOR_2 - || p[0] != CI_PREDICTOR_2 || p[1] != CILEN_PREDICTOR_2) - return 0; - p += CILEN_PREDICTOR_2; - len -= CILEN_PREDICTOR_2; - /* XXX Cope with first/fast ack */ - if (p == p0 && len == 0) - return 1; + if (len < CILEN_PREDICTOR_2 + || p[0] != CI_PREDICTOR_2 || p[1] != CILEN_PREDICTOR_2) + return 0; + p += CILEN_PREDICTOR_2; + len -= CILEN_PREDICTOR_2; + /* XXX Cope with first/fast ack */ + if (p == p0 && len == 0) + return 1; } #endif /* PREDICTOR_SUPPORT */ if (len != 0) - return 0; + return 0; return 1; } @@ -928,8 +928,8 @@ static int ccp_ackci(fsm *f, u_char *p, int len) { static int ccp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { ppp_pcb *pcb = f->pcb; ccp_options *go = &pcb->ccp_gotoptions; - ccp_options no; /* options we've seen already */ - ccp_options try_; /* options to ask for next time */ + ccp_options no; /* options we've seen already */ + ccp_options try_; /* options to ask for next time */ LWIP_UNUSED_ARG(treat_as_reject); #if !MPPE_SUPPORT && !DEFLATE_SUPPORT && !BSDCOMPRESS_SUPPORT LWIP_UNUSED_ARG(p); @@ -941,66 +941,66 @@ static int ccp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { #if MPPE_SUPPORT if (go->mppe && len >= CILEN_MPPE - && p[0] == CI_MPPE && p[1] == CILEN_MPPE) { - no.mppe = 1; - /* - * Peer wants us to use a different strength or other setting. - * Fail if we aren't willing to use his suggestion. - */ - MPPE_CI_TO_OPTS(&p[2], try_.mppe); - if ((try_.mppe & MPPE_OPT_STATEFUL) && pcb->settings.refuse_mppe_stateful) { - ppp_error("Refusing MPPE stateful mode offered by peer"); - try_.mppe = 0; - } else if (((go->mppe | MPPE_OPT_STATEFUL) & try_.mppe) != try_.mppe) { - /* Peer must have set options we didn't request (suggest) */ - try_.mppe = 0; - } + && p[0] == CI_MPPE && p[1] == CILEN_MPPE) { + no.mppe = 1; + /* + * Peer wants us to use a different strength or other setting. + * Fail if we aren't willing to use his suggestion. + */ + MPPE_CI_TO_OPTS(&p[2], try_.mppe); + if ((try_.mppe & MPPE_OPT_STATEFUL) && pcb->settings.refuse_mppe_stateful) { + ppp_error("Refusing MPPE stateful mode offered by peer"); + try_.mppe = 0; + } else if (((go->mppe | MPPE_OPT_STATEFUL) & try_.mppe) != try_.mppe) { + /* Peer must have set options we didn't request (suggest) */ + try_.mppe = 0; + } - if (!try_.mppe) { - ppp_error("MPPE required but peer negotiation failed"); - lcp_close(pcb, "MPPE required but peer negotiation failed"); - } + if (!try_.mppe) { + ppp_error("MPPE required but peer negotiation failed"); + lcp_close(pcb, "MPPE required but peer negotiation failed"); + } } #endif /* MPPE_SUPPORT */ #if DEFLATE_SUPPORT if (go->deflate && len >= CILEN_DEFLATE - && p[0] == (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT) - && p[1] == CILEN_DEFLATE) { - no.deflate = 1; - /* - * Peer wants us to use a different code size or something. - * Stop asking for Deflate if we don't understand his suggestion. - */ - if (DEFLATE_METHOD(p[2]) != DEFLATE_METHOD_VAL - || DEFLATE_SIZE(p[2]) < DEFLATE_MIN_WORKS - || p[3] != DEFLATE_CHK_SEQUENCE) - try_.deflate = 0; - else if (DEFLATE_SIZE(p[2]) < go->deflate_size) - try_.deflate_size = DEFLATE_SIZE(p[2]); - p += CILEN_DEFLATE; - len -= CILEN_DEFLATE; - if (go->deflate_correct && go->deflate_draft - && len >= CILEN_DEFLATE && p[0] == CI_DEFLATE_DRAFT - && p[1] == CILEN_DEFLATE) { - p += CILEN_DEFLATE; - len -= CILEN_DEFLATE; - } + && p[0] == (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT) + && p[1] == CILEN_DEFLATE) { + no.deflate = 1; + /* + * Peer wants us to use a different code size or something. + * Stop asking for Deflate if we don't understand his suggestion. + */ + if (DEFLATE_METHOD(p[2]) != DEFLATE_METHOD_VAL + || DEFLATE_SIZE(p[2]) < DEFLATE_MIN_WORKS + || p[3] != DEFLATE_CHK_SEQUENCE) + try_.deflate = 0; + else if (DEFLATE_SIZE(p[2]) < go->deflate_size) + try_.deflate_size = DEFLATE_SIZE(p[2]); + p += CILEN_DEFLATE; + len -= CILEN_DEFLATE; + if (go->deflate_correct && go->deflate_draft + && len >= CILEN_DEFLATE && p[0] == CI_DEFLATE_DRAFT + && p[1] == CILEN_DEFLATE) { + p += CILEN_DEFLATE; + len -= CILEN_DEFLATE; + } } #endif /* DEFLATE_SUPPORT */ #if BSDCOMPRESS_SUPPORT if (go->bsd_compress && len >= CILEN_BSD_COMPRESS - && p[0] == CI_BSD_COMPRESS && p[1] == CILEN_BSD_COMPRESS) { - no.bsd_compress = 1; - /* - * Peer wants us to use a different number of bits - * or a different version. - */ - if (BSD_VERSION(p[2]) != BSD_CURRENT_VERSION) - try_.bsd_compress = 0; - else if (BSD_NBITS(p[2]) < go->bsd_bits) - try_.bsd_bits = BSD_NBITS(p[2]); - p += CILEN_BSD_COMPRESS; - len -= CILEN_BSD_COMPRESS; + && p[0] == CI_BSD_COMPRESS && p[1] == CILEN_BSD_COMPRESS) { + no.bsd_compress = 1; + /* + * Peer wants us to use a different number of bits + * or a different version. + */ + if (BSD_VERSION(p[2]) != BSD_CURRENT_VERSION) + try_.bsd_compress = 0; + else if (BSD_NBITS(p[2]) < go->bsd_bits) + try_.bsd_bits = BSD_NBITS(p[2]); + p += CILEN_BSD_COMPRESS; + len -= CILEN_BSD_COMPRESS; } #endif /* BSDCOMPRESS_SUPPORT */ @@ -1011,7 +1011,7 @@ static int ccp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { */ if (f->state != PPP_FSM_OPENED) - *go = try_; + *go = try_; return 1; } @@ -1021,7 +1021,7 @@ static int ccp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { static int ccp_rejci(fsm *f, u_char *p, int len) { ppp_pcb *pcb = f->pcb; ccp_options *go = &pcb->ccp_gotoptions; - ccp_options try_; /* options to request next time */ + ccp_options try_; /* options to request next time */ try_ = *go; @@ -1030,69 +1030,69 @@ static int ccp_rejci(fsm *f, u_char *p, int len) { * configure-requests. */ if (len == 0 && pcb->ccp_all_rejected) - return -1; + return -1; #if MPPE_SUPPORT if (go->mppe && len >= CILEN_MPPE - && p[0] == CI_MPPE && p[1] == CILEN_MPPE) { - ppp_error("MPPE required but peer refused"); - lcp_close(pcb, "MPPE required but peer refused"); - p += CILEN_MPPE; - len -= CILEN_MPPE; + && p[0] == CI_MPPE && p[1] == CILEN_MPPE) { + ppp_error("MPPE required but peer refused"); + lcp_close(pcb, "MPPE required but peer refused"); + p += CILEN_MPPE; + len -= CILEN_MPPE; } #endif /* MPPE_SUPPORT */ #if DEFLATE_SUPPORT if (go->deflate_correct && len >= CILEN_DEFLATE - && p[0] == CI_DEFLATE && p[1] == CILEN_DEFLATE) { - if (p[2] != DEFLATE_MAKE_OPT(go->deflate_size) - || p[3] != DEFLATE_CHK_SEQUENCE) - return 0; /* Rej is bad */ - try_.deflate_correct = 0; - p += CILEN_DEFLATE; - len -= CILEN_DEFLATE; + && p[0] == CI_DEFLATE && p[1] == CILEN_DEFLATE) { + if (p[2] != DEFLATE_MAKE_OPT(go->deflate_size) + || p[3] != DEFLATE_CHK_SEQUENCE) + return 0; /* Rej is bad */ + try_.deflate_correct = 0; + p += CILEN_DEFLATE; + len -= CILEN_DEFLATE; } if (go->deflate_draft && len >= CILEN_DEFLATE - && p[0] == CI_DEFLATE_DRAFT && p[1] == CILEN_DEFLATE) { - if (p[2] != DEFLATE_MAKE_OPT(go->deflate_size) - || p[3] != DEFLATE_CHK_SEQUENCE) - return 0; /* Rej is bad */ - try_.deflate_draft = 0; - p += CILEN_DEFLATE; - len -= CILEN_DEFLATE; + && p[0] == CI_DEFLATE_DRAFT && p[1] == CILEN_DEFLATE) { + if (p[2] != DEFLATE_MAKE_OPT(go->deflate_size) + || p[3] != DEFLATE_CHK_SEQUENCE) + return 0; /* Rej is bad */ + try_.deflate_draft = 0; + p += CILEN_DEFLATE; + len -= CILEN_DEFLATE; } if (!try_.deflate_correct && !try_.deflate_draft) - try_.deflate = 0; + try_.deflate = 0; #endif /* DEFLATE_SUPPORT */ #if BSDCOMPRESS_SUPPORT if (go->bsd_compress && len >= CILEN_BSD_COMPRESS - && p[0] == CI_BSD_COMPRESS && p[1] == CILEN_BSD_COMPRESS) { - if (p[2] != BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits)) - return 0; - try_.bsd_compress = 0; - p += CILEN_BSD_COMPRESS; - len -= CILEN_BSD_COMPRESS; + && p[0] == CI_BSD_COMPRESS && p[1] == CILEN_BSD_COMPRESS) { + if (p[2] != BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits)) + return 0; + try_.bsd_compress = 0; + p += CILEN_BSD_COMPRESS; + len -= CILEN_BSD_COMPRESS; } #endif /* BSDCOMPRESS_SUPPORT */ #if PREDICTOR_SUPPORT if (go->predictor_1 && len >= CILEN_PREDICTOR_1 - && p[0] == CI_PREDICTOR_1 && p[1] == CILEN_PREDICTOR_1) { - try_.predictor_1 = 0; - p += CILEN_PREDICTOR_1; - len -= CILEN_PREDICTOR_1; + && p[0] == CI_PREDICTOR_1 && p[1] == CILEN_PREDICTOR_1) { + try_.predictor_1 = 0; + p += CILEN_PREDICTOR_1; + len -= CILEN_PREDICTOR_1; } if (go->predictor_2 && len >= CILEN_PREDICTOR_2 - && p[0] == CI_PREDICTOR_2 && p[1] == CILEN_PREDICTOR_2) { - try_.predictor_2 = 0; - p += CILEN_PREDICTOR_2; - len -= CILEN_PREDICTOR_2; + && p[0] == CI_PREDICTOR_2 && p[1] == CILEN_PREDICTOR_2) { + try_.predictor_2 = 0; + p += CILEN_PREDICTOR_2; + len -= CILEN_PREDICTOR_2; } #endif /* PREDICTOR_SUPPORT */ if (len != 0) - return 0; + return 0; if (f->state != PPP_FSM_OPENED) - *go = try_; + *go = try_; return 1; } @@ -1114,8 +1114,8 @@ static int ccp_reqci(fsm *f, u_char *p, int *lenp, int dont_nak) { u_char *p0, *retp; int len, clen, type; #if MPPE_SUPPORT - u8_t rej_for_ci_mppe = 1; /* Are we rejecting based on a bad/missing */ - /* CI_MPPE, or due to other options? */ + u8_t rej_for_ci_mppe = 1; /* Are we rejecting based on a bad/missing */ + /* CI_MPPE, or due to other options? */ #endif /* MPPE_SUPPORT */ ret = CONFACK; @@ -1126,257 +1126,257 @@ static int ccp_reqci(fsm *f, u_char *p, int *lenp, int dont_nak) { ho->method = (len > 0)? p[0]: 0; while (len > 0) { - newret = CONFACK; - if (len < 2 || p[1] < 2 || p[1] > len) { - /* length is bad */ - clen = len; - newret = CONFREJ; + newret = CONFACK; + if (len < 2 || p[1] < 2 || p[1] > len) { + /* length is bad */ + clen = len; + newret = CONFREJ; - } else { - type = p[0]; - clen = p[1]; + } else { + type = p[0]; + clen = p[1]; - switch (type) { + switch (type) { #if MPPE_SUPPORT - case CI_MPPE: - if (!ao->mppe || clen != CILEN_MPPE) { - newret = CONFREJ; - break; - } - MPPE_CI_TO_OPTS(&p[2], ho->mppe); + case CI_MPPE: + if (!ao->mppe || clen != CILEN_MPPE) { + newret = CONFREJ; + break; + } + MPPE_CI_TO_OPTS(&p[2], ho->mppe); - /* Nak if anything unsupported or unknown are set. */ - if (ho->mppe & MPPE_OPT_UNSUPPORTED) { - newret = CONFNAK; - ho->mppe &= ~MPPE_OPT_UNSUPPORTED; - } - if (ho->mppe & MPPE_OPT_UNKNOWN) { - newret = CONFNAK; - ho->mppe &= ~MPPE_OPT_UNKNOWN; - } + /* Nak if anything unsupported or unknown are set. */ + if (ho->mppe & MPPE_OPT_UNSUPPORTED) { + newret = CONFNAK; + ho->mppe &= ~MPPE_OPT_UNSUPPORTED; + } + if (ho->mppe & MPPE_OPT_UNKNOWN) { + newret = CONFNAK; + ho->mppe &= ~MPPE_OPT_UNKNOWN; + } - /* Check state opt */ - if (ho->mppe & MPPE_OPT_STATEFUL) { - /* - * We can Nak and request stateless, but it's a - * lot easier to just assume the peer will request - * it if he can do it; stateful mode is bad over - * the Internet -- which is where we expect MPPE. - */ - if (pcb->settings.refuse_mppe_stateful) { - ppp_error("Refusing MPPE stateful mode offered by peer"); - newret = CONFREJ; - break; - } - } + /* Check state opt */ + if (ho->mppe & MPPE_OPT_STATEFUL) { + /* + * We can Nak and request stateless, but it's a + * lot easier to just assume the peer will request + * it if he can do it; stateful mode is bad over + * the Internet -- which is where we expect MPPE. + */ + if (pcb->settings.refuse_mppe_stateful) { + ppp_error("Refusing MPPE stateful mode offered by peer"); + newret = CONFREJ; + break; + } + } - /* Find out which of {S,L} are set. */ - if ((ho->mppe & MPPE_OPT_128) - && (ho->mppe & MPPE_OPT_40)) { - /* Both are set, negotiate the strongest. */ - newret = CONFNAK; - if (ao->mppe & MPPE_OPT_128) - ho->mppe &= ~MPPE_OPT_40; - else if (ao->mppe & MPPE_OPT_40) - ho->mppe &= ~MPPE_OPT_128; - else { - newret = CONFREJ; - break; - } - } else if (ho->mppe & MPPE_OPT_128) { - if (!(ao->mppe & MPPE_OPT_128)) { - newret = CONFREJ; - break; - } - } else if (ho->mppe & MPPE_OPT_40) { - if (!(ao->mppe & MPPE_OPT_40)) { - newret = CONFREJ; - break; - } - } else { - /* Neither are set. */ - /* We cannot accept this. */ - newret = CONFNAK; - /* Give the peer our idea of what can be used, - so it can choose and confirm */ - ho->mppe = ao->mppe; - } + /* Find out which of {S,L} are set. */ + if ((ho->mppe & MPPE_OPT_128) + && (ho->mppe & MPPE_OPT_40)) { + /* Both are set, negotiate the strongest. */ + newret = CONFNAK; + if (ao->mppe & MPPE_OPT_128) + ho->mppe &= ~MPPE_OPT_40; + else if (ao->mppe & MPPE_OPT_40) + ho->mppe &= ~MPPE_OPT_128; + else { + newret = CONFREJ; + break; + } + } else if (ho->mppe & MPPE_OPT_128) { + if (!(ao->mppe & MPPE_OPT_128)) { + newret = CONFREJ; + break; + } + } else if (ho->mppe & MPPE_OPT_40) { + if (!(ao->mppe & MPPE_OPT_40)) { + newret = CONFREJ; + break; + } + } else { + /* Neither are set. */ + /* We cannot accept this. */ + newret = CONFNAK; + /* Give the peer our idea of what can be used, + so it can choose and confirm */ + ho->mppe = ao->mppe; + } - /* rebuild the opts */ - MPPE_OPTS_TO_CI(ho->mppe, &p[2]); - if (newret == CONFACK) { - int mtu; + /* rebuild the opts */ + MPPE_OPTS_TO_CI(ho->mppe, &p[2]); + if (newret == CONFACK) { + int mtu; - mppe_init(pcb, &pcb->mppe_comp, ho->mppe); - /* - * We need to decrease the interface MTU by MPPE_PAD - * because MPPE frames **grow**. The kernel [must] - * allocate MPPE_PAD extra bytes in xmit buffers. - */ - mtu = netif_get_mtu(pcb); - if (mtu) - netif_set_mtu(pcb, mtu - MPPE_PAD); - else - newret = CONFREJ; - } + mppe_init(pcb, &pcb->mppe_comp, ho->mppe); + /* + * We need to decrease the interface MTU by MPPE_PAD + * because MPPE frames **grow**. The kernel [must] + * allocate MPPE_PAD extra bytes in xmit buffers. + */ + mtu = netif_get_mtu(pcb); + if (mtu) + netif_set_mtu(pcb, mtu - MPPE_PAD); + else + newret = CONFREJ; + } - /* - * We have accepted MPPE or are willing to negotiate - * MPPE parameters. A CONFREJ is due to subsequent - * (non-MPPE) processing. - */ - rej_for_ci_mppe = 0; - break; + /* + * We have accepted MPPE or are willing to negotiate + * MPPE parameters. A CONFREJ is due to subsequent + * (non-MPPE) processing. + */ + rej_for_ci_mppe = 0; + break; #endif /* MPPE_SUPPORT */ #if DEFLATE_SUPPORT - case CI_DEFLATE: - case CI_DEFLATE_DRAFT: - if (!ao->deflate || clen != CILEN_DEFLATE - || (!ao->deflate_correct && type == CI_DEFLATE) - || (!ao->deflate_draft && type == CI_DEFLATE_DRAFT)) { - newret = CONFREJ; - break; - } + case CI_DEFLATE: + case CI_DEFLATE_DRAFT: + if (!ao->deflate || clen != CILEN_DEFLATE + || (!ao->deflate_correct && type == CI_DEFLATE) + || (!ao->deflate_draft && type == CI_DEFLATE_DRAFT)) { + newret = CONFREJ; + break; + } - ho->deflate = 1; - ho->deflate_size = nb = DEFLATE_SIZE(p[2]); - if (DEFLATE_METHOD(p[2]) != DEFLATE_METHOD_VAL - || p[3] != DEFLATE_CHK_SEQUENCE - || nb > ao->deflate_size || nb < DEFLATE_MIN_WORKS) { - newret = CONFNAK; - if (!dont_nak) { - p[2] = DEFLATE_MAKE_OPT(ao->deflate_size); - p[3] = DEFLATE_CHK_SEQUENCE; - /* fall through to test this #bits below */ - } else - break; - } + ho->deflate = 1; + ho->deflate_size = nb = DEFLATE_SIZE(p[2]); + if (DEFLATE_METHOD(p[2]) != DEFLATE_METHOD_VAL + || p[3] != DEFLATE_CHK_SEQUENCE + || nb > ao->deflate_size || nb < DEFLATE_MIN_WORKS) { + newret = CONFNAK; + if (!dont_nak) { + p[2] = DEFLATE_MAKE_OPT(ao->deflate_size); + p[3] = DEFLATE_CHK_SEQUENCE; + /* fall through to test this #bits below */ + } else + break; + } - /* - * Check whether we can do Deflate with the window - * size they want. If the window is too big, reduce - * it until the kernel can cope and nak with that. - * We only check this for the first option. - */ - if (p == p0) { - for (;;) { - res = ccp_test(pcb, p, CILEN_DEFLATE, 1); - if (res > 0) - break; /* it's OK now */ - if (res < 0 || nb == DEFLATE_MIN_WORKS || dont_nak) { - newret = CONFREJ; - p[2] = DEFLATE_MAKE_OPT(ho->deflate_size); - break; - } - newret = CONFNAK; - --nb; - p[2] = DEFLATE_MAKE_OPT(nb); - } - } - break; + /* + * Check whether we can do Deflate with the window + * size they want. If the window is too big, reduce + * it until the kernel can cope and nak with that. + * We only check this for the first option. + */ + if (p == p0) { + for (;;) { + res = ccp_test(pcb, p, CILEN_DEFLATE, 1); + if (res > 0) + break; /* it's OK now */ + if (res < 0 || nb == DEFLATE_MIN_WORKS || dont_nak) { + newret = CONFREJ; + p[2] = DEFLATE_MAKE_OPT(ho->deflate_size); + break; + } + newret = CONFNAK; + --nb; + p[2] = DEFLATE_MAKE_OPT(nb); + } + } + break; #endif /* DEFLATE_SUPPORT */ #if BSDCOMPRESS_SUPPORT - case CI_BSD_COMPRESS: - if (!ao->bsd_compress || clen != CILEN_BSD_COMPRESS) { - newret = CONFREJ; - break; - } + case CI_BSD_COMPRESS: + if (!ao->bsd_compress || clen != CILEN_BSD_COMPRESS) { + newret = CONFREJ; + break; + } - ho->bsd_compress = 1; - ho->bsd_bits = nb = BSD_NBITS(p[2]); - if (BSD_VERSION(p[2]) != BSD_CURRENT_VERSION - || nb > ao->bsd_bits || nb < BSD_MIN_BITS) { - newret = CONFNAK; - if (!dont_nak) { - p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, ao->bsd_bits); - /* fall through to test this #bits below */ - } else - break; - } + ho->bsd_compress = 1; + ho->bsd_bits = nb = BSD_NBITS(p[2]); + if (BSD_VERSION(p[2]) != BSD_CURRENT_VERSION + || nb > ao->bsd_bits || nb < BSD_MIN_BITS) { + newret = CONFNAK; + if (!dont_nak) { + p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, ao->bsd_bits); + /* fall through to test this #bits below */ + } else + break; + } - /* - * Check whether we can do BSD-Compress with the code - * size they want. If the code size is too big, reduce - * it until the kernel can cope and nak with that. - * We only check this for the first option. - */ - if (p == p0) { - for (;;) { - res = ccp_test(pcb, p, CILEN_BSD_COMPRESS, 1); - if (res > 0) - break; - if (res < 0 || nb == BSD_MIN_BITS || dont_nak) { - newret = CONFREJ; - p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, - ho->bsd_bits); - break; - } - newret = CONFNAK; - --nb; - p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, nb); - } - } - break; + /* + * Check whether we can do BSD-Compress with the code + * size they want. If the code size is too big, reduce + * it until the kernel can cope and nak with that. + * We only check this for the first option. + */ + if (p == p0) { + for (;;) { + res = ccp_test(pcb, p, CILEN_BSD_COMPRESS, 1); + if (res > 0) + break; + if (res < 0 || nb == BSD_MIN_BITS || dont_nak) { + newret = CONFREJ; + p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, + ho->bsd_bits); + break; + } + newret = CONFNAK; + --nb; + p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, nb); + } + } + break; #endif /* BSDCOMPRESS_SUPPORT */ #if PREDICTOR_SUPPORT - case CI_PREDICTOR_1: - if (!ao->predictor_1 || clen != CILEN_PREDICTOR_1) { - newret = CONFREJ; - break; - } + case CI_PREDICTOR_1: + if (!ao->predictor_1 || clen != CILEN_PREDICTOR_1) { + newret = CONFREJ; + break; + } - ho->predictor_1 = 1; - if (p == p0 - && ccp_test(pcb, p, CILEN_PREDICTOR_1, 1) <= 0) { - newret = CONFREJ; - } - break; + ho->predictor_1 = 1; + if (p == p0 + && ccp_test(pcb, p, CILEN_PREDICTOR_1, 1) <= 0) { + newret = CONFREJ; + } + break; - case CI_PREDICTOR_2: - if (!ao->predictor_2 || clen != CILEN_PREDICTOR_2) { - newret = CONFREJ; - break; - } + case CI_PREDICTOR_2: + if (!ao->predictor_2 || clen != CILEN_PREDICTOR_2) { + newret = CONFREJ; + break; + } - ho->predictor_2 = 1; - if (p == p0 - && ccp_test(pcb, p, CILEN_PREDICTOR_2, 1) <= 0) { - newret = CONFREJ; - } - break; + ho->predictor_2 = 1; + if (p == p0 + && ccp_test(pcb, p, CILEN_PREDICTOR_2, 1) <= 0) { + newret = CONFREJ; + } + break; #endif /* PREDICTOR_SUPPORT */ - default: - newret = CONFREJ; - } - } + default: + newret = CONFREJ; + } + } - if (newret == CONFNAK && dont_nak) - newret = CONFREJ; - if (!(newret == CONFACK || (newret == CONFNAK && ret == CONFREJ))) { - /* we're returning this option */ - if (newret == CONFREJ && ret == CONFNAK) - retp = p0; - ret = newret; - if (p != retp) - MEMCPY(retp, p, clen); - retp += clen; - } + if (newret == CONFNAK && dont_nak) + newret = CONFREJ; + if (!(newret == CONFACK || (newret == CONFNAK && ret == CONFREJ))) { + /* we're returning this option */ + if (newret == CONFREJ && ret == CONFNAK) + retp = p0; + ret = newret; + if (p != retp) + MEMCPY(retp, p, clen); + retp += clen; + } - p += clen; - len -= clen; + p += clen; + len -= clen; } if (ret != CONFACK) { - if (ret == CONFREJ && *lenp == retp - p0) - pcb->ccp_all_rejected = 1; - else - *lenp = retp - p0; + if (ret == CONFREJ && *lenp == retp - p0) + pcb->ccp_all_rejected = 1; + else + *lenp = retp - p0; } #if MPPE_SUPPORT if (ret == CONFREJ && ao->mppe && rej_for_ci_mppe) { - ppp_error("MPPE required but peer negotiation failed"); - lcp_close(pcb, "MPPE required but peer negotiation failed"); + ppp_error("MPPE required but peer negotiation failed"); + lcp_close(pcb, "MPPE required but peer negotiation failed"); } #endif /* MPPE_SUPPORT */ return ret; @@ -1392,63 +1392,63 @@ static const char *method_name(ccp_options *opt, ccp_options *opt2) { #endif /* !DEFLATE_SUPPORT && !BSDCOMPRESS_SUPPORT */ if (!ccp_anycompress(opt)) - return "(none)"; + return "(none)"; switch (opt->method) { #if MPPE_SUPPORT case CI_MPPE: { - char *p = result; - char *q = result + sizeof(result); /* 1 past result */ + char *p = result; + char *q = result + sizeof(result); /* 1 past result */ - ppp_slprintf(p, q - p, "MPPE "); - p += 5; - if (opt->mppe & MPPE_OPT_128) { - ppp_slprintf(p, q - p, "128-bit "); - p += 8; - } - if (opt->mppe & MPPE_OPT_40) { - ppp_slprintf(p, q - p, "40-bit "); - p += 7; - } - if (opt->mppe & MPPE_OPT_STATEFUL) - ppp_slprintf(p, q - p, "stateful"); - else - ppp_slprintf(p, q - p, "stateless"); + ppp_slprintf(p, q - p, "MPPE "); + p += 5; + if (opt->mppe & MPPE_OPT_128) { + ppp_slprintf(p, q - p, "128-bit "); + p += 8; + } + if (opt->mppe & MPPE_OPT_40) { + ppp_slprintf(p, q - p, "40-bit "); + p += 7; + } + if (opt->mppe & MPPE_OPT_STATEFUL) + ppp_slprintf(p, q - p, "stateful"); + else + ppp_slprintf(p, q - p, "stateless"); - break; + break; } #endif /* MPPE_SUPPORT */ #if DEFLATE_SUPPORT case CI_DEFLATE: case CI_DEFLATE_DRAFT: - if (opt2 != NULL && opt2->deflate_size != opt->deflate_size) - ppp_slprintf(result, sizeof(result), "Deflate%s (%d/%d)", - (opt->method == CI_DEFLATE_DRAFT? "(old#)": ""), - opt->deflate_size, opt2->deflate_size); - else - ppp_slprintf(result, sizeof(result), "Deflate%s (%d)", - (opt->method == CI_DEFLATE_DRAFT? "(old#)": ""), - opt->deflate_size); - break; + if (opt2 != NULL && opt2->deflate_size != opt->deflate_size) + ppp_slprintf(result, sizeof(result), "Deflate%s (%d/%d)", + (opt->method == CI_DEFLATE_DRAFT? "(old#)": ""), + opt->deflate_size, opt2->deflate_size); + else + ppp_slprintf(result, sizeof(result), "Deflate%s (%d)", + (opt->method == CI_DEFLATE_DRAFT? "(old#)": ""), + opt->deflate_size); + break; #endif /* DEFLATE_SUPPORT */ #if BSDCOMPRESS_SUPPORT case CI_BSD_COMPRESS: - if (opt2 != NULL && opt2->bsd_bits != opt->bsd_bits) - ppp_slprintf(result, sizeof(result), "BSD-Compress (%d/%d)", - opt->bsd_bits, opt2->bsd_bits); - else - ppp_slprintf(result, sizeof(result), "BSD-Compress (%d)", - opt->bsd_bits); - break; + if (opt2 != NULL && opt2->bsd_bits != opt->bsd_bits) + ppp_slprintf(result, sizeof(result), "BSD-Compress (%d/%d)", + opt->bsd_bits, opt2->bsd_bits); + else + ppp_slprintf(result, sizeof(result), "BSD-Compress (%d)", + opt->bsd_bits); + break; #endif /* BSDCOMPRESS_SUPPORT */ #if PREDICTOR_SUPPORT case CI_PREDICTOR_1: - return "Predictor 1"; + return "Predictor 1"; case CI_PREDICTOR_2: - return "Predictor 2"; + return "Predictor 2"; #endif /* PREDICTOR_SUPPORT */ default: - ppp_slprintf(result, sizeof(result), "Method %d", opt->method); + ppp_slprintf(result, sizeof(result), "Method %d", opt->method); } return result; } @@ -1464,21 +1464,21 @@ static void ccp_up(fsm *f) { ccp_set(pcb, 1, 1, go->method, ho->method); if (ccp_anycompress(go)) { - if (ccp_anycompress(ho)) { - if (go->method == ho->method) { - ppp_notice("%s compression enabled", method_name(go, ho)); - } else { - ppp_strlcpy(method1, method_name(go, NULL), sizeof(method1)); - ppp_notice("%s / %s compression enabled", - method1, method_name(ho, NULL)); - } - } else - ppp_notice("%s receive compression enabled", method_name(go, NULL)); + if (ccp_anycompress(ho)) { + if (go->method == ho->method) { + ppp_notice("%s compression enabled", method_name(go, ho)); + } else { + ppp_strlcpy(method1, method_name(go, NULL), sizeof(method1)); + ppp_notice("%s / %s compression enabled", + method1, method_name(ho, NULL)); + } + } else + ppp_notice("%s receive compression enabled", method_name(go, NULL)); } else if (ccp_anycompress(ho)) - ppp_notice("%s transmit compression enabled", method_name(ho, NULL)); + ppp_notice("%s transmit compression enabled", method_name(ho, NULL)); #if MPPE_SUPPORT if (go->mppe) { - continue_networks(pcb); /* Bring up IP et al */ + continue_networks(pcb); /* Bring up IP et al */ } #endif /* MPPE_SUPPORT */ } @@ -1493,17 +1493,17 @@ static void ccp_down(fsm *f) { #endif /* MPPE_SUPPORT */ if (pcb->ccp_localstate & RACK_PENDING) - UNTIMEOUT(ccp_rack_timeout, f); + UNTIMEOUT(ccp_rack_timeout, f); pcb->ccp_localstate = 0; ccp_set(pcb, 1, 0, 0, 0); #if MPPE_SUPPORT if (go->mppe) { - go->mppe = 0; - if (pcb->lcp_fsm.state == PPP_FSM_OPENED) { - /* If LCP is not already going down, make sure it does. */ - ppp_error("MPPE disabled"); - lcp_close(pcb, "MPPE disabled"); - } + go->mppe = 0; + if (pcb->lcp_fsm.state == PPP_FSM_OPENED) { + /* If LCP is not already going down, make sure it does. */ + ppp_error("MPPE disabled"); + lcp_close(pcb, "MPPE disabled"); + } } #endif /* MPPE_SUPPORT */ } @@ -1526,17 +1526,17 @@ static int ccp_printpkt(const u_char *p, int plen, void (*printer) (void *, cons p0 = p; if (plen < HEADERLEN) - return 0; + return 0; code = p[0]; id = p[1]; len = (p[2] << 8) + p[3]; if (len < HEADERLEN || len > plen) - return 0; + return 0; if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(ccp_codenames) && ccp_codenames[code-1] != NULL) - printer(arg, " %s", ccp_codenames[code-1]); + printer(arg, " %s", ccp_codenames[code-1]); else - printer(arg, " code=0x%x", code); + printer(arg, " code=0x%x", code); printer(arg, " id=0x%x", id); len -= HEADERLEN; p += HEADERLEN; @@ -1546,99 +1546,99 @@ static int ccp_printpkt(const u_char *p, int plen, void (*printer) (void *, cons case CONFACK: case CONFNAK: case CONFREJ: - /* print list of possible compression methods */ - while (len >= 2) { - code = p[0]; - optlen = p[1]; - if (optlen < 2 || optlen > len) - break; - printer(arg, " <"); - len -= optlen; - optend = p + optlen; - switch (code) { + /* print list of possible compression methods */ + while (len >= 2) { + code = p[0]; + optlen = p[1]; + if (optlen < 2 || optlen > len) + break; + printer(arg, " <"); + len -= optlen; + optend = p + optlen; + switch (code) { #if MPPE_SUPPORT - case CI_MPPE: - if (optlen >= CILEN_MPPE) { - u_char mppe_opts; + case CI_MPPE: + if (optlen >= CILEN_MPPE) { + u_char mppe_opts; - MPPE_CI_TO_OPTS(&p[2], mppe_opts); - printer(arg, "mppe %s %s %s %s %s %s%s", - (p[2] & MPPE_H_BIT)? "+H": "-H", - (p[5] & MPPE_M_BIT)? "+M": "-M", - (p[5] & MPPE_S_BIT)? "+S": "-S", - (p[5] & MPPE_L_BIT)? "+L": "-L", - (p[5] & MPPE_D_BIT)? "+D": "-D", - (p[5] & MPPE_C_BIT)? "+C": "-C", - (mppe_opts & MPPE_OPT_UNKNOWN)? " +U": ""); - if (mppe_opts & MPPE_OPT_UNKNOWN) - printer(arg, " (%.2x %.2x %.2x %.2x)", - p[2], p[3], p[4], p[5]); - p += CILEN_MPPE; - } - break; + MPPE_CI_TO_OPTS(&p[2], mppe_opts); + printer(arg, "mppe %s %s %s %s %s %s%s", + (p[2] & MPPE_H_BIT)? "+H": "-H", + (p[5] & MPPE_M_BIT)? "+M": "-M", + (p[5] & MPPE_S_BIT)? "+S": "-S", + (p[5] & MPPE_L_BIT)? "+L": "-L", + (p[5] & MPPE_D_BIT)? "+D": "-D", + (p[5] & MPPE_C_BIT)? "+C": "-C", + (mppe_opts & MPPE_OPT_UNKNOWN)? " +U": ""); + if (mppe_opts & MPPE_OPT_UNKNOWN) + printer(arg, " (%.2x %.2x %.2x %.2x)", + p[2], p[3], p[4], p[5]); + p += CILEN_MPPE; + } + break; #endif /* MPPE_SUPPORT */ #if DEFLATE_SUPPORT - case CI_DEFLATE: - case CI_DEFLATE_DRAFT: - if (optlen >= CILEN_DEFLATE) { - printer(arg, "deflate%s %d", - (code == CI_DEFLATE_DRAFT? "(old#)": ""), - DEFLATE_SIZE(p[2])); - if (DEFLATE_METHOD(p[2]) != DEFLATE_METHOD_VAL) - printer(arg, " method %d", DEFLATE_METHOD(p[2])); - if (p[3] != DEFLATE_CHK_SEQUENCE) - printer(arg, " check %d", p[3]); - p += CILEN_DEFLATE; - } - break; + case CI_DEFLATE: + case CI_DEFLATE_DRAFT: + if (optlen >= CILEN_DEFLATE) { + printer(arg, "deflate%s %d", + (code == CI_DEFLATE_DRAFT? "(old#)": ""), + DEFLATE_SIZE(p[2])); + if (DEFLATE_METHOD(p[2]) != DEFLATE_METHOD_VAL) + printer(arg, " method %d", DEFLATE_METHOD(p[2])); + if (p[3] != DEFLATE_CHK_SEQUENCE) + printer(arg, " check %d", p[3]); + p += CILEN_DEFLATE; + } + break; #endif /* DEFLATE_SUPPORT */ #if BSDCOMPRESS_SUPPORT - case CI_BSD_COMPRESS: - if (optlen >= CILEN_BSD_COMPRESS) { - printer(arg, "bsd v%d %d", BSD_VERSION(p[2]), - BSD_NBITS(p[2])); - p += CILEN_BSD_COMPRESS; - } - break; + case CI_BSD_COMPRESS: + if (optlen >= CILEN_BSD_COMPRESS) { + printer(arg, "bsd v%d %d", BSD_VERSION(p[2]), + BSD_NBITS(p[2])); + p += CILEN_BSD_COMPRESS; + } + break; #endif /* BSDCOMPRESS_SUPPORT */ #if PREDICTOR_SUPPORT - case CI_PREDICTOR_1: - if (optlen >= CILEN_PREDICTOR_1) { - printer(arg, "predictor 1"); - p += CILEN_PREDICTOR_1; - } - break; - case CI_PREDICTOR_2: - if (optlen >= CILEN_PREDICTOR_2) { - printer(arg, "predictor 2"); - p += CILEN_PREDICTOR_2; - } - break; + case CI_PREDICTOR_1: + if (optlen >= CILEN_PREDICTOR_1) { + printer(arg, "predictor 1"); + p += CILEN_PREDICTOR_1; + } + break; + case CI_PREDICTOR_2: + if (optlen >= CILEN_PREDICTOR_2) { + printer(arg, "predictor 2"); + p += CILEN_PREDICTOR_2; + } + break; #endif /* PREDICTOR_SUPPORT */ - default: + default: break; - } - while (p < optend) - printer(arg, " %.2x", *p++); - printer(arg, ">"); - } - break; + } + while (p < optend) + printer(arg, " %.2x", *p++); + printer(arg, ">"); + } + break; case TERMACK: case TERMREQ: - if (len > 0 && *p >= ' ' && *p < 0x7f) { - ppp_print_string(p, len, printer, arg); - p += len; - len = 0; - } - break; + if (len > 0 && *p >= ' ' && *p < 0x7f) { + ppp_print_string(p, len, printer, arg); + p += len; + len = 0; + } + break; default: break; } /* dump out the rest of the packet in hex */ while (--len >= 0) - printer(arg, " %.2x", *p++); + printer(arg, " %.2x", *p++); return p - p0; } @@ -1667,34 +1667,34 @@ static void ccp_datainput(ppp_pcb *pcb, u_char *pkt, int len) { f = &pcb->ccp_fsm; if (f->state == PPP_FSM_OPENED) { - if (ccp_fatal_error(pcb)) { - /* - * Disable compression by taking CCP down. - */ - ppp_error("Lost compression sync: disabling compression"); - ccp_close(pcb, "Lost compression sync"); + if (ccp_fatal_error(pcb)) { + /* + * Disable compression by taking CCP down. + */ + ppp_error("Lost compression sync: disabling compression"); + ccp_close(pcb, "Lost compression sync"); #if MPPE_SUPPORT - /* - * If we were doing MPPE, we must also take the link down. - */ - if (go->mppe) { - ppp_error("Too many MPPE errors, closing LCP"); - lcp_close(pcb, "Too many MPPE errors"); - } + /* + * If we were doing MPPE, we must also take the link down. + */ + if (go->mppe) { + ppp_error("Too many MPPE errors, closing LCP"); + lcp_close(pcb, "Too many MPPE errors"); + } #endif /* MPPE_SUPPORT */ - } else { - /* - * Send a reset-request to reset the peer's compressor. - * We don't do that if we are still waiting for an - * acknowledgement to a previous reset-request. - */ - if (!(pcb->ccp_localstate & RACK_PENDING)) { - fsm_sdata(f, CCP_RESETREQ, f->reqid = ++f->id, NULL, 0); - TIMEOUT(ccp_rack_timeout, f, RACKTIMEOUT); - pcb->ccp_localstate |= RACK_PENDING; - } else - pcb->ccp_localstate |= RREQ_REPEAT; - } + } else { + /* + * Send a reset-request to reset the peer's compressor. + * We don't do that if we are still waiting for an + * acknowledgement to a previous reset-request. + */ + if (!(pcb->ccp_localstate & RACK_PENDING)) { + fsm_sdata(f, CCP_RESETREQ, f->reqid = ++f->id, NULL, 0); + TIMEOUT(ccp_rack_timeout, f, RACKTIMEOUT); + pcb->ccp_localstate |= RACK_PENDING; + } else + pcb->ccp_localstate |= RREQ_REPEAT; + } } } #endif /* PPP_DATAINPUT */ @@ -1707,7 +1707,7 @@ void ccp_resetrequest(ppp_pcb *pcb) { fsm *f = &pcb->ccp_fsm; if (f->state != PPP_FSM_OPENED) - return; + return; /* * Send a reset-request to reset the peer's compressor. @@ -1715,11 +1715,11 @@ void ccp_resetrequest(ppp_pcb *pcb) { * acknowledgement to a previous reset-request. */ if (!(pcb->ccp_localstate & RACK_PENDING)) { - fsm_sdata(f, CCP_RESETREQ, f->reqid = ++f->id, NULL, 0); - TIMEOUT(ccp_rack_timeout, f, RACKTIMEOUT); - pcb->ccp_localstate |= RACK_PENDING; + fsm_sdata(f, CCP_RESETREQ, f->reqid = ++f->id, NULL, 0); + TIMEOUT(ccp_rack_timeout, f, RACKTIMEOUT); + pcb->ccp_localstate |= RACK_PENDING; } else - pcb->ccp_localstate |= RREQ_REPEAT; + pcb->ccp_localstate |= RREQ_REPEAT; } /* @@ -1730,11 +1730,11 @@ static void ccp_rack_timeout(void *arg) { ppp_pcb *pcb = f->pcb; if (f->state == PPP_FSM_OPENED && (pcb->ccp_localstate & RREQ_REPEAT)) { - fsm_sdata(f, CCP_RESETREQ, f->reqid, NULL, 0); - TIMEOUT(ccp_rack_timeout, f, RACKTIMEOUT); - pcb->ccp_localstate &= ~RREQ_REPEAT; + fsm_sdata(f, CCP_RESETREQ, f->reqid, NULL, 0); + TIMEOUT(ccp_rack_timeout, f, RACKTIMEOUT); + pcb->ccp_localstate &= ~RREQ_REPEAT; } else - pcb->ccp_localstate &= ~RACK_PENDING; + pcb->ccp_localstate &= ~RACK_PENDING; } #endif /* PPP_SUPPORT && CCP_SUPPORT */ diff --git a/Libraries/LwIP/src/netif/ppp/chap-md5.c b/Libraries/LwIP/src/netif/ppp/chap-md5.c index b04dba0..5a78944 100755 --- a/Libraries/LwIP/src/netif/ppp/chap-md5.c +++ b/Libraries/LwIP/src/netif/ppp/chap-md5.c @@ -43,84 +43,84 @@ #include "netif/ppp/magic.h" #include "netif/ppp/pppcrypt.h" -#define MD5_HASH_SIZE 16 -#define MD5_MIN_CHALLENGE 17 -#define MD5_MAX_CHALLENGE 24 +#define MD5_HASH_SIZE 16 +#define MD5_MIN_CHALLENGE 17 +#define MD5_MAX_CHALLENGE 24 #define MD5_MIN_MAX_POWER_OF_TWO_CHALLENGE 3 /* 2^3-1 = 7, 17+7 = 24 */ #if PPP_SERVER static void chap_md5_generate_challenge(ppp_pcb *pcb, unsigned char *cp) { - int clen; - LWIP_UNUSED_ARG(pcb); + int clen; + LWIP_UNUSED_ARG(pcb); - clen = MD5_MIN_CHALLENGE + magic_pow(MD5_MIN_MAX_POWER_OF_TWO_CHALLENGE); - *cp++ = clen; - magic_random_bytes(cp, clen); + clen = MD5_MIN_CHALLENGE + magic_pow(MD5_MIN_MAX_POWER_OF_TWO_CHALLENGE); + *cp++ = clen; + magic_random_bytes(cp, clen); } static int chap_md5_verify_response(ppp_pcb *pcb, int id, const char *name, - const unsigned char *secret, int secret_len, - const unsigned char *challenge, const unsigned char *response, - char *message, int message_space) { - lwip_md5_context ctx; - unsigned char idbyte = id; - unsigned char hash[MD5_HASH_SIZE]; - int challenge_len, response_len; - LWIP_UNUSED_ARG(name); - LWIP_UNUSED_ARG(pcb); + const unsigned char *secret, int secret_len, + const unsigned char *challenge, const unsigned char *response, + char *message, int message_space) { + lwip_md5_context ctx; + unsigned char idbyte = id; + unsigned char hash[MD5_HASH_SIZE]; + int challenge_len, response_len; + LWIP_UNUSED_ARG(name); + LWIP_UNUSED_ARG(pcb); - challenge_len = *challenge++; - response_len = *response++; - if (response_len == MD5_HASH_SIZE) { - /* Generate hash of ID, secret, challenge */ - lwip_md5_init(&ctx); - lwip_md5_starts(&ctx); - lwip_md5_update(&ctx, &idbyte, 1); - lwip_md5_update(&ctx, secret, secret_len); - lwip_md5_update(&ctx, challenge, challenge_len); - lwip_md5_finish(&ctx, hash); - lwip_md5_free(&ctx); + challenge_len = *challenge++; + response_len = *response++; + if (response_len == MD5_HASH_SIZE) { + /* Generate hash of ID, secret, challenge */ + lwip_md5_init(&ctx); + lwip_md5_starts(&ctx); + lwip_md5_update(&ctx, &idbyte, 1); + lwip_md5_update(&ctx, secret, secret_len); + lwip_md5_update(&ctx, challenge, challenge_len); + lwip_md5_finish(&ctx, hash); + lwip_md5_free(&ctx); - /* Test if our hash matches the peer's response */ - if (memcmp(hash, response, MD5_HASH_SIZE) == 0) { - ppp_slprintf(message, message_space, "Access granted"); - return 1; - } - } - ppp_slprintf(message, message_space, "Access denied"); - return 0; + /* Test if our hash matches the peer's response */ + if (memcmp(hash, response, MD5_HASH_SIZE) == 0) { + ppp_slprintf(message, message_space, "Access granted"); + return 1; + } + } + ppp_slprintf(message, message_space, "Access denied"); + return 0; } #endif /* PPP_SERVER */ static void chap_md5_make_response(ppp_pcb *pcb, unsigned char *response, int id, const char *our_name, - const unsigned char *challenge, const char *secret, int secret_len, - unsigned char *private_) { - lwip_md5_context ctx; - unsigned char idbyte = id; - int challenge_len = *challenge++; - LWIP_UNUSED_ARG(our_name); - LWIP_UNUSED_ARG(private_); - LWIP_UNUSED_ARG(pcb); + const unsigned char *challenge, const char *secret, int secret_len, + unsigned char *private_) { + lwip_md5_context ctx; + unsigned char idbyte = id; + int challenge_len = *challenge++; + LWIP_UNUSED_ARG(our_name); + LWIP_UNUSED_ARG(private_); + LWIP_UNUSED_ARG(pcb); - lwip_md5_init(&ctx); - lwip_md5_starts(&ctx); - lwip_md5_update(&ctx, &idbyte, 1); - lwip_md5_update(&ctx, (const u_char *)secret, secret_len); - lwip_md5_update(&ctx, challenge, challenge_len); - lwip_md5_finish(&ctx, &response[1]); - lwip_md5_free(&ctx); - response[0] = MD5_HASH_SIZE; + lwip_md5_init(&ctx); + lwip_md5_starts(&ctx); + lwip_md5_update(&ctx, &idbyte, 1); + lwip_md5_update(&ctx, (const u_char *)secret, secret_len); + lwip_md5_update(&ctx, challenge, challenge_len); + lwip_md5_finish(&ctx, &response[1]); + lwip_md5_free(&ctx); + response[0] = MD5_HASH_SIZE; } const struct chap_digest_type md5_digest = { - CHAP_MD5, /* code */ + CHAP_MD5, /* code */ #if PPP_SERVER - chap_md5_generate_challenge, - chap_md5_verify_response, + chap_md5_generate_challenge, + chap_md5_verify_response, #endif /* PPP_SERVER */ - chap_md5_make_response, - NULL, /* check_success */ - NULL, /* handle_failure */ + chap_md5_make_response, + NULL, /* check_success */ + NULL, /* handle_failure */ }; #endif /* PPP_SUPPORT && CHAP_SUPPORT */ diff --git a/Libraries/LwIP/src/netif/ppp/chap-new.c b/Libraries/LwIP/src/netif/ppp/chap-new.c index 81d7fe3..486d7e1 100755 --- a/Libraries/LwIP/src/netif/ppp/chap-new.c +++ b/Libraries/LwIP/src/netif/ppp/chap-new.c @@ -52,9 +52,9 @@ #if 0 /* UNUSED */ /* Hook for a plugin to validate CHAP challenge */ int (*chap_verify_hook)(const char *name, const char *ourname, int id, - const struct chap_digest_type *digest, - const unsigned char *challenge, const unsigned char *response, - char *message, int message_space) = NULL; + const struct chap_digest_type *digest, + const unsigned char *challenge, const unsigned char *response, + char *message, int message_space) = NULL; #endif /* UNUSED */ #if PPP_OPTIONS @@ -62,24 +62,24 @@ int (*chap_verify_hook)(const char *name, const char *ourname, int id, * Command-line options. */ static option_t chap_option_list[] = { - { "chap-restart", o_int, &chap_timeout_time, - "Set timeout for CHAP", OPT_PRIO }, - { "chap-max-challenge", o_int, &pcb->settings.chap_max_transmits, - "Set max #xmits for challenge", OPT_PRIO }, - { "chap-interval", o_int, &pcb->settings.chap_rechallenge_time, - "Set interval for rechallenge", OPT_PRIO }, - { NULL } + { "chap-restart", o_int, &chap_timeout_time, + "Set timeout for CHAP", OPT_PRIO }, + { "chap-max-challenge", o_int, &pcb->settings.chap_max_transmits, + "Set max #xmits for challenge", OPT_PRIO }, + { "chap-interval", o_int, &pcb->settings.chap_rechallenge_time, + "Set interval for rechallenge", OPT_PRIO }, + { NULL } }; #endif /* PPP_OPTIONS */ /* Values for flags in chap_client_state and chap_server_state */ -#define LOWERUP 1 -#define AUTH_STARTED 2 -#define AUTH_DONE 4 -#define AUTH_FAILED 8 -#define TIMEOUT_PENDING 0x10 -#define CHALLENGE_VALID 0x20 +#define LOWERUP 1 +#define AUTH_STARTED 2 +#define AUTH_DONE 4 +#define AUTH_FAILED 8 +#define TIMEOUT_PENDING 0x10 +#define CHALLENGE_VALID 0x20 /* * Prototypes. @@ -91,21 +91,21 @@ static void chap_lowerdown(ppp_pcb *pcb); static void chap_timeout(void *arg); static void chap_generate_challenge(ppp_pcb *pcb); static void chap_handle_response(ppp_pcb *pcb, int code, - unsigned char *pkt, int len); + unsigned char *pkt, int len); static int chap_verify_response(ppp_pcb *pcb, const char *name, const char *ourname, int id, - const struct chap_digest_type *digest, - const unsigned char *challenge, const unsigned char *response, - char *message, int message_space); + const struct chap_digest_type *digest, + const unsigned char *challenge, const unsigned char *response, + char *message, int message_space); #endif /* PPP_SERVER */ static void chap_respond(ppp_pcb *pcb, int id, - unsigned char *pkt, int len); + unsigned char *pkt, int len); static void chap_handle_status(ppp_pcb *pcb, int code, int id, - unsigned char *pkt, int len); + unsigned char *pkt, int len); static void chap_protrej(ppp_pcb *pcb); static void chap_input(ppp_pcb *pcb, unsigned char *pkt, int pktlen); #if PRINTPKT_SUPPORT static int chap_print_pkt(const unsigned char *p, int plen, - void (*printer) (void *, const char *, ...), void *arg); + void (*printer) (void *, const char *, ...), void *arg); #endif /* PRINTPKT_SUPPORT */ /* List of digest types that we know about */ @@ -122,12 +122,12 @@ static const struct chap_digest_type* const chap_digests[] = { * chap_init - reset to initial state. */ static void chap_init(ppp_pcb *pcb) { - LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(pcb); #if 0 /* Not necessary, everything is cleared in ppp_new() */ - memset(&pcb->chap_client, 0, sizeof(chap_client_state)); + memset(&pcb->chap_client, 0, sizeof(chap_client_state)); #if PPP_SERVER - memset(&pcb->chap_server, 0, sizeof(chap_server_state)); + memset(&pcb->chap_server, 0, sizeof(chap_server_state)); #endif /* PPP_SERVER */ #endif /* 0 */ } @@ -137,21 +137,21 @@ static void chap_init(ppp_pcb *pcb) { */ static void chap_lowerup(ppp_pcb *pcb) { - pcb->chap_client.flags |= LOWERUP; + pcb->chap_client.flags |= LOWERUP; #if PPP_SERVER - pcb->chap_server.flags |= LOWERUP; - if (pcb->chap_server.flags & AUTH_STARTED) - chap_timeout(pcb); + pcb->chap_server.flags |= LOWERUP; + if (pcb->chap_server.flags & AUTH_STARTED) + chap_timeout(pcb); #endif /* PPP_SERVER */ } static void chap_lowerdown(ppp_pcb *pcb) { - pcb->chap_client.flags = 0; + pcb->chap_client.flags = 0; #if PPP_SERVER - if (pcb->chap_server.flags & TIMEOUT_PENDING) - UNTIMEOUT(chap_timeout, pcb); - pcb->chap_server.flags = 0; + if (pcb->chap_server.flags & TIMEOUT_PENDING) + UNTIMEOUT(chap_timeout, pcb); + pcb->chap_server.flags = 0; #endif /* PPP_SERVER */ } @@ -162,27 +162,27 @@ static void chap_lowerdown(ppp_pcb *pcb) { * otherwise we wait for the lower layer to come up. */ void chap_auth_peer(ppp_pcb *pcb, const char *our_name, int digest_code) { - const struct chap_digest_type *dp; - int i; + const struct chap_digest_type *dp; + int i; - if (pcb->chap_server.flags & AUTH_STARTED) { - ppp_error("CHAP: peer authentication already started!"); - return; - } - for (i = 0; (dp = chap_digests[i]) != NULL; ++i) - if (dp->code == digest_code) - break; - if (dp == NULL) - ppp_fatal("CHAP digest 0x%x requested but not available", - digest_code); + if (pcb->chap_server.flags & AUTH_STARTED) { + ppp_error("CHAP: peer authentication already started!"); + return; + } + for (i = 0; (dp = chap_digests[i]) != NULL; ++i) + if (dp->code == digest_code) + break; + if (dp == NULL) + ppp_fatal("CHAP digest 0x%x requested but not available", + digest_code); - pcb->chap_server.digest = dp; - pcb->chap_server.name = our_name; - /* Start with a random ID value */ - pcb->chap_server.id = magic(); - pcb->chap_server.flags |= AUTH_STARTED; - if (pcb->chap_server.flags & LOWERUP) - chap_timeout(pcb); + pcb->chap_server.digest = dp; + pcb->chap_server.name = our_name; + /* Start with a random ID value */ + pcb->chap_server.id = magic(); + pcb->chap_server.flags |= AUTH_STARTED; + if (pcb->chap_server.flags & LOWERUP) + chap_timeout(pcb); } #endif /* PPP_SERVER */ @@ -191,27 +191,27 @@ void chap_auth_peer(ppp_pcb *pcb, const char *our_name, int digest_code) { * There isn't much to do until we receive a challenge. */ void chap_auth_with_peer(ppp_pcb *pcb, const char *our_name, int digest_code) { - const struct chap_digest_type *dp; - int i; + const struct chap_digest_type *dp; + int i; - if(NULL == our_name) - return; + if(NULL == our_name) + return; - if (pcb->chap_client.flags & AUTH_STARTED) { - ppp_error("CHAP: authentication with peer already started!"); - return; - } - for (i = 0; (dp = chap_digests[i]) != NULL; ++i) - if (dp->code == digest_code) - break; + if (pcb->chap_client.flags & AUTH_STARTED) { + ppp_error("CHAP: authentication with peer already started!"); + return; + } + for (i = 0; (dp = chap_digests[i]) != NULL; ++i) + if (dp->code == digest_code) + break; - if (dp == NULL) - ppp_fatal("CHAP digest 0x%x requested but not available", - digest_code); + if (dp == NULL) + ppp_fatal("CHAP digest 0x%x requested but not available", + digest_code); - pcb->chap_client.digest = dp; - pcb->chap_client.name = our_name; - pcb->chap_client.flags |= AUTH_STARTED; + pcb->chap_client.digest = dp; + pcb->chap_client.name = our_name; + pcb->chap_client.flags |= AUTH_STARTED; } #if PPP_SERVER @@ -221,33 +221,33 @@ void chap_auth_with_peer(ppp_pcb *pcb, const char *our_name, int digest_code) { * or a new challenge to start re-authentication. */ static void chap_timeout(void *arg) { - ppp_pcb *pcb = (ppp_pcb*)arg; - struct pbuf *p; + ppp_pcb *pcb = (ppp_pcb*)arg; + struct pbuf *p; - pcb->chap_server.flags &= ~TIMEOUT_PENDING; - if ((pcb->chap_server.flags & CHALLENGE_VALID) == 0) { - pcb->chap_server.challenge_xmits = 0; - chap_generate_challenge(pcb); - pcb->chap_server.flags |= CHALLENGE_VALID; - } else if (pcb->chap_server.challenge_xmits >= pcb->settings.chap_max_transmits) { - pcb->chap_server.flags &= ~CHALLENGE_VALID; - pcb->chap_server.flags |= AUTH_DONE | AUTH_FAILED; - auth_peer_fail(pcb, PPP_CHAP); - return; - } + pcb->chap_server.flags &= ~TIMEOUT_PENDING; + if ((pcb->chap_server.flags & CHALLENGE_VALID) == 0) { + pcb->chap_server.challenge_xmits = 0; + chap_generate_challenge(pcb); + pcb->chap_server.flags |= CHALLENGE_VALID; + } else if (pcb->chap_server.challenge_xmits >= pcb->settings.chap_max_transmits) { + pcb->chap_server.flags &= ~CHALLENGE_VALID; + pcb->chap_server.flags |= AUTH_DONE | AUTH_FAILED; + auth_peer_fail(pcb, PPP_CHAP); + return; + } - p = pbuf_alloc(PBUF_RAW, (u16_t)(pcb->chap_server.challenge_pktlen), PPP_CTRL_PBUF_TYPE); - if(NULL == p) - return; - if(p->tot_len != p->len) { - pbuf_free(p); - return; - } - MEMCPY(p->payload, pcb->chap_server.challenge, pcb->chap_server.challenge_pktlen); - ppp_write(pcb, p); - ++pcb->chap_server.challenge_xmits; - pcb->chap_server.flags |= TIMEOUT_PENDING; - TIMEOUT(chap_timeout, arg, pcb->settings.chap_timeout_time); + p = pbuf_alloc(PBUF_RAW, (u16_t)(pcb->chap_server.challenge_pktlen), PPP_CTRL_PBUF_TYPE); + if(NULL == p) + return; + if(p->tot_len != p->len) { + pbuf_free(p); + return; + } + MEMCPY(p->payload, pcb->chap_server.challenge, pcb->chap_server.challenge_pktlen); + ppp_write(pcb, p); + ++pcb->chap_server.challenge_xmits; + pcb->chap_server.flags |= TIMEOUT_PENDING; + TIMEOUT(chap_timeout, arg, pcb->settings.chap_timeout_time); } /* @@ -255,152 +255,152 @@ static void chap_timeout(void *arg) { * the challenge packet in pcb->chap_server.challenge_pkt. */ static void chap_generate_challenge(ppp_pcb *pcb) { - int clen = 1, nlen, len; - unsigned char *p; + int clen = 1, nlen, len; + unsigned char *p; - p = pcb->chap_server.challenge; - MAKEHEADER(p, PPP_CHAP); - p += CHAP_HDRLEN; - pcb->chap_server.digest->generate_challenge(pcb, p); - clen = *p; - nlen = strlen(pcb->chap_server.name); - memcpy(p + 1 + clen, pcb->chap_server.name, nlen); + p = pcb->chap_server.challenge; + MAKEHEADER(p, PPP_CHAP); + p += CHAP_HDRLEN; + pcb->chap_server.digest->generate_challenge(pcb, p); + clen = *p; + nlen = strlen(pcb->chap_server.name); + memcpy(p + 1 + clen, pcb->chap_server.name, nlen); - len = CHAP_HDRLEN + 1 + clen + nlen; - pcb->chap_server.challenge_pktlen = PPP_HDRLEN + len; + len = CHAP_HDRLEN + 1 + clen + nlen; + pcb->chap_server.challenge_pktlen = PPP_HDRLEN + len; - p = pcb->chap_server.challenge + PPP_HDRLEN; - p[0] = CHAP_CHALLENGE; - p[1] = ++pcb->chap_server.id; - p[2] = len >> 8; - p[3] = len; + p = pcb->chap_server.challenge + PPP_HDRLEN; + p[0] = CHAP_CHALLENGE; + p[1] = ++pcb->chap_server.id; + p[2] = len >> 8; + p[3] = len; } /* * chap_handle_response - check the response to our challenge. */ static void chap_handle_response(ppp_pcb *pcb, int id, - unsigned char *pkt, int len) { - int response_len, ok, mlen; - const unsigned char *response; - unsigned char *outp; - struct pbuf *p; - const char *name = NULL; /* initialized to shut gcc up */ + unsigned char *pkt, int len) { + int response_len, ok, mlen; + const unsigned char *response; + unsigned char *outp; + struct pbuf *p; + const char *name = NULL; /* initialized to shut gcc up */ #if 0 /* UNUSED */ - int (*verifier)(const char *, const char *, int, const struct chap_digest_type *, - const unsigned char *, const unsigned char *, char *, int); + int (*verifier)(const char *, const char *, int, const struct chap_digest_type *, + const unsigned char *, const unsigned char *, char *, int); #endif /* UNUSED */ - char rname[MAXNAMELEN+1]; - char message[256]; + char rname[MAXNAMELEN+1]; + char message[256]; - if ((pcb->chap_server.flags & LOWERUP) == 0) - return; - if (id != pcb->chap_server.challenge[PPP_HDRLEN+1] || len < 2) - return; - if (pcb->chap_server.flags & CHALLENGE_VALID) { - response = pkt; - GETCHAR(response_len, pkt); - len -= response_len + 1; /* length of name */ - name = (char *)pkt + response_len; - if (len < 0) - return; + if ((pcb->chap_server.flags & LOWERUP) == 0) + return; + if (id != pcb->chap_server.challenge[PPP_HDRLEN+1] || len < 2) + return; + if (pcb->chap_server.flags & CHALLENGE_VALID) { + response = pkt; + GETCHAR(response_len, pkt); + len -= response_len + 1; /* length of name */ + name = (char *)pkt + response_len; + if (len < 0) + return; - if (pcb->chap_server.flags & TIMEOUT_PENDING) { - pcb->chap_server.flags &= ~TIMEOUT_PENDING; - UNTIMEOUT(chap_timeout, pcb); - } + if (pcb->chap_server.flags & TIMEOUT_PENDING) { + pcb->chap_server.flags &= ~TIMEOUT_PENDING; + UNTIMEOUT(chap_timeout, pcb); + } #if PPP_REMOTENAME - if (pcb->settings.explicit_remote) { - name = pcb->remote_name; - } else + if (pcb->settings.explicit_remote) { + name = pcb->remote_name; + } else #endif /* PPP_REMOTENAME */ - { - /* Null terminate and clean remote name. */ - ppp_slprintf(rname, sizeof(rname), "%.*v", len, name); - name = rname; - } + { + /* Null terminate and clean remote name. */ + ppp_slprintf(rname, sizeof(rname), "%.*v", len, name); + name = rname; + } #if 0 /* UNUSED */ - if (chap_verify_hook) - verifier = chap_verify_hook; - else - verifier = chap_verify_response; - ok = (*verifier)(name, pcb->chap_server.name, id, pcb->chap_server.digest, - pcb->chap_server.challenge + PPP_HDRLEN + CHAP_HDRLEN, - response, pcb->chap_server.message, sizeof(pcb->chap_server.message)); + if (chap_verify_hook) + verifier = chap_verify_hook; + else + verifier = chap_verify_response; + ok = (*verifier)(name, pcb->chap_server.name, id, pcb->chap_server.digest, + pcb->chap_server.challenge + PPP_HDRLEN + CHAP_HDRLEN, + response, pcb->chap_server.message, sizeof(pcb->chap_server.message)); #endif /* UNUSED */ - ok = chap_verify_response(pcb, name, pcb->chap_server.name, id, pcb->chap_server.digest, + ok = chap_verify_response(pcb, name, pcb->chap_server.name, id, pcb->chap_server.digest, pcb->chap_server.challenge + PPP_HDRLEN + CHAP_HDRLEN, response, message, sizeof(message)); #if 0 /* UNUSED */ - if (!ok || !auth_number()) { + if (!ok || !auth_number()) { #endif /* UNUSED */ - if (!ok) { - pcb->chap_server.flags |= AUTH_FAILED; - ppp_warn("Peer %q failed CHAP authentication", name); - } - } else if ((pcb->chap_server.flags & AUTH_DONE) == 0) - return; + if (!ok) { + pcb->chap_server.flags |= AUTH_FAILED; + ppp_warn("Peer %q failed CHAP authentication", name); + } + } else if ((pcb->chap_server.flags & AUTH_DONE) == 0) + return; - /* send the response */ - mlen = strlen(message); - len = CHAP_HDRLEN + mlen; - p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN +len), PPP_CTRL_PBUF_TYPE); - if(NULL == p) - return; - if(p->tot_len != p->len) { - pbuf_free(p); - return; - } + /* send the response */ + mlen = strlen(message); + len = CHAP_HDRLEN + mlen; + p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN +len), PPP_CTRL_PBUF_TYPE); + if(NULL == p) + return; + if(p->tot_len != p->len) { + pbuf_free(p); + return; + } - outp = (unsigned char *)p->payload; - MAKEHEADER(outp, PPP_CHAP); + outp = (unsigned char *)p->payload; + MAKEHEADER(outp, PPP_CHAP); - outp[0] = (pcb->chap_server.flags & AUTH_FAILED)? CHAP_FAILURE: CHAP_SUCCESS; - outp[1] = id; - outp[2] = len >> 8; - outp[3] = len; - if (mlen > 0) - memcpy(outp + CHAP_HDRLEN, message, mlen); - ppp_write(pcb, p); + outp[0] = (pcb->chap_server.flags & AUTH_FAILED)? CHAP_FAILURE: CHAP_SUCCESS; + outp[1] = id; + outp[2] = len >> 8; + outp[3] = len; + if (mlen > 0) + memcpy(outp + CHAP_HDRLEN, message, mlen); + ppp_write(pcb, p); - if (pcb->chap_server.flags & CHALLENGE_VALID) { - pcb->chap_server.flags &= ~CHALLENGE_VALID; - if (!(pcb->chap_server.flags & AUTH_DONE) && !(pcb->chap_server.flags & AUTH_FAILED)) { + if (pcb->chap_server.flags & CHALLENGE_VALID) { + pcb->chap_server.flags &= ~CHALLENGE_VALID; + if (!(pcb->chap_server.flags & AUTH_DONE) && !(pcb->chap_server.flags & AUTH_FAILED)) { #if 0 /* UNUSED */ - /* - * Auth is OK, so now we need to check session restrictions - * to ensure everything is OK, but only if we used a - * plugin, and only if we're configured to check. This - * allows us to do PAM checks on PPP servers that - * authenticate against ActiveDirectory, and use AD for - * account info (like when using Winbind integrated with - * PAM). - */ - if (session_mgmt && - session_check(name, NULL, devnam, NULL) == 0) { - pcb->chap_server.flags |= AUTH_FAILED; - ppp_warn("Peer %q failed CHAP Session verification", name); - } + /* + * Auth is OK, so now we need to check session restrictions + * to ensure everything is OK, but only if we used a + * plugin, and only if we're configured to check. This + * allows us to do PAM checks on PPP servers that + * authenticate against ActiveDirectory, and use AD for + * account info (like when using Winbind integrated with + * PAM). + */ + if (session_mgmt && + session_check(name, NULL, devnam, NULL) == 0) { + pcb->chap_server.flags |= AUTH_FAILED; + ppp_warn("Peer %q failed CHAP Session verification", name); + } #endif /* UNUSED */ - } - if (pcb->chap_server.flags & AUTH_FAILED) { - auth_peer_fail(pcb, PPP_CHAP); - } else { - if ((pcb->chap_server.flags & AUTH_DONE) == 0) - auth_peer_success(pcb, PPP_CHAP, - pcb->chap_server.digest->code, - name, strlen(name)); - if (pcb->settings.chap_rechallenge_time) { - pcb->chap_server.flags |= TIMEOUT_PENDING; - TIMEOUT(chap_timeout, pcb, - pcb->settings.chap_rechallenge_time); - } - } - pcb->chap_server.flags |= AUTH_DONE; - } + } + if (pcb->chap_server.flags & AUTH_FAILED) { + auth_peer_fail(pcb, PPP_CHAP); + } else { + if ((pcb->chap_server.flags & AUTH_DONE) == 0) + auth_peer_success(pcb, PPP_CHAP, + pcb->chap_server.digest->code, + name, strlen(name)); + if (pcb->settings.chap_rechallenge_time) { + pcb->chap_server.flags |= TIMEOUT_PENDING; + TIMEOUT(chap_timeout, pcb, + pcb->settings.chap_rechallenge_time); + } + } + pcb->chap_server.flags |= AUTH_DONE; + } } /* @@ -409,23 +409,23 @@ static void chap_handle_response(ppp_pcb *pcb, int id, * succeeded), or 0 if it doesn't. */ static int chap_verify_response(ppp_pcb *pcb, const char *name, const char *ourname, int id, - const struct chap_digest_type *digest, - const unsigned char *challenge, const unsigned char *response, - char *message, int message_space) { - int ok; - unsigned char secret[MAXSECRETLEN]; - int secret_len; + const struct chap_digest_type *digest, + const unsigned char *challenge, const unsigned char *response, + char *message, int message_space) { + int ok; + unsigned char secret[MAXSECRETLEN]; + int secret_len; - /* Get the secret that the peer is supposed to know */ - if (!get_secret(pcb, name, ourname, (char *)secret, &secret_len, 1)) { - ppp_error("No CHAP secret found for authenticating %q", name); - return 0; - } - ok = digest->verify_response(pcb, id, name, secret, secret_len, challenge, - response, message, message_space); - memset(secret, 0, sizeof(secret)); + /* Get the secret that the peer is supposed to know */ + if (!get_secret(pcb, name, ourname, (char *)secret, &secret_len, 1)) { + ppp_error("No CHAP secret found for authenticating %q", name); + return 0; + } + ok = digest->verify_response(pcb, id, name, secret, secret_len, challenge, + response, message, message_space); + memset(secret, 0, sizeof(secret)); - return ok; + return ok; } #endif /* PPP_SERVER */ @@ -433,153 +433,153 @@ static int chap_verify_response(ppp_pcb *pcb, const char *name, const char *ourn * chap_respond - Generate and send a response to a challenge. */ static void chap_respond(ppp_pcb *pcb, int id, - unsigned char *pkt, int len) { - int clen, nlen; - int secret_len; - struct pbuf *p; - u_char *outp; - char rname[MAXNAMELEN+1]; - char secret[MAXSECRETLEN+1]; + unsigned char *pkt, int len) { + int clen, nlen; + int secret_len; + struct pbuf *p; + u_char *outp; + char rname[MAXNAMELEN+1]; + char secret[MAXSECRETLEN+1]; - p = pbuf_alloc(PBUF_RAW, (u16_t)(RESP_MAX_PKTLEN), PPP_CTRL_PBUF_TYPE); - if(NULL == p) - return; - if(p->tot_len != p->len) { - pbuf_free(p); - return; - } + p = pbuf_alloc(PBUF_RAW, (u16_t)(RESP_MAX_PKTLEN), PPP_CTRL_PBUF_TYPE); + if(NULL == p) + return; + if(p->tot_len != p->len) { + pbuf_free(p); + return; + } - if ((pcb->chap_client.flags & (LOWERUP | AUTH_STARTED)) != (LOWERUP | AUTH_STARTED)) - return; /* not ready */ - if (len < 2 || len < pkt[0] + 1) - return; /* too short */ - clen = pkt[0]; - nlen = len - (clen + 1); + if ((pcb->chap_client.flags & (LOWERUP | AUTH_STARTED)) != (LOWERUP | AUTH_STARTED)) + return; /* not ready */ + if (len < 2 || len < pkt[0] + 1) + return; /* too short */ + clen = pkt[0]; + nlen = len - (clen + 1); - /* Null terminate and clean remote name. */ - ppp_slprintf(rname, sizeof(rname), "%.*v", nlen, pkt + clen + 1); + /* Null terminate and clean remote name. */ + ppp_slprintf(rname, sizeof(rname), "%.*v", nlen, pkt + clen + 1); #if PPP_REMOTENAME - /* Microsoft doesn't send their name back in the PPP packet */ - if (pcb->settings.explicit_remote || (pcb->settings.remote_name[0] != 0 && rname[0] == 0)) - strlcpy(rname, pcb->settings.remote_name, sizeof(rname)); + /* Microsoft doesn't send their name back in the PPP packet */ + if (pcb->settings.explicit_remote || (pcb->settings.remote_name[0] != 0 && rname[0] == 0)) + strlcpy(rname, pcb->settings.remote_name, sizeof(rname)); #endif /* PPP_REMOTENAME */ - /* get secret for authenticating ourselves with the specified host */ - if (!get_secret(pcb, pcb->chap_client.name, rname, secret, &secret_len, 0)) { - secret_len = 0; /* assume null secret if can't find one */ - ppp_warn("No CHAP secret found for authenticating us to %q", rname); - } + /* get secret for authenticating ourselves with the specified host */ + if (!get_secret(pcb, pcb->chap_client.name, rname, secret, &secret_len, 0)) { + secret_len = 0; /* assume null secret if can't find one */ + ppp_warn("No CHAP secret found for authenticating us to %q", rname); + } - outp = (u_char*)p->payload; - MAKEHEADER(outp, PPP_CHAP); - outp += CHAP_HDRLEN; + outp = (u_char*)p->payload; + MAKEHEADER(outp, PPP_CHAP); + outp += CHAP_HDRLEN; - pcb->chap_client.digest->make_response(pcb, outp, id, pcb->chap_client.name, pkt, - secret, secret_len, pcb->chap_client.priv); - memset(secret, 0, secret_len); + pcb->chap_client.digest->make_response(pcb, outp, id, pcb->chap_client.name, pkt, + secret, secret_len, pcb->chap_client.priv); + memset(secret, 0, secret_len); - clen = *outp; - nlen = strlen(pcb->chap_client.name); - memcpy(outp + clen + 1, pcb->chap_client.name, nlen); + clen = *outp; + nlen = strlen(pcb->chap_client.name); + memcpy(outp + clen + 1, pcb->chap_client.name, nlen); - outp = (u_char*)p->payload + PPP_HDRLEN; - len = CHAP_HDRLEN + clen + 1 + nlen; - outp[0] = CHAP_RESPONSE; - outp[1] = id; - outp[2] = len >> 8; - outp[3] = len; + outp = (u_char*)p->payload + PPP_HDRLEN; + len = CHAP_HDRLEN + clen + 1 + nlen; + outp[0] = CHAP_RESPONSE; + outp[1] = id; + outp[2] = len >> 8; + outp[3] = len; - pbuf_realloc(p, PPP_HDRLEN + len); - ppp_write(pcb, p); + pbuf_realloc(p, PPP_HDRLEN + len); + ppp_write(pcb, p); } static void chap_handle_status(ppp_pcb *pcb, int code, int id, - unsigned char *pkt, int len) { - const char *msg = NULL; - LWIP_UNUSED_ARG(id); + unsigned char *pkt, int len) { + const char *msg = NULL; + LWIP_UNUSED_ARG(id); - if ((pcb->chap_client.flags & (AUTH_DONE|AUTH_STARTED|LOWERUP)) - != (AUTH_STARTED|LOWERUP)) - return; - pcb->chap_client.flags |= AUTH_DONE; + if ((pcb->chap_client.flags & (AUTH_DONE|AUTH_STARTED|LOWERUP)) + != (AUTH_STARTED|LOWERUP)) + return; + pcb->chap_client.flags |= AUTH_DONE; - if (code == CHAP_SUCCESS) { - /* used for MS-CHAP v2 mutual auth, yuck */ - if (pcb->chap_client.digest->check_success != NULL) { - if (!(*pcb->chap_client.digest->check_success)(pcb, pkt, len, pcb->chap_client.priv)) - code = CHAP_FAILURE; - } else - msg = "CHAP authentication succeeded"; - } else { - if (pcb->chap_client.digest->handle_failure != NULL) - (*pcb->chap_client.digest->handle_failure)(pcb, pkt, len); - else - msg = "CHAP authentication failed"; - } - if (msg) { - if (len > 0) - ppp_info("%s: %.*v", msg, len, pkt); - else - ppp_info("%s", msg); - } - if (code == CHAP_SUCCESS) - auth_withpeer_success(pcb, PPP_CHAP, pcb->chap_client.digest->code); - else { - pcb->chap_client.flags |= AUTH_FAILED; - ppp_error("CHAP authentication failed"); - auth_withpeer_fail(pcb, PPP_CHAP); - } + if (code == CHAP_SUCCESS) { + /* used for MS-CHAP v2 mutual auth, yuck */ + if (pcb->chap_client.digest->check_success != NULL) { + if (!(*pcb->chap_client.digest->check_success)(pcb, pkt, len, pcb->chap_client.priv)) + code = CHAP_FAILURE; + } else + msg = "CHAP authentication succeeded"; + } else { + if (pcb->chap_client.digest->handle_failure != NULL) + (*pcb->chap_client.digest->handle_failure)(pcb, pkt, len); + else + msg = "CHAP authentication failed"; + } + if (msg) { + if (len > 0) + ppp_info("%s: %.*v", msg, len, pkt); + else + ppp_info("%s", msg); + } + if (code == CHAP_SUCCESS) + auth_withpeer_success(pcb, PPP_CHAP, pcb->chap_client.digest->code); + else { + pcb->chap_client.flags |= AUTH_FAILED; + ppp_error("CHAP authentication failed"); + auth_withpeer_fail(pcb, PPP_CHAP); + } } static void chap_input(ppp_pcb *pcb, unsigned char *pkt, int pktlen) { - unsigned char code, id; - int len; + unsigned char code, id; + int len; - if (pktlen < CHAP_HDRLEN) - return; - GETCHAR(code, pkt); - GETCHAR(id, pkt); - GETSHORT(len, pkt); - if (len < CHAP_HDRLEN || len > pktlen) - return; - len -= CHAP_HDRLEN; + if (pktlen < CHAP_HDRLEN) + return; + GETCHAR(code, pkt); + GETCHAR(id, pkt); + GETSHORT(len, pkt); + if (len < CHAP_HDRLEN || len > pktlen) + return; + len -= CHAP_HDRLEN; - switch (code) { - case CHAP_CHALLENGE: - chap_respond(pcb, id, pkt, len); - break; + switch (code) { + case CHAP_CHALLENGE: + chap_respond(pcb, id, pkt, len); + break; #if PPP_SERVER - case CHAP_RESPONSE: - chap_handle_response(pcb, id, pkt, len); - break; + case CHAP_RESPONSE: + chap_handle_response(pcb, id, pkt, len); + break; #endif /* PPP_SERVER */ - case CHAP_FAILURE: - case CHAP_SUCCESS: - chap_handle_status(pcb, code, id, pkt, len); - break; - default: - break; - } + case CHAP_FAILURE: + case CHAP_SUCCESS: + chap_handle_status(pcb, code, id, pkt, len); + break; + default: + break; + } } static void chap_protrej(ppp_pcb *pcb) { #if PPP_SERVER - if (pcb->chap_server.flags & TIMEOUT_PENDING) { - pcb->chap_server.flags &= ~TIMEOUT_PENDING; - UNTIMEOUT(chap_timeout, pcb); - } - if (pcb->chap_server.flags & AUTH_STARTED) { - pcb->chap_server.flags = 0; - auth_peer_fail(pcb, PPP_CHAP); - } + if (pcb->chap_server.flags & TIMEOUT_PENDING) { + pcb->chap_server.flags &= ~TIMEOUT_PENDING; + UNTIMEOUT(chap_timeout, pcb); + } + if (pcb->chap_server.flags & AUTH_STARTED) { + pcb->chap_server.flags = 0; + auth_peer_fail(pcb, PPP_CHAP); + } #endif /* PPP_SERVER */ - if ((pcb->chap_client.flags & (AUTH_STARTED|AUTH_DONE)) == AUTH_STARTED) { - pcb->chap_client.flags &= ~AUTH_STARTED; - ppp_error("CHAP authentication failed due to protocol-reject"); - auth_withpeer_fail(pcb, PPP_CHAP); - } + if ((pcb->chap_client.flags & (AUTH_STARTED|AUTH_DONE)) == AUTH_STARTED) { + pcb->chap_client.flags &= ~AUTH_STARTED; + ppp_error("CHAP authentication failed due to protocol-reject"); + auth_withpeer_fail(pcb, PPP_CHAP); + } } #if PRINTPKT_SUPPORT @@ -587,90 +587,90 @@ static void chap_protrej(ppp_pcb *pcb) { * chap_print_pkt - print the contents of a CHAP packet. */ static const char* const chap_code_names[] = { - "Challenge", "Response", "Success", "Failure" + "Challenge", "Response", "Success", "Failure" }; static int chap_print_pkt(const unsigned char *p, int plen, - void (*printer) (void *, const char *, ...), void *arg) { - int code, id, len; - int clen, nlen; - unsigned char x; + void (*printer) (void *, const char *, ...), void *arg) { + int code, id, len; + int clen, nlen; + unsigned char x; - if (plen < CHAP_HDRLEN) - return 0; - GETCHAR(code, p); - GETCHAR(id, p); - GETSHORT(len, p); - if (len < CHAP_HDRLEN || len > plen) - return 0; + if (plen < CHAP_HDRLEN) + return 0; + GETCHAR(code, p); + GETCHAR(id, p); + GETSHORT(len, p); + if (len < CHAP_HDRLEN || len > plen) + return 0; - if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(chap_code_names)) - printer(arg, " %s", chap_code_names[code-1]); - else - printer(arg, " code=0x%x", code); - printer(arg, " id=0x%x", id); - len -= CHAP_HDRLEN; - switch (code) { - case CHAP_CHALLENGE: - case CHAP_RESPONSE: - if (len < 1) - break; - clen = p[0]; - if (len < clen + 1) - break; - ++p; - nlen = len - clen - 1; - printer(arg, " <"); - for (; clen > 0; --clen) { - GETCHAR(x, p); - printer(arg, "%.2x", x); - } - printer(arg, ">, name = "); - ppp_print_string(p, nlen, printer, arg); - break; - case CHAP_FAILURE: - case CHAP_SUCCESS: - printer(arg, " "); - ppp_print_string(p, len, printer, arg); - break; - default: - for (clen = len; clen > 0; --clen) { - GETCHAR(x, p); - printer(arg, " %.2x", x); - } - /* no break */ - } + if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(chap_code_names)) + printer(arg, " %s", chap_code_names[code-1]); + else + printer(arg, " code=0x%x", code); + printer(arg, " id=0x%x", id); + len -= CHAP_HDRLEN; + switch (code) { + case CHAP_CHALLENGE: + case CHAP_RESPONSE: + if (len < 1) + break; + clen = p[0]; + if (len < clen + 1) + break; + ++p; + nlen = len - clen - 1; + printer(arg, " <"); + for (; clen > 0; --clen) { + GETCHAR(x, p); + printer(arg, "%.2x", x); + } + printer(arg, ">, name = "); + ppp_print_string(p, nlen, printer, arg); + break; + case CHAP_FAILURE: + case CHAP_SUCCESS: + printer(arg, " "); + ppp_print_string(p, len, printer, arg); + break; + default: + for (clen = len; clen > 0; --clen) { + GETCHAR(x, p); + printer(arg, " %.2x", x); + } + /* no break */ + } - return len + CHAP_HDRLEN; + return len + CHAP_HDRLEN; } #endif /* PRINTPKT_SUPPORT */ const struct protent chap_protent = { - PPP_CHAP, - chap_init, - chap_input, - chap_protrej, - chap_lowerup, - chap_lowerdown, - NULL, /* open */ - NULL, /* close */ + PPP_CHAP, + chap_init, + chap_input, + chap_protrej, + chap_lowerup, + chap_lowerdown, + NULL, /* open */ + NULL, /* close */ #if PRINTPKT_SUPPORT - chap_print_pkt, + chap_print_pkt, #endif /* PRINTPKT_SUPPORT */ #if PPP_DATAINPUT - NULL, /* datainput */ + NULL, /* datainput */ #endif /* PPP_DATAINPUT */ #if PRINTPKT_SUPPORT - "CHAP", /* name */ - NULL, /* data_name */ + "CHAP", /* name */ + NULL, /* data_name */ #endif /* PRINTPKT_SUPPORT */ #if PPP_OPTIONS - chap_option_list, - NULL, /* check_options */ + chap_option_list, + NULL, /* check_options */ #endif /* PPP_OPTIONS */ #if DEMAND_SUPPORT - NULL, - NULL + NULL, + NULL #endif /* DEMAND_SUPPORT */ }; diff --git a/Libraries/LwIP/src/netif/ppp/chap_ms.c b/Libraries/LwIP/src/netif/ppp/chap_ms.c index a15afc7..c1533e0 100755 --- a/Libraries/LwIP/src/netif/ppp/chap_ms.c +++ b/Libraries/LwIP/src/netif/ppp/chap_ms.c @@ -97,41 +97,41 @@ #include "netif/ppp/mppe.h" /* For mppe_sha1_pad*, mppe_set_key() */ #endif /* MPPE_SUPPORT */ -#define SHA1_SIGNATURE_SIZE 20 -#define MD4_SIGNATURE_SIZE 16 /* 16 bytes in a MD4 message digest */ -#define MAX_NT_PASSWORD 256 /* Max (Unicode) chars in an NT pass */ +#define SHA1_SIGNATURE_SIZE 20 +#define MD4_SIGNATURE_SIZE 16 /* 16 bytes in a MD4 message digest */ +#define MAX_NT_PASSWORD 256 /* Max (Unicode) chars in an NT pass */ -#define MS_CHAP_RESPONSE_LEN 49 /* Response length for MS-CHAP */ -#define MS_CHAP2_RESPONSE_LEN 49 /* Response length for MS-CHAPv2 */ -#define MS_AUTH_RESPONSE_LENGTH 40 /* MS-CHAPv2 authenticator response, */ - /* as ASCII */ +#define MS_CHAP_RESPONSE_LEN 49 /* Response length for MS-CHAP */ +#define MS_CHAP2_RESPONSE_LEN 49 /* Response length for MS-CHAPv2 */ +#define MS_AUTH_RESPONSE_LENGTH 40 /* MS-CHAPv2 authenticator response, */ + /* as ASCII */ /* Error codes for MS-CHAP failure messages. */ -#define MS_CHAP_ERROR_RESTRICTED_LOGON_HOURS 646 -#define MS_CHAP_ERROR_ACCT_DISABLED 647 -#define MS_CHAP_ERROR_PASSWD_EXPIRED 648 -#define MS_CHAP_ERROR_NO_DIALIN_PERMISSION 649 -#define MS_CHAP_ERROR_AUTHENTICATION_FAILURE 691 -#define MS_CHAP_ERROR_CHANGING_PASSWORD 709 +#define MS_CHAP_ERROR_RESTRICTED_LOGON_HOURS 646 +#define MS_CHAP_ERROR_ACCT_DISABLED 647 +#define MS_CHAP_ERROR_PASSWD_EXPIRED 648 +#define MS_CHAP_ERROR_NO_DIALIN_PERMISSION 649 +#define MS_CHAP_ERROR_AUTHENTICATION_FAILURE 691 +#define MS_CHAP_ERROR_CHANGING_PASSWORD 709 /* * Offsets within the response field for MS-CHAP */ -#define MS_CHAP_LANMANRESP 0 -#define MS_CHAP_LANMANRESP_LEN 24 -#define MS_CHAP_NTRESP 24 -#define MS_CHAP_NTRESP_LEN 24 -#define MS_CHAP_USENT 48 +#define MS_CHAP_LANMANRESP 0 +#define MS_CHAP_LANMANRESP_LEN 24 +#define MS_CHAP_NTRESP 24 +#define MS_CHAP_NTRESP_LEN 24 +#define MS_CHAP_USENT 48 /* * Offsets within the response field for MS-CHAP2 */ -#define MS_CHAP2_PEER_CHALLENGE 0 -#define MS_CHAP2_PEER_CHAL_LEN 16 -#define MS_CHAP2_RESERVED_LEN 8 -#define MS_CHAP2_NTRESP 24 -#define MS_CHAP2_NTRESP_LEN 24 -#define MS_CHAP2_FLAGS 48 +#define MS_CHAP2_PEER_CHALLENGE 0 +#define MS_CHAP2_PEER_CHAL_LEN 16 +#define MS_CHAP2_RESERVED_LEN 8 +#define MS_CHAP2_NTRESP 24 +#define MS_CHAP2_NTRESP_LEN 24 +#define MS_CHAP2_FLAGS 48 #if MPPE_SUPPORT #if 0 /* UNUSED */ @@ -150,37 +150,37 @@ extern void set_mppe_enc_types(int, int); #define MS_CHAP2_AUTHENTICATEE 0 #define MS_CHAP2_AUTHENTICATOR 1 -static void ascii2unicode (const char[], int, u_char[]); -static void NTPasswordHash (u_char *, int, u_char[MD4_SIGNATURE_SIZE]); -static void ChallengeResponse (const u_char *, const u_char *, u_char[24]); -static void ChallengeHash (const u_char[16], const u_char *, const char *, u_char[8]); -static void ChapMS_NT (const u_char *, const char *, int, u_char[24]); -static void ChapMS2_NT (const u_char *, const u_char[16], const char *, const char *, int, - u_char[24]); -static void GenerateAuthenticatorResponsePlain - (const char*, int, u_char[24], const u_char[16], const u_char *, - const char *, u_char[41]); +static void ascii2unicode (const char[], int, u_char[]); +static void NTPasswordHash (u_char *, int, u_char[MD4_SIGNATURE_SIZE]); +static void ChallengeResponse (const u_char *, const u_char *, u_char[24]); +static void ChallengeHash (const u_char[16], const u_char *, const char *, u_char[8]); +static void ChapMS_NT (const u_char *, const char *, int, u_char[24]); +static void ChapMS2_NT (const u_char *, const u_char[16], const char *, const char *, int, + u_char[24]); +static void GenerateAuthenticatorResponsePlain + (const char*, int, u_char[24], const u_char[16], const u_char *, + const char *, u_char[41]); #ifdef MSLANMAN -static void ChapMS_LANMan (u_char *, char *, int, u_char *); +static void ChapMS_LANMan (u_char *, char *, int, u_char *); #endif static void GenerateAuthenticatorResponse(const u_char PasswordHashHash[MD4_SIGNATURE_SIZE], - u_char NTResponse[24], const u_char PeerChallenge[16], - const u_char *rchallenge, const char *username, - u_char authResponse[MS_AUTH_RESPONSE_LENGTH+1]); + u_char NTResponse[24], const u_char PeerChallenge[16], + const u_char *rchallenge, const char *username, + u_char authResponse[MS_AUTH_RESPONSE_LENGTH+1]); #if MPPE_SUPPORT -static void Set_Start_Key (ppp_pcb *pcb, const u_char *, const char *, int); -static void SetMasterKeys (ppp_pcb *pcb, const char *, int, u_char[24], int); +static void Set_Start_Key (ppp_pcb *pcb, const u_char *, const char *, int); +static void SetMasterKeys (ppp_pcb *pcb, const char *, int, u_char[24], int); #endif /* MPPE_SUPPORT */ static void ChapMS (ppp_pcb *pcb, const u_char *, const char *, int, u_char *); static void ChapMS2 (ppp_pcb *pcb, const u_char *, const u_char *, const char *, const char *, int, - u_char *, u_char[MS_AUTH_RESPONSE_LENGTH+1], int); + u_char *, u_char[MS_AUTH_RESPONSE_LENGTH+1], int); #ifdef MSLANMAN -bool ms_lanman = 0; /* Use LanMan password instead of NT */ - /* Has meaning only with MS-CHAP challenges */ +bool ms_lanman = 0; /* Use LanMan password instead of NT */ + /* Has meaning only with MS-CHAP challenges */ #endif #if MPPE_SUPPORT @@ -192,7 +192,7 @@ static char *mschap_challenge = NULL; static char *mschap2_peer_challenge = NULL; #endif -#include "netif/ppp/fsm.h" /* Need to poke MPPE options */ +#include "netif/ppp/fsm.h" /* Need to poke MPPE options */ #include "netif/ppp/ccp.h" #endif /* MPPE_SUPPORT */ @@ -202,16 +202,16 @@ static char *mschap2_peer_challenge = NULL; */ static option_t chapms_option_list[] = { #ifdef MSLANMAN - { "ms-lanman", o_bool, &ms_lanman, - "Use LanMan passwd when using MS-CHAP", 1 }, + { "ms-lanman", o_bool, &ms_lanman, + "Use LanMan passwd when using MS-CHAP", 1 }, #endif #ifdef DEBUGMPPEKEY - { "mschap-challenge", o_string, &mschap_challenge, - "specify CHAP challenge" }, - { "mschap2-peer-challenge", o_string, &mschap2_peer_challenge, - "specify CHAP peer challenge" }, + { "mschap-challenge", o_string, &mschap_challenge, + "specify CHAP challenge" }, + { "mschap2-peer-challenge", o_string, &mschap2_peer_challenge, + "specify CHAP peer challenge" }, #endif - { NULL } + { NULL } }; #endif /* PPP_OPTIONS */ @@ -223,279 +223,279 @@ static option_t chapms_option_list[] = { * at challenge[1]. */ static void chapms_generate_challenge(ppp_pcb *pcb, unsigned char *challenge) { - LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(pcb); - *challenge++ = 8; + *challenge++ = 8; #ifdef DEBUGMPPEKEY - if (mschap_challenge && strlen(mschap_challenge) == 8) - memcpy(challenge, mschap_challenge, 8); - else + if (mschap_challenge && strlen(mschap_challenge) == 8) + memcpy(challenge, mschap_challenge, 8); + else #endif - magic_random_bytes(challenge, 8); + magic_random_bytes(challenge, 8); } static void chapms2_generate_challenge(ppp_pcb *pcb, unsigned char *challenge) { - LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(pcb); - *challenge++ = 16; + *challenge++ = 16; #ifdef DEBUGMPPEKEY - if (mschap_challenge && strlen(mschap_challenge) == 16) - memcpy(challenge, mschap_challenge, 16); - else + if (mschap_challenge && strlen(mschap_challenge) == 16) + memcpy(challenge, mschap_challenge, 16); + else #endif - magic_random_bytes(challenge, 16); + magic_random_bytes(challenge, 16); } static int chapms_verify_response(ppp_pcb *pcb, int id, const char *name, - const unsigned char *secret, int secret_len, - const unsigned char *challenge, const unsigned char *response, - char *message, int message_space) { - unsigned char md[MS_CHAP_RESPONSE_LEN]; - int diff; - int challenge_len, response_len; - LWIP_UNUSED_ARG(id); - LWIP_UNUSED_ARG(name); + const unsigned char *secret, int secret_len, + const unsigned char *challenge, const unsigned char *response, + char *message, int message_space) { + unsigned char md[MS_CHAP_RESPONSE_LEN]; + int diff; + int challenge_len, response_len; + LWIP_UNUSED_ARG(id); + LWIP_UNUSED_ARG(name); - challenge_len = *challenge++; /* skip length, is 8 */ - response_len = *response++; - if (response_len != MS_CHAP_RESPONSE_LEN) - goto bad; + challenge_len = *challenge++; /* skip length, is 8 */ + response_len = *response++; + if (response_len != MS_CHAP_RESPONSE_LEN) + goto bad; #ifndef MSLANMAN - if (!response[MS_CHAP_USENT]) { - /* Should really propagate this into the error packet. */ - ppp_notice("Peer request for LANMAN auth not supported"); - goto bad; - } + if (!response[MS_CHAP_USENT]) { + /* Should really propagate this into the error packet. */ + ppp_notice("Peer request for LANMAN auth not supported"); + goto bad; + } #endif - /* Generate the expected response. */ - ChapMS(pcb, (const u_char *)challenge, (const char *)secret, secret_len, md); + /* Generate the expected response. */ + ChapMS(pcb, (const u_char *)challenge, (const char *)secret, secret_len, md); #ifdef MSLANMAN - /* Determine which part of response to verify against */ - if (!response[MS_CHAP_USENT]) - diff = memcmp(&response[MS_CHAP_LANMANRESP], - &md[MS_CHAP_LANMANRESP], MS_CHAP_LANMANRESP_LEN); - else + /* Determine which part of response to verify against */ + if (!response[MS_CHAP_USENT]) + diff = memcmp(&response[MS_CHAP_LANMANRESP], + &md[MS_CHAP_LANMANRESP], MS_CHAP_LANMANRESP_LEN); + else #endif - diff = memcmp(&response[MS_CHAP_NTRESP], &md[MS_CHAP_NTRESP], - MS_CHAP_NTRESP_LEN); + diff = memcmp(&response[MS_CHAP_NTRESP], &md[MS_CHAP_NTRESP], + MS_CHAP_NTRESP_LEN); - if (diff == 0) { - ppp_slprintf(message, message_space, "Access granted"); - return 1; - } + if (diff == 0) { + ppp_slprintf(message, message_space, "Access granted"); + return 1; + } bad: - /* See comments below for MS-CHAP V2 */ - ppp_slprintf(message, message_space, "E=691 R=1 C=%0.*B V=0", - challenge_len, challenge); - return 0; + /* See comments below for MS-CHAP V2 */ + ppp_slprintf(message, message_space, "E=691 R=1 C=%0.*B V=0", + challenge_len, challenge); + return 0; } static int chapms2_verify_response(ppp_pcb *pcb, int id, const char *name, - const unsigned char *secret, int secret_len, - const unsigned char *challenge, const unsigned char *response, - char *message, int message_space) { - unsigned char md[MS_CHAP2_RESPONSE_LEN]; - char saresponse[MS_AUTH_RESPONSE_LENGTH+1]; - int challenge_len, response_len; - LWIP_UNUSED_ARG(id); + const unsigned char *secret, int secret_len, + const unsigned char *challenge, const unsigned char *response, + char *message, int message_space) { + unsigned char md[MS_CHAP2_RESPONSE_LEN]; + char saresponse[MS_AUTH_RESPONSE_LENGTH+1]; + int challenge_len, response_len; + LWIP_UNUSED_ARG(id); - challenge_len = *challenge++; /* skip length, is 16 */ - response_len = *response++; - if (response_len != MS_CHAP2_RESPONSE_LEN) - goto bad; /* not even the right length */ + challenge_len = *challenge++; /* skip length, is 16 */ + response_len = *response++; + if (response_len != MS_CHAP2_RESPONSE_LEN) + goto bad; /* not even the right length */ - /* Generate the expected response and our mutual auth. */ - ChapMS2(pcb, (const u_char*)challenge, (const u_char*)&response[MS_CHAP2_PEER_CHALLENGE], name, - (const char *)secret, secret_len, md, - (unsigned char *)saresponse, MS_CHAP2_AUTHENTICATOR); + /* Generate the expected response and our mutual auth. */ + ChapMS2(pcb, (const u_char*)challenge, (const u_char*)&response[MS_CHAP2_PEER_CHALLENGE], name, + (const char *)secret, secret_len, md, + (unsigned char *)saresponse, MS_CHAP2_AUTHENTICATOR); - /* compare MDs and send the appropriate status */ - /* - * Per RFC 2759, success message must be formatted as - * "S= M=" - * where - * is the Authenticator Response (mutual auth) - * is a text message - * - * However, some versions of Windows (win98 tested) do not know - * about the M= part (required per RFC 2759) and flag - * it as an error (reported incorrectly as an encryption error - * to the user). Since the RFC requires it, and it can be - * useful information, we supply it if the peer is a conforming - * system. Luckily (?), win98 sets the Flags field to 0x04 - * (contrary to RFC requirements) so we can use that to - * distinguish between conforming and non-conforming systems. - * - * Special thanks to Alex Swiridov for - * help debugging this. - */ - if (memcmp(&md[MS_CHAP2_NTRESP], &response[MS_CHAP2_NTRESP], - MS_CHAP2_NTRESP_LEN) == 0) { - if (response[MS_CHAP2_FLAGS]) - ppp_slprintf(message, message_space, "S=%s", saresponse); - else - ppp_slprintf(message, message_space, "S=%s M=%s", - saresponse, "Access granted"); - return 1; - } + /* compare MDs and send the appropriate status */ + /* + * Per RFC 2759, success message must be formatted as + * "S= M=" + * where + * is the Authenticator Response (mutual auth) + * is a text message + * + * However, some versions of Windows (win98 tested) do not know + * about the M= part (required per RFC 2759) and flag + * it as an error (reported incorrectly as an encryption error + * to the user). Since the RFC requires it, and it can be + * useful information, we supply it if the peer is a conforming + * system. Luckily (?), win98 sets the Flags field to 0x04 + * (contrary to RFC requirements) so we can use that to + * distinguish between conforming and non-conforming systems. + * + * Special thanks to Alex Swiridov for + * help debugging this. + */ + if (memcmp(&md[MS_CHAP2_NTRESP], &response[MS_CHAP2_NTRESP], + MS_CHAP2_NTRESP_LEN) == 0) { + if (response[MS_CHAP2_FLAGS]) + ppp_slprintf(message, message_space, "S=%s", saresponse); + else + ppp_slprintf(message, message_space, "S=%s M=%s", + saresponse, "Access granted"); + return 1; + } bad: - /* - * Failure message must be formatted as - * "E=e R=r C=c V=v M=m" - * where - * e = error code (we use 691, ERROR_AUTHENTICATION_FAILURE) - * r = retry (we use 1, ok to retry) - * c = challenge to use for next response, we reuse previous - * v = Change Password version supported, we use 0 - * m = text message - * - * The M=m part is only for MS-CHAPv2. Neither win2k nor - * win98 (others untested) display the message to the user anyway. - * They also both ignore the E=e code. - * - * Note that it's safe to reuse the same challenge as we don't - * actually accept another response based on the error message - * (and no clients try to resend a response anyway). - * - * Basically, this whole bit is useless code, even the small - * implementation here is only because of overspecification. - */ - ppp_slprintf(message, message_space, "E=691 R=1 C=%0.*B V=0 M=%s", - challenge_len, challenge, "Access denied"); - return 0; + /* + * Failure message must be formatted as + * "E=e R=r C=c V=v M=m" + * where + * e = error code (we use 691, ERROR_AUTHENTICATION_FAILURE) + * r = retry (we use 1, ok to retry) + * c = challenge to use for next response, we reuse previous + * v = Change Password version supported, we use 0 + * m = text message + * + * The M=m part is only for MS-CHAPv2. Neither win2k nor + * win98 (others untested) display the message to the user anyway. + * They also both ignore the E=e code. + * + * Note that it's safe to reuse the same challenge as we don't + * actually accept another response based on the error message + * (and no clients try to resend a response anyway). + * + * Basically, this whole bit is useless code, even the small + * implementation here is only because of overspecification. + */ + ppp_slprintf(message, message_space, "E=691 R=1 C=%0.*B V=0 M=%s", + challenge_len, challenge, "Access denied"); + return 0; } #endif /* PPP_SERVER */ static void chapms_make_response(ppp_pcb *pcb, unsigned char *response, int id, const char *our_name, - const unsigned char *challenge, const char *secret, int secret_len, - unsigned char *private_) { - LWIP_UNUSED_ARG(id); - LWIP_UNUSED_ARG(our_name); - LWIP_UNUSED_ARG(private_); - challenge++; /* skip length, should be 8 */ - *response++ = MS_CHAP_RESPONSE_LEN; - ChapMS(pcb, challenge, secret, secret_len, response); + const unsigned char *challenge, const char *secret, int secret_len, + unsigned char *private_) { + LWIP_UNUSED_ARG(id); + LWIP_UNUSED_ARG(our_name); + LWIP_UNUSED_ARG(private_); + challenge++; /* skip length, should be 8 */ + *response++ = MS_CHAP_RESPONSE_LEN; + ChapMS(pcb, challenge, secret, secret_len, response); } static void chapms2_make_response(ppp_pcb *pcb, unsigned char *response, int id, const char *our_name, - const unsigned char *challenge, const char *secret, int secret_len, - unsigned char *private_) { - LWIP_UNUSED_ARG(id); - challenge++; /* skip length, should be 16 */ - *response++ = MS_CHAP2_RESPONSE_LEN; - ChapMS2(pcb, challenge, + const unsigned char *challenge, const char *secret, int secret_len, + unsigned char *private_) { + LWIP_UNUSED_ARG(id); + challenge++; /* skip length, should be 16 */ + *response++ = MS_CHAP2_RESPONSE_LEN; + ChapMS2(pcb, challenge, #ifdef DEBUGMPPEKEY - mschap2_peer_challenge, + mschap2_peer_challenge, #else - NULL, + NULL, #endif - our_name, secret, secret_len, response, private_, - MS_CHAP2_AUTHENTICATEE); + our_name, secret, secret_len, response, private_, + MS_CHAP2_AUTHENTICATEE); } static int chapms2_check_success(ppp_pcb *pcb, unsigned char *msg, int len, unsigned char *private_) { - LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(pcb); - if ((len < MS_AUTH_RESPONSE_LENGTH + 2) || - strncmp((char *)msg, "S=", 2) != 0) { - /* Packet does not start with "S=" */ - ppp_error("MS-CHAPv2 Success packet is badly formed."); - return 0; - } - msg += 2; - len -= 2; - if (len < MS_AUTH_RESPONSE_LENGTH - || memcmp(msg, private_, MS_AUTH_RESPONSE_LENGTH)) { - /* Authenticator Response did not match expected. */ - ppp_error("MS-CHAPv2 mutual authentication failed."); - return 0; - } - /* Authenticator Response matches. */ - msg += MS_AUTH_RESPONSE_LENGTH; /* Eat it */ - len -= MS_AUTH_RESPONSE_LENGTH; - if ((len >= 3) && !strncmp((char *)msg, " M=", 3)) { - msg += 3; /* Eat the delimiter */ - } else if (len) { - /* Packet has extra text which does not begin " M=" */ - ppp_error("MS-CHAPv2 Success packet is badly formed."); - return 0; - } - return 1; + if ((len < MS_AUTH_RESPONSE_LENGTH + 2) || + strncmp((char *)msg, "S=", 2) != 0) { + /* Packet does not start with "S=" */ + ppp_error("MS-CHAPv2 Success packet is badly formed."); + return 0; + } + msg += 2; + len -= 2; + if (len < MS_AUTH_RESPONSE_LENGTH + || memcmp(msg, private_, MS_AUTH_RESPONSE_LENGTH)) { + /* Authenticator Response did not match expected. */ + ppp_error("MS-CHAPv2 mutual authentication failed."); + return 0; + } + /* Authenticator Response matches. */ + msg += MS_AUTH_RESPONSE_LENGTH; /* Eat it */ + len -= MS_AUTH_RESPONSE_LENGTH; + if ((len >= 3) && !strncmp((char *)msg, " M=", 3)) { + msg += 3; /* Eat the delimiter */ + } else if (len) { + /* Packet has extra text which does not begin " M=" */ + ppp_error("MS-CHAPv2 Success packet is badly formed."); + return 0; + } + return 1; } static void chapms_handle_failure(ppp_pcb *pcb, unsigned char *inp, int len) { - int err; - const char *p; - char msg[64]; - LWIP_UNUSED_ARG(pcb); + int err; + const char *p; + char msg[64]; + LWIP_UNUSED_ARG(pcb); - /* We want a null-terminated string for strxxx(). */ - len = LWIP_MIN(len, 63); - MEMCPY(msg, inp, len); - msg[len] = 0; - p = msg; + /* We want a null-terminated string for strxxx(). */ + len = LWIP_MIN(len, 63); + MEMCPY(msg, inp, len); + msg[len] = 0; + p = msg; - /* - * Deal with MS-CHAP formatted failure messages; just print the - * M= part (if any). For MS-CHAP we're not really supposed - * to use M=, but it shouldn't hurt. See - * chapms[2]_verify_response. - */ - if (!strncmp(p, "E=", 2)) - err = strtol(p+2, NULL, 10); /* Remember the error code. */ - else - goto print_msg; /* Message is badly formatted. */ + /* + * Deal with MS-CHAP formatted failure messages; just print the + * M= part (if any). For MS-CHAP we're not really supposed + * to use M=, but it shouldn't hurt. See + * chapms[2]_verify_response. + */ + if (!strncmp(p, "E=", 2)) + err = strtol(p+2, NULL, 10); /* Remember the error code. */ + else + goto print_msg; /* Message is badly formatted. */ - if (len && ((p = strstr(p, " M=")) != NULL)) { - /* M= field found. */ - p += 3; - } else { - /* No M=; use the error code. */ - switch (err) { - case MS_CHAP_ERROR_RESTRICTED_LOGON_HOURS: - p = "E=646 Restricted logon hours"; - break; + if (len && ((p = strstr(p, " M=")) != NULL)) { + /* M= field found. */ + p += 3; + } else { + /* No M=; use the error code. */ + switch (err) { + case MS_CHAP_ERROR_RESTRICTED_LOGON_HOURS: + p = "E=646 Restricted logon hours"; + break; - case MS_CHAP_ERROR_ACCT_DISABLED: - p = "E=647 Account disabled"; - break; + case MS_CHAP_ERROR_ACCT_DISABLED: + p = "E=647 Account disabled"; + break; - case MS_CHAP_ERROR_PASSWD_EXPIRED: - p = "E=648 Password expired"; - break; + case MS_CHAP_ERROR_PASSWD_EXPIRED: + p = "E=648 Password expired"; + break; - case MS_CHAP_ERROR_NO_DIALIN_PERMISSION: - p = "E=649 No dialin permission"; - break; + case MS_CHAP_ERROR_NO_DIALIN_PERMISSION: + p = "E=649 No dialin permission"; + break; - case MS_CHAP_ERROR_AUTHENTICATION_FAILURE: - p = "E=691 Authentication failure"; - break; + case MS_CHAP_ERROR_AUTHENTICATION_FAILURE: + p = "E=691 Authentication failure"; + break; - case MS_CHAP_ERROR_CHANGING_PASSWORD: - /* Should never see this, we don't support Change Password. */ - p = "E=709 Error changing password"; - break; + case MS_CHAP_ERROR_CHANGING_PASSWORD: + /* Should never see this, we don't support Change Password. */ + p = "E=709 Error changing password"; + break; - default: - ppp_error("Unknown MS-CHAP authentication failure: %.*v", - len, inp); - return; - } - } + default: + ppp_error("Unknown MS-CHAP authentication failure: %.*v", + len, inp); + return; + } + } print_msg: - if (p != NULL) - ppp_error("MS-CHAP authentication failed: %v", p); + if (p != NULL) + ppp_error("MS-CHAP authentication failed: %v", p); } static void ChallengeResponse(const u_char *challenge, - const u_char PasswordHash[MD4_SIGNATURE_SIZE], - u_char response[24]) { + const u_char PasswordHash[MD4_SIGNATURE_SIZE], + u_char response[24]) { u_char ZPasswordHash[21]; lwip_des_context des; u_char des_key[8]; @@ -505,7 +505,7 @@ static void ChallengeResponse(const u_char *challenge, #if 0 dbglog("ChallengeResponse - ZPasswordHash %.*B", - sizeof(ZPasswordHash), ZPasswordHash); + sizeof(ZPasswordHash), ZPasswordHash); #endif pppcrypt_56_to_64_bit_key(ZPasswordHash + 0, des_key); @@ -532,16 +532,16 @@ static void ChallengeResponse(const u_char *challenge, } static void ChallengeHash(const u_char PeerChallenge[16], const u_char *rchallenge, - const char *username, u_char Challenge[8]) { - lwip_sha1_context sha1Context; - u_char sha1Hash[SHA1_SIGNATURE_SIZE]; - const char *user; + const char *username, u_char Challenge[8]) { + lwip_sha1_context sha1Context; + u_char sha1Hash[SHA1_SIGNATURE_SIZE]; + const char *user; /* remove domain from "domain\username" */ if ((user = strrchr(username, '\\')) != NULL) - ++user; + ++user; else - user = username; + user = username; lwip_sha1_init(&sha1Context); lwip_sha1_starts(&sha1Context); @@ -566,11 +566,11 @@ static void ascii2unicode(const char ascii[], int ascii_len, u_char unicode[]) { BZERO(unicode, ascii_len * 2); for (i = 0; i < ascii_len; i++) - unicode[i * 2] = (u_char) ascii[i]; + unicode[i * 2] = (u_char) ascii[i]; } static void NTPasswordHash(u_char *secret, int secret_len, u_char hash[MD4_SIGNATURE_SIZE]) { - lwip_md4_context md4Context; + lwip_md4_context md4Context; lwip_md4_init(&md4Context); lwip_md4_starts(&md4Context); @@ -580,9 +580,9 @@ static void NTPasswordHash(u_char *secret, int secret_len, u_char hash[MD4_SIGNA } static void ChapMS_NT(const u_char *rchallenge, const char *secret, int secret_len, - u_char NTResponse[24]) { - u_char unicodePassword[MAX_NT_PASSWORD * 2]; - u_char PasswordHash[MD4_SIGNATURE_SIZE]; + u_char NTResponse[24]) { + u_char unicodePassword[MAX_NT_PASSWORD * 2]; + u_char PasswordHash[MD4_SIGNATURE_SIZE]; /* Hash the Unicode version of the secret (== password). */ ascii2unicode(secret, secret_len, unicodePassword); @@ -592,10 +592,10 @@ static void ChapMS_NT(const u_char *rchallenge, const char *secret, int secret_l } static void ChapMS2_NT(const u_char *rchallenge, const u_char PeerChallenge[16], const char *username, - const char *secret, int secret_len, u_char NTResponse[24]) { - u_char unicodePassword[MAX_NT_PASSWORD * 2]; - u_char PasswordHash[MD4_SIGNATURE_SIZE]; - u_char Challenge[8]; + const char *secret, int secret_len, u_char NTResponse[24]) { + u_char unicodePassword[MAX_NT_PASSWORD * 2]; + u_char PasswordHash[MD4_SIGNATURE_SIZE]; + u_char Challenge[8]; ChallengeHash(PeerChallenge, rchallenge, username, Challenge); @@ -610,10 +610,10 @@ static void ChapMS2_NT(const u_char *rchallenge, const u_char PeerChallenge[16], static u_char *StdText = (u_char *)"KGS!@#$%"; /* key from rasapi32.dll */ static void ChapMS_LANMan(u_char *rchallenge, char *secret, int secret_len, - unsigned char *response) { - int i; - u_char UcasePassword[MAX_NT_PASSWORD]; /* max is actually 14 */ - u_char PasswordHash[MD4_SIGNATURE_SIZE]; + unsigned char *response) { + int i; + u_char UcasePassword[MAX_NT_PASSWORD]; /* max is actually 14 */ + u_char PasswordHash[MD4_SIGNATURE_SIZE]; lwip_des_context des; u_char des_key[8]; @@ -640,28 +640,28 @@ static void ChapMS_LANMan(u_char *rchallenge, char *secret, int secret_len, static void GenerateAuthenticatorResponse(const u_char PasswordHashHash[MD4_SIGNATURE_SIZE], - u_char NTResponse[24], const u_char PeerChallenge[16], - const u_char *rchallenge, const char *username, - u_char authResponse[MS_AUTH_RESPONSE_LENGTH+1]) { + u_char NTResponse[24], const u_char PeerChallenge[16], + const u_char *rchallenge, const char *username, + u_char authResponse[MS_AUTH_RESPONSE_LENGTH+1]) { /* * "Magic" constants used in response generation, from RFC 2759. */ static const u_char Magic1[39] = /* "Magic server to client signing constant" */ - { 0x4D, 0x61, 0x67, 0x69, 0x63, 0x20, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x20, 0x74, 0x6F, 0x20, 0x63, 0x6C, 0x69, 0x65, - 0x6E, 0x74, 0x20, 0x73, 0x69, 0x67, 0x6E, 0x69, 0x6E, 0x67, - 0x20, 0x63, 0x6F, 0x6E, 0x73, 0x74, 0x61, 0x6E, 0x74 }; + { 0x4D, 0x61, 0x67, 0x69, 0x63, 0x20, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x20, 0x74, 0x6F, 0x20, 0x63, 0x6C, 0x69, 0x65, + 0x6E, 0x74, 0x20, 0x73, 0x69, 0x67, 0x6E, 0x69, 0x6E, 0x67, + 0x20, 0x63, 0x6F, 0x6E, 0x73, 0x74, 0x61, 0x6E, 0x74 }; static const u_char Magic2[41] = /* "Pad to make it do more than one iteration" */ - { 0x50, 0x61, 0x64, 0x20, 0x74, 0x6F, 0x20, 0x6D, 0x61, 0x6B, - 0x65, 0x20, 0x69, 0x74, 0x20, 0x64, 0x6F, 0x20, 0x6D, 0x6F, - 0x72, 0x65, 0x20, 0x74, 0x68, 0x61, 0x6E, 0x20, 0x6F, 0x6E, - 0x65, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6F, - 0x6E }; + { 0x50, 0x61, 0x64, 0x20, 0x74, 0x6F, 0x20, 0x6D, 0x61, 0x6B, + 0x65, 0x20, 0x69, 0x74, 0x20, 0x64, 0x6F, 0x20, 0x6D, 0x6F, + 0x72, 0x65, 0x20, 0x74, 0x68, 0x61, 0x6E, 0x20, 0x6F, 0x6E, + 0x65, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6F, + 0x6E }; - int i; - lwip_sha1_context sha1Context; - u_char Digest[SHA1_SIGNATURE_SIZE]; - u_char Challenge[8]; + int i; + lwip_sha1_context sha1Context; + u_char Digest[SHA1_SIGNATURE_SIZE]; + u_char Challenge[8]; lwip_sha1_init(&sha1Context); lwip_sha1_starts(&sha1Context); @@ -683,27 +683,27 @@ static void GenerateAuthenticatorResponse(const u_char PasswordHashHash[MD4_SIGN /* Convert to ASCII hex string. */ for (i = 0; i < LWIP_MAX((MS_AUTH_RESPONSE_LENGTH / 2), (int)sizeof(Digest)); i++) - sprintf((char *)&authResponse[i * 2], "%02X", Digest[i]); + sprintf((char *)&authResponse[i * 2], "%02X", Digest[i]); } static void GenerateAuthenticatorResponsePlain( - const char *secret, int secret_len, - u_char NTResponse[24], const u_char PeerChallenge[16], - const u_char *rchallenge, const char *username, - u_char authResponse[MS_AUTH_RESPONSE_LENGTH+1]) { - u_char unicodePassword[MAX_NT_PASSWORD * 2]; - u_char PasswordHash[MD4_SIGNATURE_SIZE]; - u_char PasswordHashHash[MD4_SIGNATURE_SIZE]; + const char *secret, int secret_len, + u_char NTResponse[24], const u_char PeerChallenge[16], + const u_char *rchallenge, const char *username, + u_char authResponse[MS_AUTH_RESPONSE_LENGTH+1]) { + u_char unicodePassword[MAX_NT_PASSWORD * 2]; + u_char PasswordHash[MD4_SIGNATURE_SIZE]; + u_char PasswordHashHash[MD4_SIGNATURE_SIZE]; /* Hash (x2) the Unicode version of the secret (== password). */ ascii2unicode(secret, secret_len, unicodePassword); NTPasswordHash(unicodePassword, secret_len * 2, PasswordHash); NTPasswordHash(PasswordHash, sizeof(PasswordHash), - PasswordHashHash); + PasswordHashHash); GenerateAuthenticatorResponse(PasswordHashHash, NTResponse, PeerChallenge, - rchallenge, username, authResponse); + rchallenge, username, authResponse); } @@ -712,11 +712,11 @@ static void GenerateAuthenticatorResponsePlain( * Set mppe_xxxx_key from MS-CHAP credentials. (see RFC 3079) */ static void Set_Start_Key(ppp_pcb *pcb, const u_char *rchallenge, const char *secret, int secret_len) { - u_char unicodePassword[MAX_NT_PASSWORD * 2]; - u_char PasswordHash[MD4_SIGNATURE_SIZE]; - u_char PasswordHashHash[MD4_SIGNATURE_SIZE]; - lwip_sha1_context sha1Context; - u_char Digest[SHA1_SIGNATURE_SIZE]; /* >= MPPE_MAX_KEY_LEN */ + u_char unicodePassword[MAX_NT_PASSWORD * 2]; + u_char PasswordHash[MD4_SIGNATURE_SIZE]; + u_char PasswordHashHash[MD4_SIGNATURE_SIZE]; + lwip_sha1_context sha1Context; + u_char Digest[SHA1_SIGNATURE_SIZE]; /* >= MPPE_MAX_KEY_LEN */ /* Hash (x2) the Unicode version of the secret (== password). */ ascii2unicode(secret, secret_len, unicodePassword); @@ -742,43 +742,43 @@ static void Set_Start_Key(ppp_pcb *pcb, const u_char *rchallenge, const char *se * Set mppe_xxxx_key from MS-CHAPv2 credentials. (see RFC 3079) */ static void SetMasterKeys(ppp_pcb *pcb, const char *secret, int secret_len, u_char NTResponse[24], int IsServer) { - u_char unicodePassword[MAX_NT_PASSWORD * 2]; - u_char PasswordHash[MD4_SIGNATURE_SIZE]; - u_char PasswordHashHash[MD4_SIGNATURE_SIZE]; - lwip_sha1_context sha1Context; - u_char MasterKey[SHA1_SIGNATURE_SIZE]; /* >= MPPE_MAX_KEY_LEN */ - u_char Digest[SHA1_SIGNATURE_SIZE]; /* >= MPPE_MAX_KEY_LEN */ + u_char unicodePassword[MAX_NT_PASSWORD * 2]; + u_char PasswordHash[MD4_SIGNATURE_SIZE]; + u_char PasswordHashHash[MD4_SIGNATURE_SIZE]; + lwip_sha1_context sha1Context; + u_char MasterKey[SHA1_SIGNATURE_SIZE]; /* >= MPPE_MAX_KEY_LEN */ + u_char Digest[SHA1_SIGNATURE_SIZE]; /* >= MPPE_MAX_KEY_LEN */ const u_char *s; /* "This is the MPPE Master Key" */ static const u_char Magic1[27] = - { 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x4d, 0x50, 0x50, 0x45, 0x20, 0x4d, - 0x61, 0x73, 0x74, 0x65, 0x72, 0x20, 0x4b, 0x65, 0x79 }; + { 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x4d, 0x50, 0x50, 0x45, 0x20, 0x4d, + 0x61, 0x73, 0x74, 0x65, 0x72, 0x20, 0x4b, 0x65, 0x79 }; /* "On the client side, this is the send key; " "on the server side, it is the receive key." */ static const u_char Magic2[84] = - { 0x4f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x20, 0x73, 0x69, 0x64, 0x65, 0x2c, 0x20, - 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x20, 0x6b, 0x65, 0x79, - 0x3b, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x73, 0x69, 0x64, 0x65, - 0x2c, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x20, - 0x6b, 0x65, 0x79, 0x2e }; + { 0x4f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x20, 0x73, 0x69, 0x64, 0x65, 0x2c, 0x20, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x20, 0x6b, 0x65, 0x79, + 0x3b, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x73, 0x69, 0x64, 0x65, + 0x2c, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x20, + 0x6b, 0x65, 0x79, 0x2e }; /* "On the client side, this is the receive key; " "on the server side, it is the send key." */ static const u_char Magic3[84] = - { 0x4f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x20, 0x73, 0x69, 0x64, 0x65, 0x2c, 0x20, - 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x20, - 0x6b, 0x65, 0x79, 0x3b, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x73, - 0x69, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x20, - 0x6b, 0x65, 0x79, 0x2e }; + { 0x4f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x20, 0x73, 0x69, 0x64, 0x65, 0x2c, 0x20, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x20, + 0x6b, 0x65, 0x79, 0x3b, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x73, + 0x69, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x20, + 0x6b, 0x65, 0x79, 0x2e }; /* Hash (x2) the Unicode version of the secret (== password). */ ascii2unicode(secret, secret_len, unicodePassword); @@ -797,9 +797,9 @@ static void SetMasterKeys(ppp_pcb *pcb, const char *secret, int secret_len, u_ch * generate send key */ if (IsServer) - s = Magic3; + s = Magic3; else - s = Magic2; + s = Magic2; lwip_sha1_init(&sha1Context); lwip_sha1_starts(&sha1Context); lwip_sha1_update(&sha1Context, MasterKey, 16); @@ -815,9 +815,9 @@ static void SetMasterKeys(ppp_pcb *pcb, const char *secret, int secret_len, u_ch * generate recv key */ if (IsServer) - s = Magic2; + s = Magic2; else - s = Magic3; + s = Magic3; lwip_sha1_init(&sha1Context); lwip_sha1_starts(&sha1Context); lwip_sha1_update(&sha1Context, MasterKey, 16); @@ -846,7 +846,7 @@ static void ChapMS(ppp_pcb *pcb, const u_char *rchallenge, const char *secret, i #ifdef MSLANMAN ChapMS_LANMan(rchallenge, secret, secret_len, - &response[MS_CHAP_LANMANRESP]); + &response[MS_CHAP_LANMANRESP]); /* preferred method is set by option */ response[MS_CHAP_USENT] = !ms_lanman; @@ -871,8 +871,8 @@ static void ChapMS(ppp_pcb *pcb, const u_char *rchallenge, const char *secret, i * Authenticator Response. */ static void ChapMS2(ppp_pcb *pcb, const u_char *rchallenge, const u_char *PeerChallenge, - const char *user, const char *secret, int secret_len, unsigned char *response, - u_char authResponse[], int authenticator) { + const char *user, const char *secret, int secret_len, unsigned char *response, + u_char authResponse[], int authenticator) { /* ARGSUSED */ LWIP_UNUSED_ARG(authenticator); #if !MPPE_SUPPORT @@ -883,24 +883,24 @@ static void ChapMS2(ppp_pcb *pcb, const u_char *rchallenge, const u_char *PeerCh /* Generate the Peer-Challenge if requested, or copy it if supplied. */ if (!PeerChallenge) - magic_random_bytes(&response[MS_CHAP2_PEER_CHALLENGE], MS_CHAP2_PEER_CHAL_LEN); + magic_random_bytes(&response[MS_CHAP2_PEER_CHALLENGE], MS_CHAP2_PEER_CHAL_LEN); else - MEMCPY(&response[MS_CHAP2_PEER_CHALLENGE], PeerChallenge, - MS_CHAP2_PEER_CHAL_LEN); + MEMCPY(&response[MS_CHAP2_PEER_CHALLENGE], PeerChallenge, + MS_CHAP2_PEER_CHAL_LEN); /* Generate the NT-Response */ ChapMS2_NT(rchallenge, &response[MS_CHAP2_PEER_CHALLENGE], user, - secret, secret_len, &response[MS_CHAP2_NTRESP]); + secret, secret_len, &response[MS_CHAP2_NTRESP]); /* Generate the Authenticator Response. */ GenerateAuthenticatorResponsePlain(secret, secret_len, - &response[MS_CHAP2_NTRESP], - &response[MS_CHAP2_PEER_CHALLENGE], - rchallenge, user, authResponse); + &response[MS_CHAP2_NTRESP], + &response[MS_CHAP2_PEER_CHALLENGE], + rchallenge, user, authResponse); #if MPPE_SUPPORT SetMasterKeys(pcb, secret, secret_len, - &response[MS_CHAP2_NTRESP], authenticator); + &response[MS_CHAP2_NTRESP], authenticator); #endif /* MPPE_SUPPORT */ } @@ -912,51 +912,51 @@ static void ChapMS2(ppp_pcb *pcb, const u_char *rchallenge, const u_char *PeerCh void set_mppe_enc_types(int policy, int types) { /* Early exit for unknown policies. */ if (policy != MPPE_ENC_POL_ENC_ALLOWED || - policy != MPPE_ENC_POL_ENC_REQUIRED) - return; + policy != MPPE_ENC_POL_ENC_REQUIRED) + return; /* Don't modify MPPE if it's optional and wasn't already configured. */ if (policy == MPPE_ENC_POL_ENC_ALLOWED && !ccp_wantoptions[0].mppe) - return; + return; /* * Disable undesirable encryption types. Note that we don't ENABLE * any encryption types, to avoid overriding manual configuration. */ switch(types) { - case MPPE_ENC_TYPES_RC4_40: - ccp_wantoptions[0].mppe &= ~MPPE_OPT_128; /* disable 128-bit */ - break; - case MPPE_ENC_TYPES_RC4_128: - ccp_wantoptions[0].mppe &= ~MPPE_OPT_40; /* disable 40-bit */ - break; - default: - break; + case MPPE_ENC_TYPES_RC4_40: + ccp_wantoptions[0].mppe &= ~MPPE_OPT_128; /* disable 128-bit */ + break; + case MPPE_ENC_TYPES_RC4_128: + ccp_wantoptions[0].mppe &= ~MPPE_OPT_40; /* disable 40-bit */ + break; + default: + break; } } #endif /* MPPE_SUPPORT */ #endif /* UNUSED */ const struct chap_digest_type chapms_digest = { - CHAP_MICROSOFT, /* code */ + CHAP_MICROSOFT, /* code */ #if PPP_SERVER - chapms_generate_challenge, - chapms_verify_response, + chapms_generate_challenge, + chapms_verify_response, #endif /* PPP_SERVER */ - chapms_make_response, - NULL, /* check_success */ - chapms_handle_failure, + chapms_make_response, + NULL, /* check_success */ + chapms_handle_failure, }; const struct chap_digest_type chapms2_digest = { - CHAP_MICROSOFT_V2, /* code */ + CHAP_MICROSOFT_V2, /* code */ #if PPP_SERVER - chapms2_generate_challenge, - chapms2_verify_response, + chapms2_generate_challenge, + chapms2_verify_response, #endif /* PPP_SERVER */ - chapms2_make_response, - chapms2_check_success, - chapms_handle_failure, + chapms2_make_response, + chapms2_check_success, + chapms_handle_failure, }; #endif /* PPP_SUPPORT && MSCHAP_SUPPORT */ diff --git a/Libraries/LwIP/src/netif/ppp/demand.c b/Libraries/LwIP/src/netif/ppp/demand.c index 81b6b1c..0bd3598 100755 --- a/Libraries/LwIP/src/netif/ppp/demand.c +++ b/Libraries/LwIP/src/netif/ppp/demand.c @@ -87,11 +87,11 @@ demand_conf() /* framemax = lcp_allowoptions[0].mru; if (framemax < PPP_MRU) */ - framemax = PPP_MRU; + framemax = PPP_MRU; framemax += PPP_HDRLEN + PPP_FCSLEN; frame = malloc(framemax); if (frame == NULL) - novm("demand frame"); + novm("demand frame"); framelen = 0; pend_q = NULL; escape_flag = 0; @@ -100,8 +100,8 @@ demand_conf() netif_set_mtu(pcb, LWIP_MIN(lcp_allowoptions[0].mru, PPP_MRU)); if (ppp_send_config(pcb, PPP_MRU, (u32_t) 0, 0, 0) < 0 - || ppp_recv_config(pcb, PPP_MRU, (u32_t) 0, 0, 0) < 0) - fatal("Couldn't set up demand-dialled PPP interface: %m"); + || ppp_recv_config(pcb, PPP_MRU, (u32_t) 0, 0, 0) < 0) + fatal("Couldn't set up demand-dialled PPP interface: %m"); #ifdef PPP_FILTER set_filters(&pass_filter, &active_filter); @@ -111,12 +111,12 @@ demand_conf() * Call the demand_conf procedure for each protocol that's got one. */ for (i = 0; (protp = protocols[i]) != NULL; ++i) - if (protp->demand_conf != NULL) - ((*protp->demand_conf)(pcb)); + if (protp->demand_conf != NULL) + ((*protp->demand_conf)(pcb)); /* FIXME: find a way to die() here */ #if 0 - if (!((*protp->demand_conf)(pcb))) - die(1); + if (!((*protp->demand_conf)(pcb))) + die(1); #endif } @@ -131,8 +131,8 @@ demand_block() const struct protent *protp; for (i = 0; (protp = protocols[i]) != NULL; ++i) - if (protp->demand_conf != NULL) - sifnpmode(pcb, protp->protocol & ~0x8000, NPMODE_QUEUE); + if (protp->demand_conf != NULL) + sifnpmode(pcb, protp->protocol & ~0x8000, NPMODE_QUEUE); get_loop_output(); } @@ -148,14 +148,14 @@ demand_discard() const struct protent *protp; for (i = 0; (protp = protocols[i]) != NULL; ++i) - if (protp->demand_conf != NULL) - sifnpmode(pcb, protp->protocol & ~0x8000, NPMODE_ERROR); + if (protp->demand_conf != NULL) + sifnpmode(pcb, protp->protocol & ~0x8000, NPMODE_ERROR); get_loop_output(); /* discard all saved packets */ for (pkt = pend_q; pkt != NULL; pkt = nextpkt) { - nextpkt = pkt->next; - free(pkt); + nextpkt = pkt->next; + free(pkt); } pend_q = NULL; framelen = 0; @@ -174,46 +174,46 @@ demand_unblock() const struct protent *protp; for (i = 0; (protp = protocols[i]) != NULL; ++i) - if (protp->demand_conf != NULL) - sifnpmode(pcb, protp->protocol & ~0x8000, NPMODE_PASS); + if (protp->demand_conf != NULL) + sifnpmode(pcb, protp->protocol & ~0x8000, NPMODE_PASS); } /* * FCS lookup table as calculated by genfcstab. */ static u_short fcstab[256] = { - 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf, - 0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7, - 0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e, - 0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876, - 0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd, - 0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5, - 0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c, - 0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974, - 0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb, - 0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3, - 0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a, - 0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72, - 0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9, - 0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1, - 0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738, - 0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70, - 0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7, - 0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff, - 0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036, - 0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e, - 0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5, - 0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd, - 0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134, - 0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c, - 0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3, - 0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb, - 0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232, - 0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a, - 0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1, - 0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9, - 0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330, - 0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78 + 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf, + 0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7, + 0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e, + 0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876, + 0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd, + 0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5, + 0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c, + 0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974, + 0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb, + 0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3, + 0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a, + 0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72, + 0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9, + 0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1, + 0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738, + 0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70, + 0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7, + 0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff, + 0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036, + 0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e, + 0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5, + 0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd, + 0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134, + 0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c, + 0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3, + 0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb, + 0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232, + 0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a, + 0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1, + 0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9, + 0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330, + 0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78 }; /* @@ -238,35 +238,35 @@ loop_chars(p, n) } for (; n > 0; --n) { - c = *p++; - if (c == PPP_FLAG) { - if (!escape_flag && !flush_flag - && framelen > 2 && fcs == PPP_GOODFCS) { - framelen -= 2; - if (loop_frame((unsigned char *)frame, framelen)) - rv = 1; - } - framelen = 0; - flush_flag = 0; - escape_flag = 0; - fcs = PPP_INITFCS; - continue; - } - if (flush_flag) - continue; - if (escape_flag) { - c ^= PPP_TRANS; - escape_flag = 0; - } else if (c == PPP_ESCAPE) { - escape_flag = 1; - continue; - } - if (framelen >= framemax) { - flush_flag = 1; - continue; - } - frame[framelen++] = c; - fcs = PPP_FCS(fcs, c); + c = *p++; + if (c == PPP_FLAG) { + if (!escape_flag && !flush_flag + && framelen > 2 && fcs == PPP_GOODFCS) { + framelen -= 2; + if (loop_frame((unsigned char *)frame, framelen)) + rv = 1; + } + framelen = 0; + flush_flag = 0; + escape_flag = 0; + fcs = PPP_INITFCS; + continue; + } + if (flush_flag) + continue; + if (escape_flag) { + c ^= PPP_TRANS; + escape_flag = 0; + } else if (c == PPP_ESCAPE) { + escape_flag = 1; + continue; + } + if (framelen >= framemax) { + flush_flag = 1; + continue; + } + frame[framelen++] = c; + fcs = PPP_FCS(fcs, c); } return rv; } @@ -290,22 +290,22 @@ loop_frame(frame, len) /* dbglog("from loop: %P", frame, len); */ if (len < PPP_HDRLEN) - return 0; + return 0; if ((PPP_PROTOCOL(frame) & 0x8000) != 0) - return 0; /* shouldn't get any of these anyway */ + return 0; /* shouldn't get any of these anyway */ if (!active_packet(frame, len)) - return 0; + return 0; pkt = (struct packet *) malloc(sizeof(struct packet) + len); if (pkt != NULL) { - pkt->length = len; - pkt->next = NULL; - memcpy(pkt->data, frame, len); - if (pend_q == NULL) - pend_q = pkt; - else - pend_qtail->next = pkt; - pend_qtail = pkt; + pkt->length = len; + pkt->next = NULL; + memcpy(pkt->data, frame, len); + if (pend_q == NULL) + pend_q = pkt; + else + pend_qtail->next = pkt; + pend_qtail = pkt; } return 1; } @@ -332,15 +332,15 @@ demand_rexmit(proto, newip) pend_q = NULL; tv.tv_sec = 1; tv.tv_usec = 0; - select(0,NULL,NULL,NULL,&tv); /* Sleep for 1 Seconds */ + select(0,NULL,NULL,NULL,&tv); /* Sleep for 1 Seconds */ for (; pkt != NULL; pkt = nextpkt) { - nextpkt = pkt->next; - if (PPP_PROTOCOL(pkt->data) == proto) { + nextpkt = pkt->next; + if (PPP_PROTOCOL(pkt->data) == proto) { if ( (proto == PPP_IP) && newip ) { - /* Get old checksum */ + /* Get old checksum */ - iphdr = (pkt->data[4] & 15) << 2; - checksum = *((unsigned short *) (pkt->data+14)); + iphdr = (pkt->data[4] & 15) << 2; + checksum = *((unsigned short *) (pkt->data+14)); if (checksum == 0xFFFF) { checksum = 0; } @@ -348,7 +348,7 @@ demand_rexmit(proto, newip) if (pkt->data[13] == 17) { pkt_checksum = *((unsigned short *) (pkt->data+10+iphdr)); - if (pkt_checksum) { + if (pkt_checksum) { cv = 1; if (pkt_checksum == 0xFFFF) { pkt_checksum = 0; @@ -359,71 +359,71 @@ demand_rexmit(proto, newip) } } - if (pkt->data[13] == 6) { - pkt_checksum = *((unsigned short *) (pkt->data+20+iphdr)); - cv = 1; + if (pkt->data[13] == 6) { + pkt_checksum = *((unsigned short *) (pkt->data+20+iphdr)); + cv = 1; if (pkt_checksum == 0xFFFF) { pkt_checksum = 0; } - } + } - /* Delete old Source-IP-Address */ + /* Delete old Source-IP-Address */ checksum -= *((unsigned short *) (pkt->data+16)) ^ 0xFFFF; checksum -= *((unsigned short *) (pkt->data+18)) ^ 0xFFFF; - pkt_checksum -= *((unsigned short *) (pkt->data+16)) ^ 0xFFFF; - pkt_checksum -= *((unsigned short *) (pkt->data+18)) ^ 0xFFFF; + pkt_checksum -= *((unsigned short *) (pkt->data+16)) ^ 0xFFFF; + pkt_checksum -= *((unsigned short *) (pkt->data+18)) ^ 0xFFFF; - /* Change Source-IP-Address */ + /* Change Source-IP-Address */ * ((u32_t *) (pkt->data + 16)) = newip; - /* Add new Source-IP-Address */ + /* Add new Source-IP-Address */ checksum += *((unsigned short *) (pkt->data+16)) ^ 0xFFFF; checksum += *((unsigned short *) (pkt->data+18)) ^ 0xFFFF; pkt_checksum += *((unsigned short *) (pkt->data+16)) ^ 0xFFFF; pkt_checksum += *((unsigned short *) (pkt->data+18)) ^ 0xFFFF; - /* Write new checksum */ + /* Write new checksum */ if (!checksum) { checksum = 0xFFFF; } *((unsigned short *) (pkt->data+14)) = checksum; - if (pkt->data[13] == 6) { - *((unsigned short *) (pkt->data+20+iphdr)) = pkt_checksum; - } - if (cv && (pkt->data[13] == 17) ) { - *((unsigned short *) (pkt->data+10+iphdr)) = pkt_checksum; - } + if (pkt->data[13] == 6) { + *((unsigned short *) (pkt->data+20+iphdr)) = pkt_checksum; + } + if (cv && (pkt->data[13] == 17) ) { + *((unsigned short *) (pkt->data+10+iphdr)) = pkt_checksum; + } - /* Log Packet */ - strcpy(ipstr,inet_ntoa(*( (struct in_addr *) (pkt->data+16)))); - if (pkt->data[13] == 1) { - syslog(LOG_INFO,"Open ICMP %s -> %s\n", - ipstr, - inet_ntoa(*( (struct in_addr *) (pkt->data+20)))); - } else { - syslog(LOG_INFO,"Open %s %s:%d -> %s:%d\n", - pkt->data[13] == 6 ? "TCP" : "UDP", - ipstr, - ntohs(*( (short *) (pkt->data+iphdr+4))), - inet_ntoa(*( (struct in_addr *) (pkt->data+20))), - ntohs(*( (short *) (pkt->data+iphdr+6)))); + /* Log Packet */ + strcpy(ipstr,inet_ntoa(*( (struct in_addr *) (pkt->data+16)))); + if (pkt->data[13] == 1) { + syslog(LOG_INFO,"Open ICMP %s -> %s\n", + ipstr, + inet_ntoa(*( (struct in_addr *) (pkt->data+20)))); + } else { + syslog(LOG_INFO,"Open %s %s:%d -> %s:%d\n", + pkt->data[13] == 6 ? "TCP" : "UDP", + ipstr, + ntohs(*( (short *) (pkt->data+iphdr+4))), + inet_ntoa(*( (struct in_addr *) (pkt->data+20))), + ntohs(*( (short *) (pkt->data+iphdr+6)))); } } - output(pcb, pkt->data, pkt->length); - free(pkt); - } else { - if (prev == NULL) - pend_q = pkt; - else - prev->next = pkt; - prev = pkt; - } + output(pcb, pkt->data, pkt->length); + free(pkt); + } else { + if (prev == NULL) + pend_q = pkt; + else + prev->next = pkt; + prev = pkt; + } } pend_qtail = prev; if (prev != NULL) - prev->next = NULL; + prev->next = NULL; } /* @@ -439,27 +439,27 @@ active_packet(p, len) const struct protent *protp; if (len < PPP_HDRLEN) - return 0; + return 0; proto = PPP_PROTOCOL(p); #ifdef PPP_FILTER - p[0] = 1; /* outbound packet indicator */ + p[0] = 1; /* outbound packet indicator */ if ((pass_filter.bf_len != 0 - && bpf_filter(pass_filter.bf_insns, p, len, len) == 0) - || (active_filter.bf_len != 0 - && bpf_filter(active_filter.bf_insns, p, len, len) == 0)) { - p[0] = 0xff; - return 0; + && bpf_filter(pass_filter.bf_insns, p, len, len) == 0) + || (active_filter.bf_len != 0 + && bpf_filter(active_filter.bf_insns, p, len, len) == 0)) { + p[0] = 0xff; + return 0; } p[0] = 0xff; #endif for (i = 0; (protp = protocols[i]) != NULL; ++i) { - if (protp->protocol < 0xC000 && (protp->protocol & ~0x8000) == proto) { - if (protp->active_pkt == NULL) - return 1; - return (*protp->active_pkt)(p, len); + if (protp->protocol < 0xC000 && (protp->protocol & ~0x8000) == proto) { + if (protp->active_pkt == NULL) + return 1; + return (*protp->active_pkt)(p, len); + } } - } - return 0; /* not a supported protocol !!?? */ + return 0; /* not a supported protocol !!?? */ } #endif /* PPP_SUPPORT && DEMAND_SUPPORT */ diff --git a/Libraries/LwIP/src/netif/ppp/eap.c b/Libraries/LwIP/src/netif/ppp/eap.c index 38aa995..5000e26 100755 --- a/Libraries/LwIP/src/netif/ppp/eap.c +++ b/Libraries/LwIP/src/netif/ppp/eap.c @@ -58,11 +58,11 @@ #endif /* USE_SRP */ #ifndef SHA_DIGESTSIZE -#define SHA_DIGESTSIZE 20 +#define SHA_DIGESTSIZE 20 #endif #ifdef USE_SRP -static char *pn_secret = NULL; /* Pseudonym generating secret */ +static char *pn_secret = NULL; /* Pseudonym generating secret */ #endif #if PPP_OPTIONS @@ -106,31 +106,31 @@ static int eap_printpkt(const u_char *inp, int inlen, #endif /* PRINTPKT_SUPPORT */ const struct protent eap_protent = { - PPP_EAP, /* protocol number */ - eap_init, /* initialization procedure */ - eap_input, /* process a received packet */ - eap_protrej, /* process a received protocol-reject */ - eap_lowerup, /* lower layer has gone up */ - eap_lowerdown, /* lower layer has gone down */ - NULL, /* open the protocol */ - NULL, /* close the protocol */ + PPP_EAP, /* protocol number */ + eap_init, /* initialization procedure */ + eap_input, /* process a received packet */ + eap_protrej, /* process a received protocol-reject */ + eap_lowerup, /* lower layer has gone up */ + eap_lowerdown, /* lower layer has gone down */ + NULL, /* open the protocol */ + NULL, /* close the protocol */ #if PRINTPKT_SUPPORT - eap_printpkt, /* print a packet in readable form */ + eap_printpkt, /* print a packet in readable form */ #endif /* PRINTPKT_SUPPORT */ #if PPP_DATAINPUT - NULL, /* process a received data packet */ + NULL, /* process a received data packet */ #endif /* PPP_DATAINPUT */ #if PRINTPKT_SUPPORT - "EAP", /* text name of protocol */ - NULL, /* text name of corresponding data protocol */ + "EAP", /* text name of protocol */ + NULL, /* text name of corresponding data protocol */ #endif /* PRINTPKT_SUPPORT */ #if PPP_OPTIONS - eap_option_list, /* list of command-line options */ - NULL, /* check requested options; assign defaults */ + eap_option_list, /* list of command-line options */ + NULL, /* check requested options; assign defaults */ #endif /* PPP_OPTIONS */ #if DEMAND_SUPPORT - NULL, /* configure interface for demand-dial */ - NULL /* say whether to bring up link for this pkt */ + NULL, /* configure interface for demand-dial */ + NULL /* say whether to bring up link for this pkt */ #endif /* DEMAND_SUPPORT */ }; @@ -139,38 +139,38 @@ const struct protent eap_protent = { * A well-known 2048 bit modulus. */ static const u_char wkmodulus[] = { - 0xAC, 0x6B, 0xDB, 0x41, 0x32, 0x4A, 0x9A, 0x9B, - 0xF1, 0x66, 0xDE, 0x5E, 0x13, 0x89, 0x58, 0x2F, - 0xAF, 0x72, 0xB6, 0x65, 0x19, 0x87, 0xEE, 0x07, - 0xFC, 0x31, 0x92, 0x94, 0x3D, 0xB5, 0x60, 0x50, - 0xA3, 0x73, 0x29, 0xCB, 0xB4, 0xA0, 0x99, 0xED, - 0x81, 0x93, 0xE0, 0x75, 0x77, 0x67, 0xA1, 0x3D, - 0xD5, 0x23, 0x12, 0xAB, 0x4B, 0x03, 0x31, 0x0D, - 0xCD, 0x7F, 0x48, 0xA9, 0xDA, 0x04, 0xFD, 0x50, - 0xE8, 0x08, 0x39, 0x69, 0xED, 0xB7, 0x67, 0xB0, - 0xCF, 0x60, 0x95, 0x17, 0x9A, 0x16, 0x3A, 0xB3, - 0x66, 0x1A, 0x05, 0xFB, 0xD5, 0xFA, 0xAA, 0xE8, - 0x29, 0x18, 0xA9, 0x96, 0x2F, 0x0B, 0x93, 0xB8, - 0x55, 0xF9, 0x79, 0x93, 0xEC, 0x97, 0x5E, 0xEA, - 0xA8, 0x0D, 0x74, 0x0A, 0xDB, 0xF4, 0xFF, 0x74, - 0x73, 0x59, 0xD0, 0x41, 0xD5, 0xC3, 0x3E, 0xA7, - 0x1D, 0x28, 0x1E, 0x44, 0x6B, 0x14, 0x77, 0x3B, - 0xCA, 0x97, 0xB4, 0x3A, 0x23, 0xFB, 0x80, 0x16, - 0x76, 0xBD, 0x20, 0x7A, 0x43, 0x6C, 0x64, 0x81, - 0xF1, 0xD2, 0xB9, 0x07, 0x87, 0x17, 0x46, 0x1A, - 0x5B, 0x9D, 0x32, 0xE6, 0x88, 0xF8, 0x77, 0x48, - 0x54, 0x45, 0x23, 0xB5, 0x24, 0xB0, 0xD5, 0x7D, - 0x5E, 0xA7, 0x7A, 0x27, 0x75, 0xD2, 0xEC, 0xFA, - 0x03, 0x2C, 0xFB, 0xDB, 0xF5, 0x2F, 0xB3, 0x78, - 0x61, 0x60, 0x27, 0x90, 0x04, 0xE5, 0x7A, 0xE6, - 0xAF, 0x87, 0x4E, 0x73, 0x03, 0xCE, 0x53, 0x29, - 0x9C, 0xCC, 0x04, 0x1C, 0x7B, 0xC3, 0x08, 0xD8, - 0x2A, 0x56, 0x98, 0xF3, 0xA8, 0xD0, 0xC3, 0x82, - 0x71, 0xAE, 0x35, 0xF8, 0xE9, 0xDB, 0xFB, 0xB6, - 0x94, 0xB5, 0xC8, 0x03, 0xD8, 0x9F, 0x7A, 0xE4, - 0x35, 0xDE, 0x23, 0x6D, 0x52, 0x5F, 0x54, 0x75, - 0x9B, 0x65, 0xE3, 0x72, 0xFC, 0xD6, 0x8E, 0xF2, - 0x0F, 0xA7, 0x11, 0x1F, 0x9E, 0x4A, 0xFF, 0x73 + 0xAC, 0x6B, 0xDB, 0x41, 0x32, 0x4A, 0x9A, 0x9B, + 0xF1, 0x66, 0xDE, 0x5E, 0x13, 0x89, 0x58, 0x2F, + 0xAF, 0x72, 0xB6, 0x65, 0x19, 0x87, 0xEE, 0x07, + 0xFC, 0x31, 0x92, 0x94, 0x3D, 0xB5, 0x60, 0x50, + 0xA3, 0x73, 0x29, 0xCB, 0xB4, 0xA0, 0x99, 0xED, + 0x81, 0x93, 0xE0, 0x75, 0x77, 0x67, 0xA1, 0x3D, + 0xD5, 0x23, 0x12, 0xAB, 0x4B, 0x03, 0x31, 0x0D, + 0xCD, 0x7F, 0x48, 0xA9, 0xDA, 0x04, 0xFD, 0x50, + 0xE8, 0x08, 0x39, 0x69, 0xED, 0xB7, 0x67, 0xB0, + 0xCF, 0x60, 0x95, 0x17, 0x9A, 0x16, 0x3A, 0xB3, + 0x66, 0x1A, 0x05, 0xFB, 0xD5, 0xFA, 0xAA, 0xE8, + 0x29, 0x18, 0xA9, 0x96, 0x2F, 0x0B, 0x93, 0xB8, + 0x55, 0xF9, 0x79, 0x93, 0xEC, 0x97, 0x5E, 0xEA, + 0xA8, 0x0D, 0x74, 0x0A, 0xDB, 0xF4, 0xFF, 0x74, + 0x73, 0x59, 0xD0, 0x41, 0xD5, 0xC3, 0x3E, 0xA7, + 0x1D, 0x28, 0x1E, 0x44, 0x6B, 0x14, 0x77, 0x3B, + 0xCA, 0x97, 0xB4, 0x3A, 0x23, 0xFB, 0x80, 0x16, + 0x76, 0xBD, 0x20, 0x7A, 0x43, 0x6C, 0x64, 0x81, + 0xF1, 0xD2, 0xB9, 0x07, 0x87, 0x17, 0x46, 0x1A, + 0x5B, 0x9D, 0x32, 0xE6, 0x88, 0xF8, 0x77, 0x48, + 0x54, 0x45, 0x23, 0xB5, 0x24, 0xB0, 0xD5, 0x7D, + 0x5E, 0xA7, 0x7A, 0x27, 0x75, 0xD2, 0xEC, 0xFA, + 0x03, 0x2C, 0xFB, 0xDB, 0xF5, 0x2F, 0xB3, 0x78, + 0x61, 0x60, 0x27, 0x90, 0x04, 0xE5, 0x7A, 0xE6, + 0xAF, 0x87, 0x4E, 0x73, 0x03, 0xCE, 0x53, 0x29, + 0x9C, 0xCC, 0x04, 0x1C, 0x7B, 0xC3, 0x08, 0xD8, + 0x2A, 0x56, 0x98, 0xF3, 0xA8, 0xD0, 0xC3, 0x82, + 0x71, 0xAE, 0x35, 0xF8, 0xE9, 0xDB, 0xFB, 0xB6, + 0x94, 0xB5, 0xC8, 0x03, 0xD8, 0x9F, 0x7A, 0xE4, + 0x35, 0xDE, 0x23, 0x6D, 0x52, 0x5F, 0x54, 0x75, + 0x9B, 0x65, 0xE3, 0x72, 0xFC, 0xD6, 0x8E, 0xF2, + 0x0F, 0xA7, 0x11, 0x1F, 0x9E, 0x4A, 0xFF, 0x73 }; #endif @@ -184,9 +184,9 @@ static void eap_server_timeout(void *arg); */ static const char * eap_state_name(enum eap_state_code esc) { - static const char *state_names[] = { EAP_STATES }; + static const char *state_names[] = { EAP_STATES }; - return (state_names[(int)esc]); + return (state_names[(int)esc]); } /* @@ -195,9 +195,9 @@ static const char * eap_state_name(enum eap_state_code esc) */ static void eap_init(ppp_pcb *pcb) { - BZERO(&pcb->eap, sizeof(eap_state)); + BZERO(&pcb->eap, sizeof(eap_state)); #if PPP_SERVER - pcb->eap.es_server.ea_id = magic(); + pcb->eap.es_server.ea_id = magic(); #endif /* PPP_SERVER */ } @@ -206,14 +206,14 @@ static void eap_init(ppp_pcb *pcb) { * Request messages. */ static void eap_client_timeout(void *arg) { - ppp_pcb *pcb = (ppp_pcb*)arg; + ppp_pcb *pcb = (ppp_pcb*)arg; - if (!eap_client_active(pcb)) - return; + if (!eap_client_active(pcb)) + return; - ppp_error("EAP: timeout waiting for Request from peer"); - auth_withpeer_fail(pcb, PPP_EAP); - pcb->eap.es_client.ea_state = eapBadAuth; + ppp_error("EAP: timeout waiting for Request from peer"); + auth_withpeer_fail(pcb, PPP_EAP); + pcb->eap.es_client.ea_state = eapBadAuth; } /* @@ -224,22 +224,22 @@ static void eap_client_timeout(void *arg) { */ void eap_authwithpeer(ppp_pcb *pcb, const char *localname) { - if(NULL == localname) - return; + if(NULL == localname) + return; - /* Save the peer name we're given */ - pcb->eap.es_client.ea_name = localname; - pcb->eap.es_client.ea_namelen = strlen(localname); + /* Save the peer name we're given */ + pcb->eap.es_client.ea_name = localname; + pcb->eap.es_client.ea_namelen = strlen(localname); - pcb->eap.es_client.ea_state = eapListen; + pcb->eap.es_client.ea_state = eapListen; - /* - * Start a timer so that if the other end just goes - * silent, we don't sit here waiting forever. - */ - if (pcb->settings.eap_req_time > 0) - TIMEOUT(eap_client_timeout, pcb, - pcb->settings.eap_req_time); + /* + * Start a timer so that if the other end just goes + * silent, we don't sit here waiting forever. + */ + if (pcb->settings.eap_req_time > 0) + TIMEOUT(eap_client_timeout, pcb, + pcb->settings.eap_req_time); } #if PPP_SERVER @@ -248,30 +248,30 @@ void eap_authwithpeer(ppp_pcb *pcb, const char *localname) { * (Server operation) */ static void eap_send_failure(ppp_pcb *pcb) { - struct pbuf *p; - u_char *outp; + struct pbuf *p; + u_char *outp; - p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + EAP_HEADERLEN), PPP_CTRL_PBUF_TYPE); - if(NULL == p) - return; - if(p->tot_len != p->len) { - pbuf_free(p); - return; - } + p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + EAP_HEADERLEN), PPP_CTRL_PBUF_TYPE); + if(NULL == p) + return; + if(p->tot_len != p->len) { + pbuf_free(p); + return; + } - outp = (u_char*)p->payload; + outp = (u_char*)p->payload; - MAKEHEADER(outp, PPP_EAP); + MAKEHEADER(outp, PPP_EAP); - PUTCHAR(EAP_FAILURE, outp); - pcb->eap.es_server.ea_id++; - PUTCHAR(pcb->eap.es_server.ea_id, outp); - PUTSHORT(EAP_HEADERLEN, outp); + PUTCHAR(EAP_FAILURE, outp); + pcb->eap.es_server.ea_id++; + PUTCHAR(pcb->eap.es_server.ea_id, outp); + PUTSHORT(EAP_HEADERLEN, outp); - ppp_write(pcb, p); + ppp_write(pcb, p); - pcb->eap.es_server.ea_state = eapBadAuth; - auth_peer_fail(pcb, PPP_EAP); + pcb->eap.es_server.ea_state = eapBadAuth; + auth_peer_fail(pcb, PPP_EAP); } /* @@ -279,30 +279,30 @@ static void eap_send_failure(ppp_pcb *pcb) { * (Server operation) */ static void eap_send_success(ppp_pcb *pcb) { - struct pbuf *p; - u_char *outp; + struct pbuf *p; + u_char *outp; - p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + EAP_HEADERLEN), PPP_CTRL_PBUF_TYPE); - if(NULL == p) - return; - if(p->tot_len != p->len) { - pbuf_free(p); - return; - } + p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + EAP_HEADERLEN), PPP_CTRL_PBUF_TYPE); + if(NULL == p) + return; + if(p->tot_len != p->len) { + pbuf_free(p); + return; + } - outp = (u_char*)p->payload; + outp = (u_char*)p->payload; - MAKEHEADER(outp, PPP_EAP); + MAKEHEADER(outp, PPP_EAP); - PUTCHAR(EAP_SUCCESS, outp); - pcb->eap.es_server.ea_id++; - PUTCHAR(pcb->eap.es_server.ea_id, outp); - PUTSHORT(EAP_HEADERLEN, outp); + PUTCHAR(EAP_SUCCESS, outp); + pcb->eap.es_server.ea_id++; + PUTCHAR(pcb->eap.es_server.ea_id, outp); + PUTSHORT(EAP_HEADERLEN, outp); - ppp_write(pcb, p); + ppp_write(pcb, p); - auth_peer_success(pcb, PPP_EAP, 0, - pcb->eap.es_server.ea_peer, pcb->eap.es_server.ea_peerlen); + auth_peer_success(pcb, PPP_EAP, 0, + pcb->eap.es_server.ea_peer, pcb->eap.es_server.ea_peerlen); } #endif /* PPP_SERVER */ @@ -314,31 +314,31 @@ static void eap_send_success(ppp_pcb *pcb) { static bool pncrypt_setkey(int timeoffs) { - struct tm *tp; - char tbuf[9]; - SHA1_CTX ctxt; - u_char dig[SHA_DIGESTSIZE]; - time_t reftime; + struct tm *tp; + char tbuf[9]; + SHA1_CTX ctxt; + u_char dig[SHA_DIGESTSIZE]; + time_t reftime; - if (pn_secret == NULL) - return (0); - reftime = time(NULL) + timeoffs; - tp = localtime(&reftime); - SHA1Init(&ctxt); - SHA1Update(&ctxt, pn_secret, strlen(pn_secret)); - strftime(tbuf, sizeof (tbuf), "%Y%m%d", tp); - SHA1Update(&ctxt, tbuf, strlen(tbuf)); - SHA1Final(dig, &ctxt); - /* FIXME: if we want to do SRP, we need to find a way to pass the PolarSSL des_context instead of using static memory */ - return (DesSetkey(dig)); + if (pn_secret == NULL) + return (0); + reftime = time(NULL) + timeoffs; + tp = localtime(&reftime); + SHA1Init(&ctxt); + SHA1Update(&ctxt, pn_secret, strlen(pn_secret)); + strftime(tbuf, sizeof (tbuf), "%Y%m%d", tp); + SHA1Update(&ctxt, tbuf, strlen(tbuf)); + SHA1Final(dig, &ctxt); + /* FIXME: if we want to do SRP, we need to find a way to pass the PolarSSL des_context instead of using static memory */ + return (DesSetkey(dig)); } static char base64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; struct b64state { - u32_t bs_bits; - int bs_offs; + u32_t bs_bits; + int bs_offs; }; static int @@ -348,23 +348,23 @@ u_char *inp; int inlen; u_char *outp; { - int outlen = 0; + int outlen = 0; - while (inlen > 0) { - bs->bs_bits = (bs->bs_bits << 8) | *inp++; - inlen--; - bs->bs_offs += 8; - if (bs->bs_offs >= 24) { - *outp++ = base64[(bs->bs_bits >> 18) & 0x3F]; - *outp++ = base64[(bs->bs_bits >> 12) & 0x3F]; - *outp++ = base64[(bs->bs_bits >> 6) & 0x3F]; - *outp++ = base64[bs->bs_bits & 0x3F]; - outlen += 4; - bs->bs_offs = 0; - bs->bs_bits = 0; - } - } - return (outlen); + while (inlen > 0) { + bs->bs_bits = (bs->bs_bits << 8) | *inp++; + inlen--; + bs->bs_offs += 8; + if (bs->bs_offs >= 24) { + *outp++ = base64[(bs->bs_bits >> 18) & 0x3F]; + *outp++ = base64[(bs->bs_bits >> 12) & 0x3F]; + *outp++ = base64[(bs->bs_bits >> 6) & 0x3F]; + *outp++ = base64[bs->bs_bits & 0x3F]; + outlen += 4; + bs->bs_offs = 0; + bs->bs_bits = 0; + } + } + return (outlen); } static int @@ -372,21 +372,21 @@ b64flush(bs, outp) struct b64state *bs; u_char *outp; { - int outlen = 0; + int outlen = 0; - if (bs->bs_offs == 8) { - *outp++ = base64[(bs->bs_bits >> 2) & 0x3F]; - *outp++ = base64[(bs->bs_bits << 4) & 0x3F]; - outlen = 2; - } else if (bs->bs_offs == 16) { - *outp++ = base64[(bs->bs_bits >> 10) & 0x3F]; - *outp++ = base64[(bs->bs_bits >> 4) & 0x3F]; - *outp++ = base64[(bs->bs_bits << 2) & 0x3F]; - outlen = 3; - } - bs->bs_offs = 0; - bs->bs_bits = 0; - return (outlen); + if (bs->bs_offs == 8) { + *outp++ = base64[(bs->bs_bits >> 2) & 0x3F]; + *outp++ = base64[(bs->bs_bits << 4) & 0x3F]; + outlen = 2; + } else if (bs->bs_offs == 16) { + *outp++ = base64[(bs->bs_bits >> 10) & 0x3F]; + *outp++ = base64[(bs->bs_bits >> 4) & 0x3F]; + *outp++ = base64[(bs->bs_bits << 2) & 0x3F]; + outlen = 3; + } + bs->bs_offs = 0; + bs->bs_bits = 0; + return (outlen); } static int @@ -396,22 +396,22 @@ u_char *inp; int inlen; u_char *outp; { - int outlen = 0; - char *cp; + int outlen = 0; + char *cp; - while (inlen > 0) { - if ((cp = strchr(base64, *inp++)) == NULL) - break; - bs->bs_bits = (bs->bs_bits << 6) | (cp - base64); - inlen--; - bs->bs_offs += 6; - if (bs->bs_offs >= 8) { - *outp++ = bs->bs_bits >> (bs->bs_offs - 8); - outlen++; - bs->bs_offs -= 8; - } - } - return (outlen); + while (inlen > 0) { + if ((cp = strchr(base64, *inp++)) == NULL) + break; + bs->bs_bits = (bs->bs_bits << 6) | (cp - base64); + inlen--; + bs->bs_offs += 6; + if (bs->bs_offs >= 8) { + *outp++ = bs->bs_bits >> (bs->bs_offs - 8); + outlen++; + bs->bs_offs -= 8; + } + } + return (outlen); } #endif /* USE_SRP */ @@ -424,211 +424,211 @@ u_char *outp; */ static void eap_figure_next_state(ppp_pcb *pcb, int status) { #ifdef USE_SRP - unsigned char secbuf[MAXSECRETLEN], clear[8], *sp, *dp; - struct t_pw tpw; - struct t_confent *tce, mytce; - char *cp, *cp2; - struct t_server *ts; - int id, i, plen, toffs; - u_char vals[2]; - struct b64state bs; + unsigned char secbuf[MAXSECRETLEN], clear[8], *sp, *dp; + struct t_pw tpw; + struct t_confent *tce, mytce; + char *cp, *cp2; + struct t_server *ts; + int id, i, plen, toffs; + u_char vals[2]; + struct b64state bs; #endif /* USE_SRP */ - pcb->settings.eap_timeout_time = pcb->eap.es_savedtime; - switch (pcb->eap.es_server.ea_state) { - case eapBadAuth: - return; + pcb->settings.eap_timeout_time = pcb->eap.es_savedtime; + switch (pcb->eap.es_server.ea_state) { + case eapBadAuth: + return; - case eapIdentify: + case eapIdentify: #ifdef USE_SRP - /* Discard any previous session. */ - ts = (struct t_server *)pcb->eap.es_server.ea_session; - if (ts != NULL) { - t_serverclose(ts); - pcb->eap.es_server.ea_session = NULL; - pcb->eap.es_server.ea_skey = NULL; - } + /* Discard any previous session. */ + ts = (struct t_server *)pcb->eap.es_server.ea_session; + if (ts != NULL) { + t_serverclose(ts); + pcb->eap.es_server.ea_session = NULL; + pcb->eap.es_server.ea_skey = NULL; + } #endif /* USE_SRP */ - if (status != 0) { - pcb->eap.es_server.ea_state = eapBadAuth; - break; - } + if (status != 0) { + pcb->eap.es_server.ea_state = eapBadAuth; + break; + } #ifdef USE_SRP - /* If we've got a pseudonym, try to decode to real name. */ - if (pcb->eap.es_server.ea_peerlen > SRP_PSEUDO_LEN && - strncmp(pcb->eap.es_server.ea_peer, SRP_PSEUDO_ID, - SRP_PSEUDO_LEN) == 0 && - (pcb->eap.es_server.ea_peerlen - SRP_PSEUDO_LEN) * 3 / 4 < - sizeof (secbuf)) { - BZERO(&bs, sizeof (bs)); - plen = b64dec(&bs, - pcb->eap.es_server.ea_peer + SRP_PSEUDO_LEN, - pcb->eap.es_server.ea_peerlen - SRP_PSEUDO_LEN, - secbuf); - toffs = 0; - for (i = 0; i < 5; i++) { - pncrypt_setkey(toffs); - toffs -= 86400; - /* FIXME: if we want to do SRP, we need to find a way to pass the PolarSSL des_context instead of using static memory */ - if (!DesDecrypt(secbuf, clear)) { - ppp_dbglog("no DES here; cannot decode " - "pseudonym"); - return; - } - id = *(unsigned char *)clear; - if (id + 1 <= plen && id + 9 > plen) - break; - } - if (plen % 8 == 0 && i < 5) { - /* - * Note that this is always shorter than the - * original stored string, so there's no need - * to realloc. - */ - if ((i = plen = *(unsigned char *)clear) > 7) - i = 7; - pcb->eap.es_server.ea_peerlen = plen; - dp = (unsigned char *)pcb->eap.es_server.ea_peer; - MEMCPY(dp, clear + 1, i); - plen -= i; - dp += i; - sp = secbuf + 8; - while (plen > 0) { - /* FIXME: if we want to do SRP, we need to find a way to pass the PolarSSL des_context instead of using static memory */ - (void) DesDecrypt(sp, dp); - sp += 8; - dp += 8; - plen -= 8; - } - pcb->eap.es_server.ea_peer[ - pcb->eap.es_server.ea_peerlen] = '\0'; - ppp_dbglog("decoded pseudonym to \"%.*q\"", - pcb->eap.es_server.ea_peerlen, - pcb->eap.es_server.ea_peer); - } else { - ppp_dbglog("failed to decode real name"); - /* Stay in eapIdentfy state; requery */ - break; - } - } - /* Look up user in secrets database. */ - if (get_srp_secret(pcb->eap.es_unit, pcb->eap.es_server.ea_peer, - pcb->eap.es_server.ea_name, (char *)secbuf, 1) != 0) { - /* Set up default in case SRP entry is bad */ - pcb->eap.es_server.ea_state = eapMD5Chall; - /* Get t_confent based on index in srp-secrets */ - id = strtol((char *)secbuf, &cp, 10); - if (*cp++ != ':' || id < 0) - break; - if (id == 0) { - mytce.index = 0; - mytce.modulus.data = (u_char *)wkmodulus; - mytce.modulus.len = sizeof (wkmodulus); - mytce.generator.data = (u_char *)"\002"; - mytce.generator.len = 1; - tce = &mytce; - } else if ((tce = gettcid(id)) != NULL) { - /* - * Client will have to verify this modulus/ - * generator combination, and that will take - * a while. Lengthen the timeout here. - */ - if (pcb->settings.eap_timeout_time > 0 && - pcb->settings.eap_timeout_time < 30) - pcb->settings.eap_timeout_time = 30; - } else { - break; - } - if ((cp2 = strchr(cp, ':')) == NULL) - break; - *cp2++ = '\0'; - tpw.pebuf.name = pcb->eap.es_server.ea_peer; - tpw.pebuf.password.len = t_fromb64((char *)tpw.pwbuf, - cp); - tpw.pebuf.password.data = tpw.pwbuf; - tpw.pebuf.salt.len = t_fromb64((char *)tpw.saltbuf, - cp2); - tpw.pebuf.salt.data = tpw.saltbuf; - if ((ts = t_serveropenraw(&tpw.pebuf, tce)) == NULL) - break; - pcb->eap.es_server.ea_session = (void *)ts; - pcb->eap.es_server.ea_state = eapSRP1; - vals[0] = pcb->eap.es_server.ea_id + 1; - vals[1] = EAPT_SRP; - t_serveraddexdata(ts, vals, 2); - /* Generate B; must call before t_servergetkey() */ - t_servergenexp(ts); - break; - } + /* If we've got a pseudonym, try to decode to real name. */ + if (pcb->eap.es_server.ea_peerlen > SRP_PSEUDO_LEN && + strncmp(pcb->eap.es_server.ea_peer, SRP_PSEUDO_ID, + SRP_PSEUDO_LEN) == 0 && + (pcb->eap.es_server.ea_peerlen - SRP_PSEUDO_LEN) * 3 / 4 < + sizeof (secbuf)) { + BZERO(&bs, sizeof (bs)); + plen = b64dec(&bs, + pcb->eap.es_server.ea_peer + SRP_PSEUDO_LEN, + pcb->eap.es_server.ea_peerlen - SRP_PSEUDO_LEN, + secbuf); + toffs = 0; + for (i = 0; i < 5; i++) { + pncrypt_setkey(toffs); + toffs -= 86400; + /* FIXME: if we want to do SRP, we need to find a way to pass the PolarSSL des_context instead of using static memory */ + if (!DesDecrypt(secbuf, clear)) { + ppp_dbglog("no DES here; cannot decode " + "pseudonym"); + return; + } + id = *(unsigned char *)clear; + if (id + 1 <= plen && id + 9 > plen) + break; + } + if (plen % 8 == 0 && i < 5) { + /* + * Note that this is always shorter than the + * original stored string, so there's no need + * to realloc. + */ + if ((i = plen = *(unsigned char *)clear) > 7) + i = 7; + pcb->eap.es_server.ea_peerlen = plen; + dp = (unsigned char *)pcb->eap.es_server.ea_peer; + MEMCPY(dp, clear + 1, i); + plen -= i; + dp += i; + sp = secbuf + 8; + while (plen > 0) { + /* FIXME: if we want to do SRP, we need to find a way to pass the PolarSSL des_context instead of using static memory */ + (void) DesDecrypt(sp, dp); + sp += 8; + dp += 8; + plen -= 8; + } + pcb->eap.es_server.ea_peer[ + pcb->eap.es_server.ea_peerlen] = '\0'; + ppp_dbglog("decoded pseudonym to \"%.*q\"", + pcb->eap.es_server.ea_peerlen, + pcb->eap.es_server.ea_peer); + } else { + ppp_dbglog("failed to decode real name"); + /* Stay in eapIdentfy state; requery */ + break; + } + } + /* Look up user in secrets database. */ + if (get_srp_secret(pcb->eap.es_unit, pcb->eap.es_server.ea_peer, + pcb->eap.es_server.ea_name, (char *)secbuf, 1) != 0) { + /* Set up default in case SRP entry is bad */ + pcb->eap.es_server.ea_state = eapMD5Chall; + /* Get t_confent based on index in srp-secrets */ + id = strtol((char *)secbuf, &cp, 10); + if (*cp++ != ':' || id < 0) + break; + if (id == 0) { + mytce.index = 0; + mytce.modulus.data = (u_char *)wkmodulus; + mytce.modulus.len = sizeof (wkmodulus); + mytce.generator.data = (u_char *)"\002"; + mytce.generator.len = 1; + tce = &mytce; + } else if ((tce = gettcid(id)) != NULL) { + /* + * Client will have to verify this modulus/ + * generator combination, and that will take + * a while. Lengthen the timeout here. + */ + if (pcb->settings.eap_timeout_time > 0 && + pcb->settings.eap_timeout_time < 30) + pcb->settings.eap_timeout_time = 30; + } else { + break; + } + if ((cp2 = strchr(cp, ':')) == NULL) + break; + *cp2++ = '\0'; + tpw.pebuf.name = pcb->eap.es_server.ea_peer; + tpw.pebuf.password.len = t_fromb64((char *)tpw.pwbuf, + cp); + tpw.pebuf.password.data = tpw.pwbuf; + tpw.pebuf.salt.len = t_fromb64((char *)tpw.saltbuf, + cp2); + tpw.pebuf.salt.data = tpw.saltbuf; + if ((ts = t_serveropenraw(&tpw.pebuf, tce)) == NULL) + break; + pcb->eap.es_server.ea_session = (void *)ts; + pcb->eap.es_server.ea_state = eapSRP1; + vals[0] = pcb->eap.es_server.ea_id + 1; + vals[1] = EAPT_SRP; + t_serveraddexdata(ts, vals, 2); + /* Generate B; must call before t_servergetkey() */ + t_servergenexp(ts); + break; + } #endif /* USE_SRP */ - pcb->eap.es_server.ea_state = eapMD5Chall; - break; + pcb->eap.es_server.ea_state = eapMD5Chall; + break; - case eapSRP1: + case eapSRP1: #ifdef USE_SRP - ts = (struct t_server *)pcb->eap.es_server.ea_session; - if (ts != NULL && status != 0) { - t_serverclose(ts); - pcb->eap.es_server.ea_session = NULL; - pcb->eap.es_server.ea_skey = NULL; - } + ts = (struct t_server *)pcb->eap.es_server.ea_session; + if (ts != NULL && status != 0) { + t_serverclose(ts); + pcb->eap.es_server.ea_session = NULL; + pcb->eap.es_server.ea_skey = NULL; + } #endif /* USE_SRP */ - if (status == 1) { - pcb->eap.es_server.ea_state = eapMD5Chall; - } else if (status != 0 || pcb->eap.es_server.ea_session == NULL) { - pcb->eap.es_server.ea_state = eapBadAuth; - } else { - pcb->eap.es_server.ea_state = eapSRP2; - } - break; + if (status == 1) { + pcb->eap.es_server.ea_state = eapMD5Chall; + } else if (status != 0 || pcb->eap.es_server.ea_session == NULL) { + pcb->eap.es_server.ea_state = eapBadAuth; + } else { + pcb->eap.es_server.ea_state = eapSRP2; + } + break; - case eapSRP2: + case eapSRP2: #ifdef USE_SRP - ts = (struct t_server *)pcb->eap.es_server.ea_session; - if (ts != NULL && status != 0) { - t_serverclose(ts); - pcb->eap.es_server.ea_session = NULL; - pcb->eap.es_server.ea_skey = NULL; - } + ts = (struct t_server *)pcb->eap.es_server.ea_session; + if (ts != NULL && status != 0) { + t_serverclose(ts); + pcb->eap.es_server.ea_session = NULL; + pcb->eap.es_server.ea_skey = NULL; + } #endif /* USE_SRP */ - if (status != 0 || pcb->eap.es_server.ea_session == NULL) { - pcb->eap.es_server.ea_state = eapBadAuth; - } else { - pcb->eap.es_server.ea_state = eapSRP3; - } - break; + if (status != 0 || pcb->eap.es_server.ea_session == NULL) { + pcb->eap.es_server.ea_state = eapBadAuth; + } else { + pcb->eap.es_server.ea_state = eapSRP3; + } + break; - case eapSRP3: - case eapSRP4: + case eapSRP3: + case eapSRP4: #ifdef USE_SRP - ts = (struct t_server *)pcb->eap.es_server.ea_session; - if (ts != NULL && status != 0) { - t_serverclose(ts); - pcb->eap.es_server.ea_session = NULL; - pcb->eap.es_server.ea_skey = NULL; - } + ts = (struct t_server *)pcb->eap.es_server.ea_session; + if (ts != NULL && status != 0) { + t_serverclose(ts); + pcb->eap.es_server.ea_session = NULL; + pcb->eap.es_server.ea_skey = NULL; + } #endif /* USE_SRP */ - if (status != 0 || pcb->eap.es_server.ea_session == NULL) { - pcb->eap.es_server.ea_state = eapBadAuth; - } else { - pcb->eap.es_server.ea_state = eapOpen; - } - break; + if (status != 0 || pcb->eap.es_server.ea_session == NULL) { + pcb->eap.es_server.ea_state = eapBadAuth; + } else { + pcb->eap.es_server.ea_state = eapOpen; + } + break; - case eapMD5Chall: - if (status != 0) { - pcb->eap.es_server.ea_state = eapBadAuth; - } else { - pcb->eap.es_server.ea_state = eapOpen; - } - break; + case eapMD5Chall: + if (status != 0) { + pcb->eap.es_server.ea_state = eapBadAuth; + } else { + pcb->eap.es_server.ea_state = eapOpen; + } + break; - default: - pcb->eap.es_server.ea_state = eapBadAuth; - break; - } - if (pcb->eap.es_server.ea_state == eapBadAuth) - eap_send_failure(pcb); + default: + pcb->eap.es_server.ea_state = eapBadAuth; + break; + } + if (pcb->eap.es_server.ea_state == eapBadAuth) + eap_send_failure(pcb); } /* @@ -636,235 +636,235 @@ static void eap_figure_next_state(ppp_pcb *pcb, int status) { * type depends on current state. (Server operation) */ static void eap_send_request(ppp_pcb *pcb) { - struct pbuf *p; - u_char *outp; - u_char *lenloc; - int outlen; - int len; - const char *str; + struct pbuf *p; + u_char *outp; + u_char *lenloc; + int outlen; + int len; + const char *str; #ifdef USE_SRP - struct t_server *ts; - u_char clear[8], cipher[8], dig[SHA_DIGESTSIZE], *optr, *cp; - int i, j; - struct b64state b64; - SHA1_CTX ctxt; + struct t_server *ts; + u_char clear[8], cipher[8], dig[SHA_DIGESTSIZE], *optr, *cp; + int i, j; + struct b64state b64; + SHA1_CTX ctxt; #endif /* USE_SRP */ - /* Handle both initial auth and restart */ - if (pcb->eap.es_server.ea_state < eapIdentify && - pcb->eap.es_server.ea_state != eapInitial) { - pcb->eap.es_server.ea_state = eapIdentify; + /* Handle both initial auth and restart */ + if (pcb->eap.es_server.ea_state < eapIdentify && + pcb->eap.es_server.ea_state != eapInitial) { + pcb->eap.es_server.ea_state = eapIdentify; #if PPP_REMOTENAME - if (pcb->settings.explicit_remote && pcb->remote_name) { - /* - * If we already know the peer's - * unauthenticated name, then there's no - * reason to ask. Go to next state instead. - */ - int len = (int)strlen(pcb->remote_name); - if (len > MAXNAMELEN) { - len = MAXNAMELEN; - } - MEMCPY(pcb->eap.es_server.ea_peer, pcb->remote_name, len); - pcb->eap.es_server.ea_peer[len] = '\0'; - pcb->eap.es_server.ea_peerlen = len; - eap_figure_next_state(pcb, 0); - } + if (pcb->settings.explicit_remote && pcb->remote_name) { + /* + * If we already know the peer's + * unauthenticated name, then there's no + * reason to ask. Go to next state instead. + */ + int len = (int)strlen(pcb->remote_name); + if (len > MAXNAMELEN) { + len = MAXNAMELEN; + } + MEMCPY(pcb->eap.es_server.ea_peer, pcb->remote_name, len); + pcb->eap.es_server.ea_peer[len] = '\0'; + pcb->eap.es_server.ea_peerlen = len; + eap_figure_next_state(pcb, 0); + } #endif /* PPP_REMOTENAME */ - } + } - if (pcb->settings.eap_max_transmits > 0 && - pcb->eap.es_server.ea_requests >= pcb->settings.eap_max_transmits) { - if (pcb->eap.es_server.ea_responses > 0) - ppp_error("EAP: too many Requests sent"); - else - ppp_error("EAP: no response to Requests"); - eap_send_failure(pcb); - return; - } + if (pcb->settings.eap_max_transmits > 0 && + pcb->eap.es_server.ea_requests >= pcb->settings.eap_max_transmits) { + if (pcb->eap.es_server.ea_responses > 0) + ppp_error("EAP: too many Requests sent"); + else + ppp_error("EAP: no response to Requests"); + eap_send_failure(pcb); + return; + } - p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_CTRL_PBUF_MAX_SIZE), PPP_CTRL_PBUF_TYPE); - if(NULL == p) - return; - if(p->tot_len != p->len) { - pbuf_free(p); - return; - } + p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_CTRL_PBUF_MAX_SIZE), PPP_CTRL_PBUF_TYPE); + if(NULL == p) + return; + if(p->tot_len != p->len) { + pbuf_free(p); + return; + } - outp = (u_char*)p->payload; + outp = (u_char*)p->payload; - MAKEHEADER(outp, PPP_EAP); + MAKEHEADER(outp, PPP_EAP); - PUTCHAR(EAP_REQUEST, outp); - PUTCHAR(pcb->eap.es_server.ea_id, outp); - lenloc = outp; - INCPTR(2, outp); + PUTCHAR(EAP_REQUEST, outp); + PUTCHAR(pcb->eap.es_server.ea_id, outp); + lenloc = outp; + INCPTR(2, outp); - switch (pcb->eap.es_server.ea_state) { - case eapIdentify: - PUTCHAR(EAPT_IDENTITY, outp); - str = "Name"; - len = strlen(str); - MEMCPY(outp, str, len); - INCPTR(len, outp); - break; + switch (pcb->eap.es_server.ea_state) { + case eapIdentify: + PUTCHAR(EAPT_IDENTITY, outp); + str = "Name"; + len = strlen(str); + MEMCPY(outp, str, len); + INCPTR(len, outp); + break; - case eapMD5Chall: - PUTCHAR(EAPT_MD5CHAP, outp); - /* - * pick a random challenge length between - * EAP_MIN_CHALLENGE_LENGTH and EAP_MAX_CHALLENGE_LENGTH - */ - pcb->eap.es_challen = EAP_MIN_CHALLENGE_LENGTH + - magic_pow(EAP_MIN_MAX_POWER_OF_TWO_CHALLENGE_LENGTH); - PUTCHAR(pcb->eap.es_challen, outp); - magic_random_bytes(pcb->eap.es_challenge, pcb->eap.es_challen); - MEMCPY(outp, pcb->eap.es_challenge, pcb->eap.es_challen); - INCPTR(pcb->eap.es_challen, outp); - MEMCPY(outp, pcb->eap.es_server.ea_name, pcb->eap.es_server.ea_namelen); - INCPTR(pcb->eap.es_server.ea_namelen, outp); - break; + case eapMD5Chall: + PUTCHAR(EAPT_MD5CHAP, outp); + /* + * pick a random challenge length between + * EAP_MIN_CHALLENGE_LENGTH and EAP_MAX_CHALLENGE_LENGTH + */ + pcb->eap.es_challen = EAP_MIN_CHALLENGE_LENGTH + + magic_pow(EAP_MIN_MAX_POWER_OF_TWO_CHALLENGE_LENGTH); + PUTCHAR(pcb->eap.es_challen, outp); + magic_random_bytes(pcb->eap.es_challenge, pcb->eap.es_challen); + MEMCPY(outp, pcb->eap.es_challenge, pcb->eap.es_challen); + INCPTR(pcb->eap.es_challen, outp); + MEMCPY(outp, pcb->eap.es_server.ea_name, pcb->eap.es_server.ea_namelen); + INCPTR(pcb->eap.es_server.ea_namelen, outp); + break; #ifdef USE_SRP - case eapSRP1: - PUTCHAR(EAPT_SRP, outp); - PUTCHAR(EAPSRP_CHALLENGE, outp); + case eapSRP1: + PUTCHAR(EAPT_SRP, outp); + PUTCHAR(EAPSRP_CHALLENGE, outp); - PUTCHAR(pcb->eap.es_server.ea_namelen, outp); - MEMCPY(outp, pcb->eap.es_server.ea_name, pcb->eap.es_server.ea_namelen); - INCPTR(pcb->eap.es_server.ea_namelen, outp); + PUTCHAR(pcb->eap.es_server.ea_namelen, outp); + MEMCPY(outp, pcb->eap.es_server.ea_name, pcb->eap.es_server.ea_namelen); + INCPTR(pcb->eap.es_server.ea_namelen, outp); - ts = (struct t_server *)pcb->eap.es_server.ea_session; - assert(ts != NULL); - PUTCHAR(ts->s.len, outp); - MEMCPY(outp, ts->s.data, ts->s.len); - INCPTR(ts->s.len, outp); + ts = (struct t_server *)pcb->eap.es_server.ea_session; + assert(ts != NULL); + PUTCHAR(ts->s.len, outp); + MEMCPY(outp, ts->s.data, ts->s.len); + INCPTR(ts->s.len, outp); - if (ts->g.len == 1 && ts->g.data[0] == 2) { - PUTCHAR(0, outp); - } else { - PUTCHAR(ts->g.len, outp); - MEMCPY(outp, ts->g.data, ts->g.len); - INCPTR(ts->g.len, outp); - } + if (ts->g.len == 1 && ts->g.data[0] == 2) { + PUTCHAR(0, outp); + } else { + PUTCHAR(ts->g.len, outp); + MEMCPY(outp, ts->g.data, ts->g.len); + INCPTR(ts->g.len, outp); + } - if (ts->n.len != sizeof (wkmodulus) || - BCMP(ts->n.data, wkmodulus, sizeof (wkmodulus)) != 0) { - MEMCPY(outp, ts->n.data, ts->n.len); - INCPTR(ts->n.len, outp); - } - break; + if (ts->n.len != sizeof (wkmodulus) || + BCMP(ts->n.data, wkmodulus, sizeof (wkmodulus)) != 0) { + MEMCPY(outp, ts->n.data, ts->n.len); + INCPTR(ts->n.len, outp); + } + break; - case eapSRP2: - PUTCHAR(EAPT_SRP, outp); - PUTCHAR(EAPSRP_SKEY, outp); + case eapSRP2: + PUTCHAR(EAPT_SRP, outp); + PUTCHAR(EAPSRP_SKEY, outp); - ts = (struct t_server *)pcb->eap.es_server.ea_session; - assert(ts != NULL); - MEMCPY(outp, ts->B.data, ts->B.len); - INCPTR(ts->B.len, outp); - break; + ts = (struct t_server *)pcb->eap.es_server.ea_session; + assert(ts != NULL); + MEMCPY(outp, ts->B.data, ts->B.len); + INCPTR(ts->B.len, outp); + break; - case eapSRP3: - PUTCHAR(EAPT_SRP, outp); - PUTCHAR(EAPSRP_SVALIDATOR, outp); - PUTLONG(SRPVAL_EBIT, outp); - ts = (struct t_server *)pcb->eap.es_server.ea_session; - assert(ts != NULL); - MEMCPY(outp, t_serverresponse(ts), SHA_DIGESTSIZE); - INCPTR(SHA_DIGESTSIZE, outp); + case eapSRP3: + PUTCHAR(EAPT_SRP, outp); + PUTCHAR(EAPSRP_SVALIDATOR, outp); + PUTLONG(SRPVAL_EBIT, outp); + ts = (struct t_server *)pcb->eap.es_server.ea_session; + assert(ts != NULL); + MEMCPY(outp, t_serverresponse(ts), SHA_DIGESTSIZE); + INCPTR(SHA_DIGESTSIZE, outp); - if (pncrypt_setkey(0)) { - /* Generate pseudonym */ - optr = outp; - cp = (unsigned char *)pcb->eap.es_server.ea_peer; - if ((j = i = pcb->eap.es_server.ea_peerlen) > 7) - j = 7; - clear[0] = i; - MEMCPY(clear + 1, cp, j); - i -= j; - cp += j; - /* FIXME: if we want to do SRP, we need to find a way to pass the PolarSSL des_context instead of using static memory */ - if (!DesEncrypt(clear, cipher)) { - ppp_dbglog("no DES here; not generating pseudonym"); - break; - } - BZERO(&b64, sizeof (b64)); - outp++; /* space for pseudonym length */ - outp += b64enc(&b64, cipher, 8, outp); - while (i >= 8) { - /* FIXME: if we want to do SRP, we need to find a way to pass the PolarSSL des_context instead of using static memory */ - (void) DesEncrypt(cp, cipher); - outp += b64enc(&b64, cipher, 8, outp); - cp += 8; - i -= 8; - } - if (i > 0) { - MEMCPY(clear, cp, i); - cp += i; - magic_random_bytes(cp, 8-i); - /* FIXME: if we want to do SRP, we need to find a way to pass the PolarSSL des_context instead of using static memory */ - (void) DesEncrypt(clear, cipher); - outp += b64enc(&b64, cipher, 8, outp); - } - outp += b64flush(&b64, outp); + if (pncrypt_setkey(0)) { + /* Generate pseudonym */ + optr = outp; + cp = (unsigned char *)pcb->eap.es_server.ea_peer; + if ((j = i = pcb->eap.es_server.ea_peerlen) > 7) + j = 7; + clear[0] = i; + MEMCPY(clear + 1, cp, j); + i -= j; + cp += j; + /* FIXME: if we want to do SRP, we need to find a way to pass the PolarSSL des_context instead of using static memory */ + if (!DesEncrypt(clear, cipher)) { + ppp_dbglog("no DES here; not generating pseudonym"); + break; + } + BZERO(&b64, sizeof (b64)); + outp++; /* space for pseudonym length */ + outp += b64enc(&b64, cipher, 8, outp); + while (i >= 8) { + /* FIXME: if we want to do SRP, we need to find a way to pass the PolarSSL des_context instead of using static memory */ + (void) DesEncrypt(cp, cipher); + outp += b64enc(&b64, cipher, 8, outp); + cp += 8; + i -= 8; + } + if (i > 0) { + MEMCPY(clear, cp, i); + cp += i; + magic_random_bytes(cp, 8-i); + /* FIXME: if we want to do SRP, we need to find a way to pass the PolarSSL des_context instead of using static memory */ + (void) DesEncrypt(clear, cipher); + outp += b64enc(&b64, cipher, 8, outp); + } + outp += b64flush(&b64, outp); - /* Set length and pad out to next 20 octet boundary */ - i = outp - optr - 1; - *optr = i; - i %= SHA_DIGESTSIZE; - if (i != 0) { - magic_random_bytes(outp, SHA_DIGESTSIZE-i); - INCPTR(SHA_DIGESTSIZE-i, outp); - } + /* Set length and pad out to next 20 octet boundary */ + i = outp - optr - 1; + *optr = i; + i %= SHA_DIGESTSIZE; + if (i != 0) { + magic_random_bytes(outp, SHA_DIGESTSIZE-i); + INCPTR(SHA_DIGESTSIZE-i, outp); + } - /* Obscure the pseudonym with SHA1 hash */ - SHA1Init(&ctxt); - SHA1Update(&ctxt, &pcb->eap.es_server.ea_id, 1); - SHA1Update(&ctxt, pcb->eap.es_server.ea_skey, - SESSION_KEY_LEN); - SHA1Update(&ctxt, pcb->eap.es_server.ea_peer, - pcb->eap.es_server.ea_peerlen); - while (optr < outp) { - SHA1Final(dig, &ctxt); - cp = dig; - while (cp < dig + SHA_DIGESTSIZE) - *optr++ ^= *cp++; - SHA1Init(&ctxt); - SHA1Update(&ctxt, &pcb->eap.es_server.ea_id, 1); - SHA1Update(&ctxt, pcb->eap.es_server.ea_skey, - SESSION_KEY_LEN); - SHA1Update(&ctxt, optr - SHA_DIGESTSIZE, - SHA_DIGESTSIZE); - } - } - break; + /* Obscure the pseudonym with SHA1 hash */ + SHA1Init(&ctxt); + SHA1Update(&ctxt, &pcb->eap.es_server.ea_id, 1); + SHA1Update(&ctxt, pcb->eap.es_server.ea_skey, + SESSION_KEY_LEN); + SHA1Update(&ctxt, pcb->eap.es_server.ea_peer, + pcb->eap.es_server.ea_peerlen); + while (optr < outp) { + SHA1Final(dig, &ctxt); + cp = dig; + while (cp < dig + SHA_DIGESTSIZE) + *optr++ ^= *cp++; + SHA1Init(&ctxt); + SHA1Update(&ctxt, &pcb->eap.es_server.ea_id, 1); + SHA1Update(&ctxt, pcb->eap.es_server.ea_skey, + SESSION_KEY_LEN); + SHA1Update(&ctxt, optr - SHA_DIGESTSIZE, + SHA_DIGESTSIZE); + } + } + break; - case eapSRP4: - PUTCHAR(EAPT_SRP, outp); - PUTCHAR(EAPSRP_LWRECHALLENGE, outp); - pcb->eap.es_challen = EAP_MIN_CHALLENGE_LENGTH + - magic_pow(EAP_MIN_MAX_POWER_OF_TWO_CHALLENGE_LENGTH); - magic_random_bytes(pcb->eap.es_challenge, pcb->eap.es_challen); - MEMCPY(outp, pcb->eap.es_challenge, pcb->eap.es_challen); - INCPTR(pcb->eap.es_challen, outp); - break; + case eapSRP4: + PUTCHAR(EAPT_SRP, outp); + PUTCHAR(EAPSRP_LWRECHALLENGE, outp); + pcb->eap.es_challen = EAP_MIN_CHALLENGE_LENGTH + + magic_pow(EAP_MIN_MAX_POWER_OF_TWO_CHALLENGE_LENGTH); + magic_random_bytes(pcb->eap.es_challenge, pcb->eap.es_challen); + MEMCPY(outp, pcb->eap.es_challenge, pcb->eap.es_challen); + INCPTR(pcb->eap.es_challen, outp); + break; #endif /* USE_SRP */ - default: - return; - } + default: + return; + } - outlen = (outp - (unsigned char*)p->payload) - PPP_HDRLEN; - PUTSHORT(outlen, lenloc); + outlen = (outp - (unsigned char*)p->payload) - PPP_HDRLEN; + PUTSHORT(outlen, lenloc); - pbuf_realloc(p, outlen + PPP_HDRLEN); - ppp_write(pcb, p); + pbuf_realloc(p, outlen + PPP_HDRLEN); + ppp_write(pcb, p); - pcb->eap.es_server.ea_requests++; + pcb->eap.es_server.ea_requests++; - if (pcb->settings.eap_timeout_time > 0) - TIMEOUT(eap_server_timeout, pcb, pcb->settings.eap_timeout_time); + if (pcb->settings.eap_timeout_time > 0) + TIMEOUT(eap_server_timeout, pcb, pcb->settings.eap_timeout_time); } /* @@ -875,23 +875,23 @@ static void eap_send_request(ppp_pcb *pcb) { */ void eap_authpeer(ppp_pcb *pcb, const char *localname) { - /* Save the name we're given. */ - pcb->eap.es_server.ea_name = localname; - pcb->eap.es_server.ea_namelen = strlen(localname); + /* Save the name we're given. */ + pcb->eap.es_server.ea_name = localname; + pcb->eap.es_server.ea_namelen = strlen(localname); - pcb->eap.es_savedtime = pcb->settings.eap_timeout_time; + pcb->eap.es_savedtime = pcb->settings.eap_timeout_time; - /* Lower layer up yet? */ - if (pcb->eap.es_server.ea_state == eapInitial || - pcb->eap.es_server.ea_state == eapPending) { - pcb->eap.es_server.ea_state = eapPending; - return; - } + /* Lower layer up yet? */ + if (pcb->eap.es_server.ea_state == eapInitial || + pcb->eap.es_server.ea_state == eapPending) { + pcb->eap.es_server.ea_state = eapPending; + return; + } - pcb->eap.es_server.ea_state = eapPending; + pcb->eap.es_server.ea_state = eapPending; - /* ID number not updated here intentionally; hashed into M1 */ - eap_send_request(pcb); + /* ID number not updated here intentionally; hashed into M1 */ + eap_send_request(pcb); } /* @@ -899,13 +899,13 @@ void eap_authpeer(ppp_pcb *pcb, const char *localname) { * expired. */ static void eap_server_timeout(void *arg) { - ppp_pcb *pcb = (ppp_pcb*)arg; + ppp_pcb *pcb = (ppp_pcb*)arg; - if (!eap_server_active(pcb)) - return; + if (!eap_server_active(pcb)) + return; - /* EAP ID number must not change on timeout. */ - eap_send_request(pcb); + /* EAP ID number must not change on timeout. */ + eap_send_request(pcb); } /* @@ -914,30 +914,30 @@ static void eap_server_timeout(void *arg) { * will restart the timer. If it fails, then the link is dropped. */ static void eap_rechallenge(void *arg) { - ppp_pcb *pcb = (ppp_pcb*)arg; + ppp_pcb *pcb = (ppp_pcb*)arg; - if (pcb->eap.es_server.ea_state != eapOpen && - pcb->eap.es_server.ea_state != eapSRP4) - return; + if (pcb->eap.es_server.ea_state != eapOpen && + pcb->eap.es_server.ea_state != eapSRP4) + return; - pcb->eap.es_server.ea_requests = 0; - pcb->eap.es_server.ea_state = eapIdentify; - eap_figure_next_state(pcb, 0); - pcb->eap.es_server.ea_id++; - eap_send_request(pcb); + pcb->eap.es_server.ea_requests = 0; + pcb->eap.es_server.ea_state = eapIdentify; + eap_figure_next_state(pcb, 0); + pcb->eap.es_server.ea_id++; + eap_send_request(pcb); } static void srp_lwrechallenge(void *arg) { - ppp_pcb *pcb = (ppp_pcb*)arg; + ppp_pcb *pcb = (ppp_pcb*)arg; - if (pcb->eap.es_server.ea_state != eapOpen || - pcb->eap.es_server.ea_type != EAPT_SRP) - return; + if (pcb->eap.es_server.ea_state != eapOpen || + pcb->eap.es_server.ea_type != EAPT_SRP) + return; - pcb->eap.es_server.ea_requests = 0; - pcb->eap.es_server.ea_state = eapSRP4; - pcb->eap.es_server.ea_id++; - eap_send_request(pcb); + pcb->eap.es_server.ea_requests = 0; + pcb->eap.es_server.ea_state = eapSRP4; + pcb->eap.es_server.ea_id++; + eap_send_request(pcb); } #endif /* PPP_SERVER */ @@ -950,9 +950,9 @@ static void srp_lwrechallenge(void *arg) { * thing. */ static void eap_lowerup(ppp_pcb *pcb) { - pcb->eap.es_client.ea_state = eapClosed; + pcb->eap.es_client.ea_state = eapClosed; #if PPP_SERVER - pcb->eap.es_server.ea_state = eapClosed; + pcb->eap.es_server.ea_state = eapClosed; #endif /* PPP_SERVER */ } @@ -963,28 +963,28 @@ static void eap_lowerup(ppp_pcb *pcb) { */ static void eap_lowerdown(ppp_pcb *pcb) { - if (eap_client_active(pcb) && pcb->settings.eap_req_time > 0) { - UNTIMEOUT(eap_client_timeout, pcb); - } + if (eap_client_active(pcb) && pcb->settings.eap_req_time > 0) { + UNTIMEOUT(eap_client_timeout, pcb); + } #if PPP_SERVER - if (eap_server_active(pcb)) { - if (pcb->settings.eap_timeout_time > 0) { - UNTIMEOUT(eap_server_timeout, pcb); - } - } else { - if ((pcb->eap.es_server.ea_state == eapOpen || - pcb->eap.es_server.ea_state == eapSRP4) && - pcb->eap.es_rechallenge > 0) { - UNTIMEOUT(eap_rechallenge, (void *)pcb); - } - if (pcb->eap.es_server.ea_state == eapOpen && - pcb->eap.es_lwrechallenge > 0) { - UNTIMEOUT(srp_lwrechallenge, (void *)pcb); - } - } + if (eap_server_active(pcb)) { + if (pcb->settings.eap_timeout_time > 0) { + UNTIMEOUT(eap_server_timeout, pcb); + } + } else { + if ((pcb->eap.es_server.ea_state == eapOpen || + pcb->eap.es_server.ea_state == eapSRP4) && + pcb->eap.es_rechallenge > 0) { + UNTIMEOUT(eap_rechallenge, (void *)pcb); + } + if (pcb->eap.es_server.ea_state == eapOpen && + pcb->eap.es_lwrechallenge > 0) { + UNTIMEOUT(srp_lwrechallenge, (void *)pcb); + } + } - pcb->eap.es_client.ea_state = pcb->eap.es_server.ea_state = eapInitial; - pcb->eap.es_client.ea_requests = pcb->eap.es_server.ea_requests = 0; + pcb->eap.es_client.ea_state = pcb->eap.es_server.ea_state = eapInitial; + pcb->eap.es_client.ea_requests = pcb->eap.es_server.ea_requests = 0; #endif /* PPP_SERVER */ } @@ -996,87 +996,87 @@ static void eap_lowerdown(ppp_pcb *pcb) { */ static void eap_protrej(ppp_pcb *pcb) { - if (eap_client_active(pcb)) { - ppp_error("EAP authentication failed due to Protocol-Reject"); - auth_withpeer_fail(pcb, PPP_EAP); - } + if (eap_client_active(pcb)) { + ppp_error("EAP authentication failed due to Protocol-Reject"); + auth_withpeer_fail(pcb, PPP_EAP); + } #if PPP_SERVER - if (eap_server_active(pcb)) { - ppp_error("EAP authentication of peer failed on Protocol-Reject"); - auth_peer_fail(pcb, PPP_EAP); - } + if (eap_server_active(pcb)) { + ppp_error("EAP authentication of peer failed on Protocol-Reject"); + auth_peer_fail(pcb, PPP_EAP); + } #endif /* PPP_SERVER */ - eap_lowerdown(pcb); + eap_lowerdown(pcb); } /* * Format and send a regular EAP Response message. */ static void eap_send_response(ppp_pcb *pcb, u_char id, u_char typenum, const u_char *str, int lenstr) { - struct pbuf *p; - u_char *outp; - int msglen; + struct pbuf *p; + u_char *outp; + int msglen; - msglen = EAP_HEADERLEN + sizeof (u_char) + lenstr; - p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + msglen), PPP_CTRL_PBUF_TYPE); - if(NULL == p) - return; - if(p->tot_len != p->len) { - pbuf_free(p); - return; - } + msglen = EAP_HEADERLEN + sizeof (u_char) + lenstr; + p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + msglen), PPP_CTRL_PBUF_TYPE); + if(NULL == p) + return; + if(p->tot_len != p->len) { + pbuf_free(p); + return; + } - outp = (u_char*)p->payload; + outp = (u_char*)p->payload; - MAKEHEADER(outp, PPP_EAP); + MAKEHEADER(outp, PPP_EAP); - PUTCHAR(EAP_RESPONSE, outp); - PUTCHAR(id, outp); - pcb->eap.es_client.ea_id = id; - PUTSHORT(msglen, outp); - PUTCHAR(typenum, outp); - if (lenstr > 0) { - MEMCPY(outp, str, lenstr); - } + PUTCHAR(EAP_RESPONSE, outp); + PUTCHAR(id, outp); + pcb->eap.es_client.ea_id = id; + PUTSHORT(msglen, outp); + PUTCHAR(typenum, outp); + if (lenstr > 0) { + MEMCPY(outp, str, lenstr); + } - ppp_write(pcb, p); + ppp_write(pcb, p); } /* * Format and send an MD5-Challenge EAP Response message. */ static void eap_chap_response(ppp_pcb *pcb, u_char id, u_char *hash, const char *name, int namelen) { - struct pbuf *p; - u_char *outp; - int msglen; + struct pbuf *p; + u_char *outp; + int msglen; - msglen = EAP_HEADERLEN + 2 * sizeof (u_char) + MD5_SIGNATURE_SIZE + - namelen; - p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + msglen), PPP_CTRL_PBUF_TYPE); - if(NULL == p) - return; - if(p->tot_len != p->len) { - pbuf_free(p); - return; - } + msglen = EAP_HEADERLEN + 2 * sizeof (u_char) + MD5_SIGNATURE_SIZE + + namelen; + p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + msglen), PPP_CTRL_PBUF_TYPE); + if(NULL == p) + return; + if(p->tot_len != p->len) { + pbuf_free(p); + return; + } - outp = (u_char*)p->payload; + outp = (u_char*)p->payload; - MAKEHEADER(outp, PPP_EAP); + MAKEHEADER(outp, PPP_EAP); - PUTCHAR(EAP_RESPONSE, outp); - PUTCHAR(id, outp); - pcb->eap.es_client.ea_id = id; - PUTSHORT(msglen, outp); - PUTCHAR(EAPT_MD5CHAP, outp); - PUTCHAR(MD5_SIGNATURE_SIZE, outp); - MEMCPY(outp, hash, MD5_SIGNATURE_SIZE); - INCPTR(MD5_SIGNATURE_SIZE, outp); - if (namelen > 0) { - MEMCPY(outp, name, namelen); - } + PUTCHAR(EAP_RESPONSE, outp); + PUTCHAR(id, outp); + pcb->eap.es_client.ea_id = id; + PUTSHORT(msglen, outp); + PUTCHAR(EAPT_MD5CHAP, outp); + PUTCHAR(MD5_SIGNATURE_SIZE, outp); + MEMCPY(outp, hash, MD5_SIGNATURE_SIZE); + INCPTR(MD5_SIGNATURE_SIZE, outp); + if (namelen > 0) { + MEMCPY(outp, name, namelen); + } - ppp_write(pcb, p); + ppp_write(pcb, p); } #ifdef USE_SRP @@ -1091,35 +1091,35 @@ u_char subtypenum; u_char *str; int lenstr; { - ppp_pcb *pcb = &ppp_pcb_list[pcb->eap.es_unit]; - struct pbuf *p; - u_char *outp; - int msglen; + ppp_pcb *pcb = &ppp_pcb_list[pcb->eap.es_unit]; + struct pbuf *p; + u_char *outp; + int msglen; - msglen = EAP_HEADERLEN + 2 * sizeof (u_char) + lenstr; - p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + msglen), PPP_CTRL_PBUF_TYPE); - if(NULL == p) - return; - if(p->tot_len != p->len) { - pbuf_free(p); - return; - } + msglen = EAP_HEADERLEN + 2 * sizeof (u_char) + lenstr; + p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + msglen), PPP_CTRL_PBUF_TYPE); + if(NULL == p) + return; + if(p->tot_len != p->len) { + pbuf_free(p); + return; + } - outp = p->payload; + outp = p->payload; - MAKEHEADER(outp, PPP_EAP); + MAKEHEADER(outp, PPP_EAP); - PUTCHAR(EAP_RESPONSE, outp); - PUTCHAR(id, outp); - pcb->eap.es_client.ea_id = id; - PUTSHORT(msglen, outp); - PUTCHAR(EAPT_SRP, outp); - PUTCHAR(subtypenum, outp); - if (lenstr > 0) { - MEMCPY(outp, str, lenstr); - } + PUTCHAR(EAP_RESPONSE, outp); + PUTCHAR(id, outp); + pcb->eap.es_client.ea_id = id; + PUTSHORT(msglen, outp); + PUTCHAR(EAPT_SRP, outp); + PUTCHAR(subtypenum, outp); + if (lenstr > 0) { + MEMCPY(outp, str, lenstr); + } - ppp_write(pcb, p); + ppp_write(pcb, p); } /* @@ -1132,118 +1132,118 @@ u_char id; u32_t flags; u_char *str; { - ppp_pcb *pcb = &ppp_pcb_list[pcb->eap.es_unit]; - struct pbuf *p; - u_char *outp; - int msglen; + ppp_pcb *pcb = &ppp_pcb_list[pcb->eap.es_unit]; + struct pbuf *p; + u_char *outp; + int msglen; - msglen = EAP_HEADERLEN + 2 * sizeof (u_char) + sizeof (u32_t) + - SHA_DIGESTSIZE; - p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + msglen), PPP_CTRL_PBUF_TYPE); - if(NULL == p) - return; - if(p->tot_len != p->len) { - pbuf_free(p); - return; - } + msglen = EAP_HEADERLEN + 2 * sizeof (u_char) + sizeof (u32_t) + + SHA_DIGESTSIZE; + p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + msglen), PPP_CTRL_PBUF_TYPE); + if(NULL == p) + return; + if(p->tot_len != p->len) { + pbuf_free(p); + return; + } - outp = p->payload; + outp = p->payload; - MAKEHEADER(outp, PPP_EAP); + MAKEHEADER(outp, PPP_EAP); - PUTCHAR(EAP_RESPONSE, outp); - PUTCHAR(id, outp); - pcb->eap.es_client.ea_id = id; - PUTSHORT(msglen, outp); - PUTCHAR(EAPT_SRP, outp); - PUTCHAR(EAPSRP_CVALIDATOR, outp); - PUTLONG(flags, outp); - MEMCPY(outp, str, SHA_DIGESTSIZE); + PUTCHAR(EAP_RESPONSE, outp); + PUTCHAR(id, outp); + pcb->eap.es_client.ea_id = id; + PUTSHORT(msglen, outp); + PUTCHAR(EAPT_SRP, outp); + PUTCHAR(EAPSRP_CVALIDATOR, outp); + PUTLONG(flags, outp); + MEMCPY(outp, str, SHA_DIGESTSIZE); - ppp_write(pcb, p); + ppp_write(pcb, p); } #endif /* USE_SRP */ static void eap_send_nak(ppp_pcb *pcb, u_char id, u_char type) { - struct pbuf *p; - u_char *outp; - int msglen; + struct pbuf *p; + u_char *outp; + int msglen; - msglen = EAP_HEADERLEN + 2 * sizeof (u_char); - p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + msglen), PPP_CTRL_PBUF_TYPE); - if(NULL == p) - return; - if(p->tot_len != p->len) { - pbuf_free(p); - return; - } + msglen = EAP_HEADERLEN + 2 * sizeof (u_char); + p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + msglen), PPP_CTRL_PBUF_TYPE); + if(NULL == p) + return; + if(p->tot_len != p->len) { + pbuf_free(p); + return; + } - outp = (u_char*)p->payload; + outp = (u_char*)p->payload; - MAKEHEADER(outp, PPP_EAP); + MAKEHEADER(outp, PPP_EAP); - PUTCHAR(EAP_RESPONSE, outp); - PUTCHAR(id, outp); - pcb->eap.es_client.ea_id = id; - PUTSHORT(msglen, outp); - PUTCHAR(EAPT_NAK, outp); - PUTCHAR(type, outp); + PUTCHAR(EAP_RESPONSE, outp); + PUTCHAR(id, outp); + pcb->eap.es_client.ea_id = id; + PUTSHORT(msglen, outp); + PUTCHAR(EAPT_NAK, outp); + PUTCHAR(type, outp); - ppp_write(pcb, p); + ppp_write(pcb, p); } #ifdef USE_SRP static char * name_of_pn_file() { - char *user, *path, *file; - struct passwd *pw; - size_t pl; - static bool pnlogged = 0; + char *user, *path, *file; + struct passwd *pw; + size_t pl; + static bool pnlogged = 0; - pw = getpwuid(getuid()); - if (pw == NULL || (user = pw->pw_dir) == NULL || user[0] == 0) { - errno = EINVAL; - return (NULL); - } - file = _PATH_PSEUDONYM; - pl = strlen(user) + strlen(file) + 2; - path = malloc(pl); - if (path == NULL) - return (NULL); - (void) slprintf(path, pl, "%s/%s", user, file); - if (!pnlogged) { - ppp_dbglog("pseudonym file: %s", path); - pnlogged = 1; - } - return (path); + pw = getpwuid(getuid()); + if (pw == NULL || (user = pw->pw_dir) == NULL || user[0] == 0) { + errno = EINVAL; + return (NULL); + } + file = _PATH_PSEUDONYM; + pl = strlen(user) + strlen(file) + 2; + path = malloc(pl); + if (path == NULL) + return (NULL); + (void) slprintf(path, pl, "%s/%s", user, file); + if (!pnlogged) { + ppp_dbglog("pseudonym file: %s", path); + pnlogged = 1; + } + return (path); } static int open_pn_file(modebits) mode_t modebits; { - char *path; - int fd, err; + char *path; + int fd, err; - if ((path = name_of_pn_file()) == NULL) - return (-1); - fd = open(path, modebits, S_IRUSR | S_IWUSR); - err = errno; - free(path); - errno = err; - return (fd); + if ((path = name_of_pn_file()) == NULL) + return (-1); + fd = open(path, modebits, S_IRUSR | S_IWUSR); + err = errno; + free(path); + errno = err; + return (fd); } static void remove_pn_file() { - char *path; + char *path; - if ((path = name_of_pn_file()) != NULL) { - (void) unlink(path); - (void) free(path); - } + if ((path = name_of_pn_file()) != NULL) { + (void) unlink(path); + (void) free(path); + } } static void @@ -1252,56 +1252,56 @@ eap_state *esp; u_char *inp; int len, id; { - u_char val; - u_char *datp, *digp; - SHA1_CTX ctxt; - u_char dig[SHA_DIGESTSIZE]; - int dsize, fd, olen = len; + u_char val; + u_char *datp, *digp; + SHA1_CTX ctxt; + u_char dig[SHA_DIGESTSIZE]; + int dsize, fd, olen = len; - /* - * Do the decoding by working backwards. This eliminates the need - * to save the decoded output in a separate buffer. - */ - val = id; - while (len > 0) { - if ((dsize = len % SHA_DIGESTSIZE) == 0) - dsize = SHA_DIGESTSIZE; - len -= dsize; - datp = inp + len; - SHA1Init(&ctxt); - SHA1Update(&ctxt, &val, 1); - SHA1Update(&ctxt, pcb->eap.es_client.ea_skey, SESSION_KEY_LEN); - if (len > 0) { - SHA1Update(&ctxt, datp, SHA_DIGESTSIZE); - } else { - SHA1Update(&ctxt, pcb->eap.es_client.ea_name, - pcb->eap.es_client.ea_namelen); - } - SHA1Final(dig, &ctxt); - for (digp = dig; digp < dig + SHA_DIGESTSIZE; digp++) - *datp++ ^= *digp; - } + /* + * Do the decoding by working backwards. This eliminates the need + * to save the decoded output in a separate buffer. + */ + val = id; + while (len > 0) { + if ((dsize = len % SHA_DIGESTSIZE) == 0) + dsize = SHA_DIGESTSIZE; + len -= dsize; + datp = inp + len; + SHA1Init(&ctxt); + SHA1Update(&ctxt, &val, 1); + SHA1Update(&ctxt, pcb->eap.es_client.ea_skey, SESSION_KEY_LEN); + if (len > 0) { + SHA1Update(&ctxt, datp, SHA_DIGESTSIZE); + } else { + SHA1Update(&ctxt, pcb->eap.es_client.ea_name, + pcb->eap.es_client.ea_namelen); + } + SHA1Final(dig, &ctxt); + for (digp = dig; digp < dig + SHA_DIGESTSIZE; digp++) + *datp++ ^= *digp; + } - /* Now check that the result is sane */ - if (olen <= 0 || *inp + 1 > olen) { - ppp_dbglog("EAP: decoded pseudonym is unusable <%.*B>", olen, inp); - return; - } + /* Now check that the result is sane */ + if (olen <= 0 || *inp + 1 > olen) { + ppp_dbglog("EAP: decoded pseudonym is unusable <%.*B>", olen, inp); + return; + } - /* Save it away */ - fd = open_pn_file(O_WRONLY | O_CREAT | O_TRUNC); - if (fd < 0) { - ppp_dbglog("EAP: error saving pseudonym: %m"); - return; - } - len = write(fd, inp + 1, *inp); - if (close(fd) != -1 && len == *inp) { - ppp_dbglog("EAP: saved pseudonym"); - pcb->eap.es_usedpseudo = 0; - } else { - ppp_dbglog("EAP: failed to save pseudonym"); - remove_pn_file(); - } + /* Save it away */ + fd = open_pn_file(O_WRONLY | O_CREAT | O_TRUNC); + if (fd < 0) { + ppp_dbglog("EAP: error saving pseudonym: %m"); + return; + } + len = write(fd, inp + 1, *inp); + if (close(fd) != -1 && len == *inp) { + ppp_dbglog("EAP: saved pseudonym"); + pcb->eap.es_usedpseudo = 0; + } else { + ppp_dbglog("EAP: failed to save pseudonym"); + remove_pn_file(); + } } #endif /* USE_SRP */ @@ -1309,412 +1309,412 @@ int len, id; * eap_request - Receive EAP Request message (client mode). */ static void eap_request(ppp_pcb *pcb, u_char *inp, int id, int len) { - u_char typenum; - u_char vallen; - int secret_len; - char secret[MAXSECRETLEN]; - char rhostname[MAXNAMELEN]; - lwip_md5_context mdContext; - u_char hash[MD5_SIGNATURE_SIZE]; + u_char typenum; + u_char vallen; + int secret_len; + char secret[MAXSECRETLEN]; + char rhostname[MAXNAMELEN]; + lwip_md5_context mdContext; + u_char hash[MD5_SIGNATURE_SIZE]; #ifdef USE_SRP - struct t_client *tc; - struct t_num sval, gval, Nval, *Ap, Bval; - u_char vals[2]; - SHA1_CTX ctxt; - u_char dig[SHA_DIGESTSIZE]; - int fd; + struct t_client *tc; + struct t_num sval, gval, Nval, *Ap, Bval; + u_char vals[2]; + SHA1_CTX ctxt; + u_char dig[SHA_DIGESTSIZE]; + int fd; #endif /* USE_SRP */ - /* - * Note: we update es_client.ea_id *only if* a Response - * message is being generated. Otherwise, we leave it the - * same for duplicate detection purposes. - */ + /* + * Note: we update es_client.ea_id *only if* a Response + * message is being generated. Otherwise, we leave it the + * same for duplicate detection purposes. + */ - pcb->eap.es_client.ea_requests++; - if (pcb->settings.eap_allow_req != 0 && - pcb->eap.es_client.ea_requests > pcb->settings.eap_allow_req) { - ppp_info("EAP: received too many Request messages"); - if (pcb->settings.eap_req_time > 0) { - UNTIMEOUT(eap_client_timeout, pcb); - } - auth_withpeer_fail(pcb, PPP_EAP); - return; - } + pcb->eap.es_client.ea_requests++; + if (pcb->settings.eap_allow_req != 0 && + pcb->eap.es_client.ea_requests > pcb->settings.eap_allow_req) { + ppp_info("EAP: received too many Request messages"); + if (pcb->settings.eap_req_time > 0) { + UNTIMEOUT(eap_client_timeout, pcb); + } + auth_withpeer_fail(pcb, PPP_EAP); + return; + } - if (len <= 0) { - ppp_error("EAP: empty Request message discarded"); - return; - } + if (len <= 0) { + ppp_error("EAP: empty Request message discarded"); + return; + } - GETCHAR(typenum, inp); - len--; + GETCHAR(typenum, inp); + len--; - switch (typenum) { - case EAPT_IDENTITY: - if (len > 0) - ppp_info("EAP: Identity prompt \"%.*q\"", len, inp); + switch (typenum) { + case EAPT_IDENTITY: + if (len > 0) + ppp_info("EAP: Identity prompt \"%.*q\"", len, inp); #ifdef USE_SRP - if (pcb->eap.es_usepseudo && - (pcb->eap.es_usedpseudo == 0 || - (pcb->eap.es_usedpseudo == 1 && - id == pcb->eap.es_client.ea_id))) { - pcb->eap.es_usedpseudo = 1; - /* Try to get a pseudonym */ - if ((fd = open_pn_file(O_RDONLY)) >= 0) { - strcpy(rhostname, SRP_PSEUDO_ID); - len = read(fd, rhostname + SRP_PSEUDO_LEN, - sizeof (rhostname) - SRP_PSEUDO_LEN); - /* XXX NAI unsupported */ - if (len > 0) { - eap_send_response(pcb, id, typenum, - rhostname, len + SRP_PSEUDO_LEN); - } - (void) close(fd); - if (len > 0) - break; - } - } - /* Stop using pseudonym now. */ - if (pcb->eap.es_usepseudo && pcb->eap.es_usedpseudo != 2) { - remove_pn_file(); - pcb->eap.es_usedpseudo = 2; - } + if (pcb->eap.es_usepseudo && + (pcb->eap.es_usedpseudo == 0 || + (pcb->eap.es_usedpseudo == 1 && + id == pcb->eap.es_client.ea_id))) { + pcb->eap.es_usedpseudo = 1; + /* Try to get a pseudonym */ + if ((fd = open_pn_file(O_RDONLY)) >= 0) { + strcpy(rhostname, SRP_PSEUDO_ID); + len = read(fd, rhostname + SRP_PSEUDO_LEN, + sizeof (rhostname) - SRP_PSEUDO_LEN); + /* XXX NAI unsupported */ + if (len > 0) { + eap_send_response(pcb, id, typenum, + rhostname, len + SRP_PSEUDO_LEN); + } + (void) close(fd); + if (len > 0) + break; + } + } + /* Stop using pseudonym now. */ + if (pcb->eap.es_usepseudo && pcb->eap.es_usedpseudo != 2) { + remove_pn_file(); + pcb->eap.es_usedpseudo = 2; + } #endif /* USE_SRP */ - eap_send_response(pcb, id, typenum, (const u_char*)pcb->eap.es_client.ea_name, - pcb->eap.es_client.ea_namelen); - break; + eap_send_response(pcb, id, typenum, (const u_char*)pcb->eap.es_client.ea_name, + pcb->eap.es_client.ea_namelen); + break; - case EAPT_NOTIFICATION: - if (len > 0) - ppp_info("EAP: Notification \"%.*q\"", len, inp); - eap_send_response(pcb, id, typenum, NULL, 0); - break; + case EAPT_NOTIFICATION: + if (len > 0) + ppp_info("EAP: Notification \"%.*q\"", len, inp); + eap_send_response(pcb, id, typenum, NULL, 0); + break; - case EAPT_NAK: - /* - * Avoid the temptation to send Response Nak in reply - * to Request Nak here. It can only lead to trouble. - */ - ppp_warn("EAP: unexpected Nak in Request; ignored"); - /* Return because we're waiting for something real. */ - return; + case EAPT_NAK: + /* + * Avoid the temptation to send Response Nak in reply + * to Request Nak here. It can only lead to trouble. + */ + ppp_warn("EAP: unexpected Nak in Request; ignored"); + /* Return because we're waiting for something real. */ + return; - case EAPT_MD5CHAP: - if (len < 1) { - ppp_error("EAP: received MD5-Challenge with no data"); - /* Bogus request; wait for something real. */ - return; - } - GETCHAR(vallen, inp); - len--; - if (vallen < 8 || vallen > len) { - ppp_error("EAP: MD5-Challenge with bad length %d (8..%d)", - vallen, len); - /* Try something better. */ - eap_send_nak(pcb, id, EAPT_SRP); - break; - } + case EAPT_MD5CHAP: + if (len < 1) { + ppp_error("EAP: received MD5-Challenge with no data"); + /* Bogus request; wait for something real. */ + return; + } + GETCHAR(vallen, inp); + len--; + if (vallen < 8 || vallen > len) { + ppp_error("EAP: MD5-Challenge with bad length %d (8..%d)", + vallen, len); + /* Try something better. */ + eap_send_nak(pcb, id, EAPT_SRP); + break; + } - /* Not so likely to happen. */ - if (len - vallen >= sizeof (rhostname)) { - ppp_dbglog("EAP: trimming really long peer name down"); - MEMCPY(rhostname, inp + vallen, sizeof (rhostname) - 1); - rhostname[sizeof (rhostname) - 1] = '\0'; - } else { - MEMCPY(rhostname, inp + vallen, len - vallen); - rhostname[len - vallen] = '\0'; - } + /* Not so likely to happen. */ + if (vallen >= len + sizeof (rhostname)) { + ppp_dbglog("EAP: trimming really long peer name down"); + MEMCPY(rhostname, inp + vallen, sizeof (rhostname) - 1); + rhostname[sizeof (rhostname) - 1] = '\0'; + } else { + MEMCPY(rhostname, inp + vallen, len - vallen); + rhostname[len - vallen] = '\0'; + } #if PPP_REMOTENAME - /* In case the remote doesn't give us his name. */ - if (pcb->settings.explicit_remote || - (pcb->settings.remote_name[0] != '\0' && vallen == len)) - strlcpy(rhostname, pcb->settings.remote_name, sizeof (rhostname)); + /* In case the remote doesn't give us his name. */ + if (pcb->settings.explicit_remote || + (pcb->settings.remote_name[0] != '\0' && vallen == len)) + strlcpy(rhostname, pcb->settings.remote_name, sizeof (rhostname)); #endif /* PPP_REMOTENAME */ - /* - * Get the secret for authenticating ourselves with - * the specified host. - */ - if (!get_secret(pcb, pcb->eap.es_client.ea_name, - rhostname, secret, &secret_len, 0)) { - ppp_dbglog("EAP: no MD5 secret for auth to %q", rhostname); - eap_send_nak(pcb, id, EAPT_SRP); - break; - } - lwip_md5_init(&mdContext); - lwip_md5_starts(&mdContext); - typenum = id; - lwip_md5_update(&mdContext, &typenum, 1); - lwip_md5_update(&mdContext, (u_char *)secret, secret_len); - BZERO(secret, sizeof (secret)); - lwip_md5_update(&mdContext, inp, vallen); - lwip_md5_finish(&mdContext, hash); - lwip_md5_free(&mdContext); - eap_chap_response(pcb, id, hash, pcb->eap.es_client.ea_name, - pcb->eap.es_client.ea_namelen); - break; + /* + * Get the secret for authenticating ourselves with + * the specified host. + */ + if (!get_secret(pcb, pcb->eap.es_client.ea_name, + rhostname, secret, &secret_len, 0)) { + ppp_dbglog("EAP: no MD5 secret for auth to %q", rhostname); + eap_send_nak(pcb, id, EAPT_SRP); + break; + } + lwip_md5_init(&mdContext); + lwip_md5_starts(&mdContext); + typenum = id; + lwip_md5_update(&mdContext, &typenum, 1); + lwip_md5_update(&mdContext, (u_char *)secret, secret_len); + BZERO(secret, sizeof (secret)); + lwip_md5_update(&mdContext, inp, vallen); + lwip_md5_finish(&mdContext, hash); + lwip_md5_free(&mdContext); + eap_chap_response(pcb, id, hash, pcb->eap.es_client.ea_name, + pcb->eap.es_client.ea_namelen); + break; #ifdef USE_SRP - case EAPT_SRP: - if (len < 1) { - ppp_error("EAP: received empty SRP Request"); - /* Bogus request; wait for something real. */ - return; - } + case EAPT_SRP: + if (len < 1) { + ppp_error("EAP: received empty SRP Request"); + /* Bogus request; wait for something real. */ + return; + } - /* Get subtype */ - GETCHAR(vallen, inp); - len--; - switch (vallen) { - case EAPSRP_CHALLENGE: - tc = NULL; - if (pcb->eap.es_client.ea_session != NULL) { - tc = (struct t_client *)pcb->eap.es_client. - ea_session; - /* - * If this is a new challenge, then start - * over with a new client session context. - * Otherwise, just resend last response. - */ - if (id != pcb->eap.es_client.ea_id) { - t_clientclose(tc); - pcb->eap.es_client.ea_session = NULL; - tc = NULL; - } - } - /* No session key just yet */ - pcb->eap.es_client.ea_skey = NULL; - if (tc == NULL) { - int rhostnamelen; + /* Get subtype */ + GETCHAR(vallen, inp); + len--; + switch (vallen) { + case EAPSRP_CHALLENGE: + tc = NULL; + if (pcb->eap.es_client.ea_session != NULL) { + tc = (struct t_client *)pcb->eap.es_client. + ea_session; + /* + * If this is a new challenge, then start + * over with a new client session context. + * Otherwise, just resend last response. + */ + if (id != pcb->eap.es_client.ea_id) { + t_clientclose(tc); + pcb->eap.es_client.ea_session = NULL; + tc = NULL; + } + } + /* No session key just yet */ + pcb->eap.es_client.ea_skey = NULL; + if (tc == NULL) { + int rhostnamelen; - GETCHAR(vallen, inp); - len--; - if (vallen >= len) { - ppp_error("EAP: badly-formed SRP Challenge" - " (name)"); - /* Ignore badly-formed messages */ - return; - } - MEMCPY(rhostname, inp, vallen); - rhostname[vallen] = '\0'; - INCPTR(vallen, inp); - len -= vallen; + GETCHAR(vallen, inp); + len--; + if (vallen >= len) { + ppp_error("EAP: badly-formed SRP Challenge" + " (name)"); + /* Ignore badly-formed messages */ + return; + } + MEMCPY(rhostname, inp, vallen); + rhostname[vallen] = '\0'; + INCPTR(vallen, inp); + len -= vallen; - /* - * In case the remote doesn't give us his name, - * use configured name. - */ - if (explicit_remote || - (remote_name[0] != '\0' && vallen == 0)) { - strlcpy(rhostname, remote_name, - sizeof (rhostname)); - } + /* + * In case the remote doesn't give us his name, + * use configured name. + */ + if (explicit_remote || + (remote_name[0] != '\0' && vallen == 0)) { + strlcpy(rhostname, remote_name, + sizeof (rhostname)); + } - rhostnamelen = (int)strlen(rhostname); - if (rhostnamelen > MAXNAMELEN) { - rhostnamelen = MAXNAMELEN; - } - MEMCPY(pcb->eap.es_client.ea_peer, rhostname, rhostnamelen); - pcb->eap.es_client.ea_peer[rhostnamelen] = '\0'; - pcb->eap.es_client.ea_peerlen = rhostnamelen; + rhostnamelen = (int)strlen(rhostname); + if (rhostnamelen > MAXNAMELEN) { + rhostnamelen = MAXNAMELEN; + } + MEMCPY(pcb->eap.es_client.ea_peer, rhostname, rhostnamelen); + pcb->eap.es_client.ea_peer[rhostnamelen] = '\0'; + pcb->eap.es_client.ea_peerlen = rhostnamelen; - GETCHAR(vallen, inp); - len--; - if (vallen >= len) { - ppp_error("EAP: badly-formed SRP Challenge" - " (s)"); - /* Ignore badly-formed messages */ - return; - } - sval.data = inp; - sval.len = vallen; - INCPTR(vallen, inp); - len -= vallen; + GETCHAR(vallen, inp); + len--; + if (vallen >= len) { + ppp_error("EAP: badly-formed SRP Challenge" + " (s)"); + /* Ignore badly-formed messages */ + return; + } + sval.data = inp; + sval.len = vallen; + INCPTR(vallen, inp); + len -= vallen; - GETCHAR(vallen, inp); - len--; - if (vallen > len) { - ppp_error("EAP: badly-formed SRP Challenge" - " (g)"); - /* Ignore badly-formed messages */ - return; - } - /* If no generator present, then use value 2 */ - if (vallen == 0) { - gval.data = (u_char *)"\002"; - gval.len = 1; - } else { - gval.data = inp; - gval.len = vallen; - } - INCPTR(vallen, inp); - len -= vallen; + GETCHAR(vallen, inp); + len--; + if (vallen > len) { + ppp_error("EAP: badly-formed SRP Challenge" + " (g)"); + /* Ignore badly-formed messages */ + return; + } + /* If no generator present, then use value 2 */ + if (vallen == 0) { + gval.data = (u_char *)"\002"; + gval.len = 1; + } else { + gval.data = inp; + gval.len = vallen; + } + INCPTR(vallen, inp); + len -= vallen; - /* - * If no modulus present, then use well-known - * value. - */ - if (len == 0) { - Nval.data = (u_char *)wkmodulus; - Nval.len = sizeof (wkmodulus); - } else { - Nval.data = inp; - Nval.len = len; - } - tc = t_clientopen(pcb->eap.es_client.ea_name, - &Nval, &gval, &sval); - if (tc == NULL) { - eap_send_nak(pcb, id, EAPT_MD5CHAP); - break; - } - pcb->eap.es_client.ea_session = (void *)tc; + /* + * If no modulus present, then use well-known + * value. + */ + if (len == 0) { + Nval.data = (u_char *)wkmodulus; + Nval.len = sizeof (wkmodulus); + } else { + Nval.data = inp; + Nval.len = len; + } + tc = t_clientopen(pcb->eap.es_client.ea_name, + &Nval, &gval, &sval); + if (tc == NULL) { + eap_send_nak(pcb, id, EAPT_MD5CHAP); + break; + } + pcb->eap.es_client.ea_session = (void *)tc; - /* Add Challenge ID & type to verifier */ - vals[0] = id; - vals[1] = EAPT_SRP; - t_clientaddexdata(tc, vals, 2); - } - Ap = t_clientgenexp(tc); - eap_srp_response(esp, id, EAPSRP_CKEY, Ap->data, - Ap->len); - break; + /* Add Challenge ID & type to verifier */ + vals[0] = id; + vals[1] = EAPT_SRP; + t_clientaddexdata(tc, vals, 2); + } + Ap = t_clientgenexp(tc); + eap_srp_response(esp, id, EAPSRP_CKEY, Ap->data, + Ap->len); + break; - case EAPSRP_SKEY: - tc = (struct t_client *)pcb->eap.es_client.ea_session; - if (tc == NULL) { - ppp_warn("EAP: peer sent Subtype 2 without 1"); - eap_send_nak(pcb, id, EAPT_MD5CHAP); - break; - } - if (pcb->eap.es_client.ea_skey != NULL) { - /* - * ID number should not change here. Warn - * if it does (but otherwise ignore). - */ - if (id != pcb->eap.es_client.ea_id) { - ppp_warn("EAP: ID changed from %d to %d " - "in SRP Subtype 2 rexmit", - pcb->eap.es_client.ea_id, id); - } - } else { - if (get_srp_secret(pcb->eap.es_unit, - pcb->eap.es_client.ea_name, - pcb->eap.es_client.ea_peer, secret, 0) == 0) { - /* - * Can't work with this peer because - * the secret is missing. Just give - * up. - */ - eap_send_nak(pcb, id, EAPT_MD5CHAP); - break; - } - Bval.data = inp; - Bval.len = len; - t_clientpasswd(tc, secret); - BZERO(secret, sizeof (secret)); - pcb->eap.es_client.ea_skey = - t_clientgetkey(tc, &Bval); - if (pcb->eap.es_client.ea_skey == NULL) { - /* Server is rogue; stop now */ - ppp_error("EAP: SRP server is rogue"); - goto client_failure; - } - } - eap_srpval_response(esp, id, SRPVAL_EBIT, - t_clientresponse(tc)); - break; + case EAPSRP_SKEY: + tc = (struct t_client *)pcb->eap.es_client.ea_session; + if (tc == NULL) { + ppp_warn("EAP: peer sent Subtype 2 without 1"); + eap_send_nak(pcb, id, EAPT_MD5CHAP); + break; + } + if (pcb->eap.es_client.ea_skey != NULL) { + /* + * ID number should not change here. Warn + * if it does (but otherwise ignore). + */ + if (id != pcb->eap.es_client.ea_id) { + ppp_warn("EAP: ID changed from %d to %d " + "in SRP Subtype 2 rexmit", + pcb->eap.es_client.ea_id, id); + } + } else { + if (get_srp_secret(pcb->eap.es_unit, + pcb->eap.es_client.ea_name, + pcb->eap.es_client.ea_peer, secret, 0) == 0) { + /* + * Can't work with this peer because + * the secret is missing. Just give + * up. + */ + eap_send_nak(pcb, id, EAPT_MD5CHAP); + break; + } + Bval.data = inp; + Bval.len = len; + t_clientpasswd(tc, secret); + BZERO(secret, sizeof (secret)); + pcb->eap.es_client.ea_skey = + t_clientgetkey(tc, &Bval); + if (pcb->eap.es_client.ea_skey == NULL) { + /* Server is rogue; stop now */ + ppp_error("EAP: SRP server is rogue"); + goto client_failure; + } + } + eap_srpval_response(esp, id, SRPVAL_EBIT, + t_clientresponse(tc)); + break; - case EAPSRP_SVALIDATOR: - tc = (struct t_client *)pcb->eap.es_client.ea_session; - if (tc == NULL || pcb->eap.es_client.ea_skey == NULL) { - ppp_warn("EAP: peer sent Subtype 3 without 1/2"); - eap_send_nak(pcb, id, EAPT_MD5CHAP); - break; - } - /* - * If we're already open, then this ought to be a - * duplicate. Otherwise, check that the server is - * who we think it is. - */ - if (pcb->eap.es_client.ea_state == eapOpen) { - if (id != pcb->eap.es_client.ea_id) { - ppp_warn("EAP: ID changed from %d to %d " - "in SRP Subtype 3 rexmit", - pcb->eap.es_client.ea_id, id); - } - } else { - len -= sizeof (u32_t) + SHA_DIGESTSIZE; - if (len < 0 || t_clientverify(tc, inp + - sizeof (u32_t)) != 0) { - ppp_error("EAP: SRP server verification " - "failed"); - goto client_failure; - } - GETLONG(pcb->eap.es_client.ea_keyflags, inp); - /* Save pseudonym if user wants it. */ - if (len > 0 && pcb->eap.es_usepseudo) { - INCPTR(SHA_DIGESTSIZE, inp); - write_pseudonym(esp, inp, len, id); - } - } - /* - * We've verified our peer. We're now mostly done, - * except for waiting on the regular EAP Success - * message. - */ - eap_srp_response(esp, id, EAPSRP_ACK, NULL, 0); - break; + case EAPSRP_SVALIDATOR: + tc = (struct t_client *)pcb->eap.es_client.ea_session; + if (tc == NULL || pcb->eap.es_client.ea_skey == NULL) { + ppp_warn("EAP: peer sent Subtype 3 without 1/2"); + eap_send_nak(pcb, id, EAPT_MD5CHAP); + break; + } + /* + * If we're already open, then this ought to be a + * duplicate. Otherwise, check that the server is + * who we think it is. + */ + if (pcb->eap.es_client.ea_state == eapOpen) { + if (id != pcb->eap.es_client.ea_id) { + ppp_warn("EAP: ID changed from %d to %d " + "in SRP Subtype 3 rexmit", + pcb->eap.es_client.ea_id, id); + } + } else { + len -= sizeof (u32_t) + SHA_DIGESTSIZE; + if (len < 0 || t_clientverify(tc, inp + + sizeof (u32_t)) != 0) { + ppp_error("EAP: SRP server verification " + "failed"); + goto client_failure; + } + GETLONG(pcb->eap.es_client.ea_keyflags, inp); + /* Save pseudonym if user wants it. */ + if (len > 0 && pcb->eap.es_usepseudo) { + INCPTR(SHA_DIGESTSIZE, inp); + write_pseudonym(esp, inp, len, id); + } + } + /* + * We've verified our peer. We're now mostly done, + * except for waiting on the regular EAP Success + * message. + */ + eap_srp_response(esp, id, EAPSRP_ACK, NULL, 0); + break; - case EAPSRP_LWRECHALLENGE: - if (len < 4) { - ppp_warn("EAP: malformed Lightweight rechallenge"); - return; - } - SHA1Init(&ctxt); - vals[0] = id; - SHA1Update(&ctxt, vals, 1); - SHA1Update(&ctxt, pcb->eap.es_client.ea_skey, - SESSION_KEY_LEN); - SHA1Update(&ctxt, inp, len); - SHA1Update(&ctxt, pcb->eap.es_client.ea_name, - pcb->eap.es_client.ea_namelen); - SHA1Final(dig, &ctxt); - eap_srp_response(esp, id, EAPSRP_LWRECHALLENGE, dig, - SHA_DIGESTSIZE); - break; + case EAPSRP_LWRECHALLENGE: + if (len < 4) { + ppp_warn("EAP: malformed Lightweight rechallenge"); + return; + } + SHA1Init(&ctxt); + vals[0] = id; + SHA1Update(&ctxt, vals, 1); + SHA1Update(&ctxt, pcb->eap.es_client.ea_skey, + SESSION_KEY_LEN); + SHA1Update(&ctxt, inp, len); + SHA1Update(&ctxt, pcb->eap.es_client.ea_name, + pcb->eap.es_client.ea_namelen); + SHA1Final(dig, &ctxt); + eap_srp_response(esp, id, EAPSRP_LWRECHALLENGE, dig, + SHA_DIGESTSIZE); + break; - default: - ppp_error("EAP: unknown SRP Subtype %d", vallen); - eap_send_nak(pcb, id, EAPT_MD5CHAP); - break; - } - break; + default: + ppp_error("EAP: unknown SRP Subtype %d", vallen); + eap_send_nak(pcb, id, EAPT_MD5CHAP); + break; + } + break; #endif /* USE_SRP */ - default: - ppp_info("EAP: unknown authentication type %d; Naking", typenum); - eap_send_nak(pcb, id, EAPT_SRP); - break; - } + default: + ppp_info("EAP: unknown authentication type %d; Naking", typenum); + eap_send_nak(pcb, id, EAPT_SRP); + break; + } - if (pcb->settings.eap_req_time > 0) { - UNTIMEOUT(eap_client_timeout, pcb); - TIMEOUT(eap_client_timeout, pcb, - pcb->settings.eap_req_time); - } - return; + if (pcb->settings.eap_req_time > 0) { + UNTIMEOUT(eap_client_timeout, pcb); + TIMEOUT(eap_client_timeout, pcb, + pcb->settings.eap_req_time); + } + return; #ifdef USE_SRP client_failure: - pcb->eap.es_client.ea_state = eapBadAuth; - if (pcb->settings.eap_req_time > 0) { - UNTIMEOUT(eap_client_timeout, (void *)esp); - } - pcb->eap.es_client.ea_session = NULL; - t_clientclose(tc); - auth_withpeer_fail(pcb, PPP_EAP); + pcb->eap.es_client.ea_state = eapBadAuth; + if (pcb->settings.eap_req_time > 0) { + UNTIMEOUT(eap_client_timeout, (void *)esp); + } + pcb->eap.es_client.ea_session = NULL; + t_clientclose(tc); + auth_withpeer_fail(pcb, PPP_EAP); #endif /* USE_SRP */ } @@ -1723,291 +1723,291 @@ client_failure: * eap_response - Receive EAP Response message (server mode). */ static void eap_response(ppp_pcb *pcb, u_char *inp, int id, int len) { - u_char typenum; - u_char vallen; - int secret_len; - char secret[MAXSECRETLEN]; - char rhostname[MAXNAMELEN]; - lwip_md5_context mdContext; - u_char hash[MD5_SIGNATURE_SIZE]; + u_char typenum; + u_char vallen; + int secret_len; + char secret[MAXSECRETLEN]; + char rhostname[MAXNAMELEN]; + lwip_md5_context mdContext; + u_char hash[MD5_SIGNATURE_SIZE]; #ifdef USE_SRP - struct t_server *ts; - struct t_num A; - SHA1_CTX ctxt; - u_char dig[SHA_DIGESTSIZE]; + struct t_server *ts; + struct t_num A; + SHA1_CTX ctxt; + u_char dig[SHA_DIGESTSIZE]; #endif /* USE_SRP */ - if (pcb->eap.es_server.ea_id != id) { - ppp_dbglog("EAP: discarding Response %d; expected ID %d", id, - pcb->eap.es_server.ea_id); - return; - } + if (pcb->eap.es_server.ea_id != id) { + ppp_dbglog("EAP: discarding Response %d; expected ID %d", id, + pcb->eap.es_server.ea_id); + return; + } - pcb->eap.es_server.ea_responses++; + pcb->eap.es_server.ea_responses++; - if (len <= 0) { - ppp_error("EAP: empty Response message discarded"); - return; - } + if (len <= 0) { + ppp_error("EAP: empty Response message discarded"); + return; + } - GETCHAR(typenum, inp); - len--; + GETCHAR(typenum, inp); + len--; - switch (typenum) { - case EAPT_IDENTITY: - if (pcb->eap.es_server.ea_state != eapIdentify) { - ppp_dbglog("EAP discarding unwanted Identify \"%.q\"", len, - inp); - break; - } - ppp_info("EAP: unauthenticated peer name \"%.*q\"", len, inp); - if (len > MAXNAMELEN) { - len = MAXNAMELEN; - } - MEMCPY(pcb->eap.es_server.ea_peer, inp, len); - pcb->eap.es_server.ea_peer[len] = '\0'; - pcb->eap.es_server.ea_peerlen = len; - eap_figure_next_state(pcb, 0); - break; + switch (typenum) { + case EAPT_IDENTITY: + if (pcb->eap.es_server.ea_state != eapIdentify) { + ppp_dbglog("EAP discarding unwanted Identify \"%.q\"", len, + inp); + break; + } + ppp_info("EAP: unauthenticated peer name \"%.*q\"", len, inp); + if (len > MAXNAMELEN) { + len = MAXNAMELEN; + } + MEMCPY(pcb->eap.es_server.ea_peer, inp, len); + pcb->eap.es_server.ea_peer[len] = '\0'; + pcb->eap.es_server.ea_peerlen = len; + eap_figure_next_state(pcb, 0); + break; - case EAPT_NOTIFICATION: - ppp_dbglog("EAP unexpected Notification; response discarded"); - break; + case EAPT_NOTIFICATION: + ppp_dbglog("EAP unexpected Notification; response discarded"); + break; - case EAPT_NAK: - if (len < 1) { - ppp_info("EAP: Nak Response with no suggested protocol"); - eap_figure_next_state(pcb, 1); - break; - } + case EAPT_NAK: + if (len < 1) { + ppp_info("EAP: Nak Response with no suggested protocol"); + eap_figure_next_state(pcb, 1); + break; + } - GETCHAR(vallen, inp); - len--; + GETCHAR(vallen, inp); + len--; - if ( + if ( #if PPP_REMOTENAME - !pcb->explicit_remote && + !pcb->explicit_remote && #endif /* PPP_REMOTENAME */ - pcb->eap.es_server.ea_state == eapIdentify){ - /* Peer cannot Nak Identify Request */ - eap_figure_next_state(pcb, 1); - break; - } + pcb->eap.es_server.ea_state == eapIdentify){ + /* Peer cannot Nak Identify Request */ + eap_figure_next_state(pcb, 1); + break; + } - switch (vallen) { - case EAPT_SRP: - /* Run through SRP validator selection again. */ - pcb->eap.es_server.ea_state = eapIdentify; - eap_figure_next_state(pcb, 0); - break; + switch (vallen) { + case EAPT_SRP: + /* Run through SRP validator selection again. */ + pcb->eap.es_server.ea_state = eapIdentify; + eap_figure_next_state(pcb, 0); + break; - case EAPT_MD5CHAP: - pcb->eap.es_server.ea_state = eapMD5Chall; - break; + case EAPT_MD5CHAP: + pcb->eap.es_server.ea_state = eapMD5Chall; + break; - default: - ppp_dbglog("EAP: peer requesting unknown Type %d", vallen); - switch (pcb->eap.es_server.ea_state) { - case eapSRP1: - case eapSRP2: - case eapSRP3: - pcb->eap.es_server.ea_state = eapMD5Chall; - break; - case eapMD5Chall: - case eapSRP4: - pcb->eap.es_server.ea_state = eapIdentify; - eap_figure_next_state(pcb, 0); - break; - default: - break; - } - break; - } - break; + default: + ppp_dbglog("EAP: peer requesting unknown Type %d", vallen); + switch (pcb->eap.es_server.ea_state) { + case eapSRP1: + case eapSRP2: + case eapSRP3: + pcb->eap.es_server.ea_state = eapMD5Chall; + break; + case eapMD5Chall: + case eapSRP4: + pcb->eap.es_server.ea_state = eapIdentify; + eap_figure_next_state(pcb, 0); + break; + default: + break; + } + break; + } + break; - case EAPT_MD5CHAP: - if (pcb->eap.es_server.ea_state != eapMD5Chall) { - ppp_error("EAP: unexpected MD5-Response"); - eap_figure_next_state(pcb, 1); - break; - } - if (len < 1) { - ppp_error("EAP: received MD5-Response with no data"); - eap_figure_next_state(pcb, 1); - break; - } - GETCHAR(vallen, inp); - len--; - if (vallen != 16 || vallen > len) { - ppp_error("EAP: MD5-Response with bad length %d", vallen); - eap_figure_next_state(pcb, 1); - break; - } + case EAPT_MD5CHAP: + if (pcb->eap.es_server.ea_state != eapMD5Chall) { + ppp_error("EAP: unexpected MD5-Response"); + eap_figure_next_state(pcb, 1); + break; + } + if (len < 1) { + ppp_error("EAP: received MD5-Response with no data"); + eap_figure_next_state(pcb, 1); + break; + } + GETCHAR(vallen, inp); + len--; + if (vallen != 16 || vallen > len) { + ppp_error("EAP: MD5-Response with bad length %d", vallen); + eap_figure_next_state(pcb, 1); + break; + } - /* Not so likely to happen. */ - if (len - vallen >= sizeof (rhostname)) { - ppp_dbglog("EAP: trimming really long peer name down"); - MEMCPY(rhostname, inp + vallen, sizeof (rhostname) - 1); - rhostname[sizeof (rhostname) - 1] = '\0'; - } else { - MEMCPY(rhostname, inp + vallen, len - vallen); - rhostname[len - vallen] = '\0'; - } + /* Not so likely to happen. */ + if (vallen >= len + sizeof (rhostname)) { + ppp_dbglog("EAP: trimming really long peer name down"); + MEMCPY(rhostname, inp + vallen, sizeof (rhostname) - 1); + rhostname[sizeof (rhostname) - 1] = '\0'; + } else { + MEMCPY(rhostname, inp + vallen, len - vallen); + rhostname[len - vallen] = '\0'; + } #if PPP_REMOTENAME - /* In case the remote doesn't give us his name. */ - if (explicit_remote || - (remote_name[0] != '\0' && vallen == len)) - strlcpy(rhostname, remote_name, sizeof (rhostname)); + /* In case the remote doesn't give us his name. */ + if (explicit_remote || + (remote_name[0] != '\0' && vallen == len)) + strlcpy(rhostname, remote_name, sizeof (rhostname)); #endif /* PPP_REMOTENAME */ - /* - * Get the secret for authenticating the specified - * host. - */ - if (!get_secret(pcb, rhostname, - pcb->eap.es_server.ea_name, secret, &secret_len, 1)) { - ppp_dbglog("EAP: no MD5 secret for auth of %q", rhostname); - eap_send_failure(pcb); - break; - } - lwip_md5_init(&mdContext); - lwip_md5_starts(&mdContext); - lwip_md5_update(&mdContext, &pcb->eap.es_server.ea_id, 1); - lwip_md5_update(&mdContext, (u_char *)secret, secret_len); - BZERO(secret, sizeof (secret)); - lwip_md5_update(&mdContext, pcb->eap.es_challenge, pcb->eap.es_challen); - lwip_md5_finish(&mdContext, hash); - lwip_md5_free(&mdContext); - if (BCMP(hash, inp, MD5_SIGNATURE_SIZE) != 0) { - eap_send_failure(pcb); - break; - } - pcb->eap.es_server.ea_type = EAPT_MD5CHAP; - eap_send_success(pcb); - eap_figure_next_state(pcb, 0); - if (pcb->eap.es_rechallenge != 0) - TIMEOUT(eap_rechallenge, pcb, pcb->eap.es_rechallenge); - break; + /* + * Get the secret for authenticating the specified + * host. + */ + if (!get_secret(pcb, rhostname, + pcb->eap.es_server.ea_name, secret, &secret_len, 1)) { + ppp_dbglog("EAP: no MD5 secret for auth of %q", rhostname); + eap_send_failure(pcb); + break; + } + lwip_md5_init(&mdContext); + lwip_md5_starts(&mdContext); + lwip_md5_update(&mdContext, &pcb->eap.es_server.ea_id, 1); + lwip_md5_update(&mdContext, (u_char *)secret, secret_len); + BZERO(secret, sizeof (secret)); + lwip_md5_update(&mdContext, pcb->eap.es_challenge, pcb->eap.es_challen); + lwip_md5_finish(&mdContext, hash); + lwip_md5_free(&mdContext); + if (BCMP(hash, inp, MD5_SIGNATURE_SIZE) != 0) { + eap_send_failure(pcb); + break; + } + pcb->eap.es_server.ea_type = EAPT_MD5CHAP; + eap_send_success(pcb); + eap_figure_next_state(pcb, 0); + if (pcb->eap.es_rechallenge != 0) + TIMEOUT(eap_rechallenge, pcb, pcb->eap.es_rechallenge); + break; #ifdef USE_SRP - case EAPT_SRP: - if (len < 1) { - ppp_error("EAP: empty SRP Response"); - eap_figure_next_state(pcb, 1); - break; - } - GETCHAR(typenum, inp); - len--; - switch (typenum) { - case EAPSRP_CKEY: - if (pcb->eap.es_server.ea_state != eapSRP1) { - ppp_error("EAP: unexpected SRP Subtype 1 Response"); - eap_figure_next_state(pcb, 1); - break; - } - A.data = inp; - A.len = len; - ts = (struct t_server *)pcb->eap.es_server.ea_session; - assert(ts != NULL); - pcb->eap.es_server.ea_skey = t_servergetkey(ts, &A); - if (pcb->eap.es_server.ea_skey == NULL) { - /* Client's A value is bogus; terminate now */ - ppp_error("EAP: bogus A value from client"); - eap_send_failure(pcb); - } else { - eap_figure_next_state(pcb, 0); - } - break; + case EAPT_SRP: + if (len < 1) { + ppp_error("EAP: empty SRP Response"); + eap_figure_next_state(pcb, 1); + break; + } + GETCHAR(typenum, inp); + len--; + switch (typenum) { + case EAPSRP_CKEY: + if (pcb->eap.es_server.ea_state != eapSRP1) { + ppp_error("EAP: unexpected SRP Subtype 1 Response"); + eap_figure_next_state(pcb, 1); + break; + } + A.data = inp; + A.len = len; + ts = (struct t_server *)pcb->eap.es_server.ea_session; + assert(ts != NULL); + pcb->eap.es_server.ea_skey = t_servergetkey(ts, &A); + if (pcb->eap.es_server.ea_skey == NULL) { + /* Client's A value is bogus; terminate now */ + ppp_error("EAP: bogus A value from client"); + eap_send_failure(pcb); + } else { + eap_figure_next_state(pcb, 0); + } + break; - case EAPSRP_CVALIDATOR: - if (pcb->eap.es_server.ea_state != eapSRP2) { - ppp_error("EAP: unexpected SRP Subtype 2 Response"); - eap_figure_next_state(pcb, 1); - break; - } - if (len < sizeof (u32_t) + SHA_DIGESTSIZE) { - ppp_error("EAP: M1 length %d < %d", len, - sizeof (u32_t) + SHA_DIGESTSIZE); - eap_figure_next_state(pcb, 1); - break; - } - GETLONG(pcb->eap.es_server.ea_keyflags, inp); - ts = (struct t_server *)pcb->eap.es_server.ea_session; - assert(ts != NULL); - if (t_serververify(ts, inp)) { - ppp_info("EAP: unable to validate client identity"); - eap_send_failure(pcb); - break; - } - eap_figure_next_state(pcb, 0); - break; + case EAPSRP_CVALIDATOR: + if (pcb->eap.es_server.ea_state != eapSRP2) { + ppp_error("EAP: unexpected SRP Subtype 2 Response"); + eap_figure_next_state(pcb, 1); + break; + } + if (len < sizeof (u32_t) + SHA_DIGESTSIZE) { + ppp_error("EAP: M1 length %d < %d", len, + sizeof (u32_t) + SHA_DIGESTSIZE); + eap_figure_next_state(pcb, 1); + break; + } + GETLONG(pcb->eap.es_server.ea_keyflags, inp); + ts = (struct t_server *)pcb->eap.es_server.ea_session; + assert(ts != NULL); + if (t_serververify(ts, inp)) { + ppp_info("EAP: unable to validate client identity"); + eap_send_failure(pcb); + break; + } + eap_figure_next_state(pcb, 0); + break; - case EAPSRP_ACK: - if (pcb->eap.es_server.ea_state != eapSRP3) { - ppp_error("EAP: unexpected SRP Subtype 3 Response"); - eap_send_failure(esp); - break; - } - pcb->eap.es_server.ea_type = EAPT_SRP; - eap_send_success(pcb, esp); - eap_figure_next_state(pcb, 0); - if (pcb->eap.es_rechallenge != 0) - TIMEOUT(eap_rechallenge, pcb, - pcb->eap.es_rechallenge); - if (pcb->eap.es_lwrechallenge != 0) - TIMEOUT(srp_lwrechallenge, pcb, - pcb->eap.es_lwrechallenge); - break; + case EAPSRP_ACK: + if (pcb->eap.es_server.ea_state != eapSRP3) { + ppp_error("EAP: unexpected SRP Subtype 3 Response"); + eap_send_failure(esp); + break; + } + pcb->eap.es_server.ea_type = EAPT_SRP; + eap_send_success(pcb, esp); + eap_figure_next_state(pcb, 0); + if (pcb->eap.es_rechallenge != 0) + TIMEOUT(eap_rechallenge, pcb, + pcb->eap.es_rechallenge); + if (pcb->eap.es_lwrechallenge != 0) + TIMEOUT(srp_lwrechallenge, pcb, + pcb->eap.es_lwrechallenge); + break; - case EAPSRP_LWRECHALLENGE: - if (pcb->eap.es_server.ea_state != eapSRP4) { - ppp_info("EAP: unexpected SRP Subtype 4 Response"); - return; - } - if (len != SHA_DIGESTSIZE) { - ppp_error("EAP: bad Lightweight rechallenge " - "response"); - return; - } - SHA1Init(&ctxt); - vallen = id; - SHA1Update(&ctxt, &vallen, 1); - SHA1Update(&ctxt, pcb->eap.es_server.ea_skey, - SESSION_KEY_LEN); - SHA1Update(&ctxt, pcb->eap.es_challenge, pcb->eap.es_challen); - SHA1Update(&ctxt, pcb->eap.es_server.ea_peer, - pcb->eap.es_server.ea_peerlen); - SHA1Final(dig, &ctxt); - if (BCMP(dig, inp, SHA_DIGESTSIZE) != 0) { - ppp_error("EAP: failed Lightweight rechallenge"); - eap_send_failure(pcb); - break; - } - pcb->eap.es_server.ea_state = eapOpen; - if (pcb->eap.es_lwrechallenge != 0) - TIMEOUT(srp_lwrechallenge, esp, - pcb->eap.es_lwrechallenge); - break; - } - break; + case EAPSRP_LWRECHALLENGE: + if (pcb->eap.es_server.ea_state != eapSRP4) { + ppp_info("EAP: unexpected SRP Subtype 4 Response"); + return; + } + if (len != SHA_DIGESTSIZE) { + ppp_error("EAP: bad Lightweight rechallenge " + "response"); + return; + } + SHA1Init(&ctxt); + vallen = id; + SHA1Update(&ctxt, &vallen, 1); + SHA1Update(&ctxt, pcb->eap.es_server.ea_skey, + SESSION_KEY_LEN); + SHA1Update(&ctxt, pcb->eap.es_challenge, pcb->eap.es_challen); + SHA1Update(&ctxt, pcb->eap.es_server.ea_peer, + pcb->eap.es_server.ea_peerlen); + SHA1Final(dig, &ctxt); + if (BCMP(dig, inp, SHA_DIGESTSIZE) != 0) { + ppp_error("EAP: failed Lightweight rechallenge"); + eap_send_failure(pcb); + break; + } + pcb->eap.es_server.ea_state = eapOpen; + if (pcb->eap.es_lwrechallenge != 0) + TIMEOUT(srp_lwrechallenge, esp, + pcb->eap.es_lwrechallenge); + break; + } + break; #endif /* USE_SRP */ - default: - /* This can't happen. */ - ppp_error("EAP: unknown Response type %d; ignored", typenum); - return; - } + default: + /* This can't happen. */ + ppp_error("EAP: unknown Response type %d; ignored", typenum); + return; + } - if (pcb->settings.eap_timeout_time > 0) { - UNTIMEOUT(eap_server_timeout, pcb); - } + if (pcb->settings.eap_timeout_time > 0) { + UNTIMEOUT(eap_server_timeout, pcb); + } - if (pcb->eap.es_server.ea_state != eapBadAuth && - pcb->eap.es_server.ea_state != eapOpen) { - pcb->eap.es_server.ea_id++; - eap_send_request(pcb); - } + if (pcb->eap.es_server.ea_state != eapBadAuth && + pcb->eap.es_server.ea_state != eapOpen) { + pcb->eap.es_server.ea_id++; + eap_send_request(pcb); + } } #endif /* PPP_SERVER */ @@ -2015,105 +2015,105 @@ static void eap_response(ppp_pcb *pcb, u_char *inp, int id, int len) { * eap_success - Receive EAP Success message (client mode). */ static void eap_success(ppp_pcb *pcb, u_char *inp, int id, int len) { - LWIP_UNUSED_ARG(id); + LWIP_UNUSED_ARG(id); - if (pcb->eap.es_client.ea_state != eapOpen && !eap_client_active(pcb)) { - ppp_dbglog("EAP unexpected success message in state %s (%d)", - eap_state_name(pcb->eap.es_client.ea_state), - pcb->eap.es_client.ea_state); - return; - } + if (pcb->eap.es_client.ea_state != eapOpen && !eap_client_active(pcb)) { + ppp_dbglog("EAP unexpected success message in state %s (%d)", + eap_state_name(pcb->eap.es_client.ea_state), + pcb->eap.es_client.ea_state); + return; + } - if (pcb->settings.eap_req_time > 0) { - UNTIMEOUT(eap_client_timeout, pcb); - } + if (pcb->settings.eap_req_time > 0) { + UNTIMEOUT(eap_client_timeout, pcb); + } - if (len > 0) { - /* This is odd. The spec doesn't allow for this. */ - PRINTMSG(inp, len); - } + if (len > 0) { + /* This is odd. The spec doesn't allow for this. */ + PRINTMSG(inp, len); + } - pcb->eap.es_client.ea_state = eapOpen; - auth_withpeer_success(pcb, PPP_EAP, 0); + pcb->eap.es_client.ea_state = eapOpen; + auth_withpeer_success(pcb, PPP_EAP, 0); } /* * eap_failure - Receive EAP Failure message (client mode). */ static void eap_failure(ppp_pcb *pcb, u_char *inp, int id, int len) { - LWIP_UNUSED_ARG(id); + LWIP_UNUSED_ARG(id); - if (!eap_client_active(pcb)) { - ppp_dbglog("EAP unexpected failure message in state %s (%d)", - eap_state_name(pcb->eap.es_client.ea_state), - pcb->eap.es_client.ea_state); - } + if (!eap_client_active(pcb)) { + ppp_dbglog("EAP unexpected failure message in state %s (%d)", + eap_state_name(pcb->eap.es_client.ea_state), + pcb->eap.es_client.ea_state); + } - if (pcb->settings.eap_req_time > 0) { - UNTIMEOUT(eap_client_timeout, pcb); - } + if (pcb->settings.eap_req_time > 0) { + UNTIMEOUT(eap_client_timeout, pcb); + } - if (len > 0) { - /* This is odd. The spec doesn't allow for this. */ - PRINTMSG(inp, len); - } + if (len > 0) { + /* This is odd. The spec doesn't allow for this. */ + PRINTMSG(inp, len); + } - pcb->eap.es_client.ea_state = eapBadAuth; + pcb->eap.es_client.ea_state = eapBadAuth; - ppp_error("EAP: peer reports authentication failure"); - auth_withpeer_fail(pcb, PPP_EAP); + ppp_error("EAP: peer reports authentication failure"); + auth_withpeer_fail(pcb, PPP_EAP); } /* * eap_input - Handle received EAP message. */ static void eap_input(ppp_pcb *pcb, u_char *inp, int inlen) { - u_char code, id; - int len; + u_char code, id; + int len; - /* - * Parse header (code, id and length). If packet too short, - * drop it. - */ - if (inlen < EAP_HEADERLEN) { - ppp_error("EAP: packet too short: %d < %d", inlen, EAP_HEADERLEN); - return; - } - GETCHAR(code, inp); - GETCHAR(id, inp); - GETSHORT(len, inp); - if (len < EAP_HEADERLEN || len > inlen) { - ppp_error("EAP: packet has illegal length field %d (%d..%d)", len, - EAP_HEADERLEN, inlen); - return; - } - len -= EAP_HEADERLEN; + /* + * Parse header (code, id and length). If packet too short, + * drop it. + */ + if (inlen < EAP_HEADERLEN) { + ppp_error("EAP: packet too short: %d < %d", inlen, EAP_HEADERLEN); + return; + } + GETCHAR(code, inp); + GETCHAR(id, inp); + GETSHORT(len, inp); + if (len < EAP_HEADERLEN || len > inlen) { + ppp_error("EAP: packet has illegal length field %d (%d..%d)", len, + EAP_HEADERLEN, inlen); + return; + } + len -= EAP_HEADERLEN; - /* Dispatch based on message code */ - switch (code) { - case EAP_REQUEST: - eap_request(pcb, inp, id, len); - break; + /* Dispatch based on message code */ + switch (code) { + case EAP_REQUEST: + eap_request(pcb, inp, id, len); + break; #if PPP_SERVER - case EAP_RESPONSE: - eap_response(pcb, inp, id, len); - break; + case EAP_RESPONSE: + eap_response(pcb, inp, id, len); + break; #endif /* PPP_SERVER */ - case EAP_SUCCESS: - eap_success(pcb, inp, id, len); - break; + case EAP_SUCCESS: + eap_success(pcb, inp, id, len); + break; - case EAP_FAILURE: - eap_failure(pcb, inp, id, len); - break; + case EAP_FAILURE: + eap_failure(pcb, inp, id, len); + break; - default: /* XXX Need code reject */ - /* Note: it's not legal to send EAP Nak here. */ - ppp_warn("EAP: unknown code %d received", code); - break; - } + default: /* XXX Need code reject */ + /* Note: it's not legal to send EAP Nak here. */ + ppp_warn("EAP: unknown code %d received", code); + break; + } } #if PRINTPKT_SUPPORT @@ -2121,302 +2121,302 @@ static void eap_input(ppp_pcb *pcb, u_char *inp, int inlen) { * eap_printpkt - print the contents of an EAP packet. */ static const char* const eap_codenames[] = { - "Request", "Response", "Success", "Failure" + "Request", "Response", "Success", "Failure" }; static const char* const eap_typenames[] = { - "Identity", "Notification", "Nak", "MD5-Challenge", - "OTP", "Generic-Token", NULL, NULL, - "RSA", "DSS", "KEA", "KEA-Validate", - "TLS", "Defender", "Windows 2000", "Arcot", - "Cisco", "Nokia", "SRP" + "Identity", "Notification", "Nak", "MD5-Challenge", + "OTP", "Generic-Token", NULL, NULL, + "RSA", "DSS", "KEA", "KEA-Validate", + "TLS", "Defender", "Windows 2000", "Arcot", + "Cisco", "Nokia", "SRP" }; static int eap_printpkt(const u_char *inp, int inlen, void (*printer) (void *, const char *, ...), void *arg) { - int code, id, len, rtype, vallen; - const u_char *pstart; - u32_t uval; + int code, id, len, rtype, vallen; + const u_char *pstart; + u32_t uval; - if (inlen < EAP_HEADERLEN) - return (0); - pstart = inp; - GETCHAR(code, inp); - GETCHAR(id, inp); - GETSHORT(len, inp); - if (len < EAP_HEADERLEN || len > inlen) - return (0); + if (inlen < EAP_HEADERLEN) + return (0); + pstart = inp; + GETCHAR(code, inp); + GETCHAR(id, inp); + GETSHORT(len, inp); + if (len < EAP_HEADERLEN || len > inlen) + return (0); - if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(eap_codenames)) - printer(arg, " %s", eap_codenames[code-1]); - else - printer(arg, " code=0x%x", code); - printer(arg, " id=0x%x", id); - len -= EAP_HEADERLEN; - switch (code) { - case EAP_REQUEST: - if (len < 1) { - printer(arg, " "); - break; - } - GETCHAR(rtype, inp); - len--; - if (rtype >= 1 && rtype <= (int)LWIP_ARRAYSIZE(eap_typenames)) - printer(arg, " %s", eap_typenames[rtype-1]); - else - printer(arg, " type=0x%x", rtype); - switch (rtype) { - case EAPT_IDENTITY: - case EAPT_NOTIFICATION: - if (len > 0) { - printer(arg, " "); - INCPTR(len, inp); - len = 0; - } else { - printer(arg, " "); - } - break; + if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(eap_codenames)) + printer(arg, " %s", eap_codenames[code-1]); + else + printer(arg, " code=0x%x", code); + printer(arg, " id=0x%x", id); + len -= EAP_HEADERLEN; + switch (code) { + case EAP_REQUEST: + if (len < 1) { + printer(arg, " "); + break; + } + GETCHAR(rtype, inp); + len--; + if (rtype >= 1 && rtype <= (int)LWIP_ARRAYSIZE(eap_typenames)) + printer(arg, " %s", eap_typenames[rtype-1]); + else + printer(arg, " type=0x%x", rtype); + switch (rtype) { + case EAPT_IDENTITY: + case EAPT_NOTIFICATION: + if (len > 0) { + printer(arg, " "); + INCPTR(len, inp); + len = 0; + } else { + printer(arg, " "); + } + break; - case EAPT_MD5CHAP: - if (len <= 0) - break; - GETCHAR(vallen, inp); - len--; - if (vallen > len) - goto truncated; - printer(arg, " ", vallen, inp); - INCPTR(vallen, inp); - len -= vallen; - if (len > 0) { - printer(arg, " "); - INCPTR(len, inp); - len = 0; - } else { - printer(arg, " "); - } - break; + case EAPT_MD5CHAP: + if (len <= 0) + break; + GETCHAR(vallen, inp); + len--; + if (vallen > len) + goto truncated; + printer(arg, " ", vallen, inp); + INCPTR(vallen, inp); + len -= vallen; + if (len > 0) { + printer(arg, " "); + INCPTR(len, inp); + len = 0; + } else { + printer(arg, " "); + } + break; - case EAPT_SRP: - if (len < 3) - goto truncated; - GETCHAR(vallen, inp); - len--; - printer(arg, "-%d", vallen); - switch (vallen) { - case EAPSRP_CHALLENGE: - GETCHAR(vallen, inp); - len--; - if (vallen >= len) - goto truncated; - if (vallen > 0) { - printer(arg, " "); - } else { - printer(arg, " "); - } - INCPTR(vallen, inp); - len -= vallen; - GETCHAR(vallen, inp); - len--; - if (vallen >= len) - goto truncated; - printer(arg, " ", vallen, inp); - INCPTR(vallen, inp); - len -= vallen; - GETCHAR(vallen, inp); - len--; - if (vallen > len) - goto truncated; - if (vallen == 0) { - printer(arg, " "); - } else { - printer(arg, " ", vallen, inp); - } - INCPTR(vallen, inp); - len -= vallen; - if (len == 0) { - printer(arg, " "); - } else { - printer(arg, " ", len, inp); - INCPTR(len, inp); - len = 0; - } - break; + case EAPT_SRP: + if (len < 3) + goto truncated; + GETCHAR(vallen, inp); + len--; + printer(arg, "-%d", vallen); + switch (vallen) { + case EAPSRP_CHALLENGE: + GETCHAR(vallen, inp); + len--; + if (vallen >= len) + goto truncated; + if (vallen > 0) { + printer(arg, " "); + } else { + printer(arg, " "); + } + INCPTR(vallen, inp); + len -= vallen; + GETCHAR(vallen, inp); + len--; + if (vallen >= len) + goto truncated; + printer(arg, " ", vallen, inp); + INCPTR(vallen, inp); + len -= vallen; + GETCHAR(vallen, inp); + len--; + if (vallen > len) + goto truncated; + if (vallen == 0) { + printer(arg, " "); + } else { + printer(arg, " ", vallen, inp); + } + INCPTR(vallen, inp); + len -= vallen; + if (len == 0) { + printer(arg, " "); + } else { + printer(arg, " ", len, inp); + INCPTR(len, inp); + len = 0; + } + break; - case EAPSRP_SKEY: - printer(arg, " ", len, inp); - INCPTR(len, inp); - len = 0; - break; + case EAPSRP_SKEY: + printer(arg, " ", len, inp); + INCPTR(len, inp); + len = 0; + break; - case EAPSRP_SVALIDATOR: - if (len < (int)sizeof (u32_t)) - break; - GETLONG(uval, inp); - len -= sizeof (u32_t); - if (uval & SRPVAL_EBIT) { - printer(arg, " E"); - uval &= ~SRPVAL_EBIT; - } - if (uval != 0) { - printer(arg, " f<%X>", uval); - } - if ((vallen = len) > SHA_DIGESTSIZE) - vallen = SHA_DIGESTSIZE; - printer(arg, " ", len, inp, - len < SHA_DIGESTSIZE ? "?" : ""); - INCPTR(vallen, inp); - len -= vallen; - if (len > 0) { - printer(arg, " ", len, inp); - INCPTR(len, inp); - len = 0; - } - break; + case EAPSRP_SVALIDATOR: + if (len < (int)sizeof (u32_t)) + break; + GETLONG(uval, inp); + len -= sizeof (u32_t); + if (uval & SRPVAL_EBIT) { + printer(arg, " E"); + uval &= ~SRPVAL_EBIT; + } + if (uval != 0) { + printer(arg, " f<%X>", uval); + } + if ((vallen = len) > SHA_DIGESTSIZE) + vallen = SHA_DIGESTSIZE; + printer(arg, " ", len, inp, + len < SHA_DIGESTSIZE ? "?" : ""); + INCPTR(vallen, inp); + len -= vallen; + if (len > 0) { + printer(arg, " ", len, inp); + INCPTR(len, inp); + len = 0; + } + break; - case EAPSRP_LWRECHALLENGE: - printer(arg, " ", len, inp); - INCPTR(len, inp); - len = 0; - break; - default: - break; - } - break; - default: - break; - } - break; + case EAPSRP_LWRECHALLENGE: + printer(arg, " ", len, inp); + INCPTR(len, inp); + len = 0; + break; + default: + break; + } + break; + default: + break; + } + break; - case EAP_RESPONSE: - if (len < 1) - break; - GETCHAR(rtype, inp); - len--; - if (rtype >= 1 && rtype <= (int)LWIP_ARRAYSIZE(eap_typenames)) - printer(arg, " %s", eap_typenames[rtype-1]); - else - printer(arg, " type=0x%x", rtype); - switch (rtype) { - case EAPT_IDENTITY: - if (len > 0) { - printer(arg, " "); - INCPTR(len, inp); - len = 0; - } - break; + case EAP_RESPONSE: + if (len < 1) + break; + GETCHAR(rtype, inp); + len--; + if (rtype >= 1 && rtype <= (int)LWIP_ARRAYSIZE(eap_typenames)) + printer(arg, " %s", eap_typenames[rtype-1]); + else + printer(arg, " type=0x%x", rtype); + switch (rtype) { + case EAPT_IDENTITY: + if (len > 0) { + printer(arg, " "); + INCPTR(len, inp); + len = 0; + } + break; - case EAPT_NAK: - if (len <= 0) { - printer(arg, " "); - break; - } - GETCHAR(rtype, inp); - len--; - printer(arg, " = 1 && rtype < (int)LWIP_ARRAYSIZE(eap_typenames)) - printer(arg, " (%s)", eap_typenames[rtype-1]); - printer(arg, ">"); - break; + case EAPT_NAK: + if (len <= 0) { + printer(arg, " "); + break; + } + GETCHAR(rtype, inp); + len--; + printer(arg, " = 1 && rtype < (int)LWIP_ARRAYSIZE(eap_typenames)) + printer(arg, " (%s)", eap_typenames[rtype-1]); + printer(arg, ">"); + break; - case EAPT_MD5CHAP: - if (len <= 0) { - printer(arg, " "); - break; - } - GETCHAR(vallen, inp); - len--; - if (vallen > len) - goto truncated; - printer(arg, " ", vallen, inp); - INCPTR(vallen, inp); - len -= vallen; - if (len > 0) { - printer(arg, " "); - INCPTR(len, inp); - len = 0; - } else { - printer(arg, " "); - } - break; + case EAPT_MD5CHAP: + if (len <= 0) { + printer(arg, " "); + break; + } + GETCHAR(vallen, inp); + len--; + if (vallen > len) + goto truncated; + printer(arg, " ", vallen, inp); + INCPTR(vallen, inp); + len -= vallen; + if (len > 0) { + printer(arg, " "); + INCPTR(len, inp); + len = 0; + } else { + printer(arg, " "); + } + break; - case EAPT_SRP: - if (len < 1) - goto truncated; - GETCHAR(vallen, inp); - len--; - printer(arg, "-%d", vallen); - switch (vallen) { - case EAPSRP_CKEY: - printer(arg, " ", len, inp); - INCPTR(len, inp); - len = 0; - break; + case EAPT_SRP: + if (len < 1) + goto truncated; + GETCHAR(vallen, inp); + len--; + printer(arg, "-%d", vallen); + switch (vallen) { + case EAPSRP_CKEY: + printer(arg, " ", len, inp); + INCPTR(len, inp); + len = 0; + break; - case EAPSRP_CVALIDATOR: - if (len < (int)sizeof (u32_t)) - break; - GETLONG(uval, inp); - len -= sizeof (u32_t); - if (uval & SRPVAL_EBIT) { - printer(arg, " E"); - uval &= ~SRPVAL_EBIT; - } - if (uval != 0) { - printer(arg, " f<%X>", uval); - } - printer(arg, " ", len, inp, - len == SHA_DIGESTSIZE ? "" : "?"); - INCPTR(len, inp); - len = 0; - break; + case EAPSRP_CVALIDATOR: + if (len < (int)sizeof (u32_t)) + break; + GETLONG(uval, inp); + len -= sizeof (u32_t); + if (uval & SRPVAL_EBIT) { + printer(arg, " E"); + uval &= ~SRPVAL_EBIT; + } + if (uval != 0) { + printer(arg, " f<%X>", uval); + } + printer(arg, " ", len, inp, + len == SHA_DIGESTSIZE ? "" : "?"); + INCPTR(len, inp); + len = 0; + break; - case EAPSRP_ACK: - break; + case EAPSRP_ACK: + break; - case EAPSRP_LWRECHALLENGE: - printer(arg, " ", len, inp, - len == SHA_DIGESTSIZE ? "" : "?"); - if ((vallen = len) > SHA_DIGESTSIZE) - vallen = SHA_DIGESTSIZE; - INCPTR(vallen, inp); - len -= vallen; - break; - default: - break; - } - break; - default: - break; - } - break; + case EAPSRP_LWRECHALLENGE: + printer(arg, " ", len, inp, + len == SHA_DIGESTSIZE ? "" : "?"); + if ((vallen = len) > SHA_DIGESTSIZE) + vallen = SHA_DIGESTSIZE; + INCPTR(vallen, inp); + len -= vallen; + break; + default: + break; + } + break; + default: + break; + } + break; - case EAP_SUCCESS: /* No payload expected for these! */ - case EAP_FAILURE: - default: - break; + case EAP_SUCCESS: /* No payload expected for these! */ + case EAP_FAILURE: + default: + break; - truncated: - printer(arg, " "); - break; - } + truncated: + printer(arg, " "); + break; + } - if (len > 8) - printer(arg, "%8B...", inp); - else if (len > 0) - printer(arg, "%.*B", len, inp); - INCPTR(len, inp); + if (len > 8) + printer(arg, "%8B...", inp); + else if (len > 0) + printer(arg, "%.*B", len, inp); + INCPTR(len, inp); - return (inp - pstart); + return (inp - pstart); } #endif /* PRINTPKT_SUPPORT */ diff --git a/Libraries/LwIP/src/netif/ppp/ecp.c b/Libraries/LwIP/src/netif/ppp/ecp.c index 997ee24..a22eda8 100755 --- a/Libraries/LwIP/src/netif/ppp/ecp.c +++ b/Libraries/LwIP/src/netif/ppp/ecp.c @@ -92,8 +92,8 @@ static void ecp_protrej (int unit); */ #if PRINTPKT_SUPPORT static int ecp_printpkt (const u_char *pkt, int len, - void (*printer) (void *, char *, ...), - void *arg); + void (*printer) (void *, char *, ...), + void *arg); #endif /* PRINTPKT_SUPPORT */ /* static void ecp_datainput (int unit, u_char *pkt, int len); @@ -129,10 +129,10 @@ const struct protent ecp_protent = { }; fsm ecp_fsm[NUM_PPP]; -ecp_options ecp_wantoptions[NUM_PPP]; /* what to request the peer to use */ -ecp_options ecp_gotoptions[NUM_PPP]; /* what the peer agreed to do */ -ecp_options ecp_allowoptions[NUM_PPP]; /* what we'll agree to do */ -ecp_options ecp_hisoptions[NUM_PPP]; /* what we agreed to do */ +ecp_options ecp_wantoptions[NUM_PPP]; /* what to request the peer to use */ +ecp_options ecp_gotoptions[NUM_PPP]; /* what the peer agreed to do */ +ecp_options ecp_allowoptions[NUM_PPP]; /* what we'll agree to do */ +ecp_options ecp_hisoptions[NUM_PPP]; /* what we agreed to do */ static const fsm_callbacks ecp_callbacks = { NULL, /* ecp_resetci, */ diff --git a/Libraries/LwIP/src/netif/ppp/eui64.c b/Libraries/LwIP/src/netif/ppp/eui64.c index 4f28586..15af855 100755 --- a/Libraries/LwIP/src/netif/ppp/eui64.c +++ b/Libraries/LwIP/src/netif/ppp/eui64.c @@ -48,8 +48,8 @@ char *eui64_ntoa(eui64_t e) { static char buf[20]; sprintf(buf, "%02x%02x:%02x%02x:%02x%02x:%02x%02x", - e.e8[0], e.e8[1], e.e8[2], e.e8[3], - e.e8[4], e.e8[5], e.e8[6], e.e8[7]); + e.e8[0], e.e8[1], e.e8[2], e.e8[3], + e.e8[4], e.e8[5], e.e8[6], e.e8[7]); return buf; } diff --git a/Libraries/LwIP/src/netif/ppp/fsm.c b/Libraries/LwIP/src/netif/ppp/fsm.c index 5ffe082..9d32e7c 100755 --- a/Libraries/LwIP/src/netif/ppp/fsm.c +++ b/Libraries/LwIP/src/netif/ppp/fsm.c @@ -68,7 +68,7 @@ static void fsm_rtermack(fsm *f); static void fsm_rcoderej(fsm *f, u_char *inp, int len); static void fsm_sconfreq(fsm *f, int retransmit); -#define PROTO_NAME(f) ((f)->callbacks->proto_name) +#define PROTO_NAME(f) ((f)->callbacks->proto_name) /* * fsm_init - Initialize fsm. @@ -79,7 +79,7 @@ void fsm_init(fsm *f) { ppp_pcb *pcb = f->pcb; f->state = PPP_FSM_INITIAL; f->flags = 0; - f->id = 0; /* XXX Start with random id? */ + f->id = 0; /* XXX Start with random id? */ f->maxnakloops = pcb->settings.fsm_max_nak_loops; f->term_reason_len = 0; } @@ -91,22 +91,22 @@ void fsm_init(fsm *f) { void fsm_lowerup(fsm *f) { switch( f->state ){ case PPP_FSM_INITIAL: - f->state = PPP_FSM_CLOSED; - break; + f->state = PPP_FSM_CLOSED; + break; case PPP_FSM_STARTING: - if( f->flags & OPT_SILENT ) - f->state = PPP_FSM_STOPPED; - else { - /* Send an initial configure-request */ - fsm_sconfreq(f, 0); - f->state = PPP_FSM_REQSENT; - } - break; + if( f->flags & OPT_SILENT ) + f->state = PPP_FSM_STOPPED; + else { + /* Send an initial configure-request */ + fsm_sconfreq(f, 0); + f->state = PPP_FSM_REQSENT; + } + break; default: - FSMDEBUG(("%s: Up event in state %d!", PROTO_NAME(f), f->state)); - /* no break */ + FSMDEBUG(("%s: Up event in state %d!", PROTO_NAME(f), f->state)); + /* no break */ } } @@ -119,37 +119,37 @@ void fsm_lowerup(fsm *f) { void fsm_lowerdown(fsm *f) { switch( f->state ){ case PPP_FSM_CLOSED: - f->state = PPP_FSM_INITIAL; - break; + f->state = PPP_FSM_INITIAL; + break; case PPP_FSM_STOPPED: - f->state = PPP_FSM_STARTING; - if( f->callbacks->starting ) - (*f->callbacks->starting)(f); - break; + f->state = PPP_FSM_STARTING; + if( f->callbacks->starting ) + (*f->callbacks->starting)(f); + break; case PPP_FSM_CLOSING: - f->state = PPP_FSM_INITIAL; - UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ - break; + f->state = PPP_FSM_INITIAL; + UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ + break; case PPP_FSM_STOPPING: case PPP_FSM_REQSENT: case PPP_FSM_ACKRCVD: case PPP_FSM_ACKSENT: - f->state = PPP_FSM_STARTING; - UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ - break; + f->state = PPP_FSM_STARTING; + UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ + break; case PPP_FSM_OPENED: - if( f->callbacks->down ) - (*f->callbacks->down)(f); - f->state = PPP_FSM_STARTING; - break; + if( f->callbacks->down ) + (*f->callbacks->down)(f); + f->state = PPP_FSM_STARTING; + break; default: - FSMDEBUG(("%s: Down event in state %d!", PROTO_NAME(f), f->state)); - /* no break */ + FSMDEBUG(("%s: Down event in state %d!", PROTO_NAME(f), f->state)); + /* no break */ } } @@ -160,34 +160,34 @@ void fsm_lowerdown(fsm *f) { void fsm_open(fsm *f) { switch( f->state ){ case PPP_FSM_INITIAL: - f->state = PPP_FSM_STARTING; - if( f->callbacks->starting ) - (*f->callbacks->starting)(f); - break; + f->state = PPP_FSM_STARTING; + if( f->callbacks->starting ) + (*f->callbacks->starting)(f); + break; case PPP_FSM_CLOSED: - if( f->flags & OPT_SILENT ) - f->state = PPP_FSM_STOPPED; - else { - /* Send an initial configure-request */ - fsm_sconfreq(f, 0); - f->state = PPP_FSM_REQSENT; - } - break; + if( f->flags & OPT_SILENT ) + f->state = PPP_FSM_STOPPED; + else { + /* Send an initial configure-request */ + fsm_sconfreq(f, 0); + f->state = PPP_FSM_REQSENT; + } + break; case PPP_FSM_CLOSING: - f->state = PPP_FSM_STOPPING; - /* fall through */ - /* no break */ + f->state = PPP_FSM_STOPPING; + /* fall through */ + /* no break */ case PPP_FSM_STOPPED: case PPP_FSM_OPENED: - if( f->flags & OPT_RESTART ){ - fsm_lowerdown(f); - fsm_lowerup(f); - } - break; + if( f->flags & OPT_RESTART ){ + fsm_lowerdown(f); + fsm_lowerup(f); + } + break; default: - break; + break; } } @@ -201,25 +201,25 @@ static void terminate_layer(fsm *f, int nextstate) { ppp_pcb *pcb = f->pcb; if( f->state != PPP_FSM_OPENED ) - UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ + UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ else if( f->callbacks->down ) - (*f->callbacks->down)(f); /* Inform upper layers we're down */ + (*f->callbacks->down)(f); /* Inform upper layers we're down */ /* Init restart counter and send Terminate-Request */ f->retransmits = pcb->settings.fsm_max_term_transmits; fsm_sdata(f, TERMREQ, f->reqid = ++f->id, - (const u_char *) f->term_reason, f->term_reason_len); + (const u_char *) f->term_reason, f->term_reason_len); if (f->retransmits == 0) { - /* - * User asked for no terminate requests at all; just close it. - * We've already fired off one Terminate-Request just to be nice - * to the peer, but we're not going to wait for a reply. - */ - f->state = nextstate == PPP_FSM_CLOSING ? PPP_FSM_CLOSED : PPP_FSM_STOPPED; - if( f->callbacks->finished ) - (*f->callbacks->finished)(f); - return; + /* + * User asked for no terminate requests at all; just close it. + * We've already fired off one Terminate-Request just to be nice + * to the peer, but we're not going to wait for a reply. + */ + f->state = nextstate == PPP_FSM_CLOSING ? PPP_FSM_CLOSED : PPP_FSM_STOPPED; + if( f->callbacks->finished ) + (*f->callbacks->finished)(f); + return; } TIMEOUT(fsm_timeout, f, pcb->settings.fsm_timeout_time); @@ -236,26 +236,26 @@ static void terminate_layer(fsm *f, int nextstate) { */ void fsm_close(fsm *f, const char *reason) { f->term_reason = reason; - f->term_reason_len = (reason == NULL? 0: LWIP_MIN(strlen(reason), 0xFF) ); + f->term_reason_len = (reason == NULL? 0: (u8_t)LWIP_MIN(strlen(reason), 0xFF) ); switch( f->state ){ case PPP_FSM_STARTING: - f->state = PPP_FSM_INITIAL; - break; + f->state = PPP_FSM_INITIAL; + break; case PPP_FSM_STOPPED: - f->state = PPP_FSM_CLOSED; - break; + f->state = PPP_FSM_CLOSED; + break; case PPP_FSM_STOPPING: - f->state = PPP_FSM_CLOSING; - break; + f->state = PPP_FSM_CLOSING; + break; case PPP_FSM_REQSENT: case PPP_FSM_ACKRCVD: case PPP_FSM_ACKSENT: case PPP_FSM_OPENED: - terminate_layer(f, PPP_FSM_CLOSING); - break; + terminate_layer(f, PPP_FSM_CLOSING); + break; default: - break; + break; } } @@ -270,44 +270,44 @@ static void fsm_timeout(void *arg) { switch (f->state) { case PPP_FSM_CLOSING: case PPP_FSM_STOPPING: - if( f->retransmits <= 0 ){ - /* - * We've waited for an ack long enough. Peer probably heard us. - */ - f->state = (f->state == PPP_FSM_CLOSING)? PPP_FSM_CLOSED: PPP_FSM_STOPPED; - if( f->callbacks->finished ) - (*f->callbacks->finished)(f); - } else { - /* Send Terminate-Request */ - fsm_sdata(f, TERMREQ, f->reqid = ++f->id, - (const u_char *) f->term_reason, f->term_reason_len); - TIMEOUT(fsm_timeout, f, pcb->settings.fsm_timeout_time); - --f->retransmits; - } - break; + if( f->retransmits <= 0 ){ + /* + * We've waited for an ack long enough. Peer probably heard us. + */ + f->state = (f->state == PPP_FSM_CLOSING)? PPP_FSM_CLOSED: PPP_FSM_STOPPED; + if( f->callbacks->finished ) + (*f->callbacks->finished)(f); + } else { + /* Send Terminate-Request */ + fsm_sdata(f, TERMREQ, f->reqid = ++f->id, + (const u_char *) f->term_reason, f->term_reason_len); + TIMEOUT(fsm_timeout, f, pcb->settings.fsm_timeout_time); + --f->retransmits; + } + break; case PPP_FSM_REQSENT: case PPP_FSM_ACKRCVD: case PPP_FSM_ACKSENT: - if (f->retransmits <= 0) { - ppp_warn("%s: timeout sending Config-Requests", PROTO_NAME(f)); - f->state = PPP_FSM_STOPPED; - if( (f->flags & OPT_PASSIVE) == 0 && f->callbacks->finished ) - (*f->callbacks->finished)(f); + if (f->retransmits <= 0) { + ppp_warn("%s: timeout sending Config-Requests", PROTO_NAME(f)); + f->state = PPP_FSM_STOPPED; + if( (f->flags & OPT_PASSIVE) == 0 && f->callbacks->finished ) + (*f->callbacks->finished)(f); - } else { - /* Retransmit the configure-request */ - if (f->callbacks->retransmit) - (*f->callbacks->retransmit)(f); - fsm_sconfreq(f, 1); /* Re-send Configure-Request */ - if( f->state == PPP_FSM_ACKRCVD ) - f->state = PPP_FSM_REQSENT; - } - break; + } else { + /* Retransmit the configure-request */ + if (f->callbacks->retransmit) + (*f->callbacks->retransmit)(f); + fsm_sconfreq(f, 1); /* Re-send Configure-Request */ + if( f->state == PPP_FSM_ACKRCVD ) + f->state = PPP_FSM_REQSENT; + } + break; default: - FSMDEBUG(("%s: Timeout event in state %d!", PROTO_NAME(f), f->state)); - /* no break */ + FSMDEBUG(("%s: Timeout event in state %d!", PROTO_NAME(f), f->state)); + /* no break */ } } @@ -326,26 +326,26 @@ void fsm_input(fsm *f, u_char *inpacket, int l) { */ inp = inpacket; if (l < HEADERLEN) { - FSMDEBUG(("fsm_input(%x): Rcvd short header.", f->protocol)); - return; + FSMDEBUG(("fsm_input(%x): Rcvd short header.", f->protocol)); + return; } GETCHAR(code, inp); GETCHAR(id, inp); GETSHORT(len, inp); if (len < HEADERLEN) { - FSMDEBUG(("fsm_input(%x): Rcvd illegal length.", f->protocol)); - return; + FSMDEBUG(("fsm_input(%x): Rcvd illegal length.", f->protocol)); + return; } if (len > l) { - FSMDEBUG(("fsm_input(%x): Rcvd short packet.", f->protocol)); - return; + FSMDEBUG(("fsm_input(%x): Rcvd short packet.", f->protocol)); + return; } - len -= HEADERLEN; /* subtract header length */ + len -= HEADERLEN; /* subtract header length */ if( f->state == PPP_FSM_INITIAL || f->state == PPP_FSM_STARTING ){ - FSMDEBUG(("fsm_input(%x): Rcvd packet in state %d.", - f->protocol, f->state)); - return; + FSMDEBUG(("fsm_input(%x): Rcvd packet in state %d.", + f->protocol, f->state)); + return; } /* @@ -353,35 +353,35 @@ void fsm_input(fsm *f, u_char *inpacket, int l) { */ switch (code) { case CONFREQ: - fsm_rconfreq(f, id, inp, len); - break; + fsm_rconfreq(f, id, inp, len); + break; case CONFACK: - fsm_rconfack(f, id, inp, len); - break; + fsm_rconfack(f, id, inp, len); + break; case CONFNAK: case CONFREJ: - fsm_rconfnakrej(f, code, id, inp, len); - break; + fsm_rconfnakrej(f, code, id, inp, len); + break; case TERMREQ: - fsm_rtermreq(f, id, inp, len); - break; + fsm_rtermreq(f, id, inp, len); + break; case TERMACK: - fsm_rtermack(f); - break; + fsm_rtermack(f); + break; case CODEREJ: - fsm_rcoderej(f, inp, len); - break; + fsm_rcoderej(f, inp, len); + break; default: - if( !f->callbacks->extcode - || !(*f->callbacks->extcode)(f, code, id, inp, len) ) - fsm_sdata(f, CODEREJ, ++f->id, inpacket, len + HEADERLEN); - break; + if( !f->callbacks->extcode + || !(*f->callbacks->extcode)(f, code, id, inp, len) ) + fsm_sdata(f, CODEREJ, ++f->id, inpacket, len + HEADERLEN); + break; } } @@ -394,61 +394,61 @@ static void fsm_rconfreq(fsm *f, u_char id, u_char *inp, int len) { switch( f->state ){ case PPP_FSM_CLOSED: - /* Go away, we're closed */ - fsm_sdata(f, TERMACK, id, NULL, 0); - return; + /* Go away, we're closed */ + fsm_sdata(f, TERMACK, id, NULL, 0); + return; case PPP_FSM_CLOSING: case PPP_FSM_STOPPING: - return; + return; case PPP_FSM_OPENED: - /* Go down and restart negotiation */ - if( f->callbacks->down ) - (*f->callbacks->down)(f); /* Inform upper layers */ - fsm_sconfreq(f, 0); /* Send initial Configure-Request */ - f->state = PPP_FSM_REQSENT; - break; + /* Go down and restart negotiation */ + if( f->callbacks->down ) + (*f->callbacks->down)(f); /* Inform upper layers */ + fsm_sconfreq(f, 0); /* Send initial Configure-Request */ + f->state = PPP_FSM_REQSENT; + break; case PPP_FSM_STOPPED: - /* Negotiation started by our peer */ - fsm_sconfreq(f, 0); /* Send initial Configure-Request */ - f->state = PPP_FSM_REQSENT; - break; + /* Negotiation started by our peer */ + fsm_sconfreq(f, 0); /* Send initial Configure-Request */ + f->state = PPP_FSM_REQSENT; + break; default: - break; + break; } /* * Pass the requested configuration options * to protocol-specific code for checking. */ - if (f->callbacks->reqci){ /* Check CI */ - reject_if_disagree = (f->nakloops >= f->maxnakloops); - code = (*f->callbacks->reqci)(f, inp, &len, reject_if_disagree); + if (f->callbacks->reqci){ /* Check CI */ + reject_if_disagree = (f->nakloops >= f->maxnakloops); + code = (*f->callbacks->reqci)(f, inp, &len, reject_if_disagree); } else if (len) - code = CONFREJ; /* Reject all CI */ + code = CONFREJ; /* Reject all CI */ else - code = CONFACK; + code = CONFACK; /* send the Ack, Nak or Rej to the peer */ fsm_sdata(f, code, id, inp, len); if (code == CONFACK) { - if (f->state == PPP_FSM_ACKRCVD) { - UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ - f->state = PPP_FSM_OPENED; - if (f->callbacks->up) - (*f->callbacks->up)(f); /* Inform upper layers */ - } else - f->state = PPP_FSM_ACKSENT; - f->nakloops = 0; + if (f->state == PPP_FSM_ACKRCVD) { + UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ + f->state = PPP_FSM_OPENED; + if (f->callbacks->up) + (*f->callbacks->up)(f); /* Inform upper layers */ + } else + f->state = PPP_FSM_ACKSENT; + f->nakloops = 0; } else { - /* we sent CONFACK or CONFREJ */ - if (f->state != PPP_FSM_ACKRCVD) - f->state = PPP_FSM_REQSENT; - if( code == CONFNAK ) - ++f->nakloops; + /* we sent CONFACK or CONFREJ */ + if (f->state != PPP_FSM_ACKRCVD) + f->state = PPP_FSM_REQSENT; + if( code == CONFNAK ) + ++f->nakloops; } } @@ -459,13 +459,13 @@ static void fsm_rconfreq(fsm *f, u_char id, u_char *inp, int len) { static void fsm_rconfack(fsm *f, int id, u_char *inp, int len) { ppp_pcb *pcb = f->pcb; - if (id != f->reqid || f->seen_ack) /* Expected id? */ - return; /* Nope, toss... */ + if (id != f->reqid || f->seen_ack) /* Expected id? */ + return; /* Nope, toss... */ if( !(f->callbacks->ackci? (*f->callbacks->ackci)(f, inp, len): - (len == 0)) ){ - /* Ack is bad - ignore it */ - ppp_error("Received bad configure-ack: %P", inp, len); - return; + (len == 0)) ){ + /* Ack is bad - ignore it */ + ppp_error("Received bad configure-ack: %P", inp, len); + return; } f->seen_ack = 1; f->rnakloops = 0; @@ -473,38 +473,38 @@ static void fsm_rconfack(fsm *f, int id, u_char *inp, int len) { switch (f->state) { case PPP_FSM_CLOSED: case PPP_FSM_STOPPED: - fsm_sdata(f, TERMACK, id, NULL, 0); - break; + fsm_sdata(f, TERMACK, id, NULL, 0); + break; case PPP_FSM_REQSENT: - f->state = PPP_FSM_ACKRCVD; - f->retransmits = pcb->settings.fsm_max_conf_req_transmits; - break; + f->state = PPP_FSM_ACKRCVD; + f->retransmits = pcb->settings.fsm_max_conf_req_transmits; + break; case PPP_FSM_ACKRCVD: - /* Huh? an extra valid Ack? oh well... */ - UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ - fsm_sconfreq(f, 0); - f->state = PPP_FSM_REQSENT; - break; + /* Huh? an extra valid Ack? oh well... */ + UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ + fsm_sconfreq(f, 0); + f->state = PPP_FSM_REQSENT; + break; case PPP_FSM_ACKSENT: - UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ - f->state = PPP_FSM_OPENED; - f->retransmits = pcb->settings.fsm_max_conf_req_transmits; - if (f->callbacks->up) - (*f->callbacks->up)(f); /* Inform upper layers */ - break; + UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ + f->state = PPP_FSM_OPENED; + f->retransmits = pcb->settings.fsm_max_conf_req_transmits; + if (f->callbacks->up) + (*f->callbacks->up)(f); /* Inform upper layers */ + break; case PPP_FSM_OPENED: - /* Go down and restart negotiation */ - if (f->callbacks->down) - (*f->callbacks->down)(f); /* Inform upper layers */ - fsm_sconfreq(f, 0); /* Send initial Configure-Request */ - f->state = PPP_FSM_REQSENT; - break; + /* Go down and restart negotiation */ + if (f->callbacks->down) + (*f->callbacks->down)(f); /* Inform upper layers */ + fsm_sconfreq(f, 0); /* Send initial Configure-Request */ + f->state = PPP_FSM_REQSENT; + break; default: - break; + break; } } @@ -516,24 +516,24 @@ static void fsm_rconfnakrej(fsm *f, int code, int id, u_char *inp, int len) { int ret; int treat_as_reject; - if (id != f->reqid || f->seen_ack) /* Expected id? */ - return; /* Nope, toss... */ + if (id != f->reqid || f->seen_ack) /* Expected id? */ + return; /* Nope, toss... */ if (code == CONFNAK) { - ++f->rnakloops; - treat_as_reject = (f->rnakloops >= f->maxnakloops); - if (f->callbacks->nakci == NULL - || !(ret = f->callbacks->nakci(f, inp, len, treat_as_reject))) { - ppp_error("Received bad configure-nak: %P", inp, len); - return; - } + ++f->rnakloops; + treat_as_reject = (f->rnakloops >= f->maxnakloops); + if (f->callbacks->nakci == NULL + || !(ret = f->callbacks->nakci(f, inp, len, treat_as_reject))) { + ppp_error("Received bad configure-nak: %P", inp, len); + return; + } } else { - f->rnakloops = 0; - if (f->callbacks->rejci == NULL - || !(ret = f->callbacks->rejci(f, inp, len))) { - ppp_error("Received bad configure-rej: %P", inp, len); - return; - } + f->rnakloops = 0; + if (f->callbacks->rejci == NULL + || !(ret = f->callbacks->rejci(f, inp, len))) { + ppp_error("Received bad configure-rej: %P", inp, len); + return; + } } f->seen_ack = 1; @@ -541,35 +541,35 @@ static void fsm_rconfnakrej(fsm *f, int code, int id, u_char *inp, int len) { switch (f->state) { case PPP_FSM_CLOSED: case PPP_FSM_STOPPED: - fsm_sdata(f, TERMACK, id, NULL, 0); - break; + fsm_sdata(f, TERMACK, id, NULL, 0); + break; case PPP_FSM_REQSENT: case PPP_FSM_ACKSENT: - /* They didn't agree to what we wanted - try another request */ - UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ - if (ret < 0) - f->state = PPP_FSM_STOPPED; /* kludge for stopping CCP */ - else - fsm_sconfreq(f, 0); /* Send Configure-Request */ - break; + /* They didn't agree to what we wanted - try another request */ + UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ + if (ret < 0) + f->state = PPP_FSM_STOPPED; /* kludge for stopping CCP */ + else + fsm_sconfreq(f, 0); /* Send Configure-Request */ + break; case PPP_FSM_ACKRCVD: - /* Got a Nak/reject when we had already had an Ack?? oh well... */ - UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ - fsm_sconfreq(f, 0); - f->state = PPP_FSM_REQSENT; - break; + /* Got a Nak/reject when we had already had an Ack?? oh well... */ + UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ + fsm_sconfreq(f, 0); + f->state = PPP_FSM_REQSENT; + break; case PPP_FSM_OPENED: - /* Go down and restart negotiation */ - if (f->callbacks->down) - (*f->callbacks->down)(f); /* Inform upper layers */ - fsm_sconfreq(f, 0); /* Send initial Configure-Request */ - f->state = PPP_FSM_REQSENT; - break; + /* Go down and restart negotiation */ + if (f->callbacks->down) + (*f->callbacks->down)(f); /* Inform upper layers */ + fsm_sconfreq(f, 0); /* Send initial Configure-Request */ + f->state = PPP_FSM_REQSENT; + break; default: - break; + break; } } @@ -583,22 +583,22 @@ static void fsm_rtermreq(fsm *f, int id, u_char *p, int len) { switch (f->state) { case PPP_FSM_ACKRCVD: case PPP_FSM_ACKSENT: - f->state = PPP_FSM_REQSENT; /* Start over but keep trying */ - break; + f->state = PPP_FSM_REQSENT; /* Start over but keep trying */ + break; case PPP_FSM_OPENED: - if (len > 0) { - ppp_info("%s terminated by peer (%0.*v)", PROTO_NAME(f), len, p); - } else - ppp_info("%s terminated by peer", PROTO_NAME(f)); - f->retransmits = 0; - f->state = PPP_FSM_STOPPING; - if (f->callbacks->down) - (*f->callbacks->down)(f); /* Inform upper layers */ - TIMEOUT(fsm_timeout, f, pcb->settings.fsm_timeout_time); - break; + if (len > 0) { + ppp_info("%s terminated by peer (%0.*v)", PROTO_NAME(f), len, p); + } else + ppp_info("%s terminated by peer", PROTO_NAME(f)); + f->retransmits = 0; + f->state = PPP_FSM_STOPPING; + if (f->callbacks->down) + (*f->callbacks->down)(f); /* Inform upper layers */ + TIMEOUT(fsm_timeout, f, pcb->settings.fsm_timeout_time); + break; default: - break; + break; } fsm_sdata(f, TERMACK, id, NULL, 0); @@ -611,30 +611,30 @@ static void fsm_rtermreq(fsm *f, int id, u_char *p, int len) { static void fsm_rtermack(fsm *f) { switch (f->state) { case PPP_FSM_CLOSING: - UNTIMEOUT(fsm_timeout, f); - f->state = PPP_FSM_CLOSED; - if( f->callbacks->finished ) - (*f->callbacks->finished)(f); - break; + UNTIMEOUT(fsm_timeout, f); + f->state = PPP_FSM_CLOSED; + if( f->callbacks->finished ) + (*f->callbacks->finished)(f); + break; case PPP_FSM_STOPPING: - UNTIMEOUT(fsm_timeout, f); - f->state = PPP_FSM_STOPPED; - if( f->callbacks->finished ) - (*f->callbacks->finished)(f); - break; + UNTIMEOUT(fsm_timeout, f); + f->state = PPP_FSM_STOPPED; + if( f->callbacks->finished ) + (*f->callbacks->finished)(f); + break; case PPP_FSM_ACKRCVD: - f->state = PPP_FSM_REQSENT; - break; + f->state = PPP_FSM_REQSENT; + break; case PPP_FSM_OPENED: - if (f->callbacks->down) - (*f->callbacks->down)(f); /* Inform upper layers */ - fsm_sconfreq(f, 0); - f->state = PPP_FSM_REQSENT; - break; + if (f->callbacks->down) + (*f->callbacks->down)(f); /* Inform upper layers */ + fsm_sconfreq(f, 0); + f->state = PPP_FSM_REQSENT; + break; default: - break; + break; } } @@ -646,15 +646,15 @@ static void fsm_rcoderej(fsm *f, u_char *inp, int len) { u_char code, id; if (len < HEADERLEN) { - FSMDEBUG(("fsm_rcoderej: Rcvd short Code-Reject packet!")); - return; + FSMDEBUG(("fsm_rcoderej: Rcvd short Code-Reject packet!")); + return; } GETCHAR(code, inp); GETCHAR(id, inp); ppp_warn("%s: Rcvd Code-Reject for code %d, id %d", PROTO_NAME(f), code, id); if( f->state == PPP_FSM_ACKRCVD ) - f->state = PPP_FSM_REQSENT; + f->state = PPP_FSM_REQSENT; } @@ -666,36 +666,36 @@ static void fsm_rcoderej(fsm *f, u_char *inp, int len) { void fsm_protreject(fsm *f) { switch( f->state ){ case PPP_FSM_CLOSING: - UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ - /* fall through */ - /* no break */ + UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ + /* fall through */ + /* no break */ case PPP_FSM_CLOSED: - f->state = PPP_FSM_CLOSED; - if( f->callbacks->finished ) - (*f->callbacks->finished)(f); - break; + f->state = PPP_FSM_CLOSED; + if( f->callbacks->finished ) + (*f->callbacks->finished)(f); + break; case PPP_FSM_STOPPING: case PPP_FSM_REQSENT: case PPP_FSM_ACKRCVD: case PPP_FSM_ACKSENT: - UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ - /* fall through */ - /* no break */ + UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ + /* fall through */ + /* no break */ case PPP_FSM_STOPPED: - f->state = PPP_FSM_STOPPED; - if( f->callbacks->finished ) - (*f->callbacks->finished)(f); - break; + f->state = PPP_FSM_STOPPED; + if( f->callbacks->finished ) + (*f->callbacks->finished)(f); + break; case PPP_FSM_OPENED: - terminate_layer(f, PPP_FSM_STOPPING); - break; + terminate_layer(f, PPP_FSM_STOPPING); + break; default: - FSMDEBUG(("%s: Protocol-reject event in state %d!", - PROTO_NAME(f), f->state)); - /* no break */ + FSMDEBUG(("%s: Protocol-reject event in state %d!", + PROTO_NAME(f), f->state)); + /* no break */ } } @@ -710,17 +710,17 @@ static void fsm_sconfreq(fsm *f, int retransmit) { int cilen; if( f->state != PPP_FSM_REQSENT && f->state != PPP_FSM_ACKRCVD && f->state != PPP_FSM_ACKSENT ){ - /* Not currently negotiating - reset options */ - if( f->callbacks->resetci ) - (*f->callbacks->resetci)(f); - f->nakloops = 0; - f->rnakloops = 0; + /* Not currently negotiating - reset options */ + if( f->callbacks->resetci ) + (*f->callbacks->resetci)(f); + f->nakloops = 0; + f->rnakloops = 0; } if( !retransmit ){ - /* New request - reset retransmission counter, use new ID */ - f->retransmits = pcb->settings.fsm_max_conf_req_transmits; - f->reqid = ++f->id; + /* New request - reset retransmission counter, use new ID */ + f->retransmits = pcb->settings.fsm_max_conf_req_transmits; + f->reqid = ++f->id; } f->seen_ack = 0; @@ -729,11 +729,11 @@ static void fsm_sconfreq(fsm *f, int retransmit) { * Make up the request packet */ if( f->callbacks->cilen && f->callbacks->addci ){ - cilen = (*f->callbacks->cilen)(f); - if( cilen > pcb->peer_mru - HEADERLEN ) - cilen = pcb->peer_mru - HEADERLEN; + cilen = (*f->callbacks->cilen)(f); + if( cilen > pcb->peer_mru - HEADERLEN ) + cilen = pcb->peer_mru - HEADERLEN; } else - cilen = 0; + cilen = 0; p = pbuf_alloc(PBUF_RAW, (u16_t)(cilen + HEADERLEN + PPP_HDRLEN), PPP_CTRL_PBUF_TYPE); if(NULL == p) @@ -750,8 +750,8 @@ static void fsm_sconfreq(fsm *f, int retransmit) { PUTCHAR(f->reqid, outp); PUTSHORT(cilen + HEADERLEN, outp); if (cilen != 0) { - (*f->callbacks->addci)(f, outp, &cilen); - LWIP_ASSERT("cilen == p->len - HEADERLEN - PPP_HDRLEN", cilen == p->len - HEADERLEN - PPP_HDRLEN); + (*f->callbacks->addci)(f, outp, &cilen); + LWIP_ASSERT("cilen == p->len - HEADERLEN - PPP_HDRLEN", cilen == p->len - HEADERLEN - PPP_HDRLEN); } ppp_write(pcb, p); @@ -775,7 +775,7 @@ void fsm_sdata(fsm *f, u_char code, u_char id, const u_char *data, int datalen) /* Adjust length to be smaller than MTU */ if (datalen > pcb->peer_mru - HEADERLEN) - datalen = pcb->peer_mru - HEADERLEN; + datalen = pcb->peer_mru - HEADERLEN; outlen = datalen + HEADERLEN; p = pbuf_alloc(PBUF_RAW, (u16_t)(outlen + PPP_HDRLEN), PPP_CTRL_PBUF_TYPE); @@ -788,7 +788,7 @@ void fsm_sdata(fsm *f, u_char code, u_char id, const u_char *data, int datalen) outp = (u_char*)p->payload; if (datalen) /* && data != outp + PPP_HDRLEN + HEADERLEN) -- was only for fsm_sconfreq() */ - MEMCPY(outp + PPP_HDRLEN + HEADERLEN, data, datalen); + MEMCPY(outp + PPP_HDRLEN + HEADERLEN, data, datalen); MAKEHEADER(outp, f->protocol); PUTCHAR(code, outp); PUTCHAR(id, outp); diff --git a/Libraries/LwIP/src/netif/ppp/ipcp.c b/Libraries/LwIP/src/netif/ppp/ipcp.c index 0630e7f..3fba320 100755 --- a/Libraries/LwIP/src/netif/ppp/ipcp.c +++ b/Libraries/LwIP/src/netif/ppp/ipcp.c @@ -66,15 +66,15 @@ #if 0 /* UNUSED */ /* global vars */ -u32_t netmask = 0; /* IP netmask to set on interface */ +u32_t netmask = 0; /* IP netmask to set on interface */ #endif /* UNUSED */ #if 0 /* UNUSED */ -bool disable_defaultip = 0; /* Don't use hostname for default IP adrs */ +bool disable_defaultip = 0; /* Don't use hostname for default IP adrs */ #endif /* UNUSED */ #if 0 /* moved to ppp_settings */ -bool noremoteip = 0; /* Let him have no IP address */ +bool noremoteip = 0; /* Let him have no IP address */ #endif /* moved to ppp_setting */ #if 0 /* UNUSED */ @@ -96,47 +96,47 @@ struct notifier *ip_down_notifier = NULL; /* local vars */ #if 0 /* moved to ppp_pcb */ -static int default_route_set[NUM_PPP]; /* Have set up a default route */ -static int proxy_arp_set[NUM_PPP]; /* Have created proxy arp entry */ -static int ipcp_is_up; /* have called np_up() */ -static int ipcp_is_open; /* haven't called np_finished() */ -static bool ask_for_local; /* request our address from peer */ +static int default_route_set[NUM_PPP]; /* Have set up a default route */ +static int proxy_arp_set[NUM_PPP]; /* Have created proxy arp entry */ +static int ipcp_is_up; /* have called np_up() */ +static int ipcp_is_open; /* haven't called np_finished() */ +static bool ask_for_local; /* request our address from peer */ #endif /* moved to ppp_pcb */ #if 0 /* UNUSED */ -static char vj_value[8]; /* string form of vj option value */ -static char netmask_str[20]; /* string form of netmask value */ +static char vj_value[8]; /* string form of vj option value */ +static char netmask_str[20]; /* string form of netmask value */ #endif /* UNUSED */ /* * Callbacks for fsm code. (CI = Configuration Information) */ -static void ipcp_resetci(fsm *f); /* Reset our CI */ -static int ipcp_cilen(fsm *f); /* Return length of our CI */ +static void ipcp_resetci(fsm *f); /* Reset our CI */ +static int ipcp_cilen(fsm *f); /* Return length of our CI */ static void ipcp_addci(fsm *f, u_char *ucp, int *lenp); /* Add our CI */ -static int ipcp_ackci(fsm *f, u_char *p, int len); /* Peer ack'd our CI */ +static int ipcp_ackci(fsm *f, u_char *p, int len); /* Peer ack'd our CI */ static int ipcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject);/* Peer nak'd our CI */ -static int ipcp_rejci(fsm *f, u_char *p, int len); /* Peer rej'd our CI */ +static int ipcp_rejci(fsm *f, u_char *p, int len); /* Peer rej'd our CI */ static int ipcp_reqci(fsm *f, u_char *inp, int *len, int reject_if_disagree); /* Rcv CI */ -static void ipcp_up(fsm *f); /* We're UP */ -static void ipcp_down(fsm *f); /* We're DOWN */ -static void ipcp_finished(fsm *f); /* Don't need lower layer */ +static void ipcp_up(fsm *f); /* We're UP */ +static void ipcp_down(fsm *f); /* We're DOWN */ +static void ipcp_finished(fsm *f); /* Don't need lower layer */ static const fsm_callbacks ipcp_callbacks = { /* IPCP callback routines */ - ipcp_resetci, /* Reset our Configuration Information */ - ipcp_cilen, /* Length of our Configuration Information */ - ipcp_addci, /* Add our Configuration Information */ - ipcp_ackci, /* ACK our Configuration Information */ - ipcp_nakci, /* NAK our Configuration Information */ - ipcp_rejci, /* Reject our Configuration Information */ - ipcp_reqci, /* Request peer's Configuration Information */ - ipcp_up, /* Called when fsm reaches OPENED state */ - ipcp_down, /* Called when fsm leaves OPENED state */ - NULL, /* Called when we want the lower layer up */ - ipcp_finished, /* Called when we want the lower layer down */ - NULL, /* Called when Protocol-Reject received */ - NULL, /* Retransmission is necessary */ - NULL, /* Called to handle protocol-specific codes */ - "IPCP" /* String name of protocol */ + ipcp_resetci, /* Reset our Configuration Information */ + ipcp_cilen, /* Length of our Configuration Information */ + ipcp_addci, /* Add our Configuration Information */ + ipcp_ackci, /* ACK our Configuration Information */ + ipcp_nakci, /* NAK our Configuration Information */ + ipcp_rejci, /* Reject our Configuration Information */ + ipcp_reqci, /* Request peer's Configuration Information */ + ipcp_up, /* Called when fsm reaches OPENED state */ + ipcp_down, /* Called when fsm leaves OPENED state */ + NULL, /* Called when we want the lower layer up */ + ipcp_finished, /* Called when we want the lower layer down */ + NULL, /* Called when Protocol-Reject received */ + NULL, /* Retransmission is necessary */ + NULL, /* Called to handle protocol-specific codes */ + "IPCP" /* String name of protocol */ }; /* @@ -209,13 +209,13 @@ static option_t ipcp_option_list[] = { &ipcp_wantoptions[0].default_route }, { "replacedefaultroute", o_bool, - &ipcp_wantoptions[0].replace_default_route, + &ipcp_wantoptions[0].replace_default_route, "Replace default route", 1 }, { "noreplacedefaultroute", o_bool, - &ipcp_allowoptions[0].replace_default_route, + &ipcp_allowoptions[0].replace_default_route, "Never replace default route", OPT_A2COPY, - &ipcp_wantoptions[0].replace_default_route }, + &ipcp_wantoptions[0].replace_default_route }, { "proxyarp", o_bool, &ipcp_wantoptions[0].proxy_arp, "Add proxy ARP entry", OPT_ENABLE|1, &ipcp_allowoptions[0].proxy_arp }, { "noproxyarp", o_bool, &ipcp_allowoptions[0].proxy_arp, @@ -265,7 +265,7 @@ static void ipcp_input(ppp_pcb *pcb, u_char *p, int len); static void ipcp_protrej(ppp_pcb *pcb); #if PRINTPKT_SUPPORT static int ipcp_printpkt(const u_char *p, int plen, - void (*printer) (void *, const char *, ...), void *arg); + void (*printer) (void *, const char *, ...), void *arg); #endif /* PRINTPKT_SUPPORT */ #if PPP_OPTIONS static void ip_check_options (void); @@ -312,15 +312,15 @@ static void ipcp_clear_addrs(ppp_pcb *pcb, u32_t ouraddr, u32_t hisaddr, u8_t re /* * Lengths of configuration options. */ -#define CILEN_VOID 2 -#define CILEN_COMPRESS 4 /* min length for compression protocol opt. */ -#define CILEN_VJ 6 /* length for RFC1332 Van-Jacobson opt. */ -#define CILEN_ADDR 6 /* new-style single address option */ -#define CILEN_ADDRS 10 /* old-style dual address option */ +#define CILEN_VOID 2 +#define CILEN_COMPRESS 4 /* min length for compression protocol opt. */ +#define CILEN_VJ 6 /* length for RFC1332 Van-Jacobson opt. */ +#define CILEN_ADDR 6 /* new-style single address option */ +#define CILEN_ADDRS 10 /* old-style dual address option */ -#define CODENAME(x) ((x) == CONFACK ? "ACK" : \ - (x) == CONFNAK ? "NAK" : "REJ") +#define CODENAME(x) ((x) == CONFACK ? "ACK" : \ + (x) == CONFNAK ? "NAK" : "REJ") #if 0 /* UNUSED, already defined by lwIP */ /* @@ -351,11 +351,11 @@ setvjslots(argv) int value; if (!int_option(*argv, &value)) - return 0; + return 0; if (value < 2 || value > 16) { - option_error("vj-max-slots value must be between 2 and 16"); - return 0; + option_error("vj-max-slots value must be between 2 and 16"); + return 0; } ipcp_wantoptions [0].maxslotindex = ipcp_allowoptions[0].maxslotindex = value - 1; @@ -375,21 +375,21 @@ setdnsaddr(argv) dns = inet_addr(*argv); if (dns == (u32_t) -1) { - if ((hp = gethostbyname(*argv)) == NULL) { - option_error("invalid address parameter '%s' for ms-dns option", - *argv); - return 0; - } - dns = *(u32_t *)hp->h_addr; + if ((hp = gethostbyname(*argv)) == NULL) { + option_error("invalid address parameter '%s' for ms-dns option", + *argv); + return 0; + } + dns = *(u32_t *)hp->h_addr; } /* We take the last 2 values given, the 2nd-last as the primary and the last as the secondary. If only one is given it becomes both primary and secondary. */ if (ipcp_allowoptions[0].dnsaddr[1] == 0) - ipcp_allowoptions[0].dnsaddr[0] = dns; + ipcp_allowoptions[0].dnsaddr[0] = dns; else - ipcp_allowoptions[0].dnsaddr[0] = ipcp_allowoptions[0].dnsaddr[1]; + ipcp_allowoptions[0].dnsaddr[0] = ipcp_allowoptions[0].dnsaddr[1]; /* always set the secondary address value. */ ipcp_allowoptions[0].dnsaddr[1] = dns; @@ -411,21 +411,21 @@ setwinsaddr(argv) wins = inet_addr(*argv); if (wins == (u32_t) -1) { - if ((hp = gethostbyname(*argv)) == NULL) { - option_error("invalid address parameter '%s' for ms-wins option", - *argv); - return 0; - } - wins = *(u32_t *)hp->h_addr; + if ((hp = gethostbyname(*argv)) == NULL) { + option_error("invalid address parameter '%s' for ms-wins option", + *argv); + return 0; + } + wins = *(u32_t *)hp->h_addr; } /* We take the last 2 values given, the 2nd-last as the primary and the last as the secondary. If only one is given it becomes both primary and secondary. */ if (ipcp_allowoptions[0].winsaddr[1] == 0) - ipcp_allowoptions[0].winsaddr[0] = wins; + ipcp_allowoptions[0].winsaddr[0] = wins; else - ipcp_allowoptions[0].winsaddr[0] = ipcp_allowoptions[0].winsaddr[1]; + ipcp_allowoptions[0].winsaddr[0] = ipcp_allowoptions[0].winsaddr[1]; /* always set the secondary address value. */ ipcp_allowoptions[0].winsaddr[1] = wins; @@ -455,52 +455,52 @@ setipaddr(arg, argv, doit) * IP address pair separated by ":". */ if ((colon = strchr(arg, ':')) == NULL) - return 0; + return 0; if (!doit) - return 1; + return 1; /* * If colon first character, then no local addr. */ if (colon != arg && option_priority >= prio_local) { - *colon = '\0'; - if ((local = inet_addr(arg)) == (u32_t) -1) { - if ((hp = gethostbyname(arg)) == NULL) { - option_error("unknown host: %s", arg); - return 0; - } - local = *(u32_t *)hp->h_addr; - } - if (bad_ip_adrs(local)) { - option_error("bad local IP address %s", ip_ntoa(local)); - return 0; - } - if (local != 0) - wo->ouraddr = local; - *colon = ':'; - prio_local = option_priority; + *colon = '\0'; + if ((local = inet_addr(arg)) == (u32_t) -1) { + if ((hp = gethostbyname(arg)) == NULL) { + option_error("unknown host: %s", arg); + return 0; + } + local = *(u32_t *)hp->h_addr; + } + if (bad_ip_adrs(local)) { + option_error("bad local IP address %s", ip_ntoa(local)); + return 0; + } + if (local != 0) + wo->ouraddr = local; + *colon = ':'; + prio_local = option_priority; } /* * If colon last character, then no remote addr. */ if (*++colon != '\0' && option_priority >= prio_remote) { - if ((remote = inet_addr(colon)) == (u32_t) -1) { - if ((hp = gethostbyname(colon)) == NULL) { - option_error("unknown host: %s", colon); - return 0; - } - remote = *(u32_t *)hp->h_addr; - if (remote_name[0] == 0) - strlcpy(remote_name, colon, sizeof(remote_name)); - } - if (bad_ip_adrs(remote)) { - option_error("bad remote IP address %s", ip_ntoa(remote)); - return 0; - } - if (remote != 0) - wo->hisaddr = remote; - prio_remote = option_priority; + if ((remote = inet_addr(colon)) == (u32_t) -1) { + if ((hp = gethostbyname(colon)) == NULL) { + option_error("unknown host: %s", colon); + return 0; + } + remote = *(u32_t *)hp->h_addr; + if (remote_name[0] == 0) + strlcpy(remote_name, colon, sizeof(remote_name)); + } + if (bad_ip_adrs(remote)) { + option_error("bad remote IP address %s", ip_ntoa(remote)); + return 0; + } + if (remote != 0) + wo->hisaddr = remote; + prio_remote = option_priority; } return 1; @@ -512,13 +512,13 @@ printipaddr(opt, printer, arg) void (*printer) (void *, char *, ...); void *arg; { - ipcp_options *wo = &ipcp_wantoptions[0]; + ipcp_options *wo = &ipcp_wantoptions[0]; - if (wo->ouraddr != 0) - printer(arg, "%I", wo->ouraddr); - printer(arg, ":"); - if (wo->hisaddr != 0) - printer(arg, "%I", wo->hisaddr); + if (wo->ouraddr != 0) + printer(arg, "%I", wo->ouraddr); + printer(arg, ":"); + if (wo->hisaddr != 0) + printer(arg, "%I", wo->hisaddr); } /* @@ -542,8 +542,8 @@ setnetmask(argv) mask = lwip_htonl(mask); if (n == 0 || p[n] != 0 || (netmask & ~mask) != 0) { - option_error("invalid netmask value '%s'", *argv); - return 0; + option_error("invalid netmask value '%s'", *argv); + return 0; } netmask = mask; @@ -563,23 +563,23 @@ parse_dotted_ip(p, vp) v = 0; for (n = 3;; --n) { - b = strtoul(p, &endp, 0); - if (endp == p) - return 0; - if (b > 255) { - if (n < 3) - return 0; - /* accept e.g. 0xffffff00 */ - *vp = b; - return endp - p0; - } - v |= b << (n * 8); - p = endp; - if (n == 0) - break; - if (*p != '.') - return 0; - ++p; + b = strtoul(p, &endp, 0); + if (endp == p) + return 0; + if (b > 255) { + if (n < 3) + return 0; + /* accept e.g. 0xffffff00 */ + *vp = b; + return endp - p0; + } + v |= b << (n * 8); + p = endp; + if (n == 0) + break; + if (*p != '.') + return 0; + ++p; } *vp = v; return p - p0; @@ -716,23 +716,23 @@ static void ipcp_resetci(fsm *f) { ipcp_options *ao = &pcb->ipcp_allowoptions; wo->req_addr = (wo->neg_addr || wo->old_addrs) && - (ao->neg_addr || ao->old_addrs); + (ao->neg_addr || ao->old_addrs); if (wo->ouraddr == 0) - wo->accept_local = 1; + wo->accept_local = 1; if (wo->hisaddr == 0) - wo->accept_remote = 1; + wo->accept_remote = 1; #if LWIP_DNS - wo->req_dns1 = wo->req_dns2 = pcb->settings.usepeerdns; /* Request DNS addresses from the peer */ + wo->req_dns1 = wo->req_dns2 = pcb->settings.usepeerdns; /* Request DNS addresses from the peer */ #endif /* LWIP_DNS */ *go = *wo; if (!pcb->ask_for_local) - go->ouraddr = 0; + go->ouraddr = 0; #if 0 /* UNUSED */ if (ip_choose_hook) { - ip_choose_hook(&wo->hisaddr); - if (wo->hisaddr) { - wo->accept_remote = 0; - } + ip_choose_hook(&wo->hisaddr); + if (wo->hisaddr) { + wo->accept_remote = 0; + } } #endif /* UNUSED */ BZERO(&pcb->ipcp_hisoptions, sizeof(ipcp_options)); @@ -751,16 +751,16 @@ static int ipcp_cilen(fsm *f) { #endif /* VJ_SUPPORT */ ipcp_options *ho = &pcb->ipcp_hisoptions; -#define LENCIADDRS(neg) (neg ? CILEN_ADDRS : 0) +#define LENCIADDRS(neg) (neg ? CILEN_ADDRS : 0) #if VJ_SUPPORT -#define LENCIVJ(neg, old) (neg ? (old? CILEN_COMPRESS : CILEN_VJ) : 0) +#define LENCIVJ(neg, old) (neg ? (old? CILEN_COMPRESS : CILEN_VJ) : 0) #endif /* VJ_SUPPORT */ -#define LENCIADDR(neg) (neg ? CILEN_ADDR : 0) +#define LENCIADDR(neg) (neg ? CILEN_ADDR : 0) #if LWIP_DNS -#define LENCIDNS(neg) LENCIADDR(neg) +#define LENCIDNS(neg) LENCIADDR(neg) #endif /* LWIP_DNS */ #if 0 /* UNUSED - WINS */ -#define LENCIWINS(neg) LENCIADDR(neg) +#define LENCIWINS(neg) LENCIADDR(neg) #endif /* UNUSED - WINS */ /* @@ -768,34 +768,34 @@ static int ipcp_cilen(fsm *f) { * forms because we have received old forms from the peer. */ if (go->neg_addr && go->old_addrs && !ho->neg_addr && ho->old_addrs) - go->neg_addr = 0; + go->neg_addr = 0; #if VJ_SUPPORT if (wo->neg_vj && !go->neg_vj && !go->old_vj) { - /* try an older style of VJ negotiation */ - /* use the old style only if the peer did */ - if (ho->neg_vj && ho->old_vj) { - go->neg_vj = 1; - go->old_vj = 1; - go->vj_protocol = ho->vj_protocol; - } + /* try an older style of VJ negotiation */ + /* use the old style only if the peer did */ + if (ho->neg_vj && ho->old_vj) { + go->neg_vj = 1; + go->old_vj = 1; + go->vj_protocol = ho->vj_protocol; + } } #endif /* VJ_SUPPORT */ return (LENCIADDRS(!go->neg_addr && go->old_addrs) + #if VJ_SUPPORT - LENCIVJ(go->neg_vj, go->old_vj) + + LENCIVJ(go->neg_vj, go->old_vj) + #endif /* VJ_SUPPORT */ - LENCIADDR(go->neg_addr) + + LENCIADDR(go->neg_addr) + #if LWIP_DNS - LENCIDNS(go->req_dns1) + - LENCIDNS(go->req_dns2) + + LENCIDNS(go->req_dns1) + + LENCIDNS(go->req_dns2) + #endif /* LWIP_DNS */ #if 0 /* UNUSED - WINS */ - LENCIWINS(go->winsaddr[0]) + - LENCIWINS(go->winsaddr[1]) + + LENCIWINS(go->winsaddr[0]) + + LENCIWINS(go->winsaddr[1]) + #endif /* UNUSED - WINS */ - 0); + 0); } @@ -810,86 +810,86 @@ static void ipcp_addci(fsm *f, u_char *ucp, int *lenp) { #define ADDCIADDRS(opt, neg, val1, val2) \ if (neg) { \ - if (len >= CILEN_ADDRS) { \ - u32_t l; \ - PUTCHAR(opt, ucp); \ - PUTCHAR(CILEN_ADDRS, ucp); \ - l = lwip_ntohl(val1); \ - PUTLONG(l, ucp); \ - l = lwip_ntohl(val2); \ - PUTLONG(l, ucp); \ - len -= CILEN_ADDRS; \ - } else \ - go->old_addrs = 0; \ + if (len >= CILEN_ADDRS) { \ + u32_t l; \ + PUTCHAR(opt, ucp); \ + PUTCHAR(CILEN_ADDRS, ucp); \ + l = lwip_ntohl(val1); \ + PUTLONG(l, ucp); \ + l = lwip_ntohl(val2); \ + PUTLONG(l, ucp); \ + len -= CILEN_ADDRS; \ + } else \ + go->old_addrs = 0; \ } #if VJ_SUPPORT #define ADDCIVJ(opt, neg, val, old, maxslotindex, cflag) \ if (neg) { \ - int vjlen = old? CILEN_COMPRESS : CILEN_VJ; \ - if (len >= vjlen) { \ - PUTCHAR(opt, ucp); \ - PUTCHAR(vjlen, ucp); \ - PUTSHORT(val, ucp); \ - if (!old) { \ - PUTCHAR(maxslotindex, ucp); \ - PUTCHAR(cflag, ucp); \ - } \ - len -= vjlen; \ - } else \ - neg = 0; \ + int vjlen = old? CILEN_COMPRESS : CILEN_VJ; \ + if (len >= vjlen) { \ + PUTCHAR(opt, ucp); \ + PUTCHAR(vjlen, ucp); \ + PUTSHORT(val, ucp); \ + if (!old) { \ + PUTCHAR(maxslotindex, ucp); \ + PUTCHAR(cflag, ucp); \ + } \ + len -= vjlen; \ + } else \ + neg = 0; \ } #endif /* VJ_SUPPORT */ #define ADDCIADDR(opt, neg, val) \ if (neg) { \ - if (len >= CILEN_ADDR) { \ - u32_t l; \ - PUTCHAR(opt, ucp); \ - PUTCHAR(CILEN_ADDR, ucp); \ - l = lwip_ntohl(val); \ - PUTLONG(l, ucp); \ - len -= CILEN_ADDR; \ - } else \ - neg = 0; \ + if (len >= CILEN_ADDR) { \ + u32_t l; \ + PUTCHAR(opt, ucp); \ + PUTCHAR(CILEN_ADDR, ucp); \ + l = lwip_ntohl(val); \ + PUTLONG(l, ucp); \ + len -= CILEN_ADDR; \ + } else \ + neg = 0; \ } #if LWIP_DNS #define ADDCIDNS(opt, neg, addr) \ if (neg) { \ - if (len >= CILEN_ADDR) { \ - u32_t l; \ - PUTCHAR(opt, ucp); \ - PUTCHAR(CILEN_ADDR, ucp); \ - l = lwip_ntohl(addr); \ - PUTLONG(l, ucp); \ - len -= CILEN_ADDR; \ - } else \ - neg = 0; \ + if (len >= CILEN_ADDR) { \ + u32_t l; \ + PUTCHAR(opt, ucp); \ + PUTCHAR(CILEN_ADDR, ucp); \ + l = lwip_ntohl(addr); \ + PUTLONG(l, ucp); \ + len -= CILEN_ADDR; \ + } else \ + neg = 0; \ } #endif /* LWIP_DNS */ #if 0 /* UNUSED - WINS */ #define ADDCIWINS(opt, addr) \ if (addr) { \ - if (len >= CILEN_ADDR) { \ - u32_t l; \ - PUTCHAR(opt, ucp); \ - PUTCHAR(CILEN_ADDR, ucp); \ - l = lwip_ntohl(addr); \ - PUTLONG(l, ucp); \ - len -= CILEN_ADDR; \ - } else \ - addr = 0; \ + if (len >= CILEN_ADDR) { \ + u32_t l; \ + PUTCHAR(opt, ucp); \ + PUTCHAR(CILEN_ADDR, ucp); \ + l = lwip_ntohl(addr); \ + PUTLONG(l, ucp); \ + len -= CILEN_ADDR; \ + } else \ + addr = 0; \ } #endif /* UNUSED - WINS */ ADDCIADDRS(CI_ADDRS, !go->neg_addr && go->old_addrs, go->ouraddr, - go->hisaddr); + go->hisaddr); #if VJ_SUPPORT ADDCIVJ(CI_COMPRESSTYPE, go->neg_vj, go->vj_protocol, go->old_vj, - go->maxslotindex, go->cflag); + go->maxslotindex, go->cflag); #endif /* VJ_SUPPORT */ ADDCIADDR(CI_ADDR, go->neg_addr, go->ouraddr); @@ -915,8 +915,8 @@ static void ipcp_addci(fsm *f, u_char *ucp, int *lenp) { * Called by fsm_rconfack, Receive Configure ACK. * * Returns: - * 0 - Ack was bad. - * 1 - Ack was good. + * 0 - Ack was bad. + * 1 - Ack was good. */ static int ipcp_ackci(fsm *f, u_char *p, int len) { ppp_pcb *pcb = f->pcb; @@ -936,105 +936,105 @@ static int ipcp_ackci(fsm *f, u_char *p, int len) { #define ACKCIADDRS(opt, neg, val1, val2) \ if (neg) { \ - u32_t l; \ - if ((len -= CILEN_ADDRS) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != CILEN_ADDRS || \ - citype != opt) \ - goto bad; \ - GETLONG(l, p); \ - cilong = lwip_htonl(l); \ - if (val1 != cilong) \ - goto bad; \ - GETLONG(l, p); \ - cilong = lwip_htonl(l); \ - if (val2 != cilong) \ - goto bad; \ + u32_t l; \ + if ((len -= CILEN_ADDRS) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != CILEN_ADDRS || \ + citype != opt) \ + goto bad; \ + GETLONG(l, p); \ + cilong = lwip_htonl(l); \ + if (val1 != cilong) \ + goto bad; \ + GETLONG(l, p); \ + cilong = lwip_htonl(l); \ + if (val2 != cilong) \ + goto bad; \ } #if VJ_SUPPORT #define ACKCIVJ(opt, neg, val, old, maxslotindex, cflag) \ if (neg) { \ - int vjlen = old? CILEN_COMPRESS : CILEN_VJ; \ - if ((len -= vjlen) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != vjlen || \ - citype != opt) \ - goto bad; \ - GETSHORT(cishort, p); \ - if (cishort != val) \ - goto bad; \ - if (!old) { \ - GETCHAR(cimaxslotindex, p); \ - if (cimaxslotindex != maxslotindex) \ - goto bad; \ - GETCHAR(cicflag, p); \ - if (cicflag != cflag) \ - goto bad; \ - } \ + int vjlen = old? CILEN_COMPRESS : CILEN_VJ; \ + if ((len -= vjlen) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != vjlen || \ + citype != opt) \ + goto bad; \ + GETSHORT(cishort, p); \ + if (cishort != val) \ + goto bad; \ + if (!old) { \ + GETCHAR(cimaxslotindex, p); \ + if (cimaxslotindex != maxslotindex) \ + goto bad; \ + GETCHAR(cicflag, p); \ + if (cicflag != cflag) \ + goto bad; \ + } \ } #endif /* VJ_SUPPORT */ #define ACKCIADDR(opt, neg, val) \ if (neg) { \ - u32_t l; \ - if ((len -= CILEN_ADDR) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != CILEN_ADDR || \ - citype != opt) \ - goto bad; \ - GETLONG(l, p); \ - cilong = lwip_htonl(l); \ - if (val != cilong) \ - goto bad; \ + u32_t l; \ + if ((len -= CILEN_ADDR) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != CILEN_ADDR || \ + citype != opt) \ + goto bad; \ + GETLONG(l, p); \ + cilong = lwip_htonl(l); \ + if (val != cilong) \ + goto bad; \ } #if LWIP_DNS #define ACKCIDNS(opt, neg, addr) \ if (neg) { \ - u32_t l; \ - if ((len -= CILEN_ADDR) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != CILEN_ADDR || citype != opt) \ - goto bad; \ - GETLONG(l, p); \ - cilong = lwip_htonl(l); \ - if (addr != cilong) \ - goto bad; \ + u32_t l; \ + if ((len -= CILEN_ADDR) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != CILEN_ADDR || citype != opt) \ + goto bad; \ + GETLONG(l, p); \ + cilong = lwip_htonl(l); \ + if (addr != cilong) \ + goto bad; \ } #endif /* LWIP_DNS */ #if 0 /* UNUSED - WINS */ #define ACKCIWINS(opt, addr) \ if (addr) { \ - u32_t l; \ - if ((len -= CILEN_ADDR) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != CILEN_ADDR || citype != opt) \ - goto bad; \ - GETLONG(l, p); \ - cilong = lwip_htonl(l); \ - if (addr != cilong) \ - goto bad; \ + u32_t l; \ + if ((len -= CILEN_ADDR) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != CILEN_ADDR || citype != opt) \ + goto bad; \ + GETLONG(l, p); \ + cilong = lwip_htonl(l); \ + if (addr != cilong) \ + goto bad; \ } #endif /* UNUSED - WINS */ ACKCIADDRS(CI_ADDRS, !go->neg_addr && go->old_addrs, go->ouraddr, - go->hisaddr); + go->hisaddr); #if VJ_SUPPORT ACKCIVJ(CI_COMPRESSTYPE, go->neg_vj, go->vj_protocol, go->old_vj, - go->maxslotindex, go->cflag); + go->maxslotindex, go->cflag); #endif /* VJ_SUPPORT */ ACKCIADDR(CI_ADDR, go->neg_addr, go->ouraddr); @@ -1055,7 +1055,7 @@ static int ipcp_ackci(fsm *f, u_char *p, int len) { * If there are any remaining CIs, then this packet is bad. */ if (len != 0) - goto bad; + goto bad; return (1); bad: @@ -1070,8 +1070,8 @@ bad: * Calback from fsm_rconfnakrej - Receive Configure-Nak or Configure-Reject. * * Returns: - * 0 - Nak was bad. - * 1 - Nak was good. + * 0 - Nak was bad. + * 1 - Nak was good. */ static int ipcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { ppp_pcb *pcb = f->pcb; @@ -1085,8 +1085,8 @@ static int ipcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { #if LWIP_DNS u32_t cidnsaddr; #endif /* LWIP_DNS */ - ipcp_options no; /* options we've seen Naks for */ - ipcp_options try_; /* options to request next time */ + ipcp_options no; /* options we've seen Naks for */ + ipcp_options try_; /* options to request next time */ BZERO(&no, sizeof(no)); try_ = *go; @@ -1098,58 +1098,58 @@ static int ipcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { */ #define NAKCIADDRS(opt, neg, code) \ if ((neg) && \ - (cilen = p[1]) == CILEN_ADDRS && \ - len >= cilen && \ - p[0] == opt) { \ - len -= cilen; \ - INCPTR(2, p); \ - GETLONG(l, p); \ - ciaddr1 = lwip_htonl(l); \ - GETLONG(l, p); \ - ciaddr2 = lwip_htonl(l); \ - no.old_addrs = 1; \ - code \ + (cilen = p[1]) == CILEN_ADDRS && \ + len >= cilen && \ + p[0] == opt) { \ + len -= cilen; \ + INCPTR(2, p); \ + GETLONG(l, p); \ + ciaddr1 = lwip_htonl(l); \ + GETLONG(l, p); \ + ciaddr2 = lwip_htonl(l); \ + no.old_addrs = 1; \ + code \ } #if VJ_SUPPORT #define NAKCIVJ(opt, neg, code) \ if (go->neg && \ - ((cilen = p[1]) == CILEN_COMPRESS || cilen == CILEN_VJ) && \ - len >= cilen && \ - p[0] == opt) { \ - len -= cilen; \ - INCPTR(2, p); \ - GETSHORT(cishort, p); \ - no.neg = 1; \ + ((cilen = p[1]) == CILEN_COMPRESS || cilen == CILEN_VJ) && \ + len >= cilen && \ + p[0] == opt) { \ + len -= cilen; \ + INCPTR(2, p); \ + GETSHORT(cishort, p); \ + no.neg = 1; \ code \ } #endif /* VJ_SUPPORT */ #define NAKCIADDR(opt, neg, code) \ if (go->neg && \ - (cilen = p[1]) == CILEN_ADDR && \ - len >= cilen && \ - p[0] == opt) { \ - len -= cilen; \ - INCPTR(2, p); \ - GETLONG(l, p); \ - ciaddr1 = lwip_htonl(l); \ - no.neg = 1; \ - code \ + (cilen = p[1]) == CILEN_ADDR && \ + len >= cilen && \ + p[0] == opt) { \ + len -= cilen; \ + INCPTR(2, p); \ + GETLONG(l, p); \ + ciaddr1 = lwip_htonl(l); \ + no.neg = 1; \ + code \ } #if LWIP_DNS #define NAKCIDNS(opt, neg, code) \ if (go->neg && \ - ((cilen = p[1]) == CILEN_ADDR) && \ - len >= cilen && \ - p[0] == opt) { \ - len -= cilen; \ - INCPTR(2, p); \ - GETLONG(l, p); \ - cidnsaddr = lwip_htonl(l); \ - no.neg = 1; \ - code \ + ((cilen = p[1]) == CILEN_ADDR) && \ + len >= cilen && \ + p[0] == opt) { \ + len -= cilen; \ + INCPTR(2, p); \ + GETLONG(l, p); \ + cidnsaddr = lwip_htonl(l); \ + no.neg = 1; \ + code \ } #endif /* LWIP_DNS */ @@ -1158,19 +1158,19 @@ static int ipcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { * from our idea, only if the accept_{local,remote} flag is set. */ NAKCIADDRS(CI_ADDRS, !go->neg_addr && go->old_addrs, - if (treat_as_reject) { - try_.old_addrs = 0; - } else { - if (go->accept_local && ciaddr1) { - /* take his idea of our address */ - try_.ouraddr = ciaddr1; - } - if (go->accept_remote && ciaddr2) { - /* take his idea of his address */ - try_.hisaddr = ciaddr2; - } - } - ); + if (treat_as_reject) { + try_.old_addrs = 0; + } else { + if (go->accept_local && ciaddr1) { + /* take his idea of our address */ + try_.ouraddr = ciaddr1; + } + if (go->accept_remote && ciaddr2) { + /* take his idea of his address */ + try_.hisaddr = ciaddr2; + } + } + ); #if VJ_SUPPORT /* @@ -1180,57 +1180,57 @@ static int ipcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { * the peer wants. */ NAKCIVJ(CI_COMPRESSTYPE, neg_vj, - if (treat_as_reject) { - try_.neg_vj = 0; - } else if (cilen == CILEN_VJ) { - GETCHAR(cimaxslotindex, p); - GETCHAR(cicflag, p); - if (cishort == IPCP_VJ_COMP) { - try_.old_vj = 0; - if (cimaxslotindex < go->maxslotindex) - try_.maxslotindex = cimaxslotindex; - if (!cicflag) - try_.cflag = 0; - } else { - try_.neg_vj = 0; - } - } else { - if (cishort == IPCP_VJ_COMP || cishort == IPCP_VJ_COMP_OLD) { - try_.old_vj = 1; - try_.vj_protocol = cishort; - } else { - try_.neg_vj = 0; - } - } - ); + if (treat_as_reject) { + try_.neg_vj = 0; + } else if (cilen == CILEN_VJ) { + GETCHAR(cimaxslotindex, p); + GETCHAR(cicflag, p); + if (cishort == IPCP_VJ_COMP) { + try_.old_vj = 0; + if (cimaxslotindex < go->maxslotindex) + try_.maxslotindex = cimaxslotindex; + if (!cicflag) + try_.cflag = 0; + } else { + try_.neg_vj = 0; + } + } else { + if (cishort == IPCP_VJ_COMP || cishort == IPCP_VJ_COMP_OLD) { + try_.old_vj = 1; + try_.vj_protocol = cishort; + } else { + try_.neg_vj = 0; + } + } + ); #endif /* VJ_SUPPORT */ NAKCIADDR(CI_ADDR, neg_addr, - if (treat_as_reject) { - try_.neg_addr = 0; - try_.old_addrs = 0; - } else if (go->accept_local && ciaddr1) { - /* take his idea of our address */ - try_.ouraddr = ciaddr1; - } - ); + if (treat_as_reject) { + try_.neg_addr = 0; + try_.old_addrs = 0; + } else if (go->accept_local && ciaddr1) { + /* take his idea of our address */ + try_.ouraddr = ciaddr1; + } + ); #if LWIP_DNS NAKCIDNS(CI_MS_DNS1, req_dns1, - if (treat_as_reject) { - try_.req_dns1 = 0; - } else { - try_.dnsaddr[0] = cidnsaddr; - } - ); + if (treat_as_reject) { + try_.req_dns1 = 0; + } else { + try_.dnsaddr[0] = cidnsaddr; + } + ); NAKCIDNS(CI_MS_DNS2, req_dns2, - if (treat_as_reject) { - try_.req_dns2 = 0; - } else { - try_.dnsaddr[1] = cidnsaddr; - } - ); + if (treat_as_reject) { + try_.req_dns2 = 0; + } else { + try_.dnsaddr[1] = cidnsaddr; + } + ); #endif /* #if LWIP_DNS */ /* @@ -1242,81 +1242,81 @@ static int ipcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { * peers get huffy if we don't. */ while (len >= CILEN_VOID) { - GETCHAR(citype, p); - GETCHAR(cilen, p); - if ( cilen < CILEN_VOID || (len -= cilen) < 0 ) - goto bad; - next = p + cilen - 2; + GETCHAR(citype, p); + GETCHAR(cilen, p); + if ( cilen < CILEN_VOID || (len -= cilen) < 0 ) + goto bad; + next = p + cilen - 2; - switch (citype) { + switch (citype) { #if VJ_SUPPORT - case CI_COMPRESSTYPE: - if (go->neg_vj || no.neg_vj || - (cilen != CILEN_VJ && cilen != CILEN_COMPRESS)) - goto bad; - no.neg_vj = 1; - break; + case CI_COMPRESSTYPE: + if (go->neg_vj || no.neg_vj || + (cilen != CILEN_VJ && cilen != CILEN_COMPRESS)) + goto bad; + no.neg_vj = 1; + break; #endif /* VJ_SUPPORT */ - case CI_ADDRS: - if ((!go->neg_addr && go->old_addrs) || no.old_addrs - || cilen != CILEN_ADDRS) - goto bad; - try_.neg_addr = 0; - GETLONG(l, p); - ciaddr1 = lwip_htonl(l); - if (ciaddr1 && go->accept_local) - try_.ouraddr = ciaddr1; - GETLONG(l, p); - ciaddr2 = lwip_htonl(l); - if (ciaddr2 && go->accept_remote) - try_.hisaddr = ciaddr2; - no.old_addrs = 1; - break; - case CI_ADDR: - if (go->neg_addr || no.neg_addr || cilen != CILEN_ADDR) - goto bad; - try_.old_addrs = 0; - GETLONG(l, p); - ciaddr1 = lwip_htonl(l); - if (ciaddr1 && go->accept_local) - try_.ouraddr = ciaddr1; - if (try_.ouraddr != 0) - try_.neg_addr = 1; - no.neg_addr = 1; - break; + case CI_ADDRS: + if ((!go->neg_addr && go->old_addrs) || no.old_addrs + || cilen != CILEN_ADDRS) + goto bad; + try_.neg_addr = 0; + GETLONG(l, p); + ciaddr1 = lwip_htonl(l); + if (ciaddr1 && go->accept_local) + try_.ouraddr = ciaddr1; + GETLONG(l, p); + ciaddr2 = lwip_htonl(l); + if (ciaddr2 && go->accept_remote) + try_.hisaddr = ciaddr2; + no.old_addrs = 1; + break; + case CI_ADDR: + if (go->neg_addr || no.neg_addr || cilen != CILEN_ADDR) + goto bad; + try_.old_addrs = 0; + GETLONG(l, p); + ciaddr1 = lwip_htonl(l); + if (ciaddr1 && go->accept_local) + try_.ouraddr = ciaddr1; + if (try_.ouraddr != 0) + try_.neg_addr = 1; + no.neg_addr = 1; + break; #if LWIP_DNS - case CI_MS_DNS1: - if (go->req_dns1 || no.req_dns1 || cilen != CILEN_ADDR) - goto bad; - GETLONG(l, p); - try_.dnsaddr[0] = lwip_htonl(l); - try_.req_dns1 = 1; - no.req_dns1 = 1; - break; - case CI_MS_DNS2: - if (go->req_dns2 || no.req_dns2 || cilen != CILEN_ADDR) - goto bad; - GETLONG(l, p); - try_.dnsaddr[1] = lwip_htonl(l); - try_.req_dns2 = 1; - no.req_dns2 = 1; - break; + case CI_MS_DNS1: + if (go->req_dns1 || no.req_dns1 || cilen != CILEN_ADDR) + goto bad; + GETLONG(l, p); + try_.dnsaddr[0] = lwip_htonl(l); + try_.req_dns1 = 1; + no.req_dns1 = 1; + break; + case CI_MS_DNS2: + if (go->req_dns2 || no.req_dns2 || cilen != CILEN_ADDR) + goto bad; + GETLONG(l, p); + try_.dnsaddr[1] = lwip_htonl(l); + try_.req_dns2 = 1; + no.req_dns2 = 1; + break; #endif /* LWIP_DNS */ #if 0 /* UNUSED - WINS */ - case CI_MS_WINS1: - case CI_MS_WINS2: - if (cilen != CILEN_ADDR) - goto bad; - GETLONG(l, p); - ciaddr1 = lwip_htonl(l); - if (ciaddr1) - try_.winsaddr[citype == CI_MS_WINS2] = ciaddr1; - break; + case CI_MS_WINS1: + case CI_MS_WINS2: + if (cilen != CILEN_ADDR) + goto bad; + GETLONG(l, p); + ciaddr1 = lwip_htonl(l); + if (ciaddr1) + try_.winsaddr[citype == CI_MS_WINS2] = ciaddr1; + break; #endif /* UNUSED - WINS */ - default: - break; - } - p = next; + default: + break; + } + p = next; } /* @@ -1324,7 +1324,7 @@ static int ipcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { * If there are any remaining options, we ignore them. */ if (f->state != PPP_FSM_OPENED) - *go = try_; + *go = try_; return 1; @@ -1347,7 +1347,7 @@ static int ipcp_rejci(fsm *f, u_char *p, int len) { u_short cishort; #endif /* VJ_SUPPORT */ u32_t cilong; - ipcp_options try_; /* options to request next time */ + ipcp_options try_; /* options to request next time */ try_ = *go; /* @@ -1357,107 +1357,107 @@ static int ipcp_rejci(fsm *f, u_char *p, int len) { */ #define REJCIADDRS(opt, neg, val1, val2) \ if ((neg) && \ - (cilen = p[1]) == CILEN_ADDRS && \ - len >= cilen && \ - p[0] == opt) { \ - u32_t l; \ - len -= cilen; \ - INCPTR(2, p); \ - GETLONG(l, p); \ - cilong = lwip_htonl(l); \ - /* Check rejected value. */ \ - if (cilong != val1) \ - goto bad; \ - GETLONG(l, p); \ - cilong = lwip_htonl(l); \ - /* Check rejected value. */ \ - if (cilong != val2) \ - goto bad; \ - try_.old_addrs = 0; \ + (cilen = p[1]) == CILEN_ADDRS && \ + len >= cilen && \ + p[0] == opt) { \ + u32_t l; \ + len -= cilen; \ + INCPTR(2, p); \ + GETLONG(l, p); \ + cilong = lwip_htonl(l); \ + /* Check rejected value. */ \ + if (cilong != val1) \ + goto bad; \ + GETLONG(l, p); \ + cilong = lwip_htonl(l); \ + /* Check rejected value. */ \ + if (cilong != val2) \ + goto bad; \ + try_.old_addrs = 0; \ } #if VJ_SUPPORT #define REJCIVJ(opt, neg, val, old, maxslot, cflag) \ if (go->neg && \ - p[1] == (old? CILEN_COMPRESS : CILEN_VJ) && \ - len >= p[1] && \ - p[0] == opt) { \ - len -= p[1]; \ - INCPTR(2, p); \ - GETSHORT(cishort, p); \ - /* Check rejected value. */ \ - if (cishort != val) \ - goto bad; \ - if (!old) { \ - GETCHAR(cimaxslotindex, p); \ - if (cimaxslotindex != maxslot) \ - goto bad; \ - GETCHAR(ciflag, p); \ - if (ciflag != cflag) \ - goto bad; \ + p[1] == (old? CILEN_COMPRESS : CILEN_VJ) && \ + len >= p[1] && \ + p[0] == opt) { \ + len -= p[1]; \ + INCPTR(2, p); \ + GETSHORT(cishort, p); \ + /* Check rejected value. */ \ + if (cishort != val) \ + goto bad; \ + if (!old) { \ + GETCHAR(cimaxslotindex, p); \ + if (cimaxslotindex != maxslot) \ + goto bad; \ + GETCHAR(ciflag, p); \ + if (ciflag != cflag) \ + goto bad; \ } \ - try_.neg = 0; \ + try_.neg = 0; \ } #endif /* VJ_SUPPORT */ #define REJCIADDR(opt, neg, val) \ if (go->neg && \ - (cilen = p[1]) == CILEN_ADDR && \ - len >= cilen && \ - p[0] == opt) { \ - u32_t l; \ - len -= cilen; \ - INCPTR(2, p); \ - GETLONG(l, p); \ - cilong = lwip_htonl(l); \ - /* Check rejected value. */ \ - if (cilong != val) \ - goto bad; \ - try_.neg = 0; \ + (cilen = p[1]) == CILEN_ADDR && \ + len >= cilen && \ + p[0] == opt) { \ + u32_t l; \ + len -= cilen; \ + INCPTR(2, p); \ + GETLONG(l, p); \ + cilong = lwip_htonl(l); \ + /* Check rejected value. */ \ + if (cilong != val) \ + goto bad; \ + try_.neg = 0; \ } #if LWIP_DNS #define REJCIDNS(opt, neg, dnsaddr) \ if (go->neg && \ - ((cilen = p[1]) == CILEN_ADDR) && \ - len >= cilen && \ - p[0] == opt) { \ - u32_t l; \ - len -= cilen; \ - INCPTR(2, p); \ - GETLONG(l, p); \ - cilong = lwip_htonl(l); \ - /* Check rejected value. */ \ - if (cilong != dnsaddr) \ - goto bad; \ - try_.neg = 0; \ + ((cilen = p[1]) == CILEN_ADDR) && \ + len >= cilen && \ + p[0] == opt) { \ + u32_t l; \ + len -= cilen; \ + INCPTR(2, p); \ + GETLONG(l, p); \ + cilong = lwip_htonl(l); \ + /* Check rejected value. */ \ + if (cilong != dnsaddr) \ + goto bad; \ + try_.neg = 0; \ } #endif /* LWIP_DNS */ #if 0 /* UNUSED - WINS */ #define REJCIWINS(opt, addr) \ if (addr && \ - ((cilen = p[1]) == CILEN_ADDR) && \ - len >= cilen && \ - p[0] == opt) { \ - u32_t l; \ - len -= cilen; \ - INCPTR(2, p); \ - GETLONG(l, p); \ - cilong = lwip_htonl(l); \ - /* Check rejected value. */ \ - if (cilong != addr) \ - goto bad; \ - try_.winsaddr[opt == CI_MS_WINS2] = 0; \ + ((cilen = p[1]) == CILEN_ADDR) && \ + len >= cilen && \ + p[0] == opt) { \ + u32_t l; \ + len -= cilen; \ + INCPTR(2, p); \ + GETLONG(l, p); \ + cilong = lwip_htonl(l); \ + /* Check rejected value. */ \ + if (cilong != addr) \ + goto bad; \ + try_.winsaddr[opt == CI_MS_WINS2] = 0; \ } #endif /* UNUSED - WINS */ REJCIADDRS(CI_ADDRS, !go->neg_addr && go->old_addrs, - go->ouraddr, go->hisaddr); + go->ouraddr, go->hisaddr); #if VJ_SUPPORT REJCIVJ(CI_COMPRESSTYPE, neg_vj, go->vj_protocol, go->old_vj, - go->maxslotindex, go->cflag); + go->maxslotindex, go->cflag); #endif /* VJ_SUPPORT */ REJCIADDR(CI_ADDR, neg_addr, go->ouraddr); @@ -1478,12 +1478,12 @@ static int ipcp_rejci(fsm *f, u_char *p, int len) { * If there are any remaining CIs, then this packet is bad. */ if (len != 0) - goto bad; + goto bad; /* * Now we can update state. */ if (f->state != PPP_FSM_OPENED) - *go = try_; + *go = try_; return 1; bad: @@ -1508,17 +1508,17 @@ static int ipcp_reqci(fsm *f, u_char *inp, int *len, int reject_if_disagree) { ipcp_options *wo = &pcb->ipcp_wantoptions; ipcp_options *ho = &pcb->ipcp_hisoptions; ipcp_options *ao = &pcb->ipcp_allowoptions; - u_char *cip, *next; /* Pointer to current and next CIs */ - u_short cilen, citype; /* Parsed len, type */ + u_char *cip, *next; /* Pointer to current and next CIs */ + u_short cilen, citype; /* Parsed len, type */ #if VJ_SUPPORT - u_short cishort; /* Parsed short value */ + u_short cishort; /* Parsed short value */ #endif /* VJ_SUPPORT */ u32_t tl, ciaddr1, ciaddr2;/* Parsed address values */ - int rc = CONFACK; /* Final packet return code */ - int orc; /* Individual option return code */ - u_char *p; /* Pointer to next char to parse */ - u_char *ucp = inp; /* Pointer to current output char */ - int l = *len; /* Length left */ + int rc = CONFACK; /* Final packet return code */ + int orc; /* Individual option return code */ + u_char *p; /* Pointer to next char to parse */ + u_char *ucp = inp; /* Pointer to current output char */ + int l = *len; /* Length left */ #if VJ_SUPPORT u_char maxslotindex, cflag; #endif /* VJ_SUPPORT */ @@ -1536,237 +1536,237 @@ static int ipcp_reqci(fsm *f, u_char *inp, int *len, int reject_if_disagree) { */ next = inp; while (l) { - orc = CONFACK; /* Assume success */ - cip = p = next; /* Remember begining of CI */ - if (l < 2 || /* Not enough data for CI header or */ - p[1] < 2 || /* CI length too small or */ - p[1] > l) { /* CI length too big? */ - IPCPDEBUG(("ipcp_reqci: bad CI length!")); - orc = CONFREJ; /* Reject bad CI */ - cilen = l; /* Reject till end of packet */ - l = 0; /* Don't loop again */ - goto endswitch; - } - GETCHAR(citype, p); /* Parse CI type */ - GETCHAR(cilen, p); /* Parse CI length */ - l -= cilen; /* Adjust remaining length */ - next += cilen; /* Step to next CI */ + orc = CONFACK; /* Assume success */ + cip = p = next; /* Remember begining of CI */ + if (l < 2 || /* Not enough data for CI header or */ + p[1] < 2 || /* CI length too small or */ + p[1] > l) { /* CI length too big? */ + IPCPDEBUG(("ipcp_reqci: bad CI length!")); + orc = CONFREJ; /* Reject bad CI */ + cilen = l; /* Reject till end of packet */ + l = 0; /* Don't loop again */ + goto endswitch; + } + GETCHAR(citype, p); /* Parse CI type */ + GETCHAR(cilen, p); /* Parse CI length */ + l -= cilen; /* Adjust remaining length */ + next += cilen; /* Step to next CI */ - switch (citype) { /* Check CI type */ - case CI_ADDRS: - if (!ao->old_addrs || ho->neg_addr || - cilen != CILEN_ADDRS) { /* Check CI length */ - orc = CONFREJ; /* Reject CI */ - break; - } + switch (citype) { /* Check CI type */ + case CI_ADDRS: + if (!ao->old_addrs || ho->neg_addr || + cilen != CILEN_ADDRS) { /* Check CI length */ + orc = CONFREJ; /* Reject CI */ + break; + } - /* - * If he has no address, or if we both have his address but - * disagree about it, then NAK it with our idea. - * In particular, if we don't know his address, but he does, - * then accept it. - */ - GETLONG(tl, p); /* Parse source address (his) */ - ciaddr1 = lwip_htonl(tl); - if (ciaddr1 != wo->hisaddr - && (ciaddr1 == 0 || !wo->accept_remote)) { - orc = CONFNAK; - if (!reject_if_disagree) { - DECPTR(sizeof(u32_t), p); - tl = lwip_ntohl(wo->hisaddr); - PUTLONG(tl, p); - } - } else if (ciaddr1 == 0 && wo->hisaddr == 0) { - /* - * If neither we nor he knows his address, reject the option. - */ - orc = CONFREJ; - wo->req_addr = 0; /* don't NAK with 0.0.0.0 later */ - break; - } + /* + * If he has no address, or if we both have his address but + * disagree about it, then NAK it with our idea. + * In particular, if we don't know his address, but he does, + * then accept it. + */ + GETLONG(tl, p); /* Parse source address (his) */ + ciaddr1 = lwip_htonl(tl); + if (ciaddr1 != wo->hisaddr + && (ciaddr1 == 0 || !wo->accept_remote)) { + orc = CONFNAK; + if (!reject_if_disagree) { + DECPTR(sizeof(u32_t), p); + tl = lwip_ntohl(wo->hisaddr); + PUTLONG(tl, p); + } + } else if (ciaddr1 == 0 && wo->hisaddr == 0) { + /* + * If neither we nor he knows his address, reject the option. + */ + orc = CONFREJ; + wo->req_addr = 0; /* don't NAK with 0.0.0.0 later */ + break; + } - /* - * If he doesn't know our address, or if we both have our address - * but disagree about it, then NAK it with our idea. - */ - GETLONG(tl, p); /* Parse desination address (ours) */ - ciaddr2 = lwip_htonl(tl); - if (ciaddr2 != wo->ouraddr) { - if (ciaddr2 == 0 || !wo->accept_local) { - orc = CONFNAK; - if (!reject_if_disagree) { - DECPTR(sizeof(u32_t), p); - tl = lwip_ntohl(wo->ouraddr); - PUTLONG(tl, p); - } - } else { - wo->ouraddr = ciaddr2; /* accept peer's idea */ - } - } + /* + * If he doesn't know our address, or if we both have our address + * but disagree about it, then NAK it with our idea. + */ + GETLONG(tl, p); /* Parse desination address (ours) */ + ciaddr2 = lwip_htonl(tl); + if (ciaddr2 != wo->ouraddr) { + if (ciaddr2 == 0 || !wo->accept_local) { + orc = CONFNAK; + if (!reject_if_disagree) { + DECPTR(sizeof(u32_t), p); + tl = lwip_ntohl(wo->ouraddr); + PUTLONG(tl, p); + } + } else { + wo->ouraddr = ciaddr2; /* accept peer's idea */ + } + } - ho->old_addrs = 1; - ho->hisaddr = ciaddr1; - ho->ouraddr = ciaddr2; - break; + ho->old_addrs = 1; + ho->hisaddr = ciaddr1; + ho->ouraddr = ciaddr2; + break; - case CI_ADDR: - if (!ao->neg_addr || ho->old_addrs || - cilen != CILEN_ADDR) { /* Check CI length */ - orc = CONFREJ; /* Reject CI */ - break; - } + case CI_ADDR: + if (!ao->neg_addr || ho->old_addrs || + cilen != CILEN_ADDR) { /* Check CI length */ + orc = CONFREJ; /* Reject CI */ + break; + } - /* - * If he has no address, or if we both have his address but - * disagree about it, then NAK it with our idea. - * In particular, if we don't know his address, but he does, - * then accept it. - */ - GETLONG(tl, p); /* Parse source address (his) */ - ciaddr1 = lwip_htonl(tl); - if (ciaddr1 != wo->hisaddr - && (ciaddr1 == 0 || !wo->accept_remote)) { - orc = CONFNAK; - if (!reject_if_disagree) { - DECPTR(sizeof(u32_t), p); - tl = lwip_ntohl(wo->hisaddr); - PUTLONG(tl, p); - } - } else if (ciaddr1 == 0 && wo->hisaddr == 0) { - /* - * Don't ACK an address of 0.0.0.0 - reject it instead. - */ - orc = CONFREJ; - wo->req_addr = 0; /* don't NAK with 0.0.0.0 later */ - break; - } - - ho->neg_addr = 1; - ho->hisaddr = ciaddr1; - break; + /* + * If he has no address, or if we both have his address but + * disagree about it, then NAK it with our idea. + * In particular, if we don't know his address, but he does, + * then accept it. + */ + GETLONG(tl, p); /* Parse source address (his) */ + ciaddr1 = lwip_htonl(tl); + if (ciaddr1 != wo->hisaddr + && (ciaddr1 == 0 || !wo->accept_remote)) { + orc = CONFNAK; + if (!reject_if_disagree) { + DECPTR(sizeof(u32_t), p); + tl = lwip_ntohl(wo->hisaddr); + PUTLONG(tl, p); + } + } else if (ciaddr1 == 0 && wo->hisaddr == 0) { + /* + * Don't ACK an address of 0.0.0.0 - reject it instead. + */ + orc = CONFREJ; + wo->req_addr = 0; /* don't NAK with 0.0.0.0 later */ + break; + } + + ho->neg_addr = 1; + ho->hisaddr = ciaddr1; + break; #if LWIP_DNS - case CI_MS_DNS1: - case CI_MS_DNS2: - /* Microsoft primary or secondary DNS request */ - d = citype == CI_MS_DNS2; + case CI_MS_DNS1: + case CI_MS_DNS2: + /* Microsoft primary or secondary DNS request */ + d = citype == CI_MS_DNS2; - /* If we do not have a DNS address then we cannot send it */ - if (ao->dnsaddr[d] == 0 || - cilen != CILEN_ADDR) { /* Check CI length */ - orc = CONFREJ; /* Reject CI */ - break; - } - GETLONG(tl, p); - if (lwip_htonl(tl) != ao->dnsaddr[d]) { + /* If we do not have a DNS address then we cannot send it */ + if (ao->dnsaddr[d] == 0 || + cilen != CILEN_ADDR) { /* Check CI length */ + orc = CONFREJ; /* Reject CI */ + break; + } + GETLONG(tl, p); + if (lwip_htonl(tl) != ao->dnsaddr[d]) { DECPTR(sizeof(u32_t), p); - tl = lwip_ntohl(ao->dnsaddr[d]); - PUTLONG(tl, p); - orc = CONFNAK; + tl = lwip_ntohl(ao->dnsaddr[d]); + PUTLONG(tl, p); + orc = CONFNAK; } break; #endif /* LWIP_DNS */ #if 0 /* UNUSED - WINS */ - case CI_MS_WINS1: - case CI_MS_WINS2: - /* Microsoft primary or secondary WINS request */ - d = citype == CI_MS_WINS2; + case CI_MS_WINS1: + case CI_MS_WINS2: + /* Microsoft primary or secondary WINS request */ + d = citype == CI_MS_WINS2; - /* If we do not have a DNS address then we cannot send it */ - if (ao->winsaddr[d] == 0 || - cilen != CILEN_ADDR) { /* Check CI length */ - orc = CONFREJ; /* Reject CI */ - break; - } - GETLONG(tl, p); - if (lwip_htonl(tl) != ao->winsaddr[d]) { + /* If we do not have a DNS address then we cannot send it */ + if (ao->winsaddr[d] == 0 || + cilen != CILEN_ADDR) { /* Check CI length */ + orc = CONFREJ; /* Reject CI */ + break; + } + GETLONG(tl, p); + if (lwip_htonl(tl) != ao->winsaddr[d]) { DECPTR(sizeof(u32_t), p); - tl = lwip_ntohl(ao->winsaddr[d]); - PUTLONG(tl, p); - orc = CONFNAK; + tl = lwip_ntohl(ao->winsaddr[d]); + PUTLONG(tl, p); + orc = CONFNAK; } break; #endif /* UNUSED - WINS */ #if VJ_SUPPORT - case CI_COMPRESSTYPE: - if (!ao->neg_vj || - (cilen != CILEN_VJ && cilen != CILEN_COMPRESS)) { - orc = CONFREJ; - break; - } - GETSHORT(cishort, p); + case CI_COMPRESSTYPE: + if (!ao->neg_vj || + (cilen != CILEN_VJ && cilen != CILEN_COMPRESS)) { + orc = CONFREJ; + break; + } + GETSHORT(cishort, p); - if (!(cishort == IPCP_VJ_COMP || - (cishort == IPCP_VJ_COMP_OLD && cilen == CILEN_COMPRESS))) { - orc = CONFREJ; - break; - } + if (!(cishort == IPCP_VJ_COMP || + (cishort == IPCP_VJ_COMP_OLD && cilen == CILEN_COMPRESS))) { + orc = CONFREJ; + break; + } - ho->neg_vj = 1; - ho->vj_protocol = cishort; - if (cilen == CILEN_VJ) { - GETCHAR(maxslotindex, p); - if (maxslotindex > ao->maxslotindex) { - orc = CONFNAK; - if (!reject_if_disagree){ - DECPTR(1, p); - PUTCHAR(ao->maxslotindex, p); - } - } - GETCHAR(cflag, p); - if (cflag && !ao->cflag) { - orc = CONFNAK; - if (!reject_if_disagree){ - DECPTR(1, p); - PUTCHAR(wo->cflag, p); - } - } - ho->maxslotindex = maxslotindex; - ho->cflag = cflag; - } else { - ho->old_vj = 1; - ho->maxslotindex = MAX_STATES - 1; - ho->cflag = 1; - } - break; + ho->neg_vj = 1; + ho->vj_protocol = cishort; + if (cilen == CILEN_VJ) { + GETCHAR(maxslotindex, p); + if (maxslotindex > ao->maxslotindex) { + orc = CONFNAK; + if (!reject_if_disagree){ + DECPTR(1, p); + PUTCHAR(ao->maxslotindex, p); + } + } + GETCHAR(cflag, p); + if (cflag && !ao->cflag) { + orc = CONFNAK; + if (!reject_if_disagree){ + DECPTR(1, p); + PUTCHAR(wo->cflag, p); + } + } + ho->maxslotindex = maxslotindex; + ho->cflag = cflag; + } else { + ho->old_vj = 1; + ho->maxslotindex = MAX_STATES - 1; + ho->cflag = 1; + } + break; #endif /* VJ_SUPPORT */ - default: - orc = CONFREJ; - break; - } + default: + orc = CONFREJ; + break; + } endswitch: - if (orc == CONFACK && /* Good CI */ - rc != CONFACK) /* but prior CI wasnt? */ - continue; /* Don't send this one */ + if (orc == CONFACK && /* Good CI */ + rc != CONFACK) /* but prior CI wasnt? */ + continue; /* Don't send this one */ - if (orc == CONFNAK) { /* Nak this CI? */ - if (reject_if_disagree) /* Getting fed up with sending NAKs? */ - orc = CONFREJ; /* Get tough if so */ - else { - if (rc == CONFREJ) /* Rejecting prior CI? */ - continue; /* Don't send this one */ - if (rc == CONFACK) { /* Ack'd all prior CIs? */ - rc = CONFNAK; /* Not anymore... */ - ucp = inp; /* Backup */ - } - } - } + if (orc == CONFNAK) { /* Nak this CI? */ + if (reject_if_disagree) /* Getting fed up with sending NAKs? */ + orc = CONFREJ; /* Get tough if so */ + else { + if (rc == CONFREJ) /* Rejecting prior CI? */ + continue; /* Don't send this one */ + if (rc == CONFACK) { /* Ack'd all prior CIs? */ + rc = CONFNAK; /* Not anymore... */ + ucp = inp; /* Backup */ + } + } + } - if (orc == CONFREJ && /* Reject this CI */ - rc != CONFREJ) { /* but no prior ones? */ - rc = CONFREJ; - ucp = inp; /* Backup */ - } + if (orc == CONFREJ && /* Reject this CI */ + rc != CONFREJ) { /* but no prior ones? */ + rc = CONFREJ; + ucp = inp; /* Backup */ + } - /* Need to move CI? */ - if (ucp != cip) - MEMCPY(ucp, cip, cilen); /* Move it */ + /* Need to move CI? */ + if (ucp != cip) + MEMCPY(ucp, cip, cilen); /* Move it */ - /* Update output pointer */ - INCPTR(cilen, ucp); + /* Update output pointer */ + INCPTR(cilen, ucp); } /* @@ -1777,21 +1777,21 @@ endswitch: * option safely. */ if (rc != CONFREJ && !ho->neg_addr && !ho->old_addrs && - wo->req_addr && !reject_if_disagree && !pcb->settings.noremoteip) { - if (rc == CONFACK) { - rc = CONFNAK; - ucp = inp; /* reset pointer */ - wo->req_addr = 0; /* don't ask again */ - } - PUTCHAR(CI_ADDR, ucp); - PUTCHAR(CILEN_ADDR, ucp); - tl = lwip_ntohl(wo->hisaddr); - PUTLONG(tl, ucp); + wo->req_addr && !reject_if_disagree && !pcb->settings.noremoteip) { + if (rc == CONFACK) { + rc = CONFNAK; + ucp = inp; /* reset pointer */ + wo->req_addr = 0; /* don't ask again */ + } + PUTCHAR(CI_ADDR, ucp); + PUTCHAR(CILEN_ADDR, ucp); + tl = lwip_ntohl(wo->hisaddr); + PUTLONG(tl, ucp); } - *len = ucp - inp; /* Compute output length */ + *len = ucp - inp; /* Compute output length */ IPCPDEBUG(("ipcp: returning Configure-%s", CODENAME(rc))); - return (rc); /* Return final code */ + return (rc); /* Return final code */ } @@ -1812,17 +1812,17 @@ ip_check_options() * If local IP address already given, don't bother. */ if (wo->ouraddr == 0 && !disable_defaultip) { - /* - * Look up our hostname (possibly with domain name appended) - * and take the first IP address as our local IP address. - * If there isn't an IP address for our hostname, too bad. - */ - wo->accept_local = 1; /* don't insist on this default value */ - if ((hp = gethostbyname(hostname)) != NULL) { - local = *(u32_t *)hp->h_addr; - if (local != 0 && !bad_ip_adrs(local)) - wo->ouraddr = local; - } + /* + * Look up our hostname (possibly with domain name appended) + * and take the first IP address as our local IP address. + * If there isn't an IP address for our hostname, too bad. + */ + wo->accept_local = 1; /* don't insist on this default value */ + if ((hp = gethostbyname(hostname)) != NULL) { + local = *(u32_t *)hp->h_addr; + if (local != 0 && !bad_ip_adrs(local)) + wo->ouraddr = local; + } } ask_for_local = wo->ouraddr != 0 || !disable_defaultip; } @@ -1841,37 +1841,37 @@ ip_demand_conf(u) ipcp_options *wo = &ipcp_wantoptions[u]; if (wo->hisaddr == 0 && !pcb->settings.noremoteip) { - /* make up an arbitrary address for the peer */ - wo->hisaddr = lwip_htonl(0x0a707070 + ifunit); - wo->accept_remote = 1; + /* make up an arbitrary address for the peer */ + wo->hisaddr = lwip_htonl(0x0a707070 + ifunit); + wo->accept_remote = 1; } if (wo->ouraddr == 0) { - /* make up an arbitrary address for us */ - wo->ouraddr = lwip_htonl(0x0a404040 + ifunit); - wo->accept_local = 1; - ask_for_local = 0; /* don't tell the peer this address */ + /* make up an arbitrary address for us */ + wo->ouraddr = lwip_htonl(0x0a404040 + ifunit); + wo->accept_local = 1; + ask_for_local = 0; /* don't tell the peer this address */ } if (!sifaddr(pcb, wo->ouraddr, wo->hisaddr, get_mask(wo->ouraddr))) - return 0; + return 0; if (!sifup(pcb)) - return 0; + return 0; if (!sifnpmode(pcb, PPP_IP, NPMODE_QUEUE)) - return 0; + return 0; #if 0 /* UNUSED */ if (wo->default_route) - if (sifdefaultroute(pcb, wo->ouraddr, wo->hisaddr, - wo->replace_default_route)) - default_route_set[u] = 1; + if (sifdefaultroute(pcb, wo->ouraddr, wo->hisaddr, + wo->replace_default_route)) + default_route_set[u] = 1; #endif /* UNUSED */ #if 0 /* UNUSED - PROXY ARP */ if (wo->proxy_arp) - if (sifproxyarp(pcb, wo->hisaddr)) - proxy_arp_set[u] = 1; + if (sifproxyarp(pcb, wo->hisaddr)) + proxy_arp_set[u] = 1; #endif /* UNUSED - PROXY ARP */ ppp_notice("local IP address %I", wo->ouraddr); if (wo->hisaddr) - ppp_notice("remote IP address %I", wo->hisaddr); + ppp_notice("remote IP address %I", wo->hisaddr); return 1; } @@ -1895,46 +1895,46 @@ static void ipcp_up(fsm *f) { * We must have a non-zero IP address for both ends of the link. */ if (!ho->neg_addr && !ho->old_addrs) - ho->hisaddr = wo->hisaddr; + ho->hisaddr = wo->hisaddr; if (!(go->neg_addr || go->old_addrs) && (wo->neg_addr || wo->old_addrs) - && wo->ouraddr != 0) { - ppp_error("Peer refused to agree to our IP address"); - ipcp_close(f->pcb, "Refused our IP address"); - return; + && wo->ouraddr != 0) { + ppp_error("Peer refused to agree to our IP address"); + ipcp_close(f->pcb, "Refused our IP address"); + return; } if (go->ouraddr == 0) { - ppp_error("Could not determine local IP address"); - ipcp_close(f->pcb, "Could not determine local IP address"); - return; + ppp_error("Could not determine local IP address"); + ipcp_close(f->pcb, "Could not determine local IP address"); + return; } if (ho->hisaddr == 0 && !pcb->settings.noremoteip) { - ho->hisaddr = lwip_htonl(0x0a404040); - ppp_warn("Could not determine remote IP address: defaulting to %I", - ho->hisaddr); + ho->hisaddr = lwip_htonl(0x0a404040); + ppp_warn("Could not determine remote IP address: defaulting to %I", + ho->hisaddr); } #if 0 /* UNUSED */ script_setenv("IPLOCAL", ip_ntoa(go->ouraddr), 0); if (ho->hisaddr != 0) - script_setenv("IPREMOTE", ip_ntoa(ho->hisaddr), 1); + script_setenv("IPREMOTE", ip_ntoa(ho->hisaddr), 1); #endif /* UNUSED */ #if LWIP_DNS if (!go->req_dns1) - go->dnsaddr[0] = 0; + go->dnsaddr[0] = 0; if (!go->req_dns2) - go->dnsaddr[1] = 0; + go->dnsaddr[1] = 0; #if 0 /* UNUSED */ if (go->dnsaddr[0]) - script_setenv("DNS1", ip_ntoa(go->dnsaddr[0]), 0); + script_setenv("DNS1", ip_ntoa(go->dnsaddr[0]), 0); if (go->dnsaddr[1]) - script_setenv("DNS2", ip_ntoa(go->dnsaddr[1]), 0); + script_setenv("DNS2", ip_ntoa(go->dnsaddr[1]), 0); #endif /* UNUSED */ if (pcb->settings.usepeerdns && (go->dnsaddr[0] || go->dnsaddr[1])) { - sdns(pcb, go->dnsaddr[0], go->dnsaddr[1]); + sdns(pcb, go->dnsaddr[0], go->dnsaddr[1]); #if 0 /* UNUSED */ - script_setenv("USEPEERDNS", "1", 0); - create_resolv(go->dnsaddr[0], go->dnsaddr[1]); + script_setenv("USEPEERDNS", "1", 0); + create_resolv(go->dnsaddr[0], go->dnsaddr[1]); #endif /* UNUSED */ } #endif /* LWIP_DNS */ @@ -1943,29 +1943,29 @@ static void ipcp_up(fsm *f) { * Check that the peer is allowed to use the IP address it wants. */ if (ho->hisaddr != 0) { - u32_t addr = lwip_ntohl(ho->hisaddr); - if ((addr >> IP_CLASSA_NSHIFT) == IP_LOOPBACKNET - || IP_MULTICAST(addr) || IP_BADCLASS(addr) - /* - * For now, consider that PPP in server mode with peer required - * to authenticate must provide the peer IP address, reject any - * IP address wanted by peer different than the one we wanted. - */ + u32_t addr = lwip_ntohl(ho->hisaddr); + if ((addr >> IP_CLASSA_NSHIFT) == IP_LOOPBACKNET + || IP_MULTICAST(addr) || IP_BADCLASS(addr) + /* + * For now, consider that PPP in server mode with peer required + * to authenticate must provide the peer IP address, reject any + * IP address wanted by peer different than the one we wanted. + */ #if PPP_SERVER && PPP_AUTH_SUPPORT - || (pcb->settings.auth_required && wo->hisaddr != ho->hisaddr) + || (pcb->settings.auth_required && wo->hisaddr != ho->hisaddr) #endif /* PPP_SERVER && PPP_AUTH_SUPPORT */ - ) { - ppp_error("Peer is not authorized to use remote address %I", ho->hisaddr); - ipcp_close(pcb, "Unauthorized remote IP address"); - return; - } + ) { + ppp_error("Peer is not authorized to use remote address %I", ho->hisaddr); + ipcp_close(pcb, "Unauthorized remote IP address"); + return; + } } #if 0 /* Unused */ /* Upstream checking code */ if (ho->hisaddr != 0 && !auth_ip_addr(f->unit, ho->hisaddr)) { - ppp_error("Peer is not authorized to use remote address %I", ho->hisaddr); - ipcp_close(f->unit, "Unauthorized remote IP address"); - return; + ppp_error("Peer is not authorized to use remote address %I", ho->hisaddr); + ipcp_close(f->unit, "Unauthorized remote IP address"); + return; } #endif /* Unused */ @@ -1981,114 +1981,114 @@ static void ipcp_up(fsm *f) { * interface to pass IP packets. */ if (demand) { - if (go->ouraddr != wo->ouraddr || ho->hisaddr != wo->hisaddr) { - ipcp_clear_addrs(f->unit, wo->ouraddr, wo->hisaddr, - wo->replace_default_route); - if (go->ouraddr != wo->ouraddr) { - ppp_warn("Local IP address changed to %I", go->ouraddr); - script_setenv("OLDIPLOCAL", ip_ntoa(wo->ouraddr), 0); - wo->ouraddr = go->ouraddr; - } else - script_unsetenv("OLDIPLOCAL"); - if (ho->hisaddr != wo->hisaddr && wo->hisaddr != 0) { - ppp_warn("Remote IP address changed to %I", ho->hisaddr); - script_setenv("OLDIPREMOTE", ip_ntoa(wo->hisaddr), 0); - wo->hisaddr = ho->hisaddr; - } else - script_unsetenv("OLDIPREMOTE"); + if (go->ouraddr != wo->ouraddr || ho->hisaddr != wo->hisaddr) { + ipcp_clear_addrs(f->unit, wo->ouraddr, wo->hisaddr, + wo->replace_default_route); + if (go->ouraddr != wo->ouraddr) { + ppp_warn("Local IP address changed to %I", go->ouraddr); + script_setenv("OLDIPLOCAL", ip_ntoa(wo->ouraddr), 0); + wo->ouraddr = go->ouraddr; + } else + script_unsetenv("OLDIPLOCAL"); + if (ho->hisaddr != wo->hisaddr && wo->hisaddr != 0) { + ppp_warn("Remote IP address changed to %I", ho->hisaddr); + script_setenv("OLDIPREMOTE", ip_ntoa(wo->hisaddr), 0); + wo->hisaddr = ho->hisaddr; + } else + script_unsetenv("OLDIPREMOTE"); - /* Set the interface to the new addresses */ - mask = get_mask(go->ouraddr); - if (!sifaddr(pcb, go->ouraddr, ho->hisaddr, mask)) { + /* Set the interface to the new addresses */ + mask = get_mask(go->ouraddr); + if (!sifaddr(pcb, go->ouraddr, ho->hisaddr, mask)) { #if PPP_DEBUG - ppp_warn("Interface configuration failed"); + ppp_warn("Interface configuration failed"); #endif /* PPP_DEBUG */ - ipcp_close(f->unit, "Interface configuration failed"); - return; - } + ipcp_close(f->unit, "Interface configuration failed"); + return; + } - /* assign a default route through the interface if required */ - if (ipcp_wantoptions[f->unit].default_route) - if (sifdefaultroute(pcb, go->ouraddr, ho->hisaddr, - wo->replace_default_route)) - default_route_set[f->unit] = 1; + /* assign a default route through the interface if required */ + if (ipcp_wantoptions[f->unit].default_route) + if (sifdefaultroute(pcb, go->ouraddr, ho->hisaddr, + wo->replace_default_route)) + default_route_set[f->unit] = 1; #if 0 /* UNUSED - PROXY ARP */ - /* Make a proxy ARP entry if requested. */ - if (ho->hisaddr != 0 && ipcp_wantoptions[f->unit].proxy_arp) - if (sifproxyarp(pcb, ho->hisaddr)) - proxy_arp_set[f->unit] = 1; + /* Make a proxy ARP entry if requested. */ + if (ho->hisaddr != 0 && ipcp_wantoptions[f->unit].proxy_arp) + if (sifproxyarp(pcb, ho->hisaddr)) + proxy_arp_set[f->unit] = 1; #endif /* UNUSED - PROXY ARP */ - } - demand_rexmit(PPP_IP,go->ouraddr); - sifnpmode(pcb, PPP_IP, NPMODE_PASS); + } + demand_rexmit(PPP_IP,go->ouraddr); + sifnpmode(pcb, PPP_IP, NPMODE_PASS); } else #endif /* DEMAND_SUPPORT */ { - /* - * Set IP addresses and (if specified) netmask. - */ - mask = get_mask(go->ouraddr); + /* + * Set IP addresses and (if specified) netmask. + */ + mask = get_mask(go->ouraddr); #if !(defined(SVR4) && (defined(SNI) || defined(__USLC__))) - if (!sifaddr(pcb, go->ouraddr, ho->hisaddr, mask)) { + if (!sifaddr(pcb, go->ouraddr, ho->hisaddr, mask)) { #if PPP_DEBUG - ppp_warn("Interface configuration failed"); + ppp_warn("Interface configuration failed"); #endif /* PPP_DEBUG */ - ipcp_close(f->pcb, "Interface configuration failed"); - return; - } + ipcp_close(f->pcb, "Interface configuration failed"); + return; + } #endif - /* bring the interface up for IP */ - if (!sifup(pcb)) { + /* bring the interface up for IP */ + if (!sifup(pcb)) { #if PPP_DEBUG - ppp_warn("Interface failed to come up"); + ppp_warn("Interface failed to come up"); #endif /* PPP_DEBUG */ - ipcp_close(f->pcb, "Interface configuration failed"); - return; - } + ipcp_close(f->pcb, "Interface configuration failed"); + return; + } #if (defined(SVR4) && (defined(SNI) || defined(__USLC__))) - if (!sifaddr(pcb, go->ouraddr, ho->hisaddr, mask)) { + if (!sifaddr(pcb, go->ouraddr, ho->hisaddr, mask)) { #if PPP_DEBUG - ppp_warn("Interface configuration failed"); + ppp_warn("Interface configuration failed"); #endif /* PPP_DEBUG */ - ipcp_close(f->unit, "Interface configuration failed"); - return; - } + ipcp_close(f->unit, "Interface configuration failed"); + return; + } #endif #if DEMAND_SUPPORT - sifnpmode(pcb, PPP_IP, NPMODE_PASS); + sifnpmode(pcb, PPP_IP, NPMODE_PASS); #endif /* DEMAND_SUPPORT */ #if 0 /* UNUSED */ - /* assign a default route through the interface if required */ - if (wo->default_route) - if (sifdefaultroute(pcb, go->ouraddr, ho->hisaddr, - wo->replace_default_route)) - pcb->default_route_set = 1; + /* assign a default route through the interface if required */ + if (wo->default_route) + if (sifdefaultroute(pcb, go->ouraddr, ho->hisaddr, + wo->replace_default_route)) + pcb->default_route_set = 1; #endif /* UNUSED */ #if 0 /* UNUSED - PROXY ARP */ - /* Make a proxy ARP entry if requested. */ - if (ho->hisaddr != 0 && wo->proxy_arp) - if (sifproxyarp(pcb, ho->hisaddr)) - pcb->proxy_arp_set = 1; + /* Make a proxy ARP entry if requested. */ + if (ho->hisaddr != 0 && wo->proxy_arp) + if (sifproxyarp(pcb, ho->hisaddr)) + pcb->proxy_arp_set = 1; #endif /* UNUSED - PROXY ARP */ - wo->ouraddr = go->ouraddr; + wo->ouraddr = go->ouraddr; - ppp_notice("local IP address %I", go->ouraddr); - if (ho->hisaddr != 0) - ppp_notice("remote IP address %I", ho->hisaddr); + ppp_notice("local IP address %I", go->ouraddr); + if (ho->hisaddr != 0) + ppp_notice("remote IP address %I", ho->hisaddr); #if LWIP_DNS - if (go->dnsaddr[0]) - ppp_notice("primary DNS address %I", go->dnsaddr[0]); - if (go->dnsaddr[1]) - ppp_notice("secondary DNS address %I", go->dnsaddr[1]); + if (go->dnsaddr[0]) + ppp_notice("primary DNS address %I", go->dnsaddr[0]); + if (go->dnsaddr[1]) + ppp_notice("secondary DNS address %I", go->dnsaddr[1]); #endif /* LWIP_DNS */ } @@ -2104,7 +2104,7 @@ static void ipcp_up(fsm *f) { #endif /* PPP_NOTIFY */ #if 0 /* UNUSED */ if (ip_up_hook) - ip_up_hook(); + ip_up_hook(); #endif /* UNUSED */ } @@ -2133,11 +2133,11 @@ static void ipcp_down(fsm *f) { #endif /* PPP_NOTIFY */ #if 0 /* UNUSED */ if (ip_down_hook) - ip_down_hook(); + ip_down_hook(); #endif /* UNUSED */ if (pcb->ipcp_is_up) { - pcb->ipcp_is_up = 0; - np_down(pcb, PPP_IP); + pcb->ipcp_is_up = 0; + np_down(pcb, PPP_IP); } #if VJ_SUPPORT sifvjcomp(pcb, 0, 0, 0); @@ -2145,8 +2145,8 @@ static void ipcp_down(fsm *f) { #if PPP_STATS_SUPPORT print_link_stats(); /* _after_ running the notifiers and ip_down_hook(), - * because print_link_stats() sets link_stats_valid - * to 0 (zero) */ + * because print_link_stats() sets link_stats_valid + * to 0 (zero) */ #endif /* PPP_STATS_SUPPORT */ #if DEMAND_SUPPORT @@ -2155,18 +2155,18 @@ static void ipcp_down(fsm *f) { * to queue up outgoing packets (for now). */ if (demand) { - sifnpmode(pcb, PPP_IP, NPMODE_QUEUE); + sifnpmode(pcb, PPP_IP, NPMODE_QUEUE); } else #endif /* DEMAND_SUPPORT */ { #if DEMAND_SUPPORT - sifnpmode(pcb, PPP_IP, NPMODE_DROP); + sifnpmode(pcb, PPP_IP, NPMODE_DROP); #endif /* DEMAND_SUPPORT */ - sifdown(pcb); - ipcp_clear_addrs(pcb, go->ouraddr, - ho->hisaddr, 0); + sifdown(pcb); + ipcp_clear_addrs(pcb, go->ouraddr, + ho->hisaddr, 0); #if LWIP_DNS - cdns(pcb, go->dnsaddr[0], go->dnsaddr[1]); + cdns(pcb, go->dnsaddr[0], go->dnsaddr[1]); #endif /* LWIP_DNS */ } } @@ -2181,8 +2181,8 @@ static void ipcp_clear_addrs(ppp_pcb *pcb, u32_t ouraddr, u32_t hisaddr, u8_t re #if 0 /* UNUSED - PROXY ARP */ if (pcb->proxy_arp_set) { - cifproxyarp(pcb, hisaddr); - pcb->proxy_arp_set = 0; + cifproxyarp(pcb, hisaddr); + pcb->proxy_arp_set = 0; } #endif /* UNUSED - PROXY ARP */ #if 0 /* UNUSED */ @@ -2195,8 +2195,8 @@ static void ipcp_clear_addrs(ppp_pcb *pcb, u32_t ouraddr, u32_t hisaddr, u8_t re * is one saved by an sifdefaultroute with replacedefaultroute. */ if (!replacedefaultroute && pcb->default_route_set) { - cifdefaultroute(pcb, ouraddr, hisaddr); - pcb->default_route_set = 0; + cifdefaultroute(pcb, ouraddr, hisaddr); + pcb->default_route_set = 0; } #endif /* UNUSED */ cifaddr(pcb, ouraddr, hisaddr); @@ -2207,11 +2207,11 @@ static void ipcp_clear_addrs(ppp_pcb *pcb, u32_t ouraddr, u32_t hisaddr, u8_t re * ipcp_finished - possibly shut down the lower layers. */ static void ipcp_finished(fsm *f) { - ppp_pcb *pcb = f->pcb; - if (pcb->ipcp_is_open) { - pcb->ipcp_is_open = 0; - np_finished(pcb, PPP_IP); - } + ppp_pcb *pcb = f->pcb; + if (pcb->ipcp_is_open) { + pcb->ipcp_is_open = 0; + np_finished(pcb, PPP_IP); + } } @@ -2237,7 +2237,7 @@ static const char* const ipcp_codenames[] = { }; static int ipcp_printpkt(const u_char *p, int plen, - void (*printer) (void *, const char *, ...), void *arg) { + void (*printer) (void *, const char *, ...), void *arg) { int code, id, len, olen; const u_char *pstart, *optend; #if VJ_SUPPORT @@ -2246,18 +2246,18 @@ static int ipcp_printpkt(const u_char *p, int plen, u32_t cilong; if (plen < HEADERLEN) - return 0; + return 0; pstart = p; GETCHAR(code, p); GETCHAR(id, p); GETSHORT(len, p); if (len < HEADERLEN || len > plen) - return 0; + return 0; if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(ipcp_codenames)) - printer(arg, " %s", ipcp_codenames[code-1]); + printer(arg, " %s", ipcp_codenames[code-1]); else - printer(arg, " code=0x%x", code); + printer(arg, " code=0x%x", code); printer(arg, " id=0x%x", id); len -= HEADERLEN; switch (code) { @@ -2265,98 +2265,98 @@ static int ipcp_printpkt(const u_char *p, int plen, case CONFACK: case CONFNAK: case CONFREJ: - /* print option list */ - while (len >= 2) { - GETCHAR(code, p); - GETCHAR(olen, p); - p -= 2; - if (olen < 2 || olen > len) { - break; - } - printer(arg, " <"); - len -= olen; - optend = p + olen; - switch (code) { - case CI_ADDRS: - if (olen == CILEN_ADDRS) { - p += 2; - GETLONG(cilong, p); - printer(arg, "addrs %I", lwip_htonl(cilong)); - GETLONG(cilong, p); - printer(arg, " %I", lwip_htonl(cilong)); - } - break; + /* print option list */ + while (len >= 2) { + GETCHAR(code, p); + GETCHAR(olen, p); + p -= 2; + if (olen < 2 || olen > len) { + break; + } + printer(arg, " <"); + len -= olen; + optend = p + olen; + switch (code) { + case CI_ADDRS: + if (olen == CILEN_ADDRS) { + p += 2; + GETLONG(cilong, p); + printer(arg, "addrs %I", lwip_htonl(cilong)); + GETLONG(cilong, p); + printer(arg, " %I", lwip_htonl(cilong)); + } + break; #if VJ_SUPPORT - case CI_COMPRESSTYPE: - if (olen >= CILEN_COMPRESS) { - p += 2; - GETSHORT(cishort, p); - printer(arg, "compress "); - switch (cishort) { - case IPCP_VJ_COMP: - printer(arg, "VJ"); - break; - case IPCP_VJ_COMP_OLD: - printer(arg, "old-VJ"); - break; - default: - printer(arg, "0x%x", cishort); - } - } - break; + case CI_COMPRESSTYPE: + if (olen >= CILEN_COMPRESS) { + p += 2; + GETSHORT(cishort, p); + printer(arg, "compress "); + switch (cishort) { + case IPCP_VJ_COMP: + printer(arg, "VJ"); + break; + case IPCP_VJ_COMP_OLD: + printer(arg, "old-VJ"); + break; + default: + printer(arg, "0x%x", cishort); + } + } + break; #endif /* VJ_SUPPORT */ - case CI_ADDR: - if (olen == CILEN_ADDR) { - p += 2; - GETLONG(cilong, p); - printer(arg, "addr %I", lwip_htonl(cilong)); - } - break; + case CI_ADDR: + if (olen == CILEN_ADDR) { + p += 2; + GETLONG(cilong, p); + printer(arg, "addr %I", lwip_htonl(cilong)); + } + break; #if LWIP_DNS - case CI_MS_DNS1: - case CI_MS_DNS2: - p += 2; - GETLONG(cilong, p); - printer(arg, "ms-dns%d %I", (code == CI_MS_DNS1? 1: 2), - htonl(cilong)); - break; + case CI_MS_DNS1: + case CI_MS_DNS2: + p += 2; + GETLONG(cilong, p); + printer(arg, "ms-dns%d %I", (code == CI_MS_DNS1? 1: 2), + htonl(cilong)); + break; #endif /* LWIP_DNS */ #if 0 /* UNUSED - WINS */ - case CI_MS_WINS1: - case CI_MS_WINS2: - p += 2; - GETLONG(cilong, p); - printer(arg, "ms-wins %I", lwip_htonl(cilong)); - break; + case CI_MS_WINS1: + case CI_MS_WINS2: + p += 2; + GETLONG(cilong, p); + printer(arg, "ms-wins %I", lwip_htonl(cilong)); + break; #endif /* UNUSED - WINS */ - default: - break; - } - while (p < optend) { - GETCHAR(code, p); - printer(arg, " %.2x", code); - } - printer(arg, ">"); - } - break; + default: + break; + } + while (p < optend) { + GETCHAR(code, p); + printer(arg, " %.2x", code); + } + printer(arg, ">"); + } + break; case TERMACK: case TERMREQ: - if (len > 0 && *p >= ' ' && *p < 0x7f) { - printer(arg, " "); - ppp_print_string(p, len, printer, arg); - p += len; - len = 0; - } - break; + if (len > 0 && *p >= ' ' && *p < 0x7f) { + printer(arg, " "); + ppp_print_string(p, len, printer, arg); + p += len; + len = 0; + } + break; default: - break; + break; } /* print the rest of the bytes in the packet */ for (; len > 0; --len) { - GETCHAR(code, p); - printer(arg, " %.2x", code); + GETCHAR(code, p); + printer(arg, " %.2x", code); } return p - pstart; @@ -2369,25 +2369,25 @@ static int ipcp_printpkt(const u_char *p, int plen, * We don't bring the link up for IP fragments or for TCP FIN packets * with no data. */ -#define IP_HDRLEN 20 /* bytes */ -#define IP_OFFMASK 0x1fff +#define IP_HDRLEN 20 /* bytes */ +#define IP_OFFMASK 0x1fff #ifndef IPPROTO_TCP -#define IPPROTO_TCP 6 +#define IPPROTO_TCP 6 #endif -#define TCP_HDRLEN 20 -#define TH_FIN 0x01 +#define TCP_HDRLEN 20 +#define TH_FIN 0x01 /* * We use these macros because the IP header may be at an odd address, * and some compilers might use word loads to get th_off or ip_hl. */ -#define net_short(x) (((x)[0] << 8) + (x)[1]) -#define get_iphl(x) (((unsigned char *)(x))[0] & 0xF) -#define get_ipoff(x) net_short((unsigned char *)(x) + 6) -#define get_ipproto(x) (((unsigned char *)(x))[9]) -#define get_tcpoff(x) (((unsigned char *)(x))[12] >> 4) -#define get_tcpflags(x) (((unsigned char *)(x))[13]) +#define net_short(x) (((x)[0] << 8) + (x)[1]) +#define get_iphl(x) (((unsigned char *)(x))[0] & 0xF) +#define get_ipoff(x) net_short((unsigned char *)(x) + 6) +#define get_ipproto(x) (((unsigned char *)(x))[9]) +#define get_tcpoff(x) (((unsigned char *)(x))[12] >> 4) +#define get_tcpflags(x) (((unsigned char *)(x))[13]) static int ip_active_pkt(pkt, len) @@ -2400,17 +2400,17 @@ ip_active_pkt(pkt, len) len -= PPP_HDRLEN; pkt += PPP_HDRLEN; if (len < IP_HDRLEN) - return 0; + return 0; if ((get_ipoff(pkt) & IP_OFFMASK) != 0) - return 0; + return 0; if (get_ipproto(pkt) != IPPROTO_TCP) - return 1; + return 1; hlen = get_iphl(pkt) * 4; if (len < hlen + TCP_HDRLEN) - return 0; + return 0; tcp = pkt + hlen; if ((get_tcpflags(tcp) & TH_FIN) != 0 && len == hlen + get_tcpoff(tcp) * 4) - return 0; + return 0; return 1; } #endif /* DEMAND_SUPPORT */ diff --git a/Libraries/LwIP/src/netif/ppp/ipv6cp.c b/Libraries/LwIP/src/netif/ppp/ipv6cp.c index f258a2c..e7d81c9 100755 --- a/Libraries/LwIP/src/netif/ppp/ipv6cp.c +++ b/Libraries/LwIP/src/netif/ppp/ipv6cp.c @@ -188,21 +188,21 @@ static void ipv6cp_down(fsm *f); /* We're DOWN */ static void ipv6cp_finished(fsm *f); /* Don't need lower layer */ static const fsm_callbacks ipv6cp_callbacks = { /* IPV6CP callback routines */ - ipv6cp_resetci, /* Reset our Configuration Information */ - ipv6cp_cilen, /* Length of our Configuration Information */ - ipv6cp_addci, /* Add our Configuration Information */ - ipv6cp_ackci, /* ACK our Configuration Information */ - ipv6cp_nakci, /* NAK our Configuration Information */ - ipv6cp_rejci, /* Reject our Configuration Information */ - ipv6cp_reqci, /* Request peer's Configuration Information */ - ipv6cp_up, /* Called when fsm reaches OPENED state */ - ipv6cp_down, /* Called when fsm leaves OPENED state */ - NULL, /* Called when we want the lower layer up */ - ipv6cp_finished, /* Called when we want the lower layer down */ - NULL, /* Called when Protocol-Reject received */ - NULL, /* Retransmission is necessary */ - NULL, /* Called to handle protocol-specific codes */ - "IPV6CP" /* String name of protocol */ + ipv6cp_resetci, /* Reset our Configuration Information */ + ipv6cp_cilen, /* Length of our Configuration Information */ + ipv6cp_addci, /* Add our Configuration Information */ + ipv6cp_ackci, /* ACK our Configuration Information */ + ipv6cp_nakci, /* NAK our Configuration Information */ + ipv6cp_rejci, /* Reject our Configuration Information */ + ipv6cp_reqci, /* Request peer's Configuration Information */ + ipv6cp_up, /* Called when fsm reaches OPENED state */ + ipv6cp_down, /* Called when fsm leaves OPENED state */ + NULL, /* Called when we want the lower layer up */ + ipv6cp_finished, /* Called when we want the lower layer down */ + NULL, /* Called when Protocol-Reject received */ + NULL, /* Retransmission is necessary */ + NULL, /* Called to handle protocol-specific codes */ + "IPV6CP" /* String name of protocol */ }; #if PPP_OPTIONS @@ -211,7 +211,7 @@ static const fsm_callbacks ipv6cp_callbacks = { /* IPV6CP callback routines */ */ static int setifaceid(char **arg)); static void printifaceid(option_t *, - void (*)(void *, char *, ...), void *)); + void (*)(void *, char *, ...), void *)); static option_t ipv6cp_option_list[] = { { "ipv6", o_special, (void *)setifaceid, @@ -265,7 +265,7 @@ static int ipv6_demand_conf(int u); #endif /* DEMAND_SUPPORT */ #if PRINTPKT_SUPPORT static int ipv6cp_printpkt(const u_char *p, int plen, - void (*printer)(void *, const char *, ...), void *arg); + void (*printer)(void *, const char *, ...), void *arg); #endif /* PRINTPKT_SUPPORT */ #if DEMAND_SUPPORT static int ipv6_active_pkt(u_char *pkt, int len); @@ -309,12 +309,12 @@ static void ipv6cp_script_done(void *)); /* * Lengths of configuration options. */ -#define CILEN_VOID 2 -#define CILEN_COMPRESS 4 /* length for RFC2023 compress opt. */ -#define CILEN_IFACEID 10 /* RFC2472, interface identifier */ +#define CILEN_VOID 2 +#define CILEN_COMPRESS 4 /* length for RFC2023 compress opt. */ +#define CILEN_IFACEID 10 /* RFC2472, interface identifier */ -#define CODENAME(x) ((x) == CONFACK ? "ACK" : \ - (x) == CONFNAK ? "NAK" : "REJ") +#define CODENAME(x) ((x) == CONFACK ? "ACK" : \ + (x) == CONFNAK ? "NAK" : "REJ") #if 0 /* UNUSED */ /* @@ -344,49 +344,49 @@ setifaceid(argv) static int prio_local, prio_remote; #define VALIDID(a) ( (((a).s6_addr32[0] == 0) && ((a).s6_addr32[1] == 0)) && \ - (((a).s6_addr32[2] != 0) || ((a).s6_addr32[3] != 0)) ) + (((a).s6_addr32[2] != 0) || ((a).s6_addr32[3] != 0)) ) arg = *argv; if ((comma = strchr(arg, ',')) == NULL) - comma = arg + strlen(arg); + comma = arg + strlen(arg); /* * If comma first character, then no local identifier */ if (comma != arg) { - c = *comma; - *comma = '\0'; + c = *comma; + *comma = '\0'; - if (inet_pton(AF_INET6, arg, &addr) == 0 || !VALIDID(addr)) { - option_error("Illegal interface identifier (local): %s", arg); - return 0; - } + if (inet_pton(AF_INET6, arg, &addr) == 0 || !VALIDID(addr)) { + option_error("Illegal interface identifier (local): %s", arg); + return 0; + } - if (option_priority >= prio_local) { - eui64_copy(addr.s6_addr32[2], wo->ourid); - wo->opt_local = 1; - prio_local = option_priority; - } - *comma = c; + if (option_priority >= prio_local) { + eui64_copy(addr.s6_addr32[2], wo->ourid); + wo->opt_local = 1; + prio_local = option_priority; + } + *comma = c; } /* * If comma last character, the no remote identifier */ if (*comma != 0 && *++comma != '\0') { - if (inet_pton(AF_INET6, comma, &addr) == 0 || !VALIDID(addr)) { - option_error("Illegal interface identifier (remote): %s", comma); - return 0; - } - if (option_priority >= prio_remote) { - eui64_copy(addr.s6_addr32[2], wo->hisid); - wo->opt_remote = 1; - prio_remote = option_priority; - } + if (inet_pton(AF_INET6, comma, &addr) == 0 || !VALIDID(addr)) { + option_error("Illegal interface identifier (remote): %s", comma); + return 0; + } + if (option_priority >= prio_remote) { + eui64_copy(addr.s6_addr32[2], wo->hisid); + wo->opt_remote = 1; + prio_remote = option_priority; + } } if (override_value("+ipv6", option_priority, option_source)) - ipv6cp_protent.enabled_flag = 1; + ipv6cp_protent.enabled_flag = 1; return 1; } @@ -396,13 +396,13 @@ printifaceid(opt, printer, arg) void (*printer)(void *, char *, ...)); void *arg; { - ipv6cp_options *wo = &ipv6cp_wantoptions[0]; + ipv6cp_options *wo = &ipv6cp_wantoptions[0]; - if (wo->opt_local) - printer(arg, "%s", llv6_ntoa(wo->ourid)); - printer(arg, ","); - if (wo->opt_remote) - printer(arg, "%s", llv6_ntoa(wo->hisid)); + if (wo->opt_local) + printer(arg, "%s", llv6_ntoa(wo->ourid)); + printer(arg, ","); + if (wo->opt_remote) + printer(arg, "%s", llv6_ntoa(wo->hisid)); } #endif /* PPP_OPTIONS */ @@ -515,11 +515,11 @@ static void ipv6cp_resetci(fsm *f) { wo->req_ifaceid = wo->neg_ifaceid && ao->neg_ifaceid; if (!wo->opt_local) { - eui64_magic_nz(wo->ourid); + eui64_magic_nz(wo->ourid); } *go = *wo; - eui64_zero(go->hisid); /* last proposed interface identifier */ + eui64_zero(go->hisid); /* last proposed interface identifier */ } @@ -531,15 +531,15 @@ static int ipv6cp_cilen(fsm *f) { ipv6cp_options *go = &pcb->ipv6cp_gotoptions; #ifdef IPV6CP_COMP -#define LENCIVJ(neg) (neg ? CILEN_COMPRESS : 0) +#define LENCIVJ(neg) (neg ? CILEN_COMPRESS : 0) #endif /* IPV6CP_COMP */ -#define LENCIIFACEID(neg) (neg ? CILEN_IFACEID : 0) +#define LENCIIFACEID(neg) (neg ? CILEN_IFACEID : 0) return (LENCIIFACEID(go->neg_ifaceid) + #ifdef IPV6CP_COMP - LENCIVJ(go->neg_vj) + + LENCIVJ(go->neg_vj) + #endif /* IPV6CP_COMP */ - 0); + 0); } @@ -554,27 +554,27 @@ static void ipv6cp_addci(fsm *f, u_char *ucp, int *lenp) { #ifdef IPV6CP_COMP #define ADDCIVJ(opt, neg, val) \ if (neg) { \ - int vjlen = CILEN_COMPRESS; \ - if (len >= vjlen) { \ - PUTCHAR(opt, ucp); \ - PUTCHAR(vjlen, ucp); \ - PUTSHORT(val, ucp); \ - len -= vjlen; \ - } else \ - neg = 0; \ + int vjlen = CILEN_COMPRESS; \ + if (len >= vjlen) { \ + PUTCHAR(opt, ucp); \ + PUTCHAR(vjlen, ucp); \ + PUTSHORT(val, ucp); \ + len -= vjlen; \ + } else \ + neg = 0; \ } #endif /* IPV6CP_COMP */ #define ADDCIIFACEID(opt, neg, val1) \ if (neg) { \ - int idlen = CILEN_IFACEID; \ - if (len >= idlen) { \ - PUTCHAR(opt, ucp); \ - PUTCHAR(idlen, ucp); \ - eui64_put(val1, ucp); \ - len -= idlen; \ - } else \ - neg = 0; \ + int idlen = CILEN_IFACEID; \ + if (len >= idlen) { \ + PUTCHAR(opt, ucp); \ + PUTCHAR(idlen, ucp); \ + eui64_put(val1, ucp); \ + len -= idlen; \ + } else \ + neg = 0; \ } ADDCIIFACEID(CI_IFACEID, go->neg_ifaceid, go->ourid); @@ -591,8 +591,8 @@ static void ipv6cp_addci(fsm *f, u_char *ucp, int *lenp) { * ipv6cp_ackci - Ack our CIs. * * Returns: - * 0 - Ack was bad. - * 1 - Ack was good. + * 0 - Ack was bad. + * 1 - Ack was good. */ static int ipv6cp_ackci(fsm *f, u_char *p, int len) { ppp_pcb *pcb = f->pcb; @@ -612,33 +612,33 @@ static int ipv6cp_ackci(fsm *f, u_char *p, int len) { #ifdef IPV6CP_COMP #define ACKCIVJ(opt, neg, val) \ if (neg) { \ - int vjlen = CILEN_COMPRESS; \ - if ((len -= vjlen) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != vjlen || \ - citype != opt) \ - goto bad; \ - GETSHORT(cishort, p); \ - if (cishort != val) \ - goto bad; \ + int vjlen = CILEN_COMPRESS; \ + if ((len -= vjlen) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != vjlen || \ + citype != opt) \ + goto bad; \ + GETSHORT(cishort, p); \ + if (cishort != val) \ + goto bad; \ } #endif /* IPV6CP_COMP */ #define ACKCIIFACEID(opt, neg, val1) \ if (neg) { \ - int idlen = CILEN_IFACEID; \ - if ((len -= idlen) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != idlen || \ - citype != opt) \ - goto bad; \ - eui64_get(ifaceid, p); \ - if (! eui64_equals(val1, ifaceid)) \ - goto bad; \ + int idlen = CILEN_IFACEID; \ + if ((len -= idlen) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != idlen || \ + citype != opt) \ + goto bad; \ + eui64_get(ifaceid, p); \ + if (! eui64_equals(val1, ifaceid)) \ + goto bad; \ } ACKCIIFACEID(CI_IFACEID, go->neg_ifaceid, go->ourid); @@ -651,7 +651,7 @@ static int ipv6cp_ackci(fsm *f, u_char *p, int len) { * If there are any remaining CIs, then this packet is bad. */ if (len != 0) - goto bad; + goto bad; return (1); bad: @@ -665,8 +665,8 @@ bad: * or if IPV6CP is in the OPENED state. * * Returns: - * 0 - Nak was bad. - * 1 - Nak was good. + * 0 - Nak was bad. + * 1 - Nak was good. */ static int ipv6cp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { ppp_pcb *pcb = f->pcb; @@ -676,8 +676,8 @@ static int ipv6cp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { u_short cishort; #endif /* IPV6CP_COMP */ eui64_t ifaceid; - ipv6cp_options no; /* options we've seen Naks for */ - ipv6cp_options try_; /* options to request next time */ + ipv6cp_options no; /* options we've seen Naks for */ + ipv6cp_options try_; /* options to request next time */ BZERO(&no, sizeof(no)); try_ = *go; @@ -689,26 +689,26 @@ static int ipv6cp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { */ #define NAKCIIFACEID(opt, neg, code) \ if (go->neg && \ - len >= (cilen = CILEN_IFACEID) && \ - p[1] == cilen && \ - p[0] == opt) { \ - len -= cilen; \ - INCPTR(2, p); \ - eui64_get(ifaceid, p); \ - no.neg = 1; \ - code \ + len >= (cilen = CILEN_IFACEID) && \ + p[1] == cilen && \ + p[0] == opt) { \ + len -= cilen; \ + INCPTR(2, p); \ + eui64_get(ifaceid, p); \ + no.neg = 1; \ + code \ } #ifdef IPV6CP_COMP #define NAKCIVJ(opt, neg, code) \ if (go->neg && \ - ((cilen = p[1]) == CILEN_COMPRESS) && \ - len >= cilen && \ - p[0] == opt) { \ - len -= cilen; \ - INCPTR(2, p); \ - GETSHORT(cishort, p); \ - no.neg = 1; \ + ((cilen = p[1]) == CILEN_COMPRESS) && \ + len >= cilen && \ + p[0] == opt) { \ + len -= cilen; \ + INCPTR(2, p); \ + GETSHORT(cishort, p); \ + no.neg = 1; \ code \ } #endif /* IPV6CP_COMP */ @@ -718,27 +718,27 @@ static int ipv6cp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { * from our idea, only if the accept_{local,remote} flag is set. */ NAKCIIFACEID(CI_IFACEID, neg_ifaceid, - if (treat_as_reject) { - try_.neg_ifaceid = 0; - } else if (go->accept_local) { - while (eui64_iszero(ifaceid) || - eui64_equals(ifaceid, go->hisid)) /* bad luck */ - eui64_magic(ifaceid); - try_.ourid = ifaceid; - IPV6CPDEBUG(("local LL address %s", llv6_ntoa(ifaceid))); - } - ); + if (treat_as_reject) { + try_.neg_ifaceid = 0; + } else if (go->accept_local) { + while (eui64_iszero(ifaceid) || + eui64_equals(ifaceid, go->hisid)) /* bad luck */ + eui64_magic(ifaceid); + try_.ourid = ifaceid; + IPV6CPDEBUG(("local LL address %s", llv6_ntoa(ifaceid))); + } + ); #ifdef IPV6CP_COMP NAKCIVJ(CI_COMPRESSTYPE, neg_vj, - { - if (cishort == IPV6CP_COMP && !treat_as_reject) { - try_.vj_protocol = cishort; - } else { - try_.neg_vj = 0; - } - } - ); + { + if (cishort == IPV6CP_COMP && !treat_as_reject) { + try_.vj_protocol = cishort; + } else { + try_.neg_vj = 0; + } + } + ); #endif /* IPV6CP_COMP */ /* @@ -748,49 +748,49 @@ static int ipv6cp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { * If they want us to ask for compression, we refuse. */ while (len >= CILEN_VOID) { - GETCHAR(citype, p); - GETCHAR(cilen, p); - if ( cilen < CILEN_VOID || (len -= cilen) < 0 ) - goto bad; - next = p + cilen - 2; + GETCHAR(citype, p); + GETCHAR(cilen, p); + if ( cilen < CILEN_VOID || (len -= cilen) < 0 ) + goto bad; + next = p + cilen - 2; - switch (citype) { + switch (citype) { #ifdef IPV6CP_COMP - case CI_COMPRESSTYPE: - if (go->neg_vj || no.neg_vj || - (cilen != CILEN_COMPRESS)) - goto bad; - no.neg_vj = 1; - break; + case CI_COMPRESSTYPE: + if (go->neg_vj || no.neg_vj || + (cilen != CILEN_COMPRESS)) + goto bad; + no.neg_vj = 1; + break; #endif /* IPV6CP_COMP */ - case CI_IFACEID: - if (go->neg_ifaceid || no.neg_ifaceid || cilen != CILEN_IFACEID) - goto bad; - try_.neg_ifaceid = 1; - eui64_get(ifaceid, p); - if (go->accept_local) { - while (eui64_iszero(ifaceid) || - eui64_equals(ifaceid, go->hisid)) /* bad luck */ - eui64_magic(ifaceid); - try_.ourid = ifaceid; - } - no.neg_ifaceid = 1; - break; - default: - break; - } - p = next; + case CI_IFACEID: + if (go->neg_ifaceid || no.neg_ifaceid || cilen != CILEN_IFACEID) + goto bad; + try_.neg_ifaceid = 1; + eui64_get(ifaceid, p); + if (go->accept_local) { + while (eui64_iszero(ifaceid) || + eui64_equals(ifaceid, go->hisid)) /* bad luck */ + eui64_magic(ifaceid); + try_.ourid = ifaceid; + } + no.neg_ifaceid = 1; + break; + default: + break; + } + p = next; } /* If there is still anything left, this packet is bad. */ if (len != 0) - goto bad; + goto bad; /* * OK, the Nak is good. Now we can update state. */ if (f->state != PPP_FSM_OPENED) - *go = try_; + *go = try_; return 1; @@ -811,7 +811,7 @@ static int ipv6cp_rejci(fsm *f, u_char *p, int len) { u_short cishort; #endif /* IPV6CP_COMP */ eui64_t ifaceid; - ipv6cp_options try_; /* options to request next time */ + ipv6cp_options try_; /* options to request next time */ try_ = *go; /* @@ -821,31 +821,31 @@ static int ipv6cp_rejci(fsm *f, u_char *p, int len) { */ #define REJCIIFACEID(opt, neg, val1) \ if (go->neg && \ - len >= (cilen = CILEN_IFACEID) && \ - p[1] == cilen && \ - p[0] == opt) { \ - len -= cilen; \ - INCPTR(2, p); \ - eui64_get(ifaceid, p); \ - /* Check rejected value. */ \ - if (! eui64_equals(ifaceid, val1)) \ - goto bad; \ - try_.neg = 0; \ + len >= (cilen = CILEN_IFACEID) && \ + p[1] == cilen && \ + p[0] == opt) { \ + len -= cilen; \ + INCPTR(2, p); \ + eui64_get(ifaceid, p); \ + /* Check rejected value. */ \ + if (! eui64_equals(ifaceid, val1)) \ + goto bad; \ + try_.neg = 0; \ } #ifdef IPV6CP_COMP #define REJCIVJ(opt, neg, val) \ if (go->neg && \ - p[1] == CILEN_COMPRESS && \ - len >= p[1] && \ - p[0] == opt) { \ - len -= p[1]; \ - INCPTR(2, p); \ - GETSHORT(cishort, p); \ - /* Check rejected value. */ \ - if (cishort != val) \ - goto bad; \ - try_.neg = 0; \ + p[1] == CILEN_COMPRESS && \ + len >= p[1] && \ + p[0] == opt) { \ + len -= p[1]; \ + INCPTR(2, p); \ + GETSHORT(cishort, p); \ + /* Check rejected value. */ \ + if (cishort != val) \ + goto bad; \ + try_.neg = 0; \ } #endif /* IPV6CP_COMP */ @@ -859,12 +859,12 @@ static int ipv6cp_rejci(fsm *f, u_char *p, int len) { * If there are any remaining CIs, then this packet is bad. */ if (len != 0) - goto bad; + goto bad; /* * Now we can update state. */ if (f->state != PPP_FSM_OPENED) - *go = try_; + *go = try_; return 1; bad: @@ -890,17 +890,17 @@ static int ipv6cp_reqci(fsm *f, u_char *inp, int *len, int reject_if_disagree) { ipv6cp_options *ho = &pcb->ipv6cp_hisoptions; ipv6cp_options *ao = &pcb->ipv6cp_allowoptions; ipv6cp_options *go = &pcb->ipv6cp_gotoptions; - u_char *cip, *next; /* Pointer to current and next CIs */ - u_short cilen, citype; /* Parsed len, type */ + u_char *cip, *next; /* Pointer to current and next CIs */ + u_short cilen, citype; /* Parsed len, type */ #ifdef IPV6CP_COMP - u_short cishort; /* Parsed short value */ + u_short cishort; /* Parsed short value */ #endif /* IPV6CP_COMP */ - eui64_t ifaceid; /* Parsed interface identifier */ - int rc = CONFACK; /* Final packet return code */ - int orc; /* Individual option return code */ - u_char *p; /* Pointer to next char to parse */ - u_char *ucp = inp; /* Pointer to current output char */ - int l = *len; /* Length left */ + eui64_t ifaceid; /* Parsed interface identifier */ + int rc = CONFACK; /* Final packet return code */ + int orc; /* Individual option return code */ + u_char *p; /* Pointer to next char to parse */ + u_char *ucp = inp; /* Pointer to current output char */ + int l = *len; /* Length left */ /* * Reset all his options. @@ -912,128 +912,128 @@ static int ipv6cp_reqci(fsm *f, u_char *inp, int *len, int reject_if_disagree) { */ next = inp; while (l) { - orc = CONFACK; /* Assume success */ - cip = p = next; /* Remember begining of CI */ - if (l < 2 || /* Not enough data for CI header or */ - p[1] < 2 || /* CI length too small or */ - p[1] > l) { /* CI length too big? */ - IPV6CPDEBUG(("ipv6cp_reqci: bad CI length!")); - orc = CONFREJ; /* Reject bad CI */ - cilen = l; /* Reject till end of packet */ - l = 0; /* Don't loop again */ - goto endswitch; - } - GETCHAR(citype, p); /* Parse CI type */ - GETCHAR(cilen, p); /* Parse CI length */ - l -= cilen; /* Adjust remaining length */ - next += cilen; /* Step to next CI */ + orc = CONFACK; /* Assume success */ + cip = p = next; /* Remember begining of CI */ + if (l < 2 || /* Not enough data for CI header or */ + p[1] < 2 || /* CI length too small or */ + p[1] > l) { /* CI length too big? */ + IPV6CPDEBUG(("ipv6cp_reqci: bad CI length!")); + orc = CONFREJ; /* Reject bad CI */ + cilen = l; /* Reject till end of packet */ + l = 0; /* Don't loop again */ + goto endswitch; + } + GETCHAR(citype, p); /* Parse CI type */ + GETCHAR(cilen, p); /* Parse CI length */ + l -= cilen; /* Adjust remaining length */ + next += cilen; /* Step to next CI */ - switch (citype) { /* Check CI type */ - case CI_IFACEID: - IPV6CPDEBUG(("ipv6cp: received interface identifier ")); + switch (citype) { /* Check CI type */ + case CI_IFACEID: + IPV6CPDEBUG(("ipv6cp: received interface identifier ")); - if (!ao->neg_ifaceid || - cilen != CILEN_IFACEID) { /* Check CI length */ - orc = CONFREJ; /* Reject CI */ - break; - } + if (!ao->neg_ifaceid || + cilen != CILEN_IFACEID) { /* Check CI length */ + orc = CONFREJ; /* Reject CI */ + break; + } - /* - * If he has no interface identifier, or if we both have same - * identifier then NAK it with new idea. - * In particular, if we don't know his identifier, but he does, - * then accept it. - */ - eui64_get(ifaceid, p); - IPV6CPDEBUG(("(%s)", llv6_ntoa(ifaceid))); - if (eui64_iszero(ifaceid) && eui64_iszero(go->ourid)) { - orc = CONFREJ; /* Reject CI */ - break; - } - if (!eui64_iszero(wo->hisid) && - !eui64_equals(ifaceid, wo->hisid) && - eui64_iszero(go->hisid)) { - - orc = CONFNAK; - ifaceid = wo->hisid; - go->hisid = ifaceid; - DECPTR(sizeof(ifaceid), p); - eui64_put(ifaceid, p); - } else - if (eui64_iszero(ifaceid) || eui64_equals(ifaceid, go->ourid)) { - orc = CONFNAK; - if (eui64_iszero(go->hisid)) /* first time, try option */ - ifaceid = wo->hisid; - while (eui64_iszero(ifaceid) || - eui64_equals(ifaceid, go->ourid)) /* bad luck */ - eui64_magic(ifaceid); - go->hisid = ifaceid; - DECPTR(sizeof(ifaceid), p); - eui64_put(ifaceid, p); - } + /* + * If he has no interface identifier, or if we both have same + * identifier then NAK it with new idea. + * In particular, if we don't know his identifier, but he does, + * then accept it. + */ + eui64_get(ifaceid, p); + IPV6CPDEBUG(("(%s)", llv6_ntoa(ifaceid))); + if (eui64_iszero(ifaceid) && eui64_iszero(go->ourid)) { + orc = CONFREJ; /* Reject CI */ + break; + } + if (!eui64_iszero(wo->hisid) && + !eui64_equals(ifaceid, wo->hisid) && + eui64_iszero(go->hisid)) { + + orc = CONFNAK; + ifaceid = wo->hisid; + go->hisid = ifaceid; + DECPTR(sizeof(ifaceid), p); + eui64_put(ifaceid, p); + } else + if (eui64_iszero(ifaceid) || eui64_equals(ifaceid, go->ourid)) { + orc = CONFNAK; + if (eui64_iszero(go->hisid)) /* first time, try option */ + ifaceid = wo->hisid; + while (eui64_iszero(ifaceid) || + eui64_equals(ifaceid, go->ourid)) /* bad luck */ + eui64_magic(ifaceid); + go->hisid = ifaceid; + DECPTR(sizeof(ifaceid), p); + eui64_put(ifaceid, p); + } - ho->neg_ifaceid = 1; - ho->hisid = ifaceid; - break; + ho->neg_ifaceid = 1; + ho->hisid = ifaceid; + break; #ifdef IPV6CP_COMP - case CI_COMPRESSTYPE: - IPV6CPDEBUG(("ipv6cp: received COMPRESSTYPE ")); - if (!ao->neg_vj || - (cilen != CILEN_COMPRESS)) { - orc = CONFREJ; - break; - } - GETSHORT(cishort, p); - IPV6CPDEBUG(("(%d)", cishort)); + case CI_COMPRESSTYPE: + IPV6CPDEBUG(("ipv6cp: received COMPRESSTYPE ")); + if (!ao->neg_vj || + (cilen != CILEN_COMPRESS)) { + orc = CONFREJ; + break; + } + GETSHORT(cishort, p); + IPV6CPDEBUG(("(%d)", cishort)); - if (!(cishort == IPV6CP_COMP)) { - orc = CONFREJ; - break; - } + if (!(cishort == IPV6CP_COMP)) { + orc = CONFREJ; + break; + } - ho->neg_vj = 1; - ho->vj_protocol = cishort; - break; + ho->neg_vj = 1; + ho->vj_protocol = cishort; + break; #endif /* IPV6CP_COMP */ - default: - orc = CONFREJ; - break; - } + default: + orc = CONFREJ; + break; + } endswitch: - IPV6CPDEBUG((" (%s)\n", CODENAME(orc))); + IPV6CPDEBUG((" (%s)\n", CODENAME(orc))); - if (orc == CONFACK && /* Good CI */ - rc != CONFACK) /* but prior CI wasnt? */ - continue; /* Don't send this one */ + if (orc == CONFACK && /* Good CI */ + rc != CONFACK) /* but prior CI wasnt? */ + continue; /* Don't send this one */ - if (orc == CONFNAK) { /* Nak this CI? */ - if (reject_if_disagree) /* Getting fed up with sending NAKs? */ - orc = CONFREJ; /* Get tough if so */ - else { - if (rc == CONFREJ) /* Rejecting prior CI? */ - continue; /* Don't send this one */ - if (rc == CONFACK) { /* Ack'd all prior CIs? */ - rc = CONFNAK; /* Not anymore... */ - ucp = inp; /* Backup */ - } - } - } + if (orc == CONFNAK) { /* Nak this CI? */ + if (reject_if_disagree) /* Getting fed up with sending NAKs? */ + orc = CONFREJ; /* Get tough if so */ + else { + if (rc == CONFREJ) /* Rejecting prior CI? */ + continue; /* Don't send this one */ + if (rc == CONFACK) { /* Ack'd all prior CIs? */ + rc = CONFNAK; /* Not anymore... */ + ucp = inp; /* Backup */ + } + } + } - if (orc == CONFREJ && /* Reject this CI */ - rc != CONFREJ) { /* but no prior ones? */ - rc = CONFREJ; - ucp = inp; /* Backup */ - } + if (orc == CONFREJ && /* Reject this CI */ + rc != CONFREJ) { /* but no prior ones? */ + rc = CONFREJ; + ucp = inp; /* Backup */ + } - /* Need to move CI? */ - if (ucp != cip) - MEMCPY(ucp, cip, cilen); /* Move it */ + /* Need to move CI? */ + if (ucp != cip) + MEMCPY(ucp, cip, cilen); /* Move it */ - /* Update output pointer */ - INCPTR(cilen, ucp); + /* Update output pointer */ + INCPTR(cilen, ucp); } /* @@ -1044,20 +1044,20 @@ endswitch: * option safely. */ if (rc != CONFREJ && !ho->neg_ifaceid && - wo->req_ifaceid && !reject_if_disagree) { - if (rc == CONFACK) { - rc = CONFNAK; - ucp = inp; /* reset pointer */ - wo->req_ifaceid = 0; /* don't ask again */ - } - PUTCHAR(CI_IFACEID, ucp); - PUTCHAR(CILEN_IFACEID, ucp); - eui64_put(wo->hisid, ucp); + wo->req_ifaceid && !reject_if_disagree) { + if (rc == CONFACK) { + rc = CONFNAK; + ucp = inp; /* reset pointer */ + wo->req_ifaceid = 0; /* don't ask again */ + } + PUTCHAR(CI_IFACEID, ucp); + PUTCHAR(CILEN_IFACEID, ucp); + eui64_put(wo->hisid, ucp); } - *len = ucp - inp; /* Compute output length */ + *len = ucp - inp; /* Compute output length */ IPV6CPDEBUG(("ipv6cp: returning Configure-%s", CODENAME(rc))); - return (rc); /* Return final code */ + return (rc); /* Return final code */ } #if PPP_OPTIONS @@ -1069,7 +1069,7 @@ static void ipv6_check_options() { ipv6cp_options *wo = &ipv6cp_wantoptions[0]; if (!ipv6cp_protent.enabled_flag) - return; + return; /* * Persistent link-local id is only used when user has not explicitly @@ -1077,42 +1077,42 @@ static void ipv6_check_options() { */ if ((wo->use_persistent) && (!wo->opt_local) && (!wo->opt_remote)) { - /* - * On systems where there are no Ethernet interfaces used, there - * may be other ways to obtain a persistent id. Right now, it - * will fall back to using magic [see eui64_magic] below when - * an EUI-48 from MAC address can't be obtained. Other possibilities - * include obtaining EEPROM serial numbers, or some other unique - * yet persistent number. On Sparc platforms, this is possible, - * but too bad there's no standards yet for x86 machines. - */ - if (ether_to_eui64(&wo->ourid)) { - wo->opt_local = 1; - } + /* + * On systems where there are no Ethernet interfaces used, there + * may be other ways to obtain a persistent id. Right now, it + * will fall back to using magic [see eui64_magic] below when + * an EUI-48 from MAC address can't be obtained. Other possibilities + * include obtaining EEPROM serial numbers, or some other unique + * yet persistent number. On Sparc platforms, this is possible, + * but too bad there's no standards yet for x86 machines. + */ + if (ether_to_eui64(&wo->ourid)) { + wo->opt_local = 1; + } } - if (!wo->opt_local) { /* init interface identifier */ - if (wo->use_ip && eui64_iszero(wo->ourid)) { - eui64_setlo32(wo->ourid, lwip_ntohl(ipcp_wantoptions[0].ouraddr)); - if (!eui64_iszero(wo->ourid)) - wo->opt_local = 1; - } - - while (eui64_iszero(wo->ourid)) - eui64_magic(wo->ourid); + if (!wo->opt_local) { /* init interface identifier */ + if (wo->use_ip && eui64_iszero(wo->ourid)) { + eui64_setlo32(wo->ourid, lwip_ntohl(ipcp_wantoptions[0].ouraddr)); + if (!eui64_iszero(wo->ourid)) + wo->opt_local = 1; + } + + while (eui64_iszero(wo->ourid)) + eui64_magic(wo->ourid); } if (!wo->opt_remote) { - if (wo->use_ip && eui64_iszero(wo->hisid)) { - eui64_setlo32(wo->hisid, lwip_ntohl(ipcp_wantoptions[0].hisaddr)); - if (!eui64_iszero(wo->hisid)) - wo->opt_remote = 1; - } + if (wo->use_ip && eui64_iszero(wo->hisid)) { + eui64_setlo32(wo->hisid, lwip_ntohl(ipcp_wantoptions[0].hisaddr)); + if (!eui64_iszero(wo->hisid)) + wo->opt_remote = 1; + } } if (demand && (eui64_iszero(wo->ourid) || eui64_iszero(wo->hisid))) { - option_error("local/remote LL address required for demand-dialling\n"); - exit(1); + option_error("local/remote LL address required for demand-dialling\n"); + exit(1); } } #endif /* PPP_OPTIONS */ @@ -1126,13 +1126,13 @@ static int ipv6_demand_conf(int u) { ipv6cp_options *wo = &ipv6cp_wantoptions[u]; if (!sif6up(u)) - return 0; + return 0; if (!sif6addr(u, wo->ourid, wo->hisid)) - return 0; + return 0; if (!sifnpmode(u, PPP_IPV6, NPMODE_QUEUE)) - return 0; + return 0; ppp_notice("ipv6_demand_conf"); ppp_notice("local LL address %s", llv6_ntoa(wo->ourid)); @@ -1160,26 +1160,26 @@ static void ipv6cp_up(fsm *f) { * We must have a non-zero LL address for both ends of the link. */ if (!ho->neg_ifaceid) - ho->hisid = wo->hisid; + ho->hisid = wo->hisid; #if 0 /* UNUSED */ if(!no_ifaceid_neg) { #endif /* UNUSED */ - if (eui64_iszero(ho->hisid)) { - ppp_error("Could not determine remote LL address"); - ipv6cp_close(f->pcb, "Could not determine remote LL address"); - return; - } - if (eui64_iszero(go->ourid)) { - ppp_error("Could not determine local LL address"); - ipv6cp_close(f->pcb, "Could not determine local LL address"); - return; - } - if (eui64_equals(go->ourid, ho->hisid)) { - ppp_error("local and remote LL addresses are equal"); - ipv6cp_close(f->pcb, "local and remote LL addresses are equal"); - return; - } + if (eui64_iszero(ho->hisid)) { + ppp_error("Could not determine remote LL address"); + ipv6cp_close(f->pcb, "Could not determine remote LL address"); + return; + } + if (eui64_iszero(go->ourid)) { + ppp_error("Could not determine local LL address"); + ipv6cp_close(f->pcb, "Could not determine local LL address"); + return; + } + if (eui64_equals(go->ourid, ho->hisid)) { + ppp_error("local and remote LL addresses are equal"); + ipv6cp_close(f->pcb, "local and remote LL addresses are equal"); + return; + } #if 0 /* UNUSED */ } #endif /* UNUSED */ @@ -1200,52 +1200,52 @@ static void ipv6cp_up(fsm *f) { * interface to pass IPv6 packets. */ if (demand) { - if (! eui64_equals(go->ourid, wo->ourid) || - ! eui64_equals(ho->hisid, wo->hisid)) { - if (! eui64_equals(go->ourid, wo->ourid)) - warn("Local LL address changed to %s", - llv6_ntoa(go->ourid)); - if (! eui64_equals(ho->hisid, wo->hisid)) - warn("Remote LL address changed to %s", - llv6_ntoa(ho->hisid)); - ipv6cp_clear_addrs(f->pcb, go->ourid, ho->hisid); + if (! eui64_equals(go->ourid, wo->ourid) || + ! eui64_equals(ho->hisid, wo->hisid)) { + if (! eui64_equals(go->ourid, wo->ourid)) + warn("Local LL address changed to %s", + llv6_ntoa(go->ourid)); + if (! eui64_equals(ho->hisid, wo->hisid)) + warn("Remote LL address changed to %s", + llv6_ntoa(ho->hisid)); + ipv6cp_clear_addrs(f->pcb, go->ourid, ho->hisid); - /* Set the interface to the new addresses */ - if (!sif6addr(f->pcb, go->ourid, ho->hisid)) { - if (debug) - warn("sif6addr failed"); - ipv6cp_close(f->unit, "Interface configuration failed"); - return; - } + /* Set the interface to the new addresses */ + if (!sif6addr(f->pcb, go->ourid, ho->hisid)) { + if (debug) + warn("sif6addr failed"); + ipv6cp_close(f->unit, "Interface configuration failed"); + return; + } - } - demand_rexmit(PPP_IPV6); - sifnpmode(f->unit, PPP_IPV6, NPMODE_PASS); + } + demand_rexmit(PPP_IPV6); + sifnpmode(f->unit, PPP_IPV6, NPMODE_PASS); } else #endif /* DEMAND_SUPPORT */ { - /* - * Set LL addresses - */ - if (!sif6addr(f->pcb, go->ourid, ho->hisid)) { - PPPDEBUG(LOG_DEBUG, ("sif6addr failed")); - ipv6cp_close(f->pcb, "Interface configuration failed"); - return; - } + /* + * Set LL addresses + */ + if (!sif6addr(f->pcb, go->ourid, ho->hisid)) { + PPPDEBUG(LOG_DEBUG, ("sif6addr failed")); + ipv6cp_close(f->pcb, "Interface configuration failed"); + return; + } - /* bring the interface up for IPv6 */ - if (!sif6up(f->pcb)) { - PPPDEBUG(LOG_DEBUG, ("sif6up failed (IPV6)")); - ipv6cp_close(f->pcb, "Interface configuration failed"); - return; - } + /* bring the interface up for IPv6 */ + if (!sif6up(f->pcb)) { + PPPDEBUG(LOG_DEBUG, ("sif6up failed (IPV6)")); + ipv6cp_close(f->pcb, "Interface configuration failed"); + return; + } #if DEMAND_SUPPORT - sifnpmode(f->pcb, PPP_IPV6, NPMODE_PASS); + sifnpmode(f->pcb, PPP_IPV6, NPMODE_PASS); #endif /* DEMAND_SUPPORT */ - ppp_notice("local LL address %s", llv6_ntoa(go->ourid)); - ppp_notice("remote LL address %s", llv6_ntoa(ho->hisid)); + ppp_notice("local LL address %s", llv6_ntoa(go->ourid)); + ppp_notice("remote LL address %s", llv6_ntoa(ho->hisid)); } np_up(f->pcb, PPP_IPV6); @@ -1254,11 +1254,11 @@ static void ipv6cp_up(fsm *f) { #if 0 /* UNUSED */ /* * Execute the ipv6-up script, like this: - * /etc/ppp/ipv6-up interface tty speed local-LL remote-LL + * /etc/ppp/ipv6-up interface tty speed local-LL remote-LL */ if (ipv6cp_script_state == s_down && ipv6cp_script_pid == 0) { - ipv6cp_script_state = s_up; - ipv6cp_script(_PATH_IPV6UP); + ipv6cp_script_state = s_up; + ipv6cp_script(_PATH_IPV6UP); } #endif /* UNUSED */ } @@ -1280,8 +1280,8 @@ static void ipv6cp_down(fsm *f) { update_link_stats(f->unit); #endif /* PPP_STATS_SUPPORT */ if (pcb->ipv6cp_is_up) { - pcb->ipv6cp_is_up = 0; - np_down(f->pcb, PPP_IPV6); + pcb->ipv6cp_is_up = 0; + np_down(f->pcb, PPP_IPV6); } #ifdef IPV6CP_COMP sif6comp(f->unit, 0); @@ -1293,24 +1293,24 @@ static void ipv6cp_down(fsm *f) { * to queue up outgoing packets (for now). */ if (demand) { - sifnpmode(f->pcb, PPP_IPV6, NPMODE_QUEUE); + sifnpmode(f->pcb, PPP_IPV6, NPMODE_QUEUE); } else #endif /* DEMAND_SUPPORT */ { #if DEMAND_SUPPORT - sifnpmode(f->pcb, PPP_IPV6, NPMODE_DROP); + sifnpmode(f->pcb, PPP_IPV6, NPMODE_DROP); #endif /* DEMAND_SUPPORT */ - ipv6cp_clear_addrs(f->pcb, - go->ourid, - ho->hisid); - sif6down(f->pcb); + ipv6cp_clear_addrs(f->pcb, + go->ourid, + ho->hisid); + sif6down(f->pcb); } #if 0 /* UNUSED */ /* Execute the ipv6-down script */ if (ipv6cp_script_state == s_up && ipv6cp_script_pid == 0) { - ipv6cp_script_state = s_down; - ipv6cp_script(_PATH_IPV6DOWN); + ipv6cp_script_state = s_down; + ipv6cp_script(_PATH_IPV6DOWN); } #endif /* UNUSED */ } @@ -1345,17 +1345,17 @@ ipv6cp_script_done(arg) ipv6cp_script_pid = 0; switch (ipv6cp_script_state) { case s_up: - if (ipv6cp_fsm[0].state != PPP_FSM_OPENED) { - ipv6cp_script_state = s_down; - ipv6cp_script(_PATH_IPV6DOWN); - } - break; + if (ipv6cp_fsm[0].state != PPP_FSM_OPENED) { + ipv6cp_script_state = s_down; + ipv6cp_script(_PATH_IPV6DOWN); + } + break; case s_down: - if (ipv6cp_fsm[0].state == PPP_FSM_OPENED) { - ipv6cp_script_state = s_up; - ipv6cp_script(_PATH_IPV6UP); - } - break; + if (ipv6cp_fsm[0].state == PPP_FSM_OPENED) { + ipv6cp_script_state = s_up; + ipv6cp_script(_PATH_IPV6UP); + } + break; } } @@ -1385,7 +1385,7 @@ ipv6cp_script(script) argv[7] = NULL; ipv6cp_script_pid = run_program(script, argv, 0, ipv6cp_script_done, - NULL, 0); + NULL, 0); } #endif /* UNUSED */ @@ -1399,7 +1399,7 @@ static const char* const ipv6cp_codenames[] = { }; static int ipv6cp_printpkt(const u_char *p, int plen, - void (*printer)(void *, const char *, ...), void *arg) { + void (*printer)(void *, const char *, ...), void *arg) { int code, id, len, olen; const u_char *pstart, *optend; #ifdef IPV6CP_COMP @@ -1408,18 +1408,18 @@ static int ipv6cp_printpkt(const u_char *p, int plen, eui64_t ifaceid; if (plen < HEADERLEN) - return 0; + return 0; pstart = p; GETCHAR(code, p); GETCHAR(id, p); GETSHORT(len, p); if (len < HEADERLEN || len > plen) - return 0; + return 0; if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(ipv6cp_codenames)) - printer(arg, " %s", ipv6cp_codenames[code-1]); + printer(arg, " %s", ipv6cp_codenames[code-1]); else - printer(arg, " code=0x%x", code); + printer(arg, " code=0x%x", code); printer(arg, " id=0x%x", id); len -= HEADERLEN; switch (code) { @@ -1427,63 +1427,63 @@ static int ipv6cp_printpkt(const u_char *p, int plen, case CONFACK: case CONFNAK: case CONFREJ: - /* print option list */ - while (len >= 2) { - GETCHAR(code, p); - GETCHAR(olen, p); - p -= 2; - if (olen < 2 || olen > len) { - break; - } - printer(arg, " <"); - len -= olen; - optend = p + olen; - switch (code) { + /* print option list */ + while (len >= 2) { + GETCHAR(code, p); + GETCHAR(olen, p); + p -= 2; + if (olen < 2 || olen > len) { + break; + } + printer(arg, " <"); + len -= olen; + optend = p + olen; + switch (code) { #ifdef IPV6CP_COMP - case CI_COMPRESSTYPE: - if (olen >= CILEN_COMPRESS) { - p += 2; - GETSHORT(cishort, p); - printer(arg, "compress "); - printer(arg, "0x%x", cishort); - } - break; + case CI_COMPRESSTYPE: + if (olen >= CILEN_COMPRESS) { + p += 2; + GETSHORT(cishort, p); + printer(arg, "compress "); + printer(arg, "0x%x", cishort); + } + break; #endif /* IPV6CP_COMP */ - case CI_IFACEID: - if (olen == CILEN_IFACEID) { - p += 2; - eui64_get(ifaceid, p); - printer(arg, "addr %s", llv6_ntoa(ifaceid)); - } - break; - default: - break; - } - while (p < optend) { - GETCHAR(code, p); - printer(arg, " %.2x", code); - } - printer(arg, ">"); - } - break; + case CI_IFACEID: + if (olen == CILEN_IFACEID) { + p += 2; + eui64_get(ifaceid, p); + printer(arg, "addr %s", llv6_ntoa(ifaceid)); + } + break; + default: + break; + } + while (p < optend) { + GETCHAR(code, p); + printer(arg, " %.2x", code); + } + printer(arg, ">"); + } + break; case TERMACK: case TERMREQ: - if (len > 0 && *p >= ' ' && *p < 0x7f) { - printer(arg, " "); - ppp_print_string(p, len, printer, arg); - p += len; - len = 0; - } - break; + if (len > 0 && *p >= ' ' && *p < 0x7f) { + printer(arg, " "); + ppp_print_string(p, len, printer, arg); + p += len; + len = 0; + } + break; default: - break; + break; } /* print the rest of the bytes in the packet */ for (; len > 0; --len) { - GETCHAR(code, p); - printer(arg, " %.2x", code); + GETCHAR(code, p); + printer(arg, " %.2x", code); } return p - pstart; @@ -1496,19 +1496,19 @@ static int ipv6cp_printpkt(const u_char *p, int plen, * We don't bring the link up for IP fragments or for TCP FIN packets * with no data. */ -#define IP6_HDRLEN 40 /* bytes */ -#define IP6_NHDR_FRAG 44 /* fragment IPv6 header */ -#define TCP_HDRLEN 20 -#define TH_FIN 0x01 +#define IP6_HDRLEN 40 /* bytes */ +#define IP6_NHDR_FRAG 44 /* fragment IPv6 header */ +#define TCP_HDRLEN 20 +#define TH_FIN 0x01 /* * We use these macros because the IP header may be at an odd address, * and some compilers might use word loads to get th_off or ip_hl. */ -#define get_ip6nh(x) (((unsigned char *)(x))[6]) -#define get_tcpoff(x) (((unsigned char *)(x))[12] >> 4) -#define get_tcpflags(x) (((unsigned char *)(x))[13]) +#define get_ip6nh(x) (((unsigned char *)(x))[6]) +#define get_tcpoff(x) (((unsigned char *)(x))[12] >> 4) +#define get_tcpflags(x) (((unsigned char *)(x))[13]) static int ipv6_active_pkt(u_char *pkt, int len) { u_char *tcp; @@ -1516,16 +1516,16 @@ static int ipv6_active_pkt(u_char *pkt, int len) { len -= PPP_HDRLEN; pkt += PPP_HDRLEN; if (len < IP6_HDRLEN) - return 0; + return 0; if (get_ip6nh(pkt) == IP6_NHDR_FRAG) - return 0; + return 0; if (get_ip6nh(pkt) != IPPROTO_TCP) - return 1; + return 1; if (len < IP6_HDRLEN + TCP_HDRLEN) - return 0; + return 0; tcp = pkt + IP6_HDRLEN; if ((get_tcpflags(tcp) & TH_FIN) != 0 && len == IP6_HDRLEN + get_tcpoff(tcp) * 4) - return 0; + return 0; return 1; } #endif /* DEMAND_SUPPORT */ diff --git a/Libraries/LwIP/src/netif/ppp/lcp.c b/Libraries/LwIP/src/netif/ppp/lcp.c index b669197..1316918 100755 --- a/Libraries/LwIP/src/netif/ppp/lcp.c +++ b/Libraries/LwIP/src/netif/ppp/lcp.c @@ -68,7 +68,7 @@ * configure-requests. We do this by delaying the fsm_lowerup call. */ /* steal a bit in fsm flags word */ -#define DELAYED_UP 0x80 +#define DELAYED_UP 0x80 static void lcp_delayed_up(void *arg); @@ -76,8 +76,8 @@ static void lcp_delayed_up(void *arg); * LCP-related command-line options. */ #if 0 /* UNUSED */ -int lcp_echo_interval = 0; /* Interval between LCP echo-requests */ -int lcp_echo_fails = 0; /* Tolerance to unanswered echo-requests */ +int lcp_echo_interval = 0; /* Interval between LCP echo-requests */ +int lcp_echo_fails = 0; /* Tolerance to unanswered echo-requests */ #endif /* UNUSED */ #if 0 /* UNUSED */ @@ -88,10 +88,10 @@ static u_int lcp_echo_fails = LCP_MAXECHOFAILS; /* Tolerance to unanswer #if 0 /* UNUSED */ #if PPP_LCP_ADAPTIVE -bool lcp_echo_adaptive = 0; /* request echo only if the link was idle */ +bool lcp_echo_adaptive = 0; /* request echo only if the link was idle */ #endif -bool lax_recv = 0; /* accept control chars in asyncmap */ -bool noendpoint = 0; /* don't send/accept endpoint discriminator */ +bool lax_recv = 0; /* accept control chars in asyncmap */ +bool noendpoint = 0; /* don't send/accept endpoint discriminator */ #endif /* UNUSED */ #if PPP_OPTIONS @@ -101,7 +101,7 @@ static int noopt (char **); #ifdef HAVE_MULTILINK static int setendpoint (char **); static void printendpoint (option_t *, void (*)(void *, char *, ...), - void *); + void *); #endif /* HAVE_MULTILINK */ #if PPP_OPTIONS @@ -215,17 +215,17 @@ static option_t lcp_option_list[] = { /* * Callbacks for fsm code. (CI = Configuration Information) */ -static void lcp_resetci(fsm *f); /* Reset our CI */ -static int lcp_cilen(fsm *f); /* Return length of our CI */ +static void lcp_resetci(fsm *f); /* Reset our CI */ +static int lcp_cilen(fsm *f); /* Return length of our CI */ static void lcp_addci(fsm *f, u_char *ucp, int *lenp); /* Add our CI to pkt */ static int lcp_ackci(fsm *f, u_char *p, int len); /* Peer ack'd our CI */ static int lcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject); /* Peer nak'd our CI */ static int lcp_rejci(fsm *f, u_char *p, int len); /* Peer rej'd our CI */ static int lcp_reqci(fsm *f, u_char *inp, int *lenp, int reject_if_disagree); /* Rcv peer CI */ -static void lcp_up(fsm *f); /* We're UP */ -static void lcp_down(fsm *f); /* We're DOWN */ -static void lcp_starting (fsm *); /* We need lower layer up */ -static void lcp_finished (fsm *); /* We need lower layer down */ +static void lcp_up(fsm *f); /* We're UP */ +static void lcp_down(fsm *f); /* We're DOWN */ +static void lcp_starting (fsm *); /* We need lower layer up */ +static void lcp_finished (fsm *); /* We need lower layer down */ static int lcp_extcode(fsm *f, int code, int id, u_char *inp, int len); static void lcp_rprotrej(fsm *f, u_char *inp, int len); @@ -241,22 +241,22 @@ static void LcpSendEchoRequest(fsm *f); static void LcpLinkFailure(fsm *f); static void LcpEchoCheck(fsm *f); -static const fsm_callbacks lcp_callbacks = { /* LCP callback routines */ - lcp_resetci, /* Reset our Configuration Information */ - lcp_cilen, /* Length of our Configuration Information */ - lcp_addci, /* Add our Configuration Information */ - lcp_ackci, /* ACK our Configuration Information */ - lcp_nakci, /* NAK our Configuration Information */ - lcp_rejci, /* Reject our Configuration Information */ - lcp_reqci, /* Request peer's Configuration Information */ - lcp_up, /* Called when fsm reaches OPENED state */ - lcp_down, /* Called when fsm leaves OPENED state */ - lcp_starting, /* Called when we want the lower layer up */ - lcp_finished, /* Called when we want the lower layer down */ - NULL, /* Called when Protocol-Reject received */ - NULL, /* Retransmission is necessary */ - lcp_extcode, /* Called to handle LCP-specific codes */ - "LCP" /* String name of protocol */ +static const fsm_callbacks lcp_callbacks = { /* LCP callback routines */ + lcp_resetci, /* Reset our Configuration Information */ + lcp_cilen, /* Length of our Configuration Information */ + lcp_addci, /* Add our Configuration Information */ + lcp_ackci, /* ACK our Configuration Information */ + lcp_nakci, /* NAK our Configuration Information */ + lcp_rejci, /* Reject our Configuration Information */ + lcp_reqci, /* Request peer's Configuration Information */ + lcp_up, /* Called when fsm reaches OPENED state */ + lcp_down, /* Called when fsm leaves OPENED state */ + lcp_starting, /* Called when we want the lower layer up */ + lcp_finished, /* Called when we want the lower layer down */ + NULL, /* Called when Protocol-Reject received */ + NULL, /* Retransmission is necessary */ + lcp_extcode, /* Called to handle LCP-specific codes */ + "LCP" /* String name of protocol */ }; /* @@ -269,7 +269,7 @@ static void lcp_input(ppp_pcb *pcb, u_char *p, int len); static void lcp_protrej(ppp_pcb *pcb); #if PRINTPKT_SUPPORT static int lcp_printpkt(const u_char *p, int plen, - void (*printer) (void *, const char *, ...), void *arg); + void (*printer) (void *, const char *, ...), void *arg); #endif /* PRINTPKT_SUPPORT */ const struct protent lcp_protent = { @@ -304,20 +304,20 @@ const struct protent lcp_protent = { /* * Length of each type of configuration option (in octets) */ -#define CILEN_VOID 2 -#define CILEN_CHAR 3 -#define CILEN_SHORT 4 /* CILEN_VOID + 2 */ +#define CILEN_VOID 2 +#define CILEN_CHAR 3 +#define CILEN_SHORT 4 /* CILEN_VOID + 2 */ #if CHAP_SUPPORT -#define CILEN_CHAP 5 /* CILEN_VOID + 2 + 1 */ +#define CILEN_CHAP 5 /* CILEN_VOID + 2 + 1 */ #endif /* CHAP_SUPPORT */ -#define CILEN_LONG 6 /* CILEN_VOID + 4 */ +#define CILEN_LONG 6 /* CILEN_VOID + 4 */ #if LQR_SUPPORT -#define CILEN_LQR 8 /* CILEN_VOID + 2 + 4 */ +#define CILEN_LQR 8 /* CILEN_VOID + 2 + 4 */ #endif /* LQR_SUPPORT */ -#define CILEN_CBCP 3 +#define CILEN_CBCP 3 -#define CODENAME(x) ((x) == CONFACK ? "ACK" : \ - (x) == CONFNAK ? "NAK" : "REJ") +#define CODENAME(x) ((x) == CONFACK ? "ACK" : \ + (x) == CONFNAK ? "NAK" : "REJ") #if PPP_OPTIONS /* @@ -340,8 +340,8 @@ setendpoint(argv) char **argv; { if (str_to_epdisc(&lcp_wantoptions[0].endpoint, *argv)) { - lcp_wantoptions[0].neg_endpoint = 1; - return 1; + lcp_wantoptions[0].neg_endpoint = 1; + return 1; } option_error("Can't parse '%s' as an endpoint discriminator", *argv); return 0; @@ -353,7 +353,7 @@ printendpoint(opt, printer, arg) void (*printer) (void *, char *, ...); void *arg; { - printer(arg, "%s", epdisc_to_str(&lcp_wantoptions[0].endpoint)); + printer(arg, "%s", epdisc_to_str(&lcp_wantoptions[0].endpoint)); } #endif /* HAVE_MULTILINK */ @@ -409,9 +409,9 @@ void lcp_open(ppp_pcb *pcb) { f->flags &= ~(OPT_PASSIVE | OPT_SILENT); if (wo->passive) - f->flags |= OPT_PASSIVE; + f->flags |= OPT_PASSIVE; if (wo->silent) - f->flags |= OPT_SILENT; + f->flags |= OPT_SILENT; fsm_open(f); } @@ -428,25 +428,25 @@ void lcp_close(ppp_pcb *pcb, const char *reason) { && pcb->phase != PPP_PHASE_MASTER #endif /* HAVE_MULTILINK */ ) - new_phase(pcb, PPP_PHASE_TERMINATE); + new_phase(pcb, PPP_PHASE_TERMINATE); if (f->flags & DELAYED_UP) { - UNTIMEOUT(lcp_delayed_up, f); - f->state = PPP_FSM_STOPPED; + UNTIMEOUT(lcp_delayed_up, f); + f->state = PPP_FSM_STOPPED; } oldstate = f->state; fsm_close(f, reason); if (oldstate == PPP_FSM_STOPPED && (f->flags & (OPT_PASSIVE|OPT_SILENT|DELAYED_UP))) { - /* - * This action is not strictly according to the FSM in RFC1548, - * but it does mean that the program terminates if you do a - * lcp_close() when a connection hasn't been established - * because we are in passive/silent mode or because we have - * delayed the fsm_lowerup() call and it hasn't happened yet. - */ - f->flags &= ~DELAYED_UP; - lcp_finished(f); + /* + * This action is not strictly according to the FSM in RFC1548, + * but it does mean that the program terminates if you do a + * lcp_close() when a connection hasn't been established + * because we are in passive/silent mode or because we have + * delayed the fsm_lowerup() call and it hasn't happened yet. + */ + f->flags &= ~DELAYED_UP; + lcp_finished(f); } } @@ -463,16 +463,16 @@ void lcp_lowerup(ppp_pcb *pcb) { * if we are going to ask for A/C and protocol compression. */ if (ppp_send_config(pcb, PPP_MRU, 0xffffffff, 0, 0) < 0 - || ppp_recv_config(pcb, PPP_MRU, (pcb->settings.lax_recv? 0: 0xffffffff), - wo->neg_pcompression, wo->neg_accompression) < 0) - return; + || ppp_recv_config(pcb, PPP_MRU, (pcb->settings.lax_recv? 0: 0xffffffff), + wo->neg_pcompression, wo->neg_accompression) < 0) + return; pcb->peer_mru = PPP_MRU; if (pcb->settings.listen_time != 0) { - f->flags |= DELAYED_UP; - TIMEOUTMS(lcp_delayed_up, f, pcb->settings.listen_time); + f->flags |= DELAYED_UP; + TIMEOUTMS(lcp_delayed_up, f, pcb->settings.listen_time); } else - fsm_lowerup(f); + fsm_lowerup(f); } @@ -483,10 +483,10 @@ void lcp_lowerdown(ppp_pcb *pcb) { fsm *f = &pcb->lcp_fsm; if (f->flags & DELAYED_UP) { - f->flags &= ~DELAYED_UP; - UNTIMEOUT(lcp_delayed_up, f); + f->flags &= ~DELAYED_UP; + UNTIMEOUT(lcp_delayed_up, f); } else - fsm_lowerdown(f); + fsm_lowerdown(f); } @@ -497,8 +497,8 @@ static void lcp_delayed_up(void *arg) { fsm *f = (fsm*)arg; if (f->flags & DELAYED_UP) { - f->flags &= ~DELAYED_UP; - fsm_lowerup(f); + f->flags &= ~DELAYED_UP; + fsm_lowerup(f); } } @@ -510,9 +510,9 @@ static void lcp_input(ppp_pcb *pcb, u_char *p, int len) { fsm *f = &pcb->lcp_fsm; if (f->flags & DELAYED_UP) { - f->flags &= ~DELAYED_UP; - UNTIMEOUT(lcp_delayed_up, f); - fsm_lowerup(f); + f->flags &= ~DELAYED_UP; + UNTIMEOUT(lcp_delayed_up, f); + fsm_lowerup(f); } fsm_input(f, p, len); } @@ -527,28 +527,28 @@ static int lcp_extcode(fsm *f, int code, int id, u_char *inp, int len) { switch( code ){ case PROTREJ: - lcp_rprotrej(f, inp, len); - break; + lcp_rprotrej(f, inp, len); + break; case ECHOREQ: - if (f->state != PPP_FSM_OPENED) - break; - magp = inp; - PUTLONG(go->magicnumber, magp); - fsm_sdata(f, ECHOREP, id, inp, len); - break; + if (f->state != PPP_FSM_OPENED) + break; + magp = inp; + PUTLONG(go->magicnumber, magp); + fsm_sdata(f, ECHOREP, id, inp, len); + break; case ECHOREP: - lcp_received_echo_reply(f, id, inp, len); - break; + lcp_received_echo_reply(f, id, inp, len); + break; case DISCREQ: case IDENTIF: case TIMEREM: - break; + break; default: - return 0; + return 0; } return 1; } @@ -568,8 +568,8 @@ static void lcp_rprotrej(fsm *f, u_char *inp, int len) { #endif /* PPP_PROTOCOLNAME */ if (len < 2) { - LCPDEBUG(("lcp_rprotrej: Rcvd short Protocol-Reject packet!")); - return; + LCPDEBUG(("lcp_rprotrej: Rcvd short Protocol-Reject packet!")); + return; } GETSHORT(prot, inp); @@ -579,8 +579,8 @@ static void lcp_rprotrej(fsm *f, u_char *inp, int len) { * OPENED state SHOULD be silently discarded. */ if( f->state != PPP_FSM_OPENED ){ - LCPDEBUG(("Protocol-Reject discarded: LCP in state %d", f->state)); - return; + LCPDEBUG(("Protocol-Reject discarded: LCP in state %d", f->state)); + return; } #if PPP_PROTOCOLNAME @@ -591,25 +591,25 @@ static void lcp_rprotrej(fsm *f, u_char *inp, int len) { * Upcall the proper Protocol-Reject routine. */ for (i = 0; (protp = protocols[i]) != NULL; ++i) - if (protp->protocol == prot) { + if (protp->protocol == prot) { #if PPP_PROTOCOLNAME - if (pname != NULL) - ppp_dbglog("Protocol-Reject for '%s' (0x%x) received", pname, - prot); - else + if (pname != NULL) + ppp_dbglog("Protocol-Reject for '%s' (0x%x) received", pname, + prot); + else #endif /* PPP_PROTOCOLNAME */ - ppp_dbglog("Protocol-Reject for 0x%x received", prot); - (*protp->protrej)(f->pcb); - return; - } + ppp_dbglog("Protocol-Reject for 0x%x received", prot); + (*protp->protrej)(f->pcb); + return; + } #if PPP_PROTOCOLNAME if (pname != NULL) - ppp_warn("Protocol-Reject for unsupported protocol '%s' (0x%x)", pname, - prot); + ppp_warn("Protocol-Reject for unsupported protocol '%s' (0x%x)", pname, + prot); else #endif /* #if PPP_PROTOCOLNAME */ - ppp_warn("Protocol-Reject for unsupported protocol 0x%x", prot); + ppp_warn("Protocol-Reject for unsupported protocol 0x%x", prot); } @@ -641,7 +641,7 @@ void lcp_sprotrej(ppp_pcb *pcb, u_char *p, int len) { #endif fsm_sdata(f, PROTREJ, ++f->id, - p, len); + p, len); } @@ -748,15 +748,15 @@ static void lcp_resetci(fsm *f) { *go = *wo; #ifdef HAVE_MULTILINK if (!multilink) { - go->neg_mrru = 0; + go->neg_mrru = 0; #endif /* HAVE_MULTILINK */ - go->neg_ssnhf = 0; - go->neg_endpoint = 0; + go->neg_ssnhf = 0; + go->neg_endpoint = 0; #ifdef HAVE_MULTILINK } #endif /* HAVE_MULTILINK */ if (pcb->settings.noendpoint) - ao->neg_endpoint = 0; + ao->neg_endpoint = 0; pcb->peer_mru = PPP_MRU; #if 0 /* UNUSED */ auth_reset(pcb); @@ -771,60 +771,60 @@ static int lcp_cilen(fsm *f) { ppp_pcb *pcb = f->pcb; lcp_options *go = &pcb->lcp_gotoptions; -#define LENCIVOID(neg) ((neg) ? CILEN_VOID : 0) +#define LENCIVOID(neg) ((neg) ? CILEN_VOID : 0) #if CHAP_SUPPORT -#define LENCICHAP(neg) ((neg) ? CILEN_CHAP : 0) +#define LENCICHAP(neg) ((neg) ? CILEN_CHAP : 0) #endif /* CHAP_SUPPORT */ -#define LENCISHORT(neg) ((neg) ? CILEN_SHORT : 0) -#define LENCILONG(neg) ((neg) ? CILEN_LONG : 0) +#define LENCISHORT(neg) ((neg) ? CILEN_SHORT : 0) +#define LENCILONG(neg) ((neg) ? CILEN_LONG : 0) #if LQR_SUPPORT -#define LENCILQR(neg) ((neg) ? CILEN_LQR: 0) +#define LENCILQR(neg) ((neg) ? CILEN_LQR: 0) #endif /* LQR_SUPPORT */ -#define LENCICBCP(neg) ((neg) ? CILEN_CBCP: 0) +#define LENCICBCP(neg) ((neg) ? CILEN_CBCP: 0) /* * NB: we only ask for one of CHAP, UPAP, or EAP, even if we will * accept more than one. We prefer EAP first, then CHAP, then * PAP. */ return (LENCISHORT(go->neg_mru && go->mru != PPP_DEFMRU) + - LENCILONG(go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF) + + LENCILONG(go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF) + #if EAP_SUPPORT - LENCISHORT(go->neg_eap) + + LENCISHORT(go->neg_eap) + #endif /* EAP_SUPPORT */ #if CHAP_SUPPORT /* cannot be improved, embedding a directive within macro arguments is not portable */ #if EAP_SUPPORT - LENCICHAP(!go->neg_eap && go->neg_chap) + + LENCICHAP(!go->neg_eap && go->neg_chap) + #endif /* EAP_SUPPORT */ #if !EAP_SUPPORT - LENCICHAP(go->neg_chap) + + LENCICHAP(go->neg_chap) + #endif /* !EAP_SUPPORT */ #endif /* CHAP_SUPPORT */ #if PAP_SUPPORT /* cannot be improved, embedding a directive within macro arguments is not portable */ #if EAP_SUPPORT && CHAP_SUPPORT - LENCISHORT(!go->neg_eap && !go->neg_chap && go->neg_upap) + + LENCISHORT(!go->neg_eap && !go->neg_chap && go->neg_upap) + #endif /* EAP_SUPPORT && CHAP_SUPPORT */ #if EAP_SUPPORT && !CHAP_SUPPORT - LENCISHORT(!go->neg_eap && go->neg_upap) + + LENCISHORT(!go->neg_eap && go->neg_upap) + #endif /* EAP_SUPPORT && !CHAP_SUPPORT */ #if !EAP_SUPPORT && CHAP_SUPPORT - LENCISHORT(!go->neg_chap && go->neg_upap) + + LENCISHORT(!go->neg_chap && go->neg_upap) + #endif /* !EAP_SUPPORT && CHAP_SUPPORT */ #if !EAP_SUPPORT && !CHAP_SUPPORT - LENCISHORT(go->neg_upap) + + LENCISHORT(go->neg_upap) + #endif /* !EAP_SUPPORT && !CHAP_SUPPORT */ #endif /* PAP_SUPPORT */ #if LQR_SUPPORT - LENCILQR(go->neg_lqr) + + LENCILQR(go->neg_lqr) + #endif /* LQR_SUPPORT */ - LENCICBCP(go->neg_cbcp) + - LENCILONG(go->neg_magicnumber) + - LENCIVOID(go->neg_pcompression) + - LENCIVOID(go->neg_accompression) + + LENCICBCP(go->neg_cbcp) + + LENCILONG(go->neg_magicnumber) + + LENCIVOID(go->neg_pcompression) + + LENCIVOID(go->neg_accompression) + #ifdef HAVE_MULTILINK - LENCISHORT(go->neg_mrru) + + LENCISHORT(go->neg_mrru) + #endif /* HAVE_MULTILINK */ - LENCIVOID(go->neg_ssnhf) + - (go->neg_endpoint? CILEN_CHAR + go->endpoint.length: 0)); + LENCIVOID(go->neg_ssnhf) + + (go->neg_endpoint? CILEN_CHAR + go->endpoint.length: 0)); } @@ -838,58 +838,58 @@ static void lcp_addci(fsm *f, u_char *ucp, int *lenp) { #define ADDCIVOID(opt, neg) \ if (neg) { \ - PUTCHAR(opt, ucp); \ - PUTCHAR(CILEN_VOID, ucp); \ + PUTCHAR(opt, ucp); \ + PUTCHAR(CILEN_VOID, ucp); \ } #define ADDCISHORT(opt, neg, val) \ if (neg) { \ - PUTCHAR(opt, ucp); \ - PUTCHAR(CILEN_SHORT, ucp); \ - PUTSHORT(val, ucp); \ + PUTCHAR(opt, ucp); \ + PUTCHAR(CILEN_SHORT, ucp); \ + PUTSHORT(val, ucp); \ } #if CHAP_SUPPORT #define ADDCICHAP(opt, neg, val) \ if (neg) { \ - PUTCHAR((opt), ucp); \ - PUTCHAR(CILEN_CHAP, ucp); \ - PUTSHORT(PPP_CHAP, ucp); \ - PUTCHAR((CHAP_DIGEST(val)), ucp); \ + PUTCHAR((opt), ucp); \ + PUTCHAR(CILEN_CHAP, ucp); \ + PUTSHORT(PPP_CHAP, ucp); \ + PUTCHAR((CHAP_DIGEST(val)), ucp); \ } #endif /* CHAP_SUPPORT */ #define ADDCILONG(opt, neg, val) \ if (neg) { \ - PUTCHAR(opt, ucp); \ - PUTCHAR(CILEN_LONG, ucp); \ - PUTLONG(val, ucp); \ + PUTCHAR(opt, ucp); \ + PUTCHAR(CILEN_LONG, ucp); \ + PUTLONG(val, ucp); \ } #if LQR_SUPPORT #define ADDCILQR(opt, neg, val) \ if (neg) { \ - PUTCHAR(opt, ucp); \ - PUTCHAR(CILEN_LQR, ucp); \ - PUTSHORT(PPP_LQR, ucp); \ - PUTLONG(val, ucp); \ + PUTCHAR(opt, ucp); \ + PUTCHAR(CILEN_LQR, ucp); \ + PUTSHORT(PPP_LQR, ucp); \ + PUTLONG(val, ucp); \ } #endif /* LQR_SUPPORT */ #define ADDCICHAR(opt, neg, val) \ if (neg) { \ - PUTCHAR(opt, ucp); \ - PUTCHAR(CILEN_CHAR, ucp); \ - PUTCHAR(val, ucp); \ + PUTCHAR(opt, ucp); \ + PUTCHAR(CILEN_CHAR, ucp); \ + PUTCHAR(val, ucp); \ } #define ADDCIENDP(opt, neg, class, val, len) \ if (neg) { \ - int i; \ - PUTCHAR(opt, ucp); \ - PUTCHAR(CILEN_CHAR + len, ucp); \ - PUTCHAR(class, ucp); \ - for (i = 0; i < len; ++i) \ - PUTCHAR(val[i], ucp); \ + int i; \ + PUTCHAR(opt, ucp); \ + PUTCHAR(CILEN_CHAR + len, ucp); \ + PUTCHAR(class, ucp); \ + for (i = 0; i < len; ++i) \ + PUTCHAR(val[i], ucp); \ } ADDCISHORT(CI_MRU, go->neg_mru && go->mru != PPP_DEFMRU, go->mru); ADDCILONG(CI_ASYNCMAP, go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF, - go->asyncmap); + go->asyncmap); #if EAP_SUPPORT ADDCISHORT(CI_AUTHTYPE, go->neg_eap, PPP_EAP); #endif /* EAP_SUPPORT */ @@ -927,11 +927,11 @@ static void lcp_addci(fsm *f, u_char *ucp, int *lenp) { #endif ADDCIVOID(CI_SSNHF, go->neg_ssnhf); ADDCIENDP(CI_EPDISC, go->neg_endpoint, go->endpoint.class_, - go->endpoint.value, go->endpoint.length); + go->endpoint.value, go->endpoint.length); if (ucp - start_ucp != *lenp) { - /* this should never happen, because peer_mtu should be 1500 */ - ppp_error("Bug in lcp_addci: wrong length"); + /* this should never happen, because peer_mtu should be 1500 */ + ppp_error("Bug in lcp_addci: wrong length"); } } @@ -941,8 +941,8 @@ static void lcp_addci(fsm *f, u_char *ucp, int *lenp) { * This should not modify any state if the Ack is bad. * * Returns: - * 0 - Ack was bad. - * 1 - Ack was good. + * 0 - Ack was bad. + * 1 - Ack was good. */ static int lcp_ackci(fsm *f, u_char *p, int len) { ppp_pcb *pcb = f->pcb; @@ -958,112 +958,112 @@ static int lcp_ackci(fsm *f, u_char *p, int len) { */ #define ACKCIVOID(opt, neg) \ if (neg) { \ - if ((len -= CILEN_VOID) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != CILEN_VOID || \ - citype != opt) \ - goto bad; \ + if ((len -= CILEN_VOID) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != CILEN_VOID || \ + citype != opt) \ + goto bad; \ } #define ACKCISHORT(opt, neg, val) \ if (neg) { \ - if ((len -= CILEN_SHORT) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != CILEN_SHORT || \ - citype != opt) \ - goto bad; \ - GETSHORT(cishort, p); \ - if (cishort != val) \ - goto bad; \ + if ((len -= CILEN_SHORT) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != CILEN_SHORT || \ + citype != opt) \ + goto bad; \ + GETSHORT(cishort, p); \ + if (cishort != val) \ + goto bad; \ } #define ACKCICHAR(opt, neg, val) \ if (neg) { \ - if ((len -= CILEN_CHAR) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != CILEN_CHAR || \ - citype != opt) \ - goto bad; \ - GETCHAR(cichar, p); \ - if (cichar != val) \ - goto bad; \ + if ((len -= CILEN_CHAR) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != CILEN_CHAR || \ + citype != opt) \ + goto bad; \ + GETCHAR(cichar, p); \ + if (cichar != val) \ + goto bad; \ } #if CHAP_SUPPORT #define ACKCICHAP(opt, neg, val) \ if (neg) { \ - if ((len -= CILEN_CHAP) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != CILEN_CHAP || \ - citype != (opt)) \ - goto bad; \ - GETSHORT(cishort, p); \ - if (cishort != PPP_CHAP) \ - goto bad; \ - GETCHAR(cichar, p); \ - if (cichar != (CHAP_DIGEST(val))) \ - goto bad; \ + if ((len -= CILEN_CHAP) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != CILEN_CHAP || \ + citype != (opt)) \ + goto bad; \ + GETSHORT(cishort, p); \ + if (cishort != PPP_CHAP) \ + goto bad; \ + GETCHAR(cichar, p); \ + if (cichar != (CHAP_DIGEST(val))) \ + goto bad; \ } #endif /* CHAP_SUPPORT */ #define ACKCILONG(opt, neg, val) \ if (neg) { \ - if ((len -= CILEN_LONG) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != CILEN_LONG || \ - citype != opt) \ - goto bad; \ - GETLONG(cilong, p); \ - if (cilong != val) \ - goto bad; \ + if ((len -= CILEN_LONG) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != CILEN_LONG || \ + citype != opt) \ + goto bad; \ + GETLONG(cilong, p); \ + if (cilong != val) \ + goto bad; \ } #if LQR_SUPPORT #define ACKCILQR(opt, neg, val) \ if (neg) { \ - if ((len -= CILEN_LQR) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != CILEN_LQR || \ - citype != opt) \ - goto bad; \ - GETSHORT(cishort, p); \ - if (cishort != PPP_LQR) \ - goto bad; \ - GETLONG(cilong, p); \ - if (cilong != val) \ - goto bad; \ + if ((len -= CILEN_LQR) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != CILEN_LQR || \ + citype != opt) \ + goto bad; \ + GETSHORT(cishort, p); \ + if (cishort != PPP_LQR) \ + goto bad; \ + GETLONG(cilong, p); \ + if (cilong != val) \ + goto bad; \ } #endif /* LQR_SUPPORT */ #define ACKCIENDP(opt, neg, class, val, vlen) \ if (neg) { \ - int i; \ - if ((len -= CILEN_CHAR + vlen) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != CILEN_CHAR + vlen || \ - citype != opt) \ - goto bad; \ - GETCHAR(cichar, p); \ - if (cichar != class) \ - goto bad; \ - for (i = 0; i < vlen; ++i) { \ - GETCHAR(cichar, p); \ - if (cichar != val[i]) \ - goto bad; \ - } \ + int i; \ + if ((len -= CILEN_CHAR + vlen) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != CILEN_CHAR + vlen || \ + citype != opt) \ + goto bad; \ + GETCHAR(cichar, p); \ + if (cichar != class) \ + goto bad; \ + for (i = 0; i < vlen; ++i) { \ + GETCHAR(cichar, p); \ + if (cichar != val[i]) \ + goto bad; \ + } \ } ACKCISHORT(CI_MRU, go->neg_mru && go->mru != PPP_DEFMRU, go->mru); ACKCILONG(CI_ASYNCMAP, go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF, - go->asyncmap); + go->asyncmap); #if EAP_SUPPORT ACKCISHORT(CI_AUTHTYPE, go->neg_eap, PPP_EAP); #endif /* EAP_SUPPORT */ @@ -1101,13 +1101,13 @@ static int lcp_ackci(fsm *f, u_char *p, int len) { #endif /* HAVE_MULTILINK */ ACKCIVOID(CI_SSNHF, go->neg_ssnhf); ACKCIENDP(CI_EPDISC, go->neg_endpoint, go->endpoint.class_, - go->endpoint.value, go->endpoint.length); + go->endpoint.value, go->endpoint.length); /* * If there are any remaining CIs, then this packet is bad. */ if (len != 0) - goto bad; + goto bad; return (1); bad: LCPDEBUG(("lcp_acki: received bad Ack!")); @@ -1121,8 +1121,8 @@ bad: * or if LCP is in the OPENED state. * * Returns: - * 0 - Nak was bad. - * 1 - Nak was good. + * 0 - Nak was bad. + * 1 - Nak was good. */ static int lcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { ppp_pcb *pcb = f->pcb; @@ -1131,8 +1131,8 @@ static int lcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { u_char citype, cichar, *next; u_short cishort; u32_t cilong; - lcp_options no; /* options we've seen Naks for */ - lcp_options try_; /* options to request next time */ + lcp_options no; /* options we've seen Naks for */ + lcp_options try_; /* options to request next time */ int looped_back = 0; int cilen; @@ -1146,85 +1146,85 @@ static int lcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { */ #define NAKCIVOID(opt, neg) \ if (go->neg && \ - len >= CILEN_VOID && \ - p[1] == CILEN_VOID && \ - p[0] == opt) { \ - len -= CILEN_VOID; \ - INCPTR(CILEN_VOID, p); \ - no.neg = 1; \ - try_.neg = 0; \ + len >= CILEN_VOID && \ + p[1] == CILEN_VOID && \ + p[0] == opt) { \ + len -= CILEN_VOID; \ + INCPTR(CILEN_VOID, p); \ + no.neg = 1; \ + try_.neg = 0; \ } #if CHAP_SUPPORT #define NAKCICHAP(opt, neg, code) \ if (go->neg && \ - len >= CILEN_CHAP && \ - p[1] == CILEN_CHAP && \ - p[0] == opt) { \ - len -= CILEN_CHAP; \ - INCPTR(2, p); \ - GETSHORT(cishort, p); \ - GETCHAR(cichar, p); \ - no.neg = 1; \ - code \ + len >= CILEN_CHAP && \ + p[1] == CILEN_CHAP && \ + p[0] == opt) { \ + len -= CILEN_CHAP; \ + INCPTR(2, p); \ + GETSHORT(cishort, p); \ + GETCHAR(cichar, p); \ + no.neg = 1; \ + code \ } #endif /* CHAP_SUPPORT */ #define NAKCICHAR(opt, neg, code) \ if (go->neg && \ - len >= CILEN_CHAR && \ - p[1] == CILEN_CHAR && \ - p[0] == opt) { \ - len -= CILEN_CHAR; \ - INCPTR(2, p); \ - GETCHAR(cichar, p); \ - no.neg = 1; \ - code \ + len >= CILEN_CHAR && \ + p[1] == CILEN_CHAR && \ + p[0] == opt) { \ + len -= CILEN_CHAR; \ + INCPTR(2, p); \ + GETCHAR(cichar, p); \ + no.neg = 1; \ + code \ } #define NAKCISHORT(opt, neg, code) \ if (go->neg && \ - len >= CILEN_SHORT && \ - p[1] == CILEN_SHORT && \ - p[0] == opt) { \ - len -= CILEN_SHORT; \ - INCPTR(2, p); \ - GETSHORT(cishort, p); \ - no.neg = 1; \ - code \ + len >= CILEN_SHORT && \ + p[1] == CILEN_SHORT && \ + p[0] == opt) { \ + len -= CILEN_SHORT; \ + INCPTR(2, p); \ + GETSHORT(cishort, p); \ + no.neg = 1; \ + code \ } #define NAKCILONG(opt, neg, code) \ if (go->neg && \ - len >= CILEN_LONG && \ - p[1] == CILEN_LONG && \ - p[0] == opt) { \ - len -= CILEN_LONG; \ - INCPTR(2, p); \ - GETLONG(cilong, p); \ - no.neg = 1; \ - code \ + len >= CILEN_LONG && \ + p[1] == CILEN_LONG && \ + p[0] == opt) { \ + len -= CILEN_LONG; \ + INCPTR(2, p); \ + GETLONG(cilong, p); \ + no.neg = 1; \ + code \ } #if LQR_SUPPORT #define NAKCILQR(opt, neg, code) \ if (go->neg && \ - len >= CILEN_LQR && \ - p[1] == CILEN_LQR && \ - p[0] == opt) { \ - len -= CILEN_LQR; \ - INCPTR(2, p); \ - GETSHORT(cishort, p); \ - GETLONG(cilong, p); \ - no.neg = 1; \ - code \ + len >= CILEN_LQR && \ + p[1] == CILEN_LQR && \ + p[0] == opt) { \ + len -= CILEN_LQR; \ + INCPTR(2, p); \ + GETSHORT(cishort, p); \ + GETLONG(cilong, p); \ + no.neg = 1; \ + code \ } #endif /* LQR_SUPPORT */ #define NAKCIENDP(opt, neg) \ if (go->neg && \ - len >= CILEN_CHAR && \ - p[0] == opt && \ - p[1] >= CILEN_CHAR && \ - p[1] <= len) { \ - len -= p[1]; \ - INCPTR(p[1], p); \ - no.neg = 1; \ - try_.neg = 0; \ + len >= CILEN_CHAR && \ + p[0] == opt && \ + p[1] >= CILEN_CHAR && \ + p[1] <= len) { \ + len -= p[1]; \ + INCPTR(p[1], p); \ + no.neg = 1; \ + try_.neg = 0; \ } /* @@ -1239,19 +1239,19 @@ static int lcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { * the limit of the default MRU we'd get if we didn't negotiate. */ if (go->neg_mru && go->mru != PPP_DEFMRU) { - NAKCISHORT(CI_MRU, neg_mru, - if (cishort <= wo->mru || cishort <= PPP_DEFMRU) - try_.mru = cishort; - ); + NAKCISHORT(CI_MRU, neg_mru, + if (cishort <= wo->mru || cishort <= PPP_DEFMRU) + try_.mru = cishort; + ); } /* * Add any characters they want to our (receive-side) asyncmap. */ if (go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF) { - NAKCILONG(CI_ASYNCMAP, neg_asyncmap, - try_.asyncmap = go->asyncmap | cilong; - ); + NAKCILONG(CI_ASYNCMAP, neg_asyncmap, + try_.asyncmap = go->asyncmap | cilong; + ); } /* @@ -1270,125 +1270,125 @@ static int lcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { || go->neg_eap #endif /* EAP_SUPPORT */ ) - && len >= CILEN_SHORT - && p[0] == CI_AUTHTYPE && p[1] >= CILEN_SHORT && p[1] <= len) { - cilen = p[1]; - len -= cilen; + && len >= CILEN_SHORT + && p[0] == CI_AUTHTYPE && p[1] >= CILEN_SHORT && p[1] <= len) { + cilen = p[1]; + len -= cilen; #if CHAP_SUPPORT - no.neg_chap = go->neg_chap; + no.neg_chap = go->neg_chap; #endif /* CHAP_SUPPORT */ #if PAP_SUPPORT - no.neg_upap = go->neg_upap; + no.neg_upap = go->neg_upap; #endif /* PAP_SUPPORT */ #if EAP_SUPPORT - no.neg_eap = go->neg_eap; + no.neg_eap = go->neg_eap; #endif /* EAP_SUPPORT */ - INCPTR(2, p); - GETSHORT(cishort, p); + INCPTR(2, p); + GETSHORT(cishort, p); #if PAP_SUPPORT - if (cishort == PPP_PAP && cilen == CILEN_SHORT) { + if (cishort == PPP_PAP && cilen == CILEN_SHORT) { #if EAP_SUPPORT - /* If we were asking for EAP, then we need to stop that. */ - if (go->neg_eap) - try_.neg_eap = 0; - else + /* If we were asking for EAP, then we need to stop that. */ + if (go->neg_eap) + try_.neg_eap = 0; + else #endif /* EAP_SUPPORT */ #if CHAP_SUPPORT - /* If we were asking for CHAP, then we need to stop that. */ - if (go->neg_chap) - try_.neg_chap = 0; - else + /* If we were asking for CHAP, then we need to stop that. */ + if (go->neg_chap) + try_.neg_chap = 0; + else #endif /* CHAP_SUPPORT */ - /* - * If we weren't asking for CHAP or EAP, then we were asking for - * PAP, in which case this Nak is bad. - */ - goto bad; - } else + /* + * If we weren't asking for CHAP or EAP, then we were asking for + * PAP, in which case this Nak is bad. + */ + goto bad; + } else #endif /* PAP_SUPPORT */ #if CHAP_SUPPORT - if (cishort == PPP_CHAP && cilen == CILEN_CHAP) { - GETCHAR(cichar, p); + if (cishort == PPP_CHAP && cilen == CILEN_CHAP) { + GETCHAR(cichar, p); #if EAP_SUPPORT - /* Stop asking for EAP, if we were. */ - if (go->neg_eap) { - try_.neg_eap = 0; - /* Try to set up to use their suggestion, if possible */ - if (CHAP_CANDIGEST(go->chap_mdtype, cichar)) - try_.chap_mdtype = CHAP_MDTYPE_D(cichar); - } else + /* Stop asking for EAP, if we were. */ + if (go->neg_eap) { + try_.neg_eap = 0; + /* Try to set up to use their suggestion, if possible */ + if (CHAP_CANDIGEST(go->chap_mdtype, cichar)) + try_.chap_mdtype = CHAP_MDTYPE_D(cichar); + } else #endif /* EAP_SUPPORT */ - if (go->neg_chap) { - /* - * We were asking for our preferred algorithm, they must - * want something different. - */ - if (cichar != CHAP_DIGEST(go->chap_mdtype)) { - if (CHAP_CANDIGEST(go->chap_mdtype, cichar)) { - /* Use their suggestion if we support it ... */ - try_.chap_mdtype = CHAP_MDTYPE_D(cichar); - } else { - /* ... otherwise, try our next-preferred algorithm. */ - try_.chap_mdtype &= ~(CHAP_MDTYPE(try_.chap_mdtype)); - if (try_.chap_mdtype == MDTYPE_NONE) /* out of algos */ - try_.neg_chap = 0; - } - } else { - /* - * Whoops, they Nak'd our algorithm of choice - * but then suggested it back to us. - */ - goto bad; - } - } else { - /* - * Stop asking for PAP if we were asking for it. - */ + if (go->neg_chap) { + /* + * We were asking for our preferred algorithm, they must + * want something different. + */ + if (cichar != CHAP_DIGEST(go->chap_mdtype)) { + if (CHAP_CANDIGEST(go->chap_mdtype, cichar)) { + /* Use their suggestion if we support it ... */ + try_.chap_mdtype = CHAP_MDTYPE_D(cichar); + } else { + /* ... otherwise, try our next-preferred algorithm. */ + try_.chap_mdtype &= ~(CHAP_MDTYPE(try_.chap_mdtype)); + if (try_.chap_mdtype == MDTYPE_NONE) /* out of algos */ + try_.neg_chap = 0; + } + } else { + /* + * Whoops, they Nak'd our algorithm of choice + * but then suggested it back to us. + */ + goto bad; + } + } else { + /* + * Stop asking for PAP if we were asking for it. + */ #if PAP_SUPPORT - try_.neg_upap = 0; + try_.neg_upap = 0; #endif /* PAP_SUPPORT */ - } + } - } else + } else #endif /* CHAP_SUPPORT */ - { + { #if EAP_SUPPORT - /* - * If we were asking for EAP, and they're Conf-Naking EAP, - * well, that's just strange. Nobody should do that. - */ - if (cishort == PPP_EAP && cilen == CILEN_SHORT && go->neg_eap) - ppp_dbglog("Unexpected Conf-Nak for EAP"); + /* + * If we were asking for EAP, and they're Conf-Naking EAP, + * well, that's just strange. Nobody should do that. + */ + if (cishort == PPP_EAP && cilen == CILEN_SHORT && go->neg_eap) + ppp_dbglog("Unexpected Conf-Nak for EAP"); - /* - * We don't recognize what they're suggesting. - * Stop asking for what we were asking for. - */ - if (go->neg_eap) - try_.neg_eap = 0; - else + /* + * We don't recognize what they're suggesting. + * Stop asking for what we were asking for. + */ + if (go->neg_eap) + try_.neg_eap = 0; + else #endif /* EAP_SUPPORT */ #if CHAP_SUPPORT - if (go->neg_chap) - try_.neg_chap = 0; - else + if (go->neg_chap) + try_.neg_chap = 0; + else #endif /* CHAP_SUPPORT */ #if PAP_SUPPORT - if(1) - try_.neg_upap = 0; - else + if(1) + try_.neg_upap = 0; + else #endif /* PAP_SUPPORT */ - {} + {} - p += cilen - CILEN_SHORT; - } + p += cilen - CILEN_SHORT; + } } #if LQR_SUPPORT @@ -1398,11 +1398,11 @@ static int lcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { * If they Nak the reporting period, take their value XXX ? */ NAKCILQR(CI_QUALITY, neg_lqr, - if (cishort != PPP_LQR) - try_.neg_lqr = 0; - else - try_.lqr_period = cilong; - ); + if (cishort != PPP_LQR) + try_.neg_lqr = 0; + else + try_.lqr_period = cilong; + ); #endif /* LQR_SUPPORT */ /* @@ -1417,9 +1417,9 @@ static int lcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { * Check for a looped-back line. */ NAKCILONG(CI_MAGICNUMBER, neg_magicnumber, - try_.magicnumber = magic(); - looped_back = 1; - ); + try_.magicnumber = magic(); + looped_back = 1; + ); /* * Peer shouldn't send Nak for protocol compression or @@ -1435,12 +1435,12 @@ static int lcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { * than the one we want. */ if (go->neg_mrru) { - NAKCISHORT(CI_MRRU, neg_mrru, - if (treat_as_reject) - try_.neg_mrru = 0; - else if (cishort <= wo->mrru) - try_.mrru = cishort; - ); + NAKCISHORT(CI_MRRU, neg_mrru, + if (treat_as_reject) + try_.neg_mrru = 0; + else if (cishort <= wo->mrru) + try_.mrru = cishort; + ); } #else /* HAVE_MULTILINK */ LWIP_UNUSED_ARG(treat_as_reject); @@ -1475,30 +1475,30 @@ static int lcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { * negotiate some option we don't support, so ignore it. */ while (len >= CILEN_VOID) { - GETCHAR(citype, p); - GETCHAR(cilen, p); - if (cilen < CILEN_VOID || (len -= cilen) < 0) - goto bad; - next = p + cilen - 2; + GETCHAR(citype, p); + GETCHAR(cilen, p); + if (cilen < CILEN_VOID || (len -= cilen) < 0) + goto bad; + next = p + cilen - 2; - switch (citype) { - case CI_MRU: - if ((go->neg_mru && go->mru != PPP_DEFMRU) - || no.neg_mru || cilen != CILEN_SHORT) - goto bad; - GETSHORT(cishort, p); - if (cishort < PPP_DEFMRU) { - try_.neg_mru = 1; - try_.mru = cishort; - } - break; - case CI_ASYNCMAP: - if ((go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF) - || no.neg_asyncmap || cilen != CILEN_LONG) - goto bad; - break; - case CI_AUTHTYPE: - if (0 + switch (citype) { + case CI_MRU: + if ((go->neg_mru && go->mru != PPP_DEFMRU) + || no.neg_mru || cilen != CILEN_SHORT) + goto bad; + GETSHORT(cishort, p); + if (cishort < PPP_DEFMRU) { + try_.neg_mru = 1; + try_.mru = cishort; + } + break; + case CI_ASYNCMAP: + if ((go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF) + || no.neg_asyncmap || cilen != CILEN_LONG) + goto bad; + break; + case CI_AUTHTYPE: + if (0 #if CHAP_SUPPORT || go->neg_chap || no.neg_chap #endif /* CHAP_SUPPORT */ @@ -1506,51 +1506,51 @@ static int lcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { || go->neg_upap || no.neg_upap #endif /* PAP_SUPPORT */ #if EAP_SUPPORT - || go->neg_eap || no.neg_eap + || go->neg_eap || no.neg_eap #endif /* EAP_SUPPORT */ - ) - goto bad; - break; - case CI_MAGICNUMBER: - if (go->neg_magicnumber || no.neg_magicnumber || - cilen != CILEN_LONG) - goto bad; - break; - case CI_PCOMPRESSION: - if (go->neg_pcompression || no.neg_pcompression - || cilen != CILEN_VOID) - goto bad; - break; - case CI_ACCOMPRESSION: - if (go->neg_accompression || no.neg_accompression - || cilen != CILEN_VOID) - goto bad; - break; + ) + goto bad; + break; + case CI_MAGICNUMBER: + if (go->neg_magicnumber || no.neg_magicnumber || + cilen != CILEN_LONG) + goto bad; + break; + case CI_PCOMPRESSION: + if (go->neg_pcompression || no.neg_pcompression + || cilen != CILEN_VOID) + goto bad; + break; + case CI_ACCOMPRESSION: + if (go->neg_accompression || no.neg_accompression + || cilen != CILEN_VOID) + goto bad; + break; #if LQR_SUPPORT - case CI_QUALITY: - if (go->neg_lqr || no.neg_lqr || cilen != CILEN_LQR) - goto bad; - break; + case CI_QUALITY: + if (go->neg_lqr || no.neg_lqr || cilen != CILEN_LQR) + goto bad; + break; #endif /* LQR_SUPPORT */ #ifdef HAVE_MULTILINK - case CI_MRRU: - if (go->neg_mrru || no.neg_mrru || cilen != CILEN_SHORT) - goto bad; - break; + case CI_MRRU: + if (go->neg_mrru || no.neg_mrru || cilen != CILEN_SHORT) + goto bad; + break; #endif /* HAVE_MULTILINK */ - case CI_SSNHF: - if (go->neg_ssnhf || no.neg_ssnhf || cilen != CILEN_VOID) - goto bad; - try_.neg_ssnhf = 1; - break; - case CI_EPDISC: - if (go->neg_endpoint || no.neg_endpoint || cilen < CILEN_CHAR) - goto bad; - break; - default: - break; - } - p = next; + case CI_SSNHF: + if (go->neg_ssnhf || no.neg_ssnhf || cilen != CILEN_VOID) + goto bad; + try_.neg_ssnhf = 1; + break; + case CI_EPDISC: + if (go->neg_endpoint || no.neg_endpoint || cilen < CILEN_CHAR) + goto bad; + break; + default: + break; + } + p = next; } /* @@ -1558,15 +1558,15 @@ static int lcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { * If there are any options left we ignore them. */ if (f->state != PPP_FSM_OPENED) { - if (looped_back) { - if (++try_.numloops >= pcb->settings.lcp_loopbackfail) { - ppp_notice("Serial line is looped back."); - pcb->err_code = PPPERR_LOOPBACK; - lcp_close(f->pcb, "Loopback detected"); - } - } else - try_.numloops = 0; - *go = try_; + if (looped_back) { + if (++try_.numloops >= pcb->settings.lcp_loopbackfail) { + ppp_notice("Serial line is looped back."); + pcb->err_code = PPPERR_LOOPBACK; + lcp_close(f->pcb, "Loopback detected"); + } + } else + try_.numloops = 0; + *go = try_; } return 1; @@ -1583,8 +1583,8 @@ bad: * or if LCP is in the OPENED state. * * Returns: - * 0 - Reject was bad. - * 1 - Reject was good. + * 0 - Reject was bad. + * 1 - Reject was good. */ static int lcp_rejci(fsm *f, u_char *p, int len) { ppp_pcb *pcb = f->pcb; @@ -1592,7 +1592,7 @@ static int lcp_rejci(fsm *f, u_char *p, int len) { u_char cichar; u_short cishort; u32_t cilong; - lcp_options try_; /* options to request next time */ + lcp_options try_; /* options to request next time */ try_ = *go; @@ -1603,157 +1603,157 @@ static int lcp_rejci(fsm *f, u_char *p, int len) { */ #define REJCIVOID(opt, neg) \ if (go->neg && \ - len >= CILEN_VOID && \ - p[1] == CILEN_VOID && \ - p[0] == opt) { \ - len -= CILEN_VOID; \ - INCPTR(CILEN_VOID, p); \ - try_.neg = 0; \ + len >= CILEN_VOID && \ + p[1] == CILEN_VOID && \ + p[0] == opt) { \ + len -= CILEN_VOID; \ + INCPTR(CILEN_VOID, p); \ + try_.neg = 0; \ } #define REJCISHORT(opt, neg, val) \ if (go->neg && \ - len >= CILEN_SHORT && \ - p[1] == CILEN_SHORT && \ - p[0] == opt) { \ - len -= CILEN_SHORT; \ - INCPTR(2, p); \ - GETSHORT(cishort, p); \ - /* Check rejected value. */ \ - if (cishort != val) \ - goto bad; \ - try_.neg = 0; \ + len >= CILEN_SHORT && \ + p[1] == CILEN_SHORT && \ + p[0] == opt) { \ + len -= CILEN_SHORT; \ + INCPTR(2, p); \ + GETSHORT(cishort, p); \ + /* Check rejected value. */ \ + if (cishort != val) \ + goto bad; \ + try_.neg = 0; \ } #if CHAP_SUPPORT && EAP_SUPPORT && PAP_SUPPORT #define REJCICHAP(opt, neg, val) \ if (go->neg && \ - len >= CILEN_CHAP && \ - p[1] == CILEN_CHAP && \ - p[0] == opt) { \ - len -= CILEN_CHAP; \ - INCPTR(2, p); \ - GETSHORT(cishort, p); \ - GETCHAR(cichar, p); \ - /* Check rejected value. */ \ - if ((cishort != PPP_CHAP) || (cichar != (CHAP_DIGEST(val)))) \ - goto bad; \ - try_.neg = 0; \ - try_.neg_eap = try_.neg_upap = 0; \ + len >= CILEN_CHAP && \ + p[1] == CILEN_CHAP && \ + p[0] == opt) { \ + len -= CILEN_CHAP; \ + INCPTR(2, p); \ + GETSHORT(cishort, p); \ + GETCHAR(cichar, p); \ + /* Check rejected value. */ \ + if ((cishort != PPP_CHAP) || (cichar != (CHAP_DIGEST(val)))) \ + goto bad; \ + try_.neg = 0; \ + try_.neg_eap = try_.neg_upap = 0; \ } #endif /* CHAP_SUPPORT && EAP_SUPPORT && PAP_SUPPORT */ #if CHAP_SUPPORT && !EAP_SUPPORT && PAP_SUPPORT #define REJCICHAP(opt, neg, val) \ if (go->neg && \ - len >= CILEN_CHAP && \ - p[1] == CILEN_CHAP && \ - p[0] == opt) { \ - len -= CILEN_CHAP; \ - INCPTR(2, p); \ - GETSHORT(cishort, p); \ - GETCHAR(cichar, p); \ - /* Check rejected value. */ \ - if ((cishort != PPP_CHAP) || (cichar != (CHAP_DIGEST(val)))) \ - goto bad; \ - try_.neg = 0; \ - try_.neg_upap = 0; \ + len >= CILEN_CHAP && \ + p[1] == CILEN_CHAP && \ + p[0] == opt) { \ + len -= CILEN_CHAP; \ + INCPTR(2, p); \ + GETSHORT(cishort, p); \ + GETCHAR(cichar, p); \ + /* Check rejected value. */ \ + if ((cishort != PPP_CHAP) || (cichar != (CHAP_DIGEST(val)))) \ + goto bad; \ + try_.neg = 0; \ + try_.neg_upap = 0; \ } #endif /* CHAP_SUPPORT && !EAP_SUPPORT && PAP_SUPPORT */ #if CHAP_SUPPORT && EAP_SUPPORT && !PAP_SUPPORT #define REJCICHAP(opt, neg, val) \ if (go->neg && \ - len >= CILEN_CHAP && \ - p[1] == CILEN_CHAP && \ - p[0] == opt) { \ - len -= CILEN_CHAP; \ - INCPTR(2, p); \ - GETSHORT(cishort, p); \ - GETCHAR(cichar, p); \ - /* Check rejected value. */ \ - if ((cishort != PPP_CHAP) || (cichar != (CHAP_DIGEST(val)))) \ - goto bad; \ - try_.neg = 0; \ - try_.neg_eap = 0; \ + len >= CILEN_CHAP && \ + p[1] == CILEN_CHAP && \ + p[0] == opt) { \ + len -= CILEN_CHAP; \ + INCPTR(2, p); \ + GETSHORT(cishort, p); \ + GETCHAR(cichar, p); \ + /* Check rejected value. */ \ + if ((cishort != PPP_CHAP) || (cichar != (CHAP_DIGEST(val)))) \ + goto bad; \ + try_.neg = 0; \ + try_.neg_eap = 0; \ } #endif /* CHAP_SUPPORT && EAP_SUPPORT && !PAP_SUPPORT */ #if CHAP_SUPPORT && !EAP_SUPPORT && !PAP_SUPPORT #define REJCICHAP(opt, neg, val) \ if (go->neg && \ - len >= CILEN_CHAP && \ - p[1] == CILEN_CHAP && \ - p[0] == opt) { \ - len -= CILEN_CHAP; \ - INCPTR(2, p); \ - GETSHORT(cishort, p); \ - GETCHAR(cichar, p); \ - /* Check rejected value. */ \ - if ((cishort != PPP_CHAP) || (cichar != (CHAP_DIGEST(val)))) \ - goto bad; \ - try_.neg = 0; \ + len >= CILEN_CHAP && \ + p[1] == CILEN_CHAP && \ + p[0] == opt) { \ + len -= CILEN_CHAP; \ + INCPTR(2, p); \ + GETSHORT(cishort, p); \ + GETCHAR(cichar, p); \ + /* Check rejected value. */ \ + if ((cishort != PPP_CHAP) || (cichar != (CHAP_DIGEST(val)))) \ + goto bad; \ + try_.neg = 0; \ } #endif /* CHAP_SUPPORT && !EAP_SUPPORT && !PAP_SUPPORT */ #define REJCILONG(opt, neg, val) \ if (go->neg && \ - len >= CILEN_LONG && \ - p[1] == CILEN_LONG && \ - p[0] == opt) { \ - len -= CILEN_LONG; \ - INCPTR(2, p); \ - GETLONG(cilong, p); \ - /* Check rejected value. */ \ - if (cilong != val) \ - goto bad; \ - try_.neg = 0; \ + len >= CILEN_LONG && \ + p[1] == CILEN_LONG && \ + p[0] == opt) { \ + len -= CILEN_LONG; \ + INCPTR(2, p); \ + GETLONG(cilong, p); \ + /* Check rejected value. */ \ + if (cilong != val) \ + goto bad; \ + try_.neg = 0; \ } #if LQR_SUPPORT #define REJCILQR(opt, neg, val) \ if (go->neg && \ - len >= CILEN_LQR && \ - p[1] == CILEN_LQR && \ - p[0] == opt) { \ - len -= CILEN_LQR; \ - INCPTR(2, p); \ - GETSHORT(cishort, p); \ - GETLONG(cilong, p); \ - /* Check rejected value. */ \ - if (cishort != PPP_LQR || cilong != val) \ - goto bad; \ - try_.neg = 0; \ + len >= CILEN_LQR && \ + p[1] == CILEN_LQR && \ + p[0] == opt) { \ + len -= CILEN_LQR; \ + INCPTR(2, p); \ + GETSHORT(cishort, p); \ + GETLONG(cilong, p); \ + /* Check rejected value. */ \ + if (cishort != PPP_LQR || cilong != val) \ + goto bad; \ + try_.neg = 0; \ } #endif /* LQR_SUPPORT */ #define REJCICBCP(opt, neg, val) \ if (go->neg && \ - len >= CILEN_CBCP && \ - p[1] == CILEN_CBCP && \ - p[0] == opt) { \ - len -= CILEN_CBCP; \ - INCPTR(2, p); \ - GETCHAR(cichar, p); \ - /* Check rejected value. */ \ - if (cichar != val) \ - goto bad; \ - try_.neg = 0; \ + len >= CILEN_CBCP && \ + p[1] == CILEN_CBCP && \ + p[0] == opt) { \ + len -= CILEN_CBCP; \ + INCPTR(2, p); \ + GETCHAR(cichar, p); \ + /* Check rejected value. */ \ + if (cichar != val) \ + goto bad; \ + try_.neg = 0; \ } #define REJCIENDP(opt, neg, class, val, vlen) \ if (go->neg && \ - len >= CILEN_CHAR + vlen && \ - p[0] == opt && \ - p[1] == CILEN_CHAR + vlen) { \ - int i; \ - len -= CILEN_CHAR + vlen; \ - INCPTR(2, p); \ - GETCHAR(cichar, p); \ - if (cichar != class) \ - goto bad; \ - for (i = 0; i < vlen; ++i) { \ - GETCHAR(cichar, p); \ - if (cichar != val[i]) \ - goto bad; \ - } \ - try_.neg = 0; \ + len >= CILEN_CHAR + vlen && \ + p[0] == opt && \ + p[1] == CILEN_CHAR + vlen) { \ + int i; \ + len -= CILEN_CHAR + vlen; \ + INCPTR(2, p); \ + GETCHAR(cichar, p); \ + if (cichar != class) \ + goto bad; \ + for (i = 0; i < vlen; ++i) { \ + GETCHAR(cichar, p); \ + if (cichar != val[i]) \ + goto bad; \ + } \ + try_.neg = 0; \ } REJCISHORT(CI_MRU, neg_mru, go->mru); @@ -1763,14 +1763,14 @@ static int lcp_rejci(fsm *f, u_char *p, int len) { if (!go->neg_eap) { #endif /* EAP_SUPPORT */ #if CHAP_SUPPORT - REJCICHAP(CI_AUTHTYPE, neg_chap, go->chap_mdtype); - if (!go->neg_chap) { + REJCICHAP(CI_AUTHTYPE, neg_chap, go->chap_mdtype); + if (!go->neg_chap) { #endif /* CHAP_SUPPORT */ #if PAP_SUPPORT - REJCISHORT(CI_AUTHTYPE, neg_upap, PPP_PAP); + REJCISHORT(CI_AUTHTYPE, neg_upap, PPP_PAP); #endif /* PAP_SUPPORT */ #if CHAP_SUPPORT - } + } #endif /* CHAP_SUPPORT */ #if EAP_SUPPORT } @@ -1787,18 +1787,18 @@ static int lcp_rejci(fsm *f, u_char *p, int len) { #endif /* HAVE_MULTILINK */ REJCIVOID(CI_SSNHF, neg_ssnhf); REJCIENDP(CI_EPDISC, neg_endpoint, go->endpoint.class_, - go->endpoint.value, go->endpoint.length); + go->endpoint.value, go->endpoint.length); /* * If there are any remaining CIs, then this packet is bad. */ if (len != 0) - goto bad; + goto bad; /* * Now we can update state. */ if (f->state != PPP_FSM_OPENED) - *go = try_; + *go = try_; return 1; bad: @@ -1822,17 +1822,17 @@ static int lcp_reqci(fsm *f, u_char *inp, int *lenp, int reject_if_disagree) { lcp_options *go = &pcb->lcp_gotoptions; lcp_options *ho = &pcb->lcp_hisoptions; lcp_options *ao = &pcb->lcp_allowoptions; - u_char *cip, *next; /* Pointer to current and next CIs */ - int cilen, citype, cichar; /* Parsed len, type, char value */ - u_short cishort; /* Parsed short value */ - u32_t cilong; /* Parse long value */ - int rc = CONFACK; /* Final packet return code */ - int orc; /* Individual option return code */ - u_char *p; /* Pointer to next char to parse */ - u_char *rejp; /* Pointer to next char in reject frame */ + u_char *cip, *next; /* Pointer to current and next CIs */ + int cilen, citype, cichar; /* Parsed len, type, char value */ + u_short cishort; /* Parsed short value */ + u32_t cilong; /* Parse long value */ + int rc = CONFACK; /* Final packet return code */ + int orc; /* Individual option return code */ + u_char *p; /* Pointer to next char to parse */ + u_char *rejp; /* Pointer to next char in reject frame */ struct pbuf *nakp; /* Nak buffer */ - u_char *nakoutp; /* Pointer to next char in Nak frame */ - int l = *lenp; /* Length left */ + u_char *nakoutp; /* Pointer to next char in Nak frame */ + int l = *lenp; /* Length left */ /* * Reset all his options. @@ -1854,403 +1854,403 @@ static int lcp_reqci(fsm *f, u_char *inp, int *lenp, int reject_if_disagree) { nakoutp = (u_char*)nakp->payload; rejp = inp; while (l) { - orc = CONFACK; /* Assume success */ - cip = p = next; /* Remember begining of CI */ - if (l < 2 || /* Not enough data for CI header or */ - p[1] < 2 || /* CI length too small or */ - p[1] > l) { /* CI length too big? */ - LCPDEBUG(("lcp_reqci: bad CI length!")); - orc = CONFREJ; /* Reject bad CI */ - cilen = l; /* Reject till end of packet */ - l = 0; /* Don't loop again */ - citype = 0; - goto endswitch; - } - GETCHAR(citype, p); /* Parse CI type */ - GETCHAR(cilen, p); /* Parse CI length */ - l -= cilen; /* Adjust remaining length */ - next += cilen; /* Step to next CI */ + orc = CONFACK; /* Assume success */ + cip = p = next; /* Remember begining of CI */ + if (l < 2 || /* Not enough data for CI header or */ + p[1] < 2 || /* CI length too small or */ + p[1] > l) { /* CI length too big? */ + LCPDEBUG(("lcp_reqci: bad CI length!")); + orc = CONFREJ; /* Reject bad CI */ + cilen = l; /* Reject till end of packet */ + l = 0; /* Don't loop again */ + citype = 0; + goto endswitch; + } + GETCHAR(citype, p); /* Parse CI type */ + GETCHAR(cilen, p); /* Parse CI length */ + l -= cilen; /* Adjust remaining length */ + next += cilen; /* Step to next CI */ - switch (citype) { /* Check CI type */ - case CI_MRU: - if (!ao->neg_mru || /* Allow option? */ - cilen != CILEN_SHORT) { /* Check CI length */ - orc = CONFREJ; /* Reject CI */ - break; - } - GETSHORT(cishort, p); /* Parse MRU */ + switch (citype) { /* Check CI type */ + case CI_MRU: + if (!ao->neg_mru || /* Allow option? */ + cilen != CILEN_SHORT) { /* Check CI length */ + orc = CONFREJ; /* Reject CI */ + break; + } + GETSHORT(cishort, p); /* Parse MRU */ - /* - * He must be able to receive at least our minimum. - * No need to check a maximum. If he sends a large number, - * we'll just ignore it. - */ - if (cishort < PPP_MINMRU) { - orc = CONFNAK; /* Nak CI */ - PUTCHAR(CI_MRU, nakoutp); - PUTCHAR(CILEN_SHORT, nakoutp); - PUTSHORT(PPP_MINMRU, nakoutp); /* Give him a hint */ - break; - } - ho->neg_mru = 1; /* Remember he sent MRU */ - ho->mru = cishort; /* And remember value */ - break; + /* + * He must be able to receive at least our minimum. + * No need to check a maximum. If he sends a large number, + * we'll just ignore it. + */ + if (cishort < PPP_MINMRU) { + orc = CONFNAK; /* Nak CI */ + PUTCHAR(CI_MRU, nakoutp); + PUTCHAR(CILEN_SHORT, nakoutp); + PUTSHORT(PPP_MINMRU, nakoutp); /* Give him a hint */ + break; + } + ho->neg_mru = 1; /* Remember he sent MRU */ + ho->mru = cishort; /* And remember value */ + break; - case CI_ASYNCMAP: - if (!ao->neg_asyncmap || - cilen != CILEN_LONG) { - orc = CONFREJ; - break; - } - GETLONG(cilong, p); + case CI_ASYNCMAP: + if (!ao->neg_asyncmap || + cilen != CILEN_LONG) { + orc = CONFREJ; + break; + } + GETLONG(cilong, p); - /* - * Asyncmap must have set at least the bits - * which are set in lcp_allowoptions[unit].asyncmap. - */ - if ((ao->asyncmap & ~cilong) != 0) { - orc = CONFNAK; - PUTCHAR(CI_ASYNCMAP, nakoutp); - PUTCHAR(CILEN_LONG, nakoutp); - PUTLONG(ao->asyncmap | cilong, nakoutp); - break; - } - ho->neg_asyncmap = 1; - ho->asyncmap = cilong; - break; + /* + * Asyncmap must have set at least the bits + * which are set in lcp_allowoptions[unit].asyncmap. + */ + if ((ao->asyncmap & ~cilong) != 0) { + orc = CONFNAK; + PUTCHAR(CI_ASYNCMAP, nakoutp); + PUTCHAR(CILEN_LONG, nakoutp); + PUTLONG(ao->asyncmap | cilong, nakoutp); + break; + } + ho->neg_asyncmap = 1; + ho->asyncmap = cilong; + break; - case CI_AUTHTYPE: - if (cilen < CILEN_SHORT || - !(0 + case CI_AUTHTYPE: + if (cilen < CILEN_SHORT || + !(0 #if PAP_SUPPORT - || ao->neg_upap + || ao->neg_upap #endif /* PAP_SUPPORT */ #if CHAP_SUPPORT - || ao->neg_chap + || ao->neg_chap #endif /* CHAP_SUPPORT */ #if EAP_SUPPORT - || ao->neg_eap + || ao->neg_eap #endif /* EAP_SUPPORT */ - )) { - /* - * Reject the option if we're not willing to authenticate. - */ - ppp_dbglog("No auth is possible"); - orc = CONFREJ; - break; - } - GETSHORT(cishort, p); + )) { + /* + * Reject the option if we're not willing to authenticate. + */ + ppp_dbglog("No auth is possible"); + orc = CONFREJ; + break; + } + GETSHORT(cishort, p); - /* - * Authtype must be PAP, CHAP, or EAP. - * - * Note: if more than one of ao->neg_upap, ao->neg_chap, and - * ao->neg_eap are set, and the peer sends a Configure-Request - * with two or more authenticate-protocol requests, then we will - * reject the second request. - * Whether we end up doing CHAP, UPAP, or EAP depends then on - * the ordering of the CIs in the peer's Configure-Request. + /* + * Authtype must be PAP, CHAP, or EAP. + * + * Note: if more than one of ao->neg_upap, ao->neg_chap, and + * ao->neg_eap are set, and the peer sends a Configure-Request + * with two or more authenticate-protocol requests, then we will + * reject the second request. + * Whether we end up doing CHAP, UPAP, or EAP depends then on + * the ordering of the CIs in the peer's Configure-Request. */ #if PAP_SUPPORT - if (cishort == PPP_PAP) { - /* we've already accepted CHAP or EAP */ - if (0 + if (cishort == PPP_PAP) { + /* we've already accepted CHAP or EAP */ + if (0 #if CHAP_SUPPORT - || ho->neg_chap + || ho->neg_chap #endif /* CHAP_SUPPORT */ #if EAP_SUPPORT - || ho->neg_eap + || ho->neg_eap #endif /* EAP_SUPPORT */ - || cilen != CILEN_SHORT) { - LCPDEBUG(("lcp_reqci: rcvd AUTHTYPE PAP, rejecting...")); - orc = CONFREJ; - break; - } - if (!ao->neg_upap) { /* we don't want to do PAP */ - orc = CONFNAK; /* NAK it and suggest CHAP or EAP */ - PUTCHAR(CI_AUTHTYPE, nakoutp); + || cilen != CILEN_SHORT) { + LCPDEBUG(("lcp_reqci: rcvd AUTHTYPE PAP, rejecting...")); + orc = CONFREJ; + break; + } + if (!ao->neg_upap) { /* we don't want to do PAP */ + orc = CONFNAK; /* NAK it and suggest CHAP or EAP */ + PUTCHAR(CI_AUTHTYPE, nakoutp); #if EAP_SUPPORT - if (ao->neg_eap) { - PUTCHAR(CILEN_SHORT, nakoutp); - PUTSHORT(PPP_EAP, nakoutp); - } else { + if (ao->neg_eap) { + PUTCHAR(CILEN_SHORT, nakoutp); + PUTSHORT(PPP_EAP, nakoutp); + } else { #endif /* EAP_SUPPORT */ #if CHAP_SUPPORT - PUTCHAR(CILEN_CHAP, nakoutp); - PUTSHORT(PPP_CHAP, nakoutp); - PUTCHAR(CHAP_DIGEST(ao->chap_mdtype), nakoutp); + PUTCHAR(CILEN_CHAP, nakoutp); + PUTSHORT(PPP_CHAP, nakoutp); + PUTCHAR(CHAP_DIGEST(ao->chap_mdtype), nakoutp); #endif /* CHAP_SUPPORT */ #if EAP_SUPPORT - } + } #endif /* EAP_SUPPORT */ - break; - } - ho->neg_upap = 1; - break; - } + break; + } + ho->neg_upap = 1; + break; + } #endif /* PAP_SUPPORT */ #if CHAP_SUPPORT - if (cishort == PPP_CHAP) { - /* we've already accepted PAP or EAP */ - if ( + if (cishort == PPP_CHAP) { + /* we've already accepted PAP or EAP */ + if ( #if PAP_SUPPORT - ho->neg_upap || + ho->neg_upap || #endif /* PAP_SUPPORT */ #if EAP_SUPPORT - ho->neg_eap || + ho->neg_eap || #endif /* EAP_SUPPORT */ - cilen != CILEN_CHAP) { - LCPDEBUG(("lcp_reqci: rcvd AUTHTYPE CHAP, rejecting...")); - orc = CONFREJ; - break; - } - if (!ao->neg_chap) { /* we don't want to do CHAP */ - orc = CONFNAK; /* NAK it and suggest EAP or PAP */ - PUTCHAR(CI_AUTHTYPE, nakoutp); - PUTCHAR(CILEN_SHORT, nakoutp); + cilen != CILEN_CHAP) { + LCPDEBUG(("lcp_reqci: rcvd AUTHTYPE CHAP, rejecting...")); + orc = CONFREJ; + break; + } + if (!ao->neg_chap) { /* we don't want to do CHAP */ + orc = CONFNAK; /* NAK it and suggest EAP or PAP */ + PUTCHAR(CI_AUTHTYPE, nakoutp); + PUTCHAR(CILEN_SHORT, nakoutp); #if EAP_SUPPORT - if (ao->neg_eap) { - PUTSHORT(PPP_EAP, nakoutp); - } else + if (ao->neg_eap) { + PUTSHORT(PPP_EAP, nakoutp); + } else #endif /* EAP_SUPPORT */ #if PAP_SUPPORT - if(1) { - PUTSHORT(PPP_PAP, nakoutp); - } - else + if(1) { + PUTSHORT(PPP_PAP, nakoutp); + } + else #endif /* PAP_SUPPORT */ - {} - break; - } - GETCHAR(cichar, p); /* get digest type */ - if (!(CHAP_CANDIGEST(ao->chap_mdtype, cichar))) { - /* - * We can't/won't do the requested type, - * suggest something else. - */ - orc = CONFNAK; - PUTCHAR(CI_AUTHTYPE, nakoutp); - PUTCHAR(CILEN_CHAP, nakoutp); - PUTSHORT(PPP_CHAP, nakoutp); - PUTCHAR(CHAP_DIGEST(ao->chap_mdtype), nakoutp); - break; - } - ho->chap_mdtype = CHAP_MDTYPE_D(cichar); /* save md type */ - ho->neg_chap = 1; - break; - } + {} + break; + } + GETCHAR(cichar, p); /* get digest type */ + if (!(CHAP_CANDIGEST(ao->chap_mdtype, cichar))) { + /* + * We can't/won't do the requested type, + * suggest something else. + */ + orc = CONFNAK; + PUTCHAR(CI_AUTHTYPE, nakoutp); + PUTCHAR(CILEN_CHAP, nakoutp); + PUTSHORT(PPP_CHAP, nakoutp); + PUTCHAR(CHAP_DIGEST(ao->chap_mdtype), nakoutp); + break; + } + ho->chap_mdtype = CHAP_MDTYPE_D(cichar); /* save md type */ + ho->neg_chap = 1; + break; + } #endif /* CHAP_SUPPORT */ #if EAP_SUPPORT - if (cishort == PPP_EAP) { - /* we've already accepted CHAP or PAP */ - if ( + if (cishort == PPP_EAP) { + /* we've already accepted CHAP or PAP */ + if ( #if CHAP_SUPPORT - ho->neg_chap || + ho->neg_chap || #endif /* CHAP_SUPPORT */ #if PAP_SUPPORT - ho->neg_upap || + ho->neg_upap || #endif /* PAP_SUPPORT */ - cilen != CILEN_SHORT) { - LCPDEBUG(("lcp_reqci: rcvd AUTHTYPE EAP, rejecting...")); - orc = CONFREJ; - break; - } - if (!ao->neg_eap) { /* we don't want to do EAP */ - orc = CONFNAK; /* NAK it and suggest CHAP or PAP */ - PUTCHAR(CI_AUTHTYPE, nakoutp); + cilen != CILEN_SHORT) { + LCPDEBUG(("lcp_reqci: rcvd AUTHTYPE EAP, rejecting...")); + orc = CONFREJ; + break; + } + if (!ao->neg_eap) { /* we don't want to do EAP */ + orc = CONFNAK; /* NAK it and suggest CHAP or PAP */ + PUTCHAR(CI_AUTHTYPE, nakoutp); #if CHAP_SUPPORT - if (ao->neg_chap) { - PUTCHAR(CILEN_CHAP, nakoutp); - PUTSHORT(PPP_CHAP, nakoutp); - PUTCHAR(CHAP_DIGEST(ao->chap_mdtype), nakoutp); - } else + if (ao->neg_chap) { + PUTCHAR(CILEN_CHAP, nakoutp); + PUTSHORT(PPP_CHAP, nakoutp); + PUTCHAR(CHAP_DIGEST(ao->chap_mdtype), nakoutp); + } else #endif /* CHAP_SUPPORT */ #if PAP_SUPPORT - if(1) { - PUTCHAR(CILEN_SHORT, nakoutp); - PUTSHORT(PPP_PAP, nakoutp); - } else + if(1) { + PUTCHAR(CILEN_SHORT, nakoutp); + PUTSHORT(PPP_PAP, nakoutp); + } else #endif /* PAP_SUPPORT */ - {} - break; - } - ho->neg_eap = 1; - break; - } + {} + break; + } + ho->neg_eap = 1; + break; + } #endif /* EAP_SUPPORT */ - /* - * We don't recognize the protocol they're asking for. - * Nak it with something we're willing to do. - * (At this point we know ao->neg_upap || ao->neg_chap || - * ao->neg_eap.) - */ - orc = CONFNAK; - PUTCHAR(CI_AUTHTYPE, nakoutp); + /* + * We don't recognize the protocol they're asking for. + * Nak it with something we're willing to do. + * (At this point we know ao->neg_upap || ao->neg_chap || + * ao->neg_eap.) + */ + orc = CONFNAK; + PUTCHAR(CI_AUTHTYPE, nakoutp); #if EAP_SUPPORT - if (ao->neg_eap) { - PUTCHAR(CILEN_SHORT, nakoutp); - PUTSHORT(PPP_EAP, nakoutp); - } else + if (ao->neg_eap) { + PUTCHAR(CILEN_SHORT, nakoutp); + PUTSHORT(PPP_EAP, nakoutp); + } else #endif /* EAP_SUPPORT */ #if CHAP_SUPPORT - if (ao->neg_chap) { - PUTCHAR(CILEN_CHAP, nakoutp); - PUTSHORT(PPP_CHAP, nakoutp); - PUTCHAR(CHAP_DIGEST(ao->chap_mdtype), nakoutp); - } else + if (ao->neg_chap) { + PUTCHAR(CILEN_CHAP, nakoutp); + PUTSHORT(PPP_CHAP, nakoutp); + PUTCHAR(CHAP_DIGEST(ao->chap_mdtype), nakoutp); + } else #endif /* CHAP_SUPPORT */ #if PAP_SUPPORT - if(1) { - PUTCHAR(CILEN_SHORT, nakoutp); - PUTSHORT(PPP_PAP, nakoutp); - } else + if(1) { + PUTCHAR(CILEN_SHORT, nakoutp); + PUTSHORT(PPP_PAP, nakoutp); + } else #endif /* PAP_SUPPORT */ - {} - break; + {} + break; #if LQR_SUPPORT - case CI_QUALITY: - if (!ao->neg_lqr || - cilen != CILEN_LQR) { - orc = CONFREJ; - break; - } + case CI_QUALITY: + if (!ao->neg_lqr || + cilen != CILEN_LQR) { + orc = CONFREJ; + break; + } - GETSHORT(cishort, p); - GETLONG(cilong, p); + GETSHORT(cishort, p); + GETLONG(cilong, p); - /* - * Check the protocol and the reporting period. - * XXX When should we Nak this, and what with? - */ - if (cishort != PPP_LQR) { - orc = CONFNAK; - PUTCHAR(CI_QUALITY, nakoutp); - PUTCHAR(CILEN_LQR, nakoutp); - PUTSHORT(PPP_LQR, nakoutp); - PUTLONG(ao->lqr_period, nakoutp); - break; - } - break; + /* + * Check the protocol and the reporting period. + * XXX When should we Nak this, and what with? + */ + if (cishort != PPP_LQR) { + orc = CONFNAK; + PUTCHAR(CI_QUALITY, nakoutp); + PUTCHAR(CILEN_LQR, nakoutp); + PUTSHORT(PPP_LQR, nakoutp); + PUTLONG(ao->lqr_period, nakoutp); + break; + } + break; #endif /* LQR_SUPPORT */ - case CI_MAGICNUMBER: - if (!(ao->neg_magicnumber || go->neg_magicnumber) || - cilen != CILEN_LONG) { - orc = CONFREJ; - break; - } - GETLONG(cilong, p); + case CI_MAGICNUMBER: + if (!(ao->neg_magicnumber || go->neg_magicnumber) || + cilen != CILEN_LONG) { + orc = CONFREJ; + break; + } + GETLONG(cilong, p); - /* - * He must have a different magic number. - */ - if (go->neg_magicnumber && - cilong == go->magicnumber) { - cilong = magic(); /* Don't put magic() inside macro! */ - orc = CONFNAK; - PUTCHAR(CI_MAGICNUMBER, nakoutp); - PUTCHAR(CILEN_LONG, nakoutp); - PUTLONG(cilong, nakoutp); - break; - } - ho->neg_magicnumber = 1; - ho->magicnumber = cilong; - break; + /* + * He must have a different magic number. + */ + if (go->neg_magicnumber && + cilong == go->magicnumber) { + cilong = magic(); /* Don't put magic() inside macro! */ + orc = CONFNAK; + PUTCHAR(CI_MAGICNUMBER, nakoutp); + PUTCHAR(CILEN_LONG, nakoutp); + PUTLONG(cilong, nakoutp); + break; + } + ho->neg_magicnumber = 1; + ho->magicnumber = cilong; + break; - case CI_PCOMPRESSION: - if (!ao->neg_pcompression || - cilen != CILEN_VOID) { - orc = CONFREJ; - break; - } - ho->neg_pcompression = 1; - break; + case CI_PCOMPRESSION: + if (!ao->neg_pcompression || + cilen != CILEN_VOID) { + orc = CONFREJ; + break; + } + ho->neg_pcompression = 1; + break; - case CI_ACCOMPRESSION: - if (!ao->neg_accompression || - cilen != CILEN_VOID) { - orc = CONFREJ; - break; - } - ho->neg_accompression = 1; - break; + case CI_ACCOMPRESSION: + if (!ao->neg_accompression || + cilen != CILEN_VOID) { + orc = CONFREJ; + break; + } + ho->neg_accompression = 1; + break; #ifdef HAVE_MULTILINK - case CI_MRRU: - if (!ao->neg_mrru - || !multilink - || cilen != CILEN_SHORT) { - orc = CONFREJ; - break; - } + case CI_MRRU: + if (!ao->neg_mrru + || !multilink + || cilen != CILEN_SHORT) { + orc = CONFREJ; + break; + } - GETSHORT(cishort, p); - /* possibly should insist on a minimum/maximum MRRU here */ - ho->neg_mrru = 1; - ho->mrru = cishort; - break; + GETSHORT(cishort, p); + /* possibly should insist on a minimum/maximum MRRU here */ + ho->neg_mrru = 1; + ho->mrru = cishort; + break; #endif /* HAVE_MULTILINK */ - case CI_SSNHF: - if (!ao->neg_ssnhf + case CI_SSNHF: + if (!ao->neg_ssnhf #ifdef HAVE_MULTILINK - || !multilink + || !multilink #endif /* HAVE_MULTILINK */ - || cilen != CILEN_VOID) { - orc = CONFREJ; - break; - } - ho->neg_ssnhf = 1; - break; + || cilen != CILEN_VOID) { + orc = CONFREJ; + break; + } + ho->neg_ssnhf = 1; + break; - case CI_EPDISC: - if (!ao->neg_endpoint || - cilen < CILEN_CHAR || - cilen > CILEN_CHAR + MAX_ENDP_LEN) { - orc = CONFREJ; - break; - } - GETCHAR(cichar, p); - cilen -= CILEN_CHAR; - ho->neg_endpoint = 1; - ho->endpoint.class_ = cichar; - ho->endpoint.length = cilen; - MEMCPY(ho->endpoint.value, p, cilen); - INCPTR(cilen, p); - break; + case CI_EPDISC: + if (!ao->neg_endpoint || + cilen < CILEN_CHAR || + cilen > CILEN_CHAR + MAX_ENDP_LEN) { + orc = CONFREJ; + break; + } + GETCHAR(cichar, p); + cilen -= CILEN_CHAR; + ho->neg_endpoint = 1; + ho->endpoint.class_ = cichar; + ho->endpoint.length = cilen; + MEMCPY(ho->endpoint.value, p, cilen); + INCPTR(cilen, p); + break; - default: - LCPDEBUG(("lcp_reqci: rcvd unknown option %d", citype)); - orc = CONFREJ; - break; - } + default: + LCPDEBUG(("lcp_reqci: rcvd unknown option %d", citype)); + orc = CONFREJ; + break; + } endswitch: - if (orc == CONFACK && /* Good CI */ - rc != CONFACK) /* but prior CI wasnt? */ - continue; /* Don't send this one */ + if (orc == CONFACK && /* Good CI */ + rc != CONFACK) /* but prior CI wasnt? */ + continue; /* Don't send this one */ - if (orc == CONFNAK) { /* Nak this CI? */ - if (reject_if_disagree /* Getting fed up with sending NAKs? */ - && citype != CI_MAGICNUMBER) { - orc = CONFREJ; /* Get tough if so */ - } else { - if (rc == CONFREJ) /* Rejecting prior CI? */ - continue; /* Don't send this one */ - rc = CONFNAK; - } - } - if (orc == CONFREJ) { /* Reject this CI */ - rc = CONFREJ; - if (cip != rejp) /* Need to move rejected CI? */ - MEMCPY(rejp, cip, cilen); /* Move it */ - INCPTR(cilen, rejp); /* Update output pointer */ - } + if (orc == CONFNAK) { /* Nak this CI? */ + if (reject_if_disagree /* Getting fed up with sending NAKs? */ + && citype != CI_MAGICNUMBER) { + orc = CONFREJ; /* Get tough if so */ + } else { + if (rc == CONFREJ) /* Rejecting prior CI? */ + continue; /* Don't send this one */ + rc = CONFNAK; + } + } + if (orc == CONFREJ) { /* Reject this CI */ + rc = CONFREJ; + if (cip != rejp) /* Need to move rejected CI? */ + MEMCPY(rejp, cip, cilen); /* Move it */ + INCPTR(cilen, rejp); /* Update output pointer */ + } } /* @@ -2262,25 +2262,25 @@ endswitch: switch (rc) { case CONFACK: - *lenp = next - inp; - break; + *lenp = next - inp; + break; case CONFNAK: - /* - * Copy the Nak'd options from the nak buffer to the caller's buffer. - */ - *lenp = nakoutp - (u_char*)nakp->payload; - MEMCPY(inp, nakp->payload, *lenp); - break; + /* + * Copy the Nak'd options from the nak buffer to the caller's buffer. + */ + *lenp = nakoutp - (u_char*)nakp->payload; + MEMCPY(inp, nakp->payload, *lenp); + break; case CONFREJ: - *lenp = rejp - inp; - break; + *lenp = rejp - inp; + break; default: - break; + break; } pbuf_free(nakp); LCPDEBUG(("lcp_reqci: returning CONF%s.", CODENAME(rc))); - return (rc); /* Return final code */ + return (rc); /* Return final code */ } @@ -2296,9 +2296,9 @@ static void lcp_up(fsm *f) { int mtu, mru; if (!go->neg_magicnumber) - go->magicnumber = 0; + go->magicnumber = 0; if (!ho->neg_magicnumber) - ho->magicnumber = 0; + ho->magicnumber = 0; /* * Set our MTU to the smaller of the MTU we wanted and @@ -2314,16 +2314,16 @@ static void lcp_up(fsm *f) { #ifdef HAVE_MULTILINK if (!(multilink && go->neg_mrru && ho->neg_mrru)) #endif /* HAVE_MULTILINK */ - netif_set_mtu(pcb, LWIP_MIN(LWIP_MIN(mtu, mru), ao->mru)); + netif_set_mtu(pcb, LWIP_MIN(LWIP_MIN(mtu, mru), ao->mru)); ppp_send_config(pcb, mtu, - (ho->neg_asyncmap? ho->asyncmap: 0xffffffff), - ho->neg_pcompression, ho->neg_accompression); + (ho->neg_asyncmap? ho->asyncmap: 0xffffffff), + ho->neg_pcompression, ho->neg_accompression); ppp_recv_config(pcb, mru, - (pcb->settings.lax_recv? 0: go->neg_asyncmap? go->asyncmap: 0xffffffff), - go->neg_pcompression, go->neg_accompression); + (pcb->settings.lax_recv? 0: go->neg_asyncmap? go->asyncmap: 0xffffffff), + go->neg_pcompression, go->neg_accompression); if (ho->neg_mru) - pcb->peer_mru = ho->mru; + pcb->peer_mru = ho->mru; lcp_echo_lowerup(f->pcb); /* Enable echo messages */ @@ -2346,8 +2346,8 @@ static void lcp_down(fsm *f) { ppp_send_config(pcb, PPP_MRU, 0xffffffff, 0, 0); ppp_recv_config(pcb, PPP_MRU, - (go->neg_asyncmap? go->asyncmap: 0xffffffff), - go->neg_pcompression, go->neg_accompression); + (go->neg_asyncmap? go->asyncmap: 0xffffffff), + go->neg_pcompression, go->neg_accompression); pcb->peer_mru = PPP_MRU; } @@ -2382,25 +2382,25 @@ static const char* const lcp_codenames[] = { }; static int lcp_printpkt(const u_char *p, int plen, - void (*printer) (void *, const char *, ...), void *arg) { + void (*printer) (void *, const char *, ...), void *arg) { int code, id, len, olen, i; const u_char *pstart, *optend; u_short cishort; u32_t cilong; if (plen < HEADERLEN) - return 0; + return 0; pstart = p; GETCHAR(code, p); GETCHAR(id, p); GETSHORT(len, p); if (len < HEADERLEN || len > plen) - return 0; + return 0; if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(lcp_codenames)) - printer(arg, " %s", lcp_codenames[code-1]); + printer(arg, " %s", lcp_codenames[code-1]); else - printer(arg, " code=0x%x", code); + printer(arg, " code=0x%x", code); printer(arg, " id=0x%x", id); len -= HEADERLEN; switch (code) { @@ -2408,224 +2408,224 @@ static int lcp_printpkt(const u_char *p, int plen, case CONFACK: case CONFNAK: case CONFREJ: - /* print option list */ - while (len >= 2) { - GETCHAR(code, p); - GETCHAR(olen, p); - p -= 2; - if (olen < 2 || olen > len) { - break; - } - printer(arg, " <"); - len -= olen; - optend = p + olen; - switch (code) { - case CI_MRU: - if (olen == CILEN_SHORT) { - p += 2; - GETSHORT(cishort, p); - printer(arg, "mru %d", cishort); - } - break; - case CI_ASYNCMAP: - if (olen == CILEN_LONG) { - p += 2; - GETLONG(cilong, p); - printer(arg, "asyncmap 0x%x", cilong); - } - break; - case CI_AUTHTYPE: - if (olen >= CILEN_SHORT) { - p += 2; - printer(arg, "auth "); - GETSHORT(cishort, p); - switch (cishort) { + /* print option list */ + while (len >= 2) { + GETCHAR(code, p); + GETCHAR(olen, p); + p -= 2; + if (olen < 2 || olen > len) { + break; + } + printer(arg, " <"); + len -= olen; + optend = p + olen; + switch (code) { + case CI_MRU: + if (olen == CILEN_SHORT) { + p += 2; + GETSHORT(cishort, p); + printer(arg, "mru %d", cishort); + } + break; + case CI_ASYNCMAP: + if (olen == CILEN_LONG) { + p += 2; + GETLONG(cilong, p); + printer(arg, "asyncmap 0x%x", cilong); + } + break; + case CI_AUTHTYPE: + if (olen >= CILEN_SHORT) { + p += 2; + printer(arg, "auth "); + GETSHORT(cishort, p); + switch (cishort) { #if PAP_SUPPORT - case PPP_PAP: - printer(arg, "pap"); - break; + case PPP_PAP: + printer(arg, "pap"); + break; #endif /* PAP_SUPPORT */ #if CHAP_SUPPORT - case PPP_CHAP: - printer(arg, "chap"); - if (p < optend) { - switch (*p) { - case CHAP_MD5: - printer(arg, " MD5"); - ++p; - break; + case PPP_CHAP: + printer(arg, "chap"); + if (p < optend) { + switch (*p) { + case CHAP_MD5: + printer(arg, " MD5"); + ++p; + break; #if MSCHAP_SUPPORT - case CHAP_MICROSOFT: - printer(arg, " MS"); - ++p; - break; + case CHAP_MICROSOFT: + printer(arg, " MS"); + ++p; + break; - case CHAP_MICROSOFT_V2: - printer(arg, " MS-v2"); - ++p; - break; + case CHAP_MICROSOFT_V2: + printer(arg, " MS-v2"); + ++p; + break; #endif /* MSCHAP_SUPPORT */ - default: - break; - } - } - break; + default: + break; + } + } + break; #endif /* CHAP_SUPPORT */ #if EAP_SUPPORT - case PPP_EAP: - printer(arg, "eap"); - break; + case PPP_EAP: + printer(arg, "eap"); + break; #endif /* EAP_SUPPORT */ - default: - printer(arg, "0x%x", cishort); - } - } - break; + default: + printer(arg, "0x%x", cishort); + } + } + break; #if LQR_SUPPORT - case CI_QUALITY: - if (olen >= CILEN_SHORT) { - p += 2; - printer(arg, "quality "); - GETSHORT(cishort, p); - switch (cishort) { - case PPP_LQR: - printer(arg, "lqr"); - break; - default: - printer(arg, "0x%x", cishort); - } - } - break; + case CI_QUALITY: + if (olen >= CILEN_SHORT) { + p += 2; + printer(arg, "quality "); + GETSHORT(cishort, p); + switch (cishort) { + case PPP_LQR: + printer(arg, "lqr"); + break; + default: + printer(arg, "0x%x", cishort); + } + } + break; #endif /* LQR_SUPPORT */ - case CI_CALLBACK: - if (olen >= CILEN_CHAR) { - p += 2; - printer(arg, "callback "); - GETCHAR(cishort, p); - switch (cishort) { - case CBCP_OPT: - printer(arg, "CBCP"); - break; - default: - printer(arg, "0x%x", cishort); - } - } - break; - case CI_MAGICNUMBER: - if (olen == CILEN_LONG) { - p += 2; - GETLONG(cilong, p); - printer(arg, "magic 0x%x", cilong); - } - break; - case CI_PCOMPRESSION: - if (olen == CILEN_VOID) { - p += 2; - printer(arg, "pcomp"); - } - break; - case CI_ACCOMPRESSION: - if (olen == CILEN_VOID) { - p += 2; - printer(arg, "accomp"); - } - break; - case CI_MRRU: - if (olen == CILEN_SHORT) { - p += 2; - GETSHORT(cishort, p); - printer(arg, "mrru %d", cishort); - } - break; - case CI_SSNHF: - if (olen == CILEN_VOID) { - p += 2; - printer(arg, "ssnhf"); - } - break; - case CI_EPDISC: + case CI_CALLBACK: + if (olen >= CILEN_CHAR) { + p += 2; + printer(arg, "callback "); + GETCHAR(cishort, p); + switch (cishort) { + case CBCP_OPT: + printer(arg, "CBCP"); + break; + default: + printer(arg, "0x%x", cishort); + } + } + break; + case CI_MAGICNUMBER: + if (olen == CILEN_LONG) { + p += 2; + GETLONG(cilong, p); + printer(arg, "magic 0x%x", cilong); + } + break; + case CI_PCOMPRESSION: + if (olen == CILEN_VOID) { + p += 2; + printer(arg, "pcomp"); + } + break; + case CI_ACCOMPRESSION: + if (olen == CILEN_VOID) { + p += 2; + printer(arg, "accomp"); + } + break; + case CI_MRRU: + if (olen == CILEN_SHORT) { + p += 2; + GETSHORT(cishort, p); + printer(arg, "mrru %d", cishort); + } + break; + case CI_SSNHF: + if (olen == CILEN_VOID) { + p += 2; + printer(arg, "ssnhf"); + } + break; + case CI_EPDISC: #ifdef HAVE_MULTILINK - if (olen >= CILEN_CHAR) { - struct epdisc epd; - p += 2; - GETCHAR(epd.class, p); - epd.length = olen - CILEN_CHAR; - if (epd.length > MAX_ENDP_LEN) - epd.length = MAX_ENDP_LEN; - if (epd.length > 0) { - MEMCPY(epd.value, p, epd.length); - p += epd.length; - } - printer(arg, "endpoint [%s]", epdisc_to_str(&epd)); - } + if (olen >= CILEN_CHAR) { + struct epdisc epd; + p += 2; + GETCHAR(epd.class, p); + epd.length = olen - CILEN_CHAR; + if (epd.length > MAX_ENDP_LEN) + epd.length = MAX_ENDP_LEN; + if (epd.length > 0) { + MEMCPY(epd.value, p, epd.length); + p += epd.length; + } + printer(arg, "endpoint [%s]", epdisc_to_str(&epd)); + } #else - printer(arg, "endpoint"); + printer(arg, "endpoint"); #endif - break; - default: - break; - } - while (p < optend) { - GETCHAR(code, p); - printer(arg, " %.2x", code); - } - printer(arg, ">"); - } - break; + break; + default: + break; + } + while (p < optend) { + GETCHAR(code, p); + printer(arg, " %.2x", code); + } + printer(arg, ">"); + } + break; case TERMACK: case TERMREQ: - if (len > 0 && *p >= ' ' && *p < 0x7f) { - printer(arg, " "); - ppp_print_string(p, len, printer, arg); - p += len; - len = 0; - } - break; + if (len > 0 && *p >= ' ' && *p < 0x7f) { + printer(arg, " "); + ppp_print_string(p, len, printer, arg); + p += len; + len = 0; + } + break; case ECHOREQ: case ECHOREP: case DISCREQ: - if (len >= 4) { - GETLONG(cilong, p); - printer(arg, " magic=0x%x", cilong); - len -= 4; - } - break; + if (len >= 4) { + GETLONG(cilong, p); + printer(arg, " magic=0x%x", cilong); + len -= 4; + } + break; case IDENTIF: case TIMEREM: - if (len >= 4) { - GETLONG(cilong, p); - printer(arg, " magic=0x%x", cilong); - len -= 4; - } - if (code == TIMEREM) { - if (len < 4) - break; - GETLONG(cilong, p); - printer(arg, " seconds=%u", cilong); - len -= 4; - } - if (len > 0) { - printer(arg, " "); - ppp_print_string(p, len, printer, arg); - p += len; - len = 0; - } - break; + if (len >= 4) { + GETLONG(cilong, p); + printer(arg, " magic=0x%x", cilong); + len -= 4; + } + if (code == TIMEREM) { + if (len < 4) + break; + GETLONG(cilong, p); + printer(arg, " seconds=%u", cilong); + len -= 4; + } + if (len > 0) { + printer(arg, " "); + ppp_print_string(p, len, printer, arg); + p += len; + len = 0; + } + break; default: - break; + break; } /* print the rest of the bytes in the packet */ for (i = 0; i < len && i < 32; ++i) { - GETCHAR(code, p); - printer(arg, " %.2x", code); + GETCHAR(code, p); + printer(arg, " %.2x", code); } if (i < len) { - printer(arg, " ..."); - p += len - i; + printer(arg, " ..."); + p += len - i; } return p - pstart; @@ -2639,10 +2639,10 @@ static int lcp_printpkt(const u_char *p, int plen, static void LcpLinkFailure(fsm *f) { ppp_pcb *pcb = f->pcb; if (f->state == PPP_FSM_OPENED) { - ppp_info("No response to %d echo-requests", pcb->lcp_echos_pending); + ppp_info("No response to %d echo-requests", pcb->lcp_echos_pending); ppp_notice("Serial link appears to be disconnected."); - pcb->err_code = PPPERR_PEERDEAD; - lcp_close(pcb, "Peer not responding"); + pcb->err_code = PPPERR_PEERDEAD; + lcp_close(pcb, "Peer not responding"); } } @@ -2655,13 +2655,13 @@ static void LcpEchoCheck(fsm *f) { LcpSendEchoRequest (f); if (f->state != PPP_FSM_OPENED) - return; + return; /* * Start the timer for the next interval. */ if (pcb->lcp_echo_timer_running) - ppp_warn("assertion lcp_echo_timer_running==0 failed"); + ppp_warn("assertion lcp_echo_timer_running==0 failed"); TIMEOUT (LcpEchoTimeout, f, pcb->settings.lcp_echo_interval); pcb->lcp_echo_timer_running = 1; } @@ -2691,14 +2691,14 @@ static void lcp_received_echo_reply(fsm *f, int id, u_char *inp, int len) { /* Check the magic number - don't count replies from ourselves. */ if (len < 4) { - ppp_dbglog("lcp: received short Echo-Reply, length %d", len); - return; + ppp_dbglog("lcp: received short Echo-Reply, length %d", len); + return; } GETLONG(magic_val, inp); if (go->neg_magicnumber - && magic_val == go->magicnumber) { - ppp_warn("appear to have received our own echo-reply!"); - return; + && magic_val == go->magicnumber) { + ppp_warn("appear to have received our own echo-reply!"); + return; } /* Reset the number of outstanding echo frames */ @@ -2722,7 +2722,7 @@ static void LcpSendEchoRequest(fsm *f) { if (pcb->lcp_echos_pending >= pcb->settings.lcp_echo_fails) { LcpLinkFailure(f); pcb->lcp_echos_pending = 0; - } + } } #if PPP_LCP_ADAPTIVE @@ -2731,17 +2731,17 @@ static void LcpSendEchoRequest(fsm *f) { * no traffic was received since the last one. */ if (pcb->settings.lcp_echo_adaptive) { - static unsigned int last_pkts_in = 0; + static unsigned int last_pkts_in = 0; #if PPP_STATS_SUPPORT - update_link_stats(f->unit); - link_stats_valid = 0; + update_link_stats(f->unit); + link_stats_valid = 0; #endif /* PPP_STATS_SUPPORT */ - if (link_stats.pkts_in != last_pkts_in) { - last_pkts_in = link_stats.pkts_in; - return; - } + if (link_stats.pkts_in != last_pkts_in) { + last_pkts_in = link_stats.pkts_in; + return; + } } #endif @@ -2750,10 +2750,10 @@ static void LcpSendEchoRequest(fsm *f) { */ if (f->state == PPP_FSM_OPENED) { lcp_magic = go->magicnumber; - pktp = pkt; - PUTLONG(lcp_magic, pktp); + pktp = pkt; + PUTLONG(lcp_magic, pktp); fsm_sdata(f, ECHOREQ, pcb->lcp_echo_number++, pkt, pktp - pkt); - ++pcb->lcp_echos_pending; + ++pcb->lcp_echos_pending; } } diff --git a/Libraries/LwIP/src/netif/ppp/mppe.c b/Libraries/LwIP/src/netif/ppp/mppe.c index 4abd2bf..83b8b31 100755 --- a/Libraries/LwIP/src/netif/ppp/mppe.c +++ b/Libraries/LwIP/src/netif/ppp/mppe.c @@ -39,20 +39,20 @@ #define SHA1_SIGNATURE_SIZE 20 /* ppp_mppe_state.bits definitions */ -#define MPPE_BIT_A 0x80 /* Encryption table were (re)inititalized */ -#define MPPE_BIT_B 0x40 /* MPPC only (not implemented) */ -#define MPPE_BIT_C 0x20 /* MPPC only (not implemented) */ -#define MPPE_BIT_D 0x10 /* This is an encrypted frame */ +#define MPPE_BIT_A 0x80 /* Encryption table were (re)inititalized */ +#define MPPE_BIT_B 0x40 /* MPPC only (not implemented) */ +#define MPPE_BIT_C 0x20 /* MPPC only (not implemented) */ +#define MPPE_BIT_D 0x10 /* This is an encrypted frame */ -#define MPPE_BIT_FLUSHED MPPE_BIT_A -#define MPPE_BIT_ENCRYPTED MPPE_BIT_D +#define MPPE_BIT_FLUSHED MPPE_BIT_A +#define MPPE_BIT_ENCRYPTED MPPE_BIT_D #define MPPE_BITS(p) ((p)[0] & 0xf0) #define MPPE_CCOUNT(p) ((((p)[0] & 0x0f) << 8) + (p)[1]) -#define MPPE_CCOUNT_SPACE 0x1000 /* The size of the ccount space */ +#define MPPE_CCOUNT_SPACE 0x1000 /* The size of the ccount space */ -#define MPPE_OVHD 2 /* MPPE overhead/packet */ -#define SANITY_MAX 1600 /* Max bogon factor we will tolerate */ +#define MPPE_OVHD 2 /* MPPE overhead/packet */ +#define SANITY_MAX 1600 /* Max bogon factor we will tolerate */ /* * Perform the MPPE rekey algorithm, from RFC 3078, sec. 7.3. @@ -60,37 +60,37 @@ */ static void mppe_rekey(ppp_mppe_state * state, int initial_key) { - lwip_sha1_context sha1_ctx; - u8_t sha1_digest[SHA1_SIGNATURE_SIZE]; + lwip_sha1_context sha1_ctx; + u8_t sha1_digest[SHA1_SIGNATURE_SIZE]; - /* - * Key Derivation, from RFC 3078, RFC 3079. - * Equivalent to Get_Key() for MS-CHAP as described in RFC 3079. - */ - lwip_sha1_init(&sha1_ctx); - lwip_sha1_starts(&sha1_ctx); - lwip_sha1_update(&sha1_ctx, state->master_key, state->keylen); - lwip_sha1_update(&sha1_ctx, mppe_sha1_pad1, SHA1_PAD_SIZE); - lwip_sha1_update(&sha1_ctx, state->session_key, state->keylen); - lwip_sha1_update(&sha1_ctx, mppe_sha1_pad2, SHA1_PAD_SIZE); - lwip_sha1_finish(&sha1_ctx, sha1_digest); - lwip_sha1_free(&sha1_ctx); - MEMCPY(state->session_key, sha1_digest, state->keylen); + /* + * Key Derivation, from RFC 3078, RFC 3079. + * Equivalent to Get_Key() for MS-CHAP as described in RFC 3079. + */ + lwip_sha1_init(&sha1_ctx); + lwip_sha1_starts(&sha1_ctx); + lwip_sha1_update(&sha1_ctx, state->master_key, state->keylen); + lwip_sha1_update(&sha1_ctx, mppe_sha1_pad1, SHA1_PAD_SIZE); + lwip_sha1_update(&sha1_ctx, state->session_key, state->keylen); + lwip_sha1_update(&sha1_ctx, mppe_sha1_pad2, SHA1_PAD_SIZE); + lwip_sha1_finish(&sha1_ctx, sha1_digest); + lwip_sha1_free(&sha1_ctx); + MEMCPY(state->session_key, sha1_digest, state->keylen); - if (!initial_key) { - lwip_arc4_init(&state->arc4); - lwip_arc4_setup(&state->arc4, sha1_digest, state->keylen); - lwip_arc4_crypt(&state->arc4, state->session_key, state->keylen); - lwip_arc4_free(&state->arc4); - } - if (state->keylen == 8) { - /* See RFC 3078 */ - state->session_key[0] = 0xd1; - state->session_key[1] = 0x26; - state->session_key[2] = 0x9e; - } - lwip_arc4_init(&state->arc4); - lwip_arc4_setup(&state->arc4, state->session_key, state->keylen); + if (!initial_key) { + lwip_arc4_init(&state->arc4); + lwip_arc4_setup(&state->arc4, sha1_digest, state->keylen); + lwip_arc4_crypt(&state->arc4, state->session_key, state->keylen); + lwip_arc4_free(&state->arc4); + } + if (state->keylen == 8) { + /* See RFC 3078 */ + state->session_key[0] = 0xd1; + state->session_key[1] = 0x26; + state->session_key[2] = 0x9e; + } + lwip_arc4_init(&state->arc4); + lwip_arc4_setup(&state->arc4, state->session_key, state->keylen); } /* @@ -98,8 +98,8 @@ static void mppe_rekey(ppp_mppe_state * state, int initial_key) * don't have to keep multiple copies of keys. */ void mppe_set_key(ppp_pcb *pcb, ppp_mppe_state *state, u8_t *key) { - LWIP_UNUSED_ARG(pcb); - MEMCPY(state->master_key, key, MPPE_MAX_KEY_LEN); + LWIP_UNUSED_ARG(pcb); + MEMCPY(state->master_key, key, MPPE_MAX_KEY_LEN); } /* @@ -109,64 +109,64 @@ void mppe_init(ppp_pcb *pcb, ppp_mppe_state *state, u8_t options) { #if PPP_DEBUG - const u8_t *debugstr = (const u8_t*)"mppe_comp_init"; - if (&pcb->mppe_decomp == state) { - debugstr = (const u8_t*)"mppe_decomp_init"; - } + const u8_t *debugstr = (const u8_t*)"mppe_comp_init"; + if (&pcb->mppe_decomp == state) { + debugstr = (const u8_t*)"mppe_decomp_init"; + } #endif /* PPP_DEBUG */ - /* Save keys. */ - MEMCPY(state->session_key, state->master_key, sizeof(state->master_key)); + /* Save keys. */ + MEMCPY(state->session_key, state->master_key, sizeof(state->master_key)); - if (options & MPPE_OPT_128) - state->keylen = 16; - else if (options & MPPE_OPT_40) - state->keylen = 8; - else { - PPPDEBUG(LOG_DEBUG, ("%s[%d]: unknown key length\n", debugstr, - pcb->netif->num)); - lcp_close(pcb, "MPPE required but peer negotiation failed"); - return; - } - if (options & MPPE_OPT_STATEFUL) - state->stateful = 1; + if (options & MPPE_OPT_128) + state->keylen = 16; + else if (options & MPPE_OPT_40) + state->keylen = 8; + else { + PPPDEBUG(LOG_DEBUG, ("%s[%d]: unknown key length\n", debugstr, + pcb->netif->num)); + lcp_close(pcb, "MPPE required but peer negotiation failed"); + return; + } + if (options & MPPE_OPT_STATEFUL) + state->stateful = 1; - /* Generate the initial session key. */ - mppe_rekey(state, 1); + /* Generate the initial session key. */ + mppe_rekey(state, 1); #if PPP_DEBUG - { - int i; - char mkey[sizeof(state->master_key) * 2 + 1]; - char skey[sizeof(state->session_key) * 2 + 1]; + { + int i; + char mkey[sizeof(state->master_key) * 2 + 1]; + char skey[sizeof(state->session_key) * 2 + 1]; - PPPDEBUG(LOG_DEBUG, ("%s[%d]: initialized with %d-bit %s mode\n", - debugstr, pcb->netif->num, (state->keylen == 16) ? 128 : 40, - (state->stateful) ? "stateful" : "stateless")); + PPPDEBUG(LOG_DEBUG, ("%s[%d]: initialized with %d-bit %s mode\n", + debugstr, pcb->netif->num, (state->keylen == 16) ? 128 : 40, + (state->stateful) ? "stateful" : "stateless")); - for (i = 0; i < (int)sizeof(state->master_key); i++) - sprintf(mkey + i * 2, "%02x", state->master_key[i]); - for (i = 0; i < (int)sizeof(state->session_key); i++) - sprintf(skey + i * 2, "%02x", state->session_key[i]); - PPPDEBUG(LOG_DEBUG, - ("%s[%d]: keys: master: %s initial session: %s\n", - debugstr, pcb->netif->num, mkey, skey)); - } + for (i = 0; i < (int)sizeof(state->master_key); i++) + sprintf(mkey + i * 2, "%02x", state->master_key[i]); + for (i = 0; i < (int)sizeof(state->session_key); i++) + sprintf(skey + i * 2, "%02x", state->session_key[i]); + PPPDEBUG(LOG_DEBUG, + ("%s[%d]: keys: master: %s initial session: %s\n", + debugstr, pcb->netif->num, mkey, skey)); + } #endif /* PPP_DEBUG */ - /* - * Initialize the coherency count. The initial value is not specified - * in RFC 3078, but we can make a reasonable assumption that it will - * start at 0. Setting it to the max here makes the comp/decomp code - * do the right thing (determined through experiment). - */ - state->ccount = MPPE_CCOUNT_SPACE - 1; + /* + * Initialize the coherency count. The initial value is not specified + * in RFC 3078, but we can make a reasonable assumption that it will + * start at 0. Setting it to the max here makes the comp/decomp code + * do the right thing (determined through experiment). + */ + state->ccount = MPPE_CCOUNT_SPACE - 1; - /* - * Note that even though we have initialized the key table, we don't - * set the FLUSHED bit. This is contrary to RFC 3078, sec. 3.1. - */ - state->bits = MPPE_BIT_ENCRYPTED; + /* + * Note that even though we have initialized the key table, we don't + * set the FLUSHED bit. This is contrary to RFC 3078, sec. 3.1. + */ + state->bits = MPPE_BIT_ENCRYPTED; } /* @@ -180,8 +180,8 @@ mppe_init(ppp_pcb *pcb, ppp_mppe_state *state, u8_t options) */ void mppe_comp_reset(ppp_pcb *pcb, ppp_mppe_state *state) { - LWIP_UNUSED_ARG(pcb); - state->bits |= MPPE_BIT_FLUSHED; + LWIP_UNUSED_ARG(pcb); + state->bits |= MPPE_BIT_FLUSHED; } /* @@ -192,74 +192,74 @@ void mppe_comp_reset(ppp_pcb *pcb, ppp_mppe_state *state) err_t mppe_compress(ppp_pcb *pcb, ppp_mppe_state *state, struct pbuf **pb, u16_t protocol) { - struct pbuf *n, *np; - u8_t *pl; - err_t err; + struct pbuf *n, *np; + u8_t *pl; + err_t err; - LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(pcb); - /* TCP stack requires that we don't change the packet payload, therefore we copy - * the whole packet before encryption. - */ - np = pbuf_alloc(PBUF_RAW, MPPE_OVHD + sizeof(protocol) + (*pb)->tot_len, PBUF_POOL); - if (!np) { - return ERR_MEM; - } + /* TCP stack requires that we don't change the packet payload, therefore we copy + * the whole packet before encryption. + */ + np = pbuf_alloc(PBUF_RAW, MPPE_OVHD + sizeof(protocol) + (*pb)->tot_len, PBUF_RAM); + if (!np) { + return ERR_MEM; + } - /* Hide MPPE header + protocol */ - pbuf_header(np, -(s16_t)(MPPE_OVHD + sizeof(protocol))); + /* Hide MPPE header + protocol */ + pbuf_remove_header(np, MPPE_OVHD + sizeof(protocol)); - if ((err = pbuf_copy(np, *pb)) != ERR_OK) { - pbuf_free(np); - return err; - } + if ((err = pbuf_copy(np, *pb)) != ERR_OK) { + pbuf_free(np); + return err; + } - /* Reveal MPPE header + protocol */ - pbuf_header(np, (s16_t)(MPPE_OVHD + sizeof(protocol))); + /* Reveal MPPE header + protocol */ + pbuf_add_header(np, MPPE_OVHD + sizeof(protocol)); - *pb = np; - pl = (u8_t*)np->payload; + *pb = np; + pl = (u8_t*)np->payload; - state->ccount = (state->ccount + 1) % MPPE_CCOUNT_SPACE; - PPPDEBUG(LOG_DEBUG, ("mppe_compress[%d]: ccount %d\n", pcb->netif->num, state->ccount)); - /* FIXME: use PUT* macros */ - pl[0] = state->ccount>>8; - pl[1] = state->ccount; + state->ccount = (state->ccount + 1) % MPPE_CCOUNT_SPACE; + PPPDEBUG(LOG_DEBUG, ("mppe_compress[%d]: ccount %d\n", pcb->netif->num, state->ccount)); + /* FIXME: use PUT* macros */ + pl[0] = state->ccount>>8; + pl[1] = state->ccount; - if (!state->stateful || /* stateless mode */ - ((state->ccount & 0xff) == 0xff) || /* "flag" packet */ - (state->bits & MPPE_BIT_FLUSHED)) { /* CCP Reset-Request */ - /* We must rekey */ - if (state->stateful) { - PPPDEBUG(LOG_DEBUG, ("mppe_compress[%d]: rekeying\n", pcb->netif->num)); - } - mppe_rekey(state, 0); - state->bits |= MPPE_BIT_FLUSHED; - } - pl[0] |= state->bits; - state->bits &= ~MPPE_BIT_FLUSHED; /* reset for next xmit */ - pl += MPPE_OVHD; + if (!state->stateful || /* stateless mode */ + ((state->ccount & 0xff) == 0xff) || /* "flag" packet */ + (state->bits & MPPE_BIT_FLUSHED)) { /* CCP Reset-Request */ + /* We must rekey */ + if (state->stateful) { + PPPDEBUG(LOG_DEBUG, ("mppe_compress[%d]: rekeying\n", pcb->netif->num)); + } + mppe_rekey(state, 0); + state->bits |= MPPE_BIT_FLUSHED; + } + pl[0] |= state->bits; + state->bits &= ~MPPE_BIT_FLUSHED; /* reset for next xmit */ + pl += MPPE_OVHD; - /* Add protocol */ - /* FIXME: add PFC support */ - pl[0] = protocol >> 8; - pl[1] = protocol; + /* Add protocol */ + /* FIXME: add PFC support */ + pl[0] = protocol >> 8; + pl[1] = protocol; - /* Hide MPPE header */ - pbuf_header(np, -(s16_t)MPPE_OVHD); + /* Hide MPPE header */ + pbuf_remove_header(np, MPPE_OVHD); - /* Encrypt packet */ - for (n = np; n != NULL; n = n->next) { - lwip_arc4_crypt(&state->arc4, (u8_t*)n->payload, n->len); - if (n->tot_len == n->len) { - break; - } - } + /* Encrypt packet */ + for (n = np; n != NULL; n = n->next) { + lwip_arc4_crypt(&state->arc4, (u8_t*)n->payload, n->len); + if (n->tot_len == n->len) { + break; + } + } - /* Reveal MPPE header */ - pbuf_header(np, (s16_t)MPPE_OVHD); + /* Reveal MPPE header */ + pbuf_add_header(np, MPPE_OVHD); - return ERR_OK; + return ERR_OK; } /* @@ -267,9 +267,9 @@ mppe_compress(ppp_pcb *pcb, ppp_mppe_state *state, struct pbuf **pb, u16_t proto */ void mppe_decomp_reset(ppp_pcb *pcb, ppp_mppe_state *state) { - LWIP_UNUSED_ARG(pcb); - LWIP_UNUSED_ARG(state); - return; + LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(state); + return; } /* @@ -278,135 +278,135 @@ void mppe_decomp_reset(ppp_pcb *pcb, ppp_mppe_state *state) err_t mppe_decompress(ppp_pcb *pcb, ppp_mppe_state *state, struct pbuf **pb) { - struct pbuf *n0 = *pb, *n; - u8_t *pl; - u16_t ccount; - u8_t flushed; + struct pbuf *n0 = *pb, *n; + u8_t *pl; + u16_t ccount; + u8_t flushed; - /* MPPE Header */ - if (n0->len < MPPE_OVHD) { - PPPDEBUG(LOG_DEBUG, - ("mppe_decompress[%d]: short pkt (%d)\n", - pcb->netif->num, n0->len)); - state->sanity_errors += 100; - goto sanity_error; - } + /* MPPE Header */ + if (n0->len < MPPE_OVHD) { + PPPDEBUG(LOG_DEBUG, + ("mppe_decompress[%d]: short pkt (%d)\n", + pcb->netif->num, n0->len)); + state->sanity_errors += 100; + goto sanity_error; + } - pl = (u8_t*)n0->payload; - flushed = MPPE_BITS(pl) & MPPE_BIT_FLUSHED; - ccount = MPPE_CCOUNT(pl); - PPPDEBUG(LOG_DEBUG, ("mppe_decompress[%d]: ccount %d\n", - pcb->netif->num, ccount)); + pl = (u8_t*)n0->payload; + flushed = MPPE_BITS(pl) & MPPE_BIT_FLUSHED; + ccount = MPPE_CCOUNT(pl); + PPPDEBUG(LOG_DEBUG, ("mppe_decompress[%d]: ccount %d\n", + pcb->netif->num, ccount)); - /* sanity checks -- terminate with extreme prejudice */ - if (!(MPPE_BITS(pl) & MPPE_BIT_ENCRYPTED)) { - PPPDEBUG(LOG_DEBUG, - ("mppe_decompress[%d]: ENCRYPTED bit not set!\n", - pcb->netif->num)); - state->sanity_errors += 100; - goto sanity_error; - } - if (!state->stateful && !flushed) { - PPPDEBUG(LOG_DEBUG, ("mppe_decompress[%d]: FLUSHED bit not set in " - "stateless mode!\n", pcb->netif->num)); - state->sanity_errors += 100; - goto sanity_error; - } - if (state->stateful && ((ccount & 0xff) == 0xff) && !flushed) { - PPPDEBUG(LOG_DEBUG, ("mppe_decompress[%d]: FLUSHED bit not set on " - "flag packet!\n", pcb->netif->num)); - state->sanity_errors += 100; - goto sanity_error; - } + /* sanity checks -- terminate with extreme prejudice */ + if (!(MPPE_BITS(pl) & MPPE_BIT_ENCRYPTED)) { + PPPDEBUG(LOG_DEBUG, + ("mppe_decompress[%d]: ENCRYPTED bit not set!\n", + pcb->netif->num)); + state->sanity_errors += 100; + goto sanity_error; + } + if (!state->stateful && !flushed) { + PPPDEBUG(LOG_DEBUG, ("mppe_decompress[%d]: FLUSHED bit not set in " + "stateless mode!\n", pcb->netif->num)); + state->sanity_errors += 100; + goto sanity_error; + } + if (state->stateful && ((ccount & 0xff) == 0xff) && !flushed) { + PPPDEBUG(LOG_DEBUG, ("mppe_decompress[%d]: FLUSHED bit not set on " + "flag packet!\n", pcb->netif->num)); + state->sanity_errors += 100; + goto sanity_error; + } - /* - * Check the coherency count. - */ + /* + * Check the coherency count. + */ - if (!state->stateful) { - /* Discard late packet */ - if ((ccount - state->ccount) % MPPE_CCOUNT_SPACE > MPPE_CCOUNT_SPACE / 2) { - state->sanity_errors++; - goto sanity_error; - } + if (!state->stateful) { + /* Discard late packet */ + if ((ccount - state->ccount) % MPPE_CCOUNT_SPACE > MPPE_CCOUNT_SPACE / 2) { + state->sanity_errors++; + goto sanity_error; + } - /* RFC 3078, sec 8.1. Rekey for every packet. */ - while (state->ccount != ccount) { - mppe_rekey(state, 0); - state->ccount = (state->ccount + 1) % MPPE_CCOUNT_SPACE; - } - } else { - /* RFC 3078, sec 8.2. */ - if (!state->discard) { - /* normal state */ - state->ccount = (state->ccount + 1) % MPPE_CCOUNT_SPACE; - if (ccount != state->ccount) { - /* - * (ccount > state->ccount) - * Packet loss detected, enter the discard state. - * Signal the peer to rekey (by sending a CCP Reset-Request). - */ - state->discard = 1; - ccp_resetrequest(pcb); - return ERR_BUF; - } - } else { - /* discard state */ - if (!flushed) { - /* ccp.c will be silent (no additional CCP Reset-Requests). */ - return ERR_BUF; - } else { - /* Rekey for every missed "flag" packet. */ - while ((ccount & ~0xff) != - (state->ccount & ~0xff)) { - mppe_rekey(state, 0); - state->ccount = - (state->ccount + - 256) % MPPE_CCOUNT_SPACE; - } + /* RFC 3078, sec 8.1. Rekey for every packet. */ + while (state->ccount != ccount) { + mppe_rekey(state, 0); + state->ccount = (state->ccount + 1) % MPPE_CCOUNT_SPACE; + } + } else { + /* RFC 3078, sec 8.2. */ + if (!state->discard) { + /* normal state */ + state->ccount = (state->ccount + 1) % MPPE_CCOUNT_SPACE; + if (ccount != state->ccount) { + /* + * (ccount > state->ccount) + * Packet loss detected, enter the discard state. + * Signal the peer to rekey (by sending a CCP Reset-Request). + */ + state->discard = 1; + ccp_resetrequest(pcb); + return ERR_BUF; + } + } else { + /* discard state */ + if (!flushed) { + /* ccp.c will be silent (no additional CCP Reset-Requests). */ + return ERR_BUF; + } else { + /* Rekey for every missed "flag" packet. */ + while ((ccount & ~0xff) != + (state->ccount & ~0xff)) { + mppe_rekey(state, 0); + state->ccount = + (state->ccount + + 256) % MPPE_CCOUNT_SPACE; + } - /* reset */ - state->discard = 0; - state->ccount = ccount; - /* - * Another problem with RFC 3078 here. It implies that the - * peer need not send a Reset-Ack packet. But RFC 1962 - * requires it. Hopefully, M$ does send a Reset-Ack; even - * though it isn't required for MPPE synchronization, it is - * required to reset CCP state. - */ - } - } - if (flushed) - mppe_rekey(state, 0); - } + /* reset */ + state->discard = 0; + state->ccount = ccount; + /* + * Another problem with RFC 3078 here. It implies that the + * peer need not send a Reset-Ack packet. But RFC 1962 + * requires it. Hopefully, M$ does send a Reset-Ack; even + * though it isn't required for MPPE synchronization, it is + * required to reset CCP state. + */ + } + } + if (flushed) + mppe_rekey(state, 0); + } - /* Hide MPPE header */ - pbuf_header(n0, -(s16_t)(MPPE_OVHD)); + /* Hide MPPE header */ + pbuf_remove_header(n0, MPPE_OVHD); - /* Decrypt the packet. */ - for (n = n0; n != NULL; n = n->next) { - lwip_arc4_crypt(&state->arc4, (u8_t*)n->payload, n->len); - if (n->tot_len == n->len) { - break; - } - } + /* Decrypt the packet. */ + for (n = n0; n != NULL; n = n->next) { + lwip_arc4_crypt(&state->arc4, (u8_t*)n->payload, n->len); + if (n->tot_len == n->len) { + break; + } + } - /* good packet credit */ - state->sanity_errors >>= 1; + /* good packet credit */ + state->sanity_errors >>= 1; - return ERR_OK; + return ERR_OK; sanity_error: - if (state->sanity_errors >= SANITY_MAX) { - /* - * Take LCP down if the peer is sending too many bogons. - * We don't want to do this for a single or just a few - * instances since it could just be due to packet corruption. - */ - lcp_close(pcb, "Too many MPPE errors"); - } - return ERR_BUF; + if (state->sanity_errors >= SANITY_MAX) { + /* + * Take LCP down if the peer is sending too many bogons. + * We don't want to do this for a single or just a few + * instances since it could just be due to packet corruption. + */ + lcp_close(pcb, "Too many MPPE errors"); + } + return ERR_BUF; } #endif /* PPP_SUPPORT && MPPE_SUPPORT */ diff --git a/Libraries/LwIP/src/netif/ppp/multilink.c b/Libraries/LwIP/src/netif/ppp/multilink.c index 499a5ea..9153dea 100755 --- a/Libraries/LwIP/src/netif/ppp/multilink.c +++ b/Libraries/LwIP/src/netif/ppp/multilink.c @@ -55,11 +55,11 @@ #include "netif/ppp/lcp.h" #include "netif/ppp/tdb.h" -bool endpoint_specified; /* user gave explicit endpoint discriminator */ -char *bundle_id; /* identifier for our bundle */ -char *blinks_id; /* key for the list of links */ -bool doing_multilink; /* multilink was enabled and agreed to */ -bool multilink_master; /* we own the multilink bundle */ +bool endpoint_specified; /* user gave explicit endpoint discriminator */ +char *bundle_id; /* identifier for our bundle */ +char *blinks_id; /* key for the list of links */ +bool doing_multilink; /* multilink was enabled and agreed to */ +bool multilink_master; /* we own the multilink bundle */ extern TDB_CONTEXT *pppdb; extern char db_key[]; @@ -72,43 +72,43 @@ static int get_default_epdisc (struct epdisc *); static int parse_num (char *str, const char *key, int *valp); static int owns_unit (TDB_DATA pid, int unit); -#define set_ip_epdisc(ep, addr) do { \ - ep->length = 4; \ - ep->value[0] = addr >> 24; \ - ep->value[1] = addr >> 16; \ - ep->value[2] = addr >> 8; \ - ep->value[3] = addr; \ +#define set_ip_epdisc(ep, addr) do { \ + ep->length = 4; \ + ep->value[0] = addr >> 24; \ + ep->value[1] = addr >> 16; \ + ep->value[2] = addr >> 8; \ + ep->value[3] = addr; \ } while (0) -#define LOCAL_IP_ADDR(addr) \ - (((addr) & 0xff000000) == 0x0a000000 /* 10.x.x.x */ \ - || ((addr) & 0xfff00000) == 0xac100000 /* 172.16.x.x */ \ - || ((addr) & 0xffff0000) == 0xc0a80000) /* 192.168.x.x */ +#define LOCAL_IP_ADDR(addr) \ + (((addr) & 0xff000000) == 0x0a000000 /* 10.x.x.x */ \ + || ((addr) & 0xfff00000) == 0xac100000 /* 172.16.x.x */ \ + || ((addr) & 0xffff0000) == 0xc0a80000) /* 192.168.x.x */ -#define process_exists(n) (kill((n), 0) == 0 || errno != ESRCH) +#define process_exists(n) (kill((n), 0) == 0 || errno != ESRCH) void mp_check_options() { - lcp_options *wo = &lcp_wantoptions[0]; - lcp_options *ao = &lcp_allowoptions[0]; + lcp_options *wo = &lcp_wantoptions[0]; + lcp_options *ao = &lcp_allowoptions[0]; - doing_multilink = 0; - if (!multilink) - return; - /* if we're doing multilink, we have to negotiate MRRU */ - if (!wo->neg_mrru) { - /* mrru not specified, default to mru */ - wo->mrru = wo->mru; - wo->neg_mrru = 1; - } - ao->mrru = ao->mru; - ao->neg_mrru = 1; + doing_multilink = 0; + if (!multilink) + return; + /* if we're doing multilink, we have to negotiate MRRU */ + if (!wo->neg_mrru) { + /* mrru not specified, default to mru */ + wo->mrru = wo->mru; + wo->neg_mrru = 1; + } + ao->mrru = ao->mru; + ao->neg_mrru = 1; - if (!wo->neg_endpoint && !noendpoint) { - /* get a default endpoint value */ - wo->neg_endpoint = get_default_epdisc(&wo->endpoint); - } + if (!wo->neg_endpoint && !noendpoint) { + /* get a default endpoint value */ + wo->neg_endpoint = get_default_epdisc(&wo->endpoint); + } } /* @@ -118,289 +118,289 @@ mp_check_options() int mp_join_bundle() { - lcp_options *go = &lcp_gotoptions[0]; - lcp_options *ho = &lcp_hisoptions[0]; - lcp_options *ao = &lcp_allowoptions[0]; - int unit, pppd_pid; - int l, mtu; - char *p; - TDB_DATA key, pid, rec; + lcp_options *go = &lcp_gotoptions[0]; + lcp_options *ho = &lcp_hisoptions[0]; + lcp_options *ao = &lcp_allowoptions[0]; + int unit, pppd_pid; + int l, mtu; + char *p; + TDB_DATA key, pid, rec; - if (doing_multilink) { - /* have previously joined a bundle */ - if (!go->neg_mrru || !ho->neg_mrru) { - notice("oops, didn't get multilink on renegotiation"); - lcp_close(pcb, "multilink required"); - return 0; - } - /* XXX should check the peer_authname and ho->endpoint - are the same as previously */ - return 0; - } + if (doing_multilink) { + /* have previously joined a bundle */ + if (!go->neg_mrru || !ho->neg_mrru) { + notice("oops, didn't get multilink on renegotiation"); + lcp_close(pcb, "multilink required"); + return 0; + } + /* XXX should check the peer_authname and ho->endpoint + are the same as previously */ + return 0; + } - if (!go->neg_mrru || !ho->neg_mrru) { - /* not doing multilink */ - if (go->neg_mrru) - notice("oops, multilink negotiated only for receive"); - mtu = ho->neg_mru? ho->mru: PPP_MRU; - if (mtu > ao->mru) - mtu = ao->mru; - if (demand) { - /* already have a bundle */ - cfg_bundle(0, 0, 0, 0); - netif_set_mtu(pcb, mtu); - return 0; - } - make_new_bundle(0, 0, 0, 0); - set_ifunit(1); - netif_set_mtu(pcb, mtu); - return 0; - } + if (!go->neg_mrru || !ho->neg_mrru) { + /* not doing multilink */ + if (go->neg_mrru) + notice("oops, multilink negotiated only for receive"); + mtu = ho->neg_mru? ho->mru: PPP_MRU; + if (mtu > ao->mru) + mtu = ao->mru; + if (demand) { + /* already have a bundle */ + cfg_bundle(0, 0, 0, 0); + netif_set_mtu(pcb, mtu); + return 0; + } + make_new_bundle(0, 0, 0, 0); + set_ifunit(1); + netif_set_mtu(pcb, mtu); + return 0; + } - doing_multilink = 1; + doing_multilink = 1; - /* - * Find the appropriate bundle or join a new one. - * First we make up a name for the bundle. - * The length estimate is worst-case assuming every - * character has to be quoted. - */ - l = 4 * strlen(peer_authname) + 10; - if (ho->neg_endpoint) - l += 3 * ho->endpoint.length + 8; - if (bundle_name) - l += 3 * strlen(bundle_name) + 2; - bundle_id = malloc(l); - if (bundle_id == 0) - novm("bundle identifier"); + /* + * Find the appropriate bundle or join a new one. + * First we make up a name for the bundle. + * The length estimate is worst-case assuming every + * character has to be quoted. + */ + l = 4 * strlen(peer_authname) + 10; + if (ho->neg_endpoint) + l += 3 * ho->endpoint.length + 8; + if (bundle_name) + l += 3 * strlen(bundle_name) + 2; + bundle_id = malloc(l); + if (bundle_id == 0) + novm("bundle identifier"); - p = bundle_id; - p += slprintf(p, l-1, "BUNDLE=\"%q\"", peer_authname); - if (ho->neg_endpoint || bundle_name) - *p++ = '/'; - if (ho->neg_endpoint) - p += slprintf(p, bundle_id+l-p, "%s", - epdisc_to_str(&ho->endpoint)); - if (bundle_name) - p += slprintf(p, bundle_id+l-p, "/%v", bundle_name); + p = bundle_id; + p += slprintf(p, l-1, "BUNDLE=\"%q\"", peer_authname); + if (ho->neg_endpoint || bundle_name) + *p++ = '/'; + if (ho->neg_endpoint) + p += slprintf(p, bundle_id+l-p, "%s", + epdisc_to_str(&ho->endpoint)); + if (bundle_name) + p += slprintf(p, bundle_id+l-p, "/%v", bundle_name); - /* Make the key for the list of links belonging to the bundle */ - l = p - bundle_id; - blinks_id = malloc(l + 7); - if (blinks_id == NULL) - novm("bundle links key"); - slprintf(blinks_id, l + 7, "BUNDLE_LINKS=%s", bundle_id + 7); + /* Make the key for the list of links belonging to the bundle */ + l = p - bundle_id; + blinks_id = malloc(l + 7); + if (blinks_id == NULL) + novm("bundle links key"); + slprintf(blinks_id, l + 7, "BUNDLE_LINKS=%s", bundle_id + 7); - /* - * For demand mode, we only need to configure the bundle - * and attach the link. - */ - mtu = LWIP_MIN(ho->mrru, ao->mru); - if (demand) { - cfg_bundle(go->mrru, ho->mrru, go->neg_ssnhf, ho->neg_ssnhf); - netif_set_mtu(pcb, mtu); - script_setenv("BUNDLE", bundle_id + 7, 1); - return 0; - } + /* + * For demand mode, we only need to configure the bundle + * and attach the link. + */ + mtu = LWIP_MIN(ho->mrru, ao->mru); + if (demand) { + cfg_bundle(go->mrru, ho->mrru, go->neg_ssnhf, ho->neg_ssnhf); + netif_set_mtu(pcb, mtu); + script_setenv("BUNDLE", bundle_id + 7, 1); + return 0; + } - /* - * Check if the bundle ID is already in the database. - */ - unit = -1; - lock_db(); - key.dptr = bundle_id; - key.dsize = p - bundle_id; - pid = tdb_fetch(pppdb, key); - if (pid.dptr != NULL) { - /* bundle ID exists, see if the pppd record exists */ - rec = tdb_fetch(pppdb, pid); - if (rec.dptr != NULL && rec.dsize > 0) { - /* make sure the string is null-terminated */ - rec.dptr[rec.dsize-1] = 0; - /* parse the interface number */ - parse_num(rec.dptr, "IFNAME=ppp", &unit); - /* check the pid value */ - if (!parse_num(rec.dptr, "PPPD_PID=", &pppd_pid) - || !process_exists(pppd_pid) - || !owns_unit(pid, unit)) - unit = -1; - free(rec.dptr); - } - free(pid.dptr); - } + /* + * Check if the bundle ID is already in the database. + */ + unit = -1; + lock_db(); + key.dptr = bundle_id; + key.dsize = p - bundle_id; + pid = tdb_fetch(pppdb, key); + if (pid.dptr != NULL) { + /* bundle ID exists, see if the pppd record exists */ + rec = tdb_fetch(pppdb, pid); + if (rec.dptr != NULL && rec.dsize > 0) { + /* make sure the string is null-terminated */ + rec.dptr[rec.dsize-1] = 0; + /* parse the interface number */ + parse_num(rec.dptr, "IFNAME=ppp", &unit); + /* check the pid value */ + if (!parse_num(rec.dptr, "PPPD_PID=", &pppd_pid) + || !process_exists(pppd_pid) + || !owns_unit(pid, unit)) + unit = -1; + free(rec.dptr); + } + free(pid.dptr); + } - if (unit >= 0) { - /* attach to existing unit */ - if (bundle_attach(unit)) { - set_ifunit(0); - script_setenv("BUNDLE", bundle_id + 7, 0); - make_bundle_links(1); - unlock_db(); - info("Link attached to %s", ifname); - return 1; - } - /* attach failed because bundle doesn't exist */ - } + if (unit >= 0) { + /* attach to existing unit */ + if (bundle_attach(unit)) { + set_ifunit(0); + script_setenv("BUNDLE", bundle_id + 7, 0); + make_bundle_links(1); + unlock_db(); + info("Link attached to %s", ifname); + return 1; + } + /* attach failed because bundle doesn't exist */ + } - /* we have to make a new bundle */ - make_new_bundle(go->mrru, ho->mrru, go->neg_ssnhf, ho->neg_ssnhf); - set_ifunit(1); - netif_set_mtu(pcb, mtu); - script_setenv("BUNDLE", bundle_id + 7, 1); - make_bundle_links(pcb); - unlock_db(); - info("New bundle %s created", ifname); - multilink_master = 1; - return 0; + /* we have to make a new bundle */ + make_new_bundle(go->mrru, ho->mrru, go->neg_ssnhf, ho->neg_ssnhf); + set_ifunit(1); + netif_set_mtu(pcb, mtu); + script_setenv("BUNDLE", bundle_id + 7, 1); + make_bundle_links(pcb); + unlock_db(); + info("New bundle %s created", ifname); + multilink_master = 1; + return 0; } void mp_exit_bundle() { - lock_db(); - remove_bundle_link(); - unlock_db(); + lock_db(); + remove_bundle_link(); + unlock_db(); } static void sendhup(char *str) { - int pid; + int pid; - if (parse_num(str, "PPPD_PID=", &pid) && pid != getpid()) { - if (debug) - dbglog("sending SIGHUP to process %d", pid); - kill(pid, SIGHUP); - } + if (parse_num(str, "PPPD_PID=", &pid) && pid != getpid()) { + if (debug) + dbglog("sending SIGHUP to process %d", pid); + kill(pid, SIGHUP); + } } void mp_bundle_terminated() { - TDB_DATA key; + TDB_DATA key; - bundle_terminating = 1; - upper_layers_down(pcb); - notice("Connection terminated."); + bundle_terminating = 1; + upper_layers_down(pcb); + notice("Connection terminated."); #if PPP_STATS_SUPPORT - print_link_stats(); + print_link_stats(); #endif /* PPP_STATS_SUPPORT */ - if (!demand) { - remove_pidfiles(); - script_unsetenv("IFNAME"); - } + if (!demand) { + remove_pidfiles(); + script_unsetenv("IFNAME"); + } - lock_db(); - destroy_bundle(); - iterate_bundle_links(sendhup); - key.dptr = blinks_id; - key.dsize = strlen(blinks_id); - tdb_delete(pppdb, key); - unlock_db(); + lock_db(); + destroy_bundle(); + iterate_bundle_links(sendhup); + key.dptr = blinks_id; + key.dsize = strlen(blinks_id); + tdb_delete(pppdb, key); + unlock_db(); - new_phase(PPP_PHASE_DEAD); + new_phase(PPP_PHASE_DEAD); - doing_multilink = 0; - multilink_master = 0; + doing_multilink = 0; + multilink_master = 0; } static void make_bundle_links(int append) { - TDB_DATA key, rec; - char *p; - char entry[32]; - int l; + TDB_DATA key, rec; + char *p; + char entry[32]; + int l; - key.dptr = blinks_id; - key.dsize = strlen(blinks_id); - slprintf(entry, sizeof(entry), "%s;", db_key); - p = entry; - if (append) { - rec = tdb_fetch(pppdb, key); - if (rec.dptr != NULL && rec.dsize > 0) { - rec.dptr[rec.dsize-1] = 0; - if (strstr(rec.dptr, db_key) != NULL) { - /* already in there? strange */ - warn("link entry already exists in tdb"); - return; - } - l = rec.dsize + strlen(entry); - p = malloc(l); - if (p == NULL) - novm("bundle link list"); - slprintf(p, l, "%s%s", rec.dptr, entry); - } else { - warn("bundle link list not found"); - } - if (rec.dptr != NULL) - free(rec.dptr); - } - rec.dptr = p; - rec.dsize = strlen(p) + 1; - if (tdb_store(pppdb, key, rec, TDB_REPLACE)) - error("couldn't %s bundle link list", - append? "update": "create"); - if (p != entry) - free(p); + key.dptr = blinks_id; + key.dsize = strlen(blinks_id); + slprintf(entry, sizeof(entry), "%s;", db_key); + p = entry; + if (append) { + rec = tdb_fetch(pppdb, key); + if (rec.dptr != NULL && rec.dsize > 0) { + rec.dptr[rec.dsize-1] = 0; + if (strstr(rec.dptr, db_key) != NULL) { + /* already in there? strange */ + warn("link entry already exists in tdb"); + return; + } + l = rec.dsize + strlen(entry); + p = malloc(l); + if (p == NULL) + novm("bundle link list"); + slprintf(p, l, "%s%s", rec.dptr, entry); + } else { + warn("bundle link list not found"); + } + if (rec.dptr != NULL) + free(rec.dptr); + } + rec.dptr = p; + rec.dsize = strlen(p) + 1; + if (tdb_store(pppdb, key, rec, TDB_REPLACE)) + error("couldn't %s bundle link list", + append? "update": "create"); + if (p != entry) + free(p); } static void remove_bundle_link() { - TDB_DATA key, rec; - char entry[32]; - char *p, *q; - int l; + TDB_DATA key, rec; + char entry[32]; + char *p, *q; + int l; - key.dptr = blinks_id; - key.dsize = strlen(blinks_id); - slprintf(entry, sizeof(entry), "%s;", db_key); + key.dptr = blinks_id; + key.dsize = strlen(blinks_id); + slprintf(entry, sizeof(entry), "%s;", db_key); - rec = tdb_fetch(pppdb, key); - if (rec.dptr == NULL || rec.dsize <= 0) { - if (rec.dptr != NULL) - free(rec.dptr); - return; - } - rec.dptr[rec.dsize-1] = 0; - p = strstr(rec.dptr, entry); - if (p != NULL) { - q = p + strlen(entry); - l = strlen(q) + 1; - memmove(p, q, l); - rec.dsize = p - rec.dptr + l; - if (tdb_store(pppdb, key, rec, TDB_REPLACE)) - error("couldn't update bundle link list (removal)"); - } - free(rec.dptr); + rec = tdb_fetch(pppdb, key); + if (rec.dptr == NULL || rec.dsize <= 0) { + if (rec.dptr != NULL) + free(rec.dptr); + return; + } + rec.dptr[rec.dsize-1] = 0; + p = strstr(rec.dptr, entry); + if (p != NULL) { + q = p + strlen(entry); + l = strlen(q) + 1; + memmove(p, q, l); + rec.dsize = p - rec.dptr + l; + if (tdb_store(pppdb, key, rec, TDB_REPLACE)) + error("couldn't update bundle link list (removal)"); + } + free(rec.dptr); } static void iterate_bundle_links(void (*func)(char *)) { - TDB_DATA key, rec, pp; - char *p, *q; + TDB_DATA key, rec, pp; + char *p, *q; - key.dptr = blinks_id; - key.dsize = strlen(blinks_id); - rec = tdb_fetch(pppdb, key); - if (rec.dptr == NULL || rec.dsize <= 0) { - error("bundle link list not found (iterating list)"); - if (rec.dptr != NULL) - free(rec.dptr); - return; - } - p = rec.dptr; - p[rec.dsize-1] = 0; - while ((q = strchr(p, ';')) != NULL) { - *q = 0; - key.dptr = p; - key.dsize = q - p; - pp = tdb_fetch(pppdb, key); - if (pp.dptr != NULL && pp.dsize > 0) { - pp.dptr[pp.dsize-1] = 0; - func(pp.dptr); - } - if (pp.dptr != NULL) - free(pp.dptr); - p = q + 1; - } - free(rec.dptr); + key.dptr = blinks_id; + key.dsize = strlen(blinks_id); + rec = tdb_fetch(pppdb, key); + if (rec.dptr == NULL || rec.dsize <= 0) { + error("bundle link list not found (iterating list)"); + if (rec.dptr != NULL) + free(rec.dptr); + return; + } + p = rec.dptr; + p[rec.dsize-1] = 0; + while ((q = strchr(p, ';')) != NULL) { + *q = 0; + key.dptr = p; + key.dsize = q - p; + pp = tdb_fetch(pppdb, key); + if (pp.dptr != NULL && pp.dsize > 0) { + pp.dptr[pp.dsize-1] = 0; + func(pp.dptr); + } + if (pp.dptr != NULL) + free(pp.dptr); + p = q + 1; + } + free(rec.dptr); } static int @@ -409,19 +409,19 @@ parse_num(str, key, valp) const char *key; int *valp; { - char *p, *endp; - int i; + char *p, *endp; + int i; - p = strstr(str, key); - if (p != 0) { - p += strlen(key); - i = strtol(p, &endp, 10); - if (endp != p && (*endp == 0 || *endp == ';')) { - *valp = i; - return 1; - } - } - return 0; + p = strstr(str, key); + if (p != 0) { + p += strlen(key); + i = strtol(p, &endp, 10); + if (endp != p && (*endp == 0 || *endp == ';')) { + *valp = i; + return 1; + } + } + return 0; } /* @@ -432,53 +432,53 @@ owns_unit(key, unit) TDB_DATA key; int unit; { - char ifkey[32]; - TDB_DATA kd, vd; - int ret = 0; + char ifkey[32]; + TDB_DATA kd, vd; + int ret = 0; - slprintf(ifkey, sizeof(ifkey), "IFNAME=ppp%d", unit); - kd.dptr = ifkey; - kd.dsize = strlen(ifkey); - vd = tdb_fetch(pppdb, kd); - if (vd.dptr != NULL) { - ret = vd.dsize == key.dsize - && memcmp(vd.dptr, key.dptr, vd.dsize) == 0; - free(vd.dptr); - } - return ret; + slprintf(ifkey, sizeof(ifkey), "IFNAME=ppp%d", unit); + kd.dptr = ifkey; + kd.dsize = strlen(ifkey); + vd = tdb_fetch(pppdb, kd); + if (vd.dptr != NULL) { + ret = vd.dsize == key.dsize + && memcmp(vd.dptr, key.dptr, vd.dsize) == 0; + free(vd.dptr); + } + return ret; } static int get_default_epdisc(ep) struct epdisc *ep; { - char *p; - struct hostent *hp; - u32_t addr; + char *p; + struct hostent *hp; + u32_t addr; - /* First try for an ethernet MAC address */ - p = get_first_ethernet(); - if (p != 0 && get_if_hwaddr(ep->value, p) >= 0) { - ep->class = EPD_MAC; - ep->length = 6; - return 1; - } + /* First try for an ethernet MAC address */ + p = get_first_ethernet(); + if (p != 0 && get_if_hwaddr(ep->value, p) >= 0) { + ep->class = EPD_MAC; + ep->length = 6; + return 1; + } - /* see if our hostname corresponds to a reasonable IP address */ - hp = gethostbyname(hostname); - if (hp != NULL) { - addr = *(u32_t *)hp->h_addr; - if (!bad_ip_adrs(addr)) { - addr = lwip_ntohl(addr); - if (!LOCAL_IP_ADDR(addr)) { - ep->class = EPD_IP; - set_ip_epdisc(ep, addr); - return 1; - } - } - } + /* see if our hostname corresponds to a reasonable IP address */ + hp = gethostbyname(hostname); + if (hp != NULL) { + addr = *(u32_t *)hp->h_addr; + if (!bad_ip_adrs(addr)) { + addr = lwip_ntohl(addr); + if (!LOCAL_IP_ADDR(addr)) { + ep->class = EPD_IP; + set_ip_epdisc(ep, addr); + return 1; + } + } + } - return 0; + return 0; } /* @@ -493,51 +493,51 @@ char * epdisc_to_str(ep) struct epdisc *ep; { - static char str[MAX_ENDP_LEN*3+8]; - u_char *p = ep->value; - int i, mask = 0; - char *q, c, c2; + static char str[MAX_ENDP_LEN*3+8]; + u_char *p = ep->value; + int i, mask = 0; + char *q, c, c2; - if (ep->class == EPD_NULL && ep->length == 0) - return "null"; - if (ep->class == EPD_IP && ep->length == 4) { - u32_t addr; + if (ep->class == EPD_NULL && ep->length == 0) + return "null"; + if (ep->class == EPD_IP && ep->length == 4) { + u32_t addr; - GETLONG(addr, p); - slprintf(str, sizeof(str), "IP:%I", lwip_htonl(addr)); - return str; - } + GETLONG(addr, p); + slprintf(str, sizeof(str), "IP:%I", lwip_htonl(addr)); + return str; + } - c = ':'; - c2 = '.'; - if (ep->class == EPD_MAC && ep->length == 6) - c2 = ':'; - else if (ep->class == EPD_MAGIC && (ep->length % 4) == 0) - mask = 3; - q = str; - if (ep->class <= EPD_PHONENUM) - q += slprintf(q, sizeof(str)-1, "%s", - endp_class_names[ep->class]); - else - q += slprintf(q, sizeof(str)-1, "%d", ep->class); - c = ':'; - for (i = 0; i < ep->length && i < MAX_ENDP_LEN; ++i) { - if ((i & mask) == 0) { - *q++ = c; - c = c2; - } - q += slprintf(q, str + sizeof(str) - q, "%.2x", ep->value[i]); - } - return str; + c = ':'; + c2 = '.'; + if (ep->class == EPD_MAC && ep->length == 6) + c2 = ':'; + else if (ep->class == EPD_MAGIC && (ep->length % 4) == 0) + mask = 3; + q = str; + if (ep->class <= EPD_PHONENUM) + q += slprintf(q, sizeof(str)-1, "%s", + endp_class_names[ep->class]); + else + q += slprintf(q, sizeof(str)-1, "%d", ep->class); + c = ':'; + for (i = 0; i < ep->length && i < MAX_ENDP_LEN; ++i) { + if ((i & mask) == 0) { + *q++ = c; + c = c2; + } + q += slprintf(q, str + sizeof(str) - q, "%.2x", ep->value[i]); + } + return str; } static int hexc_val(int c) { - if (c >= 'a') - return c - 'a' + 10; - if (c >= 'A') - return c - 'A' + 10; - return c - '0'; + if (c >= 'a') + return c - 'a' + 10; + if (c >= 'A') + return c - 'A' + 10; + return c - '0'; } int @@ -545,65 +545,65 @@ str_to_epdisc(ep, str) struct epdisc *ep; char *str; { - int i, l; - char *p, *endp; + int i, l; + char *p, *endp; - for (i = EPD_NULL; i <= EPD_PHONENUM; ++i) { - int sl = strlen(endp_class_names[i]); - if (strncasecmp(str, endp_class_names[i], sl) == 0) { - str += sl; - break; - } - } - if (i > EPD_PHONENUM) { - /* not a class name, try a decimal class number */ - i = strtol(str, &endp, 10); - if (endp == str) - return 0; /* can't parse class number */ - str = endp; - } - ep->class = i; - if (*str == 0) { - ep->length = 0; - return 1; - } - if (*str != ':' && *str != '.') - return 0; - ++str; + for (i = EPD_NULL; i <= EPD_PHONENUM; ++i) { + int sl = strlen(endp_class_names[i]); + if (strncasecmp(str, endp_class_names[i], sl) == 0) { + str += sl; + break; + } + } + if (i > EPD_PHONENUM) { + /* not a class name, try a decimal class number */ + i = strtol(str, &endp, 10); + if (endp == str) + return 0; /* can't parse class number */ + str = endp; + } + ep->class = i; + if (*str == 0) { + ep->length = 0; + return 1; + } + if (*str != ':' && *str != '.') + return 0; + ++str; - if (i == EPD_IP) { - u32_t addr; - i = parse_dotted_ip(str, &addr); - if (i == 0 || str[i] != 0) - return 0; - set_ip_epdisc(ep, addr); - return 1; - } - if (i == EPD_MAC && get_if_hwaddr(ep->value, str) >= 0) { - ep->length = 6; - return 1; - } + if (i == EPD_IP) { + u32_t addr; + i = parse_dotted_ip(str, &addr); + if (i == 0 || str[i] != 0) + return 0; + set_ip_epdisc(ep, addr); + return 1; + } + if (i == EPD_MAC && get_if_hwaddr(ep->value, str) >= 0) { + ep->length = 6; + return 1; + } - p = str; - for (l = 0; l < MAX_ENDP_LEN; ++l) { - if (*str == 0) - break; - if (p <= str) - for (p = str; isxdigit(*p); ++p) - ; - i = p - str; - if (i == 0) - return 0; - ep->value[l] = hexc_val(*str++); - if ((i & 1) == 0) - ep->value[l] = (ep->value[l] << 4) + hexc_val(*str++); - if (*str == ':' || *str == '.') - ++str; - } - if (*str != 0 || (ep->class == EPD_MAC && l != 6)) - return 0; - ep->length = l; - return 1; + p = str; + for (l = 0; l < MAX_ENDP_LEN; ++l) { + if (*str == 0) + break; + if (p <= str) + for (p = str; isxdigit(*p); ++p) + ; + i = p - str; + if (i == 0) + return 0; + ep->value[l] = hexc_val(*str++); + if ((i & 1) == 0) + ep->value[l] = (ep->value[l] << 4) + hexc_val(*str++); + if (*str == ':' || *str == '.') + ++str; + } + if (*str != 0 || (ep->class == EPD_MAC && l != 6)) + return 0; + ep->length = l; + return 1; } #endif /* PPP_SUPPORT && HAVE_MULTILINK */ diff --git a/Libraries/LwIP/src/netif/ppp/ppp.c b/Libraries/LwIP/src/netif/ppp/ppp.c index e3e4298..98d7b9e 100755 --- a/Libraries/LwIP/src/netif/ppp/ppp.c +++ b/Libraries/LwIP/src/netif/ppp/ppp.c @@ -80,8 +80,8 @@ */ /** - * @defgroup ppp PPP netif - * @ingroup addons + * @defgroup ppp PPP + * @ingroup netifs * @verbinclude "ppp.txt" */ @@ -203,9 +203,9 @@ const struct protent* const protocols[] = { /* Prototypes for procedures local to this file. */ static void ppp_do_connect(void *arg); static err_t ppp_netif_init_cb(struct netif *netif); -#if LWIP_IPV4 +#if PPP_IPV4_SUPPORT static err_t ppp_netif_output_ip4(struct netif *netif, struct pbuf *pb, const ip4_addr_t *ipaddr); -#endif /* LWIP_IPV4 */ +#endif /* PPP_IPV4_SUPPORT */ #if PPP_IPV6_SUPPORT static err_t ppp_netif_output_ip6(struct netif *netif, struct pbuf *pb, const ip6_addr_t *ipaddr); #endif /* PPP_IPV6_SUPPORT */ @@ -216,6 +216,7 @@ static err_t ppp_netif_output(struct netif *netif, struct pbuf *pb, u16_t protoc /***********************************/ #if PPP_AUTH_SUPPORT void ppp_set_auth(ppp_pcb *pcb, u8_t authtype, const char *user, const char *passwd) { + LWIP_ASSERT_CORE_LOCKED(); #if PAP_SUPPORT pcb->settings.refuse_pap = !(authtype & PPPAUTHTYPE_PAP); #endif /* PAP_SUPPORT */ @@ -268,12 +269,15 @@ void ppp_set_notify_phase_callback(ppp_pcb *pcb, ppp_notify_phase_cb_fn notify_p * established before calling this. */ err_t ppp_connect(ppp_pcb *pcb, u16_t holdoff) { + LWIP_ASSERT_CORE_LOCKED(); if (pcb->phase != PPP_PHASE_DEAD) { return ERR_ALREADY; } PPPDEBUG(LOG_DEBUG, ("ppp_connect[%d]: holdoff=%d\n", pcb->netif->num, holdoff)); + magic_randomize(); + if (holdoff == 0) { ppp_do_connect(pcb); return ERR_OK; @@ -294,12 +298,15 @@ err_t ppp_connect(ppp_pcb *pcb, u16_t holdoff) { * established before calling this. */ err_t ppp_listen(ppp_pcb *pcb) { + LWIP_ASSERT_CORE_LOCKED(); if (pcb->phase != PPP_PHASE_DEAD) { return ERR_ALREADY; } PPPDEBUG(LOG_DEBUG, ("ppp_listen[%d]\n", pcb->netif->num)); + magic_randomize(); + if (pcb->link_cb->listen) { new_phase(pcb, PPP_PHASE_INITIALIZE); pcb->link_cb->listen(pcb, pcb->link_ctx_cb); @@ -323,6 +330,8 @@ err_t ppp_listen(ppp_pcb *pcb) { err_t ppp_close(ppp_pcb *pcb, u8_t nocarrier) { + LWIP_ASSERT_CORE_LOCKED(); + pcb->err_code = PPPERR_USER; /* holdoff phase, cancel the reconnection */ @@ -383,6 +392,7 @@ ppp_close(ppp_pcb *pcb, u8_t nocarrier) */ err_t ppp_free(ppp_pcb *pcb) { err_t err; + LWIP_ASSERT_CORE_LOCKED(); if (pcb->phase != PPP_PHASE_DEAD) { return ERR_CONN; } @@ -402,6 +412,7 @@ err_t ppp_free(ppp_pcb *pcb) { err_t ppp_ioctl(ppp_pcb *pcb, u8_t cmd, void *arg) { + LWIP_ASSERT_CORE_LOCKED(); if (pcb == NULL) { return ERR_VAL; } @@ -456,10 +467,9 @@ static void ppp_do_connect(void *arg) { static err_t ppp_netif_init_cb(struct netif *netif) { netif->name[0] = 'p'; netif->name[1] = 'p'; -#if LWIP_IPV4 - /* FIXME: change that when netif_null_output_ip4() will materialize */ +#if PPP_IPV4_SUPPORT netif->output = ppp_netif_output_ip4; -#endif /* LWIP_IPV4 */ +#endif /* PPP_IPV4_SUPPORT */ #if PPP_IPV6_SUPPORT netif->output_ip6 = ppp_netif_output_ip6; #endif /* PPP_IPV6_SUPPORT */ @@ -471,21 +481,15 @@ static err_t ppp_netif_init_cb(struct netif *netif) { return ERR_OK; } -#if LWIP_IPV4 +#if PPP_IPV4_SUPPORT /* * Send an IPv4 packet on the given connection. */ static err_t ppp_netif_output_ip4(struct netif *netif, struct pbuf *pb, const ip4_addr_t *ipaddr) { LWIP_UNUSED_ARG(ipaddr); -#if PPP_IPV4_SUPPORT return ppp_netif_output(netif, pb, PPP_IP); -#else /* PPP_IPV4_SUPPORT */ - LWIP_UNUSED_ARG(netif); - LWIP_UNUSED_ARG(pb); - return ERR_IF; -#endif /* PPP_IPV4_SUPPORT */ } -#endif /* LWIP_IPV4 */ +#endif /* PPP_IPV4_SUPPORT */ #if PPP_IPV6_SUPPORT /* @@ -784,7 +788,7 @@ void ppp_input(ppp_pcb *pcb, struct pbuf *pb) { ppp_dump_packet(pcb, "rcvd", (unsigned char *)pb->payload, pb->len); #endif /* PRINTPKT_SUPPORT */ - pbuf_header(pb, -(s16_t)sizeof(protocol)); + pbuf_remove_header(pb, sizeof(protocol)); LINK_STATS_INC(link.recv); MIB2_STATS_NETIF_INC(pcb->netif, ifinucastpkts); @@ -860,10 +864,10 @@ void ppp_input(ppp_pcb *pcb, struct pbuf *pb) { pl = (u8_t*)pb->payload; if (pl[0] & 0x01) { protocol = pl[0]; - pbuf_header(pb, -(s16_t)1); + pbuf_remove_header(pb, 1); } else { protocol = (pl[0] << 8) | pl[1]; - pbuf_header(pb, -(s16_t)2); + pbuf_remove_header(pb, 2); } } #endif /* CCP_SUPPORT */ @@ -923,7 +927,7 @@ void ppp_input(ppp_pcb *pcb, struct pbuf *pb) { */ for (i = 0; (protp = protocols[i]) != NULL; ++i) { if (protp->protocol == protocol) { - pb = ppp_singlebuf(pb); + pb = pbuf_coalesce(pb, PBUF_RAW); (*protp->input)(pcb, (u8_t*)pb->payload, pb->len); goto out; } @@ -957,7 +961,10 @@ void ppp_input(ppp_pcb *pcb, struct pbuf *pb) { #endif /* PPP_PROTOCOLNAME */ ppp_warn("Unsupported protocol 0x%x received", protocol); #endif /* PPP_DEBUG */ - pbuf_header(pb, (s16_t)sizeof(protocol)); + if (pbuf_add_header(pb, sizeof(protocol))) { + PPPDEBUG(LOG_WARNING, ("ppp_input[%d]: Dropping (pbuf_add_header failed)\n", pcb->netif->num)); + goto drop; + } lcp_sprotrej(pcb, (u8_t*)pb->payload, pb->len); } break; @@ -971,32 +978,6 @@ out: pbuf_free(pb); } -/* merge a pbuf chain into one pbuf */ -struct pbuf *ppp_singlebuf(struct pbuf *p) { - struct pbuf *q, *b; - u8_t *pl; - - if(p->tot_len == p->len) { - return p; - } - - q = pbuf_alloc(PBUF_RAW, p->tot_len, PBUF_RAM); - if(!q) { - PPPDEBUG(LOG_ERR, - ("ppp_singlebuf: unable to alloc new buf (%d)\n", p->tot_len)); - return p; /* live dangerously */ - } - - for(b = p, pl = (u8_t*)q->payload; b != NULL; b = b->next) { - MEMCPY(pl, b->payload, b->len); - pl += b->len; - } - - pbuf_free(p); - - return q; -} - /* * Write a pbuf to a ppp link, only used from PPP functions * to send PPP packets. @@ -1127,9 +1108,9 @@ int sdns(ppp_pcb *pcb, u32_t ns1, u32_t ns2) { ip_addr_t ns; LWIP_UNUSED_ARG(pcb); - ip_addr_set_ip4_u32(&ns, ns1); + ip_addr_set_ip4_u32_val(ns, ns1); dns_setserver(0, &ns); - ip_addr_set_ip4_u32(&ns, ns2); + ip_addr_set_ip4_u32_val(ns, ns2); dns_setserver(1, &ns); return 1; } @@ -1144,12 +1125,12 @@ int cdns(ppp_pcb *pcb, u32_t ns1, u32_t ns2) { LWIP_UNUSED_ARG(pcb); nsa = dns_getserver(0); - ip_addr_set_ip4_u32(&nsb, ns1); + ip_addr_set_ip4_u32_val(nsb, ns1); if (ip_addr_cmp(nsa, &nsb)) { dns_setserver(0, IP_ADDR_ANY); } nsa = dns_getserver(1); - ip_addr_set_ip4_u32(&nsb, ns2); + ip_addr_set_ip4_u32_val(nsb, ns2); if (ip_addr_cmp(nsa, &nsb)) { dns_setserver(1, IP_ADDR_ANY); } @@ -1274,8 +1255,8 @@ int cif6addr(ppp_pcb *pcb, eui64_t our_eui64, eui64_t his_eui64) { LWIP_UNUSED_ARG(our_eui64); LWIP_UNUSED_ARG(his_eui64); - netif_ip6_addr_set(pcb->netif, 0, IP6_ADDR_ANY6); netif_ip6_addr_set_state(pcb->netif, 0, IP6_ADDR_INVALID); + netif_ip6_addr_set(pcb->netif, 0, IP6_ADDR_ANY6); return 1; } diff --git a/Libraries/LwIP/src/netif/ppp/pppcrypt.c b/Libraries/LwIP/src/netif/ppp/pppcrypt.c index 943cf09..f2f36aa 100755 --- a/Libraries/LwIP/src/netif/ppp/pppcrypt.c +++ b/Libraries/LwIP/src/netif/ppp/pppcrypt.c @@ -39,28 +39,28 @@ static u_char pppcrypt_get_7bits(u_char *input, int startBit) { - unsigned int word; + unsigned int word; - word = (unsigned)input[startBit / 8] << 8; - word |= (unsigned)input[startBit / 8 + 1]; + word = (unsigned)input[startBit / 8] << 8; + word |= (unsigned)input[startBit / 8 + 1]; - word >>= 15 - (startBit % 8 + 7); + word >>= 15 - (startBit % 8 + 7); - return word & 0xFE; + return word & 0xFE; } /* IN 56 bit DES key missing parity bits * OUT 64 bit DES key with parity bits added */ void pppcrypt_56_to_64_bit_key(u_char *key, u_char * des_key) { - des_key[0] = pppcrypt_get_7bits(key, 0); - des_key[1] = pppcrypt_get_7bits(key, 7); - des_key[2] = pppcrypt_get_7bits(key, 14); - des_key[3] = pppcrypt_get_7bits(key, 21); - des_key[4] = pppcrypt_get_7bits(key, 28); - des_key[5] = pppcrypt_get_7bits(key, 35); - des_key[6] = pppcrypt_get_7bits(key, 42); - des_key[7] = pppcrypt_get_7bits(key, 49); + des_key[0] = pppcrypt_get_7bits(key, 0); + des_key[1] = pppcrypt_get_7bits(key, 7); + des_key[2] = pppcrypt_get_7bits(key, 14); + des_key[3] = pppcrypt_get_7bits(key, 21); + des_key[4] = pppcrypt_get_7bits(key, 28); + des_key[5] = pppcrypt_get_7bits(key, 35); + des_key[6] = pppcrypt_get_7bits(key, 42); + des_key[7] = pppcrypt_get_7bits(key, 49); } #endif /* PPP_SUPPORT && MSCHAP_SUPPORT */ diff --git a/Libraries/LwIP/src/netif/ppp/pppoe.c b/Libraries/LwIP/src/netif/ppp/pppoe.c index 72494e4..33b9627 100755 --- a/Libraries/LwIP/src/netif/ppp/pppoe.c +++ b/Libraries/LwIP/src/netif/ppp/pppoe.c @@ -177,6 +177,7 @@ ppp_pcb *pppoe_create(struct netif *pppif, struct pppoe_softc *sc; LWIP_UNUSED_ARG(service_name); LWIP_UNUSED_ARG(concentrator_name); + LWIP_ASSERT_CORE_LOCKED(); sc = (struct pppoe_softc *)LWIP_MEMPOOL_ALLOC(PPPOE_IF); if (sc == NULL) { @@ -210,7 +211,7 @@ static err_t pppoe_write(ppp_pcb *ppp, void *ctx, struct pbuf *p) { #endif /* MIB2_STATS */ /* skip address & flags */ - pbuf_header(p, -(s16_t)2); + pbuf_remove_header(p, 2); ph = pbuf_alloc(PBUF_LINK, (u16_t)(PPPOE_HEADERLEN), PBUF_RAM); if(!ph) { @@ -221,7 +222,7 @@ static err_t pppoe_write(ppp_pcb *ppp, void *ctx, struct pbuf *p) { return ERR_MEM; } - pbuf_header(ph, -(s16_t)PPPOE_HEADERLEN); /* hide PPPoE header */ + pbuf_remove_header(ph, PPPOE_HEADERLEN); /* hide PPPoE header */ pbuf_cat(ph, p); #if MIB2_STATS tot_len = ph->tot_len; @@ -261,7 +262,7 @@ static err_t pppoe_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *p, u_short return ERR_MEM; } - pbuf_header(pb, -(s16_t)PPPOE_HEADERLEN); + pbuf_remove_header(pb, PPPOE_HEADERLEN); pl = (u8_t*)pb->payload; PUTSHORT(protocol, pl); @@ -371,7 +372,7 @@ static struct pppoe_softc* pppoe_find_softc_by_hunique(u8_t *token, size_t len, void pppoe_disc_input(struct netif *netif, struct pbuf *pb) { - u16_t tag, len; + u16_t tag, len, off; u16_t session, plen; struct pppoe_softc *sc; #if PPP_DEBUG @@ -385,10 +386,7 @@ pppoe_disc_input(struct netif *netif, struct pbuf *pb) #endif struct pppoehdr *ph; struct pppoetag pt; - int off; -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) int err; -#endif struct eth_hdr *ethhdr; /* don't do anything if there is not a single PPPoE instance */ @@ -397,13 +395,9 @@ pppoe_disc_input(struct netif *netif, struct pbuf *pb) return; } - pb = ppp_singlebuf(pb); + pb = pbuf_coalesce(pb, PBUF_RAW); - if (pb->len < sizeof(*ethhdr)) { - goto done; - } ethhdr = (struct eth_hdr *)pb->payload; - off = sizeof(*ethhdr); ac_cookie = NULL; ac_cookie_len = 0; @@ -412,7 +406,8 @@ pppoe_disc_input(struct netif *netif, struct pbuf *pb) hunique_len = 0; #endif session = 0; - if (pb->len - off < (u16_t)PPPOE_HEADERLEN) { + off = sizeof(struct eth_hdr) + sizeof(struct pppoehdr); + if (pb->len < off) { PPPDEBUG(LOG_DEBUG, ("pppoe: packet too short: %d\n", pb->len)); goto done; } @@ -424,15 +419,18 @@ pppoe_disc_input(struct netif *netif, struct pbuf *pb) } session = lwip_ntohs(ph->session); plen = lwip_ntohs(ph->plen); - off += sizeof(*ph); - if (plen + off > pb->len) { + if (plen > (pb->len - off)) { PPPDEBUG(LOG_DEBUG, ("pppoe: packet content does not fit: data available = %d, packet size = %u\n", pb->len - off, plen)); goto done; } if(pb->tot_len == pb->len) { - pb->tot_len = pb->len = (u16_t)off + plen; /* ignore trailing garbage */ + u16_t framelen = off + plen; + if (framelen < pb->len) { + /* ignore trailing garbage */ + pb->tot_len = pb->len = framelen; + } } tag = 0; len = 0; @@ -605,14 +603,10 @@ breakbreak:; sys_untimeout(pppoe_timeout, sc); sc->sc_padr_retried = 0; sc->sc_state = PPPOE_STATE_PADR_SENT; -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) - if ((err = pppoe_send_padr(sc)) != 0) - { + if ((err = pppoe_send_padr(sc)) != 0) { PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F": failed to send PADR, error=%d\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, err)); + LWIP_UNUSED_ARG(err); /* if PPPDEBUG is disabled */ } -#else - pppoe_send_padr(sc); -#endif /*defined(LWIP_DEBUG) && (DEBUG_LOG == LWIP_DEBUG_ON) */ sys_timeout(PPPOE_DISC_TIMEOUT * (1 + sc->sc_padr_retried), pppoe_timeout, sc); break; case PPPOE_CODE_PADS: @@ -667,9 +661,9 @@ pppoe_data_input(struct netif *netif, struct pbuf *pb) #ifdef PPPOE_TERM_UNKNOWN_SESSIONS MEMCPY(shost, ((struct eth_hdr *)pb->payload)->src.addr, sizeof(shost)); #endif - if (pbuf_header(pb, -(s16_t)sizeof(struct eth_hdr)) != 0) { + if (pbuf_remove_header(pb, sizeof(struct eth_hdr)) != 0) { /* bail out */ - PPPDEBUG(LOG_ERR, ("pppoe_data_input: pbuf_header failed\n")); + PPPDEBUG(LOG_ERR, ("pppoe_data_input: pbuf_remove_header failed\n")); LINK_STATS_INC(link.lenerr); goto drop; } @@ -700,9 +694,9 @@ pppoe_data_input(struct netif *netif, struct pbuf *pb) plen = lwip_ntohs(ph->plen); - if (pbuf_header(pb, -(s16_t)(PPPOE_HEADERLEN)) != 0) { + if (pbuf_remove_header(pb, PPPOE_HEADERLEN) != 0) { /* bail out */ - PPPDEBUG(LOG_ERR, ("pppoe_data_input: pbuf_header PPPOE_HEADERLEN failed\n")); + PPPDEBUG(LOG_ERR, ("pppoe_data_input: pbuf_remove_header PPPOE_HEADERLEN failed\n")); LINK_STATS_INC(link.lenerr); goto drop; } @@ -731,7 +725,7 @@ pppoe_output(struct pppoe_softc *sc, struct pbuf *pb) err_t res; /* make room for Ethernet header - should not fail */ - if (pbuf_header(pb, (s16_t)(sizeof(struct eth_hdr))) != 0) { + if (pbuf_add_header(pb, sizeof(struct eth_hdr)) != 0) { /* bail out */ PPPDEBUG(LOG_ERR, ("pppoe: %c%c%"U16_F": pppoe_output: could not allocate room for Ethernet header\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num)); LINK_STATS_INC(link.lenerr); @@ -823,9 +817,7 @@ static void pppoe_timeout(void *arg) { u32_t retry_wait; -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) int err; -#endif struct pppoe_softc *sc = (struct pppoe_softc*)arg; PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F": timeout\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num)); @@ -858,14 +850,11 @@ pppoe_timeout(void *arg) } /* initialize for quick retry mode */ retry_wait = LWIP_MIN(PPPOE_DISC_TIMEOUT * sc->sc_padi_retried, PPPOE_SLOW_RETRY); -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) if ((err = pppoe_send_padi(sc)) != 0) { sc->sc_padi_retried--; PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F": failed to transmit PADI, error=%d\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, err)); + LWIP_UNUSED_ARG(err); /* if PPPDEBUG is disabled */ } -#else - pppoe_send_padi(sc); -#endif sys_timeout(retry_wait, pppoe_timeout, sc); break; @@ -875,26 +864,18 @@ pppoe_timeout(void *arg) MEMCPY(&sc->sc_dest, ethbroadcast.addr, sizeof(sc->sc_dest)); sc->sc_state = PPPOE_STATE_PADI_SENT; sc->sc_padr_retried = 0; -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) if ((err = pppoe_send_padi(sc)) != 0) { PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F": failed to send PADI, error=%d\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, err)); + LWIP_UNUSED_ARG(err); /* if PPPDEBUG is disabled */ } -#else - pppoe_send_padi(sc); -#endif sys_timeout(PPPOE_DISC_TIMEOUT * (1 + sc->sc_padi_retried), pppoe_timeout, sc); return; } -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) if ((err = pppoe_send_padr(sc)) != 0) { sc->sc_padr_retried--; PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F": failed to send PADR, error=%d\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, err)); + LWIP_UNUSED_ARG(err); /* if PPPDEBUG is disabled */ } -#else - if (pppoe_send_padr(sc) != 0) { - sc->sc_padr_retried--; - } -#endif sys_timeout(PPPOE_DISC_TIMEOUT * (1 + sc->sc_padr_retried), pppoe_timeout, sc); break; default: @@ -906,9 +887,7 @@ pppoe_timeout(void *arg) static void pppoe_connect(ppp_pcb *ppp, void *ctx) { -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) err_t err; -#endif struct pppoe_softc *sc = (struct pppoe_softc *)ctx; lcp_options *lcp_wo; lcp_options *lcp_ao; @@ -956,13 +935,9 @@ pppoe_connect(ppp_pcb *ppp, void *ctx) /* save state, in case we fail to send PADI */ sc->sc_state = PPPOE_STATE_PADI_SENT; -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) if ((err = pppoe_send_padi(sc)) != 0) { PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F": failed to send PADI, error=%d\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, err)); - } -#else - pppoe_send_padi(sc); -#endif + } sys_timeout(PPPOE_DISC_TIMEOUT, pppoe_timeout, sc); } @@ -1069,7 +1044,12 @@ pppoe_send_padt(struct netif *outgoing_if, u_int session, const u8_t *dest) } LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len); - pbuf_header(pb, (s16_t)sizeof(struct eth_hdr)); + if (pbuf_add_header(pb, sizeof(struct eth_hdr))) { + PPPDEBUG(LOG_ERR, ("pppoe: pppoe_send_padt: could not allocate room for PPPoE header\n")); + LINK_STATS_INC(link.lenerr); + pbuf_free(pb); + return ERR_BUF; + } ethhdr = (struct eth_hdr *)pb->payload; ethhdr->type = PP_HTONS(ETHTYPE_PPPOEDISC); MEMCPY(ðhdr->dest.addr, dest, sizeof(ethhdr->dest.addr)); @@ -1163,7 +1143,7 @@ pppoe_xmit(struct pppoe_softc *sc, struct pbuf *pb) len = pb->tot_len; /* make room for PPPoE header - should not fail */ - if (pbuf_header(pb, (s16_t)(PPPOE_HEADERLEN)) != 0) { + if (pbuf_add_header(pb, PPPOE_HEADERLEN) != 0) { /* bail out */ PPPDEBUG(LOG_ERR, ("pppoe: %c%c%"U16_F": pppoe_xmit: could not allocate room for PPPoE header\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num)); LINK_STATS_INC(link.lenerr); diff --git a/Libraries/LwIP/src/netif/ppp/pppol2tp.c b/Libraries/LwIP/src/netif/ppp/pppol2tp.c index 6326ada..af366d4 100755 --- a/Libraries/LwIP/src/netif/ppp/pppol2tp.c +++ b/Libraries/LwIP/src/netif/ppp/pppol2tp.c @@ -85,7 +85,7 @@ static err_t pppol2tp_send_sccrq(pppol2tp_pcb *l2tp); static err_t pppol2tp_send_scccn(pppol2tp_pcb *l2tp, u16_t ns); static err_t pppol2tp_send_icrq(pppol2tp_pcb *l2tp, u16_t ns); static err_t pppol2tp_send_iccn(pppol2tp_pcb *l2tp, u16_t ns); -static err_t pppol2tp_send_zlb(pppol2tp_pcb *l2tp, u16_t ns); +static err_t pppol2tp_send_zlb(pppol2tp_pcb *l2tp, u16_t ns, u16_t nr); static err_t pppol2tp_send_stopccn(pppol2tp_pcb *l2tp, u16_t ns); static err_t pppol2tp_xmit(pppol2tp_pcb *l2tp, struct pbuf *pb); static err_t pppol2tp_udp_send(pppol2tp_pcb *l2tp, struct pbuf *pb); @@ -181,7 +181,7 @@ static err_t pppol2tp_write(ppp_pcb *ppp, void *ctx, struct pbuf *p) { return ERR_MEM; } - pbuf_header(ph, -(s16_t)PPPOL2TP_OUTPUT_DATA_HEADER_LEN); /* hide L2TP header */ + pbuf_remove_header(ph, PPPOL2TP_OUTPUT_DATA_HEADER_LEN); /* hide L2TP header */ pbuf_cat(ph, p); #if MIB2_STATS tot_len = ph->tot_len; @@ -221,7 +221,7 @@ static err_t pppol2tp_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *p, u_sh return ERR_MEM; } - pbuf_header(pb, -(s16_t)PPPOL2TP_OUTPUT_DATA_HEADER_LEN); + pbuf_remove_header(pb, PPPOL2TP_OUTPUT_DATA_HEADER_LEN); pl = (u8_t*)pb->payload; PUTSHORT(protocol, pl); @@ -256,9 +256,7 @@ static err_t pppol2tp_destroy(ppp_pcb *ppp, void *ctx) { /* Be a LAC, connect to a LNS. */ static void pppol2tp_connect(ppp_pcb *ppp, void *ctx) { -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) err_t err; -#endif pppol2tp_pcb *l2tp = (pppol2tp_pcb *)ctx; lcp_options *lcp_wo; lcp_options *lcp_ao; @@ -324,13 +322,9 @@ static void pppol2tp_connect(ppp_pcb *ppp, void *ctx) { /* save state, in case we fail to send SCCRQ */ l2tp->sccrq_retried = 0; l2tp->phase = PPPOL2TP_STATE_SCCRQ_SENT; -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) if ((err = pppol2tp_send_sccrq(l2tp)) != 0) { PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send SCCRQ, error=%d\n", err)); } -#else - pppol2tp_send_sccrq(l2tp); -#endif sys_timeout(PPPOL2TP_CONTROL_TIMEOUT, pppol2tp_timeout, l2tp); } @@ -440,7 +434,7 @@ static void pppol2tp_input(void *arg, struct udp_pcb *pcb, struct pbuf *p, const /* printf("HLEN = %d\n", hlen); */ /* skip L2TP header */ - if (pbuf_header(p, -(s16_t)hlen) != 0) { + if (pbuf_remove_header(p, hlen) != 0) { goto free_and_return; } @@ -475,7 +469,7 @@ static void pppol2tp_input(void *arg, struct udp_pcb *pcb, struct pbuf *p, const if (p->len >= 2) { GETSHORT(hflags, inp); if (hflags == 0xff03) { - pbuf_header(p, -(s16_t)2); + pbuf_remove_header(p, 2); } } /* Dispatch the packet thereby consuming it. */ @@ -492,30 +486,50 @@ free_and_return: static void pppol2tp_dispatch_control_packet(pppol2tp_pcb *l2tp, u16_t port, struct pbuf *p, u16_t ns, u16_t nr) { u8_t *inp; u16_t avplen, avpflags, vendorid, attributetype, messagetype=0; -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) err_t err; -#endif #if PPPOL2TP_AUTH_SUPPORT lwip_md5_context md5_ctx; u8_t md5_hash[16]; u8_t challenge_id = 0; #endif /* PPPOL2TP_AUTH_SUPPORT */ - l2tp->peer_nr = nr; - l2tp->peer_ns = ns; /* printf("L2TP CTRL INPUT, ns=%d, nr=%d, len=%d\n", ns, nr, p->len); */ + /* Drop unexpected packet */ + if (ns != l2tp->peer_ns) { + PPPDEBUG(LOG_DEBUG, ("pppol2tp: drop unexpected packet: received NS=%d, expected NS=%d\n", ns, l2tp->peer_ns)); + /* + * In order to ensure that all messages are acknowledged properly + * (particularly in the case of a lost ZLB ACK message), receipt + * of duplicate messages MUST be acknowledged. + * + * In this very special case we Ack a packet we previously received. + * Therefore our NS is the NR we just received. And our NR is the + * NS we just received plus one. + */ + if ((s16_t)(ns - l2tp->peer_ns) < 0) { + pppol2tp_send_zlb(l2tp, nr, ns+1); + } + return; + } + + l2tp->peer_nr = nr; + /* Handle the special case of the ICCN acknowledge */ - if (l2tp->phase == PPPOL2TP_STATE_ICCN_SENT && l2tp->peer_nr > l2tp->our_ns) { + if (l2tp->phase == PPPOL2TP_STATE_ICCN_SENT && (s16_t)(l2tp->peer_nr - l2tp->our_ns) > 0) { l2tp->phase = PPPOL2TP_STATE_DATA; + sys_untimeout(pppol2tp_timeout, l2tp); + ppp_start(l2tp->ppp); /* notify upper layers */ } /* ZLB packets */ if (p->tot_len == 0) { return; } + /* A ZLB packet does not consume a NS slot thus we don't record the NS value for ZLB packets */ + l2tp->peer_ns = ns+1; - p = ppp_singlebuf(p); + p = pbuf_coalesce(p, PBUF_RAW); inp = (u8_t*)p->payload; /* Decode AVPs */ while (p->len > 0) { @@ -557,7 +571,7 @@ static void pppol2tp_dispatch_control_packet(pppol2tp_pcb *l2tp, u16_t port, str break; /* Stop Control Connection Notification */ case PPPOL2TP_MESSAGETYPE_STOPCCN: - pppol2tp_send_zlb(l2tp, l2tp->our_ns); /* Ack the StopCCN before we switch to down state */ + pppol2tp_send_zlb(l2tp, l2tp->our_ns+1, l2tp->peer_ns); /* Ack the StopCCN before we switch to down state */ if (l2tp->phase < PPPOL2TP_STATE_DATA) { pppol2tp_abort_connect(l2tp); } else if (l2tp->phase == PPPOL2TP_STATE_DATA) { @@ -662,7 +676,7 @@ skipavp: nextavp: /* printf("AVP Found, vendor=%d, attribute=%d, len=%d\n", vendorid, attributetype, avplen); */ /* next AVP */ - if (pbuf_header(p, -(s16_t)(avplen + sizeof(avpflags) + sizeof(vendorid) + sizeof(attributetype)) ) != 0) { + if (pbuf_remove_header(p, avplen + sizeof(avpflags) + sizeof(vendorid) + sizeof(attributetype)) != 0) { return; } } @@ -677,21 +691,15 @@ nextavp: l2tp->icrq_retried = 0; l2tp->phase = PPPOL2TP_STATE_ICRQ_SENT; l2tp->our_ns++; -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) if ((err = pppol2tp_send_scccn(l2tp, l2tp->our_ns)) != 0) { PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send SCCCN, error=%d\n", err)); + LWIP_UNUSED_ARG(err); /* if PPPDEBUG is disabled */ } -#else - pppol2tp_send_scccn(l2tp, l2tp->our_ns); -#endif l2tp->our_ns++; -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) if ((err = pppol2tp_send_icrq(l2tp, l2tp->our_ns)) != 0) { PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send ICRQ, error=%d\n", err)); + LWIP_UNUSED_ARG(err); /* if PPPDEBUG is disabled */ } -#else - pppol2tp_send_icrq(l2tp, l2tp->our_ns); -#endif sys_untimeout(pppol2tp_timeout, l2tp); sys_timeout(PPPOL2TP_CONTROL_TIMEOUT, pppol2tp_timeout, l2tp); break; @@ -700,14 +708,10 @@ nextavp: l2tp->iccn_retried = 0; l2tp->phase = PPPOL2TP_STATE_ICCN_SENT; l2tp->our_ns++; - ppp_start(l2tp->ppp); /* notify upper layers */ -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) if ((err = pppol2tp_send_iccn(l2tp, l2tp->our_ns)) != 0) { PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send ICCN, error=%d\n", err)); + LWIP_UNUSED_ARG(err); /* if PPPDEBUG is disabled */ } -#else - pppol2tp_send_iccn(l2tp, l2tp->our_ns); -#endif sys_untimeout(pppol2tp_timeout, l2tp); sys_timeout(PPPOL2TP_CONTROL_TIMEOUT, pppol2tp_timeout, l2tp); break; @@ -718,7 +722,7 @@ nextavp: return; send_zlb: - pppol2tp_send_zlb(l2tp, l2tp->our_ns); + pppol2tp_send_zlb(l2tp, l2tp->our_ns+1, l2tp->peer_ns); return; packet_too_short: PPPDEBUG(LOG_DEBUG, ("pppol2tp: packet too short: %d\n", p->len)); @@ -727,9 +731,7 @@ packet_too_short: /* L2TP Timeout handler */ static void pppol2tp_timeout(void *arg) { pppol2tp_pcb *l2tp = (pppol2tp_pcb*)arg; -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) err_t err; -#endif u32_t retry_wait; PPPDEBUG(LOG_DEBUG, ("pppol2tp: timeout\n")); @@ -746,16 +748,11 @@ static void pppol2tp_timeout(void *arg) { } retry_wait = LWIP_MIN(PPPOL2TP_CONTROL_TIMEOUT * l2tp->sccrq_retried, PPPOL2TP_SLOW_RETRY); PPPDEBUG(LOG_DEBUG, ("pppol2tp: sccrq_retried=%d\n", l2tp->sccrq_retried)); -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) if ((err = pppol2tp_send_sccrq(l2tp)) != 0) { l2tp->sccrq_retried--; PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send SCCRQ, error=%d\n", err)); + LWIP_UNUSED_ARG(err); /* if PPPDEBUG is disabled */ } -#else - if(pppol2tp_send_sccrq(l2tp) !=0) { - l2tp->sccrq_retried--; - } -#endif sys_timeout(retry_wait, pppol2tp_timeout, l2tp); break; @@ -766,32 +763,20 @@ static void pppol2tp_timeout(void *arg) { return; } PPPDEBUG(LOG_DEBUG, ("pppol2tp: icrq_retried=%d\n", l2tp->icrq_retried)); - if (l2tp->peer_nr <= l2tp->our_ns -1) { /* the SCCCN was not acknowledged */ -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) + if ((s16_t)(l2tp->peer_nr - l2tp->our_ns) < 0) { /* the SCCCN was not acknowledged */ if ((err = pppol2tp_send_scccn(l2tp, l2tp->our_ns -1)) != 0) { - l2tp->icrq_retried--; - PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send SCCCN, error=%d\n", err)); - sys_timeout(PPPOL2TP_CONTROL_TIMEOUT, pppol2tp_timeout, l2tp); - break; - } -#else - if (pppol2tp_send_scccn(l2tp, l2tp->our_ns -1) != 0) { - l2tp->icrq_retried--; - sys_timeout(PPPOL2TP_CONTROL_TIMEOUT, pppol2tp_timeout, l2tp); - break; - } -#endif + l2tp->icrq_retried--; + PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send SCCCN, error=%d\n", err)); + LWIP_UNUSED_ARG(err); /* if PPPDEBUG is disabled */ + sys_timeout(PPPOL2TP_CONTROL_TIMEOUT, pppol2tp_timeout, l2tp); + break; + } } -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) if ((err = pppol2tp_send_icrq(l2tp, l2tp->our_ns)) != 0) { - l2tp->icrq_retried--; - PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send ICRQ, error=%d\n", err)); + l2tp->icrq_retried--; + PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send ICRQ, error=%d\n", err)); + LWIP_UNUSED_ARG(err); /* if PPPDEBUG is disabled */ } -#else - if (pppol2tp_send_icrq(l2tp, l2tp->our_ns) != 0) { - l2tp->icrq_retried--; - } -#endif sys_timeout(PPPOL2TP_CONTROL_TIMEOUT, pppol2tp_timeout, l2tp); break; @@ -802,16 +787,11 @@ static void pppol2tp_timeout(void *arg) { return; } PPPDEBUG(LOG_DEBUG, ("pppol2tp: iccn_retried=%d\n", l2tp->iccn_retried)); -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) if ((err = pppol2tp_send_iccn(l2tp, l2tp->our_ns)) != 0) { - l2tp->iccn_retried--; - PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send ICCN, error=%d\n", err)); + l2tp->iccn_retried--; + PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send ICCN, error=%d\n", err)); + LWIP_UNUSED_ARG(err); /* if PPPDEBUG is disabled */ } -#else - if (pppol2tp_send_iccn(l2tp, l2tp->our_ns) != 0) { - l2tp->iccn_retried--; - } -#endif sys_timeout(PPPOL2TP_CONTROL_TIMEOUT, pppol2tp_timeout, l2tp); break; @@ -951,7 +931,7 @@ static err_t pppol2tp_send_scccn(pppol2tp_pcb *l2tp, u16_t ns) { PUTSHORT(l2tp->source_tunnel_id, p); /* Tunnel Id */ PUTSHORT(0, p); /* Session Id */ PUTSHORT(ns, p); /* NS Sequence number - to peer */ - PUTSHORT(l2tp->peer_ns+1, p); /* NR Sequence number - expected for peer */ + PUTSHORT(l2tp->peer_ns, p); /* NR Sequence number - expected for peer */ /* AVP - Message type */ PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 8, p); /* Mandatory flag + len field */ @@ -998,7 +978,7 @@ static err_t pppol2tp_send_icrq(pppol2tp_pcb *l2tp, u16_t ns) { PUTSHORT(l2tp->source_tunnel_id, p); /* Tunnel Id */ PUTSHORT(0, p); /* Session Id */ PUTSHORT(ns, p); /* NS Sequence number - to peer */ - PUTSHORT(l2tp->peer_ns+1, p); /* NR Sequence number - expected for peer */ + PUTSHORT(l2tp->peer_ns, p); /* NR Sequence number - expected for peer */ /* AVP - Message type */ PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 8, p); /* Mandatory flag + len field */ @@ -1046,7 +1026,7 @@ static err_t pppol2tp_send_iccn(pppol2tp_pcb *l2tp, u16_t ns) { PUTSHORT(l2tp->source_tunnel_id, p); /* Tunnel Id */ PUTSHORT(l2tp->source_session_id, p); /* Session Id */ PUTSHORT(ns, p); /* NS Sequence number - to peer */ - PUTSHORT(l2tp->peer_ns+1, p); /* NR Sequence number - expected for peer */ + PUTSHORT(l2tp->peer_ns, p); /* NR Sequence number - expected for peer */ /* AVP - Message type */ PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 8, p); /* Mandatory flag + len field */ @@ -1070,7 +1050,7 @@ static err_t pppol2tp_send_iccn(pppol2tp_pcb *l2tp, u16_t ns) { } /* Send a ZLB ACK packet */ -static err_t pppol2tp_send_zlb(pppol2tp_pcb *l2tp, u16_t ns) { +static err_t pppol2tp_send_zlb(pppol2tp_pcb *l2tp, u16_t ns, u16_t nr) { struct pbuf *pb; u8_t *p; u16_t len; @@ -1093,7 +1073,7 @@ static err_t pppol2tp_send_zlb(pppol2tp_pcb *l2tp, u16_t ns) { PUTSHORT(l2tp->source_tunnel_id, p); /* Tunnel Id */ PUTSHORT(0, p); /* Session Id */ PUTSHORT(ns, p); /* NS Sequence number - to peer */ - PUTSHORT(l2tp->peer_ns+1, p); /* NR Sequence number - expected for peer */ + PUTSHORT(nr, p); /* NR Sequence number - expected for peer */ return pppol2tp_udp_send(l2tp, pb); } @@ -1122,7 +1102,7 @@ static err_t pppol2tp_send_stopccn(pppol2tp_pcb *l2tp, u16_t ns) { PUTSHORT(l2tp->source_tunnel_id, p); /* Tunnel Id */ PUTSHORT(0, p); /* Session Id */ PUTSHORT(ns, p); /* NS Sequence number - to peer */ - PUTSHORT(l2tp->peer_ns+1, p); /* NR Sequence number - expected for peer */ + PUTSHORT(l2tp->peer_ns, p); /* NR Sequence number - expected for peer */ /* AVP - Message type */ PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 8, p); /* Mandatory flag + len field */ @@ -1149,7 +1129,7 @@ static err_t pppol2tp_xmit(pppol2tp_pcb *l2tp, struct pbuf *pb) { u8_t *p; /* make room for L2TP header - should not fail */ - if (pbuf_header(pb, (s16_t)PPPOL2TP_OUTPUT_DATA_HEADER_LEN) != 0) { + if (pbuf_add_header(pb, PPPOL2TP_OUTPUT_DATA_HEADER_LEN) != 0) { /* bail out */ PPPDEBUG(LOG_ERR, ("pppol2tp: pppol2tp_pcb: could not allocate room for L2TP header\n")); LINK_STATS_INC(link.lenerr); diff --git a/Libraries/LwIP/src/netif/ppp/pppos.c b/Libraries/LwIP/src/netif/ppp/pppos.c index 5a7edae..d10dd8e 100755 --- a/Libraries/LwIP/src/netif/ppp/pppos.c +++ b/Libraries/LwIP/src/netif/ppp/pppos.c @@ -176,6 +176,7 @@ ppp_pcb *pppos_create(struct netif *pppif, pppos_output_cb_fn output_cb, { pppos_pcb *pppos; ppp_pcb *ppp; + LWIP_ASSERT_CORE_LOCKED(); pppos = (pppos_pcb *)LWIP_MEMPOOL_ALLOC(PPPOS_PCB); if (pppos == NULL) { @@ -206,7 +207,9 @@ pppos_write(ppp_pcb *ppp, void *ctx, struct pbuf *p) err_t err; LWIP_UNUSED_ARG(ppp); - /* Grab an output buffer. */ + /* Grab an output buffer. Using PBUF_POOL here for tx is ok since the pbuf + gets freed by 'pppos_output_last' before this function returns and thus + cannot starve rx. */ nb = pbuf_alloc(PBUF_RAW, 0, PBUF_POOL); if (nb == NULL) { PPPDEBUG(LOG_WARNING, ("pppos_write[%d]: alloc fail\n", ppp->netif->num)); @@ -217,6 +220,9 @@ pppos_write(ppp_pcb *ppp, void *ctx, struct pbuf *p) return ERR_MEM; } + /* Set nb->tot_len to actual payload length */ + nb->tot_len = p->len; + /* If the link has been idle, we'll send a fresh flag character to * flush any noise. */ err = ERR_OK; @@ -252,7 +258,9 @@ pppos_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *pb, u16_t protocol) err_t err; LWIP_UNUSED_ARG(ppp); - /* Grab an output buffer. */ + /* Grab an output buffer. Using PBUF_POOL here for tx is ok since the pbuf + gets freed by 'pppos_output_last' before this function returns and thus + cannot starve rx. */ nb = pbuf_alloc(PBUF_RAW, 0, PBUF_POOL); if (nb == NULL) { PPPDEBUG(LOG_WARNING, ("pppos_netif_output[%d]: alloc fail\n", ppp->netif->num)); @@ -262,6 +270,9 @@ pppos_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *pb, u16_t protocol) return ERR_MEM; } + /* Set nb->tot_len to actual payload length */ + nb->tot_len = pb->tot_len; + /* If the link has been idle, we'll send a fresh flag character to * flush any noise. */ err = ERR_OK; @@ -401,6 +412,8 @@ pppos_destroy(ppp_pcb *ppp, void *ctx) #if !NO_SYS && !PPP_INPROC_IRQ_SAFE /** Pass received raw characters to PPPoS to be decoded through lwIP TCPIP thread. + * + * This is one of the only functions that may be called outside of the TCPIP thread! * * @param ppp PPP descriptor index, returned by pppos_create() * @param s received data @@ -429,6 +442,7 @@ pppos_input_tcpip(ppp_pcb *ppp, u8_t *s, int l) err_t pppos_input_sys(struct pbuf *p, struct netif *inp) { ppp_pcb *ppp = (ppp_pcb*)inp->state; struct pbuf *n; + LWIP_ASSERT_CORE_LOCKED(); for (n = p; n; n = n->next) { pppos_input(ppp, (u8_t*)n->payload, n->len); @@ -468,6 +482,9 @@ pppos_input(ppp_pcb *ppp, u8_t *s, int l) u8_t cur_char; u8_t escaped; PPPOS_DECL_PROTECT(lev); +#if !PPP_INPROC_IRQ_SAFE + LWIP_ASSERT_CORE_LOCKED(); +#endif PPPDEBUG(LOG_DEBUG, ("pppos_input[%d]: got %d bytes\n", ppp->netif->num, l)); while (l-- > 0) { @@ -541,10 +558,10 @@ pppos_input(ppp_pcb *ppp, u8_t *s, int l) pppos->in_tail = NULL; #if IP_FORWARD || LWIP_IPV6_FORWARD /* hide the room for Ethernet forwarding header */ - pbuf_header(inp, -(s16_t)(PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN)); + pbuf_remove_header(inp, PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN); #endif /* IP_FORWARD || LWIP_IPV6_FORWARD */ #if PPP_INPROC_IRQ_SAFE - if(tcpip_callback_with_block(pppos_input_callback, inp, 0) != ERR_OK) { + if(tcpip_try_callback(pppos_input_callback, inp) != ERR_OK) { PPPDEBUG(LOG_ERR, ("pppos_input[%d]: tcpip_callback() failed, dropping packet\n", ppp->netif->num)); pbuf_free(inp); LINK_STATS_INC(link.drop); @@ -599,6 +616,7 @@ pppos_input(ppp_pcb *ppp, u8_t *s, int l) /* Else assume compressed address and control fields so * fall through to get the protocol... */ + /* Fall through */ case PDCONTROL: /* Process control field. */ /* If we don't get a valid control code, restart. */ if (cur_char == PPP_UI) { @@ -614,7 +632,9 @@ pppos_input(ppp_pcb *ppp, u8_t *s, int l) pppos->in_state = PDSTART; } #endif - case PDPROTOCOL1: /* Process protocol field 1. */ + /* Fall through */ + + case PDPROTOCOL1: /* Process protocol field 1. */ /* If the lower bit is set, this is the end of the protocol * field. */ if (cur_char & 1) { @@ -698,8 +718,8 @@ static void pppos_input_callback(void *arg) { ppp_pcb *ppp; ppp = ((struct pppos_input_header*)pb->payload)->ppp; - if(pbuf_header(pb, -(s16_t)sizeof(struct pppos_input_header))) { - LWIP_ASSERT("pbuf_header failed\n", 0); + if(pbuf_remove_header(pb, sizeof(struct pppos_input_header))) { + LWIP_ASSERT("pbuf_remove_header failed\n", 0); goto drop; } diff --git a/Libraries/LwIP/src/netif/ppp/upap.c b/Libraries/LwIP/src/netif/ppp/upap.c index 6ee2148..709c2d6 100755 --- a/Libraries/LwIP/src/netif/ppp/upap.c +++ b/Libraries/LwIP/src/netif/ppp/upap.c @@ -159,19 +159,19 @@ void upap_authwithpeer(ppp_pcb *pcb, const char *user, const char *password) { /* Save the username and password we're given */ pcb->upap.us_user = user; - pcb->upap.us_userlen = LWIP_MIN(strlen(user), 0xff); + pcb->upap.us_userlen = (u8_t)LWIP_MIN(strlen(user), 0xff); pcb->upap.us_passwd = password; - pcb->upap.us_passwdlen = LWIP_MIN(strlen(password), 0xff); + pcb->upap.us_passwdlen = (u8_t)LWIP_MIN(strlen(password), 0xff); pcb->upap.us_transmits = 0; /* Lower layer up yet? */ if (pcb->upap.us_clientstate == UPAPCS_INITIAL || - pcb->upap.us_clientstate == UPAPCS_PENDING) { - pcb->upap.us_clientstate = UPAPCS_PENDING; - return; + pcb->upap.us_clientstate == UPAPCS_PENDING) { + pcb->upap.us_clientstate = UPAPCS_PENDING; + return; } - upap_sauthreq(pcb); /* Start protocol */ + upap_sauthreq(pcb); /* Start protocol */ } #if PPP_SERVER @@ -184,14 +184,14 @@ void upap_authpeer(ppp_pcb *pcb) { /* Lower layer up yet? */ if (pcb->upap.us_serverstate == UPAPSS_INITIAL || - pcb->upap.us_serverstate == UPAPSS_PENDING) { - pcb->upap.us_serverstate = UPAPSS_PENDING; - return; + pcb->upap.us_serverstate == UPAPSS_PENDING) { + pcb->upap.us_serverstate = UPAPSS_PENDING; + return; } pcb->upap.us_serverstate = UPAPSS_LISTEN; if (pcb->settings.pap_req_timeout > 0) - TIMEOUT(upap_reqtimeout, pcb, pcb->settings.pap_req_timeout); + TIMEOUT(upap_reqtimeout, pcb, pcb->settings.pap_req_timeout); } #endif /* PPP_SERVER */ @@ -202,17 +202,17 @@ static void upap_timeout(void *arg) { ppp_pcb *pcb = (ppp_pcb*)arg; if (pcb->upap.us_clientstate != UPAPCS_AUTHREQ) - return; + return; if (pcb->upap.us_transmits >= pcb->settings.pap_max_transmits) { - /* give up in disgust */ - ppp_error("No response to PAP authenticate-requests"); - pcb->upap.us_clientstate = UPAPCS_BADAUTH; - auth_withpeer_fail(pcb, PPP_PAP); - return; + /* give up in disgust */ + ppp_error("No response to PAP authenticate-requests"); + pcb->upap.us_clientstate = UPAPCS_BADAUTH; + auth_withpeer_fail(pcb, PPP_PAP); + return; } - upap_sauthreq(pcb); /* Send Authenticate-Request */ + upap_sauthreq(pcb); /* Send Authenticate-Request */ } @@ -224,7 +224,7 @@ static void upap_reqtimeout(void *arg) { ppp_pcb *pcb = (ppp_pcb*)arg; if (pcb->upap.us_serverstate != UPAPSS_LISTEN) - return; /* huh?? */ + return; /* huh?? */ auth_peer_fail(pcb, PPP_PAP); pcb->upap.us_serverstate = UPAPSS_BADAUTH; @@ -240,18 +240,18 @@ static void upap_reqtimeout(void *arg) { static void upap_lowerup(ppp_pcb *pcb) { if (pcb->upap.us_clientstate == UPAPCS_INITIAL) - pcb->upap.us_clientstate = UPAPCS_CLOSED; + pcb->upap.us_clientstate = UPAPCS_CLOSED; else if (pcb->upap.us_clientstate == UPAPCS_PENDING) { - upap_sauthreq(pcb); /* send an auth-request */ + upap_sauthreq(pcb); /* send an auth-request */ } #if PPP_SERVER if (pcb->upap.us_serverstate == UPAPSS_INITIAL) - pcb->upap.us_serverstate = UPAPSS_CLOSED; + pcb->upap.us_serverstate = UPAPSS_CLOSED; else if (pcb->upap.us_serverstate == UPAPSS_PENDING) { - pcb->upap.us_serverstate = UPAPSS_LISTEN; - if (pcb->settings.pap_req_timeout > 0) - TIMEOUT(upap_reqtimeout, pcb, pcb->settings.pap_req_timeout); + pcb->upap.us_serverstate = UPAPSS_LISTEN; + if (pcb->settings.pap_req_timeout > 0) + TIMEOUT(upap_reqtimeout, pcb, pcb->settings.pap_req_timeout); } #endif /* PPP_SERVER */ } @@ -264,11 +264,11 @@ static void upap_lowerup(ppp_pcb *pcb) { */ static void upap_lowerdown(ppp_pcb *pcb) { - if (pcb->upap.us_clientstate == UPAPCS_AUTHREQ) /* Timeout pending? */ - UNTIMEOUT(upap_timeout, pcb); /* Cancel timeout */ + if (pcb->upap.us_clientstate == UPAPCS_AUTHREQ) /* Timeout pending? */ + UNTIMEOUT(upap_timeout, pcb); /* Cancel timeout */ #if PPP_SERVER if (pcb->upap.us_serverstate == UPAPSS_LISTEN && pcb->settings.pap_req_timeout > 0) - UNTIMEOUT(upap_reqtimeout, pcb); + UNTIMEOUT(upap_reqtimeout, pcb); #endif /* PPP_SERVER */ pcb->upap.us_clientstate = UPAPCS_INITIAL; @@ -286,13 +286,13 @@ static void upap_lowerdown(ppp_pcb *pcb) { static void upap_protrej(ppp_pcb *pcb) { if (pcb->upap.us_clientstate == UPAPCS_AUTHREQ) { - ppp_error("PAP authentication failed due to protocol-reject"); - auth_withpeer_fail(pcb, PPP_PAP); + ppp_error("PAP authentication failed due to protocol-reject"); + auth_withpeer_fail(pcb, PPP_PAP); } #if PPP_SERVER if (pcb->upap.us_serverstate == UPAPSS_LISTEN) { - ppp_error("PAP authentication of peer failed (protocol-reject)"); - auth_peer_fail(pcb, PPP_PAP); + ppp_error("PAP authentication of peer failed (protocol-reject)"); + auth_peer_fail(pcb, PPP_PAP); } #endif /* PPP_SERVER */ upap_lowerdown(pcb); @@ -313,19 +313,19 @@ static void upap_input(ppp_pcb *pcb, u_char *inpacket, int l) { */ inp = inpacket; if (l < UPAP_HEADERLEN) { - UPAPDEBUG(("pap_input: rcvd short header.")); - return; + UPAPDEBUG(("pap_input: rcvd short header.")); + return; } GETCHAR(code, inp); GETCHAR(id, inp); GETSHORT(len, inp); if (len < UPAP_HEADERLEN) { - UPAPDEBUG(("pap_input: rcvd illegal length.")); - return; + UPAPDEBUG(("pap_input: rcvd illegal length.")); + return; } if (len > l) { - UPAPDEBUG(("pap_input: rcvd short packet.")); - return; + UPAPDEBUG(("pap_input: rcvd short packet.")); + return; } len -= UPAP_HEADERLEN; @@ -335,20 +335,20 @@ static void upap_input(ppp_pcb *pcb, u_char *inpacket, int l) { switch (code) { case UPAP_AUTHREQ: #if PPP_SERVER - upap_rauthreq(pcb, inp, id, len); + upap_rauthreq(pcb, inp, id, len); #endif /* PPP_SERVER */ - break; + break; case UPAP_AUTHACK: - upap_rauthack(pcb, inp, id, len); - break; + upap_rauthack(pcb, inp, id, len); + break; case UPAP_AUTHNAK: - upap_rauthnak(pcb, inp, id, len); - break; + upap_rauthnak(pcb, inp, id, len); + break; - default: /* XXX Need code reject */ - break; + default: /* XXX Need code reject */ + break; } } @@ -366,40 +366,40 @@ static void upap_rauthreq(ppp_pcb *pcb, u_char *inp, int id, int len) { int msglen; if (pcb->upap.us_serverstate < UPAPSS_LISTEN) - return; + return; /* * If we receive a duplicate authenticate-request, we are * supposed to return the same status as for the first request. */ if (pcb->upap.us_serverstate == UPAPSS_OPEN) { - upap_sresp(pcb, UPAP_AUTHACK, id, "", 0); /* return auth-ack */ - return; + upap_sresp(pcb, UPAP_AUTHACK, id, "", 0); /* return auth-ack */ + return; } if (pcb->upap.us_serverstate == UPAPSS_BADAUTH) { - upap_sresp(pcb, UPAP_AUTHNAK, id, "", 0); /* return auth-nak */ - return; + upap_sresp(pcb, UPAP_AUTHNAK, id, "", 0); /* return auth-nak */ + return; } /* * Parse user/passwd. */ if (len < 1) { - UPAPDEBUG(("pap_rauth: rcvd short packet.")); - return; + UPAPDEBUG(("pap_rauth: rcvd short packet.")); + return; } GETCHAR(ruserlen, inp); len -= sizeof (u_char) + ruserlen + sizeof (u_char); if (len < 0) { - UPAPDEBUG(("pap_rauth: rcvd short packet.")); - return; + UPAPDEBUG(("pap_rauth: rcvd short packet.")); + return; } ruser = (char *) inp; INCPTR(ruserlen, inp); GETCHAR(rpasswdlen, inp); if (len < rpasswdlen) { - UPAPDEBUG(("pap_rauth: rcvd short packet.")); - return; + UPAPDEBUG(("pap_rauth: rcvd short packet.")); + return; } rpasswd = (char *) inp; @@ -420,16 +420,16 @@ static void upap_rauthreq(ppp_pcb *pcb, u_char *inp, int id, int len) { * return an authenticate failure, is leaving it for us to verify. */ if (retcode == UPAP_AUTHACK) { - if (!auth_number()) { - /* We do not want to leak info about the pap result. */ - retcode = UPAP_AUTHNAK; /* XXX exit value will be "wrong" */ - warn("calling number %q is not authorized", remote_number); - } + if (!auth_number()) { + /* We do not want to leak info about the pap result. */ + retcode = UPAP_AUTHNAK; /* XXX exit value will be "wrong" */ + warn("calling number %q is not authorized", remote_number); + } } msglen = strlen(msg); if (msglen > 255) - msglen = 255; + msglen = 255; #endif /* UNUSED */ upap_sresp(pcb, retcode, id, msg, msglen); @@ -438,17 +438,17 @@ static void upap_rauthreq(ppp_pcb *pcb, u_char *inp, int id, int len) { ppp_slprintf(rhostname, sizeof(rhostname), "%.*v", ruserlen, ruser); if (retcode == UPAP_AUTHACK) { - pcb->upap.us_serverstate = UPAPSS_OPEN; - ppp_notice("PAP peer authentication succeeded for %q", rhostname); - auth_peer_success(pcb, PPP_PAP, 0, ruser, ruserlen); + pcb->upap.us_serverstate = UPAPSS_OPEN; + ppp_notice("PAP peer authentication succeeded for %q", rhostname); + auth_peer_success(pcb, PPP_PAP, 0, ruser, ruserlen); } else { - pcb->upap.us_serverstate = UPAPSS_BADAUTH; - ppp_warn("PAP peer authentication failed for %q", rhostname); - auth_peer_fail(pcb, PPP_PAP); + pcb->upap.us_serverstate = UPAPSS_BADAUTH; + ppp_warn("PAP peer authentication failed for %q", rhostname); + auth_peer_fail(pcb, PPP_PAP); } if (pcb->settings.pap_req_timeout > 0) - UNTIMEOUT(upap_reqtimeout, pcb); + UNTIMEOUT(upap_reqtimeout, pcb); } #endif /* PPP_SERVER */ @@ -461,24 +461,24 @@ static void upap_rauthack(ppp_pcb *pcb, u_char *inp, int id, int len) { LWIP_UNUSED_ARG(id); if (pcb->upap.us_clientstate != UPAPCS_AUTHREQ) /* XXX */ - return; + return; /* * Parse message. */ if (len < 1) { - UPAPDEBUG(("pap_rauthack: ignoring missing msg-length.")); + UPAPDEBUG(("pap_rauthack: ignoring missing msg-length.")); } else { - GETCHAR(msglen, inp); - if (msglen > 0) { - len -= sizeof (u_char); - if (len < msglen) { - UPAPDEBUG(("pap_rauthack: rcvd short packet.")); - return; - } - msg = (char *) inp; - PRINTMSG(msg, msglen); - } + GETCHAR(msglen, inp); + if (msglen > 0) { + len -= sizeof (u_char); + if (len < msglen) { + UPAPDEBUG(("pap_rauthack: rcvd short packet.")); + return; + } + msg = (char *) inp; + PRINTMSG(msg, msglen); + } } pcb->upap.us_clientstate = UPAPCS_OPEN; @@ -496,24 +496,24 @@ static void upap_rauthnak(ppp_pcb *pcb, u_char *inp, int id, int len) { LWIP_UNUSED_ARG(id); if (pcb->upap.us_clientstate != UPAPCS_AUTHREQ) /* XXX */ - return; + return; /* * Parse message. */ if (len < 1) { - UPAPDEBUG(("pap_rauthnak: ignoring missing msg-length.")); + UPAPDEBUG(("pap_rauthnak: ignoring missing msg-length.")); } else { - GETCHAR(msglen, inp); - if (msglen > 0) { - len -= sizeof (u_char); - if (len < msglen) { - UPAPDEBUG(("pap_rauthnak: rcvd short packet.")); - return; - } - msg = (char *) inp; - PRINTMSG(msg, msglen); - } + GETCHAR(msglen, inp); + if (msglen > 0) { + len -= sizeof (u_char); + if (len < msglen) { + UPAPDEBUG(("pap_rauthnak: rcvd short packet.")); + return; + } + msg = (char *) inp; + PRINTMSG(msg, msglen); + } } pcb->upap.us_clientstate = UPAPCS_BADAUTH; @@ -532,7 +532,7 @@ static void upap_sauthreq(ppp_pcb *pcb) { int outlen; outlen = UPAP_HEADERLEN + 2 * sizeof (u_char) + - pcb->upap.us_userlen + pcb->upap.us_passwdlen; + pcb->upap.us_userlen + pcb->upap.us_passwdlen; p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN +outlen), PPP_CTRL_PBUF_TYPE); if(NULL == p) return; @@ -606,68 +606,68 @@ static int upap_printpkt(const u_char *p, int plen, void (*printer) (void *, con const u_char *pstart; if (plen < UPAP_HEADERLEN) - return 0; + return 0; pstart = p; GETCHAR(code, p); GETCHAR(id, p); GETSHORT(len, p); if (len < UPAP_HEADERLEN || len > plen) - return 0; + return 0; if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(upap_codenames)) - printer(arg, " %s", upap_codenames[code-1]); + printer(arg, " %s", upap_codenames[code-1]); else - printer(arg, " code=0x%x", code); + printer(arg, " code=0x%x", code); printer(arg, " id=0x%x", id); len -= UPAP_HEADERLEN; switch (code) { case UPAP_AUTHREQ: - if (len < 1) - break; - ulen = p[0]; - if (len < ulen + 2) - break; - wlen = p[ulen + 1]; - if (len < ulen + wlen + 2) - break; - user = (const u_char *) (p + 1); - pwd = (const u_char *) (p + ulen + 2); - p += ulen + wlen + 2; - len -= ulen + wlen + 2; - printer(arg, " user="); - ppp_print_string(user, ulen, printer, arg); - printer(arg, " password="); + if (len < 1) + break; + ulen = p[0]; + if (len < ulen + 2) + break; + wlen = p[ulen + 1]; + if (len < ulen + wlen + 2) + break; + user = (const u_char *) (p + 1); + pwd = (const u_char *) (p + ulen + 2); + p += ulen + wlen + 2; + len -= ulen + wlen + 2; + printer(arg, " user="); + ppp_print_string(user, ulen, printer, arg); + printer(arg, " password="); /* FIXME: require ppp_pcb struct as printpkt() argument */ #if 0 - if (!pcb->settings.hide_password) + if (!pcb->settings.hide_password) #endif - ppp_print_string(pwd, wlen, printer, arg); + ppp_print_string(pwd, wlen, printer, arg); #if 0 - else - printer(arg, ""); + else + printer(arg, ""); #endif - break; + break; case UPAP_AUTHACK: case UPAP_AUTHNAK: - if (len < 1) - break; - mlen = p[0]; - if (len < mlen + 1) - break; - msg = (const u_char *) (p + 1); - p += mlen + 1; - len -= mlen + 1; - printer(arg, " "); - ppp_print_string(msg, mlen, printer, arg); - break; + if (len < 1) + break; + mlen = p[0]; + if (len < mlen + 1) + break; + msg = (const u_char *) (p + 1); + p += mlen + 1; + len -= mlen + 1; + printer(arg, " "); + ppp_print_string(msg, mlen, printer, arg); + break; default: - break; + break; } /* print the rest of the bytes in the packet */ for (; len > 0; --len) { - GETCHAR(code, p); - printer(arg, " %.2x", code); + GETCHAR(code, p); + printer(arg, " %.2x", code); } return p - pstart; diff --git a/Libraries/LwIP/src/netif/ppp/utils.c b/Libraries/LwIP/src/netif/ppp/utils.c index 7c0b6b7..be7a3b0 100755 --- a/Libraries/LwIP/src/netif/ppp/utils.c +++ b/Libraries/LwIP/src/netif/ppp/utils.c @@ -58,8 +58,6 @@ #endif #endif /* UNUSED */ -#include /* isdigit() */ - #include "netif/ppp/ppp_impl.h" #include "netif/ppp/fsm.h" @@ -74,7 +72,7 @@ static void ppp_log_write(int level, char *buf); #if PRINTPKT_SUPPORT static void ppp_vslp_printer(void *arg, const char *fmt, ...); static void ppp_format_packet(const u_char *p, int len, - void (*printer) (void *, const char *, ...), void *arg); + void (*printer) (void *, const char *, ...), void *arg); struct buffer_info { char *ptr; @@ -90,12 +88,12 @@ size_t ppp_strlcpy(char *dest, const char *src, size_t len) { size_t ret = strlen(src); if (len != 0) { - if (ret < len) - strcpy(dest, src); - else { - strncpy(dest, src, len - 1); - dest[len-1] = 0; - } + if (ret < len) + strcpy(dest, src); + else { + strncpy(dest, src, len - 1); + dest[len-1] = 0; + } } return ret; } @@ -132,7 +130,7 @@ int ppp_slprintf(char *buf, int buflen, const char *fmt, ...) { /* * ppp_vslprintf - like ppp_slprintf, takes a va_list instead of a list of args. */ -#define OUTCHAR(c) (buflen > 0? (--buflen, *buf++ = (c)): 0) +#define OUTCHAR(c) (buflen > 0? (--buflen, *buf++ = (c)): 0) int ppp_vslprintf(char *buf, int buflen, const char *fmt, va_list args) { int c, i, n; @@ -155,249 +153,249 @@ int ppp_vslprintf(char *buf, int buflen, const char *fmt, va_list args) { buf0 = buf; --buflen; while (buflen > 0) { - for (f = fmt; *f != '%' && *f != 0; ++f) - ; - if (f > fmt) { - len = f - fmt; - if (len > buflen) - len = buflen; - memcpy(buf, fmt, len); - buf += len; - buflen -= len; - fmt = f; - } - if (*fmt == 0) - break; - c = *++fmt; - width = 0; - prec = -1; - fillch = ' '; - if (c == '0') { - fillch = '0'; - c = *++fmt; - } - if (c == '*') { - width = va_arg(args, int); - c = *++fmt; - } else { - while (isdigit(c)) { - width = width * 10 + c - '0'; - c = *++fmt; - } - } - if (c == '.') { - c = *++fmt; - if (c == '*') { - prec = va_arg(args, int); - c = *++fmt; - } else { - prec = 0; - while (isdigit(c)) { - prec = prec * 10 + c - '0'; - c = *++fmt; - } - } - } - str = 0; - base = 0; - neg = 0; - ++fmt; - switch (c) { - case 'l': - c = *fmt++; - switch (c) { - case 'd': - val = va_arg(args, long); - if ((long)val < 0) { - neg = 1; - val = (unsigned long)-(long)val; - } - base = 10; - break; - case 'u': - val = va_arg(args, unsigned long); - base = 10; - break; - default: - OUTCHAR('%'); - OUTCHAR('l'); - --fmt; /* so %lz outputs %lz etc. */ - continue; - } - break; - case 'd': - i = va_arg(args, int); - if (i < 0) { - neg = 1; - val = -i; - } else - val = i; - base = 10; - break; - case 'u': - val = va_arg(args, unsigned int); - base = 10; - break; - case 'o': - val = va_arg(args, unsigned int); - base = 8; - break; - case 'x': - case 'X': - val = va_arg(args, unsigned int); - base = 16; - break; + for (f = fmt; *f != '%' && *f != 0; ++f) + ; + if (f > fmt) { + len = f - fmt; + if (len > buflen) + len = buflen; + memcpy(buf, fmt, len); + buf += len; + buflen -= len; + fmt = f; + } + if (*fmt == 0) + break; + c = *++fmt; + width = 0; + prec = -1; + fillch = ' '; + if (c == '0') { + fillch = '0'; + c = *++fmt; + } + if (c == '*') { + width = va_arg(args, int); + c = *++fmt; + } else { + while (lwip_isdigit(c)) { + width = width * 10 + c - '0'; + c = *++fmt; + } + } + if (c == '.') { + c = *++fmt; + if (c == '*') { + prec = va_arg(args, int); + c = *++fmt; + } else { + prec = 0; + while (lwip_isdigit(c)) { + prec = prec * 10 + c - '0'; + c = *++fmt; + } + } + } + str = 0; + base = 0; + neg = 0; + ++fmt; + switch (c) { + case 'l': + c = *fmt++; + switch (c) { + case 'd': + val = va_arg(args, long); + if ((long)val < 0) { + neg = 1; + val = (unsigned long)-(long)val; + } + base = 10; + break; + case 'u': + val = va_arg(args, unsigned long); + base = 10; + break; + default: + OUTCHAR('%'); + OUTCHAR('l'); + --fmt; /* so %lz outputs %lz etc. */ + continue; + } + break; + case 'd': + i = va_arg(args, int); + if (i < 0) { + neg = 1; + val = -i; + } else + val = i; + base = 10; + break; + case 'u': + val = va_arg(args, unsigned int); + base = 10; + break; + case 'o': + val = va_arg(args, unsigned int); + base = 8; + break; + case 'x': + case 'X': + val = va_arg(args, unsigned int); + base = 16; + break; #if 0 /* unused (and wrong on LLP64 systems) */ - case 'p': - val = (unsigned long) va_arg(args, void *); - base = 16; - neg = 2; - break; + case 'p': + val = (unsigned long) va_arg(args, void *); + base = 16; + neg = 2; + break; #endif /* unused (and wrong on LLP64 systems) */ - case 's': - str = va_arg(args, char *); - break; - case 'c': - num[0] = va_arg(args, int); - num[1] = 0; - str = num; - break; + case 's': + str = va_arg(args, char *); + break; + case 'c': + num[0] = va_arg(args, int); + num[1] = 0; + str = num; + break; #if 0 /* do we always have strerror() in embedded ? */ - case 'm': - str = strerror(errno); - break; + case 'm': + str = strerror(errno); + break; #endif /* do we always have strerror() in embedded ? */ - case 'I': - ip = va_arg(args, u32_t); - ip = lwip_ntohl(ip); - ppp_slprintf(num, sizeof(num), "%d.%d.%d.%d", (ip >> 24) & 0xff, - (ip >> 16) & 0xff, (ip >> 8) & 0xff, ip & 0xff); - str = num; - break; + case 'I': + ip = va_arg(args, u32_t); + ip = lwip_ntohl(ip); + ppp_slprintf(num, sizeof(num), "%d.%d.%d.%d", (ip >> 24) & 0xff, + (ip >> 16) & 0xff, (ip >> 8) & 0xff, ip & 0xff); + str = num; + break; #if 0 /* need port */ - case 't': - time(&t); - str = ctime(&t); - str += 4; /* chop off the day name */ - str[15] = 0; /* chop off year and newline */ - break; + case 't': + time(&t); + str = ctime(&t); + str += 4; /* chop off the day name */ + str[15] = 0; /* chop off year and newline */ + break; #endif /* need port */ - case 'v': /* "visible" string */ - case 'q': /* quoted string */ - quoted = c == 'q'; - p = va_arg(args, unsigned char *); - if (p == NULL) - p = (const unsigned char *)""; - if (fillch == '0' && prec >= 0) { - n = prec; - } else { - n = strlen((const char *)p); - if (prec >= 0 && n > prec) - n = prec; - } - while (n > 0 && buflen > 0) { - c = *p++; - --n; - if (!quoted && c >= 0x80) { - OUTCHAR('M'); - OUTCHAR('-'); - c -= 0x80; - } - if (quoted && (c == '"' || c == '\\')) - OUTCHAR('\\'); - if (c < 0x20 || (0x7f <= c && c < 0xa0)) { - if (quoted) { - OUTCHAR('\\'); - switch (c) { - case '\t': OUTCHAR('t'); break; - case '\n': OUTCHAR('n'); break; - case '\b': OUTCHAR('b'); break; - case '\f': OUTCHAR('f'); break; - default: - OUTCHAR('x'); - OUTCHAR(hexchars[c >> 4]); - OUTCHAR(hexchars[c & 0xf]); - } - } else { - if (c == '\t') - OUTCHAR(c); - else { - OUTCHAR('^'); - OUTCHAR(c ^ 0x40); - } - } - } else - OUTCHAR(c); - } - continue; + case 'v': /* "visible" string */ + case 'q': /* quoted string */ + quoted = c == 'q'; + p = va_arg(args, unsigned char *); + if (p == NULL) + p = (const unsigned char *)""; + if (fillch == '0' && prec >= 0) { + n = prec; + } else { + n = strlen((const char *)p); + if (prec >= 0 && n > prec) + n = prec; + } + while (n > 0 && buflen > 0) { + c = *p++; + --n; + if (!quoted && c >= 0x80) { + OUTCHAR('M'); + OUTCHAR('-'); + c -= 0x80; + } + if (quoted && (c == '"' || c == '\\')) + OUTCHAR('\\'); + if (c < 0x20 || (0x7f <= c && c < 0xa0)) { + if (quoted) { + OUTCHAR('\\'); + switch (c) { + case '\t': OUTCHAR('t'); break; + case '\n': OUTCHAR('n'); break; + case '\b': OUTCHAR('b'); break; + case '\f': OUTCHAR('f'); break; + default: + OUTCHAR('x'); + OUTCHAR(hexchars[c >> 4]); + OUTCHAR(hexchars[c & 0xf]); + } + } else { + if (c == '\t') + OUTCHAR(c); + else { + OUTCHAR('^'); + OUTCHAR(c ^ 0x40); + } + } + } else + OUTCHAR(c); + } + continue; #if PRINTPKT_SUPPORT - case 'P': /* print PPP packet */ - bufinfo.ptr = buf; - bufinfo.len = buflen + 1; - p = va_arg(args, unsigned char *); - n = va_arg(args, int); - ppp_format_packet(p, n, ppp_vslp_printer, &bufinfo); - buf = bufinfo.ptr; - buflen = bufinfo.len - 1; - continue; + case 'P': /* print PPP packet */ + bufinfo.ptr = buf; + bufinfo.len = buflen + 1; + p = va_arg(args, unsigned char *); + n = va_arg(args, int); + ppp_format_packet(p, n, ppp_vslp_printer, &bufinfo); + buf = bufinfo.ptr; + buflen = bufinfo.len - 1; + continue; #endif /* PRINTPKT_SUPPORT */ - case 'B': - p = va_arg(args, unsigned char *); - for (n = prec; n > 0; --n) { - c = *p++; - if (fillch == ' ') - OUTCHAR(' '); - OUTCHAR(hexchars[(c >> 4) & 0xf]); - OUTCHAR(hexchars[c & 0xf]); - } - continue; - default: - *buf++ = '%'; - if (c != '%') - --fmt; /* so %z outputs %z etc. */ - --buflen; - continue; - } - if (base != 0) { - str = num + sizeof(num); - *--str = 0; - while (str > num + neg) { - *--str = hexchars[val % base]; - val = val / base; - if (--prec <= 0 && val == 0) - break; - } - switch (neg) { - case 1: - *--str = '-'; - break; - case 2: - *--str = 'x'; - *--str = '0'; - break; - default: - break; - } - len = num + sizeof(num) - 1 - str; - } else { - len = strlen(str); - if (prec >= 0 && len > prec) - len = prec; - } - if (width > 0) { - if (width > buflen) - width = buflen; - if ((n = width - len) > 0) { - buflen -= n; - for (; n > 0; --n) - *buf++ = fillch; - } - } - if (len > buflen) - len = buflen; - memcpy(buf, str, len); - buf += len; - buflen -= len; + case 'B': + p = va_arg(args, unsigned char *); + for (n = prec; n > 0; --n) { + c = *p++; + if (fillch == ' ') + OUTCHAR(' '); + OUTCHAR(hexchars[(c >> 4) & 0xf]); + OUTCHAR(hexchars[c & 0xf]); + } + continue; + default: + *buf++ = '%'; + if (c != '%') + --fmt; /* so %z outputs %z etc. */ + --buflen; + continue; + } + if (base != 0) { + str = num + sizeof(num); + *--str = 0; + while (str > num + neg) { + *--str = hexchars[val % base]; + val = val / base; + if (--prec <= 0 && val == 0) + break; + } + switch (neg) { + case 1: + *--str = '-'; + break; + case 2: + *--str = 'x'; + *--str = '0'; + break; + default: + break; + } + len = num + sizeof(num) - 1 - str; + } else { + len = strlen(str); + if (prec >= 0 && len > prec) + len = prec; + } + if (width > 0) { + if (width > buflen) + width = buflen; + if ((n = width - len) > 0) { + buflen -= n; + for (; n > 0; --n) + *buf++ = fillch; + } + } + if (len > buflen) + len = buflen; + memcpy(buf, str, len); + buf += len; + buflen -= len; } *buf = 0; return buf - buf0; @@ -434,9 +432,9 @@ log_packet(p, len, prefix, level) char *prefix; int level; { - init_pr_log(prefix, level); - ppp_format_packet(p, len, pr_log, &level); - end_pr_log(); + init_pr_log(prefix, level); + ppp_format_packet(p, len, pr_log, &level); + end_pr_log(); } #endif /* UNUSED */ @@ -446,43 +444,43 @@ log_packet(p, len, prefix, level) * calling `printer(arg, format, ...)' to output it. */ static void ppp_format_packet(const u_char *p, int len, - void (*printer) (void *, const char *, ...), void *arg) { + void (*printer) (void *, const char *, ...), void *arg) { int i, n; u_short proto; const struct protent *protp; if (len >= 2) { - GETSHORT(proto, p); - len -= 2; - for (i = 0; (protp = protocols[i]) != NULL; ++i) - if (proto == protp->protocol) - break; - if (protp != NULL) { - printer(arg, "[%s", protp->name); - n = (*protp->printpkt)(p, len, printer, arg); - printer(arg, "]"); - p += n; - len -= n; - } else { - for (i = 0; (protp = protocols[i]) != NULL; ++i) - if (proto == (protp->protocol & ~0x8000)) - break; - if (protp != 0 && protp->data_name != 0) { - printer(arg, "[%s data]", protp->data_name); - if (len > 8) - printer(arg, "%.8B ...", p); - else - printer(arg, "%.*B", len, p); - len = 0; - } else - printer(arg, "[proto=0x%x]", proto); - } + GETSHORT(proto, p); + len -= 2; + for (i = 0; (protp = protocols[i]) != NULL; ++i) + if (proto == protp->protocol) + break; + if (protp != NULL) { + printer(arg, "[%s", protp->name); + n = (*protp->printpkt)(p, len, printer, arg); + printer(arg, "]"); + p += n; + len -= n; + } else { + for (i = 0; (protp = protocols[i]) != NULL; ++i) + if (proto == (protp->protocol & ~0x8000)) + break; + if (protp != 0 && protp->data_name != 0) { + printer(arg, "[%s data]", protp->data_name); + if (len > 8) + printer(arg, "%.8B ...", p); + else + printer(arg, "%.*B", len, p); + len = 0; + } else + printer(arg, "[proto=0x%x]", proto); + } } if (len > 32) - printer(arg, "%.32B ...", p); + printer(arg, "%.32B ...", p); else - printer(arg, "%.*B", len, p); + printer(arg, "%.*B", len, p); } #endif /* PRINTPKT_SUPPORT */ @@ -491,30 +489,30 @@ static void ppp_format_packet(const u_char *p, int len, * init_pr_log, end_pr_log - initialize and finish use of pr_log. */ -static char line[256]; /* line to be logged accumulated here */ -static char *linep; /* current pointer within line */ -static int llevel; /* level for logging */ +static char line[256]; /* line to be logged accumulated here */ +static char *linep; /* current pointer within line */ +static int llevel; /* level for logging */ void init_pr_log(prefix, level) const char *prefix; int level; { - linep = line; - if (prefix != NULL) { - ppp_strlcpy(line, prefix, sizeof(line)); - linep = line + strlen(line); - } - llevel = level; + linep = line; + if (prefix != NULL) { + ppp_strlcpy(line, prefix, sizeof(line)); + linep = line + strlen(line); + } + llevel = level; } void end_pr_log() { - if (linep != line) { - *linep = 0; - ppp_log_write(llevel, line); - } + if (linep != line) { + *linep = 0; + ppp_log_write(llevel, line); + } } /* @@ -523,47 +521,47 @@ end_pr_log() void pr_log (void *arg, const char *fmt, ...) { - int l, n; - va_list pvar; - char *p, *eol; - char buf[256]; + int l, n; + va_list pvar; + char *p, *eol; + char buf[256]; - va_start(pvar, fmt); - n = ppp_vslprintf(buf, sizeof(buf), fmt, pvar); - va_end(pvar); + va_start(pvar, fmt); + n = ppp_vslprintf(buf, sizeof(buf), fmt, pvar); + va_end(pvar); - p = buf; - eol = strchr(buf, '\n'); - if (linep != line) { - l = (eol == NULL)? n: eol - buf; - if (linep + l < line + sizeof(line)) { - if (l > 0) { - memcpy(linep, buf, l); - linep += l; - } - if (eol == NULL) - return; - p = eol + 1; - eol = strchr(p, '\n'); - } - *linep = 0; - ppp_log_write(llevel, line); - linep = line; - } + p = buf; + eol = strchr(buf, '\n'); + if (linep != line) { + l = (eol == NULL)? n: eol - buf; + if (linep + l < line + sizeof(line)) { + if (l > 0) { + memcpy(linep, buf, l); + linep += l; + } + if (eol == NULL) + return; + p = eol + 1; + eol = strchr(p, '\n'); + } + *linep = 0; + ppp_log_write(llevel, line); + linep = line; + } - while (eol != NULL) { - *eol = 0; - ppp_log_write(llevel, p); - p = eol + 1; - eol = strchr(p, '\n'); - } + while (eol != NULL) { + *eol = 0; + ppp_log_write(llevel, p); + p = eol + 1; + eol = strchr(p, '\n'); + } - /* assumes sizeof(buf) <= sizeof(line) */ - l = buf + n - p; - if (l > 0) { - memcpy(line, p, n); - linep = line + l; - } + /* assumes sizeof(buf) <= sizeof(line) */ + l = buf + n - p; + if (l > 0) { + memcpy(line, p, n); + linep = line + l; + } } #endif /* UNUSED */ @@ -576,27 +574,27 @@ void ppp_print_string(const u_char *p, int len, void (*printer) (void *, const c printer(arg, "\""); for (; len > 0; --len) { - c = *p++; - if (' ' <= c && c <= '~') { - if (c == '\\' || c == '"') - printer(arg, "\\"); - printer(arg, "%c", c); - } else { - switch (c) { - case '\n': - printer(arg, "\\n"); - break; - case '\r': - printer(arg, "\\r"); - break; - case '\t': - printer(arg, "\\t"); - break; - default: - printer(arg, "\\%.3o", (u8_t)c); - /* no break */ - } - } + c = *p++; + if (' ' <= c && c <= '~') { + if (c == '\\' || c == '"') + printer(arg, "\\"); + printer(arg, "%c", c); + } else { + switch (c) { + case '\n': + printer(arg, "\\n"); + break; + case '\r': + printer(arg, "\\r"); + break; + case '\t': + printer(arg, "\\t"); + break; + default: + printer(arg, "\\%.3o", (u8_t)c); + /* no break */ + } + } } printer(arg, "\""); } @@ -617,13 +615,13 @@ static void ppp_log_write(int level, char *buf) { PPPDEBUG(level, ("%s\n", buf) ); #if 0 if (log_to_fd >= 0 && (level != LOG_DEBUG || debug)) { - int n = strlen(buf); + int n = strlen(buf); - if (n > 0 && buf[n-1] == '\n') - --n; - if (write(log_to_fd, buf, n) != n - || write(log_to_fd, "\n", 1) != 1) - log_to_fd = -1; + if (n > 0 && buf[n-1] == '\n') + --n; + if (write(log_to_fd, buf, n) != n + || write(log_to_fd, "\n", 1) != 1) + log_to_fd = -1; } #endif } @@ -712,18 +710,18 @@ void ppp_dump_packet(ppp_pcb *pcb, const char *tag, unsigned char *p, int len) { */ proto = (p[0] << 8) + p[1]; if (proto < 0xC000 && (proto & ~0x8000) == proto) - return; + return; /* * don't print valid LCP echo request/reply packets if the link is up. */ if (proto == PPP_LCP && pcb->phase == PPP_PHASE_RUNNING && len >= 2 + HEADERLEN) { - unsigned char *lcp = p + 2; - int l = (lcp[2] << 8) + lcp[3]; + unsigned char *lcp = p + 2; + int l = (lcp[2] << 8) + lcp[3]; - if ((lcp[0] == ECHOREQ || lcp[0] == ECHOREP) - && l >= HEADERLEN && l <= len - 2) - return; + if ((lcp[0] == ECHOREQ || lcp[0] == ECHOREP) + && l >= HEADERLEN && l <= len - 2) + return; } ppp_dbglog("%s %P", tag, p, len); @@ -739,34 +737,34 @@ void ppp_dump_packet(ppp_pcb *pcb, const char *tag, unsigned char *p, int len) { ssize_t complete_read(int fd, void *buf, size_t count) { - size_t done; - ssize_t nb; - char *ptr = buf; + size_t done; + ssize_t nb; + char *ptr = buf; - for (done = 0; done < count; ) { - nb = read(fd, ptr, count - done); - if (nb < 0) { - if (errno == EINTR) - continue; - return -1; - } - if (nb == 0) - break; - done += nb; - ptr += nb; - } - return done; + for (done = 0; done < count; ) { + nb = read(fd, ptr, count - done); + if (nb < 0) { + if (errno == EINTR) + continue; + return -1; + } + if (nb == 0) + break; + done += nb; + ptr += nb; + } + return done; } /* Procedures for locking the serial device using a lock file. */ #ifndef LOCK_DIR #ifdef __linux__ -#define LOCK_DIR "/var/lock" +#define LOCK_DIR "/var/lock" #else #ifdef SVR4 -#define LOCK_DIR "/var/spool/locks" +#define LOCK_DIR "/var/spool/locks" #else -#define LOCK_DIR "/var/spool/lock" +#define LOCK_DIR "/var/spool/lock" #endif #endif #endif /* LOCK_DIR */ @@ -785,14 +783,14 @@ lock(dev) result = mklock (dev, (void *) 0); if (result == 0) { - ppp_strlcpy(lock_file, dev, sizeof(lock_file)); - return 0; + ppp_strlcpy(lock_file, dev, sizeof(lock_file)); + return 0; } if (result > 0) ppp_notice("Device %s is locked by pid %d", dev, result); else - ppp_error("Can't create lock file %s", lock_file); + ppp_error("Can't create lock file %s", lock_file); return -1; #else /* LOCKLIB */ @@ -804,83 +802,83 @@ lock(dev) struct stat sbuf; if (stat(dev, &sbuf) < 0) { - ppp_error("Can't get device number for %s: %m", dev); - return -1; + ppp_error("Can't get device number for %s: %m", dev); + return -1; } if ((sbuf.st_mode & S_IFMT) != S_IFCHR) { - ppp_error("Can't lock %s: not a character device", dev); - return -1; + ppp_error("Can't lock %s: not a character device", dev); + return -1; } ppp_slprintf(lock_file, sizeof(lock_file), "%s/LK.%03d.%03d.%03d", - LOCK_DIR, major(sbuf.st_dev), - major(sbuf.st_rdev), minor(sbuf.st_rdev)); + LOCK_DIR, major(sbuf.st_dev), + major(sbuf.st_rdev), minor(sbuf.st_rdev)); #else char *p; char lockdev[MAXPATHLEN]; if ((p = strstr(dev, "dev/")) != NULL) { - dev = p + 4; - strncpy(lockdev, dev, MAXPATHLEN-1); - lockdev[MAXPATHLEN-1] = 0; - while ((p = strrchr(lockdev, '/')) != NULL) { - *p = '_'; - } - dev = lockdev; + dev = p + 4; + strncpy(lockdev, dev, MAXPATHLEN-1); + lockdev[MAXPATHLEN-1] = 0; + while ((p = strrchr(lockdev, '/')) != NULL) { + *p = '_'; + } + dev = lockdev; } else - if ((p = strrchr(dev, '/')) != NULL) - dev = p + 1; + if ((p = strrchr(dev, '/')) != NULL) + dev = p + 1; ppp_slprintf(lock_file, sizeof(lock_file), "%s/LCK..%s", LOCK_DIR, dev); #endif while ((fd = open(lock_file, O_EXCL | O_CREAT | O_RDWR, 0644)) < 0) { - if (errno != EEXIST) { - ppp_error("Can't create lock file %s: %m", lock_file); - break; - } + if (errno != EEXIST) { + ppp_error("Can't create lock file %s: %m", lock_file); + break; + } - /* Read the lock file to find out who has the device locked. */ - fd = open(lock_file, O_RDONLY, 0); - if (fd < 0) { - if (errno == ENOENT) /* This is just a timing problem. */ - continue; - ppp_error("Can't open existing lock file %s: %m", lock_file); - break; - } + /* Read the lock file to find out who has the device locked. */ + fd = open(lock_file, O_RDONLY, 0); + if (fd < 0) { + if (errno == ENOENT) /* This is just a timing problem. */ + continue; + ppp_error("Can't open existing lock file %s: %m", lock_file); + break; + } #ifndef LOCK_BINARY - n = read(fd, lock_buffer, 11); + n = read(fd, lock_buffer, 11); #else - n = read(fd, &pid, sizeof(pid)); + n = read(fd, &pid, sizeof(pid)); #endif /* LOCK_BINARY */ - close(fd); - fd = -1; - if (n <= 0) { - ppp_error("Can't read pid from lock file %s", lock_file); - break; - } + close(fd); + fd = -1; + if (n <= 0) { + ppp_error("Can't read pid from lock file %s", lock_file); + break; + } - /* See if the process still exists. */ + /* See if the process still exists. */ #ifndef LOCK_BINARY - lock_buffer[n] = 0; - pid = atoi(lock_buffer); + lock_buffer[n] = 0; + pid = atoi(lock_buffer); #endif /* LOCK_BINARY */ - if (pid == getpid()) - return 1; /* somebody else locked it for us */ - if (pid == 0 - || (kill(pid, 0) == -1 && errno == ESRCH)) { - if (unlink (lock_file) == 0) { - ppp_notice("Removed stale lock on %s (pid %d)", dev, pid); - continue; - } - ppp_warn("Couldn't remove stale lock on %s", dev); - } else - ppp_notice("Device %s is locked by pid %d", dev, pid); - break; + if (pid == getpid()) + return 1; /* somebody else locked it for us */ + if (pid == 0 + || (kill(pid, 0) == -1 && errno == ESRCH)) { + if (unlink (lock_file) == 0) { + ppp_notice("Removed stale lock on %s (pid %d)", dev, pid); + continue; + } + ppp_warn("Couldn't remove stale lock on %s", dev); + } else + ppp_notice("Device %s is locked by pid %d", dev, pid); + break; } if (fd < 0) { - lock_file[0] = 0; - return -1; + lock_file[0] = 0; + return -1; } pid = getpid(); @@ -918,12 +916,12 @@ relock(pid) char lock_buffer[12]; if (lock_file[0] == 0) - return -1; + return -1; fd = open(lock_file, O_WRONLY, 0); if (fd < 0) { - ppp_error("Couldn't reopen lock file %s: %m", lock_file); - lock_file[0] = 0; - return -1; + ppp_error("Couldn't reopen lock file %s: %m", lock_file); + lock_file[0] = 0; + return -1; } #ifndef LOCK_BINARY @@ -946,11 +944,11 @@ unlock() { if (lock_file[0]) { #ifdef LOCKLIB - (void) rmlock(lock_file, (void *) 0); + (void) rmlock(lock_file, (void *) 0); #else - unlink(lock_file); + unlink(lock_file); #endif - lock_file[0] = 0; + lock_file[0] = 0; } } diff --git a/Libraries/LwIP/src/netif/ppp/vj.c b/Libraries/LwIP/src/netif/ppp/vj.c index 0cef43f..8ba94ba 100755 --- a/Libraries/LwIP/src/netif/ppp/vj.c +++ b/Libraries/LwIP/src/netif/ppp/vj.c @@ -202,16 +202,11 @@ vj_compress_tcp(struct vjcompress *comp, struct pbuf **pb) /* TCP stack requires that we don't change the packet payload, therefore we copy * the whole packet before compression. */ - np = pbuf_alloc(PBUF_RAW, np->tot_len, PBUF_POOL); + np = pbuf_clone(PBUF_RAW, PBUF_RAM, *pb); if (!np) { return (TYPE_IP); } - if (pbuf_copy(np, *pb) != ERR_OK) { - pbuf_free(np); - return (TYPE_IP); - } - *pb = np; ip = (struct ip_hdr *)np->payload; @@ -412,18 +407,18 @@ vj_compress_tcp(struct vjcompress *comp, struct pbuf **pb) if (!comp->compressSlot || comp->last_xmit != cs->cs_id) { comp->last_xmit = cs->cs_id; hlen -= deltaS + 4; - if (pbuf_header(np, -(s16_t)hlen)){ + if (pbuf_remove_header(np, hlen)){ /* Can we cope with this failing? Just assert for now */ - LWIP_ASSERT("pbuf_header failed\n", 0); + LWIP_ASSERT("pbuf_remove_header failed\n", 0); } cp = (u8_t*)np->payload; *cp++ = (u8_t)(changes | NEW_C); *cp++ = cs->cs_id; } else { hlen -= deltaS + 3; - if (pbuf_header(np, -(s16_t)hlen)) { + if (pbuf_remove_header(np, hlen)) { /* Can we cope with this failing? Just assert for now */ - LWIP_ASSERT("pbuf_header failed\n", 0); + LWIP_ASSERT("pbuf_remove_header failed\n", 0); } cp = (u8_t*)np->payload; *cp++ = (u8_t)changes; @@ -471,19 +466,20 @@ vj_uncompress_uncomp(struct pbuf *nb, struct vjcompress *comp) hlen = IPH_HL(ip) << 2; if (IPH_PROTO(ip) >= MAX_SLOTS || hlen + sizeof(struct tcp_hdr) > nb->len - || (hlen += TCPH_HDRLEN(((struct tcp_hdr *)&((char *)ip)[hlen])) << 2) + || (hlen += TCPH_HDRLEN_BYTES((struct tcp_hdr *)&((char *)ip)[hlen])) > nb->len || hlen > MAX_HDR) { PPPDEBUG(LOG_INFO, ("vj_uncompress_uncomp: bad cid=%d, hlen=%d buflen=%d\n", IPH_PROTO(ip), hlen, nb->len)); - comp->flags |= VJF_TOSS; - INCR(vjs_errorin); + vj_uncompress_err(comp); return -1; } cs = &comp->rstate[comp->last_recv = IPH_PROTO(ip)]; comp->flags &=~ VJF_TOSS; IPH_PROTO_SET(ip, IP_PROTO_TCP); - MEMCPY(&cs->cs_ip, ip, hlen); + /* copy from/to bigger buffers checked above instead of cs->cs_ip and ip + just to help static code analysis to see this is correct ;-) */ + MEMCPY(&cs->cs_hdr, nb->payload, hlen); cs->cs_hlen = (u16_t)hlen; INCR(vjs_uncompressedin); return 0; @@ -623,15 +619,14 @@ vj_uncompress_tcp(struct pbuf **nb, struct vjcompress *comp) IPH_CHKSUM_SET(&cs->cs_ip, (u16_t)(~tmp)); /* Remove the compressed header and prepend the uncompressed header. */ - if (pbuf_header(n0, -(s16_t)vjlen)) { + if (pbuf_remove_header(n0, vjlen)) { /* Can we cope with this failing? Just assert for now */ - LWIP_ASSERT("pbuf_header failed\n", 0); + LWIP_ASSERT("pbuf_remove_header failed\n", 0); goto bad; } if(LWIP_MEM_ALIGN(n0->payload) != n0->payload) { - struct pbuf *np, *q; - u8_t *bufptr; + struct pbuf *np; #if IP_FORWARD /* If IP forwarding is enabled we are using a PBUF_LINK packet type so @@ -647,17 +642,13 @@ vj_uncompress_tcp(struct pbuf **nb, struct vjcompress *comp) goto bad; } - if (pbuf_header(np, -(s16_t)cs->cs_hlen)) { + if (pbuf_remove_header(np, cs->cs_hlen)) { /* Can we cope with this failing? Just assert for now */ - LWIP_ASSERT("pbuf_header failed\n", 0); + LWIP_ASSERT("pbuf_remove_header failed\n", 0); goto bad; } - bufptr = (u8_t*)n0->payload; - for(q = np; q != NULL; q = q->next) { - MEMCPY(q->payload, bufptr, q->len); - bufptr += q->len; - } + pbuf_take(np, n0->payload, n0->len); if(n0->next) { pbuf_chain(np, n0->next); @@ -667,7 +658,7 @@ vj_uncompress_tcp(struct pbuf **nb, struct vjcompress *comp) n0 = np; } - if (pbuf_header(n0, (s16_t)cs->cs_hlen)) { + if (pbuf_add_header(n0, cs->cs_hlen)) { struct pbuf *np; LWIP_ASSERT("vj_uncompress_tcp: cs->cs_hlen <= PBUF_POOL_BUFSIZE", cs->cs_hlen <= PBUF_POOL_BUFSIZE); @@ -687,8 +678,7 @@ vj_uncompress_tcp(struct pbuf **nb, struct vjcompress *comp) return vjlen; bad: - comp->flags |= VJF_TOSS; - INCR(vjs_errorin); + vj_uncompress_err(comp); return (-1); } diff --git a/Libraries/LwIP/src/netif/slipif.c b/Libraries/LwIP/src/netif/slipif.c index 6df8d21..037ed9c 100755 --- a/Libraries/LwIP/src/netif/slipif.c +++ b/Libraries/LwIP/src/netif/slipif.c @@ -40,8 +40,8 @@ /** - * @defgroup slipif SLIP netif - * @ingroup addons + * @defgroup slipif SLIP + * @ingroup netifs * * This is an arch independent SLIP netif. The specific serial hooks must be * provided by another file. They are sio_open, sio_read/sio_tryread and sio_send @@ -88,8 +88,8 @@ #endif enum slipif_recv_state { - SLIP_RECV_NORMAL, - SLIP_RECV_ESCAPE + SLIP_RECV_NORMAL, + SLIP_RECV_ESCAPE }; struct slipif_priv { @@ -124,7 +124,7 @@ slipif_output(struct netif *netif, struct pbuf *p) LWIP_ASSERT("netif->state != NULL", (netif->state != NULL)); LWIP_ASSERT("p != NULL", (p != NULL)); - LWIP_DEBUGF(SLIP_DEBUG, ("slipif_output(%"U16_F"): sending %"U16_F" bytes\n", (u16_t)netif->num, p->tot_len)); + LWIP_DEBUGF(SLIP_DEBUG, ("slipif_output: sending %"U16_F" bytes\n", p->tot_len)); priv = (struct slipif_priv *)netif->state; /* Send pbuf out on the serial I/O device. */ @@ -135,20 +135,20 @@ slipif_output(struct netif *netif, struct pbuf *p) for (i = 0; i < q->len; i++) { c = ((u8_t *)q->payload)[i]; switch (c) { - case SLIP_END: - /* need to escape this byte (0xC0 -> 0xDB, 0xDC) */ - sio_send(SLIP_ESC, priv->sd); - sio_send(SLIP_ESC_END, priv->sd); - break; - case SLIP_ESC: - /* need to escape this byte (0xDB -> 0xDB, 0xDD) */ - sio_send(SLIP_ESC, priv->sd); - sio_send(SLIP_ESC_ESC, priv->sd); - break; - default: - /* normal byte - no need for escaping */ - sio_send(c, priv->sd); - break; + case SLIP_END: + /* need to escape this byte (0xC0 -> 0xDB, 0xDC) */ + sio_send(SLIP_ESC, priv->sd); + sio_send(SLIP_ESC_END, priv->sd); + break; + case SLIP_ESC: + /* need to escape this byte (0xDB -> 0xDB, 0xDD) */ + sio_send(SLIP_ESC, priv->sd); + sio_send(SLIP_ESC_ESC, priv->sd); + break; + default: + /* normal byte - no need for escaping */ + sio_send(c, priv->sd); + break; } } } @@ -203,7 +203,7 @@ slipif_output_v6(struct netif *netif, struct pbuf *p, const ip6_addr_t *ipaddr) * return a complete packet, NULL is returned before - used for polling) * @return The IP packet when SLIP_END is received */ -static struct pbuf* +static struct pbuf * slipif_rxbyte(struct netif *netif, u8_t c) { struct slipif_priv *priv; @@ -215,47 +215,47 @@ slipif_rxbyte(struct netif *netif, u8_t c) priv = (struct slipif_priv *)netif->state; switch (priv->state) { - case SLIP_RECV_NORMAL: - switch (c) { - case SLIP_END: - if (priv->recved > 0) { - /* Received whole packet. */ - /* Trim the pbuf to the size of the received packet. */ - pbuf_realloc(priv->q, priv->recved); + case SLIP_RECV_NORMAL: + switch (c) { + case SLIP_END: + if (priv->recved > 0) { + /* Received whole packet. */ + /* Trim the pbuf to the size of the received packet. */ + pbuf_realloc(priv->q, priv->recved); - LINK_STATS_INC(link.recv); + LINK_STATS_INC(link.recv); - LWIP_DEBUGF(SLIP_DEBUG, ("slipif: Got packet (%"U16_F" bytes)\n", priv->recved)); - t = priv->q; - priv->p = priv->q = NULL; - priv->i = priv->recved = 0; - return t; + LWIP_DEBUGF(SLIP_DEBUG, ("slipif: Got packet (%"U16_F" bytes)\n", priv->recved)); + t = priv->q; + priv->p = priv->q = NULL; + priv->i = priv->recved = 0; + return t; + } + return NULL; + case SLIP_ESC: + priv->state = SLIP_RECV_ESCAPE; + return NULL; + default: + break; + } /* end switch (c) */ + break; + case SLIP_RECV_ESCAPE: + /* un-escape END or ESC bytes, leave other bytes + (although that would be a protocol error) */ + switch (c) { + case SLIP_ESC_END: + c = SLIP_END; + break; + case SLIP_ESC_ESC: + c = SLIP_ESC; + break; + default: + break; } - return NULL; - case SLIP_ESC: - priv->state = SLIP_RECV_ESCAPE; - return NULL; - default: - break; - } /* end switch (c) */ - break; - case SLIP_RECV_ESCAPE: - /* un-escape END or ESC bytes, leave other bytes - (although that would be a protocol error) */ - switch (c) { - case SLIP_ESC_END: - c = SLIP_END; - break; - case SLIP_ESC_ESC: - c = SLIP_ESC; + priv->state = SLIP_RECV_NORMAL; break; default: break; - } - priv->state = SLIP_RECV_NORMAL; - break; - default: - break; } /* end switch (priv->state) */ /* byte received, packet not yet completely received */ @@ -290,11 +290,11 @@ slipif_rxbyte(struct netif *netif, u8_t c) priv->i = 0; if (priv->p->next != NULL && priv->p->next->len > 0) { /* p is a chain, on to the next in the chain */ - priv->p = priv->p->next; + priv->p = priv->p->next; } else { /* p is a single pbuf, set it to NULL so next time a new * pbuf is allocated */ - priv->p = NULL; + priv->p = NULL; } } } @@ -342,6 +342,7 @@ slipif_loop_thread(void *nf) #endif /* SLIP_USE_RX_THREAD */ /** + * @ingroup slipif * SLIP netif initialization * * Call the arch specific sio_open and remember @@ -352,9 +353,7 @@ slipif_loop_thread(void *nf) * ERR_MEM if no memory could be allocated, * ERR_IF is serial line couldn't be opened * - * @note netif->num must contain the number of the serial port to open - * (0 by default). If netif->state is != NULL, it is interpreted as an - * u8_t pointer pointing to the serial port number instead of netif->num. + * @note If netif->state is interpreted as an u8_t serial port number. * */ err_t @@ -363,7 +362,12 @@ slipif_init(struct netif *netif) struct slipif_priv *priv; u8_t sio_num; - LWIP_DEBUGF(SLIP_DEBUG, ("slipif_init: netif->num=%"U16_F"\n", (u16_t)netif->num)); + LWIP_ASSERT("slipif needs an input callback", netif->input != NULL); + + /* netif->state contains serial port number */ + sio_num = LWIP_PTR_NUMERIC_CAST(u8_t, netif->state); + + LWIP_DEBUGF(SLIP_DEBUG, ("slipif_init: netif->num=%"U16_F"\n", (u16_t)sio_num)); /* Allocate private data */ priv = (struct slipif_priv *)mem_malloc(sizeof(struct slipif_priv)); @@ -381,12 +385,6 @@ slipif_init(struct netif *netif) #endif /* LWIP_IPV6 */ netif->mtu = SLIP_MAX_SIZE; - /* netif->state or netif->num contain the port number */ - if (netif->state != NULL) { - sio_num = *(u8_t*)netif->state; - } else { - sio_num = netif->num; - } /* Try to open the serial port. */ priv->sd = sio_open(sio_num); if (!priv->sd) { @@ -413,12 +411,13 @@ slipif_init(struct netif *netif) #if SLIP_USE_RX_THREAD /* Create a thread to poll the serial line. */ sys_thread_new(SLIPIF_THREAD_NAME, slipif_loop_thread, netif, - SLIPIF_THREAD_STACKSIZE, SLIPIF_THREAD_PRIO); + SLIPIF_THREAD_STACKSIZE, SLIPIF_THREAD_PRIO); #endif /* SLIP_USE_RX_THREAD */ return ERR_OK; } /** + * @ingroup slipif * Polls the serial device and feeds the IP layer with incoming packets. * * @param netif The lwip network interface structure for this slipif @@ -441,6 +440,7 @@ slipif_poll(struct netif *netif) #if SLIP_RX_FROM_ISR /** + * @ingroup slipif * Feeds the IP layer with incoming packets that were receive * * @param netif The lwip network interface structure for this slipif @@ -476,6 +476,7 @@ slipif_process_rxqueue(struct netif *netif) } SYS_ARCH_PROTECT(old_level); } + SYS_ARCH_UNPROTECT(old_level); } /** Like slipif_rxbyte, but queues completed packets. @@ -514,6 +515,7 @@ slipif_rxbyte_enqueue(struct netif *netif, u8_t data) } /** + * @ingroup slipif * Process a received byte, completed packets are put on a queue that is * fed into IP through slipif_process_rxqueue(). * @@ -531,6 +533,7 @@ slipif_received_byte(struct netif *netif, u8_t data) } /** + * @ingroup slipif * Process multiple received byte, completed packets are put on a queue that is * fed into IP through slipif_process_rxqueue(). * diff --git a/Libraries/LwIP/src/netif/zepif.c b/Libraries/LwIP/src/netif/zepif.c new file mode 100644 index 0000000..b403303 --- /dev/null +++ b/Libraries/LwIP/src/netif/zepif.c @@ -0,0 +1,300 @@ +/** + * @file + * + * @defgroup zepif ZEP - ZigBee Encapsulation Protocol + * @ingroup netifs + * A netif implementing the ZigBee Encapsulation Protocol (ZEP). + * This is used to tunnel 6LowPAN over UDP. + * + * Usage (there must be a default netif before!): + * @code{.c} + * netif_add(&zep_netif, NULL, NULL, NULL, NULL, zepif_init, tcpip_6lowpan_input); + * netif_create_ip6_linklocal_address(&zep_netif, 1); + * netif_set_up(&zep_netif); + * netif_set_link_up(&zep_netif); + * @endcode + */ + +/* + * Copyright (c) 2018 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ + +#include "netif/zepif.h" + +#if LWIP_IPV6 && LWIP_UDP + +#include "netif/lowpan6.h" +#include "lwip/udp.h" +#include "lwip/timeouts.h" +#include + +/** Define this to 1 to loop back TX packets for testing */ +#ifndef ZEPIF_LOOPBACK +#define ZEPIF_LOOPBACK 0 +#endif + +#define ZEP_MAX_DATA_LEN 127 + +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct zep_hdr { + PACK_STRUCT_FLD_8(u8_t prot_id[2]); + PACK_STRUCT_FLD_8(u8_t prot_version); + PACK_STRUCT_FLD_8(u8_t type); + PACK_STRUCT_FLD_8(u8_t channel_id); + PACK_STRUCT_FIELD(u16_t device_id); + PACK_STRUCT_FLD_8(u8_t crc_mode); + PACK_STRUCT_FLD_8(u8_t unknown_1); + PACK_STRUCT_FIELD(u32_t timestamp[2]); + PACK_STRUCT_FIELD(u32_t seq_num); + PACK_STRUCT_FLD_8(u8_t unknown_2[10]); + PACK_STRUCT_FLD_8(u8_t len); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +struct zepif_state { + struct zepif_init init; + struct udp_pcb *pcb; + u32_t seqno; +}; + +static u8_t zep_lowpan_timer_running; + +/* Helper function that calls the 6LoWPAN timer and reschedules itself */ +static void +zep_lowpan_timer(void *arg) +{ + lowpan6_tmr(); + if (zep_lowpan_timer_running) { + sys_timeout(LOWPAN6_TMR_INTERVAL, zep_lowpan_timer, arg); + } +} + +/* Pass received pbufs into 6LowPAN netif */ +static void +zepif_udp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, + const ip_addr_t *addr, u16_t port) +{ + err_t err; + struct netif *netif_lowpan6 = (struct netif *)arg; + struct zep_hdr *zep; + + LWIP_ASSERT("arg != NULL", arg != NULL); + LWIP_ASSERT("pcb != NULL", pcb != NULL); + LWIP_UNUSED_ARG(pcb); /* for LWIP_NOASSERT */ + LWIP_UNUSED_ARG(addr); + LWIP_UNUSED_ARG(port); + if (p == NULL) { + return; + } + + /* Parse and hide the ZEP header */ + if (p->len < sizeof(struct zep_hdr)) { + /* need the zep_hdr in one piece */ + goto err_return; + } + zep = (struct zep_hdr *)p->payload; + if (zep->prot_id[0] != 'E') { + goto err_return; + } + if (zep->prot_id[1] != 'X') { + goto err_return; + } + if (zep->prot_version != 2) { + /* we only support this version for now */ + goto err_return; + } + if (zep->type != 1) { + goto err_return; + } + if (zep->crc_mode != 1) { + goto err_return; + } + if (zep->len != p->tot_len - sizeof(struct zep_hdr)) { + goto err_return; + } + /* everything seems to be OK, hide the ZEP header */ + if (pbuf_remove_header(p, sizeof(struct zep_hdr))) { + goto err_return; + } + /* TODO Check CRC? */ + /* remove CRC trailer */ + pbuf_realloc(p, p->tot_len - 2); + + /* Call into 6LoWPAN code. */ + err = netif_lowpan6->input(p, netif_lowpan6); + if (err == ERR_OK) { + return; + } +err_return: + pbuf_free(p); +} + +/* Send 6LoWPAN TX packets as UDP broadcast */ +static err_t +zepif_linkoutput(struct netif *netif, struct pbuf *p) +{ + err_t err; + struct pbuf *q; + struct zep_hdr *zep; + struct zepif_state *state; + + LWIP_ASSERT("invalid netif", netif != NULL); + LWIP_ASSERT("invalid pbuf", p != NULL); + + if (p->tot_len > ZEP_MAX_DATA_LEN) { + return ERR_VAL; + } + LWIP_ASSERT("TODO: support chained pbufs", p->next == NULL); + + state = (struct zepif_state *)netif->state; + LWIP_ASSERT("state->pcb != NULL", state->pcb != NULL); + + q = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct zep_hdr) + p->tot_len, PBUF_RAM); + if (q == NULL) { + return ERR_MEM; + } + zep = (struct zep_hdr *)q->payload; + memset(zep, 0, sizeof(struct zep_hdr)); + zep->prot_id[0] = 'E'; + zep->prot_id[1] = 'X'; + zep->prot_version = 2; + zep->type = 1; /* Data */ + zep->channel_id = 0; /* whatever */ + zep->device_id = lwip_htons(1); /* whatever */ + zep->crc_mode = 1; + zep->unknown_1 = 0xff; + zep->seq_num = lwip_htonl(state->seqno); + state->seqno++; + zep->len = (u8_t)p->tot_len; + + err = pbuf_take_at(q, p->payload, p->tot_len, sizeof(struct zep_hdr)); + if (err == ERR_OK) { +#if ZEPIF_LOOPBACK + zepif_udp_recv(netif, state->pcb, pbuf_clone(PBUF_RAW, PBUF_RAM, q), NULL, 0); +#endif + err = udp_sendto(state->pcb, q, state->init.zep_dst_ip_addr, state->init.zep_dst_udp_port); + } + pbuf_free(q); + + return err; +} + +/** + * @ingroup zepif + * Set up a raw 6LowPAN netif and surround it with input- and output + * functions for ZEP + */ +err_t +zepif_init(struct netif *netif) +{ + err_t err; + struct zepif_init *init_state = (struct zepif_init *)netif->state; + struct zepif_state *state = (struct zepif_state *)mem_malloc(sizeof(struct zepif_state)); + + LWIP_ASSERT("zepif needs an input callback", netif->input != NULL); + + if (state == NULL) { + return ERR_MEM; + } + memset(state, 0, sizeof(struct zepif_state)); + if (init_state != NULL) { + memcpy(&state->init, init_state, sizeof(struct zepif_init)); + } + if (state->init.zep_src_udp_port == 0) { + state->init.zep_src_udp_port = ZEPIF_DEFAULT_UDP_PORT; + } + if (state->init.zep_dst_udp_port == 0) { + state->init.zep_dst_udp_port = ZEPIF_DEFAULT_UDP_PORT; + } +#if LWIP_IPV4 + if (state->init.zep_dst_ip_addr == NULL) { + /* With IPv4 enabled, default to broadcasting packets if no address is set */ + state->init.zep_dst_ip_addr = IP_ADDR_BROADCAST; + } +#endif /* LWIP_IPV4 */ + + netif->state = NULL; + + state->pcb = udp_new_ip_type(IPADDR_TYPE_ANY); + if (state->pcb == NULL) { + err = ERR_MEM; + goto err_ret; + } + err = udp_bind(state->pcb, state->init.zep_src_ip_addr, state->init.zep_src_udp_port); + if (err != ERR_OK) { + goto err_ret; + } + if (state->init.zep_netif != NULL) { + udp_bind_netif(state->pcb, state->init.zep_netif); + } + LWIP_ASSERT("udp_bind(lowpan6_broadcast_pcb) failed", err == ERR_OK); + ip_set_option(state->pcb, SOF_BROADCAST); + udp_recv(state->pcb, zepif_udp_recv, netif); + + err = lowpan6_if_init(netif); + LWIP_ASSERT("lowpan6_if_init set a state", netif->state == NULL); + if (err == ERR_OK) { + netif->state = state; + netif->hwaddr_len = 6; + if (init_state != NULL) { + memcpy(netif->hwaddr, init_state->addr, 6); + } else { + u8_t i; + for (i = 0; i < 6; i++) { + netif->hwaddr[i] = i; + } + netif->hwaddr[0] &= 0xfc; + } + netif->linkoutput = zepif_linkoutput; + + if (!zep_lowpan_timer_running) { + sys_timeout(LOWPAN6_TMR_INTERVAL, zep_lowpan_timer, NULL); + zep_lowpan_timer_running = 1; + } + + return ERR_OK; + } + +err_ret: + if (state->pcb != NULL) { + udp_remove(state->pcb); + } + mem_free(state); + return err; +} + +#endif /* LWIP_IPV6 && LWIP_UDP */ diff --git a/Libraries/LwIP/st_readme.txt b/Libraries/LwIP/st_readme.txt index 09044db..06b3765 100755 --- a/Libraries/LwIP/st_readme.txt +++ b/Libraries/LwIP/st_readme.txt @@ -46,6 +46,18 @@ * ****************************************************************************** @endverbatim +### 15-March-2019 ### +======================== + + Upgrade to use LwIP V2.1.2 version + - For more details about new features and bug fixes please refer to CHANGELOG.txt and UPGRADING files + + sys_arch.c: + - Add new API sys_mbox_trypost_fromisr to post preallocated messages from an ISR to the tcpip thread + - Remove check on Flag LWIP_SOCKET_SET_ERRNO: this flag has been removed since LwIP 2.1.0 + +### 13-August-2018 ### +======================== + + Add support to CMSIS-RTOS V2 API + - update the system/OS/sys_arch.c and system/arch/sys_arch.h file with CMSIS-RTOS v2 API ### 10-November-2017 ### ======================== diff --git a/Libraries/LwIP/system/OS/sys_arch.c b/Libraries/LwIP/system/OS/sys_arch.c index 823b77e..a10e29f 100755 --- a/Libraries/LwIP/system/OS/sys_arch.c +++ b/Libraries/LwIP/system/OS/sys_arch.c @@ -41,7 +41,7 @@ #include "cmsis_os.h" -#if defined(LWIP_SOCKET_SET_ERRNO) && defined(LWIP_PROVIDE_ERRNO) +#if defined(LWIP_PROVIDE_ERRNO) int errno; #endif @@ -49,20 +49,23 @@ int errno; // Creates an empty mailbox. err_t sys_mbox_new(sys_mbox_t *mbox, int size) { +#if (osCMSIS < 0x20000U) osMessageQDef(QUEUE, size, void *); - *mbox = osMessageCreate(osMessageQ(QUEUE), NULL); - +#else + *mbox = osMessageQueueNew(size, sizeof(void *), NULL); +#endif #if SYS_STATS - ++lwip_stats.sys.mbox.used; - if (lwip_stats.sys.mbox.max < lwip_stats.sys.mbox.used) { - lwip_stats.sys.mbox.max = lwip_stats.sys.mbox.used; - } + ++lwip_stats.sys.mbox.used; + if(lwip_stats.sys.mbox.max < lwip_stats.sys.mbox.used) + { + lwip_stats.sys.mbox.max = lwip_stats.sys.mbox.used; + } #endif /* SYS_STATS */ - if (*mbox == NULL) - return ERR_MEM; - - return ERR_OK; + if(*mbox == NULL) + return ERR_MEM; + + return ERR_OK; } /*-----------------------------------------------------------------------------------*/ @@ -73,21 +76,26 @@ err_t sys_mbox_new(sys_mbox_t *mbox, int size) */ void sys_mbox_free(sys_mbox_t *mbox) { - if( osMessageWaiting(*mbox) ) - { - /* Line for breakpoint. Should never break here! */ - portNOP(); +#if (osCMSIS < 0x20000U) + if(osMessageWaiting(*mbox)) +#else + if(osMessageQueueGetCount(*mbox)) +#endif + { + /* Line for breakpoint. Should never break here! */ + portNOP(); #if SYS_STATS - lwip_stats.sys.mbox.err++; + lwip_stats.sys.mbox.err++; #endif /* SYS_STATS */ - - // TODO notify the user of failure. - } - - osMessageDelete(*mbox); + } +#if (osCMSIS < 0x20000U) + osMessageDelete(*mbox); +#else + osMessageQueueDelete(*mbox); +#endif #if SYS_STATS - --lwip_stats.sys.mbox.used; + --lwip_stats.sys.mbox.used; #endif /* SYS_STATS */ } @@ -95,7 +103,11 @@ void sys_mbox_free(sys_mbox_t *mbox) // Posts the "msg" to the mailbox. void sys_mbox_post(sys_mbox_t *mbox, void *data) { +#if (osCMSIS < 0x20000U) while(osMessagePut(*mbox, (uint32_t)data, osWaitForever) != osOK); +#else + while(osMessageQueuePut(*mbox, &data, 0, osWaitForever) != osOK); +#endif } @@ -103,23 +115,34 @@ void sys_mbox_post(sys_mbox_t *mbox, void *data) // Try to post the "msg" to the mailbox. err_t sys_mbox_trypost(sys_mbox_t *mbox, void *msg) { -err_t result; + err_t result; +#if (osCMSIS < 0x20000U) + if(osMessagePut(*mbox, (uint32_t)msg, 0) == osOK) +#else + if(osMessageQueuePut(*mbox, &msg, 0, 0) == osOK) +#endif + { + result = ERR_OK; + } + else + { + // could not post, queue must be full + result = ERR_MEM; - if ( osMessagePut(*mbox, (uint32_t)msg, 0) == osOK) - { - result = ERR_OK; - } - else { - // could not post, queue must be full - result = ERR_MEM; - #if SYS_STATS - lwip_stats.sys.mbox.err++; + lwip_stats.sys.mbox.err++; #endif /* SYS_STATS */ - - } + } - return result; + return result; +} + + +/*-----------------------------------------------------------------------------------*/ +// Try to post the "msg" to the mailbox. +err_t sys_mbox_trypost_fromisr(sys_mbox_t *mbox, void *msg) +{ + return sys_mbox_trypost(mbox, msg); } /*-----------------------------------------------------------------------------------*/ @@ -140,28 +163,45 @@ err_t result; */ u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout) { +#if (osCMSIS < 0x20000U) osEvent event; - uint32_t starttime = osKernelSysTick();; - + uint32_t starttime = osKernelSysTick(); +#else + osStatus_t status; + uint32_t starttime = osKernelGetTickCount(); +#endif if(timeout != 0) - { + { +#if (osCMSIS < 0x20000U) event = osMessageGet (*mbox, timeout); - + if(event.status == osEventMessage) { *msg = (void *)event.value.v; return (osKernelSysTick() - starttime); } +#else + status = osMessageQueueGet(*mbox, msg, 0, timeout); + if (status == osOK) + { + return (osKernelGetTickCount() - starttime); + } +#endif else { return SYS_ARCH_TIMEOUT; - } + } } else { +#if (osCMSIS < 0x20000U) event = osMessageGet (*mbox, osWaitForever); *msg = (void *)event.value.v; return (osKernelSysTick() - starttime); +#else + osMessageQueueGet(*mbox, msg, 0, osWaitForever ); + return (osKernelGetTickCount() - starttime); +#endif } } @@ -172,13 +212,18 @@ u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout) */ u32_t sys_arch_mbox_tryfetch(sys_mbox_t *mbox, void **msg) { +#if (osCMSIS < 0x20000U) osEvent event; - + event = osMessageGet (*mbox, 0); - + if(event.status == osEventMessage) { *msg = (void *)event.value.v; +#else + if (osMessageQueueGet(*mbox, msg, 0, 0) == osOK) + { +#endif return ERR_OK; } else @@ -187,49 +232,56 @@ u32_t sys_arch_mbox_tryfetch(sys_mbox_t *mbox, void **msg) } } /*----------------------------------------------------------------------------------*/ -int sys_mbox_valid(sys_mbox_t *mbox) -{ - if (*mbox == SYS_MBOX_NULL) +int sys_mbox_valid(sys_mbox_t *mbox) +{ + if (*mbox == SYS_MBOX_NULL) return 0; else return 1; -} -/*-----------------------------------------------------------------------------------*/ -void sys_mbox_set_invalid(sys_mbox_t *mbox) -{ - *mbox = SYS_MBOX_NULL; -} +} +/*-----------------------------------------------------------------------------------*/ +void sys_mbox_set_invalid(sys_mbox_t *mbox) +{ + *mbox = SYS_MBOX_NULL; +} /*-----------------------------------------------------------------------------------*/ // Creates a new semaphore. The "count" argument specifies // the initial state of the semaphore. err_t sys_sem_new(sys_sem_t *sem, u8_t count) { +#if (osCMSIS < 0x20000U) osSemaphoreDef(SEM); - *sem = osSemaphoreCreate (osSemaphore(SEM), 1); - +#else + *sem = osSemaphoreNew(UINT16_MAX, count, NULL); +#endif + if(*sem == NULL) { #if SYS_STATS - ++lwip_stats.sys.sem.err; -#endif /* SYS_STATS */ - return ERR_MEM; + ++lwip_stats.sys.sem.err; +#endif /* SYS_STATS */ + return ERR_MEM; } - - if(count == 0) // Means it can't be taken + + if(count == 0) // Means it can't be taken { - osSemaphoreWait(*sem,0); +#if (osCMSIS < 0x20000U) + osSemaphoreWait(*sem, 0); +#else + osSemaphoreAcquire(*sem, 0); +#endif } #if SYS_STATS - ++lwip_stats.sys.sem.used; - if (lwip_stats.sys.sem.max < lwip_stats.sys.sem.used) { - lwip_stats.sys.sem.max = lwip_stats.sys.sem.used; - } + ++lwip_stats.sys.sem.used; + if (lwip_stats.sys.sem.max < lwip_stats.sys.sem.used) { + lwip_stats.sys.sem.max = lwip_stats.sys.sem.used; + } #endif /* SYS_STATS */ - - return ERR_OK; + + return ERR_OK; } /*-----------------------------------------------------------------------------------*/ @@ -250,23 +302,37 @@ err_t sys_sem_new(sys_sem_t *sem, u8_t count) */ u32_t sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout) { +#if (osCMSIS < 0x20000U) uint32_t starttime = osKernelSysTick(); - +#else + uint32_t starttime = osKernelGetTickCount(); +#endif if(timeout != 0) - { + { +#if (osCMSIS < 0x20000U) if(osSemaphoreWait (*sem, timeout) == osOK) { return (osKernelSysTick() - starttime); +#else + if(osSemaphoreAcquire(*sem, timeout) == osOK) + { + return (osKernelGetTickCount() - starttime); +#endif } else { return SYS_ARCH_TIMEOUT; - } + } } else { +#if (osCMSIS < 0x20000U) while(osSemaphoreWait (*sem, osWaitForever) != osOK); return (osKernelSysTick() - starttime); +#else + while(osSemaphoreAcquire(*sem, osWaitForever) != osOK); + return (osKernelGetTickCount() - starttime); +#endif } } @@ -284,31 +350,39 @@ void sys_sem_free(sys_sem_t *sem) #if SYS_STATS --lwip_stats.sys.sem.used; #endif /* SYS_STATS */ - + osSemaphoreDelete(*sem); } /*-----------------------------------------------------------------------------------*/ -int sys_sem_valid(sys_sem_t *sem) +int sys_sem_valid(sys_sem_t *sem) { if (*sem == SYS_SEM_NULL) return 0; else - return 1; + return 1; } -/*-----------------------------------------------------------------------------------*/ -void sys_sem_set_invalid(sys_sem_t *sem) -{ - *sem = SYS_SEM_NULL; -} +/*-----------------------------------------------------------------------------------*/ +void sys_sem_set_invalid(sys_sem_t *sem) +{ + *sem = SYS_SEM_NULL; +} -/*-----------------------------------------------------------------------------------*/ +/*-----------------------------------------------------------------------------------*/ +#if (osCMSIS < 0x20000U) osMutexId lwip_sys_mutex; osMutexDef(lwip_sys_mutex); +#else +osMutexId_t lwip_sys_mutex; +#endif // Initialize sys arch void sys_init(void) { +#if (osCMSIS < 0x20000U) lwip_sys_mutex = osMutexCreate(osMutex(lwip_sys_mutex)); +#else + lwip_sys_mutex = osMutexNew(NULL); +#endif } /*-----------------------------------------------------------------------------------*/ /* Mutexes*/ @@ -317,21 +391,22 @@ void sys_init(void) #if LWIP_COMPAT_MUTEX == 0 /* Create a new mutex*/ err_t sys_mutex_new(sys_mutex_t *mutex) { - + +#if (osCMSIS < 0x20000U) osMutexDef(MUTEX); - *mutex = osMutexCreate(osMutex(MUTEX)); - - - //*mutex = xSemaphoreCreateMutex(); +#else + *mutex = osMutexNew(NULL); +#endif + if(*mutex == NULL) { #if SYS_STATS ++lwip_stats.sys.mutex.err; -#endif /* SYS_STATS */ +#endif /* SYS_STATS */ return ERR_MEM; } - + #if SYS_STATS ++lwip_stats.sys.mutex.used; if (lwip_stats.sys.mutex.max < lwip_stats.sys.mutex.used) { @@ -347,14 +422,18 @@ void sys_mutex_free(sys_mutex_t *mutex) #if SYS_STATS --lwip_stats.sys.mutex.used; #endif /* SYS_STATS */ - + osMutexDelete(*mutex); } /*-----------------------------------------------------------------------------------*/ /* Lock a mutex*/ void sys_mutex_lock(sys_mutex_t *mutex) { - osMutexWait (*mutex, osWaitForever); +#if (osCMSIS < 0x20000U) + osMutexWait(*mutex, osWaitForever); +#else + osMutexAcquire(*mutex, osWaitForever); +#endif } /*-----------------------------------------------------------------------------------*/ @@ -375,8 +454,17 @@ void sys_mutex_unlock(sys_mutex_t *mutex) */ sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread , void *arg, int stacksize, int prio) { +#if (osCMSIS < 0x20000U) const osThreadDef_t os_thread_def = { (char *)name, (os_pthread)thread, (osPriority)prio, 0, stacksize}; return osThreadCreate(&os_thread_def, arg); +#else + const osThreadAttr_t attributes = { + .name = name, + .stack_size = stacksize, + .priority = (osPriority_t)prio, + }; + return osThreadNew(thread, arg, &attributes); +#endif } /* @@ -397,7 +485,11 @@ sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread , void *arg, */ sys_prot_t sys_arch_protect(void) { +#if (osCMSIS < 0x20000U) osMutexWait(lwip_sys_mutex, osWaitForever); +#else + osMutexAcquire(lwip_sys_mutex, osWaitForever); +#endif return (sys_prot_t)1; } diff --git a/Libraries/LwIP/system/arch/sys_arch.h b/Libraries/LwIP/system/arch/sys_arch.h index 1f5a156..c0000fa 100755 --- a/Libraries/LwIP/system/arch/sys_arch.h +++ b/Libraries/LwIP/system/arch/sys_arch.h @@ -29,34 +29,44 @@ * Author: Adam Dunkels * */ -#ifndef __SYS_RTXC_H__ -#define __SYS_RTXC_H__ +#ifndef __SYS_ARCH_H__ +#define __SYS_ARCH_H__ + +#include "lwip/opt.h" + +#if (NO_SYS != 0) +#error "NO_SYS need to be set to 0 to use threaded API" +#endif #include "cmsis_os.h" +#ifdef __cplusplus +extern "C" { +#endif + +#if (osCMSIS < 0x20000U) + #define SYS_MBOX_NULL (osMessageQId)0 #define SYS_SEM_NULL (osSemaphoreId)0 -#define SYS_DEFAULT_THREAD_STACK_DEPTH configMINIMAL_STACK_SIZE typedef osSemaphoreId sys_sem_t; typedef osSemaphoreId sys_mutex_t; typedef osMessageQId sys_mbox_t; typedef osThreadId sys_thread_t; +#else -typedef struct _sys_arch_state_t -{ - // Task creation data. - char cTaskName[configMAX_TASK_NAME_LEN]; - unsigned short nStackDepth; - unsigned short nTaskCount; -} sys_arch_state_t; +#define SYS_MBOX_NULL (osMessageQueueId_t)0 +#define SYS_SEM_NULL (osSemaphoreId_t)0 +typedef osSemaphoreId_t sys_sem_t; +typedef osSemaphoreId_t sys_mutex_t; +typedef osMessageQueueId_t sys_mbox_t; +typedef osThreadId_t sys_thread_t; +#endif +#ifdef __cplusplus +} +#endif -//extern sys_arch_state_t s_sys_arch_state; - -//void sys_set_default_state(); -//void sys_set_state(signed char *pTaskName, unsigned short nStackSize); - -#endif /* __SYS_RTXC_H__ */ +#endif /* __SYS_ARCH_H__ */ diff --git a/Libraries/LwIP/test/fuzz/Makefile b/Libraries/LwIP/test/fuzz/Makefile index f1b8b22..1923d57 100755 --- a/Libraries/LwIP/test/fuzz/Makefile +++ b/Libraries/LwIP/test/fuzz/Makefile @@ -34,13 +34,14 @@ all compile: lwip_fuzz CC=afl-gcc LDFLAGS=-lm -CFLAGS=-O0 +# use 'make D=-DUSER_DEFINE' to pass a user define to gcc +CFLAGS=-O0 $(D) CONTRIBDIR=../../../lwip-contrib include $(CONTRIBDIR)/ports/unix/Common.mk clean: - rm -f *.o $(LWIPLIBCOMMON) lwip_fuzz *.s .depend* *.core core + rm -f *.o $(LWIPLIBCOMMON) $(APPLIB) lwip_fuzz *.s .depend* *.core core depend dep: .depend @@ -49,5 +50,5 @@ include .depend .depend: fuzz.c $(LWIPFILES) $(APPFILES) $(CCDEP) $(CFLAGS) -MM $^ > .depend || rm -f .depend -lwip_fuzz: .depend $(LWIPLIBCOMMON) fuzz.o - $(CC) $(CFLAGS) -o lwip_fuzz fuzz.o $(LWIPLIBCOMMON) $(LDFLAGS) +lwip_fuzz: .depend $(LWIPLIBCOMMON) $(APPLIB) fuzz.o + $(CC) $(CFLAGS) -o lwip_fuzz fuzz.o $(APPLIB) $(LWIPLIBCOMMON) $(LDFLAGS) diff --git a/Libraries/LwIP/test/fuzz/README b/Libraries/LwIP/test/fuzz/README index 2cefdec..4cf497f 100755 --- a/Libraries/LwIP/test/fuzz/README +++ b/Libraries/LwIP/test/fuzz/README @@ -10,6 +10,9 @@ the code and keeping track of which code is executed. Just running make will produce the test program. +Running make with parameter 'D=-DLWIP_FUZZ_MULTI_PACKET' will produce a binary +that parses the input data as multiple packets (experimental!). + Then run afl with: afl-fuzz -i inputs/ -o output ./lwip_fuzz diff --git a/Libraries/LwIP/test/fuzz/fuzz.c b/Libraries/LwIP/test/fuzz/fuzz.c index 9ef38d0..858665c 100755 --- a/Libraries/LwIP/test/fuzz/fuzz.c +++ b/Libraries/LwIP/test/fuzz/fuzz.c @@ -32,14 +32,31 @@ #include "lwip/init.h" #include "lwip/netif.h" +#include "lwip/dns.h" #include "netif/etharp.h" #if LWIP_IPV6 #include "lwip/ethip6.h" #include "lwip/nd6.h" #endif + +#include "lwip/apps/httpd.h" +#include "lwip/apps/snmp.h" +#include "lwip/apps/lwiperf.h" +#include "lwip/apps/mdns.h" + #include #include +/* This define enables multi packet processing. + * For this, the input is interpreted as 2 byte length + data + 2 byte length + data... + * #define LWIP_FUZZ_MULTI_PACKET +*/ +#ifdef LWIP_FUZZ_MULTI_PACKET +u8_t pktbuf[20000]; +#else +u8_t pktbuf[2000]; +#endif + /* no-op send function */ static err_t lwip_tx_func(struct netif *netif, struct pbuf *p) { @@ -56,7 +73,7 @@ static err_t testif_init(struct netif *netif) netif->linkoutput = lwip_tx_func; netif->mtu = 1500; netif->hwaddr_len = 6; - netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP; + netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP | NETIF_FLAG_IGMP; netif->hwaddr[0] = 0x00; netif->hwaddr[1] = 0x23; @@ -93,13 +110,40 @@ static void input_pkt(struct netif *netif, const u8_t *data, size_t len) } } +static void input_pkts(struct netif *netif, const u8_t *data, size_t len) +{ +#ifdef LWIP_FUZZ_MULTI_PACKET + const u16_t max_packet_size = 1514; + const u8_t *ptr = data; + size_t rem_len = len; + + while (rem_len > sizeof(u16_t)) { + u16_t frame_len; + memcpy(&frame_len, ptr, sizeof(u16_t)); + ptr += sizeof(u16_t); + rem_len -= sizeof(u16_t); + frame_len = htons(frame_len) & 0x7FF; + frame_len = LWIP_MIN(frame_len, max_packet_size); + if (frame_len > rem_len) { + frame_len = (u16_t)rem_len; + } + if (frame_len != 0) { + input_pkt(netif, ptr, frame_len); + } + ptr += frame_len; + rem_len -= frame_len; + } +#else /* LWIP_FUZZ_MULTI_PACKET */ + input_pkt(netif, data, len); +#endif /* LWIP_FUZZ_MULTI_PACKET */ +} + int main(int argc, char** argv) { struct netif net_test; ip4_addr_t addr; ip4_addr_t netmask; ip4_addr_t gw; - u8_t pktbuf[2000]; size_t len; lwip_init(); @@ -110,10 +154,19 @@ int main(int argc, char** argv) netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, ethernet_input); netif_set_up(&net_test); + netif_set_link_up(&net_test); #if LWIP_IPV6 nd6_tmr(); /* tick nd to join multicast groups */ #endif + dns_setserver(0, &net_test.gw); + + /* initialize apps */ + httpd_init(); + lwiperf_start_tcp_server_default(NULL, NULL); + mdns_resp_init(); + mdns_resp_add_netif(&net_test, "hostname", 255); + snmp_init(); if(argc > 1) { FILE* f; @@ -130,7 +183,7 @@ int main(int argc, char** argv) } else { len = fread(pktbuf, 1, sizeof(pktbuf), stdin); } - input_pkt(&net_test, pktbuf, len); + input_pkts(&net_test, pktbuf, len); return 0; } diff --git a/Libraries/LwIP/test/fuzz/lwipopts.h b/Libraries/LwIP/test/fuzz/lwipopts.h index 64921ea..a61df3f 100755 --- a/Libraries/LwIP/test/fuzz/lwipopts.h +++ b/Libraries/LwIP/test/fuzz/lwipopts.h @@ -42,8 +42,14 @@ #define IPV6_FRAG_COPYHEADER 1 #define LWIP_IPV6_DUP_DETECT_ATTEMPTS 0 -/* Enable DHCP to test it */ +/* Enable some protocols to test them */ #define LWIP_DHCP 1 +#define LWIP_AUTOIP 1 + +#define LWIP_IGMP 1 +#define LWIP_DNS 1 + +#define LWIP_ALTCP 1 /* Turn off checksum verification of fuzzed data */ #define CHECKSUM_CHECK_IP 0 @@ -56,13 +62,19 @@ #define MEM_SIZE 16000 #define TCP_SND_QUEUELEN 40 #define MEMP_NUM_TCP_SEG TCP_SND_QUEUELEN +#define TCP_OVERSIZE 1 #define TCP_SND_BUF (12 * TCP_MSS) #define TCP_WND (10 * TCP_MSS) #define LWIP_WND_SCALE 1 -#define TCP_RCV_SCALE 0 +#define TCP_RCV_SCALE 2 #define PBUF_POOL_SIZE 400 /* pbuf tests need ~200KByte */ /* Minimal changes to opt.h required for etharp unit tests: */ #define ETHARP_SUPPORT_STATIC_ENTRIES 1 +#define LWIP_NUM_NETIF_CLIENT_DATA 1 +#define LWIP_SNMP 1 +#define MIB2_STATS 1 +#define LWIP_MDNS_RESPONDER 1 + #endif /* LWIP_HDR_LWIPOPTS_H__ */ diff --git a/Libraries/LwIP/test/sockets/sockets_stresstest.c b/Libraries/LwIP/test/sockets/sockets_stresstest.c new file mode 100644 index 0000000..3ac553b --- /dev/null +++ b/Libraries/LwIP/test/sockets/sockets_stresstest.c @@ -0,0 +1,726 @@ +/** + * @file + * Sockets stresstest + * + * This file uses the lwIP socket API to do stress tests that should test the + * stability when used in many different situations, with many concurrent + * sockets making concurrent transfers in different manners. + * + * - test rely on loopback sockets for now, so netif drivers are not tested + * - all enabled functions shall be used + * - parallelism of the tests depend on enough resources being available + * (configure your lwipopts.h settings high enough) + * - test should also be able to run in a real target + * + * TODO: + * - full duplex + * - add asserts about internal socket/netconn/pcb state? + */ + + /* + * Copyright (c) 2017 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ + +#include "lwip/opt.h" +#include "sockets_stresstest.h" + +#include "lwip/sockets.h" +#include "lwip/sys.h" + +#include "lwip/mem.h" + +#include +#include + +#if LWIP_SOCKET && LWIP_IPV4 /* this uses IPv4 loopback sockets, currently */ + +#ifndef TEST_SOCKETS_STRESS +#define TEST_SOCKETS_STRESS LWIP_DBG_OFF +#endif + +#define TEST_TIME_SECONDS 10 +#define TEST_TXRX_BUFSIZE (TCP_MSS * 2) +#define TEST_MAX_RXWAIT_MS 50 +#define TEST_MAX_CONNECTIONS 50 + +#define TEST_SOCK_READABLE 0x01 +#define TEST_SOCK_WRITABLE 0x02 +#define TEST_SOCK_ERR 0x04 + +#define TEST_MODE_SELECT 0x01 +#define TEST_MODE_POLL 0x02 +#define TEST_MODE_NONBLOCKING 0x04 +#define TEST_MODE_WAIT 0x08 +#define TEST_MODE_RECVTIMEO 0x10 +#define TEST_MODE_SLEEP 0x20 + +static int sockets_stresstest_numthreads; + +struct test_settings { + struct sockaddr_storage addr; + int start_client; + int loop_cnt; +}; + +struct sockets_stresstest_fullduplex { + int s; + volatile int closed; +}; + +static void +fill_test_data(void *buf, size_t buf_len_bytes) +{ + u8_t *p = (u8_t*)buf; + u16_t i, chk; + + LWIP_ASSERT("buffer too short", buf_len_bytes >= 4); + LWIP_ASSERT("buffer too big", buf_len_bytes <= 0xFFFF); + /* store the total number of bytes */ + p[0] = (u8_t)(buf_len_bytes >> 8); + p[1] = (u8_t)buf_len_bytes; + + /* fill buffer with random */ + chk = 0; + for (i = 4; i < buf_len_bytes; i++) { + u8_t rnd = (u8_t)LWIP_RAND(); + p[i] = rnd; + chk += rnd; + } + /* store checksum */ + p[2] = (u8_t)(chk >> 8); + p[3] = (u8_t)chk; +} + +static size_t +check_test_data(const void *buf, size_t buf_len_bytes) +{ + u8_t *p = (u8_t*)buf; + u16_t i, chk, chk_rx, len_rx; + + LWIP_ASSERT("buffer too short", buf_len_bytes >= 4); + len_rx = (((u16_t)p[0]) << 8) | p[1]; + LWIP_ASSERT("len too short", len_rx >= 4); + if (len_rx > buf_len_bytes) { + /* not all data received in this segment */ + LWIP_DEBUGF(TEST_SOCKETS_STRESS | LWIP_DBG_TRACE, ("check-\n")); + return buf_len_bytes; + } + chk_rx = (((u16_t)p[2]) << 8) | p[3]; + /* calculate received checksum */ + chk = 0; + for (i = 4; i < len_rx; i++) { + chk += p[i]; + } + LWIP_ASSERT("invalid checksum", chk == chk_rx); + if (len_rx < buf_len_bytes) { + size_t data_left = buf_len_bytes - len_rx; + memmove(p, &p[len_rx], data_left); + return data_left; + } + /* if we come here, we received exactly one chunk + -> next offset is 0 */ + return 0; +} + +static size_t +recv_and_check_data_return_offset(int s, char *rxbuf, size_t rxbufsize, size_t rxoff, int *closed, const char *dbg) +{ + ssize_t ret; + + ret = lwip_read(s, &rxbuf[rxoff], rxbufsize - rxoff); + if (ret == 0) { + *closed = 1; + return rxoff; + } + *closed = 0; + LWIP_DEBUGF(TEST_SOCKETS_STRESS | LWIP_DBG_TRACE, ("%s %d rx %d\n", dbg, s, (int)ret)); + if (ret == -1) { + /* TODO: for this to work, 'errno' has to support multithreading... */ + int err = errno; + if (err == ENOTCONN) { + *closed = 1; + return 0; + } + LWIP_ASSERT("err == 0", err == 0); + } + LWIP_ASSERT("ret > 0", ret > 0); + return check_test_data(rxbuf, rxoff + ret); +} + +#if LWIP_SOCKET_SELECT +static int +sockets_stresstest_wait_readable_select(int s, int timeout_ms) +{ + int ret; + struct timeval tv; + fd_set fs_r; + fd_set fs_w; + fd_set fs_e; + + FD_ZERO(&fs_r); + FD_ZERO(&fs_w); + FD_ZERO(&fs_e); + + FD_SET(s, &fs_r); + FD_SET(s, &fs_e); + + tv.tv_sec = timeout_ms / 1000; + tv.tv_usec = (timeout_ms - (tv.tv_sec * 1000)) * 1000; + ret = lwip_select(s + 1, &fs_r, &fs_w, &fs_e, &tv); + LWIP_ASSERT("select error", ret >= 0); + if (ret) { + /* convert poll flags to our flags */ + ret = 0; + if (FD_ISSET(s, &fs_r)) { + ret |= TEST_SOCK_READABLE; + } + if (FD_ISSET(s, &fs_w)) { + ret |= TEST_SOCK_WRITABLE; + } + if (FD_ISSET(s, &fs_e)) { + ret |= TEST_SOCK_ERR; + } + return ret; + } + return 0; +} +#endif + +#if LWIP_SOCKET_POLL +static int +sockets_stresstest_wait_readable_poll(int s, int timeout_ms) +{ + int ret; + struct pollfd pfd; + + pfd.fd = s; + pfd.revents = 0; + pfd.events = POLLIN | POLLERR; + + ret = lwip_poll(&pfd, 1, timeout_ms); + if (ret) { + /* convert poll flags to our flags */ + ret = 0; + if (pfd.revents & POLLIN) { + ret |= TEST_SOCK_READABLE; + } + if (pfd.revents & POLLOUT) { + ret |= TEST_SOCK_WRITABLE; + } + if (pfd.revents & POLLERR) { + ret |= TEST_SOCK_ERR; + } + return ret; + } + return 0; +} +#endif + +#if LWIP_SO_RCVTIMEO +static int +sockets_stresstest_wait_readable_recvtimeo(int s, int timeout_ms) +{ + int ret; + char buf; +#if LWIP_SO_SNDRCVTIMEO_NONSTANDARD + int opt_on = timeout_ms; + int opt_off = 0; +#else + struct timeval opt_on, opt_off; + opt_on.tv_sec = timeout_ms / 1000; + opt_on.tv_usec = (timeout_ms - (opt_on.tv_sec * 1000)) * 1000; + opt_off.tv_sec = 0; + opt_off.tv_usec = 0; +#endif + + /* enable receive timeout */ + ret = lwip_setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, &opt_on, sizeof(opt_on)); + LWIP_ASSERT("setsockopt error", ret == 0); + + /* peek for one byte with timeout */ + ret = lwip_recv(s, &buf, 1, MSG_PEEK); + + /* disable receive timeout */ + ret = lwip_setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, &opt_off, sizeof(opt_off)); + LWIP_ASSERT("setsockopt error", ret == 0); + + if (ret == 1) { + return TEST_SOCK_READABLE; + } + if (ret == 0) { + return 0; + } + if (ret == -1) { + return TEST_SOCK_ERR; + } + LWIP_ASSERT("invalid return value", 0); + return TEST_SOCK_ERR; +} +#endif + +static int +sockets_stresstest_wait_readable_wait_peek(int s, int timeout_ms) +{ + int ret; + char buf; + + LWIP_UNUSED_ARG(timeout_ms); /* cannot time out here */ + + /* peek for one byte */ + ret = lwip_recv(s, &buf, 1, MSG_PEEK); + + if (ret == 1) { + return TEST_SOCK_READABLE; + } + if (ret == 0) { + return 0; + } + if (ret == -1) { + return TEST_SOCK_ERR; + } + LWIP_ASSERT("invalid return value", 0); + return TEST_SOCK_ERR; +} + +static int +sockets_stresstest_wait_readable_nonblock(int s, int timeout_ms) +{ + int ret; + char buf; + u32_t wait_until = sys_now() + timeout_ms; + + while(sys_now() < wait_until) { + /* peek for one byte */ + ret = lwip_recv(s, &buf, 1, MSG_PEEK | MSG_DONTWAIT); + + if (ret == 1) { + return TEST_SOCK_READABLE; + } + if (ret == -1) { + /* TODO: for this to work, 'errno' has to support multithreading... */ + int err = errno; + if (err != EWOULDBLOCK) { + return TEST_SOCK_ERR; + } + } + /* TODO: sleep? */ + } + return 0; +} + +static int sockets_stresstest_rand_mode(int allow_wait, int allow_rx) +{ + u32_t random_value = LWIP_RAND(); +#if LWIP_SOCKET_SELECT + if (random_value & TEST_MODE_SELECT) { + return TEST_MODE_SELECT; + } +#endif +#if LWIP_SOCKET_POLL + if (random_value & TEST_MODE_POLL) { + return TEST_MODE_POLL; + } +#endif + if (!allow_rx) { + return TEST_MODE_SLEEP; + } +#if LWIP_SO_RCVTIMEO + if (random_value & TEST_MODE_RECVTIMEO) { + return TEST_MODE_RECVTIMEO; + } +#endif + if (allow_wait) { + if (random_value & TEST_MODE_RECVTIMEO) { + return TEST_MODE_RECVTIMEO; + } + } + return TEST_MODE_NONBLOCKING; +} + +static int +sockets_stresstest_wait_readable(int mode, int s, int timeout_ms) +{ + switch(mode) + { +#if LWIP_SOCKET_SELECT + case TEST_MODE_SELECT: + return sockets_stresstest_wait_readable_select(s, timeout_ms); +#endif +#if LWIP_SOCKET_POLL + case TEST_MODE_POLL: + return sockets_stresstest_wait_readable_poll(s, timeout_ms); +#endif +#if LWIP_SO_RCVTIMEO + case TEST_MODE_RECVTIMEO: + return sockets_stresstest_wait_readable_recvtimeo(s, timeout_ms); +#endif + case TEST_MODE_WAIT: + return sockets_stresstest_wait_readable_wait_peek(s, timeout_ms); + case TEST_MODE_NONBLOCKING: + return sockets_stresstest_wait_readable_nonblock(s, timeout_ms); + case TEST_MODE_SLEEP: + { + sys_msleep(timeout_ms); + return 1; + } + default: + LWIP_ASSERT("invalid mode", 0); + break; + } + return 0; +} + +#if LWIP_NETCONN_FULLDUPLEX +static void +sockets_stresstest_conn_client_r(void *arg) +{ + struct sockets_stresstest_fullduplex *fd = (struct sockets_stresstest_fullduplex *)arg; + int s = fd->s; + size_t rxoff = 0; + char rxbuf[TEST_TXRX_BUFSIZE]; + + while (1) { + int closed; + if (fd->closed) { + break; + } + rxoff = recv_and_check_data_return_offset(s, rxbuf, sizeof(rxbuf), rxoff, &closed, "cli"); + if (fd->closed) { + break; + } + if (closed) { + lwip_close(s); + break; + } + } + + SYS_ARCH_DEC(sockets_stresstest_numthreads, 1); + LWIP_ASSERT("", sockets_stresstest_numthreads >= 0); +} +#endif + +static void +sockets_stresstest_conn_client(void *arg) +{ + struct sockaddr_storage addr; + struct sockaddr_in *addr_in; + int s, ret; + char txbuf[TEST_TXRX_BUFSIZE]; + char rxbuf[TEST_TXRX_BUFSIZE]; + size_t rxoff = 0; + u32_t max_time = sys_now() + (TEST_TIME_SECONDS * 1000); + int do_rx = 1; + struct sockets_stresstest_fullduplex *data = NULL; + + memcpy(&addr, arg, sizeof(addr)); + LWIP_ASSERT("", addr.ss_family == AF_INET); + addr_in = (struct sockaddr_in *)&addr; + addr_in->sin_addr.s_addr = inet_addr("127.0.0.1"); + + /* sleep a random time between 1 and 2 seconds */ + sys_msleep(1000 + (LWIP_RAND() % 1000)); + + /* connect to the server */ + s = lwip_socket(addr.ss_family, SOCK_STREAM, 0); + LWIP_ASSERT("s >= 0", s >= 0); + +#if LWIP_NETCONN_FULLDUPLEX + if (LWIP_RAND() & 1) { + sys_thread_t t; + data = (struct sockets_stresstest_fullduplex*)mem_malloc(sizeof(struct sockets_stresstest_fullduplex)); + LWIP_ASSERT("data != NULL", data != 0); + SYS_ARCH_INC(sockets_stresstest_numthreads, 1); + data->s = s; + data->closed = 0; + t = sys_thread_new("sockets_stresstest_conn_client_r", sockets_stresstest_conn_client_r, data, 0, 0); + LWIP_ASSERT("thread != NULL", t != 0); + do_rx = 0; + } +#endif + + /* @todo: nonblocking connect? */ + ret = lwip_connect(s, (struct sockaddr *)&addr, sizeof(struct sockaddr_storage)); + LWIP_ASSERT("ret == 0", ret == 0); + + while (sys_now() < max_time) { + int closed; + int mode = sockets_stresstest_rand_mode(0, do_rx); + int timeout_ms = LWIP_RAND() % TEST_MAX_RXWAIT_MS; + ret = sockets_stresstest_wait_readable(mode, s, timeout_ms); + if (ret) { + if (do_rx) { + /* read some */ + LWIP_ASSERT("readable", ret == TEST_SOCK_READABLE); + rxoff = recv_and_check_data_return_offset(s, rxbuf, sizeof(rxbuf), rxoff, &closed, "cli"); + LWIP_ASSERT("client got closed", !closed); + } + } else { + /* timeout, send some */ + size_t send_len = (LWIP_RAND() % (sizeof(txbuf) - 4)) + 4; + fill_test_data(txbuf, send_len); + LWIP_DEBUGF(TEST_SOCKETS_STRESS | LWIP_DBG_TRACE, ("cli %d tx %d\n", s, (int)send_len)); + ret = lwip_write(s, txbuf, send_len); + if (ret == -1) { + /* TODO: for this to work, 'errno' has to support multithreading... */ + int err = errno; + LWIP_ASSERT("err == 0", err == 0); + } + LWIP_ASSERT("ret == send_len", ret == (int)send_len); + } + } + if (data) { + data->closed = 1; + } + ret = lwip_close(s); + LWIP_ASSERT("ret == 0", ret == 0); + + SYS_ARCH_DEC(sockets_stresstest_numthreads, 1); + LWIP_ASSERT("", sockets_stresstest_numthreads >= 0); +} + +static void +sockets_stresstest_conn_server(void *arg) +{ + int s, ret; + char txbuf[TEST_TXRX_BUFSIZE]; + char rxbuf[TEST_TXRX_BUFSIZE]; + size_t rxoff = 0; + + s = (int)arg; + + while (1) { + int closed; + int mode = sockets_stresstest_rand_mode(1, 1); + int timeout_ms = LWIP_RAND() % TEST_MAX_RXWAIT_MS; + ret = sockets_stresstest_wait_readable(mode, s, timeout_ms); + if (ret) { + if (ret & TEST_SOCK_ERR) { + /* closed? */ + break; + } + /* read some */ + LWIP_ASSERT("readable", ret == TEST_SOCK_READABLE); + rxoff = recv_and_check_data_return_offset(s, rxbuf, sizeof(rxbuf), rxoff, &closed, "srv"); + if (closed) { + break; + } + } else { + /* timeout, send some */ + size_t send_len = (LWIP_RAND() % (sizeof(txbuf) - 4)) + 4; + fill_test_data(txbuf, send_len); + LWIP_DEBUGF(TEST_SOCKETS_STRESS | LWIP_DBG_TRACE, ("srv %d tx %d\n", s, (int)send_len)); + ret = lwip_write(s, txbuf, send_len); + if (ret == -1) { + /* TODO: for this to work, 'errno' has to support multithreading... */ + int err = errno; + if (err == ECONNRESET) { + break; + } + if (err == ENOTCONN) { + break; + } + LWIP_ASSERT("unknown error", 0); + } + LWIP_ASSERT("ret == send_len", ret == (int)send_len); + } + } + ret = lwip_close(s); + LWIP_ASSERT("ret == 0", ret == 0); + + SYS_ARCH_DEC(sockets_stresstest_numthreads, 1); + LWIP_ASSERT("", sockets_stresstest_numthreads >= 0); +} + +static int +sockets_stresstest_start_clients(const struct sockaddr_storage *remote_addr) +{ + /* limit the number of connections */ + const int max_connections = LWIP_MIN(TEST_MAX_CONNECTIONS, MEMP_NUM_TCP_PCB/3); + int i; + + for (i = 0; i < max_connections; i++) { + sys_thread_t t; + SYS_ARCH_INC(sockets_stresstest_numthreads, 1); + t = sys_thread_new("sockets_stresstest_conn_client", sockets_stresstest_conn_client, (void*)remote_addr, 0, 0); + LWIP_ASSERT("thread != NULL", t != 0); + } + return max_connections; +} + +static void +sockets_stresstest_listener(void *arg) +{ + int slisten; + int ret; + struct sockaddr_storage addr; + socklen_t addr_len; + struct test_settings *settings = (struct test_settings *)arg; + int num_clients, num_servers = 0; + + slisten = lwip_socket(AF_INET, SOCK_STREAM, 0); + LWIP_ASSERT("slisten >= 0", slisten >= 0); + + memcpy(&addr, &settings->addr, sizeof(struct sockaddr_storage)); + ret = lwip_bind(slisten, (struct sockaddr *)&addr, sizeof(addr)); + LWIP_ASSERT("ret == 0", ret == 0); + + ret = lwip_listen(slisten, 0); + LWIP_ASSERT("ret == 0", ret == 0); + + addr_len = sizeof(addr); + ret = lwip_getsockname(slisten, (struct sockaddr *)&addr, &addr_len); + LWIP_ASSERT("ret == 0", ret == 0); + + num_clients = sockets_stresstest_start_clients(&addr); + + while (num_servers < num_clients) { + struct sockaddr_storage aclient; + socklen_t aclient_len = sizeof(aclient); + int sclient = lwip_accept(slisten, (struct sockaddr *)&aclient, &aclient_len); +#if 1 + /* using server threads */ + { + sys_thread_t t; + SYS_ARCH_INC(sockets_stresstest_numthreads, 1); + num_servers++; + t = sys_thread_new("sockets_stresstest_conn_server", sockets_stresstest_conn_server, (void*)sclient, 0, 0); + LWIP_ASSERT("thread != NULL", t != 0); + } +#else + /* using server select */ +#endif + } + LWIP_DEBUGF(TEST_SOCKETS_STRESS | LWIP_DBG_STATE, ("sockets_stresstest_listener: all %d connections established\n", num_clients)); + + /* accepted all clients */ + while (sockets_stresstest_numthreads > 0) { + sys_msleep(1); + } + + ret = lwip_close(slisten); + LWIP_ASSERT("ret == 0", ret == 0); + + LWIP_DEBUGF(TEST_SOCKETS_STRESS |LWIP_DBG_STATE, ("sockets_stresstest_listener: done\n")); +} + +static void +sockets_stresstest_listener_loop(void *arg) +{ + int i; + struct test_settings *settings = (struct test_settings *)arg; + + if (settings->loop_cnt) { + for (i = 0; i < settings->loop_cnt; i++) { + LWIP_DEBUGF(TEST_SOCKETS_STRESS |LWIP_DBG_STATE, ("sockets_stresstest_listener_loop: iteration %d\n", i)); + sockets_stresstest_listener(arg); + sys_msleep(2); + } + LWIP_DEBUGF(TEST_SOCKETS_STRESS |LWIP_DBG_STATE, ("sockets_stresstest_listener_loop: done\n")); + } else { + for (i = 0; ; i++) { + LWIP_DEBUGF(TEST_SOCKETS_STRESS |LWIP_DBG_STATE, ("sockets_stresstest_listener_loop: iteration %d\n", i)); + sockets_stresstest_listener(arg); + sys_msleep(2); + } + } +} + +void +sockets_stresstest_init_loopback(int addr_family) +{ + sys_thread_t t; + struct test_settings *settings = (struct test_settings *)mem_malloc(sizeof(struct test_settings)); + + LWIP_ASSERT("OOM", settings != NULL); + memset(settings, 0, sizeof(struct test_settings)); +#if LWIP_IPV4 && LWIP_IPV6 + LWIP_ASSERT("invalid addr_family", (addr_family == AF_INET) || (addr_family == AF_INET6)); +#endif + settings->addr.ss_family = (sa_family_t)addr_family; + LWIP_UNUSED_ARG(addr_family); + settings->start_client = 1; + + t = sys_thread_new("sockets_stresstest_listener_loop", sockets_stresstest_listener_loop, settings, 0, 0); + LWIP_ASSERT("thread != NULL", t != 0); +} + +void +sockets_stresstest_init_server(int addr_family, u16_t server_port) +{ + sys_thread_t t; + struct test_settings *settings = (struct test_settings *)mem_malloc(sizeof(struct test_settings)); + + LWIP_ASSERT("OOM", settings != NULL); + memset(settings, 0, sizeof(struct test_settings)); +#if LWIP_IPV4 && LWIP_IPV6 + LWIP_ASSERT("invalid addr_family", (addr_family == AF_INET) || (addr_family == AF_INET6)); + settings->addr.ss_family = (sa_family_t)addr_family; +#endif + LWIP_UNUSED_ARG(addr_family); + ((struct sockaddr_in *)(&settings->addr))->sin_port = server_port; + + t = sys_thread_new("sockets_stresstest_listener", sockets_stresstest_listener, settings, 0, 0); + LWIP_ASSERT("thread != NULL", t != 0); +} + +void +sockets_stresstest_init_client(const char *remote_ip, u16_t remote_port) +{ +#if LWIP_IPV4 + ip4_addr_t ip4; +#endif +#if LWIP_IPV6 + ip6_addr_t ip6; +#endif + struct sockaddr_storage *addr = (struct sockaddr_storage *)mem_malloc(sizeof(struct sockaddr_storage)); + + LWIP_ASSERT("OOM", addr != NULL); + memset(addr, 0, sizeof(struct test_settings)); +#if LWIP_IPV4 + if (ip4addr_aton(remote_ip, &ip4)) { + addr->ss_family = AF_INET; + ((struct sockaddr_in *)addr)->sin_addr.s_addr = ip4_addr_get_u32(&ip4); + } +#endif +#if LWIP_IPV4 && LWIP_IPV6 + else +#endif +#if LWIP_IPV6 + if (ip6addr_aton(remote_ip, &ip6)) { + addr->ss_family = AF_INET6; + /* todo: copy ipv6 address */ + } +#endif + ((struct sockaddr_in *)addr)->sin_port = remote_port; + sockets_stresstest_start_clients(addr); +} + +#endif /* LWIP_SOCKET && LWIP_IPV4 */ diff --git a/Libraries/LwIP/test/sockets/sockets_stresstest.h b/Libraries/LwIP/test/sockets/sockets_stresstest.h new file mode 100644 index 0000000..178e604 --- /dev/null +++ b/Libraries/LwIP/test/sockets/sockets_stresstest.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2017 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ + +#ifndef LWIP_HDR_TEST_SOCKETS_STRESSTEST +#define LWIP_HDR_TEST_SOCKETS_STRESSTEST + +void sockets_stresstest_init_loopback(int addr_family); +void sockets_stresstest_init_server(int addr_family, u16_t server_port); +void sockets_stresstest_init_client(const char *remote_ip, u16_t remote_port); + +#endif /* LWIP_HDR_TEST_SOCKETS_STRESSTEST */ diff --git a/Libraries/LwIP/test/unit/Filelists.cmake b/Libraries/LwIP/test/unit/Filelists.cmake new file mode 100644 index 0000000..e1f40bc --- /dev/null +++ b/Libraries/LwIP/test/unit/Filelists.cmake @@ -0,0 +1,31 @@ +# This file is indended to be included in end-user CMakeLists.txt +# include(/path/to/Filelists.cmake) +# It assumes the variable LWIP_DIR is defined pointing to the +# root path of lwIP sources. +# +# This file is NOT designed (on purpose) to be used as cmake +# subdir via add_subdirectory() +# The intention is to provide greater flexibility to users to +# create their own targets using the *_SRCS variables. + +set(LWIP_TESTDIR ${LWIP_DIR}/test/unit) +set(LWIP_TESTFILES + ${LWIP_TESTDIR}/lwip_unittests.c + ${LWIP_TESTDIR}/api/test_sockets.c + ${LWIP_TESTDIR}/arch/sys_arch.c + ${LWIP_TESTDIR}/core/test_def.c + ${LWIP_TESTDIR}/core/test_mem.c + ${LWIP_TESTDIR}/core/test_netif.c + ${LWIP_TESTDIR}/core/test_pbuf.c + ${LWIP_TESTDIR}/core/test_timers.c + ${LWIP_TESTDIR}/dhcp/test_dhcp.c + ${LWIP_TESTDIR}/etharp/test_etharp.c + ${LWIP_TESTDIR}/ip4/test_ip4.c + ${LWIP_TESTDIR}/ip6/test_ip6.c + ${LWIP_TESTDIR}/mdns/test_mdns.c + ${LWIP_TESTDIR}/mqtt/test_mqtt.c + ${LWIP_TESTDIR}/tcp/tcp_helper.c + ${LWIP_TESTDIR}/tcp/test_tcp_oos.c + ${LWIP_TESTDIR}/tcp/test_tcp.c + ${LWIP_TESTDIR}/udp/test_udp.c +) diff --git a/Libraries/LwIP/test/unit/Filelists.mk b/Libraries/LwIP/test/unit/Filelists.mk new file mode 100644 index 0000000..4b77078 --- /dev/null +++ b/Libraries/LwIP/test/unit/Filelists.mk @@ -0,0 +1,51 @@ +# +# Copyright (c) 2001, 2002 Swedish Institute of Computer Science. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without modification, +# are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# 2. 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. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. +# +# This file is part of the lwIP TCP/IP stack. +# +# Author: Adam Dunkels +# + +TESTDIR=$(LWIPDIR)/../test/unit +TESTFILES=$(TESTDIR)/lwip_unittests.c \ + $(TESTDIR)/api/test_sockets.c \ + $(TESTDIR)/arch/sys_arch.c \ + $(TESTDIR)/core/test_def.c \ + $(TESTDIR)/core/test_mem.c \ + $(TESTDIR)/core/test_netif.c \ + $(TESTDIR)/core/test_pbuf.c \ + $(TESTDIR)/core/test_timers.c \ + $(TESTDIR)/dhcp/test_dhcp.c \ + $(TESTDIR)/etharp/test_etharp.c \ + $(TESTDIR)/ip4/test_ip4.c \ + $(TESTDIR)/ip6/test_ip6.c \ + $(TESTDIR)/mdns/test_mdns.c \ + $(TESTDIR)/mqtt/test_mqtt.c \ + $(TESTDIR)/tcp/tcp_helper.c \ + $(TESTDIR)/tcp/test_tcp_oos.c \ + $(TESTDIR)/tcp/test_tcp.c \ + $(TESTDIR)/udp/test_udp.c + diff --git a/Libraries/LwIP/test/unit/api/test_sockets.c b/Libraries/LwIP/test/unit/api/test_sockets.c new file mode 100644 index 0000000..472fa48 --- /dev/null +++ b/Libraries/LwIP/test/unit/api/test_sockets.c @@ -0,0 +1,852 @@ +#include "test_sockets.h" + +#include "lwip/mem.h" +#include "lwip/opt.h" +#include "lwip/sockets.h" +#include "lwip/priv/sockets_priv.h" +#include "lwip/stats.h" + +#include "lwip/tcpip.h" +#include "lwip/priv/tcp_priv.h" +#include "lwip/api.h" + + +static int +test_sockets_get_used_count(void) +{ + int used = 0; + int i; + + for (i = 0; i < NUM_SOCKETS; i++) { + struct lwip_sock* s = lwip_socket_dbg_get_socket(i); + if (s != NULL) { + if (s->fd_used) { + used++; + } + } + } + return used; +} + + +/* Setups/teardown functions */ + +static void +sockets_setup(void) +{ + /* expect full free heap */ + lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); +} + +static void +sockets_teardown(void) +{ + fail_unless(test_sockets_get_used_count() == 0); + /* poll until all memory is released... */ + tcpip_thread_poll_one(); + while (tcp_tw_pcbs) { + tcp_abort(tcp_tw_pcbs); + tcpip_thread_poll_one(); + } + tcpip_thread_poll_one(); + /* ensure full free heap */ + lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); +} + +#ifndef NUM_SOCKETS +#define NUM_SOCKETS MEMP_NUM_NETCONN +#endif + +#if LWIP_SOCKET +static int +test_sockets_alloc_socket_nonblocking(int domain, int type) +{ + int s = lwip_socket(domain, type, 0); + if (s >= 0) { + int ret = lwip_fcntl(s, F_SETFL, O_NONBLOCK); + fail_unless(ret == 0); + } + return s; +} + +/* Verify basic sockets functionality + */ +START_TEST(test_sockets_basics) +{ + int s, i, ret; + int s2[NUM_SOCKETS]; + LWIP_UNUSED_ARG(_i); + + s = lwip_socket(AF_INET, SOCK_STREAM, 0); + fail_unless(s >= 0); + lwip_close(s); + + for (i = 0; i < NUM_SOCKETS; i++) { + s2[i] = lwip_socket(AF_INET, SOCK_STREAM, 0); + fail_unless(s2[i] >= 0); + } + + /* all sockets used, now it should fail */ + s = lwip_socket(AF_INET, SOCK_STREAM, 0); + fail_unless(s == -1); + /* close one socket */ + ret = lwip_close(s2[0]); + fail_unless(ret == 0); + /* now it should succeed */ + s2[0] = lwip_socket(AF_INET, SOCK_STREAM, 0); + fail_unless(s2[0] >= 0); + + /* close all sockets */ + for (i = 0; i < NUM_SOCKETS; i++) { + ret = lwip_close(s2[i]); + fail_unless(ret == 0); + } +} +END_TEST + +static void test_sockets_allfunctions_basic_domain(int domain) +{ + int s, s2, s3, ret; + struct sockaddr_storage addr, addr2; + socklen_t addrlen, addr2len; + char buf[4]; + /* listen socket */ + s = lwip_socket(domain, SOCK_STREAM, 0); + fail_unless(s >= 0); + + ret = lwip_listen(s, 0); + fail_unless(ret == 0); + + addrlen = sizeof(addr); + ret = lwip_getsockname(s, (struct sockaddr*)&addr, &addrlen); + fail_unless(ret == 0); + + s2 = test_sockets_alloc_socket_nonblocking(domain, SOCK_STREAM); + fail_unless(s2 >= 0); + /* nonblocking connect s2 to s (but use loopback address) */ + if (domain == AF_INET) { +#if LWIP_IPV4 + struct sockaddr_in *addr4 = (struct sockaddr_in *)&addr; + addr4->sin_addr.s_addr = PP_HTONL(INADDR_LOOPBACK); +#endif + } else { +#if LWIP_IPV6 + struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)&addr; + struct in6_addr lo6 = IN6ADDR_LOOPBACK_INIT; + addr6->sin6_addr = lo6; +#endif + } + ret = lwip_connect(s2, (struct sockaddr*)&addr, addrlen); + fail_unless(ret == -1); + fail_unless(errno == EINPROGRESS); + ret = lwip_connect(s2, (struct sockaddr*)&addr, addrlen); + fail_unless(ret == -1); + fail_unless(errno == EALREADY); + + while(tcpip_thread_poll_one()); + + s3 = lwip_accept(s, (struct sockaddr*)&addr2, &addr2len); + fail_unless(s3 >= 0); + + ret = lwip_connect(s2, (struct sockaddr*)&addr, addrlen); + fail_unless(ret == -1); + fail_unless(errno == EISCONN); + + /* write from server to client */ + ret = write(s3, "test", 4); + fail_unless(ret == 4); + + ret = lwip_shutdown(s3, SHUT_WR); + fail_unless(ret == 0); + + while(tcpip_thread_poll_one()); + + ret = lwip_recv(s2, buf, 3, MSG_PEEK); + fail_unless(ret == 3); + + ret = lwip_recv(s2, buf, 3, MSG_PEEK); + fail_unless(ret == 3); + + ret = lwip_read(s2, buf, 4); + fail_unless(ret == 4); + + ret = lwip_read(s2, buf, 1); + fail_unless(ret == 0); + + ret = lwip_read(s2, buf, 1); + fail_unless(ret == -1); + + ret = lwip_write(s2, "foo", 3); + fail_unless(ret == 3); + + ret = lwip_close(s2); + fail_unless(ret == 0); + + while(tcpip_thread_poll_one()); + + /* read one byte more than available to check handling FIN */ + ret = lwip_read(s3, buf, 4); + fail_unless(ret == 3); + + ret = lwip_read(s3, buf, 1); + fail_unless(ret == 0); + + ret = lwip_read(s3, buf, 1); + fail_unless(ret == -1); + + while(tcpip_thread_poll_one()); + + ret = lwip_close(s); + fail_unless(ret == 0); + ret = lwip_close(s3); + fail_unless(ret == 0); +} + +/* Try to step through all sockets functions once... + */ +START_TEST(test_sockets_allfunctions_basic) +{ + LWIP_UNUSED_ARG(_i); +#if LWIP_IPV4 + test_sockets_allfunctions_basic_domain(AF_INET); +#endif +#if LWIP_IPV6 + test_sockets_allfunctions_basic_domain(AF_INET6); +#endif +} +END_TEST + +static void test_sockets_init_loopback_addr(int domain, struct sockaddr_storage *addr_st, socklen_t *sz) +{ + memset(addr_st, 0, sizeof(*addr_st)); + switch(domain) { +#if LWIP_IPV6 + case AF_INET6: { + struct sockaddr_in6 *addr = (struct sockaddr_in6*)addr_st; + struct in6_addr lo6 = IN6ADDR_LOOPBACK_INIT; + addr->sin6_family = AF_INET6; + addr->sin6_port = 0; /* use ephemeral port */ + addr->sin6_addr = lo6; + *sz = sizeof(*addr); + } + break; +#endif /* LWIP_IPV6 */ +#if LWIP_IPV4 + case AF_INET: { + struct sockaddr_in *addr = (struct sockaddr_in*)addr_st; + addr->sin_family = AF_INET; + addr->sin_port = 0; /* use ephemeral port */ + addr->sin_addr.s_addr = PP_HTONL(INADDR_LOOPBACK); + *sz = sizeof(*addr); + } + break; +#endif /* LWIP_IPV4 */ + default: + *sz = 0; + fail(); + break; + } +} + +static void test_sockets_msgapi_update_iovs(struct msghdr *msg, size_t bytes) +{ + int i; + + /* note: this modifies the underyling iov_base and iov_len for a partial + read for an individual vector. This updates the msg->msg_iov pointer + to skip fully consumed vecotrs */ + + /* process fully consumed vectors */ + for (i = 0; i < msg->msg_iovlen; i++) { + if (msg->msg_iov[i].iov_len <= bytes) { + /* reduce bytes by amount of this vector */ + bytes -= msg->msg_iov[i].iov_len; + } else { + break; /* iov not fully consumed */ + } + } + + /* slide down over fully consumed vectors */ + msg->msg_iov = &msg->msg_iov[i]; + msg->msg_iovlen -= i; + + /* update new first vector with any remaining amount */ + msg->msg_iov[0].iov_base = ((u8_t *)msg->msg_iov[0].iov_base + bytes); + msg->msg_iov[0].iov_len -= bytes; +} + +static void test_sockets_msgapi_tcp(int domain) +{ + #define BUF_SZ (TCP_SND_BUF/4) + #define TOTAL_DATA_SZ (BUF_SZ*8) /* ~(TCP_SND_BUF*2) that accounts for integer rounding */ + #define NEED_TRAILER (BUF_SZ % 4 != 0) + int listnr, s1, s2, i, ret, opt; + int bytes_written, bytes_read; + struct sockaddr_storage addr_storage; + socklen_t addr_size; + struct iovec siovs[8]; + struct msghdr smsg; + u8_t * snd_buf; + struct iovec riovs[5]; + struct iovec riovs_tmp[5]; + struct msghdr rmsg; + u8_t * rcv_buf; + int rcv_off; + int rcv_trailer = 0; + u8_t val; + + test_sockets_init_loopback_addr(domain, &addr_storage, &addr_size); + + listnr = test_sockets_alloc_socket_nonblocking(domain, SOCK_STREAM); + fail_unless(listnr >= 0); + s1 = test_sockets_alloc_socket_nonblocking(domain, SOCK_STREAM); + fail_unless(s1 >= 0); + + /* setup a listener socket on loopback with ephemeral port */ + ret = lwip_bind(listnr, (struct sockaddr*)&addr_storage, addr_size); + fail_unless(ret == 0); + ret = lwip_listen(listnr, 0); + fail_unless(ret == 0); + + /* update address with ephemeral port */ + ret = lwip_getsockname(listnr, (struct sockaddr*)&addr_storage, &addr_size); + fail_unless(ret == 0); + + /* connect, won't complete until we accept it */ + ret = lwip_connect(s1, (struct sockaddr*)&addr_storage, addr_size); + fail_unless(ret == -1); + fail_unless(errno == EINPROGRESS); + + while (tcpip_thread_poll_one()); + + /* accept, creating the other side of the connection */ + s2 = lwip_accept(listnr, NULL, NULL); + fail_unless(s2 >= 0); + + /* double check s1 is connected */ + ret = lwip_connect(s1, (struct sockaddr*)&addr_storage, addr_size); + fail_unless(ret == -1); + fail_unless(errno == EISCONN); + + /* set s2 to non-blocking, not inherited from listener */ + opt = lwip_fcntl(s2, F_GETFL, 0); + fail_unless(opt == 6); + opt = O_NONBLOCK; + ret = lwip_fcntl(s2, F_SETFL, opt); + fail_unless(ret == 0); + + /* we are done with listener, close it */ + ret = lwip_close(listnr); + fail_unless(ret == 0); + + /* allocate a buffer for a stream of incrementing hex (0x00..0xFF) which we will use + to create an input vector set that is larger than the TCP's send buffer. This will + force execution of the partial IO vector send case */ + snd_buf = (u8_t*)mem_malloc(BUF_SZ); + val = 0x00; + fail_unless(snd_buf != NULL); + for (i = 0; i < BUF_SZ; i++,val++) { + snd_buf[i] = val; + } + + /* send the buffer 8 times in one message, equating to TOTAL_DATA_SZ */ + for (i = 0; i < 8; i++) { + siovs[i].iov_base = snd_buf; + siovs[i].iov_len = BUF_SZ; + } + + /* allocate a receive buffer, same size as snd_buf for easy verification */ + rcv_buf = (u8_t*)mem_calloc(1, BUF_SZ); + fail_unless(rcv_buf != NULL); + /* split across iovs */ + for (i = 0; i < 4; i++) { + riovs[i].iov_base = &rcv_buf[i*(BUF_SZ/4)]; + riovs[i].iov_len = BUF_SZ/4; + } + /* handling trailing bytes if buffer doesn't evenly divide by 4 */ +#if NEED_TRAILER + if ((BUF_SZ % 4) != 0) { + riovs[5].iov_base = &rcv_buf[4*(BUF_SZ/4)]; + riovs[5].iov_len = BUF_SZ - (4*(BUF_SZ/4)); + rcv_trailer = 1; + } +#endif /* NEED_TRAILER */ + + /* we use a copy of riovs since we'll be modifying base and len during + receiving. This gives us an easy way to reset the iovs for next recvmsg */ + memcpy(riovs_tmp, riovs, sizeof(riovs)); + + memset(&smsg, 0, sizeof(smsg)); + smsg.msg_iov = siovs; + smsg.msg_iovlen = 8; + + memset(&rmsg, 0, sizeof(rmsg)); + rmsg.msg_iov = riovs_tmp; + rmsg.msg_iovlen = (rcv_trailer ? 5 : 4); + + bytes_written = 0; + bytes_read = 0; + rcv_off = 0; + + while (bytes_written < TOTAL_DATA_SZ && (bytes_read < TOTAL_DATA_SZ)) { + /* send data */ + if (bytes_written < TOTAL_DATA_SZ) { + ret = lwip_sendmsg(s1, &smsg, 0); + /* note: since we always receive after sending, there will be open + space in the send buffer */ + fail_unless(ret > 0); + + bytes_written += ret; + if (bytes_written < TOTAL_DATA_SZ) { + test_sockets_msgapi_update_iovs(&smsg, (size_t)ret); + } + } + + while (tcpip_thread_poll_one()); + + /* receive and verify data */ + do { + if (bytes_read < TOTAL_DATA_SZ) { + ret = lwip_recvmsg(s2, &rmsg, 0); + fail_unless(ret > 0 || (ret == -1 && errno == EWOULDBLOCK)); + + if (ret > 0) { + rcv_off += ret; + /* we have received a full buffer */ + if (rcv_off == BUF_SZ) { + /* note: since iovs are just pointers, compare underlying buf */ + fail_unless(!memcmp(snd_buf, rcv_buf, BUF_SZ)); + bytes_read += BUF_SZ; + /* reset receive state for next buffer */ + rcv_off = 0; + memset(rcv_buf, 0, BUF_SZ); + memcpy(riovs_tmp, riovs, sizeof(riovs)); + rmsg.msg_iov = riovs_tmp; + rmsg.msg_iovlen = (rcv_trailer ? 5 : 4); + } else { /* partial read */ + test_sockets_msgapi_update_iovs(&rmsg, (size_t)ret); + } + } + } else { + break; + } + } while(ret > 0); + } + + ret = lwip_close(s1); + fail_unless(ret == 0); + ret = lwip_close(s2); + fail_unless(ret == 0); + mem_free(snd_buf); + mem_free(rcv_buf); +} + +static void test_sockets_msgapi_udp_send_recv_loop(int s, struct msghdr *smsg, struct msghdr *rmsg) +{ + int i, ret; + + /* send/receive our datagram of IO vectors 10 times */ + for (i = 0; i < 10; i++) { + ret = lwip_sendmsg(s, smsg, 0); + fail_unless(ret == 4); + + while (tcpip_thread_poll_one()); + + /* receive the datagram split across 4 buffers */ + ret = lwip_recvmsg(s, rmsg, 0); + fail_unless(ret == 4); + + /* verify data */ + fail_unless(*((u8_t*)rmsg->msg_iov[0].iov_base) == 0xDE); + fail_unless(*((u8_t*)rmsg->msg_iov[1].iov_base) == 0xAD); + fail_unless(*((u8_t*)rmsg->msg_iov[2].iov_base) == 0xBE); + fail_unless(*((u8_t*)rmsg->msg_iov[3].iov_base) == 0xEF); + + /* clear rcv_buf to ensure no data is being skipped */ + *((u8_t*)rmsg->msg_iov[0].iov_base) = 0x00; + *((u8_t*)rmsg->msg_iov[1].iov_base) = 0x00; + *((u8_t*)rmsg->msg_iov[2].iov_base) = 0x00; + *((u8_t*)rmsg->msg_iov[3].iov_base) = 0x00; + } +} + +static void test_sockets_msgapi_udp(int domain) +{ + int s, i, ret; + struct sockaddr_storage addr_storage; + socklen_t addr_size; + struct iovec riovs[4]; + struct msghdr rmsg; + u8_t rcv_buf[4]; + struct iovec siovs[4]; + struct msghdr smsg; + u8_t snd_buf[4] = {0xDE, 0xAD, 0xBE, 0xEF}; + + /* initialize IO vectors with data */ + for (i = 0; i < 4; i++) { + siovs[i].iov_base = &snd_buf[i]; + siovs[i].iov_len = sizeof(u8_t); + riovs[i].iov_base = &rcv_buf[i]; + riovs[i].iov_len = sizeof(u8_t); + } + + test_sockets_init_loopback_addr(domain, &addr_storage, &addr_size); + + s = test_sockets_alloc_socket_nonblocking(domain, SOCK_DGRAM); + fail_unless(s >= 0); + + ret = lwip_bind(s, (struct sockaddr*)&addr_storage, addr_size); + fail_unless(ret == 0); + + /* Update addr with epehermal port */ + ret = lwip_getsockname(s, (struct sockaddr*)&addr_storage, &addr_size); + fail_unless(ret == 0); + switch(domain) { +#if LWIP_IPV6 + case AF_INET6: + fail_unless(addr_size == sizeof(struct sockaddr_in6)); + break; +#endif /* LWIP_IPV6 */ +#if LWIP_IPV4 + case AF_INET: + fail_unless(addr_size == sizeof(struct sockaddr_in)); + break; +#endif /* LWIP_IPV6 */ + default: + fail(); + break; + } + + /* send and receive the datagram in 4 pieces */ + memset(&smsg, 0, sizeof(smsg)); + smsg.msg_iov = siovs; + smsg.msg_iovlen = 4; + memset(&rmsg, 0, sizeof(rmsg)); + rmsg.msg_iov = riovs; + rmsg.msg_iovlen = 4; + + /* perform a sendmsg with remote host (self) */ + smsg.msg_name = &addr_storage; + smsg.msg_namelen = addr_size; + + test_sockets_msgapi_udp_send_recv_loop(s, &smsg, &rmsg); + + /* Connect to self, allowing us to not pass message name */ + ret = lwip_connect(s, (struct sockaddr*)&addr_storage, addr_size); + fail_unless(ret == 0); + + smsg.msg_name = NULL; + smsg.msg_namelen = 0; + + test_sockets_msgapi_udp_send_recv_loop(s, &smsg, &rmsg); + + ret = lwip_close(s); + fail_unless(ret == 0); +} + +#if LWIP_IPV4 +static void test_sockets_msgapi_cmsg(int domain) +{ + int s, ret, enable; + struct sockaddr_storage addr_storage; + socklen_t addr_size; + struct iovec iov; + struct msghdr msg; + struct cmsghdr *cmsg; + struct in_pktinfo *pktinfo; + u8_t rcv_buf[4]; + u8_t snd_buf[4] = {0xDE, 0xAD, 0xBE, 0xEF}; + u8_t cmsg_buf[CMSG_SPACE(sizeof(struct in_pktinfo))]; + + test_sockets_init_loopback_addr(domain, &addr_storage, &addr_size); + + s = test_sockets_alloc_socket_nonblocking(domain, SOCK_DGRAM); + fail_unless(s >= 0); + + ret = lwip_bind(s, (struct sockaddr*)&addr_storage, addr_size); + fail_unless(ret == 0); + + /* Update addr with epehermal port */ + ret = lwip_getsockname(s, (struct sockaddr*)&addr_storage, &addr_size); + fail_unless(ret == 0); + + enable = 1; + ret = lwip_setsockopt(s, IPPROTO_IP, IP_PKTINFO, &enable, sizeof(enable)); + fail_unless(ret == 0); + + /* Receive full message, including control message */ + iov.iov_base = rcv_buf; + iov.iov_len = sizeof(rcv_buf); + msg.msg_control = cmsg_buf; + msg.msg_controllen = sizeof(cmsg_buf); + msg.msg_flags = 0; + msg.msg_iov = &iov; + msg.msg_iovlen = 1; + msg.msg_name = NULL; + msg.msg_namelen = 0; + + memset(rcv_buf, 0, sizeof(rcv_buf)); + ret = lwip_sendto(s, snd_buf, sizeof(snd_buf), 0, (struct sockaddr*)&addr_storage, addr_size); + fail_unless(ret == sizeof(snd_buf)); + + tcpip_thread_poll_one(); + + ret = lwip_recvmsg(s, &msg, 0); + fail_unless(ret == sizeof(rcv_buf)); + fail_unless(!memcmp(rcv_buf, snd_buf, sizeof(rcv_buf))); + + /* Verify message header */ + cmsg = CMSG_FIRSTHDR(&msg); + fail_unless(cmsg != NULL); + fail_unless(cmsg->cmsg_len > 0); + fail_unless(cmsg->cmsg_level == IPPROTO_IP); + fail_unless(cmsg->cmsg_type == IP_PKTINFO); + + /* Verify message data */ + pktinfo = (struct in_pktinfo*)CMSG_DATA(cmsg); + /* We only have loopback interface enabled */ + fail_unless(pktinfo->ipi_ifindex == 1); + fail_unless(pktinfo->ipi_addr.s_addr == PP_HTONL(INADDR_LOOPBACK)); + + /* Verify there are no additional messages */ + cmsg = CMSG_NXTHDR(&msg, cmsg); + fail_unless(cmsg == NULL); + + /* Send datagram again, testing truncation */ + memset(rcv_buf, 0, sizeof(rcv_buf)); + ret = lwip_sendto(s, snd_buf, sizeof(snd_buf), 0, (struct sockaddr*)&addr_storage, addr_size); + fail_unless(ret == sizeof(snd_buf)); + + tcpip_thread_poll_one(); + + msg.msg_controllen = 1; + msg.msg_flags = 0; + ret = lwip_recvmsg(s, &msg, 0); + fail_unless(ret == sizeof(rcv_buf)); + fail_unless(!memcmp(rcv_buf, snd_buf, sizeof(rcv_buf))); + /* Ensure truncation was returned */ + fail_unless(msg.msg_flags & MSG_CTRUNC); + /* Ensure no control messages were returned */ + fail_unless(msg.msg_controllen == 0); + + ret = lwip_close(s); + fail_unless(ret == 0); +} +#endif /* LWIP_IPV4 */ + +START_TEST(test_sockets_msgapis) +{ + LWIP_UNUSED_ARG(_i); +#if LWIP_IPV4 + test_sockets_msgapi_udp(AF_INET); + test_sockets_msgapi_tcp(AF_INET); + test_sockets_msgapi_cmsg(AF_INET); +#endif +#if LWIP_IPV6 + test_sockets_msgapi_udp(AF_INET6); + test_sockets_msgapi_tcp(AF_INET6); +#endif +} +END_TEST + +START_TEST(test_sockets_select) +{ +#if LWIP_SOCKET_SELECT + int s; + int ret; + fd_set readset; + fd_set writeset; + fd_set errset; + struct timeval tv; + + fail_unless(test_sockets_get_used_count() == 0); + + s = lwip_socket(AF_INET, SOCK_STREAM, 0); + fail_unless(s >= 0); + fail_unless(test_sockets_get_used_count() == 0); + + FD_ZERO(&readset); + FD_SET(s, &readset); + FD_ZERO(&writeset); + FD_SET(s, &writeset); + FD_ZERO(&errset); + FD_SET(s, &errset); + + tv.tv_sec = tv.tv_usec = 0; + ret = lwip_select(s + 1, &readset, &writeset, &errset, &tv); + fail_unless(ret == 0); + fail_unless(test_sockets_get_used_count() == 0); + + ret = lwip_close(s); + fail_unless(ret == 0); + +#endif + LWIP_UNUSED_ARG(_i); +} +END_TEST + +START_TEST(test_sockets_recv_after_rst) +{ + int sl, sact; + int spass = -1; + int ret; + struct sockaddr_in sa_listen; + const u16_t port = 1234; + int arg; + const char txbuf[] = "something"; + char rxbuf[16]; + struct lwip_sock *sact_sock; + int err; + LWIP_UNUSED_ARG(_i); + + fail_unless(test_sockets_get_used_count() == 0); + + memset(&sa_listen, 0, sizeof(sa_listen)); + sa_listen.sin_family = AF_INET; + sa_listen.sin_port = PP_HTONS(port); + sa_listen.sin_addr.s_addr = PP_HTONL(INADDR_LOOPBACK); + + /* set up the listener */ + sl = lwip_socket(AF_INET, SOCK_STREAM, 0); + fail_unless(sl >= 0); + fail_unless(test_sockets_get_used_count() == 0); + + ret = lwip_bind(sl, (struct sockaddr *)&sa_listen, sizeof(sa_listen)); + fail_unless(ret == 0); + ret = lwip_listen(sl, 0); + fail_unless(ret == 0); + + /* set up the client */ + sact = lwip_socket(AF_INET, SOCK_STREAM, 0); + fail_unless(sact >= 0); + fail_unless(test_sockets_get_used_count() == 0); + /* set the client to nonblocking to simplify this test */ + arg = 1; + ret = lwip_ioctl(sact, FIONBIO, &arg); + fail_unless(ret == 0); + /* connect */ + do { + ret = lwip_connect(sact, (struct sockaddr *)&sa_listen, sizeof(sa_listen)); + err = errno; + fail_unless((ret == 0) || (ret == -1)); + if (ret != 0) { + if (err == EISCONN) { + /* Although this is not valid, use EISCONN as an indicator for successful connection. + This marks us as "connect phase is done". On error, we would either have a different + errno code or "send" fails later... -> good enough for this test. */ + ret = 0; + } else { + fail_unless(err == EINPROGRESS); + if (err != EINPROGRESS) { + goto cleanup; + } + /* we're in progress: little side check: test for EALREADY */ + ret = lwip_connect(sact, (struct sockaddr *)&sa_listen, sizeof(sa_listen)); + err = errno; + fail_unless(ret == -1); + fail_unless(err == EALREADY); + if ((ret != -1) || (err != EALREADY)) { + goto cleanup; + } + } + tcpip_thread_poll_one(); + tcpip_thread_poll_one(); + tcpip_thread_poll_one(); + tcpip_thread_poll_one(); + } + } while (ret != 0); + fail_unless(ret == 0); + + /* accept the server connection part */ + spass = lwip_accept(sl, NULL, NULL); + fail_unless(spass >= 0); + + /* write data from client */ + ret = lwip_send(sact, txbuf, sizeof(txbuf), 0); + fail_unless(ret == sizeof(txbuf)); + + tcpip_thread_poll_one(); + tcpip_thread_poll_one(); + + /* issue RST (This is a HACK, don't try this in your own app!) */ + sact_sock = lwip_socket_dbg_get_socket(sact); + fail_unless(sact_sock != NULL); + if (sact_sock != NULL) { + struct netconn *sact_conn = sact_sock->conn; + fail_unless(sact_conn != NULL); + if (sact_conn != NULL) { + struct tcp_pcb *pcb = sact_conn->pcb.tcp; + fail_unless(pcb != NULL); + if (pcb != NULL) { + tcp_rst(pcb, pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, + pcb->local_port, pcb->remote_port); + } + } + } + tcpip_thread_poll_one(); + tcpip_thread_poll_one(); + + /* expect to receive data first */ + ret = lwip_recv(spass, rxbuf, sizeof(rxbuf), 0); + fail_unless(ret > 0); + tcpip_thread_poll_one(); + tcpip_thread_poll_one(); + + /* expect to receive RST indication */ + ret = lwip_recv(spass, rxbuf, sizeof(rxbuf), 0); + fail_unless(ret == -1); + err = errno; + fail_unless(err == ECONNRESET); + tcpip_thread_poll_one(); + tcpip_thread_poll_one(); + + /* expect to receive ENOTCONN indication */ + ret = lwip_recv(spass, rxbuf, sizeof(rxbuf), 0); + fail_unless(ret == -1); + err = errno; + fail_unless(err == ENOTCONN); + tcpip_thread_poll_one(); + tcpip_thread_poll_one(); + + /* expect to receive ENOTCONN indication */ + ret = lwip_recv(spass, rxbuf, sizeof(rxbuf), 0); + fail_unless(ret == -1); + err = errno; + fail_unless(err == ENOTCONN); + tcpip_thread_poll_one(); + tcpip_thread_poll_one(); + +cleanup: + ret = lwip_close(sl); + fail_unless(ret == 0); + ret = lwip_close(sact); + fail_unless(ret == 0); + if (spass >= 0) { + ret = lwip_close(spass); + fail_unless(ret == 0); + } +} +END_TEST + +/** Create the suite including all tests for this module */ +Suite * +sockets_suite(void) +{ + testfunc tests[] = { + TESTFUNC(test_sockets_basics), + TESTFUNC(test_sockets_allfunctions_basic), + TESTFUNC(test_sockets_msgapis), + TESTFUNC(test_sockets_select), + TESTFUNC(test_sockets_recv_after_rst), + }; + return create_suite("SOCKETS", tests, sizeof(tests)/sizeof(testfunc), sockets_setup, sockets_teardown); +} + +#else /* LWIP_SOCKET */ + +Suite * +sockets_suite(void) +{ + return create_suite("SOCKETS", NULL, 0, NULL, NULL); +} +#endif /* LWIP_SOCKET */ diff --git a/Libraries/LwIP/test/unit/api/test_sockets.h b/Libraries/LwIP/test/unit/api/test_sockets.h new file mode 100644 index 0000000..0abb7a3 --- /dev/null +++ b/Libraries/LwIP/test/unit/api/test_sockets.h @@ -0,0 +1,8 @@ +#ifndef LWIP_HDR_TEST_SOCKETS_H +#define LWIP_HDR_TEST_SOCKETS_H + +#include "../lwip_check.h" + +Suite *sockets_suite(void); + +#endif diff --git a/Libraries/LwIP/test/unit/arch/sys_arch.c b/Libraries/LwIP/test/unit/arch/sys_arch.c new file mode 100644 index 0000000..cf826eb --- /dev/null +++ b/Libraries/LwIP/test/unit/arch/sys_arch.c @@ -0,0 +1,371 @@ +/* + * Copyright (c) 2017 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ + + +#include +#include +#if !NO_SYS +#include "sys_arch.h" +#endif +#include +#include +#include + +#include + +u32_t lwip_sys_now; + +u32_t +sys_jiffies(void) +{ + return lwip_sys_now; +} + +u32_t +sys_now(void) +{ + return lwip_sys_now; +} + +void +sys_init(void) +{ +} + +#if !NO_SYS + +test_sys_arch_waiting_fn the_waiting_fn; + +void +test_sys_arch_wait_callback(test_sys_arch_waiting_fn waiting_fn) +{ + the_waiting_fn = waiting_fn; +} + +err_t +sys_sem_new(sys_sem_t *sem, u8_t count) +{ + LWIP_ASSERT("sem != NULL", sem != NULL); + *sem = count + 1; + return ERR_OK; +} + +void +sys_sem_free(sys_sem_t *sem) +{ + LWIP_ASSERT("sem != NULL", sem != NULL); + *sem = 0; +} + +void +sys_sem_set_invalid(sys_sem_t *sem) +{ + LWIP_ASSERT("sem != NULL", sem != NULL); + *sem = 0; +} + +/* semaphores are 1-based because RAM is initialized as 0, which would be valid */ +u32_t +sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout) +{ + u32_t ret = 0; + LWIP_ASSERT("sem != NULL", sem != NULL); + LWIP_ASSERT("*sem > 0", *sem > 0); + if (*sem == 1) { + /* need to wait */ + if(!timeout) + { + /* wait infinite */ + LWIP_ASSERT("cannot wait without waiting callback", the_waiting_fn != NULL); + do { + int expectSomething = the_waiting_fn(sem, NULL); + LWIP_ASSERT("*sem > 0", *sem > 0); + LWIP_ASSERT("expecting a semaphore count but it's 0", !expectSomething || (*sem > 1)); + ret++; + if (ret == SYS_ARCH_TIMEOUT) { + ret--; + } + } while(*sem == 1); + } + else + { + if (the_waiting_fn) { + int expectSomething = the_waiting_fn(sem, NULL); + LWIP_ASSERT("expecting a semaphore count but it's 0", !expectSomething || (*sem > 1)); + } + LWIP_ASSERT("*sem > 0", *sem > 0); + if (*sem == 1) { + return SYS_ARCH_TIMEOUT; + } + ret = 1; + } + } + LWIP_ASSERT("*sem > 0", *sem > 0); + (*sem)--; + LWIP_ASSERT("*sem > 0", *sem > 0); + /* return the time we waited for the sem */ + return ret; +} + +void +sys_sem_signal(sys_sem_t *sem) +{ + LWIP_ASSERT("sem != NULL", sem != NULL); + LWIP_ASSERT("*sem > 0", *sem > 0); + (*sem)++; + LWIP_ASSERT("*sem > 0", *sem > 0); +} + +err_t +sys_mutex_new(sys_mutex_t *mutex) +{ + LWIP_ASSERT("mutex != NULL", mutex != NULL); + *mutex = 1; /* 1 allocated */ + return ERR_OK; +} + +void +sys_mutex_free(sys_mutex_t *mutex) +{ + /* parameter check */ + LWIP_ASSERT("mutex != NULL", mutex != NULL); + LWIP_ASSERT("*mutex >= 1", *mutex >= 1); + *mutex = 0; +} + +void +sys_mutex_set_invalid(sys_mutex_t *mutex) +{ + LWIP_ASSERT("mutex != NULL", mutex != NULL); + *mutex = 0; +} + +void +sys_mutex_lock(sys_mutex_t *mutex) +{ + /* nothing to do, no multithreading supported */ + LWIP_ASSERT("mutex != NULL", mutex != NULL); + /* check that the mutext is valid and unlocked (no nested locking) */ + LWIP_ASSERT("*mutex >= 1", *mutex == 1); + /* we count up just to check the correct pairing of lock/unlock */ + (*mutex)++; + LWIP_ASSERT("*mutex >= 1", *mutex >= 1); +} + +void +sys_mutex_unlock(sys_mutex_t *mutex) +{ + /* nothing to do, no multithreading supported */ + LWIP_ASSERT("mutex != NULL", mutex != NULL); + LWIP_ASSERT("*mutex >= 1", *mutex >= 1); + /* we count down just to check the correct pairing of lock/unlock */ + (*mutex)--; + LWIP_ASSERT("*mutex >= 1", *mutex >= 1); +} + + +sys_thread_t +sys_thread_new(const char *name, lwip_thread_fn function, void *arg, int stacksize, int prio) +{ + LWIP_UNUSED_ARG(name); + LWIP_UNUSED_ARG(function); + LWIP_UNUSED_ARG(arg); + LWIP_UNUSED_ARG(stacksize); + LWIP_UNUSED_ARG(prio); + /* threads not supported */ + return 0; +} + +err_t +sys_mbox_new(sys_mbox_t *mbox, int size) +{ + int mboxsize = size; + LWIP_ASSERT("mbox != NULL", mbox != NULL); + LWIP_ASSERT("size >= 0", size >= 0); + if (size == 0) { + mboxsize = 1024; + } + mbox->head = mbox->tail = 0; + mbox->sem = mbox; /* just point to something for sys_mbox_valid() */ + mbox->q_mem = (void**)malloc(sizeof(void*)*mboxsize); + mbox->size = mboxsize; + mbox->used = 0; + + memset(mbox->q_mem, 0, sizeof(void*)*mboxsize); + return ERR_OK; +} + +void +sys_mbox_free(sys_mbox_t *mbox) +{ + /* parameter check */ + LWIP_ASSERT("mbox != NULL", mbox != NULL); + LWIP_ASSERT("mbox->sem != NULL", mbox->sem != NULL); + LWIP_ASSERT("mbox->sem == mbox", mbox->sem == mbox); + LWIP_ASSERT("mbox->q_mem != NULL", mbox->q_mem != NULL); + mbox->sem = NULL; + free(mbox->q_mem); + mbox->q_mem = NULL; +} + +void +sys_mbox_set_invalid(sys_mbox_t *mbox) +{ + LWIP_ASSERT("mbox != NULL", mbox != NULL); + LWIP_ASSERT("mbox->q_mem == NULL", mbox->q_mem == NULL); + mbox->sem = NULL; + mbox->q_mem = NULL; +} + +void +sys_mbox_post(sys_mbox_t *q, void *msg) +{ + LWIP_ASSERT("q != SYS_MBOX_NULL", q != SYS_MBOX_NULL); + LWIP_ASSERT("q->sem == q", q->sem == q); + LWIP_ASSERT("q->q_mem != NULL", q->q_mem != NULL); + LWIP_ASSERT("q->used >= 0", q->used >= 0); + LWIP_ASSERT("q->size > 0", q->size > 0); + + LWIP_ASSERT("mbox already full", q->used < q->size); + + q->q_mem[q->head] = msg; + q->head++; + if (q->head >= (unsigned int)q->size) { + q->head = 0; + } + LWIP_ASSERT("mbox is full!", q->head != q->tail); + q->used++; +} + +err_t +sys_mbox_trypost(sys_mbox_t *q, void *msg) +{ + LWIP_ASSERT("q != SYS_MBOX_NULL", q != SYS_MBOX_NULL); + LWIP_ASSERT("q->sem == q", q->sem == q); + LWIP_ASSERT("q->q_mem != NULL", q->q_mem != NULL); + LWIP_ASSERT("q->used >= 0", q->used >= 0); + LWIP_ASSERT("q->size > 0", q->size > 0); + LWIP_ASSERT("q->used <= q->size", q->used <= q->size); + + if (q->used == q->size) { + return ERR_MEM; + } + sys_mbox_post(q, msg); + return ERR_OK; +} + +err_t +sys_mbox_trypost_fromisr(sys_mbox_t *q, void *msg) +{ + return sys_mbox_trypost(q, msg); +} + +u32_t +sys_arch_mbox_fetch(sys_mbox_t *q, void **msg, u32_t timeout) +{ + u32_t ret = 0; + u32_t ret2; + LWIP_ASSERT("q != SYS_MBOX_NULL", q != SYS_MBOX_NULL); + LWIP_ASSERT("q->sem == q", q->sem == q); + LWIP_ASSERT("q->q_mem != NULL", q->q_mem != NULL); + LWIP_ASSERT("q->used >= 0", q->used >= 0); + LWIP_ASSERT("q->size > 0", q->size > 0); + + if (q->used == 0) { + /* need to wait */ + /* need to wait */ + if(!timeout) + { + /* wait infinite */ + LWIP_ASSERT("cannot wait without waiting callback", the_waiting_fn != NULL); + do { + int expectSomething = the_waiting_fn(NULL, q); + LWIP_ASSERT("q->used >= 0", q->used >= 0); + LWIP_ASSERT("expecting item available but it's 0", !expectSomething || (q->used > 0)); + ret++; + if (ret == SYS_ARCH_TIMEOUT) { + ret--; + } + } while(q->used == 0); + } + else + { + if (the_waiting_fn) { + int expectSomething = the_waiting_fn(NULL, q); + LWIP_ASSERT("expecting item available count but it's 0", !expectSomething || (q->used > 0)); + } + LWIP_ASSERT("q->used >= 0", q->used >= 0); + if (q->used == 0) { + if(msg) { + *msg = NULL; + } + return SYS_ARCH_TIMEOUT; + } + ret = 1; + } + } + LWIP_ASSERT("q->used > 0", q->used > 0); + ret2 = sys_arch_mbox_tryfetch(q, msg); + LWIP_ASSERT("got no message", ret2 == 0); + return ret; +} + +u32_t +sys_arch_mbox_tryfetch(sys_mbox_t *q, void **msg) +{ + LWIP_ASSERT("q != SYS_MBOX_NULL", q != SYS_MBOX_NULL); + LWIP_ASSERT("q->sem == q", q->sem == q); + LWIP_ASSERT("q->q_mem != NULL", q->q_mem != NULL); + LWIP_ASSERT("q->used >= 0", q->used >= 0); + LWIP_ASSERT("q->size > 0", q->size > 0); + + if (!q->used) { + return SYS_ARCH_TIMEOUT; + } + if(msg) { + *msg = q->q_mem[q->tail]; + } + + q->tail++; + if (q->tail >= (unsigned int)q->size) { + q->tail = 0; + } + q->used--; + LWIP_ASSERT("q->used >= 0", q->used >= 0); + return 0; +} + +#if LWIP_NETCONN_SEM_PER_THREAD +#error LWIP_NETCONN_SEM_PER_THREAD==1 not supported +#endif /* LWIP_NETCONN_SEM_PER_THREAD */ + +#endif /* !NO_SYS */ diff --git a/Libraries/LwIP/test/unit/arch/sys_arch.h b/Libraries/LwIP/test/unit/arch/sys_arch.h new file mode 100644 index 0000000..331c2f2 --- /dev/null +++ b/Libraries/LwIP/test/unit/arch/sys_arch.h @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2017 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ +#ifndef LWIP_HDR_TEST_SYS_ARCH_H +#define LWIP_HDR_TEST_SYS_ARCH_H + +typedef int sys_sem_t; +#define sys_sem_valid(sema) ((sema) != NULL) + +typedef int sys_mutex_t; +#define sys_mutex_valid(mutex) (((mutex) != NULL) + +struct lwip_mbox { + void* sem; + void** q_mem; + unsigned int head, tail; + int size; + int used; +}; +typedef struct lwip_mbox sys_mbox_t; +#define SYS_MBOX_NULL NULL +#define sys_mbox_valid(mbox) ((mbox != NULL) && ((mbox)->sem != NULL) && ((mbox)->sem != (void*)-1)) +#define sys_mbox_valid_val(mbox) (((mbox).sem != NULL) && ((mbox).sem != (void*)-1)) + +/* DWORD (thread id) is used for sys_thread_t but we won't include windows.h */ +typedef u32_t sys_thread_t; + +#define SYS_ARCH_DECL_PROTECT(lev) +#define SYS_ARCH_PROTECT(lev) +#define SYS_ARCH_UNPROTECT(lev) + +/* to implement doing something while blocking on an mbox or semaphore: + * pass a function to test_sys_arch_wait_callback() that returns + * '0' if waiting again and + * '1' if now there should be something to do (used for asserting) + */ +typedef int (*test_sys_arch_waiting_fn)(sys_sem_t* wait_sem, sys_mbox_t* wait_mbox); +void test_sys_arch_wait_callback(test_sys_arch_waiting_fn waiting_fn); + +/* current time */ +extern u32_t lwip_sys_now; + +#endif /* LWIP_HDR_TEST_SYS_ARCH_H */ + diff --git a/Libraries/LwIP/test/unit/core/test_def.c b/Libraries/LwIP/test/unit/core/test_def.c new file mode 100644 index 0000000..0ae2e9c --- /dev/null +++ b/Libraries/LwIP/test/unit/core/test_def.c @@ -0,0 +1,84 @@ +#include "test_def.h" + +#include "lwip/def.h" + +#define MAGIC_UNTOUCHED_BYTE 0x7a +#define TEST_BUFSIZE 32 +#define GUARD_SIZE 4 + +/* Setups/teardown functions */ + +static void +def_setup(void) +{ +} + +static void +def_teardown(void) +{ +} + +static void +def_check_range_untouched(const char *buf, size_t len) +{ + size_t i; + + for (i = 0; i < len; i++) { + fail_unless(buf[i] == (char)MAGIC_UNTOUCHED_BYTE); + } +} + +static void test_def_itoa(int number, const char *expected) +{ + char buf[TEST_BUFSIZE]; + char *test_buf = &buf[GUARD_SIZE]; + + size_t exp_len = strlen(expected); + fail_unless(exp_len + 4 < (TEST_BUFSIZE - (2 * GUARD_SIZE))); + + memset(buf, MAGIC_UNTOUCHED_BYTE, sizeof(buf)); + lwip_itoa(test_buf, exp_len + 1, number); + def_check_range_untouched(buf, GUARD_SIZE); + fail_unless(test_buf[exp_len] == 0); + fail_unless(!memcmp(test_buf, expected, exp_len)); + def_check_range_untouched(&test_buf[exp_len + 1], TEST_BUFSIZE - GUARD_SIZE - exp_len - 1); + + /* check with too small buffer */ + memset(buf, MAGIC_UNTOUCHED_BYTE, sizeof(buf)); + lwip_itoa(test_buf, exp_len, number); + def_check_range_untouched(buf, GUARD_SIZE); + def_check_range_untouched(&test_buf[exp_len + 1], TEST_BUFSIZE - GUARD_SIZE - exp_len - 1); + + /* check with too large buffer */ + memset(buf, MAGIC_UNTOUCHED_BYTE, sizeof(buf)); + lwip_itoa(test_buf, exp_len + 4, number); + def_check_range_untouched(buf, GUARD_SIZE); + fail_unless(test_buf[exp_len] == 0); + fail_unless(!memcmp(test_buf, expected, exp_len)); + def_check_range_untouched(&test_buf[exp_len + 4], TEST_BUFSIZE - GUARD_SIZE - exp_len - 4); +} + +START_TEST(test_def_lwip_itoa) +{ + LWIP_UNUSED_ARG(_i); + + test_def_itoa(0, "0"); + test_def_itoa(1, "1"); + test_def_itoa(-1, "-1"); + test_def_itoa(15, "15"); + test_def_itoa(-15, "-15"); + test_def_itoa(156, "156"); + test_def_itoa(1192, "1192"); + test_def_itoa(-156, "-156"); +} +END_TEST + +/** Create the suite including all tests for this module */ +Suite * +def_suite(void) +{ + testfunc tests[] = { + TESTFUNC(test_def_lwip_itoa) + }; + return create_suite("DEF", tests, sizeof(tests)/sizeof(testfunc), def_setup, def_teardown); +} diff --git a/Libraries/LwIP/test/unit/core/test_def.h b/Libraries/LwIP/test/unit/core/test_def.h new file mode 100644 index 0000000..7316051 --- /dev/null +++ b/Libraries/LwIP/test/unit/core/test_def.h @@ -0,0 +1,8 @@ +#ifndef LWIP_HDR_TEST_DEF_H +#define LWIP_HDR_TEST_DEF_H + +#include "../lwip_check.h" + +Suite *def_suite(void); + +#endif diff --git a/Libraries/LwIP/test/unit/core/test_mem.c b/Libraries/LwIP/test/unit/core/test_mem.c index b102011..789f720 100755 --- a/Libraries/LwIP/test/unit/core/test_mem.c +++ b/Libraries/LwIP/test/unit/core/test_mem.c @@ -15,11 +15,13 @@ static void mem_setup(void) { + lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); } static void mem_teardown(void) { + lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); } @@ -109,13 +111,114 @@ START_TEST(test_mem_random) } END_TEST +START_TEST(test_mem_invalid_free) +{ + u8_t *ptr, *ptr_low, *ptr_high; + LWIP_UNUSED_ARG(_i); + + fail_unless(lwip_stats.mem.used == 0); + fail_unless(lwip_stats.mem.illegal == 0); + + ptr = (u8_t *)mem_malloc(1); + fail_unless(ptr != NULL); + fail_unless(lwip_stats.mem.used != 0); + + ptr_low = ptr - 0x10; + mem_free(ptr_low); + fail_unless(lwip_stats.mem.illegal == 1); + lwip_stats.mem.illegal = 0; + + ptr_high = ptr + (MEM_SIZE * 2); + mem_free(ptr_high); + fail_unless(lwip_stats.mem.illegal == 1); + lwip_stats.mem.illegal = 0; + + mem_free(ptr); + fail_unless(lwip_stats.mem.illegal == 0); + fail_unless(lwip_stats.mem.used == 0); +} +END_TEST + +START_TEST(test_mem_double_free) +{ + u8_t *ptr1b, *ptr1, *ptr2, *ptr3; + LWIP_UNUSED_ARG(_i); + + fail_unless(lwip_stats.mem.used == 0); + fail_unless(lwip_stats.mem.illegal == 0); + + ptr1 = (u8_t *)mem_malloc(1); + fail_unless(ptr1 != NULL); + fail_unless(lwip_stats.mem.used != 0); + + ptr2 = (u8_t *)mem_malloc(1); + fail_unless(ptr2 != NULL); + fail_unless(lwip_stats.mem.used != 0); + + ptr3 = (u8_t *)mem_malloc(1); + fail_unless(ptr3 != NULL); + fail_unless(lwip_stats.mem.used != 0); + + /* free the middle mem */ + mem_free(ptr2); + fail_unless(lwip_stats.mem.illegal == 0); + + /* double-free of middle mem: should fail */ + mem_free(ptr2); + fail_unless(lwip_stats.mem.illegal == 1); + lwip_stats.mem.illegal = 0; + + /* free upper memory and try again */ + mem_free(ptr3); + fail_unless(lwip_stats.mem.illegal == 0); + + mem_free(ptr2); + fail_unless(lwip_stats.mem.illegal == 1); + lwip_stats.mem.illegal = 0; + + /* free lower memory and try again */ + mem_free(ptr1); + fail_unless(lwip_stats.mem.illegal == 0); + fail_unless(lwip_stats.mem.used == 0); + + mem_free(ptr2); + fail_unless(lwip_stats.mem.illegal == 1); + fail_unless(lwip_stats.mem.used == 0); + lwip_stats.mem.illegal = 0; + + /* reallocate lowest memory, now overlapping already freed ptr2 */ +#ifndef MIN_SIZE +#define MIN_SIZE 12 +#endif + ptr1b = (u8_t *)mem_malloc(MIN_SIZE * 2); + fail_unless(ptr1b != NULL); + fail_unless(lwip_stats.mem.used != 0); + + mem_free(ptr2); + fail_unless(lwip_stats.mem.illegal == 1); + lwip_stats.mem.illegal = 0; + + memset(ptr1b, 1, MIN_SIZE * 2); + + mem_free(ptr2); + fail_unless(lwip_stats.mem.illegal == 1); + lwip_stats.mem.illegal = 0; + + mem_free(ptr1b); + fail_unless(lwip_stats.mem.illegal == 0); + fail_unless(lwip_stats.mem.used == 0); +} +END_TEST + /** Create the suite including all tests for this module */ Suite * mem_suite(void) { testfunc tests[] = { TESTFUNC(test_mem_one), - TESTFUNC(test_mem_random) + TESTFUNC(test_mem_random), + TESTFUNC(test_mem_invalid_free), + TESTFUNC(test_mem_double_free) }; return create_suite("MEM", tests, sizeof(tests)/sizeof(testfunc), mem_setup, mem_teardown); } diff --git a/Libraries/LwIP/test/unit/core/test_netif.c b/Libraries/LwIP/test/unit/core/test_netif.c new file mode 100644 index 0000000..2f68725 --- /dev/null +++ b/Libraries/LwIP/test/unit/core/test_netif.c @@ -0,0 +1,227 @@ +#include "test_netif.h" + +#include "lwip/netif.h" +#include "lwip/stats.h" +#include "lwip/etharp.h" +#include "netif/ethernet.h" + +#if !LWIP_NETIF_EXT_STATUS_CALLBACK +#error "This tests needs LWIP_NETIF_EXT_STATUS_CALLBACK enabled" +#endif + +struct netif net_test; + + +/* Setups/teardown functions */ + +static void +netif_setup(void) +{ + lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); +} + +static void +netif_teardown(void) +{ + lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); +} + +/* test helper functions */ + +static err_t +testif_tx_func(struct netif *netif, struct pbuf *p) +{ + LWIP_UNUSED_ARG(netif); + LWIP_UNUSED_ARG(p); + return ERR_OK; +} + +static err_t +testif_init(struct netif *netif) +{ + netif->name[0] = 'c'; + netif->name[1] = 'h'; + netif->output = etharp_output; + netif->linkoutput = testif_tx_func; + netif->mtu = 1500; + netif->hwaddr_len = 6; + netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET | NETIF_FLAG_IGMP | NETIF_FLAG_MLD6; + + netif->hwaddr[0] = 0x02; + netif->hwaddr[1] = 0x03; + netif->hwaddr[2] = 0x04; + netif->hwaddr[3] = 0x05; + netif->hwaddr[4] = 0x06; + netif->hwaddr[5] = 0x07; + + return ERR_OK; +} + +#define MAX_NSC_REASON_IDX 10 +static netif_nsc_reason_t expected_reasons; +static int callback_ctr; + +static int dummy_active; + +static void +test_netif_ext_callback_dummy(struct netif* netif, netif_nsc_reason_t reason, const netif_ext_callback_args_t* args) +{ + LWIP_UNUSED_ARG(netif); + LWIP_UNUSED_ARG(reason); + LWIP_UNUSED_ARG(args); + + fail_unless(dummy_active); +} + +static void +test_netif_ext_callback(struct netif* netif, netif_nsc_reason_t reason, const netif_ext_callback_args_t* args) +{ + LWIP_UNUSED_ARG(args); /* @todo */ + callback_ctr++; + + fail_unless(netif == &net_test); + + fail_unless(expected_reasons == reason); +} + +/* Test functions */ + +NETIF_DECLARE_EXT_CALLBACK(netif_callback_1) +NETIF_DECLARE_EXT_CALLBACK(netif_callback_2) +NETIF_DECLARE_EXT_CALLBACK(netif_callback_3) + +START_TEST(test_netif_extcallbacks) +{ + ip4_addr_t addr; + ip4_addr_t netmask; + ip4_addr_t gw; + LWIP_UNUSED_ARG(_i); + + IP4_ADDR(&addr, 0, 0, 0, 0); + IP4_ADDR(&netmask, 0, 0, 0, 0); + IP4_ADDR(&gw, 0, 0, 0, 0); + + netif_add_ext_callback(&netif_callback_3, test_netif_ext_callback_dummy); + netif_add_ext_callback(&netif_callback_2, test_netif_ext_callback); + netif_add_ext_callback(&netif_callback_1, test_netif_ext_callback_dummy); + + dummy_active = 1; + + /* positive tests: check that single events come as expected */ + + expected_reasons = LWIP_NSC_NETIF_ADDED; + callback_ctr = 0; + netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, ethernet_input); + fail_unless(callback_ctr == 1); + + expected_reasons = LWIP_NSC_LINK_CHANGED; + callback_ctr = 0; + netif_set_link_up(&net_test); + fail_unless(callback_ctr == 1); + + expected_reasons = LWIP_NSC_STATUS_CHANGED; + callback_ctr = 0; + netif_set_up(&net_test); + fail_unless(callback_ctr == 1); + + IP4_ADDR(&addr, 1, 2, 3, 4); + expected_reasons = LWIP_NSC_IPV4_ADDRESS_CHANGED; + callback_ctr = 0; + netif_set_ipaddr(&net_test, &addr); + fail_unless(callback_ctr == 1); + + IP4_ADDR(&netmask, 255, 255, 255, 0); + expected_reasons = LWIP_NSC_IPV4_NETMASK_CHANGED; + callback_ctr = 0; + netif_set_netmask(&net_test, &netmask); + fail_unless(callback_ctr == 1); + + IP4_ADDR(&gw, 1, 2, 3, 254); + expected_reasons = LWIP_NSC_IPV4_GATEWAY_CHANGED; + callback_ctr = 0; + netif_set_gw(&net_test, &gw); + fail_unless(callback_ctr == 1); + + IP4_ADDR(&addr, 0, 0, 0, 0); + expected_reasons = LWIP_NSC_IPV4_ADDRESS_CHANGED; + callback_ctr = 0; + netif_set_ipaddr(&net_test, &addr); + fail_unless(callback_ctr == 1); + + IP4_ADDR(&netmask, 0, 0, 0, 0); + expected_reasons = LWIP_NSC_IPV4_NETMASK_CHANGED; + callback_ctr = 0; + netif_set_netmask(&net_test, &netmask); + fail_unless(callback_ctr == 1); + + IP4_ADDR(&gw, 0, 0, 0, 0); + expected_reasons = LWIP_NSC_IPV4_GATEWAY_CHANGED; + callback_ctr = 0; + netif_set_gw(&net_test, &gw); + fail_unless(callback_ctr == 1); + + /* check for multi-events (only one combined callback expected) */ + + IP4_ADDR(&addr, 1, 2, 3, 4); + IP4_ADDR(&netmask, 255, 255, 255, 0); + IP4_ADDR(&gw, 1, 2, 3, 254); + expected_reasons = (netif_nsc_reason_t)(LWIP_NSC_IPV4_ADDRESS_CHANGED | LWIP_NSC_IPV4_NETMASK_CHANGED | + LWIP_NSC_IPV4_GATEWAY_CHANGED | LWIP_NSC_IPV4_SETTINGS_CHANGED); + callback_ctr = 0; + netif_set_addr(&net_test, &addr, &netmask, &gw); + fail_unless(callback_ctr == 1); + + /* check that for no-change, no callback is expected */ + expected_reasons = LWIP_NSC_NONE; + callback_ctr = 0; + netif_set_ipaddr(&net_test, &addr); + fail_unless(callback_ctr == 0); + + netif_set_netmask(&net_test, &netmask); + callback_ctr = 0; + fail_unless(callback_ctr == 0); + + callback_ctr = 0; + netif_set_gw(&net_test, &gw); + fail_unless(callback_ctr == 0); + + callback_ctr = 0; + netif_set_addr(&net_test, &addr, &netmask, &gw); + fail_unless(callback_ctr == 0); + + /* check for single-events */ + IP4_ADDR(&addr, 1, 2, 3, 5); + expected_reasons = (netif_nsc_reason_t)(LWIP_NSC_IPV4_ADDRESS_CHANGED | LWIP_NSC_IPV4_SETTINGS_CHANGED); + callback_ctr = 0; + netif_set_addr(&net_test, &addr, &netmask, &gw); + fail_unless(callback_ctr == 1); + + expected_reasons = LWIP_NSC_STATUS_CHANGED; + callback_ctr = 0; + netif_set_down(&net_test); + fail_unless(callback_ctr == 1); + + expected_reasons = LWIP_NSC_NETIF_REMOVED; + callback_ctr = 0; + netif_remove(&net_test); + fail_unless(callback_ctr == 1); + + expected_reasons = LWIP_NSC_NONE; + + netif_remove_ext_callback(&netif_callback_2); + netif_remove_ext_callback(&netif_callback_3); + netif_remove_ext_callback(&netif_callback_1); + dummy_active = 0; +} +END_TEST + + +/** Create the suite including all tests for this module */ +Suite * +netif_suite(void) +{ + testfunc tests[] = { + TESTFUNC(test_netif_extcallbacks) + }; + return create_suite("NETIF", tests, sizeof(tests)/sizeof(testfunc), netif_setup, netif_teardown); +} diff --git a/Libraries/LwIP/test/unit/core/test_netif.h b/Libraries/LwIP/test/unit/core/test_netif.h new file mode 100644 index 0000000..8f2b6b4 --- /dev/null +++ b/Libraries/LwIP/test/unit/core/test_netif.h @@ -0,0 +1,8 @@ +#ifndef LWIP_HDR_TEST_NETIF_H +#define LWIP_HDR_TEST_NETIF_H + +#include "../lwip_check.h" + +Suite *netif_suite(void); + +#endif diff --git a/Libraries/LwIP/test/unit/core/test_pbuf.c b/Libraries/LwIP/test/unit/core/test_pbuf.c index c5f4684..dc94274 100755 --- a/Libraries/LwIP/test/unit/core/test_pbuf.c +++ b/Libraries/LwIP/test/unit/core/test_pbuf.c @@ -18,11 +18,13 @@ static void pbuf_setup(void) { + lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); } static void pbuf_teardown(void) { + lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); } @@ -37,6 +39,36 @@ static u8_t testbuf_3[TESTBUFSIZE_3]; static u8_t testbuf_3a[TESTBUFSIZE_3]; /* Test functions */ +START_TEST(test_pbuf_alloc_zero_pbufs) +{ + struct pbuf *p; + LWIP_UNUSED_ARG(_i); + + p = pbuf_alloc(PBUF_RAW, 0, PBUF_ROM); + fail_unless(p != NULL); + if (p != NULL) { + pbuf_free(p); + } + + p = pbuf_alloc(PBUF_RAW, 0, PBUF_RAM); + fail_unless(p != NULL); + if (p != NULL) { + pbuf_free(p); + } + + p = pbuf_alloc(PBUF_RAW, 0, PBUF_REF); + fail_unless(p != NULL); + if (p != NULL) { + pbuf_free(p); + } + + p = pbuf_alloc(PBUF_RAW, 0, PBUF_POOL); + fail_unless(p != NULL); + if (p != NULL) { + pbuf_free(p); + } +} +END_TEST /** Call pbuf_copy on a pbuf with zero length */ START_TEST(test_pbuf_copy_zero_pbuf) @@ -129,12 +161,9 @@ START_TEST(test_pbuf_queueing_bigger_than_64k) pbuf_copy_partial(p1, testbuf_1a, TESTBUFSIZE_1, 0); pbuf_copy_partial(rest2, testbuf_2a, TESTBUFSIZE_2, 0); pbuf_copy_partial(rest3, testbuf_3a, TESTBUFSIZE_3, 0); - for(i = 0; i < TESTBUFSIZE_1; i++) - fail_unless(testbuf_1[i] == testbuf_1a[i]); - for(i = 0; i < TESTBUFSIZE_2; i++) - fail_unless(testbuf_2[i] == testbuf_2a[i]); - for(i = 0; i < TESTBUFSIZE_3; i++) - fail_unless(testbuf_3[i] == testbuf_3a[i]); + fail_if(memcmp(testbuf_1, testbuf_1a, TESTBUFSIZE_1)); + fail_if(memcmp(testbuf_2, testbuf_2a, TESTBUFSIZE_2)); + fail_if(memcmp(testbuf_3, testbuf_3a, TESTBUFSIZE_3)); pbuf_free(p1); pbuf_free(rest2); @@ -192,6 +221,7 @@ START_TEST(test_pbuf_take_at_edge) fail_unless(out[i] == testdata[i], "Bad data at pos %d, was %02X, expected %02X", p->len+i, out[i], testdata[i]); } + pbuf_free(p); } END_TEST @@ -221,6 +251,7 @@ START_TEST(test_pbuf_get_put_at_edge) getdata = pbuf_get_at(p, p->len); fail_unless(*out == getdata, "pbuf_get_at() returned bad data at pos %d, was %02X, expected %02X", p->len, getdata, *out); + pbuf_free(p); } END_TEST @@ -229,6 +260,7 @@ Suite * pbuf_suite(void) { testfunc tests[] = { + TESTFUNC(test_pbuf_alloc_zero_pbufs), TESTFUNC(test_pbuf_copy_zero_pbuf), TESTFUNC(test_pbuf_split_64k_on_small_pbufs), TESTFUNC(test_pbuf_queueing_bigger_than_64k), diff --git a/Libraries/LwIP/test/unit/core/test_timers.c b/Libraries/LwIP/test/unit/core/test_timers.c new file mode 100644 index 0000000..820b718 --- /dev/null +++ b/Libraries/LwIP/test/unit/core/test_timers.c @@ -0,0 +1,233 @@ +#include "test_timers.h" + +#include "lwip/def.h" +#include "lwip/timeouts.h" +#include "arch/sys_arch.h" + +/* Setups/teardown functions */ + +static struct sys_timeo* old_list_head; + +static void +timers_setup(void) +{ + struct sys_timeo** list_head = sys_timeouts_get_next_timeout(); + old_list_head = *list_head; + *list_head = NULL; +} + +static void +timers_teardown(void) +{ + struct sys_timeo** list_head = sys_timeouts_get_next_timeout(); + *list_head = old_list_head; + lwip_sys_now = 0; +} + +static int fired[3]; +static void +dummy_handler(void* arg) +{ + int index = LWIP_PTR_NUMERIC_CAST(int, arg); + fired[index] = 1; +} + +#define HANDLER_EXECUTION_TIME 5 +static int cyclic_fired; +static void +dummy_cyclic_handler(void) +{ + cyclic_fired = 1; + lwip_sys_now += HANDLER_EXECUTION_TIME; +} + +struct lwip_cyclic_timer test_cyclic = {10, dummy_cyclic_handler}; + +static void +do_test_cyclic_timers(u32_t offset) +{ + struct sys_timeo** list_head = sys_timeouts_get_next_timeout(); + + /* verify normal timer expiration */ + lwip_sys_now = offset + 0; + sys_timeout(test_cyclic.interval_ms, lwip_cyclic_timer, &test_cyclic); + + cyclic_fired = 0; + sys_check_timeouts(); + fail_unless(cyclic_fired == 0); + + lwip_sys_now = offset + test_cyclic.interval_ms; + sys_check_timeouts(); + fail_unless(cyclic_fired == 1); + + fail_unless((*list_head)->time == (u32_t)(lwip_sys_now + test_cyclic.interval_ms - HANDLER_EXECUTION_TIME)); + + sys_untimeout(lwip_cyclic_timer, &test_cyclic); + + + /* verify "overload" - next cyclic timer execution is already overdue twice */ + lwip_sys_now = offset + 0; + sys_timeout(test_cyclic.interval_ms, lwip_cyclic_timer, &test_cyclic); + + cyclic_fired = 0; + sys_check_timeouts(); + fail_unless(cyclic_fired == 0); + + lwip_sys_now = offset + 2*test_cyclic.interval_ms; + sys_check_timeouts(); + fail_unless(cyclic_fired == 1); + + fail_unless((*list_head)->time == (u32_t)(lwip_sys_now + test_cyclic.interval_ms)); +} + +START_TEST(test_cyclic_timers) +{ + LWIP_UNUSED_ARG(_i); + + /* check without u32_t wraparound */ + do_test_cyclic_timers(0); + + /* check with u32_t wraparound */ + do_test_cyclic_timers(0xfffffff0); +} +END_TEST + +/* reproduce bug #52748: the bug in timeouts.c */ +START_TEST(test_bug52748) +{ + LWIP_UNUSED_ARG(_i); + + memset(&fired, 0, sizeof(fired)); + + lwip_sys_now = 50; + sys_timeout(20, dummy_handler, LWIP_PTR_NUMERIC_CAST(void*, 0)); + sys_timeout( 5, dummy_handler, LWIP_PTR_NUMERIC_CAST(void*, 2)); + + lwip_sys_now = 55; + sys_check_timeouts(); + fail_unless(fired[0] == 0); + fail_unless(fired[1] == 0); + fail_unless(fired[2] == 1); + + lwip_sys_now = 60; + sys_timeout(10, dummy_handler, LWIP_PTR_NUMERIC_CAST(void*, 1)); + sys_check_timeouts(); + fail_unless(fired[0] == 0); + fail_unless(fired[1] == 0); + fail_unless(fired[2] == 1); + + lwip_sys_now = 70; + sys_check_timeouts(); + fail_unless(fired[0] == 1); + fail_unless(fired[1] == 1); + fail_unless(fired[2] == 1); +} +END_TEST + +static void +do_test_timers(u32_t offset) +{ + struct sys_timeo** list_head = sys_timeouts_get_next_timeout(); + + lwip_sys_now = offset + 0; + + sys_timeout(10, dummy_handler, LWIP_PTR_NUMERIC_CAST(void*, 0)); + fail_unless(sys_timeouts_sleeptime() == 10); + sys_timeout(20, dummy_handler, LWIP_PTR_NUMERIC_CAST(void*, 1)); + fail_unless(sys_timeouts_sleeptime() == 10); + sys_timeout( 5, dummy_handler, LWIP_PTR_NUMERIC_CAST(void*, 2)); + fail_unless(sys_timeouts_sleeptime() == 5); + + /* linked list correctly sorted? */ + fail_unless((*list_head)->time == (u32_t)(lwip_sys_now + 5)); + fail_unless((*list_head)->next->time == (u32_t)(lwip_sys_now + 10)); + fail_unless((*list_head)->next->next->time == (u32_t)(lwip_sys_now + 20)); + + /* check timers expire in correct order */ + memset(&fired, 0, sizeof(fired)); + + lwip_sys_now += 4; + sys_check_timeouts(); + fail_unless(fired[2] == 0); + + lwip_sys_now += 1; + sys_check_timeouts(); + fail_unless(fired[2] == 1); + + lwip_sys_now += 4; + sys_check_timeouts(); + fail_unless(fired[0] == 0); + + lwip_sys_now += 1; + sys_check_timeouts(); + fail_unless(fired[0] == 1); + + lwip_sys_now += 9; + sys_check_timeouts(); + fail_unless(fired[1] == 0); + + lwip_sys_now += 1; + sys_check_timeouts(); + fail_unless(fired[1] == 1); + + sys_untimeout(dummy_handler, LWIP_PTR_NUMERIC_CAST(void*, 0)); + sys_untimeout(dummy_handler, LWIP_PTR_NUMERIC_CAST(void*, 1)); + sys_untimeout(dummy_handler, LWIP_PTR_NUMERIC_CAST(void*, 2)); +} + +START_TEST(test_timers) +{ + LWIP_UNUSED_ARG(_i); + + /* check without u32_t wraparound */ + do_test_timers(0); + + /* check with u32_t wraparound */ + do_test_timers(0xfffffff0); +} +END_TEST + +START_TEST(test_long_timer) +{ + LWIP_UNUSED_ARG(_i); + + memset(&fired, 0, sizeof(fired)); + lwip_sys_now = 0; + + sys_timeout(LWIP_UINT32_MAX / 4, dummy_handler, LWIP_PTR_NUMERIC_CAST(void*, 0)); + fail_unless(sys_timeouts_sleeptime() == LWIP_UINT32_MAX / 4); + + sys_check_timeouts(); + fail_unless(fired[0] == 0); + + lwip_sys_now += LWIP_UINT32_MAX / 8; + + sys_check_timeouts(); + fail_unless(fired[0] == 0); + + lwip_sys_now += LWIP_UINT32_MAX / 8; + + sys_check_timeouts(); + fail_unless(fired[0] == 0); + + lwip_sys_now += 1; + + sys_check_timeouts(); + fail_unless(fired[0] == 1); + + sys_untimeout(dummy_handler, LWIP_PTR_NUMERIC_CAST(void*, 0)); +} +END_TEST + +/** Create the suite including all tests for this module */ +Suite * +timers_suite(void) +{ + testfunc tests[] = { + TESTFUNC(test_bug52748), + TESTFUNC(test_cyclic_timers), + TESTFUNC(test_timers), + TESTFUNC(test_long_timer), + }; + return create_suite("TIMERS", tests, LWIP_ARRAYSIZE(tests), timers_setup, timers_teardown); +} diff --git a/Libraries/LwIP/test/unit/core/test_timers.h b/Libraries/LwIP/test/unit/core/test_timers.h new file mode 100644 index 0000000..b16ab75 --- /dev/null +++ b/Libraries/LwIP/test/unit/core/test_timers.h @@ -0,0 +1,8 @@ +#ifndef LWIP_HDR_TEST_TIMERS_H +#define LWIP_HDR_TEST_TIMERS_H + +#include "../lwip_check.h" + +Suite *timers_suite(void); + +#endif diff --git a/Libraries/LwIP/test/unit/dhcp/test_dhcp.c b/Libraries/LwIP/test/unit/dhcp/test_dhcp.c index 64803c4..4837c14 100755 --- a/Libraries/LwIP/test/unit/dhcp/test_dhcp.c +++ b/Libraries/LwIP/test/unit/dhcp/test_dhcp.c @@ -121,7 +121,8 @@ static enum tcase { TEST_LWIP_DHCP_NAK, TEST_LWIP_DHCP_RELAY, TEST_LWIP_DHCP_NAK_NO_ENDMARKER, - TEST_LWIP_DHCP_INVALID_OVERLOAD + TEST_LWIP_DHCP_INVALID_OVERLOAD, + TEST_NONE } tcase; static int debug = 0; @@ -188,10 +189,12 @@ static err_t testif_init(struct netif *netif) static void dhcp_setup(void) { txpacket = 0; + lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); } static void dhcp_teardown(void) { + lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); } static void check_pkt(struct pbuf *p, u32_t pos, const u8_t *mem, u32_t len) @@ -445,6 +448,7 @@ START_TEST(test_dhcp) IP4_ADDR(&gw, 0, 0, 0, 0); netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, ethernet_input); + netif_set_link_up(&net_test); netif_set_up(&net_test); dhcp_start(&net_test); @@ -490,6 +494,9 @@ START_TEST(test_dhcp) fail_if(memcmp(&netmask, &net_test.netmask, sizeof(ip4_addr_t))); fail_if(memcmp(&gw, &net_test.gw, sizeof(ip4_addr_t))); + tcase = TEST_NONE; + dhcp_stop(&net_test); + dhcp_cleanup(&net_test); netif_remove(&net_test); } END_TEST @@ -514,6 +521,7 @@ START_TEST(test_dhcp_nak) IP4_ADDR(&gw, 0, 0, 0, 0); netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, ethernet_input); + netif_set_link_up(&net_test); netif_set_up(&net_test); dhcp_start(&net_test); @@ -552,6 +560,9 @@ START_TEST(test_dhcp_nak) fail_unless(txpacket == 4); /* DHCP nak sent */ + tcase = TEST_NONE; + dhcp_stop(&net_test); + dhcp_cleanup(&net_test); netif_remove(&net_test); } END_TEST @@ -732,6 +743,7 @@ START_TEST(test_dhcp_relayed) IP4_ADDR(&gw, 0, 0, 0, 0); netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, ethernet_input); + netif_set_link_up(&net_test); netif_set_up(&net_test); dhcp_start(&net_test); @@ -796,6 +808,9 @@ START_TEST(test_dhcp_relayed) fail_unless(txpacket == 7, "txpacket = %d", txpacket); + tcase = TEST_NONE; + dhcp_stop(&net_test); + dhcp_cleanup(&net_test); netif_remove(&net_test); } @@ -860,6 +875,9 @@ START_TEST(test_dhcp_nak_no_endmarker) 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; u32_t xid; + struct dhcp* dhcp; + u8_t tries; + u16_t request_timeout; LWIP_UNUSED_ARG(_i); tcase = TEST_LWIP_DHCP_NAK_NO_ENDMARKER; @@ -870,12 +888,14 @@ START_TEST(test_dhcp_nak_no_endmarker) IP4_ADDR(&gw, 0, 0, 0, 0); netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, ethernet_input); + netif_set_link_up(&net_test); netif_set_up(&net_test); dhcp_start(&net_test); + dhcp = netif_dhcp_data(&net_test); fail_unless(txpacket == 1); /* DHCP discover sent */ - xid = netif_dhcp_data(&net_test)->xid; /* Write bad xid, not using htonl! */ + xid = dhcp->xid; /* Write bad xid, not using htonl! */ memcpy(&dhcp_offer[46], &xid, 4); send_pkt(&net_test, dhcp_offer, sizeof(dhcp_offer)); @@ -885,20 +905,29 @@ START_TEST(test_dhcp_nak_no_endmarker) fail_if(memcmp(&gw, &net_test.gw, sizeof(ip4_addr_t))); fail_unless(txpacket == 1); /* Nothing more sent */ - xid = htonl(netif_dhcp_data(&net_test)->xid); + xid = htonl(dhcp->xid); memcpy(&dhcp_offer[46], &xid, 4); /* insert correct transaction id */ send_pkt(&net_test, dhcp_offer, sizeof(dhcp_offer)); - - fail_unless(netif_dhcp_data(&net_test)->state == DHCP_STATE_REQUESTING); + + fail_unless(dhcp->state == DHCP_STATE_REQUESTING); fail_unless(txpacket == 2); /* No more sent */ - xid = htonl(netif_dhcp_data(&net_test)->xid); /* xid updated */ + xid = htonl(dhcp->xid); /* xid updated */ memcpy(&dhcp_nack_no_endmarker[46], &xid, 4); /* insert transaction id */ + tries = dhcp->tries; + request_timeout = dhcp->request_timeout; send_pkt(&net_test, dhcp_nack_no_endmarker, sizeof(dhcp_nack_no_endmarker)); - /* NAK should put us in another state for a while, no other way detecting it */ - fail_unless(netif_dhcp_data(&net_test)->state != DHCP_STATE_REQUESTING); + /* NAK should be ignored */ + fail_unless(dhcp->state == DHCP_STATE_REQUESTING); + fail_unless(txpacket == 2); /* No more sent */ + fail_unless(xid == htonl(dhcp->xid)); + fail_unless(tries == dhcp->tries); + fail_unless(request_timeout == dhcp->request_timeout); + tcase = TEST_NONE; + dhcp_stop(&net_test); + dhcp_cleanup(&net_test); netif_remove(&net_test); } END_TEST @@ -966,6 +995,7 @@ START_TEST(test_dhcp_invalid_overload) IP4_ADDR(&gw, 0, 0, 0, 0); netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, ethernet_input); + netif_set_link_up(&net_test); netif_set_up(&net_test); dhcp_start(&net_test); @@ -1005,6 +1035,9 @@ START_TEST(test_dhcp_invalid_overload) fail_unless(txpacket == 2); /* No more sent */ xid = htonl(netif_dhcp_data(&net_test)->xid); /* xid updated */ + tcase = TEST_NONE; + dhcp_stop(&net_test); + dhcp_cleanup(&net_test); netif_remove(&net_test); } END_TEST diff --git a/Libraries/LwIP/test/unit/etharp/test_etharp.c b/Libraries/LwIP/test/unit/etharp/test_etharp.c index f2edc72..5d481f1 100755 --- a/Libraries/LwIP/test/unit/etharp/test_etharp.c +++ b/Libraries/LwIP/test/unit/etharp/test_etharp.c @@ -4,6 +4,7 @@ #include "lwip/etharp.h" #include "netif/ethernet.h" #include "lwip/stats.h" +#include "lwip/prot/iana.h" #if !LWIP_STATS || !UDP_STATS || !MEMP_STATS || !ETHARP_STATS #error "This tests needs UDP-, MEMP- and ETHARP-statistics enabled" @@ -89,7 +90,7 @@ create_arp_response(ip4_addr_t *adr) ethhdr->src = test_ethaddr2; ethhdr->type = htons(ETHTYPE_ARP); - etharphdr->hwtype = htons(/*HWTYPE_ETHERNET*/ 1); + etharphdr->hwtype = htons(LWIP_IANA_HWTYPE_ETHERNET); etharphdr->proto = htons(ETHTYPE_IP); etharphdr->hwlen = ETHARP_HWADDR_LEN; etharphdr->protolen = sizeof(ip4_addr_t); @@ -119,6 +120,7 @@ etharp_setup(void) { etharp_remove_all(); default_netif_add(); + lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); } static void @@ -126,6 +128,7 @@ etharp_teardown(void) { etharp_remove_all(); default_netif_remove(); + lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); } @@ -136,7 +139,7 @@ START_TEST(test_etharp_table) #if ETHARP_SUPPORT_STATIC_ENTRIES err_t err; #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ - s8_t idx; + ssize_t idx; const ip4_addr_t *unused_ipaddr; struct eth_addr *unused_ethaddr; struct udp_pcb* pcb; diff --git a/Libraries/LwIP/test/unit/ip4/test_ip4.c b/Libraries/LwIP/test/unit/ip4/test_ip4.c index 383acf3..c4ba2f6 100755 --- a/Libraries/LwIP/test/unit/ip4/test_ip4.c +++ b/Libraries/LwIP/test/unit/ip4/test_ip4.c @@ -6,6 +6,8 @@ #include "lwip/prot/ip.h" #include "lwip/prot/ip4.h" +#include "lwip/tcpip.h" + #if !LWIP_IPV4 || !IP_REASSEMBLY || !MIB2_STATS || !IPFRAG_STATS #error "This tests needs LWIP_IPV4, IP_REASSEMBLY; MIB2- and IPFRAG-statistics enabled" #endif @@ -55,6 +57,7 @@ create_ip4_input_fragment(u16_t ip_id, u16_t start, u16_t len, int last) static void ip4_setup(void) { + lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); } static void @@ -65,6 +68,9 @@ ip4_teardown(void) netif_list->loop_first = NULL; } netif_list->loop_last = NULL; + /* poll until all memory is released... */ + tcpip_thread_poll_one(); + lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); } diff --git a/Libraries/LwIP/test/unit/ip6/test_ip6.c b/Libraries/LwIP/test/unit/ip6/test_ip6.c new file mode 100644 index 0000000..f337136 --- /dev/null +++ b/Libraries/LwIP/test/unit/ip6/test_ip6.c @@ -0,0 +1,321 @@ +#include "test_ip6.h" + +#include "lwip/ethip6.h" +#include "lwip/ip6.h" +#include "lwip/inet_chksum.h" +#include "lwip/nd6.h" +#include "lwip/stats.h" +#include "lwip/prot/ethernet.h" +#include "lwip/prot/ip.h" +#include "lwip/prot/ip6.h" + +#include "lwip/tcpip.h" + +#if LWIP_IPV6 /* allow to build the unit tests without IPv6 support */ + +static struct netif test_netif6; +static int linkoutput_ctr; + +static err_t +default_netif_linkoutput(struct netif *netif, struct pbuf *p) +{ + fail_unless(netif == &test_netif6); + fail_unless(p != NULL); + linkoutput_ctr++; + return ERR_OK; +} + +static err_t +default_netif_init(struct netif *netif) +{ + fail_unless(netif != NULL); + netif->linkoutput = default_netif_linkoutput; + netif->output_ip6 = ethip6_output; + netif->mtu = 1500; + netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHERNET | NETIF_FLAG_MLD6; + netif->hwaddr_len = ETH_HWADDR_LEN; + return ERR_OK; +} + +static void +default_netif_add(void) +{ + struct netif *n; + fail_unless(netif_default == NULL); + n = netif_add_noaddr(&test_netif6, NULL, default_netif_init, NULL); + fail_unless(n == &test_netif6); + netif_set_default(&test_netif6); +} + +static void +default_netif_remove(void) +{ + fail_unless(netif_default == &test_netif6); + netif_remove(&test_netif6); +} + +static void +ip6_test_handle_timers(int count) +{ + int i; + for (i = 0; i < count; i++) { + nd6_tmr(); + } +} + +/* Setups/teardown functions */ + +static void +ip6_setup(void) +{ + default_netif_add(); + lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); +} + +static void +ip6_teardown(void) +{ + if (netif_list->loop_first != NULL) { + pbuf_free(netif_list->loop_first); + netif_list->loop_first = NULL; + } + netif_list->loop_last = NULL; + /* poll until all memory is released... */ + tcpip_thread_poll_one(); + default_netif_remove(); + lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); +} + + +/* Test functions */ + +static void +test_ip6_ll_addr_iter(int expected_ctr1, int expected_ctr2) +{ + fail_unless(linkoutput_ctr == 0); + + /* test that nothing is sent with link uo but netif down */ + netif_set_link_up(&test_netif6); + ip6_test_handle_timers(500); + fail_unless(linkoutput_ctr == 0); + netif_set_link_down(&test_netif6); + fail_unless(linkoutput_ctr == 0); + + /* test that nothing is sent with link down but netif up */ + netif_set_up(&test_netif6); + ip6_test_handle_timers(500); + fail_unless(linkoutput_ctr == 0); + netif_set_down(&test_netif6); + fail_unless(linkoutput_ctr == 0); + + /* test what is sent with link up + netif up */ + netif_set_link_up(&test_netif6); + netif_set_up(&test_netif6); + ip6_test_handle_timers(500); + fail_unless(linkoutput_ctr == expected_ctr1); + netif_set_down(&test_netif6); + netif_set_link_down(&test_netif6); + fail_unless(linkoutput_ctr == expected_ctr1); + linkoutput_ctr = 0; + + netif_set_up(&test_netif6); + netif_set_link_up(&test_netif6); + ip6_test_handle_timers(500); + fail_unless(linkoutput_ctr == expected_ctr2); + netif_set_link_down(&test_netif6); + netif_set_down(&test_netif6); + fail_unless(linkoutput_ctr == expected_ctr2); + linkoutput_ctr = 0; +} + +START_TEST(test_ip6_ll_addr) +{ + LWIP_UNUSED_ARG(_i); + + /* test without link-local address */ + test_ip6_ll_addr_iter(0, 0); + + /* test with link-local address */ + netif_create_ip6_linklocal_address(&test_netif6, 1); + test_ip6_ll_addr_iter(3 + LWIP_IPV6_DUP_DETECT_ATTEMPTS + LWIP_IPV6_MLD, 3); +} +END_TEST + +START_TEST(test_ip6_aton_ipv4mapped) +{ + int ret; + ip_addr_t addr; + ip6_addr_t addr6; + const ip_addr_t addr_expected = IPADDR6_INIT_HOST(0, 0, 0xFFFF, 0xD4CC65D2); + const char *full_ipv6_addr = "0:0:0:0:0:FFFF:D4CC:65D2"; + const char *shortened_ipv6_addr = "::FFFF:D4CC:65D2"; + const char *full_ipv4_mapped_addr = "0:0:0:0:0:FFFF:212.204.101.210"; + const char *shortened_ipv4_mapped_addr = "::FFFF:212.204.101.210"; + const char *bogus_ipv4_mapped_addr = "::FFFF:212.204.101.2101"; + LWIP_UNUSED_ARG(_i); + + /* check IPv6 representation */ + memset(&addr6, 0, sizeof(addr6)); + ret = ip6addr_aton(full_ipv6_addr, &addr6); + fail_unless(ret == 1); + fail_unless(memcmp(&addr6, &addr_expected, 16) == 0); + memset(&addr, 0, sizeof(addr)); + ret = ipaddr_aton(full_ipv6_addr, &addr); + fail_unless(ret == 1); + fail_unless(memcmp(&addr, &addr_expected, 16) == 0); + + /* check shortened IPv6 representation */ + memset(&addr6, 0, sizeof(addr6)); + ret = ip6addr_aton(shortened_ipv6_addr, &addr6); + fail_unless(ret == 1); + fail_unless(memcmp(&addr6, &addr_expected, 16) == 0); + memset(&addr, 0, sizeof(addr)); + ret = ipaddr_aton(shortened_ipv6_addr, &addr); + fail_unless(ret == 1); + fail_unless(memcmp(&addr, &addr_expected, 16) == 0); + + /* checked shortened mixed representation */ + memset(&addr6, 0, sizeof(addr6)); + ret = ip6addr_aton(shortened_ipv4_mapped_addr, &addr6); + fail_unless(ret == 1); + fail_unless(memcmp(&addr6, &addr_expected, 16) == 0); + memset(&addr, 0, sizeof(addr)); + ret = ipaddr_aton(shortened_ipv4_mapped_addr, &addr); + fail_unless(ret == 1); + fail_unless(memcmp(&addr, &addr_expected, 16) == 0); + + /* checked mixed representation */ + memset(&addr6, 0, sizeof(addr6)); + ret = ip6addr_aton(full_ipv4_mapped_addr, &addr6); + fail_unless(ret == 1); + fail_unless(memcmp(&addr6, &addr_expected, 16) == 0); + memset(&addr, 0, sizeof(addr)); + ret = ipaddr_aton(full_ipv4_mapped_addr, &addr); + fail_unless(ret == 1); + fail_unless(memcmp(&addr, &addr_expected, 16) == 0); + + /* checked bogus mixed representation */ + memset(&addr6, 0, sizeof(addr6)); + ret = ip6addr_aton(bogus_ipv4_mapped_addr, &addr6); + fail_unless(ret == 0); + memset(&addr, 0, sizeof(addr)); + ret = ipaddr_aton(bogus_ipv4_mapped_addr, &addr); + fail_unless(ret == 0); +} +END_TEST + +START_TEST(test_ip6_ntoa_ipv4mapped) +{ + const ip_addr_t addr = IPADDR6_INIT_HOST(0, 0, 0xFFFF, 0xD4CC65D2); + char buf[128]; + char *str; + LWIP_UNUSED_ARG(_i); + + str = ip6addr_ntoa_r(ip_2_ip6(&addr), buf, sizeof(buf)); + fail_unless(str == buf); + fail_unless(!strcmp(str, "::FFFF:212.204.101.210")); +} +END_TEST + +struct test_addr_and_str { + ip_addr_t addr; + const char *str; +}; + +START_TEST(test_ip6_ntoa) +{ + struct test_addr_and_str tests[] = { + {IPADDR6_INIT_HOST(0xfe800000, 0x00000000, 0xb2a1a2ff, 0xfea3a4a5), "FE80::B2A1:A2FF:FEA3:A4A5"}, /* test shortened zeros */ + {IPADDR6_INIT_HOST(0xfe800000, 0xff000000, 0xb2a1a2ff, 0xfea3a4a5), "FE80:0:FF00:0:B2A1:A2FF:FEA3:A4A5"}, /* don't omit single zero blocks */ + {IPADDR6_INIT_HOST(0xfe800000, 0xff000000, 0xb2000000, 0x0000a4a5), "FE80:0:FF00:0:B200::A4A5"}, /* omit longest zero block */ + }; + char buf[128]; + char *str; + size_t i; + LWIP_UNUSED_ARG(_i); + + for (i = 0; i < LWIP_ARRAYSIZE(tests); i++) { + str = ip6addr_ntoa_r(ip_2_ip6(&tests[i].addr), buf, sizeof(buf)); + fail_unless(str == buf); + fail_unless(!strcmp(str, tests[i].str)); + } +} +END_TEST + +START_TEST(test_ip6_lladdr) +{ + u8_t zeros[128]; + const u8_t test_mac_addr[6] = {0xb0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5}; + const u32_t expected_ip6_addr_1[4] = {PP_HTONL(0xfe800000), 0, PP_HTONL(0xb2a1a2ff), PP_HTONL(0xfea3a4a5)}; + const u32_t expected_ip6_addr_2[4] = {PP_HTONL(0xfe800000), 0, PP_HTONL(0x0000b0a1), PP_HTONL(0xa2a3a4a5)}; + LWIP_UNUSED_ARG(_i); + memset(zeros, 0, sizeof(zeros)); + + fail_unless(test_netif6.hwaddr_len == 6); + fail_unless(!memcmp(test_netif6.hwaddr, zeros, 6)); + + fail_unless(test_netif6.ip6_addr_state[0] == 0); + fail_unless(!memcmp(netif_ip6_addr(&test_netif6, 0), zeros, sizeof(ip6_addr_t))); + + /* set specific mac addr */ + memcpy(test_netif6.hwaddr, test_mac_addr, 6); + + /* create link-local addr based on mac (EUI-48) */ + netif_create_ip6_linklocal_address(&test_netif6, 1); + fail_unless(IP_IS_V6(&test_netif6.ip6_addr[0])); + fail_unless(!memcmp(&netif_ip6_addr(&test_netif6, 0)->addr, expected_ip6_addr_1, 16)); +#if LWIP_IPV6_SCOPES + fail_unless(netif_ip6_addr(&test_netif6, 0)->zone == (test_netif6.num + 1)); +#endif + /* reset address */ + memset(&test_netif6.ip6_addr[0], 0, sizeof(ip6_addr_t)); + test_netif6.ip6_addr_state[0] = 0; + + /* create link-local addr based interface ID */ + netif_create_ip6_linklocal_address(&test_netif6, 0); + fail_unless(IP_IS_V6(&test_netif6.ip6_addr[0])); + fail_unless(!memcmp(&netif_ip6_addr(&test_netif6, 0)->addr, expected_ip6_addr_2, 16)); +#if LWIP_IPV6_SCOPES + fail_unless(netif_ip6_addr(&test_netif6, 0)->zone == (test_netif6.num + 1)); +#endif + /* reset address */ + memset(&test_netif6.ip6_addr[0], 0, sizeof(ip6_addr_t)); + test_netif6.ip6_addr_state[0] = 0; + + /* reset mac address */ + memset(&test_netif6.hwaddr, 0, sizeof(test_netif6.hwaddr)); +} +END_TEST + +/** Create the suite including all tests for this module */ +Suite * +ip6_suite(void) +{ + testfunc tests[] = { + TESTFUNC(test_ip6_ll_addr), + TESTFUNC(test_ip6_aton_ipv4mapped), + TESTFUNC(test_ip6_ntoa_ipv4mapped), + TESTFUNC(test_ip6_ntoa), + TESTFUNC(test_ip6_lladdr) + }; + return create_suite("IPv6", tests, sizeof(tests)/sizeof(testfunc), ip6_setup, ip6_teardown); +} + +#else /* LWIP_IPV6 */ + +/* allow to build the unit tests without IPv6 support */ +START_TEST(test_ip6_dummy) +{ + LWIP_UNUSED_ARG(_i); +} +END_TEST + +Suite * +ip6_suite(void) +{ + testfunc tests[] = { + TESTFUNC(test_ip6_dummy), + }; + return create_suite("IPv6", tests, sizeof(tests)/sizeof(testfunc), NULL, NULL); +} +#endif /* LWIP_IPV6 */ diff --git a/Libraries/LwIP/test/unit/ip6/test_ip6.h b/Libraries/LwIP/test/unit/ip6/test_ip6.h new file mode 100644 index 0000000..a09345b --- /dev/null +++ b/Libraries/LwIP/test/unit/ip6/test_ip6.h @@ -0,0 +1,8 @@ +#ifndef LWIP_HDR_TEST_IP6_H +#define LWIP_HDR_TEST_IP6_H + +#include "../lwip_check.h" + +Suite* ip6_suite(void); + +#endif diff --git a/Libraries/LwIP/test/unit/lwip_check.h b/Libraries/LwIP/test/unit/lwip_check.h index 78876ef..cfcc4e3 100755 --- a/Libraries/LwIP/test/unit/lwip_check.h +++ b/Libraries/LwIP/test/unit/lwip_check.h @@ -34,4 +34,9 @@ Suite* create_suite(const char* name, testfunc *tests, size_t num_tests, SFun se int lwip_unittests_run(void) #endif +/* helper functions */ +#define SKIP_POOL(x) (1 << x) +#define SKIP_HEAP (1 << MEMP_MAX) +void lwip_check_ensure_no_alloc(unsigned int skip); + #endif /* LWIP_HDR_LWIP_CHECK_H */ diff --git a/Libraries/LwIP/test/unit/lwip_unittests.c b/Libraries/LwIP/test/unit/lwip_unittests.c index 5563015..864c5ec 100755 --- a/Libraries/LwIP/test/unit/lwip_unittests.c +++ b/Libraries/LwIP/test/unit/lwip_unittests.c @@ -1,16 +1,25 @@ #include "lwip_check.h" #include "ip4/test_ip4.h" +#include "ip6/test_ip6.h" #include "udp/test_udp.h" #include "tcp/test_tcp.h" #include "tcp/test_tcp_oos.h" +#include "core/test_def.h" #include "core/test_mem.h" +#include "core/test_netif.h" #include "core/test_pbuf.h" +#include "core/test_timers.h" #include "etharp/test_etharp.h" #include "dhcp/test_dhcp.h" #include "mdns/test_mdns.h" +#include "mqtt/test_mqtt.h" +#include "api/test_sockets.h" #include "lwip/init.h" +#if !NO_SYS +#include "lwip/tcpip.h" +#endif Suite* create_suite(const char* name, testfunc *tests, size_t num_tests, SFun setup, SFun teardown) { @@ -28,6 +37,21 @@ Suite* create_suite(const char* name, testfunc *tests, size_t num_tests, SFun se return s; } +void lwip_check_ensure_no_alloc(unsigned int skip) +{ + int i; + unsigned int mask; + + if (!(skip & SKIP_HEAP)) { + fail_unless(lwip_stats.mem.used == 0); + } + for (i = 0, mask = 1; i < MEMP_MAX; i++, mask <<= 1) { + if (!(skip & mask)) { + fail_unless(lwip_stats.memp[i]->used == 0); + } + } +} + #ifdef LWIP_UNITTESTS_LIB int lwip_unittests_run(void) #else @@ -39,21 +63,32 @@ int main(void) size_t i; suite_getter_fn* suites[] = { ip4_suite, + ip6_suite, udp_suite, tcp_suite, tcp_oos_suite, + def_suite, mem_suite, + netif_suite, pbuf_suite, + timers_suite, etharp_suite, dhcp_suite, - mdns_suite + mdns_suite, + mqtt_suite, + sockets_suite }; size_t num = sizeof(suites)/sizeof(void*); LWIP_ASSERT("No suites defined", num > 0); +#if NO_SYS lwip_init(); +#else + tcpip_init(NULL, NULL); +#endif sr = srunner_create((suites[0])()); + srunner_set_xml(sr, "lwip_unittests.xml"); for(i = 1; i < num; i++) { srunner_add_suite(sr, ((suite_getter_fn*)suites[i])()); } diff --git a/Libraries/LwIP/test/unit/lwipopts.h b/Libraries/LwIP/test/unit/lwipopts.h index 9bd672b..d570268 100755 --- a/Libraries/LwIP/test/unit/lwipopts.h +++ b/Libraries/LwIP/test/unit/lwipopts.h @@ -32,11 +32,23 @@ #ifndef LWIP_HDR_LWIPOPTS_H #define LWIP_HDR_LWIPOPTS_H -/* Prevent having to link sys_arch.c (we don't test the API layers in unit tests) */ -#define NO_SYS 1 +#define LWIP_TESTMODE 1 + +#define LWIP_IPV6 1 + +#define LWIP_CHECKSUM_ON_COPY 1 +#define TCP_CHECKSUM_ON_COPY_SANITY_CHECK 1 +#define TCP_CHECKSUM_ON_COPY_SANITY_CHECK_FAIL(printfmsg) LWIP_ASSERT("TCP_CHECKSUM_ON_COPY_SANITY_CHECK_FAIL", 0) + +/* We link to special sys_arch.c (for basic non-waiting API layers unit tests) */ +#define NO_SYS 0 #define SYS_LIGHTWEIGHT_PROT 0 -#define LWIP_NETCONN 0 -#define LWIP_SOCKET 0 +#define LWIP_NETCONN !NO_SYS +#define LWIP_SOCKET !NO_SYS +#define LWIP_NETCONN_FULLDUPLEX LWIP_SOCKET +#define LWIP_NETBUF_RECVINFO 1 +#define LWIP_HAVE_LOOPIF 1 +#define TCPIP_THREAD_TEST /* Enable DHCP to test it, disable UDP checksum to easier inject packets */ #define LWIP_DHCP 1 @@ -59,7 +71,15 @@ /* Minimal changes to opt.h required for etharp unit tests: */ #define ETHARP_SUPPORT_STATIC_ENTRIES 1 +#define MEMP_NUM_SYS_TIMEOUT (LWIP_NUM_SYS_TIMEOUT_INTERNAL + 8) + /* MIB2 stats are required to check IPv4 reassembly results */ #define MIB2_STATS 1 +/* netif tests want to test this, so enable: */ +#define LWIP_NETIF_EXT_STATUS_CALLBACK 1 + +/* Check lwip_stats.mem.illegal instead of asserting */ +#define LWIP_MEM_ILLEGAL_FREE(msg) /* to nothing */ + #endif /* LWIP_HDR_LWIPOPTS_H */ diff --git a/Libraries/LwIP/test/unit/mdns/test_mdns.c b/Libraries/LwIP/test/unit/mdns/test_mdns.c index 900b9dd..14e3af6 100755 --- a/Libraries/LwIP/test/unit/mdns/test_mdns.c +++ b/Libraries/LwIP/test/unit/mdns/test_mdns.c @@ -45,8 +45,8 @@ START_TEST(readname_basic) LWIP_UNUSED_ARG(_i); p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM); - p->payload = (void *)(size_t)data; fail_if(p == NULL); + p->payload = (void *)(size_t)data; offset = mdns_readname(p, 0, &domain); pbuf_free(p); fail_unless(offset == sizeof(data)); @@ -64,8 +64,8 @@ START_TEST(readname_anydata) LWIP_UNUSED_ARG(_i); p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM); - p->payload = (void *)(size_t)data; fail_if(p == NULL); + p->payload = (void *)(size_t)data; offset = mdns_readname(p, 0, &domain); pbuf_free(p); fail_unless(offset == sizeof(data)); @@ -83,8 +83,8 @@ START_TEST(readname_short_buf) LWIP_UNUSED_ARG(_i); p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM); - p->payload = (void *)(size_t)data; fail_if(p == NULL); + p->payload = (void *)(size_t)data; offset = mdns_readname(p, 0, &domain); pbuf_free(p); fail_unless(offset == MDNS_READNAME_ERROR); @@ -108,8 +108,8 @@ START_TEST(readname_long_label) LWIP_UNUSED_ARG(_i); p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM); - p->payload = (void *)(size_t)data; fail_if(p == NULL); + p->payload = (void *)(size_t)data; offset = mdns_readname(p, 0, &domain); pbuf_free(p); fail_unless(offset == MDNS_READNAME_ERROR); @@ -164,8 +164,8 @@ START_TEST(readname_overflow) LWIP_UNUSED_ARG(_i); p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM); - p->payload = (void *)(size_t)data; fail_if(p == NULL); + p->payload = (void *)(size_t)data; offset = mdns_readname(p, 0, &domain); pbuf_free(p); fail_unless(offset == MDNS_READNAME_ERROR); @@ -189,8 +189,8 @@ START_TEST(readname_jump_earlier) LWIP_UNUSED_ARG(_i); p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM); - p->payload = (void *)(size_t)data; fail_if(p == NULL); + p->payload = (void *)(size_t)data; offset = mdns_readname(p, 20, &domain); pbuf_free(p); fail_unless(offset == sizeof(data)); @@ -218,8 +218,8 @@ START_TEST(readname_jump_earlier_jump) LWIP_UNUSED_ARG(_i); p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM); - p->payload = (void *)(size_t)data; fail_if(p == NULL); + p->payload = (void *)(size_t)data; offset = mdns_readname(p, 0x18, &domain); pbuf_free(p); fail_unless(offset == sizeof(data)); @@ -252,8 +252,8 @@ START_TEST(readname_jump_maxdepth) LWIP_UNUSED_ARG(_i); p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM); - p->payload = (void *)(size_t)data; fail_if(p == NULL); + p->payload = (void *)(size_t)data; offset = mdns_readname(p, 0x30, &domain); pbuf_free(p); fail_unless(offset == sizeof(data)); @@ -278,8 +278,8 @@ START_TEST(readname_jump_later) LWIP_UNUSED_ARG(_i); p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM); - p->payload = (void *)(size_t)data; fail_if(p == NULL); + p->payload = (void *)(size_t)data; offset = mdns_readname(p, 0, &domain); pbuf_free(p); fail_unless(offset == 13); @@ -300,8 +300,8 @@ START_TEST(readname_half_jump) LWIP_UNUSED_ARG(_i); p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM); - p->payload = (void *)(size_t)data; fail_if(p == NULL); + p->payload = (void *)(size_t)data; offset = mdns_readname(p, 0, &domain); pbuf_free(p); fail_unless(offset == MDNS_READNAME_ERROR); @@ -319,8 +319,8 @@ START_TEST(readname_jump_toolong) LWIP_UNUSED_ARG(_i); p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM); - p->payload = (void *)(size_t)data; fail_if(p == NULL); + p->payload = (void *)(size_t)data; offset = mdns_readname(p, 0, &domain); pbuf_free(p); fail_unless(offset == MDNS_READNAME_ERROR); @@ -339,8 +339,8 @@ START_TEST(readname_jump_loop_label) LWIP_UNUSED_ARG(_i); p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM); - p->payload = (void *)(size_t)data; fail_if(p == NULL); + p->payload = (void *)(size_t)data; offset = mdns_readname(p, 10, &domain); pbuf_free(p); fail_unless(offset == MDNS_READNAME_ERROR); @@ -359,8 +359,8 @@ START_TEST(readname_jump_loop_jump) LWIP_UNUSED_ARG(_i); p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM); - p->payload = (void *)(size_t)data; fail_if(p == NULL); + p->payload = (void *)(size_t)data; offset = mdns_readname(p, 10, &domain); pbuf_free(p); fail_unless(offset == MDNS_READNAME_ERROR); @@ -603,8 +603,8 @@ START_TEST(compress_full_match) LWIP_UNUSED_ARG(_i); p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM); - p->payload = (void *)(size_t)data; fail_if(p == NULL); + p->payload = (void *)(size_t)data; memset(&domain, 0, sizeof(domain)); res = mdns_domain_add_label(&domain, "foobar", 6); @@ -638,8 +638,8 @@ START_TEST(compress_full_match_subset) LWIP_UNUSED_ARG(_i); p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM); - p->payload = (void *)(size_t)data; fail_if(p == NULL); + p->payload = (void *)(size_t)data; memset(&domain, 0, sizeof(domain)); res = mdns_domain_add_label(&domain, "foobar", 6); @@ -675,8 +675,8 @@ START_TEST(compress_full_match_jump) LWIP_UNUSED_ARG(_i); p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM); - p->payload = (void *)(size_t)data; fail_if(p == NULL); + p->payload = (void *)(size_t)data; memset(&domain, 0, sizeof(domain)); res = mdns_domain_add_label(&domain, "foobar", 6); @@ -710,8 +710,8 @@ START_TEST(compress_no_match) LWIP_UNUSED_ARG(_i); p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM); - p->payload = (void *)(size_t)data; fail_if(p == NULL); + p->payload = (void *)(size_t)data; memset(&domain, 0, sizeof(domain)); res = mdns_domain_add_label(&domain, "foobar", 6); @@ -744,8 +744,8 @@ START_TEST(compress_2nd_label) LWIP_UNUSED_ARG(_i); p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM); - p->payload = (void *)(size_t)data; fail_if(p == NULL); + p->payload = (void *)(size_t)data; memset(&domain, 0, sizeof(domain)); res = mdns_domain_add_label(&domain, "lwip", 4); @@ -779,8 +779,8 @@ START_TEST(compress_2nd_label_short) LWIP_UNUSED_ARG(_i); p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM); - p->payload = (void *)(size_t)data; fail_if(p == NULL); + p->payload = (void *)(size_t)data; memset(&domain, 0, sizeof(domain)); res = mdns_domain_add_label(&domain, "foobar", 6); @@ -816,8 +816,8 @@ START_TEST(compress_jump_to_jump) LWIP_UNUSED_ARG(_i); p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM); - p->payload = (void *)(size_t)data; fail_if(p == NULL); + p->payload = (void *)(size_t)data; memset(&domain, 0, sizeof(domain)); res = mdns_domain_add_label(&domain, "foobar", 6); @@ -856,8 +856,8 @@ START_TEST(compress_long_match) LWIP_UNUSED_ARG(_i); p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM); - p->payload = (void *)(size_t)data; fail_if(p == NULL); + p->payload = (void *)(size_t)data; memset(&domain, 0, sizeof(domain)); res = mdns_domain_add_label(&domain, "foobar", 6); diff --git a/Libraries/LwIP/test/unit/mqtt/test_mqtt.c b/Libraries/LwIP/test/unit/mqtt/test_mqtt.c new file mode 100644 index 0000000..7cff13e --- /dev/null +++ b/Libraries/LwIP/test/unit/mqtt/test_mqtt.c @@ -0,0 +1,115 @@ +#include "test_mqtt.h" + +#include "lwip/pbuf.h" +#include "lwip/apps/mqtt.h" +#include "lwip/apps/mqtt_priv.h" +#include "lwip/netif.h" + +const ip_addr_t test_mqtt_local_ip = IPADDR4_INIT_BYTES(192, 168, 1, 1); +const ip_addr_t test_mqtt_remote_ip = IPADDR4_INIT_BYTES(192, 168, 1, 2); +const ip_addr_t test_mqtt_netmask = IPADDR4_INIT_BYTES(255, 255, 255, 0); + +static err_t test_mqtt_netif_output(struct netif *netif, struct pbuf *p, + const ip4_addr_t *ipaddr) +{ + LWIP_UNUSED_ARG(netif); + LWIP_UNUSED_ARG(ipaddr); + LWIP_UNUSED_ARG(p); + return ERR_OK; +} + +static void +test_mqtt_init_netif(struct netif *netif, const ip_addr_t *ip_addr, const ip_addr_t *netmask) +{ + struct netif *n; + memset(netif, 0, sizeof(struct netif)); + netif->output = test_mqtt_netif_output; + netif->flags |= NETIF_FLAG_UP | NETIF_FLAG_LINK_UP; + ip_addr_copy_from_ip4(netif->netmask, *ip_2_ip4(netmask)); + ip_addr_copy_from_ip4(netif->ip_addr, *ip_2_ip4(ip_addr)); + for (n = netif_list; n != NULL; n = n->next) { + if (n == netif) { + return; + } + } + netif->next = NULL; + netif_list = netif; +} + +/* Setups/teardown functions */ +static struct netif *old_netif_list; +static struct netif *old_netif_default; + +static void +mqtt_setup(void) +{ + old_netif_list = netif_list; + old_netif_default = netif_default; + netif_list = NULL; + netif_default = NULL; + lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); +} + +static void +mqtt_teardown(void) +{ + netif_list = NULL; + netif_default = NULL; + /* restore netif_list for next tests (e.g. loopif) */ + netif_list = old_netif_list; + netif_default = old_netif_default; + lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); +} + +static void test_mqtt_connection_cb(mqtt_client_t *client, void *arg, mqtt_connection_status_t status) +{ + LWIP_UNUSED_ARG(client); + LWIP_UNUSED_ARG(arg); + LWIP_UNUSED_ARG(status); +} + +START_TEST(basic_connect) +{ + mqtt_client_t* client; + struct netif netif; + err_t err; + struct mqtt_connect_client_info_t client_info = { + "dumm", + NULL, NULL, + 10, + NULL, NULL, 0, 0 + }; + struct pbuf *p; + unsigned char rxbuf[] = {0x20, 0x02, 0x00, 0x00}; + LWIP_UNUSED_ARG(_i); + + test_mqtt_init_netif(&netif, &test_mqtt_local_ip, &test_mqtt_netmask); + + client = mqtt_client_new(); + fail_unless(client != NULL); + err = mqtt_client_connect(client, &test_mqtt_remote_ip, 1234, test_mqtt_connection_cb, NULL, &client_info); + fail_unless(err == ERR_OK); + + client->conn->connected(client->conn->callback_arg, client->conn, ERR_OK); + p = pbuf_alloc(PBUF_RAW, sizeof(rxbuf), PBUF_REF); + fail_unless(p != NULL); + p->payload = rxbuf; + /* since we hack the rx path, we have to hack the rx window, too: */ + client->conn->rcv_wnd -= p->tot_len; + if (client->conn->recv(client->conn->callback_arg, client->conn, p, ERR_OK) != ERR_OK) { + pbuf_free(p); + } + + mqtt_disconnect(client); + /* fixme: mqtt_client_fre() is missing... */ + mem_free(client); +} +END_TEST + +Suite* mqtt_suite(void) +{ + testfunc tests[] = { + TESTFUNC(basic_connect), + }; + return create_suite("MQTT", tests, sizeof(tests)/sizeof(testfunc), mqtt_setup, mqtt_teardown); +} diff --git a/Libraries/LwIP/test/unit/mqtt/test_mqtt.h b/Libraries/LwIP/test/unit/mqtt/test_mqtt.h new file mode 100644 index 0000000..181758c --- /dev/null +++ b/Libraries/LwIP/test/unit/mqtt/test_mqtt.h @@ -0,0 +1,8 @@ +#ifndef LWIP_HDR_TEST_MQTT_H__ +#define LWIP_HDR_TEST_MQTT_H__ + +#include "../lwip_check.h" + +Suite* mqtt_suite(void); + +#endif diff --git a/Libraries/LwIP/test/unit/tcp/tcp_helper.c b/Libraries/LwIP/test/unit/tcp/tcp_helper.c index 7a0e818..abc5fad 100755 --- a/Libraries/LwIP/test/unit/tcp/tcp_helper.c +++ b/Libraries/LwIP/test/unit/tcp/tcp_helper.c @@ -10,6 +10,10 @@ #error "This tests needs TCP- and MEMP-statistics enabled" #endif +const ip_addr_t test_local_ip = IPADDR4_INIT_BYTES(192, 168, 1, 1); +const ip_addr_t test_remote_ip = IPADDR4_INIT_BYTES(192, 168, 1, 2); +const ip_addr_t test_netmask = IPADDR4_INIT_BYTES(255, 255, 255, 0); + /** Remove all pcbs on the given list. */ static void tcp_remove(struct tcp_pcb* pcb_list) @@ -29,6 +33,7 @@ void tcp_remove_all(void) { tcp_remove(tcp_listen_pcbs.pcbs); + tcp_remove(tcp_bound_pcbs); tcp_remove(tcp_active_pcbs); tcp_remove(tcp_tw_pcbs); fail_unless(MEMP_STATS_GET(used, MEMP_TCP_PCB) == 0); @@ -138,8 +143,8 @@ struct pbuf* tcp_create_rx_segment_wnd(struct tcp_pcb* pcb, void* data, size_t d /** Safely bring a tcp_pcb into the requested state */ void -tcp_set_state(struct tcp_pcb* pcb, enum tcp_state state, ip_addr_t* local_ip, - ip_addr_t* remote_ip, u16_t local_port, u16_t remote_port) +tcp_set_state(struct tcp_pcb* pcb, enum tcp_state state, const ip_addr_t* local_ip, + const ip_addr_t* remote_ip, u16_t local_port, u16_t remote_port) { u32_t iss; @@ -292,7 +297,7 @@ static err_t test_tcp_netif_output(struct netif *netif, struct pbuf *p, } void test_tcp_init_netif(struct netif *netif, struct test_tcp_txcounters *txcounters, - ip_addr_t *ip_addr, ip_addr_t *netmask) + const ip_addr_t *ip_addr, const ip_addr_t *netmask) { struct netif *n; memset(netif, 0, sizeof(struct netif)); diff --git a/Libraries/LwIP/test/unit/tcp/tcp_helper.h b/Libraries/LwIP/test/unit/tcp/tcp_helper.h index ea8fc72..5d3afc9 100755 --- a/Libraries/LwIP/test/unit/tcp/tcp_helper.h +++ b/Libraries/LwIP/test/unit/tcp/tcp_helper.h @@ -26,6 +26,12 @@ struct test_tcp_txcounters { struct pbuf *tx_packets; }; +extern const ip_addr_t test_local_ip; +extern const ip_addr_t test_remote_ip; +extern const ip_addr_t test_netmask; +#define TEST_REMOTE_PORT 0x100 +#define TEST_LOCAL_PORT 0x101 + /* Helper functions */ void tcp_remove_all(void); @@ -36,8 +42,8 @@ struct pbuf* tcp_create_rx_segment(struct tcp_pcb* pcb, void* data, size_t data_ u32_t seqno_offset, u32_t ackno_offset, u8_t headerflags); struct pbuf* tcp_create_rx_segment_wnd(struct tcp_pcb* pcb, void* data, size_t data_len, u32_t seqno_offset, u32_t ackno_offset, u8_t headerflags, u16_t wnd); -void tcp_set_state(struct tcp_pcb* pcb, enum tcp_state state, ip_addr_t* local_ip, - ip_addr_t* remote_ip, u16_t local_port, u16_t remote_port); +void tcp_set_state(struct tcp_pcb* pcb, enum tcp_state state, const ip_addr_t* local_ip, + const ip_addr_t* remote_ip, u16_t local_port, u16_t remote_port); void test_tcp_counters_err(void* arg, err_t err); err_t test_tcp_counters_recv(void* arg, struct tcp_pcb* pcb, struct pbuf* p, err_t err); @@ -46,7 +52,7 @@ struct tcp_pcb* test_tcp_new_counters_pcb(struct test_tcp_counters* counters); void test_tcp_input(struct pbuf *p, struct netif *inp); void test_tcp_init_netif(struct netif *netif, struct test_tcp_txcounters *txcounters, - ip_addr_t *ip_addr, ip_addr_t *netmask); + const ip_addr_t *ip_addr, const ip_addr_t *netmask); #endif diff --git a/Libraries/LwIP/test/unit/tcp/test_tcp.c b/Libraries/LwIP/test/unit/tcp/test_tcp.c index 25063aa..e5cddf1 100755 --- a/Libraries/LwIP/test/unit/tcp/test_tcp.c +++ b/Libraries/LwIP/test/unit/tcp/test_tcp.c @@ -16,6 +16,17 @@ #error "This tests needs TCP_SND_BUF to be > TCP_WND" #endif +/* used with check_seqnos() */ +#define SEQNO1 (0xFFFFFF00 - TCP_MSS) +#define ISS 6510 +static u32_t seqnos[] = { + SEQNO1, + SEQNO1 + (1 * TCP_MSS), + SEQNO1 + (2 * TCP_MSS), + SEQNO1 + (3 * TCP_MSS), + SEQNO1 + (4 * TCP_MSS), + SEQNO1 + (5 * TCP_MSS) }; + static u8_t test_tcp_timer; /* our own version of tcp_tmr so we can reset fast/slow timer state */ @@ -29,18 +40,27 @@ test_tcp_tmr(void) } /* Setups/teardown functions */ +static struct netif *old_netif_list; +static struct netif *old_netif_default; static void tcp_setup(void) { + struct tcp_pcb dummy_pcb; /* we need this for tcp_next_iss() only */ + + old_netif_list = netif_list; + old_netif_default = netif_default; + netif_list = NULL; + netif_default = NULL; /* reset iss to default (6510) */ tcp_ticks = 0; - tcp_ticks = 0 - (tcp_next_iss(NULL) - 6510); - tcp_next_iss(NULL); + tcp_ticks = 0 - (tcp_next_iss(&dummy_pcb) - 6510); + tcp_next_iss(&dummy_pcb); tcp_ticks = 0; test_tcp_timer = 0; tcp_remove_all(); + lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); } static void @@ -49,6 +69,10 @@ tcp_teardown(void) netif_list = NULL; netif_default = NULL; tcp_remove_all(); + /* restore netif_list for next tests (e.g. loopif) */ + netif_list = old_netif_list; + netif_default = old_netif_default; + lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); } @@ -72,6 +96,65 @@ START_TEST(test_tcp_new_abort) } END_TEST +/** Call tcp_new() and tcp_abort() and test memp stats */ +START_TEST(test_tcp_listen_passive_open) +{ + struct tcp_pcb *pcb, *pcbl; + struct tcp_pcb_listen *lpcb; + struct netif netif; + struct test_tcp_txcounters txcounters; + struct test_tcp_counters counters; + struct pbuf *p; + ip_addr_t src_addr; + err_t err; + LWIP_UNUSED_ARG(_i); + + fail_unless(MEMP_STATS_GET(used, MEMP_TCP_PCB) == 0); + + test_tcp_init_netif(&netif, &txcounters, &test_local_ip, &test_netmask); + /* initialize counter struct */ + memset(&counters, 0, sizeof(counters)); + + pcb = tcp_new(); + EXPECT_RET(pcb != NULL); + err = tcp_bind(pcb, &netif.ip_addr, 1234); + EXPECT(err == ERR_OK); + pcbl = tcp_listen(pcb); + EXPECT_RET(pcbl != NULL); + EXPECT_RET(pcbl != pcb); + lpcb = (struct tcp_pcb_listen *)pcbl; + + ip_addr_set_ip4_u32_val(src_addr, lwip_htonl(lwip_ntohl(ip_addr_get_ip4_u32(&lpcb->local_ip)) + 1)); + + /* check correct syn packet */ + p = tcp_create_segment(&src_addr, &lpcb->local_ip, 12345, + lpcb->local_port, NULL, 0, 12345, 54321, TCP_SYN); + EXPECT(p != NULL); + if (p != NULL) { + /* pass the segment to tcp_input */ + test_tcp_input(p, &netif); + /* check if counters are as expected */ + EXPECT(txcounters.num_tx_calls == 1); + } + + /* check syn packet with short length */ + p = tcp_create_segment(&src_addr, &lpcb->local_ip, 12345, + lpcb->local_port, NULL, 0, 12345, 54321, TCP_SYN); + EXPECT(p != NULL); + EXPECT(p->next == NULL); + if ((p != NULL) && (p->next == NULL)) { + p->len -= 2; + p->tot_len -= 2; + /* pass the segment to tcp_input */ + test_tcp_input(p, &netif); + /* check if counters are as expected */ + EXPECT(txcounters.num_tx_calls == 1); + } + + tcp_close(pcbl); +} +END_TEST + /** Create an ESTABLISHED pcb and check if receive callback is called */ START_TEST(test_tcp_recv_inseq) { @@ -79,19 +162,13 @@ START_TEST(test_tcp_recv_inseq) struct tcp_pcb* pcb; struct pbuf* p; char data[] = {1, 2, 3, 4}; - ip_addr_t remote_ip, local_ip, netmask; u16_t data_len; - u16_t remote_port = 0x100, local_port = 0x101; struct netif netif; struct test_tcp_txcounters txcounters; LWIP_UNUSED_ARG(_i); /* initialize local vars */ - memset(&netif, 0, sizeof(netif)); - IP_ADDR4(&local_ip, 192, 168, 1, 1); - IP_ADDR4(&remote_ip, 192, 168, 1, 2); - IP_ADDR4(&netmask, 255, 255, 255, 0); - test_tcp_init_netif(&netif, &txcounters, &local_ip, &netmask); + test_tcp_init_netif(&netif, &txcounters, &test_local_ip, &test_netmask); data_len = sizeof(data); /* initialize counter struct */ memset(&counters, 0, sizeof(counters)); @@ -101,7 +178,7 @@ START_TEST(test_tcp_recv_inseq) /* create and initialize the pcb */ pcb = test_tcp_new_counters_pcb(&counters); EXPECT_RET(pcb != NULL); - tcp_set_state(pcb, ESTABLISHED, &local_ip, &remote_ip, local_port, remote_port); + tcp_set_state(pcb, ESTABLISHED, &test_local_ip, &test_remote_ip, TEST_LOCAL_PORT, TEST_REMOTE_PORT); /* create a segment */ p = tcp_create_rx_segment(pcb, counters.expected_data, data_len, 0, 0, 0); @@ -123,6 +200,183 @@ START_TEST(test_tcp_recv_inseq) } END_TEST +/** Create an ESTABLISHED pcb and check if receive callback is called if a segment + * overlapping rcv_nxt is received */ +START_TEST(test_tcp_recv_inseq_trim) +{ + struct test_tcp_counters counters; + struct tcp_pcb* pcb; + struct pbuf* p; + char data[PBUF_POOL_BUFSIZE*2]; + u16_t data_len; + struct netif netif; + struct test_tcp_txcounters txcounters; + const u32_t new_data_len = 40; + LWIP_UNUSED_ARG(_i); + + /* initialize local vars */ + test_tcp_init_netif(&netif, &txcounters, &test_local_ip, &test_netmask); + data_len = sizeof(data); + memset(data, 0, sizeof(data)); + /* initialize counter struct */ + memset(&counters, 0, sizeof(counters)); + counters.expected_data_len = data_len; + counters.expected_data = data; + + /* create and initialize the pcb */ + pcb = test_tcp_new_counters_pcb(&counters); + EXPECT_RET(pcb != NULL); + tcp_set_state(pcb, ESTABLISHED, &test_local_ip, &test_remote_ip, TEST_LOCAL_PORT, TEST_REMOTE_PORT); + + /* create a segment (with an overlapping/old seqno so that the new data begins in the 2nd pbuf) */ + p = tcp_create_rx_segment(pcb, counters.expected_data, data_len, (u32_t)(0-(data_len-new_data_len)), 0, 0); + EXPECT(p != NULL); + if (p != NULL) { + EXPECT(p->next != NULL); + if (p->next != NULL) { + EXPECT(p->next->next != NULL); + } + } + if ((p != NULL) && (p->next != NULL) && (p->next->next != NULL)) { + /* pass the segment to tcp_input */ + test_tcp_input(p, &netif); + /* check if counters are as expected */ + EXPECT(counters.close_calls == 0); + EXPECT(counters.recv_calls == 1); + EXPECT(counters.recved_bytes == new_data_len); + EXPECT(counters.err_calls == 0); + } + + /* make sure the pcb is freed */ + EXPECT(MEMP_STATS_GET(used, MEMP_TCP_PCB) == 1); + tcp_abort(pcb); + EXPECT(MEMP_STATS_GET(used, MEMP_TCP_PCB) == 0); +} +END_TEST + +static err_t test_tcp_recv_expect1byte(void* arg, struct tcp_pcb* pcb, struct pbuf* p, err_t err); + +static err_t +test_tcp_recv_expectclose(void* arg, struct tcp_pcb* pcb, struct pbuf* p, err_t err) +{ + EXPECT_RETX(pcb != NULL, ERR_OK); + EXPECT_RETX(err == ERR_OK, ERR_OK); + LWIP_UNUSED_ARG(arg); + + if (p != NULL) { + fail(); + } else { + /* correct: FIN received; close our end, too */ + err_t err2 = tcp_close(pcb); + fail_unless(err2 == ERR_OK); + /* set back to some other rx function, just to not get here again */ + tcp_recv(pcb, test_tcp_recv_expect1byte); + } + return ERR_OK; +} + +static err_t +test_tcp_recv_expect1byte(void* arg, struct tcp_pcb* pcb, struct pbuf* p, err_t err) +{ + EXPECT_RETX(pcb != NULL, ERR_OK); + EXPECT_RETX(err == ERR_OK, ERR_OK); + LWIP_UNUSED_ARG(arg); + + if (p != NULL) { + if ((p->len == 1) && (p->tot_len == 1)) { + tcp_recv(pcb, test_tcp_recv_expectclose); + } else { + fail(); + } + pbuf_free(p); + } else { + fail(); + } + return ERR_OK; +} + +START_TEST(test_tcp_passive_close) +{ + struct test_tcp_counters counters; + struct tcp_pcb* pcb; + struct pbuf* p; + char data = 0x0f; + struct netif netif; + struct test_tcp_txcounters txcounters; + LWIP_UNUSED_ARG(_i); + + /* initialize local vars */ + test_tcp_init_netif(&netif, &txcounters, &test_local_ip, &test_netmask); + + /* initialize counter struct */ + memset(&counters, 0, sizeof(counters)); + counters.expected_data_len = 1; + counters.expected_data = &data; + + /* create and initialize the pcb */ + pcb = test_tcp_new_counters_pcb(&counters); + EXPECT_RET(pcb != NULL); + tcp_set_state(pcb, ESTABLISHED, &test_local_ip, &test_remote_ip, TEST_LOCAL_PORT, TEST_REMOTE_PORT); + + /* create a segment without data */ + p = tcp_create_rx_segment(pcb, &data, 1, 0, 0, TCP_FIN); + EXPECT(p != NULL); + if (p != NULL) { + tcp_recv(pcb, test_tcp_recv_expect1byte); + /* pass the segment to tcp_input */ + test_tcp_input(p, &netif); + } + /* don't free the pcb here (part of the test!) */ +} +END_TEST + +START_TEST(test_tcp_active_abort) +{ + struct test_tcp_counters counters; + struct tcp_pcb* pcb; + char data = 0x0f; + struct netif netif; + struct test_tcp_txcounters txcounters; + LWIP_UNUSED_ARG(_i); + + memset(&txcounters, 0, sizeof(txcounters)); + + /* initialize local vars */ + test_tcp_init_netif(&netif, &txcounters, &test_local_ip, &test_netmask); + + /* initialize counter struct */ + memset(&counters, 0, sizeof(counters)); + counters.expected_data_len = 1; + counters.expected_data = &data; + + /* create and initialize the pcb */ + pcb = test_tcp_new_counters_pcb(&counters); + EXPECT_RET(pcb != NULL); + tcp_set_state(pcb, ESTABLISHED, &test_local_ip, &test_remote_ip, TEST_LOCAL_PORT, TEST_REMOTE_PORT); + + /* abort the pcb */ + EXPECT_RET(txcounters.num_tx_calls == 0); + txcounters.copy_tx_packets = 1; + tcp_abort(pcb); + txcounters.copy_tx_packets = 0; + EXPECT(txcounters.num_tx_calls == 1); + EXPECT(txcounters.num_tx_bytes == 40U); + EXPECT(txcounters.tx_packets != NULL); + if (txcounters.tx_packets != NULL) { + u16_t ret; + struct tcp_hdr tcphdr; + ret = pbuf_copy_partial(txcounters.tx_packets, &tcphdr, 20, 20); + EXPECT(ret == 20); + EXPECT(tcphdr.dest == PP_HTONS(TEST_REMOTE_PORT)); + EXPECT(tcphdr.src == PP_HTONS(TEST_LOCAL_PORT)); + pbuf_free(txcounters.tx_packets); + txcounters.tx_packets = NULL; + } + + /* don't free the pcb here (part of the test!) */ +} +END_TEST + /** Check that we handle malformed tcp headers, and discard the pbuf(s) */ START_TEST(test_tcp_malformed_header) { @@ -130,20 +384,14 @@ START_TEST(test_tcp_malformed_header) struct tcp_pcb* pcb; struct pbuf* p; char data[] = {1, 2, 3, 4}; - ip_addr_t remote_ip, local_ip, netmask; u16_t data_len, chksum; - u16_t remote_port = 0x100, local_port = 0x101; struct netif netif; struct test_tcp_txcounters txcounters; struct tcp_hdr *hdr; LWIP_UNUSED_ARG(_i); /* initialize local vars */ - memset(&netif, 0, sizeof(netif)); - IP_ADDR4(&local_ip, 192, 168, 1, 1); - IP_ADDR4(&remote_ip, 192, 168, 1, 2); - IP_ADDR4(&netmask, 255, 255, 255, 0); - test_tcp_init_netif(&netif, &txcounters, &local_ip, &netmask); + test_tcp_init_netif(&netif, &txcounters, &test_local_ip, &test_netmask); data_len = sizeof(data); /* initialize counter struct */ memset(&counters, 0, sizeof(counters)); @@ -153,7 +401,7 @@ START_TEST(test_tcp_malformed_header) /* create and initialize the pcb */ pcb = test_tcp_new_counters_pcb(&counters); EXPECT_RET(pcb != NULL); - tcp_set_state(pcb, ESTABLISHED, &local_ip, &remote_ip, local_port, remote_port); + tcp_set_state(pcb, ESTABLISHED, &test_local_ip, &test_remote_ip, TEST_LOCAL_PORT, TEST_REMOTE_PORT); /* create a segment */ p = tcp_create_rx_segment(pcb, counters.expected_data, data_len, 0, 0, 0); @@ -166,7 +414,7 @@ START_TEST(test_tcp_malformed_header) hdr->chksum = 0; chksum = ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len, - &remote_ip, &local_ip); + &test_remote_ip, &test_local_ip); hdr->chksum = chksum; @@ -207,22 +455,17 @@ START_TEST(test_tcp_fast_retx_recover) char data4[] = {13, 14, 15, 16}; char data5[] = {17, 18, 19, 20}; char data6[TCP_MSS] = {21, 22, 23, 24}; - ip_addr_t remote_ip, local_ip, netmask; - u16_t remote_port = 0x100, local_port = 0x101; err_t err; LWIP_UNUSED_ARG(_i); /* initialize local vars */ - IP_ADDR4(&local_ip, 192, 168, 1, 1); - IP_ADDR4(&remote_ip, 192, 168, 1, 2); - IP_ADDR4(&netmask, 255, 255, 255, 0); - test_tcp_init_netif(&netif, &txcounters, &local_ip, &netmask); + test_tcp_init_netif(&netif, &txcounters, &test_local_ip, &test_netmask); memset(&counters, 0, sizeof(counters)); /* create and initialize the pcb */ pcb = test_tcp_new_counters_pcb(&counters); EXPECT_RET(pcb != NULL); - tcp_set_state(pcb, ESTABLISHED, &local_ip, &remote_ip, local_port, remote_port); + tcp_set_state(pcb, ESTABLISHED, &test_local_ip, &test_remote_ip, TEST_LOCAL_PORT, TEST_REMOTE_PORT); pcb->mss = TCP_MSS; /* disable initial congestion window (we don't send a SYN here...) */ pcb->cwnd = pcb->snd_wnd; @@ -388,19 +631,9 @@ START_TEST(test_tcp_fast_rexmit_wraparound) struct test_tcp_counters counters; struct tcp_pcb* pcb; struct pbuf* p; - ip_addr_t remote_ip, local_ip, netmask; - u16_t remote_port = 0x100, local_port = 0x101; err_t err; -#define SEQNO1 (0xFFFFFF00 - TCP_MSS) -#define ISS 6510 - u16_t i, sent_total = 0; - u32_t seqnos[] = { - SEQNO1, - SEQNO1 + (1 * TCP_MSS), - SEQNO1 + (2 * TCP_MSS), - SEQNO1 + (3 * TCP_MSS), - SEQNO1 + (4 * TCP_MSS), - SEQNO1 + (5 * TCP_MSS)}; + size_t i; + u16_t sent_total = 0; LWIP_UNUSED_ARG(_i); for (i = 0; i < sizeof(tx_data); i++) { @@ -408,17 +641,14 @@ START_TEST(test_tcp_fast_rexmit_wraparound) } /* initialize local vars */ - IP_ADDR4(&local_ip, 192, 168, 1, 1); - IP_ADDR4(&remote_ip, 192, 168, 1, 2); - IP_ADDR4(&netmask, 255, 255, 255, 0); - test_tcp_init_netif(&netif, &txcounters, &local_ip, &netmask); + test_tcp_init_netif(&netif, &txcounters, &test_local_ip, &test_netmask); memset(&counters, 0, sizeof(counters)); /* create and initialize the pcb */ tcp_ticks = SEQNO1 - ISS; pcb = test_tcp_new_counters_pcb(&counters); EXPECT_RET(pcb != NULL); - tcp_set_state(pcb, ESTABLISHED, &local_ip, &remote_ip, local_port, remote_port); + tcp_set_state(pcb, ESTABLISHED, &test_local_ip, &test_remote_ip, TEST_LOCAL_PORT, TEST_REMOTE_PORT); pcb->mss = TCP_MSS; /* disable initial congestion window (we don't send a SYN here...) */ pcb->cwnd = 2*TCP_MSS; @@ -488,19 +718,10 @@ START_TEST(test_tcp_rto_rexmit_wraparound) struct test_tcp_txcounters txcounters; struct test_tcp_counters counters; struct tcp_pcb* pcb; - ip_addr_t remote_ip, local_ip, netmask; - u16_t remote_port = 0x100, local_port = 0x101; + struct tcp_pcb dummy_pcb_for_iss; /* we need this for tcp_next_iss() only */ err_t err; -#define SEQNO1 (0xFFFFFF00 - TCP_MSS) -#define ISS 6510 - u16_t i, sent_total = 0; - u32_t seqnos[] = { - SEQNO1, - SEQNO1 + (1 * TCP_MSS), - SEQNO1 + (2 * TCP_MSS), - SEQNO1 + (3 * TCP_MSS), - SEQNO1 + (4 * TCP_MSS), - SEQNO1 + (5 * TCP_MSS)}; + size_t i; + u16_t sent_total = 0; LWIP_UNUSED_ARG(_i); for (i = 0; i < sizeof(tx_data); i++) { @@ -508,19 +729,16 @@ START_TEST(test_tcp_rto_rexmit_wraparound) } /* initialize local vars */ - IP_ADDR4(&local_ip, 192, 168, 1, 1); - IP_ADDR4(&remote_ip, 192, 168, 1, 2); - IP_ADDR4(&netmask, 255, 255, 255, 0); - test_tcp_init_netif(&netif, &txcounters, &local_ip, &netmask); + test_tcp_init_netif(&netif, &txcounters, &test_local_ip, &test_netmask); memset(&counters, 0, sizeof(counters)); /* create and initialize the pcb */ tcp_ticks = 0; - tcp_ticks = 0 - tcp_next_iss(NULL); - tcp_ticks = SEQNO1 - tcp_next_iss(NULL); + tcp_ticks = 0 - tcp_next_iss(&dummy_pcb_for_iss); + tcp_ticks = SEQNO1 - tcp_next_iss(&dummy_pcb_for_iss); pcb = test_tcp_new_counters_pcb(&counters); EXPECT_RET(pcb != NULL); - tcp_set_state(pcb, ESTABLISHED, &local_ip, &remote_ip, local_port, remote_port); + tcp_set_state(pcb, ESTABLISHED, &test_local_ip, &test_remote_ip, TEST_LOCAL_PORT, TEST_REMOTE_PORT); pcb->mss = TCP_MSS; /* disable initial congestion window (we don't send a SYN here...) */ pcb->cwnd = 2*TCP_MSS; @@ -577,10 +795,9 @@ static void test_tcp_tx_full_window_lost(u8_t zero_window_probe_from_unsent) struct test_tcp_counters counters; struct tcp_pcb* pcb; struct pbuf *p; - ip_addr_t remote_ip, local_ip, netmask; - u16_t remote_port = 0x100, local_port = 0x101; err_t err; - u16_t sent_total, i; + size_t i; + u16_t sent_total; u8_t expected = 0xFE; for (i = 0; i < sizeof(tx_data); i++) { @@ -597,17 +814,13 @@ static void test_tcp_tx_full_window_lost(u8_t zero_window_probe_from_unsent) } /* initialize local vars */ - IP_ADDR4(&local_ip, 192, 168, 1, 1); - IP_ADDR4(&remote_ip, 192, 168, 1, 2); - IP_ADDR4(&netmask, 255, 255, 255, 0); - test_tcp_init_netif(&netif, &txcounters, &local_ip, &netmask); + test_tcp_init_netif(&netif, &txcounters, &test_local_ip, &test_netmask); memset(&counters, 0, sizeof(counters)); - memset(&txcounters, 0, sizeof(txcounters)); /* create and initialize the pcb */ pcb = test_tcp_new_counters_pcb(&counters); EXPECT_RET(pcb != NULL); - tcp_set_state(pcb, ESTABLISHED, &local_ip, &remote_ip, local_port, remote_port); + tcp_set_state(pcb, ESTABLISHED, &test_local_ip, &test_remote_ip, TEST_LOCAL_PORT, TEST_REMOTE_PORT); pcb->mss = TCP_MSS; /* disable initial congestion window (we don't send a SYN here...) */ pcb->cwnd = pcb->snd_wnd; @@ -662,7 +875,9 @@ static void test_tcp_tx_full_window_lost(u8_t zero_window_probe_from_unsent) /* ensure this didn't trigger any transmission */ EXPECT(txcounters.num_tx_calls == 0); EXPECT(txcounters.num_tx_bytes == 0); - EXPECT(pcb->persist_backoff == 1); + /* window is completely full, but persist timer is off since send buffer is empty */ + EXPECT(pcb->snd_wnd == 0); + EXPECT(pcb->persist_backoff == 0); } /* send one byte more (out of window) -> persist timer starts */ @@ -726,19 +941,755 @@ START_TEST(test_tcp_tx_full_window_lost_from_unacked) } END_TEST +/** Send data, provoke retransmission and then add data to a segment + * that already has been sent before. */ +START_TEST(test_tcp_retx_add_to_sent) +{ + struct netif netif; + struct test_tcp_txcounters txcounters; + struct test_tcp_counters counters; + struct tcp_pcb* pcb; + struct pbuf* p; + char data1a[] = { 1, 2, 3}; + char data1b[] = { 4}; + char data2a[] = { 5, 6, 7, 8}; + char data2b[] = { 5, 6, 7}; + char data3[] = { 9, 10, 11, 12, 12}; + char data4[] = { 13, 14, 15, 16,17}; + err_t err; + int i; + LWIP_UNUSED_ARG(_i); + + /* initialize local vars */ + test_tcp_init_netif(&netif, &txcounters, &test_local_ip, &test_netmask); + memset(&counters, 0, sizeof(counters)); + + /* create and initialize the pcb */ + pcb = test_tcp_new_counters_pcb(&counters); + EXPECT_RET(pcb != NULL); + tcp_set_state(pcb, ESTABLISHED, &test_local_ip, &test_remote_ip, TEST_LOCAL_PORT, TEST_REMOTE_PORT); + pcb->mss = TCP_MSS; + /* disable initial congestion window (we don't send a SYN here...) */ + pcb->cwnd = pcb->snd_wnd; + + /* send data1 */ + err = tcp_write(pcb, data1a, sizeof(data1a), TCP_WRITE_FLAG_COPY); + EXPECT_RET(err == ERR_OK); + err = tcp_write(pcb, data1b, sizeof(data1b), TCP_WRITE_FLAG_COPY); + EXPECT_RET(err == ERR_OK); + err = tcp_output(pcb); + EXPECT_RET(err == ERR_OK); + EXPECT_RET(txcounters.num_tx_calls == 1); + EXPECT_RET(txcounters.num_tx_bytes == sizeof(data1a) + sizeof(data1b) + sizeof(struct tcp_hdr) + sizeof(struct ip_hdr)); + memset(&txcounters, 0, sizeof(txcounters)); + /* "recv" ACK for data1 */ + p = tcp_create_rx_segment(pcb, NULL, 0, 0, 4, TCP_ACK); + EXPECT_RET(p != NULL); + test_tcp_input(p, &netif); + EXPECT_RET(txcounters.num_tx_calls == 0); + EXPECT_RET(pcb->unacked == NULL); + /* send data2 */ + err = tcp_write(pcb, data2a, sizeof(data2a), TCP_WRITE_FLAG_COPY); + EXPECT_RET(err == ERR_OK); + err = tcp_write(pcb, data2b, sizeof(data2b), TCP_WRITE_FLAG_COPY); + EXPECT_RET(err == ERR_OK); + err = tcp_output(pcb); + EXPECT_RET(err == ERR_OK); + EXPECT_RET(txcounters.num_tx_calls == 1); + EXPECT_RET(txcounters.num_tx_bytes == sizeof(data2a) + sizeof(data2b) + sizeof(struct tcp_hdr) + sizeof(struct ip_hdr)); + memset(&txcounters, 0, sizeof(txcounters)); + /* send data3 */ + err = tcp_write(pcb, data3, sizeof(data3), TCP_WRITE_FLAG_COPY); + EXPECT_RET(err == ERR_OK); + err = tcp_output(pcb); + EXPECT_RET(err == ERR_OK); + EXPECT_RET(txcounters.num_tx_calls == 0); + EXPECT_RET(txcounters.num_tx_bytes == 0); + memset(&txcounters, 0, sizeof(txcounters)); + + /* data3 not sent yet (nagle) */ + EXPECT_RET(pcb->unacked != NULL); + EXPECT_RET(pcb->unsent != NULL); + + /* disable nagle for this test so data to sent segment can be added below... */ + tcp_nagle_disable(pcb); + + /* call the tcp timer some times */ + for (i = 0; i < 20; i++) { + test_tcp_tmr(); + if (txcounters.num_tx_calls != 0) { + break; + } + } + /* data3 sent */ + EXPECT_RET(txcounters.num_tx_calls == 1); + EXPECT_RET(txcounters.num_tx_bytes == sizeof(data3) + sizeof(struct tcp_hdr) + sizeof(struct ip_hdr)); + EXPECT_RET(pcb->unacked != NULL); + EXPECT_RET(pcb->unsent == NULL); + memset(&txcounters, 0, sizeof(txcounters)); + + tcp_nagle_enable(pcb); + + /* call the tcp timer some times */ + for (i = 0; i < 20; i++) { + test_tcp_tmr(); + if (txcounters.num_tx_calls != 0) { + break; + } + } + /* RTO: rexmit of data2 */ + EXPECT_RET(txcounters.num_tx_calls == 1); + EXPECT_RET(txcounters.num_tx_bytes == sizeof(data2a) + sizeof(data2b) + sizeof(struct tcp_hdr) + sizeof(struct ip_hdr)); + EXPECT_RET(pcb->unacked != NULL); + EXPECT_RET(pcb->unsent != NULL); + memset(&txcounters, 0, sizeof(txcounters)); + + /* send data4 */ + err = tcp_write(pcb, data4, sizeof(data4), TCP_WRITE_FLAG_COPY); + EXPECT_RET(err == ERR_OK); + /* disable nagle for this test so data to transmit without further ACKs... */ + tcp_nagle_disable(pcb); + err = tcp_output(pcb); + EXPECT_RET(err == ERR_OK); + /* nagle enabled, no tx calls */ + EXPECT_RET(txcounters.num_tx_calls == 1); + EXPECT_RET(txcounters.num_tx_bytes == sizeof(data3) + sizeof(data4) + sizeof(struct tcp_hdr) + sizeof(struct ip_hdr)); + memset(&txcounters, 0, sizeof(txcounters)); + /* make sure the pcb is freed */ + EXPECT_RET(MEMP_STATS_GET(used, MEMP_TCP_PCB) == 1); + tcp_abort(pcb); + EXPECT_RET(MEMP_STATS_GET(used, MEMP_TCP_PCB) == 0); +} +END_TEST + +START_TEST(test_tcp_rto_tracking) +{ + struct netif netif; + struct test_tcp_txcounters txcounters; + struct test_tcp_counters counters; + struct tcp_pcb* pcb; + struct pbuf* p; + err_t err; + size_t i; + u16_t sent_total = 0; + LWIP_UNUSED_ARG(_i); + + for (i = 0; i < sizeof(tx_data); i++) { + tx_data[i] = (u8_t)i; + } + + /* initialize local vars */ + test_tcp_init_netif(&netif, &txcounters, &test_local_ip, &test_netmask); + memset(&counters, 0, sizeof(counters)); + + /* create and initialize the pcb */ + tcp_ticks = SEQNO1 - ISS; + pcb = test_tcp_new_counters_pcb(&counters); + EXPECT_RET(pcb != NULL); + tcp_set_state(pcb, ESTABLISHED, &test_local_ip, &test_remote_ip, TEST_LOCAL_PORT, TEST_REMOTE_PORT); + pcb->mss = TCP_MSS; + /* Set congestion window large enough to send all our segments */ + pcb->cwnd = 5*TCP_MSS; + + /* send 5 mss-sized segments */ + for (i = 0; i < 5; i++) { + err = tcp_write(pcb, &tx_data[sent_total], TCP_MSS, TCP_WRITE_FLAG_COPY); + EXPECT_RET(err == ERR_OK); + sent_total += TCP_MSS; + } + check_seqnos(pcb->unsent, 5, seqnos); + EXPECT(pcb->unacked == NULL); + err = tcp_output(pcb); + EXPECT(txcounters.num_tx_calls == 5); + EXPECT(txcounters.num_tx_bytes == 5 * (TCP_MSS + 40U)); + memset(&txcounters, 0, sizeof(txcounters)); + /* Check all 5 are in-flight */ + EXPECT(pcb->unsent == NULL); + check_seqnos(pcb->unacked, 5, seqnos); + + /* Force us into retransmisson timeout */ + while (!(pcb->flags & TF_RTO)) { + test_tcp_tmr(); + } + /* Ensure 4 remaining segments are back on unsent, ready for retransmission */ + check_seqnos(pcb->unsent, 4, &seqnos[1]); + /* Ensure 1st segment is on unacked (already retransmitted) */ + check_seqnos(pcb->unacked, 1, seqnos); + EXPECT(txcounters.num_tx_calls == 1); + EXPECT(txcounters.num_tx_bytes == TCP_MSS + 40U); + memset(&txcounters, 0, sizeof(txcounters)); + /* Ensure rto_end points to next byte */ + EXPECT(pcb->rto_end == seqnos[5]); + EXPECT(pcb->rto_end == pcb->snd_nxt); + /* Check cwnd was reset */ + EXPECT(pcb->cwnd == pcb->mss); + + /* Add another segment to send buffer which is outside of RTO */ + err = tcp_write(pcb, &tx_data[sent_total], TCP_MSS, TCP_WRITE_FLAG_COPY); + EXPECT_RET(err == ERR_OK); + sent_total += TCP_MSS; + check_seqnos(pcb->unsent, 5, &seqnos[1]); + /* Ensure no new data was sent */ + EXPECT(txcounters.num_tx_calls == 0); + EXPECT(txcounters.num_tx_bytes == 0); + EXPECT(pcb->rto_end == pcb->snd_nxt); + + /* ACK first segment */ + p = tcp_create_rx_segment(pcb, NULL, 0, 0, TCP_MSS, TCP_ACK); + test_tcp_input(p, &netif); + /* Next two retranmissions should go out, due to cwnd in slow start */ + EXPECT(txcounters.num_tx_calls == 2); + EXPECT(txcounters.num_tx_bytes == 2 * (TCP_MSS + 40U)); + memset(&txcounters, 0, sizeof(txcounters)); + check_seqnos(pcb->unacked, 2, &seqnos[1]); + check_seqnos(pcb->unsent, 3, &seqnos[3]); + /* RTO should still be marked */ + EXPECT(pcb->flags & TF_RTO); + /* cwnd should have only grown by 1 MSS */ + EXPECT(pcb->cwnd == (tcpwnd_size_t)(2 * pcb->mss)); + /* Ensure no new data was sent */ + EXPECT(pcb->rto_end == pcb->snd_nxt); + + /* ACK the next two segments */ + p = tcp_create_rx_segment(pcb, NULL, 0, 0, 2*TCP_MSS, TCP_ACK); + test_tcp_input(p, &netif); + /* Final 2 retransmissions and 1 new data should go out */ + EXPECT(txcounters.num_tx_calls == 3); + EXPECT(txcounters.num_tx_bytes == 3 * (TCP_MSS + 40U)); + memset(&txcounters, 0, sizeof(txcounters)); + check_seqnos(pcb->unacked, 3, &seqnos[3]); + EXPECT(pcb->unsent == NULL); + /* RTO should still be marked */ + EXPECT(pcb->flags & TF_RTO); + /* cwnd should have only grown by 1 MSS */ + EXPECT(pcb->cwnd == (tcpwnd_size_t)(3 * pcb->mss)); + /* snd_nxt should have been advanced past rto_end */ + EXPECT(TCP_SEQ_GT(pcb->snd_nxt, pcb->rto_end)); + + /* ACK the next two segments, finishing our RTO, leaving new segment unacked */ + p = tcp_create_rx_segment(pcb, NULL, 0, 0, 2*TCP_MSS, TCP_ACK); + test_tcp_input(p, &netif); + EXPECT(!(pcb->flags & TF_RTO)); + check_seqnos(pcb->unacked, 1, &seqnos[5]); + /* We should be in ABC congestion avoidance, so no change in cwnd */ + EXPECT(pcb->cwnd == (tcpwnd_size_t)(3 * pcb->mss)); + EXPECT(pcb->cwnd >= pcb->ssthresh); + /* Ensure ABC congestion avoidance is tracking bytes acked */ + EXPECT(pcb->bytes_acked == (tcpwnd_size_t)(2 * pcb->mss)); + + /* make sure the pcb is freed */ + EXPECT_RET(MEMP_STATS_GET(used, MEMP_TCP_PCB) == 1); + tcp_abort(pcb); + EXPECT_RET(MEMP_STATS_GET(used, MEMP_TCP_PCB) == 0); +} +END_TEST + +static void test_tcp_rto_timeout_impl(int link_down) +{ + struct netif netif; + struct test_tcp_txcounters txcounters; + struct test_tcp_counters counters; + struct tcp_pcb *pcb, *cur; + err_t err; + size_t i; + const size_t max_wait_ctr = 1024 * 1024; + + /* Setup data for a single segment */ + for (i = 0; i < TCP_MSS; i++) { + tx_data[i] = (u8_t)i; + } + + /* initialize local vars */ + test_tcp_init_netif(&netif, &txcounters, &test_local_ip, &test_netmask); + memset(&counters, 0, sizeof(counters)); + + /* create and initialize the pcb */ + tcp_ticks = SEQNO1 - ISS; + pcb = test_tcp_new_counters_pcb(&counters); + EXPECT_RET(pcb != NULL); + tcp_set_state(pcb, ESTABLISHED, &test_local_ip, &test_remote_ip, TEST_LOCAL_PORT, TEST_REMOTE_PORT); + pcb->mss = TCP_MSS; + pcb->cwnd = TCP_MSS; + + /* send our segment */ + err = tcp_write(pcb, &tx_data[0], TCP_MSS, TCP_WRITE_FLAG_COPY); + EXPECT_RET(err == ERR_OK); + err = tcp_output(pcb); + EXPECT(txcounters.num_tx_calls == 1); + EXPECT(txcounters.num_tx_bytes == 1 * (TCP_MSS + 40U)); + memset(&txcounters, 0, sizeof(txcounters)); + + /* ensure no errors have been recorded */ + EXPECT(counters.err_calls == 0); + EXPECT(counters.last_err == ERR_OK); + + /* Force us into retransmisson timeout */ + for (i = 0; !(pcb->flags & TF_RTO) && i < max_wait_ctr; i++) { + test_tcp_tmr(); + } + EXPECT(i < max_wait_ctr); + + /* check first rexmit */ + EXPECT(pcb->nrtx == 1); + EXPECT(txcounters.num_tx_calls == 1); + EXPECT(txcounters.num_tx_bytes == 1 * (TCP_MSS + 40U)); + + /* still no error expected */ + EXPECT(counters.err_calls == 0); + EXPECT(counters.last_err == ERR_OK); + + if (link_down) { + netif_set_link_down(&netif); + } + + /* keep running the timer till we hit our maximum RTO */ + for (i = 0; counters.last_err == ERR_OK && i < max_wait_ctr; i++) { + test_tcp_tmr(); + } + EXPECT(i < max_wait_ctr); + + /* check number of retransmissions */ + if (link_down) { + EXPECT(txcounters.num_tx_calls == 1); + EXPECT(txcounters.num_tx_bytes == 1 * (TCP_MSS + 40U)); + } else { + EXPECT(txcounters.num_tx_calls == TCP_MAXRTX); + EXPECT(txcounters.num_tx_bytes == TCP_MAXRTX * (TCP_MSS + 40U)); + } + + /* check the connection (pcb) has been aborted */ + EXPECT(counters.err_calls == 1); + EXPECT(counters.last_err == ERR_ABRT); + /* check our pcb is no longer active */ + for (cur = tcp_active_pcbs; cur != NULL; cur = cur->next) { + EXPECT(cur != pcb); + } + EXPECT_RET(MEMP_STATS_GET(used, MEMP_TCP_PCB) == 0); +} + +START_TEST(test_tcp_rto_timeout) +{ + LWIP_UNUSED_ARG(_i); + test_tcp_rto_timeout_impl(0); +} +END_TEST + +START_TEST(test_tcp_rto_timeout_link_down) +{ + LWIP_UNUSED_ARG(_i); + test_tcp_rto_timeout_impl(1); +} +END_TEST + +static void test_tcp_rto_timeout_syn_sent_impl(int link_down) +{ + struct netif netif; + struct test_tcp_txcounters txcounters; + struct test_tcp_counters counters; + struct tcp_pcb *pcb, *cur; + err_t err; + size_t i; + const size_t max_wait_ctr = 1024 * 1024; + const u16_t tcp_syn_opts_len = LWIP_TCP_OPT_LENGTH(TF_SEG_OPTS_MSS|TF_SEG_OPTS_WND_SCALE|TF_SEG_OPTS_SACK_PERM|TF_SEG_OPTS_TS); + + /* Setup data for a single segment */ + for (i = 0; i < TCP_MSS; i++) { + tx_data[i] = (u8_t)i; + } + + /* initialize local vars */ + test_tcp_init_netif(&netif, &txcounters, &test_local_ip, &test_netmask); + memset(&counters, 0, sizeof(counters)); + + /* create and initialize the pcb */ + tcp_ticks = SEQNO1 - ISS; + pcb = test_tcp_new_counters_pcb(&counters); + EXPECT_RET(pcb != NULL); + err = tcp_connect(pcb, &netif.gw, 123, NULL); + EXPECT_RET(err == ERR_OK); + EXPECT_RET(pcb->state == SYN_SENT); + EXPECT(txcounters.num_tx_calls == 1); + EXPECT(txcounters.num_tx_bytes == 40U + tcp_syn_opts_len); + + /* ensure no errors have been recorded */ + EXPECT(counters.err_calls == 0); + EXPECT(counters.last_err == ERR_OK); + + txcounters.num_tx_calls = 0; + txcounters.num_tx_bytes = 0; + + /* Force us into retransmisson timeout */ + for (i = 0; !(pcb->flags & TF_RTO) && i < max_wait_ctr; i++) { + test_tcp_tmr(); + } + EXPECT(i < max_wait_ctr); + + /* check first rexmit */ + EXPECT(pcb->nrtx == 1); + EXPECT(txcounters.num_tx_calls == 1); + EXPECT(txcounters.num_tx_bytes == 40U + tcp_syn_opts_len); /* 40: headers; >=: options */ + + /* still no error expected */ + EXPECT(counters.err_calls == 0); + EXPECT(counters.last_err == ERR_OK); + + if (link_down) { + /* set link down and check what happens to the RTO counter */ + netif_set_link_down(&netif); + } + + /* keep running the timer till we hit our maximum RTO */ + for (i = 0; counters.last_err == ERR_OK && i < max_wait_ctr; i++) { + test_tcp_tmr(); + } + EXPECT(i < max_wait_ctr); + + /* check number of retransmissions */ + if (link_down) { + EXPECT(txcounters.num_tx_calls == 1); + EXPECT(txcounters.num_tx_bytes == 40U + tcp_syn_opts_len); + } else { + EXPECT(txcounters.num_tx_calls == TCP_SYNMAXRTX); + EXPECT(txcounters.num_tx_bytes == TCP_SYNMAXRTX * (tcp_syn_opts_len + 40U)); + } + + /* check the connection (pcb) has been aborted */ + EXPECT(counters.err_calls == 1); + EXPECT(counters.last_err == ERR_ABRT); + /* check our pcb is no longer active */ + for (cur = tcp_active_pcbs; cur != NULL; cur = cur->next) { + EXPECT(cur != pcb); + } + EXPECT_RET(MEMP_STATS_GET(used, MEMP_TCP_PCB) == 0); +} + +START_TEST(test_tcp_rto_timeout_syn_sent) +{ + LWIP_UNUSED_ARG(_i); + test_tcp_rto_timeout_syn_sent_impl(0); +} +END_TEST + +START_TEST(test_tcp_rto_timeout_syn_sent_link_down) +{ + LWIP_UNUSED_ARG(_i); + test_tcp_rto_timeout_syn_sent_impl(1); +} +END_TEST + +static void test_tcp_zwp_timeout_impl(int link_down) +{ + struct netif netif; + struct test_tcp_txcounters txcounters; + struct test_tcp_counters counters; + struct tcp_pcb *pcb, *cur; + struct pbuf* p; + err_t err; + size_t i; + + /* Setup data for two segments */ + for (i = 0; i < 2*TCP_MSS; i++) { + tx_data[i] = (u8_t)i; + } + + /* initialize local vars */ + test_tcp_init_netif(&netif, &txcounters, &test_local_ip, &test_netmask); + memset(&counters, 0, sizeof(counters)); + + /* create and initialize the pcb */ + tcp_ticks = SEQNO1 - ISS; + pcb = test_tcp_new_counters_pcb(&counters); + EXPECT_RET(pcb != NULL); + tcp_set_state(pcb, ESTABLISHED, &test_local_ip, &test_remote_ip, TEST_LOCAL_PORT, TEST_REMOTE_PORT); + pcb->mss = TCP_MSS; + pcb->cwnd = TCP_MSS; + + /* send first segment */ + err = tcp_write(pcb, &tx_data[0], TCP_MSS, TCP_WRITE_FLAG_COPY); + EXPECT(err == ERR_OK); + err = tcp_output(pcb); + EXPECT(err == ERR_OK); + + /* verify segment is in-flight */ + EXPECT(pcb->unsent == NULL); + check_seqnos(pcb->unacked, 1, seqnos); + EXPECT(txcounters.num_tx_calls == 1); + EXPECT(txcounters.num_tx_bytes == 1 * (TCP_MSS + 40U)); + memset(&txcounters, 0, sizeof(txcounters)); + + /* ACK the segment and close the TX window */ + p = tcp_create_rx_segment_wnd(pcb, NULL, 0, 0, TCP_MSS, TCP_ACK, 0); + test_tcp_input(p, &netif); + EXPECT(pcb->unacked == NULL); + EXPECT(pcb->unsent == NULL); + /* send buffer empty, persist should be off */ + EXPECT(pcb->persist_backoff == 0); + EXPECT(pcb->snd_wnd == 0); + + /* send second segment, should be buffered */ + err = tcp_write(pcb, &tx_data[TCP_MSS], TCP_MSS, TCP_WRITE_FLAG_COPY); + EXPECT(err == ERR_OK); + err = tcp_output(pcb); + EXPECT(err == ERR_OK); + + /* ensure it is buffered and persist timer started */ + EXPECT(pcb->unacked == NULL); + check_seqnos(pcb->unsent, 1, &seqnos[1]); + EXPECT(txcounters.num_tx_calls == 0); + EXPECT(txcounters.num_tx_bytes == 0); + EXPECT(pcb->persist_backoff == 1); + + /* ensure no errors have been recorded */ + EXPECT(counters.err_calls == 0); + EXPECT(counters.last_err == ERR_OK); + + /* run timer till first probe */ + EXPECT(pcb->persist_probe == 0); + while (pcb->persist_probe == 0) { + test_tcp_tmr(); + } + EXPECT(txcounters.num_tx_calls == 1); + EXPECT(txcounters.num_tx_bytes == (1 + 40U)); + memset(&txcounters, 0, sizeof(txcounters)); + + /* respond to probe with remote's current SEQ, ACK, and zero-window */ + p = tcp_create_rx_segment_wnd(pcb, NULL, 0, 0, 0, TCP_ACK, 0); + test_tcp_input(p, &netif); + /* ensure zero-window is still active, but probe count reset */ + EXPECT(pcb->persist_backoff > 1); + EXPECT(pcb->persist_probe == 0); + EXPECT(pcb->snd_wnd == 0); + + /* ensure no errors have been recorded */ + EXPECT(counters.err_calls == 0); + EXPECT(counters.last_err == ERR_OK); + + if (link_down) { + netif_set_link_down(&netif); + } + + /* now run the timer till we hit our maximum probe count */ + while (counters.last_err == ERR_OK) { + test_tcp_tmr(); + } + + if (link_down) { + EXPECT(txcounters.num_tx_calls == 0); + EXPECT(txcounters.num_tx_bytes == 0); + } else { + /* check maximum number of 1 byte probes were sent */ + EXPECT(txcounters.num_tx_calls == TCP_MAXRTX); + EXPECT(txcounters.num_tx_bytes == TCP_MAXRTX * (1 + 40U)); + } + + /* check the connection (pcb) has been aborted */ + EXPECT(counters.err_calls == 1); + EXPECT(counters.last_err == ERR_ABRT); + /* check our pcb is no longer active */ + for (cur = tcp_active_pcbs; cur != NULL; cur = cur->next) { + EXPECT(cur != pcb); + } + EXPECT_RET(MEMP_STATS_GET(used, MEMP_TCP_PCB) == 0); +} + +START_TEST(test_tcp_zwp_timeout) +{ + LWIP_UNUSED_ARG(_i); + test_tcp_zwp_timeout_impl(0); +} +END_TEST + +START_TEST(test_tcp_zwp_timeout_link_down) +{ + LWIP_UNUSED_ARG(_i); + test_tcp_zwp_timeout_impl(1); +} +END_TEST + +START_TEST(test_tcp_persist_split) +{ + struct netif netif; + struct test_tcp_txcounters txcounters; + struct test_tcp_counters counters; + struct tcp_pcb *pcb; + struct pbuf* p; + err_t err; + size_t i; + LWIP_UNUSED_ARG(_i); + + /* Setup data for four segments */ + for (i = 0; i < 4 * TCP_MSS; i++) { + tx_data[i] = (u8_t)i; + } + + /* initialize local vars */ + test_tcp_init_netif(&netif, &txcounters, &test_local_ip, &test_netmask); + memset(&counters, 0, sizeof(counters)); + + /* create and initialize the pcb */ + tcp_ticks = SEQNO1 - ISS; + pcb = test_tcp_new_counters_pcb(&counters); + EXPECT_RET(pcb != NULL); + tcp_set_state(pcb, ESTABLISHED, &test_local_ip, &test_remote_ip, TEST_LOCAL_PORT, TEST_REMOTE_PORT); + pcb->mss = TCP_MSS; + /* set window to three segments */ + pcb->cwnd = 3 * TCP_MSS; + pcb->snd_wnd = 3 * TCP_MSS; + pcb->snd_wnd_max = 3 * TCP_MSS; + + /* send four segments. Fourth should stay buffered and is a 3/4 MSS segment to + get coverage on the oversized segment case */ + err = tcp_write(pcb, &tx_data[0], (3 * TCP_MSS) + (TCP_MSS - (TCP_MSS / 4)), TCP_WRITE_FLAG_COPY); + EXPECT(err == ERR_OK); + err = tcp_output(pcb); + EXPECT(err == ERR_OK); + + /* verify 3 segments are in-flight */ + EXPECT(pcb->unacked != NULL); + check_seqnos(pcb->unacked, 3, seqnos); + EXPECT(txcounters.num_tx_calls == 3); + EXPECT(txcounters.num_tx_bytes == 3 * (TCP_MSS + 40U)); + memset(&txcounters, 0, sizeof(txcounters)); + /* verify 4th segment is on unsent */ + EXPECT(pcb->unsent != NULL); + EXPECT(pcb->unsent->len == TCP_MSS - (TCP_MSS / 4)); + check_seqnos(pcb->unsent, 1, &seqnos[3]); +#if TCP_OVERSIZE + EXPECT(pcb->unsent_oversize == TCP_MSS / 4); +#if TCP_OVERSIZE_DBGCHECK + EXPECT(pcb->unsent->oversize_left == pcb->unsent_oversize); +#endif /* TCP_OVERSIZE_DBGCHECK */ +#endif /* TCP_OVERSIZE */ + + /* ACK the 3 segments and update the window to only 1/2 TCP_MSS. + 4th segment should stay on unsent because it's bigger than 1/2 MSS */ + p = tcp_create_rx_segment_wnd(pcb, NULL, 0, 0, 3 * TCP_MSS, TCP_ACK, TCP_MSS / 2); + test_tcp_input(p, &netif); + EXPECT(pcb->unacked == NULL); + EXPECT(pcb->snd_wnd == TCP_MSS / 2); + EXPECT(pcb->unsent != NULL); + check_seqnos(pcb->unsent, 1, &seqnos[3]); + EXPECT(txcounters.num_tx_calls == 0); + EXPECT(txcounters.num_tx_bytes == 0); + /* persist timer should be started since 4th segment is stuck waiting on snd_wnd */ + EXPECT(pcb->persist_backoff == 1); + + /* ensure no errors have been recorded */ + EXPECT(counters.err_calls == 0); + EXPECT(counters.last_err == ERR_OK); + + /* call tcp_timer some more times to let persist timer count up */ + for (i = 0; i < 4; i++) { + test_tcp_tmr(); + EXPECT(txcounters.num_tx_calls == 0); + EXPECT(txcounters.num_tx_bytes == 0); + } + + /* this should be the first timer shot, which should split the + * segment and send a runt (of the remaining window size) */ + txcounters.copy_tx_packets = 1; + test_tcp_tmr(); + txcounters.copy_tx_packets = 0; + /* persist will be disabled as RTO timer takes over */ + EXPECT(pcb->persist_backoff == 0); + EXPECT(txcounters.num_tx_calls == 1); + EXPECT(txcounters.num_tx_bytes == ((TCP_MSS /2) + 40U)); + /* verify 1/2 MSS segment sent, 1/4 MSS still buffered */ + EXPECT(pcb->unsent != NULL); + EXPECT(pcb->unsent->len == TCP_MSS / 4); + EXPECT(pcb->unacked != NULL); + EXPECT(pcb->unacked->len == TCP_MSS / 2); +#if TCP_OVERSIZE + /* verify there is no oversized remaining since during the + segment split, the remainder pbuf is always the exact length */ + EXPECT(pcb->unsent_oversize == 0); +#if TCP_OVERSIZE_DBGCHECK + /* Split segment already transmitted, should be at 0 */ + EXPECT(pcb->unacked->oversize_left == 0); + /* Remainder segement should match pcb value (which is 0) */ + EXPECT(pcb->unsent->oversize_left == pcb->unsent_oversize); +#endif /* TCP_OVERSIZE_DBGCHECK */ +#endif /* TCP_OVERSIZE */ + + /* verify first half segment */ + EXPECT(txcounters.tx_packets != NULL); + if (txcounters.tx_packets != NULL) { + u8_t sent[TCP_MSS / 2]; + u16_t ret; + ret = pbuf_copy_partial(txcounters.tx_packets, &sent, TCP_MSS / 2, 40U); + EXPECT(ret == TCP_MSS / 2); + EXPECT(memcmp(sent, &tx_data[3 * TCP_MSS], TCP_MSS / 2) == 0); + } + if (txcounters.tx_packets != NULL) { + pbuf_free(txcounters.tx_packets); + txcounters.tx_packets = NULL; + } + memset(&txcounters, 0, sizeof(txcounters)); + + /* ACK the half segment, leave window at half segment */ + p = tcp_create_rx_segment_wnd(pcb, NULL, 0, 0, TCP_MSS / 2, TCP_ACK, TCP_MSS / 2); + txcounters.copy_tx_packets = 1; + test_tcp_input(p, &netif); + txcounters.copy_tx_packets = 0; + /* ensure remaining segment was sent */ + EXPECT(txcounters.num_tx_calls == 1); + EXPECT(txcounters.num_tx_bytes == ((TCP_MSS / 4) + 40U)); + EXPECT(pcb->unsent == NULL); + EXPECT(pcb->unacked != NULL); + EXPECT(pcb->unacked->len == TCP_MSS / 4); + EXPECT(pcb->snd_wnd == TCP_MSS / 2); + + /* verify remainder segment */ + EXPECT(txcounters.tx_packets != NULL); + if (txcounters.tx_packets != NULL) { + u8_t sent[TCP_MSS / 4]; + u16_t ret; + ret = pbuf_copy_partial(txcounters.tx_packets, &sent, TCP_MSS / 4, 40U); + EXPECT(ret == TCP_MSS / 4); + EXPECT(memcmp(sent, &tx_data[(3 * TCP_MSS) + TCP_MSS / 2], TCP_MSS / 4) == 0); + } + if (txcounters.tx_packets != NULL) { + pbuf_free(txcounters.tx_packets); + txcounters.tx_packets = NULL; + } + + /* ensure no errors have been recorded */ + EXPECT(counters.err_calls == 0); + EXPECT(counters.last_err == ERR_OK); + + /* make sure the pcb is freed */ + EXPECT_RET(MEMP_STATS_GET(used, MEMP_TCP_PCB) == 1); + tcp_abort(pcb); + EXPECT_RET(MEMP_STATS_GET(used, MEMP_TCP_PCB) == 0); +} +END_TEST + /** Create the suite including all tests for this module */ Suite * tcp_suite(void) { testfunc tests[] = { TESTFUNC(test_tcp_new_abort), + TESTFUNC(test_tcp_listen_passive_open), TESTFUNC(test_tcp_recv_inseq), + TESTFUNC(test_tcp_recv_inseq_trim), + TESTFUNC(test_tcp_passive_close), + TESTFUNC(test_tcp_active_abort), TESTFUNC(test_tcp_malformed_header), TESTFUNC(test_tcp_fast_retx_recover), TESTFUNC(test_tcp_fast_rexmit_wraparound), TESTFUNC(test_tcp_rto_rexmit_wraparound), TESTFUNC(test_tcp_tx_full_window_lost_from_unacked), - TESTFUNC(test_tcp_tx_full_window_lost_from_unsent) + TESTFUNC(test_tcp_tx_full_window_lost_from_unsent), + TESTFUNC(test_tcp_retx_add_to_sent), + TESTFUNC(test_tcp_rto_tracking), + TESTFUNC(test_tcp_rto_timeout), + TESTFUNC(test_tcp_rto_timeout_link_down), + TESTFUNC(test_tcp_rto_timeout_syn_sent), + TESTFUNC(test_tcp_rto_timeout_syn_sent_link_down), + TESTFUNC(test_tcp_zwp_timeout), + TESTFUNC(test_tcp_zwp_timeout_link_down), + TESTFUNC(test_tcp_persist_split) }; return create_suite("TCP", tests, sizeof(tests)/sizeof(testfunc), tcp_setup, tcp_teardown); } diff --git a/Libraries/LwIP/test/unit/tcp/test_tcp_oos.c b/Libraries/LwIP/test/unit/tcp/test_tcp_oos.c index e85ecc9..dbe1423 100755 --- a/Libraries/LwIP/test/unit/tcp/test_tcp_oos.c +++ b/Libraries/LwIP/test/unit/tcp/test_tcp_oos.c @@ -118,19 +118,30 @@ tcp_oos_tcplen(struct tcp_pcb* pcb) } /* Setup/teardown functions */ +static struct netif *old_netif_list; +static struct netif *old_netif_default; static void tcp_oos_setup(void) { + old_netif_list = netif_list; + old_netif_default = netif_default; + netif_list = NULL; + netif_default = NULL; tcp_remove_all(); + lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); } static void tcp_oos_teardown(void) { - tcp_remove_all(); netif_list = NULL; netif_default = NULL; + tcp_remove_all(); + /* restore netif_list for next tests (e.g. loopif) */ + netif_list = old_netif_list; + netif_default = old_netif_default; + lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); } @@ -150,18 +161,12 @@ START_TEST(test_tcp_recv_ooseq_FIN_OOSEQ) 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - ip_addr_t remote_ip, local_ip, netmask; u16_t data_len; - u16_t remote_port = 0x100, local_port = 0x101; struct netif netif; LWIP_UNUSED_ARG(_i); /* initialize local vars */ - memset(&netif, 0, sizeof(netif)); - IP_ADDR4(&local_ip, 192, 168, 1, 1); - IP_ADDR4(&remote_ip, 192, 168, 1, 2); - IP_ADDR4(&netmask, 255, 255, 255, 0); - test_tcp_init_netif(&netif, NULL, &local_ip, &netmask); + test_tcp_init_netif(&netif, NULL, &test_local_ip, &test_netmask); data_len = sizeof(data); /* initialize counter struct */ memset(&counters, 0, sizeof(counters)); @@ -171,7 +176,7 @@ START_TEST(test_tcp_recv_ooseq_FIN_OOSEQ) /* create and initialize the pcb */ pcb = test_tcp_new_counters_pcb(&counters); EXPECT_RET(pcb != NULL); - tcp_set_state(pcb, ESTABLISHED, &local_ip, &remote_ip, local_port, remote_port); + tcp_set_state(pcb, ESTABLISHED, &test_local_ip, &test_remote_ip, TEST_LOCAL_PORT, TEST_REMOTE_PORT); /* create segments */ /* pinseq is sent as last segment! */ @@ -292,18 +297,12 @@ START_TEST(test_tcp_recv_ooseq_FIN_INSEQ) 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - ip_addr_t remote_ip, local_ip, netmask; u16_t data_len; - u16_t remote_port = 0x100, local_port = 0x101; struct netif netif; LWIP_UNUSED_ARG(_i); /* initialize local vars */ - memset(&netif, 0, sizeof(netif)); - IP_ADDR4(&local_ip, 192, 168, 1, 1); - IP_ADDR4(&remote_ip, 192, 168, 1, 2); - IP_ADDR4(&netmask, 255, 255, 255, 0); - test_tcp_init_netif(&netif, NULL, &local_ip, &netmask); + test_tcp_init_netif(&netif, NULL, &test_local_ip, &test_netmask); data_len = sizeof(data); /* initialize counter struct */ memset(&counters, 0, sizeof(counters)); @@ -313,7 +312,7 @@ START_TEST(test_tcp_recv_ooseq_FIN_INSEQ) /* create and initialize the pcb */ pcb = test_tcp_new_counters_pcb(&counters); EXPECT_RET(pcb != NULL); - tcp_set_state(pcb, ESTABLISHED, &local_ip, &remote_ip, local_port, remote_port); + tcp_set_state(pcb, ESTABLISHED, &test_local_ip, &test_remote_ip, TEST_LOCAL_PORT, TEST_REMOTE_PORT); /* create segments */ /* p1: 7 bytes - 2 before FIN */ @@ -465,8 +464,6 @@ START_TEST(test_tcp_recv_ooseq_overrun_rxwin) struct test_tcp_counters counters; struct tcp_pcb* pcb; struct pbuf *pinseq, *p_ovr; - ip_addr_t remote_ip, local_ip, netmask; - u16_t remote_port = 0x100, local_port = 0x101; struct netif netif; int datalen = 0; int datalen2; @@ -476,11 +473,7 @@ START_TEST(test_tcp_recv_ooseq_overrun_rxwin) } /* initialize local vars */ - memset(&netif, 0, sizeof(netif)); - IP_ADDR4(&local_ip, 192, 168, 1, 1); - IP_ADDR4(&remote_ip, 192, 168, 1, 2); - IP_ADDR4(&netmask, 255, 255, 255, 0); - test_tcp_init_netif(&netif, NULL, &local_ip, &netmask); + test_tcp_init_netif(&netif, NULL, &test_local_ip, &test_netmask); /* initialize counter struct */ memset(&counters, 0, sizeof(counters)); counters.expected_data_len = TCP_WND; @@ -489,7 +482,7 @@ START_TEST(test_tcp_recv_ooseq_overrun_rxwin) /* create and initialize the pcb */ pcb = test_tcp_new_counters_pcb(&counters); EXPECT_RET(pcb != NULL); - tcp_set_state(pcb, ESTABLISHED, &local_ip, &remote_ip, local_port, remote_port); + tcp_set_state(pcb, ESTABLISHED, &test_local_ip, &test_remote_ip, TEST_LOCAL_PORT, TEST_REMOTE_PORT); pcb->rcv_nxt = 0x8000; /* create segments */ @@ -558,8 +551,6 @@ START_TEST(test_tcp_recv_ooseq_overrun_rxwin_edge) struct test_tcp_counters counters; struct tcp_pcb* pcb; struct pbuf *pinseq, *p_ovr; - ip_addr_t remote_ip, local_ip, netmask; - u16_t remote_port = 0x100, local_port = 0x101; struct netif netif; int datalen = 0; int datalen2; @@ -569,11 +560,7 @@ START_TEST(test_tcp_recv_ooseq_overrun_rxwin_edge) } /* initialize local vars */ - memset(&netif, 0, sizeof(netif)); - IP_ADDR4(&local_ip, 192, 168, 1, 1); - IP_ADDR4(&remote_ip, 192, 168, 1, 2); - IP_ADDR4(&netmask, 255, 255, 255, 0); - test_tcp_init_netif(&netif, NULL, &local_ip, &netmask); + test_tcp_init_netif(&netif, NULL, &test_local_ip, &test_netmask); /* initialize counter struct */ memset(&counters, 0, sizeof(counters)); counters.expected_data_len = TCP_WND; @@ -582,7 +569,7 @@ START_TEST(test_tcp_recv_ooseq_overrun_rxwin_edge) /* create and initialize the pcb */ pcb = test_tcp_new_counters_pcb(&counters); EXPECT_RET(pcb != NULL); - tcp_set_state(pcb, ESTABLISHED, &local_ip, &remote_ip, local_port, remote_port); + tcp_set_state(pcb, ESTABLISHED, &test_local_ip, &test_remote_ip, TEST_LOCAL_PORT, TEST_REMOTE_PORT); pcb->rcv_nxt = 0xffffffff - (TCP_WND / 2); /* create segments */ @@ -650,8 +637,6 @@ START_TEST(test_tcp_recv_ooseq_max_bytes) struct test_tcp_counters counters; struct tcp_pcb* pcb; struct pbuf *p_ovr; - ip_addr_t remote_ip, local_ip, netmask; - u16_t remote_port = 0x100, local_port = 0x101; struct netif netif; int datalen = 0; int datalen2; @@ -661,11 +646,7 @@ START_TEST(test_tcp_recv_ooseq_max_bytes) } /* initialize local vars */ - memset(&netif, 0, sizeof(netif)); - IP_ADDR4(&local_ip, 192, 168, 1, 1); - IP_ADDR4(&remote_ip, 192, 168, 1, 2); - IP_ADDR4(&netmask, 255, 255, 255, 0); - test_tcp_init_netif(&netif, NULL, &local_ip, &netmask); + test_tcp_init_netif(&netif, NULL, &test_local_ip, &test_netmask); /* initialize counter struct */ memset(&counters, 0, sizeof(counters)); counters.expected_data_len = TCP_WND; @@ -674,7 +655,7 @@ START_TEST(test_tcp_recv_ooseq_max_bytes) /* create and initialize the pcb */ pcb = test_tcp_new_counters_pcb(&counters); EXPECT_RET(pcb != NULL); - tcp_set_state(pcb, ESTABLISHED, &local_ip, &remote_ip, local_port, remote_port); + tcp_set_state(pcb, ESTABLISHED, &test_local_ip, &test_remote_ip, TEST_LOCAL_PORT, TEST_REMOTE_PORT); pcb->rcv_nxt = 0x8000; /* don't 'recv' the first segment (1 byte) so that all other segments will be ooseq */ @@ -731,8 +712,6 @@ START_TEST(test_tcp_recv_ooseq_max_pbufs) struct test_tcp_counters counters; struct tcp_pcb* pcb; struct pbuf *p_ovr; - ip_addr_t remote_ip, local_ip, netmask; - u16_t remote_port = 0x100, local_port = 0x101; struct netif netif; int datalen = 0; int datalen2; @@ -742,11 +721,7 @@ START_TEST(test_tcp_recv_ooseq_max_pbufs) } /* initialize local vars */ - memset(&netif, 0, sizeof(netif)); - IP_ADDR4(&local_ip, 192, 168, 1, 1); - IP_ADDR4(&remote_ip, 192, 168, 1, 2); - IP_ADDR4(&netmask, 255, 255, 255, 0); - test_tcp_init_netif(&netif, NULL, &local_ip, &netmask); + test_tcp_init_netif(&netif, NULL, &test_local_ip, &test_netmask); /* initialize counter struct */ memset(&counters, 0, sizeof(counters)); counters.expected_data_len = TCP_WND; @@ -755,7 +730,7 @@ START_TEST(test_tcp_recv_ooseq_max_pbufs) /* create and initialize the pcb */ pcb = test_tcp_new_counters_pcb(&counters); EXPECT_RET(pcb != NULL); - tcp_set_state(pcb, ESTABLISHED, &local_ip, &remote_ip, local_port, remote_port); + tcp_set_state(pcb, ESTABLISHED, &local_ip, &remote_ip, TEST_LOCAL_PORT, TEST_REMOTE_PORT); pcb->rcv_nxt = 0x8000; /* don't 'recv' the first segment (1 byte) so that all other segments will be ooseq */ @@ -834,8 +809,6 @@ static void test_tcp_recv_ooseq_double_FINs(int delay_packet) struct test_tcp_counters counters; struct tcp_pcb* pcb; struct pbuf *p_normal_fin, *p_data_after_fin, *p, *p_2nd_fin_ooseq; - ip_addr_t remote_ip, local_ip, netmask; - u16_t remote_port = 0x100, local_port = 0x101; struct netif netif; u32_t exp_rx_calls = 0, exp_rx_bytes = 0, exp_close_calls = 0, exp_oos_pbufs = 0, exp_oos_tcplen = 0; int first_dropped = 0xff; @@ -845,11 +818,7 @@ static void test_tcp_recv_ooseq_double_FINs(int delay_packet) } /* initialize local vars */ - memset(&netif, 0, sizeof(netif)); - IP_ADDR4(&local_ip, 192, 168, 1, 1); - IP_ADDR4(&remote_ip, 192, 168, 1, 2); - IP_ADDR4(&netmask, 255, 255, 255, 0); - test_tcp_init_netif(&netif, NULL, &local_ip, &netmask); + test_tcp_init_netif(&netif, NULL, &test_local_ip, &test_netmask); /* initialize counter struct */ memset(&counters, 0, sizeof(counters)); counters.expected_data_len = TCP_WND; @@ -858,7 +827,7 @@ static void test_tcp_recv_ooseq_double_FINs(int delay_packet) /* create and initialize the pcb */ pcb = test_tcp_new_counters_pcb(&counters); EXPECT_RET(pcb != NULL); - tcp_set_state(pcb, ESTABLISHED, &local_ip, &remote_ip, local_port, remote_port); + tcp_set_state(pcb, ESTABLISHED, &test_local_ip, &test_remote_ip, TEST_LOCAL_PORT, TEST_REMOTE_PORT); pcb->rcv_nxt = 0x8000; /* create segments */ diff --git a/Libraries/LwIP/test/unit/udp/test_udp.c b/Libraries/LwIP/test/unit/udp/test_udp.c index 93ab922..b45ce25 100755 --- a/Libraries/LwIP/test/unit/udp/test_udp.c +++ b/Libraries/LwIP/test/unit/udp/test_udp.c @@ -2,11 +2,23 @@ #include "lwip/udp.h" #include "lwip/stats.h" +#include "lwip/inet_chksum.h" #if !LWIP_STATS || !UDP_STATS || !MEMP_STATS #error "This tests needs UDP- and MEMP-statistics enabled" #endif +struct test_udp_rxdata { + u32_t rx_cnt; + u32_t rx_bytes; + struct udp_pcb *pcb; +}; + +static struct netif test_netif1, test_netif2; +static ip4_addr_t test_gw1, test_ipaddr1, test_netmask1; +static ip4_addr_t test_gw2, test_ipaddr2, test_netmask2; +static int output_ctr, linkoutput_ctr; + /* Helper functions */ static void udp_remove_all(void) @@ -22,18 +34,99 @@ udp_remove_all(void) fail_unless(MEMP_STATS_GET(used, MEMP_UDP_PCB) == 0); } +static err_t +default_netif_output(struct netif *netif, struct pbuf *p, const ip4_addr_t *ipaddr) +{ + fail_unless((netif == &test_netif1) || (netif == &test_netif2)); + fail_unless(p != NULL); + fail_unless(ipaddr != NULL); + output_ctr++; + return ERR_OK; +} + +static err_t +default_netif_linkoutput(struct netif *netif, struct pbuf *p) +{ + fail_unless((netif == &test_netif1) || (netif == &test_netif2)); + fail_unless(p != NULL); + linkoutput_ctr++; + return ERR_OK; +} + +static err_t +default_netif_init(struct netif *netif) +{ + fail_unless(netif != NULL); + netif->output = default_netif_output; + netif->linkoutput = default_netif_linkoutput; + netif->mtu = 1500; + netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP | NETIF_FLAG_LINK_UP; + netif->hwaddr_len = 6; + return ERR_OK; +} + +static void +default_netif_add(void) +{ + struct netif *n; + +#if LWIP_HAVE_LOOPIF + fail_unless(netif_list != NULL); /* the loopif */ + fail_unless(netif_list->next == NULL); +#else + fail_unless(netif_list == NULL); +#endif + fail_unless(netif_default == NULL); + + IP4_ADDR(&test_ipaddr1, 192,168,0,1); + IP4_ADDR(&test_netmask1, 255,255,255,0); + IP4_ADDR(&test_gw1, 192,168,0,254); + n = netif_add(&test_netif1, &test_ipaddr1, &test_netmask1, + &test_gw1, NULL, default_netif_init, NULL); + fail_unless(n == &test_netif1); + + IP4_ADDR(&test_ipaddr2, 192,168,1,1); + IP4_ADDR(&test_netmask2, 255,255,255,0); + IP4_ADDR(&test_gw2, 192,168,1,254); + n = netif_add(&test_netif2, &test_ipaddr2, &test_netmask2, + &test_gw2, NULL, default_netif_init, NULL); + fail_unless(n == &test_netif2); + + netif_set_default(&test_netif1); + netif_set_up(&test_netif1); + netif_set_up(&test_netif2); +} + +static void +default_netif_remove(void) +{ + fail_unless(netif_default == &test_netif1); + netif_remove(&test_netif1); + netif_remove(&test_netif2); + fail_unless(netif_default == NULL); +#if LWIP_HAVE_LOOPIF + fail_unless(netif_list != NULL); /* the loopif */ + fail_unless(netif_list->next == NULL); +#else + fail_unless(netif_list == NULL); +#endif +} /* Setups/teardown functions */ static void udp_setup(void) { udp_remove_all(); + default_netif_add(); + lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); } static void udp_teardown(void) { udp_remove_all(); + default_netif_remove(); + lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); } @@ -56,6 +149,191 @@ START_TEST(test_udp_new_remove) } END_TEST +static void test_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, + const ip_addr_t *addr, u16_t port) +{ + struct test_udp_rxdata *ctr = (struct test_udp_rxdata *)arg; + + LWIP_UNUSED_ARG(addr); + LWIP_UNUSED_ARG(port); + + fail_unless(arg != NULL); + fail_unless(ctr->pcb == pcb); + + ctr->rx_cnt++; + ctr->rx_bytes += p->tot_len; + + if (p != NULL) { + pbuf_free(p); + } +} + +static struct pbuf * +test_udp_create_test_packet(u16_t length, u16_t port, u32_t dst_addr) +{ + err_t err; + u8_t ret; + struct udp_hdr *uh; + struct ip_hdr *ih; + struct pbuf *p; + const u8_t test_data[16] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf}; + + p = pbuf_alloc(PBUF_TRANSPORT, length, PBUF_POOL); + fail_unless(p != NULL); + if (p == NULL) { + return NULL; + } + fail_unless(p->next == NULL); + err = pbuf_take(p, test_data, length); + fail_unless(err == ERR_OK); + + /* add UDP header */ + ret = pbuf_add_header(p, sizeof(struct udp_hdr)); + fail_unless(!ret); + uh = (struct udp_hdr *)p->payload; + uh->chksum = 0; + uh->dest = uh->src = lwip_htons(port); + uh->len = lwip_htons(p->tot_len); + /* add IPv4 header */ + ret = pbuf_add_header(p, sizeof(struct ip_hdr)); + fail_unless(!ret); + ih = (struct ip_hdr *)p->payload; + memset(ih, 0, sizeof(*ih)); + ih->dest.addr = dst_addr; + ih->_len = lwip_htons(p->tot_len); + ih->_ttl = 32; + ih->_proto = IP_PROTO_UDP; + IPH_VHL_SET(ih, 4, sizeof(struct ip_hdr) / 4); + IPH_CHKSUM_SET(ih, inet_chksum(ih, sizeof(struct ip_hdr))); + return p; +} + +/* bind 2 pcbs to specific netif IP and test which one gets broadcasts */ +START_TEST(test_udp_broadcast_rx_with_2_netifs) +{ + err_t err; + struct udp_pcb *pcb1, *pcb2; + const u16_t port = 12345; + struct test_udp_rxdata ctr1, ctr2; + struct pbuf *p; +#if SO_REUSE + struct udp_pcb *pcb_any; + struct test_udp_rxdata ctr_any; +#endif + LWIP_UNUSED_ARG(_i); + + pcb1 = udp_new(); + fail_unless(pcb1 != NULL); + pcb2 = udp_new(); + fail_unless(pcb2 != NULL); + +#if SO_REUSE + pcb_any = udp_new(); + fail_unless(pcb_any != NULL); + + ip_set_option(pcb1, SOF_REUSEADDR); + ip_set_option(pcb2, SOF_REUSEADDR); + ip_set_option(pcb_any, SOF_REUSEADDR); + + err = udp_bind(pcb_any, NULL, port); + fail_unless(err == ERR_OK); + memset(&ctr_any, 0, sizeof(ctr_any)); + ctr_any.pcb = pcb_any; + udp_recv(pcb_any, test_recv, &ctr_any); +#endif + + err = udp_bind(pcb1, &test_netif1.ip_addr, port); + fail_unless(err == ERR_OK); + err = udp_bind(pcb2, &test_netif2.ip_addr, port); + fail_unless(err == ERR_OK); + + memset(&ctr1, 0, sizeof(ctr1)); + ctr1.pcb = pcb1; + memset(&ctr2, 0, sizeof(ctr2)); + ctr2.pcb = pcb2; + + udp_recv(pcb1, test_recv, &ctr1); + udp_recv(pcb2, test_recv, &ctr2); + + /* unicast to netif1 */ + p = test_udp_create_test_packet(16, port, test_ipaddr1.addr); + EXPECT_RET(p != NULL); + err = ip4_input(p, &test_netif1); + fail_unless(err == ERR_OK); + fail_unless(ctr1.rx_cnt == 1); + fail_unless(ctr1.rx_bytes == 16); + fail_unless(ctr2.rx_cnt == 0); +#if SO_REUSE + fail_unless(ctr_any.rx_cnt == 0); +#endif + ctr1.rx_cnt = ctr1.rx_bytes = 0; + + /* unicast to netif2 */ + p = test_udp_create_test_packet(16, port, test_ipaddr2.addr); + EXPECT_RET(p != NULL); + err = ip4_input(p, &test_netif2); + fail_unless(err == ERR_OK); + fail_unless(ctr2.rx_cnt == 1); + fail_unless(ctr2.rx_bytes == 16); + fail_unless(ctr1.rx_cnt == 0); +#if SO_REUSE + fail_unless(ctr_any.rx_cnt == 0); +#endif + ctr2.rx_cnt = ctr2.rx_bytes = 0; + + /* broadcast to netif1-broadcast, input to netif2 */ + p = test_udp_create_test_packet(16, port, test_ipaddr1.addr | ~test_netmask1.addr); + EXPECT_RET(p != NULL); + err = ip4_input(p, &test_netif2); + fail_unless(err == ERR_OK); + fail_unless(ctr1.rx_cnt == 1); + fail_unless(ctr1.rx_bytes == 16); + fail_unless(ctr2.rx_cnt == 0); +#if SO_REUSE + fail_unless(ctr_any.rx_cnt == 0); +#endif + ctr1.rx_cnt = ctr1.rx_bytes = 0; + + /* broadcast to netif2-broadcast, input to netif1 */ + p = test_udp_create_test_packet(16, port, test_ipaddr2.addr | ~test_netmask2.addr); + EXPECT_RET(p != NULL); + err = ip4_input(p, &test_netif1); + fail_unless(err == ERR_OK); + fail_unless(ctr2.rx_cnt == 1); + fail_unless(ctr2.rx_bytes == 16); + fail_unless(ctr1.rx_cnt == 0); +#if SO_REUSE + fail_unless(ctr_any.rx_cnt == 0); +#endif + ctr2.rx_cnt = ctr2.rx_bytes = 0; + + /* broadcast to global-broadcast, input to netif1 */ + p = test_udp_create_test_packet(16, port, 0xffffffff); + EXPECT_RET(p != NULL); + err = ip4_input(p, &test_netif1); + fail_unless(err == ERR_OK); + fail_unless(ctr1.rx_cnt == 1); + fail_unless(ctr1.rx_bytes == 16); + fail_unless(ctr2.rx_cnt == 0); +#if SO_REUSE + fail_unless(ctr_any.rx_cnt == 0); +#endif + ctr1.rx_cnt = ctr1.rx_bytes = 0; + + /* broadcast to global-broadcast, input to netif2 */ + p = test_udp_create_test_packet(16, port, 0xffffffff); + EXPECT_RET(p != NULL); + err = ip4_input(p, &test_netif2); + fail_unless(err == ERR_OK); + fail_unless(ctr2.rx_cnt == 1); + fail_unless(ctr2.rx_bytes == 16); + fail_unless(ctr1.rx_cnt == 0); +#if SO_REUSE + fail_unless(ctr_any.rx_cnt == 0); +#endif + ctr2.rx_cnt = ctr2.rx_bytes = 0; +} +END_TEST /** Create the suite including all tests for this module */ Suite * @@ -63,6 +341,7 @@ udp_suite(void) { testfunc tests[] = { TESTFUNC(test_udp_new_remove), + TESTFUNC(test_udp_broadcast_rx_with_2_netifs) }; return create_suite("UDP", tests, sizeof(tests)/sizeof(testfunc), udp_setup, udp_teardown); } diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h b/Libraries/STM32H7xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h index 7b859e3..b358058 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h @@ -315,6 +315,11 @@ #if defined(STM32G0) #define DMA_REQUEST_DAC1_CHANNEL1 DMA_REQUEST_DAC1_CH1 #define DMA_REQUEST_DAC1_CHANNEL2 DMA_REQUEST_DAC1_CH2 +#define DMA_REQUEST_TIM16_TRIG_COM DMA_REQUEST_TIM16_COM +#define DMA_REQUEST_TIM17_TRIG_COM DMA_REQUEST_TIM17_COM + +#define LL_DMAMUX_REQ_TIM16_TRIG_COM LL_DMAMUX_REQ_TIM16_COM +#define LL_DMAMUX_REQ_TIM17_TRIG_COM LL_DMAMUX_REQ_TIM17_COM #endif #if defined(STM32H7) @@ -643,6 +648,10 @@ #define HAL_HRTIM_ExternalEventCounterEnable HAL_HRTIM_ExtEventCounterEnable #define HAL_HRTIM_ExternalEventCounterDisable HAL_HRTIM_ExtEventCounterDisable #define HAL_HRTIM_ExternalEventCounterReset HAL_HRTIM_ExtEventCounterReset +#define HRTIM_TIMEEVENT_A HRTIM_EVENTCOUNTER_A +#define HRTIM_TIMEEVENT_B HRTIM_EVENTCOUNTER_B +#define HRTIM_TIMEEVENTRESETMODE_UNCONDITIONAL HRTIM_EVENTCOUNTER_RSTMODE_UNCONDITIONAL +#define HRTIM_TIMEEVENTRESETMODE_CONDITIONAL HRTIM_EVENTCOUNTER_RSTMODE_CONDITIONAL #endif /* STM32G4 */ #if defined(STM32H7) @@ -1531,18 +1540,18 @@ #define HAL_I2CFastModePlusConfig(SYSCFG_I2CFastModePlus, cmd) (((cmd)==ENABLE)? HAL_I2CEx_EnableFastModePlus(SYSCFG_I2CFastModePlus): HAL_I2CEx_DisableFastModePlus(SYSCFG_I2CFastModePlus)) -#if defined(STM32H7) || defined(STM32WB) || defined(STM32G0) || defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) || defined(STM32F4) || defined(STM32F7) || defined(STM32L0) || defined(STM32L4) || defined(STM32L5) || defined(STM32G4) +#if defined(STM32H7) || defined(STM32WB) || defined(STM32G0) || defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) || defined(STM32F4) || defined(STM32F7) || defined(STM32L0) || defined(STM32L4) || defined(STM32L5) || defined(STM32G4) || defined(STM32L1) #define HAL_I2C_Master_Sequential_Transmit_IT HAL_I2C_Master_Seq_Transmit_IT #define HAL_I2C_Master_Sequential_Receive_IT HAL_I2C_Master_Seq_Receive_IT #define HAL_I2C_Slave_Sequential_Transmit_IT HAL_I2C_Slave_Seq_Transmit_IT #define HAL_I2C_Slave_Sequential_Receive_IT HAL_I2C_Slave_Seq_Receive_IT -#endif /* STM32H7 || STM32WB || STM32G0 || STM32F0 || STM32F1 || STM32F2 || STM32F3 || STM32F4 || STM32F7 || STM32L0 || STM32L4 || STM32L5 || STM32G4 */ -#if defined(STM32H7) || defined(STM32WB) || defined(STM32G0) || defined(STM32F4) || defined(STM32F7) || defined(STM32L0) || defined(STM32L4) || defined(STM32L5) || defined(STM32G4) +#endif /* STM32H7 || STM32WB || STM32G0 || STM32F0 || STM32F1 || STM32F2 || STM32F3 || STM32F4 || STM32F7 || STM32L0 || STM32L4 || STM32L5 || STM32G4 || STM32L1 */ +#if defined(STM32H7) || defined(STM32WB) || defined(STM32G0) || defined(STM32F4) || defined(STM32F7) || defined(STM32L0) || defined(STM32L4) || defined(STM32L5) || defined(STM32G4)|| defined(STM32L1) #define HAL_I2C_Master_Sequential_Transmit_DMA HAL_I2C_Master_Seq_Transmit_DMA #define HAL_I2C_Master_Sequential_Receive_DMA HAL_I2C_Master_Seq_Receive_DMA #define HAL_I2C_Slave_Sequential_Transmit_DMA HAL_I2C_Slave_Seq_Transmit_DMA #define HAL_I2C_Slave_Sequential_Receive_DMA HAL_I2C_Slave_Seq_Receive_DMA -#endif /* STM32H7 || STM32WB || STM32G0 || STM32F4 || STM32F7 || STM32L0 || STM32L4 || STM32L5 || STM32G4 */ +#endif /* STM32H7 || STM32WB || STM32G0 || STM32F4 || STM32F7 || STM32L0 || STM32L4 || STM32L5 || STM32G4 || STM32L1 */ #if defined(STM32F4) #define HAL_FMPI2C_Master_Sequential_Transmit_IT HAL_FMPI2C_Master_Seq_Transmit_IT @@ -3243,7 +3252,7 @@ #define RCC_MCOSOURCE_PLLCLK_NODIV RCC_MCO1SOURCE_PLLCLK #define RCC_MCOSOURCE_PLLCLK_DIV2 RCC_MCO1SOURCE_PLLCLK_DIV2 -#if defined(STM32L4) || defined(STM32WB) || defined(STM32G0) || defined(STM32G4) || defined(STM32L5) || defined(STM32WL) +#if defined(STM32L4) || defined(STM32WB) || defined(STM32G0) || defined(STM32G4) || defined(STM32L5) #define RCC_RTCCLKSOURCE_NO_CLK RCC_RTCCLKSOURCE_NONE #else #define RCC_RTCCLKSOURCE_NONE RCC_RTCCLKSOURCE_NO_CLK diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal.h index 2ee957c..c27e64a 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal.h @@ -117,10 +117,34 @@ typedef enum (((__PIN__) & SYSCFG_FASTMODEPLUS_PB8) == SYSCFG_FASTMODEPLUS_PB8) || \ (((__PIN__) & SYSCFG_FASTMODEPLUS_PB9) == SYSCFG_FASTMODEPLUS_PB9)) -#endif /* ! SYSCFG_PMCR_BOOSTEN */ /** * @} */ +#endif /* ! SYSCFG_PMCR_BOOSTEN */ + + +#if defined(SYSCFG_ADC2ALT_ADC2_ROUT0) || defined(SYSCFG_ADC2ALT_ADC2_ROUT1) +/** @defgroup SYSCFG_Adc2_Alternate_Connection SYSCFG ADC2 Alternate Connection + * @{ + */ + +/** @brief Adc2 Alternate Connection on Vinp[16] and Vinp[17] + */ +#define SYSCFG_ADC2_ROUT0_DAC1_1 ((uint32_t)0x00000000) /*!< DAC1_out1 connected to ADC2 VINP[16] */ +#define SYSCFG_ADC2_ROUT0_VBAT4 SYSCFG_ADC2ALT_ADC2_ROUT0 /*!< VBAT/4 connected to ADC2 VINP[16] */ +#define SYSCFG_ADC2_ROUT1_DAC1_2 ((uint32_t)0x00000000) /*!< DAC1_out2 connected to ADC2 VINP[17] */ +#define SYSCFG_ADC2_ROUT1_VREFINT SYSCFG_ADC2ALT_ADC2_ROUT1 /*!< VREFINT connected to ADC2 VINP[17] */ + +#define IS_SYSCFG_ADC2ALT_ROUT0(__VALUE__) (((__VALUE__) == SYSCFG_ADC2_ROUT0_DAC1_1) || \ + ((__VALUE__) == SYSCFG_ADC2_ROUT0_VBAT4)) +#define IS_SYSCFG_ADC2ALT_ROUT1(__VALUE__) (((__VALUE__) == SYSCFG_ADC2_ROUT1_DAC1_2) || \ + ((__VALUE__) == SYSCFG_ADC2_ROUT1_VREFINT)) + +/** + * @} + */ +#endif /*SYSCFG_ADC2ALT_ADC2_ROUT0 || SYSCFG_ADC2ALT_ADC2_ROUT1*/ + /** @defgroup SYSCFG_Ethernet_Config Ethernet Config * @{ @@ -145,10 +169,6 @@ typedef enum #define SYSCFG_SWITCH_PC3 SYSCFG_PMCR_PC3SO /*!< Select PC3 analog switch */ -#define IS_SYSCFG_ANALOG_SWITCH(SWITCH) ((((SWITCH) & SYSCFG_SWITCH_PA0) == SYSCFG_SWITCH_PA0)|| \ - (((SWITCH) & SYSCFG_SWITCH_PA1) == SYSCFG_SWITCH_PA1) || \ - (((SWITCH) & SYSCFG_SWITCH_PC2) == SYSCFG_SWITCH_PC2) || \ - (((SWITCH) & SYSCFG_SWITCH_PC3) == SYSCFG_SWITCH_PC3)) #define SYSCFG_SWITCH_PA0_OPEN SYSCFG_PMCR_PA0SO /*!< PA0 analog switch opened */ @@ -160,6 +180,16 @@ typedef enum #define SYSCFG_SWITCH_PC3_OPEN SYSCFG_PMCR_PC3SO /*!< PC3 analog switch opened */ #define SYSCFG_SWITCH_PC3_CLOSE ((uint32_t)0x00000000) /*!< PC3 analog switch closed */ +/** + * @} + */ + +#define IS_SYSCFG_ANALOG_SWITCH(SWITCH) ((((SWITCH) & SYSCFG_SWITCH_PA0) == SYSCFG_SWITCH_PA0)|| \ + (((SWITCH) & SYSCFG_SWITCH_PA1) == SYSCFG_SWITCH_PA1) || \ + (((SWITCH) & SYSCFG_SWITCH_PC2) == SYSCFG_SWITCH_PC2) || \ + (((SWITCH) & SYSCFG_SWITCH_PC3) == SYSCFG_SWITCH_PC3)) + + #define IS_SYSCFG_SWITCH_STATE(STATE) ((((STATE) & SYSCFG_SWITCH_PA0_OPEN) == SYSCFG_SWITCH_PA0_OPEN) || \ (((STATE) & SYSCFG_SWITCH_PA0_CLOSE) == SYSCFG_SWITCH_PA0_CLOSE) || \ (((STATE) & SYSCFG_SWITCH_PA1_OPEN) == SYSCFG_SWITCH_PA1_OPEN) || \ @@ -168,9 +198,7 @@ typedef enum (((STATE) & SYSCFG_SWITCH_PC2_CLOSE) == SYSCFG_SWITCH_PC2_CLOSE) || \ (((STATE) & SYSCFG_SWITCH_PC3_OPEN) == SYSCFG_SWITCH_PC3_OPEN) || \ (((STATE) & SYSCFG_SWITCH_PC3_CLOSE) == SYSCFG_SWITCH_PC3_CLOSE)) -/** - * @} - */ + /** @defgroup SYSCFG_Boot_Config Boot Config * @{ @@ -327,6 +355,9 @@ typedef enum #define EXTI_LINE86 ((uint32_t)0x56) /* Not available in all family lines */ #define EXTI_LINE87 ((uint32_t)0x57) #define EXTI_LINE88 ((uint32_t)0x58) /* Not available in all family lines */ +#define EXTI_LINE89 ((uint32_t)0x59) /* Not available in all family lines */ +#define EXTI_LINE90 ((uint32_t)0x5A) /* Not available in all family lines */ +#define EXTI_LINE91 ((uint32_t)0x5B) /* Not available in all family lines */ #if defined(DUAL_CORE) #define IS_HAL_EXTI_CONFIG_LINE(LINE) (((LINE) == EXTI_LINE0) || ((LINE) == EXTI_LINE1) || \ @@ -349,13 +380,13 @@ typedef enum ((LINE) == EXTI_LINE4) || ((LINE) == EXTI_LINE5) || \ ((LINE) == EXTI_LINE6) || ((LINE) == EXTI_LINE7) || \ ((LINE) == EXTI_LINE8) || ((LINE) == EXTI_LINE9) || \ - ((LINE) == EXTI_LINE10) || ((LINE) == EXTI_LINE11) || \ - ((LINE) == EXTI_LINE12) || ((LINE) == EXTI_LINE13) || \ - ((LINE) == EXTI_LINE14) || ((LINE) == EXTI_LINE15) || \ - ((LINE) == EXTI_LINE16) || ((LINE) == EXTI_LINE17) || \ - ((LINE) == EXTI_LINE18) || ((LINE) == EXTI_LINE19) || \ - ((LINE) == EXTI_LINE20) || ((LINE) == EXTI_LINE21) || \ - ((LINE) == EXTI_LINE49) || ((LINE) == EXTI_LINE51) || \ + ((LINE) == EXTI_LINE10) || ((LINE) == EXTI_LINE11) || \ + ((LINE) == EXTI_LINE12) || ((LINE) == EXTI_LINE13) || \ + ((LINE) == EXTI_LINE14) || ((LINE) == EXTI_LINE15) || \ + ((LINE) == EXTI_LINE16) || ((LINE) == EXTI_LINE17) || \ + ((LINE) == EXTI_LINE18) || ((LINE) == EXTI_LINE19) || \ + ((LINE) == EXTI_LINE20) || ((LINE) == EXTI_LINE21) || \ + ((LINE) == EXTI_LINE49) || ((LINE) == EXTI_LINE51) || \ ((LINE) == EXTI_LINE85) || ((LINE) == EXTI_LINE86)) #endif /* DUAL_CORE */ @@ -444,7 +475,8 @@ typedef enum ((LINE) == EXTI_LINE75) || ((LINE) == EXTI_LINE76) || \ ((LINE) == EXTI_LINE85) || \ ((LINE) == EXTI_LINE86) || ((LINE) == EXTI_LINE87) || \ - ((LINE) == EXTI_LINE88)) + ((LINE) == EXTI_LINE88) || ((LINE) == EXTI_LINE89) || \ + ((LINE) == EXTI_LINE90) || ((LINE) == EXTI_LINE91)) #endif /*DUAL_CORE*/ #if defined(DUAL_CORE) @@ -530,7 +562,8 @@ typedef enum ((LINE) == EXTI_LINE75) || ((LINE) == EXTI_LINE76) || \ ((LINE) == EXTI_LINE85) || \ ((LINE) == EXTI_LINE86) || ((LINE) == EXTI_LINE87) || \ - ((LINE) == EXTI_LINE88)) + ((LINE) == EXTI_LINE88) || ((LINE) == EXTI_LINE89) || \ + ((LINE) == EXTI_LINE90) || ((LINE) == EXTI_LINE91)) #endif /*DUAL_CORE*/ #if defined(DUAL_CORE) @@ -608,7 +641,7 @@ typedef enum ((LINE) == EXTI_LINE41) || ((LINE) == EXTI_LINE48) || \ ((LINE) == EXTI_LINE49) || ((LINE) == EXTI_LINE50) || \ ((LINE) == EXTI_LINE51) || ((LINE) == EXTI_LINE52) || \ - ((LINE) == EXTI_LINE53)) + ((LINE) == EXTI_LINE53) || ((LINE) == EXTI_LINE88)) #else #define IS_EXTI_D3_LINE(LINE) (((LINE) == EXTI_LINE0) || ((LINE) == EXTI_LINE1) || \ ((LINE) == EXTI_LINE2) || ((LINE) == EXTI_LINE3) || \ @@ -667,10 +700,10 @@ typedef enum /* Exported macro ------------------------------------------------------------*/ +#if defined(DUAL_CORE) /** @defgroup ART_Exported_Macros ART Exported Macros * @{ */ -#if defined(DUAL_CORE) /** @brief ART Enable Macro. * Enable the Cortex-M4 ART cache. @@ -687,10 +720,10 @@ typedef enum */ #define __HAL_ART_CONFIG_BASE_ADDRESS(__BASE_ADDRESS__) MODIFY_REG(ART->CTR, ART_CTR_PCACHEADDR, (((__BASE_ADDRESS__) >> 12U) & 0x000FFF00UL)) -#endif /* DUAL_CORE */ /** * @} */ +#endif /* DUAL_CORE */ /** @defgroup SYSCFG_Exported_Macros SYSCFG Exported Macros * @{ @@ -820,8 +853,19 @@ typedef enum #define __HAL_DBGMCU_FREEZE_I2C1() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_I2C1)) #define __HAL_DBGMCU_FREEZE_I2C2() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_I2C2)) #define __HAL_DBGMCU_FREEZE_I2C3() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_I2C3)) +#if defined(I2C5) +#define __HAL_DBGMCU_FREEZE_I2C5() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_I2C5)) +#endif /*I2C5*/ +#if defined(DBGMCU_APB1HFZ1_DBG_FDCAN) #define __HAL_DBGMCU_FREEZE_FDCAN() (DBGMCU->APB1HFZ1 |= (DBGMCU_APB1HFZ1_DBG_FDCAN)) +#endif /*DBGMCU_APB1HFZ1_DBG_FDCAN*/ +#if defined(TIM23) +#define __HAL_DBGMCU_FREEZE_TIM23() (DBGMCU->APB1HFZ1 |= (DBGMCU_APB1HFZ1_DBG_TIM23)) +#endif /*TIM23*/ +#if defined(TIM24) +#define __HAL_DBGMCU_FREEZE_TIM24() (DBGMCU->APB1HFZ1 |= (DBGMCU_APB1HFZ1_DBG_TIM24)) +#endif /*TIM24*/ #define __HAL_DBGMCU_FREEZE_TIM1() (DBGMCU->APB2FZ1 |= (DBGMCU_APB2FZ1_DBG_TIM1)) #define __HAL_DBGMCU_FREEZE_TIM8() (DBGMCU->APB2FZ1 |= (DBGMCU_APB2FZ1_DBG_TIM8)) @@ -854,8 +898,19 @@ typedef enum #define __HAL_DBGMCU_UnFreeze_I2C1() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_I2C1)) #define __HAL_DBGMCU_UnFreeze_I2C2() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_I2C2)) #define __HAL_DBGMCU_UnFreeze_I2C3() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_I2C3)) +#if defined(I2C5) +#define __HAL_DBGMCU_UnFreeze_I2C5() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_I2C5)) +#endif /*I2C5*/ +#if defined(DBGMCU_APB1HFZ1_DBG_FDCAN) #define __HAL_DBGMCU_UnFreeze_FDCAN() (DBGMCU->APB1HFZ1 &= ~ (DBGMCU_APB1HFZ1_DBG_FDCAN)) +#endif /*DBGMCU_APB1HFZ1_DBG_FDCAN*/ +#if defined(TIM23) +#define __HAL_DBGMCU_UnFreeze_TIM23() (DBGMCU->APB1HFZ1 &= ~ (DBGMCU_APB1HFZ1_DBG_TIM23)) +#endif /*TIM23*/ +#if defined(TIM24) +#define __HAL_DBGMCU_UnFreeze_TIM24() (DBGMCU->APB1HFZ1 &= ~ (DBGMCU_APB1HFZ1_DBG_TIM24)) +#endif /*TIM24*/ #define __HAL_DBGMCU_UnFreeze_TIM1() (DBGMCU->APB2FZ1 &= ~ (DBGMCU_APB2FZ1_DBG_TIM1)) #define __HAL_DBGMCU_UnFreeze_TIM8() (DBGMCU->APB2FZ1 &= ~ (DBGMCU_APB2FZ1_DBG_TIM8)) @@ -1060,6 +1115,12 @@ void HAL_SYSCFG_VREFBUF_HighImpedanceConfig(uint32_t Mode); void HAL_SYSCFG_VREFBUF_TrimmingConfig(uint32_t TrimmingValue); HAL_StatusTypeDef HAL_SYSCFG_EnableVREFBUF(void); void HAL_SYSCFG_DisableVREFBUF(void); +#if defined(SYSCFG_ADC2ALT_ADC2_ROUT0) +void HAL_SYSCFG_ADC2ALT_Rout0Config(uint32_t Adc2AltRout0); +#endif /*SYSCFG_ADC2ALT_ADC2_ROUT0*/ +#if defined(SYSCFG_ADC2ALT_ADC2_ROUT1) +void HAL_SYSCFG_ADC2ALT_Rout1Config(uint32_t Adc2AltRout1); +#endif /*SYSCFG_ADC2ALT_ADC2_ROUT1*/ /** * @} diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_adc.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_adc.h index 0752dc9..e3cb21d 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_adc.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_adc.h @@ -49,8 +49,12 @@ extern "C" { */ typedef struct { - uint32_t Ratio; /*!< Configures the oversampling ratio. - This parameter can be a value between 1 and 1024 */ + uint32_t Ratio; /*!< Configures the oversampling ratio. */ +#if defined(ADC_VER_V5_V90) + /* On devices STM32H72xx and STM32H73xx, this parameter can be a value from 1 to 1023 for ADC1/2 or a value of @ref ADC_HAL_EC_OVS_RATIO for ADC3*/ +#else + /*This parameter can be a value of @ref ADC_HAL_EC_OVS_RATIO */ +#endif uint32_t RightBitShift; /*!< Configures the division coefficient for the Oversampler. This parameter can be a value of @ref ADC_HAL_EC_OVS_SHIFT */ @@ -100,6 +104,13 @@ typedef struct uint32_t Resolution; /*!< Configure the ADC resolution. This parameter can be a value of @ref ADC_HAL_EC_RESOLUTION */ +#if defined(ADC_VER_V5_V90) + uint32_t DataAlign; /*!< Specify ADC data alignment in conversion data register (right or left). + Refer to reference manual for alignments formats versus resolutions. + This parameter can be a value of @ref ADC_HAL_EC_DATA_ALIGN + This parameter is reserved for ADC3 on devices STM32H72xx and STM32H73xx*/ +#endif + uint32_t ScanConvMode; /*!< Configure the sequencer of ADC groups regular and injected. This parameter can be associated to parameter 'DiscontinuousConvMode' to have main sequence subdivided in successive parts. If disabled: Conversion is performed in single mode (one channel converted, the one defined in rank 1). @@ -156,7 +167,22 @@ typedef struct Note: In continuous mode, DMA must be configured in circular mode. Otherwise an overrun will be triggered when DMA buffer maximum pointer is reached. This parameter can be a value of @ref ADC_ConversionDataManagement. Note: This parameter must be modified when no conversion is on going on both regular and injected groups - (ADC disabled, or ADC enabled without continuous mode or external trigger that could launch a conversion). */ + (ADC disabled, or ADC enabled without continuous mode or external trigger that could launch a conversion).*/ +#if defined(ADC_VER_V5_V90) + /*Note: On devices STM32H72xx and STM32H73xx, this parameter is specific to ADC3 only. */ + + uint32_t SamplingMode; /*!< Select the sampling mode to be used for ADC group regular conversion. + This parameter can be a value of @ref ADC_regular_sampling_mode. + Note: + - On devices STM32H72xx and STM32H73xx, this parameter is specific to ADC3 only. */ + + FunctionalState DMAContinuousRequests; /*!< Specify whether the DMA requests are performed in one shot mode (DMA transfer stops when number of conversions is reached) + or in continuous mode (DMA transfer unlimited, whatever number of conversions). + This parameter can be set to ENABLE or DISABLE. + Notes: + - In continuous mode, DMA must be configured in circular mode. Otherwise an overrun will be triggered when DMA buffer maximum pointer is reached. + - Specific to ADC3 only on devices STM32H72xx and STM32H73xx */ +#endif uint32_t Overrun; /*!< Select the behavior in case of overrun: data overwritten or preserved (default). This parameter applies to ADC group regular only. @@ -239,7 +265,20 @@ typedef struct FunctionalState OffsetRightShift; /*!< Define the Right-shift data after Offset correction. This parameter is applied only for 16-bit or 8-bit resolution. This parameter can be set to ENABLE or DISABLE.*/ - +#if defined(ADC_VER_V5_V90) + uint32_t OffsetSign; /*!< Define if the offset should be substracted (negative sign) or added (positive sign) from or to the raw converted data. + This parameter can be a value of @ref ADCEx_OffsetSign. + Note: + - This parameter must be modified when no conversion is on going on both regular and injected groups (ADC disabled, or ADC enabled + without continuous mode or external trigger that could launch a conversion). + - Applicable for ADC3 on devices STM32H72xx and STM32H73xx */ + FunctionalState OffsetSaturation; /*!< Define if the offset should be saturated upon under or over flow. + This parameter value can be ENABLE or DISABLE. + Note: + - This parameter must be modified when no conversion is on going on both regular and injected groups (ADC disabled, or ADC enabled + without continuous mode or external trigger that could launch a conversion). + - Applicable for ADC3 on devices STM32H72xx and STM32H73xx */ +#endif FunctionalState OffsetSignedSaturation; /*!< Specify whether the Signed saturation feature is used or not. This parameter is applied only for 16-bit or 8-bit resolution. This parameter can be set to ENABLE or DISABLE. */ @@ -291,6 +330,13 @@ typedef struct impacted: the comparison of analog watchdog thresholds is done on oversampling intermediate computation (after ratio, before shift application): intermediate register bitfield [32:7] (26 most significant bits). */ +#if defined(ADC_VER_V5_V90) + uint32_t FilteringConfig; /*!< Specify whether filtering should be use and the number of samples to consider. + Before setting flag or raising interrupt, analog watchdog can wait to have several + consecutive out-of-window samples. This parameter allows to configure this number. + This parameter only applies to Analog watchdog 1. For others, use value ADC_AWD_FILTERING_NONE. + This parameter can be a value of @ref ADC_analog_watchdog_filtering_config. Applicable for ADC3 on devices STM32H72xx and STM32H73xx. */ +#endif } ADC_AnalogWDGConfTypeDef; /** @@ -464,15 +510,35 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to /** @defgroup ADC_HAL_EC_RESOLUTION ADC instance - Resolution * @{ */ -#define ADC_RESOLUTION_16B (LL_ADC_RESOLUTION_16B) /*!< ADC resolution 16 bits */ -#define ADC_RESOLUTION_14B (LL_ADC_RESOLUTION_14B) /*!< ADC resolution 14 bits */ +#define ADC_RESOLUTION_16B (LL_ADC_RESOLUTION_16B) /*!< ADC resolution 16 bits, On devices STM32H72xx and STM32H73xx, parameter available only on ADC instance: ADC1, ADC2 */ +#define ADC_RESOLUTION_14B (LL_ADC_RESOLUTION_14B) /*!< ADC resolution 14 bits, On devices STM32H72xx and STM32H73xx, parameter available only on ADC instance: ADC1, ADC2 */ #define ADC_RESOLUTION_12B (LL_ADC_RESOLUTION_12B) /*!< ADC resolution 12 bits */ #define ADC_RESOLUTION_10B (LL_ADC_RESOLUTION_10B) /*!< ADC resolution 10 bits */ #define ADC_RESOLUTION_8B (LL_ADC_RESOLUTION_8B) /*!< ADC resolution 8 bits */ + +#if defined (ADC_VER_V5_X) +#define ADC_RESOLUTION_14B_OPT (LL_ADC_RESOLUTION_14B_OPT) /*!< ADC resolution 14 bits optimized for power consumption, available on for devices revision V only */ +#define ADC_RESOLUTION_12B_OPT (LL_ADC_RESOLUTION_12B_OPT) /*!< ADC resolution 12 bits optimized for power consumption, available on for devices revision V only */ +#endif + +#if defined(ADC_VER_V5_V90) +#define ADC_RESOLUTION_6B (LL_ADC_RESOLUTION_6B) /*!< ADC resolution 6 bits, On devices STM32H72xx and STM32H73xx, parameter available only on ADC instance: ADC3 */ +#endif /* ADC_VER_V5_V90 */ /** * @} */ +#if defined(ADC_VER_V5_V90) +/** @defgroup ADC_HAL_EC_DATA_ALIGN ADC conversion data alignment + * @{ + */ +#define ADC3_DATAALIGN_RIGHT (LL_ADC_DATA_ALIGN_RIGHT) /*!< ADC conversion data alignment: right aligned (alignment on data register LSB bit 0)*/ +#define ADC3_DATAALIGN_LEFT (LL_ADC_DATA_ALIGN_LEFT) /*!< ADC conversion data alignment: left aligned (aligment on data register MSB bit 15)*/ +/** + * @} + */ +#endif + /** @defgroup ADC_Scan_mode ADC sequencer scan mode * @{ */ @@ -508,6 +574,12 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to #define ADC_EXTERNALTRIG_LPTIM1_OUT (LL_ADC_REG_TRIG_EXT_LPTIM1_OUT) /*!< ADC group regular conversion trigger from external peripheral: LPTIM1 OUT event. Trigger edge set to rising edge (default setting). */ #define ADC_EXTERNALTRIG_LPTIM2_OUT (LL_ADC_REG_TRIG_EXT_LPTIM2_OUT) /*!< ADC group regular conversion trigger from external peripheral: LPTIM2 OUT event. Trigger edge set to rising edge (default setting). */ #define ADC_EXTERNALTRIG_LPTIM3_OUT (LL_ADC_REG_TRIG_EXT_LPTIM3_OUT) /*!< ADC group regular conversion trigger from external peripheral: LPTIM3 event OUT. Trigger edge set to rising edge (default setting). */ +#if defined(TIM23) +#define ADC_EXTERNALTRIG_T23_TRGO (LL_ADC_REG_TRIG_EXT_TIM23_TRGO) /*!< ADC group regular conversion trigger from external peripheral: TIM23 TRGO event. Trigger edge set to rising edge (default setting). */ +#endif /*TIM23*/ +#if defined(TIM24) +#define ADC_EXTERNALTRIG_T24_TRGO (LL_ADC_REG_TRIG_EXT_TIM24_TRGO) /*!< ADC group regular conversion trigger from external peripheral: TIM24 TRGO event. Trigger edge set to rising edge (default setting). */ +#endif /*TIM24*/ /** * @} */ @@ -522,6 +594,23 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to /** * @} */ +#if defined(ADC_VER_V5_V90) +/** @defgroup ADC_regular_sampling_mode ADC group regular sampling mode + * @{ + */ +#define ADC_SAMPLING_MODE_NORMAL (0x00000000UL) /*!< ADC conversions sampling phase duration is defined using @ref ADC_HAL_EC_CHANNEL_SAMPLINGTIME */ +#define ADC_SAMPLING_MODE_BULB (ADC3_CFGR2_BULB) /*!< ADC conversions sampling phase starts immediately after end of conversion, and stops upon trigger event. + Notes: + - First conversion is using minimal sampling time (see @ref ADC_HAL_EC_CHANNEL_SAMPLINGTIME) + - Applicable for ADC3 on devices STM32H72xx and STM32H73xx */ +#define ADC_SAMPLING_MODE_TRIGGER_CONTROLED (ADC3_CFGR2_SMPTRIG) /*!< ADC conversions sampling phase is controlled by trigger events: + Trigger rising edge = start sampling + Trigger falling edge = stop sampling and start conversion + Note: Applicable for ADC3 on devices STM32H72xx and STM32H73xx */ +/** + * @} + */ +#endif /** @defgroup ADC_EOCSelection ADC sequencer end of unitary conversion or sequence conversions * @{ @@ -567,17 +656,35 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to /** @defgroup ADC_HAL_EC_CHANNEL_SAMPLINGTIME Channel - Sampling time * @{ */ -#define ADC_SAMPLETIME_1CYCLE_5 (LL_ADC_SAMPLINGTIME_1CYCLE_5) /*!< Sampling time 1.5 ADC clock cycles */ -#define ADC_SAMPLETIME_2CYCLES_5 (LL_ADC_SAMPLINGTIME_2CYCLES_5) /*!< Sampling time 2.5 ADC clock cycles */ -#define ADC_SAMPLETIME_8CYCLES_5 (LL_ADC_SAMPLINGTIME_8CYCLES_5) /*!< Sampling time 8.5 ADC clock cycles */ -#define ADC_SAMPLETIME_16CYCLES_5 (LL_ADC_SAMPLINGTIME_16CYCLES_5) /*!< Sampling time 16.5 ADC clock cycles */ -#define ADC_SAMPLETIME_32CYCLES_5 (LL_ADC_SAMPLINGTIME_32CYCLES_5) /*!< Sampling time 32.5 ADC clock cycles */ -#define ADC_SAMPLETIME_64CYCLES_5 (LL_ADC_SAMPLINGTIME_64CYCLES_5) /*!< Sampling time 64.5 ADC clock cycles */ -#define ADC_SAMPLETIME_387CYCLES_5 (LL_ADC_SAMPLINGTIME_387CYCLES_5) /*!< Sampling time 387.5 ADC clock cycles */ -#define ADC_SAMPLETIME_810CYCLES_5 (LL_ADC_SAMPLINGTIME_810CYCLES_5) /*!< Sampling time 810.5 ADC clock cycles */ +#define ADC_SAMPLETIME_1CYCLE_5 (LL_ADC_SAMPLINGTIME_1CYCLE_5) /*!< Sampling time 1.5 ADC clock cycles, On devices STM32H72xx and STM32H73xx, parameter available only on ADC instance: ADC1, ADC2 */ +#define ADC_SAMPLETIME_2CYCLES_5 (LL_ADC_SAMPLINGTIME_2CYCLES_5) /*!< Sampling time 2.5 ADC clock cycles, On devices STM32H72xx and STM32H73xx, parameter available only on ADC instance: ADC1, ADC2 */ +#define ADC_SAMPLETIME_8CYCLES_5 (LL_ADC_SAMPLINGTIME_8CYCLES_5) /*!< Sampling time 8.5 ADC clock cycles, On devices STM32H72xx and STM32H73xx, parameter available only on ADC instance: ADC1, ADC2 */ +#define ADC_SAMPLETIME_16CYCLES_5 (LL_ADC_SAMPLINGTIME_16CYCLES_5) /*!< Sampling time 16.5 ADC clock cycles, On devices STM32H72xx and STM32H73xx, parameter available only on ADC instance: ADC1, ADC2 */ +#define ADC_SAMPLETIME_32CYCLES_5 (LL_ADC_SAMPLINGTIME_32CYCLES_5) /*!< Sampling time 32.5 ADC clock cycles, On devices STM32H72xx and STM32H73xx, parameter available only on ADC instance: ADC1, ADC2 */ +#define ADC_SAMPLETIME_64CYCLES_5 (LL_ADC_SAMPLINGTIME_64CYCLES_5) /*!< Sampling time 64.5 ADC clock cycles, On devices STM32H72xx and STM32H73xx, parameter available only on ADC instance: ADC1, ADC2 */ +#define ADC_SAMPLETIME_387CYCLES_5 (LL_ADC_SAMPLINGTIME_387CYCLES_5) /*!< Sampling time 387.5 ADC clock cycles, On devices STM32H72xx and STM32H73xx, parameter available only on ADC instance: ADC1, ADC2 */ +#define ADC_SAMPLETIME_810CYCLES_5 (LL_ADC_SAMPLINGTIME_810CYCLES_5) /*!< Sampling time 810.5 ADC clock cycles, On devices STM32H72xx and STM32H73xx, parameter available only on ADC instance: ADC1, ADC2 */ /** * @} */ +#if defined(ADC_VER_V5_V90) +/** @defgroup ADC_HAL_EC_CHANNEL_SAMPLINGTIME Channel - Sampling time + * @{ + */ +#define ADC3_SAMPLETIME_2CYCLES_5 (LL_ADC_SAMPLINGTIME_ADC3_2CYCLES_5) /*!< Sampling time 2.5 ADC clock cycles, On devices STM32H72xx and STM32H73xx, parameter available only on ADC instance: ADC3 */ +#define ADC3_SAMPLETIME_6CYCLES_5 (LL_ADC_SAMPLINGTIME_ADC3_6CYCLES_5) /*!< Sampling time 6.5 ADC clock cycles, On devices STM32H72xx and STM32H73xx, parameter available only on ADC instance: ADC3 */ +#define ADC3_SAMPLETIME_12CYCLES_5 (LL_ADC_SAMPLINGTIME_ADC3_12CYCLES_5) /*!< Sampling time 12.5 ADC clock cycles, On devices STM32H72xx and STM32H73xx, parameter available only on ADC instance: ADC3 */ +#define ADC3_SAMPLETIME_24CYCLES_5 (LL_ADC_SAMPLINGTIME_ADC3_24CYCLES_5) /*!< Sampling time 24.5 ADC clock cycles, On devices STM32H72xx and STM32H73xx, parameter available only on ADC instance: ADC3 */ +#define ADC3_SAMPLETIME_47CYCLES_5 (LL_ADC_SAMPLINGTIME_ADC3_47CYCLES_5) /*!< Sampling time 47.5 ADC clock cycles, On devices STM32H72xx and STM32H73xx, parameter available only on ADC instance: ADC3 */ +#define ADC3_SAMPLETIME_92CYCLES_5 (LL_ADC_SAMPLINGTIME_ADC3_92CYCLES_5) /*!< Sampling time 92.5 ADC clock cycles, On devices STM32H72xx and STM32H73xx, parameter available only on ADC instance: ADC3 */ +#define ADC3_SAMPLETIME_247CYCLES_5 (LL_ADC_SAMPLINGTIME_ADC3_247CYCLES_5) /*!< Sampling time 247.5 ADC clock cycles, On devices STM32H72xx and STM32H73xx, parameter available only on ADC instance: ADC3 */ +#define ADC3_SAMPLETIME_640CYCLES_5 (LL_ADC_SAMPLINGTIME_ADC3_640CYCLES_5) /*!< Sampling time 640.5 ADC clock cycles, On devices STM32H72xx and STM32H73xx, parameter available only on ADC instance: ADC3 */ +#define ADC3_SAMPLETIME_3CYCLES_5 (ADC_SMPR1_SMPPLUS | LL_ADC_SAMPLINGTIME_ADC3_2CYCLES_5) /*!< Sampling time 3.5 ADC clock cycles. If selected, this sampling time replaces all sampling time 2.5 ADC clock cycles. These 2 sampling times cannot be used simultaneously. + On devices STM32H72xx and STM32H73xx, parameter available only on ADC instance: ADC3 */ +/** + * @} + */ +#endif /** @defgroup ADCEx_Calibration_Mode ADC Extended Calibration mode offset mode or linear mode * @{ @@ -628,10 +735,10 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to /** @defgroup ADC_ConversionDataManagement ADC Conversion Data Management * @{ */ -#define ADC_CONVERSIONDATA_DR (0x00000000UL) /*!< Regular Conversion data stored in DR register only */ -#define ADC_CONVERSIONDATA_DFSDM (ADC_CFGR_DMNGT_1) /*!< DFSDM mode selected */ -#define ADC_CONVERSIONDATA_DMA_ONESHOT (ADC_CFGR_DMNGT_0) /*!< DMA one shot mode selected */ -#define ADC_CONVERSIONDATA_DMA_CIRCULAR (ADC_CFGR_DMNGT_0 | ADC_CFGR_DMNGT_1) /*!< DMA circular mode selected */ +#define ADC_CONVERSIONDATA_DR ((uint32_t)0x00000000) /*!< Regular Conversion data stored in DR register only */ +#define ADC_CONVERSIONDATA_DFSDM ((uint32_t)ADC_CFGR_DMNGT_1) /*!< DFSDM mode selected */ +#define ADC_CONVERSIONDATA_DMA_ONESHOT ((uint32_t)ADC_CFGR_DMNGT_0) /*!< DMA one shot mode selected */ +#define ADC_CONVERSIONDATA_DMA_CIRCULAR ((uint32_t)(ADC_CFGR_DMNGT_0 | ADC_CFGR_DMNGT_1)) /*!< DMA circular mode selected */ /** * @} */ @@ -645,6 +752,23 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to * @} */ +#if defined(ADC_VER_V5_V90) +/** @defgroup ADC_analog_watchdog_filtering_config ADC Analog Watchdog filtering configuration + * @{ + */ +#define ADC3_AWD_FILTERING_NONE (0x00000000UL) /*!< ADC analog wathdog no filtering, one out-of-window sample is needed to raise flag or interrupt. Applicable for ADC3 on devices STM32H72xx and STM32H73xx */ +#define ADC3_AWD_FILTERING_2SAMPLES ((ADC3_TR1_AWDFILT_0)) /*!< ADC analog wathdog 2 consecutives out-of-window samples are needed to raise flag or interrupt. Applicable for ADC3 on devices STM32H72xx and STM32H73xx */ +#define ADC3_AWD_FILTERING_3SAMPLES ((ADC3_TR1_AWDFILT_1)) /*!< ADC analog wathdog 3 consecutives out-of-window samples are needed to raise flag or interrupt. Applicable for ADC3 on devices STM32H72xx and STM32H73xx */ +#define ADC3_AWD_FILTERING_4SAMPLES ((ADC3_TR1_AWDFILT_1 | ADC3_TR1_AWDFILT_0)) /*!< ADC analog wathdog 4 consecutives out-of-window samples are needed to raise flag or interrupt. Applicable for ADC3 on devices STM32H72xx and STM32H73xx */ +#define ADC3_AWD_FILTERING_5SAMPLES ((ADC3_TR1_AWDFILT_2)) /*!< ADC analog wathdog 5 consecutives out-of-window samples are needed to raise flag or interrupt. Applicable for ADC3 on devices STM32H72xx and STM32H73xx */ +#define ADC3_AWD_FILTERING_6SAMPLES ((ADC3_TR1_AWDFILT_2 | ADC3_TR1_AWDFILT_0)) /*!< ADC analog wathdog 6 consecutives out-of-window samples are needed to raise flag or interrupt. Applicable for ADC3 on devices STM32H72xx and STM32H73xx */ +#define ADC3_AWD_FILTERING_7SAMPLES ((ADC3_TR1_AWDFILT_2 | ADC3_TR1_AWDFILT_1)) /*!< ADC analog wathdog 7 consecutives out-of-window samples are needed to raise flag or interrupt. Applicable for ADC3 on devices STM32H72xx and STM32H73xx */ +#define ADC3_AWD_FILTERING_8SAMPLES ((ADC3_TR1_AWDFILT_2 | ADC3_TR1_AWDFILT_1 | ADC3_TR1_AWDFILT_0)) /*!< ADC analog wathdog 8 consecutives out-of-window samples are needed to raise flag or interrupt. Applicable for ADC3 on devices STM32H72xx and STM32H73xx */ +/** + * @} + */ +#endif + /** @defgroup ADC_analog_watchdog_mode ADC Analog Watchdog Mode * @{ */ @@ -658,6 +782,24 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to /** * @} */ +#if defined(ADC_VER_V5_V90) +/** @defgroup ADC_HAL_EC_OVS_RATIO Oversampling - Ratio + * @{ + */ +#define ADC3_OVERSAMPLING_RATIO_2 (LL_ADC_OVS_RATIO_2) /*!< ADC oversampling ratio of 2 (2 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift). Applicable for ADC3 on devices STM32H72xx and STM32H73xx */ +#define ADC3_OVERSAMPLING_RATIO_4 (LL_ADC_OVS_RATIO_4) /*!< ADC oversampling ratio of 4 (4 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift). Applicable for ADC3 on devices STM32H72xx and STM32H73xx */ +#define ADC3_OVERSAMPLING_RATIO_8 (LL_ADC_OVS_RATIO_8) /*!< ADC oversampling ratio of 8 (8 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift). Applicable for ADC3 on devices STM32H72xx and STM32H73xx */ +#define ADC3_OVERSAMPLING_RATIO_16 (LL_ADC_OVS_RATIO_16) /*!< ADC oversampling ratio of 16 (16 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift). Applicable for ADC3 on devices STM32H72xx and STM32H73xx */ +#define ADC3_OVERSAMPLING_RATIO_32 (LL_ADC_OVS_RATIO_32) /*!< ADC oversampling ratio of 32 (32 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift). Applicable for ADC3 on devices STM32H72xx and STM32H73xx */ +#define ADC3_OVERSAMPLING_RATIO_64 (LL_ADC_OVS_RATIO_64) /*!< ADC oversampling ratio of 64 (64 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift). Applicable for ADC3 on devices STM32H72xx and STM32H73xx */ +#define ADC3_OVERSAMPLING_RATIO_128 (LL_ADC_OVS_RATIO_128) /*!< ADC oversampling ratio of 128 (128 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift). Applicable for ADC3 on devices STM32H72xx and STM32H73xx */ +#define ADC3_OVERSAMPLING_RATIO_256 (LL_ADC_OVS_RATIO_256) /*!< ADC oversampling ratio of 256 (256 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift). Applicable for ADC3 on devices STM32H72xx and STM32H73xx */ +#define ADC3_OVERSAMPLING_RATIO_512 (LL_ADC_OVS_RATIO_512) /*!< ADC oversampling ratio of 256 (256 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift). Applicable for ADC3 on devices STM32H72xx and STM32H73xx */ +#define ADC3_OVERSAMPLING_RATIO_1024 (LL_ADC_OVS_RATIO_1024) /*!< ADC oversampling ratio of 256 (256 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift). Applicable for ADC3 on devices STM32H72xx and STM32H73xx */ +/** + * @} + */ +#endif /** @defgroup ADC_HAL_EC_OVS_SHIFT Oversampling - Data shift * @{ @@ -863,6 +1005,16 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to #define IS_ADC_RANGE(__RESOLUTION__, __ADC_VALUE__) \ ((__ADC_VALUE__) <= __LL_ADC_DIGITAL_SCALE(__RESOLUTION__)) +#if defined(ADC_VER_V5_V90) +/** + * @brief Verify that a given value is aligned with the ADC resolution range. Applicable for ADC3 on devices STM32H72xx and STM32H73xx. + * @param __RESOLUTION__ ADC resolution (12, 10, 8 or 6 bits). + * @param __ADC_VALUE__ value checked against the resolution. + * @retval SET (__ADC_VALUE__ in line with __RESOLUTION__) or RESET (__ADC_VALUE__ not in line with __RESOLUTION__) + */ +#define IS_ADC3_RANGE(__RESOLUTION__, __ADC_VALUE__) \ + ((__ADC_VALUE__) <= __LL_ADC3_DIGITAL_SCALE(__RESOLUTION__)) +#endif /** * @brief Verify the length of the scheduled regular conversions group. * @param __LENGTH__ number of programmed conversions. @@ -905,11 +1057,29 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to * @param __RESOLUTION__ programmed ADC resolution. * @retval SET (__RESOLUTION__ is a valid value) or RESET (__RESOLUTION__ is invalid) */ +#if defined(ADC_VER_V5_V90) +#define IS_ADC_RESOLUTION(__RESOLUTION__) (((__RESOLUTION__) == ADC_RESOLUTION_16B) || \ + ((__RESOLUTION__) == ADC_RESOLUTION_14B) || \ + ((__RESOLUTION__) == ADC_RESOLUTION_12B) || \ + ((__RESOLUTION__) == ADC_RESOLUTION_10B) || \ + ((__RESOLUTION__) == ADC_RESOLUTION_8B) || \ + ((__RESOLUTION__) == ADC_RESOLUTION_6B) ) +#elif defined (ADC_VER_V5_X) +#define IS_ADC_RESOLUTION(__RESOLUTION__) (((__RESOLUTION__) == ADC_RESOLUTION_16B) || \ + ((__RESOLUTION__) == ADC_RESOLUTION_14B) || \ + ((__RESOLUTION__) == ADC_RESOLUTION_14B_OPT) || \ + ((__RESOLUTION__) == ADC_RESOLUTION_12B) || \ + ((__RESOLUTION__) == ADC_RESOLUTION_12B_OPT) || \ + ((__RESOLUTION__) == ADC_RESOLUTION_10B) || \ + ((__RESOLUTION__) == ADC_RESOLUTION_8B) ) +#else /* ADC_VER_V5_3 */ #define IS_ADC_RESOLUTION(__RESOLUTION__) (((__RESOLUTION__) == ADC_RESOLUTION_16B) || \ ((__RESOLUTION__) == ADC_RESOLUTION_14B) || \ ((__RESOLUTION__) == ADC_RESOLUTION_12B) || \ ((__RESOLUTION__) == ADC_RESOLUTION_10B) || \ ((__RESOLUTION__) == ADC_RESOLUTION_8B) ) +#endif /* ADC_VER_V5_V90*/ + /** * @brief Verify the ADC resolution setting when limited to 8 bits. * @param __RESOLUTION__ programmed ADC resolution when limited to 8 bits. @@ -917,6 +1087,26 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to */ #define IS_ADC_RESOLUTION_8_BITS(__RESOLUTION__) (((__RESOLUTION__) == ADC_RESOLUTION_8B)) +#if defined(ADC_VER_V5_V90) +/** + * @brief Verify the ADC converted data alignment. Applicable for ADC3 on devices STM32H72xx and STM32H73xx. + * @param __ALIGN__ programmed ADC converted data alignment. + * @retval SET (__ALIGN__ is a valid value) or RESET (__ALIGN__ is invalid) + */ +#define IS_ADC3_DATA_ALIGN(__ALIGN__) (((__ALIGN__) == ADC3_DATAALIGN_RIGHT) || \ + ((__ALIGN__) == ADC3_DATAALIGN_LEFT) ) + +/** + * @brief Verify the ADC regular conversions external trigger. + * @param __SAMPLINGMODE__ programmed ADC regular conversions external trigger. + * @retval SET (__SAMPLINGMODE__ is a valid value) or RESET (__SAMPLINGMODE__ is invalid) + */ +#define IS_ADC3_SAMPLINGMODE(__SAMPLINGMODE__) (((__SAMPLINGMODE__) == ADC_SAMPLING_MODE_NORMAL) || \ + ((__SAMPLINGMODE__) == ADC_SAMPLING_MODE_BULB) || \ + ((__SAMPLINGMODE__) == ADC_SAMPLING_MODE_TRIGGER_CONTROLED) ) + +#endif + /** * @brief Verify the ADC scan mode. * @param __SCAN_MODE__ programmed ADC scan mode. @@ -940,6 +1130,7 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to * @param __REGTRIG__ programmed ADC regular conversions external trigger. * @retval SET (__REGTRIG__ is a valid value) or RESET (__REGTRIG__ is invalid) */ +#if defined(ADC_VER_V5_V90) #define IS_ADC_EXTTRIG(__REGTRIG__) (((__REGTRIG__) == ADC_EXTERNALTRIG_T1_CC1) || \ ((__REGTRIG__) == ADC_EXTERNALTRIG_T1_CC2) || \ ((__REGTRIG__) == ADC_EXTERNALTRIG_T1_CC3) || \ @@ -961,7 +1152,34 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to ((__REGTRIG__) == ADC_EXTERNALTRIG_LPTIM1_OUT) || \ ((__REGTRIG__) == ADC_EXTERNALTRIG_LPTIM2_OUT) || \ ((__REGTRIG__) == ADC_EXTERNALTRIG_LPTIM3_OUT) || \ + ((__REGTRIG__) == ADC_EXTERNALTRIG_T23_TRGO) || \ + ((__REGTRIG__) == ADC_EXTERNALTRIG_T24_TRGO) || \ ((__REGTRIG__) == ADC_SOFTWARE_START) ) +#else +#define IS_ADC_EXTTRIG(__REGTRIG__) (((__REGTRIG__) == ADC_EXTERNALTRIG_T1_CC1) || \ + ((__REGTRIG__) == ADC_EXTERNALTRIG_T1_CC2) || \ + ((__REGTRIG__) == ADC_EXTERNALTRIG_T1_CC3) || \ + ((__REGTRIG__) == ADC_EXTERNALTRIG_T2_CC2) || \ + ((__REGTRIG__) == ADC_EXTERNALTRIG_T3_TRGO) || \ + ((__REGTRIG__) == ADC_EXTERNALTRIG_T4_CC4) || \ + ((__REGTRIG__) == ADC_EXTERNALTRIG_EXT_IT11) || \ + ((__REGTRIG__) == ADC_EXTERNALTRIG_T8_TRGO) || \ + ((__REGTRIG__) == ADC_EXTERNALTRIG_T8_TRGO2) || \ + ((__REGTRIG__) == ADC_EXTERNALTRIG_T1_TRGO) || \ + ((__REGTRIG__) == ADC_EXTERNALTRIG_T1_TRGO2) || \ + ((__REGTRIG__) == ADC_EXTERNALTRIG_T2_TRGO) || \ + ((__REGTRIG__) == ADC_EXTERNALTRIG_T4_TRGO) || \ + ((__REGTRIG__) == ADC_EXTERNALTRIG_T6_TRGO) || \ + ((__REGTRIG__) == ADC_EXTERNALTRIG_T15_TRGO) || \ + ((__REGTRIG__) == ADC_EXTERNALTRIG_T3_CC4) || \ + ((__REGTRIG__) == ADC_EXTERNALTRIG_HR1_ADCTRG1) || \ + ((__REGTRIG__) == ADC_EXTERNALTRIG_HR1_ADCTRG3) || \ + ((__REGTRIG__) == ADC_EXTERNALTRIG_LPTIM1_OUT) || \ + ((__REGTRIG__) == ADC_EXTERNALTRIG_LPTIM2_OUT) || \ + ((__REGTRIG__) == ADC_EXTERNALTRIG_LPTIM3_OUT) || \ + ((__REGTRIG__) == ADC_SOFTWARE_START) ) +#endif /* ADC_VER_V5_V90*/ + /** * @brief Verify the ADC regular conversions check for converted data availability. @@ -1044,7 +1262,7 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to /* Delay for ADC voltage regulator startup time */ /* Maximum delay is 10 microseconds */ /* (refer device RM, parameter Tadcvreg_stup). */ -#define ADC_STAB_DELAY_US ((uint32_t) 10) /*!< ADC voltage regulator startup time */ +#define ADC_STAB_DELAY_US (10UL) /*!< ADC voltage regulator startup time */ /** * @} @@ -1069,10 +1287,10 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to #if (USE_HAL_ADC_REGISTER_CALLBACKS == 1) #define __HAL_ADC_RESET_HANDLE_STATE(__HANDLE__) \ do{ \ - (__HANDLE__)->State = HAL_ADC_STATE_RESET; \ - (__HANDLE__)->MspInitCallback = NULL; \ - (__HANDLE__)->MspDeInitCallback = NULL; \ - } while(0) + (__HANDLE__)->State = HAL_ADC_STATE_RESET; \ + (__HANDLE__)->MspInitCallback = NULL; \ + (__HANDLE__)->MspDeInitCallback = NULL; \ + } while(0) #else #define __HAL_ADC_RESET_HANDLE_STATE(__HANDLE__) \ ((__HANDLE__)->State = HAL_ADC_STATE_RESET) @@ -1225,7 +1443,7 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to * @arg @ref ADC_CHANNEL_VBAT (1) * @arg @ref ADC_CHANNEL_DAC1CH1_ADC2 (2) * @arg @ref ADC_CHANNEL_DAC1CH2_ADC2 (2) - * + * * (1) On STM32H7, parameter available only on ADC instance: ADC3.\n * (2) On STM32H7, parameter available only on ADC instance: ADC2.\n * (3) On STM32H7, fast channel (0.125 us for 14-bit resolution (ADC conversion rate up to 8 Ms/s)). @@ -1233,7 +1451,7 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to * @retval Value between Min_Data=0 and Max_Data=18 */ #define __HAL_ADC_CHANNEL_TO_DECIMAL_NB(__CHANNEL__) \ - __LL_ADC_CHANNEL_TO_DECIMAL_NB((__CHANNEL__)) + __LL_ADC_CHANNEL_TO_DECIMAL_NB((__CHANNEL__)) /** * @brief Helper macro to get ADC channel in literal format ADC_CHANNEL_x @@ -1267,7 +1485,7 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to * @arg @ref ADC_CHANNEL_VBAT (1) * @arg @ref ADC_CHANNEL_DAC1CH1_ADC2 (2) * @arg @ref ADC_CHANNEL_DAC1CH2_ADC2 (2) - * + * * (1) On STM32H7, parameter available only on ADC instance: ADC3.\n * (2) On STM32H7, parameter available only on ADC instance: ADC2.\n * (3) On STM32H7, fast channel (0.125 us for 14-bit resolution (ADC conversion rate up to 8 Ms/s)). @@ -1277,7 +1495,7 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to * using helper macro @ref __LL_ADC_CHANNEL_INTERNAL_TO_EXTERNAL(). */ #define __HAL_ADC_DECIMAL_NB_TO_CHANNEL(__DECIMAL_NB__) \ - __LL_ADC_DECIMAL_NB_TO_CHANNEL((__DECIMAL_NB__)) + __LL_ADC_DECIMAL_NB_TO_CHANNEL((__DECIMAL_NB__)) /** * @brief Helper macro to determine whether the selected channel @@ -1321,7 +1539,7 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to * @arg @ref ADC_CHANNEL_VBAT (1) * @arg @ref ADC_CHANNEL_DAC1CH1_ADC2 (2) * @arg @ref ADC_CHANNEL_DAC1CH2_ADC2 (2) - * + * * (1) On STM32H7, parameter available only on ADC instance: ADC3.\n * (2) On STM32H7, parameter available only on ADC instance: ADC2.\n * (3) On STM32H7, fast channel (0.125 us for 14-bit resolution (ADC conversion rate up to 8 Ms/s)). @@ -1330,7 +1548,7 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to * Value "1" if the channel corresponds to a parameter definition of a ADC internal channel. */ #define __HAL_ADC_IS_CHANNEL_INTERNAL(__CHANNEL__) \ - __LL_ADC_IS_CHANNEL_INTERNAL((__CHANNEL__)) + __LL_ADC_IS_CHANNEL_INTERNAL((__CHANNEL__)) /** * @brief Helper macro to convert a channel defined from parameter @@ -1370,7 +1588,7 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to * @arg @ref ADC_CHANNEL_VBAT (1) * @arg @ref ADC_CHANNEL_DAC1CH1_ADC2 (2) * @arg @ref ADC_CHANNEL_DAC1CH2_ADC2 (2) - * + * * (1) On STM32H7, parameter available only on ADC instance: ADC3.\n * (2) On STM32H7, parameter available only on ADC instance: ADC2.\n * (3) On STM32H7, fast channel (0.125 us for 14-bit resolution (ADC conversion rate up to 8 Ms/s)). @@ -1397,7 +1615,7 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to * @arg @ref ADC_CHANNEL_18 */ #define __HAL_ADC_CHANNEL_INTERNAL_TO_EXTERNAL(__CHANNEL__) \ - __LL_ADC_CHANNEL_INTERNAL_TO_EXTERNAL((__CHANNEL__)) + __LL_ADC_CHANNEL_INTERNAL_TO_EXTERNAL((__CHANNEL__)) /** * @brief Helper macro to determine whether the internal channel @@ -1419,14 +1637,14 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to * @arg @ref ADC_CHANNEL_VBAT (1) * @arg @ref ADC_CHANNEL_DAC1CH1_ADC2 (2) * @arg @ref ADC_CHANNEL_DAC1CH2_ADC2 (2) - * + * * (1) On STM32H7, parameter available only on ADC instance: ADC3.\n * (2) On STM32H7, parameter available only on ADC instance: ADC2. * @retval Value "0" if the internal channel selected is not available on the ADC instance selected. * Value "1" if the internal channel selected is available on the ADC instance selected. */ #define __HAL_ADC_IS_CHANNEL_INTERNAL_AVAILABLE(__ADC_INSTANCE__, __CHANNEL__) \ - __LL_ADC_IS_CHANNEL_INTERNAL_AVAILABLE((__ADC_INSTANCE__), (__CHANNEL__)) + __LL_ADC_IS_CHANNEL_INTERNAL_AVAILABLE((__ADC_INSTANCE__), (__CHANNEL__)) /** * @brief Helper macro to get the ADC multimode conversion data of ADC master @@ -1442,7 +1660,7 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to * @retval Value between Min_Data=0x000 and Max_Data=0xFFF */ #define __HAL_ADC_MULTI_CONV_DATA_MASTER_SLAVE(__ADC_MULTI_MASTER_SLAVE__, __ADC_MULTI_CONV_DATA__) \ - __LL_ADC_MULTI_CONV_DATA_MASTER_SLAVE((__ADC_MULTI_MASTER_SLAVE__), (__ADC_MULTI_CONV_DATA__)) + __LL_ADC_MULTI_CONV_DATA_MASTER_SLAVE((__ADC_MULTI_MASTER_SLAVE__), (__ADC_MULTI_CONV_DATA__)) /** * @brief Helper macro to select the ADC common instance @@ -1455,7 +1673,7 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to * @retval ADC common register instance */ #define __HAL_ADC_COMMON_INSTANCE(__ADCx__) \ - __LL_ADC_COMMON_INSTANCE((__ADCx__)) + __LL_ADC_COMMON_INSTANCE((__ADCx__)) /** * @brief Helper macro to check if all ADC instances sharing the same @@ -1475,7 +1693,7 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to * is enabled. */ #define __HAL_ADC_IS_ENABLED_ALL_COMMON_INSTANCE(__ADCXY_COMMON__) \ - __LL_ADC_IS_ENABLED_ALL_COMMON_INSTANCE((__ADCXY_COMMON__)) + __LL_ADC_IS_ENABLED_ALL_COMMON_INSTANCE((__ADCXY_COMMON__)) /** * @brief Helper macro to define the ADC conversion data full-scale digital @@ -1492,7 +1710,7 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to * @retval ADC conversion data full-scale digital value */ #define __HAL_ADC_DIGITAL_SCALE(__ADC_RESOLUTION__) \ - __LL_ADC_DIGITAL_SCALE((__ADC_RESOLUTION__)) + __LL_ADC_DIGITAL_SCALE((__ADC_RESOLUTION__)) /** * @brief Helper macro to convert the ADC conversion data from @@ -1517,9 +1735,9 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to #define __HAL_ADC_CONVERT_DATA_RESOLUTION(__DATA__,\ __ADC_RESOLUTION_CURRENT__,\ __ADC_RESOLUTION_TARGET__) \ - __LL_ADC_CONVERT_DATA_RESOLUTION((__DATA__), \ - (__ADC_RESOLUTION_CURRENT__), \ - (__ADC_RESOLUTION_TARGET__)) + __LL_ADC_CONVERT_DATA_RESOLUTION((__DATA__),\ + (__ADC_RESOLUTION_CURRENT__),\ + (__ADC_RESOLUTION_TARGET__)) /** * @brief Helper macro to calculate the voltage (unit: mVolt) @@ -1541,9 +1759,9 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to #define __HAL_ADC_CALC_DATA_TO_VOLTAGE(__VREFANALOG_VOLTAGE__,\ __ADC_DATA__,\ __ADC_RESOLUTION__) \ - __LL_ADC_CALC_DATA_TO_VOLTAGE((__VREFANALOG_VOLTAGE__), \ - (__ADC_DATA__), \ - (__ADC_RESOLUTION__)) + __LL_ADC_CALC_DATA_TO_VOLTAGE((__VREFANALOG_VOLTAGE__),\ + (__ADC_DATA__),\ + (__ADC_RESOLUTION__)) /** * @brief Helper macro to calculate analog reference voltage (Vref+) @@ -1573,8 +1791,8 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to */ #define __HAL_ADC_CALC_VREFANALOG_VOLTAGE(__VREFINT_ADC_DATA__,\ __ADC_RESOLUTION__) \ - __LL_ADC_CALC_VREFANALOG_VOLTAGE((__VREFINT_ADC_DATA__), \ - (__ADC_RESOLUTION__)) + __LL_ADC_CALC_VREFANALOG_VOLTAGE((__VREFINT_ADC_DATA__),\ + (__ADC_RESOLUTION__)) /** * @brief Helper macro to calculate the temperature (unit: degree Celsius) @@ -1625,9 +1843,9 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to #define __HAL_ADC_CALC_TEMPERATURE(__VREFANALOG_VOLTAGE__,\ __TEMPSENSOR_ADC_DATA__,\ __ADC_RESOLUTION__) \ - __LL_ADC_CALC_TEMPERATURE((__VREFANALOG_VOLTAGE__), \ - (__TEMPSENSOR_ADC_DATA__), \ - (__ADC_RESOLUTION__)) + __LL_ADC_CALC_TEMPERATURE((__VREFANALOG_VOLTAGE__),\ + (__TEMPSENSOR_ADC_DATA__),\ + (__ADC_RESOLUTION__)) /** * @brief Helper macro to calculate the temperature (unit: degree Celsius) @@ -1680,12 +1898,12 @@ typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc); /*!< pointer to __VREFANALOG_VOLTAGE__,\ __TEMPSENSOR_ADC_DATA__,\ __ADC_RESOLUTION__) \ - __LL_ADC_CALC_TEMPERATURE_TYP_PARAMS((__TEMPSENSOR_TYP_AVGSLOPE__), \ - (__TEMPSENSOR_TYP_CALX_V__), \ - (__TEMPSENSOR_CALX_TEMP__), \ - (__VREFANALOG_VOLTAGE__), \ - (__TEMPSENSOR_ADC_DATA__), \ - (__ADC_RESOLUTION__)) + __LL_ADC_CALC_TEMPERATURE_TYP_PARAMS((__TEMPSENSOR_TYP_AVGSLOPE__),\ + (__TEMPSENSOR_TYP_CALX_V__),\ + (__TEMPSENSOR_CALX_TEMP__),\ + (__VREFANALOG_VOLTAGE__),\ + (__TEMPSENSOR_ADC_DATA__),\ + (__ADC_RESOLUTION__)) /** * @} @@ -1713,10 +1931,10 @@ HAL_StatusTypeDef HAL_ADC_DeInit(ADC_HandleTypeDef *hadc); void HAL_ADC_MspInit(ADC_HandleTypeDef *hadc); void HAL_ADC_MspDeInit(ADC_HandleTypeDef *hadc); + #if (USE_HAL_ADC_REGISTER_CALLBACKS == 1) /* Callbacks Register/UnRegister functions ***********************************/ -HAL_StatusTypeDef HAL_ADC_RegisterCallback(ADC_HandleTypeDef *hadc, HAL_ADC_CallbackIDTypeDef CallbackID, - pADC_CallbackTypeDef pCallback); +HAL_StatusTypeDef HAL_ADC_RegisterCallback(ADC_HandleTypeDef *hadc, HAL_ADC_CallbackIDTypeDef CallbackID, pADC_CallbackTypeDef pCallback); HAL_StatusTypeDef HAL_ADC_UnRegisterCallback(ADC_HandleTypeDef *hadc, HAL_ADC_CallbackIDTypeDef CallbackID); #endif /* USE_HAL_ADC_REGISTER_CALLBACKS */ /** @@ -1757,9 +1975,9 @@ void HAL_ADC_ErrorCallback(ADC_HandleTypeDef *hadc); */ /** @addtogroup ADC_Exported_Functions_Group3 Peripheral Control functions - * @brief Peripheral Control functions - * @{ - */ + * @brief Peripheral Control functions + * @{ + */ /* Peripheral Control functions ***********************************************/ HAL_StatusTypeDef HAL_ADC_ConfigChannel(ADC_HandleTypeDef *hadc, ADC_ChannelConfTypeDef *sConfig); HAL_StatusTypeDef HAL_ADC_AnalogWDGConfig(ADC_HandleTypeDef *hadc, ADC_AnalogWDGConfTypeDef *AnalogWDGConfig); @@ -1793,7 +2011,7 @@ HAL_StatusTypeDef ADC_Disable(ADC_HandleTypeDef *hadc); void ADC_DMAConvCplt(DMA_HandleTypeDef *hdma); void ADC_DMAHalfConvCplt(DMA_HandleTypeDef *hdma); void ADC_DMAError(DMA_HandleTypeDef *hdma); -void ADC_ConfigureBoostMode(ADC_HandleTypeDef* hadc); +void ADC_ConfigureBoostMode(ADC_HandleTypeDef *hadc); /** * @} diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_adc_ex.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_adc_ex.h index 4d2a29a..3ddc33b 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_adc_ex.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_adc_ex.h @@ -46,8 +46,12 @@ extern "C" { */ typedef struct { - uint32_t Ratio; /*!< Configures the oversampling ratio. - This parameter can be a value between 1 and 1024 */ + uint32_t Ratio; /*!< Configures the oversampling ratio. */ +#if defined(ADC_VER_V5_V90) + /* On devices STM32H72xx and STM32H73xx this parameter can be a value from 1 to 1023 for ADC1/2 and value of @ref ADC_HAL_EC_OVS_RATIO for ADC3*/ +#else + /* This parameter can be a value of @ref ADC_HAL_EC_OVS_RATIO */ +#endif uint32_t RightBitShift; /*!< Configures the division coefficient for the Oversampler. This parameter can be a value of @ref ADC_HAL_EC_OVS_SHIFT */ @@ -117,13 +121,24 @@ typedef struct uint32_t InjectedOffsetRightShift; /*!< Specifies whether the 1 bit Right-shift feature is used or not. This parameter is applied only for 16-bit or 8-bit resolution. This parameter can be set to ENABLE or DISABLE. */ +#if defined(ADC_VER_V5_V90) + uint32_t InjectedOffsetSign; /*!< Define if the offset should be substracted (negative sign) or added (positive sign) from or to the raw converted data. + This parameter can be a value of @ref ADCEx_OffsetSign. + Note: + - This parameter must be modified when no conversion is on going on both regular and injected groups (ADC disabled, or ADC enabled without continuous mode or external trigger that could launch a conversion). + - On devices STM32H72xx and STM32H73xx, this parameter is specific to ADC3 only. */ + FunctionalState InjectedOffsetSaturation; /*!< Define if the offset should be saturated upon under or over flow. + This parameter value can be ENABLE or DISABLE. + Note: + - This parameter must be modified when no conversion is on going on both regular and injected groups (ADC disabled, or ADC enabled without continuous mode or external trigger that could launch a conversion). + - On devices STM32H72xx and STM32H73xx, this parameter is specific to ADC3 only. */ + +#endif FunctionalState InjectedOffsetSignedSaturation; /*!< Specifies whether the Signed saturation feature is used or not. This parameter is applied only for 16-bit or 8-bit resolution. This parameter can be set to ENABLE or DISABLE. */ - uint32_t InjectedLeftBitShift; /*!< Configures the left shifting applied to the final result with or without oversampling. - This parameter can be a value of @ref ADCEx_Left_Bit_Shift */ - + uint32_t InjectedNbrOfConversion; /*!< Specifies the number of ranks that will be converted within the ADC group injected sequencer. To use the injected group sequencer and convert several ranks, parameter 'ScanConvMode' must be enabled. This parameter must be a number between Min_Data = 1 and Max_Data = 4. @@ -276,6 +291,17 @@ typedef struct * @} */ +#if defined(ADC_VER_V5_V90) +/** @defgroup ADCEx_OffsetSign ADC Extended Offset Sign + * @{ + */ +#define ADC3_OFFSET_SIGN_NEGATIVE (0x00000000UL) /*!< Offset sign negative, offset is substracted */ +#define ADC3_OFFSET_SIGN_POSITIVE (ADC3_OFR1_OFFSETPOS) /*!< Offset sign positive, offset is added */ +/** + * @} + */ +#endif + /** @defgroup ADC_INJ_SEQ_RANKS ADC group injected - Sequencer ranks * @{ */ @@ -372,6 +398,17 @@ typedef struct /** * @} */ +#if defined(ADC_VER_V5_V90) +/** @defgroup ADC_CFGR_fields_2 ADCx CFGR sub fields + * @{ + */ +/* ADC_CFGR fields of parameters that can be updated when no conversion + (neither regular nor injected) is on-going */ +#define ADC3_CFGR_FIELDS_2 ((ADC3_CFGR_DMACFG | ADC_CFGR_AUTDLY)) +/** + * @} + */ +#endif #if defined(DFSDM1_Channel0) /** @defgroup ADC_HAL_EC_REG_DFSDM_TRANSFER ADC group regular - DFSDM transfer of ADC conversion data @@ -449,13 +486,15 @@ typedef struct #define ADC_IS_CONVERSION_ONGOING_INJECTED(__HANDLE__) \ (LL_ADC_INJ_IsConversionOngoing((__HANDLE__)->Instance)) + +#if defined (ADC3) /** * @brief Check whether or not ADC is independent. * @param __HANDLE__ ADC handle. * @note When multimode feature is not available, the macro always returns SET. * @retval SET (ADC is independent) or RESET (ADC is not). */ -#if defined (ADC3) + #define ADC_IS_INDEPENDENT(__HANDLE__) \ ( ( ( ((__HANDLE__)->Instance) == ADC3) \ )? \ @@ -522,6 +561,14 @@ typedef struct */ #define ADC_CFGR_DMACONTREQ(__DMACONTREQ_MODE__) ((__DMACONTREQ_MODE__)) +#if defined(ADC_VER_V5_V90) +/** + * @brief Configure the ADC DMA continuous request. + * @param __DMACONTREQ_MODE__ DMA continuous request mode. + * @retval None + */ +#define ADC3_CFGR_DMACONTREQ(__DMACONTREQ_MODE__) ((__DMACONTREQ_MODE__) << ADC3_CFGR_DMACFG_Pos) +#endif /** * @brief Configure the channel number into offset OFRx register. * @param __CHANNEL__ ADC Channel. @@ -597,6 +644,12 @@ typedef struct ) #endif /* ADC_VER_V5_3 */ +#if defined(ADC_VER_V5_V90) +#define ADC3_OFFSET_SHIFT_RESOLUTION(__HANDLE__, __OFFSET__) \ + ((__OFFSET__) << ((((__HANDLE__)->Instance->CFGR & ADC3_CFGR_RES) >> 3UL) * 2UL)) + +#endif /* ADC_VER_V5_V90 */ + /** * @brief Shift the AWD1 threshold in function of the selected ADC resolution. * @note Thresholds have to be left-aligned on bit 15, the LSB (right bits) are set to 0. @@ -611,6 +664,17 @@ typedef struct * @retval None */ #if defined(ADC_VER_V5_3) +#if defined(ADC_VER_V5_V90) +#define ADC_AWD1THRESHOLD_SHIFT_RESOLUTION(__HANDLE__, __THRESHOLD__) \ + ( ((__HANDLE__)->Instance == ADC3) \ + ?((__THRESHOLD__)<<(((((__HANDLE__)->Instance->CFGR) & ADC3_CFGR_RES)>> 3UL)*2UL)) \ + : \ + ((((__HANDLE__)->Instance->CFGR) & ADC_CFGR_RES_2) == 0UL) \ + ?((__THRESHOLD__)<<(((((__HANDLE__)->Instance->CFGR) & ADC_CFGR_RES)>> 2UL)*2UL)) \ + : \ + ((__THRESHOLD__)<<(((((__HANDLE__)->Instance->CFGR) & (ADC_CFGR_RES & 0xFFFFFFF3UL))>> 2UL )*2UL)) \ + ) +#else #define ADC_AWD1THRESHOLD_SHIFT_RESOLUTION(__HANDLE__, __THRESHOLD__) \ ( \ ((((__HANDLE__)->Instance->CFGR) & ADC_CFGR_RES_2) == 0UL) \ @@ -618,6 +682,8 @@ typedef struct : \ ((__THRESHOLD__)<<(((((__HANDLE__)->Instance->CFGR) & (ADC_CFGR_RES & 0xFFFFFFF3UL))>> 2UL )*2UL)) \ ) +#endif + #else #define ADC_AWD1THRESHOLD_SHIFT_RESOLUTION(__HANDLE__, __THRESHOLD__) \ (((DBGMCU->IDCODE & 0xF0000000UL) == 0x10000000UL) \ @@ -643,8 +709,8 @@ typedef struct * @param __THRESHOLD__: Value to be shifted * @retval None */ -#if defined(ADC_VER_V5_3) -#define ADC_AWD23THRESHOLD_SHIFT_RESOLUTION(__HANDLE__, __THRESHOLD__) \ +#if defined(ADC_VER_V5_3) || defined(ADC_VER_V5_V90) +#define ADC_AWD23THRESHOLD_SHIFT_RESOLUTION(__HANDLE__, __THRESHOLD__) \ ( \ ((((__HANDLE__)->Instance->CFGR) & ADC_CFGR_RES_2) == 0UL) \ ? ((__THRESHOLD__)<<(((((__HANDLE__)->Instance->CFGR) & ADC_CFGR_RES)>> 2UL)*2UL)) \ @@ -707,9 +773,9 @@ typedef struct #define ADC_IS_DUAL_REGULAR_CONVERSION_ENABLE(__HANDLE__) \ ( ( ((((__HANDLE__)->Instance) == ADC1) || (((__HANDLE__)->Instance) == ADC2)) \ )? \ - ( ((ADC12_COMMON->CCR & ADC_CCR_DUAL) != ADC_MODE_INDEPENDENT) && \ - ((ADC12_COMMON->CCR & ADC_CCR_DUAL) != ADC_DUALMODE_INJECSIMULT) && \ - ((ADC12_COMMON->CCR & ADC_CCR_DUAL) != ADC_DUALMODE_ALTERTRIG) ) \ + ( ((ADC12_COMMON->CCR & ADC_CCR_DUAL) != ADC_MODE_INDEPENDENT) && \ + ((ADC12_COMMON->CCR & ADC_CCR_DUAL) != ADC_DUALMODE_INJECSIMULT) && \ + ((ADC12_COMMON->CCR & ADC_CCR_DUAL) != ADC_DUALMODE_ALTERTRIG) ) \ : \ RESET \ ) @@ -719,12 +785,12 @@ typedef struct * @param __HANDLE__: ADC handle * @retval SET (non-MultiMode or Master handle) or RESET (handle of Slave ADC in MultiMode) */ -#define ADC12_NONMULTIMODE_OR_MULTIMODEMASTER(__HANDLE__) \ +#define ADC12_NONMULTIMODE_OR_MULTIMODEMASTER(__HANDLE__) \ ( ( ((__HANDLE__)->Instance == ADC1) || ((__HANDLE__)->Instance == ADC2) \ )? \ SET \ : \ - ((ADC12_COMMON->CCR & ADC_CCR_DUAL) == RESET) \ + ((ADC12_COMMON->CCR & ADC_CCR_DUAL) == RESET) \ ) #if defined (ADC3) /** @@ -734,10 +800,10 @@ typedef struct */ #define ADC3_NONMULTIMODE_OR_MULTIMODEMASTER(__HANDLE__) \ ( ( ((__HANDLE__)->Instance == ADC3) \ - )? \ - SET \ - : \ - ((ADC3_COMMON->CCR & ADC_CCR_DUAL) == RESET) \ + )? \ + SET \ + : \ + ((ADC3_COMMON->CCR & ADC_CCR_DUAL) == RESET) \ ) #endif /** @@ -751,8 +817,8 @@ typedef struct )? \ SET \ : \ - ( ((ADC12_COMMON->CCR & ADC_CCR_DUAL) == ADC_MODE_INDEPENDENT) || \ - ((ADC12_COMMON->CCR & ADC_CCR_DUAL) == ADC_DUALMODE_INJECSIMULT) || \ + ( ((ADC12_COMMON->CCR & ADC_CCR_DUAL) == ADC_MODE_INDEPENDENT) || \ + ((ADC12_COMMON->CCR & ADC_CCR_DUAL) == ADC_DUALMODE_INJECSIMULT) || \ ((ADC12_COMMON->CCR & ADC_CCR_DUAL) == ADC_DUALMODE_ALTERTRIG) )) #else #define ADC_INDEPENDENT_OR_NONMULTIMODEREGULAR_SLAVE(__HANDLE__) \ @@ -760,8 +826,8 @@ typedef struct )? \ SET \ : \ - ( ((ADC12_COMMON->CCR & ADC_CCR_DUAL) == ADC_MODE_INDEPENDENT) || \ - ((ADC12_COMMON->CCR & ADC_CCR_DUAL) == ADC_DUALMODE_INJECSIMULT) || \ + ( ((ADC12_COMMON->CCR & ADC_CCR_DUAL) == ADC_MODE_INDEPENDENT) || \ + ((ADC12_COMMON->CCR & ADC_CCR_DUAL) == ADC_DUALMODE_INJECSIMULT) || \ ((ADC12_COMMON->CCR & ADC_CCR_DUAL) == ADC_DUALMODE_ALTERTRIG) )) #endif @@ -771,22 +837,22 @@ typedef struct * @retval SET (non-MultiMode or Master, or Slave without dual injected conversions enabled) or RESET (Slave ADC with dual injected conversions enabled) */ #if defined (ADC3) -#define ADC_INDEPENDENT_OR_NONMULTIMODEINJECTED_SLAVE(__HANDLE__) \ +#define ADC_INDEPENDENT_OR_NONMULTIMODEINJECTED_SLAVE(__HANDLE__) \ ( ( ((__HANDLE__)->Instance == ADC1) || ((__HANDLE__)->Instance == ADC3) \ )? \ SET \ : \ - ( ((ADC12_COMMON->CCR & ADC_CCR_DUAL) == ADC_MODE_INDEPENDENT) || \ - ((ADC12_COMMON->CCR & ADC_CCR_DUAL) == ADC_DUALMODE_REGSIMULT) || \ + ( ((ADC12_COMMON->CCR & ADC_CCR_DUAL) == ADC_MODE_INDEPENDENT) || \ + ((ADC12_COMMON->CCR & ADC_CCR_DUAL) == ADC_DUALMODE_REGSIMULT) || \ ((ADC12_COMMON->CCR & ADC_CCR_DUAL) == ADC_DUALMODE_INTERL) )) #else -#define ADC_INDEPENDENT_OR_NONMULTIMODEINJECTED_SLAVE(__HANDLE__) \ - ( ( ((__HANDLE__)->Instance == ADC1) \ +#define ADC_INDEPENDENT_OR_NONMULTIMODEINJECTED_SLAVE(__HANDLE__) \ + ( ( ((__HANDLE__)->Instance == ADC1) \ )? \ SET \ : \ - ( ((ADC12_COMMON->CCR & ADC_CCR_DUAL) == ADC_MODE_INDEPENDENT) || \ - ((ADC12_COMMON->CCR & ADC_CCR_DUAL) == ADC_DUALMODE_REGSIMULT) || \ + ( ((ADC12_COMMON->CCR & ADC_CCR_DUAL) == ADC_MODE_INDEPENDENT) || \ + ((ADC12_COMMON->CCR & ADC_CCR_DUAL) == ADC_DUALMODE_REGSIMULT) || \ ((ADC12_COMMON->CCR & ADC_CCR_DUAL) == ADC_DUALMODE_INTERL) )) #endif @@ -954,7 +1020,15 @@ typedef struct ((__OFFSET_NUMBER__) == ADC_OFFSET_2) || \ ((__OFFSET_NUMBER__) == ADC_OFFSET_3) || \ ((__OFFSET_NUMBER__) == ADC_OFFSET_4) ) - +#if defined(ADC_VER_V5_V90) +/** + * @brief Verify the ADC offset sign setting. + * @param __OFFSET_SIGN__ ADC offset sign. + * @retval SET (__OFFSET_SIGN__ is valid) or RESET (__OFFSET_SIGN__ is invalid) + */ +#define IS_ADC3_OFFSET_SIGN(__OFFSET_SIGN__) (((__OFFSET_SIGN__) == ADC3_OFFSET_SIGN_NEGATIVE) || \ + ((__OFFSET_SIGN__) == ADC3_OFFSET_SIGN_POSITIVE) ) +#endif /* ADC_VER_V5_V90 */ /** * @brief Verify the ADC injected channel setting. * @param __CHANNEL__ programmed ADC injected channel. @@ -994,24 +1068,24 @@ typedef struct * @param __EDGE__ programmed ADC edge trigger setting. * @retval SET (__EDGE__ is a valid value) or RESET (__EDGE__ is invalid) */ -#define IS_ADC_EXTTRIGINJEC_EDGE(__EDGE__) (((__EDGE__) == ADC_EXTERNALTRIGINJECCONV_EDGE_NONE) || \ - ((__EDGE__) == ADC_EXTERNALTRIGINJECCONV_EDGE_RISING) || \ - ((__EDGE__) == ADC_EXTERNALTRIGINJECCONV_EDGE_FALLING) || \ - ((__EDGE__) == ADC_EXTERNALTRIGINJECCONV_EDGE_RISINGFALLING) ) +#define IS_ADC_EXTTRIGINJEC_EDGE(__EDGE__) (((__EDGE__) == ADC_EXTERNALTRIGINJECCONV_EDGE_NONE) || \ + ((__EDGE__) == ADC_EXTERNALTRIGINJECCONV_EDGE_RISING) || \ + ((__EDGE__) == ADC_EXTERNALTRIGINJECCONV_EDGE_FALLING) || \ + ((__EDGE__) == ADC_EXTERNALTRIGINJECCONV_EDGE_RISINGFALLING) ) /** * @brief Verify the ADC multimode setting. * @param __MODE__ programmed ADC multimode setting. * @retval SET (__MODE__ is valid) or RESET (__MODE__ is invalid) */ -#define IS_ADC_MULTIMODE(__MODE__) (((__MODE__) == ADC_MODE_INDEPENDENT) || \ - ((__MODE__) == ADC_DUALMODE_REGSIMULT_INJECSIMULT) || \ - ((__MODE__) == ADC_DUALMODE_REGSIMULT_ALTERTRIG) || \ - ((__MODE__) == ADC_DUALMODE_REGINTERL_INJECSIMULT) || \ - ((__MODE__) == ADC_DUALMODE_INJECSIMULT) || \ - ((__MODE__) == ADC_DUALMODE_REGSIMULT) || \ - ((__MODE__) == ADC_DUALMODE_INTERL) || \ - ((__MODE__) == ADC_DUALMODE_ALTERTRIG) ) +#define IS_ADC_MULTIMODE(__MODE__) (((__MODE__) == ADC_MODE_INDEPENDENT) || \ + ((__MODE__) == ADC_DUALMODE_REGSIMULT_INJECSIMULT) || \ + ((__MODE__) == ADC_DUALMODE_REGSIMULT_ALTERTRIG) || \ + ((__MODE__) == ADC_DUALMODE_REGINTERL_INJECSIMULT) || \ + ((__MODE__) == ADC_DUALMODE_INJECSIMULT) || \ + ((__MODE__) == ADC_DUALMODE_REGSIMULT) || \ + ((__MODE__) == ADC_DUALMODE_INTERL) || \ + ((__MODE__) == ADC_DUALMODE_ALTERTRIG) ) /** * @brief Verify the ADC dual data mode setting. @@ -1059,26 +1133,43 @@ typedef struct ((__WATCHDOG_MODE__) == ADC_ANALOGWATCHDOG_ALL_INJEC) || \ ((__WATCHDOG_MODE__) == ADC_ANALOGWATCHDOG_ALL_REGINJEC) ) +#if defined(ADC_VER_V5_V90) +/** + * @brief Verify the ADC analog watchdog filtering setting. + * @param __FILTERING_MODE__ programmed ADC analog watchdog mode setting. + * @retval SET (__FILTERING_MODE__ is valid) or RESET (__FILTERING_MODE__ is invalid) + */ +#define IS_ADC_ANALOG_WATCHDOG_FILTERING_MODE_ADC3(__FILTERING_MODE__) (((__FILTERING_MODE__) == ADC3_AWD_FILTERING_NONE) || \ + ((__FILTERING_MODE__) == ADC3_AWD_FILTERING_2SAMPLES) || \ + ((__FILTERING_MODE__) == ADC3_AWD_FILTERING_3SAMPLES) || \ + ((__FILTERING_MODE__) == ADC3_AWD_FILTERING_4SAMPLES) || \ + ((__FILTERING_MODE__) == ADC3_AWD_FILTERING_5SAMPLES) || \ + ((__FILTERING_MODE__) == ADC3_AWD_FILTERING_6SAMPLES) || \ + ((__FILTERING_MODE__) == ADC3_AWD_FILTERING_7SAMPLES) || \ + ((__FILTERING_MODE__) == ADC3_AWD_FILTERING_8SAMPLES) ) + +#endif /* ADC_VER_V5_V90 */ + /** * @brief Verify the ADC conversion (regular or injected or both). * @param __CONVERSION__ ADC conversion group. * @retval SET (__CONVERSION__ is valid) or RESET (__CONVERSION__ is invalid) */ -#define IS_ADC_CONVERSION_GROUP(__CONVERSION__) (((__CONVERSION__) == ADC_REGULAR_GROUP) || \ - ((__CONVERSION__) == ADC_INJECTED_GROUP) || \ - ((__CONVERSION__) == ADC_REGULAR_INJECTED_GROUP) ) +#define IS_ADC_CONVERSION_GROUP(__CONVERSION__) (((__CONVERSION__) == ADC_REGULAR_GROUP) || \ + ((__CONVERSION__) == ADC_INJECTED_GROUP) || \ + ((__CONVERSION__) == ADC_REGULAR_INJECTED_GROUP) ) /** * @brief Verify the ADC event type. * @param __EVENT__ ADC event. * @retval SET (__EVENT__ is valid) or RESET (__EVENT__ is invalid) */ -#define IS_ADC_EVENT_TYPE(__EVENT__) (((__EVENT__) == ADC_EOSMP_EVENT) || \ - ((__EVENT__) == ADC_AWD_EVENT) || \ - ((__EVENT__) == ADC_AWD2_EVENT) || \ - ((__EVENT__) == ADC_AWD3_EVENT) || \ - ((__EVENT__) == ADC_OVR_EVENT) || \ - ((__EVENT__) == ADC_JQOVF_EVENT) ) +#define IS_ADC_EVENT_TYPE(__EVENT__) (((__EVENT__) == ADC_EOSMP_EVENT) || \ + ((__EVENT__) == ADC_AWD_EVENT) || \ + ((__EVENT__) == ADC_AWD2_EVENT) || \ + ((__EVENT__) == ADC_AWD3_EVENT) || \ + ((__EVENT__) == ADC_OVR_EVENT) || \ + ((__EVENT__) == ADC_JQOVF_EVENT) ) /** * @brief Verify the ADC oversampling ratio. @@ -1087,6 +1178,22 @@ typedef struct */ #define IS_ADC_OVERSAMPLING_RATIO(RATIO) (((RATIO) >= 1UL) && ((RATIO) <= 1024UL)) +#if defined(ADC_VER_V5_V90) +/** + * @brief Verify the ADC3 oversampling ratio. + * @param __RATIO__ programmed ADC oversampling ratio. + * @retval SET (__RATIO__ is a valid value) or RESET (__RATIO__ is invalid) + */ +#define IS_ADC_OVERSAMPLING_RATIO_ADC3(__RATIO__) (((__RATIO__) == ADC3_OVERSAMPLING_RATIO_2 ) || \ + ((__RATIO__) == ADC3_OVERSAMPLING_RATIO_4 ) || \ + ((__RATIO__) == ADC3_OVERSAMPLING_RATIO_8 ) || \ + ((__RATIO__) == ADC3_OVERSAMPLING_RATIO_16 ) || \ + ((__RATIO__) == ADC3_OVERSAMPLING_RATIO_32 ) || \ + ((__RATIO__) == ADC3_OVERSAMPLING_RATIO_64 ) || \ + ((__RATIO__) == ADC3_OVERSAMPLING_RATIO_128 ) || \ + ((__RATIO__) == ADC3_OVERSAMPLING_RATIO_256 )) +#endif /* ADC_VER_V5_V90 */ + /** * @brief Verify the ADC oversampling shift. * @param __SHIFT__ programmed ADC oversampling shift. @@ -1165,9 +1272,9 @@ typedef struct /* ADC calibration */ HAL_StatusTypeDef HAL_ADCEx_Calibration_Start(ADC_HandleTypeDef *hadc, uint32_t CalibrationMode, uint32_t SingleDiff); uint32_t HAL_ADCEx_Calibration_GetValue(ADC_HandleTypeDef *hadc, uint32_t SingleDiff); -HAL_StatusTypeDef HAL_ADCEx_LinearCalibration_GetValue(ADC_HandleTypeDef *hadc, uint32_t* LinearCalib_Buffer); +HAL_StatusTypeDef HAL_ADCEx_LinearCalibration_GetValue(ADC_HandleTypeDef *hadc, uint32_t *LinearCalib_Buffer); HAL_StatusTypeDef HAL_ADCEx_Calibration_SetValue(ADC_HandleTypeDef *hadc, uint32_t SingleDiff, uint32_t CalibrationFactor); -HAL_StatusTypeDef HAL_ADCEx_LinearCalibration_SetValue(ADC_HandleTypeDef *hadc, uint32_t* LinearCalib_Buffer); +HAL_StatusTypeDef HAL_ADCEx_LinearCalibration_SetValue(ADC_HandleTypeDef *hadc, uint32_t *LinearCalib_Buffer); HAL_StatusTypeDef HAL_ADCEx_LinearCalibration_FactorLoad(ADC_HandleTypeDef *hadc); @@ -1209,7 +1316,7 @@ HAL_StatusTypeDef HAL_ADCEx_RegularMultiModeStop_DMA(ADC_HandleTypeDef *hadc); * @{ */ /* Peripheral Control functions ***********************************************/ -HAL_StatusTypeDef HAL_ADCEx_InjectedConfigChannel(ADC_HandleTypeDef *hadc,ADC_InjectionConfTypeDef* sConfigInjected); +HAL_StatusTypeDef HAL_ADCEx_InjectedConfigChannel(ADC_HandleTypeDef *hadc, ADC_InjectionConfTypeDef *sConfigInjected); HAL_StatusTypeDef HAL_ADCEx_MultiModeConfigChannel(ADC_HandleTypeDef *hadc, ADC_MultiModeTypeDef *multimode); HAL_StatusTypeDef HAL_ADCEx_EnableInjectedQueue(ADC_HandleTypeDef *hadc); HAL_StatusTypeDef HAL_ADCEx_DisableInjectedQueue(ADC_HandleTypeDef *hadc); diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_conf_template.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_conf_template.h index bf33ee7..dea6264 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_conf_template.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_conf_template.h @@ -38,6 +38,7 @@ #define HAL_ADC_MODULE_ENABLED #define HAL_CEC_MODULE_ENABLED #define HAL_COMP_MODULE_ENABLED +#define HAL_CORDIC_MODULE_ENABLED #define HAL_CORTEX_MODULE_ENABLED #define HAL_CRC_MODULE_ENABLED #define HAL_CRYP_MODULE_ENABLED @@ -53,6 +54,7 @@ #define HAL_FDCAN_MODULE_ENABLED #define HAL_FLASH_MODULE_ENABLED #define HAL_GFXMMU_MODULE_ENABLED +#define HAL_FMAC_MODULE_ENABLED #define HAL_GPIO_MODULE_ENABLED #define HAL_HASH_MODULE_ENABLED #define HAL_HCD_MODULE_ENABLED @@ -102,11 +104,11 @@ * (when HSE is used as system clock source, directly or through the PLL). */ #if !defined (HSE_VALUE) -#define HSE_VALUE ((uint32_t)25000000) /*!< Value of the External oscillator in Hz */ +#define HSE_VALUE (25000000UL) /*!< Value of the External oscillator in Hz */ #endif /* HSE_VALUE */ #if !defined (HSE_STARTUP_TIMEOUT) - #define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */ + #define HSE_STARTUP_TIMEOUT (5000UL) /*!< Time out for HSE start up, in ms */ #endif /* HSE_STARTUP_TIMEOUT */ /** @@ -114,7 +116,7 @@ * This value is the default CSI value after Reset. */ #if !defined (CSI_VALUE) - #define CSI_VALUE ((uint32_t)4000000) /*!< Value of the Internal oscillator in Hz*/ + #define CSI_VALUE (4000000UL) /*!< Value of the Internal oscillator in Hz*/ #endif /* CSI_VALUE */ /** @@ -123,7 +125,7 @@ * (when HSI is used as system clock source, directly or through the PLL). */ #if !defined (HSI_VALUE) - #define HSI_VALUE ((uint32_t)64000000) /*!< Value of the Internal oscillator in Hz*/ + #define HSI_VALUE (64000000UL) /*!< Value of the Internal oscillator in Hz*/ #endif /* HSI_VALUE */ /** @@ -131,16 +133,16 @@ * This value is used by the UART, RTC HAL module to compute the system frequency */ #if !defined (LSE_VALUE) - #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External oscillator in Hz*/ + #define LSE_VALUE (32768UL) /*!< Value of the External oscillator in Hz*/ #endif /* LSE_VALUE */ #if !defined (LSE_STARTUP_TIMEOUT) - #define LSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for LSE start up, in ms */ + #define LSE_STARTUP_TIMEOUT (5000UL) /*!< Time out for LSE start up, in ms */ #endif /* LSE_STARTUP_TIMEOUT */ #if !defined (LSI_VALUE) - #define LSI_VALUE ((uint32_t)32000) /*!< LSI Typical Value in Hz*/ + #define LSI_VALUE (32000UL) /*!< LSI Typical Value in Hz*/ #endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz The real value may vary depending on the variations in voltage and temperature.*/ @@ -151,7 +153,7 @@ * frequency, this source is inserted directly through I2S_CKIN pad. */ #if !defined (EXTERNAL_CLOCK_VALUE) - #define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the External clock in Hz*/ + #define EXTERNAL_CLOCK_VALUE 12288000UL /*!< Value of the External clock in Hz*/ #endif /* EXTERNAL_CLOCK_VALUE */ /* Tip: To avoid modifying this file each time you need to use different HSE, @@ -161,8 +163,8 @@ /** * @brief This is the HAL system configuration section */ -#define VDD_VALUE ((uint32_t)3300) /*!< Value of VDD in mv */ -#define TICK_INT_PRIORITY ((uint32_t)0x0F) /*!< tick interrupt priority */ +#define VDD_VALUE (3300UL) /*!< Value of VDD in mv */ +#define TICK_INT_PRIORITY (0x0FUL) /*!< tick interrupt priority */ #define USE_RTOS 0 #define USE_SD_TRANSCEIVER 1U /*!< use uSD Transceiver */ #define USE_SPI_CRC 1U /*!< use CRC in SPI */ @@ -170,6 +172,7 @@ #define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ #define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */ #define USE_HAL_COMP_REGISTER_CALLBACKS 0U /* COMP register callback disabled */ +#define USE_HAL_CORDIC_REGISTER_CALLBACKS 0U /* CORDIC register callback disabled */ #define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */ #define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ #define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */ @@ -179,6 +182,7 @@ #define USE_HAL_DTS_REGISTER_CALLBACKS 0U /* DTS register callback disabled */ #define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */ #define USE_HAL_FDCAN_REGISTER_CALLBACKS 0U /* FDCAN register callback disabled */ +#define USE_HAL_FMAC_REGISTER_CALLBACKS 0U /* FMAC register callback disabled */ #define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */ #define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */ #define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */ @@ -218,12 +222,12 @@ #define ETH_TX_DESC_CNT 4 /* number of Ethernet Tx DMA descriptors */ #define ETH_RX_DESC_CNT 4 /* number of Ethernet Rx DMA descriptors */ -#define ETH_MAC_ADDR0 ((uint8_t)0x02) -#define ETH_MAC_ADDR1 ((uint8_t)0x00) -#define ETH_MAC_ADDR2 ((uint8_t)0x00) -#define ETH_MAC_ADDR3 ((uint8_t)0x00) -#define ETH_MAC_ADDR4 ((uint8_t)0x00) -#define ETH_MAC_ADDR5 ((uint8_t)0x00) +#define ETH_MAC_ADDR0 (0x02UL) +#define ETH_MAC_ADDR1 (0x00UL) +#define ETH_MAC_ADDR2 (0x00UL) +#define ETH_MAC_ADDR3 (0x00UL) +#define ETH_MAC_ADDR4 (0x00UL) +#define ETH_MAC_ADDR5 (0x00UL) /* ########################## Assert Selection ############################## */ /** @@ -306,6 +310,10 @@ #include "stm32h7xx_hal_comp.h" #endif /* HAL_COMP_MODULE_ENABLED */ +#ifdef HAL_CORDIC_MODULE_ENABLED + #include "stm32h7xx_hal_cordic.h" +#endif /* HAL_CORDIC_MODULE_ENABLED */ + #ifdef HAL_CRC_MODULE_ENABLED #include "stm32h7xx_hal_crc.h" #endif /* HAL_CRC_MODULE_ENABLED */ @@ -326,6 +334,10 @@ #include "stm32h7xx_hal_gfxmmu.h" #endif /* HAL_GFXMMU_MODULE_ENABLED */ +#ifdef HAL_FMAC_MODULE_ENABLED + #include "stm32h7xx_hal_fmac.h" +#endif /* HAL_FMAC_MODULE_ENABLED */ + #ifdef HAL_HRTIM_MODULE_ENABLED #include "stm32h7xx_hal_hrtim.h" #endif /* HAL_HRTIM_MODULE_ENABLED */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_cordic.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_cordic.h new file mode 100644 index 0000000..1fb9208 --- /dev/null +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_cordic.h @@ -0,0 +1,599 @@ +/** + ****************************************************************************** + * @file stm32h7xx_hal_cordic.h + * @author MCD Application Team + * @brief This file contains all the functions prototypes for the CORDIC firmware + * library. + ****************************************************************************** + * @attention + * + *

                  © Copyright (c) 2017 STMicroelectronics. + * All rights reserved.

                  + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32H7xx_HAL_CORDIC_H +#define STM32H7xx_HAL_CORDIC_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32h7xx_hal_def.h" + +#if defined(CORDIC) +/** @addtogroup STM32H7xx_HAL_Driver + * @{ + */ + +/** @addtogroup CORDIC + * @{ + */ + +/* Exported types ------------------------------------------------------------*/ +/** @defgroup CORDIC_Exported_Types CORDIC Exported Types + * @{ + */ + +/** + * @brief CORDIC HAL State Structure definition + */ +typedef enum +{ + HAL_CORDIC_STATE_RESET = 0x00U, /*!< CORDIC not yet initialized or disabled */ + HAL_CORDIC_STATE_READY = 0x01U, /*!< CORDIC initialized and ready for use */ + HAL_CORDIC_STATE_BUSY = 0x02U, /*!< CORDIC internal process is ongoing */ + HAL_CORDIC_STATE_ERROR = 0x03U /*!< CORDIC error state */ +} HAL_CORDIC_StateTypeDef; + +/** + * @brief CORDIC Handle Structure definition + */ +#if USE_HAL_CORDIC_REGISTER_CALLBACKS == 1 +typedef struct __CORDIC_HandleTypeDef +#else +typedef struct +#endif /* USE_HAL_CORDIC_REGISTER_CALLBACKS */ +{ + CORDIC_TypeDef *Instance; /*!< Register base address */ + + int32_t *pInBuff; /*!< Pointer to CORDIC input data buffer */ + + int32_t *pOutBuff; /*!< Pointer to CORDIC output data buffer */ + + uint32_t NbCalcToOrder; /*!< Remaining number of calculation to order */ + + uint32_t NbCalcToGet; /*!< Remaining number of calculation result to get */ + + uint32_t DMADirection; /*!< Direction of CORDIC DMA transfers */ + + DMA_HandleTypeDef *hdmaIn; /*!< CORDIC peripheral input data DMA handle parameters */ + + DMA_HandleTypeDef *hdmaOut; /*!< CORDIC peripheral output data DMA handle parameters */ + + HAL_LockTypeDef Lock; /*!< CORDIC locking object */ + + __IO HAL_CORDIC_StateTypeDef State; /*!< CORDIC state */ + + __IO uint32_t ErrorCode; /*!< CORDIC peripheral error code + This parameter can be a value of @ref CORDIC_Error_Code */ + +#if USE_HAL_CORDIC_REGISTER_CALLBACKS == 1 + void (* ErrorCallback)(struct __CORDIC_HandleTypeDef *hcordic); /*!< CORDIC error callback */ + void (* CalculateCpltCallback)(struct __CORDIC_HandleTypeDef *hcordic); /*!< CORDIC calculate complete callback */ + + void (* MspInitCallback)(struct __CORDIC_HandleTypeDef *hcordic); /*!< CORDIC Msp Init callback */ + void (* MspDeInitCallback)(struct __CORDIC_HandleTypeDef *hcordic); /*!< CORDIC Msp DeInit callback */ + +#endif /* (USE_HAL_CORDIC_REGISTER_CALLBACKS) */ + +} CORDIC_HandleTypeDef; + +/** + * @brief CORDIC Config Structure definition + */ +typedef struct +{ + uint32_t Function; /*!< Function + This parameter can be a value of @ref CORDIC_Function */ + + uint32_t Scale; /*!< Scaling factor + This parameter can be a value of @ref CORDIC_Scale */ + + uint32_t InSize; /*!< Width of input data + This parameter can be a value of @ref CORDIC_In_Size */ + + uint32_t OutSize; /*!< Width of output data + This parameter can be a value of @ref CORDIC_Out_Size */ + + uint32_t NbWrite; /*!< Number of 32-bit write expected for one calculation + This parameter can be a value of @ref CORDIC_Nb_Write */ + + uint32_t NbRead; /*!< Number of 32-bit read expected after one calculation + This parameter can be a value of @ref CORDIC_Nb_Read */ + + uint32_t Precision; /*!< Number of cycles for calculation + This parameter can be a value of @ref CORDIC_Precision_In_Cycles_Number */ + +} CORDIC_ConfigTypeDef; + +#if USE_HAL_CORDIC_REGISTER_CALLBACKS == 1 +/** + * @brief HAL CORDIC Callback ID enumeration definition + */ +typedef enum +{ + HAL_CORDIC_ERROR_CB_ID = 0x00U, /*!< CORDIC error callback ID */ + HAL_CORDIC_CALCULATE_CPLT_CB_ID = 0x01U, /*!< CORDIC calculate complete callback ID */ + + HAL_CORDIC_MSPINIT_CB_ID = 0x02U, /*!< CORDIC MspInit callback ID */ + HAL_CORDIC_MSPDEINIT_CB_ID = 0x03U, /*!< CORDIC MspDeInit callback ID */ + +} HAL_CORDIC_CallbackIDTypeDef; + +/** + * @brief HAL CORDIC Callback pointer definition + */ +typedef void (*pCORDIC_CallbackTypeDef)(CORDIC_HandleTypeDef *hcordic); /*!< pointer to a CORDIC callback function */ + +#endif /* USE_HAL_CORDIC_REGISTER_CALLBACKS */ + +/** + * @} + */ + + +/* Exported constants --------------------------------------------------------*/ +/** @defgroup CORDIC_Exported_Constants CORDIC Exported Constants + * @{ + */ + +/** @defgroup CORDIC_Error_Code CORDIC Error code + * @{ + */ +#define HAL_CORDIC_ERROR_NONE ((uint32_t)0x00000000U) /*!< No error */ +#define HAL_CORDIC_ERROR_PARAM ((uint32_t)0x00000001U) /*!< Wrong parameter error */ +#define HAL_CORDIC_ERROR_NOT_READY ((uint32_t)0x00000002U) /*!< Peripheral not ready */ +#define HAL_CORDIC_ERROR_TIMEOUT ((uint32_t)0x00000004U) /*!< Timeout error */ +#define HAL_CORDIC_ERROR_DMA ((uint32_t)0x00000008U) /*!< DMA error */ +#if USE_HAL_CORDIC_REGISTER_CALLBACKS == 1 +#define HAL_CORDIC_ERROR_INVALID_CALLBACK ((uint32_t)0x00000010U) /*!< Invalid Callback error */ +#endif /* USE_HAL_CORDIC_REGISTER_CALLBACKS */ +/** + * @} + */ + +/** @defgroup CORDIC_Function CORDIC Function + * @{ + */ +#define CORDIC_FUNCTION_COSINE (0x00000000U) /*!< Cosine */ +#define CORDIC_FUNCTION_SINE ((uint32_t)(CORDIC_CSR_FUNC_0)) /*!< Sine */ +#define CORDIC_FUNCTION_PHASE ((uint32_t)(CORDIC_CSR_FUNC_1)) /*!< Phase */ +#define CORDIC_FUNCTION_MODULUS ((uint32_t)(CORDIC_CSR_FUNC_1 | CORDIC_CSR_FUNC_0)) /*!< Modulus */ +#define CORDIC_FUNCTION_ARCTANGENT ((uint32_t)(CORDIC_CSR_FUNC_2)) /*!< Arctangent */ +#define CORDIC_FUNCTION_HCOSINE ((uint32_t)(CORDIC_CSR_FUNC_2 | CORDIC_CSR_FUNC_0)) /*!< Hyperbolic Cosine */ +#define CORDIC_FUNCTION_HSINE ((uint32_t)(CORDIC_CSR_FUNC_2 | CORDIC_CSR_FUNC_1)) /*!< Hyperbolic Sine */ +#define CORDIC_FUNCTION_HARCTANGENT ((uint32_t)(CORDIC_CSR_FUNC_2 | CORDIC_CSR_FUNC_1 | CORDIC_CSR_FUNC_0))/*!< Hyperbolic Arctangent */ +#define CORDIC_FUNCTION_NATURALLOG ((uint32_t)(CORDIC_CSR_FUNC_3)) /*!< Natural Logarithm */ +#define CORDIC_FUNCTION_SQUAREROOT ((uint32_t)(CORDIC_CSR_FUNC_3 | CORDIC_CSR_FUNC_0)) /*!< Square Root */ +/** + * @} + */ + +/** @defgroup CORDIC_Precision_In_Cycles_Number CORDIC Precision in Cycles Number + * @{ + */ +/* Note: 1 cycle corresponds to 4 algorithm iterations */ +#define CORDIC_PRECISION_1CYCLE ((uint32_t)(CORDIC_CSR_PRECISION_0)) +#define CORDIC_PRECISION_2CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_1)) +#define CORDIC_PRECISION_3CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_1 | CORDIC_CSR_PRECISION_0)) +#define CORDIC_PRECISION_4CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_2)) +#define CORDIC_PRECISION_5CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_2 | CORDIC_CSR_PRECISION_0)) +#define CORDIC_PRECISION_6CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_2 | CORDIC_CSR_PRECISION_1)) +#define CORDIC_PRECISION_7CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_2 | CORDIC_CSR_PRECISION_1 | CORDIC_CSR_PRECISION_0)) +#define CORDIC_PRECISION_8CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_3)) +#define CORDIC_PRECISION_9CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_3 | CORDIC_CSR_PRECISION_0)) +#define CORDIC_PRECISION_10CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_3 | CORDIC_CSR_PRECISION_1)) +#define CORDIC_PRECISION_11CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_3 | CORDIC_CSR_PRECISION_1 | CORDIC_CSR_PRECISION_0)) +#define CORDIC_PRECISION_12CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_3 | CORDIC_CSR_PRECISION_2)) +#define CORDIC_PRECISION_13CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_3 | CORDIC_CSR_PRECISION_2 | CORDIC_CSR_PRECISION_0)) +#define CORDIC_PRECISION_14CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_3 | CORDIC_CSR_PRECISION_2 | CORDIC_CSR_PRECISION_1)) +#define CORDIC_PRECISION_15CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_3 | CORDIC_CSR_PRECISION_2 | CORDIC_CSR_PRECISION_1 | CORDIC_CSR_PRECISION_0)) +/** + * @} + */ + +/** @defgroup CORDIC_Scale CORDIC Scaling factor + * @{ + */ +/* Scale factor value 'n' implies that the input data have been multiplied + by a factor 2exp(-n), and/or the output data need to be multiplied by 2exp(n). */ +#define CORDIC_SCALE_0 (0x00000000U) +#define CORDIC_SCALE_1 ((uint32_t)(CORDIC_CSR_SCALE_0)) +#define CORDIC_SCALE_2 ((uint32_t)(CORDIC_CSR_SCALE_1)) +#define CORDIC_SCALE_3 ((uint32_t)(CORDIC_CSR_SCALE_1 | CORDIC_CSR_SCALE_0)) +#define CORDIC_SCALE_4 ((uint32_t)(CORDIC_CSR_SCALE_2)) +#define CORDIC_SCALE_5 ((uint32_t)(CORDIC_CSR_SCALE_2 | CORDIC_CSR_SCALE_0)) +#define CORDIC_SCALE_6 ((uint32_t)(CORDIC_CSR_SCALE_2 | CORDIC_CSR_SCALE_1)) +#define CORDIC_SCALE_7 ((uint32_t)(CORDIC_CSR_SCALE_2 | CORDIC_CSR_SCALE_1 | CORDIC_CSR_SCALE_0)) +/** + * @} + */ + +/** @defgroup CORDIC_Interrupts_Enable CORDIC Interrupts Enable bit + * @{ + */ +#define CORDIC_IT_IEN CORDIC_CSR_IEN /*!< Result ready interrupt enable */ +/** + * @} + */ + +/** @defgroup CORDIC_DMAR DMA Read Request Enable bit + * @{ + */ +#define CORDIC_DMA_REN CORDIC_CSR_DMAREN /*!< DMA Read requests enable */ +/** + * @} + */ + +/** @defgroup CORDIC_DMAW DMA Write Request Enable bit + * @{ + */ +#define CORDIC_DMA_WEN CORDIC_CSR_DMAWEN /*!< DMA Write channel enable */ +/** + * @} + */ + +/** @defgroup CORDIC_Nb_Write CORDIC Number of 32-bit write required for one calculation + * @{ + */ +#define CORDIC_NBWRITE_1 (0x00000000U) /*!< One 32-bits write containing either only one + 32-bit data input (Q1.31 format), or two 16-bit + data input (Q1.15 format) packed in one 32 bits Data */ +#define CORDIC_NBWRITE_2 CORDIC_CSR_NARGS /*!< Two 32-bit write containing two 32-bits data input + (Q1.31 format) */ +/** + * @} + */ + +/** @defgroup CORDIC_Nb_Read CORDIC Number of 32-bit read required after one calculation + * @{ + */ +#define CORDIC_NBREAD_1 (0x00000000U) /*!< One 32-bits read containing either only one + 32-bit data ouput (Q1.31 format), or two 16-bit + data output (Q1.15 format) packed in one 32 bits Data */ +#define CORDIC_NBREAD_2 CORDIC_CSR_NRES /*!< Two 32-bit Data containing two 32-bits data output + (Q1.31 format) */ +/** + * @} + */ + +/** @defgroup CORDIC_In_Size CORDIC input data size + * @{ + */ +#define CORDIC_INSIZE_32BITS (0x00000000U) /*!< 32 bits input data size (Q1.31 format) */ +#define CORDIC_INSIZE_16BITS CORDIC_CSR_ARGSIZE /*!< 16 bits input data size (Q1.15 format) */ +/** + * @} + */ + +/** @defgroup CORDIC_Out_Size CORDIC Results Size + * @{ + */ +#define CORDIC_OUTSIZE_32BITS (0x00000000U) /*!< 32 bits output data size (Q1.31 format) */ +#define CORDIC_OUTSIZE_16BITS CORDIC_CSR_RESSIZE /*!< 16 bits output data size (Q1.15 format) */ +/** + * @} + */ + +/** @defgroup CORDIC_Flags CORDIC status flags + * @{ + */ +#define CORDIC_FLAG_RRDY CORDIC_CSR_RRDY /*!< Result Ready Flag */ +/** + * @} + */ + +/** @defgroup CORDIC_DMA_Direction CORDIC DMA direction + * @{ + */ +#define CORDIC_DMA_DIR_NONE ((uint32_t)0x00000000U) /*!< DMA direction : none */ +#define CORDIC_DMA_DIR_IN ((uint32_t)0x00000001U) /*!< DMA direction : Input of CORDIC */ +#define CORDIC_DMA_DIR_OUT ((uint32_t)0x00000002U) /*!< DMA direction : Output of CORDIC */ +#define CORDIC_DMA_DIR_IN_OUT ((uint32_t)0x00000003U) /*!< DMA direction : Input and Output of CORDIC */ +/** + * @} + */ + +/** + * @} + */ + + +/* Exported macro ------------------------------------------------------------*/ +/** @defgroup CORDIC_Exported_Macros CORDIC Exported Macros + * @{ + */ + +/** @brief Reset CORDIC handle state. + * @param __HANDLE__ CORDIC handle + * @retval None + */ +#if USE_HAL_CORDIC_REGISTER_CALLBACKS == 1 +#define __HAL_CORDIC_RESET_HANDLE_STATE(__HANDLE__) do{ \ + (__HANDLE__)->State = HAL_CORDIC_STATE_RESET; \ + (__HANDLE__)->MspInitCallback = NULL; \ + (__HANDLE__)->MspDeInitCallback = NULL; \ + } while(0) +#else +#define __HAL_CORDIC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_CORDIC_STATE_RESET) +#endif /*USE_HAL_CORDIC_REGISTER_CALLBACKS */ + +/** + * @brief Enable the CORDIC interrupt when result is ready + * @param __HANDLE__ CORDIC handle. + * @param __INTERRUPT__ CORDIC Interrupt. + * This parameter can be one of the following values: + * @arg @ref CORDIC_IT_IEN Enable Interrupt + * @retval None + */ +#define __HAL_CORDIC_ENABLE_IT(__HANDLE__, __INTERRUPT__) \ + (((__HANDLE__)->Instance->CSR) |= (__INTERRUPT__)) + +/** + * @brief Disable the CORDIC interrupt + * @param __HANDLE__ CORDIC handle. + * @param __INTERRUPT__ CORDIC Interrupt. + * This parameter can be one of the following values: + * @arg @ref CORDIC_IT_IEN Enable Interrupt + * @retval None + */ +#define __HAL_CORDIC_DISABLE_IT(__HANDLE__, __INTERRUPT__) \ + (((__HANDLE__)->Instance->CSR) &= ~(__INTERRUPT__)) + +/** @brief Check whether the specified CORDIC interrupt occurred or not. + Dummy macro as no interrupt status flag. + * @param __HANDLE__ CORDIC handle. + * @param __INTERRUPT__ CORDIC interrupt to check + * @retval SET (interrupt occurred) or RESET (interrupt did not occurred) + */ +#define __HAL_CORDIC_GET_IT(__HANDLE__, __INTERRUPT__) /* Dummy macro */ + +/** @brief Clear specified CORDIC interrupt status. Dummy macro as no + interrupt status flag. + * @param __HANDLE__ CORDIC handle. + * @param __INTERRUPT__ CORDIC interrupt to clear + * @retval None + */ +#define __HAL_CORDIC_CLEAR_IT(__HANDLE__, __INTERRUPT__) /* Dummy macro */ + +/** @brief Check whether the specified CORDIC status flag is set or not. + * @param __HANDLE__ CORDIC handle. + * @param __FLAG__ CORDIC flag to check + * This parameter can be one of the following values: + * @arg @ref CORDIC_FLAG_RRDY Result Ready Flag + * @retval SET (flag is set) or RESET (flag is reset) + */ +#define __HAL_CORDIC_GET_FLAG(__HANDLE__, __FLAG__) \ + ((((__HANDLE__)->Instance->CSR) & (__FLAG__)) == (__FLAG__)) + +/** @brief Clear specified CORDIC status flag. Dummy macro as no + flag can be cleared. + * @param __HANDLE__ CORDIC handle. + * @param __FLAG__ CORDIC flag to clear + * This parameter can be one of the following values: + * @arg @ref CORDIC_FLAG_RRDY Result Ready Flag + * @retval None + */ +#define __HAL_CORDIC_CLEAR_FLAG(__HANDLE__, __FLAG__) /* Dummy macro */ + +/** @brief Check whether the specified CORDIC interrupt is enabled or not. + * @param __HANDLE__ CORDIC handle. + * @param __INTERRUPT__ CORDIC interrupt to check + * This parameter can be one of the following values: + * @arg @ref CORDIC_IT_IEN Enable Interrupt + * @retval FlagStatus + */ +#define __HAL_CORDIC_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) \ + (((__HANDLE__)->Instance->CSR) & (__INTERRUPT__)) + +/** + * @} + */ + +/* Private macros --------------------------------------------------------*/ +/** @defgroup CORDIC_Private_Macros CORDIC Private Macros + * @{ + */ + +/** + * @brief Verify the CORDIC function. + * @param __FUNCTION__ Name of the function. + * @retval SET (__FUNCTION__ is a valid value) or RESET (__FUNCTION__ is invalid) + */ +#define IS_CORDIC_FUNCTION(__FUNCTION__) (((__FUNCTION__) == CORDIC_FUNCTION_COSINE) || \ + ((__FUNCTION__) == CORDIC_FUNCTION_SINE) || \ + ((__FUNCTION__) == CORDIC_FUNCTION_PHASE) || \ + ((__FUNCTION__) == CORDIC_FUNCTION_MODULUS) || \ + ((__FUNCTION__) == CORDIC_FUNCTION_ARCTANGENT) || \ + ((__FUNCTION__) == CORDIC_FUNCTION_HCOSINE) || \ + ((__FUNCTION__) == CORDIC_FUNCTION_HSINE) || \ + ((__FUNCTION__) == CORDIC_FUNCTION_HARCTANGENT) || \ + ((__FUNCTION__) == CORDIC_FUNCTION_NATURALLOG) || \ + ((__FUNCTION__) == CORDIC_FUNCTION_SQUAREROOT)) + + +/** + * @brief Verify the CORDIC precision. + * @param __PRECISION__ CORDIC Precision in Cycles Number. + * @retval SET (__PRECISION__ is a valid value) or RESET (__PRECISION__ is invalid) + */ +#define IS_CORDIC_PRECISION(__PRECISION__) (((__PRECISION__) == CORDIC_PRECISION_1CYCLE) || \ + ((__PRECISION__) == CORDIC_PRECISION_2CYCLES) || \ + ((__PRECISION__) == CORDIC_PRECISION_3CYCLES) || \ + ((__PRECISION__) == CORDIC_PRECISION_4CYCLES) || \ + ((__PRECISION__) == CORDIC_PRECISION_5CYCLES) || \ + ((__PRECISION__) == CORDIC_PRECISION_6CYCLES) || \ + ((__PRECISION__) == CORDIC_PRECISION_7CYCLES) || \ + ((__PRECISION__) == CORDIC_PRECISION_8CYCLES) || \ + ((__PRECISION__) == CORDIC_PRECISION_9CYCLES) || \ + ((__PRECISION__) == CORDIC_PRECISION_10CYCLES) || \ + ((__PRECISION__) == CORDIC_PRECISION_11CYCLES) || \ + ((__PRECISION__) == CORDIC_PRECISION_12CYCLES) || \ + ((__PRECISION__) == CORDIC_PRECISION_13CYCLES) || \ + ((__PRECISION__) == CORDIC_PRECISION_14CYCLES) || \ + ((__PRECISION__) == CORDIC_PRECISION_15CYCLES)) + +/** + * @brief Verify the CORDIC scaling factor. + * @param __SCALE__ Number of cycles for calculation, 1 cycle corresponding to 4 algorithm iterations. + * @retval SET (__SCALE__ is a valid value) or RESET (__SCALE__ is invalid) + */ +#define IS_CORDIC_SCALE(__SCALE__) (((__SCALE__) == CORDIC_SCALE_0) || \ + ((__SCALE__) == CORDIC_SCALE_1) || \ + ((__SCALE__) == CORDIC_SCALE_2) || \ + ((__SCALE__) == CORDIC_SCALE_3) || \ + ((__SCALE__) == CORDIC_SCALE_4) || \ + ((__SCALE__) == CORDIC_SCALE_5) || \ + ((__SCALE__) == CORDIC_SCALE_6) || \ + ((__SCALE__) == CORDIC_SCALE_7)) + +/** + * @brief Verify the CORDIC number of 32-bits write expected for one calculation. + * @param __NBWRITE__ Number of 32-bits write expected for one calculation. + * @retval SET (__NBWRITE__ is a valid value) or RESET (__NBWRITE__ is invalid) + */ +#define IS_CORDIC_NBWRITE(__NBWRITE__) (((__NBWRITE__) == CORDIC_NBWRITE_1) || \ + ((__NBWRITE__) == CORDIC_NBWRITE_2)) + +/** + * @brief Verify the CORDIC number of 32-bits read expected after one calculation. + * @param __NBREAD__ Number of 32-bits read expected after one calculation. + * @retval SET (__NBREAD__ is a valid value) or RESET (__NBREAD__ is invalid) + */ +#define IS_CORDIC_NBREAD(__NBREAD__) (((__NBREAD__) == CORDIC_NBREAD_1) || \ + ((__NBREAD__) == CORDIC_NBREAD_2)) + +/** + * @brief Verify the CORDIC input data size for one calculation. + * @param __INSIZE__ input data size for one calculation. + * @retval SET (__INSIZE__ is a valid value) or RESET (__INSIZE__ is invalid) + */ +#define IS_CORDIC_INSIZE(__INSIZE__) (((__INSIZE__) == CORDIC_INSIZE_32BITS) || \ + ((__INSIZE__) == CORDIC_INSIZE_16BITS)) + +/** + * @brief Verify the CORDIC output data size for one calculation. + * @param __OUTSIZE__ output data size for one calculation. + * @retval SET (__OUTSIZE__ is a valid value) or RESET (__OUTSIZE__ is invalid) + */ +#define IS_CORDIC_OUTSIZE(__OUTSIZE__) (((__OUTSIZE__) == CORDIC_OUTSIZE_32BITS) || \ + ((__OUTSIZE__) == CORDIC_OUTSIZE_16BITS)) + +/** + * @brief Verify the CORDIC DMA transfer Direction. + * @param __DMADIR__ DMA transfer direction. + * @retval SET (__DMADIR__ is a valid value) or RESET (__DMADIR__ is invalid) + */ +#define IS_CORDIC_DMA_DIRECTION(__DMADIR__) (((__DMADIR__) == CORDIC_DMA_DIR_IN) || \ + ((__DMADIR__) == CORDIC_DMA_DIR_OUT) || \ + ((__DMADIR__) == CORDIC_DMA_DIR_IN_OUT)) + +/** + * @} + */ + +/** @addtogroup CORDIC_Exported_Functions + * @{ + */ +/* Exported functions ------------------------------------------------------- */ + +/** @addtogroup CORDIC_Exported_Functions_Group1 + * @{ + */ +/* Initialization and de-initialization functions ******************************/ +HAL_StatusTypeDef HAL_CORDIC_Init(CORDIC_HandleTypeDef *hcordic); +HAL_StatusTypeDef HAL_CORDIC_DeInit(CORDIC_HandleTypeDef *hcordic); +void HAL_CORDIC_MspInit(CORDIC_HandleTypeDef *hcordic); +void HAL_CORDIC_MspDeInit(CORDIC_HandleTypeDef *hcordic); + +#if USE_HAL_CORDIC_REGISTER_CALLBACKS == 1 +/* Callbacks Register/UnRegister functions ***********************************/ +HAL_StatusTypeDef HAL_CORDIC_RegisterCallback(CORDIC_HandleTypeDef *hcordic, HAL_CORDIC_CallbackIDTypeDef CallbackID, pCORDIC_CallbackTypeDef pCallback); +HAL_StatusTypeDef HAL_CORDIC_UnRegisterCallback(CORDIC_HandleTypeDef *hcordic, HAL_CORDIC_CallbackIDTypeDef CallbackID); +/** + * @} + */ + +/** @addtogroup CORDIC_Exported_Functions_Group2 + * @{ + */ +#endif /* USE_HAL_CORDIC_REGISTER_CALLBACKS */ +/* Peripheral Control functions ***********************************************/ +HAL_StatusTypeDef HAL_CORDIC_Configure(CORDIC_HandleTypeDef *hcordic, CORDIC_ConfigTypeDef *sConfig); +HAL_StatusTypeDef HAL_CORDIC_Calculate(CORDIC_HandleTypeDef *hcordic, int32_t *pInBuff, int32_t *pOutBuff, uint32_t NbCalc, uint32_t Timeout); +HAL_StatusTypeDef HAL_CORDIC_CalculateZO(CORDIC_HandleTypeDef *hcordic, int32_t *pInBuff, int32_t *pOutBuff, uint32_t NbCalc, uint32_t Timeout); +HAL_StatusTypeDef HAL_CORDIC_Calculate_IT(CORDIC_HandleTypeDef *hcordic, int32_t *pInBuff, int32_t *pOutBuff, uint32_t NbCalc); +HAL_StatusTypeDef HAL_CORDIC_Calculate_DMA(CORDIC_HandleTypeDef *hcordic, int32_t *pInBuff, int32_t *pOutBuff, uint32_t NbCalc, uint32_t DMADirection); +/** + * @} + */ + +/** @addtogroup CORDIC_Exported_Functions_Group3 + * @{ + */ +/* Callback functions *********************************************************/ +void HAL_CORDIC_ErrorCallback(CORDIC_HandleTypeDef *hcordic); +void HAL_CORDIC_CalculateCpltCallback(CORDIC_HandleTypeDef *hcordic); +/** + * @} + */ + +/** @addtogroup CORDIC_Exported_Functions_Group4 + * @{ + */ +/* IRQ handler management *****************************************************/ +void HAL_CORDIC_IRQHandler(CORDIC_HandleTypeDef *hcordic); +/** + * @} + */ + +/** @addtogroup CORDIC_Exported_Functions_Group5 + * @{ + */ +/* Peripheral State functions *************************************************/ +HAL_CORDIC_StateTypeDef HAL_CORDIC_GetState(CORDIC_HandleTypeDef *hcordic); +uint32_t HAL_CORDIC_GetError(CORDIC_HandleTypeDef *hcordic); +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#endif /* CORDIC */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32H7xx_HAL_CORDIC_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_cryp.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_cryp.h index 5c4741d..4bbf406 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_cryp.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_cryp.h @@ -64,8 +64,8 @@ typedef struct uint32_t HeaderSize; /*!< The size of header buffer in word */ uint32_t *B0; /*!< B0 is first authentication block used only in AES CCM mode */ uint32_t DataWidthUnit; /*!< Data With Unit, this parameter can be value of @ref CRYP_Data_Width_Unit*/ - uint32_t KeyIVConfigSkip; /*!< CRYP peripheral Key and IV configuration skip, to config Key and Initialization - Vector only once and to skip configuration for consecutive processings. + uint32_t KeyIVConfigSkip; /*!< CRYP peripheral Key and IV configuration skip, to configure Key and Initialization + Vector only once and to skip configuration for consecutive processing. This parameter can be a value of @ref CRYP_Configuration_Skip */ } CRYP_ConfigTypeDef; @@ -108,7 +108,7 @@ typedef struct __IO uint16_t CrypOutCount; /*!< Counter of output data */ - uint16_t Size; /*!< length of input data in word */ + uint16_t Size; /*!< length of input data in word or in byte, according to DataWidthUnit */ uint32_t Phase; /*!< CRYP peripheral phase */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_dfsdm.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_dfsdm.h index c5c9215..abdce62 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_dfsdm.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_dfsdm.h @@ -237,7 +237,7 @@ typedef struct uint32_t ErrorCode; /*!< DFSDM filter error code */ #if (USE_HAL_DFSDM_REGISTER_CALLBACKS == 1) void (*AwdCallback) (struct __DFSDM_Filter_HandleTypeDef *hdfsdm_filter, - uint32_t Channel, uint32_t Threshold); /*!< DFSDM filter analog watchdog callback */ + uint32_t Channel, uint32_t Threshold); /*!< DFSDM filter analog watchdog callback */ void (*RegConvCpltCallback) (struct __DFSDM_Filter_HandleTypeDef *hdfsdm_filter); /*!< DFSDM filter regular conversion complete callback */ void (*RegConvHalfCpltCallback) (struct __DFSDM_Filter_HandleTypeDef *hdfsdm_filter); /*!< DFSDM filter half regular conversion complete callback */ void (*InjConvCpltCallback) (struct __DFSDM_Filter_HandleTypeDef *hdfsdm_filter); /*!< DFSDM filter injected conversion complete callback */ @@ -302,8 +302,8 @@ typedef void (*pDFSDM_Filter_AwdCallbackTypeDef)(DFSDM_Filter_HandleTypeDef *hdf /** @defgroup DFSDM_Channel_OuputClock DFSDM channel output clock selection * @{ */ -#define DFSDM_CHANNEL_OUTPUT_CLOCK_SYSTEM 0x00000000U /*!< Source for ouput clock is system clock */ -#define DFSDM_CHANNEL_OUTPUT_CLOCK_AUDIO DFSDM_CHCFGR1_CKOUTSRC /*!< Source for ouput clock is audio clock */ +#define DFSDM_CHANNEL_OUTPUT_CLOCK_SYSTEM 0x00000000U /*!< Source for ouput clock is system clock */ +#define DFSDM_CHANNEL_OUTPUT_CLOCK_AUDIO DFSDM_CHCFGR1_CKOUTSRC /*!< Source for ouput clock is audio clock */ /** * @} */ @@ -331,8 +331,8 @@ typedef void (*pDFSDM_Filter_AwdCallbackTypeDef)(DFSDM_Filter_HandleTypeDef *hdf /** @defgroup DFSDM_Channel_InputPins DFSDM channel input pins * @{ */ -#define DFSDM_CHANNEL_SAME_CHANNEL_PINS 0x00000000U /*!< Input from pins on same channel */ -#define DFSDM_CHANNEL_FOLLOWING_CHANNEL_PINS DFSDM_CHCFGR1_CHINSEL /*!< Input from pins on following channel */ +#define DFSDM_CHANNEL_SAME_CHANNEL_PINS 0x00000000U /*!< Input from pins on same channel */ +#define DFSDM_CHANNEL_FOLLOWING_CHANNEL_PINS DFSDM_CHCFGR1_CHINSEL /*!< Input from pins on following channel */ /** * @} */ @@ -340,10 +340,10 @@ typedef void (*pDFSDM_Filter_AwdCallbackTypeDef)(DFSDM_Filter_HandleTypeDef *hdf /** @defgroup DFSDM_Channel_SerialInterfaceType DFSDM channel serial interface type * @{ */ -#define DFSDM_CHANNEL_SPI_RISING 0x00000000U /*!< SPI with rising edge */ -#define DFSDM_CHANNEL_SPI_FALLING DFSDM_CHCFGR1_SITP_0 /*!< SPI with falling edge */ -#define DFSDM_CHANNEL_MANCHESTER_RISING DFSDM_CHCFGR1_SITP_1 /*!< Manchester with rising edge */ -#define DFSDM_CHANNEL_MANCHESTER_FALLING DFSDM_CHCFGR1_SITP /*!< Manchester with falling edge */ +#define DFSDM_CHANNEL_SPI_RISING 0x00000000U /*!< SPI with rising edge */ +#define DFSDM_CHANNEL_SPI_FALLING DFSDM_CHCFGR1_SITP_0 /*!< SPI with falling edge */ +#define DFSDM_CHANNEL_MANCHESTER_RISING DFSDM_CHCFGR1_SITP_1 /*!< Manchester with rising edge */ +#define DFSDM_CHANNEL_MANCHESTER_FALLING DFSDM_CHCFGR1_SITP /*!< Manchester with falling edge */ /** * @} */ @@ -383,15 +383,15 @@ typedef void (*pDFSDM_Filter_AwdCallbackTypeDef)(DFSDM_Filter_HandleTypeDef *hdf /** @defgroup DFSDM_Filter_ExtTrigger DFSDM filter external trigger * @{ */ -#define DFSDM_FILTER_EXT_TRIG_TIM1_TRGO 0x00000000U /*!< For all DFSDM filters */ -#define DFSDM_FILTER_EXT_TRIG_TIM1_TRGO2 DFSDM_FLTCR1_JEXTSEL_0 /*!< For all DFSDM filters */ -#define DFSDM_FILTER_EXT_TRIG_TIM8_TRGO DFSDM_FLTCR1_JEXTSEL_1 /*!< For all DFSDM filters */ -#define DFSDM_FILTER_EXT_TRIG_TIM8_TRGO2 (DFSDM_FLTCR1_JEXTSEL_0 | DFSDM_FLTCR1_JEXTSEL_1) /*!< For all DFSDM filters */ -#define DFSDM_FILTER_EXT_TRIG_TIM3_TRGO DFSDM_FLTCR1_JEXTSEL_2 /*!< For all DFSDM filters */ -#define DFSDM_FILTER_EXT_TRIG_TIM4_TRGO (DFSDM_FLTCR1_JEXTSEL_0 | DFSDM_FLTCR1_JEXTSEL_2) /*!< For all DFSDM filters */ +#define DFSDM_FILTER_EXT_TRIG_TIM1_TRGO 0x00000000U /*!< For all DFSDM filters */ +#define DFSDM_FILTER_EXT_TRIG_TIM1_TRGO2 DFSDM_FLTCR1_JEXTSEL_0 /*!< For all DFSDM filters */ +#define DFSDM_FILTER_EXT_TRIG_TIM8_TRGO DFSDM_FLTCR1_JEXTSEL_1 /*!< For all DFSDM filters */ +#define DFSDM_FILTER_EXT_TRIG_TIM8_TRGO2 (DFSDM_FLTCR1_JEXTSEL_0 | DFSDM_FLTCR1_JEXTSEL_1) /*!< For all DFSDM filters */ +#define DFSDM_FILTER_EXT_TRIG_TIM3_TRGO DFSDM_FLTCR1_JEXTSEL_2 /*!< For all DFSDM filters */ +#define DFSDM_FILTER_EXT_TRIG_TIM4_TRGO (DFSDM_FLTCR1_JEXTSEL_0 | DFSDM_FLTCR1_JEXTSEL_2) /*!< For all DFSDM filters */ #define DFSDM_FILTER_EXT_TRIG_TIM16_OC1 (DFSDM_FLTCR1_JEXTSEL_2 | DFSDM_FLTCR1_JEXTSEL_1) /*!< For all DFSDM filters */ #define DFSDM_FILTER_EXT_TRIG_TIM6_TRGO (DFSDM_FLTCR1_JEXTSEL_0 | DFSDM_FLTCR1_JEXTSEL_2 | DFSDM_FLTCR1_JEXTSEL_1) /*!< For all DFSDM filters */ -#define DFSDM_FILTER_EXT_TRIG_TIM7_TRGO DFSDM_FLTCR1_JEXTSEL_3 /*!< For all DFSDM filters */ +#define DFSDM_FILTER_EXT_TRIG_TIM7_TRGO DFSDM_FLTCR1_JEXTSEL_3 /*!< For all DFSDM filters */ #define DFSDM_FILTER_EXT_TRIG_HRTIM1_ADCTRG1 (DFSDM_FLTCR1_JEXTSEL_3 | DFSDM_FLTCR1_JEXTSEL_0) #define DFSDM_FILTER_EXT_TRIG_HRTIM1_ADCTRG3 (DFSDM_FLTCR1_JEXTSEL_3 | DFSDM_FLTCR1_JEXTSEL_1) #define DFSDM_FILTER_EXT_TRIG_EXTI11 (DFSDM_FLTCR1_JEXTSEL_4 | DFSDM_FLTCR1_JEXTSEL_3) /*!< For all DFSDM filters */ @@ -399,12 +399,16 @@ typedef void (*pDFSDM_Filter_AwdCallbackTypeDef)(DFSDM_Filter_HandleTypeDef *hdf #define DFSDM_FILTER_EXT_TRIG_LPTIM1_OUT (DFSDM_FLTCR1_JEXTSEL_4 | DFSDM_FLTCR1_JEXTSEL_3 | DFSDM_FLTCR1_JEXTSEL_1) /*!< For all DFSDM filters */ #define DFSDM_FILTER_EXT_TRIG_LPTIM2_OUT (DFSDM_FLTCR1_JEXTSEL_4 | DFSDM_FLTCR1_JEXTSEL_3 | DFSDM_FLTCR1_JEXTSEL_1 | DFSDM_FLTCR1_JEXTSEL_0) /*!< For all DFSDM filters */ #define DFSDM_FILTER_EXT_TRIG_LPTIM3_OUT (DFSDM_FLTCR1_JEXTSEL_4 | DFSDM_FLTCR1_JEXTSEL_3 | DFSDM_FLTCR1_JEXTSEL_2) /*!< For all DFSDM filters */ -#if defined(STM32H7A3xx) || defined(STM32H7A3xxQ) || defined(STM32H7B3xx) || defined(STM32H7B3xxQ) || defined(STM32H7B0xx) || defined(STM32H7B0xxQ) +#if (STM32H7_DEV_ID == 0x480UL) #define DFSDM_FILTER_EXT_TRIG_COMP1_OUT (DFSDM_FLTCR1_JEXTSEL_4 | DFSDM_FLTCR1_JEXTSEL_3 | \ - DFSDM_FLTCR1_JEXTSEL_2 | DFSDM_FLTCR1_JEXTSEL_0) + DFSDM_FLTCR1_JEXTSEL_2 | DFSDM_FLTCR1_JEXTSEL_0) #define DFSDM_FILTER_EXT_TRIG_COMP2_OUT (DFSDM_FLTCR1_JEXTSEL_4 | DFSDM_FLTCR1_JEXTSEL_3 | \ DFSDM_FLTCR1_JEXTSEL_2 | DFSDM_FLTCR1_JEXTSEL_1) -#endif /* STM32H7A3xx || STM32H7A3xxQ || STM32H7B3xx || STM32H7B3xxQ || STM32H7B0xx || STM32H7B0xxQ */ +#elif (STM32H7_DEV_ID == 0x483UL) +#define DFSDM_FILTER_EXT_TRIG_TIM23_TRGO (DFSDM_FLTCR1_JEXTSEL_3 | DFSDM_FLTCR1_JEXTSEL_1 | \ + DFSDM_FLTCR1_JEXTSEL_0) +#define DFSDM_FILTER_EXT_TRIG_TIM24_TRGO (DFSDM_FLTCR1_JEXTSEL_3 | DFSDM_FLTCR1_JEXTSEL_2 ) +#endif /* STM32H7_DEV_ID == 0x480UL */ /** * @} */ @@ -750,7 +754,7 @@ uint32_t HAL_DFSDM_FilterGetError(DFSDM_Filter_HandleTypeDe #define IS_DFSDM_FILTER_INJ_TRIGGER(TRIG) (((TRIG) == DFSDM_FILTER_SW_TRIGGER) || \ ((TRIG) == DFSDM_FILTER_SYNC_TRIGGER) || \ ((TRIG) == DFSDM_FILTER_EXT_TRIGGER)) -#if defined(STM32H7A3xx) || defined(STM32H7A3xxQ) || defined(STM32H7B3xx) || defined(STM32H7B3xxQ) || defined(STM32H7B0xx) || defined(STM32H7B0xxQ) +#if (STM32H7_DEV_ID == 0x480UL) #define IS_DFSDM_FILTER_EXT_TRIG(TRIG) (((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM1_TRGO) || \ ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM1_TRGO2) || \ ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM8_TRGO) || \ @@ -767,6 +771,24 @@ uint32_t HAL_DFSDM_FilterGetError(DFSDM_Filter_HandleTypeDe ((TRIG) == DFSDM_FILTER_EXT_TRIG_LPTIM3_OUT) || \ ((TRIG) == DFSDM_FILTER_EXT_TRIG_COMP1_OUT) || \ ((TRIG) == DFSDM_FILTER_EXT_TRIG_COMP2_OUT)) +#elif (STM32H7_DEV_ID == 0x483UL) +#define IS_DFSDM_FILTER_EXT_TRIG(TRIG) (((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM1_TRGO) || \ + ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM1_TRGO2) || \ + ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM8_TRGO) || \ + ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM8_TRGO2) || \ + ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM3_TRGO) || \ + ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM4_TRGO) || \ + ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM16_OC1) || \ + ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM6_TRGO) || \ + ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM7_TRGO) || \ + ((TRIG) == DFSDM_FILTER_EXT_TRIG_EXTI11) || \ + ((TRIG) == DFSDM_FILTER_EXT_TRIG_EXTI15) || \ + ((TRIG) == DFSDM_FILTER_EXT_TRIG_LPTIM1_OUT) || \ + ((TRIG) == DFSDM_FILTER_EXT_TRIG_LPTIM2_OUT) || \ + ((TRIG) == DFSDM_FILTER_EXT_TRIG_LPTIM3_OUT) || \ + ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM23_TRGO) || \ + ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM24_TRGO)) + #else #define IS_DFSDM_FILTER_EXT_TRIG(TRIG) (((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM1_TRGO) || \ ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM1_TRGO2) || \ @@ -784,7 +806,7 @@ uint32_t HAL_DFSDM_FilterGetError(DFSDM_Filter_HandleTypeDe ((TRIG) == DFSDM_FILTER_EXT_TRIG_LPTIM1_OUT) || \ ((TRIG) == DFSDM_FILTER_EXT_TRIG_LPTIM2_OUT) || \ ((TRIG) == DFSDM_FILTER_EXT_TRIG_LPTIM3_OUT)) -#endif /* STM32H7A3xx || STM32H7A3xxQ || STM32H7B3xx || STM32H7B3xxQ || STM32H7B0xx || STM32H7B0xxQ */ +#endif /* STM32H7_DEV_ID == 0x480UL */ #define IS_DFSDM_FILTER_EXT_TRIG_EDGE(EDGE) (((EDGE) == DFSDM_FILTER_EXT_TRIG_RISING_EDGE) || \ ((EDGE) == DFSDM_FILTER_EXT_TRIG_FALLING_EDGE) || \ ((EDGE) == DFSDM_FILTER_EXT_TRIG_BOTH_EDGES)) diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_dma.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_dma.h index 36d553b..1ac7f5a 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_dma.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_dma.h @@ -332,8 +332,11 @@ typedef struct __DMA_HandleTypeDef #define DMA_REQUEST_SAI1_A 87U /*!< DMAMUX1 SAI1 A request */ #define DMA_REQUEST_SAI1_B 88U /*!< DMAMUX1 SAI1 B request */ + +#if defined(SAI2) #define DMA_REQUEST_SAI2_A 89U /*!< DMAMUX1 SAI2 A request */ #define DMA_REQUEST_SAI2_B 90U /*!< DMAMUX1 SAI2 B request */ +#endif /* SAI2 */ #define DMA_REQUEST_SWPMI_RX 91U /*!< DMAMUX1 SWPMI RX request */ #define DMA_REQUEST_SWPMI_TX 92U /*!< DMAMUX1 SWPMI TX request */ @@ -385,6 +388,38 @@ typedef struct __DMA_HandleTypeDef #define DMA_REQUEST_USART10_TX 119U /*!< DMAMUX1 USART10 request */ #endif /* USART10 */ +#if defined(FMAC) +#define DMA_REQUEST_FMAC_READ 120U /*!< DMAMUX1 FMAC Read request */ +#define DMA_REQUEST_FMAC_WRITE 121U /*!< DMAMUX1 FMAC Write request */ +#endif /* FMAC */ + +#if defined(CORDIC) +#define DMA_REQUEST_CORDIC_READ 122U /*!< DMAMUX1 CORDIC Read request */ +#define DMA_REQUEST_CORDIC_WRITE 123U /*!< DMAMUX1 CORDIC Write request */ +#endif /* CORDIC */ + +#if defined(I2C5) +#define DMA_REQUEST_I2C5_RX 124U /*!< DMAMUX1 I2C5 RX request */ +#define DMA_REQUEST_I2C5_TX 125U /*!< DMAMUX1 I2C5 TX request */ +#endif /* I2C5 */ + +#if defined(TIM23) +#define DMA_REQUEST_TIM23_CH1 126U /*!< DMAMUX1 TIM23 CH1 request */ +#define DMA_REQUEST_TIM23_CH2 127U /*!< DMAMUX1 TIM23 CH2 request */ +#define DMA_REQUEST_TIM23_CH3 128U /*!< DMAMUX1 TIM23 CH3 request */ +#define DMA_REQUEST_TIM23_CH4 129U /*!< DMAMUX1 TIM23 CH4 request */ +#define DMA_REQUEST_TIM23_UP 130U /*!< DMAMUX1 TIM23 UP request */ +#define DMA_REQUEST_TIM23_TRIG 131U /*!< DMAMUX1 TIM23 TRIG request */ +#endif /* TIM23 */ + +#if defined(TIM24) +#define DMA_REQUEST_TIM24_CH1 132U /*!< DMAMUX1 TIM24 CH1 request */ +#define DMA_REQUEST_TIM24_CH2 133U /*!< DMAMUX1 TIM24 CH2 request */ +#define DMA_REQUEST_TIM24_CH3 134U /*!< DMAMUX1 TIM24 CH3 request */ +#define DMA_REQUEST_TIM24_CH4 135U /*!< DMAMUX1 TIM24 CH4 request */ +#define DMA_REQUEST_TIM24_UP 136U /*!< DMAMUX1 TIM24 UP request */ +#define DMA_REQUEST_TIM24_TRIG 137U /*!< DMAMUX1 TIM24 TRIG request */ +#endif /* TIM24 */ /* DMAMUX2 requests */ #define BDMA_REQUEST_MEM2MEM 0U /*!< memory to memory transfer */ @@ -1200,11 +1235,13 @@ uint32_t HAL_DMA_GetError(DMA_HandleTypeDef *hdma); * @{ */ -#if defined(ADC3) +#if defined(TIM24) +#define IS_DMA_REQUEST(REQUEST) (((REQUEST) <= DMA_REQUEST_TIM24_TRIG)) +#elif defined(ADC3) #define IS_DMA_REQUEST(REQUEST) (((REQUEST) <= DMA_REQUEST_ADC3)) #else #define IS_DMA_REQUEST(REQUEST) (((REQUEST) <= DMA_REQUEST_USART10_TX)) -#endif /* ADC3 */ +#endif /* TIM24 */ #if defined(ADC3) #define IS_BDMA_REQUEST(REQUEST) (((REQUEST) <= BDMA_REQUEST_ADC3)) diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_eth.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_eth.h index bb2bacd..7e3359a 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_eth.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_eth.h @@ -25,10 +25,12 @@ extern "C" { #endif -#if defined(ETH) + /* Includes ------------------------------------------------------------------*/ #include "stm32h7xx_hal_def.h" +#if defined(ETH) + /** @addtogroup STM32H7xx_HAL_Driver * @{ */ @@ -60,8 +62,8 @@ typedef struct __IO uint32_t DESC1; __IO uint32_t DESC2; __IO uint32_t DESC3; - __IO uint32_t BackupAddr0; /* used to store rx buffer 1 address */ - __IO uint32_t BackupAddr1; /* used to store rx buffer 2 address */ + uint32_t BackupAddr0; /* used to store rx buffer 1 address */ + uint32_t BackupAddr1; /* used to store rx buffer 2 address */ }ETH_DMADescTypeDef; /** * diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_eth_ex.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_eth_ex.h index bb7e0cf..6e5f530 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_eth_ex.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_eth_ex.h @@ -36,7 +36,7 @@ /** @addtogroup ETHEx * @{ - */ + */ /* Exported types ------------------------------------------------------------*/ /** @defgroup ETHEx_Exported_Types ETHEx Exported Types diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_exti.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_exti.h index 94a6ea3..18cffec 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_exti.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_exti.h @@ -150,22 +150,30 @@ typedef struct #define EXTI_LINE_49 (EXTI_CONFIG | EXTI_EVENT | EXTI_REG2 | EXTI_TARGET_MSK_ALL | 0x11U) #define EXTI_LINE_50 (EXTI_DIRECT | EXTI_EVENT | EXTI_REG2 | EXTI_TARGET_MSK_ALL | 0x12U) #define EXTI_LINE_51 (EXTI_CONFIG | EXTI_EVENT | EXTI_REG2 | EXTI_TARGET_MSK_ALL | 0x13U) -#if !defined(UART9) +#if defined(LPTIM4) #define EXTI_LINE_52 (EXTI_DIRECT | EXTI_EVENT | EXTI_REG2 | EXTI_TARGET_MSK_ALL | 0x14U) #else #define EXTI_LINE_52 (EXTI_DIRECT | EXTI_EVENT | EXTI_REG2 | EXTI_TARGET_MSK_ALL_CPU | 0x14U) -#endif /* UART9 */ -#if !defined(USART10) +#endif /*LPTIM4*/ +#if defined(LPTIM5) #define EXTI_LINE_53 (EXTI_DIRECT | EXTI_EVENT | EXTI_REG2 | EXTI_TARGET_MSK_ALL | 0x15U) #else #define EXTI_LINE_53 (EXTI_DIRECT | EXTI_EVENT | EXTI_REG2 | EXTI_TARGET_MSK_ALL_CPU | 0x15U) -#endif /* USART10 */ +#endif /*LPTIM5*/ #define EXTI_LINE_54 (EXTI_DIRECT | EXTI_EVENT | EXTI_REG2 | EXTI_TARGET_MSK_ALL_CPU | 0x16U) #define EXTI_LINE_55 (EXTI_DIRECT | EXTI_EVENT | EXTI_REG2 | EXTI_TARGET_MSK_ALL_CPU | 0x17U) #define EXTI_LINE_56 (EXTI_DIRECT | EXTI_EVENT | EXTI_REG2 | EXTI_TARGET_MSK_ALL_CPU | 0x18U) +#if defined(EXTI_IMR2_IM57) #define EXTI_LINE_57 (EXTI_DIRECT | EXTI_EVENT | EXTI_REG2 | EXTI_TARGET_MSK_ALL_CPU | 0x19U) +#else +#define EXTI_LINE_57 (EXTI_RESERVED | EXTI_EVENT | EXTI_REG2 | EXTI_TARGET_MSK_NONE | 0x19U) +#endif /*EXTI_IMR2_IM57*/ #define EXTI_LINE_58 (EXTI_DIRECT | EXTI_EVENT | EXTI_REG2 | EXTI_TARGET_MSK_ALL_CPU | 0x1AU) +#if defined(EXTI_IMR2_IM59) #define EXTI_LINE_59 (EXTI_DIRECT | EXTI_EVENT | EXTI_REG2 | EXTI_TARGET_MSK_ALL_CPU | 0x1BU) +#else +#define EXTI_LINE_59 (EXTI_RESERVED | EXTI_EVENT | EXTI_REG2 | EXTI_TARGET_MSK_NONE | 0x1BU) +#endif /*EXTI_IMR2_IM59*/ #define EXTI_LINE_60 (EXTI_DIRECT | EXTI_EVENT | EXTI_REG2 | EXTI_TARGET_MSK_ALL_CPU | 0x1CU) #define EXTI_LINE_61 (EXTI_DIRECT | EXTI_EVENT | EXTI_REG2 | EXTI_TARGET_MSK_ALL_CPU | 0x1DU) #define EXTI_LINE_62 (EXTI_DIRECT | EXTI_EVENT | EXTI_REG2 | EXTI_TARGET_MSK_ALL_CPU | 0x1EU) @@ -202,15 +210,12 @@ typedef struct #define EXTI_LINE_79 (EXTI_RESERVED | EXTI_EVENT | EXTI_REG3 | EXTI_TARGET_MSK_NONE| 0x0FU) #define EXTI_LINE_80 (EXTI_RESERVED | EXTI_EVENT | EXTI_REG3 | EXTI_TARGET_MSK_NONE| 0x10U) #endif /* DUAL_CORE */ - #define EXTI_LINE_81 (EXTI_RESERVED | EXTI_EVENT | EXTI_REG3 | EXTI_TARGET_MSK_NONE| 0x11U) - #if defined (DUAL_CORE) #define EXTI_LINE_82 (EXTI_CONFIG | EXTI_EVENT | EXTI_REG3 | EXTI_TARGET_MSK_CPU2| 0x12U) #else #define EXTI_LINE_82 (EXTI_RESERVED | EXTI_EVENT | EXTI_REG3 | EXTI_TARGET_MSK_NONE| 0x12U) #endif /* DUAL_CORE */ - #define EXTI_LINE_83 (EXTI_RESERVED | EXTI_EVENT | EXTI_REG3 | EXTI_TARGET_MSK_NONE| 0x13U) #if defined (DUAL_CORE) #define EXTI_LINE_84 (EXTI_CONFIG | EXTI_EVENT | EXTI_REG3 | EXTI_TARGET_MSK_CPU1| 0x14U) @@ -227,6 +232,15 @@ typedef struct #if defined(DTS) #define EXTI_LINE_88 (EXTI_DIRECT | EXTI_EVENT | EXTI_REG3 | EXTI_TARGET_MSK_ALL | 0x18U) #endif /* DTS */ +#if defined(EXTI_IMR3_IM89) +#define EXTI_LINE_89 (EXTI_DIRECT | EXTI_EVENT | EXTI_REG3 | EXTI_TARGET_MSK_ALL_CPU | 0x19U) +#endif /*EXTI_IMR3_IM89*/ +#if defined(EXTI_IMR3_IM90) +#define EXTI_LINE_90 (EXTI_DIRECT | EXTI_EVENT | EXTI_REG3 | EXTI_TARGET_MSK_ALL_CPU | 0x1AU) +#endif /*EXTI_IMR3_IM90*/ +#if defined(I2C5) +#define EXTI_LINE_91 (EXTI_DIRECT | EXTI_EVENT | EXTI_REG3 | EXTI_TARGET_MSK_ALL_CPU | 0x1BU) +#endif /*I2C5*/ /** * @} @@ -271,7 +285,9 @@ typedef struct #define EXTI_GPIOF 0x00000005U #define EXTI_GPIOG 0x00000006U #define EXTI_GPIOH 0x00000007U +#if defined(GPIOI) #define EXTI_GPIOI 0x00000008U +#endif /*GPIOI*/ #define EXTI_GPIOJ 0x00000009U #define EXTI_GPIOK 0x0000000AU @@ -378,11 +394,13 @@ typedef struct /** * @brief EXTI Line number */ -#if defined (EXTI_LINE_88) +#if (STM32H7_DEV_ID == 0x483UL) +#define EXTI_LINE_NB 92UL +#elif (STM32H7_DEV_ID == 0x480UL) #define EXTI_LINE_NB 89UL #else #define EXTI_LINE_NB 88UL -#endif /* EXTI_LINE_88 */ +#endif /* EXTI_LINE_91 */ /** * @} @@ -420,6 +438,7 @@ typedef struct #define IS_EXTI_CONFIG_LINE(__LINE__) (((__LINE__) & EXTI_CONFIG) != 0x00UL) +#if defined(GPIOI) #define IS_EXTI_GPIO_PORT(__PORT__) (((__PORT__) == EXTI_GPIOA) || \ ((__PORT__) == EXTI_GPIOB) || \ ((__PORT__) == EXTI_GPIOC) || \ @@ -431,6 +450,18 @@ typedef struct ((__PORT__) == EXTI_GPIOI) || \ ((__PORT__) == EXTI_GPIOJ) || \ ((__PORT__) == EXTI_GPIOK)) +#else +#define IS_EXTI_GPIO_PORT(__PORT__) (((__PORT__) == EXTI_GPIOA) || \ + ((__PORT__) == EXTI_GPIOB) || \ + ((__PORT__) == EXTI_GPIOC) || \ + ((__PORT__) == EXTI_GPIOD) || \ + ((__PORT__) == EXTI_GPIOE) || \ + ((__PORT__) == EXTI_GPIOF) || \ + ((__PORT__) == EXTI_GPIOG) || \ + ((__PORT__) == EXTI_GPIOH) || \ + ((__PORT__) == EXTI_GPIOJ) || \ + ((__PORT__) == EXTI_GPIOK)) +#endif /*GPIOI*/ #define IS_EXTI_GPIO_PIN(__PIN__) ((__PIN__) < 16UL) #if defined (LPTIM4) && defined (LPTIM5) diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_fdcan.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_fdcan.h index cfe58cf..85dab32 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_fdcan.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_fdcan.h @@ -28,6 +28,8 @@ extern "C" { /* Includes ------------------------------------------------------------------*/ #include "stm32h7xx_hal_def.h" +#if defined(FDCAN1) + /** @addtogroup STM32H7xx_HAL_Driver * @{ */ @@ -2403,6 +2405,7 @@ HAL_FDCAN_StateTypeDef HAL_FDCAN_GetState(FDCAN_HandleTypeDef *hfdcan); /** * @} */ +#endif /* FDCAN1 */ #ifdef __cplusplus } diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_flash.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_flash.h index 6bda249..9da1470 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_flash.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_flash.h @@ -544,9 +544,13 @@ typedef struct #define __HAL_FLASH_ENABLE_IT_BANK2(__INTERRUPT__) (FLASH->CR2 |= ((__INTERRUPT__) & 0x7FFFFFFFU)) +#if defined (DUAL_BANK) #define __HAL_FLASH_ENABLE_IT(__INTERRUPT__) (IS_FLASH_IT_BANK1(__INTERRUPT__) ? \ __HAL_FLASH_ENABLE_IT_BANK1(__INTERRUPT__) : \ __HAL_FLASH_ENABLE_IT_BANK2(__INTERRUPT__)) +#else +#define __HAL_FLASH_ENABLE_IT(__INTERRUPT__) __HAL_FLASH_ENABLE_IT_BANK1(__INTERRUPT__) +#endif /* DUAL_BANK */ /** @@ -588,9 +592,13 @@ typedef struct #define __HAL_FLASH_DISABLE_IT_BANK2(__INTERRUPT__) (FLASH->CR2 &= ~(uint32_t)((__INTERRUPT__) & 0x7FFFFFFFU)) +#if defined (DUAL_BANK) #define __HAL_FLASH_DISABLE_IT(__INTERRUPT__) (IS_FLASH_IT_BANK1(__INTERRUPT__) ? \ __HAL_FLASH_DISABLE_IT_BANK1(__INTERRUPT__) : \ __HAL_FLASH_DISABLE_IT_BANK2(__INTERRUPT__)) +#else +#define __HAL_FLASH_DISABLE_IT(__INTERRUPT__) __HAL_FLASH_DISABLE_IT_BANK1(__INTERRUPT__) +#endif /* DUAL_BANK */ /** @@ -637,8 +645,12 @@ typedef struct #define __HAL_FLASH_GET_FLAG_BANK2(__FLAG__) (READ_BIT(FLASH->SR2, ((__FLAG__) & 0x7FFFFFFFU)) == (((__FLAG__) & 0x7FFFFFFFU))) +#if defined (DUAL_BANK) #define __HAL_FLASH_GET_FLAG(__FLAG__) (IS_FLASH_FLAG_BANK1(__FLAG__) ? __HAL_FLASH_GET_FLAG_BANK1(__FLAG__) : \ __HAL_FLASH_GET_FLAG_BANK2(__FLAG__)) +#else +#define __HAL_FLASH_GET_FLAG(__FLAG__) __HAL_FLASH_GET_FLAG_BANK1(__FLAG__) +#endif /* DUAL_BANK */ /** @@ -682,8 +694,12 @@ typedef struct #define __HAL_FLASH_CLEAR_FLAG_BANK2(__FLAG__) WRITE_REG(FLASH->CCR2, ((__FLAG__) & 0x7FFFFFFFU)) +#if defined (DUAL_BANK) #define __HAL_FLASH_CLEAR_FLAG(__FLAG__) (IS_FLASH_FLAG_BANK1(__FLAG__) ? __HAL_FLASH_CLEAR_FLAG_BANK1(__FLAG__) : \ - __HAL_FLASH_CLEAR_FLAG_BANK2(__FLAG__)) + __HAL_FLASH_CLEAR_FLAG_BANK2(__FLAG__)) +#else +#define __HAL_FLASH_CLEAR_FLAG(__FLAG__) __HAL_FLASH_CLEAR_FLAG_BANK1(__FLAG__) +#endif /* DUAL_BANK */ /** * @} @@ -768,16 +784,23 @@ extern FLASH_ProcessTypeDef pFlash; #endif /* FLASH_OPTCR_PG_OTP */ #define IS_FLASH_IT_BANK1(IT) (((IT) & FLASH_IT_ALL_BANK1) == (IT)) - +#if defined (DUAL_BANK) #define IS_FLASH_IT_BANK2(IT) (((IT) & FLASH_IT_ALL_BANK2) == (IT)) +#endif /* DUAL_BANK */ #define IS_FLASH_FLAG_BANK1(FLAG) (((FLAG) & FLASH_FLAG_ALL_BANK1) == (FLAG)) - +#if defined (DUAL_BANK) #define IS_FLASH_FLAG_BANK2(FLAG) (((FLAG) & FLASH_FLAG_ALL_BANK2) == (FLAG)) +#endif /* DUAL_BANK */ +#if defined (DUAL_BANK) #define IS_FLASH_PROGRAM_ADDRESS_BANK1(ADDRESS) (((ADDRESS) >= FLASH_BANK1_BASE) && ((ADDRESS) < FLASH_BANK2_BASE)) #define IS_FLASH_PROGRAM_ADDRESS_BANK2(ADDRESS) (((ADDRESS) >= FLASH_BANK2_BASE ) && ((ADDRESS) <= FLASH_END)) +#else +#define IS_FLASH_PROGRAM_ADDRESS_BANK1(ADDRESS) (((ADDRESS) >= FLASH_BANK1_BASE) && ((ADDRESS) <= FLASH_END)) +#endif /* DUAL_BANK */ +#if defined (DUAL_BANK) #if defined (FLASH_OPTCR_PG_OTP) #define IS_FLASH_PROGRAM_ADDRESS_OTP(ADDRESS) (((ADDRESS) >= 0x08FFF000U) && ((ADDRESS) <= 0x08FFF3FFU)) #define IS_FLASH_PROGRAM_ADDRESS(ADDRESS) (IS_FLASH_PROGRAM_ADDRESS_BANK1(ADDRESS) || \ @@ -787,16 +810,28 @@ extern FLASH_ProcessTypeDef pFlash; #define IS_FLASH_PROGRAM_ADDRESS(ADDRESS) (IS_FLASH_PROGRAM_ADDRESS_BANK1(ADDRESS) || \ IS_FLASH_PROGRAM_ADDRESS_BANK2(ADDRESS)) #endif /* FLASH_OPTCR_PG_OTP */ +#else +#if defined (FLASH_OPTCR_PG_OTP) +#define IS_FLASH_PROGRAM_ADDRESS_OTP(ADDRESS) (((ADDRESS) >= 0x08FFF000U) && ((ADDRESS) <= 0x08FFF3FFU)) +#define IS_FLASH_PROGRAM_ADDRESS(ADDRESS) (IS_FLASH_PROGRAM_ADDRESS_BANK1(ADDRESS) || \ + IS_FLASH_PROGRAM_ADDRESS_OTP(ADDRESS)) +#else +#define IS_FLASH_PROGRAM_ADDRESS(ADDRESS) (IS_FLASH_PROGRAM_ADDRESS_BANK1(ADDRESS)) +#endif /* FLASH_OPTCR_PG_OTP */ +#endif /* DUAL_BANK */ -#define IS_BOOT_ADDRESS(ADDRESS) ((ADDRESS) <= (0x3FFF0000U)) - -#define IS_FLASH_BANK(BANK) (((BANK) == FLASH_BANK_1) || \ - ((BANK) == FLASH_BANK_2) || \ - ((BANK) == FLASH_BANK_BOTH)) - -#define IS_FLASH_BANK_EXCLUSIVE(BANK) (((BANK) == FLASH_BANK_1) || \ - ((BANK) == FLASH_BANK_2)) +#define IS_BOOT_ADDRESS(ADDRESS) ((ADDRESS) <= (0x3FFF0000U)) +#if defined (DUAL_BANK) +#define IS_FLASH_BANK(BANK) (((BANK) == FLASH_BANK_1) || \ + ((BANK) == FLASH_BANK_2) || \ + ((BANK) == FLASH_BANK_BOTH)) +#define IS_FLASH_BANK_EXCLUSIVE(BANK) (((BANK) == FLASH_BANK_1) || \ + ((BANK) == FLASH_BANK_2)) +#else +#define IS_FLASH_BANK(BANK) ((BANK) == FLASH_BANK_1) +#define IS_FLASH_BANK_EXCLUSIVE(BANK) ((BANK) == FLASH_BANK_1) +#endif /* DUAL_BANK */ /** * @} diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_flash_ex.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_flash_ex.h index 834c5d2..a84e503 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_flash_ex.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_flash_ex.h @@ -138,6 +138,16 @@ typedef struct This parameter must be a value of @ref FLASHEx_OTP_Blocks */ #endif /* FLASH_OTPBL_LOCKBL */ +#if defined (FLASH_OPTSR2_TCM_AXI_SHARED) + uint32_t SharedRamConfig; /*!< Specifies the configuration of TCM / AXI shared RAM. + This parameter must be a value of @ref FLASHEx_OB_TCM_AXI_SHARED */ +#endif /* FLASH_OPTSR2_TCM_AXI_SHARED */ + +#if defined (FLASH_OPTSR2_CPUFREQ_BOOST) + uint32_t FreqBoostState; /*!< Specifies the state of CPU Frequency Boost. + This parameter must be a value of @ref FLASHEx_OB_CPUFREQ_BOOST */ +#endif /* FLASH_OPTSR2_CPUFREQ_BOOST */ + } FLASH_OBProgramInitTypeDef; /** @@ -227,6 +237,30 @@ typedef struct #if defined (FLASH_OTPBL_LOCKBL) #define OPTIONBYTE_OTP_LOCK 0x80U /*!< OTP Lock option byte configuration */ #endif /* FLASH_OTPBL_LOCKBL */ +#if defined (FLASH_OPTSR2_TCM_AXI_SHARED) +#define OPTIONBYTE_SHARED_RAM 0x100U /*!< TCM / AXI Shared RAM option byte configuration */ +#endif /* FLASH_OPTSR2_TCM_AXI_SHARED */ +#if defined (FLASH_OPTSR2_CPUFREQ_BOOST) +#define OPTIONBYTE_FREQ_BOOST 0x200U /*!< CPU Frequency Boost option byte configuration */ +#endif /* FLASH_OPTSR2_CPUFREQ_BOOST */ + +#if defined (DUAL_CORE) +#define OPTIONBYTE_ALL (OPTIONBYTE_WRP | OPTIONBYTE_RDP | OPTIONBYTE_USER |\ + OPTIONBYTE_PCROP | OPTIONBYTE_BOR | OPTIONBYTE_SECURE_AREA |\ + OPTIONBYTE_CM7_BOOTADD | OPTIONBYTE_CM4_BOOTADD) /*!< All option byte configuration */ +#elif defined (FLASH_OTPBL_LOCKBL) +#define OPTIONBYTE_ALL (OPTIONBYTE_WRP | OPTIONBYTE_RDP | OPTIONBYTE_USER |\ + OPTIONBYTE_PCROP | OPTIONBYTE_BOR | OPTIONBYTE_SECURE_AREA |\ + OPTIONBYTE_BOOTADD | OPTIONBYTE_OTP_LOCK) /*!< All option byte configuration */ +#elif defined (FLASH_OPTSR2_TCM_AXI_SHARED) +#define OPTIONBYTE_ALL (OPTIONBYTE_WRP | OPTIONBYTE_RDP | OPTIONBYTE_USER |\ + OPTIONBYTE_PCROP | OPTIONBYTE_BOR | OPTIONBYTE_SECURE_AREA |\ + OPTIONBYTE_BOOTADD | OPTIONBYTE_SHARED_RAM | OPTIONBYTE_FREQ_BOOST) /*!< All option byte configuration */ +#else +#define OPTIONBYTE_ALL (OPTIONBYTE_WRP | OPTIONBYTE_RDP | OPTIONBYTE_USER |\ + OPTIONBYTE_PCROP | OPTIONBYTE_BOR | OPTIONBYTE_SECURE_AREA |\ + OPTIONBYTE_BOOTADD) /*!< All option byte configuration */ +#endif /* DUAL_CORE */ /** * @} */ @@ -255,8 +289,8 @@ typedef struct /** @defgroup FLASHEx_Option_Bytes_IWatchdog FLASH Option Bytes IWatchdog * @{ */ -#define OB_IWDG_SW 0x20U /*!< Software IWDG selected */ -#define OB_IWDG_HW 0x00U /*!< Hardware IWDG selected */ +#define OB_IWDG_SW OB_IWDG1_SW /*!< Software IWDG selected */ +#define OB_IWDG_HW OB_IWDG1_HW /*!< Hardware IWDG selected */ /** * @} */ @@ -351,8 +385,10 @@ typedef struct * @{ */ #define FLASH_BANK_1 0x01U /*!< Bank 1 */ +#if defined (DUAL_BANK) #define FLASH_BANK_2 0x02U /*!< Bank 2 */ -#define FLASH_BANK_BOTH (FLASH_BANK_1 | FLASH_BANK_2) /*!< Bank1 and Bank2 */ +#define FLASH_BANK_BOTH (FLASH_BANK_1 | FLASH_BANK_2) /*!< Bank1 and Bank2 */ +#endif /* DUAL_BANK */ /** * @} */ @@ -500,7 +536,7 @@ typedef struct * @} */ -#if defined (DUAL_CORE) +#if defined (FLASH_OPTSR_NRST_STOP_D2) /** @defgroup FLASHEx_OB_NRST_STOP_D2 FLASHEx OB NRST STOP D2 * @{ */ @@ -518,7 +554,7 @@ typedef struct /** * @} */ -#endif /* DUAL_CORE */ +#endif /* FLASH_OPTSR_NRST_STOP_D2 */ /** @defgroup FLASHEx_OB_SWAP_BANK FLASHEx OB SWAP BANK * @{ @@ -549,15 +585,29 @@ typedef struct */ #endif /* FLASH_OPTSR_VDDMMC_HSLV */ -/** @defgroup FLASHEx_OB_BOOT_OPTION FLASHEx OB BOOT OPTION +#if defined (FLASH_OPTSR2_CPUFREQ_BOOST) +/** @defgroup FLASHEx_OB_CPUFREQ_BOOST FLASHEx OB CPUFREQ BOOST * @{ */ -#define OB_BOOT_ADD0 0x01U /*!< Select Boot Address 0 */ -#define OB_BOOT_ADD1 0x02U /*!< Select Boot Address 1 */ -#define OB_BOOT_ADD_BOTH 0x03U /*!< Select Boot Address 0 and 1 */ +#define OB_CPUFREQ_BOOST_DISABLE 0x00000000U /*!< CPUFREQ BOOST disabled */ +#define OB_CPUFREQ_BOOST_ENABLE FLASH_OPTSR2_CPUFREQ_BOOST /*!< CPUFREQ BOOST enabled */ /** * @} */ +#endif /* FLASH_OPTSR2_CPUFREQ_BOOST */ + +#if defined (FLASH_OPTSR2_TCM_AXI_SHARED) +/** @defgroup FLASHEx_OB_TCM_AXI_SHARED FLASHEx OB TCM AXI SHARED + * @{ + */ +#define OB_TCM_AXI_SHARED_ITCM64KB 0x00000000U /*!< 64KB ITCM / 320KB system AXI */ +#define OB_TCM_AXI_SHARED_ITCM128KB FLASH_OPTSR2_TCM_AXI_SHARED_0 /*!< 128KB ITCM / 256KB system AXI */ +#define OB_TCM_AXI_SHARED_ITCM192KB FLASH_OPTSR2_TCM_AXI_SHARED_1 /*!< 192KB ITCM / 192KB system AXI */ +#define OB_TCM_AXI_SHARED_ITCM256KB FLASH_OPTSR2_TCM_AXI_SHARED /*!< 256KB ITCM / 128KB system AXI */ +/** + * @} + */ +#endif /* FLASH_OPTSR2_TCM_AXI_SHARED */ /** @defgroup FLASHEx_OB_USER_Type FLASHEx OB USER Type * @{ @@ -570,7 +620,9 @@ typedef struct #define OB_USER_ST_RAM_SIZE 0x0020U /*!< dedicated DTCM Ram size selection */ #define OB_USER_SECURITY 0x0040U /*!< security selection */ #define OB_USER_IOHSLV 0x0080U /*!< IO HSLV selection */ +#if defined (DUAL_BANK) #define OB_USER_SWAP_BANK 0x0100U /*!< Bank swap selection */ +#endif /* DUAL_BANK */ #if defined (FLASH_OPTSR_VDDMMC_HSLV) #define OB_USER_VDDMMC_HSLV 0x0200U /*!< VDDMMC HSLV selection */ #endif /* FLASH_OPTSR_VDDMMC_HSLV */ @@ -578,10 +630,43 @@ typedef struct #define OB_USER_IWDG2_SW 0x0200U /*!< Window watchdog selection */ #define OB_USER_BCM4 0x0400U /*!< CM4 boot selection */ #define OB_USER_BCM7 0x0800U /*!< CM7 boot selection */ -#define OB_USER_NRST_STOP_D2 0x1000U /*!< Reset when entering Stop mode selection*/ -#define OB_USER_NRST_STDBY_D2 0x2000U /*!< Reset when entering standby mode selection*/ #endif /*DUAL_CORE*/ +#if defined (FLASH_OPTSR_NRST_STOP_D2) +#define OB_USER_NRST_STOP_D2 0x1000U /*!< Reset when entering Stop mode selection */ +#define OB_USER_NRST_STDBY_D2 0x2000U /*!< Reset when entering standby mode selection */ +#endif /* FLASH_OPTSR_NRST_STOP_D2 */ +#if defined (DUAL_CORE) +#define OB_USER_ALL (OB_USER_IWDG1_SW | OB_USER_NRST_STOP_D1 | OB_USER_NRST_STDBY_D1 |\ + OB_USER_IWDG_STOP | OB_USER_IWDG_STDBY | OB_USER_ST_RAM_SIZE |\ + OB_USER_SECURITY | OB_USER_IOHSLV | OB_USER_SWAP_BANK |\ + OB_USER_IWDG2_SW | OB_USER_BCM4 | OB_USER_BCM7 |\ + OB_USER_NRST_STOP_D2 | OB_USER_NRST_STDBY_D2) +#elif defined (FLASH_OPTSR_VDDMMC_HSLV) +#define OB_USER_ALL (OB_USER_IWDG1_SW | OB_USER_NRST_STOP_D1 | OB_USER_NRST_STDBY_D1 |\ + OB_USER_IWDG_STOP | OB_USER_IWDG_STDBY | OB_USER_ST_RAM_SIZE |\ + OB_USER_SECURITY | OB_USER_IOHSLV | OB_USER_SWAP_BANK |\ + OB_USER_VDDMMC_HSLV) +#elif defined (FLASH_OPTSR2_TCM_AXI_SHARED) +#define OB_USER_ALL (OB_USER_IWDG1_SW | OB_USER_NRST_STOP_D1 | OB_USER_NRST_STDBY_D1 |\ + OB_USER_IWDG_STOP | OB_USER_IWDG_STDBY | OB_USER_ST_RAM_SIZE |\ + OB_USER_SECURITY | OB_USER_IOHSLV |\ + OB_USER_NRST_STOP_D2 | OB_USER_NRST_STDBY_D2) +#else +#define OB_USER_ALL (OB_USER_IWDG1_SW | OB_USER_NRST_STOP_D1 | OB_USER_NRST_STDBY_D1 |\ + OB_USER_IWDG_STOP | OB_USER_IWDG_STDBY | OB_USER_ST_RAM_SIZE |\ + OB_USER_SECURITY | OB_USER_IOHSLV | OB_USER_SWAP_BANK ) +#endif /* DUAL_CORE */ +/** + * @} + */ + +/** @defgroup FLASHEx_OB_BOOT_OPTION FLASHEx OB BOOT OPTION + * @{ + */ +#define OB_BOOT_ADD0 0x01U /*!< Select Boot Address 0 */ +#define OB_BOOT_ADD1 0x02U /*!< Select Boot Address 1 */ +#define OB_BOOT_ADD_BOTH 0x03U /*!< Select Boot Address 0 and 1 */ /** * @} */ @@ -678,9 +763,13 @@ typedef struct * @param __BANK__: Flash bank (FLASH_BANK_1 or FLASH_BANK_2) * @retval none */ +#if defined (DUAL_BANK) #define __HAL_FLASH_SET_PSIZE(__PSIZE__, __BANK__) (((__BANK__) == FLASH_BANK_1) ? \ MODIFY_REG(FLASH->CR1, FLASH_CR_PSIZE, (__PSIZE__)) : \ MODIFY_REG(FLASH->CR2, FLASH_CR_PSIZE, (__PSIZE__))) +#else +#define __HAL_FLASH_SET_PSIZE(__PSIZE__, __BANK__) MODIFY_REG(FLASH->CR1, FLASH_CR_PSIZE, (__PSIZE__)) +#endif /* DUAL_BANK */ /** * @brief Get the FLASH Program/Erase parallelism. @@ -688,9 +777,14 @@ typedef struct * @retval FLASH Program/Erase parallelism * This return value can be a value of @ref FLASH_Program_Parallelism */ +#if defined (DUAL_BANK) #define __HAL_FLASH_GET_PSIZE(__BANK__) (((__BANK__) == FLASH_BANK_1) ? \ READ_BIT((FLASH->CR1), FLASH_CR_PSIZE) : \ READ_BIT((FLASH->CR2), FLASH_CR_PSIZE)) +#else +#define __HAL_FLASH_GET_PSIZE(__BANK__) READ_BIT((FLASH->CR1), FLASH_CR_PSIZE) +#endif /* DUAL_BANK */ + #endif /* FLASH_CR_PSIZE */ /** @@ -724,8 +818,10 @@ void HAL_FLASHEx_OBGetConfig(FLASH_OBProgramInitTypeDef *pOBInit); HAL_StatusTypeDef HAL_FLASHEx_Unlock_Bank1(void); HAL_StatusTypeDef HAL_FLASHEx_Lock_Bank1(void); +#if defined (DUAL_BANK) HAL_StatusTypeDef HAL_FLASHEx_Unlock_Bank2(void); HAL_StatusTypeDef HAL_FLASHEx_Lock_Bank2(void); +#endif /* DUAL_BANK */ HAL_StatusTypeDef HAL_FLASHEx_ComputeCRC(FLASH_CRCInitTypeDef *pCRCInit, uint32_t *CRC_Result); @@ -761,13 +857,8 @@ HAL_StatusTypeDef HAL_FLASHEx_ComputeCRC(FLASH_CRCInitTypeDef *pCRCInit, uint32_ #define IS_WRPSTATE(VALUE) (((VALUE) == OB_WRPSTATE_DISABLE) || \ ((VALUE) == OB_WRPSTATE_ENABLE)) -#if defined (FLASH_OPTSR_VDDMMC_HSLV) -#define IS_OPTIONBYTE(VALUE) (((VALUE) <= 0x03FFU) && ((VALUE) != 0U)) -#elif defined (DUAL_CORE) -#define IS_OPTIONBYTE(VALUE) (((VALUE) <= 0x3FFFU) && ((VALUE) != 0U)) -#else -#define IS_OPTIONBYTE(VALUE) (((VALUE) <= 0x01FFU) && ((VALUE) != 0U)) -#endif /*DUAL_CORE*/ +#define IS_OPTIONBYTE(VALUE) ((((VALUE) & OPTIONBYTE_ALL) != 0U) && \ + (((VALUE) & ~OPTIONBYTE_ALL) == 0U)) #define IS_OB_BOOT_ADDRESS(ADDRESS) ((ADDRESS) <= 0x8013U) @@ -850,16 +941,25 @@ HAL_StatusTypeDef HAL_FLASHEx_ComputeCRC(FLASH_CRCInitTypeDef *pCRCInit, uint32_ #define IS_OB_USER_BCM4(VALUE) (((VALUE) == OB_BCM4_DISABLE) || ((VALUE) == OB_BCM4_ENABLE)) #define IS_OB_USER_BCM7(VALUE) (((VALUE) == OB_BCM7_DISABLE) || ((VALUE) == OB_BCM7_ENABLE)) +#endif /* DUAL_CORE */ +#if defined (FLASH_OPTSR_NRST_STOP_D2) #define IS_OB_STOP_D2_RESET(VALUE) (((VALUE) == OB_STOP_NO_RST_D2) || ((VALUE) == OB_STOP_RST_D2)) #define IS_OB_STDBY_D2_RESET(VALUE) (((VALUE) == OB_STDBY_NO_RST_D2) || ((VALUE) == OB_STDBY_RST_D2)) -#endif /* DUAL_CORE */ -#if defined (DUAL_CORE) -#define IS_OB_USER_TYPE(TYPE) (((TYPE) <= (uint32_t)0x3FFFU) && ((TYPE) != 0U)) -#else -#define IS_OB_USER_TYPE(TYPE) (((TYPE) <= (uint32_t)0x73FU) && ((TYPE) != 0U)) -#endif /* DUAL_CORE */ +#endif /* FLASH_OPTSR_NRST_STOP_D2 */ + +#if defined (FLASH_OPTSR2_TCM_AXI_SHARED) +#define IS_OB_USER_TCM_AXI_SHARED(VALUE) (((VALUE) == OB_TCM_AXI_SHARED_ITCM64KB) || ((VALUE) == OB_TCM_AXI_SHARED_ITCM128KB) || \ + ((VALUE) == OB_TCM_AXI_SHARED_ITCM192KB) || ((VALUE) == OB_TCM_AXI_SHARED_ITCM256KB)) +#endif /* FLASH_OPTSR2_TCM_AXI_SHARED */ + +#if defined (FLASH_OPTSR2_CPUFREQ_BOOST) +#define IS_OB_USER_CPUFREQ_BOOST(VALUE) (((VALUE) == OB_CPUFREQ_BOOST_DISABLE) || ((VALUE) == OB_CPUFREQ_BOOST_ENABLE)) +#endif /* FLASH_OPTSR2_CPUFREQ_BOOST */ + +#define IS_OB_USER_TYPE(TYPE) ((((TYPE) & OB_USER_ALL) != 0U) && \ + (((TYPE) & ~OB_USER_ALL) == 0U)) #define IS_OB_BOOT_ADD_OPTION(VALUE) (((VALUE) == OB_BOOT_ADD0) || \ ((VALUE) == OB_BOOT_ADD1) || \ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_fmac.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_fmac.h new file mode 100644 index 0000000..8eb9941 --- /dev/null +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_fmac.h @@ -0,0 +1,696 @@ +/** + ****************************************************************************** + * @file stm32h7xx_hal_fmac.h + * @author MCD Application Team + * @brief This file contains all the functions prototypes for the FMAC firmware + * library. + ****************************************************************************** + * @attention + * + *

                  © Copyright (c) 2017 STMicroelectronics. + * All rights reserved.

                  + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32H7xx_HAL_FMAC_H +#define STM32H7xx_HAL_FMAC_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32h7xx_hal_def.h" + +#if defined(FMAC) +/** @addtogroup STM32H7xx_HAL_Driver + * @{ + */ + +/** @addtogroup FMAC + * @{ + */ + +/* Exported types ------------------------------------------------------------*/ +/** @defgroup FMAC_Exported_Types FMAC Exported Types + * @{ + */ + +/** + * @brief FMAC HAL State Structure definition + */ +typedef enum +{ + HAL_FMAC_STATE_RESET = 0x00U, /*!< FMAC not yet initialized or disabled */ + HAL_FMAC_STATE_READY = 0x20U, /*!< FMAC initialized and ready for use */ + HAL_FMAC_STATE_BUSY = 0x24U, /*!< FMAC internal process is ongoing */ + HAL_FMAC_STATE_BUSY_RD = 0x25U, /*!< FMAC reading configuration is ongoing */ + HAL_FMAC_STATE_BUSY_WR = 0x26U, /*!< FMAC writing configuration is ongoing */ + HAL_FMAC_STATE_TIMEOUT = 0xA0U, /*!< FMAC in Timeout state */ + HAL_FMAC_STATE_ERROR = 0xE0U /*!< FMAC in Error state */ +} HAL_FMAC_StateTypeDef; + +/** + * @brief FMAC Handle Structure definition + */ +#if (USE_HAL_FMAC_REGISTER_CALLBACKS == 1) +typedef struct __FMAC_HandleTypeDef +#else +typedef struct +#endif /* USE_HAL_FMAC_REGISTER_CALLBACKS */ +{ + FMAC_TypeDef *Instance; /*!< Register base address */ + + uint32_t FilterParam; /*!< Filter configuration (operation and parameters). + Set to 0 if no valid configuration was applied. */ + + uint8_t InputAccess; /*!< Access to the input buffer (internal memory area): DMA, IT, Polling, None. + This parameter can be a value of @ref FMAC_Buffer_Access. */ + + uint8_t OutputAccess; /*!< Access to the output buffer (internal memory area): DMA, IT, Polling, None. + This parameter can be a value of @ref FMAC_Buffer_Access. */ + + int16_t *pInput; /*!< Pointer to FMAC input data buffer */ + + uint16_t InputCurrentSize; /*!< Number of the input elements already written into FMAC */ + + uint16_t *pInputSize; /*!< Number of input elements to write (memory allocated to pInput). + In case of early interruption of the filter operation, its value will be updated. */ + + int16_t *pOutput; /*!< Pointer to FMAC output data buffer */ + + uint16_t OutputCurrentSize; /*!< Number of the output elements already read from FMAC */ + + uint16_t *pOutputSize; /*!< Number of output elements to read (memory allocated to pOutput). + In case of early interruption of the filter operation, its value will be updated. */ + + DMA_HandleTypeDef *hdmaIn; /*!< FMAC peripheral input data DMA handle parameters */ + + DMA_HandleTypeDef *hdmaOut; /*!< FMAC peripheral output data DMA handle parameters */ + + DMA_HandleTypeDef *hdmaPreload; /*!< FMAC peripheral preloaded data (X1, X2 and Y) DMA handle parameters */ + +#if (USE_HAL_FMAC_REGISTER_CALLBACKS == 1) + void (* ErrorCallback)(struct __FMAC_HandleTypeDef *hfmac); /*!< FMAC error callback */ + + void (* HalfGetDataCallback)(struct __FMAC_HandleTypeDef *hfmac); /*!< FMAC get half data callback */ + + void (* GetDataCallback)(struct __FMAC_HandleTypeDef *hfmac); /*!< FMAC get data callback */ + + void (* HalfOutputDataReadyCallback)(struct __FMAC_HandleTypeDef *hfmac); /*!< FMAC half output data ready callback */ + + void (* OutputDataReadyCallback)(struct __FMAC_HandleTypeDef *hfmac); /*!< FMAC output data ready callback */ + + void (* FilterConfigCallback)(struct __FMAC_HandleTypeDef *hfmac); /*!< FMAC filter configuration callback */ + + void (* FilterPreloadCallback)(struct __FMAC_HandleTypeDef *hfmac); /*!< FMAC filter preload callback */ + + void (* MspInitCallback)(struct __FMAC_HandleTypeDef *hfmac); /*!< FMAC Msp Init callback */ + + void (* MspDeInitCallback)(struct __FMAC_HandleTypeDef *hfmac); /*!< FMAC Msp DeInit callback */ + +#endif /* (USE_HAL_FMAC_REGISTER_CALLBACKS) */ + + HAL_LockTypeDef Lock; /*!< FMAC locking object */ + + __IO HAL_FMAC_StateTypeDef State; /*!< FMAC state related to global handle management + This parameter can be a value of @ref HAL_FMAC_StateTypeDef */ + + __IO HAL_FMAC_StateTypeDef RdState; /*!< FMAC state related to read operations (access to Y buffer) + This parameter can be a value of @ref HAL_FMAC_StateTypeDef */ + + __IO HAL_FMAC_StateTypeDef WrState; /*!< FMAC state related to write operations (access to X1 buffer) + This parameter can be a value of @ref HAL_FMAC_StateTypeDef */ + + __IO uint32_t ErrorCode; /*!< FMAC peripheral error code + This parameter can be a value of @ref FMAC_Error_Code */ + +} FMAC_HandleTypeDef; + +#if (USE_HAL_FMAC_REGISTER_CALLBACKS == 1) +/** + * @brief FMAC Callback ID structure definition + */ +typedef enum +{ + HAL_FMAC_ERROR_CB_ID = 0x00U, /*!< FMAC error callback ID */ + HAL_FMAC_HALF_GET_DATA_CB_ID = 0x01U, /*!< FMAC get half data callback ID */ + HAL_FMAC_GET_DATA_CB_ID = 0x02U, /*!< FMAC get data callback ID */ + HAL_FMAC_HALF_OUTPUT_DATA_READY_CB_ID = 0x03U, /*!< FMAC half output data ready callback ID */ + HAL_FMAC_OUTPUT_DATA_READY_CB_ID = 0x04U, /*!< FMAC output data ready callback ID */ + HAL_FMAC_FILTER_CONFIG_CB_ID = 0x05U, /*!< FMAC filter configuration callback ID */ + HAL_FMAC_FILTER_PRELOAD_CB_ID = 0x06U, /*!< FMAC filter preload callback ID */ + + HAL_FMAC_MSPINIT_CB_ID = 0x07U, /*!< FMAC MspInit callback ID */ + HAL_FMAC_MSPDEINIT_CB_ID = 0x08U, /*!< FMAC MspDeInit callback ID */ +} HAL_FMAC_CallbackIDTypeDef; + +/** + * @brief HAL FMAC Callback pointer definition + */ +typedef void (*pFMAC_CallbackTypeDef)(FMAC_HandleTypeDef *hfmac); /*!< pointer to an FMAC callback function */ + +#endif /* USE_HAL_FMAC_REGISTER_CALLBACKS */ + +/** + * @brief FMAC Filter Configuration Structure definition + */ +typedef struct +{ + uint8_t InputBaseAddress; /*!< Base address of the input buffer (X1) within the internal memory (0x00 to 0xFF). + Ignored if InputBufferSize is set to 0 (previous configuration kept). + NB: the buffers can overlap or even coincide exactly. */ + + uint8_t InputBufferSize; /*!< Number of 16-bit addresses allocated to the input buffer (including the optional "headroom"). + 0 if a previous configuration should be kept. */ + + uint32_t InputThreshold; /*!< Input threshold: the buffer full flag will be set if the number of free spaces + in the buffer is inferior to this threshold. + This parameter can be a value of @ref FMAC_Data_Buffer_Threshold. */ + + uint8_t CoeffBaseAddress; /*!< Base address of the coefficient buffer (X2) within the internal memory (0x00 to 0xFF). + Ignored if CoeffBufferSize is set to 0 (previous configuration kept). + NB: the buffers can overlap or even coincide exactly. */ + + uint8_t CoeffBufferSize; /*!< Number of 16-bit addresses allocated to the coefficient buffer. + 0 if a previous configuration should be kept. */ + + uint8_t OutputBaseAddress; /*!< Base address of the output buffer (Y) within the internal memory (0x00 to 0xFF). + Ignored if OuputBufferSize is set to 0 (previous configuration kept). + NB: the buffers can overlap or even coincide exactly. */ + + uint8_t OutputBufferSize; /*!< Number of 16-bit addresses allocated to the output buffer (including the optional "headroom"). + 0 if a previous configuration should be kept. */ + + uint32_t OutputThreshold; /*!< Output threshold: the buffer empty flag will be set if the number of unread values + in the buffer is inferior to this threshold. + This parameter can be a value of @ref FMAC_Data_Buffer_Threshold. */ + + int16_t *pCoeffA; /*!< [IIR only] Initialization of the coefficient vector A. + If not needed, it should be set to NULL. */ + + uint8_t CoeffASize; /*!< Size of the coefficient vector A. */ + + int16_t *pCoeffB; /*!< Initialization of the coefficient vector B. + If not needed (re-use of a previously loaded buffer), it should be set to NULL. */ + + uint8_t CoeffBSize; /*!< Size of the coefficient vector B. */ + + uint8_t InputAccess; /*!< Access to the input buffer (internal memory area): DMT, IT, Polling, None. + This parameter can be a value of @ref FMAC_Buffer_Access. */ + + uint8_t OutputAccess; /*!< Access to the output buffer (internal memory area): DMA, IT, Polling, None. + This parameter can be a value of @ref FMAC_Buffer_Access. */ + + uint32_t Clip; /*!< Enable or disable the clipping feature (wrapping when the q1.15 range is exceeded). + This parameter can be a value of @ref FMAC_Clip_State. */ + + uint32_t Filter; /*!< Filter type. + This parameter can be a value of @ref FMAC_Functions (filter related values). */ + + uint8_t P; /*!< Parameter P (vector length, number of filter taps, etc.). */ + + uint8_t Q; /*!< Parameter Q (vector length, etc.). Ignored if not needed. */ + + uint8_t R; /*!< Parameter R (gain, etc.). Ignored if not needed. */ + +} FMAC_FilterConfigTypeDef; + +/** + * @} + */ + + +/* Exported constants --------------------------------------------------------*/ + + +/** @defgroup FMAC_Exported_Constants FMAC Exported Constants + * @{ + */ + +/** @defgroup FMAC_Error_Code FMAC Error code + * @{ + */ +#define HAL_FMAC_ERROR_NONE 0x00000000UL /*!< No error */ +#define HAL_FMAC_ERROR_SAT 0x00000001UL /*!< Saturation error */ +#define HAL_FMAC_ERROR_UNFL 0x00000002UL /*!< Underflow error */ +#define HAL_FMAC_ERROR_OVFL 0x00000004UL /*!< Overflow error */ +#define HAL_FMAC_ERROR_DMA 0x00000008UL /*!< DMA error */ +#define HAL_FMAC_ERROR_RESET 0x00000010UL /*!< Reset error */ +#define HAL_FMAC_ERROR_PARAM 0x00000020UL /*!< Parameter error */ +#if (USE_HAL_FMAC_REGISTER_CALLBACKS == 1) +#define HAL_FMAC_ERROR_INVALID_CALLBACK 0x00000040UL /*!< Invalid Callback error */ +#endif /* USE_HAL_FMAC_REGISTER_CALLBACKS */ +#define HAL_FMAC_ERROR_TIMEOUT 0x00000080UL /*!< Timeout error */ + +/** + * @} + */ + +/** @defgroup FMAC_Functions FMAC Functions + * @{ + */ +#define FMAC_FUNC_LOAD_X1 ((uint32_t)(FMAC_PARAM_FUNC_0)) /*!< Load X1 buffer */ +#define FMAC_FUNC_LOAD_X2 ((uint32_t)(FMAC_PARAM_FUNC_1)) /*!< Load X2 buffer */ +#define FMAC_FUNC_LOAD_Y ((uint32_t)(FMAC_PARAM_FUNC_1 | FMAC_PARAM_FUNC_0)) /*!< Load Y buffer */ +#define FMAC_FUNC_CONVO_FIR ((uint32_t)(FMAC_PARAM_FUNC_3)) /*!< Convolution (FIR filter) */ +#define FMAC_FUNC_IIR_DIRECT_FORM_1 ((uint32_t)(FMAC_PARAM_FUNC_3 | FMAC_PARAM_FUNC_0)) /*!< IIR filter (direct form 1) */ +/** + * @} + */ + +/** @defgroup FMAC_Data_Buffer_Threshold FMAC Data Buffer Threshold + * @{ + * @note This parameter sets a watermark for buffer full (input) or buffer empty (output). + */ +#define FMAC_THRESHOLD_1 0x00000000UL /*!< Input: Buffer full flag set if the number of free spaces in the buffer is less than 1. + Output: Buffer empty flag set if the number of unread values in the buffer is less than 1. */ +#define FMAC_THRESHOLD_2 0x01000000UL /*!< Input: Buffer full flag set if the number of free spaces in the buffer is less than 2. + Output: Buffer empty flag set if the number of unread values in the buffer is less than 2. */ +#define FMAC_THRESHOLD_4 0x02000000UL /*!< Input: Buffer full flag set if the number of free spaces in the buffer is less than 4. + Output: Buffer empty flag set if the number of unread values in the buffer is less than 4. */ +#define FMAC_THRESHOLD_8 0x03000000UL /*!< Input: Buffer full flag set if the number of free spaces in the buffer is less than 8. + Output: Buffer empty flag set if the number of unread values in the buffer is less than 8. */ +#define FMAC_THRESHOLD_NO_VALUE 0xFFFFFFFFUL /*!< The configured threshold value shouldn't be changed */ +/** + * @} + */ + +/** @defgroup FMAC_Buffer_Access FMAC Buffer Access + * @{ + */ +#define FMAC_BUFFER_ACCESS_NONE 0x00U /*!< Buffer handled by an external IP (ADC for instance) */ +#define FMAC_BUFFER_ACCESS_DMA 0x01U /*!< Buffer accessed through the FMAC DMA */ +#define FMAC_BUFFER_ACCESS_POLLING 0x02U /*!< Buffer accessed through polling */ +#define FMAC_BUFFER_ACCESS_IT 0x03U /*!< Buffer accessed through interruptions */ +/** + * @} + */ + +/** @defgroup FMAC_Clip_State FMAC Clip State + * @{ + */ +#define FMAC_CLIP_DISABLED 0x00000000UL /*!< Clipping disabled */ +#define FMAC_CLIP_ENABLED FMAC_CR_CLIPEN /*!< Clipping enabled */ +/** + * @} + */ + +/** @defgroup FMAC_Flags FMAC status flags + * @{ + */ +#define FMAC_FLAG_YEMPTY FMAC_SR_YEMPTY /*!< Y Buffer Empty Flag */ +#define FMAC_FLAG_X1FULL FMAC_SR_X1FULL /*!< X1 Buffer Full Flag */ +#define FMAC_FLAG_OVFL FMAC_SR_OVFL /*!< Overflow Error Flag */ +#define FMAC_FLAG_UNFL FMAC_SR_UNFL /*!< Underflow Error Flag */ +#define FMAC_FLAG_SAT FMAC_SR_SAT /*!< Saturation Error Flag (this helps in debugging a filter) */ +/** + * @} + */ + +/** @defgroup FMAC_Interrupts_Enable FMAC Interrupts Enable bit + * @{ + */ +#define FMAC_IT_RIEN FMAC_CR_RIEN /*!< Read Interrupt Enable */ +#define FMAC_IT_WIEN FMAC_CR_WIEN /*!< Write Interrupt Enable */ +#define FMAC_IT_OVFLIEN FMAC_CR_OVFLIEN /*!< Overflow Error Interrupt Enable */ +#define FMAC_IT_UNFLIEN FMAC_CR_UNFLIEN /*!< Underflow Error Interrupt Enable */ +#define FMAC_IT_SATIEN FMAC_CR_SATIEN /*!< Saturation Error Interrupt Enable (this helps in debugging a filter) */ +/** + * @} + */ + +/** @defgroup FMAC_DMAR DMA Read Request Enable bit + * @{ + */ +#define FMAC_DMA_REN FMAC_CR_DMAREN /*!< DMA Read Requests Enable */ +/** + * @} + */ + +/** @defgroup FMAC_DMAW DMA Write Request Enable bit + * @{ + */ +#define FMAC_DMA_WEN FMAC_CR_DMAWEN /*!< DMA Write Channel Enable */ +/** + * @} + */ + +/** @defgroup FMAC_DMAS DMA START bit + * @{ + */ +#define FMAC_START FMAC_PARAM_START /*!< DMA Start */ +/** + * @} + */ + +/** @defgroup FMAC_TimeOut_Value FMAC polling-based communications time-out value + * @{ + */ +#define HAL_FMAC_TIMEOUT_VALUE 1000UL /*!< FMAC polling-based communications time-out value */ +/** + * @} + */ + +/** @defgroup FMAC_Reset_TimeOut_Value FMAC reset time-out value + * @{ + */ +#define HAL_FMAC_RESET_TIMEOUT_VALUE 500UL /*!< FMAC reset time-out value */ +/** + * @} + */ + +/** + * @} + */ + + +/* Exported macro ------------------------------------------------------------*/ +/** @defgroup FMAC_Exported_Macros FMAC Exported Macros + * @{ + */ + +/** @brief Reset FMAC handle state. + * @param __HANDLE__ FMAC handle. + * @retval None + */ +#if (USE_HAL_FMAC_REGISTER_CALLBACKS == 1) +#define __HAL_FMAC_RESET_HANDLE_STATE(__HANDLE__) do{ \ + (__HANDLE__)->State = HAL_FMAC_STATE_RESET; \ + (__HANDLE__)->MspInitCallback = NULL; \ + (__HANDLE__)->MspDeInitCallback = NULL; \ + } while(0U) +#else +#define __HAL_FMAC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_FMAC_STATE_RESET) +#endif /* USE_HAL_FMAC_REGISTER_CALLBACKS */ + +/** + * @brief Enable the FMAC interrupt when result is ready + * @param __HANDLE__ FMAC handle. + * @param __INTERRUPT__ FMAC Interrupt. + * This parameter can be one of the following values: + * @arg @ref FMAC_IT_RIEN Read interrupt enable + * @arg @ref FMAC_IT_WIEN Write interrupt enable + * @arg @ref FMAC_IT_OVFLIEN Overflow error interrupt enable + * @arg @ref FMAC_IT_UNFLIEN Underflow error interrupt enable + * @arg @ref FMAC_IT_SATIEN Saturation error interrupt enable (this helps in debugging a filter) + * @retval None + */ +#define __HAL_FMAC_ENABLE_IT(__HANDLE__, __INTERRUPT__) \ + (((__HANDLE__)->Instance->CR) |= (__INTERRUPT__)) + +/** + * @brief Disable the FMAC interrupt + * @param __HANDLE__ FMAC handle. + * @param __INTERRUPT__ FMAC Interrupt. + * This parameter can be one of the following values: + * @arg @ref FMAC_IT_RIEN Read interrupt enable + * @arg @ref FMAC_IT_WIEN Write interrupt enable + * @arg @ref FMAC_IT_OVFLIEN Overflow error interrupt enable + * @arg @ref FMAC_IT_UNFLIEN Underflow error interrupt enable + * @arg @ref FMAC_IT_SATIEN Saturation error interrupt enable (this helps in debugging a filter) + * @retval None + */ +#define __HAL_FMAC_DISABLE_IT(__HANDLE__, __INTERRUPT__) \ + (((__HANDLE__)->Instance->CR) &= ~(__INTERRUPT__)) + +/** @brief Check whether the specified FMAC interrupt occurred or not. + * @param __HANDLE__ FMAC handle. + * @param __INTERRUPT__ FMAC interrupt to check. + * This parameter can be one of the following values: + * @arg @ref FMAC_FLAG_YEMPTY Y Buffer Empty Flag + * @arg @ref FMAC_FLAG_X1FULL X1 Buffer Full Flag + * @arg @ref FMAC_FLAG_OVFL Overflow Error Flag + * @arg @ref FMAC_FLAG_UNFL Underflow Error Flag + * @arg @ref FMAC_FLAG_SAT Saturation Error Flag + * @retval SET (interrupt occurred) or RESET (interrupt did not occurred) + */ +#define __HAL_FMAC_GET_IT(__HANDLE__, __INTERRUPT__) \ + (((__HANDLE__)->Instance->SR) &= ~(__INTERRUPT__)) + +/** @brief Clear specified FMAC interrupt status. Dummy macro as the + interrupt status flags are read-only. + * @param __HANDLE__ FMAC handle. + * @param __INTERRUPT__ FMAC interrupt to clear. + * @retval None + */ +#define __HAL_FMAC_CLEAR_IT(__HANDLE__, __INTERRUPT__) /* Dummy macro */ + +/** @brief Check whether the specified FMAC status flag is set or not. + * @param __HANDLE__ FMAC handle. + * @param __FLAG__ FMAC flag to check. + * This parameter can be one of the following values: + * @arg @ref FMAC_FLAG_YEMPTY Y Buffer Empty Flag + * @arg @ref FMAC_FLAG_X1FULL X1 Buffer Full Flag + * @arg @ref FMAC_FLAG_OVFL Overflow Error Flag + * @arg @ref FMAC_FLAG_UNFL Underflow Error Flag + * @arg @ref FMAC_FLAG_SAT Saturation error Flag + * @retval SET (flag is set) or RESET (flag is reset) + */ +#define __HAL_FMAC_GET_FLAG(__HANDLE__, __FLAG__) \ + ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__)) + +/** @brief Clear specified FMAC status flag. Dummy macro as no + flag can be cleared. + * @param __HANDLE__ FMAC handle. + * @param __FLAG__ FMAC flag to clear. + * @retval None + */ +#define __HAL_FMAC_CLEAR_FLAG(__HANDLE__, __FLAG__) /* Dummy macro */ + +/** @brief Check whether the specified FMAC interrupt is enabled or not. + * @param __HANDLE__ FMAC handle. + * @param __INTERRUPT__ FMAC interrupt to check. + * This parameter can be one of the following values: + * @arg @ref FMAC_IT_RIEN Read interrupt enable + * @arg @ref FMAC_IT_WIEN Write interrupt enable + * @arg @ref FMAC_IT_OVFLIEN Overflow error interrupt enable + * @arg @ref FMAC_IT_UNFLIEN Underflow error interrupt enable + * @arg @ref FMAC_IT_SATIEN Saturation error interrupt enable (this helps in debugging a filter) + * @retval FlagStatus + */ +#define __HAL_FMAC_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) \ + (((__HANDLE__)->Instance->CR) & (__INTERRUPT__)) + +/** + * @} + */ + +/* Private macros --------------------------------------------------------*/ +/** @addtogroup FMAC_Private_Macros + * @{ + */ + +/** + * @brief Verify the FMAC function. + * @param __FUNCTION__ ID of the function. + * @retval SET (__FUNCTION__ is a valid value) or RESET (__FUNCTION__ is invalid) + */ +#define IS_FMAC_FUNCTION(__FUNCTION__) (((__FUNCTION__) == FMAC_FUNC_LOAD_X1) || \ + ((__FUNCTION__) == FMAC_FUNC_LOAD_X2) || \ + ((__FUNCTION__) == FMAC_FUNC_LOAD_Y) || \ + ((__FUNCTION__) == FMAC_FUNC_CONVO_FIR) || \ + ((__FUNCTION__) == FMAC_FUNC_IIR_DIRECT_FORM_1)) + +/** + * @brief Verify the FMAC load function. + * @param __FUNCTION__ ID of the load function. + * @retval SET (__FUNCTION__ is a valid value) or RESET (__FUNCTION__ is invalid) + */ +#define IS_FMAC_LOAD_FUNCTION(__FUNCTION__) (((__FUNCTION__) == FMAC_FUNC_LOAD_X1) || \ + ((__FUNCTION__) == FMAC_FUNC_LOAD_X2) || \ + ((__FUNCTION__) == FMAC_FUNC_LOAD_Y)) + +/** + * @brief Verify the FMAC load function. + * @param __FUNCTION__ ID of the load function. + * @retval SET (__FUNCTION__ is a valid value) or RESET (__FUNCTION__ is invalid) + */ +#define IS_FMAC_N_LOAD_FUNCTION(__FUNCTION__) (((__FUNCTION__) == FMAC_FUNC_LOAD_X1) || \ + ((__FUNCTION__) == FMAC_FUNC_LOAD_Y)) + +/** + * @brief Verify the FMAC load function. + * @param __FUNCTION__ ID of the load function. + * @retval SET (__FUNCTION__ is a valid value) or RESET (__FUNCTION__ is invalid) + */ +#define IS_FMAC_N_M_LOAD_FUNCTION(__FUNCTION__) ((__FUNCTION__) == FMAC_FUNC_LOAD_X2) + +/** + * @brief Verify the FMAC filter function. + * @param __FUNCTION__ ID of the filter function. + * @retval SET (__FUNCTION__ is a valid value) or RESET (__FUNCTION__ is invalid) + */ +#define IS_FMAC_FILTER_FUNCTION(__FUNCTION__) (((__FUNCTION__) == FMAC_FUNC_CONVO_FIR) || \ + ((__FUNCTION__) == FMAC_FUNC_IIR_DIRECT_FORM_1)) + + +/** + * @brief Verify the FMAC threshold. + * @param __THRESHOLD__ Value of the threshold. + * @retval SET (__THRESHOLD__ is a valid value) or RESET (__THRESHOLD__ is invalid) + */ +#define IS_FMAC_THRESHOLD(__THRESHOLD__) (((__THRESHOLD__) == FMAC_THRESHOLD_1) || \ + ((__THRESHOLD__) == FMAC_THRESHOLD_2) || \ + ((__THRESHOLD__) == FMAC_THRESHOLD_4) || \ + ((__THRESHOLD__) == FMAC_THRESHOLD_NO_VALUE) || \ + ((__THRESHOLD__) == FMAC_THRESHOLD_8)) + +/** + * @brief Verify the FMAC filter parameter P. + * @param __P__ Value of the filter parameter P. + * @param __FUNCTION__ ID of the filter function. + * @retval SET (__P__ is a valid value) or RESET (__P__ is invalid) + */ +#define IS_FMAC_PARAM_P(__FUNCTION__, __P__) ( (((__FUNCTION__) == FMAC_FUNC_CONVO_FIR) && \ + (((__P__) >= 2U) && ((__P__) <= 127U))) || \ + (((__FUNCTION__) == FMAC_FUNC_IIR_DIRECT_FORM_1) && \ + (((__P__) >= 2U) && ((__P__) <= 64U))) ) + +/** + * @brief Verify the FMAC filter parameter Q. + * @param __Q__ Value of the filter parameter Q. + * @param __FUNCTION__ ID of the filter function. + * @retval SET (__Q__ is a valid value) or RESET (__Q__ is invalid) + */ +#define IS_FMAC_PARAM_Q(__FUNCTION__, __Q__) ( ((__FUNCTION__) == FMAC_FUNC_CONVO_FIR) || \ + (((__FUNCTION__) == FMAC_FUNC_IIR_DIRECT_FORM_1) && \ + (((__Q__) >= 1U) && ((__Q__) <= 63U))) ) + +/** + * @brief Verify the FMAC filter parameter R. + * @param __R__ Value of the filter parameter. + * @param __FUNCTION__ ID of the filter function. + * @retval SET (__R__ is a valid value) or RESET (__R__ is invalid) + */ +#define IS_FMAC_PARAM_R(__FUNCTION__, __R__) ( (((__FUNCTION__) == FMAC_FUNC_CONVO_FIR) || \ + ((__FUNCTION__) == FMAC_FUNC_IIR_DIRECT_FORM_1)) && \ + ((__R__) <= 7U)) + +/** + * @brief Verify the FMAC buffer access. + * @param __BUFFER_ACCESS__ Type of access. + * @retval SET (__BUFFER_ACCESS__ is a valid value) or RESET (__BUFFER_ACCESS__ is invalid) + */ +#define IS_FMAC_BUFFER_ACCESS(__BUFFER_ACCESS__) (((__BUFFER_ACCESS__) == FMAC_BUFFER_ACCESS_NONE) || \ + ((__BUFFER_ACCESS__) == FMAC_BUFFER_ACCESS_DMA) || \ + ((__BUFFER_ACCESS__) == FMAC_BUFFER_ACCESS_POLLING) || \ + ((__BUFFER_ACCESS__) == FMAC_BUFFER_ACCESS_IT)) + +/** + * @brief Verify the FMAC clip feature. + * @param __CLIP_STATE__ Clip state. + * @retval SET (__CLIP_STATE__ is a valid value) or RESET (__CLIP_STATE__ is invalid) + */ +#define IS_FMAC_CLIP_STATE(__CLIP_STATE__) (((__CLIP_STATE__) == FMAC_CLIP_DISABLED) || \ + ((__CLIP_STATE__) == FMAC_CLIP_ENABLED)) + +/** + * @} + */ + +/* Exported functions ------------------------------------------------------- */ +/** @addtogroup FMAC_Exported_Functions + * @{ + */ + +/** @addtogroup FMAC_Exported_Functions_Group1 + * @{ + */ +/* Initialization and de-initialization functions ****************************/ +HAL_StatusTypeDef HAL_FMAC_Init(FMAC_HandleTypeDef *hfmac); +HAL_StatusTypeDef HAL_FMAC_DeInit(FMAC_HandleTypeDef *hfmac); +void HAL_FMAC_MspInit(FMAC_HandleTypeDef *hfmac); +void HAL_FMAC_MspDeInit(FMAC_HandleTypeDef *hfmac); + +#if (USE_HAL_FMAC_REGISTER_CALLBACKS == 1) +/* Callbacks Register/UnRegister functions ***********************************/ +HAL_StatusTypeDef HAL_FMAC_RegisterCallback(FMAC_HandleTypeDef *hfmac, HAL_FMAC_CallbackIDTypeDef CallbackID, + pFMAC_CallbackTypeDef pCallback); +HAL_StatusTypeDef HAL_FMAC_UnRegisterCallback(FMAC_HandleTypeDef *hfmac, HAL_FMAC_CallbackIDTypeDef CallbackID); +#endif /* USE_HAL_FMAC_REGISTER_CALLBACKS */ +/** + * @} + */ + +/** @addtogroup FMAC_Exported_Functions_Group2 + * @{ + */ +/* Peripheral Control functions ***********************************************/ +HAL_StatusTypeDef HAL_FMAC_FilterConfig(FMAC_HandleTypeDef *hfmac, FMAC_FilterConfigTypeDef *sConfig); +HAL_StatusTypeDef HAL_FMAC_FilterConfig_DMA(FMAC_HandleTypeDef *hfmac, FMAC_FilterConfigTypeDef *sConfig); +HAL_StatusTypeDef HAL_FMAC_FilterPreload(FMAC_HandleTypeDef *hfmac, int16_t *pInput, uint8_t InputSize, + int16_t *pOutput, uint8_t OutputSize); +HAL_StatusTypeDef HAL_FMAC_FilterPreload_DMA(FMAC_HandleTypeDef *hfmac, int16_t *pInput, uint8_t InputSize, + int16_t *pOutput, uint8_t OutputSize); +HAL_StatusTypeDef HAL_FMAC_FilterStart(FMAC_HandleTypeDef *hfmac, int16_t *pOutput, uint16_t *pOutputSize); +HAL_StatusTypeDef HAL_FMAC_AppendFilterData(FMAC_HandleTypeDef *hfmac, int16_t *pInput, uint16_t *pInputSize); +HAL_StatusTypeDef HAL_FMAC_ConfigFilterOutputBuffer(FMAC_HandleTypeDef *hfmac, int16_t *pOutput, uint16_t *pOutputSize); +HAL_StatusTypeDef HAL_FMAC_PollFilterData(FMAC_HandleTypeDef *hfmac, uint32_t Timeout); +HAL_StatusTypeDef HAL_FMAC_FilterStop(FMAC_HandleTypeDef *hfmac); +/** + * @} + */ + +/** @addtogroup FMAC_Exported_Functions_Group3 + * @{ + */ +/* Callback functions *********************************************************/ +void HAL_FMAC_ErrorCallback(FMAC_HandleTypeDef *hfmac); +void HAL_FMAC_HalfGetDataCallback(FMAC_HandleTypeDef *hfmac); +void HAL_FMAC_GetDataCallback(FMAC_HandleTypeDef *hfmac); +void HAL_FMAC_HalfOutputDataReadyCallback(FMAC_HandleTypeDef *hfmac); +void HAL_FMAC_OutputDataReadyCallback(FMAC_HandleTypeDef *hfmac); +void HAL_FMAC_FilterConfigCallback(FMAC_HandleTypeDef *hfmac); +void HAL_FMAC_FilterPreloadCallback(FMAC_HandleTypeDef *hfmac); +/** + * @} + */ + +/** @addtogroup FMAC_Exported_Functions_Group4 + * @{ + */ +/* IRQ handler management *****************************************************/ +void HAL_FMAC_IRQHandler(FMAC_HandleTypeDef *hfmac); +/** + * @} + */ + +/** @addtogroup FMAC_Exported_Functions_Group5 + * @{ + */ +/* Peripheral State functions *************************************************/ +HAL_FMAC_StateTypeDef HAL_FMAC_GetState(FMAC_HandleTypeDef *hfmac); +uint32_t HAL_FMAC_GetError(FMAC_HandleTypeDef *hfmac); +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#endif /* FMAC */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32H7xx_HAL_FMAC_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_gpio_ex.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_gpio_ex.h index ff2efb3..14f576a 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_gpio_ex.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_gpio_ex.h @@ -77,6 +77,11 @@ extern "C" { #if defined(HRTIM1) #define GPIO_AF1_HRTIM1 ((uint8_t)0x01) /* HRTIM1 Alternate Function mapping */ #endif /* HRTIM1 */ +#if defined(SAI4) +#define GPIO_AF1_SAI4 ((uint8_t)0x01) /* SAI4 Alternate Function mapping : available on STM32H72xxx/STM32H73xxx */ +#endif /* SAI4 */ +#define GPIO_AF1_FMC ((uint8_t)0x01) /* FMC Alternate Function mapping : available on STM32H72xxx/STM32H73xxx */ + /** * @brief AF 2 selection @@ -89,7 +94,10 @@ extern "C" { #if defined(HRTIM1) #define GPIO_AF2_HRTIM1 ((uint8_t)0x02) /* HRTIM1 Alternate Function mapping */ #endif /* HRTIM1 */ -#define GPIO_AF2_TIM15 ((uint8_t)0x02) /* TIM15 Alternate Function mapping : available on STM32H7A3xxx/STM32H7B3xxx/STM32H7B0xxx */ +#define GPIO_AF2_TIM15 ((uint8_t)0x02) /* TIM15 Alternate Function mapping : available on STM32H7A3xxx/STM32H7B3xxx/STM32H7B0xxx and STM32H72xxx/STM32H73xxx */ +#if defined(FDCAN3) +#define GPIO_AF2_FDCAN3 ((uint8_t)0x02) /* FDCAN3 Alternate Function mapping */ +#endif /*FDCAN3*/ /** * @brief AF 3 selection @@ -108,6 +116,7 @@ extern "C" { #if defined(HRTIM1) #define GPIO_AF3_HRTIM1 ((uint8_t)0x03) /* HRTIM1 Alternate Function mapping */ #endif /* HRTIM1 */ +#define GPIO_AF3_LTDC ((uint8_t)0x03) /* LTDC Alternate Function mapping : available on STM32H72xxx/STM32H73xxx */ /** * @brief AF 4 selection @@ -116,17 +125,27 @@ extern "C" { #define GPIO_AF4_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */ #define GPIO_AF4_I2C3 ((uint8_t)0x04) /* I2C3 Alternate Function mapping */ #define GPIO_AF4_I2C4 ((uint8_t)0x04) /* I2C4 Alternate Function mapping */ +#if defined(I2C5) +#define GPIO_AF4_I2C5 ((uint8_t)0x04) /* I2C5 Alternate Function mapping */ +#endif /* I2C5*/ #define GPIO_AF4_TIM15 ((uint8_t)0x04) /* TIM15 Alternate Function mapping */ #define GPIO_AF4_CEC ((uint8_t)0x04) /* CEC Alternate Function mapping */ #define GPIO_AF4_LPTIM2 ((uint8_t)0x04) /* LPTIM2 Alternate Function mapping */ #define GPIO_AF4_USART1 ((uint8_t)0x04) /* USART1 Alternate Function mapping */ +#if defined(USART10) +#define GPIO_AF4_USART10 ((uint8_t)0x04) /* USART10 Alternate Function mapping : available on STM32H72xxx/STM32H73xxx */ +#endif /*USART10*/ #define GPIO_AF4_DFSDM1 ((uint8_t)0x04) /* DFSDM Alternate Function mapping */ #if defined(DFSDM2_BASE) #define GPIO_AF4_DFSDM2 ((uint8_t)0x04) /* DFSDM2 Alternate Function mapping */ #endif /* DFSDM2_BASE */ +#define GPIO_AF4_DCMI ((uint8_t)0x04) /* DCMI Alternate Function mapping : available on STM32H7A3xxx/STM32H7B3xxx/STM32H7B0xxx and STM32H72xxx/STM32H73xxx */ #if defined(PSSI) #define GPIO_AF4_PSSI ((uint8_t)0x04) /* PSSI Alternate Function mapping */ #endif /* PSSI */ +#if defined(OCTOSPIM) +#define GPIO_AF4_OCTOSPIM_P1 ((uint8_t)0x04) /* OCTOSPI Manager Port 1 Alternate Function mapping : available on STM32H72xxx/STM32H73xxx */ +#endif /* OCTOSPIM */ /** * @brief AF 5 selection @@ -138,6 +157,9 @@ extern "C" { #define GPIO_AF5_SPI5 ((uint8_t)0x05) /* SPI5 Alternate Function mapping */ #define GPIO_AF5_SPI6 ((uint8_t)0x05) /* SPI6 Alternate Function mapping */ #define GPIO_AF5_CEC ((uint8_t)0x05) /* CEC Alternate Function mapping */ +#if defined(FDCAN3) +#define GPIO_AF5_FDCAN3 ((uint8_t)0x05) /* FDCAN3 Alternate Function mapping */ +#endif /*FDCAN3*/ /** * @brief AF 6 selection @@ -146,6 +168,9 @@ extern "C" { #define GPIO_AF6_SPI3 ((uint8_t)0x06) /* SPI3 Alternate Function mapping */ #define GPIO_AF6_SAI1 ((uint8_t)0x06) /* SAI1 Alternate Function mapping */ #define GPIO_AF6_I2C4 ((uint8_t)0x06) /* I2C4 Alternate Function mapping */ +#if defined(I2C5) +#define GPIO_AF6_I2C5 ((uint8_t)0x06) /* I2C5 Alternate Function mapping */ +#endif /* I2C5*/ #define GPIO_AF6_DFSDM1 ((uint8_t)0x06) /* DFSDM Alternate Function mapping */ #define GPIO_AF6_UART4 ((uint8_t)0x06) /* UART4 Alternate Function mapping */ #if defined(DFSDM2_BASE) @@ -169,14 +194,15 @@ extern "C" { #define GPIO_AF7_USART3 ((uint8_t)0x07) /* USART3 Alternate Function mapping */ #define GPIO_AF7_USART6 ((uint8_t)0x07) /* USART6 Alternate Function mapping */ #define GPIO_AF7_UART7 ((uint8_t)0x07) /* UART7 Alternate Function mapping */ -#define GPIO_AF7_DFSDM1 ((uint8_t)0x07) /* DFSDM Alternate Function mapping */ #define GPIO_AF7_SDMMC1 ((uint8_t)0x07) /* SDMMC1 Alternate Function mapping */ /** * @brief AF 8 selection */ #define GPIO_AF8_SPI6 ((uint8_t)0x08) /* SPI6 Alternate Function mapping */ +#if defined(SAI2) #define GPIO_AF8_SAI2 ((uint8_t)0x08) /* SAI2 Alternate Function mapping */ +#endif /*SAI2*/ #define GPIO_AF8_UART4 ((uint8_t)0x08) /* UART4 Alternate Function mapping */ #define GPIO_AF8_UART5 ((uint8_t)0x08) /* UART5 Alternate Function mapping */ #define GPIO_AF8_UART8 ((uint8_t)0x08) /* UART8 Alternate Function mapping */ @@ -212,7 +238,9 @@ extern "C" { /** * @brief AF 10 selection */ +#if defined(SAI2) #define GPIO_AF10_SAI2 ((uint8_t)0x0A) /* SAI2 Alternate Function mapping */ +#endif /*SAI2*/ #define GPIO_AF10_SDMMC2 ((uint8_t)0x0A) /* SDMMC2 Alternate Function mapping */ #if defined(USB2_OTG_FS) #define GPIO_AF10_OTG2_FS ((uint8_t)0x0A) /* OTG2_FS Alternate Function mapping */ @@ -230,13 +258,14 @@ extern "C" { #define GPIO_AF10_SAI4 ((uint8_t)0x0A) /* SAI4 Alternate Function mapping */ #endif /* SAI4 */ #if !defined(USB2_OTG_FS) -#define GPIO_AF10_OTG1_FS ((uint8_t)0x0A) /* OTG1_FS Alternate Function mapping : available on STM32H7A3xxx/STM32H7B3xxx/STM32H7B0xxx */ +#define GPIO_AF10_OTG1_FS ((uint8_t)0x0A) /* OTG1_FS Alternate Function mapping : available on STM32H7A3xxx/STM32H7B3xxx/STM32H7B0xxx and STM32H72xxx/STM32H73xxx */ #endif /* !USB2_OTG_FS */ #define GPIO_AF10_OTG1_HS ((uint8_t)0x0A) /* OTG1_HS Alternate Function mapping */ #if defined(OCTOSPIM) #define GPIO_AF10_OCTOSPIM_P1 ((uint8_t)0x0A) /* OCTOSPI Manager Port 1 Alternate Function mapping */ #endif /* OCTOSPIM */ #define GPIO_AF10_TIM8 ((uint8_t)0x0A) /* TIM8 Alternate Function mapping */ +#define GPIO_AF10_FMC ((uint8_t)0x0A) /* FMC Alternate Function mapping : available on STM32H7A3xxx/STM32H7B3xxx/STM32H7B0xxx and STM32H72xxx/STM32H73xxx */ /** * @brief AF 11 selection @@ -264,7 +293,7 @@ extern "C" { #define GPIO_AF11_ETH ((uint8_t)0x0B) /* ETH Alternate Function mapping */ #endif /* ETH */ #if defined(LTDC) -#define GPIO_AF11_LTDC ((uint8_t)0x0B) /* LTDC Alternate Function mapping : available on STM32H7A3xxx/STM32H7B3xxx/STM32H7B0xxx */ +#define GPIO_AF11_LTDC ((uint8_t)0x0B) /* LTDC Alternate Function mapping : available on STM32H7A3xxx/STM32H7B3xxx/STM32H7B0xxx and STM32H72xxx/STM32H73xxx */ #endif /*LTDC*/ #if defined(OCTOSPIM) #define GPIO_AF11_OCTOSPIM_P1 ((uint8_t)0x0B) /* OCTOSPI Manager Port 1 Alternate Function mapping */ @@ -286,6 +315,9 @@ extern "C" { #if defined(USB2_OTG_FS) #define GPIO_AF12_OTG1_FS ((uint8_t)0x0C) /* OTG1_FS Alternate Function mapping */ #endif /* USB2_OTG_FS */ +#if defined(OCTOSPIM) +#define GPIO_AF12_OCTOSPIM_P1 ((uint8_t)0x0C) /* OCTOSPI Manager Port 1 Alternate Function mapping */ +#endif /* OCTOSPIM */ /** * @brief AF 13 selection @@ -303,12 +335,18 @@ extern "C" { #define GPIO_AF13_PSSI ((uint8_t)0x0D) /* PSSI Alternate Function mapping */ #endif /* PSSI */ #define GPIO_AF13_TIM1 ((uint8_t)0x0D) /* TIM1 Alternate Function mapping */ +#if defined(TIM23) +#define GPIO_AF13_TIM23 ((uint8_t)0x0D) /* TIM23 Alternate Function mapping */ +#endif /*TIM23*/ /** * @brief AF 14 selection */ #define GPIO_AF14_LTDC ((uint8_t)0x0E) /* LTDC Alternate Function mapping */ #define GPIO_AF14_UART5 ((uint8_t)0x0E) /* UART5 Alternate Function mapping */ +#if defined(TIM24) +#define GPIO_AF14_TIM24 ((uint8_t)0x0E) /* TIM24 Alternate Function mapping */ +#endif /*TIM24*/ /** * @brief AF 15 selection @@ -360,11 +398,21 @@ extern "C" { #define GPIOE_PIN_AVAILABLE GPIO_PIN_All #define GPIOF_PIN_AVAILABLE GPIO_PIN_All #define GPIOG_PIN_AVAILABLE GPIO_PIN_All +#if defined(GPIOI) #define GPIOI_PIN_AVAILABLE GPIO_PIN_All +#endif /*GPIOI*/ +#if defined(GPIOI) #define GPIOJ_PIN_AVAILABLE GPIO_PIN_All +#else +#define GPIOJ_PIN_AVAILABLE (GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11 ) +#endif /* GPIOI */ #define GPIOH_PIN_AVAILABLE GPIO_PIN_All +#if defined(GPIOI) #define GPIOK_PIN_AVAILABLE (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_4 | \ GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7) +#else +#define GPIOK_PIN_AVAILABLE (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 ) +#endif /* GPIOI */ /** * @} @@ -377,6 +425,7 @@ extern "C" { /** @defgroup GPIOEx_Get_Port_Index GPIO Get Port Index * @{ */ +#if defined(GPIOI) #define GPIO_GET_INDEX(__GPIOx__) (((__GPIOx__) == (GPIOA))? 0UL :\ ((__GPIOx__) == (GPIOB))? 1UL :\ ((__GPIOx__) == (GPIOC))? 2UL :\ @@ -387,6 +436,18 @@ extern "C" { ((__GPIOx__) == (GPIOH))? 7UL :\ ((__GPIOx__) == (GPIOI))? 8UL :\ ((__GPIOx__) == (GPIOJ))? 9UL : 10UL) +#else +#define GPIO_GET_INDEX(__GPIOx__) (((__GPIOx__) == (GPIOA))? 0UL :\ + ((__GPIOx__) == (GPIOB))? 1UL :\ + ((__GPIOx__) == (GPIOC))? 2UL :\ + ((__GPIOx__) == (GPIOD))? 3UL :\ + ((__GPIOx__) == (GPIOE))? 4UL :\ + ((__GPIOx__) == (GPIOF))? 5UL :\ + ((__GPIOx__) == (GPIOG))? 6UL :\ + ((__GPIOx__) == (GPIOH))? 7UL :\ + ((__GPIOx__) == (GPIOJ))? 9UL : 10UL) +#endif /* GPIOI */ + /** * @} */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_hcd.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_hcd.h index 765f989..fd67eb3 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_hcd.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_hcd.h @@ -109,8 +109,8 @@ typedef struct * @{ */ #define HCD_SPEED_HIGH USBH_HS_SPEED -#define HCD_SPEED_FULL USBH_FS_SPEED -#define HCD_SPEED_LOW USBH_LS_SPEED +#define HCD_SPEED_FULL USBH_FSLS_SPEED +#define HCD_SPEED_LOW USBH_FSLS_SPEED /** * @} @@ -170,19 +170,15 @@ typedef struct /** @defgroup HCD_Exported_Functions_Group1 Initialization and de-initialization functions * @{ */ -HAL_StatusTypeDef HAL_HCD_Init(HCD_HandleTypeDef *hhcd); -HAL_StatusTypeDef HAL_HCD_DeInit(HCD_HandleTypeDef *hhcd); -HAL_StatusTypeDef HAL_HCD_HC_Init(HCD_HandleTypeDef *hhcd, - uint8_t ch_num, - uint8_t epnum, - uint8_t dev_address, - uint8_t speed, - uint8_t ep_type, - uint16_t mps); +HAL_StatusTypeDef HAL_HCD_Init(HCD_HandleTypeDef *hhcd); +HAL_StatusTypeDef HAL_HCD_DeInit(HCD_HandleTypeDef *hhcd); +HAL_StatusTypeDef HAL_HCD_HC_Init(HCD_HandleTypeDef *hhcd, uint8_t ch_num, + uint8_t epnum, uint8_t dev_address, + uint8_t speed, uint8_t ep_type, uint16_t mps); -HAL_StatusTypeDef HAL_HCD_HC_Halt(HCD_HandleTypeDef *hhcd, uint8_t ch_num); -void HAL_HCD_MspInit(HCD_HandleTypeDef *hhcd); -void HAL_HCD_MspDeInit(HCD_HandleTypeDef *hhcd); +HAL_StatusTypeDef HAL_HCD_HC_Halt(HCD_HandleTypeDef *hhcd, uint8_t ch_num); +void HAL_HCD_MspInit(HCD_HandleTypeDef *hhcd); +void HAL_HCD_MspDeInit(HCD_HandleTypeDef *hhcd); #if (USE_HAL_HCD_REGISTER_CALLBACKS == 1U) /** @defgroup HAL_HCD_Callback_ID_enumeration_definition HAL USB OTG HCD Callback ID enumeration definition @@ -191,14 +187,14 @@ void HAL_HCD_MspDeInit(HCD_HandleTypeDef *hhcd); */ typedef enum { - HAL_HCD_SOF_CB_ID = 0x01, /*!< USB HCD SOF callback ID */ - HAL_HCD_CONNECT_CB_ID = 0x02, /*!< USB HCD Connect callback ID */ - HAL_HCD_DISCONNECT_CB_ID = 0x03, /*!< USB HCD Disconnect callback ID */ - HAL_HCD_PORT_ENABLED_CB_ID = 0x04, /*!< USB HCD Port Enable callback ID */ - HAL_HCD_PORT_DISABLED_CB_ID = 0x05, /*!< USB HCD Port Disable callback ID */ + HAL_HCD_SOF_CB_ID = 0x01, /*!< USB HCD SOF callback ID */ + HAL_HCD_CONNECT_CB_ID = 0x02, /*!< USB HCD Connect callback ID */ + HAL_HCD_DISCONNECT_CB_ID = 0x03, /*!< USB HCD Disconnect callback ID */ + HAL_HCD_PORT_ENABLED_CB_ID = 0x04, /*!< USB HCD Port Enable callback ID */ + HAL_HCD_PORT_DISABLED_CB_ID = 0x05, /*!< USB HCD Port Disable callback ID */ - HAL_HCD_MSPINIT_CB_ID = 0x06, /*!< USB HCD MspInit callback ID */ - HAL_HCD_MSPDEINIT_CB_ID = 0x07 /*!< USB HCD MspDeInit callback ID */ + HAL_HCD_MSPINIT_CB_ID = 0x06, /*!< USB HCD MspInit callback ID */ + HAL_HCD_MSPDEINIT_CB_ID = 0x07 /*!< USB HCD MspDeInit callback ID */ } HAL_HCD_CallbackIDTypeDef; /** @@ -232,25 +228,20 @@ HAL_StatusTypeDef HAL_HCD_UnRegisterHC_NotifyURBChangeCallback(HCD_HandleTypeDef /** @addtogroup HCD_Exported_Functions_Group2 Input and Output operation functions * @{ */ -HAL_StatusTypeDef HAL_HCD_HC_SubmitRequest(HCD_HandleTypeDef *hhcd, - uint8_t ch_num, - uint8_t direction, - uint8_t ep_type, - uint8_t token, - uint8_t *pbuff, - uint16_t length, - uint8_t do_ping); +HAL_StatusTypeDef HAL_HCD_HC_SubmitRequest(HCD_HandleTypeDef *hhcd, uint8_t ch_num, + uint8_t direction, uint8_t ep_type, + uint8_t token, uint8_t *pbuff, + uint16_t length, uint8_t do_ping); /* Non-Blocking mode: Interrupt */ -void HAL_HCD_IRQHandler(HCD_HandleTypeDef *hhcd); -void HAL_HCD_SOF_Callback(HCD_HandleTypeDef *hhcd); -void HAL_HCD_Connect_Callback(HCD_HandleTypeDef *hhcd); -void HAL_HCD_Disconnect_Callback(HCD_HandleTypeDef *hhcd); -void HAL_HCD_PortEnabled_Callback(HCD_HandleTypeDef *hhcd); -void HAL_HCD_PortDisabled_Callback(HCD_HandleTypeDef *hhcd); -void HAL_HCD_HC_NotifyURBChange_Callback(HCD_HandleTypeDef *hhcd, - uint8_t chnum, - HCD_URBStateTypeDef urb_state); +void HAL_HCD_IRQHandler(HCD_HandleTypeDef *hhcd); +void HAL_HCD_SOF_Callback(HCD_HandleTypeDef *hhcd); +void HAL_HCD_Connect_Callback(HCD_HandleTypeDef *hhcd); +void HAL_HCD_Disconnect_Callback(HCD_HandleTypeDef *hhcd); +void HAL_HCD_PortEnabled_Callback(HCD_HandleTypeDef *hhcd); +void HAL_HCD_PortDisabled_Callback(HCD_HandleTypeDef *hhcd); +void HAL_HCD_HC_NotifyURBChange_Callback(HCD_HandleTypeDef *hhcd, uint8_t chnum, + HCD_URBStateTypeDef urb_state); /** * @} */ @@ -259,9 +250,9 @@ void HAL_HCD_HC_NotifyURBChange_Callback(HCD_HandleTypeDef *hhcd, /** @addtogroup HCD_Exported_Functions_Group3 Peripheral Control functions * @{ */ -HAL_StatusTypeDef HAL_HCD_ResetPort(HCD_HandleTypeDef *hhcd); -HAL_StatusTypeDef HAL_HCD_Start(HCD_HandleTypeDef *hhcd); -HAL_StatusTypeDef HAL_HCD_Stop(HCD_HandleTypeDef *hhcd); +HAL_StatusTypeDef HAL_HCD_ResetPort(HCD_HandleTypeDef *hhcd); +HAL_StatusTypeDef HAL_HCD_Start(HCD_HandleTypeDef *hhcd); +HAL_StatusTypeDef HAL_HCD_Stop(HCD_HandleTypeDef *hhcd); /** * @} */ @@ -272,8 +263,8 @@ HAL_StatusTypeDef HAL_HCD_Stop(HCD_HandleTypeDef *hhcd); */ HCD_StateTypeDef HAL_HCD_GetState(HCD_HandleTypeDef *hhcd); HCD_URBStateTypeDef HAL_HCD_HC_GetURBState(HCD_HandleTypeDef *hhcd, uint8_t chnum); -uint32_t HAL_HCD_HC_GetXferCount(HCD_HandleTypeDef *hhcd, uint8_t chnum); HCD_HCStateTypeDef HAL_HCD_HC_GetState(HCD_HandleTypeDef *hhcd, uint8_t chnum); +uint32_t HAL_HCD_HC_GetXferCount(HCD_HandleTypeDef *hhcd, uint8_t chnum); uint32_t HAL_HCD_GetCurrentFrame(HCD_HandleTypeDef *hhcd); uint32_t HAL_HCD_GetCurrentSpeed(HCD_HandleTypeDef *hhcd); /** diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_i2c_ex.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_i2c_ex.h index bf89420..46fc375 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_i2c_ex.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_i2c_ex.h @@ -55,6 +55,7 @@ extern "C" { /** @defgroup I2CEx_FastModePlus I2C Extended Fast Mode Plus * @{ */ +#define I2C_FMP_NOT_SUPPORTED 0xAAAA0000U /*!< Fast Mode Plus not supported */ #define I2C_FASTMODEPLUS_PB6 SYSCFG_PMCR_I2C_PB6_FMP /*!< Enable Fast Mode Plus on PB6 */ #define I2C_FASTMODEPLUS_PB7 SYSCFG_PMCR_I2C_PB7_FMP /*!< Enable Fast Mode Plus on PB7 */ #define I2C_FASTMODEPLUS_PB8 SYSCFG_PMCR_I2C_PB8_FMP /*!< Enable Fast Mode Plus on PB8 */ @@ -63,6 +64,11 @@ extern "C" { #define I2C_FASTMODEPLUS_I2C2 SYSCFG_PMCR_I2C2_FMP /*!< Enable Fast Mode Plus on I2C2 pins */ #define I2C_FASTMODEPLUS_I2C3 SYSCFG_PMCR_I2C3_FMP /*!< Enable Fast Mode Plus on I2C3 pins */ #define I2C_FASTMODEPLUS_I2C4 SYSCFG_PMCR_I2C4_FMP /*!< Enable Fast Mode Plus on I2C4 pins */ +#if defined(SYSCFG_PMCR_I2C5_FMP) +#define I2C_FASTMODEPLUS_I2C5 SYSCFG_PMCR_I2C5_FMP /*!< Enable Fast Mode Plus on I2C5 pins */ +#else +#define I2C_FASTMODEPLUS_I2C5 (uint32_t)(0x00001000U | I2C_FMP_NOT_SUPPORTED) /*!< Fast Mode Plus I2C5 not supported */ +#endif /** * @} */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_i2s.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_i2s.h index de19b9f..3efa1fb 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_i2s.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_i2s.h @@ -65,7 +65,7 @@ typedef struct This parameter can be a value of @ref I2S_Clock_Polarity */ uint32_t FirstBit; /*!< Specifies whether data transfers start from MSB or LSB bit. - This parameter can be a value of @ref I2S_MSB_LSB_transmission */ + This parameter can be a value of @ref I2S_MSB_LSB_Transmission */ uint32_t WSInversion; /*!< Control the Word Select Inversion. This parameter can be a value of @ref I2S_WSInversion */ @@ -74,7 +74,7 @@ typedef struct This parameter can be a value of @ref I2S_Data_24Bit_Alignment */ uint32_t MasterKeepIOState; /*!< Control of Alternate function GPIOs state - This parameter can be a value of @ref SPI_Master_Keep_IO_State */ + This parameter can be a value of @ref I2S_Master_Keep_IO_State */ } I2S_InitTypeDef; @@ -88,6 +88,7 @@ typedef enum HAL_I2S_STATE_BUSY = 0x02UL, /*!< I2S internal process is ongoing */ HAL_I2S_STATE_BUSY_TX = 0x03UL, /*!< Data Transmission process is ongoing */ HAL_I2S_STATE_BUSY_RX = 0x04UL, /*!< Data Reception process is ongoing */ + HAL_I2S_STATE_BUSY_TX_RX = 0x05UL, /*!< Data Transmission and Reception process is ongoing */ HAL_I2S_STATE_TIMEOUT = 0x06UL, /*!< I2S timeout state */ HAL_I2S_STATE_ERROR = 0x07UL /*!< I2S error state */ } HAL_I2S_StateTypeDef; @@ -98,46 +99,48 @@ typedef enum typedef struct __I2S_HandleTypeDef { SPI_TypeDef *Instance; /*!< I2S registers base address */ - + I2S_InitTypeDef Init; /*!< I2S communication parameters */ - + uint16_t *pTxBuffPtr; /*!< Pointer to I2S Tx transfer buffer */ - + __IO uint16_t TxXferSize; /*!< I2S Tx transfer size */ - + __IO uint16_t TxXferCount; /*!< I2S Tx transfer Counter */ - + uint16_t *pRxBuffPtr; /*!< Pointer to I2S Rx transfer buffer */ - + __IO uint16_t RxXferSize; /*!< I2S Rx transfer size */ - + __IO uint16_t RxXferCount; /*!< I2S Rx transfer counter (This field is initialized at the same value as transfer size at the beginning of the transfer and decremented when a sample is received NbSamplesReceived = RxBufferSize-RxBufferCount) */ - + void (*RxISR)(struct __I2S_HandleTypeDef *hi2s); /*!< function pointer on Rx ISR */ void (*TxISR)(struct __I2S_HandleTypeDef *hi2s); /*!< function pointer on Tx ISR */ DMA_HandleTypeDef *hdmatx; /*!< I2S Tx DMA handle parameters */ - + DMA_HandleTypeDef *hdmarx; /*!< I2S Rx DMA handle parameters */ - + __IO HAL_LockTypeDef Lock; /*!< I2S locking object */ - + __IO HAL_I2S_StateTypeDef State; /*!< I2S communication state */ - + __IO uint32_t ErrorCode; /*!< I2S Error code This parameter can be a value of @ref I2S_Error */ #if (USE_HAL_I2S_REGISTER_CALLBACKS == 1U) void (* TxCpltCallback)(struct __I2S_HandleTypeDef *hi2s); /*!< I2S Tx Completed callback */ void (* RxCpltCallback)(struct __I2S_HandleTypeDef *hi2s); /*!< I2S Rx Completed callback */ + void (* TxRxCpltCallback)(struct __I2S_HandleTypeDef *hi2s); /*!< I2S TxRx Completed callback */ void (* TxHalfCpltCallback)(struct __I2S_HandleTypeDef *hi2s); /*!< I2S Tx Half Completed callback */ void (* RxHalfCpltCallback)(struct __I2S_HandleTypeDef *hi2s); /*!< I2S Rx Half Completed callback */ + void (* TxRxHalfCpltCallback)(struct __I2S_HandleTypeDef *hi2s); /*!< I2S TxRx Half Completed callback */ void (* ErrorCallback)(struct __I2S_HandleTypeDef *hi2s); /*!< I2S Error callback */ void (* MspInitCallback)(struct __I2S_HandleTypeDef *hi2s); /*!< I2S Msp Init callback */ void (* MspDeInitCallback)(struct __I2S_HandleTypeDef *hi2s); /*!< I2S Msp DeInit callback */ @@ -154,8 +157,10 @@ typedef enum { HAL_I2S_TX_COMPLETE_CB_ID = 0x00UL, /*!< I2S Tx Completed callback ID */ HAL_I2S_RX_COMPLETE_CB_ID = 0x01UL, /*!< I2S Rx Completed callback ID */ + HAL_I2S_TX_RX_COMPLETE_CB_ID = 0x02UL, /*!< I2S TxRx Completed callback ID */ HAL_I2S_TX_HALF_COMPLETE_CB_ID = 0x03UL, /*!< I2S Tx Half Completed callback ID */ HAL_I2S_RX_HALF_COMPLETE_CB_ID = 0x04UL, /*!< I2S Rx Half Completed callback ID */ + HAL_I2S_TX_RX_HALF_COMPLETE_CB_ID = 0x05UL, /*!< I2S TxRx Half Completed callback ID */ HAL_I2S_ERROR_CB_ID = 0x06UL, /*!< I2S Error callback ID */ HAL_I2S_MSPINIT_CB_ID = 0x07UL, /*!< I2S Msp Init callback ID */ HAL_I2S_MSPDEINIT_CB_ID = 0x08UL /*!< I2S Msp DeInit callback ID */ @@ -178,7 +183,7 @@ typedef void (*pI2S_CallbackTypeDef)(I2S_HandleTypeDef *hi2s); /*!< pointer to */ /** @defgroup I2S_Error I2S Error * @{ - */ + */ #define HAL_I2S_ERROR_NONE (0x00000000UL) /*!< No error */ #define HAL_I2S_ERROR_TIMEOUT (0x00000001UL) /*!< Timeout error */ #define HAL_I2S_ERROR_OVR (0x00000002UL) /*!< OVR error */ @@ -257,7 +262,7 @@ typedef void (*pI2S_CallbackTypeDef)(I2S_HandleTypeDef *hi2s); /*!< pointer to * @} */ -/** @defgroup I2S_FullDuplex_Mode I2S FullDuplex Mode +/** @defgroup I2S_Clock_Polarity I2S FullDuplex Mode * @{ */ #define I2S_CPOL_LOW (0x00000000UL) @@ -307,6 +312,7 @@ typedef void (*pI2S_CallbackTypeDef)(I2S_HandleTypeDef *hi2s); /*!< pointer to */ #define I2S_IT_RXP SPI_IER_RXPIE #define I2S_IT_TXP SPI_IER_TXPIE +#define I2S_IT_DXP SPI_IER_DXPIE #define I2S_IT_UDR SPI_IER_UDRIE #define I2S_IT_OVR SPI_IER_OVRIE #define I2S_IT_FRE SPI_IER_TIFREIE @@ -320,11 +326,12 @@ typedef void (*pI2S_CallbackTypeDef)(I2S_HandleTypeDef *hi2s); /*!< pointer to */ #define I2S_FLAG_RXP SPI_SR_RXP /* I2S status flag : Rx-Packet available flag */ #define I2S_FLAG_TXP SPI_SR_TXP /* I2S status flag : Tx-Packet space available flag */ +#define I2S_FLAG_DXP SPI_SR_DXP /* I2S status flag : Dx-Packet space available flag */ #define I2S_FLAG_UDR SPI_SR_UDR /* I2S Error flag : Underrun flag */ #define I2S_FLAG_OVR SPI_SR_OVR /* I2S Error flag : Overrun flag */ #define I2S_FLAG_FRE SPI_SR_TIFRE /* I2S Error flag : TI mode frame format error flag */ -#define I2S_FLAG_MASK (SPI_SR_RXP | SPI_SR_TXP | SPI_SR_UDR | SPI_SR_OVR | SPI_SR_TIFRE) +#define I2S_FLAG_MASK (SPI_SR_RXP | SPI_SR_TXP | SPI_SR_DXP |SPI_SR_UDR | SPI_SR_OVR | SPI_SR_TIFRE) /** * @} */ @@ -401,6 +408,7 @@ typedef void (*pI2S_CallbackTypeDef)(I2S_HandleTypeDef *hi2s); /*!< pointer to * This parameter can be one of the following values: * @arg I2S_IT_RXP : Rx-Packet available interrupt * @arg I2S_IT_TXP : Tx-Packet space available interrupt + * @arg I2S_IT_DXP : Tx-Packet space available interrupt * @arg I2S_IT_UDR : Underrun interrupt * @arg I2S_IT_OVR : Overrun interrupt * @arg I2S_IT_FRE : TI mode frame format error interrupt @@ -440,11 +448,11 @@ typedef void (*pI2S_CallbackTypeDef)(I2S_HandleTypeDef *hi2s); /*!< pointer to * @retval None */ #define __HAL_I2S_CLEAR_TIFREFLAG(__HANDLE__) SET_BIT((__HANDLE__)->Instance->IFCR , SPI_IFCR_TIFREC) - /** * @} */ + /* Exported functions --------------------------------------------------------*/ /** @addtogroup I2S_Exported_Functions * @{ @@ -475,15 +483,22 @@ HAL_StatusTypeDef HAL_I2S_UnRegisterCallback(I2S_HandleTypeDef *hi2s, HAL_I2S_Ca /* Blocking mode: Polling */ HAL_StatusTypeDef HAL_I2S_Transmit(I2S_HandleTypeDef *hi2s, uint16_t *pData, uint16_t Size, uint32_t Timeout); HAL_StatusTypeDef HAL_I2S_Receive(I2S_HandleTypeDef *hi2s, uint16_t *pData, uint16_t Size, uint32_t Timeout); +HAL_StatusTypeDef HAL_I2SEx_TransmitReceive(I2S_HandleTypeDef *hi2s, uint16_t *pTxData, uint16_t *pRxData, + uint16_t Size, uint32_t Timeout); /* Non-Blocking mode: Interrupt */ HAL_StatusTypeDef HAL_I2S_Transmit_IT(I2S_HandleTypeDef *hi2s, uint16_t *pData, uint16_t Size); HAL_StatusTypeDef HAL_I2S_Receive_IT(I2S_HandleTypeDef *hi2s, uint16_t *pData, uint16_t Size); +HAL_StatusTypeDef HAL_I2SEx_TransmitReceive_IT(I2S_HandleTypeDef *hi2s, uint16_t *pTxData, uint16_t *pRxData, + uint16_t Size); + void HAL_I2S_IRQHandler(I2S_HandleTypeDef *hi2s); /* Non-Blocking mode: DMA */ HAL_StatusTypeDef HAL_I2S_Transmit_DMA(I2S_HandleTypeDef *hi2s, uint16_t *pData, uint16_t Size); HAL_StatusTypeDef HAL_I2S_Receive_DMA(I2S_HandleTypeDef *hi2s, uint16_t *pData, uint16_t Size); +HAL_StatusTypeDef HAL_I2SEx_TransmitReceive_DMA(I2S_HandleTypeDef *hi2s, uint16_t *pTxData, uint16_t *pRxData, + uint16_t Size); HAL_StatusTypeDef HAL_I2S_DMAPause(I2S_HandleTypeDef *hi2s); HAL_StatusTypeDef HAL_I2S_DMAResume(I2S_HandleTypeDef *hi2s); @@ -494,6 +509,8 @@ void HAL_I2S_TxHalfCpltCallback(I2S_HandleTypeDef *hi2s); void HAL_I2S_TxCpltCallback(I2S_HandleTypeDef *hi2s); void HAL_I2S_RxHalfCpltCallback(I2S_HandleTypeDef *hi2s); void HAL_I2S_RxCpltCallback(I2S_HandleTypeDef *hi2s); +void HAL_I2SEx_TxRxHalfCpltCallback(I2S_HandleTypeDef *hi2s); +void HAL_I2SEx_TxRxCpltCallback(I2S_HandleTypeDef *hi2s); void HAL_I2S_ErrorCallback(I2S_HandleTypeDef *hi2s); /** * @} @@ -575,6 +592,9 @@ uint32_t HAL_I2S_GetError(I2S_HandleTypeDef *hi2s); #define IS_I2S_SLAVE(__MODE__) (((__MODE__) == I2S_MODE_SLAVE_TX) || \ ((__MODE__) == I2S_MODE_SLAVE_RX) || \ ((__MODE__) == I2S_MODE_SLAVE_FULLDUPLEX)) + +#define IS_I2S_FULLDUPLEX(__MODE__) (((__MODE__) == I2S_MODE_MASTER_FULLDUPLEX) || \ + ((__MODE__) == I2S_MODE_SLAVE_FULLDUPLEX)) #define IS_I2S_STANDARD(__STANDARD__) (((__STANDARD__) == I2S_STANDARD_PHILIPS) || \ ((__STANDARD__) == I2S_STANDARD_MSB) || \ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_i2s_ex.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_i2s_ex.h index c868dd0..050f8d5 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_i2s_ex.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_i2s_ex.h @@ -16,5 +16,13 @@ * ****************************************************************************** */ - /* The I2S Full duplex feature is not supported by this HAL Driver */ + +/** + ****************************************************************************** + ===== I2S FULL DUPLEX FEATURE ===== + I2S Full Duplex APIs are available in stm32h7xx_hal_i2s.c/.h + ****************************************************************************** + */ + + /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h index 6c1d9b7..356eee4 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h @@ -598,8 +598,8 @@ typedef struct __MDMA_HandleTypeDef /** * @brief Checks whether the specified MDMA Channel interrupt is enabled or not. - * @param __HANDLE__: DMA handle - * @param __INTERRUPT__: specifies the DMA interrupt source to check. + * @param __HANDLE__: MDMA handle + * @param __INTERRUPT__: specifies the MDMA interrupt source to check. * @arg MDMA_IT_TE : Transfer Error interrupt mask * @arg MDMA_IT_CTC : Channel Transfer Complete interrupt mask * @arg MDMA_IT_BRT : Block Repeat Transfer interrupt mask @@ -609,6 +609,21 @@ typedef struct __MDMA_HandleTypeDef */ #define __HAL_MDMA_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CCR & (__INTERRUPT__))) +/** + * @brief Writes the number of data in bytes to be transferred on the MDMA Channelx. + * @param __HANDLE__ : MDMA handle + * @param __COUNTER__: Number of data in bytes to be transferred. + * @retval None + */ +#define __HAL_MDMA_SET_COUNTER(__HANDLE__, __COUNTER__) ((__HANDLE__)->Instance->CBNDTR |= ((__COUNTER__) & MDMA_CBNDTR_BNDT)) + +/** + * @brief Returns the number of remaining data in bytes in the current MDMA Channelx transfer. + * @param __HANDLE__ : MDMA handle + * @retval The number of remaining data in bytes in the current MDMA Channelx transfer. + */ +#define __HAL_MDMA_GET_COUNTER(__HANDLE__) ((__HANDLE__)->Instance->CBNDTR & MDMA_CBNDTR_BNDT) + /** * @} */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mmc.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mmc.h index c8679bb..3246303 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mmc.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mmc.h @@ -358,6 +358,43 @@ typedef void (*pMMC_CallbackTypeDef) (MMC_HandleTypeDef *hmmc); * @} */ +/** @defgroup MMC_Exported_Constansts_Group5 MMC Erase Type + * @{ + */ +#define HAL_MMC_ERASE 0x00000000U /*!< Erase the erase groups identified by CMD35 & 36 */ +#define HAL_MMC_TRIM 0x00000001U /*!< Erase the write blocks identified by CMD35 & 36 */ +#define HAL_MMC_DISCARD 0x00000003U /*!< Discard the write blocks identified by CMD35 & 36 */ +#define HAL_MMC_SECURE_ERASE 0x80000000U /*!< Perform a secure purge according SRT on the erase groups identified by CMD35 & 36 */ +#define HAL_MMC_SECURE_TRIM_STEP1 0x80000001U /*!< Mark the write blocks identified by CMD35 & 36 for secure erase */ +#define HAL_MMC_SECURE_TRIM_STEP2 0x80008000U /*!< Perform a secure purge according SRT on the write blocks previously identified */ + +#define IS_MMC_ERASE_TYPE(TYPE) (((TYPE) == HAL_MMC_ERASE) || \ + ((TYPE) == HAL_MMC_TRIM) || \ + ((TYPE) == HAL_MMC_DISCARD) || \ + ((TYPE) == HAL_MMC_SECURE_ERASE) || \ + ((TYPE) == HAL_MMC_SECURE_TRIM_STEP1) || \ + ((TYPE) == HAL_MMC_SECURE_TRIM_STEP2)) +/** + * @} + */ + +/** @defgroup MMC_Exported_Constansts_Group6 MMC Secure Removal Type + * @{ + */ +#define HAL_MMC_SRT_ERASE 0x00000001U /*!< Information removed by an erase */ +#define HAL_MMC_SRT_WRITE_CHAR_ERASE 0x00000002U /*!< Information removed by an overwriting with a character followed by an erase */ +#define HAL_MMC_SRT_WRITE_CHAR_COMPL_RANDOM 0x00000004U /*!< Information removed by an overwriting with a character, its complement then a random character */ +#define HAL_MMC_SRT_VENDOR_DEFINED 0x00000008U /*!< Information removed using a vendor defined */ + + +#define IS_MMC_SRT_TYPE(TYPE) (((TYPE) == HAL_MMC_SRT_ERASE) || \ + ((TYPE) == HAL_MMC_SRT_WRITE_CHAR_ERASE) || \ + ((TYPE) == HAL_MMC_SRT_WRITE_CHAR_COMPL_RANDOM) || \ + ((TYPE) == HAL_MMC_SRT_VENDOR_DEFINED)) +/** + * @} + */ + /** * @} */ @@ -661,7 +698,7 @@ uint32_t HAL_MMC_GetError(MMC_HandleTypeDef *hmmc); * @} */ -/** @defgroup MMC_Exported_Functions_Group6 Perioheral Abort management +/** @defgroup MMC_Exported_Functions_Group6 Peripheral Abort management * @{ */ HAL_StatusTypeDef HAL_MMC_Abort(MMC_HandleTypeDef *hmmc); @@ -670,6 +707,17 @@ HAL_StatusTypeDef HAL_MMC_Abort_IT(MMC_HandleTypeDef *hmmc); * @} */ +/** @defgroup MMC_Exported_Functions_Group7 Peripheral Erase management + * @{ + */ +HAL_StatusTypeDef HAL_MMC_EraseSequence(MMC_HandleTypeDef *hmmc, uint32_t EraseType, uint32_t BlockStartAdd, uint32_t BlockEndAdd); +HAL_StatusTypeDef HAL_MMC_Sanitize(MMC_HandleTypeDef *hmmc); +HAL_StatusTypeDef HAL_MMC_ConfigSecRemovalType(MMC_HandleTypeDef *hmmc, uint32_t SRTMode); +HAL_StatusTypeDef HAL_MMC_GetSupportedSecRemovalType(MMC_HandleTypeDef *hmmc, uint32_t *SupportedSRT); +/** + * @} + */ + /* Private types -------------------------------------------------------------*/ /** @defgroup MMC_Private_Types MMC Private Types * @{ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mmc_ex.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mmc_ex.h index 38f8838..c9ad03c 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mmc_ex.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mmc_ex.h @@ -15,7 +15,7 @@ * opensource.org/licenses/BSD-3-Clause * ****************************************************************************** - */ + */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef STM32H7xx_HAL_MMC_EX_H @@ -35,7 +35,7 @@ /** @addtogroup MMCEx * @brief SD HAL extended module driver * @{ - */ + */ /* Exported types ------------------------------------------------------------*/ /** @defgroup MMCEx_Exported_Types MMCEx Exported Types @@ -44,7 +44,7 @@ /** @defgroup MMCEx_Exported_Types_Group1 MMC Internal DMA Buffer structure * @{ - */ + */ typedef enum { MMC_DMA_BUFFER0 = 0x00U, /*!< selects MMC internal DMA Buffer 0 */ @@ -53,20 +53,20 @@ typedef enum }HAL_MMCEx_DMABuffer_MemoryTypeDef; -/** +/** * @} */ - -/** + +/** * @} - */ + */ /* Exported constants --------------------------------------------------------*/ /* Exported macro ------------------------------------------------------------*/ /* Exported functions --------------------------------------------------------*/ /** @defgroup MMCEx_Exported_Functions MMCEx Exported Functions * @{ */ - + /** @defgroup MMCEx_Exported_Functions_Group1 MultiBuffer functions * @{ */ @@ -83,11 +83,11 @@ void HAL_MMCEx_Write_DMADoubleBuf1CpltCallback(MMC_HandleTypeDef *hmmc); /** * @} */ - + /** * @} */ - + /* Private types -------------------------------------------------------------*/ /* Private defines -----------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ @@ -95,7 +95,7 @@ void HAL_MMCEx_Write_DMADoubleBuf1CpltCallback(MMC_HandleTypeDef *hmmc); /* Private macros ------------------------------------------------------------*/ /* Private functions prototypes ----------------------------------------------*/ /* Private functions ---------------------------------------------------------*/ - + /** * @} */ @@ -108,6 +108,6 @@ void HAL_MMCEx_Write_DMADoubleBuf1CpltCallback(MMC_HandleTypeDef *hmmc); #endif -#endif /* STM32H7xx_HAL_MMCEx_H */ +#endif /* STM32H7xx_HAL_MMCEx_H */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_otfdec.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_otfdec.h index 23cde06..ebd4ea7 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_otfdec.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_otfdec.h @@ -18,14 +18,13 @@ */ /* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32H7xx_HAL_OTFDEC_H -#define __STM32H7xx_HAL_OTFDEC_H +#ifndef STM32H7xx_HAL_OTFDEC_H +#define STM32H7xx_HAL_OTFDEC_H #ifdef __cplusplus extern "C" { #endif -#if defined(OTFDEC1) /* Includes ------------------------------------------------------------------*/ #include "stm32h7xx_hal_def.h" @@ -33,6 +32,8 @@ * @{ */ +#if defined(OTFDEC1) + /** @addtogroup OTFDEC * @{ */ @@ -266,6 +267,38 @@ typedef void (*pOTFDEC_CallbackTypeDef)(OTFDEC_HandleTypeDef *hotfdec); /*!< po */ #define __HAL_OTFDEC_DISABLE_IT(__HANDLE__, __INTERRUPT__) CLEAR_BIT(((__HANDLE__)->Instance->IER), (__INTERRUPT__)) + /** @brief Check whether the specified combination of OTFDEC interrupt flags is set or not. + * @param __HANDLE__ pointer to an OTFDEC_HandleTypeDef structure that contains + * the configuration information for OTFDEC module + * @param __FLAG__ mask on combination of interrupts flags + * This parameter can be one of the following values: + * @arg @ref OTFDEC_SEC_ERROR_INT OTFDEC security error interrupt flag + * @arg @ref OTFDEC_EXE_ERROR_INT OTFDEC execution error interrupt flag + * @arg @ref OTFDEC_KEY_ERROR_INT OTFDEC key error interrupt flag + * @arg @ref OTFDEC_SEC_EXE_ERROR_INT OTFDEC security and execution errors interrupts flags + * @arg @ref OTFDEC_SEC_KEY_ERROR_INT OTFDEC security and key errors interrupts flags + * @arg @ref OTFDEC_EXE_KEY_ERROR_INT OTFDEC execution and key errors interrupts flag + * @arg @ref OTFDEC_ALL_INT OTFDEC all interrupts flags + * @retval The state of __FLAG__ (TRUE or FALSE). + */ + #define __HAL_OTFDEC_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->ISR & (__FLAG__)) == (__FLAG__)) + +/** @brief Clear the specified combination of OTFDEC interrupt flags. + * @param __HANDLE__ pointer to an OTFDEC_HandleTypeDef structure that contains + * the configuration information for OTFDEC module + * @param __FLAG__ mask on combination of interrupts flags + * This parameter can be one of the following values: + * @arg @ref OTFDEC_SEC_ERROR_INT OTFDEC security error interrupt flag + * @arg @ref OTFDEC_EXE_ERROR_INT OTFDEC execution error interrupt flag + * @arg @ref OTFDEC_KEY_ERROR_INT OTFDEC key error interrupt flag + * @arg @ref OTFDEC_SEC_EXE_ERROR_INT OTFDEC security and execution errors interrupts flags + * @arg @ref OTFDEC_SEC_KEY_ERROR_INT OTFDEC security and key errors interrupts flags + * @arg @ref OTFDEC_EXE_KEY_ERROR_INT OTFDEC execution and key errors interrupts flag + * @arg @ref OTFDEC_ALL_INT OTFDEC all interrupts flags + * @retval None + */ +#define __HAL_OTFDEC_CLEAR_FLAG(__HANDLE__, __FLAG__) SET_BIT((__HANDLE__)->Instance->ICR, (__FLAG__)) + /** * @} */ @@ -428,17 +461,17 @@ HAL_StatusTypeDef HAL_OTFDEC_RegionGetConfig(OTFDEC_HandleTypeDef *hotfdec, uint * @} */ +#endif /* OTFDEC1 */ /** * @} */ -#endif /* OTFDEC1 */ #ifdef __cplusplus } #endif -#endif /* __STM32H7xx_HAL_OTFDEC_H */ +#endif /* STM32H7xx_HAL_OTFDEC_H */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_pcd.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_pcd.h index a47aaae..109d89a 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_pcd.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_pcd.h @@ -96,16 +96,16 @@ typedef struct __PCD_HandleTypeDef typedef struct #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ { - PCD_TypeDef *Instance; /*!< Register base address */ - PCD_InitTypeDef Init; /*!< PCD required parameters */ - __IO uint8_t USB_Address; /*!< USB Address */ - PCD_EPTypeDef IN_ep[16]; /*!< IN endpoint parameters */ - PCD_EPTypeDef OUT_ep[16]; /*!< OUT endpoint parameters */ - HAL_LockTypeDef Lock; /*!< PCD peripheral status */ - __IO PCD_StateTypeDef State; /*!< PCD communication state */ - __IO uint32_t ErrorCode; /*!< PCD Error code */ - uint32_t Setup[12]; /*!< Setup packet buffer */ - PCD_LPM_StateTypeDef LPM_State; /*!< LPM State */ + PCD_TypeDef *Instance; /*!< Register base address */ + PCD_InitTypeDef Init; /*!< PCD required parameters */ + __IO uint8_t USB_Address; /*!< USB Address */ + PCD_EPTypeDef IN_ep[16]; /*!< IN endpoint parameters */ + PCD_EPTypeDef OUT_ep[16]; /*!< OUT endpoint parameters */ + HAL_LockTypeDef Lock; /*!< PCD peripheral status */ + __IO PCD_StateTypeDef State; /*!< PCD communication state */ + __IO uint32_t ErrorCode; /*!< PCD Error code */ + uint32_t Setup[12]; /*!< Setup packet buffer */ + PCD_LPM_StateTypeDef LPM_State; /*!< LPM State */ uint32_t BESL; @@ -244,7 +244,7 @@ typedef enum HAL_PCD_SUSPEND_CB_ID = 0x04, /*!< USB PCD Suspend callback ID */ HAL_PCD_RESUME_CB_ID = 0x05, /*!< USB PCD Resume callback ID */ HAL_PCD_CONNECT_CB_ID = 0x06, /*!< USB PCD Connect callback ID */ - HAL_PCD_DISCONNECT_CB_ID = 0x07, /*!< USB PCD Disconnect callback ID */ + HAL_PCD_DISCONNECT_CB_ID = 0x07, /*!< USB PCD Disconnect callback ID */ HAL_PCD_MSPINIT_CB_ID = 0x08, /*!< USB PCD MspInit callback ID */ HAL_PCD_MSPDEINIT_CB_ID = 0x09 /*!< USB PCD MspDeInit callback ID */ @@ -363,14 +363,6 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd); * @{ */ #if defined (USB_OTG_FS) || defined (USB_OTG_HS) -#define USB_OTG_FS_WAKEUP_EXTI_RISING_EDGE 0x08U -#define USB_OTG_FS_WAKEUP_EXTI_FALLING_EDGE 0x0CU -#define USB_OTG_FS_WAKEUP_EXTI_RISING_FALLING_EDGE 0x10U - -#define USB_OTG_HS_WAKEUP_EXTI_RISING_EDGE 0x08U -#define USB_OTG_HS_WAKEUP_EXTI_FALLING_EDGE 0x0CU -#define USB_OTG_HS_WAKEUP_EXTI_RISING_FALLING_EDGE 0x10U - #define USB_OTG_FS_WAKEUP_EXTI_LINE (0x1U << 12) /*!< USB FS EXTI Line WakeUp Interrupt */ #define USB_OTG_HS_WAKEUP_EXTI_LINE (0x1U << 11) /*!< USB HS EXTI Line WakeUp Interrupt */ #endif /* defined (USB_OTG_FS) || defined (USB_OTG_HS) */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_pwr.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_pwr.h index 0d46240..3b3b5bd 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_pwr.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_pwr.h @@ -228,11 +228,11 @@ typedef struct * Scale 2 mode. * @arg PWR_REGULATOR_VOLTAGE_SCALE3 : Regulator voltage output * Scale 3 mode. - * @note For all H7 lines except STM32H7Axxx and STM32H7Bxxx lines, - * configuring Voltage Scale 0 is only possible when Vcore is supplied - * from LDO (Low DropOut). The SYSCFG Clock must be enabled through - * __HAL_RCC_SYSCFG_CLK_ENABLE() macro before configuring Voltage Scale - * 0 using __HAL_PWR_VOLTAGESCALING_CONFIG(). + * @note For STM32H74x and STM32H75x lines, configuring Voltage Scale 0 is + * only possible when Vcore is supplied from LDO (Low DropOut). The + * SYSCFG Clock must be enabled through __HAL_RCC_SYSCFG_CLK_ENABLE() + * macro before configuring Voltage Scale 0 using + * __HAL_PWR_VOLTAGESCALING_CONFIG(). * Transition to Voltage Scale 0 is only possible when the system is * already in Voltage Scale 1. * Transition from Voltage Scale 0 is only possible to Voltage Scale 1 @@ -245,16 +245,18 @@ typedef struct * low power mode. * @retval None. */ -#if defined(PWR_SRDCR_VOS) /* STM32H7Axxx and STM32H7Bxxx lines */ +#if defined (PWR_SRDCR_VOS) /* STM32H7Axxx and STM32H7Bxxx lines */ #define __HAL_PWR_VOLTAGESCALING_CONFIG(__REGULATOR__) \ do { \ __IO uint32_t tmpreg = 0x00; \ + /* Configure the Voltage Scaling */ \ MODIFY_REG(PWR->SRDCR, PWR_SRDCR_VOS, (__REGULATOR__)); \ /* Delay after setting the voltage scaling */ \ tmpreg = READ_BIT(PWR->SRDCR, PWR_SRDCR_VOS); \ UNUSED(tmpreg); \ } while(0) -#else /* All H7 lines except STM32H7Axxx and STM32H7Bxxx lines */ +#else /* 3 power domains devices */ +#if defined(SYSCFG_PWRCR_ODEN) /* STM32H74xxx and STM32H75xxx lines */ #define __HAL_PWR_VOLTAGESCALING_CONFIG(__REGULATOR__) \ do { \ __IO uint32_t tmpreg = 0x00; \ @@ -283,7 +285,18 @@ do { \ } \ UNUSED(tmpreg); \ } while(0) -#endif /* PWR_SRDCR_VOS */ +#else /* STM32H72xxx and STM32H73xxx lines */ +#define __HAL_PWR_VOLTAGESCALING_CONFIG(__REGULATOR__) \ +do { \ + __IO uint32_t tmpreg = 0x00; \ + /* Configure the Voltage Scaling */ \ + MODIFY_REG (PWR->D3CR, PWR_D3CR_VOS, (__REGULATOR__)); \ + /* Delay after setting the voltage scaling */ \ + tmpreg = READ_BIT(PWR->D3CR, PWR_D3CR_VOS); \ + UNUSED(tmpreg); \ +} while(0) +#endif /* defined(SYSCFG_PWRCR_ODEN) */ +#endif /* defined (PWR_SRDCR_VOS) */ /** @brief Check PWR flags are set or not. * @param __FLAG__ : Specifies the flag to check. @@ -356,10 +369,10 @@ do { \ * family except STM32H7Axxx and STM32H7Bxxx lines. * The PWR_FLAG_MMCVDO flag is used only for STM32H7Axxx and * STM32H7Bxxx lines. - * The PWR_FLAG_SCUEN flag is used for STM32H743, STM32H753, STM32H742, - * STM32H750, STM32H7Axx and STM32H7Bxx lines. - * The PWR_FLAG_SMPSEXTRDY flag is used for dual core and STM32H7AxxQ, - * STM32H7BxxQ lines. + * The PWR_FLAG_SCUEN flag is used for devices that support only LDO + * regulator. + * The PWR_FLAG_SMPSEXTRDY flag is used for devices that support LDO + * and SMPS regulators. * @retval The (__FLAG__) state (TRUE or FALSE). */ #if defined (DUAL_CORE) /* Dual core lines */ @@ -386,7 +399,25 @@ do { \ ((__FLAG__) == PWR_FLAG_VBATH) ? ((PWR->CR2 & PWR_CR2_VBATH) == PWR_CR2_VBATH) :\ ((PWR->CR2 & PWR_CR2_VBATL) == PWR_CR2_VBATL)) #else /* Single core lines */ -#if defined (PWR_CPUCR_SBF_D2) /* STM32H743, STM32H753, STM32H742 and STM32H750 lines */ +#if defined (PWR_CPUCR_SBF_D2) /* STM32H72x, STM32H73x, STM32H74x and STM32H75x lines */ +#if defined (SMPS) /* STM32H725 and STM32H735 lines */ +#define __HAL_PWR_GET_FLAG(__FLAG__) \ +(((__FLAG__) == PWR_FLAG_PVDO) ? ((PWR->CSR1 & PWR_CSR1_PVDO) == PWR_CSR1_PVDO) :\ + ((__FLAG__) == PWR_FLAG_AVDO) ? ((PWR->CSR1 & PWR_CSR1_AVDO) == PWR_CSR1_AVDO) :\ + ((__FLAG__) == PWR_FLAG_ACTVOSRDY) ? ((PWR->CSR1 & PWR_CSR1_ACTVOSRDY) == PWR_CSR1_ACTVOSRDY) :\ + ((__FLAG__) == PWR_FLAG_VOSRDY) ? ((PWR->D3CR & PWR_D3CR_VOSRDY) == PWR_D3CR_VOSRDY) :\ + ((__FLAG__) == PWR_FLAG_SMPSEXTRDY) ? ((PWR->CR3 & PWR_FLAG_SMPSEXTRDY) == PWR_FLAG_SMPSEXTRDY) :\ + ((__FLAG__) == PWR_FLAG_BRR) ? ((PWR->CR2 & PWR_CR2_BRRDY) == PWR_CR2_BRRDY) :\ + ((__FLAG__) == PWR_FLAG_SB) ? ((PWR->CPUCR & PWR_CPUCR_SBF) == PWR_CPUCR_SBF) :\ + ((__FLAG__) == PWR_FLAG_STOP) ? ((PWR->CPUCR & PWR_CPUCR_STOPF) == PWR_CPUCR_STOPF) :\ + ((__FLAG__) == PWR_FLAG_SB_D1) ? ((PWR->CPUCR & PWR_CPUCR_SBF_D1) == PWR_CPUCR_SBF_D1) :\ + ((__FLAG__) == PWR_FLAG_SB_D2) ? ((PWR->CPUCR & PWR_CPUCR_SBF_D2) == PWR_CPUCR_SBF_D2) :\ + ((__FLAG__) == PWR_FLAG_USB33RDY) ? ((PWR->CR3 & PWR_CR3_USB33RDY) == PWR_CR3_USB33RDY) :\ + ((__FLAG__) == PWR_FLAG_TEMPH) ? ((PWR->CR2 & PWR_CR2_TEMPH) == PWR_CR2_TEMPH) :\ + ((__FLAG__) == PWR_FLAG_TEMPL) ? ((PWR->CR2 & PWR_CR2_TEMPL) == PWR_CR2_TEMPL) :\ + ((__FLAG__) == PWR_FLAG_VBATH) ? ((PWR->CR2 & PWR_CR2_VBATH) == PWR_CR2_VBATH) :\ + ((PWR->CR2 & PWR_CR2_VBATL) == PWR_CR2_VBATL)) +#else /* STM32H723, STM32H733, STM32H742, STM32H743, STM32H750 and STM32H753 lines */ #define __HAL_PWR_GET_FLAG(__FLAG__) \ (((__FLAG__) == PWR_FLAG_PVDO) ? ((PWR->CSR1 & PWR_CSR1_PVDO) == PWR_CSR1_PVDO) :\ ((__FLAG__) == PWR_FLAG_AVDO) ? ((PWR->CSR1 & PWR_CSR1_AVDO) == PWR_CSR1_AVDO) :\ @@ -403,9 +434,10 @@ do { \ ((__FLAG__) == PWR_FLAG_TEMPL) ? ((PWR->CR2 & PWR_CR2_TEMPL) == PWR_CR2_TEMPL) :\ ((__FLAG__) == PWR_FLAG_VBATH) ? ((PWR->CR2 & PWR_CR2_VBATH) == PWR_CR2_VBATH) :\ ((PWR->CR2 & PWR_CR2_VBATL) == PWR_CR2_VBATL)) +#endif /* defined (SMPS) */ #else /* STM32H7Axxx and STM32H7Bxxx lines */ -#if defined (SMPS) /* STM32H7AxxQ and STM32H7BxxQ SMPS lines */ -#define __HAL_PWR_GET_FLAG(__FLAG__) \ +#if defined (SMPS) /* STM32H7AxxQ and STM32H7BxxQ lines */ +#define __HAL_PWR_GET_FLAG(__FLAG__) \ (((__FLAG__) == PWR_FLAG_PVDO) ? ((PWR->CSR1 & PWR_CSR1_PVDO) == PWR_CSR1_PVDO) :\ ((__FLAG__) == PWR_FLAG_AVDO) ? ((PWR->CSR1 & PWR_CSR1_AVDO) == PWR_CSR1_AVDO) :\ ((__FLAG__) == PWR_FLAG_ACTVOSRDY) ? ((PWR->CSR1 & PWR_CSR1_ACTVOSRDY) == PWR_CSR1_ACTVOSRDY) :\ @@ -420,8 +452,8 @@ do { \ ((__FLAG__) == PWR_FLAG_TEMPL) ? ((PWR->CR2 & PWR_CR2_TEMPL) == PWR_CR2_TEMPL) :\ ((__FLAG__) == PWR_FLAG_VBATH) ? ((PWR->CR2 & PWR_CR2_VBATH) == PWR_CR2_VBATH) :\ ((PWR->CR2 & PWR_CR2_VBATL) == PWR_CR2_VBATL)) -#else /* STM32H7Axx and STM32H7Bxx LDO lines */ -#define __HAL_PWR_GET_FLAG(__FLAG__) \ +#else /* STM32H7Axx and STM32H7Bxx lines */ +#define __HAL_PWR_GET_FLAG(__FLAG__) \ (((__FLAG__) == PWR_FLAG_PVDO) ? ((PWR->CSR1 & PWR_CSR1_PVDO) == PWR_CSR1_PVDO) :\ ((__FLAG__) == PWR_FLAG_AVDO) ? ((PWR->CSR1 & PWR_CSR1_AVDO) == PWR_CSR1_AVDO) :\ ((__FLAG__) == PWR_FLAG_ACTVOSRDY) ? ((PWR->CSR1 & PWR_CSR1_ACTVOSRDY) == PWR_CSR1_ACTVOSRDY) :\ @@ -449,6 +481,8 @@ do { \ * @arg PWR_FLAG_WKUP4 : This parameter clear Wake up line 4 flag. * @arg PWR_FLAG_WKUP5 : This parameter clear Wake up line 5 flag. * @arg PWR_FLAG_WKUP6 : This parameter clear Wake up line 6 flag. + * @note The PWR_FLAG_WKUP3 and PWR_FLAG_WKUP5 are available only for devices + * that support GPIOI port. * @retval The (__FLAG__) state (TRUE or FALSE). */ #define __HAL_PWR_GET_WAKEUPFLAG(__FLAG__) ((PWR->WKUPFR & (__FLAG__)) ? 0 : 1) @@ -475,8 +509,9 @@ do { \ * @note This parameter is not used for the STM32H7 family and is kept as * parameter just to maintain compatibility with other families. * @note This macro clear all CPU flags. - * For STM32H7Axxx and STM32H7Bxxx lines CPU flags are STOPF and SBF. - * For dual core lines flags are HOLDxF, STOPF, SBF and SBF_Dx. + * For single core devices except STM32H7Axxx and STM32H7Bxxx, CPU + * flags are STOPF, SBF, SBF_D1 and SBF_D2. + * For STM32H7Axxx and STM32H7Bxxx lines, CPU flags are STOPF and SBF. * @retval None. */ #define __HAL_PWR_CLEAR_FLAG(__FLAG__) SET_BIT(PWR->CPUCR, PWR_CPUCR_CSSF) @@ -491,6 +526,8 @@ do { \ * @arg PWR_FLAG_WKUP4 : This parameter clear Wake up line 4 flag. * @arg PWR_FLAG_WKUP5 : This parameter clear Wake up line 5 flag. * @arg PWR_FLAG_WKUP6 : This parameter clear Wake up line 6 flag. + * @note The PWR_FLAG_WKUP3 and PWR_FLAG_WKUP5 are available only for devices + * that support GPIOI port. * @retval None. */ #define __HAL_PWR_CLEAR_WAKEUPFLAG(__FLAG__) SET_BIT(PWR->WKUPCR, (__FLAG__)) @@ -640,44 +677,44 @@ do { \ * @{ */ -/** @addtogroup PWR_Exported_Functions_Group1 Initialization and De-Initialization functions +/** @addtogroup PWR_Exported_Functions_Group1 Initialization and De-Initialization Functions * @{ */ /* Initialization and de-initialization functions *****************************/ -void HAL_PWR_DeInit(void); -void HAL_PWR_EnableBkUpAccess(void); -void HAL_PWR_DisableBkUpAccess(void); +void HAL_PWR_DeInit (void); +void HAL_PWR_EnableBkUpAccess (void); +void HAL_PWR_DisableBkUpAccess (void); /** * @} */ -/** @addtogroup PWR_Exported_Functions_Group2 Peripheral Control functions +/** @addtogroup PWR_Exported_Functions_Group2 Peripheral Control Functions * @{ */ /* Peripheral Control functions **********************************************/ /* PVD configuration */ -void HAL_PWR_ConfigPVD(PWR_PVDTypeDef *sConfigPVD); -void HAL_PWR_EnablePVD(void); -void HAL_PWR_DisablePVD(void); +void HAL_PWR_ConfigPVD (PWR_PVDTypeDef *sConfigPVD); +void HAL_PWR_EnablePVD (void); +void HAL_PWR_DisablePVD (void); /* WakeUp pins configuration */ -void HAL_PWR_EnableWakeUpPin(uint32_t WakeUpPinPolarity); -void HAL_PWR_DisableWakeUpPin(uint32_t WakeUpPinx); +void HAL_PWR_EnableWakeUpPin (uint32_t WakeUpPinPolarity); +void HAL_PWR_DisableWakeUpPin (uint32_t WakeUpPinx); /* Low Power modes entry */ -void HAL_PWR_EnterSTOPMode(uint32_t Regulator, uint8_t STOPEntry); -void HAL_PWR_EnterSLEEPMode(uint32_t Regulator, uint8_t SLEEPEntry); -void HAL_PWR_EnterSTANDBYMode(void); +void HAL_PWR_EnterSTOPMode (uint32_t Regulator, uint8_t STOPEntry); +void HAL_PWR_EnterSLEEPMode (uint32_t Regulator, uint8_t SLEEPEntry); +void HAL_PWR_EnterSTANDBYMode (void); /* Power PVD IRQ Handler */ -void HAL_PWR_PVD_IRQHandler(void); -void HAL_PWR_PVDCallback(void); +void HAL_PWR_PVD_IRQHandler (void); +void HAL_PWR_PVDCallback (void); /* Cortex System Control functions *******************************************/ -void HAL_PWR_EnableSleepOnExit(void); -void HAL_PWR_DisableSleepOnExit(void); -void HAL_PWR_EnableSEVOnPend(void); -void HAL_PWR_DisableSEVOnPend(void); +void HAL_PWR_EnableSleepOnExit (void); +void HAL_PWR_DisableSleepOnExit (void); +void HAL_PWR_EnableSEVOnPend (void); +void HAL_PWR_DisableSEVOnPend (void); /** * @} */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_pwr_ex.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_pwr_ex.h index ebad73c..9e87e12 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_pwr_ex.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_pwr_ex.h @@ -46,8 +46,8 @@ typedef struct { uint32_t AVDLevel; /*!< AVDLevel : Specifies the AVD detection level. This - parameter can be a value of @ref - PWREx_AVD_detection_level + parameter can be a value of @ref + PWREx_AVD_detection_level */ uint32_t Mode; /*!< Mode : Specifies the EXTI operating mode for the AVD @@ -102,25 +102,37 @@ typedef enum */ /* High level and No pull (default configuration) */ #define PWR_WAKEUP_PIN6 PWR_WKUPEPR_WKUPEN6 +#if defined (PWR_WKUPEPR_WKUPEN5) #define PWR_WAKEUP_PIN5 PWR_WKUPEPR_WKUPEN5 +#endif /* defined (PWR_WKUPEPR_WKUPEN5) */ #define PWR_WAKEUP_PIN4 PWR_WKUPEPR_WKUPEN4 +#if defined (PWR_WKUPEPR_WKUPEN3) #define PWR_WAKEUP_PIN3 PWR_WKUPEPR_WKUPEN3 +#endif /* defined (PWR_WKUPEPR_WKUPEN3) */ #define PWR_WAKEUP_PIN2 PWR_WKUPEPR_WKUPEN2 #define PWR_WAKEUP_PIN1 PWR_WKUPEPR_WKUPEN1 /* High level and No pull */ #define PWR_WAKEUP_PIN6_HIGH PWR_WKUPEPR_WKUPEN6 +#if defined (PWR_WKUPEPR_WKUPEN5) #define PWR_WAKEUP_PIN5_HIGH PWR_WKUPEPR_WKUPEN5 +#endif /* defined (PWR_WKUPEPR_WKUPEN5) */ #define PWR_WAKEUP_PIN4_HIGH PWR_WKUPEPR_WKUPEN4 +#if defined (PWR_WKUPEPR_WKUPEN3) #define PWR_WAKEUP_PIN3_HIGH PWR_WKUPEPR_WKUPEN3 +#endif /* defined (PWR_WKUPEPR_WKUPEN3) */ #define PWR_WAKEUP_PIN2_HIGH PWR_WKUPEPR_WKUPEN2 #define PWR_WAKEUP_PIN1_HIGH PWR_WKUPEPR_WKUPEN1 /* Low level and No pull */ #define PWR_WAKEUP_PIN6_LOW (PWR_WKUPEPR_WKUPP6 | PWR_WKUPEPR_WKUPEN6) +#if defined (PWR_WKUPEPR_WKUPP5) #define PWR_WAKEUP_PIN5_LOW (PWR_WKUPEPR_WKUPP5 | PWR_WKUPEPR_WKUPEN5) +#endif /* defined (PWR_WKUPEPR_WKUPP5) */ #define PWR_WAKEUP_PIN4_LOW (PWR_WKUPEPR_WKUPP4 | PWR_WKUPEPR_WKUPEN4) +#if defined (PWR_WKUPEPR_WKUPP3) #define PWR_WAKEUP_PIN3_LOW (PWR_WKUPEPR_WKUPP3 | PWR_WKUPEPR_WKUPEN3) +#endif /* defined (PWR_WKUPEPR_WKUPP3) */ #define PWR_WAKEUP_PIN2_LOW (PWR_WKUPEPR_WKUPP2 | PWR_WKUPEPR_WKUPEN2) #define PWR_WAKEUP_PIN1_LOW (PWR_WKUPEPR_WKUPP1 | PWR_WKUPEPR_WKUPEN1) /** @@ -151,13 +163,22 @@ typedef enum */ #define PWR_WAKEUP_FLAG1 PWR_WKUPFR_WKUPF1 /*!< Wakeup flag on PA0 */ #define PWR_WAKEUP_FLAG2 PWR_WKUPFR_WKUPF2 /*!< Wakeup flag on PA2 */ +#if defined (PWR_WKUPFR_WKUPF3) #define PWR_WAKEUP_FLAG3 PWR_WKUPFR_WKUPF3 /*!< Wakeup flag on PI8 */ +#endif /* defined (PWR_WKUPFR_WKUPF3) */ #define PWR_WAKEUP_FLAG4 PWR_WKUPFR_WKUPF4 /*!< Wakeup flag on PC13 */ +#if defined (PWR_WKUPFR_WKUPF5) #define PWR_WAKEUP_FLAG5 PWR_WKUPFR_WKUPF5 /*!< Wakeup flag on PI11 */ +#endif /* defined (PWR_WKUPFR_WKUPF5) */ #define PWR_WAKEUP_FLAG6 PWR_WKUPFR_WKUPF6 /*!< Wakeup flag on PC1 */ +#if defined (PWR_WKUPFR_WKUPF3) #define PWR_WAKEUP_FLAG_ALL (PWR_WKUPFR_WKUPF1 | PWR_WKUPFR_WKUPF2 |\ PWR_WKUPFR_WKUPF3 | PWR_WKUPFR_WKUPF4 |\ PWR_WKUPFR_WKUPF5 | PWR_WKUPFR_WKUPF6) +#else +#define PWR_WAKEUP_FLAG_ALL (PWR_WKUPFR_WKUPF1 | PWR_WKUPFR_WKUPF2 |\ + PWR_WKUPFR_WKUPF4 | PWR_WKUPFR_WKUPF6) +#endif /* defined (PWR_WKUPFR_WKUPF3) */ /** * @} */ @@ -486,12 +507,12 @@ do { \ /** @addtogroup PWREx_Exported_Functions_Group1 Power Supply Control Functions * @{ */ -HAL_StatusTypeDef HAL_PWREx_ConfigSupply(uint32_t SupplySource); -uint32_t HAL_PWREx_GetSupplyConfig(void); -HAL_StatusTypeDef HAL_PWREx_ControlVoltageScaling(uint32_t VoltageScaling); -uint32_t HAL_PWREx_GetVoltageRange(void); -HAL_StatusTypeDef HAL_PWREx_ControlStopModeVoltageScaling(uint32_t VoltageScaling); -uint32_t HAL_PWREx_GetStopModeVoltageRange(void); +HAL_StatusTypeDef HAL_PWREx_ConfigSupply (uint32_t SupplySource); +uint32_t HAL_PWREx_GetSupplyConfig (void); +HAL_StatusTypeDef HAL_PWREx_ControlVoltageScaling (uint32_t VoltageScaling); +uint32_t HAL_PWREx_GetVoltageRange (void); +HAL_StatusTypeDef HAL_PWREx_ControlStopModeVoltageScaling (uint32_t VoltageScaling); +uint32_t HAL_PWREx_GetStopModeVoltageRange (void); /** * @} */ @@ -501,63 +522,67 @@ uint32_t HAL_PWREx_GetStopModeVoltageRange(void); */ /* System low power control functions */ #if defined (PWR_CPUCR_RETDS_CD) -void HAL_PWREx_EnterSTOP2Mode(uint32_t Regulator, uint8_t STOPEntry); +void HAL_PWREx_EnterSTOP2Mode (uint32_t Regulator, uint8_t STOPEntry); #endif /* defined (PWR_CPUCR_RETDS_CD) */ -void HAL_PWREx_EnterSTOPMode(uint32_t Regulator, uint8_t STOPEntry, uint32_t Domain); -void HAL_PWREx_EnterSTANDBYMode(uint32_t Domain); -void HAL_PWREx_ConfigD3Domain(uint32_t D3State); +void HAL_PWREx_EnterSTOPMode (uint32_t Regulator, uint8_t STOPEntry, uint32_t Domain); +void HAL_PWREx_EnterSTANDBYMode (uint32_t Domain); +void HAL_PWREx_ConfigD3Domain (uint32_t D3State); /* Clear Cortex-Mx pending flag */ -void HAL_PWREx_ClearPendingEvent(void); +void HAL_PWREx_ClearPendingEvent (void); #if defined (DUAL_CORE) /* Clear domain flags */ -void HAL_PWREx_ClearDomainFlags(uint32_t DomainFlags); +void HAL_PWREx_ClearDomainFlags (uint32_t DomainFlags); /* Core Hold/Release functions */ -HAL_StatusTypeDef HAL_PWREx_HoldCore(uint32_t CPU); -void HAL_PWREx_ReleaseCore(uint32_t CPU); +HAL_StatusTypeDef HAL_PWREx_HoldCore (uint32_t CPU); +void HAL_PWREx_ReleaseCore (uint32_t CPU); #endif /* defined (DUAL_CORE) */ /* Flash low power control functions */ -void HAL_PWREx_EnableFlashPowerDown(void); -void HAL_PWREx_DisableFlashPowerDown(void); +void HAL_PWREx_EnableFlashPowerDown (void); +void HAL_PWREx_DisableFlashPowerDown (void); #if defined (PWR_CR1_SRDRAMSO) /* Memory shut-off functions */ -void HAL_PWREx_EnableMemoryShutOff(uint32_t MemoryBlock); -void HAL_PWREx_DisableMemoryShutOff(uint32_t MemoryBlock); +void HAL_PWREx_EnableMemoryShutOff (uint32_t MemoryBlock); +void HAL_PWREx_DisableMemoryShutOff (uint32_t MemoryBlock); #endif /* defined(PWR_CR1_SRDRAMSO) */ /* Wakeup Pins control functions */ -void HAL_PWREx_EnableWakeUpPin(PWREx_WakeupPinTypeDef *sPinParams); -void HAL_PWREx_DisableWakeUpPin(uint32_t WakeUpPin); -uint32_t HAL_PWREx_GetWakeupFlag(uint32_t WakeUpFlag); -HAL_StatusTypeDef HAL_PWREx_ClearWakeupFlag(uint32_t WakeUpFlag); +void HAL_PWREx_EnableWakeUpPin (PWREx_WakeupPinTypeDef *sPinParams); +void HAL_PWREx_DisableWakeUpPin (uint32_t WakeUpPin); +uint32_t HAL_PWREx_GetWakeupFlag (uint32_t WakeUpFlag); +HAL_StatusTypeDef HAL_PWREx_ClearWakeupFlag (uint32_t WakeUpFlag); /* Power Wakeup PIN IRQ Handler */ -void HAL_PWREx_WAKEUP_PIN_IRQHandler(void); -void HAL_PWREx_WKUP1_Callback(void); -void HAL_PWREx_WKUP2_Callback(void); -void HAL_PWREx_WKUP3_Callback(void); -void HAL_PWREx_WKUP4_Callback(void); -void HAL_PWREx_WKUP5_Callback(void); -void HAL_PWREx_WKUP6_Callback(void); +void HAL_PWREx_WAKEUP_PIN_IRQHandler (void); +void HAL_PWREx_WKUP1_Callback (void); +void HAL_PWREx_WKUP2_Callback (void); +#if defined (PWR_WKUPEPR_WKUPEN3) +void HAL_PWREx_WKUP3_Callback (void); +#endif /* defined (PWR_WKUPEPR_WKUPEN3) */ +void HAL_PWREx_WKUP4_Callback (void); +#if defined (PWR_WKUPEPR_WKUPEN5) +void HAL_PWREx_WKUP5_Callback (void); +#endif /* defined (PWR_WKUPEPR_WKUPEN5) */ +void HAL_PWREx_WKUP6_Callback (void); /** * @} */ -/** @addtogroup PWREx_Exported_Functions_Group3 Peripherals Control Functions +/** @addtogroup PWREx_Exported_Functions_Group3 Peripherals control functions * @{ */ /* Backup regulator control functions */ -HAL_StatusTypeDef HAL_PWREx_EnableBkUpReg(void); -HAL_StatusTypeDef HAL_PWREx_DisableBkUpReg(void); +HAL_StatusTypeDef HAL_PWREx_EnableBkUpReg (void); +HAL_StatusTypeDef HAL_PWREx_DisableBkUpReg (void); /* USB regulator control functions */ -HAL_StatusTypeDef HAL_PWREx_EnableUSBReg(void); -HAL_StatusTypeDef HAL_PWREx_DisableUSBReg(void); -void HAL_PWREx_EnableUSBVoltageDetector(void); -void HAL_PWREx_DisableUSBVoltageDetector(void); +HAL_StatusTypeDef HAL_PWREx_EnableUSBReg (void); +HAL_StatusTypeDef HAL_PWREx_DisableUSBReg (void); +void HAL_PWREx_EnableUSBVoltageDetector (void); +void HAL_PWREx_DisableUSBVoltageDetector (void); /* Battery control functions */ -void HAL_PWREx_EnableBatteryCharging(uint32_t ResistorValue); -void HAL_PWREx_DisableBatteryCharging(void); -#if defined(PWR_CR1_BOOSTE) +void HAL_PWREx_EnableBatteryCharging (uint32_t ResistorValue); +void HAL_PWREx_DisableBatteryCharging (void); +#if defined (PWR_CR1_BOOSTE) /* Analog Booster functions */ -void HAL_PWREx_EnableAnalogBooster(void); -void HAL_PWREx_DisableAnalogBooster(void); +void HAL_PWREx_EnableAnalogBooster (void); +void HAL_PWREx_DisableAnalogBooster (void); #endif /* PWR_CR1_BOOSTE */ /** * @} @@ -567,20 +592,20 @@ void HAL_PWREx_DisableAnalogBooster(void); * @{ */ /* Power VBAT/Temperature monitoring functions */ -void HAL_PWREx_EnableMonitoring(void); -void HAL_PWREx_DisableMonitoring(void); -uint32_t HAL_PWREx_GetTemperatureLevel(void); -uint32_t HAL_PWREx_GetVBATLevel(void); -#if defined(PWR_CSR1_MMCVDO) -PWREx_MMC_VoltageLevel HAL_PWREx_GetMMCVoltage(void); +void HAL_PWREx_EnableMonitoring (void); +void HAL_PWREx_DisableMonitoring (void); +uint32_t HAL_PWREx_GetTemperatureLevel (void); +uint32_t HAL_PWREx_GetVBATLevel (void); +#if defined (PWR_CSR1_MMCVDO) +PWREx_MMC_VoltageLevel HAL_PWREx_GetMMCVoltage (void); #endif /* PWR_CSR1_MMCVDO */ /* Power AVD configuration functions */ -void HAL_PWREx_ConfigAVD(PWREx_AVDTypeDef *sConfigAVD); -void HAL_PWREx_EnableAVD(void); -void HAL_PWREx_DisableAVD(void); +void HAL_PWREx_ConfigAVD (PWREx_AVDTypeDef *sConfigAVD); +void HAL_PWREx_EnableAVD (void); +void HAL_PWREx_DisableAVD (void); /* Power PVD/AVD IRQ Handler */ -void HAL_PWREx_PVD_AVD_IRQHandler(void); -void HAL_PWREx_AVDCallback(void); +void HAL_PWREx_PVD_AVD_IRQHandler (void); +void HAL_PWREx_AVDCallback (void); /** * @} */ @@ -636,6 +661,7 @@ void HAL_PWREx_AVDCallback(void); ((STATE) == PWR_D3_DOMAIN_RUN)) /* Check wake up pin parameter */ +#if defined (PWR_WKUPEPR_WKUPEN3) #define IS_PWR_WAKEUP_PIN(PIN) (((PIN) == PWR_WAKEUP_PIN1) ||\ ((PIN) == PWR_WAKEUP_PIN2) ||\ ((PIN) == PWR_WAKEUP_PIN3) ||\ @@ -654,6 +680,20 @@ void HAL_PWREx_AVDCallback(void); ((PIN) == PWR_WAKEUP_PIN4_LOW) ||\ ((PIN) == PWR_WAKEUP_PIN5_LOW) ||\ ((PIN) == PWR_WAKEUP_PIN6_LOW)) +#else +#define IS_PWR_WAKEUP_PIN(PIN) (((PIN) == PWR_WAKEUP_PIN1) ||\ + ((PIN) == PWR_WAKEUP_PIN2) ||\ + ((PIN) == PWR_WAKEUP_PIN4) ||\ + ((PIN) == PWR_WAKEUP_PIN6) ||\ + ((PIN) == PWR_WAKEUP_PIN1_HIGH) ||\ + ((PIN) == PWR_WAKEUP_PIN2_HIGH) ||\ + ((PIN) == PWR_WAKEUP_PIN4_HIGH) ||\ + ((PIN) == PWR_WAKEUP_PIN6_HIGH) ||\ + ((PIN) == PWR_WAKEUP_PIN1_LOW) ||\ + ((PIN) == PWR_WAKEUP_PIN2_LOW) ||\ + ((PIN) == PWR_WAKEUP_PIN4_LOW) ||\ + ((PIN) == PWR_WAKEUP_PIN6_LOW)) +#endif /* defined (PWR_WKUPEPR_WKUPEN3) */ /* Check wake up pin polarity parameter */ #define IS_PWR_WAKEUP_PIN_POLARITY(POLARITY) (((POLARITY) == PWR_PIN_POLARITY_HIGH) ||\ @@ -665,6 +705,7 @@ void HAL_PWREx_AVDCallback(void); ((PULL) == PWR_PIN_PULL_DOWN)) /* Check wake up flag parameter */ +#if defined (PWR_WKUPEPR_WKUPEN3) #define IS_PWR_WAKEUP_FLAG(FLAG) (((FLAG) == PWR_WAKEUP_FLAG1) ||\ ((FLAG) == PWR_WAKEUP_FLAG2) ||\ ((FLAG) == PWR_WAKEUP_FLAG3) ||\ @@ -672,6 +713,13 @@ void HAL_PWREx_AVDCallback(void); ((FLAG) == PWR_WAKEUP_FLAG5) ||\ ((FLAG) == PWR_WAKEUP_FLAG6) ||\ ((FLAG) == PWR_WAKEUP_FLAG_ALL)) +#else +#define IS_PWR_WAKEUP_FLAG(FLAG) (((FLAG) == PWR_WAKEUP_FLAG1) ||\ + ((FLAG) == PWR_WAKEUP_FLAG2) ||\ + ((FLAG) == PWR_WAKEUP_FLAG4) ||\ + ((FLAG) == PWR_WAKEUP_FLAG6) ||\ + ((FLAG) == PWR_WAKEUP_FLAG_ALL)) +#endif /* defined (PWR_WKUPEPR_WKUPEN3) */ /* Check wake up flag parameter */ #define IS_PWR_AVD_LEVEL(LEVEL) (((LEVEL) == PWR_AVDLEVEL_0) ||\ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h index ceb8644..a705190 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h @@ -211,11 +211,7 @@ typedef struct #define RCC_HSI_DIV8 (RCC_CR_HSIDIV | RCC_CR_HSION) /*!< HSI_DIV8 clock activation */ -#if defined(RCC_HSICFGR_HSITRIM_6) -#define RCC_HSICALIBRATION_DEFAULT (0x40U) /* Default HSI calibration trimming value, for STM32H7 rev.V and above */ -#else -#define RCC_HSICALIBRATION_DEFAULT (0x20U) /* Default HSI calibration trimming value, for STM32H7 rev.Y */ -#endif +#define RCC_HSICALIBRATION_DEFAULT (0x40U) /* Default HSI calibration trimming value for STM32H7 rev.V and above. (0x20 value for rev.Y handled within __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST macro ) */ /** * @} */ @@ -246,11 +242,7 @@ typedef struct #define RCC_CSI_OFF (0x00000000U) #define RCC_CSI_ON RCC_CR_CSION -#if defined(RCC_CSICFGR_CSITRIM_5) -#define RCC_CSICALIBRATION_DEFAULT (0x20U) /* Default CSI calibration trimming value */ -#else -#define RCC_CSICALIBRATION_DEFAULT (0x10U) /* Default CSI calibration trimming value */ -#endif /* RCC_CSICFGR_CSITRIM_5 */ +#define RCC_CSICALIBRATION_DEFAULT (0x20U) /* Default CSI calibration trimming value for STM32H7 rev.V and above. (0x10 value for rev.Y handled within __HAL_RCC_CSI_CALIBRATIONVALUE_ADJUST macro ) */ /** * @} */ @@ -1212,6 +1204,26 @@ typedef struct UNUSED(tmpreg); \ } while(0) +#if defined(FMAC) +#define __HAL_RCC_FMAC_CLK_ENABLE() do { \ + __IO uint32_t tmpreg; \ + SET_BIT(RCC->AHB2ENR, RCC_AHB2ENR_FMACEN);\ + /* Delay after an RCC peripheral clock enabling */ \ + tmpreg = READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_FMACEN);\ + UNUSED(tmpreg); \ + } while(0) +#endif /* FMAC */ + +#if defined(CORDIC) +#define __HAL_RCC_CORDIC_CLK_ENABLE() do { \ + __IO uint32_t tmpreg; \ + SET_BIT(RCC->AHB2ENR, RCC_AHB2ENR_CORDICEN);\ + /* Delay after an RCC peripheral clock enabling */ \ + tmpreg = READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_CORDICEN);\ + UNUSED(tmpreg); \ + } while(0) +#endif /* CORDIC */ + #if defined(RCC_AHB2ENR_D2SRAM1EN) #define __HAL_RCC_D2SRAM1_CLK_ENABLE() do { \ __IO uint32_t tmpreg; \ @@ -1292,6 +1304,12 @@ typedef struct #endif /* HASH */ #define __HAL_RCC_RNG_CLK_DISABLE() (RCC->AHB2ENR &= ~ (RCC_AHB2ENR_RNGEN)) #define __HAL_RCC_SDMMC2_CLK_DISABLE() (RCC->AHB2ENR &= ~ (RCC_AHB2ENR_SDMMC2EN)) +#if defined(FMAC) +#define __HAL_RCC_FMAC_CLK_DISABLE() (RCC->AHB2ENR &= ~ (RCC_AHB2ENR_FMACEN)) +#endif /* FMAC */ +#if defined(CORDIC) +#define __HAL_RCC_CORDIC_CLK_DISABLE() (RCC->AHB2ENR &= ~ (RCC_AHB2ENR_CORDICEN)) +#endif /* CORDIC */ #if defined(RCC_AHB2ENR_D2SRAM1EN) #define __HAL_RCC_D2SRAM1_CLK_DISABLE() (RCC->AHB2ENR &= ~ (RCC_AHB2ENR_D2SRAM1EN)) #else @@ -1332,6 +1350,12 @@ typedef struct #endif /* HASH */ #define __HAL_RCC_RNG_IS_CLK_ENABLED() ((RCC->AHB2ENR & RCC_AHB2ENR_RNGEN) != 0U) #define __HAL_RCC_SDMMC2_IS_CLK_ENABLED() ((RCC->AHB2ENR & RCC_AHB2ENR_SDMMC2EN) != 0U) +#if defined(FMAC) +#define __HAL_RCC_FMAC_IS_CLK_ENABLED() ((RCC->AHB2ENR & RCC_AHB2ENR_FMACEN) != 0U) +#endif /* FMAC */ +#if defined(CORDIC) +#define __HAL_RCC_CORDIC_IS_CLK_ENABLED() ((RCC->AHB2ENR & RCC_AHB2ENR_CORDICEN) != 0U) +#endif /* CORDIC */ #if defined(RCC_AHB2ENR_D2SRAM1EN) #define __HAL_RCC_D2SRAM1_IS_CLK_ENABLED() ((RCC->AHB2ENR & RCC_AHB2ENR_D2SRAM1EN) != 0U) #else @@ -1366,6 +1390,12 @@ typedef struct #endif /* HASH */ #define __HAL_RCC_RNG_IS_CLK_DISABLED() ((RCC->AHB2ENR & RCC_AHB2ENR_RNGEN) == 0U) #define __HAL_RCC_SDMMC2_IS_CLK_DISABLED() ((RCC->AHB2ENR & RCC_AHB2ENR_SDMMC2EN) == 0U) +#if defined(FMAC) +#define __HAL_RCC_FMAC_IS_CLK_DISABLED() ((RCC->AHB2ENR & RCC_AHB2ENR_FMACEN) == 0U) +#endif /* FMAC */ +#if defined(CORDIC) +#define __HAL_RCC_CORDIC_IS_CLK_DISABLED() ((RCC->AHB2ENR & RCC_AHB2ENR_CORDICEN) == 0U) +#endif /* CORDIC */ #if defined(RCC_AHB2ENR_D2SRAM1EN) #define __HAL_RCC_D2SRAM1_IS_CLK_DISABLED() ((RCC->AHB2ENR & RCC_AHB2ENR_D2SRAM1EN) == 0U) #else @@ -1456,6 +1486,7 @@ typedef struct UNUSED(tmpreg); \ } while(0) +#if defined(GPIOI) #define __HAL_RCC_GPIOI_CLK_ENABLE() do { \ __IO uint32_t tmpreg; \ SET_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIOIEN);\ @@ -1463,6 +1494,7 @@ typedef struct tmpreg = READ_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIOIEN);\ UNUSED(tmpreg); \ } while(0) +#endif /* GPIOI */ #define __HAL_RCC_GPIOJ_CLK_ENABLE() do { \ __IO uint32_t tmpreg; \ @@ -1557,7 +1589,9 @@ typedef struct #define __HAL_RCC_GPIOF_CLK_DISABLE() (RCC->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOFEN) #define __HAL_RCC_GPIOG_CLK_DISABLE() (RCC->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOGEN) #define __HAL_RCC_GPIOH_CLK_DISABLE() (RCC->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOHEN) +#if defined(GPIOI) #define __HAL_RCC_GPIOI_CLK_DISABLE() (RCC->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOIEN) +#endif /* GPIOI */ #define __HAL_RCC_GPIOJ_CLK_DISABLE() (RCC->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOJEN) #define __HAL_RCC_GPIOK_CLK_DISABLE() (RCC->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOKEN) #if defined(RCC_AHB4ENR_CRCEN) @@ -1595,7 +1629,9 @@ typedef struct #define __HAL_RCC_GPIOF_IS_CLK_ENABLED() ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOFEN) != 0U) #define __HAL_RCC_GPIOG_IS_CLK_ENABLED() ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOGEN) != 0U) #define __HAL_RCC_GPIOH_IS_CLK_ENABLED() ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOHEN) != 0U) +#if defined(GPIOI) #define __HAL_RCC_GPIOI_IS_CLK_ENABLED() ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOIEN) != 0U) +#endif /* GPIOI */ #define __HAL_RCC_GPIOJ_IS_CLK_ENABLED() ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOJEN) != 0U) #define __HAL_RCC_GPIOK_IS_CLK_ENABLED() ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOKEN) != 0U) #if defined(RCC_AHB4ENR_CRCEN) @@ -1626,7 +1662,9 @@ typedef struct #define __HAL_RCC_GPIOF_IS_CLK_DISABLED() ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOFEN) == 0U) #define __HAL_RCC_GPIOG_IS_CLK_DISABLED() ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOGEN) == 0U) #define __HAL_RCC_GPIOH_IS_CLK_DISABLED() ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOHEN) == 0U) +#if defined(GPIOI) #define __HAL_RCC_GPIOI_IS_CLK_DISABLED() ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOIEN) == 0U) +#endif /* GPIOI */ #define __HAL_RCC_GPIOJ_IS_CLK_DISABLED() ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOJEN) == 0U) #define __HAL_RCC_GPIOK_IS_CLK_DISABLED() ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOKEN) == 0U) @@ -1891,6 +1929,16 @@ typedef struct UNUSED(tmpreg); \ } while(0) +#if defined(I2C5) +#define __HAL_RCC_I2C5_CLK_ENABLE() do { \ + __IO uint32_t tmpreg; \ + SET_BIT(RCC->APB1LENR, RCC_APB1LENR_I2C5EN);\ + /* Delay after an RCC peripheral clock enabling */ \ + tmpreg = READ_BIT(RCC->APB1LENR, RCC_APB1LENR_I2C5EN);\ + UNUSED(tmpreg); \ + } while(0) +#endif /* I2C5 */ + #define __HAL_RCC_CEC_CLK_ENABLE() do { \ __IO uint32_t tmpreg; \ SET_BIT(RCC->APB1LENR, RCC_APB1LENR_CECEN);\ @@ -1963,6 +2011,25 @@ typedef struct UNUSED(tmpreg); \ } while(0) +#if defined(TIM23) +#define __HAL_RCC_TIM23_CLK_ENABLE() do { \ + __IO uint32_t tmpreg; \ + SET_BIT(RCC->APB1HENR, RCC_APB1HENR_TIM23EN);\ + /* Delay after an RCC peripheral clock enabling */ \ + tmpreg = READ_BIT(RCC->APB1HENR, RCC_APB1HENR_TIM23EN);\ + UNUSED(tmpreg); \ + } while(0) +#endif /* TIM23 */ + +#if defined(TIM24) +#define __HAL_RCC_TIM24_CLK_ENABLE() do { \ + __IO uint32_t tmpreg; \ + SET_BIT(RCC->APB1HENR, RCC_APB1HENR_TIM24EN);\ + /* Delay after an RCC peripheral clock enabling */ \ + tmpreg = READ_BIT(RCC->APB1HENR, RCC_APB1HENR_TIM24EN);\ + UNUSED(tmpreg); \ + } while(0) +#endif /* TIM24 */ #define __HAL_RCC_TIM2_CLK_DISABLE() (RCC->APB1LENR) &= ~ (RCC_APB1LENR_TIM2EN) #define __HAL_RCC_TIM3_CLK_DISABLE() (RCC->APB1LENR) &= ~ (RCC_APB1LENR_TIM3EN) @@ -1989,6 +2056,9 @@ typedef struct #define __HAL_RCC_I2C1_CLK_DISABLE() (RCC->APB1LENR) &= ~ (RCC_APB1LENR_I2C1EN) #define __HAL_RCC_I2C2_CLK_DISABLE() (RCC->APB1LENR) &= ~ (RCC_APB1LENR_I2C2EN) #define __HAL_RCC_I2C3_CLK_DISABLE() (RCC->APB1LENR) &= ~ (RCC_APB1LENR_I2C3EN) +#if defined(I2C5) +#define __HAL_RCC_I2C5_CLK_DISABLE() (RCC->APB1LENR) &= ~ (RCC_APB1LENR_I2C5EN) +#endif /* I2C5 */ #define __HAL_RCC_CEC_CLK_DISABLE() (RCC->APB1LENR) &= ~ (RCC_APB1LENR_CECEN) #define __HAL_RCC_DAC12_CLK_DISABLE() (RCC->APB1LENR) &= ~ (RCC_APB1LENR_DAC12EN) #define __HAL_RCC_UART7_CLK_DISABLE() (RCC->APB1LENR) &= ~ (RCC_APB1LENR_UART7EN) @@ -1998,6 +2068,12 @@ typedef struct #define __HAL_RCC_OPAMP_CLK_DISABLE() (RCC->APB1HENR) &= ~ (RCC_APB1HENR_OPAMPEN) #define __HAL_RCC_MDIOS_CLK_DISABLE() (RCC->APB1HENR) &= ~ (RCC_APB1HENR_MDIOSEN) #define __HAL_RCC_FDCAN_CLK_DISABLE() (RCC->APB1HENR) &= ~ (RCC_APB1HENR_FDCANEN) +#if defined(TIM23) +#define __HAL_RCC_TIM23_CLK_DISABLE() (RCC->APB1HENR) &= ~ (RCC_APB1HENR_TIM23EN) +#endif /* TIM23 */ +#if defined(TIM24) +#define __HAL_RCC_TIM24_CLK_DISABLE() (RCC->APB1HENR) &= ~ (RCC_APB1HENR_TIM24EN) +#endif /* TIM24 */ /** @brief Get the enable or disable status of the APB1 peripheral clock @@ -2029,6 +2105,9 @@ typedef struct #define __HAL_RCC_I2C1_IS_CLK_ENABLED() ((RCC->APB1LENR & RCC_APB1LENR_I2C1EN) != 0U) #define __HAL_RCC_I2C2_IS_CLK_ENABLED() ((RCC->APB1LENR & RCC_APB1LENR_I2C2EN) != 0U) #define __HAL_RCC_I2C3_IS_CLK_ENABLED() ((RCC->APB1LENR & RCC_APB1LENR_I2C3EN) != 0U) +#if defined(I2C5) +#define __HAL_RCC_I2C5_IS_CLK_ENABLED() ((RCC->APB1LENR & RCC_APB1LENR_I2C5EN) != 0U) +#endif /* I2C5 */ #define __HAL_RCC_CEC_IS_CLK_ENABLED() ((RCC->APB1LENR & RCC_APB1LENR_CECEN) != 0U) #define __HAL_RCC_DAC12_IS_CLK_ENABLED() ((RCC->APB1LENR & RCC_APB1LENR_DAC12EN) != 0U) #define __HAL_RCC_UART7_IS_CLK_ENABLED() ((RCC->APB1LENR & RCC_APB1LENR_UART7EN) != 0U) @@ -2038,6 +2117,12 @@ typedef struct #define __HAL_RCC_OPAMP_IS_CLK_ENABLED() ((RCC->APB1HENR & RCC_APB1HENR_OPAMPEN) != 0U) #define __HAL_RCC_MDIOS_IS_CLK_ENABLED() ((RCC->APB1HENR & RCC_APB1HENR_MDIOSEN) != 0U) #define __HAL_RCC_FDCAN_IS_CLK_ENABLED() ((RCC->APB1HENR & RCC_APB1HENR_FDCANEN) != 0U) +#if defined(TIM23) +#define __HAL_RCC_TIM23_IS_CLK_ENABLED() ((RCC->APB1HENR & RCC_APB1HENR_TIM23EN) != 0U) +#endif /* TIM23 */ +#if defined(TIM24) +#define __HAL_RCC_TIM24_IS_CLK_ENABLED() ((RCC->APB1HENR & RCC_APB1HENR_TIM24EN) != 0U) +#endif /* TIM24 */ #define __HAL_RCC_TIM2_IS_CLK_DISABLED() ((RCC->APB1LENR & RCC_APB1LENR_TIM2EN) == 0U) #define __HAL_RCC_TIM3_IS_CLK_DISABLED() ((RCC->APB1LENR & RCC_APB1LENR_TIM3EN) == 0U) @@ -2062,6 +2147,9 @@ typedef struct #define __HAL_RCC_I2C1_IS_CLK_DISABLED() ((RCC->APB1LENR & RCC_APB1LENR_I2C1EN) == 0U) #define __HAL_RCC_I2C2_IS_CLK_DISABLED() ((RCC->APB1LENR & RCC_APB1LENR_I2C2EN) == 0U) #define __HAL_RCC_I2C3_IS_CLK_DISABLED() ((RCC->APB1LENR & RCC_APB1LENR_I2C3EN) == 0U) +#if defined(I2C5) +#define __HAL_RCC_I2C5_IS_CLK_DISABLED() ((RCC->APB1LENR & RCC_APB1LENR_I2C5EN) == 0U) +#endif /* I2C5 */ #define __HAL_RCC_CEC_IS_CLK_DISABLED() ((RCC->APB1LENR & RCC_APB1LENR_CECEN) == 0U) #define __HAL_RCC_DAC12_IS_CLK_DISABLED() ((RCC->APB1LENR & RCC_APB1LENR_DAC12EN) == 0U) #define __HAL_RCC_UART7_IS_CLK_DISABLED() ((RCC->APB1LENR & RCC_APB1LENR_UART7EN) == 0U) @@ -2071,6 +2159,12 @@ typedef struct #define __HAL_RCC_OPAMP_IS_CLK_DISABLED() ((RCC->APB1HENR & RCC_APB1HENR_OPAMPEN) == 0U) #define __HAL_RCC_MDIOS_IS_CLK_DISABLED() ((RCC->APB1HENR & RCC_APB1HENR_MDIOSEN) == 0U) #define __HAL_RCC_FDCAN_IS_CLK_DISABLED() ((RCC->APB1HENR & RCC_APB1HENR_FDCANEN) == 0U) +#if defined(TIM23) +#define __HAL_RCC_TIM23_IS_CLK_DISABLED() ((RCC->APB1HENR & RCC_APB1HENR_TIM23EN) == 0U) +#endif /* TIM23 */ +#if defined(TIM24) +#define __HAL_RCC_TIM24_IS_CLK_DISABLED() ((RCC->APB1HENR & RCC_APB1HENR_TIM24EN) == 0U) +#endif /* TIM24 */ /** @brief Enable or disable the APB2 peripheral clock. @@ -2187,6 +2281,7 @@ typedef struct UNUSED(tmpreg); \ } while(0) +#if defined(SAI2) #define __HAL_RCC_SAI2_CLK_ENABLE() do { \ __IO uint32_t tmpreg; \ SET_BIT(RCC->APB2ENR, RCC_APB2ENR_SAI2EN);\ @@ -2194,6 +2289,7 @@ typedef struct tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_SAI2EN);\ UNUSED(tmpreg); \ } while(0) +#endif /*SAI2*/ #if defined(SAI3) #define __HAL_RCC_SAI3_CLK_ENABLE() do { \ @@ -2240,7 +2336,9 @@ typedef struct #define __HAL_RCC_TIM17_CLK_DISABLE() (RCC->APB2ENR) &= ~ (RCC_APB2ENR_TIM17EN) #define __HAL_RCC_SPI5_CLK_DISABLE() (RCC->APB2ENR) &= ~ (RCC_APB2ENR_SPI5EN) #define __HAL_RCC_SAI1_CLK_DISABLE() (RCC->APB2ENR) &= ~ (RCC_APB2ENR_SAI1EN) +#if defined(SAI2) #define __HAL_RCC_SAI2_CLK_DISABLE() (RCC->APB2ENR) &= ~ (RCC_APB2ENR_SAI2EN) +#endif /*SAI2*/ #if defined(SAI3) #define __HAL_RCC_SAI3_CLK_DISABLE() (RCC->APB2ENR) &= ~ (RCC_APB2ENR_SAI3EN) #endif /*SAI3*/ @@ -2272,7 +2370,9 @@ typedef struct #define __HAL_RCC_TIM17_IS_CLK_ENABLED() ((RCC->APB2ENR & RCC_APB2ENR_TIM17EN) != 0U) #define __HAL_RCC_SPI5_IS_CLK_ENABLED() ((RCC->APB2ENR & RCC_APB2ENR_SPI5EN) != 0U) #define __HAL_RCC_SAI1_IS_CLK_ENABLED() ((RCC->APB2ENR & RCC_APB2ENR_SAI1EN) != 0U) +#if defined(SAI2) #define __HAL_RCC_SAI2_IS_CLK_ENABLED() ((RCC->APB2ENR & RCC_APB2ENR_SAI2EN) != 0U) +#endif /*SAI2*/ #if defined(SAI3) #define __HAL_RCC_SAI3_IS_CLK_ENABLED() ((RCC->APB2ENR & RCC_APB2ENR_SAI3EN) != 0U) #endif /* SAI3 */ @@ -2298,7 +2398,9 @@ typedef struct #define __HAL_RCC_TIM17_IS_CLK_DISABLED() ((RCC->APB2ENR & RCC_APB2ENR_TIM17EN) == 0U) #define __HAL_RCC_SPI5_IS_CLK_DISABLED() ((RCC->APB2ENR & RCC_APB2ENR_SPI5EN) == 0U) #define __HAL_RCC_SAI1_IS_CLK_DISABLED() ((RCC->APB2ENR & RCC_APB2ENR_SAI1EN) == 0U) +#if defined(SAI2) #define __HAL_RCC_SAI2_IS_CLK_DISABLED() ((RCC->APB2ENR & RCC_APB2ENR_SAI2EN) == 0U) +#endif /*SAI2*/ #if defined(SAI3) #define __HAL_RCC_SAI3_IS_CLK_DISABLED() ((RCC->APB2ENR & RCC_APB2ENR_SAI3EN) == 0U) #endif /*SAI3*/ @@ -4559,7 +4661,13 @@ typedef struct /** @brief Enable or disable the AHB3 peripheral reset. */ -#define __HAL_RCC_AHB3_FORCE_RESET() (RCC->AHB3RSTR = 0x7FFFFFFFU) +#if (STM32H7_DEV_ID == 0x450UL) +#define __HAL_RCC_AHB3_FORCE_RESET() (RCC->AHB3RSTR = 0x00015031U) /* Resets MDMA, DMA2D, JPEG, FMC, QSPI and SDMMC1 */ +#elif (STM32H7_DEV_ID == 0x480UL) +#define __HAL_RCC_AHB3_FORCE_RESET() (RCC->AHB3RSTR = 0x01E95031U) /* Resets MDMA, DMA2D, JPEG, FMC, OSPI1, SDMMC1, OSPI2, IOMNGR, OTFD1, OTFD2 and GFXMMU */ +#else +#define __HAL_RCC_AHB3_FORCE_RESET() (RCC->AHB3RSTR = 0x00E95011U) /* Resets MDMA, DMA2D, FMC, OSPI1, SDMMC1, OSPI2, IOMNGR, OTFD1, OTFD2 */ +#endif /* STM32H7_DEV_ID == 0x450UL */ #define __HAL_RCC_MDMA_FORCE_RESET() (RCC->AHB3RSTR |= (RCC_AHB3RSTR_MDMARST)) #define __HAL_RCC_DMA2D_FORCE_RESET() (RCC->AHB3RSTR |= (RCC_AHB3RSTR_DMA2DRST)) #if defined(JPEG) @@ -4623,7 +4731,13 @@ typedef struct /** @brief Force or release the AHB1 peripheral reset. */ -#define __HAL_RCC_AHB1_FORCE_RESET() (RCC->AHB1RSTR = 0xFFFFFFFFU) +#if (STM32H7_DEV_ID == 0x450UL) +#define __HAL_RCC_AHB1_FORCE_RESET() (RCC->AHB1RSTR = 0x0A00C023U) /* Resets DMA1, DMA2, ADC12, ART, ETHMAC, USB1OTG and USB2OTG */ +#elif (STM32H7_DEV_ID == 0x480UL) +#define __HAL_RCC_AHB1_FORCE_RESET() (RCC->AHB1RSTR = 0x02000223U) /* Resets DMA1, DMA2, ADC12, CRC and USB1OTG */ +#else +#define __HAL_RCC_AHB1_FORCE_RESET() (RCC->AHB1RSTR = 0x02008023U) /* Resets DMA1, DMA2, ADC12, ETHMAC and USB1OTG */ +#endif /* STM32H7_DEV_ID == 0x450UL */ #define __HAL_RCC_DMA1_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_DMA1RST)) #define __HAL_RCC_DMA2_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_DMA2RST)) #define __HAL_RCC_ADC12_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_ADC12RST)) @@ -4661,7 +4775,13 @@ typedef struct /** @brief Force or release the AHB2 peripheral reset. */ -#define __HAL_RCC_AHB2_FORCE_RESET() (RCC->AHB2RSTR = 0xFFFFFFFFU) +#if (STM32H7_DEV_ID == 0x450UL) +#define __HAL_RCC_AHB2_FORCE_RESET() (RCC->AHB2RSTR = 0x00000271U) /* Resets DCMI, CRYPT, HASH, RNG and SDMMC2 */ +#elif (STM32H7_DEV_ID == 0x480UL) +#define __HAL_RCC_AHB2_FORCE_RESET() (RCC->AHB2RSTR = 0x00000A75U) /* Resets DCMI_PSSI, HSEM, CRYPT, HASH, RNG, SDMMC2 and BDMA1 */ +#else +#define __HAL_RCC_AHB2_FORCE_RESET() (RCC->AHB2RSTR = 0x00030271U) /* Resets DCMI_PSSI, CRYPT, HASH, RNG, SDMMC2, FMAC and CORDIC */ +#endif /* STM32H7_DEV_ID == 0x450UL */ #if defined(DCMI) && defined(PSSI) #define __HAL_RCC_DCMI_PSSI_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_DCMI_PSSIRST)) #define __HAL_RCC_DCMI_FORCE_RESET() __HAL_RCC_DCMI_PSSI_FORCE_RESET() /* for API backward compatibility*/ @@ -4676,6 +4796,12 @@ typedef struct #endif /* HASH */ #define __HAL_RCC_RNG_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_RNGRST)) #define __HAL_RCC_SDMMC2_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_SDMMC2RST)) +#if defined(FMAC) +#define __HAL_RCC_FMAC_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_FMACRST)) +#endif /*FMAC*/ +#if defined(CORDIC) +#define __HAL_RCC_CORDIC_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_CORDICRST)) +#endif /*CORDIC*/ #if defined(RCC_AHB2RSTR_HSEMRST) #define __HAL_RCC_HSEM_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_HSEMRST)) #endif @@ -4698,6 +4824,12 @@ typedef struct #endif /* HASH */ #define __HAL_RCC_RNG_RELEASE_RESET() (RCC->AHB2RSTR &= ~ (RCC_AHB2RSTR_RNGRST)) #define __HAL_RCC_SDMMC2_RELEASE_RESET() (RCC->AHB2RSTR &= ~ (RCC_AHB2RSTR_SDMMC2RST)) +#if defined(FMAC) +#define __HAL_RCC_FMAC_RELEASE_RESET() (RCC->AHB2RSTR &= ~ (RCC_AHB2RSTR_FMACRST)) +#endif /*FMAC*/ +#if defined(CORDIC) +#define __HAL_RCC_CORDIC_RELEASE_RESET() (RCC->AHB2RSTR &= ~ (RCC_AHB2RSTR_CORDICRST)) +#endif /*CORDIC*/ #if defined(RCC_AHB2RSTR_HSEMRST) #define __HAL_RCC_HSEM_RELEASE_RESET() (RCC->AHB2RSTR &= ~ (RCC_AHB2RSTR_HSEMRST)) #endif @@ -4709,7 +4841,13 @@ typedef struct /** @brief Force or release the AHB4 peripheral reset. */ -#define __HAL_RCC_AHB4_FORCE_RESET() (RCC->AHB4RSTR = 0xFFFFFFFFU) +#if (STM32H7_DEV_ID == 0x450UL) +#define __HAL_RCC_AHB4_FORCE_RESET() (RCC->AHB4RSTR = 0x032807FFU) /* Resets GPIOA..GPIOK, CRC, BDMA, ADC3 and HSEM */ +#elif (STM32H7_DEV_ID == 0x480UL) +#define __HAL_RCC_AHB4_FORCE_RESET() (RCC->AHB4RSTR = 0x002007FFU) /* Resets GPIOA..GPIOK and BDMA2 */ +#else +#define __HAL_RCC_AHB4_FORCE_RESET() (RCC->AHB4RSTR = 0x032806FFU) /* Resets GPIOA..GPIOH, GPIOJ, GPIOK, CRC, BDMA, ADC3 and HSEM */ +#endif /* STM32H7_DEV_ID == 0x450UL */ #define __HAL_RCC_GPIOA_FORCE_RESET() (RCC->AHB4RSTR) |= (RCC_AHB4RSTR_GPIOARST) #define __HAL_RCC_GPIOB_FORCE_RESET() (RCC->AHB4RSTR) |= (RCC_AHB4RSTR_GPIOBRST) #define __HAL_RCC_GPIOC_FORCE_RESET() (RCC->AHB4RSTR) |= (RCC_AHB4RSTR_GPIOCRST) @@ -4718,7 +4856,9 @@ typedef struct #define __HAL_RCC_GPIOF_FORCE_RESET() (RCC->AHB4RSTR) |= (RCC_AHB4RSTR_GPIOFRST) #define __HAL_RCC_GPIOG_FORCE_RESET() (RCC->AHB4RSTR) |= (RCC_AHB4RSTR_GPIOGRST) #define __HAL_RCC_GPIOH_FORCE_RESET() (RCC->AHB4RSTR) |= (RCC_AHB4RSTR_GPIOHRST) +#if defined(GPIOI) #define __HAL_RCC_GPIOI_FORCE_RESET() (RCC->AHB4RSTR) |= (RCC_AHB4RSTR_GPIOIRST) +#endif /* GPIOI */ #define __HAL_RCC_GPIOJ_FORCE_RESET() (RCC->AHB4RSTR) |= (RCC_AHB4RSTR_GPIOJRST) #define __HAL_RCC_GPIOK_FORCE_RESET() (RCC->AHB4RSTR) |= (RCC_AHB4RSTR_GPIOKRST) #if defined(RCC_AHB4RSTR_CRCRST) @@ -4746,7 +4886,9 @@ typedef struct #define __HAL_RCC_GPIOF_RELEASE_RESET() (RCC->AHB4RSTR) &= ~ (RCC_AHB4RSTR_GPIOFRST) #define __HAL_RCC_GPIOG_RELEASE_RESET() (RCC->AHB4RSTR) &= ~ (RCC_AHB4RSTR_GPIOGRST) #define __HAL_RCC_GPIOH_RELEASE_RESET() (RCC->AHB4RSTR) &= ~ (RCC_AHB4RSTR_GPIOHRST) +#if defined(GPIOI) #define __HAL_RCC_GPIOI_RELEASE_RESET() (RCC->AHB4RSTR) &= ~ (RCC_AHB4RSTR_GPIOIRST) +#endif /* GPIOI */ #define __HAL_RCC_GPIOJ_RELEASE_RESET() (RCC->AHB4RSTR) &= ~ (RCC_AHB4RSTR_GPIOJRST) #define __HAL_RCC_GPIOK_RELEASE_RESET() (RCC->AHB4RSTR) &= ~ (RCC_AHB4RSTR_GPIOKRST) #if defined(RCC_AHB4RSTR_CRCRST) @@ -4767,7 +4909,11 @@ typedef struct /** @brief Force or release the APB3 peripheral reset. */ -#define __HAL_RCC_APB3_FORCE_RESET() (RCC->APB3RSTR = 0xFFFFFFFFU) +#if (STM32H7_DEV_ID == 0x450UL) +#define __HAL_RCC_APB3_FORCE_RESET() (RCC->APB3RSTR = 0x00000018U) /* Rests LTDC and DSI */ +#else +#define __HAL_RCC_APB3_FORCE_RESET() (RCC->APB3RSTR = 0x00000008U) /* Rests LTDC */ +#endif /* STM32H7_DEV_ID == 0x450UL */ #if defined(LTDC) #define __HAL_RCC_LTDC_FORCE_RESET() (RCC->APB3RSTR) |= (RCC_APB3RSTR_LTDCRST) #endif /* LTDC */ @@ -4785,8 +4931,16 @@ typedef struct /** @brief Force or release the APB1 peripheral reset. */ -#define __HAL_RCC_APB1L_FORCE_RESET() (RCC->APB1LRSTR = 0xFFFFFFFFU) -#define __HAL_RCC_APB1H_FORCE_RESET() (RCC->APB1HRSTR = 0xFFFFFFFFU) +#if (STM32H7_DEV_ID == 0x450UL) || (STM32H7_DEV_ID == 0x480UL) +#define __HAL_RCC_APB1L_FORCE_RESET() (RCC->APB1LRSTR = 0xE8FFC3FFU) /* Resets TIM2..TIM7, TIM12..TIM14, LPTIM1, SPI2, SPI3, SPDIFRX, USART2, USART3, UART4, UART5, I2C1..I2C3, CEC, DAC1(2), UART7 and UART8 */ +#else +#define __HAL_RCC_APB1L_FORCE_RESET() (RCC->APB1LRSTR = 0xEAFFC3FFU) /* Resets TIM2..TIM7, TIM12..TIM14, LPTIM1, SPI2, SPI3, SPDIFRX, USART2, USART3, UART4, UART5, I2C1..I2C3, I2C5, CEC, DAC12, UART7 and UART8 */ +#endif /* STM32H7_DEV_ID == 0x450UL */ +#if (STM32H7_DEV_ID == 0x450UL) || (STM32H7_DEV_ID == 0x480UL) +#define __HAL_RCC_APB1H_FORCE_RESET() (RCC->APB1HRSTR = 0x00000136U) /* Resets CRS, SWP, OPAMP, MDIOS and FDCAN */ +#else +#define __HAL_RCC_APB1H_FORCE_RESET() (RCC->APB1HRSTR = 0x03000136U) /* Resets CRS, SWP, OPAMP, MDIOS, FDCAN, TIM23 and TIM24 */ +#endif /* STM32H7_DEV_ID == 0x450UL */ #define __HAL_RCC_TIM2_FORCE_RESET() (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_TIM2RST) #define __HAL_RCC_TIM3_FORCE_RESET() (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_TIM3RST) #define __HAL_RCC_TIM4_FORCE_RESET() (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_TIM4RST) @@ -4807,6 +4961,9 @@ typedef struct #define __HAL_RCC_I2C1_FORCE_RESET() (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_I2C1RST) #define __HAL_RCC_I2C2_FORCE_RESET() (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_I2C2RST) #define __HAL_RCC_I2C3_FORCE_RESET() (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_I2C3RST) +#if defined(I2C5) +#define __HAL_RCC_I2C5_FORCE_RESET() (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_I2C5RST) +#endif /* I2C5 */ #define __HAL_RCC_CEC_FORCE_RESET() (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_CECRST) #define __HAL_RCC_DAC12_FORCE_RESET() (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_DAC12RST) #define __HAL_RCC_UART7_FORCE_RESET() (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_UART7RST) @@ -4816,6 +4973,12 @@ typedef struct #define __HAL_RCC_OPAMP_FORCE_RESET() (RCC->APB1HRSTR) |= (RCC_APB1HRSTR_OPAMPRST) #define __HAL_RCC_MDIOS_FORCE_RESET() (RCC->APB1HRSTR) |= (RCC_APB1HRSTR_MDIOSRST) #define __HAL_RCC_FDCAN_FORCE_RESET() (RCC->APB1HRSTR) |= (RCC_APB1HRSTR_FDCANRST) +#if defined(TIM23) +#define __HAL_RCC_TIM23_FORCE_RESET() (RCC->APB1HRSTR) |= (RCC_APB1HRSTR_TIM23RST) +#endif /* TIM23 */ +#if defined(TIM24) +#define __HAL_RCC_TIM24_FORCE_RESET() (RCC->APB1HRSTR) |= (RCC_APB1HRSTR_TIM24RST) +#endif /* TIM24 */ #define __HAL_RCC_APB1L_RELEASE_RESET() (RCC->APB1LRSTR = 0x00U) #define __HAL_RCC_APB1H_RELEASE_RESET() (RCC->APB1HRSTR = 0x00U) @@ -4839,6 +5002,9 @@ typedef struct #define __HAL_RCC_I2C1_RELEASE_RESET() (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_I2C1RST) #define __HAL_RCC_I2C2_RELEASE_RESET() (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_I2C2RST) #define __HAL_RCC_I2C3_RELEASE_RESET() (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_I2C3RST) +#if defined(I2C5) +#define __HAL_RCC_I2C5_RELEASE_RESET() (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_I2C5RST) +#endif /* I2C5 */ #define __HAL_RCC_CEC_RELEASE_RESET() (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_CECRST) #define __HAL_RCC_DAC12_RELEASE_RESET() (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_DAC12RST) #define __HAL_RCC_UART7_RELEASE_RESET() (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_UART7RST) @@ -4848,10 +5014,22 @@ typedef struct #define __HAL_RCC_OPAMP_RELEASE_RESET() (RCC->APB1HRSTR) &= ~ (RCC_APB1HRSTR_OPAMPRST) #define __HAL_RCC_MDIOS_RELEASE_RESET() (RCC->APB1HRSTR) &= ~ (RCC_APB1HRSTR_MDIOSRST) #define __HAL_RCC_FDCAN_RELEASE_RESET() (RCC->APB1HRSTR) &= ~ (RCC_APB1HRSTR_FDCANRST) +#if defined(TIM23) +#define __HAL_RCC_TIM23_RELEASE_RESET() (RCC->APB1HRSTR) &= ~ (RCC_APB1HRSTR_TIM23RST) +#endif /* TIM23 */ +#if defined(TIM24) +#define __HAL_RCC_TIM24_RELEASE_RESET() (RCC->APB1HRSTR) &= ~ (RCC_APB1HRSTR_TIM24RST) +#endif /* TIM24 */ /** @brief Force or release the APB2 peripheral reset. */ -#define __HAL_RCC_APB2_FORCE_RESET() (RCC->APB2RSTR = 0xFFFFFFFFU) +#if (STM32H7_DEV_ID == 0x450UL) +#define __HAL_RCC_APB2_FORCE_RESET() (RCC->APB2RSTR = 0x31D73033U) /* Resets TIM1, TIM8, USART1, USART6, SPI1, SPI4, TIM15..TIM17, SPI5, SAI1..SAI3, DFSDM1 and HRTIM */ +#elif (STM32H7_DEV_ID == 0x480UL) +#define __HAL_RCC_APB2_FORCE_RESET() (RCC->APB2RSTR = 0x40D730F3U) /* Resets TIM1, TIM8, USART1, USART6, UART9, USART10, SPI1, SPI4, TIM15..TIM17, SPI5, SAI1, SAI2 and DFSDM1 */ +#else +#define __HAL_RCC_APB2_FORCE_RESET() (RCC->APB2RSTR = 0x405730F3U) /* Resets TIM1, TIM8, USART1, USART6, UART9, USART10, SPI1, SPI4, TIM15..TIM17, SPI5, SAI1 and DFSDM1 */ +#endif /* STM32H7_DEV_ID == 0x450UL */ #define __HAL_RCC_TIM1_FORCE_RESET() (RCC->APB2RSTR) |= (RCC_APB2RSTR_TIM1RST) #define __HAL_RCC_TIM8_FORCE_RESET() (RCC->APB2RSTR) |= (RCC_APB2RSTR_TIM8RST) #define __HAL_RCC_USART1_FORCE_RESET() (RCC->APB2RSTR) |= (RCC_APB2RSTR_USART1RST) @@ -4869,7 +5047,9 @@ typedef struct #define __HAL_RCC_TIM17_FORCE_RESET() (RCC->APB2RSTR) |= (RCC_APB2RSTR_TIM17RST) #define __HAL_RCC_SPI5_FORCE_RESET() (RCC->APB2RSTR) |= (RCC_APB2RSTR_SPI5RST) #define __HAL_RCC_SAI1_FORCE_RESET() (RCC->APB2RSTR) |= (RCC_APB2RSTR_SAI1RST) +#if defined(SAI2) #define __HAL_RCC_SAI2_FORCE_RESET() (RCC->APB2RSTR) |= (RCC_APB2RSTR_SAI2RST) +#endif /* SAI2 */ #if defined(SAI3) #define __HAL_RCC_SAI3_FORCE_RESET() (RCC->APB2RSTR) |= (RCC_APB2RSTR_SAI3RST) #endif /*SAI3*/ @@ -4896,7 +5076,9 @@ typedef struct #define __HAL_RCC_TIM17_RELEASE_RESET() (RCC->APB2RSTR) &= ~ (RCC_APB2RSTR_TIM17RST) #define __HAL_RCC_SPI5_RELEASE_RESET() (RCC->APB2RSTR) &= ~ (RCC_APB2RSTR_SPI5RST) #define __HAL_RCC_SAI1_RELEASE_RESET() (RCC->APB2RSTR) &= ~ (RCC_APB2RSTR_SAI1RST) +#if defined(SAI2) #define __HAL_RCC_SAI2_RELEASE_RESET() (RCC->APB2RSTR) &= ~ (RCC_APB2RSTR_SAI2RST) +#endif /* SAI2 */ #if defined(SAI3) #define __HAL_RCC_SAI3_RELEASE_RESET() (RCC->APB2RSTR) &= ~ (RCC_APB2RSTR_SAI3RST) #endif /*SAI3*/ @@ -4908,7 +5090,13 @@ typedef struct /** @brief Force or release the APB4 peripheral reset. */ -#define __HAL_RCC_APB4_FORCE_RESET() (RCC->APB4RSTR = 0xFFFFFFFFU) +#if (STM32H7_DEV_ID == 0x450UL) +#define __HAL_RCC_APB4_FORCE_RESET() (RCC->APB4RSTR = 0x0020DEAAU) /* Resets SYSCFG, LPUART1, SPI6, I2C4, LPTIM2..LPTIM5, COMP12, VREF and SAI4 */ +#elif (STM32H7_DEV_ID == 0x480UL) +#define __HAL_RCC_APB4_FORCE_RESET() (RCC->APB4RSTR = 0x0C00E6AAU) /* Resets SYSCFG, LPUART1, SPI6, I2C4, LPTIM2, LPTIM3, DAC2, COMP12, VREF, DTS and DFSDM2 */ +#else +#define __HAL_RCC_APB4_FORCE_RESET() (RCC->APB4RSTR = 0x0420DEAAU) /* Resets SYSCFG, LPUART1, SPI6, I2C4, LPTIM2..LPTIM5, COMP12, VREF, SAI4 and DTS */ +#endif /* STM32H7_DEV_ID == 0x450UL */ #define __HAL_RCC_SYSCFG_FORCE_RESET() (RCC->APB4RSTR) |= (RCC_APB4RSTR_SYSCFGRST) #define __HAL_RCC_LPUART1_FORCE_RESET() (RCC->APB4RSTR) |= (RCC_APB4RSTR_LPUART1RST) #define __HAL_RCC_SPI6_FORCE_RESET() (RCC->APB4RSTR) |= (RCC_APB4RSTR_SPI6RST) @@ -5290,6 +5478,12 @@ typedef struct #if defined(RCC_AHB2LPENR_DFSDMDMALPEN) #define __HAL_RCC_DFSDMDMA_CLK_SLEEP_ENABLE() (RCC->AHB2LPENR |= (RCC_AHB2LPENR_DFSDMDMALPEN)) #endif +#if defined(FMAC) +#define __HAL_RCC_FMAC_CLK_SLEEP_ENABLE() (RCC->AHB2LPENR |= (RCC_AHB2LPENR_FMACLPEN)) +#endif /* FMAC */ +#if defined(CORDIC) +#define __HAL_RCC_CORDIC_CLK_SLEEP_ENABLE() (RCC->AHB2LPENR |= (RCC_AHB2LPENR_CORDICLPEN)) +#endif /* CORDIC */ #if defined(RCC_AHB2LPENR_D2SRAM1LPEN) #define __HAL_RCC_D2SRAM1_CLK_SLEEP_ENABLE() (RCC->AHB2LPENR |= (RCC_AHB2LPENR_D2SRAM1LPEN)) #else @@ -5321,6 +5515,12 @@ typedef struct #if defined(RCC_AHB2LPENR_DFSDMDMALPEN) #define __HAL_RCC_DFSDMDMA_CLK_SLEEP_DISABLE() (RCC->AHB2LPENR &= ~ (RCC_AHB2LPENR_DFSDMDMALPEN)) #endif +#if defined(FMAC) +#define __HAL_RCC_FMAC_CLK_SLEEP_DISABLE() (RCC->AHB2LPENR &= ~ (RCC_AHB2LPENR_FMACLPEN)) +#endif /* FMAC */ +#if defined(CORDIC) +#define __HAL_RCC_CORDIC_CLK_SLEEP_DISABLE() (RCC->AHB2LPENR &= ~ (RCC_AHB2LPENR_CORDICLPEN)) +#endif /* CORDIC */ #if defined(RCC_AHB2LPENR_D2SRAM1LPEN) #define __HAL_RCC_D2SRAM1_CLK_SLEEP_DISABLE() (RCC->AHB2LPENR &= ~ (RCC_AHB2LPENR_D2SRAM1LPEN)) #else @@ -5359,6 +5559,12 @@ typedef struct #if defined(RCC_AHB2LPENR_DFSDMDMALPEN) #define __HAL_RCC_DFSDMDMA_IS_CLK_SLEEP_ENABLED() ((RCC->AHB2LPENR & (RCC_AHB2LPENR_DFSDMDMALPEN)) != 0U) #endif +#if defined(FMAC) +#define __HAL_RCC_FMAC_IS_CLK_SLEEP_ENABLED() ((RCC->AHB2LPENR & (RCC_AHB2LPENR_FMACLPEN)) != 0U) +#endif /* FMAC */ +#if defined(CORDIC) +#define __HAL_RCC_CORDIC_IS_CLK_SLEEP_ENABLED() ((RCC->AHB2LPENR & (RCC_AHB2LPENR_CORDICLPEN)) != 0U) +#endif /* CORDIC */ #if defined(RCC_AHB2LPENR_D2SRAM1LPEN) #define __HAL_RCC_D2SRAM1_IS_CLK_SLEEP_ENABLED() ((RCC->AHB2LPENR & (RCC_AHB2LPENR_D2SRAM1LPEN)) != 0U) #else @@ -5390,6 +5596,12 @@ typedef struct #define __HAL_RCC_DFSDMDMA_IS_CLK_SLEEP_DISABLED() ((RCC->AHB2LPENR & (RCC_AHB2LPENR_DFSDMDMALPEN)) == 0U) #endif #define __HAL_RCC_SDMMC2_IS_CLK_SLEEP_DISABLED() ((RCC->AHB2LPENR & (RCC_AHB2LPENR_SDMMC2LPEN)) == 0U) +#if defined(FMAC) +#define __HAL_RCC_FMAC_IS_CLK_SLEEP_DISABLED() ((RCC->AHB2LPENR & (RCC_AHB2LPENR_FMACLPEN)) == 0U) +#endif /* FMAC */ +#if defined(CORDIC) +#define __HAL_RCC_CORDIC_IS_CLK_SLEEP_DISABLED() ((RCC->AHB2LPENR & (RCC_AHB2LPENR_CORDICLPEN)) == 0U) +#endif /* CORDIC */ #if defined(RCC_AHB2LPENR_D2SRAM1LPEN) #define __HAL_RCC_D2SRAM1_IS_CLK_SLEEP_DISABLED() ((RCC->AHB2LPENR & (RCC_AHB2LPENR_D2SRAM1LPEN)) == 0U) #else @@ -5420,7 +5632,9 @@ typedef struct #define __HAL_RCC_GPIOF_CLK_SLEEP_ENABLE() (RCC->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOFLPEN) #define __HAL_RCC_GPIOG_CLK_SLEEP_ENABLE() (RCC->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOGLPEN) #define __HAL_RCC_GPIOH_CLK_SLEEP_ENABLE() (RCC->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOHLPEN) +#if defined(GPIOI) #define __HAL_RCC_GPIOI_CLK_SLEEP_ENABLE() (RCC->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOILPEN) +#endif /* GPIOI */ #define __HAL_RCC_GPIOJ_CLK_SLEEP_ENABLE() (RCC->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOJLPEN) #define __HAL_RCC_GPIOK_CLK_SLEEP_ENABLE() (RCC->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOKLPEN) #if defined(RCC_AHB4LPENR_CRCLPEN) @@ -5451,7 +5665,9 @@ typedef struct #define __HAL_RCC_GPIOF_CLK_SLEEP_DISABLE() (RCC->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOFLPEN) #define __HAL_RCC_GPIOG_CLK_SLEEP_DISABLE() (RCC->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOGLPEN) #define __HAL_RCC_GPIOH_CLK_SLEEP_DISABLE() (RCC->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOHLPEN) +#if defined(GPIOI) #define __HAL_RCC_GPIOI_CLK_SLEEP_DISABLE() (RCC->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOILPEN) +#endif /* GPIOI */ #define __HAL_RCC_GPIOJ_CLK_SLEEP_DISABLE() (RCC->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOJLPEN) #define __HAL_RCC_GPIOK_CLK_SLEEP_DISABLE() (RCC->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOKLPEN) #if defined(RCC_AHB4LPENR_CRCLPEN) @@ -5490,7 +5706,9 @@ typedef struct #define __HAL_RCC_GPIOF_IS_CLK_SLEEP_ENABLED() ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOFLPEN)) != 0U) #define __HAL_RCC_GPIOG_IS_CLK_SLEEP_ENABLED() ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOGLPEN)) != 0U) #define __HAL_RCC_GPIOH_IS_CLK_SLEEP_ENABLED() ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOHLPEN)) != 0U) +#if defined(GPIOI) #define __HAL_RCC_GPIOI_IS_CLK_SLEEP_ENABLED() ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOILPEN)) != 0U) +#endif /* GPIOI */ #define __HAL_RCC_GPIOJ_IS_CLK_SLEEP_ENABLED() ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOJLPEN)) != 0U) #define __HAL_RCC_GPIOK_IS_CLK_SLEEP_ENABLED() ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOKLPEN)) != 0U) #if defined(RCC_AHB4LPENR_CRCLPEN) @@ -5521,7 +5739,9 @@ typedef struct #define __HAL_RCC_GPIOF_IS_CLK_SLEEP_DISABLED() ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOFLPEN)) == 0U) #define __HAL_RCC_GPIOG_IS_CLK_SLEEP_DISABLED() ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOGLPEN)) == 0U) #define __HAL_RCC_GPIOH_IS_CLK_SLEEP_DISABLED() ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOHLPEN)) == 0U) +#if defined(GPIOI) #define __HAL_RCC_GPIOI_IS_CLK_SLEEP_DISABLED() ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOILPEN)) == 0U) +#endif /* GPIOI */ #define __HAL_RCC_GPIOJ_IS_CLK_SLEEP_DISABLED() ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOJLPEN)) == 0U) #define __HAL_RCC_GPIOK_IS_CLK_SLEEP_DISABLED() ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOKLPEN)) == 0U) #if defined(RCC_AHB4LPENR_CRCLPEN) @@ -5625,6 +5845,9 @@ typedef struct #define __HAL_RCC_I2C1_CLK_SLEEP_ENABLE() (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_I2C1LPEN) #define __HAL_RCC_I2C2_CLK_SLEEP_ENABLE() (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_I2C2LPEN) #define __HAL_RCC_I2C3_CLK_SLEEP_ENABLE() (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_I2C3LPEN) +#if defined(I2C5) +#define __HAL_RCC_I2C5_CLK_SLEEP_ENABLE() (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_I2C5LPEN) +#endif /* I2C5 */ #define __HAL_RCC_CEC_CLK_SLEEP_ENABLE() (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_CECLPEN) #define __HAL_RCC_DAC12_CLK_SLEEP_ENABLE() (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_DAC12LPEN) #define __HAL_RCC_UART7_CLK_SLEEP_ENABLE() (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_UART7LPEN) @@ -5634,6 +5857,12 @@ typedef struct #define __HAL_RCC_OPAMP_CLK_SLEEP_ENABLE() (RCC->APB1HLPENR) |= (RCC_APB1HLPENR_OPAMPLPEN) #define __HAL_RCC_MDIOS_CLK_SLEEP_ENABLE() (RCC->APB1HLPENR) |= (RCC_APB1HLPENR_MDIOSLPEN) #define __HAL_RCC_FDCAN_CLK_SLEEP_ENABLE() (RCC->APB1HLPENR) |= (RCC_APB1HLPENR_FDCANLPEN) +#if defined(TIM23) +#define __HAL_RCC_TIM23_CLK_SLEEP_ENABLE() (RCC->APB1HLPENR) |= (RCC_APB1HLPENR_TIM23LPEN) +#endif /* TIM23 */ +#if defined(TIM24) +#define __HAL_RCC_TIM24_CLK_SLEEP_ENABLE() (RCC->APB1HLPENR) |= (RCC_APB1HLPENR_TIM24LPEN) +#endif /* TIM24 */ #define __HAL_RCC_TIM2_CLK_SLEEP_DISABLE() (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM2LPEN) @@ -5661,6 +5890,9 @@ typedef struct #define __HAL_RCC_I2C1_CLK_SLEEP_DISABLE() (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_I2C1LPEN) #define __HAL_RCC_I2C2_CLK_SLEEP_DISABLE() (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_I2C2LPEN) #define __HAL_RCC_I2C3_CLK_SLEEP_DISABLE() (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_I2C3LPEN) +#if defined(I2C5) +#define __HAL_RCC_I2C5_CLK_SLEEP_DISABLE() (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_I2C5LPEN) +#endif /* I2C5 */ #define __HAL_RCC_CEC_CLK_SLEEP_DISABLE() (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_CECLPEN) #define __HAL_RCC_DAC12_CLK_SLEEP_DISABLE() (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_DAC12LPEN) #define __HAL_RCC_UART7_CLK_SLEEP_DISABLE() (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_UART7LPEN) @@ -5670,6 +5902,12 @@ typedef struct #define __HAL_RCC_OPAMP_CLK_SLEEP_DISABLE() (RCC->APB1HLPENR) &= ~ (RCC_APB1HLPENR_OPAMPLPEN) #define __HAL_RCC_MDIOS_CLK_SLEEP_DISABLE() (RCC->APB1HLPENR) &= ~ (RCC_APB1HLPENR_MDIOSLPEN) #define __HAL_RCC_FDCAN_CLK_SLEEP_DISABLE() (RCC->APB1HLPENR) &= ~ (RCC_APB1HLPENR_FDCANLPEN) +#if defined(TIM23) +#define __HAL_RCC_TIM23_CLK_SLEEP_DISABLE() (RCC->APB1HLPENR) &= ~ (RCC_APB1HLPENR_TIM23LPEN) +#endif /* TIM23 */ +#if defined(TIM24) +#define __HAL_RCC_TIM24_CLK_SLEEP_DISABLE() (RCC->APB1HLPENR) &= ~ (RCC_APB1HLPENR_TIM24LPEN) +#endif /* TIM24 */ /** @brief Get the enable or disable status of the APB1 peripheral clock during Low Poser (Sleep) mode. @@ -5702,6 +5940,9 @@ typedef struct #define __HAL_RCC_I2C1_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LLPENR & (RCC_APB1LLPENR_I2C1LPEN)) != 0U) #define __HAL_RCC_I2C2_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LLPENR & (RCC_APB1LLPENR_I2C2LPEN)) != 0U) #define __HAL_RCC_I2C3_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LLPENR & (RCC_APB1LLPENR_I2C3LPEN)) != 0U) +#if defined(I2C5) +#define __HAL_RCC_I2C5_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LLPENR & (RCC_APB1LLPENR_I2C5LPEN)) != 0U) +#endif /* I2C5 */ #define __HAL_RCC_CEC_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LLPENR & (RCC_APB1LLPENR_CECLPEN)) != 0U) #define __HAL_RCC_DAC12_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LLPENR & (RCC_APB1LLPENR_DAC12LPEN)) != 0U) #define __HAL_RCC_UART7_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LLPENR & (RCC_APB1LLPENR_UART7LPEN)) != 0U) @@ -5711,6 +5952,12 @@ typedef struct #define __HAL_RCC_OPAMP_IS_CLK_SLEEP_ENABLED() ((RCC->APB1HLPENR & (RCC_APB1HLPENR_OPAMPLPEN)) != 0U) #define __HAL_RCC_MDIOS_IS_CLK_SLEEP_ENABLED() ((RCC->APB1HLPENR & (RCC_APB1HLPENR_MDIOSLPEN)) != 0U) #define __HAL_RCC_FDCAN_IS_CLK_SLEEP_ENABLED() ((RCC->APB1HLPENR & (RCC_APB1HLPENR_FDCANLPEN)) != 0U) +#if defined(TIM23) +#define __HAL_RCC_TIM23_IS_CLK_SLEEP_ENABLED() ((RCC->APB1HLPENR & (RCC_APB1HLPENR_TIM23LPEN)) != 0U) +#endif /* TIM23 */ +#if defined(TIM24) +#define __HAL_RCC_TIM24_IS_CLK_SLEEP_ENABLED() ((RCC->APB1HLPENR & (RCC_APB1HLPENR_TIM24LPEN)) != 0U) +#endif /* TIM24 */ #define __HAL_RCC_TIM2_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LLPENR & (RCC_APB1LLPENR_TIM2LPEN)) == 0U) #define __HAL_RCC_TIM3_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LLPENR & (RCC_APB1LLPENR_TIM3LPEN)) == 0U) @@ -5735,6 +5982,9 @@ typedef struct #define __HAL_RCC_I2C1_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LLPENR & (RCC_APB1LLPENR_I2C1LPEN)) == 0U) #define __HAL_RCC_I2C2_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LLPENR & (RCC_APB1LLPENR_I2C2LPEN)) == 0U) #define __HAL_RCC_I2C3_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LLPENR & (RCC_APB1LLPENR_I2C3LPEN)) == 0U) +#if defined(I2C5) +#define __HAL_RCC_I2C5_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LLPENR & (RCC_APB1LLPENR_I2C5LPEN)) == 0U) +#endif /* I2C5 */ #define __HAL_RCC_CEC_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LLPENR & (RCC_APB1LLPENR_CECLPEN)) == 0U) #define __HAL_RCC_DAC12_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LLPENR & (RCC_APB1LLPENR_DAC12LPEN)) == 0U) #define __HAL_RCC_UART7_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LLPENR & (RCC_APB1LLPENR_UART7LPEN)) == 0U) @@ -5744,6 +5994,12 @@ typedef struct #define __HAL_RCC_OPAMP_IS_CLK_SLEEP_DISABLED() ((RCC->APB1HLPENR & (RCC_APB1HLPENR_OPAMPLPEN)) == 0U) #define __HAL_RCC_MDIOS_IS_CLK_SLEEP_DISABLED() ((RCC->APB1HLPENR & (RCC_APB1HLPENR_MDIOSLPEN)) == 0U) #define __HAL_RCC_FDCAN_IS_CLK_SLEEP_DISABLED() ((RCC->APB1HLPENR & (RCC_APB1HLPENR_FDCANLPEN)) == 0U) +#if defined(TIM23) +#define __HAL_RCC_TIM23_IS_CLK_SLEEP_DISABLED() ((RCC->APB1HLPENR & (RCC_APB1HLPENR_TIM23LPEN)) == 0U) +#endif /* TIM23 */ +#if defined(TIM24) +#define __HAL_RCC_TIM24_IS_CLK_SLEEP_DISABLED() ((RCC->APB1HLPENR & (RCC_APB1HLPENR_TIM24LPEN)) == 0U) +#endif /* TIM24 */ /** @brief ENABLE or disable the APB2 peripheral clock during Low Power (Sleep) mode. @@ -5770,7 +6026,9 @@ typedef struct #define __HAL_RCC_TIM17_CLK_SLEEP_ENABLE() (RCC->APB2LPENR) |= (RCC_APB2LPENR_TIM17LPEN) #define __HAL_RCC_SPI5_CLK_SLEEP_ENABLE() (RCC->APB2LPENR) |= (RCC_APB2LPENR_SPI5LPEN) #define __HAL_RCC_SAI1_CLK_SLEEP_ENABLE() (RCC->APB2LPENR) |= (RCC_APB2LPENR_SAI1LPEN) +#if defined(SAI2) #define __HAL_RCC_SAI2_CLK_SLEEP_ENABLE() (RCC->APB2LPENR) |= (RCC_APB2LPENR_SAI2LPEN) +#endif /* SAI2 */ #if defined(SAI3) #define __HAL_RCC_SAI3_CLK_SLEEP_ENABLE() (RCC->APB2LPENR) |= (RCC_APB2LPENR_SAI3LPEN) #endif /*SAI3*/ @@ -5796,7 +6054,9 @@ typedef struct #define __HAL_RCC_TIM17_CLK_SLEEP_DISABLE() (RCC->APB2LPENR) &= ~ (RCC_APB2LPENR_TIM17LPEN) #define __HAL_RCC_SPI5_CLK_SLEEP_DISABLE() (RCC->APB2LPENR) &= ~ (RCC_APB2LPENR_SPI5LPEN) #define __HAL_RCC_SAI1_CLK_SLEEP_DISABLE() (RCC->APB2LPENR) &= ~ (RCC_APB2LPENR_SAI1LPEN) +#if defined(SAI2) #define __HAL_RCC_SAI2_CLK_SLEEP_DISABLE() (RCC->APB2LPENR) &= ~ (RCC_APB2LPENR_SAI2LPEN) +#endif /* SAI2 */ #if defined(SAI3) #define __HAL_RCC_SAI3_CLK_SLEEP_DISABLE() (RCC->APB2LPENR) &= ~ (RCC_APB2LPENR_SAI3LPEN) #endif /*SAI3*/ @@ -5830,7 +6090,9 @@ typedef struct #define __HAL_RCC_TIM17_IS_CLK_SLEEP_ENABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM17LPEN)) != 0U) #define __HAL_RCC_SPI5_IS_CLK_SLEEP_ENABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_SPI5LPEN)) != 0U) #define __HAL_RCC_SAI1_IS_CLK_SLEEP_ENABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_SAI1LPEN)) != 0U) +#if defined(SAI2) #define __HAL_RCC_SAI2_IS_CLK_SLEEP_ENABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_SAI2LPEN)) != 0U) +#endif /* SAI2 */ #if defined(SAI3) #define __HAL_RCC_SAI3_IS_CLK_SLEEP_ENABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_SAI3LPEN)) != 0U) #endif /*SAI3*/ @@ -5856,7 +6118,9 @@ typedef struct #define __HAL_RCC_TIM17_IS_CLK_SLEEP_DISABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM17LPEN)) == 0U) #define __HAL_RCC_SPI5_IS_CLK_SLEEP_DISABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_SPI5LPEN)) == 0U) #define __HAL_RCC_SAI1_IS_CLK_SLEEP_DISABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_SAI1LPEN)) == 0U) +#if defined(SAI2) #define __HAL_RCC_SAI2_IS_CLK_SLEEP_DISABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_SAI2LPEN)) == 0U) +#endif /* SAI2 */ #if defined(SAI3) #define __HAL_RCC_SAI3_IS_CLK_SLEEP_DISABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_SAI3LPEN)) == 0U) #endif /*SAI3*/ @@ -6638,6 +6902,9 @@ typedef struct #if defined(ADC3) #define __HAL_RCC_ADC3_CLKAM_ENABLE() (RCC->D3AMR) |= (RCC_D3AMR_ADC3AMEN) #endif +#if defined(RCC_D3AMR_DTSAMEN) +#define __HAL_RCC_DTS_CLKAM_ENABLE() (RCC->D3AMR) |= (RCC_D3AMR_DTSAMEN) +#endif #if defined(RCC_D3AMR_BKPRAMAMEN) #define __HAL_RCC_BKPRAM_CLKAM_ENABLE() (RCC->D3AMR) |= (RCC_D3AMR_BKPRAMAMEN) #endif @@ -6733,6 +7000,9 @@ typedef struct #if defined(ADC3) #define __HAL_RCC_ADC3_CLKAM_DISABLE() (RCC->D3AMR) &= ~ (RCC_D3AMR_ADC3AMEN) #endif +#if defined(RCC_D3AMR_DTSAMEN) +#define __HAL_RCC_DTS_CLKAM_DISABLE() (RCC->D3AMR) &= ~ (RCC_D3AMR_DTSAMEN) +#endif #if defined(RCC_D3AMR_BKPRAMAMEN) #define __HAL_RCC_BKPRAM_CLKAM_DISABLE() (RCC->D3AMR) &= ~ (RCC_D3AMR_BKPRAMAMEN) #endif @@ -6788,12 +7058,7 @@ typedef struct #if defined(RCC_CKGAENR_AXICKG) - /** @brief Macro to enable or disable the RCC_CKGAENR bits (AXI clocks gating enable register). - * @note - * @note - * @note - * @param - * @note +/** @brief Macro to enable or disable the RCC_CKGAENR bits (AXI clocks gating enable register). */ #define __HAL_RCC_AXI_CLKGA_ENABLE() (RCC->CKGAENR) |= (RCC_CKGAENR_AXICKG) @@ -6909,8 +7174,15 @@ typedef struct do { \ if(HAL_GetREVID() <= REV_ID_Y) \ { \ + if((__HSICalibrationValue__) == RCC_HSICALIBRATION_DEFAULT) \ + { \ + MODIFY_REG(RCC->HSICFGR, HAL_RCC_REV_Y_HSITRIM_Msk, ((uint32_t)0x20) << HAL_RCC_REV_Y_HSITRIM_Pos); \ + } \ + else \ + { \ MODIFY_REG(RCC->HSICFGR, HAL_RCC_REV_Y_HSITRIM_Msk, (uint32_t)(__HSICalibrationValue__) << HAL_RCC_REV_Y_HSITRIM_Pos); \ } \ + } \ else \ { \ MODIFY_REG(RCC->HSICFGR, RCC_HSICFGR_HSITRIM, (uint32_t)(__HSICalibrationValue__) << RCC_HSICFGR_HSITRIM_Pos); \ @@ -6975,7 +7247,14 @@ typedef struct do { \ if(HAL_GetREVID() <= REV_ID_Y) \ { \ - MODIFY_REG(RCC->HSICFGR, HAL_RCC_REV_Y_CSITRIM_Msk, (uint32_t)(__CSICalibrationValue__) << HAL_RCC_REV_Y_CSITRIM_Pos); \ + if((__CSICalibrationValue__) == RCC_CSICALIBRATION_DEFAULT) \ + { \ + MODIFY_REG(RCC->HSICFGR, HAL_RCC_REV_Y_CSITRIM_Msk, ((uint32_t)0x10) << HAL_RCC_REV_Y_CSITRIM_Pos); \ + } \ + else \ + { \ + MODIFY_REG(RCC->HSICFGR, HAL_RCC_REV_Y_CSITRIM_Msk, (uint32_t)(__CSICalibrationValue__) << HAL_RCC_REV_Y_CSITRIM_Pos); \ + } \ } \ else \ { \ @@ -7242,11 +7521,13 @@ typedef struct * (The ck_pll_p of the System PLL cannot be stopped if used as System Clock). * @param __RCC_PLL1ClockOut__: specifies the PLL clock to be outputted * This parameter can be one of the following values: - * @arg RCC_PLL1_DIVP: This clock is used to generate system clock up to 400MHZ or 280MHZ(*) - * @arg RCC_PLL1_DIVQ: This clock is used to generate peripherals clock up to 400MHZ or 280MHZ(*) - * @arg RCC_PLL1_DIVR: This clock is used to generate peripherals clock up to 400MHZ or 280MHZ(*) + * @arg RCC_PLL1_DIVP: This clock is used to generate system clock up to 550MHZ(*), 480MHZ(**) or 280MHZ(***) + * @arg RCC_PLL1_DIVQ: This clock is used to generate peripherals clock up to 550MHZ(*), 480MHZ(**) or 280MHZ(***) + * @arg RCC_PLL1_DIVR: This clock is used to generate peripherals clock up to 550MHZ(*), 480MHZ(**) or 280MHZ(***) * - * (*) : For stm32h7a3xx and stm32h7b3xx family lines. + * (*) : For stm32h72xxx and stm32h73xxx family lines and requires to enable the CPU_FREQ_BOOST flash option byte, 520MHZ otherwise. + * (**) : For stm32h74xx and stm32h75xx family lines and requires the board to be connected on LDO regulator not SMPS, 400MHZ otherwise. + * (***): For stm32h7a3xx, stm32h7b3xx and stm32h7b0xx family lines. * * @retval None */ @@ -7288,7 +7569,7 @@ typedef struct * between 192 and 836 MHZ or between 128 and 560 MHZ(*) (when in wide VCO range) * * @param __PLLP1__: specifies the division factor for system clock. - * This parameter must be a number between 2 and 128 (where odd numbers are not allowed) + * This parameter must be a number between 2 or 1(**) and 128 (where odd numbers are not allowed) * * @param __PLLQ1__: specifies the division factor for peripheral kernel clocks * This parameter must be a number between 1 and 128 @@ -7302,6 +7583,7 @@ typedef struct * @retval None * * (*) : For stm32h7a3xx and stm32h7b3xx family lines. + * (**): For stm32h72xxx and stm32h73xxx family lines. */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc_ex.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc_ex.h index 42beccc..07102a6 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc_ex.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc_ex.h @@ -6,7 +6,7 @@ ****************************************************************************** * @attention * - *

                  © COPYRIGHT(c) 2017 STMicroelectronics

                  + *

                  © Copyright (c) 2017 STMicroelectronics. * All rights reserved.

                  * * This software component is licensed by ST under BSD 3-Clause license, @@ -227,8 +227,13 @@ typedef struct uint32_t RngClockSelection; /*!< Specifies RNG clock source This parameter can be a value of @ref RCCEx_RNG_Clock_Source */ +#if defined(I2C5) + uint32_t I2c1235ClockSelection; /*!< Specifies I2C1/2/3/5 clock source + This parameter can be a value of @ref RCCEx_I2C1235_Clock_Source */ +#else uint32_t I2c123ClockSelection; /*!< Specifies I2C1/2/3 clock source - This parameter can be a value of @ref RCCEx_I2C123_Clock_Source */ + This parameter can be a value of @ref RCCEx_I2C1235_Clock_Source */ +#endif /*I2C5*/ uint32_t UsbClockSelection; /*!< Specifies USB clock source This parameter can be a value of @ref RCCEx_USB_Clock_Source */ @@ -276,6 +281,13 @@ typedef struct This parameter can be a value of @ref RCCEx_TIM_Prescaler_Selection */ }RCC_PeriphCLKInitTypeDef; +/*!< Alias for Inter STM32H7 lines compatibility regarding RCC_PeriphCLKInitTypeDef field : I2C5 available on some lines only */ +#if defined(I2C5) +#define I2c123ClockSelection I2c1235ClockSelection +#else +#define I2c1235ClockSelection I2c123ClockSelection +#endif /*I2C5*/ + /** * @brief RCC_CRS Init structure definition @@ -362,11 +374,23 @@ typedef struct #define RCC_PERIPHCLK_UART7 RCC_PERIPHCLK_USART234578 #define RCC_PERIPHCLK_UART8 RCC_PERIPHCLK_USART234578 #define RCC_PERIPHCLK_LPUART1 (0x00000004U) +#if defined(I2C5) +#define RCC_PERIPHCLK_I2C1235 (0x00000008U) +#define RCC_PERIPHCLK_I2C1 RCC_PERIPHCLK_I2C1235 +#define RCC_PERIPHCLK_I2C2 RCC_PERIPHCLK_I2C1235 +#define RCC_PERIPHCLK_I2C3 RCC_PERIPHCLK_I2C1235 +/* alias */ +#define RCC_PERIPHCLK_I2C123 RCC_PERIPHCLK_I2C1235 +#else #define RCC_PERIPHCLK_I2C123 (0x00000008U) #define RCC_PERIPHCLK_I2C1 RCC_PERIPHCLK_I2C123 #define RCC_PERIPHCLK_I2C2 RCC_PERIPHCLK_I2C123 #define RCC_PERIPHCLK_I2C3 RCC_PERIPHCLK_I2C123 +#endif /*I2C5*/ #define RCC_PERIPHCLK_I2C4 (0x00000010U) +#if defined(I2C5) +#define RCC_PERIPHCLK_I2C5 RCC_PERIPHCLK_I2C1235 +#endif /*I2C5*/ #define RCC_PERIPHCLK_LPTIM1 (0x00000020U) #define RCC_PERIPHCLK_LPTIM2 (0x00000040U) #define RCC_PERIPHCLK_LPTIM345 (0x00000080U) @@ -517,7 +541,7 @@ typedef struct #define RCC_USART16CLKSOURCE_CSI RCC_D2CCIP2R_USART16SEL_2 #define RCC_USART16CLKSOURCE_LSE (RCC_D2CCIP2R_USART16SEL_0 | RCC_D2CCIP2R_USART16SEL_2) -#else +#elif defined(RCC_CDCCIP2R_USART16910SEL) #define RCC_USART16910CLKSOURCE_CDPCLK2 (0x00000000U) /* alias */ #define RCC_USART16910CLKSOURCE_D2PCLK2 RCC_USART16910CLKSOURCE_CDPCLK2 @@ -536,6 +560,23 @@ typedef struct #define RCC_USART16CLKSOURCE_HSI RCC_USART16910CLKSOURCE_HSI #define RCC_USART16CLKSOURCE_CSI RCC_USART16910CLKSOURCE_CSI #define RCC_USART16CLKSOURCE_LSE RCC_USART16910CLKSOURCE_LSE + +#else /* RCC_D2CCIP2R_USART16910SEL */ +#define RCC_USART16910CLKSOURCE_D2PCLK2 (0x00000000U) +#define RCC_USART16910CLKSOURCE_PLL2 RCC_D2CCIP2R_USART16910SEL_0 +#define RCC_USART16910CLKSOURCE_PLL3 RCC_D2CCIP2R_USART16910SEL_1 +#define RCC_USART16910CLKSOURCE_HSI (RCC_D2CCIP2R_USART16910SEL_0 | RCC_D2CCIP2R_USART16910SEL_1) +#define RCC_USART16910CLKSOURCE_CSI RCC_D2CCIP2R_USART16910SEL_2 +#define RCC_USART16910CLKSOURCE_LSE (RCC_D2CCIP2R_USART16910SEL_0 | RCC_D2CCIP2R_USART16910SEL_2) + +/* Aliases */ +#define RCC_USART16CLKSOURCE_D2PCLK2 RCC_USART16910CLKSOURCE_D2PCLK2 +#define RCC_USART16CLKSOURCE_PCLK2 RCC_USART16910CLKSOURCE_D2PCLK2 +#define RCC_USART16CLKSOURCE_PLL2 RCC_USART16910CLKSOURCE_PLL2 +#define RCC_USART16CLKSOURCE_PLL3 RCC_USART16910CLKSOURCE_PLL3 +#define RCC_USART16CLKSOURCE_HSI RCC_USART16910CLKSOURCE_HSI +#define RCC_USART16CLKSOURCE_CSI RCC_USART16910CLKSOURCE_CSI +#define RCC_USART16CLKSOURCE_LSE RCC_USART16910CLKSOURCE_LSE #endif /* RCC_D2CCIP2R_USART16SEL */ /** * @} @@ -736,7 +777,7 @@ typedef struct * @} */ -/** @defgroup RCCEx_I2C123_Clock_Source RCCEx I2C1/2/3 Clock Source +/** @defgroup RCCEx_I2C1235_Clock_Source RCCEx I2C1/2/3/5 Clock Source * @{ */ #if defined (RCC_D2CCIP2R_I2C123SEL) @@ -744,13 +785,33 @@ typedef struct #define RCC_I2C123CLKSOURCE_PLL3 RCC_D2CCIP2R_I2C123SEL_0 #define RCC_I2C123CLKSOURCE_HSI RCC_D2CCIP2R_I2C123SEL_1 #define RCC_I2C123CLKSOURCE_CSI (RCC_D2CCIP2R_I2C123SEL_0 | RCC_D2CCIP2R_I2C123SEL_1) -#else +/* aliases */ +#define RCC_I2C1235CLKSOURCE_D2PCLK1 RCC_I2C123CLKSOURCE_D2PCLK1 +#define RCC_I2C1235CLKSOURCE_PLL3 RCC_I2C123CLKSOURCE_PLL3 +#define RCC_I2C1235CLKSOURCE_HSI RCC_I2C123CLKSOURCE_HSI +#define RCC_I2C1235CLKSOURCE_CSI RCC_I2C123CLKSOURCE_CSI +#elif defined(RCC_CDCCIP2R_I2C123SEL) #define RCC_I2C123CLKSOURCE_CDPCLK1 (0x00000000U) /* alias */ #define RCC_I2C123CLKSOURCE_D2PCLK1 RCC_I2C123CLKSOURCE_CDPCLK1 #define RCC_I2C123CLKSOURCE_PLL3 RCC_CDCCIP2R_I2C123SEL_0 #define RCC_I2C123CLKSOURCE_HSI RCC_CDCCIP2R_I2C123SEL_1 #define RCC_I2C123CLKSOURCE_CSI (RCC_CDCCIP2R_I2C123SEL_0 | RCC_CDCCIP2R_I2C123SEL_1) +/* aliases */ +#define RCC_I2C1235CLKSOURCE_D2PCLK1 RCC_I2C123CLKSOURCE_D2PCLK1 +#define RCC_I2C1235CLKSOURCE_PLL3 RCC_I2C123CLKSOURCE_PLL3 +#define RCC_I2C1235CLKSOURCE_HSI RCC_I2C123CLKSOURCE_HSI +#define RCC_I2C1235CLKSOURCE_CSI RCC_I2C123CLKSOURCE_CSI +#elif defined(I2C5) +#define RCC_I2C1235CLKSOURCE_D2PCLK1 (0x00000000U) +#define RCC_I2C1235CLKSOURCE_PLL3 RCC_D2CCIP2R_I2C1235SEL_0 +#define RCC_I2C1235CLKSOURCE_HSI RCC_D2CCIP2R_I2C1235SEL_1 +#define RCC_I2C1235CLKSOURCE_CSI (RCC_D2CCIP2R_I2C1235SEL_0 | RCC_D2CCIP2R_I2C1235SEL_1) +/* aliases */ +#define RCC_I2C123CLKSOURCE_D2PCLK1 RCC_I2C1235CLKSOURCE_D2PCLK1 +#define RCC_I2C123CLKSOURCE_PLL3 RCC_I2C1235CLKSOURCE_PLL3 +#define RCC_I2C123CLKSOURCE_HSI RCC_I2C1235CLKSOURCE_HSI +#define RCC_I2C123CLKSOURCE_CSI RCC_I2C1235CLKSOURCE_CSI #endif /* RCC_D2CCIP2R_I2C123SEL */ /** * @} @@ -759,10 +820,17 @@ typedef struct /** @defgroup RCCEx_I2C1_Clock_Source RCCEx I2C1 Clock Source * @{ */ +#if defined(I2C5) +#define RCC_I2C1CLKSOURCE_D2PCLK1 RCC_I2C1235CLKSOURCE_D2PCLK1 +#define RCC_I2C1CLKSOURCE_PLL3 RCC_I2C1235CLKSOURCE_PLL3 +#define RCC_I2C1CLKSOURCE_HSI RCC_I2C1235CLKSOURCE_HSI +#define RCC_I2C1CLKSOURCE_CSI RCC_I2C1235CLKSOURCE_CSI +#else #define RCC_I2C1CLKSOURCE_D2PCLK1 RCC_I2C123CLKSOURCE_D2PCLK1 #define RCC_I2C1CLKSOURCE_PLL3 RCC_I2C123CLKSOURCE_PLL3 #define RCC_I2C1CLKSOURCE_HSI RCC_I2C123CLKSOURCE_HSI #define RCC_I2C1CLKSOURCE_CSI RCC_I2C123CLKSOURCE_CSI +#endif /*I2C5*/ /** * @} @@ -771,10 +839,17 @@ typedef struct /** @defgroup RCCEx_I2C2_Clock_Source RCCEx I2C2 Clock Source * @{ */ +#if defined(I2C5) +#define RCC_I2C2CLKSOURCE_D2PCLK1 RCC_I2C1235CLKSOURCE_D2PCLK1 +#define RCC_I2C2CLKSOURCE_PLL3 RCC_I2C1235CLKSOURCE_PLL3 +#define RCC_I2C2CLKSOURCE_HSI RCC_I2C1235CLKSOURCE_HSI +#define RCC_I2C2CLKSOURCE_CSI RCC_I2C1235CLKSOURCE_CSI +#else #define RCC_I2C2CLKSOURCE_D2PCLK1 RCC_I2C123CLKSOURCE_D2PCLK1 #define RCC_I2C2CLKSOURCE_PLL3 RCC_I2C123CLKSOURCE_PLL3 #define RCC_I2C2CLKSOURCE_HSI RCC_I2C123CLKSOURCE_HSI #define RCC_I2C2CLKSOURCE_CSI RCC_I2C123CLKSOURCE_CSI +#endif /*I2C5*/ /** * @} @@ -783,10 +858,17 @@ typedef struct /** @defgroup RCCEx_I2C3_Clock_Source RCCEx I2C3 Clock Source * @{ */ +#if defined(I2C5) +#define RCC_I2C3CLKSOURCE_D2PCLK1 RCC_I2C1235CLKSOURCE_D2PCLK1 +#define RCC_I2C3CLKSOURCE_PLL3 RCC_I2C1235CLKSOURCE_PLL3 +#define RCC_I2C3CLKSOURCE_HSI RCC_I2C1235CLKSOURCE_HSI +#define RCC_I2C3CLKSOURCE_CSI RCC_I2C1235CLKSOURCE_CSI +#else #define RCC_I2C3CLKSOURCE_D2PCLK1 RCC_I2C123CLKSOURCE_D2PCLK1 #define RCC_I2C3CLKSOURCE_PLL3 RCC_I2C123CLKSOURCE_PLL3 #define RCC_I2C3CLKSOURCE_HSI RCC_I2C123CLKSOURCE_HSI #define RCC_I2C3CLKSOURCE_CSI RCC_I2C123CLKSOURCE_CSI +#endif /*I2C5*/ /** * @} @@ -812,6 +894,19 @@ typedef struct /** * @} */ +#if defined(I2C5) +/** @defgroup RCCEx_I2C5_Clock_Source RCCEx I2C5 Clock Source + * @{ + */ +#define RCC_I2C5CLKSOURCE_D2PCLK1 RCC_I2C1235CLKSOURCE_D2PCLK1 +#define RCC_I2C5CLKSOURCE_PLL3 RCC_I2C1235CLKSOURCE_PLL3 +#define RCC_I2C5CLKSOURCE_HSI RCC_I2C1235CLKSOURCE_HSI +#define RCC_I2C5CLKSOURCE_CSI RCC_I2C1235CLKSOURCE_CSI + +/** + * @} + */ +#endif /*I2C5*/ /** @defgroup RCCEx_RNG_Clock_Source RCCEx RNG Clock Source * @{ @@ -921,7 +1016,7 @@ typedef struct #endif /* SAI3 */ #if defined(RCC_CDCCIP1R_SAI2ASEL) -/** @defgroup RCCEx_SAI2_Clock_A Source SAI2A Clock Source +/** @defgroup RCCEx_SAI2A_Clock_Source SAI2A Clock Source * @{ */ #define RCC_SAI2ACLKSOURCE_PLL (0x00000000U) @@ -936,7 +1031,7 @@ typedef struct #endif /* RCC_CDCCIP1R_SAI2ASEL */ #if defined(RCC_CDCCIP1R_SAI2BSEL) -/** @defgroup RCCEx_SAI2_Block_B Clock_Source SAI2B Clock Source +/** @defgroup RCCEx_SAI2B_Clock_Source SAI2B Clock Source * @{ */ #define RCC_SAI2BCLKSOURCE_PLL (0x00000000U) @@ -1102,6 +1197,9 @@ typedef struct #define RCC_SAI4ACLKSOURCE_PLL3 RCC_D3CCIPR_SAI4ASEL_1 #define RCC_SAI4ACLKSOURCE_PIN (RCC_D3CCIPR_SAI4ASEL_0 | RCC_D3CCIPR_SAI4ASEL_1) #define RCC_SAI4ACLKSOURCE_CLKP RCC_D3CCIPR_SAI4ASEL_2 +#if defined(RCC_VER_3_0) +#define RCC_SAI4ACLKSOURCE_SPDIF (RCC_D3CCIPR_SAI4ASEL_2 | RCC_D3CCIPR_SAI4ASEL_0) +#endif /*RCC_VER_3_0*/ /** * @} @@ -1119,6 +1217,9 @@ typedef struct #define RCC_SAI4BCLKSOURCE_PLL3 RCC_D3CCIPR_SAI4BSEL_1 #define RCC_SAI4BCLKSOURCE_PIN (RCC_D3CCIPR_SAI4BSEL_0 | RCC_D3CCIPR_SAI4BSEL_1) #define RCC_SAI4BCLKSOURCE_CLKP RCC_D3CCIPR_SAI4BSEL_2 +#if defined(RCC_VER_3_0) +#define RCC_SAI4BCLKSOURCE_SPDIF (RCC_D3CCIPR_SAI4BSEL_2 | RCC_D3CCIPR_SAI4BSEL_0) +#endif /* RCC_VER_3_0 */ /** * @} @@ -1271,6 +1372,8 @@ typedef struct /** @defgroup RCCEx_OSPI_Clock_Source RCCEx OSPI Clock Source * @{ */ + +#if defined(RCC_CDCCIPR_OCTOSPISEL) #define RCC_OSPICLKSOURCE_CDHCLK (0x00000000U) /*aliases*/ #define RCC_OSPICLKSOURCE_D1HCLK RCC_OSPICLKSOURCE_CDHCLK @@ -1278,6 +1381,14 @@ typedef struct #define RCC_OSPICLKSOURCE_PLL RCC_CDCCIPR_OCTOSPISEL_0 #define RCC_OSPICLKSOURCE_PLL2 RCC_CDCCIPR_OCTOSPISEL_1 #define RCC_OSPICLKSOURCE_CLKP RCC_CDCCIPR_OCTOSPISEL +#else +#define RCC_OSPICLKSOURCE_D1HCLK (0x00000000U) +#define RCC_OSPICLKSOURCE_HCLK RCC_OSPICLKSOURCE_D1HCLK +#define RCC_OSPICLKSOURCE_PLL RCC_D1CCIPR_OCTOSPISEL_0 +#define RCC_OSPICLKSOURCE_PLL2 RCC_D1CCIPR_OCTOSPISEL_1 +#define RCC_OSPICLKSOURCE_CLKP RCC_D1CCIPR_OCTOSPISEL +#endif /* RCC_CDCCIPR_OCTOSPISEL */ + /** * @} @@ -1514,7 +1625,7 @@ typedef struct /** @defgroup RCCEx_EXTI_LINE_LSECSS RCC LSE CSS external interrupt line * @{ */ -#define RCC_EXTI_LINE_LSECSS EXTI_IMR1_IM18 /*!< External interrupt line 19 connected to the LSE CSS EXTI Line */ +#define RCC_EXTI_LINE_LSECSS EXTI_IMR1_IM18 /*!< External interrupt line 18 connected to the LSE CSS EXTI Line */ /** * @} */ @@ -1662,11 +1773,13 @@ typedef struct * This is mainly used to save Power. * @param __RCC_PLL2ClockOut__ Specifies the PLL2 clock to be outputted * This parameter can be one of the following values: - * @arg RCC_PLL2_DIVP: This clock is used to generate peripherals clock up to 400MHZ or 280MHZ(*) - * @arg RCC_PLL2_DIVQ: This clock is used to generate peripherals clock up to 400MHZ or 280MHZ(*) - * @arg RCC_PLL2_DIVR: This clock is used to generate peripherals clock up to 400MHZ or 280MHZ(*) + * @arg RCC_PLL2_DIVP: This clock is used to generate peripherals clock up to 550MHZ(*), 480MHZ(**) or 280MHZ(***) + * @arg RCC_PLL2_DIVQ: This clock is used to generate peripherals clock up to 550MHZ(*), 480MHZ(**) or 280MHZ(***) + * @arg RCC_PLL2_DIVR: This clock is used to generate peripherals clock up to 550MHZ(*), 480MHZ(**) or 280MHZ(***) * - * (*) : For stm32h7a3xx and stm32h7b3xx family lines. + * (*) : For stm32h72xxx and stm32h73xxx family lines and requires to enable the CPU_FREQ_BOOST flash option byte, 520MHZ otherwise. + * (**) : For stm32h74xx and stm32h75xx family lines and requires the board to be connected on LDO regulator not SMPS, 400MHZ otherwise. + * (***): For stm32h7a3xx, stm32h7b3xx and stm32h7b0xx family lines. * * @retval None */ @@ -1791,11 +1904,13 @@ typedef struct * This is mainly used to save Power. * @param __RCC_PLL3ClockOut__ specifies the PLL3 clock to be outputted * This parameter can be one of the following values: - * @arg RCC_PLL3_DIVP: This clock is used to generate peripherals clock up to 400MHZ or 280MHZ(*) - * @arg RCC_PLL3_DIVQ: This clock is used to generate peripherals clock up to 400MHZ or 280MHZ(*) - * @arg RCC_PLL3_DIVR: This clock is used to generate peripherals clock up to 400MHZ or 280MHZ(*) + * @arg RCC_PLL3_DIVP: This clock is used to generate peripherals clock up to 550MHZ(*), 480MHZ(**) or 280MHZ(***) + * @arg RCC_PLL3_DIVQ: This clock is used to generate peripherals clock up to 550MHZ(*), 480MHZ(**) or 280MHZ(***) + * @arg RCC_PLL3_DIVR: This clock is used to generate peripherals clock up to 550MHZ(*), 480MHZ(**) or 280MHZ(***) * - * (*) : For stm32h7a3xx and stm32h7b3xx family lines. + * (*) : For stm32h72xxx and stm32h73xxx family lines and requires to enable the CPU_FREQ_BOOST flash option byte, 520MHZ otherwise. + * (**) : For stm32h74xx and stm32h75xx family lines and requires the board to be connected on LDO regulator not SMPS, 400MHZ otherwise. + * (***): For stm32h7a3xx, stm32h7b3xx and stm32h7b0xx family lines. * * @retval None */ @@ -2137,34 +2252,47 @@ typedef struct #define __HAL_RCC_GET_SAI4B_SOURCE() ((uint32_t)(READ_BIT(RCC->D3CCIPR, RCC_D3CCIPR_SAI4BSEL))) #endif /* SAI4_Block_B */ -/** @brief macro to configure the I2C1/2/3 clock (I2C123CLK). +/** @brief macro to configure the I2C1/2/3/5* clock (I2C123CLK). * - * @param __I2C123CLKSource__ specifies the I2C1/2/3 clock source. + * @param __I2C1235CLKSource__ specifies the I2C1/2/3/5* clock source. * This parameter can be one of the following values: - * @arg RCC_I2C123CLKSOURCE_D2PCLK1: D2PCLK1 selected as I2C1/2/3 clock - * @arg RCC_I2C123CLKSOURCE_PLL3: PLL3 selected as I2C1/2/3 clock - * @arg RCC_I2C123CLKSOURCE_HSI: HSI selected as I2C1/2/3 clock - * @arg RCC_I2C123CLKSOURCE_CSI: CSI selected as I2C1/2/3 clock + * @arg RCC_I2C123CLKSOURCE_D2PCLK1: D2PCLK1 selected as I2C1/2/3/5* clock + * @arg RCC_I2C123CLKSOURCE_PLL3: PLL3 selected as I2C1/2/3/5* clock + * @arg RCC_I2C123CLKSOURCE_HSI: HSI selected as I2C1/2/3/5* clock + * @arg RCC_I2C123CLKSOURCE_CSI: CSI selected as I2C1/2/3/5* clock + * + * (**): Available on stm32h72xxx and stm32h73xxx family lines. */ #if defined(RCC_D2CCIP2R_I2C123SEL) -#define __HAL_RCC_I2C123_CONFIG(__I2C123CLKSource__) \ - MODIFY_REG(RCC->D2CCIP2R, RCC_D2CCIP2R_I2C123SEL, (uint32_t)(__I2C123CLKSource__)) -#else -#define __HAL_RCC_I2C123_CONFIG(__I2C123CLKSource__) \ - MODIFY_REG(RCC->CDCCIP2R, RCC_CDCCIP2R_I2C123SEL, (uint32_t)(__I2C123CLKSource__)) +#define __HAL_RCC_I2C123_CONFIG(__I2C1235CLKSource__) \ + MODIFY_REG(RCC->D2CCIP2R, RCC_D2CCIP2R_I2C123SEL, (uint32_t)(__I2C1235CLKSource__)) +#elif defined(RCC_CDCCIP2R_I2C123SEL) +#define __HAL_RCC_I2C123_CONFIG(__I2C1235CLKSource__) \ + MODIFY_REG(RCC->CDCCIP2R, RCC_CDCCIP2R_I2C123SEL, (uint32_t)(__I2C1235CLKSource__)) +#else /* RCC_D2CCIP2R_I2C1235SEL */ +#define __HAL_RCC_I2C1235_CONFIG(__I2C1235CLKSource__) \ + MODIFY_REG(RCC->D2CCIP2R, RCC_D2CCIP2R_I2C1235SEL, (uint32_t)(__I2C1235CLKSource__)) +/* alias */ +#define __HAL_RCC_I2C123_CONFIG __HAL_RCC_I2C1235_CONFIG #endif /* RCC_D2CCIP2R_I2C123SEL */ -/** @brief macro to get the I2C1/2/3 clock source. +/** @brief macro to get the I2C1/2/3/5* clock source. * @retval The clock source can be one of the following values: - * @arg RCC_I2C123CLKSOURCE_D2PCLK1: D2PCLK1 selected as I2C1/2/3 clock - * @arg RCC_I2C123CLKSOURCE_PLL3: PLL3 selected as I2C1/2/3 clock - * @arg RCC_I2C123CLKSOURCE_HSI: HSI selected as I2C1/2/3 clock - * @arg RCC_I2C123CLKSOURCE_CSI: CSI selected as I2C1/2/3 clock + * @arg RCC_I2C123CLKSOURCE_D2PCLK1: D2PCLK1 selected as I2C1/2/3/5* clock + * @arg RCC_I2C123CLKSOURCE_PLL3: PLL3 selected as I2C1/2/3/5* clock + * @arg RCC_I2C123CLKSOURCE_HSI: HSI selected as I2C1/2/3/5* clock + * @arg RCC_I2C123CLKSOURCE_CSI: CSI selected as I2C1/2/3/5* clock + * + * (**): Available on stm32h72xxx and stm32h73xxx family lines. */ #if defined(RCC_D2CCIP2R_I2C123SEL) #define __HAL_RCC_GET_I2C123_SOURCE() ((uint32_t)(READ_BIT(RCC->D2CCIP2R, RCC_D2CCIP2R_I2C123SEL))) -#else +#elif defined(RCC_CDCCIP2R_I2C123SEL) #define __HAL_RCC_GET_I2C123_SOURCE() ((uint32_t)(READ_BIT(RCC->CDCCIP2R, RCC_CDCCIP2R_I2C123SEL))) +#else /* RCC_D2CCIP2R_I2C1235SEL */ +#define __HAL_RCC_GET_I2C1235_SOURCE() ((uint32_t)(READ_BIT(RCC->D2CCIP2R, RCC_D2CCIP2R_I2C1235SEL))) +/* alias */ +#define __HAL_RCC_GET_I2C123_SOURCE __HAL_RCC_GET_I2C1235_SOURCE #endif /* RCC_D2CCIP2R_I2C123SEL */ /** @brief macro to configure the I2C1 clock (I2C1CLK). @@ -2176,7 +2304,11 @@ typedef struct * @arg RCC_I2C1CLKSOURCE_HSI: HSI selected as I2C1 clock * @arg RCC_I2C1CLKSOURCE_CSI: CSI selected as I2C1 clock */ +#if defined(I2C5) +#define __HAL_RCC_I2C1_CONFIG __HAL_RCC_I2C1235_CONFIG +#else #define __HAL_RCC_I2C1_CONFIG __HAL_RCC_I2C123_CONFIG +#endif /*I2C5*/ /** @brief macro to get the I2C1 clock source. * @retval The clock source can be one of the following values: @@ -2185,7 +2317,11 @@ typedef struct * @arg RCC_I2C1CLKSOURCE_HSI: HSI selected as I2C1 clock * @arg RCC_I2C1CLKSOURCE_CSI: CSI selected as I2C1 clock */ +#if defined(I2C5) +#define __HAL_RCC_GET_I2C1_SOURCE __HAL_RCC_GET_I2C1235_SOURCE +#else #define __HAL_RCC_GET_I2C1_SOURCE __HAL_RCC_GET_I2C123_SOURCE +#endif /*I2C5*/ /** @brief macro to configure the I2C2 clock (I2C2CLK). * @@ -2196,7 +2332,11 @@ typedef struct * @arg RCC_I2C2CLKSOURCE_HSI: HSI selected as I2C2 clock * @arg RCC_I2C2CLKSOURCE_CSI: CSI selected as I2C2 clock */ +#if defined(I2C5) +#define __HAL_RCC_I2C2_CONFIG __HAL_RCC_I2C1235_CONFIG +#else #define __HAL_RCC_I2C2_CONFIG __HAL_RCC_I2C123_CONFIG +#endif /*I2C5*/ /** @brief macro to get the I2C2 clock source. * @retval The clock source can be one of the following values: @@ -2205,7 +2345,11 @@ typedef struct * @arg RCC_I2C2CLKSOURCE_HSI: HSI selected as I2C2 clock * @arg RCC_I2C2CLKSOURCE_CSI: CSI selected as I2C2 clock */ +#if defined(I2C5) +#define __HAL_RCC_GET_I2C2_SOURCE __HAL_RCC_GET_I2C1235_SOURCE +#else #define __HAL_RCC_GET_I2C2_SOURCE __HAL_RCC_GET_I2C123_SOURCE +#endif /*I2C5*/ /** @brief macro to configure the I2C3 clock (I2C3CLK). * @@ -2216,7 +2360,11 @@ typedef struct * @arg RCC_I2C3CLKSOURCE_HSI: HSI selected as I2C3 clock * @arg RCC_I2C3CLKSOURCE_CSI: CSI selected as I2C3 clock */ +#if defined(I2C5) +#define __HAL_RCC_I2C3_CONFIG __HAL_RCC_I2C1235_CONFIG +#else #define __HAL_RCC_I2C3_CONFIG __HAL_RCC_I2C123_CONFIG +#endif /*I2C5*/ /** @brief macro to get the I2C3 clock source. * @retval The clock source can be one of the following values: @@ -2225,7 +2373,11 @@ typedef struct * @arg RCC_I2C3CLKSOURCE_HSI: HSI selected as I2C3 clock * @arg RCC_I2C3CLKSOURCE_CSI: CSI selected as I2C3 clock */ +#if defined(I2C5) +#define __HAL_RCC_GET_I2C3_SOURCE __HAL_RCC_GET_I2C1235_SOURCE +#else #define __HAL_RCC_GET_I2C3_SOURCE __HAL_RCC_GET_I2C123_SOURCE +#endif /*I2C5*/ /** @brief macro to configure the I2C4 clock (I2C4CLK). * @@ -2253,9 +2405,33 @@ typedef struct */ #define __HAL_RCC_GET_I2C4_SOURCE() ((uint32_t)(READ_BIT(RCC->D3CCIPR, RCC_D3CCIPR_I2C4SEL))) +#if defined(I2C5) +/** @brief macro to configure the I2C5 clock (I2C5CLK). + * + * @param __I2C5CLKSource__ specifies the I2C5 clock source. + * This parameter can be one of the following values: + * @arg RCC_I2C5CLKSOURCE_D2PCLK1: D2PCLK1 selected as I2C5 clock + * @arg RCC_I2C5CLKSOURCE_PLL3: PLL3 selected as I2C5 clock + * @arg RCC_I2C5CLKSOURCE_HSI: HSI selected as I2C5 clock + * @arg RCC_I2C5CLKSOURCE_CSI: CSI selected as I2C5 clock + */ +#define __HAL_RCC_I2C5_CONFIG __HAL_RCC_I2C1235_CONFIG +#endif /* I2C5 */ + +#if defined(I2C5) +/** @brief macro to get the I2C5 clock source. + * @retval The clock source can be one of the following values: + * @arg RCC_I2C5CLKSOURCE_D2PCLK1: D2PCLK5 selected as I2C5 clock + * @arg RCC_I2C5CLKSOURCE_PLL3: PLL3 selected as I2C5 clock + * @arg RCC_I2C5CLKSOURCE_HSI: HSI selected as I2C5 clock + * @arg RCC_I2C5CLKSOURCE_CSI: CSI selected as I2C5 clock + */ +#define __HAL_RCC_GET_I2C5_SOURCE __HAL_RCC_GET_I2C1235_SOURCE +#endif /* I2C5 */ + /** @brief macro to configure the USART1/6/9* /10* clock (USART16CLK). * - * @param __USART16CLKSource__ specifies the USART1/6/9* /10* clock source. + * @param __USART16910CLKSource__ specifies the USART1/6/9* /10* clock source. * This parameter can be one of the following values: * @arg RCC_USART16CLKSOURCE_D2PCLK2: APB2 Clock selected as USART1/6/9* /10* clock * @arg RCC_USART16CLKSOURCE_PLL2: PLL2_Q Clock selected as USART1/6/9* /10* clock @@ -2267,13 +2443,18 @@ typedef struct * (*) : Available on some STM32H7 lines only. */ #if defined(RCC_D2CCIP2R_USART16SEL) -#define __HAL_RCC_USART16_CONFIG(__USART16CLKSource__) \ - MODIFY_REG(RCC->D2CCIP2R, RCC_D2CCIP2R_USART16SEL, (uint32_t)(__USART16CLKSource__)) -#else +#define __HAL_RCC_USART16_CONFIG(__USART16910CLKSource__) \ + MODIFY_REG(RCC->D2CCIP2R, RCC_D2CCIP2R_USART16SEL, (uint32_t)(__USART16910CLKSource__)) +#elif defined(RCC_CDCCIP2R_USART16910SEL) #define __HAL_RCC_USART16910_CONFIG(__USART16910CLKSource__) \ MODIFY_REG(RCC->CDCCIP2R, RCC_CDCCIP2R_USART16910SEL, (uint32_t)(__USART16910CLKSource__)) /* alias */ #define __HAL_RCC_USART16_CONFIG __HAL_RCC_USART16910_CONFIG +#else /* RCC_D2CCIP2R_USART16910SEL */ +#define __HAL_RCC_USART16910_CONFIG(__USART16910CLKSource__) \ + MODIFY_REG(RCC->D2CCIP2R, RCC_D2CCIP2R_USART16910SEL, (uint32_t)(__USART16910CLKSource__)) +/* alias */ +#define __HAL_RCC_USART16_CONFIG __HAL_RCC_USART16910_CONFIG #endif /* RCC_D2CCIP2R_USART16SEL */ /** @brief macro to get the USART1/6/9* /10* clock source. @@ -2289,10 +2470,14 @@ typedef struct */ #if defined(RCC_D2CCIP2R_USART16SEL) #define __HAL_RCC_GET_USART16_SOURCE() ((uint32_t)(READ_BIT(RCC->D2CCIP2R, RCC_D2CCIP2R_USART16SEL))) -#else +#elif defined(RCC_CDCCIP2R_USART16910SEL) #define __HAL_RCC_GET_USART16910_SOURCE() ((uint32_t)(READ_BIT(RCC->CDCCIP2R, RCC_CDCCIP2R_USART16910SEL))) /* alias*/ #define __HAL_RCC_GET_USART16_SOURCE __HAL_RCC_GET_USART16910_SOURCE +#else /* RCC_D2CCIP2R_USART16910SEL */ +#define __HAL_RCC_GET_USART16910_SOURCE() ((uint32_t)(READ_BIT(RCC->D2CCIP2R, RCC_D2CCIP2R_USART16910SEL))) +/* alias */ +#define __HAL_RCC_GET_USART16_SOURCE __HAL_RCC_GET_USART16910_SOURCE #endif /* RCC_D2CCIP2R_USART16SEL */ /** @brief macro to configure the USART234578 clock (USART234578CLK). @@ -2689,8 +2874,8 @@ typedef struct #define __HAL_RCC_LPTIM345_CONFIG(__LPTIM345CLKSource__) \ MODIFY_REG(RCC->D3CCIPR, RCC_D3CCIPR_LPTIM345SEL, (uint32_t)(__LPTIM345CLKSource__)) #else -#define __HAL_RCC_LPTIM345_CONFIG(__LPTIM3CLKSource__) \ - MODIFY_REG(RCC->SRDCCIPR, RCC_SRDCCIPR_LPTIM3SEL, (uint32_t)(__LPTIM3CLKSource__)) +#define __HAL_RCC_LPTIM345_CONFIG(__LPTIM345CLKSource__) \ + MODIFY_REG(RCC->SRDCCIPR, RCC_SRDCCIPR_LPTIM3SEL, (uint32_t)(__LPTIM345CLKSource__)) #endif /* RCC_D3CCIPR_LPTIM345SEL */ /** @brief macro to get the LPTIM3/4/5 clock source. @@ -2815,9 +3000,13 @@ typedef struct * @arg RCC_RCC_OSPICLKSOURCE_PLL2 : PLL2_R Clock selected as OSPI clock * @arg RCC_RCC_OSPICLKSOURCE_CLKP CLKP selected as OSPI clock */ +#if defined(RCC_CDCCIPR_OCTOSPISEL) #define __HAL_RCC_OSPI_CONFIG(__OSPICLKSource__) \ MODIFY_REG(RCC->CDCCIPR, RCC_CDCCIPR_OCTOSPISEL, (uint32_t)(__OSPICLKSource__)) - +#else +#define __HAL_RCC_OSPI_CONFIG(__OSPICLKSource__) \ + MODIFY_REG(RCC->D1CCIPR, RCC_D1CCIPR_OCTOSPISEL, (uint32_t)(__OSPICLKSource__)) +#endif /* RCC_CDCCIPR_OCTOSPISEL */ /** @brief macro to get the OSPI clock source. * @retval The clock source can be one of the following values: @@ -2826,7 +3015,11 @@ typedef struct * @arg RCC_RCC_OSPICLKSOURCE_PLL2 : PLL2_R Clock selected as OSPI clock * @arg RCC_RCC_OSPICLKSOURCE_CLKP CLKP selected as OSPI clock */ +#if defined(RCC_CDCCIPR_OCTOSPISEL) #define __HAL_RCC_GET_OSPI_SOURCE() ((uint32_t)(READ_BIT(RCC->CDCCIPR, RCC_CDCCIPR_OCTOSPISEL))) +#else +#define __HAL_RCC_GET_OSPI_SOURCE() ((uint32_t)(READ_BIT(RCC->D1CCIPR, RCC_D1CCIPR_OCTOSPISEL))) +#endif /* RCC_CDCCIPR_OCTOSPISEL */ #endif /* defined(OCTOSPI1) || defined(OCTOSPI2) */ @@ -3374,9 +3567,6 @@ typedef struct #endif /* RCC_D2CCIP2R_RNGSEL */ #if defined(HRTIM1) -/** @defgroup RCCEx_HRTIMx_Clock_Config RCC Extended HRTIMx Clock Config - * @{ - */ /** @brief Macro to configure the HRTIM1 prescaler clock source. * @param __HRTIM1CLKSource__ specifies the HRTIM1 prescaler clock source. * This parameter can be one of the following values: @@ -3408,10 +3598,6 @@ typedef struct RCC->CFGR |= (__PRESC__); \ }while(0) -/** - * @} - */ - /** * @brief Enable the RCC LSE CSS Extended Interrupt Line. * @retval None @@ -3696,6 +3882,10 @@ typedef struct /* Exported functions --------------------------------------------------------*/ + /** @addtogroup RCCEx_Exported_Functions + * @{ + */ + /** @addtogroup RCCEx_Exported_Functions_Group1 * @{ */ @@ -3747,6 +3937,10 @@ void HAL_RCCEx_CRS_SyncWarnCallback(void); void HAL_RCCEx_CRS_ExpectedSyncCallback(void); void HAL_RCCEx_CRS_ErrorCallback(uint32_t Error); +/** + * @} + */ + /** * @} */ @@ -3884,10 +4078,19 @@ void HAL_RCCEx_CRS_ErrorCallback(uint32_t Error); ((SOURCE) == RCC_LPUART1CLKSOURCE_LSE) || \ ((SOURCE) == RCC_LPUART1CLKSOURCE_HSI)) +#if defined(I2C5) +#define IS_RCC_I2C1235CLKSOURCE(SOURCE) (((SOURCE) == RCC_I2C1235CLKSOURCE_PLL3) || \ + ((SOURCE) == RCC_I2C1235CLKSOURCE_HSI) || \ + ((SOURCE) == RCC_I2C1235CLKSOURCE_D2PCLK1) || \ + ((SOURCE) == RCC_I2C1235CLKSOURCE_CSI)) + +#define IS_RCC_I2C123CLKSOURCE IS_RCC_I2C1235CLKSOURCE /* For API Backward compatibility */ +#else #define IS_RCC_I2C123CLKSOURCE(SOURCE) (((SOURCE) == RCC_I2C123CLKSOURCE_PLL3) || \ ((SOURCE) == RCC_I2C123CLKSOURCE_HSI) || \ ((SOURCE) == RCC_I2C123CLKSOURCE_D2PCLK1)|| \ ((SOURCE) == RCC_I2C123CLKSOURCE_CSI)) +#endif /*I2C5*/ #define IS_RCC_I2C1CLKSOURCE(SOURCE) (((SOURCE) == RCC_I2C1CLKSOURCE_PLL3) || \ ((SOURCE) == RCC_I2C1CLKSOURCE_HSI) || \ @@ -3909,6 +4112,13 @@ void HAL_RCCEx_CRS_ErrorCallback(uint32_t Error); ((SOURCE) == RCC_I2C4CLKSOURCE_D3PCLK1)|| \ ((SOURCE) == RCC_I2C3CLKSOURCE_CSI)) +#if defined(I2C5) +#define IS_RCC_I2C5CLKSOURCE(SOURCE) (((SOURCE) == RCC_I2C5CLKSOURCE_PLL3) || \ + ((SOURCE) == RCC_I2C5CLKSOURCE_HSI) || \ + ((SOURCE) == RCC_I2C5CLKSOURCE_D2PCLK1)|| \ + ((SOURCE) == RCC_I2C5CLKSOURCE_CSI)) +#endif /*I2C5*/ + #define IS_RCC_RNGCLKSOURCE(SOURCE) (((SOURCE) == RCC_RNGCLKSOURCE_HSI48)|| \ ((SOURCE) == RCC_RNGCLKSOURCE_PLL) || \ ((SOURCE) == RCC_RNGCLKSOURCE_LSE) || \ @@ -4253,6 +4463,10 @@ void HAL_RCCEx_CRS_ErrorCallback(uint32_t Error); * @} */ +/** + * @} + */ + #ifdef __cplusplus } #endif diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rtc.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rtc.h index ddc3eab..4cf34d5 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rtc.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rtc.h @@ -60,7 +60,7 @@ typedef enum typedef struct { uint32_t HourFormat; /*!< Specifies the RTC Hour Format. - This parameter can be a value of @ref RTC_Hour_Formats */ + This parameter can be a value of @ref RTC_Hour_Formats_Definitions */ uint32_t AsynchPrediv; /*!< Specifies the RTC Asynchronous Predivider value. This parameter must be a number between Min_Data = 0x00 and Max_Data = 0x7F */ @@ -69,7 +69,7 @@ typedef struct This parameter must be a number between Min_Data = 0x00 and Max_Data = 0x7FFF */ uint32_t OutPut; /*!< Specifies which signal will be routed to the RTC output. - This parameter can be a value of @ref RTCEx_Output_selection_Definitions */ + This parameter can be a value of @ref RTC_Output_selection_Definitions */ uint32_t OutPutRemap; /*!< Specifies the remap for RTC output. This parameter can be a value of @ref RTC_Output_ALARM_OUT_Remap */ @@ -1217,6 +1217,7 @@ HAL_RTCStateTypeDef HAL_RTC_GetState(RTC_HandleTypeDef *hrtc); * @{ */ HAL_StatusTypeDef RTC_EnterInitMode(RTC_HandleTypeDef *hrtc); +HAL_StatusTypeDef RTC_ExitInitMode(RTC_HandleTypeDef *hrtc); uint8_t RTC_ByteToBcd2(uint8_t Value); uint8_t RTC_Bcd2ToByte(uint8_t Value); diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rtc_ex.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rtc_ex.h index a9159c5..1fdbef6 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rtc_ex.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rtc_ex.h @@ -733,6 +733,14 @@ typedef struct * @} */ +/** @defgroup RTCEx_MonotonicCounter_Instance RTCEx Monotonic Counter Instance Definition + * @{ + */ +#define RTC_MONOTONIC_COUNTER_1 0u /*!< Monotonic counter 1 */ +/** + * @} + */ + /** @defgroup RTCEx_Tamper_Registers_Offset RTC Tamper Registers Offset * @{ */ @@ -1412,10 +1420,6 @@ typedef struct #define __HAL_RTC_SHIFT_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != 0U) ? 1U : 0U) #endif /* RTC_ISR_SHPF */ -/** - * @} - */ - /* ========================================================================== */ /* ##### RTC Wake-up Interrupt exported macros ##### */ /* ========================================================================== */ @@ -1639,10 +1643,6 @@ typedef struct #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_EVENT() (EXTI->EMR1 &= ~(RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT)) #endif /* EXTI_D1 */ -/** - * @} - */ - #if defined(DUAL_CORE) /** * @brief Enable interrupt on the RTC Tamper and Timestamp associated D2 Exti line. @@ -1840,6 +1840,10 @@ HAL_StatusTypeDef HAL_RTCEx_SetActiveSeed(RTC_HandleTypeDef *hrtc, uint32_t *pSe HAL_StatusTypeDef HAL_RTCEx_DeactivateActiveTampers(RTC_HandleTypeDef *hrtc); #endif /* TAMP_ATCR1_TAMP1AM */ +/** + * @} + */ + /* ========================================================================== */ /* ##### RTC Wake-up exported functions ##### */ /* ========================================================================== */ @@ -1893,8 +1897,8 @@ HAL_StatusTypeDef HAL_RTCEx_DeactivateRefClock(RTC_HandleTypeDef *hrtc); HAL_StatusTypeDef HAL_RTCEx_EnableBypassShadow(RTC_HandleTypeDef *hrtc); HAL_StatusTypeDef HAL_RTCEx_DisableBypassShadow(RTC_HandleTypeDef *hrtc); #if defined(TAMP_COUNTR) -HAL_StatusTypeDef HAL_RTCEx_MonotonicCounterIncrement(RTC_HandleTypeDef *hrtc); -HAL_StatusTypeDef HAL_RTCEx_MonotonicCounterGet(RTC_HandleTypeDef *hrtc, uint32_t *Counter); +HAL_StatusTypeDef HAL_RTCEx_MonotonicCounterIncrement(RTC_HandleTypeDef *hrtc, uint32_t Instance); +HAL_StatusTypeDef HAL_RTCEx_MonotonicCounterGet(RTC_HandleTypeDef *hrtc, uint32_t *Counter, uint32_t Instance); #endif /* TAMP_COUNTR */ /** * @} diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_sai.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_sai.h index a8dd6d5..6271082 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_sai.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_sai.h @@ -115,9 +115,10 @@ typedef struct uint32_t AudioFrequency; /*!< Specifies the audio frequency sampling. This parameter can be a value of @ref SAI_Audio_Frequency */ - uint32_t Mckdiv; /*!< Specifies the master clock divider, the parameter will be used if for - AudioFrequency the user choice - This parameter must be a number between Min_Data = 0 and Max_Data = 63. */ + uint32_t Mckdiv; /*!< Specifies the master clock divider. + This parameter must be a number between Min_Data = 0 and Max_Data = 63. + @note This parameter is used only if AudioFrequency is set to + SAI_AUDIO_FREQUENCY_MCKDIV otherwise it is internally computed. */ uint32_t MckOverSampling; /*!< Specifies the master clock oversampling. This parameter can be a value of @ref SAI_Block_Mck_OverSampling */ @@ -154,6 +155,7 @@ typedef struct /** @defgroup SAI_Frame_Structure_definition SAI Frame Structure definition * @brief SAI Frame Init structure definition + * @note For SPDIF and AC97 protocol, these parameters are not used (set by hardware). * @{ */ typedef struct @@ -186,6 +188,8 @@ typedef struct /** @defgroup SAI_Slot_Structure_definition SAI Slot Structure definition * @brief SAI Block Slot Init Structure definition + * @note For SPDIF protocol, these parameters are not used (set by hardware). + * @note For AC97 protocol, only SlotActive parameter is used (the others are set by hardware). * @{ */ typedef struct @@ -824,7 +828,7 @@ uint32_t HAL_SAI_GetError(SAI_HandleTypeDef *hsai); */ /* Private macros ------------------------------------------------------------*/ -/** @addtogroup SAI_Private_Macros +/** @defgroup SAI_Private_Macros SAI Private Macros * @{ */ #define IS_SAI_BLOCK_SYNCEXT(STATE) (((STATE) == SAI_SYNCEXT_DISABLE) ||\ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_sd.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_sd.h index b695331..87c933b 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_sd.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_sd.h @@ -156,7 +156,6 @@ typedef struct void (* Read_DMADblBuf1CpltCallback) (struct __SD_HandleTypeDef *hsd); void (* Write_DMADblBuf0CpltCallback) (struct __SD_HandleTypeDef *hsd); void (* Write_DMADblBuf1CpltCallback) (struct __SD_HandleTypeDef *hsd); - #if (USE_SD_TRANSCEIVER != 0U) void (* DriveTransceiver_1_8V_Callback) (FlagStatus status); #endif /* USE_SD_TRANSCEIVER */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_sd_ex.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_sd_ex.h index 4a5ff5b..b21706d 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_sd_ex.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_sd_ex.h @@ -15,7 +15,7 @@ * opensource.org/licenses/BSD-3-Clause * ****************************************************************************** - */ + */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef STM32H7xx_HAL_SD_EX_H @@ -35,7 +35,7 @@ /** @addtogroup SDEx * @brief SD HAL extended module driver * @{ - */ + */ /* Exported types ------------------------------------------------------------*/ /** @defgroup SDEx_Exported_Types SDEx Exported Types @@ -44,7 +44,7 @@ /** @defgroup SDEx_Exported_Types_Group1 SD Card Internal DMA Buffer structure * @{ - */ + */ typedef enum { SD_DMA_BUFFER0 = 0x00U, /*!< selects SD internal DMA Buffer 0 */ @@ -52,24 +52,24 @@ typedef enum }HAL_SDEx_DMABuffer_MemoryTypeDef; - -/** +/** * @} */ - -/** + +/** * @} - */ + */ /* Exported constants --------------------------------------------------------*/ /* Exported macro ------------------------------------------------------------*/ /* Exported functions --------------------------------------------------------*/ /** @defgroup SDEx_Exported_Functions SDEx Exported Functions * @{ */ - + /** @defgroup SDEx_Exported_Functions_Group1 MultiBuffer functions * @{ */ + HAL_StatusTypeDef HAL_SDEx_ConfigDMAMultiBuffer(SD_HandleTypeDef *hsd, uint32_t * pDataBuffer0, uint32_t * pDataBuffer1, uint32_t BufferSize); HAL_StatusTypeDef HAL_SDEx_ReadBlocksDMAMultiBuffer(SD_HandleTypeDef *hsd, uint32_t BlockAdd, uint32_t NumberOfBlocks); HAL_StatusTypeDef HAL_SDEx_WriteBlocksDMAMultiBuffer(SD_HandleTypeDef *hsd, uint32_t BlockAdd, uint32_t NumberOfBlocks); @@ -83,11 +83,11 @@ void HAL_SDEx_Write_DMADoubleBuf1CpltCallback(SD_HandleTypeDef *hsd); /** * @} */ - + /** * @} */ - + /* Private types -------------------------------------------------------------*/ /* Private defines -----------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ @@ -95,7 +95,7 @@ void HAL_SDEx_Write_DMADoubleBuf1CpltCallback(SD_HandleTypeDef *hsd); /* Private macros ------------------------------------------------------------*/ /* Private functions prototypes ----------------------------------------------*/ /* Private functions ---------------------------------------------------------*/ - + /** * @} */ @@ -108,6 +108,6 @@ void HAL_SDEx_Write_DMADoubleBuf1CpltCallback(SD_HandleTypeDef *hsd); #endif -#endif /* stm32h7xx_HAL_SD_EX_H */ +#endif /* stm32h7xx_HAL_SD_EX_H */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_smbus.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_smbus.h index 283f66f..f1f3415 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_smbus.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_smbus.h @@ -132,7 +132,11 @@ typedef struct * @brief SMBUS handle Structure definition * @{ */ +#if (USE_HAL_SMBUS_REGISTER_CALLBACKS == 1) typedef struct __SMBUS_HandleTypeDef +#else +typedef struct +#endif /* USE_HAL_SMBUS_REGISTER_CALLBACKS */ { I2C_TypeDef *Instance; /*!< SMBUS registers base address */ @@ -326,6 +330,7 @@ typedef void (*pSMBUS_AddrCallbackTypeDef)(SMBUS_HandleTypeDef *hsmbus, uint8_t #define SMBUS_NEXT_FRAME ((uint32_t)(SMBUS_RELOAD_MODE | SMBUS_SOFTEND_MODE)) #define SMBUS_FIRST_AND_LAST_FRAME_NO_PEC SMBUS_AUTOEND_MODE #define SMBUS_LAST_FRAME_NO_PEC SMBUS_AUTOEND_MODE +#define SMBUS_FIRST_FRAME_WITH_PEC ((uint32_t)(SMBUS_SOFTEND_MODE | SMBUS_SENDPEC_MODE)) #define SMBUS_FIRST_AND_LAST_FRAME_WITH_PEC ((uint32_t)(SMBUS_AUTOEND_MODE | SMBUS_SENDPEC_MODE)) #define SMBUS_LAST_FRAME_WITH_PEC ((uint32_t)(SMBUS_AUTOEND_MODE | SMBUS_SENDPEC_MODE)) @@ -582,11 +587,12 @@ typedef void (*pSMBUS_AddrCallbackTypeDef)(SMBUS_HandleTypeDef *hsmbus, uint8_t ((REQUEST) == SMBUS_NO_STARTSTOP)) -#define IS_SMBUS_TRANSFER_OPTIONS_REQUEST(REQUEST) (IS_SMBUS_TRANSFER_OTHER_OPTIONS_REQUEST(REQUEST) || \ +#define IS_SMBUS_TRANSFER_OPTIONS_REQUEST(REQUEST) (IS_SMBUS_TRANSFER_OTHER_OPTIONS_REQUEST(REQUEST) || \ ((REQUEST) == SMBUS_FIRST_FRAME) || \ ((REQUEST) == SMBUS_NEXT_FRAME) || \ ((REQUEST) == SMBUS_FIRST_AND_LAST_FRAME_NO_PEC) || \ ((REQUEST) == SMBUS_LAST_FRAME_NO_PEC) || \ + ((REQUEST) == SMBUS_FIRST_FRAME_WITH_PEC) || \ ((REQUEST) == SMBUS_FIRST_AND_LAST_FRAME_WITH_PEC) || \ ((REQUEST) == SMBUS_LAST_FRAME_WITH_PEC)) diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_tim.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_tim.h index 37a7ada..bcf32cf 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_tim.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_tim.h @@ -304,6 +304,26 @@ typedef enum HAL_TIM_STATE_ERROR = 0x04U /*!< Reception process is ongoing */ } HAL_TIM_StateTypeDef; +/** + * @brief TIM Channel States definition + */ +typedef enum +{ + HAL_TIM_CHANNEL_STATE_RESET = 0x00U, /*!< TIM Channel initial state */ + HAL_TIM_CHANNEL_STATE_READY = 0x01U, /*!< TIM Channel ready for use */ + HAL_TIM_CHANNEL_STATE_BUSY = 0x02U, /*!< An internal process is ongoing on the TIM channel */ +} HAL_TIM_ChannelStateTypeDef; + +/** + * @brief DMA Burst States definition + */ +typedef enum +{ + HAL_DMA_BURST_STATE_RESET = 0x00U, /*!< DMA Burst initial state */ + HAL_DMA_BURST_STATE_READY = 0x01U, /*!< DMA Burst ready for use */ + HAL_DMA_BURST_STATE_BUSY = 0x02U, /*!< Ongoing DMA Burst */ +} HAL_TIM_DMABurstStateTypeDef; + /** * @brief HAL Active channel structures definition */ @@ -327,13 +347,16 @@ typedef struct __TIM_HandleTypeDef typedef struct #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ { - TIM_TypeDef *Instance; /*!< Register base address */ - TIM_Base_InitTypeDef Init; /*!< TIM Time Base required parameters */ - HAL_TIM_ActiveChannel Channel; /*!< Active channel */ - DMA_HandleTypeDef *hdma[7]; /*!< DMA Handlers array - This array is accessed by a @ref DMA_Handle_index */ - HAL_LockTypeDef Lock; /*!< Locking object */ - __IO HAL_TIM_StateTypeDef State; /*!< TIM operation state */ + TIM_TypeDef *Instance; /*!< Register base address */ + TIM_Base_InitTypeDef Init; /*!< TIM Time Base required parameters */ + HAL_TIM_ActiveChannel Channel; /*!< Active channel */ + DMA_HandleTypeDef *hdma[7]; /*!< DMA Handlers array + This array is accessed by a @ref DMA_Handle_index */ + HAL_LockTypeDef Lock; /*!< Locking object */ + __IO HAL_TIM_StateTypeDef State; /*!< TIM operation state */ + __IO HAL_TIM_ChannelStateTypeDef ChannelState[6]; /*!< TIM channel operation state */ + __IO HAL_TIM_ChannelStateTypeDef ChannelNState[4]; /*!< TIM complementary channel operation state */ + __IO HAL_TIM_DMABurstStateTypeDef DMABurstState; /*!< DMA burst operation state */ #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) void (* Base_MspInitCallback)(struct __TIM_HandleTypeDef *htim); /*!< TIM Base Msp Init Callback */ @@ -1116,25 +1139,49 @@ typedef void (*pTIM_CallbackTypeDef)(TIM_HandleTypeDef *htim); /*!< pointer to * @retval None */ #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) -#define __HAL_TIM_RESET_HANDLE_STATE(__HANDLE__) do { \ - (__HANDLE__)->State = HAL_TIM_STATE_RESET; \ - (__HANDLE__)->Base_MspInitCallback = NULL; \ - (__HANDLE__)->Base_MspDeInitCallback = NULL; \ - (__HANDLE__)->IC_MspInitCallback = NULL; \ - (__HANDLE__)->IC_MspDeInitCallback = NULL; \ - (__HANDLE__)->OC_MspInitCallback = NULL; \ - (__HANDLE__)->OC_MspDeInitCallback = NULL; \ - (__HANDLE__)->PWM_MspInitCallback = NULL; \ - (__HANDLE__)->PWM_MspDeInitCallback = NULL; \ - (__HANDLE__)->OnePulse_MspInitCallback = NULL; \ - (__HANDLE__)->OnePulse_MspDeInitCallback = NULL; \ - (__HANDLE__)->Encoder_MspInitCallback = NULL; \ - (__HANDLE__)->Encoder_MspDeInitCallback = NULL; \ - (__HANDLE__)->HallSensor_MspInitCallback = NULL; \ - (__HANDLE__)->HallSensor_MspDeInitCallback = NULL; \ +#define __HAL_TIM_RESET_HANDLE_STATE(__HANDLE__) do { \ + (__HANDLE__)->State = HAL_TIM_STATE_RESET; \ + (__HANDLE__)->ChannelState[0] = HAL_TIM_CHANNEL_STATE_RESET; \ + (__HANDLE__)->ChannelState[1] = HAL_TIM_CHANNEL_STATE_RESET; \ + (__HANDLE__)->ChannelState[2] = HAL_TIM_CHANNEL_STATE_RESET; \ + (__HANDLE__)->ChannelState[3] = HAL_TIM_CHANNEL_STATE_RESET; \ + (__HANDLE__)->ChannelState[4] = HAL_TIM_CHANNEL_STATE_RESET; \ + (__HANDLE__)->ChannelState[5] = HAL_TIM_CHANNEL_STATE_RESET; \ + (__HANDLE__)->ChannelNState[0] = HAL_TIM_CHANNEL_STATE_RESET; \ + (__HANDLE__)->ChannelNState[1] = HAL_TIM_CHANNEL_STATE_RESET; \ + (__HANDLE__)->ChannelNState[2] = HAL_TIM_CHANNEL_STATE_RESET; \ + (__HANDLE__)->ChannelNState[3] = HAL_TIM_CHANNEL_STATE_RESET; \ + (__HANDLE__)->DMABurstState = HAL_DMA_BURST_STATE_RESET; \ + (__HANDLE__)->Base_MspInitCallback = NULL; \ + (__HANDLE__)->Base_MspDeInitCallback = NULL; \ + (__HANDLE__)->IC_MspInitCallback = NULL; \ + (__HANDLE__)->IC_MspDeInitCallback = NULL; \ + (__HANDLE__)->OC_MspInitCallback = NULL; \ + (__HANDLE__)->OC_MspDeInitCallback = NULL; \ + (__HANDLE__)->PWM_MspInitCallback = NULL; \ + (__HANDLE__)->PWM_MspDeInitCallback = NULL; \ + (__HANDLE__)->OnePulse_MspInitCallback = NULL; \ + (__HANDLE__)->OnePulse_MspDeInitCallback = NULL; \ + (__HANDLE__)->Encoder_MspInitCallback = NULL; \ + (__HANDLE__)->Encoder_MspDeInitCallback = NULL; \ + (__HANDLE__)->HallSensor_MspInitCallback = NULL; \ + (__HANDLE__)->HallSensor_MspDeInitCallback = NULL; \ } while(0) #else -#define __HAL_TIM_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_TIM_STATE_RESET) +#define __HAL_TIM_RESET_HANDLE_STATE(__HANDLE__) do { \ + (__HANDLE__)->State = HAL_TIM_STATE_RESET; \ + (__HANDLE__)->ChannelState[0] = HAL_TIM_CHANNEL_STATE_RESET; \ + (__HANDLE__)->ChannelState[1] = HAL_TIM_CHANNEL_STATE_RESET; \ + (__HANDLE__)->ChannelState[2] = HAL_TIM_CHANNEL_STATE_RESET; \ + (__HANDLE__)->ChannelState[3] = HAL_TIM_CHANNEL_STATE_RESET; \ + (__HANDLE__)->ChannelState[4] = HAL_TIM_CHANNEL_STATE_RESET; \ + (__HANDLE__)->ChannelState[5] = HAL_TIM_CHANNEL_STATE_RESET; \ + (__HANDLE__)->ChannelNState[0] = HAL_TIM_CHANNEL_STATE_RESET; \ + (__HANDLE__)->ChannelNState[1] = HAL_TIM_CHANNEL_STATE_RESET; \ + (__HANDLE__)->ChannelNState[2] = HAL_TIM_CHANNEL_STATE_RESET; \ + (__HANDLE__)->ChannelNState[3] = HAL_TIM_CHANNEL_STATE_RESET; \ + (__HANDLE__)->DMABurstState = HAL_DMA_BURST_STATE_RESET; \ + } while(0) #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ /** @@ -1951,15 +1998,15 @@ mode. #define IS_TIM_TI1SELECTION(__TI1SELECTION__) (((__TI1SELECTION__) == TIM_TI1SELECTION_CH1) || \ ((__TI1SELECTION__) == TIM_TI1SELECTION_XORCOMBINATION)) -#define IS_TIM_DMA_LENGTH(__LENGTH__) (((__LENGTH__) == TIM_DMABURSTLENGTH_1TRANSFER) || \ - ((__LENGTH__) == TIM_DMABURSTLENGTH_2TRANSFERS) || \ - ((__LENGTH__) == TIM_DMABURSTLENGTH_3TRANSFERS) || \ - ((__LENGTH__) == TIM_DMABURSTLENGTH_4TRANSFERS) || \ - ((__LENGTH__) == TIM_DMABURSTLENGTH_5TRANSFERS) || \ - ((__LENGTH__) == TIM_DMABURSTLENGTH_6TRANSFERS) || \ - ((__LENGTH__) == TIM_DMABURSTLENGTH_7TRANSFERS) || \ - ((__LENGTH__) == TIM_DMABURSTLENGTH_8TRANSFERS) || \ - ((__LENGTH__) == TIM_DMABURSTLENGTH_9TRANSFERS) || \ +#define IS_TIM_DMA_LENGTH(__LENGTH__) (((__LENGTH__) == TIM_DMABURSTLENGTH_1TRANSFER) || \ + ((__LENGTH__) == TIM_DMABURSTLENGTH_2TRANSFERS) || \ + ((__LENGTH__) == TIM_DMABURSTLENGTH_3TRANSFERS) || \ + ((__LENGTH__) == TIM_DMABURSTLENGTH_4TRANSFERS) || \ + ((__LENGTH__) == TIM_DMABURSTLENGTH_5TRANSFERS) || \ + ((__LENGTH__) == TIM_DMABURSTLENGTH_6TRANSFERS) || \ + ((__LENGTH__) == TIM_DMABURSTLENGTH_7TRANSFERS) || \ + ((__LENGTH__) == TIM_DMABURSTLENGTH_8TRANSFERS) || \ + ((__LENGTH__) == TIM_DMABURSTLENGTH_9TRANSFERS) || \ ((__LENGTH__) == TIM_DMABURSTLENGTH_10TRANSFERS) || \ ((__LENGTH__) == TIM_DMABURSTLENGTH_11TRANSFERS) || \ ((__LENGTH__) == TIM_DMABURSTLENGTH_12TRANSFERS) || \ @@ -2008,6 +2055,50 @@ mode. ((__CHANNEL__) == TIM_CHANNEL_3) ? ((__HANDLE__)->Instance->CCER &= ~(TIM_CCER_CC3P | TIM_CCER_CC3NP)) :\ ((__HANDLE__)->Instance->CCER &= ~(TIM_CCER_CC4P | TIM_CCER_CC4NP))) +#define TIM_CHANNEL_STATE_GET(__HANDLE__, __CHANNEL__)\ + (((__CHANNEL__) == TIM_CHANNEL_1) ? (__HANDLE__)->ChannelState[0] :\ + ((__CHANNEL__) == TIM_CHANNEL_2) ? (__HANDLE__)->ChannelState[1] :\ + ((__CHANNEL__) == TIM_CHANNEL_3) ? (__HANDLE__)->ChannelState[2] :\ + ((__CHANNEL__) == TIM_CHANNEL_4) ? (__HANDLE__)->ChannelState[3] :\ + ((__CHANNEL__) == TIM_CHANNEL_5) ? (__HANDLE__)->ChannelState[4] :\ + (__HANDLE__)->ChannelState[5]) + +#define TIM_CHANNEL_STATE_SET(__HANDLE__, __CHANNEL__, __CHANNEL_STATE__) \ + (((__CHANNEL__) == TIM_CHANNEL_1) ? ((__HANDLE__)->ChannelState[0] = (__CHANNEL_STATE__)) :\ + ((__CHANNEL__) == TIM_CHANNEL_2) ? ((__HANDLE__)->ChannelState[1] = (__CHANNEL_STATE__)) :\ + ((__CHANNEL__) == TIM_CHANNEL_3) ? ((__HANDLE__)->ChannelState[2] = (__CHANNEL_STATE__)) :\ + ((__CHANNEL__) == TIM_CHANNEL_4) ? ((__HANDLE__)->ChannelState[3] = (__CHANNEL_STATE__)) :\ + ((__CHANNEL__) == TIM_CHANNEL_5) ? ((__HANDLE__)->ChannelState[4] = (__CHANNEL_STATE__)) :\ + ((__HANDLE__)->ChannelState[5] = (__CHANNEL_STATE__))) + +#define TIM_CHANNEL_STATE_SET_ALL(__HANDLE__, __CHANNEL_STATE__) do { \ + (__HANDLE__)->ChannelState[0] = (__CHANNEL_STATE__); \ + (__HANDLE__)->ChannelState[1] = (__CHANNEL_STATE__); \ + (__HANDLE__)->ChannelState[2] = (__CHANNEL_STATE__); \ + (__HANDLE__)->ChannelState[3] = (__CHANNEL_STATE__); \ + (__HANDLE__)->ChannelState[4] = (__CHANNEL_STATE__); \ + (__HANDLE__)->ChannelState[5] = (__CHANNEL_STATE__); \ + } while(0) + +#define TIM_CHANNEL_N_STATE_GET(__HANDLE__, __CHANNEL__)\ + (((__CHANNEL__) == TIM_CHANNEL_1) ? (__HANDLE__)->ChannelNState[0] :\ + ((__CHANNEL__) == TIM_CHANNEL_2) ? (__HANDLE__)->ChannelNState[1] :\ + ((__CHANNEL__) == TIM_CHANNEL_3) ? (__HANDLE__)->ChannelNState[2] :\ + (__HANDLE__)->ChannelNState[3]) + +#define TIM_CHANNEL_N_STATE_SET(__HANDLE__, __CHANNEL__, __CHANNEL_STATE__) \ + (((__CHANNEL__) == TIM_CHANNEL_1) ? ((__HANDLE__)->ChannelNState[0] = (__CHANNEL_STATE__)) :\ + ((__CHANNEL__) == TIM_CHANNEL_2) ? ((__HANDLE__)->ChannelNState[1] = (__CHANNEL_STATE__)) :\ + ((__CHANNEL__) == TIM_CHANNEL_3) ? ((__HANDLE__)->ChannelNState[2] = (__CHANNEL_STATE__)) :\ + ((__HANDLE__)->ChannelNState[3] = (__CHANNEL_STATE__))) + +#define TIM_CHANNEL_N_STATE_SET_ALL(__HANDLE__, __CHANNEL_STATE__) do { \ + (__HANDLE__)->ChannelNState[0] = (__CHANNEL_STATE__); \ + (__HANDLE__)->ChannelNState[1] = (__CHANNEL_STATE__); \ + (__HANDLE__)->ChannelNState[2] = (__CHANNEL_STATE__); \ + (__HANDLE__)->ChannelNState[3] = (__CHANNEL_STATE__); \ + } while(0) + /** * @} */ @@ -2233,6 +2324,11 @@ HAL_TIM_StateTypeDef HAL_TIM_PWM_GetState(TIM_HandleTypeDef *htim); HAL_TIM_StateTypeDef HAL_TIM_IC_GetState(TIM_HandleTypeDef *htim); HAL_TIM_StateTypeDef HAL_TIM_OnePulse_GetState(TIM_HandleTypeDef *htim); HAL_TIM_StateTypeDef HAL_TIM_Encoder_GetState(TIM_HandleTypeDef *htim); + +/* Peripheral Channel state functions ************************************************/ +HAL_TIM_ActiveChannel HAL_TIM_GetActiveChannel(TIM_HandleTypeDef *htim); +HAL_TIM_ChannelStateTypeDef HAL_TIM_GetChannelState(TIM_HandleTypeDef *htim, uint32_t Channel); +HAL_TIM_DMABurstStateTypeDef HAL_TIM_DMABurstState(TIM_HandleTypeDef *htim); /** * @} */ @@ -2252,7 +2348,6 @@ void TIM_OC2_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config); void TIM_ETR_SetConfig(TIM_TypeDef *TIMx, uint32_t TIM_ExtTRGPrescaler, uint32_t TIM_ExtTRGPolarity, uint32_t ExtTRGFilter); -void TIM_DMADelayPulseCplt(DMA_HandleTypeDef *hdma); void TIM_DMADelayPulseHalfCplt(DMA_HandleTypeDef *hdma); void TIM_DMAError(DMA_HandleTypeDef *hdma); void TIM_DMACaptureCplt(DMA_HandleTypeDef *hdma); diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_tim_ex.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_tim_ex.h index 0a7ef48..f3a7f01 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_tim_ex.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_tim_ex.h @@ -491,6 +491,7 @@ void HAL_TIMEx_Break2Callback(TIM_HandleTypeDef *htim); */ /* Extended Peripheral State functions ***************************************/ HAL_TIM_StateTypeDef HAL_TIMEx_HallSensor_GetState(TIM_HandleTypeDef *htim); +HAL_TIM_ChannelStateTypeDef HAL_TIMEx_GetChannelNState(TIM_HandleTypeDef *htim, uint32_t ChannelN); /** * @} */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_uart.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_uart.h index 48eb8db..7516a3f 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_uart.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_uart.h @@ -1170,13 +1170,14 @@ typedef void (*pUART_CallbackTypeDef)(UART_HandleTypeDef *huart); /*!< pointer ((__CLOCKPRESCALER__) == UART_PRESCALER_DIV128) ? 128U : \ ((__CLOCKPRESCALER__) == UART_PRESCALER_DIV256) ? 256U : 1U) + /** @brief BRR division operation to set BRR register with LPUART. * @param __PCLK__ LPUART clock. * @param __BAUD__ Baud rate set by the user. * @param __CLOCKPRESCALER__ UART prescaler value. * @retval Division result */ -#define UART_DIV_LPUART(__PCLK__, __BAUD__, __CLOCKPRESCALER__) ((uint32_t)(((((uint64_t)(__PCLK__)/UART_GET_DIV_FACTOR((__CLOCKPRESCALER__)))*256U)\ +#define UART_DIV_LPUART(__PCLK__, __BAUD__, __CLOCKPRESCALER__) ((uint32_t)((((((uint64_t)(__PCLK__))/(UARTPrescTable[(__CLOCKPRESCALER__)]))*256U)\ + (uint32_t)((__BAUD__)/2U)) / (__BAUD__))) /** @brief BRR division operation to set BRR register in 8-bit oversampling mode. @@ -1185,7 +1186,7 @@ typedef void (*pUART_CallbackTypeDef)(UART_HandleTypeDef *huart); /*!< pointer * @param __CLOCKPRESCALER__ UART prescaler value. * @retval Division result */ -#define UART_DIV_SAMPLING8(__PCLK__, __BAUD__, __CLOCKPRESCALER__) (((((__PCLK__)/UART_GET_DIV_FACTOR((__CLOCKPRESCALER__)))*2U)\ +#define UART_DIV_SAMPLING8(__PCLK__, __BAUD__, __CLOCKPRESCALER__) (((((__PCLK__)/UARTPrescTable[(__CLOCKPRESCALER__)])*2U)\ + ((__BAUD__)/2U)) / (__BAUD__)) /** @brief BRR division operation to set BRR register in 16-bit oversampling mode. @@ -1194,7 +1195,7 @@ typedef void (*pUART_CallbackTypeDef)(UART_HandleTypeDef *huart); /*!< pointer * @param __CLOCKPRESCALER__ UART prescaler value. * @retval Division result */ -#define UART_DIV_SAMPLING16(__PCLK__, __BAUD__, __CLOCKPRESCALER__) ((((__PCLK__)/UART_GET_DIV_FACTOR((__CLOCKPRESCALER__)))\ +#define UART_DIV_SAMPLING16(__PCLK__, __BAUD__, __CLOCKPRESCALER__) ((((__PCLK__)/UARTPrescTable[(__CLOCKPRESCALER__)])\ + ((__BAUD__)/2U)) / (__BAUD__)) /** @brief Check whether or not UART instance is Low Power UART. @@ -1514,6 +1515,11 @@ typedef void (*pUART_CallbackTypeDef)(UART_HandleTypeDef *huart); /*!< pointer #include "stm32h7xx_hal_uart_ex.h" +/* Prescaler Table used in BRR computation macros. + Declared as extern here to allow use of private UART macros, outside of HAL UART fonctions */ +extern const uint16_t UARTPrescTable[12]; + + /* Exported functions --------------------------------------------------------*/ /** @addtogroup UART_Exported_Functions UART Exported Functions * @{ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_adc.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_adc.h index 92045d3..f7e8c9c 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_adc.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_adc.h @@ -160,10 +160,10 @@ extern "C" { /* Mask containing trigger source masks for each of possible */ /* trigger edge selection duplicated with shifts [0; 4; 8; 12] */ /* corresponding to {SW start; ext trigger; ext trigger; ext trigger}. */ -#define ADC_INJ_TRIG_SOURCE_MASK (((LL_ADC_INJ_TRIG_SOFTWARE & ADC_JSQR_JEXTSEL) << (4U * 0UL)) | \ - ((ADC_JSQR_JEXTSEL) << (4U * 1UL)) | \ - ((ADC_JSQR_JEXTSEL) << (4U * 2UL)) | \ - ((ADC_JSQR_JEXTSEL) << (4U * 3UL)) ) +#define ADC_INJ_TRIG_SOURCE_MASK (((LL_ADC_INJ_TRIG_SOFTWARE & ADC_JSQR_JEXTSEL) << (4U * 0UL)) | \ + ((ADC_JSQR_JEXTSEL) << (4U * 1UL)) | \ + ((ADC_JSQR_JEXTSEL) << (4U * 2UL)) | \ + ((ADC_JSQR_JEXTSEL) << (4U * 3UL)) ) /* Mask containing trigger edge masks for each of possible */ /* trigger edge selection duplicated with shifts [0; 4; 8; 12] */ @@ -328,6 +328,11 @@ extern "C" { #define ADC_AWD_TR3_REGOFFSET (ADC_AWD_CR3_REGOFFSET) #define ADC_AWD_TRX_REGOFFSET_MASK (ADC_AWD_TR1_REGOFFSET | ADC_AWD_TR2_REGOFFSET | ADC_AWD_TR3_REGOFFSET) #define ADC_AWD_TRX_REGOFFSET_POS (ADC_AWD_CRX_REGOFFSET_POS) /* Position of bits ADC_TRx_REGOFFSET in ADC_AWD_TRX_REGOFFSET_MASK */ +#if defined(ADC_VER_V5_V90) +#define ADC_AWD_TRX_BIT_HIGH_MASK (0x00010000UL) /* Selection of 1 bit to discriminate threshold high: mask of bit */ +#define ADC_AWD_TRX_BIT_HIGH_POS (16UL) /* Selection of 1 bit to discriminate threshold high: position of bit */ +#define ADC_AWD_TRX_BIT_HIGH_SHIFT4 (ADC_AWD_TRX_BIT_HIGH_POS - 4UL) /* Shift of bit ADC_AWD_TRX_BIT_HIGH to position to perform a shift of 4 ranks */ +#endif /* ADC_VER_V5_V90 */ /* Register offset gap between AWD1 and AWD2-AWD3 thresholds registers */ /* (Set separately as ADC_AWD_TRX_REGOFFSET to spare 32 bits space */ @@ -353,6 +358,9 @@ extern "C" { #define ADC_CFGR_AWD1SGL_BITOFFSET_POS (ADC_CFGR_AWD1SGL_Pos) #define ADC_CFGR_AWD1EN_BITOFFSET_POS (ADC_CFGR_AWD1EN_Pos) #define ADC_CFGR_JAWD1EN_BITOFFSET_POS (ADC_CFGR_JAWD1EN_Pos) +#if defined(ADC_VER_V5_V90) +#define ADC_CFGR_RES_BITOFFSET_POS_ADC3 (ADC3_CFGR_RES_Pos) +#endif /* ADC_VER_V5_V90 */ /* ADC registers bits groups */ @@ -361,16 +369,27 @@ extern "C" { /* ADC internal channels related definitions */ /* Internal voltage reference VrefInt */ +#if defined(ADC_VER_V5_3) +#define VREFINT_CAL_ADDR ((uint16_t*) (0x8fff810UL)) /* Internal voltage reference, address of parameter VREFINT_CAL: VrefInt ADC raw data acquired at temperature 30 DegC (tolerance: +-5 DegC), Vref+ = 3.3 V (tolerance: +-10 mV). */ + /* Adress related to STM32H7A3 */ +#else /* ADC_VER_V5_90 || ADC_VER_V5_X */ #define VREFINT_CAL_ADDR ((uint16_t*) (0x1FF1E860UL)) /* Internal voltage reference, address of parameter VREFINT_CAL: VrefInt ADC raw data acquired at temperature 30 DegC (tolerance: +-5 DegC), Vref+ = 3.3 V (tolerance: +-10 mV). */ +#endif /* ADC_VER_V5_3 */ #define VREFINT_CAL_VREF (3300UL) /* Analog voltage reference (Vref+) value with which temperature sensor has been calibrated in production (tolerance: +-10 mV) (unit: mV). */ /* Temperature sensor */ +#if defined(ADC_VER_V5_3) +#define TEMPSENSOR_CAL1_ADDR ((uint16_t*) (0x8fff814UL)) /* Internal temperature sensor, address of parameter TS_CAL1: On STM32H7, temperature sensor ADC raw data acquired at temperature 30 DegC (tolerance: +-5 DegC), Vref+ = 3.3 V (tolerance: +-10 mV). */ +#define TEMPSENSOR_CAL2_ADDR ((uint16_t*) (0x8fff818UL)) /* Internal temperature sensor, address of parameter TS_CAL2: On STM32H7, temperature sensor ADC raw data acquired at temperature 110 DegC (tolerance: +-5 DegC), Vref+ = 3.3 V (tolerance: +-10 mV). */ + /* Adresses related to STM32H7A3 */ +#else /* ADC_VER_V5_90 || ADC_VER_V5_X */ #define TEMPSENSOR_CAL1_ADDR ((uint16_t*) (0x1FF1E820UL)) /* Internal temperature sensor, address of parameter TS_CAL1: On STM32H7, temperature sensor ADC raw data acquired at temperature 30 DegC (tolerance: +-5 DegC), Vref+ = 3.3 V (tolerance: +-10 mV). */ #define TEMPSENSOR_CAL2_ADDR ((uint16_t*) (0x1FF1E840UL)) /* Internal temperature sensor, address of parameter TS_CAL2: On STM32H7, temperature sensor ADC raw data acquired at temperature 110 DegC (tolerance: +-5 DegC), Vref+ = 3.3 V (tolerance: +-10 mV). */ +#endif /* ADC_VER_V5_3 */ + #define TEMPSENSOR_CAL1_TEMP (30L) /* Internal temperature sensor, temperature at which temperature sensor has been calibrated in production for data into TEMPSENSOR_CAL1_ADDR (tolerance: +-5 DegC) (unit: DegC). */ #define TEMPSENSOR_CAL2_TEMP (110L) /* Internal temperature sensor, temperature at which temperature sensor has been calibrated in production for data into TEMPSENSOR_CAL2_ADDR (tolerance: +-5 DegC) (unit: DegC). */ #define TEMPSENSOR_CAL_VREFANALOG (3300UL) /* Analog voltage reference (Vref+) voltage with which temperature sensor has been calibrated in production (+-10 mV) (unit: mV). */ - /* Registers addresses with ADC linearity calibration content (programmed during device production, specific to each device) */ #define ADC_LINEAR_CALIB_REG_1_ADDR ((uint32_t*) (0x1FF1EC00UL)) #define ADC_LINEAR_CALIB_REG_2_ADDR ((uint32_t*) (0x1FF1EC04UL)) @@ -398,7 +417,7 @@ extern "C" { * @retval Pointer to register address */ #define __ADC_PTR_REG_OFFSET(__REG__, __REG_OFFFSET__) \ - ((__IO uint32_t *)((uint32_t) ((uint32_t)(&(__REG__)) + ((__REG_OFFFSET__) << 2UL)))) + ((__IO uint32_t *)((uint32_t) ((uint32_t)(&(__REG__)) + ((__REG_OFFFSET__) << 2UL)))) /** * @} @@ -752,19 +771,43 @@ typedef struct /** @defgroup ADC_LL_EC_RESOLUTION ADC instance - Resolution * @{ */ -#define LL_ADC_RESOLUTION_16B (0x00000000UL) /*!< ADC resolution 16 bits */ -#define LL_ADC_RESOLUTION_14B ( ADC_CFGR_RES_0) /*!< ADC resolution 12 bits */ -#define LL_ADC_RESOLUTION_12B ( ADC_CFGR_RES_1 ) /*!< ADC resolution 12 bits */ -#define LL_ADC_RESOLUTION_10B ( ADC_CFGR_RES_1 | ADC_CFGR_RES_0) /*!< ADC resolution 10 bits */ -#if defined (ADC_VER_V5_3) +#define LL_ADC_RESOLUTION_16B (0x00000000UL) /*!< ADC resolution 16 bits */ +#define LL_ADC_RESOLUTION_14B ( ADC_CFGR_RES_0) /*!< ADC resolution 12 bits */ +#define LL_ADC_RESOLUTION_12B ( ADC_CFGR_RES_1 ) /*!< ADC resolution 12 bits */ +#define LL_ADC_RESOLUTION_10B ( ADC_CFGR_RES_1 | ADC_CFGR_RES_0) /*!< ADC resolution 10 bits */ + +#if defined (ADC_VER_V5_X) +#define LL_ADC_RESOLUTION_14B_OPT (ADC_CFGR_RES_2 | ADC_CFGR_RES_0) /*!< ADC resolution 14 bits optimized for power consumption, available on for devices revision V only */ +#define LL_ADC_RESOLUTION_12B_OPT (ADC_CFGR_RES_2 | ADC_CFGR_RES_1 ) /*!< ADC resolution 12 bits optimized for power consumption, available on for devices revision V only */ +#endif + +#if defined (ADC_VER_V5_3) || defined(ADC_VER_V5_V90) #define LL_ADC_RESOLUTION_8B (ADC_CFGR_RES_2|ADC_CFGR_RES_1 | ADC_CFGR_RES_0) /*!< ADC resolution 8 bits */ #else #define LL_ADC_RESOLUTION_8B (ADC_CFGR_RES_2 ) /*!< ADC resolution 8 bits */ + /*!< The resolution setting is managed internaly in the driver: + "LL_ADC_RESOLUTION_8B" definition: keep using the "100b" value (corresponding to STM32H74x/5x rev Y). + Rev.V value "111b" is handled through functions "LL_ADC_SetResolution/LL_ADC_GetResolution" with a dedicated check on DBGMCU IDCODE register */ #endif +#if defined(ADC_VER_V5_V90) +#define LL_ADC_RESOLUTION_6B (ADC3_CFGR_RES_1 | ADC3_CFGR_RES_0) /*!< ADC resolution 6 bits. Value available for ADC3 on STM32H72xx/3xx devices only*/ +#endif /* ADC_VER_V5_V90 */ /** * @} */ +#if defined(ADC_VER_V5_V90) +/** @defgroup ADC_LL_EC_DATA_ALIGN ADC instance - Data alignment + * @{ + */ +#define LL_ADC_DATA_ALIGN_RIGHT (0x00000000UL) /*!< ADC conversion data alignment: right aligned (alignment on data register LSB bit 0)*/ +#define LL_ADC_DATA_ALIGN_LEFT (ADC3_CFGR_ALIGN) /*!< ADC conversion data alignment: left aligned (aligment on data register MSB bit 15)*/ +/** + * @} + */ + +#endif /* ADC_VER_V5_V90 */ + /** @defgroup ADC_LL_EC_LEFT_BIT_SHIFT ADC left Shift * @{ */ @@ -825,6 +868,37 @@ typedef struct /** * @} */ +#if defined(ADC_VER_V5_V90) +/** @defgroup ADC_LL_EC_OFFSET_SATURATION ADC instance - Offset saturation mode + * @{ + */ +#define LL_ADC_OFFSET_SATURATION_DISABLE (0x00000000UL) /*!< ADC offset saturation is disabled (among ADC selected offset number 1, 2, 3 or 4). On devices STM32H72xx and STM32H73xx */ +#define LL_ADC_OFFSET_SATURATION_ENABLE (ADC3_OFR1_SATEN) /*!< ADC offset saturation is enabled (among ADC selected offset number 1, 2, 3 or 4). On devices STM32H72xx and STM32H73xx */ +/** + * @} + */ + +/** @defgroup ADC_LL_EC_OFFSET_STATE ADC instance - Offset state + * @{ + */ +#define LL_ADC_OFFSET_DISABLE (0x00000000UL) /*!< ADC offset disabled (among ADC selected offset number 1, 2, 3 or 4) */ +#define LL_ADC_OFFSET_ENABLE (ADC3_OFR1_OFFSET1_EN) /*!< ADC offset enabled (among ADC selected offset number 1, 2, 3 or 4) */ +/** + * @} + */ +#if defined(ADC_VER_V5_V90) +/** @defgroup ADC_LL_EC_OFFSET_SIGN ADC instance - Offset sign + * @{ + */ +#define LL_ADC_OFFSET_SIGN_NEGATIVE (0x00000000UL) /*!< ADC offset is negative (among ADC selected offset number 1, 2, 3 or 4). On devices STM32H72xx and STM32H73xx */ +#define LL_ADC_OFFSET_SIGN_POSITIVE (ADC3_OFR1_OFFSETPOS) /*!< ADC offset is positive (among ADC selected offset number 1, 2, 3 or 4). On devices STM32H72xx and STM32H73xx */ +/** + * @} + */ +#endif + +#endif /* ADC_VER_V5_V90 */ + /** @defgroup ADC_LL_EC_GROUPS ADC instance - Groups * @{ */ @@ -859,10 +933,15 @@ typedef struct #define LL_ADC_CHANNEL_18 (ADC_CHANNEL_18_NUMBER | ADC_CHANNEL_18_SMP | ADC_CHANNEL_18_BITFIELD) /*!< ADC external channel (channel connected to GPIO pin) ADCx_IN18 */ #define LL_ADC_CHANNEL_19 (ADC_CHANNEL_19_NUMBER | ADC_CHANNEL_19_SMP | ADC_CHANNEL_19_BITFIELD) /*!< ADC external channel (channel connected to GPIO pin) ADCx_IN19 */ #if defined(ADC3) -/*!< ADC3 is defined only in the case of STM32H7XX */ +#if defined(ADC_VER_V5_V90) +#define LL_ADC_CHANNEL_VREFINT (LL_ADC_CHANNEL_18 | ADC_CHANNEL_ID_INTERNAL_CH) /*!< ADC internal channel connected to VrefInt: Internal voltage reference. On STM32H7, ADC channel available only on ADC instance: ADC3. */ +#define LL_ADC_CHANNEL_TEMPSENSOR (LL_ADC_CHANNEL_17 | ADC_CHANNEL_ID_INTERNAL_CH) /*!< ADC internal channel connected to Temperature sensor. On STM32H7, ADC channel available only on ADC instance: ADC3. */ +#define LL_ADC_CHANNEL_VBAT (LL_ADC_CHANNEL_16 | ADC_CHANNEL_ID_INTERNAL_CH) /*!< ADC internal channel connected to Vbat/3: Vbat voltage through a divider ladder of factor 1/4 to have Vbat always below Vdda. On STM32H7, ADC channel available only on ADC instance: ADC3. */ +#else #define LL_ADC_CHANNEL_VREFINT (LL_ADC_CHANNEL_19 | ADC_CHANNEL_ID_INTERNAL_CH) /*!< ADC internal channel connected to VrefInt: Internal voltage reference. On STM32H7, ADC channel available only on ADC instance: ADC3. */ #define LL_ADC_CHANNEL_TEMPSENSOR (LL_ADC_CHANNEL_18 | ADC_CHANNEL_ID_INTERNAL_CH) /*!< ADC internal channel connected to Temperature sensor. On STM32H7, ADC channel available only on ADC instance: ADC3. */ #define LL_ADC_CHANNEL_VBAT (LL_ADC_CHANNEL_17 | ADC_CHANNEL_ID_INTERNAL_CH) /*!< ADC internal channel connected to Vbat/3: Vbat voltage through a divider ladder of factor 1/4 to have Vbat always below Vdda. On STM32H7, ADC channel available only on ADC instance: ADC3. */ +#endif #else /*!< Specific define for STM32H7A3xx and STM32HB3xx varieties of STM32H7XXX */ #define LL_ADC_CHANNEL_VREFINT (LL_ADC_CHANNEL_19 | ADC_CHANNEL_ID_INTERNAL_CH) /*!< ADC internal channel connected to VrefInt: Internal voltage reference. On STM32H7, ADC channel available only on ADC instance: ADC2. */ @@ -902,8 +981,14 @@ typedef struct #define LL_ADC_REG_TRIG_EXT_HRTIM_TRG1 (ADC_CFGR_EXTSEL_4 | ADC_REG_TRIG_EXT_EDGE_DEFAULT) /*!< ADC group regular conversion trigger from external peripheral: HRTIM TRG1 event. Trigger edge set to rising edge (default setting). */ #define LL_ADC_REG_TRIG_EXT_HRTIM_TRG3 (ADC_CFGR_EXTSEL_4 | ADC_CFGR_EXTSEL_0 | ADC_REG_TRIG_EXT_EDGE_DEFAULT) /*!< ADC group regular conversion trigger from external peripheral: HRTIM TRG2 event. Trigger edge set to rising edge (default setting). */ #define LL_ADC_REG_TRIG_EXT_LPTIM1_OUT (ADC_CFGR_EXTSEL_4 | ADC_CFGR_EXTSEL_1 | ADC_REG_TRIG_EXT_EDGE_DEFAULT) /*!< ADC group regular conversion trigger from external peripheral: LPTIM1 OUT event. Trigger edge set to rising edge (default setting). */ -#define LL_ADC_REG_TRIG_EXT_LPTIM2_OUT (ADC_CFGR_EXTSEL_4 | ADC_CFGR_EXTSEL_1| ADC_CFGR_EXTSEL_0 | ADC_REG_TRIG_EXT_EDGE_DEFAULT) /*!< ADC group regular conversion trigger from external peripheral: LPTIM2 OUT event. Trigger edge set to rising edge (default setting). */ +#define LL_ADC_REG_TRIG_EXT_LPTIM2_OUT (ADC_CFGR_EXTSEL_4 | ADC_CFGR_EXTSEL_1 | ADC_CFGR_EXTSEL_0 | ADC_REG_TRIG_EXT_EDGE_DEFAULT) /*!< ADC group regular conversion trigger from external peripheral: LPTIM2 OUT event. Trigger edge set to rising edge (default setting). */ #define LL_ADC_REG_TRIG_EXT_LPTIM3_OUT (ADC_CFGR_EXTSEL_4 | ADC_CFGR_EXTSEL_2 | ADC_REG_TRIG_EXT_EDGE_DEFAULT) /*!< ADC group regular conversion trigger from external peripheral: LPTIM3 event OUT. Trigger edge set to rising edge (default setting). */ +#if defined (TIM23) +#define LL_ADC_REG_TRIG_EXT_TIM23_TRGO (ADC_CFGR_EXTSEL_4 | ADC_CFGR_EXTSEL_2 | ADC_CFGR_EXTSEL_0 | ADC_REG_TRIG_EXT_EDGE_DEFAULT) /*!< ADC group regular conversion trigger from external peripheral: TIM23 TRGO event. Trigger edge set to rising edge (default setting). */ +#endif /* TIM23 */ +#if defined (TIM24) +#define LL_ADC_REG_TRIG_EXT_TIM24_TRGO (ADC_CFGR_EXTSEL_4 | ADC_CFGR_EXTSEL_2 | ADC_CFGR_EXTSEL_1 | ADC_REG_TRIG_EXT_EDGE_DEFAULT) /*!< ADC group regular conversion trigger from external peripheral: TIM24 TRGO event. Trigger edge set to rising edge (default setting). */ +#endif /* TIM24 */ /** * @} */ @@ -917,10 +1002,24 @@ typedef struct /** * @} */ - -/** @defgroup ADC_LL_EC_REG_CONTINUOUS_MODE ADC group regular - Continuous mode +#if defined(ADC_VER_V5_V90) + /** @defgroup ADC_LL_EC_REG_SAMPLING_MODE ADC group regular - Sampling mode * @{ */ +#define LL_ADC_REG_SAMPLING_MODE_NORMAL (0x00000000UL) /*!< ADC conversions sampling phase duration is defined using @ref ADC_LL_EC_CHANNEL_SAMPLINGTIME. On devices STM32H72xx and STM32H73xx */ +#define LL_ADC_REG_SAMPLING_MODE_BULB (ADC3_CFGR2_BULB) /*!< ADC conversions sampling phase starts immediately after end of conversion, and stops upon trigger event. + Note: First conversion is using minimal sampling time (see @ref ADC_LL_EC_CHANNEL_SAMPLINGTIME). On devices STM32H72xx and STM32H73xx */ +#define LL_ADC_REG_SAMPLING_MODE_TRIGGER_CONTROLED (ADC3_CFGR2_SMPTRIG) /*!< ADC conversions sampling phase is controlled by trigger events: + Trigger rising edge = start sampling + Trigger falling edge = stop sampling and start conversion. On devices STM32H72xx and STM32H73xx */ +/** + * @} + */ +#endif /* ADC_VER_V5_V90 */ + +/** @defgroup ADC_LL_EC_REG_CONTINUOUS_MODE ADC group regular - Continuous mode +* @{ +*/ #define LL_ADC_REG_CONV_SINGLE (0x00000000UL) /*!< ADC conversions are performed in single mode: one conversion per trigger */ #define LL_ADC_REG_CONV_CONTINUOUS (ADC_CFGR_CONT) /*!< ADC conversions are performed in continuous mode: after the first trigger, following conversions launched successively automatically */ /** @@ -938,9 +1037,22 @@ typedef struct * @} */ -/** @defgroup ADC_LL_EC_REG_OVR_DATA_BEHAVIOR ADC group regular - Overrun behavior on conversion data +#if defined(ADC_VER_V5_V90) +/** @defgroup ADC_LL_EC_REG_DMA_TRANSFER ADC group regular - DMA transfer of ADC conversion data * @{ */ + +#define LL_ADC3_REG_DMA_TRANSFER_NONE (0x00000000UL) /*!< ADC conversions are not transferred by DMA. On ADC3 of devices STM32H72xx and STM32H73xx */ +#define LL_ADC3_REG_DMA_TRANSFER_LIMITED ( ADC3_CFGR_DMAEN) /*!< ADC conversion data are transferred by DMA, in limited mode (one shot mode): DMA transfer requests are stopped when number of DMA data transfers (number of ADC conversions) is reached. This ADC mode is intended to be used with DMA mode non-circular. On ADC3 of devices STM32H72xx and STM32H73xx */ +#define LL_ADC3_REG_DMA_TRANSFER_UNLIMITED (ADC3_CFGR_DMACFG | ADC3_CFGR_DMAEN) /*!< ADC conversion data are transferred by DMA, in unlimited mode: DMA transfer requests are unlimited, whatever number of DMA data transferred (number of ADC conversions). This ADC mode is intended to be used with DMA mode circular. On ADC3 of devices STM32H72xx and STM32H73xx*/ +/** + * @} + */ +#endif + +/** @defgroup ADC_LL_EC_REG_OVR_DATA_BEHAVIOR ADC group regular - Overrun behavior on conversion data +* @{ +*/ #define LL_ADC_REG_OVR_DATA_PRESERVED (0x00000000UL) /*!< ADC group regular behavior in case of overrun: data preserved */ #define LL_ADC_REG_OVR_DATA_OVERWRITTEN (ADC_CFGR_OVRMOD) /*!< ADC group regular behavior in case of overrun: data overwritten */ /** @@ -1034,6 +1146,8 @@ typedef struct #define LL_ADC_INJ_TRIG_EXT_LPTIM1_OUT (ADC_JSQR_JEXTSEL_4 | ADC_JSQR_JEXTSEL_1 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT) /*!< ADC group injected conversion trigger from external peripheral: LPTIM1 OUT event. Trigger edge set to rising edge (default setting). */ #define LL_ADC_INJ_TRIG_EXT_LPTIM2_OUT (ADC_JSQR_JEXTSEL_4 | ADC_JSQR_JEXTSEL_1 | ADC_JSQR_JEXTSEL_0 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT) /*!< ADC group injected conversion trigger from external peripheral: LPTIM2 OUT event. Trigger edge set to rising edge (default setting). */ #define LL_ADC_INJ_TRIG_EXT_LPTIM3_OUT (ADC_JSQR_JEXTSEL_4 | ADC_JSQR_JEXTSEL_2 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT) /*!< ADC group injected conversion trigger from external peripheral: LPTIM3 OUT event. 4 event (capture compare: input capture or output capture). Trigger edge set to rising edge (default setting). */ +#define LL_ADC_INJ_TRIG_EXT_TIM23_TRGO (ADC_JSQR_JEXTSEL_4 | ADC_JSQR_JEXTSEL_2 | ADC_JSQR_JEXTSEL_0 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT) /*!< ADC group regular conversion trigger from external peripheral: TIM23 TRGO event. Trigger edge set to rising edge (default setting). */ +#define LL_ADC_INJ_TRIG_EXT_TIM24_TRGO (ADC_JSQR_JEXTSEL_4 | ADC_JSQR_JEXTSEL_2 | ADC_JSQR_JEXTSEL_1 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT) /*!< ADC group regular conversion trigger from external peripheral: TIM24 TRGO event. Trigger edge set to rising edge (default setting). */ /** * @} */ @@ -1049,8 +1163,8 @@ typedef struct */ /** @defgroup ADC_LL_EC_INJ_TRIG_AUTO ADC group injected - Automatic trigger mode - * @{ - */ +* @{ +*/ #define LL_ADC_INJ_TRIG_INDEPENDENT (0x00000000UL) /*!< ADC group injected conversion trigger independent. Setting mandatory if ADC group injected injected trigger source is set to an external trigger. */ #define LL_ADC_INJ_TRIG_FROM_GRP_REGULAR (ADC_CFGR_JAUTO) /*!< ADC group injected conversion trigger from ADC group regular. Setting compliant only with group injected trigger source set to SW start, without any further action on ADC group injected conversion start or stop: in this case, ADC group injected is controlled only from ADC group regular. */ /** @@ -1112,6 +1226,22 @@ typedef struct /** * @} */ +#if defined(ADC_VER_V5_V90) +/** @defgroup ADC_LL_EC_CHANNEL_SAMPLINGTIME Channel - Sampling time + * @{ + */ +#define LL_ADC_SAMPLINGTIME_ADC3_2CYCLES_5 (0x00000000UL) /*!< Sampling time 2.5 ADC clock cycles. On ADC3 of devices STM32H72xx and STM32H73xx */ +#define LL_ADC_SAMPLINGTIME_ADC3_6CYCLES_5 ( ADC_SMPR2_SMP10_0) /*!< Sampling time 6.5 ADC clock cycles. On ADC3 of devices STM32H72xx and STM32H73xx */ +#define LL_ADC_SAMPLINGTIME_ADC3_12CYCLES_5 ( ADC_SMPR2_SMP10_1 ) /*!< Sampling time 12.5 ADC clock cycles. On ADC3 of devices STM32H72xx and STM32H73xx */ +#define LL_ADC_SAMPLINGTIME_ADC3_24CYCLES_5 ( ADC_SMPR2_SMP10_1 | ADC_SMPR2_SMP10_0) /*!< Sampling time 24.5 ADC clock cycles. On ADC3 of devices STM32H72xx and STM32H73xx */ +#define LL_ADC_SAMPLINGTIME_ADC3_47CYCLES_5 (ADC_SMPR2_SMP10_2 ) /*!< Sampling time 47.5 ADC clock cycles. On ADC3 of devices STM32H72xx and STM32H73xx */ +#define LL_ADC_SAMPLINGTIME_ADC3_92CYCLES_5 (ADC_SMPR2_SMP10_2 | ADC_SMPR2_SMP10_0) /*!< Sampling time 92.5 ADC clock cycles. On ADC3 of devices STM32H72xx and STM32H73xx */ +#define LL_ADC_SAMPLINGTIME_ADC3_247CYCLES_5 (ADC_SMPR2_SMP10_2 | ADC_SMPR2_SMP10_1 ) /*!< Sampling time 247.5 ADC clock cycles. On ADC3 of devices STM32H72xx and STM32H73xx */ +#define LL_ADC_SAMPLINGTIME_ADC3_640CYCLES_5 (ADC_SMPR2_SMP10_2 | ADC_SMPR2_SMP10_1 | ADC_SMPR2_SMP10_0) /*!< Sampling time 640.5 ADC clock cycles. On ADC3 of devices STM32H72xx and STM32H73xx */ +/** + * @} + */ +#endif /* ADC_VER_V5_V90 */ /** @defgroup ADC_LL_EC_CHANNEL_SINGLE_DIFF_ENDING Channel - Single or differential ending * @{ @@ -1227,6 +1357,22 @@ typedef struct /** * @} */ +#if defined(ADC_VER_V5_V90) +/** @defgroup ADC_LL_EC_AWD_FILTERING_CONFIG Analog watchdog - filtering config + * @{ + */ +#define LL_ADC_AWD_FILTERING_NONE (0x00000000UL) /*!< ADC analog wathdog no filtering, one out-of-window sample is needed to raise flag or interrupt. On ADC3 of devices STM32H72xx and STM32H73xx */ +#define LL_ADC_AWD_FILTERING_2SAMPLES ( ADC3_TR1_AWDFILT_0) /*!< ADC analog wathdog 2 consecutives out-of-window samples are needed to raise flag or interrupt. On ADC3 of devices STM32H72xx and STM32H73xx */ +#define LL_ADC_AWD_FILTERING_3SAMPLES ( ADC3_TR1_AWDFILT_1 ) /*!< ADC analog wathdog 3 consecutives out-of-window samples are needed to raise flag or interrupt. On ADC3 of devices STM32H72xx and STM32H73xx */ +#define LL_ADC_AWD_FILTERING_4SAMPLES ( ADC3_TR1_AWDFILT_1 | ADC3_TR1_AWDFILT_0) /*!< ADC analog wathdog 4 consecutives out-of-window samples are needed to raise flag or interrupt. On ADC3 of devices STM32H72xx and STM32H73xx */ +#define LL_ADC_AWD_FILTERING_5SAMPLES (ADC3_TR1_AWDFILT_2 ) /*!< ADC analog wathdog 5 consecutives out-of-window samples are needed to raise flag or interrupt. On ADC3 of devices STM32H72xx and STM32H73xx */ +#define LL_ADC_AWD_FILTERING_6SAMPLES (ADC3_TR1_AWDFILT_2 | ADC3_TR1_AWDFILT_0) /*!< ADC analog wathdog 6 consecutives out-of-window samples are needed to raise flag or interrupt. On ADC3 of devices STM32H72xx and STM32H73xx */ +#define LL_ADC_AWD_FILTERING_7SAMPLES (ADC3_TR1_AWDFILT_2 | ADC3_TR1_AWDFILT_1 ) /*!< ADC analog wathdog 7 consecutives out-of-window samples are needed to raise flag or interrupt. On ADC3 of devices STM32H72xx and STM32H73xx */ +#define LL_ADC_AWD_FILTERING_8SAMPLES (ADC3_TR1_AWDFILT_2 | ADC3_TR1_AWDFILT_1 | ADC3_TR1_AWDFILT_0) /*!< ADC analog wathdog 8 consecutives out-of-window samples are needed to raise flag or interrupt. On ADC3 of devices STM32H72xx and STM32H73xx */ +/** + * @} + */ +#endif /* ADC_VER_V5_V90 */ /** @defgroup ADC_LL_EC_OVS_SCOPE Oversampling - Oversampling scope * @{ @@ -1248,6 +1394,22 @@ typedef struct /** * @} */ +#if defined(ADC_VER_V5_V90) +/** @defgroup ADC_LL_EC_OVS_RATIO Oversampling - Ratio + * @{ + */ +#define LL_ADC_OVS_RATIO_2 (0x00000000UL) /*!< ADC oversampling ratio of 2 (2 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift) */ +#define LL_ADC_OVS_RATIO_4 ( ADC3_CFGR2_OVSR_0) /*!< ADC oversampling ratio of 4 (4 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift) */ +#define LL_ADC_OVS_RATIO_8 ( ADC3_CFGR2_OVSR_1 ) /*!< ADC oversampling ratio of 8 (8 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift) */ +#define LL_ADC_OVS_RATIO_16 ( ADC3_CFGR2_OVSR_1 | ADC3_CFGR2_OVSR_0) /*!< ADC oversampling ratio of 16 (16 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift) */ +#define LL_ADC_OVS_RATIO_32 (ADC3_CFGR2_OVSR_2 ) /*!< ADC oversampling ratio of 32 (32 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift) */ +#define LL_ADC_OVS_RATIO_64 (ADC3_CFGR2_OVSR_2 | ADC3_CFGR2_OVSR_0) /*!< ADC oversampling ratio of 64 (64 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift) */ +#define LL_ADC_OVS_RATIO_128 (ADC3_CFGR2_OVSR_2 | ADC3_CFGR2_OVSR_1 ) /*!< ADC oversampling ratio of 128 (128 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift) */ +#define LL_ADC_OVS_RATIO_256 (ADC3_CFGR2_OVSR_2 | ADC3_CFGR2_OVSR_1 | ADC3_CFGR2_OVSR_0) /*!< ADC oversampling ratio of 256 (256 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift) */ +/** + * @} + */ +#endif /* ADC_VER_V5_V90 */ /** @defgroup ADC_LL_EC_OVS_SHIFT Oversampling - Data shift * @{ @@ -1430,6 +1592,41 @@ typedef struct * @{ */ +#if defined(ADC_VER_V5_V90) +/** + * @brief Helper macro to convert the resolution defines to STM32H73x/2x ADC3 registers values + * value corresponding to the ADC3 resolution according to the STM32H73x/2x RefMan. + * @note The input can be a value from ADC3 resolution (12b, 10b, 8b,6b) + * @param __ADC_RESOLUTION__ This parameter can be one of the following values: + * @arg @ref LL_ADC_RESOLUTION_12B + * @arg @ref LL_ADC_RESOLUTION_10B + * @arg @ref LL_ADC_RESOLUTION_8B + * @arg @ref LL_ADC_RESOLUTION_6B + * @retval Returned value can be one of the following values: + * @arg 0x00000000UL (value correspodning to ADC3 12 bits) + * @arg ADC_CFGR_RES_0 = 0x00000004 (value corresponding to ADC3 10 bits) + * @arg ADC_CFGR_RES_1 = 0x00000008 (value corresponding to ADC3 8 bits) + * @arg 0x0000001C (value corresponding to ADC3 6 bits) + * @note This helper macro is applicable for STM32H73x/2x devices only + */ +#define __LL_ADC12_RESOLUTION_TO_ADC3(__ADC_RESOLUTION__) \ + ( \ + ((__ADC_RESOLUTION__) == LL_ADC_RESOLUTION_12B) \ + ?(0x00000000UL) \ + : \ + ((__ADC_RESOLUTION__) == LL_ADC_RESOLUTION_10B) \ + ?(ADC_CFGR_RES_0) \ + : \ + ((__ADC_RESOLUTION__) == LL_ADC_RESOLUTION_8B) \ + ?(ADC_CFGR_RES_1) \ + : \ + ((__ADC_RESOLUTION__) == LL_ADC_RESOLUTION_6B) \ + ?((ADC_CFGR_RES_2|ADC_CFGR_RES_1 | ADC_CFGR_RES_0)) \ + :(0x00000000UL) \ + ) + +#endif /* ADC_VER_V5_V90 */ + /** * @brief Helper macro to get ADC channel number in decimal format * from literals LL_ADC_CHANNEL_x. @@ -1474,13 +1671,13 @@ typedef struct */ #define __LL_ADC_CHANNEL_TO_DECIMAL_NB(__CHANNEL__) \ ((((__CHANNEL__) & ADC_CHANNEL_ID_BITFIELD_MASK) == 0UL) \ - ? ( \ + ? ( \ ((__CHANNEL__) & ADC_CHANNEL_ID_NUMBER_MASK) >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS \ - ) \ - : \ - ( \ + ) \ + : \ + ( \ (uint32_t)POSITION_VAL((__CHANNEL__)) \ - ) \ + ) \ ) /** @@ -1527,17 +1724,17 @@ typedef struct */ #define __LL_ADC_DECIMAL_NB_TO_CHANNEL(__DECIMAL_NB__) \ (((__DECIMAL_NB__) <= 9UL) \ - ? ( \ + ? ( \ ((__DECIMAL_NB__) << ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) | \ (ADC_AWD2CR_AWD2CH_0 << (__DECIMAL_NB__)) | \ (ADC_SMPR1_REGOFFSET | (((3UL * (__DECIMAL_NB__))) << ADC_CHANNEL_SMPx_BITOFFSET_POS)) \ - ) \ - : \ - ( \ + ) \ + : \ + ( \ ((__DECIMAL_NB__) << ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) | \ (ADC_AWD2CR_AWD2CH_0 << (__DECIMAL_NB__)) | \ (ADC_SMPR2_REGOFFSET | (((3UL * ((__DECIMAL_NB__) - 10UL))) << ADC_CHANNEL_SMPx_BITOFFSET_POS)) \ - ) \ + ) \ ) /** @@ -1854,12 +2051,12 @@ typedef struct */ #define __LL_ADC_ANALOGWD_CHANNEL_GROUP(__CHANNEL__, __GROUP__) \ (((__GROUP__) == LL_ADC_GROUP_REGULAR) \ - ? (((__CHANNEL__) & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL) \ - : \ - ((__GROUP__) == LL_ADC_GROUP_INJECTED) \ - ? (((__CHANNEL__) & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL) \ - : \ - (((__CHANNEL__) & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL) \ + ? (((__CHANNEL__) & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL) \ + : \ + ((__GROUP__) == LL_ADC_GROUP_INJECTED) \ + ? (((__CHANNEL__) & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL) \ + : \ + (((__CHANNEL__) & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL) \ ) /** @@ -2036,6 +2233,23 @@ typedef struct #define __LL_ADC_DIGITAL_SCALE(__ADC_RESOLUTION__) \ (0xFFFFUL >> ((__ADC_RESOLUTION__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL))) +#if defined(ADC_VER_V5_V90) +/** + * @brief Helper macro to define the ADC conversion data full-scale digital + * value corresponding to the selected ADC resolution. + * @note ADC conversion data full-scale corresponds to voltage range + * determined by analog voltage references Vref+ and Vref- + * (refer to reference manual). + * @param __ADC_RESOLUTION__ This parameter can be one of the following values: + * @arg @ref LL_ADC_RESOLUTION_12B + * @arg @ref LL_ADC_RESOLUTION_10B + * @arg @ref LL_ADC_RESOLUTION_8B + * @arg @ref LL_ADC_RESOLUTION_6B + * @retval ADC conversion data equivalent voltage value (unit: digital value of ADC conversion bitfield) + */ +#define __LL_ADC3_DIGITAL_SCALE(__ADC_RESOLUTION__) \ + (0xFFFUL >> ((__ADC_RESOLUTION__) >> (ADC_CFGR_RES_BITOFFSET_POS_ADC3 - 1UL))) +#endif /* ADC_VER_V5_V90 */ /** * @brief Helper macro to convert the ADC conversion data from * a resolution to another resolution. @@ -2056,14 +2270,90 @@ typedef struct * @arg @ref LL_ADC_RESOLUTION_8B * @retval ADC conversion data to the requested resolution */ +#if defined(ADC_VER_V5_X) || defined(ADC_VER_V5_V90) #define __LL_ADC_CONVERT_DATA_RESOLUTION(__DATA__,\ + __ADC_RESOLUTION_CURRENT__,\ + __ADC_RESOLUTION_TARGET__) \ +( (__ADC_RESOLUTION_CURRENT__ == LL_ADC_RESOLUTION_8B) \ + ?( \ + ((__DATA__) \ + << (((__ADC_RESOLUTION_CURRENT__) & ~(ADC_CFGR_RES_1 | ADC_CFGR_RES_0) ) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL))) \ + >> ((__ADC_RESOLUTION_TARGET__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL)) \ + ) \ + : \ + ( \ + (__ADC_RESOLUTION_TARGET__ == LL_ADC_RESOLUTION_8B) \ + ? ( \ + ((__DATA__) \ + << ((__ADC_RESOLUTION_CURRENT__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL))) \ + >> (((__ADC_RESOLUTION_TARGET__) & ~(ADC_CFGR_RES_1 | ADC_CFGR_RES_0) ) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL)) \ + ) \ + :\ + (\ + ((__DATA__) \ + << ((__ADC_RESOLUTION_CURRENT__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL))) \ + >> ((__ADC_RESOLUTION_TARGET__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL)) \ + ) \ + )\ + ) + + +#else /* defined(ADC_VER_V5_3) */ +#define __LL_ADC_CONVERT_DATA_RESOLUTION(__DATA__,\ + __ADC_RESOLUTION_CURRENT__,\ + __ADC_RESOLUTION_TARGET__) \ +( (__ADC_RESOLUTION_CURRENT__ == LL_ADC_RESOLUTION_8B) \ + ?( \ + ((__DATA__) \ + << (((__ADC_RESOLUTION_CURRENT__) & ~(ADC_CFGR_RES_1 | ADC_CFGR_RES_0) ) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL))) \ + >> ((__ADC_RESOLUTION_TARGET__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL)) \ + ) \ + : \ + ( \ + (__ADC_RESOLUTION_TARGET__ == LL_ADC_RESOLUTION_8B) \ + ? ( \ + ((__DATA__) \ + << ((__ADC_RESOLUTION_CURRENT__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL))) \ + >> (((__ADC_RESOLUTION_TARGET__) & ~(ADC_CFGR_RES_1 | ADC_CFGR_RES_0) ) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL)) \ + ) \ + :\ + (\ + ((__DATA__) \ + << ((__ADC_RESOLUTION_CURRENT__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL))) \ + >> ((__ADC_RESOLUTION_TARGET__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL)) \ + ) \ + )\ + ) + +#endif + +#if defined(ADC_VER_V5_V90) +/** +* @brief Helper macro to convert the ADC conversion data from +* a resolution to another resolution. +* @param __DATA__ ADC conversion data to be converted +* @param __ADC_RESOLUTION_CURRENT__ Resolution of the data to be converted +* This parameter can be one of the following values: +* @arg @ref LL_ADC_RESOLUTION_12B +* @arg @ref LL_ADC_RESOLUTION_10B +* @arg @ref LL_ADC_RESOLUTION_8B +* @arg @ref LL_ADC_RESOLUTION_6B +* @param __ADC_RESOLUTION_TARGET__ Resolution of the data after conversion +* This parameter can be one of the following values: +* @arg @ref LL_ADC_RESOLUTION_12B +* @arg @ref LL_ADC_RESOLUTION_10B +* @arg @ref LL_ADC_RESOLUTION_8B +* @arg @ref LL_ADC_RESOLUTION_6B +* @retval ADC conversion data to the requested resolution +*/ +#define __LL_ADC_CONVERT_DATA_RESOLUTION_ADC3(__DATA__,\ __ADC_RESOLUTION_CURRENT__,\ __ADC_RESOLUTION_TARGET__) \ (((__DATA__) \ - << ((__ADC_RESOLUTION_CURRENT__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL))) \ - >> ((__ADC_RESOLUTION_TARGET__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL)) \ + << ((__ADC_RESOLUTION_CURRENT__) >> (ADC_CFGR_RES_BITOFFSET_POS_ADC3 - 1UL))) \ + >> ((__ADC_RESOLUTION_TARGET__) >> (ADC_CFGR_RES_BITOFFSET_POS_ADC3 - 1UL)) \ ) - +#endif /* ADC_VER_V5_V90 */ /** * @brief Helper macro to calculate the voltage (unit: mVolt) * corresponding to a ADC conversion data (unit: digital value). @@ -2117,9 +2407,10 @@ typedef struct #define __LL_ADC_CALC_VREFANALOG_VOLTAGE(__VREFINT_ADC_DATA__,\ __ADC_RESOLUTION__) \ (((uint32_t)(*VREFINT_CAL_ADDR) * VREFINT_CAL_VREF) \ - / __LL_ADC_CONVERT_DATA_RESOLUTION((__VREFINT_ADC_DATA__), \ - (__ADC_RESOLUTION__), \ - LL_ADC_RESOLUTION_16B)) + / __LL_ADC_CONVERT_DATA_RESOLUTION((__VREFINT_ADC_DATA__), \ + (__ADC_RESOLUTION__), \ + LL_ADC_RESOLUTION_16B) \ + ) /** * @brief Helper macro to calculate the temperature (unit: degree Celsius) @@ -2294,17 +2585,17 @@ typedef struct */ __STATIC_INLINE uint32_t LL_ADC_DMA_GetRegAddr(ADC_TypeDef *ADCx, uint32_t Register) { - register uint32_t data_reg_addr; + uint32_t data_reg_addr; if (Register == LL_ADC_DMA_REG_REGULAR_DATA) { /* Retrieve address of register DR */ - data_reg_addr = (uint32_t) &(ADCx->DR); + data_reg_addr = (uint32_t) & (ADCx->DR); } else /* (Register == LL_ADC_DMA_REG_REGULAR_DATA_MULTI) */ { /* Retrieve address of register CDR */ - data_reg_addr = (uint32_t) &((__LL_ADC_COMMON_INSTANCE(ADCx))->CDR); + data_reg_addr = (uint32_t) & ((__LL_ADC_COMMON_INSTANCE(ADCx))->CDR); } return data_reg_addr; @@ -2491,9 +2782,15 @@ __STATIC_INLINE uint32_t LL_ADC_GetCommonPathInternalCh(ADC_Common_TypeDef *ADCx */ __STATIC_INLINE void LL_ADC_SetCalibrationOffsetFactor(ADC_TypeDef *ADCx, uint32_t SingleDiff, uint32_t CalibrationFactor) { +#if defined(ADC_VER_V5_V90) + MODIFY_REG(ADCx->CALFACT_RES13, + SingleDiff & ADC_SINGLEDIFF_CALIB_FACTOR_MASK, + CalibrationFactor << (((SingleDiff & ADC_SINGLEDIFF_CALIB_F_BIT_D_MASK) >> ADC_SINGLEDIFF_CALIB_F_BIT_D_SHIFT4) & ~(SingleDiff & ADC_CALFACT_CALFACT_S))); +#else MODIFY_REG(ADCx->CALFACT, SingleDiff & ADC_SINGLEDIFF_CALIB_FACTOR_MASK, CalibrationFactor << (((SingleDiff & ADC_SINGLEDIFF_CALIB_F_BIT_D_MASK) >> ADC_SINGLEDIFF_CALIB_F_BIT_D_SHIFT4) & ~(SingleDiff & ADC_CALFACT_CALFACT_S))); +#endif } /** @@ -2520,7 +2817,11 @@ __STATIC_INLINE uint32_t LL_ADC_GetCalibrationOffsetFactor(ADC_TypeDef *ADCx, ui /* "SingleDiff". */ /* Parameter used with mask "ADC_SINGLEDIFF_CALIB_FACTOR_MASK" because */ /* containing other bits reserved for other purpose. */ +#if defined(ADC_VER_V5_V90) + return (uint32_t)(READ_BIT(ADCx->CALFACT_RES13, (SingleDiff & ADC_SINGLEDIFF_CALIB_FACTOR_MASK)) >> ((SingleDiff & ADC_SINGLEDIFF_CALIB_F_BIT_D_MASK) >> ADC_SINGLEDIFF_CALIB_F_BIT_D_SHIFT4)); +#else return (uint32_t)(READ_BIT(ADCx->CALFACT, (SingleDiff & ADC_SINGLEDIFF_CALIB_FACTOR_MASK)) >> ((SingleDiff & ADC_SINGLEDIFF_CALIB_F_BIT_D_MASK) >> ADC_SINGLEDIFF_CALIB_F_BIT_D_SHIFT4)); +#endif } /** @@ -2547,13 +2848,26 @@ __STATIC_INLINE uint32_t LL_ADC_GetCalibrationOffsetFactor(ADC_TypeDef *ADCx, ui */ __STATIC_INLINE void LL_ADC_SetCalibrationLinearFactor(ADC_TypeDef *ADCx, uint32_t LinearityWord, uint32_t CalibrationFactor) { - register uint32_t timeout_cpu_cycles = ADC_LINEARITY_BIT_TOGGLE_TIMEOUT; +#if defined(ADC_VER_V5_V90) + if (ADCx != ADC3) + { + uint32_t timeout_cpu_cycles = ADC_LINEARITY_BIT_TOGGLE_TIMEOUT; + MODIFY_REG(ADCx->CALFACT2_RES14, ADC_CALFACT2_LINCALFACT, CalibrationFactor); + MODIFY_REG(ADCx->CR, ADC_CR_ADCALLIN, LinearityWord); + while ((READ_BIT(ADCx->CR, LinearityWord) == 0UL) && (timeout_cpu_cycles > 0UL)) + { + timeout_cpu_cycles--; + } + } +#else /* ADC_VER_V5_V90 */ + uint32_t timeout_cpu_cycles = ADC_LINEARITY_BIT_TOGGLE_TIMEOUT; MODIFY_REG(ADCx->CALFACT2, ADC_CALFACT2_LINCALFACT, CalibrationFactor); MODIFY_REG(ADCx->CR, ADC_CR_ADCALLIN, LinearityWord); - while ((READ_BIT(ADCx->CR, LinearityWord)==0UL) && (timeout_cpu_cycles > 0UL)) + while ((READ_BIT(ADCx->CR, LinearityWord) == 0UL) && (timeout_cpu_cycles > 0UL)) { timeout_cpu_cycles--; } +#endif } /** @@ -2574,13 +2888,17 @@ __STATIC_INLINE void LL_ADC_SetCalibrationLinearFactor(ADC_TypeDef *ADCx, uint32 */ __STATIC_INLINE uint32_t LL_ADC_GetCalibrationLinearFactor(ADC_TypeDef *ADCx, uint32_t LinearityWord) { - register uint32_t timeout_cpu_cycles = ADC_LINEARITY_BIT_TOGGLE_TIMEOUT; + uint32_t timeout_cpu_cycles = ADC_LINEARITY_BIT_TOGGLE_TIMEOUT; CLEAR_BIT(ADCx->CR, LinearityWord); - while ((READ_BIT(ADCx->CR, LinearityWord)!=0UL) && (timeout_cpu_cycles > 0UL)) + while ((READ_BIT(ADCx->CR, LinearityWord) != 0UL) && (timeout_cpu_cycles > 0UL)) { timeout_cpu_cycles--; } +#if defined(ADC_VER_V5_V90) + return (uint32_t)(READ_BIT(ADCx->CALFACT2_RES14, ADC_CALFACT2_LINCALFACT)); +#else return (uint32_t)(READ_BIT(ADCx->CALFACT2, ADC_CALFACT2_LINCALFACT)); +#endif } /** * @brief Set ADC resolution. @@ -2602,16 +2920,41 @@ __STATIC_INLINE uint32_t LL_ADC_GetCalibrationLinearFactor(ADC_TypeDef *ADCx, ui */ __STATIC_INLINE void LL_ADC_SetResolution(ADC_TypeDef *ADCx, uint32_t Resolution) { -#if defined (ADC_VER_V5_3) +#if defined(ADC_VER_V5_3) + MODIFY_REG(ADCx->CFGR, ADC_CFGR_RES, Resolution); -#else - if((DBGMCU->IDCODE & 0x30000000UL) == 0x10000000UL) /* Rev.Y */ + +#elif defined(ADC_VER_V5_V90) + if (ADCx == ADC3) + { + MODIFY_REG(ADCx->CFGR, ADC3_CFGR_RES, (((Resolution & 0x10UL) | 0x08UL | (Resolution & 0x04UL)) & 0x00000018UL)); + } + else + { + if ((DBGMCU->IDCODE & 0x30000000UL) == 0x10000000UL) /* Rev.Y */ + { + MODIFY_REG(ADCx->CFGR, ADC_CFGR_RES, Resolution); + } + else /* Rev.V */ + { + if (LL_ADC_RESOLUTION_8B == Resolution) + { + MODIFY_REG(ADCx->CFGR, ADC_CFGR_RES, Resolution | 0x0000000CUL); + } + else + { + MODIFY_REG(ADCx->CFGR, ADC_CFGR_RES, Resolution); + } + } + } +#else /* ADC_VER_V5_V90 */ + if ((DBGMCU->IDCODE & 0x30000000UL) == 0x10000000UL) /* Rev.Y */ { MODIFY_REG(ADCx->CFGR, ADC_CFGR_RES, Resolution); } else /* Rev.V */ { - if(LL_ADC_RESOLUTION_8B == Resolution) + if (LL_ADC_RESOLUTION_8B == Resolution) { MODIFY_REG(ADCx->CFGR, ADC_CFGR_RES, Resolution | 0x0000000CUL); } @@ -2620,7 +2963,8 @@ __STATIC_INLINE void LL_ADC_SetResolution(ADC_TypeDef *ADCx, uint32_t Resolution MODIFY_REG(ADCx->CFGR, ADC_CFGR_RES, Resolution); } } -#endif /* ADC_VER_V5_3*/ + +#endif /* ADC_VER_V5_X*/ } /** @@ -2635,13 +2979,33 @@ __STATIC_INLINE void LL_ADC_SetResolution(ADC_TypeDef *ADCx, uint32_t Resolution * @arg @ref LL_ADC_RESOLUTION_12B * @arg @ref LL_ADC_RESOLUTION_10B * @arg @ref LL_ADC_RESOLUTION_8B + * @arg @ref LL_ADC_RESOLUTION_6B **Value available for ADC3 on STM32H72x/3x devices only ** */ __STATIC_INLINE uint32_t LL_ADC_GetResolution(ADC_TypeDef *ADCx) { #if defined (ADC_VER_V5_3) - return (uint32_t)(READ_BIT(ADCx->CFGR, ADC_CFGR_RES)); -#else - if((DBGMCU->IDCODE & 0x30000000UL) == 0x10000000UL) /* Rev.Y */ + + return (uint32_t)(READ_BIT(ADCx->CFGR, ADC_CFGR_RES)); + +#elif defined(ADC_VER_V5_V90) + if (ADCx == ADC3) + { + return (uint32_t)(READ_BIT(ADCx->CFGR, ADC3_CFGR_RES)); + } + else + { + if ((uint32_t)(READ_BIT(ADCx->CFGR, ADC_CFGR_RES)) == 0x0000001CUL) + { + return (LL_ADC_RESOLUTION_8B); + } + else + { + return (uint32_t)(READ_BIT(ADCx->CFGR, ADC_CFGR_RES)); + } + } + +#else /* ADC_VER_V5_V90 */ + if ((DBGMCU->IDCODE & 0x30000000UL) == 0x10000000UL) /* Rev.Y */ { return (uint32_t)(READ_BIT(ADCx->CFGR, ADC_CFGR_RES)); } @@ -2656,7 +3020,8 @@ __STATIC_INLINE uint32_t LL_ADC_GetResolution(ADC_TypeDef *ADCx) return (uint32_t)(READ_BIT(ADCx->CFGR, ADC_CFGR_RES)); } } -#endif /* ADC_VER_V5_3 */ + +#endif /* ADC_VER_V5_X */ } /** @@ -2760,6 +3125,51 @@ __STATIC_INLINE uint32_t LL_ADC_GetLowPowerMode(ADC_TypeDef *ADCx) return (uint32_t)(READ_BIT(ADCx->CFGR, ADC_CFGR_AUTDLY)); } +/** + * @brief Set ADC selected Channel. + * @note This function set the pre-selection of channel configuration. + * @note Caution: Channel selections is dependent to ADC instance and IP version: + * For STM32H72x/3x This is applicable only for ADC1/ADC2 + * For Rest of STM32H7xxx This is applicable only all the ADCs instances. + * + * @param ADCx ADC instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_ADC_CHANNEL_0 + * @arg @ref LL_ADC_CHANNEL_1 + * @arg @ref LL_ADC_CHANNEL_2 + * @arg @ref LL_ADC_CHANNEL_3 + * @arg @ref LL_ADC_CHANNEL_4 + * @arg @ref LL_ADC_CHANNEL_5 + * @arg @ref LL_ADC_CHANNEL_6 + * @arg @ref LL_ADC_CHANNEL_7 + * @arg @ref LL_ADC_CHANNEL_8 + * @arg @ref LL_ADC_CHANNEL_9 + * @arg @ref LL_ADC_CHANNEL_10 + * @arg @ref LL_ADC_CHANNEL_11 + * @arg @ref LL_ADC_CHANNEL_12 + * @arg @ref LL_ADC_CHANNEL_13 + * @arg @ref LL_ADC_CHANNEL_14 + * @arg @ref LL_ADC_CHANNEL_15 + * @arg @ref LL_ADC_CHANNEL_16 + * @arg @ref LL_ADC_CHANNEL_17 + * @arg @ref LL_ADC_CHANNEL_18 + * @arg @ref LL_ADC_CHANNEL_19 + * @retval None + */ +__STATIC_INLINE void LL_ADC_SetChannelPreSelection(ADC_TypeDef *ADCx, uint32_t Channel) +{ +#if defined(ADC_VER_V5_V90) + if (ADCx != ADC3) + { + /* ADC channels preselection */ + ADCx->PCSEL_RES0 |= (1UL << (__LL_ADC_CHANNEL_TO_DECIMAL_NB(Channel) & 0x1FUL)); + } +#else + /* ADC channels preselection */ + ADCx->PCSEL |= (1UL << (__LL_ADC_CHANNEL_TO_DECIMAL_NB(Channel) & 0x1FUL)); +#endif /* ADC_VER_V5_V90 */ +} + /** * @brief Set ADC selected offset number 1, 2, 3 or 4. * @note This function set the 2 items of offset configuration: @@ -2835,11 +3245,21 @@ __STATIC_INLINE uint32_t LL_ADC_GetLowPowerMode(ADC_TypeDef *ADCx) */ __STATIC_INLINE void LL_ADC_SetOffset(ADC_TypeDef *ADCx, uint32_t Offsety, uint32_t Channel, uint32_t OffsetLevel) { - register __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->OFR1, Offsety); - - MODIFY_REG(*preg, - ADC_OFR1_OFFSET1_CH | ADC_OFR1_OFFSET1, - (Channel & ADC_CHANNEL_ID_NUMBER_MASK) | OffsetLevel); + __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->OFR1, Offsety); +#if defined(ADC_VER_V5_V90) + if (ADCx == ADC3) + { + MODIFY_REG(*preg, + ADC3_OFR1_OFFSET1_EN | ADC_OFR1_OFFSET1_CH | ADC_OFR1_OFFSET1, + ADC3_OFR1_OFFSET1_EN | (Channel & ADC_CHANNEL_ID_NUMBER_MASK) | OffsetLevel); + } + else +#endif /* ADC_VER_V5_V90 */ + { + MODIFY_REG(*preg, + ADC_OFR1_OFFSET1_CH | ADC_OFR1_OFFSET1, + (Channel & ADC_CHANNEL_ID_NUMBER_MASK) | OffsetLevel); + } } /** @@ -2907,7 +3327,7 @@ __STATIC_INLINE void LL_ADC_SetOffset(ADC_TypeDef *ADCx, uint32_t Offsety, uint3 */ __STATIC_INLINE uint32_t LL_ADC_GetOffsetChannel(ADC_TypeDef *ADCx, uint32_t Offsety) { - register const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->OFR1, Offsety); + const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->OFR1, Offsety); return (uint32_t) READ_BIT(*preg, ADC_OFR1_OFFSET1_CH); } @@ -2933,7 +3353,7 @@ __STATIC_INLINE uint32_t LL_ADC_GetOffsetChannel(ADC_TypeDef *ADCx, uint32_t Off */ __STATIC_INLINE uint32_t LL_ADC_GetOffsetLevel(ADC_TypeDef *ADCx, uint32_t Offsety) { - register const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->OFR1, Offsety); + const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->OFR1, Offsety); return (uint32_t) READ_BIT(*preg, ADC_OFR1_OFFSET1); } @@ -2975,7 +3395,7 @@ __STATIC_INLINE void LL_ADC_SetDataRightShift(ADC_TypeDef *ADCx, uint32_t Offset */ __STATIC_INLINE uint32_t LL_ADC_GetDataRightShift(ADC_TypeDef *ADCx, uint32_t Offsety) { - return (uint32_t) ((READ_BIT(ADCx->CFGR2, (ADC_CFGR2_RSHIFT1 << (Offsety & 0x1FUL)))) >> (Offsety & 0x1FUL)); + return (uint32_t)((READ_BIT(ADCx->CFGR2, (ADC_CFGR2_RSHIFT1 << (Offsety & 0x1FUL)))) >> (Offsety & 0x1FUL)); } /** @@ -2998,8 +3418,17 @@ __STATIC_INLINE uint32_t LL_ADC_GetDataRightShift(ADC_TypeDef *ADCx, uint32_t Of */ __STATIC_INLINE void LL_ADC_SetOffsetSignedSaturation(ADC_TypeDef *ADCx, uint32_t Offsety, uint32_t OffsetSignedSaturation) { - register __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->OFR1, Offsety); - MODIFY_REG(*preg, ADC_OFR1_SSATE, OffsetSignedSaturation); +#if defined(ADC_VER_V5_V90) + if (ADCx == ADC3) + { + /* Function not available on this instance */ + } + else +#endif /* ADC_VER_V5_V90 */ + { + __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->OFR1, Offsety); + MODIFY_REG(*preg, ADC_OFR1_SSATE, OffsetSignedSaturation); + } } /** @@ -3021,10 +3450,225 @@ __STATIC_INLINE void LL_ADC_SetOffsetSignedSaturation(ADC_TypeDef *ADCx, uint32_ */ __STATIC_INLINE uint32_t LL_ADC_GetOffsetSignedSaturation(ADC_TypeDef *ADCx, uint32_t Offsety) { - register const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->OFR1, Offsety); - return (uint32_t) READ_BIT(*preg, ADC_OFR1_SSATE); +#if defined(ADC_VER_V5_V90) + if (ADCx == ADC3) + { + /* Function not available on this instance */ + return 0UL; + } + else +#endif /* ADC_VER_V5_V90 */ + { + const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->OFR1, Offsety); + return (uint32_t) READ_BIT(*preg, ADC_OFR1_SSATE); + } } +#if defined(ADC_VER_V5_V90) +/** + * @brief Set for the ADC selected offset number 1, 2, 3 or 4: + * choose offset saturation mode. + * @note On this STM32 serie, setting of this feature is conditioned to + * ADC state: + * ADC must be disabled or enabled without conversion on going + * on either groups regular or injected. + * @rmtoll OFR1 SATEN LL_ADC_SetOffsetSaturation\n + * OFR2 SATEN LL_ADC_SetOffsetSaturation\n + * OFR3 SATEN LL_ADC_SetOffsetSaturation\n + * OFR4 SATEN LL_ADC_SetOffsetSaturation + * @param ADCx ADC instance + * @param Offsety This parameter can be one of the following values: + * @arg @ref LL_ADC_OFFSET_1 + * @arg @ref LL_ADC_OFFSET_2 + * @arg @ref LL_ADC_OFFSET_3 + * @arg @ref LL_ADC_OFFSET_4 + * @param OffsetSaturation This parameter can be one of the following values: + * @arg @ref LL_ADC_OFFSET_SATURATION_ENABLE + * @arg @ref LL_ADC_OFFSET_SATURATION_DISABLE + * @retval None + */ +__STATIC_INLINE void LL_ADC_SetOffsetSaturation(ADC_TypeDef *ADCx, uint32_t Offsety, uint32_t OffsetSaturation) +{ + if (ADCx == ADC3) + { + __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->OFR1, Offsety); + + MODIFY_REG(*preg, + ADC3_OFR1_SATEN, + OffsetSaturation); + } +} + +/** + * @brief Get for the ADC selected offset number 1, 2, 3 or 4: + * offset saturation if enabled or disabled. + * @rmtoll OFR1 SATEN LL_ADC_GetOffsetSaturation\n + * OFR2 SATEN LL_ADC_GetOffsetSaturation\n + * OFR3 SATEN LL_ADC_GetOffsetSaturation\n + * OFR4 SATEN LL_ADC_GetOffsetSaturation + * @param ADCx ADC instance + * @param Offsety This parameter can be one of the following values: + * @arg @ref LL_ADC_OFFSET_1 + * @arg @ref LL_ADC_OFFSET_2 + * @arg @ref LL_ADC_OFFSET_3 + * @arg @ref LL_ADC_OFFSET_4 + * @retval Returned value can be one of the following values: + * @arg @ref LL_ADC_OFFSET_SATURATION_ENABLE + * @arg @ref LL_ADC_OFFSET_SATURATION_DISABLE + */ +__STATIC_INLINE uint32_t LL_ADC_GetOffsetSaturation(ADC_TypeDef *ADCx, uint32_t Offsety) +{ + if (ADCx == ADC3) + { + const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->OFR1, Offsety); + + return (uint32_t) READ_BIT(*preg, ADC3_OFR1_SATEN); + }else + { + return 0UL; + } +} + +/** + * @brief Set for the ADC selected offset number 1, 2, 3 or 4: + * choose offset sign. + * @note On this STM32 serie, setting of this feature is conditioned to + * ADC state: + * ADC must be disabled or enabled without conversion on going + * on either groups regular or injected. + * @rmtoll OFR1 OFFSETPOS LL_ADC_SetOffsetSign\n + * OFR2 OFFSETPOS LL_ADC_SetOffsetSign\n + * OFR3 OFFSETPOS LL_ADC_SetOffsetSign\n + * OFR4 OFFSETPOS LL_ADC_SetOffsetSign + * @param ADCx ADC instance + * @param Offsety This parameter can be one of the following values: + * @arg @ref LL_ADC_OFFSET_1 + * @arg @ref LL_ADC_OFFSET_2 + * @arg @ref LL_ADC_OFFSET_3 + * @arg @ref LL_ADC_OFFSET_4 + * @param OffsetSign This parameter can be one of the following values: + * @arg @ref LL_ADC_OFFSET_SIGN_NEGATIVE + * @arg @ref LL_ADC_OFFSET_SIGN_POSITIVE + * @retval None + */ +__STATIC_INLINE void LL_ADC_SetOffsetSign(ADC_TypeDef *ADCx, uint32_t Offsety, uint32_t OffsetSign) +{ + if (ADCx == ADC3) + { + __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->OFR1, Offsety); + + MODIFY_REG(*preg, + ADC3_OFR1_OFFSETPOS, + OffsetSign); + } +} + +/** + * @brief Get for the ADC selected offset number 1, 2, 3 or 4: + * offset sign if positive or negative. + * @rmtoll OFR1 OFFSETPOS LL_ADC_GetOffsetSign\n + * OFR2 OFFSETPOS LL_ADC_GetOffsetSign\n + * OFR3 OFFSETPOS LL_ADC_GetOffsetSign\n + * OFR4 OFFSETPOS LL_ADC_GetOffsetSign + * @param ADCx ADC instance + * @param Offsety This parameter can be one of the following values: + * @arg @ref LL_ADC_OFFSET_1 + * @arg @ref LL_ADC_OFFSET_2 + * @arg @ref LL_ADC_OFFSET_3 + * @arg @ref LL_ADC_OFFSET_4 + * @retval Returned value can be one of the following values: + * @arg @ref LL_ADC_OFFSET_SIGN_NEGATIVE + * @arg @ref LL_ADC_OFFSET_SIGN_POSITIVE + */ +__STATIC_INLINE uint32_t LL_ADC_GetOffsetSign(ADC_TypeDef *ADCx, uint32_t Offsety) +{ + if (ADCx == ADC3) + { + const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->OFR1, Offsety); + + return (uint32_t) READ_BIT(*preg, ADC3_OFR1_OFFSETPOS); + } + else + { + return 0UL; + } +} + +/** + * @brief Set for the ADC selected offset number 1, 2, 3 or 4: + * force offset state disable or enable + * without modifying offset channel or offset value. + * @note This function should be needed only in case of offset to be + * enabled-disabled dynamically, and should not be needed in other cases: + * function LL_ADC_SetOffset() automatically enables the offset. + * @note On this STM32 serie, setting of this feature is conditioned to + * ADC state: + * ADC must be disabled or enabled without conversion on going + * on either groups regular or injected. + * @rmtoll OFR1 OFFSET1_EN LL_ADC_SetOffsetState\n + * OFR2 OFFSET2_EN LL_ADC_SetOffsetState\n + * OFR3 OFFSET3_EN LL_ADC_SetOffsetState\n + * OFR4 OFFSET4_EN LL_ADC_SetOffsetState + * @param ADCx ADC instance + * @param Offsety This parameter can be one of the following values: + * @arg @ref LL_ADC_OFFSET_1 + * @arg @ref LL_ADC_OFFSET_2 + * @arg @ref LL_ADC_OFFSET_3 + * @arg @ref LL_ADC_OFFSET_4 + * @param OffsetState This parameter can be one of the following values: + * @arg @ref LL_ADC_OFFSET_DISABLE + * @arg @ref LL_ADC_OFFSET_ENABLE + * @retval None + */ +__STATIC_INLINE void LL_ADC_SetOffsetState(ADC_TypeDef *ADCx, uint32_t Offsety, uint32_t OffsetState) +{ + __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->OFR1, Offsety); + if (ADCx == ADC3) + { + MODIFY_REG(*preg, + ADC3_OFR1_OFFSET1_EN, + OffsetState); + } + else + { + MODIFY_REG(*preg, + ADC_OFR1_SSATE, + OffsetState); + } +} + +/** + * @brief Get for the ADC selected offset number 1, 2, 3 or 4: + * offset state disabled or enabled. + * @rmtoll OFR1 OFFSET1_EN LL_ADC_GetOffsetState\n + * OFR2 OFFSET2_EN LL_ADC_GetOffsetState\n + * OFR3 OFFSET3_EN LL_ADC_GetOffsetState\n + * OFR4 OFFSET4_EN LL_ADC_GetOffsetState + * @param ADCx ADC instance + * @param Offsety This parameter can be one of the following values: + * @arg @ref LL_ADC_OFFSET_1 + * @arg @ref LL_ADC_OFFSET_2 + * @arg @ref LL_ADC_OFFSET_3 + * @arg @ref LL_ADC_OFFSET_4 + * @retval Returned value can be one of the following values: + * @arg @ref LL_ADC_OFFSET_DISABLE + * @arg @ref LL_ADC_OFFSET_ENABLE + */ +__STATIC_INLINE uint32_t LL_ADC_GetOffsetState(ADC_TypeDef *ADCx, uint32_t Offsety) +{ + const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->OFR1, Offsety); + if (ADCx == ADC3) + { + return (uint32_t) READ_BIT(*preg, ADC3_OFR1_OFFSET1_EN); + } + else + { + return (uint32_t) READ_BIT(*preg, ADC_OFR1_SSATE); + } +} + +#endif /* ADC_VER_V5_V90 */ + /** * @} */ @@ -3123,11 +3767,11 @@ __STATIC_INLINE void LL_ADC_REG_SetTriggerSource(ADC_TypeDef *ADCx, uint32_t Tri */ __STATIC_INLINE uint32_t LL_ADC_REG_GetTriggerSource(ADC_TypeDef *ADCx) { - register __IO uint32_t TriggerSource = READ_BIT(ADCx->CFGR, ADC_CFGR_EXTSEL | ADC_CFGR_EXTEN); + __IO uint32_t TriggerSource = READ_BIT(ADCx->CFGR, ADC_CFGR_EXTSEL | ADC_CFGR_EXTEN); /* Value for shift of {0; 4; 8; 12} depending on value of bitfield */ /* corresponding to ADC_CFGR_EXTEN {0; 1; 2; 3}. */ - register uint32_t ShiftExten = ((TriggerSource & ADC_CFGR_EXTEN) >> (ADC_REG_TRIG_EXTEN_BITOFFSET_POS - 2UL)); + uint32_t ShiftExten = ((TriggerSource & ADC_CFGR_EXTEN) >> (ADC_REG_TRIG_EXTEN_BITOFFSET_POS - 2UL)); /* Set bitfield corresponding to ADC_CFGR_EXTEN and ADC_CFGR_EXTSEL */ /* to match with triggers literals definition. */ @@ -3188,6 +3832,38 @@ __STATIC_INLINE uint32_t LL_ADC_REG_GetTriggerEdge(ADC_TypeDef *ADCx) return (uint32_t)(READ_BIT(ADCx->CFGR, ADC_CFGR_EXTEN)); } +#if defined(ADC_VER_V5_V90) +/** + * @brief Set ADC sampling mode. + * @note This function set the ADC conversion sampling mode + * @note This mode applies to regular group only. + * @note Set sampling mode is appied to all conversion of regular group. + * @note On this STM32 serie, setting of this feature is conditioned to + * ADC state: + * ADC must be disabled or enabled without conversion on going + * on group regular. + * @rmtoll CFGR2 BULB LL_ADC_REG_SetSamplingMode\n + * CFGR2 SMPTRIG LL_ADC_REG_SetSamplingMode + * @param ADCx ADC instance + * @param SamplingMode This parameter can be one of the following values: + * @arg @ref LL_ADC_REG_SAMPLING_MODE_NORMAL + * @arg @ref LL_ADC_REG_SAMPLING_MODE_BULB + * @arg @ref LL_ADC_REG_SAMPLING_MODE_TRIGGER_CONTROLED + * @retval None + */ +__STATIC_INLINE void LL_ADC_REG_SetSamplingMode(ADC_TypeDef *ADCx, uint32_t SamplingMode) +{ + if (ADCx != ADC3) + { + /* Function not available on this instance */ + } + else + { + MODIFY_REG(ADCx->CFGR2, ADC3_CFGR2_BULB | ADC3_CFGR2_SMPTRIG, SamplingMode); + } +} +#endif /* ADC_VER_V5_V90 */ + /** * @brief Set ADC group regular sequencer length and scan direction. * @note Description of ADC group regular sequencer features: @@ -3449,7 +4125,7 @@ __STATIC_INLINE void LL_ADC_REG_SetSequencerRanks(ADC_TypeDef *ADCx, uint32_t Ra /* in register and register position depending on parameter "Rank". */ /* Parameters "Rank" and "Channel" are used with masks because containing */ /* other bits reserved for other purpose. */ - register __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->SQR1, ((Rank & ADC_REG_SQRX_REGOFFSET_MASK) >> ADC_SQRX_REGOFFSET_POS)); + __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->SQR1, ((Rank & ADC_REG_SQRX_REGOFFSET_MASK) >> ADC_SQRX_REGOFFSET_POS)); MODIFY_REG(*preg, ADC_CHANNEL_ID_NUMBER_MASK_POSBIT0 << (Rank & ADC_REG_RANK_ID_SQRX_MASK), @@ -3547,7 +4223,7 @@ __STATIC_INLINE void LL_ADC_REG_SetSequencerRanks(ADC_TypeDef *ADCx, uint32_t Ra */ __STATIC_INLINE uint32_t LL_ADC_REG_GetSequencerRanks(ADC_TypeDef *ADCx, uint32_t Rank) { - register const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->SQR1, ((Rank & ADC_REG_SQRX_REGOFFSET_MASK) >> ADC_SQRX_REGOFFSET_POS)); + const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->SQR1, ((Rank & ADC_REG_SQRX_REGOFFSET_MASK) >> ADC_SQRX_REGOFFSET_POS)); return (uint32_t)((READ_BIT(*preg, ADC_CHANNEL_ID_NUMBER_MASK_POSBIT0 << (Rank & ADC_REG_RANK_ID_SQRX_MASK)) @@ -3604,11 +4280,7 @@ __STATIC_INLINE uint32_t LL_ADC_REG_GetContinuousMode(ADC_TypeDef *ADCx) * - Transfered to DFSDM data register * @rmtoll CFGR DMNGT LL_ADC_REG_SetDataTransferMode * @param ADCx ADC instance - * @param DataTransferMode This parameter can be one of the following values: - * @arg @ref LL_ADC_REG_DR_TRANSFER - * @arg @ref LL_ADC_REG_DMA_TRANSFER_LIMITED - * @arg @ref LL_ADC_REG_DMA_TRANSFER_UNLIMITED - * @arg @ref LL_ADC_REG_DFSDM_TRANSFER + * @param DataTransferMode Select Data Management configuration * @retval None */ __STATIC_INLINE void LL_ADC_REG_SetDataTransferMode(ADC_TypeDef *ADCx, uint32_t DataTransferMode) @@ -3616,6 +4288,113 @@ __STATIC_INLINE void LL_ADC_REG_SetDataTransferMode(ADC_TypeDef *ADCx, uint32_t MODIFY_REG(ADCx->CFGR, ADC_CFGR_DMNGT, DataTransferMode); } +#if defined(ADC_VER_V5_V90) +/** + * @brief Enable DMA requests for ADC3. + * @rmtoll CFGR DMAEN LL_ADC_REG_SetDMATransfer\n + * @param ADCx ADC instance + * @retval None + */ +__STATIC_INLINE void LL_ADC_EnableDMAReq (ADC_TypeDef *ADCx) +{ + SET_BIT(ADCx->CFGR, ADC3_CFGR_DMAEN); +} + +__STATIC_INLINE void LL_ADC_DisableDMAReq(ADC_TypeDef *ADCx) +{ + CLEAR_BIT (ADCx->CFGR, ADC3_CFGR_DMAEN); +} + +__STATIC_INLINE uint32_t LL_ADC_IsEnabledDMAReq (ADC_TypeDef *ADCx) +{ + return ((READ_BIT(ADCx->CFGR, ADC3_CFGR_DMAEN) == (ADC3_CFGR_DMAEN)) ? 1UL : 0UL); +} +/** + * @brief Set ADC group regular conversion data transfer: no transfer or + * transfer by DMA, and DMA requests mode. + * @note If transfer by DMA selected, specifies the DMA requests + * mode: + * - Limited mode (One shot mode): DMA transfer requests are stopped + * when number of DMA data transfers (number of + * ADC conversions) is reached. + * This ADC mode is intended to be used with DMA mode non-circular. + * - Unlimited mode: DMA transfer requests are unlimited, + * whatever number of DMA data transfers (number of + * ADC conversions). + * This ADC mode is intended to be used with DMA mode circular. + * @note If ADC DMA requests mode is set to unlimited and DMA is set to + * mode non-circular: + * when DMA transfers size will be reached, DMA will stop transfers of + * ADC conversions data ADC will raise an overrun error + * (overrun flag and interruption if enabled). + * @note For devices with several ADC instances: ADC multimode DMA + * settings are available using function @ref LL_ADC_SetMultiDMATransfer(). + * @note To configure DMA source address (peripheral address), + * use function @ref LL_ADC_DMA_GetRegAddr(). + * @note On this STM32 serie, setting of this feature is conditioned to + * ADC state: + * ADC must be disabled or enabled without conversion on going + * on either groups regular or injected. + * @rmtoll CFGR DMAEN LL_ADC_REG_SetDMATransferMode\n + * CFGR DMACFG LL_ADC_REG_SetDMATransferMode + * @param ADCx ADC instance + * @param DMATransfer This parameter can be one of the following values: + * @arg @ref LL_ADC3_REG_DMA_TRANSFER_NONE + * @arg @ref LL_ADC3_REG_DMA_TRANSFER_LIMITED + * @arg @ref LL_ADC3_REG_DMA_TRANSFER_UNLIMITED + * @retval None + */ +__STATIC_INLINE void LL_ADC_REG_SetDMATransferMode(ADC_TypeDef *ADCx, uint32_t DMATransfer) +{ + if (ADCx == ADC3) + { + MODIFY_REG(ADCx->CFGR, ADC3_CFGR_DMAEN | ADC3_CFGR_DMACFG, DMATransfer); + } +} + +/** + * @brief Get ADC group regular conversion data transfer: no transfer or + * transfer by DMA, and DMA requests mode. + * @note If transfer by DMA selected, specifies the DMA requests + * mode: + * - Limited mode (One shot mode): DMA transfer requests are stopped + * when number of DMA data transfers (number of + * ADC conversions) is reached. + * This ADC mode is intended to be used with DMA mode non-circular. + * - Unlimited mode: DMA transfer requests are unlimited, + * whatever number of DMA data transfers (number of + * ADC conversions). + * This ADC mode is intended to be used with DMA mode circular. + * @note If ADC DMA requests mode is set to unlimited and DMA is set to + * mode non-circular: + * when DMA transfers size will be reached, DMA will stop transfers of + * ADC conversions data ADC will raise an overrun error + * (overrun flag and interruption if enabled). + * @note For devices with several ADC instances: ADC multimode DMA + * settings are available using function @ref LL_ADC_GetMultiDMATransfer(). + * @note To configure DMA source address (peripheral address), + * use function @ref LL_ADC_DMA_GetRegAddr(). + * @rmtoll CFGR DMAEN LL_ADC_REG_GetDMATransfer\n + * CFGR DMACFG LL_ADC_REG_GetDMATransfer + * @param ADCx ADC instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_ADC3_REG_DMA_TRANSFER_NONE + * @arg @ref LL_ADC3_REG_DMA_TRANSFER_LIMITED + * @arg @ref LL_ADC3_REG_DMA_TRANSFER_UNLIMITED + */ +__STATIC_INLINE uint32_t LL_ADC_REG_GetDMATransferMode(ADC_TypeDef *ADCx) +{ + if (ADCx == ADC3) + { + return (uint32_t)(READ_BIT(ADCx->CFGR, ADC3_CFGR_DMAEN | ADC3_CFGR_DMACFG)); + } + else + { + return 0UL; + } +} + +#endif /* ADC_VER_V5_V90 */ /** * @brief Get ADC data transfer mode @@ -3775,11 +4554,11 @@ __STATIC_INLINE void LL_ADC_INJ_SetTriggerSource(ADC_TypeDef *ADCx, uint32_t Tri */ __STATIC_INLINE uint32_t LL_ADC_INJ_GetTriggerSource(ADC_TypeDef *ADCx) { - register __IO uint32_t TriggerSource = READ_BIT(ADCx->JSQR, ADC_JSQR_JEXTSEL | ADC_JSQR_JEXTEN); + __IO uint32_t TriggerSource = READ_BIT(ADCx->JSQR, ADC_JSQR_JEXTSEL | ADC_JSQR_JEXTEN); /* Value for shift of {0; 4; 8; 12} depending on value of bitfield */ /* corresponding to ADC_JSQR_JEXTEN {0; 1; 2; 3}. */ - register uint32_t ShiftJexten = ((TriggerSource & ADC_JSQR_JEXTEN) >> (ADC_INJ_TRIG_EXTEN_BITOFFSET_POS - 2UL)); + uint32_t ShiftJexten = ((TriggerSource & ADC_JSQR_JEXTEN) >> (ADC_INJ_TRIG_EXTEN_BITOFFSET_POS - 2UL)); /* Set bitfield corresponding to ADC_JSQR_JEXTEN and ADC_JSQR_JEXTSEL */ /* to match with triggers literals definition. */ @@ -4053,8 +4832,8 @@ __STATIC_INLINE void LL_ADC_INJ_SetSequencerRanks(ADC_TypeDef *ADCx, uint32_t Ra __STATIC_INLINE uint32_t LL_ADC_INJ_GetSequencerRanks(ADC_TypeDef *ADCx, uint32_t Rank) { return (uint32_t)((READ_BIT(ADCx->JSQR, - (ADC_CHANNEL_ID_NUMBER_MASK >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) << (Rank & ADC_INJ_RANK_ID_JSQR_MASK)) - >> (Rank & ADC_INJ_RANK_ID_JSQR_MASK)) << ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS + (ADC_CHANNEL_ID_NUMBER_MASK >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) << (Rank & ADC_INJ_RANK_ID_JSQR_MASK)) + >> (Rank & ADC_INJ_RANK_ID_JSQR_MASK)) << ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS ); } @@ -4379,7 +5158,7 @@ __STATIC_INLINE void LL_ADC_INJ_ConfigQueueContext(ADC_TypeDef *ADCx, /* because containing other bits reserved for other purpose. */ /* If parameter "TriggerSource" is set to SW start, then parameter */ /* "ExternalTriggerEdge" is discarded. */ - register uint32_t is_trigger_not_sw = (uint32_t)((TriggerSource != LL_ADC_INJ_TRIG_SOFTWARE) ? 1UL : 0UL); + uint32_t is_trigger_not_sw = (uint32_t)((TriggerSource != LL_ADC_INJ_TRIG_SOFTWARE) ? 1UL : 0UL); MODIFY_REG(ADCx->JSQR, ADC_JSQR_JEXTSEL | ADC_JSQR_JEXTEN | @@ -4388,7 +5167,7 @@ __STATIC_INLINE void LL_ADC_INJ_ConfigQueueContext(ADC_TypeDef *ADCx, ADC_JSQR_JSQ2 | ADC_JSQR_JSQ1 | ADC_JSQR_JL, - (TriggerSource & ADC_JSQR_JEXTSEL) | + (TriggerSource & ADC_JSQR_JEXTSEL) | (ExternalTriggerEdge * (is_trigger_not_sw)) | (((Rank4_Channel & ADC_CHANNEL_ID_NUMBER_MASK) >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) << (LL_ADC_INJ_RANK_4 & ADC_INJ_RANK_ID_JSQR_MASK)) | (((Rank3_Channel & ADC_CHANNEL_ID_NUMBER_MASK) >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) << (LL_ADC_INJ_RANK_3 & ADC_INJ_RANK_ID_JSQR_MASK)) | @@ -4500,7 +5279,7 @@ __STATIC_INLINE void LL_ADC_SetChannelSamplingTime(ADC_TypeDef *ADCx, uint32_t C /* in register and register position depending on parameter "Channel". */ /* Parameter "Channel" is used with masks because containing */ /* other bits reserved for other purpose. */ - register __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->SMPR1, ((Channel & ADC_CHANNEL_SMPRX_REGOFFSET_MASK) >> ADC_SMPRX_REGOFFSET_POS)); + __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->SMPR1, ((Channel & ADC_CHANNEL_SMPRX_REGOFFSET_MASK) >> ADC_SMPRX_REGOFFSET_POS)); MODIFY_REG(*preg, ADC_SMPR1_SMP0 << ((Channel & ADC_CHANNEL_SMPx_BITOFFSET_MASK) >> ADC_CHANNEL_SMPx_BITOFFSET_POS), @@ -4581,7 +5360,7 @@ __STATIC_INLINE void LL_ADC_SetChannelSamplingTime(ADC_TypeDef *ADCx, uint32_t C */ __STATIC_INLINE uint32_t LL_ADC_GetChannelSamplingTime(ADC_TypeDef *ADCx, uint32_t Channel) { - register const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->SMPR1, ((Channel & ADC_CHANNEL_SMPRX_REGOFFSET_MASK) >> ADC_SMPRX_REGOFFSET_POS)); + const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->SMPR1, ((Channel & ADC_CHANNEL_SMPRX_REGOFFSET_MASK) >> ADC_SMPRX_REGOFFSET_POS)); return (uint32_t)(READ_BIT(*preg, ADC_SMPR1_SMP0 << ((Channel & ADC_CHANNEL_SMPx_BITOFFSET_MASK) >> ADC_CHANNEL_SMPx_BITOFFSET_POS)) @@ -4642,12 +5421,30 @@ __STATIC_INLINE uint32_t LL_ADC_GetChannelSamplingTime(ADC_TypeDef *ADCx, uint32 */ __STATIC_INLINE void LL_ADC_SetChannelSingleDiff(ADC_TypeDef *ADCx, uint32_t Channel, uint32_t SingleDiff) { +#if defined(ADC_VER_V5_V90) + /* Bits of channels in single or differential mode are set only for */ + /* differential mode (for single mode, mask of bits allowed to be set is */ + /* shifted out of range of bits of channels in single or differential mode. */ + if (ADCx == ADC3) + { + MODIFY_REG(ADCx->LTR2_DIFSEL, + Channel & ADC_SINGLEDIFF_CHANNEL_MASK, + (Channel & ADC_SINGLEDIFF_CHANNEL_MASK) & (ADC_DIFSEL_DIFSEL >> (SingleDiff & ADC_SINGLEDIFF_CHANNEL_SHIFT_MASK))); + } + else + { + MODIFY_REG(ADCx->DIFSEL_RES12, + Channel & ADC_SINGLEDIFF_CHANNEL_MASK, + (Channel & ADC_SINGLEDIFF_CHANNEL_MASK) & (ADC_DIFSEL_DIFSEL >> (SingleDiff & ADC_SINGLEDIFF_CHANNEL_SHIFT_MASK))); + } +#else /* ADC_VER_V5_V90 */ /* Bits of channels in single or differential mode are set only for */ /* differential mode (for single mode, mask of bits allowed to be set is */ /* shifted out of range of bits of channels in single or differential mode. */ MODIFY_REG(ADCx->DIFSEL, Channel & ADC_SINGLEDIFF_CHANNEL_MASK, (Channel & ADC_SINGLEDIFF_CHANNEL_MASK) & (ADC_DIFSEL_DIFSEL >> (SingleDiff & ADC_SINGLEDIFF_CHANNEL_SHIFT_MASK))); +#endif } /** @@ -4695,7 +5492,11 @@ __STATIC_INLINE void LL_ADC_SetChannelSingleDiff(ADC_TypeDef *ADCx, uint32_t Cha */ __STATIC_INLINE uint32_t LL_ADC_GetChannelSingleDiff(ADC_TypeDef *ADCx, uint32_t Channel) { +#if defined(ADC_VER_V5_V90) + return (uint32_t)(READ_BIT(ADCx->DIFSEL_RES12, (Channel & ADC_SINGLEDIFF_CHANNEL_MASK))); +#else return (uint32_t)(READ_BIT(ADCx->DIFSEL, (Channel & ADC_SINGLEDIFF_CHANNEL_MASK))); +#endif } /** @@ -4843,7 +5644,7 @@ __STATIC_INLINE void LL_ADC_SetAnalogWDMonitChannels(ADC_TypeDef *ADCx, uint32_t /* in register and register position depending on parameter "AWDy". */ /* Parameters "AWDChannelGroup" and "AWDy" are used with masks because */ /* containing other bits reserved for other purpose. */ - register __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->CFGR, ((AWDy & ADC_AWD_CRX_REGOFFSET_MASK) >> ADC_AWD_CRX_REGOFFSET_POS) + __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->CFGR, ((AWDy & ADC_AWD_CRX_REGOFFSET_MASK) >> ADC_AWD_CRX_REGOFFSET_POS) + ((AWDy & ADC_AWD_CR12_REGOFFSETGAP_MASK) * ADC_AWD_CR12_REGOFFSETGAP_VAL)); MODIFY_REG(*preg, @@ -4978,10 +5779,10 @@ __STATIC_INLINE void LL_ADC_SetAnalogWDMonitChannels(ADC_TypeDef *ADCx, uint32_t */ __STATIC_INLINE uint32_t LL_ADC_GetAnalogWDMonitChannels(ADC_TypeDef *ADCx, uint32_t AWDy) { - register const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->CFGR, ((AWDy & ADC_AWD_CRX_REGOFFSET_MASK) >> ADC_AWD_CRX_REGOFFSET_POS) + const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->CFGR, ((AWDy & ADC_AWD_CRX_REGOFFSET_MASK) >> ADC_AWD_CRX_REGOFFSET_POS) + ((AWDy & ADC_AWD_CR12_REGOFFSETGAP_MASK) * ADC_AWD_CR12_REGOFFSETGAP_VAL)); - register uint32_t AnalogWDMonitChannels = (READ_BIT(*preg, AWDy) & AWDy & ADC_AWD_CR_ALL_CHANNEL_MASK); + uint32_t AnalogWDMonitChannels = (READ_BIT(*preg, AWDy) & AWDy & ADC_AWD_CR_ALL_CHANNEL_MASK); /* If "AnalogWDMonitChannels" == 0, then the selected AWD is disabled */ /* (parameter value LL_ADC_AWD_DISABLE). */ @@ -5085,19 +5886,47 @@ __STATIC_INLINE uint32_t LL_ADC_GetAnalogWDMonitChannels(ADC_TypeDef *ADCx, uint * @param AWDThresholdValue Value between Min_Data=0x000 and Max_Data=0xFFF * @retval None */ -__STATIC_INLINE void LL_ADC_SetAnalogWDThresholds(ADC_TypeDef *ADCx, uint32_t AWDy, uint32_t AWDThresholdsHighLow, - uint32_t AWDThresholdValue) +__STATIC_INLINE void LL_ADC_SetAnalogWDThresholds(ADC_TypeDef *ADCx, uint32_t AWDy, uint32_t AWDThresholdsHighLow, uint32_t AWDThresholdValue) { +#if defined(ADC_VER_V5_V90) + if (ADCx == ADC3) + { + /* Set bits with content of parameter "AWDThresholdValue" with bits */ + /* position in register and register position depending on parameters */ + /* "AWDThresholdsHighLow" and "AWDy". */ + /* Parameters "AWDy" and "AWDThresholdValue" are used with masks because */ + /* containing other bits reserved for other purpose. */ + __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->LTR1_TR1, ((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS)); + + MODIFY_REG(*preg, + AWDThresholdsHighLow, + AWDThresholdValue << ((AWDThresholdsHighLow & ADC_AWD_TRX_BIT_HIGH_MASK) >> ADC_AWD_TRX_BIT_HIGH_SHIFT4)); + } + else + { + /* Set bits with content of parameter "AWDThresholdValue" with bits */ + /* position in register and register position depending on parameters */ + /* "AWDThresholdsHighLow" and "AWDy". */ + /* Parameters "AWDy" and "AWDThresholdValue" are used with masks because */ + /* containing other bits reserved for other purpose. */ + __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->LTR1_TR1, (((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS) * 2UL) + + ((AWDy & ADC_AWD_TR12_REGOFFSETGAP_MASK) * ADC_AWD_TR12_REGOFFSETGAP_VAL) + + (AWDThresholdsHighLow)); + + MODIFY_REG(*preg, ADC_LTR_LT, AWDThresholdValue); + } +#else /* Set bits with content of parameter "AWDThresholdValue" with bits */ /* position in register and register position depending on parameters */ /* "AWDThresholdsHighLow" and "AWDy". */ /* Parameters "AWDy" and "AWDThresholdValue" are used with masks because */ /* containing other bits reserved for other purpose. */ - register __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->LTR1, (((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS) * 2UL) - + ((AWDy & ADC_AWD_TR12_REGOFFSETGAP_MASK) * ADC_AWD_TR12_REGOFFSETGAP_VAL) - + (AWDThresholdsHighLow)); + __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->LTR1, (((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS) * 2UL) + + ((AWDy & ADC_AWD_TR12_REGOFFSETGAP_MASK) * ADC_AWD_TR12_REGOFFSETGAP_VAL) + + (AWDThresholdsHighLow)); MODIFY_REG(*preg, ADC_LTR_LT, AWDThresholdValue); +#endif /* ADC_VER_V5_V90 */ } /** @@ -5122,16 +5951,168 @@ __STATIC_INLINE void LL_ADC_SetAnalogWDThresholds(ADC_TypeDef *ADCx, uint32_t AW * @arg @ref LL_ADC_AWD_THRESHOLD_HIGH * @arg @ref LL_ADC_AWD_THRESHOLD_LOW * @retval Value between Min_Data=0x000 and Max_Data=0x3FFFFFF - */ +*/ __STATIC_INLINE uint32_t LL_ADC_GetAnalogWDThresholds(ADC_TypeDef *ADCx, uint32_t AWDy, uint32_t AWDThresholdsHighLow) { - register const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->LTR1, (((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS) * 2UL) +#if defined(ADC_VER_V5_V90) + const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->LTR1_TR1, (((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS) * 2UL) + + ((AWDy & ADC_AWD_TR12_REGOFFSETGAP_MASK) * ADC_AWD_TR12_REGOFFSETGAP_VAL) + + (AWDThresholdsHighLow)); + + return (uint32_t)(READ_BIT(*preg, ADC_LTR_LT)); +#else + const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->LTR1, (((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS) * 2UL) + ((AWDy & ADC_AWD_TR12_REGOFFSETGAP_MASK) * ADC_AWD_TR12_REGOFFSETGAP_VAL) + (AWDThresholdsHighLow)); return (uint32_t)(READ_BIT(*preg, ADC_LTR_LT)); +#endif } +#if defined(ADC_VER_V5_V90) + +/** + * @brief Set ADC analog watchdog thresholds value of both thresholds + * high and low. Applicable for devices STM32H72xx and STM32H73xx. + * @note If value of only one threshold high or low must be set, + * use function @ref LL_ADC_SetAnalogWDThresholds(). + * @note In case of ADC resolution different of 12 bits, + * analog watchdog thresholds data require a specific shift. + * Use helper macro @ref __LL_ADC_ANALOGWD_SET_THRESHOLD_RESOLUTION(). + * @note On this STM32 serie, there are 2 kinds of analog watchdog + * instance: + * - AWD standard (instance AWD1): + * - channels monitored: can monitor 1 channel or all channels. + * - groups monitored: ADC groups regular and-or injected. + * - resolution: resolution is not limited (corresponds to + * ADC resolution configured). + * - AWD flexible (instances AWD2, AWD3): + * - channels monitored: flexible on channels monitored, selection is + * channel wise, from from 1 to all channels. + * Specificity of this analog watchdog: Multiple channels can + * be selected. For example: + * (LL_ADC_AWD_CHANNEL4_REG_INJ | LL_ADC_AWD_CHANNEL5_REG_INJ | ...) + * - groups monitored: not selection possible (monitoring on both + * groups regular and injected). + * Channels selected are monitored on groups regular and injected: + * LL_ADC_AWD_CHANNELxx_REG_INJ (do not use parameters + * LL_ADC_AWD_CHANNELxx_REG and LL_ADC_AWD_CHANNELxx_INJ) + * - resolution: resolution is limited to 8 bits: if ADC resolution is + * 12 bits the 4 LSB are ignored, if ADC resolution is 10 bits + * the 2 LSB are ignored. + * @rmtoll TR1 HT1 LL_ADC_ConfigAnalogWDThresholds\n + * TR2 HT2 LL_ADC_ConfigAnalogWDThresholds\n + * TR3 HT3 LL_ADC_ConfigAnalogWDThresholds\n + * TR1 LT1 LL_ADC_ConfigAnalogWDThresholds\n + * TR2 LT2 LL_ADC_ConfigAnalogWDThresholds\n + * TR3 LT3 LL_ADC_ConfigAnalogWDThresholds + * @param ADCx ADC instance + * @param AWDy This parameter can be one of the following values: + * @arg @ref LL_ADC_AWD1 + * @arg @ref LL_ADC_AWD2 + * @arg @ref LL_ADC_AWD3 + * @param AWDThresholdHighValue Value between Min_Data=0x000 and Max_Data=0xFFF + * @param AWDThresholdLowValue Value between Min_Data=0x000 and Max_Data=0xFFF + * @retval None + */ +__STATIC_INLINE void LL_ADC_ConfigAnalogWDThresholds(ADC_TypeDef *ADCx, uint32_t AWDy, uint32_t AWDThresholdHighValue, uint32_t AWDThresholdLowValue) +{ + /* Set bits with content of parameter "AWDThresholdxxxValue" with bits */ + /* position in register and register position depending on parameter */ + /* "AWDy". */ + /* Parameters "AWDy" and "AWDThresholdxxxValue" are used with masks because */ + /* containing other bits reserved for other purpose. */ + if (ADCx == ADC3) + { + uint32_t __IO *preg = __ADC_PTR_REG_OFFSET(ADCx->LTR1_TR1, ((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS)); + + MODIFY_REG(*preg, + ADC3_TR1_HT1 | ADC3_TR1_LT1, + (AWDThresholdHighValue << ADC3_TR1_HT1_Pos) | AWDThresholdLowValue); + } + else + { + __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->LTR1_TR1, (((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS) * 2UL) + + ((AWDy & ADC_AWD_TR12_REGOFFSETGAP_MASK) * ADC_AWD_TR12_REGOFFSETGAP_VAL) + + (LL_ADC_AWD_THRESHOLD_LOW)); + __IO uint32_t *preg2 = __ADC_PTR_REG_OFFSET(ADCx->LTR1_TR1, (((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS) * 2UL) + + ((AWDy & ADC_AWD_TR12_REGOFFSETGAP_MASK) * ADC_AWD_TR12_REGOFFSETGAP_VAL) + + (LL_ADC_AWD_THRESHOLD_HIGH)); + + MODIFY_REG(*preg, ADC_LTR_LT, AWDThresholdLowValue); + MODIFY_REG(*preg2, ADC_HTR_HT, AWDThresholdHighValue); + } +} + + +/** + * @brief Set ADC analog watchdog filtering configuration + * @note On this STM32 serie, setting of this feature is conditioned to + * ADC state: + * ADC must be disabled or enabled without conversion on going + * on either groups regular or injected. + * Applicable on ADC3 of devices STM32H72xx and STM32H73xx. + * @note On this STM32 serie, this feature is only available on first + * analog watchdog (AWD1) + * @rmtoll TR1 AWDFILT LL_ADC_SetAWDFilteringConfiguration + * @param ADCx ADC instance + * @param AWDy This parameter can be one of the following values: + * @arg @ref LL_ADC_AWD1 + * @param FilteringConfig This parameter can be one of the following values: + * @arg @ref LL_ADC_AWD_FILTERING_NONE + * @arg @ref LL_ADC_AWD_FILTERING_2SAMPLES + * @arg @ref LL_ADC_AWD_FILTERING_3SAMPLES + * @arg @ref LL_ADC_AWD_FILTERING_4SAMPLES + * @arg @ref LL_ADC_AWD_FILTERING_5SAMPLES + * @arg @ref LL_ADC_AWD_FILTERING_6SAMPLES + * @arg @ref LL_ADC_AWD_FILTERING_7SAMPLES + * @arg @ref LL_ADC_AWD_FILTERING_8SAMPLES + * @retval None + */ +__STATIC_INLINE void LL_ADC_SetAWDFilteringConfiguration(ADC_TypeDef *ADCx, uint32_t AWDy, uint32_t FilteringConfig) +{ + if (ADCx == ADC3) + { + /* Prevent unused argument(s) compilation warning */ + (void)(AWDy); + MODIFY_REG(ADCx->LTR1_TR1, ADC3_TR1_AWDFILT, FilteringConfig); + } +} + +/** + * @brief Get ADC analog watchdog filtering configuration + * @note On this STM32 serie, this feature is only available on first + * analog watchdog (AWD1) + * Applicable on ADC3 of devices STM32H72xx and STM32H73xx. + * @rmtoll TR1 AWDFILT LL_ADC_GetAWDFilteringConfiguration + * @param ADCx ADC instance + * @param AWDy This parameter can be one of the following values: + * @arg @ref LL_ADC_AWD1 + * @retval Returned value can be: + * @arg @ref LL_ADC_AWD_FILTERING_NONE + * @arg @ref LL_ADC_AWD_FILTERING_2SAMPLES + * @arg @ref LL_ADC_AWD_FILTERING_3SAMPLES + * @arg @ref LL_ADC_AWD_FILTERING_4SAMPLES + * @arg @ref LL_ADC_AWD_FILTERING_5SAMPLES + * @arg @ref LL_ADC_AWD_FILTERING_6SAMPLES + * @arg @ref LL_ADC_AWD_FILTERING_7SAMPLES + * @arg @ref LL_ADC_AWD_FILTERING_8SAMPLES + */ +__STATIC_INLINE uint32_t LL_ADC_GetAWDFilteringConfiguration(ADC_TypeDef *ADCx, uint32_t AWDy) +{ + if (ADCx == ADC3) + { + /* Prevent unused argument(s) compilation warning */ + (void)(AWDy); + return (uint32_t)(READ_BIT(ADCx->LTR1_TR1, ADC3_TR1_AWDFILT)); + } + else + { + /* Function not available on this instance, return 0 */ + return 0UL; + } +} +#endif /* ADC_VER_V5_V90 */ /** * @} */ @@ -5281,10 +6262,10 @@ __STATIC_INLINE void LL_ADC_ConfigOverSamplingRatioShift(ADC_TypeDef *ADCx, uint * @rmtoll CFGR2 OVSR LL_ADC_GetOverSamplingRatio * @param ADCx ADC instance * @retval Ratio This parameter can be in the from 1 to 1024. - */ +*/ __STATIC_INLINE uint32_t LL_ADC_GetOverSamplingRatio(ADC_TypeDef *ADCx) { - return (((uint32_t)(READ_BIT(ADCx->CFGR2, ADC_CFGR2_OVSR))+(1UL << ADC_CFGR2_OVSR_Pos)) >> ADC_CFGR2_OVSR_Pos); + return (((uint32_t)(READ_BIT(ADCx->CFGR2, ADC_CFGR2_OVSR)) + (1UL << ADC_CFGR2_OVSR_Pos)) >> ADC_CFGR2_OVSR_Pos); } /** @@ -5305,7 +6286,7 @@ __STATIC_INLINE uint32_t LL_ADC_GetOverSamplingRatio(ADC_TypeDef *ADCx) * @arg @ref LL_ADC_OVS_SHIFT_RIGHT_9 * @arg @ref LL_ADC_OVS_SHIFT_RIGHT_10 * @arg @ref LL_ADC_OVS_SHIFT_RIGHT_11 - */ +*/ __STATIC_INLINE uint32_t LL_ADC_GetOverSamplingShift(ADC_TypeDef *ADCx) { return (uint32_t)(READ_BIT(ADCx->CFGR2, ADC_CFGR2_OVSS)); @@ -5336,7 +6317,13 @@ __STATIC_INLINE uint32_t LL_ADC_GetOverSamplingShift(ADC_TypeDef *ADCx) */ __STATIC_INLINE void LL_ADC_SetBoostMode(ADC_TypeDef *ADCx, uint32_t BoostMode) { - if((DBGMCU->IDCODE & 0x30000000UL) == 0x10000000UL) /* Cut 1.x */ +#if defined(ADC_VER_V5_V90) + if (ADCx != ADC3) + { + MODIFY_REG(ADCx->CR, ADC_CR_BOOST, (BoostMode & ADC_CR_BOOST)); + } +#else /* ADC_VER_V5_V90 */ + if ((DBGMCU->IDCODE & 0x30000000UL) == 0x10000000UL) /* Cut 1.x */ { MODIFY_REG(ADCx->CR, ADC_CR_BOOST_0, (BoostMode >> 2UL)); } @@ -5344,8 +6331,10 @@ __STATIC_INLINE void LL_ADC_SetBoostMode(ADC_TypeDef *ADCx, uint32_t BoostMode) { MODIFY_REG(ADCx->CR, ADC_CR_BOOST, (BoostMode & ADC_CR_BOOST)); } +#endif } + /** * @brief Get ADC boost mode. * @note On this STM32 serie, setting of this feature is conditioned to @@ -5358,7 +6347,7 @@ __STATIC_INLINE void LL_ADC_SetBoostMode(ADC_TypeDef *ADCx, uint32_t BoostMode) */ __STATIC_INLINE uint32_t LL_ADC_GetBoostMode(ADC_TypeDef *ADCx) { - if((DBGMCU->IDCODE & 0x30000000UL) == 0x10000000UL) /* Cut 1.x */ + if ((DBGMCU->IDCODE & 0x30000000UL) == 0x10000000UL) /* Cut 1.x */ { return (uint32_t)READ_BIT(ADCx->CR, ADC_CR_BOOST_0); } @@ -6120,7 +7109,7 @@ __STATIC_INLINE uint32_t LL_ADC_INJ_IsStopConversionOngoing(ADC_TypeDef *ADCx) */ __STATIC_INLINE uint32_t LL_ADC_INJ_ReadConversionData32(ADC_TypeDef *ADCx, uint32_t Rank) { - register const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->JDR1, ((Rank & ADC_INJ_JDRX_REGOFFSET_MASK) >> ADC_JDRX_REGOFFSET_POS)); + const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->JDR1, ((Rank & ADC_INJ_JDRX_REGOFFSET_MASK) >> ADC_JDRX_REGOFFSET_POS)); return (uint32_t)(READ_BIT(*preg, ADC_JDR1_JDATA) @@ -6147,7 +7136,7 @@ __STATIC_INLINE uint32_t LL_ADC_INJ_ReadConversionData32(ADC_TypeDef *ADCx, uint */ __STATIC_INLINE uint16_t LL_ADC_INJ_ReadConversionData16(ADC_TypeDef *ADCx, uint32_t Rank) { - register const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->JDR1, ((Rank & ADC_INJ_JDRX_REGOFFSET_MASK) >> ADC_JDRX_REGOFFSET_POS)); + const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->JDR1, ((Rank & ADC_INJ_JDRX_REGOFFSET_MASK) >> ADC_JDRX_REGOFFSET_POS)); return (uint16_t)(READ_BIT(*preg, ADC_JDR1_JDATA) @@ -6174,7 +7163,7 @@ __STATIC_INLINE uint16_t LL_ADC_INJ_ReadConversionData16(ADC_TypeDef *ADCx, uint */ __STATIC_INLINE uint16_t LL_ADC_INJ_ReadConversionData14(ADC_TypeDef *ADCx, uint32_t Rank) { - register const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->JDR1, ((Rank & ADC_INJ_JDRX_REGOFFSET_MASK) >> ADC_JDRX_REGOFFSET_POS)); + const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->JDR1, ((Rank & ADC_INJ_JDRX_REGOFFSET_MASK) >> ADC_JDRX_REGOFFSET_POS)); return (uint16_t)(READ_BIT(*preg, ADC_JDR1_JDATA) @@ -6201,7 +7190,7 @@ __STATIC_INLINE uint16_t LL_ADC_INJ_ReadConversionData14(ADC_TypeDef *ADCx, uint */ __STATIC_INLINE uint16_t LL_ADC_INJ_ReadConversionData12(ADC_TypeDef *ADCx, uint32_t Rank) { - register const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->JDR1, ((Rank & ADC_INJ_JDRX_REGOFFSET_MASK) >> ADC_JDRX_REGOFFSET_POS)); + const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->JDR1, ((Rank & ADC_INJ_JDRX_REGOFFSET_MASK) >> ADC_JDRX_REGOFFSET_POS)); return (uint16_t)(READ_BIT(*preg, ADC_JDR1_JDATA) @@ -6228,7 +7217,7 @@ __STATIC_INLINE uint16_t LL_ADC_INJ_ReadConversionData12(ADC_TypeDef *ADCx, uint */ __STATIC_INLINE uint16_t LL_ADC_INJ_ReadConversionData10(ADC_TypeDef *ADCx, uint32_t Rank) { - register const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->JDR1, ((Rank & ADC_INJ_JDRX_REGOFFSET_MASK) >> ADC_JDRX_REGOFFSET_POS)); + const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->JDR1, ((Rank & ADC_INJ_JDRX_REGOFFSET_MASK) >> ADC_JDRX_REGOFFSET_POS)); return (uint16_t)(READ_BIT(*preg, ADC_JDR1_JDATA) @@ -6255,7 +7244,7 @@ __STATIC_INLINE uint16_t LL_ADC_INJ_ReadConversionData10(ADC_TypeDef *ADCx, uint */ __STATIC_INLINE uint8_t LL_ADC_INJ_ReadConversionData8(ADC_TypeDef *ADCx, uint32_t Rank) { - register const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->JDR1, ((Rank & ADC_INJ_JDRX_REGOFFSET_MASK) >> ADC_JDRX_REGOFFSET_POS)); + const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->JDR1, ((Rank & ADC_INJ_JDRX_REGOFFSET_MASK) >> ADC_JDRX_REGOFFSET_POS)); return (uint8_t)(READ_BIT(*preg, ADC_JDR1_JDATA) diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_bdma.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_bdma.h index 0748b35..9faa900 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_bdma.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_bdma.h @@ -128,7 +128,7 @@ typedef struct This feature can be modified afterwards using unitary function @ref LL_BDMA_SetDataLength(). */ uint32_t PeriphRequest; /*!< Specifies the peripheral request. - This parameter can be a value of @ref DMAMUX_LL_EC_REQUEST + This parameter can be a value of @ref DMAMUX2_Request_selection This feature can be modified afterwards using unitary function @ref LL_BDMA_SetPeriphRequest(). */ @@ -484,7 +484,7 @@ LL_BDMA_CHANNEL_7) */ __STATIC_INLINE void LL_BDMA_EnableChannel(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; SET_BIT(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_EN); } @@ -506,7 +506,7 @@ __STATIC_INLINE void LL_BDMA_EnableChannel(BDMA_TypeDef *BDMAx, uint32_t Channel */ __STATIC_INLINE void LL_BDMA_DisableChannel(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; CLEAR_BIT(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_EN); } @@ -528,7 +528,7 @@ __STATIC_INLINE void LL_BDMA_DisableChannel(BDMA_TypeDef *BDMAx, uint32_t Channe */ __STATIC_INLINE uint32_t LL_BDMA_IsEnabledChannel(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; return ((READ_BIT(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_EN) == (BDMA_CCR_EN)) ? 1UL : 0UL); } @@ -565,7 +565,7 @@ __STATIC_INLINE uint32_t LL_BDMA_IsEnabledChannel(BDMA_TypeDef *BDMAx, uint32_t */ __STATIC_INLINE void LL_BDMA_ConfigTransfer(BDMA_TypeDef *BDMAx, uint32_t Channel, uint32_t Configuration) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; MODIFY_REG(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_DIR | BDMA_CCR_MEM2MEM | BDMA_CCR_CIRC | BDMA_CCR_PINC | BDMA_CCR_MINC | BDMA_CCR_PSIZE | BDMA_CCR_MSIZE | BDMA_CCR_PL, @@ -594,7 +594,7 @@ __STATIC_INLINE void LL_BDMA_ConfigTransfer(BDMA_TypeDef *BDMAx, uint32_t Channe */ __STATIC_INLINE void LL_BDMA_SetDataTransferDirection(BDMA_TypeDef *BDMAx, uint32_t Channel, uint32_t Direction) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; MODIFY_REG(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_DIR | BDMA_CCR_MEM2MEM, Direction); @@ -621,7 +621,7 @@ __STATIC_INLINE void LL_BDMA_SetDataTransferDirection(BDMA_TypeDef *BDMAx, uint3 */ __STATIC_INLINE uint32_t LL_BDMA_GetDataTransferDirection(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; return (READ_BIT(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_DIR | BDMA_CCR_MEM2MEM)); @@ -649,7 +649,7 @@ __STATIC_INLINE uint32_t LL_BDMA_GetDataTransferDirection(BDMA_TypeDef *BDMAx, u */ __STATIC_INLINE void LL_BDMA_SetMode(BDMA_TypeDef *BDMAx, uint32_t Channel, uint32_t Mode) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; MODIFY_REG(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_CIRC, Mode); @@ -674,7 +674,7 @@ __STATIC_INLINE void LL_BDMA_SetMode(BDMA_TypeDef *BDMAx, uint32_t Channel, uint */ __STATIC_INLINE uint32_t LL_BDMA_GetMode(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; return (READ_BIT(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_CIRC)); @@ -700,7 +700,7 @@ __STATIC_INLINE uint32_t LL_BDMA_GetMode(BDMA_TypeDef *BDMAx, uint32_t Channel) */ __STATIC_INLINE void LL_BDMA_SetPeriphIncMode(BDMA_TypeDef *BDMAx, uint32_t Channel, uint32_t PeriphOrM2MSrcIncMode) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; MODIFY_REG(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_PINC, PeriphOrM2MSrcIncMode); @@ -725,7 +725,7 @@ __STATIC_INLINE void LL_BDMA_SetPeriphIncMode(BDMA_TypeDef *BDMAx, uint32_t Chan */ __STATIC_INLINE uint32_t LL_BDMA_GetPeriphIncMode(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; return (READ_BIT(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_PINC)); @@ -751,7 +751,7 @@ __STATIC_INLINE uint32_t LL_BDMA_GetPeriphIncMode(BDMA_TypeDef *BDMAx, uint32_t */ __STATIC_INLINE void LL_BDMA_SetMemoryIncMode(BDMA_TypeDef *BDMAx, uint32_t Channel, uint32_t MemoryOrM2MDstIncMode) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; MODIFY_REG(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_MINC, MemoryOrM2MDstIncMode); @@ -776,7 +776,7 @@ __STATIC_INLINE void LL_BDMA_SetMemoryIncMode(BDMA_TypeDef *BDMAx, uint32_t Chan */ __STATIC_INLINE uint32_t LL_BDMA_GetMemoryIncMode(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; return (READ_BIT(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_MINC)); @@ -803,7 +803,7 @@ __STATIC_INLINE uint32_t LL_BDMA_GetMemoryIncMode(BDMA_TypeDef *BDMAx, uint32_t */ __STATIC_INLINE void LL_BDMA_SetPeriphSize(BDMA_TypeDef *BDMAx, uint32_t Channel, uint32_t PeriphOrM2MSrcDataSize) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; MODIFY_REG(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_PSIZE, PeriphOrM2MSrcDataSize); @@ -829,7 +829,7 @@ __STATIC_INLINE void LL_BDMA_SetPeriphSize(BDMA_TypeDef *BDMAx, uint32_t Channel */ __STATIC_INLINE uint32_t LL_BDMA_GetPeriphSize(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; return (READ_BIT(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_PSIZE)); @@ -856,7 +856,7 @@ __STATIC_INLINE uint32_t LL_BDMA_GetPeriphSize(BDMA_TypeDef *BDMAx, uint32_t Cha */ __STATIC_INLINE void LL_BDMA_SetMemorySize(BDMA_TypeDef *BDMAx, uint32_t Channel, uint32_t MemoryOrM2MDstDataSize) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; MODIFY_REG(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_MSIZE, MemoryOrM2MDstDataSize); @@ -882,7 +882,7 @@ __STATIC_INLINE void LL_BDMA_SetMemorySize(BDMA_TypeDef *BDMAx, uint32_t Channel */ __STATIC_INLINE uint32_t LL_BDMA_GetMemorySize(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; return (READ_BIT(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_MSIZE)); @@ -910,7 +910,7 @@ __STATIC_INLINE uint32_t LL_BDMA_GetMemorySize(BDMA_TypeDef *BDMAx, uint32_t Cha */ __STATIC_INLINE void LL_BDMA_SetChannelPriorityLevel(BDMA_TypeDef *BDMAx, uint32_t Channel, uint32_t Priority) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; MODIFY_REG(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_PL, Priority); @@ -937,7 +937,7 @@ __STATIC_INLINE void LL_BDMA_SetChannelPriorityLevel(BDMA_TypeDef *BDMAx, uint32 */ __STATIC_INLINE uint32_t LL_BDMA_GetChannelPriorityLevel(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; return (READ_BIT(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_PL)); @@ -963,7 +963,7 @@ __STATIC_INLINE uint32_t LL_BDMA_GetChannelPriorityLevel(BDMA_TypeDef *BDMAx, ui */ __STATIC_INLINE void LL_BDMA_SetDataLength(BDMA_TypeDef *BDMAx, uint32_t Channel, uint32_t NbData) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; MODIFY_REG(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CNDTR, BDMA_CNDTR_NDT, NbData); @@ -988,7 +988,7 @@ __STATIC_INLINE void LL_BDMA_SetDataLength(BDMA_TypeDef *BDMAx, uint32_t Channel */ __STATIC_INLINE uint32_t LL_BDMA_GetDataLength(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; return (READ_BIT(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CNDTR, BDMA_CNDTR_NDT)); @@ -1014,7 +1014,7 @@ __STATIC_INLINE uint32_t LL_BDMA_GetDataLength(BDMA_TypeDef *BDMAx, uint32_t Cha */ __STATIC_INLINE void LL_BDMA_SetCurrentTargetMem(BDMA_TypeDef *BDMAx, uint32_t Channel, uint32_t CurrentMemory) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; MODIFY_REG(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_CT, CurrentMemory); } @@ -1038,7 +1038,7 @@ __STATIC_INLINE void LL_BDMA_SetCurrentTargetMem(BDMA_TypeDef *BDMAx, uint32_t C */ __STATIC_INLINE uint32_t LL_BDMA_GetCurrentTargetMem(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; return (READ_BIT(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_CT)); } @@ -1060,7 +1060,7 @@ __STATIC_INLINE uint32_t LL_BDMA_GetCurrentTargetMem(BDMA_TypeDef *BDMAx, uint32 */ __STATIC_INLINE void LL_BDMA_EnableDoubleBufferMode(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; SET_BIT(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_DBM); } @@ -1082,7 +1082,7 @@ __STATIC_INLINE void LL_BDMA_EnableDoubleBufferMode(BDMA_TypeDef *BDMAx, uint32_ */ __STATIC_INLINE void LL_BDMA_DisableDoubleBufferMode(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; CLEAR_BIT(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_DBM); } @@ -1114,7 +1114,7 @@ __STATIC_INLINE void LL_BDMA_DisableDoubleBufferMode(BDMA_TypeDef *BDMAx, uint32 __STATIC_INLINE void LL_BDMA_ConfigAddresses(BDMA_TypeDef *BDMAx, uint32_t Channel, uint32_t SrcAddress, uint32_t DstAddress, uint32_t Direction) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; /* Direction Memory to Periph */ if (Direction == LL_BDMA_DIRECTION_MEMORY_TO_PERIPH) @@ -1150,7 +1150,7 @@ __STATIC_INLINE void LL_BDMA_ConfigAddresses(BDMA_TypeDef *BDMAx, uint32_t Chann */ __STATIC_INLINE void LL_BDMA_SetMemoryAddress(BDMA_TypeDef *BDMAx, uint32_t Channel, uint32_t MemoryAddress) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; WRITE_REG(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CM0AR, MemoryAddress); } @@ -1175,7 +1175,7 @@ __STATIC_INLINE void LL_BDMA_SetMemoryAddress(BDMA_TypeDef *BDMAx, uint32_t Chan */ __STATIC_INLINE void LL_BDMA_SetPeriphAddress(BDMA_TypeDef *BDMAx, uint32_t Channel, uint32_t PeriphAddress) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; WRITE_REG(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CPAR, PeriphAddress); } @@ -1198,7 +1198,7 @@ __STATIC_INLINE void LL_BDMA_SetPeriphAddress(BDMA_TypeDef *BDMAx, uint32_t Chan */ __STATIC_INLINE uint32_t LL_BDMA_GetMemoryAddress(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; return (READ_REG(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CM0AR)); } @@ -1221,7 +1221,7 @@ __STATIC_INLINE uint32_t LL_BDMA_GetMemoryAddress(BDMA_TypeDef *BDMAx, uint32_t */ __STATIC_INLINE uint32_t LL_BDMA_GetPeriphAddress(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; return (READ_REG(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CPAR)); } @@ -1246,7 +1246,7 @@ __STATIC_INLINE uint32_t LL_BDMA_GetPeriphAddress(BDMA_TypeDef *BDMAx, uint32_t */ __STATIC_INLINE void LL_BDMA_SetM2MSrcAddress(BDMA_TypeDef *BDMAx, uint32_t Channel, uint32_t MemoryAddress) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; WRITE_REG(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CPAR, MemoryAddress); } @@ -1271,7 +1271,7 @@ __STATIC_INLINE void LL_BDMA_SetM2MSrcAddress(BDMA_TypeDef *BDMAx, uint32_t Chan */ __STATIC_INLINE void LL_BDMA_SetM2MDstAddress(BDMA_TypeDef *BDMAx, uint32_t Channel, uint32_t MemoryAddress) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; WRITE_REG(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CM0AR, MemoryAddress); } @@ -1294,7 +1294,7 @@ __STATIC_INLINE void LL_BDMA_SetM2MDstAddress(BDMA_TypeDef *BDMAx, uint32_t Chan */ __STATIC_INLINE uint32_t LL_BDMA_GetM2MSrcAddress(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; return (READ_REG(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CPAR)); } @@ -1317,7 +1317,7 @@ __STATIC_INLINE uint32_t LL_BDMA_GetM2MSrcAddress(BDMA_TypeDef *BDMAx, uint32_t */ __STATIC_INLINE uint32_t LL_BDMA_GetM2MDstAddress(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; return (READ_REG(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CM0AR)); } @@ -1340,7 +1340,7 @@ __STATIC_INLINE uint32_t LL_BDMA_GetM2MDstAddress(BDMA_TypeDef *BDMAx, uint32_t */ __STATIC_INLINE void LL_BDMA_SetMemory1Address(BDMA_TypeDef *BDMAx, uint32_t Channel, uint32_t Address) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; MODIFY_REG(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CM1AR, BDMA_CM1AR_MA, Address); } @@ -1362,7 +1362,7 @@ __STATIC_INLINE void LL_BDMA_SetMemory1Address(BDMA_TypeDef *BDMAx, uint32_t Cha */ __STATIC_INLINE uint32_t LL_BDMA_GetMemory1Address(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; return (((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CM1AR); } @@ -1400,8 +1400,9 @@ __STATIC_INLINE uint32_t LL_BDMA_GetMemory1Address(BDMA_TypeDef *BDMAx, uint32_t * @arg @ref LL_DMAMUX2_REQ_SAI4_A (*) * @arg @ref LL_DMAMUX2_REQ_SAI4_B (*) * @arg @ref LL_DMAMUX2_REQ_ADC3 (*) - * @arg @ref LL_DMAMUX2_REQ_DAC3 (*) + * @arg @ref LL_DMAMUX2_REQ_DAC2_CH1 (*) * @arg @ref LL_DMAMUX2_REQ_DFSDM2_FLT0 (*) + * * @note (*) Availability depends on devices. * @retval None */ @@ -1444,8 +1445,9 @@ __STATIC_INLINE void LL_BDMA_SetPeriphRequest(BDMA_TypeDef *BDMAx, uint32_t Chan * @arg @ref LL_DMAMUX2_REQ_SAI4_A (*) * @arg @ref LL_DMAMUX2_REQ_SAI4_B (*) * @arg @ref LL_DMAMUX2_REQ_ADC3 (*) - * @arg @ref LL_DMAMUX2_REQ_DAC3 (*) + * @arg @ref LL_DMAMUX2_REQ_DAC2_CH1 (*) * @arg @ref LL_DMAMUX2_REQ_DFSDM2_FLT0 (*) + * * @note (*) Availability depends on devices. */ __STATIC_INLINE uint32_t LL_BDMA_GetPeriphRequest(BDMA_TypeDef *BDMAx, uint32_t Channel) @@ -2189,7 +2191,7 @@ __STATIC_INLINE void LL_BDMA_ClearFlag_TE7(BDMA_TypeDef *BDMAx) */ __STATIC_INLINE void LL_BDMA_EnableIT_TC(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; SET_BIT(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_TCIE); } @@ -2211,7 +2213,7 @@ __STATIC_INLINE void LL_BDMA_EnableIT_TC(BDMA_TypeDef *BDMAx, uint32_t Channel) */ __STATIC_INLINE void LL_BDMA_EnableIT_HT(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; SET_BIT(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_HTIE); } @@ -2233,7 +2235,7 @@ __STATIC_INLINE void LL_BDMA_EnableIT_HT(BDMA_TypeDef *BDMAx, uint32_t Channel) */ __STATIC_INLINE void LL_BDMA_EnableIT_TE(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; SET_BIT(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_TEIE); } @@ -2255,7 +2257,7 @@ __STATIC_INLINE void LL_BDMA_EnableIT_TE(BDMA_TypeDef *BDMAx, uint32_t Channel) */ __STATIC_INLINE void LL_BDMA_DisableIT_TC(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; CLEAR_BIT(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_TCIE); } @@ -2277,7 +2279,7 @@ __STATIC_INLINE void LL_BDMA_DisableIT_TC(BDMA_TypeDef *BDMAx, uint32_t Channel) */ __STATIC_INLINE void LL_BDMA_DisableIT_HT(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; CLEAR_BIT(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_HTIE); } @@ -2299,7 +2301,7 @@ __STATIC_INLINE void LL_BDMA_DisableIT_HT(BDMA_TypeDef *BDMAx, uint32_t Channel) */ __STATIC_INLINE void LL_BDMA_DisableIT_TE(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; CLEAR_BIT(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_TEIE); } @@ -2321,7 +2323,7 @@ __STATIC_INLINE void LL_BDMA_DisableIT_TE(BDMA_TypeDef *BDMAx, uint32_t Channel) */ __STATIC_INLINE uint32_t LL_BDMA_IsEnabledIT_TC(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; return ((READ_BIT(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_TCIE) == (BDMA_CCR_TCIE)) ? 1UL : 0UL); } @@ -2343,7 +2345,7 @@ __STATIC_INLINE uint32_t LL_BDMA_IsEnabledIT_TC(BDMA_TypeDef *BDMAx, uint32_t Ch */ __STATIC_INLINE uint32_t LL_BDMA_IsEnabledIT_HT(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; return ((READ_BIT(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_HTIE) == (BDMA_CCR_HTIE)) ? 1UL : 0UL); } @@ -2365,7 +2367,7 @@ __STATIC_INLINE uint32_t LL_BDMA_IsEnabledIT_HT(BDMA_TypeDef *BDMAx, uint32_t Ch */ __STATIC_INLINE uint32_t LL_BDMA_IsEnabledIT_TE(BDMA_TypeDef *BDMAx, uint32_t Channel) { - register uint32_t bdma_base_addr = (uint32_t)BDMAx; + uint32_t bdma_base_addr = (uint32_t)BDMAx; return ((READ_BIT(((BDMA_Channel_TypeDef *)(bdma_base_addr + LL_BDMA_CH_OFFSET_TAB[Channel]))->CCR, BDMA_CCR_TEIE) == (BDMA_CCR_TEIE)) ? 1UL : 0UL); } @@ -2397,6 +2399,9 @@ void LL_BDMA_StructInit(LL_BDMA_InitTypeDef *BDMA_InitStruct); */ #endif /* BDMA || BDMA1 || BDMA2 */ +/** + * @} + */ /** * @} diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_bus.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_bus.h index a7b739e..022cf6d 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_bus.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_bus.h @@ -163,6 +163,12 @@ extern "C" { #endif /* HASH */ #define LL_AHB2_GRP1_PERIPH_RNG RCC_AHB2ENR_RNGEN #define LL_AHB2_GRP1_PERIPH_SDMMC2 RCC_AHB2ENR_SDMMC2EN +#if defined(FMAC) +#define LL_AHB2_GRP1_PERIPH_FMAC RCC_AHB2ENR_FMACEN +#endif /* FMAC */ +#if defined(CORDIC) +#define LL_AHB2_GRP1_PERIPH_CORDIC RCC_AHB2ENR_CORDICEN +#endif /* CORDIC */ #if defined(BDMA1) #define LL_AHB2_GRP1_PERIPH_BDMA1 RCC_AHB2ENR_BDMA1EN #endif /* BDMA1 */ @@ -197,7 +203,9 @@ extern "C" { #define LL_AHB4_GRP1_PERIPH_GPIOF RCC_AHB4ENR_GPIOFEN #define LL_AHB4_GRP1_PERIPH_GPIOG RCC_AHB4ENR_GPIOGEN #define LL_AHB4_GRP1_PERIPH_GPIOH RCC_AHB4ENR_GPIOHEN +#if defined(GPIOI) #define LL_AHB4_GRP1_PERIPH_GPIOI RCC_AHB4ENR_GPIOIEN +#endif /* GPIOI */ #define LL_AHB4_GRP1_PERIPH_GPIOJ RCC_AHB4ENR_GPIOJEN #define LL_AHB4_GRP1_PERIPH_GPIOK RCC_AHB4ENR_GPIOKEN #if defined(RCC_AHB4ENR_CRCEN) @@ -232,7 +240,9 @@ extern "C" { /** @defgroup BUS_LL_EC_APB3_GRP1_PERIPH APB3 GRP1 PERIPH * @{ */ +#if defined(LTDC) #define LL_APB3_GRP1_PERIPH_LTDC RCC_APB3ENR_LTDCEN +#endif /* LTDC */ #if defined(DSI) #define LL_APB3_GRP1_PERIPH_DSI RCC_APB3ENR_DSIEN #endif /* DSI */ @@ -271,7 +281,15 @@ extern "C" { #define LL_APB1_GRP1_PERIPH_I2C1 RCC_APB1LENR_I2C1EN #define LL_APB1_GRP1_PERIPH_I2C2 RCC_APB1LENR_I2C2EN #define LL_APB1_GRP1_PERIPH_I2C3 RCC_APB1LENR_I2C3EN +#if defined(I2C5) +#define LL_APB1_GRP1_PERIPH_I2C5 RCC_APB1LENR_I2C5EN +#endif /* I2C5 */ +#if defined(RCC_APB1LENR_CECEN) #define LL_APB1_GRP1_PERIPH_CEC RCC_APB1LENR_CECEN +#else +#define LL_APB1_GRP1_PERIPH_HDMICEC RCC_APB1LENR_HDMICECEN +#define LL_APB1_GRP1_PERIPH_CEC LL_APB1_GRP1_PERIPH_HDMICEC /* for backward compatibility*/ +#endif /* RCC_APB1LENR_CECEN */ #define LL_APB1_GRP1_PERIPH_DAC12 RCC_APB1LENR_DAC12EN #define LL_APB1_GRP1_PERIPH_UART7 RCC_APB1LENR_UART7EN #define LL_APB1_GRP1_PERIPH_UART8 RCC_APB1LENR_UART8EN @@ -288,6 +306,12 @@ extern "C" { #define LL_APB1_GRP2_PERIPH_OPAMP RCC_APB1HENR_OPAMPEN #define LL_APB1_GRP2_PERIPH_MDIOS RCC_APB1HENR_MDIOSEN #define LL_APB1_GRP2_PERIPH_FDCAN RCC_APB1HENR_FDCANEN +#if defined(TIM23) +#define LL_APB1_GRP2_PERIPH_TIM23 RCC_APB1HENR_TIM23EN +#endif /* TIM23 */ +#if defined(TIM24) +#define LL_APB1_GRP2_PERIPH_TIM24 RCC_APB1HENR_TIM24EN +#endif /* TIM24 */ /** * @} */ @@ -313,7 +337,9 @@ extern "C" { #define LL_APB2_GRP1_PERIPH_TIM17 RCC_APB2ENR_TIM17EN #define LL_APB2_GRP1_PERIPH_SPI5 RCC_APB2ENR_SPI5EN #define LL_APB2_GRP1_PERIPH_SAI1 RCC_APB2ENR_SAI1EN +#if defined(SAI2) #define LL_APB2_GRP1_PERIPH_SAI2 RCC_APB2ENR_SAI2EN +#endif /* SAI2 */ #if defined(SAI3) #define LL_APB2_GRP1_PERIPH_SAI3 RCC_APB2ENR_SAI3EN #endif /* SAI3 */ @@ -367,7 +393,7 @@ extern "C" { #define LL_CLKAM_PERIPH_BDMA RCC_D3AMR_BDMAAMEN #else #define LL_CLKAM_PERIPH_BDMA2 RCC_SRDAMR_BDMA2AMEN -#define LL_CLKAM_PERIPH_BDMA LL_CLKAM_PERIPH_BDMA2 /* for backward compatibility*/ +#define LL_CLKAM_PERIPH_BDMA LL_CLKAM_PERIPH_BDMA2 /* for backward compatibility*/ #endif /* RCC_D3AMR_BDMAAMEN */ #if defined(RCC_SRDAMR_GPIOAMEN) #define LL_CLKAM_PERIPH_GPIO RCC_SRDAMR_GPIOAMEN @@ -430,9 +456,12 @@ extern "C" { #if defined(ADC3) #define LL_CLKAM_PERIPH_ADC3 RCC_D3AMR_ADC3AMEN #endif /* ADC3 */ -#if defined(DTS) +#if defined(RCC_SRDAMR_DTSAMEN) #define LL_CLKAM_PERIPH_DTS RCC_SRDAMR_DTSAMEN -#endif /* DTS */ +#endif /* RCC_SRDAMR_DTSAMEN */ +#if defined(RCC_D3AMR_DTSAMEN) +#define LL_CLKAM_PERIPH_DTS RCC_D3AMR_DTSAMEN +#endif /* RCC_D3AMR_DTSAMEN */ #if defined(DFSDM2_BASE) #define LL_CLKAM_PERIPH_DFSDM2 RCC_SRDAMR_DFSDM2AMEN #endif /* DFSDM2_BASE */ @@ -481,6 +510,10 @@ extern "C" { */ #endif /* RCC_CKGAENR_AXICKG */ +/** + * @} + */ + /* Exported macro ------------------------------------------------------------*/ /* Exported functions --------------------------------------------------------*/ @@ -529,7 +562,7 @@ extern "C" { * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM1 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM2 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_ITCM (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_AXISRAM (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_AXISRAM * * (*) value not defined in all devices. * @retval None @@ -570,7 +603,7 @@ __STATIC_INLINE void LL_AHB3_GRP1_EnableClock(uint32_t Periphs) * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI1 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI2 (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_IOMNGR (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_OCTOSPIM (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*) @@ -579,7 +612,7 @@ __STATIC_INLINE void LL_AHB3_GRP1_EnableClock(uint32_t Periphs) * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM1 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM2 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_ITCM (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_AXISRAM (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_AXISRAM * * (*) value not defined in all devices. * @retval uint32_t @@ -613,10 +646,10 @@ __STATIC_INLINE uint32_t LL_AHB3_GRP1_IsEnabledClock(uint32_t Periphs) * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC (*) * @arg @ref LL_AHB3_GRP1_PERIPH_FMC - * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI1 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI2 (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_IOMNGR (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_OCTOSPIM (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*) @@ -625,7 +658,7 @@ __STATIC_INLINE uint32_t LL_AHB3_GRP1_IsEnabledClock(uint32_t Periphs) * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM1 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM2 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_ITCM (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_AXISRAM (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_AXISRAM * * (*) value not defined in all devices. * @retval None @@ -640,7 +673,7 @@ __STATIC_INLINE void LL_AHB3_GRP1_DisableClock(uint32_t Periphs) * @rmtoll AHB3RSTR MDMARST LL_AHB3_GRP1_ForceReset\n * AHB3RSTR DMA2DRST LL_AHB3_GRP1_ForceReset\n * AHB3RSTR JPGDECRST LL_AHB3_GRP1_ForceReset\n - * AHB3RSTR FMCRST LL_AHB3_GRP1_ForceReset\n + * AHB3RSTR FMCRST LL_AHB3_GRP1_ForceReset\n * AHB3RSTR QSPIRST LL_AHB3_GRP1_ForceReset\n (*) * AHB3RSTR OSPI1RST LL_AHB3_GRP1_ForceReset\n (*) * AHB3RSTR OSPI2RST LL_AHB3_GRP1_ForceReset\n (*) @@ -654,13 +687,13 @@ __STATIC_INLINE void LL_AHB3_GRP1_DisableClock(uint32_t Periphs) * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC (*) * @arg @ref LL_AHB3_GRP1_PERIPH_FMC - * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI1 (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI2 (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI1 (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI2 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OCTOSPIM (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*) * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1 * * (*) value not defined in all devices. @@ -690,13 +723,13 @@ __STATIC_INLINE void LL_AHB3_GRP1_ForceReset(uint32_t Periphs) * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC (*) * @arg @ref LL_AHB3_GRP1_PERIPH_FMC - * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI1 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI2 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OCTOSPIM (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*) * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1 * * (*) value not defined in all devices. @@ -734,9 +767,9 @@ __STATIC_INLINE void LL_AHB3_GRP1_ReleaseReset(uint32_t Periphs) * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI1 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI2 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OCTOSPIM (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*) * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1 * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM1 @@ -783,9 +816,9 @@ __STATIC_INLINE void LL_AHB3_GRP1_EnableClockSleep(uint32_t Periphs) * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI1 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI2 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OCTOSPIM (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*) * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1 * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM1 @@ -1067,6 +1100,8 @@ __STATIC_INLINE void LL_AHB1_GRP1_DisableClockSleep(uint32_t Periphs) * AHB2ENR RNGEN LL_AHB2_GRP1_EnableClock\n * AHB2ENR SDMMC2EN LL_AHB2_GRP1_EnableClock\n * AHB2ENR BDMA1EN LL_AHB2_GRP1_EnableClock\n (*) + * AHB2ENR FMACEN LL_AHB2_GRP1_EnableClock\n + * AHB2ENR CORDICEN LL_AHB2_GRP1_EnableClock\n * AHB2ENR D2SRAM1EN LL_AHB2_GRP1_EnableClock\n * AHB2ENR D2SRAM2EN LL_AHB2_GRP1_EnableClock\n * AHB2ENR D2SRAM3EN LL_AHB2_GRP1_EnableClock (*) @@ -1077,7 +1112,9 @@ __STATIC_INLINE void LL_AHB1_GRP1_DisableClockSleep(uint32_t Periphs) * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*) * @arg @ref LL_AHB2_GRP1_PERIPH_RNG * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2 - * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_FMAC (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_CORDIC (*) * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM1 * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM2 * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM3 (*) @@ -1103,17 +1140,21 @@ __STATIC_INLINE void LL_AHB2_GRP1_EnableClock(uint32_t Periphs) * AHB2ENR RNGEN LL_AHB2_GRP1_IsEnabledClock\n * AHB2ENR SDMMC2EN LL_AHB2_GRP1_IsEnabledClock\n * AHB2ENR BDMA1EN LL_AHB2_GRP1_IsEnabledClock\n (*) + * AHB2ENR FMACEN LL_AHB2_GRP1_IsEnabledClock\n + * AHB2ENR CORDICEN LL_AHB2_GRP1_IsEnabledClock\n * AHB2ENR D2SRAM1EN LL_AHB2_GRP1_IsEnabledClock\n * AHB2ENR D2SRAM2EN LL_AHB2_GRP1_IsEnabledClock\n * AHB2ENR D2SRAM3EN LL_AHB2_GRP1_IsEnabledClock (*) * @param Periphs This parameter can be a combination of the following values: * @arg @ref LL_AHB2_GRP1_PERIPH_DCMI - * @arg @ref LL_AHB2_GRP1_PERIPH_HSEMEN (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_HSEM (*) * @arg @ref LL_AHB2_GRP1_PERIPH_CRYP (*) * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*) * @arg @ref LL_AHB2_GRP1_PERIPH_RNG * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2 - * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_FMAC (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_CORDIC (*) * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM1 * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM2 * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM3 (*) @@ -1135,17 +1176,21 @@ __STATIC_INLINE uint32_t LL_AHB2_GRP1_IsEnabledClock(uint32_t Periphs) * AHB2ENR RNGEN LL_AHB2_GRP1_DisableClock\n * AHB2ENR SDMMC2EN LL_AHB2_GRP1_DisableClock\n * AHB2ENR BDMA1EN LL_AHB2_GRP1_DisableClock\n (*) + * AHB2ENR FMACEN LL_AHB2_GRP1_DisableClock\n + * AHB2ENR CORDICEN LL_AHB2_GRP1_DisableClock\n * AHB2ENR D2SRAM1EN LL_AHB2_GRP1_DisableClock\n * AHB2ENR D2SRAM2EN LL_AHB2_GRP1_DisableClock\n * AHB2ENR D2SRAM3EN LL_AHB2_GRP1_DisableClock (*) * @param Periphs This parameter can be a combination of the following values: * @arg @ref LL_AHB2_GRP1_PERIPH_DCMI - * @arg @ref LL_AHB2_GRP1_PERIPH_HSEMEN (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_HSEM (*) * @arg @ref LL_AHB2_GRP1_PERIPH_CRYP (*) * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*) * @arg @ref LL_AHB2_GRP1_PERIPH_RNG * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2 - * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_FMAC (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_CORDIC (*) * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM1 * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM2 * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM3 (*) @@ -1167,6 +1212,8 @@ __STATIC_INLINE void LL_AHB2_GRP1_DisableClock(uint32_t Periphs) * AHB2RSTR RNGRST LL_AHB2_GRP1_ForceReset\n * AHB2RSTR SDMMC2RST LL_AHB2_GRP1_ForceReset\n * AHB2RSTR BDMA1RST LL_AHB2_GRP1_ForceReset (*) + * AHB2RSTR FMACRST LL_AHB2_GRP1_ForceReset\n + * AHB2RSTR CORDICRST LL_AHB2_GRP1_ForceReset * @param Periphs This parameter can be a combination of the following values: * @arg @ref LL_AHB2_GRP1_PERIPH_DCMI * @arg @ref LL_AHB2_GRP1_PERIPH_HSEM (*) @@ -1174,7 +1221,9 @@ __STATIC_INLINE void LL_AHB2_GRP1_DisableClock(uint32_t Periphs) * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*) * @arg @ref LL_AHB2_GRP1_PERIPH_RNG * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2 - * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_FMAC (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_CORDIC (*) * * (*) value not defined in all devices. * @retval None @@ -1193,13 +1242,18 @@ __STATIC_INLINE void LL_AHB2_GRP1_ForceReset(uint32_t Periphs) * AHB2RSTR RNGRST LL_AHB2_GRP1_ReleaseReset\n * AHB2RSTR SDMMC2RST LL_AHB2_GRP1_ReleaseReset\n * AHB2RSTR BDMA1RST LL_AHB2_GRP1_ReleaseReset (*) + * AHB2RSTR FMACRST LL_AHB2_GRP1_ReleaseReset\n + * AHB2RSTR CORDICRST LL_AHB2_GRP1_ReleaseReset * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_AHB2_GRP1_PERIPH_DCMI * @arg @ref LL_AHB2_GRP1_PERIPH_HSEM (*) * @arg @ref LL_AHB2_GRP1_PERIPH_CRYP (*) * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*) * @arg @ref LL_AHB2_GRP1_PERIPH_RNG * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2 - * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_FMAC (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_CORDIC (*) * * (*) value not defined in all devices. * @retval None @@ -1212,21 +1266,25 @@ __STATIC_INLINE void LL_AHB2_GRP1_ReleaseReset(uint32_t Periphs) /** * @brief Enable AHB2 peripherals clock during Low Power (Sleep) mode. * @rmtoll AHB2LPENR DCMILPEN LL_AHB2_GRP1_EnableClockSleep\n - * AHB2LPENR CRYPLPEN LL_AHB2_GRP1_EnableClockSleep\n (*) - * AHB2LPENR HASHLPEN LL_AHB2_GRP1_EnableClockSleep\n (*) + * AHB2LPENR CRYPLPEN LL_AHB2_GRP1_EnableClockSleep\n (*) + * AHB2LPENR HASHLPEN LL_AHB2_GRP1_EnableClockSleep\n (*) * AHB2LPENR RNGLPEN LL_AHB2_GRP1_EnableClockSleep\n * AHB2LPENR SDMMC2LPEN LL_AHB2_GRP1_EnableClockSleep\n * AHB2LPENR BDMA1LPEN LL_AHB2_GRP1_EnableClockSleep\n (*) + * AHB2LPENR FMACLPEN LL_AHB2_GRP1_EnableClockSleep\n + * AHB2LPENR CORDICLPEN LL_AHB2_GRP1_EnableClockSleep\n * AHB2LPENR D2SRAM1LPEN LL_AHB2_GRP1_EnableClockSleep\n * AHB2LPENR D2SRAM2LPEN LL_AHB2_GRP1_EnableClockSleep\n - * AHB2LPENR D2SRAM3LPEN LL_AHB2_GRP1_EnableClockSleep (*) + * AHB2LPENR D2SRAM3LPEN LL_AHB2_GRP1_EnableClockSleep (*) * @param Periphs This parameter can be a combination of the following values: * @arg @ref LL_AHB2_GRP1_PERIPH_DCMI * @arg @ref LL_AHB2_GRP1_PERIPH_CRYP (*) * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*) * @arg @ref LL_AHB2_GRP1_PERIPH_RNG * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2 - * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_FMAC (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_CORDIC (*) * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM1 * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM2 * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM3 (*) @@ -1260,7 +1318,9 @@ __STATIC_INLINE void LL_AHB2_GRP1_EnableClockSleep(uint32_t Periphs) * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*) * @arg @ref LL_AHB2_GRP1_PERIPH_RNG * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2 - * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_FMAC (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_CORDIC (*) * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM1 * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM2 * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM3 (*) @@ -1291,7 +1351,7 @@ __STATIC_INLINE void LL_AHB2_GRP1_DisableClockSleep(uint32_t Periphs) * AHB4ENR GPIOFEN LL_AHB4_GRP1_EnableClock\n * AHB4ENR GPIOGEN LL_AHB4_GRP1_EnableClock\n * AHB4ENR GPIOHEN LL_AHB4_GRP1_EnableClock\n - * AHB4ENR GPIOIEN LL_AHB4_GRP1_EnableClock\n + * AHB4ENR GPIOIEN LL_AHB4_GRP1_EnableClock\n (*) * AHB4ENR GPIOJEN LL_AHB4_GRP1_EnableClock\n * AHB4ENR GPIOKEN LL_AHB4_GRP1_EnableClock\n * AHB4ENR CRCEN LL_AHB4_GRP1_EnableClock\n (*) @@ -1309,7 +1369,7 @@ __STATIC_INLINE void LL_AHB2_GRP1_DisableClockSleep(uint32_t Periphs) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH - * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI + * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) @@ -1341,7 +1401,7 @@ __STATIC_INLINE void LL_AHB4_GRP1_EnableClock(uint32_t Periphs) * AHB4ENR GPIOFEN LL_AHB4_GRP1_IsEnabledClock\n * AHB4ENR GPIOGEN LL_AHB4_GRP1_IsEnabledClock\n * AHB4ENR GPIOHEN LL_AHB4_GRP1_IsEnabledClock\n - * AHB4ENR GPIOIEN LL_AHB4_GRP1_IsEnabledClock\n + * AHB4ENR GPIOIEN LL_AHB4_GRP1_IsEnabledClock\n (*) * AHB4ENR GPIOJEN LL_AHB4_GRP1_IsEnabledClock\n * AHB4ENR GPIOKEN LL_AHB4_GRP1_IsEnabledClock\n * AHB4ENR CRCEN LL_AHB4_GRP1_IsEnabledClock\n (*) @@ -1359,13 +1419,13 @@ __STATIC_INLINE void LL_AHB4_GRP1_EnableClock(uint32_t Periphs) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH - * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI + * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK - * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) + * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*) - * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*) + * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM * @arg @ref LL_AHB4_GRP1_PERIPH_SRAM4 * @@ -1387,7 +1447,7 @@ __STATIC_INLINE uint32_t LL_AHB4_GRP1_IsEnabledClock(uint32_t Periphs) * AHB4ENR GPIOFEN LL_AHB4_GRP1_DisableClock\n * AHB4ENR GPIOGEN LL_AHB4_GRP1_DisableClock\n * AHB4ENR GPIOHEN LL_AHB4_GRP1_DisableClock\n - * AHB4ENR GPIOIEN LL_AHB4_GRP1_DisableClock\n + * AHB4ENR GPIOIEN LL_AHB4_GRP1_DisableClock\n (*) * AHB4ENR GPIOJEN LL_AHB4_GRP1_DisableClock\n * AHB4ENR GPIOKEN LL_AHB4_GRP1_DisableClock\n * AHB4ENR CRCEN LL_AHB4_GRP1_DisableClock\n (*) @@ -1405,13 +1465,13 @@ __STATIC_INLINE uint32_t LL_AHB4_GRP1_IsEnabledClock(uint32_t Periphs) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH - * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI + * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK - * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) + * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*) - * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*) + * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM * @arg @ref LL_AHB4_GRP1_PERIPH_SRAM4 * @@ -1433,7 +1493,7 @@ __STATIC_INLINE void LL_AHB4_GRP1_DisableClock(uint32_t Periphs) * AHB4RSTR GPIOFRST LL_AHB4_GRP1_ForceReset\n * AHB4RSTR GPIOGRST LL_AHB4_GRP1_ForceReset\n * AHB4RSTR GPIOHRST LL_AHB4_GRP1_ForceReset\n - * AHB4RSTR GPIOIRST LL_AHB4_GRP1_ForceReset\n + * AHB4RSTR GPIOIRST LL_AHB4_GRP1_ForceReset\n (*) * AHB4RSTR GPIOJRST LL_AHB4_GRP1_ForceReset\n * AHB4RSTR GPIOKRST LL_AHB4_GRP1_ForceReset\n * AHB4RSTR CRCRST LL_AHB4_GRP1_ForceReset\n (*) @@ -1449,13 +1509,13 @@ __STATIC_INLINE void LL_AHB4_GRP1_DisableClock(uint32_t Periphs) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH - * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI + * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK - * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) + * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*) - * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*) + * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*) * * (*) value not defined in all devices. * @retval None @@ -1475,7 +1535,7 @@ __STATIC_INLINE void LL_AHB4_GRP1_ForceReset(uint32_t Periphs) * AHB4RSTR GPIOFRST LL_AHB4_GRP1_ReleaseReset\n * AHB4RSTR GPIOGRST LL_AHB4_GRP1_ReleaseReset\n * AHB4RSTR GPIOHRST LL_AHB4_GRP1_ReleaseReset\n - * AHB4RSTR GPIOIRST LL_AHB4_GRP1_ReleaseReset\n + * AHB4RSTR GPIOIRST LL_AHB4_GRP1_ReleaseReset\n (*) * AHB4RSTR GPIOJRST LL_AHB4_GRP1_ReleaseReset\n * AHB4RSTR GPIOKRST LL_AHB4_GRP1_ReleaseReset\n * AHB4RSTR CRCRST LL_AHB4_GRP1_ReleaseReset\n (*) @@ -1491,13 +1551,13 @@ __STATIC_INLINE void LL_AHB4_GRP1_ForceReset(uint32_t Periphs) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH - * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI + * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK - * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) + * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*) - * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*) + * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*) * * (*) value not defined in all devices. * @retval None @@ -1517,7 +1577,7 @@ __STATIC_INLINE void LL_AHB4_GRP1_ReleaseReset(uint32_t Periphs) * AHB4LPENR GPIOFLPEN LL_AHB4_GRP1_EnableClockSleep\n * AHB4LPENR GPIOGLPEN LL_AHB4_GRP1_EnableClockSleep\n * AHB4LPENR GPIOHLPEN LL_AHB4_GRP1_EnableClockSleep\n - * AHB4LPENR GPIOILPEN LL_AHB4_GRP1_EnableClockSleep\n + * AHB4LPENR GPIOILPEN LL_AHB4_GRP1_EnableClockSleep\n (*) * AHB4LPENR GPIOJLPEN LL_AHB4_GRP1_EnableClockSleep\n * AHB4LPENR GPIOKLPEN LL_AHB4_GRP1_EnableClockSleep\n * AHB4LPENR CRCLPEN LL_AHB4_GRP1_EnableClockSleep\n (*) @@ -1534,10 +1594,10 @@ __STATIC_INLINE void LL_AHB4_GRP1_ReleaseReset(uint32_t Periphs) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH - * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI + * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK - * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) + * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM @@ -1563,7 +1623,7 @@ __STATIC_INLINE void LL_AHB4_GRP1_EnableClockSleep(uint32_t Periphs) * AHB4LPENR GPIOFLPEN LL_AHB4_GRP1_DisableClockSleep\n * AHB4LPENR GPIOGLPEN LL_AHB4_GRP1_DisableClockSleep\n * AHB4LPENR GPIOHLPEN LL_AHB4_GRP1_DisableClockSleep\n - * AHB4LPENR GPIOILPEN LL_AHB4_GRP1_DisableClockSleep\n + * AHB4LPENR GPIOILPEN LL_AHB4_GRP1_DisableClockSleep\n (*) * AHB4LPENR GPIOJLPEN LL_AHB4_GRP1_DisableClockSleep\n * AHB4LPENR GPIOKLPEN LL_AHB4_GRP1_DisableClockSleep\n * AHB4LPENR CRCLPEN LL_AHB4_GRP1_DisableClockSleep\n (*) @@ -1580,10 +1640,10 @@ __STATIC_INLINE void LL_AHB4_GRP1_EnableClockSleep(uint32_t Periphs) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH - * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI + * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK - * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) + * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM @@ -1764,6 +1824,7 @@ __STATIC_INLINE void LL_APB3_GRP1_DisableClockSleep(uint32_t Periphs) * APB1LENR I2C1EN LL_APB1_GRP1_EnableClock\n * APB1LENR I2C2EN LL_APB1_GRP1_EnableClock\n * APB1LENR I2C3EN LL_APB1_GRP1_EnableClock\n + * APB1LENR I2C5EN LL_APB1_GRP1_EnableClock\n (*) * APB1LENR CECEN LL_APB1_GRP1_EnableClock\n * APB1LENR DAC12EN LL_APB1_GRP1_EnableClock\n * APB1LENR UART7EN LL_APB1_GRP1_EnableClock\n @@ -1790,6 +1851,7 @@ __STATIC_INLINE void LL_APB3_GRP1_DisableClockSleep(uint32_t Periphs) * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 * @arg @ref LL_APB1_GRP1_PERIPH_I2C3 + * @arg @ref LL_APB1_GRP1_PERIPH_I2C5 (*) * @arg @ref LL_APB1_GRP1_PERIPH_CEC * @arg @ref LL_APB1_GRP1_PERIPH_DAC12 * @arg @ref LL_APB1_GRP1_PERIPH_UART7 @@ -1830,6 +1892,7 @@ __STATIC_INLINE void LL_APB1_GRP1_EnableClock(uint32_t Periphs) * APB1LENR I2C1EN LL_APB1_GRP1_IsEnabledClock\n * APB1LENR I2C2EN LL_APB1_GRP1_IsEnabledClock\n * APB1LENR I2C3EN LL_APB1_GRP1_IsEnabledClock\n + * APB1LENR I2C5EN LL_APB1_GRP1_IsEnabledClock\n (*) * APB1LENR CECEN LL_APB1_GRP1_IsEnabledClock\n * APB1LENR DAC12EN LL_APB1_GRP1_IsEnabledClock\n * APB1LENR UART7EN LL_APB1_GRP1_IsEnabledClock\n @@ -1856,6 +1919,7 @@ __STATIC_INLINE void LL_APB1_GRP1_EnableClock(uint32_t Periphs) * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 * @arg @ref LL_APB1_GRP1_PERIPH_I2C3 + * @arg @ref LL_APB1_GRP1_PERIPH_I2C5 (*) * @arg @ref LL_APB1_GRP1_PERIPH_CEC * @arg @ref LL_APB1_GRP1_PERIPH_DAC12 * @arg @ref LL_APB1_GRP1_PERIPH_UART7 @@ -1892,6 +1956,7 @@ __STATIC_INLINE uint32_t LL_APB1_GRP1_IsEnabledClock(uint32_t Periphs) * APB1LENR I2C1EN LL_APB1_GRP1_DisableClock\n * APB1LENR I2C2EN LL_APB1_GRP1_DisableClock\n * APB1LENR I2C3EN LL_APB1_GRP1_DisableClock\n + * APB1LENR I2C5EN LL_APB1_GRP1_DisableClock\n (*) * APB1LENR CECEN LL_APB1_GRP1_DisableClock\n * APB1LENR DAC12EN LL_APB1_GRP1_DisableClock\n * APB1LENR UART7EN LL_APB1_GRP1_DisableClock\n @@ -1918,6 +1983,7 @@ __STATIC_INLINE uint32_t LL_APB1_GRP1_IsEnabledClock(uint32_t Periphs) * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 * @arg @ref LL_APB1_GRP1_PERIPH_I2C3 + * @arg @ref LL_APB1_GRP1_PERIPH_I2C5 (*) * @arg @ref LL_APB1_GRP1_PERIPH_CEC * @arg @ref LL_APB1_GRP1_PERIPH_DAC12 * @arg @ref LL_APB1_GRP1_PERIPH_UART7 @@ -1953,6 +2019,7 @@ __STATIC_INLINE void LL_APB1_GRP1_DisableClock(uint32_t Periphs) * APB1LRSTR I2C1RST LL_APB1_GRP1_ForceReset\n * APB1LRSTR I2C2RST LL_APB1_GRP1_ForceReset\n * APB1LRSTR I2C3RST LL_APB1_GRP1_ForceReset\n + * APB1LRSTR I2C5RST LL_APB1_GRP5_ForceReset\n (*) * APB1LRSTR CECRST LL_APB1_GRP1_ForceReset\n * APB1LRSTR DAC12RST LL_APB1_GRP1_ForceReset\n * APB1LRSTR UART7RST LL_APB1_GRP1_ForceReset\n @@ -1978,10 +2045,13 @@ __STATIC_INLINE void LL_APB1_GRP1_DisableClock(uint32_t Periphs) * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 * @arg @ref LL_APB1_GRP1_PERIPH_I2C3 + * @arg @ref LL_APB1_GRP1_PERIPH_I2C5 (*) * @arg @ref LL_APB1_GRP1_PERIPH_CEC * @arg @ref LL_APB1_GRP1_PERIPH_DAC12 * @arg @ref LL_APB1_GRP1_PERIPH_UART7 * @arg @ref LL_APB1_GRP1_PERIPH_UART8 + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_APB1_GRP1_ForceReset(uint32_t Periphs) @@ -2011,6 +2081,7 @@ __STATIC_INLINE void LL_APB1_GRP1_ForceReset(uint32_t Periphs) * APB1LRSTR I2C1RST LL_APB1_GRP1_ReleaseReset\n * APB1LRSTR I2C2RST LL_APB1_GRP1_ReleaseReset\n * APB1LRSTR I2C3RST LL_APB1_GRP1_ReleaseReset\n + * APB1LRSTR I2C5RST LL_APB1_GRP1_ReleaseReset\n (*) * APB1LRSTR CECRST LL_APB1_GRP1_ReleaseReset\n * APB1LRSTR DAC12RST LL_APB1_GRP1_ReleaseReset\n * APB1LRSTR UART7RST LL_APB1_GRP1_ReleaseReset\n @@ -2036,10 +2107,13 @@ __STATIC_INLINE void LL_APB1_GRP1_ForceReset(uint32_t Periphs) * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 * @arg @ref LL_APB1_GRP1_PERIPH_I2C3 + * @arg @ref LL_APB1_GRP1_PERIPH_I2C5 (*) * @arg @ref LL_APB1_GRP1_PERIPH_CEC * @arg @ref LL_APB1_GRP1_PERIPH_DAC12 * @arg @ref LL_APB1_GRP1_PERIPH_UART7 * @arg @ref LL_APB1_GRP1_PERIPH_UART8 + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_APB1_GRP1_ReleaseReset(uint32_t Periphs) @@ -2070,6 +2144,7 @@ __STATIC_INLINE void LL_APB1_GRP1_ReleaseReset(uint32_t Periphs) * APB1LLPENR I2C1LPEN LL_APB1_GRP1_EnableClockSleep\n * APB1LLPENR I2C2LPEN LL_APB1_GRP1_EnableClockSleep\n * APB1LLPENR I2C3LPEN LL_APB1_GRP1_EnableClockSleep\n + * APB1LLPENR I2C5LPEN LL_APB1_GRP1_EnableClockSleep\n (*) * APB1LLPENR CECLPEN LL_APB1_GRP1_EnableClockSleep\n * APB1LLPENR DAC12LPEN LL_APB1_GRP1_EnableClockSleep\n * APB1LLPENR UART7LPEN LL_APB1_GRP1_EnableClockSleep\n @@ -2096,6 +2171,7 @@ __STATIC_INLINE void LL_APB1_GRP1_ReleaseReset(uint32_t Periphs) * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 * @arg @ref LL_APB1_GRP1_PERIPH_I2C3 + * @arg @ref LL_APB1_GRP1_PERIPH_I2C5 (*) * @arg @ref LL_APB1_GRP1_PERIPH_CEC * @arg @ref LL_APB1_GRP1_PERIPH_DAC12 * @arg @ref LL_APB1_GRP1_PERIPH_UART7 @@ -2136,6 +2212,7 @@ __STATIC_INLINE void LL_APB1_GRP1_EnableClockSleep(uint32_t Periphs) * APB1LLPENR I2C1LPEN LL_APB1_GRP1_DisableClockSleep\n * APB1LLPENR I2C2LPEN LL_APB1_GRP1_DisableClockSleep\n * APB1LLPENR I2C3LPEN LL_APB1_GRP1_DisableClockSleep\n + * APB1LLPENR I2C5LPEN LL_APB1_GRP1_DisableClockSleep\n (*) * APB1LLPENR CECLPEN LL_APB1_GRP1_DisableClockSleep\n * APB1LLPENR DAC12LPEN LL_APB1_GRP1_DisableClockSleep\n * APB1LLPENR UART7LPEN LL_APB1_GRP1_DisableClockSleep\n @@ -2162,6 +2239,7 @@ __STATIC_INLINE void LL_APB1_GRP1_EnableClockSleep(uint32_t Periphs) * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 * @arg @ref LL_APB1_GRP1_PERIPH_I2C3 + * @arg @ref LL_APB1_GRP1_PERIPH_I2C5 (*) * @arg @ref LL_APB1_GRP1_PERIPH_CEC * @arg @ref LL_APB1_GRP1_PERIPH_DAC12 * @arg @ref LL_APB1_GRP1_PERIPH_UART7 @@ -2188,6 +2266,10 @@ __STATIC_INLINE void LL_APB1_GRP1_DisableClockSleep(uint32_t Periphs) * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN + * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*) + * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_APB1_GRP2_EnableClock(uint32_t Periphs) @@ -2212,6 +2294,10 @@ __STATIC_INLINE void LL_APB1_GRP2_EnableClock(uint32_t Periphs) * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN + * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*) + * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*) + * + * (*) value not defined in all devices. * @retval uint32_t */ __STATIC_INLINE uint32_t LL_APB1_GRP2_IsEnabledClock(uint32_t Periphs) @@ -2232,6 +2318,10 @@ __STATIC_INLINE uint32_t LL_APB1_GRP2_IsEnabledClock(uint32_t Periphs) * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN + * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*) + * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_APB1_GRP2_DisableClock(uint32_t Periphs) @@ -2252,6 +2342,10 @@ __STATIC_INLINE void LL_APB1_GRP2_DisableClock(uint32_t Periphs) * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN + * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*) + * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_APB1_GRP2_ForceReset(uint32_t Periphs) @@ -2272,6 +2366,10 @@ __STATIC_INLINE void LL_APB1_GRP2_ForceReset(uint32_t Periphs) * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN + * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*) + * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_APB1_GRP2_ReleaseReset(uint32_t Periphs) @@ -2292,6 +2390,10 @@ __STATIC_INLINE void LL_APB1_GRP2_ReleaseReset(uint32_t Periphs) * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN + * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*) + * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_APB1_GRP2_EnableClockSleep(uint32_t Periphs) @@ -2316,6 +2418,10 @@ __STATIC_INLINE void LL_APB1_GRP2_EnableClockSleep(uint32_t Periphs) * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN + * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*) + * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_APB1_GRP2_DisableClockSleep(uint32_t Periphs) @@ -2364,7 +2470,7 @@ __STATIC_INLINE void LL_APB1_GRP2_DisableClockSleep(uint32_t Periphs) * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 * @arg @ref LL_APB2_GRP1_PERIPH_SPI5 * @arg @ref LL_APB2_GRP1_PERIPH_SAI1 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 + * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*) * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1 * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*) @@ -2414,8 +2520,8 @@ __STATIC_INLINE void LL_APB2_GRP1_EnableClock(uint32_t Periphs) * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 * @arg @ref LL_APB2_GRP1_PERIPH_SPI5 * @arg @ref LL_APB2_GRP1_PERIPH_SAI1 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1 * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*) * @@ -2460,8 +2566,8 @@ __STATIC_INLINE uint32_t LL_APB2_GRP1_IsEnabledClock(uint32_t Periphs) * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 * @arg @ref LL_APB2_GRP1_PERIPH_SPI5 * @arg @ref LL_APB2_GRP1_PERIPH_SAI1 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1 * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*) * @@ -2506,10 +2612,10 @@ __STATIC_INLINE void LL_APB2_GRP1_DisableClock(uint32_t Periphs) * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 * @arg @ref LL_APB2_GRP1_PERIPH_SPI5 * @arg @ref LL_APB2_GRP1_PERIPH_SAI1 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1 - * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*) + * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*) * * (*) value not defined in all devices. * @retval None @@ -2552,10 +2658,10 @@ __STATIC_INLINE void LL_APB2_GRP1_ForceReset(uint32_t Periphs) * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 * @arg @ref LL_APB2_GRP1_PERIPH_SPI5 * @arg @ref LL_APB2_GRP1_PERIPH_SAI1 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1 - * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*) + * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*) * * (*) value not defined in all devices. * @retval None @@ -2598,10 +2704,12 @@ __STATIC_INLINE void LL_APB2_GRP1_ReleaseReset(uint32_t Periphs) * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 * @arg @ref LL_APB2_GRP1_PERIPH_SPI5 * @arg @ref LL_APB2_GRP1_PERIPH_SAI1 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1 * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_APB2_GRP1_EnableClockSleep(uint32_t Periphs) @@ -2646,10 +2754,12 @@ __STATIC_INLINE void LL_APB2_GRP1_EnableClockSleep(uint32_t Periphs) * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 * @arg @ref LL_APB2_GRP1_PERIPH_SPI5 * @arg @ref LL_APB2_GRP1_PERIPH_SAI1 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1 * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_APB2_GRP1_DisableClockSleep(uint32_t Periphs) @@ -2695,7 +2805,7 @@ __STATIC_INLINE void LL_APB2_GRP1_DisableClockSleep(uint32_t Periphs) * @arg @ref LL_APB4_GRP1_PERIPH_COMP12 * @arg @ref LL_APB4_GRP1_PERIPH_VREF * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB - * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) + * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) * @arg @ref LL_APB4_GRP1_PERIPH_DTS (*) * @arg @ref LL_APB4_GRP1_PERIPH_DFSDM2 (*) * @@ -2741,7 +2851,7 @@ __STATIC_INLINE void LL_APB4_GRP1_EnableClock(uint32_t Periphs) * @arg @ref LL_APB4_GRP1_PERIPH_COMP12 * @arg @ref LL_APB4_GRP1_PERIPH_VREF * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB - * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) + * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) * @arg @ref LL_APB4_GRP1_PERIPH_DTS (*) * @arg @ref LL_APB4_GRP1_PERIPH_DFSDM2 (*) * @@ -2783,7 +2893,7 @@ __STATIC_INLINE uint32_t LL_APB4_GRP1_IsEnabledClock(uint32_t Periphs) * @arg @ref LL_APB4_GRP1_PERIPH_COMP12 * @arg @ref LL_APB4_GRP1_PERIPH_VREF * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB - * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) + * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) * @arg @ref LL_APB4_GRP1_PERIPH_DTS (*) * @arg @ref LL_APB4_GRP1_PERIPH_DFSDM2 (*) * @@ -2810,7 +2920,7 @@ __STATIC_INLINE void LL_APB4_GRP1_DisableClock(uint32_t Periphs) * APB4RSTR VREFRST LL_APB4_GRP1_ForceReset\n * APB4RSTR SAI4RST LL_APB4_GRP1_ForceReset\n (*) * APB4RSTR DTSRST LL_APB4_GRP1_ForceReset\n (*) - * APB4RSTR DFSDM2RST LL_APB4_GRP1_ForceReset (*) + * APB4RSTR DFSDM2RST LL_APB4_GRP1_ForceReset (*) * @param Periphs This parameter can be a combination of the following values: * @arg @ref LL_APB4_GRP1_PERIPH_SYSCFG * @arg @ref LL_APB4_GRP1_PERIPH_LPUART1 @@ -2823,7 +2933,7 @@ __STATIC_INLINE void LL_APB4_GRP1_DisableClock(uint32_t Periphs) * @arg @ref LL_APB4_GRP1_PERIPH_DAC2 (*) * @arg @ref LL_APB4_GRP1_PERIPH_COMP12 * @arg @ref LL_APB4_GRP1_PERIPH_VREF - * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) + * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) * @arg @ref LL_APB4_GRP1_PERIPH_DTS (*) * @arg @ref LL_APB4_GRP1_PERIPH_DFSDM2 (*) * @@ -2863,7 +2973,7 @@ __STATIC_INLINE void LL_APB4_GRP1_ForceReset(uint32_t Periphs) * @arg @ref LL_APB4_GRP1_PERIPH_DAC2 (*) * @arg @ref LL_APB4_GRP1_PERIPH_COMP12 * @arg @ref LL_APB4_GRP1_PERIPH_VREF - * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) + * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) * @arg @ref LL_APB4_GRP1_PERIPH_DTS (*) * @arg @ref LL_APB4_GRP1_PERIPH_DFSDM2 (*) * @@ -2905,7 +3015,7 @@ __STATIC_INLINE void LL_APB4_GRP1_ReleaseReset(uint32_t Periphs) * @arg @ref LL_APB4_GRP1_PERIPH_COMP12 * @arg @ref LL_APB4_GRP1_PERIPH_VREF * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB - * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) + * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) * @arg @ref LL_APB4_GRP1_PERIPH_DTS (*) * @arg @ref LL_APB4_GRP1_PERIPH_DFSDM2 (*) * @@ -2951,7 +3061,7 @@ __STATIC_INLINE void LL_APB4_GRP1_EnableClockSleep(uint32_t Periphs) * @arg @ref LL_APB4_GRP1_PERIPH_COMP12 * @arg @ref LL_APB4_GRP1_PERIPH_VREF * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB - * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) + * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) * @arg @ref LL_APB4_GRP1_PERIPH_DTS (*) * @arg @ref LL_APB4_GRP1_PERIPH_DFSDM2 (*) * @@ -2967,7 +3077,7 @@ __STATIC_INLINE void LL_APB4_GRP1_DisableClockSleep(uint32_t Periphs) * @} */ -/** @defgroup BUS_LL_EF_CLKAM +/** @defgroup BUS_LL_EF_CLKAM CLKAM * @{ */ @@ -2994,6 +3104,7 @@ __STATIC_INLINE void LL_APB4_GRP1_DisableClockSleep(uint32_t Periphs) * D3AMR / SRDAMR SRAM4 LL_CLKAM_Enable * @param Periphs This parameter can be a combination of the following values: * @arg @ref LL_CLKAM_PERIPH_BDMA + * @arg @ref LL_CLKAM_PERIPH_GPIO (*) * @arg @ref LL_CLKAM_PERIPH_LPUART1 * @arg @ref LL_CLKAM_PERIPH_SPI6 * @arg @ref LL_CLKAM_PERIPH_I2C4 @@ -3005,9 +3116,9 @@ __STATIC_INLINE void LL_APB4_GRP1_DisableClockSleep(uint32_t Periphs) * @arg @ref LL_CLKAM_PERIPH_COMP12 * @arg @ref LL_CLKAM_PERIPH_VREF * @arg @ref LL_CLKAM_PERIPH_RTC - * @arg @ref LL_CLKAM_PERIPH_CRC - * @arg @ref LL_CLKAM_PERIPH_SAI4 (*) - * @arg @ref LL_CLKAM_PERIPH_ADC3 (*) + * @arg @ref LL_CLKAM_PERIPH_CRC (*) + * @arg @ref LL_CLKAM_PERIPH_SAI4 (*) + * @arg @ref LL_CLKAM_PERIPH_ADC3 (*) * @arg @ref LL_CLKAM_PERIPH_DTS (*) * @arg @ref LL_CLKAM_PERIPH_DFSDM2 (*) * @arg @ref LL_CLKAM_PERIPH_BKPRAM @@ -3055,6 +3166,7 @@ __STATIC_INLINE void LL_CLKAM_Enable(uint32_t Periphs) * D3AMR / SRDAMR SRAM4 LL_CLKAM_Disable * @param Periphs This parameter can be a combination of the following values: * @arg @ref LL_CLKAM_PERIPH_BDMA + * @arg @ref LL_CLKAM_PERIPH_GPIO (*) * @arg @ref LL_CLKAM_PERIPH_LPUART1 * @arg @ref LL_CLKAM_PERIPH_SPI6 * @arg @ref LL_CLKAM_PERIPH_I2C4 @@ -3066,10 +3178,10 @@ __STATIC_INLINE void LL_CLKAM_Enable(uint32_t Periphs) * @arg @ref LL_CLKAM_PERIPH_COMP12 * @arg @ref LL_CLKAM_PERIPH_VREF * @arg @ref LL_CLKAM_PERIPH_RTC - * @arg @ref LL_CLKAM_PERIPH_CRC + * @arg @ref LL_CLKAM_PERIPH_CRC (*) * @arg @ref LL_CLKAM_PERIPH_SAI4 (*) * @arg @ref LL_CLKAM_PERIPH_ADC3 (*) - * @arg @ref LL_CLKAM_PERIPH_DTS (*) + * @arg @ref LL_CLKAM_PERIPH_DTS (*) * @arg @ref LL_CLKAM_PERIPH_DFSDM2 (*) * @arg @ref LL_CLKAM_PERIPH_BKPRAM * @arg @ref LL_CLKAM_PERIPH_SRAM4 @@ -3086,11 +3198,17 @@ __STATIC_INLINE void LL_CLKAM_Disable(uint32_t Periphs) #endif /* RCC_D3AMR_BDMAAMEN */ } -#if defined(RCC_CKGAENR_AXICKG) /** * @} */ +/** @defgroup BUS_LL_EF_CKGA CKGA + * @{ + */ + +#if defined(RCC_CKGAENR_AXICKG) + + /** * @brief Enable clock gating for AXI bus peripherals. * @rmtoll @@ -3105,15 +3223,10 @@ __STATIC_INLINE void LL_CKGA_Enable(uint32_t Periphs) tmpreg = READ_BIT(RCC->CKGAENR, Periphs); (void)tmpreg; } -/** - * @} - */ + #endif /* RCC_CKGAENR_AXICKG */ #if defined(RCC_CKGAENR_AXICKG) -/** - * @} - */ /** * @brief Disable clock gating for AXI bus peripherals. @@ -3125,14 +3238,15 @@ __STATIC_INLINE void LL_CKGA_Disable(uint32_t Periphs) { CLEAR_BIT(RCC->CKGAENR, Periphs); } + +#endif /* RCC_CKGAENR_AXICKG */ + /** * @} */ -#endif /* RCC_CKGAENR_AXICKG */ - #if defined(DUAL_CORE) -/** @defgroup BUS_LL_EF_AHB3 AHB3 +/** @addtogroup BUS_LL_EF_AHB3 AHB3 * @{ */ @@ -3158,7 +3272,7 @@ __STATIC_INLINE void LL_CKGA_Disable(uint32_t Periphs) * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI1 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI2 (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_IOMNGR (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_OCTOSPIM (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*) @@ -3198,7 +3312,7 @@ __STATIC_INLINE void LL_C1_AHB3_GRP1_EnableClock(uint32_t Periphs) * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI1 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI2 (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_IOMNGR (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_OCTOSPIM (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*) @@ -3229,12 +3343,12 @@ __STATIC_INLINE uint32_t LL_C1_AHB3_GRP1_IsEnabledClock(uint32_t Periphs) * @param Periphs This parameter can be a combination of the following values: * @arg @ref LL_AHB3_GRP1_PERIPH_MDMA * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D - * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC + * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC (*) * @arg @ref LL_AHB3_GRP1_PERIPH_FMC * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI1 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI2 (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_IOMNGR (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_OCTOSPIM (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*) @@ -3269,15 +3383,15 @@ __STATIC_INLINE void LL_C1_AHB3_GRP1_DisableClock(uint32_t Periphs) * AHB3LPENR AXISRAMLPEN LL_C1_AHB3_GRP1_EnableClockSleep * @param Periphs This parameter can be a combination of the following values: * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D - * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC + * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC (*) * @arg @ref LL_AHB3_GRP1_PERIPH_FMC * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI1 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI2 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OCTOSPIM (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*) * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1 * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM1 @@ -3318,15 +3432,15 @@ __STATIC_INLINE void LL_C1_AHB3_GRP1_EnableClockSleep(uint32_t Periphs) * AHB3LPENR AXISRAMLPEN LL_C1_AHB3_GRP1_DisableClockSleep * @param Periphs This parameter can be a combination of the following values: * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D - * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC + * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC (*) * @arg @ref LL_AHB3_GRP1_PERIPH_FMC * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI1 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI2 (*) * @arg @ref LL_AHB3_GRP1_PERIPH_OCTOSPIM (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*) - * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*) * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1 * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM1 @@ -3346,7 +3460,7 @@ __STATIC_INLINE void LL_C1_AHB3_GRP1_DisableClockSleep(uint32_t Periphs) * @} */ -/** @defgroup BUS_LL_EF_AHB1 AHB1 +/** @addtogroup BUS_LL_EF_AHB1 AHB1 * @{ */ @@ -3368,8 +3482,8 @@ __STATIC_INLINE void LL_C1_AHB3_GRP1_DisableClockSleep(uint32_t Periphs) * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1 * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2 * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12 - * @arg @ref LL_AHB1_GRP1_PERIPH_CRC (*) - * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_CRC (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*) * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*) * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX (*) * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX (*) @@ -3408,8 +3522,8 @@ __STATIC_INLINE void LL_C1_AHB1_GRP1_EnableClock(uint32_t Periphs) * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1 * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2 * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12 - * @arg @ref LL_AHB1_GRP1_PERIPH_CRC (*) - * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_CRC (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*) * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*) * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX (*) * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX (*) @@ -3444,8 +3558,8 @@ __STATIC_INLINE uint32_t LL_C1_AHB1_GRP1_IsEnabledClock(uint32_t Periphs) * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1 * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2 * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12 - * @arg @ref LL_AHB1_GRP1_PERIPH_CRC (*) - * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_CRC (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*) * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*) * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX (*) * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX (*) @@ -3480,8 +3594,8 @@ __STATIC_INLINE void LL_C1_AHB1_GRP1_DisableClock(uint32_t Periphs) * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1 * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2 * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12 - * @arg @ref LL_AHB1_GRP1_PERIPH_CRC (*) - * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_CRC (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*) * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*) * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX (*) * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX (*) @@ -3520,8 +3634,8 @@ __STATIC_INLINE void LL_C1_AHB1_GRP1_EnableClockSleep(uint32_t Periphs) * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1 * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2 * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12 - * @arg @ref LL_AHB1_GRP1_PERIPH_CRC (*) - * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_CRC (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*) * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*) * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX (*) * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX (*) @@ -3542,7 +3656,7 @@ __STATIC_INLINE void LL_C1_AHB1_GRP1_DisableClockSleep(uint32_t Periphs) * @} */ -/** @defgroup BUS_LL_EF_AHB2 AHB2 +/** @addtogroup BUS_LL_EF_AHB2 AHB2 * @{ */ @@ -3564,7 +3678,7 @@ __STATIC_INLINE void LL_C1_AHB1_GRP1_DisableClockSleep(uint32_t Periphs) * @arg @ref LL_AHB2_GRP1_PERIPH_CRYP (*) * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*) * @arg @ref LL_AHB2_GRP1_PERIPH_RNG - * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*) * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2 * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM1 * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM2 @@ -3600,7 +3714,7 @@ __STATIC_INLINE void LL_C1_AHB2_GRP1_EnableClock(uint32_t Periphs) * @arg @ref LL_AHB2_GRP1_PERIPH_CRYP (*) * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*) * @arg @ref LL_AHB2_GRP1_PERIPH_RNG - * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*) * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2 * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM1 * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM2 @@ -3632,7 +3746,7 @@ __STATIC_INLINE uint32_t LL_C1_AHB2_GRP1_IsEnabledClock(uint32_t Periphs) * @arg @ref LL_AHB2_GRP1_PERIPH_CRYP (*) * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*) * @arg @ref LL_AHB2_GRP1_PERIPH_RNG - * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*) * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2 * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM1 * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM2 @@ -3653,7 +3767,7 @@ __STATIC_INLINE void LL_C1_AHB2_GRP1_DisableClock(uint32_t Periphs) * AHB2LPENR HASHLPEN LL_C1_AHB2_GRP1_EnableClockSleep\n (*) * AHB2LPENR RNGLPEN LL_C1_AHB2_GRP1_EnableClockSleep\n * AHB2LPENR SDMMC2LPEN LL_C1_AHB2_GRP1_EnableClockSleep\n - * AHB2LPENR SDMMC2LPEN LL_C1_AHB2_GRP1_EnableClockSleep\n + * AHB2LPENR D2SRAM1LPEN LL_C1_AHB2_GRP1_EnableClockSleep\n * AHB2LPENR BDAM1LPEN LL_C1_AHB2_GRP1_EnableClockSleep\n (*) * AHB2LPENR D2SRAM2LPEN LL_C1_AHB2_GRP1_EnableClockSleep\n * AHB2LPENR D2SRAM3LPEN LL_C1_AHB2_GRP1_EnableClockSleep (*) @@ -3663,7 +3777,7 @@ __STATIC_INLINE void LL_C1_AHB2_GRP1_DisableClock(uint32_t Periphs) * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*) * @arg @ref LL_AHB2_GRP1_PERIPH_RNG * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2 - * @arg @ref LL_AHB2_GRP1_PERIPH_BDAM1 (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*) * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM1 * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM2 * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM3 (*) @@ -3697,7 +3811,7 @@ __STATIC_INLINE void LL_C1_AHB2_GRP1_EnableClockSleep(uint32_t Periphs) * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*) * @arg @ref LL_AHB2_GRP1_PERIPH_RNG * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2 - * @arg @ref LL_AHB2_GRP1_PERIPH_BDAM1 (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*) * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM1 * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM2 * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM3 (*) @@ -3714,7 +3828,7 @@ __STATIC_INLINE void LL_C1_AHB2_GRP1_DisableClockSleep(uint32_t Periphs) * @} */ -/** @defgroup BUS_LL_EF_AHB4 AHB4 +/** @addtogroup BUS_LL_EF_AHB4 AHB4 * @{ */ @@ -3746,13 +3860,13 @@ __STATIC_INLINE void LL_C1_AHB2_GRP1_DisableClockSleep(uint32_t Periphs) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH - * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI + * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK - * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) + * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*) - * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*) + * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM * @arg @ref LL_AHB4_GRP1_PERIPH_SRAM4 * @@ -3796,13 +3910,13 @@ __STATIC_INLINE void LL_C1_AHB4_GRP1_EnableClock(uint32_t Periphs) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH - * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI + * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK - * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) + * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*) - * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*) + * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM * @arg @ref LL_AHB4_GRP1_PERIPH_SRAM4 * @@ -3842,13 +3956,13 @@ __STATIC_INLINE uint32_t LL_C1_AHB4_GRP1_IsEnabledClock(uint32_t Periphs) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH - * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI + * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK - * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) + * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*) - * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*) + * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM * @arg @ref LL_AHB4_GRP1_PERIPH_SRAM4 * @@ -3887,10 +4001,10 @@ __STATIC_INLINE void LL_C1_AHB4_GRP1_DisableClock(uint32_t Periphs) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH - * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI + * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK - * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) + * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM @@ -3933,10 +4047,10 @@ __STATIC_INLINE void LL_C1_AHB4_GRP1_EnableClockSleep(uint32_t Periphs) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH - * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI + * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK - * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) + * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM @@ -3952,7 +4066,7 @@ __STATIC_INLINE void LL_C1_AHB4_GRP1_DisableClockSleep(uint32_t Periphs) * @} */ -/** @defgroup BUS_LL_EF_APB3 APB3 +/** @addtogroup BUS_LL_EF_APB3 APB3 * @{ */ @@ -3963,7 +4077,7 @@ __STATIC_INLINE void LL_C1_AHB4_GRP1_DisableClockSleep(uint32_t Periphs) * APB3ENR WWDG1EN LL_C1_APB3_GRP1_EnableClock * @param Periphs This parameter can be a combination of the following values: * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*) - * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*) + * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*) * @arg @ref LL_APB3_GRP1_PERIPH_WWDG1 * * (*) value not defined in all devices. @@ -3985,7 +4099,7 @@ __STATIC_INLINE void LL_C1_APB3_GRP1_EnableClock(uint32_t Periphs) * APB3ENR WWDG1EN LL_C1_APB3_GRP1_IsEnabledClock * @param Periphs This parameter can be a combination of the following values: * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*) - * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*) + * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*) * @arg @ref LL_APB3_GRP1_PERIPH_WWDG1 * * (*) value not defined in all devices. @@ -4003,7 +4117,8 @@ __STATIC_INLINE uint32_t LL_C1_APB3_GRP1_IsEnabledClock(uint32_t Periphs) * APB3ENR WWDG1EN LL_C1_APB3_GRP1_DisableClock * @param Periphs This parameter can be a combination of the following values: * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*) - * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*) + + * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*) * @arg @ref LL_APB3_GRP1_PERIPH_WWDG1 * * (*) value not defined in all devices. @@ -4021,7 +4136,7 @@ __STATIC_INLINE void LL_C1_APB3_GRP1_DisableClock(uint32_t Periphs) * APB3LPENR WWDG1LPEN LL_C1_APB3_GRP1_EnableClockSleep * @param Periphs This parameter can be a combination of the following values: * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*) - * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*) + * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*) * @arg @ref LL_APB3_GRP1_PERIPH_WWDG1 * * (*) value not defined in all devices. @@ -4043,7 +4158,7 @@ __STATIC_INLINE void LL_C1_APB3_GRP1_EnableClockSleep(uint32_t Periphs) * APB3LPENR WWDG1LPEN LL_C1_APB3_GRP1_DisableClockSleep * @param Periphs This parameter can be a combination of the following values: * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*) - * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*) + * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*) * @arg @ref LL_APB3_GRP1_PERIPH_WWDG1 * * (*) value not defined in all devices. @@ -4058,7 +4173,7 @@ __STATIC_INLINE void LL_C1_APB3_GRP1_DisableClockSleep(uint32_t Periphs) * @} */ -/** @defgroup BUS_LL_EF_APB1 APB1 +/** @addtogroup BUS_LL_EF_APB1 APB1 * @{ */ @@ -4393,6 +4508,10 @@ __STATIC_INLINE void LL_C1_APB1_GRP1_DisableClockSleep(uint32_t Periphs) * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN + * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*) + * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_C1_APB1_GRP2_EnableClock(uint32_t Periphs) @@ -4417,6 +4536,10 @@ __STATIC_INLINE void LL_C1_APB1_GRP2_EnableClock(uint32_t Periphs) * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN + * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*) + * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*) + * + * (*) value not defined in all devices. * @retval uint32_t */ __STATIC_INLINE uint32_t LL_C1_APB1_GRP2_IsEnabledClock(uint32_t Periphs) @@ -4437,6 +4560,10 @@ __STATIC_INLINE uint32_t LL_C1_APB1_GRP2_IsEnabledClock(uint32_t Periphs) * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN + * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*) + * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_C1_APB1_GRP2_DisableClock(uint32_t Periphs) @@ -4457,6 +4584,10 @@ __STATIC_INLINE void LL_C1_APB1_GRP2_DisableClock(uint32_t Periphs) * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN + * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*) + * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_C1_APB1_GRP2_EnableClockSleep(uint32_t Periphs) @@ -4481,6 +4612,10 @@ __STATIC_INLINE void LL_C1_APB1_GRP2_EnableClockSleep(uint32_t Periphs) * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN + * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*) + * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_C1_APB1_GRP2_DisableClockSleep(uint32_t Periphs) @@ -4492,7 +4627,7 @@ __STATIC_INLINE void LL_C1_APB1_GRP2_DisableClockSleep(uint32_t Periphs) * @} */ -/** @defgroup BUS_LL_EF_APB2 APB2 +/** @addtogroup BUS_LL_EF_APB2 APB2 * @{ */ @@ -4529,8 +4664,8 @@ __STATIC_INLINE void LL_C1_APB1_GRP2_DisableClockSleep(uint32_t Periphs) * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 * @arg @ref LL_APB2_GRP1_PERIPH_SPI5 * @arg @ref LL_APB2_GRP1_PERIPH_SAI1 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1 * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*) * @@ -4579,8 +4714,8 @@ __STATIC_INLINE void LL_C1_APB2_GRP1_EnableClock(uint32_t Periphs) * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 * @arg @ref LL_APB2_GRP1_PERIPH_SPI5 * @arg @ref LL_APB2_GRP1_PERIPH_SAI1 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1 * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*) * @@ -4615,6 +4750,7 @@ __STATIC_INLINE uint32_t LL_C1_APB2_GRP1_IsEnabledClock(uint32_t Periphs) * @arg @ref LL_APB2_GRP1_PERIPH_TIM1 * @arg @ref LL_APB2_GRP1_PERIPH_TIM8 * @arg @ref LL_APB2_GRP1_PERIPH_USART1 + * @arg @ref LL_APB2_GRP1_PERIPH_USART6 * @arg @ref LL_APB2_GRP1_PERIPH_UART9 (*) * @arg @ref LL_APB2_GRP1_PERIPH_USART10 (*) * @arg @ref LL_APB2_GRP1_PERIPH_SPI1 @@ -4624,8 +4760,8 @@ __STATIC_INLINE uint32_t LL_C1_APB2_GRP1_IsEnabledClock(uint32_t Periphs) * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 * @arg @ref LL_APB2_GRP1_PERIPH_SPI5 * @arg @ref LL_APB2_GRP1_PERIPH_SAI1 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1 * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*) * @@ -4660,6 +4796,7 @@ __STATIC_INLINE void LL_C1_APB2_GRP1_DisableClock(uint32_t Periphs) * @arg @ref LL_APB2_GRP1_PERIPH_TIM1 * @arg @ref LL_APB2_GRP1_PERIPH_TIM8 * @arg @ref LL_APB2_GRP1_PERIPH_USART1 + * @arg @ref LL_APB2_GRP1_PERIPH_USART6 * @arg @ref LL_APB2_GRP1_PERIPH_UART9 (*) * @arg @ref LL_APB2_GRP1_PERIPH_USART10 (*) * @arg @ref LL_APB2_GRP1_PERIPH_SPI1 @@ -4669,8 +4806,8 @@ __STATIC_INLINE void LL_C1_APB2_GRP1_DisableClock(uint32_t Periphs) * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 * @arg @ref LL_APB2_GRP1_PERIPH_SPI5 * @arg @ref LL_APB2_GRP1_PERIPH_SAI1 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1 * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*) * @@ -4709,6 +4846,7 @@ __STATIC_INLINE void LL_C1_APB2_GRP1_EnableClockSleep(uint32_t Periphs) * @arg @ref LL_APB2_GRP1_PERIPH_TIM1 * @arg @ref LL_APB2_GRP1_PERIPH_TIM8 * @arg @ref LL_APB2_GRP1_PERIPH_USART1 + * @arg @ref LL_APB2_GRP1_PERIPH_USART6 * @arg @ref LL_APB2_GRP1_PERIPH_UART9 (*) * @arg @ref LL_APB2_GRP1_PERIPH_USART10 (*) * @arg @ref LL_APB2_GRP1_PERIPH_SPI1 @@ -4718,8 +4856,8 @@ __STATIC_INLINE void LL_C1_APB2_GRP1_EnableClockSleep(uint32_t Periphs) * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 * @arg @ref LL_APB2_GRP1_PERIPH_SPI5 * @arg @ref LL_APB2_GRP1_PERIPH_SAI1 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1 * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*) * @@ -4735,7 +4873,7 @@ __STATIC_INLINE void LL_C1_APB2_GRP1_DisableClockSleep(uint32_t Periphs) * @} */ -/** @defgroup BUS_LL_EF_APB4 APB4 +/** @addtogroup BUS_LL_EF_APB4 APB4 * @{ */ @@ -4768,7 +4906,7 @@ __STATIC_INLINE void LL_C1_APB2_GRP1_DisableClockSleep(uint32_t Periphs) * @arg @ref LL_APB4_GRP1_PERIPH_COMP12 * @arg @ref LL_APB4_GRP1_PERIPH_VREF * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB - * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) + * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) * @arg @ref LL_APB4_GRP1_PERIPH_DTS (*) * @arg @ref LL_APB4_GRP1_PERIPH_DFSDM2 (*) * @@ -4811,8 +4949,7 @@ __STATIC_INLINE void LL_C1_APB4_GRP1_EnableClock(uint32_t Periphs) * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 (*) * @arg @ref LL_APB4_GRP1_PERIPH_COMP12 * @arg @ref LL_APB4_GRP1_PERIPH_VREF - * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB - * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) + * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) * @arg @ref LL_APB4_GRP1_PERIPH_DTS (*) * @arg @ref LL_APB4_GRP1_PERIPH_DFSDM2 (*) * @@ -4852,7 +4989,7 @@ __STATIC_INLINE uint32_t LL_C1_APB4_GRP1_IsEnabledClock(uint32_t Periphs) * @arg @ref LL_APB4_GRP1_PERIPH_COMP12 * @arg @ref LL_APB4_GRP1_PERIPH_VREF * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB - * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) + * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) * @arg @ref LL_APB4_GRP1_PERIPH_DTS (*) * @arg @ref LL_APB4_GRP1_PERIPH_DFSDM2 (*) * @@ -4877,9 +5014,9 @@ __STATIC_INLINE void LL_C1_APB4_GRP1_DisableClock(uint32_t Periphs) * APB4LPENR COMP12LPEN LL_C1_APB4_GRP1_EnableClockSleep\n * APB4LPENR VREFLPEN LL_C1_APB4_GRP1_EnableClockSleep\n * APB4LPENR RTCAPBLPEN LL_C1_APB4_GRP1_EnableClockSleep\n - * APB4ENR SAI4EN LL_C1_APB4_GRP1_EnableClockSleep\n (*) - * APB4ENR DTSEN LL_C1_APB4_GRP1_EnableClockSleep\n (*) - * APB4ENR DFSDM2EN LL_C1_APB4_GRP1_EnableClockSleep (*) + * APB4LPENR SAI4LPEN LL_C1_APB4_GRP1_EnableClockSleep\n (*) + * APB4ENR DTSLPEN LL_C1_APB4_GRP1_EnableClockSleep\n (*) + * APB4ENR DFSDM2LPEN LL_C1_APB4_GRP1_EnableClockSleep (*) * @param Periphs This parameter can be a combination of the following values: * @arg @ref LL_APB4_GRP1_PERIPH_SYSCFG * @arg @ref LL_APB4_GRP1_PERIPH_LPUART1 @@ -4892,7 +5029,7 @@ __STATIC_INLINE void LL_C1_APB4_GRP1_DisableClock(uint32_t Periphs) * @arg @ref LL_APB4_GRP1_PERIPH_COMP12 * @arg @ref LL_APB4_GRP1_PERIPH_VREF * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB - * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) + * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) * @arg @ref LL_APB4_GRP1_PERIPH_DTS (*) * @arg @ref LL_APB4_GRP1_PERIPH_DFSDM2 (*) * @@ -4921,9 +5058,9 @@ __STATIC_INLINE void LL_C1_APB4_GRP1_EnableClockSleep(uint32_t Periphs) * APB4LPENR COMP12LPEN LL_C1_APB4_GRP1_DisableClockSleep\n * APB4LPENR VREFLPEN LL_C1_APB4_GRP1_DisableClockSleep\n * APB4LPENR RTCAPBLPEN LL_C1_APB4_GRP1_DisableClockSleep\n - * APB4ENR SAI4EN LL_C1_APB4_GRP1_DisableClockSleep\n (*) - * APB4ENR DTSEN LL_C1_APB4_GRP1_DisableClockSleep\n (*) - * APB4ENR DFSDM2EN LL_C1_APB4_GRP1_DisableClockSleep (*) + * APB4LPENR SAI4LPEN LL_C1_APB4_GRP1_DisableClockSleep\n (*) + * APB4ENR DTSLPEN LL_C1_APB4_GRP1_DisableClockSleep\n (*) + * APB4ENR DFSDM2LPEN LL_C1_APB4_GRP1_DisableClockSleep (*) * @param Periphs This parameter can be a combination of the following values: * @arg @ref LL_APB4_GRP1_PERIPH_SYSCFG * @arg @ref LL_APB4_GRP1_PERIPH_LPUART1 @@ -4936,7 +5073,7 @@ __STATIC_INLINE void LL_C1_APB4_GRP1_EnableClockSleep(uint32_t Periphs) * @arg @ref LL_APB4_GRP1_PERIPH_COMP12 * @arg @ref LL_APB4_GRP1_PERIPH_VREF * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB - * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) + * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) * @arg @ref LL_APB4_GRP1_PERIPH_DTS (*) * @arg @ref LL_APB4_GRP1_PERIPH_DFSDM2 (*) * @@ -4952,7 +5089,7 @@ __STATIC_INLINE void LL_C1_APB4_GRP1_DisableClockSleep(uint32_t Periphs) * @} */ -/** @defgroup BUS_LL_EF_AHB3 AHB3 +/** @addtogroup BUS_LL_EF_AHB3 AHB3 * @{ */ @@ -4972,9 +5109,9 @@ __STATIC_INLINE void LL_C1_APB4_GRP1_DisableClockSleep(uint32_t Periphs) * @param Periphs This parameter can be a combination of the following values: * @arg @ref LL_AHB3_GRP1_PERIPH_MDMA * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D - * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC + * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC (*) * @arg @ref LL_AHB3_GRP1_PERIPH_FMC - * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI + * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*) * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1 * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM1 @@ -5008,9 +5145,9 @@ __STATIC_INLINE void LL_C2_AHB3_GRP1_EnableClock(uint32_t Periphs) * @param Periphs This parameter can be a combination of the following values: * @arg @ref LL_AHB3_GRP1_PERIPH_MDMA * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D - * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC + * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC (*) * @arg @ref LL_AHB3_GRP1_PERIPH_FMC - * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI + * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*) * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1 * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM1 @@ -5040,9 +5177,9 @@ __STATIC_INLINE uint32_t LL_C2_AHB3_GRP1_IsEnabledClock(uint32_t Periphs) * @param Periphs This parameter can be a combination of the following values: * @arg @ref LL_AHB3_GRP1_PERIPH_MDMA * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D - * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC + * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC (*) * @arg @ref LL_AHB3_GRP1_PERIPH_FMC - * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI + * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*) * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1 * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM1 @@ -5071,9 +5208,9 @@ __STATIC_INLINE void LL_C2_AHB3_GRP1_DisableClock(uint32_t Periphs) * AHB3LPENR AXISRAMLPEN LL_C2_AHB3_GRP1_EnableClockSleep * @param Periphs This parameter can be a combination of the following values: * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D - * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC + * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC (*) * @arg @ref LL_AHB3_GRP1_PERIPH_FMC - * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI + * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*) * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1 * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM1 @@ -5106,9 +5243,9 @@ __STATIC_INLINE void LL_C2_AHB3_GRP1_EnableClockSleep(uint32_t Periphs) * AHB3LPENR AXISRAMLPEN LL_C2_AHB3_GRP1_DisableClockSleep * @param Periphs This parameter can be a combination of the following values: * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D - * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC + * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC (*) * @arg @ref LL_AHB3_GRP1_PERIPH_FMC - * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI + * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*) * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1 * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM1 @@ -5126,7 +5263,7 @@ __STATIC_INLINE void LL_C2_AHB3_GRP1_DisableClockSleep(uint32_t Periphs) * @} */ -/** @defgroup BUS_LL_EF_AHB1 AHB1 +/** @addtogroup BUS_LL_EF_AHB1 AHB1 * @{ */ @@ -5147,14 +5284,16 @@ __STATIC_INLINE void LL_C2_AHB3_GRP1_DisableClockSleep(uint32_t Periphs) * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1 * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2 * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12 - * @arg @ref LL_AHB1_GRP1_PERIPH_ART - * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC - * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX - * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX + * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX (*) * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHS * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHSULPI - * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS - * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHSULPI + * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHSULPI (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_C2_AHB1_GRP1_EnableClock(uint32_t Periphs) @@ -5183,14 +5322,16 @@ __STATIC_INLINE void LL_C2_AHB1_GRP1_EnableClock(uint32_t Periphs) * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1 * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2 * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12 - * @arg @ref LL_AHB1_GRP1_PERIPH_ART - * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC - * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX - * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX + * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX (*) * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHS * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHSULPI - * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS - * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHSULPI + * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHSULPI (*) + * + * (*) value not defined in all devices. * @retval uint32_t */ __STATIC_INLINE uint32_t LL_C2_AHB1_GRP1_IsEnabledClock(uint32_t Periphs) @@ -5215,14 +5356,16 @@ __STATIC_INLINE uint32_t LL_C2_AHB1_GRP1_IsEnabledClock(uint32_t Periphs) * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1 * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2 * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12 - * @arg @ref LL_AHB1_GRP1_PERIPH_ART - * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC - * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX - * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX + * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX (*) * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHS * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHSULPI - * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS - * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHSULPI + * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHSULPI (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_C2_AHB1_GRP1_DisableClock(uint32_t Periphs) @@ -5247,14 +5390,16 @@ __STATIC_INLINE void LL_C2_AHB1_GRP1_DisableClock(uint32_t Periphs) * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1 * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2 * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12 - * @arg @ref LL_AHB1_GRP1_PERIPH_ART - * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC - * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX - * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX + * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX (*) * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHS * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHSULPI - * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS - * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHSULPI + * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHSULPI (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_C2_AHB1_GRP1_EnableClockSleep(uint32_t Periphs) @@ -5283,14 +5428,16 @@ __STATIC_INLINE void LL_C2_AHB1_GRP1_EnableClockSleep(uint32_t Periphs) * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1 * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2 * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12 - * @arg @ref LL_AHB1_GRP1_PERIPH_ART - * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC - * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX - * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX + * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX (*) * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHS * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHSULPI - * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS - * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHSULPI + * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHSULPI (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_C2_AHB1_GRP1_DisableClockSleep(uint32_t Periphs) @@ -5302,7 +5449,7 @@ __STATIC_INLINE void LL_C2_AHB1_GRP1_DisableClockSleep(uint32_t Periphs) * @} */ -/** @defgroup BUS_LL_EF_AHB2 AHB2 +/** @addtogroup BUS_LL_EF_AHB2 AHB2 * @{ */ @@ -5394,7 +5541,7 @@ __STATIC_INLINE void LL_C2_AHB2_GRP1_DisableClock(uint32_t Periphs) * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2 * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM1 * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM2 - * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM3 + * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM3 (*) * * (*) value not defined in all devices. * @retval None @@ -5426,7 +5573,7 @@ __STATIC_INLINE void LL_C2_AHB2_GRP1_EnableClockSleep(uint32_t Periphs) * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2 * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM1 * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM2 - * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM3 + * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM3 (*) * * (*) value not defined in all devices. * @retval None @@ -5440,7 +5587,7 @@ __STATIC_INLINE void LL_C2_AHB2_GRP1_DisableClockSleep(uint32_t Periphs) * @} */ -/** @defgroup BUS_LL_EF_AHB4 AHB4 +/** @addtogroup BUS_LL_EF_AHB4 AHB4 * @{ */ @@ -5472,13 +5619,13 @@ __STATIC_INLINE void LL_C2_AHB2_GRP1_DisableClockSleep(uint32_t Periphs) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH - * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI + * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK - * @arg @ref LL_AHB4_GRP1_PERIPH_CRC + * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA - * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 - * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*) + * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*) + * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM * @arg @ref LL_AHB4_GRP1_PERIPH_SRAM4 * @@ -5522,13 +5669,13 @@ __STATIC_INLINE void LL_C2_AHB4_GRP1_EnableClock(uint32_t Periphs) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH - * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI + * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK - * @arg @ref LL_AHB4_GRP1_PERIPH_CRC + * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA - * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 - * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*) + * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*) + * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM * @arg @ref LL_AHB4_GRP1_PERIPH_SRAM4 * @@ -5568,13 +5715,13 @@ __STATIC_INLINE uint32_t LL_C2_AHB4_GRP1_IsEnabledClock(uint32_t Periphs) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH - * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI + * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK - * @arg @ref LL_AHB4_GRP1_PERIPH_CRC + * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA - * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 - * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*) + * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*) + * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM * @arg @ref LL_AHB4_GRP1_PERIPH_SRAM4 * @@ -5613,12 +5760,12 @@ __STATIC_INLINE void LL_C2_AHB4_GRP1_DisableClock(uint32_t Periphs) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH - * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI + * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK - * @arg @ref LL_AHB4_GRP1_PERIPH_CRC + * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA - * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 + * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM * @arg @ref LL_AHB4_GRP1_PERIPH_SRAM4 * @retval None @@ -5659,12 +5806,12 @@ __STATIC_INLINE void LL_C2_AHB4_GRP1_EnableClockSleep(uint32_t Periphs) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH - * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI + * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*) * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK - * @arg @ref LL_AHB4_GRP1_PERIPH_CRC + * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA - * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 + * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*) * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM * @arg @ref LL_AHB4_GRP1_PERIPH_SRAM4 * @retval None @@ -5678,7 +5825,7 @@ __STATIC_INLINE void LL_C2_AHB4_GRP1_DisableClockSleep(uint32_t Periphs) * @} */ -/** @defgroup BUS_LL_EF_APB3 APB3 +/** @addtogroup BUS_LL_EF_APB3 APB3 * @{ */ @@ -5688,7 +5835,7 @@ __STATIC_INLINE void LL_C2_AHB4_GRP1_DisableClockSleep(uint32_t Periphs) * APB3ENR DSIEN LL_C2_APB3_GRP1_EnableClock\n * APB3ENR WWDG1EN LL_C2_APB3_GRP1_EnableClock * @param Periphs This parameter can be a combination of the following values: - * @arg @ref LL_APB3_GRP1_PERIPH_LTDC + * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*) * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*) * @arg @ref LL_APB3_GRP1_PERIPH_WWDG1 * @@ -5710,7 +5857,7 @@ __STATIC_INLINE void LL_C2_APB3_GRP1_EnableClock(uint32_t Periphs) * APB3ENR DSIEN LL_C2_APB3_GRP1_IsEnabledClock\n * APB3ENR WWDG1EN LL_C2_APB3_GRP1_IsEnabledClock * @param Periphs This parameter can be a combination of the following values: - * @arg @ref LL_APB3_GRP1_PERIPH_LTDC + * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*) * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*) * @arg @ref LL_APB3_GRP1_PERIPH_WWDG1 * @@ -5728,7 +5875,7 @@ __STATIC_INLINE uint32_t LL_C2_APB3_GRP1_IsEnabledClock(uint32_t Periphs) * APB3ENR DSIEN LL_C2_APB3_GRP1_DisableClock\n * APB3ENR WWDG1EN LL_C2_APB3_GRP1_DisableClock * @param Periphs This parameter can be a combination of the following values: - * @arg @ref LL_APB3_GRP1_PERIPH_LTDC + * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*) * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*) * @arg @ref LL_APB3_GRP1_PERIPH_WWDG1 * @@ -5746,7 +5893,7 @@ __STATIC_INLINE void LL_C2_APB3_GRP1_DisableClock(uint32_t Periphs) * APB3LPENR DSILPEN LL_C2_APB3_GRP1_EnableClockSleep\n * APB3LPENR WWDG1LPEN LL_C2_APB3_GRP1_EnableClockSleep * @param Periphs This parameter can be a combination of the following values: - * @arg @ref LL_APB3_GRP1_PERIPH_LTDC + * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*) * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*) * @arg @ref LL_APB3_GRP1_PERIPH_WWDG1 * @@ -5768,7 +5915,7 @@ __STATIC_INLINE void LL_C2_APB3_GRP1_EnableClockSleep(uint32_t Periphs) * APB3LPENR DSILPEN LL_C2_APB3_GRP1_DisableClockSleep\n * APB3LPENR WWDG1LPEN LL_C2_APB3_GRP1_DisableClockSleep * @param Periphs This parameter can be a combination of the following values: - * @arg @ref LL_APB3_GRP1_PERIPH_LTDC + * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*) * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*) * @arg @ref LL_APB3_GRP1_PERIPH_WWDG1 * @@ -5784,7 +5931,7 @@ __STATIC_INLINE void LL_C2_APB3_GRP1_DisableClockSleep(uint32_t Periphs) * @} */ -/** @defgroup BUS_LL_EF_APB1 APB1 +/** @addtogroup BUS_LL_EF_APB1 APB1 * @{ */ @@ -5826,7 +5973,7 @@ __STATIC_INLINE void LL_C2_APB3_GRP1_DisableClockSleep(uint32_t Periphs) * @arg @ref LL_APB1_GRP1_PERIPH_TIM13 * @arg @ref LL_APB1_GRP1_PERIPH_TIM14 * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1 - * @arg @ref LL_APB1_GRP1_PERIPH_WWDG2 + * @arg @ref LL_APB1_GRP1_PERIPH_WWDG2 (*) * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 * @arg @ref LL_APB1_GRP1_PERIPH_SPI3 * @arg @ref LL_APB1_GRP1_PERIPH_SPDIFRX @@ -5841,6 +5988,8 @@ __STATIC_INLINE void LL_C2_APB3_GRP1_DisableClockSleep(uint32_t Periphs) * @arg @ref LL_APB1_GRP1_PERIPH_DAC12 * @arg @ref LL_APB1_GRP1_PERIPH_UART7 * @arg @ref LL_APB1_GRP1_PERIPH_UART8 + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_C2_APB1_GRP1_EnableClock(uint32_t Periphs) @@ -5890,7 +6039,7 @@ __STATIC_INLINE void LL_C2_APB1_GRP1_EnableClock(uint32_t Periphs) * @arg @ref LL_APB1_GRP1_PERIPH_TIM13 * @arg @ref LL_APB1_GRP1_PERIPH_TIM14 * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1 - * @arg @ref LL_APB1_GRP1_PERIPH_WWDG2 + * @arg @ref LL_APB1_GRP1_PERIPH_WWDG2 (*) * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 * @arg @ref LL_APB1_GRP1_PERIPH_SPI3 * @arg @ref LL_APB1_GRP1_PERIPH_SPDIFRX @@ -5905,6 +6054,8 @@ __STATIC_INLINE void LL_C2_APB1_GRP1_EnableClock(uint32_t Periphs) * @arg @ref LL_APB1_GRP1_PERIPH_DAC12 * @arg @ref LL_APB1_GRP1_PERIPH_UART7 * @arg @ref LL_APB1_GRP1_PERIPH_UART8 + * + * (*) value not defined in all devices. * @retval uint32_t */ __STATIC_INLINE uint32_t LL_C2_APB1_GRP1_IsEnabledClock(uint32_t Periphs) @@ -5950,7 +6101,7 @@ __STATIC_INLINE uint32_t LL_C2_APB1_GRP1_IsEnabledClock(uint32_t Periphs) * @arg @ref LL_APB1_GRP1_PERIPH_TIM13 * @arg @ref LL_APB1_GRP1_PERIPH_TIM14 * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1 - * @arg @ref LL_APB1_GRP1_PERIPH_WWDG2 + * @arg @ref LL_APB1_GRP1_PERIPH_WWDG2 (*) * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 * @arg @ref LL_APB1_GRP1_PERIPH_SPI3 * @arg @ref LL_APB1_GRP1_PERIPH_SPDIFRX @@ -5965,6 +6116,8 @@ __STATIC_INLINE uint32_t LL_C2_APB1_GRP1_IsEnabledClock(uint32_t Periphs) * @arg @ref LL_APB1_GRP1_PERIPH_DAC12 * @arg @ref LL_APB1_GRP1_PERIPH_UART7 * @arg @ref LL_APB1_GRP1_PERIPH_UART8 + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_C2_APB1_GRP1_DisableClock(uint32_t Periphs) @@ -6010,7 +6163,7 @@ __STATIC_INLINE void LL_C2_APB1_GRP1_DisableClock(uint32_t Periphs) * @arg @ref LL_APB1_GRP1_PERIPH_TIM13 * @arg @ref LL_APB1_GRP1_PERIPH_TIM14 * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1 - * @arg @ref LL_APB1_GRP1_PERIPH_WWDG2 + * @arg @ref LL_APB1_GRP1_PERIPH_WWDG2 (*) * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 * @arg @ref LL_APB1_GRP1_PERIPH_SPI3 * @arg @ref LL_APB1_GRP1_PERIPH_SPDIFRX @@ -6025,6 +6178,8 @@ __STATIC_INLINE void LL_C2_APB1_GRP1_DisableClock(uint32_t Periphs) * @arg @ref LL_APB1_GRP1_PERIPH_DAC12 * @arg @ref LL_APB1_GRP1_PERIPH_UART7 * @arg @ref LL_APB1_GRP1_PERIPH_UART8 + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_C2_APB1_GRP1_EnableClockSleep(uint32_t Periphs) @@ -6074,7 +6229,7 @@ __STATIC_INLINE void LL_C2_APB1_GRP1_EnableClockSleep(uint32_t Periphs) * @arg @ref LL_APB1_GRP1_PERIPH_TIM13 * @arg @ref LL_APB1_GRP1_PERIPH_TIM14 * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1 - * @arg @ref LL_APB1_GRP1_PERIPH_WWDG2 + * @arg @ref LL_APB1_GRP1_PERIPH_WWDG2 (*) * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 * @arg @ref LL_APB1_GRP1_PERIPH_SPI3 * @arg @ref LL_APB1_GRP1_PERIPH_SPDIFRX @@ -6089,6 +6244,8 @@ __STATIC_INLINE void LL_C2_APB1_GRP1_EnableClockSleep(uint32_t Periphs) * @arg @ref LL_APB1_GRP1_PERIPH_DAC12 * @arg @ref LL_APB1_GRP1_PERIPH_UART7 * @arg @ref LL_APB1_GRP1_PERIPH_UART8 + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_C2_APB1_GRP1_DisableClockSleep(uint32_t Periphs) @@ -6109,6 +6266,10 @@ __STATIC_INLINE void LL_C2_APB1_GRP1_DisableClockSleep(uint32_t Periphs) * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN + * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*) + * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_C2_APB1_GRP2_EnableClock(uint32_t Periphs) @@ -6133,6 +6294,10 @@ __STATIC_INLINE void LL_C2_APB1_GRP2_EnableClock(uint32_t Periphs) * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN + * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*) + * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*) + * + * (*) value not defined in all devices. * @retval uint32_t */ __STATIC_INLINE uint32_t LL_C2_APB1_GRP2_IsEnabledClock(uint32_t Periphs) @@ -6153,6 +6318,10 @@ __STATIC_INLINE uint32_t LL_C2_APB1_GRP2_IsEnabledClock(uint32_t Periphs) * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN + * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*) + * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_C2_APB1_GRP2_DisableClock(uint32_t Periphs) @@ -6173,6 +6342,10 @@ __STATIC_INLINE void LL_C2_APB1_GRP2_DisableClock(uint32_t Periphs) * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN + * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*) + * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_C2_APB1_GRP2_EnableClockSleep(uint32_t Periphs) @@ -6197,6 +6370,10 @@ __STATIC_INLINE void LL_C2_APB1_GRP2_EnableClockSleep(uint32_t Periphs) * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN + * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*) + * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_C2_APB1_GRP2_DisableClockSleep(uint32_t Periphs) @@ -6208,7 +6385,7 @@ __STATIC_INLINE void LL_C2_APB1_GRP2_DisableClockSleep(uint32_t Periphs) * @} */ -/** @defgroup BUS_LL_EF_APB2 APB2 +/** @addtogroup BUS_LL_EF_APB2 APB2 * @{ */ @@ -6241,10 +6418,13 @@ __STATIC_INLINE void LL_C2_APB1_GRP2_DisableClockSleep(uint32_t Periphs) * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 * @arg @ref LL_APB2_GRP1_PERIPH_SPI5 * @arg @ref LL_APB2_GRP1_PERIPH_SAI1 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 + * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1 - * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM + * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*) + * + * (*) value not defined in all devices. + * @retval None */ __STATIC_INLINE void LL_C2_APB2_GRP1_EnableClock(uint32_t Periphs) @@ -6285,10 +6465,12 @@ __STATIC_INLINE void LL_C2_APB2_GRP1_EnableClock(uint32_t Periphs) * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 * @arg @ref LL_APB2_GRP1_PERIPH_SPI5 * @arg @ref LL_APB2_GRP1_PERIPH_SAI1 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 + * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1 - * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM + * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*) + * + * (*) value not defined in all devices. * @retval uint32_t */ __STATIC_INLINE uint32_t LL_C2_APB2_GRP1_IsEnabledClock(uint32_t Periphs) @@ -6325,10 +6507,12 @@ __STATIC_INLINE uint32_t LL_C2_APB2_GRP1_IsEnabledClock(uint32_t Periphs) * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 * @arg @ref LL_APB2_GRP1_PERIPH_SPI5 * @arg @ref LL_APB2_GRP1_PERIPH_SAI1 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 + * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1 - * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM + * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_C2_APB2_GRP1_DisableClock(uint32_t Periphs) @@ -6365,10 +6549,12 @@ __STATIC_INLINE void LL_C2_APB2_GRP1_DisableClock(uint32_t Periphs) * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 * @arg @ref LL_APB2_GRP1_PERIPH_SPI5 * @arg @ref LL_APB2_GRP1_PERIPH_SAI1 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 + * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1 - * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM + * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_C2_APB2_GRP1_EnableClockSleep(uint32_t Periphs) @@ -6409,10 +6595,12 @@ __STATIC_INLINE void LL_C2_APB2_GRP1_EnableClockSleep(uint32_t Periphs) * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 * @arg @ref LL_APB2_GRP1_PERIPH_SPI5 * @arg @ref LL_APB2_GRP1_PERIPH_SAI1 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 - * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 + * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*) * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1 - * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM + * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_C2_APB2_GRP1_DisableClockSleep(uint32_t Periphs) @@ -6424,7 +6612,7 @@ __STATIC_INLINE void LL_C2_APB2_GRP1_DisableClockSleep(uint32_t Periphs) * @} */ -/** @defgroup BUS_LL_EF_APB4 APB4 +/** @addtogroup BUS_LL_EF_APB4 APB4 * @{ */ @@ -6449,12 +6637,14 @@ __STATIC_INLINE void LL_C2_APB2_GRP1_DisableClockSleep(uint32_t Periphs) * @arg @ref LL_APB4_GRP1_PERIPH_I2C4 * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM2 * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM3 - * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 - * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 + * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 (*) + * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 (*) * @arg @ref LL_APB4_GRP1_PERIPH_COMP12 * @arg @ref LL_APB4_GRP1_PERIPH_VREF * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB - * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 + * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) + * + * (*) value not defined in all devices * @retval None */ __STATIC_INLINE void LL_C2_APB4_GRP1_EnableClock(uint32_t Periphs) @@ -6487,12 +6677,14 @@ __STATIC_INLINE void LL_C2_APB4_GRP1_EnableClock(uint32_t Periphs) * @arg @ref LL_APB4_GRP1_PERIPH_I2C4 * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM2 * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM3 - * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 - * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 + * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 (*) + * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 (*) * @arg @ref LL_APB4_GRP1_PERIPH_COMP12 * @arg @ref LL_APB4_GRP1_PERIPH_VREF * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB - * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 + * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) + * + * (*) value not defined in all devices * @retval uint32_t */ __STATIC_INLINE uint32_t LL_C2_APB4_GRP1_IsEnabledClock(uint32_t Periphs) @@ -6521,12 +6713,14 @@ __STATIC_INLINE uint32_t LL_C2_APB4_GRP1_IsEnabledClock(uint32_t Periphs) * @arg @ref LL_APB4_GRP1_PERIPH_I2C4 * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM2 * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM3 - * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 - * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 + * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 (*) + * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 (*) * @arg @ref LL_APB4_GRP1_PERIPH_COMP12 * @arg @ref LL_APB4_GRP1_PERIPH_VREF * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB - * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 + * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) + * + * (*) value not defined in all devices * @retval None */ __STATIC_INLINE void LL_C2_APB4_GRP1_DisableClock(uint32_t Periphs) @@ -6555,12 +6749,14 @@ __STATIC_INLINE void LL_C2_APB4_GRP1_DisableClock(uint32_t Periphs) * @arg @ref LL_APB4_GRP1_PERIPH_I2C4 * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM2 * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM3 - * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 - * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 + * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 (*) + * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 (*) * @arg @ref LL_APB4_GRP1_PERIPH_COMP12 * @arg @ref LL_APB4_GRP1_PERIPH_VREF * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB - * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 + * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) + * + * (*) value not defined in all devices * @retval None */ __STATIC_INLINE void LL_C2_APB4_GRP1_EnableClockSleep(uint32_t Periphs) @@ -6593,12 +6789,14 @@ __STATIC_INLINE void LL_C2_APB4_GRP1_EnableClockSleep(uint32_t Periphs) * @arg @ref LL_APB4_GRP1_PERIPH_I2C4 * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM2 * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM3 - * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 - * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 + * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 (*) + * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 (*) * @arg @ref LL_APB4_GRP1_PERIPH_COMP12 * @arg @ref LL_APB4_GRP1_PERIPH_VREF * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB - * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 + * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*) + * + * (*) value not defined in all devices * @retval None */ __STATIC_INLINE void LL_C2_APB4_GRP1_DisableClockSleep(uint32_t Periphs) diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_comp.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_comp.h index 243c89d..e75c0bd 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_comp.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_comp.h @@ -417,16 +417,12 @@ __STATIC_INLINE uint32_t LL_COMP_GetPowerMode(COMP_TypeDef *COMPx) * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH2 * @arg @ref LL_COMP_INPUT_MINUS_IO1 * @arg @ref LL_COMP_INPUT_MINUS_IO2 -#if defined (COMP_CFGRx_INMSEL_3) * @arg @ref LL_COMP_INPUT_MINUS_TPSENS_DAC2CH1 * @arg @ref LL_COMP_INPUT_MINUS_VBAT_VDDAP -#endif * @param InputPlus This parameter can be one of the following values: * @arg @ref LL_COMP_INPUT_PLUS_IO1 * @arg @ref LL_COMP_INPUT_PLUS_IO2 -#if defined (COMP_CFGRx_INP2SEL) * @arg @ref LL_COMP_INPUT_PLUS_DAC2_CH1 -#endif * @retval None */ __STATIC_INLINE void LL_COMP_ConfigInputs(COMP_TypeDef *COMPx, uint32_t InputMinus, uint32_t InputPlus) @@ -455,9 +451,7 @@ __STATIC_INLINE void LL_COMP_ConfigInputs(COMP_TypeDef *COMPx, uint32_t InputMin * @param InputPlus This parameter can be one of the following values: * @arg @ref LL_COMP_INPUT_PLUS_IO1 * @arg @ref LL_COMP_INPUT_PLUS_IO2 -#if defined (COMP_CFGRx_INP2SEL) * @arg @ref LL_COMP_INPUT_PLUS_DAC2_CH1 -#endif * @retval None */ __STATIC_INLINE void LL_COMP_SetInputPlus(COMP_TypeDef *COMPx, uint32_t InputPlus) @@ -479,9 +473,7 @@ __STATIC_INLINE void LL_COMP_SetInputPlus(COMP_TypeDef *COMPx, uint32_t InputPlu * @retval Returned value can be one of the following values: * @arg @ref LL_COMP_INPUT_PLUS_IO1 * @arg @ref LL_COMP_INPUT_PLUS_IO2 -#if defined (COMP_CFGRx_INP2SEL) * @arg @ref LL_COMP_INPUT_PLUS_DAC2_CH1 -#endif */ __STATIC_INLINE uint32_t LL_COMP_GetInputPlus(COMP_TypeDef *COMPx) { @@ -522,10 +514,8 @@ __STATIC_INLINE uint32_t LL_COMP_GetInputPlus(COMP_TypeDef *COMPx) * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH2 * @arg @ref LL_COMP_INPUT_MINUS_IO1 * @arg @ref LL_COMP_INPUT_MINUS_IO2 -#if defined (COMP_CFGRx_INMSEL_3) * @arg @ref LL_COMP_INPUT_MINUS_TPSENS_DAC2CH1 * @arg @ref LL_COMP_INPUT_MINUS_VBAT_VDDAP -#endif * @retval None */ __STATIC_INLINE void LL_COMP_SetInputMinus(COMP_TypeDef *COMPx, uint32_t InputMinus) @@ -551,10 +541,8 @@ __STATIC_INLINE void LL_COMP_SetInputMinus(COMP_TypeDef *COMPx, uint32_t InputMi * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH2 * @arg @ref LL_COMP_INPUT_MINUS_IO1 * @arg @ref LL_COMP_INPUT_MINUS_IO2 -#if defined (COMP_CFGRx_INMSEL_3) * @arg @ref LL_COMP_INPUT_MINUS_TPSENS_DAC2CH1 * @arg @ref LL_COMP_INPUT_MINUS_VBAT_VDDAP -#endif */ __STATIC_INLINE uint32_t LL_COMP_GetInputMinus(COMP_TypeDef *COMPx) { diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_cordic.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_cordic.h new file mode 100644 index 0000000..b46705f --- /dev/null +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_cordic.h @@ -0,0 +1,777 @@ +/** + ****************************************************************************** + * @file stm32h7xx_ll_cordic.h + * @author MCD Application Team + * @brief Header file of CORDIC LL module. + ****************************************************************************** + * @attention + * + *

                  © Copyright (c) 2017 STMicroelectronics. + * All rights reserved.

                  + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32H7xx_LL_CORDIC_H +#define STM32H7xx_LL_CORDIC_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32h7xx.h" + +/** @addtogroup STM32H7xx_LL_Driver + * @{ + */ + +#if defined(CORDIC) + +/** @defgroup CORDIC_LL CORDIC + * @{ + */ + +/* Private variables ---------------------------------------------------------*/ + +/* Private constants ---------------------------------------------------------*/ + +/* Private macros ------------------------------------------------------------*/ + +/* Exported types ------------------------------------------------------------*/ + +/* Exported constants --------------------------------------------------------*/ +/** @defgroup CORDIC_LL_Exported_Constants CORDIC Exported Constants + * @{ + */ + +/** @defgroup CORDIC_LL_EC_GET_FLAG Get Flags Defines + * @brief Flags defines which can be used with LL_CORDIC_ReadReg function. + * @{ + */ +#define LL_CORDIC_FLAG_RRDY CORDIC_CSR_RRDY +/** + * @} + */ + +/** @defgroup CORDIC_LL_EC_IT IT Defines + * @brief IT defines which can be used with LL_CORDIC_ReadReg and LL_CORDIC_WriteReg functions. + * @{ + */ +#define LL_CORDIC_IT_IEN CORDIC_CSR_IEN /*!< Result Ready interrupt enable */ +/** + * @} + */ + +/** @defgroup CORDIC_LL_EC_FUNCTION FUNCTION + * @{ + */ +#define LL_CORDIC_FUNCTION_COSINE (0x00000000U) /*!< Cosine */ +#define LL_CORDIC_FUNCTION_SINE ((uint32_t)(CORDIC_CSR_FUNC_0)) /*!< Sine */ +#define LL_CORDIC_FUNCTION_PHASE ((uint32_t)(CORDIC_CSR_FUNC_1)) /*!< Phase */ +#define LL_CORDIC_FUNCTION_MODULUS ((uint32_t)(CORDIC_CSR_FUNC_1 | CORDIC_CSR_FUNC_0)) /*!< Modulus */ +#define LL_CORDIC_FUNCTION_ARCTANGENT ((uint32_t)(CORDIC_CSR_FUNC_2)) /*!< Arctangent */ +#define LL_CORDIC_FUNCTION_HCOSINE ((uint32_t)(CORDIC_CSR_FUNC_2 | CORDIC_CSR_FUNC_0)) /*!< Hyperbolic Cosine */ +#define LL_CORDIC_FUNCTION_HSINE ((uint32_t)(CORDIC_CSR_FUNC_2 | CORDIC_CSR_FUNC_1)) /*!< Hyperbolic Sine */ +#define LL_CORDIC_FUNCTION_HARCTANGENT ((uint32_t)(CORDIC_CSR_FUNC_2 | CORDIC_CSR_FUNC_1 | CORDIC_CSR_FUNC_0))/*!< Hyperbolic Arctangent */ +#define LL_CORDIC_FUNCTION_NATURALLOG ((uint32_t)(CORDIC_CSR_FUNC_3)) /*!< Natural Logarithm */ +#define LL_CORDIC_FUNCTION_SQUAREROOT ((uint32_t)(CORDIC_CSR_FUNC_3 | CORDIC_CSR_FUNC_0)) /*!< Square Root */ +/** + * @} + */ + +/** @defgroup CORDIC_LL_EC_PRECISION PRECISION + * @{ + */ +#define LL_CORDIC_PRECISION_1CYCLE ((uint32_t)(CORDIC_CSR_PRECISION_0)) +#define LL_CORDIC_PRECISION_2CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_1)) +#define LL_CORDIC_PRECISION_3CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_1 | CORDIC_CSR_PRECISION_0)) +#define LL_CORDIC_PRECISION_4CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_2)) +#define LL_CORDIC_PRECISION_5CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_2 | CORDIC_CSR_PRECISION_0)) +#define LL_CORDIC_PRECISION_6CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_2 | CORDIC_CSR_PRECISION_1)) +#define LL_CORDIC_PRECISION_7CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_2 | CORDIC_CSR_PRECISION_1 | CORDIC_CSR_PRECISION_0)) +#define LL_CORDIC_PRECISION_8CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_3)) +#define LL_CORDIC_PRECISION_9CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_3 | CORDIC_CSR_PRECISION_0)) +#define LL_CORDIC_PRECISION_10CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_3 | CORDIC_CSR_PRECISION_1)) +#define LL_CORDIC_PRECISION_11CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_3 | CORDIC_CSR_PRECISION_1 | CORDIC_CSR_PRECISION_0)) +#define LL_CORDIC_PRECISION_12CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_3 | CORDIC_CSR_PRECISION_2)) +#define LL_CORDIC_PRECISION_13CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_3 | CORDIC_CSR_PRECISION_2 | CORDIC_CSR_PRECISION_0)) +#define LL_CORDIC_PRECISION_14CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_3 | CORDIC_CSR_PRECISION_2 | CORDIC_CSR_PRECISION_1)) +#define LL_CORDIC_PRECISION_15CYCLES ((uint32_t)(CORDIC_CSR_PRECISION_3 | CORDIC_CSR_PRECISION_2 | CORDIC_CSR_PRECISION_1 | CORDIC_CSR_PRECISION_0)) +/** + * @} + */ + +/** @defgroup CORDIC_LL_EC_SCALE SCALE + * @{ + */ +#define LL_CORDIC_SCALE_0 (0x00000000U) +#define LL_CORDIC_SCALE_1 ((uint32_t)(CORDIC_CSR_SCALE_0)) +#define LL_CORDIC_SCALE_2 ((uint32_t)(CORDIC_CSR_SCALE_1)) +#define LL_CORDIC_SCALE_3 ((uint32_t)(CORDIC_CSR_SCALE_1 | CORDIC_CSR_SCALE_0)) +#define LL_CORDIC_SCALE_4 ((uint32_t)(CORDIC_CSR_SCALE_2)) +#define LL_CORDIC_SCALE_5 ((uint32_t)(CORDIC_CSR_SCALE_2 | CORDIC_CSR_SCALE_0)) +#define LL_CORDIC_SCALE_6 ((uint32_t)(CORDIC_CSR_SCALE_2 | CORDIC_CSR_SCALE_1)) +#define LL_CORDIC_SCALE_7 ((uint32_t)(CORDIC_CSR_SCALE_2 | CORDIC_CSR_SCALE_1 | CORDIC_CSR_SCALE_0)) +/** + * @} + */ + +/** @defgroup CORDIC_LL_EC_NBWRITE NBWRITE + * @{ + */ +#define LL_CORDIC_NBWRITE_1 (0x00000000U) /*!< One 32-bits write containing either only one + 32-bit data input (Q1.31 format), or two 16-bit + data input (Q1.15 format) packed in one 32 bits Data */ +#define LL_CORDIC_NBWRITE_2 CORDIC_CSR_NARGS /*!< Two 32-bit write containing two 32-bits data input + (Q1.31 format) */ +/** + * @} + */ + +/** @defgroup CORDIC_LL_EC_NBREAD NBREAD + * @{ + */ +#define LL_CORDIC_NBREAD_1 (0x00000000U) /*!< One 32-bits read containing either only one + 32-bit data ouput (Q1.31 format), or two 16-bit + data output (Q1.15 format) packed in one 32 bits Data */ +#define LL_CORDIC_NBREAD_2 CORDIC_CSR_NRES /*!< Two 32-bit Data containing two 32-bits data output + (Q1.31 format) */ +/** + * @} + */ + +/** @defgroup CORDIC_LL_EC_INSIZE INSIZE + * @{ + */ +#define LL_CORDIC_INSIZE_32BITS (0x00000000U) /*!< 32 bits input data size (Q1.31 format) */ +#define LL_CORDIC_INSIZE_16BITS CORDIC_CSR_ARGSIZE /*!< 16 bits input data size (Q1.15 format) */ +/** + * @} + */ + +/** @defgroup CORDIC_LL_EC_OUTSIZE OUTSIZE + * @{ + */ +#define LL_CORDIC_OUTSIZE_32BITS (0x00000000U) /*!< 32 bits output data size (Q1.31 format) */ +#define LL_CORDIC_OUTSIZE_16BITS CORDIC_CSR_RESSIZE /*!< 16 bits output data size (Q1.15 format) */ +/** + * @} + */ + +/** @defgroup CORDIC_LL_EC_DMA_REG_DATA DMA register data + * @{ + */ +#define LL_CORDIC_DMA_REG_DATA_IN (0x00000000U) /*!< Get address of input data register */ +#define LL_CORDIC_DMA_REG_DATA_OUT (0x00000001U) /*!< Get address of output data register */ +/** + * @} + */ + +/** + * @} + */ + +/* Exported macro ------------------------------------------------------------*/ +/** @defgroup CORDIC_LL_Exported_Macros CORDIC Exported Macros + * @{ + */ + +/** @defgroup CORDIC_LL_EM_WRITE_READ Common Write and read registers Macros + * @{ + */ + +/** + * @brief Write a value in CORDIC register. + * @param __INSTANCE__ CORDIC Instance + * @param __REG__ Register to be written + * @param __VALUE__ Value to be written in the register + * @retval None + */ +#define LL_CORDIC_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__)) + +/** + * @brief Read a value in CORDIC register. + * @param __INSTANCE__ CORDIC Instance + * @param __REG__ Register to be read + * @retval Register value + */ +#define LL_CORDIC_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__) +/** + * @} + */ + +/** + * @} + */ + + +/* Exported functions --------------------------------------------------------*/ + +/** @defgroup CORDIC_LL_Exported_Functions CORDIC Exported Functions + * @{ + */ + +/** @defgroup CORDIC_LL_EF_Configuration CORDIC Configuration functions + * @{ + */ + +/** + * @brief Configure the CORDIC processing. + * @note This function set all parameters of CORDIC processing. + * These parameters can also be set individually using + * dedicated functions: + * - @ref LL_CORDIC_SetFunction() + * - @ref LL_CORDIC_SetPrecision() + * - @ref LL_CORDIC_SetScale() + * - @ref LL_CORDIC_SetNbWrite() + * - @ref LL_CORDIC_SetNbRead() + * - @ref LL_CORDIC_SetInSize() + * - @ref LL_CORDIC_SetOutSize() + * @rmtoll CSR FUNC LL_CORDIC_Configure\n + * CSR PRECISION LL_CORDIC_Configure\n + * CSR SCALE LL_CORDIC_Configure\n + * CSR NARGS LL_CORDIC_Configure\n + * CSR NRES LL_CORDIC_Configure\n + * CSR ARGSIZE LL_CORDIC_Configure\n + * CSR RESSIZE LL_CORDIC_Configure + * @param CORDICx CORDIC instance + * @param Function parameter can be one of the following values: + * @arg @ref LL_CORDIC_FUNCTION_COSINE + * @arg @ref LL_CORDIC_FUNCTION_SINE + * @arg @ref LL_CORDIC_FUNCTION_PHASE + * @arg @ref LL_CORDIC_FUNCTION_MODULUS + * @arg @ref LL_CORDIC_FUNCTION_ARCTANGENT + * @arg @ref LL_CORDIC_FUNCTION_HCOSINE + * @arg @ref LL_CORDIC_FUNCTION_HSINE + * @arg @ref LL_CORDIC_FUNCTION_HARCTANGENT + * @arg @ref LL_CORDIC_FUNCTION_NATURALLOG + * @arg @ref LL_CORDIC_FUNCTION_SQUAREROOT + * @param Precision parameter can be one of the following values: + * @arg @ref LL_CORDIC_PRECISION_1CYCLE + * @arg @ref LL_CORDIC_PRECISION_2CYCLES + * @arg @ref LL_CORDIC_PRECISION_3CYCLES + * @arg @ref LL_CORDIC_PRECISION_4CYCLES + * @arg @ref LL_CORDIC_PRECISION_5CYCLES + * @arg @ref LL_CORDIC_PRECISION_6CYCLES + * @arg @ref LL_CORDIC_PRECISION_7CYCLES + * @arg @ref LL_CORDIC_PRECISION_8CYCLES + * @arg @ref LL_CORDIC_PRECISION_9CYCLES + * @arg @ref LL_CORDIC_PRECISION_10CYCLES + * @arg @ref LL_CORDIC_PRECISION_11CYCLES + * @arg @ref LL_CORDIC_PRECISION_12CYCLES + * @arg @ref LL_CORDIC_PRECISION_13CYCLES + * @arg @ref LL_CORDIC_PRECISION_14CYCLES + * @arg @ref LL_CORDIC_PRECISION_15CYCLES + * @param Scale parameter can be one of the following values: + * @arg @ref LL_CORDIC_SCALE_0 + * @arg @ref LL_CORDIC_SCALE_1 + * @arg @ref LL_CORDIC_SCALE_2 + * @arg @ref LL_CORDIC_SCALE_3 + * @arg @ref LL_CORDIC_SCALE_4 + * @arg @ref LL_CORDIC_SCALE_5 + * @arg @ref LL_CORDIC_SCALE_6 + * @arg @ref LL_CORDIC_SCALE_7 + * @param NbWrite parameter can be one of the following values: + * @arg @ref LL_CORDIC_NBWRITE_1 + * @arg @ref LL_CORDIC_NBWRITE_2 + * @param NbRead parameter can be one of the following values: + * @arg @ref LL_CORDIC_NBREAD_1 + * @arg @ref LL_CORDIC_NBREAD_2 + * @param InSize parameter can be one of the following values: + * @arg @ref LL_CORDIC_INSIZE_32BITS + * @arg @ref LL_CORDIC_INSIZE_16BITS + * @param OutSize parameter can be one of the following values: + * @arg @ref LL_CORDIC_OUTSIZE_32BITS + * @arg @ref LL_CORDIC_OUTSIZE_16BITS + * @retval None + */ +__STATIC_INLINE void LL_CORDIC_Config(CORDIC_TypeDef *CORDICx, uint32_t Function, uint32_t Precision, uint32_t Scale, uint32_t NbWrite, uint32_t NbRead, uint32_t InSize, uint32_t OutSize) +{ + MODIFY_REG(CORDICx->CSR, + CORDIC_CSR_FUNC | CORDIC_CSR_PRECISION | CORDIC_CSR_SCALE | + CORDIC_CSR_NARGS | CORDIC_CSR_NRES | CORDIC_CSR_ARGSIZE | CORDIC_CSR_RESSIZE, + Function | Precision | Scale | + NbWrite | NbRead | InSize | OutSize); +} + +/** + * @brief Configure function. + * @rmtoll CSR FUNC LL_CORDIC_SetFunction + * @param CORDICx CORDIC Instance + * @param Function parameter can be one of the following values: + * @arg @ref LL_CORDIC_FUNCTION_COSINE + * @arg @ref LL_CORDIC_FUNCTION_SINE + * @arg @ref LL_CORDIC_FUNCTION_PHASE + * @arg @ref LL_CORDIC_FUNCTION_MODULUS + * @arg @ref LL_CORDIC_FUNCTION_ARCTANGENT + * @arg @ref LL_CORDIC_FUNCTION_HCOSINE + * @arg @ref LL_CORDIC_FUNCTION_HSINE + * @arg @ref LL_CORDIC_FUNCTION_HARCTANGENT + * @arg @ref LL_CORDIC_FUNCTION_NATURALLOG + * @arg @ref LL_CORDIC_FUNCTION_SQUAREROOT + * @retval None + */ +__STATIC_INLINE void LL_CORDIC_SetFunction(CORDIC_TypeDef *CORDICx, uint32_t Function) +{ + MODIFY_REG(CORDICx->CSR, CORDIC_CSR_FUNC, Function); +} + +/** + * @brief Return function. + * @rmtoll CSR FUNC LL_CORDIC_GetFunction + * @param CORDICx CORDIC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_CORDIC_FUNCTION_COSINE + * @arg @ref LL_CORDIC_FUNCTION_SINE + * @arg @ref LL_CORDIC_FUNCTION_PHASE + * @arg @ref LL_CORDIC_FUNCTION_MODULUS + * @arg @ref LL_CORDIC_FUNCTION_ARCTANGENT + * @arg @ref LL_CORDIC_FUNCTION_HCOSINE + * @arg @ref LL_CORDIC_FUNCTION_HSINE + * @arg @ref LL_CORDIC_FUNCTION_HARCTANGENT + * @arg @ref LL_CORDIC_FUNCTION_NATURALLOG + * @arg @ref LL_CORDIC_FUNCTION_SQUAREROOT + */ +__STATIC_INLINE uint32_t LL_CORDIC_GetFunction(CORDIC_TypeDef *CORDICx) +{ + return (uint32_t)(READ_BIT(CORDICx->CSR, CORDIC_CSR_FUNC)); +} + +/** + * @brief Configure precision in cycles number. + * @rmtoll CSR PRECISION LL_CORDIC_SetPrecision + * @param CORDICx CORDIC Instance + * @param Precision parameter can be one of the following values: + * @arg @ref LL_CORDIC_PRECISION_1CYCLE + * @arg @ref LL_CORDIC_PRECISION_2CYCLES + * @arg @ref LL_CORDIC_PRECISION_3CYCLES + * @arg @ref LL_CORDIC_PRECISION_4CYCLES + * @arg @ref LL_CORDIC_PRECISION_5CYCLES + * @arg @ref LL_CORDIC_PRECISION_6CYCLES + * @arg @ref LL_CORDIC_PRECISION_7CYCLES + * @arg @ref LL_CORDIC_PRECISION_8CYCLES + * @arg @ref LL_CORDIC_PRECISION_9CYCLES + * @arg @ref LL_CORDIC_PRECISION_10CYCLES + * @arg @ref LL_CORDIC_PRECISION_11CYCLES + * @arg @ref LL_CORDIC_PRECISION_12CYCLES + * @arg @ref LL_CORDIC_PRECISION_13CYCLES + * @arg @ref LL_CORDIC_PRECISION_14CYCLES + * @arg @ref LL_CORDIC_PRECISION_15CYCLES + * @retval None + */ +__STATIC_INLINE void LL_CORDIC_SetPrecision(CORDIC_TypeDef *CORDICx, uint32_t Precision) +{ + MODIFY_REG(CORDICx->CSR, CORDIC_CSR_PRECISION, Precision); +} + +/** + * @brief Return precision in cycles number. + * @rmtoll CSR PRECISION LL_CORDIC_GetPrecision + * @param CORDICx CORDIC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_CORDIC_PRECISION_1CYCLE + * @arg @ref LL_CORDIC_PRECISION_2CYCLES + * @arg @ref LL_CORDIC_PRECISION_3CYCLES + * @arg @ref LL_CORDIC_PRECISION_4CYCLES + * @arg @ref LL_CORDIC_PRECISION_5CYCLES + * @arg @ref LL_CORDIC_PRECISION_6CYCLES + * @arg @ref LL_CORDIC_PRECISION_7CYCLES + * @arg @ref LL_CORDIC_PRECISION_8CYCLES + * @arg @ref LL_CORDIC_PRECISION_9CYCLES + * @arg @ref LL_CORDIC_PRECISION_10CYCLES + * @arg @ref LL_CORDIC_PRECISION_11CYCLES + * @arg @ref LL_CORDIC_PRECISION_12CYCLES + * @arg @ref LL_CORDIC_PRECISION_13CYCLES + * @arg @ref LL_CORDIC_PRECISION_14CYCLES + * @arg @ref LL_CORDIC_PRECISION_15CYCLES + */ +__STATIC_INLINE uint32_t LL_CORDIC_GetPrecision(CORDIC_TypeDef *CORDICx) +{ + return (uint32_t)(READ_BIT(CORDICx->CSR, CORDIC_CSR_PRECISION)); +} + +/** + * @brief Configure scaling factor. + * @rmtoll CSR SCALE LL_CORDIC_SetScale + * @param CORDICx CORDIC Instance + * @param Scale parameter can be one of the following values: + * @arg @ref LL_CORDIC_SCALE_0 + * @arg @ref LL_CORDIC_SCALE_1 + * @arg @ref LL_CORDIC_SCALE_2 + * @arg @ref LL_CORDIC_SCALE_3 + * @arg @ref LL_CORDIC_SCALE_4 + * @arg @ref LL_CORDIC_SCALE_5 + * @arg @ref LL_CORDIC_SCALE_6 + * @arg @ref LL_CORDIC_SCALE_7 + * @retval None + */ +__STATIC_INLINE void LL_CORDIC_SetScale(CORDIC_TypeDef *CORDICx, uint32_t Scale) +{ + MODIFY_REG(CORDICx->CSR, CORDIC_CSR_SCALE, Scale); +} + +/** + * @brief Return scaling factor. + * @rmtoll CSR SCALE LL_CORDIC_GetScale + * @param CORDICx CORDIC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_CORDIC_SCALE_0 + * @arg @ref LL_CORDIC_SCALE_1 + * @arg @ref LL_CORDIC_SCALE_2 + * @arg @ref LL_CORDIC_SCALE_3 + * @arg @ref LL_CORDIC_SCALE_4 + * @arg @ref LL_CORDIC_SCALE_5 + * @arg @ref LL_CORDIC_SCALE_6 + * @arg @ref LL_CORDIC_SCALE_7 + */ +__STATIC_INLINE uint32_t LL_CORDIC_GetScale(CORDIC_TypeDef *CORDICx) +{ + return (uint32_t)(READ_BIT(CORDICx->CSR, CORDIC_CSR_SCALE)); +} + +/** + * @brief Configure number of 32-bit write expected for one calculation. + * @rmtoll CSR NARGS LL_CORDIC_SetNbWrite + * @param CORDICx CORDIC Instance + * @param NbWrite parameter can be one of the following values: + * @arg @ref LL_CORDIC_NBWRITE_1 + * @arg @ref LL_CORDIC_NBWRITE_2 + * @retval None + */ +__STATIC_INLINE void LL_CORDIC_SetNbWrite(CORDIC_TypeDef *CORDICx, uint32_t NbWrite) +{ + MODIFY_REG(CORDICx->CSR, CORDIC_CSR_NARGS, NbWrite); +} + +/** + * @brief Return number of 32-bit write expected for one calculation. + * @rmtoll CSR NARGS LL_CORDIC_GetNbWrite + * @param CORDICx CORDIC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_CORDIC_NBWRITE_1 + * @arg @ref LL_CORDIC_NBWRITE_2 + */ +__STATIC_INLINE uint32_t LL_CORDIC_GetNbWrite(CORDIC_TypeDef *CORDICx) +{ + return (uint32_t)(READ_BIT(CORDICx->CSR, CORDIC_CSR_NARGS)); +} + +/** + * @brief Configure number of 32-bit read expected after one calculation. + * @rmtoll CSR NRES LL_CORDIC_SetNbRead + * @param CORDICx CORDIC Instance + * @param NbRead parameter can be one of the following values: + * @arg @ref LL_CORDIC_NBREAD_1 + * @arg @ref LL_CORDIC_NBREAD_2 + * @retval None + */ +__STATIC_INLINE void LL_CORDIC_SetNbRead(CORDIC_TypeDef *CORDICx, uint32_t NbRead) +{ + MODIFY_REG(CORDICx->CSR, CORDIC_CSR_NRES, NbRead); +} + +/** + * @brief Return number of 32-bit read expected after one calculation. + * @rmtoll CSR NRES LL_CORDIC_GetNbRead + * @param CORDICx CORDIC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_CORDIC_NBREAD_1 + * @arg @ref LL_CORDIC_NBREAD_2 + */ +__STATIC_INLINE uint32_t LL_CORDIC_GetNbRead(CORDIC_TypeDef *CORDICx) +{ + return (uint32_t)(READ_BIT(CORDICx->CSR, CORDIC_CSR_NRES)); +} + +/** + * @brief Configure width of input data. + * @rmtoll CSR ARGSIZE LL_CORDIC_SetInSize + * @param CORDICx CORDIC Instance + * @param InSize parameter can be one of the following values: + * @arg @ref LL_CORDIC_INSIZE_32BITS + * @arg @ref LL_CORDIC_INSIZE_16BITS + * @retval None + */ +__STATIC_INLINE void LL_CORDIC_SetInSize(CORDIC_TypeDef *CORDICx, uint32_t InSize) +{ + MODIFY_REG(CORDICx->CSR, CORDIC_CSR_ARGSIZE, InSize); +} + +/** + * @brief Return width of input data. + * @rmtoll CSR ARGSIZE LL_CORDIC_GetInSize + * @param CORDICx CORDIC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_CORDIC_INSIZE_32BITS + * @arg @ref LL_CORDIC_INSIZE_16BITS + */ +__STATIC_INLINE uint32_t LL_CORDIC_GetInSize(CORDIC_TypeDef *CORDICx) +{ + return (uint32_t)(READ_BIT(CORDICx->CSR, CORDIC_CSR_ARGSIZE)); +} + +/** + * @brief Configure width of output data. + * @rmtoll CSR RESSIZE LL_CORDIC_SetOutSize + * @param CORDICx CORDIC Instance + * @param OutSize parameter can be one of the following values: + * @arg @ref LL_CORDIC_OUTSIZE_32BITS + * @arg @ref LL_CORDIC_OUTSIZE_16BITS + * @retval None + */ +__STATIC_INLINE void LL_CORDIC_SetOutSize(CORDIC_TypeDef *CORDICx, uint32_t OutSize) +{ + MODIFY_REG(CORDICx->CSR, CORDIC_CSR_RESSIZE, OutSize); +} + +/** + * @brief Return width of output data. + * @rmtoll CSR RESSIZE LL_CORDIC_GetOutSize + * @param CORDICx CORDIC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_CORDIC_OUTSIZE_32BITS + * @arg @ref LL_CORDIC_OUTSIZE_16BITS + */ +__STATIC_INLINE uint32_t LL_CORDIC_GetOutSize(CORDIC_TypeDef *CORDICx) +{ + return (uint32_t)(READ_BIT(CORDICx->CSR, CORDIC_CSR_RESSIZE)); +} + +/** + * @} + */ + +/** @defgroup CORDIC_LL_EF_IT_Management IT_Management + * @{ + */ + +/** + * @brief Enable CORDIC result ready interrupt + * @rmtoll CSR IEN LL_CORDIC_EnableIT + * @param CORDICx CORDIC Instance + * @retval None + */ +__STATIC_INLINE void LL_CORDIC_EnableIT(CORDIC_TypeDef *CORDICx) +{ + SET_BIT(CORDICx->CSR, CORDIC_CSR_IEN); +} + +/** + * @brief Disable CORDIC result ready interrupt + * @rmtoll CSR IEN LL_CORDIC_DisableIT + * @param CORDICx CORDIC Instance + * @retval None + */ +__STATIC_INLINE void LL_CORDIC_DisableIT(CORDIC_TypeDef *CORDICx) +{ + CLEAR_BIT(CORDICx->CSR, CORDIC_CSR_IEN); +} + +/** + * @brief Check CORDIC result ready interrupt state. + * @rmtoll CSR IEN LL_CORDIC_IsEnabledIT + * @param CORDICx CORDIC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_CORDIC_IsEnabledIT(CORDIC_TypeDef *CORDICx) +{ + return ((READ_BIT(CORDICx->CSR, CORDIC_CSR_IEN) == (CORDIC_CSR_IEN)) ? 1U : 0U); +} + +/** + * @} + */ + +/** @defgroup CORDIC_LL_EF_DMA_Management DMA_Management + * @{ + */ + +/** + * @brief Enable CORDIC DMA read channel request. + * @rmtoll CSR DMAREN LL_CORDIC_EnableDMAReq_RD + * @param CORDICx CORDIC Instance + * @retval None + */ +__STATIC_INLINE void LL_CORDIC_EnableDMAReq_RD(CORDIC_TypeDef *CORDICx) +{ + SET_BIT(CORDICx->CSR, CORDIC_CSR_DMAREN); +} + +/** + * @brief Disable CORDIC DMA read channel request. + * @rmtoll CSR DMAREN LL_CORDIC_DisableDMAReq_RD + * @param CORDICx CORDIC Instance + * @retval None + */ +__STATIC_INLINE void LL_CORDIC_DisableDMAReq_RD(CORDIC_TypeDef *CORDICx) +{ + CLEAR_BIT(CORDICx->CSR, CORDIC_CSR_DMAREN); +} + +/** + * @brief Check CORDIC DMA read channel request state. + * @rmtoll CSR DMAREN LL_CORDIC_IsEnabledDMAReq_RD + * @param CORDICx CORDIC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_CORDIC_IsEnabledDMAReq_RD(CORDIC_TypeDef *CORDICx) +{ + return ((READ_BIT(CORDICx->CSR, CORDIC_CSR_DMAREN) == (CORDIC_CSR_DMAREN)) ? 1U : 0U); +} + +/** + * @brief Enable CORDIC DMA write channel request. + * @rmtoll CSR DMAWEN LL_CORDIC_EnableDMAReq_WR + * @param CORDICx CORDIC Instance + * @retval None + */ +__STATIC_INLINE void LL_CORDIC_EnableDMAReq_WR(CORDIC_TypeDef *CORDICx) +{ + SET_BIT(CORDICx->CSR, CORDIC_CSR_DMAWEN); +} + +/** + * @brief Disable CORDIC DMA write channel request. + * @rmtoll CSR DMAWEN LL_CORDIC_DisableDMAReq_WR + * @param CORDICx CORDIC Instance + * @retval None + */ +__STATIC_INLINE void LL_CORDIC_DisableDMAReq_WR(CORDIC_TypeDef *CORDICx) +{ + CLEAR_BIT(CORDICx->CSR, CORDIC_CSR_DMAWEN); +} + +/** + * @brief Check CORDIC DMA write channel request state. + * @rmtoll CSR DMAWEN LL_CORDIC_IsEnabledDMAReq_WR + * @param CORDICx CORDIC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_CORDIC_IsEnabledDMAReq_WR(CORDIC_TypeDef *CORDICx) +{ + return ((READ_BIT(CORDICx->CSR, CORDIC_CSR_DMAWEN) == (CORDIC_CSR_DMAWEN)) ? 1U : 0U); +} + +/** + * @brief Get the CORDIC data register address used for DMA transfer. + * @rmtoll RDATA RES LL_CORDIC_DMA_GetRegAddr\n + * @rmtoll WDATA ARG LL_CORDIC_DMA_GetRegAddr + * @param CORDICx CORDIC Instance + * @param Direction parameter can be one of the following values: + * @arg @ref LL_CORDIC_DMA_REG_DATA_IN + * @arg @ref LL_CORDIC_DMA_REG_DATA_OUT + * @retval Address of data register + */ +__STATIC_INLINE uint32_t LL_CORDIC_DMA_GetRegAddr(CORDIC_TypeDef *CORDICx, uint32_t Direction) +{ + uint32_t data_reg_addr; + + if (Direction == LL_CORDIC_DMA_REG_DATA_OUT) + { + /* return address of RDATA register */ + data_reg_addr = (uint32_t) & (CORDICx->RDATA); + } + else + { + /* return address of WDATA register */ + data_reg_addr = (uint32_t) & (CORDICx->WDATA); + } + + return data_reg_addr; +} + +/** + * @} + */ + +/** @defgroup CORDIC_LL_EF_FLAG_Management FLAG_Management + * @{ + */ + +/** + * @brief Check CORDIC result ready flag state. + * @rmtoll CSR RRDY LL_CORDIC_IsActiveFlag_RRDY + * @param CORDICx CORDIC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_CORDIC_IsActiveFlag_RRDY(CORDIC_TypeDef *CORDICx) +{ + return ((READ_BIT(CORDICx->CSR, CORDIC_CSR_RRDY) == (CORDIC_CSR_RRDY)) ? 1U : 0U); +} + +/** + * @} + */ + +/** @defgroup CORDIC_LL_EF_Data_Management Data_Management + * @{ + */ + +/** + * @brief Write 32-bit input data for the CORDIC processing. + * @rmtoll WDATA ARG LL_CORDIC_WriteData + * @param CORDICx CORDIC Instance + * @param InData 0 .. 0xFFFFFFFF : 32-bit value to be provided as input data for CORDIC processing. + * @retval None + */ +__STATIC_INLINE void LL_CORDIC_WriteData(CORDIC_TypeDef *CORDICx, uint32_t InData) +{ + WRITE_REG(CORDICx->WDATA, InData); +} + +/** + * @brief Return 32-bit output data of CORDIC processing. + * @rmtoll RDATA RES LL_CORDIC_ReadData + * @param CORDICx CORDIC Instance + * @retval 32-bit output data of CORDIC processing. + */ +__STATIC_INLINE uint32_t LL_CORDIC_ReadData(CORDIC_TypeDef *CORDICx) +{ + return (uint32_t)(READ_REG(CORDICx->RDATA)); +} + +/** + * @} + */ + + + +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup CORDIC_LL_EF_Init Initialization and de-initialization functions + * @{ + */ +ErrorStatus LL_CORDIC_DeInit(CORDIC_TypeDef *CORDICx); + +/** + * @} + */ +#endif /* USE_FULL_LL_DRIVER */ + +/** + * @} + */ + +/** + * @} + */ + +#endif /* defined(CORDIC) */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32H7xx_LL_CORDIC_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_dma.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_dma.h index 095202d..5dae9e1 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_dma.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_dma.h @@ -136,7 +136,7 @@ typedef struct This feature can be modified afterwards using unitary function @ref LL_DMA_SetDataLength(). */ uint32_t PeriphRequest; /*!< Specifies the peripheral request. - This parameter can be a value of @ref DMAMUX_LL_EC_REQUEST + This parameter can be a value of @ref DMAMUX1_Request_selection This feature can be modified afterwards using unitary function @ref LL_DMA_SetPeriphRequest(). */ @@ -475,7 +475,7 @@ typedef struct */ __STATIC_INLINE void LL_DMA_EnableStream(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; SET_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_EN); } @@ -497,7 +497,7 @@ __STATIC_INLINE void LL_DMA_EnableStream(DMA_TypeDef *DMAx, uint32_t Stream) */ __STATIC_INLINE void LL_DMA_DisableStream(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; CLEAR_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_EN); } @@ -519,7 +519,7 @@ __STATIC_INLINE void LL_DMA_DisableStream(DMA_TypeDef *DMAx, uint32_t Stream) */ __STATIC_INLINE uint32_t LL_DMA_IsEnabledStream(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; return ((READ_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_EN) == (DMA_SxCR_EN)) ? 1UL : 0UL); } @@ -556,7 +556,7 @@ __STATIC_INLINE uint32_t LL_DMA_IsEnabledStream(DMA_TypeDef *DMAx, uint32_t Stre */ __STATIC_INLINE void LL_DMA_ConfigTransfer(DMA_TypeDef *DMAx, uint32_t Stream, uint32_t Configuration) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; MODIFY_REG(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_DIR | DMA_SxCR_CIRC | DMA_SxCR_PINC | DMA_SxCR_MINC | DMA_SxCR_PSIZE | DMA_SxCR_MSIZE | DMA_SxCR_PL | DMA_SxCR_PFCTRL, @@ -584,7 +584,7 @@ __STATIC_INLINE void LL_DMA_ConfigTransfer(DMA_TypeDef *DMAx, uint32_t Stream, u */ __STATIC_INLINE void LL_DMA_SetDataTransferDirection(DMA_TypeDef *DMAx, uint32_t Stream, uint32_t Direction) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; MODIFY_REG(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_DIR, Direction); } @@ -609,7 +609,7 @@ __STATIC_INLINE void LL_DMA_SetDataTransferDirection(DMA_TypeDef *DMAx, uint32_t */ __STATIC_INLINE uint32_t LL_DMA_GetDataTransferDirection(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; return (READ_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_DIR)); } @@ -636,7 +636,7 @@ __STATIC_INLINE uint32_t LL_DMA_GetDataTransferDirection(DMA_TypeDef *DMAx, uint */ __STATIC_INLINE void LL_DMA_SetMode(DMA_TypeDef *DMAx, uint32_t Stream, uint32_t Mode) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; MODIFY_REG(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_CIRC | DMA_SxCR_PFCTRL, Mode); } @@ -662,7 +662,7 @@ __STATIC_INLINE void LL_DMA_SetMode(DMA_TypeDef *DMAx, uint32_t Stream, uint32_t */ __STATIC_INLINE uint32_t LL_DMA_GetMode(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; return (READ_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_CIRC | DMA_SxCR_PFCTRL)); } @@ -687,7 +687,7 @@ __STATIC_INLINE uint32_t LL_DMA_GetMode(DMA_TypeDef *DMAx, uint32_t Stream) */ __STATIC_INLINE void LL_DMA_SetPeriphIncMode(DMA_TypeDef *DMAx, uint32_t Stream, uint32_t IncrementMode) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; MODIFY_REG(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_PINC, IncrementMode); } @@ -711,7 +711,7 @@ __STATIC_INLINE void LL_DMA_SetPeriphIncMode(DMA_TypeDef *DMAx, uint32_t Stream, */ __STATIC_INLINE uint32_t LL_DMA_GetPeriphIncMode(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; return (READ_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_PINC)); } @@ -736,7 +736,7 @@ __STATIC_INLINE uint32_t LL_DMA_GetPeriphIncMode(DMA_TypeDef *DMAx, uint32_t Str */ __STATIC_INLINE void LL_DMA_SetMemoryIncMode(DMA_TypeDef *DMAx, uint32_t Stream, uint32_t IncrementMode) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; MODIFY_REG(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_MINC, IncrementMode); } @@ -760,7 +760,7 @@ __STATIC_INLINE void LL_DMA_SetMemoryIncMode(DMA_TypeDef *DMAx, uint32_t Stream, */ __STATIC_INLINE uint32_t LL_DMA_GetMemoryIncMode(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; return (READ_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_MINC)); } @@ -786,7 +786,7 @@ __STATIC_INLINE uint32_t LL_DMA_GetMemoryIncMode(DMA_TypeDef *DMAx, uint32_t Str */ __STATIC_INLINE void LL_DMA_SetPeriphSize(DMA_TypeDef *DMAx, uint32_t Stream, uint32_t Size) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; MODIFY_REG(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_PSIZE, Size); } @@ -811,7 +811,7 @@ __STATIC_INLINE void LL_DMA_SetPeriphSize(DMA_TypeDef *DMAx, uint32_t Stream, ui */ __STATIC_INLINE uint32_t LL_DMA_GetPeriphSize(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; return (READ_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_PSIZE)); } @@ -837,7 +837,7 @@ __STATIC_INLINE uint32_t LL_DMA_GetPeriphSize(DMA_TypeDef *DMAx, uint32_t Stream */ __STATIC_INLINE void LL_DMA_SetMemorySize(DMA_TypeDef *DMAx, uint32_t Stream, uint32_t Size) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; MODIFY_REG(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_MSIZE, Size); } @@ -862,7 +862,7 @@ __STATIC_INLINE void LL_DMA_SetMemorySize(DMA_TypeDef *DMAx, uint32_t Stream, ui */ __STATIC_INLINE uint32_t LL_DMA_GetMemorySize(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; return (READ_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_MSIZE)); } @@ -887,7 +887,7 @@ __STATIC_INLINE uint32_t LL_DMA_GetMemorySize(DMA_TypeDef *DMAx, uint32_t Stream */ __STATIC_INLINE void LL_DMA_SetIncOffsetSize(DMA_TypeDef *DMAx, uint32_t Stream, uint32_t OffsetSize) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; MODIFY_REG(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_PINCOS, OffsetSize); } @@ -911,7 +911,7 @@ __STATIC_INLINE void LL_DMA_SetIncOffsetSize(DMA_TypeDef *DMAx, uint32_t Stream, */ __STATIC_INLINE uint32_t LL_DMA_GetIncOffsetSize(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; return (READ_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_PINCOS)); } @@ -938,7 +938,7 @@ __STATIC_INLINE uint32_t LL_DMA_GetIncOffsetSize(DMA_TypeDef *DMAx, uint32_t Str */ __STATIC_INLINE void LL_DMA_SetStreamPriorityLevel(DMA_TypeDef *DMAx, uint32_t Stream, uint32_t Priority) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; MODIFY_REG(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_PL, Priority); } @@ -964,7 +964,7 @@ __STATIC_INLINE void LL_DMA_SetStreamPriorityLevel(DMA_TypeDef *DMAx, uint32_t S */ __STATIC_INLINE uint32_t LL_DMA_GetStreamPriorityLevel(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; return (READ_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_PL)); } @@ -986,7 +986,7 @@ __STATIC_INLINE uint32_t LL_DMA_GetStreamPriorityLevel(DMA_TypeDef *DMAx, uint32 */ __STATIC_INLINE void LL_DMA_EnableBufferableTransfer(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; SET_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_TRBUFF); } @@ -1008,7 +1008,7 @@ __STATIC_INLINE void LL_DMA_EnableBufferableTransfer(DMA_TypeDef *DMAx, uint32_t */ __STATIC_INLINE void LL_DMA_DisableBufferableTransfer(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; CLEAR_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_TRBUFF); } @@ -1033,7 +1033,7 @@ __STATIC_INLINE void LL_DMA_DisableBufferableTransfer(DMA_TypeDef *DMAx, uint32_ */ __STATIC_INLINE void LL_DMA_SetDataLength(DMA_TypeDef *DMAx, uint32_t Stream, uint32_t NbData) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; MODIFY_REG(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->NDTR, DMA_SxNDT, NbData); } @@ -1057,7 +1057,7 @@ __STATIC_INLINE void LL_DMA_SetDataLength(DMA_TypeDef *DMAx, uint32_t Stream, ui */ __STATIC_INLINE uint32_t LL_DMA_GetDataLength(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; return (READ_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->NDTR, DMA_SxNDT)); } @@ -1151,7 +1151,7 @@ __STATIC_INLINE uint32_t LL_DMA_GetDataLength(DMA_TypeDef *DMAx, uint32_t Stream * @arg @ref LL_DMAMUX1_REQ_USART6_TX * @arg @ref LL_DMAMUX1_REQ_I2C3_RX * @arg @ref LL_DMAMUX1_REQ_I2C3_TX - * @arg @ref LL_DMAMUX1_REQ_DCMI_PSSI + * @arg @ref LL_DMAMUX1_REQ_DCMI_PSSI (*) * @arg @ref LL_DMAMUX1_REQ_CRYP_IN * @arg @ref LL_DMAMUX1_REQ_CRYP_OUT * @arg @ref LL_DMAMUX1_REQ_HASH_IN @@ -1165,8 +1165,8 @@ __STATIC_INLINE uint32_t LL_DMA_GetDataLength(DMA_TypeDef *DMAx, uint32_t Stream * @arg @ref LL_DMAMUX1_REQ_SPI5_TX * @arg @ref LL_DMAMUX1_REQ_SAI1_A * @arg @ref LL_DMAMUX1_REQ_SAI1_B - * @arg @ref LL_DMAMUX1_REQ_SAI2_A - * @arg @ref LL_DMAMUX1_REQ_SAI2_B + * @arg @ref LL_DMAMUX1_REQ_SAI2_A (*) + * @arg @ref LL_DMAMUX1_REQ_SAI2_B (*) * @arg @ref LL_DMAMUX1_REQ_SWPMI_RX * @arg @ref LL_DMAMUX1_REQ_SWPMI_TX * @arg @ref LL_DMAMUX1_REQ_SPDIF_RX_DT @@ -1193,9 +1193,28 @@ __STATIC_INLINE uint32_t LL_DMA_GetDataLength(DMA_TypeDef *DMAx, uint32_t Stream * @arg @ref LL_DMAMUX1_REQ_SAI3_B (*) * @arg @ref LL_DMAMUX1_REQ_ADC3 (*) * @arg @ref LL_DMAMUX1_REQ_UART9_RX (*) - * @arg @ref LL_DMAMUX1_REQ_UART9_RX (*) - * @arg @ref LL_DMAMUX1_REQ_USART10_RX (*) + * @arg @ref LL_DMAMUX1_REQ_UART9_TX (*) * @arg @ref LL_DMAMUX1_REQ_USART10_RX (*) + * @arg @ref LL_DMAMUX1_REQ_USART10_TX (*) + * @arg @ref LL_DMAMUX1_REQ_FMAC_READ (*) + * @arg @ref LL_DMAMUX1_REQ_FMAC_WRITE (*) + * @arg @ref LL_DMAMUX1_REQ_CORDIC_READ (*) + * @arg @ref LL_DMAMUX1_REQ_CORDIC_WRITE(*) + * @arg @ref LL_DMAMUX1_REQ_I2C5_RX (*) + * @arg @ref LL_DMAMUX1_REQ_I2C5_TX (*) + * @arg @ref LL_DMAMUX1_REQ_TIM23_CH1 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM23_CH2 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM23_CH3 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM23_CH4 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM23_UP (*) + * @arg @ref LL_DMAMUX1_REQ_TIM23_TRIG (*) + * @arg @ref LL_DMAMUX1_REQ_TIM24_CH1 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM24_CH2 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM24_CH3 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM24_CH4 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM24_UP (*) + * @arg @ref LL_DMAMUX1_REQ_TIM24_TRIG (*) + * * @note (*) Availability depends on devices. * @retval None */ @@ -1294,7 +1313,7 @@ __STATIC_INLINE void LL_DMA_SetPeriphRequest(DMA_TypeDef *DMAx, uint32_t Stream, * @arg @ref LL_DMAMUX1_REQ_USART6_TX * @arg @ref LL_DMAMUX1_REQ_I2C3_RX * @arg @ref LL_DMAMUX1_REQ_I2C3_TX - * @arg @ref LL_DMAMUX1_REQ_DCMI_PSSI + * @arg @ref LL_DMAMUX1_REQ_DCMI_PSSI (*) * @arg @ref LL_DMAMUX1_REQ_CRYP_IN * @arg @ref LL_DMAMUX1_REQ_CRYP_OUT * @arg @ref LL_DMAMUX1_REQ_HASH_IN @@ -1308,8 +1327,8 @@ __STATIC_INLINE void LL_DMA_SetPeriphRequest(DMA_TypeDef *DMAx, uint32_t Stream, * @arg @ref LL_DMAMUX1_REQ_SPI5_TX * @arg @ref LL_DMAMUX1_REQ_SAI1_A * @arg @ref LL_DMAMUX1_REQ_SAI1_B - * @arg @ref LL_DMAMUX1_REQ_SAI2_A - * @arg @ref LL_DMAMUX1_REQ_SAI2_B + * @arg @ref LL_DMAMUX1_REQ_SAI2_A (*) + * @arg @ref LL_DMAMUX1_REQ_SAI2_B (*) * @arg @ref LL_DMAMUX1_REQ_SWPMI_RX * @arg @ref LL_DMAMUX1_REQ_SWPMI_TX * @arg @ref LL_DMAMUX1_REQ_SPDIF_RX_DT @@ -1336,9 +1355,28 @@ __STATIC_INLINE void LL_DMA_SetPeriphRequest(DMA_TypeDef *DMAx, uint32_t Stream, * @arg @ref LL_DMAMUX1_REQ_SAI3_B (*) * @arg @ref LL_DMAMUX1_REQ_ADC3 (*) * @arg @ref LL_DMAMUX1_REQ_UART9_RX (*) - * @arg @ref LL_DMAMUX1_REQ_UART9_RX (*) - * @arg @ref LL_DMAMUX1_REQ_USART10_RX (*) + * @arg @ref LL_DMAMUX1_REQ_UART9_TX (*) * @arg @ref LL_DMAMUX1_REQ_USART10_RX (*) + * @arg @ref LL_DMAMUX1_REQ_USART10_TX (*) + * @arg @ref LL_DMAMUX1_REQ_FMAC_READ (*) + * @arg @ref LL_DMAMUX1_REQ_FMAC_WRITE (*) + * @arg @ref LL_DMAMUX1_REQ_CORDIC_READ (*) + * @arg @ref LL_DMAMUX1_REQ_CORDIC_WRITE(*) + * @arg @ref LL_DMAMUX1_REQ_I2C5_RX (*) + * @arg @ref LL_DMAMUX1_REQ_I2C5_TX (*) + * @arg @ref LL_DMAMUX1_REQ_TIM23_CH1 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM23_CH2 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM23_CH3 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM23_CH4 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM23_UP (*) + * @arg @ref LL_DMAMUX1_REQ_TIM23_TRIG (*) + * @arg @ref LL_DMAMUX1_REQ_TIM24_CH1 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM24_CH2 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM24_CH3 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM24_CH4 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM24_UP (*) + * @arg @ref LL_DMAMUX1_REQ_TIM24_TRIG (*) + * * @note (*) Availability depends on devices. */ __STATIC_INLINE uint32_t LL_DMA_GetPeriphRequest(DMA_TypeDef *DMAx, uint32_t Stream) @@ -1368,7 +1406,7 @@ __STATIC_INLINE uint32_t LL_DMA_GetPeriphRequest(DMA_TypeDef *DMAx, uint32_t St */ __STATIC_INLINE void LL_DMA_SetMemoryBurstxfer(DMA_TypeDef *DMAx, uint32_t Stream, uint32_t Mburst) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; MODIFY_REG(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_MBURST, Mburst); } @@ -1394,7 +1432,7 @@ __STATIC_INLINE void LL_DMA_SetMemoryBurstxfer(DMA_TypeDef *DMAx, uint32_t Strea */ __STATIC_INLINE uint32_t LL_DMA_GetMemoryBurstxfer(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; return (READ_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_MBURST)); } @@ -1421,7 +1459,7 @@ __STATIC_INLINE uint32_t LL_DMA_GetMemoryBurstxfer(DMA_TypeDef *DMAx, uint32_t S */ __STATIC_INLINE void LL_DMA_SetPeriphBurstxfer(DMA_TypeDef *DMAx, uint32_t Stream, uint32_t Pburst) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; MODIFY_REG(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_PBURST, Pburst); } @@ -1447,7 +1485,7 @@ __STATIC_INLINE void LL_DMA_SetPeriphBurstxfer(DMA_TypeDef *DMAx, uint32_t Strea */ __STATIC_INLINE uint32_t LL_DMA_GetPeriphBurstxfer(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; return (READ_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_PBURST)); } @@ -1472,7 +1510,7 @@ __STATIC_INLINE uint32_t LL_DMA_GetPeriphBurstxfer(DMA_TypeDef *DMAx, uint32_t S */ __STATIC_INLINE void LL_DMA_SetCurrentTargetMem(DMA_TypeDef *DMAx, uint32_t Stream, uint32_t CurrentMemory) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; MODIFY_REG(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_CT, CurrentMemory); } @@ -1496,7 +1534,7 @@ __STATIC_INLINE void LL_DMA_SetCurrentTargetMem(DMA_TypeDef *DMAx, uint32_t Stre */ __STATIC_INLINE uint32_t LL_DMA_GetCurrentTargetMem(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; return (READ_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_CT)); } @@ -1518,7 +1556,7 @@ __STATIC_INLINE uint32_t LL_DMA_GetCurrentTargetMem(DMA_TypeDef *DMAx, uint32_t */ __STATIC_INLINE void LL_DMA_EnableDoubleBufferMode(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; SET_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_DBM); } @@ -1540,7 +1578,7 @@ __STATIC_INLINE void LL_DMA_EnableDoubleBufferMode(DMA_TypeDef *DMAx, uint32_t S */ __STATIC_INLINE void LL_DMA_DisableDoubleBufferMode(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; CLEAR_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_DBM); } @@ -1568,7 +1606,7 @@ __STATIC_INLINE void LL_DMA_DisableDoubleBufferMode(DMA_TypeDef *DMAx, uint32_t */ __STATIC_INLINE uint32_t LL_DMA_GetFIFOStatus(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; return (READ_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->FCR, DMA_SxFCR_FS)); } @@ -1590,7 +1628,7 @@ __STATIC_INLINE uint32_t LL_DMA_GetFIFOStatus(DMA_TypeDef *DMAx, uint32_t Stream */ __STATIC_INLINE void LL_DMA_DisableFifoMode(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; CLEAR_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->FCR, DMA_SxFCR_DMDIS); } @@ -1612,7 +1650,7 @@ __STATIC_INLINE void LL_DMA_DisableFifoMode(DMA_TypeDef *DMAx, uint32_t Stream) */ __STATIC_INLINE void LL_DMA_EnableFifoMode(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; SET_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->FCR, DMA_SxFCR_DMDIS); } @@ -1639,7 +1677,7 @@ __STATIC_INLINE void LL_DMA_EnableFifoMode(DMA_TypeDef *DMAx, uint32_t Stream) */ __STATIC_INLINE void LL_DMA_SetFIFOThreshold(DMA_TypeDef *DMAx, uint32_t Stream, uint32_t Threshold) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; MODIFY_REG(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->FCR, DMA_SxFCR_FTH, Threshold); } @@ -1665,7 +1703,7 @@ __STATIC_INLINE void LL_DMA_SetFIFOThreshold(DMA_TypeDef *DMAx, uint32_t Stream, */ __STATIC_INLINE uint32_t LL_DMA_GetFIFOThreshold(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; return (READ_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->FCR, DMA_SxFCR_FTH)); } @@ -1696,7 +1734,7 @@ __STATIC_INLINE uint32_t LL_DMA_GetFIFOThreshold(DMA_TypeDef *DMAx, uint32_t Str */ __STATIC_INLINE void LL_DMA_ConfigFifo(DMA_TypeDef *DMAx, uint32_t Stream, uint32_t FifoMode, uint32_t FifoThreshold) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; MODIFY_REG(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->FCR, DMA_SxFCR_FTH | DMA_SxFCR_DMDIS, FifoMode | FifoThreshold); } @@ -1726,7 +1764,7 @@ __STATIC_INLINE void LL_DMA_ConfigFifo(DMA_TypeDef *DMAx, uint32_t Stream, uint3 */ __STATIC_INLINE void LL_DMA_ConfigAddresses(DMA_TypeDef *DMAx, uint32_t Stream, uint32_t SrcAddress, uint32_t DstAddress, uint32_t Direction) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; /* Direction Memory to Periph */ if (Direction == LL_DMA_DIRECTION_MEMORY_TO_PERIPH) @@ -1762,7 +1800,7 @@ __STATIC_INLINE void LL_DMA_ConfigAddresses(DMA_TypeDef *DMAx, uint32_t Stream, */ __STATIC_INLINE void LL_DMA_SetMemoryAddress(DMA_TypeDef *DMAx, uint32_t Stream, uint32_t MemoryAddress) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; WRITE_REG(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->M0AR, MemoryAddress); } @@ -1787,7 +1825,7 @@ __STATIC_INLINE void LL_DMA_SetMemoryAddress(DMA_TypeDef *DMAx, uint32_t Stream, */ __STATIC_INLINE void LL_DMA_SetPeriphAddress(DMA_TypeDef *DMAx, uint32_t Stream, uint32_t PeriphAddress) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; WRITE_REG(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->PAR, PeriphAddress); } @@ -1810,7 +1848,7 @@ __STATIC_INLINE void LL_DMA_SetPeriphAddress(DMA_TypeDef *DMAx, uint32_t Stream, */ __STATIC_INLINE uint32_t LL_DMA_GetMemoryAddress(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; return (READ_REG(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->M0AR)); } @@ -1833,7 +1871,7 @@ __STATIC_INLINE uint32_t LL_DMA_GetMemoryAddress(DMA_TypeDef *DMAx, uint32_t Str */ __STATIC_INLINE uint32_t LL_DMA_GetPeriphAddress(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; return (READ_REG(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->PAR)); } @@ -1858,7 +1896,7 @@ __STATIC_INLINE uint32_t LL_DMA_GetPeriphAddress(DMA_TypeDef *DMAx, uint32_t Str */ __STATIC_INLINE void LL_DMA_SetM2MSrcAddress(DMA_TypeDef *DMAx, uint32_t Stream, uint32_t MemoryAddress) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; WRITE_REG(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->PAR, MemoryAddress); } @@ -1883,7 +1921,7 @@ __STATIC_INLINE void LL_DMA_SetM2MSrcAddress(DMA_TypeDef *DMAx, uint32_t Stream, */ __STATIC_INLINE void LL_DMA_SetM2MDstAddress(DMA_TypeDef *DMAx, uint32_t Stream, uint32_t MemoryAddress) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; WRITE_REG(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->M0AR, MemoryAddress); } @@ -1906,7 +1944,7 @@ __STATIC_INLINE void LL_DMA_SetM2MDstAddress(DMA_TypeDef *DMAx, uint32_t Stream, */ __STATIC_INLINE uint32_t LL_DMA_GetM2MSrcAddress(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; return (READ_REG(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->PAR)); } @@ -1929,7 +1967,7 @@ __STATIC_INLINE uint32_t LL_DMA_GetM2MSrcAddress(DMA_TypeDef *DMAx, uint32_t Str */ __STATIC_INLINE uint32_t LL_DMA_GetM2MDstAddress(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; return (READ_REG(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->M0AR)); } @@ -1952,7 +1990,7 @@ __STATIC_INLINE uint32_t LL_DMA_GetM2MDstAddress(DMA_TypeDef *DMAx, uint32_t Str */ __STATIC_INLINE void LL_DMA_SetMemory1Address(DMA_TypeDef *DMAx, uint32_t Stream, uint32_t Address) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; MODIFY_REG(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->M1AR, DMA_SxM1AR_M1A, Address); } @@ -1974,7 +2012,7 @@ __STATIC_INLINE void LL_DMA_SetMemory1Address(DMA_TypeDef *DMAx, uint32_t Stream */ __STATIC_INLINE uint32_t LL_DMA_GetMemory1Address(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; return (((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->M1AR); } @@ -2892,7 +2930,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_FE7(DMA_TypeDef *DMAx) */ __STATIC_INLINE void LL_DMA_EnableIT_HT(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; SET_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_HTIE); } @@ -2914,7 +2952,7 @@ __STATIC_INLINE void LL_DMA_EnableIT_HT(DMA_TypeDef *DMAx, uint32_t Stream) */ __STATIC_INLINE void LL_DMA_EnableIT_TE(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; SET_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_TEIE); } @@ -2936,7 +2974,7 @@ __STATIC_INLINE void LL_DMA_EnableIT_TE(DMA_TypeDef *DMAx, uint32_t Stream) */ __STATIC_INLINE void LL_DMA_EnableIT_TC(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; SET_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_TCIE); } @@ -2958,7 +2996,7 @@ __STATIC_INLINE void LL_DMA_EnableIT_TC(DMA_TypeDef *DMAx, uint32_t Stream) */ __STATIC_INLINE void LL_DMA_EnableIT_DME(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; SET_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_DMEIE); } @@ -2980,7 +3018,7 @@ __STATIC_INLINE void LL_DMA_EnableIT_DME(DMA_TypeDef *DMAx, uint32_t Stream) */ __STATIC_INLINE void LL_DMA_EnableIT_FE(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; SET_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->FCR, DMA_SxFCR_FEIE); } @@ -3002,7 +3040,7 @@ __STATIC_INLINE void LL_DMA_EnableIT_FE(DMA_TypeDef *DMAx, uint32_t Stream) */ __STATIC_INLINE void LL_DMA_DisableIT_HT(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; CLEAR_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_HTIE); } @@ -3024,7 +3062,7 @@ __STATIC_INLINE void LL_DMA_DisableIT_HT(DMA_TypeDef *DMAx, uint32_t Stream) */ __STATIC_INLINE void LL_DMA_DisableIT_TE(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; CLEAR_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_TEIE); } @@ -3046,7 +3084,7 @@ __STATIC_INLINE void LL_DMA_DisableIT_TE(DMA_TypeDef *DMAx, uint32_t Stream) */ __STATIC_INLINE void LL_DMA_DisableIT_TC(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; CLEAR_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_TCIE); } @@ -3068,7 +3106,7 @@ __STATIC_INLINE void LL_DMA_DisableIT_TC(DMA_TypeDef *DMAx, uint32_t Stream) */ __STATIC_INLINE void LL_DMA_DisableIT_DME(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; CLEAR_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_DMEIE); } @@ -3090,7 +3128,7 @@ __STATIC_INLINE void LL_DMA_DisableIT_DME(DMA_TypeDef *DMAx, uint32_t Stream) */ __STATIC_INLINE void LL_DMA_DisableIT_FE(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; CLEAR_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->FCR, DMA_SxFCR_FEIE); } @@ -3112,7 +3150,7 @@ __STATIC_INLINE void LL_DMA_DisableIT_FE(DMA_TypeDef *DMAx, uint32_t Stream) */ __STATIC_INLINE uint32_t LL_DMA_IsEnabledIT_HT(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; return ((READ_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_HTIE) == DMA_SxCR_HTIE) ? 1UL : 0UL); } @@ -3134,7 +3172,7 @@ __STATIC_INLINE uint32_t LL_DMA_IsEnabledIT_HT(DMA_TypeDef *DMAx, uint32_t Strea */ __STATIC_INLINE uint32_t LL_DMA_IsEnabledIT_TE(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; return ((READ_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_TEIE) == DMA_SxCR_TEIE) ? 1UL : 0UL); } @@ -3156,7 +3194,7 @@ __STATIC_INLINE uint32_t LL_DMA_IsEnabledIT_TE(DMA_TypeDef *DMAx, uint32_t Strea */ __STATIC_INLINE uint32_t LL_DMA_IsEnabledIT_TC(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; return ((READ_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_TCIE) == DMA_SxCR_TCIE) ? 1UL : 0UL); } @@ -3178,7 +3216,7 @@ __STATIC_INLINE uint32_t LL_DMA_IsEnabledIT_TC(DMA_TypeDef *DMAx, uint32_t Strea */ __STATIC_INLINE uint32_t LL_DMA_IsEnabledIT_DME(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; return ((READ_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->CR, DMA_SxCR_DMEIE) == DMA_SxCR_DMEIE) ? 1UL : 0UL); } @@ -3200,7 +3238,7 @@ __STATIC_INLINE uint32_t LL_DMA_IsEnabledIT_DME(DMA_TypeDef *DMAx, uint32_t Stre */ __STATIC_INLINE uint32_t LL_DMA_IsEnabledIT_FE(DMA_TypeDef *DMAx, uint32_t Stream) { - register uint32_t dma_base_addr = (uint32_t)DMAx; + uint32_t dma_base_addr = (uint32_t)DMAx; return ((READ_BIT(((DMA_Stream_TypeDef *)(dma_base_addr + LL_DMA_STR_OFFSET_TAB[Stream]))->FCR, DMA_SxFCR_FEIE) == DMA_SxFCR_FEIE) ? 1UL : 0UL); } diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_dma2d.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_dma2d.h index 68b687b..6bfc467 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_dma2d.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_dma2d.h @@ -783,7 +783,6 @@ __STATIC_INLINE void LL_DMA2D_SetLineOffset(DMA2D_TypeDef *DMA2Dx, uint32_t Line * @rmtoll OOR LO LL_DMA2D_GetLineOffset * @param DMA2Dx DMA2D Instance * @retval Line offset value between Min_Data=0 and Max_Data=0xFFFF - @endif */ __STATIC_INLINE uint32_t LL_DMA2D_GetLineOffset(DMA2D_TypeDef *DMA2Dx) { diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_dmamux.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_dmamux.h index f84f0e6..24cb555 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_dmamux.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_dmamux.h @@ -141,8 +141,8 @@ extern "C" { * @} */ -/** @defgroup DMAMUX_Request_selection DMAMUX Request selection - * @brief DMA Request selection +/** @defgroup DMAMUX1_Request_selection DMAMUX1 Request selection + * @brief DMAMUX1 Request selection * @{ */ /* DMAMUX1 requests */ @@ -239,8 +239,10 @@ extern "C" { #define LL_DMAMUX1_REQ_SPI5_TX 86U /*!< DMAMUX1 SPI5 TX request */ #define LL_DMAMUX1_REQ_SAI1_A 87U /*!< DMAMUX1 SAI1 A request */ #define LL_DMAMUX1_REQ_SAI1_B 88U /*!< DMAMUX1 SAI1 B request */ +#if defined(SAI2) #define LL_DMAMUX1_REQ_SAI2_A 89U /*!< DMAMUX1 SAI2 A request */ #define LL_DMAMUX1_REQ_SAI2_B 90U /*!< DMAMUX1 SAI2 B request */ +#endif /* SAI2 */ #define LL_DMAMUX1_REQ_SWPMI_RX 91U /*!< DMAMUX1 SWPMI RX request */ #define LL_DMAMUX1_REQ_SWPMI_TX 92U /*!< DMAMUX1 SWPMI TX request */ #define LL_DMAMUX1_REQ_SPDIF_RX_DT 93U /*!< DMAMUX1 SPDIF RXDT request */ @@ -280,7 +282,42 @@ extern "C" { #define LL_DMAMUX1_REQ_USART10_RX 118U /*!< DMAMUX1 USART10 RX request */ #define LL_DMAMUX1_REQ_USART10_TX 119U /*!< DMAMUX1 USART10 TX request */ #endif /* USART10 */ +#if defined(FMAC) +#define LL_DMAMUX1_REQ_FMAC_READ 120U /*!< DMAMUX1 FMAC Read request */ +#define LL_DMAMUX1_REQ_FMAC_WRITE 121U /*!< DMAMUX1 FMAC Write request */ +#endif /* FMAC */ +#if defined(CORDIC) +#define LL_DMAMUX1_REQ_CORDIC_READ 122U /*!< DMAMUX1 CORDIC Read request */ +#define LL_DMAMUX1_REQ_CORDIC_WRITE 123U /*!< DMAMUX1 CORDIC Write request */ +#endif /* CORDIC */ +#if defined(I2C5) +#define LL_DMAMUX1_REQ_I2C5_RX 124U /*!< DMAMUX1 I2C5 RX request */ +#define LL_DMAMUX1_REQ_I2C5_TX 125U /*!< DMAMUX1 I2C5 TX request */ +#endif /* I2C5 */ +#if defined(TIM23) +#define LL_DMAMUX1_REQ_TIM23_CH1 126U /*!< DMAMUX1 TIM23 CH1 request */ +#define LL_DMAMUX1_REQ_TIM23_CH2 127U /*!< DMAMUX1 TIM23 CH2 request */ +#define LL_DMAMUX1_REQ_TIM23_CH3 128U /*!< DMAMUX1 TIM23 CH3 request */ +#define LL_DMAMUX1_REQ_TIM23_CH4 129U /*!< DMAMUX1 TIM23 CH4 request */ +#define LL_DMAMUX1_REQ_TIM23_UP 130U /*!< DMAMUX1 TIM23 UP request */ +#define LL_DMAMUX1_REQ_TIM23_TRIG 131U /*!< DMAMUX1 TIM23 TRIG request */ +#endif /* TIM23 */ +#if defined(TIM24) +#define LL_DMAMUX1_REQ_TIM24_CH1 132U /*!< DMAMUX1 TIM24 CH1 request */ +#define LL_DMAMUX1_REQ_TIM24_CH2 133U /*!< DMAMUX1 TIM24 CH2 request */ +#define LL_DMAMUX1_REQ_TIM24_CH3 134U /*!< DMAMUX1 TIM24 CH3 request */ +#define LL_DMAMUX1_REQ_TIM24_CH4 135U /*!< DMAMUX1 TIM24 CH4 request */ +#define LL_DMAMUX1_REQ_TIM24_UP 136U /*!< DMAMUX1 TIM24 UP request */ +#define LL_DMAMUX1_REQ_TIM24_TRIG 137U /*!< DMAMUX1 TIM24 TRIG request */ +#endif /* TIM24 */ +/** + * @} + */ +/** @defgroup DMAMUX2_Request_selection DMAMUX2 Request selection + * @brief DMAMUX2 Request selection + * @{ + */ /* DMAMUX2 requests */ #define LL_DMAMUX2_REQ_MEM2MEM 0U /*!< memory to memory transfer */ #define LL_DMAMUX2_REQ_GENERATOR0 1U /*!< DMAMUX2 request generator 0 */ @@ -603,7 +640,7 @@ extern "C" { * @arg @ref LL_DMAMUX1_REQ_USART6_TX * @arg @ref LL_DMAMUX1_REQ_I2C3_RX * @arg @ref LL_DMAMUX1_REQ_I2C3_TX - * @arg @ref LL_DMAMUX1_REQ_DCMI_PSSI + * @arg @ref LL_DMAMUX1_REQ_DCMI_PSSI (*) * @arg @ref LL_DMAMUX1_REQ_CRYP_IN * @arg @ref LL_DMAMUX1_REQ_CRYP_OUT * @arg @ref LL_DMAMUX1_REQ_HASH_IN @@ -617,8 +654,8 @@ extern "C" { * @arg @ref LL_DMAMUX1_REQ_SPI5_TX * @arg @ref LL_DMAMUX1_REQ_SAI1_A * @arg @ref LL_DMAMUX1_REQ_SAI1_B - * @arg @ref LL_DMAMUX1_REQ_SAI2_A - * @arg @ref LL_DMAMUX1_REQ_SAI2_B + * @arg @ref LL_DMAMUX1_REQ_SAI2_A (*) + * @arg @ref LL_DMAMUX1_REQ_SAI2_B (*) * @arg @ref LL_DMAMUX1_REQ_SWPMI_RX * @arg @ref LL_DMAMUX1_REQ_SWPMI_TX * @arg @ref LL_DMAMUX1_REQ_SPDIF_RX_DT @@ -648,6 +685,24 @@ extern "C" { * @arg @ref LL_DMAMUX1_REQ_UART9_TX (*) * @arg @ref LL_DMAMUX1_REQ_USART10_RX (*) * @arg @ref LL_DMAMUX1_REQ_USART10_TX (*) + * @arg @ref LL_DMAMUX1_REQ_FMAC_READ (*) + * @arg @ref LL_DMAMUX1_REQ_FMAC_WRITE (*) + * @arg @ref LL_DMAMUX1_REQ_CORDIC_READ (*) + * @arg @ref LL_DMAMUX1_REQ_CORDIC_WRITE(*) + * @arg @ref LL_DMAMUX1_REQ_I2C5_RX (*) + * @arg @ref LL_DMAMUX1_REQ_I2C5_TX (*) + * @arg @ref LL_DMAMUX1_REQ_TIM23_CH1 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM23_CH2 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM23_CH3 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM23_CH4 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM23_UP (*) + * @arg @ref LL_DMAMUX1_REQ_TIM23_TRIG (*) + * @arg @ref LL_DMAMUX1_REQ_TIM24_CH1 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM24_CH2 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM24_CH3 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM24_CH4 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM24_UP (*) + * @arg @ref LL_DMAMUX1_REQ_TIM24_TRIG (*) * @arg @ref LL_DMAMUX2_REQ_MEM2MEM * @arg @ref LL_DMAMUX2_REQ_GENERATOR0 * @arg @ref LL_DMAMUX2_REQ_GENERATOR1 @@ -668,12 +723,13 @@ extern "C" { * @arg @ref LL_DMAMUX2_REQ_ADC3 (*) * @arg @ref LL_DMAMUX2_REQ_DAC2_CH1 (*) * @arg @ref LL_DMAMUX2_REQ_DFSDM2_FLT0 (*) + * * @note (*) Availability depends on devices. * @retval None */ __STATIC_INLINE void LL_DMAMUX_SetRequestID(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel, uint32_t Request) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; MODIFY_REG(((DMAMUX_Channel_TypeDef *)(dmamux_base_addr + (DMAMUX_CCR_SIZE * (Channel))))->CCR, DMAMUX_CxCR_DMAREQ_ID, Request); } @@ -777,7 +833,7 @@ __STATIC_INLINE void LL_DMAMUX_SetRequestID(DMAMUX_Channel_TypeDef *DMAMUXx, uin * @arg @ref LL_DMAMUX1_REQ_USART6_TX * @arg @ref LL_DMAMUX1_REQ_I2C3_RX * @arg @ref LL_DMAMUX1_REQ_I2C3_TX - * @arg @ref LL_DMAMUX1_REQ_DCMI_PSSI + * @arg @ref LL_DMAMUX1_REQ_DCMI_PSSI (*) * @arg @ref LL_DMAMUX1_REQ_CRYP_IN * @arg @ref LL_DMAMUX1_REQ_CRYP_OUT * @arg @ref LL_DMAMUX1_REQ_HASH_IN @@ -791,8 +847,8 @@ __STATIC_INLINE void LL_DMAMUX_SetRequestID(DMAMUX_Channel_TypeDef *DMAMUXx, uin * @arg @ref LL_DMAMUX1_REQ_SPI5_TX * @arg @ref LL_DMAMUX1_REQ_SAI1_A * @arg @ref LL_DMAMUX1_REQ_SAI1_B - * @arg @ref LL_DMAMUX1_REQ_SAI2_A - * @arg @ref LL_DMAMUX1_REQ_SAI2_B + * @arg @ref LL_DMAMUX1_REQ_SAI2_A (*) + * @arg @ref LL_DMAMUX1_REQ_SAI2_B (*) * @arg @ref LL_DMAMUX1_REQ_SWPMI_RX * @arg @ref LL_DMAMUX1_REQ_SWPMI_TX * @arg @ref LL_DMAMUX1_REQ_SPDIF_RX_DT @@ -822,6 +878,24 @@ __STATIC_INLINE void LL_DMAMUX_SetRequestID(DMAMUX_Channel_TypeDef *DMAMUXx, uin * @arg @ref LL_DMAMUX1_REQ_UART9_TX (*) * @arg @ref LL_DMAMUX1_REQ_USART10_RX (*) * @arg @ref LL_DMAMUX1_REQ_USART10_TX (*) + * @arg @ref LL_DMAMUX1_REQ_FMAC_READ (*) + * @arg @ref LL_DMAMUX1_REQ_FMAC_WRITE (*) + * @arg @ref LL_DMAMUX1_REQ_CORDIC_READ (*) + * @arg @ref LL_DMAMUX1_REQ_CORDIC_WRITE(*) + * @arg @ref LL_DMAMUX1_REQ_I2C5_RX (*) + * @arg @ref LL_DMAMUX1_REQ_I2C5_TX (*) + * @arg @ref LL_DMAMUX1_REQ_TIM23_CH1 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM23_CH2 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM23_CH3 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM23_CH4 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM23_UP (*) + * @arg @ref LL_DMAMUX1_REQ_TIM23_TRIG (*) + * @arg @ref LL_DMAMUX1_REQ_TIM24_CH1 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM24_CH2 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM24_CH3 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM24_CH4 (*) + * @arg @ref LL_DMAMUX1_REQ_TIM24_UP (*) + * @arg @ref LL_DMAMUX1_REQ_TIM24_TRIG (*) * @arg @ref LL_DMAMUX2_REQ_MEM2MEM * @arg @ref LL_DMAMUX2_REQ_GENERATOR0 * @arg @ref LL_DMAMUX2_REQ_GENERATOR1 @@ -842,12 +916,13 @@ __STATIC_INLINE void LL_DMAMUX_SetRequestID(DMAMUX_Channel_TypeDef *DMAMUXx, uin * @arg @ref LL_DMAMUX2_REQ_ADC3 (*) * @arg @ref LL_DMAMUX2_REQ_DAC2_CH1 (*) * @arg @ref LL_DMAMUX2_REQ_DFSDM2_FLT0 (*) + * * @note (*) Availability depends on devices. * @retval None */ __STATIC_INLINE uint32_t LL_DMAMUX_GetRequestID(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return (uint32_t)(READ_BIT(((DMAMUX_Channel_TypeDef *)(dmamux_base_addr + (DMAMUX_CCR_SIZE * (Channel))))->CCR, DMAMUX_CxCR_DMAREQ_ID)); } @@ -878,7 +953,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_GetRequestID(DMAMUX_Channel_TypeDef *DMAMUXx, */ __STATIC_INLINE void LL_DMAMUX_SetSyncRequestNb(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel, uint32_t RequestNb) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; MODIFY_REG(((DMAMUX_Channel_TypeDef *)(dmamux_base_addr + (DMAMUX_CCR_SIZE * (Channel))))->CCR, DMAMUX_CxCR_NBREQ, (RequestNb - 1U) << DMAMUX_CxCR_NBREQ_Pos); } @@ -908,7 +983,7 @@ __STATIC_INLINE void LL_DMAMUX_SetSyncRequestNb(DMAMUX_Channel_TypeDef *DMAMUXx, */ __STATIC_INLINE uint32_t LL_DMAMUX_GetSyncRequestNb(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return (uint32_t)((READ_BIT(((DMAMUX_Channel_TypeDef *)(dmamux_base_addr + (DMAMUX_CCR_SIZE * (Channel))))->CCR, DMAMUX_CxCR_NBREQ) >> DMAMUX_CxCR_NBREQ_Pos) + 1U); } @@ -943,7 +1018,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_GetSyncRequestNb(DMAMUX_Channel_TypeDef *DMAM */ __STATIC_INLINE void LL_DMAMUX_SetSyncPolarity(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel, uint32_t Polarity) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; MODIFY_REG(((DMAMUX_Channel_TypeDef *)(dmamux_base_addr + (DMAMUX_CCR_SIZE * (Channel))))->CCR, DMAMUX_CxCR_SPOL, Polarity); } @@ -977,7 +1052,7 @@ __STATIC_INLINE void LL_DMAMUX_SetSyncPolarity(DMAMUX_Channel_TypeDef *DMAMUXx, */ __STATIC_INLINE uint32_t LL_DMAMUX_GetSyncPolarity(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return (uint32_t)(READ_BIT(((DMAMUX_Channel_TypeDef *)(dmamux_base_addr + (DMAMUX_CCR_SIZE * (Channel))))->CCR, DMAMUX_CxCR_SPOL)); } @@ -1007,7 +1082,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_GetSyncPolarity(DMAMUX_Channel_TypeDef *DMAMU */ __STATIC_INLINE void LL_DMAMUX_EnableEventGeneration(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_Channel_TypeDef *)(dmamux_base_addr + (DMAMUX_CCR_SIZE * (Channel))))->CCR, DMAMUX_CxCR_EGE); } @@ -1037,7 +1112,7 @@ __STATIC_INLINE void LL_DMAMUX_EnableEventGeneration(DMAMUX_Channel_TypeDef *DMA */ __STATIC_INLINE void LL_DMAMUX_DisableEventGeneration(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; CLEAR_BIT(((DMAMUX_Channel_TypeDef *)(dmamux_base_addr + (DMAMUX_CCR_SIZE * (Channel))))->CCR, DMAMUX_CxCR_EGE); } @@ -1067,7 +1142,7 @@ __STATIC_INLINE void LL_DMAMUX_DisableEventGeneration(DMAMUX_Channel_TypeDef *DM */ __STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledEventGeneration(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_Channel_TypeDef *)(dmamux_base_addr + (DMAMUX_CCR_SIZE * (Channel))))->CCR, DMAMUX_CxCR_EGE) == (DMAMUX_CxCR_EGE)) ? 1UL : 0UL); } @@ -1097,7 +1172,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledEventGeneration(DMAMUX_Channel_TypeD */ __STATIC_INLINE void LL_DMAMUX_EnableSync(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_Channel_TypeDef *)(dmamux_base_addr + (DMAMUX_CCR_SIZE * (Channel))))->CCR, DMAMUX_CxCR_SE); } @@ -1127,7 +1202,7 @@ __STATIC_INLINE void LL_DMAMUX_EnableSync(DMAMUX_Channel_TypeDef *DMAMUXx, uint3 */ __STATIC_INLINE void LL_DMAMUX_DisableSync(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; CLEAR_BIT(((DMAMUX_Channel_TypeDef *)(dmamux_base_addr + (DMAMUX_CCR_SIZE * (Channel))))->CCR, DMAMUX_CxCR_SE); } @@ -1157,7 +1232,7 @@ __STATIC_INLINE void LL_DMAMUX_DisableSync(DMAMUX_Channel_TypeDef *DMAMUXx, uint */ __STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledSync(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_Channel_TypeDef *)(dmamux_base_addr + (DMAMUX_CCR_SIZE * (Channel))))->CCR, DMAMUX_CxCR_SE) == (DMAMUX_CxCR_SE)) ? 1UL : 0UL); } @@ -1212,7 +1287,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledSync(DMAMUX_Channel_TypeDef *DMAMUXx */ __STATIC_INLINE void LL_DMAMUX_SetSyncID(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel, uint32_t SyncID) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; MODIFY_REG(((DMAMUX_Channel_TypeDef *)(dmamux_base_addr + (DMAMUX_CCR_SIZE * (Channel))))->CCR, DMAMUX_CxCR_SYNC_ID, SyncID); } @@ -1266,7 +1341,7 @@ __STATIC_INLINE void LL_DMAMUX_SetSyncID(DMAMUX_Channel_TypeDef *DMAMUXx, uint32 */ __STATIC_INLINE uint32_t LL_DMAMUX_GetSyncID(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return (uint32_t)(READ_BIT(((DMAMUX_Channel_TypeDef *)(dmamux_base_addr + (DMAMUX_CCR_SIZE * (Channel))))->CCR, DMAMUX_CxCR_SYNC_ID)); } @@ -1288,7 +1363,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_GetSyncID(DMAMUX_Channel_TypeDef *DMAMUXx, ui */ __STATIC_INLINE void LL_DMAMUX_EnableRequestGen(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_RequestGen_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_OFFSET + (DMAMUX_RGCR_SIZE * (RequestGenChannel))))->RGCR, DMAMUX_RGxCR_GE); } @@ -1306,7 +1381,7 @@ __STATIC_INLINE void LL_DMAMUX_EnableRequestGen(DMAMUX_Channel_TypeDef *DMAMUXx, */ __STATIC_INLINE void LL_DMAMUX_DisableRequestGen(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; CLEAR_BIT(((DMAMUX_RequestGen_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_OFFSET + (DMAMUX_RGCR_SIZE * (RequestGenChannel))))->RGCR, DMAMUX_RGxCR_GE); } @@ -1328,7 +1403,7 @@ __STATIC_INLINE void LL_DMAMUX_DisableRequestGen(DMAMUX_Channel_TypeDef *DMAMUXx */ __STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledRequestGen(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_RequestGen_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_OFFSET + (DMAMUX_RGCR_SIZE * RequestGenChannel)))->RGCR, DMAMUX_RGxCR_GE) == (DMAMUX_RGxCR_GE)) ? 1UL : 0UL); } @@ -1355,7 +1430,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledRequestGen(DMAMUX_Channel_TypeDef *D */ __STATIC_INLINE void LL_DMAMUX_SetRequestGenPolarity(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel, uint32_t Polarity) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; MODIFY_REG(((DMAMUX_RequestGen_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_OFFSET + (DMAMUX_RGCR_SIZE * RequestGenChannel)))->RGCR, DMAMUX_RGxCR_GPOL, Polarity); } @@ -1381,7 +1456,7 @@ __STATIC_INLINE void LL_DMAMUX_SetRequestGenPolarity(DMAMUX_Channel_TypeDef *DMA */ __STATIC_INLINE uint32_t LL_DMAMUX_GetRequestGenPolarity(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return (uint32_t)(READ_BIT(((DMAMUX_RequestGen_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_OFFSET + (DMAMUX_RGCR_SIZE * RequestGenChannel)))->RGCR, DMAMUX_RGxCR_GPOL)); } @@ -1405,7 +1480,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_GetRequestGenPolarity(DMAMUX_Channel_TypeDef */ __STATIC_INLINE void LL_DMAMUX_SetGenRequestNb(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel, uint32_t RequestNb) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; MODIFY_REG(((DMAMUX_RequestGen_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_OFFSET + (DMAMUX_RGCR_SIZE * RequestGenChannel)))->RGCR, DMAMUX_RGxCR_GNBREQ, (RequestNb - 1U) << DMAMUX_RGxCR_GNBREQ_Pos); } @@ -1427,7 +1502,7 @@ __STATIC_INLINE void LL_DMAMUX_SetGenRequestNb(DMAMUX_Channel_TypeDef *DMAMUXx, */ __STATIC_INLINE uint32_t LL_DMAMUX_GetGenRequestNb(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return (uint32_t)((READ_BIT(((DMAMUX_RequestGen_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_OFFSET + (DMAMUX_RGCR_SIZE * RequestGenChannel)))->RGCR, DMAMUX_RGxCR_GNBREQ) >> DMAMUX_RGxCR_GNBREQ_Pos) + 1U); } @@ -1489,7 +1564,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_GetGenRequestNb(DMAMUX_Channel_TypeDef *DMAMU */ __STATIC_INLINE void LL_DMAMUX_SetRequestSignalID(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel, uint32_t RequestSignalID) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; MODIFY_REG(((DMAMUX_RequestGen_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_OFFSET + (DMAMUX_RGCR_SIZE * RequestGenChannel)))->RGCR, DMAMUX_RGxCR_SIG_ID, RequestSignalID); } @@ -1535,7 +1610,7 @@ __STATIC_INLINE void LL_DMAMUX_SetRequestSignalID(DMAMUX_Channel_TypeDef *DMAMUX */ __STATIC_INLINE uint32_t LL_DMAMUX_GetRequestSignalID(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return (uint32_t)(READ_BIT(((DMAMUX_RequestGen_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_OFFSET + (DMAMUX_RGCR_SIZE * RequestGenChannel)))->RGCR, DMAMUX_RGxCR_SIG_ID)); } @@ -1556,7 +1631,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_GetRequestSignalID(DMAMUX_Channel_TypeDef *DM */ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO0(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CSR, DMAMUX_CSR_SOF0) == (DMAMUX_CSR_SOF0)) ? 1UL : 0UL); } @@ -1569,7 +1644,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO0(DMAMUX_Channel_TypeDef *DMAM */ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO1(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CSR, DMAMUX_CSR_SOF1) == (DMAMUX_CSR_SOF1)) ? 1UL : 0UL); } @@ -1582,7 +1657,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO1(DMAMUX_Channel_TypeDef *DMAM */ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO2(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CSR, DMAMUX_CSR_SOF2) == (DMAMUX_CSR_SOF2)) ? 1UL : 0UL); } @@ -1595,7 +1670,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO2(DMAMUX_Channel_TypeDef *DMAM */ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO3(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CSR, DMAMUX_CSR_SOF3) == (DMAMUX_CSR_SOF3)) ? 1UL : 0UL); } @@ -1608,7 +1683,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO3(DMAMUX_Channel_TypeDef *DMAM */ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO4(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CSR, DMAMUX_CSR_SOF4) == (DMAMUX_CSR_SOF4)) ? 1UL : 0UL); } @@ -1621,7 +1696,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO4(DMAMUX_Channel_TypeDef *DMAM */ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO5(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CSR, DMAMUX_CSR_SOF5) == (DMAMUX_CSR_SOF5)) ? 1UL : 0UL); } @@ -1634,7 +1709,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO5(DMAMUX_Channel_TypeDef *DMAM */ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO6(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CSR, DMAMUX_CSR_SOF6) == (DMAMUX_CSR_SOF6)) ? 1UL : 0UL); } @@ -1647,7 +1722,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO6(DMAMUX_Channel_TypeDef *DMAM */ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO7(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CSR, DMAMUX_CSR_SOF7) == (DMAMUX_CSR_SOF7)) ? 1UL : 0UL); } @@ -1660,7 +1735,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO7(DMAMUX_Channel_TypeDef *DMAM */ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO8(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CSR, DMAMUX_CSR_SOF8) == (DMAMUX_CSR_SOF8)) ? 1UL : 0UL); } @@ -1673,7 +1748,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO8(DMAMUX_Channel_TypeDef *DMAM */ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO9(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CSR, DMAMUX_CSR_SOF9) == (DMAMUX_CSR_SOF9)) ? 1UL : 0UL); } @@ -1686,7 +1761,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO9(DMAMUX_Channel_TypeDef *DMAM */ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO10(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CSR, DMAMUX_CSR_SOF10) == (DMAMUX_CSR_SOF10)) ? 1UL : 0UL); } @@ -1699,7 +1774,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO10(DMAMUX_Channel_TypeDef *DMA */ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO11(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CSR, DMAMUX_CSR_SOF11) == (DMAMUX_CSR_SOF11)) ? 1UL : 0UL); } @@ -1712,7 +1787,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO11(DMAMUX_Channel_TypeDef *DMA */ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO12(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CSR, DMAMUX_CSR_SOF12) == (DMAMUX_CSR_SOF12)) ? 1UL : 0UL); } @@ -1725,7 +1800,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO12(DMAMUX_Channel_TypeDef *DMA */ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO13(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CSR, DMAMUX_CSR_SOF13) == (DMAMUX_CSR_SOF13)) ? 1UL : 0UL); } @@ -1738,7 +1813,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO13(DMAMUX_Channel_TypeDef *DMA */ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO14(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CSR, DMAMUX_CSR_SOF14) == (DMAMUX_CSR_SOF14)) ? 1UL : 0UL); } @@ -1751,7 +1826,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO14(DMAMUX_Channel_TypeDef *DMA */ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO15(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CSR, DMAMUX_CSR_SOF15) == (DMAMUX_CSR_SOF15)) ? 1UL : 0UL); } @@ -1764,7 +1839,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO15(DMAMUX_Channel_TypeDef *DMA */ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_RGO0(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_RequestGenStatus_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_STATUS_OFFSET))->RGSR, DMAMUX_RGSR_OF0) == (DMAMUX_RGSR_OF0)) ? 1UL : 0UL); } @@ -1777,7 +1852,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_RGO0(DMAMUX_Channel_TypeDef *DMA */ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_RGO1(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_RequestGenStatus_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_STATUS_OFFSET))->RGSR, DMAMUX_RGSR_OF1) == (DMAMUX_RGSR_OF1)) ? 1UL : 0UL); } @@ -1790,7 +1865,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_RGO1(DMAMUX_Channel_TypeDef *DMA */ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_RGO2(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_RequestGenStatus_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_STATUS_OFFSET))->RGSR, DMAMUX_RGSR_OF2) == (DMAMUX_RGSR_OF2)) ? 1UL : 0UL); } @@ -1803,7 +1878,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_RGO2(DMAMUX_Channel_TypeDef *DMA */ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_RGO3(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_RequestGenStatus_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_STATUS_OFFSET))->RGSR, DMAMUX_RGSR_OF3) == (DMAMUX_RGSR_OF3)) ? 1UL : 0UL); } @@ -1816,7 +1891,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_RGO3(DMAMUX_Channel_TypeDef *DMA */ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_RGO4(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_RequestGenStatus_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_STATUS_OFFSET))->RGSR, DMAMUX_RGSR_OF4) == (DMAMUX_RGSR_OF4)) ? 1UL : 0UL); } @@ -1829,7 +1904,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_RGO4(DMAMUX_Channel_TypeDef *DMA */ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_RGO5(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_RequestGenStatus_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_STATUS_OFFSET))->RGSR, DMAMUX_RGSR_OF5) == (DMAMUX_RGSR_OF5)) ? 1UL : 0UL); } @@ -1842,7 +1917,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_RGO5(DMAMUX_Channel_TypeDef *DMA */ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_RGO6(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_RequestGenStatus_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_STATUS_OFFSET))->RGSR, DMAMUX_RGSR_OF6) == (DMAMUX_RGSR_OF6)) ? 1UL : 0UL); } @@ -1855,7 +1930,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_RGO6(DMAMUX_Channel_TypeDef *DMA */ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_RGO7(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_RequestGenStatus_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_STATUS_OFFSET))->RGSR, DMAMUX_RGSR_OF7) == (DMAMUX_RGSR_OF7)) ? 1UL : 0UL); } @@ -1868,7 +1943,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_RGO7(DMAMUX_Channel_TypeDef *DMA */ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO0(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CFR, DMAMUX_CFR_CSOF0); } @@ -1881,7 +1956,7 @@ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO0(DMAMUX_Channel_TypeDef *DMAMUXx) */ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO1(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CFR, DMAMUX_CFR_CSOF1); } @@ -1894,7 +1969,7 @@ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO1(DMAMUX_Channel_TypeDef *DMAMUXx) */ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO2(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CFR, DMAMUX_CFR_CSOF2); } @@ -1907,7 +1982,7 @@ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO2(DMAMUX_Channel_TypeDef *DMAMUXx) */ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO3(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CFR, DMAMUX_CFR_CSOF3); } @@ -1920,7 +1995,7 @@ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO3(DMAMUX_Channel_TypeDef *DMAMUXx) */ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO4(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CFR, DMAMUX_CFR_CSOF4); } @@ -1933,7 +2008,7 @@ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO4(DMAMUX_Channel_TypeDef *DMAMUXx) */ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO5(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CFR, DMAMUX_CFR_CSOF5); } @@ -1946,7 +2021,7 @@ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO5(DMAMUX_Channel_TypeDef *DMAMUXx) */ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO6(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CFR, DMAMUX_CFR_CSOF6); } @@ -1959,7 +2034,7 @@ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO6(DMAMUX_Channel_TypeDef *DMAMUXx) */ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO7(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CFR, DMAMUX_CFR_CSOF7); } @@ -1972,7 +2047,7 @@ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO7(DMAMUX_Channel_TypeDef *DMAMUXx) */ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO8(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CFR, DMAMUX_CFR_CSOF8); } @@ -1985,7 +2060,7 @@ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO8(DMAMUX_Channel_TypeDef *DMAMUXx) */ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO9(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CFR, DMAMUX_CFR_CSOF9); } @@ -1998,7 +2073,7 @@ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO9(DMAMUX_Channel_TypeDef *DMAMUXx) */ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO10(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CFR, DMAMUX_CFR_CSOF10); } @@ -2011,7 +2086,7 @@ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO10(DMAMUX_Channel_TypeDef *DMAMUXx) */ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO11(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CFR, DMAMUX_CFR_CSOF11); } @@ -2024,7 +2099,7 @@ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO11(DMAMUX_Channel_TypeDef *DMAMUXx) */ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO12(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CFR, DMAMUX_CFR_CSOF12); } @@ -2037,7 +2112,7 @@ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO12(DMAMUX_Channel_TypeDef *DMAMUXx) */ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO13(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CFR, DMAMUX_CFR_CSOF13); } @@ -2050,7 +2125,7 @@ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO13(DMAMUX_Channel_TypeDef *DMAMUXx) */ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO14(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CFR, DMAMUX_CFR_CSOF14); } @@ -2063,7 +2138,7 @@ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO14(DMAMUX_Channel_TypeDef *DMAMUXx) */ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO15(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_ChannelStatus_TypeDef *)(dmamux_base_addr + DMAMUX_CH_STATUS_OFFSET))->CFR, DMAMUX_CFR_CSOF15); } @@ -2076,7 +2151,7 @@ __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO15(DMAMUX_Channel_TypeDef *DMAMUXx) */ __STATIC_INLINE void LL_DMAMUX_ClearFlag_RGO0(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_RequestGenStatus_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_STATUS_OFFSET))->RGCFR, DMAMUX_RGCFR_COF0); } @@ -2089,7 +2164,7 @@ __STATIC_INLINE void LL_DMAMUX_ClearFlag_RGO0(DMAMUX_Channel_TypeDef *DMAMUXx) */ __STATIC_INLINE void LL_DMAMUX_ClearFlag_RGO1(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_RequestGenStatus_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_STATUS_OFFSET))->RGCFR, DMAMUX_RGCFR_COF1); } @@ -2102,7 +2177,7 @@ __STATIC_INLINE void LL_DMAMUX_ClearFlag_RGO1(DMAMUX_Channel_TypeDef *DMAMUXx) */ __STATIC_INLINE void LL_DMAMUX_ClearFlag_RGO2(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_RequestGenStatus_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_STATUS_OFFSET))->RGCFR, DMAMUX_RGCFR_COF2); } @@ -2115,7 +2190,7 @@ __STATIC_INLINE void LL_DMAMUX_ClearFlag_RGO2(DMAMUX_Channel_TypeDef *DMAMUXx) */ __STATIC_INLINE void LL_DMAMUX_ClearFlag_RGO3(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_RequestGenStatus_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_STATUS_OFFSET))->RGCFR, DMAMUX_RGCFR_COF3); } @@ -2128,7 +2203,7 @@ __STATIC_INLINE void LL_DMAMUX_ClearFlag_RGO3(DMAMUX_Channel_TypeDef *DMAMUXx) */ __STATIC_INLINE void LL_DMAMUX_ClearFlag_RGO4(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_RequestGenStatus_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_STATUS_OFFSET))->RGCFR, DMAMUX_RGCFR_COF4); } @@ -2141,7 +2216,7 @@ __STATIC_INLINE void LL_DMAMUX_ClearFlag_RGO4(DMAMUX_Channel_TypeDef *DMAMUXx) */ __STATIC_INLINE void LL_DMAMUX_ClearFlag_RGO5(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_RequestGenStatus_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_STATUS_OFFSET))->RGCFR, DMAMUX_RGCFR_COF5); } @@ -2154,7 +2229,7 @@ __STATIC_INLINE void LL_DMAMUX_ClearFlag_RGO5(DMAMUX_Channel_TypeDef *DMAMUXx) */ __STATIC_INLINE void LL_DMAMUX_ClearFlag_RGO6(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_RequestGenStatus_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_STATUS_OFFSET))->RGCFR, DMAMUX_RGCFR_COF6); } @@ -2167,7 +2242,7 @@ __STATIC_INLINE void LL_DMAMUX_ClearFlag_RGO6(DMAMUX_Channel_TypeDef *DMAMUXx) */ __STATIC_INLINE void LL_DMAMUX_ClearFlag_RGO7(DMAMUX_Channel_TypeDef *DMAMUXx) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_RequestGenStatus_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_STATUS_OFFSET))->RGCFR, DMAMUX_RGCFR_COF7); } @@ -2205,7 +2280,7 @@ __STATIC_INLINE void LL_DMAMUX_ClearFlag_RGO7(DMAMUX_Channel_TypeDef *DMAMUXx) */ __STATIC_INLINE void LL_DMAMUX_EnableIT_SO(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_Channel_TypeDef *)((uint32_t)(dmamux_base_addr + (DMAMUX_CCR_SIZE * (Channel)))))->CCR, DMAMUX_CxCR_SOIE); } @@ -2235,7 +2310,7 @@ __STATIC_INLINE void LL_DMAMUX_EnableIT_SO(DMAMUX_Channel_TypeDef *DMAMUXx, uint */ __STATIC_INLINE void LL_DMAMUX_DisableIT_SO(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; CLEAR_BIT(((DMAMUX_Channel_TypeDef *)((uint32_t)(dmamux_base_addr + (DMAMUX_CCR_SIZE * (Channel)))))->CCR, DMAMUX_CxCR_SOIE); } @@ -2265,7 +2340,7 @@ __STATIC_INLINE void LL_DMAMUX_DisableIT_SO(DMAMUX_Channel_TypeDef *DMAMUXx, uin */ __STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledIT_SO(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return (READ_BIT(((DMAMUX_Channel_TypeDef *)(dmamux_base_addr + (DMAMUX_CCR_SIZE * (Channel))))->CCR, DMAMUX_CxCR_SOIE)); } @@ -2287,7 +2362,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledIT_SO(DMAMUX_Channel_TypeDef *DMAMUX */ __STATIC_INLINE void LL_DMAMUX_EnableIT_RGO(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; SET_BIT(((DMAMUX_RequestGen_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_OFFSET + (DMAMUX_RGCR_SIZE * RequestGenChannel)))->RGCR, DMAMUX_RGxCR_OIE); } @@ -2309,7 +2384,7 @@ __STATIC_INLINE void LL_DMAMUX_EnableIT_RGO(DMAMUX_Channel_TypeDef *DMAMUXx, uin */ __STATIC_INLINE void LL_DMAMUX_DisableIT_RGO(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; CLEAR_BIT(((DMAMUX_RequestGen_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_OFFSET + (DMAMUX_RGCR_SIZE * RequestGenChannel)))->RGCR, DMAMUX_RGxCR_OIE); } @@ -2331,7 +2406,7 @@ __STATIC_INLINE void LL_DMAMUX_DisableIT_RGO(DMAMUX_Channel_TypeDef *DMAMUXx, ui */ __STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledIT_RGO(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel) { - register uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; + uint32_t dmamux_base_addr = (uint32_t)DMAMUXx; return ((READ_BIT(((DMAMUX_RequestGen_TypeDef *)(dmamux_base_addr + DMAMUX_REQ_GEN_OFFSET + (DMAMUX_RGCR_SIZE * RequestGenChannel)))->RGCR, DMAMUX_RGxCR_OIE) == (DMAMUX_RGxCR_OIE)) ? 1UL : 0UL); } diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_exti.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_exti.h index be46b24..1e25e01 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_exti.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_exti.h @@ -152,9 +152,13 @@ typedef struct #define LL_EXTI_LINE_54 EXTI_IMR2_IM54 /*!< Extended line 54 */ #define LL_EXTI_LINE_55 EXTI_IMR2_IM55 /*!< Extended line 55 */ #define LL_EXTI_LINE_56 EXTI_IMR2_IM56 /*!< Extended line 56 */ +#if defined(EXTI_IMR2_IM57) #define LL_EXTI_LINE_57 EXTI_IMR2_IM57 /*!< Extended line 57 */ +#endif /*EXTI_IMR2_IM57*/ #define LL_EXTI_LINE_58 EXTI_IMR2_IM58 /*!< Extended line 58 */ +#if defined(EXTI_IMR2_IM59) #define LL_EXTI_LINE_59 EXTI_IMR2_IM59 /*!< Extended line 59 */ +#endif /*EXTI_IMR2_IM59*/ #define LL_EXTI_LINE_60 EXTI_IMR2_IM60 /*!< Extended line 60 */ #define LL_EXTI_LINE_61 EXTI_IMR2_IM61 /*!< Extended line 61 */ #define LL_EXTI_LINE_62 EXTI_IMR2_IM62 /*!< Extended line 62 */ @@ -192,8 +196,17 @@ typedef struct #endif /* ETH */ #define LL_EXTI_LINE_87 EXTI_IMR3_IM87 /*!< Extended line 87 */ #if defined(DTS) -#define LL_EXTI_LINE_88 EXTI_IMR3_IM88 /*!< Extended line 87 */ +#define LL_EXTI_LINE_88 EXTI_IMR3_IM88 /*!< Extended line 88 */ #endif /* DTS */ +#if defined(EXTI_IMR3_IM89) +#define LL_EXTI_LINE_89 EXTI_IMR3_IM89 /*!< Extended line 89 */ +#endif /* EXTI_IMR3_IM89 */ +#if defined(EXTI_IMR3_IM90) +#define LL_EXTI_LINE_90 EXTI_IMR3_IM90 /*!< Extended line 90 */ +#endif /* EXTI_IMR3_IM90 */ +#if defined(I2C5) +#define LL_EXTI_LINE_91 EXTI_IMR3_IM91 /*!< Extended line 91 */ +#endif /* I2C5 */ #define LL_EXTI_LINE_ALL_64_95 EXTI_IMR3_IM /*!< All Extended line not reserved*/ @@ -371,8 +384,8 @@ __STATIC_INLINE void LL_EXTI_EnableIT_0_31(uint32_t ExtiLine) * @arg @ref LL_EXTI_LINE_41 * @arg @ref LL_EXTI_LINE_42 * @arg @ref LL_EXTI_LINE_43 - * @arg @ref LL_EXTI_LINE_44 - * @arg @ref LL_EXTI_LINE_46 + * @arg @ref LL_EXTI_LINE_44 (*) + * @arg @ref LL_EXTI_LINE_46 (*) * @arg @ref LL_EXTI_LINE_47 * @arg @ref LL_EXTI_LINE_48 * @arg @ref LL_EXTI_LINE_49 @@ -383,14 +396,16 @@ __STATIC_INLINE void LL_EXTI_EnableIT_0_31(uint32_t ExtiLine) * @arg @ref LL_EXTI_LINE_54 * @arg @ref LL_EXTI_LINE_55 * @arg @ref LL_EXTI_LINE_56 - * @arg @ref LL_EXTI_LINE_57 + * @arg @ref LL_EXTI_LINE_57 (*) * @arg @ref LL_EXTI_LINE_58 - * @arg @ref LL_EXTI_LINE_59 + * @arg @ref LL_EXTI_LINE_59 (*) * @arg @ref LL_EXTI_LINE_60 * @arg @ref LL_EXTI_LINE_61 * @arg @ref LL_EXTI_LINE_62 * @arg @ref LL_EXTI_LINE_63 * @arg @ref LL_EXTI_LINE_ALL_32_63 + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_EXTI_EnableIT_32_63(uint32_t ExtiLine) @@ -414,18 +429,25 @@ __STATIC_INLINE void LL_EXTI_EnableIT_32_63(uint32_t ExtiLine) * @arg @ref LL_EXTI_LINE_72 * @arg @ref LL_EXTI_LINE_73 * @arg @ref LL_EXTI_LINE_74 - * @arg @ref LL_EXTI_LINE_75 - * @arg @ref LL_EXTI_LINE_76 - * @arg @ref LL_EXTI_LINE_77 - * @arg @ref LL_EXTI_LINE_78 - * @arg @ref LL_EXTI_LINE_79 - * @arg @ref LL_EXTI_LINE_80 - * @arg @ref LL_EXTI_LINE_82 - * @arg @ref LL_EXTI_LINE_84 + * @arg @ref LL_EXTI_LINE_75 (*) + * @arg @ref LL_EXTI_LINE_76 (*) + * @arg @ref LL_EXTI_LINE_77 (**) + * @arg @ref LL_EXTI_LINE_78 (**) + * @arg @ref LL_EXTI_LINE_79 (**) + * @arg @ref LL_EXTI_LINE_80 (**) + * @arg @ref LL_EXTI_LINE_82 (**) + * @arg @ref LL_EXTI_LINE_84 (**) * @arg @ref LL_EXTI_LINE_85 - * @arg @ref LL_EXTI_LINE_86 + * @arg @ref LL_EXTI_LINE_86 (*) * @arg @ref LL_EXTI_LINE_87 + * @arg @ref LL_EXTI_LINE_88 (*) + * @arg @ref LL_EXTI_LINE_89 (*) + * @arg @ref LL_EXTI_LINE_90 (*) + * @arg @ref LL_EXTI_LINE_91 (*) * @arg @ref LL_EXTI_LINE_ALL_64_95 + * + * (*) value not defined in all devices. + * (**) value only defined in dual core devices. * @retval None */ __STATIC_INLINE void LL_EXTI_EnableIT_64_95(uint32_t ExtiLine) @@ -495,8 +517,8 @@ __STATIC_INLINE void LL_EXTI_DisableIT_0_31(uint32_t ExtiLine) * @arg @ref LL_EXTI_LINE_41 * @arg @ref LL_EXTI_LINE_42 * @arg @ref LL_EXTI_LINE_43 - * @arg @ref LL_EXTI_LINE_44 - * @arg @ref LL_EXTI_LINE_46 + * @arg @ref LL_EXTI_LINE_44 (*) + * @arg @ref LL_EXTI_LINE_46 (*) * @arg @ref LL_EXTI_LINE_47 * @arg @ref LL_EXTI_LINE_48 * @arg @ref LL_EXTI_LINE_49 @@ -507,14 +529,16 @@ __STATIC_INLINE void LL_EXTI_DisableIT_0_31(uint32_t ExtiLine) * @arg @ref LL_EXTI_LINE_54 * @arg @ref LL_EXTI_LINE_55 * @arg @ref LL_EXTI_LINE_56 - * @arg @ref LL_EXTI_LINE_57 + * @arg @ref LL_EXTI_LINE_57 (*) * @arg @ref LL_EXTI_LINE_58 - * @arg @ref LL_EXTI_LINE_59 + * @arg @ref LL_EXTI_LINE_59 (*) * @arg @ref LL_EXTI_LINE_60 * @arg @ref LL_EXTI_LINE_61 * @arg @ref LL_EXTI_LINE_62 * @arg @ref LL_EXTI_LINE_63 * @arg @ref LL_EXTI_LINE_ALL_32_63 + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_EXTI_DisableIT_32_63(uint32_t ExtiLine) @@ -537,18 +561,25 @@ __STATIC_INLINE void LL_EXTI_DisableIT_32_63(uint32_t ExtiLine) * @arg @ref LL_EXTI_LINE_72 * @arg @ref LL_EXTI_LINE_73 * @arg @ref LL_EXTI_LINE_74 - * @arg @ref LL_EXTI_LINE_75 - * @arg @ref LL_EXTI_LINE_76 - * @arg @ref LL_EXTI_LINE_77 - * @arg @ref LL_EXTI_LINE_78 - * @arg @ref LL_EXTI_LINE_79 - * @arg @ref LL_EXTI_LINE_80 - * @arg @ref LL_EXTI_LINE_82 - * @arg @ref LL_EXTI_LINE_84 + * @arg @ref LL_EXTI_LINE_75 (*) + * @arg @ref LL_EXTI_LINE_76 (*) + * @arg @ref LL_EXTI_LINE_77 (**) + * @arg @ref LL_EXTI_LINE_78 (**) + * @arg @ref LL_EXTI_LINE_79 (**) + * @arg @ref LL_EXTI_LINE_80 (**) + * @arg @ref LL_EXTI_LINE_82 (**) + * @arg @ref LL_EXTI_LINE_84 (**) * @arg @ref LL_EXTI_LINE_85 - * @arg @ref LL_EXTI_LINE_86 + * @arg @ref LL_EXTI_LINE_86 (*) * @arg @ref LL_EXTI_LINE_87 + * @arg @ref LL_EXTI_LINE_88 (*) + * @arg @ref LL_EXTI_LINE_89 (*) + * @arg @ref LL_EXTI_LINE_90 (*) + * @arg @ref LL_EXTI_LINE_91 (*) * @arg @ref LL_EXTI_LINE_ALL_64_95 + * + * (*) value not defined in all devices. + * (**) value only defined in dual core devices. * @retval None */ __STATIC_INLINE void LL_EXTI_DisableIT_64_95(uint32_t ExtiLine) @@ -618,8 +649,8 @@ __STATIC_INLINE uint32_t LL_EXTI_IsEnabledIT_0_31(uint32_t ExtiLine) * @arg @ref LL_EXTI_LINE_41 * @arg @ref LL_EXTI_LINE_42 * @arg @ref LL_EXTI_LINE_43 - * @arg @ref LL_EXTI_LINE_44 - * @arg @ref LL_EXTI_LINE_46 + * @arg @ref LL_EXTI_LINE_44 (*) + * @arg @ref LL_EXTI_LINE_46 (*) * @arg @ref LL_EXTI_LINE_47 * @arg @ref LL_EXTI_LINE_48 * @arg @ref LL_EXTI_LINE_49 @@ -630,14 +661,16 @@ __STATIC_INLINE uint32_t LL_EXTI_IsEnabledIT_0_31(uint32_t ExtiLine) * @arg @ref LL_EXTI_LINE_54 * @arg @ref LL_EXTI_LINE_55 * @arg @ref LL_EXTI_LINE_56 - * @arg @ref LL_EXTI_LINE_57 + * @arg @ref LL_EXTI_LINE_57 (*) * @arg @ref LL_EXTI_LINE_58 - * @arg @ref LL_EXTI_LINE_59 + * @arg @ref LL_EXTI_LINE_59 (*) * @arg @ref LL_EXTI_LINE_60 * @arg @ref LL_EXTI_LINE_61 * @arg @ref LL_EXTI_LINE_62 * @arg @ref LL_EXTI_LINE_63 * @arg @ref LL_EXTI_LINE_ALL_32_63 + * + * (*) value not defined in all devices. * @retval State of bit (1 or 0). */ __STATIC_INLINE uint32_t LL_EXTI_IsEnabledIT_32_63(uint32_t ExtiLine) @@ -661,18 +694,25 @@ __STATIC_INLINE uint32_t LL_EXTI_IsEnabledIT_32_63(uint32_t ExtiLine) * @arg @ref LL_EXTI_LINE_72 * @arg @ref LL_EXTI_LINE_73 * @arg @ref LL_EXTI_LINE_74 - * @arg @ref LL_EXTI_LINE_75 - * @arg @ref LL_EXTI_LINE_76 - * @arg @ref LL_EXTI_LINE_77 - * @arg @ref LL_EXTI_LINE_78 - * @arg @ref LL_EXTI_LINE_79 - * @arg @ref LL_EXTI_LINE_80 - * @arg @ref LL_EXTI_LINE_82 - * @arg @ref LL_EXTI_LINE_84 + * @arg @ref LL_EXTI_LINE_75 (*) + * @arg @ref LL_EXTI_LINE_76 (*) + * @arg @ref LL_EXTI_LINE_77 (**) + * @arg @ref LL_EXTI_LINE_78 (**) + * @arg @ref LL_EXTI_LINE_79 (**) + * @arg @ref LL_EXTI_LINE_80 (**) + * @arg @ref LL_EXTI_LINE_82 (**) + * @arg @ref LL_EXTI_LINE_84 (**) * @arg @ref LL_EXTI_LINE_85 - * @arg @ref LL_EXTI_LINE_86 + * @arg @ref LL_EXTI_LINE_86 (*) * @arg @ref LL_EXTI_LINE_87 + * @arg @ref LL_EXTI_LINE_88 (*) + * @arg @ref LL_EXTI_LINE_89 (*) + * @arg @ref LL_EXTI_LINE_90 (*) + * @arg @ref LL_EXTI_LINE_91 (*) * @arg @ref LL_EXTI_LINE_ALL_64_95 + * + * (*) value not defined in all devices. + * (**) value only defined in dual core devices. * @retval State of bit (1 or 0). */ __STATIC_INLINE uint32_t LL_EXTI_IsEnabledIT_64_95(uint32_t ExtiLine) @@ -1124,8 +1164,8 @@ __STATIC_INLINE void LL_EXTI_EnableEvent_0_31(uint32_t ExtiLine) * @arg @ref LL_EXTI_LINE_41 * @arg @ref LL_EXTI_LINE_42 * @arg @ref LL_EXTI_LINE_43 - * @arg @ref LL_EXTI_LINE_44 - * @arg @ref LL_EXTI_LINE_46 + * @arg @ref LL_EXTI_LINE_44 (*) + * @arg @ref LL_EXTI_LINE_46 (*) * @arg @ref LL_EXTI_LINE_47 * @arg @ref LL_EXTI_LINE_48 * @arg @ref LL_EXTI_LINE_49 @@ -1136,14 +1176,16 @@ __STATIC_INLINE void LL_EXTI_EnableEvent_0_31(uint32_t ExtiLine) * @arg @ref LL_EXTI_LINE_54 * @arg @ref LL_EXTI_LINE_55 * @arg @ref LL_EXTI_LINE_56 - * @arg @ref LL_EXTI_LINE_57 + * @arg @ref LL_EXTI_LINE_57 (*) * @arg @ref LL_EXTI_LINE_58 - * @arg @ref LL_EXTI_LINE_59 + * @arg @ref LL_EXTI_LINE_59 (*) * @arg @ref LL_EXTI_LINE_60 * @arg @ref LL_EXTI_LINE_61 * @arg @ref LL_EXTI_LINE_62 * @arg @ref LL_EXTI_LINE_63 * @arg @ref LL_EXTI_LINE_ALL_32_63 + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_EXTI_EnableEvent_32_63(uint32_t ExtiLine) @@ -1166,18 +1208,25 @@ __STATIC_INLINE void LL_EXTI_EnableEvent_32_63(uint32_t ExtiLine) * @arg @ref LL_EXTI_LINE_72 * @arg @ref LL_EXTI_LINE_73 * @arg @ref LL_EXTI_LINE_74 - * @arg @ref LL_EXTI_LINE_75 - * @arg @ref LL_EXTI_LINE_76 - * @arg @ref LL_EXTI_LINE_77 - * @arg @ref LL_EXTI_LINE_78 - * @arg @ref LL_EXTI_LINE_79 - * @arg @ref LL_EXTI_LINE_80 - * @arg @ref LL_EXTI_LINE_82 - * @arg @ref LL_EXTI_LINE_84 + * @arg @ref LL_EXTI_LINE_75 (*) + * @arg @ref LL_EXTI_LINE_76 (*) + * @arg @ref LL_EXTI_LINE_77 (**) + * @arg @ref LL_EXTI_LINE_78 (**) + * @arg @ref LL_EXTI_LINE_79 (**) + * @arg @ref LL_EXTI_LINE_80 (**) + * @arg @ref LL_EXTI_LINE_82 (**) + * @arg @ref LL_EXTI_LINE_84 (**) * @arg @ref LL_EXTI_LINE_85 - * @arg @ref LL_EXTI_LINE_86 + * @arg @ref LL_EXTI_LINE_86 (*) * @arg @ref LL_EXTI_LINE_87 + * @arg @ref LL_EXTI_LINE_88 (*) + * @arg @ref LL_EXTI_LINE_89 (*) + * @arg @ref LL_EXTI_LINE_90 (*) + * @arg @ref LL_EXTI_LINE_91 (*) * @arg @ref LL_EXTI_LINE_ALL_64_95 + * + * (*) value not defined in all devices. + * (**) value only defined in dual core devices. * @retval None */ __STATIC_INLINE void LL_EXTI_EnableEvent_64_95(uint32_t ExtiLine) @@ -1245,8 +1294,8 @@ __STATIC_INLINE void LL_EXTI_DisableEvent_0_31(uint32_t ExtiLine) * @arg @ref LL_EXTI_LINE_41 * @arg @ref LL_EXTI_LINE_42 * @arg @ref LL_EXTI_LINE_43 - * @arg @ref LL_EXTI_LINE_44 - * @arg @ref LL_EXTI_LINE_46 + * @arg @ref LL_EXTI_LINE_44 (*) + * @arg @ref LL_EXTI_LINE_46 (*) * @arg @ref LL_EXTI_LINE_47 * @arg @ref LL_EXTI_LINE_48 * @arg @ref LL_EXTI_LINE_49 @@ -1257,14 +1306,16 @@ __STATIC_INLINE void LL_EXTI_DisableEvent_0_31(uint32_t ExtiLine) * @arg @ref LL_EXTI_LINE_54 * @arg @ref LL_EXTI_LINE_55 * @arg @ref LL_EXTI_LINE_56 - * @arg @ref LL_EXTI_LINE_57 + * @arg @ref LL_EXTI_LINE_57 (*) * @arg @ref LL_EXTI_LINE_58 - * @arg @ref LL_EXTI_LINE_59 + * @arg @ref LL_EXTI_LINE_59 (*) * @arg @ref LL_EXTI_LINE_60 * @arg @ref LL_EXTI_LINE_61 * @arg @ref LL_EXTI_LINE_62 * @arg @ref LL_EXTI_LINE_63 * @arg @ref LL_EXTI_LINE_ALL_32_63 + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_EXTI_DisableEvent_32_63(uint32_t ExtiLine) @@ -1287,18 +1338,25 @@ __STATIC_INLINE void LL_EXTI_DisableEvent_32_63(uint32_t ExtiLine) * @arg @ref LL_EXTI_LINE_72 * @arg @ref LL_EXTI_LINE_73 * @arg @ref LL_EXTI_LINE_74 - * @arg @ref LL_EXTI_LINE_75 - * @arg @ref LL_EXTI_LINE_76 - * @arg @ref LL_EXTI_LINE_77 - * @arg @ref LL_EXTI_LINE_78 - * @arg @ref LL_EXTI_LINE_79 - * @arg @ref LL_EXTI_LINE_80 - * @arg @ref LL_EXTI_LINE_82 - * @arg @ref LL_EXTI_LINE_84 + * @arg @ref LL_EXTI_LINE_75 (*) + * @arg @ref LL_EXTI_LINE_76 (*) + * @arg @ref LL_EXTI_LINE_77 (**) + * @arg @ref LL_EXTI_LINE_78 (**) + * @arg @ref LL_EXTI_LINE_79 (**) + * @arg @ref LL_EXTI_LINE_80 (**) + * @arg @ref LL_EXTI_LINE_82 (**) + * @arg @ref LL_EXTI_LINE_84 (**) * @arg @ref LL_EXTI_LINE_85 - * @arg @ref LL_EXTI_LINE_86 + * @arg @ref LL_EXTI_LINE_86 (*) * @arg @ref LL_EXTI_LINE_87 + * @arg @ref LL_EXTI_LINE_88 (*) + * @arg @ref LL_EXTI_LINE_89 (*) + * @arg @ref LL_EXTI_LINE_90 (*) + * @arg @ref LL_EXTI_LINE_91 (*) * @arg @ref LL_EXTI_LINE_ALL_64_95 + * + * (*) value not defined in all devices. + * (**) value only defined in dual core devices. * @retval None */ __STATIC_INLINE void LL_EXTI_DisableEvent_64_95(uint32_t ExtiLine) @@ -1367,8 +1425,8 @@ __STATIC_INLINE uint32_t LL_EXTI_IsEnabledEvent_0_31(uint32_t ExtiLine) * @arg @ref LL_EXTI_LINE_41 * @arg @ref LL_EXTI_LINE_42 * @arg @ref LL_EXTI_LINE_43 - * @arg @ref LL_EXTI_LINE_44 - * @arg @ref LL_EXTI_LINE_46 + * @arg @ref LL_EXTI_LINE_44 (*) + * @arg @ref LL_EXTI_LINE_46 (*) * @arg @ref LL_EXTI_LINE_47 * @arg @ref LL_EXTI_LINE_48 * @arg @ref LL_EXTI_LINE_49 @@ -1379,14 +1437,16 @@ __STATIC_INLINE uint32_t LL_EXTI_IsEnabledEvent_0_31(uint32_t ExtiLine) * @arg @ref LL_EXTI_LINE_54 * @arg @ref LL_EXTI_LINE_55 * @arg @ref LL_EXTI_LINE_56 - * @arg @ref LL_EXTI_LINE_57 + * @arg @ref LL_EXTI_LINE_57 (*) * @arg @ref LL_EXTI_LINE_58 - * @arg @ref LL_EXTI_LINE_59 + * @arg @ref LL_EXTI_LINE_59 (*) * @arg @ref LL_EXTI_LINE_60 * @arg @ref LL_EXTI_LINE_61 * @arg @ref LL_EXTI_LINE_62 * @arg @ref LL_EXTI_LINE_63 * @arg @ref LL_EXTI_LINE_ALL_32_63 + * + * (*) value not defined in all devices. * @retval State of bit (1 or 0). */ __STATIC_INLINE uint32_t LL_EXTI_IsEnabledEvent_32_63(uint32_t ExtiLine) @@ -1409,18 +1469,25 @@ __STATIC_INLINE uint32_t LL_EXTI_IsEnabledEvent_32_63(uint32_t ExtiLine) * @arg @ref LL_EXTI_LINE_72 * @arg @ref LL_EXTI_LINE_73 * @arg @ref LL_EXTI_LINE_74 - * @arg @ref LL_EXTI_LINE_75 - * @arg @ref LL_EXTI_LINE_76 - * @arg @ref LL_EXTI_LINE_77 - * @arg @ref LL_EXTI_LINE_78 - * @arg @ref LL_EXTI_LINE_79 - * @arg @ref LL_EXTI_LINE_80 - * @arg @ref LL_EXTI_LINE_82 - * @arg @ref LL_EXTI_LINE_84 + * @arg @ref LL_EXTI_LINE_75 (*) + * @arg @ref LL_EXTI_LINE_76 (*) + * @arg @ref LL_EXTI_LINE_77 (**) + * @arg @ref LL_EXTI_LINE_78 (**) + * @arg @ref LL_EXTI_LINE_79 (**) + * @arg @ref LL_EXTI_LINE_80 (**) + * @arg @ref LL_EXTI_LINE_82 (**) + * @arg @ref LL_EXTI_LINE_84 (**) * @arg @ref LL_EXTI_LINE_85 - * @arg @ref LL_EXTI_LINE_86 + * @arg @ref LL_EXTI_LINE_86 (*) * @arg @ref LL_EXTI_LINE_87 + * @arg @ref LL_EXTI_LINE_88 (*) + * @arg @ref LL_EXTI_LINE_89 (*) + * @arg @ref LL_EXTI_LINE_90 (*) + * @arg @ref LL_EXTI_LINE_91 (*) * @arg @ref LL_EXTI_LINE_ALL_64_95 + * + * (*) value not defined in all devices. + * (**) value only defined in dual core devices. * @retval State of bit (1 or 0). */ __STATIC_INLINE uint32_t LL_EXTI_IsEnabledEvent_64_95(uint32_t ExtiLine) @@ -1882,10 +1949,13 @@ __STATIC_INLINE void LL_EXTI_EnableRisingTrig_32_63(uint32_t ExtiLine) * condition. * @rmtoll RTSR3 RTx LL_EXTI_EnableRisingTrig_64_95 * @param ExtiLine This parameter can be a combination of the following values: - * @arg @ref LL_EXTI_LINE_82 - * @arg @ref LL_EXTI_LINE_84 + * @arg @ref LL_EXTI_LINE_82 (*) + * @arg @ref LL_EXTI_LINE_84 (*) * @arg @ref LL_EXTI_LINE_85 - * @arg @ref LL_EXTI_LINE_86 + * @arg @ref LL_EXTI_LINE_86 (**) + * + * (*) value only defined in dual core devices. + * (**) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_EXTI_EnableRisingTrig_64_95(uint32_t ExtiLine) @@ -1965,10 +2035,13 @@ __STATIC_INLINE void LL_EXTI_DisableRisingTrig_32_63(uint32_t ExtiLine) * condition. * @rmtoll RTSR3 RTx LL_EXTI_DisableRisingTrig_64_95 * @param ExtiLine This parameter can be a combination of the following values: - * @arg @ref LL_EXTI_LINE_82 - * @arg @ref LL_EXTI_LINE_84 + * @arg @ref LL_EXTI_LINE_82 (*) + * @arg @ref LL_EXTI_LINE_84 (*) * @arg @ref LL_EXTI_LINE_85 - * @arg @ref LL_EXTI_LINE_86 + * @arg @ref LL_EXTI_LINE_86 (**) + * + * (*) value only defined in dual core devices. + * (**) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_EXTI_DisableRisingTrig_64_95(uint32_t ExtiLine) @@ -2027,10 +2100,13 @@ __STATIC_INLINE uint32_t LL_EXTI_IsEnabledRisingTrig_32_63(uint32_t ExtiLine) * @brief Check if rising edge trigger is enabled for Lines in range 64 to 95 * @rmtoll RTSR3 RTx LL_EXTI_IsEnabledRisingTrig_64_95 * @param ExtiLine This parameter can be a combination of the following values: - * @arg @ref LL_EXTI_LINE_82 - * @arg @ref LL_EXTI_LINE_84 + * @arg @ref LL_EXTI_LINE_82 (*) + * @arg @ref LL_EXTI_LINE_84 (*) * @arg @ref LL_EXTI_LINE_85 - * @arg @ref LL_EXTI_LINE_86 + * @arg @ref LL_EXTI_LINE_86 (**) + * + * (*) value only defined in dual core devices. + * (**) value not defined in all devices. * @retval State of bit (1 or 0). */ __STATIC_INLINE uint32_t LL_EXTI_IsEnabledRisingTrig_64_95(uint32_t ExtiLine) @@ -2117,10 +2193,13 @@ __STATIC_INLINE void LL_EXTI_EnableFallingTrig_32_63(uint32_t ExtiLine) * condition. * @rmtoll FTSR3 FTx LL_EXTI_EnableFallingTrig_64_95 * @param ExtiLine This parameter can be a combination of the following values: - * @arg @ref LL_EXTI_LINE_82 - * @arg @ref LL_EXTI_LINE_84 + * @arg @ref LL_EXTI_LINE_82 (*) + * @arg @ref LL_EXTI_LINE_84 (*) * @arg @ref LL_EXTI_LINE_85 - * @arg @ref LL_EXTI_LINE_86 + * @arg @ref LL_EXTI_LINE_86 (**) + * + * (*) value only defined in dual core devices. + * (**) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_EXTI_EnableFallingTrig_64_95(uint32_t ExtiLine) @@ -2197,10 +2276,13 @@ __STATIC_INLINE void LL_EXTI_DisableFallingTrig_32_63(uint32_t ExtiLine) * In this case, both generate a trigger condition. * @rmtoll FTSR3 FTx LL_EXTI_DisableFallingTrig_64_95 * @param ExtiLine This parameter can be a combination of the following values: - * @arg @ref LL_EXTI_LINE_82 - * @arg @ref LL_EXTI_LINE_84 + * @arg @ref LL_EXTI_LINE_82 (*) + * @arg @ref LL_EXTI_LINE_84 (*) * @arg @ref LL_EXTI_LINE_85 - * @arg @ref LL_EXTI_LINE_86 + * @arg @ref LL_EXTI_LINE_86 (**) + * + * (*) value only defined in dual core devices. + * (**) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_EXTI_DisableFallingTrig_64_95(uint32_t ExtiLine) @@ -2259,10 +2341,13 @@ __STATIC_INLINE uint32_t LL_EXTI_IsEnabledFallingTrig_32_63(uint32_t ExtiLine) * @brief Check if falling edge trigger is enabled for Lines in range 64 to 95 * @rmtoll FTSR3 FTx LL_EXTI_IsEnabledFallingTrig_64_95 * @param ExtiLine This parameter can be a combination of the following values: - * @arg @ref LL_EXTI_LINE_82 - * @arg @ref LL_EXTI_LINE_84 + * @arg @ref LL_EXTI_LINE_82 (*) + * @arg @ref LL_EXTI_LINE_84 (*) * @arg @ref LL_EXTI_LINE_85 - * @arg @ref LL_EXTI_LINE_86 + * @arg @ref LL_EXTI_LINE_86 (**) + * + * (*) value only defined in dual core devices. + * (**) value not defined in all devices. * @retval State of bit (1 or 0). */ __STATIC_INLINE uint32_t LL_EXTI_IsEnabledFallingTrig_64_95(uint32_t ExtiLine) @@ -2344,10 +2429,13 @@ __STATIC_INLINE void LL_EXTI_GenerateSWI_32_63(uint32_t ExtiLine) * register (by writing a 1 into the bit) * @rmtoll SWIER3 SWIx LL_EXTI_GenerateSWI_64_95 * @param ExtiLine This parameter can be a combination of the following values: - * @arg @ref LL_EXTI_LINE_82 - * @arg @ref LL_EXTI_LINE_84 + * @arg @ref LL_EXTI_LINE_82 (*) + * @arg @ref LL_EXTI_LINE_84 (*) * @arg @ref LL_EXTI_LINE_85 - * @arg @ref LL_EXTI_LINE_86 + * @arg @ref LL_EXTI_LINE_86 (**) + * + * (*) value only defined in dual core devices. + * (**) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_EXTI_GenerateSWI_64_95(uint32_t ExtiLine) @@ -2422,11 +2510,13 @@ __STATIC_INLINE uint32_t LL_EXTI_IsActiveFlag_32_63(uint32_t ExtiLine) * line. This bit is cleared by writing a 1 to the bit. * @rmtoll PR3 PIFx LL_EXTI_IsActiveFlag_64_95 * @param ExtiLine This parameter can be a combination of the following values: - * @arg @ref LL_EXTI_LINE_82 - * @arg @ref LL_EXTI_LINE_84 + * @arg @ref LL_EXTI_LINE_82 (*) + * @arg @ref LL_EXTI_LINE_84 (*) * @arg @ref LL_EXTI_LINE_85 - * @arg @ref LL_EXTI_LINE_86 - * @arg @ref LL_EXTI_LINE_ALL_64_95 + * @arg @ref LL_EXTI_LINE_86 (**) + * + * (*) value only defined in dual core devices. + * (**) value not defined in all devices. * @retval State of bit (1 or 0). */ __STATIC_INLINE uint32_t LL_EXTI_IsActiveFlag_64_95(uint32_t ExtiLine) @@ -2493,10 +2583,13 @@ __STATIC_INLINE uint32_t LL_EXTI_ReadFlag_32_63(uint32_t ExtiLine) * line. This bit is cleared by writing a 1 to the bit. * @rmtoll PR3 PIFx LL_EXTI_ReadFlag_64_95 * @param ExtiLine This parameter can be a combination of the following values: - * @arg @ref LL_EXTI_LINE_82 - * @arg @ref LL_EXTI_LINE_84 + * @arg @ref LL_EXTI_LINE_82 (*) + * @arg @ref LL_EXTI_LINE_84 (*) * @arg @ref LL_EXTI_LINE_85 - * @arg @ref LL_EXTI_LINE_86 + * @arg @ref LL_EXTI_LINE_86 (**) + * + * (*) value only defined in dual core devices. + * (**) value not defined in all devices. * @retval @note This bit is set when the selected edge event arrives on the interrupt */ __STATIC_INLINE uint32_t LL_EXTI_ReadFlag_64_95(uint32_t ExtiLine) @@ -2560,10 +2653,13 @@ __STATIC_INLINE void LL_EXTI_ClearFlag_32_63(uint32_t ExtiLine) * line. This bit is cleared by writing a 1 to the bit. * @rmtoll PR3 PIFx LL_EXTI_ClearFlag_64_95 * @param ExtiLine This parameter can be a combination of the following values: - * @arg @ref LL_EXTI_LINE_82 - * @arg @ref LL_EXTI_LINE_84 + * @arg @ref LL_EXTI_LINE_82 (*) + * @arg @ref LL_EXTI_LINE_84 (*) * @arg @ref LL_EXTI_LINE_85 - * @arg @ref LL_EXTI_LINE_86 + * @arg @ref LL_EXTI_LINE_86 (**) + * + * (*) value only defined in dual core devices. + * (**) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_EXTI_ClearFlag_64_95(uint32_t ExtiLine) @@ -2955,8 +3051,12 @@ __STATIC_INLINE uint32_t LL_D3_EXTI_IsEnabledPendMask_32_63(uint32_t ExtiLine) * @param ClrSrc This parameter can be one of the following values: * @arg @ref LL_EXTI_D3_PEND_CLR_DMACH6 * @arg @ref LL_EXTI_D3_PEND_CLR_DMACH7 - * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM4 - * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM5 + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM4 (*) + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM5 (*) + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM2 (*) + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM3 (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_D3_EXTI_SetPendClearSel_0_15(uint32_t ExtiLine, uint32_t ClrSrc) @@ -2975,8 +3075,12 @@ __STATIC_INLINE void LL_D3_EXTI_SetPendClearSel_0_15(uint32_t ExtiLine, uint32_t * @param ClrSrc This parameter can be one of the following values: * @arg @ref LL_EXTI_D3_PEND_CLR_DMACH6 * @arg @ref LL_EXTI_D3_PEND_CLR_DMACH7 - * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM4 - * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM5 + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM4 (*) + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM5 (*) + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM2 (*) + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM3 (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_D3_EXTI_SetPendClearSel_16_31(uint32_t ExtiLine, uint32_t ClrSrc) @@ -2995,8 +3099,12 @@ __STATIC_INLINE void LL_D3_EXTI_SetPendClearSel_16_31(uint32_t ExtiLine, uint32_ * @param ClrSrc This parameter can be one of the following values: * @arg @ref LL_EXTI_D3_PEND_CLR_DMACH6 * @arg @ref LL_EXTI_D3_PEND_CLR_DMACH7 - * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM4 - * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM5 + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM4 (*) + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM5 (*) + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM2 (*) + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM3 (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_D3_EXTI_SetPendClearSel_32_47(uint32_t ExtiLine, uint32_t ClrSrc) @@ -3017,8 +3125,12 @@ __STATIC_INLINE void LL_D3_EXTI_SetPendClearSel_32_47(uint32_t ExtiLine, uint32_ * @param ClrSrc This parameter can be one of the following values: * @arg @ref LL_EXTI_D3_PEND_CLR_DMACH6 * @arg @ref LL_EXTI_D3_PEND_CLR_DMACH7 - * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM4 - * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM5 + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM4 (*) + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM5 (*) + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM2 (*) + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM3 (*) + * + * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_D3_EXTI_SetPendClearSel_48_63(uint32_t ExtiLine, uint32_t ClrSrc) @@ -3049,8 +3161,12 @@ __STATIC_INLINE void LL_D3_EXTI_SetPendClearSel_48_63(uint32_t ExtiLine, uint32_ * @retval Returned value can be one of the following values: * @arg @ref LL_EXTI_D3_PEND_CLR_DMACH6 * @arg @ref LL_EXTI_D3_PEND_CLR_DMACH7 - * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM4 - * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM5 + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM4 (*) + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM5 (*) + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM2 (*) + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM3 (*) + * + * (*) value not defined in all devices. */ __STATIC_INLINE uint32_t LL_D3_EXTI_GetPendClearSel_0_15(uint32_t ExtiLine) { @@ -3068,8 +3184,12 @@ __STATIC_INLINE uint32_t LL_D3_EXTI_GetPendClearSel_0_15(uint32_t ExtiLine) * @retval Returned value can be one of the following values: * @arg @ref LL_EXTI_D3_PEND_CLR_DMACH6 * @arg @ref LL_EXTI_D3_PEND_CLR_DMACH7 - * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM4 - * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM5 + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM4 (*) + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM5 (*) + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM2 (*) + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM3 (*) + * + * (*) value not defined in all devices. */ __STATIC_INLINE uint32_t LL_D3_EXTI_GetPendClearSel_16_31(uint32_t ExtiLine) { @@ -3086,8 +3206,12 @@ __STATIC_INLINE uint32_t LL_D3_EXTI_GetPendClearSel_16_31(uint32_t ExtiLine) * @retval Returned value can be one of the following values: * @arg @ref LL_EXTI_D3_PEND_CLR_DMACH6 * @arg @ref LL_EXTI_D3_PEND_CLR_DMACH7 - * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM4 - * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM5 + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM4 (*) + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM5 (*) + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM2 (*) + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM3 (*) + * + * (*) value not defined in all devices. */ __STATIC_INLINE uint32_t LL_D3_EXTI_GetPendClearSel_32_47(uint32_t ExtiLine) { @@ -3107,8 +3231,12 @@ __STATIC_INLINE uint32_t LL_D3_EXTI_GetPendClearSel_32_47(uint32_t ExtiLine) * @retval Returned value can be one of the following values: * @arg @ref LL_EXTI_D3_PEND_CLR_DMACH6 * @arg @ref LL_EXTI_D3_PEND_CLR_DMACH7 - * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM4 - * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM5 + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM4 (*) + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM5 (*) + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM2 (*) + * @arg @ref LL_EXTI_D3_PEND_CLR_LPTIM3 (*) + * + * (*) value not defined in all devices. */ __STATIC_INLINE uint32_t LL_D3_EXTI_GetPendClearSel_48_63(uint32_t ExtiLine) { diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_fmac.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_fmac.h new file mode 100644 index 0000000..4bc018c --- /dev/null +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_fmac.h @@ -0,0 +1,1049 @@ +/** + ****************************************************************************** + * @file stm32h7xx_ll_fmac.h + * @author MCD Application Team + * @brief Header file of FMAC LL module. + ****************************************************************************** + * @attention + * + *

                  © Copyright (c) 2017 STMicroelectronics. + * All rights reserved.

                  + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32H7xx_LL_FMAC_H +#define STM32H7xx_LL_FMAC_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32h7xx.h" + +/** @addtogroup STM32H7xx_LL_Driver + * @{ + */ + +#if defined(FMAC) + +/** @defgroup FMAC_LL FMAC + * @{ + */ + +/* Private variables ---------------------------------------------------------*/ + +/* Private constants ---------------------------------------------------------*/ + +/* Private macros ------------------------------------------------------------*/ +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup FMAC_LL_Private_Macros FMAC Private Macros + * @{ + */ +/** + * @} + */ +#endif /*USE_FULL_LL_DRIVER*/ + +/* Exported types ------------------------------------------------------------*/ + +/* Exported constants --------------------------------------------------------*/ +/** @defgroup FMAC_LL_Exported_Constants FMAC Exported Constants + * @{ + */ + +/** @defgroup FMAC_LL_EC_GET_FLAG Get Flag Defines + * @brief Flag defines which can be used with LL_FMAC_ReadReg function + * @{ + */ +#define LL_FMAC_SR_SAT FMAC_SR_SAT +#define LL_FMAC_SR_UNFL FMAC_SR_UNFL +#define LL_FMAC_SR_OVFL FMAC_SR_OVFL +#define LL_FMAC_SR_X1FULL FMAC_SR_X1FULL +#define LL_FMAC_SR_YEMPTY FMAC_SR_YEMPTY +/** + * @} + */ + +/** @defgroup FMAC_LL_EC_IT IT Defines + * @brief IT defines which can be used with LL_FMAC_ReadReg and LL_FMAC_WriteReg functions + * @{ + */ +#define LL_FMAC_CR_SATIEN FMAC_CR_SATIEN +#define LL_FMAC_CR_UNFLIEN FMAC_CR_UNFLIEN +#define LL_FMAC_CR_OVFLIEN FMAC_CR_OVFLIEN +#define LL_FMAC_CR_WIEN FMAC_CR_WIEN +#define LL_FMAC_CR_RIEN FMAC_CR_RIEN +/** + * @} + */ + +/** @defgroup FMAC_LL_EC_WM FMAC watermarks + * @brief Watermark defines that can be used for buffer full (input) or buffer empty (output) + * @{ + */ +#define LL_FMAC_WM_0_THRESHOLD_1 0x00000000UL /*!< Buffer full/empty flag set if there is less than 1 free/unread space. */ +#define LL_FMAC_WM_1_THRESHOLD_2 0x01000000UL /*!< Buffer full/empty flag set if there are less than 2 free/unread spaces. */ +#define LL_FMAC_WM_2_THRESHOLD_4 0x02000000UL /*!< Buffer full/empty flag set if there are less than 4 free/unread spaces. */ +#define LL_FMAC_WM_3_THRESHOLD_8 0x03000000UL /*!< Buffer full/empty flag set if there are less than 8 free/empty spaces. */ +/** + * @} + */ + +/** @defgroup FMAC_LL_EC_FUNC FMAC functions + * @{ + */ +#define LL_FMAC_FUNC_LOAD_X1 ((uint32_t)(FMAC_PARAM_FUNC_0)) /*!< Load X1 buffer */ +#define LL_FMAC_FUNC_LOAD_X2 ((uint32_t)(FMAC_PARAM_FUNC_1)) /*!< Load X2 buffer */ +#define LL_FMAC_FUNC_LOAD_Y ((uint32_t)(FMAC_PARAM_FUNC_1 | FMAC_PARAM_FUNC_0)) /*!< Load Y buffer */ +#define LL_FMAC_FUNC_CONVO_FIR ((uint32_t)(FMAC_PARAM_FUNC_3)) /*!< Convolution (FIR filter) */ +#define LL_FMAC_FUNC_IIR_DIRECT_FORM_1 ((uint32_t)(FMAC_PARAM_FUNC_3 | FMAC_PARAM_FUNC_0)) /*!< IIR filter (direct form 1) */ +/** + * @} + */ + +/** + * @} + */ + +/* Exported macro ------------------------------------------------------------*/ +/** @defgroup FMAC_LL_Exported_Macros FMAC Exported Macros + * @{ + */ + +/** @defgroup FMAC_LL_EM_WRITE_READ Common Write and read registers Macros + * @{ + */ + +/** + * @brief Write a value in FMAC register + * @param __INSTANCE__ FMAC Instance + * @param __REG__ Register to be written + * @param __VALUE__ Value to be written in the register + * @retval None + */ +#define LL_FMAC_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__)) + +/** + * @brief Read a value in FMAC register + * @param __INSTANCE__ FMAC Instance + * @param __REG__ Register to be read + * @retval Register value + */ +#define LL_FMAC_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__) +/** + * @} + */ + +/** + * @} + */ + + +/* Exported functions --------------------------------------------------------*/ + +/** @defgroup FMAC_LL_Exported_Functions FMAC Exported Functions + * @{ + */ + +/** @defgroup FMAC_LL_EF_Configuration FMAC Configuration functions + * @{ + */ + +/** + * @brief Configure X1 full watermark. + * @rmtoll X1BUFCFG FULL_WM LL_FMAC_SetX1FullWatermark + * @param FMACx FMAC instance + * @param Watermark This parameter can be one of the following values: + * @arg @ref LL_FMAC_WM_0_THRESHOLD_1 + * @arg @ref LL_FMAC_WM_1_THRESHOLD_2 + * @arg @ref LL_FMAC_WM_2_THRESHOLD_4 + * @arg @ref LL_FMAC_WM_3_THRESHOLD_8 + * @retval None + */ +__STATIC_INLINE void LL_FMAC_SetX1FullWatermark(FMAC_TypeDef *FMACx, uint32_t Watermark) +{ + MODIFY_REG(FMACx->X1BUFCFG, FMAC_X1BUFCFG_FULL_WM, Watermark); +} + +/** + * @brief Return X1 full watermark. + * @rmtoll X1BUFCFG FULL_WM LL_FMAC_GetX1FullWatermark + * @param FMACx FMAC instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_FMAC_WM_0_THRESHOLD_1 + * @arg @ref LL_FMAC_WM_1_THRESHOLD_2 + * @arg @ref LL_FMAC_WM_2_THRESHOLD_4 + * @arg @ref LL_FMAC_WM_3_THRESHOLD_8 + */ +__STATIC_INLINE uint32_t LL_FMAC_GetX1FullWatermark(FMAC_TypeDef *FMACx) +{ + return (uint32_t)(READ_BIT(FMACx->X1BUFCFG, FMAC_X1BUFCFG_FULL_WM)); +} + +/** + * @brief Configure X1 buffer size. + * @rmtoll X1BUFCFG X1_BUF_SIZE LL_FMAC_SetX1BufferSize + * @param FMACx FMAC instance + * @param BufferSize 0x01 .. 0xFF: Number of 16-bit addresses allocated to the input buffer (including the optional "headroom"). + * @retval None + */ +__STATIC_INLINE void LL_FMAC_SetX1BufferSize(FMAC_TypeDef *FMACx, uint8_t BufferSize) +{ + MODIFY_REG(FMACx->X1BUFCFG, FMAC_X1BUFCFG_X1_BUF_SIZE, ((uint32_t)BufferSize) << FMAC_X1BUFCFG_X1_BUF_SIZE_Pos); +} + +/** + * @brief Return X1 buffer size. + * @rmtoll X1BUFCFG X1_BUF_SIZE LL_FMAC_GetX1BufferSize + * @param FMACx FMAC instance + * @retval 0x01 .. 0xFF: Number of 16-bit addresses allocated to the input buffer (including the optional "headroom"). + */ +__STATIC_INLINE uint8_t LL_FMAC_GetX1BufferSize(FMAC_TypeDef *FMACx) +{ + return (uint8_t)(READ_BIT(FMACx->X1BUFCFG, FMAC_X1BUFCFG_X1_BUF_SIZE) >> FMAC_X1BUFCFG_X1_BUF_SIZE_Pos); +} + +/** + * @brief Configure X1 base. + * @rmtoll X1BUFCFG X1_BASE LL_FMAC_SetX1Base + * @param FMACx FMAC instance + * @param Base 0x00 .. 0xFF: Base address of the input buffer (X1) within the internal memory. + * @retval None + */ +__STATIC_INLINE void LL_FMAC_SetX1Base(FMAC_TypeDef *FMACx, uint8_t Base) +{ + MODIFY_REG(FMACx->X1BUFCFG, FMAC_X1BUFCFG_X1_BASE, ((uint32_t)Base) << FMAC_X1BUFCFG_X1_BASE_Pos); +} + +/** + * @brief Return X1 base. + * @rmtoll X1BUFCFG X1_BASE LL_FMAC_GetX1Base + * @param FMACx FMAC instance + * @retval 0x00 .. 0xFF: Base address of the input buffer (X1) within the internal memory. + */ +__STATIC_INLINE uint8_t LL_FMAC_GetX1Base(FMAC_TypeDef *FMACx) +{ + return (uint8_t)(READ_BIT(FMACx->X1BUFCFG, FMAC_X1BUFCFG_X1_BASE) >> FMAC_X1BUFCFG_X1_BASE_Pos); +} + +/** + * @brief Configure X2 buffer size. + * @rmtoll X2BUFCFG X2_BUF_SIZE LL_FMAC_SetX2BufferSize + * @param FMACx FMAC instance + * @param BufferSize 0x01 .. 0xFF: Number of 16-bit addresses allocated to the coefficient buffer. + * @retval None + */ +__STATIC_INLINE void LL_FMAC_SetX2BufferSize(FMAC_TypeDef *FMACx, uint8_t BufferSize) +{ + MODIFY_REG(FMACx->X2BUFCFG, FMAC_X2BUFCFG_X2_BUF_SIZE, ((uint32_t)BufferSize) << FMAC_X2BUFCFG_X2_BUF_SIZE_Pos); +} + +/** + * @brief Return X2 buffer size. + * @rmtoll X2BUFCFG X2_BUF_SIZE LL_FMAC_GetX2BufferSize + * @param FMACx FMAC instance + * @retval 0x01 .. 0xFF: Number of 16-bit addresses allocated to the coefficient buffer. + */ +__STATIC_INLINE uint8_t LL_FMAC_GetX2BufferSize(FMAC_TypeDef *FMACx) +{ + return (uint8_t)(READ_BIT(FMACx->X2BUFCFG, FMAC_X2BUFCFG_X2_BUF_SIZE) >> FMAC_X2BUFCFG_X2_BUF_SIZE_Pos); +} + +/** + * @brief Configure X2 base. + * @rmtoll X2BUFCFG X2_BASE LL_FMAC_SetX2Base + * @param FMACx FMAC instance + * @param Base 0x00 .. 0xFF: Base address of the coefficient buffer (X2) within the internal memory. + * @retval None + */ +__STATIC_INLINE void LL_FMAC_SetX2Base(FMAC_TypeDef *FMACx, uint8_t Base) +{ + MODIFY_REG(FMACx->X2BUFCFG, FMAC_X2BUFCFG_X2_BASE, ((uint32_t)Base) << FMAC_X2BUFCFG_X2_BASE_Pos); +} + +/** + * @brief Return X2 base. + * @rmtoll X2BUFCFG X2_BASE LL_FMAC_GetX2Base + * @param FMACx FMAC instance + * @retval 0x00 .. 0xFF: Base address of the coefficient buffer (X2) within the internal memory. + */ +__STATIC_INLINE uint8_t LL_FMAC_GetX2Base(FMAC_TypeDef *FMACx) +{ + return (uint8_t)(READ_BIT(FMACx->X2BUFCFG, FMAC_X2BUFCFG_X2_BASE) >> FMAC_X2BUFCFG_X2_BASE_Pos); +} + +/** + * @brief Configure Y empty watermark. + * @rmtoll YBUFCFG EMPTY_WM LL_FMAC_SetYEmptyWatermark + * @param FMACx FMAC instance + * @param Watermark This parameter can be one of the following values: + * @arg @ref LL_FMAC_WM_0_THRESHOLD_1 + * @arg @ref LL_FMAC_WM_1_THRESHOLD_2 + * @arg @ref LL_FMAC_WM_2_THRESHOLD_4 + * @arg @ref LL_FMAC_WM_3_THRESHOLD_8 + * @retval None + */ +__STATIC_INLINE void LL_FMAC_SetYEmptyWatermark(FMAC_TypeDef *FMACx, uint32_t Watermark) +{ + MODIFY_REG(FMACx->YBUFCFG, FMAC_YBUFCFG_EMPTY_WM, Watermark); +} + +/** + * @brief Return Y empty watermark. + * @rmtoll YBUFCFG EMPTY_WM LL_FMAC_GetYEmptyWatermark + * @param FMACx FMAC instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_FMAC_WM_0_THRESHOLD_1 + * @arg @ref LL_FMAC_WM_1_THRESHOLD_2 + * @arg @ref LL_FMAC_WM_2_THRESHOLD_4 + * @arg @ref LL_FMAC_WM_3_THRESHOLD_8 + */ +__STATIC_INLINE uint32_t LL_FMAC_GetYEmptyWatermark(FMAC_TypeDef *FMACx) +{ + return (uint32_t)(READ_BIT(FMACx->YBUFCFG, FMAC_YBUFCFG_EMPTY_WM)); +} + +/** + * @brief Configure Y buffer size. + * @rmtoll YBUFCFG Y_BUF_SIZE LL_FMAC_SetYBufferSize + * @param FMACx FMAC instance + * @param BufferSize 0x01 .. 0xFF: Number of 16-bit addresses allocated to the output buffer (including the optional "headroom"). + * @retval None + */ +__STATIC_INLINE void LL_FMAC_SetYBufferSize(FMAC_TypeDef *FMACx, uint8_t BufferSize) +{ + MODIFY_REG(FMACx->YBUFCFG, FMAC_YBUFCFG_Y_BUF_SIZE, ((uint32_t)BufferSize) << FMAC_YBUFCFG_Y_BUF_SIZE_Pos); +} + +/** + * @brief Return Y buffer size. + * @rmtoll YBUFCFG Y_BUF_SIZE LL_FMAC_GetYBufferSize + * @param FMACx FMAC instance + * @retval 0x01 .. 0xFF: Number of 16-bit addresses allocated to the output buffer (including the optional "headroom"). + */ +__STATIC_INLINE uint8_t LL_FMAC_GetYBufferSize(FMAC_TypeDef *FMACx) +{ + return (uint8_t)(READ_BIT(FMACx->YBUFCFG, FMAC_YBUFCFG_Y_BUF_SIZE) >> FMAC_YBUFCFG_Y_BUF_SIZE_Pos); +} + +/** + * @brief Configure Y base. + * @rmtoll YBUFCFG Y_BASE LL_FMAC_SetYBase + * @param FMACx FMAC instance + * @param Base 0x00 .. 0xFF: Base address of the output buffer (Y) within the internal memory. + * @retval None + */ +__STATIC_INLINE void LL_FMAC_SetYBase(FMAC_TypeDef *FMACx, uint8_t Base) +{ + MODIFY_REG(FMACx->YBUFCFG, FMAC_YBUFCFG_Y_BASE, ((uint32_t)Base) << FMAC_YBUFCFG_Y_BASE_Pos); +} + +/** + * @brief Return Y base. + * @rmtoll YBUFCFG Y_BASE LL_FMAC_GetYBase + * @param FMACx FMAC instance + * @retval 0x00 .. 0xFF: Base address of the output buffer (Y) within the internal memory. + */ +__STATIC_INLINE uint8_t LL_FMAC_GetYBase(FMAC_TypeDef *FMACx) +{ + return (uint8_t)(READ_BIT(FMACx->YBUFCFG, FMAC_YBUFCFG_Y_BASE) >> FMAC_YBUFCFG_Y_BASE_Pos); +} + +/** + * @brief Start FMAC processing. + * @rmtoll PARAM START LL_FMAC_EnableStart + * @param FMACx FMAC instance + * @retval None + */ +__STATIC_INLINE void LL_FMAC_EnableStart(FMAC_TypeDef *FMACx) +{ + SET_BIT(FMACx->PARAM, FMAC_PARAM_START); +} + +/** + * @brief Stop FMAC processing. + * @rmtoll PARAM START LL_FMAC_DisableStart + * @param FMACx FMAC instance + * @retval None + */ +__STATIC_INLINE void LL_FMAC_DisableStart(FMAC_TypeDef *FMACx) +{ + CLEAR_BIT(FMACx->PARAM, FMAC_PARAM_START); +} + +/** + * @brief Check the state of FMAC processing. + * @rmtoll PARAM START LL_FMAC_IsEnabledStart + * @param FMACx FMAC instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_FMAC_IsEnabledStart(FMAC_TypeDef *FMACx) +{ + return ((READ_BIT(FMACx->PARAM, FMAC_PARAM_START) == (FMAC_PARAM_START)) ? 1UL : 0UL); +} + +/** + * @brief Configure function. + * @rmtoll PARAM FUNC LL_FMAC_SetFunction + * @param FMACx FMAC instance + * @param Function This parameter can be one of the following values: + * @arg @ref LL_FMAC_FUNC_LOAD_X1 + * @arg @ref LL_FMAC_FUNC_LOAD_X2 + * @arg @ref LL_FMAC_FUNC_LOAD_Y + * @arg @ref LL_FMAC_FUNC_CONVO_FIR + * @arg @ref LL_FMAC_FUNC_IIR_DIRECT_FORM_1 + * @retval None + */ +__STATIC_INLINE void LL_FMAC_SetFunction(FMAC_TypeDef *FMACx, uint32_t Function) +{ + MODIFY_REG(FMACx->PARAM, FMAC_PARAM_FUNC, Function); +} + +/** + * @brief Return function. + * @rmtoll PARAM FUNC LL_FMAC_GetFunction + * @param FMACx FMAC instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_FMAC_FUNC_LOAD_X1 + * @arg @ref LL_FMAC_FUNC_LOAD_X2 + * @arg @ref LL_FMAC_FUNC_LOAD_Y + * @arg @ref LL_FMAC_FUNC_CONVO_FIR + * @arg @ref LL_FMAC_FUNC_IIR_DIRECT_FORM_1 + */ +__STATIC_INLINE uint32_t LL_FMAC_GetFunction(FMAC_TypeDef *FMACx) +{ + return (uint32_t)(READ_BIT(FMACx->PARAM, FMAC_PARAM_FUNC)); +} + +/** + * @brief Configure input parameter R. + * @rmtoll PARAM R LL_FMAC_SetParamR + * @param FMACx FMAC instance + * @param Param 0x00 .. 0xFF: Parameter R (gain, etc.). + * @retval None + */ +__STATIC_INLINE void LL_FMAC_SetParamR(FMAC_TypeDef *FMACx, uint8_t Param) +{ + MODIFY_REG(FMACx->PARAM, FMAC_PARAM_R, ((uint32_t)Param) << FMAC_PARAM_R_Pos); +} + +/** + * @brief Return input parameter R. + * @rmtoll PARAM R LL_FMAC_GetParamR + * @param FMACx FMAC instance + * @retval 0x00 .. 0xFF: Parameter R (gain, etc.). + */ +__STATIC_INLINE uint8_t LL_FMAC_GetParamR(FMAC_TypeDef *FMACx) +{ + return (uint8_t)(READ_BIT(FMACx->PARAM, FMAC_PARAM_R) >> FMAC_PARAM_R_Pos); +} + +/** + * @brief Configure input parameter Q. + * @rmtoll PARAM Q LL_FMAC_SetParamQ + * @param FMACx FMAC instance + * @param Param 0x00 .. 0xFF: Parameter Q (vector length, etc.). + * @retval None + */ +__STATIC_INLINE void LL_FMAC_SetParamQ(FMAC_TypeDef *FMACx, uint8_t Param) +{ + MODIFY_REG(FMACx->PARAM, FMAC_PARAM_Q, ((uint32_t)Param) << FMAC_PARAM_Q_Pos); +} + +/** + * @brief Return input parameter Q. + * @rmtoll PARAM Q LL_FMAC_GetParamQ + * @param FMACx FMAC instance + * @retval 0x00 .. 0xFF: Parameter Q (vector length, etc.). + */ +__STATIC_INLINE uint8_t LL_FMAC_GetParamQ(FMAC_TypeDef *FMACx) +{ + return (uint8_t)(READ_BIT(FMACx->PARAM, FMAC_PARAM_Q) >> FMAC_PARAM_Q_Pos); +} + +/** + * @brief Configure input parameter P. + * @rmtoll PARAM P LL_FMAC_SetParamP + * @param FMACx FMAC instance + * @param Param 0x00 .. 0xFF: Parameter P (vector length, number of filter taps, etc.). + * @retval None + */ +__STATIC_INLINE void LL_FMAC_SetParamP(FMAC_TypeDef *FMACx, uint8_t Param) +{ + MODIFY_REG(FMACx->PARAM, FMAC_PARAM_P, ((uint32_t)Param) << FMAC_PARAM_P_Pos); +} + +/** + * @brief Return input parameter P. + * @rmtoll PARAM P LL_FMAC_GetParamP + * @param FMACx FMAC instance + * @retval 0x00 .. 0xFF: Parameter P (vector length, number of filter taps, etc.). + */ +__STATIC_INLINE uint8_t LL_FMAC_GetParamP(FMAC_TypeDef *FMACx) +{ + return (uint8_t)(READ_BIT(FMACx->PARAM, FMAC_PARAM_P) >> FMAC_PARAM_P_Pos); +} + +/** + * @} + */ + +/** @defgroup FMAC_LL_EF_Reset_Management Reset_Management + * @{ + */ + +/** + * @brief Start the FMAC reset. + * @rmtoll CR RESET LL_FMAC_EnableReset + * @param FMACx FMAC instance + * @retval None + */ +__STATIC_INLINE void LL_FMAC_EnableReset(FMAC_TypeDef *FMACx) +{ + SET_BIT(FMACx->CR, FMAC_CR_RESET); +} + +/** + * @brief Interrupt the FMAC reset. + * @rmtoll CR RESET LL_FMAC_DisableReset + * @param FMACx FMAC instance + * @retval None + */ +__STATIC_INLINE void LL_FMAC_DisableReset(FMAC_TypeDef *FMACx) +{ + CLEAR_BIT(FMACx->CR, FMAC_CR_RESET); +} + +/** + * @brief Check the state of the FMAC reset. + * @rmtoll CR RESET LL_FMAC_IsEnabledReset + * @param FMACx FMAC instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_FMAC_IsEnabledReset(FMAC_TypeDef *FMACx) +{ + return ((READ_BIT(FMACx->CR, FMAC_CR_RESET) == (FMAC_CR_RESET)) ? 1UL : 0UL); +} + +/** + * @} + */ + +/** @defgroup FMAC_LL_EF_Configuration FMAC Configuration functions + * @{ + */ + +/** + * @brief Enable Clipping. + * @rmtoll CR CLIPEN LL_FMAC_EnableClipping + * @param FMACx FMAC instance + * @retval None + */ +__STATIC_INLINE void LL_FMAC_EnableClipping(FMAC_TypeDef *FMACx) +{ + SET_BIT(FMACx->CR, FMAC_CR_CLIPEN); +} + +/** + * @brief Disable Clipping. + * @rmtoll CR CLIPEN LL_FMAC_DisableClipping + * @param FMACx FMAC instance + * @retval None + */ +__STATIC_INLINE void LL_FMAC_DisableClipping(FMAC_TypeDef *FMACx) +{ + CLEAR_BIT(FMACx->CR, FMAC_CR_CLIPEN); +} + +/** + * @brief Check Clipping State. + * @rmtoll CR CLIPEN LL_FMAC_IsEnabledClipping + * @param FMACx FMAC instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_FMAC_IsEnabledClipping(FMAC_TypeDef *FMACx) +{ + return ((READ_BIT(FMACx->CR, FMAC_CR_CLIPEN) == (FMAC_CR_CLIPEN)) ? 1UL : 0UL); +} + +/** + * @} + */ + +/** @defgroup FMAC_LL_EF_DMA_Management DMA_Management + * @{ + */ + +/** + * @brief Enable FMAC DMA write channel request. + * @rmtoll CR DMAWEN LL_FMAC_EnableDMAReq_WRITE + * @param FMACx FMAC instance + * @retval None + */ +__STATIC_INLINE void LL_FMAC_EnableDMAReq_WRITE(FMAC_TypeDef *FMACx) +{ + SET_BIT(FMACx->CR, FMAC_CR_DMAWEN); +} + +/** + * @brief Disable FMAC DMA write channel request. + * @rmtoll CR DMAWEN LL_FMAC_DisableDMAReq_WRITE + * @param FMACx FMAC instance + * @retval None + */ +__STATIC_INLINE void LL_FMAC_DisableDMAReq_WRITE(FMAC_TypeDef *FMACx) +{ + CLEAR_BIT(FMACx->CR, FMAC_CR_DMAWEN); +} + +/** + * @brief Check FMAC DMA write channel request state. + * @rmtoll CR DMAWEN LL_FMAC_IsEnabledDMAReq_WRITE + * @param FMACx FMAC instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_FMAC_IsEnabledDMAReq_WRITE(FMAC_TypeDef *FMACx) +{ + return ((READ_BIT(FMACx->CR, FMAC_CR_DMAWEN) == (FMAC_CR_DMAWEN)) ? 1UL : 0UL); +} + +/** + * @brief Enable FMAC DMA read channel request. + * @rmtoll CR DMAREN LL_FMAC_EnableDMAReq_READ + * @param FMACx FMAC instance + * @retval None + */ +__STATIC_INLINE void LL_FMAC_EnableDMAReq_READ(FMAC_TypeDef *FMACx) +{ + SET_BIT(FMACx->CR, FMAC_CR_DMAREN); +} + +/** + * @brief Disable FMAC DMA read channel request. + * @rmtoll CR DMAREN LL_FMAC_DisableDMAReq_READ + * @param FMACx FMAC instance + * @retval None + */ +__STATIC_INLINE void LL_FMAC_DisableDMAReq_READ(FMAC_TypeDef *FMACx) +{ + CLEAR_BIT(FMACx->CR, FMAC_CR_DMAREN); +} + +/** + * @brief Check FMAC DMA read channel request state. + * @rmtoll CR DMAREN LL_FMAC_IsEnabledDMAReq_READ + * @param FMACx FMAC instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_FMAC_IsEnabledDMAReq_READ(FMAC_TypeDef *FMACx) +{ + return ((READ_BIT(FMACx->CR, FMAC_CR_DMAREN) == (FMAC_CR_DMAREN)) ? 1UL : 0UL); +} + +/** + * @} + */ + +/** @defgroup FMAC_LL_EF_IT_Management IT_Management + * @{ + */ + +/** + * @brief Enable FMAC saturation error interrupt. + * @rmtoll CR SATIEN LL_FMAC_EnableIT_SAT + * @param FMACx FMAC instance + * @retval None + */ +__STATIC_INLINE void LL_FMAC_EnableIT_SAT(FMAC_TypeDef *FMACx) +{ + SET_BIT(FMACx->CR, FMAC_CR_SATIEN); +} + +/** + * @brief Disable FMAC saturation error interrupt. + * @rmtoll CR SATIEN LL_FMAC_DisableIT_SAT + * @param FMACx FMAC instance + * @retval None + */ +__STATIC_INLINE void LL_FMAC_DisableIT_SAT(FMAC_TypeDef *FMACx) +{ + CLEAR_BIT(FMACx->CR, FMAC_CR_SATIEN); +} + +/** + * @brief Check FMAC saturation error interrupt state. + * @rmtoll CR SATIEN LL_FMAC_IsEnabledIT_SAT + * @param FMACx FMAC instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_FMAC_IsEnabledIT_SAT(FMAC_TypeDef *FMACx) +{ + return ((READ_BIT(FMACx->CR, FMAC_CR_SATIEN) == (FMAC_CR_SATIEN)) ? 1UL : 0UL); +} + +/** + * @brief Enable FMAC underflow error interrupt. + * @rmtoll CR UNFLIEN LL_FMAC_EnableIT_UNFL + * @param FMACx FMAC instance + * @retval None + */ +__STATIC_INLINE void LL_FMAC_EnableIT_UNFL(FMAC_TypeDef *FMACx) +{ + SET_BIT(FMACx->CR, FMAC_CR_UNFLIEN); +} + +/** + * @brief Disable FMAC underflow error interrupt. + * @rmtoll CR UNFLIEN LL_FMAC_DisableIT_UNFL + * @param FMACx FMAC instance + * @retval None + */ +__STATIC_INLINE void LL_FMAC_DisableIT_UNFL(FMAC_TypeDef *FMACx) +{ + CLEAR_BIT(FMACx->CR, FMAC_CR_UNFLIEN); +} + +/** + * @brief Check FMAC underflow error interrupt state. + * @rmtoll CR UNFLIEN LL_FMAC_IsEnabledIT_UNFL + * @param FMACx FMAC instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_FMAC_IsEnabledIT_UNFL(FMAC_TypeDef *FMACx) +{ + return ((READ_BIT(FMACx->CR, FMAC_CR_UNFLIEN) == (FMAC_CR_UNFLIEN)) ? 1UL : 0UL); +} + +/** + * @brief Enable FMAC overflow error interrupt. + * @rmtoll CR OVFLIEN LL_FMAC_EnableIT_OVFL + * @param FMACx FMAC instance + * @retval None + */ +__STATIC_INLINE void LL_FMAC_EnableIT_OVFL(FMAC_TypeDef *FMACx) +{ + SET_BIT(FMACx->CR, FMAC_CR_OVFLIEN); +} + +/** + * @brief Disable FMAC overflow error interrupt. + * @rmtoll CR OVFLIEN LL_FMAC_DisableIT_OVFL + * @param FMACx FMAC instance + * @retval None + */ +__STATIC_INLINE void LL_FMAC_DisableIT_OVFL(FMAC_TypeDef *FMACx) +{ + CLEAR_BIT(FMACx->CR, FMAC_CR_OVFLIEN); +} + +/** + * @brief Check FMAC overflow error interrupt state. + * @rmtoll CR OVFLIEN LL_FMAC_IsEnabledIT_OVFL + * @param FMACx FMAC instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_FMAC_IsEnabledIT_OVFL(FMAC_TypeDef *FMACx) +{ + return ((READ_BIT(FMACx->CR, FMAC_CR_OVFLIEN) == (FMAC_CR_OVFLIEN)) ? 1UL : 0UL); +} + +/** + * @brief Enable FMAC write interrupt. + * @rmtoll CR WIEN LL_FMAC_EnableIT_WR + * @param FMACx FMAC instance + * @retval None + */ +__STATIC_INLINE void LL_FMAC_EnableIT_WR(FMAC_TypeDef *FMACx) +{ + SET_BIT(FMACx->CR, FMAC_CR_WIEN); +} + +/** + * @brief Disable FMAC write interrupt. + * @rmtoll CR WIEN LL_FMAC_DisableIT_WR + * @param FMACx FMAC instance + * @retval None + */ +__STATIC_INLINE void LL_FMAC_DisableIT_WR(FMAC_TypeDef *FMACx) +{ + CLEAR_BIT(FMACx->CR, FMAC_CR_WIEN); +} + +/** + * @brief Check FMAC write interrupt state. + * @rmtoll CR WIEN LL_FMAC_IsEnabledIT_WR + * @param FMACx FMAC instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_FMAC_IsEnabledIT_WR(FMAC_TypeDef *FMACx) +{ + return ((READ_BIT(FMACx->CR, FMAC_CR_WIEN) == (FMAC_CR_WIEN)) ? 1UL : 0UL); +} + +/** + * @brief Enable FMAC read interrupt. + * @rmtoll CR RIEN LL_FMAC_EnableIT_RD + * @param FMACx FMAC instance + * @retval None + */ +__STATIC_INLINE void LL_FMAC_EnableIT_RD(FMAC_TypeDef *FMACx) +{ + SET_BIT(FMACx->CR, FMAC_CR_RIEN); +} + +/** + * @brief Disable FMAC read interrupt. + * @rmtoll CR RIEN LL_FMAC_DisableIT_RD + * @param FMACx FMAC instance + * @retval None + */ +__STATIC_INLINE void LL_FMAC_DisableIT_RD(FMAC_TypeDef *FMACx) +{ + CLEAR_BIT(FMACx->CR, FMAC_CR_RIEN); +} + +/** + * @brief Check FMAC read interrupt state. + * @rmtoll CR RIEN LL_FMAC_IsEnabledIT_RD + * @param FMACx FMAC instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_FMAC_IsEnabledIT_RD(FMAC_TypeDef *FMACx) +{ + return ((READ_BIT(FMACx->CR, FMAC_CR_RIEN) == (FMAC_CR_RIEN)) ? 1UL : 0UL); +} + +/** + * @} + */ + +/** @defgroup FMAC_LL_EF_FLAG_Management FLAG_Management + * @{ + */ + +/** + * @brief Check FMAC saturation error flag state. + * @rmtoll SR SAT LL_FMAC_IsActiveFlag_SAT + * @param FMACx FMAC instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_FMAC_IsActiveFlag_SAT(FMAC_TypeDef *FMACx) +{ + return ((READ_BIT(FMACx->SR, FMAC_SR_SAT) == (FMAC_SR_SAT)) ? 1UL : 0UL); +} + +/** + * @brief Check FMAC underflow error flag state. + * @rmtoll SR UNFL LL_FMAC_IsActiveFlag_UNFL + * @param FMACx FMAC instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_FMAC_IsActiveFlag_UNFL(FMAC_TypeDef *FMACx) +{ + return ((READ_BIT(FMACx->SR, FMAC_SR_UNFL) == (FMAC_SR_UNFL)) ? 1UL : 0UL); +} + +/** + * @brief Check FMAC overflow error flag state. + * @rmtoll SR OVFL LL_FMAC_IsActiveFlag_OVFL + * @param FMACx FMAC instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_FMAC_IsActiveFlag_OVFL(FMAC_TypeDef *FMACx) +{ + return ((READ_BIT(FMACx->SR, FMAC_SR_OVFL) == (FMAC_SR_OVFL)) ? 1UL : 0UL); +} + +/** + * @brief Check FMAC X1 buffer full flag state. + * @rmtoll SR X1FULL LL_FMAC_IsActiveFlag_X1FULL + * @param FMACx FMAC instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_FMAC_IsActiveFlag_X1FULL(FMAC_TypeDef *FMACx) +{ + return ((READ_BIT(FMACx->SR, FMAC_SR_X1FULL) == (FMAC_SR_X1FULL)) ? 1UL : 0UL); +} + +/** + * @brief Check FMAC Y buffer empty flag state. + * @rmtoll SR YEMPTY LL_FMAC_IsActiveFlag_YEMPTY + * @param FMACx FMAC instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_FMAC_IsActiveFlag_YEMPTY(FMAC_TypeDef *FMACx) +{ + return ((READ_BIT(FMACx->SR, FMAC_SR_YEMPTY) == (FMAC_SR_YEMPTY)) ? 1UL : 0UL); +} + +/** + * @} + */ + +/** @defgroup FMAC_LL_EF_Data_Management Data_Management + * @{ + */ + +/** + * @brief Write 16-bit input data for the FMAC processing. + * @rmtoll WDATA WDATA LL_FMAC_WriteData + * @param FMACx FMAC instance + * @param InData 0x0000 .. 0xFFFF: 16-bit value to be provided as input data for FMAC processing. + * @retval None + */ +__STATIC_INLINE void LL_FMAC_WriteData(FMAC_TypeDef *FMACx, uint16_t InData) +{ + WRITE_REG(FMACx->WDATA, InData); +} + +/** + * @brief Return 16-bit output data of FMAC processing. + * @rmtoll RDATA RDATA LL_FMAC_ReadData + * @param FMACx FMAC instance + * @retval 0x0000 .. 0xFFFF: 16-bit output data of FMAC processing. + */ +__STATIC_INLINE uint16_t LL_FMAC_ReadData(FMAC_TypeDef *FMACx) +{ + return (uint16_t)(READ_REG(FMACx->RDATA)); +} + +/** + * @} + */ + +/** @defgroup FMAC_LL_EF_Configuration FMAC Configuration functions + * @{ + */ + +/** + * @brief Configure memory for X1 buffer. + * @rmtoll X1BUFCFG FULL_WM LL_FMAC_ConfigX1\n + * X1BUFCFG X1_BASE LL_FMAC_ConfigX1\n + * X1BUFCFG X1_BUF_SIZE LL_FMAC_ConfigX1 + * @param FMACx FMAC instance + * @param Watermark This parameter can be one of the following values: + * @arg @ref LL_FMAC_WM_0_THRESHOLD_1 + * @arg @ref LL_FMAC_WM_1_THRESHOLD_2 + * @arg @ref LL_FMAC_WM_2_THRESHOLD_4 + * @arg @ref LL_FMAC_WM_3_THRESHOLD_8 + * @param Base 0x00 .. 0xFF: Base address of the input buffer (X1) within the internal memory. + * @param BufferSize 0x01 .. 0xFF: Number of 16-bit addresses allocated to the input buffer (including the optional "headroom"). + * @retval None + */ +__STATIC_INLINE void LL_FMAC_ConfigX1(FMAC_TypeDef *FMACx, uint32_t Watermark, uint8_t Base, uint8_t BufferSize) +{ + MODIFY_REG(FMACx->X1BUFCFG, FMAC_X1BUFCFG_FULL_WM | FMAC_X1BUFCFG_X1_BASE | FMAC_X1BUFCFG_X1_BUF_SIZE, + Watermark | (((uint32_t)Base) << FMAC_X1BUFCFG_X1_BASE_Pos) | (((uint32_t)BufferSize) << FMAC_X1BUFCFG_X1_BUF_SIZE_Pos)); +} + +/** + * @brief Configure memory for X2 buffer. + * @rmtoll X2BUFCFG X2_BASE LL_FMAC_ConfigX2\n + * X2BUFCFG X2_BUF_SIZE LL_FMAC_ConfigX2 + * @param FMACx FMAC instance + * @param Base 0x00 .. 0xFF: Base address of the coefficient buffer (X2) within the internal memory. + * @param BufferSize 0x01 .. 0xFF: Number of 16-bit addresses allocated to the coefficient buffer. + * @retval None + */ +__STATIC_INLINE void LL_FMAC_ConfigX2(FMAC_TypeDef *FMACx, uint8_t Base, uint8_t BufferSize) +{ + MODIFY_REG(FMACx->X2BUFCFG, FMAC_X2BUFCFG_X2_BASE | FMAC_X2BUFCFG_X2_BUF_SIZE, + (((uint32_t)Base) << FMAC_X2BUFCFG_X2_BASE_Pos) | (((uint32_t)BufferSize) << FMAC_X2BUFCFG_X2_BUF_SIZE_Pos)); +} + +/** + * @brief Configure memory for Y buffer. + * @rmtoll YBUFCFG EMPTY_WM LL_FMAC_ConfigY\n + * YBUFCFG Y_BASE LL_FMAC_ConfigY\n + * YBUFCFG Y_BUF_SIZE LL_FMAC_ConfigY + * @param FMACx FMAC instance + * @param Watermark This parameter can be one of the following values: + * @arg @ref LL_FMAC_WM_0_THRESHOLD_1 + * @arg @ref LL_FMAC_WM_1_THRESHOLD_2 + * @arg @ref LL_FMAC_WM_2_THRESHOLD_4 + * @arg @ref LL_FMAC_WM_3_THRESHOLD_8 + * @param Base 0x00 .. 0xFF: Base address of the output buffer (Y) within the internal memory. + * @param BufferSize 0x01 .. 0xFF: Number of 16-bit addresses allocated to the output buffer (including the optional "headroom"). + * @retval None + */ +__STATIC_INLINE void LL_FMAC_ConfigY(FMAC_TypeDef *FMACx, uint32_t Watermark, uint8_t Base, uint8_t BufferSize) +{ + MODIFY_REG(FMACx->YBUFCFG, FMAC_YBUFCFG_EMPTY_WM | FMAC_YBUFCFG_Y_BASE | FMAC_YBUFCFG_Y_BUF_SIZE, + Watermark | (((uint32_t)Base) << FMAC_YBUFCFG_Y_BASE_Pos) | (((uint32_t)BufferSize) << FMAC_YBUFCFG_Y_BUF_SIZE_Pos)); +} + +/** + * @brief Configure the FMAC processing. + * @rmtoll PARAM START LL_FMAC_ConfigFunc\n + * PARAM FUNC LL_FMAC_ConfigFunc\n + * PARAM P LL_FMAC_ConfigFunc\n + * PARAM Q LL_FMAC_ConfigFunc\n + * PARAM R LL_FMAC_ConfigFunc + * @param FMACx FMAC instance + * @param Start 0x00 .. 0x01: Enable or disable FMAC processing. + * @param Function This parameter can be one of the following values: + * @arg @ref LL_FMAC_FUNC_LOAD_X1 + * @arg @ref LL_FMAC_FUNC_LOAD_X2 + * @arg @ref LL_FMAC_FUNC_LOAD_Y + * @arg @ref LL_FMAC_FUNC_CONVO_FIR + * @arg @ref LL_FMAC_FUNC_IIR_DIRECT_FORM_1 + * @param ParamP 0x00 .. 0xFF: Parameter P (vector length, number of filter taps, etc.). + * @param ParamQ 0x00 .. 0xFF: Parameter Q (vector length, etc.). + * @param ParamR 0x00 .. 0xFF: Parameter R (gain, etc.). + * @retval None + */ +__STATIC_INLINE void LL_FMAC_ConfigFunc(FMAC_TypeDef *FMACx, uint8_t Start, uint32_t Function, uint8_t ParamP, + uint8_t ParamQ, uint8_t ParamR) +{ + MODIFY_REG(FMACx->PARAM, FMAC_PARAM_START | FMAC_PARAM_FUNC | FMAC_PARAM_P | FMAC_PARAM_Q | FMAC_PARAM_R, + (((uint32_t)Start) << FMAC_PARAM_START_Pos) | Function | (((uint32_t)ParamP) << FMAC_PARAM_P_Pos) | (((uint32_t)ParamQ) << FMAC_PARAM_Q_Pos) | (((uint32_t)ParamR) << FMAC_PARAM_R_Pos)); +} + +/** + * @} + */ + + + +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup FMAC_LL_EF_Init Initialization and de-initialization functions + * @{ + */ +ErrorStatus LL_FMAC_Init(FMAC_TypeDef *FMACx); +ErrorStatus LL_FMAC_DeInit(FMAC_TypeDef *FMACx); + + +/** + * @} + */ +#endif /* USE_FULL_LL_DRIVER */ + +/** + * @} + */ + +/** + * @} + */ + +#endif /* defined(FMAC) */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32H7xx_LL_FMAC_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_hrtim.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_hrtim.h index a16dd28..69d00fc 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_hrtim.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_hrtim.h @@ -1971,8 +1971,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsDisabledOutput(HRTIM_TypeDef *HRTIMx, uint32 */ __STATIC_INLINE void LL_HRTIM_ConfigADCTrig(HRTIM_TypeDef *HRTIMx, uint32_t ADCTrig, uint32_t Update, uint32_t Src) { - register uint32_t shift = ((3U * ADCTrig) & 0x1FU); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.ADC1R) + + uint32_t shift = ((3U * ADCTrig) & 0x1FU); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.ADC1R) + REG_OFFSET_TAB_ADCxR[ADCTrig])); MODIFY_REG(HRTIMx->sCommonRegs.CR1, (HRTIM_CR1_ADC1USRC << shift), (Update << shift)); WRITE_REG(*pReg, Src); @@ -2004,7 +2004,7 @@ __STATIC_INLINE void LL_HRTIM_ConfigADCTrig(HRTIM_TypeDef *HRTIMx, uint32_t ADCT */ __STATIC_INLINE void LL_HRTIM_SetADCTrigUpdate(HRTIM_TypeDef *HRTIMx, uint32_t ADCTrig, uint32_t Update) { - register uint32_t shift = ((3U * ADCTrig) & 0x1FU); + uint32_t shift = ((3U * ADCTrig) & 0x1FU); MODIFY_REG(HRTIMx->sCommonRegs.CR1, (HRTIM_CR1_ADC1USRC << shift), (Update << shift)); } @@ -2030,7 +2030,7 @@ __STATIC_INLINE void LL_HRTIM_SetADCTrigUpdate(HRTIM_TypeDef *HRTIMx, uint32_t A */ __STATIC_INLINE uint32_t LL_HRTIM_GetADCTrigUpdate(HRTIM_TypeDef *HRTIMx, uint32_t ADCTrig) { - register const uint32_t shift = ((3U * ADCTrig) & 0x1FU); + const uint32_t shift = ((3U * ADCTrig) & 0x1FU); return (READ_BIT(HRTIMx->sCommonRegs.CR1, (uint32_t)(HRTIM_CR1_ADC1USRC) << shift) >> shift); } @@ -2247,7 +2247,7 @@ __STATIC_INLINE uint32_t LL_HRTIM_GetADCTrigUpdate(HRTIM_TypeDef *HRTIMx, uint32 */ __STATIC_INLINE void LL_HRTIM_SetADCTrigSrc(HRTIM_TypeDef *HRTIMx, uint32_t ADCTrig, uint32_t Src) { - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.ADC1R) + + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.ADC1R) + REG_OFFSET_TAB_ADCxR[ADCTrig])); WRITE_REG(*pReg, Src); } @@ -2464,7 +2464,7 @@ __STATIC_INLINE void LL_HRTIM_SetADCTrigSrc(HRTIM_TypeDef *HRTIMx, uint32_t ADCT */ __STATIC_INLINE uint32_t LL_HRTIM_GetADCTrigSrc(HRTIM_TypeDef *HRTIMx, uint32_t ADCTrig) { - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.ADC1R) + + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.ADC1R) + REG_OFFSET_TAB_ADCxR[ADCTrig])); return (*pReg); @@ -2570,8 +2570,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_IsCounterEnabled(HRTIM_TypeDef *HRTIMx, ui */ __STATIC_INLINE void LL_HRTIM_TIM_SetPrescaler(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Prescaler) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); MODIFY_REG(*pReg, HRTIM_MCR_CK_PSC, Prescaler); } @@ -2594,8 +2594,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_SetPrescaler(HRTIM_TypeDef *HRTIMx, uint32_t T */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetPrescaler(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); return (READ_BIT(*pReg, HRTIM_MCR_CK_PSC)); } @@ -2621,8 +2621,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetPrescaler(HRTIM_TypeDef *HRTIMx, uint32 */ __STATIC_INLINE void LL_HRTIM_TIM_SetCounterMode(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Mode) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); MODIFY_REG(*pReg, (HRTIM_TIMCR_RETRIG | HRTIM_MCR_CONT), Mode); } @@ -2647,8 +2647,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_SetCounterMode(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCounterMode(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); return (READ_BIT(*pReg, (HRTIM_MCR_RETRIG | HRTIM_MCR_CONT))); } @@ -2671,8 +2671,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCounterMode(HRTIM_TypeDef *HRTIMx, uint */ __STATIC_INLINE void LL_HRTIM_TIM_EnableHalfMode(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_MCR_HALF); } @@ -2692,8 +2692,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_EnableHalfMode(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE void LL_HRTIM_TIM_DisableHalfMode(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_MCR_HALF); } @@ -2713,8 +2713,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_DisableHalfMode(HRTIM_TypeDef *HRTIMx, uint32_ */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_IsEnabledHalfMode(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_MCR_HALF) == (HRTIM_MCR_HALF)) ? 1UL : 0UL); } @@ -2734,8 +2734,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_IsEnabledHalfMode(HRTIM_TypeDef *HRTIMx, u */ __STATIC_INLINE void LL_HRTIM_TIM_EnableStartOnSync(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_MCR_SYNCSTRTM); } @@ -2755,8 +2755,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_EnableStartOnSync(HRTIM_TypeDef *HRTIMx, uint3 */ __STATIC_INLINE void LL_HRTIM_TIM_DisableStartOnSync(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_MCR_SYNCSTRTM); } @@ -2776,8 +2776,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_DisableStartOnSync(HRTIM_TypeDef *HRTIMx, uint */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_IsEnabledStartOnSync(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_MCR_SYNCSTRTM) == (HRTIM_MCR_SYNCSTRTM)) ? 1UL : 0UL); } @@ -2798,8 +2798,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_IsEnabledStartOnSync(HRTIM_TypeDef *HRTIMx */ __STATIC_INLINE void LL_HRTIM_TIM_EnableResetOnSync(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_MCR_SYNCRSTM); } @@ -2819,8 +2819,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_EnableResetOnSync(HRTIM_TypeDef *HRTIMx, uint3 */ __STATIC_INLINE void LL_HRTIM_TIM_DisableResetOnSync(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_MCR_SYNCRSTM); } @@ -2840,8 +2840,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_DisableResetOnSync(HRTIM_TypeDef *HRTIMx, uint */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_IsEnabledResetOnSync(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_MCR_SYNCRSTM) == (HRTIM_MCR_SYNCRSTM)) ? 1UL : 0UL); } @@ -2867,8 +2867,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_IsEnabledResetOnSync(HRTIM_TypeDef *HRTIMx */ __STATIC_INLINE void LL_HRTIM_TIM_SetDACTrig(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t DACTrig) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); MODIFY_REG(*pReg, HRTIM_MCR_DACSYNC, DACTrig); } @@ -2892,8 +2892,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_SetDACTrig(HRTIM_TypeDef *HRTIMx, uint32_t Tim */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetDACTrig(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); return (READ_BIT(*pReg, HRTIM_MCR_DACSYNC)); } @@ -2916,8 +2916,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetDACTrig(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE void LL_HRTIM_TIM_EnablePreload(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_MCR_PREEN); } @@ -2937,8 +2937,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_EnablePreload(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE void LL_HRTIM_TIM_DisablePreload(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_MCR_PREEN); } @@ -2958,8 +2958,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_DisablePreload(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_IsEnabledPreload(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_MCR_PREEN) == (HRTIM_MCR_PREEN)) ? 1UL : 0UL); } @@ -3002,8 +3002,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_IsEnabledPreload(HRTIM_TypeDef *HRTIMx, ui */ __STATIC_INLINE void LL_HRTIM_TIM_SetUpdateTrig(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t UpdateTrig) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); MODIFY_REG(*pReg, REG_MASK_TAB_UPDATETRIG[iTimer], UpdateTrig << REG_SHIFT_TAB_UPDATETRIG[iTimer]); } @@ -3043,8 +3043,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_SetUpdateTrig(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetUpdateTrig(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); return (READ_BIT(*pReg, REG_MASK_TAB_UPDATETRIG[iTimer]) >> REG_SHIFT_TAB_UPDATETRIG[iTimer]); } @@ -3081,8 +3081,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetUpdateTrig(HRTIM_TypeDef *HRTIMx, uint3 */ __STATIC_INLINE void LL_HRTIM_TIM_SetUpdateGating(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t UpdateGating) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); MODIFY_REG(*pReg, REG_MASK_TAB_UPDATEGATING[iTimer], (UpdateGating << REG_SHIFT_TAB_UPDATEGATING[iTimer])); } @@ -3118,8 +3118,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_SetUpdateGating(HRTIM_TypeDef *HRTIMx, uint32_ */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetUpdateGating(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer])); return (READ_BIT(*pReg, REG_MASK_TAB_UPDATEGATING[iTimer]) >> REG_SHIFT_TAB_UPDATEGATING[iTimer]); } @@ -3137,8 +3137,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetUpdateGating(HRTIM_TypeDef *HRTIMx, uin */ __STATIC_INLINE void LL_HRTIM_TIM_EnablePushPullMode(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].TIMxCR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].TIMxCR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_TIMCR_PSHPLL); } @@ -3157,8 +3157,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_EnablePushPullMode(HRTIM_TypeDef *HRTIMx, uint */ __STATIC_INLINE void LL_HRTIM_TIM_DisablePushPullMode(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].TIMxCR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].TIMxCR) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_TIMCR_PSHPLL); } @@ -3177,8 +3177,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_DisablePushPullMode(HRTIM_TypeDef *HRTIMx, uin */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_IsEnabledPushPullMode(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].TIMxCR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].TIMxCR) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_TIMCR_PSHPLL) == (HRTIM_TIMCR_PSHPLL)) ? 1UL : 0UL); } @@ -3208,10 +3208,10 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_IsEnabledPushPullMode(HRTIM_TypeDef *HRTIM __STATIC_INLINE void LL_HRTIM_TIM_SetCompareMode(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t CompareUnit, uint32_t Mode) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].TIMxCR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].TIMxCR) + REG_OFFSET_TAB_TIMER[iTimer])); - register uint32_t shift = (((uint32_t)POSITION_VAL(CompareUnit) - (uint32_t)POSITION_VAL(LL_HRTIM_COMPAREUNIT_2)) & 0x1FU); + uint32_t shift = (((uint32_t)POSITION_VAL(CompareUnit) - (uint32_t)POSITION_VAL(LL_HRTIM_COMPAREUNIT_2)) & 0x1FU); MODIFY_REG(* pReg, (HRTIM_TIMCR_DELCMP2 << shift), (Mode << shift)); } @@ -3237,10 +3237,10 @@ __STATIC_INLINE void LL_HRTIM_TIM_SetCompareMode(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCompareMode(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t CompareUnit) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].TIMxCR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].TIMxCR) + REG_OFFSET_TAB_TIMER[iTimer])); - register uint32_t shift = (((uint32_t)POSITION_VAL(CompareUnit) - (uint32_t)POSITION_VAL(LL_HRTIM_COMPAREUNIT_2)) & 0x1FU); + uint32_t shift = (((uint32_t)POSITION_VAL(CompareUnit) - (uint32_t)POSITION_VAL(LL_HRTIM_COMPAREUNIT_2)) & 0x1FU); return (READ_BIT(*pReg, (HRTIM_TIMCR_DELCMP2 << shift)) >> shift); } @@ -3267,8 +3267,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCompareMode(HRTIM_TypeDef *HRTIMx, uint */ __STATIC_INLINE void LL_HRTIM_TIM_SetCounter(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Counter) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCNTR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCNTR) + REG_OFFSET_TAB_TIMER[iTimer])); MODIFY_REG(* pReg, HRTIM_MCNTR_MCNTR, Counter); } @@ -3289,8 +3289,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_SetCounter(HRTIM_TypeDef *HRTIMx, uint32_t Tim */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCounter(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCNTR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCNTR) + REG_OFFSET_TAB_TIMER[iTimer])); return (READ_BIT(*pReg, HRTIM_MCNTR_MCNTR)); } @@ -3312,8 +3312,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCounter(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE void LL_HRTIM_TIM_SetPeriod(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Period) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MPER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MPER) + REG_OFFSET_TAB_TIMER[iTimer])); MODIFY_REG(* pReg, HRTIM_MPER_MPER, Period); } @@ -3334,8 +3334,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_SetPeriod(HRTIM_TypeDef *HRTIMx, uint32_t Time */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetPeriod(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MPER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MPER) + REG_OFFSET_TAB_TIMER[iTimer])); return (READ_BIT(*pReg, HRTIM_MPER_MPER)); } @@ -3357,8 +3357,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetPeriod(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE void LL_HRTIM_TIM_SetRepetition(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Repetition) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MREP) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MREP) + REG_OFFSET_TAB_TIMER[iTimer])); MODIFY_REG(* pReg, HRTIM_MREP_MREP, Repetition); } @@ -3379,8 +3379,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_SetRepetition(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetRepetition(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MREP) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MREP) + REG_OFFSET_TAB_TIMER[iTimer])); return (READ_BIT(*pReg, HRTIM_MREP_MREP)); } @@ -3404,8 +3404,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetRepetition(HRTIM_TypeDef *HRTIMx, uint3 */ __STATIC_INLINE void LL_HRTIM_TIM_SetCompare1(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t CompareValue) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCMP1R) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCMP1R) + REG_OFFSET_TAB_TIMER[iTimer])); MODIFY_REG(* pReg, HRTIM_MCMP1R_MCMP1R, CompareValue); } @@ -3428,8 +3428,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_SetCompare1(HRTIM_TypeDef *HRTIMx, uint32_t Ti */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCompare1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCMP1R) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCMP1R) + REG_OFFSET_TAB_TIMER[iTimer])); return (READ_BIT(*pReg, HRTIM_MCMP1R_MCMP1R)); } @@ -3453,8 +3453,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCompare1(HRTIM_TypeDef *HRTIMx, uint32_ */ __STATIC_INLINE void LL_HRTIM_TIM_SetCompare2(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t CompareValue) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCMP2R) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCMP2R) + REG_OFFSET_TAB_TIMER[iTimer])); MODIFY_REG(* pReg, HRTIM_MCMP1R_MCMP2R, CompareValue); } @@ -3477,8 +3477,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_SetCompare2(HRTIM_TypeDef *HRTIMx, uint32_t Ti */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCompare2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCMP2R) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCMP2R) + REG_OFFSET_TAB_TIMER[iTimer])); return (READ_BIT(*pReg, HRTIM_MCMP1R_MCMP2R)); } @@ -3502,8 +3502,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCompare2(HRTIM_TypeDef *HRTIMx, uint32_ */ __STATIC_INLINE void LL_HRTIM_TIM_SetCompare3(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t CompareValue) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCMP3R) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCMP3R) + REG_OFFSET_TAB_TIMER[iTimer])); MODIFY_REG(* pReg, HRTIM_MCMP1R_MCMP3R, CompareValue); } @@ -3526,8 +3526,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_SetCompare3(HRTIM_TypeDef *HRTIMx, uint32_t Ti */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCompare3(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCMP3R) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCMP3R) + REG_OFFSET_TAB_TIMER[iTimer])); return (READ_BIT(*pReg, HRTIM_MCMP1R_MCMP3R)); } @@ -3551,8 +3551,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCompare3(HRTIM_TypeDef *HRTIMx, uint32_ */ __STATIC_INLINE void LL_HRTIM_TIM_SetCompare4(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t CompareValue) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCMP4R) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCMP4R) + REG_OFFSET_TAB_TIMER[iTimer])); MODIFY_REG(* pReg, HRTIM_MCMP1R_MCMP4R, CompareValue); } @@ -3575,8 +3575,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_SetCompare4(HRTIM_TypeDef *HRTIMx, uint32_t Ti */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCompare4(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCMP4R) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCMP4R) + REG_OFFSET_TAB_TIMER[iTimer])); return (READ_BIT(*pReg, HRTIM_MCMP1R_MCMP4R)); } @@ -3662,8 +3662,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCompare4(HRTIM_TypeDef *HRTIMx, uint32_ */ __STATIC_INLINE void LL_HRTIM_TIM_SetResetTrig(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t ResetTrig) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].RSTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].RSTxR) + REG_OFFSET_TAB_TIMER[iTimer])); WRITE_REG(*pReg, ResetTrig); } @@ -3742,8 +3742,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_SetResetTrig(HRTIM_TypeDef *HRTIMx, uint32_t T */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetResetTrig(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].RSTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].RSTxR) + REG_OFFSET_TAB_TIMER[iTimer])); return (READ_REG(*pReg)); } @@ -3762,8 +3762,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetResetTrig(HRTIM_TypeDef *HRTIMx, uint32 */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCapture1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CPT1xR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CPT1xR) + REG_OFFSET_TAB_TIMER[iTimer])); return (READ_REG(*pReg)); } @@ -3782,8 +3782,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCapture1(HRTIM_TypeDef *HRTIMx, uint32_ */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCapture2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CPT2xR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CPT2xR) + REG_OFFSET_TAB_TIMER[iTimer])); return (READ_REG(*pReg)); } @@ -3870,8 +3870,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCapture2(HRTIM_TypeDef *HRTIMx, uint32_ __STATIC_INLINE void LL_HRTIM_TIM_SetCaptureTrig(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t CaptureUnit, uint32_t CaptureTrig) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0U].CPT1xCR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0U].CPT1xCR) + REG_OFFSET_TAB_TIMER[iTimer] + (CaptureUnit * 4U))); WRITE_REG(*pReg, CaptureTrig); } @@ -3956,8 +3956,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_SetCaptureTrig(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCaptureTrig(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t CaptureUnit) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0U].CPT1xCR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0U].CPT1xCR) + REG_OFFSET_TAB_TIMER[iTimer] + (CaptureUnit * 4U))); return (READ_REG(*pReg)); } @@ -3976,8 +3976,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCaptureTrig(HRTIM_TypeDef *HRTIMx, uint */ __STATIC_INLINE void LL_HRTIM_TIM_EnableDeadTime(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_OUTR_DTEN); } @@ -3996,8 +3996,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_EnableDeadTime(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE void LL_HRTIM_TIM_DisableDeadTime(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_OUTR_DTEN); } @@ -4016,8 +4016,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_DisableDeadTime(HRTIM_TypeDef *HRTIMx, uint32_ */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_IsEnabledDeadTime(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_OUTR_DTEN) == (HRTIM_OUTR_DTEN)) ? 1UL : 0UL); @@ -4061,8 +4061,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_IsEnabledDeadTime(HRTIM_TypeDef *HRTIMx, u */ __STATIC_INLINE void LL_HRTIM_TIM_SetDLYPRTMode(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t DLYPRTMode) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + REG_OFFSET_TAB_TIMER[iTimer])); MODIFY_REG(*pReg, HRTIM_OUTR_DLYPRT, DLYPRTMode); } @@ -4102,8 +4102,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_SetDLYPRTMode(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetDLYPRTMode(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + REG_OFFSET_TAB_TIMER[iTimer])); return (READ_BIT(*pReg, HRTIM_OUTR_DLYPRT)); } @@ -4123,8 +4123,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetDLYPRTMode(HRTIM_TypeDef *HRTIMx, uint3 */ __STATIC_INLINE void LL_HRTIM_TIM_EnableDLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_OUTR_DLYPRTEN); } @@ -4144,8 +4144,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_EnableDLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t T */ __STATIC_INLINE void LL_HRTIM_TIM_DisableDLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_OUTR_DLYPRTEN); } @@ -4164,8 +4164,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_DisableDLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_IsEnabledDLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_OUTR_DLYPRTEN) == (HRTIM_OUTR_DLYPRTEN)) ? 1UL : 0UL); } @@ -4194,8 +4194,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_IsEnabledDLYPRT(HRTIM_TypeDef *HRTIMx, uin */ __STATIC_INLINE void LL_HRTIM_TIM_EnableFault(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Faults) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].FLTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].FLTxR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, Faults); } @@ -4224,8 +4224,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_EnableFault(HRTIM_TypeDef *HRTIMx, uint32_t Ti */ __STATIC_INLINE void LL_HRTIM_TIM_DisableFault(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Faults) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].FLTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].FLTxR) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, Faults); } @@ -4254,8 +4254,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_DisableFault(HRTIM_TypeDef *HRTIMx, uint32_t T */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_IsEnabledFault(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Fault) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].FLTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].FLTxR) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, Fault) == (Fault)) ? 1UL : 0UL); @@ -4276,8 +4276,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_IsEnabledFault(HRTIM_TypeDef *HRTIMx, uint */ __STATIC_INLINE void LL_HRTIM_TIM_LockFault(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].FLTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].FLTxR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_FLTR_FLTLCK); } @@ -4306,7 +4306,7 @@ __STATIC_INLINE void LL_HRTIM_TIM_LockFault(HRTIM_TypeDef *HRTIMx, uint32_t Time */ __STATIC_INLINE void LL_HRTIM_TIM_SetBurstModeOption(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t BurtsModeOption) { - register uint32_t iTimer = (uint8_t)((POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos) & 0x1FU); + uint32_t iTimer = (uint8_t)((POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos) & 0x1FU); MODIFY_REG(HRTIMx->sCommonRegs.BMCR, Timer, BurtsModeOption << iTimer); } @@ -4332,7 +4332,7 @@ __STATIC_INLINE void LL_HRTIM_TIM_SetBurstModeOption(HRTIM_TypeDef *HRTIMx, uint */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetBurstModeOption(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)((POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos) & 0x1FU); + uint32_t iTimer = (uint8_t)((POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos) & 0x1FU); return (READ_BIT(HRTIMx->sCommonRegs.BMCR, Timer) >> iTimer); } @@ -4419,8 +4419,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetBurstModeOption(HRTIM_TypeDef *HRTIMx, __STATIC_INLINE void LL_HRTIM_TIM_ConfigBurstDMA(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Registers) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.BDMUPR) + (4U * iTimer))); + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.BDMUPR) + (4U * iTimer))); WRITE_REG(*pReg, Registers); } @@ -4441,8 +4441,8 @@ __STATIC_INLINE void LL_HRTIM_TIM_ConfigBurstDMA(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCurrentPushPullStatus(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + REG_OFFSET_TAB_TIMER[iTimer])); return (READ_BIT(*pReg, HRTIM_TIMISR_CPPSTAT)); } @@ -4463,8 +4463,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCurrentPushPullStatus(HRTIM_TypeDef *HR */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetIdlePushPullStatus(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + REG_OFFSET_TAB_TIMER[iTimer])); return (READ_BIT(*pReg, HRTIM_TIMISR_IPPSTAT)); } @@ -4522,9 +4522,9 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetIdlePushPullStatus(HRTIM_TypeDef *HRTIM */ __STATIC_INLINE void LL_HRTIM_TIM_SetEventFilter(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Event, uint32_t Filter) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - POSITION_VAL(LL_HRTIM_TIMER_A)); - register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].EEFxR1) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - POSITION_VAL(LL_HRTIM_TIMER_A)); + uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].EEFxR1) + REG_OFFSET_TAB_TIMER[iTimer] + REG_OFFSET_TAB_EECR[iEvent])); MODIFY_REG(*pReg, (HRTIM_EEFR1_EE1FLTR << REG_SHIFT_TAB_EExSRC[iEvent]), (Filter << REG_SHIFT_TAB_EExSRC[iEvent])); } @@ -4579,9 +4579,9 @@ __STATIC_INLINE void LL_HRTIM_TIM_SetEventFilter(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetEventFilter(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Event) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - POSITION_VAL(LL_HRTIM_TIMER_A)); - register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].EEFxR1) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - POSITION_VAL(LL_HRTIM_TIMER_A)); + uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].EEFxR1) + REG_OFFSET_TAB_TIMER[iTimer] + REG_OFFSET_TAB_EECR[iEvent])); return (READ_BIT(*pReg, (uint32_t)(HRTIM_EEFR1_EE1FLTR) << (REG_SHIFT_TAB_EExSRC[iEvent])) >> (REG_SHIFT_TAB_EExSRC[iEvent])); } @@ -4625,9 +4625,9 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetEventFilter(HRTIM_TypeDef *HRTIMx, uint __STATIC_INLINE void LL_HRTIM_TIM_SetEventLatchStatus(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Event, uint32_t LatchStatus) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - POSITION_VAL(LL_HRTIM_TIMER_A)); - register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].EEFxR1) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - POSITION_VAL(LL_HRTIM_TIMER_A)); + uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].EEFxR1) + REG_OFFSET_TAB_TIMER[iTimer] + REG_OFFSET_TAB_EECR[iEvent])); MODIFY_REG(*pReg, (HRTIM_EEFR1_EE1LTCH << REG_SHIFT_TAB_EExSRC[iEvent]), (LatchStatus << REG_SHIFT_TAB_EExSRC[iEvent])); } @@ -4668,9 +4668,9 @@ __STATIC_INLINE void LL_HRTIM_TIM_SetEventLatchStatus(HRTIM_TypeDef *HRTIMx, uin */ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetEventLatchStatus(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Event) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - POSITION_VAL(LL_HRTIM_TIMER_A)); - register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].EEFxR1) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - POSITION_VAL(LL_HRTIM_TIMER_A)); + uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].EEFxR1) + REG_OFFSET_TAB_TIMER[iTimer] + REG_OFFSET_TAB_EECR[iEvent])); return (READ_BIT(*pReg, (uint32_t)(HRTIM_EEFR1_EE1LTCH) << REG_SHIFT_TAB_EExSRC[iEvent]) >> (REG_SHIFT_TAB_EExSRC[iEvent])); } @@ -4703,8 +4703,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetEventLatchStatus(HRTIM_TypeDef *HRTIMx, */ __STATIC_INLINE void LL_HRTIM_DT_Config(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Configuration) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + REG_OFFSET_TAB_TIMER[iTimer])); MODIFY_REG(*pReg, HRTIM_DTR_SDTF | HRTIM_DTR_DTPRSC | HRTIM_DTR_SDTR, Configuration); } @@ -4732,8 +4732,8 @@ __STATIC_INLINE void LL_HRTIM_DT_Config(HRTIM_TypeDef *HRTIMx, uint32_t Timer, u */ __STATIC_INLINE void LL_HRTIM_DT_SetPrescaler(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Prescaler) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + REG_OFFSET_TAB_TIMER[iTimer])); MODIFY_REG(*pReg, HRTIM_DTR_DTPRSC, Prescaler); } @@ -4760,8 +4760,8 @@ __STATIC_INLINE void LL_HRTIM_DT_SetPrescaler(HRTIM_TypeDef *HRTIMx, uint32_t Ti */ __STATIC_INLINE uint32_t LL_HRTIM_DT_GetPrescaler(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + REG_OFFSET_TAB_TIMER[iTimer])); return (READ_BIT(*pReg, HRTIM_DTR_DTPRSC)); } @@ -4781,8 +4781,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_DT_GetPrescaler(HRTIM_TypeDef *HRTIMx, uint32_ */ __STATIC_INLINE void LL_HRTIM_DT_SetRisingValue(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t RisingValue) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + REG_OFFSET_TAB_TIMER[iTimer])); MODIFY_REG(*pReg, HRTIM_DTR_DTR, RisingValue); } @@ -4801,8 +4801,8 @@ __STATIC_INLINE void LL_HRTIM_DT_SetRisingValue(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_DT_GetRisingValue(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + REG_OFFSET_TAB_TIMER[iTimer])); return (READ_BIT(*pReg, HRTIM_DTR_DTR)); } @@ -4824,8 +4824,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_DT_GetRisingValue(HRTIM_TypeDef *HRTIMx, uint3 */ __STATIC_INLINE void LL_HRTIM_DT_SetRisingSign(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t RisingSign) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + REG_OFFSET_TAB_TIMER[iTimer])); MODIFY_REG(*pReg, HRTIM_DTR_SDTR, RisingSign); } @@ -4846,8 +4846,8 @@ __STATIC_INLINE void LL_HRTIM_DT_SetRisingSign(HRTIM_TypeDef *HRTIMx, uint32_t T */ __STATIC_INLINE uint32_t LL_HRTIM_DT_GetRisingSign(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + REG_OFFSET_TAB_TIMER[iTimer])); return (READ_BIT(*pReg, HRTIM_DTR_SDTR)); } @@ -4867,8 +4867,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_DT_GetRisingSign(HRTIM_TypeDef *HRTIMx, uint32 */ __STATIC_INLINE void LL_HRTIM_DT_SetFallingValue(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t FallingValue) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + REG_OFFSET_TAB_TIMER[iTimer])); MODIFY_REG(*pReg, HRTIM_DTR_DTF, FallingValue << HRTIM_DTR_DTF_Pos); } @@ -4887,8 +4887,8 @@ __STATIC_INLINE void LL_HRTIM_DT_SetFallingValue(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_DT_GetFallingValue(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_DTR_DTF)) >> HRTIM_DTR_DTF_Pos); } @@ -4910,8 +4910,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_DT_GetFallingValue(HRTIM_TypeDef *HRTIMx, uint */ __STATIC_INLINE void LL_HRTIM_DT_SetFallingSign(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t FallingSign) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + REG_OFFSET_TAB_TIMER[iTimer])); MODIFY_REG(*pReg, HRTIM_DTR_SDTF, FallingSign); } @@ -4932,8 +4932,8 @@ __STATIC_INLINE void LL_HRTIM_DT_SetFallingSign(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_DT_GetFallingSign(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + REG_OFFSET_TAB_TIMER[iTimer])); return (READ_BIT(*pReg, HRTIM_DTR_SDTF)); } @@ -4952,8 +4952,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_DT_GetFallingSign(HRTIM_TypeDef *HRTIMx, uint3 */ __STATIC_INLINE void LL_HRTIM_DT_LockRising(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_DTR_DTRLK); } @@ -4972,8 +4972,8 @@ __STATIC_INLINE void LL_HRTIM_DT_LockRising(HRTIM_TypeDef *HRTIMx, uint32_t Time */ __STATIC_INLINE void LL_HRTIM_DT_LockRisingSign(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_DTR_DTRSLK); } @@ -4992,8 +4992,8 @@ __STATIC_INLINE void LL_HRTIM_DT_LockRisingSign(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE void LL_HRTIM_DT_LockFalling(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_DTR_DTFLK); } @@ -5012,8 +5012,8 @@ __STATIC_INLINE void LL_HRTIM_DT_LockFalling(HRTIM_TypeDef *HRTIMx, uint32_t Tim */ __STATIC_INLINE void LL_HRTIM_DT_LockFallingSign(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_DTR_DTFSLK); } @@ -5048,8 +5048,8 @@ __STATIC_INLINE void LL_HRTIM_DT_LockFallingSign(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE void LL_HRTIM_CHP_Config(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Configuration) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CHPxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CHPxR) + REG_OFFSET_TAB_TIMER[iTimer])); MODIFY_REG(*pReg, HRTIM_CHPR_STRPW | HRTIM_CHPR_CARDTY | HRTIM_CHPR_CARFRQ, Configuration); } @@ -5088,8 +5088,8 @@ __STATIC_INLINE void LL_HRTIM_CHP_Config(HRTIM_TypeDef *HRTIMx, uint32_t Timer, */ __STATIC_INLINE void LL_HRTIM_CHP_SetPrescaler(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Prescaler) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CHPxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CHPxR) + REG_OFFSET_TAB_TIMER[iTimer])); MODIFY_REG(*pReg, HRTIM_CHPR_CARFRQ, Prescaler); } @@ -5124,8 +5124,8 @@ __STATIC_INLINE void LL_HRTIM_CHP_SetPrescaler(HRTIM_TypeDef *HRTIMx, uint32_t T */ __STATIC_INLINE uint32_t LL_HRTIM_CHP_GetPrescaler(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CHPxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CHPxR) + REG_OFFSET_TAB_TIMER[iTimer])); return (READ_BIT(*pReg, HRTIM_CHPR_CARFRQ)); } @@ -5156,8 +5156,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_CHP_GetPrescaler(HRTIM_TypeDef *HRTIMx, uint32 */ __STATIC_INLINE void LL_HRTIM_CHP_SetDutyCycle(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t DutyCycle) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CHPxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CHPxR) + REG_OFFSET_TAB_TIMER[iTimer])); MODIFY_REG(*pReg, HRTIM_CHPR_CARDTY, DutyCycle); } @@ -5184,8 +5184,8 @@ __STATIC_INLINE void LL_HRTIM_CHP_SetDutyCycle(HRTIM_TypeDef *HRTIMx, uint32_t T */ __STATIC_INLINE uint32_t LL_HRTIM_CHP_GetDutyCycle(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CHPxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CHPxR) + REG_OFFSET_TAB_TIMER[iTimer])); return (READ_BIT(*pReg, HRTIM_CHPR_CARDTY)); } @@ -5223,8 +5223,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_CHP_GetDutyCycle(HRTIM_TypeDef *HRTIMx, uint32 */ __STATIC_INLINE void LL_HRTIM_CHP_SetPulseWidth(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t PulseWidth) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CHPxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CHPxR) + REG_OFFSET_TAB_TIMER[iTimer])); MODIFY_REG(*pReg, HRTIM_CHPR_STRPW, PulseWidth); } @@ -5259,8 +5259,8 @@ __STATIC_INLINE void LL_HRTIM_CHP_SetPulseWidth(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_CHP_GetPulseWidth(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CHPxR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CHPxR) + REG_OFFSET_TAB_TIMER[iTimer])); return (READ_BIT(*pReg, HRTIM_CHPR_STRPW)); } @@ -5388,8 +5388,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_CHP_GetPulseWidth(HRTIM_TypeDef *HRTIMx, uint3 */ __STATIC_INLINE void LL_HRTIM_OUT_SetOutputSetSrc(HRTIM_TypeDef *HRTIMx, uint32_t Output, uint32_t SetSrc) { - register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].SETx1R) + + uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].SETx1R) + REG_OFFSET_TAB_SETxR[iOutput])); WRITE_REG(*pReg, SetSrc); } @@ -5508,8 +5508,8 @@ __STATIC_INLINE void LL_HRTIM_OUT_SetOutputSetSrc(HRTIM_TypeDef *HRTIMx, uint32_ */ __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetOutputSetSrc(HRTIM_TypeDef *HRTIMx, uint32_t Output) { - register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].SETx1R) + + uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].SETx1R) + REG_OFFSET_TAB_SETxR[iOutput])); return (uint32_t) READ_REG(*pReg); } @@ -5629,8 +5629,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetOutputSetSrc(HRTIM_TypeDef *HRTIMx, uin */ __STATIC_INLINE void LL_HRTIM_OUT_SetOutputResetSrc(HRTIM_TypeDef *HRTIMx, uint32_t Output, uint32_t ResetSrc) { - register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].RSTx1R) + + uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].RSTx1R) + REG_OFFSET_TAB_SETxR[iOutput])); WRITE_REG(*pReg, ResetSrc); } @@ -5749,8 +5749,8 @@ __STATIC_INLINE void LL_HRTIM_OUT_SetOutputResetSrc(HRTIM_TypeDef *HRTIMx, uint3 */ __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetOutputResetSrc(HRTIM_TypeDef *HRTIMx, uint32_t Output) { - register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].RSTx1R) + + uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].RSTx1R) + REG_OFFSET_TAB_SETxR[iOutput])); return (uint32_t) READ_REG(*pReg); } @@ -5792,8 +5792,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetOutputResetSrc(HRTIM_TypeDef *HRTIMx, u */ __STATIC_INLINE void LL_HRTIM_OUT_Config(HRTIM_TypeDef *HRTIMx, uint32_t Output, uint32_t Configuration) { - register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + + uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + REG_OFFSET_TAB_OUTxR[iOutput])); MODIFY_REG(*pReg, (HRTIM_OUT_CONFIG_MASK << REG_SHIFT_TAB_OUTxR[iOutput]), (Configuration << REG_SHIFT_TAB_OUTxR[iOutput])); @@ -5822,8 +5822,8 @@ __STATIC_INLINE void LL_HRTIM_OUT_Config(HRTIM_TypeDef *HRTIMx, uint32_t Output, */ __STATIC_INLINE void LL_HRTIM_OUT_SetPolarity(HRTIM_TypeDef *HRTIMx, uint32_t Output, uint32_t Polarity) { - register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + + uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + REG_OFFSET_TAB_OUTxR[iOutput])); MODIFY_REG(*pReg, (HRTIM_OUTR_POL1 << REG_SHIFT_TAB_OUTxR[iOutput]), (Polarity << REG_SHIFT_TAB_OUTxR[iOutput])); } @@ -5850,8 +5850,8 @@ __STATIC_INLINE void LL_HRTIM_OUT_SetPolarity(HRTIM_TypeDef *HRTIMx, uint32_t Ou */ __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetPolarity(HRTIM_TypeDef *HRTIMx, uint32_t Output) { - register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + + uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + REG_OFFSET_TAB_OUTxR[iOutput])); return (READ_BIT(*pReg, (uint32_t)(HRTIM_OUTR_POL1) << REG_SHIFT_TAB_OUTxR[iOutput]) >> REG_SHIFT_TAB_OUTxR[iOutput]); } @@ -5880,8 +5880,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetPolarity(HRTIM_TypeDef *HRTIMx, uint32_ */ __STATIC_INLINE void LL_HRTIM_OUT_SetIdleMode(HRTIM_TypeDef *HRTIMx, uint32_t Output, uint32_t IdleMode) { - register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + + uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + REG_OFFSET_TAB_OUTxR[iOutput])); MODIFY_REG(*pReg, (HRTIM_OUTR_IDLM1 << (REG_SHIFT_TAB_OUTxR[iOutput])), (IdleMode << (REG_SHIFT_TAB_OUTxR[iOutput]))); } @@ -5908,8 +5908,8 @@ __STATIC_INLINE void LL_HRTIM_OUT_SetIdleMode(HRTIM_TypeDef *HRTIMx, uint32_t Ou */ __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetIdleMode(HRTIM_TypeDef *HRTIMx, uint32_t Output) { - register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + + uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + REG_OFFSET_TAB_OUTxR[iOutput])); return (READ_BIT(*pReg, (uint32_t)(HRTIM_OUTR_IDLM1) << REG_SHIFT_TAB_OUTxR[iOutput]) >> REG_SHIFT_TAB_OUTxR[iOutput]); } @@ -5939,8 +5939,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetIdleMode(HRTIM_TypeDef *HRTIMx, uint32_ */ __STATIC_INLINE void LL_HRTIM_OUT_SetIdleLevel(HRTIM_TypeDef *HRTIMx, uint32_t Output, uint32_t IdleLevel) { - register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + + uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + REG_OFFSET_TAB_OUTxR[iOutput])); MODIFY_REG(*pReg, (HRTIM_OUTR_IDLES1 << REG_SHIFT_TAB_OUTxR[iOutput]), (IdleLevel << REG_SHIFT_TAB_OUTxR[iOutput])); } @@ -5967,8 +5967,8 @@ __STATIC_INLINE void LL_HRTIM_OUT_SetIdleLevel(HRTIM_TypeDef *HRTIMx, uint32_t O */ __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetIdleLevel(HRTIM_TypeDef *HRTIMx, uint32_t Output) { - register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + + uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + REG_OFFSET_TAB_OUTxR[iOutput])); return (READ_BIT(*pReg, (uint32_t)(HRTIM_OUTR_IDLES1) << REG_SHIFT_TAB_OUTxR[iOutput]) >> REG_SHIFT_TAB_OUTxR[iOutput]); } @@ -6000,8 +6000,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetIdleLevel(HRTIM_TypeDef *HRTIMx, uint32 */ __STATIC_INLINE void LL_HRTIM_OUT_SetFaultState(HRTIM_TypeDef *HRTIMx, uint32_t Output, uint32_t FaultState) { - register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + + uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + REG_OFFSET_TAB_OUTxR[iOutput])); MODIFY_REG(*pReg, (HRTIM_OUTR_FAULT1 << REG_SHIFT_TAB_OUTxR[iOutput]), (FaultState << REG_SHIFT_TAB_OUTxR[iOutput])); } @@ -6030,8 +6030,8 @@ __STATIC_INLINE void LL_HRTIM_OUT_SetFaultState(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetFaultState(HRTIM_TypeDef *HRTIMx, uint32_t Output) { - register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + + uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + REG_OFFSET_TAB_OUTxR[iOutput])); return (READ_BIT(*pReg, (uint32_t)(HRTIM_OUTR_FAULT1) << REG_SHIFT_TAB_OUTxR[iOutput]) >> REG_SHIFT_TAB_OUTxR[iOutput]); } @@ -6060,8 +6060,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetFaultState(HRTIM_TypeDef *HRTIMx, uint3 */ __STATIC_INLINE void LL_HRTIM_OUT_SetChopperMode(HRTIM_TypeDef *HRTIMx, uint32_t Output, uint32_t ChopperMode) { - register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + + uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + REG_OFFSET_TAB_OUTxR[iOutput])); MODIFY_REG(*pReg, (HRTIM_OUTR_CHP1 << REG_SHIFT_TAB_OUTxR[iOutput]), (ChopperMode << REG_SHIFT_TAB_OUTxR[iOutput])); } @@ -6088,8 +6088,8 @@ __STATIC_INLINE void LL_HRTIM_OUT_SetChopperMode(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetChopperMode(HRTIM_TypeDef *HRTIMx, uint32_t Output) { - register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + + uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + REG_OFFSET_TAB_OUTxR[iOutput])); return (READ_BIT(*pReg, (uint32_t)(HRTIM_OUTR_CHP1) << REG_SHIFT_TAB_OUTxR[iOutput]) >> REG_SHIFT_TAB_OUTxR[iOutput]); } @@ -6118,8 +6118,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetChopperMode(HRTIM_TypeDef *HRTIMx, uint */ __STATIC_INLINE void LL_HRTIM_OUT_SetBMEntryMode(HRTIM_TypeDef *HRTIMx, uint32_t Output, uint32_t BMEntryMode) { - register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + + uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + REG_OFFSET_TAB_OUTxR[iOutput])); MODIFY_REG(*pReg, (HRTIM_OUTR_DIDL1 << REG_SHIFT_TAB_OUTxR[iOutput]), (BMEntryMode << REG_SHIFT_TAB_OUTxR[iOutput])); } @@ -6146,8 +6146,8 @@ __STATIC_INLINE void LL_HRTIM_OUT_SetBMEntryMode(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetBMEntryMode(HRTIM_TypeDef *HRTIMx, uint32_t Output) { - register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + + uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) + REG_OFFSET_TAB_OUTxR[iOutput])); return (READ_BIT(*pReg, (uint32_t)(HRTIM_OUTR_DIDL1) << REG_SHIFT_TAB_OUTxR[iOutput]) >> REG_SHIFT_TAB_OUTxR[iOutput]); } @@ -6175,8 +6175,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetBMEntryMode(HRTIM_TypeDef *HRTIMx, uint */ __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetDLYPRTOutStatus(HRTIM_TypeDef *HRTIMx, uint32_t Output) { - register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].TIMxISR) + + uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].TIMxISR) + REG_OFFSET_TAB_OUTxR[iOutput])); return ((READ_BIT(*pReg, (uint32_t)(HRTIM_TIMISR_O1STAT) << REG_SHIFT_TAB_OxSTAT[iOutput]) >> REG_SHIFT_TAB_OxSTAT[iOutput]) >> HRTIM_TIMISR_O1STAT_Pos); @@ -6213,8 +6213,8 @@ __STATIC_INLINE void LL_HRTIM_OUT_ForceLevel(HRTIM_TypeDef *HRTIMx, uint32_t Out 0x00U /* 1: LL_HRTIM_OUT_LEVEL_ACTIVE */ }; - register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].SETx1R) + + uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].SETx1R) + REG_OFFSET_TAB_SETxR[iOutput] + REG_OFFSET_TAB_OUT_LEVEL[OutputLevel])); SET_BIT(*pReg, HRTIM_SET1R_SST); } @@ -6241,8 +6241,8 @@ __STATIC_INLINE void LL_HRTIM_OUT_ForceLevel(HRTIM_TypeDef *HRTIMx, uint32_t Out */ __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetLevel(HRTIM_TypeDef *HRTIMx, uint32_t Output) { - register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].TIMxISR) + + uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1)); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].TIMxISR) + REG_OFFSET_TAB_OUTxR[iOutput])); return ((READ_BIT(*pReg, (uint32_t)(HRTIM_TIMISR_O1CPY) << REG_SHIFT_TAB_OxSTAT[iOutput]) >> REG_SHIFT_TAB_OxSTAT[iOutput]) >> HRTIM_TIMISR_O1CPY_Pos); @@ -6322,8 +6322,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetLevel(HRTIM_TypeDef *HRTIMx, uint32_t O */ __STATIC_INLINE void LL_HRTIM_EE_Config(HRTIM_TypeDef *HRTIMx, uint32_t Event, uint32_t Configuration) { - register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) + + uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) + REG_OFFSET_TAB_EECR[iEvent])); MODIFY_REG(*pReg, (HRTIM_EE_CONFIG_MASK << REG_SHIFT_TAB_EExSRC[iEvent]), (Configuration << REG_SHIFT_TAB_EExSRC[iEvent])); @@ -6362,8 +6362,8 @@ __STATIC_INLINE void LL_HRTIM_EE_Config(HRTIM_TypeDef *HRTIMx, uint32_t Event, u */ __STATIC_INLINE void LL_HRTIM_EE_SetSrc(HRTIM_TypeDef *HRTIMx, uint32_t Event, uint32_t Src) { - register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) + + uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) + REG_OFFSET_TAB_EECR[iEvent])); MODIFY_REG(*pReg, (HRTIM_EECR1_EE1SRC << REG_SHIFT_TAB_EExSRC[iEvent]), (Src << REG_SHIFT_TAB_EExSRC[iEvent])); } @@ -6400,8 +6400,8 @@ __STATIC_INLINE void LL_HRTIM_EE_SetSrc(HRTIM_TypeDef *HRTIMx, uint32_t Event, u */ __STATIC_INLINE uint32_t LL_HRTIM_EE_GetSrc(HRTIM_TypeDef *HRTIMx, uint32_t Event) { - register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) + + uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) + REG_OFFSET_TAB_EECR[iEvent])); return (READ_BIT(*pReg, (uint32_t)(HRTIM_EECR1_EE1SRC) << REG_SHIFT_TAB_EExSRC[iEvent]) >> REG_SHIFT_TAB_EExSRC[iEvent]); } @@ -6439,8 +6439,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_EE_GetSrc(HRTIM_TypeDef *HRTIMx, uint32_t Even */ __STATIC_INLINE void LL_HRTIM_EE_SetPolarity(HRTIM_TypeDef *HRTIMx, uint32_t Event, uint32_t Polarity) { - register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) + + uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) + REG_OFFSET_TAB_EECR[iEvent])); MODIFY_REG(*pReg, (HRTIM_EECR1_EE1POL << REG_SHIFT_TAB_EExSRC[iEvent]), (Polarity << REG_SHIFT_TAB_EExSRC[iEvent])); } @@ -6475,8 +6475,8 @@ __STATIC_INLINE void LL_HRTIM_EE_SetPolarity(HRTIM_TypeDef *HRTIMx, uint32_t Eve */ __STATIC_INLINE uint32_t LL_HRTIM_EE_GetPolarity(HRTIM_TypeDef *HRTIMx, uint32_t Event) { - register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) + + uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) + REG_OFFSET_TAB_EECR[iEvent])); return (READ_BIT(*pReg, (uint32_t)(HRTIM_EECR1_EE1POL) << REG_SHIFT_TAB_EExSRC[iEvent]) >> REG_SHIFT_TAB_EExSRC[iEvent]); } @@ -6515,8 +6515,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_EE_GetPolarity(HRTIM_TypeDef *HRTIMx, uint32_t __STATIC_INLINE void LL_HRTIM_EE_SetSensitivity(HRTIM_TypeDef *HRTIMx, uint32_t Event, uint32_t Sensitivity) { - register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) + + uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) + REG_OFFSET_TAB_EECR[iEvent])); MODIFY_REG(*pReg, (HRTIM_EECR1_EE1SNS << REG_SHIFT_TAB_EExSRC[iEvent]), (Sensitivity << REG_SHIFT_TAB_EExSRC[iEvent])); } @@ -6553,8 +6553,8 @@ __STATIC_INLINE void LL_HRTIM_EE_SetSensitivity(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_EE_GetSensitivity(HRTIM_TypeDef *HRTIMx, uint32_t Event) { - register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) + + uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) + REG_OFFSET_TAB_EECR[iEvent])); return (READ_BIT(*pReg, (uint32_t)(HRTIM_EECR1_EE1SNS) << REG_SHIFT_TAB_EExSRC[iEvent]) >> REG_SHIFT_TAB_EExSRC[iEvent]); } @@ -6586,8 +6586,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_EE_GetSensitivity(HRTIM_TypeDef *HRTIMx, uint3 */ __STATIC_INLINE void LL_HRTIM_EE_SetFastMode(HRTIM_TypeDef *HRTIMx, uint32_t Event, uint32_t FastMode) { - register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) + + uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) + REG_OFFSET_TAB_EECR[iEvent])); MODIFY_REG(*pReg, (HRTIM_EECR1_EE1FAST << REG_SHIFT_TAB_EExSRC[iEvent]), (FastMode << REG_SHIFT_TAB_EExSRC[iEvent])); } @@ -6617,8 +6617,8 @@ __STATIC_INLINE void LL_HRTIM_EE_SetFastMode(HRTIM_TypeDef *HRTIMx, uint32_t Eve */ __STATIC_INLINE uint32_t LL_HRTIM_EE_GetFastMode(HRTIM_TypeDef *HRTIMx, uint32_t Event) { - register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) + + uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) + REG_OFFSET_TAB_EECR[iEvent])); return (READ_BIT(*pReg, (uint32_t)(HRTIM_EECR1_EE1FAST) << REG_SHIFT_TAB_EExSRC[iEvent]) >> REG_SHIFT_TAB_EExSRC[iEvent]); } @@ -6658,7 +6658,7 @@ __STATIC_INLINE uint32_t LL_HRTIM_EE_GetFastMode(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE void LL_HRTIM_EE_SetFilter(HRTIM_TypeDef *HRTIMx, uint32_t Event, uint32_t Filter) { - register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); + uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1)); MODIFY_REG(HRTIMx->sCommonRegs.EECR3, (HRTIM_EECR3_EE6F << REG_SHIFT_TAB_EExSRC[iEvent]), (Filter << REG_SHIFT_TAB_EExSRC[iEvent])); } @@ -6697,7 +6697,7 @@ __STATIC_INLINE void LL_HRTIM_EE_SetFilter(HRTIM_TypeDef *HRTIMx, uint32_t Event */ __STATIC_INLINE uint32_t LL_HRTIM_EE_GetFilter(HRTIM_TypeDef *HRTIMx, uint32_t Event) { - register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_6)); + uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_6)); return (READ_BIT(HRTIMx->sCommonRegs.EECR3, (uint32_t)(HRTIM_EECR3_EE6F) << REG_SHIFT_TAB_EExSRC[iEvent]) >> REG_SHIFT_TAB_EExSRC[iEvent]); } @@ -6769,8 +6769,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_EE_GetPrescaler(HRTIM_TypeDef *HRTIMx) */ __STATIC_INLINE void LL_HRTIM_FLT_Config(HRTIM_TypeDef *HRTIMx, uint32_t Fault, uint32_t Configuration) { - register uint32_t iFault = (uint8_t)POSITION_VAL(Fault); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) + + uint32_t iFault = (uint8_t)POSITION_VAL(Fault); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) + REG_OFFSET_TAB_FLTINR[iFault])); MODIFY_REG(*pReg, (HRTIM_FLT_CONFIG_MASK << REG_SHIFT_TAB_FLTxE[iFault]), (Configuration << REG_SHIFT_TAB_FLTxE[iFault])); @@ -6798,8 +6798,8 @@ __STATIC_INLINE void LL_HRTIM_FLT_Config(HRTIM_TypeDef *HRTIMx, uint32_t Fault, */ __STATIC_INLINE void LL_HRTIM_FLT_SetSrc(HRTIM_TypeDef *HRTIMx, uint32_t Fault, uint32_t Src) { - register uint32_t iFault = (uint8_t)POSITION_VAL(Fault); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) + + uint32_t iFault = (uint8_t)POSITION_VAL(Fault); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) + REG_OFFSET_TAB_FLTINR[iFault])); MODIFY_REG(*pReg, (HRTIM_FLTINR1_FLT1SRC << REG_SHIFT_TAB_FLTxE[iFault]), (Src << REG_SHIFT_TAB_FLTxE[iFault])); } @@ -6824,8 +6824,8 @@ __STATIC_INLINE void LL_HRTIM_FLT_SetSrc(HRTIM_TypeDef *HRTIMx, uint32_t Fault, */ __STATIC_INLINE uint32_t LL_HRTIM_FLT_GetSrc(HRTIM_TypeDef *HRTIMx, uint32_t Fault) { - register uint32_t iFault = (uint8_t)POSITION_VAL(Fault); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) + + uint32_t iFault = (uint8_t)POSITION_VAL(Fault); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) + REG_OFFSET_TAB_FLTINR[iFault])); return (READ_BIT(*pReg, (HRTIM_FLTINR1_FLT1SRC << REG_SHIFT_TAB_FLTxE[iFault])) >> REG_SHIFT_TAB_FLTxE[iFault]); } @@ -6852,8 +6852,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_FLT_GetSrc(HRTIM_TypeDef *HRTIMx, uint32_t Fau */ __STATIC_INLINE void LL_HRTIM_FLT_SetPolarity(HRTIM_TypeDef *HRTIMx, uint32_t Fault, uint32_t Polarity) { - register uint32_t iFault = (uint8_t)POSITION_VAL(Fault); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) + + uint32_t iFault = (uint8_t)POSITION_VAL(Fault); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) + REG_OFFSET_TAB_FLTINR[iFault])); MODIFY_REG(*pReg, (HRTIM_FLTINR1_FLT1P << REG_SHIFT_TAB_FLTxE[iFault]), (Polarity << REG_SHIFT_TAB_FLTxE[iFault])); } @@ -6878,8 +6878,8 @@ __STATIC_INLINE void LL_HRTIM_FLT_SetPolarity(HRTIM_TypeDef *HRTIMx, uint32_t Fa */ __STATIC_INLINE uint32_t LL_HRTIM_FLT_GetPolarity(HRTIM_TypeDef *HRTIMx, uint32_t Fault) { - register uint32_t iFault = (uint8_t)POSITION_VAL(Fault); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) + + uint32_t iFault = (uint8_t)POSITION_VAL(Fault); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) + REG_OFFSET_TAB_FLTINR[iFault])); return (READ_BIT(*pReg, (HRTIM_FLTINR1_FLT1P << REG_SHIFT_TAB_FLTxE[iFault])) >> REG_SHIFT_TAB_FLTxE[iFault]); } @@ -6920,8 +6920,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_FLT_GetPolarity(HRTIM_TypeDef *HRTIMx, uint32_ */ __STATIC_INLINE void LL_HRTIM_FLT_SetFilter(HRTIM_TypeDef *HRTIMx, uint32_t Fault, uint32_t Filter) { - register uint32_t iFault = (uint8_t)POSITION_VAL(Fault); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) + + uint32_t iFault = (uint8_t)POSITION_VAL(Fault); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) + REG_OFFSET_TAB_FLTINR[iFault])); MODIFY_REG(*pReg, (HRTIM_FLTINR1_FLT1F << REG_SHIFT_TAB_FLTxE[iFault]), (Filter << REG_SHIFT_TAB_FLTxE[iFault])); } @@ -6960,8 +6960,8 @@ __STATIC_INLINE void LL_HRTIM_FLT_SetFilter(HRTIM_TypeDef *HRTIMx, uint32_t Faul */ __STATIC_INLINE uint32_t LL_HRTIM_FLT_GetFilter(HRTIM_TypeDef *HRTIMx, uint32_t Fault) { - register uint32_t iFault = (uint8_t)POSITION_VAL(Fault); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) + + uint32_t iFault = (uint8_t)POSITION_VAL(Fault); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) + REG_OFFSET_TAB_FLTINR[iFault])); return (READ_BIT(*pReg, (HRTIM_FLTINR1_FLT1F << REG_SHIFT_TAB_FLTxE[iFault])) >> REG_SHIFT_TAB_FLTxE[iFault]); @@ -7016,8 +7016,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_FLT_GetPrescaler(HRTIM_TypeDef *HRTIMx) */ __STATIC_INLINE void LL_HRTIM_FLT_Lock(HRTIM_TypeDef *HRTIMx, uint32_t Fault) { - register uint32_t iFault = (uint8_t)POSITION_VAL(Fault); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) + + uint32_t iFault = (uint8_t)POSITION_VAL(Fault); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) + REG_OFFSET_TAB_FLTINR[iFault])); SET_BIT(*pReg, (HRTIM_FLTINR1_FLT1LCK << REG_SHIFT_TAB_FLTxE[iFault])); } @@ -7040,8 +7040,8 @@ __STATIC_INLINE void LL_HRTIM_FLT_Lock(HRTIM_TypeDef *HRTIMx, uint32_t Fault) */ __STATIC_INLINE void LL_HRTIM_FLT_Enable(HRTIM_TypeDef *HRTIMx, uint32_t Fault) { - register uint32_t iFault = (uint8_t)POSITION_VAL(Fault); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) + + uint32_t iFault = (uint8_t)POSITION_VAL(Fault); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) + REG_OFFSET_TAB_FLTINR[iFault])); SET_BIT(*pReg, (HRTIM_FLTINR1_FLT1E << REG_SHIFT_TAB_FLTxE[iFault])); } @@ -7064,8 +7064,8 @@ __STATIC_INLINE void LL_HRTIM_FLT_Enable(HRTIM_TypeDef *HRTIMx, uint32_t Fault) */ __STATIC_INLINE void LL_HRTIM_FLT_Disable(HRTIM_TypeDef *HRTIMx, uint32_t Fault) { - register uint32_t iFault = (uint8_t)POSITION_VAL(Fault); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) + + uint32_t iFault = (uint8_t)POSITION_VAL(Fault); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) + REG_OFFSET_TAB_FLTINR[iFault])); CLEAR_BIT(*pReg, (HRTIM_FLTINR1_FLT1E << REG_SHIFT_TAB_FLTxE[iFault])); } @@ -7088,8 +7088,8 @@ __STATIC_INLINE void LL_HRTIM_FLT_Disable(HRTIM_TypeDef *HRTIMx, uint32_t Fault) */ __STATIC_INLINE uint32_t LL_HRTIM_FLT_IsEnabled(HRTIM_TypeDef *HRTIMx, uint32_t Fault) { - register uint32_t iFault = (uint8_t)POSITION_VAL(Fault); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) + + uint32_t iFault = (uint8_t)POSITION_VAL(Fault); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) + REG_OFFSET_TAB_FLTINR[iFault])); return (((READ_BIT(*pReg, (HRTIM_FLTINR1_FLT1E << REG_SHIFT_TAB_FLTxE[iFault])) >> REG_SHIFT_TAB_FLTxE[iFault]) == (HRTIM_IER_FLT1)) ? 1UL : 0UL); @@ -7764,8 +7764,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_SYNC(HRTIM_TypeDef *HRTIMx) */ __STATIC_INLINE void LL_HRTIM_ClearFlag_UPDATE(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_MICR_MUPD); } @@ -7786,8 +7786,8 @@ __STATIC_INLINE void LL_HRTIM_ClearFlag_UPDATE(HRTIM_TypeDef *HRTIMx, uint32_t T */ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_UPDATE(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_MISR_MUPD) == (HRTIM_MISR_MUPD)) ? 1UL : 0UL); @@ -7809,8 +7809,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_UPDATE(HRTIM_TypeDef *HRTIMx, uin */ __STATIC_INLINE void LL_HRTIM_ClearFlag_REP(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_MICR_MREP); @@ -7832,8 +7832,8 @@ __STATIC_INLINE void LL_HRTIM_ClearFlag_REP(HRTIM_TypeDef *HRTIMx, uint32_t Time */ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_REP(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_MISR_MREP) == (HRTIM_MISR_MREP)) ? 1UL : 0UL); @@ -7855,8 +7855,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_REP(HRTIM_TypeDef *HRTIMx, uint32 */ __STATIC_INLINE void LL_HRTIM_ClearFlag_CMP1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_MICR_MCMP1); } @@ -7877,8 +7877,8 @@ __STATIC_INLINE void LL_HRTIM_ClearFlag_CMP1(HRTIM_TypeDef *HRTIMx, uint32_t Tim */ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_CMP1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_MISR_MCMP1) == (HRTIM_MISR_MCMP1)) ? 1UL : 0UL); @@ -7900,8 +7900,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_CMP1(HRTIM_TypeDef *HRTIMx, uint3 */ __STATIC_INLINE void LL_HRTIM_ClearFlag_CMP2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_MICR_MCMP2); } @@ -7922,8 +7922,8 @@ __STATIC_INLINE void LL_HRTIM_ClearFlag_CMP2(HRTIM_TypeDef *HRTIMx, uint32_t Tim */ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_CMP2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_MISR_MCMP2) == (HRTIM_MISR_MCMP2)) ? 1UL : 0UL); @@ -7945,8 +7945,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_CMP2(HRTIM_TypeDef *HRTIMx, uint3 */ __STATIC_INLINE void LL_HRTIM_ClearFlag_CMP3(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_MICR_MCMP3); } @@ -7967,8 +7967,8 @@ __STATIC_INLINE void LL_HRTIM_ClearFlag_CMP3(HRTIM_TypeDef *HRTIMx, uint32_t Tim */ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_CMP3(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_MISR_MCMP3) == (HRTIM_MISR_MCMP3)) ? 1UL : 0UL); @@ -7990,8 +7990,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_CMP3(HRTIM_TypeDef *HRTIMx, uint3 */ __STATIC_INLINE void LL_HRTIM_ClearFlag_CMP4(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_MICR_MCMP4); } @@ -8012,8 +8012,8 @@ __STATIC_INLINE void LL_HRTIM_ClearFlag_CMP4(HRTIM_TypeDef *HRTIMx, uint32_t Tim */ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_CMP4(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_MISR_MCMP4) == (HRTIM_MISR_MCMP4)) ? 1UL : 0UL); @@ -8033,8 +8033,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_CMP4(HRTIM_TypeDef *HRTIMx, uint3 */ __STATIC_INLINE void LL_HRTIM_ClearFlag_CPT1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_TIMICR_CPT1C); } @@ -8053,8 +8053,8 @@ __STATIC_INLINE void LL_HRTIM_ClearFlag_CPT1(HRTIM_TypeDef *HRTIMx, uint32_t Tim */ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_CPT1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_TIMISR_CPT1) == (HRTIM_TIMISR_CPT1)) ? 1UL : 0UL); @@ -8074,8 +8074,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_CPT1(HRTIM_TypeDef *HRTIMx, uint3 */ __STATIC_INLINE void LL_HRTIM_ClearFlag_CPT2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_TIMICR_CPT2C); } @@ -8094,8 +8094,8 @@ __STATIC_INLINE void LL_HRTIM_ClearFlag_CPT2(HRTIM_TypeDef *HRTIMx, uint32_t Tim */ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_CPT2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_TIMISR_CPT2) == (HRTIM_TIMISR_CPT2)) ? 1UL : 0UL); @@ -8115,8 +8115,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_CPT2(HRTIM_TypeDef *HRTIMx, uint3 */ __STATIC_INLINE void LL_HRTIM_ClearFlag_SET1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_TIMICR_SET1C); } @@ -8135,8 +8135,8 @@ __STATIC_INLINE void LL_HRTIM_ClearFlag_SET1(HRTIM_TypeDef *HRTIMx, uint32_t Tim */ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_SET1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_TIMISR_SET1) == (HRTIM_TIMISR_SET1)) ? 1UL : 0UL); @@ -8156,8 +8156,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_SET1(HRTIM_TypeDef *HRTIMx, uint3 */ __STATIC_INLINE void LL_HRTIM_ClearFlag_RST1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_TIMICR_RST1C); } @@ -8176,8 +8176,8 @@ __STATIC_INLINE void LL_HRTIM_ClearFlag_RST1(HRTIM_TypeDef *HRTIMx, uint32_t Tim */ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_RST1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_TIMISR_RST1) == (HRTIM_TIMISR_RST1)) ? 1UL : 0UL); @@ -8197,8 +8197,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_RST1(HRTIM_TypeDef *HRTIMx, uint3 */ __STATIC_INLINE void LL_HRTIM_ClearFlag_SET2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_TIMICR_SET2C); } @@ -8217,8 +8217,8 @@ __STATIC_INLINE void LL_HRTIM_ClearFlag_SET2(HRTIM_TypeDef *HRTIMx, uint32_t Tim */ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_SET2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_TIMISR_SET2) == (HRTIM_TIMISR_SET2)) ? 1UL : 0UL); @@ -8238,8 +8238,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_SET2(HRTIM_TypeDef *HRTIMx, uint3 */ __STATIC_INLINE void LL_HRTIM_ClearFlag_RST2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_TIMICR_RST2C); } @@ -8258,8 +8258,8 @@ __STATIC_INLINE void LL_HRTIM_ClearFlag_RST2(HRTIM_TypeDef *HRTIMx, uint32_t Tim */ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_RST2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_TIMISR_RST2) == (HRTIM_TIMISR_RST2)) ? 1UL : 0UL); @@ -8279,8 +8279,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_RST2(HRTIM_TypeDef *HRTIMx, uint3 */ __STATIC_INLINE void LL_HRTIM_ClearFlag_RST(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_TIMICR_RSTC); } @@ -8299,8 +8299,8 @@ __STATIC_INLINE void LL_HRTIM_ClearFlag_RST(HRTIM_TypeDef *HRTIMx, uint32_t Time */ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_RST(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_TIMISR_RST) == (HRTIM_TIMISR_RST)) ? 1UL : 0UL); @@ -8320,8 +8320,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_RST(HRTIM_TypeDef *HRTIMx, uint32 */ __STATIC_INLINE void LL_HRTIM_ClearFlag_DLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_TIMICR_DLYPRTC); } @@ -8340,8 +8340,8 @@ __STATIC_INLINE void LL_HRTIM_ClearFlag_DLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t T */ __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_DLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_TIMISR_DLYPRT) == (HRTIM_TIMISR_DLYPRT)) ? 1UL : 0UL); @@ -8635,8 +8635,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_SYNC(HRTIM_TypeDef *HRTIMx) */ __STATIC_INLINE void LL_HRTIM_EnableIT_UPDATE(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_MDIER_MUPDIE); } @@ -8657,8 +8657,8 @@ __STATIC_INLINE void LL_HRTIM_EnableIT_UPDATE(HRTIM_TypeDef *HRTIMx, uint32_t Ti */ __STATIC_INLINE void LL_HRTIM_DisableIT_UPDATE(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_MDIER_MUPDIE); } @@ -8679,8 +8679,8 @@ __STATIC_INLINE void LL_HRTIM_DisableIT_UPDATE(HRTIM_TypeDef *HRTIMx, uint32_t T */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_UPDATE(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_MDIER_MUPDIE) == (HRTIM_MDIER_MUPDIE)) ? 1UL : 0UL); @@ -8702,8 +8702,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_UPDATE(HRTIM_TypeDef *HRTIMx, uint */ __STATIC_INLINE void LL_HRTIM_EnableIT_REP(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_MDIER_MREPIE); } @@ -8724,8 +8724,8 @@ __STATIC_INLINE void LL_HRTIM_EnableIT_REP(HRTIM_TypeDef *HRTIMx, uint32_t Timer */ __STATIC_INLINE void LL_HRTIM_DisableIT_REP(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_MDIER_MREPIE); } @@ -8746,8 +8746,8 @@ __STATIC_INLINE void LL_HRTIM_DisableIT_REP(HRTIM_TypeDef *HRTIMx, uint32_t Time */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_REP(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_MDIER_MREPIE) == (HRTIM_MDIER_MREPIE)) ? 1UL : 0UL); @@ -8769,8 +8769,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_REP(HRTIM_TypeDef *HRTIMx, uint32_ */ __STATIC_INLINE void LL_HRTIM_EnableIT_CMP1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_MDIER_MCMP1IE); } @@ -8791,8 +8791,8 @@ __STATIC_INLINE void LL_HRTIM_EnableIT_CMP1(HRTIM_TypeDef *HRTIMx, uint32_t Time */ __STATIC_INLINE void LL_HRTIM_DisableIT_CMP1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_MDIER_MCMP1IE); } @@ -8813,8 +8813,8 @@ __STATIC_INLINE void LL_HRTIM_DisableIT_CMP1(HRTIM_TypeDef *HRTIMx, uint32_t Tim */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_CMP1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_MDIER_MCMP1IE) == (HRTIM_MDIER_MCMP1IE)) ? 1UL : 0UL); @@ -8836,8 +8836,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_CMP1(HRTIM_TypeDef *HRTIMx, uint32 */ __STATIC_INLINE void LL_HRTIM_EnableIT_CMP2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_MDIER_MCMP2IE); } @@ -8858,8 +8858,8 @@ __STATIC_INLINE void LL_HRTIM_EnableIT_CMP2(HRTIM_TypeDef *HRTIMx, uint32_t Time */ __STATIC_INLINE void LL_HRTIM_DisableIT_CMP2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_MDIER_MCMP2IE); } @@ -8880,8 +8880,8 @@ __STATIC_INLINE void LL_HRTIM_DisableIT_CMP2(HRTIM_TypeDef *HRTIMx, uint32_t Tim */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_CMP2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_MDIER_MCMP2IE) == (HRTIM_MDIER_MCMP2IE)) ? 1UL : 0UL); @@ -8903,8 +8903,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_CMP2(HRTIM_TypeDef *HRTIMx, uint32 */ __STATIC_INLINE void LL_HRTIM_EnableIT_CMP3(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_MDIER_MCMP3IE); } @@ -8925,8 +8925,8 @@ __STATIC_INLINE void LL_HRTIM_EnableIT_CMP3(HRTIM_TypeDef *HRTIMx, uint32_t Time */ __STATIC_INLINE void LL_HRTIM_DisableIT_CMP3(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_MDIER_MCMP3IE); } @@ -8947,8 +8947,8 @@ __STATIC_INLINE void LL_HRTIM_DisableIT_CMP3(HRTIM_TypeDef *HRTIMx, uint32_t Tim */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_CMP3(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_MDIER_MCMP3IE) == (HRTIM_MDIER_MCMP3IE)) ? 1UL : 0UL); @@ -8970,8 +8970,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_CMP3(HRTIM_TypeDef *HRTIMx, uint32 */ __STATIC_INLINE void LL_HRTIM_EnableIT_CMP4(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_MDIER_MCMP4IE); } @@ -8992,8 +8992,8 @@ __STATIC_INLINE void LL_HRTIM_EnableIT_CMP4(HRTIM_TypeDef *HRTIMx, uint32_t Time */ __STATIC_INLINE void LL_HRTIM_DisableIT_CMP4(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_MDIER_MCMP4IE); } @@ -9014,8 +9014,8 @@ __STATIC_INLINE void LL_HRTIM_DisableIT_CMP4(HRTIM_TypeDef *HRTIMx, uint32_t Tim */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_CMP4(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_MDIER_MCMP4IE) == (HRTIM_MDIER_MCMP4IE)) ? 1UL : 0UL); @@ -9035,8 +9035,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_CMP4(HRTIM_TypeDef *HRTIMx, uint32 */ __STATIC_INLINE void LL_HRTIM_EnableIT_CPT1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_TIMDIER_CPT1IE); } @@ -9055,8 +9055,8 @@ __STATIC_INLINE void LL_HRTIM_EnableIT_CPT1(HRTIM_TypeDef *HRTIMx, uint32_t Time */ __STATIC_INLINE void LL_HRTIM_DisableIT_CPT1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_TIMDIER_CPT1IE); } @@ -9075,8 +9075,8 @@ __STATIC_INLINE void LL_HRTIM_DisableIT_CPT1(HRTIM_TypeDef *HRTIMx, uint32_t Tim */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_CPT1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_TIMDIER_CPT1IE) == (HRTIM_TIMDIER_CPT1IE)) ? 1UL : 0UL); @@ -9096,8 +9096,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_CPT1(HRTIM_TypeDef *HRTIMx, uint32 */ __STATIC_INLINE void LL_HRTIM_EnableIT_CPT2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_TIMDIER_CPT2IE); } @@ -9116,8 +9116,8 @@ __STATIC_INLINE void LL_HRTIM_EnableIT_CPT2(HRTIM_TypeDef *HRTIMx, uint32_t Time */ __STATIC_INLINE void LL_HRTIM_DisableIT_CPT2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_TIMDIER_CPT2IE); } @@ -9136,8 +9136,8 @@ __STATIC_INLINE void LL_HRTIM_DisableIT_CPT2(HRTIM_TypeDef *HRTIMx, uint32_t Tim */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_CPT2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_TIMDIER_CPT2IE) == (HRTIM_TIMDIER_CPT2IE)) ? 1UL : 0UL); @@ -9157,8 +9157,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_CPT2(HRTIM_TypeDef *HRTIMx, uint32 */ __STATIC_INLINE void LL_HRTIM_EnableIT_SET1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_TIMDIER_SET1IE); } @@ -9177,8 +9177,8 @@ __STATIC_INLINE void LL_HRTIM_EnableIT_SET1(HRTIM_TypeDef *HRTIMx, uint32_t Time */ __STATIC_INLINE void LL_HRTIM_DisableIT_SET1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_TIMDIER_SET1IE); } @@ -9197,8 +9197,8 @@ __STATIC_INLINE void LL_HRTIM_DisableIT_SET1(HRTIM_TypeDef *HRTIMx, uint32_t Tim */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_SET1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_TIMDIER_SET1IE) == (HRTIM_TIMDIER_SET1IE)) ? 1UL : 0UL); @@ -9218,8 +9218,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_SET1(HRTIM_TypeDef *HRTIMx, uint32 */ __STATIC_INLINE void LL_HRTIM_EnableIT_RST1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_TIMDIER_RST1IE); } @@ -9238,8 +9238,8 @@ __STATIC_INLINE void LL_HRTIM_EnableIT_RST1(HRTIM_TypeDef *HRTIMx, uint32_t Time */ __STATIC_INLINE void LL_HRTIM_DisableIT_RST1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_TIMDIER_RST1IE); } @@ -9258,8 +9258,8 @@ __STATIC_INLINE void LL_HRTIM_DisableIT_RST1(HRTIM_TypeDef *HRTIMx, uint32_t Tim */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_RST1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_TIMDIER_RST1IE) == (HRTIM_TIMDIER_RST1IE)) ? 1UL : 0UL); @@ -9279,8 +9279,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_RST1(HRTIM_TypeDef *HRTIMx, uint32 */ __STATIC_INLINE void LL_HRTIM_EnableIT_SET2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_TIMDIER_SET2IE); } @@ -9299,8 +9299,8 @@ __STATIC_INLINE void LL_HRTIM_EnableIT_SET2(HRTIM_TypeDef *HRTIMx, uint32_t Time */ __STATIC_INLINE void LL_HRTIM_DisableIT_SET2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_TIMDIER_SET2IE); } @@ -9319,8 +9319,8 @@ __STATIC_INLINE void LL_HRTIM_DisableIT_SET2(HRTIM_TypeDef *HRTIMx, uint32_t Tim */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_SET2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_TIMDIER_SET2IE) == (HRTIM_TIMDIER_SET2IE)) ? 1UL : 0UL); @@ -9340,8 +9340,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_SET2(HRTIM_TypeDef *HRTIMx, uint32 */ __STATIC_INLINE void LL_HRTIM_EnableIT_RST2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_TIMDIER_RST2IE); } @@ -9360,8 +9360,8 @@ __STATIC_INLINE void LL_HRTIM_EnableIT_RST2(HRTIM_TypeDef *HRTIMx, uint32_t Time */ __STATIC_INLINE void LL_HRTIM_DisableIT_RST2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_TIMDIER_RST2IE); } @@ -9380,8 +9380,8 @@ __STATIC_INLINE void LL_HRTIM_DisableIT_RST2(HRTIM_TypeDef *HRTIMx, uint32_t Tim */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_RST2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_TIMDIER_RST2IE) == (HRTIM_TIMDIER_RST2IE)) ? 1UL : 0UL); @@ -9401,8 +9401,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_RST2(HRTIM_TypeDef *HRTIMx, uint32 */ __STATIC_INLINE void LL_HRTIM_EnableIT_RST(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_TIMDIER_RSTIE); } @@ -9421,8 +9421,8 @@ __STATIC_INLINE void LL_HRTIM_EnableIT_RST(HRTIM_TypeDef *HRTIMx, uint32_t Timer */ __STATIC_INLINE void LL_HRTIM_DisableIT_RST(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_TIMDIER_RSTIE); } @@ -9441,8 +9441,8 @@ __STATIC_INLINE void LL_HRTIM_DisableIT_RST(HRTIM_TypeDef *HRTIMx, uint32_t Time */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_RST(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_TIMDIER_RSTIE) == (HRTIM_TIMDIER_RSTIE)) ? 1UL : 0UL); @@ -9462,8 +9462,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_RST(HRTIM_TypeDef *HRTIMx, uint32_ */ __STATIC_INLINE void LL_HRTIM_EnableIT_DLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_TIMDIER_DLYPRTIE); } @@ -9482,8 +9482,8 @@ __STATIC_INLINE void LL_HRTIM_EnableIT_DLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t Ti */ __STATIC_INLINE void LL_HRTIM_DisableIT_DLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_TIMDIER_DLYPRTIE); } @@ -9502,8 +9502,8 @@ __STATIC_INLINE void LL_HRTIM_DisableIT_DLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t T */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_DLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_TIMDIER_DLYPRTIE) == (HRTIM_TIMDIER_DLYPRTIE)) ? 1UL : 0UL); @@ -9566,8 +9566,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_SYNC(HRTIM_TypeDef *HRTIMx) */ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_UPDATE(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_MDIER_MUPDDE); } @@ -9588,8 +9588,8 @@ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_UPDATE(HRTIM_TypeDef *HRTIMx, uint32_ */ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_UPDATE(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_MDIER_MUPDDE); } @@ -9610,8 +9610,8 @@ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_UPDATE(HRTIM_TypeDef *HRTIMx, uint32 */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_UPDATE(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_MDIER_MUPDDE) == (HRTIM_MDIER_MUPDDE)) ? 1UL : 0UL); @@ -9633,8 +9633,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_UPDATE(HRTIM_TypeDef *HRTIMx, */ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_REP(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_MDIER_MREPDE); } @@ -9655,8 +9655,8 @@ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_REP(HRTIM_TypeDef *HRTIMx, uint32_t T */ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_REP(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_MDIER_MREPDE); } @@ -9677,8 +9677,8 @@ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_REP(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_REP(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_MDIER_MREPDE) == (HRTIM_MDIER_MREPDE)) ? 1UL : 0UL); @@ -9700,8 +9700,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_REP(HRTIM_TypeDef *HRTIMx, uin */ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_CMP1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_MDIER_MCMP1DE); } @@ -9722,8 +9722,8 @@ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_CMP1(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_CMP1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_MDIER_MCMP1DE); } @@ -9744,8 +9744,8 @@ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_CMP1(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_CMP1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_MDIER_MCMP1DE) == (HRTIM_MDIER_MCMP1DE)) ? 1UL : 0UL); @@ -9767,8 +9767,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_CMP1(HRTIM_TypeDef *HRTIMx, ui */ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_CMP2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_MDIER_MCMP2DE); } @@ -9789,8 +9789,8 @@ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_CMP2(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_CMP2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_MDIER_MCMP2DE); } @@ -9811,8 +9811,8 @@ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_CMP2(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_CMP2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_MDIER_MCMP2DE) == (HRTIM_MDIER_MCMP2DE)) ? 1UL : 0UL); @@ -9834,8 +9834,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_CMP2(HRTIM_TypeDef *HRTIMx, ui */ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_CMP3(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_MDIER_MCMP3DE); } @@ -9856,8 +9856,8 @@ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_CMP3(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_CMP3(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_MDIER_MCMP3DE); } @@ -9878,8 +9878,8 @@ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_CMP3(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_CMP3(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_MDIER_MCMP3DE) == (HRTIM_MDIER_MCMP3DE)) ? 1UL : 0UL); @@ -9901,8 +9901,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_CMP3(HRTIM_TypeDef *HRTIMx, ui */ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_CMP4(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_MDIER_MCMP4DE); } @@ -9923,8 +9923,8 @@ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_CMP4(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_CMP4(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_MDIER_MCMP4DE); } @@ -9945,8 +9945,8 @@ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_CMP4(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_CMP4(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_MDIER_MCMP4DE) == (HRTIM_MDIER_MCMP4DE)) ? 1UL : 0UL); @@ -9966,8 +9966,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_CMP4(HRTIM_TypeDef *HRTIMx, ui */ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_CPT1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_TIMDIER_CPT1DE); } @@ -9986,8 +9986,8 @@ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_CPT1(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_CPT1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_TIMDIER_CPT1DE); } @@ -10006,8 +10006,8 @@ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_CPT1(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_CPT1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_TIMDIER_CPT1DE) == (HRTIM_TIMDIER_CPT1DE)) ? 1UL : 0UL); @@ -10027,8 +10027,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_CPT1(HRTIM_TypeDef *HRTIMx, ui */ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_CPT2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_TIMDIER_CPT2DE); } @@ -10047,8 +10047,8 @@ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_CPT2(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_CPT2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_TIMDIER_CPT2DE); } @@ -10067,8 +10067,8 @@ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_CPT2(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_CPT2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_TIMDIER_CPT2DE) == (HRTIM_TIMDIER_CPT2DE)) ? 1UL : 0UL); @@ -10088,8 +10088,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_CPT2(HRTIM_TypeDef *HRTIMx, ui */ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_SET1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_TIMDIER_SET1DE); } @@ -10108,8 +10108,8 @@ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_SET1(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_SET1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_TIMDIER_SET1DE); } @@ -10128,8 +10128,8 @@ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_SET1(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_SET1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_TIMDIER_SET1DE) == (HRTIM_TIMDIER_SET1DE)) ? 1UL : 0UL); @@ -10149,8 +10149,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_SET1(HRTIM_TypeDef *HRTIMx, ui */ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_RST1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_TIMDIER_RST1DE); } @@ -10169,8 +10169,8 @@ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_RST1(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_RST1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_TIMDIER_RST1DE); } @@ -10189,8 +10189,8 @@ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_RST1(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_RST1(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_TIMDIER_RST1DE) == (HRTIM_TIMDIER_RST1DE)) ? 1UL : 0UL); @@ -10210,8 +10210,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_RST1(HRTIM_TypeDef *HRTIMx, ui */ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_SET2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_TIMDIER_SET2DE); } @@ -10230,8 +10230,8 @@ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_SET2(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_SET2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_TIMDIER_SET2DE); } @@ -10250,8 +10250,8 @@ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_SET2(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_SET2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_TIMDIER_SET2DE) == (HRTIM_TIMDIER_SET2DE)) ? 1UL : 0UL); @@ -10271,8 +10271,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_SET2(HRTIM_TypeDef *HRTIMx, ui */ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_RST2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_TIMDIER_RST2DE); } @@ -10291,8 +10291,8 @@ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_RST2(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_RST2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_TIMDIER_RST2DE); } @@ -10311,8 +10311,8 @@ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_RST2(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_RST2(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_TIMDIER_RST2DE) == (HRTIM_TIMDIER_RST2DE)) ? 1UL : 0UL); @@ -10332,8 +10332,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_RST2(HRTIM_TypeDef *HRTIMx, ui */ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_RST(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_TIMDIER_RSTDE); } @@ -10352,8 +10352,8 @@ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_RST(HRTIM_TypeDef *HRTIMx, uint32_t T */ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_RST(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_TIMDIER_RSTDE); } @@ -10372,8 +10372,8 @@ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_RST(HRTIM_TypeDef *HRTIMx, uint32_t */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_RST(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_TIMDIER_RSTDE) == (HRTIM_TIMDIER_RSTDE)) ? 1UL : 0UL); @@ -10393,8 +10393,8 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_RST(HRTIM_TypeDef *HRTIMx, uin */ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_DLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); SET_BIT(*pReg, HRTIM_TIMDIER_DLYPRTDE); } @@ -10413,8 +10413,8 @@ __STATIC_INLINE void LL_HRTIM_EnableDMAReq_DLYPRT(HRTIM_TypeDef *HRTIMx, uint32_ */ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_DLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); CLEAR_BIT(*pReg, HRTIM_TIMDIER_DLYPRTDE); } @@ -10433,8 +10433,8 @@ __STATIC_INLINE void LL_HRTIM_DisableDMAReq_DLYPRT(HRTIM_TypeDef *HRTIMx, uint32 */ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_DLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t Timer) { - register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + + uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) + REG_OFFSET_TAB_TIMER[iTimer])); return ((READ_BIT(*pReg, HRTIM_TIMDIER_DLYPRTDE) == (HRTIM_TIMDIER_DLYPRTDE)) ? 1UL : 0UL); diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_hsem.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_hsem.h index b1d8758..1e5953c 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_hsem.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_hsem.h @@ -589,6 +589,7 @@ __STATIC_INLINE uint32_t LL_HSEM_IsEnabledIT_C2IER(HSEM_TypeDef *HSEMx, uint32_t return ((READ_BIT(HSEMx->C2IER, SemaphoreMask) == (SemaphoreMask)) ? 1UL : 0UL); } #endif /* DUAL_CORE */ + /** * @} */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_i2c.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_i2c.h index 5acff4c..d91b7c2 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_i2c.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_i2c.h @@ -32,7 +32,7 @@ extern "C" { * @{ */ -#if defined (I2C1) || defined (I2C2) || defined (I2C3) || defined (I2C4) +#if defined (I2C1) || defined (I2C2) || defined (I2C3) || defined (I2C4) || defined (I2C5) /** @defgroup I2C_LL I2C * @{ @@ -67,38 +67,38 @@ extern "C" { typedef struct { uint32_t PeripheralMode; /*!< Specifies the peripheral mode. - This parameter can be a value of @ref I2C_LL_EC_PERIPHERAL_MODE + This parameter can be a value of @ref I2C_LL_EC_PERIPHERAL_MODE. This feature can be modified afterwards using unitary function @ref LL_I2C_SetMode(). */ uint32_t Timing; /*!< Specifies the SDA setup, hold time and the SCL high, low period values. This parameter must be set by referring to the STM32CubeMX Tool and - the helper macro @ref __LL_I2C_CONVERT_TIMINGS() + the helper macro @ref __LL_I2C_CONVERT_TIMINGS(). This feature can be modified afterwards using unitary function @ref LL_I2C_SetTiming(). */ uint32_t AnalogFilter; /*!< Enables or disables analog noise filter. - This parameter can be a value of @ref I2C_LL_EC_ANALOGFILTER_SELECTION + This parameter can be a value of @ref I2C_LL_EC_ANALOGFILTER_SELECTION. This feature can be modified afterwards using unitary functions @ref LL_I2C_EnableAnalogFilter() or LL_I2C_DisableAnalogFilter(). */ uint32_t DigitalFilter; /*!< Configures the digital noise filter. - This parameter can be a number between Min_Data = 0x00 and Max_Data = 0x0F + This parameter can be a number between Min_Data = 0x00 and Max_Data = 0x0F. This feature can be modified afterwards using unitary function @ref LL_I2C_SetDigitalFilter(). */ uint32_t OwnAddress1; /*!< Specifies the device own address 1. - This parameter must be a value between Min_Data = 0x00 and Max_Data = 0x3FF + This parameter must be a value between Min_Data = 0x00 and Max_Data = 0x3FF. This feature can be modified afterwards using unitary function @ref LL_I2C_SetOwnAddress1(). */ uint32_t TypeAcknowledge; /*!< Specifies the ACKnowledge or Non ACKnowledge condition after the address receive match code or next received byte. - This parameter can be a value of @ref I2C_LL_EC_I2C_ACKNOWLEDGE + This parameter can be a value of @ref I2C_LL_EC_I2C_ACKNOWLEDGE. This feature can be modified afterwards using unitary function @ref LL_I2C_AcknowledgeNextData(). */ uint32_t OwnAddrSize; /*!< Specifies the device own address 1 size (7-bit or 10-bit). - This parameter can be a value of @ref I2C_LL_EC_OWNADDRESS1 + This parameter can be a value of @ref I2C_LL_EC_OWNADDRESS1. This feature can be modified afterwards using unitary function @ref LL_I2C_SetOwnAddress1(). */ } LL_I2C_InitTypeDef; @@ -578,7 +578,7 @@ __STATIC_INLINE uint32_t LL_I2C_IsEnabledDMAReq_RX(I2C_TypeDef *I2Cx) */ __STATIC_INLINE uint32_t LL_I2C_DMA_GetRegAddr(I2C_TypeDef *I2Cx, uint32_t Direction) { - register uint32_t data_reg_addr; + uint32_t data_reg_addr; if (Direction == LL_I2C_DMA_REG_DATA_TRANSMIT) { @@ -664,7 +664,7 @@ __STATIC_INLINE uint32_t LL_I2C_IsEnabledSlaveByteControl(I2C_TypeDef *I2Cx) /** * @brief Enable Wakeup from STOP. - * @note Macro @ref IS_I2C_WAKEUP_FROMSTOP_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_I2C_WAKEUP_FROMSTOP_INSTANCE(I2Cx) can be used to check whether or not * WakeUpFromStop feature is supported by the I2Cx Instance. * @note This bit can only be programmed when Digital Filter is disabled. * @rmtoll CR1 WUPEN LL_I2C_EnableWakeUpFromStop @@ -678,7 +678,7 @@ __STATIC_INLINE void LL_I2C_EnableWakeUpFromStop(I2C_TypeDef *I2Cx) /** * @brief Disable Wakeup from STOP. - * @note Macro @ref IS_I2C_WAKEUP_FROMSTOP_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_I2C_WAKEUP_FROMSTOP_INSTANCE(I2Cx) can be used to check whether or not * WakeUpFromStop feature is supported by the I2Cx Instance. * @rmtoll CR1 WUPEN LL_I2C_DisableWakeUpFromStop * @param I2Cx I2C Instance. @@ -691,7 +691,7 @@ __STATIC_INLINE void LL_I2C_DisableWakeUpFromStop(I2C_TypeDef *I2Cx) /** * @brief Check if Wakeup from STOP is enabled or disabled. - * @note Macro @ref IS_I2C_WAKEUP_FROMSTOP_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_I2C_WAKEUP_FROMSTOP_INSTANCE(I2Cx) can be used to check whether or not * WakeUpFromStop feature is supported by the I2Cx Instance. * @rmtoll CR1 WUPEN LL_I2C_IsEnabledWakeUpFromStop * @param I2Cx I2C Instance. @@ -941,7 +941,7 @@ __STATIC_INLINE uint32_t LL_I2C_GetDataSetupTime(I2C_TypeDef *I2Cx) /** * @brief Configure peripheral mode. - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @rmtoll CR1 SMBHEN LL_I2C_SetMode\n * CR1 SMBDEN LL_I2C_SetMode @@ -960,7 +960,7 @@ __STATIC_INLINE void LL_I2C_SetMode(I2C_TypeDef *I2Cx, uint32_t PeripheralMode) /** * @brief Get peripheral mode. - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @rmtoll CR1 SMBHEN LL_I2C_GetMode\n * CR1 SMBDEN LL_I2C_GetMode @@ -978,7 +978,7 @@ __STATIC_INLINE uint32_t LL_I2C_GetMode(I2C_TypeDef *I2Cx) /** * @brief Enable SMBus alert (Host or Device mode) - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @note SMBus Device mode: * - SMBus Alert pin is drived low and @@ -996,7 +996,7 @@ __STATIC_INLINE void LL_I2C_EnableSMBusAlert(I2C_TypeDef *I2Cx) /** * @brief Disable SMBus alert (Host or Device mode) - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @note SMBus Device mode: * - SMBus Alert pin is not drived (can be used as a standard GPIO) and @@ -1014,7 +1014,7 @@ __STATIC_INLINE void LL_I2C_DisableSMBusAlert(I2C_TypeDef *I2Cx) /** * @brief Check if SMBus alert (Host or Device mode) is enabled or disabled. - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @rmtoll CR1 ALERTEN LL_I2C_IsEnabledSMBusAlert * @param I2Cx I2C Instance. @@ -1027,7 +1027,7 @@ __STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusAlert(I2C_TypeDef *I2Cx) /** * @brief Enable SMBus Packet Error Calculation (PEC). - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @rmtoll CR1 PECEN LL_I2C_EnableSMBusPEC * @param I2Cx I2C Instance. @@ -1040,7 +1040,7 @@ __STATIC_INLINE void LL_I2C_EnableSMBusPEC(I2C_TypeDef *I2Cx) /** * @brief Disable SMBus Packet Error Calculation (PEC). - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @rmtoll CR1 PECEN LL_I2C_DisableSMBusPEC * @param I2Cx I2C Instance. @@ -1053,7 +1053,7 @@ __STATIC_INLINE void LL_I2C_DisableSMBusPEC(I2C_TypeDef *I2Cx) /** * @brief Check if SMBus Packet Error Calculation (PEC) is enabled or disabled. - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @rmtoll CR1 PECEN LL_I2C_IsEnabledSMBusPEC * @param I2Cx I2C Instance. @@ -1066,7 +1066,7 @@ __STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusPEC(I2C_TypeDef *I2Cx) /** * @brief Configure the SMBus Clock Timeout. - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @note This configuration can only be programmed when associated Timeout is disabled (TimeoutA and/orTimeoutB). * @rmtoll TIMEOUTR TIMEOUTA LL_I2C_ConfigSMBusTimeout\n @@ -1089,7 +1089,7 @@ __STATIC_INLINE void LL_I2C_ConfigSMBusTimeout(I2C_TypeDef *I2Cx, uint32_t Timeo /** * @brief Configure the SMBus Clock TimeoutA (SCL low timeout or SCL and SDA high timeout depends on TimeoutA mode). - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @note These bits can only be programmed when TimeoutA is disabled. * @rmtoll TIMEOUTR TIMEOUTA LL_I2C_SetSMBusTimeoutA @@ -1104,7 +1104,7 @@ __STATIC_INLINE void LL_I2C_SetSMBusTimeoutA(I2C_TypeDef *I2Cx, uint32_t Timeout /** * @brief Get the SMBus Clock TimeoutA setting. - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @rmtoll TIMEOUTR TIMEOUTA LL_I2C_GetSMBusTimeoutA * @param I2Cx I2C Instance. @@ -1117,7 +1117,7 @@ __STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutA(I2C_TypeDef *I2Cx) /** * @brief Set the SMBus Clock TimeoutA mode. - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @note This bit can only be programmed when TimeoutA is disabled. * @rmtoll TIMEOUTR TIDLE LL_I2C_SetSMBusTimeoutAMode @@ -1134,7 +1134,7 @@ __STATIC_INLINE void LL_I2C_SetSMBusTimeoutAMode(I2C_TypeDef *I2Cx, uint32_t Tim /** * @brief Get the SMBus Clock TimeoutA mode. - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @rmtoll TIMEOUTR TIDLE LL_I2C_GetSMBusTimeoutAMode * @param I2Cx I2C Instance. @@ -1149,7 +1149,7 @@ __STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutAMode(I2C_TypeDef *I2Cx) /** * @brief Configure the SMBus Extended Cumulative Clock TimeoutB (Master or Slave mode). - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @note These bits can only be programmed when TimeoutB is disabled. * @rmtoll TIMEOUTR TIMEOUTB LL_I2C_SetSMBusTimeoutB @@ -1164,7 +1164,7 @@ __STATIC_INLINE void LL_I2C_SetSMBusTimeoutB(I2C_TypeDef *I2Cx, uint32_t Timeout /** * @brief Get the SMBus Extented Cumulative Clock TimeoutB setting. - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @rmtoll TIMEOUTR TIMEOUTB LL_I2C_GetSMBusTimeoutB * @param I2Cx I2C Instance. @@ -1177,7 +1177,7 @@ __STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutB(I2C_TypeDef *I2Cx) /** * @brief Enable the SMBus Clock Timeout. - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @rmtoll TIMEOUTR TIMOUTEN LL_I2C_EnableSMBusTimeout\n * TIMEOUTR TEXTEN LL_I2C_EnableSMBusTimeout @@ -1195,7 +1195,7 @@ __STATIC_INLINE void LL_I2C_EnableSMBusTimeout(I2C_TypeDef *I2Cx, uint32_t Clock /** * @brief Disable the SMBus Clock Timeout. - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @rmtoll TIMEOUTR TIMOUTEN LL_I2C_DisableSMBusTimeout\n * TIMEOUTR TEXTEN LL_I2C_DisableSMBusTimeout @@ -1213,7 +1213,7 @@ __STATIC_INLINE void LL_I2C_DisableSMBusTimeout(I2C_TypeDef *I2Cx, uint32_t Cloc /** * @brief Check if the SMBus Clock Timeout is enabled or disabled. - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @rmtoll TIMEOUTR TIMOUTEN LL_I2C_IsEnabledSMBusTimeout\n * TIMEOUTR TEXTEN LL_I2C_IsEnabledSMBusTimeout @@ -1443,7 +1443,7 @@ __STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_TC(I2C_TypeDef *I2Cx) /** * @brief Enable Error interrupts. - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @note Any of these errors will generate interrupt : * Arbitration Loss (ARLO) @@ -1463,7 +1463,7 @@ __STATIC_INLINE void LL_I2C_EnableIT_ERR(I2C_TypeDef *I2Cx) /** * @brief Disable Error interrupts. - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @note Any of these errors will generate interrupt : * Arbitration Loss (ARLO) @@ -1645,7 +1645,7 @@ __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_OVR(I2C_TypeDef *I2Cx) /** * @brief Indicate the status of SMBus PEC error flag in reception. - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @note RESET: Clear default value. * SET: When the received PEC does not match with the PEC register content. @@ -1660,7 +1660,7 @@ __STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_PECERR(I2C_TypeDef *I2Cx) /** * @brief Indicate the status of SMBus Timeout detection flag. - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @note RESET: Clear default value. * SET: When a timeout or extended clock timeout occurs. @@ -1675,7 +1675,7 @@ __STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_TIMEOUT(I2C_TypeDef *I2Cx) /** * @brief Indicate the status of SMBus alert flag. - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @note RESET: Clear default value. * SET: When SMBus host configuration, SMBus alert enabled and @@ -1782,7 +1782,7 @@ __STATIC_INLINE void LL_I2C_ClearFlag_OVR(I2C_TypeDef *I2Cx) /** * @brief Clear SMBus PEC error flag. - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @rmtoll ICR PECCF LL_I2C_ClearSMBusFlag_PECERR * @param I2Cx I2C Instance. @@ -1795,7 +1795,7 @@ __STATIC_INLINE void LL_I2C_ClearSMBusFlag_PECERR(I2C_TypeDef *I2Cx) /** * @brief Clear SMBus Timeout detection flag. - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @rmtoll ICR TIMOUTCF LL_I2C_ClearSMBusFlag_TIMEOUT * @param I2Cx I2C Instance. @@ -1808,7 +1808,7 @@ __STATIC_INLINE void LL_I2C_ClearSMBusFlag_TIMEOUT(I2C_TypeDef *I2Cx) /** * @brief Clear SMBus Alert flag. - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @rmtoll ICR ALERTCF LL_I2C_ClearSMBusFlag_ALERT * @param I2Cx I2C Instance. @@ -2123,7 +2123,7 @@ __STATIC_INLINE uint32_t LL_I2C_GetAddressMatchCode(I2C_TypeDef *I2Cx) /** * @brief Enable internal comparison of the SMBus Packet Error byte (transmission or reception mode). - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @note This feature is cleared by hardware when the PEC byte is transferred, or when a STOP condition or an Address Matched is received. * This bit has no effect when RELOAD bit is set. @@ -2139,7 +2139,7 @@ __STATIC_INLINE void LL_I2C_EnableSMBusPECCompare(I2C_TypeDef *I2Cx) /** * @brief Check if the SMBus Packet Error byte internal comparison is requested or not. - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @rmtoll CR2 PECBYTE LL_I2C_IsEnabledSMBusPECCompare * @param I2Cx I2C Instance. @@ -2152,7 +2152,7 @@ __STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusPECCompare(I2C_TypeDef *I2Cx) /** * @brief Get the SMBus Packet Error byte calculated. - * @note Macro @ref IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * @note Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not * SMBus feature is supported by the I2Cx Instance. * @rmtoll PECR PEC LL_I2C_GetSMBusPEC * @param I2Cx I2C Instance. @@ -2213,7 +2213,7 @@ void LL_I2C_StructInit(LL_I2C_InitTypeDef *I2C_InitStruct); * @} */ -#endif /* I2C1 || I2C2 || I2C3 || I2C4 */ +#endif /* I2C1 || I2C2 || I2C3 || I2C4 || I2C5 */ /** * @} diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_lpuart.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_lpuart.h index a7ce8bc..1471bdd 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_lpuart.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_lpuart.h @@ -1372,9 +1372,9 @@ __STATIC_INLINE void LL_LPUART_SetBaudRate(USART_TypeDef *LPUARTx, uint32_t Peri */ __STATIC_INLINE uint32_t LL_LPUART_GetBaudRate(USART_TypeDef *LPUARTx, uint32_t PeriphClk, uint32_t PrescalerValue) { - register uint32_t lpuartdiv; - register uint32_t brrresult; - register uint32_t periphclkpresc = (uint32_t)(PeriphClk / (LPUART_PRESCALER_TAB[(uint16_t)PrescalerValue])); + uint32_t lpuartdiv; + uint32_t brrresult; + uint32_t periphclkpresc = (uint32_t)(PeriphClk / (LPUART_PRESCALER_TAB[(uint16_t)PrescalerValue])); lpuartdiv = LPUARTx->BRR & LPUART_BRR_MASK; @@ -2482,7 +2482,7 @@ __STATIC_INLINE uint32_t LL_LPUART_IsEnabledDMADeactOnRxErr(USART_TypeDef *LPUAR */ __STATIC_INLINE uint32_t LL_LPUART_DMA_GetRegAddr(USART_TypeDef *LPUARTx, uint32_t Direction) { - register uint32_t data_reg_addr; + uint32_t data_reg_addr; if (Direction == LL_LPUART_DMA_REG_DATA_TRANSMIT) { diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_mdma.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_mdma.h index cf645c6..18609ad 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_mdma.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_mdma.h @@ -691,7 +691,7 @@ typedef struct */ __STATIC_INLINE void LL_MDMA_EnableChannel(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; SET_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR, MDMA_CCR_EN); } @@ -721,7 +721,7 @@ __STATIC_INLINE void LL_MDMA_EnableChannel(MDMA_TypeDef *MDMAx, uint32_t Channel */ __STATIC_INLINE void LL_MDMA_DisableChannel(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; CLEAR_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR, MDMA_CCR_EN); } @@ -751,7 +751,7 @@ __STATIC_INLINE void LL_MDMA_DisableChannel(MDMA_TypeDef *MDMAx, uint32_t Channe */ __STATIC_INLINE uint32_t LL_MDMA_IsEnabledChannel(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return ((READ_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR, MDMA_CCR_EN) == (MDMA_CCR_EN)) ? 1UL : 0UL); } @@ -781,7 +781,7 @@ __STATIC_INLINE uint32_t LL_MDMA_IsEnabledChannel(MDMA_TypeDef *MDMAx, uint32_t */ __STATIC_INLINE void LL_MDMA_GenerateSWRequest(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; SET_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR, MDMA_CCR_SWRQ); } @@ -817,7 +817,7 @@ __STATIC_INLINE void LL_MDMA_GenerateSWRequest(MDMA_TypeDef *MDMAx, uint32_t Cha */ __STATIC_INLINE void LL_MDMA_ConfigXferEndianness(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t Configuration) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR, MDMA_CCR_WEX | MDMA_CCR_HEX | MDMA_CCR_BEX, Configuration); @@ -851,7 +851,7 @@ __STATIC_INLINE void LL_MDMA_ConfigXferEndianness(MDMA_TypeDef *MDMAx, uint32_t */ __STATIC_INLINE void LL_MDMA_SetWordEndianness(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t Endianness) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR, MDMA_CCR_WEX, Endianness); } @@ -884,7 +884,7 @@ __STATIC_INLINE void LL_MDMA_SetWordEndianness(MDMA_TypeDef *MDMAx, uint32_t Cha */ __STATIC_INLINE uint32_t LL_MDMA_GetWordEndianness(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR, MDMA_CCR_WEX)); } @@ -917,7 +917,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetWordEndianness(MDMA_TypeDef *MDMAx, uint32_t */ __STATIC_INLINE void LL_MDMA_SetHalfWordEndianness(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t Endianness) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR, MDMA_CCR_HEX, Endianness); } @@ -950,7 +950,7 @@ __STATIC_INLINE void LL_MDMA_SetHalfWordEndianness(MDMA_TypeDef *MDMAx, uint32_t */ __STATIC_INLINE uint32_t LL_MDMA_GetHalfWordEndianness(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR, MDMA_CCR_HEX)); } @@ -983,7 +983,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetHalfWordEndianness(MDMA_TypeDef *MDMAx, uint */ __STATIC_INLINE void LL_MDMA_SetByteEndianness(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t Endianness) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR, MDMA_CCR_BEX, Endianness); } @@ -1016,7 +1016,7 @@ __STATIC_INLINE void LL_MDMA_SetByteEndianness(MDMA_TypeDef *MDMAx, uint32_t Cha */ __STATIC_INLINE uint32_t LL_MDMA_GetByteEndianness(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR, MDMA_CCR_BEX)); } @@ -1051,7 +1051,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetByteEndianness(MDMA_TypeDef *MDMAx, uint32_t */ __STATIC_INLINE void LL_MDMA_SetChannelPriorityLevel(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t Priority) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR, MDMA_CCR_PL, Priority); } @@ -1086,7 +1086,7 @@ __STATIC_INLINE void LL_MDMA_SetChannelPriorityLevel(MDMA_TypeDef *MDMAx, uint32 */ __STATIC_INLINE uint32_t LL_MDMA_GetChannelPriorityLevel(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR, MDMA_CCR_PL)); } @@ -1146,7 +1146,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetChannelPriorityLevel(MDMA_TypeDef *MDMAx, ui */ __STATIC_INLINE void LL_MDMA_ConfigTransfer(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t Configuration, uint32_t BufferXferLength) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; WRITE_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, Configuration | ((BufferXferLength << MDMA_CTCR_TLEN_Pos) & MDMA_CTCR_TLEN_Msk)); @@ -1177,7 +1177,7 @@ __STATIC_INLINE void LL_MDMA_ConfigTransfer(MDMA_TypeDef *MDMAx, uint32_t Channe */ __STATIC_INLINE void LL_MDMA_EnableBufferableWrMode(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; SET_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_BWM); } @@ -1207,7 +1207,7 @@ __STATIC_INLINE void LL_MDMA_EnableBufferableWrMode(MDMA_TypeDef *MDMAx, uint32_ */ __STATIC_INLINE void LL_MDMA_DisableBufferableWrMode(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; CLEAR_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_BWM); } @@ -1237,7 +1237,7 @@ __STATIC_INLINE void LL_MDMA_DisableBufferableWrMode(MDMA_TypeDef *MDMAx, uint32 */ __STATIC_INLINE uint32_t LL_MDMA_IsEnabledBufferableWrMode(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return ((READ_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_BWM) == (MDMA_CTCR_BWM)) ? 1UL : 0UL); } @@ -1270,7 +1270,7 @@ __STATIC_INLINE uint32_t LL_MDMA_IsEnabledBufferableWrMode(MDMA_TypeDef *MDMAx, */ __STATIC_INLINE void LL_MDMA_SetRequestMode(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t RequestMode) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_SWRM, RequestMode); } @@ -1303,7 +1303,7 @@ __STATIC_INLINE void LL_MDMA_SetRequestMode(MDMA_TypeDef *MDMAx, uint32_t Channe */ __STATIC_INLINE uint32_t LL_MDMA_GetRequestMode(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_SWRM)); } @@ -1338,7 +1338,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetRequestMode(MDMA_TypeDef *MDMAx, uint32_t Ch */ __STATIC_INLINE void LL_MDMA_SetTriggerMode(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t TriggerMode) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_TRGM, TriggerMode); } @@ -1373,7 +1373,7 @@ __STATIC_INLINE void LL_MDMA_SetTriggerMode(MDMA_TypeDef *MDMAx, uint32_t Channe */ __STATIC_INLINE uint32_t LL_MDMA_GetTriggerMode(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_TRGM)); } @@ -1407,7 +1407,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetTriggerMode(MDMA_TypeDef *MDMAx, uint32_t Ch */ __STATIC_INLINE void LL_MDMA_SetPaddingAlignment(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t PaddingAlignment) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_PAM, PaddingAlignment); } @@ -1441,7 +1441,7 @@ __STATIC_INLINE void LL_MDMA_SetPaddingAlignment(MDMA_TypeDef *MDMAx, uint32_t C */ __STATIC_INLINE uint32_t LL_MDMA_GetPaddingAlignment(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_PAM)); } @@ -1472,7 +1472,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetPaddingAlignment(MDMA_TypeDef *MDMAx, uint32 */ __STATIC_INLINE void LL_MDMA_EnablePacking(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; SET_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_PKE); } @@ -1502,7 +1502,7 @@ __STATIC_INLINE void LL_MDMA_EnablePacking(MDMA_TypeDef *MDMAx, uint32_t Channel */ __STATIC_INLINE void LL_MDMA_DisablePacking(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; CLEAR_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_PKE); } @@ -1532,7 +1532,7 @@ __STATIC_INLINE void LL_MDMA_DisablePacking(MDMA_TypeDef *MDMAx, uint32_t Channe */ __STATIC_INLINE uint32_t LL_MDMA_IsEnabledPacking(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return ((READ_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_PKE) == (MDMA_CTCR_PKE)) ? 1UL : 0UL); } @@ -1563,7 +1563,7 @@ __STATIC_INLINE uint32_t LL_MDMA_IsEnabledPacking(MDMA_TypeDef *MDMAx, uint32_t */ __STATIC_INLINE void LL_MDMA_SetBufferTransferLength(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t Length) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_TLEN, (Length << MDMA_CTCR_TLEN_Pos) & MDMA_CTCR_TLEN_Msk); @@ -1595,7 +1595,7 @@ __STATIC_INLINE void LL_MDMA_SetBufferTransferLength(MDMA_TypeDef *MDMAx, uint32 */ __STATIC_INLINE uint32_t LL_MDMA_GetBufferTransferLength(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return(READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_TLEN) >> MDMA_CTCR_TLEN_Pos); } @@ -1634,7 +1634,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetBufferTransferLength(MDMA_TypeDef *MDMAx, ui */ __STATIC_INLINE void LL_MDMA_SetDestinationBurstSize(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t Dburst) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_DBURST, Dburst); } @@ -1673,7 +1673,7 @@ __STATIC_INLINE void LL_MDMA_SetDestinationBurstSize(MDMA_TypeDef *MDMAx, uint32 */ __STATIC_INLINE uint32_t LL_MDMA_GetDestinationBurstSize(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return(READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_DBURST)); } @@ -1712,7 +1712,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetDestinationBurstSize(MDMA_TypeDef *MDMAx, ui */ __STATIC_INLINE void LL_MDMA_SetSourceBurstSize(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t Sburst) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_SBURST, Sburst); } @@ -1751,7 +1751,7 @@ __STATIC_INLINE void LL_MDMA_SetSourceBurstSize(MDMA_TypeDef *MDMAx, uint32_t Ch */ __STATIC_INLINE uint32_t LL_MDMA_GetSourceBurstSize(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return(READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_SBURST)); } @@ -1786,7 +1786,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetSourceBurstSize(MDMA_TypeDef *MDMAx, uint32_ */ __STATIC_INLINE void LL_MDMA_SetDestinationIncSize(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t IncSize) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_DINCOS, IncSize); } @@ -1821,7 +1821,7 @@ __STATIC_INLINE void LL_MDMA_SetDestinationIncSize(MDMA_TypeDef *MDMAx, uint32_t */ __STATIC_INLINE uint32_t LL_MDMA_GetDestinationIncSize(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_DINCOS)); } @@ -1856,7 +1856,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetDestinationIncSize(MDMA_TypeDef *MDMAx, uint */ __STATIC_INLINE void LL_MDMA_SetSourceIncSize(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t IncSize) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_SINCOS, IncSize); } @@ -1891,7 +1891,7 @@ __STATIC_INLINE void LL_MDMA_SetSourceIncSize(MDMA_TypeDef *MDMAx, uint32_t Chan */ __STATIC_INLINE uint32_t LL_MDMA_GetSourceIncSize(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_SINCOS)); } @@ -1926,7 +1926,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetSourceIncSize(MDMA_TypeDef *MDMAx, uint32_t */ __STATIC_INLINE void LL_MDMA_SetDestinationDataSize(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t DestDataSize) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_DSIZE, DestDataSize); } @@ -1961,7 +1961,7 @@ __STATIC_INLINE void LL_MDMA_SetDestinationDataSize(MDMA_TypeDef *MDMAx, uint32_ */ __STATIC_INLINE uint32_t LL_MDMA_GetDestinationDataSize(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_DSIZE)); } @@ -1996,7 +1996,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetDestinationDataSize(MDMA_TypeDef *MDMAx, uin */ __STATIC_INLINE void LL_MDMA_SetSourceDataSize(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t SrcDataSize) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_SSIZE, SrcDataSize); } @@ -2031,7 +2031,7 @@ __STATIC_INLINE void LL_MDMA_SetSourceDataSize(MDMA_TypeDef *MDMAx, uint32_t Cha */ __STATIC_INLINE uint32_t LL_MDMA_GetSourceDataSize(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_SSIZE)); } @@ -2065,7 +2065,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetSourceDataSize(MDMA_TypeDef *MDMAx, uint32_t */ __STATIC_INLINE void LL_MDMA_SetDestinationIncMode(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t DestIncMode) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_DINC, DestIncMode); } @@ -2099,7 +2099,7 @@ __STATIC_INLINE void LL_MDMA_SetDestinationIncMode(MDMA_TypeDef *MDMAx, uint32_t */ __STATIC_INLINE uint32_t LL_MDMA_GetDestinationIncMode(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_DINC)); } @@ -2133,7 +2133,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetDestinationIncMode(MDMA_TypeDef *MDMAx, uint */ __STATIC_INLINE void LL_MDMA_SetSourceIncMode(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t SrcIncMode) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_SINC, SrcIncMode); } @@ -2167,7 +2167,7 @@ __STATIC_INLINE void LL_MDMA_SetSourceIncMode(MDMA_TypeDef *MDMAx, uint32_t Chan */ __STATIC_INLINE uint32_t LL_MDMA_GetSourceIncMode(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTCR, MDMA_CTCR_SINC)); } @@ -2200,7 +2200,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetSourceIncMode(MDMA_TypeDef *MDMAx, uint32_t */ __STATIC_INLINE void LL_MDMA_ConfigBlkCounters(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t BlockRepeatCount, uint32_t BlkDataLength) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CBNDTR, MDMA_CBNDTR_BRC | MDMA_CBNDTR_BNDT, @@ -2233,7 +2233,7 @@ __STATIC_INLINE void LL_MDMA_ConfigBlkCounters(MDMA_TypeDef *MDMAx, uint32_t Cha */ __STATIC_INLINE void LL_MDMA_SetBlkDataLength(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t BlkDataLength) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CBNDTR, MDMA_CBNDTR_BNDT, (BlkDataLength & MDMA_CBNDTR_BNDT_Msk)); } @@ -2264,7 +2264,7 @@ __STATIC_INLINE void LL_MDMA_SetBlkDataLength(MDMA_TypeDef *MDMAx, uint32_t Chan */ __STATIC_INLINE uint32_t LL_MDMA_GetBlkDataLength(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CBNDTR, MDMA_CBNDTR_BNDT)); } @@ -2295,7 +2295,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetBlkDataLength(MDMA_TypeDef *MDMAx, uint32_t */ __STATIC_INLINE void LL_MDMA_SetBlkRepeatCount(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t BlockRepeatCount) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CBNDTR, MDMA_CBNDTR_BRC, (BlockRepeatCount << MDMA_CBNDTR_BRC_Pos) & MDMA_CBNDTR_BRC_Msk); @@ -2327,7 +2327,7 @@ __STATIC_INLINE void LL_MDMA_SetBlkRepeatCount(MDMA_TypeDef *MDMAx, uint32_t Cha */ __STATIC_INLINE uint32_t LL_MDMA_GetBlkRepeatCount(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CBNDTR, MDMA_CBNDTR_BRC) >> MDMA_CBNDTR_BRC_Pos); } @@ -2361,7 +2361,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetBlkRepeatCount(MDMA_TypeDef *MDMAx, uint32_t */ __STATIC_INLINE void LL_MDMA_ConfigBlkRepeatAddrUpdate(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t Configuration) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CBNDTR, MDMA_CBNDTR_BRDUM | MDMA_CBNDTR_BRSUM, @@ -2396,7 +2396,7 @@ __STATIC_INLINE void LL_MDMA_ConfigBlkRepeatAddrUpdate(MDMA_TypeDef *MDMAx, uint */ __STATIC_INLINE void LL_MDMA_SetBlkRepeatDestAddrUpdate(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t DestAdrUpdateMode) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CBNDTR, MDMA_CBNDTR_BRDUM, DestAdrUpdateMode); } @@ -2429,7 +2429,7 @@ __STATIC_INLINE void LL_MDMA_SetBlkRepeatDestAddrUpdate(MDMA_TypeDef *MDMAx, uin */ __STATIC_INLINE uint32_t LL_MDMA_GetBlkRepeatDestAddrUpdate(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CBNDTR, MDMA_CBNDTR_BRDUM)); } @@ -2462,7 +2462,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetBlkRepeatDestAddrUpdate(MDMA_TypeDef *MDMAx, */ __STATIC_INLINE void LL_MDMA_SetBlkRepeatSrcAddrUpdate(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t SrcAdrUpdateMode) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CBNDTR, MDMA_CBNDTR_BRSUM, SrcAdrUpdateMode); } @@ -2495,7 +2495,7 @@ __STATIC_INLINE void LL_MDMA_SetBlkRepeatSrcAddrUpdate(MDMA_TypeDef *MDMAx, uint */ __STATIC_INLINE uint32_t LL_MDMA_GetBlkRepeatSrcAddrUpdate(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CBNDTR, MDMA_CBNDTR_BRSUM)); } @@ -2529,7 +2529,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetBlkRepeatSrcAddrUpdate(MDMA_TypeDef *MDMAx, */ __STATIC_INLINE void LL_MDMA_ConfigAddresses(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t SrcAddress, uint32_t DstAddress) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; WRITE_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CSAR, SrcAddress); WRITE_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CDAR, DstAddress); @@ -2560,7 +2560,7 @@ __STATIC_INLINE void LL_MDMA_ConfigAddresses(MDMA_TypeDef *MDMAx, uint32_t Chann */ __STATIC_INLINE void LL_MDMA_SetSourceAddress(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t SrcAddress) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; WRITE_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CSAR, SrcAddress); } @@ -2591,7 +2591,7 @@ __STATIC_INLINE void LL_MDMA_SetSourceAddress(MDMA_TypeDef *MDMAx, uint32_t Chan */ __STATIC_INLINE uint32_t LL_MDMA_GetSourceAddress(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CSAR)); } @@ -2622,7 +2622,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetSourceAddress(MDMA_TypeDef *MDMAx, uint32_t */ __STATIC_INLINE void LL_MDMA_SetDestinationAddress(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t DestAddress) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; WRITE_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CDAR, DestAddress); } @@ -2653,7 +2653,7 @@ __STATIC_INLINE void LL_MDMA_SetDestinationAddress(MDMA_TypeDef *MDMAx, uint32_t */ __STATIC_INLINE uint32_t LL_MDMA_GetDestinationAddress(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CDAR)); } @@ -2687,7 +2687,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetDestinationAddress(MDMA_TypeDef *MDMAx, uint */ __STATIC_INLINE void LL_MDMA_ConfigBlkRptAddrUpdateValue(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t SrctAdrUpdateValue, uint32_t DestAdrUpdateValue) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; WRITE_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CBRUR, (SrctAdrUpdateValue & MDMA_CBRUR_SUV_Msk) | ((DestAdrUpdateValue << MDMA_CBRUR_DUV_Pos) & MDMA_CBRUR_DUV_Msk)); @@ -2719,7 +2719,7 @@ __STATIC_INLINE void LL_MDMA_ConfigBlkRptAddrUpdateValue(MDMA_TypeDef *MDMAx, ui */ __STATIC_INLINE void LL_MDMA_SetBlkRptDestAddrUpdateValue(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t DestAdrUpdateValue) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CBRUR, MDMA_CBRUR_DUV, ((DestAdrUpdateValue << MDMA_CBRUR_DUV_Pos) & MDMA_CBRUR_DUV_Msk)); @@ -2751,7 +2751,7 @@ __STATIC_INLINE void LL_MDMA_SetBlkRptDestAddrUpdateValue(MDMA_TypeDef *MDMAx, u */ __STATIC_INLINE uint32_t LL_MDMA_GetBlkRptDestAddrUpdateValue(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CBRUR, MDMA_CBRUR_DUV) >> MDMA_CBRUR_DUV_Pos); } @@ -2782,7 +2782,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetBlkRptDestAddrUpdateValue(MDMA_TypeDef *MDMA */ __STATIC_INLINE void LL_MDMA_SetBlkRptSrcAddrUpdateValue(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t SrcAdrUpdateValue) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CBRUR, MDMA_CBRUR_SUV, SrcAdrUpdateValue); } @@ -2813,7 +2813,7 @@ __STATIC_INLINE void LL_MDMA_SetBlkRptSrcAddrUpdateValue(MDMA_TypeDef *MDMAx, ui */ __STATIC_INLINE uint32_t LL_MDMA_GetBlkRptSrcAddrUpdateValue(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CBRUR, MDMA_CBRUR_SUV)); } @@ -2844,7 +2844,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetBlkRptSrcAddrUpdateValue(MDMA_TypeDef *MDMAx */ __STATIC_INLINE void LL_MDMA_SetLinkAddress(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t LinkAddress) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; WRITE_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CLAR, LinkAddress); } @@ -2875,7 +2875,7 @@ __STATIC_INLINE void LL_MDMA_SetLinkAddress(MDMA_TypeDef *MDMAx, uint32_t Channe */ __STATIC_INLINE uint32_t LL_MDMA_GetLinkAddress(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CLAR)); } @@ -2909,7 +2909,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetLinkAddress(MDMA_TypeDef *MDMAx, uint32_t Ch */ __STATIC_INLINE void LL_MDMA_ConfigBusSelection(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t Configuration) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTBR, MDMA_CTBR_DBUS | MDMA_CTBR_SBUS, @@ -2944,7 +2944,7 @@ __STATIC_INLINE void LL_MDMA_ConfigBusSelection(MDMA_TypeDef *MDMAx, uint32_t Ch */ __STATIC_INLINE void LL_MDMA_SetDestBusSelection(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t DestBus) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTBR, MDMA_CTBR_DBUS, DestBus); } @@ -2977,7 +2977,7 @@ __STATIC_INLINE void LL_MDMA_SetDestBusSelection(MDMA_TypeDef *MDMAx, uint32_t C */ __STATIC_INLINE uint32_t LL_MDMA_GetDestBusSelection(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTBR, MDMA_CTBR_DBUS)); } @@ -3010,7 +3010,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetDestBusSelection(MDMA_TypeDef *MDMAx, uint32 */ __STATIC_INLINE void LL_MDMA_SetSrcBusSelection(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t SrcBus) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTBR, MDMA_CTBR_SBUS, SrcBus); } @@ -3043,7 +3043,7 @@ __STATIC_INLINE void LL_MDMA_SetSrcBusSelection(MDMA_TypeDef *MDMAx, uint32_t Ch */ __STATIC_INLINE uint32_t LL_MDMA_GetSrcBusSelection(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTBR, MDMA_CTBR_SBUS)); } @@ -3111,7 +3111,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetSrcBusSelection(MDMA_TypeDef *MDMAx, uint32_ */ __STATIC_INLINE void LL_MDMA_SetHWTrigger(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t HWRequest) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; MODIFY_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTBR, MDMA_CTBR_TSEL, HWRequest); } @@ -3179,7 +3179,7 @@ __STATIC_INLINE void LL_MDMA_SetHWTrigger(MDMA_TypeDef *MDMAx, uint32_t Channel, */ __STATIC_INLINE uint32_t LL_MDMA_GetHWTrigger(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CTBR, MDMA_CTBR_TSEL)); } @@ -3210,7 +3210,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetHWTrigger(MDMA_TypeDef *MDMAx, uint32_t Chan */ __STATIC_INLINE void LL_MDMA_SetMaskAddress(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t MaskAddress) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; WRITE_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CMAR, MaskAddress); } @@ -3241,7 +3241,7 @@ __STATIC_INLINE void LL_MDMA_SetMaskAddress(MDMA_TypeDef *MDMAx, uint32_t Channe */ __STATIC_INLINE uint32_t LL_MDMA_GetMaskAddress(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CMAR)); } @@ -3272,7 +3272,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetMaskAddress(MDMA_TypeDef *MDMAx, uint32_t Ch */ __STATIC_INLINE void LL_MDMA_SetMaskData(MDMA_TypeDef *MDMAx, uint32_t Channel, uint32_t MaskData) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; WRITE_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CMDR, MaskData); } @@ -3303,7 +3303,7 @@ __STATIC_INLINE void LL_MDMA_SetMaskData(MDMA_TypeDef *MDMAx, uint32_t Channel, */ __STATIC_INLINE uint32_t LL_MDMA_GetMaskData(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_REG(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CMDR)); } @@ -3336,7 +3336,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetMaskData(MDMA_TypeDef *MDMAx, uint32_t Chann */ __STATIC_INLINE uint32_t LL_MDMA_GetXferErrorDirection(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CESR, MDMA_CESR_TED)); } @@ -3367,7 +3367,7 @@ __STATIC_INLINE uint32_t LL_MDMA_GetXferErrorDirection(MDMA_TypeDef *MDMAx, uint */ __STATIC_INLINE uint32_t LL_MDMA_GetXferErrorLSBAddress(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return (READ_BIT(((MDMA_Channel_TypeDef *)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CESR, MDMA_CESR_TEA)); } @@ -3433,7 +3433,7 @@ __STATIC_INLINE uint32_t LL_MDMA_IsActiveFlag_GI(MDMA_TypeDef *MDMAx, uint32_t C */ __STATIC_INLINE uint32_t LL_MDMA_IsActiveFlag_TE(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return ((READ_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CISR, MDMA_CISR_TEIF) == (MDMA_CISR_TEIF)) ? 1UL : 0UL); } @@ -3463,7 +3463,7 @@ __STATIC_INLINE uint32_t LL_MDMA_IsActiveFlag_TE(MDMA_TypeDef *MDMAx, uint32_t C */ __STATIC_INLINE uint32_t LL_MDMA_IsActiveFlag_CTC(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return ((READ_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CISR, MDMA_CISR_CTCIF) == (MDMA_CISR_CTCIF)) ? 1UL : 0UL); } @@ -3493,7 +3493,7 @@ __STATIC_INLINE uint32_t LL_MDMA_IsActiveFlag_CTC(MDMA_TypeDef *MDMAx, uint32_t */ __STATIC_INLINE uint32_t LL_MDMA_IsActiveFlag_BRT(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return ((READ_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CISR, MDMA_CISR_BRTIF) == (MDMA_CISR_BRTIF)) ? 1UL : 0UL); } @@ -3523,7 +3523,7 @@ __STATIC_INLINE uint32_t LL_MDMA_IsActiveFlag_BRT(MDMA_TypeDef *MDMAx, uint32_t */ __STATIC_INLINE uint32_t LL_MDMA_IsActiveFlag_BT(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return ((READ_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CISR, MDMA_CISR_BTIF) == (MDMA_CISR_BTIF)) ? 1UL : 0UL); } @@ -3553,7 +3553,7 @@ __STATIC_INLINE uint32_t LL_MDMA_IsActiveFlag_BT(MDMA_TypeDef *MDMAx, uint32_t C */ __STATIC_INLINE uint32_t LL_MDMA_IsActiveFlag_TC(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return ((READ_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CISR, MDMA_CISR_TCIF) == (MDMA_CISR_TCIF)) ? 1UL : 0UL); } @@ -3583,7 +3583,7 @@ __STATIC_INLINE uint32_t LL_MDMA_IsActiveFlag_TC(MDMA_TypeDef *MDMAx, uint32_t C */ __STATIC_INLINE uint32_t LL_MDMA_IsActiveFlag_CRQA(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return ((READ_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CISR, MDMA_CISR_CRQA) == (MDMA_CISR_CRQA)) ? 1UL : 0UL); } @@ -3613,7 +3613,7 @@ __STATIC_INLINE uint32_t LL_MDMA_IsActiveFlag_CRQA(MDMA_TypeDef *MDMAx, uint32_t */ __STATIC_INLINE uint32_t LL_MDMA_IsActiveFlag_BSE(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return ((READ_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CESR, MDMA_CESR_BSE) == (MDMA_CESR_BSE)) ? 1UL : 0UL); } @@ -3643,7 +3643,7 @@ __STATIC_INLINE uint32_t LL_MDMA_IsActiveFlag_BSE(MDMA_TypeDef *MDMAx, uint32_t */ __STATIC_INLINE uint32_t LL_MDMA_IsActiveFlag_ASE(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return ((READ_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CESR, MDMA_CESR_ASE) == (MDMA_CESR_ASE)) ? 1UL : 0UL); } @@ -3673,7 +3673,7 @@ __STATIC_INLINE uint32_t LL_MDMA_IsActiveFlag_ASE(MDMA_TypeDef *MDMAx, uint32_t */ __STATIC_INLINE uint32_t LL_MDMA_IsActiveFlag_TEMD(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return ((READ_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CESR, MDMA_CESR_TEMD) == (MDMA_CESR_TEMD)) ? 1UL : 0UL); } @@ -3703,7 +3703,7 @@ __STATIC_INLINE uint32_t LL_MDMA_IsActiveFlag_TEMD(MDMA_TypeDef *MDMAx, uint32_t */ __STATIC_INLINE uint32_t LL_MDMA_IsActiveFlag_TELD(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return ((READ_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CESR, MDMA_CESR_TELD) == (MDMA_CESR_TELD)) ? 1UL : 0UL); } @@ -3733,7 +3733,7 @@ __STATIC_INLINE uint32_t LL_MDMA_IsActiveFlag_TELD(MDMA_TypeDef *MDMAx, uint32_t */ __STATIC_INLINE void LL_MDMA_ClearFlag_TE(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; WRITE_REG(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CIFCR ,MDMA_CIFCR_CTEIF); } @@ -3763,7 +3763,7 @@ __STATIC_INLINE void LL_MDMA_ClearFlag_TE(MDMA_TypeDef *MDMAx, uint32_t Channel) */ __STATIC_INLINE void LL_MDMA_ClearFlag_CTC(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; WRITE_REG(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CIFCR ,MDMA_CIFCR_CCTCIF); } @@ -3793,7 +3793,7 @@ __STATIC_INLINE void LL_MDMA_ClearFlag_CTC(MDMA_TypeDef *MDMAx, uint32_t Channel */ __STATIC_INLINE void LL_MDMA_ClearFlag_BRT(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; WRITE_REG(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CIFCR ,MDMA_CIFCR_CBRTIF); } @@ -3823,7 +3823,7 @@ __STATIC_INLINE void LL_MDMA_ClearFlag_BRT(MDMA_TypeDef *MDMAx, uint32_t Channel */ __STATIC_INLINE void LL_MDMA_ClearFlag_BT(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; WRITE_REG(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CIFCR ,MDMA_CIFCR_CBTIF); } @@ -3853,7 +3853,7 @@ __STATIC_INLINE void LL_MDMA_ClearFlag_BT(MDMA_TypeDef *MDMAx, uint32_t Channel) */ __STATIC_INLINE void LL_MDMA_ClearFlag_TC(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; WRITE_REG(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CIFCR ,MDMA_CIFCR_CLTCIF); } @@ -3891,7 +3891,7 @@ __STATIC_INLINE void LL_MDMA_ClearFlag_TC(MDMA_TypeDef *MDMAx, uint32_t Channel) */ __STATIC_INLINE void LL_MDMA_EnableIT_TE(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; SET_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR ,MDMA_CCR_TEIE); } @@ -3921,7 +3921,7 @@ __STATIC_INLINE void LL_MDMA_EnableIT_TE(MDMA_TypeDef *MDMAx, uint32_t Channel) */ __STATIC_INLINE void LL_MDMA_EnableIT_CTC(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; SET_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR ,MDMA_CCR_CTCIE); } @@ -3951,7 +3951,7 @@ __STATIC_INLINE void LL_MDMA_EnableIT_CTC(MDMA_TypeDef *MDMAx, uint32_t Channel) */ __STATIC_INLINE void LL_MDMA_EnableIT_BRT(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; SET_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR ,MDMA_CCR_BRTIE); } @@ -3981,7 +3981,7 @@ __STATIC_INLINE void LL_MDMA_EnableIT_BRT(MDMA_TypeDef *MDMAx, uint32_t Channel) */ __STATIC_INLINE void LL_MDMA_EnableIT_BT(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; SET_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR ,MDMA_CCR_BTIE); } @@ -4011,7 +4011,7 @@ __STATIC_INLINE void LL_MDMA_EnableIT_BT(MDMA_TypeDef *MDMAx, uint32_t Channel) */ __STATIC_INLINE void LL_MDMA_EnableIT_TC(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; SET_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR ,MDMA_CCR_TCIE); } @@ -4041,7 +4041,7 @@ __STATIC_INLINE void LL_MDMA_EnableIT_TC(MDMA_TypeDef *MDMAx, uint32_t Channel) */ __STATIC_INLINE void LL_MDMA_DisableIT_TE(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; CLEAR_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR ,MDMA_CCR_TEIE); } @@ -4071,7 +4071,7 @@ __STATIC_INLINE void LL_MDMA_DisableIT_TE(MDMA_TypeDef *MDMAx, uint32_t Channel) */ __STATIC_INLINE void LL_MDMA_DisableIT_CTC(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; CLEAR_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR ,MDMA_CCR_CTCIE); } @@ -4101,7 +4101,7 @@ __STATIC_INLINE void LL_MDMA_DisableIT_CTC(MDMA_TypeDef *MDMAx, uint32_t Channel */ __STATIC_INLINE void LL_MDMA_DisableIT_BRT(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; CLEAR_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR ,MDMA_CCR_BRTIE); } @@ -4131,7 +4131,7 @@ __STATIC_INLINE void LL_MDMA_DisableIT_BRT(MDMA_TypeDef *MDMAx, uint32_t Channel */ __STATIC_INLINE void LL_MDMA_DisableIT_BT(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; CLEAR_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR ,MDMA_CCR_BTIE); } @@ -4161,7 +4161,7 @@ __STATIC_INLINE void LL_MDMA_DisableIT_BT(MDMA_TypeDef *MDMAx, uint32_t Channel) */ __STATIC_INLINE void LL_MDMA_DisableIT_TC(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; CLEAR_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR ,MDMA_CCR_TCIE); } @@ -4191,7 +4191,7 @@ __STATIC_INLINE void LL_MDMA_DisableIT_TC(MDMA_TypeDef *MDMAx, uint32_t Channel) */ __STATIC_INLINE uint32_t LL_MDMA_IsEnabledIT_TE(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return ((READ_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR ,MDMA_CCR_TEIE) == MDMA_CCR_TEIE) ? 1UL : 0UL); } @@ -4221,7 +4221,7 @@ __STATIC_INLINE uint32_t LL_MDMA_IsEnabledIT_TE(MDMA_TypeDef *MDMAx, uint32_t Ch */ __STATIC_INLINE uint32_t LL_MDMA_IsEnabledIT_CTC(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return ((READ_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR ,MDMA_CCR_CTCIE) == MDMA_CCR_CTCIE) ? 1UL : 0UL); } @@ -4251,7 +4251,7 @@ __STATIC_INLINE uint32_t LL_MDMA_IsEnabledIT_CTC(MDMA_TypeDef *MDMAx, uint32_t C */ __STATIC_INLINE uint32_t LL_MDMA_IsEnabledIT_BRT(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return ((READ_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR ,MDMA_CCR_BRTIE) == MDMA_CCR_BRTIE) ? 1UL : 0UL); } @@ -4281,7 +4281,7 @@ __STATIC_INLINE uint32_t LL_MDMA_IsEnabledIT_BRT(MDMA_TypeDef *MDMAx, uint32_t C */ __STATIC_INLINE uint32_t LL_MDMA_IsEnabledIT_BT(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return ((READ_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR ,MDMA_CCR_BTIE) == MDMA_CCR_BTIE) ? 1UL : 0UL); } @@ -4311,7 +4311,7 @@ __STATIC_INLINE uint32_t LL_MDMA_IsEnabledIT_BT(MDMA_TypeDef *MDMAx, uint32_t Ch */ __STATIC_INLINE uint32_t LL_MDMA_IsEnabledIT_TC(MDMA_TypeDef *MDMAx, uint32_t Channel) { - register uint32_t mdma_base_addr = (uint32_t)MDMAx; + uint32_t mdma_base_addr = (uint32_t)MDMAx; return ((READ_BIT(((MDMA_Channel_TypeDef*)(mdma_base_addr + LL_MDMA_CH_OFFSET_TAB[Channel]))->CCR ,MDMA_CCR_TCIE) == MDMA_CCR_TCIE) ? 1UL : 0UL); } diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_opamp.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_opamp.h index f415522..9808ab1 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_opamp.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_opamp.h @@ -501,7 +501,7 @@ __STATIC_INLINE void LL_OPAMP_SetPowerMode(OPAMP_TypeDef *OPAMPx, uint32_t Power */ __STATIC_INLINE uint32_t LL_OPAMP_GetPowerMode(OPAMP_TypeDef *OPAMPx) { - register uint32_t power_mode = (READ_BIT(OPAMPx->CSR, OPAMP_CSR_OPAHSM)); + uint32_t power_mode = (READ_BIT(OPAMPx->CSR, OPAMP_CSR_OPAHSM)); return (uint32_t)(power_mode | (power_mode >> (OPAMP_CSR_OPAHSM_Pos))); } @@ -575,7 +575,7 @@ __STATIC_INLINE void LL_OPAMP_SetInputInverting(OPAMP_TypeDef *OPAMPx, uint32_t */ __STATIC_INLINE uint32_t LL_OPAMP_GetInputInverting(OPAMP_TypeDef *OPAMPx) { - register uint32_t input_inverting = READ_BIT(OPAMPx->CSR, OPAMP_CSR_VMSEL); + uint32_t input_inverting = READ_BIT(OPAMPx->CSR, OPAMP_CSR_VMSEL); /* Manage cases 0x10 and 0x11 to return the same value: OPAMP inverting */ /* input not connected. */ @@ -661,7 +661,7 @@ __STATIC_INLINE void LL_OPAMP_SetCalibrationSelection(OPAMP_TypeDef *OPAMPx, uin */ __STATIC_INLINE uint32_t LL_OPAMP_GetCalibrationSelection(OPAMP_TypeDef *OPAMPx) { - register uint32_t CalibrationSelection = (uint32_t)(READ_BIT(OPAMPx->CSR, OPAMP_CSR_CALSEL)); + uint32_t CalibrationSelection = (uint32_t)(READ_BIT(OPAMPx->CSR, OPAMP_CSR_CALSEL)); return (uint32_t)((CalibrationSelection << 4)| (((CalibrationSelection & OPAMP_CSR_CALSEL_1) == 0UL) ? OPAMP_OTR_TRIMOFFSETN : OPAMP_OTR_TRIMOFFSETP)); @@ -701,7 +701,7 @@ __STATIC_INLINE uint32_t LL_OPAMP_IsCalibrationOutputSet(OPAMP_TypeDef *OPAMPx) */ __STATIC_INLINE void LL_OPAMP_SetTrimmingValue(OPAMP_TypeDef* OPAMPx, uint32_t PowerMode, uint32_t TransistorsDiffPair, uint32_t TrimmingValue) { - register __IO uint32_t *preg = __OPAMP_PTR_REG_OFFSET(OPAMPx->OTR, (PowerMode & OPAMP_POWERMODE_OTR_REGOFFSET_MASK)); + __IO uint32_t *preg = __OPAMP_PTR_REG_OFFSET(OPAMPx->OTR, (PowerMode & OPAMP_POWERMODE_OTR_REGOFFSET_MASK)); /* Set bits with position in register depending on parameter */ /* "TransistorsDiffPair". */ @@ -731,7 +731,7 @@ __STATIC_INLINE void LL_OPAMP_SetTrimmingValue(OPAMP_TypeDef* OPAMPx, uint32_t P */ __STATIC_INLINE uint32_t LL_OPAMP_GetTrimmingValue(OPAMP_TypeDef* OPAMPx, uint32_t PowerMode, uint32_t TransistorsDiffPair) { - register const __IO uint32_t *preg = __OPAMP_PTR_REG_OFFSET(OPAMPx->OTR, (PowerMode & OPAMP_POWERMODE_OTR_REGOFFSET_MASK)); + const __IO uint32_t *preg = __OPAMP_PTR_REG_OFFSET(OPAMPx->OTR, (PowerMode & OPAMP_POWERMODE_OTR_REGOFFSET_MASK)); /* Retrieve bits with position in register depending on parameter */ /* "TransistorsDiffPair". */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_pwr.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_pwr.h index 1e0d0cd..98602e2 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_pwr.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_pwr.h @@ -74,9 +74,13 @@ extern "C" { #define LL_PWR_FLAG_CPU2_CSSF PWR_CPU2CR_CSSF /*!< Clear flags for CPU2 */ #endif /* DUAL_CORE */ #define LL_PWR_FLAG_WKUPCR_WKUPC6 PWR_WKUPCR_WKUPC6 /*!< Clear PC1 WKUP flag */ +#if defined (PWR_WKUPCR_WKUPC5) #define LL_PWR_FLAG_WKUPCR_WKUPC5 PWR_WKUPCR_WKUPC5 /*!< Clear PI11 WKUP flag */ +#endif /* defined (PWR_WKUPCR_WKUPC5) */ #define LL_PWR_FLAG_WKUPCR_WKUPC4 PWR_WKUPCR_WKUPC4 /*!< Clear PC13 WKUP flag */ +#if defined (PWR_WKUPCR_WKUPC3) #define LL_PWR_FLAG_WKUPCR_WKUPC3 PWR_WKUPCR_WKUPC3 /*!< Clear PI8 WKUP flag */ +#endif /* defined (PWR_WKUPCR_WKUPC3) */ #define LL_PWR_FLAG_WKUPCR_WKUPC2 PWR_WKUPCR_WKUPC2 /*!< Clear PA2 WKUP flag */ #define LL_PWR_FLAG_WKUPCR_WKUPC1 PWR_WKUPCR_WKUPC1 /*!< Clear PA0 WKUP flag */ /** @@ -131,9 +135,13 @@ extern "C" { #endif /* PWR_CPUCR_PDDS_D2 */ #define LL_PWR_WKUPFR_WKUPF6 PWR_WKUPFR_WKUPF6 /*!< Wakeup flag on PC1 */ +#if defined (PWR_WKUPFR_WKUPF5) #define LL_PWR_WKUPFR_WKUPF5 PWR_WKUPFR_WKUPF5 /*!< Wakeup flag on PI11 */ +#endif /* defined (PWR_WKUPFR_WKUPF5) */ #define LL_PWR_WKUPFR_WKUPF4 PWR_WKUPFR_WKUPF4 /*!< Wakeup flag on PC13 */ +#if defined (PWR_WKUPFR_WKUPF3) #define LL_PWR_WKUPFR_WKUPF3 PWR_WKUPFR_WKUPF3 /*!< Wakeup flag on PI8 */ +#endif /* defined (PWR_WKUPFR_WKUPF3) */ #define LL_PWR_WKUPFR_WKUPF2 PWR_WKUPFR_WKUPF2 /*!< Wakeup flag on PA2 */ #define LL_PWR_WKUPFR_WKUPF1 PWR_WKUPFR_WKUPF1 /*!< Wakeup flag on PA0 */ /** @@ -186,8 +194,12 @@ extern "C" { #define LL_PWR_REGU_VOLTAGE_SCALE3 PWR_D3CR_VOS_0 /*!< Select voltage scale 3 */ #define LL_PWR_REGU_VOLTAGE_SCALE2 PWR_D3CR_VOS_1 /*!< Select voltage scale 2 */ #define LL_PWR_REGU_VOLTAGE_SCALE1 (PWR_D3CR_VOS_0 | PWR_D3CR_VOS_1) /*!< Select voltage scale 1 */ +#if defined (SYSCFG_PWRCR_ODEN) /* STM32H74xxx and STM32H75xxx lines */ #define LL_PWR_REGU_VOLTAGE_SCALE0 (PWR_D3CR_VOS_0 | PWR_D3CR_VOS_1) /*!< Select voltage scale 0 */ #else +#define LL_PWR_REGU_VOLTAGE_SCALE0 0x00000000U /*!< Select voltage scale 0 */ +#endif /* defined (SYSCFG_PWRCR_ODEN) */ +#else #define LL_PWR_REGU_VOLTAGE_SCALE3 0x00000000U /*!< Select voltage scale 3 */ #define LL_PWR_REGU_VOLTAGE_SCALE2 PWR_D3CR_VOS_0 /*!< Select voltage scale 2 */ #define LL_PWR_REGU_VOLTAGE_SCALE1 PWR_D3CR_VOS_1 /*!< Select voltage scale 1 */ @@ -257,9 +269,13 @@ extern "C" { */ #define LL_PWR_WAKEUP_PIN1 PWR_WKUPEPR_WKUPEN1 /*!< Wake-Up pin 1 : PA0 */ #define LL_PWR_WAKEUP_PIN2 PWR_WKUPEPR_WKUPEN2 /*!< Wake-Up pin 2 : PA2 */ +#if defined (PWR_WKUPEPR_WKUPEN3) #define LL_PWR_WAKEUP_PIN3 PWR_WKUPEPR_WKUPEN3 /*!< Wake-Up pin 3 : PI8 */ +#endif /* defined (PWR_WKUPEPR_WKUPEN3) */ #define LL_PWR_WAKEUP_PIN4 PWR_WKUPEPR_WKUPEN4 /*!< Wake-Up pin 4 : PC13 */ +#if defined (PWR_WKUPEPR_WKUPEN5) #define LL_PWR_WAKEUP_PIN5 PWR_WKUPEPR_WKUPEN5 /*!< Wake-Up pin 5 : PI11 */ +#endif /* defined (PWR_WKUPEPR_WKUPEN5) */ #define LL_PWR_WAKEUP_PIN6 PWR_WKUPEPR_WKUPEN6 /*!< Wake-Up pin 6 : PC1 */ /** * @} @@ -279,7 +295,7 @@ extern "C" { * @{ */ #define LL_PWR_LDO_SUPPLY PWR_CR3_LDOEN /*!< Core domains are suppplied from the LDO */ -#if defined (SMPS) +#if defined (SMPS) #define LL_PWR_DIRECT_SMPS_SUPPLY PWR_CR3_SMPSEN /*!< Core domains are suppplied from the SMPS */ #define LL_PWR_SMPS_1V8_SUPPLIES_LDO (PWR_CR3_SMPSLEVEL_0 | PWR_CR3_SMPSEN | PWR_CR3_LDOEN) /*!< The SMPS 1.8V output supplies the LDO which supplies the Core domains */ #define LL_PWR_SMPS_2V5_SUPPLIES_LDO (PWR_CR3_SMPSLEVEL_1 | PWR_CR3_SMPSEN | PWR_CR3_LDOEN) /*!< The SMPS 2.5V output supplies the LDO which supplies the Core domains */ @@ -1341,7 +1357,7 @@ __STATIC_INLINE void LL_PWR_CPU2_SetD3PowerMode(uint32_t PDMode) } #endif /* DUAL_CORE */ -#if defined (PWR_CPUCR_PDDS_D3) +#if defined (PWR_CPUCR_PDDS_D2) /** * @brief Get the D3 Domain Power Down mode when the CPU enters deepsleep * @rmtoll CPUCR PDDS_D3 LL_PWR_CPU_GetD3PowerMode @@ -1365,7 +1381,7 @@ __STATIC_INLINE uint32_t LL_PWR_CPU_GetSRDPowerMode(void) { return (uint32_t)(READ_BIT(PWR->CPUCR, PWR_CPUCR_PDDS_SRD)); } -#endif /* PWR_CPUCR_PDDS_D3 */ +#endif /* PWR_CPUCR_PDDS_D2 */ #if defined (DUAL_CORE) /** @@ -1553,7 +1569,7 @@ __STATIC_INLINE uint32_t LL_PWR_CPU2_IsEnabledD3RunInLowPowerMode(void) * @arg @ref LL_PWR_REGU_VOLTAGE_SCALE1 * @arg @ref LL_PWR_REGU_VOLTAGE_SCALE2 * @arg @ref LL_PWR_REGU_VOLTAGE_SCALE3 - * @note For all H7 lines except STM32H7Axxx and STM32H7Bxxx lines, VOS0 + * @note For all H7 lines except STM32H7Axxx and STM32H7Bxxx lines, VOS0 * is applied when PWR_D3CR_VOS[1:0] = 0b11 and SYSCFG_PWRCR_ODEN = 0b1. * @retval None */ @@ -1569,7 +1585,7 @@ __STATIC_INLINE void LL_PWR_SetRegulVoltageScaling(uint32_t VoltageScaling) /** * @brief Get the main internal Regulator output voltage * @rmtoll D3CR VOS LL_PWR_GetRegulVoltageScaling - * @note For all H7 lines except STM32H7Axxx and STM32H7Bxxx lines, checking + * @note For all H7 lines except STM32H7Axxx and STM32H7Bxxx lines, checking * VOS0 need the check of PWR_D3CR_VOS[1:0] field and SYSCFG_PWRCR_ODEN bit. * @retval Returned value can be one of the following values: * @arg @ref LL_PWR_REGU_VOLTAGE_SCALE0 @@ -1597,10 +1613,13 @@ __STATIC_INLINE uint32_t LL_PWR_GetRegulVoltageScaling(void) * @param WakeUpPin This parameter can be one of the following values: * @arg @ref LL_PWR_WAKEUP_PIN1 * @arg @ref LL_PWR_WAKEUP_PIN2 - * @arg @ref LL_PWR_WAKEUP_PIN3 + * @arg @ref LL_PWR_WAKEUP_PIN3 (*) * @arg @ref LL_PWR_WAKEUP_PIN4 - * @arg @ref LL_PWR_WAKEUP_PIN5 + * @arg @ref LL_PWR_WAKEUP_PIN5 (*) * @arg @ref LL_PWR_WAKEUP_PIN6 + * + * (*) value not defined in all devices. + * * @retval None */ __STATIC_INLINE void LL_PWR_EnableWakeUpPin(uint32_t WakeUpPin) @@ -1619,10 +1638,13 @@ __STATIC_INLINE void LL_PWR_EnableWakeUpPin(uint32_t WakeUpPin) * @param WakeUpPin This parameter can be one of the following values: * @arg @ref LL_PWR_WAKEUP_PIN1 * @arg @ref LL_PWR_WAKEUP_PIN2 - * @arg @ref LL_PWR_WAKEUP_PIN3 + * @arg @ref LL_PWR_WAKEUP_PIN3 (*) * @arg @ref LL_PWR_WAKEUP_PIN4 - * @arg @ref LL_PWR_WAKEUP_PIN5 + * @arg @ref LL_PWR_WAKEUP_PIN5 (*) * @arg @ref LL_PWR_WAKEUP_PIN6 + * + * (*) value not defined in all devices. + * * @retval None */ __STATIC_INLINE void LL_PWR_DisableWakeUpPin(uint32_t WakeUpPin) @@ -1641,10 +1663,13 @@ __STATIC_INLINE void LL_PWR_DisableWakeUpPin(uint32_t WakeUpPin) * @param WakeUpPin This parameter can be one of the following values: * @arg @ref LL_PWR_WAKEUP_PIN1 * @arg @ref LL_PWR_WAKEUP_PIN2 - * @arg @ref LL_PWR_WAKEUP_PIN3 + * @arg @ref LL_PWR_WAKEUP_PIN3 (*) * @arg @ref LL_PWR_WAKEUP_PIN4 - * @arg @ref LL_PWR_WAKEUP_PIN5 + * @arg @ref LL_PWR_WAKEUP_PIN5 (*) * @arg @ref LL_PWR_WAKEUP_PIN6 + * + * (*) value not defined in all devices. + * * @retval State of bit (1 or 0). */ __STATIC_INLINE uint32_t LL_PWR_IsEnabledWakeUpPin(uint32_t WakeUpPin) @@ -1663,10 +1688,13 @@ __STATIC_INLINE uint32_t LL_PWR_IsEnabledWakeUpPin(uint32_t WakeUpPin) * @param WakeUpPin This parameter can be one of the following values: * @arg @ref LL_PWR_WAKEUP_PIN1 * @arg @ref LL_PWR_WAKEUP_PIN2 - * @arg @ref LL_PWR_WAKEUP_PIN3 + * @arg @ref LL_PWR_WAKEUP_PIN3 (*) * @arg @ref LL_PWR_WAKEUP_PIN4 - * @arg @ref LL_PWR_WAKEUP_PIN5 + * @arg @ref LL_PWR_WAKEUP_PIN5 (*) * @arg @ref LL_PWR_WAKEUP_PIN6 + * + * (*) value not defined in all devices. + * * @retval None */ __STATIC_INLINE void LL_PWR_SetWakeUpPinPolarityLow(uint32_t WakeUpPin) @@ -1685,10 +1713,13 @@ __STATIC_INLINE void LL_PWR_SetWakeUpPinPolarityLow(uint32_t WakeUpPin) * @param WakeUpPin This parameter can be one of the following values: * @arg @ref LL_PWR_WAKEUP_PIN1 * @arg @ref LL_PWR_WAKEUP_PIN2 - * @arg @ref LL_PWR_WAKEUP_PIN3 + * @arg @ref LL_PWR_WAKEUP_PIN3 (*) * @arg @ref LL_PWR_WAKEUP_PIN4 - * @arg @ref LL_PWR_WAKEUP_PIN5 + * @arg @ref LL_PWR_WAKEUP_PIN5 (*) * @arg @ref LL_PWR_WAKEUP_PIN6 + * + * (*) value not defined in all devices. + * * @retval None */ __STATIC_INLINE void LL_PWR_SetWakeUpPinPolarityHigh(uint32_t WakeUpPin) @@ -1707,10 +1738,13 @@ __STATIC_INLINE void LL_PWR_SetWakeUpPinPolarityHigh(uint32_t WakeUpPin) * @param WakeUpPin This parameter can be one of the following values: * @arg @ref LL_PWR_WAKEUP_PIN1 * @arg @ref LL_PWR_WAKEUP_PIN2 - * @arg @ref LL_PWR_WAKEUP_PIN3 + * @arg @ref LL_PWR_WAKEUP_PIN3 (*) * @arg @ref LL_PWR_WAKEUP_PIN4 - * @arg @ref LL_PWR_WAKEUP_PIN5 + * @arg @ref LL_PWR_WAKEUP_PIN5 (*) * @arg @ref LL_PWR_WAKEUP_PIN6 + * + * (*) value not defined in all devices. + * * @retval State of bit (1 or 0). */ __STATIC_INLINE uint32_t LL_PWR_IsWakeUpPinPolarityLow(uint32_t WakeUpPin) @@ -1729,10 +1763,13 @@ __STATIC_INLINE uint32_t LL_PWR_IsWakeUpPinPolarityLow(uint32_t WakeUpPin) * @param WakeUpPin This parameter can be one of the following values: * @arg @ref LL_PWR_WAKEUP_PIN1 * @arg @ref LL_PWR_WAKEUP_PIN2 - * @arg @ref LL_PWR_WAKEUP_PIN3 + * @arg @ref LL_PWR_WAKEUP_PIN3 (*) * @arg @ref LL_PWR_WAKEUP_PIN4 - * @arg @ref LL_PWR_WAKEUP_PIN5 + * @arg @ref LL_PWR_WAKEUP_PIN5 (*) * @arg @ref LL_PWR_WAKEUP_PIN6 + * + * (*) value not defined in all devices. + * * @retval None */ __STATIC_INLINE void LL_PWR_SetWakeUpPinPullNone(uint32_t WakeUpPin) @@ -1753,10 +1790,13 @@ __STATIC_INLINE void LL_PWR_SetWakeUpPinPullNone(uint32_t WakeUpPin) * @param WakeUpPin This parameter can be one of the following values: * @arg @ref LL_PWR_WAKEUP_PIN1 * @arg @ref LL_PWR_WAKEUP_PIN2 - * @arg @ref LL_PWR_WAKEUP_PIN3 + * @arg @ref LL_PWR_WAKEUP_PIN3 (*) * @arg @ref LL_PWR_WAKEUP_PIN4 - * @arg @ref LL_PWR_WAKEUP_PIN5 + * @arg @ref LL_PWR_WAKEUP_PIN5 (*) * @arg @ref LL_PWR_WAKEUP_PIN6 + * + * (*) value not defined in all devices. + * * @retval None */ __STATIC_INLINE void LL_PWR_SetWakeUpPinPullUp(uint32_t WakeUpPin) @@ -1777,10 +1817,13 @@ __STATIC_INLINE void LL_PWR_SetWakeUpPinPullUp(uint32_t WakeUpPin) * @param WakeUpPin This parameter can be one of the following values: * @arg @ref LL_PWR_WAKEUP_PIN1 * @arg @ref LL_PWR_WAKEUP_PIN2 - * @arg @ref LL_PWR_WAKEUP_PIN3 + * @arg @ref LL_PWR_WAKEUP_PIN3 (*) * @arg @ref LL_PWR_WAKEUP_PIN4 - * @arg @ref LL_PWR_WAKEUP_PIN5 + * @arg @ref LL_PWR_WAKEUP_PIN5 (*) * @arg @ref LL_PWR_WAKEUP_PIN6 + * + * (*) value not defined in all devices. + * * @retval None */ __STATIC_INLINE void LL_PWR_SetWakeUpPinPullDown(uint32_t WakeUpPin) @@ -1801,10 +1844,13 @@ __STATIC_INLINE void LL_PWR_SetWakeUpPinPullDown(uint32_t WakeUpPin) * @param WakeUpPin This parameter can be one of the following values: * @arg @ref LL_PWR_WAKEUP_PIN1 * @arg @ref LL_PWR_WAKEUP_PIN2 - * @arg @ref LL_PWR_WAKEUP_PIN3 + * @arg @ref LL_PWR_WAKEUP_PIN3 (*) * @arg @ref LL_PWR_WAKEUP_PIN4 - * @arg @ref LL_PWR_WAKEUP_PIN5 + * @arg @ref LL_PWR_WAKEUP_PIN5 (*) * @arg @ref LL_PWR_WAKEUP_PIN6 + * + * (*) value not defined in all devices. + * * @retval Returned value can be one of the following values: * @arg @ref LL_PWR_WAKEUP_PIN_NOPULL * @arg @ref LL_PWR_WAKEUP_PIN_PULLUP @@ -1812,7 +1858,7 @@ __STATIC_INLINE void LL_PWR_SetWakeUpPinPullDown(uint32_t WakeUpPin) */ __STATIC_INLINE uint32_t LL_PWR_GetWakeUpPinPull(uint32_t WakeUpPin) { - register uint32_t regValue = READ_BIT(PWR->WKUPEPR, (PWR_WKUPEPR_WKUPPUPD1 << ((LL_PWR_WAKEUP_PINS_PULL_SHIFT_OFFSET * POSITION_VAL(WakeUpPin)) & LL_PWR_WAKEUP_PINS_MAX_SHIFT_MASK))); + uint32_t regValue = READ_BIT(PWR->WKUPEPR, (PWR_WKUPEPR_WKUPPUPD1 << ((LL_PWR_WAKEUP_PINS_PULL_SHIFT_OFFSET * POSITION_VAL(WakeUpPin)) & LL_PWR_WAKEUP_PINS_MAX_SHIFT_MASK))); return (uint32_t)(regValue >> ((PWR_WKUPEPR_WKUPPUPD1_Pos + (LL_PWR_WAKEUP_PINS_PULL_SHIFT_OFFSET * POSITION_VAL(WakeUpPin))) & LL_PWR_WAKEUP_PINS_MAX_SHIFT_MASK)); } @@ -2079,6 +2125,7 @@ __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU6(void) return ((READ_BIT(PWR->WKUPFR, PWR_WKUPFR_WKUPF6) == (PWR_WKUPFR_WKUPF6)) ? 1UL : 0UL); } +#if defined (PWR_WKUPFR_WKUPF5) /** * @brief Get Wake-up Flag 5 * @rmtoll WKUPFR WKUPF5 LL_PWR_IsActiveFlag_WU5 @@ -2088,6 +2135,7 @@ __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU5(void) { return ((READ_BIT(PWR->WKUPFR, PWR_WKUPFR_WKUPF5) == (PWR_WKUPFR_WKUPF5)) ? 1UL : 0UL); } +#endif /* defined (PWR_WKUPFR_WKUPF5) */ /** * @brief Get Wake-up Flag 4 @@ -2099,6 +2147,7 @@ __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU4(void) return ((READ_BIT(PWR->WKUPFR, PWR_WKUPFR_WKUPF4) == (PWR_WKUPFR_WKUPF4)) ? 1UL : 0UL); } +#if defined (PWR_WKUPFR_WKUPF3) /** * @brief Get Wake-up Flag 3 * @rmtoll WKUPFR WKUPF3 LL_PWR_IsActiveFlag_WU3 @@ -2108,6 +2157,7 @@ __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU3(void) { return ((READ_BIT(PWR->WKUPFR, PWR_WKUPFR_WKUPF3) == (PWR_WKUPFR_WKUPF3)) ? 1UL : 0UL); } +#endif /* defined (PWR_WKUPFR_WKUPF3) */ /** * @brief Get Wake-up Flag 2 @@ -2161,6 +2211,7 @@ __STATIC_INLINE void LL_PWR_ClearFlag_WU6(void) WRITE_REG(PWR->WKUPCR, PWR_WKUPCR_WKUPC6); } +#if defined (PWR_WKUPCR_WKUPC5) /** * @brief Clear Wake-up Flag 5 * @rmtoll WKUPCR WKUPC5 LL_PWR_ClearFlag_WU5 @@ -2170,6 +2221,7 @@ __STATIC_INLINE void LL_PWR_ClearFlag_WU5(void) { WRITE_REG(PWR->WKUPCR, PWR_WKUPCR_WKUPC5); } +#endif /* defined (PWR_WKUPCR_WKUPC5) */ /** * @brief Clear Wake-up Flag 4 @@ -2181,6 +2233,7 @@ __STATIC_INLINE void LL_PWR_ClearFlag_WU4(void) WRITE_REG(PWR->WKUPCR, PWR_WKUPCR_WKUPC4); } +#if defined (PWR_WKUPCR_WKUPC3) /** * @brief Clear Wake-up Flag 3 * @rmtoll WKUPCR WKUPC3 LL_PWR_ClearFlag_WU3 @@ -2190,6 +2243,7 @@ __STATIC_INLINE void LL_PWR_ClearFlag_WU3(void) { WRITE_REG(PWR->WKUPCR, PWR_WKUPCR_WKUPC3); } +#endif /* defined (PWR_WKUPCR_WKUPC3) */ /** * @brief Clear Wake-up Flag 2 diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_rcc.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_rcc.h index 3ec127c..ed63ebf 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_rcc.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_rcc.h @@ -159,11 +159,11 @@ typedef struct * @{ */ #if !defined (HSE_VALUE) -#if defined(RCC_VER_X) +#if defined(RCC_VER_X) || defined(RCC_VER_3_0) #define HSE_VALUE 25000000U /*!< Value of the HSE oscillator in Hz */ #else #define HSE_VALUE 24000000U /*!< Value of the HSE oscillator in Hz */ -#endif /* RCC_VER_X */ +#endif /* RCC_VER_X || RCC_VER_3_0 */ #endif /* HSE_VALUE */ #if !defined (HSI_VALUE) @@ -528,6 +528,29 @@ typedef struct #define LL_RCC_USART16_CLKSOURCE_HSI LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART16SEL, RCC_D2CCIP2R_USART16SEL_Pos, RCC_D2CCIP2R_USART16SEL_0 | RCC_D2CCIP2R_USART16SEL_1) #define LL_RCC_USART16_CLKSOURCE_CSI LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART16SEL, RCC_D2CCIP2R_USART16SEL_Pos, RCC_D2CCIP2R_USART16SEL_2) #define LL_RCC_USART16_CLKSOURCE_LSE LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART16SEL, RCC_D2CCIP2R_USART16SEL_Pos, RCC_D2CCIP2R_USART16SEL_0 | RCC_D2CCIP2R_USART16SEL_2) +/* Aliases */ +#define LL_RCC_USART16910_CLKSOURCE_PCLK2 LL_RCC_USART16_CLKSOURCE_PCLK2 +#define LL_RCC_USART16910_CLKSOURCE_PLL2Q LL_RCC_USART16_CLKSOURCE_PLL2Q +#define LL_RCC_USART16910_CLKSOURCE_PLL3Q LL_RCC_USART16_CLKSOURCE_PLL3Q +#define LL_RCC_USART16910_CLKSOURCE_HSI LL_RCC_USART16_CLKSOURCE_HSI +#define LL_RCC_USART16910_CLKSOURCE_CSI LL_RCC_USART16_CLKSOURCE_CSI +#define LL_RCC_USART16910_CLKSOURCE_LSE LL_RCC_USART16_CLKSOURCE_LSE + +#elif defined(RCC_D2CCIP2R_USART16910SEL) +#define LL_RCC_USART16910_CLKSOURCE_PCLK2 LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART16910SEL, RCC_D2CCIP2R_USART16910SEL_Pos, 0x00000000U) +#define LL_RCC_USART16910_CLKSOURCE_PLL2Q LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART16910SEL, RCC_D2CCIP2R_USART16910SEL_Pos, RCC_D2CCIP2R_USART16910SEL_0) +#define LL_RCC_USART16910_CLKSOURCE_PLL3Q LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART16910SEL, RCC_D2CCIP2R_USART16910SEL_Pos, RCC_D2CCIP2R_USART16910SEL_1) +#define LL_RCC_USART16910_CLKSOURCE_HSI LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART16910SEL, RCC_D2CCIP2R_USART16910SEL_Pos, RCC_D2CCIP2R_USART16910SEL_0 | RCC_D2CCIP2R_USART16910SEL_1) +#define LL_RCC_USART16910_CLKSOURCE_CSI LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART16910SEL, RCC_D2CCIP2R_USART16910SEL_Pos, RCC_D2CCIP2R_USART16910SEL_2) +#define LL_RCC_USART16910_CLKSOURCE_LSE LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART16910SEL, RCC_D2CCIP2R_USART16910SEL_Pos, RCC_D2CCIP2R_USART16910SEL_0 | RCC_D2CCIP2R_USART16910SEL_2) +/* Aliases */ +#define LL_RCC_USART16_CLKSOURCE_PCLK2 LL_RCC_USART16910_CLKSOURCE_PCLK2 +#define LL_RCC_USART16_CLKSOURCE_PLL2Q LL_RCC_USART16910_CLKSOURCE_PLL2Q +#define LL_RCC_USART16_CLKSOURCE_PLL3Q LL_RCC_USART16910_CLKSOURCE_PLL3Q +#define LL_RCC_USART16_CLKSOURCE_HSI LL_RCC_USART16910_CLKSOURCE_HSI +#define LL_RCC_USART16_CLKSOURCE_CSI LL_RCC_USART16910_CLKSOURCE_CSI +#define LL_RCC_USART16_CLKSOURCE_LSE LL_RCC_USART16910_CLKSOURCE_LSE + #else #define LL_RCC_USART16910_CLKSOURCE_PCLK2 LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_USART16910SEL, RCC_CDCCIP2R_USART16910SEL_Pos, 0x00000000U) #define LL_RCC_USART16910_CLKSOURCE_PLL2Q LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_USART16910SEL, RCC_CDCCIP2R_USART16910SEL_Pos, RCC_CDCCIP2R_USART16910SEL_0) @@ -592,6 +615,23 @@ typedef struct #define LL_RCC_I2C123_CLKSOURCE_PLL3R LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_I2C123SEL, RCC_D2CCIP2R_I2C123SEL_Pos, RCC_D2CCIP2R_I2C123SEL_0) #define LL_RCC_I2C123_CLKSOURCE_HSI LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_I2C123SEL, RCC_D2CCIP2R_I2C123SEL_Pos, RCC_D2CCIP2R_I2C123SEL_1) #define LL_RCC_I2C123_CLKSOURCE_CSI LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_I2C123SEL, RCC_D2CCIP2R_I2C123SEL_Pos, RCC_D2CCIP2R_I2C123SEL_0 | RCC_D2CCIP2R_I2C123SEL_1) +/* Aliases */ +#define LL_RCC_I2C1235_CLKSOURCE_PCLK1 LL_RCC_I2C123_CLKSOURCE_PCLK1 +#define LL_RCC_I2C1235_CLKSOURCE_PLL3R LL_RCC_I2C123_CLKSOURCE_PLL3R +#define LL_RCC_I2C1235_CLKSOURCE_HSI LL_RCC_I2C123_CLKSOURCE_HSI +#define LL_RCC_I2C1235_CLKSOURCE_CSI LL_RCC_I2C123_CLKSOURCE_CSI + +#elif defined (RCC_D2CCIP2R_I2C1235SEL) +#define LL_RCC_I2C1235_CLKSOURCE_PCLK1 LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_I2C1235SEL, RCC_D2CCIP2R_I2C1235SEL_Pos, 0x00000000U) +#define LL_RCC_I2C1235_CLKSOURCE_PLL3R LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_I2C1235SEL, RCC_D2CCIP2R_I2C1235SEL_Pos, RCC_D2CCIP2R_I2C1235SEL_0) +#define LL_RCC_I2C1235_CLKSOURCE_HSI LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_I2C1235SEL, RCC_D2CCIP2R_I2C1235SEL_Pos, RCC_D2CCIP2R_I2C1235SEL_1) +#define LL_RCC_I2C1235_CLKSOURCE_CSI LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_I2C1235SEL, RCC_D2CCIP2R_I2C1235SEL_Pos, RCC_D2CCIP2R_I2C1235SEL_0 | RCC_D2CCIP2R_I2C1235SEL_1) +/* Aliases */ +#define LL_RCC_I2C123_CLKSOURCE_PCLK1 LL_RCC_I2C1235_CLKSOURCE_PCLK1 +#define LL_RCC_I2C123_CLKSOURCE_PLL3R LL_RCC_I2C1235_CLKSOURCE_PLL3R +#define LL_RCC_I2C123_CLKSOURCE_HSI LL_RCC_I2C1235_CLKSOURCE_HSI +#define LL_RCC_I2C123_CLKSOURCE_CSI LL_RCC_I2C1235_CLKSOURCE_CSI + #else #define LL_RCC_I2C123_CLKSOURCE_PCLK1 LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_I2C123SEL, RCC_CDCCIP2R_I2C123SEL_Pos, 0x00000000U) #define LL_RCC_I2C123_CLKSOURCE_PLL3R LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_I2C123SEL, RCC_CDCCIP2R_I2C123SEL_Pos, RCC_CDCCIP2R_I2C123SEL_0) @@ -717,6 +757,9 @@ typedef struct #define LL_RCC_SAI4A_CLKSOURCE_PLL3P LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SAI4ASEL, RCC_D3CCIPR_SAI4ASEL_Pos, RCC_D3CCIPR_SAI4ASEL_1) #define LL_RCC_SAI4A_CLKSOURCE_I2S_CKIN LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SAI4ASEL, RCC_D3CCIPR_SAI4ASEL_Pos, RCC_D3CCIPR_SAI4ASEL_0 | RCC_D3CCIPR_SAI4ASEL_1) #define LL_RCC_SAI4A_CLKSOURCE_CLKP LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SAI4ASEL, RCC_D3CCIPR_SAI4ASEL_Pos, RCC_D3CCIPR_SAI4ASEL_2) +#if defined(RCC_VER_3_0) +#define LL_RCC_SAI4A_CLKSOURCE_SPDIF LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SAI4ASEL, RCC_D3CCIPR_SAI4ASEL_Pos, RCC_D3CCIPR_SAI4ASEL_2 | RCC_D3CCIPR_SAI4ASEL_0) +#endif /* RCC_VER_3_0 */ #endif /* SAI4_Block_A */ #if defined(SAI4_Block_B) #define LL_RCC_SAI4B_CLKSOURCE_PLL1Q LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SAI4BSEL, RCC_D3CCIPR_SAI4BSEL_Pos, 0x00000000U) @@ -724,6 +767,9 @@ typedef struct #define LL_RCC_SAI4B_CLKSOURCE_PLL3P LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SAI4BSEL, RCC_D3CCIPR_SAI4BSEL_Pos, RCC_D3CCIPR_SAI4BSEL_1) #define LL_RCC_SAI4B_CLKSOURCE_I2S_CKIN LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SAI4BSEL, RCC_D3CCIPR_SAI4BSEL_Pos, RCC_D3CCIPR_SAI4BSEL_0 | RCC_D3CCIPR_SAI4BSEL_1) #define LL_RCC_SAI4B_CLKSOURCE_CLKP LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SAI4BSEL, RCC_D3CCIPR_SAI4BSEL_Pos, RCC_D3CCIPR_SAI4BSEL_2) +#if defined(RCC_VER_3_0) +#define LL_RCC_SAI4B_CLKSOURCE_SPDIF LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SAI4BSEL, RCC_D3CCIPR_SAI4BSEL_Pos, RCC_D3CCIPR_SAI4BSEL_2 | RCC_D3CCIPR_SAI4BSEL_0) +#endif /* RCC_VER_3_0 */ #endif /* SAI4_Block_B */ /** * @} @@ -867,10 +913,17 @@ typedef struct /** @defgroup RCC_LL_EC_OSPI_CLKSOURCE Peripheral OSPI clock source selection * @{ */ +#if defined(RCC_D1CCIPR_OCTOSPISEL) +#define LL_RCC_OSPI_CLKSOURCE_HCLK (0x00000000U) +#define LL_RCC_OSPI_CLKSOURCE_PLL1Q (RCC_D1CCIPR_OCTOSPISEL_0) +#define LL_RCC_OSPI_CLKSOURCE_PLL2R (RCC_D1CCIPR_OCTOSPISEL_1) +#define LL_RCC_OSPI_CLKSOURCE_CLKP (RCC_D1CCIPR_OCTOSPISEL_0 | RCC_D1CCIPR_OCTOSPISEL_1) +#else #define LL_RCC_OSPI_CLKSOURCE_HCLK (0x00000000U) #define LL_RCC_OSPI_CLKSOURCE_PLL1Q (RCC_CDCCIPR_OCTOSPISEL_0) #define LL_RCC_OSPI_CLKSOURCE_PLL2R (RCC_CDCCIPR_OCTOSPISEL_1) #define LL_RCC_OSPI_CLKSOURCE_CLKP (RCC_CDCCIPR_OCTOSPISEL_0 | RCC_CDCCIPR_OCTOSPISEL_1) +#endif /* RCC_D1CCIPR_OCTOSPISEL */ /** * @} */ @@ -1010,11 +1063,15 @@ typedef struct * @} */ -/** @defgroup RCC_LL_EC_USARTx_CLKSOURCE Peripheral USART get clock source +/** @defgroup RCC_LL_EC_USARTx Peripheral USART get clock source * @{ */ #if defined (RCC_D2CCIP2R_USART16SEL) #define LL_RCC_USART16_CLKSOURCE LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART16SEL, RCC_D2CCIP2R_USART16SEL_Pos, 0x00000000U) +#elif defined (RCC_D2CCIP2R_USART16910SEL) +#define LL_RCC_USART16_CLKSOURCE LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART16910SEL, RCC_D2CCIP2R_USART16910SEL_Pos, 0x00000000U) +/* alias*/ +#define LL_RCC_USART16910_CLKSOURCE LL_RCC_USART16_CLKSOURCE #else #define LL_RCC_USART16_CLKSOURCE LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_USART16910SEL, RCC_CDCCIP2R_USART16910SEL_Pos, 0x00000000U) /* alias*/ @@ -1029,7 +1086,7 @@ typedef struct * @} */ -/** @defgroup RCC_LL_EC_LPUARTx_CLKSOURCE Peripheral LPUART get clock source +/** @defgroup RCC_LL_EC_LPUARTx Peripheral LPUART get clock source * @{ */ #if defined(RCC_D3CCIPR_LPUART1SEL) @@ -1041,13 +1098,21 @@ typedef struct * @} */ -/** @defgroup RCC_LL_EC_I2Cx_CLKSOURCE Peripheral I2C get clock source +/** @defgroup RCC_LL_EC_I2Cx Peripheral I2C get clock source * @{ */ #if defined(RCC_D2CCIP2R_I2C123SEL) #define LL_RCC_I2C123_CLKSOURCE LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_I2C123SEL, RCC_D2CCIP2R_I2C123SEL_Pos, 0x00000000U) +/* alias */ +#define LL_RCC_I2C1235_CLKSOURCE LL_RCC_I2C123_CLKSOURCE +#elif defined(RCC_D2CCIP2R_I2C1235SEL) +#define LL_RCC_I2C1235_CLKSOURCE LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_I2C1235SEL, RCC_D2CCIP2R_I2C1235SEL_Pos, 0x00000000U) +/* alias */ +#define LL_RCC_I2C123_CLKSOURCE LL_RCC_I2C1235_CLKSOURCE #else #define LL_RCC_I2C123_CLKSOURCE LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_I2C123SEL, RCC_CDCCIP2R_I2C123SEL_Pos, 0x00000000U) +/* alias */ +#define LL_RCC_I2C1235_CLKSOURCE LL_RCC_I2C123_CLKSOURCE #endif /* RCC_D2CCIP2R_I2C123SEL */ #if defined(RCC_D3CCIPR_I2C4SEL) #define LL_RCC_I2C4_CLKSOURCE LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_I2C4SEL, RCC_D3CCIPR_I2C4SEL_Pos, 0x00000000U) @@ -1058,30 +1123,30 @@ typedef struct * @} */ -/** @defgroup RCC_LL_EC_LPTIMx_CLKSOURCE Peripheral LPTIM get clock source +/** @defgroup RCC_LL_EC_LPTIMx Peripheral LPTIM get clock source * @{ */ #if defined(RCC_D2CCIP2R_LPTIM1SEL) -#define LL_RCC_LPTIM1_CLKSOURCE LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_LPTIM1SEL, RCC_D2CCIP2R_LPTIM1SEL_Pos, 0x00000000U) +#define LL_RCC_LPTIM1_CLKSOURCE LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_LPTIM1SEL, RCC_D2CCIP2R_LPTIM1SEL_Pos, 0x00000000U) #else -#define LL_RCC_LPTIM1_CLKSOURCE LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_LPTIM1SEL, RCC_CDCCIP2R_LPTIM1SEL_Pos, 0x00000000U) +#define LL_RCC_LPTIM1_CLKSOURCE LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_LPTIM1SEL, RCC_CDCCIP2R_LPTIM1SEL_Pos, 0x00000000U) #endif /* RCC_D2CCIP2R_LPTIM1SEL) */ #if defined(RCC_D3CCIPR_LPTIM2SEL) -#define LL_RCC_LPTIM2_CLKSOURCE LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_LPTIM2SEL, RCC_D3CCIPR_LPTIM2SEL_Pos, 0x00000000U) +#define LL_RCC_LPTIM2_CLKSOURCE LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_LPTIM2SEL, RCC_D3CCIPR_LPTIM2SEL_Pos, 0x00000000U) #else -#define LL_RCC_LPTIM2_CLKSOURCE LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_LPTIM2SEL, RCC_SRDCCIPR_LPTIM2SEL_Pos, 0x00000000U) +#define LL_RCC_LPTIM2_CLKSOURCE LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_LPTIM2SEL, RCC_SRDCCIPR_LPTIM2SEL_Pos, 0x00000000U) #endif /* RCC_D3CCIPR_LPTIM2SEL */ #if defined(RCC_D3CCIPR_LPTIM345SEL) -#define LL_RCC_LPTIM345_CLKSOURCE LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_LPTIM345SEL, RCC_D3CCIPR_LPTIM345SEL_Pos, 0x00000000U) +#define LL_RCC_LPTIM345_CLKSOURCE LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_LPTIM345SEL, RCC_D3CCIPR_LPTIM345SEL_Pos, 0x00000000U) #else -#define LL_RCC_LPTIM345_CLKSOURCE LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_LPTIM3SEL, RCC_SRDCCIPR_LPTIM3SEL_Pos, 0x00000000U) +#define LL_RCC_LPTIM345_CLKSOURCE LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_LPTIM3SEL, RCC_SRDCCIPR_LPTIM3SEL_Pos, 0x00000000U) #define LL_RCC_LPTIM3_CLKSOURCE LL_RCC_LPTIM345_CLKSOURCE /* alias */ #endif /* RCC_D3CCIPR_LPTIM345SEL */ /** * @} */ -/** @defgroup RCC_LL_EC_SAIx_CLKSOURCE Peripheral SAI get clock source +/** @defgroup RCC_LL_EC_SAIx Peripheral SAI get clock source * @{ */ #if defined(RCC_D2CCIP1R_SAI1SEL) @@ -1108,7 +1173,7 @@ typedef struct * @} */ -/** @defgroup RCC_LL_EC_SDMMC_CLKSOURCE Peripheral SDMMC get clock source +/** @defgroup RCC_LL_EC_SDMMC Peripheral SDMMC get clock source * @{ */ #if defined(RCC_D1CCIPR_SDMMCSEL) @@ -1120,7 +1185,7 @@ typedef struct * @} */ -/** @defgroup RCC_LL_EC_RNG_CLKSOURCE Peripheral RNG get clock source +/** @defgroup RCC_LL_EC_RNG Peripheral RNG get clock source * @{ */ #if (RCC_D2CCIP2R_RNGSEL) @@ -1132,7 +1197,7 @@ typedef struct * @} */ -/** @defgroup RCC_LL_EC_USB_CLKSOURCE Peripheral USB get clock source +/** @defgroup RCC_LL_EC_USB Peripheral USB get clock source * @{ */ #if (RCC_D2CCIP2R_USBSEL) @@ -1144,7 +1209,7 @@ typedef struct * @} */ -/** @defgroup RCC_LL_EC_CEC_CLKSOURCE Peripheral CEC get clock source +/** @defgroup RCC_LL_EC_CEC Peripheral CEC get clock source * @{ */ #if (RCC_D2CCIP2R_CECSEL) @@ -1157,7 +1222,7 @@ typedef struct */ #if defined(DSI) -/** @defgroup RCC_LL_EC_DSI_CLKSOURCE Peripheral DSI get clock source +/** @defgroup RCC_LL_EC_DSI Peripheral DSI get clock source * @{ */ #define LL_RCC_DSI_CLKSOURCE RCC_D1CCIPR_DSISEL @@ -1166,7 +1231,7 @@ typedef struct */ #endif /* DSI */ -/** @defgroup RCC_LL_EC_DFSDM_CLKSOURCE Peripheral DFSDM get clock source +/** @defgroup RCC_LL_EC_DFSDM Peripheral DFSDM get clock source * @{ */ #if defined(RCC_D2CCIP1R_DFSDM1SEL) @@ -1179,17 +1244,18 @@ typedef struct */ #if defined(DFSDM2_BASE) -/** @defgroup RCC_LL_EC_DFSDM2_CLKSOURCE Peripheral DFSDM2 get clock source +/** @defgroup RCC_LL_EC_DFSDM2 Peripheral DFSDM2 get clock source * @{ */ #define LL_RCC_DFSDM2_CLKSOURCE RCC_SRDCCIPR_DFSDM2SEL /** * @} */ -#endif /* DFSDM2 */ +#endif /* DFSDM2_BASE */ -/** @defgroup RCC_LL_EC_FMC_CLKSOURCE Peripheral FMC get clock source + +/** @defgroup RCC_LL_EC_FMC Peripheral FMC get clock source * @{ */ #if defined(RCC_D1CCIPR_FMCSEL) @@ -1202,7 +1268,7 @@ typedef struct */ #if defined(QUADSPI) -/** @defgroup RCC_LL_EC_QSPI_CLKSOURCE Peripheral QSPI get clock source +/** @defgroup RCC_LL_EC_QSPI Peripheral QSPI get clock source * @{ */ #define LL_RCC_QSPI_CLKSOURCE RCC_D1CCIPR_QSPISEL @@ -1212,16 +1278,20 @@ typedef struct #endif /* QUADSPI */ #if defined(OCTOSPI1) || defined(OCTOSPI2) -/** @defgroup RCC_LL_EC_OSPI_CLKSOURCE Peripheral OSPI get clock source +/** @defgroup RCC_LL_EC_OSPI Peripheral OSPI get clock source * @{ */ +#if defined(RCC_CDCCIPR_OCTOSPISEL) #define LL_RCC_OSPI_CLKSOURCE RCC_CDCCIPR_OCTOSPISEL +#else +#define LL_RCC_OSPI_CLKSOURCE RCC_D1CCIPR_OCTOSPISEL +#endif /* RCC_CDCCIPR_OCTOSPISEL */ /** * @} */ #endif /* OCTOSPI1 || OCTOSPI2 */ -/** @defgroup RCC_LL_EC_CLKP_CLKSOURCE Peripheral CLKP get clock source +/** @defgroup RCC_LL_EC_CLKP Peripheral CLKP get clock source * @{ */ #if defined(RCC_D1CCIPR_CKPERSEL) @@ -1233,7 +1303,7 @@ typedef struct * @} */ -/** @defgroup RCC_LL_EC_SPIx_CLKSOURCE Peripheral SPI get clock source +/** @defgroup RCC_LL_EC_SPIx Peripheral SPI get clock source * @{ */ #if defined(RCC_D2CCIP1R_SPI123SEL) @@ -1255,7 +1325,7 @@ typedef struct * @} */ -/** @defgroup RCC_LL_EC_SPDIF_CLKSOURCE Peripheral SPDIF get clock source +/** @defgroup RCC_LL_EC_SPDIF Peripheral SPDIF get clock source * @{ */ #if defined(RCC_D2CCIP1R_SPDIFSEL) @@ -1268,7 +1338,7 @@ typedef struct */ #if defined(FDCAN1) || defined(FDCAN2) -/** @defgroup RCC_LL_EC_FDCAN_CLKSOURCE Peripheral FDCAN get clock source +/** @defgroup RCC_LL_EC_FDCAN Peripheral FDCAN get clock source * @{ */ #if defined(RCC_D2CCIP1R_FDCANSEL) @@ -1281,7 +1351,7 @@ typedef struct */ #endif /*FDCAN1 || FDCAN2*/ -/** @defgroup RCC_LL_EC_SWP_CLKSOURCE Peripheral SWP get clock source +/** @defgroup RCC_LL_EC_SWP Peripheral SWP get clock source * @{ */ #if defined(RCC_D2CCIP1R_SWPSEL) @@ -1293,7 +1363,7 @@ typedef struct * @} */ -/** @defgroup RCC_LL_EC_ADC_CLKSOURCE Peripheral ADC get clock source +/** @defgroup RCC_LL_EC_ADC Peripheral ADC get clock source * @{ */ #if defined(RCC_D3CCIPR_ADCSEL) @@ -1740,7 +1810,7 @@ __STATIC_INLINE uint32_t LL_RCC_HSI_GetCalibration(void) * @note Default value is 64 (32 for Cut1.x), which, when added to the HSICAL value, * should trim the HSI to 64 MHz +/- 1 % * @rmtoll HSICFGR HSITRIM LL_RCC_HSI_SetCalibTrimming - * @param Parameter can be a value between 0 and 127 (63 for Cut1.x) + * @param Value can be a value between 0 and 127 (63 for Cut1.x) * @retval None */ __STATIC_INLINE void LL_RCC_HSI_SetCalibTrimming(uint32_t Value) @@ -2779,15 +2849,16 @@ __STATIC_INLINE void LL_RCC_ConfigMCO(uint32_t MCOxSource, uint32_t MCOxPrescale * @arg @ref LL_RCC_SAI1_CLKSOURCE_PLL3P * @arg @ref LL_RCC_SAI1_CLKSOURCE_I2S_CKIN * @arg @ref LL_RCC_SAI1_CLKSOURCE_CLKP - * @arg @ref LL_RCC_SAI23_CLKSOURCE_PLL1Q - * @arg @ref LL_RCC_SAI23_CLKSOURCE_PLL2P - * @arg @ref LL_RCC_SAI23_CLKSOURCE_PLL3P - * @arg @ref LL_RCC_SAI23_CLKSOURCE_I2S_CKIN - * @arg @ref LL_RCC_SAI23_CLKSOURCE_CLKP + * @arg @ref LL_RCC_SAI23_CLKSOURCE_PLL1Q (*) + * @arg @ref LL_RCC_SAI23_CLKSOURCE_PLL2P (*) + * @arg @ref LL_RCC_SAI23_CLKSOURCE_PLL3P (*) + * @arg @ref LL_RCC_SAI23_CLKSOURCE_I2S_CKIN (*) + * @arg @ref LL_RCC_SAI23_CLKSOURCE_CLKP (*) * @arg @ref LL_RCC_SAI4A_CLKSOURCE_PLL1Q (*) * @arg @ref LL_RCC_SAI4A_CLKSOURCE_PLL2P (*) * @arg @ref LL_RCC_SAI4A_CLKSOURCE_PLL3P (*) * @arg @ref LL_RCC_SAI4A_CLKSOURCE_I2S_CKIN (*) + * @arg @ref LL_RCC_SAI4A_CLKSOURCE_SPDIF (*) * @arg @ref LL_RCC_SAI2A_CLKSOURCE_PLL1Q (*) * @arg @ref LL_RCC_SAI2A_CLKSOURCE_PLL2P (*) * @arg @ref LL_RCC_SAI2A_CLKSOURCE_PLL3P (*) @@ -2799,6 +2870,7 @@ __STATIC_INLINE void LL_RCC_ConfigMCO(uint32_t MCOxSource, uint32_t MCOxPrescale * @arg @ref LL_RCC_SAI4B_CLKSOURCE_PLL3P (*) * @arg @ref LL_RCC_SAI4B_CLKSOURCE_I2S_CKIN (*) * @arg @ref LL_RCC_SAI4B_CLKSOURCE_CLKP (*) + * @arg @ref LL_RCC_SAI4B_CLKSOURCE_SPDIF (*) * @arg @ref LL_RCC_SAI2B_CLKSOURCE_PLL1Q (*) * @arg @ref LL_RCC_SAI2B_CLKSOURCE_PLL2P (*) * @arg @ref LL_RCC_SAI2B_CLKSOURCE_PLL3P (*) @@ -2830,9 +2902,9 @@ __STATIC_INLINE void LL_RCC_ConfigMCO(uint32_t MCOxSource, uint32_t MCOxPrescale __STATIC_INLINE void LL_RCC_SetClockSource(uint32_t ClkSource) { #if defined(RCC_D1CCIPR_FMCSEL) - register uint32_t * pReg = (uint32_t *)((uint32_t)&RCC->D1CCIPR + LL_CLKSOURCE_REG(ClkSource)); + uint32_t * pReg = (uint32_t *)((uint32_t)&RCC->D1CCIPR + LL_CLKSOURCE_REG(ClkSource)); #else - register uint32_t * pReg = (uint32_t *)((uint32_t)&RCC->CDCCIPR + LL_CLKSOURCE_REG(ClkSource)); + uint32_t * pReg = (uint32_t *)((uint32_t)&RCC->CDCCIPR + LL_CLKSOURCE_REG(ClkSource)); #endif /* */ MODIFY_REG(*pReg, LL_CLKSOURCE_MASK(ClkSource), LL_CLKSOURCE_CONFIG(ClkSource)); } @@ -2945,15 +3017,16 @@ __STATIC_INLINE void LL_RCC_SetLPTIMClockSource(uint32_t ClkSource) * @arg @ref LL_RCC_SAI1_CLKSOURCE_PLL3P * @arg @ref LL_RCC_SAI1_CLKSOURCE_I2S_CKIN * @arg @ref LL_RCC_SAI1_CLKSOURCE_CLKP - * @arg @ref LL_RCC_SAI23_CLKSOURCE_PLL1Q - * @arg @ref LL_RCC_SAI23_CLKSOURCE_PLL2P - * @arg @ref LL_RCC_SAI23_CLKSOURCE_PLL3P - * @arg @ref LL_RCC_SAI23_CLKSOURCE_I2S_CKIN - * @arg @ref LL_RCC_SAI23_CLKSOURCE_CLKP + * @arg @ref LL_RCC_SAI23_CLKSOURCE_PLL1Q (*) + * @arg @ref LL_RCC_SAI23_CLKSOURCE_PLL2P (*) + * @arg @ref LL_RCC_SAI23_CLKSOURCE_PLL3P (*) + * @arg @ref LL_RCC_SAI23_CLKSOURCE_I2S_CKIN (*) + * @arg @ref LL_RCC_SAI23_CLKSOURCE_CLKP (*) * @arg @ref LL_RCC_SAI4A_CLKSOURCE_PLL1Q (*) * @arg @ref LL_RCC_SAI4A_CLKSOURCE_PLL2P (*) * @arg @ref LL_RCC_SAI4A_CLKSOURCE_PLL3P (*) * @arg @ref LL_RCC_SAI4A_CLKSOURCE_I2S_CKIN (*) + * @arg @ref LL_RCC_SAI4A_CLKSOURCE_SPDIF (*) * @arg @ref LL_RCC_SAI2A_CLKSOURCE_PLL1Q (*) * @arg @ref LL_RCC_SAI2A_CLKSOURCE_PLL2P (*) * @arg @ref LL_RCC_SAI2A_CLKSOURCE_PLL3P (*) @@ -2965,6 +3038,7 @@ __STATIC_INLINE void LL_RCC_SetLPTIMClockSource(uint32_t ClkSource) * @arg @ref LL_RCC_SAI4B_CLKSOURCE_PLL3P (*) * @arg @ref LL_RCC_SAI4B_CLKSOURCE_I2S_CKIN (*) * @arg @ref LL_RCC_SAI4B_CLKSOURCE_CLKP (*) + * @arg @ref LL_RCC_SAI4B_CLKSOURCE_SPDIF (*) * @arg @ref LL_RCC_SAI2B_CLKSOURCE_PLL1Q (*) * @arg @ref LL_RCC_SAI2B_CLKSOURCE_PLL2P (*) * @arg @ref LL_RCC_SAI2B_CLKSOURCE_PLL3P (*) @@ -3079,9 +3153,9 @@ __STATIC_INLINE void LL_RCC_SetDSIClockSource(uint32_t ClkSource) __STATIC_INLINE void LL_RCC_SetDFSDMClockSource(uint32_t ClkSource) { #if defined(RCC_D2CCIP1R_DFSDM1SEL) - MODIFY_REG(RCC->D2CCIP1R, RCC_D2CCIP1R_DFSDM1SEL, ClkSource); + MODIFY_REG(RCC->D2CCIP1R, RCC_D2CCIP1R_DFSDM1SEL, ClkSource); #else - MODIFY_REG(RCC->CDCCIP1R, RCC_CDCCIP1R_DFSDM1SEL, ClkSource); + MODIFY_REG(RCC->CDCCIP1R, RCC_CDCCIP1R_DFSDM1SEL, ClkSource); #endif /* RCC_D2CCIP1R_DFSDM1SEL */ } @@ -3090,7 +3164,7 @@ __STATIC_INLINE void LL_RCC_SetDFSDMClockSource(uint32_t ClkSource) * @brief Configure DFSDMx Kernel clock source * @rmtoll SRDCCIPR DFSDM2SEL LL_RCC_SetDFSDM2ClockSource * @param ClkSource This parameter can be one of the following values: - * @arg @ref LL_RCC_DFSDM2_CLKSOURCE_PCLK2 + * @arg @ref LL_RCC_DFSDM2_CLKSOURCE_PCLK4 * @arg @ref LL_RCC_DFSDM2_CLKSOURCE_SYSCLK * @retval None */ @@ -3098,11 +3172,11 @@ __STATIC_INLINE void LL_RCC_SetDFSDM2ClockSource(uint32_t ClkSource) { MODIFY_REG(RCC->SRDCCIPR, RCC_SRDCCIPR_DFSDM2SEL, ClkSource); } -#endif /* DFSDM2 */ +#endif /* DFSDM2_BASE */ /** * @brief Configure FMCx Kernel clock source - * @rmtoll D1CCIPR / CDCCIPR FMCSEL LL_RCC_SetFMCClockSource + * @rmtoll D1CCIPR / CDCCIPR FMCSEL LL_RCC_SetFMCClockSource * @param ClkSource This parameter can be one of the following values: * @arg @ref LL_RCC_FMC_CLKSOURCE_HCLK * @arg @ref LL_RCC_FMC_CLKSOURCE_PLL1Q @@ -3149,7 +3223,11 @@ __STATIC_INLINE void LL_RCC_SetQSPIClockSource(uint32_t ClkSource) */ __STATIC_INLINE void LL_RCC_SetOSPIClockSource(uint32_t ClkSource) { +#if defined(RCC_D1CCIPR_OCTOSPISEL) + MODIFY_REG(RCC->D1CCIPR, RCC_D1CCIPR_OCTOSPISEL, ClkSource); +#else MODIFY_REG(RCC->CDCCIPR, RCC_CDCCIPR_OCTOSPISEL, ClkSource); +#endif /* RCC_D1CCIPR_OCTOSPISEL */ } #endif /* OCTOSPI1 || OCTOSPI2 */ @@ -3395,9 +3473,9 @@ __STATIC_INLINE void LL_RCC_SetADCClockSource(uint32_t ClkSource) __STATIC_INLINE uint32_t LL_RCC_GetClockSource(uint32_t Periph) { #if defined(RCC_D1CCIPR_FMCSEL) - register const uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&RCC->D1CCIPR) + LL_CLKSOURCE_REG(Periph))); + const uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&RCC->D1CCIPR) + LL_CLKSOURCE_REG(Periph))); #else - register const uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&RCC->CDCCIPR) + LL_CLKSOURCE_REG(Periph))); + const uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&RCC->CDCCIPR) + LL_CLKSOURCE_REG(Periph))); #endif /* RCC_D1CCIPR_FMCSEL */ return (uint32_t) (Periph | (((READ_BIT(*pReg, LL_CLKSOURCE_MASK(Periph))) >> LL_CLKSOURCE_SHIFT(Periph)) << LL_RCC_CONFIG_SHIFT) ); } @@ -3478,7 +3556,7 @@ __STATIC_INLINE uint32_t LL_RCC_GetI2CClockSource(uint32_t Periph) * @rmtoll D2CCIP2R / CDCCIP2R LPTIM1SEL LL_RCC_GetLPTIMClockSource\n * D3CCIPR / SRDCCIPR LPTIM2SEL LL_RCC_GetLPTIMClockSource\n * D3CCIPR / SRDCCIPR LPTIM345SEL LL_RCC_GetLPTIMClockSource - * @param Perihp This parameter can be one of the following values: + * @param Periph This parameter can be one of the following values: * @arg @ref LL_RCC_LPTIM1_CLKSOURCE * @arg @ref LL_RCC_LPTIM2_CLKSOURCE * @arg @ref LL_RCC_LPTIM345_CLKSOURCE @@ -3515,10 +3593,12 @@ __STATIC_INLINE uint32_t LL_RCC_GetLPTIMClockSource(uint32_t Periph) * D3CCIPR / SRDCCIPR SAI4ASEL LL_RCC_GetSAIClockSource\n * D3CCIPR / SRDCCIPR SAI4BSEL LL_RCC_GetSAIClockSource * @param Periph This parameter can be one of the following values: - * @arg @ref LL_RCC_SAI1_CLKSOURCE - * @arg @ref LL_RCC_SAI23_CLKSOURCE - * @arg @ref LL_RCC_SAI4A_CLKSOURCE - * @arg @ref LL_RCC_SAI4B_CLKSOURCE + * @arg @ref LL_RCC_SAI1_CLKSOURCE (*) + * @arg @ref LL_RCC_SAI2A_CLKSOURCE (*) + * @arg @ref LL_RCC_SAI2B_CLKSOURCE (*) + * @arg @ref LL_RCC_SAI23_CLKSOURCE (*) + * @arg @ref LL_RCC_SAI4A_CLKSOURCE (*) + * @arg @ref LL_RCC_SAI4B_CLKSOURCE (*) * @retval Returned value can be one of the following values: * @arg @ref LL_RCC_SAI1_CLKSOURCE_PLL1Q * @arg @ref LL_RCC_SAI1_CLKSOURCE_PLL2P @@ -3552,7 +3632,7 @@ __STATIC_INLINE uint32_t LL_RCC_GetLPTIMClockSource(uint32_t Periph) * @arg @ref LL_RCC_SAI4B_CLKSOURCE_PLL3P (*) * @arg @ref LL_RCC_SAI4B_CLKSOURCE_I2S_CKIN (*) * @arg @ref LL_RCC_SAI4B_CLKSOURCE_CLKP (*) - * + * * (*) value not defined in all devices. */ __STATIC_INLINE uint32_t LL_RCC_GetSAIClockSource(uint32_t Periph) @@ -3718,7 +3798,7 @@ __STATIC_INLINE uint32_t LL_RCC_GetFMCClockSource(uint32_t Periph) #if defined(QUADSPI) /** * @brief Get QSPI Kernel clock source - * @rmtoll D1CCIPR / CDCCIPR QSPISEL LL_RCC_GetQSPIClockSource + * @rmtoll D1CCIPR / CDCCIPR QSPISEL LL_RCC_GetQSPIClockSource * @param Periph This parameter can be one of the following values: * @arg @ref LL_RCC_QSPI_CLKSOURCE * @retval Returned value can be one of the following values: @@ -3749,13 +3829,17 @@ __STATIC_INLINE uint32_t LL_RCC_GetQSPIClockSource(uint32_t Periph) __STATIC_INLINE uint32_t LL_RCC_GetOSPIClockSource(uint32_t Periph) { UNUSED(Periph); +#if defined(RCC_D1CCIPR_OCTOSPISEL) + return (uint32_t)(READ_BIT(RCC->D1CCIPR, RCC_D1CCIPR_OCTOSPISEL)); +#else return (uint32_t)(READ_BIT(RCC->CDCCIPR, RCC_CDCCIPR_OCTOSPISEL)); +#endif /* RCC_D1CCIPR_OCTOSPISEL */ } #endif /* defined(OCTOSPI1) || defined(OCTOSPI2) */ /** * @brief Get CLKP Kernel clock source - * @rmtoll D1CCIPR / CDCCIPR CKPERSEL LL_RCC_GetCLKPClockSource + * @rmtoll D1CCIPR / CDCCIPR CKPERSEL LL_RCC_GetCLKPClockSource * @param Periph This parameter can be one of the following values: * @arg @ref LL_RCC_CLKP_CLKSOURCE * @retval Returned value can be one of the following values: @@ -6280,7 +6364,7 @@ uint32_t LL_RCC_GetUSBClockFreq(uint32_t USBxSource); uint32_t LL_RCC_GetDFSDMClockFreq(uint32_t DFSDMxSource); #if defined(DFSDM2_BASE) uint32_t LL_RCC_GetDFSDM2ClockFreq(uint32_t DFSDMxSource); -#endif /* DFSDM2 */ +#endif /* DFSDM2_BASE */ #if defined(DSI) uint32_t LL_RCC_GetDSIClockFreq(uint32_t DSIxSource); #endif /* DSI */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_rng.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_rng.h index 3f25df0..ab89a18 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_rng.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_rng.h @@ -614,7 +614,7 @@ __STATIC_INLINE uint32_t LL_RNG_ReadRandData32(RNG_TypeDef *RNGx) * @} */ -#if defined (RNG_VER_3_1) +#if defined(RNG_VER_3_2) || defined(RNG_VER_3_1) || defined(RNG_VER_3_0) /** @defgroup RNG_LL_EF_Health_Test_Control Health Test Control * @{ */ @@ -645,7 +645,7 @@ __STATIC_INLINE uint32_t LL_RNG_GetHealthConfig(RNG_TypeDef *RNGx) /** * @} */ -#endif /*RNG_VER_3_1*/ +#endif /*End of RNG_VER_3_2, RNG_VER_3_1 or RNG_VER_3_0*/ #if defined(USE_FULL_LL_DRIVER) /** @defgroup RNG_LL_EF_Init Initialization and de-initialization functions * @{ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_rtc.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_rtc.h index e9b866a..230b1e3 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_rtc.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_rtc.h @@ -456,10 +456,10 @@ typedef struct * @} */ -#if defined(TAMP_CR1_TAMP1E) /** @defgroup RTC_LL_EC_TAMPER TAMPER * @{ */ +#if defined(TAMP_CR1_TAMP1E) #define LL_RTC_TAMPER_1 TAMP_CR1_TAMP1E /*!< Tamper 1 input detection */ #endif /* TAMP_CR1_TAMP1E */ #if defined(TAMP_CR1_TAMP2E) @@ -472,10 +472,10 @@ typedef struct * @} */ -#if defined(TAMP_CR1_TAMP1E) /** @defgroup RTC_LL_EC_TAMPER_MASK TAMPER MASK * @{ */ +#if defined(TAMP_CR1_TAMP1E) #define LL_RTC_TAMPER_MASK_TAMPER1 TAMP_CR2_TAMP1MSK /*!< Tamper 1 event generates a trigger event. TAMP1F is masked and internally cleared by hardware. The backup registers are not erased */ #endif /* TAMP_CR1_TAMP1E */ #if defined(TAMP_CR1_TAMP2E) @@ -488,10 +488,10 @@ typedef struct * @} */ -#if defined(TAMP_CR1_TAMP1E) /** @defgroup RTC_LL_EC_TAMPER_NOERASE TAMPER NO ERASE * @{ */ +#if defined(TAMP_CR1_TAMP1E) #define LL_RTC_TAMPER_NOERASE_TAMPER1 TAMP_CR2_TAMP1NOERASE /*!< Tamper 1 event does not erase the backup registers. */ #endif /* TAMP_CR1_TAMP1E */ #if defined(TAMP_CR1_TAMP2E) @@ -547,10 +547,10 @@ typedef struct */ #endif /* TAMP_FLTCR_TAMPFREQ */ -#if defined(TAMP_CR1_TAMP1E) /** @defgroup RTC_LL_EC_TAMPER_ACTIVELEVEL TAMPER ACTIVE LEVEL * @{ */ +#if defined(TAMP_CR1_TAMP1E) #define LL_RTC_TAMPER_ACTIVELEVEL_TAMP1 TAMP_CR2_TAMP1TRG /*!< Tamper 1 input falling edge (if TAMPFLT = 00) or staying high (if TAMPFLT != 00) triggers a tamper detection event */ #endif /* TAMP_CR1_TAMP1E */ #if defined(TAMP_CR1_TAMP2E) @@ -563,10 +563,10 @@ typedef struct * @} */ -#if defined (RTC_TAMPCR_TAMP1E) /** @defgroup RTC_LL_EC_TAMPER TAMPER * @{ */ +#if defined (RTC_TAMPCR_TAMP1E) #define LL_RTC_TAMPER_1 RTC_TAMPCR_TAMP1E /*!< RTC_TAMP1 input detection */ #endif /* RTC_TAMPCR_TAMP1E */ #if defined (RTC_TAMPCR_TAMP2E) @@ -579,10 +579,10 @@ typedef struct * @} */ -#if defined (RTC_TAMPCR_TAMP1E) /** @defgroup RTC_LL_EC_TAMPER_MASK TAMPER MASK * @{ */ +#if defined (RTC_TAMPCR_TAMP1E) #define LL_RTC_TAMPER_MASK_TAMPER1 RTC_TAMPCR_TAMP1MF /*!< Tamper 1 event generates a trigger event. TAMP1F is masked and internally cleared by hardware.The backup registers are not erased */ #endif /* RTC_TAMPCR_TAMP1E */ #if defined (RTC_TAMPCR_TAMP2E) @@ -595,10 +595,10 @@ typedef struct * @} */ -#if defined (RTC_TAMPCR_TAMP1E) /** @defgroup RTC_LL_EC_TAMPER_NOERASE TAMPER NO ERASE * @{ */ +#if defined (RTC_TAMPCR_TAMP1E) #define LL_RTC_TAMPER_NOERASE_TAMPER1 RTC_TAMPCR_TAMP1NOERASE /*!< Tamper 1 event does not erase the backup registers. */ #endif /* RTC_TAMPCR_TAMP1E */ #if defined (RTC_TAMPCR_TAMP2E) @@ -654,10 +654,10 @@ typedef struct */ #endif /* RTC_TAMPCR_TAMPFREQ */ -#if defined (RTC_TAMPCR_TAMP1E) /** @defgroup RTC_LL_EC_TAMPER_ACTIVELEVEL TAMPER ACTIVE LEVEL * @{ */ +#if defined (RTC_TAMPCR_TAMP1E) #define LL_RTC_TAMPER_ACTIVELEVEL_TAMP1 RTC_TAMPCR_TAMP1TRG /*!< RTC_TAMP1 input falling edge (if TAMPFLT = 00) or staying high (if TAMPFLT != 00) triggers a tamper detection event*/ #endif /* RTC_TAMPCR_TAMP1E */ #if defined (RTC_TAMPCR_TAMP2E) @@ -670,10 +670,10 @@ typedef struct * @} */ -#if defined(TAMP_ATCR1_TAMP1AM) /** @defgroup RTC_LL_EC_ACTIVE_MODE ACTIVE TAMPER MODE * @{ */ +#if defined(TAMP_ATCR1_TAMP1AM) #define LL_RTC_TAMPER_ATAMP_TAMP1AM TAMP_ATCR1_TAMP1AM /*!< tamper 1 is active */ #endif /* TAMP_ATCR1_TAMP1AM */ #if defined(TAMP_ATCR1_TAMP2AM) @@ -703,10 +703,10 @@ typedef struct */ #endif /* TAMP_ATCR1_ATCKSEL */ -#if defined(TAMP_ATCR1_TAMP1AM) /** @defgroup RTC_LL_EC_ACTIVE_OUTPUT_SELECTION ACTIVE TAMPER OUTPUT SELECTION * @{ */ +#if defined(TAMP_ATCR1_TAMP1AM) #define LL_RTC_TAMPER_ATAMP1IN_ATAMP1OUT (0UL << TAMP_ATCR2_ATOSEL1_Pos) #define LL_RTC_TAMPER_ATAMP1IN_ATAMP2OUT (1UL << TAMP_ATCR2_ATOSEL1_Pos) #define LL_RTC_TAMPER_ATAMP1IN_ATAMP3OUT (2UL << TAMP_ATCR2_ATOSEL1_Pos) @@ -1601,7 +1601,7 @@ __STATIC_INLINE uint32_t LL_RTC_TIME_GetSecond(RTC_TypeDef *RTCx) */ __STATIC_INLINE void LL_RTC_TIME_Config(RTC_TypeDef *RTCx, uint32_t Format12_24, uint32_t Hours, uint32_t Minutes, uint32_t Seconds) { - register uint32_t temp; + uint32_t temp; temp = Format12_24 | \ (((Hours & 0xF0U) << (RTC_TR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_TR_HU_Pos)) | \ @@ -1629,7 +1629,7 @@ __STATIC_INLINE void LL_RTC_TIME_Config(RTC_TypeDef *RTCx, uint32_t Format12_24, */ __STATIC_INLINE uint32_t LL_RTC_TIME_Get(RTC_TypeDef *RTCx) { - register uint32_t temp; + uint32_t temp; temp = READ_BIT(RTCx->TR, (RTC_TR_HT | RTC_TR_HU | RTC_TR_MNT | RTC_TR_MNU | RTC_TR_ST | RTC_TR_SU)); return (uint32_t)((((((temp & RTC_TR_HT) >> RTC_TR_HT_Pos) << 4U) | ((temp & RTC_TR_HU) >> RTC_TR_HU_Pos)) << RTC_OFFSET_HOUR) | \ @@ -1931,7 +1931,7 @@ __STATIC_INLINE uint32_t LL_RTC_DATE_GetDay(RTC_TypeDef *RTCx) */ __STATIC_INLINE void LL_RTC_DATE_Config(RTC_TypeDef *RTCx, uint32_t WeekDay, uint32_t Day, uint32_t Month, uint32_t Year) { - register uint32_t temp; + uint32_t temp; temp = (WeekDay << RTC_DR_WDU_Pos) | \ (((Year & 0xF0U) << (RTC_DR_YT_Pos - 4U)) | ((Year & 0x0FU) << RTC_DR_YU_Pos)) | \ @@ -1959,7 +1959,7 @@ __STATIC_INLINE void LL_RTC_DATE_Config(RTC_TypeDef *RTCx, uint32_t WeekDay, uin */ __STATIC_INLINE uint32_t LL_RTC_DATE_Get(RTC_TypeDef *RTCx) { - register uint32_t temp; + uint32_t temp; temp = READ_BIT(RTCx->DR, (RTC_DR_WDU | RTC_DR_MT | RTC_DR_MU | RTC_DR_DT | RTC_DR_DU | RTC_DR_YT | RTC_DR_YU)); return (uint32_t)((((temp & RTC_DR_WDU) >> RTC_DR_WDU_Pos) << RTC_OFFSET_WEEKDAY) | \ @@ -2259,7 +2259,7 @@ __STATIC_INLINE uint32_t LL_RTC_ALMA_GetSecond(RTC_TypeDef *RTCx) */ __STATIC_INLINE void LL_RTC_ALMA_ConfigTime(RTC_TypeDef *RTCx, uint32_t Format12_24, uint32_t Hours, uint32_t Minutes, uint32_t Seconds) { - register uint32_t temp; + uint32_t temp; temp = Format12_24 | (((Hours & 0xF0U) << (RTC_ALRMAR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_ALRMAR_HU_Pos)) | \ (((Minutes & 0xF0U) << (RTC_ALRMAR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_ALRMAR_MNU_Pos)) | \ @@ -2625,7 +2625,7 @@ __STATIC_INLINE uint32_t LL_RTC_ALMB_GetSecond(RTC_TypeDef *RTCx) */ __STATIC_INLINE void LL_RTC_ALMB_ConfigTime(RTC_TypeDef *RTCx, uint32_t Format12_24, uint32_t Hours, uint32_t Minutes, uint32_t Seconds) { - register uint32_t temp; + uint32_t temp; temp = Format12_24 | (((Hours & 0xF0U) << (RTC_ALRMBR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_ALRMBR_HU_Pos)) | \ (((Minutes & 0xF0U) << (RTC_ALRMBR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_ALRMBR_MNU_Pos)) | \ @@ -3716,7 +3716,7 @@ __STATIC_INLINE uint32_t LL_RTC_WAKEUP_GetAutoReload(RTC_TypeDef *RTCx) */ __STATIC_INLINE void LL_RTC_BAK_SetRegister(RTC_TypeDef *RTCx, uint32_t BackupRegister, uint32_t Data) { - register uint32_t tmp; + uint32_t tmp; tmp = (uint32_t)(&(RTCx->BKP0R)); tmp += (BackupRegister * 4U); @@ -3766,7 +3766,7 @@ __STATIC_INLINE void LL_RTC_BAK_SetRegister(RTC_TypeDef *RTCx, uint32_t BackupRe */ __STATIC_INLINE uint32_t LL_RTC_BAK_GetRegister(RTC_TypeDef *RTCx, uint32_t BackupRegister) { - register uint32_t tmp; + uint32_t tmp; tmp = (uint32_t)(&(RTCx->BKP0R)); tmp += (BackupRegister * 4U); @@ -3819,7 +3819,7 @@ __STATIC_INLINE uint32_t LL_RTC_BAK_GetRegister(RTC_TypeDef *RTCx, uint32_t Back */ __STATIC_INLINE void LL_RTC_BKP_SetRegister(TAMP_TypeDef *TAMPx, uint32_t BackupRegister, uint32_t Data) { - register uint32_t tmp = 0U; + uint32_t tmp = 0U; tmp = (uint32_t)(&(TAMPx->BKP0R)); tmp += (BackupRegister * 4U); @@ -3869,7 +3869,7 @@ __STATIC_INLINE void LL_RTC_BKP_SetRegister(TAMP_TypeDef *TAMPx, uint32_t Backup */ __STATIC_INLINE uint32_t LL_RTC_BKP_GetRegister(TAMP_TypeDef *TAMPx, uint32_t BackupRegister) { - register uint32_t tmp = 0U; + uint32_t tmp = 0U; tmp = (uint32_t)(&(TAMPx->BKP0R)); tmp += (BackupRegister * 4U); diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_sdmmc.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_sdmmc.h index 51ec6e9..b29aa28 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_sdmmc.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_sdmmc.h @@ -1051,7 +1051,7 @@ uint32_t SDMMC_CmdEraseStartAdd(SDMMC_TypeDef *SDMMCx, uint32_t StartAdd); uint32_t SDMMC_CmdSDEraseStartAdd(SDMMC_TypeDef *SDMMCx, uint32_t StartAdd); uint32_t SDMMC_CmdEraseEndAdd(SDMMC_TypeDef *SDMMCx, uint32_t EndAdd); uint32_t SDMMC_CmdSDEraseEndAdd(SDMMC_TypeDef *SDMMCx, uint32_t EndAdd); -uint32_t SDMMC_CmdErase(SDMMC_TypeDef *SDMMCx); +uint32_t SDMMC_CmdErase(SDMMC_TypeDef *SDMMCx, uint32_t EraseType); uint32_t SDMMC_CmdStopTransfer(SDMMC_TypeDef *SDMMCx); uint32_t SDMMC_CmdSelDesel(SDMMC_TypeDef *SDMMCx, uint64_t Addr); uint32_t SDMMC_CmdGoIdleState(SDMMC_TypeDef *SDMMCx); @@ -1074,6 +1074,7 @@ uint32_t SDMMC_CmdSendEXTCSD(SDMMC_TypeDef *SDMMCx, uint32_t Argument); * @} */ + /** * @} */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_spi.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_spi.h index f050b17..e611b58 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_spi.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_spi.h @@ -1285,8 +1285,8 @@ __STATIC_INLINE void LL_SPI_SetTransferDirection(SPI_TypeDef *SPIx, uint32_t Tra */ __STATIC_INLINE uint32_t LL_SPI_GetTransferDirection(SPI_TypeDef *SPIx) { - register uint32_t Hddir = READ_BIT(SPIx->CR1, SPI_CR1_HDDIR); - register uint32_t Comm = READ_BIT(SPIx->CFG2, SPI_CFG2_COMM); + uint32_t Hddir = READ_BIT(SPIx->CR1, SPI_CR1_HDDIR); + uint32_t Comm = READ_BIT(SPIx->CFG2, SPI_CFG2_COMM); return (Hddir | Comm); } diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_system.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_system.h index cd80788..df3fe3b 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_system.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_system.h @@ -105,6 +105,9 @@ extern "C" { #define LL_SYSCFG_I2C_FASTMODEPLUS_I2C2 SYSCFG_PMCR_I2C2_FMP /*!< Enable Fast Mode Plus for I2C2 */ #define LL_SYSCFG_I2C_FASTMODEPLUS_I2C3 SYSCFG_PMCR_I2C3_FMP /*!< Enable Fast Mode Plus for I2C3 */ #define LL_SYSCFG_I2C_FASTMODEPLUS_I2C4 SYSCFG_PMCR_I2C4_FMP /*!< Enable Fast Mode Plus for I2C4 */ +#if defined(I2C5) +#define LL_SYSCFG_I2C_FASTMODEPLUS_I2C5 SYSCFG_PMCR_I2C5_FMP /*!< Enable Fast Mode Plus for I2C5 */ +#endif /*I2C5*/ #define LL_SYSCFG_I2C_FASTMODEPLUS_PB6 SYSCFG_PMCR_I2C_PB6_FMP /*!< Enable Fast Mode Plus on PB6 */ #define LL_SYSCFG_I2C_FASTMODEPLUS_PB7 SYSCFG_PMCR_I2C_PB7_FMP /*!< Enable Fast Mode Plus on PB7 */ #define LL_SYSCFG_I2C_FASTMODEPLUS_PB8 SYSCFG_PMCR_I2C_PB8_FMP /*!< Enable Fast Mode Plus on PB8 */ @@ -116,7 +119,9 @@ extern "C" { /** @defgroup SYSTEM_LL_EC_ANALOG_SWITCH Analog Switch control * @{ */ +#if defined(SYSCFG_PMCR_BOOSTEN) #define LL_SYSCFG_ANALOG_SWITCH_BOOSTEN SYSCFG_PMCR_BOOSTEN /*!< I/O analog switch voltage booster enable */ +#endif /*SYSCFG_PMCR_BOOSTEN*/ #define LL_SYSCFG_ANALOG_SWITCH_PA0 SYSCFG_PMCR_PA0SO /*!< PA0 Switch Open */ #define LL_SYSCFG_ANALOG_SWITCH_PA1 SYSCFG_PMCR_PA1SO /*!< PA1 Switch Open */ #define LL_SYSCFG_ANALOG_SWITCH_PC2 SYSCFG_PMCR_PC2SO /*!< PC2 Switch Open */ @@ -147,7 +152,9 @@ extern "C" { #define LL_SYSCFG_EXTI_PORTF 5U /*!< EXTI PORT F */ #define LL_SYSCFG_EXTI_PORTG 6U /*!< EXTI PORT G */ #define LL_SYSCFG_EXTI_PORTH 7U /*!< EXTI PORT H */ +#if defined(GPIOI) #define LL_SYSCFG_EXTI_PORTI 8U /*!< EXTI PORT I */ +#endif /*GPIOI*/ #define LL_SYSCFG_EXTI_PORTJ 9U /*!< EXTI PORT J */ #define LL_SYSCFG_EXTI_PORTK 10U /*!< EXTI PORT k */ /** @@ -195,8 +202,10 @@ extern "C" { #define LL_SYSCFG_TIMBREAK_SRAM2_DBL_ECC SYSCFG_CFGR_SRAM2L /*!< Enables and locks the SRAM2 double ECC error signal with Break Input of TIM1/8/15/16/17 and HRTIM */ +#if defined(SYSCFG_CFGR_SRAM3L) #define LL_SYSCFG_TIMBREAK_SRAM3_DBL_ECC SYSCFG_CFGR_SRAM3L /*!< Enables and locks the SRAM3 double ECC error signal with Break Input of TIM1/8/15/16/17 and HRTIM */ +#endif /*SYSCFG_CFGR_SRAM3L*/ #define LL_SYSCFG_TIMBREAK_SRAM4_DBL_ECC SYSCFG_CFGR_SRAM4L /*!< Enables and locks the SRAM4 double ECC error signal with Break Input of TIM1/8/15/16/17 and HRTIM */ @@ -260,19 +269,45 @@ extern "C" { /** * @} */ -#ifdef SYSCFG_PKGR_PKG +#ifdef SYSCFG_UR17_TCM_AXI_CFG /** @defgroup SYSTEM_LL_PACKAGE SYSCFG device package * @{ */ +#define LL_SYSCFG_ITCM_AXI_64KB_320KB 0U +#define LL_SYSCFG_ITCM_AXI_128KB_256KB 1U +#define LL_SYSCFG_ITCM_AXI_192KB_192KB 2U +#define LL_SYSCFG_ITCM_AXI_256KB_128KB 3U +/** + * @} + */ +#endif /* #ifdef SYSCFG_UR17_TCM_AXI_CFG */ +#if defined(SYSCFG_PKGR_PKG) +/** @defgroup SYSTEM_LL_PACKAGE SYSCFG device package + * @{ + */ +#if (STM32H7_DEV_ID == 0x450UL) #define LL_SYSCFG_LQFP100_PACKAGE 0U #define LL_SYSCFG_TQFP144_PACKAGE 2U #define LL_SYSCFG_TQFP176_UFBGA176_PACKAGE 5U #define LL_SYSCFG_LQFP208_TFBGA240_PACKAGE 8U +#elif (STM32H7_DEV_ID == 0x483UL) +#define LL_SYSCFG_VFQFPN68_INDUS_PACKAGE 0U +#define LL_SYSCFG_TFBGA100_LQFP100_PACKAGE 1U +#define LL_SYSCFG_LQFP100_INDUS_PACKAGE 2U +#define LL_SYSCFG_TFBGA100_INDUS_PACKAGE 3U +#define LL_SYSCFG_WLCSP115_INDUS_PACKAGE 4U +#define LL_SYSCFG_LQFP144_PACKAGE 5U +#define LL_SYSCFG_UFBGA144_PACKAGE 6U +#define LL_SYSCFG_LQFP144_INDUS_PACKAGE 7U +#define LL_SYSCFG_UFBGA169_INDUS_PACKAGE 8U +#define LL_SYSCFG_UFBGA176PLUS25_INDUS_PACKAGE 9U +#define LL_SYSCFG_LQFP176_INDUS_PACKAGE 10U +#endif /* STM32H7_DEV_ID == 0x450UL */ /** * @} */ #endif /* SYSCFG_PKGR_PKG */ - + /** @defgroup SYSTEM_LL_SYSCFG_BOR SYSCFG Brownout Reset Threshold Level * @{ */ @@ -313,14 +348,26 @@ extern "C" { #define LL_DBGMCU_APB1_GRP1_I2C1_STOP DBGMCU_APB1LFZ1_DBG_I2C1 /*!< I2C1 SMBUS timeout mode stopped when Core is halted */ #define LL_DBGMCU_APB1_GRP1_I2C2_STOP DBGMCU_APB1LFZ1_DBG_I2C2 /*!< I2C2 SMBUS timeout mode stopped when Core is halted */ #define LL_DBGMCU_APB1_GRP1_I2C3_STOP DBGMCU_APB1LFZ1_DBG_I2C3 /*!< I2C3 SMBUS timeout mode stopped when Core is halted */ +#if defined(I2C5) +#define LL_DBGMCU_APB1_GRP1_I2C5_STOP DBGMCU_APB1LFZ1_DBG_I2C5 /*!< I2C5 SMBUS timeout mode stopped when Core is halted */ +#endif /*I2C5*/ /** * @} */ + /** @defgroup SYSTEM_LL_EC_APB1_GRP2_STOP_IP DBGMCU APB1 GRP2 STOP IP * @{ */ +#if defined(DBGMCU_APB1HFZ1_DBG_FDCAN) #define LL_DBGMCU_APB1_GRP2_FDCAN_STOP DBGMCU_APB1HFZ1_DBG_FDCAN /*!< FDCAN is frozen while the core is in debug mode */ +#endif /*DBGMCU_APB1HFZ1_DBG_FDCAN*/ +#if defined(TIM23) +#define LL_DBGMCU_APB1_GRP2_TIM23_STOP DBGMCU_APB1HFZ1_DBG_TIM23 /*!< TIM23 is frozen while the core is in debug mode */ +#endif /*TIM23*/ +#if defined(TIM24) +#define LL_DBGMCU_APB1_GRP2_TIM24_STOP DBGMCU_APB1HFZ1_DBG_TIM24 /*!< TIM24 is frozen while the core is in debug mode */ +#endif /*TIM24*/ /** * @} */ @@ -333,7 +380,9 @@ extern "C" { #define LL_DBGMCU_APB2_GRP1_TIM15_STOP DBGMCU_APB2FZ1_DBG_TIM15 /*!< TIM15 counter stopped when core is halted */ #define LL_DBGMCU_APB2_GRP1_TIM16_STOP DBGMCU_APB2FZ1_DBG_TIM16 /*!< TIM16 counter stopped when core is halted */ #define LL_DBGMCU_APB2_GRP1_TIM17_STOP DBGMCU_APB2FZ1_DBG_TIM17 /*!< TIM17 counter stopped when core is halted */ +#if defined(HRTIM1) #define LL_DBGMCU_APB2_GRP1_HRTIM_STOP DBGMCU_APB2FZ1_DBG_HRTIM /*!< HRTIM counter stopped when core is halted */ +#endif /*HRTIM1*/ /** * @} */ @@ -493,6 +542,7 @@ __STATIC_INLINE void LL_SYSCFG_DisableAnalogBooster(void) * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_I2C2 (*) * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_I2C3 * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_I2C4(*) + * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_I2C5(*) * * (*) value not defined in all devices * @retval None @@ -515,6 +565,8 @@ __STATIC_INLINE void LL_SYSCFG_EnableFastModePlus(uint32_t ConfigFastModePlus) * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_I2C2 (*) * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_I2C3 * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_I2C4 + * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_I2C5 (*) + * * (*) value not defined in all devices * @retval None */ @@ -538,7 +590,7 @@ __STATIC_INLINE void LL_SYSCFG_DisableFastModePlus(uint32_t ConfigFastModePlus) * @arg @ref LL_SYSCFG_EXTI_PORTF * @arg @ref LL_SYSCFG_EXTI_PORTG * @arg @ref LL_SYSCFG_EXTI_PORTH - * @arg @ref LL_SYSCFG_EXTI_PORTI + * @arg @ref LL_SYSCFG_EXTI_PORTI (*) * @arg @ref LL_SYSCFG_EXTI_PORTJ * @arg @ref LL_SYSCFG_EXTI_PORTK * @@ -599,7 +651,7 @@ __STATIC_INLINE void LL_SYSCFG_SetEXTISource(uint32_t Port, uint32_t Line) * @arg @ref LL_SYSCFG_EXTI_PORTF * @arg @ref LL_SYSCFG_EXTI_PORTG * @arg @ref LL_SYSCFG_EXTI_PORTH - * @arg @ref LL_SYSCFG_EXTI_PORTI + * @arg @ref LL_SYSCFG_EXTI_PORTI (*) * @arg @ref LL_SYSCFG_EXTI_PORTJ * @arg @ref LL_SYSCFG_EXTI_PORTK * (*) value not defined in all devices @@ -630,7 +682,7 @@ __STATIC_INLINE uint32_t LL_SYSCFG_GetEXTISource(uint32_t Line) * @arg @ref LL_SYSCFG_TIMBREAK_DTCM_DBL_ECC * @arg @ref LL_SYSCFG_TIMBREAK_SRAM1_DBL_ECC * @arg @ref LL_SYSCFG_TIMBREAK_SRAM2_DBL_ECC - * @arg @ref LL_SYSCFG_TIMBREAK_SRAM3_DBL_ECC + * @arg @ref LL_SYSCFG_TIMBREAK_SRAM3_DBL_ECC (*) * @arg @ref LL_SYSCFG_TIMBREAK_SRAM4_DBL_ECC * @arg @ref LL_SYSCFG_TIMBREAK_BKRAM_DBL_ECC * @arg @ref LL_SYSCFG_TIMBREAK_CM7_LOCKUP @@ -638,6 +690,7 @@ __STATIC_INLINE uint32_t LL_SYSCFG_GetEXTISource(uint32_t Line) * @arg @ref LL_SYSCFG_TIMBREAK_PVD * @arg @ref LL_SYSCFG_TIMBREAK_CM4_LOCKUP (available for dual core lines only) * @retval None + * (*) value not defined in all devices */ __STATIC_INLINE void LL_SYSCFG_SetTIMBreakInputs(uint32_t Break) { @@ -645,10 +698,14 @@ __STATIC_INLINE void LL_SYSCFG_SetTIMBreakInputs(uint32_t Break) MODIFY_REG(SYSCFG->CFGR, SYSCFG_CFGR_AXISRAML | SYSCFG_CFGR_ITCML | SYSCFG_CFGR_DTCML | SYSCFG_CFGR_SRAM1L | SYSCFG_CFGR_SRAM2L | \ SYSCFG_CFGR_SRAM3L | SYSCFG_CFGR_SRAM4L | SYSCFG_CFGR_BKRAML | SYSCFG_CFGR_CM7L | SYSCFG_CFGR_FLASHL | \ SYSCFG_CFGR_PVDL | SYSCFG_CFGR_CM4L, Break); -#elif defined (SYSCFG_CFGR_AXISRAML) +#elif defined(SYSCFG_CFGR_AXISRAML) && defined(SYSCFG_CFGR_SRAM3L) MODIFY_REG(SYSCFG->CFGR, SYSCFG_CFGR_AXISRAML | SYSCFG_CFGR_ITCML | SYSCFG_CFGR_DTCML | SYSCFG_CFGR_SRAM1L | SYSCFG_CFGR_SRAM2L | \ SYSCFG_CFGR_SRAM3L | SYSCFG_CFGR_SRAM4L | SYSCFG_CFGR_BKRAML | SYSCFG_CFGR_CM7L | SYSCFG_CFGR_FLASHL | \ SYSCFG_CFGR_PVDL, Break); +#elif defined(SYSCFG_CFGR_AXISRAML) + MODIFY_REG(SYSCFG->CFGR, SYSCFG_CFGR_AXISRAML | SYSCFG_CFGR_ITCML | SYSCFG_CFGR_DTCML | SYSCFG_CFGR_SRAM1L | SYSCFG_CFGR_SRAM2L | \ + SYSCFG_CFGR_SRAM4L | SYSCFG_CFGR_BKRAML | SYSCFG_CFGR_CM7L | SYSCFG_CFGR_FLASHL | SYSCFG_CFGR_PVDL,\ + Break); #else MODIFY_REG(SYSCFG->CFGR, SYSCFG_CFGR_ITCML | SYSCFG_CFGR_DTCML |\ SYSCFG_CFGR_CM7L | SYSCFG_CFGR_FLASHL | \ @@ -677,13 +734,14 @@ __STATIC_INLINE void LL_SYSCFG_SetTIMBreakInputs(uint32_t Break) * @arg @ref LL_SYSCFG_TIMBREAK_DTCM_DBL_ECC * @arg @ref LL_SYSCFG_TIMBREAK_SRAM1_DBL_ECC * @arg @ref LL_SYSCFG_TIMBREAK_SRAM2_DBL_ECC - * @arg @ref LL_SYSCFG_TIMBREAK_SRAM3_DBL_ECC + * @arg @ref LL_SYSCFG_TIMBREAK_SRAM3_DBL_ECC (*) * @arg @ref LL_SYSCFG_TIMBREAK_SRAM4_DBL_ECC * @arg @ref LL_SYSCFG_TIMBREAK_BKRAM_DBL_ECC * @arg @ref LL_SYSCFG_TIMBREAK_CM7_LOCKUP * @arg @ref LL_SYSCFG_TIMBREAK_FLASH_DBL_ECC * @arg @ref LL_SYSCFG_TIMBREAK_PVD * @arg @ref LL_SYSCFG_TIMBREAK_CM4_LOCKUP (available for dual core lines only) + * (*) value not defined in all devices */ __STATIC_INLINE uint32_t LL_SYSCFG_GetTIMBreakInputs(void) { @@ -692,11 +750,16 @@ __STATIC_INLINE uint32_t LL_SYSCFG_GetTIMBreakInputs(void) SYSCFG_CFGR_SRAM1L | SYSCFG_CFGR_SRAM2L | SYSCFG_CFGR_SRAM3L | \ SYSCFG_CFGR_SRAM4L | SYSCFG_CFGR_BKRAML | SYSCFG_CFGR_CM7L | \ SYSCFG_CFGR_FLASHL | SYSCFG_CFGR_PVDL | SYSCFG_CFGR_CM4L)); -#elif defined (SYSCFG_CFGR_AXISRAML) +#elif defined (SYSCFG_CFGR_AXISRAML) && defined(SYSCFG_CFGR_SRAM3L) return (uint32_t)(READ_BIT(SYSCFG->CFGR, SYSCFG_CFGR_AXISRAML | SYSCFG_CFGR_ITCML | SYSCFG_CFGR_DTCML | \ SYSCFG_CFGR_SRAM1L | SYSCFG_CFGR_SRAM2L | SYSCFG_CFGR_SRAM3L | \ SYSCFG_CFGR_SRAM4L | SYSCFG_CFGR_BKRAML | SYSCFG_CFGR_CM7L | \ SYSCFG_CFGR_FLASHL | SYSCFG_CFGR_PVDL )); +#elif defined (SYSCFG_CFGR_AXISRAML) + return (uint32_t)(READ_BIT(SYSCFG->CFGR, SYSCFG_CFGR_AXISRAML | SYSCFG_CFGR_ITCML | SYSCFG_CFGR_DTCML | \ + SYSCFG_CFGR_SRAM1L | SYSCFG_CFGR_SRAM2L | \ + SYSCFG_CFGR_SRAM4L | SYSCFG_CFGR_BKRAML | SYSCFG_CFGR_CM7L | \ + SYSCFG_CFGR_FLASHL | SYSCFG_CFGR_PVDL )); #else return (uint32_t)(READ_BIT(SYSCFG->CFGR, SYSCFG_CFGR_ITCML | SYSCFG_CFGR_DTCML | SYSCFG_CFGR_CM7L | \ SYSCFG_CFGR_FLASHL | SYSCFG_CFGR_PVDL )); @@ -1074,10 +1137,24 @@ __STATIC_INLINE uint32_t LL_SYSCFG_VDMMCGetNMOSCompensationCode(void) * @brief Get the device package * @rmtoll PKGR PKG LL_SYSCFG_GetPackage * @retval Returned value can be one of the following values: - * @arg @ref LL_SYSCFG_LQFP100_PACKAGE - * @arg @ref LL_SYSCFG_TQFP144_PACKAGE - * @arg @ref LL_SYSCFG_TQFP176_UFBGA176_PACKAGE - * @arg @ref LL_SYSCFG_LQFP208_TFBGA240_PACKAGE + * @arg @ref LL_SYSCFG_LQFP100_PACKAGE (*) + * @arg @ref LL_SYSCFG_TQFP144_PACKAGE (*) + * @arg @ref LL_SYSCFG_TQFP176_UFBGA176_PACKAGE (*) + * @arg @ref LL_SYSCFG_LQFP208_TFBGA240_PACKAGE (*) + * @arg @ref LL_SYSCFG_VFQFPN68_INDUS_PACKAGE (*) + * @arg @ref LL_SYSCFG_TFBGA100_LQFP100_PACKAGE (*) + * @arg @ref LL_SYSCFG_LQFP100_INDUS_PACKAGE (**) + * @arg @ref LL_SYSCFG_TFBGA100_INDUS_PACKAGE (**) + * @arg @ref LL_SYSCFG_WLCSP115_INDUS_PACKAGE (**) + * @arg @ref LL_SYSCFG_LQFP144_PACKAGE (**) + * @arg @ref LL_SYSCFG_UFBGA144_PACKAGE (**) + * @arg @ref LL_SYSCFG_LQFP144_INDUS_PACKAGE (**) + * @arg @ref LL_SYSCFG_UFBGA169_INDUS_PACKAGE (**) + * @arg @ref LL_SYSCFG_UFBGA176PLUS25_INDUS_PACKAGE (**) + * @arg @ref LL_SYSCFG_LQFP176_INDUS_PACKAGE (**) + * + * (*) : For stm32h74xxx and stm32h75xxx family lines. + * (**): For stm32h72xxx and stm32h73xxx family lines. */ __STATIC_INLINE uint32_t LL_SYSCFG_GetPackage(void) { @@ -1098,6 +1175,7 @@ __STATIC_INLINE uint32_t LL_SYSCFG_GetFLashProtectionLevel(void) { return (uint32_t)(READ_BIT(SYSCFG->UR0, SYSCFG_UR0_RDP)); } +#ifdef SYSCFG_UR0_BKS /** * @brief Indicate if the Flash memory bank addresses are inverted or not * @rmtoll UR0 BKS LL_SYSCFG_IsFLashBankAddressesSwaped @@ -1107,6 +1185,7 @@ __STATIC_INLINE uint32_t LL_SYSCFG_IsFLashBankAddressesSwaped(void) { return ((READ_BIT(SYSCFG->UR0, SYSCFG_UR0_BKS) == 0U) ? 1UL : 0UL); } +#endif /*SYSCFG_UR0_BKS*/ /** * @brief Get the BOR Threshold Reset Level @@ -1372,6 +1451,7 @@ __STATIC_INLINE uint32_t LL_SYSCFG_GetFlashB1SecuredAreaEndAddress(void) return (uint32_t)(READ_BIT(SYSCFG->UR7, SYSCFG_UR7_SAEND_BANK1)); } +#ifdef SYSCFG_UR8_MEPAD_BANK2 /** * @brief Indicates if the flash protected area (Bank 2) is erased by a mass erase * @rmtoll UR8 MEPAD_BANK2 LL_SYSCFG_IsFlashB2ProtectedAreaErasable @@ -1391,7 +1471,9 @@ __STATIC_INLINE uint32_t LL_SYSCFG_IsFlashB2SecuredAreaErasable(void) { return ((READ_BIT(SYSCFG->UR8, SYSCFG_UR8_MESAD_BANK2) == SYSCFG_UR8_MESAD_BANK2) ? 1UL : 0UL); } +#endif /*SYSCFG_UR8_MEPAD_BANK2*/ +#ifdef SYSCFG_UR9_WRPN_BANK2 /** * @brief Indicates if the sector 0 of the Flash memory bank 2 is write protected * @rmtoll UR9 WRPN_BANK2 LL_SYSCFG_IsFlashB2Sector0WriteProtected @@ -1481,7 +1563,9 @@ __STATIC_INLINE uint32_t LL_SYSCFG_GetFlashB2ProtectedAreaStartAddress(void) { return (uint32_t)(READ_BIT(SYSCFG->UR9, SYSCFG_UR9_PABEG_BANK2)); } +#endif /*SYSCFG_UR9_WRPN_BANK2*/ +#ifdef SYSCFG_UR10_PAEND_BANK2 /** * @brief Get the protected area end address for Flash bank 2 * @rmtoll UR10 PAEND_BANK2 LL_SYSCFG_GetFlashB2ProtectedAreaEndAddress @@ -1501,7 +1585,9 @@ __STATIC_INLINE uint32_t LL_SYSCFG_GetFlashB2SecuredAreaStartAddress(void) { return (uint32_t)(READ_BIT(SYSCFG->UR10, SYSCFG_UR10_SABEG_BANK2)); } +#endif /*SYSCFG_UR10_PAEND_BANK2*/ +#ifdef SYSCFG_UR11_SAEND_BANK2 /** * @brief Get the secured area end address for Flash bank 2 * @rmtoll UR11 SAEND_BANK2 LL_SYSCFG_GetFlashB2SecuredAreaEndAddress @@ -1511,6 +1597,7 @@ __STATIC_INLINE uint32_t LL_SYSCFG_GetFlashB2SecuredAreaEndAddress(void) { return (uint32_t)(READ_BIT(SYSCFG->UR11, SYSCFG_UR11_SAEND_BANK2)); } +#endif /*SYSCFG_UR11_SAEND_BANK2*/ /** * @brief Get the Independent Watchdog 1 control mode (Software or Hardware) @@ -1646,6 +1733,35 @@ __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_IOHSLV(void) { return ((READ_BIT(SYSCFG->UR17, SYSCFG_UR17_IOHSLV) == SYSCFG_UR17_IOHSLV) ? 1UL : 0UL); } + +#ifdef SYSCFG_UR17_TCM_AXI_CFG +/** + * @brief Get the size of ITCM-RAM and AXI-SRAM + * @rmtoll UR17 TCM_AXI_CFG LL_SYSCFG_Get_ITCM_AXI_RAM_Size + * @retval Returned value can be one of the following values: + * @arg @ref LL_SYSCFG_ITCM_AXI_64KB_320KB + * @arg @ref LL_SYSCFG_ITCM_AXI_128KB_256KB + * @arg @ref LL_SYSCFG_ITCM_AXI_192KB_192KB + * @arg @ref LL_SYSCFG_ITCM_AXI_256KB_128KB + */ +__STATIC_INLINE uint32_t LL_SYSCFG_Get_ITCM_AXI_RAM_Size(void) +{ + return (uint32_t)(READ_BIT(SYSCFG->UR17, SYSCFG_UR17_TCM_AXI_CFG)); +} +#endif /*SYSCFG_UR17_TCM_AXI_CFG*/ + +#ifdef SYSCFG_UR18_CPU_FREQ_BOOST +/** + * @brief Indicates if the CPU maximum frequency boost is enabled + * @rmtoll UR18 CPU_FREQ_BOOST LL_SYSCFG_IsCpuFreqBoostEnabled + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_SYSCFG_IsCpuFreqBoostEnabled(void) +{ + return ((READ_BIT(SYSCFG->UR18, SYSCFG_UR18_CPU_FREQ_BOOST) == SYSCFG_UR18_CPU_FREQ_BOOST) ? 1UL : 0UL); +} +#endif /*SYSCFG_UR18_CPU_FREQ_BOOST*/ + #endif /*SYSCFG_UR0_RDP*/ /** @@ -1943,6 +2059,7 @@ __STATIC_INLINE uint32_t LL_DBGMCU_GetExternalTriggerPinDirection(void) * DBGMCU_APB1LFZ1 I2C1 LL_DBGMCU_APB1_GRP1_FreezePeriph\n * DBGMCU_APB1LFZ1 I2C2 LL_DBGMCU_APB1_GRP1_FreezePeriph\n * DBGMCU_APB1LFZ1 I2C3 LL_DBGMCU_APB1_GRP1_FreezePeriph\n + * DBGMCU_APB1LFZ1 I2C5 LL_DBGMCU_APB1_GRP1_FreezePeriph\n (*) * @param Periphs This parameter can be a combination of the following values: * @arg @ref LL_DBGMCU_APB1_GRP1_TIM2_STOP * @arg @ref LL_DBGMCU_APB1_GRP1_TIM3_STOP @@ -1957,6 +2074,9 @@ __STATIC_INLINE uint32_t LL_DBGMCU_GetExternalTriggerPinDirection(void) * @arg @ref LL_DBGMCU_APB1_GRP1_I2C1_STOP * @arg @ref LL_DBGMCU_APB1_GRP1_I2C2_STOP * @arg @ref LL_DBGMCU_APB1_GRP1_I2C3_STOP + * @arg @ref LL_DBGMCU_APB1_GRP1_I2C5_STOP (*) + * + * (*) value not defined in all devices * @retval None */ __STATIC_INLINE void LL_DBGMCU_APB1_GRP1_FreezePeriph(uint32_t Periphs) @@ -1979,6 +2099,7 @@ __STATIC_INLINE void LL_DBGMCU_APB1_GRP1_FreezePeriph(uint32_t Periphs) * DBGMCU_APB1LFZ1 I2C1 LL_DBGMCU_APB1_GRP1_FreezePeriph\n * DBGMCU_APB1LFZ1 I2C2 LL_DBGMCU_APB1_GRP1_FreezePeriph\n * DBGMCU_APB1LFZ1 I2C3 LL_DBGMCU_APB1_GRP1_FreezePeriph\n + * DBGMCU_APB1LFZ1 I2C5 LL_DBGMCU_APB1_GRP1_FreezePeriph\n * @param Periphs This parameter can be a combination of the following values: * @arg @ref LL_DBGMCU_APB1_GRP1_TIM2_STOP * @arg @ref LL_DBGMCU_APB1_GRP1_TIM3_STOP @@ -1993,6 +2114,9 @@ __STATIC_INLINE void LL_DBGMCU_APB1_GRP1_FreezePeriph(uint32_t Periphs) * @arg @ref LL_DBGMCU_APB1_GRP1_I2C1_STOP * @arg @ref LL_DBGMCU_APB1_GRP1_I2C2_STOP * @arg @ref LL_DBGMCU_APB1_GRP1_I2C3_STOP + * @arg @ref LL_DBGMCU_APB1_GRP1_I2C5_STOP (*) + * + * (*) value not defined in all devices * @retval None */ __STATIC_INLINE void LL_DBGMCU_APB1_GRP1_UnFreezePeriph(uint32_t Periphs) @@ -2000,6 +2124,7 @@ __STATIC_INLINE void LL_DBGMCU_APB1_GRP1_UnFreezePeriph(uint32_t Periphs) CLEAR_BIT(DBGMCU->APB1LFZ1, Periphs); } +#ifdef DBGMCU_APB1HFZ1_DBG_FDCAN /** * @brief Freeze APB1 group2 peripherals * @rmtoll DBGMCU_APB1HFZ1 FDCAN LL_DBGMCU_APB1_GRP2_FreezePeriph\n @@ -2023,6 +2148,37 @@ __STATIC_INLINE void LL_DBGMCU_APB1_GRP2_UnFreezePeriph(uint32_t Periphs) { CLEAR_BIT(DBGMCU->APB1HFZ1, Periphs); } +#endif /*DBGMCU_APB1HFZ1_DBG_FDCAN*/ + +#if defined(TIM23) || defined(TIM24) +/** + * @brief Freeze APB1 group2 peripherals + * @rmtoll DBGMCU_APB1HFZ1 TIM23 LL_DBGMCU_APB1_GRP2_FreezePeriph\n + * DBGMCU_APB1HFZ1 TIM24 LL_DBGMCU_APB1_GRP2_FreezePeriph\n + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_DBGMCU_APB1_GRP2_TIM23_STOP + * @arg @ref LL_DBGMCU_APB1_GRP2_TIM24_STOP + * @retval None + */ +__STATIC_INLINE void LL_DBGMCU_APB1_GRP2_FreezePeriph(uint32_t Periphs) +{ + SET_BIT(DBGMCU->APB1HFZ1, Periphs); +} + +/** + * @brief Unfreeze APB1 group2 peripherals + * @rmtoll DBGMCU_APB1HFZ1 TIM23 LL_DBGMCU_APB1_GRP2_UnFreezePeriph\n + DBGMCU_APB1HFZ1 TIM24 LL_DBGMCU_APB1_GRP2_UnFreezePeriph\n + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_DBGMCU_APB1_GRP2_TIM23_STOP + * @arg @ref LL_DBGMCU_APB1_GRP2_TIM24_STOP + * @retval None + */ +__STATIC_INLINE void LL_DBGMCU_APB1_GRP2_UnFreezePeriph(uint32_t Periphs) +{ + CLEAR_BIT(DBGMCU->APB1HFZ1, Periphs); +} +#endif /* TIM23 || TIM24 */ /** * @brief Freeze APB2 peripherals @@ -2038,7 +2194,9 @@ __STATIC_INLINE void LL_DBGMCU_APB1_GRP2_UnFreezePeriph(uint32_t Periphs) * @arg @ref LL_DBGMCU_APB2_GRP1_TIM15_STOP * @arg @ref LL_DBGMCU_APB2_GRP1_TIM16_STOP * @arg @ref LL_DBGMCU_APB2_GRP1_TIM17_STOP - * @arg @ref LL_DBGMCU_APB2_GRP1_HRTIM_STOP + * @arg @ref LL_DBGMCU_APB2_GRP1_HRTIM_STOP (*) + * + * (*) value not defined in all devices * @retval None */ __STATIC_INLINE void LL_DBGMCU_APB2_GRP1_FreezePeriph(uint32_t Periphs) @@ -2060,7 +2218,9 @@ __STATIC_INLINE void LL_DBGMCU_APB2_GRP1_FreezePeriph(uint32_t Periphs) * @arg @ref LL_DBGMCU_APB2_GRP1_TIM15_STOP * @arg @ref LL_DBGMCU_APB2_GRP1_TIM16_STOP * @arg @ref LL_DBGMCU_APB2_GRP1_TIM17_STOP - * @arg @ref LL_DBGMCU_APB2_GRP1_HRTIM_STOP + * @arg @ref LL_DBGMCU_APB2_GRP1_HRTIM_STOP (*) + * + * (*) value not defined in all devices * @retval None */ __STATIC_INLINE void LL_DBGMCU_APB2_GRP1_UnFreezePeriph(uint32_t Periphs) @@ -2105,10 +2265,12 @@ __STATIC_INLINE void LL_DBGMCU_APB3_GRP1_UnFreezePeriph(uint32_t Periphs) * @arg @ref LL_DBGMCU_APB4_GRP1_I2C4_STOP * @arg @ref LL_DBGMCU_APB4_GRP1_LPTIM2_STOP * @arg @ref LL_DBGMCU_APB4_GRP1_LPTIM3_STOP - * @arg @ref LL_DBGMCU_APB4_GRP1_LPTIM4_STOP - * @arg @ref LL_DBGMCU_APB4_GRP1_LPTIM5_STOP + * @arg @ref LL_DBGMCU_APB4_GRP1_LPTIM4_STOP (*) + * @arg @ref LL_DBGMCU_APB4_GRP1_LPTIM5_STOP (*) * @arg @ref LL_DBGMCU_APB4_GRP1_RTC_STOP * @arg @ref LL_DBGMCU_APB4_GRP1_IWDG1_STOP + * + * (*) value not defined in all devices * @retval None */ __STATIC_INLINE void LL_DBGMCU_APB4_GRP1_FreezePeriph(uint32_t Periphs) @@ -2129,10 +2291,12 @@ __STATIC_INLINE void LL_DBGMCU_APB4_GRP1_FreezePeriph(uint32_t Periphs) * @arg @ref LL_DBGMCU_APB4_GRP1_I2C4_STOP * @arg @ref LL_DBGMCU_APB4_GRP1_LPTIM2_STOP * @arg @ref LL_DBGMCU_APB4_GRP1_LPTIM3_STOP - * @arg @ref LL_DBGMCU_APB4_GRP1_LPTIM4_STOP - * @arg @ref LL_DBGMCU_APB4_GRP1_LPTIM5_STOP + * @arg @ref LL_DBGMCU_APB4_GRP1_LPTIM4_STOP (*) + * @arg @ref LL_DBGMCU_APB4_GRP1_LPTIM5_STOP (*) * @arg @ref LL_DBGMCU_APB4_GRP1_RTC_STOP * @arg @ref LL_DBGMCU_APB4_GRP1_IWDG1_STOP + * + * (*) value not defined in all devices * @retval None */ __STATIC_INLINE void LL_DBGMCU_APB4_GRP1_UnFreezePeriph(uint32_t Periphs) diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_tim.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_tim.h index 728c423..3bbdaa1 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_tim.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_tim.h @@ -32,7 +32,7 @@ extern "C" { * @{ */ -#if defined (TIM1) || defined (TIM2) || defined (TIM3) || defined (TIM4) || defined (TIM5) || defined (TIM6) || defined (TIM7) || defined (TIM8) || defined (TIM12) || defined (TIM13) || defined (TIM14) || defined (TIM15) || defined (TIM16) || defined (TIM17) +#if defined (TIM1) || defined (TIM2) || defined (TIM3) || defined (TIM4) || defined (TIM5) || defined (TIM6) || defined (TIM7) || defined (TIM8) || defined (TIM12) || defined (TIM13) || defined (TIM14) || defined (TIM15) || defined (TIM16) || defined (TIM17) || defined (TIM23) || defined (TIM24) /** @defgroup TIM_LL TIM * @{ @@ -576,8 +576,8 @@ typedef struct */ #define LL_TIM_COUNTERMODE_UP 0x00000000U /*!CCMR1) + OFFSET_TAB_CCMRx[iChannel])); + uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); CLEAR_BIT(*pReg, (TIM_CCMR1_CC1S << SHIFT_TAB_OCxx[iChannel])); MODIFY_REG(TIMx->CCER, (TIM_CCER_CC1P << SHIFT_TAB_CCxP[iChannel]), (Configuration & TIM_CCER_CC1P) << SHIFT_TAB_CCxP[iChannel]); @@ -2061,8 +2064,8 @@ __STATIC_INLINE void LL_TIM_OC_ConfigOutput(TIM_TypeDef *TIMx, uint32_t Channel, */ __STATIC_INLINE void LL_TIM_OC_SetMode(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t Mode) { - register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); + uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); MODIFY_REG(*pReg, ((TIM_CCMR1_OC1M | TIM_CCMR1_CC1S) << SHIFT_TAB_OCxx[iChannel]), Mode << SHIFT_TAB_OCxx[iChannel]); } @@ -2100,8 +2103,8 @@ __STATIC_INLINE void LL_TIM_OC_SetMode(TIM_TypeDef *TIMx, uint32_t Channel, uint */ __STATIC_INLINE uint32_t LL_TIM_OC_GetMode(TIM_TypeDef *TIMx, uint32_t Channel) { - register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); + uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); return (READ_BIT(*pReg, ((TIM_CCMR1_OC1M | TIM_CCMR1_CC1S) << SHIFT_TAB_OCxx[iChannel])) >> SHIFT_TAB_OCxx[iChannel]); } @@ -2134,7 +2137,7 @@ __STATIC_INLINE uint32_t LL_TIM_OC_GetMode(TIM_TypeDef *TIMx, uint32_t Channel) */ __STATIC_INLINE void LL_TIM_OC_SetPolarity(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t Polarity) { - register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); + uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); MODIFY_REG(TIMx->CCER, (TIM_CCER_CC1P << SHIFT_TAB_CCxP[iChannel]), Polarity << SHIFT_TAB_CCxP[iChannel]); } @@ -2166,7 +2169,7 @@ __STATIC_INLINE void LL_TIM_OC_SetPolarity(TIM_TypeDef *TIMx, uint32_t Channel, */ __STATIC_INLINE uint32_t LL_TIM_OC_GetPolarity(TIM_TypeDef *TIMx, uint32_t Channel) { - register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); + uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); return (READ_BIT(TIMx->CCER, (TIM_CCER_CC1P << SHIFT_TAB_CCxP[iChannel])) >> SHIFT_TAB_CCxP[iChannel]); } @@ -2203,7 +2206,7 @@ __STATIC_INLINE uint32_t LL_TIM_OC_GetPolarity(TIM_TypeDef *TIMx, uint32_t Chann */ __STATIC_INLINE void LL_TIM_OC_SetIdleState(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t IdleState) { - register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); + uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); MODIFY_REG(TIMx->CR2, (TIM_CR2_OIS1 << SHIFT_TAB_OISx[iChannel]), IdleState << SHIFT_TAB_OISx[iChannel]); } @@ -2235,7 +2238,7 @@ __STATIC_INLINE void LL_TIM_OC_SetIdleState(TIM_TypeDef *TIMx, uint32_t Channel, */ __STATIC_INLINE uint32_t LL_TIM_OC_GetIdleState(TIM_TypeDef *TIMx, uint32_t Channel) { - register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); + uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); return (READ_BIT(TIMx->CR2, (TIM_CR2_OIS1 << SHIFT_TAB_OISx[iChannel])) >> SHIFT_TAB_OISx[iChannel]); } @@ -2260,8 +2263,8 @@ __STATIC_INLINE uint32_t LL_TIM_OC_GetIdleState(TIM_TypeDef *TIMx, uint32_t Chan */ __STATIC_INLINE void LL_TIM_OC_EnableFast(TIM_TypeDef *TIMx, uint32_t Channel) { - register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); + uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); SET_BIT(*pReg, (TIM_CCMR1_OC1FE << SHIFT_TAB_OCxx[iChannel])); } @@ -2286,8 +2289,8 @@ __STATIC_INLINE void LL_TIM_OC_EnableFast(TIM_TypeDef *TIMx, uint32_t Channel) */ __STATIC_INLINE void LL_TIM_OC_DisableFast(TIM_TypeDef *TIMx, uint32_t Channel) { - register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); + uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); CLEAR_BIT(*pReg, (TIM_CCMR1_OC1FE << SHIFT_TAB_OCxx[iChannel])); } @@ -2312,9 +2315,9 @@ __STATIC_INLINE void LL_TIM_OC_DisableFast(TIM_TypeDef *TIMx, uint32_t Channel) */ __STATIC_INLINE uint32_t LL_TIM_OC_IsEnabledFast(TIM_TypeDef *TIMx, uint32_t Channel) { - register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); - register uint32_t bitfield = TIM_CCMR1_OC1FE << SHIFT_TAB_OCxx[iChannel]; + uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); + uint32_t bitfield = TIM_CCMR1_OC1FE << SHIFT_TAB_OCxx[iChannel]; return ((READ_BIT(*pReg, bitfield) == bitfield) ? 1UL : 0UL); } @@ -2338,8 +2341,8 @@ __STATIC_INLINE uint32_t LL_TIM_OC_IsEnabledFast(TIM_TypeDef *TIMx, uint32_t Cha */ __STATIC_INLINE void LL_TIM_OC_EnablePreload(TIM_TypeDef *TIMx, uint32_t Channel) { - register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); + uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); SET_BIT(*pReg, (TIM_CCMR1_OC1PE << SHIFT_TAB_OCxx[iChannel])); } @@ -2363,8 +2366,8 @@ __STATIC_INLINE void LL_TIM_OC_EnablePreload(TIM_TypeDef *TIMx, uint32_t Channel */ __STATIC_INLINE void LL_TIM_OC_DisablePreload(TIM_TypeDef *TIMx, uint32_t Channel) { - register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); + uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); CLEAR_BIT(*pReg, (TIM_CCMR1_OC1PE << SHIFT_TAB_OCxx[iChannel])); } @@ -2388,9 +2391,9 @@ __STATIC_INLINE void LL_TIM_OC_DisablePreload(TIM_TypeDef *TIMx, uint32_t Channe */ __STATIC_INLINE uint32_t LL_TIM_OC_IsEnabledPreload(TIM_TypeDef *TIMx, uint32_t Channel) { - register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); - register uint32_t bitfield = TIM_CCMR1_OC1PE << SHIFT_TAB_OCxx[iChannel]; + uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); + uint32_t bitfield = TIM_CCMR1_OC1PE << SHIFT_TAB_OCxx[iChannel]; return ((READ_BIT(*pReg, bitfield) == bitfield) ? 1UL : 0UL); } @@ -2417,8 +2420,8 @@ __STATIC_INLINE uint32_t LL_TIM_OC_IsEnabledPreload(TIM_TypeDef *TIMx, uint32_t */ __STATIC_INLINE void LL_TIM_OC_EnableClear(TIM_TypeDef *TIMx, uint32_t Channel) { - register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); + uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); SET_BIT(*pReg, (TIM_CCMR1_OC1CE << SHIFT_TAB_OCxx[iChannel])); } @@ -2444,8 +2447,8 @@ __STATIC_INLINE void LL_TIM_OC_EnableClear(TIM_TypeDef *TIMx, uint32_t Channel) */ __STATIC_INLINE void LL_TIM_OC_DisableClear(TIM_TypeDef *TIMx, uint32_t Channel) { - register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); + uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); CLEAR_BIT(*pReg, (TIM_CCMR1_OC1CE << SHIFT_TAB_OCxx[iChannel])); } @@ -2473,9 +2476,9 @@ __STATIC_INLINE void LL_TIM_OC_DisableClear(TIM_TypeDef *TIMx, uint32_t Channel) */ __STATIC_INLINE uint32_t LL_TIM_OC_IsEnabledClear(TIM_TypeDef *TIMx, uint32_t Channel) { - register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); - register uint32_t bitfield = TIM_CCMR1_OC1CE << SHIFT_TAB_OCxx[iChannel]; + uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); + uint32_t bitfield = TIM_CCMR1_OC1CE << SHIFT_TAB_OCxx[iChannel]; return ((READ_BIT(*pReg, bitfield) == bitfield) ? 1UL : 0UL); } @@ -2744,8 +2747,8 @@ __STATIC_INLINE void LL_TIM_SetCH5CombinedChannels(TIM_TypeDef *TIMx, uint32_t G */ __STATIC_INLINE void LL_TIM_IC_Config(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t Configuration) { - register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); + uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); MODIFY_REG(*pReg, ((TIM_CCMR1_IC1F | TIM_CCMR1_IC1PSC | TIM_CCMR1_CC1S) << SHIFT_TAB_ICxx[iChannel]), ((Configuration >> 16U) & (TIM_CCMR1_IC1F | TIM_CCMR1_IC1PSC | TIM_CCMR1_CC1S)) << SHIFT_TAB_ICxx[iChannel]); MODIFY_REG(TIMx->CCER, ((TIM_CCER_CC1NP | TIM_CCER_CC1P) << SHIFT_TAB_CCxP[iChannel]), @@ -2772,8 +2775,8 @@ __STATIC_INLINE void LL_TIM_IC_Config(TIM_TypeDef *TIMx, uint32_t Channel, uint3 */ __STATIC_INLINE void LL_TIM_IC_SetActiveInput(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ICActiveInput) { - register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); + uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); MODIFY_REG(*pReg, ((TIM_CCMR1_CC1S) << SHIFT_TAB_ICxx[iChannel]), (ICActiveInput >> 16U) << SHIFT_TAB_ICxx[iChannel]); } @@ -2796,8 +2799,8 @@ __STATIC_INLINE void LL_TIM_IC_SetActiveInput(TIM_TypeDef *TIMx, uint32_t Channe */ __STATIC_INLINE uint32_t LL_TIM_IC_GetActiveInput(TIM_TypeDef *TIMx, uint32_t Channel) { - register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); + uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); return ((READ_BIT(*pReg, ((TIM_CCMR1_CC1S) << SHIFT_TAB_ICxx[iChannel])) >> SHIFT_TAB_ICxx[iChannel]) << 16U); } @@ -2822,8 +2825,8 @@ __STATIC_INLINE uint32_t LL_TIM_IC_GetActiveInput(TIM_TypeDef *TIMx, uint32_t Ch */ __STATIC_INLINE void LL_TIM_IC_SetPrescaler(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ICPrescaler) { - register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); + uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); MODIFY_REG(*pReg, ((TIM_CCMR1_IC1PSC) << SHIFT_TAB_ICxx[iChannel]), (ICPrescaler >> 16U) << SHIFT_TAB_ICxx[iChannel]); } @@ -2847,8 +2850,8 @@ __STATIC_INLINE void LL_TIM_IC_SetPrescaler(TIM_TypeDef *TIMx, uint32_t Channel, */ __STATIC_INLINE uint32_t LL_TIM_IC_GetPrescaler(TIM_TypeDef *TIMx, uint32_t Channel) { - register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); + uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); return ((READ_BIT(*pReg, ((TIM_CCMR1_IC1PSC) << SHIFT_TAB_ICxx[iChannel])) >> SHIFT_TAB_ICxx[iChannel]) << 16U); } @@ -2885,8 +2888,8 @@ __STATIC_INLINE uint32_t LL_TIM_IC_GetPrescaler(TIM_TypeDef *TIMx, uint32_t Chan */ __STATIC_INLINE void LL_TIM_IC_SetFilter(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ICFilter) { - register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); + uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); MODIFY_REG(*pReg, ((TIM_CCMR1_IC1F) << SHIFT_TAB_ICxx[iChannel]), (ICFilter >> 16U) << SHIFT_TAB_ICxx[iChannel]); } @@ -2922,8 +2925,8 @@ __STATIC_INLINE void LL_TIM_IC_SetFilter(TIM_TypeDef *TIMx, uint32_t Channel, ui */ __STATIC_INLINE uint32_t LL_TIM_IC_GetFilter(TIM_TypeDef *TIMx, uint32_t Channel) { - register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); - register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); + uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); + const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel])); return ((READ_BIT(*pReg, ((TIM_CCMR1_IC1F) << SHIFT_TAB_ICxx[iChannel])) >> SHIFT_TAB_ICxx[iChannel]) << 16U); } @@ -2951,7 +2954,7 @@ __STATIC_INLINE uint32_t LL_TIM_IC_GetFilter(TIM_TypeDef *TIMx, uint32_t Channel */ __STATIC_INLINE void LL_TIM_IC_SetPolarity(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ICPolarity) { - register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); + uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); MODIFY_REG(TIMx->CCER, ((TIM_CCER_CC1NP | TIM_CCER_CC1P) << SHIFT_TAB_CCxP[iChannel]), ICPolarity << SHIFT_TAB_CCxP[iChannel]); } @@ -2979,7 +2982,7 @@ __STATIC_INLINE void LL_TIM_IC_SetPolarity(TIM_TypeDef *TIMx, uint32_t Channel, */ __STATIC_INLINE uint32_t LL_TIM_IC_GetPolarity(TIM_TypeDef *TIMx, uint32_t Channel) { - register uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); + uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel); return (READ_BIT(TIMx->CCER, ((TIM_CCER_CC1NP | TIM_CCER_CC1P) << SHIFT_TAB_CCxP[iChannel])) >> SHIFT_TAB_CCxP[iChannel]); } @@ -3692,7 +3695,7 @@ __STATIC_INLINE uint32_t LL_TIM_IsEnabledAllOutputs(TIM_TypeDef *TIMx) */ __STATIC_INLINE void LL_TIM_EnableBreakInputSource(TIM_TypeDef *TIMx, uint32_t BreakInput, uint32_t Source) { - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->AF1) + BreakInput)); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->AF1) + BreakInput)); SET_BIT(*pReg, Source); } @@ -3721,7 +3724,7 @@ __STATIC_INLINE void LL_TIM_EnableBreakInputSource(TIM_TypeDef *TIMx, uint32_t B */ __STATIC_INLINE void LL_TIM_DisableBreakInputSource(TIM_TypeDef *TIMx, uint32_t BreakInput, uint32_t Source) { - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->AF1) + BreakInput)); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->AF1) + BreakInput)); CLEAR_BIT(*pReg, Source); } @@ -3751,7 +3754,7 @@ __STATIC_INLINE void LL_TIM_DisableBreakInputSource(TIM_TypeDef *TIMx, uint32_t __STATIC_INLINE void LL_TIM_SetBreakInputSourcePolarity(TIM_TypeDef *TIMx, uint32_t BreakInput, uint32_t Source, uint32_t Polarity) { - register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->AF1) + BreakInput)); + __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->AF1) + BreakInput)); MODIFY_REG(*pReg, (TIMx_AF1_BKINP << TIM_POSITION_BRK_SOURCE), (Polarity << TIM_POSITION_BRK_SOURCE)); } #endif /* TIM_BREAK_INPUT_SUPPORT */ @@ -4915,7 +4918,7 @@ ErrorStatus LL_TIM_BDTR_Init(TIM_TypeDef *TIMx, LL_TIM_BDTR_InitTypeDef *TIM_BDT * @} */ -#endif /* TIM1 || TIM2 || TIM3 || TIM4 || TIM5 || TIM6 || TIM7 || TIM8 || TIM12 || TIM13 ||TIM14 || TIM15 || TIM16 || TIM17 */ +#endif /* TIM1 || TIM2 || TIM3 || TIM4 || TIM5 || TIM6 || TIM7 || TIM8 || TIM12 || TIM13 ||TIM14 || TIM15 || TIM16 || TIM17 || TIM23 || TIM24 */ /** * @} diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_usart.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_usart.h index e090a1e..7b4121e 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_usart.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_usart.h @@ -645,7 +645,7 @@ __STATIC_INLINE uint32_t LL_USART_IsEnabled(USART_TypeDef *USARTx) /** * @brief FIFO Mode Enable - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll CR1 FIFOEN LL_USART_EnableFIFO * @param USARTx USART Instance @@ -658,7 +658,7 @@ __STATIC_INLINE void LL_USART_EnableFIFO(USART_TypeDef *USARTx) /** * @brief FIFO Mode Disable - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll CR1 FIFOEN LL_USART_DisableFIFO * @param USARTx USART Instance @@ -671,7 +671,7 @@ __STATIC_INLINE void LL_USART_DisableFIFO(USART_TypeDef *USARTx) /** * @brief Indicate if FIFO Mode is enabled - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll CR1 FIFOEN LL_USART_IsEnabledFIFO * @param USARTx USART Instance @@ -684,7 +684,7 @@ __STATIC_INLINE uint32_t LL_USART_IsEnabledFIFO(USART_TypeDef *USARTx) /** * @brief Configure TX FIFO Threshold - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll CR3 TXFTCFG LL_USART_SetTXFIFOThreshold * @param USARTx USART Instance @@ -704,7 +704,7 @@ __STATIC_INLINE void LL_USART_SetTXFIFOThreshold(USART_TypeDef *USARTx, uint32_t /** * @brief Return TX FIFO Threshold Configuration - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll CR3 TXFTCFG LL_USART_GetTXFIFOThreshold * @param USARTx USART Instance @@ -723,7 +723,7 @@ __STATIC_INLINE uint32_t LL_USART_GetTXFIFOThreshold(USART_TypeDef *USARTx) /** * @brief Configure RX FIFO Threshold - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll CR3 RXFTCFG LL_USART_SetRXFIFOThreshold * @param USARTx USART Instance @@ -743,7 +743,7 @@ __STATIC_INLINE void LL_USART_SetRXFIFOThreshold(USART_TypeDef *USARTx, uint32_t /** * @brief Return RX FIFO Threshold Configuration - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll CR3 RXFTCFG LL_USART_GetRXFIFOThreshold * @param USARTx USART Instance @@ -762,7 +762,7 @@ __STATIC_INLINE uint32_t LL_USART_GetRXFIFOThreshold(USART_TypeDef *USARTx) /** * @brief Configure TX and RX FIFOs Threshold - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll CR3 TXFTCFG LL_USART_ConfigFIFOsThreshold\n * CR3 RXFTCFG LL_USART_ConfigFIFOsThreshold @@ -792,7 +792,7 @@ __STATIC_INLINE void LL_USART_ConfigFIFOsThreshold(USART_TypeDef *USARTx, uint32 * @brief USART enabled in STOP Mode. * @note When this function is enabled, USART is able to wake up the MCU from Stop mode, provided that * USART clock selection is HSI or LSE in RCC. - * @note Macro @ref IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can be used to check whether or not * Wake-up from Stop mode feature is supported by the USARTx instance. * @rmtoll CR1 UESM LL_USART_EnableInStopMode * @param USARTx USART Instance @@ -806,7 +806,7 @@ __STATIC_INLINE void LL_USART_EnableInStopMode(USART_TypeDef *USARTx) /** * @brief USART disabled in STOP Mode. * @note When this function is disabled, USART is not able to wake up the MCU from Stop mode - * @note Macro @ref IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can be used to check whether or not * Wake-up from Stop mode feature is supported by the USARTx instance. * @rmtoll CR1 UESM LL_USART_DisableInStopMode * @param USARTx USART Instance @@ -819,7 +819,7 @@ __STATIC_INLINE void LL_USART_DisableInStopMode(USART_TypeDef *USARTx) /** * @brief Indicate if USART is enabled in STOP Mode (able to wake up MCU from Stop mode or not) - * @note Macro @ref IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can be used to check whether or not * Wake-up from Stop mode feature is supported by the USARTx instance. * @rmtoll CR1 UESM LL_USART_IsEnabledInStopMode * @param USARTx USART Instance @@ -1062,7 +1062,7 @@ __STATIC_INLINE uint32_t LL_USART_GetOverSampling(USART_TypeDef *USARTx) /** * @brief Configure if Clock pulse of the last data bit is output to the SCLK pin or not - * @note Macro @ref IS_USART_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not * Synchronous mode is supported by the USARTx instance. * @rmtoll CR2 LBCL LL_USART_SetLastClkPulseOutput * @param USARTx USART Instance @@ -1079,7 +1079,7 @@ __STATIC_INLINE void LL_USART_SetLastClkPulseOutput(USART_TypeDef *USARTx, uint3 /** * @brief Retrieve Clock pulse of the last data bit output configuration * (Last bit Clock pulse output to the SCLK pin or not) - * @note Macro @ref IS_USART_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not * Synchronous mode is supported by the USARTx instance. * @rmtoll CR2 LBCL LL_USART_GetLastClkPulseOutput * @param USARTx USART Instance @@ -1094,7 +1094,7 @@ __STATIC_INLINE uint32_t LL_USART_GetLastClkPulseOutput(USART_TypeDef *USARTx) /** * @brief Select the phase of the clock output on the SCLK pin in synchronous mode - * @note Macro @ref IS_USART_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not * Synchronous mode is supported by the USARTx instance. * @rmtoll CR2 CPHA LL_USART_SetClockPhase * @param USARTx USART Instance @@ -1110,7 +1110,7 @@ __STATIC_INLINE void LL_USART_SetClockPhase(USART_TypeDef *USARTx, uint32_t Cloc /** * @brief Return phase of the clock output on the SCLK pin in synchronous mode - * @note Macro @ref IS_USART_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not * Synchronous mode is supported by the USARTx instance. * @rmtoll CR2 CPHA LL_USART_GetClockPhase * @param USARTx USART Instance @@ -1125,7 +1125,7 @@ __STATIC_INLINE uint32_t LL_USART_GetClockPhase(USART_TypeDef *USARTx) /** * @brief Select the polarity of the clock output on the SCLK pin in synchronous mode - * @note Macro @ref IS_USART_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not * Synchronous mode is supported by the USARTx instance. * @rmtoll CR2 CPOL LL_USART_SetClockPolarity * @param USARTx USART Instance @@ -1141,7 +1141,7 @@ __STATIC_INLINE void LL_USART_SetClockPolarity(USART_TypeDef *USARTx, uint32_t C /** * @brief Return polarity of the clock output on the SCLK pin in synchronous mode - * @note Macro @ref IS_USART_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not * Synchronous mode is supported by the USARTx instance. * @rmtoll CR2 CPOL LL_USART_GetClockPolarity * @param USARTx USART Instance @@ -1156,7 +1156,7 @@ __STATIC_INLINE uint32_t LL_USART_GetClockPolarity(USART_TypeDef *USARTx) /** * @brief Configure Clock signal format (Phase Polarity and choice about output of last bit clock pulse) - * @note Macro @ref IS_USART_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not * Synchronous mode is supported by the USARTx instance. * @note Call of this function is equivalent to following function call sequence : * - Clock Phase configuration using @ref LL_USART_SetClockPhase() function @@ -1184,7 +1184,7 @@ __STATIC_INLINE void LL_USART_ConfigClock(USART_TypeDef *USARTx, uint32_t Phase, /** * @brief Configure Clock source prescaler for baudrate generator and oversampling - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll PRESC PRESCALER LL_USART_SetPrescaler * @param USARTx USART Instance @@ -1210,7 +1210,7 @@ __STATIC_INLINE void LL_USART_SetPrescaler(USART_TypeDef *USARTx, uint32_t Presc /** * @brief Retrieve the Clock source prescaler for baudrate generator and oversampling - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll PRESC PRESCALER LL_USART_GetPrescaler * @param USARTx USART Instance @@ -1235,7 +1235,7 @@ __STATIC_INLINE uint32_t LL_USART_GetPrescaler(USART_TypeDef *USARTx) /** * @brief Enable Clock output on SCLK pin - * @note Macro @ref IS_USART_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not * Synchronous mode is supported by the USARTx instance. * @rmtoll CR2 CLKEN LL_USART_EnableSCLKOutput * @param USARTx USART Instance @@ -1248,7 +1248,7 @@ __STATIC_INLINE void LL_USART_EnableSCLKOutput(USART_TypeDef *USARTx) /** * @brief Disable Clock output on SCLK pin - * @note Macro @ref IS_USART_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not * Synchronous mode is supported by the USARTx instance. * @rmtoll CR2 CLKEN LL_USART_DisableSCLKOutput * @param USARTx USART Instance @@ -1261,7 +1261,7 @@ __STATIC_INLINE void LL_USART_DisableSCLKOutput(USART_TypeDef *USARTx) /** * @brief Indicate if Clock output on SCLK pin is enabled - * @note Macro @ref IS_USART_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not * Synchronous mode is supported by the USARTx instance. * @rmtoll CR2 CLKEN LL_USART_IsEnabledSCLKOutput * @param USARTx USART Instance @@ -1480,7 +1480,7 @@ __STATIC_INLINE uint32_t LL_USART_GetTransferBitOrder(USART_TypeDef *USARTx) /** * @brief Enable Auto Baud-Rate Detection - * @note Macro @ref IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(USARTx) can be used to check whether or not * Auto Baud Rate detection feature is supported by the USARTx instance. * @rmtoll CR2 ABREN LL_USART_EnableAutoBaudRate * @param USARTx USART Instance @@ -1493,7 +1493,7 @@ __STATIC_INLINE void LL_USART_EnableAutoBaudRate(USART_TypeDef *USARTx) /** * @brief Disable Auto Baud-Rate Detection - * @note Macro @ref IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(USARTx) can be used to check whether or not * Auto Baud Rate detection feature is supported by the USARTx instance. * @rmtoll CR2 ABREN LL_USART_DisableAutoBaudRate * @param USARTx USART Instance @@ -1506,7 +1506,7 @@ __STATIC_INLINE void LL_USART_DisableAutoBaudRate(USART_TypeDef *USARTx) /** * @brief Indicate if Auto Baud-Rate Detection mechanism is enabled - * @note Macro @ref IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(USARTx) can be used to check whether or not * Auto Baud Rate detection feature is supported by the USARTx instance. * @rmtoll CR2 ABREN LL_USART_IsEnabledAutoBaud * @param USARTx USART Instance @@ -1519,7 +1519,7 @@ __STATIC_INLINE uint32_t LL_USART_IsEnabledAutoBaud(USART_TypeDef *USARTx) /** * @brief Set Auto Baud-Rate mode bits - * @note Macro @ref IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(USARTx) can be used to check whether or not * Auto Baud Rate detection feature is supported by the USARTx instance. * @rmtoll CR2 ABRMODE LL_USART_SetAutoBaudRateMode * @param USARTx USART Instance @@ -1537,7 +1537,7 @@ __STATIC_INLINE void LL_USART_SetAutoBaudRateMode(USART_TypeDef *USARTx, uint32_ /** * @brief Return Auto Baud-Rate mode - * @note Macro @ref IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(USARTx) can be used to check whether or not * Auto Baud Rate detection feature is supported by the USARTx instance. * @rmtoll CR2 ABRMODE LL_USART_GetAutoBaudRateMode * @param USARTx USART Instance @@ -1644,7 +1644,7 @@ __STATIC_INLINE uint32_t LL_USART_GetNodeAddressLen(USART_TypeDef *USARTx) /** * @brief Enable RTS HW Flow Control - * @note Macro @ref IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not * Hardware Flow control feature is supported by the USARTx instance. * @rmtoll CR3 RTSE LL_USART_EnableRTSHWFlowCtrl * @param USARTx USART Instance @@ -1657,7 +1657,7 @@ __STATIC_INLINE void LL_USART_EnableRTSHWFlowCtrl(USART_TypeDef *USARTx) /** * @brief Disable RTS HW Flow Control - * @note Macro @ref IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not * Hardware Flow control feature is supported by the USARTx instance. * @rmtoll CR3 RTSE LL_USART_DisableRTSHWFlowCtrl * @param USARTx USART Instance @@ -1670,7 +1670,7 @@ __STATIC_INLINE void LL_USART_DisableRTSHWFlowCtrl(USART_TypeDef *USARTx) /** * @brief Enable CTS HW Flow Control - * @note Macro @ref IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not * Hardware Flow control feature is supported by the USARTx instance. * @rmtoll CR3 CTSE LL_USART_EnableCTSHWFlowCtrl * @param USARTx USART Instance @@ -1683,7 +1683,7 @@ __STATIC_INLINE void LL_USART_EnableCTSHWFlowCtrl(USART_TypeDef *USARTx) /** * @brief Disable CTS HW Flow Control - * @note Macro @ref IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not * Hardware Flow control feature is supported by the USARTx instance. * @rmtoll CR3 CTSE LL_USART_DisableCTSHWFlowCtrl * @param USARTx USART Instance @@ -1696,7 +1696,7 @@ __STATIC_INLINE void LL_USART_DisableCTSHWFlowCtrl(USART_TypeDef *USARTx) /** * @brief Configure HW Flow Control mode (both CTS and RTS) - * @note Macro @ref IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not * Hardware Flow control feature is supported by the USARTx instance. * @rmtoll CR3 RTSE LL_USART_SetHWFlowCtrl\n * CR3 CTSE LL_USART_SetHWFlowCtrl @@ -1715,7 +1715,7 @@ __STATIC_INLINE void LL_USART_SetHWFlowCtrl(USART_TypeDef *USARTx, uint32_t Hard /** * @brief Return HW Flow Control configuration (both CTS and RTS) - * @note Macro @ref IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not * Hardware Flow control feature is supported by the USARTx instance. * @rmtoll CR3 RTSE LL_USART_GetHWFlowCtrl\n * CR3 CTSE LL_USART_GetHWFlowCtrl @@ -1799,7 +1799,7 @@ __STATIC_INLINE uint32_t LL_USART_IsEnabledOverrunDetect(USART_TypeDef *USARTx) /** * @brief Select event type for Wake UP Interrupt Flag (WUS[1:0] bits) - * @note Macro @ref IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can be used to check whether or not * Wake-up from Stop mode feature is supported by the USARTx instance. * @rmtoll CR3 WUS LL_USART_SetWKUPType * @param USARTx USART Instance @@ -1816,7 +1816,7 @@ __STATIC_INLINE void LL_USART_SetWKUPType(USART_TypeDef *USARTx, uint32_t Type) /** * @brief Return event type for Wake UP Interrupt Flag (WUS[1:0] bits) - * @note Macro @ref IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can be used to check whether or not * Wake-up from Stop mode feature is supported by the USARTx instance. * @rmtoll CR3 WUS LL_USART_GetWKUPType * @param USARTx USART Instance @@ -1864,7 +1864,7 @@ __STATIC_INLINE void LL_USART_SetBaudRate(USART_TypeDef *USARTx, uint32_t Periph uint32_t BaudRate) { uint32_t usartdiv; - register uint32_t brrtemp; + uint32_t brrtemp; if (PrescalerValue > LL_USART_PRESCALER_DIV256) { @@ -1912,9 +1912,9 @@ __STATIC_INLINE void LL_USART_SetBaudRate(USART_TypeDef *USARTx, uint32_t Periph __STATIC_INLINE uint32_t LL_USART_GetBaudRate(USART_TypeDef *USARTx, uint32_t PeriphClk, uint32_t PrescalerValue, uint32_t OverSampling) { - register uint32_t usartdiv; - register uint32_t brrresult = 0x0U; - register uint32_t periphclkpresc = (uint32_t)(PeriphClk / (USART_PRESCALER_TAB[(uint8_t)PrescalerValue])); + uint32_t usartdiv; + uint32_t brrresult = 0x0U; + uint32_t periphclkpresc = (uint32_t)(PeriphClk / (USART_PRESCALER_TAB[(uint8_t)PrescalerValue])); usartdiv = USARTx->BRR; @@ -1996,7 +1996,7 @@ __STATIC_INLINE uint32_t LL_USART_GetBlockLength(USART_TypeDef *USARTx) /** * @brief Enable IrDA mode - * @note Macro @ref IS_IRDA_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_IRDA_INSTANCE(USARTx) can be used to check whether or not * IrDA feature is supported by the USARTx instance. * @rmtoll CR3 IREN LL_USART_EnableIrda * @param USARTx USART Instance @@ -2009,7 +2009,7 @@ __STATIC_INLINE void LL_USART_EnableIrda(USART_TypeDef *USARTx) /** * @brief Disable IrDA mode - * @note Macro @ref IS_IRDA_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_IRDA_INSTANCE(USARTx) can be used to check whether or not * IrDA feature is supported by the USARTx instance. * @rmtoll CR3 IREN LL_USART_DisableIrda * @param USARTx USART Instance @@ -2022,7 +2022,7 @@ __STATIC_INLINE void LL_USART_DisableIrda(USART_TypeDef *USARTx) /** * @brief Indicate if IrDA mode is enabled - * @note Macro @ref IS_IRDA_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_IRDA_INSTANCE(USARTx) can be used to check whether or not * IrDA feature is supported by the USARTx instance. * @rmtoll CR3 IREN LL_USART_IsEnabledIrda * @param USARTx USART Instance @@ -2035,7 +2035,7 @@ __STATIC_INLINE uint32_t LL_USART_IsEnabledIrda(USART_TypeDef *USARTx) /** * @brief Configure IrDA Power Mode (Normal or Low Power) - * @note Macro @ref IS_IRDA_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_IRDA_INSTANCE(USARTx) can be used to check whether or not * IrDA feature is supported by the USARTx instance. * @rmtoll CR3 IRLP LL_USART_SetIrdaPowerMode * @param USARTx USART Instance @@ -2051,7 +2051,7 @@ __STATIC_INLINE void LL_USART_SetIrdaPowerMode(USART_TypeDef *USARTx, uint32_t P /** * @brief Retrieve IrDA Power Mode configuration (Normal or Low Power) - * @note Macro @ref IS_IRDA_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_IRDA_INSTANCE(USARTx) can be used to check whether or not * IrDA feature is supported by the USARTx instance. * @rmtoll CR3 IRLP LL_USART_GetIrdaPowerMode * @param USARTx USART Instance @@ -2067,7 +2067,7 @@ __STATIC_INLINE uint32_t LL_USART_GetIrdaPowerMode(USART_TypeDef *USARTx) /** * @brief Set Irda prescaler value, used for dividing the USART clock source * to achieve the Irda Low Power frequency (8 bits value) - * @note Macro @ref IS_IRDA_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_IRDA_INSTANCE(USARTx) can be used to check whether or not * IrDA feature is supported by the USARTx instance. * @rmtoll GTPR PSC LL_USART_SetIrdaPrescaler * @param USARTx USART Instance @@ -2082,7 +2082,7 @@ __STATIC_INLINE void LL_USART_SetIrdaPrescaler(USART_TypeDef *USARTx, uint32_t P /** * @brief Return Irda prescaler value, used for dividing the USART clock source * to achieve the Irda Low Power frequency (8 bits value) - * @note Macro @ref IS_IRDA_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_IRDA_INSTANCE(USARTx) can be used to check whether or not * IrDA feature is supported by the USARTx instance. * @rmtoll GTPR PSC LL_USART_GetIrdaPrescaler * @param USARTx USART Instance @@ -2103,7 +2103,7 @@ __STATIC_INLINE uint32_t LL_USART_GetIrdaPrescaler(USART_TypeDef *USARTx) /** * @brief Enable Smartcard NACK transmission - * @note Macro @ref IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not * Smartcard feature is supported by the USARTx instance. * @rmtoll CR3 NACK LL_USART_EnableSmartcardNACK * @param USARTx USART Instance @@ -2116,7 +2116,7 @@ __STATIC_INLINE void LL_USART_EnableSmartcardNACK(USART_TypeDef *USARTx) /** * @brief Disable Smartcard NACK transmission - * @note Macro @ref IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not * Smartcard feature is supported by the USARTx instance. * @rmtoll CR3 NACK LL_USART_DisableSmartcardNACK * @param USARTx USART Instance @@ -2129,7 +2129,7 @@ __STATIC_INLINE void LL_USART_DisableSmartcardNACK(USART_TypeDef *USARTx) /** * @brief Indicate if Smartcard NACK transmission is enabled - * @note Macro @ref IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not * Smartcard feature is supported by the USARTx instance. * @rmtoll CR3 NACK LL_USART_IsEnabledSmartcardNACK * @param USARTx USART Instance @@ -2142,7 +2142,7 @@ __STATIC_INLINE uint32_t LL_USART_IsEnabledSmartcardNACK(USART_TypeDef *USARTx) /** * @brief Enable Smartcard mode - * @note Macro @ref IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not * Smartcard feature is supported by the USARTx instance. * @rmtoll CR3 SCEN LL_USART_EnableSmartcard * @param USARTx USART Instance @@ -2155,7 +2155,7 @@ __STATIC_INLINE void LL_USART_EnableSmartcard(USART_TypeDef *USARTx) /** * @brief Disable Smartcard mode - * @note Macro @ref IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not * Smartcard feature is supported by the USARTx instance. * @rmtoll CR3 SCEN LL_USART_DisableSmartcard * @param USARTx USART Instance @@ -2168,7 +2168,7 @@ __STATIC_INLINE void LL_USART_DisableSmartcard(USART_TypeDef *USARTx) /** * @brief Indicate if Smartcard mode is enabled - * @note Macro @ref IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not * Smartcard feature is supported by the USARTx instance. * @rmtoll CR3 SCEN LL_USART_IsEnabledSmartcard * @param USARTx USART Instance @@ -2181,7 +2181,7 @@ __STATIC_INLINE uint32_t LL_USART_IsEnabledSmartcard(USART_TypeDef *USARTx) /** * @brief Set Smartcard Auto-Retry Count value (SCARCNT[2:0] bits) - * @note Macro @ref IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not * Smartcard feature is supported by the USARTx instance. * @note This bit-field specifies the number of retries in transmit and receive, in Smartcard mode. * In transmission mode, it specifies the number of automatic retransmission retries, before @@ -2200,7 +2200,7 @@ __STATIC_INLINE void LL_USART_SetSmartcardAutoRetryCount(USART_TypeDef *USARTx, /** * @brief Return Smartcard Auto-Retry Count value (SCARCNT[2:0] bits) - * @note Macro @ref IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not * Smartcard feature is supported by the USARTx instance. * @rmtoll CR3 SCARCNT LL_USART_GetSmartcardAutoRetryCount * @param USARTx USART Instance @@ -2214,7 +2214,7 @@ __STATIC_INLINE uint32_t LL_USART_GetSmartcardAutoRetryCount(USART_TypeDef *USAR /** * @brief Set Smartcard prescaler value, used for dividing the USART clock * source to provide the SMARTCARD Clock (5 bits value) - * @note Macro @ref IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not * Smartcard feature is supported by the USARTx instance. * @rmtoll GTPR PSC LL_USART_SetSmartcardPrescaler * @param USARTx USART Instance @@ -2229,7 +2229,7 @@ __STATIC_INLINE void LL_USART_SetSmartcardPrescaler(USART_TypeDef *USARTx, uint3 /** * @brief Return Smartcard prescaler value, used for dividing the USART clock * source to provide the SMARTCARD Clock (5 bits value) - * @note Macro @ref IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not * Smartcard feature is supported by the USARTx instance. * @rmtoll GTPR PSC LL_USART_GetSmartcardPrescaler * @param USARTx USART Instance @@ -2243,7 +2243,7 @@ __STATIC_INLINE uint32_t LL_USART_GetSmartcardPrescaler(USART_TypeDef *USARTx) /** * @brief Set Smartcard Guard time value, expressed in nb of baud clocks periods * (GT[7:0] bits : Guard time value) - * @note Macro @ref IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not * Smartcard feature is supported by the USARTx instance. * @rmtoll GTPR GT LL_USART_SetSmartcardGuardTime * @param USARTx USART Instance @@ -2258,7 +2258,7 @@ __STATIC_INLINE void LL_USART_SetSmartcardGuardTime(USART_TypeDef *USARTx, uint3 /** * @brief Return Smartcard Guard time value, expressed in nb of baud clocks periods * (GT[7:0] bits : Guard time value) - * @note Macro @ref IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not * Smartcard feature is supported by the USARTx instance. * @rmtoll GTPR GT LL_USART_GetSmartcardGuardTime * @param USARTx USART Instance @@ -2279,7 +2279,7 @@ __STATIC_INLINE uint32_t LL_USART_GetSmartcardGuardTime(USART_TypeDef *USARTx) /** * @brief Enable Single Wire Half-Duplex mode - * @note Macro @ref IS_UART_HALFDUPLEX_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_HALFDUPLEX_INSTANCE(USARTx) can be used to check whether or not * Half-Duplex mode is supported by the USARTx instance. * @rmtoll CR3 HDSEL LL_USART_EnableHalfDuplex * @param USARTx USART Instance @@ -2292,7 +2292,7 @@ __STATIC_INLINE void LL_USART_EnableHalfDuplex(USART_TypeDef *USARTx) /** * @brief Disable Single Wire Half-Duplex mode - * @note Macro @ref IS_UART_HALFDUPLEX_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_HALFDUPLEX_INSTANCE(USARTx) can be used to check whether or not * Half-Duplex mode is supported by the USARTx instance. * @rmtoll CR3 HDSEL LL_USART_DisableHalfDuplex * @param USARTx USART Instance @@ -2305,7 +2305,7 @@ __STATIC_INLINE void LL_USART_DisableHalfDuplex(USART_TypeDef *USARTx) /** * @brief Indicate if Single Wire Half-Duplex mode is enabled - * @note Macro @ref IS_UART_HALFDUPLEX_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_HALFDUPLEX_INSTANCE(USARTx) can be used to check whether or not * Half-Duplex mode is supported by the USARTx instance. * @rmtoll CR3 HDSEL LL_USART_IsEnabledHalfDuplex * @param USARTx USART Instance @@ -2325,7 +2325,7 @@ __STATIC_INLINE uint32_t LL_USART_IsEnabledHalfDuplex(USART_TypeDef *USARTx) */ /** * @brief Enable SPI Synchronous Slave mode - * @note Macro @ref IS_UART_SPI_SLAVE_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_SPI_SLAVE_INSTANCE(USARTx) can be used to check whether or not * SPI Slave mode feature is supported by the USARTx instance. * @rmtoll CR2 SLVEN LL_USART_EnableSPISlave * @param USARTx USART Instance @@ -2338,7 +2338,7 @@ __STATIC_INLINE void LL_USART_EnableSPISlave(USART_TypeDef *USARTx) /** * @brief Disable SPI Synchronous Slave mode - * @note Macro @ref IS_UART_SPI_SLAVE_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_SPI_SLAVE_INSTANCE(USARTx) can be used to check whether or not * SPI Slave mode feature is supported by the USARTx instance. * @rmtoll CR2 SLVEN LL_USART_DisableSPISlave * @param USARTx USART Instance @@ -2351,7 +2351,7 @@ __STATIC_INLINE void LL_USART_DisableSPISlave(USART_TypeDef *USARTx) /** * @brief Indicate if SPI Synchronous Slave mode is enabled - * @note Macro @ref IS_UART_SPI_SLAVE_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_SPI_SLAVE_INSTANCE(USARTx) can be used to check whether or not * SPI Slave mode feature is supported by the USARTx instance. * @rmtoll CR2 SLVEN LL_USART_IsEnabledSPISlave * @param USARTx USART Instance @@ -2364,7 +2364,7 @@ __STATIC_INLINE uint32_t LL_USART_IsEnabledSPISlave(USART_TypeDef *USARTx) /** * @brief Enable SPI Slave Selection using NSS input pin - * @note Macro @ref IS_UART_SPI_SLAVE_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_SPI_SLAVE_INSTANCE(USARTx) can be used to check whether or not * SPI Slave mode feature is supported by the USARTx instance. * @note SPI Slave Selection depends on NSS input pin * (The slave is selected when NSS is low and deselected when NSS is high). @@ -2379,7 +2379,7 @@ __STATIC_INLINE void LL_USART_EnableSPISlaveSelect(USART_TypeDef *USARTx) /** * @brief Disable SPI Slave Selection using NSS input pin - * @note Macro @ref IS_UART_SPI_SLAVE_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_SPI_SLAVE_INSTANCE(USARTx) can be used to check whether or not * SPI Slave mode feature is supported by the USARTx instance. * @note SPI Slave will be always selected and NSS input pin will be ignored. * @rmtoll CR2 DIS_NSS LL_USART_DisableSPISlaveSelect @@ -2393,7 +2393,7 @@ __STATIC_INLINE void LL_USART_DisableSPISlaveSelect(USART_TypeDef *USARTx) /** * @brief Indicate if SPI Slave Selection depends on NSS input pin - * @note Macro @ref IS_UART_SPI_SLAVE_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_SPI_SLAVE_INSTANCE(USARTx) can be used to check whether or not * SPI Slave mode feature is supported by the USARTx instance. * @rmtoll CR2 DIS_NSS LL_USART_IsEnabledSPISlaveSelect * @param USARTx USART Instance @@ -2414,7 +2414,7 @@ __STATIC_INLINE uint32_t LL_USART_IsEnabledSPISlaveSelect(USART_TypeDef *USARTx) /** * @brief Set LIN Break Detection Length - * @note Macro @ref IS_UART_LIN_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_LIN_INSTANCE(USARTx) can be used to check whether or not * LIN feature is supported by the USARTx instance. * @rmtoll CR2 LBDL LL_USART_SetLINBrkDetectionLen * @param USARTx USART Instance @@ -2430,7 +2430,7 @@ __STATIC_INLINE void LL_USART_SetLINBrkDetectionLen(USART_TypeDef *USARTx, uint3 /** * @brief Return LIN Break Detection Length - * @note Macro @ref IS_UART_LIN_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_LIN_INSTANCE(USARTx) can be used to check whether or not * LIN feature is supported by the USARTx instance. * @rmtoll CR2 LBDL LL_USART_GetLINBrkDetectionLen * @param USARTx USART Instance @@ -2445,7 +2445,7 @@ __STATIC_INLINE uint32_t LL_USART_GetLINBrkDetectionLen(USART_TypeDef *USARTx) /** * @brief Enable LIN mode - * @note Macro @ref IS_UART_LIN_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_LIN_INSTANCE(USARTx) can be used to check whether or not * LIN feature is supported by the USARTx instance. * @rmtoll CR2 LINEN LL_USART_EnableLIN * @param USARTx USART Instance @@ -2458,7 +2458,7 @@ __STATIC_INLINE void LL_USART_EnableLIN(USART_TypeDef *USARTx) /** * @brief Disable LIN mode - * @note Macro @ref IS_UART_LIN_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_LIN_INSTANCE(USARTx) can be used to check whether or not * LIN feature is supported by the USARTx instance. * @rmtoll CR2 LINEN LL_USART_DisableLIN * @param USARTx USART Instance @@ -2471,7 +2471,7 @@ __STATIC_INLINE void LL_USART_DisableLIN(USART_TypeDef *USARTx) /** * @brief Indicate if LIN mode is enabled - * @note Macro @ref IS_UART_LIN_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_LIN_INSTANCE(USARTx) can be used to check whether or not * LIN feature is supported by the USARTx instance. * @rmtoll CR2 LINEN LL_USART_IsEnabledLIN * @param USARTx USART Instance @@ -2492,7 +2492,7 @@ __STATIC_INLINE uint32_t LL_USART_IsEnabledLIN(USART_TypeDef *USARTx) /** * @brief Set DEDT (Driver Enable De-Assertion Time), Time value expressed on 5 bits ([4:0] bits). - * @note Macro @ref IS_UART_DRIVER_ENABLE_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_DRIVER_ENABLE_INSTANCE(USARTx) can be used to check whether or not * Driver Enable feature is supported by the USARTx instance. * @rmtoll CR1 DEDT LL_USART_SetDEDeassertionTime * @param USARTx USART Instance @@ -2506,7 +2506,7 @@ __STATIC_INLINE void LL_USART_SetDEDeassertionTime(USART_TypeDef *USARTx, uint32 /** * @brief Return DEDT (Driver Enable De-Assertion Time) - * @note Macro @ref IS_UART_DRIVER_ENABLE_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_DRIVER_ENABLE_INSTANCE(USARTx) can be used to check whether or not * Driver Enable feature is supported by the USARTx instance. * @rmtoll CR1 DEDT LL_USART_GetDEDeassertionTime * @param USARTx USART Instance @@ -2519,7 +2519,7 @@ __STATIC_INLINE uint32_t LL_USART_GetDEDeassertionTime(USART_TypeDef *USARTx) /** * @brief Set DEAT (Driver Enable Assertion Time), Time value expressed on 5 bits ([4:0] bits). - * @note Macro @ref IS_UART_DRIVER_ENABLE_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_DRIVER_ENABLE_INSTANCE(USARTx) can be used to check whether or not * Driver Enable feature is supported by the USARTx instance. * @rmtoll CR1 DEAT LL_USART_SetDEAssertionTime * @param USARTx USART Instance @@ -2533,7 +2533,7 @@ __STATIC_INLINE void LL_USART_SetDEAssertionTime(USART_TypeDef *USARTx, uint32_t /** * @brief Return DEAT (Driver Enable Assertion Time) - * @note Macro @ref IS_UART_DRIVER_ENABLE_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_DRIVER_ENABLE_INSTANCE(USARTx) can be used to check whether or not * Driver Enable feature is supported by the USARTx instance. * @rmtoll CR1 DEAT LL_USART_GetDEAssertionTime * @param USARTx USART Instance @@ -2546,7 +2546,7 @@ __STATIC_INLINE uint32_t LL_USART_GetDEAssertionTime(USART_TypeDef *USARTx) /** * @brief Enable Driver Enable (DE) Mode - * @note Macro @ref IS_UART_DRIVER_ENABLE_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_DRIVER_ENABLE_INSTANCE(USARTx) can be used to check whether or not * Driver Enable feature is supported by the USARTx instance. * @rmtoll CR3 DEM LL_USART_EnableDEMode * @param USARTx USART Instance @@ -2559,7 +2559,7 @@ __STATIC_INLINE void LL_USART_EnableDEMode(USART_TypeDef *USARTx) /** * @brief Disable Driver Enable (DE) Mode - * @note Macro @ref IS_UART_DRIVER_ENABLE_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_DRIVER_ENABLE_INSTANCE(USARTx) can be used to check whether or not * Driver Enable feature is supported by the USARTx instance. * @rmtoll CR3 DEM LL_USART_DisableDEMode * @param USARTx USART Instance @@ -2572,7 +2572,7 @@ __STATIC_INLINE void LL_USART_DisableDEMode(USART_TypeDef *USARTx) /** * @brief Indicate if Driver Enable (DE) Mode is enabled - * @note Macro @ref IS_UART_DRIVER_ENABLE_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_DRIVER_ENABLE_INSTANCE(USARTx) can be used to check whether or not * Driver Enable feature is supported by the USARTx instance. * @rmtoll CR3 DEM LL_USART_IsEnabledDEMode * @param USARTx USART Instance @@ -2585,7 +2585,7 @@ __STATIC_INLINE uint32_t LL_USART_IsEnabledDEMode(USART_TypeDef *USARTx) /** * @brief Select Driver Enable Polarity - * @note Macro @ref IS_UART_DRIVER_ENABLE_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_DRIVER_ENABLE_INSTANCE(USARTx) can be used to check whether or not * Driver Enable feature is supported by the USARTx instance. * @rmtoll CR3 DEP LL_USART_SetDESignalPolarity * @param USARTx USART Instance @@ -2601,7 +2601,7 @@ __STATIC_INLINE void LL_USART_SetDESignalPolarity(USART_TypeDef *USARTx, uint32_ /** * @brief Return Driver Enable Polarity - * @note Macro @ref IS_UART_DRIVER_ENABLE_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_DRIVER_ENABLE_INSTANCE(USARTx) can be used to check whether or not * Driver Enable feature is supported by the USARTx instance. * @rmtoll CR3 DEP LL_USART_GetDESignalPolarity * @param USARTx USART Instance @@ -2665,7 +2665,7 @@ __STATIC_INLINE void LL_USART_ConfigAsyncMode(USART_TypeDef *USARTx) * - IREN bit in the USART_CR3 register, * - HDSEL bit in the USART_CR3 register. * This function also sets the USART in Synchronous mode. - * @note Macro @ref IS_USART_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not * Synchronous mode is supported by the USARTx instance. * @note Call of this function is equivalent to following function call sequence : * - Clear LINEN in CR2 using @ref LL_USART_DisableLIN() function @@ -2704,7 +2704,7 @@ __STATIC_INLINE void LL_USART_ConfigSyncMode(USART_TypeDef *USARTx) * - IREN bit in the USART_CR3 register, * - HDSEL bit in the USART_CR3 register. * This function also set the UART/USART in LIN mode. - * @note Macro @ref IS_UART_LIN_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_LIN_INSTANCE(USARTx) can be used to check whether or not * LIN feature is supported by the USARTx instance. * @note Call of this function is equivalent to following function call sequence : * - Clear CLKEN in CR2 using @ref LL_USART_DisableSCLKOutput() function @@ -2745,7 +2745,7 @@ __STATIC_INLINE void LL_USART_ConfigLINMode(USART_TypeDef *USARTx) * - SCEN bit in the USART_CR3 register, * - IREN bit in the USART_CR3 register, * This function also sets the UART/USART in Half Duplex mode. - * @note Macro @ref IS_UART_HALFDUPLEX_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_HALFDUPLEX_INSTANCE(USARTx) can be used to check whether or not * Half-Duplex mode is supported by the USARTx instance. * @note Call of this function is equivalent to following function call sequence : * - Clear LINEN in CR2 using @ref LL_USART_DisableLIN() function @@ -2785,7 +2785,7 @@ __STATIC_INLINE void LL_USART_ConfigHalfDuplexMode(USART_TypeDef *USARTx) * This function also configures Stop bits to 1.5 bits and * sets the USART in Smartcard mode (SCEN bit). * Clock Output is also enabled (CLKEN). - * @note Macro @ref IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not * Smartcard feature is supported by the USARTx instance. * @note Call of this function is equivalent to following function call sequence : * - Clear LINEN in CR2 using @ref LL_USART_DisableLIN() function @@ -2828,7 +2828,7 @@ __STATIC_INLINE void LL_USART_ConfigSmartcardMode(USART_TypeDef *USARTx) * - SCEN bit in the USART_CR3 register, * - HDSEL bit in the USART_CR3 register. * This function also sets the UART/USART in IRDA mode (IREN bit). - * @note Macro @ref IS_IRDA_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_IRDA_INSTANCE(USARTx) can be used to check whether or not * IrDA feature is supported by the USARTx instance. * @note Call of this function is equivalent to following function call sequence : * - Clear LINEN in CR2 using @ref LL_USART_DisableLIN() function @@ -2966,7 +2966,7 @@ __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_IDLE(USART_TypeDef *USARTx) /** * @brief Check if the USART Read Data Register or USART RX FIFO Not Empty Flag is set or not - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll ISR RXNE_RXFNE LL_USART_IsActiveFlag_RXNE_RXFNE * @param USARTx USART Instance @@ -2993,7 +2993,7 @@ __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_TC(USART_TypeDef *USARTx) /** * @brief Check if the USART Transmit Data Register Empty or USART TX FIFO Not Full Flag is set or not - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll ISR TXE_TXFNF LL_USART_IsActiveFlag_TXE_TXFNF * @param USARTx USART Instance @@ -3006,7 +3006,7 @@ __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_TXE_TXFNF(USART_TypeDef *USARTx) /** * @brief Check if the USART LIN Break Detection Flag is set or not - * @note Macro @ref IS_UART_LIN_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_LIN_INSTANCE(USARTx) can be used to check whether or not * LIN feature is supported by the USARTx instance. * @rmtoll ISR LBDF LL_USART_IsActiveFlag_LBD * @param USARTx USART Instance @@ -3019,7 +3019,7 @@ __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_LBD(USART_TypeDef *USARTx) /** * @brief Check if the USART CTS interrupt Flag is set or not - * @note Macro @ref IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not * Hardware Flow control feature is supported by the USARTx instance. * @rmtoll ISR CTSIF LL_USART_IsActiveFlag_nCTS * @param USARTx USART Instance @@ -3032,7 +3032,7 @@ __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_nCTS(USART_TypeDef *USARTx) /** * @brief Check if the USART CTS Flag is set or not - * @note Macro @ref IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not * Hardware Flow control feature is supported by the USARTx instance. * @rmtoll ISR CTS LL_USART_IsActiveFlag_CTS * @param USARTx USART Instance @@ -3056,7 +3056,7 @@ __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_RTO(USART_TypeDef *USARTx) /** * @brief Check if the USART End Of Block Flag is set or not - * @note Macro @ref IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not * Smartcard feature is supported by the USARTx instance. * @rmtoll ISR EOBF LL_USART_IsActiveFlag_EOB * @param USARTx USART Instance @@ -3069,7 +3069,7 @@ __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_EOB(USART_TypeDef *USARTx) /** * @brief Check if the SPI Slave Underrun error flag is set or not - * @note Macro @ref IS_UART_SPI_SLAVE_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_SPI_SLAVE_INSTANCE(USARTx) can be used to check whether or not * SPI Slave mode feature is supported by the USARTx instance. * @rmtoll ISR UDR LL_USART_IsActiveFlag_UDR * @param USARTx USART Instance @@ -3082,7 +3082,7 @@ __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_UDR(USART_TypeDef *USARTx) /** * @brief Check if the USART Auto-Baud Rate Error Flag is set or not - * @note Macro @ref IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(USARTx) can be used to check whether or not * Auto Baud Rate detection feature is supported by the USARTx instance. * @rmtoll ISR ABRE LL_USART_IsActiveFlag_ABRE * @param USARTx USART Instance @@ -3095,7 +3095,7 @@ __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_ABRE(USART_TypeDef *USARTx) /** * @brief Check if the USART Auto-Baud Rate Flag is set or not - * @note Macro @ref IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(USARTx) can be used to check whether or not * Auto Baud Rate detection feature is supported by the USARTx instance. * @rmtoll ISR ABRF LL_USART_IsActiveFlag_ABR * @param USARTx USART Instance @@ -3152,7 +3152,7 @@ __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_RWU(USART_TypeDef *USARTx) /** * @brief Check if the USART Wake Up from stop mode Flag is set or not - * @note Macro @ref IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can be used to check whether or not * Wake-up from Stop mode feature is supported by the USARTx instance. * @rmtoll ISR WUF LL_USART_IsActiveFlag_WKUP * @param USARTx USART Instance @@ -3187,7 +3187,7 @@ __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_REACK(USART_TypeDef *USARTx) /** * @brief Check if the USART TX FIFO Empty Flag is set or not - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll ISR TXFE LL_USART_IsActiveFlag_TXFE * @param USARTx USART Instance @@ -3200,7 +3200,7 @@ __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_TXFE(USART_TypeDef *USARTx) /** * @brief Check if the USART RX FIFO Full Flag is set or not - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll ISR RXFF LL_USART_IsActiveFlag_RXFF * @param USARTx USART Instance @@ -3224,7 +3224,7 @@ __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_TCBGT(USART_TypeDef *USARTx) /** * @brief Check if the USART TX FIFO Threshold Flag is set or not - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll ISR TXFT LL_USART_IsActiveFlag_TXFT * @param USARTx USART Instance @@ -3237,7 +3237,7 @@ __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_TXFT(USART_TypeDef *USARTx) /** * @brief Check if the USART RX FIFO Threshold Flag is set or not - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll ISR RXFT LL_USART_IsActiveFlag_RXFT * @param USARTx USART Instance @@ -3305,7 +3305,7 @@ __STATIC_INLINE void LL_USART_ClearFlag_IDLE(USART_TypeDef *USARTx) /** * @brief Clear TX FIFO Empty Flag - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll ICR TXFECF LL_USART_ClearFlag_TXFE * @param USARTx USART Instance @@ -3340,7 +3340,7 @@ __STATIC_INLINE void LL_USART_ClearFlag_TCBGT(USART_TypeDef *USARTx) /** * @brief Clear LIN Break Detection Flag - * @note Macro @ref IS_UART_LIN_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_LIN_INSTANCE(USARTx) can be used to check whether or not * LIN feature is supported by the USARTx instance. * @rmtoll ICR LBDCF LL_USART_ClearFlag_LBD * @param USARTx USART Instance @@ -3353,7 +3353,7 @@ __STATIC_INLINE void LL_USART_ClearFlag_LBD(USART_TypeDef *USARTx) /** * @brief Clear CTS Interrupt Flag - * @note Macro @ref IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not * Hardware Flow control feature is supported by the USARTx instance. * @rmtoll ICR CTSCF LL_USART_ClearFlag_nCTS * @param USARTx USART Instance @@ -3377,7 +3377,7 @@ __STATIC_INLINE void LL_USART_ClearFlag_RTO(USART_TypeDef *USARTx) /** * @brief Clear End Of Block Flag - * @note Macro @ref IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not * Smartcard feature is supported by the USARTx instance. * @rmtoll ICR EOBCF LL_USART_ClearFlag_EOB * @param USARTx USART Instance @@ -3390,7 +3390,7 @@ __STATIC_INLINE void LL_USART_ClearFlag_EOB(USART_TypeDef *USARTx) /** * @brief Clear SPI Slave Underrun Flag - * @note Macro @ref IS_UART_SPI_SLAVE_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_SPI_SLAVE_INSTANCE(USARTx) can be used to check whether or not * SPI Slave mode feature is supported by the USARTx instance. * @rmtoll ICR UDRCF LL_USART_ClearFlag_UDR * @param USARTx USART Instance @@ -3414,7 +3414,7 @@ __STATIC_INLINE void LL_USART_ClearFlag_CM(USART_TypeDef *USARTx) /** * @brief Clear Wake Up from stop mode Flag - * @note Macro @ref IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can be used to check whether or not * Wake-up from Stop mode feature is supported by the USARTx instance. * @rmtoll ICR WUCF LL_USART_ClearFlag_WKUP * @param USARTx USART Instance @@ -3449,7 +3449,7 @@ __STATIC_INLINE void LL_USART_EnableIT_IDLE(USART_TypeDef *USARTx) /** * @brief Enable RX Not Empty and RX FIFO Not Empty Interrupt - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll CR1 RXNEIE_RXFNEIE LL_USART_EnableIT_RXNE_RXFNE * @param USARTx USART Instance @@ -3476,7 +3476,7 @@ __STATIC_INLINE void LL_USART_EnableIT_TC(USART_TypeDef *USARTx) /** * @brief Enable TX Empty and TX FIFO Not Full Interrupt - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll CR1 TXEIE_TXFNFIE LL_USART_EnableIT_TXE_TXFNF * @param USARTx USART Instance @@ -3522,7 +3522,7 @@ __STATIC_INLINE void LL_USART_EnableIT_RTO(USART_TypeDef *USARTx) /** * @brief Enable End Of Block Interrupt - * @note Macro @ref IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not * Smartcard feature is supported by the USARTx instance. * @rmtoll CR1 EOBIE LL_USART_EnableIT_EOB * @param USARTx USART Instance @@ -3535,7 +3535,7 @@ __STATIC_INLINE void LL_USART_EnableIT_EOB(USART_TypeDef *USARTx) /** * @brief Enable TX FIFO Empty Interrupt - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll CR1 TXFEIE LL_USART_EnableIT_TXFE * @param USARTx USART Instance @@ -3559,7 +3559,7 @@ __STATIC_INLINE void LL_USART_EnableIT_RXFF(USART_TypeDef *USARTx) /** * @brief Enable LIN Break Detection Interrupt - * @note Macro @ref IS_UART_LIN_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_LIN_INSTANCE(USARTx) can be used to check whether or not * LIN feature is supported by the USARTx instance. * @rmtoll CR2 LBDIE LL_USART_EnableIT_LBD * @param USARTx USART Instance @@ -3587,7 +3587,7 @@ __STATIC_INLINE void LL_USART_EnableIT_ERROR(USART_TypeDef *USARTx) /** * @brief Enable CTS Interrupt - * @note Macro @ref IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not * Hardware Flow control feature is supported by the USARTx instance. * @rmtoll CR3 CTSIE LL_USART_EnableIT_CTS * @param USARTx USART Instance @@ -3600,7 +3600,7 @@ __STATIC_INLINE void LL_USART_EnableIT_CTS(USART_TypeDef *USARTx) /** * @brief Enable Wake Up from Stop Mode Interrupt - * @note Macro @ref IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can be used to check whether or not * Wake-up from Stop mode feature is supported by the USARTx instance. * @rmtoll CR3 WUFIE LL_USART_EnableIT_WKUP * @param USARTx USART Instance @@ -3613,7 +3613,7 @@ __STATIC_INLINE void LL_USART_EnableIT_WKUP(USART_TypeDef *USARTx) /** * @brief Enable TX FIFO Threshold Interrupt - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll CR3 TXFTIE LL_USART_EnableIT_TXFT * @param USARTx USART Instance @@ -3626,7 +3626,7 @@ __STATIC_INLINE void LL_USART_EnableIT_TXFT(USART_TypeDef *USARTx) /** * @brief Enable Smartcard Transmission Complete Before Guard Time Interrupt - * @note Macro @ref IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not * Smartcard feature is supported by the USARTx instance. * @rmtoll CR3 TCBGTIE LL_USART_EnableIT_TCBGT * @param USARTx USART Instance @@ -3639,7 +3639,7 @@ __STATIC_INLINE void LL_USART_EnableIT_TCBGT(USART_TypeDef *USARTx) /** * @brief Enable RX FIFO Threshold Interrupt - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll CR3 RXFTIE LL_USART_EnableIT_RXFT * @param USARTx USART Instance @@ -3666,7 +3666,7 @@ __STATIC_INLINE void LL_USART_DisableIT_IDLE(USART_TypeDef *USARTx) /** * @brief Disable RX Not Empty and RX FIFO Not Empty Interrupt - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll CR1 RXNEIE_RXFNEIE LL_USART_DisableIT_RXNE_RXFNE * @param USARTx USART Instance @@ -3693,7 +3693,7 @@ __STATIC_INLINE void LL_USART_DisableIT_TC(USART_TypeDef *USARTx) /** * @brief Disable TX Empty and TX FIFO Not Full Interrupt - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll CR1 TXEIE_TXFNFIE LL_USART_DisableIT_TXE_TXFNF * @param USARTx USART Instance @@ -3739,7 +3739,7 @@ __STATIC_INLINE void LL_USART_DisableIT_RTO(USART_TypeDef *USARTx) /** * @brief Disable End Of Block Interrupt - * @note Macro @ref IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not * Smartcard feature is supported by the USARTx instance. * @rmtoll CR1 EOBIE LL_USART_DisableIT_EOB * @param USARTx USART Instance @@ -3752,7 +3752,7 @@ __STATIC_INLINE void LL_USART_DisableIT_EOB(USART_TypeDef *USARTx) /** * @brief Disable TX FIFO Empty Interrupt - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll CR1 TXFEIE LL_USART_DisableIT_TXFE * @param USARTx USART Instance @@ -3765,7 +3765,7 @@ __STATIC_INLINE void LL_USART_DisableIT_TXFE(USART_TypeDef *USARTx) /** * @brief Disable RX FIFO Full Interrupt - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll CR1 RXFFIE LL_USART_DisableIT_RXFF * @param USARTx USART Instance @@ -3778,7 +3778,7 @@ __STATIC_INLINE void LL_USART_DisableIT_RXFF(USART_TypeDef *USARTx) /** * @brief Disable LIN Break Detection Interrupt - * @note Macro @ref IS_UART_LIN_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_LIN_INSTANCE(USARTx) can be used to check whether or not * LIN feature is supported by the USARTx instance. * @rmtoll CR2 LBDIE LL_USART_DisableIT_LBD * @param USARTx USART Instance @@ -3806,7 +3806,7 @@ __STATIC_INLINE void LL_USART_DisableIT_ERROR(USART_TypeDef *USARTx) /** * @brief Disable CTS Interrupt - * @note Macro @ref IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not * Hardware Flow control feature is supported by the USARTx instance. * @rmtoll CR3 CTSIE LL_USART_DisableIT_CTS * @param USARTx USART Instance @@ -3819,7 +3819,7 @@ __STATIC_INLINE void LL_USART_DisableIT_CTS(USART_TypeDef *USARTx) /** * @brief Disable Wake Up from Stop Mode Interrupt - * @note Macro @ref IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can be used to check whether or not * Wake-up from Stop mode feature is supported by the USARTx instance. * @rmtoll CR3 WUFIE LL_USART_DisableIT_WKUP * @param USARTx USART Instance @@ -3832,7 +3832,7 @@ __STATIC_INLINE void LL_USART_DisableIT_WKUP(USART_TypeDef *USARTx) /** * @brief Disable TX FIFO Threshold Interrupt - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll CR3 TXFTIE LL_USART_DisableIT_TXFT * @param USARTx USART Instance @@ -3845,7 +3845,7 @@ __STATIC_INLINE void LL_USART_DisableIT_TXFT(USART_TypeDef *USARTx) /** * @brief Disable Smartcard Transmission Complete Before Guard Time Interrupt - * @note Macro @ref IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not * Smartcard feature is supported by the USARTx instance. * @rmtoll CR3 TCBGTIE LL_USART_DisableIT_TCBGT * @param USARTx USART Instance @@ -3858,7 +3858,7 @@ __STATIC_INLINE void LL_USART_DisableIT_TCBGT(USART_TypeDef *USARTx) /** * @brief Disable RX FIFO Threshold Interrupt - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll CR3 RXFTIE LL_USART_DisableIT_RXFT * @param USARTx USART Instance @@ -3885,7 +3885,7 @@ __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_IDLE(USART_TypeDef *USARTx) /** * @brief Check if the USART RX Not Empty and USART RX FIFO Not Empty Interrupt is enabled or disabled. - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll CR1 RXNEIE_RXFNEIE LL_USART_IsEnabledIT_RXNE_RXFNE * @param USARTx USART Instance @@ -3912,7 +3912,7 @@ __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_TC(USART_TypeDef *USARTx) /** * @brief Check if the USART TX Empty and USART TX FIFO Not Full Interrupt is enabled or disabled - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll CR1 TXEIE_TXFNFIE LL_USART_IsEnabledIT_TXE_TXFNF * @param USARTx USART Instance @@ -3958,7 +3958,7 @@ __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_RTO(USART_TypeDef *USARTx) /** * @brief Check if the USART End Of Block Interrupt is enabled or disabled. - * @note Macro @ref IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not * Smartcard feature is supported by the USARTx instance. * @rmtoll CR1 EOBIE LL_USART_IsEnabledIT_EOB * @param USARTx USART Instance @@ -3971,7 +3971,7 @@ __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_EOB(USART_TypeDef *USARTx) /** * @brief Check if the USART TX FIFO Empty Interrupt is enabled or disabled - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll CR1 TXFEIE LL_USART_IsEnabledIT_TXFE * @param USARTx USART Instance @@ -3984,7 +3984,7 @@ __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_TXFE(USART_TypeDef *USARTx) /** * @brief Check if the USART RX FIFO Full Interrupt is enabled or disabled - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll CR1 RXFFIE LL_USART_IsEnabledIT_RXFF * @param USARTx USART Instance @@ -3997,7 +3997,7 @@ __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_RXFF(USART_TypeDef *USARTx) /** * @brief Check if the USART LIN Break Detection Interrupt is enabled or disabled. - * @note Macro @ref IS_UART_LIN_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_LIN_INSTANCE(USARTx) can be used to check whether or not * LIN feature is supported by the USARTx instance. * @rmtoll CR2 LBDIE LL_USART_IsEnabledIT_LBD * @param USARTx USART Instance @@ -4021,7 +4021,7 @@ __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_ERROR(USART_TypeDef *USARTx) /** * @brief Check if the USART CTS Interrupt is enabled or disabled. - * @note Macro @ref IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not * Hardware Flow control feature is supported by the USARTx instance. * @rmtoll CR3 CTSIE LL_USART_IsEnabledIT_CTS * @param USARTx USART Instance @@ -4034,7 +4034,7 @@ __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_CTS(USART_TypeDef *USARTx) /** * @brief Check if the USART Wake Up from Stop Mode Interrupt is enabled or disabled. - * @note Macro @ref IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can be used to check whether or not * Wake-up from Stop mode feature is supported by the USARTx instance. * @rmtoll CR3 WUFIE LL_USART_IsEnabledIT_WKUP * @param USARTx USART Instance @@ -4047,7 +4047,7 @@ __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_WKUP(USART_TypeDef *USARTx) /** * @brief Check if USART TX FIFO Threshold Interrupt is enabled or disabled - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll CR3 TXFTIE LL_USART_IsEnabledIT_TXFT * @param USARTx USART Instance @@ -4060,7 +4060,7 @@ __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_TXFT(USART_TypeDef *USARTx) /** * @brief Check if the Smartcard Transmission Complete Before Guard Time Interrupt is enabled or disabled. - * @note Macro @ref IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not * Smartcard feature is supported by the USARTx instance. * @rmtoll CR3 TCBGTIE LL_USART_IsEnabledIT_TCBGT * @param USARTx USART Instance @@ -4073,7 +4073,7 @@ __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_TCBGT(USART_TypeDef *USARTx) /** * @brief Check if USART RX FIFO Threshold Interrupt is enabled or disabled - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll CR3 RXFTIE LL_USART_IsEnabledIT_RXFT * @param USARTx USART Instance @@ -4203,7 +4203,7 @@ __STATIC_INLINE uint32_t LL_USART_IsEnabledDMADeactOnRxErr(USART_TypeDef *USARTx */ __STATIC_INLINE uint32_t LL_USART_DMA_GetRegAddr(USART_TypeDef *USARTx, uint32_t Direction) { - register uint32_t data_reg_addr; + uint32_t data_reg_addr; if (Direction == LL_USART_DMA_REG_DATA_TRANSMIT) { @@ -4283,7 +4283,7 @@ __STATIC_INLINE void LL_USART_TransmitData9(USART_TypeDef *USARTx, uint16_t Valu /** * @brief Request an Automatic Baud Rate measurement on next received data frame - * @note Macro @ref IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(USARTx) can be used to check whether or not * Auto Baud Rate detection feature is supported by the USARTx instance. * @rmtoll RQR ABRRQ LL_USART_RequestAutoBaudRate * @param USARTx USART Instance @@ -4318,7 +4318,7 @@ __STATIC_INLINE void LL_USART_RequestEnterMuteMode(USART_TypeDef *USARTx) /** * @brief Request a Receive Data and FIFO flush - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @note Allows to discard the received data without reading them, and avoid an overrun * condition. @@ -4333,7 +4333,7 @@ __STATIC_INLINE void LL_USART_RequestRxDataFlush(USART_TypeDef *USARTx) /** * @brief Request a Transmit data and FIFO flush - * @note Macro @ref IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not + * @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not * FIFO mode feature is supported by the USARTx instance. * @rmtoll RQR TXFRQ LL_USART_RequestTxDataFlush * @param USARTx USART Instance diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_usb.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_usb.h index 503b12f..86b81da 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_usb.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_usb.h @@ -155,7 +155,7 @@ typedef struct typedef struct { - uint8_t dev_addr ; /*!< USB device address. + uint8_t dev_addr; /*!< USB device address. This parameter must be a number between Min_Data = 1 and Max_Data = 255 */ uint8_t ch_num; /*!< Host channel number. @@ -199,10 +199,10 @@ typedef struct uint32_t ErrCnt; /*!< Host channel error count.*/ - USB_OTG_URBStateTypeDef urb_state; /*!< URB state. + USB_OTG_URBStateTypeDef urb_state; /*!< URB state. This parameter can be any value of @ref USB_OTG_URBStateTypeDef */ - USB_OTG_HCStateTypeDef state; /*!< Host Channel state. + USB_OTG_HCStateTypeDef state; /*!< Host Channel state. This parameter can be any value of @ref USB_OTG_HCStateTypeDef */ } USB_OTG_HCTypeDef; #endif /* defined (USB_OTG_FS) || defined (USB_OTG_HS) */ @@ -237,11 +237,11 @@ typedef struct /** @defgroup USB_LL Device Speed * @{ */ -#define USBD_HS_SPEED 0U -#define USBD_HSINFS_SPEED 1U -#define USBH_HS_SPEED 0U -#define USBD_FS_SPEED 2U -#define USBH_FS_SPEED 1U +#define USBD_HS_SPEED 0U +#define USBD_HSINFS_SPEED 1U +#define USBH_HS_SPEED 0U +#define USBD_FS_SPEED 2U +#define USBH_FSLS_SPEED 1U /** * @} */ @@ -269,11 +269,11 @@ typedef struct * @{ */ #ifndef USBD_HS_TRDT_VALUE -#define USBD_HS_TRDT_VALUE 9U +#define USBD_HS_TRDT_VALUE 9U #endif /* USBD_HS_TRDT_VALUE */ #ifndef USBD_FS_TRDT_VALUE -#define USBD_FS_TRDT_VALUE 5U -#define USBD_DEFAULT_TRDT_VALUE 9U +#define USBD_FS_TRDT_VALUE 5U +#define USBD_DEFAULT_TRDT_VALUE 9U #endif /* USBD_HS_TRDT_VALUE */ /** * @} @@ -282,9 +282,9 @@ typedef struct /** @defgroup USB_LL_Core_MPS USB Low Layer Core MPS * @{ */ -#define USB_OTG_HS_MAX_PACKET_SIZE 512U -#define USB_OTG_FS_MAX_PACKET_SIZE 64U -#define USB_OTG_MAX_EP0_SIZE 64U +#define USB_OTG_HS_MAX_PACKET_SIZE 512U +#define USB_OTG_FS_MAX_PACKET_SIZE 64U +#define USB_OTG_MAX_EP0_SIZE 64U /** * @} */ @@ -402,7 +402,7 @@ typedef struct #define USBx_HC(i) ((USB_OTG_HostChannelTypeDef *)(USBx_BASE + USB_OTG_HOST_CHANNEL_BASE + ((i) * USB_OTG_HOST_CHANNEL_SIZE))) #endif /* defined (USB_OTG_FS) || defined (USB_OTG_HS) */ -#define EP_ADDR_MSK 0xFU +#define EP_ADDR_MSK 0xFU /** * @} */ @@ -467,13 +467,9 @@ HAL_StatusTypeDef USB_ResetPort(USB_OTG_GlobalTypeDef *USBx); HAL_StatusTypeDef USB_DriveVbus(USB_OTG_GlobalTypeDef *USBx, uint8_t state); uint32_t USB_GetHostSpeed(USB_OTG_GlobalTypeDef *USBx); uint32_t USB_GetCurrentFrame(USB_OTG_GlobalTypeDef *USBx); -HAL_StatusTypeDef USB_HC_Init(USB_OTG_GlobalTypeDef *USBx, - uint8_t ch_num, - uint8_t epnum, - uint8_t dev_address, - uint8_t speed, - uint8_t ep_type, - uint16_t mps); +HAL_StatusTypeDef USB_HC_Init(USB_OTG_GlobalTypeDef *USBx, uint8_t ch_num, + uint8_t epnum, uint8_t dev_address, uint8_t speed, + uint8_t ep_type, uint16_t mps); HAL_StatusTypeDef USB_HC_StartXfer(USB_OTG_GlobalTypeDef *USBx, USB_OTG_HCTypeDef *hc, uint8_t dma); uint32_t USB_HC_ReadInterrupt(USB_OTG_GlobalTypeDef *USBx); HAL_StatusTypeDef USB_HC_Halt(USB_OTG_GlobalTypeDef *USBx, uint8_t hc_num); diff --git a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_utils.h b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_utils.h index 3dc60e7..2833148 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_utils.h +++ b/Libraries/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_utils.h @@ -199,12 +199,12 @@ typedef struct /** @defgroup UTILS_EC_PACKAGETYPE PACKAGE TYPE * @{ */ -#if defined(SYSCFG_PKGR_PKG) +#if (STM32H7_DEV_ID == 0x450UL) #define LL_UTILS_PACKAGETYPE_LQFP100 LL_SYSCFG_LQFP100_PACKAGE /*!< LQFP100 package type */ #define LL_UTILS_PACKAGETYPE_TQFP144 LL_SYSCFG_TQFP144_PACKAGE /*!< TQFP144 package type */ #define LL_UTILS_PACKAGETYPE_TQFP176_UFBGA176 LL_SYSCFG_TQFP176_UFBGA176_PACKAGE /*!< TQFP176 or UFBGA176 package type */ #define LL_UTILS_PACKAGETYPE_LQFP208_TFBGA240 LL_SYSCFG_LQFP208_TFBGA240_PACKAGE /*!< LQFP208 or TFBGA240 package type */ -#else +#elif (STM32H7_DEV_ID == 0x480UL) #define LL_UTILS_PACKAGETYPE_LQFP64 0x00000000UL /*!< LQFP64 package type */ #define LL_UTILS_PACKAGETYPE_TFBGA100_LQFP100 0x00000001UL /*!< TFBGA100 or LQFP100 package type */ #define LL_UTILS_PACKAGETYPE_LQFP100_SMPS 0x00000002UL /*!< LQFP100 with SMPS package type */ @@ -218,7 +218,19 @@ typedef struct #define LL_UTILS_PACKAGETYPE_UFBGA176_SMPS 0x0000000AUL /*!< UFBGA176 with SMPS package type */ #define LL_UTILS_PACKAGETYPE_TFBGA216 0x0000000CUL /*!< TFBGA216 package type */ #define LL_UTILS_PACKAGETYPE_TFBGA225 0x0000000EUL /*!< TFBGA225 package type */ -#endif /* SYSCFG_PKGR_PKG */ +#elif (STM32H7_DEV_ID == 0x483UL) +#define LL_UTILS_PACKAGETYPE_VFQFPN68_INDUS LL_SYSCFG_VFQFPN68_INDUS_PACKAGE /*!< VFQFPN68 Industrial package type */ +#define LL_UTILS_PACKAGETYPE_TFBGA100_LQFP100 LL_SYSCFG_TFBGA100_LQFP100_PACKAGE /*!< TFBGA100 or LQFP100 Legacy package type */ +#define LL_UTILS_PACKAGETYPE_LQFP100_INDUS LL_SYSCFG_LQFP100_INDUS_PACKAGE /*!< LQFP100 Industrial package type */ +#define LL_UTILS_PACKAGETYPE_TFBGA100_INDUS LL_SYSCFG_TFBGA100_INDUS_PACKAGE /*!< TFBGA100 Industrial package type */ +#define LL_UTILS_PACKAGETYPE_WLCSP115_INDUS LL_SYSCFG_WLCSP115_INDUS_PACKAGE /*!< WLCSP115 Industrial package type */ +#define LL_UTILS_PACKAGETYPE_LQFP144 LL_SYSCFG_LQFP144_PACKAGE /*!< LQFP144 Legacy package type */ +#define LL_UTILS_PACKAGETYPE_UFBGA144 LL_SYSCFG_UFBGA144_PACKAGE /*!< UFBGA144 Legacy package type */ +#define LL_UTILS_PACKAGETYPE_LQFP144_INDUS LL_SYSCFG_LQFP144_INDUS_PACKAGE /*!< LQFP144 Industrial package type */ +#define LL_UTILS_PACKAGETYPE_UFBGA169_INDUS LL_SYSCFG_UFBGA169_INDUS_PACKAGE /*!< UFBGA169 Industrial package type */ +#define LL_UTILS_PACKAGETYPE_UFBGA176PLUS25_INDUS LL_SYSCFG_UFBGA176PLUS25_INDUS_PACKAGE /*!< UFBGA176+25 Industrial package type */ +#define LL_UTILS_PACKAGETYPE_LQFP176_INDUS LL_SYSCFG_LQFP176_INDUS_PACKAGE /*!< LQFP176 Industrial package type */ +#endif /* STM32H7_DEV_ID == 0x450UL */ /** * @} */ @@ -296,6 +308,15 @@ __STATIC_INLINE uint32_t LL_GetFlashSize(void) * @arg @ref LL_UTILS_PACKAGETYPE_UFBGA176_SMPS (*) * @arg @ref LL_UTILS_PACKAGETYPE_TFBGA216 (*) * @arg @ref LL_UTILS_PACKAGETYPE_TFBGA225 (*) + * @arg @ref LL_UTILS_PACKAGETYPE_VFQFPN68_INDUS (*) + * @arg @ref LL_UTILS_PACKAGETYPE_LQFP100_INDUS (*) + * @arg @ref LL_UTILS_PACKAGETYPE_TFBGA100_INDUS (*) + * @arg @ref LL_UTILS_PACKAGETYPE_WLCSP115_INDUS (*) + * @arg @ref LL_UTILS_PACKAGETYPE_UFBGA144 (*) + * @arg @ref LL_UTILS_PACKAGETYPE_LQFP144_INDUS (*) + * @arg @ref LL_UTILS_PACKAGETYPE_UFBGA169_INDUS (*) + * @arg @ref LL_UTILS_PACKAGETYPE_UFBGA176+25_INDUS (*) + * @arg @ref LL_UTILS_PACKAGETYPE_LQFP176_INDUS (*) * * (*) Packages available on some STM32H7 lines only. * @note For some SM32H7 lines, enabling the SYSCFG clock is mandatory. diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.c index 3e92312..159c3d9 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.c @@ -47,10 +47,10 @@ /* Private typedef -----------------------------------------------------------*/ /* Private define ------------------------------------------------------------*/ /** - * @brief STM32H7xx HAL Driver version number V1.8.0 + * @brief STM32H7xx HAL Driver version number V1.9.0 */ #define __STM32H7xx_HAL_VERSION_MAIN (0x01UL) /*!< [31:24] main version */ -#define __STM32H7xx_HAL_VERSION_SUB1 (0x08UL) /*!< [23:16] sub1 version */ +#define __STM32H7xx_HAL_VERSION_SUB1 (0x09UL) /*!< [23:16] sub1 version */ #define __STM32H7xx_HAL_VERSION_SUB2 (0x00UL) /*!< [15:8] sub2 version */ #define __STM32H7xx_HAL_VERSION_RC (0x00UL) /*!< [7:0] release candidate */ #define __STM32H7xx_HAL_VERSION ((__STM32H7xx_HAL_VERSION_MAIN << 24)\ @@ -267,11 +267,11 @@ __weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority) return HAL_ERROR; } - /* Configure the SysTick to have interrupt in 1ms time basis*/ - if (HAL_SYSTICK_Config(SystemCoreClock / (1000UL / (uint32_t)uwTickFreq)) > 0U) - { - return HAL_ERROR; - } + /* Configure the SysTick to have interrupt in 1ms time basis*/ + if (HAL_SYSTICK_Config(SystemCoreClock / (1000UL / (uint32_t)uwTickFreq)) > 0U) + { + return HAL_ERROR; + } /* Configure the SysTick IRQ priority */ if (TickPriority < (1UL << __NVIC_PRIO_BITS)) @@ -874,6 +874,42 @@ void HAL_SYSCFG_VDDMMC_CompensationCodeConfig(uint32_t SYSCFG_PMOSCode, uint32_t } #endif /* SYSCFG_CCCR_NCC_MMC */ +#if defined(SYSCFG_ADC2ALT_ADC2_ROUT0) +/** @brief SYSCFG ADC2 internal input alternate connection macros + * @param Adc2AltRout0 This parameter can be a value of : + * @arg @ref SYSCFG_ADC2_ROUT0_DAC1_1 DAC1_out1 connected to ADC2 VINP[16] + * @arg @ref SYSCFG_ADC2_ROUT0_VBAT4 VBAT/4 connected to ADC2 VINP[16] + */ +void HAL_SYSCFG_ADC2ALT_Rout0Config(uint32_t Adc2AltRout0) +{ + /* Check the parameters */ + assert_param(IS_SYSCFG_ADC2ALT_ROUT0(Adc2AltRout0)); + + MODIFY_REG(SYSCFG->ADC2ALT, SYSCFG_ADC2ALT_ADC2_ROUT0, Adc2AltRout0); +} +/** + * @} + */ +#endif /*SYSCFG_ADC2ALT_ADC2_ROUT0*/ + +#if defined(SYSCFG_ADC2ALT_ADC2_ROUT1) +/** @brief SYSCFG ADC2 internal input alternate connection macros + * @param Adc2AltRout1 This parameter can be a value of : + * @arg @ref SYSCFG_ADC2_ROUT1_DAC1_2 DAC1_out2 connected to ADC2 VINP[17] + * @arg @ref SYSCFG_ADC2_ROUT1_VREFINT VREFINT connected to ADC2 VINP[17] + */ +void HAL_SYSCFG_ADC2ALT_Rout1Config(uint32_t Adc2AltRout1) +{ + /* Check the parameters */ + assert_param(IS_SYSCFG_ADC2ALT_ROUT1(Adc2AltRout1)); + + MODIFY_REG(SYSCFG->ADC2ALT, SYSCFG_ADC2ALT_ADC2_ROUT1, Adc2AltRout1); +} +/** + * @} + */ +#endif /*SYSCFG_ADC2ALT_ADC2_ROUT1*/ + /** * @brief Enable the Debug Module during Domain1/CDomain SLEEP mode * @retval None diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_adc.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_adc.c index cce8bf9..db86597 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_adc.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_adc.c @@ -25,6 +25,8 @@ ============================================================================== [..] (+) 16-bit, 14-bit, 12-bit, 10-bit or 8-bit configurable resolution. + Note: On devices STM32H72xx and STM32H73xx, these resolution are applicable to instances ADC1 and ADC2. + ADC3 is featuring resolutions 12-bit, 10-bit, 8-bit, 6-bit. (+) Interrupt generation at the end of regular conversion and in case of analog watchdog or overrun events. @@ -327,6 +329,14 @@ ADC_CFGR_EXTEN | ADC_CFGR_EXTSEL)) /*!< ADC_CFGR fields of parameters that can be updated when no regular conversion is on-going */ +#if defined(ADC_VER_V5_V90) +#define ADC3_CFGR_FIELDS_1 ((ADC3_CFGR_RES | ADC3_CFGR_ALIGN |\ + ADC_CFGR_CONT | ADC_CFGR_OVRMOD |\ + ADC_CFGR_DISCEN | ADC_CFGR_DISCNUM |\ + ADC_CFGR_EXTEN | ADC_CFGR_EXTSEL)) /*!< ADC_CFGR fields of parameters that can be updated + when no regular conversion is on-going */ +#endif + #define ADC_CFGR2_FIELDS ((uint32_t)(ADC_CFGR2_ROVSE | ADC_CFGR2_OVSR |\ ADC_CFGR2_OVSS | ADC_CFGR2_TROVS |\ ADC_CFGR2_ROVSM)) /*!< ADC_CFGR2 fields of parameters that can be updated when no conversion @@ -346,7 +356,7 @@ /* - ADC clock with prescaler 256 */ /* 823 * 256 = 210688 clock cycles max */ /* Unit: cycles of CPU clock. */ -#define ADC_CONVERSION_TIME_MAX_CPU_CYCLES ((uint32_t) 210688) /*!< ADC conversion completion time-out value */ +#define ADC_CONVERSION_TIME_MAX_CPU_CYCLES (210688UL) /*!< ADC conversion completion time-out value */ /** * @} @@ -575,26 +585,46 @@ HAL_StatusTypeDef HAL_ADC_Init(ADC_HandleTypeDef *hadc) /* - discontinuous mode Init.DiscontinuousConvMode */ /* - discontinuous mode channel count Init.NbrOfDiscConversion */ #if defined(ADC_VER_V5_3) - tmpCFGR = (ADC_CFGR_CONTINUOUS((uint32_t)hadc->Init.ContinuousConvMode) | - hadc->Init.Overrun | - hadc->Init.Resolution | - ADC_CFGR_REG_DISCONTINUOUS((uint32_t)hadc->Init.DiscontinuousConvMode) ); -#else - if((HAL_GetREVID() > REV_ID_Y) && (ADC_RESOLUTION_8B == hadc->Init.Resolution)) + tmpCFGR = (ADC_CFGR_CONTINUOUS((uint32_t)hadc->Init.ContinuousConvMode) | + hadc->Init.Overrun | + hadc->Init.Resolution | + ADC_CFGR_REG_DISCONTINUOUS((uint32_t)hadc->Init.DiscontinuousConvMode)); + +#elif defined(ADC_VER_V5_V90) + if (hadc->Instance == ADC3) { - /* for STM32H7 silicon rev.B and above , ADC_CFGR_RES value for 8bits resolution is : b111 */ - tmpCFGR = (ADC_CFGR_CONTINUOUS((uint32_t)hadc->Init.ContinuousConvMode) | - hadc->Init.Overrun | - hadc->Init.Resolution |(ADC_CFGR_RES_1|ADC_CFGR_RES_0) | - ADC_CFGR_REG_DISCONTINUOUS((uint32_t)hadc->Init.DiscontinuousConvMode) ); + tmpCFGR = (ADC_CFGR_CONTINUOUS((uint32_t)hadc->Init.ContinuousConvMode) | + hadc->Init.Overrun | + hadc->Init.DataAlign | + ((__LL_ADC12_RESOLUTION_TO_ADC3(hadc->Init.Resolution) & (ADC_CFGR_RES_1 | ADC_CFGR_RES_0)) << 1UL) | + ADC_CFGR_REG_DISCONTINUOUS((uint32_t)hadc->Init.DiscontinuousConvMode)); } else { tmpCFGR = (ADC_CFGR_CONTINUOUS((uint32_t)hadc->Init.ContinuousConvMode) | hadc->Init.Overrun | hadc->Init.Resolution | - ADC_CFGR_REG_DISCONTINUOUS((uint32_t)hadc->Init.DiscontinuousConvMode) ); + ADC_CFGR_REG_DISCONTINUOUS((uint32_t)hadc->Init.DiscontinuousConvMode)); + } + +#else + + if ((HAL_GetREVID() > REV_ID_Y) && (ADC_RESOLUTION_8B == hadc->Init.Resolution)) + { + /* for STM32H7 silicon rev.B and above , ADC_CFGR_RES value for 8bits resolution is : b111 */ + tmpCFGR = (ADC_CFGR_CONTINUOUS((uint32_t)hadc->Init.ContinuousConvMode) | + hadc->Init.Overrun | + hadc->Init.Resolution | (ADC_CFGR_RES_1 | ADC_CFGR_RES_0) | + ADC_CFGR_REG_DISCONTINUOUS((uint32_t)hadc->Init.DiscontinuousConvMode)); + } + else + { + + tmpCFGR = (ADC_CFGR_CONTINUOUS((uint32_t)hadc->Init.ContinuousConvMode) | + hadc->Init.Overrun | + hadc->Init.Resolution | + ADC_CFGR_REG_DISCONTINUOUS((uint32_t)hadc->Init.DiscontinuousConvMode)); } #endif /* ADC_VER_V5_3 */ @@ -616,8 +646,24 @@ HAL_StatusTypeDef HAL_ADC_Init(ADC_HandleTypeDef *hadc) ); } + +#if defined(ADC_VER_V5_V90) + if (hadc->Instance == ADC3) + { + /* Update Configuration Register CFGR */ + MODIFY_REG(hadc->Instance->CFGR, ADC3_CFGR_FIELDS_1, tmpCFGR); + /* Configuration of sampling mode */ + MODIFY_REG(hadc->Instance->CFGR2, ADC3_CFGR2_BULB | ADC3_CFGR2_SMPTRIG, hadc->Init.SamplingMode); + } + else + { + /* Update Configuration Register CFGR */ + MODIFY_REG(hadc->Instance->CFGR, ADC_CFGR_FIELDS_1, tmpCFGR); + } +#else /* Update Configuration Register CFGR */ MODIFY_REG(hadc->Instance->CFGR, ADC_CFGR_FIELDS_1, tmpCFGR); +#endif /* Parameters update conditioned to ADC state: */ /* Parameters that can be updated when ADC is disabled or enabled without */ @@ -631,38 +677,102 @@ HAL_StatusTypeDef HAL_ADC_Init(ADC_HandleTypeDef *hadc) && (tmp_adc_is_conversion_on_going_injected == 0UL) ) { +#if defined(ADC_VER_V5_V90) + if (hadc->Instance == ADC3) + { + tmpCFGR = ( + ADC_CFGR_AUTOWAIT((uint32_t)hadc->Init.LowPowerAutoWait) | + ADC3_CFGR_DMACONTREQ((uint32_t)hadc->Init.DMAContinuousRequests)); + } + else + { + tmpCFGR = ( + ADC_CFGR_AUTOWAIT((uint32_t)hadc->Init.LowPowerAutoWait) | + ADC_CFGR_DMACONTREQ((uint32_t)hadc->Init.ConversionDataManagement)); + } +#else tmpCFGR = ( - ADC_CFGR_AUTOWAIT((uint32_t)hadc->Init.LowPowerAutoWait) | - ADC_CFGR_DMACONTREQ((uint32_t)hadc->Init.ConversionDataManagement)); + ADC_CFGR_AUTOWAIT((uint32_t)hadc->Init.LowPowerAutoWait) | + ADC_CFGR_DMACONTREQ((uint32_t)hadc->Init.ConversionDataManagement)); +#endif MODIFY_REG(hadc->Instance->CFGR, ADC_CFGR_FIELDS_2, tmpCFGR); if (hadc->Init.OversamplingMode == ENABLE) { +#if defined(ADC_VER_V5_V90) + if (hadc->Instance == ADC3) + { + assert_param(IS_ADC_OVERSAMPLING_RATIO_ADC3(hadc->Init.Oversampling.Ratio)); + } + else + { + assert_param(IS_ADC_OVERSAMPLING_RATIO(hadc->Init.Oversampling.Ratio)); + } +#else assert_param(IS_ADC_OVERSAMPLING_RATIO(hadc->Init.Oversampling.Ratio)); +#endif assert_param(IS_ADC_RIGHT_BIT_SHIFT(hadc->Init.Oversampling.RightBitShift)); assert_param(IS_ADC_TRIGGERED_OVERSAMPLING_MODE(hadc->Init.Oversampling.TriggeredMode)); assert_param(IS_ADC_REGOVERSAMPLING_MODE(hadc->Init.Oversampling.OversamplingStopReset)); - if ((hadc->Init.ExternalTrigConv == ADC_SOFTWARE_START) + if ((hadc->Init.ExternalTrigConv == ADC_SOFTWARE_START) || (hadc->Init.ExternalTrigConvEdge == ADC_EXTERNALTRIGCONVEDGE_NONE)) { /* Multi trigger is not applicable to software-triggered conversions */ assert_param((hadc->Init.Oversampling.TriggeredMode == ADC_TRIGGEREDMODE_SINGLE_TRIGGER)); } - /* Configuration of Oversampler: */ - /* - Oversampling Ratio */ - /* - Right bit shift */ - /* - Left bit shift */ - /* - Triggered mode */ - /* - Oversampling mode (continued/resumed) */ - MODIFY_REG(hadc->Instance->CFGR2, ADC_CFGR2_FIELDS, - ADC_CFGR2_ROVSE | - ((hadc->Init.Oversampling.Ratio - 1UL) << ADC_CFGR2_OVSR_Pos) | - hadc->Init.Oversampling.RightBitShift | - hadc->Init.Oversampling.TriggeredMode | - hadc->Init.Oversampling.OversamplingStopReset); +#if defined(ADC_VER_V5_V90) + if (hadc->Instance == ADC3) + { + /* Configuration of Oversampler: */ + /* - Oversampling Ratio */ + /* - Right bit shift */ + /* - Triggered mode */ + /* - Oversampling mode (continued/resumed) */ + MODIFY_REG(hadc->Instance->CFGR2, + ADC_CFGR2_OVSR | + ADC_CFGR2_OVSS | + ADC_CFGR2_TROVS | + ADC_CFGR2_ROVSM, + ADC_CFGR2_ROVSE | + hadc->Init.Oversampling.Ratio | + hadc->Init.Oversampling.RightBitShift | + hadc->Init.Oversampling.TriggeredMode | + hadc->Init.Oversampling.OversamplingStopReset + ); + } + else + { + + /* Configuration of Oversampler: */ + /* - Oversampling Ratio */ + /* - Right bit shift */ + /* - Left bit shift */ + /* - Triggered mode */ + /* - Oversampling mode (continued/resumed) */ + MODIFY_REG(hadc->Instance->CFGR2, ADC_CFGR2_FIELDS, + ADC_CFGR2_ROVSE | + ((hadc->Init.Oversampling.Ratio - 1UL) << ADC_CFGR2_OVSR_Pos) | + hadc->Init.Oversampling.RightBitShift | + hadc->Init.Oversampling.TriggeredMode | + hadc->Init.Oversampling.OversamplingStopReset); + } +#else + /* Configuration of Oversampler: */ + /* - Oversampling Ratio */ + /* - Right bit shift */ + /* - Left bit shift */ + /* - Triggered mode */ + /* - Oversampling mode (continued/resumed) */ + MODIFY_REG(hadc->Instance->CFGR2, ADC_CFGR2_FIELDS, + ADC_CFGR2_ROVSE | + ((hadc->Init.Oversampling.Ratio - 1UL) << ADC_CFGR2_OVSR_Pos) | + hadc->Init.Oversampling.RightBitShift | + hadc->Init.Oversampling.TriggeredMode | + hadc->Init.Oversampling.OversamplingStopReset); +#endif } else @@ -673,9 +783,16 @@ HAL_StatusTypeDef HAL_ADC_Init(ADC_HandleTypeDef *hadc) /* Set the LeftShift parameter: it is applied to the final result with or without oversampling */ MODIFY_REG(hadc->Instance->CFGR2, ADC_CFGR2_LSHIFT, hadc->Init.LeftBitShift); - +#if defined(ADC_VER_V5_V90) + if (hadc->Instance != ADC3) + { + /* Configure the BOOST Mode */ + ADC_ConfigureBoostMode(hadc); + } +#else /* Configure the BOOST Mode */ ADC_ConfigureBoostMode(hadc); +#endif } /* Configuration of regular group sequencer: */ @@ -803,11 +920,11 @@ HAL_StatusTypeDef HAL_ADC_DeInit(ADC_HandleTypeDef *hadc) /* Reset register CFGR */ CLEAR_BIT(hadc->Instance->CFGR, ADC_CFGR_AWD1CH | ADC_CFGR_JAUTO | ADC_CFGR_JAWD1EN | - ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL | ADC_CFGR_JQM | - ADC_CFGR_JDISCEN | ADC_CFGR_DISCNUM | ADC_CFGR_DISCEN | - ADC_CFGR_AUTDLY | ADC_CFGR_CONT | ADC_CFGR_OVRMOD | - ADC_CFGR_EXTEN | ADC_CFGR_EXTSEL | - ADC_CFGR_RES | ADC_CFGR_DMNGT); + ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL | ADC_CFGR_JQM | + ADC_CFGR_JDISCEN | ADC_CFGR_DISCNUM | ADC_CFGR_DISCEN | + ADC_CFGR_AUTDLY | ADC_CFGR_CONT | ADC_CFGR_OVRMOD | + ADC_CFGR_EXTEN | ADC_CFGR_EXTSEL | + ADC_CFGR_RES | ADC_CFGR_DMNGT); SET_BIT(hadc->Instance->CFGR, ADC_CFGR_JQDIS); /* Reset register CFGR2 */ @@ -822,6 +939,30 @@ HAL_StatusTypeDef HAL_ADC_DeInit(ADC_HandleTypeDef *hadc) ADC_SMPR2_SMP15 | ADC_SMPR2_SMP14 | ADC_SMPR2_SMP13 | ADC_SMPR2_SMP12 | ADC_SMPR2_SMP11 | ADC_SMPR2_SMP10); +#if defined(ADC_VER_V5_V90) + if (hadc->Instance == ADC3) + { + /* Reset register LTR1 and HTR1 */ + CLEAR_BIT(hadc->Instance->LTR1_TR1, ADC3_TR1_HT1 | ADC3_TR1_LT1); + CLEAR_BIT(hadc->Instance->HTR1_TR2, ADC3_TR2_HT2 | ADC3_TR2_LT2); + + /* Reset register LTR3 and HTR3 */ + CLEAR_BIT(hadc->Instance->RES1_TR3, ADC3_TR3_HT3 | ADC3_TR3_LT3); + } + else + { + CLEAR_BIT(hadc->Instance->LTR1_TR1, ADC_LTR_LT); + CLEAR_BIT(hadc->Instance->HTR1_TR2, ADC_HTR_HT); + + /* Reset register LTR2 and HTR2*/ + CLEAR_BIT(hadc->Instance->LTR2_DIFSEL, ADC_LTR_LT); + CLEAR_BIT(hadc->Instance->HTR2_CALFACT, ADC_HTR_HT); + + /* Reset register LTR3 and HTR3 */ + CLEAR_BIT(hadc->Instance->LTR3_RES10, ADC_LTR_LT); + CLEAR_BIT(hadc->Instance->HTR3_RES11, ADC_HTR_HT); + } +#else /* Reset register LTR1 and HTR1 */ CLEAR_BIT(hadc->Instance->LTR1, ADC_LTR_LT); CLEAR_BIT(hadc->Instance->HTR1, ADC_HTR_HT); @@ -833,6 +974,8 @@ HAL_StatusTypeDef HAL_ADC_DeInit(ADC_HandleTypeDef *hadc) /* Reset register LTR3 and HTR3 */ CLEAR_BIT(hadc->Instance->LTR3, ADC_LTR_LT); CLEAR_BIT(hadc->Instance->HTR3, ADC_HTR_HT); +#endif /* ADC_VER_V5_V90 */ + /* Reset register SQR1 */ CLEAR_BIT(hadc->Instance->SQR1, ADC_SQR1_SQ4 | ADC_SQR1_SQ3 | ADC_SQR1_SQ2 | @@ -872,12 +1015,30 @@ HAL_StatusTypeDef HAL_ADC_DeInit(ADC_HandleTypeDef *hadc) /* Reset register AWD3CR */ CLEAR_BIT(hadc->Instance->AWD3CR, ADC_AWD3CR_AWD3CH); +#if defined(ADC_VER_V5_V90) + if (hadc->Instance == ADC3) + { + /* Reset register DIFSEL */ + CLEAR_BIT(hadc->Instance->LTR2_DIFSEL, ADC_DIFSEL_DIFSEL); + + /* Reset register CALFACT */ + CLEAR_BIT(hadc->Instance->HTR2_CALFACT, ADC_CALFACT_CALFACT_D | ADC_CALFACT_CALFACT_S); + } + else + { + /* Reset register DIFSEL */ + CLEAR_BIT(hadc->Instance->DIFSEL_RES12, ADC_DIFSEL_DIFSEL); + + /* Reset register CALFACT */ + CLEAR_BIT(hadc->Instance->CALFACT_RES13, ADC_CALFACT_CALFACT_D | ADC_CALFACT_CALFACT_S); + } +#else /* Reset register DIFSEL */ CLEAR_BIT(hadc->Instance->DIFSEL, ADC_DIFSEL_DIFSEL); /* Reset register CALFACT */ CLEAR_BIT(hadc->Instance->CALFACT, ADC_CALFACT_CALFACT_D | ADC_CALFACT_CALFACT_S); - +#endif /* ADC_VER_V5_V90 */ /* ========== Reset common ADC registers ========== */ @@ -2035,7 +2196,21 @@ HAL_StatusTypeDef HAL_ADC_Start_DMA(ADC_HandleTypeDef *hadc, uint32_t *pData, ui __HAL_ADC_ENABLE_IT(hadc, ADC_IT_OVR); /* Enable ADC DMA mode*/ +#if defined(ADC_VER_V5_V90) + if (hadc->Instance == ADC3) + { + LL_ADC_REG_SetDMATransferMode(hadc->Instance, ADC3_CFGR_DMACONTREQ((uint32_t)hadc->Init.DMAContinuousRequests)); + LL_ADC_EnableDMAReq(hadc->Instance); + } + else + { + LL_ADC_REG_SetDataTransferMode(hadc->Instance, ADC_CFGR_DMACONTREQ((uint32_t)hadc->Init.ConversionDataManagement)); + } + +#else LL_ADC_REG_SetDataTransferMode(hadc->Instance, (uint32_t)hadc->Init.ConversionDataManagement); +#endif + /* Start the DMA channel */ tmp_hal_status = HAL_DMA_Start_IT(hadc->DMA_Handle, (uint32_t)&hadc->Instance->DR, (uint32_t)pData, Length); @@ -2100,7 +2275,7 @@ HAL_StatusTypeDef HAL_ADC_Stop_DMA(ADC_HandleTypeDef *hadc) if (tmp_hal_status == HAL_OK) { /* Disable ADC DMA (ADC DMA configuration of continous requests is kept) */ - MODIFY_REG(hadc->Instance->CFGR, ADC_CFGR_DMNGT_0 |ADC_CFGR_DMNGT_1, 0UL); + MODIFY_REG(hadc->Instance->CFGR, ADC_CFGR_DMNGT_0 | ADC_CFGR_DMNGT_1, 0UL); /* Disable the DMA channel (in case of DMA in circular mode or stop */ /* while DMA transfer is on going) */ @@ -2485,10 +2660,10 @@ void HAL_ADC_IRQHandler(ADC_HandleTypeDef *hadc) else { /* Multimode not set or feature not available or ADC independent */ - if ((hadc->Instance->CFGR & ADC_CFGR_DMNGT) != 0UL) - { - overrun_error = 1UL; - } + if ((hadc->Instance->CFGR & ADC_CFGR_DMNGT) != 0UL) + { + overrun_error = 1UL; + } } } @@ -2659,11 +2834,20 @@ HAL_StatusTypeDef HAL_ADC_ConfigChannel(ADC_HandleTypeDef *hadc, ADC_ChannelConf /* Check offset range according to oversampling setting */ if (hadc->Init.OversamplingMode == ENABLE) { - assert_param(IS_ADC_RANGE(ADC_GET_RESOLUTION(hadc), sConfig->Offset/(hadc->Init.Oversampling.Ratio+1U))); + assert_param(IS_ADC_RANGE(ADC_GET_RESOLUTION(hadc), sConfig->Offset / (hadc->Init.Oversampling.Ratio + 1U))); } else { - assert_param(IS_ADC_RANGE(ADC_GET_RESOLUTION(hadc), sConfig->Offset)); +#if defined(ADC_VER_V5_V90) + if (hadc->Instance == ADC3) + { + assert_param(IS_ADC3_RANGE(ADC_GET_RESOLUTION(hadc), sConfig->Offset)); + } + else +#endif /* ADC_VER_V5_V90 */ + { + assert_param(IS_ADC_RANGE(ADC_GET_RESOLUTION(hadc), sConfig->Offset)); + } } /* if ROVSE is set, the value of the OFFSETy_EN bit in ADCx_OFRy register is @@ -2704,8 +2888,17 @@ HAL_StatusTypeDef HAL_ADC_ConfigChannel(ADC_HandleTypeDef *hadc, ADC_ChannelConf /* - Channel rank */ if (LL_ADC_REG_IsConversionOngoing(hadc->Instance) == 0UL) { + +#if defined(ADC_VER_V5_V90) + if (hadc->Instance != ADC3) + { + /* ADC channels preselection */ + hadc->Instance->PCSEL_RES0 |= (1UL << (__LL_ADC_CHANNEL_TO_DECIMAL_NB((uint32_t)sConfig->Channel) & 0x1FUL)); + } +#else /* ADC channels preselection */ hadc->Instance->PCSEL |= (1UL << (__LL_ADC_CHANNEL_TO_DECIMAL_NB((uint32_t)sConfig->Channel) & 0x1FUL)); +#endif /* ADC_VER_V5_V90 */ /* Set ADC group regular sequence: channel on the selected scan sequence rank */ LL_ADC_REG_SetSequencerRanks(hadc->Instance, sConfig->Rank, sConfig->Channel); @@ -2728,27 +2921,72 @@ HAL_StatusTypeDef HAL_ADC_ConfigChannel(ADC_HandleTypeDef *hadc, ADC_ChannelConf /* Shift the offset with respect to the selected ADC resolution. */ /* Offset has to be left-aligned on bit 11, the LSB (right bits) are set to 0 */ - tmpOffsetShifted = ADC_OFFSET_SHIFT_RESOLUTION(hadc, (uint32_t)sConfig->Offset); - +#if defined(ADC_VER_V5_V90) + if (hadc->Instance == ADC3) + { + tmpOffsetShifted = ADC3_OFFSET_SHIFT_RESOLUTION(hadc, (uint32_t)sConfig->Offset); + } + else +#endif /* ADC_VER_V5_V90 */ + { + tmpOffsetShifted = ADC_OFFSET_SHIFT_RESOLUTION(hadc, (uint32_t)sConfig->Offset); + } + if (sConfig->OffsetNumber != ADC_OFFSET_NONE) { /* Set ADC selected offset number */ LL_ADC_SetOffset(hadc->Instance, sConfig->OffsetNumber, sConfig->Channel, tmpOffsetShifted); - assert_param(IS_FUNCTIONAL_STATE(sConfig->OffsetSignedSaturation)); - /* Set ADC selected offset signed saturation */ - LL_ADC_SetOffsetSignedSaturation(hadc->Instance, sConfig->OffsetNumber, (sConfig->OffsetSignedSaturation == ENABLE) ? LL_ADC_OFFSET_SIGNED_SATURATION_ENABLE : LL_ADC_OFFSET_SIGNED_SATURATION_DISABLE); +#if defined(ADC_VER_V5_V90) + if (hadc->Instance == ADC3) + { + assert_param(IS_ADC3_OFFSET_SIGN(sConfig->OffsetSign)); + assert_param(IS_FUNCTIONAL_STATE(sConfig->OffsetSaturation)); + /* Set ADC selected offset sign & saturation */ + LL_ADC_SetOffsetSign(hadc->Instance, sConfig->OffsetNumber, sConfig->OffsetSign); + LL_ADC_SetOffsetSaturation(hadc->Instance, sConfig->OffsetNumber, (sConfig->OffsetSaturation == ENABLE) ? LL_ADC_OFFSET_SATURATION_ENABLE : LL_ADC_OFFSET_SATURATION_DISABLE); + } + else +#endif /* ADC_VER_V5_V90 */ + { + assert_param(IS_FUNCTIONAL_STATE(sConfig->OffsetSignedSaturation)); + /* Set ADC selected offset signed saturation */ + LL_ADC_SetOffsetSignedSaturation(hadc->Instance, sConfig->OffsetNumber, (sConfig->OffsetSignedSaturation == ENABLE) ? LL_ADC_OFFSET_SIGNED_SATURATION_ENABLE : LL_ADC_OFFSET_SIGNED_SATURATION_DISABLE); - assert_param(IS_FUNCTIONAL_STATE(sConfig->OffsetRightShift)); - /* Set ADC selected offset right shift */ - LL_ADC_SetDataRightShift(hadc->Instance, sConfig->OffsetNumber, (sConfig->OffsetRightShift == ENABLE) ? LL_ADC_OFFSET_RSHIFT_ENABLE : LL_ADC_OFFSET_RSHIFT_DISABLE); + assert_param(IS_FUNCTIONAL_STATE(sConfig->OffsetRightShift)); + /* Set ADC selected offset right shift */ + LL_ADC_SetDataRightShift(hadc->Instance, sConfig->OffsetNumber, (sConfig->OffsetRightShift == ENABLE) ? LL_ADC_OFFSET_RSHIFT_ENABLE : LL_ADC_OFFSET_RSHIFT_DISABLE); + } } else { - /* Scan OFR1, OFR2, OFR3, OFR4 to check if the selected channel is enabled. - If this is the case, offset OFRx is disabled since - sConfig->OffsetNumber = ADC_OFFSET_NONE. */ + /* Scan OFR1, OFR2, OFR3, OFR4 to check if the selected channel is enabled. + If this is the case, offset OFRx is disabled since + sConfig->OffsetNumber = ADC_OFFSET_NONE. */ +#if defined(ADC_VER_V5_V90) + if (hadc->Instance == ADC3) + { + if (__LL_ADC_CHANNEL_TO_DECIMAL_NB(LL_ADC_GetOffsetChannel(hadc->Instance, LL_ADC_OFFSET_1)) == __LL_ADC_CHANNEL_TO_DECIMAL_NB(sConfig->Channel)) + { + LL_ADC_SetOffsetState(hadc->Instance, LL_ADC_OFFSET_1, LL_ADC_OFFSET_DISABLE); + } + if (__LL_ADC_CHANNEL_TO_DECIMAL_NB(LL_ADC_GetOffsetChannel(hadc->Instance, LL_ADC_OFFSET_2)) == __LL_ADC_CHANNEL_TO_DECIMAL_NB(sConfig->Channel)) + { + LL_ADC_SetOffsetState(hadc->Instance, LL_ADC_OFFSET_2, LL_ADC_OFFSET_DISABLE); + } + if (__LL_ADC_CHANNEL_TO_DECIMAL_NB(LL_ADC_GetOffsetChannel(hadc->Instance, LL_ADC_OFFSET_3)) == __LL_ADC_CHANNEL_TO_DECIMAL_NB(sConfig->Channel)) + { + LL_ADC_SetOffsetState(hadc->Instance, LL_ADC_OFFSET_3, LL_ADC_OFFSET_DISABLE); + } + if (__LL_ADC_CHANNEL_TO_DECIMAL_NB(LL_ADC_GetOffsetChannel(hadc->Instance, LL_ADC_OFFSET_4)) == __LL_ADC_CHANNEL_TO_DECIMAL_NB(sConfig->Channel)) + { + LL_ADC_SetOffsetState(hadc->Instance, LL_ADC_OFFSET_4, LL_ADC_OFFSET_DISABLE); + } + } + else +#endif /* ADC_VER_V5_V90 */ + { if (((hadc->Instance->OFR1) & ADC_OFR1_OFFSET1_CH) == ADC_OFR_CHANNEL(sConfig->Channel)) { CLEAR_BIT(hadc->Instance->OFR1, ADC_OFR1_SSATE); @@ -2765,7 +3003,9 @@ HAL_StatusTypeDef HAL_ADC_ConfigChannel(ADC_HandleTypeDef *hadc, ADC_ChannelConf { CLEAR_BIT(hadc->Instance->OFR4, ADC_OFR4_SSATE); } - } + } + + } } /* Parameters update conditioned to ADC state: */ @@ -2793,7 +3033,7 @@ HAL_StatusTypeDef HAL_ADC_ConfigChannel(ADC_HandleTypeDef *hadc, ADC_ChannelConf /* Note: these internal measurement paths can be disabled using */ /* HAL_ADC_DeInit(). */ - if(__LL_ADC_IS_CHANNEL_INTERNAL(sConfig->Channel)) + if (__LL_ADC_IS_CHANNEL_INTERNAL(sConfig->Channel)) { /* Configuration of common ADC parameters */ @@ -2817,7 +3057,7 @@ HAL_StatusTypeDef HAL_ADC_ConfigChannel(ADC_HandleTypeDef *hadc, ADC_ChannelConf /* CPU processing cycles, scaling in us split to not */ /* exceed 32 bits register capacity and handle low frequency. */ wait_loop_index = ((LL_ADC_DELAY_TEMPSENSOR_STAB_US / 10UL) * (SystemCoreClock / (100000UL * 2UL))); - while(wait_loop_index != 0UL) + while (wait_loop_index != 0UL) { wait_loop_index--; } @@ -2911,19 +3151,42 @@ HAL_StatusTypeDef HAL_ADC_AnalogWDGConfig(ADC_HandleTypeDef *hadc, ADC_AnalogWDG assert_param(IS_ADC_CHANNEL(AnalogWDGConfig->Channel)); } - /* Verify thresholds range */ - if (hadc->Init.OversamplingMode == ENABLE) +#if defined(ADC_VER_V5_V90) + + if (hadc->Instance == ADC3) { - /* Case of oversampling enabled: thresholds are compared to oversampling - intermediate computation (after ratio, before shift application) */ - assert_param(IS_ADC_RANGE(ADC_GET_RESOLUTION(hadc), AnalogWDGConfig->HighThreshold / (hadc->Init.Oversampling.Ratio + 1UL))); - assert_param(IS_ADC_RANGE(ADC_GET_RESOLUTION(hadc), AnalogWDGConfig->LowThreshold / (hadc->Init.Oversampling.Ratio + 1UL))); + /* Verify thresholds range */ + if (hadc->Init.OversamplingMode == ENABLE) + { + /* Case of oversampling enabled: thresholds are compared to oversampling + intermediate computation (after ratio, before shift application) */ + assert_param(IS_ADC3_RANGE(ADC_GET_RESOLUTION(hadc), AnalogWDGConfig->HighThreshold / (hadc->Init.Oversampling.Ratio + 1UL))); + assert_param(IS_ADC3_RANGE(ADC_GET_RESOLUTION(hadc), AnalogWDGConfig->LowThreshold / (hadc->Init.Oversampling.Ratio + 1UL))); + } + else + { + /* Verify if thresholds are within the selected ADC resolution */ + assert_param(IS_ADC3_RANGE(ADC_GET_RESOLUTION(hadc), AnalogWDGConfig->HighThreshold)); + assert_param(IS_ADC3_RANGE(ADC_GET_RESOLUTION(hadc), AnalogWDGConfig->LowThreshold)); + } } else +#endif /* ADC_VER_V5_V90 */ { - /* Verify if thresholds are within the selected ADC resolution */ - assert_param(IS_ADC_RANGE(ADC_GET_RESOLUTION(hadc), AnalogWDGConfig->HighThreshold)); - assert_param(IS_ADC_RANGE(ADC_GET_RESOLUTION(hadc), AnalogWDGConfig->LowThreshold)); + /* Verify thresholds range */ + if (hadc->Init.OversamplingMode == ENABLE) + { + /* Case of oversampling enabled: thresholds are compared to oversampling + intermediate computation (after ratio, before shift application) */ + assert_param(IS_ADC_RANGE(ADC_GET_RESOLUTION(hadc), AnalogWDGConfig->HighThreshold / (hadc->Init.Oversampling.Ratio + 1UL))); + assert_param(IS_ADC_RANGE(ADC_GET_RESOLUTION(hadc), AnalogWDGConfig->LowThreshold / (hadc->Init.Oversampling.Ratio + 1UL))); + } + else + { + /* Verify if thresholds are within the selected ADC resolution */ + assert_param(IS_ADC_RANGE(ADC_GET_RESOLUTION(hadc), AnalogWDGConfig->HighThreshold)); + assert_param(IS_ADC_RANGE(ADC_GET_RESOLUTION(hadc), AnalogWDGConfig->LowThreshold)); + } } /* Process locked */ @@ -2987,8 +3250,25 @@ HAL_StatusTypeDef HAL_ADC_AnalogWDGConfig(ADC_HandleTypeDef *hadc, ADC_AnalogWDG tmpAWDLowThresholdShifted = ADC_AWD1THRESHOLD_SHIFT_RESOLUTION(hadc, AnalogWDGConfig->LowThreshold); /* Set the high and low thresholds */ - MODIFY_REG(hadc->Instance->LTR1, ADC_LTR_LT , tmpAWDLowThresholdShifted); - MODIFY_REG(hadc->Instance->HTR1, ADC_HTR_HT , tmpAWDHighThresholdShifted); +#if defined(ADC_VER_V5_V90) + if (hadc->Instance == ADC3) + { + MODIFY_REG(hadc->Instance->LTR1_TR1, + ADC3_TR1_AWDFILT, + AnalogWDGConfig->FilteringConfig); + MODIFY_REG(hadc->Instance->LTR1_TR1, ADC3_TR1_LT1, tmpAWDLowThresholdShifted); + MODIFY_REG(hadc->Instance->LTR1_TR1, ADC3_TR1_HT1, (tmpAWDHighThresholdShifted << ADC3_TR1_HT1_Pos)); + } + else + { + + MODIFY_REG(hadc->Instance->LTR1_TR1, ADC_LTR_LT, tmpAWDLowThresholdShifted); + MODIFY_REG(hadc->Instance->HTR1_TR2, ADC_HTR_HT, tmpAWDHighThresholdShifted); + } +#else + MODIFY_REG(hadc->Instance->LTR1, ADC_LTR_LT, tmpAWDLowThresholdShifted); + MODIFY_REG(hadc->Instance->HTR1, ADC_HTR_HT, tmpAWDHighThresholdShifted); +#endif /* Update state, clear previous result related to AWD1 */ CLEAR_BIT(hadc->State, HAL_ADC_STATE_AWD1); @@ -3032,16 +3312,30 @@ HAL_StatusTypeDef HAL_ADC_AnalogWDGConfig(ADC_HandleTypeDef *hadc, ADC_AnalogWDG case ADC_ANALOGWATCHDOG_ALL_REG: case ADC_ANALOGWATCHDOG_ALL_INJEC: case ADC_ANALOGWATCHDOG_ALL_REGINJEC: - /* Update AWD by bitfield to keep the possibility to monitor */ - /* several channels by successive calls of this function. */ - if (AnalogWDGConfig->WatchdogNumber == ADC_ANALOGWATCHDOG_2) + +#if defined(ADC_VER_V5_V90) + if (hadc->Instance == ADC3) { - SET_BIT(hadc->Instance->AWD2CR, (1UL << (__LL_ADC_CHANNEL_TO_DECIMAL_NB(AnalogWDGConfig->Channel) & 0x1FUL))); + + LL_ADC_SetAnalogWDMonitChannels(hadc->Instance, AnalogWDGConfig->WatchdogNumber, LL_ADC_AWD_ALL_CHANNELS_REG_INJ); + } else { - SET_BIT(hadc->Instance->AWD3CR, (1UL << (__LL_ADC_CHANNEL_TO_DECIMAL_NB(AnalogWDGConfig->Channel) & 0x1FUL))); +#endif /*ADC_VER_V5_V90*/ + /* Update AWD by bitfield to keep the possibility to monitor */ + /* several channels by successive calls of this function. */ + if (AnalogWDGConfig->WatchdogNumber == ADC_ANALOGWATCHDOG_2) + { + SET_BIT(hadc->Instance->AWD2CR, (1UL << (__LL_ADC_CHANNEL_TO_DECIMAL_NB(AnalogWDGConfig->Channel) & 0x1FUL))); + } + else + { + SET_BIT(hadc->Instance->AWD3CR, (1UL << (__LL_ADC_CHANNEL_TO_DECIMAL_NB(AnalogWDGConfig->Channel) & 0x1FUL))); + } +#if defined(ADC_VER_V5_V90) } +#endif /*ADC_VER_V5_V90*/ break; default: /* ADC_ANALOGWATCHDOG_NONE */ @@ -3054,19 +3348,56 @@ HAL_StatusTypeDef HAL_ADC_AnalogWDGConfig(ADC_HandleTypeDef *hadc, ADC_AnalogWDG tmpAWDHighThresholdShifted = ADC_AWD23THRESHOLD_SHIFT_RESOLUTION(hadc, AnalogWDGConfig->HighThreshold); tmpAWDLowThresholdShifted = ADC_AWD23THRESHOLD_SHIFT_RESOLUTION(hadc, AnalogWDGConfig->LowThreshold); - if (AnalogWDGConfig->WatchdogNumber == ADC_ANALOGWATCHDOG_2) +#if defined(ADC_VER_V5_V90) + if (hadc->Instance == ADC3) { - /* Set ADC analog watchdog thresholds value of both thresholds high and low */ - MODIFY_REG(hadc->Instance->LTR2, ADC_LTR_LT , tmpAWDLowThresholdShifted); - MODIFY_REG(hadc->Instance->HTR2, ADC_HTR_HT , tmpAWDHighThresholdShifted); + + /* Analog watchdog thresholds configuration */ + if (AnalogWDGConfig->WatchdogNumber != ADC_ANALOGWATCHDOG_1) + { + /* Shift the offset with respect to the selected ADC resolution: */ + /* Thresholds have to be left-aligned on bit 7, the LSB (right bits) */ + /* are set to 0. */ + tmpAWDHighThresholdShifted = ADC_AWD23THRESHOLD_SHIFT_RESOLUTION(hadc, AnalogWDGConfig->HighThreshold); + tmpAWDLowThresholdShifted = ADC_AWD23THRESHOLD_SHIFT_RESOLUTION(hadc, AnalogWDGConfig->LowThreshold); + } + + /* Set ADC analog watchdog thresholds value of both thresholds high and low */ + LL_ADC_ConfigAnalogWDThresholds(hadc->Instance, AnalogWDGConfig->WatchdogNumber, tmpAWDHighThresholdShifted, tmpAWDLowThresholdShifted); + + + } + else + { + + if (AnalogWDGConfig->WatchdogNumber == ADC_ANALOGWATCHDOG_2) + { + /* Set ADC analog watchdog thresholds value of both thresholds high and low */ + MODIFY_REG(hadc->Instance->LTR2_DIFSEL, ADC_LTR_LT, tmpAWDLowThresholdShifted); + MODIFY_REG(hadc->Instance->HTR2_CALFACT, ADC_HTR_HT, tmpAWDHighThresholdShifted); + } + else + { + /* Set ADC analog watchdog thresholds value of both thresholds high and low */ + MODIFY_REG(hadc->Instance->LTR3_RES10, ADC_LTR_LT, tmpAWDLowThresholdShifted); + MODIFY_REG(hadc->Instance->HTR3_RES11, ADC_HTR_HT, tmpAWDHighThresholdShifted); + } + } +#else + if (AnalogWDGConfig->WatchdogNumber == ADC_ANALOGWATCHDOG_2) + { + /* Set ADC analog watchdog thresholds value of both thresholds high and low */ + MODIFY_REG(hadc->Instance->LTR2, ADC_LTR_LT, tmpAWDLowThresholdShifted); + MODIFY_REG(hadc->Instance->HTR2, ADC_HTR_HT, tmpAWDHighThresholdShifted); } else { /* Set ADC analog watchdog thresholds value of both thresholds high and low */ - MODIFY_REG(hadc->Instance->LTR3, ADC_LTR_LT , tmpAWDLowThresholdShifted); - MODIFY_REG(hadc->Instance->HTR3, ADC_HTR_HT , tmpAWDHighThresholdShifted); + MODIFY_REG(hadc->Instance->LTR3, ADC_LTR_LT, tmpAWDLowThresholdShifted); + MODIFY_REG(hadc->Instance->HTR3, ADC_HTR_HT, tmpAWDHighThresholdShifted); } +#endif if (AnalogWDGConfig->WatchdogNumber == ADC_ANALOGWATCHDOG_2) { /* Update state, clear previous result related to AWD2 */ @@ -3366,11 +3697,11 @@ HAL_StatusTypeDef ADC_Enable(ADC_HandleTypeDef *hadc) /* Poll for ADC ready flag raised except case of multimode enabled and ADC slave selected. */ uint32_t tmp_multimode_config = LL_ADC_GetMultimode(__LL_ADC_COMMON_INSTANCE(hadc->Instance)); - if ( (__LL_ADC_MULTI_INSTANCE_MASTER(hadc->Instance) == hadc->Instance) - || (tmp_multimode_config == LL_ADC_MULTI_INDEPENDENT) + if ((__LL_ADC_MULTI_INSTANCE_MASTER(hadc->Instance) == hadc->Instance) + || (tmp_multimode_config == LL_ADC_MULTI_INDEPENDENT) ) { - while(__HAL_ADC_GET_FLAG(hadc, ADC_FLAG_RDY) == 0UL) + while (__HAL_ADC_GET_FLAG(hadc, ADC_FLAG_RDY) == 0UL) { /* If ADEN bit is set less than 4 ADC clock cycles after the ADCAL bit has been cleared (after a calibration), ADEN bit is reset by the @@ -3380,12 +3711,12 @@ HAL_StatusTypeDef ADC_Enable(ADC_HandleTypeDef *hadc) 4 ADC clock cycle duration */ /* Note: Test of ADC enabled required due to hardware constraint to */ /* not enable ADC if already enabled. */ - if(LL_ADC_IsEnabled(hadc->Instance) == 0UL) + if (LL_ADC_IsEnabled(hadc->Instance) == 0UL) { LL_ADC_Enable(hadc->Instance); } - if((HAL_GetTick() - tickstart) > ADC_ENABLE_TIMEOUT) + if ((HAL_GetTick() - tickstart) > ADC_ENABLE_TIMEOUT) { /* Update ADC state machine to error */ SET_BIT(hadc->State, HAL_ADC_STATE_ERROR_INTERNAL); @@ -3590,13 +3921,13 @@ void ADC_DMAError(DMA_HandleTypeDef *hdma) * @param hadc ADC handle * @retval None. */ -void ADC_ConfigureBoostMode(ADC_HandleTypeDef* hadc) +void ADC_ConfigureBoostMode(ADC_HandleTypeDef *hadc) { uint32_t freq; - if(ADC_IS_SYNCHRONOUS_CLOCK_MODE(hadc)) + if (ADC_IS_SYNCHRONOUS_CLOCK_MODE(hadc)) { freq = HAL_RCC_GetHCLKFreq(); - switch(hadc->Init.ClockPrescaler) + switch (hadc->Init.ClockPrescaler) { case ADC_CLOCK_SYNC_PCLK_DIV1: case ADC_CLOCK_SYNC_PCLK_DIV2: @@ -3612,7 +3943,7 @@ void ADC_ConfigureBoostMode(ADC_HandleTypeDef* hadc) else { freq = HAL_RCCEx_GetPeriphCLKFreq(RCC_PERIPHCLK_ADC); - switch(hadc->Init.ClockPrescaler) + switch (hadc->Init.ClockPrescaler) { case ADC_CLOCK_ASYNC_DIV2: case ADC_CLOCK_ASYNC_DIV4: @@ -3624,8 +3955,8 @@ void ADC_ConfigureBoostMode(ADC_HandleTypeDef* hadc) break; case ADC_CLOCK_ASYNC_DIV16: freq /= 16UL; - break; - case ADC_CLOCK_ASYNC_DIV32: + break; + case ADC_CLOCK_ASYNC_DIV32: freq /= 32UL; break; case ADC_CLOCK_ASYNC_DIV64: @@ -3642,18 +3973,17 @@ void ADC_ConfigureBoostMode(ADC_HandleTypeDef* hadc) } } -#if defined(ADC_VER_V5_3) +#if defined(ADC_VER_V5_3) || defined(ADC_VER_V5_V90) freq /= 2U; - if (freq <= 6250000UL) { MODIFY_REG(hadc->Instance->CR, ADC_CR_BOOST, 0UL); } - else if(freq <= 12500000UL) + else if (freq <= 12500000UL) { MODIFY_REG(hadc->Instance->CR, ADC_CR_BOOST, ADC_CR_BOOST_0); } - else if(freq <= 25000000UL) + else if (freq <= 25000000UL) { MODIFY_REG(hadc->Instance->CR, ADC_CR_BOOST, ADC_CR_BOOST_1); } @@ -3662,9 +3992,9 @@ void ADC_ConfigureBoostMode(ADC_HandleTypeDef* hadc) MODIFY_REG(hadc->Instance->CR, ADC_CR_BOOST, ADC_CR_BOOST_1 | ADC_CR_BOOST_0); } #else - if(HAL_GetREVID() <= REV_ID_Y) /* STM32H7 silicon Rev.Y */ + if (HAL_GetREVID() <= REV_ID_Y) /* STM32H7 silicon Rev.Y */ { - if(freq > 20000000UL) + if (freq > 20000000UL) { SET_BIT(hadc->Instance->CR, ADC_CR_BOOST_0); } @@ -3681,11 +4011,11 @@ void ADC_ConfigureBoostMode(ADC_HandleTypeDef* hadc) { MODIFY_REG(hadc->Instance->CR, ADC_CR_BOOST, 0UL); } - else if(freq <= 12500000UL) + else if (freq <= 12500000UL) { MODIFY_REG(hadc->Instance->CR, ADC_CR_BOOST, ADC_CR_BOOST_0); } - else if(freq <= 25000000UL) + else if (freq <= 25000000UL) { MODIFY_REG(hadc->Instance->CR, ADC_CR_BOOST, ADC_CR_BOOST_1); } diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_adc_ex.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_adc_ex.c index 8aa0815..d0f9717 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_adc_ex.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_adc_ex.c @@ -67,8 +67,8 @@ /* Fixed timeout value for ADC calibration. */ /* Fixed timeout value for ADC calibration. */ -/* Values defined to be higher than worst cases: low clock frequency, */ -/* maximum prescalers. */ +/* Values defined to be higher than worst cases: low clock frequency, */ +/* maximum prescalers. */ /* Ex of profile low frequency : f_ADC at 0.125 Mhz (minimum value */ /* according to Data sheet), calibration_time MAX = 165010 / f_ADC */ /* 165010 / 125000 = 1.32s */ @@ -159,7 +159,7 @@ HAL_StatusTypeDef HAL_ADCEx_Calibration_Start(ADC_HandleTypeDef *hadc, uint32_t HAL_ADC_STATE_BUSY_INTERNAL); /* Start ADC calibration in mode single-ended or differential */ - LL_ADC_StartCalibration(hadc->Instance , CalibrationMode, SingleDiff ); + LL_ADC_StartCalibration(hadc->Instance, CalibrationMode, SingleDiff); /* Wait for calibration completion */ while (LL_ADC_IsCalibrationOnGoing(hadc->Instance) != 0UL) @@ -223,38 +223,38 @@ uint32_t HAL_ADCEx_Calibration_GetValue(ADC_HandleTypeDef *hadc, uint32_t Single * @param LinearCalib_Buffer: Linear calibration factor * @retval HAL state */ -HAL_StatusTypeDef HAL_ADCEx_LinearCalibration_GetValue(ADC_HandleTypeDef* hadc, uint32_t* LinearCalib_Buffer) +HAL_StatusTypeDef HAL_ADCEx_LinearCalibration_GetValue(ADC_HandleTypeDef *hadc, uint32_t *LinearCalib_Buffer) { uint32_t cnt; HAL_StatusTypeDef tmp_hal_status = HAL_OK; uint32_t temp_REG_IsConversionOngoing = 0UL; - + /* Check the parameters */ assert_param(IS_ADC_ALL_INSTANCE(hadc->Instance)); - + /* Enable the ADC ADEN = 1 to be able to read the linear calibration factor */ - if(LL_ADC_IsEnabled(hadc->Instance) == 0UL) + if (LL_ADC_IsEnabled(hadc->Instance) == 0UL) { tmp_hal_status = ADC_Enable(hadc); } - + if (tmp_hal_status == HAL_OK) { - if(LL_ADC_REG_IsConversionOngoing(hadc->Instance) != 0UL) + if (LL_ADC_REG_IsConversionOngoing(hadc->Instance) != 0UL) { LL_ADC_REG_StopConversion(hadc->Instance); temp_REG_IsConversionOngoing = 1UL; } - for(cnt = ADC_LINEAR_CALIB_REG_COUNT; cnt > 0UL; cnt--) + for (cnt = ADC_LINEAR_CALIB_REG_COUNT; cnt > 0UL; cnt--) { - LinearCalib_Buffer[cnt-1U]=LL_ADC_GetCalibrationLinearFactor(hadc->Instance, ADC_CR_LINCALRDYW6 >> (ADC_LINEAR_CALIB_REG_COUNT-cnt)); + LinearCalib_Buffer[cnt - 1U] = LL_ADC_GetCalibrationLinearFactor(hadc->Instance, ADC_CR_LINCALRDYW6 >> (ADC_LINEAR_CALIB_REG_COUNT - cnt)); } - if(temp_REG_IsConversionOngoing != 0UL) + if (temp_REG_IsConversionOngoing != 0UL) { LL_ADC_REG_StartConversion(hadc->Instance); } } - + return tmp_hal_status; } @@ -319,7 +319,7 @@ HAL_StatusTypeDef HAL_ADCEx_Calibration_SetValue(ADC_HandleTypeDef *hadc, uint32 * @param LinearCalib_Buffer: Linear calibration factor * @retval HAL state */ -HAL_StatusTypeDef HAL_ADCEx_LinearCalibration_SetValue(ADC_HandleTypeDef *hadc, uint32_t* LinearCalib_Buffer) +HAL_StatusTypeDef HAL_ADCEx_LinearCalibration_SetValue(ADC_HandleTypeDef *hadc, uint32_t *LinearCalib_Buffer) { uint32_t cnt; __IO uint32_t wait_loop_index = 0; @@ -341,7 +341,7 @@ HAL_StatusTypeDef HAL_ADCEx_LinearCalibration_SetValue(ADC_HandleTypeDef *hadc, } - if (HAL_IS_BIT_CLR(hadc->Instance->CR, ADC_CR_ADVREGEN)) + if (HAL_IS_BIT_CLR(hadc->Instance->CR, ADC_CR_ADVREGEN)) { /* Enable ADC internal voltage regulator */ SET_BIT(hadc->Instance->CR, ADC_CR_ADVREGEN); @@ -350,7 +350,7 @@ HAL_StatusTypeDef HAL_ADCEx_LinearCalibration_SetValue(ADC_HandleTypeDef *hadc, /* Note: Variable divided by 2 to compensate partially */ /* CPU processing cycles. */ wait_loop_index = (ADC_STAB_DELAY_US * (SystemCoreClock / (1000000UL * 2UL))); - while(wait_loop_index != 0UL) + while (wait_loop_index != 0UL) { wait_loop_index--; } @@ -370,37 +370,38 @@ HAL_StatusTypeDef HAL_ADCEx_LinearCalibration_SetValue(ADC_HandleTypeDef *hadc, return HAL_ERROR; } -/* Enable the ADC peripheral */ - if(LL_ADC_IsEnabled(hadc->Instance) == 0UL) /* Enable the ADC if it is disabled */ - { + /* Enable the ADC peripheral */ + if (LL_ADC_IsEnabled(hadc->Instance) == 0UL) /* Enable the ADC if it is disabled */ + { if (ADC_Enable(hadc) != HAL_OK) { return HAL_ERROR; } else { - for(cnt = ADC_LINEAR_CALIB_REG_COUNT; cnt > 0UL ; cnt--) + for (cnt = ADC_LINEAR_CALIB_REG_COUNT; cnt > 0UL ; cnt--) { - LL_ADC_SetCalibrationLinearFactor(hadc->Instance, ADC_CR_LINCALRDYW6 >> (ADC_LINEAR_CALIB_REG_COUNT-cnt), LinearCalib_Buffer[cnt-1U]); + LL_ADC_SetCalibrationLinearFactor(hadc->Instance, ADC_CR_LINCALRDYW6 >> (ADC_LINEAR_CALIB_REG_COUNT - cnt), LinearCalib_Buffer[cnt - 1U]); } (void)ADC_Disable(hadc); } - }else /* ADC is already enabled, so no need to enable it but need to stop conversion */ + } + else /* ADC is already enabled, so no need to enable it but need to stop conversion */ + { + if (LL_ADC_REG_IsConversionOngoing(hadc->Instance) != 0UL) { - if(LL_ADC_REG_IsConversionOngoing(hadc->Instance) != 0UL) - { - LL_ADC_REG_StopConversion(hadc->Instance); - temp_REG_IsConversionOngoing = 1UL; - } - for(cnt = ADC_LINEAR_CALIB_REG_COUNT; cnt > 0UL ; cnt--) - { - LL_ADC_SetCalibrationLinearFactor(hadc->Instance, ADC_CR_LINCALRDYW6 >> (ADC_LINEAR_CALIB_REG_COUNT-cnt), LinearCalib_Buffer[cnt-1U]); - } - if(temp_REG_IsConversionOngoing != 0UL) - { - LL_ADC_REG_StartConversion(hadc->Instance); - } + LL_ADC_REG_StopConversion(hadc->Instance); + temp_REG_IsConversionOngoing = 1UL; } + for (cnt = ADC_LINEAR_CALIB_REG_COUNT; cnt > 0UL ; cnt--) + { + LL_ADC_SetCalibrationLinearFactor(hadc->Instance, ADC_CR_LINCALRDYW6 >> (ADC_LINEAR_CALIB_REG_COUNT - cnt), LinearCalib_Buffer[cnt - 1U]); + } + if (temp_REG_IsConversionOngoing != 0UL) + { + LL_ADC_REG_StartConversion(hadc->Instance); + } + } return HAL_OK; } @@ -414,32 +415,34 @@ HAL_StatusTypeDef HAL_ADCEx_LinearCalibration_FactorLoad(ADC_HandleTypeDef *hadc HAL_StatusTypeDef tmp_hal_status = HAL_OK; uint32_t cnt, FactorOffset; uint32_t LinearCalib_Buffer[ADC_LINEAR_CALIB_REG_COUNT]; - + /* Linearity calibration is retrieved from engi bytes read values from registers and put them to the CALFACT2 register */ /* If needed linearity calibration can be done in runtime using LL_ADC_GetCalibrationLinearFactor() */ - if(hadc->Instance == ADC1) - { + if (hadc->Instance == ADC1) + { FactorOffset = 0UL; - }else if(hadc->Instance == ADC2) - { + } + else if (hadc->Instance == ADC2) + { FactorOffset = 8UL; - }else /*Case ADC3*/ - { - FactorOffset = 16UL; - } - + } + else /*Case ADC3*/ + { + FactorOffset = 16UL; + } + for (cnt = 0UL; cnt < ADC_LINEAR_CALIB_REG_COUNT; cnt++) { - LinearCalib_Buffer[cnt] = *(uint32_t*)(ADC_LINEAR_CALIB_REG_1_ADDR + FactorOffset + cnt); + LinearCalib_Buffer[cnt] = *(uint32_t *)(ADC_LINEAR_CALIB_REG_1_ADDR + FactorOffset + cnt); } - if (HAL_ADCEx_LinearCalibration_SetValue(hadc,(uint32_t*)LinearCalib_Buffer) != HAL_OK) + if (HAL_ADCEx_LinearCalibration_SetValue(hadc, (uint32_t *)LinearCalib_Buffer) != HAL_OK) { tmp_hal_status = HAL_ERROR; } - return tmp_hal_status; + return tmp_hal_status; } /** @@ -1531,8 +1534,8 @@ HAL_StatusTypeDef HAL_ADCEx_RegularStop_DMA(ADC_HandleTypeDef *hadc) /* Clear HAL_ADC_STATE_REG_BUSY bit */ CLEAR_BIT(hadc->State, HAL_ADC_STATE_REG_BUSY); - /* Disable ADC DMA (ADC DMA configuration ADC_CFGR_DMACFG is kept) */ - MODIFY_REG(hadc->Instance->CFGR, ADC_CFGR_DMNGT_0 |ADC_CFGR_DMNGT_1, 0UL); + /* Disable ADC DMA (ADC DMA configuration ADC_CFGR_DMACFG is kept) */ + MODIFY_REG(hadc->Instance->CFGR, ADC_CFGR_DMNGT_0 | ADC_CFGR_DMNGT_1, 0UL); /* Disable the DMA channel (in case of DMA in circular mode or stop while */ /* while DMA transfer is on going) */ @@ -1790,8 +1793,19 @@ HAL_StatusTypeDef HAL_ADCEx_InjectedConfigChannel(ADC_HandleTypeDef *hadc, ADC_I assert_param(IS_ADC_EXTTRIGINJEC_EDGE(sConfigInjected->ExternalTrigInjecConvEdge)); assert_param(IS_ADC_EXTTRIGINJEC(sConfigInjected->ExternalTrigInjecConv)); assert_param(IS_ADC_OFFSET_NUMBER(sConfigInjected->InjectedOffsetNumber)); - assert_param(IS_ADC_RANGE(ADC_GET_RESOLUTION(hadc), sConfigInjected->InjectedOffset)); assert_param(IS_FUNCTIONAL_STATE(sConfigInjected->InjecOversamplingMode)); +#if defined(ADC_VER_V5_V90) + assert_param(IS_FUNCTIONAL_STATE(sConfigInjected->InjectedOffsetSaturation)); + if (hadc->Instance == ADC3) + { + assert_param(IS_ADC3_OFFSET_SIGN(sConfigInjected->InjectedOffsetSign)); + assert_param(IS_ADC3_RANGE(ADC_GET_RESOLUTION(hadc), sConfigInjected->InjectedOffset)); + } + else +#endif /* ADC_VER_V5_V90 */ + { + assert_param(IS_ADC_RANGE(ADC_GET_RESOLUTION(hadc), sConfigInjected->InjectedOffset)); + } if (hadc->Init.ScanConvMode != ADC_SCAN_DISABLE) { @@ -1803,13 +1817,20 @@ HAL_StatusTypeDef HAL_ADCEx_InjectedConfigChannel(ADC_HandleTypeDef *hadc, ADC_I /* Check offset range according to oversampling setting */ if (hadc->Init.OversamplingMode == ENABLE) { - assert_param(IS_ADC_RANGE(ADC_GET_RESOLUTION(hadc), sConfigInjected->InjectedOffset/(hadc->Init.Oversampling.Ratio+1U))); + assert_param(IS_ADC_RANGE(ADC_GET_RESOLUTION(hadc), sConfigInjected->InjectedOffset / (hadc->Init.Oversampling.Ratio + 1U))); } else { assert_param(IS_ADC_RANGE(ADC_GET_RESOLUTION(hadc), sConfigInjected->InjectedOffset)); } - +#if defined(ADC_VER_V5_V90) + /* if JOVSE is set, the value of the OFFSETy_EN bit in ADCx_OFRy register is + ignored (considered as reset) */ + if (hadc->Instance == ADC3) + { + assert_param(!((sConfigInjected->InjectedOffsetNumber != ADC_OFFSET_NONE) && (sConfigInjected->InjecOversamplingMode == ENABLE))); + } +#endif /* ADC_VER_V5_V90 */ /* JDISCEN and JAUTO bits can't be set at the same time */ assert_param(!((sConfigInjected->InjectedDiscontinuousConvMode == ENABLE) && (sConfigInjected->AutoInjectedConv == ENABLE))); @@ -1977,8 +1998,16 @@ HAL_StatusTypeDef HAL_ADCEx_InjectedConfigChannel(ADC_HandleTypeDef *hadc, ADC_I /* mode is disabled. */ if (LL_ADC_INJ_IsConversionOngoing(hadc->Instance) == 0UL) { - /* ADC channels preselection */ +#if defined(ADC_VER_V5_V90) + if (hadc->Instance != ADC3) + { + /* ADC channels preselection */ + hadc->Instance->PCSEL_RES0 |= (1UL << (__LL_ADC_CHANNEL_TO_DECIMAL_NB(sConfigInjected->InjectedChannel) & 0x1FUL)); + } +#else + /* ADC channels preselection */ hadc->Instance->PCSEL |= (1UL << (__LL_ADC_CHANNEL_TO_DECIMAL_NB(sConfigInjected->InjectedChannel) & 0x1FUL)); +#endif /* ADC_VER_V5_V90 */ /* If auto-injected mode is disabled: no constraint */ if (sConfigInjected->AutoInjectedConv == DISABLE) @@ -2061,8 +2090,8 @@ HAL_StatusTypeDef HAL_ADCEx_InjectedConfigChannel(ADC_HandleTypeDef *hadc, ADC_I ADC_CFGR2_JOVSE | ADC_CFGR2_OVSR | ADC_CFGR2_OVSS, - ADC_CFGR2_JOVSE | - ((sConfigInjected->InjecOversampling.Ratio - 1UL) << ADC_CFGR2_OVSR_Pos) | + ADC_CFGR2_JOVSE | + ((sConfigInjected->InjecOversampling.Ratio - 1UL) << ADC_CFGR2_OVSR_Pos) | sConfigInjected->InjecOversampling.RightBitShift ); } @@ -2072,47 +2101,89 @@ HAL_StatusTypeDef HAL_ADCEx_InjectedConfigChannel(ADC_HandleTypeDef *hadc, ADC_I CLEAR_BIT(hadc->Instance->CFGR2, ADC_CFGR2_JOVSE); } - /* Set sampling time of the selected ADC channel */ - LL_ADC_SetChannelSamplingTime(hadc->Instance, sConfigInjected->InjectedChannel, sConfigInjected->InjectedSamplingTime); + /* Set sampling time of the selected ADC channel */ + LL_ADC_SetChannelSamplingTime(hadc->Instance, sConfigInjected->InjectedChannel, sConfigInjected->InjectedSamplingTime); /* Configure the offset: offset enable/disable, channel, offset value */ /* Shift the offset with respect to the selected ADC resolution. */ /* Offset has to be left-aligned on bit 11, the LSB (right bits) are set to 0 */ - tmpOffsetShifted = ADC_OFFSET_SHIFT_RESOLUTION(hadc, sConfigInjected->InjectedOffset); - +#if defined(ADC_VER_V5_V90) + if (hadc->Instance == ADC3) + { + tmpOffsetShifted = ADC3_OFFSET_SHIFT_RESOLUTION(hadc, sConfigInjected->InjectedOffset); + } + else +#endif /* ADC_VER_V5_V90 */ + { + tmpOffsetShifted = ADC_OFFSET_SHIFT_RESOLUTION(hadc, sConfigInjected->InjectedOffset); + } + if (sConfigInjected->InjectedOffsetNumber != ADC_OFFSET_NONE) { /* Set ADC selected offset number */ - LL_ADC_SetOffset(hadc->Instance, sConfigInjected->InjectedOffsetNumber, sConfigInjected->InjectedChannel, - tmpOffsetShifted); + LL_ADC_SetOffset(hadc->Instance, sConfigInjected->InjectedOffsetNumber, sConfigInjected->InjectedChannel, tmpOffsetShifted); - /* Set ADC selected offset signed saturation */ - LL_ADC_SetOffsetSignedSaturation(hadc->Instance, sConfigInjected->InjectedOffsetNumber, (sConfigInjected->InjectedOffsetSignedSaturation == ENABLE) ? LL_ADC_OFFSET_SIGNED_SATURATION_ENABLE : LL_ADC_OFFSET_SIGNED_SATURATION_DISABLE); - - /* Set ADC selected offset right shift */ - LL_ADC_SetDataRightShift(hadc->Instance, sConfigInjected->InjectedOffsetNumber, (sConfigInjected->InjectedOffsetRightShift == (uint32_t)ENABLE) ? LL_ADC_OFFSET_RSHIFT_ENABLE : LL_ADC_OFFSET_RSHIFT_DISABLE); +#if defined(ADC_VER_V5_V90) + if (hadc->Instance == ADC3) + { + /* Set ADC selected offset sign & saturation */ + LL_ADC_SetOffsetSign(hadc->Instance, sConfigInjected->InjectedOffsetNumber, sConfigInjected->InjectedOffsetSign); + LL_ADC_SetOffsetSaturation(hadc->Instance, sConfigInjected->InjectedOffsetNumber, (sConfigInjected->InjectedOffsetSaturation == ENABLE) ? LL_ADC_OFFSET_SATURATION_ENABLE : LL_ADC_OFFSET_SATURATION_DISABLE); + } + else +#endif /* ADC_VER_V5_V90 */ + { + /* Set ADC selected offset signed saturation */ + LL_ADC_SetOffsetSignedSaturation(hadc->Instance, sConfigInjected->InjectedOffsetNumber, (sConfigInjected->InjectedOffsetSignedSaturation == ENABLE) ? LL_ADC_OFFSET_SIGNED_SATURATION_ENABLE : LL_ADC_OFFSET_SIGNED_SATURATION_DISABLE); + } } else { - /* Scan each offset register to check if the selected channel is targeted. */ - /* If this is the case, the corresponding offset number is disabled. */ - if(__LL_ADC_CHANNEL_TO_DECIMAL_NB(LL_ADC_GetOffsetChannel(hadc->Instance, LL_ADC_OFFSET_1)) == __LL_ADC_CHANNEL_TO_DECIMAL_NB(sConfigInjected->InjectedChannel)) +#if defined(ADC_VER_V5_V90) + if (hadc->Instance == ADC3) { - LL_ADC_SetOffset(hadc->Instance, LL_ADC_OFFSET_1, sConfigInjected->InjectedChannel, LL_ADC_OFFSET_SIGNED_SATURATION_DISABLE); + /* Scan each offset register to check if the selected channel is targeted. */ + /* If this is the case, the corresponding offset number is disabled. */ + if (__LL_ADC_CHANNEL_TO_DECIMAL_NB(LL_ADC_GetOffsetChannel(hadc->Instance, LL_ADC_OFFSET_1)) == __LL_ADC_CHANNEL_TO_DECIMAL_NB(sConfigInjected->InjectedChannel)) + { + LL_ADC_SetOffsetState(hadc->Instance, LL_ADC_OFFSET_1, LL_ADC_OFFSET_DISABLE); + } + if (__LL_ADC_CHANNEL_TO_DECIMAL_NB(LL_ADC_GetOffsetChannel(hadc->Instance, LL_ADC_OFFSET_2)) == __LL_ADC_CHANNEL_TO_DECIMAL_NB(sConfigInjected->InjectedChannel)) + { + LL_ADC_SetOffsetState(hadc->Instance, LL_ADC_OFFSET_2, LL_ADC_OFFSET_DISABLE); + } + if (__LL_ADC_CHANNEL_TO_DECIMAL_NB(LL_ADC_GetOffsetChannel(hadc->Instance, LL_ADC_OFFSET_3)) == __LL_ADC_CHANNEL_TO_DECIMAL_NB(sConfigInjected->InjectedChannel)) + { + LL_ADC_SetOffsetState(hadc->Instance, LL_ADC_OFFSET_3, LL_ADC_OFFSET_DISABLE); + } + if (__LL_ADC_CHANNEL_TO_DECIMAL_NB(LL_ADC_GetOffsetChannel(hadc->Instance, LL_ADC_OFFSET_4)) == __LL_ADC_CHANNEL_TO_DECIMAL_NB(sConfigInjected->InjectedChannel)) + { + LL_ADC_SetOffsetState(hadc->Instance, LL_ADC_OFFSET_4, LL_ADC_OFFSET_DISABLE); + } } - if(__LL_ADC_CHANNEL_TO_DECIMAL_NB(LL_ADC_GetOffsetChannel(hadc->Instance, LL_ADC_OFFSET_2)) == __LL_ADC_CHANNEL_TO_DECIMAL_NB(sConfigInjected->InjectedChannel)) + else +#endif /* ADC_VER_V5_V90 */ { - LL_ADC_SetOffset(hadc->Instance, LL_ADC_OFFSET_2, sConfigInjected->InjectedChannel, LL_ADC_OFFSET_SIGNED_SATURATION_DISABLE); - } - if(__LL_ADC_CHANNEL_TO_DECIMAL_NB(LL_ADC_GetOffsetChannel(hadc->Instance, LL_ADC_OFFSET_3)) == __LL_ADC_CHANNEL_TO_DECIMAL_NB(sConfigInjected->InjectedChannel)) - { - LL_ADC_SetOffset(hadc->Instance, LL_ADC_OFFSET_4, sConfigInjected->InjectedChannel, LL_ADC_OFFSET_SIGNED_SATURATION_DISABLE); - } - if(__LL_ADC_CHANNEL_TO_DECIMAL_NB(LL_ADC_GetOffsetChannel(hadc->Instance, LL_ADC_OFFSET_4)) == __LL_ADC_CHANNEL_TO_DECIMAL_NB(sConfigInjected->InjectedChannel)) - { - LL_ADC_SetOffset(hadc->Instance, LL_ADC_OFFSET_4, sConfigInjected->InjectedChannel, LL_ADC_OFFSET_SIGNED_SATURATION_DISABLE); + /* Scan each offset register to check if the selected channel is targeted. */ + /* If this is the case, the corresponding offset number is disabled. */ + if (__LL_ADC_CHANNEL_TO_DECIMAL_NB(LL_ADC_GetOffsetChannel(hadc->Instance, LL_ADC_OFFSET_1)) == __LL_ADC_CHANNEL_TO_DECIMAL_NB(sConfigInjected->InjectedChannel)) + { + LL_ADC_SetOffset(hadc->Instance, LL_ADC_OFFSET_1, sConfigInjected->InjectedChannel, LL_ADC_OFFSET_SIGNED_SATURATION_DISABLE); + } + if (__LL_ADC_CHANNEL_TO_DECIMAL_NB(LL_ADC_GetOffsetChannel(hadc->Instance, LL_ADC_OFFSET_2)) == __LL_ADC_CHANNEL_TO_DECIMAL_NB(sConfigInjected->InjectedChannel)) + { + LL_ADC_SetOffset(hadc->Instance, LL_ADC_OFFSET_2, sConfigInjected->InjectedChannel, LL_ADC_OFFSET_SIGNED_SATURATION_DISABLE); + } + if (__LL_ADC_CHANNEL_TO_DECIMAL_NB(LL_ADC_GetOffsetChannel(hadc->Instance, LL_ADC_OFFSET_3)) == __LL_ADC_CHANNEL_TO_DECIMAL_NB(sConfigInjected->InjectedChannel)) + { + LL_ADC_SetOffset(hadc->Instance, LL_ADC_OFFSET_4, sConfigInjected->InjectedChannel, LL_ADC_OFFSET_SIGNED_SATURATION_DISABLE); + } + if (__LL_ADC_CHANNEL_TO_DECIMAL_NB(LL_ADC_GetOffsetChannel(hadc->Instance, LL_ADC_OFFSET_4)) == __LL_ADC_CHANNEL_TO_DECIMAL_NB(sConfigInjected->InjectedChannel)) + { + LL_ADC_SetOffset(hadc->Instance, LL_ADC_OFFSET_4, sConfigInjected->InjectedChannel, LL_ADC_OFFSET_SIGNED_SATURATION_DISABLE); + } } } @@ -2141,7 +2212,7 @@ HAL_StatusTypeDef HAL_ADCEx_InjectedConfigChannel(ADC_HandleTypeDef *hadc, ADC_I /* Note: these internal measurement paths can be disabled using */ /* HAL_ADC_DeInit(). */ - if(__LL_ADC_IS_CHANNEL_INTERNAL(sConfigInjected->InjectedChannel)) + if (__LL_ADC_IS_CHANNEL_INTERNAL(sConfigInjected->InjectedChannel)) { /* Configuration of common ADC parameters (continuation) */ /* Software is allowed to change common parameters only when all ADCs */ @@ -2164,7 +2235,7 @@ HAL_StatusTypeDef HAL_ADCEx_InjectedConfigChannel(ADC_HandleTypeDef *hadc, ADC_I /* CPU processing cycles, scaling in us split to not */ /* exceed 32 bits register capacity and handle low frequency. */ wait_loop_index = ((LL_ADC_DELAY_TEMPSENSOR_STAB_US / 10UL) * (SystemCoreClock / (100000UL * 2UL))); - while(wait_loop_index != 0UL) + while (wait_loop_index != 0UL) { wait_loop_index--; } @@ -2274,7 +2345,7 @@ HAL_StatusTypeDef HAL_ADCEx_MultiModeConfigChannel(ADC_HandleTypeDef *hadc, ADC_ /* transition from multimode to independent mode). */ if (multimode->Mode != ADC_MODE_INDEPENDENT) { - MODIFY_REG(tmpADC_Common->CCR, ADC_CCR_DAMDF, multimode->DualModeData); + MODIFY_REG(tmpADC_Common->CCR, ADC_CCR_DAMDF, multimode->DualModeData); /* Parameters that can be updated only when ADC is disabled: */ /* - Multimode mode selection */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cordic.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cordic.c new file mode 100644 index 0000000..85c19c1 --- /dev/null +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cordic.c @@ -0,0 +1,1352 @@ +/** + ****************************************************************************** + * @file stm32h7xx_hal_cordic.c + * @author MCD Application Team + * @brief CORDIC HAL module driver. + * This file provides firmware functions to manage the following + * functionalities of the CORDIC peripheral: + * + Initialization and de-initialization functions + * + Peripheral Control functions + * + Callback functions + * + IRQ handler management + * + Peripheral State functions + * + * @verbatim + ================================================================================ + ##### How to use this driver ##### + ================================================================================ + [..] + The CORDIC HAL driver can be used as follows: + + (#) Initialize the CORDIC low level resources by implementing the HAL_CORDIC_MspInit(): + (++) Enable the CORDIC interface clock using __HAL_RCC_CORDIC_CLK_ENABLE() + (++) In case of using interrupts (e.g. HAL_CORDIC_Calculate_IT()) + (+++) Configure the CORDIC interrupt priority using HAL_NVIC_SetPriority() + (+++) Enable the CORDIC IRQ handler using HAL_NVIC_EnableIRQ() + (+++) In CORDIC IRQ handler, call HAL_CORDIC_IRQHandler() + (++) In case of using DMA to control data transfer (e.g. HAL_CORDIC_Calculate_DMA()) + (+++) Enable the DMA2 interface clock using + __HAL_RCC_DMA2_CLK_ENABLE() + (+++) Configure and enable two DMA channels one for managing data transfer from + memory to peripheral (input channel) and another channel for managing data + transfer from peripheral to memory (output channel) + (+++) Associate the initialized DMA handle to the CORDIC DMA handle + using __HAL_LINKDMA() + (+++) Configure the priority and enable the NVIC for the transfer complete + interrupt on the two DMA channels. + Resort to HAL_NVIC_SetPriority() and HAL_NVIC_EnableIRQ() + + (#) Initialize the CORDIC HAL using HAL_CORDIC_Init(). This function + (++) resorts to HAL_CORDIC_MspInit() for low-level initialization, + + (#) Configure CORDIC processing (calculation) using HAL_CORDIC_Configure(). + This function configures: + (++) Processing functions: Cosine, Sine, Phase, Modulus, Arctangent, + Hyperbolic cosine, Hyperbolic sine, Hyperbolic arctangent, + Natural log, Square root + (++) Scaling factor: 1 to 2exp(-7) + (++) Width of input data: 32 bits input data size (Q1.31 format) or 16 bits + input data size (Q1.15 format) + (++) Width of output data: 32 bits output data size (Q1.31 format) or 16 bits + output data size (Q1.15 format) + (++) Number of 32-bit write expected for one calculation: One 32-bits write + or Two 32-bit write + (++) Number of 32-bit read expected after one calculation: One 32-bits read + or Two 32-bit read + (++) Precision: 1 to 15 cycles for calculation (the more cycles, the better precision) + + (#) Four processing (calculation) functions are available: + (++) Polling mode: processing API is blocking function + i.e. it processes the data and wait till the processing is finished + API is HAL_CORDIC_Calculate + (++) Polling Zero-overhead mode: processing API is blocking function + i.e. it processes the data and wait till the processing is finished + A bit faster than standard polling mode, but blocking also AHB bus + API is HAL_CORDIC_CalculateZO + (++) Interrupt mode: processing API is not blocking functions + i.e. it processes the data under interrupt + API is HAL_CORDIC_Calculate_IT + (++) DMA mode: processing API is not blocking functions and the CPU is + not used for data transfer, + i.e. the data transfer is ensured by DMA + API is HAL_CORDIC_Calculate_DMA + + (#) Call HAL_CORDIC_DeInit() to de-initialize the CORDIC peripheral. This function + (++) resorts to HAL_CORDIC_MspDeInit() for low-level de-initialization, + + *** Callback registration *** + ============================================= + + The compilation define USE_HAL_CORDIC_REGISTER_CALLBACKS when set to 1 + allows the user to configure dynamically the driver callbacks. + Use Function @ref HAL_CORDIC_RegisterCallback() to register an interrupt callback. + + Function @ref HAL_CORDIC_RegisterCallback() allows to register following callbacks: + (+) ErrorCallback : Error Callback. + (+) CalculateCpltCallback : Calculate complete Callback. + (+) MspInitCallback : CORDIC MspInit. + (+) MspDeInitCallback : CORDIC MspDeInit. + This function takes as parameters the HAL peripheral handle, the Callback ID + and a pointer to the user callback function. + + Use function @ref HAL_CORDIC_UnRegisterCallback() to reset a callback to the default + weak function. + @ref HAL_CORDIC_UnRegisterCallback takes as parameters the HAL peripheral handle, + and the Callback ID. + This function allows to reset following callbacks: + (+) ErrorCallback : Error Callback. + (+) CalculateCpltCallback : Calculate complete Callback. + (+) MspInitCallback : CORDIC MspInit. + (+) MspDeInitCallback : CORDIC MspDeInit. + + By default, after the HAL_CORDIC_Init() and when the state is HAL_CORDIC_STATE_RESET, + all callbacks are set to the corresponding weak functions: + examples @ref HAL_CORDIC_ErrorCallback(), @ref HAL_CORDIC_CalculateCpltCallback(). + Exception done for MspInit and MspDeInit functions that are + reset to the legacy weak function in the HAL_CORDIC_Init()/ @ref HAL_CORDIC_DeInit() only when + these callbacks are null (not registered beforehand). + if not, MspInit or MspDeInit are not null, the HAL_CORDIC_Init()/ @ref HAL_CORDIC_DeInit() + keep and use the user MspInit/MspDeInit callbacks (registered beforehand) + + Callbacks can be registered/unregistered in HAL_CORDIC_STATE_READY state only. + Exception done MspInit/MspDeInit that can be registered/unregistered + in HAL_CORDIC_STATE_READY or HAL_CORDIC_STATE_RESET state, + thus registered (user) MspInit/DeInit callbacks can be used during the Init/DeInit. + In that case first register the MspInit/MspDeInit user callbacks + using @ref HAL_CORDIC_RegisterCallback() before calling @ref HAL_CORDIC_DeInit() + or HAL_CORDIC_Init() function. + + When The compilation define USE_HAL_CORDIC_REGISTER_CALLBACKS is set to 0 or + not defined, the callback registration feature is not available and all callbacks + are set to the corresponding weak functions. + + @endverbatim + * + ****************************************************************************** + * @attention + * + *

                  © Copyright (c) 2017 STMicroelectronics. + * All rights reserved.

                  + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32h7xx_hal.h" + +#if defined(CORDIC) +#ifdef HAL_CORDIC_MODULE_ENABLED + +/** @addtogroup STM32H7xx_HAL_Driver + * @{ + */ + +/** @defgroup CORDIC CORDIC + * @brief CORDIC HAL driver modules. + * @{ + */ + +/* Private typedef -----------------------------------------------------------*/ +/* Private define ------------------------------------------------------------*/ +/* Private macro -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ + +/** @defgroup CORDIC_Private_Functions CORDIC Private Functions + * @{ + */ +static void CORDIC_WriteInDataIncrementPtr(CORDIC_HandleTypeDef *hcordic, int32_t **ppInBuff); +static void CORDIC_ReadOutDataIncrementPtr(CORDIC_HandleTypeDef *hcordic, int32_t **ppOutBuff); +static void CORDIC_DMAInCplt(DMA_HandleTypeDef *hdma); +static void CORDIC_DMAOutCplt(DMA_HandleTypeDef *hdma); +static void CORDIC_DMAError(DMA_HandleTypeDef *hdma); +/** + * @} + */ + +/* Exported functions --------------------------------------------------------*/ + +/** @defgroup CORDIC_Exported_Functions CORDIC Exported Functions + * @{ + */ + +/** @defgroup CORDIC_Exported_Functions_Group1 Initialization and de-initialization functions + * @brief Initialization and Configuration functions. + * +@verbatim + ============================================================================== + ##### Initialization and de-initialization functions ##### + ============================================================================== + [..] This section provides functions allowing to: + (+) Initialize the CORDIC peripheral and the associated handle + (+) DeInitialize the CORDIC peripheral + (+) Initialize the CORDIC MSP (MCU Specific Package) + (+) De-Initialize the CORDIC MSP + + [..] + +@endverbatim + * @{ + */ + +/** + * @brief Initialize the CORDIC peripheral and the associated handle. + * @param hcordic pointer to a CORDIC_HandleTypeDef structure. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_CORDIC_Init(CORDIC_HandleTypeDef *hcordic) +{ + /* Check the CORDIC handle allocation */ + if (hcordic == NULL) + { + /* Return error status */ + return HAL_ERROR; + } + + /* Check the instance */ + assert_param(IS_CORDIC_ALL_INSTANCE(hcordic->Instance)); + +#if USE_HAL_CORDIC_REGISTER_CALLBACKS == 1 + if (hcordic->State == HAL_CORDIC_STATE_RESET) + { + /* Allocate lock resource and initialize it */ + hcordic->Lock = HAL_UNLOCKED; + + /* Reset callbacks to legacy functions */ + hcordic->ErrorCallback = HAL_CORDIC_ErrorCallback; /* Legacy weak ErrorCallback */ + hcordic->CalculateCpltCallback = HAL_CORDIC_CalculateCpltCallback; /* Legacy weak CalculateCpltCallback */ + + if (hcordic->MspInitCallback == NULL) + { + hcordic->MspInitCallback = HAL_CORDIC_MspInit; /* Legacy weak MspInit */ + } + + /* Initialize the low level hardware */ + hcordic->MspInitCallback(hcordic); + } +#else + if (hcordic->State == HAL_CORDIC_STATE_RESET) + { + /* Allocate lock resource and initialize it */ + hcordic->Lock = HAL_UNLOCKED; + + /* Initialize the low level hardware */ + HAL_CORDIC_MspInit(hcordic); + } +#endif /* (USE_HAL_CORDIC_REGISTER_CALLBACKS) */ + + /* Set CORDIC error code to none */ + hcordic->ErrorCode = HAL_CORDIC_ERROR_NONE; + + /* Reset pInBuff and pOutBuff */ + hcordic->pInBuff = NULL; + hcordic->pOutBuff = NULL; + + /* Reset NbCalcToOrder and NbCalcToGet */ + hcordic->NbCalcToOrder = 0U; + hcordic->NbCalcToGet = 0U; + + /* Reset DMADirection */ + hcordic->DMADirection = CORDIC_DMA_DIR_NONE; + + /* Change CORDIC peripheral state */ + hcordic->State = HAL_CORDIC_STATE_READY; + + /* Return function status */ + return HAL_OK; +} + +/** + * @brief DeInitialize the CORDIC peripheral. + * @param hcordic pointer to a CORDIC_HandleTypeDef structure. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_CORDIC_DeInit(CORDIC_HandleTypeDef *hcordic) +{ + /* Check the CORDIC handle allocation */ + if (hcordic == NULL) + { + /* Return error status */ + return HAL_ERROR; + } + + /* Check the parameters */ + assert_param(IS_CORDIC_ALL_INSTANCE(hcordic->Instance)); + + /* Change CORDIC peripheral state */ + hcordic->State = HAL_CORDIC_STATE_BUSY; + +#if USE_HAL_CORDIC_REGISTER_CALLBACKS == 1 + if (hcordic->MspDeInitCallback == NULL) + { + hcordic->MspDeInitCallback = HAL_CORDIC_MspDeInit; + } + + /* De-Initialize the low level hardware */ + hcordic->MspDeInitCallback(hcordic); +#else + /* De-Initialize the low level hardware: CLOCK, NVIC, DMA */ + HAL_CORDIC_MspDeInit(hcordic); +#endif /* USE_HAL_CORDIC_REGISTER_CALLBACKS */ + + /* Set CORDIC error code to none */ + hcordic->ErrorCode = HAL_CORDIC_ERROR_NONE; + + /* Reset pInBuff and pOutBuff */ + hcordic->pInBuff = NULL; + hcordic->pOutBuff = NULL; + + /* Reset NbCalcToOrder and NbCalcToGet */ + hcordic->NbCalcToOrder = 0U; + hcordic->NbCalcToGet = 0U; + + /* Reset DMADirection */ + hcordic->DMADirection = CORDIC_DMA_DIR_NONE; + + /* Change CORDIC peripheral state */ + hcordic->State = HAL_CORDIC_STATE_RESET; + + /* Reset Lock */ + hcordic->Lock = HAL_UNLOCKED; + + /* Return function status */ + return HAL_OK; +} + +/** + * @brief Initialize the CORDIC MSP. + * @param hcordic CORDIC handle + * @retval None + */ +__weak void HAL_CORDIC_MspInit(CORDIC_HandleTypeDef *hcordic) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hcordic); + + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_CORDIC_MspInit can be implemented in the user file + */ +} + +/** + * @brief DeInitialize the CORDIC MSP. + * @param hcordic CORDIC handle + * @retval None + */ +__weak void HAL_CORDIC_MspDeInit(CORDIC_HandleTypeDef *hcordic) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hcordic); + + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_CORDIC_MspDeInit can be implemented in the user file + */ +} + +#if USE_HAL_CORDIC_REGISTER_CALLBACKS == 1 +/** + * @brief Register a CORDIC CallBack. + * To be used instead of the weak predefined callback. + * @param hcordic pointer to a CORDIC_HandleTypeDef structure that contains + * the configuration information for CORDIC module + * @param CallbackID ID of the callback to be registered + * This parameter can be one of the following values: + * @arg @ref HAL_CORDIC_ERROR_CB_ID error Callback ID + * @arg @ref HAL_CORDIC_CALCULATE_CPLT_CB_ID calculate complete Callback ID + * @arg @ref HAL_CORDIC_MSPINIT_CB_ID MspInit callback ID + * @arg @ref HAL_CORDIC_MSPDEINIT_CB_ID MspDeInit callback ID + * @param pCallback pointer to the Callback function + * @retval HAL status + */ +HAL_StatusTypeDef HAL_CORDIC_RegisterCallback(CORDIC_HandleTypeDef *hcordic, HAL_CORDIC_CallbackIDTypeDef CallbackID, void (* pCallback)(CORDIC_HandleTypeDef *_hcordic)) +{ + HAL_StatusTypeDef status = HAL_OK; + + if (pCallback == NULL) + { + /* Update the error code */ + hcordic->ErrorCode |= HAL_CORDIC_ERROR_INVALID_CALLBACK; + + /* Return error status */ + return HAL_ERROR; + } + + if (hcordic->State == HAL_CORDIC_STATE_READY) + { + switch (CallbackID) + { + case HAL_CORDIC_ERROR_CB_ID : + hcordic->ErrorCallback = pCallback; + break; + + case HAL_CORDIC_CALCULATE_CPLT_CB_ID : + hcordic->CalculateCpltCallback = pCallback; + break; + + case HAL_CORDIC_MSPINIT_CB_ID : + hcordic->MspInitCallback = pCallback; + break; + + case HAL_CORDIC_MSPDEINIT_CB_ID : + hcordic->MspDeInitCallback = pCallback; + break; + + default : + /* Update the error code */ + hcordic->ErrorCode |= HAL_CORDIC_ERROR_INVALID_CALLBACK; + + /* Return error status */ + status = HAL_ERROR; + break; + } + } + else if (hcordic->State == HAL_CORDIC_STATE_RESET) + { + switch (CallbackID) + { + case HAL_CORDIC_MSPINIT_CB_ID : + hcordic->MspInitCallback = pCallback; + break; + + case HAL_CORDIC_MSPDEINIT_CB_ID : + hcordic->MspDeInitCallback = pCallback; + break; + + default : + /* Update the error code */ + hcordic->ErrorCode |= HAL_CORDIC_ERROR_INVALID_CALLBACK; + + /* Return error status */ + status = HAL_ERROR; + break; + } + } + else + { + /* Update the error code */ + hcordic->ErrorCode |= HAL_CORDIC_ERROR_INVALID_CALLBACK; + + /* Return error status */ + status = HAL_ERROR; + } + + return status; +} +#endif /* USE_HAL_CORDIC_REGISTER_CALLBACKS */ + +#if USE_HAL_CORDIC_REGISTER_CALLBACKS == 1 +/** + * @brief Unregister a CORDIC CallBack. + * CORDIC callback is redirected to the weak predefined callback. + * @param hcordic pointer to a CORDIC_HandleTypeDef structure that contains + * the configuration information for CORDIC module + * @param CallbackID ID of the callback to be unregistered + * This parameter can be one of the following values: + * @arg @ref HAL_CORDIC_ERROR_CB_ID error Callback ID + * @arg @ref HAL_CORDIC_CALCULATE_CPLT_CB_ID calculate complete Callback ID + * @arg @ref HAL_CORDIC_MSPINIT_CB_ID MspInit callback ID + * @arg @ref HAL_CORDIC_MSPDEINIT_CB_ID MspDeInit callback ID + * @retval HAL status + */ +HAL_StatusTypeDef HAL_CORDIC_UnRegisterCallback(CORDIC_HandleTypeDef *hcordic, HAL_CORDIC_CallbackIDTypeDef CallbackID) +{ + HAL_StatusTypeDef status = HAL_OK; + + if (hcordic->State == HAL_CORDIC_STATE_READY) + { + switch (CallbackID) + { + case HAL_CORDIC_ERROR_CB_ID : + hcordic->ErrorCallback = HAL_CORDIC_ErrorCallback; + break; + + case HAL_CORDIC_CALCULATE_CPLT_CB_ID : + hcordic->CalculateCpltCallback = HAL_CORDIC_CalculateCpltCallback; + break; + + case HAL_CORDIC_MSPINIT_CB_ID : + hcordic->MspInitCallback = HAL_CORDIC_MspInit; + break; + + case HAL_CORDIC_MSPDEINIT_CB_ID : + hcordic->MspDeInitCallback = HAL_CORDIC_MspDeInit; + break; + + default : + /* Update the error code */ + hcordic->ErrorCode |= HAL_CORDIC_ERROR_INVALID_CALLBACK; + + /* Return error status */ + status = HAL_ERROR; + break; + } + } + else if (hcordic->State == HAL_CORDIC_STATE_RESET) + { + switch (CallbackID) + { + case HAL_CORDIC_MSPINIT_CB_ID : + hcordic->MspInitCallback = HAL_CORDIC_MspInit; + break; + + case HAL_CORDIC_MSPDEINIT_CB_ID : + hcordic->MspDeInitCallback = HAL_CORDIC_MspDeInit; + break; + + default : + /* Update the error code */ + hcordic->ErrorCode |= HAL_CORDIC_ERROR_INVALID_CALLBACK; + + /* Return error status */ + status = HAL_ERROR; + break; + } + } + else + { + /* Update the error code */ + hcordic->ErrorCode |= HAL_CORDIC_ERROR_INVALID_CALLBACK; + + /* Return error status */ + status = HAL_ERROR; + } + + return status; +} +#endif /* USE_HAL_CORDIC_REGISTER_CALLBACKS */ + +/** + * @} + */ + +/** @defgroup CORDIC_Exported_Functions_Group2 Peripheral Control functions + * @brief Control functions. + * +@verbatim + ============================================================================== + ##### Peripheral Control functions ##### + ============================================================================== + [..] This section provides functions allowing to: + (+) Configure the CORDIC peripheral: function, precision, scaling factor, + number of input data and output data, size of input data and output data. + (+) Calculate output data of CORDIC processing on input date, using the + existing CORDIC configuration + [..] Four processing functions are available for calculation: + (+) Polling mode + (+) Polling mode, with Zero-Overhead register access + (+) Interrupt mode + (+) DMA mode + +@endverbatim + * @{ + */ + +/** + * @brief Configure the CORDIC processing according to the specified + parameters in the CORDIC_ConfigTypeDef structure. + * @param hcordic pointer to a CORDIC_HandleTypeDef structure that contains + * the configuration information for CORDIC module + * @param sConfig pointer to a CORDIC_ConfigTypeDef structure that + * contains the CORDIC configuration information. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_CORDIC_Configure(CORDIC_HandleTypeDef *hcordic, CORDIC_ConfigTypeDef *sConfig) +{ + HAL_StatusTypeDef status = HAL_OK; + + /* Check the parameters */ + assert_param(IS_CORDIC_FUNCTION(sConfig->Function)); + assert_param(IS_CORDIC_PRECISION(sConfig->Precision)); + assert_param(IS_CORDIC_SCALE(sConfig->Scale)); + assert_param(IS_CORDIC_NBWRITE(sConfig->NbWrite)); + assert_param(IS_CORDIC_NBREAD(sConfig->NbRead)); + assert_param(IS_CORDIC_INSIZE(sConfig->InSize)); + assert_param(IS_CORDIC_OUTSIZE(sConfig->OutSize)); + + /* Check handle state is ready */ + if (hcordic->State == HAL_CORDIC_STATE_READY) + { + /* Apply all configuration parameters in CORDIC control register */ + MODIFY_REG(hcordic->Instance->CSR, \ + (CORDIC_CSR_FUNC | CORDIC_CSR_PRECISION | CORDIC_CSR_SCALE | \ + CORDIC_CSR_NARGS | CORDIC_CSR_NRES | CORDIC_CSR_ARGSIZE | CORDIC_CSR_RESSIZE), \ + (sConfig->Function | sConfig->Precision | sConfig->Scale | \ + sConfig->NbWrite | sConfig->NbRead | sConfig->InSize | sConfig->OutSize)); + } + else + { + /* Set CORDIC error code */ + hcordic->ErrorCode |= HAL_CORDIC_ERROR_NOT_READY; + + /* Return error status */ + status = HAL_ERROR; + } + + /* Return function status */ + return status; +} + +/** + * @brief Carry out data of CORDIC processing in polling mode, + * according to the existing CORDIC configuration. + * @param hcordic pointer to a CORDIC_HandleTypeDef structure that contains + * the configuration information for CORDIC module. + * @param pInBuff Pointer to buffer containing input data for CORDIC processing. + * @param pOutBuff Pointer to buffer where output data of CORDIC processing will be stored. + * @param NbCalc Number of CORDIC calculation to process. + * @param Timeout Specify Timeout value + * @retval HAL status + */ +HAL_StatusTypeDef HAL_CORDIC_Calculate(CORDIC_HandleTypeDef *hcordic, int32_t *pInBuff, int32_t *pOutBuff, uint32_t NbCalc, uint32_t Timeout) +{ + uint32_t tickstart; + uint32_t index; + int32_t *p_tmp_in_buff = pInBuff; + int32_t *p_tmp_out_buff = pOutBuff; + + /* Check parameters setting */ + if ((pInBuff == NULL) || (pOutBuff == NULL) || (NbCalc == 0U)) + { + /* Update the error code */ + hcordic->ErrorCode |= HAL_CORDIC_ERROR_PARAM; + + /* Return error status */ + return HAL_ERROR; + } + + /* Check handle state is ready */ + if (hcordic->State == HAL_CORDIC_STATE_READY) + { + /* Reset CORDIC error code */ + hcordic->ErrorCode = HAL_CORDIC_ERROR_NONE; + + /* Change the CORDIC state */ + hcordic->State = HAL_CORDIC_STATE_BUSY; + + /* Get tick */ + tickstart = HAL_GetTick(); + + /* Write of input data in Write Data register, and increment input buffer pointer */ + CORDIC_WriteInDataIncrementPtr(hcordic, &p_tmp_in_buff); + + /* Calculation is started. + Provide next set of input data, until number of calculation is achieved */ + for (index = (NbCalc - 1U); index > 0U; index--) + { + /* Write of input data in Write Data register, and increment input buffer pointer */ + CORDIC_WriteInDataIncrementPtr(hcordic, &p_tmp_in_buff); + + /* Wait for RRDY flag to be raised */ + do + { + /* Check for the Timeout */ + if (Timeout != HAL_MAX_DELAY) + { + if ((HAL_GetTick() - tickstart) > Timeout) + { + /* Set CORDIC error code */ + hcordic->ErrorCode = HAL_CORDIC_ERROR_TIMEOUT; + + /* Change the CORDIC state */ + hcordic->State = HAL_CORDIC_STATE_READY; + + /* Return function status */ + return HAL_ERROR; + } + } + } + while (HAL_IS_BIT_CLR(hcordic->Instance->CSR, CORDIC_CSR_RRDY)); + + /* Read output data from Read Data register, and increment output buffer pointer */ + CORDIC_ReadOutDataIncrementPtr(hcordic, &p_tmp_out_buff); + } + + /* Read output data from Read Data register, and increment output buffer pointer */ + CORDIC_ReadOutDataIncrementPtr(hcordic, &p_tmp_out_buff); + + /* Change the CORDIC state */ + hcordic->State = HAL_CORDIC_STATE_READY; + + /* Return function status */ + return HAL_OK; + } + else + { + /* Set CORDIC error code */ + hcordic->ErrorCode |= HAL_CORDIC_ERROR_NOT_READY; + + /* Return function status */ + return HAL_ERROR; + } +} + +/** + * @brief Carry out data of CORDIC processing in Zero-Overhead mode (output data being read + * soon as input data are written), according to the existing CORDIC configuration. + * @param hcordic pointer to a CORDIC_HandleTypeDef structure that contains + * the configuration information for CORDIC module. + * @param pInBuff Pointer to buffer containing input data for CORDIC processing. + * @param pOutBuff Pointer to buffer where output data of CORDIC processing will be stored. + * @param NbCalc Number of CORDIC calculation to process. + * @param Timeout Specify Timeout value + * @retval HAL status + */ +HAL_StatusTypeDef HAL_CORDIC_CalculateZO(CORDIC_HandleTypeDef *hcordic, int32_t *pInBuff, int32_t *pOutBuff, uint32_t NbCalc, uint32_t Timeout) +{ + uint32_t tickstart; + uint32_t index; + int32_t *p_tmp_in_buff = pInBuff; + int32_t *p_tmp_out_buff = pOutBuff; + + /* Check parameters setting */ + if ((pInBuff == NULL) || (pOutBuff == NULL) || (NbCalc == 0U)) + { + /* Update the error code */ + hcordic->ErrorCode |= HAL_CORDIC_ERROR_PARAM; + + /* Return error status */ + return HAL_ERROR; + } + + /* Check handle state is ready */ + if (hcordic->State == HAL_CORDIC_STATE_READY) + { + /* Reset CORDIC error code */ + hcordic->ErrorCode = HAL_CORDIC_ERROR_NONE; + + /* Change the CORDIC state */ + hcordic->State = HAL_CORDIC_STATE_BUSY; + + /* Get tick */ + tickstart = HAL_GetTick(); + + /* Write of input data in Write Data register, and increment input buffer pointer */ + CORDIC_WriteInDataIncrementPtr(hcordic, &p_tmp_in_buff); + + /* Calculation is started. + Provide next set of input data, until number of calculation is achieved */ + for (index = (NbCalc - 1U); index > 0U; index--) + { + /* Write of input data in Write Data register, and increment input buffer pointer */ + CORDIC_WriteInDataIncrementPtr(hcordic, &p_tmp_in_buff); + + /* Read output data from Read Data register, and increment output buffer pointer + The reading is performed in Zero-Overhead mode: + reading is ordered immediately without waiting result ready flag */ + CORDIC_ReadOutDataIncrementPtr(hcordic, &p_tmp_out_buff); + + /* Check for the Timeout */ + if (Timeout != HAL_MAX_DELAY) + { + if ((HAL_GetTick() - tickstart) > Timeout) + { + /* Set CORDIC error code */ + hcordic->ErrorCode = HAL_CORDIC_ERROR_TIMEOUT; + + /* Change the CORDIC state */ + hcordic->State = HAL_CORDIC_STATE_READY; + + /* Return function status */ + return HAL_ERROR; + } + } + } + + /* Read output data from Read Data register, and increment output buffer pointer + The reading is performed in Zero-Overhead mode: + reading is ordered immediately without waiting result ready flag */ + CORDIC_ReadOutDataIncrementPtr(hcordic, &p_tmp_out_buff); + + /* Change the CORDIC state */ + hcordic->State = HAL_CORDIC_STATE_READY; + + /* Return function status */ + return HAL_OK; + } + else + { + /* Set CORDIC error code */ + hcordic->ErrorCode |= HAL_CORDIC_ERROR_NOT_READY; + + /* Return function status */ + return HAL_ERROR; + } +} + +/** + * @brief Carry out data of CORDIC processing in interrupt mode, + * according to the existing CORDIC configuration. + * @param hcordic pointer to a CORDIC_HandleTypeDef structure that contains + * the configuration information for CORDIC module. + * @param pInBuff Pointer to buffer containing input data for CORDIC processing. + * @param pOutBuff Pointer to buffer where output data of CORDIC processing will be stored. + * @param NbCalc Number of CORDIC calculation to process. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_CORDIC_Calculate_IT(CORDIC_HandleTypeDef *hcordic, int32_t *pInBuff, int32_t *pOutBuff, uint32_t NbCalc) +{ + int32_t *tmp_pInBuff = pInBuff; + + /* Check parameters setting */ + if ((pInBuff == NULL) || (pOutBuff == NULL) || (NbCalc == 0U)) + { + /* Update the error code */ + hcordic->ErrorCode |= HAL_CORDIC_ERROR_PARAM; + + /* Return error status */ + return HAL_ERROR; + } + + /* Check handle state is ready */ + if (hcordic->State == HAL_CORDIC_STATE_READY) + { + /* Reset CORDIC error code */ + hcordic->ErrorCode = HAL_CORDIC_ERROR_NONE; + + /* Change the CORDIC state */ + hcordic->State = HAL_CORDIC_STATE_BUSY; + + /* Store the buffers addresses and number of calculations in handle, + provisioning initial write of input data that will be done */ + if (HAL_IS_BIT_SET(hcordic->Instance->CSR, CORDIC_CSR_NARGS)) + { + /* Two writes of input data are expected */ + tmp_pInBuff++; + tmp_pInBuff++; + } + else + { + /* One write of input data is expected */ + tmp_pInBuff++; + } + hcordic->pInBuff = tmp_pInBuff; + hcordic->pOutBuff = pOutBuff; + hcordic->NbCalcToOrder = NbCalc - 1U; + hcordic->NbCalcToGet = NbCalc; + + /* Enable Result Ready Interrupt */ + __HAL_CORDIC_ENABLE_IT(hcordic, CORDIC_IT_IEN); + + /* Set back pointer to start of input data buffer */ + tmp_pInBuff = pInBuff; + + /* Initiate the processing by providing input data + in the Write Data register */ + WRITE_REG(hcordic->Instance->WDATA, (uint32_t)*tmp_pInBuff); + + /* Check if second write of input data is expected */ + if (HAL_IS_BIT_SET(hcordic->Instance->CSR, CORDIC_CSR_NARGS)) + { + /* Increment pointer to input data */ + tmp_pInBuff++; + + /* Perform second write of input data */ + WRITE_REG(hcordic->Instance->WDATA, (uint32_t)*tmp_pInBuff); + } + + /* Return function status */ + return HAL_OK; + } + else + { + /* Set CORDIC error code */ + hcordic->ErrorCode |= HAL_CORDIC_ERROR_NOT_READY; + + /* Return function status */ + return HAL_ERROR; + } +} + +/** + * @brief Carry out input and/or output data of CORDIC processing in DMA mode, + * according to the existing CORDIC configuration. + * @param hcordic pointer to a CORDIC_HandleTypeDef structure that contains + * the configuration information for CORDIC module. + * @param pInBuff Pointer to buffer containing input data for CORDIC processing. + * @param pOutBuff Pointer to buffer where output data of CORDIC processing will be stored. + * @param NbCalc Number of CORDIC calculation to process. + * @param DMADirection Direction of DMA transfers. + * This parameter can be one of the following values: + * @arg @ref CORDIC_DMA_Direction CORDIC DMA direction + * @note pInBuff or pOutBuff is unused in case of unique DMADirection transfer, and can + * be set to NULL value in this case. + * @note pInBuff and pOutBuff buffers must be 32-bit aligned to ensure a correct + * DMA transfer to and from the Peripheral. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_CORDIC_Calculate_DMA(CORDIC_HandleTypeDef *hcordic, int32_t *pInBuff, int32_t *pOutBuff, uint32_t NbCalc, uint32_t DMADirection) +{ + uint32_t sizeinbuff; + uint32_t sizeoutbuff; + uint32_t inputaddr; + uint32_t outputaddr; + + /* Check the parameters */ + assert_param(IS_CORDIC_DMA_DIRECTION(DMADirection)); + + /* Check parameters setting */ + if (NbCalc == 0U) + { + /* Update the error code */ + hcordic->ErrorCode |= HAL_CORDIC_ERROR_PARAM; + + /* Return error status */ + return HAL_ERROR; + } + + /* Check if CORDIC DMA direction "Out" is requested */ + if ((DMADirection == CORDIC_DMA_DIR_OUT) || (DMADirection == CORDIC_DMA_DIR_IN_OUT)) + { + /* Check parameters setting */ + if (pOutBuff == NULL) + { + /* Update the error code */ + hcordic->ErrorCode |= HAL_CORDIC_ERROR_PARAM; + + /* Return error status */ + return HAL_ERROR; + } + } + + /* Check if CORDIC DMA direction "In" is requested */ + if ((DMADirection == CORDIC_DMA_DIR_IN) || (DMADirection == CORDIC_DMA_DIR_IN_OUT)) + { + /* Check parameters setting */ + if (pInBuff == NULL) + { + /* Update the error code */ + hcordic->ErrorCode |= HAL_CORDIC_ERROR_PARAM; + + /* Return error status */ + return HAL_ERROR; + } + } + + if (hcordic->State == HAL_CORDIC_STATE_READY) + { + /* Reset CORDIC error code */ + hcordic->ErrorCode = HAL_CORDIC_ERROR_NONE; + + /* Change the CORDIC state */ + hcordic->State = HAL_CORDIC_STATE_BUSY; + + /* Get DMA direction */ + hcordic->DMADirection = DMADirection; + + /* Check if CORDIC DMA direction "Out" is requested */ + if ((DMADirection == CORDIC_DMA_DIR_OUT) || (DMADirection == CORDIC_DMA_DIR_IN_OUT)) + { + /* Set the CORDIC DMA transfer complete callback */ + hcordic->hdmaOut->XferCpltCallback = CORDIC_DMAOutCplt; + /* Set the DMA error callback */ + hcordic->hdmaOut->XferErrorCallback = CORDIC_DMAError; + + /* Check number of output data at each calculation, + to retrieve the size of output data buffer */ + if (HAL_IS_BIT_SET(hcordic->Instance->CSR, CORDIC_CSR_NRES)) + { + sizeoutbuff = 2U * NbCalc; + } + else + { + sizeoutbuff = NbCalc; + } + + outputaddr = (uint32_t)pOutBuff; + + /* Enable the DMA stream managing CORDIC output data read */ + if (HAL_DMA_Start_IT(hcordic->hdmaOut, (uint32_t)&hcordic->Instance->RDATA, outputaddr, sizeoutbuff) != HAL_OK) + { + /* Update the error code */ + hcordic->ErrorCode |= HAL_CORDIC_ERROR_DMA; + + /* Return error status */ + return HAL_ERROR; + } + + /* Enable output data Read DMA requests */ + SET_BIT(hcordic->Instance->CSR, CORDIC_DMA_REN); + } + + /* Check if CORDIC DMA direction "In" is requested */ + if ((DMADirection == CORDIC_DMA_DIR_IN) || (DMADirection == CORDIC_DMA_DIR_IN_OUT)) + { + /* Set the CORDIC DMA transfer complete callback */ + hcordic->hdmaIn->XferCpltCallback = CORDIC_DMAInCplt; + /* Set the DMA error callback */ + hcordic->hdmaIn->XferErrorCallback = CORDIC_DMAError; + + /* Check number of input data expected for each calculation, + to retrieve the size of input data buffer */ + if (HAL_IS_BIT_SET(hcordic->Instance->CSR, CORDIC_CSR_NARGS)) + { + sizeinbuff = 2U * NbCalc; + } + else + { + sizeinbuff = NbCalc; + } + + inputaddr = (uint32_t)pInBuff; + + /* Enable the DMA stream managing CORDIC input data write */ + if (HAL_DMA_Start_IT(hcordic->hdmaIn, inputaddr, (uint32_t)&hcordic->Instance->WDATA, sizeinbuff) != HAL_OK) + { + /* Update the error code */ + hcordic->ErrorCode |= HAL_CORDIC_ERROR_DMA; + + /* Return error status */ + return HAL_ERROR; + } + + /* Enable input data Write DMA request */ + SET_BIT(hcordic->Instance->CSR, CORDIC_DMA_WEN); + } + + /* Return function status */ + return HAL_OK; + } + else + { + /* Set CORDIC error code */ + hcordic->ErrorCode |= HAL_CORDIC_ERROR_NOT_READY; + + /* Return function status */ + return HAL_ERROR; + } +} + +/** + * @} + */ + +/** @defgroup CORDIC_Exported_Functions_Group3 Callback functions + * @brief Callback functions. + * +@verbatim + ============================================================================== + ##### Callback functions ##### + ============================================================================== + [..] This section provides Interruption and DMA callback functions: + (+) DMA or Interrupt calculate complete + (+) DMA or Interrupt error + +@endverbatim + * @{ + */ + +/** + * @brief CORDIC error callback. + * @param hcordic pointer to a CORDIC_HandleTypeDef structure that contains + * the configuration information for CORDIC module + * @retval None + */ +__weak void HAL_CORDIC_ErrorCallback(CORDIC_HandleTypeDef *hcordic) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hcordic); + + /* NOTE : This function should not be modified; when the callback is needed, + the HAL_CORDIC_ErrorCallback can be implemented in the user file + */ +} + +/** + * @brief CORDIC calculate complete callback. + * @param hcordic pointer to a CORDIC_HandleTypeDef structure that contains + * the configuration information for CORDIC module + * @retval None + */ +__weak void HAL_CORDIC_CalculateCpltCallback(CORDIC_HandleTypeDef *hcordic) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hcordic); + + /* NOTE : This function should not be modified; when the callback is needed, + the HAL_CORDIC_CalculateCpltCallback can be implemented in the user file + */ +} + +/** + * @} + */ + +/** @defgroup CORDIC_Exported_Functions_Group4 IRQ handler management + * @brief IRQ handler. + * +@verbatim + ============================================================================== + ##### IRQ handler management ##### + ============================================================================== +[..] This section provides IRQ handler function. + +@endverbatim + * @{ + */ + +/** + * @brief Handle CORDIC interrupt request. + * @param hcordic pointer to a CORDIC_HandleTypeDef structure that contains + * the configuration information for CORDIC module + * @retval None + */ +void HAL_CORDIC_IRQHandler(CORDIC_HandleTypeDef *hcordic) +{ + /* Check if calculation complete interrupt is enabled and if result ready + flag is raised */ + if (__HAL_CORDIC_GET_IT_SOURCE(hcordic, CORDIC_IT_IEN) != 0U) + { + if (__HAL_CORDIC_GET_FLAG(hcordic, CORDIC_FLAG_RRDY) != 0U) + { + /* Decrement number of calculations to get */ + hcordic->NbCalcToGet--; + + /* Read output data from Read Data register, and increment output buffer pointer */ + CORDIC_ReadOutDataIncrementPtr(hcordic, &(hcordic->pOutBuff)); + + /* Check if calculations are still to be ordered */ + if (hcordic->NbCalcToOrder > 0U) + { + /* Decrement number of calculations to order */ + hcordic->NbCalcToOrder--; + + /* Continue the processing by providing another write of input data + in the Write Data register, and increment input buffer pointer */ + CORDIC_WriteInDataIncrementPtr(hcordic, &(hcordic->pInBuff)); + } + + /* Check if all calculations results are got */ + if (hcordic->NbCalcToGet == 0U) + { + /* Disable Result Ready Interrupt */ + __HAL_CORDIC_DISABLE_IT(hcordic, CORDIC_IT_IEN); + + /* Change the CORDIC state */ + hcordic->State = HAL_CORDIC_STATE_READY; + + /* Call calculation complete callback */ +#if USE_HAL_CORDIC_REGISTER_CALLBACKS == 1 + /*Call registered callback*/ + hcordic->CalculateCpltCallback(hcordic); +#else + /*Call legacy weak (surcharged) callback*/ + HAL_CORDIC_CalculateCpltCallback(hcordic); +#endif /* USE_HAL_CORDIC_REGISTER_CALLBACKS */ + } + } + } +} + +/** + * @} + */ + +/** @defgroup CORDIC_Exported_Functions_Group5 Peripheral State functions + * @brief Peripheral State functions. + * +@verbatim + ============================================================================== + ##### Peripheral State functions ##### + ============================================================================== + [..] + This subsection permits to get in run-time the status of the peripheral. + +@endverbatim + * @{ + */ + +/** + * @brief Return the CORDIC handle state. + * @param hcordic pointer to a CORDIC_HandleTypeDef structure that contains + * the configuration information for CORDIC module + * @retval HAL state + */ +HAL_CORDIC_StateTypeDef HAL_CORDIC_GetState(CORDIC_HandleTypeDef *hcordic) +{ + /* Return CORDIC handle state */ + return hcordic->State; +} + +/** + * @brief Return the CORDIC peripheral error. + * @param hcordic pointer to a CORDIC_HandleTypeDef structure that contains + * the configuration information for CORDIC module + * @note The returned error is a bit-map combination of possible errors + * @retval Error bit-map + */ +uint32_t HAL_CORDIC_GetError(CORDIC_HandleTypeDef *hcordic) +{ + /* Return CORDIC error code */ + return hcordic->ErrorCode; +} + +/** + * @} + */ + +/** + * @} + */ + +/** @addtogroup CORDIC_Private_Functions + * @{ + */ + +/** + * @brief Write input data for CORDIC processing, and increment input buffer pointer. + * @param hcordic pointer to a CORDIC_HandleTypeDef structure that contains + * the configuration information for CORDIC module. + * @param ppInBuff Pointer to pointer to input buffer. + * @retval none + */ +static void CORDIC_WriteInDataIncrementPtr(CORDIC_HandleTypeDef *hcordic, int32_t **ppInBuff) +{ + /* First write of input data in the Write Data register */ + WRITE_REG(hcordic->Instance->WDATA, (uint32_t) **ppInBuff); + + /* Increment input data pointer */ + (*ppInBuff)++; + + /* Check if second write of input data is expected */ + if (HAL_IS_BIT_SET(hcordic->Instance->CSR, CORDIC_CSR_NARGS)) + { + /* Second write of input data in the Write Data register */ + WRITE_REG(hcordic->Instance->WDATA, (uint32_t) **ppInBuff); + + /* Increment input data pointer */ + (*ppInBuff)++; + } +} + +/** + * @brief Read output data of CORDIC processing, and increment output buffer pointer. + * @param hcordic pointer to a CORDIC_HandleTypeDef structure that contains + * the configuration information for CORDIC module. + * @param ppOutBuff Pointer to pointer to output buffer. + * @retval none + */ +static void CORDIC_ReadOutDataIncrementPtr(CORDIC_HandleTypeDef *hcordic, int32_t **ppOutBuff) +{ + /* First read of output data from the Read Data register */ + **ppOutBuff = (int32_t)READ_REG(hcordic->Instance->RDATA); + + /* Increment output data pointer */ + (*ppOutBuff)++; + + /* Check if second read of output data is expected */ + if (HAL_IS_BIT_SET(hcordic->Instance->CSR, CORDIC_CSR_NRES)) + { + /* Second read of output data from the Read Data register */ + **ppOutBuff = (int32_t)READ_REG(hcordic->Instance->RDATA); + + /* Increment output data pointer */ + (*ppOutBuff)++; + } +} + +/** + * @brief DMA CORDIC Input Data process complete callback. + * @param hdma DMA handle. + * @retval None + */ +static void CORDIC_DMAInCplt(DMA_HandleTypeDef *hdma) +{ + CORDIC_HandleTypeDef *hcordic = (CORDIC_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent; + + /* Disable the DMA transfer for input request */ + CLEAR_BIT(hcordic->Instance->CSR, CORDIC_DMA_WEN); + + /* Check if DMA direction is CORDIC Input only (no DMA for CORDIC Output) */ + if (hcordic->DMADirection == CORDIC_DMA_DIR_IN) + { + /* Change the CORDIC DMA direction to none */ + hcordic->DMADirection = CORDIC_DMA_DIR_NONE; + + /* Change the CORDIC state to ready */ + hcordic->State = HAL_CORDIC_STATE_READY; + + /* Call calculation complete callback */ +#if USE_HAL_CORDIC_REGISTER_CALLBACKS == 1 + /*Call registered callback*/ + hcordic->CalculateCpltCallback(hcordic); +#else + /*Call legacy weak (surcharged) callback*/ + HAL_CORDIC_CalculateCpltCallback(hcordic); +#endif /* USE_HAL_CORDIC_REGISTER_CALLBACKS */ + } +} + +/** + * @brief DMA CORDIC Output Data process complete callback. + * @param hdma DMA handle. + * @retval None + */ +static void CORDIC_DMAOutCplt(DMA_HandleTypeDef *hdma) +{ + CORDIC_HandleTypeDef *hcordic = (CORDIC_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent; + + /* Disable the DMA transfer for output request */ + CLEAR_BIT(hcordic->Instance->CSR, CORDIC_DMA_REN); + + /* Change the CORDIC DMA direction to none */ + hcordic->DMADirection = CORDIC_DMA_DIR_NONE; + + /* Change the CORDIC state to ready */ + hcordic->State = HAL_CORDIC_STATE_READY; + + /* Call calculation complete callback */ +#if USE_HAL_CORDIC_REGISTER_CALLBACKS == 1 + /*Call registered callback*/ + hcordic->CalculateCpltCallback(hcordic); +#else + /*Call legacy weak (surcharged) callback*/ + HAL_CORDIC_CalculateCpltCallback(hcordic); +#endif /* USE_HAL_CORDIC_REGISTER_CALLBACKS */ +} + +/** + * @brief DMA CORDIC communication error callback. + * @param hdma DMA handle. + * @retval None + */ +static void CORDIC_DMAError(DMA_HandleTypeDef *hdma) +{ + CORDIC_HandleTypeDef *hcordic = (CORDIC_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent; + + /* Set CORDIC handle state to error */ + hcordic->State = HAL_CORDIC_STATE_READY; + + /* Set CORDIC handle error code to DMA error */ + hcordic->ErrorCode |= HAL_CORDIC_ERROR_DMA; + + /* Call user callback */ +#if USE_HAL_CORDIC_REGISTER_CALLBACKS == 1 + /*Call registered callback*/ + hcordic->ErrorCallback(hcordic); +#else + /*Call legacy weak (surcharged) callback*/ + HAL_CORDIC_ErrorCallback(hcordic); +#endif /* USE_HAL_CORDIC_REGISTER_CALLBACKS */ +} + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#endif /* HAL_CORDIC_MODULE_ENABLED */ +#endif /* CORDIC */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cryp.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cryp.c index abf8584..ba7c395 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cryp.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cryp.c @@ -103,6 +103,8 @@ (##) Payload phase: IP processes the plaintext (P) with hash computation + keystream encryption + data XORing. It works in a similar way for ciphertext (C). (##) Final phase: IP generates the authenticated tag (T) using the last block of data. + HAL_CRYPEx_AESGCM_GenerateAuthTAG API used in this phase to generate 4 words which correspond + to the Tag. user should consider only part of this 4 words, if Tag length is less than 128 bits. (#) structure of message construction in GCM is defined as below : (##) 16 bytes Initial Counter Block (ICB)composed of IV and counter (##) The authenticated header A (also knows as Additional Authentication Data AAD) @@ -143,6 +145,8 @@ (##) Payload phase: IP processes the plaintext (P) with hash computation + keystream encryption + data XORing. It works in a similar way for ciphertext (C). (##) Final phase: IP generates the authenticated tag (T) using the last block of data. + HAL_CRYPEx_AESCCM_GenerateAuthTAG API used in this phase to generate 4 words which correspond to the Tag. + user should consider only part of this 4 words, if Tag length is less than 128 bits *** Callback registration *** ============================= @@ -900,7 +904,7 @@ HAL_StatusTypeDef HAL_CRYP_UnRegisterCallback(CRYP_HandleTypeDef *hcryp, HAL_CRY * @param hcryp: pointer to a CRYP_HandleTypeDef structure that contains * the configuration information for CRYP module * @param Input: Pointer to the input buffer (plaintext) - * @param Size: Length of the plaintext buffer in word. + * @param Size: Length of the plaintext buffer either in word or in byte, according to DataWidthUnit. * @param Output: Pointer to the output buffer(ciphertext) * @param Timeout: Specify Timeout value * @retval HAL status @@ -1030,7 +1034,7 @@ HAL_StatusTypeDef HAL_CRYP_Encrypt(CRYP_HandleTypeDef *hcryp, uint32_t *Input, u * @param hcryp: pointer to a CRYP_HandleTypeDef structure that contains * the configuration information for CRYP module * @param Input: Pointer to the input buffer (ciphertext ) - * @param Size: Length of the plaintext buffer in word. + * @param Size: Length of the plaintext buffer either in word or in byte, according to DataWidthUnit * @param Output: Pointer to the output buffer(plaintext) * @param Timeout: Specify Timeout value * @retval HAL status @@ -1161,7 +1165,7 @@ HAL_StatusTypeDef HAL_CRYP_Decrypt(CRYP_HandleTypeDef *hcryp, uint32_t *Input, u * @param hcryp: pointer to a CRYP_HandleTypeDef structure that contains * the configuration information for CRYP module * @param Input: Pointer to the input buffer (plaintext) - * @param Size: Length of the plaintext buffer in word + * @param Size: Length of the plaintext buffer either in word or in byte, according to DataWidthUnit * @param Output: Pointer to the output buffer(ciphertext) * @retval HAL status */ @@ -1278,7 +1282,7 @@ HAL_StatusTypeDef HAL_CRYP_Encrypt_IT(CRYP_HandleTypeDef *hcryp, uint32_t *Input * @param hcryp: pointer to a CRYP_HandleTypeDef structure that contains * the configuration information for CRYP module * @param Input: Pointer to the input buffer (ciphertext ) - * @param Size: Length of the plaintext buffer in word. + * @param Size: Length of the plaintext buffer either in word or in byte, according to DataWidthUnit * @param Output: Pointer to the output buffer(plaintext) * @retval HAL status */ @@ -1397,7 +1401,7 @@ HAL_StatusTypeDef HAL_CRYP_Decrypt_IT(CRYP_HandleTypeDef *hcryp, uint32_t *Input * @param hcryp: pointer to a CRYP_HandleTypeDef structure that contains * the configuration information for CRYP module * @param Input: Pointer to the input buffer (plaintext) - * @param Size: Length of the plaintext buffer in word. + * @param Size: Length of the plaintext buffer either in word or in byte, according to DataWidthUnit * @param Output: Pointer to the output buffer(ciphertext) * @retval HAL status */ @@ -1550,7 +1554,7 @@ HAL_StatusTypeDef HAL_CRYP_Encrypt_DMA(CRYP_HandleTypeDef *hcryp, uint32_t *Inpu * @param hcryp: pointer to a CRYP_HandleTypeDef structure that contains * the configuration information for CRYP module * @param Input: Pointer to the input buffer (ciphertext ) - * @param Size: Length of the plaintext buffer in word + * @param Size: Length of the plaintext buffer either in word or in byte, according to DataWidthUnit * @param Output: Pointer to the output buffer(plaintext) * @retval HAL status */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cryp_ex.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cryp_ex.c index cda921b..3520a72 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cryp_ex.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cryp_ex.c @@ -103,6 +103,9 @@ * @param hcryp: pointer to a CRYP_HandleTypeDef structure that contains * the configuration information for CRYP module * @param AuthTag: Pointer to the authentication buffer + * the AuthTag generated here is 128bits length, if the TAG length is + * less than 128bits, user should consider only the valid part of AuthTag + * buffer which correspond exactly to TAG length. * @param Timeout: Timeout duration * @retval HAL status */ @@ -260,6 +263,9 @@ HAL_StatusTypeDef HAL_CRYPEx_AESGCM_GenerateAuthTAG(CRYP_HandleTypeDef *hcryp, u * @param hcryp: pointer to a CRYP_HandleTypeDef structure that contains * the configuration information for CRYP module * @param AuthTag: Pointer to the authentication buffer + * the AuthTag generated here is 128bits length, if the TAG length is + * less than 128bits, user should consider only the valid part of AuthTag + * buffer which correspond exactly to TAG length. * @param Timeout: Timeout duration * @retval HAL status */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dcmi.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dcmi.c index ac25ecc..9e524f7 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dcmi.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dcmi.c @@ -462,7 +462,7 @@ HAL_StatusTypeDef HAL_DCMI_Start_DMA(DCMI_HandleTypeDef *hdcmi, uint32_t DCMI_Mo */ HAL_StatusTypeDef HAL_DCMI_Stop(DCMI_HandleTypeDef *hdcmi) { - register uint32_t count = HAL_TIMEOUT_DCMI_STOP * (SystemCoreClock / 8U / 1000U); + uint32_t count = HAL_TIMEOUT_DCMI_STOP * (SystemCoreClock / 8U / 1000U); HAL_StatusTypeDef status = HAL_OK; /* Process locked */ @@ -516,7 +516,7 @@ HAL_StatusTypeDef HAL_DCMI_Stop(DCMI_HandleTypeDef *hdcmi) */ HAL_StatusTypeDef HAL_DCMI_Suspend(DCMI_HandleTypeDef *hdcmi) { - register uint32_t count = HAL_TIMEOUT_DCMI_STOP * (SystemCoreClock / 8U / 1000U); + uint32_t count = HAL_TIMEOUT_DCMI_STOP * (SystemCoreClock / 8U / 1000U); HAL_StatusTypeDef status = HAL_OK; /* Process locked */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dfsdm.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dfsdm.c index 220e07a..c85840d 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dfsdm.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dfsdm.c @@ -459,7 +459,7 @@ HAL_StatusTypeDef HAL_DFSDM_ChannelInit(DFSDM_Channel_HandleTypeDef *hdfsdm_chan /* Set analog watchdog parameters */ hdfsdm_channel->Instance->CHAWSCDR &= ~(DFSDM_CHAWSCDR_AWFORD | DFSDM_CHAWSCDR_AWFOSR); hdfsdm_channel->Instance->CHAWSCDR |= (hdfsdm_channel->Init.Awd.FilterOrder | - ((hdfsdm_channel->Init.Awd.Oversampling - 1U) << DFSDM_CHAWSCDR_AWFOSR_Pos)); + ((hdfsdm_channel->Init.Awd.Oversampling - 1U) << DFSDM_CHAWSCDR_AWFOSR_Pos)); /* Set channel offset and right bit shift */ hdfsdm_channel->Instance->CHCFGR2 &= ~(DFSDM_CHCFGR2_OFFSET | DFSDM_CHCFGR2_DTRBS); @@ -680,38 +680,38 @@ HAL_StatusTypeDef HAL_DFSDM_Channel_UnRegisterCallback(DFSDM_Channel_HandleTypeD { switch (CallbackID) { - case HAL_DFSDM_CHANNEL_CKAB_CB_ID : - hdfsdm_channel->CkabCallback = HAL_DFSDM_ChannelCkabCallback; - break; - case HAL_DFSDM_CHANNEL_SCD_CB_ID : - hdfsdm_channel->ScdCallback = HAL_DFSDM_ChannelScdCallback; - break; - case HAL_DFSDM_CHANNEL_MSPINIT_CB_ID : - hdfsdm_channel->MspInitCallback = HAL_DFSDM_ChannelMspInit; - break; - case HAL_DFSDM_CHANNEL_MSPDEINIT_CB_ID : - hdfsdm_channel->MspDeInitCallback = HAL_DFSDM_ChannelMspDeInit; - break; - default : - /* update return status */ - status = HAL_ERROR; - break; + case HAL_DFSDM_CHANNEL_CKAB_CB_ID : + hdfsdm_channel->CkabCallback = HAL_DFSDM_ChannelCkabCallback; + break; + case HAL_DFSDM_CHANNEL_SCD_CB_ID : + hdfsdm_channel->ScdCallback = HAL_DFSDM_ChannelScdCallback; + break; + case HAL_DFSDM_CHANNEL_MSPINIT_CB_ID : + hdfsdm_channel->MspInitCallback = HAL_DFSDM_ChannelMspInit; + break; + case HAL_DFSDM_CHANNEL_MSPDEINIT_CB_ID : + hdfsdm_channel->MspDeInitCallback = HAL_DFSDM_ChannelMspDeInit; + break; + default : + /* update return status */ + status = HAL_ERROR; + break; } } else if(HAL_DFSDM_CHANNEL_STATE_RESET == hdfsdm_channel->State) { switch (CallbackID) { - case HAL_DFSDM_CHANNEL_MSPINIT_CB_ID : - hdfsdm_channel->MspInitCallback = HAL_DFSDM_ChannelMspInit; - break; - case HAL_DFSDM_CHANNEL_MSPDEINIT_CB_ID : - hdfsdm_channel->MspDeInitCallback = HAL_DFSDM_ChannelMspDeInit; - break; - default : - /* update return status */ - status = HAL_ERROR; - break; + case HAL_DFSDM_CHANNEL_MSPINIT_CB_ID : + hdfsdm_channel->MspInitCallback = HAL_DFSDM_ChannelMspInit; + break; + case HAL_DFSDM_CHANNEL_MSPDEINIT_CB_ID : + hdfsdm_channel->MspDeInitCallback = HAL_DFSDM_ChannelMspDeInit; + break; + default : + /* update return status */ + status = HAL_ERROR; + break; } } else @@ -1094,7 +1094,7 @@ HAL_StatusTypeDef HAL_DFSDM_ChannelScdStart(DFSDM_Channel_HandleTypeDef *hdfsdm_ /* Configure threshold and break signals */ hdfsdm_channel->Instance->CHAWSCDR &= ~(DFSDM_CHAWSCDR_BKSCD | DFSDM_CHAWSCDR_SCDT); hdfsdm_channel->Instance->CHAWSCDR |= ((BreakSignal << DFSDM_CHAWSCDR_BKSCD_Pos) | \ - Threshold); + Threshold); /* Start short circuit detection */ hdfsdm_channel->Instance->CHCFGR1 |= DFSDM_CHCFGR1_SCDEN; @@ -1263,7 +1263,7 @@ HAL_StatusTypeDef HAL_DFSDM_ChannelScdStart_IT(DFSDM_Channel_HandleTypeDef *hdfs /* Configure threshold and break signals */ hdfsdm_channel->Instance->CHAWSCDR &= ~(DFSDM_CHAWSCDR_BKSCD | DFSDM_CHAWSCDR_SCDT); hdfsdm_channel->Instance->CHAWSCDR |= ((BreakSignal << DFSDM_CHAWSCDR_BKSCD_Pos) | \ - Threshold); + Threshold); /* Start short circuit detection */ hdfsdm_channel->Instance->CHCFGR1 |= DFSDM_CHCFGR1_SCDEN; @@ -1911,14 +1911,14 @@ HAL_StatusTypeDef HAL_DFSDM_FilterConfigRegChannel(DFSDM_Filter_HandleTypeDef *h /* Check DFSDM filter state */ if((hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_RESET) && - (hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_ERROR)) + (hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_ERROR)) { /* Configure channel and continuous mode for regular conversion */ hdfsdm_filter->Instance->FLTCR1 &= ~(DFSDM_FLTCR1_RCH | DFSDM_FLTCR1_RCONT); if(ContinuousMode == DFSDM_CONTINUOUS_CONV_ON) { hdfsdm_filter->Instance->FLTCR1 |= (uint32_t) (((Channel & DFSDM_MSB_MASK) << DFSDM_FLTCR1_MSB_RCH_OFFSET) | - DFSDM_FLTCR1_RCONT); + DFSDM_FLTCR1_RCONT); } else { @@ -1954,7 +1954,7 @@ HAL_StatusTypeDef HAL_DFSDM_FilterConfigInjChannel(DFSDM_Filter_HandleTypeDef *h /* Check DFSDM filter state */ if((hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_RESET) && - (hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_ERROR)) + (hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_ERROR)) { /* Configure channel for injected conversion */ hdfsdm_filter->Instance->FLTJCHGR = (uint32_t) (Channel & DFSDM_LSB_MASK); @@ -1962,7 +1962,7 @@ HAL_StatusTypeDef HAL_DFSDM_FilterConfigInjChannel(DFSDM_Filter_HandleTypeDef *h hdfsdm_filter->InjectedChannelsNbr = DFSDM_GetInjChannelsNbr(Channel); /* Update number of injected channels remaining */ hdfsdm_filter->InjConvRemaining = (hdfsdm_filter->InjectedScanMode == ENABLE) ? \ - hdfsdm_filter->InjectedChannelsNbr : 1U; + hdfsdm_filter->InjectedChannelsNbr : 1U; } else { @@ -2022,7 +2022,7 @@ HAL_StatusTypeDef HAL_DFSDM_FilterRegularStart(DFSDM_Filter_HandleTypeDef *hdfsd /* Check DFSDM filter state */ if((hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_READY) || \ - (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_INJ)) + (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_INJ)) { /* Start regular conversion */ DFSDM_RegConvStart(hdfsdm_filter); @@ -2052,7 +2052,7 @@ HAL_StatusTypeDef HAL_DFSDM_FilterPollForRegConversion(DFSDM_Filter_HandleTypeDe /* Check DFSDM filter state */ if((hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_REG) && \ - (hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_REG_INJ)) + (hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_REG_INJ)) { /* Return error status */ return HAL_ERROR; @@ -2091,7 +2091,7 @@ HAL_StatusTypeDef HAL_DFSDM_FilterPollForRegConversion(DFSDM_Filter_HandleTypeDe } /* Update DFSDM filter state only if not continuous conversion and SW trigger */ if((hdfsdm_filter->RegularContMode == DFSDM_CONTINUOUS_CONV_OFF) && \ - (hdfsdm_filter->RegularTrigger == DFSDM_FILTER_SW_TRIGGER)) + (hdfsdm_filter->RegularTrigger == DFSDM_FILTER_SW_TRIGGER)) { hdfsdm_filter->State = (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_REG) ? \ HAL_DFSDM_FILTER_STATE_READY : HAL_DFSDM_FILTER_STATE_INJ; @@ -2116,7 +2116,7 @@ HAL_StatusTypeDef HAL_DFSDM_FilterRegularStop(DFSDM_Filter_HandleTypeDef *hdfsdm /* Check DFSDM filter state */ if((hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_REG) && \ - (hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_REG_INJ)) + (hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_REG_INJ)) { /* Return error status */ status = HAL_ERROR; @@ -2146,7 +2146,7 @@ HAL_StatusTypeDef HAL_DFSDM_FilterRegularStart_IT(DFSDM_Filter_HandleTypeDef *hd /* Check DFSDM filter state */ if((hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_READY) || \ - (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_INJ)) + (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_INJ)) { /* Enable interrupts for regular conversions */ hdfsdm_filter->Instance->FLTCR2 |= (DFSDM_FLTCR2_REOCIE | DFSDM_FLTCR2_ROVRIE); @@ -2177,7 +2177,7 @@ HAL_StatusTypeDef HAL_DFSDM_FilterRegularStop_IT(DFSDM_Filter_HandleTypeDef *hdf /* Check DFSDM filter state */ if((hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_REG) && \ - (hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_REG_INJ)) + (hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_REG_INJ)) { /* Return error status */ status = HAL_ERROR; @@ -2227,21 +2227,21 @@ HAL_StatusTypeDef HAL_DFSDM_FilterRegularStart_DMA(DFSDM_Filter_HandleTypeDef *h } /* Check parameters compatibility */ else if((hdfsdm_filter->RegularTrigger == DFSDM_FILTER_SW_TRIGGER) && \ - (hdfsdm_filter->RegularContMode == DFSDM_CONTINUOUS_CONV_OFF) && \ - (hdfsdm_filter->hdmaReg->Init.Mode == DMA_NORMAL) && \ - (Length != 1U)) + (hdfsdm_filter->RegularContMode == DFSDM_CONTINUOUS_CONV_OFF) && \ + (hdfsdm_filter->hdmaReg->Init.Mode == DMA_NORMAL) && \ + (Length != 1U)) { status = HAL_ERROR; } else if((hdfsdm_filter->RegularTrigger == DFSDM_FILTER_SW_TRIGGER) && \ - (hdfsdm_filter->RegularContMode == DFSDM_CONTINUOUS_CONV_OFF) && \ - (hdfsdm_filter->hdmaReg->Init.Mode == DMA_CIRCULAR)) + (hdfsdm_filter->RegularContMode == DFSDM_CONTINUOUS_CONV_OFF) && \ + (hdfsdm_filter->hdmaReg->Init.Mode == DMA_CIRCULAR)) { status = HAL_ERROR; } /* Check DFSDM filter state */ else if((hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_READY) || \ - (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_INJ)) + (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_INJ)) { /* Set callbacks on DMA handler */ hdfsdm_filter->hdmaReg->XferCpltCallback = DFSDM_DMARegularConvCplt; @@ -2251,7 +2251,7 @@ HAL_StatusTypeDef HAL_DFSDM_FilterRegularStart_DMA(DFSDM_Filter_HandleTypeDef *h /* Start DMA in interrupt mode */ if(HAL_DMA_Start_IT(hdfsdm_filter->hdmaReg, (uint32_t)&hdfsdm_filter->Instance->FLTRDATAR, \ - (uint32_t) pData, Length) != HAL_OK) + (uint32_t) pData, Length) != HAL_OK) { /* Set DFSDM filter in error state */ hdfsdm_filter->State = HAL_DFSDM_FILTER_STATE_ERROR; @@ -2304,21 +2304,21 @@ HAL_StatusTypeDef HAL_DFSDM_FilterRegularMsbStart_DMA(DFSDM_Filter_HandleTypeDef } /* Check parameters compatibility */ else if((hdfsdm_filter->RegularTrigger == DFSDM_FILTER_SW_TRIGGER) && \ - (hdfsdm_filter->RegularContMode == DFSDM_CONTINUOUS_CONV_OFF) && \ - (hdfsdm_filter->hdmaReg->Init.Mode == DMA_NORMAL) && \ - (Length != 1U)) + (hdfsdm_filter->RegularContMode == DFSDM_CONTINUOUS_CONV_OFF) && \ + (hdfsdm_filter->hdmaReg->Init.Mode == DMA_NORMAL) && \ + (Length != 1U)) { status = HAL_ERROR; } else if((hdfsdm_filter->RegularTrigger == DFSDM_FILTER_SW_TRIGGER) && \ - (hdfsdm_filter->RegularContMode == DFSDM_CONTINUOUS_CONV_OFF) && \ - (hdfsdm_filter->hdmaReg->Init.Mode == DMA_CIRCULAR)) + (hdfsdm_filter->RegularContMode == DFSDM_CONTINUOUS_CONV_OFF) && \ + (hdfsdm_filter->hdmaReg->Init.Mode == DMA_CIRCULAR)) { status = HAL_ERROR; } /* Check DFSDM filter state */ else if((hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_READY) || \ - (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_INJ)) + (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_INJ)) { /* Set callbacks on DMA handler */ hdfsdm_filter->hdmaReg->XferCpltCallback = DFSDM_DMARegularConvCplt; @@ -2328,7 +2328,7 @@ HAL_StatusTypeDef HAL_DFSDM_FilterRegularMsbStart_DMA(DFSDM_Filter_HandleTypeDef /* Start DMA in interrupt mode */ if(HAL_DMA_Start_IT(hdfsdm_filter->hdmaReg, (uint32_t)(&hdfsdm_filter->Instance->FLTRDATAR) + 2U, \ - (uint32_t) pData, Length) != HAL_OK) + (uint32_t) pData, Length) != HAL_OK) { /* Set DFSDM filter in error state */ hdfsdm_filter->State = HAL_DFSDM_FILTER_STATE_ERROR; @@ -2363,7 +2363,7 @@ HAL_StatusTypeDef HAL_DFSDM_FilterRegularStop_DMA(DFSDM_Filter_HandleTypeDef *hd /* Check DFSDM filter state */ if((hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_REG) && \ - (hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_REG_INJ)) + (hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_REG_INJ)) { /* Return error status */ status = HAL_ERROR; @@ -2433,7 +2433,7 @@ HAL_StatusTypeDef HAL_DFSDM_FilterInjectedStart(DFSDM_Filter_HandleTypeDef *hdfs /* Check DFSDM filter state */ if((hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_READY) || \ - (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_REG)) + (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_REG)) { /* Start injected conversion */ DFSDM_InjConvStart(hdfsdm_filter); @@ -2463,7 +2463,7 @@ HAL_StatusTypeDef HAL_DFSDM_FilterPollForInjConversion(DFSDM_Filter_HandleTypeDe /* Check DFSDM filter state */ if((hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_INJ) && \ - (hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_REG_INJ)) + (hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_REG_INJ)) { /* Return error status */ return HAL_ERROR; @@ -2514,7 +2514,7 @@ HAL_StatusTypeDef HAL_DFSDM_FilterPollForInjConversion(DFSDM_Filter_HandleTypeDe /* end of injected sequence, reset the value */ hdfsdm_filter->InjConvRemaining = (hdfsdm_filter->InjectedScanMode == ENABLE) ? \ - hdfsdm_filter->InjectedChannelsNbr : 1U; + hdfsdm_filter->InjectedChannelsNbr : 1U; } /* Return function status */ @@ -2537,7 +2537,7 @@ HAL_StatusTypeDef HAL_DFSDM_FilterInjectedStop(DFSDM_Filter_HandleTypeDef *hdfsd /* Check DFSDM filter state */ if((hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_INJ) && \ - (hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_REG_INJ)) + (hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_REG_INJ)) { /* Return error status */ status = HAL_ERROR; @@ -2567,7 +2567,7 @@ HAL_StatusTypeDef HAL_DFSDM_FilterInjectedStart_IT(DFSDM_Filter_HandleTypeDef *h /* Check DFSDM filter state */ if((hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_READY) || \ - (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_REG)) + (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_REG)) { /* Enable interrupts for injected conversions */ hdfsdm_filter->Instance->FLTCR2 |= (DFSDM_FLTCR2_JEOCIE | DFSDM_FLTCR2_JOVRIE); @@ -2598,7 +2598,7 @@ HAL_StatusTypeDef HAL_DFSDM_FilterInjectedStop_IT(DFSDM_Filter_HandleTypeDef *hd /* Check DFSDM filter state */ if((hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_INJ) && \ - (hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_REG_INJ)) + (hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_REG_INJ)) { /* Return error status */ status = HAL_ERROR; @@ -2648,19 +2648,19 @@ HAL_StatusTypeDef HAL_DFSDM_FilterInjectedStart_DMA(DFSDM_Filter_HandleTypeDef * } /* Check parameters compatibility */ else if((hdfsdm_filter->InjectedTrigger == DFSDM_FILTER_SW_TRIGGER) && \ - (hdfsdm_filter->hdmaInj->Init.Mode == DMA_NORMAL) && \ - (Length > hdfsdm_filter->InjConvRemaining)) + (hdfsdm_filter->hdmaInj->Init.Mode == DMA_NORMAL) && \ + (Length > hdfsdm_filter->InjConvRemaining)) { status = HAL_ERROR; } else if((hdfsdm_filter->InjectedTrigger == DFSDM_FILTER_SW_TRIGGER) && \ - (hdfsdm_filter->hdmaInj->Init.Mode == DMA_CIRCULAR)) + (hdfsdm_filter->hdmaInj->Init.Mode == DMA_CIRCULAR)) { status = HAL_ERROR; } /* Check DFSDM filter state */ else if((hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_READY) || \ - (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_REG)) + (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_REG)) { /* Set callbacks on DMA handler */ hdfsdm_filter->hdmaInj->XferCpltCallback = DFSDM_DMAInjectedConvCplt; @@ -2670,7 +2670,7 @@ HAL_StatusTypeDef HAL_DFSDM_FilterInjectedStart_DMA(DFSDM_Filter_HandleTypeDef * /* Start DMA in interrupt mode */ if(HAL_DMA_Start_IT(hdfsdm_filter->hdmaInj, (uint32_t)&hdfsdm_filter->Instance->FLTJDATAR, \ - (uint32_t) pData, Length) != HAL_OK) + (uint32_t) pData, Length) != HAL_OK) { /* Set DFSDM filter in error state */ hdfsdm_filter->State = HAL_DFSDM_FILTER_STATE_ERROR; @@ -2723,19 +2723,19 @@ HAL_StatusTypeDef HAL_DFSDM_FilterInjectedMsbStart_DMA(DFSDM_Filter_HandleTypeDe } /* Check parameters compatibility */ else if((hdfsdm_filter->InjectedTrigger == DFSDM_FILTER_SW_TRIGGER) && \ - (hdfsdm_filter->hdmaInj->Init.Mode == DMA_NORMAL) && \ - (Length > hdfsdm_filter->InjConvRemaining)) + (hdfsdm_filter->hdmaInj->Init.Mode == DMA_NORMAL) && \ + (Length > hdfsdm_filter->InjConvRemaining)) { status = HAL_ERROR; } else if((hdfsdm_filter->InjectedTrigger == DFSDM_FILTER_SW_TRIGGER) && \ - (hdfsdm_filter->hdmaInj->Init.Mode == DMA_CIRCULAR)) + (hdfsdm_filter->hdmaInj->Init.Mode == DMA_CIRCULAR)) { status = HAL_ERROR; } /* Check DFSDM filter state */ else if((hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_READY) || \ - (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_REG)) + (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_REG)) { /* Set callbacks on DMA handler */ hdfsdm_filter->hdmaInj->XferCpltCallback = DFSDM_DMAInjectedConvCplt; @@ -2745,7 +2745,7 @@ HAL_StatusTypeDef HAL_DFSDM_FilterInjectedMsbStart_DMA(DFSDM_Filter_HandleTypeDe /* Start DMA in interrupt mode */ if(HAL_DMA_Start_IT(hdfsdm_filter->hdmaInj, (uint32_t)(&hdfsdm_filter->Instance->FLTJDATAR) + 2U, \ - (uint32_t) pData, Length) != HAL_OK) + (uint32_t) pData, Length) != HAL_OK) { /* Set DFSDM filter in error state */ hdfsdm_filter->State = HAL_DFSDM_FILTER_STATE_ERROR; @@ -2780,7 +2780,7 @@ HAL_StatusTypeDef HAL_DFSDM_FilterInjectedStop_DMA(DFSDM_Filter_HandleTypeDef *h /* Check DFSDM filter state */ if((hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_INJ) && \ - (hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_REG_INJ)) + (hdfsdm_filter->State != HAL_DFSDM_FILTER_STATE_REG_INJ)) { /* Return error status */ status = HAL_ERROR; @@ -2856,7 +2856,7 @@ HAL_StatusTypeDef HAL_DFSDM_FilterAwdStart_IT(DFSDM_Filter_HandleTypeDef *hdfs /* Check DFSDM filter state */ if((hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_RESET) || \ - (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_ERROR)) + (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_ERROR)) { /* Return error status */ status = HAL_ERROR; @@ -2898,7 +2898,7 @@ HAL_StatusTypeDef HAL_DFSDM_FilterAwdStop_IT(DFSDM_Filter_HandleTypeDef *hdfsdm_ /* Check DFSDM filter state */ if((hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_RESET) || \ - (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_ERROR)) + (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_ERROR)) { /* Return error status */ status = HAL_ERROR; @@ -2940,7 +2940,7 @@ HAL_StatusTypeDef HAL_DFSDM_FilterExdStart(DFSDM_Filter_HandleTypeDef *hdfsdm_fi /* Check DFSDM filter state */ if((hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_RESET) || \ - (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_ERROR)) + (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_ERROR)) { /* Return error status */ status = HAL_ERROR; @@ -2971,7 +2971,7 @@ HAL_StatusTypeDef HAL_DFSDM_FilterExdStop(DFSDM_Filter_HandleTypeDef *hdfsdm_fil /* Check DFSDM filter state */ if((hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_RESET) || \ - (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_ERROR)) + (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_ERROR)) { /* Return error status */ status = HAL_ERROR; @@ -3113,7 +3113,7 @@ void HAL_DFSDM_IRQHandler(DFSDM_Filter_HandleTypeDef *hdfsdm_filter) /* Check if overrun occurs during regular conversion */ if(((temp_fltisr & DFSDM_FLTISR_ROVRF) != 0U) && \ - ((temp_fltcr2 & DFSDM_FLTCR2_ROVRIE) != 0U)) + ((temp_fltcr2 & DFSDM_FLTCR2_ROVRIE) != 0U)) { /* Clear regular overrun flag */ hdfsdm_filter->Instance->FLTICR = DFSDM_FLTICR_CLRROVRF; @@ -3130,7 +3130,7 @@ void HAL_DFSDM_IRQHandler(DFSDM_Filter_HandleTypeDef *hdfsdm_filter) } /* Check if overrun occurs during injected conversion */ else if(((temp_fltisr & DFSDM_FLTISR_JOVRF) != 0U) && \ - ((temp_fltcr2 & DFSDM_FLTCR2_JOVRIE) != 0U)) + ((temp_fltcr2 & DFSDM_FLTCR2_JOVRIE) != 0U)) { /* Clear injected overrun flag */ hdfsdm_filter->Instance->FLTICR = DFSDM_FLTICR_CLRJOVRF; @@ -3147,7 +3147,7 @@ void HAL_DFSDM_IRQHandler(DFSDM_Filter_HandleTypeDef *hdfsdm_filter) } /* Check if end of regular conversion */ else if(((temp_fltisr & DFSDM_FLTISR_REOCF) != 0U) && \ - ((temp_fltcr2 & DFSDM_FLTCR2_REOCIE) != 0U)) + ((temp_fltcr2 & DFSDM_FLTCR2_REOCIE) != 0U)) { /* Call regular conversion complete callback */ #if (USE_HAL_DFSDM_REGISTER_CALLBACKS == 1) @@ -3158,7 +3158,7 @@ void HAL_DFSDM_IRQHandler(DFSDM_Filter_HandleTypeDef *hdfsdm_filter) /* End of conversion if mode is not continuous and software trigger */ if((hdfsdm_filter->RegularContMode == DFSDM_CONTINUOUS_CONV_OFF) && \ - (hdfsdm_filter->RegularTrigger == DFSDM_FILTER_SW_TRIGGER)) + (hdfsdm_filter->RegularTrigger == DFSDM_FILTER_SW_TRIGGER)) { /* Disable interrupts for regular conversions */ hdfsdm_filter->Instance->FLTCR2 &= ~(DFSDM_FLTCR2_REOCIE); @@ -3170,7 +3170,7 @@ void HAL_DFSDM_IRQHandler(DFSDM_Filter_HandleTypeDef *hdfsdm_filter) } /* Check if end of injected conversion */ else if(((temp_fltisr & DFSDM_FLTISR_JEOCF) != 0U) && \ - ((temp_fltcr2 & DFSDM_FLTCR2_JEOCIE) != 0U)) + ((temp_fltcr2 & DFSDM_FLTCR2_JEOCIE) != 0U)) { /* Call injected conversion complete callback */ #if (USE_HAL_DFSDM_REGISTER_CALLBACKS == 1) @@ -3195,12 +3195,12 @@ void HAL_DFSDM_IRQHandler(DFSDM_Filter_HandleTypeDef *hdfsdm_filter) } /* end of injected sequence, reset the value */ hdfsdm_filter->InjConvRemaining = (hdfsdm_filter->InjectedScanMode == ENABLE) ? \ - hdfsdm_filter->InjectedChannelsNbr : 1U; + hdfsdm_filter->InjectedChannelsNbr : 1U; } } /* Check if analog watchdog occurs */ else if(((temp_fltisr & DFSDM_FLTISR_AWDF) != 0U) && \ - ((temp_fltcr2 & DFSDM_FLTCR2_AWDIE) != 0U)) + ((temp_fltcr2 & DFSDM_FLTCR2_AWDIE) != 0U)) { uint32_t reg; uint32_t threshold; @@ -3232,8 +3232,8 @@ void HAL_DFSDM_IRQHandler(DFSDM_Filter_HandleTypeDef *hdfsdm_filter) } /* Check if clock absence occurs */ else if((hdfsdm_filter->Instance == filter0Instance) && \ - ((temp_fltisr & DFSDM_FLTISR_CKABF) != 0U) && \ - ((temp_fltcr2 & DFSDM_FLTCR2_CKABIE) != 0U)) + ((temp_fltisr & DFSDM_FLTISR_CKABF) != 0U) && \ + ((temp_fltcr2 & DFSDM_FLTCR2_CKABIE) != 0U)) { uint32_t reg; uint32_t channel = 0; @@ -3265,8 +3265,8 @@ void HAL_DFSDM_IRQHandler(DFSDM_Filter_HandleTypeDef *hdfsdm_filter) } /* Check if short circuit detection occurs */ else if((hdfsdm_filter->Instance == filter0Instance) && \ - ((temp_fltisr & DFSDM_FLTISR_SCDF) != 0U) && \ - ((temp_fltcr2 & DFSDM_FLTCR2_SCDIE) != 0U)) + ((temp_fltisr & DFSDM_FLTISR_SCDF) != 0U) && \ + ((temp_fltcr2 & DFSDM_FLTCR2_SCDIE) != 0U)) { uint32_t reg; uint32_t channel = 0; @@ -3609,7 +3609,7 @@ static uint32_t DFSDM_GetChannelFromInstance(const DFSDM_Channel_TypeDef* Instan } else /* DFSDM1_Channel7 */ { - channel = 7; + channel = 7; } return channel; @@ -3648,12 +3648,12 @@ static void DFSDM_RegConvStart(DFSDM_Filter_HandleTypeDef *hdfsdm_filter) } /* Update remaining injected conversions */ hdfsdm_filter->InjConvRemaining = (hdfsdm_filter->InjectedScanMode == ENABLE) ? \ - hdfsdm_filter->InjectedChannelsNbr : 1U; + hdfsdm_filter->InjectedChannelsNbr : 1U; } } /* Update DFSDM filter state */ hdfsdm_filter->State = (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_READY) ? \ - HAL_DFSDM_FILTER_STATE_REG : HAL_DFSDM_FILTER_STATE_REG_INJ; + HAL_DFSDM_FILTER_STATE_REG : HAL_DFSDM_FILTER_STATE_REG_INJ; } /** @@ -3684,12 +3684,12 @@ static void DFSDM_RegConvStop(DFSDM_Filter_HandleTypeDef *hdfsdm_filter) } /* Update remaining injected conversions */ hdfsdm_filter->InjConvRemaining = (hdfsdm_filter->InjectedScanMode == ENABLE) ? \ - hdfsdm_filter->InjectedChannelsNbr : 1U; + hdfsdm_filter->InjectedChannelsNbr : 1U; } /* Update DFSDM filter state */ hdfsdm_filter->State = (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_REG) ? \ - HAL_DFSDM_FILTER_STATE_READY : HAL_DFSDM_FILTER_STATE_INJ; + HAL_DFSDM_FILTER_STATE_READY : HAL_DFSDM_FILTER_STATE_INJ; } /** @@ -3726,7 +3726,7 @@ static void DFSDM_InjConvStart(DFSDM_Filter_HandleTypeDef *hdfsdm_filter) /* If regular conversion was in progress, restart it */ if((hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_REG) && \ - (hdfsdm_filter->RegularTrigger == DFSDM_FILTER_SW_TRIGGER)) + (hdfsdm_filter->RegularTrigger == DFSDM_FILTER_SW_TRIGGER)) { hdfsdm_filter->Instance->FLTCR1 |= DFSDM_FLTCR1_RSWSTART; } @@ -3766,18 +3766,18 @@ static void DFSDM_InjConvStop(DFSDM_Filter_HandleTypeDef *hdfsdm_filter) /* If regular conversion was in progress, restart it */ if((hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_REG_INJ) && \ - (hdfsdm_filter->RegularTrigger == DFSDM_FILTER_SW_TRIGGER)) + (hdfsdm_filter->RegularTrigger == DFSDM_FILTER_SW_TRIGGER)) { hdfsdm_filter->Instance->FLTCR1 |= DFSDM_FLTCR1_RSWSTART; } /* Update remaining injected conversions */ hdfsdm_filter->InjConvRemaining = (hdfsdm_filter->InjectedScanMode == ENABLE) ? \ - hdfsdm_filter->InjectedChannelsNbr : 1U; + hdfsdm_filter->InjectedChannelsNbr : 1U; /* Update DFSDM filter state */ hdfsdm_filter->State = (hdfsdm_filter->State == HAL_DFSDM_FILTER_STATE_INJ) ? \ - HAL_DFSDM_FILTER_STATE_READY : HAL_DFSDM_FILTER_STATE_REG; + HAL_DFSDM_FILTER_STATE_READY : HAL_DFSDM_FILTER_STATE_REG; } /** diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dma.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dma.c index e2bbea7..e3befad 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dma.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dma.c @@ -529,7 +529,9 @@ HAL_StatusTypeDef HAL_DMA_DeInit(DMA_HandleTypeDef *hdma) return HAL_ERROR; } +#if defined (BDMA1) /* No DMAMUX available for BDMA1 available on STM32H7Ax/Bx devices only */ if(IS_DMA_DMAMUX_ALL_INSTANCE(hdma->Instance) != 0U) /* No DMAMUX available for BDMA1 */ +#endif /* BDMA1 */ { /* Initialize parameters for DMAMUX channel : DMAmuxChannel, DMAmuxChannelStatus and DMAmuxChannelStatusMask */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dts.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dts.c index 1196317..e2774d1 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dts.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dts.c @@ -76,6 +76,10 @@ */ #define TS_TIMEOUT_MS (5UL) +/** + * @} + */ + /* Private macro -------------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ /* Private function prototypes -----------------------------------------------*/ diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_eth.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_eth.c index afb215d..f9c6d0b 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_eth.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_eth.c @@ -791,19 +791,19 @@ HAL_StatusTypeDef HAL_ETH_Start(ETH_HandleTypeDef *heth) */ HAL_StatusTypeDef HAL_ETH_Start_IT(ETH_HandleTypeDef *heth) { - uint32_t descindex = 0, counter; - ETH_DMADescTypeDef *dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descindex]; + uint32_t descindex; + + ETH_DMADescTypeDef *dmarxdesc; if(heth->gState == HAL_ETH_STATE_READY) { heth->gState = HAL_ETH_STATE_BUSY; /* Set IOC bit to all Rx descriptors */ - for(counter= 0; counter < (uint32_t)ETH_RX_DESC_CNT; counter++) + for(descindex = 0; descindex < (uint32_t)ETH_RX_DESC_CNT; descindex++) { - SET_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCRF_IOC); - INCR_RX_DESC_INDEX(descindex, 1U); dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descindex]; + SET_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCRF_IOC); } /* save IT mode to ETH Handle */ @@ -827,9 +827,6 @@ HAL_StatusTypeDef HAL_ETH_Start_IT(ETH_HandleTypeDef *heth) /* Clear Tx and Rx process stopped flags */ heth->Instance->DMACSR |= (ETH_DMACSR_TPS | ETH_DMACSR_RPS); - heth->gState = HAL_ETH_STATE_READY; - heth->RxState = HAL_ETH_STATE_BUSY_RX; - /* Enable ETH DMA interrupts: - Tx complete interrupt - Rx complete interrupt @@ -838,6 +835,9 @@ HAL_StatusTypeDef HAL_ETH_Start_IT(ETH_HandleTypeDef *heth) __HAL_ETH_DMA_ENABLE_IT(heth, (ETH_DMACIER_NIE | ETH_DMACIER_RIE | ETH_DMACIER_TIE | ETH_DMACIER_FBEE | ETH_DMACIER_AIE)); + heth->gState = HAL_ETH_STATE_READY; + heth->RxState = HAL_ETH_STATE_BUSY_RX; + return HAL_OK; } else @@ -894,8 +894,8 @@ HAL_StatusTypeDef HAL_ETH_Stop(ETH_HandleTypeDef *heth) */ HAL_StatusTypeDef HAL_ETH_Stop_IT(ETH_HandleTypeDef *heth) { - ETH_DMADescTypeDef *dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[0]; - uint32_t index; + ETH_DMADescTypeDef *dmarxdesc; + uint32_t descindex; if(heth->gState != HAL_ETH_STATE_RESET) { @@ -904,8 +904,11 @@ HAL_StatusTypeDef HAL_ETH_Stop_IT(ETH_HandleTypeDef *heth) /* Disable intrrupts: - Tx complete interrupt - - Rx complete interrupt */ - __HAL_ETH_DMA_DISABLE_IT(heth, (ETH_DMA_NORMAL_IT | ETH_DMA_RX_IT | ETH_DMA_TX_IT)); + - Rx complete interrupt + - Fatal bus interrupt + */ + __HAL_ETH_DMA_DISABLE_IT(heth, (ETH_DMACIER_NIE | ETH_DMACIER_RIE | ETH_DMACIER_TIE | + ETH_DMACIER_FBEE | ETH_DMACIER_AIE)); /* Disable the DMA transmission */ CLEAR_BIT(heth->Instance->DMACTCR, ETH_DMACTCR_ST); @@ -923,8 +926,9 @@ HAL_StatusTypeDef HAL_ETH_Stop_IT(ETH_HandleTypeDef *heth) CLEAR_BIT(heth->Instance->MACCR, ETH_MACCR_TE); /* Clear IOC bit to all Rx descriptors */ - for(index = 0; index < (uint32_t)ETH_RX_DESC_CNT; index++) + for(descindex = 0; descindex < (uint32_t)ETH_RX_DESC_CNT; descindex++) { + dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descindex]; CLEAR_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCRF_IOC); } @@ -1001,15 +1005,12 @@ HAL_StatusTypeDef HAL_ETH_Transmit(ETH_HandleTypeDef *heth, ETH_TxPacketConfig * if(((HAL_GetTick() - tickstart ) > Timeout) || (Timeout == 0U)) { heth->ErrorCode |= HAL_ETH_ERROR_TIMEOUT; - heth->gState = HAL_ETH_STATE_READY; + heth->gState = HAL_ETH_STATE_ERROR; return HAL_ERROR; } } } - /* Set ETH HAL State to Ready */ - heth->gState = HAL_ETH_STATE_READY; - /* Return function status */ return HAL_OK; } @@ -1030,6 +1031,7 @@ HAL_StatusTypeDef HAL_ETH_Transmit_IT(ETH_HandleTypeDef *heth, ETH_TxPacketConfi { if(pTxConfig == NULL) { + heth->ErrorCode |= HAL_ETH_ERROR_PARAM; return HAL_ERROR; } @@ -1038,7 +1040,7 @@ HAL_StatusTypeDef HAL_ETH_Transmit_IT(ETH_HandleTypeDef *heth, ETH_TxPacketConfi /* Config DMA Tx descriptor by Tx Packet info */ if (ETH_Prepare_Tx_Descriptors(heth, pTxConfig, 1) != HAL_ETH_ERROR_NONE) { - heth->ErrorCode = HAL_ETH_ERROR_BUSY; + heth->ErrorCode |= HAL_ETH_ERROR_BUSY; return HAL_ERROR; } @@ -1148,6 +1150,8 @@ uint8_t HAL_ETH_IsRxDataAvailable(ETH_HandleTypeDef *heth) /* Build Descriptors if an incomplete Packet is received */ if(appdesccnt > 0U) { + dmarxdesclist->CurRxDesc = descidx; + dmarxdesclist->FirstAppDesc = firstappdescidx; descidx = firstappdescidx; dmarxdesc = (ETH_DMADescTypeDef *)dmarxdesclist->RxDesc[descidx]; @@ -1168,12 +1172,17 @@ uint8_t HAL_ETH_IsRxDataAvailable(ETH_HandleTypeDef *heth) { SET_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCRF_IOC); } - - /* Increment rx descriptor index */ - INCR_RX_DESC_INDEX(descidx, 1U); - /* Get descriptor address */ - dmarxdesc = (ETH_DMADescTypeDef *)dmarxdesclist->RxDesc[descidx]; + if(descscancnt < (appdesccnt - 1U)) + { + /* Increment rx descriptor index */ + INCR_RX_DESC_INDEX(descidx, 1U); + /* Get descriptor address */ + dmarxdesc = (ETH_DMADescTypeDef *)dmarxdesclist->RxDesc[descidx]; + } } + + /* Set the Tail pointer address to the last rx descriptor hold by the app */ + WRITE_REG(heth->Instance->DMACRDTPR, (uint32_t)dmarxdesc); } /* Fill information to Rx descriptors list: No received Packet */ @@ -1234,7 +1243,7 @@ HAL_StatusTypeDef HAL_ETH_GetRxDataBuffer(ETH_HandleTypeDef *heth, ETH_BufferTyp if(dmarxdesc->BackupAddr1 != 0U) { /* Point to next buffer */ - rxbuff = (struct __ETH_BufferTypeDef *)rxbuff->next; + rxbuff = rxbuff->next; /* Get Address and length of the second buffer address */ rxbuff->buffer = (uint8_t *) dmarxdesc->BackupAddr1; rxbuff->len = heth->Init.RxBuffLen; @@ -1252,7 +1261,7 @@ HAL_StatusTypeDef HAL_ETH_GetRxDataBuffer(ETH_HandleTypeDef *heth, ETH_BufferTyp dmarxdesc = (ETH_DMADescTypeDef *)dmarxdesclist->RxDesc[descidx]; /* Point to next buffer */ - rxbuff = (struct __ETH_BufferTypeDef *)rxbuff->next; + rxbuff = rxbuff->next; } /* last descriptor data length */ @@ -1272,7 +1281,7 @@ HAL_StatusTypeDef HAL_ETH_GetRxDataBuffer(ETH_HandleTypeDef *heth, ETH_BufferTyp /* Get the Length of the first buffer address */ rxbuff->len = heth->Init.RxBuffLen; /* Point to next buffer */ - rxbuff = (struct __ETH_BufferTypeDef *)rxbuff->next; + rxbuff = rxbuff->next; /* Get the Address the Length of the second buffer address */ rxbuff->buffer = (uint8_t *) dmarxdesc->BackupAddr1; rxbuff->len = lastdesclen - (heth->Init.RxBuffLen); @@ -1435,7 +1444,7 @@ HAL_StatusTypeDef HAL_ETH_BuildRxDescriptors(ETH_HandleTypeDef *heth) SET_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCRF_IOC); } - if(descscan < (dmarxdesclist->AppDescNbr - 1U)) + if(descscan < (totalappdescnbr - 1U)) { /* Increment rx descriptor index */ INCR_RX_DESC_INDEX(descindex, 1U); @@ -1450,6 +1459,9 @@ HAL_StatusTypeDef HAL_ETH_BuildRxDescriptors(ETH_HandleTypeDef *heth) /* reset the Application desc number */ WRITE_REG(dmarxdesclist->AppDescNbr, 0); + /* reset the application context descriptor */ + WRITE_REG(heth->RxDescList.AppContextDesc, 0); + return HAL_OK; } @@ -2390,6 +2402,10 @@ uint32_t HAL_ETH_GetMACWakeUpSource(ETH_HandleTypeDef *heth) * @} */ +/** @addtogroup ETH_Private_Functions ETH Private Functions + * @{ + */ + static void ETH_SetMACConfig(ETH_HandleTypeDef *heth, ETH_MACConfigTypeDef *macconf) { uint32_t macregval; @@ -2703,7 +2719,7 @@ static void ETH_DMARxDescListInit(ETH_HandleTypeDef *heth) WRITE_REG(heth->Instance->DMACRDLAR, (uint32_t) heth->Init.RxDesc); /* Set Receive Descriptor Tail pointer Address */ - WRITE_REG(heth->Instance->DMACRDTPR, ((uint32_t)(heth->Init.RxDesc + (((uint32_t)(ETH_RX_DESC_CNT - 1))*sizeof(ETH_DMADescTypeDef))))); + WRITE_REG(heth->Instance->DMACRDTPR, ((uint32_t)(heth->Init.RxDesc + (uint32_t)(ETH_RX_DESC_CNT - 1)))); } /** @@ -2900,7 +2916,7 @@ static uint32_t ETH_Prepare_Tx_Descriptors(ETH_HandleTypeDef *heth, ETH_TxPacket descnbr += 1U; /* Get the next Tx buffer in the list */ - txbuffer = (struct __ETH_BufferTypeDef *)txbuffer->next; + txbuffer = txbuffer->next; /* Set header or buffer 1 address */ WRITE_REG(dmatxdesc->DESC0, (uint32_t)txbuffer->buffer); @@ -2910,7 +2926,7 @@ static uint32_t ETH_Prepare_Tx_Descriptors(ETH_HandleTypeDef *heth, ETH_TxPacket if (txbuffer->next != NULL) { /* Get the next Tx buffer in the list */ - txbuffer = (struct __ETH_BufferTypeDef *)txbuffer->next; + txbuffer = txbuffer->next; /* Set buffer 2 address */ WRITE_REG(dmatxdesc->DESC1, (uint32_t)txbuffer->buffer); /* Set buffer 2 Length */ @@ -2982,6 +2998,9 @@ static void ETH_InitCallbacksToDefault(ETH_HandleTypeDef *heth) } #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ +/** + * @} + */ /** * @} diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_fdcan.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_fdcan.c index 7505fd5..85c1579 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_fdcan.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_fdcan.c @@ -185,6 +185,8 @@ /* Includes ------------------------------------------------------------------*/ #include "stm32h7xx_hal.h" +#if defined(FDCAN1) + /** @addtogroup STM32H7xx_HAL_Driver * @{ */ @@ -202,6 +204,7 @@ * @{ */ #define FDCAN_TIMEOUT_VALUE 10U +#define FDCAN_TIMEOUT_COUNT 50U #define FDCAN_TX_EVENT_FIFO_MASK (FDCAN_IR_TEFL | FDCAN_IR_TEFF | FDCAN_IR_TEFW | FDCAN_IR_TEFN) #define FDCAN_RX_FIFO0_MASK (FDCAN_IR_RF0L | FDCAN_IR_RF0F | FDCAN_IR_RF0W | FDCAN_IR_RF0N) @@ -2618,7 +2621,7 @@ HAL_StatusTypeDef HAL_FDCAN_Stop(FDCAN_HandleTypeDef *hfdcan) while ((hfdcan->Instance->CCCR & FDCAN_CCCR_INIT) == 0U) { /* Check for the Timeout */ - if (Counter > FDCAN_TIMEOUT_VALUE) + if (Counter > FDCAN_TIMEOUT_COUNT) { /* Update error code */ hfdcan->ErrorCode |= HAL_FDCAN_ERROR_TIMEOUT; @@ -2643,7 +2646,7 @@ HAL_StatusTypeDef HAL_FDCAN_Stop(FDCAN_HandleTypeDef *hfdcan) while ((hfdcan->Instance->CCCR & FDCAN_CCCR_CSA) == FDCAN_CCCR_CSA) { /* Check for the Timeout */ - if (Counter > FDCAN_TIMEOUT_VALUE) + if (Counter > FDCAN_TIMEOUT_COUNT) { /* Update error code */ hfdcan->ErrorCode |= HAL_FDCAN_ERROR_TIMEOUT; @@ -2934,8 +2937,20 @@ HAL_StatusTypeDef HAL_FDCAN_GetRxMessage(FDCAN_HandleTypeDef *hfdcan, uint32_t R } else { + /* Check that the Rx FIFO 0 is full & overwrite mode is on*/ + if(((hfdcan->Instance->RXF0S & FDCAN_RXF0S_F0F) >> FDCAN_RXF0S_F0F_Pos) == 1U) + { + if(((hfdcan->Instance->RXF0C & FDCAN_RXF0C_F0OM) >> FDCAN_RXF0C_F0OM_Pos) == FDCAN_RX_FIFO_OVERWRITE) + { + /* When overwrite status is on discard first message in FIFO */ + GetIndex = 1U; + } + } + + /* Calculate Rx FIFO 0 element index*/ + GetIndex += ((hfdcan->Instance->RXF0S & FDCAN_RXF0S_F0GI) >> FDCAN_RXF0S_F0GI_Pos); + /* Calculate Rx FIFO 0 element address */ - GetIndex = ((hfdcan->Instance->RXF0S & FDCAN_RXF0S_F0GI) >> FDCAN_RXF0S_F0GI_Pos); RxAddress = (uint32_t *)(hfdcan->msgRam.RxFIFO0SA + (GetIndex * hfdcan->Init.RxFifo0ElmtSize * 4U)); } } @@ -2960,8 +2975,20 @@ HAL_StatusTypeDef HAL_FDCAN_GetRxMessage(FDCAN_HandleTypeDef *hfdcan, uint32_t R } else { + /* Check that the Rx FIFO 1 is full & overwrite mode is on*/ + if(((hfdcan->Instance->RXF1S & FDCAN_RXF1S_F1F) >> FDCAN_RXF1S_F1F_Pos) == 1U) + { + if(((hfdcan->Instance->RXF1C & FDCAN_RXF1C_F1OM) >> FDCAN_RXF1C_F1OM_Pos) == FDCAN_RX_FIFO_OVERWRITE) + { + /* When overwrite status is on discard first message in FIFO */ + GetIndex = 1U; + } + } + + /* Calculate Rx FIFO 1 element index*/ + GetIndex += ((hfdcan->Instance->RXF1S & FDCAN_RXF1S_F1GI) >> FDCAN_RXF1S_F1GI_Pos); + /* Calculate Rx FIFO 1 element address */ - GetIndex = ((hfdcan->Instance->RXF1S & FDCAN_RXF1S_F1GI) >> FDCAN_RXF1S_F1GI_Pos); RxAddress = (uint32_t *)(hfdcan->msgRam.RxFIFO1SA + (GetIndex * hfdcan->Init.RxFifo1ElmtSize * 4U)); } } @@ -3120,7 +3147,7 @@ HAL_StatusTypeDef HAL_FDCAN_GetTxEvent(FDCAN_HandleTypeDef *hfdcan, FDCAN_TxEven pTxEvent->Identifier = (*TxEventAddress & FDCAN_ELEMENT_MASK_EXTID); } - /* Retrieve RxFrameType */ + /* Retrieve TxFrameType */ pTxEvent->TxFrameType = (*TxEventAddress & FDCAN_ELEMENT_MASK_RTR); /* Retrieve ErrorStateIndicator */ @@ -3129,7 +3156,7 @@ HAL_StatusTypeDef HAL_FDCAN_GetTxEvent(FDCAN_HandleTypeDef *hfdcan, FDCAN_TxEven /* Increment TxEventAddress pointer to second word of Tx Event FIFO element */ TxEventAddress++; - /* Retrieve RxTimestamp */ + /* Retrieve TxTimestamp */ pTxEvent->TxTimestamp = (*TxEventAddress & FDCAN_ELEMENT_MASK_TS); /* Retrieve DataLength */ @@ -3801,7 +3828,7 @@ HAL_StatusTypeDef HAL_FDCAN_TT_SetGlobalTime(FDCAN_HandleTypeDef *hfdcan, uint32 while ((hfdcan->ttcan->TTOCN & FDCAN_TTOCN_LCKC) != 0U) { /* Check for the Timeout */ - if (Counter > FDCAN_TIMEOUT_VALUE) + if (Counter > FDCAN_TIMEOUT_COUNT) { /* Update error code */ hfdcan->ErrorCode |= HAL_FDCAN_ERROR_TIMEOUT; @@ -3875,7 +3902,7 @@ HAL_StatusTypeDef HAL_FDCAN_TT_SetClockSynchronization(FDCAN_HandleTypeDef *hfdc while ((hfdcan->ttcan->TTOCN & FDCAN_TTOCN_LCKC) != 0U) { /* Check for the Timeout */ - if (Counter > FDCAN_TIMEOUT_VALUE) + if (Counter > FDCAN_TIMEOUT_COUNT) { /* Update error code */ hfdcan->ErrorCode |= HAL_FDCAN_ERROR_TIMEOUT; @@ -3931,7 +3958,7 @@ HAL_StatusTypeDef HAL_FDCAN_TT_ConfigStopWatch(FDCAN_HandleTypeDef *hfdcan, uint while ((hfdcan->ttcan->TTOCN & FDCAN_TTOCN_LCKC) != 0U) { /* Check for the Timeout */ - if (Counter > FDCAN_TIMEOUT_VALUE) + if (Counter > FDCAN_TIMEOUT_COUNT) { /* Update error code */ hfdcan->ErrorCode |= HAL_FDCAN_ERROR_TIMEOUT; @@ -4000,7 +4027,7 @@ HAL_StatusTypeDef HAL_FDCAN_TT_ConfigRegisterTimeMark(FDCAN_HandleTypeDef *hfdca while ((hfdcan->ttcan->TTOCN & FDCAN_TTOCN_LCKC) != 0U) { /* Check for the Timeout */ - if (Counter > FDCAN_TIMEOUT_VALUE) + if (Counter > FDCAN_TIMEOUT_COUNT) { /* Update error code */ hfdcan->ErrorCode |= HAL_FDCAN_ERROR_TIMEOUT; @@ -4036,7 +4063,7 @@ HAL_StatusTypeDef HAL_FDCAN_TT_ConfigRegisterTimeMark(FDCAN_HandleTypeDef *hfdca while ((hfdcan->ttcan->TTTMK & FDCAN_TTTMK_LCKM) != 0U) { /* Check for the Timeout */ - if (Counter > FDCAN_TIMEOUT_VALUE) + if (Counter > FDCAN_TIMEOUT_COUNT) { /* Update error code */ hfdcan->ErrorCode |= HAL_FDCAN_ERROR_TIMEOUT; @@ -4060,7 +4087,7 @@ HAL_StatusTypeDef HAL_FDCAN_TT_ConfigRegisterTimeMark(FDCAN_HandleTypeDef *hfdca while ((hfdcan->ttcan->TTOCN & FDCAN_TTOCN_LCKC) != 0U) { /* Check for the Timeout */ - if (Counter > FDCAN_TIMEOUT_VALUE) + if (Counter > FDCAN_TIMEOUT_COUNT) { /* Update error code */ hfdcan->ErrorCode |= HAL_FDCAN_ERROR_TIMEOUT; @@ -4111,7 +4138,7 @@ HAL_StatusTypeDef HAL_FDCAN_TT_EnableRegisterTimeMarkPulse(FDCAN_HandleTypeDef * while ((hfdcan->ttcan->TTOCN & FDCAN_TTOCN_LCKC) != 0U) { /* Check for the Timeout */ - if (Counter > FDCAN_TIMEOUT_VALUE) + if (Counter > FDCAN_TIMEOUT_COUNT) { /* Update error code */ hfdcan->ErrorCode |= HAL_FDCAN_ERROR_TIMEOUT; @@ -4161,7 +4188,7 @@ HAL_StatusTypeDef HAL_FDCAN_TT_DisableRegisterTimeMarkPulse(FDCAN_HandleTypeDef while ((hfdcan->ttcan->TTOCN & FDCAN_TTOCN_LCKC) != 0U) { /* Check for the Timeout */ - if (Counter > FDCAN_TIMEOUT_VALUE) + if (Counter > FDCAN_TIMEOUT_COUNT) { /* Update error code */ hfdcan->ErrorCode |= HAL_FDCAN_ERROR_TIMEOUT; @@ -4213,7 +4240,7 @@ HAL_StatusTypeDef HAL_FDCAN_TT_EnableTriggerTimeMarkPulse(FDCAN_HandleTypeDef *h while ((hfdcan->ttcan->TTOCN & FDCAN_TTOCN_LCKC) != 0U) { /* Check for the Timeout */ - if (Counter > FDCAN_TIMEOUT_VALUE) + if (Counter > FDCAN_TIMEOUT_COUNT) { /* Update error code */ hfdcan->ErrorCode |= HAL_FDCAN_ERROR_TIMEOUT; @@ -4274,7 +4301,7 @@ HAL_StatusTypeDef HAL_FDCAN_TT_DisableTriggerTimeMarkPulse(FDCAN_HandleTypeDef * while ((hfdcan->ttcan->TTOCN & FDCAN_TTOCN_LCKC) != 0U) { /* Check for the Timeout */ - if (Counter > FDCAN_TIMEOUT_VALUE) + if (Counter > FDCAN_TIMEOUT_COUNT) { /* Update error code */ hfdcan->ErrorCode |= HAL_FDCAN_ERROR_TIMEOUT; @@ -4335,7 +4362,7 @@ HAL_StatusTypeDef HAL_FDCAN_TT_EnableHardwareGapControl(FDCAN_HandleTypeDef *hfd while ((hfdcan->ttcan->TTOCN & FDCAN_TTOCN_LCKC) != 0U) { /* Check for the Timeout */ - if (Counter > FDCAN_TIMEOUT_VALUE) + if (Counter > FDCAN_TIMEOUT_COUNT) { /* Update error code */ hfdcan->ErrorCode |= HAL_FDCAN_ERROR_TIMEOUT; @@ -4396,7 +4423,7 @@ HAL_StatusTypeDef HAL_FDCAN_TT_DisableHardwareGapControl(FDCAN_HandleTypeDef *hf while ((hfdcan->ttcan->TTOCN & FDCAN_TTOCN_LCKC) != 0U) { /* Check for the Timeout */ - if (Counter > FDCAN_TIMEOUT_VALUE) + if (Counter > FDCAN_TIMEOUT_COUNT) { /* Update error code */ hfdcan->ErrorCode |= HAL_FDCAN_ERROR_TIMEOUT; @@ -4459,7 +4486,7 @@ HAL_StatusTypeDef HAL_FDCAN_TT_EnableTimeMarkGapControl(FDCAN_HandleTypeDef *hfd while ((hfdcan->ttcan->TTOCN & FDCAN_TTOCN_LCKC) != 0U) { /* Check for the Timeout */ - if (Counter > FDCAN_TIMEOUT_VALUE) + if (Counter > FDCAN_TIMEOUT_COUNT) { /* Update error code */ hfdcan->ErrorCode |= HAL_FDCAN_ERROR_TIMEOUT; @@ -4520,7 +4547,7 @@ HAL_StatusTypeDef HAL_FDCAN_TT_DisableTimeMarkGapControl(FDCAN_HandleTypeDef *hf while ((hfdcan->ttcan->TTOCN & FDCAN_TTOCN_LCKC) != 0U) { /* Check for the Timeout */ - if (Counter > FDCAN_TIMEOUT_VALUE) + if (Counter > FDCAN_TIMEOUT_COUNT) { /* Update error code */ hfdcan->ErrorCode |= HAL_FDCAN_ERROR_TIMEOUT; @@ -4590,7 +4617,7 @@ HAL_StatusTypeDef HAL_FDCAN_TT_SetNextIsGap(FDCAN_HandleTypeDef *hfdcan) while ((hfdcan->ttcan->TTOCN & FDCAN_TTOCN_LCKC) != 0U) { /* Check for the Timeout */ - if (Counter > FDCAN_TIMEOUT_VALUE) + if (Counter > FDCAN_TIMEOUT_COUNT) { /* Update error code */ hfdcan->ErrorCode |= HAL_FDCAN_ERROR_TIMEOUT; @@ -4660,7 +4687,7 @@ HAL_StatusTypeDef HAL_FDCAN_TT_SetEndOfGap(FDCAN_HandleTypeDef *hfdcan) while ((hfdcan->ttcan->TTOCN & FDCAN_TTOCN_LCKC) != 0U) { /* Check for the Timeout */ - if (Counter > FDCAN_TIMEOUT_VALUE) + if (Counter > FDCAN_TIMEOUT_COUNT) { /* Update error code */ hfdcan->ErrorCode |= HAL_FDCAN_ERROR_TIMEOUT; @@ -4764,7 +4791,7 @@ HAL_StatusTypeDef HAL_FDCAN_TT_EnableExternalSynchronization(FDCAN_HandleTypeDef while ((hfdcan->ttcan->TTOCN & FDCAN_TTOCN_LCKC) != 0U) { /* Check for the Timeout */ - if (Counter > FDCAN_TIMEOUT_VALUE) + if (Counter > FDCAN_TIMEOUT_COUNT) { /* Update error code */ hfdcan->ErrorCode |= HAL_FDCAN_ERROR_TIMEOUT; @@ -4814,7 +4841,7 @@ HAL_StatusTypeDef HAL_FDCAN_TT_DisableExternalSynchronization(FDCAN_HandleTypeDe while ((hfdcan->ttcan->TTOCN & FDCAN_TTOCN_LCKC) != 0U) { /* Check for the Timeout */ - if (Counter > FDCAN_TIMEOUT_VALUE) + if (Counter > FDCAN_TIMEOUT_COUNT) { /* Update error code */ hfdcan->ErrorCode |= HAL_FDCAN_ERROR_TIMEOUT; @@ -6166,4 +6193,6 @@ static void FDCAN_CopyMessageToRAM(FDCAN_HandleTypeDef *hfdcan, FDCAN_TxHeaderTy * @} */ +#endif /* FDCAN1 */ + /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_flash.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_flash.c index 3a6b651..be7c832 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_flash.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_flash.c @@ -105,7 +105,6 @@ * @{ */ #define FLASH_TIMEOUT_VALUE 50000U /* 50 s */ - /** * @} */ @@ -166,10 +165,16 @@ HAL_StatusTypeDef HAL_FLASH_Program(uint32_t TypeProgram, uint32_t FlashAddress, { bank = FLASH_BANK_1; } - else +#if defined (DUAL_BANK) + else if(IS_FLASH_PROGRAM_ADDRESS_BANK2(FlashAddress)) { bank = FLASH_BANK_2; } +#endif /* DUAL_BANK */ + else + { + return HAL_ERROR; + } /* Reset error code */ pFlash.ErrorCode = HAL_FLASH_ERROR_NONE; @@ -179,6 +184,7 @@ HAL_StatusTypeDef HAL_FLASH_Program(uint32_t TypeProgram, uint32_t FlashAddress, if(status == HAL_OK) { +#if defined (DUAL_BANK) if(bank == FLASH_BANK_1) { #if defined (FLASH_OPTCR_PG_OTP) @@ -199,6 +205,20 @@ HAL_StatusTypeDef HAL_FLASH_Program(uint32_t TypeProgram, uint32_t FlashAddress, /* Set PG bit */ SET_BIT(FLASH->CR2, FLASH_CR_PG); } +#else /* Single Bank */ +#if defined (FLASH_OPTCR_PG_OTP) + if (TypeProgram == FLASH_TYPEPROGRAM_OTPWORD) + { + /* Set OTP_PG bit */ + SET_BIT(FLASH->OPTCR, FLASH_OPTCR_PG_OTP); + } + else +#endif /* FLASH_OPTCR_PG_OTP */ + { + /* Set PG bit */ + SET_BIT(FLASH->CR1, FLASH_CR_PG); + } +#endif /* DUAL_BANK */ __ISB(); __DSB(); @@ -228,6 +248,7 @@ HAL_StatusTypeDef HAL_FLASH_Program(uint32_t TypeProgram, uint32_t FlashAddress, /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE, bank); +#if defined (DUAL_BANK) #if defined (FLASH_OPTCR_PG_OTP) if (TypeProgram == FLASH_TYPEPROGRAM_OTPWORD) { @@ -248,6 +269,20 @@ HAL_StatusTypeDef HAL_FLASH_Program(uint32_t TypeProgram, uint32_t FlashAddress, CLEAR_BIT(FLASH->CR2, FLASH_CR_PG); } } +#else /* Single Bank */ +#if defined (FLASH_OPTCR_PG_OTP) + if (TypeProgram == FLASH_TYPEPROGRAM_OTPWORD) + { + /* If the program operation is completed, disable the OTP_PG */ + CLEAR_BIT(FLASH->OPTCR, FLASH_OPTCR_PG_OTP); + } + else +#endif /* FLASH_OPTCR_PG_OTP */ + { + /* If the program operation is completed, disable the PG */ + CLEAR_BIT(FLASH->CR1, FLASH_CR_PG); + } +#endif /* DUAL_BANK */ } /* Process Unlocked */ @@ -291,10 +326,16 @@ HAL_StatusTypeDef HAL_FLASH_Program_IT(uint32_t TypeProgram, uint32_t FlashAddre { bank = FLASH_BANK_1; } - else +#if defined (DUAL_BANK) + else if(IS_FLASH_PROGRAM_ADDRESS_BANK2(FlashAddress)) { bank = FLASH_BANK_2; } +#endif /* DUAL_BANK */ + else + { + return HAL_ERROR; + } /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE, bank); @@ -308,6 +349,7 @@ HAL_StatusTypeDef HAL_FLASH_Program_IT(uint32_t TypeProgram, uint32_t FlashAddre { pFlash.Address = FlashAddress; +#if defined (DUAL_BANK) if(bank == FLASH_BANK_1) { /* Set internal variables used by the IRQ handler */ @@ -352,6 +394,32 @@ HAL_StatusTypeDef HAL_FLASH_Program_IT(uint32_t TypeProgram, uint32_t FlashAddre FLASH_IT_STRBERR_BANK2 | FLASH_IT_INCERR_BANK2); #endif /* FLASH_CR_OPERRIE */ } +#else /* Single Bank */ + /* Set internal variables used by the IRQ handler */ + pFlash.ProcedureOnGoing = FLASH_PROC_PROGRAM_BANK1; + +#if defined (FLASH_OPTCR_PG_OTP) + if (TypeProgram == FLASH_TYPEPROGRAM_OTPWORD) + { + /* Set OTP_PG bit */ + SET_BIT(FLASH->OPTCR, FLASH_OPTCR_PG_OTP); + } + else +#endif /* FLASH_OPTCR_PG_OTP */ + { + /* Set PG bit */ + SET_BIT(FLASH->CR1, FLASH_CR_PG); + } + + /* Enable End of Operation and Error interrupts for Bank 1 */ +#if defined (FLASH_CR_OPERRIE) + __HAL_FLASH_ENABLE_IT_BANK1(FLASH_IT_EOP_BANK1 | FLASH_IT_WRPERR_BANK1 | FLASH_IT_PGSERR_BANK1 | \ + FLASH_IT_STRBERR_BANK1 | FLASH_IT_INCERR_BANK1 | FLASH_IT_OPERR_BANK1); +#else + __HAL_FLASH_ENABLE_IT_BANK1(FLASH_IT_EOP_BANK1 | FLASH_IT_WRPERR_BANK1 | FLASH_IT_PGSERR_BANK1 | \ + FLASH_IT_STRBERR_BANK1 | FLASH_IT_INCERR_BANK1); +#endif /* FLASH_CR_OPERRIE */ +#endif /* DUAL_BANK */ __ISB(); __DSB(); @@ -460,7 +528,8 @@ void HAL_FLASH_IRQHandler(void) } } - /* Check FLASH Bank2 End of Operation flag */ +#if defined (DUAL_BANK) + /* Check FLASH Bank2 End of Operation flag */ if(__HAL_FLASH_GET_FLAG_BANK2(FLASH_SR_EOP) != RESET) { if(pFlash.ProcedureOnGoing == FLASH_PROC_SECTERASE_BANK2) @@ -527,6 +596,7 @@ void HAL_FLASH_IRQHandler(void) } } } +#endif /* DUAL_BANK */ /* Check FLASH Bank1 operation error flags */ #if defined (FLASH_SR_OPERR) @@ -571,6 +641,7 @@ void HAL_FLASH_IRQHandler(void) HAL_FLASH_OperationErrorCallback(temp); } +#if defined (DUAL_BANK) /* Check FLASH Bank2 operation error flags */ #if defined (FLASH_SR_OPERR) errorflag = FLASH->SR2 & ((FLASH_FLAG_WRPERR_BANK2 | FLASH_FLAG_PGSERR_BANK2 | FLASH_FLAG_STRBERR_BANK2 | \ @@ -613,6 +684,7 @@ void HAL_FLASH_IRQHandler(void) /* FLASH error interrupt user callback */ HAL_FLASH_OperationErrorCallback(temp); } +#endif /* DUAL_BANK */ if(pFlash.ProcedureOnGoing == FLASH_PROC_NONE) { @@ -621,17 +693,21 @@ void HAL_FLASH_IRQHandler(void) __HAL_FLASH_DISABLE_IT_BANK1(FLASH_IT_EOP_BANK1 | FLASH_IT_WRPERR_BANK1 | FLASH_IT_PGSERR_BANK1 | \ FLASH_IT_STRBERR_BANK1 | FLASH_IT_INCERR_BANK1 | FLASH_IT_OPERR_BANK1); +#if defined (DUAL_BANK) /* Disable Bank2 Operation and Error source interrupt */ __HAL_FLASH_DISABLE_IT_BANK2(FLASH_IT_EOP_BANK2 | FLASH_IT_WRPERR_BANK2 | FLASH_IT_PGSERR_BANK2 | \ FLASH_IT_STRBERR_BANK2 | FLASH_IT_INCERR_BANK2 | FLASH_IT_OPERR_BANK2); +#endif /* DUAL_BANK */ #else /* Disable Bank1 Operation and Error source interrupt */ __HAL_FLASH_DISABLE_IT_BANK1(FLASH_IT_EOP_BANK1 | FLASH_IT_WRPERR_BANK1 | FLASH_IT_PGSERR_BANK1 | \ FLASH_IT_STRBERR_BANK1 | FLASH_IT_INCERR_BANK1); +#if defined (DUAL_BANK) /* Disable Bank2 Operation and Error source interrupt */ __HAL_FLASH_DISABLE_IT_BANK2(FLASH_IT_EOP_BANK2 | FLASH_IT_WRPERR_BANK2 | FLASH_IT_PGSERR_BANK2 | \ FLASH_IT_STRBERR_BANK2 | FLASH_IT_INCERR_BANK2); +#endif /* DUAL_BANK */ #endif /* FLASH_CR_OPERRIE */ /* Process Unlocked */ @@ -714,6 +790,7 @@ HAL_StatusTypeDef HAL_FLASH_Unlock(void) } } +#if defined (DUAL_BANK) if(READ_BIT(FLASH->CR2, FLASH_CR_LOCK) != 0U) { /* Authorize the FLASH Bank2 Registers access */ @@ -726,6 +803,7 @@ HAL_StatusTypeDef HAL_FLASH_Unlock(void) return HAL_ERROR; } } +#endif /* DUAL_BANK */ return HAL_OK; } @@ -745,6 +823,7 @@ HAL_StatusTypeDef HAL_FLASH_Lock(void) return HAL_ERROR; } +#if defined (DUAL_BANK) /* Set the LOCK Bit to lock the FLASH Bank2 Control Register access */ SET_BIT(FLASH->CR2, FLASH_CR_LOCK); @@ -753,6 +832,7 @@ HAL_StatusTypeDef HAL_FLASH_Lock(void) { return HAL_ERROR; } +#endif /* DUAL_BANK */ return HAL_OK; } @@ -810,10 +890,12 @@ HAL_StatusTypeDef HAL_FLASH_OB_Launch(void) { status = HAL_ERROR; } +#if defined (DUAL_BANK) else if (FLASH_CRC_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE, FLASH_BANK_2) != HAL_OK) { status = HAL_ERROR; } +#endif /* DUAL_BANK */ else { status = HAL_OK; @@ -908,20 +990,22 @@ HAL_StatusTypeDef FLASH_WaitForLastOperation(uint32_t Timeout, uint32_t Bank) Even if the FLASH operation fails, the QW flag will be reset and an error flag will be set */ - uint32_t bsyflag, errorflag; + uint32_t bsyflag = FLASH_FLAG_QW_BANK1; + uint32_t errorflag = FLASH->SR1 & FLASH_FLAG_ALL_ERRORS_BANK1; uint32_t tickstart = HAL_GetTick(); assert_param(IS_FLASH_BANK_EXCLUSIVE(Bank)); - /* Select bsyflag depending on Bank */ - if(Bank == FLASH_BANK_1) - { - bsyflag = FLASH_FLAG_QW_BANK1; - } - else +#if defined (DUAL_BANK) + + if (Bank == FLASH_BANK_2) { + /* Get Error Flags */ + errorflag = (FLASH->SR2 & FLASH_FLAG_ALL_ERRORS_BANK2) | 0x80000000U; + /* Select bsyflag depending on Bank */ bsyflag = FLASH_FLAG_QW_BANK2; } +#endif /* DUAL_BANK */ while(__HAL_FLASH_GET_FLAG(bsyflag)) { @@ -934,18 +1018,8 @@ HAL_StatusTypeDef FLASH_WaitForLastOperation(uint32_t Timeout, uint32_t Bank) } } - /* Get Error Flags */ - if (Bank == FLASH_BANK_1) - { - errorflag = FLASH->SR1 & FLASH_FLAG_ALL_ERRORS_BANK1; - } - else - { - errorflag = (FLASH->SR2 & FLASH_FLAG_ALL_ERRORS_BANK2) | 0x80000000U; - } - - /* In case of error reported in Flash SR1 or SR2 registers (ECCC not managed as an error) */ - if((errorflag & 0x7DFFFFFFU) != 0U) + /* In case of error reported in Flash SR1 or SR2 register */ + if((errorflag & 0x7FFFFFFFU) != 0U) { /*Save the error code*/ pFlash.ErrorCode |= errorflag; @@ -965,6 +1039,7 @@ HAL_StatusTypeDef FLASH_WaitForLastOperation(uint32_t Timeout, uint32_t Bank) __HAL_FLASH_CLEAR_FLAG_BANK1(FLASH_FLAG_EOP_BANK1); } } +#if defined (DUAL_BANK) else { if (__HAL_FLASH_GET_FLAG_BANK2(FLASH_FLAG_EOP_BANK2)) @@ -973,6 +1048,7 @@ HAL_StatusTypeDef FLASH_WaitForLastOperation(uint32_t Timeout, uint32_t Bank) __HAL_FLASH_CLEAR_FLAG_BANK2(FLASH_FLAG_EOP_BANK2); } } +#endif /* DUAL_BANK */ return HAL_OK; } @@ -1064,6 +1140,7 @@ HAL_StatusTypeDef FLASH_CRC_WaitForLastOperation(uint32_t Timeout, uint32_t Bank return HAL_ERROR; } } +#if defined (DUAL_BANK) else { if (__HAL_FLASH_GET_FLAG_BANK2(FLASH_FLAG_CRCRDERR_BANK2)) @@ -1077,6 +1154,7 @@ HAL_StatusTypeDef FLASH_CRC_WaitForLastOperation(uint32_t Timeout, uint32_t Bank return HAL_ERROR; } } +#endif /* DUAL_BANK */ /* If there is no error flag set */ return HAL_OK; diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_flash_ex.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_flash_ex.c index 77b809f..b2f8aae 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_flash_ex.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_flash_ex.c @@ -45,6 +45,8 @@ (++) PCROP protection configuration and control per bank (++) Secure area configuration and control per bank (++) Core Boot address configuration + (++) TCM / AXI shared RAM configuration + (++) CPU Frequency Boost configuration (#) FLASH Memory Lock and unlock per Bank: HAL_FLASHEx_Lock_Bank1(), HAL_FLASHEx_Unlock_Bank1(), HAL_FLASHEx_Lock_Bank2() and HAL_FLASHEx_Unlock_Bank2() functions @@ -123,12 +125,22 @@ static void FLASH_CRC_SelectAddress(uint32_t CRCStartAddr, uint32_t CRCEndAddr, #if defined (DUAL_CORE) static void FLASH_OB_CM4BootAddConfig(uint32_t BootOption, uint32_t BootAddress0, uint32_t BootAddress1); static void FLASH_OB_GetCM4BootAdd(uint32_t *BootAddress0, uint32_t *BootAddress1); -#endif /* DUAL_CORE */ +#endif /*DUAL_CORE*/ #if defined (FLASH_OTPBL_LOCKBL) static void FLASH_OB_OTP_LockConfig(uint32_t OTP_Block); static uint32_t FLASH_OB_OTP_GetLock(void); #endif /* FLASH_OTPBL_LOCKBL */ + +#if defined (FLASH_OPTSR2_TCM_AXI_SHARED) +static void FLASH_OB_SharedRAM_Config(uint32_t SharedRamConfig); +static uint32_t FLASH_OB_SharedRAM_GetConfig(void); +#endif /* FLASH_OPTSR2_TCM_AXI_SHARED */ + +#if defined (FLASH_OPTSR2_CPUFREQ_BOOST) +static void FLASH_OB_CPUFreq_BoostConfig(uint32_t FreqBoost); +static uint32_t FLASH_OB_CPUFreq_GetBoost(void); +#endif /* FLASH_OPTSR2_CPUFREQ_BOOST */ /** * @} */ @@ -187,6 +199,7 @@ HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t } } +#if defined (DUAL_BANK) /* Wait for last operation to be completed on Bank2 */ if((pEraseInit->Banks & FLASH_BANK_2) == FLASH_BANK_2) { @@ -195,6 +208,7 @@ HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t status = HAL_ERROR; } } +#endif /* DUAL_BANK */ if(status == HAL_OK) { @@ -203,7 +217,7 @@ HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t /* Mass erase to be done */ FLASH_MassErase(pEraseInit->VoltageRange, pEraseInit->Banks); - /* Wait for last operation to be completed */ + /* Wait for last operation to be completed on Bank 1 */ if((pEraseInit->Banks & FLASH_BANK_1) == FLASH_BANK_1) { if(FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE, FLASH_BANK_1) != HAL_OK) @@ -213,6 +227,8 @@ HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t /* if the erase operation is completed, disable the Bank1 BER Bit */ FLASH->CR1 &= (~FLASH_CR_BER); } +#if defined (DUAL_BANK) + /* Wait for last operation to be completed on Bank 2 */ if((pEraseInit->Banks & FLASH_BANK_2) == FLASH_BANK_2) { if(FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE, FLASH_BANK_2) != HAL_OK) @@ -222,6 +238,7 @@ HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t /* if the erase operation is completed, disable the Bank2 BER Bit */ FLASH->CR2 &= (~FLASH_CR_BER); } +#endif /* DUAL_BANK */ } else { @@ -241,6 +258,7 @@ HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t /* If the erase operation is completed, disable the SER Bit */ FLASH->CR1 &= (~(FLASH_CR_SER | FLASH_CR_SNB)); } +#if defined (DUAL_BANK) if((pEraseInit->Banks & FLASH_BANK_2) == FLASH_BANK_2) { /* Wait for last operation to be completed */ @@ -249,6 +267,7 @@ HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t /* If the erase operation is completed, disable the SER Bit */ FLASH->CR2 &= (~(FLASH_CR_SER | FLASH_CR_SNB)); } +#endif /* DUAL_BANK */ if(status != HAL_OK) { @@ -287,7 +306,7 @@ HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit) /* Reset error code */ pFlash.ErrorCode = HAL_FLASH_ERROR_NONE; - /* Wait for last operation to be completed */ + /* Wait for last operation to be completed on Bank 1 */ if((pEraseInit->Banks & FLASH_BANK_1) == FLASH_BANK_1) { if(FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE, FLASH_BANK_1) != HAL_OK) @@ -296,6 +315,8 @@ HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit) } } +#if defined (DUAL_BANK) + /* Wait for last operation to be completed on Bank 2 */ if((pEraseInit->Banks & FLASH_BANK_2) == FLASH_BANK_2) { if(FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE, FLASH_BANK_2) != HAL_OK) @@ -303,6 +324,7 @@ HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit) status = HAL_ERROR; } } +#endif /* DUAL_BANK */ if (status != HAL_OK) { @@ -322,6 +344,7 @@ HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit) FLASH_IT_STRBERR_BANK1 | FLASH_IT_INCERR_BANK1); #endif /* FLASH_CR_OPERRIE */ } +#if defined (DUAL_BANK) if((pEraseInit->Banks & FLASH_BANK_2) == FLASH_BANK_2) { /* Enable End of Operation and Error interrupts for Bank 2 */ @@ -333,6 +356,7 @@ HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit) FLASH_IT_STRBERR_BANK2 | FLASH_IT_INCERR_BANK2); #endif /* FLASH_CR_OPERRIE */ } +#endif /* DUAL_BANK */ if(pEraseInit->TypeErase == FLASH_TYPEERASE_MASSERASE) { @@ -341,10 +365,12 @@ HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit) { pFlash.ProcedureOnGoing = FLASH_PROC_MASSERASE_BANK1; } +#if defined (DUAL_BANK) else if(pEraseInit->Banks == FLASH_BANK_2) { pFlash.ProcedureOnGoing = FLASH_PROC_MASSERASE_BANK2; } +#endif /* DUAL_BANK */ else { pFlash.ProcedureOnGoing = FLASH_PROC_ALLBANK_MASSERASE; @@ -355,6 +381,7 @@ HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit) else { /* Erase by sector to be done */ +#if defined (DUAL_BANK) if(pEraseInit->Banks == FLASH_BANK_1) { pFlash.ProcedureOnGoing = FLASH_PROC_SECTERASE_BANK1; @@ -363,6 +390,9 @@ HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit) { pFlash.ProcedureOnGoing = FLASH_PROC_SECTERASE_BANK2; } +#else + pFlash.ProcedureOnGoing = FLASH_PROC_SECTERASE_BANK1; +#endif /* DUAL_BANK */ pFlash.NbSectorsToErase = pEraseInit->NbSectors; pFlash.Sector = pEraseInit->Sector; @@ -401,10 +431,12 @@ HAL_StatusTypeDef HAL_FLASHEx_OBProgram(FLASH_OBProgramInitTypeDef *pOBInit) { status = HAL_ERROR; } +#if defined (DUAL_BANK) else if(FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE, FLASH_BANK_2) != HAL_OK) { status = HAL_ERROR; } +#endif /* DUAL_BANK */ else { status = HAL_OK; @@ -491,6 +523,22 @@ HAL_StatusTypeDef HAL_FLASHEx_OBProgram(FLASH_OBProgramInitTypeDef *pOBInit) FLASH_OB_OTP_LockConfig(pOBInit->OTPBlockLock); } #endif /* FLASH_OTPBL_LOCKBL */ + +#if defined(FLASH_OPTSR2_TCM_AXI_SHARED) + /* TCM / AXI Shared RAM configuration */ + if((pOBInit->OptionType & OPTIONBYTE_SHARED_RAM) == OPTIONBYTE_SHARED_RAM) + { + FLASH_OB_SharedRAM_Config(pOBInit->SharedRamConfig); + } +#endif /* FLASH_OPTSR2_TCM_AXI_SHARED */ + +#if defined(FLASH_OPTSR2_CPUFREQ_BOOST) + /* CPU Frequency Boost configuration */ + if((pOBInit->OptionType & OPTIONBYTE_FREQ_BOOST) == OPTIONBYTE_FREQ_BOOST) + { + FLASH_OB_CPUFreq_BoostConfig(pOBInit->FreqBoostState); + } +#endif /* FLASH_OPTSR2_CPUFREQ_BOOST */ } /* Process Unlocked */ @@ -521,7 +569,11 @@ void HAL_FLASHEx_OBGetConfig(FLASH_OBProgramInitTypeDef *pOBInit) /*Get BOR Level*/ pOBInit->BORLevel = FLASH_OB_GetBOR(); +#if defined (DUAL_BANK) if ((pOBInit->Banks == FLASH_BANK_1) || (pOBInit->Banks == FLASH_BANK_2)) +#else + if (pOBInit->Banks == FLASH_BANK_1) +#endif /* DUAL_BANK */ { pOBInit->OptionType |= (OPTIONBYTE_WRP | OPTIONBYTE_PCROP | OPTIONBYTE_SECURE_AREA); @@ -552,6 +604,20 @@ void HAL_FLASHEx_OBGetConfig(FLASH_OBProgramInitTypeDef *pOBInit) /* Get OTP Block Lock */ pOBInit->OTPBlockLock = FLASH_OB_OTP_GetLock(); #endif /* FLASH_OTPBL_LOCKBL */ + +#if defined (FLASH_OPTSR2_TCM_AXI_SHARED) + pOBInit->OptionType |= OPTIONBYTE_SHARED_RAM; + + /* Get TCM / AXI Shared RAM */ + pOBInit->SharedRamConfig = FLASH_OB_SharedRAM_GetConfig(); +#endif /* FLASH_OPTSR2_TCM_AXI_SHARED */ + +#if defined (FLASH_OPTSR2_CPUFREQ_BOOST) + pOBInit->OptionType |= OPTIONBYTE_FREQ_BOOST; + + /* Get CPU Frequency Boost */ + pOBInit->FreqBoostState = FLASH_OB_CPUFreq_GetBoost(); +#endif /* FLASH_OPTSR2_CPUFREQ_BOOST */ } /** @@ -587,6 +653,7 @@ HAL_StatusTypeDef HAL_FLASHEx_Lock_Bank1(void) return HAL_OK; } +#if defined (DUAL_BANK) /** * @brief Unlock the FLASH Bank2 control registers access * @retval HAL Status @@ -619,6 +686,7 @@ HAL_StatusTypeDef HAL_FLASHEx_Lock_Bank2(void) SET_BIT(FLASH->CR2, FLASH_CR_LOCK); return HAL_OK; } +#endif /* DUAL_BANK */ /* * @brief Perform a CRC computation on the specified FLASH memory area @@ -693,6 +761,7 @@ HAL_StatusTypeDef HAL_FLASHEx_ComputeCRC(FLASH_CRCInitTypeDef *pCRCInit, uint32_ /* Clear CRC flags */ __HAL_FLASH_CLEAR_FLAG_BANK1(FLASH_FLAG_CRCEND_BANK1 | FLASH_FLAG_CRCRDERR_BANK1); } +#if defined (DUAL_BANK) else { /* Enable CRC feature */ @@ -741,6 +810,7 @@ HAL_StatusTypeDef HAL_FLASHEx_ComputeCRC(FLASH_CRCInitTypeDef *pCRCInit, uint32_ /* Clear CRC flags */ __HAL_FLASH_CLEAR_FLAG_BANK2(FLASH_FLAG_CRCEND_BANK2 | FLASH_FLAG_CRCRDERR_BANK2); } +#endif /* DUAL_BANK */ } return status; @@ -787,6 +857,7 @@ static void FLASH_MassErase(uint32_t VoltageRange, uint32_t Banks) #endif /* FLASH_CR_PSIZE */ assert_param(IS_FLASH_BANK(Banks)); +#if defined (DUAL_BANK) /* Flash Mass Erase */ if((Banks & FLASH_BANK_BOTH) == FLASH_BANK_BOTH) { @@ -804,6 +875,7 @@ static void FLASH_MassErase(uint32_t VoltageRange, uint32_t Banks) FLASH->OPTCR |= FLASH_OPTCR_MER; } else +#endif /* DUAL_BANK */ { /* Proceed to erase Flash Bank */ if((Banks & FLASH_BANK_1) == FLASH_BANK_1) @@ -817,6 +889,8 @@ static void FLASH_MassErase(uint32_t VoltageRange, uint32_t Banks) /* Erase Bank1 */ FLASH->CR1 |= (FLASH_CR_BER | FLASH_CR_START); } + +#if defined (DUAL_BANK) if((Banks & FLASH_BANK_2) == FLASH_BANK_2) { #if defined (FLASH_CR_PSIZE) @@ -828,6 +902,7 @@ static void FLASH_MassErase(uint32_t VoltageRange, uint32_t Banks) /* Erase Bank2 */ FLASH->CR2 |= (FLASH_CR_BER | FLASH_CR_START); } +#endif /* DUAL_BANK */ } } @@ -874,6 +949,7 @@ void FLASH_Erase_Sector(uint32_t Sector, uint32_t Banks, uint32_t VoltageRange) #endif /* FLASH_CR_PSIZE */ } +#if defined (DUAL_BANK) if((Banks & FLASH_BANK_2) == FLASH_BANK_2) { #if defined (FLASH_CR_PSIZE) @@ -888,6 +964,7 @@ void FLASH_Erase_Sector(uint32_t Sector, uint32_t Banks, uint32_t VoltageRange) FLASH->CR2 |= (FLASH_CR_SER | (Sector << FLASH_CR_SNB_Pos) | FLASH_CR_START); #endif /* FLASH_CR_PSIZE */ } +#endif /* DUAL_BANK */ } /** @@ -916,11 +993,13 @@ static void FLASH_OB_EnableWRP(uint32_t WRPSector, uint32_t Banks) FLASH->WPSN_PRG1 &= (~(WRPSector & FLASH_WPSN_WRPSN)); } +#if defined (DUAL_BANK) if((Banks & FLASH_BANK_2) == FLASH_BANK_2) { /* Enable Write Protection for bank 2 */ FLASH->WPSN_PRG2 &= (~(WRPSector & FLASH_WPSN_WRPSN)); } +#endif /* DUAL_BANK */ } /** @@ -949,11 +1028,13 @@ static void FLASH_OB_DisableWRP(uint32_t WRPSector, uint32_t Banks) FLASH->WPSN_PRG1 |= (WRPSector & FLASH_WPSN_WRPSN); } +#if defined (DUAL_BANK) if((Banks & FLASH_BANK_2) == FLASH_BANK_2) { /* Disable Write Protection for bank 2 */ FLASH->WPSN_PRG2 |= (WRPSector & FLASH_WPSN_WRPSN); } +#endif /* DUAL_BANK */ } /** @@ -978,15 +1059,17 @@ static void FLASH_OB_GetWRP(uint32_t *WRPState, uint32_t *WRPSector, uint32_t Ba { uint32_t regvalue = 0U; - if((Bank & FLASH_BANK_BOTH) == FLASH_BANK_1) + if(Bank == FLASH_BANK_1) { regvalue = FLASH->WPSN_CUR1; } - if((Bank & FLASH_BANK_BOTH) == FLASH_BANK_2) +#if defined (DUAL_BANK) + if(Bank == FLASH_BANK_2) { regvalue = FLASH->WPSN_CUR2; } +#endif /* DUAL_BANK */ (*WRPSector) = (~regvalue) & FLASH_WPSN_WRPSN; @@ -1199,7 +1282,9 @@ static void FLASH_OB_UserConfig(uint32_t UserType, uint32_t UserConfig) optr_reg_val |= (UserConfig & FLASH_OPTSR_BCM7); optr_reg_mask |= FLASH_OPTSR_BCM7; } +#endif /* DUAL_CORE */ +#if defined (FLASH_OPTSR_NRST_STOP_D2) if((UserType & OB_USER_NRST_STOP_D2) != 0U) { /* NRST_STOP option byte should be modified */ @@ -1219,7 +1304,9 @@ static void FLASH_OB_UserConfig(uint32_t UserType, uint32_t UserConfig) optr_reg_val |= (UserConfig & FLASH_OPTSR_NRST_STBY_D2); optr_reg_mask |= FLASH_OPTSR_NRST_STBY_D2; } -#endif /* DUAL_CORE */ +#endif /* FLASH_OPTSR_NRST_STOP_D2 */ + +#if defined (DUAL_BANK) if((UserType & OB_USER_SWAP_BANK) != 0U) { /* SWAP_BANK_OPT option byte should be modified */ @@ -1229,6 +1316,7 @@ static void FLASH_OB_UserConfig(uint32_t UserType, uint32_t UserConfig) optr_reg_val |= (UserConfig & FLASH_OPTSR_SWAP_BANK_OPT); optr_reg_mask |= FLASH_OPTSR_SWAP_BANK_OPT; } +#endif /* DUAL_BANK */ if((UserType & OB_USER_IOHSLV) != 0U) { @@ -1325,6 +1413,7 @@ static void FLASH_OB_PCROPConfig(uint32_t PCROPConfig, uint32_t PCROPStartAddr, PCROPConfig; } +#if defined (DUAL_BANK) if((Banks & FLASH_BANK_2) == FLASH_BANK_2) { assert_param(IS_FLASH_PROGRAM_ADDRESS_BANK2(PCROPStartAddr)); @@ -1335,6 +1424,7 @@ static void FLASH_OB_PCROPConfig(uint32_t PCROPConfig, uint32_t PCROPStartAddr, (((PCROPEndAddr - FLASH_BANK2_BASE) >> 8) << FLASH_PRAR_PROT_AREA_END_Pos) | \ PCROPConfig; } +#endif /* DUAL_BANK */ } /** @@ -1360,17 +1450,19 @@ static void FLASH_OB_GetPCROP(uint32_t *PCROPConfig, uint32_t *PCROPStartAddr, u uint32_t regvalue = 0; uint32_t bankBase = 0; - if((Bank & FLASH_BANK_BOTH) == FLASH_BANK_1) + if(Bank == FLASH_BANK_1) { regvalue = FLASH->PRAR_CUR1; bankBase = FLASH_BANK1_BASE; } - if((Bank & FLASH_BANK_BOTH) == FLASH_BANK_2) +#if defined (DUAL_BANK) + if(Bank == FLASH_BANK_2) { regvalue = FLASH->PRAR_CUR2; bankBase = FLASH_BANK2_BASE; } +#endif /* DUAL_BANK */ (*PCROPConfig) = (regvalue & FLASH_PRAR_DMEP); @@ -1561,6 +1653,7 @@ static void FLASH_OB_SecureAreaConfig(uint32_t SecureAreaConfig, uint32_t Secure (SecureAreaConfig & FLASH_SCAR_DMES); } +#if defined (DUAL_BANK) if((Banks & FLASH_BANK_2) == FLASH_BANK_2) { /* Check the parameters */ @@ -1572,6 +1665,7 @@ static void FLASH_OB_SecureAreaConfig(uint32_t SecureAreaConfig, uint32_t Secure (((SecureAreaEndAddr - FLASH_BANK2_BASE) >> 8) << FLASH_SCAR_SEC_AREA_END_Pos) | \ (SecureAreaConfig & FLASH_SCAR_DMES); } +#endif /* DUAL_BANK */ } /** @@ -1589,17 +1683,19 @@ static void FLASH_OB_GetSecureArea(uint32_t *SecureAreaConfig, uint32_t *SecureA uint32_t bankBase = 0; /* Check Bank parameter value */ - if((Bank & FLASH_BANK_BOTH) == FLASH_BANK_1) + if(Bank == FLASH_BANK_1) { regvalue = FLASH->SCAR_CUR1; bankBase = FLASH_BANK1_BASE; } - if((Bank & FLASH_BANK_BOTH) == FLASH_BANK_2) +#if defined (DUAL_BANK) + if(Bank == FLASH_BANK_2) { regvalue = FLASH->SCAR_CUR2; bankBase = FLASH_BANK2_BASE; } +#endif /* DUAL_BANK */ /* Get the secure area settings */ (*SecureAreaConfig) = (regvalue & FLASH_SCAR_DMES); @@ -1627,6 +1723,7 @@ static void FLASH_CRC_AddSector(uint32_t Sector, uint32_t Bank) /* Select CRC Sector and activate ADD_SECT bit */ FLASH->CRCCR1 |= Sector | FLASH_CRCCR_ADD_SECT; } +#if defined (DUAL_BANK) else { /* Clear CRC sector */ @@ -1635,6 +1732,7 @@ static void FLASH_CRC_AddSector(uint32_t Sector, uint32_t Bank) /* Select CRC Sector and activate ADD_SECT bit */ FLASH->CRCCR2 |= Sector | FLASH_CRCCR_ADD_SECT; } +#endif /* DUAL_BANK */ } /** @@ -1655,6 +1753,7 @@ static void FLASH_CRC_SelectAddress(uint32_t CRCStartAddr, uint32_t CRCEndAddr, FLASH->CRCSADD1 = CRCStartAddr; FLASH->CRCEADD1 = CRCEndAddr; } +#if defined (DUAL_BANK) else { assert_param(IS_FLASH_PROGRAM_ADDRESS_BANK2(CRCStartAddr)); @@ -1664,6 +1763,7 @@ static void FLASH_CRC_SelectAddress(uint32_t CRCStartAddr, uint32_t CRCEndAddr, FLASH->CRCSADD2 = CRCStartAddr; FLASH->CRCEADD2 = CRCEndAddr; } +#endif /* DUAL_BANK */ } /** * @} @@ -1696,6 +1796,60 @@ static uint32_t FLASH_OB_OTP_GetLock(void) } #endif /* FLASH_OTPBL_LOCKBL */ +#if defined (FLASH_OPTSR2_TCM_AXI_SHARED) +/** + * @brief Configure the TCM / AXI Shared RAM. + * @param SharedRamConfig specifies the Shared RAM configuration. + * This parameter can be a value of @ref FLASHEx_OB_TCM_AXI_SHARED + * @retval None + */ +static void FLASH_OB_SharedRAM_Config(uint32_t SharedRamConfig) +{ + /* Check the parameters */ + assert_param(IS_OB_USER_TCM_AXI_SHARED(SharedRamConfig)); + + /* Configure the TCM / AXI Shared RAM in the option bytes register */ + MODIFY_REG(FLASH->OPTSR2_PRG, FLASH_OPTSR2_TCM_AXI_SHARED, SharedRamConfig); +} + +/** + * @brief Get the TCM / AXI Shared RAM configurtion. + * @retval SharedRamConfig returns the TCM / AXI Shared RAM configuration. + * This return value can be a value of @ref FLASHEx_OB_TCM_AXI_SHARED + */ +static uint32_t FLASH_OB_SharedRAM_GetConfig(void) +{ + return (FLASH->OPTSR2_CUR & FLASH_OPTSR2_TCM_AXI_SHARED);; +} +#endif /* FLASH_OPTSR2_TCM_AXI_SHARED */ + +#if defined (FLASH_OPTSR2_CPUFREQ_BOOST) +/** + * @brief Configure the CPU Frequency Boost. + * @param FreqBoost specifies the CPU Frequency Boost state. + * This parameter can be a value of @ref FLASHEx_OB_CPUFREQ_BOOST + * @retval None + */ +static void FLASH_OB_CPUFreq_BoostConfig(uint32_t FreqBoost) +{ + /* Check the parameters */ + assert_param(IS_OB_USER_CPUFREQ_BOOST(FreqBoost)); + + /* Configure the CPU Frequency Boost in the option bytes register */ + MODIFY_REG(FLASH->OPTSR2_PRG, FLASH_OPTSR2_CPUFREQ_BOOST, FreqBoost); +} + +/** + * @brief Get the CPU Frequency Boost state. + * @retval FreqBoost returns the CPU Frequency Boost state. + * This return value can be a value of @ref FLASHEx_OB_CPUFREQ_BOOST + */ +static uint32_t FLASH_OB_CPUFreq_GetBoost(void) +{ + return (FLASH->OPTSR2_CUR & FLASH_OPTSR2_CPUFREQ_BOOST);; +} +#endif /* FLASH_OPTSR2_CPUFREQ_BOOST */ + #endif /* HAL_FLASH_MODULE_ENABLED */ /** diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_fmac.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_fmac.c new file mode 100644 index 0000000..9159210 --- /dev/null +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_fmac.c @@ -0,0 +1,2520 @@ +/** + ****************************************************************************** + * @file stm32h7xx_hal_fmac.c + * @author MCD Application Team + * @brief FMAC HAL module driver. + * This file provides firmware functions to manage the following + * functionalities of the FMAC peripheral: + * + Initialization and de-initialization functions + * + Peripheral Control functions + * + Callback functions + * + IRQ handler management + * + Peripheral State functions + * + * @verbatim +================================================================================ + ##### How to use this driver ##### +================================================================================ + [..] + The FMAC HAL driver can be used as follows: + + (#) Initialize the FMAC low level resources by implementing the HAL_FMAC_MspInit(): + (++) Enable the FMAC interface clock using __HAL_RCC_FMAC_CLK_ENABLE(). + (++) In case of using interrupts (e.g. access configured as FMAC_BUFFER_ACCESS_IT): + (+++) Configure the FMAC interrupt priority using HAL_NVIC_SetPriority(). + (+++) Enable the FMAC IRQ handler using HAL_NVIC_EnableIRQ(). + (+++) In FMAC IRQ handler, call HAL_FMAC_IRQHandler(). + (++) In case of using DMA to control data transfer (e.g. access configured + as FMAC_BUFFER_ACCESS_DMA): + (+++) Enable the DMA1 interface clock using __HAL_RCC_DMA1_CLK_ENABLE(). + (+++) Enable the DMAMUX1 interface clock using __HAL_RCC_DMAMUX1_CLK_ENABLE(). + (+++) If the initialisation of the internal buffers (coefficients, input, + output) is done via DMA, configure and enable one DMA channel for + managing data transfer from memory to memory (preload channel). + (+++) If the input buffer is accessed via DMA, configure and enable one + DMA channel for managing data transfer from memory to peripheral + (input channel). + (+++) If the output buffer is accessed via DMA, configure and enable + one DMA channel for managing data transfer from peripheral to + memory (output channel). + (+++) Associate the initialized DMA handle(s) to the FMAC DMA handle(s) + using __HAL_LINKDMA(). + (+++) Configure the priority and enable the NVIC for the transfer complete + interrupt on the enabled DMA channel(s) using HAL_NVIC_SetPriority() + and HAL_NVIC_EnableIRQ(). + + (#) Initialize the FMAC HAL using HAL_FMAC_Init(). This function + resorts to HAL_FMAC_MspInit() for low-level initialization. + + (#) Configure the FMAC processing (filter) using HAL_FMAC_FilterConfig() + or HAL_FMAC_FilterConfig_DMA(). + This function: + (++) Defines the memory area within the FMAC internal memory + (input, coefficients, output) and the associated threshold (input, output). + (++) Configures the filter and its parameters: + (+++) Finite Impulse Response (FIR) filter (also known as convolution). + (+++) Infinite Impulse Response (IIR) filter (direct form 1). + (++) Choose the way to access to the input and output buffers: none, polling, + DMA, IT. "none" means the input and/or output data will be handled by + another IP (ADC, DAC, etc.). + (++) Enable the error interruptions in the input access and/or the output + access is done through IT/DMA. If an error occurs, the interruption + will be triggered in loop. In order to recover, the user will have + to reset the IP with the sequence HAL_FMAC_DeInit / HAL_FMAC_Init. + Optionally, he can also disable the interrupt using __HAL_FMAC_DISABLE_IT; + the error status will be kept, but no more interrupt will be triggered. + (++) Write the provided coefficients into the internal memory using polling + mode (HAL_FMAC_FilterConfig()) or DMA (HAL_FMAC_FilterConfig_DMA()). + In the DMA case, HAL_FMAC_FilterConfigCallback() is called when + the handling is over. + + (#) Optionally, the user can enable the error interruption related to + saturation by calling __HAL_FMAC_ENABLE_IT. This helps in debugging the + filter. If a saturation occurs, the interruption will be triggered in loop. + In order to recover, the user will have to: + (++) Disable the interruption by calling __HAL_FMAC_DISABLE_IT if + he wishes to continue all the same. + (++) Reset the IP with the sequence HAL_FMAC_DeInit / HAL_FMAC_Init. + + (#) Optionally, preload input (FIR, IIR) and output (IIR) data using + HAL_FMAC_FilterPreload() or HAL_FMAC_FilterPreload_DMA(). + In the DMA case, HAL_FMAC_FilterPreloadCallback() is called when + the handling is over. + This step is optional as the filter can be started without preloaded + data. + + (#) Start the FMAC processing (filter) using HAL_FMAC_FilterStart(). + This function also configures the output buffer that will be filled from + the circular internal output buffer. The function returns immediately + without updating the provided buffer. The IP processing will be active until + HAL_FMAC_FilterStop() is called. + + (#) If the input internal buffer is accessed via DMA, HAL_FMAC_HalfGetDataCallback() + will be called to indicate that half of the input buffer has been handled. + + (#) If the input internal buffer is accessed via DMA or interrupt, HAL_FMAC_GetDataCallback() + will be called to require new input data. It will be provided through + HAL_FMAC_AppendFilterData() if the DMA isn't in circular mode. + + (#) If the output internal buffer is accessed via DMA, HAL_FMAC_HalfOutputDataReadyCallback() + will be called to indicate that half of the output buffer has been handled. + + (#) If the output internal buffer is accessed via DMA or interrupt, + HAL_FMAC_OutputDataReadyCallback() will be called to require a new output + buffer. It will be provided through HAL_FMAC_ConfigFilterOutputBuffer() + if the DMA isn't in circular mode. + + (#) In all modes except none, provide new input data to be processed via HAL_FMAC_AppendFilterData(). + This function should only be called once the previous input data has been handled + (the preloaded input data isn't concerned). + + (#) In all modes except none, provide a new output buffer to be filled via + HAL_FMAC_ConfigFilterOutputBuffer(). This function should only be called once the previous + user's output buffer has been filled. + + (#) In polling mode, handle the input and output data using HAL_FMAC_PollFilterData(). + This function: + (++) Write the user's input data (provided via HAL_FMAC_AppendFilterData()) + into the FMAC input memory area. + (++) Read the FMAC output memory area and write it into the user's output buffer. + It will return either when: + (++) the user's output buffer is filled. + (++) the user's input buffer has been handled. + The unused data (unread input data or free output data) will not be saved. + The user will have to use the updated input and output sizes to keep track + of them. + + (#) Stop the FMAC processing (filter) using HAL_FMAC_FilterStop(). + + (#) Call HAL_FMAC_DeInit() to de-initialize the FMAC peripheral. This function + resorts to HAL_FMAC_MspDeInit() for low-level de-initialization. + + ##### Callback registration ##### + ================================== + + [..] + The compilation define USE_HAL_FMAC_REGISTER_CALLBACKS when set to 1 + allows the user to configure dynamically the driver callbacks. + + [..] + Use Function @ref HAL_FMAC_RegisterCallback() to register a user callback. + Function @ref HAL_FMAC_RegisterCallback() allows to register following callbacks: + (+) ErrorCallback : Error Callback. + (+) HalfGetDataCallback : Get Half Data Callback. + (+) GetDataCallback : Get Data Callback. + (+) HalfOutputDataReadyCallback : Half Output Data Ready Callback. + (+) OutputDataReadyCallback : Output Data Ready Callback. + (+) FilterConfigCallback : Filter Configuration Callback. + (+) FilterPreloadCallback : Filter Preload Callback. + (+) MspInitCallback : FMAC MspInit. + (+) MspDeInitCallback : FMAC MspDeInit. + This function takes as parameters the HAL peripheral handle, the Callback ID + and a pointer to the user callback function. + + [..] + Use function @ref HAL_FMAC_UnRegisterCallback() to reset a callback to the default + weak (surcharged) function. + @ref HAL_FMAC_UnRegisterCallback() takes as parameters the HAL peripheral handle + and the Callback ID. + This function allows to reset following callbacks: + (+) ErrorCallback : Error Callback. + (+) HalfGetDataCallback : Get Half Data Callback. + (+) GetDataCallback : Get Data Callback. + (+) HalfOutputDataReadyCallback : Half Output Data Ready Callback. + (+) OutputDataReadyCallback : Output Data Ready Callback. + (+) FilterConfigCallback : Filter Configuration Callback. + (+) FilterPreloadCallback : Filter Preload Callback. + (+) MspInitCallback : FMAC MspInit. + (+) MspDeInitCallback : FMAC MspDeInit. + + [..] + By default, after the @ref HAL_FMAC_Init() and when the state is HAL_FMAC_STATE_RESET + all callbacks are set to the corresponding weak (surcharged) functions: + examples @ref HAL_FMAC_TxCpltCallback(), @ref HAL_FMAC_RxHalfCpltCallback(). + Exception done for MspInit and MspDeInit functions that are respectively + reset to the legacy weak (surcharged) functions in the @ref HAL_FMAC_Init() + and @ref HAL_FMAC_DeInit() only when these callbacks are null (not registered beforehand). + If not, MspInit or MspDeInit are not null, the @ref HAL_FMAC_Init() and @ref HAL_FMAC_DeInit() + keep and use the user MspInit/MspDeInit callbacks (registered beforehand). + + [..] + Callbacks can be registered/unregistered in HAL_FMAC_STATE_READY state only. + Exception done MspInit/MspDeInit that can be registered/unregistered + in HAL_FMAC_STATE_READY or HAL_FMAC_STATE_RESET state, thus registered (user) + MspInit/DeInit callbacks can be used during the Init/DeInit. + In that case first register the MspInit/MspDeInit user callbacks + using @ref HAL_FMAC_RegisterCallback() before calling @ref HAL_FMAC_DeInit() + or @ref HAL_FMAC_Init() function. + + [..] + When the compilation define USE_HAL_FMAC_REGISTER_CALLBACKS is set to 0 or + not defined, the callback registration feature is not available + and weak (surcharged) callbacks are used. + + + @endverbatim + * + ****************************************************************************** + * @attention + * + *

                  © Copyright (c) 2017 STMicroelectronics. + * All rights reserved.

                  + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32h7xx_hal.h" + +#if defined(FMAC) +#ifdef HAL_FMAC_MODULE_ENABLED + +/** @addtogroup STM32H7xx_HAL_Driver + * @{ + */ + +/** @defgroup FMAC FMAC + * @brief FMAC HAL driver modules + * @{ + */ + +/* External variables --------------------------------------------------------*/ +/* Private typedef -----------------------------------------------------------*/ +/* Private defines -----------------------------------------------------------*/ +/** @defgroup FMAC_Private_Constants FMAC Private Constants + * @{ + */ + +#define MAX_FILTER_DATA_SIZE_TO_HANDLE ((uint16_t) 0xFFU) +#define PRELOAD_ACCESS_DMA 0x00U +#define PRELOAD_ACCESS_POLLING 0x01U +#define POLLING_DISABLED 0U +#define POLLING_ENABLED 1U +#define POLLING_NOT_STOPPED 0U +#define POLLING_STOPPED 1U + +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ +/** @defgroup FMAC_Private_Macros FMAC Private Macros + * @{ + */ + +/** + * @brief Get the X1 memory area size. + * @param __HANDLE__ FMAC handle. + * @retval X1_BUF_SIZE + */ +#define FMAC_GET_X1_SIZE(__HANDLE__) \ + ((((__HANDLE__)->Instance->X1BUFCFG) & (FMAC_X1BUFCFG_X1_BUF_SIZE)) >> (FMAC_X1BUFCFG_X1_BUF_SIZE_Pos)) + +/** + * @brief Get the X1 watermark. + * @param __HANDLE__ FMAC handle. + * @retval FULL_WM + */ +#define FMAC_GET_X1_FULL_WM(__HANDLE__) \ + (((__HANDLE__)->Instance->X1BUFCFG) & (FMAC_X1BUFCFG_FULL_WM)) + +/** + * @brief Get the X2 memory area size. + * @param __HANDLE__ FMAC handle. + * @retval X2_BUF_SIZE + */ +#define FMAC_GET_X2_SIZE(__HANDLE__) \ + ((((__HANDLE__)->Instance->X2BUFCFG) & (FMAC_X2BUFCFG_X2_BUF_SIZE)) >> (FMAC_X2BUFCFG_X2_BUF_SIZE_Pos)) + +/** + * @brief Get the Y memory area size. + * @param __HANDLE__ FMAC handle. + * @retval Y_BUF_SIZE + */ +#define FMAC_GET_Y_SIZE(__HANDLE__) \ + ((((__HANDLE__)->Instance->YBUFCFG) & (FMAC_YBUFCFG_Y_BUF_SIZE)) >> (FMAC_YBUFCFG_Y_BUF_SIZE_Pos)) + +/** + * @brief Get the Y watermark. + * @param __HANDLE__ FMAC handle. + * @retval EMPTY_WM + */ +#define FMAC_GET_Y_EMPTY_WM(__HANDLE__) \ + (((__HANDLE__)->Instance->YBUFCFG) & (FMAC_YBUFCFG_EMPTY_WM)) + +/** + * @brief Get the start bit state. + * @param __HANDLE__ FMAC handle. + * @retval START + */ +#define FMAC_GET_START_BIT(__HANDLE__) \ + ((((__HANDLE__)->Instance->PARAM) & (FMAC_PARAM_START)) >> (FMAC_PARAM_START_Pos)) + +/** + * @brief Get the threshold matching the watermak. + * @param __WM__ Watermark value. + * @retval THRESHOLD + */ +#define FMAC_GET_THRESHOLD_FROM_WM(__WM__) ((__WM__ == FMAC_THRESHOLD_1)? 1U: \ + (__WM__ == FMAC_THRESHOLD_2)? 2U: \ + (__WM__ == FMAC_THRESHOLD_4)? 4U:8U) + +/** + * @brief Check whether the threshold is applicable. + * @param __SIZE__ Size of the matching buffer. + * @param __WM__ Watermark value. + * @param __ACCESS__ Access to the buffer (polling, it, dma, none). + * @retval THRESHOLD + */ +#define IS_FMAC_THRESHOLD_APPLICABLE(__SIZE__, __WM__, __ACCESS__) (( (__SIZE__) >= (((__WM__) == FMAC_THRESHOLD_1)? 1U: \ + ((__WM__) == FMAC_THRESHOLD_2)? 2U: \ + ((__WM__) == FMAC_THRESHOLD_4)? 4U:8U))&& \ + ((((__ACCESS__) == FMAC_BUFFER_ACCESS_DMA)&&((__WM__) == FMAC_THRESHOLD_1))|| \ + ((__ACCESS__ )!= FMAC_BUFFER_ACCESS_DMA))) + +/** + * @} + */ + +/* Private variables ---------------------------------------------------------*/ + +/* Private function prototypes -----------------------------------------------*/ + +static HAL_StatusTypeDef FMAC_Reset(FMAC_HandleTypeDef *hfmac); +static void FMAC_ResetDataPointers(FMAC_HandleTypeDef *hfmac); +static void FMAC_ResetOutputStateAndDataPointers(FMAC_HandleTypeDef *hfmac); +static void FMAC_ResetInputStateAndDataPointers(FMAC_HandleTypeDef *hfmac); +static HAL_StatusTypeDef FMAC_FilterConfig(FMAC_HandleTypeDef *hfmac, FMAC_FilterConfigTypeDef *sConfig, + uint8_t PreloadAccess); +static HAL_StatusTypeDef FMAC_FilterPreload(FMAC_HandleTypeDef *hfmac, int16_t *pInput, uint8_t InputSize, + int16_t *pOutput, uint8_t OutputSize, uint8_t PreloadAccess); +static void FMAC_WritePreloadDataIncrementPtr(FMAC_HandleTypeDef *hfmac, int16_t **ppData, uint8_t Size); +static HAL_StatusTypeDef FMAC_WaitOnStartUntilTimeout(FMAC_HandleTypeDef *hfmac, uint32_t Tickstart, uint32_t Timeout); +static HAL_StatusTypeDef FMAC_AppendFilterDataUpdateState(FMAC_HandleTypeDef *hfmac, int16_t *pInput, + uint16_t *pInputSize); +static HAL_StatusTypeDef FMAC_ConfigFilterOutputBufferUpdateState(FMAC_HandleTypeDef *hfmac, int16_t *pOutput, + uint16_t *pOutputSize); +static void FMAC_WriteDataIncrementPtr(FMAC_HandleTypeDef *hfmac, uint16_t MaxSizeToWrite); +static void FMAC_ReadDataIncrementPtr(FMAC_HandleTypeDef *hfmac, uint16_t MaxSizeToRead); +static void FMAC_DMAHalfGetData(DMA_HandleTypeDef *hdma); +static void FMAC_DMAGetData(DMA_HandleTypeDef *hdma); +static void FMAC_DMAHalfOutputDataReady(DMA_HandleTypeDef *hdma); +static void FMAC_DMAOutputDataReady(DMA_HandleTypeDef *hdma); +static void FMAC_DMAFilterConfig(DMA_HandleTypeDef *hdma); +static void FMAC_DMAFilterPreload(DMA_HandleTypeDef *hdma); +static void FMAC_DMAError(DMA_HandleTypeDef *hdma); + +/* Private functions ---------------------------------------------------------*/ + +/** @defgroup FMAC_Exported_Functions FMAC Exported Functions + * @{ + */ + +/** @defgroup FMAC_Exported_Functions_Group1 Initialization and de-initialization functions + * @brief Initialization and Configuration functions + * +@verbatim + =============================================================================== + ##### Initialization and de-initialization functions ##### + =============================================================================== + [..] This section provides functions allowing to: + (+) Initialize the FMAC peripheral and the associated handle + (+) DeInitialize the FMAC peripheral + (+) Initialize the FMAC MSP (MCU Specific Package) + (+) De-Initialize the FMAC MSP + + [..] + +@endverbatim + * @{ + */ + +/** + * @brief Initialize the FMAC peripheral and the associated handle. + * @param hfmac pointer to a FMAC_HandleTypeDef structure. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_FMAC_Init(FMAC_HandleTypeDef *hfmac) +{ + /* Check the FMAC handle allocation */ + if (hfmac == NULL) + { + return HAL_ERROR; + } + + /* Check the instance */ + assert_param(IS_FMAC_ALL_INSTANCE(hfmac->Instance)); + + if (hfmac->State == HAL_FMAC_STATE_RESET) + { + /* Allocate lock resource and initialize it */ + hfmac->Lock = HAL_UNLOCKED; + +#if (USE_HAL_FMAC_REGISTER_CALLBACKS == 1) + /* Register the default callback functions */ + hfmac->ErrorCallback = HAL_FMAC_ErrorCallback; + hfmac->HalfGetDataCallback = HAL_FMAC_HalfGetDataCallback; + hfmac->GetDataCallback = HAL_FMAC_GetDataCallback; + hfmac->HalfOutputDataReadyCallback = HAL_FMAC_HalfOutputDataReadyCallback; + hfmac->OutputDataReadyCallback = HAL_FMAC_OutputDataReadyCallback; + hfmac->FilterConfigCallback = HAL_FMAC_FilterConfigCallback; + hfmac->FilterPreloadCallback = HAL_FMAC_FilterPreloadCallback; + + if (hfmac->MspInitCallback == NULL) + { + hfmac->MspInitCallback = HAL_FMAC_MspInit; + } + + /* Init the low level hardware */ + hfmac->MspInitCallback(hfmac); +#else + /* Init the low level hardware */ + HAL_FMAC_MspInit(hfmac); +#endif /* USE_HAL_FMAC_REGISTER_CALLBACKS */ + } + + /* Reset pInput and pOutput */ + hfmac->FilterParam = 0UL; + FMAC_ResetDataPointers(hfmac); + + /* Reset FMAC unit (internal pointers) */ + if (FMAC_Reset(hfmac) == HAL_TIMEOUT) + { + /* Update FMAC error code and FMAC peripheral state */ + hfmac->ErrorCode = HAL_FMAC_ERROR_RESET; + hfmac->State = HAL_FMAC_STATE_TIMEOUT; + + /* Process Unlocked */ + __HAL_UNLOCK(hfmac); + + return HAL_TIMEOUT; + } + + /* Update FMAC error code and FMAC peripheral state */ + hfmac->ErrorCode = HAL_FMAC_ERROR_NONE; + hfmac->State = HAL_FMAC_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hfmac); + + return HAL_OK; +} + +/** + * @brief De-initialize the FMAC peripheral. + * @param hfmac pointer to a FMAC structure. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_FMAC_DeInit(FMAC_HandleTypeDef *hfmac) +{ + /* Check the FMAC handle allocation */ + if (hfmac == NULL) + { + return HAL_ERROR; + } + + /* Check the parameters */ + assert_param(IS_FMAC_ALL_INSTANCE(hfmac->Instance)); + + /* Change FMAC peripheral state */ + hfmac->State = HAL_FMAC_STATE_BUSY; + + /* Set FMAC error code to none */ + hfmac->ErrorCode = HAL_FMAC_ERROR_NONE; + + /* Reset pInput and pOutput */ + hfmac->FilterParam = 0UL; + FMAC_ResetDataPointers(hfmac); + +#if (USE_HAL_FMAC_REGISTER_CALLBACKS == 1) + if (hfmac->MspDeInitCallback == NULL) + { + hfmac->MspDeInitCallback = HAL_FMAC_MspDeInit; + } + /* DeInit the low level hardware */ + hfmac->MspDeInitCallback(hfmac); +#else + /* DeInit the low level hardware: CLOCK, NVIC, DMA */ + HAL_FMAC_MspDeInit(hfmac); +#endif /* USE_HAL_FMAC_REGISTER_CALLBACKS */ + + /* Change FMAC peripheral state */ + hfmac->State = HAL_FMAC_STATE_RESET; + + /* Release Lock */ + __HAL_UNLOCK(hfmac); + + /* Return function status */ + return HAL_OK; +} + +/** + * @brief Initialize the FMAC MSP. + * @param hfmac FMAC handle. + * @retval None + */ +__weak void HAL_FMAC_MspInit(FMAC_HandleTypeDef *hfmac) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hfmac); + + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_FMAC_MspInit can be implemented in the user file + */ +} + +/** + * @brief De-initialize the FMAC MSP. + * @param hfmac FMAC handle. + * @retval None + */ +__weak void HAL_FMAC_MspDeInit(FMAC_HandleTypeDef *hfmac) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hfmac); + + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_FMAC_MspDeInit can be implemented in the user file + */ +} + +#if (USE_HAL_FMAC_REGISTER_CALLBACKS == 1) +/** + * @brief Register a User FMAC Callback + * to be used instead of the weak predefined callback. + * @param hfmac pointer to a FMAC_HandleTypeDef structure that contains + * the configuration information for FMAC module. + * @param CallbackID ID of the callback to be registered. + * This parameter can be one of the following values: + * @arg @ref HAL_FMAC_ERROR_CB_ID Error Callback ID + * @arg @ref HAL_FMAC_HALF_GET_DATA_CB_ID Get Half Data Callback ID + * @arg @ref HAL_FMAC_GET_DATA_CB_ID Get Data Callback ID + * @arg @ref HAL_FMAC_HALF_OUTPUT_DATA_READY_CB_ID Half Output Data Ready Callback ID + * @arg @ref HAL_FMAC_OUTPUT_DATA_READY_CB_ID Output Data Ready Callback ID + * @arg @ref HAL_FMAC_FILTER_CONFIG_CB_ID Filter Configuration Callback ID + * @arg @ref HAL_FMAC_FILTER_PRELOAD_CB_ID Filter Preload Callback ID + * @arg @ref HAL_FMAC_MSPINIT_CB_ID FMAC MspInit ID + * @arg @ref HAL_FMAC_MSPDEINIT_CB_ID FMAC MspDeInit ID + * @param pCallback pointer to the Callback function. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_FMAC_RegisterCallback(FMAC_HandleTypeDef *hfmac, HAL_FMAC_CallbackIDTypeDef CallbackID, + pFMAC_CallbackTypeDef pCallback) +{ + HAL_StatusTypeDef status = HAL_OK; + + if (pCallback == NULL) + { + /* Update the error code */ + hfmac->ErrorCode |= HAL_FMAC_ERROR_INVALID_CALLBACK; + + return HAL_ERROR; + } + /* Process locked */ + __HAL_LOCK(hfmac); + + if (HAL_FMAC_STATE_READY == hfmac->State) + { + switch (CallbackID) + { + case HAL_FMAC_ERROR_CB_ID : + hfmac->ErrorCallback = pCallback; + break; + + case HAL_FMAC_HALF_GET_DATA_CB_ID : + hfmac->HalfGetDataCallback = pCallback; + break; + + case HAL_FMAC_GET_DATA_CB_ID : + hfmac->GetDataCallback = pCallback; + break; + + case HAL_FMAC_HALF_OUTPUT_DATA_READY_CB_ID : + hfmac->HalfOutputDataReadyCallback = pCallback; + break; + + case HAL_FMAC_OUTPUT_DATA_READY_CB_ID : + hfmac->OutputDataReadyCallback = pCallback; + break; + + case HAL_FMAC_FILTER_CONFIG_CB_ID : + hfmac->FilterConfigCallback = pCallback; + break; + + case HAL_FMAC_FILTER_PRELOAD_CB_ID : + hfmac->FilterPreloadCallback = pCallback; + break; + + case HAL_FMAC_MSPINIT_CB_ID : + hfmac->MspInitCallback = pCallback; + break; + + case HAL_FMAC_MSPDEINIT_CB_ID : + hfmac->MspDeInitCallback = pCallback; + break; + + default : + /* Update the error code */ + hfmac->ErrorCode |= HAL_FMAC_ERROR_INVALID_CALLBACK; + + /* Return error status */ + status = HAL_ERROR; + break; + } + } + else if (HAL_FMAC_STATE_RESET == hfmac->State) + { + switch (CallbackID) + { + case HAL_FMAC_MSPINIT_CB_ID : + hfmac->MspInitCallback = pCallback; + break; + + case HAL_FMAC_MSPDEINIT_CB_ID : + hfmac->MspDeInitCallback = pCallback; + break; + + default : + /* Update the error code */ + hfmac->ErrorCode |= HAL_FMAC_ERROR_INVALID_CALLBACK; + + /* Return error status */ + status = HAL_ERROR; + break; + } + } + else + { + /* Update the error code */ + hfmac->ErrorCode |= HAL_FMAC_ERROR_INVALID_CALLBACK; + + /* Return error status */ + status = HAL_ERROR; + } + + /* Release Lock */ + __HAL_UNLOCK(hfmac); + + return status; +} + +/** + * @brief Unregister a FMAC CallBack. + * FMAC callback is redirected to the weak predefined callback. + * @param hfmac pointer to a FMAC_HandleTypeDef structure that contains + * the configuration information for FMAC module + * @param CallbackID ID of the callback to be unregistered. + * This parameter can be one of the following values: + * @arg @ref HAL_FMAC_ERROR_CB_ID Error Callback ID + * @arg @ref HAL_FMAC_HALF_GET_DATA_CB_ID Get Half Data Callback ID + * @arg @ref HAL_FMAC_GET_DATA_CB_ID Get Data Callback ID + * @arg @ref HAL_FMAC_HALF_OUTPUT_DATA_READY_CB_ID Half Output Data Ready Callback ID + * @arg @ref HAL_FMAC_OUTPUT_DATA_READY_CB_ID Output Data Ready Callback ID + * @arg @ref HAL_FMAC_FILTER_CONFIG_CB_ID Filter Configuration Callback ID + * @arg @ref HAL_FMAC_FILTER_PRELOAD_CB_ID Filter Preload Callback ID + * @arg @ref HAL_FMAC_MSPINIT_CB_ID FMAC MspInit ID + * @arg @ref HAL_FMAC_MSPDEINIT_CB_ID FMAC MspDeInit ID + * @retval HAL status + */ +HAL_StatusTypeDef HAL_FMAC_UnRegisterCallback(FMAC_HandleTypeDef *hfmac, HAL_FMAC_CallbackIDTypeDef CallbackID) +{ + HAL_StatusTypeDef status = HAL_OK; + + /* Process locked */ + __HAL_LOCK(hfmac); + + if (HAL_FMAC_STATE_READY == hfmac->State) + { + switch (CallbackID) + { + case HAL_FMAC_ERROR_CB_ID : + hfmac->ErrorCallback = HAL_FMAC_ErrorCallback; /* Legacy weak ErrorCallback */ + break; + + case HAL_FMAC_HALF_GET_DATA_CB_ID : + hfmac->HalfGetDataCallback = HAL_FMAC_HalfGetDataCallback; /* Legacy weak HalfGetDataCallback */ + break; + + case HAL_FMAC_GET_DATA_CB_ID : + hfmac->GetDataCallback = HAL_FMAC_GetDataCallback; /* Legacy weak GetDataCallback */ + break; + + case HAL_FMAC_HALF_OUTPUT_DATA_READY_CB_ID : + hfmac->HalfOutputDataReadyCallback = HAL_FMAC_HalfOutputDataReadyCallback; /* Legacy weak HalfOutputDataReadyCallback */ + break; + + case HAL_FMAC_OUTPUT_DATA_READY_CB_ID : + hfmac->OutputDataReadyCallback = HAL_FMAC_OutputDataReadyCallback; /* Legacy weak OutputDataReadyCallback */ + break; + + case HAL_FMAC_FILTER_CONFIG_CB_ID : + hfmac->FilterConfigCallback = HAL_FMAC_FilterConfigCallback; /* Legacy weak FilterConfigCallback */ + break; + + case HAL_FMAC_FILTER_PRELOAD_CB_ID : + hfmac->FilterPreloadCallback = HAL_FMAC_FilterPreloadCallback; /* Legacy weak FilterPreloadCallback */ + break; + + case HAL_FMAC_MSPINIT_CB_ID : + hfmac->MspInitCallback = HAL_FMAC_MspInit; /* Legacy weak MspInitCallback */ + break; + + case HAL_FMAC_MSPDEINIT_CB_ID : + hfmac->MspDeInitCallback = HAL_FMAC_MspDeInit; /* Legacy weak MspDeInitCallback */ + break; + + default : + /* Update the error code */ + hfmac->ErrorCode |= HAL_FMAC_ERROR_INVALID_CALLBACK; + + /* Return error status */ + status = HAL_ERROR; + break; + } + } + else if (HAL_FMAC_STATE_RESET == hfmac->State) + { + switch (CallbackID) + { + case HAL_FMAC_MSPINIT_CB_ID : + hfmac->MspInitCallback = HAL_FMAC_MspInit; + break; + + case HAL_FMAC_MSPDEINIT_CB_ID : + hfmac->MspDeInitCallback = HAL_FMAC_MspDeInit; + break; + + default : + /* Update the error code */ + hfmac->ErrorCode |= HAL_FMAC_ERROR_INVALID_CALLBACK; + + /* Return error status */ + status = HAL_ERROR; + break; + } + } + else + { + /* Update the error code */ + hfmac->ErrorCode |= HAL_FMAC_ERROR_INVALID_CALLBACK; + + /* Return error status */ + status = HAL_ERROR; + } + + /* Release Lock */ + __HAL_UNLOCK(hfmac); + + return status; +} +#endif /* USE_HAL_FMAC_REGISTER_CALLBACKS */ + +/** + * @} + */ + +/** @defgroup FMAC_Exported_Functions_Group2 Peripheral Control functions + * @brief Control functions. + * +@verbatim + ============================================================================== + ##### Peripheral Control functions ##### + ============================================================================== + [..] This section provides functions allowing to: + (+) Configure the FMAC peripheral: memory area, filter type and parameters, + way to access to the input and output memory area (none, polling, IT, DMA). + (+) Start the FMAC processing (filter). + (+) Handle the input data that will be provided into FMAC. + (+) Handle the output data provided by FMAC. + (+) Stop the FMAC processing (filter). + +@endverbatim + * @{ + */ + +/** + * @brief Configure the FMAC filter according to the parameters + * specified in the FMAC_FilterConfigTypeDef structure. + * The provided data will be loaded using polling mode. + * @param hfmac pointer to a FMAC_HandleTypeDef structure that contains + * the configuration information for FMAC module. + * @param sConfig pointer to a FMAC_FilterConfigTypeDef structure that + * contains the FMAC configuration information. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_FMAC_FilterConfig(FMAC_HandleTypeDef *hfmac, FMAC_FilterConfigTypeDef *sConfig) +{ + return (FMAC_FilterConfig(hfmac, sConfig, PRELOAD_ACCESS_POLLING)); +} + +/** + * @brief Configure the FMAC filter according to the parameters + * specified in the FMAC_FilterConfigTypeDef structure. + * The provided data will be loaded using DMA. + * @param hfmac pointer to a FMAC_HandleTypeDef structure that contains + * the configuration information for FMAC module. + * @param sConfig pointer to a FMAC_FilterConfigTypeDef structure that + * contains the FMAC configuration information. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_FMAC_FilterConfig_DMA(FMAC_HandleTypeDef *hfmac, FMAC_FilterConfigTypeDef *sConfig) +{ + return (FMAC_FilterConfig(hfmac, sConfig, PRELOAD_ACCESS_DMA)); +} + +/** + * @brief Preload the input (FIR, IIR) and output data (IIR) of the FMAC filter. + * They will be used by FMAC as soon as HAL_FMAC_FilterStart is called. + * The provided data will be loaded using polling mode. + * @param hfmac pointer to a FMAC_HandleTypeDef structure that contains + * the configuration information for FMAC module. + * @param pInput Preloading of the first elements of the input buffer (X1). + * If not needed (no data available when starting), it should be set to NULL. + * @param InputSize Size of the input vector. + * As pInput is used for preloading data, it cannot be bigger than the input memory area. + * @param pOutput [IIR] Preloading of the first elements of the output vector (Y). + * If not needed, it should be set to NULL. + * @param OutputSize Size of the output vector. + * As pOutput is used for preloading data, it cannot be bigger than the output memory area. + * @note The input and the output buffers can be filled by calling several times HAL_FMAC_FilterPreload + * (each call filling partly the buffers). In case of overflow (too much data provided through + * all these calls), an error will be returned. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_FMAC_FilterPreload(FMAC_HandleTypeDef *hfmac, int16_t *pInput, uint8_t InputSize, + int16_t *pOutput, uint8_t OutputSize) +{ + return (FMAC_FilterPreload(hfmac, pInput, InputSize, pOutput, OutputSize, PRELOAD_ACCESS_POLLING)); +} + +/** + * @brief Preload the input (FIR, IIR) and output data (IIR) of the FMAC filter. + * They will be used by FMAC as soon as HAL_FMAC_FilterStart is called. + * The provided data will be loaded using DMA. + * @param hfmac pointer to a FMAC_HandleTypeDef structure that contains + * the configuration information for FMAC module. + * @param pInput Preloading of the first elements of the input buffer (X1). + * If not needed (no data available when starting), it should be set to NULL. + * @param InputSize Size of the input vector. + * As pInput is used for preloading data, it cannot be bigger than the input memory area. + * @param pOutput [IIR] Preloading of the first elements of the output vector (Y). + * If not needed, it should be set to NULL. + * @param OutputSize Size of the output vector. + * As pOutput is used for preloading data, it cannot be bigger than the output memory area. + * @note The input and the output buffers can be filled by calling several times HAL_FMAC_FilterPreload + * (each call filling partly the buffers). In case of overflow (too much data provided through + * all these calls), an error will be returned. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_FMAC_FilterPreload_DMA(FMAC_HandleTypeDef *hfmac, int16_t *pInput, uint8_t InputSize, + int16_t *pOutput, uint8_t OutputSize) +{ + return (FMAC_FilterPreload(hfmac, pInput, InputSize, pOutput, OutputSize, PRELOAD_ACCESS_DMA)); +} + + +/** + * @brief Start the FMAC processing according to the existing FMAC configuration. + * @param hfmac pointer to a FMAC_HandleTypeDef structure that contains + * the configuration information for FMAC module. + * @param pOutput pointer to buffer where output data of FMAC processing will be stored + * in the next steps. + * If it is set to NULL, the output will not be read and it will be up to + * an external IP to empty the output buffer. + * @param pOutputSize pointer to the size of the output buffer. The number of read data will be written here. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_FMAC_FilterStart(FMAC_HandleTypeDef *hfmac, int16_t *pOutput, uint16_t *pOutputSize) +{ + uint32_t tmpcr = 0UL; + HAL_StatusTypeDef status; + + /* Check the START bit state */ + if (FMAC_GET_START_BIT(hfmac) != 0UL) + { + return HAL_ERROR; + } + + /* Check that a valid configuration was done previously */ + if (hfmac->FilterParam == 0UL) + { + return HAL_ERROR; + } + + /* Check handle state is ready */ + if (hfmac->State == HAL_FMAC_STATE_READY) + { + /* Change the FMAC state */ + hfmac->State = HAL_FMAC_STATE_BUSY; + + /* CR: Configure the input access (error interruptions enabled only for IT or DMA) */ + if (hfmac->InputAccess == FMAC_BUFFER_ACCESS_DMA) + { + tmpcr |= FMAC_DMA_WEN; + } + else if (hfmac->InputAccess == FMAC_BUFFER_ACCESS_IT) + { + tmpcr |= FMAC_IT_WIEN; + } + else + { + /* nothing to do */ + } + + /* CR: Configure the output access (error interruptions enabled only for IT or DMA) */ + if (hfmac->OutputAccess == FMAC_BUFFER_ACCESS_DMA) + { + tmpcr |= FMAC_DMA_REN; + } + else if (hfmac->OutputAccess == FMAC_BUFFER_ACCESS_IT) + { + tmpcr |= FMAC_IT_RIEN; + } + else + { + /* nothing to do */ + } + + /* CR: Write the configuration */ + MODIFY_REG(hfmac->Instance->CR, \ + FMAC_IT_RIEN | FMAC_IT_WIEN | FMAC_DMA_REN | FMAC_CR_DMAWEN, \ + tmpcr); + + /* Register the new output buffer */ + status = FMAC_ConfigFilterOutputBufferUpdateState(hfmac, pOutput, pOutputSize); + + if (status == HAL_OK) + { + /* PARAM: Start the filter ( this can generate interrupts before the end of the HAL_FMAC_FilterStart ) */ + WRITE_REG(hfmac->Instance->PARAM, (uint32_t)(hfmac->FilterParam)); + } + + /* Reset the busy flag (do not overwrite the possible write and read flag) */ + hfmac->State = HAL_FMAC_STATE_READY; + + /* Return function status */ + return status; + } + else + { + /* Return function status */ + return HAL_BUSY; + } +} + +/** + * @brief Provide a new input buffer that will be loaded into the FMAC + * input memory area. + * @param hfmac pointer to a FMAC_HandleTypeDef structure that contains + * the configuration information for FMAC module. + * @param pInput New input vector (additional input data). + * @param pInputSize Size of the input vector (if all the data can't be + * written, it will be updated with the number of data read from FMAC). + * @retval HAL status + */ +HAL_StatusTypeDef HAL_FMAC_AppendFilterData(FMAC_HandleTypeDef *hfmac, int16_t *pInput, uint16_t *pInputSize) +{ + /* Check the START bit state */ + if (FMAC_GET_START_BIT(hfmac) == 0UL) + { + return HAL_ERROR; + } + + /* Check the function parameters */ + if ((pInput == NULL) || (pInputSize == NULL)) + { + return HAL_ERROR; + } + if (*pInputSize == 0U) + { + return HAL_ERROR; + } + + /* Check the FMAC configuration */ + if (hfmac->InputAccess == FMAC_BUFFER_ACCESS_NONE) + { + return HAL_ERROR; + } + + /* Check whether the previous input vector has been handled */ + if ((hfmac->pInputSize != NULL) && (hfmac->InputCurrentSize < * (hfmac->pInputSize))) + { + return HAL_BUSY; + } + + /* Check that FMAC was initialized and that no writing is already ongoing */ + if (hfmac->WrState == HAL_FMAC_STATE_READY) + { + /* Register the new input buffer */ + return (FMAC_AppendFilterDataUpdateState(hfmac, pInput, pInputSize)); + } + else + { + /* Return function status */ + return HAL_BUSY; + } +} + +/** + * @brief Provide a new output buffer to be filled with the data + * computed by FMAC unit. + * @param hfmac pointer to a FMAC_HandleTypeDef structure that contains + * the configuration information for FMAC module. + * @param pOutput New output vector. + * @param pOutputSize Size of the output vector (if the vector can't + * be entirely filled, pOutputSize will be updated with the number + * of data read from FMAC). + * @retval HAL status + */ +HAL_StatusTypeDef HAL_FMAC_ConfigFilterOutputBuffer(FMAC_HandleTypeDef *hfmac, int16_t *pOutput, uint16_t *pOutputSize) +{ + /* Check the START bit state */ + if (FMAC_GET_START_BIT(hfmac) == 0UL) + { + return HAL_ERROR; + } + + /* Check the function parameters */ + if ((pOutput == NULL) || (pOutputSize == NULL)) + { + return HAL_ERROR; + } + if (*pOutputSize == 0U) + { + return HAL_ERROR; + } + + /* Check the FMAC configuration */ + if (hfmac->OutputAccess == FMAC_BUFFER_ACCESS_NONE) + { + return HAL_ERROR; + } + + /* Check whether the previous output vector has been handled */ + if ((hfmac->pOutputSize != NULL) && (hfmac->OutputCurrentSize < * (hfmac->pOutputSize))) + { + return HAL_BUSY; + } + + /* Check that FMAC was initialized and that not reading is already ongoing */ + if (hfmac->RdState == HAL_FMAC_STATE_READY) + { + /* Register the new output buffer */ + return (FMAC_ConfigFilterOutputBufferUpdateState(hfmac, pOutput, pOutputSize)); + } + else + { + /* Return function status */ + return HAL_BUSY; + } +} + +/** + * @brief Write the previously provided user's input data and + * fill the previously provided user's output buffer, + * according to the existing FMAC configuration (polling mode only). + * The function returns when the input data has been handled or + * when the output data is filled. The possible unused data isn't + * kept. It will be up to the user to handle it. The previously + * provided pInputSize and pOutputSize will be used to indicate to the + * size of the read/written data to the user. + * @param hfmac pointer to a FMAC_HandleTypeDef structure that contains + * the configuration information for FMAC module. + * @param Timeout timeout value. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_FMAC_PollFilterData(FMAC_HandleTypeDef *hfmac, uint32_t Timeout) +{ + uint32_t tickstart; + uint8_t inpolling; + uint8_t inpollingover = POLLING_NOT_STOPPED; + uint8_t outpolling; + uint8_t outpollingover = POLLING_NOT_STOPPED; + + /* Check the START bit state */ + if (FMAC_GET_START_BIT(hfmac) == 0UL) + { + return HAL_ERROR; + } + + /* Check the configuration */ + + /* Get the input and output mode (if no buffer was previously provided, nothing will be read/written) */ + if ((hfmac->InputAccess == FMAC_BUFFER_ACCESS_POLLING) && (hfmac->pInput != NULL)) + { + inpolling = POLLING_ENABLED; + } + else + { + inpolling = POLLING_DISABLED; + } + if ((hfmac->OutputAccess == FMAC_BUFFER_ACCESS_POLLING) && (hfmac->pOutput != NULL)) + { + outpolling = POLLING_ENABLED; + } + else + { + outpolling = POLLING_DISABLED; + } + + /* Check the configuration */ + if ((inpolling == POLLING_DISABLED) && (outpolling == POLLING_DISABLED)) + { + return HAL_ERROR; + } + + /* Check handle state is ready */ + if (hfmac->State == HAL_FMAC_STATE_READY) + { + /* Change the FMAC state */ + hfmac->State = HAL_FMAC_STATE_BUSY; + + /* Get tick */ + tickstart = HAL_GetTick(); + + /* Loop on reading and writing until timeout */ + while ((HAL_GetTick() - tickstart) < Timeout) + { + /* X1: Check the mode: polling or none */ + if (inpolling != POLLING_DISABLED) + { + FMAC_WriteDataIncrementPtr(hfmac, MAX_FILTER_DATA_SIZE_TO_HANDLE); + if (hfmac->InputCurrentSize == *(hfmac->pInputSize)) + { + inpollingover = POLLING_STOPPED; + } + } + + /* Y: Check the mode: polling or none */ + if (outpolling != POLLING_DISABLED) + { + FMAC_ReadDataIncrementPtr(hfmac, MAX_FILTER_DATA_SIZE_TO_HANDLE); + if (hfmac->OutputCurrentSize == *(hfmac->pOutputSize)) + { + outpollingover = POLLING_STOPPED; + } + } + + /* Exit if there isn't data to handle anymore on one side or another */ + if ((inpollingover != POLLING_NOT_STOPPED) || (outpollingover != POLLING_NOT_STOPPED)) + { + break; + } + } + + /* Change the FMAC state; update the input and output sizes; reset the indexes */ + if (inpolling != POLLING_DISABLED) + { + (*(hfmac->pInputSize)) = hfmac->InputCurrentSize; + FMAC_ResetInputStateAndDataPointers(hfmac); + } + if (outpolling != POLLING_DISABLED) + { + (*(hfmac->pOutputSize)) = hfmac->OutputCurrentSize; + FMAC_ResetOutputStateAndDataPointers(hfmac); + } + + /* Reset the busy flag (do not overwrite the possible write and read flag) */ + hfmac->State = HAL_FMAC_STATE_READY; + + /* Return function status */ + if ((HAL_GetTick() - tickstart) >= Timeout) + { + return HAL_TIMEOUT; + } + else + { + return HAL_OK; + } + } + else + { + /* Return function status */ + return HAL_BUSY; + } +} + +/** + * @brief Stop the FMAC processing. + * @param hfmac pointer to a FMAC_HandleTypeDef structure that contains + * the configuration information for FMAC module. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_FMAC_FilterStop(FMAC_HandleTypeDef *hfmac) +{ + + /* Check the START bit state */ + if (FMAC_GET_START_BIT(hfmac) == 0UL) + { + return HAL_ERROR; + } + + /* Check handle state is ready */ + if (hfmac->State == HAL_FMAC_STATE_READY) + { + /* Set the START bit to 0 (stop the previously configured filter) */ + CLEAR_BIT(hfmac->Instance->PARAM, FMAC_PARAM_START); + + /* Disable the interrupts in order to avoid crossing cases */ + CLEAR_BIT(hfmac->Instance->CR, FMAC_DMA_REN | FMAC_DMA_WEN | FMAC_IT_RIEN | FMAC_IT_WIEN); + + /* In case of IT, update the sizes */ + if ((hfmac->InputAccess == FMAC_BUFFER_ACCESS_IT) && (hfmac->pInput != NULL)) + { + (*(hfmac->pInputSize)) = hfmac->InputCurrentSize; + } + if ((hfmac->OutputAccess == FMAC_BUFFER_ACCESS_IT) && (hfmac->pOutput != NULL)) + { + (*(hfmac->pOutputSize)) = hfmac->OutputCurrentSize; + } + + /* Reset FMAC unit (internal pointers) */ + if (FMAC_Reset(hfmac) == HAL_TIMEOUT) + { + /* Update FMAC error code and FMAC peripheral state */ + hfmac->ErrorCode = HAL_FMAC_ERROR_RESET; + hfmac->State = HAL_FMAC_STATE_TIMEOUT; + return HAL_TIMEOUT; + } + + /* Reset the data pointers */ + FMAC_ResetDataPointers(hfmac); + + /* Return function status */ + return HAL_OK; + } + else + { + /* Return function status */ + return HAL_BUSY; + } +} + +/** + * @} + */ + +/** @defgroup FMAC_Exported_Functions_Group3 Callback functions + * @brief Callback functions. + * +@verbatim + ============================================================================== + ##### Callback functions ##### + ============================================================================== + [..] This section provides Interruption and DMA callback functions: + (+) DMA or Interrupt: the user's input data is half written (DMA only) + or completely written. + (+) DMA or Interrupt: the user's output buffer is half filled (DMA only) + or completely filled. + (+) DMA or Interrupt: error handling. + +@endverbatim + * @{ + */ + +/** + * @brief FMAC error callback. + * @param hfmac pointer to a FMAC_HandleTypeDef structure that contains + * the configuration information for FMAC module. + * @retval None + */ +__weak void HAL_FMAC_ErrorCallback(FMAC_HandleTypeDef *hfmac) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hfmac); + + /* NOTE : This function should not be modified; when the callback is needed, + the HAL_FMAC_ErrorCallback can be implemented in the user file. + */ +} + +/** + * @brief FMAC get half data callback. + * @param hfmac pointer to a FMAC_HandleTypeDef structure that contains + * the configuration information for FMAC module. + * @retval None + */ +__weak void HAL_FMAC_HalfGetDataCallback(FMAC_HandleTypeDef *hfmac) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hfmac); + + /* NOTE : This function should not be modified; when the callback is needed, + the HAL_FMAC_HalfGetDataCallback can be implemented in the user file. + */ +} + +/** + * @brief FMAC get data callback. + * @param hfmac pointer to a FMAC_HandleTypeDef structure that contains + * the configuration information for FMAC module. + * @retval None + */ +__weak void HAL_FMAC_GetDataCallback(FMAC_HandleTypeDef *hfmac) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hfmac); + + /* NOTE : This function should not be modified; when the callback is needed, + the HAL_FMAC_GetDataCallback can be implemented in the user file. + */ +} + +/** + * @brief FMAC half output data ready callback. + * @param hfmac pointer to a FMAC_HandleTypeDef structure that contains + * the configuration information for FMAC module. + * @retval None + */ +__weak void HAL_FMAC_HalfOutputDataReadyCallback(FMAC_HandleTypeDef *hfmac) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hfmac); + + /* NOTE : This function should not be modified; when the callback is needed, + the HAL_FMAC_HalfOutputDataReadyCallback can be implemented in the user file. + */ +} + +/** + * @brief FMAC output data ready callback. + * @param hfmac pointer to a FMAC_HandleTypeDef structure that contains + * the configuration information for FMAC module. + * @retval None + */ +__weak void HAL_FMAC_OutputDataReadyCallback(FMAC_HandleTypeDef *hfmac) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hfmac); + + /* NOTE : This function should not be modified; when the callback is needed, + the HAL_FMAC_OutputDataReadyCallback can be implemented in the user file. + */ +} + +/** + * @brief FMAC filter configuration callback. + * @param hfmac pointer to a FMAC_HandleTypeDef structure that contains + * the configuration information for FMAC module. + * @retval None + */ +__weak void HAL_FMAC_FilterConfigCallback(FMAC_HandleTypeDef *hfmac) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hfmac); + + /* NOTE : This function should not be modified; when the callback is needed, + the HAL_FMAC_FilterConfigCallback can be implemented in the user file. + */ +} + +/** + * @brief FMAC filter preload callback. + * @param hfmac pointer to a FMAC_HandleTypeDef structure that contains + * the configuration information for FMAC module. + * @retval None + */ +__weak void HAL_FMAC_FilterPreloadCallback(FMAC_HandleTypeDef *hfmac) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hfmac); + + /* NOTE : This function should not be modified; when the callback is needed, + the HAL_FMAC_FilterPreloadCallback can be implemented in the user file. + */ +} + +/** + * @} + */ + +/** @defgroup FMAC_Exported_Functions_Group4 IRQ handler management + * @brief IRQ handler. + * +@verbatim + ============================================================================== + ##### IRQ handler management ##### + ============================================================================== +[..] This section provides IRQ handler function. + +@endverbatim + * @{ + */ + +/** + * @brief Handle FMAC interrupt request. + * @param hfmac pointer to a FMAC_HandleTypeDef structure that contains + * the configuration information for FMAC module. + * @retval None + */ +void HAL_FMAC_IRQHandler(FMAC_HandleTypeDef *hfmac) +{ + uint32_t itsource; + + /* Check if the read interrupt is enabled and if Y buffer empty flag isn't set */ + itsource = __HAL_FMAC_GET_IT_SOURCE(hfmac, FMAC_IT_RIEN); + if ((__HAL_FMAC_GET_FLAG(hfmac, FMAC_FLAG_YEMPTY) == 0U) && (itsource != 0UL)) + { + /* Read some data if possible (Y size is used as a pseudo timeout in order + to not get stuck too long under IT if FMAC keeps on processing input + data reloaded via DMA for instance). */ + if (hfmac->pOutput != NULL) + { + FMAC_ReadDataIncrementPtr(hfmac, (uint16_t)FMAC_GET_Y_SIZE(hfmac)); + } + + /* Indicate that data is ready to be read */ + if ((hfmac->pOutput == NULL) || (hfmac->OutputCurrentSize == *(hfmac->pOutputSize))) + { + /* Reset the pointers to indicate new data will be needed */ + FMAC_ResetOutputStateAndDataPointers(hfmac); + + /* Call the output data ready callback */ +#if (USE_HAL_FMAC_REGISTER_CALLBACKS == 1) + hfmac->OutputDataReadyCallback(hfmac); +#else + HAL_FMAC_OutputDataReadyCallback(hfmac); +#endif /* USE_HAL_FMAC_REGISTER_CALLBACKS */ + } + } + + /* Check if the write interrupt is enabled and if X1 buffer full flag isn't set */ + itsource = __HAL_FMAC_GET_IT_SOURCE(hfmac, FMAC_IT_WIEN); + if ((__HAL_FMAC_GET_FLAG(hfmac, FMAC_FLAG_X1FULL) == 0U) && (itsource != 0UL)) + { + /* Write some data if possible (X1 size is used as a pseudo timeout in order + to not get stuck too long under IT if FMAC keep on processing input + data whereas its output emptied via DMA for instance). */ + if (hfmac->pInput != NULL) + { + FMAC_WriteDataIncrementPtr(hfmac, (uint16_t)FMAC_GET_X1_SIZE(hfmac)); + } + + /* Indicate that new data will be needed */ + if ((hfmac->pInput == NULL) || (hfmac->InputCurrentSize == *(hfmac->pInputSize))) + { + /* Reset the pointers to indicate new data will be needed */ + FMAC_ResetInputStateAndDataPointers(hfmac); + + /* Call the get data callback */ +#if (USE_HAL_FMAC_REGISTER_CALLBACKS == 1) + hfmac->GetDataCallback(hfmac); +#else + HAL_FMAC_GetDataCallback(hfmac); +#endif /* USE_HAL_FMAC_REGISTER_CALLBACKS */ + } + } + + /* Check if the overflow error interrupt is enabled and if overflow error flag is raised */ + itsource = __HAL_FMAC_GET_IT_SOURCE(hfmac, FMAC_IT_OVFLIEN); + if ((__HAL_FMAC_GET_FLAG(hfmac, FMAC_FLAG_OVFL) != 0U) && (itsource != 0UL)) + { + hfmac->ErrorCode |= HAL_FMAC_ERROR_OVFL; + } + + /* Check if the underflow error interrupt is enabled and if underflow error flag is raised */ + itsource = __HAL_FMAC_GET_IT_SOURCE(hfmac, FMAC_IT_UNFLIEN); + if ((__HAL_FMAC_GET_FLAG(hfmac, FMAC_FLAG_UNFL) != 0U) && (itsource != 0UL)) + { + hfmac->ErrorCode |= HAL_FMAC_ERROR_UNFL; + } + + /* Check if the saturation error interrupt is enabled and if saturation error flag is raised */ + itsource = __HAL_FMAC_GET_IT_SOURCE(hfmac, FMAC_IT_SATIEN); + if ((__HAL_FMAC_GET_FLAG(hfmac, FMAC_FLAG_SAT) != 0U) && (itsource != 0UL)) + { + hfmac->ErrorCode |= HAL_FMAC_ERROR_SAT; + } + + /* Call the error callback if an error occurred */ + if (hfmac->ErrorCode != HAL_FMAC_ERROR_NONE) + { + /* Call the error callback */ +#if (USE_HAL_FMAC_REGISTER_CALLBACKS == 1) + hfmac->ErrorCallback(hfmac); +#else + HAL_FMAC_ErrorCallback(hfmac); +#endif /* USE_HAL_FMAC_REGISTER_CALLBACKS */ + } +} + +/** + * @} + */ + +/** @defgroup FMAC_Exported_Functions_Group5 Peripheral State functions + * @brief Peripheral State functions. + * +@verbatim + ============================================================================== + ##### Peripheral State functions ##### + ============================================================================== + [..] + This subsection permits to get in run-time the status of the peripheral. + +@endverbatim + * @{ + */ + +/** + * @brief Return the FMAC handle state. + * @param hfmac pointer to a FMAC_HandleTypeDef structure that contains + * the configuration information for FMAC module. + * @retval HAL state + */ +HAL_FMAC_StateTypeDef HAL_FMAC_GetState(FMAC_HandleTypeDef *hfmac) +{ + /* Return FMAC handle state */ + return hfmac->State; +} + +/** + * @brief Return the FMAC peripheral error. + * @param hfmac pointer to a FMAC_HandleTypeDef structure that contains + * the configuration information for FMAC module. + * @note The returned error is a bit-map combination of possible errors. + * @retval Error bit-map + */ +uint32_t HAL_FMAC_GetError(FMAC_HandleTypeDef *hfmac) +{ + /* Return FMAC error code */ + return hfmac->ErrorCode; +} + +/** + * @} + */ + +/** + * @} + */ + +/** @defgroup FMAC_Private_Functions FMAC Private Functions + * @{ + */ + +/** + ============================================================================== + ##### FMAC Private Functions ##### + ============================================================================== + */ +/** + * @brief Perform a reset of the FMAC unit. + * @param hfmac FMAC handle. + * @retval FMAC status + */ +static HAL_StatusTypeDef FMAC_Reset(FMAC_HandleTypeDef *hfmac) +{ + uint32_t tickstart; + + /* Init tickstart for timeout management*/ + tickstart = HAL_GetTick(); + + /* Perform the reset */ + SET_BIT(hfmac->Instance->CR, FMAC_CR_RESET); + + /* Wait until flag is reset */ + while (READ_BIT(hfmac->Instance->CR, FMAC_CR_RESET) != 0UL) + { + if ((HAL_GetTick() - tickstart) > HAL_FMAC_RESET_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + + hfmac->ErrorCode = HAL_FMAC_ERROR_NONE; + return HAL_OK; +} + +/** + * @brief Reset the data pointers of the FMAC unit. + * @param hfmac FMAC handle. + * @retval FMAC status + */ +static void FMAC_ResetDataPointers(FMAC_HandleTypeDef *hfmac) +{ + FMAC_ResetInputStateAndDataPointers(hfmac); + FMAC_ResetOutputStateAndDataPointers(hfmac); +} + +/** + * @brief Reset the input data pointers of the FMAC unit. + * @param hfmac FMAC handle. + * @retval FMAC status + */ +static void FMAC_ResetInputStateAndDataPointers(FMAC_HandleTypeDef *hfmac) +{ + hfmac->pInput = NULL; + hfmac->pInputSize = NULL; + hfmac->InputCurrentSize = 0U; + hfmac->WrState = HAL_FMAC_STATE_READY; +} + +/** + * @brief Reset the output data pointers of the FMAC unit. + * @param hfmac FMAC handle. + * @retval FMAC status + */ +static void FMAC_ResetOutputStateAndDataPointers(FMAC_HandleTypeDef *hfmac) +{ + hfmac->pOutput = NULL; + hfmac->pOutputSize = NULL; + hfmac->OutputCurrentSize = 0U; + hfmac->RdState = HAL_FMAC_STATE_READY; +} + +/** + * @brief Configure the FMAC filter according to the parameters + specified in the FMAC_FilterConfigTypeDef structure. + * @param hfmac pointer to a FMAC_HandleTypeDef structure that contains + * the configuration information for FMAC module. + * @param sConfig pointer to a FMAC_FilterConfigTypeDef structure that + * contains the FMAC configuration information. + * @param PreloadAccess buffer preload method + * This parameter can be one of the following values: + * @arg @ref PRELOAD_ACCESS_POLLING preloading using CPU + * @arg @ref PRELOAD_ACCESS_DMA Get preloading using DMA + * @retval HAL status + */ +static HAL_StatusTypeDef FMAC_FilterConfig(FMAC_HandleTypeDef *hfmac, FMAC_FilterConfigTypeDef *sConfig, + uint8_t PreloadAccess) +{ + uint32_t tickstart; + uint32_t tmpcr; +#if defined(USE_FULL_ASSERT) + uint32_t x2size; +#endif /* USE_FULL_ASSERT */ + + /* Check the parameters */ + assert_param(IS_FMAC_THRESHOLD(sConfig->InputThreshold)); + assert_param(IS_FMAC_THRESHOLD(sConfig->OutputThreshold)); + assert_param(IS_FMAC_BUFFER_ACCESS(sConfig->InputAccess)); + assert_param(IS_FMAC_BUFFER_ACCESS(sConfig->OutputAccess)); + assert_param(IS_FMAC_CLIP_STATE(sConfig->Clip)); + assert_param(IS_FMAC_FILTER_FUNCTION(sConfig->Filter)); + assert_param(IS_FMAC_PARAM_P(sConfig->Filter, sConfig->P)); + assert_param(IS_FMAC_PARAM_Q(sConfig->Filter, sConfig->Q)); + assert_param(IS_FMAC_PARAM_R(sConfig->Filter, sConfig->R)); + + /* Check the START bit state */ + if (FMAC_GET_START_BIT(hfmac) != 0UL) + { + return HAL_ERROR; + } + + /* Check handle state is ready */ + if (hfmac->State == HAL_FMAC_STATE_READY) + { + /* Change the FMAC state */ + hfmac->State = HAL_FMAC_STATE_BUSY; + + /* Get tick */ + tickstart = HAL_GetTick(); + + /* Indicate that there is no valid configuration done */ + hfmac->FilterParam = 0UL; + + /* FMAC_X1BUFCFG: Configure the input buffer within the internal memory if required */ + if (sConfig->InputBufferSize != 0U) + { + MODIFY_REG(hfmac->Instance->X1BUFCFG, \ + (FMAC_X1BUFCFG_X1_BASE | FMAC_X1BUFCFG_X1_BUF_SIZE), \ + (((((uint32_t)(sConfig->InputBaseAddress)) << FMAC_X1BUFCFG_X1_BASE_Pos) & FMAC_X1BUFCFG_X1_BASE) | \ + ((((uint32_t)(sConfig->InputBufferSize)) << FMAC_X1BUFCFG_X1_BUF_SIZE_Pos) & FMAC_X1BUFCFG_X1_BUF_SIZE))); + } + + /* FMAC_X1BUFCFG: Configure the input threshold if valid when compared to the configured X1 size */ + if (sConfig->InputThreshold != FMAC_THRESHOLD_NO_VALUE) + { + /* Check the parameter */ + assert_param(IS_FMAC_THRESHOLD_APPLICABLE(FMAC_GET_X1_SIZE(hfmac), sConfig->InputThreshold, sConfig->InputAccess)); + + MODIFY_REG(hfmac->Instance->X1BUFCFG, \ + FMAC_X1BUFCFG_FULL_WM, \ + ((sConfig->InputThreshold) & FMAC_X1BUFCFG_FULL_WM)); + } + + /* FMAC_X2BUFCFG: Configure the coefficient buffer within the internal memory */ + if (sConfig->CoeffBufferSize != 0U) + { + MODIFY_REG(hfmac->Instance->X2BUFCFG, \ + (FMAC_X2BUFCFG_X2_BASE | FMAC_X2BUFCFG_X2_BUF_SIZE), \ + (((((uint32_t)(sConfig->CoeffBaseAddress)) << FMAC_X2BUFCFG_X2_BASE_Pos) & FMAC_X2BUFCFG_X2_BASE) | \ + ((((uint32_t)(sConfig->CoeffBufferSize)) << FMAC_X2BUFCFG_X2_BUF_SIZE_Pos) & FMAC_X2BUFCFG_X2_BUF_SIZE))); + } + + /* FMAC_YBUFCFG: Configure the output buffer within the internal memory if required */ + if (sConfig->OutputBufferSize != 0U) + { + MODIFY_REG(hfmac->Instance->YBUFCFG, \ + (FMAC_YBUFCFG_Y_BASE | FMAC_YBUFCFG_Y_BUF_SIZE), \ + (((((uint32_t)(sConfig->OutputBaseAddress)) << FMAC_YBUFCFG_Y_BASE_Pos) & FMAC_YBUFCFG_Y_BASE) | \ + ((((uint32_t)(sConfig->OutputBufferSize)) << FMAC_YBUFCFG_Y_BUF_SIZE_Pos) & FMAC_YBUFCFG_Y_BUF_SIZE))); + } + + /* FMAC_YBUFCFG: Configure the output threshold if valid when compared to the configured Y size */ + if (sConfig->OutputThreshold != FMAC_THRESHOLD_NO_VALUE) + { + /* Check the parameter */ + assert_param(IS_FMAC_THRESHOLD_APPLICABLE(FMAC_GET_Y_SIZE(hfmac), sConfig->OutputThreshold, sConfig->OutputAccess)); + + MODIFY_REG(hfmac->Instance->YBUFCFG, \ + FMAC_YBUFCFG_EMPTY_WM, \ + ((sConfig->OutputThreshold) & FMAC_YBUFCFG_EMPTY_WM)); + } + + /* CR: Configure the clip feature */ + tmpcr = sConfig->Clip & FMAC_CR_CLIPEN; + + /* CR: If IT or DMA will be used, enable error interrupts. + * Being more a debugging feature, FMAC_CR_SATIEN isn't enabled by default. */ + if ((sConfig->InputAccess == FMAC_BUFFER_ACCESS_DMA) || (sConfig->InputAccess == FMAC_BUFFER_ACCESS_IT) || + (sConfig->OutputAccess == FMAC_BUFFER_ACCESS_DMA) || (sConfig->OutputAccess == FMAC_BUFFER_ACCESS_IT)) + { + tmpcr |= FMAC_IT_UNFLIEN | FMAC_IT_OVFLIEN; + } + + /* CR: write the value */ + WRITE_REG(hfmac->Instance->CR, tmpcr); + + /* Save the input/output accesses in order to configure RIEN, WIEN, DMAREN and DMAWEN during filter start */ + hfmac->InputAccess = sConfig->InputAccess; + hfmac->OutputAccess = sConfig->OutputAccess; + + /* Check whether the configured X2 is big enough for the filter */ +#if defined(USE_FULL_ASSERT) + x2size = FMAC_GET_X2_SIZE(hfmac); +#endif /* USE_FULL_ASSERT */ + assert_param(((sConfig->Filter == FMAC_FUNC_CONVO_FIR) && (x2size >= sConfig->P)) || \ + ((sConfig->Filter == FMAC_FUNC_IIR_DIRECT_FORM_1) && (x2size >= ((uint32_t)sConfig->P + (uint32_t)sConfig->Q)))); + + /* Build the PARAM value that will be used when starting the filter */ + hfmac->FilterParam = (FMAC_PARAM_START | sConfig->Filter | \ + ((((uint32_t)(sConfig->P)) << FMAC_PARAM_P_Pos) & FMAC_PARAM_P) | \ + ((((uint32_t)(sConfig->Q)) << FMAC_PARAM_Q_Pos) & FMAC_PARAM_Q) | \ + ((((uint32_t)(sConfig->R)) << FMAC_PARAM_R_Pos) & FMAC_PARAM_R)); + + /* Initialize the coefficient buffer if required (pCoeffA for FIR only) */ + if ((sConfig->pCoeffB != NULL) && (sConfig->CoeffBSize != 0U)) + { + /* FIR/IIR: The provided coefficients should match X2 size */ + assert_param(((uint32_t)sConfig->CoeffASize + (uint32_t)sConfig->CoeffBSize) <= x2size); + /* FIR/IIR: The size of pCoeffB should match the parameter P */ + assert_param(sConfig->CoeffBSize >= sConfig->P); + /* pCoeffA should be provided for IIR but not for FIR */ + /* IIR : if pCoeffB is provided, pCoeffA should also be there */ + /* IIR: The size of pCoeffA should match the parameter Q */ + assert_param(((sConfig->Filter == FMAC_FUNC_CONVO_FIR) && + (sConfig->pCoeffA == NULL) && (sConfig->CoeffASize == 0U)) || + ((sConfig->Filter == FMAC_FUNC_IIR_DIRECT_FORM_1) && + (sConfig->pCoeffA != NULL) && (sConfig->CoeffASize != 0U) && + (sConfig->CoeffASize >= sConfig->Q))); + + /* Write number of values to be loaded, the data load function and start the operation */ + WRITE_REG(hfmac->Instance->PARAM, \ + (((uint32_t)(sConfig->CoeffBSize) << FMAC_PARAM_P_Pos) | \ + ((uint32_t)(sConfig->CoeffASize) << FMAC_PARAM_Q_Pos) | \ + FMAC_FUNC_LOAD_X2 | FMAC_PARAM_START)); + + if (PreloadAccess == PRELOAD_ACCESS_POLLING) + { + /* Load the buffer into the internal memory */ + FMAC_WritePreloadDataIncrementPtr(hfmac, &(sConfig->pCoeffB), sConfig->CoeffBSize); + + /* Load pCoeffA if needed */ + if ((sConfig->pCoeffA != NULL) && (sConfig->CoeffASize != 0U)) + { + /* Load the buffer into the internal memory */ + FMAC_WritePreloadDataIncrementPtr(hfmac, &(sConfig->pCoeffA), sConfig->CoeffASize); + } + + /* Wait for the end of the writing */ + if (FMAC_WaitOnStartUntilTimeout(hfmac, tickstart, HAL_FMAC_TIMEOUT_VALUE) != HAL_OK) + { + hfmac->State = HAL_FMAC_STATE_TIMEOUT; + return HAL_TIMEOUT; + } + + /* Change the FMAC state */ + hfmac->State = HAL_FMAC_STATE_READY; + } + else + { + hfmac->pInput = sConfig->pCoeffA; + hfmac->InputCurrentSize = sConfig->CoeffASize; + + /* Set the FMAC DMA transfer complete callback */ + hfmac->hdmaPreload->XferHalfCpltCallback = NULL; + hfmac->hdmaPreload->XferCpltCallback = FMAC_DMAFilterConfig; + /* Set the DMA error callback */ + hfmac->hdmaPreload->XferErrorCallback = FMAC_DMAError; + + /* Enable the DMA stream managing FMAC preload data write */ + return (HAL_DMA_Start_IT(hfmac->hdmaPreload, (uint32_t)sConfig->pCoeffB, (uint32_t)&hfmac->Instance->WDATA, + sConfig->CoeffBSize)); + } + } + else + { + /* Change the FMAC state */ + hfmac->State = HAL_FMAC_STATE_READY; + } + } + else + { + /* Return function status */ + return HAL_BUSY; + } + + /* Return function status */ + return HAL_OK; +} + +/** + * @brief Preload the input (FIR, IIR) and output data (IIR) of the FMAC filter. + * They will be used by FMAC as soon as HAL_FMAC_FilterStart is called. + * @param hfmac pointer to a FMAC_HandleTypeDef structure that contains + * the configuration information for FMAC module. + * @param pInput Preloading of the first elements of the input buffer (X1). + * If not needed (no data available when starting), it should be set to NULL. + * @param InputSize Size of the input vector. + * As pInput is used for preloading data, it cannot be bigger than the input memory area. + * @param pOutput [IIR] Preloading of the first elements of the output vector (Y). + * If not needed, it should be set to NULL. + * @param OutputSize Size of the output vector. + * As pOutput is used for preloading data, it cannot be bigger than the output memory area. + * @param PreloadAccess buffer preload method + * This parameter can be one of the following values: + * @arg @ref PRELOAD_ACCESS_POLLING preloading using CPU + * @arg @ref PRELOAD_ACCESS_DMA Get preloading using DMA + * @note The input and the output buffers can be filled by calling several times HAL_FMAC_FilterPreload + * (each call filling partly the buffers). In case of overflow (too much data provided through + * all these calls), an error will be returned. + * @retval HAL status + */ +static HAL_StatusTypeDef FMAC_FilterPreload(FMAC_HandleTypeDef *hfmac, int16_t *pInput, uint8_t InputSize, + int16_t *pOutput, uint8_t OutputSize, uint8_t PreloadAccess) +{ + uint32_t tickstart; + + /* Check the START bit state */ + if (FMAC_GET_START_BIT(hfmac) != 0UL) + { + return HAL_ERROR; + } + + /* Check that a valid configuration was done previously */ + if (hfmac->FilterParam == 0UL) + { + return HAL_ERROR; + } + + /* Check the preload input buffers isn't too big */ + if ((InputSize > FMAC_GET_X1_SIZE(hfmac)) && (pInput != NULL)) + { + return HAL_ERROR; + } + + /* Check the preload output buffer isn't too big */ + if ((OutputSize > FMAC_GET_Y_SIZE(hfmac)) && (pOutput != NULL)) + { + return HAL_ERROR; + } + + /* Check handle state is ready */ + if (hfmac->State == HAL_FMAC_STATE_READY) + { + /* Change the FMAC state */ + hfmac->State = HAL_FMAC_STATE_BUSY; + + /* Get tick */ + tickstart = HAL_GetTick(); + + /* Preload the input buffer if required */ + if ((pInput != NULL) && (InputSize != 0U)) + { + /* Write number of values to be loaded, the data load function and start the operation */ + WRITE_REG(hfmac->Instance->PARAM, \ + (((uint32_t)InputSize << FMAC_PARAM_P_Pos) | FMAC_FUNC_LOAD_X1 | FMAC_PARAM_START)); + + if (PreloadAccess == PRELOAD_ACCESS_POLLING) + { + /* Load the buffer into the internal memory */ + FMAC_WritePreloadDataIncrementPtr(hfmac, &pInput, InputSize); + + /* Wait for the end of the writing */ + if (FMAC_WaitOnStartUntilTimeout(hfmac, tickstart, HAL_FMAC_TIMEOUT_VALUE) != HAL_OK) + { + hfmac->State = HAL_FMAC_STATE_TIMEOUT; + return HAL_TIMEOUT; + } + } + else + { + hfmac->pInput = pOutput; + hfmac->InputCurrentSize = OutputSize; + + /* Set the FMAC DMA transfer complete callback */ + hfmac->hdmaPreload->XferHalfCpltCallback = NULL; + hfmac->hdmaPreload->XferCpltCallback = FMAC_DMAFilterPreload; + /* Set the DMA error callback */ + hfmac->hdmaPreload->XferErrorCallback = FMAC_DMAError; + + /* Enable the DMA stream managing FMAC preload data write */ + return (HAL_DMA_Start_IT(hfmac->hdmaPreload, (uint32_t)pInput, (uint32_t)&hfmac->Instance->WDATA, InputSize)); + } + } + + /* Preload the output buffer if required */ + if ((pOutput != NULL) && (OutputSize != 0U)) + { + /* Write number of values to be loaded, the data load function and start the operation */ + WRITE_REG(hfmac->Instance->PARAM, \ + (((uint32_t)OutputSize << FMAC_PARAM_P_Pos) | FMAC_FUNC_LOAD_Y | FMAC_PARAM_START)); + + if (PreloadAccess == PRELOAD_ACCESS_POLLING) + { + /* Load the buffer into the internal memory */ + FMAC_WritePreloadDataIncrementPtr(hfmac, &pOutput, OutputSize); + + /* Wait for the end of the writing */ + if (FMAC_WaitOnStartUntilTimeout(hfmac, tickstart, HAL_FMAC_TIMEOUT_VALUE) != HAL_OK) + { + hfmac->State = HAL_FMAC_STATE_TIMEOUT; + return HAL_TIMEOUT; + } + } + else + { + hfmac->pInput = NULL; + hfmac->InputCurrentSize = 0U; + + /* Set the FMAC DMA transfer complete callback */ + hfmac->hdmaPreload->XferHalfCpltCallback = NULL; + hfmac->hdmaPreload->XferCpltCallback = FMAC_DMAFilterPreload; + /* Set the DMA error callback */ + hfmac->hdmaPreload->XferErrorCallback = FMAC_DMAError; + + /* Enable the DMA stream managing FMAC preload data write */ + return (HAL_DMA_Start_IT(hfmac->hdmaPreload, (uint32_t)pOutput, (uint32_t)&hfmac->Instance->WDATA, OutputSize)); + } + } + + /* Update the error codes */ + if (__HAL_FMAC_GET_FLAG(hfmac, FMAC_FLAG_OVFL)) + { + hfmac->ErrorCode |= HAL_FMAC_ERROR_OVFL; + } + if (__HAL_FMAC_GET_FLAG(hfmac, FMAC_FLAG_UNFL)) + { + hfmac->ErrorCode |= HAL_FMAC_ERROR_UNFL; + } + + /* Change the FMAC state */ + hfmac->State = HAL_FMAC_STATE_READY; + + /* Return function status */ + if (hfmac->ErrorCode == HAL_FMAC_ERROR_NONE) + { + return HAL_OK; + } + else + { + return HAL_ERROR; + } + } + else + { + /* Return function status */ + return HAL_BUSY; + } +} + +/** + * @brief Write data into FMAC internal memory through WDATA and increment input buffer pointer. + * This function is only used with preload functions. + * @param hfmac pointer to a FMAC_HandleTypeDef structure that contains + * the configuration information for FMAC module. + * @param ppData pointer to pointer to the data buffer. + * @param Size size of the data buffer. + * @retval none + */ +static void FMAC_WritePreloadDataIncrementPtr(FMAC_HandleTypeDef *hfmac, int16_t **ppData, uint8_t Size) +{ + uint8_t index; + + /* Load the buffer into the internal memory */ + for (index = Size; index > 0U; index--) + { + WRITE_REG(hfmac->Instance->WDATA, (((uint32_t)(*(*ppData))) & FMAC_WDATA_WDATA)); + (*ppData)++; + } +} + +/** + * @brief Handle FMAC Function Timeout. + * @param hfmac FMAC handle. + * @param Tickstart Tick start value. + * @param Timeout Timeout duration. + * @retval HAL status + */ +static HAL_StatusTypeDef FMAC_WaitOnStartUntilTimeout(FMAC_HandleTypeDef *hfmac, uint32_t Tickstart, uint32_t Timeout) +{ + /* Wait until flag changes */ + while (READ_BIT(hfmac->Instance->PARAM, FMAC_PARAM_START) != 0UL) + { + if ((HAL_GetTick() - Tickstart) > Timeout) + { + /* Process Unlocked */ + __HAL_UNLOCK(hfmac); + + return HAL_TIMEOUT; + } + } + return HAL_OK; +} + +/** + * @brief Register the new input buffer, update DMA configuration + * if needed and change the FMAC state. + * @param hfmac pointer to a FMAC_HandleTypeDef structure that contains + * the configuration information for FMAC module. + * @param pInput New input vector (additional input data). + * @param pInputSize Size of the input vector (if all the data can't be + * written, it will be updated with the number of data read from FMAC). + * @retval HAL status + */ +static HAL_StatusTypeDef FMAC_AppendFilterDataUpdateState(FMAC_HandleTypeDef *hfmac, int16_t *pInput, + uint16_t *pInputSize) +{ + /* Change the FMAC state */ + hfmac->WrState = HAL_FMAC_STATE_BUSY_WR; + + /* Reset the current size */ + hfmac->InputCurrentSize = 0U; + + /* Handle the pointer depending on the input access */ + if (hfmac->InputAccess == FMAC_BUFFER_ACCESS_DMA) + { + hfmac->pInput = NULL; + hfmac->pInputSize = NULL; + + /* Set the FMAC DMA transfer complete callback */ + hfmac->hdmaIn->XferHalfCpltCallback = FMAC_DMAHalfGetData; + hfmac->hdmaIn->XferCpltCallback = FMAC_DMAGetData; + /* Set the DMA error callback */ + hfmac->hdmaIn->XferErrorCallback = FMAC_DMAError; + + /* Enable the DMA stream managing FMAC input data write */ + return (HAL_DMA_Start_IT(hfmac->hdmaIn, (uint32_t)pInput, (uint32_t)&hfmac->Instance->WDATA, *pInputSize)); + } + else + { + /* Update the input data information (polling, IT) */ + hfmac->pInput = pInput; + hfmac->pInputSize = pInputSize; + } + + /* Return function status */ + return HAL_OK; +} + +/** + * @brief Register the new output buffer, update DMA configuration + * if needed and change the FMAC state. + * @param hfmac pointer to a FMAC_HandleTypeDef structure that contains + * the configuration information for FMAC module. + * @param pOutput New output vector. + * @param pOutputSize Size of the output vector (if the vector can't + * be entirely filled, pOutputSize will be updated with the number + * of data read from FMAC). + * @retval HAL status + */ +static HAL_StatusTypeDef FMAC_ConfigFilterOutputBufferUpdateState(FMAC_HandleTypeDef *hfmac, int16_t *pOutput, + uint16_t *pOutputSize) +{ + /* Reset the current size */ + hfmac->OutputCurrentSize = 0U; + + /* Check whether a valid pointer was provided */ + if ((pOutput == NULL) || (pOutputSize == NULL) || (*pOutputSize == 0UL)) + { + /* The user will have to provide a valid configuration later */ + hfmac->pOutput = NULL; + hfmac->pOutputSize = NULL; + hfmac->RdState = HAL_FMAC_STATE_READY; + } + /* Handle the pointer depending on the input access */ + else if (hfmac->OutputAccess == FMAC_BUFFER_ACCESS_DMA) + { + hfmac->pOutput = NULL; + hfmac->pOutputSize = NULL; + hfmac->RdState = HAL_FMAC_STATE_BUSY_RD; + + /* Set the FMAC DMA transfer complete callback */ + hfmac->hdmaOut->XferHalfCpltCallback = FMAC_DMAHalfOutputDataReady; + hfmac->hdmaOut->XferCpltCallback = FMAC_DMAOutputDataReady; + /* Set the DMA error callback */ + hfmac->hdmaOut->XferErrorCallback = FMAC_DMAError; + + /* Enable the DMA stream managing FMAC output data read */ + return (HAL_DMA_Start_IT(hfmac->hdmaOut, (uint32_t)&hfmac->Instance->RDATA, (uint32_t)pOutput, *pOutputSize)); + } + else if (hfmac->OutputAccess == FMAC_BUFFER_ACCESS_NONE) + { + hfmac->pOutput = NULL; + hfmac->pOutputSize = NULL; + hfmac->RdState = HAL_FMAC_STATE_READY; + } + else + { + /* Update the output data information (polling, IT) */ + hfmac->pOutput = pOutput; + hfmac->pOutputSize = pOutputSize; + hfmac->RdState = HAL_FMAC_STATE_BUSY_RD; + } + + /* Return function status */ + return HAL_OK; +} + +/** + * @brief Read available output data until Y EMPTY is set. + * @param hfmac FMAC handle. + * @param MaxSizeToRead Maximum number of data to read (this serves as a timeout + * if FMAC continuously writes into the output buffer). + * @retval HAL status + */ +static void FMAC_ReadDataIncrementPtr(FMAC_HandleTypeDef *hfmac, uint16_t MaxSizeToRead) +{ + uint16_t maxsize; + uint16_t threshold; + uint32_t tmpvalue; + + /* Check if there is data to read */ + if (READ_BIT(hfmac->Instance->SR, FMAC_SR_YEMPTY) != 0UL) + { + return; + } + + /* Get the maximum index (no wait allowed, no overstepping of the output buffer) */ + if ((hfmac->OutputCurrentSize + MaxSizeToRead) > *(hfmac->pOutputSize)) + { + maxsize = *(hfmac->pOutputSize); + } + else + { + maxsize = hfmac->OutputCurrentSize + MaxSizeToRead; + } + + /* Read until there is no more room or no more data */ + do + { + /* If there is no more room, return */ + if (!(hfmac->OutputCurrentSize < maxsize)) + { + return; + } + + /* Read the available data */ + tmpvalue = ((READ_REG(hfmac->Instance->RDATA))& FMAC_RDATA_RDATA); + *(hfmac->pOutput) = (int16_t)tmpvalue; + hfmac->pOutput++; + hfmac->OutputCurrentSize++; + } while (READ_BIT(hfmac->Instance->SR, FMAC_SR_YEMPTY) == 0UL); + + /* Y buffer empty flag has just be raised, read the threshold */ + threshold = (uint16_t)FMAC_GET_THRESHOLD_FROM_WM(FMAC_GET_Y_EMPTY_WM(hfmac)) - 1U; + + /* Update the maximum size if needed (limited data available) */ + if ((hfmac->OutputCurrentSize + threshold) < maxsize) + { + maxsize = hfmac->OutputCurrentSize + threshold; + } + + /* Read the available data */ + while (hfmac->OutputCurrentSize < maxsize) + { + tmpvalue = ((READ_REG(hfmac->Instance->RDATA))& FMAC_RDATA_RDATA); + *(hfmac->pOutput) = (int16_t)tmpvalue; + hfmac->pOutput++; + hfmac->OutputCurrentSize++; + } +} + +/** + * @brief Write available input data until X1 FULL is set. + * @param hfmac FMAC handle. + * @param MaxSizeToWrite Maximum number of data to write (this serves as a timeout + * if FMAC continuously empties the input buffer). + * @retval HAL status + */ +static void FMAC_WriteDataIncrementPtr(FMAC_HandleTypeDef *hfmac, uint16_t MaxSizeToWrite) +{ + uint16_t maxsize; + uint16_t threshold; + + /* Check if there is room in FMAC */ + if (READ_BIT(hfmac->Instance->SR, FMAC_SR_X1FULL) != 0UL) + { + return; + } + + /* Get the maximum index (no wait allowed, no overstepping of the output buffer) */ + if ((hfmac->InputCurrentSize + MaxSizeToWrite) > *(hfmac->pInputSize)) + { + maxsize = *(hfmac->pInputSize); + } + else + { + maxsize = hfmac->InputCurrentSize + MaxSizeToWrite; + } + + /* Write until there is no more room or no more data */ + do + { + /* If there is no more room, return */ + if (!(hfmac->InputCurrentSize < maxsize)) + { + return; + } + + /* Write the available data */ + WRITE_REG(hfmac->Instance->WDATA, (((uint32_t)(*(hfmac->pInput))) & FMAC_WDATA_WDATA)); + hfmac->pInput++; + hfmac->InputCurrentSize++; + } while (READ_BIT(hfmac->Instance->SR, FMAC_SR_X1FULL) == 0UL); + + /* X1 buffer full flag has just be raised, read the threshold */ + threshold = (uint16_t)FMAC_GET_THRESHOLD_FROM_WM(FMAC_GET_X1_FULL_WM(hfmac)) - 1U; + + /* Update the maximum size if needed (limited data available) */ + if ((hfmac->InputCurrentSize + threshold) < maxsize) + { + maxsize = hfmac->InputCurrentSize + threshold; + } + + /* Write the available data */ + while (hfmac->InputCurrentSize < maxsize) + { + WRITE_REG(hfmac->Instance->WDATA, (((uint32_t)(*(hfmac->pInput))) & FMAC_WDATA_WDATA)); + hfmac->pInput++; + hfmac->InputCurrentSize++; + } +} + +/** + * @brief DMA FMAC Input Data process half complete callback. + * @param hdma DMA handle. + * @retval None + */ +static void FMAC_DMAHalfGetData(DMA_HandleTypeDef *hdma) +{ + FMAC_HandleTypeDef *hfmac = (FMAC_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent; + + /* Call half get data callback */ +#if (USE_HAL_FMAC_REGISTER_CALLBACKS == 1) + hfmac->HalfGetDataCallback(hfmac); +#else + HAL_FMAC_HalfGetDataCallback(hfmac); +#endif /* USE_HAL_FMAC_REGISTER_CALLBACKS */ +} + +/** + * @brief DMA FMAC Input Data process complete callback. + * @param hdma DMA handle. + * @retval None + */ +static void FMAC_DMAGetData(DMA_HandleTypeDef *hdma) +{ + FMAC_HandleTypeDef *hfmac = (FMAC_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent; + + /* Reset the pointers to indicate new data will be needed */ + FMAC_ResetInputStateAndDataPointers(hfmac); + + /* Call get data callback */ +#if (USE_HAL_FMAC_REGISTER_CALLBACKS == 1) + hfmac->GetDataCallback(hfmac); +#else + HAL_FMAC_GetDataCallback(hfmac); +#endif /* USE_HAL_FMAC_REGISTER_CALLBACKS */ +} + +/** + * @brief DMA FMAC Output Data process half complete callback. + * @param hdma DMA handle. + * @retval None + */ +static void FMAC_DMAHalfOutputDataReady(DMA_HandleTypeDef *hdma) +{ + FMAC_HandleTypeDef *hfmac = (FMAC_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent; + + /* Call half output data ready callback */ +#if (USE_HAL_FMAC_REGISTER_CALLBACKS == 1) + hfmac->HalfOutputDataReadyCallback(hfmac); +#else + HAL_FMAC_HalfOutputDataReadyCallback(hfmac); +#endif /* USE_HAL_FMAC_REGISTER_CALLBACKS */ +} + +/** + * @brief DMA FMAC Output Data process complete callback. + * @param hdma DMA handle. + * @retval None + */ +static void FMAC_DMAOutputDataReady(DMA_HandleTypeDef *hdma) +{ + FMAC_HandleTypeDef *hfmac = (FMAC_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent; + + /* Reset the pointers to indicate new data will be needed */ + FMAC_ResetOutputStateAndDataPointers(hfmac); + + /* Call output data ready callback */ +#if (USE_HAL_FMAC_REGISTER_CALLBACKS == 1) + hfmac->OutputDataReadyCallback(hfmac); +#else + HAL_FMAC_OutputDataReadyCallback(hfmac); +#endif /* USE_HAL_FMAC_REGISTER_CALLBACKS */ +} + +/** + * @brief DMA FMAC Filter Configuration process complete callback. + * @param hdma DMA handle. + * @retval None + */ +static void FMAC_DMAFilterConfig(DMA_HandleTypeDef *hdma) +{ + uint8_t index; + + FMAC_HandleTypeDef *hfmac = (FMAC_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent; + + /* If needed, write CoeffA and exit */ + if (hfmac->pInput != NULL) + { + /* Set the FMAC DMA transfer complete callback */ + hfmac->hdmaPreload->XferHalfCpltCallback = NULL; + hfmac->hdmaPreload->XferCpltCallback = FMAC_DMAFilterConfig; + /* Set the DMA error callback */ + hfmac->hdmaPreload->XferErrorCallback = FMAC_DMAError; + + /* Enable the DMA stream managing FMAC preload data write */ + if (HAL_DMA_Start_IT(hfmac->hdmaPreload, (uint32_t)hfmac->pInput, (uint32_t)&hfmac->Instance->WDATA, + hfmac->InputCurrentSize) == HAL_OK) + { + hfmac->pInput = NULL; + hfmac->InputCurrentSize = 0U; + return; + } + + /* If not exited, there was an error: set FMAC handle state to error */ + hfmac->State = HAL_FMAC_STATE_ERROR; + } + else + { + /* Wait for the end of the writing */ + for (index = 0U; index < 0xFFU; index++) + { + if (READ_BIT(hfmac->Instance->PARAM, FMAC_PARAM_START) == 0U) + { + break; + } + } + + /* If 'START' is still set, there was an error: set FMAC handle state to error */ + if (READ_BIT(hfmac->Instance->PARAM, FMAC_PARAM_START) != 0UL) + { + hfmac->State = HAL_FMAC_STATE_TIMEOUT; + } + else + { + /* Change the FMAC state */ + hfmac->State = HAL_FMAC_STATE_READY; + + /* Call output data ready callback */ +#if (USE_HAL_FMAC_REGISTER_CALLBACKS == 1) + hfmac->FilterConfigCallback(hfmac); +#else + HAL_FMAC_FilterConfigCallback(hfmac); +#endif /* USE_HAL_FMAC_REGISTER_CALLBACKS */ + return; + } + } + + /* If not exited, there was an error: set FMAC handle error code to DMA error */ + hfmac->ErrorCode |= HAL_FMAC_ERROR_DMA; + + /* Call user callback */ +#if (USE_HAL_FMAC_REGISTER_CALLBACKS == 1) + hfmac->ErrorCallback(hfmac); +#else + HAL_FMAC_ErrorCallback(hfmac); +#endif /* USE_HAL_FMAC_REGISTER_CALLBACKS */ + +} + +/** + * @brief DMA FMAC Filter Configuration process complete callback. + * @param hdma DMA handle. + * @retval None + */ +static void FMAC_DMAFilterPreload(DMA_HandleTypeDef *hdma) +{ + uint8_t index; + + FMAC_HandleTypeDef *hfmac = (FMAC_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent; + + /* Wait for the end of the X1 writing */ + for (index = 0U; index < 0xFFU; index++) + { + if (READ_BIT(hfmac->Instance->PARAM, FMAC_PARAM_START) == 0UL) + { + break; + } + } + + /* If 'START' is still set, there was an error: set FMAC handle state to error */ + if (READ_BIT(hfmac->Instance->PARAM, FMAC_PARAM_START) != 0UL) + { + hfmac->State = HAL_FMAC_STATE_TIMEOUT; + hfmac->ErrorCode |= HAL_FMAC_ERROR_TIMEOUT; + } + /* If needed, preload Y buffer */ + else if ((hfmac->pInput != NULL) && (hfmac->InputCurrentSize != 0U)) + { + /* Write number of values to be loaded, the data load function and start the operation */ + WRITE_REG(hfmac->Instance->PARAM, \ + (((uint32_t)(hfmac->InputCurrentSize) << FMAC_PARAM_P_Pos) | FMAC_FUNC_LOAD_Y | FMAC_PARAM_START)); + + /* Set the FMAC DMA transfer complete callback */ + hfmac->hdmaPreload->XferHalfCpltCallback = NULL; + hfmac->hdmaPreload->XferCpltCallback = FMAC_DMAFilterPreload; + /* Set the DMA error callback */ + hfmac->hdmaPreload->XferErrorCallback = FMAC_DMAError; + + /* Enable the DMA stream managing FMAC preload data write */ + if (HAL_DMA_Start_IT(hfmac->hdmaPreload, (uint32_t)hfmac->pInput, (uint32_t)&hfmac->Instance->WDATA, + hfmac->InputCurrentSize) == HAL_OK) + { + hfmac->pInput = NULL; + hfmac->InputCurrentSize = 0U; + return; + } + + /* If not exited, there was an error */ + hfmac->ErrorCode = HAL_FMAC_ERROR_DMA; + hfmac->State = HAL_FMAC_STATE_ERROR; + } + else + { + /* nothing to do */ + } + + /* Return function status */ + if (hfmac->ErrorCode == HAL_FMAC_ERROR_NONE) + { + /* Change the FMAC state */ + hfmac->State = HAL_FMAC_STATE_READY; + + /* Call output data ready callback */ +#if (USE_HAL_FMAC_REGISTER_CALLBACKS == 1) + hfmac->FilterPreloadCallback(hfmac); +#else + HAL_FMAC_FilterPreloadCallback(hfmac); +#endif /* USE_HAL_FMAC_REGISTER_CALLBACKS */ + } + else + { + /* Call user callback */ +#if (USE_HAL_FMAC_REGISTER_CALLBACKS == 1) + hfmac->ErrorCallback(hfmac); +#else + HAL_FMAC_ErrorCallback(hfmac); +#endif /* USE_HAL_FMAC_REGISTER_CALLBACKS */ + } +} + + +/** + * @brief DMA FMAC communication error callback. + * @param hdma DMA handle. + * @retval None + */ +static void FMAC_DMAError(DMA_HandleTypeDef *hdma) +{ + FMAC_HandleTypeDef *hfmac = (FMAC_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent; + + /* Set FMAC handle state to error */ + hfmac->State = HAL_FMAC_STATE_ERROR; + + /* Set FMAC handle error code to DMA error */ + hfmac->ErrorCode |= HAL_FMAC_ERROR_DMA; + + /* Call user callback */ +#if (USE_HAL_FMAC_REGISTER_CALLBACKS == 1) + hfmac->ErrorCallback(hfmac); +#else + HAL_FMAC_ErrorCallback(hfmac); +#endif /* USE_HAL_FMAC_REGISTER_CALLBACKS */ +} +/** + * @} + */ + + +/** + * @} + */ + +/** + * @} + */ + +#endif /* HAL_FMAC_MODULE_ENABLED */ +#endif /* FMAC */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_hcd.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_hcd.c index 974be7f..8bdb39f 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_hcd.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_hcd.c @@ -1170,6 +1170,13 @@ static void HCD_HC_IN_IRQHandler(HCD_HandleTypeDef *hhcd, uint8_t chnum) __HAL_HCD_CLEAR_HC_INT(ch_num, USB_OTG_HCINT_AHBERR); __HAL_HCD_UNMASK_HALT_HC_INT(ch_num); } + else if ((USBx_HC(ch_num)->HCINT & USB_OTG_HCINT_BBERR) == USB_OTG_HCINT_BBERR) + { + __HAL_HCD_CLEAR_HC_INT(ch_num, USB_OTG_HCINT_BBERR); + hhcd->hc[ch_num].state = HC_BBLERR; + __HAL_HCD_UNMASK_HALT_HC_INT(ch_num); + (void)USB_HC_Halt(hhcd->Instance, (uint8_t)ch_num); + } else if ((USBx_HC(ch_num)->HCINT & USB_OTG_HCINT_ACK) == USB_OTG_HCINT_ACK) { __HAL_HCD_CLEAR_HC_INT(ch_num, USB_OTG_HCINT_ACK); @@ -1234,6 +1241,7 @@ static void HCD_HC_IN_IRQHandler(HCD_HandleTypeDef *hhcd, uint8_t chnum) else if (hhcd->hc[ch_num].ep_type == EP_TYPE_ISOC) { hhcd->hc[ch_num].urb_state = URB_DONE; + hhcd->hc[ch_num].toggle_in ^= 1U; #if (USE_HAL_HCD_REGISTER_CALLBACKS == 1U) hhcd->HC_NotifyURBChangeCallback(hhcd, (uint8_t)ch_num, hhcd->hc[ch_num].urb_state); @@ -1289,6 +1297,11 @@ static void HCD_HC_IN_IRQHandler(HCD_HandleTypeDef *hhcd, uint8_t chnum) tmpreg |= USB_OTG_HCCHAR_CHENA; USBx_HC(ch_num)->HCCHAR = tmpreg; } + else if (hhcd->hc[ch_num].state == HC_BBLERR) + { + hhcd->hc[ch_num].ErrCnt++; + hhcd->hc[ch_num].urb_state = URB_ERROR; + } else { /* ... */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_hrtim.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_hrtim.c index 4f78ecf..0261a46 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_hrtim.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_hrtim.c @@ -5132,11 +5132,11 @@ HAL_StatusTypeDef HAL_HRTIM_WaveformCountStart(HRTIM_HandleTypeDef * hhrtim, * @param Timers Timer counter(s) to stop * This parameter can be any combination of the following values: * @arg HRTIM_TIMERID_MASTER - * @arg HRTIM_TIMERID_A - * @arg HRTIM_TIMERID_B - * @arg HRTIM_TIMERID_C - * @arg HRTIM_TIMERID_D - * @arg HRTIM_TIMERID_E + * @arg HRTIM_TIMERID_TIMER_A + * @arg HRTIM_TIMERID_TIMER_B + * @arg HRTIM_TIMERID_TIMER_C + * @arg HRTIM_TIMERID_TIMER_D + * @arg HRTIM_TIMERID_TIMER_E * @retval HAL status * @note The counter of a timer is stopped only if all timer outputs are disabled */ @@ -5169,11 +5169,11 @@ HAL_StatusTypeDef HAL_HRTIM_WaveformCountStop(HRTIM_HandleTypeDef * hhrtim, * @param Timers Timer counter(s) to start * This parameter can be any combination of the following values: * @arg HRTIM_TIMERID_MASTER - * @arg HRTIM_TIMERID_A - * @arg HRTIM_TIMERID_B - * @arg HRTIM_TIMERID_C - * @arg HRTIM_TIMERID_D - * @arg HRTIM_TIMERID_E + * @arg HRTIM_TIMERID_TIMER_A + * @arg HRTIM_TIMERID_TIMER_B + * @arg HRTIM_TIMERID_TIMER_C + * @arg HRTIM_TIMERID_TIMER_D + * @arg HRTIM_TIMERID_TIMER_E * @note HRTIM interrupts (e.g. faults interrupts) and interrupts related * to the timers to start are enabled within this function. * Interrupts to enable are selected through HAL_HRTIM_WaveformTimerConfig @@ -5233,11 +5233,11 @@ HAL_StatusTypeDef HAL_HRTIM_WaveformCountStart_IT(HRTIM_HandleTypeDef * hhrtim, * @param Timers Timer counter(s) to stop * This parameter can be any combination of the following values: * @arg HRTIM_TIMERID_MASTER - * @arg HRTIM_TIMERID_A - * @arg HRTIM_TIMERID_B - * @arg HRTIM_TIMERID_C - * @arg HRTIM_TIMERID_D - * @arg HRTIM_TIMERID_E + * @arg HRTIM_TIMERID_TIMER_A + * @arg HRTIM_TIMERID_TIMER_B + * @arg HRTIM_TIMERID_TIMER_C + * @arg HRTIM_TIMERID_TIMER_D + * @arg HRTIM_TIMERID_TIMER_E * @retval HAL status * @note The counter of a timer is stopped only if all timer outputs are disabled * @note All enabled timer related interrupts are disabled. diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_hsem.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_hsem.c index 1fab0ce..9fae472 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_hsem.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_hsem.c @@ -101,6 +101,10 @@ /* Private typedef -----------------------------------------------------------*/ /* Private define ------------------------------------------------------------*/ #if defined(DUAL_CORE) +/** @defgroup HSEM_Private_Constants HSEM Private Constants + * @{ + */ + #ifndef HSEM_R_MASTERID #define HSEM_R_MASTERID HSEM_R_COREID #endif @@ -112,6 +116,10 @@ #ifndef HSEM_CR_MASTERID #define HSEM_CR_MASTERID HSEM_CR_COREID #endif + +/** + * @} + */ #endif /* DUAL_CORE */ /* Private macro -------------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c.c index 7c05d16..635b01c 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c.c @@ -3203,7 +3203,7 @@ HAL_StatusTypeDef HAL_I2C_Master_Seq_Transmit_IT(I2C_HandleTypeDef *hi2c, uint16 I2C_ConvertOtherXferOptions(hi2c); /* Update xfermode accordingly if no reload is necessary */ - if (hi2c->XferCount < MAX_NBYTE_SIZE) + if (hi2c->XferCount <= MAX_NBYTE_SIZE) { xfermode = hi2c->XferOptions; } @@ -3288,7 +3288,7 @@ HAL_StatusTypeDef HAL_I2C_Master_Seq_Transmit_DMA(I2C_HandleTypeDef *hi2c, uint1 I2C_ConvertOtherXferOptions(hi2c); /* Update xfermode accordingly if no reload is necessary */ - if (hi2c->XferCount < MAX_NBYTE_SIZE) + if (hi2c->XferCount <= MAX_NBYTE_SIZE) { xfermode = hi2c->XferOptions; } @@ -3449,7 +3449,7 @@ HAL_StatusTypeDef HAL_I2C_Master_Seq_Receive_IT(I2C_HandleTypeDef *hi2c, uint16_ I2C_ConvertOtherXferOptions(hi2c); /* Update xfermode accordingly if no reload is necessary */ - if (hi2c->XferCount < MAX_NBYTE_SIZE) + if (hi2c->XferCount <= MAX_NBYTE_SIZE) { xfermode = hi2c->XferOptions; } @@ -3534,7 +3534,7 @@ HAL_StatusTypeDef HAL_I2C_Master_Seq_Receive_DMA(I2C_HandleTypeDef *hi2c, uint16 I2C_ConvertOtherXferOptions(hi2c); /* Update xfermode accordingly if no reload is necessary */ - if (hi2c->XferCount < MAX_NBYTE_SIZE) + if (hi2c->XferCount <= MAX_NBYTE_SIZE) { xfermode = hi2c->XferOptions; } @@ -5477,7 +5477,7 @@ static void I2C_ITMasterCplt(I2C_HandleTypeDef *hi2c, uint32_t ITFlags) { uint32_t tmperror; uint32_t tmpITFlags = ITFlags; - uint32_t tmp; + __IO uint32_t tmpreg; /* Clear STOP Flag */ __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF); @@ -5518,9 +5518,8 @@ static void I2C_ITMasterCplt(I2C_HandleTypeDef *hi2c, uint32_t ITFlags) if ((hi2c->State == HAL_I2C_STATE_ABORT) && (I2C_CHECK_FLAG(tmpITFlags, I2C_FLAG_RXNE) != RESET)) { /* Read data from RXDR */ - tmp = (uint8_t)hi2c->Instance->RXDR; - - UNUSED(tmp); + tmpreg = (uint8_t)hi2c->Instance->RXDR; + UNUSED(tmpreg); } /* Flush TX register */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c_ex.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c_ex.c index ea50ce3..db8682d 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c_ex.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c_ex.c @@ -276,6 +276,8 @@ HAL_StatusTypeDef HAL_I2CEx_DisableWakeUp(I2C_HandleTypeDef *hi2c) * only by using I2C_FASTMODEPLUS_I2C3 parameter. * @note For all I2C4 pins fast mode plus driving capability can be enabled * only by using I2C_FASTMODEPLUS_I2C4 parameter. + * @note For all I2C5 pins fast mode plus driving capability can be enabled + * only by using I2C_FASTMODEPLUS_I2C5 parameter. * @retval None */ void HAL_I2CEx_EnableFastModePlus(uint32_t ConfigFastModePlus) @@ -305,6 +307,8 @@ void HAL_I2CEx_EnableFastModePlus(uint32_t ConfigFastModePlus) * only by using I2C_FASTMODEPLUS_I2C3 parameter. * @note For all I2C4 pins fast mode plus driving capability can be disabled * only by using I2C_FASTMODEPLUS_I2C4 parameter. + * @note For all I2C5 pins fast mode plus driving capability can be disabled + * only by using I2C_FASTMODEPLUS_I2C5 parameter. * @retval None */ void HAL_I2CEx_DisableFastModePlus(uint32_t ConfigFastModePlus) diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2s.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2s.c index 1a6bec0..62db588 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2s.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2s.c @@ -114,6 +114,7 @@ Function HAL_I2S_RegisterCallback() allows to register following callbacks: (+) TxCpltCallback : I2S Tx Completed callback (+) RxCpltCallback : I2S Rx Completed callback + (+) TxRxCpltCallback : I2S TxRx Completed callback (+) TxHalfCpltCallback : I2S Tx Half Completed callback (+) RxHalfCpltCallback : I2S Rx Half Completed callback (+) ErrorCallback : I2S Error callback @@ -130,6 +131,7 @@ This function allows to reset following callbacks: (+) TxCpltCallback : I2S Tx Completed callback (+) RxCpltCallback : I2S Rx Completed callback + (+) TxRxCpltCallback : I2S TxRx Completed callback (+) TxHalfCpltCallback : I2S Tx Half Completed callback (+) RxHalfCpltCallback : I2S Rx Half Completed callback (+) ErrorCallback : I2S Error callback @@ -201,6 +203,8 @@ static void I2S_DMATxCplt(DMA_HandleTypeDef *hdma); static void I2S_DMATxHalfCplt(DMA_HandleTypeDef *hdma); static void I2S_DMARxCplt(DMA_HandleTypeDef *hdma); static void I2S_DMARxHalfCplt(DMA_HandleTypeDef *hdma); +static void I2SEx_DMATxRxCplt(DMA_HandleTypeDef *hdma); +static void I2SEx_DMATxRxHalfCplt(DMA_HandleTypeDef *hdma); static void I2S_DMAError(DMA_HandleTypeDef *hdma); static void I2S_Transmit_16Bit_IT(I2S_HandleTypeDef *hi2s); static void I2S_Transmit_32Bit_IT(I2S_HandleTypeDef *hi2s); @@ -290,8 +294,10 @@ HAL_StatusTypeDef HAL_I2S_Init(I2S_HandleTypeDef *hi2s) /* Init the I2S Callback settings */ hi2s->TxCpltCallback = HAL_I2S_TxCpltCallback; /* Legacy weak TxCpltCallback */ hi2s->RxCpltCallback = HAL_I2S_RxCpltCallback; /* Legacy weak RxCpltCallback */ + hi2s->TxRxCpltCallback = HAL_I2SEx_TxRxCpltCallback; /* Legacy weak TxRxCpltCallback */ hi2s->TxHalfCpltCallback = HAL_I2S_TxHalfCpltCallback; /* Legacy weak TxHalfCpltCallback */ hi2s->RxHalfCpltCallback = HAL_I2S_RxHalfCpltCallback; /* Legacy weak RxHalfCpltCallback */ + hi2s->TxRxHalfCpltCallback = HAL_I2SEx_TxRxHalfCpltCallback; /* Legacy weak TxRxHalfCpltCallback */ hi2s->ErrorCallback = HAL_I2S_ErrorCallback; /* Legacy weak ErrorCallback */ if (hi2s->MspInitCallback == NULL) @@ -558,6 +564,10 @@ HAL_StatusTypeDef HAL_I2S_RegisterCallback(I2S_HandleTypeDef *hi2s, HAL_I2S_Call hi2s->RxCpltCallback = pCallback; break; + case HAL_I2S_TX_RX_COMPLETE_CB_ID : + hi2s->TxRxCpltCallback = pCallback; + break; + case HAL_I2S_TX_HALF_COMPLETE_CB_ID : hi2s->TxHalfCpltCallback = pCallback; break; @@ -566,6 +576,11 @@ HAL_StatusTypeDef HAL_I2S_RegisterCallback(I2S_HandleTypeDef *hi2s, HAL_I2S_Call hi2s->RxHalfCpltCallback = pCallback; break; + + case HAL_I2S_TX_RX_HALF_COMPLETE_CB_ID : + hi2s->TxRxHalfCpltCallback = pCallback; + break; + case HAL_I2S_ERROR_CB_ID : hi2s->ErrorCallback = pCallback; break; @@ -649,6 +664,10 @@ HAL_StatusTypeDef HAL_I2S_UnRegisterCallback(I2S_HandleTypeDef *hi2s, HAL_I2S_Ca hi2s->RxCpltCallback = HAL_I2S_RxCpltCallback; /* Legacy weak RxCpltCallback */ break; + case HAL_I2S_TX_RX_COMPLETE_CB_ID : + hi2s->TxRxCpltCallback = HAL_I2SEx_TxRxCpltCallback; /* Legacy weak TxRxCpltCallback */ + break; + case HAL_I2S_TX_HALF_COMPLETE_CB_ID : hi2s->TxHalfCpltCallback = HAL_I2S_TxHalfCpltCallback; /* Legacy weak TxHalfCpltCallback */ break; @@ -657,6 +676,10 @@ HAL_StatusTypeDef HAL_I2S_UnRegisterCallback(I2S_HandleTypeDef *hi2s, HAL_I2S_Ca hi2s->RxHalfCpltCallback = HAL_I2S_RxHalfCpltCallback; /* Legacy weak RxHalfCpltCallback */ break; + case HAL_I2S_TX_RX_HALF_COMPLETE_CB_ID : + hi2s->TxRxHalfCpltCallback = HAL_I2SEx_TxRxHalfCpltCallback; /* Legacy weak TxRxHalfCpltCallback */ + break; + case HAL_I2S_ERROR_CB_ID : hi2s->ErrorCallback = HAL_I2S_ErrorCallback; /* Legacy weak ErrorCallback */ break; @@ -741,18 +764,22 @@ HAL_StatusTypeDef HAL_I2S_UnRegisterCallback(I2S_HandleTypeDef *hi2s, HAL_I2S_Ca (#) Blocking mode functions are : (++) HAL_I2S_Transmit() (++) HAL_I2S_Receive() + (++) HAL_I2SEx_TransmitReceive() (#) No-Blocking mode functions with Interrupt are : (++) HAL_I2S_Transmit_IT() (++) HAL_I2S_Receive_IT() + (++) HAL_I2SEx_TransmitReceive_IT() (#) No-Blocking mode functions with DMA are : (++) HAL_I2S_Transmit_DMA() (++) HAL_I2S_Receive_DMA() + (++) HAL_I2SEx_TransmitReceive_DMA() (#) A set of Transfer Complete Callbacks are provided in non Blocking mode: (++) HAL_I2S_TxCpltCallback() (++) HAL_I2S_RxCpltCallback() + (++) HAL_I2SEx_TxRxCpltCallback() (++) HAL_I2S_ErrorCallback() @endverbatim @@ -937,7 +964,7 @@ HAL_StatusTypeDef HAL_I2S_Receive(I2S_HandleTypeDef *hi2s, uint16_t *pData, uint /* Receive data */ while (hi2s->RxXferCount > 0UL) { - /* Wait until RXNE flag is set */ + /* Wait until RXP flag is set */ if (I2S_WaitFlagStateUntilTimeout(hi2s, I2S_FLAG_RXP, SET, Timeout) != HAL_OK) { /* Set the error code */ @@ -982,6 +1009,159 @@ HAL_StatusTypeDef HAL_I2S_Receive(I2S_HandleTypeDef *hi2s, uint16_t *pData, uint return HAL_OK; } +/** + * @brief Full-Duplex Transmit/Receive data in blocking mode. + * @param hi2s pointer to a I2S_HandleTypeDef structure that contains + * the configuration information for I2S module + * @param pTxData a 16-bit pointer to the Transmit data buffer. + * @param pRxData a 16-bit pointer to the Receive data buffer. + * @param Size number of data sample to be sent: + * @note When a 16-bit data frame or a 16-bit data frame extended is selected during the I2S + * configuration phase, the Size parameter means the number of 16-bit data length + * in the transaction and when a 24-bit data frame or a 32-bit data frame is selected + * the Size parameter means the number of 16-bit data length. + * @param Timeout Timeout duration + * @note The I2S is kept enabled at the end of transaction to avoid the clock de-synchronization + * between Master and Slave(example: audio streaming). + * @retval HAL status + */ + +HAL_StatusTypeDef HAL_I2SEx_TransmitReceive(I2S_HandleTypeDef *hi2s, uint16_t *pTxData, uint16_t *pRxData, + uint16_t Size, uint32_t Timeout) +{ + uint32_t tmp_TxXferCount; + uint32_t tmp_RxXferCount; + uint32_t tickstart; + +#if defined (__GNUC__) + __IO uint16_t *ptxdr_16bits = (__IO uint16_t *)(&(hi2s->Instance->TXDR)); + __IO uint16_t *prxdr_16bits = (__IO uint16_t *)(&(hi2s->Instance->RXDR)); +#endif /* __GNUC__ */ + + if (hi2s->State != HAL_I2S_STATE_READY) + { + __HAL_UNLOCK(hi2s); + return HAL_BUSY; + } + + if ((pTxData == NULL) || (pRxData == NULL) || (Size == 0U)) + { + return HAL_ERROR; + } + + /* Process Locked */ + __HAL_LOCK(hi2s); + + /* Init tickstart for timeout management*/ + tickstart = HAL_GetTick(); + + hi2s->TxXferSize = Size; + hi2s->TxXferCount = Size; + hi2s->pTxBuffPtr = pTxData; + hi2s->RxXferSize = Size; + hi2s->RxXferCount = Size; + hi2s->pRxBuffPtr = pRxData; + + tmp_TxXferCount = hi2s->TxXferCount; + tmp_RxXferCount = hi2s->RxXferCount; + + /* Set state and reset error code */ + hi2s->ErrorCode = HAL_I2S_ERROR_NONE; + hi2s->State = HAL_I2S_STATE_BUSY_TX_RX; + + /* Check if the I2S is already enabled */ + if ((hi2s->Instance->CR1 & SPI_CR1_SPE) != SPI_CR1_SPE) + { + /* Enable I2S peripheral */ + __HAL_I2S_ENABLE(hi2s); + } + + /* Start the transfer */ + SET_BIT(hi2s->Instance->CR1, SPI_CR1_CSTART); + + while ((tmp_TxXferCount > 0UL) || (tmp_RxXferCount > 0UL)) + { + if ((__HAL_I2S_GET_FLAG(hi2s, I2S_FLAG_TXP) == SET) && (tmp_TxXferCount != 0UL)) + { + if ((hi2s->Init.DataFormat == I2S_DATAFORMAT_24B) || (hi2s->Init.DataFormat == I2S_DATAFORMAT_32B)) + { + /* Transmit data in 32 Bit mode */ + hi2s->Instance->TXDR = *((uint32_t *)hi2s->pTxBuffPtr); + hi2s->pTxBuffPtr += 2; + tmp_TxXferCount--; + } + else + { + /* Transmit data in 16 Bit mode */ +#if defined (__GNUC__) + *ptxdr_16bits = *((uint16_t *)hi2s->pTxBuffPtr); +#else + *((__IO uint16_t *)&hi2s->Instance->TXDR) = *((uint16_t *)hi2s->pTxBuffPtr); +#endif /* __GNUC__ */ + + hi2s->pTxBuffPtr++; + tmp_TxXferCount--; + } + + /* Check if an underrun occurs */ + if (__HAL_I2S_GET_FLAG(hi2s, I2S_FLAG_UDR) == SET) + { + /* Clear underrun flag */ + __HAL_I2S_CLEAR_UDRFLAG(hi2s); + + /* Set the error code */ + SET_BIT(hi2s->ErrorCode, HAL_I2S_ERROR_UDR); + } + } + + if ((__HAL_I2S_GET_FLAG(hi2s, I2S_FLAG_RXP) == SET) && (tmp_RxXferCount != 0UL)) + { + if ((hi2s->Init.DataFormat == I2S_DATAFORMAT_24B) || (hi2s->Init.DataFormat == I2S_DATAFORMAT_32B)) + { + /* Receive data in 32 Bit mode */ + *((uint32_t *)hi2s->pRxBuffPtr) = hi2s->Instance->RXDR; + hi2s->pRxBuffPtr += 2; + tmp_RxXferCount--; + } + else + { + /* Receive data in 16 Bit mode */ +#if defined (__GNUC__) + *((uint16_t *)hi2s->pRxBuffPtr) = *prxdr_16bits; +#else + *((uint16_t *)hi2s->pRxBuffPtr) = *((__IO uint16_t *)&hi2s->Instance->RXDR); +#endif /* __GNUC__ */ + hi2s->pRxBuffPtr++; + tmp_RxXferCount--; + } + + /* Check if an overrun occurs */ + if (__HAL_I2S_GET_FLAG(hi2s, I2S_FLAG_OVR) == SET) + { + /* Clear overrun flag */ + __HAL_I2S_CLEAR_OVRFLAG(hi2s); + + /* Set the error code */ + SET_BIT(hi2s->ErrorCode, HAL_I2S_ERROR_OVR); + } + } + + /* Timeout management */ + if ((((HAL_GetTick() - tickstart) >= Timeout) && (Timeout != HAL_MAX_DELAY)) || (Timeout == 0U)) + { + /* Set the error code */ + SET_BIT(hi2s->ErrorCode, HAL_I2S_ERROR_TIMEOUT); + hi2s->State = HAL_I2S_STATE_READY; + __HAL_UNLOCK(hi2s); + return HAL_ERROR; + } + } + + hi2s->State = HAL_I2S_STATE_READY; + __HAL_UNLOCK(hi2s); + return HAL_OK; +} + /** * @brief Transmit an amount of data in non-blocking mode with Interrupt * @param hi2s pointer to a I2S_HandleTypeDef structure that contains @@ -1117,7 +1297,7 @@ HAL_StatusTypeDef HAL_I2S_Receive_IT(I2S_HandleTypeDef *hi2s, uint16_t *pData, u /* Enable I2S peripheral */ __HAL_I2S_ENABLE(hi2s); } - /* Enable RXNE and ERR interrupt */ + /* Enable RXP and ERR interrupt */ __HAL_I2S_ENABLE_IT(hi2s, (I2S_IT_RXP | I2S_IT_OVR)); /* Enable TIFRE interrupt if the mode is Slave */ @@ -1133,6 +1313,86 @@ HAL_StatusTypeDef HAL_I2S_Receive_IT(I2S_HandleTypeDef *hi2s, uint16_t *pData, u return HAL_OK; } +/** + * @brief Full-Duplex Transmit/Receive data in non-blocking mode using Interrupt + * @param hi2s pointer to a I2S_HandleTypeDef structure that contains + * the configuration information for I2S module + * @param pTxData a 16-bit pointer to the Transmit data buffer. + * @param pRxData a 16-bit pointer to the Receive data buffer. + * @param Size number of data sample to be sent: + * @note When a 16-bit data frame or a 16-bit data frame extended is selected during the I2S + * configuration phase, the Size parameter means the number of 16-bit data length + * in the transaction and when a 24-bit data frame or a 32-bit data frame is selected + * the Size parameter means the number of 16-bit data length. + * @note The I2S is kept enabled at the end of transaction to avoid the clock de-synchronization + * between Master and Slave(example: audio streaming). + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2SEx_TransmitReceive_IT(I2S_HandleTypeDef *hi2s, uint16_t *pTxData, uint16_t *pRxData, + uint16_t Size) +{ + if (hi2s->State != HAL_I2S_STATE_READY) + { + __HAL_UNLOCK(hi2s); + return HAL_BUSY; + } + + if ((pTxData == NULL) || (pRxData == NULL) || (Size == 0U)) + { + return HAL_ERROR; + } + + /* Process Locked */ + __HAL_LOCK(hi2s); + + hi2s->pTxBuffPtr = pTxData; + hi2s->pRxBuffPtr = pRxData; + + hi2s->TxXferSize = Size; + hi2s->TxXferCount = Size; + hi2s->RxXferSize = Size; + hi2s->RxXferCount = Size; + + hi2s->ErrorCode = HAL_I2S_ERROR_NONE; + hi2s->State = HAL_I2S_STATE_BUSY_TX_RX; + + + /* Set the function for IT treatment */ + if ((hi2s->Init.DataFormat == I2S_DATAFORMAT_24B) || (hi2s->Init.DataFormat == I2S_DATAFORMAT_32B)) + { + hi2s->TxISR = I2S_Transmit_32Bit_IT; + hi2s->RxISR = I2S_Receive_32Bit_IT; + } + else + { + hi2s->TxISR = I2S_Transmit_16Bit_IT; + hi2s->RxISR = I2S_Receive_16Bit_IT; + } + + /* Check if the I2S is already enabled */ + if ((hi2s->Instance->CR1 & SPI_CR1_SPE) != SPI_CR1_SPE) + { + /* Enable I2S peripheral */ + __HAL_I2S_ENABLE(hi2s); + } + + /* Enable TXP, RXP, DXP, UDR, OVR interrupts */ + __HAL_I2S_ENABLE_IT(hi2s, (I2S_IT_TXP | I2S_IT_RXP | I2S_IT_DXP | I2S_IT_UDR | I2S_IT_OVR)); + + /* Enable TIFRE interrupt if the mode is Slave */ + if (hi2s->Init.Mode == I2S_MODE_SLAVE_FULLDUPLEX) + { + __HAL_I2S_ENABLE_IT(hi2s, I2S_IT_FRE); + } + + /* Start the transfer */ + SET_BIT(hi2s->Instance->CR1, SPI_CR1_CSTART); + + __HAL_UNLOCK(hi2s); + return HAL_OK; + +} + /** * @brief Transmit an amount of data in non-blocking mode with DMA * @param hi2s pointer to a I2S_HandleTypeDef structure that contains @@ -1187,7 +1447,7 @@ HAL_StatusTypeDef HAL_I2S_Transmit_DMA(I2S_HandleTypeDef *hi2s, uint16_t *pData, /* Enable the Tx DMA Stream/Channel */ if (HAL_OK != HAL_DMA_Start_IT(hi2s->hdmatx, (uint32_t)hi2s->pTxBuffPtr, (uint32_t)&hi2s->Instance->TXDR, hi2s->TxXferSize)) { - /* Update SPI error code */ + /* Update I2S error code */ SET_BIT(hi2s->ErrorCode, HAL_I2S_ERROR_DMA); hi2s->State = HAL_I2S_STATE_READY; @@ -1234,7 +1494,7 @@ HAL_StatusTypeDef HAL_I2S_Receive_DMA(I2S_HandleTypeDef *hi2s, uint16_t *pData, { if ((pData == NULL) || (Size == 0UL)) { - return HAL_ERROR; + return HAL_ERROR; } /* Process Locked */ @@ -1271,7 +1531,112 @@ HAL_StatusTypeDef HAL_I2S_Receive_DMA(I2S_HandleTypeDef *hi2s, uint16_t *pData, /* Enable the Rx DMA Stream/Channel */ if (HAL_OK != HAL_DMA_Start_IT(hi2s->hdmarx, (uint32_t)&hi2s->Instance->RXDR, (uint32_t)hi2s->pRxBuffPtr, hi2s->RxXferSize)) { - /* Update SPI error code */ + /* Update I2S error code */ + SET_BIT(hi2s->ErrorCode, HAL_I2S_ERROR_DMA); + hi2s->State = HAL_I2S_STATE_READY; + + __HAL_UNLOCK(hi2s); + return HAL_ERROR; + } + + /* Check if the I2S Rx request is already enabled */ + if (HAL_IS_BIT_CLR(hi2s->Instance->CFG1, SPI_CFG1_RXDMAEN)) + { + /* Enable Rx DMA Request */ + SET_BIT(hi2s->Instance->CFG1, SPI_CFG1_RXDMAEN); + } + + /* Check if the I2S is already enabled */ + if (HAL_IS_BIT_CLR(hi2s->Instance->CR1, SPI_CR1_SPE)) + { + /* Enable I2S peripheral */ + __HAL_I2S_ENABLE(hi2s); + } + + /* Start the transfer */ + SET_BIT(hi2s->Instance->CR1, SPI_CR1_CSTART); + + __HAL_UNLOCK(hi2s); + return HAL_OK; +} + +/** + * @brief Full-Duplex Transmit/Receive data in non-blocking mode using DMA + * @param hi2s pointer to a I2S_HandleTypeDef structure that contains + * the configuration information for I2S module + * @param pTxData a 16-bit pointer to the Transmit data buffer. + * @param pRxData a 16-bit pointer to the Receive data buffer. + * @param Size number of data sample to be sent: + * @note When a 16-bit data frame or a 16-bit data frame extended is selected during the I2S + * configuration phase, the Size parameter means the number of 16-bit data length + * in the transaction and when a 24-bit data frame or a 32-bit data frame is selected + * the Size parameter means the number of 16-bit data length. + * @note The I2S is kept enabled at the end of transaction to avoid the clock de-synchronization + * between Master and Slave(example: audio streaming). + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2SEx_TransmitReceive_DMA(I2S_HandleTypeDef *hi2s, uint16_t *pTxData, uint16_t *pRxData, + uint16_t Size) +{ + if (hi2s->State != HAL_I2S_STATE_READY) + { + __HAL_UNLOCK(hi2s); + return HAL_BUSY; + } + + if ((pTxData == NULL) || (pRxData == NULL) || (Size == 0U)) + { + return HAL_ERROR; + } + + /* Process Locked */ + __HAL_LOCK(hi2s); + + hi2s->pTxBuffPtr = pTxData; + hi2s->pRxBuffPtr = pRxData; + + hi2s->TxXferSize = Size; + hi2s->TxXferCount = Size; + hi2s->RxXferSize = Size; + hi2s->RxXferCount = Size; + + hi2s->ErrorCode = HAL_I2S_ERROR_NONE; + hi2s->State = HAL_I2S_STATE_BUSY_TX_RX; + + /* Reset the Tx/Rx DMA bits */ + CLEAR_BIT(hi2s->Instance->CFG1, SPI_CFG1_TXDMAEN | SPI_CFG1_RXDMAEN); + + /* Set the I2S Rx DMA Half transfer complete callback */ + hi2s->hdmarx->XferHalfCpltCallback = I2SEx_DMATxRxHalfCplt; + + /* Set the I2S Rx DMA transfer complete callback */ + hi2s->hdmarx->XferCpltCallback = I2SEx_DMATxRxCplt; + + /* Set the I2S Rx DMA error callback */ + hi2s->hdmarx->XferErrorCallback = I2S_DMAError; + + /* Enable the Tx DMA Stream/Channel */ + if (HAL_OK != HAL_DMA_Start_IT(hi2s->hdmatx, (uint32_t)hi2s->pTxBuffPtr, (uint32_t)&hi2s->Instance->TXDR, hi2s->TxXferSize)) + { + /* Update I2S error code */ + SET_BIT(hi2s->ErrorCode, HAL_I2S_ERROR_DMA); + hi2s->State = HAL_I2S_STATE_READY; + + __HAL_UNLOCK(hi2s); + return HAL_ERROR; + } + + /* Check if the I2S Tx request is already enabled */ + if (HAL_IS_BIT_CLR(hi2s->Instance->CFG1, SPI_CFG1_TXDMAEN)) + { + /* Enable Tx DMA Request */ + SET_BIT(hi2s->Instance->CFG1, SPI_CFG1_TXDMAEN); + } + + /* Enable the Rx DMA Stream/Channel */ + if (HAL_OK != HAL_DMA_Start_IT(hi2s->hdmarx, (uint32_t)&hi2s->Instance->RXDR, (uint32_t)hi2s->pRxBuffPtr, hi2s->RxXferSize)) + { + /* Update I2S error code */ SET_BIT(hi2s->ErrorCode, HAL_I2S_ERROR_DMA); hi2s->State = HAL_I2S_STATE_READY; @@ -1310,13 +1675,13 @@ HAL_StatusTypeDef HAL_I2S_DMAPause(I2S_HandleTypeDef *hi2s) { /* Process Locked */ __HAL_LOCK(hi2s); - + uint32_t tickstart; /* Get tick */ tickstart = HAL_GetTick(); - - + + /* Check if the I2S peripheral is in master mode */ if (IS_I2S_MASTER(hi2s->Init.Mode)) { @@ -1330,7 +1695,7 @@ HAL_StatusTypeDef HAL_I2S_DMAPause(I2S_HandleTypeDef *hi2s) __HAL_UNLOCK(hi2s); return HAL_ERROR; } - + SET_BIT(hi2s->Instance->CR1, SPI_CR1_CSUSP); while (HAL_IS_BIT_SET(hi2s->Instance->CR1, SPI_CR1_CSTART) != 0UL) @@ -1339,35 +1704,35 @@ HAL_StatusTypeDef HAL_I2S_DMAPause(I2S_HandleTypeDef *hi2s) { /* Set the I2S State ready */ hi2s->State = HAL_I2S_STATE_READY; - + /* Process Unlocked */ __HAL_UNLOCK(hi2s); - + SET_BIT(hi2s->ErrorCode, HAL_I2S_ERROR_TIMEOUT); hi2s->State = HAL_I2S_STATE_READY; return HAL_TIMEOUT; } } - + /* Disable I2S peripheral */ __HAL_I2S_DISABLE(hi2s); - + hi2s->State = HAL_I2S_STATE_READY; - + /* Process Unlocked */ __HAL_UNLOCK(hi2s); return HAL_OK; } - else + else { /* Set error code to not supported */ SET_BIT(hi2s->ErrorCode, HAL_I2S_ERROR_NOT_SUPPORTED); hi2s->State = HAL_I2S_STATE_READY; - + /* Process Unlocked */ __HAL_UNLOCK(hi2s); - + return HAL_ERROR; } } @@ -1390,14 +1755,14 @@ HAL_StatusTypeDef HAL_I2S_DMAResume(I2S_HandleTypeDef *hi2s) __HAL_UNLOCK(hi2s); return HAL_ERROR; } - + /* Set state and reset error code */ hi2s->State = HAL_I2S_STATE_BUSY; hi2s->ErrorCode = HAL_I2S_ERROR_NONE; - + /* Enable I2S peripheral */ __HAL_I2S_ENABLE(hi2s); - + /* Start the transfer */ SET_BIT(hi2s->Instance->CR1, SPI_CR1_CSTART); @@ -1417,7 +1782,7 @@ HAL_StatusTypeDef HAL_I2S_DMAStop(I2S_HandleTypeDef *hi2s) { HAL_StatusTypeDef errorcode = HAL_OK; /* The Lock is not implemented on this API to allow the user application - to call the HAL SPI API under callbacks HAL_I2S_TxCpltCallback() or HAL_I2S_RxCpltCallback() + to call the HAL I2S API under callbacks HAL_I2S_TxCpltCallback() or HAL_I2S_RxCpltCallback() when calling HAL_DMA_Abort() API the DMA TX or RX Transfer complete interrupt is generated and the correspond call back is executed HAL_I2S_TxCpltCallback() or HAL_I2S_RxCpltCallback() */ @@ -1464,67 +1829,136 @@ HAL_StatusTypeDef HAL_I2S_DMAStop(I2S_HandleTypeDef *hi2s) */ void HAL_I2S_IRQHandler(I2S_HandleTypeDef *hi2s) { - uint32_t itsource = hi2s->Instance->IER; - uint32_t itflag = hi2s->Instance->SR; - uint32_t trigger = itsource & itflag; + uint32_t i2sier = hi2s->Instance->IER; + uint32_t i2ssr = hi2s->Instance->SR; + uint32_t trigger = i2sier & i2ssr; - /* I2S in mode Receiver ------------------------------------------------*/ - if ((I2S_CHECK_FLAG(itflag, I2S_FLAG_OVR) == RESET) && HAL_IS_BIT_SET(trigger, I2S_FLAG_RXP)) + if (hi2s->State == HAL_I2S_STATE_BUSY_RX) { - hi2s->RxISR(hi2s); - } + /* I2S in mode Receiver ------------------------------------------------*/ + if (HAL_IS_BIT_SET(trigger, I2S_FLAG_RXP) && HAL_IS_BIT_CLR(trigger, I2S_FLAG_OVR)) + { + hi2s->RxISR(hi2s); + } - /* I2S in mode Transmitter -----------------------------------------------*/ - if ((I2S_CHECK_FLAG(itflag, I2S_FLAG_UDR) == RESET) && HAL_IS_BIT_SET(trigger, I2S_FLAG_TXP)) - { - hi2s->TxISR(hi2s); - } - - /* I2S interrupt error ----------------------------------------------------*/ - if ((trigger & (I2S_FLAG_OVR| I2S_FLAG_UDR | I2S_FLAG_FRE)) != 0UL) - { - /* I2S Overrun error interrupt occurred ---------------------------------*/ - if (I2S_CHECK_FLAG(itflag, I2S_FLAG_OVR) != RESET) + /* I2S Overrun error interrupt occurred -------------------------------------*/ + if (HAL_IS_BIT_SET(trigger, I2S_FLAG_OVR)) { /* Disable RXP and ERR interrupt */ __HAL_I2S_DISABLE_IT(hi2s, (I2S_IT_RXP | I2S_IT_ERR)); + /* Clear Overrun flag */ + __HAL_I2S_CLEAR_OVRFLAG(hi2s); + + /* Set the I2S State ready */ + hi2s->State = HAL_I2S_STATE_READY; + + /* Set the error code and execute error callback*/ SET_BIT(hi2s->ErrorCode, HAL_I2S_ERROR_OVR); - __HAL_I2S_CLEAR_OVRFLAG(hi2s); + /* Call user error callback */ +#if (USE_HAL_I2S_REGISTER_CALLBACKS == 1UL) + hi2s->ErrorCallback(hi2s); +#else + HAL_I2S_ErrorCallback(hi2s); +#endif /* USE_HAL_I2S_REGISTER_CALLBACKS */ + } + } + + if (hi2s->State == HAL_I2S_STATE_BUSY_TX) + { + /* I2S in mode Transmitter -----------------------------------------------*/ + if (HAL_IS_BIT_SET(trigger, I2S_FLAG_TXP) && HAL_IS_BIT_CLR(trigger, I2S_FLAG_UDR)) + { + hi2s->TxISR(hi2s); } /* I2S Underrun error interrupt occurred --------------------------------*/ - if (I2S_CHECK_FLAG(itflag, I2S_FLAG_UDR) != RESET) + if (HAL_IS_BIT_SET(trigger, I2S_FLAG_UDR)) { /* Disable TXP and ERR interrupt */ __HAL_I2S_DISABLE_IT(hi2s, (I2S_IT_TXP | I2S_IT_ERR)); + /* Clear Underrun flag */ + __HAL_I2S_CLEAR_UDRFLAG(hi2s); + + /* Set the I2S State ready */ + hi2s->State = HAL_I2S_STATE_READY; + /* Set the error code and execute error callback*/ SET_BIT(hi2s->ErrorCode, HAL_I2S_ERROR_UDR); - __HAL_I2S_CLEAR_UDRFLAG(hi2s); + /* Call user error callback */ +#if (USE_HAL_I2S_REGISTER_CALLBACKS == 1UL) + hi2s->ErrorCallback(hi2s); +#else + HAL_I2S_ErrorCallback(hi2s); +#endif /* USE_HAL_I2S_REGISTER_CALLBACKS */ + } + } + if (hi2s->State == HAL_I2S_STATE_BUSY_TX_RX) + { + /* I2S in mode Transmitter -----------------------------------------------*/ + if (HAL_IS_BIT_SET(trigger, I2S_FLAG_DXP)) + { + hi2s->TxISR(hi2s); + hi2s->RxISR(hi2s); + } + /* I2S in mode Receiver ------------------------------------------------*/ + if (HAL_IS_BIT_SET(trigger, I2S_FLAG_RXP) && HAL_IS_BIT_CLR(trigger, I2S_FLAG_DXP)) + { + hi2s->RxISR(hi2s); + } + /* I2S in mode Transmitter -----------------------------------------------*/ + if (HAL_IS_BIT_SET(trigger, I2S_FLAG_TXP) && HAL_IS_BIT_CLR(trigger, I2S_FLAG_DXP)) + { + hi2s->TxISR(hi2s); } - /* I2S Frame error interrupt occurred -----------------------------------*/ - if (I2S_CHECK_FLAG(itflag, I2S_FLAG_FRE) != RESET) + /* I2S Underrun error interrupt occurred --------------------------------*/ + if (HAL_IS_BIT_SET(trigger, I2S_FLAG_UDR)) { - /* Disable FRE and ERR interrupt */ - __HAL_I2S_DISABLE_IT(hi2s, (I2S_IT_FRE | I2S_IT_ERR)); + /* Disable TXP and ERR interrupt */ + __HAL_I2S_DISABLE_IT(hi2s, (I2S_IT_TXP | I2S_IT_ERR)); + + /* Clear Underrun flag */ + __HAL_I2S_CLEAR_UDRFLAG(hi2s); + + /* Set the I2S State ready */ + hi2s->State = HAL_I2S_STATE_READY; /* Set the error code and execute error callback*/ - SET_BIT(hi2s->ErrorCode, HAL_I2S_ERROR_FRE); - __HAL_I2S_CLEAR_FREFLAG(hi2s); + SET_BIT(hi2s->ErrorCode, HAL_I2S_ERROR_UDR); + /* Call user error callback */ +#if (USE_HAL_I2S_REGISTER_CALLBACKS == 1UL) + hi2s->ErrorCallback(hi2s); +#else + HAL_I2S_ErrorCallback(hi2s); +#endif /* USE_HAL_I2S_REGISTER_CALLBACKS */ } - /* Set the I2S State ready */ - hi2s->State = HAL_I2S_STATE_READY; + /* I2S Overrun error interrupt occurred -------------------------------------*/ + if (HAL_IS_BIT_SET(trigger, I2S_FLAG_OVR)) + { + /* Disable RXP and ERR interrupt */ + __HAL_I2S_DISABLE_IT(hi2s, (I2S_IT_RXP | I2S_IT_ERR)); - /* Call user error callback */ + /* Clear Overrun flag */ + __HAL_I2S_CLEAR_OVRFLAG(hi2s); + + /* Set the I2S State ready */ + hi2s->State = HAL_I2S_STATE_READY; + + + /* Set the error code and execute error callback*/ + SET_BIT(hi2s->ErrorCode, HAL_I2S_ERROR_OVR); + + /* Call user error callback */ #if (USE_HAL_I2S_REGISTER_CALLBACKS == 1UL) - hi2s->ErrorCallback(hi2s); + hi2s->ErrorCallback(hi2s); #else - HAL_I2S_ErrorCallback(hi2s); + HAL_I2S_ErrorCallback(hi2s); #endif /* USE_HAL_I2S_REGISTER_CALLBACKS */ + } } } @@ -1592,6 +2026,38 @@ __weak void HAL_I2S_RxCpltCallback(I2S_HandleTypeDef *hi2s) */ } +/** + * @brief Rx Transfer half completed callbacks + * @param hi2s pointer to a I2S_HandleTypeDef structure that contains + * the configuration information for I2S module + * @retval None + */ +__weak void HAL_I2SEx_TxRxHalfCpltCallback(I2S_HandleTypeDef *hi2s) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hi2s); + + /* NOTE : This function Should not be modified, when the callback is needed, + the HAL_I2S_RxHalfCpltCallback could be implemented in the user file + */ +} + +/** + * @brief Rx Transfer completed callbacks + * @param hi2s pointer to a I2S_HandleTypeDef structure that contains + * the configuration information for I2S module + * @retval None + */ +__weak void HAL_I2SEx_TxRxCpltCallback(I2S_HandleTypeDef *hi2s) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hi2s); + + /* NOTE : This function Should not be modified, when the callback is needed, + the HAL_I2S_RxCpltCallback could be implemented in the user file + */ +} + /** * @brief I2S error callbacks * @param hi2s pointer to a I2S_HandleTypeDef structure that contains @@ -1742,6 +2208,42 @@ static void I2S_DMARxHalfCplt(DMA_HandleTypeDef *hdma) #endif /* USE_HAL_I2S_REGISTER_CALLBACKS */ } +/** + * @brief DMA I2S transmit receive process complete callback + * @param hdma pointer to a DMA_HandleTypeDef structure that contains + * the configuration information for the specified DMA module. + * @retval None + */ +static void I2SEx_DMATxRxCplt(DMA_HandleTypeDef *hdma) +{ + I2S_HandleTypeDef *hi2s = (I2S_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent; + + /* Call user TxRx complete callback */ +#if (USE_HAL_I2S_REGISTER_CALLBACKS == 1U) + hi2s->TxRxCpltCallback(hi2s); +#else + HAL_I2SEx_TxRxCpltCallback(hi2s); +#endif /* USE_HAL_I2S_REGISTER_CALLBACKS */ +} + +/** + * @brief DMA I2S transmit receive process half complete callback + * @param hdma pointer to a DMA_HandleTypeDef structure that contains + * the configuration information for the specified DMA module. + * @retval None + */ +static void I2SEx_DMATxRxHalfCplt(DMA_HandleTypeDef *hdma) +{ + I2S_HandleTypeDef *hi2s = (I2S_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent; + + /* Call user TxRx Half complete callback */ +#if (USE_HAL_I2S_REGISTER_CALLBACKS == 1U) + hi2s->TxRxHalfCpltCallback(hi2s); +#else + HAL_I2SEx_TxRxHalfCpltCallback(hi2s); +#endif /* USE_HAL_I2S_REGISTER_CALLBACKS */ +} + /** * @brief DMA I2S communication error callback * @param hdma pointer to a DMA_HandleTypeDef structure that contains @@ -1790,10 +2292,13 @@ static void I2S_Transmit_16Bit_IT(I2S_HandleTypeDef *hi2s) if (hi2s->TxXferCount == 0UL) { - /* Disable TXE and ERR interrupt */ + /* Disable TXP and ERR interrupt */ __HAL_I2S_DISABLE_IT(hi2s, (I2S_IT_TXP | I2S_IT_ERR)); - hi2s->State = HAL_I2S_STATE_READY; + if ((hi2s->Init.Mode == I2S_MODE_SLAVE_TX) ||(hi2s->Init.Mode == I2S_MODE_MASTER_TX)) + { + hi2s->State = HAL_I2S_STATE_READY; + } /* Call user Tx complete callback */ #if (USE_HAL_I2S_REGISTER_CALLBACKS == 1UL) hi2s->TxCpltCallback(hi2s); @@ -1818,10 +2323,13 @@ static void I2S_Transmit_32Bit_IT(I2S_HandleTypeDef *hi2s) if (hi2s->TxXferCount == 0UL) { - /* Disable TXE and ERR interrupt */ + /* Disable TXP and ERR interrupt */ __HAL_I2S_DISABLE_IT(hi2s, (I2S_IT_TXP | I2S_IT_ERR)); - hi2s->State = HAL_I2S_STATE_READY; + if ((hi2s->Init.Mode == I2S_MODE_SLAVE_TX) ||(hi2s->Init.Mode == I2S_MODE_MASTER_TX)) + { + hi2s->State = HAL_I2S_STATE_READY; + } /* Call user Tx complete callback */ #if (USE_HAL_I2S_REGISTER_CALLBACKS == 1UL) hi2s->TxCpltCallback(hi2s); @@ -1852,15 +2360,37 @@ static void I2S_Receive_16Bit_IT(I2S_HandleTypeDef *hi2s) if (hi2s->RxXferCount == 0UL) { - /* Disable RXNE and ERR interrupt */ - __HAL_I2S_DISABLE_IT(hi2s, (I2S_IT_RXP | I2S_IT_ERR)); + if (IS_I2S_FULLDUPLEX(hi2s->Init.Mode)) + { + /* Disable TXP, RXP, DXP, ERR interrupts */ + __HAL_I2S_DISABLE_IT(hi2s, (I2S_IT_TXP | I2S_IT_RXP | I2S_IT_DXP | I2S_IT_ERR)); + } + else + { + /* Disable RXP and ERR interrupt */ + __HAL_I2S_DISABLE_IT(hi2s, (I2S_IT_RXP | I2S_IT_ERR)); + } hi2s->State = HAL_I2S_STATE_READY; /* Call user Rx complete callback */ #if (USE_HAL_I2S_REGISTER_CALLBACKS == 1UL) - hi2s->RxCpltCallback(hi2s); + if (IS_I2S_FULLDUPLEX(hi2s->Init.Mode)) + { + hi2s->TxRxCpltCallback(hi2s); + } + else + { + hi2s->RxCpltCallback(hi2s); + } #else - HAL_I2S_RxCpltCallback(hi2s); + if (IS_I2S_FULLDUPLEX(hi2s->Init.Mode)) + { + HAL_I2SEx_TxRxCpltCallback(hi2s); + } + else + { + HAL_I2S_RxCpltCallback(hi2s); + } #endif /* USE_HAL_I2S_REGISTER_CALLBACKS */ } } @@ -1880,15 +2410,37 @@ static void I2S_Receive_32Bit_IT(I2S_HandleTypeDef *hi2s) if (hi2s->RxXferCount == 0UL) { - /* Disable RXNE and ERR interrupt */ - __HAL_I2S_DISABLE_IT(hi2s, (I2S_IT_RXP | I2S_IT_ERR)); + if (IS_I2S_FULLDUPLEX(hi2s->Init.Mode)) + { + /* Disable TXP, RXP, DXP, ERR interrupts */ + __HAL_I2S_DISABLE_IT(hi2s, (I2S_IT_TXP | I2S_IT_RXP | I2S_IT_DXP | I2S_IT_ERR)); + } + else + { + /* Disable RXP and ERR interrupt */ + __HAL_I2S_DISABLE_IT(hi2s, (I2S_IT_RXP | I2S_IT_ERR)); + } hi2s->State = HAL_I2S_STATE_READY; /* Call user Rx complete callback */ #if (USE_HAL_I2S_REGISTER_CALLBACKS == 1UL) - hi2s->RxCpltCallback(hi2s); + if (IS_I2S_FULLDUPLEX(hi2s->Init.Mode)) + { + hi2s->TxRxCpltCallback(hi2s); + } + else + { + hi2s->RxCpltCallback(hi2s); + } #else - HAL_I2S_RxCpltCallback(hi2s); + if (IS_I2S_FULLDUPLEX(hi2s->Init.Mode)) + { + HAL_I2SEx_TxRxCpltCallback(hi2s); + } + else + { + HAL_I2S_RxCpltCallback(hi2s); + } #endif /* USE_HAL_I2S_REGISTER_CALLBACKS */ } } diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2s_ex.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2s_ex.c index 44ed5f6..bfb5cf6 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2s_ex.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2s_ex.c @@ -5,13 +5,7 @@ * @brief I2S HAL module driver. * This file provides firmware functions to manage the following * functionalities of I2S extension peripheral: - * + Extension features Functions - * - @verbatim - ============================================================================== - ##### I2S Extension features ##### - ============================================================================== - The I2S Full duplex feature is not supported by this HAL Driver + * + Extension features Functions ****************************************************************************** * @attention * @@ -25,4 +19,15 @@ * ****************************************************************************** */ + +/** + ****************************************************************************** + ===== I2S FULL DUPLEX FEATURE ===== + I2S Full Duplex APIs are available in stm32h7xx_hal_i2s.c/.h + ****************************************************************************** + */ + + + + /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_iwdg.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_iwdg.c index 9947bf6..970f2a3 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_iwdg.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_iwdg.c @@ -16,34 +16,44 @@ (+) The IWDG can be started by either software or hardware (configurable through option byte). - (+) The IWDG is clocked by Low-Speed clock (LSI) and thus stays active even - if the main clock fails. + (+) The IWDG is clocked by the Low-Speed Internal clock (LSI) and thus stays + active even if the main clock fails. - (+) Once the IWDG is started, the LSI is forced ON and both can not be + (+) Once the IWDG is started, the LSI is forced ON and both cannot be disabled. The counter starts counting down from the reset value (0xFFF). When it reaches the end of count value (0x000) a reset signal is generated (IWDG reset). (+) Whenever the key value 0x0000 AAAA is written in the IWDG_KR register, - the IWDG_RLR value is reloaded in the counter and the watchdog reset is - prevented. + the IWDG_RLR value is reloaded into the counter and the watchdog reset + is prevented. (+) The IWDG is implemented in the VDD voltage domain that is still functional - in STOP and STANDBY mode (IWDG reset can wake-up from STANDBY). + in STOP and STANDBY mode (IWDG reset can wake up the CPU from STANDBY). IWDGRST flag in RCC_CSR register can be used to inform when an IWDG reset occurs. - (+) Debug mode : When the microcontroller enters debug mode (core halted), + (+) Debug mode: When the microcontroller enters debug mode (core halted), the IWDG counter either continues to work normally or stops, depending on DBG_IWDG_STOP configuration bit in DBG module, accessible through __HAL_DBGMCU_FREEZE_IWDG1() or __HAL_DBGMCU_FREEZE2_IWDG2() and __HAL_DBGMCU_UnFreeze_IWDG1 or __HAL_DBGMCU_UnFreeze2_IWDG2() macros. [..] Min-max timeout value @32KHz (LSI): ~125us / ~32.7s - The IWDG timeout may vary due to LSI frequency dispersion. STM32H7xx - devices provide the capability to measure the LSI frequency (LSI clock - connected internally to TIM16 CH1 input capture). The measured value - can be used to have an IWDG timeout with an acceptable accuracy. + The IWDG timeout may vary due to LSI clock frequency dispersion. + STM32H7xx devices provide the capability to measure the LSI clock + frequency (LSI clock is internally connected to TIM16 CH1 input capture). + The measured value can be used to have an IWDG timeout with an + acceptable accuracy. + + [..] Default timeout value (necessary for IWDG_SR status register update): + Constant LSI_VALUE is defined based on the nominal LSI clock frequency. + This frequency being subject to variations as mentioned above, the + default timeout value (defined through constant HAL_IWDG_DEFAULT_TIMEOUT + below) may become too short or too long. + In such cases, this default timeout value can be tuned by redefining + the constant LSI_VALUE at user-application level (based, for instance, + on the measured LSI clock frequency as explained above). ##### How to use this driver ##### ============================================================================== @@ -109,10 +119,14 @@ /** @defgroup IWDG_Private_Defines IWDG Private Defines * @{ */ -/* Status register need 5 RC LSI divided by prescaler clock to be updated. With - higher prescaler (256), and according to LSI variation, we need to wait at - least 6 cycles so 48 ms. */ -#define HAL_IWDG_DEFAULT_TIMEOUT 48u +/* Status register needs up to 5 LSI clock periods divided by the clock + prescaler to be updated. The number of LSI clock periods is upper-rounded to + 6 for the timeout value calculation. + The timeout value is also calculated using the highest prescaler (256) and + the LSI_VALUE constant. The value of this constant can be changed by the user + to take into account possible LSI clock period variations. + The timeout value is multiplied by 1000 to be converted in milliseconds. */ +#define HAL_IWDG_DEFAULT_TIMEOUT ((6UL * 256UL * 1000UL) / LSI_VALUE) /** * @} */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_jpeg.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_jpeg.c index 80b3431..adc16e3 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_jpeg.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_jpeg.c @@ -223,15 +223,15 @@ * @{ */ +#ifdef HAL_JPEG_MODULE_ENABLED + +#if defined (JPEG) + /** @defgroup JPEG JPEG * @brief JPEG HAL module driver. * @{ */ -#ifdef HAL_JPEG_MODULE_ENABLED - -#if defined (JPEG) - /* Private define ------------------------------------------------------------*/ /** @addtogroup JPEG_Private_Constants * @{ @@ -4186,11 +4186,12 @@ static uint32_t JPEG_GetQuality(JPEG_HandleTypeDef *hjpeg) * @} */ -#endif /* JPEG */ -#endif /* HAL_JPEG_MODULE_ENABLED */ /** * @} */ +#endif /* JPEG */ +#endif /* HAL_JPEG_MODULE_ENABLED */ + /** * @} diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_mmc.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_mmc.c index 6bbb14b..21fe98e 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_mmc.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_mmc.c @@ -387,13 +387,17 @@ HAL_StatusTypeDef HAL_MMC_InitCard(MMC_HandleTypeDef *hmmc) { uint32_t errorstate; MMC_InitTypeDef Init; + uint32_t sdmmc_clk; /* Default SDMMC peripheral configuration for MMC card initialization */ Init.ClockEdge = SDMMC_CLOCK_EDGE_RISING; Init.ClockPowerSave = SDMMC_CLOCK_POWER_SAVE_DISABLE; Init.BusWide = SDMMC_BUS_WIDE_1B; Init.HardwareFlowControl = SDMMC_HARDWARE_FLOW_CONTROL_DISABLE; - Init.ClockDiv = SDMMC_INIT_CLK_DIV; + + /* Init Clock should be less or equal to 400Khz*/ + sdmmc_clk = HAL_RCCEx_GetPeriphCLKFreq(RCC_PERIPHCLK_SDMMC); + Init.ClockDiv = sdmmc_clk/(2U*400000U); /* Initialize SDMMC peripheral interface with default configuration */ (void)SDMMC_Init(hmmc->Instance, Init); @@ -401,6 +405,19 @@ HAL_StatusTypeDef HAL_MMC_InitCard(MMC_HandleTypeDef *hmmc) /* Set Power State to ON */ (void)SDMMC_PowerState_ON(hmmc->Instance); + /* wait 74 Cycles: required power up waiting time before starting + the MMC initialization sequence */ + sdmmc_clk = sdmmc_clk/(2U*Init.ClockDiv); + + if(sdmmc_clk != 0U) + { + HAL_Delay(1U+ (74U*1000U/(sdmmc_clk))); + } + else + { + HAL_Delay(2U); + } + /* Identify card operating voltage */ errorstate = MMC_PowerON(hmmc); if(errorstate != HAL_MMC_ERROR_NONE) @@ -1330,7 +1347,7 @@ HAL_StatusTypeDef HAL_MMC_Erase(MMC_HandleTypeDef *hmmc, uint32_t BlockStartAdd, } /* Send CMD38 ERASE */ - errorstate = SDMMC_CmdErase(hmmc->Instance); + errorstate = SDMMC_CmdErase(hmmc->Instance, 0UL); if(errorstate != HAL_MMC_ERROR_NONE) { /* Clear all the static flags */ @@ -2077,10 +2094,10 @@ HAL_StatusTypeDef HAL_MMC_GetCardInfo(MMC_HandleTypeDef *hmmc, HAL_MMC_CardInfoT */ HAL_StatusTypeDef HAL_MMC_ConfigWideBusOperation(MMC_HandleTypeDef *hmmc, uint32_t WideMode) { - __IO uint32_t count = 0U; + uint32_t count; SDMMC_InitTypeDef Init; uint32_t errorstate; - uint32_t response = 0U, busy = 0U; + uint32_t response = 0U; /* Check the parameters */ assert_param(IS_SDMMC_BUS_WIDE(WideMode)); @@ -2091,102 +2108,79 @@ HAL_StatusTypeDef HAL_MMC_ConfigWideBusOperation(MMC_HandleTypeDef *hmmc, uint32 if(WideMode == SDMMC_BUS_WIDE_8B) { errorstate = SDMMC_CmdSwitch(hmmc->Instance, 0x03B70200U); - if(errorstate != HAL_MMC_ERROR_NONE) - { - hmmc->ErrorCode |= errorstate; - } } else if(WideMode == SDMMC_BUS_WIDE_4B) { errorstate = SDMMC_CmdSwitch(hmmc->Instance, 0x03B70100U); - if(errorstate != HAL_MMC_ERROR_NONE) - { - hmmc->ErrorCode |= errorstate; - } } else if(WideMode == SDMMC_BUS_WIDE_1B) { errorstate = SDMMC_CmdSwitch(hmmc->Instance, 0x03B70000U); - if(errorstate != HAL_MMC_ERROR_NONE) - { - hmmc->ErrorCode |= errorstate; - } } else { /* WideMode is not a valid argument*/ - hmmc->ErrorCode |= HAL_MMC_ERROR_PARAM; + errorstate = HAL_MMC_ERROR_PARAM; } /* Check for switch error and violation of the trial number of sending CMD 13 */ - while(busy == 0U) + if(errorstate == HAL_MMC_ERROR_NONE) { - if(count == SDMMC_MAX_TRIAL) - { - hmmc->State = HAL_MMC_STATE_READY; - hmmc->ErrorCode |= HAL_MMC_ERROR_REQUEST_NOT_APPLICABLE; - return HAL_ERROR; - } - count++; - /* While card is not ready for data and trial number for sending CMD13 is not exceeded */ - errorstate = SDMMC_CmdSendStatus(hmmc->Instance, (uint32_t)(((uint32_t)hmmc->MmcCard.RelCardAdd) << 16U)); - if(errorstate != HAL_MMC_ERROR_NONE) + count = SDMMC_MAX_TRIAL; + do { - hmmc->ErrorCode |= errorstate; - } - - /* Get command response */ - response = SDMMC_GetResponse(hmmc->Instance, SDMMC_RESP1); - - /* Get operating voltage*/ - busy = (((response >> 7U) == 1U) ? 0U : 1U); - } - - /* While card is not ready for data and trial number for sending CMD13 is not exceeded */ - count = SDMMC_DATATIMEOUT; - while((response & 0x00000100U) == 0U) - { - if(count == 0U) + errorstate = SDMMC_CmdSendStatus(hmmc->Instance, (uint32_t)(((uint32_t)hmmc->MmcCard.RelCardAdd) << 16U)); + if(errorstate != HAL_MMC_ERROR_NONE) + { + break; + } + + /* Get command response */ + response = SDMMC_GetResponse(hmmc->Instance, SDMMC_RESP1); + count--; + }while(((response & 0x100U) == 0U) && (count != 0U)); + + /* Check the status after the switch command execution */ + if ((count != 0U) && (errorstate == HAL_MMC_ERROR_NONE)) { - hmmc->State = HAL_MMC_STATE_READY; - hmmc->ErrorCode |= HAL_MMC_ERROR_REQUEST_NOT_APPLICABLE; - return HAL_ERROR; + /* Check the bit SWITCH_ERROR of the device status */ + if ((response & 0x80U) != 0U) + { + errorstate = SDMMC_ERROR_GENERAL_UNKNOWN_ERR; + } + else + { + /* Configure the SDMMC peripheral */ + Init.ClockEdge = hmmc->Init.ClockEdge; + Init.ClockPowerSave = hmmc->Init.ClockPowerSave; + Init.BusWide = WideMode; + Init.HardwareFlowControl = hmmc->Init.HardwareFlowControl; + Init.ClockDiv = hmmc->Init.ClockDiv; + (void)SDMMC_Init(hmmc->Instance, Init); + } } - count--; - - /* While card is not ready for data and trial number for sending CMD13 is not exceeded */ - errorstate = SDMMC_CmdSendStatus(hmmc->Instance, (uint32_t)(((uint32_t)hmmc->MmcCard.RelCardAdd) << 16U)); - if(errorstate != HAL_MMC_ERROR_NONE) + else if (count == 0U) { - hmmc->ErrorCode |= errorstate; + errorstate = SDMMC_ERROR_TIMEOUT; + } + else + { + /* Nothing to do */ } - - /* Get command response */ - response = SDMMC_GetResponse(hmmc->Instance, SDMMC_RESP1); - } - - if(hmmc->ErrorCode != HAL_MMC_ERROR_NONE) - { - /* Clear all the static flags */ - __HAL_MMC_CLEAR_FLAG(hmmc, SDMMC_STATIC_FLAGS); - hmmc->State = HAL_MMC_STATE_READY; - return HAL_ERROR; - } - else - { - /* Configure the SDMMC peripheral */ - Init.ClockEdge = hmmc->Init.ClockEdge; - Init.ClockPowerSave = hmmc->Init.ClockPowerSave; - Init.BusWide = WideMode; - Init.HardwareFlowControl = hmmc->Init.HardwareFlowControl; - Init.ClockDiv = hmmc->Init.ClockDiv; - (void)SDMMC_Init(hmmc->Instance, Init); } /* Change State */ hmmc->State = HAL_MMC_STATE_READY; + if(errorstate != HAL_MMC_ERROR_NONE) + { + /* Clear all the static flags */ + __HAL_MMC_CLEAR_FLAG(hmmc, SDMMC_STATIC_FLAGS); + hmmc->ErrorCode |= errorstate; + return HAL_ERROR; + } + return HAL_OK; } @@ -2448,6 +2442,393 @@ HAL_StatusTypeDef HAL_MMC_Abort_IT(MMC_HandleTypeDef *hmmc) return HAL_OK; } +/** + * @brief Perform specific commands sequence for the different type of erase. + * @note This API should be followed by a check on the card state through + * HAL_MMC_GetCardState(). + * @param hmmc Pointer to MMC handle + * @param EraseType Specifies the type of erase to be performed + * This parameter can be one of the following values: + * @arg HAL_MMC_ERASE Erase the erase groups identified by CMD35 & 36 + * @arg HAL_MMC_TRIM Erase the write blocks identified by CMD35 & 36 + * @arg HAL_MMC_DISCARD Discard the write blocks identified by CMD35 & 36 + * @arg HAL_MMC_SECURE_ERASE Perform a secure purge according SRT on the erase groups identified by CMD35 & 36 + * @arg HAL_MMC_SECURE_TRIM_STEP1 Mark the write blocks identified by CMD35 & 36 for secure erase + * @arg HAL_MMC_SECURE_TRIM_STEP2 Perform a secure purge according SRT on the write blocks previously identified + * @param BlockStartAdd Start Block address + * @param BlockEndAdd End Block address + * @retval HAL status + */ +HAL_StatusTypeDef HAL_MMC_EraseSequence(MMC_HandleTypeDef *hmmc, uint32_t EraseType, uint32_t BlockStartAdd, uint32_t BlockEndAdd) +{ + uint32_t errorstate; + uint32_t start_add = BlockStartAdd; + uint32_t end_add = BlockEndAdd; + uint32_t tickstart = HAL_GetTick(); + + /* Check the erase type value is correct */ + assert_param(IS_MMC_ERASE_TYPE(EraseType)); + + /* Check the coherence between start and end address */ + if(end_add < start_add) + { + hmmc->ErrorCode |= HAL_MMC_ERROR_PARAM; + return HAL_ERROR; + } + + /* Check that the end address is not out of range of device memory */ + if(end_add > (hmmc->MmcCard.LogBlockNbr)) + { + hmmc->ErrorCode |= HAL_MMC_ERROR_ADDR_OUT_OF_RANGE; + return HAL_ERROR; + } + + /* Check if the card command class supports erase command */ + if(((hmmc->MmcCard.Class) & SDMMC_CCCC_ERASE) == 0U) + { + hmmc->ErrorCode |= HAL_MMC_ERROR_REQUEST_NOT_APPLICABLE; + return HAL_ERROR; + } + + /* Check the state of the driver */ + if(hmmc->State == HAL_MMC_STATE_READY) + { + /* Change State */ + hmmc->State = HAL_MMC_STATE_BUSY; + + /* Check that the card is not locked */ + if((SDMMC_GetResponse(hmmc->Instance, SDMMC_RESP1) & SDMMC_CARD_LOCKED) == SDMMC_CARD_LOCKED) + { + hmmc->ErrorCode |= HAL_MMC_ERROR_LOCK_UNLOCK_FAILED; + hmmc->State = HAL_MMC_STATE_READY; + return HAL_ERROR; + } + + /* In case of low capacity card, the address is not block number but bytes */ + if ((hmmc->MmcCard.CardType) != MMC_HIGH_CAPACITY_CARD) + { + start_add *= 512U; + end_add *= 512U; + } + + /* Send CMD35 MMC_ERASE_GRP_START with start address as argument */ + errorstate = SDMMC_CmdEraseStartAdd(hmmc->Instance, start_add); + if(errorstate == HAL_MMC_ERROR_NONE) + { + /* Send CMD36 MMC_ERASE_GRP_END with end address as argument */ + errorstate = SDMMC_CmdEraseEndAdd(hmmc->Instance, end_add); + if(errorstate == HAL_MMC_ERROR_NONE) + { + /* Send CMD38 ERASE with erase type as argument */ + errorstate = SDMMC_CmdErase(hmmc->Instance, EraseType); + if(errorstate == HAL_MMC_ERROR_NONE) + { + if ((EraseType == HAL_MMC_SECURE_ERASE) || (EraseType == HAL_MMC_SECURE_TRIM_STEP2)) + { + /* Wait that the device is ready by checking the D0 line */ + while((!__HAL_MMC_GET_FLAG(hmmc, SDMMC_FLAG_BUSYD0END)) && (errorstate == HAL_MMC_ERROR_NONE)) + { + if((HAL_GetTick()-tickstart) >= SDMMC_MAXERASETIMEOUT) + { + errorstate = HAL_MMC_ERROR_TIMEOUT; + } + } + + /* Clear the flag corresponding to end D0 bus line */ + __HAL_MMC_CLEAR_FLAG(hmmc, SDMMC_FLAG_BUSYD0END); + } + } + } + } + + /* Change State */ + hmmc->State = HAL_MMC_STATE_READY; + + /* Manage errors */ + if(errorstate != HAL_MMC_ERROR_NONE) + { + /* Clear all the static flags */ + __HAL_MMC_CLEAR_FLAG(hmmc, SDMMC_STATIC_FLAGS); + hmmc->ErrorCode |= errorstate; + + if(errorstate != HAL_MMC_ERROR_TIMEOUT) + { + return HAL_ERROR; + } + else + { + return HAL_TIMEOUT; + } + } + else + { + return HAL_OK; + } + } + else + { + return HAL_BUSY; + } +} + +/** + * @brief Perform sanitize operation on the device. + * @note This API should be followed by a check on the card state through + * HAL_MMC_GetCardState(). + * @param hmmc Pointer to MMC handle + * @retval HAL status + */ +HAL_StatusTypeDef HAL_MMC_Sanitize(MMC_HandleTypeDef *hmmc) +{ + uint32_t errorstate, response = 0U, count; + uint32_t tickstart = HAL_GetTick(); + + /* Check the state of the driver */ + if(hmmc->State == HAL_MMC_STATE_READY) + { + /* Change State */ + hmmc->State = HAL_MMC_STATE_BUSY; + + /* Index : 165 - Value : 0x01 */ + errorstate = SDMMC_CmdSwitch(hmmc->Instance, 0x03A50100U); + if(errorstate == HAL_MMC_ERROR_NONE) + { + /* Wait that the device is ready by checking the D0 line */ + while((!__HAL_MMC_GET_FLAG(hmmc, SDMMC_FLAG_BUSYD0END)) && (errorstate == HAL_MMC_ERROR_NONE)) + { + if((HAL_GetTick()-tickstart) >= SDMMC_MAXERASETIMEOUT) + { + errorstate = HAL_MMC_ERROR_TIMEOUT; + } + } + + /* Clear the flag corresponding to end D0 bus line */ + __HAL_MMC_CLEAR_FLAG(hmmc, SDMMC_FLAG_BUSYD0END); + + if(errorstate == HAL_MMC_ERROR_NONE) + { + /* While card is not ready for data and trial number for sending CMD13 is not exceeded */ + count = SDMMC_MAX_TRIAL; + do + { + errorstate = SDMMC_CmdSendStatus(hmmc->Instance, (uint32_t)(((uint32_t)hmmc->MmcCard.RelCardAdd) << 16U)); + if(errorstate != HAL_MMC_ERROR_NONE) + { + break; + } + + /* Get command response */ + response = SDMMC_GetResponse(hmmc->Instance, SDMMC_RESP1); + count--; + }while(((response & 0x100U) == 0U) && (count != 0U)); + + /* Check the status after the switch command execution */ + if ((count != 0U) && (errorstate == HAL_MMC_ERROR_NONE)) + { + /* Check the bit SWITCH_ERROR of the device status */ + if ((response & 0x80U) != 0U) + { + errorstate = SDMMC_ERROR_GENERAL_UNKNOWN_ERR; + } + } + else if (count == 0U) + { + errorstate = SDMMC_ERROR_TIMEOUT; + } + else + { + /* Nothing to do */ + } + } + } + + /* Change State */ + hmmc->State = HAL_MMC_STATE_READY; + + /* Manage errors */ + if(errorstate != HAL_MMC_ERROR_NONE) + { + /* Clear all the static flags */ + __HAL_MMC_CLEAR_FLAG(hmmc, SDMMC_STATIC_FLAGS); + hmmc->ErrorCode |= errorstate; + + if(errorstate != HAL_MMC_ERROR_TIMEOUT) + { + return HAL_ERROR; + } + else + { + return HAL_TIMEOUT; + } + } + else + { + return HAL_OK; + } + } + else + { + return HAL_BUSY; + } +} + +/** + * @brief Configure the Secure Removal Type (SRT) in the Extended CSD register. + * @note This API should be followed by a check on the card state through + * HAL_MMC_GetCardState(). + * @param hmmc Pointer to MMC handle + * @param SRTMode Specifies the type of erase to be performed + * This parameter can be one of the following values: + * @arg HAL_MMC_SRT_ERASE Information removed by an erase + * @arg HAL_MMC_SRT_WRITE_CHAR_ERASE Information removed by an overwriting with a character followed by an erase + * @arg HAL_MMC_SRT_WRITE_CHAR_COMPL_RANDOM Information removed by an overwriting with a character, its complement then a random character + * @arg HAL_MMC_SRT_VENDOR_DEFINED Information removed using a vendor defined + * @retval HAL status + */ +HAL_StatusTypeDef HAL_MMC_ConfigSecRemovalType(MMC_HandleTypeDef *hmmc, uint32_t SRTMode) +{ + uint32_t srt, errorstate, response = 0U, count; + + /* Check the erase type value is correct */ + assert_param(IS_MMC_SRT_TYPE(SRTMode)); + + /* Check the state of the driver */ + if(hmmc->State == HAL_MMC_STATE_READY) + { + /* Get the supported values by the device */ + if(HAL_MMC_GetSupportedSecRemovalType(hmmc, &srt) == HAL_OK) + { + /* Change State */ + hmmc->State = HAL_MMC_STATE_BUSY; + + /* Check the value passed as parameter is supported by the device */ + if((SRTMode & srt) != 0U) + { + /* Index : 16 - Value : SRTMode */ + srt |= ((POSITION_VAL(SRTMode)) << 4U); + errorstate = SDMMC_CmdSwitch(hmmc->Instance, (0x03100000U | (srt << 8U))); + if(errorstate == HAL_MMC_ERROR_NONE) + { + /* While card is not ready for data and trial number for sending CMD13 is not exceeded */ + count = SDMMC_MAX_TRIAL; + do + { + errorstate = SDMMC_CmdSendStatus(hmmc->Instance, (uint32_t)(((uint32_t)hmmc->MmcCard.RelCardAdd) << 16U)); + if(errorstate != HAL_MMC_ERROR_NONE) + { + break; + } + + /* Get command response */ + response = SDMMC_GetResponse(hmmc->Instance, SDMMC_RESP1); + count--; + }while(((response & 0x100U) == 0U) && (count != 0U)); + + /* Check the status after the switch command execution */ + if ((count != 0U) && (errorstate == HAL_MMC_ERROR_NONE)) + { + /* Check the bit SWITCH_ERROR of the device status */ + if ((response & 0x80U) != 0U) + { + errorstate = SDMMC_ERROR_GENERAL_UNKNOWN_ERR; + } + } + else if (count == 0U) + { + errorstate = SDMMC_ERROR_TIMEOUT; + } + else + { + /* Nothing to do */ + } + } + } + else + { + errorstate = SDMMC_ERROR_UNSUPPORTED_FEATURE; + } + + /* Change State */ + hmmc->State = HAL_MMC_STATE_READY; + } + else + { + errorstate = SDMMC_ERROR_GENERAL_UNKNOWN_ERR; + } + + /* Manage errors */ + if(errorstate != HAL_MMC_ERROR_NONE) + { + /* Clear all the static flags */ + __HAL_MMC_CLEAR_FLAG(hmmc, SDMMC_STATIC_FLAGS); + hmmc->ErrorCode |= errorstate; + return HAL_ERROR; + } + else + { + return HAL_OK; + } + } + else + { + return HAL_BUSY; + } +} + +/** + * @brief Gets the supported values of the the Secure Removal Type (SRT). + * @param hmmc pointer to MMC handle + * @param SupportedSRT pointer for supported SRT value + * This parameter is a bit field of the following values: + * @arg HAL_MMC_SRT_ERASE Information removed by an erase + * @arg HAL_MMC_SRT_WRITE_CHAR_ERASE Information removed by an overwriting with a character followed by an erase + * @arg HAL_MMC_SRT_WRITE_CHAR_COMPL_RANDOM Information removed by an overwriting with a character, its complement then a random character + * @arg HAL_MMC_SRT_VENDOR_DEFINED Information removed using a vendor defined + * @retval HAL status + */ +HAL_StatusTypeDef HAL_MMC_GetSupportedSecRemovalType(MMC_HandleTypeDef *hmmc, uint32_t *SupportedSRT) +{ + uint32_t srt = 0U; + uint32_t errorstate = SDMMC_ERROR_NONE; + + /* Check the state of the driver */ + if(hmmc->State == HAL_MMC_STATE_READY) + { + /* Change State */ + hmmc->State = HAL_MMC_STATE_BUSY; + + /* Read the Extended CSD register and get expected value */ + if(MMC_ReadExtCSD(hmmc, &srt, 16, 0x0FFFFFFFU) == HAL_OK) /* Field SECURE_REMOVAL_TYPE [16] */ + { + *SupportedSRT = (srt & 0x0000000FU); /* Bits [3:0] of field 16 */ + } + else + { + errorstate = SDMMC_ERROR_GENERAL_UNKNOWN_ERR; + } + + /* Change State */ + hmmc->State = HAL_MMC_STATE_READY; + + /* Manage errors */ + if(errorstate != HAL_MMC_ERROR_NONE) + { + /* Clear all the static flags */ + __HAL_MMC_CLEAR_FLAG(hmmc, SDMMC_STATIC_FLAGS); + hmmc->ErrorCode |= errorstate; + return HAL_ERROR; + } + else + { + return HAL_OK; + } + } + else + { + return HAL_BUSY; + } +} + /** * @} */ @@ -2814,7 +3195,7 @@ static void MMC_Write_IT(MMC_HandleTypeDef *hmmc) static uint32_t MMC_HighSpeed(MMC_HandleTypeDef *hmmc, FunctionalState state) { uint32_t errorstate = HAL_MMC_ERROR_NONE; - uint32_t response, count; + uint32_t response = 0U, count; SDMMC_InitTypeDef Init; if (((hmmc->Instance->CLKCR & SDMMC_CLKCR_BUSSPEED) != 0U) && (state == DISABLE)) @@ -2831,59 +3212,61 @@ static uint32_t MMC_HighSpeed(MMC_HandleTypeDef *hmmc, FunctionalState state) if(errorstate == HAL_MMC_ERROR_NONE) { - /* Check for switch error */ - errorstate = SDMMC_CmdSendStatus(hmmc->Instance, (uint32_t)(((uint32_t)hmmc->MmcCard.RelCardAdd) << 16U)); - if(errorstate == HAL_MMC_ERROR_NONE) + /* While card is not ready for data and trial number for sending CMD13 is not exceeded */ + count = SDMMC_MAX_TRIAL; + do { + errorstate = SDMMC_CmdSendStatus(hmmc->Instance, (uint32_t)(((uint32_t)hmmc->MmcCard.RelCardAdd) << 16U)); + if(errorstate != HAL_MMC_ERROR_NONE) + { + break; + } + /* Get command response */ response = SDMMC_GetResponse(hmmc->Instance, SDMMC_RESP1); + count--; + }while(((response & 0x100U) == 0U) && (count != 0U)); + + /* Check the status after the switch command execution */ + if ((count != 0U) && (errorstate == HAL_MMC_ERROR_NONE)) + { + /* Check the bit SWITCH_ERROR of the device status */ if ((response & 0x80U) != 0U) { errorstate = SDMMC_ERROR_UNSUPPORTED_FEATURE; } else { - /* While card is not ready for data and trial number for sending CMD13 is not exceeded */ - count = SDMMC_MAX_TRIAL; - while(((response & 0x100U) == 0U) && (count != 0U)) - { - count--; - - errorstate = SDMMC_CmdSendStatus(hmmc->Instance, (uint32_t)(((uint32_t)hmmc->MmcCard.RelCardAdd) << 16U)); - if(errorstate != HAL_MMC_ERROR_NONE) - { - break; - } - - /* Get command response */ - response = SDMMC_GetResponse(hmmc->Instance, SDMMC_RESP1); - } - /* Configure high speed */ - if ((count != 0U) && (errorstate == HAL_MMC_ERROR_NONE)) + Init.ClockEdge = hmmc->Init.ClockEdge; + Init.ClockPowerSave = hmmc->Init.ClockPowerSave; + Init.BusWide = (hmmc->Instance->CLKCR & SDMMC_CLKCR_WIDBUS); + Init.HardwareFlowControl = hmmc->Init.HardwareFlowControl; + + if (state == DISABLE) { - Init.ClockEdge = hmmc->Init.ClockEdge; - Init.ClockPowerSave = hmmc->Init.ClockPowerSave; - Init.BusWide = (hmmc->Instance->CLKCR & SDMMC_CLKCR_WIDBUS); - Init.HardwareFlowControl = hmmc->Init.HardwareFlowControl; + Init.ClockDiv = hmmc->Init.ClockDiv; + (void)SDMMC_Init(hmmc->Instance, Init); - if (state == DISABLE) - { - Init.ClockDiv = hmmc->Init.ClockDiv; - (void)SDMMC_Init(hmmc->Instance, Init); - - CLEAR_BIT(hmmc->Instance->CLKCR, SDMMC_CLKCR_BUSSPEED); - } - else - { - Init.ClockDiv = SDMMC_HSpeed_CLK_DIV; - (void)SDMMC_Init(hmmc->Instance, Init); - - SET_BIT(hmmc->Instance->CLKCR, SDMMC_CLKCR_BUSSPEED); - } + CLEAR_BIT(hmmc->Instance->CLKCR, SDMMC_CLKCR_BUSSPEED); + } + else + { + Init.ClockDiv = SDMMC_HSpeed_CLK_DIV; + (void)SDMMC_Init(hmmc->Instance, Init); + + SET_BIT(hmmc->Instance->CLKCR, SDMMC_CLKCR_BUSSPEED); } } } + else if (count == 0U) + { + errorstate = SDMMC_ERROR_TIMEOUT; + } + else + { + /* Nothing to do */ + } } return errorstate; @@ -2898,7 +3281,7 @@ static uint32_t MMC_HighSpeed(MMC_HandleTypeDef *hmmc, FunctionalState state) static uint32_t MMC_DDR_Mode(MMC_HandleTypeDef *hmmc, FunctionalState state) { uint32_t errorstate = HAL_MMC_ERROR_NONE; - uint32_t response, count; + uint32_t response = 0U, count; if (((hmmc->Instance->CLKCR & SDMMC_CLKCR_DDR) != 0U) && (state == DISABLE)) { @@ -2930,48 +3313,50 @@ static uint32_t MMC_DDR_Mode(MMC_HandleTypeDef *hmmc, FunctionalState state) if(errorstate == HAL_MMC_ERROR_NONE) { - /* Check for switch error */ - errorstate = SDMMC_CmdSendStatus(hmmc->Instance, (uint32_t)(((uint32_t)hmmc->MmcCard.RelCardAdd) << 16U)); - if(errorstate == HAL_MMC_ERROR_NONE) + /* While card is not ready for data and trial number for sending CMD13 is not exceeded */ + count = SDMMC_MAX_TRIAL; + do { + errorstate = SDMMC_CmdSendStatus(hmmc->Instance, (uint32_t)(((uint32_t)hmmc->MmcCard.RelCardAdd) << 16U)); + if(errorstate != HAL_MMC_ERROR_NONE) + { + break; + } + /* Get command response */ response = SDMMC_GetResponse(hmmc->Instance, SDMMC_RESP1); + count--; + }while(((response & 0x100U) == 0U) && (count != 0U)); + + /* Check the status after the switch command execution */ + if ((count != 0U) && (errorstate == HAL_MMC_ERROR_NONE)) + { + /* Check the bit SWITCH_ERROR of the device status */ if ((response & 0x80U) != 0U) { errorstate = SDMMC_ERROR_UNSUPPORTED_FEATURE; } else { - /* While card is not ready for data and trial number for sending CMD13 is not exceeded */ - count = SDMMC_MAX_TRIAL; - while(((response & 0x100U) == 0U) && (count != 0U)) - { - count--; - - errorstate = SDMMC_CmdSendStatus(hmmc->Instance, (uint32_t)(((uint32_t)hmmc->MmcCard.RelCardAdd) << 16U)); - if(errorstate != HAL_MMC_ERROR_NONE) - { - break; - } - - /* Get command response */ - response = SDMMC_GetResponse(hmmc->Instance, SDMMC_RESP1); - } - /* Configure DDR mode */ - if ((count != 0U) && (errorstate == HAL_MMC_ERROR_NONE)) + if (state == DISABLE) { - if (state == DISABLE) - { - CLEAR_BIT(hmmc->Instance->CLKCR, SDMMC_CLKCR_DDR); - } - else - { - SET_BIT(hmmc->Instance->CLKCR, SDMMC_CLKCR_DDR); - } + CLEAR_BIT(hmmc->Instance->CLKCR, SDMMC_CLKCR_DDR); + } + else + { + SET_BIT(hmmc->Instance->CLKCR, SDMMC_CLKCR_DDR); } } } + else if (count == 0U) + { + errorstate = SDMMC_ERROR_TIMEOUT; + } + else + { + /* Nothing to do */ + } } return errorstate; diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_mmc_ex.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_mmc_ex.c index 8b4d18e..b31de3b 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_mmc_ex.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_mmc_ex.c @@ -3,10 +3,10 @@ * @file stm32h7xx_hal_mmc_ex.c * @author MCD Application Team * @brief MMC card Extended HAL module driver. - * This file provides firmware functions to manage the following + * This file provides firmware functions to manage the following * functionalities of the Secure Digital (MMC) peripheral: * + Extended features functions - * + * @verbatim ============================================================================== ##### How to use this driver ##### @@ -16,7 +16,7 @@ (+) Configure Buffer0 and Buffer1 start address and Buffer size using HAL_MMCEx_ConfigDMAMultiBuffer() function. (+) Start Read and Write for multibuffer mode using HAL_MMCEx_ReadBlocksDMAMultiBuffer() and HAL_MMCEx_WriteBlocksDMAMultiBuffer() functions. - + @endverbatim ****************************************************************************** * @attention @@ -30,7 +30,7 @@ * opensource.org/licenses/BSD-3-Clause * ****************************************************************************** - */ + */ /* Includes ------------------------------------------------------------------*/ #include "stm32h7xx_hal.h" @@ -57,17 +57,19 @@ * @{ */ + + /** @addtogroup MMCEx_Exported_Functions_Group1 - * @brief Multibuffer functions + * @brief Multibuffer functions * -@verbatim +@verbatim ============================================================================== ##### Multibuffer functions ##### ============================================================================== - [..] - This section provides functions allowing to configure the multibuffer mode and start read and write + [..] + This section provides functions allowing to configure the multibuffer mode and start read and write multibuffer mode for MMC HAL driver. - + @endverbatim * @{ */ @@ -87,7 +89,7 @@ HAL_StatusTypeDef HAL_MMCEx_ConfigDMAMultiBuffer(MMC_HandleTypeDef *hmmc, uint32 hmmc->Instance->IDMABASE0= (uint32_t) pDataBuffer0 ; hmmc->Instance->IDMABASE1= (uint32_t) pDataBuffer1 ; hmmc->Instance->IDMABSIZE= (uint32_t) (MMC_BLOCKSIZE * BufferSize); - + return HAL_OK; } else @@ -95,12 +97,12 @@ HAL_StatusTypeDef HAL_MMCEx_ConfigDMAMultiBuffer(MMC_HandleTypeDef *hmmc, uint32 return HAL_BUSY; } } - + /** * @brief Reads block(s) from a specified address in a card. The received Data will be stored in Buffer0 and Buffer1. * Buffer0, Buffer1 and BufferSize need to be configured by function HAL_MMCEx_ConfigDMAMultiBuffer before call this function. * @param hmmc: MMC handle - * @param BlockAdd: Block Address from where data is to be read + * @param BlockAdd: Block Address from where data is to be read * @param NumberOfBlocks: Total number of blocks to read * @retval HAL status */ @@ -110,7 +112,7 @@ HAL_StatusTypeDef HAL_MMCEx_ReadBlocksDMAMultiBuffer(MMC_HandleTypeDef *hmmc, ui uint32_t DmaBase0_reg, DmaBase1_reg; uint32_t errorstate; uint32_t add = BlockAdd; - + if(hmmc->State == HAL_MMC_STATE_READY) { if((BlockAdd + NumberOfBlocks) > (hmmc->MmcCard.LogBlockNbr)) @@ -118,18 +120,19 @@ HAL_StatusTypeDef HAL_MMCEx_ReadBlocksDMAMultiBuffer(MMC_HandleTypeDef *hmmc, ui hmmc->ErrorCode |= HAL_MMC_ERROR_ADDR_OUT_OF_RANGE; return HAL_ERROR; } - + DmaBase0_reg = hmmc->Instance->IDMABASE0; DmaBase1_reg = hmmc->Instance->IDMABASE1; + if ((hmmc->Instance->IDMABSIZE == 0U) || (DmaBase0_reg == 0U) || (DmaBase1_reg == 0U)) { hmmc->ErrorCode = HAL_MMC_ERROR_ADDR_OUT_OF_RANGE; return HAL_ERROR; } - + /* Initialize data control register */ hmmc->Instance->DCTRL = 0; - + hmmc->ErrorCode = HAL_MMC_ERROR_NONE; hmmc->State = HAL_MMC_STATE_BUSY; @@ -137,8 +140,8 @@ HAL_StatusTypeDef HAL_MMCEx_ReadBlocksDMAMultiBuffer(MMC_HandleTypeDef *hmmc, ui { add *= 512U; } - - /* Configure the MMC DPSM (Data Path State Machine) */ + + /* Configure the MMC DPSM (Data Path State Machine) */ config.DataTimeOut = SDMMC_DATATIMEOUT; config.DataLength = MMC_BLOCKSIZE * NumberOfBlocks; config.DataBlockSize = SDMMC_DATABLOCK_SIZE_512B; @@ -146,16 +149,16 @@ HAL_StatusTypeDef HAL_MMCEx_ReadBlocksDMAMultiBuffer(MMC_HandleTypeDef *hmmc, ui config.TransferMode = SDMMC_TRANSFER_MODE_BLOCK; config.DPSM = SDMMC_DPSM_DISABLE; (void)SDMMC_ConfigData(hmmc->Instance, &config); - + hmmc->Instance->DCTRL |= SDMMC_DCTRL_FIFORST; - + __SDMMC_CMDTRANS_ENABLE( hmmc->Instance); - - hmmc->Instance->IDMACTRL = SDMMC_ENABLE_IDMA_DOUBLE_BUFF0; + + hmmc->Instance->IDMACTRL = SDMMC_ENABLE_IDMA_DOUBLE_BUFF0; /* Read Blocks in DMA mode */ hmmc->Context = (MMC_CONTEXT_READ_MULTIPLE_BLOCK | MMC_CONTEXT_DMA); - + /* Read Multi Block command */ errorstate = SDMMC_CmdReadMultiBlock(hmmc->Instance, add); if(errorstate != HAL_MMC_ERROR_NONE) @@ -164,7 +167,7 @@ HAL_StatusTypeDef HAL_MMCEx_ReadBlocksDMAMultiBuffer(MMC_HandleTypeDef *hmmc, ui hmmc->ErrorCode |= errorstate; return HAL_ERROR; } - + __HAL_MMC_ENABLE_IT(hmmc, (SDMMC_IT_DCRCFAIL | SDMMC_IT_DTIMEOUT | SDMMC_IT_RXOVERR | SDMMC_IT_DATAEND | SDMMC_FLAG_IDMATE | SDMMC_FLAG_IDMABTC)); return HAL_OK; @@ -173,14 +176,14 @@ HAL_StatusTypeDef HAL_MMCEx_ReadBlocksDMAMultiBuffer(MMC_HandleTypeDef *hmmc, ui { return HAL_BUSY; } - + } /** * @brief Write block(s) to a specified address in a card. The transfered Data are stored in Buffer0 and Buffer1. * Buffer0, Buffer1 and BufferSize need to be configured by function HAL_MMCEx_ConfigDMAMultiBuffer before call this function. * @param hmmc: MMC handle - * @param BlockAdd: Block Address from where data is to be read + * @param BlockAdd: Block Address from where data is to be read * @param NumberOfBlocks: Total number of blocks to read * @retval HAL status */ @@ -190,7 +193,7 @@ HAL_StatusTypeDef HAL_MMCEx_WriteBlocksDMAMultiBuffer(MMC_HandleTypeDef *hmmc, u uint32_t errorstate; uint32_t DmaBase0_reg, DmaBase1_reg; uint32_t add = BlockAdd; - + if(hmmc->State == HAL_MMC_STATE_READY) { if((BlockAdd + NumberOfBlocks) > (hmmc->MmcCard.LogBlockNbr)) @@ -198,28 +201,29 @@ HAL_StatusTypeDef HAL_MMCEx_WriteBlocksDMAMultiBuffer(MMC_HandleTypeDef *hmmc, u hmmc->ErrorCode |= HAL_MMC_ERROR_ADDR_OUT_OF_RANGE; return HAL_ERROR; } - + DmaBase0_reg = hmmc->Instance->IDMABASE0; DmaBase1_reg = hmmc->Instance->IDMABASE1; + if ((hmmc->Instance->IDMABSIZE == 0U) || (DmaBase0_reg == 0U) || (DmaBase1_reg == 0U)) { hmmc->ErrorCode = HAL_MMC_ERROR_ADDR_OUT_OF_RANGE; return HAL_ERROR; } - + /* Initialize data control register */ hmmc->Instance->DCTRL = 0; - + hmmc->ErrorCode = HAL_MMC_ERROR_NONE; - + hmmc->State = HAL_MMC_STATE_BUSY; if ((hmmc->MmcCard.CardType) != MMC_HIGH_CAPACITY_CARD) { add *= 512U; } - - /* Configure the MMC DPSM (Data Path State Machine) */ + + /* Configure the MMC DPSM (Data Path State Machine) */ config.DataTimeOut = SDMMC_DATATIMEOUT; config.DataLength = MMC_BLOCKSIZE * NumberOfBlocks; config.DataBlockSize = SDMMC_DATABLOCK_SIZE_512B; @@ -227,14 +231,14 @@ HAL_StatusTypeDef HAL_MMCEx_WriteBlocksDMAMultiBuffer(MMC_HandleTypeDef *hmmc, u config.TransferMode = SDMMC_TRANSFER_MODE_BLOCK; config.DPSM = SDMMC_DPSM_DISABLE; (void)SDMMC_ConfigData(hmmc->Instance, &config); - + __SDMMC_CMDTRANS_ENABLE( hmmc->Instance); - - hmmc->Instance->IDMACTRL = SDMMC_ENABLE_IDMA_DOUBLE_BUFF0; - + + hmmc->Instance->IDMACTRL = SDMMC_ENABLE_IDMA_DOUBLE_BUFF0; + /* Write Blocks in DMA mode */ hmmc->Context = (MMC_CONTEXT_WRITE_MULTIPLE_BLOCK | MMC_CONTEXT_DMA); - + /* Write Multi Block command */ errorstate = SDMMC_CmdWriteMultiBlock(hmmc->Instance, add); if(errorstate != HAL_MMC_ERROR_NONE) @@ -243,7 +247,7 @@ HAL_StatusTypeDef HAL_MMCEx_WriteBlocksDMAMultiBuffer(MMC_HandleTypeDef *hmmc, u hmmc->ErrorCode |= errorstate; return HAL_ERROR; } - + __HAL_MMC_ENABLE_IT(hmmc, (SDMMC_IT_DCRCFAIL | SDMMC_IT_DTIMEOUT | SDMMC_IT_TXUNDERR | SDMMC_IT_DATAEND | SDMMC_FLAG_IDMATE | SDMMC_FLAG_IDMABTC)); return HAL_OK; @@ -251,18 +255,18 @@ HAL_StatusTypeDef HAL_MMCEx_WriteBlocksDMAMultiBuffer(MMC_HandleTypeDef *hmmc, u else { return HAL_BUSY; - } + } } - + /** * @brief Change the DMA Buffer0 or Buffer1 address on the fly. * @param hmmc: pointer to a MMC_HandleTypeDef structure. - * @param Buffer: the buffer to be changed, This parameter can be one of + * @param Buffer: the buffer to be changed, This parameter can be one of * the following values: MMC_DMA_BUFFER0 or MMC_DMA_BUFFER1 * @param pDataBuffer: The new address * @note The BUFFER0 address can be changed only when the current transfer use - * BUFFER1 and the BUFFER1 address can be changed only when the current + * BUFFER1 and the BUFFER1 address can be changed only when the current * transfer use BUFFER0. * @retval HAL status */ @@ -278,7 +282,7 @@ HAL_StatusTypeDef HAL_MMCEx_ChangeDMABuffer(MMC_HandleTypeDef *hmmc, HAL_MMCEx_D /* change the memory1 address */ hmmc->Instance->IDMABASE1 = (uint32_t)pDataBuffer; } - + return HAL_OK; } diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_otfdec.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_otfdec.c index 1a19404..a54882e 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_otfdec.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_otfdec.c @@ -577,7 +577,7 @@ HAL_StatusTypeDef HAL_OTFDEC_RegionKeyLock(OTFDEC_HandleTypeDef *hotfdec, uint32 * the configuration information for OTFDEC module * @param RegionIndex index of region the keys of which are set * @param pKey pointer at set of keys - * @note The API reads the key CRC computed by the peripheral and compares it with thzt + * @note The API reads the key CRC computed by the peripheral and compares it with that * theoretically expected. An error is reported if they are different. * @retval HAL state */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr.c index 43d9052..94c4acc 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr.c @@ -26,13 +26,12 @@ peripherals. The D2 domain contains peripherals and a CPU (Cortex-M4). The D3 domain contains the system control, I/O logic and low-power peripherals. - (+) STM32H743, STM32H753, STM32H742 and STM32H750 devices have 3 power - domains (D1, D2 and D3). + (+) STM32H72x, STM32H73x, STM32H742, STM32H743, STM32H750 and STM32H753 + devices have 3 power domains (D1, D2 and D3). The domain D1 contains a CPU (Cortex-M7), a Flash memory and some peripherals. The D2 domain contains peripherals. The D3 domains contains the system control, I/O logic and low-power peripherals. - (+) STM32H7AxxQ, STM32H7BxxQ, STM32H7Axxx and STM32H7Bxxx devices have 2 - power domains (CD and SRD). + (+) STM32H7Axxx and STM32H7Bxxx devices have 2 power domains (CD and SRD). The core domain (CD) contains a CPU (Cortex-M7), a Flash memory and peripherals. The SmartRun domain contains the system control, I/O logic and low-power peripherals. @@ -501,6 +500,9 @@ void HAL_PWR_DisablePVD (void) * PWR_WAKEUP_PIN5_HIGH, PWR_WAKEUP_PIN5_LOW, * PWR_WAKEUP_PIN6_HIGH, PWR_WAKEUP_PIN6_LOW. * @note PWR_WAKEUP_PINx and PWR_WAKEUP_PINx_HIGH are equivalent. + * @note The PWR_WAKEUP_PIN3_HIGH, PWR_WAKEUP_PIN3_LOW, PWR_WAKEUP_PIN5_HIGH + * and PWR_WAKEUP_PIN5_LOW are available only for devices that includes + * GPIOI port. * @retval None. */ void HAL_PWR_EnableWakeUpPin (uint32_t WakeUpPinPolarity) @@ -527,6 +529,9 @@ void HAL_PWR_EnableWakeUpPin (uint32_t WakeUpPinPolarity) * PWR_WAKEUP_PIN4_HIGH, PWR_WAKEUP_PIN4_LOW, * PWR_WAKEUP_PIN5_HIGH, PWR_WAKEUP_PIN5_LOW, * PWR_WAKEUP_PIN6_HIGH, PWR_WAKEUP_PIN6_LOW. + * @note The PWR_WAKEUP_PIN3_HIGH, PWR_WAKEUP_PIN3_LOW, PWR_WAKEUP_PIN5_HIGH + * and PWR_WAKEUP_PIN5_LOW are available only for devices that includes + * GPIOI port. * @retval None. */ void HAL_PWR_DisableWakeUpPin (uint32_t WakeUpPinx) @@ -675,6 +680,8 @@ void HAL_PWR_EnterSTOPMode (uint32_t Regulator, uint8_t STOPEntry) * @note The system enters Standby mode only when all domains are in DSTANDBY. * @note When the System exit STANDBY mode by issuing an interrupt or a * wakeup event, the HSI RC oscillator is selected as system clock. + * @note It is recommended to disable all regulators before entring STANDBY + * mode for power consumption saving purpose. * @retval None. */ void HAL_PWR_EnterSTANDBYMode (void) diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr_ex.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr_ex.c index 82288f9..e756454 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr_ex.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr_ex.c @@ -120,7 +120,7 @@ (#) Call HAL_PWREx_GetMMCVoltage() and HAL_PWREx_DisableMonitoring() function to get VDDMMC voltage level. This API is used only for - STM32H7AxxQ, STM32H7BxxQ, STM32H7Axxx and STM32H7Bxxx lines + STM32H7Axxx and STM32H7Bxxx lines (#) Call HAL_PWREx_ConfigAVD() after setting parameter to be configured (event mode and voltage threshold) in order to set up the Analog Voltage @@ -195,9 +195,14 @@ * @{ */ /* Wake-Up Pins EXTI register mask */ +#if defined (EXTI_IMR2_IM57) #define PWR_EXTI_WAKEUP_PINS_MASK (EXTI_IMR2_IM55 | EXTI_IMR2_IM56 |\ EXTI_IMR2_IM57 | EXTI_IMR2_IM58 |\ EXTI_IMR2_IM59 | EXTI_IMR2_IM60) +#else +#define PWR_EXTI_WAKEUP_PINS_MASK (EXTI_IMR2_IM55 | EXTI_IMR2_IM56 |\ + EXTI_IMR2_IM58 | EXTI_IMR2_IM60) +#endif /* defined (EXTI_IMR2_IM57) */ /* Wake-Up Pins PWR Pin Pull shift offsets */ #define PWR_WAKEUP_PINS_PULL_SHIFT_OFFSET (2U) @@ -385,11 +390,6 @@ uint32_t HAL_PWREx_GetSupplyConfig (void) /** * @brief Configure the main internal regulator output voltage. - * @note For STM32H7x3, STM32H7x5, STM32H7x7, STM32H742 and STM32H750 lines, - * configuring Voltage Scale 0 is only possible when Vcore is supplied - * from LDO (Low DropOut). The SYSCFG Clock must be enabled through - * __HAL_RCC_SYSCFG_CLK_ENABLE() macro before configuring Voltage - * Scale 0. * @param VoltageScaling : Specifies the regulator output voltage to achieve * a tradeoff between performance and power * consumption. @@ -402,6 +402,13 @@ uint32_t HAL_PWREx_GetSupplyConfig (void) * range 2 mode. * @arg PWR_REGULATOR_VOLTAGE_SCALE3 : Regulator voltage output * range 3 mode. + * @note For STM32H74x and STM32H75x lines, configuring Voltage Scale 0 is + * only possible when Vcore is supplied from LDO (Low DropOut). The + * SYSCFG Clock must be enabled through __HAL_RCC_SYSCFG_CLK_ENABLE() + * macro before configuring Voltage Scale 0. + * To enter low power mode , and if current regulator voltage is + * Voltage Scale 0 then first switch to Voltage Scale 1 before entering + * low power mode. * @retval HAL Status */ HAL_StatusTypeDef HAL_PWREx_ControlVoltageScaling (uint32_t VoltageScaling) @@ -422,6 +429,7 @@ HAL_StatusTypeDef HAL_PWREx_ControlVoltageScaling (uint32_t VoltageScaling) /* Set the voltage range */ MODIFY_REG (PWR->SRDCR, PWR_SRDCR_VOS, VoltageScaling); #else +#if defined(SYSCFG_PWRCR_ODEN) /* STM32H74xxx and STM32H75xxx lines */ if (VoltageScaling == PWR_REGULATOR_VOLTAGE_SCALE0) { if ((PWR->CR3 & PWR_CR3_LDOEN) == PWR_CR3_LDOEN) @@ -476,6 +484,10 @@ HAL_StatusTypeDef HAL_PWREx_ControlVoltageScaling (uint32_t VoltageScaling) /* Set the voltage range */ MODIFY_REG (PWR->D3CR, PWR_D3CR_VOS, VoltageScaling); } +#else /* STM32H72xxx and STM32H73xxx lines */ + /* Set the voltage range */ + MODIFY_REG(PWR->D3CR, PWR_D3CR_VOS, VoltageScaling); +#endif /* defined (SYSCFG_PWRCR_ODEN) */ #endif /* defined (PWR_SRDCR_VOS) */ /* Get tick */ @@ -619,9 +631,9 @@ uint32_t HAL_PWREx_GetStopModeVoltageRange (void) (+++) PWR_STOPENTRY_WFI : enter STOP mode with WFI instruction (+++) PWR_STOPENTRY_WFE : enter STOP mode with WFE instruction (++) Domain: - (+++) PWR_D1_DOMAIN : Enters D1 domain to DSTOP mode. + (+++) PWR_D1_DOMAIN : Enters D1/CD domain to DSTOP mode. (+++) PWR_D2_DOMAIN : Enters D2 domain to DSTOP mode. - (+++) PWR_D3_DOMAIN : Enters D3 domain to DSTOP mode. + (+++) PWR_D3_DOMAIN : Enters D3/SRD domain to DSTOP mode. (+) Exit: Any EXTI Line (Internal or External) configured in Interrupt/Event mode. @@ -642,9 +654,9 @@ uint32_t HAL_PWREx_GetStopModeVoltageRange (void) The DSTANDBY mode is entered using the HAL_PWREx_EnterSTANDBYMode (Domain) function with: (++) Domain: - (+++) PWR_D1_DOMAIN : Enters D1 domain to DSTANDBY mode. + (+++) PWR_D1_DOMAIN : Enters D1/CD domain to DSTANDBY mode. (+++) PWR_D2_DOMAIN : Enters D2 domain to DSTANDBY mode. - (+++) PWR_D3_DOMAIN : Enters D3 domain to DSTANDBY mode. + (+++) PWR_D3_DOMAIN : Enters D3/SRD domain to DSTANDBY mode. (+) Exit: WKUP pin rising or falling edge, RTC alarm (Alarm A and Alarm B), RTC @@ -855,9 +867,6 @@ void HAL_PWREx_EnterSTOPMode (uint32_t Regulator, uint8_t STOPEntry, uint32_t Do #if defined (PWR_CPUCR_PDDS_D2) else if (Domain == PWR_D2_DOMAIN) { - /* Keep DSTOP mode when D2 domain enters Deepsleep */ - CLEAR_BIT (PWR->CPUCR, PWR_CPUCR_PDDS_D2); - #if defined (DUAL_CORE) /* Check current core */ if (HAL_GetCurrentCPUID () != CM4_CPUID) @@ -869,6 +878,9 @@ void HAL_PWREx_EnterSTOPMode (uint32_t Regulator, uint8_t STOPEntry, uint32_t Do return; } + /* Keep DSTOP mode when D2 domain enters Deepsleep */ + CLEAR_BIT (PWR->CPU2CR, PWR_CPU2CR_PDDS_D2); + /* Set SLEEPDEEP bit of Cortex System Control Register */ SET_BIT (SCB->SCR, SCB_SCR_SLEEPDEEP_Msk); @@ -890,13 +902,30 @@ void HAL_PWREx_EnterSTOPMode (uint32_t Regulator, uint8_t STOPEntry, uint32_t Do /* Clear SLEEPDEEP bit of Cortex-Mx in the System Control Register */ CLEAR_BIT (SCB->SCR, SCB_SCR_SLEEPDEEP_Msk); -#endif /* defined (DUAL_CORE) */ +#else + /* Keep DSTOP mode when D2 domain enters Deepsleep */ + CLEAR_BIT (PWR->CPUCR, PWR_CPUCR_PDDS_D2); +#endif /* defined (DUAL_CORE) */ } #endif /* defined (PWR_CPUCR_PDDS_D2) */ else { +#if defined (DUAL_CORE) + /* Check current core */ + if (HAL_GetCurrentCPUID () == CM7_CPUID) + { + /* Keep DSTOP mode when D3 domain enters Deepsleep */ + CLEAR_BIT (PWR->CPUCR, PWR_CPUCR_PDDS_D3); + } + else + { + /* Keep DSTOP mode when D3 domain enters Deepsleep */ + CLEAR_BIT (PWR->CPU2CR, PWR_CPU2CR_PDDS_D3); + } +#else /* Keep DSTOP mode when D3/SRD domain enters Deepsleep */ CLEAR_BIT (PWR->CPUCR, PWR_CPUCR_PDDS_D3); +#endif /* defined (DUAL_CORE) */ } } @@ -905,6 +934,7 @@ void HAL_PWREx_EnterSTOPMode (uint32_t Regulator, uint8_t STOPEntry, uint32_t Do * @note This API clears the pending event in order to enter a given CPU * to CSLEEP or CSTOP. It should be called just before APIs performing * enter low power mode using Wait For Event request. + * @note Cortex-M7 must be in CRUN mode when calling this API by Cortex-M4. * @retval None. */ void HAL_PWREx_ClearPendingEvent (void) @@ -1029,11 +1059,11 @@ void HAL_PWREx_EnterSTANDBYMode (uint32_t Domain) else { /* Allow DSTANDBY mode when D3/SRD domain enters Deepsleep */ - SET_BIT (PWR-> CPUCR, PWR_CPUCR_PDDS_D3); + SET_BIT (PWR->CPUCR, PWR_CPUCR_PDDS_D3); #if defined (DUAL_CORE) /* Allow DSTANDBY mode when D3/SRD domain enters Deepsleep */ - SET_BIT (PWR-> CPU2CR, PWR_CPU2CR_PDDS_D3); + SET_BIT (PWR->CPU2CR, PWR_CPU2CR_PDDS_D3); #endif /* defined (DUAL_CORE) */ } } @@ -1308,6 +1338,8 @@ void HAL_PWREx_EnableWakeUpPin (PWREx_WakeupPinTypeDef *sPinParams) * @arg PWR_WAKEUP_PIN4 : Disable PC13 wake-up PIN. * @arg PWR_WAKEUP_PIN5 : Disable PI11 wake-up PIN. * @arg PWR_WAKEUP_PIN6 : Disable PC1 wake-up PIN. + * @note The PWR_WAKEUP_PIN3 and PWR_WAKEUP_PIN5 are available only for + * devices that support GPIOI port. * @retval None */ void HAL_PWREx_DisableWakeUpPin (uint32_t WakeUpPin) @@ -1331,6 +1363,8 @@ void HAL_PWREx_DisableWakeUpPin (uint32_t WakeUpPin) * @arg PWR_WAKEUP_FLAG6 : Get wakeup event received from PC1. * @arg PWR_WAKEUP_FLAG_ALL : Get Wakeup event received from all * wake up pins. + * @note The PWR_WAKEUP_FLAG3 and PWR_WAKEUP_FLAG5 are available only for + * devices that support GPIOI port. * @retval The Wake-Up pin flag. */ uint32_t HAL_PWREx_GetWakeupFlag (uint32_t WakeUpFlag) @@ -1354,6 +1388,8 @@ uint32_t HAL_PWREx_GetWakeupFlag (uint32_t WakeUpFlag) * @arg PWR_WAKEUP_FLAG6 : Clear the wakeup event received from PC1. * @arg PWR_WAKEUP_FLAG_ALL : Clear the wakeup events received from * all wake up pins. + * @note The PWR_WAKEUP_FLAG3 and PWR_WAKEUP_FLAG5 are available only for + * devices that support GPIOI port. * @retval HAL status. */ HAL_StatusTypeDef HAL_PWREx_ClearWakeupFlag (uint32_t WakeUpFlag) @@ -1397,6 +1433,7 @@ void HAL_PWREx_WAKEUP_PIN_IRQHandler (void) /* PWR WKUP2 interrupt user callback */ HAL_PWREx_WKUP2_Callback (); } +#if defined (PWR_WKUPFR_WKUPF3) else if (READ_BIT (PWR->WKUPFR, PWR_WKUPFR_WKUPF3) != 0U) { /* Clear PWR WKUPF3 flag */ @@ -1405,6 +1442,7 @@ void HAL_PWREx_WAKEUP_PIN_IRQHandler (void) /* PWR WKUP3 interrupt user callback */ HAL_PWREx_WKUP3_Callback (); } +#endif /* defined (PWR_WKUPFR_WKUPF3) */ else if (READ_BIT (PWR->WKUPFR, PWR_WKUPFR_WKUPF4) != 0U) { /* Clear PWR WKUPF4 flag */ @@ -1413,6 +1451,7 @@ void HAL_PWREx_WAKEUP_PIN_IRQHandler (void) /* PWR WKUP4 interrupt user callback */ HAL_PWREx_WKUP4_Callback (); } +#if defined (PWR_WKUPFR_WKUPF5) else if (READ_BIT (PWR->WKUPFR, PWR_WKUPFR_WKUPF5) != 0U) { /* Clear PWR WKUPF5 flag */ @@ -1421,6 +1460,7 @@ void HAL_PWREx_WAKEUP_PIN_IRQHandler (void) /* PWR WKUP5 interrupt user callback */ HAL_PWREx_WKUP5_Callback (); } +#endif /* defined (PWR_WKUPFR_WKUPF5) */ else { /* Clear PWR WKUPF6 flag */ @@ -1453,6 +1493,7 @@ __weak void HAL_PWREx_WKUP2_Callback (void) */ } +#if defined (PWR_WKUPFR_WKUPF3) /** * @brief PWR WKUP3 interrupt callback. * @retval None. @@ -1463,6 +1504,7 @@ __weak void HAL_PWREx_WKUP3_Callback (void) the HAL_PWREx_WKUP3Callback can be implemented in the user file */ } +#endif /* defined (PWR_WKUPFR_WKUPF3) */ /** * @brief PWR WKUP4 interrupt callback. @@ -1475,6 +1517,7 @@ __weak void HAL_PWREx_WKUP4_Callback (void) */ } +#if defined (PWR_WKUPFR_WKUPF5) /** * @brief PWR WKUP5 interrupt callback. * @retval None. @@ -1485,6 +1528,7 @@ __weak void HAL_PWREx_WKUP5_Callback (void) the HAL_PWREx_WKUP5Callback can be implemented in the user file */ } +#endif /* defined (PWR_WKUPFR_WKUPF5) */ /** * @brief PWR WKUP6 interrupt callback. @@ -2003,14 +2047,14 @@ void HAL_PWREx_DisableAVD (void) void HAL_PWREx_PVD_AVD_IRQHandler (void) { /* Check if the Programmable Voltage Detector is enabled (PVD) */ - if(READ_BIT (PWR->CR1, PWR_CR1_PVDEN) != 0U) + if (READ_BIT (PWR->CR1, PWR_CR1_PVDEN) != 0U) { #if defined (DUAL_CORE) if (HAL_GetCurrentCPUID () == CM7_CPUID) #endif /* defined (DUAL_CORE) */ { /* Check PWR D1/CD EXTI flag */ - if(__HAL_PWR_PVD_EXTI_GET_FLAG () != 0U) + if (__HAL_PWR_PVD_EXTI_GET_FLAG () != 0U) { /* PWR PVD interrupt user callback */ HAL_PWR_PVDCallback (); diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc_ex.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc_ex.c index fa08e69..6af58a5 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc_ex.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc_ex.c @@ -37,7 +37,7 @@ /* Private typedef -----------------------------------------------------------*/ /* Private defines -----------------------------------------------------------*/ -/** @defgroup RCCEx_Private_defines Private Defines +/** @defgroup RCCEx_Private_defines RCCEx Private Defines * @{ */ #define PLL2_TIMEOUT_VALUE PLL_TIMEOUT_VALUE /* 2 ms */ @@ -50,12 +50,21 @@ * @} */ +/* Private macros ------------------------------------------------------------*/ +/** @defgroup RCCEx_Private_Macros RCCEx Private Macros + * @{ + */ +/** + * @} + */ + +/* Private variables ---------------------------------------------------------*/ /* Private function prototypes -----------------------------------------------*/ static HAL_StatusTypeDef RCCEx_PLL2_Config(RCC_PLL2InitTypeDef *pll2, uint32_t Divider); static HAL_StatusTypeDef RCCEx_PLL3_Config(RCC_PLL3InitTypeDef *pll3, uint32_t Divider); /* Exported functions --------------------------------------------------------*/ -/** @defgroup RCCEx_Exported_Functions Exported Functions +/** @defgroup RCCEx_Exported_Functions RCCEx Exported Functions * @{ */ @@ -84,7 +93,7 @@ static HAL_StatusTypeDef RCCEx_PLL3_Config(RCC_PLL3InitTypeDef *pll3, uint32_t D * @param PeriphClkInit: pointer to an RCC_PeriphCLKInitTypeDef structure that * contains the configuration information for the Extended Peripherals * clocks (SDMMC, CKPER, FMC, QSPI*, OSPI*, DSI, SPI45, SPDIF, DFSDM1, DFSDM2*, FDCAN, SWPMI, SAI23*,SAI2A*, SAI2B*, SAI1, SPI123, - * USART234578, USART16 (USART16910*), RNG, HRTIM1*, I2C123, USB, CEC, LPTIM1, LPUART1, I2C4, LPTIM2, LPTIM345, ADC, + * USART234578, USART16 (USART16910*), RNG, HRTIM1*, I2C123 (I2C1235*), USB, CEC, LPTIM1, LPUART1, I2C4, LPTIM2, LPTIM345, ADC, * SAI4A*, SAI4B*, SPI6, RTC). * @note Care must be taken when HAL_RCCEx_PeriphCLKConfig() is used to select * the RTC clock source; in this case the Backup domain will be reset in @@ -412,6 +421,13 @@ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClk /* HSI, HSE, or CSI oscillator is used as source of SAI2 clock */ /* SAI1 clock source configuration done later after clock selection check */ break; + +#if defined(RCC_VER_3_0) + case RCC_SAI4ACLKSOURCE_SPDIF: + /* SPDIF clock is used as source of SAI4A clock */ + /* SAI4A clock source configuration done later after clock selection check */ + break; +#endif /* RCC_VER_3_0 */ default: ret = HAL_ERROR; @@ -464,6 +480,13 @@ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClk /* SAI1 clock source configuration done later after clock selection check */ break; +#if defined(RCC_VER_3_0) + case RCC_SAI4BCLKSOURCE_SPDIF: + /* SPDIF clock is used as source of SAI4B clock */ + /* SAI4B clock source configuration done later after clock selection check */ + break; +#endif /* RCC_VER_3_0 */ + default: ret = HAL_ERROR; break; @@ -1247,7 +1270,25 @@ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClk } } - /*------------------------------ I2C1/2/3 Configuration ------------------------*/ + /*------------------------------ I2C1/2/3/5* Configuration ------------------------*/ +#if defined(I2C5) + if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C1235) == RCC_PERIPHCLK_I2C1235) + { + /* Check the parameters */ + assert_param(IS_RCC_I2C1235CLKSOURCE(PeriphClkInit->I2c1235ClockSelection)); + + if ((PeriphClkInit->I2c1235ClockSelection )== RCC_I2C1235CLKSOURCE_PLL3 ) + { + if(RCCEx_PLL3_Config(&(PeriphClkInit->PLL3),DIVIDER_R_UPDATE)!= HAL_OK) + { + status = HAL_ERROR; + } + } + + __HAL_RCC_I2C1235_CONFIG(PeriphClkInit->I2c1235ClockSelection); + + } +#else if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C123) == RCC_PERIPHCLK_I2C123) { /* Check the parameters */ @@ -1264,6 +1305,7 @@ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClk __HAL_RCC_I2C123_CONFIG(PeriphClkInit->I2c123ClockSelection); } +#endif /* I2C5 */ /*------------------------------ I2C4 Configuration ------------------------*/ if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C4) == RCC_PERIPHCLK_I2C4) @@ -1471,7 +1513,7 @@ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClk /* Configure the SWPMI1 interface clock source */ __HAL_RCC_SWPMI1_CONFIG(PeriphClkInit->Swpmi1ClockSelection); } -#if defined(HRTIM) +#if defined(HRTIM1) /*------------------------------ HRTIM1 clock Configuration ----------------*/ if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_HRTIM1) == RCC_PERIPHCLK_HRTIM1) { @@ -1481,7 +1523,7 @@ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClk /* Configure the HRTIM1 clock source */ __HAL_RCC_HRTIM1_CONFIG(PeriphClkInit->Hrtim1ClockSelection); } -#endif /*HRTIM*/ +#endif /*HRTIM1*/ /*------------------------------ DFSDM1 Configuration ------------------------*/ if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_DFSDM1) == RCC_PERIPHCLK_DFSDM1) { @@ -1536,7 +1578,7 @@ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClk * @param PeriphClkInit: pointer to an RCC_PeriphCLKInitTypeDef structure that * returns the configuration information for the Extended Peripherals clocks : * (SDMMC, CKPER, FMC, QSPI*, OSPI*, DSI*, SPI45, SPDIF, DFSDM1, DFSDM2*, FDCAN, SWPMI, SAI23*, SAI1, SPI123, - * USART234578, USART16, RNG, HRTIM1*, I2C123, USB, CEC, LPTIM1, LPUART1, I2C4, LPTIM2, LPTIM345, ADC. + * USART234578, USART16, RNG, HRTIM1*, I2C123 (I2C1235*), USB, CEC, LPTIM1, LPUART1, I2C4, LPTIM2, LPTIM345, ADC. * SAI4A*, SAI4B*, SPI6, RTC, TIM). * @retval None * @@ -1554,14 +1596,18 @@ void HAL_RCCEx_GetPeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit) RCC_PERIPHCLK_CEC | RCC_PERIPHCLK_FMC | RCC_PERIPHCLK_SPDIFRX | RCC_PERIPHCLK_TIM | RCC_PERIPHCLK_CKPER; +#if defined(I2C5) +PeriphClkInit->PeriphClockSelection |= RCC_PERIPHCLK_I2C1235; +#else PeriphClkInit->PeriphClockSelection |= RCC_PERIPHCLK_I2C123; +#endif /*I2C5*/ #if defined(RCC_CDCCIP1R_SAI2ASEL) PeriphClkInit->PeriphClockSelection |= RCC_PERIPHCLK_SAI2A; #endif /* RCC_CDCCIP1R_SAI2ASEL */ -#if defined(RCC_CDCCIP1R_SAI2BSEL) +#if defined(RCC_CDCCIP1R_SAI2BSEL) PeriphClkInit->PeriphClockSelection |= RCC_PERIPHCLK_SAI2B; #endif /* RCC_CDCCIP1R_SAI2BSEL */ -#if defined(SAI3) +#if defined(SAI3) PeriphClkInit->PeriphClockSelection |= RCC_PERIPHCLK_SAI23; #endif /* SAI3 */ #if defined(SAI4) @@ -1577,9 +1623,9 @@ PeriphClkInit->PeriphClockSelection |= RCC_PERIPHCLK_I2C123; #if defined(OCTOSPI1) || defined(OCTOSPI2) PeriphClkInit->PeriphClockSelection |= RCC_PERIPHCLK_OSPI; #endif /* OCTOSPI1 || OCTOSPI2 */ -#if defined(HRTIM) +#if defined(HRTIM1) PeriphClkInit->PeriphClockSelection |= RCC_PERIPHCLK_HRTIM1; -#endif /* HRTIM */ +#endif /* HRTIM1 */ #if defined(LTDC) PeriphClkInit->PeriphClockSelection |= RCC_PERIPHCLK_LTDC; #endif /* LTDC */ @@ -1611,8 +1657,13 @@ PeriphClkInit->PeriphClockSelection |= RCC_PERIPHCLK_I2C123; PeriphClkInit->Usart234578ClockSelection = __HAL_RCC_GET_USART234578_SOURCE(); /* Get the LPUART1 clock source --------------------------------------------*/ PeriphClkInit->Lpuart1ClockSelection = __HAL_RCC_GET_LPUART1_SOURCE(); +#if defined(I2C5) + /* Get the I2C1/2/3/5 clock source -----------------------------------------*/ + PeriphClkInit->I2c1235ClockSelection = __HAL_RCC_GET_I2C1_SOURCE(); +#else /* Get the I2C1/2/3 clock source -------------------------------------------*/ PeriphClkInit->I2c123ClockSelection = __HAL_RCC_GET_I2C1_SOURCE(); +#endif /*I2C5*/ /* Get the LPTIM1 clock source ---------------------------------------------*/ PeriphClkInit->Lptim1ClockSelection = __HAL_RCC_GET_LPTIM1_SOURCE(); /* Get the LPTIM2 clock source ---------------------------------------------*/ @@ -3179,7 +3230,7 @@ __weak void HAL_RCCEx_CRS_ErrorCallback(uint32_t Error) * @} */ -/** @defgroup RCCEx_Private_functions Private Functions +/** @defgroup RCCEx_Private_functions RCCEx Private Functions * @{ */ /** @@ -3416,7 +3467,7 @@ __weak void HAL_RCCEx_LSECSS_Callback(void) { /* NOTE : This function should not be modified, when the callback is needed, the @ref HAL_RCCEx_LSECSS_Callback should be implemented in the user file - */ + */ } diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rng.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rng.c index b4585cc..b6144ef 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rng.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rng.c @@ -110,7 +110,7 @@ /* Private types -------------------------------------------------------------*/ /* Private defines -----------------------------------------------------------*/ -/** @defgroup RNG_Private_Defines +/** @defgroup RNG_Private_Defines RNG Private Defines * @{ */ /* Health test control register information to use in CCM algorithm */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rng_ex.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rng_ex.c index 94c58f9..dad4322 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rng_ex.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rng_ex.c @@ -40,7 +40,7 @@ #if defined (RNG_CR_CONDRST) /* Private types -------------------------------------------------------------*/ /* Private defines -----------------------------------------------------------*/ -/** @defgroup RNGEx_Private_Defines +/** @defgroup RNGEx_Private_Defines RNGEx Private Defines * @{ */ /* Health test control register information to use in CCM algorithm */ @@ -55,7 +55,7 @@ */ /* Private variables ---------------------------------------------------------*/ /* Private constants ---------------------------------------------------------*/ -/** @defgroup RNGEx_Private_Constants RNG Private Constants +/** @defgroup RNGEx_Private_Constants RNGEx Private Constants * @{ */ #define RNG_TIMEOUT_VALUE 2U diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rtc.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rtc.c index b458a92..d77de5b 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rtc.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rtc.c @@ -231,8 +231,6 @@ HAL_StatusTypeDef HAL_RTC_Init(RTC_HandleTypeDef *hrtc) /* Check RTC handler */ if(hrtc != NULL) { - status = HAL_OK; - /* Check the parameters */ assert_param(IS_RTC_ALL_INSTANCE(hrtc->Instance)); assert_param(IS_RTC_HOUR_FORMAT(hrtc->Init.HourFormat)); @@ -312,18 +310,9 @@ HAL_StatusTypeDef HAL_RTC_Init(RTC_HandleTypeDef *hrtc) /* Disable the write protection for RTC registers */ __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); - /* Set Initialization mode */ - if(RTC_EnterInitMode(hrtc) != HAL_OK) - { - /* Enable the write protection for RTC registers */ - __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); - - /* Set RTC state */ - hrtc->State = HAL_RTC_STATE_ERROR; - - status = HAL_ERROR; - } - else + /* Enter Initialization mode */ + status = RTC_EnterInitMode(hrtc); + if (status == HAL_OK) { #if defined(RTC_CR_TAMPOE) /* Clear RTC_CR FMT, OSEL, POL and TAMPOE Bits */ @@ -340,25 +329,7 @@ HAL_StatusTypeDef HAL_RTC_Init(RTC_HandleTypeDef *hrtc) hrtc->Instance->PRER = (hrtc->Init.AsynchPrediv << RTC_PRER_PREDIV_A_Pos) | (hrtc->Init.SynchPrediv << RTC_PRER_PREDIV_S_Pos); /* Exit Initialization mode */ -#if defined(RTC_ICSR_INIT) - CLEAR_BIT(hrtc->Instance->ICSR, RTC_ICSR_INIT); -#endif /* RTC_ICSR_INIT */ -#if defined(RTC_ISR_INIT) - CLEAR_BIT(hrtc->Instance->ISR, RTC_ISR_INIT); -#endif /* RTC_ISR_INIT */ - - /* If CR_BYPSHAD bit = 0, wait for synchro else this check is not needed */ - if((hrtc->Instance->CR & RTC_CR_BYPSHAD) == 0U) - { - if(HAL_RTC_WaitForSynchro(hrtc) != HAL_OK) - { - /* Enable the write protection for RTC registers */ - __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); - - hrtc->State = HAL_RTC_STATE_ERROR; - status = HAL_ERROR; - } - } + status = RTC_ExitInitMode(hrtc); if(status == HAL_OK) { @@ -371,14 +342,15 @@ HAL_StatusTypeDef HAL_RTC_Init(RTC_HandleTypeDef *hrtc) hrtc->Instance->OR &= ~(RTC_OR_ALARMOUTTYPE | RTC_OR_OUT_RMP); hrtc->Instance->OR |= (hrtc->Init.OutPutType | hrtc->Init.OutPutRemap); #endif /* ALARMOUTTYPE && RTC_OR_OUT_RMP */ - - /* Enable the write protection for RTC registers */ - __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); - - /* Set RTC state */ - hrtc->State = HAL_RTC_STATE_READY; } } + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + if (status == HAL_OK) + { + /* Set RTC state */ + hrtc->State = HAL_RTC_STATE_READY; + } } /* return status */ @@ -399,8 +371,6 @@ HAL_StatusTypeDef HAL_RTC_DeInit(RTC_HandleTypeDef *hrtc) /* Check RTC handler */ if(hrtc != NULL) { - status = HAL_OK; - /* Check the parameters */ assert_param(IS_RTC_ALL_INSTANCE(hrtc->Instance)); @@ -409,19 +379,9 @@ HAL_StatusTypeDef HAL_RTC_DeInit(RTC_HandleTypeDef *hrtc) /* Disable the write protection for RTC registers */ __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); - - /* Set Initialization mode */ - if(RTC_EnterInitMode(hrtc) != HAL_OK) - { - /* Enable the write protection for RTC registers */ - __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); - - /* Set RTC state */ - hrtc->State = HAL_RTC_STATE_ERROR; - - status = HAL_ERROR; - } - else + /* Enter Initialization mode */ + status = RTC_EnterInitMode(hrtc); + if (status == HAL_OK) { /* Reset TR, DR and CR registers */ hrtc->Instance->TR = 0x00000000U; @@ -436,7 +396,7 @@ HAL_StatusTypeDef HAL_RTC_DeInit(RTC_HandleTypeDef *hrtc) while (((hrtc->Instance->ICSR) & RTC_ICSR_WUTWF) == 0U) #endif /* RTC_ICSR_WUTWF */ #if defined(RTC_ISR_WUTWF) - while (((hrtc->Instance->ISR) & RTC_ISR_WUTWF) == 0U) + while (((hrtc->Instance->ISR) & RTC_ISR_WUTWF) == 0U) #endif /* RTC_ISR_WUTWF */ { if((HAL_GetTick() - tickstart) > RTC_TIMEOUT_VALUE) @@ -447,53 +407,33 @@ HAL_StatusTypeDef HAL_RTC_DeInit(RTC_HandleTypeDef *hrtc) /* Set RTC state */ hrtc->State = HAL_RTC_STATE_TIMEOUT; - status = HAL_TIMEOUT; } } - if(status == HAL_OK) - { - /* Reset all RTC CR register bits */ - hrtc->Instance->CR &= 0x00000000U; + /* Exit initialization mode */ + status = RTC_ExitInitMode(hrtc); + if (status == HAL_OK) + { + /* Reset all RTC CR register bits */ + hrtc->Instance->CR &= 0x00000000U; - /* Reset other RTC registers */ - hrtc->Instance->WUTR = RTC_WUTR_WUT; - hrtc->Instance->PRER = ((uint32_t)(RTC_PRER_PREDIV_A | 0x000000FFU)); - hrtc->Instance->ALRMAR = 0x00000000U; - hrtc->Instance->ALRMBR = 0x00000000U; - hrtc->Instance->SHIFTR = 0x00000000U; - hrtc->Instance->CALR = 0x00000000U; - hrtc->Instance->ALRMASSR = 0x00000000U; - hrtc->Instance->ALRMBSSR = 0x00000000U; + /* Reset other RTC registers */ + hrtc->Instance->WUTR = RTC_WUTR_WUT; + hrtc->Instance->PRER = ((uint32_t)(RTC_PRER_PREDIV_A | 0x000000FFU)); + hrtc->Instance->ALRMAR = 0x00000000U; + hrtc->Instance->ALRMBR = 0x00000000U; + hrtc->Instance->SHIFTR = 0x00000000U; + hrtc->Instance->CALR = 0x00000000U; + hrtc->Instance->ALRMASSR = 0x00000000U; + hrtc->Instance->ALRMBSSR = 0x00000000U; -#if defined(RTC_ICSR_INIT) - /* Exit initialization mode */ - CLEAR_BIT(hrtc->Instance->ICSR, RTC_ICSR_INIT); -#endif /* RTC_ICSR_INIT */ #if defined(RTC_ISR_INIT) - /* Reset ISR register and exit initialization mode */ - hrtc->Instance->ISR = 0x00000000U; - /* Reset Tamper configuration register */ hrtc->Instance->TAMPCR = 0x00000000U; /* Reset Option register */ hrtc->Instance->OR = 0x00000000U; #endif /* RTC_ISR_INIT */ - - /* If RTC_CR_BYPSHAD bit = 0, wait for synchro else this check is not needed */ - if((hrtc->Instance->CR & RTC_CR_BYPSHAD) == 0U) - { - if(HAL_RTC_WaitForSynchro(hrtc) != HAL_OK) - { - /* Enable the write protection for RTC registers */ - __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); - - hrtc->State = HAL_RTC_STATE_ERROR; - - status = HAL_ERROR; - } - } } } @@ -899,6 +839,7 @@ __weak void HAL_RTC_MspDeInit(RTC_HandleTypeDef *hrtc) HAL_StatusTypeDef HAL_RTC_SetTime(RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTime, uint32_t Format) { uint32_t tmpreg; +HAL_StatusTypeDef status; /* Check the parameters */ assert_param(IS_RTC_FORMAT(Format)); @@ -912,22 +853,9 @@ HAL_StatusTypeDef HAL_RTC_SetTime(RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTim /* Disable the write protection for RTC registers */ __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); - - /* Set Initialization mode */ - if(RTC_EnterInitMode(hrtc) != HAL_OK) - { - /* Enable the write protection for RTC registers */ - __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); - - /* Set RTC state */ - hrtc->State = HAL_RTC_STATE_ERROR; - - /* Process Unlocked */ - __HAL_UNLOCK(hrtc); - - return HAL_ERROR; - } - else + /* Enter Initialization mode */ + status = RTC_EnterInitMode(hrtc); + if (status == HAL_OK) { if(Format == RTC_FORMAT_BIN) { @@ -979,39 +907,21 @@ HAL_StatusTypeDef HAL_RTC_SetTime(RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTim hrtc->Instance->CR |= (uint32_t)(sTime->DayLightSaving | sTime->StoreOperation); /* Exit Initialization mode */ -#if defined(RTC_ICSR_INIT) - CLEAR_BIT(hrtc->Instance->ICSR, RTC_ICSR_INIT); -#endif /* RTC_ICSR_INIT */ -#if defined(RTC_ISR_INIT) - CLEAR_BIT(hrtc->Instance->ISR, RTC_ISR_INIT); -#endif /* RTC_ISR_INIT */ - - /* If CR_BYPSHAD bit = 0, wait for synchro else this check is not needed */ - if((hrtc->Instance->CR & RTC_CR_BYPSHAD) == 0U) - { - if(HAL_RTC_WaitForSynchro(hrtc) != HAL_OK) - { - /* Enable the write protection for RTC registers */ - __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); - - hrtc->State = HAL_RTC_STATE_ERROR; - - /* Process Unlocked */ - __HAL_UNLOCK(hrtc); - - return HAL_ERROR; - } - } - - /* Enable the write protection for RTC registers */ - __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); - - hrtc->State = HAL_RTC_STATE_READY; - - __HAL_UNLOCK(hrtc); - - return HAL_OK; + status = RTC_ExitInitMode(hrtc); } + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + if (status == HAL_OK) + { + hrtc->State = HAL_RTC_STATE_READY; + } + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return status; } /** @@ -1082,6 +992,7 @@ HAL_StatusTypeDef HAL_RTC_GetTime(RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTim HAL_StatusTypeDef HAL_RTC_SetDate(RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDate, uint32_t Format) { uint32_t datetmpreg; + HAL_StatusTypeDef status; /* Check the parameters */ assert_param(IS_RTC_FORMAT(Format)); @@ -1124,60 +1035,33 @@ HAL_StatusTypeDef HAL_RTC_SetDate(RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDat /* Disable the write protection for RTC registers */ __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); - /* Set Initialization mode */ - if(RTC_EnterInitMode(hrtc) != HAL_OK) - { - /* Enable the write protection for RTC registers */ - __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); - /* Set RTC state*/ - hrtc->State = HAL_RTC_STATE_ERROR; - - /* Process Unlocked */ - __HAL_UNLOCK(hrtc); - - return HAL_ERROR; - } - else + /* Enter Initialization mode */ + status = RTC_EnterInitMode(hrtc); + if (status == HAL_OK) { /* Set the RTC_DR register */ hrtc->Instance->DR = (uint32_t)(datetmpreg & RTC_DR_RESERVED_MASK); + /* Exit Initialization mode */ -#if defined(RTC_ICSR_INIT) - CLEAR_BIT(hrtc->Instance->ICSR, RTC_ICSR_INIT); -#endif /* RTC_ISR_INIT */ -#if defined(RTC_ISR_INIT) - CLEAR_BIT(hrtc->Instance->ISR, RTC_ISR_INIT); -#endif /* RTC_ISR_INIT */ - - /* If CR_BYPSHAD bit = 0, wait for synchro else this check is not needed */ - if((hrtc->Instance->CR & RTC_CR_BYPSHAD) == 0U) - { - if(HAL_RTC_WaitForSynchro(hrtc) != HAL_OK) - { - /* Enable the write protection for RTC registers */ - __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); - - hrtc->State = HAL_RTC_STATE_ERROR; - - /* Process Unlocked */ - __HAL_UNLOCK(hrtc); - - return HAL_ERROR; - } - } - - /* Enable the write protection for RTC registers */ - __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); - - hrtc->State = HAL_RTC_STATE_READY ; - - /* Process Unlocked */ - __HAL_UNLOCK(hrtc); - - return HAL_OK; + status = RTC_ExitInitMode(hrtc); } + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + if (status == HAL_OK) + { + hrtc->State = HAL_RTC_STATE_READY; + } + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return status; + + } /** @@ -2056,7 +1940,7 @@ HAL_RTCStateTypeDef HAL_RTC_GetState(RTC_HandleTypeDef *hrtc) HAL_StatusTypeDef RTC_EnterInitMode(RTC_HandleTypeDef *hrtc) { uint32_t tickstart; - + HAL_StatusTypeDef status = HAL_OK; /* Check if the Initialization mode is set */ #if defined(RTC_ICSR_INITF) if((hrtc->Instance->ICSR & RTC_ICSR_INITF) == 0U) @@ -2070,7 +1954,8 @@ HAL_StatusTypeDef RTC_EnterInitMode(RTC_HandleTypeDef *hrtc) { if((HAL_GetTick() - tickstart) > RTC_TIMEOUT_VALUE) { - return HAL_TIMEOUT; + status = HAL_TIMEOUT; + hrtc->State = HAL_RTC_STATE_TIMEOUT; } } } @@ -2087,15 +1972,61 @@ HAL_StatusTypeDef RTC_EnterInitMode(RTC_HandleTypeDef *hrtc) { if((HAL_GetTick() - tickstart) > RTC_TIMEOUT_VALUE) { - return HAL_TIMEOUT; + status = HAL_TIMEOUT; + hrtc->State = HAL_RTC_STATE_TIMEOUT; } } } #endif /* RTC_ISR_INITF */ - return HAL_OK; + return status; } +/** + * @brief Exit the RTC Initialization mode. + * @param hrtc RTC handle + * @retval HAL status + */ +HAL_StatusTypeDef RTC_ExitInitMode(RTC_HandleTypeDef *hrtc) +{ + HAL_StatusTypeDef status = HAL_OK; + + /* Check if the Initialization mode is set */ +#if defined(RTC_ICSR_INITF) + + /* Exit Initialization mode */ + CLEAR_BIT(RTC->ICSR, RTC_ICSR_INIT); + +#elif defined(RTC_ISR_INITF) + + /* Exit Initialization mode */ + CLEAR_BIT(RTC->ISR, RTC_ISR_INITF); + +#endif /* RTC_ISR_INITF */ + /* If CR_BYPSHAD bit = 0, wait for synchro */ + if (READ_BIT(RTC->CR, RTC_CR_BYPSHAD) == 0U) + { + if (HAL_RTC_WaitForSynchro(hrtc) != HAL_OK) + { + hrtc->State = HAL_RTC_STATE_TIMEOUT; + status = HAL_TIMEOUT; + } + } + else + { + /* Clear BYPSHAD bit */ + CLEAR_BIT(RTC->CR, RTC_CR_BYPSHAD); + if (HAL_RTC_WaitForSynchro(hrtc) != HAL_OK) + { + hrtc->State = HAL_RTC_STATE_TIMEOUT; + status = HAL_TIMEOUT; + } + /* Restore BYPSHAD bit */ + SET_BIT(RTC->CR, RTC_CR_BYPSHAD); + } + + return status; +} /** * @brief Convert a 2 digit decimal to BCD format. diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rtc_ex.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rtc_ex.c index 2e0bbae..8d4d48a 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rtc_ex.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rtc_ex.c @@ -1121,8 +1121,11 @@ HAL_StatusTypeDef HAL_RTCEx_SetActiveTampers(RTC_HandleTypeDef *hrtc, RTC_Active /* Active Tampers must not be already enabled */ if (READ_BIT(TAMP->ATOR, TAMP_ATOR_INITS) != 0U) { - /* Disable all actives tampers with HAL_RTCEx_DeactivateActiveTampers and try again */ - return HAL_ERROR; + /* Disable all active tampers with HAL_RTCEx_DeactivateActiveTampers */ + if (HAL_RTCEx_DeactivateActiveTampers(hrtc) != HAL_OK) + { + return HAL_ERROR; + } } /* Set TimeStamp on tamper detection */ @@ -1984,67 +1987,48 @@ HAL_StatusTypeDef HAL_RTCEx_SetWakeUpTimer(RTC_HandleTypeDef *hrtc, uint32_t Wak /* Disable the write protection for RTC registers */ __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); - /* Check RTC WUTWF flag is reset only when wake up timer enabled */ - if ((hrtc->Instance->CR & RTC_CR_WUTE) != 0U) - { - tickstart = HAL_GetTick(); + /* Clear WUTE in RTC_CR to disable the wakeup timer */ + CLEAR_BIT(RTC->CR, RTC_CR_WUTE); - /* Wait till RTC WUTWF flag is reset and if Time out is reached exit */ - #if defined(RTC_ICSR_WUTWF) - while (READ_BIT(hrtc->Instance->ICSR, RTC_FLAG_WUTWF) != 0U) - #endif /* RTC_ICSR_WUTWF */ - #if defined(RTC_ISR_WUTWF) - while(__HAL_RTC_WAKEUPTIMER_GET_FLAG(hrtc, RTC_FLAG_WUTWF) != 0U) - #endif /* RTC_ISR_WUTWF */ + /* Poll WUTWF until it is set in RTC_ICSR / RTC_ISR to make sure the access to wakeup autoreload + counter and to WUCKSEL[2:0] bits is allowed. This step must be skipped in + calendar initialization mode. */ +#if defined(RTC_ISR_INITF) + if (READ_BIT(RTC->ISR, RTC_ISR_INITF) == 0U) +#endif /* RTC_ISR_INITF */ +#if defined(RTC_ICSR_INITF) + if (READ_BIT(RTC->ICSR, RTC_ICSR_INITF) == 0U) +#endif /* RTC_ICSR_INITF */ { - if ((HAL_GetTick() - tickstart) > RTC_TIMEOUT_VALUE) - { - /* Enable the write protection for RTC registers */ - __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + tickstart = HAL_GetTick(); - hrtc->State = HAL_RTC_STATE_TIMEOUT; +#if defined(RTC_ICSR_WUTWF) + while (READ_BIT(hrtc->Instance->ICSR, RTC_FLAG_WUTWF) == 0U) +#endif /* RTC_ICSR_WUTWF */ +#if defined(RTC_ISR_WUTWF) + while(__HAL_RTC_WAKEUPTIMER_GET_FLAG(hrtc, RTC_FLAG_WUTWF) == 0U) +#endif /* RTC_ISR_WUTWF */ + { + if ((HAL_GetTick() - tickstart) > RTC_TIMEOUT_VALUE) + { + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); - /* Process Unlocked */ - __HAL_UNLOCK(hrtc); + hrtc->State = HAL_RTC_STATE_TIMEOUT; - return HAL_TIMEOUT; - } + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_TIMEOUT; + } + } } - } - - __HAL_RTC_WAKEUPTIMER_DISABLE(hrtc); - - tickstart = HAL_GetTick(); - - /* Wait till RTC WUTWF flag is set and if Time out is reached exit */ - #if defined(RTC_ICSR_WUTWF) - while (READ_BIT(hrtc->Instance->ICSR, RTC_FLAG_WUTWF) == 0U) - #endif /* RTC_ICSR_WUTWF */ - #if defined(RTC_ISR_WUTWF) - while(__HAL_RTC_WAKEUPTIMER_GET_FLAG(hrtc, RTC_FLAG_WUTWF) == 0U) - #endif /* RTC_ISR_WUTWF */ - { - if ((HAL_GetTick() - tickstart) > RTC_TIMEOUT_VALUE) - { - /* Enable the write protection for RTC registers */ - __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); - - hrtc->State = HAL_RTC_STATE_TIMEOUT; - - /* Process Unlocked */ - __HAL_UNLOCK(hrtc); - - return HAL_TIMEOUT; - } - } /* Clear the Wakeup Timer clock source bits and configure the clock source in CR register */ - { - uint32_t CR_tmp = hrtc->Instance->CR; - CR_tmp &= (uint32_t)~RTC_CR_WUCKSEL; - CR_tmp |= (uint32_t)WakeUpClock; - hrtc->Instance->CR = CR_tmp; - } + uint32_t CR_tmp = hrtc->Instance->CR; + CR_tmp &= (uint32_t)~RTC_CR_WUCKSEL; + CR_tmp |= (uint32_t)WakeUpClock; + hrtc->Instance->CR = CR_tmp; /* Configure the Wakeup Timer counter */ hrtc->Instance->WUTR = (uint32_t)WakeUpCounter; @@ -2086,62 +2070,42 @@ HAL_StatusTypeDef HAL_RTCEx_SetWakeUpTimer_IT(RTC_HandleTypeDef *hrtc, uint32_t /* Disable the write protection for RTC registers */ __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); - /* Check RTC WUTWF flag is reset only when wake up timer enabled */ - if ((hrtc->Instance->CR & RTC_CR_WUTE) != 0U) - { - tickstart = HAL_GetTick(); + /* Clear WUTE in RTC_CR to disable the wakeup timer */ + CLEAR_BIT(RTC->CR, RTC_CR_WUTE); - /* Wait till RTC WUTWF flag is reset and if Time out is reached exit */ - #if defined(RTC_ICSR_WUTWF) - while (READ_BIT(hrtc->Instance->ICSR, RTC_FLAG_WUTWF) != 0U) - #endif /* RTC_ICSR_WUTWF */ - #if defined(RTC_ISR_WUTWF) - while(__HAL_RTC_WAKEUPTIMER_GET_FLAG(hrtc, RTC_FLAG_WUTWF) != 0U) - #endif /* RTC_ISR_WUTWF */ + /* Poll WUTWF until it is set in RTC_ICSR to make sure the access to wakeup autoreload + counter and to WUCKSEL[2:0] bits is allowed. This step must be skipped in + calendar initialization mode. */ +#if defined(RTC_ISR_INITF) + if (READ_BIT(RTC->ISR, RTC_ISR_INITF) == 0U) +#endif /* RTC_ISR_INITF */ +#if defined(RTC_ICSR_INITF) + if (READ_BIT(RTC->ICSR, RTC_ICSR_INITF) == 0U) +#endif /* RTC_ICSR_INITF */ { - if ((HAL_GetTick() - tickstart) > RTC_TIMEOUT_VALUE) - { - /* Enable the write protection for RTC registers */ - __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + tickstart = HAL_GetTick(); - hrtc->State = HAL_RTC_STATE_TIMEOUT; +#if defined(RTC_ICSR_WUTWF) + while (READ_BIT(hrtc->Instance->ICSR, RTC_FLAG_WUTWF) == 0U) +#endif /* RTC_ICSR_WUTWF */ +#if defined(RTC_ISR_WUTWF) + while(__HAL_RTC_WAKEUPTIMER_GET_FLAG(hrtc, RTC_FLAG_WUTWF) == 0U) +#endif /* RTC_ISR_WUTWF */ + { + if ((HAL_GetTick() - tickstart) > RTC_TIMEOUT_VALUE) + { + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); - /* Process Unlocked */ - __HAL_UNLOCK(hrtc); + hrtc->State = HAL_RTC_STATE_TIMEOUT; - return HAL_TIMEOUT; - } + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_TIMEOUT; + } + } } - } - /* Disable the Wake-Up timer */ - __HAL_RTC_WAKEUPTIMER_DISABLE(hrtc); - - /* Clear flag Wake-Up */ - __HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(hrtc, RTC_FLAG_WUTF); - - tickstart = HAL_GetTick(); - - /* Wait till RTC WUTWF flag is set and if Time out is reached exit */ - #if defined(RTC_ICSR_WUTWF) - while (READ_BIT(hrtc->Instance->ICSR, RTC_FLAG_WUTWF) == 0U) - #endif /* RTC_ICSR_WUTWF */ - #if defined(RTC_ISR_WUTWF) - while(__HAL_RTC_WAKEUPTIMER_GET_FLAG(hrtc, RTC_FLAG_WUTWF) == 0U) - #endif /* RTC_ISR_WUTWF */ - { - if ((HAL_GetTick() - tickstart) > RTC_TIMEOUT_VALUE) - { - /* Enable the write protection for RTC registers */ - __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); - - hrtc->State = HAL_RTC_STATE_TIMEOUT; - - /* Process Unlocked */ - __HAL_UNLOCK(hrtc); - - return HAL_TIMEOUT; - } - } /* Configure the Wakeup Timer counter */ hrtc->Instance->WUTR = (uint32_t)WakeUpCounter; @@ -2732,6 +2696,7 @@ HAL_StatusTypeDef HAL_RTCEx_DeactivateCalibrationOutPut(RTC_HandleTypeDef * hrtc */ HAL_StatusTypeDef HAL_RTCEx_SetRefClock(RTC_HandleTypeDef * hrtc) { + HAL_StatusTypeDef status; /* Process Locked */ __HAL_LOCK(hrtc); @@ -2740,39 +2705,23 @@ HAL_StatusTypeDef HAL_RTCEx_SetRefClock(RTC_HandleTypeDef * hrtc) /* Disable the write protection for RTC registers */ __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); - /* Set Initialization mode */ - if (RTC_EnterInitMode(hrtc) != HAL_OK) - { - /* Enable the write protection for RTC registers */ - __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); - - /* Set RTC state*/ - hrtc->State = HAL_RTC_STATE_ERROR; - - /* Process Unlocked */ - __HAL_UNLOCK(hrtc); - - return HAL_ERROR; - } - else + /* Enter Initialization mode */ + status = RTC_EnterInitMode(hrtc); + if (status == HAL_OK) { __HAL_RTC_CLOCKREF_DETECTION_ENABLE(hrtc); /* Exit Initialization mode */ -#if defined(RTC_ICSR_INIT) - hrtc->Instance->ICSR &= (uint32_t)~RTC_ICSR_INIT; -#endif /* RTC_ICSR_INIT */ -#if defined(RTC_ISR_INIT) - hrtc->Instance->ISR &= (uint32_t)~RTC_ISR_INIT; -#endif /* RTC_ISR_INIT */ + status = RTC_ExitInitMode(hrtc); } /* Enable the write protection for RTC registers */ __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); - - /* Change RTC state */ - hrtc->State = HAL_RTC_STATE_READY; - + if (status == HAL_OK) + { + /* Change RTC state */ + hrtc->State = HAL_RTC_STATE_READY; + } /* Process Unlocked */ __HAL_UNLOCK(hrtc); @@ -2786,6 +2735,7 @@ HAL_StatusTypeDef HAL_RTCEx_SetRefClock(RTC_HandleTypeDef * hrtc) */ HAL_StatusTypeDef HAL_RTCEx_DeactivateRefClock(RTC_HandleTypeDef * hrtc) { + HAL_StatusTypeDef status; /* Process Locked */ __HAL_LOCK(hrtc); @@ -2794,38 +2744,25 @@ HAL_StatusTypeDef HAL_RTCEx_DeactivateRefClock(RTC_HandleTypeDef * hrtc) /* Disable the write protection for RTC registers */ __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); - /* Set Initialization mode */ - if (RTC_EnterInitMode(hrtc) != HAL_OK) - { - /* Enable the write protection for RTC registers */ - __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); - - /* Set RTC state*/ - hrtc->State = HAL_RTC_STATE_ERROR; - - /* Process Unlocked */ - __HAL_UNLOCK(hrtc); - - return HAL_ERROR; - } - else + /* Enter Initialization mode */ + status = RTC_EnterInitMode(hrtc); + if (status == HAL_OK) { __HAL_RTC_CLOCKREF_DETECTION_DISABLE(hrtc); /* Exit Initialization mode */ -#if defined(RTC_ICSR_INIT) - hrtc->Instance->ICSR &= (uint32_t)~RTC_ICSR_INIT; -#endif /* RTC_ICSR_INIT */ -#if defined(RTC_ISR_INIT) - hrtc->Instance->ISR &= (uint32_t)~RTC_ISR_INIT; -#endif /* RTC_ISR_INIT */ + status = RTC_ExitInitMode(hrtc); } /* Enable the write protection for RTC registers */ __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); - /* Change RTC state */ - hrtc->State = HAL_RTC_STATE_READY; + if (status == HAL_OK) + { + /* Change RTC state */ + hrtc->State = HAL_RTC_STATE_READY; + + } /* Process Unlocked */ __HAL_UNLOCK(hrtc); @@ -2901,11 +2838,15 @@ HAL_StatusTypeDef HAL_RTCEx_DisableBypassShadow(RTC_HandleTypeDef * hrtc) /** * @brief Increment Monotonic counter. * @param hrtc RTC handle + * @param Instance Monotonic counter Instance + * This parameter can be can be one of the following values : + * @arg RTC_MONOTONIC_COUNTER_1 * @retval HAL status */ -HAL_StatusTypeDef HAL_RTCEx_MonotonicCounterIncrement(RTC_HandleTypeDef *hrtc) +HAL_StatusTypeDef HAL_RTCEx_MonotonicCounterIncrement(RTC_HandleTypeDef *hrtc, uint32_t Instance) { UNUSED(hrtc); + UNUSED(Instance); /* This register is read-only only and is incremented by one when a write access is done to this register. This register cannot roll-over and is frozen when reaching the maximum value. */ CLEAR_REG(TAMP->COUNTR); @@ -2916,12 +2857,16 @@ HAL_StatusTypeDef HAL_RTCEx_MonotonicCounterIncrement(RTC_HandleTypeDef *hrtc) /** * @brief Monotonic counter incrementation. * @param hrtc RTC handle + * @param Instance Monotonic counter Instance + * This parameter can be can be one of the following values : + * @arg RTC_MONOTONIC_COUNTER_1 * @param Counter monotonic counter value * @retval HAL status */ -HAL_StatusTypeDef HAL_RTCEx_MonotonicCounterGet(RTC_HandleTypeDef *hrtc, uint32_t *Counter) +HAL_StatusTypeDef HAL_RTCEx_MonotonicCounterGet(RTC_HandleTypeDef *hrtc, uint32_t *Counter, uint32_t Instance) { UNUSED(hrtc); + UNUSED(Instance); /* This register is read-only only and is incremented by one when a write access is done to this register. This register cannot roll-over and is frozen when reaching the maximum value. */ *Counter = READ_REG(TAMP->COUNTR); diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_sai.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_sai.c index a858d8e..b5de2f9 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_sai.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_sai.c @@ -244,7 +244,6 @@ typedef enum /** @defgroup SAI_Private_Constants SAI Private Constants * @{ */ -#define SAI_FIFO_SIZE 8U #define SAI_DEFAULT_TIMEOUT 4U #define SAI_LONG_TIMEOUT 1000U /** @@ -617,8 +616,26 @@ HAL_StatusTypeDef HAL_SAI_Init(SAI_HandleTypeDef *hsai) if (hsai->Init.NoDivider == SAI_MASTERDIVIDER_DISABLE) { /* NODIV = 1 */ + uint32_t tmpframelength; + + if (hsai->Init.Protocol == SAI_SPDIF_PROTOCOL) + { + /* For SPDIF protocol, frame length is set by hardware to 64 */ + tmpframelength = 64U; + } + else if (hsai->Init.Protocol == SAI_AC97_PROTOCOL) + { + /* For AC97 protocol, frame length is set by hardware to 256 */ + tmpframelength = 256U; + } + else + { + /* For free protocol, frame length is set by user */ + tmpframelength = hsai->FrameInit.FrameLength; + } + /* (freq x 10) to keep Significant digits */ - tmpval = (freq * 10U) / (hsai->Init.AudioFrequency * hsai->FrameInit.FrameLength); + tmpval = (freq * 10U) / (hsai->Init.AudioFrequency * tmpframelength); } else { @@ -635,8 +652,17 @@ HAL_StatusTypeDef HAL_SAI_Init(SAI_HandleTypeDef *hsai) { hsai->Init.Mckdiv += 1U; } + + /* For SPDIF protocol, SAI shall provide a bit clock twice faster the symbol-rate */ + if (hsai->Init.Protocol == SAI_SPDIF_PROTOCOL) + { + hsai->Init.Mckdiv = hsai->Init.Mckdiv >> 1; + } } + /* Check the SAI Block master clock divider parameter */ + assert_param(IS_SAI_BLOCK_MASTER_DIVIDER(hsai->Init.Mckdiv)); + /* Compute CKSTR bits of SAI CR1 according ClockStrobing and AudioMode */ if ((hsai->Init.AudioMode == SAI_MODEMASTER_TX) || (hsai->Init.AudioMode == SAI_MODESLAVE_TX)) { @@ -2506,7 +2532,7 @@ static uint32_t SAI_InterruptFlag(const SAI_HandleTypeDef *hsai, SAI_ModeTypedef */ static HAL_StatusTypeDef SAI_Disable(SAI_HandleTypeDef *hsai) { - register uint32_t count = SAI_DEFAULT_TIMEOUT * (SystemCoreClock / 7U / 1000U); + uint32_t count = SAI_DEFAULT_TIMEOUT * (SystemCoreClock / 7U / 1000U); HAL_StatusTypeDef status = HAL_OK; /* Disable the SAI instance */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_sd.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_sd.c index 170930a..226ffd9 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_sd.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_sd.c @@ -472,7 +472,10 @@ HAL_StatusTypeDef HAL_SD_InitCard(SD_HandleTypeDef *hsd) Init.ClockPowerSave = SDMMC_CLOCK_POWER_SAVE_DISABLE; Init.BusWide = SDMMC_BUS_WIDE_1B; Init.HardwareFlowControl = SDMMC_HARDWARE_FLOW_CONTROL_DISABLE; - Init.ClockDiv = SDMMC_INIT_CLK_DIV; + + /* Init Clock should be less or equal to 400Khz*/ + sdmmc_clk = HAL_RCCEx_GetPeriphCLKFreq(RCC_PERIPHCLK_SDMMC); + Init.ClockDiv = sdmmc_clk/(2U*400000U); #if (USE_SD_TRANSCEIVER != 0U) if (hsd->Init.TranceiverPresent == SDMMC_TRANSCEIVER_PRESENT) @@ -491,9 +494,9 @@ HAL_StatusTypeDef HAL_SD_InitCard(SD_HandleTypeDef *hsd) /* Set Power State to ON */ (void)SDMMC_PowerState_ON(hsd->Instance); - /* wait 74 Cycles: required power up waiting time before starting + /* wait 74 Cycles: required power up waiting time before starting the SD initialization sequence */ - sdmmc_clk = HAL_RCCEx_GetPeriphCLKFreq(RCC_PERIPHCLK_SDMMC)/(2U*SDMMC_INIT_CLK_DIV); + sdmmc_clk = sdmmc_clk/(2U*Init.ClockDiv); if(sdmmc_clk != 0U) { @@ -1477,7 +1480,7 @@ HAL_StatusTypeDef HAL_SD_Erase(SD_HandleTypeDef *hsd, uint32_t BlockStartAdd, ui } /* Send CMD38 ERASE */ - errorstate = SDMMC_CmdErase(hsd->Instance); + errorstate = SDMMC_CmdErase(hsd->Instance, 0UL); if(errorstate != HAL_SD_ERROR_NONE) { /* Clear all the static flags */ @@ -2127,7 +2130,7 @@ HAL_StatusTypeDef HAL_SD_UnRegisterTransceiverCallback(SD_HandleTypeDef *hsd) * @brief Returns information the information of the card which are stored on * the CID register. * @param hsd: Pointer to SD handle - * @param pCID: Pointer to a HAL_SD_CardCIDTypeDef structure that + * @param pCID: Pointer to a HAL_SD_CardCIDTypeDef structure that * contains all CID register parameters * @retval HAL status */ @@ -2160,7 +2163,7 @@ HAL_StatusTypeDef HAL_SD_GetCardCID(SD_HandleTypeDef *hsd, HAL_SD_CardCIDTypeDef * @brief Returns information the information of the card which are stored on * the CSD register. * @param hsd: Pointer to SD handle - * @param pCSD: Pointer to a HAL_SD_CardCSDTypeDef structure that + * @param pCSD: Pointer to a HAL_SD_CardCSDTypeDef structure that * contains all CSD register parameters * @retval HAL status */ @@ -2274,7 +2277,7 @@ HAL_StatusTypeDef HAL_SD_GetCardCSD(SD_HandleTypeDef *hsd, HAL_SD_CardCSDTypeDef /** * @brief Gets the SD status info. * @param hsd: Pointer to SD handle - * @param pStatus: Pointer to the HAL_SD_CardStatusTypeDef structure that + * @param pStatus: Pointer to the HAL_SD_CardStatusTypeDef structure that * will contain the SD card status information * @retval HAL status */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_sd_ex.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_sd_ex.c index 674619d..e9dcbba 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_sd_ex.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_sd_ex.c @@ -120,6 +120,7 @@ HAL_StatusTypeDef HAL_SDEx_ReadBlocksDMAMultiBuffer(SD_HandleTypeDef *hsd, uint3 DmaBase0_reg = hsd->Instance->IDMABASE0; DmaBase1_reg = hsd->Instance->IDMABASE1; + if ((hsd->Instance->IDMABSIZE == 0U) || (DmaBase0_reg == 0U) || (DmaBase1_reg == 0U)) { hsd->ErrorCode = HAL_SD_ERROR_ADDR_OUT_OF_RANGE; diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_smartcard.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_smartcard.c index 01237b0..79b35bd 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_smartcard.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_smartcard.c @@ -107,8 +107,8 @@ allows the user to configure dynamically the driver callbacks. [..] - Use Function @ref HAL_SMARTCARD_RegisterCallback() to register a user callback. - Function @ref HAL_SMARTCARD_RegisterCallback() allows to register following callbacks: + Use Function HAL_SMARTCARD_RegisterCallback() to register a user callback. + Function HAL_SMARTCARD_RegisterCallback() allows to register following callbacks: (+) TxCpltCallback : Tx Complete Callback. (+) RxCpltCallback : Rx Complete Callback. (+) ErrorCallback : Error Callback. @@ -123,9 +123,9 @@ and a pointer to the user callback function. [..] - Use function @ref HAL_SMARTCARD_UnRegisterCallback() to reset a callback to the default + Use function HAL_SMARTCARD_UnRegisterCallback() to reset a callback to the default weak (surcharged) function. - @ref HAL_SMARTCARD_UnRegisterCallback() takes as parameters the HAL peripheral handle, + HAL_SMARTCARD_UnRegisterCallback() takes as parameters the HAL peripheral handle, and the Callback ID. This function allows to reset following callbacks: (+) TxCpltCallback : Tx Complete Callback. @@ -140,13 +140,13 @@ (+) MspDeInitCallback : SMARTCARD MspDeInit. [..] - By default, after the @ref HAL_SMARTCARD_Init() and when the state is HAL_SMARTCARD_STATE_RESET + By default, after the HAL_SMARTCARD_Init() and when the state is HAL_SMARTCARD_STATE_RESET all callbacks are set to the corresponding weak (surcharged) functions: - examples @ref HAL_SMARTCARD_TxCpltCallback(), @ref HAL_SMARTCARD_RxCpltCallback(). + examples HAL_SMARTCARD_TxCpltCallback(), HAL_SMARTCARD_RxCpltCallback(). Exception done for MspInit and MspDeInit functions that are respectively - reset to the legacy weak (surcharged) functions in the @ref HAL_SMARTCARD_Init() - and @ref HAL_SMARTCARD_DeInit() only when these callbacks are null (not registered beforehand). - If not, MspInit or MspDeInit are not null, the @ref HAL_SMARTCARD_Init() and @ref HAL_SMARTCARD_DeInit() + reset to the legacy weak (surcharged) functions in the HAL_SMARTCARD_Init() + and HAL_SMARTCARD_DeInit() only when these callbacks are null (not registered beforehand). + If not, MspInit or MspDeInit are not null, the HAL_SMARTCARD_Init() and HAL_SMARTCARD_DeInit() keep and use the user MspInit/MspDeInit callbacks (registered beforehand). [..] @@ -155,8 +155,8 @@ in HAL_SMARTCARD_STATE_READY or HAL_SMARTCARD_STATE_RESET state, thus registered (user) MspInit/DeInit callbacks can be used during the Init/DeInit. In that case first register the MspInit/MspDeInit user callbacks - using @ref HAL_SMARTCARD_RegisterCallback() before calling @ref HAL_SMARTCARD_DeInit() - or @ref HAL_SMARTCARD_Init() function. + using HAL_SMARTCARD_RegisterCallback() before calling HAL_SMARTCARD_DeInit() + or HAL_SMARTCARD_Init() function. [..] When The compilation define USE_HAL_SMARTCARD_REGISTER_CALLBACKS is set to 0 or @@ -725,62 +725,62 @@ HAL_StatusTypeDef HAL_SMARTCARD_UnRegisterCallback(SMARTCARD_HandleTypeDef *hsma (+) 1.5 stop bits when transmitting and receiving: where STOP=11 in the USART_CR2 register. [..] - (+) There are two modes of transfer: - (++) Blocking mode: The communication is performed in polling mode. + (#) There are two modes of transfer: + (##) Blocking mode: The communication is performed in polling mode. The HAL status of all data processing is returned by the same function after finishing transfer. - (++) Non-Blocking mode: The communication is performed using Interrupts + (##) Non-Blocking mode: The communication is performed using Interrupts or DMA, the relevant API's return the HAL status. The end of the data processing will be indicated through the dedicated SMARTCARD IRQ when using Interrupt mode or the DMA IRQ when using DMA mode. - (++) The HAL_SMARTCARD_TxCpltCallback(), HAL_SMARTCARD_RxCpltCallback() user callbacks + (##) The HAL_SMARTCARD_TxCpltCallback(), HAL_SMARTCARD_RxCpltCallback() user callbacks will be executed respectively at the end of the Transmit or Receive process The HAL_SMARTCARD_ErrorCallback() user callback will be executed when a communication error is detected. - (+) Blocking mode APIs are : - (++) HAL_SMARTCARD_Transmit() - (++) HAL_SMARTCARD_Receive() + (#) Blocking mode APIs are : + (##) HAL_SMARTCARD_Transmit() + (##) HAL_SMARTCARD_Receive() - (+) Non Blocking mode APIs with Interrupt are : - (++) HAL_SMARTCARD_Transmit_IT() - (++) HAL_SMARTCARD_Receive_IT() - (++) HAL_SMARTCARD_IRQHandler() + (#) Non Blocking mode APIs with Interrupt are : + (##) HAL_SMARTCARD_Transmit_IT() + (##) HAL_SMARTCARD_Receive_IT() + (##) HAL_SMARTCARD_IRQHandler() - (+) Non Blocking mode functions with DMA are : - (++) HAL_SMARTCARD_Transmit_DMA() - (++) HAL_SMARTCARD_Receive_DMA() + (#) Non Blocking mode functions with DMA are : + (##) HAL_SMARTCARD_Transmit_DMA() + (##) HAL_SMARTCARD_Receive_DMA() - (+) A set of Transfer Complete Callbacks are provided in non Blocking mode: - (++) HAL_SMARTCARD_TxCpltCallback() - (++) HAL_SMARTCARD_RxCpltCallback() - (++) HAL_SMARTCARD_ErrorCallback() + (#) A set of Transfer Complete Callbacks are provided in non Blocking mode: + (##) HAL_SMARTCARD_TxCpltCallback() + (##) HAL_SMARTCARD_RxCpltCallback() + (##) HAL_SMARTCARD_ErrorCallback() [..] (#) Non-Blocking mode transfers could be aborted using Abort API's : - (++) HAL_SMARTCARD_Abort() - (++) HAL_SMARTCARD_AbortTransmit() - (++) HAL_SMARTCARD_AbortReceive() - (++) HAL_SMARTCARD_Abort_IT() - (++) HAL_SMARTCARD_AbortTransmit_IT() - (++) HAL_SMARTCARD_AbortReceive_IT() + (##) HAL_SMARTCARD_Abort() + (##) HAL_SMARTCARD_AbortTransmit() + (##) HAL_SMARTCARD_AbortReceive() + (##) HAL_SMARTCARD_Abort_IT() + (##) HAL_SMARTCARD_AbortTransmit_IT() + (##) HAL_SMARTCARD_AbortReceive_IT() (#) For Abort services based on interrupts (HAL_SMARTCARD_Abortxxx_IT), a set of Abort Complete Callbacks are provided: - (++) HAL_SMARTCARD_AbortCpltCallback() - (++) HAL_SMARTCARD_AbortTransmitCpltCallback() - (++) HAL_SMARTCARD_AbortReceiveCpltCallback() + (##) HAL_SMARTCARD_AbortCpltCallback() + (##) HAL_SMARTCARD_AbortTransmitCpltCallback() + (##) HAL_SMARTCARD_AbortReceiveCpltCallback() (#) In Non-Blocking mode transfers, possible errors are split into 2 categories. Errors are handled as follows : - (++) Error is considered as Recoverable and non blocking : Transfer could go till end, but error severity is - to be evaluated by user : this concerns Frame Error, Parity Error or Noise Error in Interrupt mode reception . - Received character is then retrieved and stored in Rx buffer, Error code is set to allow user to identify error type, - and HAL_SMARTCARD_ErrorCallback() user callback is executed. Transfer is kept ongoing on SMARTCARD side. - If user wants to abort it, Abort services should be called by user. - (++) Error is considered as Blocking : Transfer could not be completed properly and is aborted. - This concerns Frame Error in Interrupt mode tranmission, Overrun Error in Interrupt mode reception and all errors in DMA mode. - Error code is set to allow user to identify error type, and HAL_SMARTCARD_ErrorCallback() user callback is executed. + (##) Error is considered as Recoverable and non blocking : Transfer could go till end, but error severity is + to be evaluated by user : this concerns Frame Error, Parity Error or Noise Error in Interrupt mode reception . + Received character is then retrieved and stored in Rx buffer, Error code is set to allow user to identify error type, + and HAL_SMARTCARD_ErrorCallback() user callback is executed. Transfer is kept ongoing on SMARTCARD side. + If user wants to abort it, Abort services should be called by user. + (##) Error is considered as Blocking : Transfer could not be completed properly and is aborted. + This concerns Frame Error in Interrupt mode tranmission, Overrun Error in Interrupt mode reception and all errors in DMA mode. + Error code is set to allow user to identify error type, and HAL_SMARTCARD_ErrorCallback() user callback is executed. @endverbatim * @{ @@ -824,14 +824,23 @@ HAL_StatusTypeDef HAL_SMARTCARD_Transmit(SMARTCARD_HandleTypeDef *hsmartcard, ui /* Disable the Peripheral first to update mode for TX master */ CLEAR_BIT(hsmartcard->Instance->CR1, USART_CR1_UE); - /* Disable Rx, enable Tx */ - CLEAR_BIT(hsmartcard->Instance->CR1, USART_CR1_RE); - SET_BIT(hsmartcard->Instance->RQR, (uint16_t)SMARTCARD_RXDATA_FLUSH_REQUEST); + /* In case of TX only mode, if NACK is enabled, the USART must be able to monitor + the bidirectional line to detect a NACK signal in case of parity error. + Therefore, the receiver block must be enabled as well (RE bit must be set). */ + if ((hsmartcard->Init.Mode == SMARTCARD_MODE_TX) + && (hsmartcard->Init.NACKEnable == SMARTCARD_NACK_ENABLE)) + { + SET_BIT(hsmartcard->Instance->CR1, USART_CR1_RE); + } + /* Enable Tx */ SET_BIT(hsmartcard->Instance->CR1, USART_CR1_TE); /* Enable the Peripheral */ SET_BIT(hsmartcard->Instance->CR1, USART_CR1_UE); + /* Perform a TX/RX FIFO Flush */ + __HAL_SMARTCARD_FLUSH_DRREGISTER(hsmartcard); + hsmartcard->ErrorCode = HAL_SMARTCARD_ERROR_NONE; hsmartcard->TxXferSize = Size; hsmartcard->TxXferCount = Size; @@ -851,15 +860,23 @@ HAL_StatusTypeDef HAL_SMARTCARD_Transmit(SMARTCARD_HandleTypeDef *hsmartcard, ui { return HAL_TIMEOUT; } - /* Re-enable Rx at end of transmission if initial mode is Rx/Tx */ - if (hsmartcard->Init.Mode == SMARTCARD_MODE_TX_RX) + + /* Disable the Peripheral first to update mode */ + CLEAR_BIT(hsmartcard->Instance->CR1, USART_CR1_UE); + if ((hsmartcard->Init.Mode == SMARTCARD_MODE_TX) + && (hsmartcard->Init.NACKEnable == SMARTCARD_NACK_ENABLE)) { - /* Disable the Peripheral first to update modes */ - CLEAR_BIT(hsmartcard->Instance->CR1, USART_CR1_UE); - SET_BIT(hsmartcard->Instance->CR1, USART_CR1_RE); - /* Enable the Peripheral */ - SET_BIT(hsmartcard->Instance->CR1, USART_CR1_UE); + /* In case of TX only mode, if NACK is enabled, receiver block has been enabled + for Transmit phase. Disable this receiver block. */ + CLEAR_BIT(hsmartcard->Instance->CR1, USART_CR1_RE); } + if ((hsmartcard->Init.Mode == SMARTCARD_MODE_TX_RX) + || (hsmartcard->Init.NACKEnable == SMARTCARD_NACK_ENABLE)) + { + /* Perform a TX FIFO Flush at end of Tx phase, as all sent bytes are appearing in Rx Data register */ + __HAL_SMARTCARD_FLUSH_DRREGISTER(hsmartcard); + } + SET_BIT(hsmartcard->Instance->CR1, USART_CR1_UE); /* At end of Tx process, restore hsmartcard->gState to Ready */ hsmartcard->gState = HAL_SMARTCARD_STATE_READY; @@ -980,14 +997,23 @@ HAL_StatusTypeDef HAL_SMARTCARD_Transmit_IT(SMARTCARD_HandleTypeDef *hsmartcard, /* Disable the Peripheral first to update mode for TX master */ CLEAR_BIT(hsmartcard->Instance->CR1, USART_CR1_UE); - /* Disable Rx, enable Tx */ - CLEAR_BIT(hsmartcard->Instance->CR1, USART_CR1_RE); - SET_BIT(hsmartcard->Instance->RQR, (uint16_t)SMARTCARD_RXDATA_FLUSH_REQUEST); + /* In case of TX only mode, if NACK is enabled, the USART must be able to monitor + the bidirectional line to detect a NACK signal in case of parity error. + Therefore, the receiver block must be enabled as well (RE bit must be set). */ + if ((hsmartcard->Init.Mode == SMARTCARD_MODE_TX) + && (hsmartcard->Init.NACKEnable == SMARTCARD_NACK_ENABLE)) + { + SET_BIT(hsmartcard->Instance->CR1, USART_CR1_RE); + } + /* Enable Tx */ SET_BIT(hsmartcard->Instance->CR1, USART_CR1_TE); /* Enable the Peripheral */ SET_BIT(hsmartcard->Instance->CR1, USART_CR1_UE); + /* Perform a TX/RX FIFO Flush */ + __HAL_SMARTCARD_FLUSH_DRREGISTER(hsmartcard); + /* Configure Tx interrupt processing */ if (hsmartcard->FifoMode == SMARTCARD_FIFOMODE_ENABLE) { @@ -1128,14 +1154,23 @@ HAL_StatusTypeDef HAL_SMARTCARD_Transmit_DMA(SMARTCARD_HandleTypeDef *hsmartcard /* Disable the Peripheral first to update mode for TX master */ CLEAR_BIT(hsmartcard->Instance->CR1, USART_CR1_UE); - /* Disable Rx, enable Tx */ - CLEAR_BIT(hsmartcard->Instance->CR1, USART_CR1_RE); - SET_BIT(hsmartcard->Instance->RQR, (uint16_t)SMARTCARD_RXDATA_FLUSH_REQUEST); + /* In case of TX only mode, if NACK is enabled, the USART must be able to monitor + the bidirectional line to detect a NACK signal in case of parity error. + Therefore, the receiver block must be enabled as well (RE bit must be set). */ + if ((hsmartcard->Init.Mode == SMARTCARD_MODE_TX) + && (hsmartcard->Init.NACKEnable == SMARTCARD_NACK_ENABLE)) + { + SET_BIT(hsmartcard->Instance->CR1, USART_CR1_RE); + } + /* Enable Tx */ SET_BIT(hsmartcard->Instance->CR1, USART_CR1_TE); /* Enable the Peripheral */ SET_BIT(hsmartcard->Instance->CR1, USART_CR1_UE); + /* Perform a TX/RX FIFO Flush */ + __HAL_SMARTCARD_FLUSH_DRREGISTER(hsmartcard); + /* Set the SMARTCARD DMA transfer complete callback */ hsmartcard->hdmatx->XferCpltCallback = SMARTCARD_DMATransmitCplt; @@ -2966,15 +3001,22 @@ static void SMARTCARD_EndTransmit_IT(SMARTCARD_HandleTypeDef *hsmartcard) CLEAR_BIT(hsmartcard->Instance->CR3, USART_CR3_EIE); } - /* Re-enable Rx at end of transmission if initial mode is Rx/Tx */ - if (hsmartcard->Init.Mode == SMARTCARD_MODE_TX_RX) + /* Disable the Peripheral first to update mode */ + CLEAR_BIT(hsmartcard->Instance->CR1, USART_CR1_UE); + if ((hsmartcard->Init.Mode == SMARTCARD_MODE_TX) + && (hsmartcard->Init.NACKEnable == SMARTCARD_NACK_ENABLE)) { - /* Disable the Peripheral first to update modes */ - CLEAR_BIT(hsmartcard->Instance->CR1, USART_CR1_UE); - SET_BIT(hsmartcard->Instance->CR1, USART_CR1_RE); - /* Enable the Peripheral */ - SET_BIT(hsmartcard->Instance->CR1, USART_CR1_UE); + /* In case of TX only mode, if NACK is enabled, receiver block has been enabled + for Transmit phase. Disable this receiver block. */ + CLEAR_BIT(hsmartcard->Instance->CR1, USART_CR1_RE); } + if ((hsmartcard->Init.Mode == SMARTCARD_MODE_TX_RX) + || (hsmartcard->Init.NACKEnable == SMARTCARD_NACK_ENABLE)) + { + /* Perform a TX FIFO Flush at end of Tx phase, as all sent bytes are appearing in Rx Data register */ + __HAL_SMARTCARD_FLUSH_DRREGISTER(hsmartcard); + } + SET_BIT(hsmartcard->Instance->CR1, USART_CR1_UE); /* Tx process is ended, restore hsmartcard->gState to Ready */ hsmartcard->gState = HAL_SMARTCARD_STATE_READY; diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_smartcard_ex.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_smartcard_ex.c index 3262fd6..0ed75a3 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_smartcard_ex.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_smartcard_ex.c @@ -59,10 +59,10 @@ * @{ */ /* UART RX FIFO depth */ -#define RX_FIFO_DEPTH 8U +#define RX_FIFO_DEPTH 16U /* UART TX FIFO depth */ -#define TX_FIFO_DEPTH 8U +#define TX_FIFO_DEPTH 16U /** * @} */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_smbus.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_smbus.c index 519756d..5bfcf47 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_smbus.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_smbus.c @@ -203,18 +203,18 @@ /** @addtogroup SMBUS_Private_Functions SMBUS Private Functions * @{ */ -static HAL_StatusTypeDef SMBUS_WaitOnFlagUntilTimeout(struct __SMBUS_HandleTypeDef *hsmbus, uint32_t Flag, FlagStatus Status, uint32_t Timeout); +static HAL_StatusTypeDef SMBUS_WaitOnFlagUntilTimeout(SMBUS_HandleTypeDef *hsmbus, uint32_t Flag, FlagStatus Status, uint32_t Timeout); -static void SMBUS_Enable_IRQ(struct __SMBUS_HandleTypeDef *hsmbus, uint32_t InterruptRequest); -static void SMBUS_Disable_IRQ(struct __SMBUS_HandleTypeDef *hsmbus, uint32_t InterruptRequest); -static HAL_StatusTypeDef SMBUS_Master_ISR(struct __SMBUS_HandleTypeDef *hsmbus, uint32_t StatusFlags); -static HAL_StatusTypeDef SMBUS_Slave_ISR(struct __SMBUS_HandleTypeDef *hsmbus, uint32_t StatusFlags); +static void SMBUS_Enable_IRQ(SMBUS_HandleTypeDef *hsmbus, uint32_t InterruptRequest); +static void SMBUS_Disable_IRQ(SMBUS_HandleTypeDef *hsmbus, uint32_t InterruptRequest); +static HAL_StatusTypeDef SMBUS_Master_ISR(SMBUS_HandleTypeDef *hsmbus, uint32_t StatusFlags); +static HAL_StatusTypeDef SMBUS_Slave_ISR(SMBUS_HandleTypeDef *hsmbus, uint32_t StatusFlags); -static void SMBUS_ConvertOtherXferOptions(struct __SMBUS_HandleTypeDef *hsmbus); +static void SMBUS_ConvertOtherXferOptions(SMBUS_HandleTypeDef *hsmbus); -static void SMBUS_ITErrorHandler(struct __SMBUS_HandleTypeDef *hsmbus); +static void SMBUS_ITErrorHandler(SMBUS_HandleTypeDef *hsmbus); -static void SMBUS_TransferConfig(struct __SMBUS_HandleTypeDef *hsmbus, uint16_t DevAddress, uint8_t Size, uint32_t Mode, uint32_t Request); +static void SMBUS_TransferConfig(SMBUS_HandleTypeDef *hsmbus, uint16_t DevAddress, uint8_t Size, uint32_t Mode, uint32_t Request); /** * @} */ @@ -1801,7 +1801,7 @@ uint32_t HAL_SMBUS_GetError(SMBUS_HandleTypeDef *hsmbus) * @param StatusFlags Value of Interrupt Flags. * @retval HAL status */ -static HAL_StatusTypeDef SMBUS_Master_ISR(struct __SMBUS_HandleTypeDef *hsmbus, uint32_t StatusFlags) +static HAL_StatusTypeDef SMBUS_Master_ISR(SMBUS_HandleTypeDef *hsmbus, uint32_t StatusFlags) { uint16_t DevAddress; @@ -2085,7 +2085,7 @@ static HAL_StatusTypeDef SMBUS_Master_ISR(struct __SMBUS_HandleTypeDef *hsmbus, * @param StatusFlags Value of Interrupt Flags. * @retval HAL status */ -static HAL_StatusTypeDef SMBUS_Slave_ISR(struct __SMBUS_HandleTypeDef *hsmbus, uint32_t StatusFlags) +static HAL_StatusTypeDef SMBUS_Slave_ISR(SMBUS_HandleTypeDef *hsmbus, uint32_t StatusFlags) { uint8_t TransferDirection; uint16_t SlaveAddrCode; @@ -2341,7 +2341,7 @@ static HAL_StatusTypeDef SMBUS_Slave_ISR(struct __SMBUS_HandleTypeDef *hsmbus, u * @param InterruptRequest Value of @ref SMBUS_Interrupt_configuration_definition. * @retval HAL status */ -static void SMBUS_Enable_IRQ(struct __SMBUS_HandleTypeDef *hsmbus, uint32_t InterruptRequest) +static void SMBUS_Enable_IRQ(SMBUS_HandleTypeDef *hsmbus, uint32_t InterruptRequest) { uint32_t tmpisr = 0UL; @@ -2381,7 +2381,7 @@ static void SMBUS_Enable_IRQ(struct __SMBUS_HandleTypeDef *hsmbus, uint32_t Inte * @param InterruptRequest Value of @ref SMBUS_Interrupt_configuration_definition. * @retval HAL status */ -static void SMBUS_Disable_IRQ(struct __SMBUS_HandleTypeDef *hsmbus, uint32_t InterruptRequest) +static void SMBUS_Disable_IRQ(SMBUS_HandleTypeDef *hsmbus, uint32_t InterruptRequest) { uint32_t tmpisr = 0UL; uint32_t tmpstate = hsmbus->State; @@ -2453,7 +2453,7 @@ static void SMBUS_Disable_IRQ(struct __SMBUS_HandleTypeDef *hsmbus, uint32_t Int * @param hsmbus SMBUS handle. * @retval None */ -static void SMBUS_ITErrorHandler(struct __SMBUS_HandleTypeDef *hsmbus) +static void SMBUS_ITErrorHandler(SMBUS_HandleTypeDef *hsmbus) { uint32_t itflags = READ_REG(hsmbus->Instance->ISR); uint32_t itsources = READ_REG(hsmbus->Instance->CR1); @@ -2554,7 +2554,7 @@ static void SMBUS_ITErrorHandler(struct __SMBUS_HandleTypeDef *hsmbus) * @param Timeout Timeout duration * @retval HAL status */ -static HAL_StatusTypeDef SMBUS_WaitOnFlagUntilTimeout(struct __SMBUS_HandleTypeDef *hsmbus, uint32_t Flag, FlagStatus Status, uint32_t Timeout) +static HAL_StatusTypeDef SMBUS_WaitOnFlagUntilTimeout(SMBUS_HandleTypeDef *hsmbus, uint32_t Flag, FlagStatus Status, uint32_t Timeout) { uint32_t tickstart = HAL_GetTick(); @@ -2603,7 +2603,7 @@ static HAL_StatusTypeDef SMBUS_WaitOnFlagUntilTimeout(struct __SMBUS_HandleTypeD * @arg @ref SMBUS_GENERATE_START_WRITE Generate Restart for write request. * @retval None */ -static void SMBUS_TransferConfig(struct __SMBUS_HandleTypeDef *hsmbus, uint16_t DevAddress, uint8_t Size, uint32_t Mode, uint32_t Request) +static void SMBUS_TransferConfig(SMBUS_HandleTypeDef *hsmbus, uint16_t DevAddress, uint8_t Size, uint32_t Mode, uint32_t Request) { /* Check the parameters */ assert_param(IS_SMBUS_ALL_INSTANCE(hsmbus->Instance)); @@ -2620,7 +2620,7 @@ static void SMBUS_TransferConfig(struct __SMBUS_HandleTypeDef *hsmbus, uint16_t * @param hsmbus SMBUS handle. * @retval None */ -static void SMBUS_ConvertOtherXferOptions(struct __SMBUS_HandleTypeDef *hsmbus) +static void SMBUS_ConvertOtherXferOptions(SMBUS_HandleTypeDef *hsmbus) { /* if user set XferOptions to SMBUS_OTHER_FRAME_NO_PEC */ /* it request implicitly to generate a restart condition */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spdifrx.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spdifrx.c index 2d27b27..ee9619e 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spdifrx.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spdifrx.c @@ -853,7 +853,7 @@ HAL_StatusTypeDef HAL_SPDIFRX_ReceiveCtrlFlow(SPDIFRX_HandleTypeDef *hspdif, uin */ HAL_StatusTypeDef HAL_SPDIFRX_ReceiveDataFlow_IT(SPDIFRX_HandleTypeDef *hspdif, uint32_t *pData, uint16_t Size) { - register uint32_t count = SPDIFRX_TIMEOUT_VALUE * (SystemCoreClock / 24U / 1000U); + uint32_t count = SPDIFRX_TIMEOUT_VALUE * (SystemCoreClock / 24U / 1000U); const HAL_SPDIFRX_StateTypeDef tempState = hspdif->State; @@ -938,7 +938,7 @@ HAL_StatusTypeDef HAL_SPDIFRX_ReceiveDataFlow_IT(SPDIFRX_HandleTypeDef *hspdif, */ HAL_StatusTypeDef HAL_SPDIFRX_ReceiveCtrlFlow_IT(SPDIFRX_HandleTypeDef *hspdif, uint32_t *pData, uint16_t Size) { - register uint32_t count = SPDIFRX_TIMEOUT_VALUE * (SystemCoreClock / 24U / 1000U); + uint32_t count = SPDIFRX_TIMEOUT_VALUE * (SystemCoreClock / 24U / 1000U); const HAL_SPDIFRX_StateTypeDef tempState = hspdif->State; @@ -1023,7 +1023,7 @@ HAL_StatusTypeDef HAL_SPDIFRX_ReceiveCtrlFlow_IT(SPDIFRX_HandleTypeDef *hspdif, */ HAL_StatusTypeDef HAL_SPDIFRX_ReceiveDataFlow_DMA(SPDIFRX_HandleTypeDef *hspdif, uint32_t *pData, uint16_t Size) { - register uint32_t count = SPDIFRX_TIMEOUT_VALUE * (SystemCoreClock / 24U / 1000U); + uint32_t count = SPDIFRX_TIMEOUT_VALUE * (SystemCoreClock / 24U / 1000U); const HAL_SPDIFRX_StateTypeDef tempState = hspdif->State; @@ -1124,7 +1124,7 @@ HAL_StatusTypeDef HAL_SPDIFRX_ReceiveDataFlow_DMA(SPDIFRX_HandleTypeDef *hspdif, */ HAL_StatusTypeDef HAL_SPDIFRX_ReceiveCtrlFlow_DMA(SPDIFRX_HandleTypeDef *hspdif, uint32_t *pData, uint16_t Size) { - register uint32_t count = SPDIFRX_TIMEOUT_VALUE * (SystemCoreClock / 24U / 1000U); + uint32_t count = SPDIFRX_TIMEOUT_VALUE * (SystemCoreClock / 24U / 1000U); const HAL_SPDIFRX_StateTypeDef tempState = hspdif->State; diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.c index 0d3f32b..cf5e3e2 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.c @@ -1321,20 +1321,20 @@ HAL_StatusTypeDef HAL_SPI_TransmitReceive(SPI_HandleTypeDef *hspi, uint8_t *pTxD hspi->RxXferCount --; initial_RxXferCount = hspi->RxXferCount; } - } - /* Timeout management */ - if ((((HAL_GetTick() - tickstart) >= Timeout) && (Timeout != HAL_MAX_DELAY)) || (Timeout == 0U)) - { - /* Call standard close procedure with error check */ - SPI_CloseTransfer(hspi); - - /* Process Unlocked */ - __HAL_UNLOCK(hspi); - - SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_TIMEOUT); - hspi->State = HAL_SPI_STATE_READY; - return HAL_ERROR; + /* Timeout management */ + if ((((HAL_GetTick() - tickstart) >= Timeout) && (Timeout != HAL_MAX_DELAY)) || (Timeout == 0U)) + { + /* Call standard close procedure with error check */ + SPI_CloseTransfer(hspi); + + /* Process Unlocked */ + __HAL_UNLOCK(hspi); + + SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_TIMEOUT); + hspi->State = HAL_SPI_STATE_READY; + return HAL_ERROR; + } } } /* Transmit and Receive data in 16 Bit mode */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim.c index 1885d04..0c68efe 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim.c @@ -199,7 +199,7 @@ all interrupt callbacks are set to the corresponding weak functions: /* Private typedef -----------------------------------------------------------*/ /* Private define ------------------------------------------------------------*/ -/* Private macro -------------------------------------------------------------*/ +/* Private macros ------------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ /* Private function prototypes -----------------------------------------------*/ /** @addtogroup TIM_Private_Functions @@ -221,6 +221,7 @@ static void TIM_TI4_SetConfig(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32 static void TIM_ITRx_SetConfig(TIM_TypeDef *TIMx, uint32_t InputTriggerSource); static void TIM_DMAPeriodElapsedCplt(DMA_HandleTypeDef *hdma); static void TIM_DMAPeriodElapsedHalfCplt(DMA_HandleTypeDef *hdma); +static void TIM_DMADelayPulseCplt(DMA_HandleTypeDef *hdma); static void TIM_DMATriggerCplt(DMA_HandleTypeDef *hdma); static void TIM_DMATriggerHalfCplt(DMA_HandleTypeDef *hdma); static HAL_StatusTypeDef TIM_SlaveTimer_SetConfig(TIM_HandleTypeDef *htim, @@ -306,6 +307,13 @@ HAL_StatusTypeDef HAL_TIM_Base_Init(TIM_HandleTypeDef *htim) /* Set the Time Base configuration */ TIM_Base_SetConfig(htim->Instance, &htim->Init); + /* Initialize the DMA burst operation state */ + htim->DMABurstState = HAL_DMA_BURST_STATE_READY; + + /* Initialize the TIM channels state */ + TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY); + /* Initialize the TIM state*/ htim->State = HAL_TIM_STATE_READY; @@ -339,6 +347,13 @@ HAL_StatusTypeDef HAL_TIM_Base_DeInit(TIM_HandleTypeDef *htim) HAL_TIM_Base_MspDeInit(htim); #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ + /* Change the DMA burst operation state */ + htim->DMABurstState = HAL_DMA_BURST_STATE_RESET; + + /* Change the TIM channels state */ + TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_RESET); + TIM_CHANNEL_N_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_RESET); + /* Change TIM state */ htim->State = HAL_TIM_STATE_RESET; @@ -391,6 +406,12 @@ HAL_StatusTypeDef HAL_TIM_Base_Start(TIM_HandleTypeDef *htim) /* Check the parameters */ assert_param(IS_TIM_INSTANCE(htim->Instance)); + /* Check the TIM state */ + if (htim->State != HAL_TIM_STATE_READY) + { + return HAL_ERROR; + } + /* Set the TIM state */ htim->State = HAL_TIM_STATE_BUSY; @@ -401,9 +422,6 @@ HAL_StatusTypeDef HAL_TIM_Base_Start(TIM_HandleTypeDef *htim) __HAL_TIM_ENABLE(htim); } - /* Change the TIM state*/ - htim->State = HAL_TIM_STATE_READY; - /* Return function status */ return HAL_OK; } @@ -418,13 +436,10 @@ HAL_StatusTypeDef HAL_TIM_Base_Stop(TIM_HandleTypeDef *htim) /* Check the parameters */ assert_param(IS_TIM_INSTANCE(htim->Instance)); - /* Set the TIM state */ - htim->State = HAL_TIM_STATE_BUSY; - /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); - /* Change the TIM state*/ + /* Set the TIM state */ htim->State = HAL_TIM_STATE_READY; /* Return function status */ @@ -443,6 +458,15 @@ HAL_StatusTypeDef HAL_TIM_Base_Start_IT(TIM_HandleTypeDef *htim) /* Check the parameters */ assert_param(IS_TIM_INSTANCE(htim->Instance)); + /* Check the TIM state */ + if (htim->State != HAL_TIM_STATE_READY) + { + return HAL_ERROR; + } + + /* Set the TIM state */ + htim->State = HAL_TIM_STATE_BUSY; + /* Enable the TIM Update interrupt */ __HAL_TIM_ENABLE_IT(htim, TIM_IT_UPDATE); @@ -466,12 +490,16 @@ HAL_StatusTypeDef HAL_TIM_Base_Stop_IT(TIM_HandleTypeDef *htim) { /* Check the parameters */ assert_param(IS_TIM_INSTANCE(htim->Instance)); + /* Disable the TIM Update interrupt */ __HAL_TIM_DISABLE_IT(htim, TIM_IT_UPDATE); /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); + /* Set the TIM state */ + htim->State = HAL_TIM_STATE_READY; + /* Return function status */ return HAL_OK; } @@ -490,6 +518,7 @@ HAL_StatusTypeDef HAL_TIM_Base_Start_DMA(TIM_HandleTypeDef *htim, uint32_t *pDat /* Check the parameters */ assert_param(IS_TIM_DMA_INSTANCE(htim->Instance)); + /* Set the TIM state */ if (htim->State == HAL_TIM_STATE_BUSY) { return HAL_BUSY; @@ -507,7 +536,7 @@ HAL_StatusTypeDef HAL_TIM_Base_Start_DMA(TIM_HandleTypeDef *htim, uint32_t *pDat } else { - /* nothing to do */ + return HAL_ERROR; } /* Set the DMA Period elapsed callbacks */ @@ -555,7 +584,7 @@ HAL_StatusTypeDef HAL_TIM_Base_Stop_DMA(TIM_HandleTypeDef *htim) /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); - /* Change the htim state */ + /* Set the TIM state */ htim->State = HAL_TIM_STATE_READY; /* Return function status */ @@ -638,6 +667,13 @@ HAL_StatusTypeDef HAL_TIM_OC_Init(TIM_HandleTypeDef *htim) /* Init the base time for the Output Compare */ TIM_Base_SetConfig(htim->Instance, &htim->Init); + /* Initialize the DMA burst operation state */ + htim->DMABurstState = HAL_DMA_BURST_STATE_READY; + + /* Initialize the TIM channels state */ + TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY); + /* Initialize the TIM state*/ htim->State = HAL_TIM_STATE_READY; @@ -671,6 +707,13 @@ HAL_StatusTypeDef HAL_TIM_OC_DeInit(TIM_HandleTypeDef *htim) HAL_TIM_OC_MspDeInit(htim); #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ + /* Change the DMA burst operation state */ + htim->DMABurstState = HAL_DMA_BURST_STATE_RESET; + + /* Change the TIM channels state */ + TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_RESET); + TIM_CHANNEL_N_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_RESET); + /* Change TIM state */ htim->State = HAL_TIM_STATE_RESET; @@ -730,6 +773,15 @@ HAL_StatusTypeDef HAL_TIM_OC_Start(TIM_HandleTypeDef *htim, uint32_t Channel) /* Check the parameters */ assert_param(IS_TIM_CCX_INSTANCE(htim->Instance, Channel)); + /* Check the TIM channel state */ + if (TIM_CHANNEL_STATE_GET(htim, Channel) != HAL_TIM_CHANNEL_STATE_READY) + { + return HAL_ERROR; + } + + /* Set the TIM channel state */ + TIM_CHANNEL_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY); + /* Enable the Output compare channel */ TIM_CCxChannelCmd(htim->Instance, Channel, TIM_CCx_ENABLE); @@ -780,6 +832,9 @@ HAL_StatusTypeDef HAL_TIM_OC_Stop(TIM_HandleTypeDef *htim, uint32_t Channel) /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); + /* Set the TIM channel state */ + TIM_CHANNEL_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY); + /* Return function status */ return HAL_OK; } @@ -802,6 +857,15 @@ HAL_StatusTypeDef HAL_TIM_OC_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel) /* Check the parameters */ assert_param(IS_TIM_CCX_INSTANCE(htim->Instance, Channel)); + /* Check the TIM channel state */ + if (TIM_CHANNEL_STATE_GET(htim, Channel) != HAL_TIM_CHANNEL_STATE_READY) + { + return HAL_ERROR; + } + + /* Set the TIM channel state */ + TIM_CHANNEL_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY); + switch (Channel) { case TIM_CHANNEL_1: @@ -918,6 +982,9 @@ HAL_StatusTypeDef HAL_TIM_OC_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel) /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); + /* Set the TIM channel state */ + TIM_CHANNEL_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY); + /* Return function status */ return HAL_OK; } @@ -942,11 +1009,12 @@ HAL_StatusTypeDef HAL_TIM_OC_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel /* Check the parameters */ assert_param(IS_TIM_CCX_INSTANCE(htim->Instance, Channel)); - if (htim->State == HAL_TIM_STATE_BUSY) + /* Set the TIM channel state */ + if (TIM_CHANNEL_STATE_GET(htim, Channel) == HAL_TIM_CHANNEL_STATE_BUSY) { return HAL_BUSY; } - else if (htim->State == HAL_TIM_STATE_READY) + else if (TIM_CHANNEL_STATE_GET(htim, Channel) == HAL_TIM_CHANNEL_STATE_READY) { if ((pData == NULL) && (Length > 0U)) { @@ -954,12 +1022,12 @@ HAL_StatusTypeDef HAL_TIM_OC_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel } else { - htim->State = HAL_TIM_STATE_BUSY; + TIM_CHANNEL_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY); } } else { - /* nothing to do */ + return HAL_ERROR; } switch (Channel) @@ -1132,8 +1200,8 @@ HAL_StatusTypeDef HAL_TIM_OC_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel) /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); - /* Change the htim state */ - htim->State = HAL_TIM_STATE_READY; + /* Set the TIM channel state */ + TIM_CHANNEL_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY); /* Return function status */ return HAL_OK; @@ -1215,6 +1283,13 @@ HAL_StatusTypeDef HAL_TIM_PWM_Init(TIM_HandleTypeDef *htim) /* Init the base time for the PWM */ TIM_Base_SetConfig(htim->Instance, &htim->Init); + /* Initialize the DMA burst operation state */ + htim->DMABurstState = HAL_DMA_BURST_STATE_READY; + + /* Initialize the TIM channels state */ + TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY); + /* Initialize the TIM state*/ htim->State = HAL_TIM_STATE_READY; @@ -1248,6 +1323,13 @@ HAL_StatusTypeDef HAL_TIM_PWM_DeInit(TIM_HandleTypeDef *htim) HAL_TIM_PWM_MspDeInit(htim); #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ + /* Change the DMA burst operation state */ + htim->DMABurstState = HAL_DMA_BURST_STATE_RESET; + + /* Change the TIM channels state */ + TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_RESET); + TIM_CHANNEL_N_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_RESET); + /* Change TIM state */ htim->State = HAL_TIM_STATE_RESET; @@ -1307,6 +1389,15 @@ HAL_StatusTypeDef HAL_TIM_PWM_Start(TIM_HandleTypeDef *htim, uint32_t Channel) /* Check the parameters */ assert_param(IS_TIM_CCX_INSTANCE(htim->Instance, Channel)); + /* Check the TIM channel state */ + if (TIM_CHANNEL_STATE_GET(htim, Channel) != HAL_TIM_CHANNEL_STATE_READY) + { + return HAL_ERROR; + } + + /* Set the TIM channel state */ + TIM_CHANNEL_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY); + /* Enable the Capture compare channel */ TIM_CCxChannelCmd(htim->Instance, Channel, TIM_CCx_ENABLE); @@ -1357,8 +1448,8 @@ HAL_StatusTypeDef HAL_TIM_PWM_Stop(TIM_HandleTypeDef *htim, uint32_t Channel) /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); - /* Change the htim state */ - htim->State = HAL_TIM_STATE_READY; + /* Set the TIM channel state */ + TIM_CHANNEL_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY); /* Return function status */ return HAL_OK; @@ -1381,6 +1472,15 @@ HAL_StatusTypeDef HAL_TIM_PWM_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel /* Check the parameters */ assert_param(IS_TIM_CCX_INSTANCE(htim->Instance, Channel)); + /* Check the TIM channel state */ + if (TIM_CHANNEL_STATE_GET(htim, Channel) != HAL_TIM_CHANNEL_STATE_READY) + { + return HAL_ERROR; + } + + /* Set the TIM channel state */ + TIM_CHANNEL_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY); + switch (Channel) { case TIM_CHANNEL_1: @@ -1497,6 +1597,9 @@ HAL_StatusTypeDef HAL_TIM_PWM_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel) /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); + /* Set the TIM channel state */ + TIM_CHANNEL_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY); + /* Return function status */ return HAL_OK; } @@ -1521,11 +1624,12 @@ HAL_StatusTypeDef HAL_TIM_PWM_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channe /* Check the parameters */ assert_param(IS_TIM_CCX_INSTANCE(htim->Instance, Channel)); - if (htim->State == HAL_TIM_STATE_BUSY) + /* Set the TIM channel state */ + if (TIM_CHANNEL_STATE_GET(htim, Channel) == HAL_TIM_CHANNEL_STATE_BUSY) { return HAL_BUSY; } - else if (htim->State == HAL_TIM_STATE_READY) + else if (TIM_CHANNEL_STATE_GET(htim, Channel) == HAL_TIM_CHANNEL_STATE_READY) { if ((pData == NULL) && (Length > 0U)) { @@ -1533,12 +1637,12 @@ HAL_StatusTypeDef HAL_TIM_PWM_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channe } else { - htim->State = HAL_TIM_STATE_BUSY; + TIM_CHANNEL_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY); } } else { - /* nothing to do */ + return HAL_ERROR; } switch (Channel) @@ -1710,8 +1814,8 @@ HAL_StatusTypeDef HAL_TIM_PWM_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); - /* Change the htim state */ - htim->State = HAL_TIM_STATE_READY; + /* Set the TIM channel state */ + TIM_CHANNEL_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY); /* Return function status */ return HAL_OK; @@ -1793,6 +1897,13 @@ HAL_StatusTypeDef HAL_TIM_IC_Init(TIM_HandleTypeDef *htim) /* Init the base time for the input capture */ TIM_Base_SetConfig(htim->Instance, &htim->Init); + /* Initialize the DMA burst operation state */ + htim->DMABurstState = HAL_DMA_BURST_STATE_READY; + + /* Initialize the TIM channels state */ + TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY); + /* Initialize the TIM state*/ htim->State = HAL_TIM_STATE_READY; @@ -1826,6 +1937,13 @@ HAL_StatusTypeDef HAL_TIM_IC_DeInit(TIM_HandleTypeDef *htim) HAL_TIM_IC_MspDeInit(htim); #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ + /* Change the DMA burst operation state */ + htim->DMABurstState = HAL_DMA_BURST_STATE_RESET; + + /* Change the TIM channels state */ + TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_RESET); + TIM_CHANNEL_N_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_RESET); + /* Change TIM state */ htim->State = HAL_TIM_STATE_RESET; @@ -1879,10 +1997,23 @@ __weak void HAL_TIM_IC_MspDeInit(TIM_HandleTypeDef *htim) HAL_StatusTypeDef HAL_TIM_IC_Start(TIM_HandleTypeDef *htim, uint32_t Channel) { uint32_t tmpsmcr; + HAL_TIM_ChannelStateTypeDef channel_state = TIM_CHANNEL_STATE_GET(htim, Channel); + HAL_TIM_ChannelStateTypeDef complementary_channel_state = TIM_CHANNEL_N_STATE_GET(htim, Channel); /* Check the parameters */ assert_param(IS_TIM_CCX_INSTANCE(htim->Instance, Channel)); + /* Check the TIM channel state */ + if ((channel_state != HAL_TIM_CHANNEL_STATE_READY) + || (complementary_channel_state != HAL_TIM_CHANNEL_STATE_READY)) + { + return HAL_ERROR; + } + + /* Set the TIM channel state */ + TIM_CHANNEL_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY); + /* Enable the Input Capture channel */ TIM_CCxChannelCmd(htim->Instance, Channel, TIM_CCx_ENABLE); @@ -1919,6 +2050,10 @@ HAL_StatusTypeDef HAL_TIM_IC_Stop(TIM_HandleTypeDef *htim, uint32_t Channel) /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); + /* Set the TIM channel state */ + TIM_CHANNEL_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY); + /* Return function status */ return HAL_OK; } @@ -1937,10 +2072,23 @@ HAL_StatusTypeDef HAL_TIM_IC_Stop(TIM_HandleTypeDef *htim, uint32_t Channel) HAL_StatusTypeDef HAL_TIM_IC_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel) { uint32_t tmpsmcr; + HAL_TIM_ChannelStateTypeDef channel_state = TIM_CHANNEL_STATE_GET(htim, Channel); + HAL_TIM_ChannelStateTypeDef complementary_channel_state = TIM_CHANNEL_N_STATE_GET(htim, Channel); /* Check the parameters */ assert_param(IS_TIM_CCX_INSTANCE(htim->Instance, Channel)); + /* Check the TIM channel state */ + if ((channel_state != HAL_TIM_CHANNEL_STATE_READY) + || (complementary_channel_state != HAL_TIM_CHANNEL_STATE_READY)) + { + return HAL_ERROR; + } + + /* Set the TIM channel state */ + TIM_CHANNEL_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY); + switch (Channel) { case TIM_CHANNEL_1: @@ -2044,6 +2192,10 @@ HAL_StatusTypeDef HAL_TIM_IC_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel) /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); + /* Set the TIM channel state */ + TIM_CHANNEL_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY); + /* Return function status */ return HAL_OK; } @@ -2064,16 +2216,21 @@ HAL_StatusTypeDef HAL_TIM_IC_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel) HAL_StatusTypeDef HAL_TIM_IC_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length) { uint32_t tmpsmcr; + HAL_TIM_ChannelStateTypeDef channel_state = TIM_CHANNEL_STATE_GET(htim, Channel); + HAL_TIM_ChannelStateTypeDef complementary_channel_state = TIM_CHANNEL_N_STATE_GET(htim, Channel); /* Check the parameters */ assert_param(IS_TIM_CCX_INSTANCE(htim->Instance, Channel)); assert_param(IS_TIM_DMA_CC_INSTANCE(htim->Instance)); - if (htim->State == HAL_TIM_STATE_BUSY) + /* Set the TIM channel state */ + if ((channel_state == HAL_TIM_CHANNEL_STATE_BUSY) + || (complementary_channel_state == HAL_TIM_CHANNEL_STATE_BUSY)) { return HAL_BUSY; } - else if (htim->State == HAL_TIM_STATE_READY) + else if ((channel_state == HAL_TIM_CHANNEL_STATE_READY) + && (complementary_channel_state == HAL_TIM_CHANNEL_STATE_READY)) { if ((pData == NULL) && (Length > 0U)) { @@ -2081,12 +2238,13 @@ HAL_StatusTypeDef HAL_TIM_IC_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel } else { - htim->State = HAL_TIM_STATE_BUSY; + TIM_CHANNEL_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY); } } else { - /* nothing to do */ + return HAL_ERROR; } switch (Channel) @@ -2202,6 +2360,9 @@ HAL_StatusTypeDef HAL_TIM_IC_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel) assert_param(IS_TIM_CCX_INSTANCE(htim->Instance, Channel)); assert_param(IS_TIM_DMA_CC_INSTANCE(htim->Instance)); + /* Disable the Input Capture channel */ + TIM_CCxChannelCmd(htim->Instance, Channel, TIM_CCx_DISABLE); + switch (Channel) { case TIM_CHANNEL_1: @@ -2240,14 +2401,12 @@ HAL_StatusTypeDef HAL_TIM_IC_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel) break; } - /* Disable the Input Capture channel */ - TIM_CCxChannelCmd(htim->Instance, Channel, TIM_CCx_DISABLE); - /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); - /* Change the htim state */ - htim->State = HAL_TIM_STATE_READY; + /* Set the TIM channel state */ + TIM_CHANNEL_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY); /* Return function status */ return HAL_OK; @@ -2284,6 +2443,9 @@ HAL_StatusTypeDef HAL_TIM_IC_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel) * requires a timer reset to avoid unexpected direction * due to DIR bit readonly in center aligned mode. * Ex: call @ref HAL_TIM_OnePulse_DeInit() before HAL_TIM_OnePulse_Init() + * @note When the timer instance is initialized in One Pulse mode, timer + * channels 1 and channel 2 are reserved and cannot be used for other + * purpose. * @param htim TIM One Pulse handle * @param OnePulseMode Select the One pulse mode. * This parameter can be one of the following values: @@ -2339,6 +2501,15 @@ HAL_StatusTypeDef HAL_TIM_OnePulse_Init(TIM_HandleTypeDef *htim, uint32_t OnePul /* Configure the OPM Mode */ htim->Instance->CR1 |= OnePulseMode; + /* Initialize the DMA burst operation state */ + htim->DMABurstState = HAL_DMA_BURST_STATE_READY; + + /* Initialize the TIM channels state */ + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY); + /* Initialize the TIM state*/ htim->State = HAL_TIM_STATE_READY; @@ -2372,6 +2543,15 @@ HAL_StatusTypeDef HAL_TIM_OnePulse_DeInit(TIM_HandleTypeDef *htim) HAL_TIM_OnePulse_MspDeInit(htim); #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ + /* Change the DMA burst operation state */ + htim->DMABurstState = HAL_DMA_BURST_STATE_RESET; + + /* Set the TIM channel state */ + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_RESET); + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_RESET); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_RESET); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_RESET); + /* Change TIM state */ htim->State = HAL_TIM_STATE_RESET; @@ -2422,9 +2602,29 @@ __weak void HAL_TIM_OnePulse_MspDeInit(TIM_HandleTypeDef *htim) */ HAL_StatusTypeDef HAL_TIM_OnePulse_Start(TIM_HandleTypeDef *htim, uint32_t OutputChannel) { + HAL_TIM_ChannelStateTypeDef channel_1_state = TIM_CHANNEL_STATE_GET(htim, TIM_CHANNEL_1); + HAL_TIM_ChannelStateTypeDef channel_2_state = TIM_CHANNEL_STATE_GET(htim, TIM_CHANNEL_2); + HAL_TIM_ChannelStateTypeDef complementary_channel_1_state = TIM_CHANNEL_N_STATE_GET(htim, TIM_CHANNEL_1); + HAL_TIM_ChannelStateTypeDef complementary_channel_2_state = TIM_CHANNEL_N_STATE_GET(htim, TIM_CHANNEL_2); + /* Prevent unused argument(s) compilation warning */ UNUSED(OutputChannel); + /* Check the TIM channels state */ + if ((channel_1_state != HAL_TIM_CHANNEL_STATE_READY) + || (channel_2_state != HAL_TIM_CHANNEL_STATE_READY) + || (complementary_channel_1_state != HAL_TIM_CHANNEL_STATE_READY) + || (complementary_channel_2_state != HAL_TIM_CHANNEL_STATE_READY)) + { + return HAL_ERROR; + } + + /* Set the TIM channels state */ + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY); + /* Enable the Capture compare and the Input Capture channels (in the OPM Mode the two possible channels that can be used are TIM_CHANNEL_1 and TIM_CHANNEL_2) if TIM_CHANNEL_1 is used as output, the TIM_CHANNEL_2 will be used as input and @@ -2479,6 +2679,12 @@ HAL_StatusTypeDef HAL_TIM_OnePulse_Stop(TIM_HandleTypeDef *htim, uint32_t Output /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); + /* Set the TIM channels state */ + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY); + /* Return function status */ return HAL_OK; } @@ -2494,9 +2700,29 @@ HAL_StatusTypeDef HAL_TIM_OnePulse_Stop(TIM_HandleTypeDef *htim, uint32_t Output */ HAL_StatusTypeDef HAL_TIM_OnePulse_Start_IT(TIM_HandleTypeDef *htim, uint32_t OutputChannel) { + HAL_TIM_ChannelStateTypeDef channel_1_state = TIM_CHANNEL_STATE_GET(htim, TIM_CHANNEL_1); + HAL_TIM_ChannelStateTypeDef channel_2_state = TIM_CHANNEL_STATE_GET(htim, TIM_CHANNEL_2); + HAL_TIM_ChannelStateTypeDef complementary_channel_1_state = TIM_CHANNEL_N_STATE_GET(htim, TIM_CHANNEL_1); + HAL_TIM_ChannelStateTypeDef complementary_channel_2_state = TIM_CHANNEL_N_STATE_GET(htim, TIM_CHANNEL_2); + /* Prevent unused argument(s) compilation warning */ UNUSED(OutputChannel); + /* Check the TIM channels state */ + if ((channel_1_state != HAL_TIM_CHANNEL_STATE_READY) + || (channel_2_state != HAL_TIM_CHANNEL_STATE_READY) + || (complementary_channel_1_state != HAL_TIM_CHANNEL_STATE_READY) + || (complementary_channel_2_state != HAL_TIM_CHANNEL_STATE_READY)) + { + return HAL_ERROR; + } + + /* Set the TIM channels state */ + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY); + /* Enable the Capture compare and the Input Capture channels (in the OPM Mode the two possible channels that can be used are TIM_CHANNEL_1 and TIM_CHANNEL_2) if TIM_CHANNEL_1 is used as output, the TIM_CHANNEL_2 will be used as input and @@ -2562,6 +2788,12 @@ HAL_StatusTypeDef HAL_TIM_OnePulse_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Out /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); + /* Set the TIM channels state */ + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY); + /* Return function status */ return HAL_OK; } @@ -2600,6 +2832,9 @@ HAL_StatusTypeDef HAL_TIM_OnePulse_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Out * @note Encoder mode and External clock mode 2 are not compatible and must not be selected together * Ex: A call for @ref HAL_TIM_Encoder_Init will erase the settings of @ref HAL_TIM_ConfigClockSource * using TIM_CLOCKSOURCE_ETRMODE2 and vice versa + * @note When the timer instance is initialized in Encoder mode, timer + * channels 1 and channel 2 are reserved and cannot be used for other + * purpose. * @param htim TIM Encoder Interface handle * @param sConfig TIM Encoder Interface configuration structure * @retval HAL status @@ -2697,6 +2932,15 @@ HAL_StatusTypeDef HAL_TIM_Encoder_Init(TIM_HandleTypeDef *htim, TIM_Encoder_Ini /* Write to TIMx CCER */ htim->Instance->CCER = tmpccer; + /* Initialize the DMA burst operation state */ + htim->DMABurstState = HAL_DMA_BURST_STATE_READY; + + /* Set the TIM channels state */ + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY); + /* Initialize the TIM state*/ htim->State = HAL_TIM_STATE_READY; @@ -2731,6 +2975,15 @@ HAL_StatusTypeDef HAL_TIM_Encoder_DeInit(TIM_HandleTypeDef *htim) HAL_TIM_Encoder_MspDeInit(htim); #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ + /* Change the DMA burst operation state */ + htim->DMABurstState = HAL_DMA_BURST_STATE_RESET; + + /* Set the TIM channels state */ + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_RESET); + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_RESET); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_RESET); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_RESET); + /* Change TIM state */ htim->State = HAL_TIM_STATE_RESET; @@ -2782,9 +3035,59 @@ __weak void HAL_TIM_Encoder_MspDeInit(TIM_HandleTypeDef *htim) */ HAL_StatusTypeDef HAL_TIM_Encoder_Start(TIM_HandleTypeDef *htim, uint32_t Channel) { + HAL_TIM_ChannelStateTypeDef channel_1_state = TIM_CHANNEL_STATE_GET(htim, TIM_CHANNEL_1); + HAL_TIM_ChannelStateTypeDef channel_2_state = TIM_CHANNEL_STATE_GET(htim, TIM_CHANNEL_2); + HAL_TIM_ChannelStateTypeDef complementary_channel_1_state = TIM_CHANNEL_N_STATE_GET(htim, TIM_CHANNEL_1); + HAL_TIM_ChannelStateTypeDef complementary_channel_2_state = TIM_CHANNEL_N_STATE_GET(htim, TIM_CHANNEL_2); + /* Check the parameters */ assert_param(IS_TIM_ENCODER_INTERFACE_INSTANCE(htim->Instance)); + /* Set the TIM channel(s) state */ + if (Channel == TIM_CHANNEL_1) + { + if ((channel_1_state != HAL_TIM_CHANNEL_STATE_READY) + || (complementary_channel_1_state != HAL_TIM_CHANNEL_STATE_READY)) + { + return HAL_ERROR; + } + else + { + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY); + } + } + else if (Channel == TIM_CHANNEL_2) + { + if ((channel_2_state != HAL_TIM_CHANNEL_STATE_READY) + || (complementary_channel_2_state != HAL_TIM_CHANNEL_STATE_READY)) + { + return HAL_ERROR; + } + else + { + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY); + } + } + else + { + if ((channel_1_state != HAL_TIM_CHANNEL_STATE_READY) + || (channel_2_state != HAL_TIM_CHANNEL_STATE_READY) + || (complementary_channel_1_state != HAL_TIM_CHANNEL_STATE_READY) + || (complementary_channel_2_state != HAL_TIM_CHANNEL_STATE_READY)) + { + return HAL_ERROR; + } + else + { + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY); + } + } + /* Enable the encoder interface channels */ switch (Channel) { @@ -2856,6 +3159,20 @@ HAL_StatusTypeDef HAL_TIM_Encoder_Stop(TIM_HandleTypeDef *htim, uint32_t Channel /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); + /* Set the TIM channel(s) state */ + if ((Channel == TIM_CHANNEL_1) || (Channel == TIM_CHANNEL_2)) + { + TIM_CHANNEL_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY); + } + else + { + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY); + } + /* Return function status */ return HAL_OK; } @@ -2872,9 +3189,59 @@ HAL_StatusTypeDef HAL_TIM_Encoder_Stop(TIM_HandleTypeDef *htim, uint32_t Channel */ HAL_StatusTypeDef HAL_TIM_Encoder_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel) { + HAL_TIM_ChannelStateTypeDef channel_1_state = TIM_CHANNEL_STATE_GET(htim, TIM_CHANNEL_1); + HAL_TIM_ChannelStateTypeDef channel_2_state = TIM_CHANNEL_STATE_GET(htim, TIM_CHANNEL_2); + HAL_TIM_ChannelStateTypeDef complementary_channel_1_state = TIM_CHANNEL_N_STATE_GET(htim, TIM_CHANNEL_1); + HAL_TIM_ChannelStateTypeDef complementary_channel_2_state = TIM_CHANNEL_N_STATE_GET(htim, TIM_CHANNEL_2); + /* Check the parameters */ assert_param(IS_TIM_ENCODER_INTERFACE_INSTANCE(htim->Instance)); + /* Set the TIM channel(s) state */ + if (Channel == TIM_CHANNEL_1) + { + if ((channel_1_state != HAL_TIM_CHANNEL_STATE_READY) + || (complementary_channel_1_state != HAL_TIM_CHANNEL_STATE_READY)) + { + return HAL_ERROR; + } + else + { + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY); + } + } + else if (Channel == TIM_CHANNEL_2) + { + if ((channel_2_state != HAL_TIM_CHANNEL_STATE_READY) + || (complementary_channel_2_state != HAL_TIM_CHANNEL_STATE_READY)) + { + return HAL_ERROR; + } + else + { + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY); + } + } + else + { + if ((channel_1_state != HAL_TIM_CHANNEL_STATE_READY) + || (channel_2_state != HAL_TIM_CHANNEL_STATE_READY) + || (complementary_channel_1_state != HAL_TIM_CHANNEL_STATE_READY) + || (complementary_channel_2_state != HAL_TIM_CHANNEL_STATE_READY)) + { + return HAL_ERROR; + } + else + { + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY); + } + } + /* Enable the encoder interface channels */ /* Enable the capture compare Interrupts 1 and/or 2 */ switch (Channel) @@ -2954,8 +3321,19 @@ HAL_StatusTypeDef HAL_TIM_Encoder_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Chan /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); - /* Change the htim state */ - htim->State = HAL_TIM_STATE_READY; + /* Set the TIM channel(s) state */ + if ((Channel == TIM_CHANNEL_1) || (Channel == TIM_CHANNEL_2)) + { + TIM_CHANNEL_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY); + } + else + { + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY); + } /* Return function status */ return HAL_OK; @@ -2977,27 +3355,95 @@ HAL_StatusTypeDef HAL_TIM_Encoder_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Chan HAL_StatusTypeDef HAL_TIM_Encoder_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData1, uint32_t *pData2, uint16_t Length) { + HAL_TIM_ChannelStateTypeDef channel_1_state = TIM_CHANNEL_STATE_GET(htim, TIM_CHANNEL_1); + HAL_TIM_ChannelStateTypeDef channel_2_state = TIM_CHANNEL_STATE_GET(htim, TIM_CHANNEL_2); + HAL_TIM_ChannelStateTypeDef complementary_channel_1_state = TIM_CHANNEL_N_STATE_GET(htim, TIM_CHANNEL_1); + HAL_TIM_ChannelStateTypeDef complementary_channel_2_state = TIM_CHANNEL_N_STATE_GET(htim, TIM_CHANNEL_2); + /* Check the parameters */ assert_param(IS_TIM_ENCODER_INTERFACE_INSTANCE(htim->Instance)); - if (htim->State == HAL_TIM_STATE_BUSY) + /* Set the TIM channel(s) state */ + if (Channel == TIM_CHANNEL_1) { - return HAL_BUSY; - } - else if (htim->State == HAL_TIM_STATE_READY) - { - if ((((pData1 == NULL) || (pData2 == NULL))) && (Length > 0U)) + if ((channel_1_state == HAL_TIM_CHANNEL_STATE_BUSY) + || (complementary_channel_1_state == HAL_TIM_CHANNEL_STATE_BUSY)) { - return HAL_ERROR; + return HAL_BUSY; + } + else if ((channel_1_state == HAL_TIM_CHANNEL_STATE_READY) + && (complementary_channel_1_state == HAL_TIM_CHANNEL_STATE_READY)) + { + if ((pData1 == NULL) && (Length > 0U)) + { + return HAL_ERROR; + } + else + { + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY); + } } else { - htim->State = HAL_TIM_STATE_BUSY; + return HAL_ERROR; + } + } + else if (Channel == TIM_CHANNEL_2) + { + if ((channel_2_state == HAL_TIM_CHANNEL_STATE_BUSY) + || (complementary_channel_2_state == HAL_TIM_CHANNEL_STATE_BUSY)) + { + return HAL_BUSY; + } + else if ((channel_2_state == HAL_TIM_CHANNEL_STATE_READY) + && (complementary_channel_2_state == HAL_TIM_CHANNEL_STATE_READY)) + { + if ((pData2 == NULL) && (Length > 0U)) + { + return HAL_ERROR; + } + else + { + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY); + } + } + else + { + return HAL_ERROR; } } else { - /* nothing to do */ + if ((channel_1_state == HAL_TIM_CHANNEL_STATE_BUSY) + || (channel_2_state == HAL_TIM_CHANNEL_STATE_BUSY) + || (complementary_channel_1_state == HAL_TIM_CHANNEL_STATE_BUSY) + || (complementary_channel_2_state == HAL_TIM_CHANNEL_STATE_BUSY)) + { + return HAL_BUSY; + } + else if ((channel_1_state == HAL_TIM_CHANNEL_STATE_READY) + && (channel_2_state == HAL_TIM_CHANNEL_STATE_READY) + && (complementary_channel_1_state == HAL_TIM_CHANNEL_STATE_READY) + && (complementary_channel_2_state == HAL_TIM_CHANNEL_STATE_READY)) + { + if ((((pData1 == NULL) || (pData2 == NULL))) && (Length > 0U)) + { + return HAL_ERROR; + } + else + { + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY); + } + } + else + { + return HAL_ERROR; + } } switch (Channel) @@ -3095,6 +3541,7 @@ HAL_StatusTypeDef HAL_TIM_Encoder_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Ch default: break; } + /* Return function status */ return HAL_OK; } @@ -3147,8 +3594,19 @@ HAL_StatusTypeDef HAL_TIM_Encoder_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Cha /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); - /* Change the htim state */ - htim->State = HAL_TIM_STATE_READY; + /* Set the TIM channel(s) state */ + if ((Channel == TIM_CHANNEL_1) || (Channel == TIM_CHANNEL_2)) + { + TIM_CHANNEL_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY); + } + else + { + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY); + } /* Return function status */ return HAL_OK; @@ -3417,8 +3875,6 @@ HAL_StatusTypeDef HAL_TIM_OC_ConfigChannel(TIM_HandleTypeDef *htim, /* Process Locked */ __HAL_LOCK(htim); - htim->State = HAL_TIM_STATE_BUSY; - switch (Channel) { case TIM_CHANNEL_1: @@ -3485,8 +3941,6 @@ HAL_StatusTypeDef HAL_TIM_OC_ConfigChannel(TIM_HandleTypeDef *htim, break; } - htim->State = HAL_TIM_STATE_READY; - __HAL_UNLOCK(htim); return HAL_OK; @@ -3517,8 +3971,6 @@ HAL_StatusTypeDef HAL_TIM_IC_ConfigChannel(TIM_HandleTypeDef *htim, TIM_IC_InitT /* Process Locked */ __HAL_LOCK(htim); - htim->State = HAL_TIM_STATE_BUSY; - if (Channel == TIM_CHANNEL_1) { /* TI1 Configuration */ @@ -3582,8 +4034,6 @@ HAL_StatusTypeDef HAL_TIM_IC_ConfigChannel(TIM_HandleTypeDef *htim, TIM_IC_InitT htim->Instance->CCMR2 |= (sConfig->ICPrescaler << 8U); } - htim->State = HAL_TIM_STATE_READY; - __HAL_UNLOCK(htim); return HAL_OK; @@ -3617,8 +4067,6 @@ HAL_StatusTypeDef HAL_TIM_PWM_ConfigChannel(TIM_HandleTypeDef *htim, /* Process Locked */ __HAL_LOCK(htim); - htim->State = HAL_TIM_STATE_BUSY; - switch (Channel) { case TIM_CHANNEL_1: @@ -3727,8 +4175,6 @@ HAL_StatusTypeDef HAL_TIM_PWM_ConfigChannel(TIM_HandleTypeDef *htim, break; } - htim->State = HAL_TIM_STATE_READY; - __HAL_UNLOCK(htim); return HAL_OK; @@ -3963,11 +4409,11 @@ HAL_StatusTypeDef HAL_TIM_DMABurst_MultiWriteStart(TIM_HandleTypeDef *htim, uint assert_param(IS_TIM_DMA_LENGTH(BurstLength)); assert_param(IS_TIM_DMA_DATA_LENGTH(DataLength)); - if (htim->State == HAL_TIM_STATE_BUSY) + if (htim->DMABurstState == HAL_DMA_BURST_STATE_BUSY) { return HAL_BUSY; } - else if (htim->State == HAL_TIM_STATE_READY) + else if (htim->DMABurstState == HAL_DMA_BURST_STATE_READY) { if ((BurstBuffer == NULL) && (BurstLength > 0U)) { @@ -3975,7 +4421,7 @@ HAL_StatusTypeDef HAL_TIM_DMABurst_MultiWriteStart(TIM_HandleTypeDef *htim, uint } else { - htim->State = HAL_TIM_STATE_BUSY; + htim->DMABurstState = HAL_DMA_BURST_STATE_BUSY; } } else @@ -4112,8 +4558,6 @@ HAL_StatusTypeDef HAL_TIM_DMABurst_MultiWriteStart(TIM_HandleTypeDef *htim, uint /* Enable the TIM DMA Request */ __HAL_TIM_ENABLE_DMA(htim, BurstRequestSrc); - htim->State = HAL_TIM_STATE_READY; - /* Return function status */ return HAL_OK; } @@ -4178,6 +4622,9 @@ HAL_StatusTypeDef HAL_TIM_DMABurst_WriteStop(TIM_HandleTypeDef *htim, uint32_t B __HAL_TIM_DISABLE_DMA(htim, BurstRequestSrc); } + /* Change the DMA burst operation state */ + htim->DMABurstState = HAL_DMA_BURST_STATE_READY; + /* Return function status */ return status; } @@ -4291,11 +4738,11 @@ HAL_StatusTypeDef HAL_TIM_DMABurst_MultiReadStart(TIM_HandleTypeDef *htim, uint3 assert_param(IS_TIM_DMA_LENGTH(BurstLength)); assert_param(IS_TIM_DMA_DATA_LENGTH(DataLength)); - if (htim->State == HAL_TIM_STATE_BUSY) + if (htim->DMABurstState == HAL_DMA_BURST_STATE_BUSY) { return HAL_BUSY; } - else if (htim->State == HAL_TIM_STATE_READY) + else if (htim->DMABurstState == HAL_DMA_BURST_STATE_READY) { if ((BurstBuffer == NULL) && (BurstLength > 0U)) { @@ -4303,7 +4750,7 @@ HAL_StatusTypeDef HAL_TIM_DMABurst_MultiReadStart(TIM_HandleTypeDef *htim, uint3 } else { - htim->State = HAL_TIM_STATE_BUSY; + htim->DMABurstState = HAL_DMA_BURST_STATE_BUSY; } } else @@ -4441,8 +4888,6 @@ HAL_StatusTypeDef HAL_TIM_DMABurst_MultiReadStart(TIM_HandleTypeDef *htim, uint3 /* Enable the TIM DMA Request */ __HAL_TIM_ENABLE_DMA(htim, BurstRequestSrc); - htim->State = HAL_TIM_STATE_READY; - /* Return function status */ return HAL_OK; } @@ -4507,6 +4952,9 @@ HAL_StatusTypeDef HAL_TIM_DMABurst_ReadStop(TIM_HandleTypeDef *htim, uint32_t Bu __HAL_TIM_DISABLE_DMA(htim, BurstRequestSrc); } + /* Change the DMA burst operation state */ + htim->DMABurstState = HAL_DMA_BURST_STATE_READY; + /* Return function status */ return status; } @@ -5796,6 +6244,54 @@ HAL_TIM_StateTypeDef HAL_TIM_Encoder_GetState(TIM_HandleTypeDef *htim) return htim->State; } +/** + * @brief Return the TIM Encoder Mode handle state. + * @param htim TIM handle + * @retval Active channel + */ +HAL_TIM_ActiveChannel HAL_TIM_GetActiveChannel(TIM_HandleTypeDef *htim) +{ + return htim->Channel; +} + +/** + * @brief Return actual state of the TIM channel. + * @param htim TIM handle + * @param Channel TIM Channel + * This parameter can be one of the following values: + * @arg TIM_CHANNEL_1: TIM Channel 1 + * @arg TIM_CHANNEL_2: TIM Channel 2 + * @arg TIM_CHANNEL_3: TIM Channel 3 + * @arg TIM_CHANNEL_4: TIM Channel 4 + * @arg TIM_CHANNEL_5: TIM Channel 5 + * @arg TIM_CHANNEL_6: TIM Channel 6 + * @retval TIM Channel state + */ +HAL_TIM_ChannelStateTypeDef HAL_TIM_GetChannelState(TIM_HandleTypeDef *htim, uint32_t Channel) +{ + HAL_TIM_ChannelStateTypeDef channel_state; + + /* Check the parameters */ + assert_param(IS_TIM_CCX_INSTANCE(htim->Instance, Channel)); + + channel_state = TIM_CHANNEL_STATE_GET(htim, Channel); + + return channel_state; +} + +/** + * @brief Return actual state of a DMA burst operation. + * @param htim TIM handle + * @retval DMA burst state + */ +HAL_TIM_DMABurstStateTypeDef HAL_TIM_DMABurstState(TIM_HandleTypeDef *htim) +{ + /* Check the parameters */ + assert_param(IS_TIM_DMABURST_INSTANCE(htim->Instance)); + + return htim->DMABurstState; +} + /** * @} */ @@ -5817,13 +6313,38 @@ void TIM_DMAError(DMA_HandleTypeDef *hdma) { TIM_HandleTypeDef *htim = (TIM_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent; - htim->State = HAL_TIM_STATE_READY; + if (hdma == htim->hdma[TIM_DMA_ID_CC1]) + { + htim->Channel = HAL_TIM_ACTIVE_CHANNEL_1; + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + } + else if (hdma == htim->hdma[TIM_DMA_ID_CC2]) + { + htim->Channel = HAL_TIM_ACTIVE_CHANNEL_2; + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY); + } + else if (hdma == htim->hdma[TIM_DMA_ID_CC3]) + { + htim->Channel = HAL_TIM_ACTIVE_CHANNEL_3; + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_3, HAL_TIM_CHANNEL_STATE_READY); + } + else if (hdma == htim->hdma[TIM_DMA_ID_CC4]) + { + htim->Channel = HAL_TIM_ACTIVE_CHANNEL_4; + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_4, HAL_TIM_CHANNEL_STATE_READY); + } + else + { + htim->State = HAL_TIM_STATE_READY; + } #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->ErrorCallback(htim); #else HAL_TIM_ErrorCallback(htim); #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ + + htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; } /** @@ -5835,23 +6356,41 @@ void TIM_DMADelayPulseCplt(DMA_HandleTypeDef *hdma) { TIM_HandleTypeDef *htim = (TIM_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent; - htim->State = HAL_TIM_STATE_READY; - if (hdma == htim->hdma[TIM_DMA_ID_CC1]) { htim->Channel = HAL_TIM_ACTIVE_CHANNEL_1; + + if (hdma->Init.Mode == DMA_NORMAL) + { + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + } } else if (hdma == htim->hdma[TIM_DMA_ID_CC2]) { htim->Channel = HAL_TIM_ACTIVE_CHANNEL_2; + + if (hdma->Init.Mode == DMA_NORMAL) + { + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY); + } } else if (hdma == htim->hdma[TIM_DMA_ID_CC3]) { htim->Channel = HAL_TIM_ACTIVE_CHANNEL_3; + + if (hdma->Init.Mode == DMA_NORMAL) + { + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_3, HAL_TIM_CHANNEL_STATE_READY); + } } else if (hdma == htim->hdma[TIM_DMA_ID_CC4]) { htim->Channel = HAL_TIM_ACTIVE_CHANNEL_4; + + if (hdma->Init.Mode == DMA_NORMAL) + { + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_4, HAL_TIM_CHANNEL_STATE_READY); + } } else { @@ -5876,8 +6415,6 @@ void TIM_DMADelayPulseHalfCplt(DMA_HandleTypeDef *hdma) { TIM_HandleTypeDef *htim = (TIM_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent; - htim->State = HAL_TIM_STATE_READY; - if (hdma == htim->hdma[TIM_DMA_ID_CC1]) { htim->Channel = HAL_TIM_ACTIVE_CHANNEL_1; @@ -5917,23 +6454,45 @@ void TIM_DMACaptureCplt(DMA_HandleTypeDef *hdma) { TIM_HandleTypeDef *htim = (TIM_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent; - htim->State = HAL_TIM_STATE_READY; - if (hdma == htim->hdma[TIM_DMA_ID_CC1]) { htim->Channel = HAL_TIM_ACTIVE_CHANNEL_1; + + if (hdma->Init.Mode == DMA_NORMAL) + { + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + } } else if (hdma == htim->hdma[TIM_DMA_ID_CC2]) { htim->Channel = HAL_TIM_ACTIVE_CHANNEL_2; + + if (hdma->Init.Mode == DMA_NORMAL) + { + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY); + } } else if (hdma == htim->hdma[TIM_DMA_ID_CC3]) { htim->Channel = HAL_TIM_ACTIVE_CHANNEL_3; + + if (hdma->Init.Mode == DMA_NORMAL) + { + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_3, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_3, HAL_TIM_CHANNEL_STATE_READY); + } } else if (hdma == htim->hdma[TIM_DMA_ID_CC4]) { htim->Channel = HAL_TIM_ACTIVE_CHANNEL_4; + + if (hdma->Init.Mode == DMA_NORMAL) + { + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_4, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_4, HAL_TIM_CHANNEL_STATE_READY); + } } else { @@ -5958,8 +6517,6 @@ void TIM_DMACaptureHalfCplt(DMA_HandleTypeDef *hdma) { TIM_HandleTypeDef *htim = (TIM_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent; - htim->State = HAL_TIM_STATE_READY; - if (hdma == htim->hdma[TIM_DMA_ID_CC1]) { htim->Channel = HAL_TIM_ACTIVE_CHANNEL_1; @@ -5999,7 +6556,10 @@ static void TIM_DMAPeriodElapsedCplt(DMA_HandleTypeDef *hdma) { TIM_HandleTypeDef *htim = (TIM_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent; - htim->State = HAL_TIM_STATE_READY; + if (htim->hdma[TIM_DMA_ID_UPDATE]->Init.Mode == DMA_NORMAL) + { + htim->State = HAL_TIM_STATE_READY; + } #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->PeriodElapsedCallback(htim); @@ -6017,8 +6577,6 @@ static void TIM_DMAPeriodElapsedHalfCplt(DMA_HandleTypeDef *hdma) { TIM_HandleTypeDef *htim = (TIM_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent; - htim->State = HAL_TIM_STATE_READY; - #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->PeriodElapsedHalfCpltCallback(htim); #else @@ -6035,7 +6593,10 @@ static void TIM_DMATriggerCplt(DMA_HandleTypeDef *hdma) { TIM_HandleTypeDef *htim = (TIM_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent; - htim->State = HAL_TIM_STATE_READY; + if (htim->hdma[TIM_DMA_ID_TRIGGER]->Init.Mode == DMA_NORMAL) + { + htim->State = HAL_TIM_STATE_READY; + } #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->TriggerCallback(htim); @@ -6053,8 +6614,6 @@ static void TIM_DMATriggerHalfCplt(DMA_HandleTypeDef *hdma) { TIM_HandleTypeDef *htim = (TIM_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent; - htim->State = HAL_TIM_STATE_READY; - #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->TriggerHalfCpltCallback(htim); #else diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim_ex.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim_ex.c index 1dcd770..2b5e0c0 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim_ex.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim_ex.c @@ -55,7 +55,7 @@ the commutation event). (#) Activate the TIM peripheral using one of the start functions: - (++) Complementary Output Compare : HAL_TIMEx_OCN_Start(), HAL_TIMEx_OCN_Start_DMA(), HAL_TIMEx_OC_Start_IT() + (++) Complementary Output Compare : HAL_TIMEx_OCN_Start(), HAL_TIMEx_OCN_Start_DMA(), HAL_TIMEx_OCN_Start_IT() (++) Complementary PWM generation : HAL_TIMEx_PWMN_Start(), HAL_TIMEx_PWMN_Start_DMA(), HAL_TIMEx_PWMN_Start_IT() (++) Complementary One-pulse mode output : HAL_TIMEx_OnePulseN_Start(), HAL_TIMEx_OnePulseN_Start_IT() (++) Hall Sensor output : HAL_TIMEx_HallSensor_Start(), HAL_TIMEx_HallSensor_Start_DMA(), HAL_TIMEx_HallSensor_Start_IT(). @@ -91,9 +91,11 @@ /* Private typedef -----------------------------------------------------------*/ /* Private define ------------------------------------------------------------*/ -/* Private macro -------------------------------------------------------------*/ +/* Private macros ------------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ /* Private function prototypes -----------------------------------------------*/ +static void TIM_DMADelayPulseNCplt(DMA_HandleTypeDef *hdma); +static void TIM_DMAErrorCCxN(DMA_HandleTypeDef *hdma); static void TIM_CCxNChannelCmd(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ChannelNState); /* Exported functions --------------------------------------------------------*/ @@ -124,6 +126,9 @@ static void TIM_CCxNChannelCmd(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t Cha */ /** * @brief Initializes the TIM Hall Sensor Interface and initialize the associated handle. + * @note When the timer instance is initialized in Hall Sensor Interface mode, + * timer channels 1 and channel 2 are reserved and cannot be used for + * other purpose. * @param htim TIM Hall Sensor Interface handle * @param sConfig TIM Hall Sensor configuration structure * @retval HAL status @@ -209,6 +214,15 @@ HAL_StatusTypeDef HAL_TIMEx_HallSensor_Init(TIM_HandleTypeDef *htim, TIM_HallSen htim->Instance->CR2 &= ~TIM_CR2_MMS; htim->Instance->CR2 |= TIM_TRGO_OC2REF; + /* Initialize the DMA burst operation state */ + htim->DMABurstState = HAL_DMA_BURST_STATE_READY; + + /* Initialize the TIM channels state */ + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY); + /* Initialize the TIM state*/ htim->State = HAL_TIM_STATE_READY; @@ -242,6 +256,15 @@ HAL_StatusTypeDef HAL_TIMEx_HallSensor_DeInit(TIM_HandleTypeDef *htim) HAL_TIMEx_HallSensor_MspDeInit(htim); #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ + /* Change the DMA burst operation state */ + htim->DMABurstState = HAL_DMA_BURST_STATE_RESET; + + /* Change the TIM channels state */ + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_RESET); + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_RESET); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_RESET); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_RESET); + /* Change TIM state */ htim->State = HAL_TIM_STATE_RESET; @@ -289,12 +312,31 @@ __weak void HAL_TIMEx_HallSensor_MspDeInit(TIM_HandleTypeDef *htim) HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start(TIM_HandleTypeDef *htim) { uint32_t tmpsmcr; + HAL_TIM_ChannelStateTypeDef channel_1_state = TIM_CHANNEL_STATE_GET(htim, TIM_CHANNEL_1); + HAL_TIM_ChannelStateTypeDef channel_2_state = TIM_CHANNEL_STATE_GET(htim, TIM_CHANNEL_2); + HAL_TIM_ChannelStateTypeDef complementary_channel_1_state = TIM_CHANNEL_N_STATE_GET(htim, TIM_CHANNEL_1); + HAL_TIM_ChannelStateTypeDef complementary_channel_2_state = TIM_CHANNEL_N_STATE_GET(htim, TIM_CHANNEL_2); /* Check the parameters */ assert_param(IS_TIM_HALL_SENSOR_INTERFACE_INSTANCE(htim->Instance)); + /* Check the TIM channels state */ + if ((channel_1_state != HAL_TIM_CHANNEL_STATE_READY) + || (channel_2_state != HAL_TIM_CHANNEL_STATE_READY) + || (complementary_channel_1_state != HAL_TIM_CHANNEL_STATE_READY) + || (complementary_channel_2_state != HAL_TIM_CHANNEL_STATE_READY)) + { + return HAL_ERROR; + } + + /* Set the TIM channels state */ + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY); + /* Enable the Input Capture channel 1 - (in the Hall Sensor Interface the three possible channels that can be used are TIM_CHANNEL_1, TIM_CHANNEL_2 and TIM_CHANNEL_3) */ + (in the Hall Sensor Interface the three possible channels that can be used are TIM_CHANNEL_1, TIM_CHANNEL_2 and TIM_CHANNEL_3) */ TIM_CCxChannelCmd(htim->Instance, TIM_CHANNEL_1, TIM_CCx_ENABLE); /* Enable the Peripheral, except in trigger mode where enable is automatically done with trigger */ @@ -325,6 +367,12 @@ HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop(TIM_HandleTypeDef *htim) /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); + /* Set the TIM channels state */ + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY); + /* Return function status */ return HAL_OK; } @@ -337,10 +385,29 @@ HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop(TIM_HandleTypeDef *htim) HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_IT(TIM_HandleTypeDef *htim) { uint32_t tmpsmcr; + HAL_TIM_ChannelStateTypeDef channel_1_state = TIM_CHANNEL_STATE_GET(htim, TIM_CHANNEL_1); + HAL_TIM_ChannelStateTypeDef channel_2_state = TIM_CHANNEL_STATE_GET(htim, TIM_CHANNEL_2); + HAL_TIM_ChannelStateTypeDef complementary_channel_1_state = TIM_CHANNEL_N_STATE_GET(htim, TIM_CHANNEL_1); + HAL_TIM_ChannelStateTypeDef complementary_channel_2_state = TIM_CHANNEL_N_STATE_GET(htim, TIM_CHANNEL_2); /* Check the parameters */ assert_param(IS_TIM_HALL_SENSOR_INTERFACE_INSTANCE(htim->Instance)); + /* Check the TIM channels state */ + if ((channel_1_state != HAL_TIM_CHANNEL_STATE_READY) + || (channel_2_state != HAL_TIM_CHANNEL_STATE_READY) + || (complementary_channel_1_state != HAL_TIM_CHANNEL_STATE_READY) + || (complementary_channel_2_state != HAL_TIM_CHANNEL_STATE_READY)) + { + return HAL_ERROR; + } + + /* Set the TIM channels state */ + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY); + /* Enable the capture compare Interrupts 1 event */ __HAL_TIM_ENABLE_IT(htim, TIM_IT_CC1); @@ -379,6 +446,12 @@ HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_IT(TIM_HandleTypeDef *htim) /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); + /* Set the TIM channels state */ + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY); + /* Return function status */ return HAL_OK; } @@ -393,29 +466,36 @@ HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_IT(TIM_HandleTypeDef *htim) HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_DMA(TIM_HandleTypeDef *htim, uint32_t *pData, uint16_t Length) { uint32_t tmpsmcr; + HAL_TIM_ChannelStateTypeDef channel_1_state = TIM_CHANNEL_STATE_GET(htim, TIM_CHANNEL_1); + HAL_TIM_ChannelStateTypeDef complementary_channel_1_state = TIM_CHANNEL_N_STATE_GET(htim, TIM_CHANNEL_1); /* Check the parameters */ assert_param(IS_TIM_HALL_SENSOR_INTERFACE_INSTANCE(htim->Instance)); - if (htim->State == HAL_TIM_STATE_BUSY) + /* Set the TIM channel state */ + if ((channel_1_state == HAL_TIM_CHANNEL_STATE_BUSY) + ||(complementary_channel_1_state == HAL_TIM_CHANNEL_STATE_BUSY)) { return HAL_BUSY; } - else if (htim->State == HAL_TIM_STATE_READY) + else if ((channel_1_state == HAL_TIM_CHANNEL_STATE_READY) + && (complementary_channel_1_state == HAL_TIM_CHANNEL_STATE_READY)) { - if (((uint32_t)pData == 0U) && (Length > 0U)) + if ((pData == NULL) && (Length > 0U)) { return HAL_ERROR; } else { - htim->State = HAL_TIM_STATE_BUSY; + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY); } } else { - /* nothing to do */ + return HAL_ERROR; } + /* Enable the Input Capture channel 1 (in the Hall Sensor Interface the three possible channels that can be used are TIM_CHANNEL_1, TIM_CHANNEL_2 and TIM_CHANNEL_3) */ TIM_CCxChannelCmd(htim->Instance, TIM_CHANNEL_1, TIM_CCx_ENABLE); @@ -464,9 +544,14 @@ HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_DMA(TIM_HandleTypeDef *htim) __HAL_TIM_DISABLE_DMA(htim, TIM_DMA_CC1); (void)HAL_DMA_Abort_IT(htim->hdma[TIM_DMA_ID_CC1]); + /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); + /* Set the TIM channel state */ + TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + /* Return function status */ return HAL_OK; } @@ -513,6 +598,15 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Start(TIM_HandleTypeDef *htim, uint32_t Channel) /* Check the parameters */ assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, Channel)); + /* Check the TIM complementary channel state */ + if (TIM_CHANNEL_N_STATE_GET(htim, Channel) != HAL_TIM_CHANNEL_STATE_READY) + { + return HAL_ERROR; + } + + /* Set the TIM complementary channel state */ + TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY); + /* Enable the Capture compare channel N */ TIM_CCxNChannelCmd(htim->Instance, Channel, TIM_CCxN_ENABLE); @@ -555,6 +649,9 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Stop(TIM_HandleTypeDef *htim, uint32_t Channel) /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); + /* Set the TIM complementary channel state */ + TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY); + /* Return function status */ return HAL_OK; } @@ -577,6 +674,15 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Start_IT(TIM_HandleTypeDef *htim, uint32_t Chann /* Check the parameters */ assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, Channel)); + /* Check the TIM complementary channel state */ + if (TIM_CHANNEL_N_STATE_GET(htim, Channel) != HAL_TIM_CHANNEL_STATE_READY) + { + return HAL_ERROR; + } + + /* Set the TIM complementary channel state */ + TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY); + switch (Channel) { case TIM_CHANNEL_1: @@ -685,6 +791,9 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channe /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); + /* Set the TIM complementary channel state */ + TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY); + /* Return function status */ return HAL_OK; } @@ -709,24 +818,25 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Chan /* Check the parameters */ assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, Channel)); - if (htim->State == HAL_TIM_STATE_BUSY) + /* Set the TIM complementary channel state */ + if (TIM_CHANNEL_N_STATE_GET(htim, Channel) == HAL_TIM_CHANNEL_STATE_BUSY) { return HAL_BUSY; } - else if (htim->State == HAL_TIM_STATE_READY) + else if (TIM_CHANNEL_N_STATE_GET(htim, Channel) == HAL_TIM_CHANNEL_STATE_READY) { - if (((uint32_t)pData == 0U) && (Length > 0U)) + if ((pData == NULL) && (Length > 0U)) { return HAL_ERROR; } else { - htim->State = HAL_TIM_STATE_BUSY; + TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY); } } else { - /* nothing to do */ + return HAL_ERROR; } switch (Channel) @@ -734,11 +844,11 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Chan case TIM_CHANNEL_1: { /* Set the DMA compare callbacks */ - htim->hdma[TIM_DMA_ID_CC1]->XferCpltCallback = TIM_DMADelayPulseCplt; + htim->hdma[TIM_DMA_ID_CC1]->XferCpltCallback = TIM_DMADelayPulseNCplt; htim->hdma[TIM_DMA_ID_CC1]->XferHalfCpltCallback = TIM_DMADelayPulseHalfCplt; /* Set the DMA error callback */ - htim->hdma[TIM_DMA_ID_CC1]->XferErrorCallback = TIM_DMAError ; + htim->hdma[TIM_DMA_ID_CC1]->XferErrorCallback = TIM_DMAErrorCCxN ; /* Enable the DMA stream */ if (HAL_DMA_Start_IT(htim->hdma[TIM_DMA_ID_CC1], (uint32_t)pData, (uint32_t)&htim->Instance->CCR1, Length) != HAL_OK) @@ -753,11 +863,11 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Chan case TIM_CHANNEL_2: { /* Set the DMA compare callbacks */ - htim->hdma[TIM_DMA_ID_CC2]->XferCpltCallback = TIM_DMADelayPulseCplt; + htim->hdma[TIM_DMA_ID_CC2]->XferCpltCallback = TIM_DMADelayPulseNCplt; htim->hdma[TIM_DMA_ID_CC2]->XferHalfCpltCallback = TIM_DMADelayPulseHalfCplt; /* Set the DMA error callback */ - htim->hdma[TIM_DMA_ID_CC2]->XferErrorCallback = TIM_DMAError ; + htim->hdma[TIM_DMA_ID_CC2]->XferErrorCallback = TIM_DMAErrorCCxN ; /* Enable the DMA stream */ if (HAL_DMA_Start_IT(htim->hdma[TIM_DMA_ID_CC2], (uint32_t)pData, (uint32_t)&htim->Instance->CCR2, Length) != HAL_OK) @@ -772,11 +882,11 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Chan case TIM_CHANNEL_3: { /* Set the DMA compare callbacks */ - htim->hdma[TIM_DMA_ID_CC3]->XferCpltCallback = TIM_DMADelayPulseCplt; + htim->hdma[TIM_DMA_ID_CC3]->XferCpltCallback = TIM_DMADelayPulseNCplt; htim->hdma[TIM_DMA_ID_CC3]->XferHalfCpltCallback = TIM_DMADelayPulseHalfCplt; /* Set the DMA error callback */ - htim->hdma[TIM_DMA_ID_CC3]->XferErrorCallback = TIM_DMAError ; + htim->hdma[TIM_DMA_ID_CC3]->XferErrorCallback = TIM_DMAErrorCCxN ; /* Enable the DMA stream */ if (HAL_DMA_Start_IT(htim->hdma[TIM_DMA_ID_CC3], (uint32_t)pData, (uint32_t)&htim->Instance->CCR3, Length) != HAL_OK) @@ -864,8 +974,8 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Chann /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); - /* Change the htim state */ - htim->State = HAL_TIM_STATE_READY; + /* Set the TIM complementary channel state */ + TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY); /* Return function status */ return HAL_OK; @@ -922,6 +1032,15 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Start(TIM_HandleTypeDef *htim, uint32_t Channel /* Check the parameters */ assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, Channel)); + /* Check the TIM complementary channel state */ + if (TIM_CHANNEL_N_STATE_GET(htim, Channel) != HAL_TIM_CHANNEL_STATE_READY) + { + return HAL_ERROR; + } + + /* Set the TIM complementary channel state */ + TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY); + /* Enable the complementary PWM output */ TIM_CCxNChannelCmd(htim->Instance, Channel, TIM_CCxN_ENABLE); @@ -963,6 +1082,9 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop(TIM_HandleTypeDef *htim, uint32_t Channel) /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); + /* Set the TIM complementary channel state */ + TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY); + /* Return function status */ return HAL_OK; } @@ -985,6 +1107,15 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_IT(TIM_HandleTypeDef *htim, uint32_t Chan /* Check the parameters */ assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, Channel)); + /* Check the TIM complementary channel state */ + if (TIM_CHANNEL_N_STATE_GET(htim, Channel) != HAL_TIM_CHANNEL_STATE_READY) + { + return HAL_ERROR; + } + + /* Set the TIM complementary channel state */ + TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY); + switch (Channel) { case TIM_CHANNEL_1: @@ -1093,6 +1224,9 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Chann /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); + /* Set the TIM complementary channel state */ + TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY); + /* Return function status */ return HAL_OK; } @@ -1117,35 +1251,37 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Cha /* Check the parameters */ assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, Channel)); - if (htim->State == HAL_TIM_STATE_BUSY) + /* Set the TIM complementary channel state */ + if (TIM_CHANNEL_N_STATE_GET(htim, Channel) == HAL_TIM_CHANNEL_STATE_BUSY) { return HAL_BUSY; } - else if (htim->State == HAL_TIM_STATE_READY) + else if (TIM_CHANNEL_N_STATE_GET(htim, Channel) == HAL_TIM_CHANNEL_STATE_READY) { - if (((uint32_t)pData == 0U) && (Length > 0U)) + if ((pData == NULL) && (Length > 0U)) { return HAL_ERROR; } else { - htim->State = HAL_TIM_STATE_BUSY; + TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY); } } else { - /* nothing to do */ + return HAL_ERROR; } + switch (Channel) { case TIM_CHANNEL_1: { /* Set the DMA compare callbacks */ - htim->hdma[TIM_DMA_ID_CC1]->XferCpltCallback = TIM_DMADelayPulseCplt; + htim->hdma[TIM_DMA_ID_CC1]->XferCpltCallback = TIM_DMADelayPulseNCplt; htim->hdma[TIM_DMA_ID_CC1]->XferHalfCpltCallback = TIM_DMADelayPulseHalfCplt; /* Set the DMA error callback */ - htim->hdma[TIM_DMA_ID_CC1]->XferErrorCallback = TIM_DMAError ; + htim->hdma[TIM_DMA_ID_CC1]->XferErrorCallback = TIM_DMAErrorCCxN ; /* Enable the DMA stream */ if (HAL_DMA_Start_IT(htim->hdma[TIM_DMA_ID_CC1], (uint32_t)pData, (uint32_t)&htim->Instance->CCR1, Length) != HAL_OK) @@ -1160,11 +1296,11 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Cha case TIM_CHANNEL_2: { /* Set the DMA compare callbacks */ - htim->hdma[TIM_DMA_ID_CC2]->XferCpltCallback = TIM_DMADelayPulseCplt; + htim->hdma[TIM_DMA_ID_CC2]->XferCpltCallback = TIM_DMADelayPulseNCplt; htim->hdma[TIM_DMA_ID_CC2]->XferHalfCpltCallback = TIM_DMADelayPulseHalfCplt; /* Set the DMA error callback */ - htim->hdma[TIM_DMA_ID_CC2]->XferErrorCallback = TIM_DMAError ; + htim->hdma[TIM_DMA_ID_CC2]->XferErrorCallback = TIM_DMAErrorCCxN ; /* Enable the DMA stream */ if (HAL_DMA_Start_IT(htim->hdma[TIM_DMA_ID_CC2], (uint32_t)pData, (uint32_t)&htim->Instance->CCR2, Length) != HAL_OK) @@ -1179,11 +1315,11 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Cha case TIM_CHANNEL_3: { /* Set the DMA compare callbacks */ - htim->hdma[TIM_DMA_ID_CC3]->XferCpltCallback = TIM_DMADelayPulseCplt; + htim->hdma[TIM_DMA_ID_CC3]->XferCpltCallback = TIM_DMADelayPulseNCplt; htim->hdma[TIM_DMA_ID_CC3]->XferHalfCpltCallback = TIM_DMADelayPulseHalfCplt; /* Set the DMA error callback */ - htim->hdma[TIM_DMA_ID_CC3]->XferErrorCallback = TIM_DMAError ; + htim->hdma[TIM_DMA_ID_CC3]->XferErrorCallback = TIM_DMAErrorCCxN ; /* Enable the DMA stream */ if (HAL_DMA_Start_IT(htim->hdma[TIM_DMA_ID_CC3], (uint32_t)pData, (uint32_t)&htim->Instance->CCR3, Length) != HAL_OK) @@ -1271,8 +1407,8 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Chan /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); - /* Change the htim state */ - htim->State = HAL_TIM_STATE_READY; + /* Set the TIM complementary channel state */ + TIM_CHANNEL_N_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_READY); /* Return function status */ return HAL_OK; @@ -1312,11 +1448,27 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Chan */ HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start(TIM_HandleTypeDef *htim, uint32_t OutputChannel) { + uint32_t input_channel = (OutputChannel == TIM_CHANNEL_1) ? TIM_CHANNEL_2 : TIM_CHANNEL_1; + HAL_TIM_ChannelStateTypeDef input_channel_state = TIM_CHANNEL_STATE_GET(htim, input_channel); + HAL_TIM_ChannelStateTypeDef output_channel_state = TIM_CHANNEL_N_STATE_GET(htim, OutputChannel); + /* Check the parameters */ assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, OutputChannel)); - /* Enable the complementary One Pulse output */ + /* Check the TIM channels state */ + if ((output_channel_state != HAL_TIM_CHANNEL_STATE_READY) + || (input_channel_state != HAL_TIM_CHANNEL_STATE_READY)) + { + return HAL_ERROR; + } + + /* Set the TIM channels state */ + TIM_CHANNEL_N_STATE_SET(htim, OutputChannel, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_STATE_SET(htim, input_channel, HAL_TIM_CHANNEL_STATE_BUSY); + + /* Enable the complementary One Pulse output channel and the Input Capture channel */ TIM_CCxNChannelCmd(htim->Instance, OutputChannel, TIM_CCxN_ENABLE); + TIM_CCxChannelCmd(htim->Instance, input_channel, TIM_CCx_ENABLE); /* Enable the Main Output */ __HAL_TIM_MOE_ENABLE(htim); @@ -1337,12 +1489,14 @@ HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start(TIM_HandleTypeDef *htim, uint32_t Ou */ HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop(TIM_HandleTypeDef *htim, uint32_t OutputChannel) { + uint32_t input_channel = (OutputChannel == TIM_CHANNEL_1) ? TIM_CHANNEL_2 : TIM_CHANNEL_1; /* Check the parameters */ assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, OutputChannel)); - /* Disable the complementary One Pulse output */ + /* Disable the complementary One Pulse output channel and the Input Capture channel */ TIM_CCxNChannelCmd(htim->Instance, OutputChannel, TIM_CCxN_DISABLE); + TIM_CCxChannelCmd(htim->Instance, input_channel, TIM_CCx_DISABLE); /* Disable the Main Output */ __HAL_TIM_MOE_DISABLE(htim); @@ -1350,6 +1504,10 @@ HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop(TIM_HandleTypeDef *htim, uint32_t Out /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); + /* Set the TIM channels state */ + TIM_CHANNEL_N_STATE_SET(htim, OutputChannel, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_STATE_SET(htim, input_channel, HAL_TIM_CHANNEL_STATE_READY); + /* Return function status */ return HAL_OK; } @@ -1366,17 +1524,33 @@ HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop(TIM_HandleTypeDef *htim, uint32_t Out */ HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start_IT(TIM_HandleTypeDef *htim, uint32_t OutputChannel) { + uint32_t input_channel = (OutputChannel == TIM_CHANNEL_1) ? TIM_CHANNEL_2 : TIM_CHANNEL_1; + HAL_TIM_ChannelStateTypeDef input_channel_state = TIM_CHANNEL_STATE_GET(htim, input_channel); + HAL_TIM_ChannelStateTypeDef output_channel_state = TIM_CHANNEL_N_STATE_GET(htim, OutputChannel); + /* Check the parameters */ assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, OutputChannel)); + /* Check the TIM channels state */ + if ((output_channel_state != HAL_TIM_CHANNEL_STATE_READY) + || (input_channel_state != HAL_TIM_CHANNEL_STATE_READY)) + { + return HAL_ERROR; + } + + /* Set the TIM channels state */ + TIM_CHANNEL_N_STATE_SET(htim, OutputChannel, HAL_TIM_CHANNEL_STATE_BUSY); + TIM_CHANNEL_STATE_SET(htim, input_channel, HAL_TIM_CHANNEL_STATE_BUSY); + /* Enable the TIM Capture/Compare 1 interrupt */ __HAL_TIM_ENABLE_IT(htim, TIM_IT_CC1); /* Enable the TIM Capture/Compare 2 interrupt */ __HAL_TIM_ENABLE_IT(htim, TIM_IT_CC2); - /* Enable the complementary One Pulse output */ + /* Enable the complementary One Pulse output channel and the Input Capture channel */ TIM_CCxNChannelCmd(htim->Instance, OutputChannel, TIM_CCxN_ENABLE); + TIM_CCxChannelCmd(htim->Instance, input_channel, TIM_CCx_ENABLE); /* Enable the Main Output */ __HAL_TIM_MOE_ENABLE(htim); @@ -1397,6 +1571,8 @@ HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start_IT(TIM_HandleTypeDef *htim, uint32_t */ HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t OutputChannel) { + uint32_t input_channel = (OutputChannel == TIM_CHANNEL_1) ? TIM_CHANNEL_2 : TIM_CHANNEL_1; + /* Check the parameters */ assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, OutputChannel)); @@ -1406,8 +1582,9 @@ HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t /* Disable the TIM Capture/Compare 2 interrupt */ __HAL_TIM_DISABLE_IT(htim, TIM_IT_CC2); - /* Disable the complementary One Pulse output */ + /* Disable the complementary One Pulse output channel and the Input Capture channel */ TIM_CCxNChannelCmd(htim->Instance, OutputChannel, TIM_CCxN_DISABLE); + TIM_CCxChannelCmd(htim->Instance, input_channel, TIM_CCx_DISABLE); /* Disable the Main Output */ __HAL_TIM_MOE_DISABLE(htim); @@ -1415,6 +1592,10 @@ HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t /* Disable the Peripheral */ __HAL_TIM_DISABLE(htim); + /* Set the TIM channels state */ + TIM_CHANNEL_N_STATE_SET(htim, OutputChannel, HAL_TIM_CHANNEL_STATE_READY); + TIM_CHANNEL_STATE_SET(htim, input_channel, HAL_TIM_CHANNEL_STATE_READY); + /* Return function status */ return HAL_OK; } @@ -2232,6 +2413,27 @@ HAL_TIM_StateTypeDef HAL_TIMEx_HallSensor_GetState(TIM_HandleTypeDef *htim) return htim->State; } +/** + * @brief Return actual state of the TIM complementary channel. + * @param htim TIM handle + * @param ChannelN TIM Complementary channel + * This parameter can be one of the following values: + * @arg TIM_CHANNEL_1: TIM Channel 1 + * @arg TIM_CHANNEL_2: TIM Channel 2 + * @arg TIM_CHANNEL_3: TIM Channel 3 + * @retval TIM Complementary channel state + */ +HAL_TIM_ChannelStateTypeDef HAL_TIMEx_GetChannelNState(TIM_HandleTypeDef *htim, uint32_t ChannelN) +{ + HAL_TIM_ChannelStateTypeDef channel_state; + + /* Check the parameters */ + assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, ChannelN)); + + channel_state = TIM_CHANNEL_N_STATE_GET(htim, ChannelN); + + return channel_state; +} /** * @} */ @@ -2284,6 +2486,103 @@ void TIMEx_DMACommutationHalfCplt(DMA_HandleTypeDef *hdma) } +/** + * @brief TIM DMA Delay Pulse complete callback (complementary channel). + * @param hdma pointer to DMA handle. + * @retval None + */ +static void TIM_DMADelayPulseNCplt(DMA_HandleTypeDef *hdma) +{ + TIM_HandleTypeDef *htim = (TIM_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent; + + if (hdma == htim->hdma[TIM_DMA_ID_CC1]) + { + htim->Channel = HAL_TIM_ACTIVE_CHANNEL_1; + + if (hdma->Init.Mode == DMA_NORMAL) + { + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + } + } + else if (hdma == htim->hdma[TIM_DMA_ID_CC2]) + { + htim->Channel = HAL_TIM_ACTIVE_CHANNEL_2; + + if (hdma->Init.Mode == DMA_NORMAL) + { + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY); + } + } + else if (hdma == htim->hdma[TIM_DMA_ID_CC3]) + { + htim->Channel = HAL_TIM_ACTIVE_CHANNEL_3; + + if (hdma->Init.Mode == DMA_NORMAL) + { + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_3, HAL_TIM_CHANNEL_STATE_READY); + } + } + else if (hdma == htim->hdma[TIM_DMA_ID_CC4]) + { + htim->Channel = HAL_TIM_ACTIVE_CHANNEL_4; + + if (hdma->Init.Mode == DMA_NORMAL) + { + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_4, HAL_TIM_CHANNEL_STATE_READY); + } + } + else + { + /* nothing to do */ + } + +#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) + htim->PWM_PulseFinishedCallback(htim); +#else + HAL_TIM_PWM_PulseFinishedCallback(htim); +#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ + + htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; +} + +/** + * @brief TIM DMA error callback (complementary channel) + * @param hdma pointer to DMA handle. + * @retval None + */ +void TIM_DMAErrorCCxN(DMA_HandleTypeDef *hdma) +{ + TIM_HandleTypeDef *htim = (TIM_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent; + + if (hdma == htim->hdma[TIM_DMA_ID_CC1]) + { + htim->Channel = HAL_TIM_ACTIVE_CHANNEL_1; + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY); + } + else if (hdma == htim->hdma[TIM_DMA_ID_CC2]) + { + htim->Channel = HAL_TIM_ACTIVE_CHANNEL_2; + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY); + } + else if (hdma == htim->hdma[TIM_DMA_ID_CC3]) + { + htim->Channel = HAL_TIM_ACTIVE_CHANNEL_3; + TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_3, HAL_TIM_CHANNEL_STATE_READY); + } + else + { + /* nothing to do */ + } + +#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) + htim->ErrorCallback(htim); +#else + HAL_TIM_ErrorCallback(htim); +#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ + + htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; +} + /** * @brief Enables or disables the TIM Capture Compare Channel xN. * @param TIMx to select the TIM peripheral diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_timebase_rtc_alarm_template.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_timebase_rtc_alarm_template.c index 3e5aaa9..61213a7 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_timebase_rtc_alarm_template.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_timebase_rtc_alarm_template.c @@ -228,11 +228,11 @@ HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority) if (TickPriority < (1UL << __NVIC_PRIO_BITS)) { - HAL_NVIC_SetPriority(RTC_Alarm_IRQn, TickPriority, 0U); - HAL_NVIC_EnableIRQ(RTC_Alarm_IRQn); + HAL_NVIC_SetPriority(RTC_Alarm_IRQn, TickPriority, 0U); + HAL_NVIC_EnableIRQ(RTC_Alarm_IRQn); uwTickPrio = TickPriority; - return HAL_OK; + return HAL_OK; } else { diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_timebase_rtc_wakeup_template.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_timebase_rtc_wakeup_template.c index da35f78..fca84e1 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_timebase_rtc_wakeup_template.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_timebase_rtc_wakeup_template.c @@ -215,11 +215,11 @@ HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority) /* Configure the HAL Tick IRQ priority */ if (TickPriority < (1UL << __NVIC_PRIO_BITS)) { - HAL_NVIC_SetPriority(RTC_WKUP_IRQn, TickPriority, 0U); - HAL_NVIC_EnableIRQ(RTC_WKUP_IRQn); + HAL_NVIC_SetPriority(RTC_WKUP_IRQn, TickPriority, 0U); + HAL_NVIC_EnableIRQ(RTC_WKUP_IRQn); uwTickPrio = TickPriority; - return HAL_OK; + return HAL_OK; } else { diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_timebase_tim_template.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_timebase_tim_template.c index 9e424d5..5ac80a2 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_timebase_tim_template.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_timebase_tim_template.c @@ -65,10 +65,10 @@ HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority) /*Configure the TIM6 IRQ priority */ if (TickPriority < (1UL << __NVIC_PRIO_BITS)) { - HAL_NVIC_SetPriority(TIM6_DAC_IRQn, TickPriority ,0U); + HAL_NVIC_SetPriority(TIM6_DAC_IRQn, TickPriority ,0U); - /* Enable the TIM6 global Interrupt */ - HAL_NVIC_EnableIRQ(TIM6_DAC_IRQn); + /* Enable the TIM6 global Interrupt */ + HAL_NVIC_EnableIRQ(TIM6_DAC_IRQn); uwTickPrio = TickPriority; } else diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart.c index 85a0b6e..684c0ce 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart.c @@ -191,6 +191,8 @@ /* Private macros ------------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ +const uint16_t UARTPrescTable[12] = {1U, 2U, 4U, 6U, 8U, 10U, 12U, 16U, 32U, 64U, 128U, 256U}; + /* Private function prototypes -----------------------------------------------*/ /** @addtogroup UART_Private_Functions * @{ @@ -1065,6 +1067,8 @@ HAL_StatusTypeDef HAL_UART_Transmit(UART_HandleTypeDef *huart, uint8_t *pData, u pdata16bits = NULL; } + __HAL_UNLOCK(huart); + while (huart->TxXferCount > 0U) { if (UART_WaitOnFlagUntilTimeout(huart, UART_FLAG_TXE, RESET, tickstart, Timeout) != HAL_OK) @@ -1092,8 +1096,6 @@ HAL_StatusTypeDef HAL_UART_Transmit(UART_HandleTypeDef *huart, uint8_t *pData, u /* At end of Tx process, restore huart->gState to Ready */ huart->gState = HAL_UART_STATE_READY; - __HAL_UNLOCK(huart); - return HAL_OK; } else @@ -1159,6 +1161,8 @@ HAL_StatusTypeDef HAL_UART_Receive(UART_HandleTypeDef *huart, uint8_t *pData, ui pdata16bits = NULL; } + __HAL_UNLOCK(huart); + /* as long as data have to be received */ while (huart->RxXferCount > 0U) { @@ -1182,8 +1186,6 @@ HAL_StatusTypeDef HAL_UART_Receive(UART_HandleTypeDef *huart, uint8_t *pData, ui /* At end of Rx process, restore huart->RxState to Ready */ huart->RxState = HAL_UART_STATE_READY; - __HAL_UNLOCK(huart); - return HAL_OK; } else @@ -2857,9 +2859,9 @@ HAL_StatusTypeDef UART_SetConfig(UART_HandleTypeDef *huart) uint32_t tmpreg; uint16_t brrtemp; UART_ClockSourceTypeDef clocksource; - uint32_t usartdiv = 0x00000000U; + uint32_t usartdiv; HAL_StatusTypeDef ret = HAL_OK; - uint32_t lpuart_ker_ck_pres = 0x00000000U; + uint32_t lpuart_ker_ck_pres; PLL2_ClocksTypeDef pll2_clocks; PLL3_ClocksTypeDef pll3_clocks; uint32_t pclk; @@ -2928,41 +2930,45 @@ HAL_StatusTypeDef UART_SetConfig(UART_HandleTypeDef *huart) switch (clocksource) { case UART_CLOCKSOURCE_D3PCLK1: - lpuart_ker_ck_pres = (HAL_RCCEx_GetD3PCLK1Freq() / UART_GET_DIV_FACTOR(huart->Init.ClockPrescaler)); + pclk = HAL_RCCEx_GetD3PCLK1Freq(); break; case UART_CLOCKSOURCE_PLL2: HAL_RCCEx_GetPLL2ClockFreq(&pll2_clocks); - lpuart_ker_ck_pres = (pll2_clocks.PLL2_Q_Frequency / UART_GET_DIV_FACTOR(huart->Init.ClockPrescaler)); + pclk = pll2_clocks.PLL2_Q_Frequency; break; case UART_CLOCKSOURCE_PLL3: HAL_RCCEx_GetPLL3ClockFreq(&pll3_clocks); - lpuart_ker_ck_pres = (pll3_clocks.PLL3_Q_Frequency / UART_GET_DIV_FACTOR(huart->Init.ClockPrescaler)); + pclk = pll3_clocks.PLL3_Q_Frequency; break; case UART_CLOCKSOURCE_HSI: if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) { - lpuart_ker_ck_pres = ((uint32_t)(HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3U)) / UART_GET_DIV_FACTOR(huart->Init.ClockPrescaler)); + pclk = (uint32_t)(HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3U)); } else { - lpuart_ker_ck_pres = ((uint32_t) HSI_VALUE / UART_GET_DIV_FACTOR(huart->Init.ClockPrescaler)); + pclk = (uint32_t) HSI_VALUE; } break; case UART_CLOCKSOURCE_CSI: - lpuart_ker_ck_pres = ((uint32_t)CSI_VALUE / UART_GET_DIV_FACTOR(huart->Init.ClockPrescaler)); + pclk = (uint32_t) CSI_VALUE; break; case UART_CLOCKSOURCE_LSE: - lpuart_ker_ck_pres = ((uint32_t)LSE_VALUE / UART_GET_DIV_FACTOR(huart->Init.ClockPrescaler)); + pclk = (uint32_t) LSE_VALUE; break; default: + pclk = 0U; ret = HAL_ERROR; break; } - /* if proper clock source reported */ - if (lpuart_ker_ck_pres != 0U) + /* If proper clock source reported */ + if (pclk != 0U) { - /* ensure that Frequency clock is in the range [3 * baudrate, 4096 * baudrate] */ + /* Compute clock after Prescaler */ + lpuart_ker_ck_pres = (pclk / UARTPrescTable[huart->Init.ClockPrescaler]); + + /* Ensure that Frequency clock is in the range [3 * baudrate, 4096 * baudrate] */ if ((lpuart_ker_ck_pres < (3U * huart->Init.BaudRate)) || (lpuart_ker_ck_pres > (4096U * huart->Init.BaudRate))) { @@ -2970,42 +2976,9 @@ HAL_StatusTypeDef UART_SetConfig(UART_HandleTypeDef *huart) } else { - switch (clocksource) - { - case UART_CLOCKSOURCE_D3PCLK1: - pclk = HAL_RCCEx_GetD3PCLK1Freq(); - usartdiv = (uint32_t)(UART_DIV_LPUART(pclk, huart->Init.BaudRate, huart->Init.ClockPrescaler)); - break; - case UART_CLOCKSOURCE_PLL2: - HAL_RCCEx_GetPLL2ClockFreq(&pll2_clocks); - usartdiv = (uint32_t)(UART_DIV_LPUART(pll2_clocks.PLL2_Q_Frequency, huart->Init.BaudRate, huart->Init.ClockPrescaler)); - break; - case UART_CLOCKSOURCE_PLL3: - HAL_RCCEx_GetPLL3ClockFreq(&pll3_clocks); - usartdiv = (uint32_t)(UART_DIV_LPUART(pll3_clocks.PLL3_Q_Frequency, huart->Init.BaudRate, huart->Init.ClockPrescaler)); - break; - case UART_CLOCKSOURCE_HSI: - if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) - { - usartdiv = (uint32_t)(UART_DIV_LPUART((uint32_t)(HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3U)), huart->Init.BaudRate, huart->Init.ClockPrescaler)); - } - else - { - usartdiv = (uint32_t)(UART_DIV_LPUART(HSI_VALUE, huart->Init.BaudRate, huart->Init.ClockPrescaler)); - } - break; - case UART_CLOCKSOURCE_CSI: - usartdiv = (uint32_t)(UART_DIV_LPUART(CSI_VALUE, huart->Init.BaudRate, huart->Init.ClockPrescaler)); - break; - case UART_CLOCKSOURCE_LSE: - usartdiv = (uint32_t)(UART_DIV_LPUART(LSE_VALUE, huart->Init.BaudRate, huart->Init.ClockPrescaler)); - break; - default: - ret = HAL_ERROR; - break; - } - - /* It is forbidden to write values lower than 0x300 in the LPUART_BRR register */ + /* Check computed UsartDiv value is in allocated range + (it is forbidden to write values lower than 0x300 in the LPUART_BRR register) */ + usartdiv = (uint32_t)(UART_DIV_LPUART(pclk, (uint64_t)huart->Init.BaudRate, huart->Init.ClockPrescaler)); if ((usartdiv >= LPUART_BRR_MIN) && (usartdiv <= LPUART_BRR_MAX)) { huart->Instance->BRR = usartdiv; @@ -3014,8 +2987,8 @@ HAL_StatusTypeDef UART_SetConfig(UART_HandleTypeDef *huart) { ret = HAL_ERROR; } - } /* if ( (lpuart_ker_ck_pres < (3 * huart->Init.BaudRate) ) || (lpuart_ker_ck_pres > (4096 * huart->Init.BaudRate) )) */ - } /* if (lpuart_ker_ck_pres != 0) */ + } /* if ( (lpuart_ker_ck_pres < (3 * huart->Init.BaudRate) ) || (lpuart_ker_ck_pres > (4096 * huart->Init.BaudRate) )) */ + } /* if (pclk != 0) */ } /* Check UART Over Sampling to set Baud Rate Register */ else if (huart->Init.OverSampling == UART_OVERSAMPLING_8) @@ -3024,51 +2997,54 @@ HAL_StatusTypeDef UART_SetConfig(UART_HandleTypeDef *huart) { case UART_CLOCKSOURCE_D2PCLK1: pclk = HAL_RCC_GetPCLK1Freq(); - usartdiv = (uint16_t)(UART_DIV_SAMPLING8(pclk, huart->Init.BaudRate, huart->Init.ClockPrescaler)); break; case UART_CLOCKSOURCE_D2PCLK2: pclk = HAL_RCC_GetPCLK2Freq(); - usartdiv = (uint16_t)(UART_DIV_SAMPLING8(pclk, huart->Init.BaudRate, huart->Init.ClockPrescaler)); break; case UART_CLOCKSOURCE_PLL2: HAL_RCCEx_GetPLL2ClockFreq(&pll2_clocks); - usartdiv = (uint16_t)(UART_DIV_SAMPLING8(pll2_clocks.PLL2_Q_Frequency, huart->Init.BaudRate, huart->Init.ClockPrescaler)); + pclk = pll2_clocks.PLL2_Q_Frequency; break; case UART_CLOCKSOURCE_PLL3: HAL_RCCEx_GetPLL3ClockFreq(&pll3_clocks); - usartdiv = (uint16_t)(UART_DIV_SAMPLING8(pll3_clocks.PLL3_Q_Frequency, huart->Init.BaudRate, huart->Init.ClockPrescaler)); + pclk = pll3_clocks.PLL3_Q_Frequency; break; case UART_CLOCKSOURCE_HSI: if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) { - usartdiv = (uint16_t)(UART_DIV_SAMPLING8((HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3U)), huart->Init.BaudRate, huart->Init.ClockPrescaler)); + pclk = (uint32_t)(HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3U)); } else { - usartdiv = (uint16_t)(UART_DIV_SAMPLING8(HSI_VALUE, huart->Init.BaudRate, huart->Init.ClockPrescaler)); + pclk = (uint32_t) HSI_VALUE; } break; case UART_CLOCKSOURCE_CSI: - usartdiv = (uint16_t)(UART_DIV_SAMPLING8(CSI_VALUE, huart->Init.BaudRate, huart->Init.ClockPrescaler)); + pclk = (uint32_t) CSI_VALUE; break; case UART_CLOCKSOURCE_LSE: - usartdiv = (uint16_t)(UART_DIV_SAMPLING8((uint32_t)LSE_VALUE, huart->Init.BaudRate, huart->Init.ClockPrescaler)); + pclk = (uint32_t) LSE_VALUE; break; default: + pclk = 0U; ret = HAL_ERROR; break; } /* USARTDIV must be greater than or equal to 0d16 */ - if ((usartdiv >= UART_BRR_MIN) && (usartdiv <= UART_BRR_MAX)) + if (pclk != 0U) { - brrtemp = (uint16_t)(usartdiv & 0xFFF0U); - brrtemp |= (uint16_t)((usartdiv & (uint16_t)0x000FU) >> 1U); - huart->Instance->BRR = brrtemp; - } - else - { - ret = HAL_ERROR; + usartdiv = (uint16_t)(UART_DIV_SAMPLING8(pclk, huart->Init.BaudRate, huart->Init.ClockPrescaler)); + if ((usartdiv >= UART_BRR_MIN) && (usartdiv <= UART_BRR_MAX)) + { + brrtemp = (uint16_t)(usartdiv & 0xFFF0U); + brrtemp |= (uint16_t)((usartdiv & (uint16_t)0x000FU) >> 1U); + huart->Instance->BRR = brrtemp; + } + else + { + ret = HAL_ERROR; + } } } else @@ -3077,49 +3053,52 @@ HAL_StatusTypeDef UART_SetConfig(UART_HandleTypeDef *huart) { case UART_CLOCKSOURCE_D2PCLK1: pclk = HAL_RCC_GetPCLK1Freq(); - usartdiv = (uint16_t)(UART_DIV_SAMPLING16(pclk, huart->Init.BaudRate, huart->Init.ClockPrescaler)); break; case UART_CLOCKSOURCE_D2PCLK2: pclk = HAL_RCC_GetPCLK2Freq(); - usartdiv = (uint16_t)(UART_DIV_SAMPLING16(pclk, huart->Init.BaudRate, huart->Init.ClockPrescaler)); break; case UART_CLOCKSOURCE_PLL2: HAL_RCCEx_GetPLL2ClockFreq(&pll2_clocks); - usartdiv = (uint16_t)(UART_DIV_SAMPLING16(pll2_clocks.PLL2_Q_Frequency, huart->Init.BaudRate, huart->Init.ClockPrescaler)); + pclk = pll2_clocks.PLL2_Q_Frequency; break; case UART_CLOCKSOURCE_PLL3: HAL_RCCEx_GetPLL3ClockFreq(&pll3_clocks); - usartdiv = (uint16_t)(UART_DIV_SAMPLING16(pll3_clocks.PLL3_Q_Frequency, huart->Init.BaudRate, huart->Init.ClockPrescaler)); + pclk = pll3_clocks.PLL3_Q_Frequency; break; case UART_CLOCKSOURCE_HSI: if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) { - usartdiv = (uint16_t)(UART_DIV_SAMPLING16((HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3U)), huart->Init.BaudRate, huart->Init.ClockPrescaler)); + pclk = (uint32_t)(HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3U)); } else { - usartdiv = (uint16_t)(UART_DIV_SAMPLING16(HSI_VALUE, huart->Init.BaudRate, huart->Init.ClockPrescaler)); + pclk = (uint32_t) HSI_VALUE; } break; case UART_CLOCKSOURCE_CSI: - usartdiv = (uint16_t)(UART_DIV_SAMPLING16(CSI_VALUE, huart->Init.BaudRate, huart->Init.ClockPrescaler)); + pclk = (uint32_t) CSI_VALUE; break; case UART_CLOCKSOURCE_LSE: - usartdiv = (uint16_t)(UART_DIV_SAMPLING16((uint32_t)LSE_VALUE, huart->Init.BaudRate, huart->Init.ClockPrescaler)); + pclk = (uint32_t) LSE_VALUE; break; default: + pclk = 0U; ret = HAL_ERROR; break; } - /* USARTDIV must be greater than or equal to 0d16 */ - if ((usartdiv >= UART_BRR_MIN) && (usartdiv <= UART_BRR_MAX)) + if (pclk != 0U) { - huart->Instance->BRR = usartdiv; - } - else - { - ret = HAL_ERROR; + /* USARTDIV must be greater than or equal to 0d16 */ + usartdiv = (uint16_t)(UART_DIV_SAMPLING16(pclk, huart->Init.BaudRate, huart->Init.ClockPrescaler)); + if ((usartdiv >= UART_BRR_MIN) && (usartdiv <= UART_BRR_MAX)) + { + huart->Instance->BRR = usartdiv; + } + else + { + ret = HAL_ERROR; + } } } @@ -3292,7 +3271,7 @@ HAL_StatusTypeDef UART_WaitOnFlagUntilTimeout(UART_HandleTypeDef *huart, uint32_ { /* Clear Receiver Timeout flag*/ __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_RTOF); - + /* Disable TXE, RXNE, PE and ERR (Frame error, noise error, overrun error) interrupts for the interrupt process */ CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE | USART_CR1_TXEIE_TXFNFIE)); CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE); @@ -3300,10 +3279,10 @@ HAL_StatusTypeDef UART_WaitOnFlagUntilTimeout(UART_HandleTypeDef *huart, uint32_ huart->gState = HAL_UART_STATE_READY; huart->RxState = HAL_UART_STATE_READY; huart->ErrorCode = HAL_UART_ERROR_RTO; - + /* Process Unlocked */ __HAL_UNLOCK(huart); - + return HAL_TIMEOUT; } } diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart_ex.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart_ex.c index 9492085..822a2fb 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart_ex.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart_ex.c @@ -60,10 +60,10 @@ * @{ */ /* UART RX FIFO depth */ -#define RX_FIFO_DEPTH 8U +#define RX_FIFO_DEPTH 16U /* UART TX FIFO depth */ -#define TX_FIFO_DEPTH 8U +#define TX_FIFO_DEPTH 16U /** * @} */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_usart.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_usart.c index 7157d59..1040492 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_usart.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_usart.c @@ -2150,7 +2150,7 @@ void HAL_USART_IRQHandler(USART_HandleTypeDef *husart) /* USART Receiver Timeout interrupt occurred ---------------------------------*/ if (((isrflags & USART_ISR_RTOF) != 0U) && ((cr1its & USART_CR1_RTOIE) != 0U)) { - __HAL_UART_CLEAR_FLAG(husart, UART_CLEAR_RTOF); + __HAL_USART_CLEAR_IT(husart, USART_CLEAR_RTOF); husart->ErrorCode |= HAL_USART_ERROR_RTO; } diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_usart_ex.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_usart_ex.c index f38b03d..ac5bade 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_usart_ex.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_usart_ex.c @@ -58,10 +58,10 @@ * @{ */ /* USART RX FIFO depth */ -#define RX_FIFO_DEPTH 8U +#define RX_FIFO_DEPTH 16U /* USART TX FIFO depth */ -#define TX_FIFO_DEPTH 8U +#define TX_FIFO_DEPTH 16U /** * @} */ diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_wwdg.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_wwdg.c index a4e29c5..ac9e448 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_wwdg.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_wwdg.c @@ -31,11 +31,21 @@ (+) WWDG Counter refresh is allowed between the following limits : (++) min time (mS) = 1000 * (Counter - Window) / WWDG clock (++) max time (mS) = 1000 * (Counter - 0x40) / WWDG clock - (+) Typical values: - (++) Counter min (T[5;0] = 0x00) @56MHz (PCLK1) with zero prescaler: - max timeout before reset: approximately 73.14s - (++) Counter max (T[5;0] = 0x3F) @56MHz (PCLK1) with prescaler dividing by 128: - max timeout before reset: approximately 599.18ms + (+) Typical values (case of STM32H74x/5x devices): + (++) Counter min (T[5;0] = 0x00) @100MHz (PCLK1) with zero prescaler: + max timeout before reset: approximately 40.96µs + (++) Counter max (T[5;0] = 0x3F) @100MHz (PCLK1) with prescaler dividing by 128: + max timeout before reset: approximately 335.54ms + (+) Typical values (case of STM32H7Ax/Bx devices): + (++) Counter min (T[5;0] = 0x00) @140MHz (PCLK1) with zero prescaler: + max timeout before reset: approximately 29.25µs + (++) Counter max (T[5;0] = 0x3F) @140MHz (PCLK1) with prescaler dividing by 128: + max timeout before reset: approximately 239.67ms + (+) Typical values (case of STM32H72x/3x devices): + (++) Counter min (T[5;0] = 0x00) @125MHz (PCLK1) with zero prescaler: + max timeout before reset: approximately 32.76µs + (++) Counter max (T[5;0] = 0x3F) @125MHz (PCLK1) with prescaler dividing by 128: + max timeout before reset: approximately 268.43ms ============================================================================== ##### How to use this driver ##### diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_adc.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_adc.c index 151c9f6..df01887 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_adc.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_adc.c @@ -333,7 +333,7 @@ ErrorStatus LL_ADC_CommonDeInit(ADC_Common_TypeDef *ADCxy_COMMON) /* Check the parameters */ assert_param(IS_ADC_COMMON_INSTANCE(ADCxy_COMMON)); - if(ADCxy_COMMON == ADC12_COMMON) + if (ADCxy_COMMON == ADC12_COMMON) { /* Force reset of ADC clock (core clock) */ LL_AHB1_GRP1_ForceReset(LL_AHB1_GRP1_PERIPH_ADC12); @@ -608,19 +608,19 @@ ErrorStatus LL_ADC_DeInit(ADC_TypeDef *ADCx) /* Reset register CFGR */ CLEAR_BIT(ADCx->CFGR, - ( ADC_CFGR_AWD1CH | ADC_CFGR_JAUTO | ADC_CFGR_JAWD1EN + (ADC_CFGR_AWD1CH | ADC_CFGR_JAUTO | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL | ADC_CFGR_JQM | ADC_CFGR_JDISCEN | ADC_CFGR_DISCNUM | ADC_CFGR_DISCEN | ADC_CFGR_AUTDLY | ADC_CFGR_CONT | ADC_CFGR_OVRMOD | ADC_CFGR_EXTEN | ADC_CFGR_EXTSEL | ADC_CFGR_RES - | ADC_CFGR_DMNGT ) + | ADC_CFGR_DMNGT) ); SET_BIT(ADCx->CFGR, ADC_CFGR_JQDIS); /* Reset register CFGR2 */ CLEAR_BIT(ADCx->CFGR2, - ( ADC_CFGR2_LSHIFT | ADC_CFGR2_OVSR | ADC_CFGR2_RSHIFT1 + (ADC_CFGR2_LSHIFT | ADC_CFGR2_OVSR | ADC_CFGR2_RSHIFT1 | ADC_CFGR2_RSHIFT4 | ADC_CFGR2_RSHIFT3 | ADC_CFGR2_RSHIFT2 | ADC_CFGR2_RSHIFT1 | ADC_CFGR2_ROVSM | ADC_CFGR2_TROVS | ADC_CFGR2_OVSS | ADC_CFGR2_JOVSE | ADC_CFGR2_ROVSE) @@ -642,6 +642,29 @@ ErrorStatus LL_ADC_DeInit(ADC_TypeDef *ADCx) ); /* Reset register TR1 */ +#if defined(ADC_VER_V5_V90) + if (ADCx == ADC3) + { + /* Reset register TR1 */ + MODIFY_REG(ADCx->LTR1_TR1, ADC3_TR1_AWDFILT | ADC3_TR1_HT1 | ADC3_TR1_LT1, ADC3_TR1_HT1); + + /* Reset register TR2 */ + MODIFY_REG(ADCx->HTR1_TR2, ADC3_TR2_HT2 | ADC3_TR2_LT2, ADC3_TR2_HT2); + + /* Reset register TR3 */ + MODIFY_REG(ADCx->RES1_TR3, ADC3_TR3_HT3 | ADC3_TR3_LT3, ADC3_TR3_HT3); + } + else + { + CLEAR_BIT(ADCx->LTR1_TR1, ADC_LTR_LT); + SET_BIT(ADCx->HTR1_TR2, ADC_HTR_HT); + + CLEAR_BIT(ADCx->LTR2_DIFSEL, ADC_LTR_LT); + SET_BIT(ADCx->HTR2_CALFACT, ADC_HTR_HT); + CLEAR_BIT(ADCx->LTR3_RES10, ADC_LTR_LT); + SET_BIT(ADCx->HTR3_RES11, ADC_HTR_HT); + } +#else CLEAR_BIT(ADCx->LTR1, ADC_LTR_LT); SET_BIT(ADCx->HTR1, ADC_HTR_HT); @@ -649,6 +672,7 @@ ErrorStatus LL_ADC_DeInit(ADC_TypeDef *ADCx) SET_BIT(ADCx->HTR2, ADC_HTR_HT); CLEAR_BIT(ADCx->LTR3, ADC_LTR_LT); SET_BIT(ADCx->HTR3, ADC_HTR_HT); +#endif /* Reset register SQR1 */ CLEAR_BIT(ADCx->SQR1, @@ -701,6 +725,25 @@ ErrorStatus LL_ADC_DeInit(ADC_TypeDef *ADCx) CLEAR_BIT(ADCx->AWD3CR, ADC_AWD3CR_AWD3CH); /* Reset register DIFSEL */ +#if defined(ADC_VER_V5_V90) + if (ADCx == ADC3) + { + CLEAR_BIT(ADCx->LTR2_DIFSEL, ADC_DIFSEL_DIFSEL); + + /* Reset register CALFACT */ + CLEAR_BIT(ADCx->HTR2_CALFACT, ADC_CALFACT_CALFACT_D | ADC_CALFACT_CALFACT_S); + } + else + { + CLEAR_BIT(ADCx->DIFSEL_RES12, ADC_DIFSEL_DIFSEL); + + /* Reset register CALFACT */ + CLEAR_BIT(ADCx->CALFACT_RES13, ADC_CALFACT_CALFACT_D | ADC_CALFACT_CALFACT_S); + + /* Reset register CALFACT2 */ + CLEAR_BIT(ADCx->CALFACT2_RES14, ADC_CALFACT2_LINCALFACT); + } +#else CLEAR_BIT(ADCx->DIFSEL, ADC_DIFSEL_DIFSEL); /* Reset register CALFACT */ @@ -708,6 +751,7 @@ ErrorStatus LL_ADC_DeInit(ADC_TypeDef *ADCx) /* Reset register CALFACT2 */ CLEAR_BIT(ADCx->CALFACT2, ADC_CALFACT2_LINCALFACT); +#endif } else { diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_cordic.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_cordic.c new file mode 100644 index 0000000..da5b22b --- /dev/null +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_cordic.c @@ -0,0 +1,105 @@ +/** + ****************************************************************************** + * @file stm32h7xx_ll_cordic.c + * @author MCD Application Team + * @brief CORDIC LL module driver. + ****************************************************************************** + * @attention + * + *

                  © Copyright (c) 2017 STMicroelectronics. + * All rights reserved.

                  + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ +#if defined(USE_FULL_LL_DRIVER) + +/* Includes ------------------------------------------------------------------*/ +#include "stm32h7xx_ll_cordic.h" +#include "stm32h7xx_ll_bus.h" +#ifdef USE_FULL_ASSERT +#include "stm32_assert.h" +#else +#define assert_param(expr) ((void)0U) +#endif + +/** @addtogroup STM32H7xx_LL_Driver + * @{ + */ + +#if defined(CORDIC) + +/** @addtogroup CORDIC_LL + * @{ + */ + +/* Private types -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private constants ---------------------------------------------------------*/ +/* Private macros ------------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ + +/* Exported functions --------------------------------------------------------*/ +/** @addtogroup CORDIC_LL_Exported_Functions + * @{ + */ + +/** @addtogroup CORDIC_LL_EF_Init + * @{ + */ + +/** + * @brief De-Initialize CORDIC peripheral registers to their default reset values. + * @param CORDICx CORDIC Instance + * @retval An ErrorStatus enumeration value: + * - SUCCESS: CORDIC registers are de-initialized + * - ERROR: CORDIC registers are not de-initialized + */ +ErrorStatus LL_CORDIC_DeInit(CORDIC_TypeDef *CORDICx) +{ + ErrorStatus status = SUCCESS; + + /* Check the parameters */ + assert_param(IS_CORDIC_ALL_INSTANCE(CORDICx)); + + if (CORDICx == CORDIC) + { + /* Force CORDIC reset */ + LL_AHB2_GRP1_ForceReset(LL_AHB2_GRP1_PERIPH_CORDIC); + + /* Release CORDIC reset */ + LL_AHB2_GRP1_ReleaseReset(LL_AHB2_GRP1_PERIPH_CORDIC); + } + else + { + status = ERROR; + } + + return (status); +} + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#endif /* defined(CORDIC) */ + +/** + * @} + */ + +#endif /* USE_FULL_LL_DRIVER */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_dma.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_dma.c index 5d309ee..9db91e9 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_dma.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_dma.c @@ -68,11 +68,13 @@ #define IS_LL_DMA_NBDATA(__VALUE__) ((__VALUE__) <= 0x0000FFFFU) -#if defined(ADC3) +#if defined(TIM24) +#define IS_LL_DMA_REQUEST(REQUEST) (((REQUEST) <= LL_DMAMUX1_REQ_TIM24_TRIG)) +#elif defined(ADC3) #define IS_LL_DMA_REQUEST(REQUEST) (((REQUEST) <= LL_DMAMUX1_REQ_ADC3)) #else #define IS_LL_DMA_REQUEST(REQUEST) (((REQUEST) <= LL_DMAMUX1_REQ_USART10_TX)) -#endif /* ADC3 */ +#endif /* TIM24 */ #define IS_LL_DMA_PRIORITY(__VALUE__) (((__VALUE__) == LL_DMA_PRIORITY_LOW) || \ ((__VALUE__) == LL_DMA_PRIORITY_MEDIUM) || \ diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_fmac.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_fmac.c new file mode 100644 index 0000000..337d4f7 --- /dev/null +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_fmac.c @@ -0,0 +1,167 @@ +/** + ****************************************************************************** + * @file stm32h7xx_ll_fmac.c + * @author MCD Application Team + * @brief FMAC LL module driver. + ****************************************************************************** + * @attention + * + *

                  © Copyright (c) 2017 STMicroelectronics. + * All rights reserved.

                  + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ +#if defined(USE_FULL_LL_DRIVER) + +/* Includes ------------------------------------------------------------------*/ +#include "stm32h7xx_ll_fmac.h" +#include "stm32h7xx_ll_bus.h" +#ifdef USE_FULL_ASSERT +#include "stm32_assert.h" +#else +#define assert_param(expr) ((void)0U) +#endif /* USE_FULL_ASSERT */ + +/** @addtogroup STM32H7xx_LL_Driver + * @{ + */ + +#if defined(FMAC) + +/** @addtogroup FMAC_LL + * @{ + */ + +/* Private types -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private constants ---------------------------------------------------------*/ +/* Private macros ------------------------------------------------------------*/ +/** @addtogroup FMAC_LL_Private_Macros + * @{ + */ + +/** @brief Check if the watermark value is a valid one. + * @param __VALUE__ Watermak value. + * @retval SET (__VALUE__ is a valid value) or RESET (__VALUE__ is invalid) + */ +#define IS_LL_FMAC_WM(__VALUE__) (((__VALUE__) == LL_FMAC_WM_0_THRESHOLD_1) \ + || ((__VALUE__) == LL_FMAC_WM_1_THRESHOLD_2) \ + || ((__VALUE__) == LL_FMAC_WM_2_THRESHOLD_4) \ + || ((__VALUE__) == LL_FMAC_WM_3_THRESHOLD_8)) + +/** @brief Check if the function ID is a valid one. + * @param __VALUE__ Function ID. + * @retval SET (__VALUE__ is a valid value) or RESET (__VALUE__ is invalid) + */ +#define IS_LL_FMAC_FUNC(__VALUE__) (((__VALUE__) == LL_FMAC_FUNC_LOAD_X1) \ + || ((__VALUE__) == LL_FMAC_FUNC_LOAD_X2) \ + || ((__VALUE__) == LL_FMAC_FUNC_LOAD_Y) \ + || ((__VALUE__) == LL_FMAC_FUNC_CONVO_FIR) \ + || ((__VALUE__) == LL_FMAC_FUNC_IIR_DIRECT_FORM_1)) + + +/** + * @} + */ + +/* Private function prototypes -----------------------------------------------*/ + +/* Exported functions --------------------------------------------------------*/ +/** @addtogroup FMAC_LL_Exported_Functions + * @{ + */ + +/** @addtogroup FMAC_LL_EF_Init + * @{ + */ + +/** + * @brief Initialize FMAC peripheral registers to their default reset values. + * @param FMACx FMAC Instance + * @retval An ErrorStatus enumeration value: + * - SUCCESS: FMAC registers are initialized + * - ERROR: FMAC registers are not initialized + */ +ErrorStatus LL_FMAC_Init(FMAC_TypeDef *FMACx) +{ + ErrorStatus status = SUCCESS; + + /* Check the parameters */ + assert_param(IS_FMAC_ALL_INSTANCE(FMACx)); + + if (FMACx == FMAC) + { + /* Perform the reset */ + LL_FMAC_EnableReset(FMACx); + + /* Wait until flag is reset */ + while (LL_FMAC_IsEnabledReset(FMACx) != 0UL) + { + } + } + else + { + status = ERROR; + } + + return (status); +} + +/** + * @brief De-Initialize FMAC peripheral registers to their default reset values. + * @param FMACx FMAC Instance + * @retval An ErrorStatus enumeration value: + * - SUCCESS: FMAC registers are de-initialized + * - ERROR: FMAC registers are not de-initialized + */ +ErrorStatus LL_FMAC_DeInit(FMAC_TypeDef *FMACx) +{ + ErrorStatus status = SUCCESS; + + /* Check the parameters */ + assert_param(IS_FMAC_ALL_INSTANCE(FMACx)); + + if (FMACx == FMAC) + { + /* Force FMAC reset */ + LL_AHB2_GRP1_ForceReset(LL_AHB2_GRP1_PERIPH_FMAC); + + /* Release FMAC reset */ + LL_AHB2_GRP1_ReleaseReset(LL_AHB2_GRP1_PERIPH_FMAC); + } + else + { + status = ERROR; + } + + return (status); +} + + + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#endif /* defined(FMAC) */ + +/** + * @} + */ + +#endif /* USE_FULL_LL_DRIVER */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_i2c.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_i2c.c index a1eac83..09e20cb 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_i2c.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_i2c.c @@ -31,7 +31,7 @@ * @{ */ -#if defined (I2C1) || defined (I2C2) || defined (I2C3) || defined (I2C4) +#if defined (I2C1) || defined (I2C2) || defined (I2C3) || defined (I2C4) || defined (I2C5) /** @defgroup I2C_LL I2C * @{ @@ -124,6 +124,16 @@ ErrorStatus LL_I2C_DeInit(I2C_TypeDef *I2Cx) /* Release reset of I2C clock */ LL_APB4_GRP1_ReleaseReset(LL_APB4_GRP1_PERIPH_I2C4); } +#if defined(I2C5) + else if (I2Cx == I2C5) + { + /* Force reset of I2C clock */ + LL_APB1_GRP1_ForceReset(LL_APB1_GRP1_PERIPH_I2C5); + + /* Release reset of I2C clock */ + LL_APB1_GRP1_ReleaseReset(LL_APB1_GRP1_PERIPH_I2C5); + } +#endif else { status = ERROR; @@ -232,7 +242,7 @@ void LL_I2C_StructInit(LL_I2C_InitTypeDef *I2C_InitStruct) * @} */ -#endif /* I2C1 || I2C2 || I2C3 || I2C4 */ +#endif /* I2C1 || I2C2 || I2C3 || I2C4 || I2C5 */ /** * @} diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_mdma.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_mdma.c index 5e3ab2b..1c33f82 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_mdma.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_mdma.c @@ -254,7 +254,7 @@ ((__VALUE__) == LL_MDMA_REQ_SDMMC1_DMA_ENDBUFFER) || \ ((__VALUE__) == LL_MDMA_REQ_SDMMC1_COMMAND_END)) -#else /* STM32H7A3/B3 devices */ +#elif defined (OCTOSPI1) && defined (JPEG) /* STM32H7A3/B3 devices */ #define IS_LL_MDMA_HWTRIGGER(__VALUE__) (((__VALUE__) == LL_MDMA_REQ_DMA1_STREAM0_TC) || \ ((__VALUE__) == LL_MDMA_REQ_DMA1_STREAM1_TC) || \ ((__VALUE__) == LL_MDMA_REQ_DMA1_STREAM2_TC) || \ @@ -287,7 +287,34 @@ ((__VALUE__) == LL_MDMA_REQ_SDMMC1_COMMAND_END) || \ ((__VALUE__) == LL_MDMA_REQ_OCTOSPI2_FIFO_TH) || \ ((__VALUE__) == LL_MDMA_REQ_OCTOSPI2_TC)) - +#else /* STM32H723/25/33/35 devices */ +#define IS_LL_MDMA_HWTRIGGER(__VALUE__) (((__VALUE__) == LL_MDMA_REQ_DMA1_STREAM0_TC) || \ + ((__VALUE__) == LL_MDMA_REQ_DMA1_STREAM1_TC) || \ + ((__VALUE__) == LL_MDMA_REQ_DMA1_STREAM2_TC) || \ + ((__VALUE__) == LL_MDMA_REQ_DMA1_STREAM3_TC) || \ + ((__VALUE__) == LL_MDMA_REQ_DMA1_STREAM4_TC) || \ + ((__VALUE__) == LL_MDMA_REQ_DMA1_STREAM5_TC) || \ + ((__VALUE__) == LL_MDMA_REQ_DMA1_STREAM6_TC) || \ + ((__VALUE__) == LL_MDMA_REQ_DMA1_STREAM7_TC) || \ + ((__VALUE__) == LL_MDMA_REQ_DMA2_STREAM0_TC) || \ + ((__VALUE__) == LL_MDMA_REQ_DMA2_STREAM1_TC) || \ + ((__VALUE__) == LL_MDMA_REQ_DMA2_STREAM2_TC) || \ + ((__VALUE__) == LL_MDMA_REQ_DMA2_STREAM3_TC) || \ + ((__VALUE__) == LL_MDMA_REQ_DMA2_STREAM4_TC) || \ + ((__VALUE__) == LL_MDMA_REQ_DMA2_STREAM5_TC) || \ + ((__VALUE__) == LL_MDMA_REQ_DMA2_STREAM6_TC) || \ + ((__VALUE__) == LL_MDMA_REQ_DMA2_STREAM7_TC) || \ + ((__VALUE__) == LL_MDMA_REQ_LTDC_LINE_IT) || \ + ((__VALUE__) == LL_MDMA_REQ_OCTOSPI1_FIFO_TH) || \ + ((__VALUE__) == LL_MDMA_REQ_OCTOSPI1_TC) || \ + ((__VALUE__) == LL_MDMA_REQ_DMA2D_CLUT_TC) || \ + ((__VALUE__) == LL_MDMA_REQ_DMA2D_TC) || \ + ((__VALUE__) == LL_MDMA_REQ_DMA2D_TW) || \ + ((__VALUE__) == LL_MDMA_REQ_SDMMC1_END_DATA) || \ + ((__VALUE__) == LL_MDMA_REQ_SDMMC1_DMA_ENDBUFFER) || \ + ((__VALUE__) == LL_MDMA_REQ_SDMMC1_COMMAND_END) || \ + ((__VALUE__) == LL_MDMA_REQ_OCTOSPI2_FIFO_TH) || \ + ((__VALUE__) == LL_MDMA_REQ_OCTOSPI2_TC)) #endif /* QUADSPI && JPEG && DSI */ /** * @} diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_pwr.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_pwr.c index 31045a9..28ce161 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_pwr.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_pwr.c @@ -55,9 +55,13 @@ */ ErrorStatus LL_PWR_DeInit(void) { +#if defined (PWR_WKUPCR_WKUPC3) WRITE_REG(PWR->WKUPCR, (PWR_WKUPCR_WKUPC1 | PWR_WKUPCR_WKUPC2 | PWR_WKUPCR_WKUPC3 | \ PWR_WKUPCR_WKUPC4 | PWR_WKUPCR_WKUPC5 | PWR_WKUPCR_WKUPC6)); - +#else + WRITE_REG(PWR->WKUPCR, (PWR_WKUPCR_WKUPC1 | PWR_WKUPCR_WKUPC2 | \ + PWR_WKUPCR_WKUPC4 | PWR_WKUPCR_WKUPC6)); +#endif /* defined (PWR_WKUPCR_WKUPC3) */ return SUCCESS; } diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_rcc.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_rcc.c index 9dd56c5..282b9ab 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_rcc.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_rcc.c @@ -56,16 +56,20 @@ const uint8_t LL_RCC_PrescTable[16] = {0, 0, 0, 0, 1, 2, 3, 4, 1, 2, 3, 4, 6, 7, || ((__VALUE__) == LL_RCC_LPTIM2_CLKSOURCE) \ || ((__VALUE__) == LL_RCC_LPTIM345_CLKSOURCE)) -#if defined(LL_RCC_SAI4A_CLKSOURCE) +#if defined(SAI3) #define IS_LL_RCC_SAI_CLKSOURCE(__VALUE__) (((__VALUE__) == LL_RCC_SAI1_CLKSOURCE) \ || ((__VALUE__) == LL_RCC_SAI23_CLKSOURCE) \ || ((__VALUE__) == LL_RCC_SAI4A_CLKSOURCE) \ || ((__VALUE__) == LL_RCC_SAI4B_CLKSOURCE)) +#elif defined(SAI4) +#define IS_LL_RCC_SAI_CLKSOURCE(__VALUE__) (((__VALUE__) == LL_RCC_SAI1_CLKSOURCE) \ + || ((__VALUE__) == LL_RCC_SAI4A_CLKSOURCE) \ + || ((__VALUE__) == LL_RCC_SAI4B_CLKSOURCE)) #else #define IS_LL_RCC_SAI_CLKSOURCE(__VALUE__) (((__VALUE__) == LL_RCC_SAI1_CLKSOURCE) \ || ((__VALUE__) == LL_RCC_SAI2A_CLKSOURCE) \ || ((__VALUE__) == LL_RCC_SAI2B_CLKSOURCE)) -#endif /* LL_RCC_SAI4A_CLKSOURCE */ +#endif /* SAI3 */ #define IS_LL_RCC_SPI_CLKSOURCE(__VALUE__) (((__VALUE__) == LL_RCC_SPI123_CLKSOURCE) \ || ((__VALUE__) == LL_RCC_SPI45_CLKSOURCE) \ @@ -115,6 +119,13 @@ uint32_t RCC_GetPCLK4ClockFreq(uint32_t HCLK_Frequency); */ void LL_RCC_DeInit(void) { + /* Increasing the CPU frequency */ + if(FLASH_LATENCY_DEFAULT > (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY))) + { + /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ + MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, (uint32_t)(FLASH_LATENCY_DEFAULT)); + } + /* Set HSION bit */ SET_BIT(RCC->CR, RCC_CR_HSION); @@ -199,6 +210,14 @@ void LL_RCC_DeInit(void) /* Clear reset source flags */ SET_BIT(RCC->RSR, RCC_RSR_RMVF); + + /* Decreasing the number of wait states because of lower CPU frequency */ + if(FLASH_LATENCY_DEFAULT < (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY))) + { + /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ + MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, (uint32_t)(FLASH_LATENCY_DEFAULT)); + } + } /** @@ -810,14 +829,14 @@ uint32_t LL_RCC_GetSAIClockFreq(uint32_t SAIxSource) #if defined(SAI3) case LL_RCC_SAI23_CLKSOURCE_PLL1Q: #endif /* SAI3 */ +#if defined(SAI4) + case LL_RCC_SAI4A_CLKSOURCE_PLL1Q: + case LL_RCC_SAI4B_CLKSOURCE_PLL1Q: +#endif /* SAI4 */ #if defined (RCC_CDCCIP1R_SAI2ASEL) || defined(RCC_CDCCIP1R_SAI2BSEL) case LL_RCC_SAI2A_CLKSOURCE_PLL1Q: case LL_RCC_SAI2B_CLKSOURCE_PLL1Q: -#endif /* (RCC_CDCCIP1R_SAI2ASEL) || (RCC_CDCCIP1R_SAI2BSEL) */ -#if defined(SAI4_Block_A) || defined(SAI4_Block_B) - case LL_RCC_SAI4A_CLKSOURCE_PLL1Q: - case LL_RCC_SAI4B_CLKSOURCE_PLL1Q: -#endif /* (SAI4_Block_A) || (SAI4_Block_B) */ +#endif /* RCC_CDCCIP1R_SAI2ASEL || RCC_CDCCIP1R_SAI2BSEL */ if (LL_RCC_PLL1_IsReady() != 0U) { LL_RCC_GetPLL1ClockFreq(&PLL_Clocks); @@ -829,14 +848,14 @@ uint32_t LL_RCC_GetSAIClockFreq(uint32_t SAIxSource) #if defined(SAI3) case LL_RCC_SAI23_CLKSOURCE_PLL2P: #endif /* SAI3 */ +#if defined(SAI4) + case LL_RCC_SAI4A_CLKSOURCE_PLL2P: + case LL_RCC_SAI4B_CLKSOURCE_PLL2P: +#endif /* SAI4 */ #if defined (RCC_CDCCIP1R_SAI2ASEL) || defined(RCC_CDCCIP1R_SAI2BSEL) case LL_RCC_SAI2A_CLKSOURCE_PLL2P: case LL_RCC_SAI2B_CLKSOURCE_PLL2P: -#endif /* (RCC_CDCCIP1R_SAI2ASEL) || (RCC_CDCCIP1R_SAI2BSEL) */ -#if defined(SAI4_Block_A) || defined(SAI4_Block_B) - case LL_RCC_SAI4A_CLKSOURCE_PLL2P: - case LL_RCC_SAI4B_CLKSOURCE_PLL2P: -#endif /* (SAI2_Block_A_BASE) || (SAI2_Block_B_BASE) */ +#endif /* RCC_CDCCIP1R_SAI2ASEL || RCC_CDCCIP1R_SAI2BSEL */ if (LL_RCC_PLL2_IsReady() != 0U) { LL_RCC_GetPLL2ClockFreq(&PLL_Clocks); @@ -848,14 +867,14 @@ uint32_t LL_RCC_GetSAIClockFreq(uint32_t SAIxSource) #if defined(SAI3) case LL_RCC_SAI23_CLKSOURCE_PLL3P: #endif /* SAI3 */ +#if defined(SAI4) + case LL_RCC_SAI4A_CLKSOURCE_PLL3P: + case LL_RCC_SAI4B_CLKSOURCE_PLL3P: +#endif /* SAI4 */ #if defined (RCC_CDCCIP1R_SAI2ASEL) || defined(RCC_CDCCIP1R_SAI2BSEL) case LL_RCC_SAI2A_CLKSOURCE_PLL3P: case LL_RCC_SAI2B_CLKSOURCE_PLL3P: -#endif /* (RCC_CDCCIP1R_SAI2ASEL) || (RCC_CDCCIP1R_SAI2BSEL) */ -#if defined(SAI4_Block_A) || defined(SAI4_Block_B) - case LL_RCC_SAI4A_CLKSOURCE_PLL3P: - case LL_RCC_SAI4B_CLKSOURCE_PLL3P: -#endif /* (SAI2_Block_A_BASE) || (SAI2_Block_B_BASE) */ +#endif /* RCC_CDCCIP1R_SAI2ASEL || RCC_CDCCIP1R_SAI2BSEL */ if (LL_RCC_PLL3_IsReady() != 0U) { LL_RCC_GetPLL3ClockFreq(&PLL_Clocks); @@ -867,14 +886,14 @@ uint32_t LL_RCC_GetSAIClockFreq(uint32_t SAIxSource) #if defined(SAI3) case LL_RCC_SAI23_CLKSOURCE_I2S_CKIN: #endif /* SAI3 */ +#if defined(SAI4) + case LL_RCC_SAI4A_CLKSOURCE_I2S_CKIN: + case LL_RCC_SAI4B_CLKSOURCE_I2S_CKIN: +#endif /* SAI4 */ #if defined (RCC_CDCCIP1R_SAI2ASEL) || defined(RCC_CDCCIP1R_SAI2BSEL) case LL_RCC_SAI2A_CLKSOURCE_I2S_CKIN: case LL_RCC_SAI2B_CLKSOURCE_I2S_CKIN: -#endif /* (RCC_CDCCIP1R_SAI2ASEL) || (RCC_CDCCIP1R_SAI2BSEL) */ -#if defined(SAI4_Block_A) || defined(SAI4_Block_B) - case LL_RCC_SAI4A_CLKSOURCE_I2S_CKIN: - case LL_RCC_SAI4B_CLKSOURCE_I2S_CKIN: -#endif /* (SAI2_Block_A_BASE) || (SAI2_Block_B_BASE) */ +#endif /* RCC_CDCCIP1R_SAI2ASEL || RCC_CDCCIP1R_SAI2BSEL */ sai_frequency = EXTERNAL_CLOCK_VALUE; break; @@ -882,14 +901,14 @@ uint32_t LL_RCC_GetSAIClockFreq(uint32_t SAIxSource) #if defined(SAI3) case LL_RCC_SAI23_CLKSOURCE_CLKP: #endif /* SAI3 */ +#if defined(SAI4) + case LL_RCC_SAI4A_CLKSOURCE_CLKP: + case LL_RCC_SAI4B_CLKSOURCE_CLKP: +#endif /* SAI4 */ #if defined (RCC_CDCCIP1R_SAI2ASEL) || defined(RCC_CDCCIP1R_SAI2BSEL) case LL_RCC_SAI2A_CLKSOURCE_CLKP: case LL_RCC_SAI2B_CLKSOURCE_CLKP: -#endif /* (RCC_CDCCIP1R_SAI2ASEL) || (RCC_CDCCIP1R_SAI2BSEL) */ -#if defined(SAI4_Block_A) || defined(SAI4_Block_B) - case LL_RCC_SAI4A_CLKSOURCE_CLKP: - case LL_RCC_SAI4B_CLKSOURCE_CLKP: -#endif /* (SAI2_Block_A_BASE) || (SAI2_Block_B_BASE) */ +#endif /* RCC_CDCCIP1R_SAI2ASEL || RCC_CDCCIP1R_SAI2BSEL */ sai_frequency = LL_RCC_GetCLKPClockFreq(LL_RCC_CLKP_CLKSOURCE); break; @@ -1558,7 +1577,7 @@ uint32_t LL_RCC_GetQSPIClockFreq(uint32_t QSPIxSource) #if defined(OCTOSPI1) || defined(OCTOSPI2) /** * @brief Return OSPI clock frequency - * @param QSPIxSource This parameter can be one of the following values: + * @param OSPIxSource This parameter can be one of the following values: * @arg @ref LL_RCC_OSPI_CLKSOURCE * @retval OSPI clock frequency (in Hz) * - @ref LL_RCC_PERIPH_FREQUENCY_NO indicates that oscillator is not ready diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_sdmmc.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_sdmmc.c index e97363a..114b67e 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_sdmmc.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_sdmmc.c @@ -728,16 +728,17 @@ uint32_t SDMMC_CmdEraseEndAdd(SDMMC_TypeDef *SDMMCx, uint32_t EndAdd) /** * @brief Send the Erase command and check the response - * @param SDMMCx: Pointer to SDMMC register base + * @param SDMMCx Pointer to SDMMC register base + * @param EraseType Type of erase to be performed * @retval HAL status */ -uint32_t SDMMC_CmdErase(SDMMC_TypeDef *SDMMCx) +uint32_t SDMMC_CmdErase(SDMMC_TypeDef *SDMMCx, uint32_t EraseType) { SDMMC_CmdInitTypeDef sdmmc_cmdinit; uint32_t errorstate; /* Set Block Size for Card */ - sdmmc_cmdinit.Argument = 0U; + sdmmc_cmdinit.Argument = EraseType; sdmmc_cmdinit.CmdIndex = SDMMC_CMD_ERASE; sdmmc_cmdinit.Response = SDMMC_RESPONSE_SHORT; sdmmc_cmdinit.WaitForInterrupt = SDMMC_WAIT_NO; @@ -1204,7 +1205,7 @@ static uint32_t SDMMC_GetCmdError(SDMMC_TypeDef *SDMMCx) { /* 8 is the number of required instructions cycles for the below loop statement. The SDMMC_CMDTIMEOUT is expressed in ms */ - register uint32_t count = SDMMC_CMDTIMEOUT * (SystemCoreClock / 8U /1000U); + uint32_t count = SDMMC_CMDTIMEOUT * (SystemCoreClock / 8U /1000U); do { @@ -1234,7 +1235,7 @@ static uint32_t SDMMC_GetCmdResp1(SDMMC_TypeDef *SDMMCx, uint8_t SD_CMD, uint32_ /* 8 is the number of required instructions cycles for the below loop statement. The Timeout is expressed in ms */ - register uint32_t count = Timeout * (SystemCoreClock / 8U /1000U); + uint32_t count = Timeout * (SystemCoreClock / 8U /1000U); do { @@ -1367,7 +1368,7 @@ static uint32_t SDMMC_GetCmdResp2(SDMMC_TypeDef *SDMMCx) uint32_t sta_reg; /* 8 is the number of required instructions cycles for the below loop statement. The SDMMC_CMDTIMEOUT is expressed in ms */ - register uint32_t count = SDMMC_CMDTIMEOUT * (SystemCoreClock / 8U /1000U); + uint32_t count = SDMMC_CMDTIMEOUT * (SystemCoreClock / 8U /1000U); do { @@ -1411,7 +1412,7 @@ static uint32_t SDMMC_GetCmdResp3(SDMMC_TypeDef *SDMMCx) uint32_t sta_reg; /* 8 is the number of required instructions cycles for the below loop statement. The SDMMC_CMDTIMEOUT is expressed in ms */ - register uint32_t count = SDMMC_CMDTIMEOUT * (SystemCoreClock / 8U /1000U); + uint32_t count = SDMMC_CMDTIMEOUT * (SystemCoreClock / 8U /1000U); do { @@ -1453,7 +1454,7 @@ static uint32_t SDMMC_GetCmdResp6(SDMMC_TypeDef *SDMMCx, uint8_t SD_CMD, uint16_ /* 8 is the number of required instructions cycles for the below loop statement. The SDMMC_CMDTIMEOUT is expressed in ms */ - register uint32_t count = SDMMC_CMDTIMEOUT * (SystemCoreClock / 8U /1000U); + uint32_t count = SDMMC_CMDTIMEOUT * (SystemCoreClock / 8U /1000U); do { @@ -1524,7 +1525,7 @@ static uint32_t SDMMC_GetCmdResp7(SDMMC_TypeDef *SDMMCx) uint32_t sta_reg; /* 8 is the number of required instructions cycles for the below loop statement. The SDMMC_CMDTIMEOUT is expressed in ms */ - register uint32_t count = SDMMC_CMDTIMEOUT * (SystemCoreClock / 8U /1000U); + uint32_t count = SDMMC_CMDTIMEOUT * (SystemCoreClock / 8U /1000U); do { diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_tim.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_tim.c index a11ca83..688f0c1 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_tim.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_tim.c @@ -32,7 +32,7 @@ * @{ */ -#if defined (TIM1) || defined (TIM2) || defined (TIM3) || defined (TIM4) || defined (TIM5) || defined (TIM6) || defined (TIM7) || defined (TIM8) || defined (TIM12) || defined (TIM13) || defined (TIM14) || defined (TIM15) || defined (TIM16) || defined (TIM17) +#if defined (TIM1) || defined (TIM2) || defined (TIM3) || defined (TIM4) || defined (TIM5) || defined (TIM6) || defined (TIM7) || defined (TIM8) || defined (TIM12) || defined (TIM13) || defined (TIM14) || defined (TIM15) || defined (TIM16) || defined (TIM17) || defined (TIM23) || defined (TIM24) /** @addtogroup TIM_LL * @{ @@ -1369,7 +1369,7 @@ static ErrorStatus IC4Config(TIM_TypeDef *TIMx, LL_TIM_IC_InitTypeDef *TIM_ICIni * @} */ -#endif /* TIM1 || TIM2 || TIM3 || TIM4 || TIM5 || TIM6 || TIM7 || TIM8 || TIM12 || TIM13 ||TIM14 || TIM15 || TIM16 || TIM17 */ +#endif /* TIM1 || TIM2 || TIM3 || TIM4 || TIM5 || TIM6 || TIM7 || TIM8 || TIM12 || TIM13 ||TIM14 || TIM15 || TIM16 || TIM17 || TIM23 || TIM24 */ /** * @} diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_usb.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_usb.c index 1e4ae32..2d92900 100755 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_usb.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_usb.c @@ -612,6 +612,12 @@ HAL_StatusTypeDef USB_DeactivateEndpoint(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EP /* Read DEPCTLn register */ if (ep->is_in == 1U) { + if ((USBx_INEP(epnum)->DIEPCTL & USB_OTG_DIEPCTL_EPENA) == USB_OTG_DIEPCTL_EPENA) + { + USBx_INEP(epnum)->DIEPCTL |= USB_OTG_DIEPCTL_SNAK; + USBx_INEP(epnum)->DIEPCTL |= USB_OTG_DIEPCTL_EPDIS; + } + USBx_DEVICE->DEACHMSK &= ~(USB_OTG_DAINTMSK_IEPM & (uint32_t)(1UL << (ep->num & EP_ADDR_MSK))); USBx_DEVICE->DAINTMSK &= ~(USB_OTG_DAINTMSK_IEPM & (uint32_t)(1UL << (ep->num & EP_ADDR_MSK))); USBx_INEP(epnum)->DIEPCTL &= ~(USB_OTG_DIEPCTL_USBAEP | @@ -622,6 +628,12 @@ HAL_StatusTypeDef USB_DeactivateEndpoint(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EP } else { + if ((USBx_OUTEP(epnum)->DOEPCTL & USB_OTG_DOEPCTL_EPENA) == USB_OTG_DOEPCTL_EPENA) + { + USBx_OUTEP(epnum)->DOEPCTL |= USB_OTG_DOEPCTL_SNAK; + USBx_OUTEP(epnum)->DOEPCTL |= USB_OTG_DOEPCTL_EPDIS; + } + USBx_DEVICE->DEACHMSK &= ~(USB_OTG_DAINTMSK_OEPM & ((uint32_t)(1UL << (ep->num & EP_ADDR_MSK)) << 16)); USBx_DEVICE->DAINTMSK &= ~(USB_OTG_DAINTMSK_OEPM & ((uint32_t)(1UL << (ep->num & EP_ADDR_MSK)) << 16)); USBx_OUTEP(epnum)->DOEPCTL &= ~(USB_OTG_DOEPCTL_USBAEP | @@ -647,11 +659,23 @@ HAL_StatusTypeDef USB_DeactivateDedicatedEndpoint(USB_OTG_GlobalTypeDef *USBx, U /* Read DEPCTLn register */ if (ep->is_in == 1U) { + if ((USBx_INEP(epnum)->DIEPCTL & USB_OTG_DIEPCTL_EPENA) == USB_OTG_DIEPCTL_EPENA) + { + USBx_INEP(epnum)->DIEPCTL |= USB_OTG_DIEPCTL_SNAK; + USBx_INEP(epnum)->DIEPCTL |= USB_OTG_DIEPCTL_EPDIS; + } + USBx_INEP(epnum)->DIEPCTL &= ~ USB_OTG_DIEPCTL_USBAEP; USBx_DEVICE->DAINTMSK &= ~(USB_OTG_DAINTMSK_IEPM & (uint32_t)(1UL << (ep->num & EP_ADDR_MSK))); } else { + if ((USBx_OUTEP(epnum)->DOEPCTL & USB_OTG_DOEPCTL_EPENA) == USB_OTG_DOEPCTL_EPENA) + { + USBx_OUTEP(epnum)->DOEPCTL |= USB_OTG_DOEPCTL_SNAK; + USBx_OUTEP(epnum)->DOEPCTL |= USB_OTG_DOEPCTL_EPDIS; + } + USBx_OUTEP(epnum)->DOEPCTL &= ~USB_OTG_DOEPCTL_USBAEP; USBx_DEVICE->DAINTMSK &= ~(USB_OTG_DAINTMSK_OEPM & ((uint32_t)(1UL << (ep->num & EP_ADDR_MSK)) << 16)); } @@ -1324,7 +1348,7 @@ HAL_StatusTypeDef USB_HostInit(USB_OTG_GlobalTypeDef *USBx, USB_OTG_CfgTypeDef c if ((USBx->CID & (0x1U << 8)) != 0U) { - if (cfg.speed == USB_OTG_SPEED_FULL) + if (cfg.speed == USBH_FSLS_SPEED) { /* Force Device Enumeration to FS/LS mode only */ USBx_HOST->HCFG |= USB_OTG_HCFG_FSLSS; diff --git a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_utils.c b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_utils.c index a039e79..a24c6be 100644 --- a/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_utils.c +++ b/Libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_utils.c @@ -41,16 +41,21 @@ /** @addtogroup UTILS_LL_Private_Constants * @{ */ -#if (POWER_DOMAINS_NUMBER == 3U) -#define UTILS_MAX_FREQUENCY_SCALE1 400000000U /*!< Maximum frequency for system clock at power scale1, in Hz */ +#if (STM32H7_DEV_ID == 0x450UL) +#define UTILS_MAX_FREQUENCY_SCALE1 480000000U /*!< Maximum frequency for system clock at power scale1, in Hz */ #define UTILS_MAX_FREQUENCY_SCALE2 300000000U /*!< Maximum frequency for system clock at power scale2, in Hz */ #define UTILS_MAX_FREQUENCY_SCALE3 200000000U /*!< Maximum frequency for system clock at power scale3, in Hz */ -#else +#elif (STM32H7_DEV_ID == 0x480UL) #define UTILS_MAX_FREQUENCY_SCALE0 280000000U /*!< Maximum frequency for system clock at power scale0, in Hz */ #define UTILS_MAX_FREQUENCY_SCALE1 225000000U /*!< Maximum frequency for system clock at power scale1, in Hz */ #define UTILS_MAX_FREQUENCY_SCALE2 160000000U /*!< Maximum frequency for system clock at power scale2, in Hz */ #define UTILS_MAX_FREQUENCY_SCALE3 88000000U /*!< Maximum frequency for system clock at power scale3, in Hz */ -#endif /*POWER_DOMAINS_NUMBER == 3U*/ +#elif (STM32H7_DEV_ID == 0x483UL) +#define UTILS_MAX_FREQUENCY_SCALE0 550000000U /*!< Maximum frequency for system clock at power scale0, in Hz */ +#define UTILS_MAX_FREQUENCY_SCALE1 200000000U /*!< Maximum frequency for system clock at power scale1, in Hz */ +#define UTILS_MAX_FREQUENCY_SCALE2 150000000U /*!< Maximum frequency for system clock at power scale2, in Hz */ +#define UTILS_MAX_FREQUENCY_SCALE3 85000000U /*!< Maximum frequency for system clock at power scale3, in Hz */ +#endif /*STM32H7_DEV_ID == 0x450UL*/ /* Defines used for PLL range */ #define UTILS_PLLVCO_INPUT_MIN1 1000000U /*!< Frequency min for the low range PLLVCO input, in Hz */ @@ -79,7 +84,7 @@ #define UTILS_HSE_FREQUENCY_MAX 48000000U /*!< Frequency max for HSE frequency, in Hz */ /* Defines used for FLASH latency according to HCLK Frequency */ -#if (POWER_DOMAINS_NUMBER == 2U) +#if (STM32H7_DEV_ID == 0x480UL) #define UTILS_SCALE0_LATENCY0_FREQ 44000000U /*!< HCLK frequency to set FLASH latency 0 in power scale 0 */ #define UTILS_SCALE0_LATENCY1_FREQ 88000000U /*!< HCLK frequency to set FLASH latency 1 in power scale 0 */ #define UTILS_SCALE0_LATENCY2_FREQ 132000000U /*!< HCLK frequency to set FLASH latency 2 in power scale 0 */ @@ -106,11 +111,11 @@ #define UTILS_SCALE3_LATENCY2_FREQ 66000000U /*!< HCLK frequency to set FLASH latency 2 in power scale 3 */ #define UTILS_SCALE3_LATENCY3_FREQ 88000000U /*!< HCLK frequency to set FLASH latency 3 in power scale 3 */ -#else +#elif (STM32H7_DEV_ID == 0x450UL) #define UTILS_SCALE1_LATENCY0_FREQ 70000000U /*!< HCLK frequency to set FLASH latency 0 in power scale 1 */ #define UTILS_SCALE1_LATENCY1_FREQ 140000000U /*!< HCLK frequency to set FLASH latency 1 in power scale 1 */ -#define UTILS_SCALE1_LATENCY2_FREQ 210000000U /*!< HCLK frequency to set FLASH latency 2 in power scale 1 */ +#define UTILS_SCALE1_LATENCY2_FREQ 240000000U /*!< HCLK frequency to set FLASH latency 2 in power scale 1 */ #define UTILS_SCALE2_LATENCY0_FREQ 55000000U /*!< HCLK frequency to set FLASH latency 0 in power scale 2 */ #define UTILS_SCALE2_LATENCY1_FREQ 110000000U /*!< HCLK frequency to set FLASH latency 1 in power scale 2 */ @@ -122,7 +127,27 @@ #define UTILS_SCALE3_LATENCY2_FREQ 135000000U /*!< HCLK frequency to set FLASH latency 2 in power scale 3 */ #define UTILS_SCALE3_LATENCY3_FREQ 180000000U /*!< HCLK frequency to set FLASH latency 3 in power scale 3 */ #define UTILS_SCALE3_LATENCY4_FREQ 225000000U /*!< HCLK frequency to set FLASH latency 4 in power scale 3 */ -#endif /*POWER_DOMAINS_NUMBER == 2U*/ + +#elif (STM32H7_DEV_ID == 0x483UL) + +#define UTILS_SCALE0_LATENCY0_FREQ 70000000U /*!< HCLK frequency to set FLASH latency 0 in power scale 0 */ +#define UTILS_SCALE0_LATENCY1_FREQ 140000000U /*!< HCLK frequency to set FLASH latency 1 in power scale 0 */ +#define UTILS_SCALE0_LATENCY2_FREQ 210000000U /*!< HCLK frequency to set FLASH latency 2 in power scale 0 */ +#define UTILS_SCALE0_LATENCY3_FREQ 275000000U /*!< HCLK frequency to set FLASH latency 3 in power scale 0 */ + +#define UTILS_SCALE1_LATENCY0_FREQ 67000000U /*!< HCLK frequency to set FLASH latency 0 in power scale 1 */ +#define UTILS_SCALE1_LATENCY1_FREQ 133000000U /*!< HCLK frequency to set FLASH latency 1 in power scale 1 */ +#define UTILS_SCALE1_LATENCY2_FREQ 200000000U /*!< HCLK frequency to set FLASH latency 2 in power scale 1 */ + +#define UTILS_SCALE2_LATENCY0_FREQ 50000000U /*!< HCLK frequency to set FLASH latency 0 in power scale 2 */ +#define UTILS_SCALE2_LATENCY1_FREQ 100000000U /*!< HCLK frequency to set FLASH latency 1 in power scale 2 */ +#define UTILS_SCALE2_LATENCY2_FREQ 150000000U /*!< HCLK frequency to set FLASH latency 2 in power scale 2 */ + +#define UTILS_SCALE3_LATENCY0_FREQ 35000000U /*!< HCLK frequency to set FLASH latency 0 in power scale 3 */ +#define UTILS_SCALE3_LATENCY1_FREQ 70000000U /*!< HCLK frequency to set FLASH latency 1 in power scale 3 */ +#define UTILS_SCALE3_LATENCY2_FREQ 85000000U /*!< HCLK frequency to set FLASH latency 2 in power scale 3 */ + +#endif /*STM32H7_DEV_ID == 0x480UL*/ /** * @} */ @@ -201,7 +226,7 @@ (((__RANGEIN__) == LL_RCC_PLLINPUTRANGE_1_2) && ((__RANGEOUT__) == LL_RCC_PLLVCORANGE_MEDIUM)) || \ (((__RANGEIN__) != LL_RCC_PLLINPUTRANGE_1_2) && ((__RANGEOUT__) == LL_RCC_PLLVCORANGE_WIDE))) -#if (POWER_DOMAINS_NUMBER == 3U) +#if (STM32H7_DEV_ID == 0x450UL) #define IS_LL_UTILS_PLL_FREQUENCY(__VALUE__) ((LL_PWR_GetRegulVoltageScaling() == LL_PWR_REGU_VOLTAGE_SCALE1) ? ((__VALUE__) <= UTILS_MAX_FREQUENCY_SCALE1) : \ (LL_PWR_GetRegulVoltageScaling() == LL_PWR_REGU_VOLTAGE_SCALE2) ? ((__VALUE__) <= UTILS_MAX_FREQUENCY_SCALE2) : \ ((__VALUE__) <= UTILS_MAX_FREQUENCY_SCALE3)) @@ -210,7 +235,7 @@ (LL_PWR_GetRegulVoltageScaling() == LL_PWR_REGU_VOLTAGE_SCALE1) ? ((__VALUE__) <= UTILS_MAX_FREQUENCY_SCALE1) : \ (LL_PWR_GetRegulVoltageScaling() == LL_PWR_REGU_VOLTAGE_SCALE2) ? ((__VALUE__) <= UTILS_MAX_FREQUENCY_SCALE2) : \ ((__VALUE__) <= UTILS_MAX_FREQUENCY_SCALE3)) -#endif /*POWER_DOMAINS_NUMBER == 3U*/ +#endif /* STM32H7_DEV_ID == 0x450UL */ #define IS_LL_UTILS_HSE_BYPASS(__STATE__) (((__STATE__) == LL_UTILS_HSEBYPASS_ON) \ || ((__STATE__) == LL_UTILS_HSEBYPASS_OFF)) @@ -304,6 +329,7 @@ void LL_mDelay(uint32_t Delay) * @} */ +#if (STM32H7_DEV_ID == 0x450UL) /** @addtogroup UTILS_EF_SYSTEM * @brief System Configuration functions * @@ -314,9 +340,8 @@ void LL_mDelay(uint32_t Delay) [..] System, AHB and APB buses clocks configuration -#if (POWER_DOMAINS_NUMBER == 3U) - (+) The maximum frequency of the SYSCLK is 400 MHz and HCLK is 200 MHz. - (+) The maximum frequency of the PCLK1, PCLK2, PCLK3 and PCLK4 is 100 MHz. + (+) The maximum frequency of the SYSCLK is 480 MHz(*) and HCLK is 240 MHz. + (+) The maximum frequency of the PCLK1, PCLK2, PCLK3 and PCLK4 is 120 MHz. @endverbatim @internal Depending on the device voltage range, the maximum frequency should be @@ -331,14 +356,29 @@ void LL_mDelay(uint32_t Delay) (++) |----------------|-------------------|-------------------|-------------------| (++) |1WS(2CPU cycle) | 70 < HCLK <= 140 | 55 < HCLK <= 110 | 45 < HCLK <= 90 | (++) |----------------|-------------------|-------------------|-------------------| - (++) |2WS(3CPU cycle) | 140 < HCLK <= 210 | 110 < HCLK <= 165 | 90 < HCLK <= 135 | + (++) |2WS(3CPU cycle) | 140 < HCLK <= 240 | 110 < HCLK <= 165 | 90 < HCLK <= 135 | (++) |----------------|-------------------|-------------------|-------------------| (++) |3WS(4CPU cycle) | -- | 165 < HCLK <= 220 | 135 < HCLK <= 180 | (++) |----------------|-------------------|-------------------|-------------------| (++) |4WS(5CPU cycle) | -- | -- | 180 < HCLK <= 225 | (++) +----------------------------------------------------------------------------+ -#else + (*) : For stm32h74xxx and stm32h75xxx family lines and requires the board to be connected on LDO regulator not SMPS, 400MHZ otherwise. + @endinternal + * @{ + */ + +#elif (STM32H7_DEV_ID == 0x480UL) +/** @addtogroup UTILS_EF_SYSTEM + * @brief System Configuration functions + * + @verbatim + =============================================================================== + ##### System Configuration functions ##### + =============================================================================== + [..] + System, AHB and APB buses clocks configuration + (+) The maximum frequency of the SYSCLK is 280 MHz and HCLK is 280 MHz. (+) The maximum frequency of the PCLK1, PCLK2, PCLK3 and PCLK4 is 140 MHz. @endverbatim @@ -368,10 +408,48 @@ void LL_mDelay(uint32_t Delay) (++) |7WS(8CPU cycle) | -- | -- | -- | -- | (++) +------------------------------------------------------------------------------------------------+ -#endif @endinternal * @{ */ + +#elif (STM32H7_DEV_ID == 0x483UL) +/** @addtogroup UTILS_EF_SYSTEM + * @brief System Configuration functions + * + @verbatim + =============================================================================== + ##### System Configuration functions ##### + =============================================================================== + [..] + System, AHB and APB buses clocks configuration + + (+) The maximum frequency of the SYSCLK is 550 MHz(*) and HCLK is 275 MHz. + (+) The maximum frequency of the PCLK1, PCLK2, PCLK3 and PCLK4 is 137.5 MHz. + @endverbatim + @internal + Depending on the device voltage range, the maximum frequency should be + adapted accordingly: + (++) +------------------------------------------------------------------------------------------------+ + (++) | Wait states | HCLK clock frequency (MHz) | + (++) | |-------------------------------------------------------------------------------| + (++) | (Latency) | voltage range 0 | voltage range 1 | voltage range 2 | voltage range 3 | + (++) | | 1.26V - 1.40V | 1.15V - 1.26V | 1.05V - 1.15V | 0.95V - 1.05V | + (++) |----------------|-------------------|-------------------|-------------------|-------------------| + (++) |0WS(1CPU cycle) | 0 < HCLK <= 70 | 0 < HCLK <= 67 | 0 < HCLK <= 50 | 0 < HCLK <= 35 | + (++) |----------------|-------------------|-------------------|-------------------|-------------------| + (++) |1WS(2CPU cycle) | 70 < HCLK <= 140 | 67 < HCLK <= 133 | 50 < HCLK <= 100 | 35 < HCLK <= 70 | + (++) |----------------|-------------------|-------------------|-------------------|-------------------| + (++) |2WS(3CPU cycle) | 140 < HCLK <= 210 | 133 < HCLK <= 200 | 100 < HCLK <= 150 | 70 < HCLK <= 85 | + (++) |----------------|-------------------|-------------------|-------------------|-------------------| + (++) |3WS(4CPU cycle) | 210 < HCLK <= 275 | -- | -- | -- | + (++) +----------------|-------------------|-------------------|-------------------|-------------------| + + (*) : For stm32h72xxx and stm32h73xxx family lines and requires to enable the CPU_FREQ_BOOST flash option byte, 520MHZ otherwise. + @endinternal + * @{ + */ +#endif /* STM32H7_DEV_ID == 0x450UL */ + #if defined (DUAL_CORE) /** * @brief This function sets directly SystemCoreClock CMSIS variable. @@ -405,8 +483,8 @@ void LL_SetSystemCoreClock(uint32_t CPU_Frequency) * @note Function is based on the following formula: * - PLL output frequency = (((HSI frequency / PLLM) * PLLN) / PLLP) * - PLLM: ensure that the VCO input frequency ranges from 1 to 16 MHz (PLLVCO_input = HSI frequency / PLLM) - * - PLLN: ensure that the VCO output frequency is between 150 and 836 MHz or 128 to 560 MHz(*) (PLLVCO_output = PLLVCO_input * PLLN) - * - PLLP: ensure that max frequency at 400000000 Hz or 280000000 Hz is reach (PLLVCO_output / PLLP) + * - PLLN: ensure that the VCO output frequency is between 150 and 836 MHz or 128 to 560 MHz(***) (PLLVCO_output = PLLVCO_input * PLLN) + * - PLLP: ensure that max frequency at 550000000 Hz(*), 480000000 Hz(**) or 280000000 Hz(***) is reach (PLLVCO_output / PLLP) * @param UTILS_PLLInitStruct pointer to a @ref LL_UTILS_PLLInitTypeDef structure that contains * the configuration information for the PLL. * @param UTILS_ClkInitStruct pointer to a @ref LL_UTILS_ClkInitTypeDef structure that contains @@ -415,7 +493,9 @@ void LL_SetSystemCoreClock(uint32_t CPU_Frequency) * - SUCCESS: Max frequency configuration done * - ERROR: Max frequency configuration not done * - * (*) : For stm32h7a3xx, stm32h7b3xx and stm32h7b0xx family lines. + * (*) : For stm32h72xxx and stm32h73xxx family lines and requires to enable the CPU_FREQ_BOOST flash option byte, 520MHZ otherwise. + * (**) : For stm32h74xxx and stm32h75xxx family lines and requires the board to be connected on LDO regulator not SMPS, 400MHZ otherwise. + * (***): For stm32h7a3xx, stm32h7b3xx and stm32h7b0xx family lines. * */ ErrorStatus LL_PLL_ConfigSystemClock_HSI(LL_UTILS_PLLInitTypeDef *UTILS_PLLInitStruct, @@ -495,8 +575,8 @@ ErrorStatus LL_PLL_ConfigSystemClock_HSI(LL_UTILS_PLLInitTypeDef *UTILS_PLLInitS * @note Function is based on the following formula: * - PLL output frequency = (((HSE frequency / PLLM) * PLLN) / PLLP) * - PLLM: ensure that the VCO input frequency ranges from 0.95 to 2.10 MHz (PLLVCO_input = HSE frequency / PLLM) - * - PLLN: ensure that the VCO output frequency is between 150 and 836 MHz or 128 to 560 MHz(*) (PLLVCO_output = PLLVCO_input * PLLN) - * - PLLP: ensure that max frequency at 400000000 Hz or 280000000 Hz(*) is reached (PLLVCO_output / PLLP) + * - PLLN: ensure that the VCO output frequency is between 150 and 836 MHz or 128 to 560 MHz(***) (PLLVCO_output = PLLVCO_input * PLLN) + * - PLLP: ensure that max frequency at 550000000 Hz(*), 480000000 Hz(**) or 280000000 Hz(***) is reached (PLLVCO_output / PLLP) * @param HSEFrequency Value between Min_Data = 4000000 and Max_Data = 48000000 * @param HSEBypass This parameter can be one of the following values: * @arg @ref LL_UTILS_HSEBYPASS_ON @@ -509,7 +589,9 @@ ErrorStatus LL_PLL_ConfigSystemClock_HSI(LL_UTILS_PLLInitTypeDef *UTILS_PLLInitS * - SUCCESS: Max frequency configuration done * - ERROR: Max frequency configuration not done * - * (*) : For stm32h7a3xx, stm32h7b3xx and stm32h7b0xx family lines. + * (*) : For stm32h72xxx and stm32h73xxx family lines and requires to enable the CPU_FREQ_BOOST flash option byte, 520MHZ otherwise. + * (**) : For stm32h74xxx and stm32h75xxx family lines and requires the board to be connected on LDO regulator not SMPS, 400MHZ otherwise. + * (***): For stm32h7a3xx, stm32h7b3xx and stm32h7b0xx family lines. * */ ErrorStatus LL_PLL_ConfigSystemClock_HSE(uint32_t HSEFrequency, uint32_t HSEBypass, @@ -622,9 +704,10 @@ ErrorStatus LL_SetFlashLatency(uint32_t HCLK_Frequency) } else { -#if (POWER_DOMAINS_NUMBER == 2U) +#if (STM32H7_DEV_ID == 0x480UL) || (STM32H7_DEV_ID == 0x483UL) if(LL_PWR_GetRegulVoltageScaling() == LL_PWR_REGU_VOLTAGE_SCALE0) { +#if (STM32H7_DEV_ID == 0x480UL) if((HCLK_Frequency > UTILS_SCALE0_LATENCY5_FREQ) && (HCLK_Frequency <= UTILS_SCALE0_LATENCY6_FREQ)) { /* 264 < HCLK <= 280 => 6WS (7 CPU cycles) */ @@ -641,6 +724,9 @@ ErrorStatus LL_SetFlashLatency(uint32_t HCLK_Frequency) latency = LL_FLASH_LATENCY_4; } else if((HCLK_Frequency > UTILS_SCALE0_LATENCY2_FREQ) && (HCLK_Frequency <= UTILS_SCALE0_LATENCY3_FREQ)) +#elif (STM32H7_DEV_ID == 0x483UL) + if((HCLK_Frequency > UTILS_SCALE0_LATENCY2_FREQ) && (HCLK_Frequency <= UTILS_SCALE0_LATENCY3_FREQ)) +#endif /* STM32H7_DEV_ID == 0x480UL */ { /* 132 < HCLK <= 176 => 3WS (4 CPU cycles) */ latency = LL_FLASH_LATENCY_3; @@ -664,6 +750,7 @@ ErrorStatus LL_SetFlashLatency(uint32_t HCLK_Frequency) status = ERROR; } } +#if (STM32H7_DEV_ID == 0x480UL) else if(LL_PWR_GetRegulVoltageScaling() == LL_PWR_REGU_VOLTAGE_SCALE1) { if((HCLK_Frequency > UTILS_SCALE1_LATENCY4_FREQ) && (HCLK_Frequency <= UTILS_SCALE1_LATENCY5_FREQ)) @@ -686,7 +773,12 @@ ErrorStatus LL_SetFlashLatency(uint32_t HCLK_Frequency) if(LL_PWR_GetRegulVoltageScaling() == LL_PWR_REGU_VOLTAGE_SCALE1) { if((HCLK_Frequency > UTILS_SCALE1_LATENCY1_FREQ) && (HCLK_Frequency <= UTILS_SCALE1_LATENCY2_FREQ)) -#endif /*POWER_DOMAINS_NUMBER == 2U*/ +#endif /* STM32H7_DEV_ID == 0x480UL */ +#else + if(LL_PWR_GetRegulVoltageScaling() == LL_PWR_REGU_VOLTAGE_SCALE1) + { + if((HCLK_Frequency > UTILS_SCALE1_LATENCY1_FREQ) && (HCLK_Frequency <= UTILS_SCALE1_LATENCY2_FREQ)) +#endif /* STM32H7_DEV_ID == 0x480UL || STM32H7_DEV_ID == 0x483UL */ { /* 140 < HCLK <= 210 => 2WS (3 CPU cycles) */ latency = LL_FLASH_LATENCY_2; @@ -707,7 +799,8 @@ ErrorStatus LL_SetFlashLatency(uint32_t HCLK_Frequency) } else if(LL_PWR_GetRegulVoltageScaling() == LL_PWR_REGU_VOLTAGE_SCALE2) { -#if (POWER_DOMAINS_NUMBER == 2U) +#if (STM32H7_DEV_ID == 0x480UL) || (STM32H7_DEV_ID == 0x450UL) +#if (STM32H7_DEV_ID == 0x480UL) if((HCLK_Frequency > UTILS_SCALE2_LATENCY3_FREQ) && (HCLK_Frequency <= UTILS_SCALE2_LATENCY4_FREQ)) { /* 136 < HCLK <= 160 => 4WS (5 CPU cycles) */ @@ -716,12 +809,15 @@ ErrorStatus LL_SetFlashLatency(uint32_t HCLK_Frequency) else if((HCLK_Frequency > UTILS_SCALE2_LATENCY2_FREQ) && (HCLK_Frequency <= UTILS_SCALE2_LATENCY3_FREQ)) #else if((HCLK_Frequency > UTILS_SCALE2_LATENCY2_FREQ) && (HCLK_Frequency <= UTILS_SCALE2_LATENCY3_FREQ)) -#endif /*POWER_DOMAINS_NUMBER == 2U*/ +#endif /* STM32H7_DEV_ID == 0x480UL */ { /* 165 < HCLK <= 220 => 3WS (4 CPU cycles) */ latency = LL_FLASH_LATENCY_3; } else if((HCLK_Frequency > UTILS_SCALE2_LATENCY1_FREQ) && (HCLK_Frequency <= UTILS_SCALE2_LATENCY2_FREQ)) +#else + if((HCLK_Frequency > UTILS_SCALE2_LATENCY1_FREQ) && (HCLK_Frequency <= UTILS_SCALE2_LATENCY2_FREQ)) +#endif /* STM32H7_DEV_ID == 0x480UL || STM32H7_DEV_ID == 0x450UL */ { /* 110 < HCLK <= 165 => 2WS (3 CPU cycles) */ latency = LL_FLASH_LATENCY_2; @@ -742,7 +838,8 @@ ErrorStatus LL_SetFlashLatency(uint32_t HCLK_Frequency) } else /* Scale 3 */ { -#if (POWER_DOMAINS_NUMBER == 3U) +#if (STM32H7_DEV_ID == 0x450UL) || (STM32H7_DEV_ID == 0x480UL) +#if (STM32H7_DEV_ID == 0x450UL) if((HCLK_Frequency > UTILS_SCALE3_LATENCY3_FREQ) && (HCLK_Frequency <= UTILS_SCALE3_LATENCY4_FREQ)) { /* 180 < HCLK <= 225 => 4WS (5 CPU cycles) */ @@ -751,12 +848,15 @@ ErrorStatus LL_SetFlashLatency(uint32_t HCLK_Frequency) else if((HCLK_Frequency > UTILS_SCALE3_LATENCY2_FREQ) && (HCLK_Frequency <= UTILS_SCALE3_LATENCY3_FREQ)) #else if((HCLK_Frequency > UTILS_SCALE3_LATENCY2_FREQ) && (HCLK_Frequency <= UTILS_SCALE3_LATENCY3_FREQ)) -#endif /*POWER_DOMAINS_NUMBER == 3U*/ +#endif /*STM32H7_DEV_ID == 0x450UL*/ { /* 135 < HCLK <= 180 => 3WS (4 CPU cycles) */ latency = LL_FLASH_LATENCY_3; } else if((HCLK_Frequency > UTILS_SCALE3_LATENCY1_FREQ) && (HCLK_Frequency <= UTILS_SCALE3_LATENCY2_FREQ)) +#else + if((HCLK_Frequency > UTILS_SCALE3_LATENCY1_FREQ) && (HCLK_Frequency <= UTILS_SCALE3_LATENCY2_FREQ)) +#endif /* STM32H7_DEV_ID == 0x450UL || STM32H7_DEV_ID == 0x480UL */ { /* 90 < HCLK <= 135 => 2WS (3 CPU cycles) */ latency = LL_FLASH_LATENCY_2; @@ -795,7 +895,6 @@ ErrorStatus LL_SetFlashLatency(uint32_t HCLK_Frequency) status = ERROR; } } - } return status; @@ -891,12 +990,12 @@ static ErrorStatus UTILS_EnablePLLAndSwitchSystem(uint32_t SYSCLK_Frequency, LL_ /* Calculate the new HCLK frequency */ new_hclk_frequency = LL_RCC_CALC_HCLK_FREQ(SYSCLK_Frequency, UTILS_ClkInitStruct->AHBCLKDivider); - /* Increasing the number of wait states because of higher CPU frequency */ + /* Increasing the number of wait states because of higher CPU frequency */ if (SystemD2Clock < new_hclk_frequency) - { + { /* Set FLASH latency to highest latency */ status = LL_SetFlashLatency(new_hclk_frequency); - } + } /* Update system clock configuration */ if(status == SUCCESS) @@ -934,27 +1033,27 @@ static ErrorStatus UTILS_EnablePLLAndSwitchSystem(uint32_t SYSCLK_Frequency, LL_ LL_RCC_SetAPB4Prescaler(UTILS_ClkInitStruct->APB4CLKDivider); /* Decreasing the number of wait states because of lower CPU frequency */ - if (SystemD2Clock > new_hclk_frequency) - { - /* Set FLASH latency to lowest latency */ - status = LL_SetFlashLatency(new_hclk_frequency); - } + if (SystemD2Clock > new_hclk_frequency) + { + /* Set FLASH latency to lowest latency */ + status = LL_SetFlashLatency(new_hclk_frequency); + } - /* Update the SystemD2Clock global variable */ + /* Update the SystemD2Clock global variable */ #if defined(RCC_D1CFGR_HPRE) - SystemD2Clock = (SYSCLK_Frequency >> ((D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_HPRE)>> RCC_D1CFGR_HPRE_Pos]) & 0x1FU)); + SystemD2Clock = (SYSCLK_Frequency >> ((D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_HPRE)>> RCC_D1CFGR_HPRE_Pos]) & 0x1FU)); #else - SystemD2Clock = (SYSCLK_Frequency >> ((D1CorePrescTable[(RCC->CDCFGR1 & RCC_CDCFGR1_HPRE)>> RCC_CDCFGR1_HPRE_Pos]) & 0x1FU)); + SystemD2Clock = (SYSCLK_Frequency >> ((D1CorePrescTable[(RCC->CDCFGR1 & RCC_CDCFGR1_HPRE)>> RCC_CDCFGR1_HPRE_Pos]) & 0x1FU)); #endif - /* Update SystemCoreClock variable */ + /* Update SystemCoreClock variable */ #if defined(DUAL_CORE) && defined(CORE_CM4) - LL_SetSystemCoreClock(SystemD2Clock); + LL_SetSystemCoreClock(SystemD2Clock); #else - LL_SetSystemCoreClock(SYSCLK_Frequency); + LL_SetSystemCoreClock(SYSCLK_Frequency); #endif /* DUAL_CORE && CORE_CM4 */ - } + } return status; diff --git a/Project/H7-BOOT.bin b/Project/H7-BOOT.bin new file mode 100644 index 0000000000000000000000000000000000000000..379420d233e80592395227d43396fa9e56502bd8 GIT binary patch literal 47088 zcmd?Rdtg-6wLiYkV`k1wCS;NT1_Y14^OhPb0w6)cilK^_cb5Lu8 zkIMv51LAE^Y*E|WNNtO?{WgiF1uHc{ZAI(t86Yjb%F+96LlSFGNMKH$^ZV>GlZe{h z-}iU_`2GI)1o^<(8v#vuN>juqwN2i-}bft_x1gC^B40_oIj7}YT=9dezE?Gai1@Dd6>ez{O|I# zf90QzwxemZ+`r26ui|Ii{QnHUe+B1X#c%i*?Yp7sv-ti`aQ}Rr6EH6So$#MCoGQ`x z8ze+lq<)tOD#ocb6j@2ec-C(XE_-@P@Iu%}Vs*TYQnpd7P zf)Mds>UOnf1|2~@I3pO3>2WdWIxZIR?}=BFVYZ)$;S~p@6a6A54s!!D0!>nQMIzNb z%<9A)UV+~MmF8d%NJ3ynFucNAX~3dt*-O8N^&O+)Z=7HS@7- zPRm4T#N7(2x}Nc$Jq=8c6OyCzY0g*vF(5?#F<_7Iddf?rQF)jjfyuD`KhK1|sSX)p*+^+To zp{l_TmrSj5diMBdMvE$Wxub_E>6Dq8jvkAM!7nd_0F~sX< z4dTsJr3>5BXKUG^Nbw$j_CGECb(Eft(hVrxF)X4qb5W3a{iq?fN*DH~r-70ehb{V% zu~{Kb-##j~I*|JbAt5whz0MyHog!*67iQcUT+C7o=)Pq(%2pET zmI9J@XdYlqBYEL=N6@Z_d0g<7fvWH1tztF%ta);787UlopT@j0u{Xs z7bI}k+b6J_Sx!Vjo(Nr0k*@d#NlE%-OlEnwB#|!630#WbO_bDCu4NqqHMDnGibROxyP!J zS1@;0-Xs-$B$+F>hV zQ~{r-&Z>FpGV5jmc4W=tGSLpmP7kMubped%#7Lfs*&|?d{T+Pn-l2>T<9SA5%EY?k z=Uo!;dL=Qo{-`fU`+(%TgYpv!V-zq(&GNhJs`QS#cWq>_ zvaD%+;UZZ(O}!Jn;zX}FRIbP#>)qL|7QT|nvp zat|OzZ&!O}tbcIJ-STT&r?#p+*}>c8X*cjnLD{b^KCvz1Y?E=De0|=F($8gH$yf3R zBl-DqruLLflulVc{v>`+;McKge%b!{!=Q@EM~QHOa$H&%C_tHY@@_?%$04)%ym|LPd)wup}B*`IOxx%l72w|fXb-HdS@=JdbBQ(KCUhrYDnrmCt+(Z6lm z-Qrg^+<8~swyjr-`L`_0FJ62Lc)-G& z`HvbxHQ?qleVyzt45!5QG3jj30^Ft)FD|JXtPlReaLDZQoc@#e&f~NsuwD9w2jy@7 z?@Bx5#U&I5Ex8vZNg+|kyTdEO?K4;Y!B#b>to;ETh12Hk^yt9cdSW{Jj1I#1FAOn}B9 z%t(5Kz|Vw_6Or8bRzT7PHY@bBO;q2qIn-B`T)mikRen{;3{W?qM-bX;b9JdG@79Z% z4*XJodSJrm(<5eVctxi|b9Bm`N_wDEZm9F=0@F}K`LfmMU??yD)USg5kz2coA8 z7Zc&QuEsiWvg*bf8kUk_k_?lHbSaS@VH5dDGAt#-k>bXhrJ>BaLxJm6zvik-!qpkl zSmUZoLe*I_l!S?Pp=n8ox{%13fTz0>Ig=sL40SMO-MW-0mkdP`<(S+A9pM~}(nEkx zCT1uj9SU$!lR_~O!y<-gPAw5j5Npz%fHoL$HJa_U$BDHNZAM5W0{L;plwbss;`o?* z73mY~b1IpIN9x!p@sjs!dFPC~oB3Xc?We6>Xu-T*LL?%#G7DWQyD&q|*N*nbuh${D zo*N4-|M)Z~LSlT_TSxQtb*EK&>qLpyrc~0hq9hTewHT{pVSH+@BaMk}uHm#iok*`6 zQyE75u$zeIx@|y;;-<%4Iw7AR_{qbrc5iEwvCPF5a%#lw+dw(Z?24+vC)P2_{;co& zZD)B;#8@T@iikcDP8P*{)TNzLKN~8=%?sm%H9xis6>7OBk zFJ-QjJGYj!rYO0Ck-Jh5lZ_b6%PkROX)%S&v^K6t$X%4TP`)B<39netV^lp~LFQHs zPG7?Z$@hR!-8tjXuIY;4`SF%tjSP$sWubyLb^c*FddpFN_MmZFF+0rlm-y3EMoEWU znSx)p&NGaRG_p(jnJjOCj7#JV2)mvLHA=<)RMo98eF9steE!+;x^z8~#;Zrnd@Se{s4j-pHfW5_GIcK;0e#CL zEmNpgwVd;taA%*X*_^Gp_33~oD!w{5X1lLO+$^#` zl@pyNP4AvzF-BZ0I|)77T^$4z^5JGuD6341NOwY2!ivS^OxgazubwSg#pnKQOX2J; zgLH7iRwKJtNXt}Jgx2;}-an;_RUWf)CR83!DfWW$xRezT&}v=Xv=o~=Q7$W4ZvXw6 zW;xp#i;}N9ES5=ZE-(M#ruObDw0TOKl^^?p_zod->`DYO3Z|GTGhiIk{UgS%9v>m|t--ITH5IH|R4`gos&vs&rE@m6 ztV);cZCItNbYfY377(j1Z(*xObZsOu%i?9;sSZXoQK79n80Gr~;!)1@ShDxNkrg=8 zV=GMyq${O?iYlqsNp9bm6}U>0dIiES#14~i(K9_MnKJ@Hz=e@;`$nmbUnuG}66_^b zC(;~@HQ>W|i^p0<#8yz&1RPo_QCqNv#s)?v#z=!)qAjl2owa}7RVJ=0F6s9q@cohE z?zP&bd0sVwkGRkDaIf*!1uGh7dM1kp>+APm<&D z+E8PV4Y^bofI=VwPPh>6(vF4j%M-ygLEX19JtW6d_N z(&Hs>7{nzi^KM|gocdEmy1?J-*J`jYh{s+W5qEUh1i+;wcLI`*bweP!Od&2!Lc9wQ z{{%^fru+`SUhFeUgEdM#cH3vluO01IEJ1g#gXuTRJCfzsjG}aUA_e8sr?mp3utnRM zeWr(X31vt9e>zLt-r!zis_WTqLMGN^YpBy~t4^89LA2GVBt$hP2{~s;h>nJ7LG}TD zt~1CK*;U5V5PY_u)Ue-by%?FppJEEQL_0jp7NE_pE(unH&Xmz3zrorRVHW0edI*qCBsNr;bbe8SJFY$mf@i*PR8cGifx$W)ll)Cpg(p6FOCioT0zA1m4q}xjV zVWVrl9kibWU#66wwAoc_xvjz{`{fRUPsit`t-#QhK;B&Dj^)qq{m0vAjVd}b7zc4z z>1ipBVP??Y%X2^SKM=JlTz&=lqwoaw2v)hmM*1GM{n-#Zs(Mdhb>OTi!@`BC-iG@5 zy{z;1h*u2(X<6SsXPk*x`&)u3!?p|3^7*|MX9rSLgYTH%%fruiyr$&!TKL!GKN&(9 z+spGzl;khaysM7*nJAO*)#jQ$Ha}O(H+@`wj+STo`1~1~$Mjk9r)qA~XU$L3=9oTP zzC+6~eL}uP%Qk)Xe4;t>k4r!HXGKxpO;vhJ*%N`^!FR@ph))GxgL}r*Nap zZyKVUw&NyZRi+H{qc*H11-(w|Po*yfZ1N2Xv(N$=l2g+c0@A{?=tIgMm5KC+<)D(b zqo7x?{(gX5@jaASA^%?acV%v`)AkeT%Yom?mCFAn#a$~Z3zVSFS_|Ynj494adyUsw zo*X=Ao0~>^=bSMbp*Ts)DNbw@Jk;sa&KVzf$jfPnabAs(mJG4ZB?z5Gh(j9ZoUg4x z_z%fc-kFC`M>1q_&PM2HGGuj5N9gCtkj&PoK9d>iSdM< zd~LpR14b0bU&8#z4$PM~C&Rxo!<%K==T%C95@!o~IVGJLyyW45a( zJ~$6OP1pJeA-4>cp+El*`H5a_EnHh0NpA8?p~{<%jNdT&m<*b znqs%nl#@sikn-VVN|nwFkf+U5yUo%CE)sEXNyx9X++N!>lq39)%A@fN9wiHMUe1<6YjwS>HT%+H>s-1H*k-D~9zNMv@%yU0&$ z+A~`wps|_>a|clS2j8@O+Q zZO?tnd#xLOe_xYf@37w6WDsq6Zzm+W-T2Dz+3-0xdLh=q@Fk`l@kU2$i ziS}L&lgAHR`@b)h=M+lobDor@O74LEvQ_`)%TCm9EyrA7UF}tu;=G{nE3vzU-jhoB zuH!VFK%v4YjHkmeavL|9d-iqoHzGE!GuJVN$?Y%(mk{h+KhABe<3Tf#8*4&aT!GMr z#F*y@aRFDwS4+csI|sR(klQwvwEl48s+_99UH9;PSCpk_Wxd$<*SfS7+19=YS%ck$ z(Z=^>mmTq6d=IO1nDjLe@9LSd*VntC8Kx>N^Q$NnZy;b(N(h z7VSje3DZwuk^EEkN5ew6;tTMs`ZQ?I0dGwh@W5^KGzOG1v<+Ge7aM7#dazW~VL=Uc z>qHHo;`w*`KKZTiDnKXd8xeLM+T22-soTGZ`L;1Hc8L=;h1)^D#Tg_8ulK!9>tj06 zhMhgTuWT@eY8nhXTjGfp4j+fK%Ca}CJ%owF>KZ_x+TJ*P39`Zv2>^0*<-LN4+J^&9^NP#72)iZ~P_x`A;SoKo) zzKtC?tQ$iS8`~u+tQ-3Wgy#)09F@_4QMgJMu(u?3(sU1USoLwk7Tl&8woNG6-)7ZQ zha$la+m}>JU(hvP0mS@9TnubVt&(cc?i z+be{x=qlX&VW`3HJWX@iX>BQlw{!uQbkqp`BBapq-!(#G5c&<#NjecTC+&4_R?=wh&EqF61U!9~pVo=KS)GlMG7w|J3!&ZG) z;B|yvHH7CVMz$!Zr1OfXJuY{8nQwi9su?C#w&<0|w9TK=wB4kMGcf~R$3BOreQj?j ziKj&IM7S}Wpo2|@1)1wA!7h>0zde+o;-@AR0oVc4-|aGZfoj}d$L~SoW6bMPmA20O z5%LPvArN1p_vahL;^;zK3LQ4q%<)a^InkaqiS%rPF!nAtEg^?$D5SI4=@We=a$!6e z9sF99{b-zL zbtmKri+*FgzLj%-C`+PT!|2S?9YlgE4ZMMCp=1T3Fifhbt zKAA4B4r!$orJsqbUj1clS;ex?#7V1{LN~JbGjYYMi?l@*i#`)4t`@cV7pNS)@omxRfLAk4}(N8huPWcA4)v%*#zQGPk8+vi-FnV^7RENwqD2R7h zzlkiQXk7eLCXs*j*Kzs3rW11dKgXqS&mtYSzA)Z#z)i@T2gb#3l@jfyuZ?Tp_YvF0 z(QmV=)tjkiYtRO5&+28;u2A0?aAXWAO+hbKf^*}?>I}tKcC1D!Gh{ntD8WPHPa_`r z=zbm8Q=0?DnfBO;aRMoh(syjgtzh@tLSuhD-oe@s+uug?MFyoi;!4o{v+>AeN`aX| zk|{qJmxvW*potl!b08umN*oxMY!0;4az&xM6zMBRp{Y>{13sC`_;lUo^}1IQzjwR> z{T|k8%pvO|Enm58#r`*gV)pt7-w&l|(CbMHj>V?M51vmW7F`*}IK^DrIu3c-Qxc@y z<(_QHU(yyvjH{|6Myadw;fQgK$gcOVKe7JrI1vH4<1X?FT{pSDh?TBMSl`@O-3sUyE5{(SI>a#D8=pNP<5> zI&1EIc!_FDn)<6=3` z$x1<3=B}s<^52cezHOAUbu`RNLH1xgw$0eV^54zyNWn+XTlqR*db{COsQl)Yy$bPI zVQD6^rD=m0kG(a#LA*~ZTltj#-pQIA3X2*okI|Z0)J(%{GR!B#d@>wKh9imaVB}7U zDNgwSGX|PA%K_0%F$M1B6ce{0xD&W1VkrJs7=cT^~Witkp!jqwKSQOhZB@zE!CmrYFY)#Zy2WT zb;H&cs*R+5q9ymE6MZwOi%9Ao!jK$06pX}UB>#*#y3@w#Zz1%VVTsqT{%vBc=Oup& zeoJM|rY}g8v&Sx%C{ZStT->(Z1g=|uH&CVfmLQwE}f6LVbKL} zaErbPd)H58)C3mS{g#e3=r8NbvzajUFT~aa(k0|eMtMYWDqpvibk%Z;x|$51D3)Xt zO;M@OQ#1p7=)}g}R{zE|*@4=OdPn%g#v5}^)WT|@+-U1RldA37bZ4uxp53%2n_D+E zylc~qIlIKIBmYV`Am(P_^ z=%V$yJcV=2U$)R^{tAWfMI*q+x4H8L33iYa-@ihkywUxx_2sUQ*q6Foo;PKzQAT?= zA?I*Tkq!CKpT5cdWJ8?@cTR>Aecph$hRHap9r<8fC#w<1}uwTANYf1+6X^L zK5{(Q#rR z=(#bQAkFwhc0>SY^pj3U$KMIkPYhW7|16Dh*pJ_~wAVdJYd z@@A2I(zGxrFymF{4CC?HUGmoI))rU|oNCKOGG_{0Y0hkw$xqWtp?4w0rSfzQ_Q2V! zesP4;$RXCvf@fMtin=f;Hg;HYyW}kvZ_cT6=ZWr2pFV3AsonYxEHCas31>J?!q?Y5 z0SQu-2}v~};q;eY4%^F?R-!Ta3j<PBQOp1CZn@Y2doI$`{&_uHC+q1Ru>`+m)Xi47w6^pE&**dw zwTd`7iB^$82enLfcenIQJ5fV_WZOTl;kwBheuWyg&>EBoGpDP0^VwFHH%%428EUZ? z)-hNSP-_CduGJ*qpPy`XKG}cMCZIHS@bkK~Eud}fL@Pwr(pI=Pba*qFL*=MqV9Cfm zXa#Al+1geA9LK(4IwojOt_So7%~pu;g(o~1pumX;uEDaEv9e?HN&z?k;j}Q zRT-Y>pAIIcOWv%uGTtdF3kxmhoeC(K+D8e@bZK=0vz{;XP7pB6_EXLox3x&@^ZnT= zbGoL7n4~pzJho_bSJ0)Uhia33#F>5cx9;(nXSBJ`LDs|i&gJu(9p@1{ECXGy(>AL= zXH0GGusQm9#}2i5Tb9?N%?JOiraUyn-m*o#_5F?)1n)Ohm-p+@8rUcz&%S81xZX7g zVFsn`WKaq>`qNc}X`F~zz1pc7 zFi-ks`YtpUH~4wr7le)Gh3*oK))29Mg8poAbq+8h=e;GE3a!0+@cz||3>+wY*NK4? zHXT+Z;(D@sxPnvI-t>%ISuq~zsL4iqe#2~mhz)(R z&FY#UZA6GT4J=BT%svC)+j_e*1(58H-Zx! zbdgyD<;6!(gE>3uB@_A~^ntW33H@SZ8=&Kia)Jl#H`~;$YrX`&l*^f;{bKXl#QaD= zCzH^3OhP9n^zQ?DN7V#$dL|SQsuIu-B{`gi-bvzqk*r8ZTBQ@qsGL1lsFII@1bLR zPCA7?hjK(|&IIRePSzonBrM6a0ZWnwH& ztd|pMh64?jxGA@G&Nn0%o-4Bqs| zcpSp-C*5@Ke$II903VzZ1fEcE*hq`td1^u?C^2#VH091H<#>l0A~svsM~b=PLbH_U z7mOp@9qQWhAJKR*>nacA^O@!tk`>mQ4PHH4wJQwVavLdJ_wG%rgzE~i7TOplP$-Yb zwhh%NwjkwXY~fUuD->0xa96NMy-Kqyd%3@M!(~3|K55aQXB>~+GSoS1^>XH&0&Q2& zt8@&UAgp&FI@jch70I-$$utgWGt9JW&9s!Wi874$BJPt=c*SNs_fFz`$*gXgp)1euAdbmv#BkzwvLvh z@i^62Pi>cnY0My%CKy?)k63M8uFywyLh+~hh`!#S@UZ8()7-xdhHDc07n`|%v6c&R znm8W&2U?q+Zy`9dLH9p&KOB4+o4OF=1r>I%@ zgrI(W2JF2fT{Ey>>15uJ^y4nXT~$fX4rDDYnCzURyQz^u* zsgvy-5Ezy2&}O!b4CRyxv=prnR`)@j=A`+OJ2b~Ejqb|mND7J)-CsE_-(R^t zaXIwkUZpKrFG^y+XYTE=|NC@r_dfd0g*KhoYoRBv!n|BNR*73@^_UN(I7{)k>)N3z zSeW~>?3HS1a=gz>`Z%wJj#JED4znOlRTRppGgKG&R`a4P*gizuH4&i)$FFGDC|@h= zQWWCdtmY#mnW>7>)H)XXdE6RwB;rI-)-l({Vu#}mvwX|Hb(WTkbvd=M*ptX*!MquZ z9W>MQMA{i|y?TT5%Mn{$S1B~J_g_QjQ063-oQY)w=hV+D;TPPP5i>CN-SSv$dwf@L zA*~g9*z>@vP3=*Dtv-VY0TJmnNVl5x-4>^^80-BtYLsl3x(e$SD^CwUueS_G^ajZ@ zcz>}FD8~8Z>Dq72{AJ1fKTPKLCi3^U4mb2S()=Y%phQkb-PF!P>zZfQ^$$>4kSzP1 zL|IVRVO>Ef(~Xss<1pAAB>Lj=9$>tn4|j4z#iK%xXToFv(}_AdEY7a;brEkkDggea z@dPc00Kda>smr_3q-6p(-SAP|rf6ak%3sEV!(>n3cKzM)zz&p zCg7Mj^{gh&0*=LAM~Or~b(m$IJe!aUFLk+a&XAto9gDp%ndg6*dG4IZ1IQ6;e%BF` z7MF@qQcc_E>B;=xHS>QRctrRZAYycxIrbrkRXbz0{~j|>D3J#cCEKd5bB6c~l@EQ; zuF@45{XYqFGxD$Z7MnQGHo5kOBZ_<_ZBwDu0*Sxa?5ARx{_=#?ilHlINU?mx9KEZ? zcVYC>I396&_gJiqwlU*dZaZ77L@-{ap#82!E}OR7#BXUb{r*Jy8D-=77p?*aI>B&- zcVUk~$3-M8%A7hD%Ne%>ccc7FU`zX9x=Gu&DQ!&bOy5T7!oXs>UQ`W^+io_z+YaDd zE0>;FL%sJ^>Eo5c4ef>yk=S|r#4C#)IMUAuC9|6^l5nK$)|@v61cBGSqM5t^dxsly zY`t87p5Jx$vUgNnGVaU@lwxeBP;FLh;l^JNKOFOf9uNFhS`tWsmhNY;_c+ZJhEaOq zXOn)katYPm`*3e9@f&fQzh?i#I*Yk7Tf;~Nm6-oy7L&FkV-m)gJwaPnirH5GVaBnE zHS&j)>cKNaG`bn_5_lNh_eeP{bVuIKoTjH1s&p++u1RytSMd7XxK-I)V{^M}aH0ts zTxf&|r_vKRu2!2yb5s5AwS?MxoCXX3bwpI$(2KldP>nHkQOFZs!J226aNAKyX$(Mj zni9cTCNXi|<4x1f0BxhfG@3I2lP{qyHf`zoOx?)?e0%Q(ZMq>wDxFqJN+~>P7;T#gi zwoFHU*tC-PE~IBnjDBWgx*ztpjgPs~sa3Ag6iN@k#i~@P!yD+@4lRPhvOvvsCt-j*Daiqdn7ya|-1@Yh%hBAy%vMfTjy+6N zQ@mxGj2+fCob(knIh?qUj622jE^%@elbLEB=-xp{J}`j%KvytWkMJ$W_n>JF=Z5}@ zQ}{co_Zat9(^jglhE)ZpbttXjc2?noYF(ys0P=lW+IsbCtGL0Yds3xkfqT@~Z8r4- zi=~UnpH}0I&MvvTF6u7as z^G;e$NahfbOR)6Fe zo#PQ$v@9C+-G@^h+8wd(-?6xV0(s;H*3osIbJb3?S)yD#7JS8ObpT?-$_x@_N`Rk) znDMd?8iTJ{?Oo}L7^Ik`%d|An=MKNsP1uuNw~*g=x#-F%x#SaA8yF0;4>nMnOoHq0 z_zc&tH@SYDk?7mYdKPV<3^Cq5Ro>*nc@|VeF$71`9d~t@BRvsy7 z^v{S+2?^NO`v!@*Qo7CG6k2LE&3g|m<)gms#!~FEUD8;r?l*KE(EIa;s4P#<1jFVE zIlgLpImx#Mw}rx0|LzZ0wzr_{CRh_0+!?{yZ^^MC%9`sIE5m}0F}L)wi7-(bgE>zS z$T#G`(k3N19(!x#8zC3=hzWY=9@IsaHbI|(Jf(7}V#7^2a_8H|YY|#%Y17+1iwZ-* zb4K-nw|f@b7CjdN&Yi}h=gtO0!MBZy_F!5O2`S96B^2H6>mAE|hrU;v$DUzg#h9_u>Owv>{;tkP#Z=$t9(;yKqr%9N*=((5JPw83my|;Tx_MS8L zL?lr2b;Dqnd~eZni<)R?jWM&F@Aq=A^^lpb8A9__7SMBRf}VXzdUoS&iz%Ve*pkms zb7YuO^F5QArSLTmQ};W=%cyPrJJhaD`}Qn;HF~!b{d<(K676GGdy{c*u{f_Xdb0Hd z&RW+OGxLJ#ZiUJ7-5xROrDj7Bn~ja)3(&pcEEFTCRr*dAcfO&UbgJnZm3`Pc&oSvj zJe|?Fx+TY&jm<8L#?;wcuXh{W2#Lh)@pRr1G42%s(ZwkH%n`E>Bif-nM(nV}LTik3 z3j}k*2d>f}bDDsCT~k<)soX@*ecCDxDCOA)o$v?otsF zxSa^w@%4jWFjyZlafd0f27v9a#Ec5eP)MQh?hH^$d^2!Qd2e<@4SH#JPDM_+aP`#L z8Onz2SvNRpomc)eJFk9bg{9x-wD$8t70yI97ayEM?_7Xc3AZ zSqEK9@muRo7^EpvA@fF6UUAB0N~OF<*)PAQ{6XgHoHb>2l{I_n_SbaOy-`DR;&l=4 zsM^szALo&qF)l*Tqv*Ir?#Ry$78iVJZaU=V_CD86_8n`V>wZSFQP;@qVEO`1!rYp@ z-(aNo+8+0Rd|Jo-ebzf0XZh1s#`CIrS)Bdpw5~Bqsu$G#y74-RK;!tU9skSEMsLh^ z22Zt>XP<0i3qL;1;B|mK^iB-U9TWNy3Hl%XMMjJaxEk@&2hN1k^V*rAa8gsrnBlY# zUaPo^%%Sg9BwwpwxnAE?SFo%%a?ir#TNM}0w<_q}Bn!Bxq%;f&jrz-E#U9XmH{Pqj zJP>d<@weISm=gz?gGB$XkqsOc^u()v)N&w5@*-~b$Vlv`qaXC-Za5soef;Jb2Jh-@ zO)Ye*_QLDbm-=_6*-x=QbM%AD<+6suHD@@2doYgT_1Vw1y$B8a-%igp=imoD#Z1A| z?9Xr(hbaseLkg0O{_Zcv-fYkn;8aJ3q;TLRqhvp3LHe~o2X94{C2Yii9Z7;Qv13qAV(GZqC+xDGq zeJmcQ?KIXhqn=>ASPK^hKQO#)M}p48<|=i&da?k^V*O-9%vROdUy z_qw0&vyn)fMWer@PYrhrRFSp4#F42!)A-EA8Pb!b4)Y}Ga|Ro1ZX``>f*>224{_V-#ZAWohZ>O%TYa4m(aN}W< z8crooR-5fc#~K}FJF|Bjdf5NrX)-ruGM7bl(DryT0*rNIXSUXO)UTf^1G7r#oqqLp>KEbT`^;qfg z2|qVpdYq|uiS|O9*~=EI&7P79hd8lY&B7<*`!YTm-xqSGd_Jcaxu_nW-rp zU*qSD!6w|B_|`c?Z{Dg!3TsZ;3LPr(e5u~P=xeCermwtZRn^Tm+fx=0yvQ_%@$`2u z4rOZlT5;FD*UsAd9(FqWR%GwYw)9pyUunxQoRP-mwy3?&NpiHpkWl6_MCY~iZGyD( z(Sv2*H<*r>;r}SQSlea7a8MYZD{qN9P+qDRwHcugx@p;uFDv^uoJO#U8JbhXD^B7R zj0LCW6&>0)3rC_xw;)>R+fixN=KBVB$NL*SS+{1Vm+f!E>?y>_Z%BUn!v~)y!j_*C zA=*xa61-V;03SUEv}KGFiJpgD6VdmMQi&}NAA1yg{NwiW>~{YJ*PTK*?sko^`i+F% zuwrw;XGE@o53QcY>#K*ekBi{#B#W49K3k4;1f1`W;B_D4O&S~CN+3Q+x0R2Obooa$ zM6VuWq3-el?sm{SZ9?%eWoj z*3E_^>n>tbzK32Wa~a&uOfmT4=L|>VOsy{48+^2_4)f~3$l2E8fU`6E7~Wxer7gvg zc{BChnEhBA@_N&0D62dh{;Xg7KRQiAbT51J(8=z-hS2hxZbIn$OX2p6O4uFmq*O3C zWlMMXl!i;NW+rIpA7XH(nA7uyuq(K?w3X3VIOvz=OTa3t1&8iYOz_#>zH8>OvVvVWER_qOAH{q*Ja z={{QDACF?>`S3mm_8b&{Iv20Sjc_77h#v4N5w!ZDAs$vLp?DC5ZH6PX<+gX)@^6B# z)KSRwGu&bL^wSjLlYn?vlJ@s87pP1?=R~+&tR(q-p(sBSdDd{;l6Cr^k>T~X?#+HC z;#P!u2Ip%Ay{XYOZ6x;KF!2tmQ$vRv-HIKpbdS;8h%y2Ze;f%P57l!xhhX)l;uOUc zbs8)j4Emes83tpf$72uR)=WJ1(fB2}w)gqt_@6c(h8}E1N9HbhWr?~wWm-tjC z-rcj{Ju(F&#cjAT7Dr-v!!_A^+c-xmX2#0w@3*BIxL+6Y1nZENW^f^UDP~b96{U;8 zGhPR*o$aHs1*7zpp)|ac^r$gKvWbw72v_i^ks>cHS0F8s>PL-K=~2TWF$aJ(e0F?J zX*BlHNUE6|r6rm(MFxcG{PHi90fdP%Z;WJsYQaUzuqd4(SLv=BX}QmodJHw8Wj-zU z^O3a4a$#GtF5qz)cG#Vw6mXcR>#-4D9L0VWZzB=Dm`HpveIJRzzUu&D4izN$R$9=i z>_H_M^7W zD~8)JXUw#x3>Qu-76*HFTjC4Sw7{^u8O# zTO9BI$yl1jh)1Oc-1T0XMQ>oyd%Ya)Ofq+J<&4ag`{eM7qbVfsmtQ5qbNIs0Ta(Si z-LS5+mY(<(3N3i$0Ows{!+2o``z+kYikiDJ{~%dR_hWRg&O+zlI?jZ~Vm|^;Dm8gF zc*G5S(0p;iQLJ_OQ3R^VJuiLaLw7t7+kKWY5YUWv_Hbx%%i`K>vg`(4ZINh`yRIlmha zti=H*EDKoyTQ6Jd3V3k?w6;#vJBSN+D+T2+{G#bU)=$#XRY5t{&)^rDKbIiWy32wR zaKw2JG8#Jwt~|xuYtlOeuo1cN<^XVQ9HRCEoR|`S*bN@bTSFP_e^Jl3nK7KwQovF>7pRLZCKT{=Q@$tiL(>0HCs`gY{hBnjb(jIG@ zqGdRpTGe20tzBb0Hf`oUi*{%q(Xt-d)kd^;_cEd*Qhc29XPgPsuX&le(#t|Sag!!K z#5M9Ewow4bYXMiJ0uRaa;427)+aGF~7|XbIi!p6EK*I^W8iU_NSi)GR=~6NrL6|6P z-W4}U`2==MOVhLv<0hULYu@54GNks$Bj=}+^bqBfcgO4KzV6^iY+Kw}37O)FtZPNY zEAa^KO^_z)uZ`P~mpm~N`$pW_0*Q&3cOIx*MDIAzcNX}>`wDY{(}VODs^ck~12$89AzjT%rTd209;Zs>L9$OU08a2d~>!J{0%Y_J)J88es{$p}o z?Nfs@0q5ti6q&Mb?AS|G7tUC(guFobDry<(O2xS$r!0B!o~Sjl5OM^UBI9j5Ra(fZ zEK-P;DofTBnM|QM9C8Hl|DUE2;6W&k5lFidz6mU8T=+O04_8!Vt#q}gH)c0Bkou+J4sf@4Yzb~k z_2GBXaI@Im?K(a&KPXSby{CvXcp!Ml$jjminP_!!q;1x!&MaH7Jm=rriW*;n?nY^B z@jKKa+{&0TT#B9A#i3%j7lsx^wnk7+V6YdihIZh&M!wIETX_$)J%du`%~JDFYG8FTf|9{bxdI;RWJ-y3M3N@2RE`IaDip*7zhuYvA5f|CeSMOJ?> zE{UQUABkTHm?v@bCLa5bp{wD(I%I)+Xs8YD@gXPN$4vJ-W}f{+OAxcybRQb}HT=&H zErS~w`VHJ456ysk?@$Na9}dljd-u=@xK9o-aJLS<3it7$47keBYj7VO65-Yk{SNNK zc=-Z%NQYFo4MWeu{mRfYaMuiJaO=(ZRYN@d6+@|TR}7`YEgQ;&>l>mi^W~xI;a)Rz z6Wr3FO1R60vfwT@^Di1ofq(wc9Jqx;xo``HK7_l{ge;nnXPcDHG$CJMLY`_;k#0hs zGE|2ADMPE_3PX$FT1;rH>BbF8%cwyi4;gN_IVPN0*hPhsJuH!uVINUy~lJUrj z*ec__D_JH{Pnfu`SjqJH2<{A$<;tqo<;s?v<+3H}4_oS)1x)lo*vP2XkT2{z-HhGN zHfT?!>}I)HY4nrmk7Z6*hnwrA?2fkPu*1ur{&AS%&grkdgu6tjbE<>tHs5Ly-TouP zvEL3?x)3B3 z_o4frU7@$nE}x1$LiWnC!7x8nb}exzGb54SVJM*)D{#5E5k?cF9??h}(%wp0Ltd^*5`qN?sDV-ZMyVon_&kv*7!(OzUr? z?_Hq&oqxa7OCn@7l_d{CXMYRi=x{sucbR9ESoa}pnrs?fn+5f%)~ZWmVX@{zg^@m# z&nuA?iF6+6d@_AxGTmD@kuD%zNT$ao(-ow<>omM~=t`qDrxX=0f2dWL{xO;32wwZe zu6spdtWbV9cO~$un7fK?JmfF9VQ$sjO1oOU+@>D!ThtamryhlVt{JZ~N1;#f=wY_9 zmu102J18GLpMv~$lD13d_~D{>@TAN`t%2|gxFI`H{i;8t^D#{&SFE`TWH&(Zy5EK<(BAMcnMVCa|5{5$kRUhd^&pQo@kF{ z@shyIfM0&Frd;u@<7?3e*lT^h&1s)}Cq5pBEo5WP4Rb2#n~~>?dX25MYz!#7>hfW+ zjzZ7g>`%j81uIK?e|fKSn!nfPVbt()YxF;rd`L5RH)mSDE?Jtf+J=`4>Xb@4a;VFy zsc>ykU=++9l-31$_uwVMhq!>e3z#*mv((c076%fE@qsadcAq%YK=I06HTwq4&^wR# z*;*D@{l3lvn=8f2sm#^yviW0HN}`1~_maF$`?)RlmGBU^jO&!OL5tIHiEYyMqH z#S5%|D+81zWxbX>oaR6cf|_F1NnKWTz~!T>fO*94?|m@CZ`Q`F=W4^Cp3aLe(v7@} z+1ku13u-Fcl0Qh6P1$?YpMu^GV`NyD2k<5w>O$+HF0;LD(#+W`TBkV_!96$z*J~H63}mEhgLy3W3=|-yO8#CVs$- z?O-S1+D!<%wuEr97k1u22>J@6ofPoF-`z11`<WkAI_Y$1+!wIFxCgO%Q8#>`y=sa#7 z$CgJI}l^q?OiRfu6qg@#i9z2;4N(;?54Kzz5917 z)Lzd-xw=iQfvxG%*R%b%&j`1G^70%zZ+Fr*u&L8Dnl>Zi+qyT~cl$rO|1}2VvFiKfGcnsJm{R!y!-qO=PR7Og0r%hIPtDc zhp3z}@;YAKn5(CO*EzXYYel8S?}}zXS60eq72T~`-hcB2q3B-KRkR|yLlcYcQ@us^ zNAK1Cyz-FWZsxPG)}p(hn_%@db(^+q+kWaZDYu&`!P~wm*RKD=XHuxOiPf*FTD|7x zul^n>DU;ADPZ4d3MpKI_MY;BgypzuQW2mq1fTkTE))#dR;YKuv(bKPB*dK3oJPk%c;PU z_AoLe|8&_Z%2s7aKarpc)FO2Z{q z2h%i?I~3b6+R{B47qU#IQ|gF&D0cHG8?5U68p)iJ!Md_4f&qFK67^`^|5b-P{>S}a zjS36qVO&1Z$}GqP_10*X=2~!_DlQ0s`YcfI!EPgsbPo6#A@F_l!ZYIx+!x20pbUy! zqO8m_=}kwQFi(0+il2s`e=?g=_CT*ah z1el}+(t;XZ)S?yAw1l*vpyDpB?rti`wpyfum#uCuq=;JIb}Q@e_rsUFTVM8Gbzg2< z!BtnJMP!vlO#!(m=#H*yMEvbd0m;yYXj^RW-5Z}=cgt-N4Vq4oNW>d7n?vfw$nJPt zyy&Lb#m8;{z9Hbd>GY)kr1gOV8A|;kWu9`XDf0ownJY4(lhD{tEhdgL`WAdf|UXfMD)M8e5j(4)xT(D*ve z+Yl97{mR>zvhp?^hR)#NPh86r1s?3}k661aX&v@wgm0&Mx8x~@^bL4zH+ZJb=X z?Oy};4wA}o+}FS6L3jVHnnYXmwoozT*#yk2O;Q@&6Jrx*3kE@(_+oBBe%y_+j zvU|8F3%4v6Z?nT&~7(?W0_lC4wPcArk8O1U`RJ}Fuyw_ z!rkQE4D(wN{Io$4xV>Vek33Vc&~&9Oi!g~OgclmW0?pMZ6-o{Alwnd+Jl!shOq_sSBAE?=N_kAkI`$M01u*6ceKp{xd)T+Z;0f$+Z z0jx85G3T9Fffm@Za~bHV=i|Yi0oCcX_fY-epzX=&?NO!K_{soXpTcbLt6HuoKLqde zUe`!CZ+NwPi z3(nlZyq~nw>|vNgE`j@L2kkuio8~I**xbMyA$B+D@N2X*gbUzrF;W&nwEH~89YXDw z@2+p`@0CNHi>M^4felOiK#Nz!E{SjlWCiSE`C|0wT%umE71!4X!iQ9;P;Rp~&Q|0$ zej4*39^M@5zpW8xBygcnOSRH|n;P%Ky6q(hhuJbQudvvyhpKNZhP*O`f2gt0Fzsv1 zGfeg-(J<9FnX+(AO~8%|jYn#g&}Hc4t8b^2zKzRma!)yQ_GOYQGU`t9;WQsEWR=4$ z*aN|s?_})j4p#BsvCTpD5f9kkqI@&STLGWgLG#K?m=rUGriOTBjr%6-EtuTOEwa&!MOp5Cc=_kO*SiDmpDzEn*VM{pd^?b!ac>Vwes)n0 zLn%0C+j^jlu@JKLEm1XvbG|;%#+&9YF0u72J%4uAj^`t1sm?6C?z*MdT_Ll&J2o^l zH?5LuZ{5(e5^@O*cdTl@73kY>Q@xV;p=A6V)q$+-P0dDaz8D;~8r;Uo2b*Y@Xo@rW zg0UJ<@3aFvYS78}@;L*s(9R@xqzjb*Bq~o0nuZ|*k%mY#ln-B9uwaC!Q67Xq}ljx@Z`LdtS1&?3ip%n0+)k#z-Y zS=6ZxaV^xFXt%V(9U^>+a8BV+vh2K)4r?~_H;@hqlv0^|l?hBmS>P)&>e-`8*JhG` z&QPDjd8R^oAm#8=Z5Y$C38PN+oI|UR8a+AzWhxh-P1ITVZd3Nm7w#^dT7(IGwNibf zy;AI3zJ>b5Yt-#({%p?kxGM4zv=Q$){;x%LoPL#u)2}3)j1#5r)`Uajpwuo|;&oMx z>!yD@d&)4CpZ%NGM^K$kfm+!*J)Hb^gP-Z?zo^-OsfYArpVLZE#}5=0*a^Y;TmwN4 zC2bmo?5%uDeQU7gPpuDO52?u;j4r<0em9vmM<2TTU6?pee-wQ^dL3$2j-K7fJ-BKY zOT3-2;JG_v$8%Rk>z&wzZL_AiVg35ira96!onF4Iq^FSh{%fpE#`%x5rZ*9~!aG{? zL;by6d3lQu=i#I{9&2N?>Sb1*=xK=1_$I~Kl*h1k(1H0V;=-Bau~d0$gVs6+GCX$M zQ13tzToW+rXoyeRfMAeGm zwL#GwteBoj7M@$F0K1NNUVEqG)z=`{g5a)2K~f?~8z`1U}! zgLKrw$4i`NGo)RpzXBF1?F5i^(k5(cMNOUNySx8Xbs<;L-)o6AwsyVD`KBO-1^7Os zkmVsgEVT%|M2g`%6YGJ#*E~JZavt=?xhv4cHws&%jFw&TfJu25a1)`$q_LyxwXlVx zaWct^&iyrR0%bDEg(;f>Z$->GF};5hfhYD)S%x*}XgV1eEyNdu6Kov!q4QEsF@L-H zUnu;SSXtrZa*W%2S}l-LpT%2tm^EtThD_L}CEpDx+#}G<3Oe{e2c^URnhznx6pzzT zGsy#x@YK1Wvk(*+)4yku*QTj{fID^BLpPQ%(;I6 z6CQ=ZXbG5E>nvrtvgl1Ezs(4B0(v%SRx0`587>^1EbZI_oLhD*Y0Ycpyza%^On%6G zGN!u2t{7<&?^E4Adn-E;l%Q#OMxl^%$o}B|R+uO5K4s@IYhB~0nNZUQJ5haWuM=i> zcqBw!nQ-z@?t|}9hzWa6*)6{jW?|-Z^L0k334e)W9f{(eu=bQ4=aaArIGe+TI?VCq zX7Fb=p*mqQ+yxg_JMP5z*hPGhIJ59?mM8MIapk!&1+qs0Y%C|PTS0PB{;rkWMa8kn z%ComiSmnfgCtQ?9h7*XCh=O^_fTToBkoTj#LVCD-^{??R#FNWtHBvhTAVRrfD4?C0 zT#S%;x_X}u<@N;{wGeVU-dS?I03KPM_z zjzCW^peMw&o<(qZu=YlDGGX@Rs*yeh^c&+oOLN!e0dX#zfL-zb*+>&D$AG+3}6q9jD35|wnt^ZI0Q||Tscgl5F>K{8XyF4 z946-UkW3i)NZPj&&WJ?`{dOpfUMMqbX`-_x<3%67ZI9~2?Q-o=-P0Hu=WSKOEzYQO z{}iwobGx`pJg7fN&1D}LS2wPHkLq_F!tKDxD!OTHB3j+m(9kgDwXP_klwhgrLWs&v!ZQ-$WY@XkTG*A$V<)BxERH|6v^+_<9w*bX$ zq*+&cnw25dI^AVS6Jj+Zmb#fZ?GbIKVtTB;=?Z8mjX^&-SNdF_1hsFjZ?yJRCxmKh zx#fzU#y^Xh;sjp8!ML7>oFU!4P2TY`iW}N8~1%z{k!I>7-gZ4Ttb7BWjN3cRw1j(r@_qCcT ziZOm07n`KOeV*YykK8e5R8crEf)O}T^jgX%W}imdso_T4Z%i6aEe$rqd{j#-5v`%L z#)QJ^M;0?m)qtE=szc5jft-Mx66A#AaTRd@^=n%K;Zv4Ylz8^3h16N{W1CgYsKQ&07xCERZQ`mKc*qt;8e=e0i4cykRq zu~4ghRG+3&so%s^tdI37*EFqu8EG^bX*7+b(WIpT`!!9E;AB^-NfiI-(*$k)dQa_K zt?uaX7uKjhwQ@7Y$EGWQHEQKZycg6(Kxj3lKpBN7OZ3%Jy&QF^O|a$U!c`Q;DDL9e z;-(od=e5$TG3sn3SN5AgDb?9Z@)cvnN-oN;)|t};t~2j+yb@4iF*VB-r(wQj>^Ye?jfh+Z*bfioS{3Mmu(lWciHb zvD9-7%mW!q>@G8UBunxT)llk>_}J&z~8xXIHgPU z?LJk_)2YB&vk4~x!z}ils%A8<=M|F&XHj`*HZjmdQnK0%mJ5BBC(4$Nm6HkM1@ zr0D6KXus$K=VAs$wCxK(>X@tfy5AuNFh)C3jUGTm3wI)X%cAP0XcN7q9S7W7MfPp< zdPv16?#60WSR8P72G1T8@#P`y*xksLdlP-Z-4QP4>9H#PpbUeadU{8z`y;c_BW~Ab zB+$$Huxojx_jLLe)7M-PTA2@SE^RcUjWDqDB9!qkS-@!mq}x1uqQIGhOs<}+_g0dK zI)oc%31IA5ouOVXle}8{4xz6s{%JN7R21?C*a_Z$)cqvkz6{?9yRKD*D@~DA?#F>U z_40JaJoeC>d1T$CSLcS>OFDydW8;o3J@eqY&fwCoh3c*oJYNbe6>PAbbkzBsF`MsF ztVVDZCE!#3fr*NuvEd@+g(l{qUFsIutrW~O9~c)#3khH>mGbpiWe@sn=tsan~JytGw;JH&5)rFuo1{B8W3c1{~Z(Y`>&c*ulW z%EyH+*JjjkGF!f5TuEK7ms2J{Lo(!^91|5+z29R~it7U&3!Y0)KXoUsjK@21=QVCt zY8tkjz6mm!PxTgm|AC-5u*%)lE7jT|2jL4P-bf~&-j%uJn*nF-s@BZRuLj61<4q=? z+m(2uWzkQuma&y?$Y)hRK5GziS*LK*7h`^if0?WBfR{u;<&;-2M0wsVO|a8!a5bF@pG^K>S6;o#^OtyTz3fr&40}F_ zlRVln1D_+ zi4iGQs&t!k5{*wuBG()Szi8wP9dP6VeOjoCx!CI^;A|sa5#K4CBKEV2p#hA#F<-+e zTz}ydRxu1ajUO{hAMGxHBnq2mQKsUX?~~&Ng`JDmxHq_=6AGH`9NpSi>d#o&v!Q1~ zocEhL#9T8@M%@aI3Pu;$rx$MNisNAq+gF{7c2! zSZl={F$rUBqRPK1;VD?be_ zU%GpHaL8~wGXNY)U&2~cdx%>1WoP~9#YKyt5N;DyE~j%5#<*hgfCoAnl8W5}Os_{O zIpSmd49Mqw&|hqtVT;+7%%tfFt2Ox*cKa!_l_`p>Fi6A*Gq`~O-loZS4l95g|T8g$M8L2v^rv9m^pqFwnfLUL{e=65Qe z&DkoxWZ#;jT=DGL_)Q`4$z*ccxtyn-y4n8Zb(8H|i&_wxKRICE_S+LE!$CPG0v&T@ zr=xS}j6lxz(L(-{7f<9crl2jK$lGjA495%T77oI+uTg;j9YcErgmY7 z+>CX&sgtq#*&zsr%nIhzl@53bD*Z+KTT^ z>``>rVP)gz!NG$ZPO{YcBJ@Z89rtzT63BqFypbp%r}{s8n9alG=Y z6U;KJ)?Ukno<(kGULt^bPdYD$)&|SbV_TdgH99%NeDd9v6Cs?$WrltiW}ZdT?FT$} zw(PX~_yYmA3{%%VfUsCSs&w5$D?EE_(=mzb}%#W+dvnd~__&Qb!&_JTu%i)s&@JA4p!cD5_6qeN^FCzMeZG!6!KCOt z)c+DabL$>c1D?m!>RC@3;jVWd?QK^BvwSnS6T5l-AS)%Cql1fH+gKezD_C?F!ZADfOIE;`sX$gTW&u;ySX&OXQaI|semn>)aH<|(q_HpOt`J(nnx3^%voX7Wr` zN({FNhMRzMyNV6B@rIij^EOVyt;le*c&sQ1N|!$<)k`>M%Bp=!5T(*d#{PyIXMeJ9 za1Y`B8n=r3E8J&re~J4v?k{kk#Qk|Plc8@A3DT`U9l~fUr6xPiL0%OSO3PK2*rTSB z*9_~@3|+65gfU-GBkkDQ&1qj!9QOA?Z^63pOXy2R>MX)O3-b`Z)49bFiJ!a({A$OuT zr=9oZ-TBbEee3M&Pam{+SK(U-tJy=;-pR(nmU@kNac-CaQ_v3cYlIVaqPLhk$^ROa zgOnX#D)Nuw94ZrJ=G5e#VQV+rNjL!K72_6TL>cmLuXkfFnlR97I-UH2!wgcdo-fJ5Y9&z!#s&kUn)7ju?;AC@MxW)el&Ow4q z0?COGov{-P<5=3yz_2<+XUFNZP!D291J0k~>KNbAK;v3|g<-d3?dH0D_jD|ON8@+z zth4(#e5t)-v_X6QRF~-wLg)1(f&ya2_@D@hg_rZSG!L-vNmXNu!e#ks2M!k~-q?Vr(&XS{96< z)m6&*)MTA}H@GICE~MOGeEx{*DCNG4&l_SdJ_xQL zd{o=D^z_4bCX>G$UflzE!Mm?nC=JZhPP3meyiawtxJmQU1G2%y1(p_c_ zUsX3h{0L-ouBv+^XwjagSQX3+Pu3U^S6w6==pH_s2%aqXu~iA2d3DyKLCb+v9@4O~ za(eghw+UXMCz~Fad|z*4=#H9KhR>cEO5T&E(KdU$k+|xO;P-dGr#d^|Q(c`y$qq=( zjE8j0j~vNl&2aH=-cwg}Mm+DS%OMXYjek!KcS}yS%W*>K+7MP#8{#VEbk;z{U%)Xi_lp^u0(Okmt?l7IcC93nX*@M@nY=2*3XrVQ3rGp;Q&wR60VxrM*_ zUUrU*;ZVuMjvW8Et7Yi{s~hp1Vjdv*;K$FB--oKNmG`Y4$Rw8yU-3dF z*^ipEG`3U49?U6LU%j^DZAqOlt?uIaOn!*Y$N}xS39*VUwkw%@?CdQ~GoImINJD=& z=iy#RLPNu|hRfD8ueoeGJ6&O(imrJ4qOQNjuY7Wr27hl_fUgVl%(F4ZT61>*iC+R9phF_;YE8DZH=j$uv_qQK@i7_(oICA*+SIGX>ss73pC@=Q@o;T9l zPsN_OLY}%R2)hnnv+M>rgk3U?hW*;>m(>{#fa&dj`P{qj{88QaAKk|&9L2NirG0N~ z|Mk8v_MLn46SD7AUwH?9b5>2ADjUhol&8+sU}M|0xQ*aI#PFfIBZQ?L=aTnjXgo_Y znUA6upnbkH`pp}%VU%ZsYeh<|v*MjTXRR~i{U%0o&{7Ih!!uf9Xl#A;wY&fDlY3r&bK|C6|GM*yw(WQQ%Z?xa{*?{u zdS71Ob7xEUvd+h@{rUCRZT;Wh`R@O@;eS28{OOy&|8GD14_UxZ0iWu zJ-GPchw88S>Ccuvdi9b=YPa0C@PS34`!@$`?yYW*VywWgz_^)_E(?y{xG)Zd=zxS_ z1hYuv>E;*@R}0+jnvaYDMiku=L36xGpxa^OWp=vd*Di;#a?F;5C@Z)MpD7t;q%1tYA{V4ur zpYGst9j%I29W~&ieM&-2s|lqqs(JI4{K@mv^C#z9cmuo&QM)!~5oVMeF1&UBO-GL& z{mDeSG<)0LNM-Zhz0H-md)ssX?MWoltssXUpFvOE4krVDGT|Cc5ah~D=Ni6R9R5f; z;vW+^>+9rhVt5=*-b<GrDCyOG1b-9`gtYBPDRUfrzf{^`}XG`2QIZdq;6%dkfxi80|n z-Me@76}p{L(vmaMqspgURl5IVtu~Cd_b-uDYbz4{Quj|pv}+{2y?;xmQJlDp_`f`p z{`CD(yGCoW8u``oM^PB~8UBYqZOhH47&L#%qmdr`BbB+9k?h+nud{ReE#r`wf2v4%SlX9^qG2 zdh^N6)%>Y6^?3im6WrGCAIn$_nAY63k@kw6c@d&ED#1t$ZF^Axvh;H!rDlK|?VEtw z_M#DF{VSVSMYJ+9=nMZ11irs5S7YIbzj*`2Z_pQ2vvO?tTP!Re%>ftag1~^+D}Vv7 z10zJ19+;3!gTRMJ^L>n>&+=;xKPrUL{OJB|BUK=aU$#jf+pv1HerVxQ1G3>IzduDq za+w=G`lV%W3_Y~eM>-J3^a@~D3XGeU@JVX#a-GHXb>02f;Hozj^=uG*RSz&8p)|<)cvxg{N`Q5xb7>sK38; z|9SKz|FQI?@C2=ucPmAgWl(zjdkx=gddN3bMq&{fJ|oTR%amrvxP%5nG{(^E>i+%e zp8cO9NhE|TeZMecr3srl=6^gMg1IUEC5oDV0%zWV)N%-2Em z)bDWnvdvqNA3B)8(up9_sNgX|7n!@`-gg-lj<6=U#4GYjCU4` z^m+CR;m=q`;InYqw}y540{=4>gEuf{z>U~7yb%AG+>>zxKLhV6S%1T>kHfQ$*wALU zXJ1pY1_NXSJ{vykuf3mt8i3Z#I7hocr~H)A4a#NZ$*~ zYlMEl9ljF~L3pW2vB&h3v7dyn|t21J&>?#+fkW6}SHgYkKhtrN!Z zd4!39Ln6buS$qCO;;0v1WAhJ=v~hH}jYPmC@z*bn9~$P-m%+TpIAo0l+VJk1=H@Cr zKSzi(*`feY%Mrh(el-h^cbk5VaTzscGBu7-Th?Ssu!0nul4ey?Sfz!vBHHu+aDh8~ z0rNqMWfE*tA6uE14gZhd1yMFdVG9)2nqV!FF;SuiN|5_66_$w-T{D?kS`>Y(kLxq_ z72x?l{Y*-MIyPBktaz;b@60H26H>Eg6jp$H%Do9TpQ)@$yMYk`{Np=C@tKA>M)nV^)Q-u{-W%rOI`I$D_wtuE-fr`LPtz zkc-k1d-*V#B-xQl=`Ny6oRf};Qil|l#AQBNdifl*`v<~Z*Gkukx1L!R2nUv?!hzeC zT^Fvc4cAr&0@3Zi76bGvQl)@DdU<+T^f4SjAc+o%@o*2O^{Y;jT6G_H)=5&IW9+#E@ht8t3(}%^4%_jbpcQBV0U6A(5UU@-^o~4S+ zE=iP0LAko`et%{DD<23<5N>F_2IadcP`mM(@D1Tx!^mhj5Z=_mIymw7gL=83Oqe-h zbIlU^G2t{NA!!%AUww;31A$A@a+H%e>GQJbU&vv(!y{G5bC<~-CLve&!w^b8;gB5C zIoz|PdD0E|JtjE{9fi2^o$QUYD2uX9b|62q<=H5+PPsU(Q$T<2{EXhRJUv}2tAL`( z!gHx=ffFVPp9$3|PJqyQr`(DBr&uTJOmreVY?NxD|R8qLHO~}hT&!F8#fqU)zS}%Th`np2~*$@|_gN-2;EBS-17&1Ec{@@R{z;A-gxd?+ZB~cX^~Caq5`>yME8szja0qAU2nGwwA3iCrl?-V9+A@Euy{jpkPlUVDq;cAVIn)4E&bRt zdK~mb-4h*xNAU2~d^=ArX2!GFdra80rLc^Cndb}3P#>MuVms;#L1a+2v6FhcMQv44 z@w#McT_}DzKo^!#q92|k>J_Z%l%yQ-+FYrjldf9q{q25P&G6Hk@`MZhAZVSyeaAa%LBK9ho? zAc*{)=ZKpWryLS`F?F_hrTQK5dbKl9oRYf0WkjcC`|pSzdJWafQ^%X0I;Hj;lLBS6 z!EmMpTPcDYgTeVhwh{JV%f>)3SRbsNzw2YFn_14G^O5Y6T(M;Mxuo@2g}xzQp;#!E zh_l55Vxd&Htq65$Sy0}*_cYa@DJcp3L=y03^eavgtEm+pNC`shIPgJ@TR=JjBA0Y{ zL|OF)W``@n70ZHwAEu)0zyPpFXaTiquppt;7s#~GZ%T@>gKrU@+17aeyIQRFMI{=> zclR<2GGvOPYV^U-#{|?ZficmV$)s`_n+&Bgu1Zr>_M1=-2$t?#faJ1#ih;STm;r>N zAJ7rHU5LiTxRhTXz%W!a?iWbI+Q;%S*uhi|Q-Y_`}0vmn?; zE{g?5yOe|BYK}cO7i#hBc`$0WoPr#?%`BL0HnYu+pV@9lP$A!r%L1D%4`D3=Vz63s z^70BD7E!e2TScoiZ{)IC^YilyiXFJ5f+B}C&rvYWfue#9RY@wy7p-D`o|spFpIA_U zpw@BpEo6f&uP84s*Jicl=h^H9g@q->VopwOkuAq&qi$2b?DnFfBIlIi@x{gCoD;^2 zj$-G;@h+!p{5a?MaZ|=QojJCgqQacQBK&fSitP46yBi^j@?djJ02;Zr+#-iYWlXaC zo}qfNGOT5@Vp;5n#lWd$&#`ESfOEG6PZ#IeJB%8p^;q8;GW{$6!X*IW7 zZI!hZ0c%CO)iJ|nt+jiFTKo7+ZPDPGiQ*51qJcYtV#!mvC6j~_3_nUfl1knaO8zQ* z-0!X~S~0b-Y|d`3P%PriPVq%yqIj)PlxJ~@SG7(Q*9awd3nkA86U}$8njqp_#mR!n YCKNt3YjWUTA@JP+i;p*PB_{U&00&NT6aWAK literal 0 HcmV?d00001 diff --git a/Project/MDK-ARM(uV5)/project.uvoptx b/Project/MDK-ARM(uV5)/project.uvoptx index b398933..e0822c6 100755 --- a/Project/MDK-ARM(uV5)/project.uvoptx +++ b/Project/MDK-ARM(uV5)/project.uvoptx @@ -103,7 +103,7 @@ 1 0 0 - 6 + 3 @@ -114,13 +114,13 @@ - STLink\ST-LINKIII-KEIL_SWO.dll + BIN\CMSIS_AGDI.dll 0 CMSIS_AGDI - -X"H7-TOOL CMSIS-DAP" -U0001A0000000 -O710 -S8 -C0 -P00000000 -N00("ARM CoreSight SW-DP") -D00(6BA02477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32H7x_2048.FLM -FS08000000 -FL0200000 -FP0($$Device:STM32H743IIKx$CMSIS\Flash\STM32H7x_2048.FLM) + -X"#99 H7-TOOL HID CMSIS-DAP" -U002D001C3038510C34343436 -O710 -S8 -C0 -P00000000 -N00("ARM CoreSight SW-DP") -D00(6BA02477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32H7x_2048.FLM -FS08000000 -FL0200000 -FP0($$Device:STM32H743IIKx$CMSIS\Flash\STM32H7x_2048.FLM) 0 @@ -135,7 +135,7 @@ 0 DLGUARM - (105=-1,-1,-1,-1,0) + 0 @@ -158,7 +158,24 @@ - + + + 0 + 0 + 214 + 1 +
                  134443392
                  + 0 + 0 + 0 + 0 + 0 + 1 + ..\..\User\segger\HardFaultHandlerMDK\SEGGER_HardFaultHandler.c + + \\output\../../User/segger/HardFaultHandlerMDK/SEGGER_HardFaultHandler.c\214 +
                  +
                  0 @@ -319,12 +336,12 @@ 1 4 - 1 + 5 0 0 0 - ..\..\User\app\src\param.c - param.c + ..\..\User\app\inc\param.h + param.h 0 0 @@ -335,8 +352,8 @@ 0 0 0 - ..\..\User\app\src\wifi_if.c - wifi_if.c + ..\..\User\app\src\param.c + param.c 0 0 @@ -491,8 +508,8 @@ 0 0 0 - ..\..\User\app\src\status_usb_uart.c - status_usb_uart.c + ..\..\User\app\src\wifi_if.c + wifi_if.c 0 0 @@ -503,8 +520,8 @@ 0 0 0 - ..\..\User\app\src\file_lib.c - file_lib.c + ..\..\User\app\src\status_usb_uart.c + status_usb_uart.c 0 0 @@ -575,11 +592,71 @@ 0 0 0 + ..\..\User\app\src\status_esp32.c + status_esp32.c + 0 + 0 + + + 1 + 26 + 1 + 0 + 0 + 0 + ..\..\User\app\src\status_file_mange.c + status_file_mange.c + 0 + 0 + + + 1 + 27 + 1 + 0 + 0 + 0 + ..\..\User\app\src\status_hard_info.c + status_hard_info.c + 0 + 0 + + + 1 + 28 + 1 + 0 + 0 + 0 + ..\..\User\app\src\status_usb_emmc.c + status_usb_emmc.c + 0 + 0 + + + 1 + 29 + 1 + 0 + 0 + 0 ..\..\User\app\src\disp_lib.c disp_lib.c 0 0 + + 1 + 30 + 1 + 0 + 0 + 0 + ..\..\User\app\src\file_lib.c + file_lib.c + 0 + 0 + @@ -590,19 +667,7 @@ 0 2 - 26 - 5 - 0 - 0 - 0 - ..\..\User\bsp\bsp.h - bsp.h - 0 - 0 - - - 2 - 27 + 31 1 0 0 @@ -614,7 +679,43 @@ 2 - 28 + 32 + 5 + 0 + 0 + 0 + ..\..\User\bsp\bsp.h + bsp.h + 0 + 0 + + + 2 + 33 + 5 + 0 + 0 + 0 + ..\..\User\bsp\nvic_prio_cfg.h + nvic_prio_cfg.h + 0 + 0 + + + 2 + 34 + 5 + 0 + 0 + 0 + ..\..\User\bsp\bsp_msg.h + bsp_msg.h + 0 + 0 + + + 2 + 35 1 0 0 @@ -626,7 +727,7 @@ 2 - 29 + 36 1 0 0 @@ -638,7 +739,7 @@ 2 - 30 + 37 1 0 0 @@ -650,7 +751,7 @@ 2 - 31 + 38 1 0 0 @@ -662,7 +763,7 @@ 2 - 32 + 39 1 0 0 @@ -674,7 +775,7 @@ 2 - 33 + 40 1 0 0 @@ -686,7 +787,7 @@ 2 - 34 + 41 1 0 0 @@ -698,7 +799,7 @@ 2 - 35 + 42 1 0 0 @@ -710,7 +811,7 @@ 2 - 36 + 43 1 0 0 @@ -722,7 +823,7 @@ 2 - 37 + 44 1 0 0 @@ -734,7 +835,7 @@ 2 - 38 + 45 1 0 0 @@ -746,7 +847,7 @@ 2 - 39 + 46 1 0 0 @@ -758,7 +859,7 @@ 2 - 40 + 47 1 0 0 @@ -770,7 +871,7 @@ 2 - 41 + 48 1 0 0 @@ -782,7 +883,7 @@ 2 - 42 + 49 1 0 0 @@ -794,7 +895,7 @@ 2 - 43 + 50 1 0 0 @@ -806,7 +907,7 @@ 2 - 44 + 51 1 0 0 @@ -818,7 +919,7 @@ 2 - 45 + 52 1 0 0 @@ -830,7 +931,7 @@ 2 - 46 + 53 1 0 0 @@ -842,7 +943,7 @@ 2 - 47 + 54 1 0 0 @@ -854,7 +955,7 @@ 2 - 48 + 55 1 0 0 @@ -866,7 +967,7 @@ 2 - 49 + 56 1 0 0 @@ -878,7 +979,7 @@ 2 - 50 + 57 1 0 0 @@ -890,7 +991,7 @@ 2 - 51 + 58 1 0 0 @@ -902,7 +1003,7 @@ 2 - 52 + 59 1 0 0 @@ -914,7 +1015,7 @@ 2 - 53 + 60 1 0 0 @@ -926,7 +1027,7 @@ 2 - 54 + 61 1 0 0 @@ -938,7 +1039,7 @@ 2 - 55 + 62 1 0 0 @@ -950,7 +1051,7 @@ 2 - 56 + 63 1 0 0 @@ -962,7 +1063,7 @@ 2 - 57 + 64 1 0 0 @@ -974,7 +1075,7 @@ 2 - 58 + 65 1 0 0 @@ -986,7 +1087,7 @@ 2 - 59 + 66 1 0 0 @@ -998,7 +1099,7 @@ 2 - 60 + 67 1 0 0 @@ -1010,7 +1111,7 @@ 2 - 61 + 68 1 0 0 @@ -1022,7 +1123,7 @@ 2 - 62 + 69 1 0 0 @@ -1034,7 +1135,7 @@ 2 - 63 + 70 1 0 0 @@ -1054,7 +1155,7 @@ 0 3 - 64 + 71 2 0 0 @@ -1074,7 +1175,7 @@ 0 4 - 65 + 72 1 0 0 @@ -1086,7 +1187,7 @@ 4 - 66 + 73 1 0 0 @@ -1098,7 +1199,7 @@ 4 - 67 + 74 5 0 0 @@ -1110,7 +1211,7 @@ 4 - 68 + 75 1 0 0 @@ -1122,7 +1223,7 @@ 4 - 69 + 76 1 0 0 @@ -1134,7 +1235,7 @@ 4 - 70 + 77 1 0 0 @@ -1146,7 +1247,7 @@ 4 - 71 + 78 1 0 0 @@ -1158,7 +1259,7 @@ 4 - 72 + 79 1 0 0 @@ -1170,7 +1271,7 @@ 4 - 73 + 80 1 0 0 @@ -1182,7 +1283,7 @@ 4 - 74 + 81 1 0 0 @@ -1194,7 +1295,7 @@ 4 - 75 + 82 1 0 0 @@ -1206,7 +1307,7 @@ 4 - 76 + 83 1 0 0 @@ -1218,7 +1319,7 @@ 4 - 77 + 84 1 0 0 @@ -1230,7 +1331,7 @@ 4 - 78 + 85 1 0 0 @@ -1242,7 +1343,7 @@ 4 - 79 + 86 1 0 0 @@ -1254,7 +1355,7 @@ 4 - 80 + 87 1 0 0 @@ -1266,7 +1367,7 @@ 4 - 81 + 88 1 0 0 @@ -1278,7 +1379,7 @@ 4 - 82 + 89 1 0 0 @@ -1290,7 +1391,7 @@ 4 - 83 + 90 1 0 0 @@ -1302,7 +1403,7 @@ 4 - 84 + 91 1 0 0 @@ -1314,7 +1415,7 @@ 4 - 85 + 92 1 0 0 @@ -1326,7 +1427,7 @@ 4 - 86 + 93 1 0 0 @@ -1338,7 +1439,7 @@ 4 - 87 + 94 1 0 0 @@ -1350,7 +1451,7 @@ 4 - 88 + 95 1 0 0 @@ -1362,7 +1463,7 @@ 4 - 89 + 96 1 0 0 @@ -1374,7 +1475,7 @@ 4 - 90 + 97 1 0 0 @@ -1386,7 +1487,7 @@ 4 - 91 + 98 1 0 0 @@ -1398,7 +1499,7 @@ 4 - 92 + 99 1 0 0 @@ -1410,7 +1511,7 @@ 4 - 93 + 100 1 0 0 @@ -1422,7 +1523,7 @@ 4 - 94 + 101 1 0 0 @@ -1434,7 +1535,7 @@ 4 - 95 + 102 1 0 0 @@ -1446,7 +1547,7 @@ 4 - 96 + 103 1 0 0 @@ -1458,7 +1559,7 @@ 4 - 97 + 104 1 0 0 @@ -1470,7 +1571,7 @@ 4 - 98 + 105 1 0 0 @@ -1482,7 +1583,7 @@ 4 - 99 + 106 1 0 0 @@ -1494,7 +1595,7 @@ 4 - 100 + 107 1 0 0 @@ -1506,7 +1607,7 @@ 4 - 101 + 108 1 0 0 @@ -1518,7 +1619,7 @@ 4 - 102 + 109 1 0 0 @@ -1530,7 +1631,7 @@ 4 - 103 + 110 1 0 0 @@ -1542,7 +1643,7 @@ 4 - 104 + 111 1 0 0 @@ -1554,7 +1655,7 @@ 4 - 105 + 112 1 0 0 @@ -1566,7 +1667,7 @@ 4 - 106 + 113 1 0 0 @@ -1578,7 +1679,7 @@ 4 - 107 + 114 1 0 0 @@ -1590,7 +1691,7 @@ 4 - 108 + 115 1 0 0 @@ -1602,7 +1703,7 @@ 4 - 109 + 116 1 0 0 @@ -1614,7 +1715,7 @@ 4 - 110 + 117 1 0 0 @@ -1626,7 +1727,7 @@ 4 - 111 + 118 1 0 0 @@ -1638,7 +1739,7 @@ 4 - 112 + 119 1 0 0 @@ -1650,7 +1751,7 @@ 4 - 113 + 120 1 0 0 @@ -1662,7 +1763,7 @@ 4 - 114 + 121 1 0 0 @@ -1674,7 +1775,7 @@ 4 - 115 + 122 1 0 0 @@ -1694,7 +1795,7 @@ 0 5 - 116 + 123 1 0 0 @@ -1714,7 +1815,7 @@ 0 6 - 117 + 124 2 0 0 @@ -1726,7 +1827,7 @@ 6 - 118 + 125 1 0 0 @@ -1746,7 +1847,7 @@ 0 7 - 119 + 126 5 0 0 @@ -1758,7 +1859,7 @@ 7 - 120 + 127 5 0 0 @@ -1778,7 +1879,7 @@ 0 8 - 121 + 128 1 0 0 @@ -1790,7 +1891,7 @@ 8 - 122 + 129 1 0 0 @@ -1802,7 +1903,7 @@ 8 - 123 + 130 1 0 0 @@ -1814,7 +1915,7 @@ 8 - 124 + 131 1 0 0 @@ -1826,7 +1927,7 @@ 8 - 125 + 132 1 0 0 @@ -1838,7 +1939,7 @@ 8 - 126 + 133 1 0 0 @@ -1850,7 +1951,7 @@ 8 - 127 + 134 1 0 0 @@ -1862,7 +1963,7 @@ 8 - 128 + 135 1 0 0 @@ -1874,7 +1975,7 @@ 8 - 129 + 136 1 0 0 @@ -1886,7 +1987,7 @@ 8 - 130 + 137 1 0 0 @@ -1898,7 +1999,7 @@ 8 - 131 + 138 1 0 0 @@ -1918,7 +2019,7 @@ 0 9 - 132 + 139 1 0 0 @@ -1930,7 +2031,7 @@ 9 - 133 + 140 1 0 0 @@ -1942,7 +2043,7 @@ 9 - 134 + 141 1 0 0 @@ -1954,7 +2055,7 @@ 9 - 135 + 142 1 0 0 @@ -1966,7 +2067,7 @@ 9 - 136 + 143 1 0 0 @@ -1978,7 +2079,7 @@ 9 - 137 + 144 1 0 0 @@ -1990,7 +2091,7 @@ 9 - 138 + 145 1 0 0 @@ -2002,7 +2103,7 @@ 9 - 139 + 146 5 0 0 @@ -2014,7 +2115,7 @@ 9 - 140 + 147 1 0 0 @@ -2026,7 +2127,7 @@ 9 - 141 + 148 1 0 0 @@ -2038,7 +2139,7 @@ 9 - 142 + 149 1 0 0 @@ -2050,7 +2151,7 @@ 9 - 143 + 150 1 0 0 @@ -2062,7 +2163,7 @@ 9 - 144 + 151 1 0 0 @@ -2074,7 +2175,7 @@ 9 - 145 + 152 1 0 0 @@ -2086,7 +2187,7 @@ 9 - 146 + 153 1 0 0 @@ -2098,7 +2199,7 @@ 9 - 147 + 154 1 0 0 @@ -2118,7 +2219,7 @@ 0 10 - 148 + 155 1 0 0 @@ -2130,7 +2231,7 @@ 10 - 149 + 156 1 0 0 @@ -2142,7 +2243,7 @@ 10 - 150 + 157 1 0 0 @@ -2154,7 +2255,7 @@ 10 - 151 + 158 1 0 0 @@ -2166,7 +2267,7 @@ 10 - 152 + 159 1 0 0 @@ -2178,7 +2279,7 @@ 10 - 153 + 160 1 0 0 @@ -2198,7 +2299,7 @@ 0 11 - 154 + 161 1 0 0 @@ -2210,7 +2311,7 @@ 11 - 155 + 162 1 0 0 @@ -2222,7 +2323,7 @@ 11 - 156 + 163 1 0 0 @@ -2234,7 +2335,7 @@ 11 - 157 + 164 1 0 0 @@ -2246,7 +2347,7 @@ 11 - 158 + 165 1 0 0 @@ -2258,7 +2359,7 @@ 11 - 159 + 166 1 0 0 @@ -2270,7 +2371,7 @@ 11 - 160 + 167 1 0 0 @@ -2282,7 +2383,7 @@ 11 - 161 + 168 1 0 0 @@ -2294,7 +2395,7 @@ 11 - 162 + 169 1 0 0 @@ -2306,7 +2407,7 @@ 11 - 163 + 170 1 0 0 @@ -2318,7 +2419,7 @@ 11 - 164 + 171 1 0 0 @@ -2330,7 +2431,7 @@ 11 - 165 + 172 1 0 0 @@ -2342,7 +2443,7 @@ 11 - 166 + 173 1 0 0 @@ -2354,7 +2455,7 @@ 11 - 167 + 174 1 0 0 @@ -2366,7 +2467,7 @@ 11 - 168 + 175 1 0 0 @@ -2378,7 +2479,7 @@ 11 - 169 + 176 1 0 0 @@ -2390,7 +2491,7 @@ 11 - 170 + 177 1 0 0 @@ -2402,7 +2503,7 @@ 11 - 171 + 178 1 0 0 @@ -2414,7 +2515,7 @@ 11 - 172 + 179 1 0 0 @@ -2426,7 +2527,7 @@ 11 - 173 + 180 1 0 0 @@ -2438,7 +2539,7 @@ 11 - 174 + 181 1 0 0 @@ -2450,7 +2551,7 @@ 11 - 175 + 182 1 0 0 @@ -2462,7 +2563,7 @@ 11 - 176 + 183 1 0 0 @@ -2474,7 +2575,7 @@ 11 - 177 + 184 1 0 0 @@ -2486,7 +2587,7 @@ 11 - 178 + 185 1 0 0 @@ -2498,7 +2599,7 @@ 11 - 179 + 186 1 0 0 @@ -2510,7 +2611,7 @@ 11 - 180 + 187 1 0 0 @@ -2522,7 +2623,7 @@ 11 - 181 + 188 1 0 0 @@ -2534,7 +2635,7 @@ 11 - 182 + 189 1 0 0 @@ -2546,7 +2647,7 @@ 11 - 183 + 190 1 0 0 @@ -2558,7 +2659,7 @@ 11 - 184 + 191 1 0 0 @@ -2570,7 +2671,7 @@ 11 - 185 + 192 1 0 0 @@ -2582,7 +2683,7 @@ 11 - 186 + 193 1 0 0 @@ -2594,7 +2695,7 @@ 11 - 187 + 194 1 0 0 @@ -2604,6 +2705,42 @@ 0 0 + + 11 + 195 + 1 + 0 + 0 + 0 + ..\..\Libraries\LwIP\src\core\altcp.c + altcp.c + 0 + 0 + + + 11 + 196 + 1 + 0 + 0 + 0 + ..\..\Libraries\LwIP\src\core\altcp_alloc.c + altcp_alloc.c + 0 + 0 + + + 11 + 197 + 1 + 0 + 0 + 0 + ..\..\Libraries\LwIP\src\core\altcp_tcp.c + altcp_tcp.c + 0 + 0 + @@ -2614,7 +2751,7 @@ 0 12 - 188 + 198 1 0 0 @@ -2628,13 +2765,13 @@ LwIP_IF - 1 + 0 0 0 0 13 - 189 + 199 1 0 0 @@ -2646,7 +2783,7 @@ 13 - 190 + 200 1 0 0 @@ -2658,7 +2795,7 @@ 13 - 191 + 201 5 0 0 @@ -2670,7 +2807,7 @@ 13 - 192 + 202 1 0 0 @@ -2682,7 +2819,7 @@ 13 - 193 + 203 1 0 0 @@ -2702,31 +2839,31 @@ 0 14 - 194 + 204 1 0 0 0 - ..\..\Libraries\LwIP\src\apps\httpd\fs.c + ..\..\User\lwip_http\fs.c fs.c 0 0 14 - 195 + 205 1 0 0 0 - ..\..\Libraries\LwIP\src\apps\httpd\httpd.c - httpd.c + ..\..\User\lwip_http\fsdata_custom.c + fsdata_custom.c 0 0 14 - 196 + 206 5 0 0 @@ -2738,7 +2875,31 @@ 14 - 197 + 207 + 1 + 0 + 0 + 0 + ..\..\User\lwip_http\http_client.c + http_client.c + 0 + 0 + + + 14 + 208 + 1 + 0 + 0 + 0 + ..\..\User\lwip_http\httpd.c + httpd.c + 0 + 0 + + + 14 + 209 1 0 0 @@ -2758,7 +2919,7 @@ 0 15 - 198 + 210 1 0 0 @@ -2770,7 +2931,7 @@ 15 - 199 + 211 1 0 0 @@ -2790,7 +2951,7 @@ 0 16 - 200 + 212 1 0 0 @@ -2802,7 +2963,7 @@ 16 - 201 + 213 1 0 0 @@ -2814,7 +2975,7 @@ 16 - 202 + 214 5 0 0 @@ -2826,7 +2987,7 @@ 16 - 203 + 215 1 0 0 @@ -2838,7 +2999,7 @@ 16 - 204 + 216 1 0 0 @@ -2850,7 +3011,7 @@ 16 - 205 + 217 1 0 0 @@ -2862,7 +3023,7 @@ 16 - 206 + 218 1 0 0 @@ -2876,13 +3037,13 @@ Programmer - 1 + 0 0 0 0 17 - 207 + 219 1 0 0 @@ -2894,7 +3055,7 @@ 17 - 208 + 220 1 0 0 @@ -2906,7 +3067,7 @@ 17 - 209 + 221 1 0 0 @@ -2918,7 +3079,7 @@ 17 - 210 + 222 1 0 0 @@ -2930,7 +3091,7 @@ 17 - 211 + 223 5 0 0 @@ -2942,7 +3103,7 @@ 17 - 212 + 224 5 0 0 @@ -2954,7 +3115,7 @@ 17 - 213 + 225 5 0 0 @@ -2966,7 +3127,7 @@ 17 - 214 + 226 1 0 0 @@ -2978,7 +3139,7 @@ 17 - 215 + 227 1 0 0 @@ -2990,7 +3151,7 @@ 17 - 216 + 228 2 0 0 @@ -3002,7 +3163,7 @@ 17 - 217 + 229 1 0 0 @@ -3014,7 +3175,7 @@ 17 - 218 + 230 1 0 0 @@ -3026,7 +3187,7 @@ 17 - 219 + 231 1 0 0 @@ -3038,7 +3199,7 @@ 17 - 220 + 232 1 0 0 @@ -3050,7 +3211,7 @@ 17 - 221 + 233 1 0 0 @@ -3062,7 +3223,7 @@ 17 - 222 + 234 1 0 0 @@ -3082,7 +3243,7 @@ 0 18 - 223 + 235 1 0 0 @@ -3094,7 +3255,7 @@ 18 - 224 + 236 1 0 0 @@ -3106,7 +3267,7 @@ 18 - 225 + 237 1 0 0 @@ -3118,7 +3279,7 @@ 18 - 226 + 238 1 0 0 @@ -3130,7 +3291,7 @@ 18 - 227 + 239 1 0 0 @@ -3142,7 +3303,7 @@ 18 - 228 + 240 1 0 0 @@ -3154,7 +3315,7 @@ 18 - 229 + 241 1 0 0 @@ -3166,7 +3327,7 @@ 18 - 230 + 242 1 0 0 @@ -3178,7 +3339,7 @@ 18 - 231 + 243 1 0 0 @@ -3190,7 +3351,7 @@ 18 - 232 + 244 1 0 0 @@ -3202,7 +3363,7 @@ 18 - 233 + 245 1 0 0 @@ -3214,7 +3375,7 @@ 18 - 234 + 246 1 0 0 @@ -3226,7 +3387,7 @@ 18 - 235 + 247 1 0 0 @@ -3238,7 +3399,7 @@ 18 - 236 + 248 1 0 0 @@ -3250,7 +3411,7 @@ 18 - 237 + 249 1 0 0 @@ -3262,7 +3423,7 @@ 18 - 238 + 250 1 0 0 @@ -3274,7 +3435,7 @@ 18 - 239 + 251 1 0 0 @@ -3286,7 +3447,7 @@ 18 - 240 + 252 1 0 0 @@ -3298,7 +3459,7 @@ 18 - 241 + 253 1 0 0 @@ -3310,7 +3471,7 @@ 18 - 242 + 254 1 0 0 @@ -3322,7 +3483,7 @@ 18 - 243 + 255 1 0 0 @@ -3334,7 +3495,7 @@ 18 - 244 + 256 1 0 0 @@ -3346,7 +3507,7 @@ 18 - 245 + 257 1 0 0 @@ -3358,7 +3519,7 @@ 18 - 246 + 258 1 0 0 @@ -3370,7 +3531,7 @@ 18 - 247 + 259 1 0 0 @@ -3382,7 +3543,7 @@ 18 - 248 + 260 1 0 0 @@ -3394,7 +3555,7 @@ 18 - 249 + 261 1 0 0 @@ -3406,7 +3567,7 @@ 18 - 250 + 262 1 0 0 @@ -3418,7 +3579,7 @@ 18 - 251 + 263 1 0 0 @@ -3430,7 +3591,7 @@ 18 - 252 + 264 1 0 0 @@ -3442,7 +3603,7 @@ 18 - 253 + 265 1 0 0 @@ -3454,7 +3615,7 @@ 18 - 254 + 266 1 0 0 @@ -3466,7 +3627,7 @@ 18 - 255 + 267 1 0 0 @@ -3480,13 +3641,13 @@ Lua_IF - 1 + 0 0 0 0 19 - 256 + 268 1 0 0 @@ -3498,7 +3659,7 @@ 19 - 257 + 269 5 0 0 @@ -3510,7 +3671,7 @@ 19 - 258 + 270 1 0 0 @@ -3522,7 +3683,7 @@ 19 - 259 + 271 1 0 0 @@ -3534,7 +3695,7 @@ 19 - 260 + 272 1 0 0 @@ -3546,7 +3707,7 @@ 19 - 261 + 273 1 0 0 @@ -3558,7 +3719,7 @@ 19 - 262 + 274 1 0 0 @@ -3570,7 +3731,7 @@ 19 - 263 + 275 1 0 0 @@ -3582,7 +3743,7 @@ 19 - 264 + 276 1 0 0 @@ -3594,7 +3755,7 @@ 19 - 265 + 277 1 0 0 @@ -3606,7 +3767,7 @@ 19 - 266 + 278 1 0 0 @@ -3618,7 +3779,7 @@ 19 - 267 + 279 1 0 0 @@ -3630,7 +3791,7 @@ 19 - 268 + 280 1 0 0 @@ -3642,7 +3803,7 @@ 19 - 269 + 281 1 0 0 @@ -3654,7 +3815,7 @@ 19 - 270 + 282 1 0 0 @@ -3666,7 +3827,7 @@ 19 - 271 + 283 5 0 0 @@ -3678,7 +3839,7 @@ 19 - 272 + 284 1 0 0 @@ -3690,7 +3851,7 @@ 19 - 273 + 285 1 0 0 @@ -3704,13 +3865,13 @@ DAP_bsp - 1 + 0 0 0 0 20 - 274 + 286 1 0 0 @@ -3722,7 +3883,7 @@ 20 - 275 + 287 1 0 0 @@ -3734,7 +3895,7 @@ 20 - 276 + 288 1 0 0 @@ -3746,7 +3907,7 @@ 20 - 277 + 289 1 0 0 @@ -3758,7 +3919,7 @@ 20 - 278 + 290 1 0 0 @@ -3770,7 +3931,7 @@ 20 - 279 + 291 1 0 0 @@ -3782,7 +3943,7 @@ 20 - 280 + 292 1 0 0 @@ -3794,7 +3955,7 @@ 20 - 281 + 293 5 0 0 @@ -3806,7 +3967,7 @@ 20 - 282 + 294 5 0 0 @@ -3820,13 +3981,13 @@ DAP_Host - 1 + 0 0 0 0 21 - 283 + 295 1 0 0 @@ -3838,7 +3999,7 @@ 21 - 284 + 296 1 0 0 @@ -3850,7 +4011,7 @@ 21 - 285 + 297 1 0 0 @@ -3862,7 +4023,7 @@ 21 - 286 + 298 1 0 0 @@ -3874,7 +4035,7 @@ 21 - 287 + 299 1 0 0 @@ -3886,7 +4047,7 @@ 21 - 288 + 300 1 0 0 @@ -3906,7 +4067,7 @@ 0 22 - 289 + 301 1 0 0 @@ -3918,7 +4079,7 @@ 22 - 290 + 302 1 0 0 @@ -3930,7 +4091,7 @@ 22 - 291 + 303 1 0 0 @@ -3950,7 +4111,7 @@ 0 23 - 292 + 304 1 0 0 @@ -3962,7 +4123,7 @@ 23 - 293 + 305 1 0 0 @@ -3974,7 +4135,7 @@ 23 - 294 + 306 1 0 0 @@ -3986,7 +4147,7 @@ 23 - 295 + 307 1 0 0 @@ -3998,7 +4159,7 @@ 23 - 296 + 308 1 0 0 @@ -4018,7 +4179,7 @@ 0 24 - 297 + 309 5 0 0 @@ -4030,7 +4191,7 @@ 24 - 298 + 310 1 0 0 @@ -4042,7 +4203,7 @@ 24 - 299 + 311 1 0 0 @@ -4054,7 +4215,7 @@ 24 - 300 + 312 1 0 0 @@ -4066,7 +4227,7 @@ 24 - 301 + 313 1 0 0 @@ -4078,7 +4239,7 @@ 24 - 302 + 314 1 0 0 @@ -4090,7 +4251,7 @@ 24 - 303 + 315 5 0 0 @@ -4110,7 +4271,7 @@ 0 25 - 304 + 316 1 0 0 @@ -4122,7 +4283,7 @@ 25 - 305 + 317 1 0 0 @@ -4142,7 +4303,7 @@ 0 26 - 306 + 318 5 0 0 @@ -4154,7 +4315,7 @@ 26 - 307 + 319 5 0 0 @@ -4166,7 +4327,7 @@ 26 - 308 + 320 1 0 0 @@ -4178,7 +4339,7 @@ 26 - 309 + 321 1 0 0 @@ -4190,7 +4351,7 @@ 26 - 310 + 322 5 0 0 @@ -4202,7 +4363,7 @@ 26 - 311 + 323 5 0 0 @@ -4214,7 +4375,7 @@ 26 - 312 + 324 1 0 0 @@ -4234,7 +4395,7 @@ 0 27 - 313 + 325 1 0 0 @@ -4246,7 +4407,7 @@ 27 - 314 + 326 1 0 0 @@ -4258,7 +4419,7 @@ 27 - 315 + 327 1 0 0 @@ -4270,7 +4431,7 @@ 27 - 316 + 328 1 0 0 @@ -4282,7 +4443,7 @@ 27 - 317 + 329 1 0 0 @@ -4294,7 +4455,7 @@ 27 - 318 + 330 5 0 0 @@ -4314,7 +4475,19 @@ 0 28 - 319 + 331 + 5 + 0 + 0 + 0 + ..\..\User\bsp\nvic_prio_cfg.h + nvic_prio_cfg.h + 0 + 0 + + + 28 + 332 1 0 0 @@ -4326,7 +4499,7 @@ 28 - 320 + 333 1 0 0 @@ -4338,7 +4511,7 @@ 28 - 321 + 334 1 0 0 @@ -4350,7 +4523,7 @@ 28 - 322 + 335 1 0 0 @@ -4370,7 +4543,7 @@ 0 29 - 323 + 336 1 0 0 @@ -4382,7 +4555,7 @@ 29 - 324 + 337 1 0 0 diff --git a/Project/MDK-ARM(uV5)/project.uvprojx b/Project/MDK-ARM(uV5)/project.uvprojx index c16b0eb..22888d1 100755 --- a/Project/MDK-ARM(uV5)/project.uvprojx +++ b/Project/MDK-ARM(uV5)/project.uvprojx @@ -398,16 +398,16 @@ 5 ..\..\User\app\inc\ui_def.h + + param.h + 5 + ..\..\User\app\inc\param.h + param.c 1 ..\..\User\app\src\param.c - - wifi_if.c - 1 - ..\..\User\app\src\wifi_if.c - lcd_menu.c 1 @@ -468,16 +468,16 @@ 1 ..\..\User\app\src\status_lua.c + + wifi_if.c + 1 + ..\..\User\app\src\wifi_if.c + status_usb_uart.c 1 ..\..\User\app\src\status_usb_uart.c - - file_lib.c - 1 - ..\..\User\app\src\file_lib.c - status_mini_dso.c 1 @@ -503,25 +503,60 @@ 1 ..\..\User\app\src\status_ds18b20_meter.c + + status_esp32.c + 1 + ..\..\User\app\src\status_esp32.c + + + status_file_mange.c + 1 + ..\..\User\app\src\status_file_mange.c + + + status_hard_info.c + 1 + ..\..\User\app\src\status_hard_info.c + + + status_usb_emmc.c + 1 + ..\..\User\app\src\status_usb_emmc.c + disp_lib.c 1 ..\..\User\app\src\disp_lib.c + + file_lib.c + 1 + ..\..\User\app\src\file_lib.c +
                  BSP + + bsp.c + 1 + ..\..\User\bsp\bsp.c + bsp.h 5 ..\..\User\bsp\bsp.h - bsp.c - 1 - ..\..\User\bsp\bsp.c + nvic_prio_cfg.h + 5 + ..\..\User\bsp\nvic_prio_cfg.h + + + bsp_msg.h + 5 + ..\..\User\bsp\bsp_msg.h bsp_timer.c @@ -1419,6 +1454,21 @@ 1 ..\..\Libraries\LwIP\src\core\ipv4\ip4_frag.c + + altcp.c + 1 + ..\..\Libraries\LwIP\src\core\altcp.c + + + altcp_alloc.c + 1 + ..\..\Libraries\LwIP\src\core\altcp_alloc.c + + + altcp_tcp.c + 1 + ..\..\Libraries\LwIP\src\core\altcp_tcp.c + @@ -1467,18 +1517,79 @@ fs.c 1 - ..\..\Libraries\LwIP\src\apps\httpd\fs.c + ..\..\User\lwip_http\fs.c - httpd.c + fsdata_custom.c 1 - ..\..\Libraries\LwIP\src\apps\httpd\httpd.c + ..\..\User\lwip_http\fsdata_custom.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + 1 + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 0 + 0 + 2 + 2 + 2 + 2 + 2 + + + + + + + + + http_cgi_ssi.h 5 ..\..\User\lwip_http\http_cgi_ssi.h + + http_client.c + 1 + ..\..\User\lwip_http\http_client.c + + + httpd.c + 1 + ..\..\User\lwip_http\httpd.c + httpd_cgi_ssi.c 1 @@ -2777,6 +2888,11 @@ + + nvic_prio_cfg.h + 5 + ..\..\User\bsp\nvic_prio_cfg.h + stm32_otg_init.c 1 diff --git a/Project/MDK-ARM(uV5)/startup_stm32h743xx.s b/Project/MDK-ARM(uV5)/startup_stm32h743xx.s index a83891e..75942ed 100755 --- a/Project/MDK-ARM(uV5)/startup_stm32h743xx.s +++ b/Project/MDK-ARM(uV5)/startup_stm32h743xx.s @@ -68,7 +68,7 @@ __Vectors DCD __initial_sp ; Top of Stack DCD MemManage_Handler ; MPU Fault Handler DCD BusFault_Handler ; Bus Fault Handler DCD UsageFault_Handler ; Usage Fault Handler - DCD 0x00000143 ; Reserved H7-TOOL APP 固件版本 + DCD 0x00000144 ; Reserved H7-TOOL APP 固件版本 DCD 0 ; Reserved 固件小版本 DCD 0 ; Reserved DCD 0 ; Reserved diff --git a/Project/h7_tool_app(V1.43).bin b/Project/h7_tool_app(V1.44).bin similarity index 74% rename from Project/h7_tool_app(V1.43).bin rename to Project/h7_tool_app(V1.44).bin index 03f18eaa4cd6d5a4907dbd90803536af4c653b19..15dc5d6a795115973d5dc5ecd36c2cac146e7362 100644 GIT binary patch delta 193500 zcmbrm2Y6IP_b@(lceB||-SnQ^-4r$Y)H85(h{nmlm!E9s6kPqq6vzMJvhk4 z9#9m)k`N>2)flk7>T5{^UqLL3g-8(xDSNknXYMXB=aLm~bu~s;{XKI~sgA1R)C{TF0Q}0W z<4SSK*7XT7**vGteVkL9;TZ+b{KvViE<<*6+5!!rW!EBN}y$v8YBQ#V>EvoZ^=kaUC8eEynp>-Z!^$?ZzggJ*25 z4J)`cI7odzJXg4{ydU1LkkfG`%ru@NW4R?^Z~2f3O}go;V0FVnvX@KePN>MI+-Tg| z5u^ykinFB=Bt~hDY@3O))=dAX5}6t%H4cv;tCU+4?s1_V<=qI44~s<2Gca25o&wR* zh>n<`Q3{0{1Z&juQ?;E{$z+1&tGg4oBr0rL38yLGnVIhRO508LsP&w-yW=zUV_fh^ zH@5lg*<@Mh-CXtWos1@c569k_< zfouxz!vE?R6R}C5Qg`|6_P5A;QByUerDjuvy4MuZkr189Da+|PFBunmQc+Hw9Yf-d zVPy%}PFfQZJ5m#@9R7^llhk4QY&p)-b}EJHF02dUgXjzo(gnkNnnz*7GGy{-yS1H2 zrxt?f1fa6_xWId~2kQ`UkMNM@yG$g}k zX=lMOA9*J=HAM3IgAOnGDK%d+SyBlRwg@VagtR%_zrAE_+SC}{8D{hKTh<_|MTzaa zprKpI=V?Q7?r=49H$a+quQC9x*x3O2!op1b60b^rFZGh-^a{<3z91pe7EX7O#p$Cs zy_YOD@gwu6ENSmy)Zk?d$O_krcFU5>(DQ2~hK+kzpLV}sMZkd4lVok`#TXg`V z-jiK%04LDjJ=!kz{t7frCXpE)?gd#&TVqf8;poQMWPH7NbU8 zLF)DQCro!EUTId}7~F;cZ>#3!B_?w7#t}{C0X&Wz${Y#5j?5JJjmx?fSCdDx(h6qR z`HP57;7k!TPhuJaI0z4ulm^_3dBF1S{@LVMmTqj#MN|@E!b?8U9G7V@Z)5WqsTqxlqXgL{~{nF5*P9@K^a4&}e=U2{}i^c{P(m?1x zPNWagF;1n2{hlY9oPr4^hq?>#Qa1)0{MPw3#tXxQJV7TYA%3Hi@iYwL!8|srEe(_E zrlBmt=fscSCA0kB)$DTpZ)z;$^PKnbA7ty0DNVCypsYrCK3IveAksK|`4FE8>{+HZDMXD7+V3&1H*bgq)E77OOp8?x!^&UiEC$J1XNP5hR-_Lm4O(C7%W z1%rsvpzez_kEj22_-RU@t#ly1`!~9Y%gy_3I?DP59>jC=Z16q{4}}L(4*95l+b=uL zTXV5ln+b+i{<)=iG#$ah79I>z=rT-+<%{Scx0X+Zu$os}w0zP)l5}O>AvV8~R4?Y^ z22{j(V<1gY5RQg-1c*k-X$yh0wUDtx)2@@`riU5K3{7MPgOOJZWX3YXwViXo(B>}8 zD`)}4pro@M41Uz7upC<(F{L9%3jcP5jhdbJ^E`PEQO{ z^J!p#KL>i;;mcY>^7F*kGu z3G53c!WU}R=0FryC{!=FiL#K-BW{1IeD=7OPn2Wd4y9|0JI59;N5H-UV{dYk>4jNC zRtMNmA6J1rEcTjNI6^(>1a+tNFaX2e1 z9cO)zgR?dk;jA*F_}Y3di9A)B6r1fpI`(CC4mMCw3rd>mARm`5nsioD*pQ9`Qon?C zN_hV)u^|DH;qN8?5a3tH#VdWVn%aDrH>@9waga5`l7bw7=gInEak>*wjQFcKdVPcW zd&!|;Q_R21#cZaFm5wM6>S49(1t_fiIShr8Gk?5VL!W>;mlgI`cq@dr1j1X^Y3ThB zo=xVIolzWJsp+U1{-u(ubCTH6^G0Y_;4A}l6?yPbdEA6DlLgMqna0r9-P-QfdtpRf zjg2r`0(_Ey0sp+4>>8bq-y&a*&K&uom-SuId^p|eWWNjKzN`tL`kI7d&7&pHF}Ck;Jiu zO-g4Zd`JZ!Lw$}A8_rkuu>oNWmEeoBL1GNO;E17J4)z&>pc%#mxAfI@u}>dEPs*hu zhW-R^wGcypaGU@QVSRq;Hv#Hl2OB=d&@UZd*|-7f$AATyCi+1@_@Lu`n___6V5WKDMR>Hf^u_BOaMqL=7&Ifr$o#U7nNHwEQ z2P~7F9FP^79Ogi(8F_qwJSHGK(lI)aYDO&%sLl@v8yrIesb*ANfSMMNO>(3LQq8E* z0nHHs*$_uKBs#P&59=6N5g_~I${a&oQVcyL!8eB?4GfuueEOD`tR8;@SL`OX@m8G+ z205&ZhtZQh_S^1b;U<87@Uh>QNxgAS^$dqni0v9iN4S-?@X0W;+t*mI@=pmOYi<<=Z z7<$CR!(?g))OLBS4W*ye3TP#C#y@@9Qo7%bbtbNqz6NjOpO`PDFS`*y96&F~kOH9R z0IIo&8%pVuGA;;kkGsQwPX$nmj0*Q?U7 zh@Bcp%J&W?Bj{>@e#Dy~C#4OhQmScWZ*?^&ebr$AGYqnA_Y+Tb0^pu>=mDpfO}m+7 zP8>3R7;SPS11@}*yNX|xj3{!S zVy{wex=)k!rj(rD-P8VD+`wo4p-&P}3*uv8ZoUhY;SKTDST$=HR3j_KyT`ZtBy79g|;RhMM**&gXTdg6B&5QXe zHyfn4`T@%$`7FN}gY)8`Uui>0@^ zZ%f*`e}8Jr{wg8#$ru{qCZ&^e)YrR>pl&sjFu*MB{>ej{%uriCmupMSMK_f7aggqb zyISQ^@{Y@2{>LGW?FtmRZ(M-->Hsxz-)O)kK}w!?4VU$CQ2YMUR|3=upl%zG7|_=Q z(d7lm_Y9DSn2fjQm^HVvT+1@Of7@NRWyv4s7BBlKt#WZ(>q?QMQd|{P!mj;tREr06 z4MYVoMFyy~u1Ju*28EkPZk6V0Su{{2r8&hd(ri9Lj%tD&)qXjuQLZRfzo51FNqiK| znKc0&B*Ui+B@I)o3A0>NF57Egl~jmN+q56=D-}W@rN_x1Q{obOombOF3x|OAAxW89 ziKEEEsR?)oxoPT*vhSQ~8ylFPgc6wxWvdoi<*x>04YFRntoK?cewmesNEdNVP3BBa z5f~>i?KGGSJA0*8UInFE>%qJQ3ZiN+9j5`CfbEerZ*C=cL!=W|lcHU)WGRLo?KP1zCbVSG< z(aEP@Ir+*?gnoN%=gG(0py`AWXm;`NI%u7c?Hnnbz8x0mUU8C-r)L$G(nW60hM@h? zqC46#)TC65~ z*75x>J;vfXXhK=VjoHQJtm*B1xGfh_T~0?h+b(Ty!rz9&mo2AHc*uJ-;}S~g5g0g+ z(}hAQW6|!GqdiIzYBMrRY1iLqQy>$&CDhXa^MsEfk_s}v_9iaJM|x}H@kgY;c6{)Q zQZ0O~PEs%I?@wWE3=NeIoclP0 zHU7{HLc&x5nYTbDErOYw36d9henjr8BT?5 zIJC^AbSjMhXH_dpsliDW%t{mUv{O~u9%%E^M^XqfSLwIN_RPQ&|9*mE1Et*Zk#<9a2p5VZX`XkCxT5gN${M-V1Uj+ zR?g7_5aA##b4pW6=>;hU;);(o-_N-ozUdnh4|E>-D44@LQ)C zgVyb&X>KO)+%1IxPnc})VkfKaOulRG?c5lNv|N*@bx6wdv1s%D+?~OY9YbVf@~={% zEy>h;tMcU;5?>r|((mM~j2t18<30nKB#;R;y>Cr}8WX&ygxblY*Cd5?N^xzp`!ncC zKUmrE(>2k`tnof%Lp^~Z94siH&ZpX@>ePFj_HR6?It=f_9+J2~2w&>r+iNaNDugA376q?t3FCuWVD@dqE%@abCJp_~bEFHFC|VRPFj;Lms9^Z1 zfd9_(7nb2nfcwfrdKcv08DzL66Ni)emJAu666Q}wJaC_OlU7SS z_k)|fWy#?_g|W6JRc1;x$Z3rPo;~gt+Sw#)u=z+%u^OmPkjf>Qe!Zl5Nl4NL_kzJW z!?A=iyR78-CE36iwJeVOup|UeB&U|7C5>=@H;5a_+_Qi?k7O*3W0o&1NLItD%wHMT zEc1*79=D5ZT&m|zyGZNOSnfv`d2^{g{&UyWA3z6;@4LvkrG-WN29f+)Sn67#0s2e3 z|4Rk~9&-Qs+w+L)@2nQg^uY;!SfTtf%v&| za59)tD!{(yB(#o~Q;~spl9FX9n2>495)$qkq=c94oDS?8$?eMul9pYi%1^BT>U?r& zS!Tkde@GSrt%A6gr6d(zWw~FHeE>ZvT3&=9b<5+DeXy4DSAKJH+$_H@ILIT*a{?Lu z>GF`NUplU2!<7oyEHhUE^C8Do#YQfS%*0OU%&z2(R^}c7*uAjTu_B+Pd_@Ajk1Sh} znQ+rT7+GytNuFDglCa<(G**6RkiHc|W%J@gWX;zAawti&rWK`LWsN`C?6YeJDN@QZ z69F4U>a7LI=cK{e;HQ=W^(Tq6S@ns%(q9Sj6SIN%p+rtw^<0NUBI@JQUXpaSko**w zkzGl$KWZ&-LanTi!;g?_>I-C>Q%GyQa>@$n?^z1lCJn5xTnjSuq`__4m2y38kR@t4 z5v-(4Ab->kP0GJ25q>JGnLHV`QfH0)hh!1Zlvl|Z<=UKQQd7xif@O=OJ`0yEFN*(_ zDrSiuIQn68;Yv#VaiswEJJ`5e$t%_LQy;Odj7?V4cL(wL^#=oAhmS<8(nDsHtjfS! z$&6KL_%5<;Rb0X?gW2T-&Ik6@!cqzNzH+s-y(yOa`Ji%6wyiuZ)DQPQ%$G zceO4qb`S?Mnk5Sg{pytEZtve^nd#?YX&n`_1@t`lkXeI1B$JK<4%M$qvfjJrjuE zdB{6!lesTEVkHzz*MTU2c%zQS!Hutqn10w*apEsxH&ddjsI}NlJsRDCHk|>VU?E`F}N7{*G?} z;FV-mgO0o4CXX~EC;kc}>nml`ua;%aw{CKKD|4ocPQS%fP9HDe}F-?IXUo~C_P`q>l{KiQ0U=Q&f?QH;uOLNTc zmTUq@EzJb%xTwtlb5ad6BkI1^BI@={1-M!V58f0~c|V{o_)LH@MLh!W@4kruPmS6N zaKCQ?%vfuq9tZe@Z#>{oWq0DfBgEx?cZ;sM^H{lN->`+YGGctiUWz<2vvSE5VJ z4UuNEHMe@pgrH-;0JagfIoLMn8A#N}h%+eqjKUCli#OPIQpR8d2N(mjK|_7If5UN{ z6${hJ%GE2@&0Ml(R{d?u(8Z2d8*fx3vsrq9?BWfaO~9_Qokn9nFV}@wa=}8^NMz-v zMKd3FD`0QUpPPtx^;1~ZJqyn-@LYtaEWc`M&8&&lY-&93djCfAHDgZwx}j@_M+3w{b6 z5qdUTl=;3s&+e|!aa>imm!$JIO?BOd%TNS6dVfeqjr70i3>*E>))wz1vKpaR!%wpHe}&nLRAy78u~ zC~Ck@k&4@4UwL7(uB1|36>L_|VVgf*`!GjC>PP$4h2I@#o5fuIVb~>2BAd46&We>c z-8kThbolJQ`q&1O*RBEhM<3fx^4b-SI>cg6EcofT&wd238o)|WEWYsh?4QB&DM&Hg zIoQ5ID3y4&4#TOWcLP4?5-r*~w_dqE|m56uPm-rZj0a^gcp=LK|!El!8%wT2& z+pu)o-+=Le+kQQa>OA%lvH=)I^d5V!{JUN@pcE!@9(#~%z&ZIhQZ^t644707EKt1J zuy9Z$ECSpG`zk%&ezt+6g8dwoSz|RO*BMlYRrG$jvEhX=ut&rU(~|qiiurqBmzb5g zAo>dIEg`fy`bzkPzlEQc!__fY=-UQ`6(IkRmuX@9(M(5mhk08tUZ@fx1!dN76RIC> zMyGL*3Ko`|1+GZdR|=o4)T}ldDVkU^HPqISYHC-}dt9w&)TnI&IvU@lkb9Y-Cf?XO zLEV=HIv9ju!5|!#A46?A^2FmQP1zI~TiVl1&Gm+=6d3a+nGD7~6S%%;)5Il88>2>> zHEFDs{j47sh4h7i9(1v}xb0H&_{hF;rP^#-5^7_G=n7T|%i+z%N?8i=?XY5qcr+8C za|v3V{1%l6HAkX9GV)j8jv82*RB;|1-Qpof#N~u9A%X;L=S@trP8 zSy9x$LehrG;A%CQ+_s}Iv4Sp=z%Q@e+Um1!@O9ei1*1?w_q)i!9m&ZRR0G4NwDwg% zyw3MD44=^Y6(*iekjTXydDF+xcRXeEcj+$SdSEE`p&_-xFnYV^Zg9IShsJNJuZE&} z6W~&O#`Zdyx_W>**0%tp(gIQz4_W<0{`f?nun$tcbhLS>iS2K)*vo;a52vxGs(p+IW!1JLA zXkIcEbUiI&&1R$NGNdQ5-2`#%_QcyjBbonnBzM9^Rz95y*|W<<9(X#38~!x8?YVMt z`sqdfoQjXItV3Cr26)!Pa|2oX%<@HJ=*OO5A)~zkl>OjthwL*!F-dixXFAW*CdIKE z0sobIH)LM3_b#CkLjQ529F&z{D~7C#aH}pg&t+LxSrx=QibC6=G$QI#vjXFBlG10h zxYJHD@7esOU2cB~u$ZgB8Klt1VqFCKn%%SH?79|`xPm42h7#c#NVp3e!P-&z(pV&t)oy(M?X0_Z%xj zMi^*4m*>xgX`q66tUvl0^I zbSc4!vl%Mj#rYv5V`oxm0UhV6eAx)a_gYf5^Tw!~UD0NI=H4iLo=5oQ%l5V8-#ZI3 z_>ti0SRlZTaNSro6lWqS_Y;y5 z8L1JyW#RN3YzLWXx0gJ&%c2zMMi;rft2)(8w>yJ|pq^2nOrVRw4M_GYfbD_fqsiRo zC)7`;Lwv|!>}9hn@Yk}|(0T_ljO=Ceqf7|b!Y)gYpx4%EsG*zf z+Ekg$wToxZubl{aagj`XVHnr%Ah*3x-E@xw>vM&8$m$vxp>>@{k&0f#C&+#hQ823r zYaUH+^5H#N>TqaTiK+^lJPNk-)4{V^DGaI3Z`TWIGo%0NfhBg^@BOF;+%h42z+n`= zg_gLCLs`wrE3N>S?GHNc-G6a^kj=2L(16I;-MZK@FcJgr>UJ1Zbt_CCT1P`UCO7OB z6h{jq$lJSh!OZ1svr$8S-kqI$vr(f4uYxR9c5qHv_3U=FKFG`q;q*(V63UFW!~pOo z;Bmd5l)RXfcnq-00QRu#hmEvo0XLH@ebInNkOyD;WSrKKV6#pBL54#dQMMl@AD3aJBh>cYledg<47Ig#_z0Gpguj_jYK7gxluQk`o@Lza8B=Z~MJCc8p6Uq=I=P zUBy+LjX|Z*igtX8`^fM&O48nPnz}4&jNmkHS=I_~j9Qn~P^@7|ex2O?h7NBdyWhx+ zyUTf(uoQ&vbWT2v5NBg>Bl-S~0`6TG3G1|mjBqx~`Iqh_cXr;%{p=v#&gqcmX>VSi zJ=9TiaZlwelal5*p0v%BQ|Ihc>uLd$=1}UU!#jz5{pNUsLo({dLg%!svl*}Ir&~`~FV;%zv z3qJy!8hAedGY0UFBaQ=ywa0*akC83$9R|u*68Y|}Vtt$g^?YQq)os2W^)SyS*l?o1 zJF#t(O<`m3H%?O6)fzre@~;MqAUTs9?!Uzu@*p7=!zo7?k8RJ`I9m`s>>wlF-W55E4I3^B(lgl!cvga4jLmKc`M zjpY2hG58`0>KPJJ39AXbH5^tu$cUai97&e+JRVXE<3xr;p2rRrYnG*P>bP`HZ6~7+ zP7Do!djH?9FdG<4dJe{sXAeee-*@b(2WR)XBpbt@_K<@IbGSW@j^7R%anP11oVA)1 zymw>7FjuP;(R)2waC^PvA+No+i0g87M7(ds=@iTegVP_#3Ip_7&}Eq-%ml9$n-$Za zJY?Gk`Em1yaq4z>?to_%JU#G;@1y2M87l65$lM}BLwg@E?~$RL-Yv2=eeb;iZE3xm z1KJXMHwCoC^fm>wMf7fr4XD%f-WE`&?7fA|_#(4uO~9~K1BTTP7`A-Cu(|=mmJArS zc)+j)1BP7}Fl_#SVRHuzn>}FIi~+-H{xWRpfMJtK@Rud?Jr0$yOLeb`J%lQ?S6}Id7I!j$^ovn^vW?8mb8jeuU zX7ICvhNS1;9T|N|N?hGB>T8z@zuYnWyG^VcI`IAbNlurc-N;*(VV;Q`J;_@qF5!hs z_D?&=4@DT4cD(=Na17hV4qG-}(2;SX0OR_OX+NFeh7?f>%^8KMtMYt4H>-Z8l&Rfb z-%_uJ;S25Vtw-%Qr=n~QALb76P!QfdDB!t>9%_3t?)+&D1#Uu@Wyh>?g>vQ|BW$cO)%Yv;;=Nl8$Go`TBHGr6rIWbE+~I9o9f< z73(`%9 z{_HE28?RJ=*~G0^?j4dL^j~N3SFVC+ZpVqUcjM5xeMrwnt`7SzWZk)mcope9H!{D**POBk=I~>?Y|tYs zk!_hxE)jeCkAj~af;l-d9PWD_RPXF3{2$XpqG5g*Y(q4{M;iaIM`Ui3b~L|ro{QYj zXDlcuchIUDWHGk$uyWRlYA7;yo#|~teK?b0UO)#g1o4V$%j$VmN2CocnlsIKimkGs zypK`Andzbzm3JMHo`!)qk3N7m=HDlO(3Game#Y?z$Y0Uk_7Clh%Cy^L?TxbbDBD^a zzXl56(W|vS45#<3V8ce4OASqHv$57vYvsGt)`J%wFlsFdo7&1#3qU|6_2-QxISSib z3&X%A?dH@Ur3Ed$R?Qi$5jD0=xNy{1pnxPCl=c)SKyv)>TgBwt^M<(Get*pBKzelj z8&_&b!k_2y{T-SM&tu%x@#@8i7*>KWTpFI^al;HqXMk0KR(Ap`GJi%zZJD5gvwlWv zVi!9YQAFEeu5~#+^v3~K*u}h@kXl3u40PFo&Z{uMQ^vx=4lDq50-PU9c3rNmY>^LZ z@wXz%!B&8(kJC;4v$oh_-z?)%(e;o7Y%uh}X_0z|J=e!LF|xGd0AB+cX3yjn`N%wb zPVA@NzmqF{dPbO+mV;Mj7}bKnwY zR^Nnr-Z+oeDG$GK9Ug2!}$LrGO+oo9T^$FNZ7 z>`#Qzk+f2yHUUR9IpoPLs&J{n2k%_JHb3|)q}K_x>6jjof=o&aOXE+FMjOP)G*-h? z(UIg`#o_A5@4?q7L+P^;oM~DOz{iqUi}77eP`A_yXt>MJo0m{cP+zf`wTl_7A(%v>CyQb?wFG;c+&LRoT*N4Qf$s=j(%8EcNP^;61?~ zKm1!T;;qV;BR)x{?cjhI*#!|!WW5Zye#7!K99g}-b(Nv2^?J;Quo>qj$S^TU0Utk< z{udfxL_ZcMDe(P}+%Kd9M-=!@4B%c#oEwA-0cw!MEkSsZGMRoUiEuJ6KkjE|5R}!# zt|0i5$j}D+1&AIIhpKQ2Fg+)UlT|oB^fl)`o5IFOuZf#fI1V)NlK7+wZwID4Nh}M- zcaERv2?rLReY{6w3xZaNo$vM8M|n6IJIvG2JvtI4vQ=BwA8EU{L8919p1*}D-XNY2 z#+gkN{LZ1(=M^o=7RVjuI9ANTvZD%)alHv^I>9ZffqYWP`J{5PEYETV?=T|ZxI7Nl zN!whP=_J^M^4M?payAZDnQwu!ts%798zfAGqQvs^N{R1hxyOBCu?D9`r$Yr&K~d$e zhwk->Bs$D1F4Eu;ka;T|;tmbY!#{}cYw$JPlimZVAvhUxTfJg=D9(zGhm@;qn?TYG zgX1JR)FZA9#bu#0*0l`0O>}i7-5i3-=rt5zgXPdc>J9`-nc^W^uO+#QmB3 zz?KNS5-W4y?1XqZ64wE=*ex#7;zAF?e;Hp5EyWqLIkZrQ4{ywEhN0yDS#P;#uSL^hf7k0$X8QfmM@&Q{EbOnjDTS zKf{}R+gJ1B92V-$OSSEVKZ)33l&@EmuD-IW$^mLK;lM5kH z$E8H1uKo}F^48{hHYJBjxr9lZz33w1;WTj3%s!OEFj`ouG}}U;e*M;Qem}$HdBrE= za5^`~DgG-CCv$O5@xO6+W}Y6-r^C`bNH-VVDckjm=Pm)|+$~EZ!^U2}d?$RGc)Stp z+U*p-ipLG{)15b`)||dJ+B&Tv2NF$I& zixa?39i8Z95^A^2!qI*&YSG`$inyNcbhBE$5h^E>XR|B6{6x2SXA+bWJss{ApH0Gg zfb?$h13wh$7EdSPbol;WF*F&Eis!+nft_Y!XVG(oBa%|dQ@u~THW`->)zL3~2EFpU z7F&gL_Mg4mev3ppy3fP6b5O&(6`22~pEbyO`nK4ejE{v_11yWYVrvS{fl@ijD}I`S zTjI8`Z7rA(Lm$TcQeSQ~dF*$J>r!zNUN7FCich7v;p8iB8SHiv0)DOdEgnk42`Qhzq#IfO&X5WW?}!)D@K_uvmZal3c|0xfTuJH;&}y<4 z)1UB~K&AJGW_iT6bescu^|5#?9olQ2PWOmXIxf@b=*@1H?i1qh3_O(AQ7eq`^)$v= z3@3^ZWX?MZ)Pwo6FgDbIr@Ppk0i|9Re=-B#hBL)D9uJH9@MfjD;FMIQgqtqnpe-fh zd>&8ZX1c{aJRZk=>kxnAu`vokpX+A}hcS!Co+*yf;VJr`VM*(UE(B|(ybuTH_N*%# zyQ%~XgES}@VjMl}5?|EeQhZoE2JFcM*u7oWm0H*mW9wsA1dAL8#_9214tI&Cvhbu( zW|Rau;<4++G1=G*YgppF+1OgdIhDG2$V@LRW1%In0673^o)HbuMMtwP3f`2_W`qND z=0I8w9*Gx+!mS4EvnyIO^5+~0Gz_;Jun*eV0btfOqo;hmp`8}N?MDbHu2SlaCrPmjQJwLil485{HXu@5-K+L5?UyZb6^tyBD9BwnpuaTPY& zDH_Z1>gZTFE;m@mVTbr`IrI{-^iN4l9fhsH@eZsD{T0g!hq!$dUJCfT01xxiKdYc#fi#&AhIIU3L7Y(CLA22apz6$H}ip$604JFZ6VY?xugaH?4gYj)PTZ@?1)d^#0{-VVQb0V#}YQGpd9%m*! z=~aW91XjOfLK%!~tUV$%1NnJz(s-;(xFbN`Ab;0=tQvPN>b-^%{GNWG(3#_POMf})rwnU^5h1P#0iGhG4tR3S zYDf#vDfEixn-_=lWt&WX10c8G0PA&Tlb_=vQiBQvDpJMqm3U}&luS_z$a+M23pm5& zFr3;1ZOGVm9@S|2)Z(L+IP<_8mH0^TlnONH#gvJ7d`vZ5>4W(%`(1Vq?EEp+4sp#y zoDp{lg0n$p9{3;31Q|y9QQSEZr&aX=$;3V|ZEg?(>OOLz6wZK;Dfq4Zl|Tdg8<648 zK9{`~UU3{2?68Iy3P z0)pZ#ldz5f2cDXQCvqCQ9BH}wl6cCDQ}8)4XfoC{oiu6XBG+8}vsnutp%7+H)-Icj z<)MW9AY<7FfDl}&kq-2>ORYuWecxP>8k{mgdZD&AZA4-DpoSs>r& zUqQINuPu<+*G!4U;3?I@cCmtb-#VWdIl50n6{zj)J+iErH3dgEMK~(|RNyTWl8*BA zMng#7vw;e-vDgSs&`+AfAYTkxaknu^jWdXA=y58KxKD^8RSiq)7m`$=t zhfXdSY*HYHwMc8&*f%GT!?Ol*SRJX7b9k(r!`LvYZ)!jq=Ahtl&}_iHm={m7gv|{k zEcqzEl5c`6pAfK90$-kH!*lhKU z9ffklpa~XV{E5p7B#s|Q+^mz?0rQ%mWe8+=Xuz&iW|twXFLl5GW>%6Md9rPUEeWnL zksDDe8LyZY6)-K*-$D*DEmSrw861RIW#hptm28&Nehhj+b(76$|JuhgT>(`t{pWcyJL!&C%)7m#`?Ak`!eh<*C&*Mr6SSdHSrAF{Zwwf?R4FTg0M;x?0y zh7MWK6cDTi!8*BM-tz0Kz=42+MFiV-uso>ld&$%g$d?z)4UjJdwpM7%cFI_m?&oBz z+?K(5vf7dc^dLicU(*u-K_%Kgz{0u$)|5RqApYn8jhDq)w5{z=hWed}0; zLZ`Au&KEX}VPCxq)cGsy*=r!Oh0%*jh3tuKdZqxO|`Jm1YLQLnsx7xc-FB`F_nQ0HJ7FJTdH=hHl99&1ald1 zO*G{Lo~L0*2P23|b3Wkw`O2XsfEhc0fv*TX0;3tB#qvX(ZMm)7mSF=LAD~g(1i4+r zK073@Ku+GcK=MWpByY_x%y%V_yxwXX^IT!sp_BP@0{r>`{yD#-{KemwZ%Z&4ii553 zrs86i)v^*BbiKh;fm>H@nvmKjx@&QTM)wQiGk$@wf>=2N-=x_K9jBgE_q*iJ#8F$)O)ZY!lyxRS;{U=$Qot91hHW z3Ai=loY{CtQyeVvZDyiyfklt+Q6IYu100Gbv3qG?&eQWas2f<)z7O;FKp6FK@YbQ4 zE(=s_){rav81x4UDYi6-T{bZP33ttDWVQgb&22u7a$5m zBlLCr&PEu$0aRIzdOqcIt)`{3{`5yiy}U@`T@65!ivW_lf(X?*uDVYQdq;B z9AMV#C)5BzfK9jQrp*%;_Gx%(5Aw3#cU|oFez!PxA--34$;%I@$^wbsW%mWY1|Gt{ zik^k|y4(ZcY`|O!EL%{P>@N|x*bKc4zBu43(fSFz;g&C>xM>kgBUdIUB;W9b&3n7S0F#?|(tf;Z()($SZ2!e$LNY&f=BOtRpY z;ve?@Q!L6arag8N6|~4=5BIgg=;`87%^nrVpV%Y6EEB@zt ze1BSYn^HXto=dMQ)i8{n9A)8j+~loGSS>p!uCK$x5}$FD2)n>5>Vo~WBUku&<&jgE zyI^l{i0{;4E3AFxIYq-VSmn!ulZ~6DvEc2&7SgA)3g=B*nnYN1q&4XCJ3pay$GIyPAfQ7 zp1OBGI4B48!akuqwF$K*S`dG#KNw+zh5t$RV1Vx^>@EI(>G`=ocs3|v%V&HOyH=tZ z+>2shaXQ|{H*s<}1i}lQ5fE0&;a~{QajGD!h7&){IwgdsIiV2Fz*&}A@XUcnOj?1n zBer*)v3`9DMYB9h^@=lBKwDPh6*sQHdE8vD$Xw33#a{7?6*xJ<|6MB}PoYol-@Y6t zH|1WH=|jO4|NnocH%#(7Y=#SQUEAQ}#o3evT;F&eE!5i702u)awS@sx*#w}z{8T2lVp%lz`iIeEwK<8 zgITGGfan;^N{<@iV=ya46|gI#V@1iYpc=u&IWmzID0M&qD_D$=6|Uj!%7V~db%C}w ztUwg3ctRoD5l9B#F4h65ncuxiRjBTT4Lm4Ne4s!vmmb7F#ERn^Ry-ndEnG0fy0CZU zt+G?1!-|JRP75HP3GAPZsRv|!0J%{{z9inkkf8zObu#i^v8NtqW4rikJzR8l-Yu$E zVxIfaE#|Se$|+7|?;f|fb|uz}+u?_+fMx%cIG?-SDgL$+7jm$WmbePSUZ*Imf^fP^ zyqUc#U~Lre;e!j#9P!sxczDGE*dzU`sG$F~elo7V*H1BZHLRdqUEgnpGsS=D`+u$P z4U^bE^Ppfo;{UbyHL>z17p|*|U!a-j{(mh}S4tG~&SfQ|LGoYs8`&FgW*%9gy>aqe zd}K8)O8H+4%gg;@u~rc)o?VTNLJECQie#JK)e*4ejp0VsP*VyGa?I;enP6yF4fpoS zV@FsMT8H}(j20WZ>)_H<3p`h@ko{n#c*7ceZ}dVJHlV(r`de3OVPh2bR-IzVT4*#> zF0pJat{c_F&e#O*)RpXw9v-$LxR--XlKln`0%v7)1A@y~{<|2Xh z;0STlI$Q*=`gQpA91}D@Q(^Umt;=r`&=9OM2~{-Ss|4?bl>!Tmp%E@|Tmv4r^o+gC zr^0L*G2B)Id*g|mZ zSdU-9$-mi4eaaT)4sF+2IG3Tc879MJ4o?{9W}m3O5s%P+=ZUZ({;d6|C&UJ~p+3+y zL2(Q=Gwi*v)y(jpc|^;NI5C&qQztv&BF@OJlVt9@`AW{nJQN4tTjvpX-iYrGTjYq+ z4K-C2pR&()h{YT5)8RQZ#F0o%@=2nD2aavPaf;yApgTawBwo4&zYaS#yBqP1rQ?|o ztEIRlm@jK7et9{3vJnzjnx7)tbb)a@5R$>KTt2uDZ9oUDtJ-!3;n(%TQVuh>ow4Kqk z-Y0(Cj4QZv&I77VSmG4vG)}~ualayiW{GDu;||W?6I<`WIpOJW=V;AEx_*=?itZH; z--Azt^Y@~xho91@&pxVAR~|TYFJ8z7TNzt$CO6T2pn3~VR&g&m4p<(+vlYr{3M2ft zw&G?y`oO5i@L`Pn1N+<*EF>pAB9S*_0VD){oY{lk6(0-33zV|d9my||Ny47VH^}JA*nm0QyDS67V zEjzYQ`!F%-8GKE|PzpEI^gPq=k3zij860nDaxZ451B+n`qo&|1UXNd1U^;2v;GS<% z)X$&Hmu|Ao2XFtSuu=64<`d(*mM%5Vd|RfOt4DphYRjt0<{G$_OuYCE){h?NuDWcy zaU4jM2;)F1A6Br&!ckLXP=622%7k)rxuAygDYc;E3vhvHo-hnBHI#FUwa-GPDtzK? z&*IeBw`7i;GDn)s@wH3b`z%gxIu45+yWx8M6dT-M4SIvW*9#G{*2g?1(0Y46Tp%Y) zv_Z3==5OpDQk_$sm4foyU|k6DtDuRghfL2;iBPlC_04b|CiZun#jck24>IE67*wuc zv5uunq{Mb^CzLFj2sH|!4L95*PI?ZPjC#k-ZjOeVLUpiu--oh;ZOjWU69$d!EUzN} zH@J=;7X;)zvoWQxm$d?=M| zJ`Y9p53uneu<;jom~FA=#E@3FqPfAvcct%4g)g+qC5~>z#dTk}nYOe2@&C})4=tdY z_d61?qerH+2(>{Up)Q&=d)lzlNo9?VMTn){AD$|Q-${*7tAQ^I-W%Zw#QjApPL3T# z;Yhg+_3T4P9|cFTN6{M`qPrF6$B&{9$&@jeQI1LojiNIg;<%moJCKTzX&tguIY=Fo z#KK)rmPS#B#Pq4o2>8JPYPWP?`7ZEWO3sB#=99q75^@ndE^)8Nj-+@~Carghd!NU` z>P+w=iKB1&dr>%-#BM}jJNV(?3=p$34eH7WILxGKPqM9oTHQP$$(#r{3jP2QU1$gD z3WrWT){LIqGCSIoM`!tl!p)LVJGG`#TH%(u!vSaZK|j=hdhGpTn?aQdBgTFQQdL{|i^XM8PSvr_oV_)xT}e$t?%^#o%l%JaCOR?84C(e2e%JIC)k=`+Piv8vyzYo;Q4A?~AxN zzl7fDJE+5FCgP9xm(Zy|+2iA*OXwtkp7+@RHvyn$;knl*=D&nL!2gG^Hvx~L*xrY` zt0&1MWSOiaA;3%sA%p;75BrdWVFCzYl}!k;g+&aA2wY?Wf}rR%UX{WP5|t|;3JG9{ zh@c|k0w##;U?*V};Wh~L?DK!CW)enz_q*RbPxn;4=hWI&)zwv}&MBz8^RYNkOFB4c z)-JJEw9dhXG90ANJ39BCnuj;j<;pd?#K%QTTW35Z6^jdEcV!-6$G`euLoBQuhxNGp zO@z|ISvpe#Nt_5J!70zgA_!bDPW`MxA-XLHZp|tl= zj`?D|?BrGRZ;Z-C`0s?V#@6 zkOz!VW?5<09|U6N z33@ym?2_UzkTLNr@~dEoHj4#O=3=0*AW#s}L9D_2D!4FdO~t^0b>~AtVPat7`ROUa zauq)7H8my$Vk!6Ri$oclo?Qc=2U^mnD1F`R$qPauM&iQ#V#@3UEjv zV;YV`bbd*PA!(L?F)0K|YfZ(4^y*$wpWOsQw0|^g&LXsF4;hqoNmo^)OJhohTf7r0 zT!kcQpeYqG3wLw@f`03mG}CqUA1-S8Tzol(*`#2n95M0pg_WK3^5gNzsn7>~v5(l!}-9zr!Sly62AvMF7zY`eE+IrIo%7PAtQ+U~H+e2vq1pULR&@W^u z6(ceo^11kYp=mUmw*9v%dKi#Oceu$r@Nj3LAYXQFrw&_WHeg0s<)a03O->)fhC+`%kYR3 z+w!&!jw)Oi&oXjZ{ippSPW;dpc{{lj{zLbR^ET&g;(UWS-!e$u73aJ&cq1~k0h#LR zFjl<HV4UPCb_+h1YDEENvE1nwEE7ix1^Pg;<;E<5Gd zHRcyl(iafvN<roU;dO>3n95 z@ufJ3v<;`Fhs6ZC`LNiX&iEE%?!eK#!dXlSbjr67zc$dK{bGj2dqAFbn~iAA@8KGQ zfp_#5VoC|zZ~nc754g^rYtj|9r#r}Wh1EcF<_<8`!7bj=3Rl$5ZjC9TDpy(UzQiZw z~dIaDMqg4kr*(m zUze8#^JBN@wC}_LnxV?eF1qzQ(PWvHcUf&?oy>x2HI6`GB9E?Ip2W}Ci)o!|KB$<0 zpi#zNfqR&m?`N)x5^L!AVk5yfV|n@{#11R)SwzEFZCc zv?xDXgkL^%$j3@g6JKh7FgC66v5t1q9p8%;;to3Hs5n47R0-p?N%cR9@$}G9%rSbq=-s1Yzwp1O zLHqq6CWk-c2r{u3B5N*BIq3W!#6IF>`pFOCt=M*M$RFlumkCO>ix~vq133NkM{Iq3 zf!EVeU#LBHD*p&6-b@<(lXxZSA2?O$4W);YhsoEB6*S~$Bov1C*1vo~g6x&OeirLQ z@l)FTxH!D|0GLPfhPjFfru7A$5-Q>&tY~bdFC7;R;m0vB_w@zGF`j+L#aBd12mT@s zkNwoq5PGD8na=U%bK5VXp;JGEYU&G>W!0GW+_wzZ!g5F&)>^hYim|8>f#x16=i+!6 z!!}XJFJdd5xiQ8tN6`V4phLCTV)SLK;b=@Pd32Z62l!wXm?fv8h6{_%rUa!36JY{9 z6xxMJ%!m+lH%T=y;EGamm?0QLF|d*253VnOm6FY1SeIfdsW2^Gh*{{mCTZjxgqRk_$liJ5W%VTHoMMJh9aH62 z|LF-r(gZrTX3_GKVza1-#%TBWqNSHkioM20+EZkYdciE;ojR7kNYxL zEbgDWqj3M(6@h!C2Zj&TY)>%mSa_1LqRldd?lm80=NqP|bpCH*vL(WuR)h^x->HYF z_To7vmQk=|I^@tam>6GHhhbtIcqdBO$~8qPcs<>|#-%Ix@?U~EuwZR5bdvC)jul#y zCY(#gN=%70N}E*`Ir#N;y22~!^XMP#%j4uQbMd<3q|m%|#ZB=1H650On2pOyq1oad zY9$C6o`Uad4af~j{6x5ggH~TliajOHC3qmKPKo`ZShef+>eyHpADnqvb$RHCQ)2g? z4EL_vgk&^1Ct|NpuDGG@z;Gc~2!|$K% z^G-91C1D_F1!fzh31+jeS|fy4t>FS=4}(j@6~gggxI%?O(_iWYJKc9$%qCfO>O3tP zNmD!RcLx6tY_ypD|AsZcGh#pOUaXG(r2^HS6*CPnuyeT*14E3`(^IgFpoO<=m3uc- zNRDSiNR09t9e-BrD8(pE==!r_4jJa4)!2u?z;x%V_#E&pbnZEE1k6NbTIr#4;xM>^ ztTgJpXzClIB)GhB$GZL=>nfc1V4qgMS@&gQ4!uy+7cBfc#{&A+d9iJDjMBpWcfu%I zb6y;egs;=~7sM%n>`ijuC;G1o;^*YcpXlI=;wj4kyk*XG4A)-AWyPh<4A;ivO2d_f z3r7O<*VLJK;MdhyTeR7Tt{qULh3_*QfVr;z;t4kw^I`0|+S198&t1XhLq24ogCVD# z==e+7P%M!ofe?JgY3EA(eJZ{BTgnxqH*l{){kfnh{FS+5- zdOakC7C6Mj%5z{4E3vV3o%q-&*o<^}6QZqrGKd_P{vLoLKzb#pC#8mH$3~EaB=XTL zj;3cL$%lS}{E$J)S*NyYkaEgNEdZ*ib9Yj3H^3IGh(1^jX(%HUJM#dtTT$2)bAT@zwZYsql83 z^1bz6pb$_*Q2yzoh@gC7T@Q)`3ISy$r+idOK>5_V1{7G8JTHN=$VZVtDMeaBN|^k7 zUS3l06JpySdOC)*$?vC(f?5Va+2|IOBT(10u{2Iu2G$E#1N8lrf%ZYlUVNJ1&1}!Y zw~m0x>(sm&9A@vQ^so!crwH)|LQF-7Z?6tgHaqCBSQ6i}pVE@YI^FH9ka+v_q>zjo zzX}IKU@`4wa~za{3i`6EqG5C3J>Ih zjL{7}TN0*}Dz^lgw;I7t0!rwyI8rZVn#1YtrsV59ld=KFPCJ`+-kq)!5y98)1peHD z@!U+xx<(oSZMU1f*EP^CDS@`EktTt*g&v3}9oYzSJDwzxU2YnZK)%p=M;CO0Lt_Ht zG?&zDoM{~!m_kDmNp~XrOtTY7dfPX#cB$K2tIlvZ)t)wNnlH)3gT$+^NPs1yE2;{? z7xq4Xo4%Duo=)qlWr+6OX#p<5c%qjhN%~Rr+}G-F$KUgB(y7VhTHsqq;fJ5-uvR2KF$t69v3P~PDL_=A2Fqhv@5))&$j2$5 z;#MS1g6U-Xb}KR?aG|G}^0I?!Qpg9vi=iMdwiHTy=*|=pOOVqeDWrpj4Z}3^iNKb$ zX=~_hOIPkW==9bEreNu(tw|>UdmWW^t;y%&|7S^#*=a=^k`C6-?UiyHGE{6B@H@99 z6A;m>ZOP8on5L$*gyyg?=xA$>t0RQQ1wHeT4C!K_DOss^1=6YMB(_DeathN5305pt zS9mfmUSvXr#$9+RL)Rt*Xx>XFiLLfP6d_3d2lU4oBmXft8$#~`l8#oyq}@NCg&nw0 zU6D#pdN!T(O@7iTrtXnDlnbemN{nl|`MxUK5*3?=ZHaZMNmQ2Ld~-XJqz!QCWsMT& zpp)8>7O6=}Bn(7922FWCJGH>w=*M|{QYmT$EQv3Y6LE%{mbN4Ms7Pg`6Kx|zOxgcqBLsc~{V z5YZ5+z=&yTg=sfdX~LjFSkOo1X`h4mL~
                  yv{1gc1OG93m0x9$4PrCwUZk8c25Z?|w0Jl>d6Rcg5 z6I}Up2lD#=lx=V#mBJEpn54TIWH?dFG zCn`ES-IYmNSQ3?;cmoT{dzdz3BRYBT-7O=o!r#Jv6kKJT_D?>g*6sDi$WAgA>!Oju zp(vEUKx2q9_k$8ohDPwzy?npgA`s6}+Y;Qrvq1`9`Nrm@9I@%ppVmzc&?ia?OtM8Uxnc7ohQ>rO+}>s@{r)uTp5~U|Ec}u`E4nqgOkTw6M>RwR-h8NF&y( zI@+u=X^*mG+t}#vyH#u*A{RU%Ks+M`L3(iXBsXIk*#7QCd8wedtc;S*%lAFAjkp&Z z;;oxO<&C*05juDZVEz-%(yR>17C0;j3+5OTX_-dTRPA zg&wNuLb}40?xB6Uz^rPbvJYF{T}WqOEj@IDms$(yzb<5CZeQh$JEMwKpN?0bB~*?#e#h$e&_|-q0wmh1SAmt{}5P*=P^U3xIE#i%Ar*hB@M~K<$m; zf!gaIiz&B;(Xl;9*G_IH+jx)V8}EYP-FheHTk1G2cA&q8S(%<-S^1d2WD~GhOh4&C z`X|C@s=0We_N;z3n>?}u`XY8ibTH6Ssma3N8>)lW^V*6u(=GLeoyPSf{WL$=qhzXN zkvN>EPXlXPAAPT#Lb3TgjZVSN^6j2vtVOps9)s|YI5m=fF_ybTd>0LeAWO74LFs@2 zYB>J{jaCZWVVq7ly`7^8=q+3!<_3DcJAl(A4CnXM_2};+%JQS&HN;rFx`og+YRd%v zZdfRpVZ_;NE+|SI^k=@9a&x0bTZ@Zn6&7HZgT2H4q)+uCH`x$Bp*MMw+`CP`>P;rI z{}z2na$=}GP}U&5VgY9%Y9bXjGiJdUe;<+=8VQ~1{2PcN8~TtFEaaTNBqjMdC&cd! zsij?%XRxu*UrsAaGhI;UakLH4LMPqTmn2Ra&yiL@#(>Wtx8{7qIGO@D&gQ92VCs~eC`;qr77aa{bIg68jM!5}7;Y1^P9B4Q6vEu2S zn#J;=EXh<87@l4UQtrxD!+w5e?1yxTac2k#c3p*%(?6-n^RU;u~| zM3zBTh5gBkP^*e>u*?04KD>+4$4BFtk1|4@ri&8kpp%V6AKFFnU{}Q#@?|4Qw{*qy z3PJ~LJvikn8KV(q(%&`>fT8*s7$mwW`jhBV=2V-IS5Gb>(v)CgJIX zHL$`C5J!mh#kdaJk>2_d-u{}$&LlLt_f#sZY&13|F`eVnlZrDu5Blx&s%FKk7v=i^ zz0-QYls9h5=mFV72MW-5g~c5OJtUjxV=iMkuEE}0TT?=5w6fGjH)WIfX2<_V2?u2w zHrS)^KZVw0lZ2S-PFY>-N>ENYn9Vw0V|QnhOmR8wm_uSSrrKg*Q4O=WvO=`t3ARY{ zA^4)XZ3do?a<>W17^^ha!6M)%tlY< zkPc~jTe#eQ+g(g&vQ19daiW=yCdgBGPm5rw7lJxW(rNnc! ztSz`AZ29G0SBNdG{7R`uecU7J+m$5OvrrZfU6D%`g>`|+Bewi_4rMh{Pc9kIBw9(e z68S8EpIvrFV z2SIB$-(6q>%8NrtI<(f54P(slKfC$57cD(K(!b`8&CI zL?8I>IeX@r3-ku&zU}Oe{cmikPwfleHD?zH5)a550C%l36KdI~>(@=q7kKW^Ix{fe z^tyj_w#_p?x0&O|oT+*1p8KA=zjwCE(@yo4?`x+%@91;71FR>E9XK-2G=9os!*d6+ z%8h%B%pv!>(^Zd=jj6dX&cat$QxoKSY7dW?%+|XHDs!+Vjy2cRa5+~|pcG*k>6e%b zqbpuC6}$nByiiNAaTq>aa+MnppczJ9?wAW}6iknht{fk9CFa_DFx<>y&Nt;k!TCc< z@7gV;QA!|vVK|wF;LSYrkKtI|&Bc~2P0S}IxK?@S^n73gq4=G?nNLzQPW3JX+4Auv zdC^Yq<&!LO$WA+qAlC=)%IRm0He&p>irQ_^1!m7Cnu3g$fW&Uy7M?A#ea`;pT+ z$%B!!6DpQQkR@c%c^Wm6z^*mk79&Y|i|Rkcl&hs>H@3fm`TNyZKfCf#`Sm?p1i{y+ zKNv~olbtpiHHu`W6{D+m+ooc>@k5VV)@|!~$Ow1a`s~~1)iLbzOj30zOxXz3^tueq#3>%^C%$crht%CFAMlFW^1MV5JE+sRr-BVjQ zS>-L>n5&F%(V3%(Q6KKAH>a1Rzti#U#T!cowJT}2aa@&L7P7VDyNln6QeMRgv(aQ# zY%X?hy|gc2A=yhCK%W>x`isxg_s5VnDebNL@&J9Ck{EqcHsVdV$uCBfZl)DJhOX^tOAYkx-V!a@+FO0Hpk`GhW$k-FbJP z_`rNlo$sc(<1zeqQUq{IH45egvus*4=h1e$WIXw&c$fxFAfpIGy(Uc{`MO*bHNSjo znY6VX3imG;{c-{+j>v`SS!MU?GQ!cpbjU>V1i(wSg7VouFs8C{B8e4Q8#+FT4AwAl zJX$aerOkYT^kHiw^PeC?NsNJ(StKcY~nm?ad}1~12J{xxq?P_C~=uV-U(-`OMaEUVI~>ND;@8`yEDnM zf*j=tYEwpCYLw?ZDJ9M13yra%F?ViNlJ<6vB7^5FaPLz%$+-)_t&wZ^QyA??DLKKP z!Xi9{hxI^ygV5Gwv)*VkF{8B$TwmlfW`xqz)>$XjCB?44U?Dw8NlP zy6M6~GBzm(2HHz@uWQT^F|Fryrc+k9>E%KKW2O!oI-A5xI%N`VGn@2nc2@n+y|sL* zUywOvP|ydZ^_kQ%n@mic?cP|P>qj2tBR_D_d$Wl%uA#QPP1CzJhuR99OBR!*F1lha z=0ihpuA|+y`{sHWwz*f<4kb--jWDr)y{p~UdbN{1-*gsxU-aZ$l9oO|`O2G%0A9Mro_@YCeg}J2L8uNR0MJc#q=R&>EwMv4|K6 z>S0w88OBDD6Yv|)scUhf!Mkx8r{p+-@x92u75VO%n5QjfU)#&E%B0)-CbT7H83IuY zqwVpALeviwE{$A3OtC8Tpc(J>Hb|wl>R+B1%s&O;G8LDQ_Lb)rkQ74hxi&1qv!3sy zX^Sw19kJ4xi%75VZamx*k>LpUw3~jmh;#^GD!wk$+C`*YoCK$`_cbKTEH-5sL?m5k zrOD5dUL)2xS(3j*Mj>dV+koZmo9YXA`xx*378wRC$Q=ju=s{3Bq-D*zJP_-rvG`1% zo+g|ZWC%DOWS`*Lq6mnsGqqOU?1q%=$}$ingUz$c&ywz`sXUpyfAVTCG@Vi7J@lLBNJexYZU$Le zz^ePGGaS{;bKfcC0v8&+42@s3bSY^aT`(*!4f;&3t4#A%pnP3Tv3&w12hKW?QM@Qf7w8QquuC5WT!i zDNZI|Ghn;DLhD#|dJb_!W7^AvKm|oF7;zf=mTGVuD))w!T1U%GAS$W{E!cwDG9yPJ z!wqB&lOqL@fX37b;OoyQjAN%j3^*ur3(9&}<7OEb_O9KPXl};7<8eSD0kn0t`0^hN zO;Ny~ppY$aTMS#i0(RWMTItue_pQwY;l8~f9^LAFYl1*Of1ad7?QnMbq~xXnD)GSOA2`(SDpGN(7&!JK(qbO z(?G9ZyZH!u3h2daSAgdD@qP{T#5MU5^bpYRuPOECfafyqZoUM!gRuYF$p+YmZUegO z+Alx{`bGVwjm8&~6PB)^_P+Kes3t#ZOQ4z8UV8*>0krkCmw*oP;|&Iycy09~s1|6% zwG}|ke!PEKaa8cy(uZgeuPLaHD_TinEEhq(eRV#_d47Q|0Ik1T2z0O?`aRGySEoIK z9szpn>JvbR`0vfv%BzJc7;#x=ii_bhsbyc%V;1uk+tgSivZn&c0u7<@;wb z2k>~=@DS!%#OGKw%VK*_b0E-Ea%+TN0vSNFWF63verQvm?a`nAj>ZAC)nmQ&)+j$- z5$NrDK`@UJQq;fEY9TqIDUs{%0v&B>3{tCJ2mD+8pA7ax@qt_NWBoOtWBkw)Ko8c} zK7!T&-BW)7=vY7AFM)2WKlKQ@ALyofOAX-1{h0p^_>KCX9znMNT~~hu=r}*#5}?o5 zA9@6R4d}x9{Xob2@h$^8tA6hz=u!*dN%gw`Pw-=&4s=BQ_D9fZKuz^qfKK$|9R{>_ z{pLr|$AD(mzXNoVA8!`W*7dCaHlP+Mq!#N2=#=%W13%%%oD4Lgo^@b<)Bsdd&pPmA zKi*KFwmQ~<{m~{sZ`ZL7JjIU}=YC7->z?tV1~f)C0M5xQs{>&^v!%(9ynuR$~Y z9n^2?SO=c!NBt3KWgY9l{^$=tchs>C{G=c69-w7)tONU_yMb<~WBqrUAMYlh>+1$R zL|JFARo@3(T*tcebU)^GZkqWbvbYx1Id!Z9&+wxz1UjXTbzpyV0npKPtOL*Vu?{@jkD3TH zsE&1De>4H8v)0>zZJ^EZ3n7AbyY}8Ar~tIS_BPPDe!Mqbc&@cK7#ijW|KXy=Ye`J} zZyZPo8wrl9y4OJSY9^WzvG= zIO%cbPj}Kk@gLTj#S581>}BI1dhB}AuETv7GubLYFNfD;Ys>PUreJfDvdS?Rdl&{& zAlx6rtg8n9I9fD+J!uiw-?gS_fv!NEEOT(OWI^37bM>vbkX^S6 z@POt5DXiN8q^S=X2V_d!$9~9oAY zhjfbu)Vc0;KuJEPWSpEVA*q&lP-5#=fzsSZ2>=p`(d;1-2t>k2R(-35j|YeJGDhXTKagfv0}PjJI@cP1M++AEFg(Ko?k40PSsBHgQ|fXtDOv_nUCoJki)eT z{E)AJ?5`aI1l9t0ZGHlzqIQHIvIEGr+Mz%UJ|39!GnLkw{g8L87LAG4<^W3eF|7sD zKWky;yAfFjWKC@^Agz2n&jMLq+uaXY4CI;GPC!z9Jkx;8scr9vOb0TxHVsG{AI}J@ z#$p;*o8kwJ1k>1DiTMMh-w^DpOn8uj8)<*du9e}i}4Fl5J z#{+}ursUdSKO_kVZSe+)6Z=$ldxNwgne0^5JQ$c_iX_-)I{PY+Od-YCz8%B_C}Wjm zE^fhGt>L2jjl@j#8;GXz%v(gKkv3+A)0=OTw$jING<^q-&6(kqIq#5ZqDBjYJeAwu zC0bF`(B1Em9+FmhyzoTldDK>}S0VSi{+a*{M+E1LQ}`zI=*l0; z$gh%^TlxML@`)(s(!7t!T>S0*m`uc9*DQ0HG;j-s%bo#?K(xXMWBVePxKuFcW5cO$wyCZO;zF0^N=DrUdw8eJR z*d*F*J2AwKbQbStvcOD-89SwzS;a)?>AdYEDeba)6?m9@8U~4BYgG|~QxP zK*+JX)gVux3?Xd~-L)NCQq$>o+e!bpHclfV{5Ovfa`imI&Dc-)ge3L8tiA?301-CB z5h)fSi(n1R^%x)QgC5tr5YRKTeWP{(07ntSmA%$O;bN5gT=#i!KdVn!7W`(Sv=F= za#>Aq85`Zvu4tvL-A|7T1ad?AzW&-#oS^s_S2Zr(UZqu{iAmiF zie!t12qX}+3OI$}5JZRz1igD1&h#y!EIH3t-H&5$E4$w26~ z>?rbPs5(RMJAqhE;yQ)v3@+VXrW;~9Y9;%w4(BYIFwrGpD*Q3}D9CCU^^<+HNX6x0 zIU+pozuJ4j?X(Bre#~BB!QTUWDDL0$`(enU-B!Q0cftKDe&27eg!{6+8}57U`*FWy zPr!YrofZC!on>^J{Ttj*Kz#kS`l0<>+<&%5;r_n;Fz%3f#hu!Z;C{#+f&1&Q*nV66 z!v2xoa$8+*FN0^DUBJD}T+>i4tj<&ajdqm~lduVgcd4cd8p*kuF+uOZILB8`>35YRkL?QT_K|(07;??~ zNH0VhPz9?;KhkHb$TLxFd6k`~WrCkVN~AKwL+w?h7rE%5-M=7{ntkSAiUA=ICc{9) zLAl}=^r&OkSg4=rr(cjB;T>^YDdY|bIjWCTo_Er_UtoO{W)d>@lk{-2lgXe>v~~t9 z8_GrYV-VPc-0vs3v5}5_EaKLJd=?R>@y+g|w01w~A|9o&Uy>aBjsKFg>XmkjiB3Uh z7S^z^A<(UB)hRqxjro*1(~jVn+E~aPOzi_K;+;|l+Ue~tNe68Z z&JUeZq0cYn0K^L*BtPK*(TO6VbH5_LkT`o~pMxYsBqg>=^C6-a8ONNj$>KofsQaEQ zk;Iqj#GlCf8Yb9Ib=5>)ne;ORY>8^GTy~7$cORmUzmOFyfcqB`rD2Y!lW=g+c8Jgk z)OdlUROX){vc!m;FZj4jG6~m&u!tE~giJG!lNOcBFGE`1!caEeuoLxS>hOD|x}6Xk zJgN^@y1O;{PnigzVF&a)Y<3m}Z1>5-Z72v=+PL-lfBXFQqHv`pxXUTLRt=kc@bxR2F&fjyr7ZzIaud6`gVeIHs_oT&UkRnYNVBc zb6TVC9dJ(JoRh&RfpbzL?GEjO5o?z&e_T z0-nRLYRxLV&?V}dK$nO{pUY{vpdCl}Y#suliTUA58e-_@i=j8?>IJS35yLV(!UR_j zGcCA*&&@DbC!Z!^y#NJKsrmS*Xreq0DO8qHhO5*t{GP`M3!XTz&kmOxW!6CSt{A-m zv5FmfK%Uuv*Ioe7@0=PO%44;kgtS&5M~QwpI^)#i7#J(QQDX9~0g!C%9IT9Tun4VA z>byY`E$`X&1&~#Qyry8p>;^rNWhc;JMqkatt>qkR!Ew?TZVAGz;^<1CwLF}KhqL$|Fb}wt zvn&P6K3~8|2>7tYe#ZlP+pIU-P#$hB4>uR#-m|loHUOb!a%?8B?L5@O7TcMJnat^v zS@~D-Ky46cJO{@EE8&60@;tIA<9VPFoIV2dLLMdzVTN*SD6qvmOkQIcZj;@w#SY_P z{&Hya{dt)F2xFPV1NCVPblIWT_vAjK1W6t=nr>k01TI#=zd0J3XGh2zYO2Qa#`&Wo zMxPGeaOGLYpa*YbrpBxy9|ivb$H2SC1X!)aH-#73gXHx*-j;~Bc}JdnbDp5LA1y`( zpc03-+BnV_3&uMTmJU}oIOw52N!-Mj9eaGeokkok}vIKjgnBB8I z#Q)QXMg3{@bI?z#k2~4j?eT8J=?mIG$Qyyh}2}l`A%=It0}#NS%*N zT>u@@-aLj=d^?GC?|5``Oe9(kfV8MN=m{aUJ0>I{N;AAcn)4E{Vde>(=~GB<>kvh8 ziS31&AlaMEH*G~pM=C-(96_19Qvp_6_VN}MA`edD8~Du z_^mMt=wLx4e<`GuC0yx^Ot)r*l3MfJB%9;2IzeWq4=)@uVn(SM=Zoij zA9&JuMV0W1iUyrkR3vzr9v7pe&G&`Wp7(1dWM-0H2HA08=K&Rt^5VABFNefx12jFl(b z^Rlh>U9X$>g5^EV z(T{Vy(8%#ma4dGMGk;q44bNr=PJgD6{vzlzUB%`thyj+ukd5Y?FSaMwp%(+>I<_INE`{Cdq7Mve^?o12dBhvN)Tke9+0f~!&asx?!{|!i?@y39?7LIHJ3wd!>5frwkRy1^Zi zOtw`Zw_`jN9Qlu%pdujwTw+CE2~uXb1LZQ_SIR*TQl8*+s1@P8gVcOh8l<#yPfwza z{o?em+kqL}pYZthbN)p4Yvw)Z11yF<9Eo(VH}6D)XGj;0Xx%TGKS2{`NIFM67S}5C zztL7!>lvsAD9A-}kn)#nxw#a03CCkN^9|Q?=68X;$FUHO{q9<5-hk%HLW>+Z<$B8e zFK}(;T&jyves&d_Uj?>@W4Ac=jcW!TxP>*sX>hzSXB`?LW4^@6yM2v{%w^a~j%{;| z2j@S~&=~e3$2Pl016z!i#jryhd&@N(*aEaAhJDVl^{&aNvvn>(KX@0GI98g#ad>VH zZD%KuWF;Ds9nB}r^RW3a#f&{+K#MN6qxm@851UUCr^LHxwH+dfzq!r4`FPbX_Ei3I z(nJSI44?OZ8jzEK}g94MeIExyZ7l&@~8zf%>pixLT7>x!;?QCY9J7eb5 zXXh;%`s`E_ea1-!S&VKNmcuu8AGesn4v2+gjvt;EsdRNm%NigWz6cf!q@6oN4$hEj zV2uwv8aV`7Btmd5Nn3P6{RPrDOQ4OpQ)~ci87jlq>xh&0uCNM_Wb zHA2e$)jkCoP-nV&aOFr3i5E3-N>kfg^QB&~7oBW%Sg69IS2{vVg&k`!S#KSX28Auh zvDjiS$*c?uiaqoP%@|hd9mZiAP8+p6Qz^Ys(E*VMo4*l39;Z4d8<^EpZ7Um6CMo>Av{sF_F|$P%1pCsImy091t} zl`Dn}&|p<>JCQm=%X;M{B4vu&u6*ux@@i$AMuO?YbyhkwK$=7#PP#onN)P?TF5shI zSaJ#rtW*w=lF2?h)dWhJRQZSd zF;*#)`H;|E{>Y&;eR$ zR3u~Vf{U>+xC7mymG(z=MJ*@c(&I|Ol|~l?ODo&-!xymE+NHQngL5aRpja1rK%6ZP z2(Sa2kL`@>xnx`}O$d=D1{aJMQ!XH^OrH;t*0oz-*^+(M8heB6>6)#1|T9w}lYkcu_9t){Xo8t{pTzI811Z3I@56#iTobl{AEW}Y5 zc==t+1L$im(HqfHiaw=@ticIAZAy@=OMwl86iGIwh;nfX)Ue3M^U`Sh7%Az0ah;P7 zfonFnQvXL>U&<9c-GrJ?>C-V%-2aMkll&24to{EouoEF;a|${11MC*XU3l=J^_3Mq+i~1(Fe5 zt;vAxiHx>2FmRq>s5WM#)aYeM$KpGol^n3O7Wz#BH?@!nTpv56O$oBmJQ{}74*g}+ z8O!_n++T~?X1!gsJP>5#FfA@QmQ!6o1Sl`RHu)aC@21aCy= zDj4G{*$7#S=NoWg60}Z*p+xO#!cn3)l&BR-lvZqgy`p6vURa977Am*EzlZO{1j$g5RRc9%xI>}j zLFm3d*fCd&4wT7h!Enc zSSkB&5%SHRwSwR^ok0h;lkSO|X#Wf;uhV;&X^5sAy|!31GwJt~{J;CYjB5=}ri2Sb3Lu_p0m{|;G{+H~uu7_l_Tv9KClYLMy-BO{Z_EpKIz`Q`5 zl$(LMOEN5aNN`Vap>mPyv_DD8W218PIZw}@IeV7iv+BZ*bKb<^Q~&%jq=O$K8ko4i zT9;rrY@HXmlKYBXg2hn#BxCJkgPB~C3DZ~mhz7dq1^r>TScHN=Oi_(b_c~_mqA8@& zpUeIFM!)6}|7G499@0}l_ljxjmzQ8EpBDF&LM(5(MV_r8gd}^jwjN0BlRDYh3R3hu zv#WeO4Ds?T(rX%jCOtjn*G*FowY)7E047-~0|0K))l1J`5V z3h;#(WT$ibV4^&^F^&wJn&>0Ngbr&&lI-+QA1OXQ0^!EUV`alqmX_r5{)afJ(nreF z4RHnVdR>YAT#uUTqM3cAj9%@1sL0V&muUD74TXjLLv8K}gsN3<&Z}&s4SOXvaZn{MueNS_vJ)Dk2i=I>ci3oBKPjF}wbAbVBqK3G*uJ0CJt_sF`HVgpC%)PL z1RFinPfD8c6U;YxRI{yx90xn<1(+YiRU4Kv>?LsNn{gFxekzw#{G77EI6wG zuL|5ra!+K@t#0-N-~qF2xbaoT9Ttszk+%ZeYO0Tu zWzVfb+sYT&Qj(>UgN=KScEN)vbi>$IW%YHRnTI~s#G^k?WYWBvIi@6U-I71C}zL!s!;PxwVfWsC>(w;ZWw zlhdlpN7z-FkSo=QmSj`Hl5tDKG;Yv4p?F;LB>_rApxAn^@zaW}Iluz8<{KX*{TE7-1*C@HLSehd(v0xU2)H>Q zHmzWYOzvm?mn=14-Yj{2EK3h@mZb*#(JVy|3;ZKsU_-XLuzal<7mvXUIo9toHUU{M zu0gJWBWn$j2J)wxc5y1;VWp<*<<~n z0Lr43XI(H}fj7ixYe|IRW#c5K(KA4qL!(DYt;NSHdybOo#l%b;;p>b`!ihFq+}f=lAOZ9<9N-)Lzh%c9<3N7Wi`F6*5J!_;6U;G-fZDw zU#@WBwz`>$W2NXorgSPkk0y?lvLwhG(J^DC9^wf4>R72;R(HPL22FG8R%dTJuYo$R zTwQRPq@+Wym9mnntC}OEw0@@bbOAs7Kg0eJn|-V_xfxSs<&9n7>a3V5E2h#4>a6H9 zk4vpJ!OAKdeeZFppXDcYzmrW!v6Z<{Xw@%I`r#+F0vq}1rY5F-SQf^o$PxlM;dp!t zF^=w>qs%W%Cys3Nh3VE9=6Mf+7QV}P#2tNM+i=bo{K6*dIke0dIJGhG6a;RAz~kuB zaZ>YfL*Z=!??87X^g37sJ%-Li_@mugbk_s~BT6su!~*N$4mN9wm|hcO67>8+LSQVO z$~ZhV_B747vT(6g(W1fh_Bbgu>gT7R`4B2eTW5A2r$;sB52mT(rBu`s^fTsKqSi$;dN(7EhMdQvb$Gf8}ndr5>E)s9%^a969I<)4egwM{cq$3%P#Z)lf@moO8Qh z*c5LqmH7gOt)9`Kvjt`LeIm5(F2~8dXW8~x-xJvSQvh`7c_v65 zAzRvUB05tZ9WzmysK2Z(cgEuAuwaiX{Y8D*6$Q5)R;+@RD63X^(@m=Y@V+k+?7)%TM^fzO(X1@k>|NZ^JXw?cHaXX8uWi#YNL6 zNuxDCsRb^&YLYY*t}GWl0hja>^pqK%kn#Zi0i%ykNT$cw*Os6YjiGTc36uzp2rD$& zCvdSfD`BW$JdFRt$+%MCUm_Tnw-Hm8x5L#Dt9hBYvTzy2lt0-;#mQ212c7aN);}}w zdQL7S%4FwgXy|KeY6JH;XFJ@-IAMR`ptx-i&Su~D(Co=lT2?PiBj2}%>M}v^>g-Y~ zzD-~XD(p^}*cnJWxDvT56=TfeBuK*@WT6+>=?9agbK(~I{1mB+_!uppg6i%?PfwA0 zif_=!0;zSoVyx?DnwDc)dapZ4$=tgJt7bjT#g@%!U22&2U8xnbHYjZslr{8;0_pKC z-R0&WmtYRs4F8{`b*M?eKVxMp+Dw6OIIakRAfSc^G}4O&QvZPgFfHRvMY|W@kZ$Ob zT+S2(i#YTwCr z;cF1)DBh$uUDem1D&>o*QhM-gmyp_17L;e{t*K~Y&v4G@88FRQynu-%_HscO3h9*6 zAx}!p#U6C_lTxSPa43^u=py>zlae9W=4{8kQ|PfLr2)Ywo$=h;i#DAmwYBVbLenys z4K7GK=`Gh5C+%zT`OW-@`dVj zh`vUB%*O7w`F*FIxffd5-Qr;PLMOYw#B56%@q#H3i1JL_L_Jv} zCF7Q(&e)mmUi6o#QfzRdqpR6yDcs+MuAeD&l7?IJ=)sv%tEPRd-Q^@u#I(*eOx@G2 zJH?jxv%Ts1DN^%5_7DRE8b3?w!_?1=oh5aL?VDF;NsmjfyQArAv!vcJBF=cPo65A3 zV=;N0S5YVJUMTevx6uWK(s;22{i#qI!L?c9NPO~aX`DEg{$sZEu5{Sdk{&CRn$zxc zq_JEJ1C!8TB7|Uk2blOSy)#FmQWIATo)|qcSL*yIW8ge#J1c#~JZUidch8f!Rv6P$ zQolr2)od-L{VlS76Q*W$#m=cX z$&M{S`>y+TOY@6C(Doh#vm`;vZ+3e1DJfOU#D0Sm*t(3FFRf+={ok1{rLwfYnJ-O< z3{pOD@pp+n>p-FDggS$^e_HBR5TwM~q2c=?(VvHaDkMsUD_D-dj!U;Ux-?mFy5q~( z6KJK#T=`a0?oM%Jab;diEIvi~3Chg{Ir1Z>$P0?vfxK#uDASvMRGkhwxCmAG`_odS zc#qzBT56h|tn6!y^F6;fWxIczYyVH2dA>OJ@i;q(_bQhbNpm&9t06=4A}({~twqvY z>7k!aT_QC#MJQ>IgPLBRC`(Y!8exurj!3Kxl}F)IqY2E?Rk-Gwvayh)1qGkNpajSP zz>Qd&;actC?&YFiEs^5m=6F_D?BS=GM&X^^(u-cN%H*n+4;gVA0tSnh7C5z$|x_cQ~_=_~`AJW=j zPu&-FKh~YA3#IS>Loz@fWsp6mUSDB@-u7KWxowxwM0wBkVnrrw@%6HIufHaLEq^P2 zCtK?j2*OtwMVJ_=5VT5$J*{3>+okp<&^;X8qtjM2ftC+%*d%*={j0Uz>RzecSu5Ap zf@?dtUbk)+>ecD4kot>2b{ItqqT7M!MmWWKeci8hSLHK#LyH`Br}9FJtabW|lX>Ri zdv!-@U#ZpC=G5vds-Xq`&pN&4I8NnXuRF#L@aO&ncU|4-T5IhO=G7}Ng8DslT%E1^ z&TO2G?Hjm%ty_d)@9RA6;wDO>D@-0Ho8@e|kDMjbFPBT&M;q_ig7aaAeYBCDO~~ukJnc#YLLO7ItsCI~ zD9;Q(fxnmapLJ!(+xohI4DrGy^Wl{**1d1mtU9K4v#zXrC(WD-XQp*|-A40jxY}8t z!x6E=aHU!o*1ciYyzn&6hvmL7k1lv#YHmJ;;a4NCH5aefRvlBnv5l!)ZPu)2m8%zi zR!_Shs}nOi*I3NOFYBs)Rv&X`$jjjt(-LZyVWycTh)|FCvpT>{PdyKFn#a@xTe$ob zIGD=Hxjv2naJ0gQ%q-|6OB0&XW-FvY;$L*y3TdENO}8=M4tj_AUZOoL@XeqWi`0Ig z|0$)+e6RM|mFSGj^1}PpXdT9{YEfT`uMTz@qBfhwMY)T*)Uub(yFlJWu`}o$ipyd@W9hH~2bmTC6qv*OUy}P7*N#?p>1s1$s1&czP zt&|er?dMqz@9(s)*W2DR7vAG^3cMCYP4Y~D_kg=g-p~b5f3Y-gY3ASJQ`9D&JaFuA zr{}%m<4Aji!|u-Vm9!=D`MID$Nl8u1QiJlHtDTRM07|9ML{359isSA8dEm?kTlA}8 zAwpKy+M2R+`d|^$!fW>4Hx6%de(2q6!kX-$3*Lp4R1dy&QQHIyHi2B}GiwHHU9+Ld zuumG+q>5pNkR5oNJ%9G1w6?(6gRNjwX*Cs=DV1T1l{r(;GNop{Rw}DGn04R&{-5uC53-qN zel!2y%rAS~bI*Ry@;%@4U8SwOdaJx#KB`Lm*j733{G;l(kgl{W3|JyMt1>JL0+5^w zn1@*_tVdNJTq1r9tVU`-)@587Vf5DF*AQWRfkzm>gwx#NBO>|mZSrPzRJ|2svTd>@ zZsbD|#wAZh7#DpLVZ1mw@<7)%;G#(Xz{xYOlatOvb8t?H1G4=Z{K~AAR@Nlc%Rw~T z*wu0LGhO4BuXNHUKj{9Z9=`HA`5IJH=j7jAC+B7!RWEh^eXmDryO#V^@xYBhS~|Ait=4h8Jv?FJ%WYy$2e%%V|26FKizE#133h^C2A1 zKinbj$!*?mlwQOy_@CqaP@rTQ;%xYJJY$r8c!ocGqkOl{#Y=CJ=d)NLdHMY}$>UHB zjLUp{le|0Wji=#f4ZoghRv^6nX@1wu^6$)X@EUGx*Nc(P`@UyUhrVMs>9G(gT=|_T zDi&UH4ve}*UZIOkLt73MY{GBe)BK5B<=-*5uyXUl+vMkrIDBDVdbXRNxlLZCe`DW) zOB&@r$hy0E;C6X(ZmD#?7{`?z!n5&WRjx|t*{ z^B;KUZuwSy(qOo=q>L-N?)yGlON z?>pdrP%hT7*P(@WVAMm9eu2M{CjWso4?{jC?BRQi(u8~X!+Yd2`tO?f-FxL{boG4p zqjIgjx#_@jkIGARsnOy^Pw98@Q9JN0pP|#SS~q;^@A!F-%R9n8;zr5M`D>5MBUm5E zb94XWa$4*QST`G>r9|te?t5rJ%KNaSj{i~KnQ$f0qa6_X8f!Iy1^t>@AK+I%A*an+ z8Yr_)$9omX!LPxiNbv0#>`p>m%WRqcy84Jy{*a9R>8#-n$(%DC{!Ed-#s9jx#c3j| z?)i}?Bf;K&P0e*3_~Hq7 z9q)ak!+`@|h+y@kh}%5t7VfrHWHdwHW6Ru$j@21Q)H{8WZQa6>1&Sr9gUYau9CKz% z1#*Ak{B`NNUzN^A3xzOxy7zRrel)24$&eFDI}ee~-NSU#tz&Q*7${0%fT%K)DuZ4I ztiV-D71sV@m5*?93O(Sbf?NIk<^%GAQT^fnf>ielQSxo)RtTfWaF|}f}z3Lpbh>7H}@3rM>tTV9GPOV4=zQ_!Q3mHPyJAG z6U;%}r0k}g^Q>Ml{i%j|@N20$)3N+0XMaILzH!jilge)3^7C^4{Ez4s)V>Eu@1CkS zA|YuRQ{bz_g3o>go(3X!Q_*B#|9sZ-@`mgb@ujC~Nf@duv4V4MT(WYaQ&AkXC6j;p zh*Xl3#8O-rpO>>S9M^k!>$MCQ^^9d*LAq{i24fNYw@mF!a4?TO5Gg^GKp7>2KR07rlioD!B?v-)wet`j$beC zJ8&w#0CA`kh@kU?L-L^6{b5fr57Uwf1NSub6#9L@Y+Va_dLgYWH?20B@E813GD^E8 zc?{AhroTAp>eMc0esh*Khf9`UrB8W{+8A% z*6mYFhon|rHEHHEWq^1B)0WYi4+wBX9pKf($y&Em1vN2=`mq4z%JFN^>LDY>+dxHX zno@UYtuRQQF4SV3f%IZKWvW&1cT1?5UfHUh1S}N;75T>{p;isEx9z59PA7=5({zHrLDP(uXS1~ z&~H>E*{GsCs~%t0NDZ}a!T1C_qQx(-)Gfkq$PyqO zOV+MgQ!t@+&6=9}MHE)Xk5^`0IAaFkBcQ64)ALIJXAW zHrtw}{MfY?0)C=P6Vt(zBwI58pA8b_4t{S*Yw&BghQ9V;&2_QV{-tdUYN0RA^K^Cn z^0D^+%dhSCtIpbN=&Zdx5p#2YeZQ7$%uPk8x8K=bfON<9Iucp=3f%dj&_oNfUZio8 zCDAXi*iOeI^k{vBRw!R9UxR@{9A;R8Ro*`5>;C7Dv;U{&l2{Fm)_%V^Arbh*?e%?H zQt^qOz@`HItEv9V)_;1L9Ym%=eBV3XFL6uyWnTX0p8qF0UbEk>3AAfE?#Wn)QhpA$ z3$)p7PnCruWO{I+IjtoV{k}HTZ`xEKoDu$70tHBDa3LJgA>1?*c33@{N%rZX%YB};|akQuC;n`<@3hjbLJsq~A$6w!w9^dq@_V_>B zVS5iO4stE}W1v$z-g8DboV#Emv46Yj6I;@-VB}EG$KpytPQyot@5rtF76QYh+VIbZ z`|mn$|BoCbLEw`Jvdyngf*5rCw)*6je$5{BkpO*?)c%!?h~b6SVPXsvXzU|fzpPSV zns|sl7iiZrypM#2*Lu$I&i=W5ow1~6fd9>{r*+u=zro?^_7mTFn9xHOc@@w%A2w7$ z2uV4D3mgd!4iWjZY!xR)ls+&~!-0C2xE+fp9CNW2YdjfK@gW>u)4wlm7F4{%_3b}D zKL6(Q{AZ`&ZzHDmzsF2T{*4YL2_o#&l^$Fm?!oQmR1K6|AL?WeE)ao~ENzQ!?oCmE zxI?-?JIsPB>Nlsy{tr;>{{|iqLb-80YtlY%AU@Ad-*-^MbrK(30V+)vCLy`^D}uOA z3{rAh(vcF`o6=lc(mD}mKo(@AQw}%V98(DNCbbq?vmr4dDeAwrgY3PRivPwJ(}Ih^ zL?(88)q5Wzv@ZNXrRBHa09 zm0ee^RMCoegvDqGNQ_4J8zNdfVZe%t#AAK~p2J0)m*F`S?t$wLjepT#G#oYmmReK|I%)PbKdlu_kBXHmH=I$Syw~%%P(ycLBJ;x z%m}cRzUmoO`~NAysppcj0aUXpqP(rhASz|>F4N&u4lCB+ITpOl@ISmL=j-9Mx8p@Q z4USWH`H12Z%M$kp59-Y5ssR`wMO1I9-U-9{aS z9~}@NhaOV9va->cFO_A6XBi=0xZV3pmR$jUb36Er9yQ9#pKX^dEEjYm{)5|)V$T)p zJqp+hAK{Xd3u=pE%>k<+xAs-%45;qrh_76dqEstZgNXM^X2n{)nu$mK6#5jQhy2S| zzvo=gpwxyFe%fW&rU_}_Ch_QuecQ?^3Rhk)_&qmH?5$4qQMoW{no`&9>oXh^{4zO0c^Q+9q4{9a0XAghGs}*p?^?1AM{; zLniwVh+#C;Z6}M%#6rx{0yLt$k#dtHo z>I9{K=qn7Rf2F1W&=tIvDsY)h1W(Fa0~Rz~%jKtcQi*n0f~d_XMChmC&UtM|x`~a{ z4|aIcwPs$?syWs*NGq&}ET_f#YL^Z&1H@KJbMnKl$n`@8f-zhN?7=yaHZXOTxMerM zoy=3cUp&Zx`!T+FnV(m^Di?uG2@B%I*Bcc6?5kK_sWcRhS7l{HhIrir=Gg!p*k&2x zB@Y-B`btwdmPf3|(rQLW%CXow{melOj&gMNA|D@dL{{uqXkyYmCAp`lx0anAj24)B zRLjS1ODjka8E?qbYJ5;wGBg^Rtc!Jz8URGiFlA}cfNFztaw{_@;B(A?V>-n7 zRXg<5U^?BEr{!3Sw}EhUS7kHo+P-+Wwd71hLT9F8mBpuiqNy`c3)slSUViKiIjh2_ zKI3DMpU}{AO}Q~wR07nQfH9GHeRNCJ$|PY1S5sLj)k=+3tEBD}oiv~bRhh|Ay0vOm zL#=e$5U*Gxgaw|4j>_Y7?1=goKfn4-D5o4zTmAgCVCZH)Hyx92MBHSE$sUs@Og^Gc zfcNDFSVHfyhJHkS45||iuzPNVj$KK{;eD_kR%f*6PQlDVoz#BhD>A1|L>-bcdK^-& zbpMiL&=R#{a}kEAFZZClyL^X^H1`8B;NBIiGSjTKg&LJC*H@y-jZ_- zRAK=i_Lh7eB0q+SkGJG(cm&(|mOOyHtiI{z2j7B}v4h9IE%(tC@|?Hj3x>tPB#TZn zcp<|yi*yG~>pSXGZjwZ=+kgF2v~~Jo6X=8+6a$^$eDB+Gzqzmlpba}rgg8wYena_j zbu%=Ij;ohzf7g3y3P>}6v;au*pQebx%8CxU)%t9m;#HS>p+!*@H1q6Lt6-|9Lrybj zW>om-4*6nO@ZQ-WUywnTGD^zgG~H9f>B-V~X!0Cp7V8Q1FYdcKb*wDWcyS`*dQBE6fpm-;qJ@%dl9Q>p|UaP}bKS zlD13P0?w6i*UN!|0S4wBc+BSdcjQ6iJJn1;mQJ-T03m3c^iGWoA!SE9n2@EEwpzF! z_&{y)Hiy3yD>c1QV!3c>#xrHu6c~q(cL+(xMWv(7N>?R~e-@xb@GNSYM<$KQQdo{1HZ^&Z5`3i*Y>$By^p=~x}_zbD_M znMI+TlX&g>azFiI58wViV|QjV#gyHBc{eP61#1YUzF zXj%?1cj9|heaZKZ8sR*n-r#|09k&FlZj#dQqiH+HN9vOSNf`W420(n5OA=$fud20f zgSf(fTpf(}bf+Z#j5ME9PcG~0=yy_$@k-(?x0E7^P-Pe}nRshO=DYAH43pm2OR0R_ z2lDwdI$`K5sXQ5q07l4A*18j+qQ4m~z%I|~(|k;I1CFJ^bM5vj$sCK6#qd_ukQI%T z?_mWe0x?IB_xda&V!m*5?+0>zeX&V4Va2 z`Mws?A=KewNIB)=t3H%3Gj*yFeiJOp==U1SJ5|}wPkbm_BHw_ZY`Ah%y~N3*j{{|a z!8gsx7OnJbta#J@*VRuT3v@e7=@_lAt4ly{&?&F0i}2Lrc`2SUo)_cE@Vo#|1D><- z48wCep5b_cDxGD-b0VG*c%C0HWJTgR7SAX=&qI8)^7=4!I07+<7z*kTEd7|}sgZL_ zu}Mr8=Sf;OX92Lp{yU$Vk)_}BvYO-N4s=_mW|dEru`Eo73bE5^w@>1?d?cT*kAU-$kK~lxUG9=I zpOxyAk6`SC)^U7!ytazoRj&%9wB7+zKgZMsn6Oi_()W-vrL`@KA;ya3hrLoE&G~|t zo{~on{EK?hpVB&8TSAJ{0E5@VQT!q;b4oCCioX0Ke%~p1=&Zk}S3@Xl+L=8S*On!8 ze520CE|D5Z3@Rc^*NFbqkxee7&%uPEs?`BV^g_wu@Q;TpjO5zD_6=0Tq4}fvaN}to z%X9U`ZeI7XJa6)H&@|%8p^CHIXpNb=eF-ROFiJEQ!#vJMfAf6wej!35eDoLUI)|hR zUCG=;UG|3@*k6@s9W<&2OsD z`uRMEyec+Ei+eJD65=-d`8yPc>l^aDAD@f3aj?wysk|!Zb}h~mAC9;HNS86dtE6J7 zWG?pdJp2~mSH(|#Di0oMLvR&-b@)kp@f)Elxfu3FC<6G_mZO+SxozXR!_T*s~0%GQFWMdx+XMe3PSzCJbP93 zdHAf)C0XEJ6tRTsT zzotWzs3Z85^I>1eeUp!=-}ru6j5=*G5|~~1g**`l#0x(DhcD!!_!DX+jEX_;Wm6R} zQNQ{Q@A^W%FrF$a4^=o7&q6-)ODMcL4qW%8{Hb35g!_Q)Yk7q}YLly2gY>!*!Pk8) zUz}jtA5iCeUs1X93s^t#sV+aao|ebhX%FC=XFu@NR_jgHL{OeB_sz(P-t&?=#gma` zz;mK!_Vl=8w|pHZ9qbN^W2Z{a^o^f^QDCmTri!-tkRA4`Z@OlG8&&cqoC5aO%(lQK z!MePr?PXz|!Sv@`NP9}aa%1rQHP@u_Ys;cKCMkFrJ0{|nL@DfYakx`|XLnZIF;(R)6CslDhs{_Gsl7L#~TVCy6@g3~KC9oFEN z#4Ep-pYD4Up0VcvdAP#YM;jo@G@qybAg>)N;X7D^%mKxB>USCdJHvL8tC6wV-q2-D zZa#{G^_Th%{2=eoKC0#i=0GBm>ip45e;r;b)CV0drA;L1O1R@&c`o4Qmw%Nv>N}i# zfsj+o>Oc&;SO2%=;2_QOxDnm6Moh;ZCeo0;A>>tXv68ZXR z`Gz<%ew8l``KCKlL-{U7zGN+5nltHF`4W-uJZB%uXGg;mkuhG&7>1j35Pp1(RSj{c zY-tyM*-)`=lG#B@&Nl`^&xz1sdYFi+Z?D$Edux;8LY?r!^(B3gFs0*jN@Tw z`SoQfomHt%VFD80sZPyD?j2gWJcJgaoF!E5Hvhoha+OdY`*k@pa94O@7G&!WFY--3er$jY6WRza?l`|t)`A%?C;ZCE;XPD184xhcO3rdg!TE28ROkQ z%E_@l&G4Q&>}f35<6fS0R<;iPN!#AhrS~K5N$t}Fi&$$){FSaN1`=~kp) z;dME#DL;IZ&a$%e>hf#wnMUg|^+v5b6HBi|j%6^pe^#E9zfJ4T#iccf8}D6$?yLxP zrwZM9MuR$wN-sm|5Zv5;l9hRon?)B_md-(3GWxMY>&GSN$4vCY0pZ{~(2vVYry)Ju zyTdUV{m@%(?39EFkUln0Rz5M*pCqk6+e%B2^Nfdo@soT>KGSyioz=OBd(krh{WYP+wm_%Xera8&>%oQe!>*aaA@KzNu!RKeNw1 zSp7%D{^WjDT}}>i%AQ59_MlfUI)k$~pz{RW){&`|4M@GmeRKH^zV;_Mb-@)# zdP-Yv7glaW(zWha;1`N|a}9d47QKO9jpg=^*=HZGUXAn(?zbH_Z7z3UE{`JjRWQ$6 z6Pn9yS|3+eE=JBpZXW5vT&~l)_4~?l#0_>^(XDx*ZcRknyS34~yRsCiuxixkk~8gZ zs>8G%JzO~wu?BZp`GnA17NW!eE$xq$Ly)Gr#+9Fkv;@p^9@6@1Y0p#+MA|p5;pK%$ zOF^0$Y2jMh^OXwHPP&Gc=OGQ>Syx__j#Q_%#$T>XZ9ZD1{>f!2H*3k;klY8!-)PB4 zE8|i4kjtzsu7Z(o2QR2*OA+f5|NmW-j%welFZ{;RKiZK0#rL&_bdWkzBM<849iKLaR{E`U=X2 zpnpc|pVWt(gE2|_u^nfhZCRIxwnn=6WgdAF`!lR7@P|Ee=ICQEdrj$2uZu>y8|Jb| zaX|+~2HFIXn6%kvpIt|r;5#Rg1T^;q8*nty&2p$AI)OI8FfZ(i9DxUHeu-BerO)&7 z-+Sef=rY_#pMhKJqv}Q{|JW-hmAsBSYkO8KVwO6ktSH{D%5TK!KJWLA>bBxNY;U za(t?-4Y`^j$02aYLr@?D2J+VaZL0_U!B$hNsny$mv(<;SRtHp5t6P7w)jPFT3$#|( z^|acvKnBBD`43*M1mwab8WoL1m9IM~wfnoE7N|Z0J9zb)`%}O>d=7G#R5o$VmEi~B42kBULbON}}4OZ#yVc;0^OLQ!k#fu36eyxs;V+kU| z#b4F2d!thYOsP5MSyM&1o3GNdIeO;fhxKd{Gl^MFZj{*&yw5DHz>8`^}BQA=I#8?xItRtv6yZ1-_>fp7AeO-tsL7$?dd zgHV+$7HExJ;(Orxg7jy8D2?j=!Q_@Z25V`vTwH;o9=I}3x_F|2jly7D9N@DItZ7ud zFgSHtCDwQWl2|*~Qn%G#+M4#w=;E;vttJ z>?Pq-w?o^N#2{Js^-`?38=xqR<(3tS67Sb-Rkl54tdl6^vKZp*3*MLlHIrAMzC>|J z;zie1t90jdXg?W18cz@rF#A9}rX=x*i@z4eE&`+P4893)F3eMHwA4xx$E;)#}Lg*#6Lh-gPWVtMQ zS~U29siNI!Ca++_NN=gg9So(4_d%;CZWQJ4cnTq-CS52&m&W*En+VYDoCwlp>ku^B zuCDUg+S*}sLb8Q#GHX(!?doE%;bK~cC>BuL3Bl~a=ZP_yA}$Y9mr>OdoV?h`%yyfG zg!=b~YvA94I{QO)#%!$xE`40}po>HhZ&!!=NcOoH_n_o}U*pfgn-ljb8=cm!zT_=$ z8vsj43|SJy`(7EJ7bltnJU@aJgH3$Do7*B-CRC=}0e)iy%Z|)7Zeay_;{3VvmD}Ix?D#hOzr2V4*?waMNWPS4@I>Su^hZ2`yjS z;>7_EzcrfKbVja5vpkf^iebYOV?>qP2qE-6ReRvI%3{qD_xQOjh7}jaz-WXCDM!KO zw`V*BSvm3Hh}vjJGxVFXK%9tycBF#z<|+lHmcv3)44Z2=iOm5E(q8phYD+R;+-0`> zZZSrFFBF`is!_X5s;b>86R;!)qc>->ma_#p=Q*2^v$^`~V4aJC zb=tL@U)RbyrB<&iwtl)Ip#VVCvH0s+rP{LM+~!vVD_yZoa%h!SqtYSpP9MuM02(u$ zT*R`Z;sg=zRF>Z991QBH%~rUixb`pve&tieSTgkx=LoKPaOt37m9-)c#zPdO{NUsh z;#g8-y!aLp0b#=9o6z>nP$!&^C1w^E zqTb_9rmVB+noQzpAAc*3U7leQe}zdxrLJm4k;T~g-Z#bp&9z$~8EPU^R8=Nc$YR7z zUVev(CA>PL*cmS|ObP$k#Kzd)oF8d)Vn-6= zDHE-m#N!@9rifW7-DMIB;YxvyBx2_$LZ#)D)6zhET9Y{A-U9I`3VrY1s=0(F5rUe) z1=x$UF8>V2nkF&c-Hcm{Qdg?wyaL*K&f5sG5DKWQv<|Qpu9%o9ne(v+O;}ywkc)}V zvRI=;ttZ&bD0uvgXSpU5ynKZrm2~$E;4*R%&*~B(^ntUhSTmGLI+`Yt<>ng_SfQmK zkomq?Ulgko(E)lIL@Shnq(;3p9c?^l!_c|-pAvuoWQi{9;H=s#@ws-a7kuN#DXf2# zPGOU%gxawV%E5FJ$BTA1v{7~Xy9>p=@X!^5!5WO=qLh8TDYrpIDb8A*xv?AedQar; zrjjOc3D^tzriS#kQg$M1HmrhN6T!(O)%6Qn3U+y?Ja?H-}Qhl)0Q`+79t-dTp zzc2XAc&In$p5C0nx|`fQBZ-;y*SmR161zl!RYLcDWa!JHhe3~95Q0F`N)wz^7@CNo z!Aow{Wkklou{e}D#r-bsNMea;L&aZw6|G@=iy`>e>9e$kJsP=}BrSE&t4(G}z&t9v z+>*>Lv&V^%I9TE2546z8Mk9xl66~fZ0SYIs4f;J%0CT_)(Bc^9Rlt1$>c8WHa5l-eg+uQFeQ7{59mrUVJZZg)mD z#rG4_e0jErm6gt1Q`L{3R9bA($`XVln&QQHA2+A4qNt(JT7?QJRB2!2i&9vno_qPe z6gV4qiglmExDZ=F^+=PTa zOd`x1l98BZ1~`#+eWRv;^B=@dN`Rjvi`)JDi&SP|VPb%jo6^`AgqV}hN@Lj>{Y3%x z8ZB*OCxI_R#~@H%sh?Q^erpNfKW}h%0g`iT0FwBX*PA4C(6UIeS9KorY;)TKZjJ1AO_rFyo>{%a_ni zt_Kw&%s9G*7K7PGxD(ZN#v9pN7xaM4M$}*uSNgSD?PwqZS7htd8IuR0qD6~p*DS5s zB)u>&)<~80bnPB5$!8=B?hSS(S-c(!rHEU5JNQK?lq?QzCMS>d9~?LGXsqnNb1(7m}G8R~1>lscL2`4NwV6R*m-#f<ig_-s@6RsboBFdVJy5O_{aG5M zD}L(FCPv)g3(_)I@lu7&WaYA0%?t zk*Te=Ke@6T$}~k=@(@0PM?e=Vk} zP#nXtJj{+Nl0~zNIxxfgN^%&qAt+`VJklKc+Q03kePPC$O|Wgerh1iPTf2587SYn& z;6+31zX!vs+e?Vjcwhk1fJ=AlcJ0WZ0kfiV8R!IcaG*!GYbs(>#6DM;#nf43y+He% z0NknBgGpGg=s#so6^8@yj$mw@xE=-|NF=ow-TU5a(MDwqq&CwbTcUrI?ixwrJa1uJ zNvPpC@kgKNB4|wjWTfi?fVM**W*u%FizdVF&Ju^6QIC#6I7>Y5M4a7fMC8NHafpgQ zsKq%RAp=5>J6CCiJF!TpKse%l@7$=xz3$)MdY{vxoTpWE1Egp3lu=rE3&Mkxky?0_ zbB&h!DSvtE2*k*!VT*G(LJXm+og0uk<`8U|SWwwurBEw0$2mhQbQhW(x|>F1sJOtj zOpCi2aRs5csV=@JhaJZH$p$8niea|^fBikYRHS0C=@!@Q46`J32H%o#!azI`7)6rU z0q{>oxRXg@Pf62E(*<(@GY00d0;#kdj(ZB*5_k8cJmmcba+swk=T|>>72(E5d6oTq?d4mSHrFm*Th30q4hCx7Nn4GfL*z|vY5#mO)qF%Xx@IM{mAWzqDk^q4TAfb+Qb zk{kg{6=_R52i=0ZQCwv;kc+%7^-7SXdfrk*jx!u)L#gbWunQin?FYzcnE>(#RSMUx zreR`-6BHK=M=^#Y3glzsN0ME8O%`cn95q|YA+sJ5Mvv|VF6_WCyitKTu?=khJ}7<^ zZzfUYG*~UONTM=L+>Vcy+HR|5T}Woqd&T>V-o z=DI)z&VU-7jtU*q?(!7Lcj zq5H#-o-E#gw2pSMmT13Xe{ybN{q24n$vyM83ML7AR>?BlF;-|rlOR4+(w5vi%ey>1 z>*1)jo<@69@%=P?!Oqd_AH(F*I!J}*$1&PENEY9~Nmn+M;&eLdPL+q2L6R(_058sC zN^UZo8ZzsMR!D4hgafChrFyZ4p2=doN2fhMcJtrmv0SW=&)~3@=6oJbb(-^VO=b~` z+p9->oOlN%2}YSvlAd;L=7T75t%efUka(*$k%YGl18IRUlju$wMT$8EvZ>)z@GS{s zh(3-NK`z4K?vVPK-%U=$tnWa^I59r31@?)8Ld`%DT)bouON5PDg7(ySD#V)sMKx$M z05T1Aka)u~);jE0Hv_;ivy6Oxbv?=i7pfmu?daVUjuS7sDK$x)MO-*878Li4TZZT* zrAv3Fiuo`fNu+Ri!&8=RT(bmLDfqjC*vzrp;pVH3P!g@sLQe>LyToF3t2I~;L`mvN zo%O5Khxw(0*?DrhXySJcW-Ae>=CCTWT9?e%<+D_lBNn*%tuQmg(y+hyqxo!;{t-XV zE@1h(`Mk1#r5ELjY>%;3r?kO4r37Z7p?idsF8nUsd5lCu@~c<6EK8ytI_2v+3k08I zJpBFwmJ6eoM+(?bw78tB1#G$8Pn^fAhiGjsg)!@VzS#RXPj%M|l{{QjXVGc#RmL)x8f3gM3{(#3ISl$mvB z>y#B~ViE+(hO#ke`C^`2$hPTEd-=VE=#hiJQpiTaLYc|Wy@jA2#flSdo;gel{ocz< zhOrF7Yuv?f@la^pZHt9ZmLkU;-|N$#0#UONX)j zCN$Yl&uTXa8JJ#=MU-djO;Az!QT<(j6aa^SawXXctD0?LRfPZjb3L-vHLHWRP$UX1 zT2^0EGe$vBsjFXGS5vL5QKHK)ic{uOu_L zWn!!jTXVOf0}f}67Ina*P4@lGicv7Xv5n3cBUDKw#jRbDgCtQSG(wL2sLyIPmwj6b zyQwq%MzPl~wdOd!-e(k6yzRzYro$*!`CCxac*N{N4CovXjWvos{^ASkGMmfv9Y%8d zjF>aNstj1MEfXh=VvRpSbBDCWC~A4jaMrJ%QOx&C*|Eqs+W*=)?S`S=#r))OmOj}i ze)7S9D;g*y%9fb|EQBkF#7ACUPJxD3xpplYI^ z=M$vVOWE=K$5AZHzQwgPBQpQ=N!oQO50PiBz@jkdJ0ydA9~t?swZkf9N0RV3PN9ai`W9U<^%7M2tGvJ2L))UsGb`rKNBeM) z038O5L$o%3RoZ|>Oq=5zCS{0H08Sb(!?ZHI2g7=8FpV1td8g4L-2wuuQu~E%IMFao zH=57WrZF2+zz-LL>y`m$sr>6=R;=IS<>t{q8*^p7)eJV7BuYKRo`8xD{z~nnbO!Xf z{n7v7i23y_tf|>hyG+UIwFvgxb{Edk%k5Et2mKjJX>lOR@5Kj9!UrtG2V@p4YgvIc zbaP1QbqeAyMtuLGH7!dK-w=wQjQC2dx$^pzEtesFgBA~D+7XuQl}0?P=;Z=#mVm-&5U*%QtZ+#&TwhZrdz=4`5J#Cq?m4ItaVsyEjD8bjQb_T zmuxSK?XYZb*f;yq zOX#%1X_oGEscy11g~!3fkpPPz(OOcj-$Zv;co}nk&?V)X9bu=f(zxErQclu)Pet*a zc+-stRuZZsymM%ISX~kBqEyR5=QCY(8L#b&9CG617>%$9of_Ap*zCYRt0v+s%GHmy z!sjGq4)@*v-<|A`xtn$8ERfo|>ZMC3*Z&gpq9Mk}U|yS6bWjThw+aow4C@^Qg6*`v ze=rxfOvH3w}0lEyz6!_L#MhqLCfEX{5R7VnOh4ftq6wjnX- zbsqY60nIOannJZpH!U3U+n^-`SwdUD{x2BC^Un_Yl#J-kjU=F~$El}-c4FoE;GfTs{af@3A(W9Pt1027vx{^V7EQa_^#Bx=s|nQ znU{)cTUKGX2$sW8o(M1kH}#=mtpkpxYa}4EIs{lKH3*asJIT8$y)O&p)>+~@=$)3L zbdBCZQ)0!G{JCgR%LOzgS{u41sck|VQ8*<#WC`?*v2FUMhtV%9Htbkr|FmeKb~-K7 zvQve#dS^NQn<4CgiM|0gp)|Pzqj$Cnr6MGez`ZR%ntBcY*3T#rr7hp0xj{ywtD1yHw zWnHY2K}-^G2}WYQWQgaz4{10+js~I&H4tqMfoR!7o$Nog)LB?T$V%{B#T2&dn+m!l z`~PsK_%$5eu(_^AS$jELqpezd#lLYl(PI8(f#QJbJ#_3nN8#FfCA2cn-G{X0)~r?P zs+X*+*`Tc3ShKNaJ#H~*y=G|^I#BS97ibx2IPbEa`X>4@TA0CU9ENedxNJ||9SPh;OnxO>wK<+-ICUDK2Q zCva?u-Bze9(?}vm0xO7cUxIt~(7j5R6+TVr2iPp%@^y|R?<|7tXX2XW1V|lKl3qpLy8Uo^ zwv=Bto?WUR>EWM^XRGXlNjIH?NjoP7Igw3(pm+9;DM8M?3B@fX7}N7Kds3IR7DAu_ zcLcy0XehK5hTx10H{U@8_d$^DC`1n~fUzejUw5Kv-;Z5-4a$!G1y~qE(Be9NU;-<( z6PTTf$ss_S=prTYPifnM_VMrFbs9!dFu`^O&WZX(t7yS8)*^j0+u^t>rR^?Y_$3*R^)0&B#EAf zdR_qo8lmbLIy-wB=}*WdyY|jAqa5_$!=Nd}f~=k{UdGp$ z9UJ&3B`n>3?g}G|v%BgOS~9W19@4H5blg5#+el`jZonNB#sdH08qg-3@Oto0YBp#l zXa9Z;tlo&-wzx(ar7QzHLuR{{d(qmB8|pT0Ab|DTi{dxd1fktQj58V=V?HdGB%#~W zv~I6gu5}KPHe?M|bQh+TS5>E#H&-jxNbx0zi-dLuKjK0dy|ph`bww@Efn~ituU&?| zYd!x3x%rnnwQypX5k`14NI?yb#SJ?QQUN5nV8%ECtipgry7L6=zevzN7)nw-ZtwtfgrHk77f2&?|s8`+snpx z0QETUAR5Z5O@-GUfCFnaLJq&9mCERG!~!*O6oSa(0GU@eKmr#7*}dv~a7bWc0k8Bn z2iV9|gkr$`Cn97t_=X@y^1%=yqbk#3VIA~?hTwY^-p9IlQ5hRl5-lF_(5bu;MqLa+Z1*uQeDCzc-;g7=oJFr)BR+0q40P&og-&@8~`W%C$b~4Wr1C~cb zivq^}3jTT-TL%H<(G%I^@C-LiVK%>RB0CRphbFSwc*IO%m*P=7iJgzf-btV!NFXrBS8FQsm2hS8w_^?F`ifVgNaPRbsy#a!U#S5Ah&QIuGTE|SC! z0m3=(Jhv3;++=f-?5vMyv()<3(TF8M5(_TB#TxCNKH2S3tSbE3m{6L5VW8R5137$h zn?km^QLZ1zNiis=KufAv8yG70v5SN;fZ+k7lRygNDKbi(xT@o95VmHQ!XK%MDw5+M&@VK$9;j5Qo1ULZaT@FpvJA=aZB z1CHuXYr~to>J<1)pTf%Y!(9B~DNNBrQu&Q35MuDE_j~z>a!9Uv)h+PxSB^_Bj4%fH z!E!c34_oPBQ(0#DbSF8#t=jm)SFbvir;JSpzoJ=>h16LV`jaV2eKh;wkReq-JiZk$ zFIH^!(j2b>Q{y`4`MBIA3#XH>n#wBB(uW>?cq&sCW`ny2&Zt=7-DZ^v=64RWN=+Ws z>)(Q>)IEX)sq(~ftqVk%6?}6FEUpc~RGSn>{e0Y)lB7)WqL)nHNllrsQLlh|%(@k5 zjlaRiPh&Z-pm7Tn^qz7?HY7RDcR;nyS=bl>0VmAGt~ctWrfe}AT`;sp!md8C0H}#U zfjuDG5$gUGFwlN&x;;MiS>R5G+9K|qZ-qjsBiL|#Z^M^*sYAg!XSPXA17O?-q(z4m z0h=$nJ^e(bhkrW_QcE87X)n*5&WdyuymC6*nE4`!REi9c!WVX|Ze<0=PQUsrw2fu7 zndakPOlRZp4Tn8ZyL9+i-7dH}@F+^ut~ctVcIlfU#HA2}lgt#(6!&PkP*)a)0t2td z7m^f9Zil`}S_ur%Jk=_rGq*st=F2w8(dak@{}HJ$x?-^I?bb>9UB+sY;~F?OO2Aoa zk|3I#1N~$EzzlX?b~tXYO0`lewdr%Df{QzY&C8IlqpoF05yIr=?irwJz$*a6d}gv4 z*&Zk>OO5a>o)d$imrl=9l*Q&1`d#IlbOTs-q0R>l6aM>|Y?T}#Hgnx9)+f;i5AX)- z%(iB_Cg5BP6VC>?Wfq$@GhRf2JD&hK@PlPhoe8^3tko+$5Wp|7?p~P%e#Xn-)yFwv zL-9X3n^!_kE*ub5Huo#BWMIAky!+G8zi zJ6k6Vqdk{sOAek96~oDp<s?fXnuiUp1eDp}5uXiKaSEtC;F87vY|XZ&=@tjF??7N1~A z&OX~PM;bt!JX8%?%}QpDi-z$SRK0Zs%34rS+#FVoA%r~ChB=sa>=6&YcMhZ(Q^X-0 zkeSavwBqY4ON1hQU7v?DO#zQQgJ zjLJ2V07AC0(0UAlcLr;O1}3A$AHlc=m~0DgvEa)N`c&>7N!KVtmzcKocNqB@m=y{?jst+Tg=Yt6;@Y-YibMK{ zwjq#^8D@>$lOYb_Xvoku_&5*Gm<#oX0ukln*12qf;!$fr`;T@wR#+g~)>7+H=R3mz z1Ylwd;fwwJ<+-dl?Rw3Tc-6*7y6E%l_`FYRb%1(nph0jU8>PR@&1YN)wpy|n65#b0 zvV46k{MBE`1|bHF=(jFpvtkBAPA15Q?IY@W-bHM9#=G#Xv!^TqH)TT$F%ZszZ9qgP zpZb-DZ@P#b&b;}FD5LR`NKF7tvHqy`fu2k7KmpfmeY-s4z=sG11WbUAsLFaQcs^LBJ{P}!K6ai_Ji}Y(vw`|| zUHk+xP;&)!cYSWA&1x(=>Meb5|&@=EA>#jnw&cjnK zWtYII;m2;BCAV|4CJQvrWqckd{yI|NFp5t1w4X1`+Fq87%15BgA$L4fI82@Fr?5Js zc-9?CqR-Rs2Y(dw&7&SX)Cjax6o`~8i;`~+UN*Oy>v&0@cQ^i z3!sJKRzLOfQ43ji-cPU$6mA{ZN}~Nb2E6QA`exU&MCAH(?!S*&=Ln ztZ%@PNu;>sz+;QpLY*uI$MUFZcFWKRaiJ!87!*M!4=B3)$PPLq6X27mr>#f)dMpXV z@z<-_a5+xA&3)BuZN|em^Yd}PB{?^@`Yo^%L+b#5Ca-#_lW$)P%s3qCE>Bgx2Xdgr zdgyEK7VW;N+0iq%6kFS%8Vn3Jd#FRv-uB>4&bBy6D5y+lwqZE(c56f;!wJ3e^{tG55BJ`I&$Ild6mGY|O* z4-4zaoo=>TaO6dbAK>Gfo~H>-gb&jSe8Vv>P0f!g#}rjyrOkF0T7Obs^Hl&T{eyoh z;v&WR0M!)U(FZjR)M`44gEihE4S;S9-laPu#UH(+trfY*{H-r?`tFQDTDE7A4Jf0Y z>{&!Y`v+O@JkF;tWn=rtiJ`vc=by64xV_y4KWFf~6a}Loj#~65PTa;HTFTberidF| zQD$=sA(z*=VnU$?7ZEB_#3UE4EwBr?30HYq!zs9VU9R1;1_3{&d)Dl;*RLZ{q7L73 z8{MjW>RR00^pDK}7C@kUzK^zSq_~}5Q^V%t{LMpiS=iSp5UYzsa}?_DB7l$rDU|WZ z>{1(i7F6^M>}b;4X6@~d+S?#878od{KIDsoO*m-)U3wq(ZL!|r%r{L#7bC^Xn$%LH zFhlB1298mxk(L6m-+qW+xQvaCtpmu96UER+=`Ua~;ofDeFe6SZ0}o4T9}N8B+WMWD z^i8)w@hhA-?O!irqcZwB9sAx>AA@B$+-pf1At)=Ep8IYixhY9&J}F493|f8Ggq>~;7Bfa^Q%`v znbWOq_wg52LV7?a=EBYcpvoY4b@Gm`Bi%AfdIbS$+w6 z=#yHr95B`pulshA9#Va}ij**D<~CT99JUqG>G$GEg7|IZiVfwuwl`OC;J~BxY=&-h zm}vAXRe3Au-W?`x1i<}+Gpu>`w`nEKV2Uh)BQx@-&anKCdyKHjdGLqwC?a_b<3l&F zg>eb67B53nj)o{wEadlW09m%dO{<#5?0}cVEG4PrfIj<|nj*cyn%>ZA`U~;|?L!97 zVvzINiRV5E1l`j5=`Ayx|EfZF8vxb2B1kix0Ger7QDw^%q@-vmm9VblY^A@B)(Sfw zZ?sA|eH=3ps&M9*7%pB1)hpfQZHFObn69%}Cr?j@cQ3~l-1N4r&X|OJ*Ohgh4CY(p ze#FAw35Mr`VE%{_VbL9rP@+H(p?YSYlRi~T53?qiN3@`3q@Hlui-2k;=va3FUf*?v zp%67{oK)BnY13ETxP5EGj?G)vN#?NbR4pZPuF-l>&Bo1MYJc{phVzMeYQQ(1UzFPt zi*I~HV>N#ThhvX~NZ3UE4HAEC8#dG}pg&7Bs(|%z(u-$+ z6h9Zg3jXJftbZIaKgNw$3O6mof3UN7dL#QZ&mF?i zHSzPVX0>IIR&>jbN}MEv#FudQIaWJWq`M8m7$B~3SVs<&6A!4DLEbUD`LV8?=Dl42 z2`1^=_bRCjtX+S0HM>MMh}RCBe+}EIV-W;G-uoS!fJTq=zIIFi>7z}tvw?l$#g>2( z{!n#*VL_-jmv6DNi`gInD*zwaS&=?Ez)cNcR7K#T8wPz35)6+J$+*!_C?0l;XP^E3 zIs$WBFxL7ekf$ISl7|tGmgIZjoz#9v0|kC>ffS`&%nO3ln;79Dfz=bfnmQ2e>f<@dOSS4w*GVT8>ef8KV8m z34=(;cyXE}D-Sa}JbI3SQg-PYp;zz2>iaDYSl7Sh>)?@y6${e;u)3dxz0R;PM*m!y zcTxQ$AisfZVXPf)dA5n~vgh3Bh+=XQ#MaL?>3$W`gb@9&LVjow&{IS+>Z|yE`bK?i zHZ-U@p-hO5auYq-5SZv|C1nP)kb?fA$LP^Yt_%>Eq`q&{F>e2}&L%zfak3LkQuczE z^o2L!m9uCM)39T+l!!>_MG1=?c1fS3oo{a8GK#XAb$T)&U^SHyeS+l|H3 zS%)>ARY&?AwlnI6a5m{AS-YQb!d3FG+I8pedZX-jy|M6jy>TmgV>SF8|2nT}D1M1| z|2d8|Zvx&H(0V?{=f3fwj$xtkPBu{=Ydg4NlxG4_drAXPWiw)FS`I+cvVG~S9jjsc za!h@{)mpzB8Piv(B^xo5*mIYbbWdWW{}LO))>L~0t@WFlV%XQ%7PBXsN(2{gQ#BACDCQY)7U^| zeZ9(qNu+qSZ&%}+iG8~=kcMv;snxaQ3?`lDI=RK!2&r3+`Watn)1&oRm(KgGThv2`r=6)bj3knaRP zm}CW>tk@7e77)f1eVTk>9SjHmr9KC9;wu|AHAyV~XOLU`!^>|W7`j)&eC=*^BYH+c zbD#F-jRAndr3z=vk@T8#YLa12CW|2#R zdG1Y3CKh)y;;sabBQmlX%0>h%#vr9)mPKbA;dM*r|yj6k@!n%mXz%)V54%CKdt@<9G`R21@9;pGKhtoM95Fx5iF#azoI_8)s(}*SABIj zI<;&;lO+u6=_D8e>7>uSSFpGp{Pw+UK%C0D;N=ndt1q$|fdEeQA9ZlHd_0+{* zs+hy)9Dxc?H1o6|49x{tKeN4x3Q0sEo4wswA>aC{>Zw`UK{W;JZxi?_5-6?*Lr2t| zEqv_}HG461T_5sxVF}*%Q7d0Xo7Q;KS;zrdtQ77TnGD2m;MOqPY~m9C4E|Cq_?afy zNm^}9YD+k#rb!Ki4J^z+GV6iZh|HwXu?`3el|mLe`lEnGFy|qMBjM=2V?sNJu`O#! zfS2Nb0nP;GDxEj4qD*a}P>PpvU!gwf&*IKN+*4%MGlz%CJc!RASJjIx_M*MS_)Auv zLTQAGPiZ%Y-*95`614u?tYf>fOok$pcf7b7p;Nex$JAS4yGdP3$3xFRHx$-^J?8+b zJ0-G{bZGoet?_FqzEl70)3ympkr2?f33@gGUxl^_de)(ozj>X}$*1iTIPAx510xY< zan8rStJ4ym(7=SQV*Q+em0W;&4+f|PwJ{M~usv#NFrg};8Y-nwNZHghE4Bccf9^-0 z5knHH9-EqGu&@shcG0V2;6xpeUs7ZIFIV@{QGiJ?vn(s-#9tayLYa;VqIeT^Y!OTR zG7Ov^64Da(0E%Xftq>RZJwR8L|M8IUSjI7MqO=~OqR0EGjj1fv7-^y{r)avR_yo!(5!4Y-}rj#d_1gxq-K zK#G_;7PHt-vx=TgPDG4Mt3}kJc`W)*V03%2p;5MjS!8-PDFxBEcTwCMS=`SNw-LJ; z#qG-C(z8kF9gX`C#ht|B{tI#UdPNr3$l{Kn7Za`skxJY|k*{HqYZ3XMUaf7-KCNvA z7W*`aMT$3!#e*aB?T-kZ(A71O$w)0;Gl($n3Tc{Eq)v%@zMpC$G@ zM^1heGJvD%`|Z+C^5r5z2Nt2omlc`JI%{ep>GTZ*lLW--^rOJmyqxI}pBZTkEKPr( zHl3+3D_YY1H{(Yd6WXcgK-*R}E*ipKO^O|2_2Dk7?KSnsmYMZegAC%?W~EVo5)Gzr zj^|1i<8%4Mqe5q=67FAAap$k2B`QCLtwjfZ7kV_@t%$qpw{brW3sU|*;*Y+jx?1e@ zIYm2stGVCCdL!HwtTc-AIO3!s&g~TECTykA+9fJm!?Eauj<~KTD*p(Jp0IaQQwn=~ z7L3u4yc1U~URgS&eA&W@%jV6;3MWddEo>~oLcw#wvSo{>E#9V_%Yq*0`|c1fKS&Klt=j`nFYG9Xk_6Pex(!zof=vl|R0z>2EA-EW&7& z6O7Aa@Bk8vH9$E&BhP(Y=&s+RR?81RE{qlqLkKE2JPw=1Y-P1yzM@LV$H#1Wd6kge z=^CG-9*P82ojs!g=E_^Fwjb4DKKX?z;flmWxD65*i9}UcC7-Dh`ZyDneyzMkDlX2X zz@B*STD+b;gEeRAQv5!9&Va2dVg6E_j&SVKkv%2hDV06N;wgna8Cpf@+Q=E_Sga>ZYT)WSq% z6G-cy+ZGSiGH=(q9UASM1pBWjN6Dm|ZKHiTPik(Ctq=$7w*mRfzY16MKLM4q;YEj4 zw+~tu7d`g;@k!V4U9UjM9%$usRMvrJJgj~Ij&VoD2}Op#2@>2qjPnUwdK6{D9fQD9 z<+4;3guDig9=O0ls%&KlOEn{u>(MR%gbm3_KdK2(kGh~fjIH-a)x@6Hflr;pPDQ~Q zk2pu*KjEBzf3V zLRUPDly7_rCneTVi0>~pZfY75OA&kEUP0SAJxif}Xjnn!vjAD|g95U^YNi6Le^7uK zxfqa3H=mxkPaP@ibwoXD=@A7uA^P^(lT%kDUM=+R1j ziOjCY?ia(pd>W*qfhzj}!izDZqkTuK5{s1m(Ks4HTQ}<4x)I!-B>B##g`UpW;3C9g zo5uR_Ue?ShMOE!?wp2!Ca6CFhXEh%yF5+(dZ6Dtm1jPJmY=Fl`!%!ggR~tR0E)5RH zcflIR%mDL?O*7l&;AD-M8EN)l_BOR$v#$;IVPo+e#-cYHi=SF(EPDQ~l2;%P8VL)_ zV?eO|NLbNH_j=PJQ!^VQ(V30JzL1kLOZ{DD01aT1LmP*fb`{bitC<)F6DuYZh>n9A z(1EP_&!d3bPh>I=#Dya|nMd+I`I9Gw9@f{O%o3f>FR>P4I{)ghrmoxtw9jfV;}ew^ z0`f!EfU-+eo({-ct3lrO!%8h&rlaLnl6l`#joT%OT42io`J zbTsmhX7uS`bVmO!yQ?CV(t2`8yGr#(W|wDl&$gblApAegXxgy2+#EKL1$(oU^dJX@ zJw&KE&dEwr0dS-sQ_2Q})~E0{L%~{TC-6t<>s$ER7yOYF-0J}2=g;uq?lzt{QuKb( z-@#*!%n=im#oB*6>=$8$y{SoHF&nYH0(G(7m6n&sZWIz{(Je$9U6Q(HL@!y45M6`Y zNFtC-DX9jgTy$|-^T%>RJ-p4OWFJW=f zPMQVKFUor=%WrbKyo-_dM9SN#bnxqNow_#CPo1%r#<8_@BtS_ES<*r6lJ-T?k*r$3 z_;k|k-m6(k!AdFfk@B#5oHb|&OWCnq%0#5hV=0dy<&EC{Na-XNQE_8mOkB>|@5JUh zE3)`W?G7FkZNk+0iy)SxeR2+qDw}1o$44;xS|8N;y8Nn7w!$q!`##z16D5mxb6qma zTg9DgQ&Swv`yFSy%nu-Q6U+P|)X$7ffi9eY<^YARZzD1^8B}y*AfkxwSVXd%he(n( z0#fY_Mg7LHsWOC-Emg=TA5(?m9zk3)rizmypNvK}SJZJ;ba}C|1gnwYq!(MGuY$|p z+k^E{@(G=V6tKTiA7d=FEEaRFZwTunqN{K5_4jCTvXsrNts1>O)n{pobFDAalT7(K z!KqDY)S~|Y@O>ThGNNSGFx*(E<0;d@=qKtAdhUm6J=4}7f7BDVwd;x1(Z;c!7|e2r zYwL;JB;|S*nYzWO%wdtC6v9|y)C&p9FJbwoXJG;fuOw|PPEfuL4~|qWK{*!g=Mh-1 zWPzPZqf0GLP(BUkw8eQpoT0TC4Nh*LINICg6`iK%4nUoBz%hoYv-R+qHS@uiC7|{z1L6U7LrrYjgj0ZMLGieZj$aieHc?8O?` zgv*Av-GrCTH9{OZLEo+u4!1_9dV=y{YndOMPJ#y?7EO0w1%X}?Ti;X3=A@O}I@gNrdYM|Ja#}b@n`Us#7kT@2JDQzz; zP7Arb(0Q&wT02XNyFRMM7 zLo5CN64URar%9~_a0imcOOES&QWAyS*7c4e z1}3+_!nzIj4)}K(0Z!mChWf7c%j8kd3$f1g>i96PB!L~A%8W&S_WoExs#NFIEv+%A z6qF9aCieSYt6(A5NUIV?ZXE7N4a#qxj3_@_-PmP(e+ zlg8XQY4pV6Yi1XX9X)33b5!psioInfC#qV8@0Zb8s{9@1;8ja<-DS89br!3qjk zdjaS}?=Zr#b##;2z$}E2o`^d6fgRu)_i%$>Dpnb*cc}vcn#%L+hONy!XWU?#HNbjf zoz0>acqn?o&g!U1}J%;7^m--sEf)s*P1P8#atHZ*kn6B5bz-4chlj z=zidD{~3*=a;Q~%0d!B+EdrFF*ZVjw239@Ty7C5KVGqE9%->1>OFOxqT|FSjpzd;I z5~bVWucW@aM7gM}v` zA1<&NQPXQ8HRT&^(C#-vKaW%TKql1Rop%qJppvbWh?Jn3H*iot6{~vGYq8Q0OC-5} z44I*vIBgsRlXqVXa}$OwqK?n~s7t~qlO4OjEc}~^f7;SXsFCcj0Ca>@5#qq7-0^Mi zEzqdD-W}KWe#s|)@PaVLc?+O-U}}%c2Q0#WiG_jj)mTZ82B8m04>qv@=o_%oxWUay zJJvklJI+}FxaDx{uv;Bv_LFnC{qsw#j+zn}i34z)@C34v&ybX%K#@5MNI1&J;jqu) zV3TR(xc%6J(0HDs5<5O$ko(IuDT7=RqRwMcz3ym)J?<-Aa~9QU32jT#iiL#$=!pYl@M^#-Wjr ze1zbJQ02(1rMR8y_$rz*of>M#rXCq@%VS0MkngM&GUD%Vd4TQLRKu%fS1lOytGrZL z`TyLk%Px=HpB_3Wakc4iaohP^>icnHr%N;f^dCk;{tA`QeHoIKT5uiS0n_rl*It^> zoHuaF-(ku~ij;uYk-jG*t8o|i$1n5zN zyl8f6-)zA$oV$Y?Nj^e)#{UL+gkkQR*kJFqaF^QO2>&U}y^`%|%W1WOlJcZ_*8 zv+=ig&2#51lJKvi@+fxKyg5`*r9ZcxisFE23JxSt`qS8ZSe*-{cZzWb;_kz7aM{%P zkCzAOz0EEwDR-`zKf8QB03=qd94@U|I)8Q9{JEq)Sw5eRMCtaD#jEE3>CPwSMjTES z4P@QEC=bUuwcHIYeongNCBr8Q;Q%ZS$Vk$h?uwTryx12_skg%lY9v8c;vLy2bxlIn|K=is}4 z{kQnSnee81pTs^WTJQVpn^T;k&mQwe3&-_L^hgeF_18G+u1tzqU0EnL_FTzh*E`PD ztkHW`XTDpf8_g4_QPx^MV(&$<4F?n_|ZC*5sd$>nTbPimWMrfWGr)h=gUqkIlI zccHI;RH=g=dDcrp-i@_r%pD9OrocfB)tWP=5!Rb+U74YSz=NF^!>-rn*uOBPGs0nkm5ihL#;XlJp;S zamjWquY)r(z#kG`U`-^i6E z3pJ?ssAek1p#o*Zg}L1P8YtBKwl5PduZ|*{a8kBz7o_wOkfj%~*#NU#X@-560WRze zMVzu+F4-=0aF&5QS(2?Yt;Da8K{zUGd)Pk~BtSfNygExNATrOWE1=BJ{`LiM@qQz| z?6hRKlJR8$`;uKG+R0@ok+1)ud)j&jpg40EmadQ%mfr51PaKRt+eM{IvDcN(la{Vp zGG~4{ZUT}67lp+PPoC&3qPL=!RT`2GZQ3$6Z3z`kVHNFJWUy;`*3>-bbCz6OPtK@9 zw0-@keFl8m1e2Q-d{NoOh1{lgM;pub{fX9L7-vUnMvY``{NqMC|KNH;D$3|0Oas|~!ZO_+@IYQwKZdwZvkj$dO0x1b)OnM3?Le$}#L})V zxxSQWBzvg@>MjT;iE`_9=y0Yg%Q11JIa(HdkwsYj4pP5lxQ5cgcCcceVE1M12#$wl zGiN3$qhCWKG?%TYMm5a66G5Klm-V%6v2}1!)gFW1v%%xC&C5(=?+@Ue>-$S1*Td|I z!+oMhQjrtfNDouO=FK|K?U`c#pRqe9x_3!G;)%6r<6EM%|cWbNs*emFx?~W(d52@gZG^@zBy^lrqzvf1S zUTvd({_Mn0+SOk=uhu}#T${QyKg*q#cvlCsPWIEnoPy!tz!6RQpA(d+(_@Dz1vRm9 zZrSXm^Y4hq0i)KZfk(mT)IiH1Xf@N*Txf%E`^SP}N&n1V*kjStzhPELzqbYEgPKi+ zt=U*x3M%HLnx!h!$?OS<@}7Se80Pt&sV*Bbn!z%f=vnF@xc?5yei z57c83SNfh04y~lTva-s_zobe^(G6Mn-|r4QIpQmxO-@e-F4?q-HY z6L038C`O*VsK~ziZF2rj5CW-+8NQ0bo2Wu!zz@*>RE5VTKnLL-;8$z2YC`Fp@{;n> z`735kxTAQ=tQF;RXU$z!K7SU&jVqlS0i>n}tQKG(0pxkv?WIc>O6C1VmX+MOcv;Cj zY2`ABB1A5lktyS3m&rdn``Q;!4jO-1IhBF`7nYKzi?YjwX%mt%2c+*fqpi~R1Yzox z=jK>2G?}T zG3-)vmB&I!IJp#+^Y^h8{2ZGyHCwV>gzgjgmm5T7OF+KvRpE6YL&xtDx(jAtlgL-> z67sUlpp+y~vIUvT6d+04E8(IMz#2HLbjm$`dF?J??Km=_A-@oLjG0LMJou>dAGoHX zE|0+hC9oUiPIVZzI_<7yK>D5Pz{vYAUVCN+Oe`ONO-S#%Q_Vy$Fe%^#5eL+o6c#lF zVRU3!%Px8)oR$f$ovI1OEw2gFr_X>jy`kC4!Dp#`tmQ9uI2N;zucwk0T`iQS?L`QK zXu2Cg`B8XFi|!Try$WoBcYzQ!R@!6N)#}>CINKuMvs*}G)-v*LVR=eAOdrXnu!!^q z7aB<~pvxYicj}9+A9=ZM<%M(481)iNUt*N!TIHF0go3o4z^SN7KX95`ZM6#^-GRN- zb*FkfDDT)Kq-O4c5ip(8Yp^?ZvK{dyO(C7ct+yF~lO=oh04`&vdPPV!)C&dHBdyj& z1zGt8TT1ye6{f4;x_|&GFR4(ug~94nGH~K{s`m!vrS*c85vP0^u)0OqZj!gqRS^H{ z8FM!i*c4mpg`rMsEADgfZ)n8X5~s|C_LEP&6ChCVs#H8Vf^f!hG@Nv>5kv`Pv<*6B zR)=4$2d$j|SqX=eo(JEUzTF1HnJA(Yr7>Z|f~uLsM^XeP3bAn#Qblr*U>Xv%FDwa( zber`^7Er$k$@jeuvHJ%t1)1b6F-}n$=YsM_dx4xBP}2cuatAiJ z_FYB&D@Mlz`I2ml#^BoE^GhMi7Lr*+n6#%#1a@ z$c~$SUcKgx2Kn(px%>@Oqxf?J-TW0$^j93n((uTXZ6zqExWa))##Kcx3|( zzol1kaTdKbfLtqcSnGSZ@=@f6%y}MZm&Ge?U(d~C>Mp`f1>fE1IhC0?{<_TMF8S!_ zdqPXnGyhq52@>^u+dxMEj2XdJQb@_33d(u=gw#O?0G3i{BVYzm*%0{18&kZV6?k88 z3gDI~=3PDk6^c_Phll}o#3$drPbj!4MQMRNh~}q+c7vY*i3at?-+^GpGdq3SVznL& z_+ruH^wrCDCYqG*1kG5~8e~tL@@Y`-F`_r)pdBVB{Y&VbkkqcD4g}?*e+d@8pM2ZD zglnDkkGPssxr3d#GgFrzyzr?x70h+JBc|$vFSiPUB#r=HQghsADj*41rifgk#!laF zU!Q7?1>d?H$JnUydtCS97^?*{n&O-V&$8ZU;1ZSUkWeL5AGi?5f!PnWM{bI~N?M|8vdx6iB>e?Oy5Y-om|I24+l#;pee1(%bdP$U%@~0?= zvLW#KQL>O(`Ibgrti6V7@ULVyzQVDr9P6zeQRVFZ--LWC9pEr5oj-pbFn6_F!1iAT zf}*T+{#*zMKvt3QFTm@|AW?*6{V8Ug392f=cCW*_TEJ|Svc-mc^zTCOxai&pv~%O+ zpQ;>=%0y*m&x;+gPXJ9Ck){S$uP+!Y9?M@}G*)+PPjhObaFoJfLoIo{*3yZ^ zMJ1;krV^7aO6HpzHNaDzOLLbwOzt7JOsIc#fy{}6k1Tpm#XIEh_d2bK4I_&LM~vsy zLatH7pmWL{fH-%9qqQGH+xJ2vw|{7{sdOMHqmIx^fCL_r9J)&gjZ_IED)F2*x1OFs z2us!8Q=qa(EjJb9LwLz4Q-L%^PSPLo-s|WFR)@{L&Q7hZNRWyv*N`Wu4sgQdxQoXX z!C*BsB*Q{-5^=e6q10-Dxk~*B^*uOy8%LCpNuDyZVUwb#tz>crPBEG(SwCkFh)9NjZ{H05gtzoi~8k36c zEk(I5l;(!`pCgm&#aJY4`Gauog_LvPZ(%4>7HEWX^_zkf8jv{wdj*EH0qZJz8G!7Bc(i6{XeV{)vwGgKLWOclVUCA)0ACCUp7y1>`(oVEa|_Ul+;$pwlC0 z%K%}GAT1jvIk{ZAmiIf|3_+PtJr*nF^4`rgB!7Dfee#5#wi4o+@;@Cg(`u>2{G$1^ zCPDXvZbLozEFlP(^SeA)Csd~ZXwP7~w}`K-OgCH2Cx~+4ly^dsdo}tsZ;aW>o%qpn zJEniK$1cnN76v*W!(p^Arz-iJoS&v7 z@l|~F6u0?|k*}dH{Ubj#cjbs?qlqZv5r*0Fqn9&tq$ZmhwbyC&w&|p zs=~3x?hvZtJ#fs7i&rWvgE}bR_=|1S2LoF4)s&v3;pZAjZ)Ppz`rtX35+M1;mkNXD zFiy%EYyeJy9xG@nU&6vC1R@T%8Omla#K92rqV7A`NtBI~=ow2dS01ME9tP}|hHn)a zozX6#TGWnNI1tkKN*yridzTMz>})geDmvB>WwCo;@Llqwd5%c0^I z;d)IK0A9It$QuWqqzV82UHe<{Obp9i+M&Xxm~c#h|Z$WC+EjVHPD+i;{q zTMs#kNpgJXsD@WI6Tr-399*wsjo8o}HST!)UlmE_aGN7<1SXy529F&xBFUY!+6nUm zPWsZTL&za7ZEQ7cb2CUu0JOo@#oUx=17O4e3@lFuJM6UjIUv};NXfBL!~>v<|8PV2 zuig27kaRMK-{gFIQ|@2MmCM~ZKMD& zOA&Wzxcx3bO+iitgdg({pHO2y6U%ujJe5<%!nFd(gyY^XK~#;TwNX}6SzlRMC^?V5 zg$41fyQcCqUiHU3ELeAfqQC8Z8!O;cr3+tTAu#8wOrG}NcX{6dd#Q^@%Sr=Se#u)? z=|_C6z<+rAxlgei34xEV`U+)@VB+I_SW~nNojn`(ftRHfLNd4!7@cF~MXt#h9U~i@ z%aurGnIvE{DPztN1|jY@<&#}w5Vsj?gWFFPGE__TJDhZ&an`8~@a14FYAAEi@n7Jm zs3cmAuNvj)Zu=aSiFHzE6llfkSoUJ%6V*;ZEhz&lRwa^Sm3G3~{3fNqWkr#DSdr|D zqoxpw=KB*+A*Fm6L?NfuEs?Jht14lOHVhwSXJ2^GfV|{P^>R`Q{w4i?lW^L> zLKNMS`Ab)>kmfC0+H)oIzOcBY4CH=0GVVVwWha>m~{OF((a>s zX1px{%d`g4+_++=1fOv`qCjaz|%;lWLPzZ!J5ViSX*d3ihG&q`OhrX!zA>4jn>mpffdv1#3HERr%$QkurUhV<;0o#5cn2grBdJazmdYm( zyAqMmhuxjI{V&70leUOHwMcLXa9Yh`U+kqxZo9KI1qPKgKtsSM`#&6Xb1xtHe`;@` zMT0cxZQ71FIqQ9Z^QPjmCQo=@fbI|YI-zlYvGK6ronq4~cK|Anpp^-(d87R9`|uf_ zs~if+T|N-HWX$*dm|ac*lo=rSnXNCAan`f$w#V(4dEd=RCCjQTg$4`l$Tr$3idu-?IN>;XDgI z^NBFHvs+!!qA8i`8fMZO-Bg53N614z6~+zuS^da2`C`>_$@a6l+E)N}eF#VhSAk`$ z@xhan8-RB}cCcpwSSu`$jOJlspn$DeRSUxFw)PqWaxl!+FFS9?dW-g53Etkjwet8*9^he4xi>D<-^IS?+`9 zdi1neSB4%5hJV*i?j;Hlb4Z?xzOb+E&d+<%x%cO#n|n2ZhB$ zLJxxvpo5=%D@$JrS^P=)s?UYNJw8H^>I^zCg$cCMfKSZ}bwiH~RT z$xnVR4BEHm^bGMl>RIc#n#F~1<&iId&uVFl+Y$1yf}b;zuJn#%G2%n=*T}7N zxJ9xLU?D#TDMsg{RPO*OMNa-g$d3B~AGN~23d-ZZgv-FFqlVDbBPmc%XqhAWS;Ba>H)tsbb|JQ%1=^d1gJ~`_v z*rIk&ngA9_9ecfe%UAGCJXyZ;D`7O>L*DxpkS%HZ@O~xq>FQR`LUXn(tI7KUc%ivn zcEIQNu+ai0D+9>3G&{aDAL-2>*20`#A{ksBdnSvyTGZ_+P3cY=F*SU+!5{ zcCD`me)*)H@Co#+PnTq6zxt$J>{m$Y&3?tCKKL#8`S_HYwZs-IP|Qe)JNkaJM?5o@ z>kQq*0w&N*Df*ZCa?6rTq2JGkIus>hyB(5~QnW+Of%ZufG&m;9>QN!y`JQSG#udG% zz6n*SOX_p}dvFXBY7|$YDGsqd#8>WHd69=7h(Z|UH~V@a!S zOEP}NTXN-8YRm2Y}~{Rn`HKCJu9u z4y;3LS<|^RGe}36N%yt5>9`SFuU5bWpC;CeBXr6W@K_|siC+upI@K@t z{u(O#G0Ml-3-+BA9;OLToEQQ{%tF{j2*$tfOmD04)&y4Vf!qYs++~XwLo=KE0nZ%! zQ&m9cGr1}90lk8xkTJ@Jpe>7hiBdB*L$=2Cg@6myj8U2+N32=-7p&9wIZ-IJCgMwSj2H-cS*E8JY{}=+ziydAK*! zb$|>R%5(G9tj3NkbU`@Fvk0dTl@bQ!Bb*@BgBazeaGa+b1zrQ`Z4wKb8rFMA${nLj z2n(KA_B2jj@(r-**1{q&Y2VNmgNa!lck9ABSO@#lXjd=ChDY_(DgSEKhJT_jf1k04 z>vmICx{VHZ6I2vPAW6U?Wi1N2^!?!mrjAN#3^a~97`+k#5w)Ti$mR4q0M?uFmPYj9 z2_k*<%H092%TmJH(BBKwE8us^lRZLb^RR$aPYrmjRW9=gL;A!3vzp$I!?=s6aiH_J z5;flJC0S4ivLK@WY1`^4e~Jur4e<2q5hirqAGj7|f*CSa?&%oCihY;cU&uDSuv#Kd z{Z{Cp<16F^-@-)jZuyCCg`A0bL7GD((GVGVp;MYMIcb`&K#i$rZ^-1

                  TR`Y2hV5 zx`5*A;nRiG1QM0=(7c2Z8E=%s-@**H5cCK2msv@~9X>|+!v8>)sff#owT;iBy@HM$ zOkr}n!213d_4@EV`@St>Z3B8VP2auX%Xf3p(;Oe4JBY#E(wo|%P4){=0wn@08Dm5k zYdb>xR$6m79(BrS`I+y8u6XdsoVLDDiEon2Wd0hkiSv*!HEvnQu@>yRoxqs zfA~%q!`I5az88AN@mPu4R_ z(9^Isgyc8B7i{CMk0hJO=3!JOpN|+s3Tq?SuSI}~HPLo7p36hr>TW=eE6e(KX8{K# z#a%B?{y|u%I~9`m{2=7Ve2Z;}%KeM%|3SF%s*O;O%Q;S|b&3P!Q7%=0I*FcqH9lTy z-A7nv^yL#UTqfW;K+jX;M}HIs>$V5wH-8jzEoXs9q}woXOeK61=fi%C>juc+ATPZR z9z0d!r=V;)DU8gOFstm)S}`#>yiOV8qZw|-Y$Ixdn*V-KUUU-XF)!e9Y5#&7gFSO z#q5_~_X^{0?V!BmvqCBBppR@EuI5P9eI8Jp}By)t&Y6SV{gl0 ztf?`(`j&PAElw$)Waa6OTd{N89FXUn!cD#dATs2tQ$itx)E5Fz`$i=3Qe}a)fU{m| zApU|@-yx-R?U;yWJ_+|`*7}aPvcS5CEmb1EI>7a#(bkmF@zQ(C^e3nsqxC|g_NxaS z-$B{ukMr1rGxpRFbOyL4}H4>7qP+Ov4>9{^Na9ijH=%6|IQ0lH#t!i zZq(DmZK`lBYV=P4KB__?3ks`3A6%fD<$gZa)<^yFO+H~xZafa@8u(N`47?uBI<~O@ zon3+jxuBkWpA!0BO;Gmu(CqWF-v>Ce?dqp;j$e31e@UGuAMy)3rDSY+{F8=iT@}Bz zf3dzgtbXq=fbW4Eo4z_3a0~Ja0pSJRw;#xGUvv|z%u7LGB6|o1g}G>7POCg8B%DHb z{@fx@Y7zQ&`UO^A23tWU-Sep;`5^v2^2=2%!kFYss?_4S%Y;?!x{FBabos{?;l?g! z)Lp(BJEZg25zfHbbB(c zuumQo78di1qVDOid@hW3=Rai>VI!j~2tBn&yjnN~Z*fog#INzNB_to^#l9G` zd*v9N*bj5$dpKCqiSy7)iLy&4cEv+jKByCWqPt?`Gdl4~@w|F>pts!kq^`3(QZJgi zoL5J*6xAD=hA%y9L0uAFLyf zIb>qD6%a>sc{s1`1r|JA%(Urd!aeI7y*LqNFO&xe;s88Ml1l{fW@I`nARiD!CH|87 zPe5Ad!*AHn>R;u3qByO`C3O{e9-n!g%+ADtf#mJxI}4Qp-CyjB;EBR&JB2pLR~SSo zV>>j$YaP;M$F^O<%KcgsgKVY>z$8snnS4}3;wwrqnV-3qoWjY?0JC4KwCC+~?BGo614C85(PA0kkU z@Y|-58%E_b3{5}W;&nWQ-war4I!2~)^p+VRN{moEx7xmm3`?iTP#To7ApCIQvRfA6 zNg3fCmik&${zhjYBeM*s!{ok<{RAK-zcvftZwdCKnhmOk^h!7k*{Iq!^#R!#hsC)~ zEta>$i5UfbeNhZojw8epZC)6_9?)C@&@57Mlqa&uVF1Y&R-4(BrZ0y>vJfwhcUoG3 zih93(ji#-%?UHcs8cgv{*iH>#?{V;XIi&t7R}oT-_FYv3EdwAd4#&Fz2rt8s=S6j5 zfF!pCP`a8!8J^8Xs}@ z>xL}!8!xKYv`{8iWYU{u@?!Wn0G}!OGk#f#7c+0E1m|@c5cIQ(i$EnCa2y)3XOnF3LX)w^J7UGkd8JSV_=jAY zAolEhu)<)1{9_*7wKT*Hnm*<7iwR=4F;c(;ajG_=aM`Pz1tmoLx2QZECQ8bnJQy}_ zrrASZKMoLCOQG(t=H9~y2B4gfD0aE|Zqk5s3m^_eWkxGmOmSS!8G|WDXJQu=(}Y+L zkK5Acr@0g;uK1#PZV8%(z#I~snzDUDPYtMphBwvLm2q^8pe^rD6niBufj2hu@geT6 zz<}7Mo|5+_iv7UXI-Mw%W+W-epwY=oUjc})=iv^R_R}24Hno?$BuO0Fx4e~

                  rH- z3IPYelzm}3#fYY<9JTBKTOssxAs~N}Bo1*349kU9)n_f-UaBoUe+-cXZPo_(DI&tv zpg4dU9o^DM*Yu_q>LdD61!zxNX_U@IxnZ5r^9oiLJ-raHxudb~Y^D5+%CjWc;AYEf zlEpp)X0_g)`9h)Z7}4IP4g-AH)!>GkZ|m(aD)arOp;mO9xACoJD$uAbmX9TiJ>%B4 z^{o&3Vku&$!5N@2K62BZX;7y7Yd{*rLRs1XHmpkMOK25C>_Hd7u4Y&RZ|&8fx9S=MYkp%k`(nU(4!ah%Ib(mrR3>*m zqmbGF)#y0rUQ-o}%8e~icRs_|x9pa2k@UM-3L|BFiHqK#G_cPH*9bWOD2wuzA)Y}j z!4f&AgP3uH5;8?%*R;@PNO`}4QngaXAdE15yRjtSho)0kV+bhLg0?Q&z$BXEnYuK6 zc_$?QwS&0Y`6C1oRw%1~gj{OR2wX=if5I&Bv|Z-?#n!_;$kvDL7x#s5#my-~|2!J7 zvXEn;p&qy@;Q%dSHZ*EsjiK6Rv(O7%gdV7ksQfD&v$Z>meQQXBdV+8w7jNQ514J(t z3ZJ0t36)~iCnyD>XMNqE`hh4>yR$eGj#uZyS7m3hzphV6eyy{39YQRAIWA2s7@7w&5ACv$2s$Dk%kycRmHDej z;4=Agp?KJ0yEBtE`|bd5UX-OhXUl8S#0+fwN%AH<#BWo1-(Zh9hf>d!-%S&{>tDty zKTnZfR*%T>>EdmSaea5XxG?o)Y{;4}^41Kx!Y3$lK>j6N9G>*D`ZAn@kH>VN(DHy> z&_&DzVF+r@(M7B*{9Zi^cY5QQKQEo9gGcY_>`A~ysEfx`t$WXe&78v-R$(*LLOqx- zWVwX>*t=kVM>+c8D?CFSgmO|)15M_Tpd5y4*bFh3Rq&Y%vAFApK0}tVLBiElmjYXl zlnyy->`5LX-Gb^kna>nQ_x~OYIuY8ePez>Sb=o`#9MbRAe1vv%>1)yIR{a*!teN#M z!$X=}mMI<=&Z$?24%H|1Pmqu0i1YP7^h?-%jYUl4JG#~E5WmIaaI1ZSL<fOJ7EaY2wzpMptGvCN*jso<-RRqWyqow4FEpvmA$f6kP)beeH}ELjUHq&5 zC3U;py@%Kh56|qrwuks^vhbbyW_b76E5-3V9-nWOhYu6q6TVmP_3t(e7l*{aLU7pb z5!Z-^bo!swyX6ixag7kG_yW7DZQ>q*ReRdC;tb(UAk50!uNAZSd*zR>71wlo6Nvjn z=xFXw1)#H8nIly4IMEB9cztRgdHDpibBj8C_mK%ASj}5hMb4QdrsLs|JYtgAUHDdo zOlQF)aXf-s~TA6Gde71v|U#uIS;;5VsK3pUn zt$skM09RkHz)0+)9tZCtT)N@Bjw$d;BuTQvM%q~?xwD|>pt@WB z^ae3KL5_I1prC*F{-9bRkC-8LjxS-= zBba@7RF+F-h}k&@)&8i&)?Za(bh}DS(kjuvT_vuHR3ejwX_e^J*4STH!p!1mmFTQh z!Uu>|bE8%XkyXNSP(6f8-mfchm^q-Jo(QNvhUJDE#I*RgS(uK6eI~EDQS3ZuCkvuV z1k?jj5LWZAE8${ss1mpohUJkn#7^;#BTTCWoI}b@H;UPF52~H8lD6UwLpoo*Y@~$B zD+igln^aJF7|sJI0}y*)uVX!~htQ7m3~5`TI%O$nSZ#%po)4cxDjt(q;q)9(Zt+2*v3G(LltR5u!WBgs)&Yis|Tzu#nCEz zK^}E8>i>$G-6DGUzIrAXdPPlZ;ia#=O5{QvZTLavgJKcuhJacRVXJ^8!0#ZReagNu zxR}Vg_F%LIXdF*>jE2Wr$Ik(%}kA+-hAx|P?ySFzB zIn$a1A2U?3TTro%k%}!s#fmjoDC_D@)itTtgC8A58m3}=xQsvQ)c|ZEion|gUNR`F z1#c{kSr{$w-RmW9zqRV?^0TwV`Of6F#-_TXsKJS>&YO`OOx5mjo+fp0Fb)`V_N>}M zT|<)!2|B{!gG*r1rW}GZNC4UDlp7Hr65+N#geDGg3xv>Q5dtL)<~oCi@3nl4_(7O8 z!&mBX_UR44vO>-WEm`g3yHOlhhE%$Q1hTnikM))&wR5mZy*rrZZc^>=FD+&`$D< zC34cPAZ+5ul%IC}pbCN*D@9Opa5lUc;JU#QwV2K_o$`+$-Sy}!YkETo7FMqegw>}Y9HOI&{8>UU zEs+mOV!Y^;G*mXPaSXi#)b8zStMzsaKIdTG(AQ3FU)R;?5u#H9fKp9?gB|*6Y>|s* zi#_-!Jie+iFZBef$!6rk!K7c90D`m19N#b9PB%yvgC?A?F zu8AjcDy=n4Ant0p#Ew|A+QllB@3)IoXYmy6ESquDW~8z0x}%PZKzTnC_a%>q*`@;XeM*sq=TD2{dl&wP=p`I>jU#K z^j01Cp}D2l248|91Pr4ZX*od%rj)h9YnyrZxdU*G#4Du`%-*w)5Zvi)j{I?n*e&@L z^`!r@zfoQ(lKDAeN9QB(FF}C4RMLjFlGfHyDGlo2FpqjbXN*JFMw~(MO1B6!Eal!6 zjmt+zYJapf#r2?(*D1F~@}`lztzF*y7Rp-$p(U=HSm<_yE-9YjWWifPi(S)M z@bd^>Tukm(dF8p#BG+UVT8+>}#S>WQ-$JFXVipQr8%t@ijfGZ*7P`pSs!sU}LLJ4U zS?Ik89mzuPK?bX9T2a~3fW!# zS?CQ2om~uX1qhuQy43}2ePnShLT@eZ&O&XWS*~s@v;d(u7fUSks?bfYt}JvYLT@St zf-Z8%3(a)F9LR|*dLwv7F}y_}xO?aZhM%ibvVFYrGyYBY(_yVsQbRhpy$7yr3&dot zI^`(BOd(EL9pseH5MJ9#fRxa04D!kg%)Wl;C!&e=&pGqwGez6;0}ZBm^B0%gxoQR1 z7ng)#hC6W zFNIeB+{Mf0-p0ARnHWDX^2)`pHJBF8Upc!Rc0{F1=5tpi7);C}pe=;sX54SMjYYa` z{+(Q-gi5ShIh&sAJ0SAn`6cD-jpOdk(Y`HNv5*_(GnfeeV>aPPqGE5~A1P?*Lhfb> z>B{F09yEK!$|ZvbaZgnk+nAJ(u9ufC5IfDKy9KFA@VJ5Klt~d^f%FzoZ4t6Re_sce z6&ule@Igo7hJn6I-Xs>XKN9kS@2oe0g}fFCS>gNM8_Pnr$=(IxHP`5HAArW8#Zv4* zR-OGiTw?;NIeIe~Z|bZ2>=s|{6ypBWjOF(0@m;5QK@P`Z)2Fx>~y$`!Phy!G;Q|@F{ z)Mx`LYHhTdj5b(IGQ%Q%qnGego!F5vY`@C*re9@z9Vrfg5WHs}IYz`1V>bkP4yZHR zGS)6%XT8R2xhDtO0Ii1X-$Y}`^D7Tk9U?d{H-e7%uOLwqikwxx-Jk~e#;;TvEhZv^ z=z#XlhIC2_icG>`K$9ZdhvVeoO-)9#6(09+1etO7>rz>FQq7K>pOgp3-8F^^*`Yq! zLb+V-BUeQjNi?SAQN^=?MLTs~Ys1xZh5QXX&{j<>~r ztB$BnopOMErDs2oP@`w#x;nZZYz0|B!+bffEs?yO6#ccf=+VqJw#)3rwy$rq%yy_v zk<6m)xIdDa6?s*)#inLdpc!eb8J8E?V))1tBkrO6aq2v9xO6V7?M3ypylfF}3)3UH zQO!!)<)$@rY`dCW7v2{k0mQm3Ao;#lkAk#p-^~8)^17-muXT|w%f?sj2H{uxM)Pux z&xx}lt6e@<-J;B@y06t8kxYr8i#Ayo$(Wj)*p~5HWK08l0XF~ee9oP@kNzSiEBRqdv0>>P$F~9wbI| zG4YakoUA67#!tEj7Loq@jO=tFA<*oSd2?wAY;nr>Ef%N59|T=AoGEXs;ISTCEMCu_ zkq0gj2VXJl34`YSy7aAO66DR#At#W|<0@?HnQR98nYkF^mWxo1FksuDr+@n7jY~x7 z`aJ;YO+dbc{oJCigN)1A_SP3~pa~%(*8u7`=4YFTauW9G`U%HqRRqCsO!C}Yf6~EO zNQ*A0%5vgTF^7Le9=KG@h`SbB8ga5Nsy66OE)_>+!Q(P=r5%+JYNGjdLS8;KrA2;q zshI2R*eaDCfXGCDf>c_jL-j=4fdTty=~3JheTNey+{2a2da)1G@wyl1u+SdiZZ6mh zqi-dIT8arNn}b)G99KFE?TFBv;!Z3yDGa1G7HURlc5yNb6~kFh7n#lRq(f-QDkg}1 zP6@PTx?))9MTB-OCW}~3Ige0n08caMKt3{r^GfE$4S_&w-sjbHoi*hiC*%+GBJI|zSdM+7*kyx5cNg%ZJ-8Z)_kqr z88W~b8Rz&~T^Z_%_vK8`thIVskQ@{D$3AatJfL0|>I7BUv0&XCP$z`w_#v{WKz5ah z<8)PvIi2`Ho8aiO2H%SGDgf8347RD!e4@8>Yg~_=vG7h!C6F9>a2PrEEfcH_`1mPIbkw7 z^IiFdaq*FUdq-lW24&w0u}Ag=wFFYR!@#*43;82V0Hj#Y zAXuT0#idW(Cy!Vuj^;PY&Xr<@K-d%Vb1TKGCw;FDg!#b&RQN?0@D{i|j;Br~Bvs&_ z$B~rhf%*)okDl^RU@;yJq`9Y}ZvT(7FM*4)TK|7%hWBMyL_|ac#1~{46$o+3%moog z(A>(r?Sku=8={ulGFVo4`<2wq4r(g6rLE#pk(uVNy6u5>-O3u5!rcLvGyD9%&v^&b z?(Np^UmuzG?E7<`^Q@<#4~0|ZE_m<~>(YVJPk z0=svF3;i^+03*n5x28F~qVqL0Yg)>L=A*wK=`6IAHp z13Nm--9bPh$sUc^4go0C+8rx)v}6xKY+y&*gWNF!2uXGygnVNHK*;F=7fPIi%RWM! zzFes7hN&gfW{;mZWh!my`HO-dGKz=*_(@t6tc3$22VE9xi2e8pc+23w{@CAh@!BBJ zLt#3wa-hLaTymhnU82EbsOt)Ad{l0)pXp|y3&2BwEKb$}@I3BtvpW{ZaZ&HMor18c z8Irrqd%M|!1>oLyFU%1=zuVQl`WEpu3M0!d%n;whTv^pnVg-!IM{HIA@(*-n3dk?n zZ$oTGp$0{Iy1EL;FWIvY+bsb3yC9YzzXZwx#cEI_(bYwpb1O_sO37UVlin851pg#^ zD-o+fek1tB1Os6`0kK^IbKrHF0&~EH)q^ep$baY1yk5O~NzzV0{uvV|L8EmF%ph8% zrGfCo8Ku(OrCQpgX%EaT0oW1He)|F~5|6MMCixY&!xrdz?@ zUL<$Zz0Qs-k{@gXVI^OB5vWaNzfL7e_z!I8WAgM{KX%4KsG|WOK}t25$*9Yt_h@46 zS<_4b;9)Xf6S^ahcQy(M6(?WF&O9b}3ktS>;AOFo%Zcqm?LR_0mT)dQsl*lrkAMw- zT<+9m6SPj`##l)c!fj5z%<}B$`dBdPd191X3pG_X{6{pY1$+y1aU24EZU0ZaNv}Fk7v3_pIllz zcXH3^$RebDNy8~xh?O<*=|KKTB&CT@@w41AIl6~cllg@n&CN&~A#6?j4iLx0R0cPL zGR_yV=gQ=6?V5NuNUQze2(RdB?jgW5=l{e0StfUnYvM*IUs}v^kscg!WGS0w?t_Ks zh2xU%M-zL5n6HTqESimkQcaN97wph;Z6XPay z&}LEl*op|rBgP!*?UURY-Ahe;i6|M_N2;K^Lo1!*WiLJ@ckT775aYzXAWA!)h9yz7 z*&3zkzG~uQQPyHsM4ulHls(HHeG2!^8?5#z`CaR7-0yV%Ym}GL$y2-cmO@&PEQCSy zc<{#X6p%`AHb*qWORb2s@rE#pNFARFz*D3Libx#^rWQXkncN^0&&1)`xtKLPEq9C! zvG;cbL3&e#Nh-OnJMd`3$`BalWeH1UwOxok$#DWxy1_9+GQ5!u$*pUAHXE}6Q z4plJOoNeNE56gH)j++o-4|nu68*$B%V7`KHLg7Q;_!=wpT=VT8BLp~`_}5Sc(oV?< z5K*-?)E)`f@dM72TkwMuJkHHFKO^UMc@-%Yf@&H;|TwBlV6r)|8Mn(LNAEuVM+Qq&7?U(Z9k>fTKvOz9Mqo_XtfIySEK zHrhoyR?0wO>7{qBXXt~l_w|+vC@5{&BEr-$vLHhJk_wlLI6)FDo-uWHGhMKHm548a z@9^d*>9fk~aWL^99bZ9V>v)j~5#wi1z%{l;WD=vI@Wyq4Fc1vtgih-)7soCqQK6>z>x9n>g%1Dizdcs zozSKq5#Khai*Y|vOqcTV)z`~R9IwS4c~!*Cy0!P@@zY@b*5OSNUFCR@x?>>|l8> zg5@wAB{y4$7_vMdfCNuCLPE*I-)1kpDBq$_b+COe%HyCQ;PA7AWpW(8&iGm1WwI%= zkspAfSx~`}JVTu(d{eTUgyY<#31NgIw&4W{cR5t_9TG-t*)m9?H?Vh?L1wd#9a|=+ z>UVoyeOZoW2^DfUfM%Bp+=7*CM1?%t@H*ee_EgA8(Z6vwq$!oq)MVY3wyWAzwzscy zuqzevd-^jlm%B_>**7oA;rjh<_VY4`6l??AB@`6d*hb zdD#b*@}wZnZ*fqwY50nBuwg6YWPAmSR#S9W*zy&axf85*g?v9o6$6sdO{2O4^07Cz za@o!9Tq$Q6Ht}-y^h$ZUekc}ZCGesgKZ{$1@pJ-CLcigDHf0rrpImI|DtUUyCY}aN zb0^Ot__gJWKp0pw z{8dO(o5LCdq;vuDOxqi5oH=_E9y{YT2ryrOOX=9Y-^U9$E6JaUcRHfCQh)5{S&^b zb!Chlj0L;j_(7wwb$Gp!9I{2Xc?18HwW*fx)rWYPZ9NW2c{L6RwoEnZJt+0H%*!V3P-4+D*b zZqcK$=h@Ti<@q>Zv_`ju~? zV;4%pXe(+S4JO|2hw-S3y|qz(NLS0kHeoK-vD-GG&Sh*o{XEW|*#z0lsc;^>Nj`!R*ubi`2iH1j>?s8#Lky}>xVUbk_J#k_$(=w!Cn<$I{o%@8{)XEQg08u}<( zwps3!c8yPI=C(Xc{FtvANF>Y03vk$tLOcs`ZZ zV?j$luJUKt+&APNg@41Ff(CS{LG%7fO|*vaPlI>`XlepIDL$mx4+(i-wcNv@F_BZAJ`oHgh-Dh)E0L8eap>md0?BO02nRswO>Jo~+5M;ih$6#rIb}miw-p(Ef8@H=)F$f*s*?bzPT+ zvRC;oHuqh*oBkmut9n+w>Cw=9es76k+N|JFWkuhNL*IXt{laXoD zF;UTl(N#yG#YqGZ`d?>nWTGLwPH&2;3pI7F?_l%uEq?G?7UU+hE;N?J**=FrALKp} z4nsJ~c9Hx25q6!ko!#vXRUyw@Vzen>tUv1yx5LC%!CL_Xev!NT;NgDybzKVES|e{V ztcM-1d$&QAbUiMrh1(z{XXBf^yLpB4I5)dP*DmZksOR^?=G2e9e=liL@z5%d|}rX(XShQ@;W!imVZS$hUhT?v}kI zPex4-6@D=%O1~J!ROauK47{S__LAcTSq3oD|}t?ceW=Te?Rx8;O`}O5^|1pCL+&p zS3Lfncf}&+R%bhWZ}3N15g6fWjlZu#Iy-^olXUXZ-rqFk}AZ^VZXl8uouv) ztUyZn=xcq-=y6iY`O&%*k}k;J`TSOL?xws!N=JIT6|9pa%NKK`WMh&A3cmMyiQaQ& z21I%w!tdmDP?Zd}KL|TcNo~NJKFPNu`V?>NU_b4U@6~ z(^!*l*9Db=$*`V(BtrV286vb(go1*kOx>}3yD^AJnb|v^L3hZo{dqs@`JUXt25OrI&SGrjRaznrPaX0${U%0ru@5z}dioFM$9O^feo(Sk z%42Nn_^?1IS00AYU=dPv10lWK6`{_7kWTK5 zP(mOSDJLM*jzVE*xR2Zp!3Zyl{7~*{SjRc*{~>Uz+t{2Bb%7gzZ&PHJQ8#lm<S^r|&Fft+;rwnqO6o#_(jfKRANQ&r^nCLP*vH+JKChuZ}5Kjd!i z@TQgyOW@*=07iWC=-ggNa>lC{bz*|3ZxyWmBROf@ank%-b(Fu{Qp+PPwcI#CZY*wd zpTF`n_jzBS^y?n#Lvx?^I#|JOIU%kUXp}wc$oixkLbxT{HA|EpUgKv^?v_pWz^5(j z*HG$D{#L>d%xHA%B|I0&Sm!!^+!Z5IzxB7X`5UO7D}1JCQ768q()XJ*@kjYS(F3Z> z;NtbDA}vq_*(`IzLmIPV0IX<_95K@9DG2PiYWLa;aiX`k!nTsO_g)dR zw-cf_Gy_5Vwb4y*8Zc(s(lcpytkOnlus`c(AMKG7bm8pC9#C5z^xV9++`P%hBKFD& zIKUlP=3cqO^simmI|4OO>!U=Sv{GMzX-(4680T{^Tb8P=stdBrt<7!FGg|M<&;WoC ziuk@DQi5!1HKn9@Z7@BP9slS#SqeIujG3j_cviDlPHGkE&WWFTPS!4_s<)UhP!^ zOJo2e&CL(ues>4~ISqWIfWQ`kmm;OTib)Qsrmq9uFk$n`4KEhWUSD)ENaQ|i4_jTBs*lK1KGk+(emWJFxY#9!`lf8 z(*N&(g`&f&SvJFk#$Ry~)mXv316@sk6v5 zxP<@y4LSY;+}HvHeg^(suM~{m$y4DY4>7Y#7gAk+l-3s}$mc_h7)Hb=gV$^QFBxae zo|UN?;{IJBsRWIKtB;w9EFe3AMstt_E`&y_WfENHsdMPtV9#)qYKcw_u^2^6Fc!>M zCgX2G83`Q(A=L`NmK&7aJR+)CLnLTfo`eLjT5f<_FZkTXZxEFJ)$*-Z)$x&si^Oj@ zeo4co5B@6kBv|zR^NqPH9%;ilM>}>922XQblaSy^4rRuEZYE! zG&*dvK4N6S7?S~Zsj3|MGM$a$dx`CrUf+Y9U{nR!K6FSD*?D`)yb@-{V{6Pve`?6( z`fde#k&eZ&3=$_Kye^FfvM{$s+LMZo?9Ay0%i>443mufKVt(t7^!~)o}aYlf8_|Zxc(*U;3b;m!(Tly&8KB%@eBya_f?Z- z(Du(9Fdr`EiS8>-L35(W0~7g^0>?=u-x@F0C17%oT5NtE z-dPO)Ve38!yXLgFVbOfgIIQ~OA%+8Yi(ez$2H%CHsZYMYx~S?fRH|v&Mv%$}Wg>MB z`lZMM^Un=i8jVUe)P(nfbKkxEi+CgX5Cc5CdkFb|7zAK?Tj{;kBT>;2QPJISDF$WZ z2K>S}!N(2R*u2>g;-mA@11BI`Y-&0SIq1aIIg!(9du5*+vpIE9+G+ZdTlp09gU`A za(YxJq3I_@w{xwi`WOUFd!W%JdAj}G0o$pW?DGHA%on1W0`sVbW`OlqHZFnUd8N~4 z_Em2N(zJQ4rSqoEo~8bGKQ7G`s1u9Hbr&|)TnjWrrU&+?^q)=!ovISh6=7j%PiRI6 zdJbSfOwB9Jtdp@My%5Es5Wp$aG1X>98Q5w1ss7yP)_j} zbkXrAZaAo0S_hkFreyZ)8S13Tb0^}c-vl%ICI?*A{s;f#xZzS1n=EDrP9z*f2}`zx zW?VZ!#}b`pcYTgGZfHg*=9XMy{4GkG+y2yNh=pTci=wAE`P4I+ul`>rwizD%+tl7L z2J4?}9hzJsZEEfa$ic~)(nvA2XTdE7w1%KBnc6(XH~HZF=+AMP-%YIb4`=qjOf22- z!63j?!2XZ4=ivkrLGtkrA<_{83-I(v=>~J-6bmP&@c#xw{Wb|=L1)0x5IZ_eoxV9Q z5~epoqd|dG%n#KTEzouD3bPG8b*K0?*6yG3z+|UWeXP&iE|9=%;IH|m+L;N$@s6}P z@8nP7AtbSR|CE2oCtfxQ{D+%c+lU-;h9~$G7~&ZybvEhhbXZ9()(ut8A{fg%4F;-+P#MVfUx)W}s4{NTZ2=!P?b5E#9 zC~^=qeWmoi>e0v{JV}xM_a3Eo{K(+ihel~`1AcLoECy~>R8?dvy04(9SW>H&kj-aX z@uv=TD?t5%B@S!06ke$olR+F3oRXjmuA09XO4gq~Lxrz6vL!#<9*~*IY>8z1hZV?{ zE|78ADE#7dLPwvEG6RP`%tr`^R-rI&BklRH(chYYetV?95H%PW^kLp#q%TK3s5KJK z+h7bb+bZQIP}O={rZA6;F=l>B36jrbK(m>kGX~ixoSV=U-z1)?7IhKW^!z{Fd$T6b zn>Iz9YVie;=}CRn=JPG0fJ@wPGXCUX+)&9#xUL3~TAea~)SEr*MA#5)o0 zMKt?fF@Y1^0gLi=R8n;+7R5R*K&&@o^N|O$-%8_wq8;WI5wBXN;l0#cc}1;ik>J5G zyJ#AAv7hho6DW{us>M=7ygCW)GwEfhHTvJLIWaF;6KVdN7o=o1T(6!%qd)pl?-j3YC4F7ctl~U zX6D3IcgBp^#M4gmsTd@wHQJXB{_f~4sso}6H+F$oBT-yC5)0}a=JDbmZ&Yi*ZF*oj zFdNz?n>Kgu{K*j8qzy6mcYF4)Z&(8iSA;>-h7iCq0IPQ9L=rg<`N|wr+vX0rHgbej zsck(nyavviYIWkx9c)gAF(}g8@$=tW;h;r=@TAL#1~UwUnG`av*<9Ls3OlWiKB zJ(k zLGZ8HJSul!AP_NyXCBpjd|LTX0^1FLgnj(c`qL=r9sQq&auYi8UoOoX2hawGdqHVj zbuyOXiIxFaX)S`_IZ+!yF21#;Fn}uKhrgNMkL2VZjpPqDa?3#Gm;C#RNQ11vXa5R1 zd*evR8Qa*>_SGFRk`65+(KgjREd$ZrG?4Zf$l3p}m#lX@T6lvOz~3K3>ixfW{I5N_X5nC~p*S?wapqRKW)^D6)h_;`#UZ*jAK@tmZOs zIl_!h9jf@7estuALf7av02~A z9|oP^6J0FhdwB`~%Itu-XQJv5E=e}&{9FMtNLOkDZ{yA`%C=Z)55dwExf3lgSMhi- z0tSN>psyy8_j~;8@b{2%TI^@~I@rA12GhiKa#wX8W`?YQxcP4&3mSfsV0?KkWJDYIgw2J5X3Ti{Z(C>p;nJG;F8tlV;18k{D zt*(}hE_3vZ4B0~E279yMFDVsXje#=i7Uvlb=#oM;v!d+FjuvPaaguN6}xo>Q| z%_ZW8L&j!OLQedk9!MKF;T(!`;k-ntJLV&UZm5sEVJ5G;-LALHS`XNqctW zeRqJWe8kDd*2`n97vX4_bjVc<=4(tBarzGPYXQo!lmAA10%3=Qb`Y68Cv@O4--cH* znLIxNd7TttXtIe<^p)(U@=l240a*Z2tO@$Kd6a`pbWlkbyp1$pNKl}-8*G`jfhy;r zO48DG@koCpv_l-ctsf8;JA{xVV$6{s{&~C$fSK&kEUi2FS~PWYjvqbj@%><|G-1y+ zYkxGC{*+1!oA3~*6$de!4o`M-moUU++A&SQ`sr1mQ6IHolfmjNh%tr^4_ikQ2CrJ6 z=7-=_mnwA^ebNrL6N(X-H1bm+NtF-?0R>4a!>`6^)@ETbY?}s&&D0khh&&qv8Zq=H zE_=1~=iJn2O0_Wj?14N6LP;Vt&!a;q9L5PLZKek<*5NIpqX9JhmvNk$5xngc9;1JI|U1XFDrZ zXoD{of7O{`Rv>+HvOV#rT>O%AQlc*7+R?7&bFhx=gnw>>;9j}-7AL#-1AtBwALVCJ z|B|1?Ql_|*u}$cZobgoFO2Tc9lRt>rqC=JK%LJ5ci~aB9o5As<-{W9XXsJoUV5I))HW+QZ(St@74(_Y6)(0Wo_ZI7a zQ0{VPuzjMFY>yHIPjgulLSdZw8YfFU_BlbeRygq2cqnb$J@$pB+6-)zHulGzlIh2K zg8E1Kd%oq4uF}>y_zN?vP5fb)a6Tya!x+DC6OhbBf8KQ#B?Ot5m?vQBbr8LCK#)Z< z+)Bi+JFs_7)Q8$O<{9?4ug*msZ?=?t*=b3XZz_4hPs{&OB9*)aB~R9G%nRGU7-1M` za?VLi2J&aHpKAmD4efYxQbZ9aU2MrAd4TCOpYL9b$sxPalD)0NB+Sfbn|}ia5oDux zIepLfv9pKd1l$SJptpBe9%-fN1+__>CMdkYL4jad!j)z#y!15!L;^6cU!qb$SU$uX zaNUEPT(c8CFZB>zLSLS1g*S++;hk;j((L@QZCmqnN68GvD~|Ar5PO-_2Uz*gc(U^Q zTwVzHO20PH<5*uuu{x_wrygsVT2zFhMT@Bd6))x={sW$HGnzn7A~j;s|DTg!-zX@; zV}RDbnLmI>$OQ#oi8Ty=RqGS=Q}MJw(6tEpsFgV`A^sJw;{P3P4-T zyFqt9jGofdEfv_dNeGJ&MZOG_|tH$D>}QV#hCxhHo4InDY9r$;Km%*z9gH; zhW;Os)K?k`z&M`)jRJaUz5tdQ^`BN#^dH^tA+!z2Lid7)Koat9G!Q!dHm>6qwW}wkGl%*8`9#Ycfz!(Q$Y}z zX8|!6S64V}+;F8$0vgx$4RdIK$D!umGenOagf6b74XD&Lr%2~Q6v-x~ z>DA6wA+>~_m*k@7ue)>24d}T>ro-54q)d9m5@+k)oD?v?4gv+$h~Pb8=}=wTWvLMm zBL((kB@;(Zb!qX^av={Hfie?v$Qk@W$db_3Lu$ZbbZ*ncoSxN*NU_4D*;CXR#qa|!_CB`mL`(6sS)yX(Z}!70+(K(4QX+-=;XjE$ z)ebkDMgR=yZFw-%Vhw>qcvn3UD9BE11U6sN(i}l&D1}g2d$GmHTLC%58wAB9Y0nS< zCmEBQa%ZdRC`{ogLGABjKKp+=z7uDcEL5jFSWMjVo2KMXNPyH)+Hg{uln&NtO+t-n zX%f~v{3tFfbnDBU5un;0KKoS_-q=M!n5~U&T1VQs3cWOGSq~^IBf+ zGv^P@hZOD7t$D`%U^}6PBjEYwqlOYOFlkTG(ho#h7o;6U?fsE9L8MWN?y!`eVxjWz z&y)rl>YmB94`7Nq;@mDQEv)WtMfTyyKHJ_}+6q7?Wwfm;5?yXh8`g3UG82{SOimuC zv_hQbi00;+pr$F8%qTXjfN3;IhD*Wz&{W~a1 z%g|SaAq;2)3YIAVojQ5e?Db%*iW%i6o>fG7$OD9ggzG?qtg=SBgLa%m|?g#(G zN=_Y&YM;|<2u;|DK{McKbgmt zDWG~lroOQv@&hlp=@>h3wRs@A5Erf&Hr=hI{i|~^lq-VTFNXV^l=e5=zEzI_ZTLyr zL$W%J$%CqUBiC_}tLm}bL{e>8;)p1tnHx}_Zc!hDr53pefAs)#*0y!knARhXNGTT$ z5k&SU_ZAy=uc$(WYxBs+@}V7VFck!&G$E>&Z}i64AgqRv5ur7}_&e5;9A2X{R3HPy zfNPzTRUM6vtQNJDBz(TDpBa}!3LTV<_1WgN8aTFs2Kh(A>NjlZ8@5mjjQuOqOo9b{ zRX|UeZ%_xQ*|Y;EW)7G*f9|~5LI%h>d3+0};f8H`DfXI<4zMdjt>zcPj+xn_< zDc+R77*@o*d^O(3T1BB))!k7h$dVl7J48j37Z)v67poQ!WG#LUGmEN7%4&*w@|9@KJmhy92c1a75zI5`u`K1v0Q0LG+E3VE+qGn`70R_Y9NU&DT#g1$_ zLO~c~UQVm(HW=ezF~-P0(Wtm#lL88;w9g=$QVMmyN3q%dbRa-f1%^u3pLnr}^B#+C z42M7Z&gh0Dx^dIXY;p6;j4rXQd7-!>NloPLGH;Sv)<%j@^I>Stpbhmrk2J_kllzdM%Us7e*5p%(Ph(ODB^Y-T0ZsQ^CxeKMB$Z zxHAHG0+Ij0ZQR1E9a2a247b4Gux5CQpdPVPf*Rwb3ve^fUONT_*9-h1AN%|myajx9 zZzyZ~v%K1>O_#KX%$6<@w|HMnz%NmQ@Mb#5&pK&Mr9C6HRLIff;1JnMheOWgApbFt zstO^j43s+_HN5&ZqhPp?jLOjNvXvG`xt-KC(riCBWk|fwO zd2Q=P;CD0VH^ad~H9=s-6p$RFL$m-!6HF+mcMmNq!mkguTsGyktIJ+kSvwHrh|So) zKq*qovjdVe!F41C{{YHSgTJ|kmJxM8l1S7gE6e)8e*v4={CGl_%$PrQJg)i4U~(Zw z9nhcTrT+RFl91N#>*&`ka&-s6(VH89_!gwM=#&A-{#%+rUaZ@f-&pFF&v|;HpeK>evzjbIo3i{k7B-blx-t(Y=#k=Yx#P= zq^6Q}QMgl}#%>dOp!D4cdwGGz?vrehsjX@wQ}s4AQ#zui8bsdC$V*D}lsDVKnrw1P z7J!cyt2*k#^|v|V4hVR3flR{<-WnS{8s-@ zd?tJ5xSSqS#XWFubaTebKDO_;oF7!n@fCVPjsuZMQinoAXK2BoMMDbo4x0BD0gaCThD?)7Ra&XN%g6= z?ghD)?uEt&vI@Hmiz+W4n~89)HK7|kHgCNujn^NLl1v4IiqZ?pEV+qkh2=$-glD!T zLDnuep=?_xbTPN-*qHJ>=|{K_ql^!bBu2u+$q+O;8~W;zMJYuH$?t zr;+wj!e(8HCn zCKC4WLBU3vV}_PH(jMwyqfg4wIYPG3V$3K0s3u!THv$o})F&cqBWiRc5AXz>Zmqiw z26*i7Rl}Y=DUZx>@Gl%0wucj9swsAcKg|{dyGzo!&!jp>P(?_iPKvG7(jM}^dJ3Iz z@RuCHlu3W5qgUiGROaBTz-~DukA#=RUqE;~1)zJ0!&m7$r{o8$4j7{#(^GLEO2bc@ zpl6a-CkM9*x+i^Y^Ca7pn4)`JFux+iV6q^mjU4ppuLU!;jIuFbHP3{-BhEE5rny}q9@COaUJ@G_<<-~}p{7vqe zyavvM=o;6lrW(?6p|or`rY1cL`knK`e&T)DrPDBUk9!xWuI8M=fr?4Xo!AI=fZk^4rUS^;{9ZV~ilQ83q}I+$nsW>z z^q_MtaW95c#$?t>eI=H%+DO)dJnVGz{5@Y07FftWX)EyO3+H7AM;8cM73QV)v zTli=EW$>NP$$dt0@cl@9N&$M259^qO@ljJmqiS!KQo^_7qOGr-akl2JpYkp?OQ{AM zSvUxBNV(upj1N9aT#tL;PV_vsx}ERwMu0nuK2&}>mipoMhGxihbgFYPr^mf)$$2@q z{T2SCPc2d{p(cHuYH0=OJJoy^{-=ICFL#S-OY2p!{k0im-?JRq%f)?lHtk8Ii{#YT8vvwsuv(PBur}4uiLS zY9d4>SK+{eGEQ|JJEMzS4XY4RQqX3@%Ee=Y!2fpeN=GDC@7AsM-2^QyZg&2nT+js; zf4yo^_APRKZ=hX2!%nbN({q!whol;R=ELF4BuB)X*@Ktl9vFG7m%VaH&dRvL{T{Vw zFOjhJNMh!!zT?x4mTBfje%@)SB}PIdik|0Bd)UQGa&O_xE!{2;MkQ~0*etu8oOm9P z_&BCMw<$I1DUsRaIRchnk_Fr_pEl`_dDwS$xiliuKF(W;ytF*zXRA@}op6OGq7!kD zq-$Pva*=(OUv)MwnI2kDjdGgdI3L2!G|K5{{IHuvHvz6*;qSZIxF$I#_6mQ^trpp) z=USdhv`vRHM*^u)n8qnG8(J61zBMY0rIhCcAz+273kd=hgB~*OkOlMP9!{o9=F`%@w&L#_|ssc)bE2f5)M2qOHJe z7yIo>U;#T_mAj<SL_=U0EgW?hBjmJi-v zepL?EjsBT;cNn*jx$zGj1{-~~f%k9QwA=(+aen~JpZPANXXB=ZQYB6^YrF8s~4d8!0zL6 zUkKNna1`*)mREAN1y`UtIw%Ma9en6&7QD z=96*Xs+Ha1h6#bbi)4lG0f+n+OuNVq7VeZ6h2AMNynp3yz-^yX?v0dP9`=<}PMCBN z!u7COmrMuI2F5?!cc2X$OlFhVLjoX<4nCf`0Y0^fYSR&34*3g6`5BtVig~r8m1Keu zm~fR8Lof1w`uo5gc%q+}oD@DR!ZCg}%q1s8T;sPn7K49INBoqR&2wP}F7YT2t8_sJ z-Nmwkus)slxrEYgc+Dy}O zYjim0-KM=Ut#YUWyt3+?659j9J8=eWmPWf>wt?-*WcOYovB!J2sG0>EbpK3A{R zSH&wP!+{i_mzVe!*J}{Wlq^XL=-f&5lM-Gd(<3*8)dg9wcti2G-W2~D{EOX~?=_f- zZVnsjqebnDT&b$;(1lgS=OuI}r>Cp=L?=7yl^^MQiHG3D-)em;;P_+;U>BrAq9H#@ zh#|R`Hvw3lbTmuLD1ymm!e*H0VSo4GK?n35n>`DMWi`JGH3j%Q&n=24Y13k)E#E-fDeGtF6FHj{? zN%1@jVKoHRG{K=u90v&xpKu7aUF9phUBM3Ucc<@vc-7jj=3rb5*Z5i(g8^>H4*BIV z1s6H4X*@@UV~%L-mv}J5VtPW}NgMxt(A4W@PFOcaq&YEHB&IP&qVfFV)dWGV!Q<%i z5+$}L>`c0@Cx70O?DU0izQ}(9vxY=?ef(c8CGpex@XeRtM0)v0%2*um7$=L?DJgN6 z`8Ob85RyikxpHGcu-sTAo#gO(ey2|97kQ1pfnkxjNj7@0!OPa@l#gRBafesJjn++9 zWubS;amyvX8+O3-N)}37baWMReN^Ivhi%m>J#nc1>13z%%6${Aao-K;FL|`qHDTq< z+V}#sSW<0sii&RmW_5{=0fLx#i{V%dR`&v*0vt_p1z)u!z?98w!vUJVheS`N>&Wjo zg;Tt2gF(qKEP%Da0|q5E=o^L|7!Kc>ThHTgPF-Ln_%=-50XscY}tsrD} zyE!@#QUVU4Dc=S0Afqo86G6`~`VJMA>*=eVmpvS$jI&Z+Q8BdfOS*+5z8Y(2v-IbH!${>%k^*huUt1t;zdJhuICM$vtCMz71a5y)FN z?HJz(IYZjSl>RSAAAA$;e+IG>IX1~ABTU{~&hURay4upFXIu6zq}MtD{b!wU_}5u) z&V<-hHr8Yol>hpgBPe$-xZ!9kn)sO~Ivl$xdkT!oQ==0tM{xeG2v3MXa1?b3_!p%| z1EMR+lt?EZ_VOdJv~rm5g}N`C z(?dz^2Mo-ZUsRlJKG6`=SYR-Svn<;)yhjl(G6V&}Dc=1JQfE03>gZ+J!AgSRC*GBf z3RVWfzS**1CB54*7@vMv%>PB+8S)RoKs)I%5Cn!_JJ<})fRtGqw0xS^u;al>`-szg zgTMVQy1Jc!V@xqB8Li#?HcuHYm=Mg$X}*{ZGAbQ{PVsyW;Q5TJd^ z!S+(zWj@2f&Lb}R6hDCnSV@AhCNzuJ7g{l{`bl-|j!c`0^*Bt_m4BA&g$Sio#N zTit&8y$Gno{vM*JSr_?I7rivE@q2-d1szkcxRidvt;J4)+dh(;%f>vO^svJybLTbQ z+m~HS`cZUeT>-Vzv72&VWH ziGz@db0FV?LW={X30b`||Qi>BI%q?ggK4=#!$2<@MK0ee<+DszhO z$6MKteQbl%XEvafk~{7&-|Uf07s2=;t;&*}1FEX0gzOH&7w58Tasi6P*S7VSzAj>PMhv8CHs?nwD@MZI}A6hACh9mqg=53{bscrJ$iMKjB@xQ#STda?NyS6Rq>^@7reYXhVQWVy z*~m8l7M$9NuCMhU;kSxzXNzth;V^dEueGAWxAUElAaAY27=Gj<*uvIIyj7h=)s^ha z#V=J23UO+e>IYQJlp~`$6HQ!kMA#>JgFup+?Oo4*_2^P1HG^zcrS-HO;U`_XtZJh^Pz6XjdO$+sB>WjvZ@tsq29h z>unN#*L!qnAvRrFuuVboSpbqqB|0?1p6Crh^Ig1bWTcX%^Rg!*l^)>e|K?{qB9+{P z9ek_rwu0@vC;B$t)(VpV{xn}F3SnvcD#v5hh$eFtyt%S03ZaA#Jn_S`Rv98;Bk}r1i zcAn^q!ryoxINN!wPr=`IK8txfkMbSCRyYhTTK00Z(x+epU*m_Vn+$#Z1}H^9Ejz$>lZO@npx-?;B|E(q3kf?UVu5wE(Tk z=EHyzyTBFORk+pNc(tqf!|IUD`(Xi2g|vOh8@sF5@~%E(rBv||;*XtCI`1cgOCs$f zq$T)viTp3#kUz?|npe2>n^(iRh!GSw$=a?yxN?Z`v&(Izyr#%GXoq)gb-UHPLlm8Z zq7xE+*cS4}4pex>+sa1q#+Cc|q(BNZeg=oU@fK1Wy;W)h5T>Hqs^oV?={s9WZ$8-S2$}rH7*QL&hB~eP+O~p4Nbvr=PQrA8p zN3wZK!86d)-vUa{D*hb6j=m zQq=j+mO59U)G%~Ni{I5!<3lv5FC(!4Hf*ILgSG5=ebjPMcuPy+e;_@>`$~b9`hrMZ z*^;^psT~CXCzyHBVYVHHJ_rGAJnc8PR}w@27slXaoZu7}t81^Mb=?m+{opr4U@E>3 z_V+k2c@OixxJG8x7_;0Zm9cj!|0@nQb8Jk3cLiG(Bfy8pfaG@b;B;=_EE^PZZ0aNsu^y-$dk^D5PEra3>q0Yb-~Y?$AbVd~Y1OxH-?q{5J#8?LP!0&>1w*YY zGYK%|Ek~4^g+RJ3&6a`0kNNX%==7F#LfRS!do50h&E3I2aDBz|eG%y9mo8H1Uke&I zb@jY&Em%kzWLPFuxmoeOH>0D7w(iD-U< zGpEB%<51B3iVw!?G<`@6E zby>sa=YRch89}j%hozK?`=k_dLQw&LUGXLP6vB|iy4)aOq^KVY}R-%#+vje*~7E=~#3$Yn(v^XF0 z$xiljqOvY!JN8=Ng6({iQ-{%xgDv3i`FzKB@Ouc0Vz>ZNi;HdOr1Z-?%oAOy!wmaU ztCNubK`g8Z+NF^DOqG(zO)JLji$h9l%vdkhN>$=b+d*s7rN&@2cW?u$-p%j9D|22W@-~bJX3WTds0zGv- zjFe30O!1q5oD@b~;mL|xP|tJy_v0S5N^0%I>PWPA2Y8f|#Me-Nc?Q5rF(#1y z!FUU%aXfUP9~2Y$yw_Z?4OVm6Jk%C+h}*#*OjZ)Yw*%$Ur4F%uPlSQJ$x7k_+d+j( z#{7~FetvZt>ix+ZXX_8#gp8IZBOHcydZ7*a*UEM)Qixe5Vb&^;vK!A%n!&&ObZKj# z^ruS=wZUo|%E9P!-_A-x(RMzE2>%$}B8T=n4Zk$n(!g)Ah_Awd$-(t3NzE&G&oJ2M z#J}$NcX)7!kyf+--(3o2<7Z~scx;$#JYr_=bym`%Mk9VK{^j6b5B!s6v5TFRtf)2I zTD*!?tah-h6eR^${VR?xwj-G1d0@&b^@GjF)*Y#qRLJf+I@%71c!P*P zvhIM0f85c=_N|B~U#o-7|62F0h%a%-w!!8f)_o~L(;PaWAXR4J0M__P!B)p3>i5+a zb3L&6!RCj}-&SK+@o`-odf+Uh>^h^C@qJ`mpnfJY9v2z^S*=ILJO^{7;HkG3vKeh` zucP@zf$n~`?vrW*a-@jnKVP?7ggQD7K^5!uf>cEx^a(e+*d6IgT)N6R-2L zl5}OXZZG>JUHMn*FNI47LY_hkzU23^If+UP+htPPgcIQDvvVwF?PE7PY*KQ^ZU?KI z_Eb2omjwYd^AI?khxj^iRm`f>aB3rP>OA1olj;ZC2rS&1cUv!R6-hsDfBzW7kxI$e;hX9*9A^&c_QSAosLw7`q zjX=bAF4gu4mz?Zy7v+JFPXP|I0rEDp2TjT?p|C?KAf)Xgd!#E+Qrb3T_7%_jQEvlb zmDK2pr_F7_{@Ug*OY#5`zv^TkbXD%L*6>#TQCFnFCx=N%#|!rHwcZoh^dp=4l^Bvv zcg{_QLP2B@Oz3WdGoew}{3ZIN-#QNvv9gF=;XjDuCz&3_i%F`eFKFcR98i;U)>j`u zd=vk`Uz}Knugl!)>;sjxF^S(IbcJsqy+qsBoi@>{`U?>?1>kf$AK{8u_Y@9|?PFev zTa&%hO__jB4)+@yb)bIxjZ$UVknevqH~Dhkc1)2vyqROpPBN-Byf2{Gc2Jh93Rhql zeY|U+I4SK}gWE8+c6HUq{98w&ZKb#y4fPcM%n@UI6=6MWbF4vlwr zq1bQ-E(kK|+t*hi;%&$C2u9ZG?Im8F?R^k+*rp8St-jm%>&~Rj+iF2*}`nW^-qH(^}aKz;D={doTl8zwV0K zb2l&W>1|J-y?md7c{%A&ab2{n=xE#3sBax7O4g%fJCwXtl-vtj#NCzHQHS}b4wA}f zTM@bW5P!$9pk_A20U|4n`QYupg+-tpW6J3TE&itWrjs6x0^%oPg6e0ifbV z*CC$Ecz5MiOy@6NmXo8HV)nxOL$Ep)a3R>%2@k&@_!HgXVI?`rNaTWL;(a+vS`48> zqlRlcfmWFS0RV$9M|ni|5u4vb89a#KgCI0it>#008P(bNJ%H;>!=8`uuU)s>(rTo% zgZyLv8eZ-`1aH=odJuF1kYNxzkU4uOokniw{T!VMN&#Ov!biLJ@`J!{BWKt_FUeO_< z5FO!TT)DOwbZ8Bqg3b(s>FJ(IoOKnyANAqkn+Yyf>M97nP$x43oveXe&`&j0iAGZl z5PFz~2y54_U3jZ#6)kV$Tm6aXnTFoM!7KXO-4}-#ET5nV!2Ei7gy}=kzkH7_Q&+!= z=L#BS!z(+_RPH)iwwTTDrSuSVq0mF?`)T9>DXpmbK6N!YY1`XN>1*8vk6L2^&{qM^ zd^vE59OUo%5287GZ(OOP4$jj$XdM02Q%}ubSWvJHG8>C*d-?Z3{RRU~8I0>>G!Xq= ze6;^|QGbMY0BS99_OSIs8X^38qz>};6sdmCtw=3)rm%&*l@+1ec!nng)ji~53AZZQ z)(yBlB5`{x2_V+t7cgeYB@?qmN*ji`FZGP59*bX}N0$!s??WIgh&!sATcg+=;daMd z+buOxI?=03aJ0v{55mL>&HgVgY?1VXd?L7pQbrM;QxAye)cv61-+%x8+1*FnZM9|9 zwpO?CA|J+97Hu2URG$4zUhq-5aS}{X66Jmk6!MKg$toN(VV$P=Tpx7yv5l+MrQIsx zjWv7uai^C17gsl1S5fOnAotM2tgUV5)mLW+AKQ3Co!_8N6Uv%ztn@8sgiV(PJ5*^& zE!Do~)W*9*_{h_Uf~`%@iM_DZMdt9yVgRe?qukS1J4!0%YO6aLS{$o+KVXDkB+;(z z<>)3Jp=)?J<_FF-F+b@vKdI2Z^Uy;hwnx0!ja$4OT6QBnHa_BAJ@7N!vKwLazr2;{ zd(ngbZ02pspggtuL3K5M5RE3I(I4I6_Ti3j`zlAeAOo)EE_aIUAP!Sk4C`yaTp4#! zI*3zWOKGV1AkX)(qqivuDSIJ~t5XvYr)~TWXe!8burAyl=Lk{5?S+oW-7KN6GWs5( z8fm*cS+sr06=pvU8fh3Tw@Yd=AeT`!;<%R2`C?9a(HBL=dGxkA2!rz40bK*9w0Q15 zt`p|4K&wLfL0;!(d;2Qclfvwq{2{2T#$U4g?z{5T(<@f~_WasYA8h+|*?Qbv(x(r% zw2tw<=;~aZg5Nj*0Buv^1@F%k#N*X`kYgo;fDZBy+yn=?-lB$Xz#zWLH z4FC|e>?1C_qi&dTD8-kDnZ6ZM9?RC=t_PII^E89E} zN*Y%NePt6i5PPZ7z{mszajOE24#3HGbTfy)VFWL@5jLN*Yl!=M4lHaEJ1f~ujojtcsk}jwdgX=~ z=g%r81G~^dn>2rBi7Kp#sccJsB|Y^VPlxnc0f<+_F$YOBB21=1gqFcNMIk1$9lP3J z>D;FY@|QYwgb?xm5HgkB>VlB%GUU_M+5&UI3J19s*j~6YDt=5tPKVKn!^{P%PU9uR zMh{S8Vw(6c_nYSwsbJ;e*ibNehhtg?x!L0bls+*|ICzux=r_Z{s8FaV_ep!bIm`_7K}RK_5CQ~FzZt$uU1bU74flysE-t&CYUpFOCKy(f=jr#8 zy4M%rbx?^EH_INV#Kbl7Xh@yvQU^8lgLRTFW?}wh#yMW>U_}F!=!CQUiofIWW)mpk z0TU=;m{B7nRt73*L(jpc4jDsf1#!DpFNMJv%2f#J9h^gXese!Xn-k>T*o4*HHfz8TQVytH&%0X7E$5b0O zAHeINIR~a-!T0=x|7mj>uEj!;`keE6GoK4T054pSo^LMkJ@_V1o2Q9Olt}B>^KKP+ z`-nOwJ8vpug$?_s&7*9&;2?E1hi%dNeE=8S5St!^!sdCKflad75%K>>`x3aQ%Ju(u zhT$;mqvDQuK*Z6DhGs@)HX@FLS&&&-Squm|xBvpCnRdXez|!bmYshZJq;+Yz<+zko zhILzPhq8N1Gmn*`(lU^GhIRhm=RGqlqG`W>eMZhX?|a_!uFv~y@ArX&b#T=wNZF%+ zd{LqN;n89QgxV3^+W(J^anXKN70Mw`LbbLc3!WzQ#=MR&xqI{P##f1vjZ{C-gyX28 zGP*l{pu_jcWp4X3)1XplfKA8#-ZWux!YQR0d-t@a#J-D@wH(o=)@{<9LhRmk@Z6yH z_PHna@r$OXe<(jU+vg_W7W=9sVQSw~@Q>8;CaUkv?y&F2^T>DGld%^LVz%T~ zWlifGm@C!0Gs?^D_L%7~rGBMoJoX!=3o$5dK#RR-x-er`r! z^0eFjKGNX|*0+O=fE(qOCgomG`b6#%K}+8s<~9}f4rxA^#SQYdrJNm8Y|Uy7${G67J+w3B z6y&A+qy4J}ygcwFAVHK5s*>U57*T%sWPgJuIV?F;K72CLJN<{EHSjcbB@2nVQwT3$ zkDnn#>MAJs>FgQkg;UD9Hv6g>P=Rb~_QV##{W_QiN!du?_nLM;=z>^J7#Olo5bHMEZF_v(a5LOp^npqey`IPcK1pa9_6*QMw^FL_1khv+17e)8;aqpXNEjD``&9_ZCb{2B-RpA?zAa*syW9FWV5^w%tGXDD zrUOC_;rZv`MFMnqeJw9}_0qA~SuOqHo~P zs%g4ISHMlC5vDTxEh&N+Re|$C7}PmmoeUc>B)NFV@U`(12Ak5 zRtL*8_&1v0TatiIoY`vsB1IU2$&?6Z+Y})#q(T|ddX+f{v|$vEjLZ@ygGl~__vkI( zQdr+&Uph-L&OW7_LL+F`BYzk=F6~ae9~v%A^gMj`jTUMRT|L_Z-^eY^@SCAlksnh( za0Zkz1U`q9Qi)i1vxG@ujle(hll>g?(6-6#_Sox$|IWpNZ3!(8!6s?J8zCH9h&D;O zTa85-g7;Z-auh@5*C*+|n}`0QwAkjb7cCghXWAc^gQ|jG4&}ochT%k@yBlT;F(5p; z<{%8*oafZCuWGTcn=OnR9^{IEGg2v7jp=3!Y7*6UgFJe$%^dzz@RskCN%k*i3#0DB zxvI7acx*8TZ)sG*+u|YTvT}a^RQQ%4*N>>0JUAE*njx5{y6>XBA9=xT92|^ocrq{g zkJc&4;j(dXh2nw-*yzFP(-W=sxz}TcHp2PEe&6*%u6PP?cs&QJ37qbV%vnD(1+_Qh2TGY1D-qY7gLy4mqQ~*A@a$ zB?2`%?zs+bv(s?w?W8gb7FBxMs*J>YN0eeX_(sZjr;^^OLil&M{2<@6ZGA1QVFpWD zr3H)RQQn7x?B~Fp*Fqts=GfGJJ>ciQyFnN=Xcw@sT)Q9IPO~9y$s!wh4Y`#MJ@!GV zf^q&2ID<0|E*c4NN_wg_2Wi2sTiaAmos-JtZ6f?Gep6D~DCJw&*nKHOJ0{bo;3@Pv zbXV$DOJ$U{`kuc8OH?YH;wqGh2r8Q@nEWgWVfHK2gi*TJlx;2c%rwC=tM45U9v0n4yQx=32YByGoHou4zgq=B_CWr}N z0F#V~Z`Ny~AF+faFxNXCv3eKMH{1sqQ7&)q0Y9P< z=3smNf+p4KIYO*<8_4z?VZbdFZWfE!V=qRdO37`B)gX>IlkgNudW$5v$q8%k6UbUxLrJJDKZ;& z_p5XPYi^(eA`Lvs&mzREXFN13xSrgms_h^-+8TNEG$w~{BVGpqd1?Z!z4*8ps{w+e%TZ2U`GXzS0tRT!hmu|IjMFh1(65{f1=*U!zP zQ|jEi*jdHDgT;B2_dKsE)gAT|w+iLLe7q|DX1{NqFwqab`ETr=Cj@G6bJE^oXu`AT0|+Xm zGe4g+wsxd>6v9E2145}1*kB{k!wt>X$T9Ys5!(Lt4f6$~{w?K7_W>of&Hmcjr~WF$FxUzxI<&qKuC1&)q$MY;M!}pd+rh%k^3|IAL+tKyuER>cA!1M zD(u%C1{|Zk%_?la9j7)tv(DZet!tVfwkWG1?cC5aR-5ijKz>F} z3&Gl*(dS3w>h?Bqu_;nqKzQGDt}JHBcgi{}BXPNP70D>yK?P(NGKDd^@02WrQ_BQV z{fm+RWw|HRnP9G(DWfA@Fk4fgMZ@kF;9+gxJf{i| z4oJqv;#7*q5Qu}|qx<%Ah?Sp9N(Ov-S&awwOn+<&gsRA(dQkV-KS#|i%2@{Nr=mg? z#cZy6C(={Mpn2lbyxc_`m6|Z9XWyEVmVR@}4RbG_KrsE6O%#_Q@_8XZ87>YS&Jbu6fd-1gQaJvo`Uo0 zjrEh!bAh%Ln~8c?>g-;lb0RW{*2|G;AWrf6+xo~x8v!zp_GRwOJID#xBx}4?MI3KH z1z61o7r}z)*;|G86sFS?2^|RV8gJiuVL9SOj&9Fm8r*c-P3dz}uAh;5^IYmjL>MT# zhsec6;TF8TM)Se2TZ1570&M^9Yj1Q zG8XZxCRV+l&F}TY!t`q*!}JlV4draMFd1dpI_wh{3O5+%qogpLczL@%!3KH&W$YXE z8gVxk0@a7gCoO!@A^S@Ug#x_S1R-OQFz=RUfj}Botrh=?+*^?Q=b>SG%B_Bd-q4`i zU>VF0OnDb{P7f0l`MtgY#{&4Y;#gk?gfsH&$H6~nVALzx}#Rh@bcdu>SL_gT*y_In13&Z@HWfF!Hy*Z`UKG5pTm&n%k?WZ)$(B z56BT7k@hH$wdt#a#CPghG<5JwNC(s3G6D>mCMP!G4Mg@c&QL0 z)j}^3QguQJ?c&QHB04elq=$!xU^R2AakdbY|C*SY2%z&hL=vKto@a@8iEA|+jxiA+ zAclf8hZ*UoIaHsxHVF2!X!AUapKDqx9nKomaywZJfl)PT*#UQK@d5WEX$NB5hH`Q3 ziE4R6;!YKfq!PgyW`m;cvt0)Tb*P+T&s!$^O}ZB41Vh0%71kAeHxGb1dH${^-EywM zDd+mTHoHmb7*s1h96f9V{M|7Phic0S&{XGY@Q7>uAVX+e@1yR+oO!MgjRpH2wSd(; zcrgOJ05L=)R|fTcU=gymxHPA* zC_8s7iY}zG-v%Mxe!awE_uyh5r^;$fOAijc8TJ~T+O?W7+B&WIu?)Zi&LlN4fy7b3 z1;*nD5NcZZgmB>Ae6I9Y#|De=dz|ABVWd{R$YxEgXGIdVe!+t5{G#;S6-&F}di}*7 z;E2m$JsyIj9r+f;Y1O#uAt2!3F`j%@9VlvCYx(`%xL;qb$NdW2OQ+$Yq%%*cHewX7 z;u#j=UL8R|hVHC@0{n5Pg(D_r=TB>@wQh5#F_S@FSGmq3>fC`Lsi%c}`F=sHe8Bp^ zzTuVkYsAV2vF2^E75}cPETDJf2mLMbLi`p*Orc1(ub{Wz!!N_7w>RVp!|oV2n=tNJ z%~*8li!oP#arjKh@TdTHU>zQ!>KNBDV=%PJvB>js423TH4E!AB@n_&zYp#St!p(@J z7XB7^d-hX3mV|z=JjH%>o-j)DseM5n4$n}ekrP&<#oy}h8bW-Q2+o&>_qe3N!dPYI zlP2p*|2Nn7Xd`k`G59RfsmND5Q;ifctUBg7)C z_~g2HS>EuilhsW37B`I-XX3?8<;6+#Vwh(r3eZ4J6pc_}2yKW1%FOk<#{jiMw0R7k zjDTi&v`R~nau!+?$}z`XjVa2+*Dr-8b`42-p>0KxH}Hj&dpAPF0gV=ebE#v4ykn;> zT$-_{P>d7jn$zdZ^Ug5PKOfoq1rv=X+b;ZwiU5uiLlK3c_@ZE>!-%2C;w-#mTqG~;)ZTzt$G6_c%v;QC6wO!?SMCBmxgsgs zu@o(J!BdJrH9>QpMS9I$sNgL~pOlpAkZ4NF-VBKTf@IN4lCDQ*J(Ri3aR+jI$#VoU zAf43^Bh2Ikn-x@ZP`S7o$LCj{R^EiZ53^#}Pf8gW`GM7Wz<2(zp5nF4s}6T24rAyk zjkynh{${-%f(;}^_W)@-_VQ|t>)#%EoxH(-WDR>69j0-83)LJGt(haUZBf>&%4|6s ziz~tUfcSuQv7AZQ+uT-0gxdO`byLi+t1uzcTCERi#BFX1d*8jjQp<_PONbUgw!87* z+Qk)b;c6(Br*B1so@Yr=CrrXhk*yOUrTM#N129e_PVi2Djq3}K$vpc)1L_Sf(v1q` z<>qEDfcVve4*dxwLeSJ6Sj(K0om)swJ_0lqsB6lX)=7RBs80|C6#$|=XfQ1a-x8sT zQw&a!CQcA026Ylixkl60tuZN%8!_zrIaD6{V=N_1-nuR3X2*4S{x*MZe`dK5C+U*| zTn0^`lSN~Qqs@c-#6Ofd?Yb!cIs}CS$i9jr`mX|LF|64bbRz)v0uHj8;aj)IOm|#{ z(jMTY89A6<1dLT@lr_zS$)I!1gU8R2daKQZvDo7tz#4%IbQDom_qYe)Iuq9xsW=V7 zV;WsrcbXdq3Js4fFEgYJgEwP=_LOG)v{Qk|dOgxhOPGjU>qPVG=h;Pi!u3&~LuU4E zBtS$g%1$rLUPKstJx5Zy)OE^-@j?Z0yi+h^T`0zYm&?m90*Wzlb)>q%32-PS$UviW zUELOfUbcayd0TR7L@^&7D^@~JLy(w@T0>GO{=xE&VEkpSoK{UtAg;8o)9ozIANDAE z8bU{fC#i53I25&0ufG|;5AahtLUNJuz^G1tb*`QKub*os9G~g!Yq`ms%9K87kHA

                  g(L8xB1L@|RQ3H4^rA`m5e^>=2!$HgKid0X=h2&)?OSKK<-HBzDWt3P;FN>T zoK@|C=R31$Tz%UDkSj0+@+{J3x9DU)c!6us-fYYhum@}nbeZIrL*blW)av$$bM*V>grAzYg2 z7GO-!SB?fo#~H;%AHspV(Pb74$26=2wNQ5(i{ll2NM&ViMqr`&OIPLq+IKKe8PsY|D}uUp2Zc;oRU|Am z`n$dY?PfJn^};gIR%NXM{AiW!4D`PQ2w-g^-xEIbi z&h(}x*0jSubp=KNpeGz#L7lP$oivcR?#l>-9}%|BexMzQ_@tkCLHPSutK;>`BSlW5 zxIRgHIC@Cg4k9C^X7dcqL0FRIX_!iYn+9rjZ_cmRnw7i@HhbYhtk&GD^ks#G={!a5s5`y|;?a?qI9Im?D-#t)!&-iD-p zNy{9WNP3Yc*?(9ej5~)=vIb2c0!bI7m?uG;Y3+cPP)`u<#Pb$&o)_yg0a44qL+o(} zG0O}+h-MuhHP8rpO$&x^CUzOq3$XpKZ#k?|0$cWiB^1g4(GznD z3cWb;w9Rt3?=Jd`odJ}4LB1`kz>B}lBO~+e+4oK9oR4~U6GY9;UBvM@&Qk#&%fM^x z%Sq%F(=k3AY>ZE%f_^+3sttwI{wbY90)2ZQ`jY(aP`lE3P-*c=tQg-{3iCK#xXLh) zZUK=OxcVUzK;qbiF14%kcjF-TDpMqmVdq1DfT`gsxl)p%QUX_%CS6_&cidH#D@i`m z@W^^JU9^0<5Zm_{h^F=7)U$2N^(K=1D4(8L__Rtrt9YN1O?GwjF`G3HDPkZ#Bw{bp zbdYq;oFCN3gL3?AWAXo~qs@n;@;ws%@hL>qj-#a_Y&{SY26+BYao(4@E!qs6IymrN z45e7@IT|t*5qoyZO><}5KzsFtdP#z+rU!kdJ&JTMk719xLXI=X+VXL7Vg>xPSj}!6 zegK$0Ry-}sTLH^H5mhYURlLHzFnr%oV{t;+RVjg``s6F&)kwk8rgtDEkRjR@k)q%_ z+R2C>^+5?4Nta2E5h&tDUc@dZ7$H~*C&8xyj8R!5+>1aW7%G`toT@ff&Hdk+oW5CMjKD0+Lv=M0Z|47u6Ft%EZ?SDG{+SnqvA!*nq zi_sS!<8vz>3N%!LTn(OOD3+kUwheOP-_nvK|ARreV~r8owE6in!RoBi4|#8gAD$J@ zKZ~9209sRv-xv7p$1i_(FqV-)K4!bndguUr7G^z0{uj)7;_(f;H!I^?_x%yd*cp>a zBVn2t_EsTb?8%N)e*{@)HP?Uy|G4%3m4fd~~5fQ7Pks~of6;l#&3@}}-VyY!`v${zRYbXB|y|5|Xr z-MxdZinr6hSUXR-U!^PSK79OTT$SS4W9}E}%KA2*y@0Fz=%39vB7>_E={ZWmgGb=B za4p*nnq@58g%<80nni4d6Ra^Ni@w-c7FY^w-ox6TpzaHN1tVXG-V)bRZ>`+g8uOy# z0aQ58TVYjq4sGt%HahZ-l+4Z)I+cPL)LYwQoRVV|l5XZn;_5VK^lHgsvX#3Nc%0di zBn{#gTq}zY--Bw>=dY}jH{6Zu6kLz5D@uVmGp95uzOEoe1lv=ZGztX+k&Fjdo&ypS z+V?q!6<>(uUm%>+fLhu1F)*XoU|P#o>0SuaU9Zf*EB*UA95>;WVE&3uc3?^p)h21b9G$WasA)y_8 z>ZW_!5mIOJwj-d9B+cJijKGfh073FP9#t#xpE`&6F^gauE+?S3#;=~(<0G0{r@4>p z+Az-BLxFYiDG9t^Se;%Db0*kWwN7@TL1%4j++j3G+T>I_#l<`2UUZ7fdJizlDHPG@ zHv0U79X0h0^11rWUR>-K108dvkV5tk5{493sO%$H@)*kUi1*GH(k<;!0n;j6UskRU~RHe+Tsc${o7IAHTe_b8Otut(mE zg$VcDnUz~vx)t78x9)927j-@-zCa>XB#U1T*|Hqu!C0m*(VJ&j=^*}oE5Oz948MH* ziZ^nKK#`ek_nN>Z*$SWJdqP){Ta0(i<;qc}p(A3L_rs zHylvVH-hdP2h^_emQ^k}Sq+S6*v|7@p&DF?Vov!?;&_TI8rN0;K7gfatstYDekm_} z;NitM#LFtNX!8=Bs zZ)=uDAi4-nIGuutRVRV&5 z+ZI0{gJU+<2P?drYKbB*^UaW*VlkyekcC zkCWIB153k3!E`Q@4>plRiY&6aCnr+Q6~23DfL2oH+zh;XVa^2+a;y z9pYl~xiG-#S0x42#dyE7CrS79aDE*=B+e|+M}Dh|f})rraRhi&?a{@$t%rb0=0uRv z3yE0gj=!%FI13xc?2oS%MoI0!-yo5Y?Bvuw5~kH?JQP~2Pv60g$jVP}ScbPt6|d3e zV3$ z_VCrL?wr_Ne7hXumQ^tI)BVkJ`9jq}kOLz_)~B&F-BZ!Dl9+jp^vWAQfhwHZHp{!B zw>z^qAzHu*QKpv=W#Cx`Cq#FF5LrQpNY%TpV+D?*5>eG+Ysss%t!-D*>@)8ZqNO+M zueTTyO*x|VI{alhR_lok^17M4Xz_mNSyz~GZHlyJlJSNX&Qv(zzmOf5y)f%|_O+B2 zWz9C`h#Ai>vaN=8npq2stHlDUDp7OUdKLCIKi5f+S|Dn3#R8Rbzh@j$_eo{3Zfm$$ zYAv=-5r-XBo`Hux*@UKHKL4}b`e0vJf;w;oQxynW>Wlv z)6X$x$Qw?q)4+^rU29umU2TJn##kV)K2cD)x~f2ovKg(a`FIBUn5@xcG}~vJhD|P1 zHu=oQ9m?N4S6ZszPC_=b6V@x>hv4UGrtJ#!Ho!SG-^c^;{^`2tTo$wic>8u`PLVC0 zR8LFu7Nx_JCLQXibI2teJ1=$ZT(n?XkQqy1pvk&N^cv8zvlt_b+4WU=y=q7%jrM=R z-0yRSU{NHPCFUCH4(6B4HNd?L9-H%=deA~a7H#8gr3gbrKAc4Q&U(diDv%0ODQg%4 zjiIObGNn+khD>sp{R9>?8sQ+6G8(1$*VWr-*7j?sm~T{CQyr1daniUy3tXg98frP$ zfkW+`PFBNogu%>RgxwWQroQg#R0J{PIWDF$jwuS05}HTEfg$FMj8B)Y{vi<{J*N->pDwh%rI?Y0G2%iVoKu9F_#74A`xs|+ z7j>ul_L+ZSwH{5{?%0hgX7DPiE0qX!CDMLMs&>4Jw3~R^KECvTe*m+J`_Wync<*vs zV1m&eq-%tQ#w{x`AIqIlO{|#;AFg#>)>dC{I2to78bbj@lUAQa{`(79 zxD>5BW2tEfg^ab#82lZ5$TB0OjbpmIb0)J^Cj4{@;6WE{^_RHm+HR; zpS&JfFj(CU(CaXghT0Ch^siOcbKBS8Dd6k^YOlHL} z5+uT1kHLii|CVKJ!YNR+I}3u*E+|O#MveXQbwZ!eN5Ob#5dy~`{;s@Yzj2+=Pdb8= z+^m8WK%`zS=IUiuabvyFCNHGSF!A+JGgHHVS5^b{UajFe)UZn*N?oCEU_s)t?NBah zzIorBR;lL8?UgToC#a}oh0kI2$VKDK<7Bny>rr$g|A@u2r-8A^Z*-0Mz)Jeo&5H43 zHYffye9UuPiDRqkTN6BQA@45-D2LGsP`NZg*2-5{C)u>{MA709$Fba-ooe1lPuHkP z(%Gr6L2k=6V6ezqL)3)S>XKK1&cx4-Ujjw$W(0>hyr-_=&pdX{^H@wk~F_neZVW=FHe=U93-*Ghx=I)8{4smtIgqQ>WXoS!DOx zlZbdq*$8Nwmn;4`dB7HszK+{S5fj>-u-zYu(?o=cB)eb?4Br0%Krb6N5mR+}8KsqQ zi@+eXc|?Keh)0_fd7F!DK^4C%f9nv7gYkD%hqYLG->rjV#P2wkS!sRId~%?FFSm$b zhA0Icl_jBgC9Fe+bA-6gx{e!UpS?IIq&i1j&_E`61L77HtXNPa(hdaE*k9n>NkvUg z1b;U_MPogVh~q%C`ysS@4BEYyi>0@lZ{+mNje+e?o<#xucf5`z()ZuOm>Ids?Mr=w4XRvr_}AH}aIh~^t+1n*R=iA%8b^y-O) zIZKzO!y<}VkNr~W+%Q$omP_T*yan*}PbCrurp|@XZa&KMz$m?uX?57pCvU1EsJFLn zM02X=EOjJhAnD(}BtCtvL(-db$eryIrIM!*|KErZJ+!xWJZf9~JEDWZ8fLX^{9P$+ zvq!EM21z#Om|<{$XxfzqS;w=^Jj50d!e&5ETDG+mgiU+p$~Q z7LaWX0RY;n7F3pH*veGnh1&{~1qG7Luvu{Eig~Z~B^fpuRs?cQ(yt@+ctnC@wZ=E7 zP_1DY>47?~>afy%_kpGR-a|{_Wg|1Mgm>*H%5dIbA-Zby#uL+7!|E}^Mw_iRS$O~$ z9TxN57qqxb^A|uz%6(FLjd(A2C_K32=}siUyM}s|1Gbc_c#$q)%jvbaM9$4(Z4qmA zz8TY9nWaZBY?;#sz3{Q}w1;nlw&Hu~P@hjd^=AuTx>)PeGglPe)5RZB7yPwF&$TNm z|4+UdYYP$_SE8yGUe&36xgvHNbjH^}!Fr|Kp;X%I)(icm4rOyQp*9k9ZE@sy$m(P; za@BVzrOkr20|P5er&;@868nBYHC@4F(`PoFqD6c(1rB;?WCaxgTNA}Rc{At zY+{www;fPLY~d3YkDJ11eb^4&)+4&dDVAcyn~g~77PckCz}+djW!pR|0a_q zajkj@LlxXN-Z2;-TgE?TD`P{ez@^2PEG(35M!pMT3SJ_L6i` z>m(E0KzO`sj1jfgJW+xT;t#~^fP?NLQjm%d%DEcXf7``8jqB@nCW6Ucq_UkqTuM)P z-L_D}^!ybCi!QDey#YJJdE_mx>mm>Nd^uWjzxHalN@3x1X&Q5a%h@=Oady3ShU03a zl=BpO-v@<>QnrU$8O~c7QcE(8hRZ139aKC@lbd>BF!oNkFkvo)p|pQ!$3buSu~%wG zkL6KH08%z1r9Vgwi=7qcN1-`UUZyF&lcWtV`Wh`J_PKo~I0w z|JjOMILj4DqL&gE!qX^YNlxw}BtZRwp6-=^MNOL1FgRGUn%NM%sTZ!%_IC_LTWcY? zqJ3zk&pk;%>Qrr%qaRY=<#O%&?ow;^N>+2Ki^53f4V>Mr7xH?aB)Zfd@GYobE>8I< z6pbP6sRRifnru}Y{4-dLnFYT({y>d$c#T`Vs#Rv3ff+&wyGn|>*3gXJ?R z*2Q$E!Chauk>BZugdT|I^2V>Ef`BiL|M#jysyaNe%Z6bdiEGIfZa~| zx3l%`Cm2~~VC!339Hlp|RbdG~`=hDR_4{u%ynP1nGX=G8^J~)bx@)aVO_9~8eQDCd zx;-e(r^MZbYirg!_;+6!Jn=_CF=1uf+?nh($^>n$4wGFRc0~C*Bwtk-+pd(i*k5@F zxQXPVPyYW4@d-V;WEI+eN5Qj>htT$Nt_GkqQ`9#6J2G!$^|4&_07owJ-C6LIV=eNn z;rU3Q_mkKBXv8sUaS@&ON^2GK263~E_@EyY5#odE-AVY`0rz?ag#g0n9FW}W6UdSY z@k*u<7huPvvj-t;0^B8iJvl;N=Is-g6J}H!D^>j=O1xTf8=gsAOTGqL@&(WWlJWKa zmd*GaaE!neiVxBgQ}ehVai9l!bL!od=uycOIgd|>f&;hkNkmg)>G#xQmCzgD@Ru+` zhB_#(IA;~6#(1=Pae=>l`sl8s9=Ygf_|bMb(=i2o(8}dMHD{vJ0rM=2c{nH9Oik0s zq$uQD`u4p1yc9xsxqiF@?OeMuyfWG4`6$ z3YzMrcA5{O_OT~$_XM90|G<2B+&dq#nnUG(c-NE3X%7BqV&{GQ%E0#Tyw^*HuBwxB%irq$CN1_4_$mSJ3fJHl z;_p7&a<0M8S2g$=xbu*oW)Q}f)ht8?*_vh1$e}VgBC8g${{~ytft!s73x;)bMfq8>8tP_{1pw2|#1QbP?-o zI5fhY4IhFGGK}~1iNW~90RD;h+y?I_tjSHvK${JWd{03{&>SXy^D|}< z%{;GR-DlIG+3T}K@5412AIC~$l*aCV43Sf06!@Xh5nm9VteF)cv_0{dI4W z%W)P&@MPd3e%T(_$~*Bwkc^c~MeK6ZfH3$kz8D2UR) z!?ZbCSjHxOa`6sTbTHQSOkNyyryofs;eWw>({O; zeu48L1E=s>BWuTR=pYh^<#%@d`BRPED+U$fv;RmrusRVe24Aqt)ZjNF!WsIT5yoPyb44U#3VRN?a0FxX^1y)ee?C+@@D!fLM}{9gu^bZY=nLfpG3$^n&f1VmNY)~N|J&g zC%x9RYJ{oj(>b%zu_kf9GLCmF@djqT&@}QK`Fh!!iJf3$5}uTLhhsb53dp3littuH z{+76r4o{edh!2QnN#i=!X5=HtfYUz`S1Di=m^cEidokYHHoB=dj80Sv`@YDMIPah; z34A2fC!KW-jz35iu|67ZfE>yf?dNR+`QMM*`pLmGJQ5^BedpK(c*oBFa91%LYU){X z_@f!0195%Pxcp9z6!#f8S(3MKVPSR=3}vL$;n-M(HXw#XGg=uvR+3ko=UVonf*fht zGRXK)^kS(MExm_0;(`Ttr?1S-3R2x-JC`6z;m0|;rJq3I#M_WM;5?_2nvN9EsighN zZEeIOz3(pWc`AtxC7oaK;iDP7M0V8X?rz7DE>#6U{uXqGHo_c5T-R7SB_9UC>g!Bt z0F*cTl|a<6i|v}?j4m@`Gc^GVp^*@QU%yIl+KDv z7dI1vQw&F~30!B`R#VfL6JlWo+Yd~7F9=yTT}ywYe>EZA5rgzf&I5}Z6O$j+?~4YfA=959j2 zmY%<%62}S|Ss295F%zq0oySb9MkA(CB)xCoR!^Q5MZe*4J8=+@ z^=Cts<0=`MN8XpiTMh8f_Gf3{sUR-WH7*rY|A~3d@iyWJepR-?r^;s*bEz!XV||M_GqA$qW890yV$i^e#cJRB58(<)oqJ$P$#)Uz6R4jrzRr5J zBz<8`ggNN_|8wO z6Cxe8goS%queot919!fzAsVYEN4NcS-@&Ox-jkTZr19ucXsOym}p?+`ai1SsW(Vt9uL421ZH0SyRyAKf3MN} z1MJQ%sMOe#k}LIr?e}x^$zkvaNi0X_ag#+9I`930I8HmZc*R{hP2}^7_yA_ZICLz| zmSKvrIP=-yphUzt&u@!}(E)`$T(j{+fQ}s7O=jIw?EqcXnIo$GdH4l#YzOih=E*<_ zP{|ZWn{J*26MQLt?cLqlaYnjpS})B5bQwQtf64Pj;%rLyLdawR=nXosPcuImK$!;o z8kGS+VDN*#mjLup>R5kyB-F1Svr4#_2jeN0l8pfk1PZdmr_Vgp5+EH)O zv30#uM@*Ms^(E*Ne-3Ro(^0`Az7+X>deoS3&@?e*^Yt+Ccp{ z5hFYs@~EJGrBem%h)+zX2h{5m@JPOl%in5#391~t+;#dn5s;UEjlgi&1CHMb1hyqz zqd`RQqBI?D8@<-;0CZTxgyD{n=&*F&VRG&XClvCsxIF%`X`yt>hL-m--`z3}ud+Ny4iA`UeSqJ+;d z<&Vbw!8z2Al*SI65oR^V7SY7HD7gf)a6t~0tZDxT4mE!_Oi-vHH>e4q?O$Zl`Q?w4 z=dl#2p2m7|peaUj1S=bWA9&$yR!-S%i<`5bS^7oB*|fS8fMi1-M>sa1BF zDn{L@t;=%-F{S=-?|e4!5s!1yXtyW_Jg4fdc_Pfljmnf}(q?XgO<9HB@&oi%Kpm7Q zH4-TK4$8jQ^L0HH2l!I)i@(z1E@ZK8z+$~L4j0<6BqA6f!O$}XHbAa4MV^Ep$jxw( zILi!WF&kMA@9xijq&CBJg+BQieezCH12mBz0f3W}-_GfE7-=<0&Co=Cq`cpmhQq9Q z@4pz}ip+M$38cNw(<-HYUvi8DEu8j$wr%UC{==L5=2qD#?3&C&<`y}q_ivF zyY;ZVu^>`F0@e@;NGjxU7J%R;^p|)NRJ_I}@8asuz(e$R=2_2j(xQr+Op$Dd_#i#o z)og9ykU|*e~<)-;#5!JIVGMRg2ybL&j)PXc7o_2$YM^Yl+Z$C1@Ld(tdW` z9rLvs5wkmuB$K^wz+2^ zbrv+Rq<_@fPEFH5-FVQtsgGH6$^<*-EN0!rRj+WbT?{VEqg>u9t`!iRo7i0gY&f@i zk3kuYn(t`PtT@-AXSHYmhYf_TZDQS4oNff{Z!#c&DQ3EBmi=nGFjTS|lA4}P>eH%i zq-56cE^yA&4A;zxUfkDqS~=gmXSGt_{S~ zvEHXHZ>89{8xS(#kxCl8xg8s^cH=BevaRRGx<_K_ESqyT9Fjf)Bsxth83#Q2V4))X zAIvJ`Kp2TU%jc|uf8s|<63;UrMFxNXp-%(@U$r;Vp+_lhJ>WKMCzRDunCFSu3~q+c zNC979G;<`sT9_#{^USp~S%>%tR6guhNJhk zDCL~ry@b=$KP^-}lSPGIJa6aeV9MT=KWABiG#Q9qaQp${Oi|7P^28A7Fbqy1j9s`i zXOXQ)q?4TIymWzgI4b~SCjdF27Fw81UbyUe9Ga-WZ_n(Yt`AdBEz8NuTAD41s6DBd zs1fR^Z8|FgfY~0c@?zpF$fPr+y|Oa0bS07D#d-6wSeYoA5q59mN~4q`!D#{qJB%wQ z^D+O%UCI)iqs{m$8gVFD0$eejLxzra0x#f-V>HLL5C+;H|6(G>OQ#e5%|^z97T#oJ zVo^YZ_z^kJm2==zt)R@_tSh&E-0Y#n{fK{ zAov#KykkO{<8I`f$a7-I%2dyfyRZ%3TJWGF4{32cZL?bnD%N)~<)Xd^Pp9Z4DKpyuDnJj8M6 z_L-Q|f#}w|3$B1x>?5El(r{7xwYBriE<{iwm%YIkW~B17b^6K9d6nZaYu1 zlVG^UIo=rruu+3`x>MdTsMuc)B2m#A>=Yj!R7_{cNUPRbZ$D81`)adN)M5aa@AmE} zWRSlnB2Z7Lzwj7<=ZlUp=hVIEH?F&&jqtaaagHm{n;&x#TjaTL+-fHRJuD_OZ=6?y zKgp}VkNW-!kPB9NIqp+RFZcQkU501lRi~kGa1yzUJBf5Cjh_AWJy<*vpnM2fZOTyWvQ7*h8Ne>O6?XH^rSK0cGcbfXl6q>@C%;^hXy_H9$o}AS zaUi<_S>MRQX4u`T3~v_D1XJX`9XcZGd^&k8U2wyO|6@GX_~V!GU?s(Zyip4#Qq7TVWPA4$&PDH(DQ%7aND)NMx|pD< zw1**DJkVFpSS&9#4`DU0pDDhUG}>@LYRyV7NuIE3A^yX(29AE}V+bU*0lv@J0E6L` zAsWiV%frf9TyS|%d5JlYbVBi=puoRkiGNve*3pVKm3UNPtUuT2kcm6fplPTpm}6M5 zX$yKSbCV9tEsU=XwRmPP-69OQmIS(Q(J%k*+vqrsGH&&jaR4NQknox7?N)uczC!QR zSA0@W{&=C~ObjWPbD8nJ+GF;Qw+L6|y?D;i0|C_=T_#j$k^>MNl^LN_yYYg`2r-T`jn#t;X zhwsHqzDM4GtgK+KqXJpqKFJ#8u!i2D7>ce++66G}t7V|CUD;d&fK+sgfj5D8ir> z?+7hVlx;R$xmHFnJp849;W1f;mVHF4=63uXyB%%WQ5?UFuMOR_K1{w77Br#x18$baF zf0EUC;EV>eNrR3C4?8z$%NE8+aJK&t5hQ5{s6W2NrWvxOVvr7f($W4m)PoNi>OmHO z2+@~Qis zqktR5(=ar{gtk|A_=A>TFJ^KsA1rlggUXhpy^RV|UK^9fQyNmmtf$v8xiWb;VcXFvzlc|E#ATKzQ zx1|?6^QRv9E3yGnDQ_9<#6bQp%)WJzTD#6Kp_6F;4y!O!8!E!eNtg_;ATNy9ns&i$ z;^mkXV7-eCA1a@4VG^oqgWhVW2*>JDr~Nxgp0n#;wZ}b;C|HjwueI6dK8?U6Hb(r- zKnSEa^Ri4MQcouq+={Y7#18?CN>leXvkm96-fuIOz2(*;_@%LAf*e?Z1p-a=lR zkk^{lj4(AFkGTbJCgaUT{LOE0nleD%gSP@J^vP9jJ;Q-qer%T+|ER-rsWX9AkD4in zjV_}rBUGUMtHUbfg&H}m!f2iAo*$l=ELz2~eM3bYzqFQE%jQohrqz>Yg?EtJ8SHXX zQ{M^GQH{?~4HZ<)P*LnORP3|aoJ6~{%z}UyzbN5u!;=!ZW9X+Fo`m~F2@^N{tTGMi zxo02e_q*chK)*Y~Dms*ttwhkz{b&(BI%+~3K59z9M#-(I#49d@V2`oo z?3{CuSOJSlGYyk?0p@!ye&R|Spu^6YP-=(!ia zKmLW^9P|xAutSAblS4hZZdGyeM~s)+htvzd@l8-~^qI)JQjSVIi5U%;fMOnCIp8Cz zss}?*g`4}1f``F}%5+pA3=>|=({nE{I)0gY`jrAYBJ!a!kynt3Z(W=vIhTH=OMF%S z2~feGA4Kjp9OOJwC}K2Jbj@p~a&PQx7*z2v+xs*(FL$gjMi_q=;Ic$T;a1)I{meWt z^}MvMz+z)hwspF5szY@pj)<-pQ_MhzydKC>oDkdWk z8FktaPTgnVX;bcVYsxhhPlH?UzA0U7Pg%EneL`U{-8)xhCGeKHWqMCvLUy~=8XcCBYL9we@Z~Je;*hPjpj`tF#e7N#F)CL&3@`xK^$;Qsc6qZrmvM7I)IAZ zM?_5WhY=jDQizabCAb}xc`?!am9n!HAdFA`Px%Nu!__btFc%=Gjm>oo*PjBG%jirr zABJK(h#%R9RZQ8{?r#p1QT7rU_HAD|kGA?hOw;vDlaz5Cc}L;!C9j!MIq(QDtze0dr+qBeYo+^~&QOEvSv3 z5z#2*Wb^gr%VjOk^#vkchMKKWD-h{ecW6(8j@{GX&vXX|B7_&Kkd+RP*_;Z*$=4e- zL5muh-yB2&U{|BSD>^8W7k%mkdjIYyBnDItUC|K0P9E}?LmgCwADRg~1X#j|?4{;B z)nV`ZoRBv2sIm+g1K|i?EFj+^_d3AB>iBhryBPTS{9KusB$g((F#a^ox^B8s=Vj6CvFp7Md0E8HQP^ZL)h;|rKZ_FTJ~==XcEld!vV~G{CQy#-kQ>E7he$W z!c}myeccPZ%s<@r9WQ_%X@mj9E~{6FJR9~e{zjGCZuyt6Dh=Op-yKS;>%t&R_~@KQ#nkC8Vzho^d>|nEH&&!5(m)8}o9VBtypJe};XELn7WYS$5RBSO z!k9E!`FE>2Wz)>{%Bki)as*b=49xx{Ok;W`H~Z30K(Uq;i8O!TfIf^-XMA5g}-7g85QX^*U(Ir7Pe}{F+QRVM#`Flr$fE@!S zK4LJkQ6mdSG5kl41*AJ2XdcMlmzC0XI*$!$WH^rhD&yc_(FdWX>H2Vo7BM5kw*`9d zzd_{l6rS=ka*Y5!NeE_Zy)vu=WGN72$%sz*y~Y0H%R<4NPnCu3>kt`xC}^DpopyP< z&G|MgQBS*J#4=|@KC)xX+)tIc$dl^w*X!j^m7tC^(9EOFrWx!I8C8FTJdZv0Fbzt% z^1oL53$F;bj2d-=8k{T+{K*>=#=$M;1LYcUAYC4i&_C!C?cx81J!%#rko^y?Y60wc z{W$2{`^wKJh1Xg)>`4MF5XZUluZ;sNmcbc9Iyj!QuAV&aPSyFs1sSb*>qsEi)sgY& zgf$X4VT|HHUOZBnG=D`ForT4}|6ifX7y^eFc5hN1cXy&RP$sxCT+~2? zLBQA`5uidb4t|9$n zRW!mTE!+T8^z*hu~xMmmyQ-hIuo>>#R1>c~goC)vT|( z(ka{A)--gtY)vKnJeh10EdKpE5YFmkbA(fa*6QV%Dft|_*vB>z&%%sTYW307tf3w$ zAHoS)|5H!zDVPe+(+`y4yzP`cs6Ad@1KMM8B0&1~iPsq}Cl8_nCxw0T%qVzu{iX!8 z59JLo)Q#;#5D%&yV<|4vCunw1j{WU^_|!o~4;1F#l;7J3+~_x@0sIyrb6f=FtZQy~ zPX%`BHNnbWvMf(?>zwy}FcVB7lw_Jb#N2vMQG3CEyx3nb;i;U18c316QipGSC}xx+ z0e!WhnR*ZZb8pqbTT5dm@;o0LAy9#OWZz9!r((6VGV*k5{0 z7$c>+^Y@xC0v7zH&`5x@?K*uP03x;_iJWCVP#%Qh7<*043mL~USPjwaKWDwWI)dDd z&uP1F`bd|6<>UtbW;jr42%Rb$gd!TtMJO;r7xsZN1(i}ME5&nRHR(tnj7kqiOrkiX z$9vP^aEDY1(AEd3Ly#JU)M0K(eI2oWYXFPsG_Ho&51c(eV0s)n_mxTyHC>|Ub!`v%x^4tIrzGZTM6r2aDd!o&nc8(kGfA;M1Uc5l zOm-NNL-OXJP&lmSPIN9|*xrxSXr$(QQ{iS*qb?;8W*8Tu9BAss4GRDQV~(v#gcv;n$%mEYk_;mC9gEKhthKvo-@lXZaR=uzr3!l>{$r)^aav`RtS1!j7+pq)iKN4MuAVlv zUzL?@rB0e;`sf(=E1rVmu&NpOJKlg%7hLVH6o*wFhsB&Sg_zPPp0$CrE|*ZHJ_xO z8O}ecdgejRROjCw6SHTY&dGNXrE;O90?AQPDv+FEw@3MRTNtz#G>WFCpKoLsM}1om zo&;F}aawL>)8sjUDgI!7Jmho`6Of|i*C*NxkVI$?q5UMX3TLX|3A1}_AcCc}0fLPp z(hrC8wXt}b1yYig#jmL~Ne;h{vEDUIyf&r8-B)h~(>L>w5R(I8bEEQOyU{7czz~e< z@7uS(m09-p;g9Xew3QEgiH@6%43{SWNIyt#8fuEVEG2M!(EM?}`(Z(IZIKV`7{l+Y zl1_a;ieE8f7|x*uCX7rmTosg~wMu0hN{Ry$sgUAf!&4mi%We2*txopTXOvlOFTtB- zkoV>2!&-3wUM+Ed&ic<9kfIYmS3Yj(g90O9jkZ|TlKRkfNicsWjI7or)6M>~R5V+U z@-!j>{Hpv6nC`ZRERpCc5C4xb(+*AS?3-Ea_{lo`z7NMTll|!(!d1E-pi{OV+#$rr z|De>h7Q+%&S2s|OXb^&CGz4h0F>FMdd86`KGpQAlKtx%^56a$F`-GiBT9~Z-h!seJ zj|<_+?d3a#EpbPbJm~94H9?ZxnGR;ueNR%~5v3o(&(hN)%6}2eZkLb{bxhgOE>?#* z=-C-SpXy~*DUxPBu1sjQKeJ01q&u#}HrwCa1xa_KGPKz~Yqu~LlJ1f=`*XX6ImWM* z7=*jE=9If*7(coQgBhu<273Hu1Xoj@Y!M-uPHeSDz7B50&$3T>*{!kEC}B7OV)#rO zOXh3?coNb4wz9K>O!?)|NOEw17=210az56qPYJ-^z8wLWmG2;zAMUy&wIyojzKl zeAY%EeX8RbWjfyb%=^(-(y$oj&`15jh8msJyeV!izVR#qVWDBDm<#Z}Vdi*q^ePr( zU-O2LB~^_J)33o(BaC$ZeE4jTTW>&g`2hL-Mm-w_JX0Fbbaz%1i$C-I8u;n|`^>sK z1yI1_$_Kz~)Qr{DX@Ca*n{sb^KRM*Z1PtHyW=(7WVpP)8{PvKlBZ_}>R^%&5XAaYK zAgHcJ3`HsVGxm->*_gVXe077gFKME66-Sgmn(sGjFw?aBE(3ZF?UoMZT1eTU5RW|* z`e8OvzPa9%2_5!rdxSX5188u**dq*?a76jpJzNfk{*6UrF9DGzj=}(&?s3G<$si3w zm-Y(J!rJUZs)bnnaiyhIBc7_aZ@6BFvD>PlMyXX^Z??ZuEzC3hqzG-r&PrQ9qkr82 zP!Xae(4@%>^n)gs(n^81)~ISm>?)KqfO19~uw=4Y?8$Emrm5d38vyR`bT#oFhm^_9 z`A*UNh4Lz@7@c#^kf1)%wm{nw^M2bj^Eb+~E&k?foMX&7Xk*z^vSMwvzxSpPC;bHQ zp9CB@8POJiQoc||Vzbns776BB<QLto@yy~M>CC4SI1oMxi#W|?U-s}-|~Lt5mlR&nH@sR6)73xBdRtk z3{4ec`o2ilEpC(ZGD}86#FHB9UiVx>N%7mt*Xa4j6{CAJO0=^4YGdVQrP`Bv`ibQu z@TK?MBWBH?&}X=Q_-4ge>j{wKko*!)9*X3hZswZSoP1Wy9Fj79yrVIiZB{Zm>|t*U zu~%}_E@GChDyMb#15c|KOI>qu%cz|qn}OT8|%k#_sVOp@}hcR@Uk1Q@L4b>qtGldU;Kj1A*$ch(Hc^P&Ub~MdvOpX~cCL}b8Ep_+^(Ee~tPEDxuedKo>jShBO#6|HQ z#cN0oy=+K`(et|e+C9hR`^9dp{fkG|%?}Kpb5mj7dha%GqxY96Y0`6k3hOu1 zexK8iC;V~q)9YBzyRYqYeb?FG+cRxzf74}!wPjjM?UrNQAK(q}64vmar_TER+h2pN zx(`17Gpx!RK_WvdvkRi2dHVc`f%kesVcpOg#TU*LA95IjS{&jzmgUZ3o`*{zsw zn!{=j^Y4$p@a@n`xqa2={<`$^VSdi=h3{Ftl-pPFc-+jqA0B3UX@OqK?W_28_LVmw`0JoQ;4C;mW@u+cyiQ>?7+%^Wq?JmSKf^h>61gBQSUBS4B7#E-V5YG?9 z-Fk4Q;5rHlXUz~u7lbQ_7k@*10P*r~h%>~u&x+5~Z$`W-7{_NaCU;;F!%h>`&6*() z6@+ob8-nqWnIJe2Y!M#vL*3lK6ps9W6^OS4ot!)3Gb>c>zN6rG!5N0XWdU(_6-+sOYTzqoeF~dx}{9EFUcf0DC{| zJ}H6*p4dtV+vtL53Z?7l)MI~=LAM|*cvPmDPUcsFpLa`?azdhcMgkf`a~}UdqD#;#|0&V6_a#b)-sq8N)q4_^bV?+8Bx;AE z&~kCV7VT-c+~mVx=@SKO{^4HN@+!}}KMva&CI=2kp45F|FVB(DqsY+S{zoO&bD||I z_Mjy2_45p_RuU!r@0{CTL2UiA-@<&g$K)^=&)T+f+Tm9|KCjxmCYq33Yk z#s^rkYNEbKG&)o?ClJd*%(WnbN};(21F-_cYEDH^9W)oU^Lfh=YdIT19Z+RTAXbf- z!xuq0P-0{tR*%?b!u(|V9=#n5+A^^aXcC>21m;6#h*vzyI}XeU`V53CID+(|d<41z zU55%0|MUJ3(uxl%@t#dTR~{g(lBAK>>-$|9J z8H`>m(>Qnu>;OYk&}QH*PORc3un>L(^1a}^WisV}e{slE0~Ud;U^dFT!SzdJy(y-^ zQuw(j-w*C}$nL5Ym%#fV4$mrS);Zd3rH8-aGP1H1?}gGYZSQ!lt^ zK&AuW7BCMS0t>;h-^+SO#{NO3a`-QTvlp;%JzoG?1LXC#gM9w8MKaZaxy5Mp`7r(h zgIDlW8JZD%1&LKW;Tf5FV;JZEFRd8@AN8Y+g$p=N0GVG|tyc|TNuE@*SM$xRLzgQ#Qx>W8jFBhWB33VES% z=n5ntHwv;r6YvRiK4hYl%jhuhRd5oqcfk?xQ}7BHf5k{SC@%y1;lBYA{L@$5=y4b~ zu3^sszeGVN64Hl^5n8?C+gj^cNpLhf~FFvmp6P&hOSe>2zs zR)LdXBh(7@LA6i~lHGj>#8(iR zG2Cx~1n#XQ>Ox%nC!!?yyI;m_Ch!;3%hU#z{D4S6JhPg}25tbaBi;_;pR}}LH_<8h zZ~QA!CpZRL5MS^^q6zpt$QuBgYH-Ri3M0K1{h8fpOuo;Fw6kyFUN3#=Qr2IfiBjIGBRg1(UJUS)dxkd8`nzQ&7@sd`Lt5 z7*hqm3+jW4p?s(r+78)}V}>kHIs9R01Zse;K&=p=OjvDlQVpDO=m3g7Hwz9nJ*%xd(w^i=2ZGJg7-?kmUKbNX?A6KgN zUv??ms^11&^xWo>=W(yH{w{(tJlKrqBnnpM7d^3It!-Ptd^mS4o_4nBiU03;iobcB zLjM<1%7f)E>u4+w6l#J$STl-c-`2rrdvDYKQlWLveQz*XdWDmy1UVB@ZQP^`(vwox;bz75gy>4OF;dC4Y zm^#4JNv4KJsa=$Xg`rk1mx)mVD06}a$YOtmpJgQ>+#&0}gKTjWqjoEz)Hvkmk8 z)?$8<%+&o%t!L_Xrq(cZ51(D_%2V6e;$EiS-xbTO43`6OY?FBtsr}5Yj;Ad$s})Rb zW@;x>TiM1W$0Da{W@>e~TFcZ1wy``%9cGJ1a$?!W$tcyrR0qR)MaDAK$<#u&md^geszu}v1yFTSRP*bD}> z#?WMVQq(@}Q!GUX@)u@#^Jp>(D%jHc*e6lBCXKY9^}Ij-6K?w^`p>B2hGZH8f@1I<{D%kf*L9|-eKx%OdVs^W2iNj_G)bxl*D;|KEdcTD(YsmgsIDz`aDx_M9qm?7gA)e(Mo=4 i?D4<85@c#gXRNk%t delta 160691 zcmaHT349a9{`kx$Z8tsB`%2qQdXS!^v_L6WN=rz%T24U`0u%_Bw1A3=wgrXi^C%9w zprWk@a(J{n1KOcBt@G0dIwg_f(|G%?IYk9u+Z$F#;&i9&`@6OK7eCIp! zhP&zwch#6ZSwR_ZG7Nk7P&wNh$FMtdz?Nfl%iqu=a#m5!uoM|kD`#Ir z+r|vR+1qO4qZJ&(-XshgyB$Q~%G}Ou8ym~)Ww(vd$P~E&WF?chO^7Ky(jsS5f&tZ1Ugx@I$wgF?d+|uHkZtm6o87)HXoPlKt{+V-sch8|35|p0=$j zG+!YPU=!i$>+>*{ z`y#BpC@P(ij}W%G$?Y-cWg`StdwJ{`%nW_MJvDw4gC8d?iS5S6m*NcNLAjx#6RQKb z0O3OyQU}5Pm`i5G67;T1c|>^-saZpS@D5Pvz14qz!-drdxc9io3rVTPJ6vAdHLp2P z9xemqE+^Y&R(*89r}#0To%32$A0J@zdw$>yHJ~(B80jQelSVNvH_1yLf~{mh@-*ga zksL^F4W8@SWZ*3ELYarGQY{Kj_n6ygQt2V5RjOc@+n02^iAR+ekst;d!mZ&#j98x> zpjD8D)Mzp}Wfb#;n>>~>IeLdZ)avaquSS9rCA4t{g`gl8QwC+-bkrQFf!e>eQVX~} z_8NF}G)*&F;trJVOWkBx>L|r}Z-61f8Ya|`2U15cS#EMDH7mgB3KK??bEzrJb=T8r zsbRe?Wha&W4)6&iH_grL5=joXR-P}c^^#_8R6x^Yl(C(httNxWcWh zvFZ23;GchIgWtJo4eq_FbjW|gYW?*{Zm3WU4*;ROSttXclj9KjW}Nb1V=JdAG+7KD zTLU?vo+2MAxSb?QGbeed@U>HBrDkXIzWo6mV_T{4#*bJwk36Dz6st%?dMr*Qndu$y z`&0Vxl+;F)k&wX5L7d#g)-=|itgpO*bc~5L*Gxzyg&FtZsbqgfN`6eWucfFBj4@m& z7O7r84$`AVxfXX}4zQf7Cx+b2P>)9HU?W~wd85AUgc+%kz=?stx!8`{a0cX2CNqW! zGd-LEWNOfKs*Bn_%uvXM3t41F=Ign;9deFoV)ljtXS1X7hQ5ZT6p-5KK$=L2^SX=j z|4cHo@*{@X*-pfXM=+EDN=FuE#U>XxD6Xat2f1JlOSPLrwq+$oG)eSZWtyD-OJ*jy znDrsHlQ#!V8e1_9Wmw>PXDvJ$u4aPrV1W?tP#B|y$=-yvE$X1=K;ca{(nOnLj5^_G zN3T%WP5>vI;+<3KUej_5|hA0jl7nz8Vpz`F2q0Jr)sYU+OK6^E!?rGfO%t^p8Bs(W1HP5eMy`(SGpIR;HOLda!oPxTOE}tsK zN#6t4cEKV6LT`*88_zS!uukH zZ5}08Np<CR5aqwD`XDai7tOgLXExhPj3ynG(LdkQlK0@ zQ!KHQ`}2pDnfi%gQ2CJlYLB)n;9Ws-Y6#jvD)Y|#KpU&{@W2St0|SF}k>317W}=;h z7H~Nu?7qJA$`48|LCWb_Xg~$_ENh&kjGEp8%`DSSW*1}(it@8x`XLbV_L-at1WKQl z{+vil!ALx@{ilLtj7x}p@V^3DVK5;l|EGH*`Mf>ApwMI+EC#pj7pKLrP*~_$Zr~vG z8F{d9YuHFZ?-ilgQtv||huoH-zdkFH_BHp3h&u)So+=h+e4BzZ9?!xV6@zhxYb?$n zt#`)rPhFCQk=7xhF;9p{O`qtaBK^v<2D$LCNVr% zKZbl(G|4o}PFu#i(7t8DeJ*s2HrijIh0N^0&^Q^>$yExW!J|AP5B)2BAEYh*bmJO@ zPzz}lxwH7P?4zq}`=p^?%b9=LiK=wYur3(*sHUKdRJdBDK@dt$GB75_I8vyzD~~j9 zfw6A|*2B;T@QDTt_;NehSDJ^j$iGU{hsSv67buDg6Yh4Y97(Tk8o!V(ZXr* z9B2sb_EEe2)GwihAmIK?{Km@kQ$GMK$kYi({lf2xA6jMoz9>_VNmIi z?i{QRg7&fqYf25 z_eOD{!ZTi)t^?=;Fa3Rj)aqwd%(BZ3F`dQ2WT)I3HW3Dd+(@Cq6V!U-g0PvkW`C21 zX4>EEq50D$s~;DERB&Iol?0brn9~ljzRaBSx+72;rv5KUT2|V$k2#5_Ojmba94V}K za4-ql0k5|-qK4K_-wNm!V9@MU775=tvD(NK317ioe;sp0!e>qd5ChOh5+noY7(kUb za7~f$u7nE!+(Bn3@C5?YD&c|v+Ar}jz_;5uqz=dmK(xJL>P!FAG2`!tFPannI*gQ!K&pFu@xCeXK1YbX;mqTC>F zL&xZhDgUCYOl}}Y%Tt*qH#u9bWuNyPx!`I*h=f)ojVu=4vnyZ0`;;w+L&8O8Fia}q zlRB=RNNT-W7Bb_CGB>aV?ZRFIaiT6D&G@ejolylvR1tlT49z)#yugEzLJ9Tf0dK9r= zwofkgqIpDNO3oVWnsR+X4VQjRlW0IqwEz6TTY3G(8X^5_jT-bIE=E}AA`?wxm>Dke zm???5<|MmKL(;Z7@P3WqpXwM8IqJmwa|~xC_^@-#5!a_Iv6&Vq9&yr>?NCdCN(}iCSDp)RP9)aYp?EX(q)3UtUDY6yt~YZ@NE4s%x5u*0EW7&<;nu zu}QoQ#hSK>vz3%H8q%|LP2x;0PU2=I?gJ9{za3MqKWBbZ9D}F@sI{Vuvby?zFj0{b z?{zoTd{%uFs{Cc3BNEzBD|v8oZYV+wJ3F(wAX7JF4taI*D*Q5uoD!SA+F`iv(Z4AM zA}*!j0Ny{&FbgCXIVSyStNIIDYB&Md+sKS5Wr=2IA1xhx`)2ecv ztd$Nl&%-m$hNo2pU5>h6LM!E=F$9CQD|Wn>8otF*Z|Exn)yVcnFjVJ6_=Dpu}2v zx4MP$yy22tQ;m8{is?~HMN%?AT&Iun5>PaT42f%}%a@l=(*~NCMrg1rjp~+77OLja zTNoaf3R6qUD&xcHC@WJpv>G}D6mys?t$bEKT)5262+vbB8hN5NIPb z+t;LQSCGnSX|f_1Y1U4Q4yzQ=v33{|{|ajJ$hK*BCm!~Uhk^UZwC4`At9BlEMTMGn zK+BI2=8&}MV}nY>Du5@DCDSuQii9(cX$IMz7-0?hd3s9z>)w1Tmr{R#X_{e(dhVx- zSQ#bk@^)N38BDuY=y{-K@AxGqQi-fhUS>yz&L&jnwgLcpEbJ*xK&aX zXW&EN>odXEMDVQVBZ`D7yLvy~Hv&8oQ9>@+KWjALat7c6h;7z*C=eoJXD~)8o*eZ0UR#qRSt{8a^3-jaz+FK)Zc7KA zLNOG0LZwZBLpTCCAT`{5unamv~fayvJc%=pj{i z8p6U|TwCRhj~2?CWx|H`SME$?m>C{&bb+d%!t*V-l$a)26HKC-j>~Wp-aFZ-5K6%P z(TAltBj8{-&YJTQ;$h0eKXoR80tHgh!ontW`| zjDH`-2)C+G0ACxy3kQLP+ZHB=pem|39_vb z&rtqI;4gI(VPO_^YbGpG`LvO$MZpY=4(9>lCb@4>x`b9~YN$*&$aJ{|>N+mzq9yu> z{IDn!nDOE?+(OigQ}EMd?Be+NEzsBWS;v?2RN#g(F3wM{hA!`~y7{Q1fjY;v5=Plc z-Bvt|G%Su)6#>rhH$4S_9qA%h7i;3O2M}pN)j&#fk*w;1!9fE^z8oTe=z>1vubh3) zG6?Ws|LSb0McG}+0rMdJ1^Kc%Iq`_|$AR|aXckpKg{QD27VjqUOY#$+x<#X2;wc55 z&E(D{>A03O0OwM|FUe$PILXl^am)lK`EE%@K{0fqefIH5g@IJ|E!t>)fq(@sly)g6 z89A2BUmA?vWckwM!PguEi|2bJ(}Dfp;B)L#%}E8Kraw*Em*(RW5Z8H#9Rjnw5c@^od<<4bDp*P;{SiCGZ`F4{@JSeA2Y_zDX3zbNz;$xIB2uRy*U*MF#JBC>PKK z&NS&Am;nz%GcD~2Rt?ZCmkK@}unS4c@_g!9>RKMhi~-Nsa*aCgZ=9LHskV;= zlP7oAb86DNJeKHJ$de-aOG0}cpVm0wmD$Ps6-n_o;d|Rx9Un0mh?mGyEAso>Nnn5( za37MNR;0wgBM$7uXv3NXw7n#9Wh{P?3|g6+*a-fe@ zpqX!x(Mz2|4&Y~s_?P99yAl7H6w&jD{Kt(w`$3a7k(8OZm3%?0d9a%z=&b%&SXrh+SPV1<1= zCg9oQebmb4WejLVRA&WHp8uQ9(SU6NZPZ6SP+PrZieW%)APZNkjWq)#skR)TEcH%+ z$$L_FbEE%v&~iLPS(8-|H$c#re>f0B{)P<#Eb@@*nhbw4d$A@M|3voIq{V+Z;Iqw0 zZ^x6s`~ms7CKh*)n>E=mElI0QPTzjZhuhaltOd?S_qWijGP~v6N`lu$lbTxj(0d2y z^l?@L=c-#Y_`0xpfH%9}fY0L~a^$Xfa=ca^Q0bO)RaBR13Q)`bri+?*n45^TTtemm zqEF!nASStqZfz11>L!!dYOsT>SsNdJb-;JiSEMxHgkE;7)XT1ojsN6t93jB*9{GLk zV4T;UvTm`QskM_$_iF1Zg;r0c;4OR{hV@l2UMy)tnrW$xkeVhu4(r<(RyFEptr0NZ zEa7Uz2VrVcmUwPaeM=o+DupIVexoG+wph|m&6nS?75DO@eVL&O!$I^i>~yte|c0q7&|TKGNT zodXML?D`_zzw*tJ+I~m{#HC(tMxb9IvwRnwy zGDbcL@bljB08ftG2Jkc9aWGe|ihKs(r@UhUKQnSCz>j)I0X!%2MSwSZM*uvp5H7qa zco@Lu$Y#Lb>)j8(>%E1>2Fp7Dt?>>v;^mzHt?=d<>sO)PV*Gxyu1;9&%{G>;J^_UJ z-Yg@&>tlfCdNYhC?)n^{nO?QAVa-VW1GwCq2=EKa?*Sg| zjRSa(@+`o^z0m-_qx=QnLT~d5bhExD!ep{!S2T_bIP)uDvtXHEEX;ZuE<-I(B1S9g z)*A*13*150^AZMY83}U|x~)q+dtSvEMwo+^ty;Eb`oh&Smfybw{o4N9ed}aNbSXUl zVsGW4R;@a3k7%3e(W*6Yukw(!4_2pe!gz0>p}0Wa^-S}yojUMvrkyL+Y%|3I%b(~5G9s<>jaoH!$`xlsITVcT)@n?K5MbZxCf__XCUuz`Ss%3` z>sD*vj@Fy?l{w#3O#JC$K=iO3obbGd6x3zl*T{^z5zI;td9v=F>4QOS<&8(CD@?5M zuuio7=87;4+u^khcP7AhX*l(hK8229&JHuvH=v&Na+EQB$--)G>GD-exTOo>7nUx$ z%ynVGs0r4;jGTGdF7KUXN<3a zDLYD7jA5o-xH&rf7oa>0^X`N@Ff0O->6?r3D`e~DLgq0id3SRjvkqL&o9~%C+$nSh zys0&41+AB>`CUb!bg$VDrFxtFP@>oBhhn^3t&cClYpzvT8BGLCBSl-3lk9uA8jQk| z$Vbw~e&t}>!!;_2bkcFUjnSk?@CVX@|LL9}O_G#;*THq}5<`%#8cf90u z;~uSO+alH*4)=N^m@^2To4C1Hc+}HiNU|0SWnPpQD3v76N%lOtNiMs2dU1Q+V;siY z$&`PLPKtMEBzHUwN6=ZiL^LkrMoo2yFvUaSeqXxC7wQls6v8SQINXha!VMUlK}f^n zSSom!AtLmo28R4s9+&-Ap7s@we;yDP1}k$l5O@^Cd29GZ{=&FauR!CYvDvTU_ zIy*fIoF#Pq%3}+&du_jY=^Bs676kCm(%Oi}h6yII$$yGo+gDz%?VoUc4qOW0x&o_Y z;HM{rq^M2_rK0N*j8Sg(+V*)R559y8hBpdpBf6m^mLfszNrkt|Yn$eUN9Po64reiV z-e_2j@<=G~$4D{|sA9VgA9t6n1-eJKZ9Q1hZ5sgK#lwK(In-#g$zkFc0*bx1c5kuJ2~h;73~_dw%}XKZW^C6%IlRI(w6N5y zv=X!sbj8qRI{-rgmu(?*yKY;tQ~N^W>mzIIN;9=nRcfe8|q3sVo6NF7c5JCqH z)>&`B1-M(Dfvm-oL#!KA#G)2W)Y%mnIeqguwmaX5mQx6KV=fFl zpCQ(4a_-sWI$RLY%>hkqLYHtr0C;4PCC$X@^#U57DKPq`wiILia&37sOa@|&TK%4J zOm~cN{6e`kQ$YG?lOlz7t4DiqL2!3C=s^&t0UwyL5#2g@u*tYE#0rhd(ub9I(>RU* zNeXeV^q^!UN2opmT}wk8nyyr%=?Gnohl{_mwEcd*9tS?@QVT0wPw!kRD-f2D5QC7?W@+}?)_V_HmmBnkku=8d z%Fd*uk%HGji7SD4hxY{-uc6vy#xxI z^bDti!-d6=*)b307-BLShJkORs*|P)AoZv1XCiw(KW|che!qIERe{&Nx_2%&4Q@R( z6!aYRpku+tQdoSOAbp5QeRDin_xyN{0QolCaFvFN4tdL;PR67e&i~T87OKJ1`DSd4fq-N37 zqHM!dfLB8(QvJfopz9$CYclDLf7)L2B(xbJuh-mhR?tWu*%hHlwD&!R1MX_oI}lIy z>Zx(S^Q0Rciw2YIaFIj1vKYnl}F10DhzXy`r8mqU2(pLBHka(8$)kQR~R;VTjCC-3B=-3EQRv}<`7o=r-Sc;Gpkxj3T%by~oz>q`V zMQ3RctY(=aEN~$0@Gd&fN{94RA<-RR(6neFe~6TNHG1?XFn*#jXboaLQdyHF%KLz0 zIHiP(vc^le1Avpkhl=vC)@TX0hm^e*oibH;!;WDNP>*Vk&_$tgqp51a%(+$Lq4vL$ z+SiJhH4d`-wTikh2i9a8;=s7$oehT0UKAngLR`EQcn}HmkI?#3VWo)oD1}GtO8SbG zhfW*;%jl^>qEl`dRFT)FF|Z~|uZ1B!vi{zKjzLr-q|5Dk!}l;8FJ_Q59QQ51|7nYM zY&me_K!8x;V$vV;R+q-VD}h=y|2e8iH7 z*E6#h!6E~w$_UI1$||my*~V%DOq?MMoT74QCCWlAz_TC-`DJqF>xl_V04w)n7XTKj zuSD~%Pa{vhuEj@5$Ll`_e=0UWRB{Bw&yeOl)91EAsK{Q6TG&`yCN!@-Z=$5#qPibv zU3*T#y&%S0trO2m@Uvp1_3XqSB)CZovHm#mv;;pU23V2i|0MX~_DOp&gEzNN*?$e= z^De&j6SLb|73GX0wF!|(u{-TN%r7K*>U{p&X;VEkZv{M(B$mXilsCk4Oe z+H44bpx+i3>1xfxj}dq4aOOQ18P+zNdCEneY#WBxk&oNTAqq}$U@-HjlawAv&AiVE z@z7#6(yIcYwPZs~1XzND&nXOzk(rr81D@pM!2@Z`ZBFvyfuu+ijlvwrKt4N=oG=<1 zDrY%v(ceHywdJIFXeWJXRGxO%fh{=ZQ+SFhDB6b(T{&Z=&`}3@_MOl1on+y`!juY! zvD3U-4*}!mCCzZhsCh}HfEBc+Bgxwb)tDpQ2h(H29h(e`KseYj@e)FemBMnOIF!%C zxJbz%OYjHwddY12Ab9N1L(EEu(CnBB^}VlSab|_7U9O%A_ca6`9;>ai>(!$nHOao*Izr-GLPrC&LjhL?TIy?y02*Z{mc#nsWMEE* zWW1dmI9xiyE^_J!NZu4#br{@xA+)x>HUyw6qFlmU018e23Y-eKTczl3Imzrir5sGl zsHYCWQ$W$$3Hz>2^OPMO`^0Fiet0oDhBR0WesN*36I&asGAo6rILYnrHix|>`aID* zNbVs)?-eFTfZ$^T1V;e#za8|qi_CcMO{E;7p?vPmIUoaXmhyd_<{z+%J8^&z&0&Ef zl*86tR>m42m>gu$`!7fAh4HS>HLoBH4n&;mhS^Q{e7D}bL6+Ms~%q&t0A8YWb4tPswp5b zdw>KjqS{V>!|mks(RWpgV92svS~pOE&>fyU$zhlV@GK8`>zHoF`_LCh570n!YZB@2 zgHU}MAVtgepY@^Trgf@{_^VDx<*V08Qh0n&@Ru&Sk0DI>#YGk!&%r!-;`lSc`$YO` zgb9zkNZtvZ!j!_WcDQ~ZOHParF~f`gU1z8jib)Qh7^EES*s~ns!mAUl6sPx)D<`rT zjiWv013eCy7l||UWbTLS!XI@uTad8Dt%RsiaD;sS;d~~-)n59M1*fh6he)WEvmgtM zjH^JGd6HqeVT8eI!NNQbIsS28?6e|=-3!;)sat24&0PSMrjS10d!hdlUodfh&M!S?hQ zY@V00{RP|EU$7nif<4<`Fw$SJZT$s%vcF)D|5dO@`wO;}6m=EO zeF{3d?czLygfu*sYt*-z%dPkL)vq_jNR~+HT5HluP(s%l(vDmgp5zb;w*b;;Q6ba}~OL!7yvght%&EH;BDUD{tS(kFl%*zl*O1o8fO8afy ziE>=hUi*K}K>SGi>K_|0{)k-r>BGb*m$psMnU`ShVR0xreV((7hj{0kwqM%6I6D|a zsJHXyp%`b9!gHB;efw?a@-c2`f8>|T%%B3{Er0-L_+2u{kSr}8* z9O+t)+U`-IjC8{PHh6H;a(!y^xS%uW*c~c)E;^N*hK^Bw7|V}4b4qIgr)$-5Q5y+C zKMT>Z&)aRkl`}Y!jJ&WHzfXROt6m%T(<#L5fHFS; zLonsREv?l3HQFc@0*xfK?YV zol1gK8}!GqMz#c0+<=)j3A-|h0T08RD>D^~VR9D)Rarm|UMa_;iTz44jwUVtSk}Jr zcNGqq+l@4IbZoa(lUJ^e$K%PxtHX=4z4gg^z%wwq(+YzDIkGNMN{@SA&uJ0D(O@=@ zw5Pf$4sp#rn0pZ_LMC6E8hin|z91_Se)W)7ui3)0wu?LJ5BD+=HQoArE!iuSM+an? zSJjk%E3R)+T&~BZ*0TITB&|0YpCTiBlM_Gg;lKs=4m$ovK$cbF+aU2N$+q6u%(q}u zn+0SyN;nq!-+FzOxyqvLWG%=4cucP}%dOMNXT6gP(`8n1UZ^NTcc^|A=QVX%6ql8H zv|-1%KThlOW!*4N68D(nA#)#m*h~!9wXvq2Z^aj2O2ML!;EuVn9?MmhY`)%$_qN~t z$1510X-~X49^;{8!Jk7zQed+aqt?PS|2TQ+&-gh7LW4KT_{g}VZn?mq!)?k*%87c3 z?sfHXzU&I2&-uDW-8e3=n}yXL@R5U`t^k%QY9!B13yk*u30@xR+1U&5jc5{XtAf?I z1-AHX&I`NA2BE==p$1s1?S{=5%k8$0J=}c=hHU0Gte$+mN@ur)l9z1hjKf1dvSr0A z{Tulw5AoPE%oiS_5r;8XmXh1WnRQ`?c*7n;r=e0{gQe#9AYGzhsAuRU%#ARyccWtm zd(j&Cse`?E4gLncz*gA6!WDtHM{V%syNIqZ6wKSvQ8RJy|dAxiV#+&L8r)WZh>J2jJE{oBjo2XLJJ;lUXl3;urU~soJuhf<| zFHW`|g2fg^_XLSD1}M+?DdE_twJj*Q)Y%(toY6{#Fbn=M{L5Q=+_J)6!BwPo_Fy%$uPF^j;nTlYc3;J6m zyunw>@S|YolirRWW%wZs;HzGKegG~2XoZ(=3c&N_i9(u}zaD_|ia&J(z)OuJ{g*yx+yf&FzVWk==pV#JwP*Qrgx%lsc za4Md|+kDQy9gwS6tj$Nw|5-=BK;A6cA$$MZK?d>?~7e2oIDq8@|6b09Qv zZZUiccP0uix%d|qco@{`J1>7)fphRtUKWgRV*=eB^MY{_X521*LkP}@+61f7fz}3) zG{Hza5q1XfZ-wCEkZSnaQ*U^$?H~N_Avhi%;R8bP-OK|neq$(3iYk(FR7yEw$kFKH z_k`l=*jXMKv{+e_YzM2gp4!*T1$%9Sd36|`!QAKUxF?L}UE}1RhB-o1x|DZQf8Hg| zj+5bd1(pvIjyU;YN?Z-lHYfk05+9ap1g(R=Jrb(`8g1wA_d##k`R5|B4sgA8{;NoQ zyF6WR+4;OEyaAv&P^c(e5}GbN>4C>*Nf*|8_$yKPMOnJAjDI2;PgAA~yaNJ}H)cca z(*=`@zZ#8K#iqmNivS@4X*<;$HvbU!xi z``tyE54n-{LFnt#1;NdB9=YIoio%!N&&J|7DA-SKJ}DL(06OC4t7CD2F&#XtpZyUW z`Gc5%*orUUm$THvjx;5Lmu?{ye#(t*AP#od4xZkPvM6RY_;^j$V0bq!wD%sMm>M_# zJ#3q1a_zh$7AG;6MLsSLPtQpgib1*_r0WMiBo*trYm)(GZI+~wc4L=M-s$3>j>8+F zT$k;9R6MSU%dp?0s=Rc2@Vn5b)ZN(dHqGTlXsGd0>F;y#zr^Dl;9un8l?hm%l`iOA zkW&@pwBW&R{h#3Io6ErvjY4J9l+a_P3m-fAdlK;V+3B$P3f@V&oB)$8qf|@S!g2$F zG+Gc3<M?o0J1oFd6ERpa`HJzI29g$1wSbXkBC!4&(y%Hy-I8`T(!x(+b={QjWE>BwK4Gi9+6@0Up=%7P8TrmPQqt`8$CXjSKYid8D~MG ztaJ0hD%=!np-WsatA;5)jmF)(!RWTl=igT0L_CfEOocC|{OF<4Jp;pmf+2IXs0C9Q*|ik6|{5JVZO_BX7W1%Ev|rI1ftGz~CaJll!D&&nBM zVf&F~#fHvu1BQVeGz>l#He&PV)p!VQ=Myz}Qc@wXdpa#El;GQ?PBx!ljPRwm;~@>+ z$KaiOb|#(>LJK8=4cs<{e;^Z^mF#w&R{;X+H0DWt( zS4YCVi_)fr0rW-3omqG|UU1n?JxlcappYKtaG;%|T=1ZLm}0=3rkbkyFoOZ}wY?tX zd>na@{*=n}a|{B^QE=c#@P7=#D??(Pp@1l)V^w~+7UxEnKyU-yPeUymZ$O!D+bSMh zv$gUV;X4nn%7*W3jBv!$F*O?(V`h$%56{C(^XByAu9veixEL6NnN)aUWKGS4n_&Ki z>Y51yakj~PTrU0-6Fw{tuN+zSU&Q_dG37xl%yq*;pyk9LOr(6`w0Rij_9yk!Ps;fQ zZyoJRpjdd8x<{l0_S1;rK48lJtgpwh=$lle%=Ud0gl^m;Rq1x=)_^gq54)c(QuOErWDbB+DEzs(+eb0X}5-(A_ z4oL+hU*SiL!tKgWVIc6A_O%|~H40Bw?z{zC;o;|u##5CmZo$TS_(P+yMOh$WeKw00 z&bax4F@U`egNG2mC8LF1ZhrR|yuPsY7VI4$DTi?pV})UHCLP94>3kE0-rNnd9_CR> zwtOEyX)I1pEOE0C6oJ{7j3|wg^;O@B^+0}}-#Qknp@ME#h}}F6t|g z@>>Z0V$0|A59qOa=&XJPGb9B;UD9oaHnC6_N=HCPKu_UY%5ZLGl*tGL)_^SEiie>R;Zhp5P{Q;W>05j0Y(v5Kmf>_5 z_IAXK!_VPh5r$o?)oHuo>Ns4E=i{_3u6kJZ-gF+pD}|=tG9{u@9De9{To|i@CBA#W z;@~Sm>tP{15Hv*b4~)lSql;a1%Jg-Q)AlAWmR9$WYSP zJT~Bz^5Z}<(g!Hi*BJcj4mnXWqs3=r+_s)Fpg|R2;&8p&Y1<3jqkP=vQa|@g{6Ygx zjC~qNg+5Z%U_Ysmf69Q5DCh)@PV992tO7#k4Ga~SQ)?gReHwi*+35ct$Y zXM6!&hkFwua=RhY9_ioPC&}^;Pr^~K$G+^k3^$GoIo;xK`WtoX<@!rlx62d?MhUh) z@52ioy?P_y&Af!4W3^gp+PC{EDd+2XzGx|={`=5Ja&tv}b*2A2v zw+kI}+D_1%&5(82>COLqmaKxcx!rgA%ZNA*0s`u_7!Ct^=R7UzV!xF_PtWuh zN7Qc@Ii>zmgSk>FP>6Mk@9h^hR{1E{Y?68auvFc0OS?f*t{3W2xxc(){pB6mU*3n# zkLoW%pP91!S%;q<`nRkLrL4oOVb(!bf9EqG`)n!uMC%}99c}3FMxsoA){K<3!{+h! zJ)yGmsROh2wiwWKO z)hW|@Xp#=wEB>rs>d*R@-~K6afd(D5T%z@)l!iC2>Jw9)Ppr`|_He)0r@tK=C?;hr zM{<~+y$i*GSGwjfbUhB+O26bXkgS$^vVFg`(H14SK(0f3ZU)yK+r3|E1GFpMD;YoE z+6-OFZV3CP9|l0bBB7-|1w62O_*X4~B6 zu&MkuO@QM4)uGJ&4T91k-{XJOQL|p_iUzX>`B`PRuvYx`pr2LZ>^84}DQedSV>K8a z2_+~&dvBL{1*5&Yd!5g$(7V_AAI4c2^U!wiy{E4&rTn&{&#Gp47~LrO*tZvhm1UP; zudr$I2ne6M{>PAQ3Lw*HP$j~rnL`4`*evW;5sn$ z5UI@Yg4XE#HJj(J*_{5GJ^yR=z?yYUux9q#L*th!^Gl8Hm#Y6Yd7xBxo;BV$xg^LE zXRIg*w3t_5E&u8?Y*bA86>+9t5n9jRoQCgKd;~+Wa4_s~e%*BZjN)!c21BxzkDP(; zz}NWIGw|I}D%a_nIUAyc1lOFJ9dM6v@i%7RiBVUb2@?L2(}zFrK=S2v8{pH$?cKnZX9H9={J+&5xoZAae&3Xp76o$$dJ>E!daxMO`|mbrl5FsS z_}_IHef7ay6NKyZnb&8Nzp_Bb8o&iT*6Z!J3{24e!!rEUSy+>?%lY54>C5GZo}WAU z)Y&+Wd&|*hpS_Mg`@Bja_5#?ael|aIHXbCOoo3YWb+fUi?tj)y{Xc5fm*oTh--@m3 zsjI8=pG!z>*NkZUao994`VN9do$Aylx8A(JuH))#JQI(2%ua37fM5jg_p#pQeXa+5 zx&^Xs>f3RSloxB*C?^#%Q;V=AW5|?=8SIBm<_`K0+lB zLgK~b?e0&7w@^>u2b2CtWw-mkf zRkz*N=4rmHK&|8OsTvg=`&R(&MK}ZCxSRjy0<2O@?6F#cwD+7@!@C#Y*9~I_Fr&`h z&~9UdN(i5%&Y5~>>5}E(!-lPISVOGTe!hqC-FcM%gp}oD-7i^RKMxBcaWA<4${2M% zDd~E{C1pEh81UEKsD7IcKpowa3`oOL|I4#6uwka}`Eb(np(TK=)%_*->*3Q0NYr^| zhq7bIA`FXk$NBw>@uMk6-jK6j!1V-NFw&nGX=c>S#BB>{uksE*tr{04*u+A^%MjG{ zhpob%ZTR-n z6laAnTmw*9=;;*v6H9S&I+hT02LUWLBaE;C)+wdwQ;6lXnKH7JF=cKa19h8mb@bee zdWck_hfT#gl-n0y7 z#`uc;Z0BXm|6N2;wD90@-M9=oQFs8mm*E_y-Nk$WA{EK~hM0U_RS*5CXyjx;P7bh+$AegJ)>yA^+=gJS^fW9K%E3Y4G>L z??FC$1ulyC(vRFFA-D4@De?_Ja-)P?$G=ID|L`O4kdV{)Yb$UjeuR%*3CD5mbn_)E zF~@9m^S9Icc00e3-j})g7gu6UpwEQ-ae$dbJOArSoX5-o=k_XGz&vN?$E||&4|cwW zrk!@ancfo}d>7!O|8BTSUa=Yvg=k>@{?#~VNZ5del_;$C`URk2!O2MQ-)BRtp*Bl| zGj#aJ@51Ag0{*AL_?Mz(vCpo-`UI6QMT{^)M_LgMi>UOV%MhbV_*CTQtbrAunQ&}n z6+ODre=g@cYxyl}@Rq2z9axLHf9Yvnp@em-B)Tk;S_AE6j)OPW;A)kLdWrqVlZv)+ z(1+2ZN`qi$)hG{tvIeU#!~a%;m%(jHEglTF2W#=$SuC_MJxs@`BeubS24S@k4t?70 zm1_gLR~Tq&gplFlr?16h;;z_A#XwB`Mq$=U0Y1`qUa=L5{O+}w%hLToZPV7oV{ zwjMxNl@kwN)rS}jdf|Of$Lw|Z4V-k*HcEtj=sT31S8Oh?+^U_3Ir&blkmKf6cjIA; zfANG{5qHIQ))Q=vG@{2^$H~rs@7neqEE!S!H=cTq`Y^$5BK@LcA-=)*y8z?3tPCq`wAd zXgbo+?O&M766`L1{sVYpv1n_fF_d~;6DvuM2FX3593+cD20Q8RRY#ws93)#@eE3F5 zaxRsu(KUrglHnj(B?f}zbdcHWpuf-dO9p`?ES(+Qh_BX7fv7}!DlL0tDjb$HRY((Q z%GNVQ_(j5B@0t4Np{l7uw1mG5`0phA`5ud53hefz+}0kPe)z~RPK8;i0)E|%?!BLfON`&)09H<;B!9JDjL1;o|)HFkQ%#FGFKa`E=Sf+5? z?y^<5I;vqI8p}ezWjj{ZVJ~Jpo{m)wcqtA(3VU;u2cuv+2mj+HJc_yG>`2;-MMjn; z6!NiKaF2`=^t^WqZfBkr`FFPBtgtjV7`O6jHDImUQD?S&7wxEoKX$tmuw1OSl z@qdl@P8>K6j=mBa_%{fw**)*={sL8T=mb$l>>G82IE{=ZG07p{2)`YuCLu3*b0_GwlhT zRA#qFWu>?%z$F8YYIwmDCE>yW7YR7f7cV^RVI^cRAcO46PO84q!>`|o>s7DWQS#n0 z`~zKXq8oA%cL5%IwxP%Nu)Rb19R425du)3}{_68M0idlSAN&Hou8nXqMx7XgsQqd5 zJN*S~Jg1&T~li#=t>vF=Nzb`da zk7y8$VcCWe#$3S-PX6#VSnk~{by>%Tnu-9s#=(EL3r}QrIe5*BxVkDwH~|Bp=b#g8 zadsSh@APM1zkdj!4eL?HNjQAi1sB+OLJ%xTHc<<6+L{rDV$ky-1l7~c1h@-Iy>*6F zXDR^fH9P;^i+D_8s=&C};*A>4P_4?DnUk0_=}hB}M#1(vpZ^lRZE}t<4l>=<)0c(+ z>?-&gKMIF*n_;)XdE2Az1#}0Q4&2z4`QLCFymy}QyzL?PT%&CH+=<+f2FqLs8$ayf zyI#Uv!Wp-@lZEI7;m8!2*?+#WapgqQWFZE|T+LWhYIK+XXj@b+!tQN?mg#Wk&rw{wdRRfvS90{J( zvhohg$%Jz&VKWSq4dso4evIXMq1|1B2YM1R(@jG0r4hD<2luwgKwW%s2gOKB0* zR{)1X}ZzDEnc#4A0PV) z9uzlRcv&Kk#FTtmL}<9M%)w881^+mCxR5Q;+9lBv5WQyKv-qur2T+M&?@HKp=P7|6 zG~HL5IABYZe1PlO~Bc-ese(Jyz(-f{n{5QdVZg%#ICh@OMPE+fGw-sQF-G0vDS z#KJ>;4I8R8utP5v4sMe^iLgV3Zlb5_v0<>Z8{Lv(%n_Pt)JR*RbtSy7_2Uvv34psD z4#5xaL_1Jt7<{v1Oz64BnNfg0BIX)2hR7DBu~5jei$}r$*Dmsw-FQ*VaN!4$+U2jx zwTS%L-4HuaEPU_bJ-e|ve7Nwc>vvei4&FIjxbEavy^ixh4tBqS+#mgwD;4=SUdQv~ zdf|$L58Z>cbs7PA<%W%I3OM2v9n%Oudyv-I?K`1Y3xktSB@>}zDyv4g?2#MZZ)5Tz zyVyKsmm)8sJG@yT%!d;`B4Jm_3+OMYHykh`IY#rQ|J2Lkf?fCZup=@Kc5l@~ztOXO z&-uoV9zK3D6XrjFSZ>e>2KRhUC&asT!a6qx=_r8if@`*$|8)=6<>>^@eO!$%kH;qu z=!B~-oiNeOMd@IVy-pbKwgT=~fb<}tb@TeY_#<4^5wH)BXPFWgKluPIjZSjWE=fA> zc;yXSG;Dc&wPWW2d>gK-gTn+WA*L;sMmfQ@pQphs9o7chvZUCF2w}amd8u4YDQle8 zr7(L0XoZto7AiqYoaSYUy%hIvzufmdN5l-}!s@<|xCmjhpYo+&<0NPE5}!tc(>h~` zPi2{tTk2Ce%4zmzINXWD)YTOnx&tE63@Dvulj&FXdQUKHOuK2DFR~DA*WB}0cAG^0 zgLiO27Cl6~zDJt)fn2IIh@&kPad0|j78*o%;52yoxPw>|7cM*uKG|4UOs%hiPn1-( z?;QNpgSZs`#y@%x4-WnWPR6Ao=V3wlAl7jQ;E2YM%R#91@^cZm`!f;M*QwaSy{AHY z*^nDH7^g)Yf&i~@;fR-?d2>ypdctTyV;~o`T z@b6Q3i!3X+63ZeH&S|AznMMd4MGBOeYJKQVdVmI!Cz--$vIYw2RVUyVJ_lL#ke^RR@KEe>+QgHylEaiLOwDyQx#|e- z=t)s19&UAoKs#Pb9u zBaiXa4B*>?UEGJ8(!Pc*@iqRmL&sNPD7>{8uRpJL&heo2tTx16dHh}RchSZ&S;0mL zd~UG^W0^e^$m}E}M~efQoy1n`15H^S!;;;~rmVifhUSRnXWgffMcv;d1=ICYkkKnZ5zMEnM?P$8wz&IiO|+mP|B#{a8Q zTmoUA#!_73ys;GL;e^2TQk>xoZ7fAYN|hP4v)5%qsrR)!III&k)+5x-Xgh-GzG1J} z!{b-x4_moBzrr4#gR8RBK}^Yc0k2{OjA=%ofJZ;JOMo2c#lSP z8@56twm+W79`LM0zR{6rD0ssXsl?jFW=HZxd${l=qL>rEK$P%5M4`R2*!ksEmMHkgZ=tf^@(S?s+=A*-Ye)fen_)(zcy#llrTH%piz!?e&$2tCz3F;^hiwU@ z&_$uxb}Kx1wK#uc{svAsj1z8R=cxxjGwf+({S>lZ|siU1K2CWgRtJQF1OW>4_Y6@gWQkQ?n7!rUDhh5%V`BdO@_SX zfdq9tL4P@5e2^FNF0h2&aY#(0_v{y2=?t617`m$((@Vo9y0co0k8Ev0OG?8PpPv{? zYYsu)E;lTP?m8sKil5OXpNbihWqfB^_NmxP|LLEhjbY546riKeehK1->C2yry`)Ca z7M6n!7w_+MucGToe}oA`$3u52bo#I^vkp!6NnD#=#ta$1Yj14AgBsYAC!U4wgiy;F zxD9QYyRo?%gtOXs%y53;6MAy`v{k=CP{dTdOQ*88g)SL;zCYv}mLj{=f_#jZ#P=8r zjs}ed-&St^Ol*&7AWy_}I?1vwKMhu!PS7tt7YFI`A(=~~4vQAsto$?DWXCiX)u40f zg{eHb3gr%d7F$fqs(EGi6hw`I^7KL&h#DW1$=KnIPrrJ6gd&(m289g^3LDD0by`@~ znD``%75ODOa(RAoo|%4k7;>7)^wME*DB8$Hd&fXX3g=_6lFIoYoR4Ji(ORwaF+Tj3 zZ2WbQ5R@0=gFbj%jJFwsa*al=d+f~uX@~K&BOn148pN?KC>5Mag47SIOZKtBh933> z;a^r$2h9uApA9dRIf44Kd5SGF;THd3^|!*KqtRcA72+oP$(Ovmu{>({N*qC|+;qZM z;((|d)26R{B_>5tcc_KE>{xqv25Zk>iT%Vn+Wc$rQe2!DB4zo8m4f=NhpBt#BQuTu zMofwN8E={qfmlDfXx=vv%Efz< z>4;b-Vq0W&wK%$M7k6WvYRn<*5AmE(0NgwUy;LolqAp`-?H`E#n}a6Sh);@fbbF0B zI*!8flt0IQE@q*`&u8RO(UdgERtFr-IaADPCttBh`{@SlU}jLei{L$w(S1%6TCsIOxHn zV(eWB(5KCoK;jT9ky&klk{+oh7ArC_>PMay+^@qs!N`#}J+PPqiclcoKrn?HYba== zu5bwlLaf3{sLxUrXXA6e7T{_LI(ZSUrF77DVq4=`?F)OTWmbTZPwaHjcjB5B2b=|9 z!wfdCE^1;Qc>AbyOssDuJ6T!#OYRWPM{B4n%$BI`HC&QTd&(a2rJSL&`IBmDJ@pIV{Uq;+4Pz3#kekQ)GSP|8Xsaa^db4P zoaSJI2`^ms2)LHen(swZn_>(^5fxa*ukmV|T#z|T*PS$^lT%)7!9^Yy+r-$K(nxmr zCvCLPaWNT2=Oizkaa^1;yjv5+F@B_+<-(>U{;8nAD}_~MvovyoRb`A4&8zYZ_6eDd z39t67FBDcd$Vne*3Xu*J~kPrtsCc{^!N|h*8PV!tw_Wg z1)Jir1-dp?eZix}0_-udsTgBlmnNJ@QQ|OM#Tdp^wHWryI%DBk?Nc=RAr&FA04eI0 zN|d#DU2$SW{<>mz;7zxpnbo`!6T9jw=|XiVxLD?cB|U^Ts#zm&3kU2CfrRMf(%(hDWWR|n8gUZ8E_`*J6bBeiI(71&8qnuYikT)@`17qskB)`Aek6sLyKR;NVhVQ|u^r$kxoL?1XM-V6Lys+|(Y!e9<| zct)HSN5Qq(M_)QETH3_n!`q*B3(t+I7E|A8u{~lhrlz08PA%fpMDL9hW9c0~i<3Zc zj#m9F-l=CJyytn^?iX<%aX(Lw{~{i@c`*9NzY}Rl!3wK?++wuNiS< z?!0!u(ZXuRun|&YfNvr;!++K8v!lv^>1xhvU$_}w;0?1L3?PXdS?xi8yw6W_H?~jD zYXkWAF5WzNF_s=AiTdw+j)pVOSB|O`y;4*pEX8qSec0GO^E{n=R(u7UZq z!sb?Ld&jc~A!&w_B0_csLPUhbIG#X=gb;#|G9I$6lprL;@i0PQS?{ETkmmy-5<=`~ zWRbp6^W5dh zQ@^*D;=T2fGY6j>g1Xi_J--G=iu*#AKv3U8jOP%e3Nb!8m!}@E3&|~%$@!D5qI$bi zsA!I{QBdc5W0BTSp3f|=znsiaA{CzgYtna6s0I5{k6T-*6p56b6HUXd5t$-PV98aF zAn7M*mw3`4t1nas3F=5}q_VfGpk{k>0(?Yzgydez>RR3QURFW%dgLk_qRpVTcrwYB z!gW=xw0(wr_CU-M|@A)gL4C3C|mX^GtaKeFC)G0*}*f<~wcb2M`1ckRA!AU}j>7>@AUMl`Fk`7ED zALS2L_u<1m+w%71Sw?YlOSLr?URiyH@%k)p3L^+>h6B*7M#FfGZfOdW5ayxzZAdpZ z-mGjx63BTU-Pne_Yw(Xn=p`lV^(}QjYb$;9jrICux-pUTBIXVBNFwRnY3*pXmQt(z z!|m33JM_pS6LpJsSdjo@GiR}mCCcoT{1`R0C5zMgsw=Q|AgCK$1%VKtd~{fEHJZR_GIy84$3-88NK;J}(Fd4mYrxrlU6K zyXx2|PgiZwx2Lamgx;=BD&~!9M`9IM(B5ez3&2Tx<)SpQPyBBlJx%@7M+bB!opovI zDPQHn&SZqx_&)it3z>|BTBnn@Lvao~xxJD}zfC8t%_eB|4Y72SBkejNOlgaIW)(@7 zP8V9B%LyS8Ot`My?Mpv>8e*LpLUkNAZ_T@y5mOhQ#M?mS478XxaIzM^p)qQlH%2X^ zcVv+MNn6}v>K>(Qg^(JfuJX*XUe)5A2{;(ZHn_UiB&bu}^!*HyXz1^e6`hL3QYC}5 zOKqcG!i;Dnl%wf9P=X3wND!yw^Iy@x7RHw;32K^~CU+%rOpN-j8?_ZKroLmD4E$Ss z)^sI(Y(pIZ`Pma9mMDcy3F-hx?q%Z=Y)703$JzK<$?UMBzGhagoPYQ}({AwR#@gS3 z#DMP}q$)NOQ(G$WKtxjv)ar?;yDjfv*(E|fiuqAYzTsX-NhI|%87*y?SV*dW(Vi`x z4D5bo=-cmMT~w@zP~Z1qO8xZtogX%Qu=DKGYtC)hCE(Ax20MXkh2(9+h2%tL&uLg? zZa1<~Y_n^akbDT6m26tN@Kb}~Yh1d|4Tf2t8!G?IB+vXy3i@(3nQ7~z{)vt0Vq*mK zofrz3)k*W^Q)3cT!9E%NF53AT?omz&_h!yna%=Sp*Ivorsg3BM>!!2p#{1~8?&#}%FxJ!f9wZxwoag%Js2(I9 zu1P*RzXwT+9FIv#y>`Ec-S^R#dytGCt)bePjV-^}#guTR;0{3zcf=yWHXJ?1ZAR)d zE}vGQlEGtVAyK}KJxMH5J%*fml6G)?;-!6hl3~bww}-ClNqWGw%tH_MBr-x@^wKju z!4XWo;(%{29@@o2Z|y~H&FiBkdD7WBtv8 zyY_|*mciOv&2WTTW%VF5orb`-$ia+2vS!tKpxzKUNN-4gN=&XY(-XZ(57UQkwpSj< z_sRvqzgteMm$a1-8^8z!6Tt)fkb&eu7cK6C@`_e(byRNZgF!YTTK&deyF1NtNo(Pz zZ}cSt$e%8Hp)W~9$mT!@)7Wp)K$4U&!l_qufu$L-CI-vW{&x+d zA4oDIV$?f;;46a-vRej{qb%kkGfB2x^rYbfKeaSV?T^p9fl69gn&p(HaI_=PY@j`u zCYrn~C4uLlOG~Or=2YKsst%xP4=R(A!qJa8nhZ1+Xv+Xv*@T7xZKmK|qv)+At?k7E z6CD&xdPH#JWg>H#YOvXP5P8uymPcdky^1ii(vfFjX+k#v?FsgZXJt3B*P({#LOi8) z=Ts)deHc_piXTmDLRSK9rI5Y1nH|EM>6^Vl+4-;kk@E58rI3u zx-?debjB+$UrL1Ock|=S^m|lI3rx}=ysciwuGe+iD9~ySqQv0$PY33eSOE)%%ADd$ zNspT>yMDKZL&6K|8;Um7+Zr~(m^m+hFNEByoHFaKyVKJBlgPO&v@7js-6M%h{ zqpf5(6m-!S@=1T)Da~o8r}BxLjeYBvlKGW+!%3`2u=p@}1WA@!sGri+BghltGc_emok6J%ZC<3qg5kjaYDkrO{lNS_t#y zVH&w8`r z+b@Wm^k*-fI+`TdQqN0gy)Sc|dLadK@8{h8 zOp3Qdz5x-~vpnI&RPtWq2dsll7;BYiuSgT33)Q>s<~|Z1sbIcQV+Xn-dHjqVUYS%fHoDh4>ZvlJ@mz~q^oWaq|E4% zvE=b?u+Hjc8d;1GwAYnbYp-ZVPCW)GzZw+MxAwKt7U~xI=&fWXqT^Nl`>j|^9i+B) z({|&C1+K|%S~!kl2_Cv>97)!Bw61n~a2&q*#=5C}9LXU)+%$VU>7_HPm2SFlJV|I7 z1|8aFwEHh%HAz>Jr3^zhB~JR{c(Q_&Z=)@5BNqM^zm0Szx_zvDwrp&xuir)%kq#KW zCXmduE9ikew`Il!p zvMf;5qu*UD^=j{<-*qo}w_(L50V3*MOM0T$ehuy?kVldS!OUQ0N#>@sic_GR%PD6! zT+ueVStTsrGzhX#bpGwcEIvYa+)moy#J|Zwzr3BSi5sL&uy-lxvT0(~yD%x+?S6_L~-R;&xQ`nW# z81-|`PWwxPkn{`gR*<=V`|^JAn)QTM=cCrCM2_vIt_QVLqvFM!4}+s-HQh&7O(p9g z&DQJ=f{KUwtUJgUqgn0Y8&gqUCY5*D5(AUF^xz$&xH*PHulml~GQ!cH>F8epWEipTqwNaFt!&|8X#p8Q)?uDqKyqTtYKf$`G=_ld6+REImAnL)<0QySpz zqjqzpl$_;ny`s~C+@_?yEV2BAcB_lV&LP>+;jYB(hP;H5%f>Q& zNoaYDdK(t$=aN*M67g z9g9WXwDV%}qu7#4MWjDD;-R@kBsDtByKh+XCc&jMC1Jv#Q#;Z7ipYVqTiG&g$z;eN zrCCAi~mSC8X=|7i{tca`bVV2wThgyHqZoyaY zQc}=32MRfem+K+wSxUNuybI@knsGO|o%rWFE$NGQsI6(})n2Etha54Gkq2MjYq{p)#cEy_tQ7VUAbiy)XiJRn;E6kVsn55D= z?W8>xGe|+$R#~x(j3s1(kLvD4eO80Xdr3di2QQC%NuMa{W!74EE{Q6w#WaxazL#_j zVH%FMQN-)gQiD_7`!up-V#+xt5!s${(9{*A&)5cNo*I3nVMz?4I=m(<9$(bX;>9xh z%7rD7!2aotQ#EYEhAGguxI(DVV=XdHUF)8eCY%%$NCRSNkxBSBhr~A1>Vqs-ke=jz z2R*-n^cuVl$(t|VVQP+~ws^5bmMv~?hAd)`h57OfQyB2|-mO>z6m(ndA<&B;%3JMv z_N$XEMm+sCI{iK}h>UU3ZTFE}-A`v`F;GJg_km{yYX7B3+w^W|nJ^IC0}CyM8alFMjDtQWKa z+)({C+W&r%6+Rz=UV7!cHplso755V{{4BOPnZMRS*Q_FA!uJRKdmQxCD&mbeuQ4T! zjG~)^o_l~yBz9k=`9YE-=9WW4c4mnn_bw6TZ2a~t$t?d(+m40X*`~H&WDyfL62y|? z78xaC`9-Wv##byfwM58t?8l$i@Cx5%Bj$*iuK0?_O$2z3i>fxl44sLP6~JdMju#3z z$yyFsSzjhQH+x=_Ac`8QG-y5?<7ek)nF5g_$k6&Jx$X!VQnXM+i**JV`njaN%g+w6 zG=;s7?nVUkIZ;%|+xI%j;v7p7Lo`>az)(r=Fiw!0a?BPQ0MPD0jZHR;j(XKzIQ z;U#P}NH7Z%Rn{sKXtQDxnczf?FjgbE%_NrH9EcSNf;y8viXH<` z6<3`W4)o6k6=-e{dex~bIp1*cCiIGv8XqFDQ-49|(FO&fgM;Gy4D|B`wf+R~ydeBA z@b?;y-GqJ)bXUW-K!*g;?sn4Rhse>cw<5G}!}AEW1cmkon%VI5O=v&FS&Q|EjtEU? zSc}l1L2*)nHg9+ks5Jen3YBv-lL?hm~8d!<@w@9aLc~-iy%1N;*PE2W7Av=q&ct zcWF!zIvwaF#dH%|0Cben2I$xz+TlP4LjvbUbQsVa#R&A)U>17<&QO|NhdGOwAC)`; z7TY8A_j*Cd87CxbpcxmGO&f$M^_PK;4?^`ozpwx8CNu=-m-P)mZwsPTajx+|eeF%? zKY{M4KLvDxEr|F8;O+It861Sdl3>Y8^)*0m4?+(CeXjnio6t{yuB-nH=)@pe*iI;U zp#I=Z=vzRS*4y3#JSm8H6X3b^dv8K1(5dyifKCpgT?2G%{Tnx-tASeTUjsTNh;|{+ zzV$EPgf6fF&aB@8cxn*w1fVJPtj7kUw*gJ4XFc|gAX+of=Jk)=gboC%t7rXpS`ck# zppH7$e;ZL78@4(D{=JTM;5&neV}aJ!u?`%JwgCEL9qYgaO|-Sp;G-+~rjB*sVAKQj z<2u%Vrw7rV2U=MN$w-Ep&=}d+S*tYwezT5s=NUo7M}5@%7@BDfLO0g24m>j`^nIXD z)Ugg6jJ^l7xQ=z;SwXa~1HGq?b>Lw1HK6nBSpS_JL|X#%&bqAYC>xJzwWk4(uVdYL zP7pD6l~u;#eFz;;$2#!bpwL-ByVtP}9E{EcnpVd;aA6SbD4=cYSO*S9M*@whWBqqt z5N!_7&^oL~H=F>!G!EL_(LywbR|*B z6#B=Lq!l^up=nQ%W#m(07_`v=OZCv>>q)zoXT1;ahK>T8@RL>P45J=}mLIf-yfpl2l03By zju^93W$B8U8Fj;{vQ|ieSwf4dGH;5nibXmN?zWHgzEeg>`QNX%#@01G%&AA3?~yKql0^3M4*2GYiPbx|f0w*l4ok z)olUNIzWSoiluMeh9G2I3qaX*&j3mc5Sg8H*7GFQ)(atVb!!mPHW1PQNCZZ=>qs&X z2?Ja8rFH=t%vCJT+IxbK7$ASt76EA=pz%TW^?dEZAVdJoFST=lBm`(K*+6u>c4iRt zJCJW`rvYgbAUX-;Q0?R(C!G?hR~Ypp@Z zeuqtGp|yhnB?X9H1JU|g7&~r4UI+4UZ66>V0yNJ7Syc;T$4$udK<=*10+Je_Sq)@< zZAK8X2FUcaWNn`L5cau8GmqS3W5b$lr;Ky(KXOKqDVWEznEwKzg`DLFuc ziHxO3ZA=g{0!WwINFXTzn%+Q?YQut%K0sQvuGL|n*=dfeCHUPXtle$IxR+iDdwU&8 zCOedAhCv;s=zx7hvrhxb5?+km)S*n=Fjg&s*nr=4H(b=bnT)8!&8U-pd?%8Q+e$h~ z4RF|)#X1zwflf<0LknLoLh~v8zZ;%D}X}g0=!Owj=$b0zd z`6l_K_hxKw>hPs3V=b8AyI6#qeZr4{o(uL(^@H|21hbgZ_cOj5!fDo9vm#Z3xRJf(`;!YAG z8izyq06WOIi6@vS{uH82Ll)55tU&8N;IMD)EcOZrQKHF6Z_j*@P-0yU~hxbe9h9POeDYQ(de5LCZAJW}PU;2PdZKHECm10mcp+KAc0cH2M=r7+iuvqWYxDUxKQQzYr zPWT@r{4g5FcQC>5AyzZ@IO(PjN$04SAVMIhQ|#FY+XSUaAEF~)0jD35ytuiJ{Vd@W zLHP*@r}4ey{WSjo>5iWLzyUHCKOY?+9r{e&$E?vnT@uDztbXZd+6Bn#8eqxLr#dKg^Qj$N*-kK=X^(Ebj-2xhk#@KNfOSHEx!bi zo%JM&BOf-9C<(;$$ORH_d(y3w-(n(erZ=tK)G4l_kT(LNUmFW>q}wgauLu0jqA2wq zP?vG)GEnD%`sJX|IiP+a$UhC#8#(m`P-lSpxuDR|pnlpG1PlfFJ{AYl%v!H&@SV&cZ2p<&@Kst*`lEHL6#Rak%oYD z9w(g#(qkZ<+Z3i@RG8W1Q_t7Co5JcqIjPBqGtTmOPB|WwZ-DaF#xR@u z4M<0EuUQ(-iH3uy7*@(zfq#erDncEPF(8kJi27!XLIFQ@7Q zsymUwN>t%u*DY2f)ax=`ng&R{PK7uXi#5}g1>6=0s1j1g;C&pSwhv^y##L$>eZ^;n z#X=nTjzqXwIgFxQ?uwO7$VBXV3xw27c#(wwZG$IFpoyGA&9}QV6bI?K_-3~ z0>R5}P}hO1-~@3dUE41JiG6yUvqNey}=WATV1 z)56ZrF`-ZhEl(66AbJ?%27AAh8h0WC#%K~)dXs0i1DX8+O;&<&dw?m{w7KbH+4d?Y zc@-pwLBfh0XG!IkIJy<+_dH^7tGz1QFM8cs1ayJYsOa_>f1uk5k+Sie-TecO%~QR?Tds3Pyjs_CLrg zJl+BxZvo;>bg;evvorD>j?DpPo5Q1BZ`JE~q-mUhwd(;q(gTPziDQ$1jo@)6@MmL5 zF5+><^6;?;Pv&uEBF+eojR2O-b=aKp~Me2hW zS#Rz$OOTmCL+S~tOVAj`3b>22vB`FWQUP7n1m0j}XRO>Av{C9;j-l5!qm^9*{bA6z za1Oa_`vw~c^>(I%i9zAWUgin6N5VgWP%yUT8Tva7Hji+ujfuvZrIws74s>tXS%dq{ zu`AGHR3`9=p5aeZaqJ1;XYkA{mmeI0X~^Zzkn_m_0q6*%1Mm&NwgLars$uU%JK|>d z#U4@qQEQ2FHEci4_`zYiStS_>iyTJGs{I`tdVe6!8LrF%M>DWst&&XfFpd6$*rJ=M z-}?IJ30*&dY8Xtt)x)&x5As#l7wkG{d|`zdZSAUVf&hvD6S&bBCRm|9iO_H!8ivrv ze00lYk|1q+Es|DVhM?R`yNr&H;<$EMh*GE8yCRxkjOR#%F-jeWaGWJANC!J3?d>5s zFA7E2ITVcS>w+D9dxgFMfps* zLOR$Y)n|N=Eo9FprSPPZtnoQr)urBk{5jjRkZTdfNN7)yWwvi-mfCQ-cuqIXo5stm zgqK+hgwK*AA$Kmb1_oLqr;X&aR-E5tWruUQ1*5NwDT-9bC4x}T3H6*%;)Ff8{Pbbk z`YLII!t;0<2k$m`%syVX!36!I>EY&%HOFJ(snhTCT)9_9(}xmeQto9_ng&?TKH`y32;d?z?V2b?Ua z^-W0~MA$!l?^%B-%e{+bJqcN1XIrV!RyEO7g66buxAk}#S;T0Da&{Irh1=c+!8g7) ztVhb$EM^3^aDu5#1ph$z2fkOVpOsbH*UF3{l~W9FqIek;Z~8V{KLkYyr-`z!DsP)zhKfeP}2^M#Vd_^bIH3ZDe9HKB$p1@Hi2WU38JI2{l@8`@yE}^dRp}A6RRc)Z-o(k&|n*SL}Pr z2eGsNL#_aoj%tUJ)a znOo(^r#9~z>+5JLYh?zW11Km(ib1XNuCkT_FX8wJPW-m_Uh50MUgTIc$6oU;wQfXX zWwAf!$cx^)tj~g~oKtz#&z8s(*HJyu!Cv@+MH`8wD@vh>MTeE8*m<19-&ztm$?K4i_mZ4GgMCb~;3EOWg1yw$ zPS$!JZ0MMmnwQ*0NZ-ZZ-^&|Bd09jGU)z(7wI?k4fvvApnd!}3HNgo-SUg8!^m{-7pIy1{E%2AlGMCC_A zEU1N|1ES-LV_`t$8@5OZB+j>CpR}9|cG0e)looRyyh9d4poU`?X_qOE0O+BL|=gC62aM2u-ZHq|BH!9JRY+HICS!{FwsI#Qe&4i4-sD;?yoKdR&tF#Etc`MPi`}(?Ycy zlrA_Munbq^aZ{Crt>GI!9b|38oET@Ho_1&@o|B5`os`Wnoe#fjP0)!=xVMLk~R_ zCZ&<>9;y$QEZK7rV;qmM44o%J{oW0eI55{B3Td!m%-qMdxn3OC)<#IH zJL0q0)ANTeF%P?pSX=iALcS^Eg)IKVE#|I|4Et=Cv^46bD+rNRpqnJoi= z8>(VuBd8vYmpcC|?xrYf1Kh3pw@=bvSstLh>)+D0SEh2>gqmq|bZaTz_Aj1V;AJ|3 z(=VwpW)xNHPmzqUYF$QtwIO4E&FhMsQCMxxaMZk0TdV0@)8~gl`&EuIeZJU9tRbfE zaAE7aMrY~@mjsvI)Cn#fTn1AzTp^uoVokWIJ)C-g5vByVLg6x+;@~pCC7XtVCMuzG`ke_{22 z%U@XC;PMw%XSn>emI7A@svz7X!{x8EHgNgNs3lwmnV7G6+1ead!1Q$CnYLJuR3V|zJZV#6pt_V2+u28s)avWR+xMZ7b zgp)~lo8@M3g~L@W>*0bnCst2IXgG3ZeuYbQJr#yF&-?g z`5NQFU3@$kSy!vsE^k-f^6^$D(57Dlw_AazHWHt*H$((trCXwm>WWPdp14E8>r` zl}Vhh5|Xe1J3w?r)Z#&+*@Lu;A3G@c5gv1`wplJgbVFb>ijrzc2$B?8R zHaPhplGF_@K8PfBhKmm(NhxsgK_p3riw`16ZQ$aANK#9jVE+10U3JxL(|=b56U5R{%%1HLB|Xk!khYa%omJ*RC->+jH3rPxLQdUL zA!ba*>}^5KKNMreylVgKO{-~FSEs$;3Jli&vDYx_pTCFy)(dFAOT{Ue>3G?U6)=~> zHfXU!t_vQ#>a?j%EcQpm`DY5O#}FLz*I~{e*R4~ex}(Y>4AE$Lw*Qw&!~Zk0Ut;p9 zXl35U$!CsYYn)L1ooVp@VxD*7H1B#T+5*M+ASR%Sc9-w}dID;@X?}j4vjAh+wb-r* zOh~oBSbpt4HzBoQmTEKw&q&!k^>0i_|H9}{|2XkK>>2FK=3mcH|5jt$&1Q#xVQIs^ zXX*dH_P_qWWNE}rEZP1;^Z372N`VP%a5>rdAQCi8{$XrxWW(gZ$fKjLsYPKI1i?`9 z#h9lv|1j?Hh2>kJu710&`*jF@-TyoM2T0Y=REnBUH+X@wCp6msVL zwf*0;i^lig|NP74Z#^*^F>f3%TZ5@@8|U0|KQ{mI50baQ<^P<@hRgpsl>wIy`*H?3 zO?gOh)PAkZ!La!^KCAvVbG93~`|762C>t)DyRQ$I|MAh%_P6@_jZEIh$I4Uxk&kuT z|6(oUrkd?q`)bojSr!;6OaI+SY5QM%yEE4R&PaJ<=~>XGu75>i{QJKg0jBanDTpB( zrV!8Fz|sFLL$=;Ga|DKl|KBlW`^#EK;~*JSNMPy45t2_N2R2S5MZO*&%G>Pog>Cji zL6DU>^4!o(etQDJ(=)&HMx>>cWs^n!(l7q%_7 zh?c>!p;)xC)B3SvZuD2*6h4vWx0e=(KUMB+FWs$=Kdp81vDE!XnmbvJ*$N@!mOvY*`8wT?diE| z^p$s)!gwv*&|%9po#OPodHgQ=Qkpassb|5^RGO3s*IX}c*GbwL|Fc#FLF(&#>8^H$ ztW>Itp6Mi|CtPu1+wN-TCCrlF6i;N6yEhasbe58nPiqe3ePO|bf{m5%5M&xJ<~io9G7aA9|8A7 zPnfmngOpk6@@?aC^X?ouZt$Ih7cZJKZ|=BdOY>&mJ#*>2qGgMhMurQ*)V(Ab!LmPC z;HG3FxoW8kI8p!(ZA}F)TP|QT@%kf+CU)dvu}3f+vM-EY&3%RN)y`m)sg7fIh&sdc z^M0aJx1kCT!Np>;Ojv^oQ+q>oStpBx2l>$(Bg+trzlrI**~`byn>qUimVd;ar)UXp zYEC`4UvBbW;mzy1|JY6bSX$OaYHge46*=F-2}$zvJ_Sha45MQ10969~X>JYBFvL%j z&uQ{5FBC%6haK#R*z*~n?G^|A@zno7kvXvM*jQBupmNz?Rnxqzs+#8;Q9Z?Ooegyr zksk@qN_Y6pkDb40+3clrrq7)Hm+ES&uO<@VdT~C6{UU#Hra=%(F8)g!7%_d(-26PA zs4ch={DvZItdqGskr330-kXG`6$KVMxg)@$Al%TPMowRJ4|rU5&(hgT|H>z46vpx9 z&0M;8_QKgSmn~hqXx_}bn@VQ1+P$f0jzZsNV=KPm^0(p`Wc$18FHbOL>Ec=U%v^SJ zepC0--RY7!&)=+mg#d0Riw=*l&Xa(0IIiXXwLgrTy>#C6g*PN5qeG};sXjxxb%5f~ zDJJMZ@o769q+`5Nux?D1vd&y3V-K}hC{B~A(=5Mg&-fatUI0}{AjSp<-IyVDPJgp0 zjg<&ps%)^oNSG=i7#VKMQhu>1e7=MJmLbK*-vPSYlnILIJ{CUK?f;$VqKRFlOyg#p zJMlL~7W%B4PVFkC_qjiSicmlXt^aP(^eMU{i}|Z|mshX&8vM@@inQ56aU+*Lm`Cd> z6=i;Ak5ks#Uz!2K$B6%wo86uEb~vrG7W{@PBL9^Xrfv>45A1YCH_1%aLsLdKsaMQW zJ8SqpDApkg`z?ohtZq``?AEXV?b9~e+bJ#c!&Vev7qVrw={|-<*kQbPML~fPDv_Cg zlaHy;^rvpNe+`?U=o5j|mfOPu`F6MKIK5Z<&BvZXI8fQ}IK3-VY85#JEU;mdMa-nn zWJ>wuerVmxloE3W*;@qaWPu|p;HrR)238_oZEK+RyxO-sO@CcNWtWd;W=RkBqpo6J zrq97@h+l!8&DTOHLM!N3QJfx9t*(o&@|W!zobd5#JCUBBZh?`!MC; zFOK^l4&Zk!3sCxfcX40i%gS`$G5a2pTPRyfhO!d3IoWHAogIs?WK<-cCBOz+h$qUikeUhS-}k)9+^7(7M}9_pamu4$lu zu_>J-3qek-;soS`eBS6GB`0{bia@Fn2-^{qDvjtVwWeZEsduyEnkT?sY2}cfQjKUc zSrS%Egkty98uPV&f_Y-w6(MSKy_mAs{MPRB!N5Wa$C$4r{ud#M2obLu3xtcgMxiia zWSSYi*&!Em`yi`kgT33o5_-;Lvy4IXz%Ia zqbqVSH~C3R_Em1mk;22_Z0oFiJy$v;4!x|6#u*(CWN-u%I~zgy`O7iTm5xpWd=zjU z@F$vZ|H})f?$koh9{Vc=&~6OfF%@}IoH&two+qV7=!PP8 z6%G9Y{;!793l_$#_Yd4Y{5pcs1^UZtPvd=$xTaPUaFb8BZrU+lO3{Tv%8`!Amj>9r)HZn7d>OLsON9;t@})1n)Skrq64Nfr00{nl^Q*9e zs1Nz#Ay&*NdU1;TgW_ayWN9Ey&!#x@d<3Qn>NShETOcm7M(TG2#Z8hqG(HeHwJGv& zMDB>lX*6S))OKPHyzStP^F~7hs7;VDNF~5u4@K-rmez7F$w z!k`h3j7&fksi;C$wF<6kTukW7FoM1^OiGRE2N@_faZJg~o+zUj&kv_3fTNU>VccT4 z)DNZfzWaJ9nK{$%;FZiuXH5c9Kq|3$LZA+2a<-{bHMdop2kv2 zChD&X`-wAJfc>6&Bjg?YPm7Fe|kdyso6&h4l z!$8T(sw3?-LW*n23Wv3ERyaQf3MXs?^tno@-ES_O-w@8E1)D=hn2^#-X{qpD<=Df_ z#X=}41U4z&86kCpzS#N^=vTMUu#wUfTfH{I9cQi6svRv$k7)7U7`VT5Br2gWSP-fj zp-prT?9l3~rE~*q(HdZjHlijBI-2XX%Wi`rrsx$t++VrzrHE5~{B@b3RKqAT#G;B& ze^7Eq?6W6WdXT#=ZMZGp%206TLI7I9^KYM@pl0Uux-I+G~_F0xq4GJ_48Y zrFM#bKT666w9iA6MoShO`#=4KbeFp75){1 zIj^IboYw_cH`sk(*DbgPiphJ-xU8UoHG-nO$99ESgw#%!q2*EP=MbDr$Ez}_l&Hhp z<6*U+lcgivdG0Qyq`5lC4J!`^#O*`No2yU=c5SqjmXqq%DO>Fk#!QgO?(U`HW}+s# zBmamLvw^gND}lRWFeWWe#7W8nETbJbnK(u|A-+Jf#!B5o2g9bvAVs48oG7&l>uk}P z3h^zMNuL-i^$vLqVbS!`M5%SR#*pQJGA*m{qDzB)OdDQ^J*~yIm(#LqpwhL&d<(uV z%LN$Kin~?1y%SSMUTiDDG%_B)JJLGUw8SqCEy}F62*`Duygz;UR%zg19UhvcYS=5N z-+S@py^7gb5;;d7cu2l=o}hN{8aPcN+FOEk5MIzeEyO3L2{nljhx&v5NH zsZG>Fh;z75P=EDQH>3&l!EsV&C;|~udn3AG##PTL`$ zmuU0xQd_Yn%@{9bg++LJa&#%3J6%SA!cRVmwg|KKIwggoo%8M`-vBx&<4VS;wmU-B{gOA;> z;a;sh=V139PIkY_@B8h{{i%!Hce>gATc)1hj8{{EK%k%C;oGE>B7q{-8MjLxMl-#j z?EKIwlo`|G*PCWdl;XnTUEQr_Tj6`zbo4|iD`cd7XrLL;7bi;Lt@_w|Ko^zSCZ=W9 zw8qd01KzflKlP;p$4YJSg-ex*Qa^%XZ8u5kCAIZ-qHj-<`qF17NeSX}^sPzKaBj{6 zDh|Dqq(0IPPZwG{MQTeYPKHnR#`=A`CrjClbQdN|6QzkBsJdWuGp0zZprz!ODbhV$ zjV3$V!|XmF!5LGf3DQ<~oDowtZv;QExwuX$Q{xftQ1yGlZLV1&!$OSvv1U$ z(tsJP$l3A`v!k*G9Z|3ThMhb;I6GkdX|ciCY}zxhI)0Deb-f|t?g+&j6R0KQmY=vkm=4lrBuTut*cY7&Ue#OcS>uS z%EuW6QYz!-@d9abv|def@mG?Z^Fg7dMth51Es%N^gy6hJd9HYx$R}|C8Yh;8pD?PO z!e!jsqEuGR_V_ZUTU}O@xt{e_++FC-;dh?9JuQ+fBI?JDa@(t<#0wV!8re79F ze?3pXE$uc#iWbjQ4w@k?(1k5SX3KHqRPLQ4Es$(Ye#oCUn#Ex+)B#oDFpks08mTUX z>W^6!35o=NbNFY$ud9f`*F!UFgnG@pz>*8aIR=D$1clVPiV!6P_*%Y>1j~SMKgjh6 zYYjaJ%R?RXF{H;Mp-B7-%^YW6yL%7UzcUW=h29pi{IK@3kM5Z-CE48G6zdn7$)21K z4Mv6zWoFBK3?qMdWuPtX?V8XxfS!X+_%F0(_SQ}41)wLr>@-sfSaZW1y}qJ_5^X)K z*Ue8}1j96y6BkHHqBxG;zfhVauB6{D zlpYQHvuK8CUh6& zJybw@FP7R`zt%FK9OhAL@e_usueDd4`E_fpy0xO^8M`cerB(U{)rslZH8yMUx%+%5ZF|9+*SDFb{`xZ;G^tI-oA1#*RBEQlkEHci8D*7~`8LeL| z4HX+`mm+D1c!(}3g0GZTG2a8!$9$9M&?QoaEm%WN;xWI)o<{4NTkS237|*Ij8Fq|| z*ky{@Y!#Q~E$djzUQZizIBEp zPk-CsQ{aj7KiVsSC@7dHkjS_l=5(1W0B^_$VNXxo@$O5&09m%-oOHES__Z{#qTJhu0`R9Iv%M0k@orS5Khd znDL9?;&Sw~3wgJji;Vcsh-xDbWRS7WY73H9hm z$wtaPDcY5frIVqDBV42AUVTyhONETqF7Twe2;tv{X%yGG=a;ex(PzhBZj&CYFnt*& zcl3oqFDc&`KvppV?;?au)`_~E^MbBJ{S#lDTIUE`RH8XleRuT|TM_xa9J)lAqa4?M zo%2ere*@8x4xViL@<+3|Q&UX*TVTv6o^%|p zL1SIZ^p7~ROFKSNZf6b0ac_`ZI4KXV#IM3W32{GaUxlQDOWRsbd?nYf`c9Vq^P~KS za{1^#D=YEYJE6k&XQeRrxHbkK_+u*u>aDoZ!()~y`L)M2+y4`$Cn|AXZ|Tebua=q* zB}JO6xQyL6nrr+|;ba%2(k|O39krpw|vPap$#u|`z^KaA0Q+Lxc zC9iadUwT@~OQ^}#^KIE1fm~+fVmk~wsl;MjpA0*o5F$>5pq9~5`kuW!YPoWK)aP1> zzZN>62Lr(a>KIaNxaq!GG(aqQ1hik758rXc-eaiO2{oT#d zzwitHxrTQH%4Q<24!;XUX35x{KXAYDw5;)rmCEfb296K-y(^U=tQ)+_@x3dRZK*Ds zSqkFUSunXL1k3bdwFK*UHmrW@xrxAcf+u}eUsNJ z8)WtmZFOLu>memwF|6*wy&Dv(aT&OS4`g%e!^)fRr_d7OXC78wLq&Rp_#=-fnTT_S z_U(K`dCZVnD3%7x|7(e!+xFb0{OCytMT<)Rz8g2Qc0RwI+e_4ZdMA7y^_&2N&GRSSyPb~3dQTa zG@{pc!+#p+4OZYeaQ^m~s%h%G&nNCXwOJ{Z*)i=M-@Z5wttu8Jz6tHKH$d;o_^!n) z-D=?vJgr8Rbp6hIe~bsW$A7-S^jLm05B|l!ywH|2H9e{f~0=S7=O}UcG>J zKaYQ2S#P`&W0n$Q`SZ^!{fjN)KtO`{X^GR)r1Rn2^2-8vD_UwVF@+v(>qJCy7p$>N?+CdzMY?<0@155ncZDvE-Vby6{7i04*eY7 zL{|@}YD#&O-WpKyC^i^0>9GTK^K@f%&wel#1YF)>&k=v~PHd)ofdk)qKGZ!c&rTu5 zm*NUTWDBEv85#d3=v?t<-x~Yv0Lc++eXH%0?QE+9Rqy2~MI{4#`c7r|pe%U*BKT5# z`@_&WJ#Q&8425{~7@*uaVmz)_750d&rFI;!qf+2iqy*Uy2l>BtDpOdpNbvB!FDw07 zs#qT6b6-}jht}hn0Ds|SQCCl@4wPs=K{1 zp3oCLJw-eTW=XQx5{Pg`ZKE8?;zWQKzN#!itIqlP^RI%Gog}9D_`9zv`Dot*0sh^q zN-v~-<>BeCDaExZsLiyzU+3TNXV*KPqGi9P^>Q82_W2}d(Xz5>WVroM(-G};yjSC0 zwHaG_EX&vy1wx8ni$aZhEKBWpQv%iCC?$(y{#e)V%YQ`n@FTB5>n=qs_wesuQ@T&c zhS{4UbUjRwx@o8>blGjSFBAru!it}!6b@ zU9T(sN|VKYpIn@Nt}2)MC=vn%wq@x}MS72Ic1y+4=bmyGH|FW@Uau8rJHb8W;s1PH zdEOEY193&w<(0E?rQ$2CH3#^eN0nm!$WbM8a0V>p6=NCq5*OXBCTX)_hYE+QvYRm1 zC@fpUPU6Nf(aSe;-fs8Z>ZT0!Z^y0bJSHCF=Z`8$H|GY-$YK_&;Z}8Dg|Wr_@*wOq zL~zOtMZ1tTFIoJ?2nO(m{1zy}MYd$Tj7eL99FG`xQd*amO(nr+#f^ zkS{)lnc7vr(*5(tpzzjJeB@Q_UBpr;f5v)Ln3SAncP4GIf1^$6~kc{n+-;2=XEb*~-WUjZEor~G#2k$T$ z`qWnY*J(B^re}l1l*LfL|OzsfejjYbv(A!-gRS-4PLP<8imwQBL4r3+@? zy#!o}qwnzV|Dl{pi-Kp<5iWbvlWr@h^9FDZOVHfa{FCFrBBDhDOf#NPhGnMc4x{%w zN7)Q5FvzAxf*?@pgr_Jkf8gkeHSWxLA;N|~3p=8%)iu3-`=KQTCsKIgCqDpA~ zm7->!VH2e7>Pb&YNBVv}{l_+s z&bE5&M%3Nyev^IIwYGJ4p(1Eoi-%{QRQh6{xY@%ez8InM#V0Y5(y7tUo>bKSnQ(53 zBcQ8{%|BDrhOpWUlPnHQ1Sh;rSy2-Qrd1CxKWVknW^aSXUgWG@1m0BlYdLQT^}QCJ z5JGR^XrfX|Q3^R@qf&f=gyDFVG;x-dlqxQD+54~s%8!4fbWflAn_QCZ z)7Gf1Do&^_SfglP%65H4-|ilv;Z& z^}*eAO{02;q5h#m;T8a>`PZPGlGj?ab-1^a?~R1>o% zqB$zuHW7jp(%P|Qsp3?yNQbC~G(^6b>aBD}Jhg6SKYQ8b$i&uM)vkaXHV~7WiMz0^ zG4VJ4(8o%iEuuq%wbNV-@Wv6Eu9R?bTikHAjQ$4YXtikTl_ubf|3 zE&ULYphB+dJI_A%$I1{weoJ5@qZORkV_LMAuMUU4^Y9N_l?{m7;^9+IDZ^5aX$_uO z_a-DkOpEaH*G?(931mB1!XMpo8$o6*<>yW*)6nn)dli2dwlV_#pZh)_mB*sg`fXaxv3V0kU)ZK=W^iIKJWyG!$ zh$O7t6_#5pfu{UrjHN6#`pHBsS*cJ|n4Sk$V+zJpenQ?+f_%FJbl#6V+o+wNDL3J<^)n^I&>c3~KU4b3Z}Oi$Q+mqJ@tn_T{*{*hQWMSK|r;+}ua}FiIXHMdlpeEsH;SjIQwe`fPf?6X#gtVn}?}srS?za6Kf! zLD54n2Y{2HP(nAIg0%|%?&nH(+bPWsZ<42A?X=Wx!pZCgvx zQ5wBDg842Z-V8cqc`yeA8`i4mX@i2PpgS=rn-gTeV7$wOw+Q{MIB0g6@n+QD3W75H znaWWX@Ye9hH=a>$kS+Y&8PGl~JmIYV78Lf-M^oZv}|E&z4eM)=Blj=wV-^vVyvw?wR z$3L|(a94D1UQ**p?HInE35S^LDkWoZAi}Xv$WZn{~Y#KlRZ>3vF4NPE=m2j}x97nYYkd-^CjSq~z8d@Y_gB+lTWQ6(# z7*d7@cWY}SLoYIOs{O|u!Y*8n)G>=I=q2>Gd=l=m!$SB?kknm4g zMZA=b;jrvEuI=y~*QUdypBXf;o?enlIj$AqX~44pPX*6BJQP6QWv#q!quM;W3a+viu#H6cQ5^a92U|(*FF!poMl3mT$KrY z<#{CwtN*F<%6&=g@U#vlCHgV~7OTDw#R?1W_LZ_c?Pc9YjiFeaHNu0IB+=-_oHp}) zUnvh|z2HCegJh|bX5~3XD3~bNv(`!ZwD3#$?O!Xy%X)`&|4@1^Y?AN@Uv~Mca!LJC z`^8To86g2NZ&>7ZByQZh{HQy*HH-4s( zQ-!gYw@>^_MPkcEZ78VsQaxSYBlF~XRIlcHEys=Y$ry2zxZG=oSOe*w9hzt+d+^SS zU`zb9C_(W+;1sfAOudH1Twx4wF1Wh08b7FmC)|a8S?%HZZOZ((ReId(2_q3V%EO2baU6XH(7 zQc)~U2B}mkb71+8$8REjWf)4mv);d;BwRNQF_rku!q2rGyIOy_tOnsF_$|Y)?gZk{ zfWIKT4!=k6Q+eb?WuO6`U`Jk58n35gRNoN4kzDDQBv&y&EPFKV&we-y^j_4y#o!Vr zuukWMcL6cxh&Cg{Grw2HCno4-a3abLjUQ-dKs-LxrdMs__e#GxD}p3_Whi!^g$X66 zWQ#iotL@IRT-}Ufv!tHYVm&xsK`PF6Te@#X&b4bf`=t4M$%`;}2RN6f7sYR&Fn z=QZqhVqT+nc+n5a2pmH2FIV$}(l_BOC}5TY;Pfu5ME0O|hQINHa!Uf0P32PgL#ce8 z@n1-a9ojePzsh-oVMSnH|DTk(2E#}{Z){hbQ9t>y4(o+?TflKtgA4#hST5kAZ?d`#j^1GKRu%yf2oLW8KvT3 zZW)RH5&C~a%Ls&())DB^(Po3Iod0lH8C~10p=Jb?Nt(A2^|9MO)Aoj9pZLgKT5ow0 zwC_#vn-VuAZKC*(;QDaFl|At2_W?}1S7I7Vs<}R@KC(WhJ{s7p34ZWO-07-u2SI-U zr-x;imnTF5+5sbzNU>1-aovGpZGwXMAwJ1;@SZmRCuTEueWB#@&wo~ud(zCJe%qvb zMBHS5+D;qlVc=p?PiHG(#8>@t!y$e5lX=D!<&BgNw4L55z(U@3C+M9-K)3PpSCoal zWwZsnDE|AM_cIV~sD5(ZDAeON@2}<6{-W&3{6M?vnGA{=l{vso|MOw7@H2=Q@*A%z zcVe%7^{TQot2?Y1NE2zl?DS{;r@NmUnQkTnQbRS6*N>n^{7y|77Pmz2j^X9h?4cgM zQ&VQup70d_*CW)i7T3zIV@m9YVQSy%c(B6K3aG}IT5%qvjNex1x0Rt?tFt1sTXj}~wjHB= z9hO@c{m~<`QN-y0{|NjhA>HjfKUfQkqISxH6+3s%L>)4AA zne8|}^eK9^&l`;=w7-S;zrBjR_e-R-S#jOeJ>H~Pu7y1WdK?*#cPer0O!Q+i!rDlbIbx?oq- ztGuILD(a=^^?JQL7pcpGg^t3_cd!gzA5_>)$w;pEQq>NWCnC8rnC-~KhhkJmWh^yG zPdic`jkL)@)tZb7n^0k^e%^mn9)Wnfeu>mC)vBS4@w^DutuK=*%^$|d`SnsmWU$_nuggC}AxY3i3n*iI_d!c0T-j1}7;$ZZgJ?;kC)~sDK%8@? z-v1Gk-a_iOiHq#g_$(f&c!T`KmX%G*)pN8ogtp^vST zUPSuqfwJ?Vw#JT8-{RQPQKzGN!-^+83z+8u{QICXviMycJKkQk4slBY528*zJLPhVZy)HLTT8h{kQI}iwx~xQ97NRa$sLSK1%Zy12kUlK% zvCFBC_j-)?3GWfO^quXP-BF`SdX45!nhD6F06!H{rWOy^dv4Pt2jYJ5+fk#}+~Hmt zfg085v*D>ph#h+_cK z5-|gckoL8n_Qs@cNPENI&ryQ3bfj64_Nkus)+7~aFZz2sijambuW?jnA@!J^dU#Ss zyxh1FvY1)x>$w@XOK$R1w5bN>t)u1`LsD6zF%e~kv{DP51lP7 zyd5?+)y7ayM=w;!Z2wTZ$JYaeufYf)DQSs&Ju4TVzaYyaRV{eXBm?*^VANSQQJ125&r^ zKhvfa-D+|W@=Kff>-sV<=mYi;u1y`gM8`HUpz5TyR{zd~EALm)cc%ZJ-&un1VBzZD z8UKHN=Pvy_#rk&!cYddHViXyvZ~D4nwUm{lQcn;Wk`>FaY94HpRj*bY;=PPaHF>p6 z5J+11Ek@R}?_Tg6*hFLh5qen%!w*)5fGb zJ|*ORqKT!~UJ0gNgGkmPlE)^GNdZJ#u(ShF>O_)sgb7F!;U}Gl5+O~Ux2sNMiSU)q z+m((m;UFfwMa2&siV17%B-%X%gyJ`%!2vet!DoE@vWex#SYSiD&MrOOT}+3#yqOh( zH2<2Hk2kX+2tDHGkC@rBF=?VLU~o;brwKL4`$w|L2Kf727l{Q${!DmFBCpcTFiXk5F2=>t&t>`T7g(&Cr%hJ+t2Yu{^r{M~hc! z=|O3VIEI-L#RN-$SU3MNnq41d0rQWv0{v~gEZdmPOJmr**T;*cJ~^+<9xpUp&JSF0 zZ>+(ziUr5sRRiM5UBq(Ch8VHAi9wf^UG58&q%i^hO$@VT#)xhKRn(T5#;k)7m!zI+ zW9@4t$cBP%9LowTii8@t&|K-|%rC8iicM0YgmEMtQBBvfL@H+xIq2b(`{7NIbb9D{AN7e0DOd(Z7`KB$#|sbX42 zV!9N!-_6g&u}sXU8+}z3R7|S>$#`b1bp;6r4elW!-&7FE4{1w554GB>fl7a&-QuGV z#jba!HxVz+AT|brItLEU?0}bF2mK3bOEN5}W9-(Dj0W|>bD$#=DTTt^TW9YIIR<4b zFko&GM$bjiHD)hfyl^q!8qWr19s(iN(cBe0H3pCbG0LqVW1O(~_?3883YPDeaB6K~ zxfqDKK0evP3Wr~YZEq{Kj8gkSZ7C>3rMK8J(3FP?N0uxzH;o+i?YZuDBV;bpM534E zFNn(*4^!jtSl9N#Kj3u3!fuMQfbC9W-RSHh7WjC20&~QriegWCvjG*ch%B612~15) z7o)uqw!STL0d;4pxCN%J6WCZwn&=JoU<5QQOHlaW5cejqlEQfSwSaJZM{HJze3eqJ z^>9YWwo!k@3lO9xCbCy#2M;8&foiEIWWSifXA>j=OPk-EKdJ3RZ?z$S&IgOX(QS2U!K`21v+4QBtVz;PrM z;y6hEM}RjZvzu$<;kn6XkHPY{RhMN$OJRcYNhz9};g_(@+N#$`mDQ`IQhVM!i#X>~ z@3K`_R{b85U4v}YA-4kZxUUhAja3)IWzGnf`IC>zyil#kYPCTwwV$7B=_%guxn^Fd zR;z4tfBX3}I;d^#8p)*>T7^QN_wj}ltTu~y%;&mmkH;pdGdH_?NbgH7=X+Ge`4)jo z$}Ea=RXUv|ca>Hj0x3&eF8=hQRJn`yOJzN;H;T^#EpDkXs@)<<^?jUj zyT$N^GimEGRMhV$d7n}U59|Tq4qmy{MNYXPUUY@dcPhIVJ2q%$mNb^k;=$kNwlr1( zF*$fjoR-E4^P`0u$7C}Ex)NGKJ)=*Rg6B69r$&)|L3XJ-L1GXJ;(t$LgKD2Y7io55 zxsu(DTzoH1WQPcaBG#t#WSsaY;HKp{fyBjyZd)C(ZsEixxJnm@iWAd=tFhK- zB1VWJ-%VJkG(kUtOj;b~OCzo=YE8MGrw!YKdn4^Iv?Z(a?0iN#i%v%`227C4ipjIt zqr|J;@CW`L8vI>PPqLw2TJwbj--p?#3m4BGgwJ& zmiWP&f=NQLvd9e4GeRtd{;*VUuxH^Le{;qO)=@Eb&ZzD$F2zRducy4QYWq zJV*HGH1Byah||}wlTP1waTvRg4B0k1fT0K$gd~-0c)AFJ6VxQDy~j}W9VJ<>B`t); zR=m9`cWJvMu``9+!dW3On`daK%W5uXXY#g%^BnSUTPDkQ#EYH2pV~^Yq;@$nbsLeI z;>CZUW+FwJe=tT>=GKi&cF8-+?A?V6hs%D9GsD^@sK9@k~Re!M85!kB9l#> zh@;R=-OKduo#&w`OhONxV@e|jFHM2Ejxl`6BdH_o25d7@J*8al507DZSZV@%SQZ#+ zapI_l-<`!u;47%wcW?FuXI=HKil4re4jPHf_7ELJHqcKV4)S-im^yg{lvQGYxYZn> z1M_Fi74)>xOdytEnhsg5Ls0EbyI+tjFzNAvR5v;-@^eKy0-u~hKNw?C-@~~0@{(*e zC@~g`^1L1&qsK#=@cwL;Zs-!^yXcu1er88t6OCxDIdIgyy^M_Z(-9jk$&KSbn^_It z1-LnfP0cij9|O;k-W$XV6qPjKsxepNNc!gf9A=#y2gw!{{SpT`D)$<(XCri%;)tkZ zj{?8mCiVs=HW_!6BGeSLH5qqC?I^)W-Qgh-1`<$$qmB9NvMy4Ci{@eD95tO8=45|ECW!f z8yM6W3XS#k)eEHXNb*a&s_1RLvw&se1Uv5M9~7{u+4>P{cRK4vlhFm6GhY~i>r2w~ zE=DuYFJzTDcad^ku?#vha}hyYK3jG*v_#!aYZAf^g=|FRa$V3-lFIm{LN^V%r5eK_$vu?FIu4?U`JO_@VgX&mso?*Kp z-T(n3cdKFhyV@8Z?GWXVDWSK)gx;%}f9p8O^ho!B)}TRr6Kn!iDoNm0#EqzOINp&!Btd9fW0V1{NW8yWB3ac^ROxSSo8BudAgfulm+z!&OtQEXDrqje_ThMsXrn!wu7f}LZ^AD4t~S7X zsA(`hX?!|YB)X$_4njB=7#reh?dGR*fU*riR3t(_hlU~)flx3sU(cL@NkSP+i2EkA zRF8}Iu4{VEZBqvzK1X~Jdd^*>UayBgLAbkmogRKSbhi%e_BfjQBSt|9pM?4$#1Q&t zXbDmWy{ldH*icvxwM5VKLTJ36>E9sW^xj52ViN`4Kk0F&5!bULF3ZbrE@p=?fA06! z*)!1Xgos^%azO?Xjq2$O#6jS%O3AkCmVO3@vkg2Zh8QmWNo zQ!tcLAxJ|7B-AdU_Xz*K11r#oH_8wvzQy5`gzP8uxA(9o*lr|o%yjtmqFtq6Y$1G9 zrHI9T%iAOgLUVD9kM>-OebkpTHdjwi4diU4mhY3hK>_2o)&Wg+U| zQgm>-ht}gA=tUZebkX1mS1Lu!1TY_YzhJ$B`pLw5NKsiQur%Y%uAPldx!2UtG}fyX)M~MlcL#n(yIOCo zOv1iX#3jf|)IcEbSGajdV^#%lL2WkjgeUZy;9A6Nqi`&!hDfC~vlEdfTv;eGHK=rj zZ%Blt&FP{mC>(v*or4{7KvPHI;fx1^9SGo5o81d)GF<|GP2Kgo)aSXWFB_m_h*x=e zUp5bcd->~q*#bF|=k#M4s#QGVag35$GhDq@X*%TLq_XB{D{Ie})wvm>1g16mv1Nwo zkXh{qBIY;AbCaw#!v~-Q{$xaZe8lB<`2e9i{tXS;f+XsMz6(fegUROADCB*+b zfMtUe^H!h~2F*(B+nh1tUxB`^CoUPXc7dW=f)UHrFN2f{bSsb#trNpNgY>uOL#ym# zK_s9QxP`y5l-W@JngCx>%B;Yrzx49PQdS~6d21=_CNJThQq~)fqJcoB^tUd2)<9;d zU4r3{vafMwIg={aI5R72MjPz)PT85)WOhF8Os_QCAzZ7IIqA}zs-KgGJY~7zX%TC8 zIUCzmS%Q*8v~U8swCrhAO=4Y;jL2FJm_!jMbYA`T7$!8D1PdMg*^t+0t@yrNGEEh& zL6hhil9~!!7j~P(2Y4&QTdvCl=Z9NS)M3QrAO>`T{20XYVCgM2xs4Tu788^tWW?MH zaU<9#s1RpO;&L#2^)ZP{eEDFOQ)?3Ef>M4QzzzhD{rX+80mXh7l$x1K&-}}Z+DqVO zyosmO+TSHmmF0l=G$=Lobfvo^B$HT#_mA*i0K=$jcRRBm+&78Kv(rU4T-}GTVW9oJI)s(W zoB2;eSi#L!aVStZE36R_7HR$kEG&?ypyhTzo2l^Q^Y_z~&YYvMY#5jd6n9hV}t+tVn2+O#*8)ma7dC@M)fkZMmGOx_YE$oXk5$mCZriE#wkC%XRtXZJL@Y9t(CZT z__xSKwpPkFc9rFwacBjt5E+)iT;s_4RXWkiX4J* z6HE_1wrqo3pX4$WC7h+W!VX9YkYWX^!d@(Q3l>2ruo> zxS9ESTU0Ok%$40~uIBcrc*B`U5n^$!{d(Apu-WyN9*#oTKstyePr^i^1W&!!Q9EQ4 zK66;M!BrdNTk#HiE_ipWuH3!4O_HcbIjDM>*d<=_@VE+=YoR!j45uXu*~4ajV+A-K znc{vAzqf*w8lLm=T@|dbyht(F3&59dWlWmxj^c4+MKz)D3T_GT#xfI3Y1)Q|1wW$a|wD}NG>RW#Wj^U z(}7>bqyPL{Dsb$VK*;XH0E4e3T#Z5QYoia2=;#;HYn7wGN=H41bySPe6YSLChai$i zy2w)N@Mgj+CGnI`dsVX#IwC&2<6uX^|;m`>PyO5d#hKjAFZ#m{Elq0 zZFno%5k1syblL6$jjsiji8i=;I;Eah;lY(0Tv=L*)=O4{njwg4xS)w{Dj6a-R0f(@ zhBz3K;977f;xffL_lx>6kAWB85~)OADv?9-y6Qd$S+cQmKmU0Q z8<05|7v>^N69<}n6jnYn#4V_!-0)!=ca3Gq*U_}81v*A&t(<2XtLCuwBIVHw1(LF< zFBHN_BobCi$qI$k09Yt8|su6Ltk~^K4F& zXb-8)wvK6`z>y?P2=|)4;E9pZSO;k2o%6vEo~8dY`fDp`CeS<>=saB6yiNu)1u=Z% zc-EuT*s&Z)^zDq>fp$XK>mW9}j?N4pck%YP!pik=HtEZoT(g~f+%a{0$qg*OHV-V( zceI>9dUNG{W$<-bdC&fKbG*{B|ChrHySFC0xVyJRJ}{+bo2zpDu8N4WH5D>kY61zv z37rc?Ko!cUvtY;eSIDG4K;8z(NF6c+iD${B&{hVVT&z+HQ4qta?ABMY*z;7U&P=yn zj!(2Vf+Y9ygu6HIc_T}M(5fp)82dp#{g(q}E=s!nMmC-79(s*D;>l`zB&budK{NhC zEDm5^9r(0A1B8kFkI4CE7<-DrFB##Q(L`SD9J6z76_X`RbOWXuhx<(in0XRxB+Yle z;ErjexusU_cQdK6uGD$NZIt$}tJF32c30QejwWgu4tUAiX2G1g2X=c)q$PQMRQVR> zsH|d+#wt32SNfq2g88&ypwZlP)`&U9^piORf{PJ!c;Y%(tLsN&dPB=JLyUl3I0KsU zBewjXFrHND5?!$f)OU<`otvoe(W3Ufpy4^2-2^gOm@(C9GQI>Cmwh31Su_aJtla|q zV;k^|*1+kDOkP(p6w5p`U_U;ZSDg;dj@n!TUQfCh=5sYs9(ex47H5DDsA#xYUS*fN zN}wl{0BhQe>nIc@JKi4a2Nv%bB*cJROh|sT*a7~R#Cw1%OhsbJdV#Lgh2Qh=e!$BY zPh#E6qQy@pBDfVZdfjGNgwJZ9g_dUStBb3;!*8_Zp`W>&V@rGk|34hDmiZYd68 z?t09(9{$$NU>rt?G!SHo|3=5gWL&UkL7&TJ?*`^N?$XV+>Y%m;w`yYf*uX9>)$hvG zhxV_dsGB)vQ*7ErEPZq@UX%@aNdnTip&jB1e>kq= z!&yQLQH8=~-q1{?-ilJ0ONxZ%w!A%4TmltlDp=iq?I+02Pi1}Ok$lrswlvoZlN3gg z4YtJemIY0$r@1w#&4ogdf^W`(+RPnn2pGfDLeWpjXsrBHmbf*fs?kp!UmX3Ep}{ON zKuM9T6o%%!4u!JvvLFKwo5N@!F`Eio3=Pse9N*S4b_JCw0&ehav*fCGorBSmG%)~2 z^^SH~GCXCjvba{lHdi9f6N>~xl0YXq*QYw+S1nV$CVD=Q*LNtY5>*z^ZTLq3H}{ z2{Agr2i?hL8p>fU?M{f1`L+3AJKo9qv!FK8!_708O-U2a@qRN{9-=Bde98-H~_~e`yBm)~f&r4Cb=F4azWpKtw7NmIz4@6^aGGAV$93tCBK3cp+MXz3hyiOD}p^8_3)}x#c0q~)s>O}60)?!eiB^o2z#WyOGb;^;YA+1WV30j4J|tj zW%WpetjP;lgiS*$d(B^cgHUuvV~)uMUltK|lt zwllzQo&^D3&}$!=1*%o5_;--+p2dm{Q-a(zi*-lLt{{(_&2Eg%hmD>vp)*me<<+xU zzwFc6GXM69$d%+FJcQDx62CNR)0!Bpy3$HOla5Bi$s@O7VZ^IZoi}fAjMdPF85R z0f&?m6v=@>e$0uLXA+BfyOVV@#0Pn1H7hJIiCcVd09h-y#Hw`=avTdv6d4B!OOmkm zDR?jCv#Z(Aez3RgQ&*`gB;fMqrdag`fR9FU2E>WzmIlS@_M7n@fp^wkflv(pw3=0C zn#8|AbB$G%Hg!EcL*KFXN+cij@+ouKRM60#^^*1b<=MoP+ZQmujRSuX31pgZo{znH zOWwMQG!)(+dG7NjKqS-B%6>7{n8XrqJl-PlX2RP7FL2IZ%m_KXYE?lEv;)_bW!LS7 zuyY+$)X`5HVbb8q@8IzkSFOpDtI8KIF0UHT`^;lW1Cqpc4}6=o5PCq1V4SD4gA<-4 zo`KP@;?{~TbTLj8UQbCAQMD-i0>5t_%cxC+*jH!Nra+v&iu!oMOs7Nv1(Q4*q!0JI zW%XEFC)~6z^xa<{)a^ zUhGKHK`S;4i!4FzwT{0(pIxU!iYeSTpDm1w5@*0vo1{;!XWe|+0!ULuiC6sHxAoL3 zv;|U&B#%p#=oti;9A$l-M#7be!t80#87vgO#~-sDB4}V;QS}o=BQWT}U_un=IW0k& zw26XYSis7*%8<+;>Bz5w)HT%Hp>Cs1X^s75_4EVXadQesCy2NGW%>|M<_dfw3P)+! zt_j5ql03gR^yP0bWXM(cNXCqV%+z`-E6w7l)N6x$JMY$dz*2aqWc)h|IpQ8 z7HrBywa^)vAkOKdL!q~WHk zAF3Ao_#z<2M$mV6Rh|Y3$7aWseN~w4MPqB-T55kwEB66`&F}3}^|wKIQ}S&t;?BLL z^}}0Kex55!e=EjYbbh8QU4JXUTi^U7SE~M&i?@CtT_@>pX?Qc{N4OHUmNFD$;SVlm zRkgopa{^_Tm4p&7UCw)HZ5vw($64(*9C?xAX_#%NCx;v#L~D0U#2!}*{IkUVi#9G$ zgwrk(-1!pwRn6?32>fAYaEu<;B}65eT9QywH@&2#Ksys$Qdh{&;$7MtDQ?H9G_eo` zJQ;`@w=KK74mJ~DKp73BiW(^{z#s`dALI|;!v=SW6KDO6Z|`!F-b=a}?U@r41of%=Qk&`u4(nf(-?|87S7@AX19ASM|59;x>rO)BB5oco>3_y3)OP zG6cn+a2H#~qKc8?ZV0Q>^Pj*g6yO-;Ic4;U>V>phB^zNtW7G9gu`IKM5A;>1JUF<#&Wyd|g~Fr_`Q)4eAhVa1hHi8W(TZa;ZJxTFM(Z z{RsBgn4LjMC;!6F8<&@{o(X1A=Tq-C$kcs#bE9xl4`0UKH?)R0Th8*8|2`MXdn{+y z-4-Wud}?(Ob`A+bduA!p6&_=w&Y3VkTryJJ8yIZ2S;<(AM@tAM>JVP-pMKt&llkKtCFqp{0ET(cRc)|*{T!|8^ z_@gVJ-~`iWLH^DPs9*TBBOdNw!KN`uTn+JQ_p!Y_;=~b;5%Vvk5qj1G#5+3Be}S)q zxpu_QixfBdfe7GP%!l63298J+@leRgI2RUyPZT%dJm?7%OSD>3Arou_*`lkMfw@F` z*9BOFGU^+)*GF5lg0O`*-_NoZSg<#bhMhN$_FiZ>9E;PEP6Ka@*_UR|bPd^NYEPDF zReltZ^RKht1axE~w$@{A#g+uuNt7}YfVse0Vw?TIo@Ji;qaX}QjD&&ZQ<<0`PP-JAU#sd3x3}=L_b?5 zqH*{7>A%U%|Gkn8xz!?Ce2qV_D7j!HCYS?ty$*G?wNlt39`{!Q*F;KuuKg3v;5HqSowrV=*?VdE0{lj77l8u zpjV&%bMOS(4`pKN@kl5!5Y-?BX3Tr&F$oZ(133xy`4YtI_^=V2!Om0c6P{DciWJC8 z@G-UQXl*1|XGFEIz{qLXtfZ{(0rBFq0F^;FMBh-U-T@S@fYOp$={^ungH)$4y*U9p zQzRq`BdnXckksZQ`qv1$2UIR1P@}_e z|0V^vIe%akD=teBferTsx3O`;_nBplb<)8Zpdpg|e};1=%WZ}s zuKhncqKV=$iZ5KlrpG6USpmgnh6W5ZF_NEM176R2L7LUnXD4yjA<9l&9l3AlENOg4 zNyqh)z6VU$bX0iMOm_d=zA$v)ZleFLrat(8yh$oZa`i%JqPxJt+7qN^E#K>CJ_ON% zOxb2H9GB&680}g`n8SkF>;eEjSkZPi3>fKs$;M8F!wQTozobUmp)QBFhUhIOm!)-PYRNU|E+ zGxU^K2hkv(9I=H882#CBR@hjua53(-&!h^U-#EZqjFz=5MJ5QfS6LrNO zLShrdI2iw|IRGLZZ(qx1BqWHlxDMtwEBfWoEDrFhhuEVaC@kge4?zaPET-|U>)5Kn z@!+(shI|f{=|DMu##Ih<%Z7$#-GFRMg*_Pz+ei@sIdk_$saM3A3VWI! z*&fSlH?X4Ic(IyJ2YsOq1Zm2N>##M4VIRO;bMs>x*aJG|IQn7M)9`bM-}^AGRp&$e z>4(|%=n_~)e3*^OGKmkprIn@5^ro?m5xR|uG1!=ur-Ry6-tQ4sU11U%yozfQBD;zM zK!XPBJGb;S6Zs+HHyK+BAicj|yAcu&`He5P6*TT>!?LqT-=CgDd2q4&_ah7nsp6}B zgCAv^WM&2{fww%yhM^W;^Ms8UA(Gx6v5|F4vOs{)Y%{jX*eAj}%Q3!kBfAZXPjDOh z`9{{)0LiDAday*yq8rHZhMgqqWEOe2XH&=`o`GWYUl-9<@-qg*&;Sxp4Y8P5dyJ$! zgS{(MSUIPX6oC|2IwH8g0D)n;7~i9HMxu$7o9sytJ+namiP>MODsX0CHN=3T_zBK7 z3e9vT!AA~ns%L4qlVkWkM2&{zi3=eRZeb750!eQZFuEAHONfG$K%_4FEp4uxFSWELshq|E(4mUoEK#6x=H zxl8izVw{LE{4Qn&VwB&-+zPLmtd^K^R4MK!FbM!YLW?Ds0$b3|`H z2?WF7oU5}kwvNh>SP6>7W=R6{@pKzgKWz)O4S>n{I*ClqE8D-*?(>@U{J(`v2jro) zo{m}qWIEs(c-sA6KnB29+Pdlm8f*hwf7GVBo%T!GfnXQnkJ}2){joQG2>h`(zCz6J zd*chl=)F;UtrJ@UOkD=M*T3)DqaZ;oXgm0$q_^)~y!{DF{$@DR@jqdJY#GsQXr@XS z+3@LLhWbROqJa^H+_Iu+UT#IsngbbnGnPTp^Gj`1z}CF)$685G{%fEMKrMRskwAtk zzM})IpYcn!Cno&#bNd8Sb;!qXhqjvsLOGrLY2C{4sHwHTOJctMSZ=5_tHb%Q2xFZqOV0JkIh8ES>N+^_@R#tTPNpgI@vbl5!Lc zf4L677VzJ-5hcbVKGvZrY!*xS;ms^5D_$%Fz{hQ*31JcY0T2yCfdnv}|FjvB@dq^t zBD(`xwp>#6@CaA*_xMMk60dbzh;O49Rm zN1hFBSz8HuxF-*cjQ!eR4_Pfb5|Fna)IRo>G;O(L)?t$Yy9Bg@j={_lF^HItVR2wM zI){c#WWs&X-X~cvXfj@p?lQH;US<{H4m%1#P6dMy`^%~YH3!P{f#?Ap)HB-4V9Ea6 zHe8Rf>M`38^L^V;Jto6b*Bshu&Xd$L+Reev*|gthwuT_Ci<1&Mxu@H%*I^Y;<=grY z#0jm#U@CRmvwRU}Nwx8UgI%@1&9yuBm%5p9-Wjd%T6r6MP_1H6{?Yd?Dt8si-PYDs zFSpfQ-%KqDpGQ-nJ8TANLItw(Xa5-uW3~N^W&<;CLtCZ}-|VJ#)u0ut+A{Q*U2cgh z4Q%N!3)E7e)2-_!5yjOH4pB5{gJuZ-+w4DSv7yLD_zeje^*AH3fBRs&i6R++HZR}X z00SKsu!qCjO9@K&`kEe-8S`tPzA^m=noF@)A&-d}Ne4|Kz8PK*l!J^F&|K`L!=3=_ z1(HCWDMLG~S^K~z)fedt)$ukF(JUZp(0rz_NxTwzhu`!ROF(bFgp9}9aJ4{BNKb#M zo$=BR7Ty`3@^-}slJpNe?#*!}cI**JtzW^wUpU8CXl!@~ptGXR8{Wt$yaM-J+Q=xp z1Yddl4;ui^asKsF7*gCbpy`#_8i!R`hT07UnT=W!54usacDpaGKCXd;aqBRXr$v+c zy`6f7NO+JI*mCJMJ#Gl%uCy6Yf<-)t@+_^fSBDtr-6WFr66wyAuk@;V3qxJSlwkmLW;$H*socQg{n(SX?ufQd^S@ZjNehq#)`*J1TL*q5Y~R+JVyUK?#s4+i1`s-}caKqOhqJfE}mRTx#Sj9ef(V+pt|x zu`lYt6gEMLrUP~b!QQUJ+5y{&or_>M>aY|xK~SIrb_2oQsKb^3_U*O^9d@}6TT3q{ zk=qG8m4HX+z?lGku`S%TyE@ut)S(F(B)EY(oDp!F+Di2SX=omS>oxhCkv4y+Wp{Kv z^}x^W+mNHDp5u~xlB+m8LHW1OviOXi7zCQh1bD_h41lU0KFwpFV;NazwNbw*>5w}g z07*K)Tf7_qwP#@~_16;q?v4V0Q3q%QU4mvdmHaeF@CAPuMv^@UA8lvc%(mp(HZd1W z+(BDy_IB<6-N408dCR6*8m;j$e#kvx8cHX`5!@Mx_de5{wMY}x6N_r ze`3eGyE>#5e=MOK8sDV{i1xTo+r)=I&oXZ9<<0?3iXv(Qm9Po3%YCo($86c|XtX*7 z*WP%zr6mu|TP`K)Z}I4Z58G~7I)6zuoSVzZDgfLjOPm)S(nsD zgU)6!-|N#{<*;!kTW$7lwKYM$t&v?H9|uVQrei!*g*M*S$a+AjhxF0ZF=MhR@+pLK z#;n)Fk0YEp=7b)8G?)ZBP1+cOc?fib6g{*Wp=3R@5~2T(t}lU)qR9U5p6SX=?gRn^ zaxl4IfB@k%B1Z@?WIzNIR?t-vAUNR+m&9u)5fE5)jc0LqB&Y}|M}iolBA|G$YvQqs zAUa-zL!iUelbOlP|NE+ELfGH_;RDnCx~jUau6p&3@9QA0%KXf7>Xh8i-1rhqp@2YI zDyLJfg?Ked*yws5^aS6X5*xD<|A+Wf5=WG;!N2wR_k;+6Y-0tL?G6GYTYLa4cHF^) z19E0)HpZ$S_!XFuOSg=8Z%<+1F8X~y{w*Cw^Q7t6)tw4;S%qCkj>O6k&) zFz`~wztiVQ^mxz_z$*BMDxI@`Eu49X>4;UQwz1(R^;#RJE4dOf(@eH}Y_!dY*0EI? z+VA;5iEUWHF|8y3ONJ}1!rTdQW8{>f0KYDUzP_Uhv|@xsdK8lDj_ND~=y_GK!1$!Q zPubC+6XX%ofD;%)NNzZJOzY-NaV0}D+07NBFQW))|A#io_lNeIC(acv zXmHwS{6QPy|3N$78s<_2&0v)q|I`*hz)0ec&@9zY>4r?Hhn$v+L7W(@GSIqJwI#TV z+-2b3zNVza)L{tIZPRhsKc+$V+~y3BpypJQ?^e zQoY>63byUPU-vLd2}3CvqLh_B<_Z&Q1eLScXRtif6q*;7#;vu9DD4jozS(!9xK970 zxaq-4#fsu?YgefP6gC}8Yq)qa+DDrXy<|A(c6=kD4lXa}w{24rV*yHpqXivPscXCO zmD`k_S#>bcNw?i0IuvN%sKgYk5Z6z^RG^0+*`_2x{dkW5yiG~L#R(qRrgWbZqkiGl zyKInn^GDEx(w9n^4gxrhy6k0iS#Qy0AGT2OJ^xSf+ffE}Sh~np?QP#-n|Z|>N+;(Z zn#oI<6aG);M}rm6yXT>H6<7(5eg?Y7EQ($14Rucm=(jdq?;Om$;2(V^;)D~NiLVCP z?p%icDsb~JUQ>Et2HM@B892wsZ`-bP&W}-hdfUywd;WV$BzmvU!1(_$1I@re*$z%0 z=NM1>DX4-m4)y0*&wo$Bi|*hQyn#8OzW)xTT%UqpdD{2rC!YU31qXRTQ}F*3w<}mF zy^puGt5g*VyFLXsc|v{s9O(Zw1z+9)W1=KPPnGJSxQ4gcWHl}?SzQUaT(bJRzd<_& zqlFN4et@2)sEIgxWkdMU0msr9wa}B~!kKLX$(!hY27D4Df-8_2oOt_Z6VPZW^Of_8 zNI3>vd+EVx&UVLF_^w+hxIzfzijE|qQ&yOo6*^@Jj7C^_IH}jP34UYGIZ)@s-i4n52F$P83r` zc}Lon{T|AmL}feGwJipmu_gw4t_xP7@nRLq5VD+nk@dB9Szkuhk)m1-Dg7RsMz|LXG}Zq}3a}kT>qasojCcr<<_uyUV5A_j+JgkgV}1 z715?+kUm{+_Z{v*ZFQXF?(5RiB*Tb@(&+6T?M`b;bBjBvt=;jBdg?zA6@gOgd}MET zgtIMqX1ivmqEaunwfg#I*?zF^Zr5(9p-mPu0&-y}xeHeosNoQ3W z>}d6Oetx$Y?7X%{N2^~4LXD0_kj}nPQR{=fqOH-8>jXlLj#lde?HjG9{zIz>3W@18 z+XA7Xj)v8fegY->X4Ln^CW(#+`k&BXyTuHbEK;S6*&2g2(q*#xkWYpp2Nv2_rBSs0^%AX~h15;$#^0$=0O9Jj`Iz>eFEjz7)d?`~&?hN* zxc399A#7+jC#e_3qDB)S8nHt|6F(X%>Gl&JE{V02;}6X%`i`am9LC%AMmOpWC%$=l zkf3)*s59F5rMUf5tM7nnHClbTh2(Kl#P#>yjZouHO`U|h7_}0*_KDRN+dJBLUm^~O z6JX~@!I=ugZ$Z^@02h#IakNN1);pnklqki45}knoIMJi{bzYc7qsUx6k>4gV+mPAg zrp%-m#?s`qSLcZI6GU~u1|Tn>PDI{bdKy1LKpR|RkoQNC7sq+zHG9War-}60B5x{P z->OawX6~jZ@)O{%!8H<@KMLc@6PhNEgkvT?Wrr`0>YTsa9NHHl5|GGx$lokWs zBk}ZiOq-ND>yB}^+ehCjQB--lzZD&PfU{a?K!}T z((hN0%n~?_0TzA24a4U?7{Y0yHMKnuffcbMYf=+@MKN0@o$YhmV-+r!Mg zc9W+OS@so{SnJ8`QBo(t(6IDiA&iGFLB%WeWr)B`^wFSSayH3ONtEI<3_0IGjOivH zXwqP!X8>42alxEGkfPXe2p@vq6hsCjfES_+0+1U4^?mG4fZkHVI^C~^a;T6>leqw0 zzYnQW7J_#fp%G10yTM4T87m-F*r~r7<~}e7dOx810l_20)~SY!*#8PYAhKG}CO-y8 zTJpbafb3DJG;MrGn-8A_@=KV}umfHPrcLI*_P5^NxXNxq1PBA*vEu#Vz4c<$Tg+4@mq5x)j^Itl*1@R|_Bkc%0lg@oCnVL(Drsf=j&0)65 z4y$eNcvGc<;IV`8d~NZWuGQMzsvPIlKfP1MQ97!=qQf8zp!IeaK zS#d@{v0Z45!-A#vgOYs-{qSD1lZqWBiq$(sY1Au{f{G}lcsEZ)3s0Ug4U~Y+6fVpQ z#&Sq>UXC_T!3TUR{uSWgD17W>Ni2b`e*rO776b`MbNDnT^m5PFM7Q0q!u|A`D7rU^ z1WQ`D{~cxQyg?0Q+ZEd&!S^K0_LmyTvbW+f_X)}B$N?JW-a@ORwD8ny=}>Wz)lpUC za1_p#;QnWo>T0kmJWL9J^))fov*%Zp#6d|KX1lFsK+4vV_1&sV?$vB1pNB$-50E%W2*;Ve~dbivAVJ|sOYd64lO z_wXL|!0{PuC)%!-fww8HV{QdLixKdyt#3BP+Tl;#4*ercS^TdcM>Al1_eeE{a zUrko9apWu|Kh^psM{;@6j&oo@YYmm@)sAGt<~Y?4i-=M6$-z4fcVJd45&OJbd97So z7gMt*KjDW7wnXuw)BI$;lGN{9>jn{rjcV5HUX5By8=w|k!j8Y!%wi2cE>RV!3&+^CKRkEE+2)RnE771=^Y+kaZ6u;rLz0*<^&}Ly}z1VasdO24hj&4QZJ;okZwblRI1xNHpyi@8Qp@PiUiLXA zmALE4yo1)DXy~lUQgUjn^DX$-kydAmbv6msdbIScCyPT#jd6#$Oh7G76!!rw4jTZa z=!CT2H1Xv3mBifNePmN`wTav~Xg!zIQG_rf>_B0agX_ZiQ|b%h-tjdo;b~1K7hzyK zFMMC=(b+Yh@LD7ckI^-$PNd~vW;_tPy#lZV@JvQ{Jy;T zeWiQq=^HZU+IAr0c(~Eri_Jwgzi=1_Aj%b2p9kw~_iD#42Wh>*o!0amCOWe|^3Bhu zCDqtz@FtIBaY$vK*~1;-We7IR2Na4GhBsQ_R%G8>&$B;JQn~p9B_=%f7s~ybJ)CEKpkxhB zMdn0wBW3LAGKyczLzWd%+SUzZTUIfRl2-<+s2~R5PcHs4N=v0@ZLe(i#*bV#zH!vf zV11Vc>pQlwefz357_2uzUkZ0ZOth*BMX!RRu&_|{`cOXW(Eq2`hhruDcU!ObjCMui z)zlMaSNk{Ujl098m)BR6XQe?YtodJK*@}sSY0+ced%^L{ws(`_6XlHgSS86TJT%l* z8&F7`d2Ce$DZ{HOs0)!1TTc~5PwzMC$}_uZ#1(6w27Lzg{Qu9Ot!>5942sFK{S`9* zT&%Ri@sH;oQ7l~#;G?>NO&zd->ONplg(0d0AQ+osaQ#RWUxTU-VOiEfp_PYxUx8+O62iqL~$Wy|i z-p-d!4u+G-9e{=*h>KL1Z(==3cGM#!;tB6}&z8(q`GgGAMnKS=Ygl^Z@?@nf89ou& zzyH{!emlxGjK_fC0(i_{p+ige_p_v^iy@DaQJqwv`%XzW*~vnz5-R-wXvqY%0E1AX zbp#6qYxloLnFqYeKlwy?(0EDfP&ejNWu5H&5PTgmQvo2q{N47~f(EyF?-smAGCdZP z&`&zP&E?pjSfy{ax*QIrETP7n{WpA3FSveo7d#!_oDh!V2z<>5@7}=+9-2{aUMsFbIfx4Bo8tTj{$KX4!Og%Bxe> z`EJ8&JHS?dge@E@KYC#vauMwyf*p)fVZYB+zr^taS`9#)0;wdoNN2gW zyA4vnl8d;WWfgK-Aj4pL^0ZNrTwyTIrZzniFjn$gzfiIlc7T|>9B6tS)Lh@g;&(9I z)mAl?0rUxdJKlr{OHae4Br{D$6K8|vj;=>Ptox5!saoh*1K0R9!1KT-3HPiA9P=Fp zG(9LucX@|p>_&rhq?2g zN~e*j>ZMll6`|>I9zHKD-hv(BT7w;~5vfp~$KeBM)_!g2gNV419j10CWBX1m*vU32 z>Qz7g=AX*DfI@omD}(?Ehl?kF=PM;AH5^(c3zoUO8yo;x|D;tJTU9HaOBn0eAYq!@|RPWciweWhM+<>#olXIQpKLK~hoMqo0cem7XArmu(R+Ced+7H*ce(9TjN~}W zfkMM}01vjMNc8aczg7~3HR^x9R+e@c=Q&HN8yMk(m%T4c{l(AkYEXJ7eCzpVla#S6 zf6h6RkpiWLBS_{u_@kd0 z9Q#V!K!7Qa86)P?vT2XA1d$GqItX--h73+*X#cV}WHM|uBAZv6-oiil2H^JhqMC%@ zAEg>Sq@9gcr+YTmCvHu`nK=@;9CG^8fW?f2Q4EPXDBazDTB%?2NtvDD7D0Iw#FU25 z+E$u=@vvPC<=NVnXS8qtB(6<`@(~jKU^kTTncpg1tqSaZp}Z+@6p{t+{uY|IQR)%M zqA6hrhylRAo4-|h7bvO|*1l3k{8kd|Gu40rBIk){%+H=;WB(J#GLhn`0Y_Yso)$#pDg-l_0|r_W9k&W$Vrr=x;qQkD z)DtE~$49QlVm^7b`C=oY%9Sh@b4GZRm~7b)4?xaCN67SEc6%z_&Bex7>af=Ls3sJD zO$68=Jz|tPuC?b@a@SJS-hMgD#>LtkSSVWm2p-M&eKi7@JtN1CH`vUXGFwzv)mU z;xoqKsL7;1abUA-NXYH(Dfeu2nK!s2t}i+MsMS<79|EY*Pe;F!J#TNKK3zb>Rm2r74w}jsY%! z4B>R0ir#>Oj(?u3$bo!g2f-J1G%b>51@GzF8d({+F$X9$@Eb#Tjd&n!I;VnXipL7N zqR3j1Q-p7LQ@lE?HDY7cIWuY*Q31DRB1!Zy@rraeMGkn(y#qaD+LSP0eQhk(nH^vVB+CwWg!E7e@f$IlH#)~t zJ-%%_PG85;OIeR3__$CtFjBPS~F8lz1ITUMK>9Ce57!*r) z)7Op!}+6hL*6)cB4iA4D_{}nhxn{Vn9~6?=@Pd&ehJ!Z+ zk`iW#EIDcl9W!bQ3i3*dfab;;#@P#i!xBIQR)RvJ21PXFf#q|;ctXkqvWXMow-E)3 zLvm$0-p`jB(aqV%;KD5(LTt8@o00WVsFEOLf+U2vM5U1`Ivf?<(3FXhj8})^dUez3 z^^>oST58VA#R*(>nlEMmcTty-oLgw9S_RZ z=!P(BSVKH4_bJLoDv*LQfH#!`*7sKrVN{X0prgC1t3$9gH~Y)#AwLc>uHg-Ujc%sm zMz*djq{Y^+U4rXqJX}YqA(%aoqfx-`^%dr#f+FcqHdt_C?Vgw<@l_|3iK!$Z%59je zCWI&8%Z^tsfHB2JB9Xh#LI+R$QL#du-ZxNKj-v%)$4ToUNe@(&L!b@Ee8hh)?_M7V zL7b~lcID!K97k|OTj;QqNR_8;>JtSu)(y>1U_egh3+{)2G)A{^3ivH+=6pjn|&@W0p&pUQ6Y(hr=D9{Oa#jCabY>)wv3M zF$f5rMhruO7VAbM^la zg}){WpHc7H5Tm{v2q4fWzorU@r`tB&ZZ0wMBq4lHtJ%d7)#RBLUuOX4z_cTTAj(JstzRDF+7Obh)FV&|#>IArYA*S1wUI z%6T;6aGa+0Hz2|-l|Tb~zA*tqvxdT7^^Aaq&*V@rNL85Z2G=OZRH?rk^PK=OB-PSF znZNg#?BVOp-56<5Hj=3;1&E+0_rsv+T9XeW<;K6b{RW!_N8&Ws)4|X0SPicDM3<6= z<$aM0)|@eT_4=A9{9hSNGo>axcz5`6IX-8GyF3R8mVRh5;QHT~3z(RhmEsM|5~r@f z&QDAcm?hlx#2pFGAKhDyRS2qNDB9>8@-7xP3Qn^bB7(N*;Dku;U95pIa2jbhZz3Od z&^G^?TiGjboH3T5_ms*ZF2v+1tXf~Qetmw@@uPr9U0YMN{tWJnCtQLmopiYR7oJ{U z4O%!vkEDAJJ-OTUnOiCC?9%f~jd$Rxd3`Zv#qrx*eQQpO0tl5ts{A*K9wH=qpP=VS z+#k_6q9#b(x8g7gDKhIIVp0)<5GJ*g6tJ1|ORWetW z?K>1sMXF*ElQt&S$QIp!jqr5|sxBAv1b{qZh>aLxx?kX-1^%oUT4JhzmxZCA_)^Rc zXij|AU<(QXAcZ(ov%p-@@au;eqPz(9X>KNv9qBWh?cR$HBl6QA>n9vbngtX19k-E> z`U3_?Z)=qhVw`KDQi$(YAcc^66k^URM4-UWPZ zym~JfH?`|yI1k4oibSy^Mx2Lt+K_9?6wq!9KBwzzP-sYfFErXQ#RJ-gfI{n6d6EH5 z&w;>@!bH%F=7XD*h27S|6L$RA$>R)=?8>p9{+LT5#iwwxp2Xj6QmixP22fb``NmKe zkkbtO0uk_KZ1U)4iP5o$0OYDYA;;keMD-$kGdQ>e;gPd!j*_?8wD$UdOS;2- zw&}j)am|vE@QfmSIxZRStYB78Np`s^UazT86y!1=AUqq=>`DC`G!ea`Pa ztK{{#qFq3EDCrO#lCEh1#BCzK`n&wn3xV_uao%HhF=ivcLex!5GL$7**KYJdb)N1&_^U6g*-g7}2)McMGzBQyennBa&l>!tR z&s#1i<0oI%CLsKAR;ate+#JRBjsluqPd=7<{dRDxd{3s<9pm z&cl}3Q7%haqL9iP)MFj z6E^laj;#v|7Z}t}!TwCIp{bLio`-^kIzWNDr=n&6j-zmatX>djo~-4T#l=O-EEKv# z7Xr~cH0^$O+WfFrA)?8*F1W1S;pK(R%FuB$v8U5VK=r@FORoR=g7X`koD=YYk$8mg zD`vnloPtC|s_RBCR-FAKAmBw<7K}-R zy4#KJ#W^w(3@NEBau3p>n(jA<@4>BI1egk?%o4AnCu3Vkts$d&BvlEAmMK)mOuwZ@ zFB$M$E#fKzSs!-86kfb;daIr^LLKA}B^=knU%sTIPrXeXS33z{exo`bF?gs4C|GBm z2Zw7MYU#QLT4QpawWCtf3mst1&Y)|i9&xXxYQBvaD2*)N#{RZRxI*&JaAbV)Z<;q$SjV#tqF}ZQ^QHYZuw)$le z(if1pmzC70^R1S`{^Dt=n;*lwqP_t|fBAGbkGZDw9#{v;Fp*{$O2D^T`qQalmLE?^ zhX$hBX}}@>#s|ppxNlFB=EQ;eX< zsTg`fcX|iX7MjO&{WOeq2ns1ewX{8-?B~PWN@~xu;D@_Z$z`-GPlc@JZ~&8?DC z2i!`hzMa)m0)vfgKWhYTY7PYcd*PL-Hjcn{nv7^@)|wKm{nxa)d~}P_soMpuRcJad zXp1~1VByB?AN^-s8xulHgT1w5qm;~=bwsW)K9kRV*7*1pYuYXN%DVZ<*EgSN~n!QoL_ zE_oZ?zTr_?+(0y%M7Jrv<$=f+80 zfMJ~{gsmM44r@zW7bPowFMZpwAVz(sb#PjTf?DmWKg~jcpeH-8u|K=9jspokfh769pNTqT^9s%u2l9E%1f09ATslvHx4QO%DIuVL6fzV+w%_5h# z1iZE+5Vy~`gDNoGZ`gtO)7nP=Fl0f@^x9gci=ngrDi?hNNDNgw#~q}3ZBU=3<$54p16NWA_?W_R@Z}x+ zu&e;=hMOFLl*ehSq-dJ-^f9ajS0K*+tqa|`aCaX4BW;g1&snl?Vey<5QYNlJ!Jo=J zU7BhIPdEcDqMDue+END!ocjw}u4q~0agv$>G7NEtXd{k*)g5C0I`L9!WVkvB4+@h< z=hLIE-ooT&om<3R2P`Y6Wvw&CCrB&%|g6ej4tK$I(kUd@3L9VbZj0i%m#^Wli_tGFV?)gC@Q zpo}*E33s8mgOg73mjg<-p+5k#kLqNABbPoIs@=H{lO78|4Z?v< z|NIO#c=;r8@K&#YK*!F>_1!jSwFyD(agCgj; zf#)08tpnjz0gfR8;$P{7aOfN{2@mCqB`=^YN6bFoI!T%hWyc8X!X-s>dr3!1`E4@m zE&s+JkXf3X&$q}7?wQa(P$edVH8P+YbX|=8YC)^1Ek=N)lI|iFXG~I~)c-=k6-$ds zmMxbaZfk2yu&q16nNYt)sH?Dyg+m$jSgN@|N{h5jNW~fxM_Wp`Is~S6`WR?VZAakY zgVjZ%?Eq_{IU5U=YeqF)z2lZM2MTB$x|`+KXZYPXoDgpokHN}8_baXPPWtv}|J#A0 z`_^|xZUYdP3EWT4W+zi7QtFf{x0cb`Z6Xb!yx9$y`6X&MeFL58nVbB6{ud`Zii8PB z7~9JKX<%dJjXd7SdPbFCEcA&S(aOgfnI(l3H`JIVVsh!QMf5S#^!S-q7+F%xVZW3? zf%0f}K@XuqViH9Onzx%-_m1V%^yfpQrE)=Mn z(l+y(6n38h4w+R7%MG`qP7-=kZ~MLZn$~{9IK8ttZ9x`+81fQ&`M85{R>N|l+jI$PLx_I zV8-bQ5YpNfpCMj;A&ey>!0OEb9%Ev_vw^anZ#A(ABjeRAKG=F{QxVBuDBcJ)hABzF z7~@sZ>@~xr+qf-;r5bCrhxmOl?7oCcuuKtqhB&5?&;=UxUt`!pBk`NQW5mPVytyOWqFmC3werdYb{m|6_j~GoO~Ay*Wt@j+cV-`kyR`>e zer=E%`{HhSE z+|H`PWEX9ye*)&Fs<1P5y(o2Efaj&MhmBXX znfy>H8{O@iHV%+;G$ro!0E!axktWC$ExUzx>&_O+f8*=Avq?z>zSkX55K_}$Ow%D@ zU=nDN^l20L#qMkuV)^{Lg;!bFaOIqq?&B^C`w3SyUjAVk%f`?y=gn!XFQ!txho`5r zx#&70-;mByaB-RMNM}9KhxhPr)7edkKpGk7%_}Ud%kT_9#S$ystbNr|P#@MDEgb>x z*c%jztDtHZ0M{59tQXZSlwQ@+1AKM{8#t&LjILA@i!@4eSL7z}S%Uo==4P;+$$>I+ zVn7ll=o7U7C#O#{FeKNs_js2~)*lyJxjmEJ4UH>sySHaDHTs&?0(jJ1KyY8yPVv{X z*d0jqIrnCChEWz6O^=jw2`3FR|_y}@fKVeVZ6+% z`mki@zXh-t6-3{Y2`C}@VcUe555!_ncuk^z1h6LBAf`%mx5gJrRo7~@(E*-Ds&jC_ z!_=c*Kw0BBTY69zL7CK7h3E-^v}qd?yi=Ikt7UQrA+Z89Ggu z^dfO~qZH5ia&1*jBbKk2Te4V^p5s&dv7TKj(9~tcMc_do{1*mlGzDhxr~0uB=L*1} zljRl-iWMbH13yAbG*f>LkO(sjK300HaC$mK1aGCQu5flHY&{b|JY~yIn4M%A|rG+Y@&)}_uh{Qlj2-dg;F=UzFz(U*#b52u`pR{@u|F$GiUD-C z2_}XVXE#!P0N1n{raAU#DSUbk88ygoPNw5YD*#5LK+(VxJ$tnX+<<4cCBLjCk4jBd$+e# zfgy;*aE7VxQBK2DxKo7z#sp5;nN)wu@d6(;kPUKPMEutW8^=|Xz9-$cQuyMTV5B8k zZ*GvSy&8-NTBcZY8@r1qVQQ_1aBlUNmSR*0=XMlwhan<1Ht^t+BdsBv+ndF+b*4I))rRd|)YL5FQcLvnT-37H%E4|^IyXu@NaweX$O!Y-y8Z0K~i;j5O zEm@B=Qj+7>lc5u+6gms zkM=M&zudABIL5t|&yJlkEXcuUFlWw`T^zTWqV7n zC7)024Qp)6*wINjw%yuQIKW0=W5agE_vEsywB6c|fgWQ!A}%EKU=7>PnUuHkr600! zFr-CdxAqmkn#&gGdas+o>+ja~U~6IZyIeby==cq06N<*0*|50XkmHgBn6TNS03Oe+ z!&oMw$=>GYQ--niiKnzn079Q2kgpA{jxM9Ciz|xGH|j9fEiOvE*cu6c-0tYGDD_M$ z?{*6th%((cDeFoDie1b9dJD@Gm05iYv&$#>SGQoxn#s@H!bbNyrP*;@Pe$ll9ZkOT z)`4k8fMSjWwNtfm`);6K8h4ogI-`EK=JE0w!`Y8u_WtSSxg${MZlDm&8o_?X#bbQ* zNNkC_wfTI(NY={`-O67W$9pE8#8O7 z>-yxgSh>?aZIxHv;d1OlSS(`gNMt^cPaeZYL_oC|aM(W88d35Xobx`_)&%N~j$u#8 z%0)Ps@oD3j1y^v=DjUb1G429y8f{}4xOl2=kd3_*ul%8X;jjDdPBuZt<(sWMeJ1-% zIi;<2*Ik&&28Y82{>i$mIqX}5@iMfb-eOh(L+8`}y7GDKfFi1W%K~<%a#S1P=PxW^ zsgTw0Uw}kMwI)dV7lJT?&s>Q1yr~t`9a+f6$=%=7e)niid1*!6R^od!oFJptix3Uw zV5+>Seaf>Ivn=Izt&^AEwwO&o#^HR+V)l^orbffLgxNqk%I7R$Me%D835Uc%O0!ia zU1lBsehGU;zK^dgWh>=w{9Gw|8HxCyrEG&diyvIdol0F zgRNZYLGpl&+fUXaIW;t6M7}Err0^e#QykV%7*(O103JJU2 z05_cV)8Y<>^3j)Hj(X;yo+DcMCo5Q{0rKKMSD>DWtvqfee!~zAcO}d0^pQ3Jx`{)G zdGyQp^?T(s^G2hJO0Q(y!(HnP;`Vz)6+lx^`ITtHUj8%vyu{i4EUU}k1@5M4XBbj? zVIq!mw@b2Y8C7k#qr03kb{g&oY)6 zeUqRW1no!Oy^M8<&JrZTv-4_S@TIF*mw_DxNfD$2?vU&Lx>|bgrvk3d2z42`_Y+#3 z7a&di-UnE!^CN8vIR2feMf2n}XsCjQ{vwbU3A;=|?U!PSG@=wHtUnDRMME$J-FdY_ zOdER7dBE*a{v$!`MS3=`tuBv=x|{&a9;MkM(kM<*z_hkRdWAm+zbKhAU4><72p=n3 zU?17yDyt4%dtXa-l=TYTc}|z@5ZB~wxGP!WcflOJz-HL;q4rwRkn`rc@Xul(QW}W zmYfZbM%1lF8w`2sPfe;gWmn*otvCF~JRhp($684*L^9DFmgV zX^5cI`KN%g#1{$&K=SrG(G7>2a>VmDM2;mG?YgGEg7UJUyamecrrv_`ygv>IwbTO} zP_a(IiuFUq?1v-c0O`24_H->2#IOemffvzhGVz)xn+OPl?ox2~SQDAZ@6;CI6*-VK z%yU1|L@{`FLfahuFe`R`AHpY@kWdqXABq*({{?9Q1l3tlt_#{kZ*Y7TX z_)4lY+VWF@7*(l&Dg!wr880T)HEodkHjfcZ%ey4U{i3}AkcPZV;keq0?Orzo4L#e` zicM5JdoK7apq*<8XwJ0(LzS#P2TM_?w2F&Mt-W;l4+WDTuWXuyB>gd}*=Su3J{s!% z#t=A5#F|=tbW-p%4fBkie%SVOZ7pfojBuGYS~~#Rm!9rxd-_bf(mGd~1L~W_a7JwF);MxNHR=b)UB8W)w(NIllwJ%_+dHti2g}SNq z;KNvVX%-k%A22MT4#HMUm3jj5Pr_#2scGIB0yWwI!))UOu{BVF%C_Q<)=IF{FTo1B zOUw4b*1eIwL@3k{Uf`wkQbgT_!@y^j)klE3`S3x4Jfpk&d2|KKh_BJkwhJI4BVNVm z3f9S4)rL%o<5t_7*3{BlzJb5FjCzo}F&Y$vq?Q38sYCZr=>yPBx#&p!kN!DIJ!ldb z5Me_fE*jJ>?aG#SP}$AUSQUjQug9yt(as@+Lj|)$w+hI01;}`^s`1E2Sw{BYU@5ep z{18Hl#I!PsQuaYiRfIweJHF9&`S@LrvVkdYYX6|1HNfWlEP|%O?qH#Gy`ArP6i4TP zZ&me5@vXKX4%_|qW#aR>;#*N&DySDgU2b0_sAqi3s^<&pZ=f!<-zTU)`Ib}{3n~m{ z)0fz13+lJN#nrO}6~cH>VI+^w@-yF}>bnH>Lr@pl?{o_CLEpmaX@Xn_@*gqU_ftIvQKzp|RyDyc8}4eABZl6{g|=9OSx zCadrJ;Y`wMRDso~ZWCJa2R>zHTKQ)=m^H6N)NF0&MT_r~p6!Z!%jOIkIBWTe zMS})P(~I;`w*hA}5A4;0 zYvcrTw&9z5+?i8ki0-S#Nr#MhZcx2okE5{uQ`#!N>oL~Vep-+eL3*++JB;9aQdVh| zZVIdvG-(XXk(o|1*reSxFt8ac=MkGr79t*P36EU|V+#kQ#H9z*Z3ui>a9Z2!Bd&rL zFp?f$2kw| zbZsr2EZ)-ohF23xl+LFc5aduV%Sp*+w)fu%@3j?7m83ap!czvOjymKm1hF{$_}&Wz5&N|0VAvs- zmXDp7C^4YWK0N?$%oPlnlQ^*JefulUA=DdG)Vg*rO0%s&-*y*$dp-4+?NXQCka{gr z!%IW-PN)%Yw@W=U)c(i_rM9}Z0?C{G{IR?*x!^a+#{@(&(oQ=%7vFB&E+$2Dy&PkMq)mpNbh1RFGTL`9e$ z5xL~(5{vDuc3e1KspHGxtwTB{tY;B+sEw{@5#Wl*eftVlHGcdFW|=0CGq12K7Qp%mgzjwYAHDk z)sOL{1%3t+LT>6SFjQ~pJ?uTvcQF4A^r+4hy*LUwt1Nq(pbiUUR3l0f`gSm=>2?5Z zAZ`CZT6I@J?FDL@y|bWZ2D(?1&z-EMg4*34FQ{Dusm^Nhhm+NgAg9_1^bf#Gf#m9N zK{bP#Vh6wss76rr0c;gmfHn8(LpZl+&a5Ta)1Sw^xSlsp>ONn;7JEE~_KyYn{ryW8 z3eES-68(P8%Da~>qp{zB1Uf^o;{G{vW}zHOs=JXU@{+xtbm){83FVcyG0jFj(W2!A zrrdCf(|ckBU-}g5dS|0Q0cXvG>W)adL%S1xq{&skAfiJU(9I>sFIo?83hpz6?p1H~ zYA?k=>W6jS)cB!x+S3_Uxm__@OMWtn|4^n!P zo!nU^)c^|(eaL(O2Tat5%&BUvU4kE7GsvCAM<=O&wk8C}>=c-~(dc!mJD9WOD~gth zk(dOUxL;B#eXC#31;&Kb70eIlLjSxjNT)%02p=x!;*$-n(XyIXB@SaG$DvIx2hJ>3 z+fRUo*H1OnA5uEAvx4*5OkZ4$f)2k4dn|3A!zW9b<(2$}r&;fzt6M`W$0KM&IMP## z%UVsrMl3@khAh(?F%PH)WJVFaj9+`24U6A~6Vw{_C}|QblXCDSRrAr$umL^R`swCB zo>-R)UQBDPq$$!MI?4%tboBHyK!QBO<`2CB!LkX44&-_IJ1o%YLnO&KeYBR6$L13P zNe+hf8R!oY8e63LOMvG-%X)Obq8)LU!`aU)jf38l?ARj#uX78z|4DAGgg^2u8!g-T zp=VhVOqHI4*Vwac_-(&y%i(=B4;9{__4DM_xE#-)j)^PBKbIpe$5luk8PPCSxmBb{ z@g&wv#aqv4`vL_t(Vik;S5gI2s>!X~@f=I-m`koUV1T5`1<;UMYy%cw;G3RfY01&x z{;h2`HnFr?n#t$tiiSX^|9*~DCVc?jX|LmY1AcXEg;iRP!>tYB70QC;0wR^u;2^7_S1A- zbT?ke2XNNK@D&UuITR!B`T1fFMb2A({sd>;I^5-L35thlH@K|5;OD?c9qb%xze&`* z#51%S?)#Y8b6}%A#7>bx$w+Qcb$@X+1JptGY;k>uXJB(4><1E* zN>X}`Jxx$YfJ$qN1jzzX^|fW7r=LC&PBk0k{=uQ>2{NsS5~2$eRbO0^J$-{i(HYc! z!Tlf}RNBxbHBwOZ&oa!D9qbtiJ#!|w8{9rVf5^}wk~9wY3+K$8wXAp^f>}7EuJ<~1 z!kmT6q>pdcujiI5FU3+Mc7QQ6bs7$43y}*({*ttGMljv7qE#VUZ-R{?@2X!Mt?(FKx{39S`P@qZk^wuv zMI#WBZAc~$;2&>dedJNRc@w)QK1_}G^ejB;R?7dlkEHFTeAZ^R;HJN{Q26aLT3w5j zWwpKDBuO{f!-TZ5Ux_ui%2;7P`Iuii^l*k*SmhutG?%xqK1!In6~2&LSn54ybxwd3 z1Eu1VCN;N5vq3xNLV$U>aD4ish5C|kom;r3jYN^GIZ@JqWN9g&e3!LKI6}A_Rn2h* zi|uBI2DQkWTiDHp1wMXi3mYtV;YlyDTjU}9&KFr$0v)MN-I;(%fOP80HV3dpImdur8(Aw@Xnoo!B zgP-)LXH2}$E3EtU%UT_b*~on7vQ`U^FH^zVd~?HN`C$!Ybp{7>h|B~-1-yV8**aqB zE^8Z+M|71bwAg7{2mZ<{tWT%Q+A4T7e&>#=>}?w)7IIC?>RDFP=P-l9p1q0Lz`BWc& zyNZo9?DlX^6-!OLtTl+CkIR)RX&2E`ec|Id)o_1!gx_7wQo3B$s*uQG3lo)?A58Qp zf2tZ=O+Ig|W_z5EfDxlDU+1ls72h{tsPs8#ZTFCKq_pu_cs>u(5!zK}2L&>E7OA-1 zJ+eqA+uaAV0Ez(1Xwm(}aIIKYv`CUx?XTd0tt=(cq<-vG;D}`bun21y0M^;K*`&Vb z<%3^kmKm_m^ZtrHdd zW*I`316Tl*h?6h}UG}R(r^f~OTd%S*XIHPud}hCyY+D4hV1n&5eHbRYSel2!%23KS zoOt7$5@&F2!~b!)gjb|n89nD6W;0_0B-^2X;993{p!u{e#20iHwvCAA)5bacrrmv= zb4a;?b`M+t^ zJ|6Z4E09b0i{52NRY0tVwY(Dt9%1z$SnS!H(0NX4fFIVNnbl{z_QK! zVCi_u5REbU1?>F1x{U4Y5rfnIT$q@=rT6K)-nh+JSMQreg26eClG0gNC#08N5j1^1 zFDk~ggRo9dC(f2cditg7X=w7^^Mbgi=X5J=c=7skd>>K`-i!B)q6Bm=J^%9c1i84E zH?|c(x6-an;+`s2T(&~gOPaKn-}@%(?0o%k@vIc#&_Y5->GSp1X|q?(lm6In!~Lu! zvvFklhoFf@(EW~Qg7@H5=$%Zjq=*zXtCWPQk~9_PV^n-@@e1spvr34WaY~a`3u5uI zqU8{`qTfJ0)1I~*iI*&smWC=tqTCf|2h!C%eZ3OP@rvnsCG_3~p)vGa$W-qyqMdxx zlh^ainU$y$Pd+Ayi*FiQJgcOrRH|9S|Na(urU)P3{uZ+;S8-x^VW=t5=+g%Ci*K=> zhHtz)aTl|8Yi-A>U)5k>17H}M$8Z3+YZn`6;Bb7{#k$Gk_>NtyzhSADAK%6Pl72}W zi{p5eqrgfCCs=zNzIII6C2fe8-@Y3!zNB^c^1tn7ojcNzAE@#Z3zF|}TcpzQFskBj z>}K6%C;xOe%u^lw>TZ~^Oy@~^@RQF+@4>d0!;AN@CE+`?35X3j`D`z~w2pP=7i$E+3L zSR&7F{@-_G!L+sgJKpkfb1i#EUd<2HqS6cb`C8O=Chxcp zKQ?~zJ`^~Z-?NXE7`RDss8fx0xjZ(t1;2nMPOotpGXL-4QAKZ7gYk>6V_cohr z*wn&v53ppu_ia>c4L|rcid)Km!;j(K7QXucT5Z{nN4N66`{B^A15u56PCe_9(4^S{ zdf}mNz$W?0er%H4wPURuhRpMUXmQg4mcq;5K>;uFq64t%_#HCT2uQL!qi;6weed8s z_q+Mu-o<-VN;a3bzQY#aJ>_m5_a3w0Jv03`zQ+YS_&U*uOFrIE$L1>6v`=wdJHUEi zO|9hv-eq0+g9lgy=&uC$`U5OeeuD2hfF62~Hy%JMwrej3LakTim4hyD+AD%};etm!IL)@1ok&xa!9Na@EoqKkg%;J7|@nWon($hPF z_u!vP?k|=mhwgQC$g(n|nObc!FIqAeEAK4*GhQi{IO*e8|C=t>M(OG&(B1PqVzxlstD5L248)?gtZUFx;8q#fe_C{KWt?2s-(KFlCc`!OIpx2^WZX zH~6xM9R|ECoNxJ%-3`k`?L*c}zMZFigz`u6@${3;7kva`7tTLozhEA@Tlm9AnZJjUku|@KSr57`6~KJ;4gg)%hQ0HfA%r^ z9cBOI=6gR8W!KTCg|bU*Gi)8UAYielec9$64%;^EgqyoRVKb=EPhrYu;cGvIY&4d? z@hM!Fu0k)vzxb4;;_7^W|M@9fX8B#)0>!{;u`H9o+7ECaGGCzUt8|X|+h@#@aY`c? zKl0@zJ22fy(XX9E%8p2xhm?=cwjJrru3rHhRABoR;wf(Xob^s76%aXF=oKt$SHTof z!DPPubJjWgBHZXm>vXY64^l%#-vsGblVJRH9|+pFRIQ|ypZ%P5GoFXZujvamAnCle z&;#*U#sqMZIf$cP?0HnMWS6xJe#aMVME8q+;;cyA1J1)1UT-KU9d9maaFJ(0KgjELJx{&honmoM26%=$@RvQ_dD{_&S=kTDnOykD}O&SicRPN0PU3S?ba z+7P!*URosEz@JiQULkzz%39~aECt1VCR4SBZjxSpq@$TQL(8O-x6 z^2Cbw7(A9K=$Aks`qh}N@gOy6tKD(0#&1m!*N?b6z6u0PaSd#(P?bcbUW7ME&>Kd; zt%eXypX1H{WL*Yt1Y9p37n3mgMO=sK-(A#2ZA}W+WgO~~B7m23=2aryPgxRTYHP^+dcH_(>@IJ*-A#m7F#PX`4@}qa<9LQ08sAUTYI3etJ)p> z@qe*CH(wKu4M?k<$9EGPFwr}{x1!D4k4Bqsoj!Wjl+n`)#7GvcaM16=A4l_x|6)^} z!@=K#`XxeC{J1Y(^ov*PkBWzhic>_=Q`!*-Q`^5FbMN)M`kZ**7ix5TTX&UTA2iIP zW9{<9L|PKjkgdM3;0rYfk|M+l=kfo1P5!RnwgO*+30T;`dN?70%aq|xE(2v=R-3)C z5S&LL2xBB%dPzIlr9dhpkcFrQgSA6Lgf*kF>;I$cUErds*8cIm=du{?qoN{=xVbta zBAOYQ>4-QEYTmMrnbl}!<0VDA*~JFT612{tje;AO3=lW61^7I! z4;bXlmQhC168PSwELQzBxS(5rx2J@K>bJ-7ZIJSq`i+DLVL}vDbUU}SZnx2JT+1cKMx=*5zio=IQX6R7T~=sG+K#( zsf>~MJIQw^{yyp*j<7-Kh!|X@zC484?;nKs$GqA2Tj=hOzneT62zdlX(x6!w06V}n zJeZ8XKLiuu6BFo(zt8!)JMl;h#^diIXe2S0DHw@BcLx}f5CE$NmNm5s`glFIlU-OR zN^C*~8N;UviZIw`dq&Ul9pPkT87Z=L$|JC0q_LGbLtABmecD~(Xs4aAf zy5(T!Z|9p;mqxc(b;+trrxON=rwd&`=LIh?Z2MS{Uk=6cu zSotnzi9xYHhYLFB7*VmcuGJyA7@>7qmm?(C;7zUu3gZ`pVS6^)GZ^*!MX0{`KpK3lsDTKs)afo{27o_0!qDQ<3X7o@mFbWMOu9@*BUm-@`` zL@DIc!Cw#Vf+PWHx{;##YjSB51QDKxr)5(!mKpj$>-)3VKM350maIX)>ehut8anu6 zogp74`8qY^+&_e5w?a-;(<1pqO)6~#O&-c)*Oj7V$OA;5=3~hHA>}p3sV2exS7ttb zF(B27i0tQY1>#YDq7gFH0-WX=RgIdGBDfbcTmAokfnz(v&sD=yT2Z$OEa1L`L>-d5 zYR3bRnM{_hh-w2-;10RAS)Y3UY0?ecbeg|?E0t5&G5&7@`FQEAGUwhZ^XHwhKlD+f zb(I52@i#^RLtrP<)_?|8!a}6^vKE zQWpjI+tA=+&AYBlK=&;6QwlKfskZts3Wbsj(R=W0zhd;V#&9@yK(_p(PjsH<3)MWM zm9YODOc! z6fr%lUFYSHv##wAeZ!9mI!+Tw>gVZ{5{Z4uKm4RmzI`txk=2z%J}Q6O7fxcR%4qlU zR3wqrnFL`d_&AsU^Aip^mNWXe$us@7&H<-~&FUl+*2gyi8!0^WDyT~9_Cm&m8bEg} zT)FvfEvif-dKnFlP2oyH_SGl9dq!^(i{-jA;8Z+7MzDW3w0s=*uU8NN^EXnCRrGxp zCHpYkRl-1O?5?IsLn2p|mC+E))EWSh!P+Zz>P-j@$6LFhWaPREh7qJa)b~s37o8$i z(HAM804^pk`Po*zpgWa@h9%$L@*9diHJ15?CO_V)7mXN2-Q{|ep~p6!7%;Z#3}agL z+5!wKAOEY|s^}l-U8RnkX>Ezo+xRJn+-~EGJlpsq@|?5!-j22Oann!yHk#AxsMXeh z4Ew*+qk}))8SPR?*uX!Dtn<%EyP^iho9pp9J2=IUFB<#$`tw z+Lacb)7V7Hte2CYX*CGqF;NA@6V=?Y!&M@*PUqTWUANNXqI0?QxRV zUtJ&^ztOU--JlmF^Rfu|yaJsG?ZK2?bprml2Od?x!yf<>42`$S#9 zn2v(DiR)m4Ny4VPYIjVwa4aTm_YFxsb6#tKlyBL<$-{x@`|@s^LXy6R6AjM^=FyFD zW!iRwke5_ZaOd&x`|uZ+h|uNLw(S|H@kaHgcCcpHCPU81c2x4s&j zv1#QXlZdaPlSZmf@pzu~ddvIm1|2TE%cP`Nc1vZJWJCU%-JceSrv>Sk7CamCtY=%K zvNP`ehnn5OA)z%!G(1;wz)+@dH^i(j?B{j9cKwWdoBHv!afZe-?h5t&-9o&T97U8f z?h@4}rd2CKmLaCptvh5Wxu+z(q!wR4Lu(lt=n$-rJtXP77^}XP1~<`I7x-j+bGOi$hbekB z25dLD2u!n0OuTaea((GYCLKrQigG(=>R$<@K5T>#Nlc)`V;T+7&zDSP}?Uh9F4F95U$`k0an}_fX-t zqu>#@u_7$>Ow!qzIPf-%C)je@8*~^0l3i=l!Jy1d%#HP!8wCB{bwQ;EQ0mlLC*bgF z!v-Dm!7I4t3Jj!-du1lJpG+AamxKzFo4C_jR$tkWmW z9S)i4ruGs9(junSCyY4{djOqS^>)Bl4|c{&C|Y(FI6aQU{rbzR^Ihpl6(Gm6wK(ph&Q~DS{6dg8pRw zK{A3M)E=HwJe~&Fdbe}10J)8cm?xMwuNw!Jj zvf<(q-DO(7ur$fI^=Mk2^=JOKpxseoszN)&oQ|$s3d36j*Ouzgq{Fg-#<8e_-xZLp zTt8gr<}C?vr*mVrrE+M6Gdb!v66)+yc*x}b9WE-K%C;TyT7-91|xB6v> z{UvC z(P8|=xK5zz;7g&3)V6~G=19%Z2WqHE){H7MWXv~tv1Y=RT4i>^x!wz_g6T29455#& z!*(@+uJ%=3uL4g>Oy8K2th!(yv%+$1@sp_1&_vbe8Ca|izrE@)R5&m|9)K1M7G5k5 zS3m=7!?J8Qnd`bC^mYESFB+_#G~5hO$M#31-b!PujMsU-Zwx+&JE*SNfw%Usp@m+4 zk(7@B3QL*`H(-3N8{T{vPB~Tv+^e5^(^(MbYWKVpG3Vx~Y-=m9b-nxpzg9gZ`uJUL zIa_2BB$u8G0A!WDI$6 zfv18Pqeyr_?#-sWj6Jae=Ee2#aj-lb z?b7NaBBO=jSy4(_mO+WjVv3NZ!%u@rtKKx#6FARo80r?|m*cM{z8HVC@k<&FQjlN9 ztRXt#Qp;+HzLDJ;2IxVl@Q`{SvfKNYy41HrH|p*Codx1aSbtM~^RkzUl2Tf2wU>X; zDnw=}l;mMhv6-s6++q)k(DI6!u;WRy{Tmoi+3q$}^z)XxcHO97syRk)P+se(w>wJp z$QY!Gbg|S?4!hcsJ5?(-|82fYVeLIYn`lL+TP+J25EClYcTv~?I{%~~t;KC!5Cex0 z2FYYryb`bURR~=y?{{^1yp(E4HSMMd^${rSqR#p+gxDI@_VLp2cOsqb;1p2x@b;u+ zeW1nVRO#r`m-LV8bExrkU5%d_sidVwC~>KJh^&JIg){9GZl+x$&3v+N=|iPSPm0oyrHMFAk@X{?UQ;X9fdHsCqRqACG3A5P3$>+y zqHqWUc_Vp{8z-Flww64VJ|v<$#Lq(d6xOdjdGg9A*4s&E6sYs}7wR)>O|X@fS`MQ_ zr^ueTy0l`ZIm%0t=ahe)42z{r_VPo?ge9U?$d}&cIvV>dbX4>yuvT*=$Z*_$b$0~* zuGwubN4=Vb{uvHO`K|&(qmTt$^!mPa39#=KFZ>71H>1|>R5Qf=NxkF&my|Y69SImGG}nZz97QR&q?GJdO2dZt z(i;0aGGDO201XYnTw8@@2UbIkW#hXmfIx?)3JvlWS{?_94bUip4~?Xs{2DA}LB85o zZ2D?9?8ZSeo$AwoQ z$9Q0S)<&ba7*PWZr)&kQcMJ71%PV0okkHiy<+a^OFFfpss?}ykHO_Qcl4jbq82FDk z))XWidl)n7T#F_fr?PCoI1g~LQxsL(6b=}r2m^Gd`_^_wQ*a5@B1+%1%q%w)&MZyD z-$ac6FVw>)tw?!lm(#$>qbYB=+d2%}lD*tatbuY%p;VgTu$R{q+-QzN=Pu*35 zF|2D(60Xux_*xH^1$e8cU|+Hao1oo%I#Sjqu=kvKd$nbKCS^GK^eHRo*%1BQrn=q} zlO69A#5eT9a~-zi1Q^VYF4LA6CnlGDnG{nNch4Y4PT`{^W6PouFR9O}f^H2xo_nD# z3gKTyc*DdbySA)Hi4Nh9C+W&Go#FEic5zvV<5G++!W5IA?8V+1#`#2?5a|$ipXWBK zIc)%TuycHp4}Ocdm`!$~3h4`>jTT{(f_yJE=INj=~5-U#eBA=jWlxIwa z+;gX~jOBJaO=0G%Vdfx2HSi+H=OKT|Zi36urq&$fcLAj*vl9V{GMl1;I%w45bok_` zL}oI2`JM13fi5b-Pd<5gBFo4<#kn^+1M@JluhQEsu8VFLqo-Up8@KWQcvG!&P3w1S zcTSyQz_PH7f8~|S64{7|gZw|9GrU&*I+6A7wT)N&pMYz;GV8+%bqD!6k36{#OQPFk zsV{E+@|3=?#;wyO7d5(t1lU1qG%Ja!PjA>j>0OjCp?g``j0DxkV(MOW7-4taC|RmG zE=cqqi!TP9B_$eP47y10wk#%??L^9!Yv-pSy(U3{E%AB{%=~F>gi>cbIBYV|n%=Dx zGwiR6^426a(HY~a0O6aX^tbMJT%1RT)EJi={FwAV_#A~#68S8=IM4jV{<(u6qbok2 zU|$xF@n577h41dgU1_Ysfk0HktFw7QUZHu8P|wvVNQwa!R%xZNF0NLTS0=Mqh&^8N z%70E~la0`x3*;yZO}(lV$2I<<-w(i0G znmoe9CIiXtDs)~htOo=k5kdsa=;6E*gcww-Crznz z&=r0HLY=rI4)ySd{fVTawc-gFv?K!9!w-O{B%iV7hz4DIhK4lew=VDi)<>(5KD~$U z^vflE*#sxZOAyl8)_yqix%tDPlpttQUkQ17Vto zGki5a?*B5Rs+WI>@Zs}nJ9pd)pAnq_>)l8BFlQhP)#BlH$R8CSBsND^ zVctj72$Y_(n%EU}7G(`l1$>KE(V5!$-Cf@%q*|kFRR~LXN<ew2_2PmmSk?{ z1HcL)pK)MV5YRcDe_Hq{uqEPPJ0b23`sVb?o6}h@-Pin_Ti&0}@?$-GI0|Vz=$#~F z43h)ttao-hA|-(|4;P{Xrx+nqtC+1%m?GVRWiPUhfL+~-{NaE+Dud-fO#45cxJ?h3 zki~{0Gbo#QZ&Z#RhF?QN=m_?JSAH#nS$f~(fA*3IuqY^3N{(3A?2~{#pCtdB!3K7} z1~kM{NWi3aFTx&rg&Sd_J(J}DfqoJq-J#qLvONkrs^IzzL~a}Z!6z@ocZmJ=N1Za6 zWWLFJBBW6N=a#2yl|^G6yD;fBF)=>lP-T%8u0Dw*Cl~FJFJ!VAbE}|JBw%5B-7N^Y z*l9%pd*z0U{9eDNq6$}Bz;JoTqT19F%-0&ztHhdUSEV~meZC6|W2x$!>^9VjS%M;F z41s2a;CjWYD_nrLXxCb|{B9OA!Pd|72py+}2C7Udg?ik3`jTj@;;~*KRac|kSUN)o zhLwjK!MPEoJ79;3mMSGAcVsc!fSde&k7UmqtZy6+s^KiZ<`Zg%y)V?07SdVX3V^Pm zs{aM~vHt8fG>F+FzuTYX;w|1I|GPiyg~s(`#V>ubAxx%-*<(vIk*ec;*GaHMb z2i)>AW|o$4g->^%MO(vKS@%_H;0bQ|BQv&#n|vKqOwDY0T#Rd~Z#lwHKb-Z*_YYvh z(NDQ<$)2SA*1cM_d+Q*;oyk%V8vuky2e2&dc>wvh4`BTvMS3wLo3gRI-5{CnhqKwx z#2fshkYraDSsbfUltqGLjEN*Bb^=&Go0(Jq*MDWR)b1C!8;nFcz7izf1q?vhn+6a(4;Cp)GavXIL6Ojb9oJz;3Yz&QUx{( z`B`TFCb1%c5gy=s{B-mWU$YRAE@9-8p+9=2L6mqP&iXe%-qFZ@;g+(jk12f-JNEtVS9VzmvUGJDzP;vzfW)H2_@4Qr!&FN z8I-T&boN>QL2N+QNxmFART;MFR9sKDfhlXLJp^Vf9c}O%Z?HD;y$9rH2C*!$X5V{* zScEwBEN^rhc0fZ1z&5Z`gf~dj1(gLBlQQRSEMsT+gC4^U5^=48o`MG7&+`)jjq0-n z+#8{ya=}DvRO%`Rh3Nq9a4yR=T>yyyedX}6s#IEdX@ND7M(0)jp1hc$_MrQmRowqP$*SA zVUi%9e3t9MvXwRrOqu`*CJRa+c;tC`>?2(ZU*MM$hOpQhti+q<`-Y|p>cV2`} zcj|&t`+D$>Y6`A4hdG#KyJ!#Zzlf~WAH;eorqK-i8HUoxx*WYN23zL_&+$pPl-}VP zh?S{Z_ilX&Z)6a#AJ6i9EcfrZV{uG;&mAKXSIvbrDIc=G79Z)Jk^7=Ae=t1qeVvFr zsp8Xg9YiwFbc3D%wqZV)UhhHeWDMRw0eR&YhoZUKc^VW5hO(!keEbLs;)DFOoN^mW zi@6Fk()reDRY>?^9F9uRdABp0vy$Hg!|!HeWim5sk7s}qbiueuC7*(&I&}rjO#yaZ zEBW|8xTO`jfa)RtyZ+!`$#45#?t!=5+QtMm^|irFN$(b;E0YUML&)-2C4W31pSzts z12~30KuC|>8Vhr=Bt_Q`D^8a|P_o!!M%U_ZvEx~%RGq@LfnQs2V zJrXSCL|_Zyyf?}MLQg((2b+dMeCv~NY?z1^qguOQd|7WDhP#Y#&5r@dWuVnmJx%=< z2{_U4@q=3BPpVk}dRvRR7UDxZQfw0K}HD0ayrz+=mnn2-3-HNfy7gOWnZ9M@f zPm4#8y5w+p}U7lZPwJK0F1 zo2PkUv=mHc0+TR#<@fJopZ99#2CsmPaiCb~pi{t7^tO=d2UY$oPYSYJ5A$EG(fDWev6}_*z<@-9F zbFi~Ma{D8+N|0?(l^gRQM z`zSWw2+P-=wwC8psQrCB+bgdh#cb&}0?J}z9RZ`I@*Y|1_G77LUsEXx2YY;e%na zg?i&Ezs)ayI~s=x++Bq76e7f7*&LY&xlv6+tp?QZGEm5RAE3?M%O4BLaTb=7bK;lT2Kn7LKL+-YbN4=dj$n8&0&Xe;(3 zuvMiK?V?ySrXN_{!k94Xysjx$y(GKJ-wD!j(hXrzviHEy=T!4+u%Srfu^G1V=)x=y z&0CIMENlz_ZD$SLzj$z%VyZPU}d37W{Lx;MXz>ILK2+Ewl;hh7UxEwc% zJJe@6m}+E6Nuv&vn|!E;jzpAsHPC0m!yZFCC{Hh759>|=lSbZCz~+My^8!Z1ST;ZL z3V+5Qq3m%l5zd;mO$?j+6@D7p6S8reK0)3!mJOG#@|7WQb_9$2cDvB}Phq^>VUnIE z5`_8)md;oq%hjIa^W{4V*}cvV-sX8w9iNwZo$r42EeeKKr-6mt!G8j|+QdH!5WS=A z-U#CR3_s%^tA_dojP6m2PJIso2_wJL*8{PCihIZd(A;ixt?dGu2AvIJg2WhagXQ!z zHN-zW(%raBiv?ROTPtZ4q?#$Ocv#= zk+nAtkd` z$lQu;qlzE#G-K2WQZo)TLamr7;_X$p+&m74lVsTTB4zGjH*3Q`mQ9)h}JW;37V zl?%r+sqa_(ggZfkeoTp=<`#q8`kKE-ZUAeNOUJY1M=M^T{?{SNnf|NswB3Z)}k_i!WW9U++jZBVS8O=BZsnU{-P^`2*8O~^=T6%vB=MX1h!Tqi5$c;EYtRgh zWL!Sy+}EJVVGY_GLxUk_Y(r$u#KuBpkZnJo<{hsLv>kfRQ1=NZJAOrMdDMP>)x(s3 z!oa8ec@fL%nNTFCsv;LV)kdg&cFCS1Hg4*E9_bl`Y+nyj6aCkljdzIeW{$sAgz+fC z*I-i$Id^v!AqqtpfFj)1n1f8lhx(!zHJ(9u9|N6=32c<{pIiz>!WVLK@J$NI%@bH+ zR8JJc4viH3 zORU+)2Y9;UZx;>Op;d5FXFbG}iD_IQD5^ zy}pJ&f*uv6Ubi}@2RetDM|Y(BBa7@U3m4wnb>a2Dw;b4WVeK{=s`AKt*r<71`9sL5 z2}a8fK+5hw(Jo*6jcn_uRgpD6@P9)JZ=NY~=fSG2yu)MIAXIz?|I?RP`VTNO9{%easj1}7ko?m>v3KG77R0Vh+ogVa;t#QR;Oo1dhY|aR z-(L4{+DB@b2c5T~{|y035WVZui7M#d?D%))q z6ZyQa`n>9iQL1bus?RpnXC*phtNOOWvr+vL11pYIRZeQrKDP={jci7t5cG+@#QdQU z8}aonPXu6D1?dBbLl|~y)wf?ggJGdVylgbagLS$QF~5iOSXZmQgIEbDP}u+HPXBP5 zzUjor?%1ycyVhBh*6%af)uvzWi{>8b25qMjI< znSYI|PMIl$m%vA}MpjnCq{8T`v3NSMw0y9@#j`cjS-)B_m0OfXkB z0Qs@3I|OU1`3`IbKM^F6`Ce8iQSH=~3kq<>duw*p+OG5M{%DNwk8PWARFz-5mnEij zKn{=E>n`xHe2qP&9Vp9~vqDA<@*EPBzqps>#O>pE`?p}BD?pVh(B}8Dd}9r++z=lrtkFD*6ee);q-v@De@hyPqb1^6$)dRp>` z8s@^^w*K;N&BgkPi&d}X=H?2}Z_;kAO1PiH%`p!r9 z9Orv|$04W*#T#r}NW~}r_$M}UP!m7p&77e9BC{$L^?w3Xp&63F<7it;%|sJ#<%!-T zq|^^Nx65N@vSjBzUgH%rdx5;z2f-~tI>hq=lnoNk6d~~gNk$~~XN1uy36c>-3~#ZJ zkS)xkM?C-ra}(LA$bAu5 z*Y6e?YBqD=Ld}1GP1iNyKrDau0L#c|2I;=Ch-e|b_eJ&D;Ymm(cZL@b1K9hn1Z3ST zCYhQ6HnOBB0$+aiJfS|1AtbpqUfF^Ww(p^B{~)L_ry$imT4h9jGocwePkp=BXWTIv zO*7IXNORE2^b_juL0dm!6CDq!tsUvHqAr)cat%^L89#z)oLS6-Mu!St<~Zdzzu!Lr zWQ6hKBK#F`>z-#5R^;OhhRIz#t|}YpcevBgIhfqVg;iN_x4Dy)yAhfcgVW$nM*g=W zZ~Db5ci;#g^P;JSL9x)3y@gTpV6n#W$0wVVD$V(n%Ci_0v^CA`DGd!>J z*$+=@26N}Lx9Shc-@s6H$L{KD7y9!keqZBvtbz$B&is9qpCT=n<*x+&kO{v_!z*81P-?^ORQ zKD{#5dZPMk)z#vYmD#LU{`Wl9GuFD$`dyWXG*9?6AYP`pM1u-==m(7k;uz*TfB#+2%*xBHy8T&+a;wS8v zcg|%g>LNj!)Zkc7`P(iWA*6(gm#sZ;A9mDNlIq9cd>`WGbJ(7T4w~toU5-J*P z*MOORotFg~tB%9JgAeu3Noi2up6#^6^c`Guf(A1}`JaC8)8Y9jyl!BD7Nt-4LxE(e zzG!@6zV$u+UlNjIrC)T}J zd6+-uOHnq$C7QL31q@sHmwBve#9qG7pIWmQyJ9l_*7~b4#!vBje*$ptp25nH z04d~oVBtM$I|SAIDMdCE)E`9K17hwmCPi)GF}_8}YOhzm{1`K3Z{Z%V1MX_?W9Lrs zfBEtt(Xv{YCzZNi6NaK`1oMoB$MF44ubelZZO&=p|KnY$3_L3c)bF&Xx&e_edFfM+ z+E)x&&MbOT0uo<&XK<0j1Q6(z7 zCQ!xi4Q|G?eOD080xWk&G`?&-#h>(cuXq;~8SfcF)()a`(KCnm*uY;qLozj#9icWN z)G*A56_z7B-z|4ISkBZc{%x@E=B45z+~kf^v}rT|w_u?cq!p>XKU`N$L-q4iy|jm4 z4n5tO;`qh`keSVD?7rb7-xo|Vk3M}01HOC3aXt@P`3smd`!H8<;9ZIQn%xZTB6}ok z2R$nKDhD8Eo215k9Wi?%=5-Inycu-V_5d8>q1`g8kD@-gm^HSekN>;6qb&5aluHp=3c?oTLl0O>& zy8@S!K6%h$)^GABSiaI}Ndhs`jNRc&z62*~BZPDZ)xjo8*&+UCPqO-*;kzU7C4U&- z!^8{>qLdlU^;jdCA<^EW8f(!$g#jWv`kgRpDSRcRayHB=6<@ zLo;l9a2G0OzIkgySmZtlZcWh=mW*}#-=XJ~FLCiCN@GD#jKwZ66~sn8H+%0=lWKO4 zLINfJ+mw;`2AIr74ZimA4pYB==e`49m-*$7mavUcdtr_t5~=D`3JG34-3|&_6VQkj_dQj#gMI53`vVJQoB%#<72g5wS-4@}_dKZ#t`+(d z%Q?$m#ZLrJ@@lmiH$fCZ?0=H?!#$FaV{eGcnXL*(Kd5Kv4?g%{-jI9llS50He%2>o z+@NYD3CfsjWqGd@M4ZyM&l6tRO{yAI{HdS;v{Qxq2|=n2PteW$Tp(Y$zfR1$L-jY* ze#xH$#tDUfC^%5bR&wj&(FC|bez=(R!X%%7G|c}ijs1Z*Ma+!?BP;b*DwF-;>J3!^ znZmrfc=H;yU+4P>3I_C`Pd-x2W{wC?0jaW*zZ6QV%0d%CUqAC`Dvh>Q_dxZmSjE?( zIWEI+-AVql7tN7*l5P-jdPux28Dr)XTrKpuHL~agQO`9YpxNIVS-`s~i#7j8Ex~oU zY8e~jOs;xJs^kMheXIH+^BtiG*XUq`>%CxFbtVX+N^A*zl#{$18ApSrc(*pp4TExP zjusRJ3@PHULJYVs`5KU!>hw|vF>DHy>C9&vU@|-yDMh&Mhj1eRA@41a9=qqBu`OFm zTQ+UL9w0xxoQ+NlkLEPBC|@J{vlyNcE-zHrmb0X^lRP~bo>Lg_rb@8A8)U$!DEVGo_(Ff5DrrlG2iV0u*s zo*h^N!o#l#wnPT0%-c$y?B5K`|C6wOORfElC*0bT{c`1#%rtl})Ut@36`sQhYD-@V zbpKsTLqDY~+Wei`(x>FsC)t=GZG2i#s1N}PuSwNx_!V>=gaI}}AXmLfAOSxB>A?Tv zPXBfCLr<}>L)&1?<7!J@vH)S%nCb_tnhkCIS=>4bQ87wFYm{bcim?qt^3R(^9 z#((dYk3GeP;*frpWP7bKJ1pRfm*G}U%<2yLUUK~tT^VatcH1rHvATw+>aefZUz|c> zSI?L}FSrb>hnSjQ`9+UB>1md|pczNQ?F%Ga`K|YmEnDIz{|%~gqzOjS3(3$YVz?q9 z9=th7&ko)_5Cf&7HZaTwT4Qz^aBX{?f9A=nrHk4&{*NHtr4}EgTwd{r5^oWN)FTEM ze`R-PwqXHgRvWlX6H(oJsqknwEnL4s$Rfg8gm!yJ9`g)KpVz@{AQ$dY1&U#WJAPn; z4#7HjO-QP|gFTB3J!`Dgk2p6${~ zjOo-$j7D>hzzxK+EGy+#p6O0-ivwdJQ5XA0^oB2H+<+|J_sb|uqFa_$u*7a{e1%U7 zc%yKdKE6dRTEQN2ws8@o>n^KyCql9wxUwv>PJ?;tA9#bm zD+XF<#R;B-SS5&6q<%f@|1FlApeWY8{;ROAE5-?~Md$^Thf}@x`z`P}HE_O~$QJ(} zBVF>oY@MQ5aI=$b?P{AJz(5+OXu#ZI#+vD%ZmWa}D1|8h*jaAUtIlZg8 zx@U`DzWf}x0&TDzA;&$>7EWrznxlhCXnyyFg&I}Gw83o=+qmRg1;Go7cgQ`gn>Lkv zJNQeGVkEx?_ein81WTB|ivi(*BhRx@-P?E%uSOjZ;gnwT$_X#9QKoUhLhO%;fR6Ct zDr7qD7sD=2Qg%yTz$NJq5Y(49z5unBHf{^bhhBi>T^k_gHK=QGkU&7fd0WKmfG(7c zFS6mttq`h^keu8|s< zFf@wK_N?jkVeg$#_N+*(`59qlX(dF}(Nh6=)32p!4(l`Lb@ChiSNNl&+mLd5ZxupW1n022iwQN1?y+3?*Z z5l3cP(35N2FqZYLl3dg49n=BS^!MS%d*sD0v78yFdA_IbJH0lDg?-=Hs`S|T`!I3X z9D3keX+gxvhyRdUt~(X!_t@BqTf120^d(d01W!i0?Z(;pB^-U)2$Qpylchma!5#X2 z>7v!RZte+c0lH>YhAR=kSO}+A5$dsl6z zlP1*ynTmHHOchI$3Yym=stMY&4Z?PiG{)&HGP!1quIYBjyIki7ypJksXI_dE#X@>J zv_9-D!542USfnqcal~y##3{jr!II5CdVO2eXc3Ru||_&P1b9$om6vJ8bC0ZGpFxsG8^xW7STKLnlI{aN}y0*1eSv z4@7Oy6;7`Xr@bgB|9dsd?FS%0>?UQ{fyY92=sMr;o~#V$%(1_M-gGPN_4AN}S&(b&#Ms7b%> z9$6T#nEPzv28eqN=o9u`1sTX!FfOn2S#J58SJ;y2t$ZRVkl%Mg8;aPqWX1aaUrW|~ zAZ5Bbh-6YSp;jraz@p)m*S^Y3vwnhvp|s#@4IZO$y>vQk+w6GFw668r^TNf$VcDWFzFXH7q-^ z14`_!y=zqI)2v00!z>7?9zeo+-Wq0}t?>Q+Tu4=r;_r8%1^5=>deR#f&S{0zl>|`< z$cDJ-OA`)wU0?3;j-U)7l{yk99-4;XG(HV=`QtL};u;9JZQ`^1vZah!v}GU1$}g8e z3VSy{6p;U32II)pr-R;xT=s>L;EE8_k`y$=05!u)_RpSFmpui0Yq1lQ*v z1oy!ATloH?MclE*c0M*=aK#6tx=-PK*ekCpXK7i-)w_l_TJBaf5{I#caOO`V^EN+a z{t3dq=as)H$BuoRuk*@R%Gt2&<9sQUIi|O0a-VDzQKeJOOcuNHn*ue@R{OUpTd6P@7N>JK-@cR{=9$nL0|i%rlHNFAybO_MjmvgF*%{K6j*|)P??hpvef(X4r(7*FAE| zIwmC@$NnxzM=l7d-PDwi2E!?T?~!M&V;OPB`4gh+ z9Q_cq6G-wBr%=ar{sJf+L5bg{(nzY$-EPv%-vo6p`Qg9d!hkqO0{#*ANZ1SgK^ORo zib<0gHB-&$Jw7lffBF}e4ZQka{=$Z&aNZLaf`aS3XFz9z#QKG-5dR{y8|wG+unJbe zCL!vKeeyRIY?$^JzHFcP28$H&)+)!o$<9DqB?btOZ?Y?R`>Rhr_g6MSoGA}l&yr1F z^M|qc=HIf9A!J4?q*(P8DOSx}&oYMpfQmEgU@!pIgR3Yuf&p>IJxZSS2cCv)e0#y5 zhD>XJC*pjd5@ZG&%whW&77E>^ zRvJK1*Jr90wxOF%=QvVp2U=OrA3+ov;)?8!NC(z^a4YSO;YpE2lEYx%?r3qOTA6ec zz!b3%-K`l<+S@-t7d$L7sz9suJbuQ#JNVCjBlYWeW-WJG-&7+#k1mU;qo5&vB?Rp# z6hW%PDcdl>7GZ~y65OPmj2gqplcC~>JEoHK*6nr)UyODAY&!dy7VsS%78Eq*Bses9 zD@pDHusEBYDks@{AxxH%VADG!#qL-Dt!lg7X?94pW(1uByrG1XW=CG9%aSwz5hD+ z9^$J)TC^E)W=fzc{!l*{Q0b2*5h2*9>O=z^DGtg5B(8l8_vmy+4&%8l_Q7lu8)`lP zqepsZmI@Nia~7SAfU*uR$jA%v55N(Cq0<)KCn}f!{>^M?+(z&dq&hQhF*oAIRepOj zn>qUc?~Sto_7X~AYPSi>g6R%pq0lagW09M-Cd9`=h%e8&tA*|o=53EP48C{9J+}=V zKWxQ{!GaB`huxD@cVT6$VgHs`gAHMEw=iJ~^gs^qZ#{C^7B<^BiRUOI&@KX%5Zn4Nh?RkNI7 z2XK2a`qV2Aq4|E!M^K6{wqpJGl;^-0z*d&nYYlShD(&w=C2hlH z+yOo`B$sRhmHjD6#% z#E^)C!euUD?8RH7Ka@aBl6xgo6vNaox#p;>JF>V%2D2~o2XJQ?uX5ZjK`1a5NIKwr zf&X@bw*`v8PmA7o3F46Q@b_8Tq7%?|imADbOO{&%;~LuS23-nHAq{M4WfboBQ>{a6 zqU#BNs#TO=k-+}|T}wqBx3(-k;m#;I;Vzqc0`PRw%8PZ%+We1&dNKf83HWc4^*H3f zZ3rX+(&XBYSU)-O0~X^V&JGPG1e+eG_JM2O1xF#?G+z!vJ4Hb);W6P$Gxz=Fc z=AJ58jP{qMmqU`y&0?l>uwwgaCP}X+ptrjI|4K1(I9Q<8jf0E+Z*XV7^eEc3a zjwGnx2SDox zS6XNf>7(?Kd+%iZ#qZ_OJ6XDu^1Em!Xi|-9C)!t#4q(<0kX|u<)UMQ?(n@f?8!BJ2 zxQs&OGt|0--(fsRW^N&jKIpy%X(g_S@i)RerBPZc)k&{gZaRjP71+?DXV;=PjnuDm z7AlK1u3ms$6Z%d1P#L)G&p0gS6~GaoD`N@Bh}uiTO>l_o$f;3i-NNih^w$w9NX zwb-%YEB5{FUf_0>ht4_-CHvipcz+r1wvwqhH!q_%`-j#`z4fhcEGst_^@T*la?NFN z$e7EK2)QJ5Hq%j7Do6;nO0s@Q1snq{Exk#ave$0A}`URI3^Xfv7 zMuWhCD;NNfhCNa>yBgy20st?9&=su~Q#=GGDF};ke4uMJnncr<%U^uV%n#)Uu+p%w zhOG*NJ)ZD?dIA}=(0UJ~VWi?pMnV!!-<{r z30Z0}u;!0>TD3PgriA8je~0oBs__Fc;7xm>nEMGGFADdv#j`Z7e?UP?sCU-QFP9uO z_8MT?)Id_j;wNqMB|f^v5ncZd>Xj8HL)}Mqj8QCrqw8uMW`whp?|0jcWd*OFwxF=u zAl9i;L0G*-%vdeUQJ*lgb0^NBwb5Zpxa$oyRF>} zY^H-i2ST@kRZg@Xjd%B0btUS*-@3;=S1_3Mr|3E5rhi#kLDWftLj^<+W=RRwFPseX z$TlI=hhRERgk2$Zf(WgmK}Z{8HKJ1eJh)zoWR1U%^4}Ig&Q|TcZ+#-fcLo?HQrGw5 zl&@MUml*2apC6%AE)f)1&UOd`e2vVGrhv)Fc>-l-tfPWp!+XMFs(g&z6Kg32356Tw>L~c{;&g7!V6=gWy;nH)3 z{n^Twuqp%XRH&y!HAs|nuLPK)sC;0DpT!kBb;w+3M?vt3v#4Ob!2-T z<>&G7ECNNAS(2dpa@xo)|(C?w-txXXKL@Lb)j&pQ8<@< zm5l-SKydZ;QqnP=#ug!Gd4nLWM2nfr4W$O_IQtTWJZcxD=irB5F@7b*G`ukb5^EhV zSTJWCPfAOjCD<24SCl6<&s<9r!hs$aV8GS>x)D%0qHA_wr?LpGK~pLdS74Ftv4UXk z-7v2+u??7bAdI0dztj~g;!TnkRDeuPwf+fgu@eEJFgo~=z^g<`N6u7J?|u4y2zm;Y zn6l2Ld9`#OwsonrV8i%Qt11T?37l@qrtS$vkS0=psx$gqU~BDUxY#fQGRy|!wAQvZP zGeRMZIZeZ0Bqco#;tI_q35g#|D4ev^g2s}B)TOp3laww34@BSVV8^^dnOTq-5J+K* zn6jg+{#c1{+3bCl9vG%HZ)8}8 z(+L%Ike6^kHU+-UqB0^=p=#!c0l-#iV)VqMzR_@rF6Jl7;7n-S1$s7xg!(NP1c5T5 z!ck$U5M?MN6^aOEB#V|a3Wu=N(sOFvZ(}3w4`Tx>qU$Ifvz!+@-S2>|LmlnWW2AX!7$VX^eme#@-RT=BG15)@~iwFG29E|iPePUuaC09&Jb`SXz!u!rL>9K6Eh;h0Q5!! zSse#OKF_4fxpADr(Xl0ru5DBMKqnY#vEq~#cJ|1I+OcYvk5Shv>TwI)7PZGmqsK?9 zJ?`}`fuu6}FotLZv!lVWGKl-2@!zmi=Qk~bZN~inudr`{YvRiOpCpsa06~JHVn7@a zHCR-v*rKA12r>9rX;)j;rQKkC1Z$DDYTd5gg!%&OBX(&ATf2?Bb{DtpEF+jh7&XZr4sNFE-5 zRT0~kfeN>~5dC3{he6m6waNA11DN)KAW5HVrBU+VIx4j?am=Fa5F0NxeyWRH2IFg( zy$0xhgvmo;`n;pC2g&O!*qrEssbA_~=yDItkc1Lbv9zu2B^8(w+l%(K!V9Kn-7nNU zYkR@|tYA0Uf(#c4DS}8PPC3y6((>W`e zZfdb5JCvpy=5ujoBW$srYUR{|efk zakRU!f^EZWqlP6ugU~524_vobR`Rp1gZB)YGhy04g83lwCKIOInd%j-CcAq%Jw+mp zAfX&=i7Bv8f@do`AilWnJok0GgA$JWkAxKm85rY- z#H-=z^6{4OQZQ>hvhGltn+r7DV3>sSY{#kym2?rs12A?E{tX{1DSq&8L^0^oboh@V z?agzP!esjx7Ke4xWZMIF4U~*v_FL6{*!OnnqEPc+_TT-Ejvp5NiRKuH+tA>|k5EmC z8DfMstYx%FVhq6bJegqJW6^!) zJIMBxo$~MeZd;v2JnPX7a$vFRggJM2xqSyLxA`S7{lZJOmr8cnSMs@SOR|WY+ZvQL z68mq%q^5%8hn~~ z2ew_G?oJ5IvD7~@e*U>nsF1SqP~e3ORwG2JZA1(AZPGjWK*G%?NXtpS{)(y9Y; ze7ANM)oF7M(=@n&LSSwzWn1)kG7|D1bvkqDVyinT0#EX}WX+R4D7LPV9~=RJn*RVh zw~jMd*pK0B5>GYmdf;ay>#Tlr*hHU8-eE(}ybW@IH-g-6x|e%?-g6x}n87KuVkxE} zqr#8@dCw3@p~B45)7mWlOv2$}d5_J5rT(I$-P7mXh(VIn%#HriI16HlRF6*;TDA0VeNO>rDy+tQQxKUuk7 znb?blG5dW_F!huO#085svF%JA?uSt&F|kEA)sgD6#@JpqC)qYGTWQT6-tcxQO?oQH zWS5rH`uT`oDvejDNnwkIX4Ea4d^rpetxg6!L<$l0&J5yAbQZOAr3Jp}utMv=n;5VJ z=$VC(H;0=*khX>@biuO?C1NTnh`9~Y*BcSBMWMDfgWCEf-EKeIUxk-J3l3ve*g}L$ zP5+^mb$43jMWrR4Q$Ep>bI;%-20vC&lTy*uR0OS#)Iw~loh4bGVz5w5%F89m7Amd^ ze7$(=Yu$i{{PI?qO42hu*XSJ=yTQ3t2%aVQHz(l`rPH>voG~*qI}-=Ga`=n3oo0rU z7PSm+u}bHqLdhadY|*7T@|9u%!U;2}CApn{%hK({X*5v;;wk%37em z5@^i~eP*-Aw$hw5N%_cRERtz|uP?bJNc2759cI9??#gtEAk?9k#k5f3<=vw~#c4lC z0wUry8V@EZEmV>7u-9E$ee~X9QXjkk+7cTnC=5|%M0K9D;}{4iv-luo1|CEqJcAPV z0Z1U(K*-yMNjPvP5j9C{&KUr4DKr%lbs1)Xi02AZmPE9JfeZ}6r@7l!Jc=JJJrXLe z+4FFyxEd6fZ_t@>`&Wug{afGMQ0?6R*4R`F#a-+PYH+GWj#7)6N-Z8zYVkO%Ox{zA z$x1CUQ46O1Q`jF}q`cr=-`G$oY7VA_N|Aw5l)?O5Ku%K{3Jt8hVx;nlWaSk?xS@g+ zda$90#+7Vw$}6_x6+@I)JnaJyseBiZq@h=Ec!jBfWNc=9FD(@l4Ma1?nycaF4Ksj5 zpi?svg$g=z_3U4aUX4+*0{nKe!f=yq#4y7RU3l>J6cdlmF{oEeZ^h9-=|32AI0%9z z6RaH=zjkH((i%lq!O<+Yj$W}E{4tEr(9SGzia%pX(?1F{qf!~h^h<@7D}EYc(}?f# zg{LE+MKJhWhZ2GsocCY(HYF~~aqgB9tjHPfy+Msw2_g`L=$MOb%2lebD8^Qi=_`U| zbB#ir(p2^p?g`7j#J_DB5sg7|(f)7bqD~?bk};{9X@=d+e35Sp%?x=>XECbFj?$Zw zY)|vK*1XByLkeLq@$$z?vWlE^I&T{#UTcFXj)BcY4j1nv_X|Nf*`UOzq#-R)62`jP$MWX4Nq-?zLxpRL|J~gcj#VVS=`l*bD|Mp~?&WvLQ3pfiIdG>uRGi0^;`}sJoIjyB?$UP8 zzEE+#fF2`-sW_K>_fqHkLWP;5dzz;W7qpd)nXTlzA0gXQ)`RAJ_frw}$!25f zdG}5T1uA$WSBEdc{Qic-aCPooS-DJ|dn+?Rb!mML-I;+qZrqV}WrmwT{t9+ znYwb{b~uQvs5F|5QTcp1i`VcrJ|ADu7M!_h)~4AzJY&;rO*1$NvsQ#?BJKHmXX_=Q z*cU^Tk~s+;FHq{vVM^LH9p7iwT_^SvK}sBQXu^r>jEy#T-};YfwcyA?sLDcVwv zgHOL~PjV$ub!0*Z4&eH<(rD}#_sg4tyKh2oYjD$3*pZQodWZJv)y=#`*bD*44s!!_ zX4=n>z+8u&{ET4h?1TWw+<8gZoWq0H2v+W?;5L(APJ-P!HFnQn>|izdqhLnPT5%H6 z0@)iZ9BYxVywgH+6~w2sob9mdf)a&7&qO;-G9B{Q(2c&Xgqr zt2pyJ-LP?AC_IK#TA@h3S=eZz)%tXR=50*)!fr*zVKt~A;wTcMx^$BrR8*RJX(}QX zgUZ6dvE^0l)s3^86qyFrWU%S(<(R6L6FnLLJxbV|sF1>f?MadcZNtj`H8vdm3toca z_--_IvoE8TNg+cYUD*49x&`X!-?hPBh<>~r+;VhvhXYRPY}hI9z)?J#jXL;zu*`X# zaZHE22)wf8hbSh@DU;*BZ0N8p^5`JL4PZ47%5n1{yZsu%CUSJV7rVQkDXowTbwmRI zMh1IvI!O3Vu7+L)RZuI9f&eQZ-wdQ%#9#V!JRB^MESa=Gq*Wbq6j<50kS5QB@XC*K zD4gXXWrvjZ2}xfhC{_L%`d9G52^vA8jg)lBHZa7qn6OOwYn%nrqFi0rlN+V*W%M+4 zc48vk>u{V_>1poL3!b+f_q6qOWeoqbpK0enfT)BH9C*AdtD&z&d!j*A2bChy)cJg^ zjHetOeI_gn6K6}iDBzYb*Pg~8Jx$aUxFs5e%%~3_{9D*!bG)x?kgB{_?DJc+N0G!P z&g=)b_Dd|}IgH+HqVFXh?HicC(KEI%8x0kf>5eHhkAfZ=>aY#7!z}urit{v z!Vo1wPjDvotnws!%5J7W3KANc%fe1`B2y=9kxJVRQrw|#GuCkPWx)Y%G_DavFzD0N zcr?erNcv>n(n7R=pt|w3YS)~BMZ3)rL=YH=Fch`~i2x#;NP=f&l-|u~T$*aLVLvDe zqAH4a2K6pxs&G=~l5J5Gh0n{h*o(CVQgT1UEpPJ<<3(4k9Ce=l1 z5dmTr9-PEowVq7xDr_TdXZT!L<9G%((b}IBrw3rh=M_Uv=UX|kz3L9S&D{8a2`5-I zCwV2@6dSQQe3trHWly={^@{aYfgPq{1*RD4Fr0Vp|9(B@9nPBa~N|RC7~K zOkgm!DBEmmX@(1J01C&bL zE%KXwl~N!kU4jrg@D{DubpY^LgHubk>G>i+{k%vf%q@ufb)4YngMBM(CoyfoqzWJL z%v(I4i0L87EwWI6NIVW+5JWv>4hIuMYthKiS`;5zi4vNKyJ0E@<2uO4W9Q#KP~qbT zf{!1FD`?a7UucE@Yve^*4g;_w(Pzxg%T+FB#*8o?v3kQ%~QLacA_JCc7d`}ouH@we2Vt8`r>v+$S zoh+7}Com8i#iJ42u=`jq`3oCN!m?e=3G(xYlNj);$XD|ozPhs&BzP^TVbe2>Z;OK> zxhW%buCz)W4&`yxispgu5X54UuH!xvIGvQ{81ZN%m*;pt=kZI_=@&PfDjCyb%{T#^ zry>m-sXoD3r**}=8dpv2B|#e?t~&Ca9IPUYS-qPTw0r#W#Xf_JZ^&rLmLhNHREF0J z?Aq5~lh^qTI5}J#D1=vQXK$Khx3h4^i=%G9^v{@lUf^G-One>!GeNoXxdnM@ueLhE z1@H7Jl=*i!9D$Zm( z_qrcO9-w-|Gv1GsvcWrZhW_>HcoyZ;`xEgJ2p;j0FZ(rk$zdgp1}|Y!3>H1&&-T;P z8m|T~bp_s*;Mowdf5xIsN9`{9gLOOF!N+KtpdD1U5nCK|=Y_zoDN+>dIl7DkMV89l2^#C+TupaN{lwTGTW4N*GYtRW2=frR+4u~Lat#C=Sk90%+Xls&jM~?@dCg=gl;#AWXPgs)Z18 zII;`Mk%JV$gJ3L4D+myA~znBPz#MRvKTfQ>ED90R<<9(K~`f=M5jM z9sJw2jxhXd`AZOW%0?G|XJ4HQ@2h8kCR+~97@p+iseZGi8dTXN7EA2te#mz~x6;1} z0#sdokI)B;@h~APU^2tm2Ta~~X5=>Uy*P}3PWc!V5^4XRG``4)xPbF4J3w_OL(lCs zd1JR0CWdZ7-_j1#(JImeRnju}k$`9$CaVGP`5@p_q)9nLcM0~S%$>ku;r^XW`IgE=bh~_(!0O_JuQo(HiZWq#U>$0nG=6k$i!%iP*MZYkpPwUQ_!dmSC4jDX~sAX3yz|1FlV2q*oK_c zqH;d0!Z|IHj&&>`OW92IKjeKdqQX>PgEYa=q2gykkB@=%hM)JS(TO#tiP(^V&ZT7% z{4rCiCwj$qhj2JT084`w%K}TR^grkVD>@j>BhXEyCx>;DqCJIg>S3WBlM6@ zOfhmf2qpSNyOFbv?t((SBhhWI&-v!Us1lP@gXc+M=2UmG1plWh8Y_Fd#oI>i0hmHR z77$Gd+!F}B3?E+!$g@j+E+GCn0aIz0Toe%7f}y;CI3!Vd!W0k-61nvc;646zi8VNm zboD}di6FW09#ZK&1xZ~B)e;-1!>u=WPWT)#|lnx4D&U+EYB zJc3I%w#pAepCs4{*qCXIfvpzulvCaRn!qhFeh+6#El)+-wfk&OU6WJ5`KMv3`d0n~ z-dzMP@sVp#Bc{zxtfV8LpbJA$EJhY(aT_Nh)i?qbvp*tq{WlzK$ye?)A=OA6zS5)9 z-I51mTBW&y9FsWu#cu`f*+ykNfPNV>#MO@Zcf{mg2Kv zm0v)b1?^g%m(IebXaQy}t{bYLmm!J-?@r`6-%O1!LjPO*V>0*Xpb zg&X8xG3U40G*D(?gby*5lO}jOX8YjgKqBV&1|kU= zhu3X!Z?opbcx^b+Hz7Z$;mLa+0MFEJOGn`(+kM!k&`3e`tA9eTl5NPf#9>8IyCOjG zne8e0qzW2dcGWI*wd)}23H8`cSQo$o4g6RCIB5e$kJa-xXe|t$YnVj-0?u7`=uS$r zM_}{1Q$7rmjaFrY7sAPq!fs?^l+{_uXOJ!}sWgxW3Q7K5H(k96vk*{aK&TpvvQ{CQ zN%@aj4<1l0+dR*C;-TCVZ8gK8lNsUdcEKDuZz;3{(#`IiD6dM$NIX6XHv|tmFW$bi z1jIigyFhx7f4ueLj?vtN1j>)xZFb0R90yMK2w2}Tmnp>p1i3IKQ#rwx_ zV;$tXHUmoiS%7pvdGV=Y5<&Q8(KJ68+v^7`13X%&GX^`5Z=)5X{RPaRaU?fkzHgm{ z({6NRm#G4ISncu<-+Ct_ z_?)K7cG=*ocg6}DR~5*DB`*xvqpAKW6;V*{o`Vcx_O!rAh0}5v)}<-C#r@1EGfq`9 zIAjr!1O8}|u%?h_QWizn+8c@MNNWTn*0VdOKEmf~(O(0y<0Cj2(dDa^i)lF6MIVAb z3jCESCoML6=rBVcSaCWyIs#HTlQY|j>Dopr!PE9>K1PvLj4&0anFsPVjJ(;GbtxrS z5MP#K@ww z@b&P>h4#eFb)%H)nw)Q&Qj`#58qh3QBQk`1!<5JpwXJenxicb*@^B6}=I;Y0dYcsD z$n`^UrOjRkhX8{@&kk*l#j^v!Y+G%?ryh!-i}ENXfu6YX@>v$`9Gpjjo3a25b&$`i zKY}Ld+e+Oup!{&mLR6(@FG5R+*T-{HutFvDh@&TP>FHN6>pQ{GdA&nn%}W=VcY{-@ zVd|>DQUymLM5g4Bbg&xk+2FEm0#`8Lnj8lsP}C*5p#CN{P2gT14U!MWDu~pfbz~P@ zRt*yKiB&!NQtJVkBCC=_(xc|Aq zGtb|MU^*_-+bO3T@*e`CZX(v%Dmqj7+C*+4dzI`V+@8oiV!9;P^g~s(#09JB%6345 z3Iq9){3fztL7$8E`!SB06ll#@Kaw~5IUL_PBiHw`_`lz;K^z^#hT_b_ zOlrZa>eRgj!O2?DWwD%wA4S^4b%7X8~;J%*fS zAfHvCysAN-79wmQ2kQbd>*xs=WM-%!YkGD0EHZeqSB(rFLZsBdkz&JOj^_ z(MbC;nRGAnf(~U;Fk}#8^wX)NGqBsrBeyehS`QV+(Dyrd#GuNJrJ7L%_tbIP;7q`8AwOf3txkJ(B!npbWCTf5;0#`X`tC+!z^~Y>%)%WjO;kbxm-)q_s@< zjJ2@f>X7**{^|6Mk#J&z+Me1#n&) zuHPwTJ7lXht}cnabT?^g@ETm1f`9YQ1umpB2u_ zANTE*-+&2=>G>7UO?U5g$Up60nv8(F%s&HGC6aMQhV?S-r+o0HQH#DL40H{0#laNW z;a-|Iizmj_RKbvM8D`Oe2Ppi5-|U%SEzXGBqp}_MEi{xnPlIbz347sJDh)Z>n6d^F z@*mSrCJ;v=l;Iyar|ACJ5&Vd~vS~&?CyhpAymC7Mp=3YPKC?Ub2VsdZf7Zl(9m&jI z`R~1AN*0$o4HnUQ_R2qj?)+XDXpPK2vu&^Z>u%oq!8Qgl$I($#LRBmIrJ1=f54wS5 z*&{lVaIILL#ZAmc21v9<(G>K`vM;C8fMa9WeQRIq^CIH`v_whYf^yVbPeS}fM$Yk? z=e+XVKJj)Im*l91c}IG|W?;kNidr1mmpl3rP}9elVfnj#j~a+Q8;a{i87|*KVK6Ml zeJ0<8lk&Ydh^ZN=N-^B2)`!A=v0<+F$X3qHW*k z<8|~=P@COTxXGz|ad2pwv^2$>tU~TzfWBcHG9@m3NHcgxxZ$XhB~a5-xbc`$KY}l~ zsp!5{ay@)yPvxe<6!_YyT-tp{-~-Zdob2Wr4y$1mI}caTFjlTrBO_CmCacH-Jf#so zp31Ele_l@N_2Q7ZS5EEygxV|l6Za?BeEO>*!2J-@rn7~<^@oUUfl1S8oM6UB>s^}s zKI-@+I-km=c2RpA@7ARp&DWru+I~BFlpA6_ve~~Bo#rKg*&R%(U z?*VIZ7WJx%hTkK%J3QwFUg!t_YU_I98{;gg49*At1rGGT3Cy_f;1pyrxLfNuhA2gvP%g&``jKb7`_i| zOQDAiC0f&G@+XDCTUXn0d&fTq+6`)Pk9uZFm%2V+6WJsq(JjePY>k z%wkpWw{337RGO8B|0wT|@ob7TFg@b(z?32-?YC$ol`s$SLtuqD`m#D@iW2{2uXuYp zmuRSxKkwa#K|@AV8X@ixjWf8M0W?f@VVKZRaaqNcGq@yGtXMgNbLguOwF9sd@T(15 z;>GlbxEV0{80ZiB?=HaPw!i1t?UPZ4+lI(Zb;JnYgcb|krSKK`)jM}TtRwOR&U=-+ z6uu&FxpVigb*ystta6vaS71;iobyL@TIKFva5o~)OBYvU`<>fNdw|y|2@X;MFNLqj zh4X_d3|sI_$k;6?0+0I z%sI03w8qS3J1#W9o)+K=fd6we-v=xJ$59y24&aYQ^E97H$6$qIPSAQ0hid}*^&$R3 zC?4B9cYZe!e!i}zb9tb99m_)?){g?PS#Ix|ZKOW3kIJ2zv{>$hlQaWaCq;|&xQEy_q0{G zaVejw|I$`Ayy&A@-1Mk5??>}xfDP|QABoB3yrYl!R&sr}2flZJUW2dz(c`?; zs?_xe$3t52FN8NJX(E}$&!|$Jp>RLKn-J!8P~3P{m0E$YyHd};3#bR21~dYiD)kP& z4S_BI14&C8YG62lZUJaVxCw9?&bHLO<01%DcyK0d>?o(>t&xuCFo zz6TBa;U1oEL;u=$MyKHN={n`35}OsrM6t|;?W)vNFkTbH^4_TUBad@YC6Pxyi;a4I z&=KpXs7Y@fah{GEsXbEjaa8%ZBN=kkgRw_e@%q!T4(44H`3zt=C=&WoYu=3J$G@uQ zEr6d53dU6+?(G^q{{dj=Tfw-!h`TTw;}GS)o*lm-hjZc zD>}Xi3El&~37mgb$Gd@(ujzOv@O0pM;Bw$pV5*)egegqFE4VfzuXsQfpb6I%fHQ!q zlhNW=srs1@uE7ltYPkw{_m?_;18^(wc3>51y$SeD;6mVwc$p3OyKA~5kB!pDsvHuo z4y2%tz^ljT_%7g*kvcy2R5U*>RmZcykB>&10nf*MYP)g3HAq(soPqdf#_ISgT;~Hf z0v}A%@qNIr;=Td*514{Y@i5{KA^uI^HsIzoog+9;p{^z*%m%n|gX)@yFty98?{d5i z;qE_jd>L>*uI<1jwH&`4c-ea#?*jf1_cs8KL;NOS6|M_`-^4Xlaw5_xjf%fo#Gh}# z2R!A#hxju}`4`jzm<8Sq+=T=`KdR&7aeW>5Ca%XF)A4&LL*N=<&+*`gya-&6>xu6N z$0xmnUeKCHFNo$xSc3UJ15D3X7U=jU;E0FO>J9`BBS0ApeH6_IoQH&GD8Y~KW=NUR zz@U{>k3unk{YXRc3{B&qn|+A80-#o;TN{wB2G9g>0o(w3t^&9X;Aq63M3I2c0JVU6 zKo`LLF_vWDY&>upxEgQ_-~^ZesQ>|x1;_?u0?dF6KrSF1Pykp8C<9mlg@B6F=u1cO z`A$bW_;(PPhlumQ*}wtdbl{oCIKB#aGq3>c0WJi-3Ty|CIK}Z!;F#ka&jT+4t_I$L z_*CH7_c?w)um{)*9C3o<djfz7G+Pf57nzk>F+Ey}*ZobAi7C zRt79GHsP9@)eypKLbxb|>0bC}{t%tgtK;p!x6bN#D=^)&h431}(-3hw6j2bu;S36K zJq{0sulEHwem)@2&+&TzV#_*iusCt7KH!M^E4~82^bsar;39w-a13w-*_;8M2WUsQ z50HrPIp9V>1;P?=DxMVp@qi1sZlZWVA>aaFJD?B1;=T*G4X__@?yu3=ybl4M05{u# z*8r9RssM)odjVyD8h`<5^uQT_)W1fHH}2CS9_EfshJ1~1K* zjfkhX8l;Is{Ca>BKr_x6#OV=E1k@tz26O>V0?H6)1K0uexXuL523$cn9k>s;5V+vu z=q$bw7rD5&3G4=rRq6N|;O_@w-9g--`e3^i16L!yM>_<@3a3u9C>T9{;F0yGflrRh_`B)JOq1^m9aH5>>fsOr820d$R(;K_co_b>wZ^X%ndVcKb zxY#A;#ZHl%tDlu}JYCE8->2oj8mGOPY@BN_&Nmo8W8J2^Tj4L zACVM0OUwU+HI}f(SJ?z@Zqx7_Eqe9bfvSarH?ro(hO5B{{1|dDO$2My#7BOQS1g*U z<@c}&s%g}Y 2000) + { + g_tVar.DelayOpenUSB = 0; + + usbd_CloseCDC(); + usbd_OpenCDC(COM_USB1); /* 启用USB虚拟串口8, 用于和PC软件USB通信 */ + } + } +} + /* ********************************************************************************************************* * 函 数 名: NextStatus diff --git a/User/app/src/status_esp32.c b/User/app/src/status_esp32.c new file mode 100644 index 0000000..3da5c13 --- /dev/null +++ b/User/app/src/status_esp32.c @@ -0,0 +1,110 @@ +/* +********************************************************************************************************* +* +* 模块名称 : ESP32 WIFI模块固件升级状态 +* 文件名称 : status_system_set.c +* 版 本 : V1.0 +* 说 明 : 实现USB虚拟串口,PC串口可以直连到ESP32 WiFi模块,用于固件升级 +* 修改记录 : +* 版本号 日期 作者 说明 +* V1.0 2018-12-06 armfly 正式发布 +* +* Copyright (C), 2018-2030, 安富莱电子 www.armfly.com +* +********************************************************************************************************* +*/ +#include "includes.h" + +/* +********************************************************************************************************* +* 函 数 名: status_ESP32Test +* 功能说明: esp32测试 +* 形 参: 无 +* 返 回 值: 无 +********************************************************************************************************* +*/ +void status_ESP32Test(void) +{ + uint8_t ucKeyCode; /* 按键代码 */ + uint8_t fRefresh; + uint8_t isp_flag = 0; + + DispHeader2(92, "ESP32固件升级"); + DispHelpBar("S键切换模式", + ""); + + usbd_CloseCDC(); + usbd_OpenCDC(COM4); + + //bsp_InitESP32(); + + ESP32_EnterISP(); + isp_flag = 1; + + wifi_state = WIFI_STOP; + + fRefresh = 1; + while (g_MainStatus == MS_ESP32_TEST) + { + bsp_Idle(); + + if (fRefresh == 1) /* 刷新整个界面 */ + { + fRefresh = 0; + + if (isp_flag == 0) + { + DispInfoBar16(1, "当前模式:", "AT指令 "); + } + else + { + DispInfoBar16(1, "当前模式:", "ISP升级"); + } + } + + ucKeyCode = bsp_GetKey(); /* 读取键值, 无键按下时返回 KEY_NONE = 0 */ + if (ucKeyCode != KEY_NONE) + { + /* 有键按下 */ + switch (ucKeyCode) + { + case KEY_UP_S: /* S键 弹起 */ + PlayKeyTone(); + + if (isp_flag == 0) + { + isp_flag = 1; + + ESP32_EnterISP(); + } + else + { + isp_flag = 0; + + ESP32_EnterAT(); + } + fRefresh = 1; + break; + + case KEY_UP_C: /* C键 下 */ + fRefresh = 1; + break; + + case KEY_LONG_DOWN_S: /* S键 上 */ + break; + + case KEY_LONG_DOWN_C: /* C键长按 */ + PlayKeyTone(); + g_MainStatus = MS_SYSTEM_SET; + break; + + default: + break; + } + } + } + usbd_CloseCDC(); + usbd_OpenCDC(COM_USB_PC); /* 启用USB虚拟串口 */ +} + +/***************************** 安富莱电子 www.armfly.com (END OF FILE) *********************************/ diff --git a/User/app/src/status_file_mange.c b/User/app/src/status_file_mange.c new file mode 100644 index 0000000..42c1dd0 --- /dev/null +++ b/User/app/src/status_file_mange.c @@ -0,0 +1,639 @@ +/* +********************************************************************************************************* +* +* 模块名称 : 数据维护状态 +* 文件名称 : status_file_mange.c +* 版 本 : V1.0 +* 说 明 : 写字库,升级boot +* 修改记录 : +* 版本号 日期 作者 说明 +* V1.0 2018-12-06 armfly 正式发布 +* +* Copyright (C), 2018-2030, 安富莱电子 www.armfly.com +* +********************************************************************************************************* +*/ +#include "includes.h" + +ALIGN_32BYTES(uint8_t qspi_file_buf[1024]); +ALIGN_32BYTES(uint8_t qspi_read_buf[1024]); + +static void FM_WirteFont(void); +static void FM_WirteBoot(void); +static void FM_WirteQspiApp(void); + +/* +********************************************************************************************************* +* 函 数 名: status_FileManage +* 功能说明: 文件管理,维护。写字库,刷boot。 +* 形 参: 无 +* 返 回 值: 无 +********************************************************************************************************* +*/ +/* 按钮坐标定义 */ +#define BTN1_X 5 +#define BTN1_Y 50 +#define BTN1_H 28 +#define BTN1_W 100 +#define BTN1_TEXT "写QSPI字库" + +#define BTN2_X BTN1_X +#define BTN2_Y BTN1_Y + BTN1_H + 5 +#define BTN2_H BTN1_H +#define BTN2_W BTN1_W +#define BTN2_TEXT "刷新boot" + +#define BTN3_X BTN1_X +#define BTN3_Y BTN1_Y + 2 * (BTN1_H + 5) +#define BTN3_H BTN1_H +#define BTN3_W BTN1_W +#define BTN3_TEXT "写QSPI App" + +#define BTN4_X (5 + 120) +#define BTN4_Y BTN1_Y +#define BTN4_H BTN1_H +#define BTN4_W BTN1_W +#define BTN4_TEXT "----" + +#define BTN5_X BTN4_X +#define BTN5_Y BTN1_Y + BTN1_H + 5 +#define BTN5_H BTN1_H +#define BTN5_W BTN1_W +#define BTN5_TEXT "----" + +#define BTN6_X BTN4_X +#define BTN6_Y BTN1_Y + 2 * (BTN1_H + 5) +#define BTN6_H BTN1_H +#define BTN6_W BTN1_W +#define BTN6_TEXT "----" + +#define BTN_NUM 6 + +void status_FileManage(void) +{ + uint8_t ucKeyCode; /* 按键代码 */ + uint8_t fRefresh; + FONT_T tFont16; + uint8_t cursor = 0; + BUTTON_T btn1, btn2, btn3, btn4, btn5, btn6; + + DispHeader2(94, "数据维护"); +// DispHelpBar("S、C键短按切换焦点", +// "S键长按执行"); + + /* 设置字体参数 */ + { + tFont16.FontCode = FC_ST_16; /* 字体代码 16点阵 */ + tFont16.FrontColor = INFO_NAME_COLOR; /* 字体颜色 */ + tFont16.BackColor = CL_MASK; /* 文字背景颜色 */ + tFont16.Space = 0; /* 文字间距,单位 = 像素 */ + } + + fRefresh = 1; + while (g_MainStatus == MS_FILE_MANAGE) + { + /* PC机控制刷新boot */ + if (g_tVar.ReqWriteBoot == 1) + { + g_tVar.ReqWriteBoot = 0; + + cursor = 1; + fRefresh = 1; + + //BEEP_Start(5, 5, 1); + bsp_PutKey(KEY_DB_S); /* 任意发一个本状态无用的按键消息,重开背光 */ + bsp_PutKey(KEY_LONG_DOWN_S); /* 触发写boot */ + } + + if (fRefresh) /* 刷新整个界面 */ + { + fRefresh = 0; + + { + btn1.Left = BTN1_X; + btn1.Top = BTN1_Y; + btn1.Height = BTN1_H; + btn1.Width = BTN1_W; + btn1.pCaption = BTN1_TEXT; + btn1.Font = &tFont16; + btn1.Focus = 0; + + btn2.Left = BTN2_X; + btn2.Top = BTN2_Y; + btn2.Height = BTN2_H; + btn2.Width = BTN2_W; + btn2.pCaption = BTN2_TEXT; + btn2.Font = &tFont16; + btn2.Focus = 0; + + btn3.Left = BTN3_X; + btn3.Top = BTN3_Y; + btn3.Height = BTN3_H; + btn3.Width = BTN3_W; + btn3.pCaption = BTN3_TEXT; + btn3.Font = &tFont16; + btn3.Focus = 0; + + btn4.Left = BTN4_X; + btn4.Top = BTN4_Y; + btn4.Height = BTN4_H; + btn4.Width = BTN4_W; + btn4.pCaption = BTN4_TEXT; + btn4.Font = &tFont16; + btn4.Focus = 0; + + btn5.Left = BTN5_X; + btn5.Top = BTN5_Y; + btn5.Height = BTN5_H; + btn5.Width = BTN5_W; + btn5.pCaption = BTN5_TEXT; + btn5.Font = &tFont16; + btn5.Focus = 0; + + btn6.Left = BTN6_X; + btn6.Top = BTN6_Y; + btn6.Height = BTN6_H; + btn6.Width = BTN6_W; + btn6.pCaption = BTN6_TEXT; + btn6.Font = &tFont16; + btn6.Focus = 0; + + if (cursor == 0) btn1.Focus = 1; + else if (cursor == 1) btn2.Focus = 1; + else if (cursor == 2) btn3.Focus = 1; + else if (cursor == 3) btn4.Focus = 1; + else if (cursor == 4) btn5.Focus = 1; + else if (cursor == 5) btn6.Focus = 1; + + LCD_DrawButton(&btn1); + LCD_DrawButton(&btn2); + LCD_DrawButton(&btn3); + LCD_DrawButton(&btn4); + LCD_DrawButton(&btn5); + LCD_DrawButton(&btn6); + } + } + + bsp_Idle(); + + + ucKeyCode = bsp_GetKey(); /* 读取键值, 无键按下时返回 KEY_NONE = 0 */ + if (ucKeyCode != KEY_NONE) + { + /* 有键按下 */ + switch (ucKeyCode) + { + case KEY_UP_S: /* S键释放 - 移动按钮焦点*/ + if (++cursor == BTN_NUM) + { + cursor = 0; + } + fRefresh = 1; + break; + + case KEY_UP_C: /* C键释放 - 确认执行按钮功能 */ + if (cursor > 0) + { + cursor--; + } + else + { + cursor = BTN_NUM - 1; + } + fRefresh = 1; + break; + + case KEY_LONG_DOWN_S: /* S键长按 - 确认后,闪烁,修改参数 */ + if (cursor == 0) + { + FM_WirteFont(); /* 写字库 */ + } + else if (cursor == 1) + { + FM_WirteBoot(); /* 写BOOT */ + } + else if (cursor == 2) + { + FM_WirteQspiApp(); /* 写QSPI App */ + } + break; + + case KEY_LONG_DOWN_C: /* C键长按 */ + g_MainStatus = MS_SYSTEM_SET; + break; + + default: + break; + } + } + } +} + +/* +********************************************************************************************************* +* 函 数 名: FM_DispFileInfo +* 功能说明: 显示文件操作信息 +* 形 参: 无 +* 返 回 值: 无 +********************************************************************************************************* +*/ +void FM_DispFileInfo(char *_str1) +{ + FONT_T tFont; /* 定义字体结构体变量 */ + + tFont.FontCode = FC_ST_16; /* 字体代码 16点阵 */ + tFont.FrontColor = HELP_TEXT_COLOR; /* 字体颜色 */ + tFont.BackColor = HELP_BACK_COLOR; /* 文字背景颜色 */ + tFont.Space = 0; /* 文字间距,单位 = 像素 */ + + LCD_DispStrEx(5, 180, _str1, &tFont, 230, 0); + ST7789_DrawScreen(); /* 硬件SPI+DMA+刷屏 */ +} + +/* +********************************************************************************************************* +* 函 数 名: FM_DispProgress +* 功能说明: 显示文件操作进度和时间 +* 形 参: _percent 百分比 +* _time1 时间ms单位 +* 返 回 值: 无 +********************************************************************************************************* +*/ +void FM_DispProgress(uint8_t _percent, uint32_t _time1) +{ + FONT_T tFont; /* 定义字体结构体变量 */ + static uint8_t s_percent = 200; + static uint32_t s_ms = 0; + char buf[10]; + + tFont.FontCode = FC_ST_16; /* 字体代码 16点阵 */ + tFont.FrontColor = HELP_TEXT_COLOR; /* 字体颜色 */ + tFont.BackColor = CL_MASK; /* 文字背景颜色 */ + tFont.Space = 0; /* 文字间距,单位 = 像素 */ + + if (s_percent == 0 || s_percent != _percent || s_ms != _time1 / 100) + { + /* 100.2 秒 */ + sprintf(buf, "%d.%d 秒", _time1 / 1000, (_time1 % 1000) / 100); + + DispProgressBar(5, 200, 24, 240 - 2 * 5, "", _percent, buf, &tFont); + +// LCD_DispStr(160, 200 + 4, buf, &tFont); + ST7789_DrawScreen(); /* 硬件SPI+DMA+刷屏 */ + + s_percent = _percent; + s_ms = _time1 / 100; + } +} + +/* +********************************************************************************************************* +* 函 数 名: FM_WirteQSPIFont +* 功能说明: 写字库 +* 形 参: 无 +* 返 回 值: 无 +********************************************************************************************************* +*/ +#define QSPI_WRITE_PAGE_SIZE 256 +#define QSPI_ERASE_SECTOR_SIZE (4 * 1024) +#define QSPI_FONT_ADDRESS ((32 - 2) * 1024 * 1024) +#define QSPI_FILE_SIZE (2 * 1024 * 1024) +#define QSPI_WRITE_PAGE_SIZE 256 +#define QSPI_ERASE_SECTOR_SIZE (4 * 1024) +#define QSPI_BEGIN_ADDRESS ((32 - 2) * 1024 * 1024) +#define QSPI_FILE_SIZE (2 * 1024 * 1024) +static void FM_WirteFont(void) +{ + uint32_t i; + FRESULT result; + uint32_t bw; + char *path = "0:/H7-TOOL/Fonts/GB2312ZK.bin"; + uint32_t FileSize; + uint32_t OffsetAddr = 0; + uint8_t percent; + int32_t time1; + + FM_DispProgress(0, 0); + /* 改程序仅在CPU 内部运行时才能执行 */ + if ((uint32_t)FM_WirteFont < 0x08000000 || (uint32_t)FM_WirteFont > 0x08100000) + { + FM_DispFileInfo("只能在CPU内部Flash执行"); + return; + } + + result = f_open(&g_file, path, FA_OPEN_EXISTING | FA_READ); + if (result != FR_OK) + { + FM_DispFileInfo("没有找到文件GB2312ZK.bin"); + goto quit1; + } + + /* 获得文件大小 */ + { + FILINFO fno; + + f_stat(path, &fno); + FileSize = fno.fsize; + + /* 文件大小 */ + if (FileSize != 2 * 1024 * 1024) + { + FM_DispFileInfo("字库文件长度必须是2MB"); + goto quit1; + } + } + + time1 = bsp_GetRunTime(); + /* 擦除 */ + FM_DispFileInfo("正在擦除QSPI Flash字库..."); + OffsetAddr = QSPI_FONT_ADDRESS; + for (i = 0; i < QSPI_FILE_SIZE / QSPI_ERASE_SECTOR_SIZE; i++) + { + QSPI_EraseSector(OffsetAddr); + OffsetAddr += QSPI_ERASE_SECTOR_SIZE; + percent = ((i + 1) * 100) / (QSPI_FILE_SIZE / QSPI_ERASE_SECTOR_SIZE); + FM_DispProgress(percent, bsp_CheckRunTime(time1)); + } + + /* 写入,每次256字节 */ + FM_DispFileInfo("正在写入..."); + percent = 0; + FM_DispProgress(percent, bsp_CheckRunTime(time1)); + OffsetAddr = QSPI_FONT_ADDRESS; + for (i = 0; i < QSPI_FILE_SIZE / 1024; i++) + { + percent = ((i + 1) * 100) / (QSPI_FILE_SIZE / 1024); + + result = f_read(&g_file, &qspi_file_buf, 1024, &bw); + if (result != FR_OK) + { + FM_DispFileInfo("文件读取失败"); + goto quit1; + } + + SCB_InvalidateDCache_by_Addr((uint32_t *)qspi_file_buf, sizeof(qspi_file_buf)); + + QSPI_WriteBuffer(qspi_file_buf, OffsetAddr, 256); + QSPI_WriteBuffer(qspi_file_buf + 256, OffsetAddr + 256, 256); + QSPI_WriteBuffer(qspi_file_buf + 2 * 256, OffsetAddr + 2 * 256, 256); + QSPI_WriteBuffer(qspi_file_buf + 3 * 256, OffsetAddr + 3 * 256, 256); + + QSPI_ReadBuffer(qspi_read_buf, OffsetAddr, 1024); + + SCB_InvalidateDCache_by_Addr((uint32_t *)qspi_read_buf, sizeof(qspi_read_buf)); + if (memcmp(qspi_file_buf, qspi_read_buf, 1024) != 0) + { + FM_DispFileInfo("写QSPI Flash出错!"); + goto quit1; + } + + OffsetAddr += 1024; + percent = ((i + 1) * 100) / (QSPI_FILE_SIZE / 1024); + FM_DispProgress(percent, bsp_CheckRunTime(time1)); + } + + FM_DispFileInfo("QSPI Flash字库成功!"); + +quit1: + /* 关闭文件*/ + f_close(&g_file); +} + +/* +********************************************************************************************************* +* 函 数 名: FM_WirteQspiApp +* 功能说明: 写QSPI APP +* 形 参: 无 +* 返 回 值: 无 +********************************************************************************************************* +*/ +#define QSPI_APP_ADDRESS 0 +static void FM_WirteQspiApp(void) +{ + uint32_t i; + FRESULT result; + uint32_t bw; + char *path = "0:/H7-TOOL/Firmware/H7-QSPI_APP.bin"; + uint32_t FileSize; + uint32_t OffsetAddr = 0; + uint8_t percent; + int32_t time1; + + FM_DispProgress(0, 0); + + /* 改程序仅在CPU 内部运行时才能执行 */ + if ((uint32_t)FM_WirteFont < 0x08000000 || (uint32_t)FM_WirteFont > 0x08100000) + { + FM_DispFileInfo("只能在CPU内部Flash执行"); + return; + } + + result = f_open(&g_file, path, FA_OPEN_EXISTING | FA_READ); + if (result != FR_OK) + { + FM_DispFileInfo("没有找到文件H7-QSPI_APP.bin"); + goto quit1; + } + + /* 获得文件大小 */ + { + FILINFO fno; + + f_stat(path, &fno); + FileSize = fno.fsize; + + /* 文件大小 */ + if (FileSize > 30 * 1024 * 1024) + { + FM_DispFileInfo("文件长度必须小于30MB"); + goto quit1; + } + } + + time1 = bsp_GetRunTime(); + /* 擦除 */ + FM_DispFileInfo("正在擦除QSPI Flash..."); + OffsetAddr = QSPI_APP_ADDRESS; + for (i = 0; i < (FileSize + QSPI_ERASE_SECTOR_SIZE - 1) / QSPI_ERASE_SECTOR_SIZE; i++) + { + QSPI_EraseSector(OffsetAddr); + OffsetAddr += QSPI_ERASE_SECTOR_SIZE; + percent = ((i + 1) * 100) / ((FileSize + QSPI_ERASE_SECTOR_SIZE - 1) / QSPI_ERASE_SECTOR_SIZE); + FM_DispProgress(percent, bsp_CheckRunTime(time1)); + } + + /* 写入,每次256字节 */ + FM_DispFileInfo("正在写入..."); + percent = 0; + FM_DispProgress(percent, bsp_CheckRunTime(time1)); + OffsetAddr = QSPI_APP_ADDRESS; + for (i = 0; i < (FileSize + 1024 - 1) / 1024; i++) + { + percent = ((i + 1) * 100) / ((FileSize + 1024 - 1) / 1024); + + memset(qspi_file_buf, 0, 1024); /* 末尾填0 */ + result = f_read(&g_file, &qspi_file_buf, 1024, &bw); + if (result != FR_OK) + { + FM_DispFileInfo("文件读取失败"); + goto quit1; + } + + + SCB_InvalidateDCache_by_Addr((uint32_t *)qspi_file_buf, sizeof(qspi_file_buf)); + + QSPI_WriteBuffer(qspi_file_buf, OffsetAddr, 256); + QSPI_WriteBuffer(qspi_file_buf + 256, OffsetAddr + 256, 256); + QSPI_WriteBuffer(qspi_file_buf + 2 * 256, OffsetAddr + 2 * 256, 256); + QSPI_WriteBuffer(qspi_file_buf + 3 * 256, OffsetAddr + 3 * 256, 256); + + QSPI_ReadBuffer(qspi_read_buf, OffsetAddr, 1024); + + SCB_InvalidateDCache_by_Addr((uint32_t *)qspi_read_buf, sizeof(qspi_read_buf)); + if (memcmp(qspi_file_buf, qspi_read_buf, 1024) != 0) + { + FM_DispFileInfo("写QSPI Flash出错!"); + goto quit1; + } + + OffsetAddr += 1024; + percent = ((i + 1) * 100) / ((FileSize + 1024 - 1) / 1024); + FM_DispProgress(percent, bsp_CheckRunTime(time1)); + } + + FM_DispFileInfo("写QSPI Flash成功!"); + +quit1: + /* 关闭文件*/ + f_close(&g_file); +} + +/* +********************************************************************************************************* +* 函 数 名: FM_WirteBoot +* 功能说明: 写BOOT +* 形 参: 无 +* 返 回 值: 无 +********************************************************************************************************* +*/ +#define BOOT_BEGIN_ADDRESS 0x08000000 +static void FM_WirteBoot(void) +{ + uint32_t i; + FRESULT result; + uint32_t bw; + char *path = "0:/H7-TOOL/Firmware/H7-BOOT.bin"; + uint32_t FileSize; + uint32_t OffsetAddr = 0; + uint8_t percent; + int32_t time1; + + FM_DispProgress(0, 0); + result = f_open(&g_file, path, FA_OPEN_EXISTING | FA_READ); + if (result != FR_OK) + { + FM_DispFileInfo("没有找到文件H7-BOOT.bin"); + goto quit1; + } + + /* 获得文件大小 */ + { + FILINFO fno; + + f_stat(path, &fno); + FileSize = fno.fsize; + + /* 文件大小 */ + if (FileSize > 128 * 1024) + { + FM_DispFileInfo("文件长度大于128KB"); + goto quit1; + } + } + + /* 简单判断下文件是否boot固件 */ + { + result = f_read(&g_file, &qspi_file_buf, 512, &bw); + if (result != FR_OK) + { + FM_DispFileInfo("文件读取失败"); + goto quit1; + } + + SCB_InvalidateDCache_by_Addr((uint32_t *)qspi_file_buf, 512); + // 0x2408EDF8 0x080002AD + // 0x20020000 0x080002AD + if ((qspi_file_buf[3] == 0x24 || qspi_file_buf[3] == 0x20) + && (qspi_file_buf[7] == 0x08) && (qspi_file_buf[6] == 0x00)) + { + /* 合法固件 */; + } + else + { + FM_DispFileInfo("不是固件文件"); + goto quit1; + } + + /* 还原文件指针到开头 */ + f_lseek(&g_file, 0); + } + + time1 = bsp_GetRunTime(); + + /* 擦除 */ + FM_DispFileInfo("正在擦除Flash..."); + percent = 0; + FM_DispProgress(percent, bsp_CheckRunTime(time1)); + OffsetAddr = BOOT_BEGIN_ADDRESS; + if (bsp_EraseCpuFlash(BOOT_BEGIN_ADDRESS) != HAL_OK) + { + percent = 100; + FM_DispProgress(percent, bsp_CheckRunTime(time1)); + } + + /* 写入,每次1024字节 */ + FM_DispFileInfo("正在写入..."); + percent = 0; + FM_DispProgress(percent, bsp_CheckRunTime(time1)); + OffsetAddr = BOOT_BEGIN_ADDRESS; + for (i = 0; i < (FileSize + 1023) / 1024; i++) + { + percent = ((i + 1) * 100) / ((FileSize + 1023) / 1024); + + memset(qspi_file_buf, 0, 1024); /* 末尾填0 */ + result = f_read(&g_file, &qspi_file_buf, 1024, &bw); + if (result != FR_OK) + { + FM_DispFileInfo("文件读取失败"); + goto quit1; + } + + SCB_InvalidateDCache_by_Addr((uint32_t *)qspi_file_buf, sizeof(qspi_file_buf)); + + if (bsp_WriteCpuFlash(OffsetAddr, qspi_file_buf, 1024) == 0) /* 每次写入1024个字节 */ + { + if (memcmp((uint8_t *)OffsetAddr, qspi_file_buf, 1024) != 0) + { + FM_DispFileInfo("写CPU Flash出错!"); + goto quit1; + } + } + else + { + FM_DispFileInfo("写CPU Flash出错!"); + goto quit1; + } + + OffsetAddr += 1024; + percent = ((i + 1) * 100) / ((FileSize + 1023) / 1024); + FM_DispProgress(percent, bsp_CheckRunTime(time1)); + } + + FM_DispFileInfo("Boot写入成功!"); + +quit1: + /* 关闭文件*/ + f_close(&g_file); +} + +/***************************** 安富莱电子 www.armfly.com (END OF FILE) *********************************/ diff --git a/User/app/src/status_hard_info.c b/User/app/src/status_hard_info.c new file mode 100644 index 0000000..f80c5e6 --- /dev/null +++ b/User/app/src/status_hard_info.c @@ -0,0 +1,231 @@ +/* +********************************************************************************************************* +* +* 模块名称 : 显示硬件信息状态 +* 文件名称 : status_hard_info.c +* 版 本 : V1.0 +* 说 明 : 显示CPU型号,外围硬件信息,版本号等 +* 修改记录 : +* 版本号 日期 作者 说明 +* V1.0 2018-12-06 armfly 正式发布 +* +* Copyright (C), 2018-2030, 安富莱电子 www.armfly.com +* +********************************************************************************************************* +*/ +#include "includes.h" + +/* +********************************************************************************************************* +* 函 数 名: status_HardInfo +* 功能说明: 硬件信息测试 +* 形 参: 无 +* 返 回 值: 无 +********************************************************************************************************* +*/ +extern int32_t ETH_PHY_IO_ReadReg(uint32_t DevAddr, uint32_t RegAddr, uint32_t *pRegVal); +void status_HardInfo(void) +{ + uint8_t ucKeyCode; /* 按键代码 */ + char buf[128]; + uint8_t line = 0; + + DispHeader2(91, "硬件信息"); + + /* 检测CPU ID */ + { + uint32_t id[3]; + + bsp_GetCpuID(id); + + sprintf(buf, "STM32H750IBK6 %dMHz", SystemCoreClock / 1000000); + DispInfoBar16(line++, "CPU:", buf); + + sprintf(buf, "%08X %08X %08X", id[0], id[1], id[2]); + DispInfoBar16(line++, " ", buf); + } + + /* 显示TFT控制器型号和屏幕分辨率 */ + { + sprintf(buf, "ST7789 / 240x240"); + DispInfoBar16(line++, "LCD:", buf); + } + + /* 测试eMMC */ + { + BSP_MMC_CardInfo CardInfo; + + BSP_MMC_Init(); + BSP_MMC_GetCardInfo(&CardInfo); + + /* CardInfo.LogBlockSize = 512 */ + if (CardInfo.LogBlockSize == 512) + { + uint32_t kb; + + kb = CardInfo.LogBlockNbr / 2; + sprintf(buf, "%d.%02dGB Ok", kb / (1024 * 1024), (kb % (1024 * 1024)) / 10000); + DispInfoBar16(line++, "eMMC:", buf); + } + else + { + sprintf(buf, "Error, BlockSize %d", CardInfo.LogBlockSize); + DispInfoBar16Ex(line++, "eMMC:", buf, CL_RED); + } + } + + /* 测试I2C设备 */ + { + if (i2c_CheckDevice(EE_DEV_ADDR) == 0) + { + sprintf(buf, "24C16 Ok (0x%02X)", EE_DEV_ADDR); + DispInfoBar16(line++, "EEPROM:", buf); + } + else + { + sprintf(buf, "24C16 Err (0x%02X)", EE_DEV_ADDR); + DispInfoBar16Ex(line++, "EEPROM:", buf, CL_RED); + } + + if (i2c_CheckDevice(MCP4018_SLAVE_ADDRESS) == 0) + { + sprintf(buf, "MCP4018 Ok (0x%02X)", MCP4018_SLAVE_ADDRESS); + DispInfoBar16(line++, "POT:", buf); + } + else + { + sprintf(buf, "MCP4018 Err (0x%02X)", MCP4018_SLAVE_ADDRESS); + DispInfoBar16Ex(line++, "POT:", buf, CL_RED); + } + } + + /* QSPI检测 */ + { + uint32_t id; + char name[32]; + + bsp_InitQSPI_W25Q256(); + + id = QSPI_ReadID(); + + if (id == W25Q64_ID) + { + strcpy(name, "W25Q64"); + } + else if (id == W25Q128_ID) + { + strcpy(name, "W25Q128"); + } + else if (id == W25Q256_ID) + { + strcpy(name, "W25Q256"); + } + else + { + strcpy(name, "UNKNOW"); + } + + /* 检测串行Flash OK */ + if (id == W25Q256_ID) + { + sprintf(buf, "W25Q256 Ok, %08X", id); + DispInfoBar16(line++, "QSPI:", buf); + } + else + { + sprintf(buf, "QSPI : W25Q256 Err, %08X", id); + DispInfoBar16Ex(line++, "QSPI:", buf, CL_RED); + } + } + + /* 以太网MAC */ + { + uint32_t PhyID[2]; + + /* + PhyID[0].15:0 = OUI:3:18 + PhyID[1].15:10 = OUI.24:19 + + + 、【开模 + PhyID[1].9:4 = Model Number + PhyID[1].3:0 = Revision Number + */ + ETH_PHY_IO_ReadReg(0, 2, &PhyID[0]); + ETH_PHY_IO_ReadReg(0, 3, &PhyID[1]); + + if (((PhyID[1] >> 4) & 0x2F) == 0x0F) + { + sprintf(buf, "LAN8720 Ok"); + DispInfoBar16(line++, "Eth Phy:", buf); + } + else + { + sprintf(buf, "LAN8720 Error"); + DispInfoBar16Ex(line++, "Eth Phy:", buf, CL_RED); + } + } + + /* WiFi MAC */ + { + //uint16_t mac[6]; + + //ESP32_GetMac(&mac); + } + + /* 固件版本 */ + { + sprintf(buf, "%d.%02X", BOOT_VERSION >> 8, BOOT_VERSION & 0xFF); + DispInfoBar16(line++, "Boot Ver:", buf); + + sprintf(buf, "%d.%02X", APP_VERSION >> 8, APP_VERSION & 0xFF); + DispInfoBar16(line++, "App Ver:", buf); + } + + bsp_StartAutoTimer(0, 1000); + while (g_MainStatus == MS_HARD_INFO) + { + bsp_Idle(); + + /* 显示时钟 */ + if (bsp_CheckTimer(0)) + { + FONT_T tFont; + uint16_t x, y; + + tFont.FontCode = FC_ST_16; /* 字体代码 16点阵 */ + tFont.FrontColor = CL_WHITE; /* 字体颜色 */ + tFont.BackColor = HEAD_BACK_COLOR; /* 文字背景颜色 */ + tFont.Space = 0; /* 文字间距,单位 = 像素 */ + + RTC_ReadClock(); /* 读时钟,结果在 g_tRTC */ + + x = 5; + y = LCD_GetHeight() - 20; + + sprintf(buf, "%4d-%02d-%02d %02d:%02d:%02d", + g_tRTC.Year, g_tRTC.Mon, g_tRTC.Day, g_tRTC.Hour, g_tRTC.Min, g_tRTC.Sec); + LCD_DispStr(x, y, buf, &tFont); + } + + ucKeyCode = bsp_GetKey(); /* 读取键值, 无键按下时返回 KEY_NONE = 0 */ + if (ucKeyCode != KEY_NONE) + { + /* 有键按下 */ + switch (ucKeyCode) + { + case KEY_UP_C: /* C键 下 */ + break; + + case KEY_LONG_DOWN_C: /* C键长按 */ + PlayKeyTone(); + g_MainStatus = MS_SYSTEM_SET; + break; + + default: + break; + } + } + } +} + +/***************************** 安富莱电子 www.armfly.com (END OF FILE) *********************************/ diff --git a/User/app/src/status_link_mode.c b/User/app/src/status_link_mode.c index 647af40..be1e36b 100755 --- a/User/app/src/status_link_mode.c +++ b/User/app/src/status_link_mode.c @@ -25,7 +25,10 @@ #define TIME_X 120 - (5 * 16 / 2) #define TIME_Y DATE_Y + 30 -#define RJ45_IP_X (240 - 20 * 8) +#define USB_X 5 +#define USB_Y TIME_Y + 90 + +#define RJ45_IP_X (240 - 20 * 9) #define RJ45_IP_Y TIME_Y + 90 #define WIFI_IP_X RJ45_IP_X @@ -38,6 +41,7 @@ #define APP_VER_Y 222 static void DispLinkStatus(void); +static void DispAppVer(void); static void DispClock(void); /* @@ -57,6 +61,7 @@ void status_LinkMode(void) DispHeader("联机模式"); DispHelpBar("长按S进入扩展功能", "长按C切换方向"); + DispAppVer(); // usbd_CloseCDC(); // usbd_OpenCDC(COM_USB1); /* 启用USB虚拟串口8, 用于和PC软件USB通信 */ @@ -85,6 +90,8 @@ void status_LinkMode(void) LastMinute = g_tRTC.Min; DispClock(); /* 显示时钟 */ } + + DispLinkStatus(); } bsp_Idle(); @@ -150,6 +157,46 @@ void status_LinkMode(void) bsp_StopTimer(0); } +/* +********************************************************************************************************* +* 函 数 名: PCCommTimeout +* 功能说明: 收到PC机最后一包数据,超时3秒后执行这个函数 +* 形 参: 无 +* 返 回 值: 无 +********************************************************************************************************* +*/ +void PCCommTimeout(void) +{ + g_tVar.LinkState = LINK_NONE; +} + +/* +********************************************************************************************************* +* 函 数 名: DispAppVer +* 功能说明: 显示固件版本 +* 形 参: 无 +* 返 回 值: 无 +********************************************************************************************************* +*/ +static void DispAppVer(void) +{ + FONT_T tFont; + char buf[48]; + + /* 设置字体参数 */ + { + tFont.FontCode = FC_ST_16; /* 字体代码 16点阵 */ + tFont.FrontColor = HELP_TEXT_COLOR; /* 字体颜色 */ + tFont.BackColor = INFO_BACK_COLOR; /* 文字背景颜色 */ + tFont.Space = 0; /* 文字间距,单位 = 像素 */ + } + + /* 显示APP版本 */ + tFont.FrontColor = HELP_TEXT_COLOR; + tFont.BackColor = HELP_BACK_COLOR; + sprintf(buf, "V%d.%02X", APP_VERSION >> 8, APP_VERSION & 0xFF); + LCD_DispStr(APP_VER_X, APP_VER_Y, buf, &tFont); +} /* ********************************************************************************************************* @@ -171,23 +218,55 @@ static void DispLinkStatus(void) tFont.BackColor = INFO_BACK_COLOR; /* 文字背景颜色 */ tFont.Space = 0; /* 文字间距,单位 = 像素 */ } - + + /* USB连接状态 */ + if (g_tVar.LinkState == LINK_USB_OK) + { + tFont.FrontColor = CL_GREEN; + LCD_DispStr(USB_X, USB_Y, "●", &tFont); + tFont.FrontColor = HELP_TEXT_COLOR; + } + else + { + tFont.FrontColor = HELP_TEXT_COLOR; + LCD_DispStr(USB_X, USB_Y, "●", &tFont); + } + tFont.FrontColor = HELP_TEXT_COLOR; + LCD_DispStr(USB_X + 20, USB_Y, "USB", &tFont); + + + /* RJ45连接状态 */ + if (g_tVar.LinkState == LINK_RJ45_OK) + { + tFont.FrontColor = CL_GREEN; + LCD_DispStr(RJ45_IP_X, RJ45_IP_Y, "●", &tFont); + tFont.FrontColor = HELP_TEXT_COLOR; + } + else + { + tFont.FrontColor = HELP_TEXT_COLOR; + LCD_DispStr(RJ45_IP_X, RJ45_IP_Y, "●", &tFont); + } + tFont.FrontColor = HELP_TEXT_COLOR; sprintf(buf, "RJ45 %d.%d.%d.%d", g_tParam.LocalIPAddr[0], g_tParam.LocalIPAddr[1], g_tParam.LocalIPAddr[2], g_tParam.LocalIPAddr[3]); - LCD_DispStr(RJ45_IP_X, RJ45_IP_Y, buf, &tFont); + LCD_DispStr(RJ45_IP_X + 20, RJ45_IP_Y, buf, &tFont); + /* WIFI连接状态 */ + if (g_tVar.LinkState == LINK_WIFI_OK) + { + tFont.FrontColor = CL_GREEN; + LCD_DispStr(WIFI_IP_X, WIFI_IP_Y, "●", &tFont); + tFont.FrontColor = HELP_TEXT_COLOR; + } + else + { + tFont.FrontColor = HELP_TEXT_COLOR; + LCD_DispStr(RJ45_IP_X, WIFI_IP_Y, "●", &tFont); + } sprintf(buf, "WiFi %d.%d.%d.%d", g_tParam.WiFiIPAddr[0], g_tParam.WiFiIPAddr[1], g_tParam.WiFiIPAddr[2], g_tParam.WiFiIPAddr[3]); - LCD_DispStr(WIFI_IP_X, WIFI_IP_Y, buf, &tFont); - -// sprintf(buf, "端口号:%d", g_tParam.LocalTCPPort); -// LCD_DispStr(UDP_PORT_X, UDP_PORT_Y, buf, &tFont); - - /* 显示APP版本 */ - tFont.FrontColor = HELP_TEXT_COLOR; - tFont.BackColor = HELP_BACK_COLOR; - sprintf(buf, "V%d.%02X", APP_VERSION >> 8, APP_VERSION & 0xFF); - LCD_DispStr(APP_VER_X, APP_VER_Y, buf, &tFont); + LCD_DispStr(WIFI_IP_X + 20, WIFI_IP_Y, buf, &tFont); } /* diff --git a/User/app/src/status_system_set.c b/User/app/src/status_system_set.c index 050cdbe..6e1aeae 100755 --- a/User/app/src/status_system_set.c +++ b/User/app/src/status_system_set.c @@ -30,14 +30,6 @@ const uint8_t *g_MenuSys_Text[] = MENU_T g_tMenuSys; -ALIGN_32BYTES(uint8_t qspi_file_buf[1024]); -ALIGN_32BYTES(uint8_t qspi_read_buf[1024]); - -static void FM_WirteFont(void); -static void FM_WirteBoot(void); -static void FM_WirteQspiApp(void); - - /* ********************************************************************************************************* * 函 数 名: status_SystemSetMain @@ -164,965 +156,4 @@ void status_SystemSetMain(void) } } -/* -********************************************************************************************************* -* 函 数 名: status_HardInfo -* 功能说明: 硬件信息测试 -* 形 参: 无 -* 返 回 值: 无 -********************************************************************************************************* -*/ -extern int32_t ETH_PHY_IO_ReadReg(uint32_t DevAddr, uint32_t RegAddr, uint32_t *pRegVal); -void status_HardInfo(void) -{ - uint8_t ucKeyCode; /* 按键代码 */ - char buf[128]; - uint8_t line = 0; - - DispHeader2(91, "硬件信息"); - - /* 检测CPU ID */ - { - uint32_t id[3]; - - bsp_GetCpuID(id); - - sprintf(buf, "STM32H750IBK6 %dMHz", SystemCoreClock / 1000000); - DispInfoBar16(line++, "CPU:", buf); - - sprintf(buf, "%08X %08X %08X", id[0], id[1], id[2]); - DispInfoBar16(line++, " ", buf); - } - - /* 显示TFT控制器型号和屏幕分辨率 */ - { - sprintf(buf, "ST7789 / 240x240"); - DispInfoBar16(line++, "LCD:", buf); - } - - /* 测试eMMC */ - { - BSP_MMC_CardInfo CardInfo; - - BSP_MMC_Init(); - BSP_MMC_GetCardInfo(&CardInfo); - - /* CardInfo.LogBlockSize = 512 */ - if (CardInfo.LogBlockSize == 512) - { - uint32_t kb; - - kb = CardInfo.LogBlockNbr / 2; - sprintf(buf, "%d.%02dGB Ok", kb / (1024 * 1024), (kb % (1024 * 1024)) / 10000); - DispInfoBar16(line++, "eMMC:", buf); - } - else - { - sprintf(buf, "Error, BlockSize %d", CardInfo.LogBlockSize); - DispInfoBar16Ex(line++, "eMMC:", buf, CL_RED); - } - } - - /* 测试I2C设备 */ - { - if (i2c_CheckDevice(EE_DEV_ADDR) == 0) - { - sprintf(buf, "24C16 Ok (0x%02X)", EE_DEV_ADDR); - DispInfoBar16(line++, "EEPROM:", buf); - } - else - { - sprintf(buf, "24C16 Err (0x%02X)", EE_DEV_ADDR); - DispInfoBar16Ex(line++, "EEPROM:", buf, CL_RED); - } - - if (i2c_CheckDevice(MCP4018_SLAVE_ADDRESS) == 0) - { - sprintf(buf, "MCP4018 Ok (0x%02X)", MCP4018_SLAVE_ADDRESS); - DispInfoBar16(line++, "POT:", buf); - } - else - { - sprintf(buf, "MCP4018 Err (0x%02X)", MCP4018_SLAVE_ADDRESS); - DispInfoBar16Ex(line++, "POT:", buf, CL_RED); - } - } - - /* QSPI检测 */ - { - uint32_t id; - char name[32]; - - bsp_InitQSPI_W25Q256(); - - id = QSPI_ReadID(); - - if (id == W25Q64_ID) - { - strcpy(name, "W25Q64"); - } - else if (id == W25Q128_ID) - { - strcpy(name, "W25Q128"); - } - else if (id == W25Q256_ID) - { - strcpy(name, "W25Q256"); - } - else - { - strcpy(name, "UNKNOW"); - } - - /* 检测串行Flash OK */ - if (id == W25Q256_ID) - { - sprintf(buf, "W25Q256 Ok, %08X", id); - DispInfoBar16(line++, "QSPI:", buf); - } - else - { - sprintf(buf, "QSPI : W25Q256 Err, %08X", id); - DispInfoBar16Ex(line++, "QSPI:", buf, CL_RED); - } - } - - /* 以太网MAC */ - { - uint32_t PhyID[2]; - - /* - PhyID[0].15:0 = OUI:3:18 - PhyID[1].15:10 = OUI.24:19 - + - 、【开模 - PhyID[1].9:4 = Model Number - PhyID[1].3:0 = Revision Number - */ - ETH_PHY_IO_ReadReg(0, 2, &PhyID[0]); - ETH_PHY_IO_ReadReg(0, 3, &PhyID[1]); - - if (((PhyID[1] >> 4) & 0x2F) == 0x0F) - { - sprintf(buf, "LAN8720 Ok"); - DispInfoBar16(line++, "Eth Phy:", buf); - } - else - { - sprintf(buf, "LAN8720 Error"); - DispInfoBar16Ex(line++, "Eth Phy:", buf, CL_RED); - } - } - - /* WiFi MAC */ - { - //uint16_t mac[6]; - - //ESP32_GetMac(&mac); - } - - /* 固件版本 */ - { - sprintf(buf, "%d.%02X", BOOT_VERSION >> 8, BOOT_VERSION & 0xFF); - DispInfoBar16(line++, "Boot Ver:", buf); - - sprintf(buf, "%d.%02X", APP_VERSION >> 8, APP_VERSION & 0xFF); - DispInfoBar16(line++, "App Ver:", buf); - } - - bsp_StartAutoTimer(0, 1000); - while (g_MainStatus == MS_HARD_INFO) - { - bsp_Idle(); - - /* 显示时钟 */ - if (bsp_CheckTimer(0)) - { - FONT_T tFont; - uint16_t x, y; - - tFont.FontCode = FC_ST_16; /* 字体代码 16点阵 */ - tFont.FrontColor = CL_WHITE; /* 字体颜色 */ - tFont.BackColor = HEAD_BACK_COLOR; /* 文字背景颜色 */ - tFont.Space = 0; /* 文字间距,单位 = 像素 */ - - RTC_ReadClock(); /* 读时钟,结果在 g_tRTC */ - - x = 5; - y = LCD_GetHeight() - 20; - - sprintf(buf, "%4d-%02d-%02d %02d:%02d:%02d", - g_tRTC.Year, g_tRTC.Mon, g_tRTC.Day, g_tRTC.Hour, g_tRTC.Min, g_tRTC.Sec); - LCD_DispStr(x, y, buf, &tFont); - } - - ucKeyCode = bsp_GetKey(); /* 读取键值, 无键按下时返回 KEY_NONE = 0 */ - if (ucKeyCode != KEY_NONE) - { - /* 有键按下 */ - switch (ucKeyCode) - { - case KEY_UP_C: /* C键 下 */ - break; - - case KEY_LONG_DOWN_C: /* C键长按 */ - PlayKeyTone(); - g_MainStatus = MS_SYSTEM_SET; - break; - - default: - break; - } - } - } -} - -/* -********************************************************************************************************* -* 函 数 名: status_ESP32Test -* 功能说明: esp32测试 -* 形 参: 无 -* 返 回 值: 无 -********************************************************************************************************* -*/ -void status_ESP32Test(void) -{ - uint8_t ucKeyCode; /* 按键代码 */ - uint8_t fRefresh; - uint8_t isp_flag = 0; - - DispHeader2(92, "ESP32固件升级"); - DispHelpBar("S键切换模式", - ""); - - usbd_CloseCDC(); - usbd_OpenCDC(COM4); - - //bsp_InitESP32(); - - ESP32_EnterISP(); - isp_flag = 1; - - wifi_state = WIFI_STOP; - - fRefresh = 1; - while (g_MainStatus == MS_ESP32_TEST) - { - bsp_Idle(); - - if (fRefresh == 1) /* 刷新整个界面 */ - { - fRefresh = 0; - - if (isp_flag == 0) - { - DispInfoBar16(1, "当前模式:", "AT指令 "); - } - else - { - DispInfoBar16(1, "当前模式:", "ISP升级"); - } - } - - ucKeyCode = bsp_GetKey(); /* 读取键值, 无键按下时返回 KEY_NONE = 0 */ - if (ucKeyCode != KEY_NONE) - { - /* 有键按下 */ - switch (ucKeyCode) - { - case KEY_UP_S: /* S键 弹起 */ - PlayKeyTone(); - - if (isp_flag == 0) - { - isp_flag = 1; - - ESP32_EnterISP(); - } - else - { - isp_flag = 0; - - ESP32_EnterAT(); - } - fRefresh = 1; - break; - - case KEY_UP_C: /* C键 下 */ - fRefresh = 1; - break; - - case KEY_LONG_DOWN_S: /* S键 上 */ - break; - - case KEY_LONG_DOWN_C: /* C键长按 */ - PlayKeyTone(); - g_MainStatus = MS_SYSTEM_SET; - break; - - default: - break; - } - } - } - usbd_CloseCDC(); - usbd_OpenCDC(COM_USB_PC); /* 启用USB虚拟串口 */ -} - -/* -********************************************************************************************************* -* 函 数 名: status_UsbEMMC -* 功能说明: USB虚拟磁盘,eMMC磁盘 -* 形 参: 无 -* 返 回 值: 无 -********************************************************************************************************* -*/ -void status_UsbEMMC(void) -{ - uint8_t ucKeyCode; /* 按键代码 */ - - DispHeader2(93, "USB eMMC磁盘"); - DispHelpBar("请在电脑操作eMMC文件", - ""); - - usbd_CloseCDC(); - usbd_OpenMassStorage(); - - DispInfoBar16(1, "USB模式:", "虚拟磁盘"); - - while (g_MainStatus == MS_USB_EMMC) - { - bsp_Idle(); - - ucKeyCode = bsp_GetKey(); /* 读取键值, 无键按下时返回 KEY_NONE = 0 */ - if (ucKeyCode != KEY_NONE) - { - /* 有键按下 */ - switch (ucKeyCode) - { - case KEY_UP_S: /* S键 弹起 */ - break; - - case KEY_UP_C: /* C键 下 */ - break; - - case KEY_LONG_DOWN_S: /* S键 上 */ - break; - - case KEY_LONG_DOWN_C: /* C键长按 */ - PlayKeyTone(); - g_MainStatus = MS_SYSTEM_SET; - break; - - default: - break; - } - } - } - - usbd_CloseMassStorage(); - - usbd_OpenCDC2(COM_USB_PC); /* 映射到串口8. 和PC软件联机 */ -} - -/* -********************************************************************************************************* -* 函 数 名: status_FileManage -* 功能说明: 文件管理,维护。写字库,刷boot。 -* 形 参: 无 -* 返 回 值: 无 -********************************************************************************************************* -*/ -/* 按钮坐标定义 */ -#define BTN1_X 5 -#define BTN1_Y 50 -#define BTN1_H 28 -#define BTN1_W 100 -#define BTN1_TEXT "写QSPI字库" - -#define BTN2_X BTN1_X -#define BTN2_Y BTN1_Y + BTN1_H + 5 -#define BTN2_H BTN1_H -#define BTN2_W BTN1_W -#define BTN2_TEXT "刷新boot" - -#define BTN3_X BTN1_X -#define BTN3_Y BTN1_Y + 2 * (BTN1_H + 5) -#define BTN3_H BTN1_H -#define BTN3_W BTN1_W -#define BTN3_TEXT "写QSPI App" - -#define BTN4_X (5 + 120) -#define BTN4_Y BTN1_Y -#define BTN4_H BTN1_H -#define BTN4_W BTN1_W -#define BTN4_TEXT "----" - -#define BTN5_X BTN4_X -#define BTN5_Y BTN1_Y + BTN1_H + 5 -#define BTN5_H BTN1_H -#define BTN5_W BTN1_W -#define BTN5_TEXT "----" - -#define BTN6_X BTN4_X -#define BTN6_Y BTN1_Y + 2 * (BTN1_H + 5) -#define BTN6_H BTN1_H -#define BTN6_W BTN1_W -#define BTN6_TEXT "----" - -#define BTN_NUM 6 - -void status_FileManage(void) -{ - uint8_t ucKeyCode; /* 按键代码 */ - uint8_t fRefresh; - FONT_T tFont16; - uint8_t cursor = 0; - BUTTON_T btn1, btn2, btn3, btn4, btn5, btn6; - - DispHeader2(94, "数据维护"); -// DispHelpBar("S、C键短按切换焦点", -// "S键长按执行"); - - /* 设置字体参数 */ - { - tFont16.FontCode = FC_ST_16; /* 字体代码 16点阵 */ - tFont16.FrontColor = INFO_NAME_COLOR; /* 字体颜色 */ - tFont16.BackColor = CL_MASK; /* 文字背景颜色 */ - tFont16.Space = 0; /* 文字间距,单位 = 像素 */ - } - - fRefresh = 1; - while (g_MainStatus == MS_FILE_MANAGE) - { - if (fRefresh) /* 刷新整个界面 */ - { - fRefresh = 0; - - { - btn1.Left = BTN1_X; - btn1.Top = BTN1_Y; - btn1.Height = BTN1_H; - btn1.Width = BTN1_W; - btn1.pCaption = BTN1_TEXT; - btn1.Font = &tFont16; - btn1.Focus = 0; - - btn2.Left = BTN2_X; - btn2.Top = BTN2_Y; - btn2.Height = BTN2_H; - btn2.Width = BTN2_W; - btn2.pCaption = BTN2_TEXT; - btn2.Font = &tFont16; - btn2.Focus = 0; - - btn3.Left = BTN3_X; - btn3.Top = BTN3_Y; - btn3.Height = BTN3_H; - btn3.Width = BTN3_W; - btn3.pCaption = BTN3_TEXT; - btn3.Font = &tFont16; - btn3.Focus = 0; - - btn4.Left = BTN4_X; - btn4.Top = BTN4_Y; - btn4.Height = BTN4_H; - btn4.Width = BTN4_W; - btn4.pCaption = BTN4_TEXT; - btn4.Font = &tFont16; - btn4.Focus = 0; - - btn5.Left = BTN5_X; - btn5.Top = BTN5_Y; - btn5.Height = BTN5_H; - btn5.Width = BTN5_W; - btn5.pCaption = BTN5_TEXT; - btn5.Font = &tFont16; - btn5.Focus = 0; - - btn6.Left = BTN6_X; - btn6.Top = BTN6_Y; - btn6.Height = BTN6_H; - btn6.Width = BTN6_W; - btn6.pCaption = BTN6_TEXT; - btn6.Font = &tFont16; - btn6.Focus = 0; - - if (cursor == 0) btn1.Focus = 1; - else if (cursor == 1) btn2.Focus = 1; - else if (cursor == 2) btn3.Focus = 1; - else if (cursor == 3) btn4.Focus = 1; - else if (cursor == 4) btn5.Focus = 1; - else if (cursor == 5) btn6.Focus = 1; - - LCD_DrawButton(&btn1); - LCD_DrawButton(&btn2); - LCD_DrawButton(&btn3); - LCD_DrawButton(&btn4); - LCD_DrawButton(&btn5); - LCD_DrawButton(&btn6); - } - } - - bsp_Idle(); - - ucKeyCode = bsp_GetKey(); /* 读取键值, 无键按下时返回 KEY_NONE = 0 */ - if (ucKeyCode != KEY_NONE) - { - /* 有键按下 */ - switch (ucKeyCode) - { - case KEY_UP_S: /* S键释放 - 移动按钮焦点*/ - if (++cursor == BTN_NUM) - { - cursor = 0; - } - fRefresh = 1; - break; - - case KEY_UP_C: /* C键释放 - 确认执行按钮功能 */ - if (cursor > 0) - { - cursor--; - } - else - { - cursor = BTN_NUM - 1; - } - fRefresh = 1; - break; - - case KEY_LONG_DOWN_S: /* S键长按 - 确认后,闪烁,修改参数 */ - if (cursor == 0) - { - FM_WirteFont(); /* 写字库 */ - } - else if (cursor == 1) - { - FM_WirteBoot(); /* 写QSPI App */ - } - else if (cursor == 2) - { - FM_WirteQspiApp(); - } - break; - - case KEY_LONG_DOWN_C: /* C键长按 */ - g_MainStatus = MS_SYSTEM_SET; - break; - - default: - break; - } - } - } -} - -/* -********************************************************************************************************* -* 函 数 名: FM_DispFileInfo -* 功能说明: 显示文件操作信息 -* 形 参: 无 -* 返 回 值: 无 -********************************************************************************************************* -*/ -void FM_DispFileInfo(char *_str1) -{ - FONT_T tFont; /* 定义字体结构体变量 */ - - tFont.FontCode = FC_ST_16; /* 字体代码 16点阵 */ - tFont.FrontColor = HELP_TEXT_COLOR; /* 字体颜色 */ - tFont.BackColor = HELP_BACK_COLOR; /* 文字背景颜色 */ - tFont.Space = 0; /* 文字间距,单位 = 像素 */ - - LCD_DispStrEx(5, 180, _str1, &tFont, 230, 0); - ST7789_DrawScreen(); /* 硬件SPI+DMA+刷屏 */ -} - -/* -********************************************************************************************************* -* 函 数 名: FM_DispProgress -* 功能说明: 显示文件操作进度和时间 -* 形 参: _percent 百分比 -* _time1 时间ms单位 -* 返 回 值: 无 -********************************************************************************************************* -*/ -void FM_DispProgress(uint8_t _percent, uint32_t _time1) -{ - FONT_T tFont; /* 定义字体结构体变量 */ - static uint8_t s_percent = 200; - static uint32_t s_ms = 0; - char buf[10]; - - tFont.FontCode = FC_ST_16; /* 字体代码 16点阵 */ - tFont.FrontColor = HELP_TEXT_COLOR; /* 字体颜色 */ - tFont.BackColor = CL_MASK; /* 文字背景颜色 */ - tFont.Space = 0; /* 文字间距,单位 = 像素 */ - - if (s_percent == 0 || s_percent != _percent || s_ms != _time1 / 100) - { - /* 100.2 秒 */ - sprintf(buf, "%d.%d 秒", _time1 / 1000, (_time1 % 1000) / 100); - - DispProgressBar(5, 200, 24, 240 - 2 * 5, "", _percent, buf, &tFont); - -// LCD_DispStr(160, 200 + 4, buf, &tFont); - ST7789_DrawScreen(); /* 硬件SPI+DMA+刷屏 */ - - s_percent = _percent; - s_ms = _time1 / 100; - } -} - -/* -********************************************************************************************************* -* 函 数 名: FM_WirteQSPIFont -* 功能说明: 写字库 -* 形 参: 无 -* 返 回 值: 无 -********************************************************************************************************* -*/ -#define QSPI_WRITE_PAGE_SIZE 256 -#define QSPI_ERASE_SECTOR_SIZE (4 * 1024) -#define QSPI_FONT_ADDRESS ((32 - 2) * 1024 * 1024) -#define QSPI_FILE_SIZE (2 * 1024 * 1024) -#define QSPI_WRITE_PAGE_SIZE 256 -#define QSPI_ERASE_SECTOR_SIZE (4 * 1024) -#define QSPI_BEGIN_ADDRESS ((32 - 2) * 1024 * 1024) -#define QSPI_FILE_SIZE (2 * 1024 * 1024) -static void FM_WirteFont(void) -{ - uint32_t i; - FRESULT result; - uint32_t bw; - char *path = "0:/H7-TOOL/Fonts/GB2312ZK.bin"; - uint32_t FileSize; - uint32_t OffsetAddr = 0; - uint8_t percent; - int32_t time1; - - FM_DispProgress(0, 0); - /* 改程序仅在CPU 内部运行时才能执行 */ - if ((uint32_t)FM_WirteFont < 0x08000000 || (uint32_t)FM_WirteFont > 0x08100000) - { - FM_DispFileInfo("只能在CPU内部Flash执行"); - return; - } - - result = f_open(&g_file, path, FA_OPEN_EXISTING | FA_READ); - if (result != FR_OK) - { - FM_DispFileInfo("没有找到文件GB2312ZK.bin"); - goto quit1; - } - - /* 获得文件大小 */ - { - FILINFO fno; - - f_stat(path, &fno); - FileSize = fno.fsize; - - /* 文件大小 */ - if (FileSize != 2 * 1024 * 1024) - { - FM_DispFileInfo("字库文件长度必须是2MB"); - goto quit1; - } - } - - time1 = bsp_GetRunTime(); - /* 擦除 */ - FM_DispFileInfo("正在擦除QSPI Flash字库..."); - OffsetAddr = QSPI_FONT_ADDRESS; - for (i = 0; i < QSPI_FILE_SIZE / QSPI_ERASE_SECTOR_SIZE; i++) - { - QSPI_EraseSector(OffsetAddr); - OffsetAddr += QSPI_ERASE_SECTOR_SIZE; - percent = ((i + 1) * 100) / (QSPI_FILE_SIZE / QSPI_ERASE_SECTOR_SIZE); - FM_DispProgress(percent, bsp_CheckRunTime(time1)); - } - - /* 写入,每次256字节 */ - FM_DispFileInfo("正在写入..."); - percent = 0; - FM_DispProgress(percent, bsp_CheckRunTime(time1)); - OffsetAddr = QSPI_FONT_ADDRESS; - for (i = 0; i < QSPI_FILE_SIZE / 1024; i++) - { - percent = ((i + 1) * 100) / (QSPI_FILE_SIZE / 1024); - - result = f_read(&g_file, &qspi_file_buf, 1024, &bw); - if (result != FR_OK) - { - FM_DispFileInfo("文件读取失败"); - goto quit1; - } - - SCB_InvalidateDCache_by_Addr((uint32_t *)qspi_file_buf, sizeof(qspi_file_buf)); - - QSPI_WriteBuffer(qspi_file_buf, OffsetAddr, 256); - QSPI_WriteBuffer(qspi_file_buf + 256, OffsetAddr + 256, 256); - QSPI_WriteBuffer(qspi_file_buf + 2 * 256, OffsetAddr + 2 * 256, 256); - QSPI_WriteBuffer(qspi_file_buf + 3 * 256, OffsetAddr + 3 * 256, 256); - - QSPI_ReadBuffer(qspi_read_buf, OffsetAddr, 1024); - - SCB_InvalidateDCache_by_Addr((uint32_t *)qspi_read_buf, sizeof(qspi_read_buf)); - if (memcmp(qspi_file_buf, qspi_read_buf, 1024) != 0) - { - FM_DispFileInfo("写QSPI Flash出错!"); - goto quit1; - } - - OffsetAddr += 1024; - percent = ((i + 1) * 100) / (QSPI_FILE_SIZE / 1024); - FM_DispProgress(percent, bsp_CheckRunTime(time1)); - } - - FM_DispFileInfo("QSPI Flash字库成功!"); - -quit1: - /* 关闭文件*/ - f_close(&g_file); -} - -/* -********************************************************************************************************* -* 函 数 名: FM_WirteQspiApp -* 功能说明: 写QSPI APP -* 形 参: 无 -* 返 回 值: 无 -********************************************************************************************************* -*/ -#define QSPI_APP_ADDRESS 0 -static void FM_WirteQspiApp(void) -{ - uint32_t i; - FRESULT result; - uint32_t bw; - char *path = "0:/H7-TOOL/Firmware/H7-QSPI_APP.bin"; - uint32_t FileSize; - uint32_t OffsetAddr = 0; - uint8_t percent; - int32_t time1; - - FM_DispProgress(0, 0); - - /* 改程序仅在CPU 内部运行时才能执行 */ - if ((uint32_t)FM_WirteFont < 0x08000000 || (uint32_t)FM_WirteFont > 0x08100000) - { - FM_DispFileInfo("只能在CPU内部Flash执行"); - return; - } - - result = f_open(&g_file, path, FA_OPEN_EXISTING | FA_READ); - if (result != FR_OK) - { - FM_DispFileInfo("没有找到文件H7-QSPI_APP.bin"); - goto quit1; - } - - /* 获得文件大小 */ - { - FILINFO fno; - - f_stat(path, &fno); - FileSize = fno.fsize; - - /* 文件大小 */ - if (FileSize > 30 * 1024 * 1024) - { - FM_DispFileInfo("文件长度必须小于30MB"); - goto quit1; - } - } - - time1 = bsp_GetRunTime(); - /* 擦除 */ - FM_DispFileInfo("正在擦除QSPI Flash..."); - OffsetAddr = QSPI_APP_ADDRESS; - for (i = 0; i < (FileSize + QSPI_ERASE_SECTOR_SIZE - 1) / QSPI_ERASE_SECTOR_SIZE; i++) - { - QSPI_EraseSector(OffsetAddr); - OffsetAddr += QSPI_ERASE_SECTOR_SIZE; - percent = ((i + 1) * 100) / ((FileSize + QSPI_ERASE_SECTOR_SIZE - 1) / QSPI_ERASE_SECTOR_SIZE); - FM_DispProgress(percent, bsp_CheckRunTime(time1)); - } - - /* 写入,每次256字节 */ - FM_DispFileInfo("正在写入..."); - percent = 0; - FM_DispProgress(percent, bsp_CheckRunTime(time1)); - OffsetAddr = QSPI_APP_ADDRESS; - for (i = 0; i < (FileSize + 1024 - 1) / 1024; i++) - { - percent = ((i + 1) * 100) / ((FileSize + 1024 - 1) / 1024); - - memset(qspi_file_buf, 0, 1024); /* 末尾填0 */ - result = f_read(&g_file, &qspi_file_buf, 1024, &bw); - if (result != FR_OK) - { - FM_DispFileInfo("文件读取失败"); - goto quit1; - } - - - SCB_InvalidateDCache_by_Addr((uint32_t *)qspi_file_buf, sizeof(qspi_file_buf)); - - QSPI_WriteBuffer(qspi_file_buf, OffsetAddr, 256); - QSPI_WriteBuffer(qspi_file_buf + 256, OffsetAddr + 256, 256); - QSPI_WriteBuffer(qspi_file_buf + 2 * 256, OffsetAddr + 2 * 256, 256); - QSPI_WriteBuffer(qspi_file_buf + 3 * 256, OffsetAddr + 3 * 256, 256); - - QSPI_ReadBuffer(qspi_read_buf, OffsetAddr, 1024); - - SCB_InvalidateDCache_by_Addr((uint32_t *)qspi_read_buf, sizeof(qspi_read_buf)); - if (memcmp(qspi_file_buf, qspi_read_buf, 1024) != 0) - { - FM_DispFileInfo("写QSPI Flash出错!"); - goto quit1; - } - - OffsetAddr += 1024; - percent = ((i + 1) * 100) / ((FileSize + 1024 - 1) / 1024); - FM_DispProgress(percent, bsp_CheckRunTime(time1)); - } - - FM_DispFileInfo("写QSPI Flash成功!"); - -quit1: - /* 关闭文件*/ - f_close(&g_file); -} - -/* -********************************************************************************************************* -* 函 数 名: FM_WirteBoot -* 功能说明: 写BOOT -* 形 参: 无 -* 返 回 值: 无 -********************************************************************************************************* -*/ -#define BOOT_BEGIN_ADDRESS 0x08000000 -static void FM_WirteBoot(void) -{ - uint32_t i; - FRESULT result; - uint32_t bw; - char *path = "0:/H7-TOOL/Firmware/H7-BOOT.bin"; - uint32_t FileSize; - uint32_t OffsetAddr = 0; - uint8_t percent; - int32_t time1; - - FM_DispProgress(0, 0); - result = f_open(&g_file, path, FA_OPEN_EXISTING | FA_READ); - if (result != FR_OK) - { - FM_DispFileInfo("没有找到文件H7-BOOT.bin"); - goto quit1; - } - - /* 获得文件大小 */ - { - FILINFO fno; - - f_stat(path, &fno); - FileSize = fno.fsize; - - /* 文件大小 */ - if (FileSize > 128 * 1024) - { - FM_DispFileInfo("文件长度大于128KB"); - goto quit1; - } - } - - /* 简单判断下文件是否boot固件 */ - { - result = f_read(&g_file, &qspi_file_buf, 512, &bw); - if (result != FR_OK) - { - FM_DispFileInfo("文件读取失败"); - goto quit1; - } - - SCB_InvalidateDCache_by_Addr((uint32_t *)qspi_file_buf, 512); - // 0x2408EDF8 0x080002AD - // 0x20020000 0x080002AD - if ((qspi_file_buf[3] == 0x24 || qspi_file_buf[3] == 0x20) - && (qspi_file_buf[7] == 0x08) && (qspi_file_buf[6] == 0x00)) - { - /* 合法固件 */; - } - else - { - FM_DispFileInfo("不是固件文件"); - goto quit1; - } - - /* 还原文件指针到开头 */ - f_lseek(&g_file, 0); - } - - time1 = bsp_GetRunTime(); - - /* 擦除 */ - FM_DispFileInfo("正在擦除Flash..."); - percent = 0; - FM_DispProgress(percent, bsp_CheckRunTime(time1)); - OffsetAddr = BOOT_BEGIN_ADDRESS; - if (bsp_EraseCpuFlash(BOOT_BEGIN_ADDRESS) != HAL_OK) - { - percent = 100; - FM_DispProgress(percent, bsp_CheckRunTime(time1)); - } - - /* 写入,每次1024字节 */ - FM_DispFileInfo("正在写入..."); - percent = 0; - FM_DispProgress(percent, bsp_CheckRunTime(time1)); - OffsetAddr = BOOT_BEGIN_ADDRESS; - for (i = 0; i < (FileSize + 1023) / 1024; i++) - { - percent = ((i + 1) * 100) / ((FileSize + 1023) / 1024); - - memset(qspi_file_buf, 0, 1024); /* 末尾填0 */ - result = f_read(&g_file, &qspi_file_buf, 1024, &bw); - if (result != FR_OK) - { - FM_DispFileInfo("文件读取失败"); - goto quit1; - } - - SCB_InvalidateDCache_by_Addr((uint32_t *)qspi_file_buf, sizeof(qspi_file_buf)); - - if (bsp_WriteCpuFlash(OffsetAddr, qspi_file_buf, 1024) == 0) /* 每次写入1024个字节 */ - { - if (memcmp((uint8_t *)OffsetAddr, qspi_file_buf, 1024) != 0) - { - FM_DispFileInfo("写CPU Flash出错!"); - goto quit1; - } - } - else - { - FM_DispFileInfo("写CPU Flash出错!"); - goto quit1; - } - - OffsetAddr += 1024; - percent = ((i + 1) * 100) / ((FileSize + 1023) / 1024); - FM_DispProgress(percent, bsp_CheckRunTime(time1)); - } - - FM_DispFileInfo("Boot写入成功!"); - -quit1: - /* 关闭文件*/ - f_close(&g_file); -} - /***************************** 安富莱电子 www.armfly.com (END OF FILE) *********************************/ diff --git a/User/app/src/status_usb_emmc.c b/User/app/src/status_usb_emmc.c new file mode 100644 index 0000000..a3a37b8 --- /dev/null +++ b/User/app/src/status_usb_emmc.c @@ -0,0 +1,81 @@ +/* +********************************************************************************************************* +* +* 模块名称 : USB虚拟磁盘状态 +* 文件名称 : status_usb_emmc.c +* 版 本 : V1.0 +* 说 明 : 关闭USB串口,进入USB磁盘模式. +* 修改记录 : +* 版本号 日期 作者 说明 +* V1.0 2018-12-06 armfly 正式发布 +* +* Copyright (C), 2018-2030, 安富莱电子 www.armfly.com +* +********************************************************************************************************* +*/ +#include "includes.h" + +/* +********************************************************************************************************* +* 函 数 名: status_UsbEMMC +* 功能说明: USB虚拟磁盘,eMMC磁盘 +* 形 参: 无 +* 返 回 值: 无 +********************************************************************************************************* +*/ +void status_UsbEMMC(void) +{ + uint8_t ucKeyCode; /* 按键代码 */ + + DispHeader2(93, "USB eMMC磁盘"); + DispHelpBar("请在电脑操作eMMC文件", + ""); + + usbd_CloseCDC(); + usbd_OpenMassStorage(); + + DispInfoBar16(1, "USB模式:", "虚拟磁盘"); + + while (g_MainStatus == MS_USB_EMMC) + { + bsp_Idle(); + + if (g_tVar.UsbEmmcRemoved == 1) + { + g_tVar.UsbEmmcRemoved = 0; + + g_MainStatus = MS_LINK_MODE; + } + + ucKeyCode = bsp_GetKey(); /* 读取键值, 无键按下时返回 KEY_NONE = 0 */ + if (ucKeyCode != KEY_NONE) + { + /* 有键按下 */ + switch (ucKeyCode) + { + case KEY_UP_S: /* S键 弹起 */ + break; + + case KEY_UP_C: /* C键 下 */ + break; + + case KEY_LONG_DOWN_S: /* S键 上 */ + break; + + case KEY_LONG_DOWN_C: /* C键长按 */ + PlayKeyTone(); + g_MainStatus = MS_SYSTEM_SET; + break; + + default: + break; + } + } + } + + usbd_CloseMassStorage(); + + usbd_OpenCDC2(COM_USB_PC); /* 映射到串口8. 和PC软件联机 */ +} + +/***************************** 安富莱电子 www.armfly.com (END OF FILE) *********************************/ diff --git a/User/bsp/bsp.c b/User/bsp/bsp.c index 4321646..6ed2c8d 100755 --- a/User/bsp/bsp.c +++ b/User/bsp/bsp.c @@ -15,6 +15,7 @@ ********************************************************************************************************* */ #include "bsp.h" +#include "nvic_prio_cfg.h" static void SystemClock_Config(void); static void CPU_CACHE_Enable(void); @@ -98,6 +99,8 @@ void bsp_Init(void) bsp_InitRTC(); /* 初始化时钟 */ bsp_InitRNG(); /* 配置启用随机数模块 */ + + HAL_NVIC_SetPriority(SysTick_IRQn, SysTick_IRQ_PRIO, 0U); /* 重置SysTick优先级最高 */ } @@ -142,7 +145,7 @@ static void SystemClock_Config(void) { RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; RCC_OscInitTypeDef RCC_OscInitStruct = {0}; - RCC_PeriphCLKInitTypeDef PeriphClkInitStruct; + RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; HAL_StatusTypeDef ret = HAL_OK; /* 锁住SCU(Supply configuration update) */ @@ -326,10 +329,10 @@ static void MPU_Config(void) MPU_InitStruct.Size = MPU_REGION_SIZE_16KB; MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS; MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE; - MPU_InitStruct.IsCacheable = MPU_ACCESS_CACHEABLE; - MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE; + MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE; + MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE; MPU_InitStruct.Number = MPU_REGION_NUMBER1; - MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0; + MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL1; MPU_InitStruct.SubRegionDisable = 0x00; MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_ENABLE; @@ -496,6 +499,8 @@ extern void lua_Poll(void); extern void wifi_task(void); extern void EXIO_ScanTask(void); extern void LCD_Task(void); +extern void PC_CmdTask(void); +extern void DelayOpenUSBTask(void); void bsp_Idle(void) { /* --- 喂狗 */ @@ -508,7 +513,11 @@ void bsp_Idle(void) EXIO_ScanTask(); /* 扩展IO任务 */ - LCD_Task(); /* 显示屏任务,硬件SPI+DMA+刷屏 */ + LCD_Task(); /* 显示屏任务,硬件SPI+DMA+刷屏 */ + + PC_CmdTask(); /* PC机控制任务 */ + + DelayOpenUSBTask(); /* 延迟启动USB */ } /* diff --git a/User/bsp/bsp_msg.h b/User/bsp/bsp_msg.h index 5e31a18..491b813 100755 --- a/User/bsp/bsp_msg.h +++ b/User/bsp/bsp_msg.h @@ -29,6 +29,8 @@ enum MSG_PG_START = 0x00001001, /* 开始烧录 */ MSG_PG_ABORT = 0x00001002, /* 终止烧录 */ + + MSG_MODBUS_LUA_RUN, /* modbus 收到lua程序,不是立即执行,放到bsp_Idle执行. 未用,用的 g_tVar.LuaRunOnce */ }; /* 按键FIFO用到变量 */ diff --git a/User/bsp/nvic_prio_cfg.h b/User/bsp/nvic_prio_cfg.h new file mode 100644 index 0000000..c94a7a8 --- /dev/null +++ b/User/bsp/nvic_prio_cfg.h @@ -0,0 +1,149 @@ +/* +********************************************************************************************************* +* +* 模块名称 : 中断优先级配置文件 +* 文件名称 : nvic_prio_cfg.h +* +* Copyright (C), 2018-2030, 安富莱电子 www.armfly.com +* +********************************************************************************************************* +*/ + +#ifndef _NVIC_PRIO_CFG_H +#define _NVIC_PRIO_CFG_H + +/* + HAL_NVIC_SetPriority(SysTick_IRQn, SysTick_IRQ_PRIO, 0U); + + HAL_NVIC_SetPriority(OTG_HS_IRQn, OTG_HS_IRQ_PRIG, 0); + HAL_NVIC_SetPriority(TIMx_IRQn, CDC_TIMx_IRQ_PRIO, 0); + + HAL_NVIC_SetPriority(USART1_IRQn, UART_IRQ_PRIO, 0); + HAL_NVIC_SetPriority(TIM_HARD_IRQn, TIM_HARD_IRQ_PRIO, 0); + + HAL_NVIC_SetPriority(DMA2_Stream3_IRQn, TFT_DMA2_STREAM3_IRQ_PRIO, 0); + + HAL_NVIC_SetPriority(SPI5_IRQn, TFT_SPI5_IRQ_PRIO, 0); + + HAL_NVIC_SetPriority(QUADSPI_IRQn, QSPI_IRQ_PRIO, 0); + HAL_NVIC_SetPriority(MDMA_IRQn, QSPI_MDMA_IRQ_PRIO, 0); + + HAL_NVIC_SetPriority(SDMMC1_IRQn, SDMMC1_IRQ_PRIO, 0); + + HAL_NVIC_SetPriority(ADC_IRQn, CH1_ADC_IRQ_PRIO, 0); + HAL_NVIC_SetPriority(ADC3_IRQn, CH2_ADC3_IRQ_PRIO, 0); + + HAL_NVIC_SetPriority(CH1_DMA_Stream_IRQn, CH1_DMA_Stream_IRQ_PRIO, 0); + HAL_NVIC_SetPriority(CH2_DMA_Stream_IRQn, CH2_DMA_Stream_IRQ_PRIO, 0); + + HAL_NVIC_SetPriority(CT_CH1_DMA_Stream_IRQn, CT_CH1_DMA_Stream_IRQ_PRIO, 0); + HAL_NVIC_SetPriority(CT_CH2_DMA_Stream_IRQn, CT_CH2_DMA_Stream_IRQ_PRIO, 0); + +*/ + +/* + USB中断中,会访问SDMMC + USB中断中,执行lua,lua则可能访问其他任意设备,因此USB中断优先级设置较低 +*/ + +#if 1 +#define SysTick_IRQ_PRIO 0 +#define OTG_HS_IRQ_PRIG 15 + +#define CDC_TIMx_IRQ_PRIO 5 + +#define UART_IRQ_PRIO 5 +#define TIM_HARD_IRQ_PRIO 4 + +#define TFT_DMA2_STREAM3_IRQ_PRIO 5 +#define TFT_SPI5_IRQ_PRIO 5 + +#define QSPI_IRQ_PRIO 5 +#define QSPI_MDMA_IRQ_PRIO 5 + +#define SDMMC1_IRQ_PRIO 5 + +#define CH1_ADC_IRQ_PRIO 5 +#define CH2_ADC3_IRQ_PRIO 5 + +#define CH1_DMA_Stream_IRQ_PRIO 5 +#define CH2_DMA_Stream_IRQ_PRIO 5 + +#define CT_CH1_DMA_Stream_IRQ_PRIO 5 +#define CT_CH2_DMA_Stream_IRQ_PRIO 5 + +#else /* V1.43 */ + +#define SysTick_IRQ_PRIO 15 +#define OTG_HS_IRQ_PRIG 0 + +#define CDC_TIMx_IRQ_PRIO 6 + +#define UART_IRQ_PRIO 0 +#define TIM_HARD_IRQ_PRIO 0 + +#define TFT_DMA2_STREAM3_IRQ_PRIO 1 +#define TFT_SPI5_IRQ_PRIO 1 + +#define QSPI_IRQ_PRIO 15 +#define QSPI_MDMA_IRQ_PRIO 2 + +#define SDMMC1_IRQ_PRIO 0 + +#define CH1_ADC_IRQ_PRIO 0 +#define CH2_ADC3_IRQ_PRIO 0 + +#define CH1_DMA_Stream_IRQ_PRIO 1 +#define CH2_DMA_Stream_IRQ_PRIO 1 + +#define CT_CH1_DMA_Stream_IRQ_PRIO 1 +#define CT_CH2_DMA_Stream_IRQ_PRIO 1 + +/* V1.43 + + HAL_NVIC_SetPriority(OTG_FS_IRQn, 6, 0); + HAL_NVIC_SetPriority(OTG_HS_IRQn, 1, 0); + HAL_NVIC_SetPriority(TIMx_IRQn, 6, 0); + HAL_NVIC_SetPriority(USART1_IRQn, 0, 1); + HAL_NVIC_SetPriority(USART2_IRQn, 0, 2); + HAL_NVIC_SetPriority(USART3_IRQn, 0, 3); + HAL_NVIC_SetPriority(UART4_IRQn, 0, 4); + HAL_NVIC_SetPriority(UART5_IRQn, 0, 5); + HAL_NVIC_SetPriority(USART6_IRQn, 0, 6); + HAL_NVIC_SetPriority(UART7_IRQn, 0, 6); + HAL_NVIC_SetPriority(UART8_IRQn, 0, 6); + HAL_NVIC_SetPriority(TIM_HARD_IRQn, 0, 2); + HAL_NVIC_SetPriority((IRQn_Type)irq, _PreemptionPriority, _SubPriority); + HAL_NVIC_SetPriority(TIMx_IRQn, 0, 0); + HAL_NVIC_SetPriority(CH1_DMA_Stream_IRQn, 1, 0); + + HAL_NVIC_SetPriority(DMA2_Stream3_IRQn, 1, 1); + HAL_NVIC_SetPriority(SPI5_IRQn, 1, 0); + + HAL_NVIC_SetPriority(QUADSPI_IRQn, 0x0F, 0); + HAL_NVIC_SetPriority(MDMA_IRQn, 0x02, 0); + HAL_NVIC_SetPriority(SDMMC1_IRQn, 0, 0); + HAL_NVIC_SetPriority(ADC_IRQn, 0, 0); + HAL_NVIC_SetPriority(ADC3_IRQn, 0, 0); + + HAL_NVIC_SetPriority(ADC_IRQn, 0, 0); + HAL_NVIC_SetPriority(ADC3_IRQn, 0, 0); + HAL_NVIC_SetPriority(CH1_DMA_Stream_IRQn, 1, 0); + HAL_NVIC_SetPriority(CH2_DMA_Stream_IRQn, 1, 0); + HAL_NVIC_SetPriority(CT_CH1_DMA_Stream_IRQn, 1, 0); + HAL_NVIC_SetPriority(CT_CH2_DMA_Stream_IRQn, 1, 0); + HAL_NVIC_SetPriority(CT_CH1_DMA_Stream_IRQn, 1, 0); + HAL_NVIC_SetPriority(CT_CH2_DMA_Stream_IRQn, 1, 0); + HAL_NVIC_SetPriority(FDCAN1_IT0_IRQn, 0, 1); + HAL_NVIC_SetPriority(FDCAN1_IT1_IRQn, 0, 1); + HAL_NVIC_SetPriority(FDCAN_CAL_IRQn, 0, 0); + HAL_NVIC_SetPriority(FDCAN2_IT0_IRQn, 0, 1); + HAL_NVIC_SetPriority(FDCAN2_IT1_IRQn, 0, 1); + HAL_NVIC_SetPriority(FDCAN_CAL_IRQn, 0, 0); +*/ + +#endif + +#endif + +/***************************** 安富莱电子 www.armfly.com (END OF FILE) *********************************/ diff --git a/User/bsp/src/bsp_cpu_adc.c b/User/bsp/src/bsp_cpu_adc.c index 634f2ec..e79cec9 100755 --- a/User/bsp/src/bsp_cpu_adc.c +++ b/User/bsp/src/bsp_cpu_adc.c @@ -18,6 +18,7 @@ #include "bsp.h" #include "param.h" +#include "nvic_prio_cfg.h" /* PF11/ADC1_INP2 ---- CH1电压 @@ -798,10 +799,10 @@ void DSO_SetTriger(void) /* NVIC configuration for ADC interrupt */ /* Priority: high-priority */ - HAL_NVIC_SetPriority(ADC_IRQn, 0, 0); + HAL_NVIC_SetPriority(ADC_IRQn, CH1_ADC_IRQ_PRIO, 0); HAL_NVIC_DisableIRQ(ADC_IRQn); - HAL_NVIC_SetPriority(ADC3_IRQn, 0, 0); + HAL_NVIC_SetPriority(ADC3_IRQn, CH2_ADC3_IRQ_PRIO, 0); HAL_NVIC_DisableIRQ(ADC3_IRQn); { @@ -986,10 +987,10 @@ void DSO_CloseTriger(void) /* NVIC configuration for ADC interrupt */ /* Priority: high-priority */ - HAL_NVIC_SetPriority(ADC_IRQn, 0, 0); + HAL_NVIC_SetPriority(ADC_IRQn, CH1_ADC_IRQ_PRIO, 0); HAL_NVIC_DisableIRQ(ADC_IRQn); - HAL_NVIC_SetPriority(ADC3_IRQn, 0, 0); + HAL_NVIC_SetPriority(ADC3_IRQn, CH2_ADC3_IRQ_PRIO, 0); HAL_NVIC_DisableIRQ(ADC3_IRQn); } @@ -1756,7 +1757,7 @@ void HAL_ADC_MspInit(ADC_HandleTypeDef *hadc) __HAL_LINKDMA(hadc, DMA_Handle, DmaHandle1); /* NVIC configuration for DMA Input data interrupt */ - HAL_NVIC_SetPriority(CH1_DMA_Stream_IRQn, 1, 0); + HAL_NVIC_SetPriority(CH1_DMA_Stream_IRQn, CH1_DMA_Stream_IRQ_PRIO, 0); HAL_NVIC_EnableIRQ(CH1_DMA_Stream_IRQn); } else if (hadc->Instance == ADCH2) @@ -1813,7 +1814,7 @@ void HAL_ADC_MspInit(ADC_HandleTypeDef *hadc) __HAL_LINKDMA(hadc, DMA_Handle, DmaHandle2); /* NVIC configuration for DMA Input data interrupt */ - HAL_NVIC_SetPriority(CH2_DMA_Stream_IRQn, 1, 0); + HAL_NVIC_SetPriority(CH2_DMA_Stream_IRQn, CH2_DMA_Stream_IRQ_PRIO, 0); HAL_NVIC_EnableIRQ(CH2_DMA_Stream_IRQn); } } @@ -1871,7 +1872,7 @@ void HAL_ADC_MspInit(ADC_HandleTypeDef *hadc) __HAL_LINKDMA(hadc, DMA_Handle, DmaHandle1); /* NVIC configuration for DMA Input data interrupt */ - HAL_NVIC_SetPriority(CT_CH1_DMA_Stream_IRQn, 1, 0); + HAL_NVIC_SetPriority(CT_CH1_DMA_Stream_IRQn, CT_CH1_DMA_Stream_IRQ_PRIO, 0); HAL_NVIC_EnableIRQ(CT_CH1_DMA_Stream_IRQn); } else if (hadc->Instance == CT_ADCH2) @@ -1928,7 +1929,7 @@ void HAL_ADC_MspInit(ADC_HandleTypeDef *hadc) __HAL_LINKDMA(hadc, DMA_Handle, DmaHandle2); /* NVIC configuration for DMA Input data interrupt */ - HAL_NVIC_SetPriority(CT_CH2_DMA_Stream_IRQn, 1, 0); + HAL_NVIC_SetPriority(CT_CH2_DMA_Stream_IRQn, CT_CH2_DMA_Stream_IRQ_PRIO, 0); HAL_NVIC_EnableIRQ(CT_CH2_DMA_Stream_IRQn); } } @@ -1996,7 +1997,7 @@ void HAL_ADC_MspInit(ADC_HandleTypeDef *hadc) __HAL_LINKDMA(hadc, DMA_Handle, DmaHandle1); /* NVIC configuration for DMA Input data interrupt */ - HAL_NVIC_SetPriority(CT_CH1_DMA_Stream_IRQn, 1, 0); + HAL_NVIC_SetPriority(CT_CH1_DMA_Stream_IRQn, CT_CH1_DMA_Stream_IRQ_PRIO, 0); HAL_NVIC_EnableIRQ(CT_CH1_DMA_Stream_IRQn); } else if (hadc->Instance == ADC3) @@ -2052,7 +2053,7 @@ void HAL_ADC_MspInit(ADC_HandleTypeDef *hadc) __HAL_LINKDMA(hadc, DMA_Handle, DmaHandle2); /* NVIC configuration for DMA Input data interrupt */ - HAL_NVIC_SetPriority(CT_CH2_DMA_Stream_IRQn, 1, 0); + HAL_NVIC_SetPriority(CT_CH2_DMA_Stream_IRQn, CT_CH2_DMA_Stream_IRQ_PRIO, 0); HAL_NVIC_EnableIRQ(CT_CH2_DMA_Stream_IRQn); } } diff --git a/User/bsp/src/bsp_emmc.c b/User/bsp/src/bsp_emmc.c index 91d86d4..7e3d953 100755 --- a/User/bsp/src/bsp_emmc.c +++ b/User/bsp/src/bsp_emmc.c @@ -78,6 +78,7 @@ /* Includes ------------------------------------------------------------------*/ #include "bsp_emmc.h" +#include "nvic_prio_cfg.h" /** @addtogroup BSP * @{ @@ -94,7 +95,7 @@ /** @defgroup STM32H750B_DISCOVERY_MMC_Exported_Variables Exported Variables * @{ */ -MMC_HandleTypeDef uSdHandle; +MMC_HandleTypeDef uSdHandle = {0}; /** * @} */ @@ -124,7 +125,7 @@ uint8_t BSP_MMC_Init(void) uSdHandle.Init.ClockDiv = 3; /* 2019-12-13 2 -> 3 */ uSdHandle.Init.ClockPowerSave = SDMMC_CLOCK_POWER_SAVE_DISABLE; uSdHandle.Init.ClockEdge = SDMMC_CLOCK_EDGE_RISING; - uSdHandle.Init.HardwareFlowControl = SDMMC_HARDWARE_FLOW_CONTROL_DISABLE; + uSdHandle.Init.HardwareFlowControl = SDMMC_HARDWARE_FLOW_CONTROL_ENABLE; uSdHandle.Init.BusWide = SDMMC_BUS_WIDE_4B; /* Msp MMC initialization */ @@ -318,7 +319,7 @@ __weak void BSP_MMC_MspInit(MMC_HandleTypeDef *hmmc, void *Params) HAL_GPIO_Init(GPIOB, &gpio_init_structure); /* NVIC configuration for SDIO interrupts */ - HAL_NVIC_SetPriority(SDMMC1_IRQn, 0, 0); + HAL_NVIC_SetPriority(SDMMC1_IRQn, SDMMC1_IRQ_PRIO, 0); HAL_NVIC_EnableIRQ(SDMMC1_IRQn); } diff --git a/User/bsp/src/bsp_qspi_w25q256.c b/User/bsp/src/bsp_qspi_w25q256.c index 1ef2485..16d5f7c 100755 --- a/User/bsp/src/bsp_qspi_w25q256.c +++ b/User/bsp/src/bsp_qspi_w25q256.c @@ -17,6 +17,7 @@ */ #include "bsp.h" +#include "nvic_prio_cfg.h" /* STM32-V7开发板接线 @@ -249,7 +250,7 @@ void HAL_QSPI_MspInit(QSPI_HandleTypeDef *hqspi) HAL_GPIO_Init(QSPI_BK1_D3_GPIO_PORT, &GPIO_InitStruct); /* 使能QSPI中断 */ - HAL_NVIC_SetPriority(QUADSPI_IRQn, 0x0F, 0); /* 0x0F --> 0x04, 要高于USB中断 */ + HAL_NVIC_SetPriority(QUADSPI_IRQn, QSPI_IRQ_PRIO, 0); /* 0x0F --> 0x04, 要高于USB中断 */ HAL_NVIC_EnableIRQ(QUADSPI_IRQn); /* 配置MDMA时钟 */ @@ -280,7 +281,7 @@ void HAL_QSPI_MspInit(QSPI_HandleTypeDef *hqspi) HAL_MDMA_Init(&hmdma); /* 使能MDMA中断,并配置优先级 */ - HAL_NVIC_SetPriority(MDMA_IRQn, 0x02, 0); + HAL_NVIC_SetPriority(MDMA_IRQn, QSPI_MDMA_IRQ_PRIO, 0); HAL_NVIC_EnableIRQ(MDMA_IRQn); } diff --git a/User/bsp/src/bsp_tft_lcd.c b/User/bsp/src/bsp_tft_lcd.c index 49628ec..3bc1228 100755 --- a/User/bsp/src/bsp_tft_lcd.c +++ b/User/bsp/src/bsp_tft_lcd.c @@ -3155,7 +3155,6 @@ void LCD_FillRoundRect(uint16_t _usX, uint16_t _usY, uint16_t _usHeight, uint16_ LCD_FillQuterCircle(_usX + _usRadius, _usY + _usHeight - _usRadius - 1, _usRadius, _usColor, 3); /* 左下角的弧 */ } - /* ********************************************************************************************************* * 函 数 名: __MemoAddStr diff --git a/User/bsp/src/bsp_tft_st7789.c b/User/bsp/src/bsp_tft_st7789.c index 5c44794..d44aff4 100755 --- a/User/bsp/src/bsp_tft_st7789.c +++ b/User/bsp/src/bsp_tft_st7789.c @@ -19,6 +19,7 @@ #include "bsp.h" #include "fonts.h" #include "param.h" +#include "nvic_prio_cfg.h" #define LCD_DMA_CIRCULE_MODE 0 @@ -200,10 +201,10 @@ void bsp_InitSPI5ParamFast(void) /* Associate the initialized DMA handle to the the SPI handle */ __HAL_LINKDMA(&hspi5, hdmatx, hdma_tx); - HAL_NVIC_SetPriority(DMA2_Stream3_IRQn, 1, 1); + HAL_NVIC_SetPriority(DMA2_Stream3_IRQn, TFT_DMA2_STREAM3_IRQ_PRIO, 0); HAL_NVIC_EnableIRQ(DMA2_Stream3_IRQn); - HAL_NVIC_SetPriority(SPI5_IRQn, 1, 0); + HAL_NVIC_SetPriority(SPI5_IRQn, TFT_SPI5_IRQ_PRIO, 0); HAL_NVIC_EnableIRQ(SPI5_IRQn); } diff --git a/User/bsp/src/bsp_timer.c b/User/bsp/src/bsp_timer.c index 2e31ee8..ebac9a2 100755 --- a/User/bsp/src/bsp_timer.c +++ b/User/bsp/src/bsp_timer.c @@ -27,6 +27,7 @@ ********************************************************************************************************* */ #include "bsp.h" +#include "nvic_prio_cfg.h" /* 定义用于硬件定时器的TIM, 可以使 TIM2 - TIM5 @@ -701,7 +702,7 @@ void bsp_InitHardTimer(void) /* 配置定时器中断,给CC捕获比较中断使用 */ { - HAL_NVIC_SetPriority(TIM_HARD_IRQn, 0, 2); + HAL_NVIC_SetPriority(TIM_HARD_IRQn, TIM_HARD_IRQ_PRIO, 0); HAL_NVIC_EnableIRQ(TIM_HARD_IRQn); } diff --git a/User/bsp/src/bsp_uart_fifo.c b/User/bsp/src/bsp_uart_fifo.c index ef88814..63771f4 100755 --- a/User/bsp/src/bsp_uart_fifo.c +++ b/User/bsp/src/bsp_uart_fifo.c @@ -27,6 +27,7 @@ #include "bsp.h" #include "main.h" +#include "nvic_prio_cfg.h" #define UART_GPIO_SPEED GPIO_SPEED_FREQ_HIGH @@ -1131,7 +1132,7 @@ static void InitHardUart(void) HAL_GPIO_Init(USART1_RX_GPIO_PORT, &GPIO_InitStruct); /* 配置NVIC the NVIC for UART */ - HAL_NVIC_SetPriority(USART1_IRQn, 0, 1); + HAL_NVIC_SetPriority(USART1_IRQn, UART_IRQ_PRIO, 0); HAL_NVIC_EnableIRQ(USART1_IRQn); /* 配置波特率、奇偶校验 */ @@ -1163,7 +1164,7 @@ static void InitHardUart(void) HAL_GPIO_Init(USART2_RX_GPIO_PORT, &GPIO_InitStruct); /* 配置NVIC the NVIC for UART */ - HAL_NVIC_SetPriority(USART2_IRQn, 0, 2); + HAL_NVIC_SetPriority(USART2_IRQn, UART_IRQ_PRIO, 0); HAL_NVIC_EnableIRQ(USART2_IRQn); /* 配置波特率、奇偶校验 */ @@ -1194,7 +1195,7 @@ static void InitHardUart(void) HAL_GPIO_Init(USART3_RX_GPIO_PORT, &GPIO_InitStruct); /* 配置NVIC the NVIC for UART */ - HAL_NVIC_SetPriority(USART3_IRQn, 0, 3); + HAL_NVIC_SetPriority(USART3_IRQn, UART_IRQ_PRIO, 0); HAL_NVIC_EnableIRQ(USART3_IRQn); /* 配置波特率、奇偶校验 */ @@ -1225,7 +1226,7 @@ static void InitHardUart(void) HAL_GPIO_Init(UART4_RX_GPIO_PORT, &GPIO_InitStruct); /* 配置NVIC the NVIC for UART */ - HAL_NVIC_SetPriority(UART4_IRQn, 0, 4); + HAL_NVIC_SetPriority(UART4_IRQn, UART_IRQ_PRIO, 0); HAL_NVIC_EnableIRQ(UART4_IRQn); /* 配置波特率、奇偶校验 */ @@ -1256,7 +1257,7 @@ static void InitHardUart(void) HAL_GPIO_Init(UART5_RX_GPIO_PORT, &GPIO_InitStruct); /* 配置NVIC the NVIC for UART */ - HAL_NVIC_SetPriority(UART5_IRQn, 0, 5); + HAL_NVIC_SetPriority(UART5_IRQn, UART_IRQ_PRIO, 0); HAL_NVIC_EnableIRQ(UART5_IRQn); /* 配置波特率、奇偶校验 */ @@ -1287,7 +1288,7 @@ static void InitHardUart(void) HAL_GPIO_Init(USART6_RX_GPIO_PORT, &GPIO_InitStruct); /* 配置NVIC the NVIC for UART */ - HAL_NVIC_SetPriority(USART6_IRQn, 0, 6); + HAL_NVIC_SetPriority(USART6_IRQn, UART_IRQ_PRIO, 0); HAL_NVIC_EnableIRQ(USART6_IRQn); /* 配置波特率、奇偶校验 */ @@ -1318,7 +1319,7 @@ static void InitHardUart(void) HAL_GPIO_Init(UART7_RX_GPIO_PORT, &GPIO_InitStruct); /* 配置NVIC the NVIC for UART */ - HAL_NVIC_SetPriority(UART7_IRQn, 0, 6); + HAL_NVIC_SetPriority(UART7_IRQn, UART_IRQ_PRIO, 0); HAL_NVIC_EnableIRQ(UART7_IRQn); /* 配置波特率、奇偶校验 */ @@ -1356,7 +1357,7 @@ static void InitHardUart(void) HAL_GPIO_Init(UART8_RX_GPIO_PORT, &GPIO_InitStruct); /* 配置NVIC the NVIC for UART */ - HAL_NVIC_SetPriority(UART8_IRQn, 0, 6); + HAL_NVIC_SetPriority(UART8_IRQn, UART_IRQ_PRIO, 0); HAL_NVIC_EnableIRQ(UART8_IRQn); /* 配置波特率、奇偶校验 */ diff --git a/User/lua/if/lua_if.c b/User/lua/if/lua_if.c index 75bf5f9..30fb46f 100755 --- a/User/lua/if/lua_if.c +++ b/User/lua/if/lua_if.c @@ -262,7 +262,7 @@ void lua_PowerOnLua(void) lua_Init(); // 重新分配内存 - lua_do("beep()"); + //lua_do("beep()"); } // 装载文件并初始化lua全局对象 @@ -356,7 +356,8 @@ void lua_Poll(void) if (g_tVar.LuaRunOnce == 1) { g_tVar.LuaRunOnce = 0; - luaL_dostring(g_Lua, s_lua_prog_buf); + //luaL_dostring(g_Lua, s_lua_prog_buf); + lua_do(s_lua_prog_buf); } } @@ -415,7 +416,7 @@ static int beep(lua_State* L) { usBeepTime = luaL_checknumber(L, 1); - if (lua_type(L, 1) == LUA_TNUMBER) /* 判断第2个参数. */ + if (lua_type(L, 2) == LUA_TNUMBER) /* 判断第2个参数. */ { usStopTime = luaL_checknumber(L, 2); } @@ -424,7 +425,7 @@ static int beep(lua_State* L) return 0; } - if (lua_type(L, 1) == LUA_TNUMBER) /* 判断第3个参数. */ + if (lua_type(L, 3) == LUA_TNUMBER) /* 判断第3个参数. */ { usCycle = luaL_checknumber(L, 3); } diff --git a/User/lua/if/lua_if_disp.c b/User/lua/if/lua_if_disp.c index bee7a9b..ac180db 100644 --- a/User/lua/if/lua_if_disp.c +++ b/User/lua/if/lua_if_disp.c @@ -35,7 +35,7 @@ lcd_draw_circle(x, y, r, color) lcd_draw_line(x1, y1, x2, y2, color) - lcd_draw_points(xArray, yArray, size, color) + lcd_disp_label(x, y, h, w, color, str, fontzize, front_color, back_color) void DispLabelRound(uint16_t _usX, uint16_t _usY, uint16_t _usHeight, uint16_t _usWidth, @@ -63,7 +63,7 @@ static int lua_FillRect(lua_State* L); static int lua_DrawRect(lua_State* L); static int lua_DrawCircle(lua_State* L); static int lua_DrawLine(lua_State* L); -static int lua_DrawPoints(lua_State* L); +//static int lua_DrawPoints(lua_State* L); static int lua_DrawLabel(lua_State* L); /* @@ -86,7 +86,7 @@ void lua_lcd_RegisterFun(void) lua_register(g_Lua, "lcd_draw_rect", lua_DrawRect); lua_register(g_Lua, "lcd_draw_circle", lua_DrawCircle); lua_register(g_Lua, "lcd_draw_line", lua_DrawLine); - lua_register(g_Lua, "lcd_draw_points", lua_DrawPoints); +// lua_register(g_Lua, "lcd_draw_points", lua_DrawPoints); lua_register(g_Lua, "lcd_disp_label", lua_DrawLabel); } @@ -539,86 +539,6 @@ static int lua_DrawLine(lua_State* L) return 0; } -/* -********************************************************************************************************* -* 函 数 名: lua_DrawCircle -* 功能说明: lcd_draw_line(x, y, r, color) -* 形 参: ... -* 返 回 值: 无 -********************************************************************************************************* -*/ -static int lua_DrawPoints(lua_State* L) -{ - const char *pX; - const char *pY; - size_t len; - uint16_t count; - uint16_t color; - - /* 第1个参数 */ - if (lua_type(L, 1) == LUA_TSTRING) - { - pX = luaL_checklstring(L, 1, &len); - } - else - { - return 0; - } - - /* 第2个参数 */ - if (lua_type(L, 2) == LUA_TSTRING) - { - pY = luaL_checklstring(L, 2, &len); - } - else - { - return 0; - } - - /* 第3个参数 */ - if (lua_type(L, 3) == LUA_TNUMBER) - { - count = luaL_checknumber(L, 3); - } - else - { - return 0; - } - - /* 第4个参数 */ - if (lua_type(L, 4) == LUA_TNUMBER) - { - color = luaL_checknumber(L, 4); - } - else - { - return 0; - } - - { - uint16_t i; - uint16_t x1, y1; - uint16_t x2, y2; - - for (i = 0; i < count - 1; i++) - { - x1 = (pX[0] << 8) + pX[1]; - x2 = (pX[2] << 8) + pX[3]; - pX += 2; - - - y1 = (pY[0] << 8) + pY[1]; - y2 = (pY[2] << 8) + pY[3]; - pY += 2; - - LCD_DrawLine(x1, y1, x2, y2, color); - } - } - - return 0; -} - - /* ********************************************************************************************************* * 函 数 名: lua_DrawLabel @@ -695,6 +615,37 @@ static int lua_DrawLabel(lua_State* L) return 0; } + /* 第7个参数 */ + if (lua_type(L, 7) == LUA_TNUMBER) + { + fontzize = luaL_checknumber(L, 7); + } + else + { + return 0; + } + + + /* 第8个参数 */ + if (lua_type(L, 8) == LUA_TNUMBER) + { + front_color = luaL_checknumber(L, 8); + } + else + { + return 0; + } + + /* 第9个参数 */ + if (lua_type(L, 9) == LUA_TNUMBER) + { + back_color = luaL_checknumber(L, 9); + } + else + { + return 0; + } + { FONT_T tFont; diff --git a/User/lua/if/lua_if_swd.c b/User/lua/if/lua_if_swd.c index 6b1f161..e8d1dd1 100755 --- a/User/lua/if/lua_if_swd.c +++ b/User/lua/if/lua_if_swd.c @@ -261,6 +261,13 @@ static int h7swd_Init(lua_State* L) return 0; } +/* 用于PC机读Flash到文件. 读之前执行一次 */ +void pg_init(void) +{ + GetChipTypeFromLua(g_Lua); + h7swd_Init(0); +} + /* ********************************************************************************************************* * 函 数 名: h7swd_ReadID diff --git a/User/lwip_http - bak/Fs/404.html b/User/lwip_http - bak/Fs/404.html new file mode 100644 index 0000000..226977c --- /dev/null +++ b/User/lwip_http - bak/Fs/404.html @@ -0,0 +1,21 @@ + +STM32H7xx + + + + + + + + +

                  +
                  ST logo
                  +
                  +

                  STM32H7 Webserver Demo +
                  +

                  +

                  404 - Page not found

                  +

                  Sorry, +the page you are requesting was not found on this server.

                  +
                  + \ No newline at end of file diff --git a/User/lwip_http - bak/Fs/STM32H7xxADC.shtml b/User/lwip_http - bak/Fs/STM32H7xxADC.shtml new file mode 100644 index 0000000..005e731 --- /dev/null +++ b/User/lwip_http - bak/Fs/STM32H7xxADC.shtml @@ -0,0 +1,70 @@ + +STM32H7xxADC + + + + + + +

                  STM32H7 ADC Conversion +                    +                    +                 ST logo

                  +
                  + + + + + + + + + +
                  Home +pageLed +controlADC +status bar
                  +

                  +
                  +
                  +
                  This page +allows you +to get continuously the ADC 1 Channel 0 analog input converted value. +This ADC Channel is connected to the
                  +
                  STM32H743I-EVAL +board's +potentiometer. The ADC value is updated, automatically, each 1s with +the last +converted ADC 1 Channel 0 value.
                  +
                  You could +check this by +changing the potentiometer position and check that the ADC value is +updated, by an +automatic refresh of this
                  +
                  page, +with the new converted value.
                  +
                  +
                  + + + + + + + + +
                  ADC +Converted Value mv
                  +


                  +

                  +
                  +
                  _______________________________________________________________________________________________________________
                  +
                    +            +            +            +        +    +         All rights +reserved 2017 STMicroelectronics  + \ No newline at end of file diff --git a/User/lwip_http - bak/Fs/STM32H7xxLED.html b/User/lwip_http - bak/Fs/STM32H7xxLED.html new file mode 100644 index 0000000..5853c54 --- /dev/null +++ b/User/lwip_http - bak/Fs/STM32H7xxLED.html @@ -0,0 +1,74 @@ + +STM32H7xxLED + + + + + +

                  STM32H7 LEDs control   +                    +                    +                    + ST logo

                  +
                  + + + + + + + + +
                  Home +pageLed +controlADC +status bar
                  +
                  +
                  +
                  This +page +allows you to control the four LEDs: LED1, LED2, LED3 and LED4 located +in +the STM32H743I-EVAL board. To put on/off
                  +a LED you have to +check/uncheck its corresponding checkbox. Then you have to click on +"Send" button to submit the new LEDs
                  +configuration. Finally +check in the 
                  STM32H743I-EVAL board that you get the +desired +LEDs +are putted on/off.
                  +
                  +
                  +
                  + + + + + + +
                  STM32 +Webserver LEDs Control
                  +
                  +
                  LED1
                  +LED2
                  +LED3
                  +LED4 +
                  +
                  +
                  +

                  +

                  +


                  +

                  + +_______________________________________________________________________________________________________________
                  +
                    +            +            +            +        +    +         All rights +reserved 2017 STMicroelectronics  + \ No newline at end of file diff --git a/User/lwip_http - bak/Fs/STM32H7xx_files/ST.gif b/User/lwip_http - bak/Fs/STM32H7xx_files/ST.gif new file mode 100644 index 0000000000000000000000000000000000000000..c639fa0144271f67e8f00d20f71a8588b4b0fa28 GIT binary patch literal 4852 zcmWlY`9sT%r3+KhiKR%CX6clgv&pcOyEGZno0h{ynH;@ItTwjt^;NOfbO~Dc*$KbGH1sraZT@# z{;pVugnDVCvTb6Ld$GnP`22#9Sg*vq;0$Tyz~t^yW&Wc+;?W$7U7;?K;=b?GqP!Xx zN&VV$WxX%^1M}OZC1uRe*i>=eE=Zc+K1lNk4ZT|99FsHt`CrxB$*sFW8{4|G?<#X{ z*IVw6U4N>RHDUR~);-zEEbjEmZkV)A;Cb`Y}<@ zdyU0`u)uu9>Qhq3W3jrNu-bl&J}MYR>1XlD<`VLMW(>etFE#pmMK>xR zP)tF(^!2*T>u+x$3xBIXcG+75eQ9>weblm|n9ZIY%?9@jfHnQK&GDme#+U zls5OJ7S{B=9^w@$LksICr>3p<#m@bimR8rFj!vt;U+=vwlp&P3Cf++#+GcR{%J9rD z-JN;7!`$d}*F)zWPUIH3RVyAfcZ=?KtKUtAT~nBzDKj`E_KcHSbA{$YDeqFfL5OI-xXhRv z=6ouL>KnE%uYN~RSoXbcMcdHK%yfEg+1fOPo2Z6%T)cR{aNy%KJEI2vI9(-IoP)%< zg*EVN&EVAB;X*}jNlo5uh1D@pP~zS@Jx4z z@)g}(lhb9dr+MYw;4$fonYneDiZ#(SOJ>o)|FHX?{`Uk9KM$l4Ougl@rX;+c4X;C9 z+>$~w_mz6rmb7LVIvgA7s4Z>JWVomM;V%r_53eM?D0ZkVgR@tp-LPnjW^a%VF(;gZj(=hf{iM0JJ`IEQ$#aO#TxX6t|;_Ws`ID;y6yohTVkK71ox(gG)u7W*q2 z{u}9V__EyE>`j4p|NXFs+O`6O;cdR(lDh?di>&tw$L6(~amj4psTViTug;81K4;XZ z>13717oG^^k5zd5^VHz*CE2O%k!XV>>ID3M z^{O>xop*5yimIr~jGnmX)RS&hZ?%6Bb2N)hd@H>B-Xy{=sT~5pkBwxqu+|z0c#j3r zzlCw0V)XuOFIevo<&d;&ILiDIhU;5=BkD=09JIbu_O&Z7Q0zR4DjSoOrv|-rYQ28j z+qne<#laY)y-wAq!r1TQpNf16+`TQ=Pc~~XdnQ$#XuXbA$#zRR%&P2GGGUmsMJVvX zWxYL#bLoX9j-t+nMYfYF){SnO7Nm&g9O)iCO-T5RIo5xP3WPgZ4B zMep^rZ!^0YW{+cBC*N&#`75lhW6|;D_3gvG-X=r$PqIvw;y?85YrJ~=%fqqq^@a=C zR`TW*x|ej^SLiEsNSTBWH@9x_|5)|qF@Uqv!utIoDWL9`I?om1skDr3{*N|kmGr={ z+Q#5bQzwd#gR(?xuSJ@b?#^kGlD`*J)J%2R*{1dY$2&M<#3@ss+naUHJ4QZselYp9 zhlSglhu2q%wJR2i9B3V0-^5+LY_H|t`gX)nZ;n&x8H5o2lCMNtb?|+&RP_8Q3gSHJa{r?EUvK-J4>A(HjXue*Q2m#8 zi`-4oG+O(jX1x0qQ~P3Y=94VNzjia8tCRG$rH1KAKB-rVcOna!TW}0@@^$?avCFPm zj!%EdSefaf%d*~y)~m}BGB`>{0ym50SeU@sXwIvD+G!IF*QSzR-5LHpV^))hwM0H0 zcD0v|)pmIrjwK|xzu{}+J;v{>{Q3Jw2pY4HQ^|xDUXdW0&1%tCHE3j`AyE2`Rp6v5 zA#mz+ug-m-TK^~|g-Y1iJ31J29$KH-)V|PeguIIDV_J6vTI0E_etJAu=O!0z`nn>; zxVboa1@HZuW0klAqLq4+r;6O?U!-6&<~U21J}J`8wR&Kt1fVN0d#RyZge8O$P^lY* zE7TNsLp8g;g90`Ni;SLHQTKW`rIgDkxptO|gHm4@&bV7Hx4Ol!`;Aj!mhzSeBNRwzE4i=g2^t&VoU26T9r3iI5WJSKNiA3f2M>c@q7V3bD8^ zbeS;K-Qs{eku=w`&amr}?XgX5tJ?6M+XoP4VOTwvjzrM7B^3oJ zlTUjtOpJt*F%Ree-XmP4cNao!_y!aFU&Gjy7Rhc4YJCzDv#;iMD@h)+Y@hTymv0(+ z{2KNFlgxxVO1KbfmxeI2nJ&63c)xT%;YDyGT_}tiw59_rBYrUWIcH$=unI!hrDX&} zrZ|C;0w<#;{C3s^ebvV{rAxC>h~|*f5ql$~+BVbnawVByLz}$FW_;^C>>I;%JHVK} zsbpU8!3=Kmk3<%)k(B*fh{IZ-JXKHCkwADd%!p-_yFxP zVMKQ5&ix&mKdtJjyTP?HRyE_|o`K3bbV^7dJr%b(#dK;48z=fti zj}3hL5M^?*6^ihAsF?|xJuFQ1z)bQ}wyToLlT?`ac>sUS5Ka8RZ8O~TgcYGpnK!7o z(Q5b`frRGJ_Vd>MCDpZHTzd}@ht0D~QU z^HtpbRGp`3TMkF)b2{GfP(I_v$dhuvcwyO2b_wk)`PQzW7j`k3<>Ys$=z~ zJNPp{drP^i=-t0{1tBo~pAAkwn_VS($EOYaKcJrt?L8Rt>$!#TYRp4IGaET1{(jyn{DVKZVwr@f#aMiLAh5w;=fx{!m`49meN?WHfH@P+cxyNl+JOY29 zSAR>?Cc_VFv_X~PKYfYOY_M3K-1dlpwV#8iPi4(ao7&_B zYt0DwPA{wS+Sc=qs)XAO;mBc$ z1*4b6wt&>jK9Bw>oO$`zpGP`3H?9D*2p+c-cYxn$NMuEAphHwQE^J-GLL_#hi9D|7 zYFQI_WbM3O@{din?`T96QAGJ|hR0EpG9x)a(&0q=sd1|q6d5PNaU{)gEOIo7gD^wqgyu}i$RtrgTAQqtXu{@5tuUPg8e4zpbXOncI zKwHEfrHYDB5p`fH+bZEb6C`jvMk*3~8$>5YqRi?Cyepw5S@ui*@)6Bfk^RA7q;W0jN4-{ z0_qHmOUB2lRlo>aZ?^$pH7`T^(hw3W@(TuuB}uN;;+6KCTY(6P|=IoM6Ary5%k$Yh`K9(dw=`xT3S-L_NVv0qURHEOjz!wZ`rX-oe!9Js< z32{i*D<-2n{^KIY0q#YZfPiaB_!1Fx<+~cMsB?nQ#APc-OUoEk^ zFlvN((aY%Sfmw5(s+?#X##{!70yFmUasOzU3zI36tjo#Xn7_Tq&MFe%d^L73mzb@` zAEa$&k{jePiCiE=jas!N=?6d|G0(@scnpNhQIT2~C(nPoi}{2jfS(K;nYTj?0IOV4}|}4j`BghvfyaJ zC1Vxgzr>_CMCT%!Hypvqif~pD}`3t%cvWRXpPZ~Sstm$l+jph)0NGE@Sgxoxg6cE zM_LP^%B@Pw^z?p59%4LnsFmSrERn6O0NbFlzTK!OEmI~~*#zNyk>wU0TfWp)%n_Zqq1gjD|fV zK?kd_KN#_=`Gu*RbpIvDIDz|+3>OKLY~}?PhJ2J6giZTN$>3m3Ve*iS5(ibq(MUWN z1y-Xc1SB(B^^h8w%0QonvEKxw4mA>ns+BOtSW6j#5ng=X(~UP{&sEgYNHjiy&H@5h z2p=_KGX#vz<{yC(9egkj#vTR0IKFNxjCk5bY6HLl2(00tZD2&M3JU=Q8v)jzgKU#g zhM33%4!Vs`@t1)eT2dS5b~uxm0VDn>$wQrp0cM3_oqYMxNFQI20-%*@)CddLOe3-Y z^oRht;E3*i4iedf$z|TE5?H+ILMS-82l=;;`hwwVv~)YwltbAqz{YWK)hc|hEF)b@ zX`6>JH2`K*MvPO}d2!HQ5XvzD@5Q`=j;Xh^Mh6I1{>Lbg$*8~8sQ(yXfEv{-*BvP# zrm9w^aj^O%$6Z=5-Vr z=EjL1XDlKC{U4+BgA#)4B>k>HA>H2OsSr6Ota;Df5ZfkA; literal 0 HcmV?d00001 diff --git a/User/lwip_http - bak/Fs/STM32H7xx_files/logo.jpg b/User/lwip_http - bak/Fs/STM32H7xx_files/logo.jpg new file mode 100644 index 0000000000000000000000000000000000000000..734a36b33ab245a83478bc1ce0768c0c153ecc08 GIT binary patch literal 2554 zcmb7VlA{PaPg~cw(N{NXh zC4_|$N(kf?Ig|oQR7zP@Szc9E9wq-RgpG@f3(5@@fI`=5;nG|J zYDQLxLYF-$*;9h(8zkGD+&pe1CaF?JJt#Q&)45xW4fvmEfaBZ`<~-LFVdu&093XDc ze-?j(Ibd)BX*ICXuHX%fm33m}6v^`)iwW?6&P5mq1{eTs8dk>KR;A&M(*EMNrE+o( zY9E+IY-%eaTXPq(vvaou9~VwH*A^T*qeau+Mv!YrhWmErk*-QhvAWH&^=;da1imV2 ze;gn-#>@~4P>-f+v031s_5ZNK!B%15zu!C!DYT zHt#zcJ+_UuaVxT(T|XqcZE7%jdmGxf4Uq8)n_}yG*jUwXV?Y%9zgesI;s)>RSin4T z%~n(G3_6hGZb|#=@zLL9<1O*$U`=YRP8WK}?z+1IjC)I%) zquC7Usa8yl#bDla-F!A}MsB)124^+@D7QHhV0dR zU(qC$V)(V|y6tPYpo0m?bL0mdn;?w&ecz?D#(dZ_nr4FHuqjePViWQmwd&;LNaHNG zlL%#gaF)Mw=9{>`R}Z##Uoo&hEUaTjp_3k`WqnMS`XKLhL1y`wp^AI7to*@y+!IBH z#d^^$UVu6*5PO?LyxTh`P)|Y$hVpbDwPCBHEA4UZ);qPCH^0jNGHB-bbf;1&UHSpR z!1}r3QFL_AVy5lQO)>7(X9u}xEq;r?9=f|8mX*&0ITr@yE!aOH{i!|u3v;Rr*hP52 zSO9akguzTddg~Kc*&rU%YS=d~kwWqQo*w8Wc~G_{^I3{)?;2d?vw5xe+4uc{EC98u z8=JPPsnIg>DW%`lu0<57%``7KIxMTu?}#j~yF+1wuU3>3URrIldF8}_Fx=3X z`5bm^Yah1G#EKL0GZnB&JYJ*kLRf%6J&bec53kAJI~Fm~uT?!tT8GiLJqw-0x-#PU zWO+#CnG~5X>U!u2iQOzeR#KaO%l~@IZ?EY`)=`Cxf#`zPyCoI=FZd`uhc1Qw6HZ$} z8>6qRMXU9G(Z%B@xd!SMw{M>Id?1fGTht#DQER2OtxuMt!EPst+CDIM(*T(s8U4P-IJCPDg&AbqiHRq1RVe$1Y6-W_tiR2N;H^BTAvUoU zrL?b;s(KL6uL%>IQHrE4ot}$0r4~1%9Vk&RK6}Gj%;bOtG*dPGg3ae8O{bSEPe>)# zco7m?ayxLYOM^=eZ6l7!MM~|#9D-|^p(k_Fn4eGSf7)eMjHBA#JM6h(=PrT{aglm+j_{f8qUETh34L9ox#dRCRz&JO5BO>- zX?9=pRYi0&4#EdpPxFm)yF09~E@6k}hK%2KKPf8QsoN zV1F{Ae_ZrY&3(S+Jk_q2itcO!$b?UanqTWsqL8!_{qEKB0NpRAciPhwe>AzW7Ucml zPI~i3GexpZgwWo=kdOjxHFng-O$^4Vcj)~&Ql(x_u6}DXKT5{uJlCFoF`%9mb0*Ym zmNJwd5vP&VA$Y2s4^MuLxWAg7p_X%PIs7wY;JYoxlK(C1R0^Yy;AkAduTpM&b3+A< zn?l}~Y#Xj57+o8c1xbZp`f}PZ((PjQ$SCxOfT|$6q=0g_h_pFECtpq>(s-z}UlG;6 zOun`ygn@C6`w-qdOwn$}kdrLTA`<@P9YvP zfHIaDxG-Gi_1F%}m*q8UuexuiDyvKPXY4B{Ok+x_u5P%{>SY>H!^+wgTn&jSUNdW* zLfVPu*vr@qY7Mew`lsjeh9>lUGKHH0#XNxC_z`M@=0zc0p6+XGO>dVPsTIRYlLnQm zYaV*&iYYv?0!!q$IZEtO7PF!bh1U1II`w^hVv1pAMbE7zo$;Z0I`ed&LphHzCLU^e z>ctnfJa*l0NG}&vL~*cNN1~a(SteZgyQzV~O@g;oD>yQX{!hySYlQjG>CZu> zoO7GLvuO>~s$yR4@mDBz#S9d689Q(zr`&-jAuv+3aaBtvbcaaK4SQVOKXYNow4OIb zI~%eAxBYM{kjn>)MpMd+3L^7<*n?C%bgqa4oirL8t|j4>n}EW3yuP?eQieZ?yj_g8 zx4q21+G3eKc{Dw3&5$-vh?M(Sx*!SB0_nV|_9e`WN4>kc!QDsJcN==zWMb`aXmKDs zN|)2)Z_LG7_12A)K+^|00z9ia*BlL3Pw&XIOcT1BS19(-d{{?@GtO=6DJ) z%0Fh#Ld4^Q(u*k7sA`jp@iD*cyPXNtT`H~8{YU!grx8EueI*zlT2_UCY$;Y0w|j5+o#n1vE8{YUnrsjU Ye&xol&5oUx;-zB!S`liRN(yW4pG>V~F8}}l literal 0 HcmV?d00001 diff --git a/User/lwip_http - bak/Fs/STM32H7xx_files/stm32.jpg b/User/lwip_http - bak/Fs/STM32H7xx_files/stm32.jpg new file mode 100644 index 0000000000000000000000000000000000000000..fe4b996141f30415a24d19bd0b9d67744d3b1519 GIT binary patch literal 40619 zcmeFZcT|&2w>KQA3L+qc4pF)kk=}`jbP%bbqZDZZ(pw-R(wl&wqV!%Py@T}LL+`yq zLJcjvxu5$z=RDte*0C0TB4T2a2M@_e9*{pECMKgI zBd4GQ0)h8QscEPvX&zDnDgPpJ2N&B05C0xM{yj<(ViL;#&)4lA0QucJuW?0i?=S;! z$nW5i-??oEfB=9y_*icLV)%bwcW|&g5)j_KM?{RRP)P>Bxr2*~gNOSU*Vx*A*#86Y z$nhUO=9eX)(0ohC>`W;T5SxCNX!sFtrBBc5OA0B zMQnO$%RLrBEhNy~WrT=|RcM(F^_OV>knF!E*r)$rlKs12{~^~5;6Cmh?BL;&1HgbQ zLJZYm1Z<1<77#al3qVmeBdev1ZUM4R*NGvwfY6ecyplF0Kc99&Bo5I=raZTRv}%m1 z+%2G8JES9(3N{S61+Zn@0#>-=$-})=c!FFD%_5k%!Nu|Q zkMb5Utc~qu1>1{l+e%0{c#8weEeeJb?laHQ9iTD^@o>jo2?-mzZodT_net)SzhS66 z!)^ipUT=WMJh>|2i%Ie$^p6$STL3@!`dh>;AT0M5(Atj@y}@ff!o#xXD$6CyNG0px zW{=`-&&8OVUEpAe{gPot$74QWzko69wST^zMn^oVmtaH3u4r7|y#=gc3p&XRt-rvE zl_v)CJO)d+i1g{NQcX+hcbC^MQ7o{2#aqB5Y-u061uVZs$6!8z|3U4y9$3XQVPF1B z$-p97-}Et-K*-+&(x5L;)Hiryw}29I?63%jt!pPT5b*?gIK+f9{ZqYMQjk{&<`d|G z0Lxq{w9cgqJ$_WuS})QS(|{c%S<>r35LTh8w}5+_q2MiS%P$sKJ=)XAp|vMS4aFgE z>JRL(TJVNrwTx}>s0+*GDE5KpKR=j&Om7`2X3OYKiT}v|o7Cnl;Gb&$)qLm{fRT;) zOL#b|kLFsqap7-QnGN_ghv}nRKJAjv{Wi zz?g&nq3!RBZ*c!TZGpkV2oe%3gBL#<7OA9+CF~Y2cu8*o? zW}d!tBV0L;6ubpIhW%}pIij7UG-u=3>23(ZFxOTEr`tFWJk^nT=QeN!fk^SN-<$?<2&r zVq7Q}9+r8Q(f7M#DAixwACX!CYXy_Nh5DaM0B0$zJ={#dF_-VKHg^5&Mp1YJhD0vT z5Mr>MTxZ&1Z!u;NbYDxIb##NIXU5L3_n9Yg;LV!jU~W0?XtT5o7gPX&0eTfUaJ<%L z<>0e-BY5a_+(zm=9NpOzLdXUD#=2DdEe>(K>#HPV#o?qq30_`qt{}a^YUx4&YeW}J zF=#KRecW3BcFtlnE3h|3_^&Ov_6`CZ>({-0Rtf%bvpJIbpSe=JmJ&S+xCNyDHG4T{ zV7CC4$w4>GQ#(+1(;Cx6?lHLGQV_#LfAt(Yzy7N8)d749h~2scgal)T!6(=+>+~8} zo%vi0hRYPoT~N;j&LA+>=cx*?wl6)1fslE0^>VhBbEr68dCJnZQ<-S)W^%l^5@-KZuH|0Tk z>DLhlvio*0!K`^5TRl{NA&eV-mDQ~DW(9P!l>R_0$19m+)h ztFHc~^Cs7fn8Mc>`SVBrGf@9CQ2%35{|{^auUHiKe{u@`bp`LT^*gv$vJBDXGxSx- zRVh^8901J4QoNjoUZzi?Tk&(b#>Ul^9)9WMdY7fY-D0~F68>CRTWFb4rF5(v76f?t zFpK;opGt5vOMd`|S${{9QK=M>A^4oE$ZKC?R;$QuJvxA#%U8RhF4-cVO6Exxb6uB) z{?4E16qejK+&scu9ns?wUD`YxKqUqDj{WTDp^CXShvtKeQ7-H4crD(WfHxUOQ>9x{ z<2^U_D?@0`!*)JW6SUq?OPTkRLOF?r4%k^-vEv`|YP%yj+@V*WngtJ}oC}4=9LM2o zcVA6E+|cNERqpMdp+sc*?!aC!Dd}oQ5?nRi0yGTQ8@y2zZOtSVXtZj7KebhT)rBy-53{)iJU|ah1|i`4Zo6r{=25^Z z#`dV6Ve2ipQg;S?1=6haXt~;$n?R^YpI528O@*0LU6ecvZ-I zW|od0mRLK@%Q5zO*UO6kAzTR8pGe3l0Um8BFT_{Jo}0H#hD)W|b)XgPSNx3H*w5P! z3SF5mV)G)O5=gGp!5>{h@?T{X)Mj`A^Hm~iE&CVQlZIndMnpEnvuwDv>3_Tz^(gJF4hPQ{3&>4eSB54kRy!C*oh&afA*F@}>hREDR-D4|~2Y;BZWY5u%9TGHC#@gr{V*wOGFf6Fbv?Sy5tkv6mA z#mHFXFV<|v;Td&<)C3GWav^=`#^+dZ++k)0Gb+arn>rjgN8T-S`oqiy#L zwpRHFdT5J^E2tsZc-#|t`Fp4Nn-5z4YbNlGZa@oRp780^`xotUKjGTlh3aDob@${c zAqJtE@|1x8rgG=K7qYyLI?=c*Uuq3!4)4=$E^NGgE`3P0XhtSuxzX3Pa%3M?!HlRNx$aOmDS=JBd6=q!rMr}*3;i2>xjm>fn7$GeEE-I z7D9(lv&j(=jL(?$2e4*eh_(H(7tG|&T0Fu+&WJ*q9A?htjfn1Po^{S$ihW6wI$X#@ z2D;1@RojhWIMulB=FwD!^11P9`sEld3UoGws+_w|A!R-;~Yb(HRYt|)_Fc4)V#xo{^3FR==|+-@{V*rYd_DBd<~8MCO- zcw%)7aT-hu(95K%r7shTQlyucV{d)4Sehve$yPmVpI zwBq_wFWtNZk8G~0^!39z35(lYSD#y&oLGDSd)G+aQay(5Ywr}QD3fuhYr=_-1{K-s*Bf2!iL74fECofpL>BM7 zm+W+%=HHKm%;|kgtjlij6e+v+I94v70ck(cIg z{fH@QadFqozK8MMt^{vRefGTVB$9U^8R2k$M6BD21rMUYRPp5Jc4b|$ie#Z;y&xu}Feog_C58rSH!b>B+u4FU*SXCCQf0hx>^_fyr9`N5$ z{9A)^gI0nJV@DGEVt1+VT>vi+2VTH#24fG5E^V9?Qt%76OSWF^If5$5N z3wD9liC|QVMT7xglNXteb9HHD=oB*I(3D0_SVuHWU5ok;Q$=f%&+G{3td?*)X#Mnl z@5pOHUR6t@$25N!JAiY@3maQYJ~5ACw4YtDkiq_h;*d(JQe;f6t3D9P=O8 z6rFLQX7IDq+o(8L%SeuD#@jXYh|0g`lrRuEh0`_?t=9UEPAxj6o!_&lH9FJI8QAwW#m?Ny-Kj^Kgb<{g`nV~ z6g{*i^@7u_Dw(-fm4m4*m!JJXZ}hg-gNbmjcPF5Nt1#mEXAyd3(Q?DecV>2AM02Cf z7K;xSY+a;GA0hTR-VRLm2y}Jn#n_mG=i&UQ+*UpcD18kzM8Yp7!c8h9;&tgsXuLTT=mr(RMD!QN?jOnZRXmI29d~s;;+kylhX?&H0g;T1w?fbDKd-AUqv8 ze^ilJ?8wxMyl(kMV>Of~jNfIRf}!`?``e-?cIZ8owr)yI|*C$Q)~HQ*_vWiJ|~GAA~W)WeP_jH-1~Z^-KpZ5 zfiWsY!S&`*E@NQa6t1sUYL>SsrT)99YOI zGp?s(gZosevGlc&a4st>`Q?Zf*Jcc6*o<%)UAg4F&n$0ZHzc@yOg@MdkCBNKyIeYh z4{{gU7L{04*F>eKQ1kcDM+*EFdvvwYY_h-uXRr0%Q@5Oz7;wevX@;xwbHI#x2f1yp(*coXETUW^Ev*1LjjfMGpbNw?R&NZN_&Ef zHE%FZrXqVFJqlm*TE=!OHhw9(OLReP_uF zzaZBRkG06f&j;F&h5yLUjF|XUdZp9H2v8_R^f8KSW$SOzbf_d~rLc4;ilQN$#(O-ERax-9Kf=5)sp9I+~jKR;=6TEg8< zwm8QP>^X(YOq|X(@~W}8MDKBTDHObjeE{+9Ff9Z92xF zBLW_IwU*({)nlcu<_XY1NJw1tIAESW>eK%OQ;5)XC>Ml3lu+>4nwu|$2j6v z+YCP*tsV8ulSzHlsKx`?T}nM=7XHRFvNn<3y*D(8#advLJWop=eKw0avcC60s+#qK zBA6S4t$BuP&$wqVWTI~!9o)>|Pk}*Dn^KjWxsM9tCTN_4q`5P^ba`zBW7{tWXD&xCHlk@0vVwY*K?({d%voHLkeKV2 z6GHH?1@gL-#eF((=-bZ~f(AYP-#6`Qq*B$+3qZIS9(&IuRytTjrhWbwa)RHXuZ=q& z$hd<&WasplI`tYW6<$4ytWHbO=<7RzTrqK5I>*)7gT!DB6*)?rC{_why z%kZ%DTxb0ZE>1ZtPR#9?8>JB zPB?|MtT;P;BURD%S8ndkm$!w7IMK(E`xiY~L`KcSe85*bsoc_A$Q*BB_s^;GPW`g(9d@m- zBJ5*(husC?{oinqpt2?H*3kki@&KhhGzNO->)OcYf7QJU^eeD3lsD_mB7Pp=ogeF$ zr?g{b_=c-kscv3dEA+^A4lrs>k4AQ30>2#AMLu(i1370SCFxjZ0kk@ z?|X#1C`E?FvG5v3>ZVAFc&R2Qdf{aE+xDN}?oU6?{l8znEC0F*^cGaoPFA!jOzBmM z@_Yzji1Q&jc4G7&ULZyi_uwyNRZsSUS4X=ZR0-Nm?DZP+=q%(sF+112W zHXX8{eNjC)N5uqN173<8Q)P>kwvQ}Ru@sKsIE>X-vGXvJ+Kl?NyX3yQMYds7)tS{f znFfRdF`2L+q}Qvz4>WbK;#p>XhxNoFsBbYZ4#TN>wmUx5)b{imr4$){)_GK+kQ)Yd zb}(mrP8jKIDi8Mxt0epo8|_z+eR?t(Z@C_!Lt?X6JT;N1$>G;OOV0k&eY0qVO{#37 zJ!w3s4LXR+w8Nc*D88;{apgZWaKQT+@o1&0vS;e>aSaWVd^hY&8UALZQvX_ci6Up` z$wt-}npsbCF@h%Nu^ELwYYfMx14|%bsKk2tr-5pj@4!a-PHXnZPhM;$8W%0lBeH(~ zh$e6LSSZ{#iTNz0DV>wNYhGDI%GP(~6NIw@3{atD(D=w;fI<{sEPh)#AKmC=l? zTCS%%&qr)P#2j2ta$A|0YirTIB=ea{%euNl;v~`B!%*H;;uuo2iLk@F?S+jaLbPj^tw&&Q^-pcR=M4Z#Yv6Wo zmSMSq$Ch8rvWaclC&{1U&|Qx!RQwJ1$et53g15aiMKTZp=}5)H@Qa>J23A}Jes^zt z{BG?QKo^Ha_ho^nC9$H@;i|O#j(0A@k5H5s29cS5uVTMk>NtRWDrpSJ1gZ&R)h*9T zC~zVaHS6fAS-taSWNZV}iWRUR`Y+w8SC#aSFUO6)J&ae}eqG_U!z~*xOd*#dG4^Q4 ztC8y-i@0zaiY_Q~;F%z6$V{O!iM=v4&{Qe^P86%Ko|1-?Ui$`~=6C_tn3)1q z>Pma;K`M@pz)~6HtVv0tyb|TBhD?li&fhuzJ*D3&aI7{3lHKtOg4&`&&T0|Y@~oFm zpP>UB>OFdmQX0=rL35yD_u)33c1c;=xl6U5A*ku~SH?mPz=o8*>%};k&**HFMN10N znB$)NZuh}j3VYbe6hCVmH_qKhe#43-+{d4e+h)vnJT+`L=_$DBy*5}}y5cMN8DH@y zjnvd89#|)N(-{~aSi2~5AdT>|FK%BK9-l3H*?a^}LfZY854;aa$ud%hnx$svxtNB+$Mq8l=WA%jNTJk7pgM=8px)a+%VWVw_Dy zKonY0x{{Zv(pq1wsp&yO*+Ajb(z3>yY7TZH60hSU-+IWEK$O*M#zOIcv4U)P|QyhF`A>P6rr8rFLamO z7qQbY9L{BBh{s&467d3FsaE(rKr34}jaR8Ki3o^27^myy=;rg-WvfKYrWagBXIp1X z4S4%GGiGOTnJVYJDM<6|fk!oo`AXbr~^b%7n97Et}z{u~w40qnD%H~g!V!IiGpY$t^0%VIK9M>Kw8 zOt167ytix@v))Nl&7F7XRj(#8E6MyX@OG#Vdfc7Fc{*ndH z+Hv}R@JAY)#!NY6bj0%aml6sI);XQv;0gQ~uoi*38y8=G2ahGBwZz{MN^%SMWP=WA zw||hn8UaTu^86$@6Z_+v%ajs^KGw#Jrj}MkAq%x0ZoL+?`4)>y`b)LpVO|@7|#yej&bhF1OzP zGe#{S>4-FZ0XJ?!&;!1HkKUD3;S~O%q1K3A@R0@w%ldPF3kZ_v>-XhV2r{k(S>Xyh4U#7>EFRqg8u0xXudKX!WZ3)%e5fi} zx^CdvJKH2{oU;6JwBFZ>n`V#E)EXgLl?~w&`unFh{M6cGRxWtK`rYqBFnDQSq@Ncb zh9x!bm;7A0vmts031coFe;nb=RkG=7fgxakloG2@Q~x*w5ney-^?RfyZd+^mRSqv3rHB1cDk%cKDfCU(U1_zfd$Rv0pUr8LY# zx+{w_b#yFs7?e7vps&vU-I1~N7oU@BdxMTwB<=#SXTb@a;Ce>_fl9w`ld<|$WscFb zl&iwE^!Hdu!jWsPJ!CyhG6@vC#&6Nlr}T>39W2c89N7vz5L%xzVOrBn2HpEPBM7yc z!YGho*q7J%3Nek(QKyAP^>!kf1G?QdX+5u%K|p_{n*zcZ#{4*IWk#Ju#)gTk*p))1 zz|oHaS-~~1uv@@GH@+Z$#&3{`gU|M#9#v~!^@ViZ4V+v|D~VYFMOCB*F94fR1m)m( zE4v?ED5b6-dB&*}eE&DsZ_tfJ*XAh8nX3H9(euixl5F7msu(HGQ)vO;)IX5Sz*ec3 zB^XM-O(Nug+GTY`;lW7sVLe9ovMDrm<-D`lca@-O(lD~w`gc^!v>Q6?XxZ%MN2C5^ zs;1V=OrM`SNd@^2>mL(htENTmOLtD$o67j3#Ev=)ST0>jgEK#6(or&J-rb7@0xy9` z80KDP)-Awd#tua09#I%^5o_tdr~Z~f)6&{rN%kFBy*bJUn~NcNxRe@Ojv?=BymH=v z*%==U!56!>O?8fqrP!=Ix1b^%(Pfd+im#q(SL+vpsbYHUxK9?_7m;dwa2~%tx7bMdB3){$rYXRrN_ugNdI(K!?M+4!lF@GT73-2xK9 z8<)^Ui?=$=L9c<&{{TKbvB_u>!*~)|mhtd6M0;f5^e=qW-VH);ujD}~ke;0qh$C-R zhn!dBA-0Sv92luSU7A{Dd3WJ#754&#ufVw^)$!Co8D?jWP+<{M-I8n;%$0B|#NA$; z*Kw|Pj+HI&aw8wIv%(SF-j(R=VSjo3*XCyxtCo-dUWP}m!Fl$J_E-3& zHCH^m&LXrBON&Am1sGAG(|xTj@wnx;mg?Qv%E$C9>onWD@!N)VBB@2_a=j~&Si3`4 z))&;#1JKIpk1|l_z-Z;A@lH`&!%bs^~mkSCV^7+ z&qE4Eqhuw+?RGX}7IE^kFG1{C(UOQ?`9!_4JH4dW%hCB3O0z{nnMJeh;;7` zLI&iOC@nKz*1Gtb2Tm>>2-iFXu7E2%+h7r?_$PkM8bI`?#n-=+8-99}*1voF)l)8T ztkLC4B^DjKTf|G0c;&|5eFk=vm6jFWsfCb_7#yE7%ujql~lIx42rV)yk9_WKjgdM@$Ccqv31f6=N z>ZP&V;4+&%x+_r@7$K>EuX8DRVuqOPZpQAmv8i5kJ4snH(t|lOR^@R`>K~6<2%|N$ zxZB};C5~(6kwZh`gsDE8`JukDjFi7sePY&PAn3-cmtHX|Uk|=jn_2#r`+joe@=|W@ z7T|T2gfhBdYwp1>M>s=RAO<4cI^$pY<&ryV_GTMWa*xVN1G7k`5zp(=@! zP24qR#M}KZgXaR+W@FTATm8WaeyPZBXTC`5mOdSITopOrNSRDG+&NMBz?3i1$s9xt z8^h;s(WW}faZMpa5(FWy6hqX8-L~HIj=YEq73~Qa|Cuj5#`9L5sAgZI_=Z%vYJN&9 zK((5(;vr>Zdfn*$09Oe&piY?MJGtx7(cnqe!w_1g$edvL_RF70GW+A)vtMZ6Tqr*}h8gX%j)l=R zDtdBZz$))QX9wI#S>9#>(o)i|toEjl1@#B;MrkuG{ia!?<(>SZCG!$5bjn|3mE{eI zEd>~P4%n}75-aopr)VG7-`FQbU!xrj7A_hh)ITd-bes9)^?w z#-s`D?TX1A=g4?2dnjJpnP zsr!QW>9hMXwoRGJxtc9M85P=FYoDhHT#Wdu@-dAsJ;9;PDUJQq)7HKa!VrF*8hTlM z&DLCg*tReK$9I>$zWC{e+I4#Y%VQ_>9o#K^54o4aEC`sjiIH+MS~UwT35jAiacZwO z*B*C%ct55el8)*8Ft=?6!mc@wt$vq@it^F>JZZ%w99Qp^;%|mFiFk3Vg-TVOiDvi( zra9ho>L$9ZK661luDhw0VQzaL9;*uMC&y>}$_EY`uzzBk{&2_de3^bZf7_WMh9ANT zQMT|ZGch&{JZ=Xz<8XI1-A89g+Z&EMXda(=Ji+GJrK;=}xhIsPr=7Eu*8OKQv)fgC z_xy^lJG?7xj|NpY-i&Oq`e<2rmgdtct^5dBsOb-#_GR+h;V@}hDFUfD_Iq~cDC>S} zvST-yKZY<#MTQ4`J1!vCOicIMS&K*t`!@5v_kHF4uzd)l9hG6>mk|Z|mTg_@SvpBc zJbAoCi;sXq!-tAyPcd_;bfh1zAEZ!@J-zR2_)i=nIV&5&GGNdbC<|%sQWM2e3+@H;qV>2st-xs$h(^|4agf_U$6uq+<#HK7CE`;F%xTm%_v{(TGR2tubLIaH#( zp#uKrSirHi;5aBuzNHv z&vSQ3Sk8Eq=gjO>QIM1wnZ79NTpcdNA%RAq3NiQUmtnwrryzhSHV(y||Ev1Uuf_Jg zrA%O9NBnlpgI?~vI_`{U<`Tw*UqwC_{ti*Sn?s-TR@X-^i(}eT>7hiZ)HXA^X)o*c z8KD`6^|f7+iba3osD4Tzmj^U1VmpG}z_aRo{wqAR%i?nQ4mK@wFRKDY5MtBhUPkpc zzcU;+u3^QI7^m55jl7#>4+cbo6;PdVGmiDSa(UB-2DY}vk>YxUU;cdJe%HwL zBio=xMMAjwonNA06sqRO+gk zl5Kq1{UR+gvWv9pPTvC=i@Q5EVJr%eAX;1b`@e)W(M>p@ANZ24X> zrgcW@BAqNOr7S$Y%+Y&YAEkFu5vv*<4yvn)?S5t*hKZUbYwc7Q-Ji%?6=VWW2YkIv zX~zrqnMSUMM!i5BiINPZ@n-ee@S-}t#9M%;>(F7*#N~X3BdM;FoH2B`;-Qe^v)&K# z9;aa|l8oKeoZ=vCvbLO=85`oVnGEeCHpg+6eHU{Sciymyab6s~i4Bma)Kffu_D}gf zcYL)C_Ax`&qF?%699U6K)=q^es1s{A@d# z8^~KUUR10TQ5Al{*g`);Db+`3dGJQITa0mcK+0*!W^-(9tWs>Xam>kro%?%}&AMrS zNIB`Nv{Sfd6EbR}w)koB{c_v0OH1b;#STY94m5<;(@HBZ-!o>pBC1^tZUJOc`rxwl z;h==C)Pi%w^_8F4ZUKsK#MGyH;;;6e3I1WUFAFk^ONzQUtlPhV8D*}O>ig(y*A>VN zv@P3VjDMWM_9=-0Uj8Je$)!q85HyP(CwWu&pNR#xD+`it10Y?10#KO{aqVE@DB z`9o_r3#lhVQV?yFkxqyqI-z*3_3EuC&ZE_vARXR|eBr*G`=*ymKjXbTQ%?d@7hKP4 zH&cC(c7_69Ey}ESYYbGfCEV?xTH#Gshuh;9Um)dB;LQ)=!|-jV0^{yFaPWNTS!bK_ zGeSItY!b!%IlhC5Q=Uu#`*y?IfF{{3(J<1oB=^I}k+((;sw*<3ZY&({>4exN-LR&T z0Qv%#eUX(gT6XLq&Jmt|Pt2sJ7@_TPTGjPq$LDEg#xoPuR}Eu7#b&)7k-sjXe{>~I z?Ll;HM9L3-qNvSE1){QrIg^wad}L^Au1Q>&Sdp&^bGz8{>lSs!*39=|xxc*vIKa<9 zu3OIw&Ri=OnxfZ=OlXCv=8Q0wlk^7FMh&4io< zH>ox%E!Y@ZO@LPqwhUXbID)b49E__6VI*&S82nIAI}f3K;OB{oI4eeiTh*WHNqnUn zERiMGH|Sm&}>7y>pdt zws#m{+IJ-a)r$Y)&!_)6(!sGwnMJ&1s1h4wOgLJ*Pjt}qzy=qB3QDRbDth4DW!P%O z=!~wEi9}B?gZIT?)v+vz>I;@!GA5z^=ZNUa4YC0j9<3+F*Ma!6&5b_P?Qkmkh`fpj zgRirO*U_*BuWqK+hH~9Hw89j}L{<=1U~8jV zZjIMND~8K(T{#=nxxCY4V9O^s)UHU@MAA?#Gl@(M5F*8$A$Gu3C>wpuf@j#8XSAcp zfhs;VJq=iDX50diRiy6ok?c&=4TL&G31=?*aG z3qM-CfvPjXywumm5oH2+yenJrb9hh;1_$d5@#w6LGG zZuA~VhJSylnYNU-Wj_;H&tzF-*f44xqZgJ%ulg`BRkp(?HEeGMxfpN~L(=nMs zDvY8Uo_W7KoAa}`EoQ7z3Os6D4<$@VuOh5B7Uzl7zkA^oC3oFGakG})+&`QZZ-fNzhCX}0L@)c^4 zNNvigG)j#_RX@<61?@AiI*Gx(d1nq9CfB$8Lr2u2UnU91i5jrHtu=ThOIRaxc_D~= z{!dHCUpNu&Cv*=I(gtIcdU6xEVsl_P4H^hGGMEt!R(m6cp*VRX?{A42SuBNzV{jVk zvhdJ>twz7=vhIb1a0Cdz?qLt6RvLNRW+m?U>j_QSw!+187}qw|A247*BCr$H1J0?M2%$6CA8mmaVXH~+iZR#ESwR{eE@N&LW9j{g1p*Q6** ziOrB@D`apfi?^nWf0w9U1bAK=B3&ll0qrnzP$;r*(FyLyd~LCKHr@14c-wb4Y5HaW z-1AGlo!3dQeO_lJvl#Z!=)zN(lR>HBM)3j|tGqR|s&@R;`<0a${^&!G6CZdB7Abqe zMDxFQtaoyK^NsE4paf^PfPQJGeAV*T<#_$e2|dWK_Y{K7E8XqEH0!h>KD+tR`Mnp+ znST5AGBDD%8WndIuJYuUO_XOQ@SGWM?_UWiSNgYr3R>O+i-i%IocD1mDJq*%*5aoH z!tj-Os^c~cYxD2sV6mqbU*mp9zU*BTsPND0m3wknk z$yrmCuiRlaP(GHm$+cGjH*}Sy{BbYN8%g$dk!8@|bHCs8t*T_NnR+dTXVmRRwKM4~ zHRsQOC(LDJrfsA7IRSzGiLNFB2{-|6eN)eLo$UtZP#s8EjC@<_!2wyYxOED z0FiV_p^Eem$p|=OWFJKYSDh+@7D}Jiz_0+(o{Cz@8 z%eZ^@Ge14R_lfPbB1j&q>Ptrni!}x5?jhJH&wWf6On%PXh)R{W-U9BQI)$qe6s{;6 zsSYDx>9!u3Z*=x6eK@=Pa~iEx(GJUgbd=Gva^>_2qN-%EF}1u&hi=XH78cEH^~|Xv z&GwHPvW{sKUWx9RI$uDlpx~Rt)1SMA)9#^fOMl1GNm@6U9K*#H*PqNh5RB@I3=A|8 zwtrKGKGutCPB|RAj$Kj^uX5L(#=fJEKVp;kZE~`HzI^>gb$K$RlKai1Kd9WslI`WE zId+Y-H-z9QZ|iUw(j8O$I0uUsh@iu3_0DhLLDpBhf#;oqEt{jwdMAq^On7MP?CqZX z22m|T0wY^@g@<4c=ex;*sj^A^SV-WowfP~GgClg`?PtVpy%MX9`54MUs7Q?KPl-#- z;N783)BEN9ygp$P>hkqZ9N-$;Y-5alrOx&=bf0^VbYzP1cTS#YZDG#K#zi$G4lRK9lP>wSNqsg;()hYh0#JP)%lJ$)zKAxD>z@YaSk7GEua&LdyvHQ}%8 zSLiV0>Qc@jIr@j&6|dG3GzM7ExVGlpNuV*&B#Vx{vWCi|ciq`Tknk6X_wQ-;y^C3F z9oIJNACUR_SDspTfTmqrV6;$+++7U2(ey^e=jRR?Ki_L{vPR8Wy6>AwqsQ78Y2XdI z`A`A0;?nm9()4MiH}<>wQq`8*8$w+lNsW)}Q=pT3F-8yad)O=E7Oq(SRKkO1tONL( z7E!sT^)-{MX8cgmoS{uK86WS_Uqvia$ND~`f1H5VZV0DSzB}lrCZcVzr1P0-1_UF6 zRdCY=R%-|)gWf5n} zWN|7JU3SSYJl|hfrxfA3{>g_t#cy|urjt79L-vFMO{7tM5V+xb<0c1ejs0N(J&CTF zM?d?=oaSfxV-uGw(`7PG;faU)xzQI9EK6?h7`adF&kE2^qV0S^)j1=cX0`zb8332Q z>P_55+?Z_tw>z&ZTr`NEvPN#&_K0nfZktj6(DX9ItehL{E*1Ehe`~l|b3M9AfwG2J zHYWQ_xUUIzF_e0z7(KgSXNc*WNG&q@O}qB4P%$5~*YRipJX1nblDFe;EsMndihx<9 z47FD<{o#WhPrV!jZTs(@&*l(℞12z&Xea2)lJy%1$h{B}hd*CGg~{bRQ65$TP+U zexhAdR*&F;bo(sYi1f3e&DY9qu`?O+3@QC%hJ?pkd~TSZxi2T1;L9XwEI4tYH?`&j~JYWUwY+Amugi~6+aJbuAduv$zJUkeOGL`gC?kv*W6If-Xfy)C-r`DHqrii`ejVC!mZpeW_c=@7?T2W>wGB(0ndDD^numyyK25MlNu zHJn9F)B+bW#XddC8;D!~pl)s}@jeMr)>FZwiR_5-ZBk6&@O!Yk1Rb`Kc~prg(Rp@s zz_$5Y-x&Ksz8|@fA!*cfgRF0%v1*k_%R7q^NLq>L>n~pZLe-zt288osu));3?|ML? zxW~C(+OmzPM7UFq!HY3=WIY+I2&R$kE;p|yo1rI-O@j_`Ck-RlBv}G7Qlpp)qxX~`f6SmR=$Xy)0&Jl@4oc2jm-U}Q&itnF*Ya< zkn3RgNVRi)I^&=pTt&Tsq5C8+^~=3bT7g8NjXQcJ?^8NW9*udiz-`#VvgA zWWNO}rol*yHJI544DiiSgEVlI3j>E-U;%9tj$v#h^&f9TFr6a*7hP`^)m9h2`%;L|UfeZM+9E0L5J(H9xLXT_6n9eGp}4y{B)A6+5c2JOdz}A1`&^uh zWaVyUWMs|x&gc2P&#QMih6z2foM9FtslPaU#7j8oDN~oy8s7)}$g=cx&S=;B;25oL zju|}Jn(g)*4b3@0S~iHK>`NvMK0^&j>U`03-6N3QKjm6G?z|4D(ZJStjz%8c?GRQt zwrCS$uNT6gYM5D8CUS0S(b}rm_$s^A1?%zOk>gc4ZD$)r4!R2`HR<6?Au2$&Dwg?# zu^sl3-H>h4T?j8aliFfQG3&Wd$jQMKP01y*yJphD-om@+pL|@p3gn*bOyYHA4!as$ zJdQUR6YcL`Y8o(kL?bqb$`N?lvph6UN0BC>{srMqr8Ccz6yf z!}_fk{l#E!ePEiULJb4{YK{nXj_dr7mgL+`kKcWaOM3R)=qSd5!TL~vyL8aH z6Q+35FjnEGv*+WPEl1jrpeNyX8&S&3;W2ctcbl9g?iVM&R&BCpUi25xi=>av`xcaR zv~jNLuyM-{-CTn`TJ@X)|BKzpp?J~g1C)rv)On6nq1EiVm$56cjQyJDtSks=u&-6k^wZA-=SS8AiEmFGghC5?+5qEmV19+5XJ9;6%~ZDq9a4ZP-5kY<2U6|7+yo=h(T`d zWMqM+P?i0Pl&s!f>#@QiDP?D;CDBO|Z7ah>$VGNf(F6NJj+BpF0BEL?UxKS~T6q(S zoPt?*q4QwjU9Af*!rJjg%E9q+h`o!hSVv;@BUwrMVM7cNniw3$Lar`7%yYm8aVq>6 z#jPlmF!0n)lE864%2uLm(U%X%*#ELVRBPFnb31K0$U^fsJR=b^5S&=IglrT1#UbCK z=4msm18iJ9U))A0Trn8DjOf%YQ8KSi+i7qt$h*3>pXwRIa;BNzcp*r;jLM`)>nKy= zH{IH#M9La^*?7LZk<&AM=0M>CFb(q6nin}#Y;Fp3;y2k)6%P63bY1%^#3qV7?tECU zamsq?!ck@S&r-MJgV1`_;J5IWhxFMWw;=>>omrhQzpC@)N05E536I!Vh~J*2YsryOEIp$JhSefw+ul7GUH`+9|iHv4)44iDee2tA!r)l>e5(ni$U z+vXv9SDVk+lpqm8WmP~L9OT=M$iz_x_AB5YE$SK&-j1Fz>ISl$B!bl59Pg<@eN2`Cd_A*^`S!H!9a#&vXb)V_jA9*91km6v~SAC(H!9E3Kw=)k7Qu(+Rj5S*#3OXia7%P_uECwcg7Z z^*mqb!0*8h&wWR==}O}Rwz@nwZx)W0$+=vo3B`maF?9E*B}nAUWnmJp{px#(I$C^5 z`1AVM^xv7S3H5X7PK zUg<83EQm(X+0Z@yZFLXK4Qm(2F&JZ<*Zh34SR{|J3NPbxwdG<&qz#4R=Yo7L5amX{ z5fE~%`A&<`2h>3O)AN5G;r}dq5*-n*_o}~hkqqn3)a;X!;g6mS$wOX-+Wfnm$$yHu z+akB7%dnD#s#(fU8#_9BW~76^*$e&^y?_GBYEhC@)yMw?TnF~b2zXTswLyFd!`2!3O9u%5?A^4Xd6B3iW z*>O?443{(LeIh?D8`*KgT=4CjM?+}*zTEwX%$3S|;55*QzCaiY9oi^TWSL8~9@1i_ z5uV+g!ZqajE9jZms5xq;6?>P{tW5MR@Cl|yJ02TS9SJzDygJi1t+~ zON|l;W%XI3{E)YL6R)bQtL23_ox>j%kaD(0_5X8?p6zPvo7ST{K~f)B1=h}^G@rohBNdJLrVrZ!Du!~2HxRE$wOcHsG2 zs^BkfbVqw+kEwUZ0_QD0Yp6&$jk=?jL7k1MT`($(e!K6Cj&s6qI(nb21qQV^I0EZVYSs2}j|19|S1(pp>^c89k%Z9`fZbkAn9ont>JoS&CHv4L>6$G<`9IDajUUl*m z54Y303_e@FkS@W4PdNUGnxY!gw>uL%spz-jzU56HMz2(4X5W=gLfoE`htZf;8wSd) zdOtMcd9yesl<)?!EAX{Mwl~!3`+6q@>mQuwS!NCTf!4%_hPr7ET`p)Cn-v)Gs5KVD zRk*lfcgg2KuM^`{XKrX*a?AR$;@~`5T@kt)w_ro&Q;?=~TTQ9>qVUeaSuJe(WmJ9} z=|w@E!{>}D{ZB@5R%r#$ZpTl~Z*6W2b_3DW3c4DXv^)t7;SH8K!G=N7@CcwpBjlLI zA+c^H0jUIvd~S@F?z$HdD_3{>o;PWIh%uX!oLi%(2{{j&1pezL$@z_cBlz!iQ-FKY zlGR-tI5uISmi`@{Ypz9q9@lIKLeDtdX&?pw7_NfI-zU9?^dB8vIlE?fxh5xFJFelp zkr>?0*NZE}^d4pi?_LE4=RQ`sN6|LsaPOu zRTbKz*-8K|X5H}j!gCGo_5{K9JgFb(z);@1eLYGr6Rm8-;~ja+H;+)B_M5+f7g7&G z)i9~+c+v>>ycta!cAPNKvF!FJ(ATVz6`zm@P{Y9RtWHp_gRpVsPV1xE+9p}{)@FNc z*k65tGelw_FZ44yw5QC@0mwa_+bX!B@VSls8Tnhezc&}6(NFWMH*c3Iwl<+ev0VmQ z%(wM?7aDEq7SPot@ZE2qxWg(-E32hXq|P#F;oWdZ%0XE*K}N}iBzxvY+L`GqMARL`wyOgmOA1YrolbNP^@p(Xo_&+vQb%mGtHHvG*rMcU?th>4^I;&LJm)fN|I@)U zIXs49yWXxyEt;IsljlpAS1RD@DP5|gKsP8|@mE_`RfND~e#t@HWnrP6V|ZwYQo>q( z9_eljDsv6-v>blp&&jj1#ybfFBwkP9PqEEp3} zO|H3o#Ajym4Lc4;)_(oEZbWBG$Ll6V=0iMc;!v%)%X}fVz8*`ge%gz&h=E0*RFa>g zxes7!33w~7lJh^$k`z*`gxavIDG{ikRiy;q<<&;g+1$A~vqnu(XbC*)X8AV00{-&vYV-aJ+kxY#EN z#a@_s0MDiOT5rdq)_0cYL5uHOOI)(m7o*%pl$VKaOU42{PXrF0=gwndyIGhULe*<0 z+5G#RHong_C<(q^SQTVW@EMRMO())m6on4trIrp1d^PJVR5`E&xokUmRtfR5!n3K1mU%H0Cj zsX&+4E6M+dBXJj-OrPWg?V?dpB z0}HM8SA7wt+Q*A}=yasIaYIOb*eY`ZOh=P+dYc0Cp4n}h_wobnetCGx;=S8_L#=iT zr^PM+30BtE@xGbB{5M@?hLHPjubI~TlDW|3E3MAVVF}%Vdor1$%jz}oz$@S&PkWCs z?P0-TKwS&xOzcno4C>O@P$)+kCUQMC_JXi!N-6$P5@GV#X>iZDZ?J<>?pk63>KDrO z0#SKEA|bjcQC`}eTla#;Y-yM-?u7(<42lg;PH_d!GEjMeC=ZUNyX*^1O8SP#ra!*_ zw&qV*0w9LjIf}0@m+bu6(X(9WXZPn%38?J5HBhyhN3neo{Q4Da6w^L6^k=GK&hvOt zKf$u`4xa_NF4R1bq8^1vdB1sE!^h~@T4ut2V^-T1I^Iaz$;|W5cVW@)?vw9yNRWNv zldvC^f)BnZshrF1SwN69@ws;U?)jtkg;iYXOf+ZYnSxh8C^El1#~7tza**E}0`O|k z8KVVo_iZGdwuzF;D>J53@@;c7i@eMn-W#7cUFx3=|9Mjur~kF*jVqXz->>z;$SW|J znwTdg>T}!kMznG_Punvd^WBNT+?ERB`0$2gI_9pJpAY#3M@6^ab^l0kQ|;#ra#PJM z*3p^MO-w1p@LbM}At!Kx980h3ZWXj5>}8kLUxE@4o0f!N1>BNUlsA~>v!hP1X!%b% zsMjZN3D9?t)HSjdK?<{Byp-TVE7Rp8 zmCbYn6`#_RVU?D`SIHXhl8L7V{}CD>OBR~aNlUilc+T;z&3omy=}$ifE0vm$4wci% zxeo{LxK(Z+hx%==}wJ7JR@7S}9k! z3_bZ?fNBc@3Xges>rV-s&u2x61qMo5O2>EmG1(#}GUXO{q&X_eq+%$eZUG~+(G<<1 zMe0^FLv?QwDtUs$#9ZX4J4Zg%$N$KB_%A_K#4Q9z{1Pwjt*`b#hP_s3B0E=J*myrg z=No(k?Xz+He(~#$6dLVH+R|W=mk$d}9!ZD^-J@&;{(`tK2;5w}VV&HxZir2RuQ*gV za(A>lPE~pE`{AfRp-FqFf3e0?FGBK6Xc+bHg}1}@P2X;0Jl0Ll#sz@0L2hl;*Vya3iV4y6ix8HMV!%x6=LggVC43nb?e zdbOEkEh=Y9QUH0}*eX3QjuZ-Nm^M{O*Z)CR>bSHG{pQ*Gdk=D^(6z$ej8-ahFLIz2 z@b>k7nWAcZI=s4Tan&P0@36`M)xXKCA12IIuUzR_ijL!IkPT2hw!|Art_)32sMduT zt$Upw2@ktW_3CulYuY39R@>KSSj6F7Bk=W4sR0O|PW6gPTSH&{CV?yW;lOB!CEr-! z6R2pS37QZ&Z(^!MLg{uYCV_9vx-l9CRC0whbFI(uH*1t)(p4Z~tY^@arnhedyj;4T z5klK;eFCRQ(e6FbxpvgRWd?^F%3f}O zn$SbXa;OiQef;N#ij(Cgc!hmd{evo?RNX1!2f{hbFfKDgcBgrYBmPJ2JV?QKHbJy& zpYn^gn+v1?U_&?Ap>yexnjn^qP9ARNwh5w6de*){h>rcor&y{kO4ONh^l{r%IbByC zD~mPpmkR>2WVo1t7exeIZhU*%xy$SF(8p*C;(2?JQ@*Na+AyGQ2)%emDygbhzzln? z-tGrnr8HSkGhSQ*rJhzW#rFamx&yS3vcV9psMRv12q{~2-|BEH+|?uxp*h& z5v<08k|UD7s|x}aYEoGZSimWl0Y26wYiN9s)RGsw@J$$POEb>7!fz_?q0I^fhkZTOlj zoYh2N)^Pk@7kU`*LqAaFPMK|?WkBLb3&Yf@>BP2jF2-x&2zjet|8t;RUsX_Yzt<9< z(tfZiw4zMf_*w_zR4K@o*mM*-2=8fCM)$;u)gZy7e9eF4vK^j3Sx=k7A)#*Q?dss$ zmR`-|D`ouCN5-FOQ?$zdiM{a$J2$NUH~BWU2)PY-e_+ivS(ulL$P{8&w##Z9mtzmC zVGP(yT*+ge1I#`0c^btn;F$U^G*U5+2(#P zIbdq@Q*97|$eUc2cWuu^3uk9mQ2oxgyKf-vzM^KkB7r6XWEI7R(LOb2*c$BU3?LG~ zfPHylCYPv(Un@xAeWr|}R3zR7N<3gZib}TNcId znPm-*)7_otu*Ze}4{>R?Ccj114MOg&OiHEB}n>EU`b{Hd9e{>`ZdL zH0SX*e4emXfo($?axHFCa|AHqwVz=_JziW~xUe##qJ7MGb?ogmWu{8g@qnlSP? zqo5hF&&1W+6RM94q^K>1v1$q;AQBUd(g@(0Pvg^)7paE}o&tM0)vHmfVglmdR)qMG3lF}UV4VivPvSIl4~O8)^s>Z_dmXw4COih;jp*JBSR(S+ESNc6|cl-gVUaK7r_ zcZ1&~^$y`XJeSgcaiWnZ+Rjk8R;#11PTF%vx0AJgh#(z1`BVU8aHLS`PhPkg#{jmh zZf#VYtL);PB^M#z#$7IS(ll>pe8SFBYz(VjSR_HnoQSbvt0~jiqi#WK`Ozb7e^M!c_Er#UJnjj8x{IT5;T83N zHOKB4UB{Eqo%An(f2K0Z@(c`wa^0nZ)~RQCYw%#M0}RquXD#AY+weHSb5L-z0z-T` zO5;#wNL;i{6R!5JgOG5+gUty6|LgYKG!fsKIe%NxUig;6x9 zD-9lA6Eu*jm!gsy74y}7=Mhnhm*FLPp(9>_p_}q4cOl+Xp(};D&`E5b*Q6OH;-lg) zQDl0&vw|tEVH4@e$i^lp-=!(n_Kte};RCJ*zelN(bifRONz}~KQ-+3<=31=X4_|#q zP}(VeqzVdA1-}lQ1yw(!xugXWo?P^$962ZIHHOrO!?wfNFtISXZbzl05)CEx0rTR6 z>m1}PKGDt^sx(`3vGk&;0VrRmL;0oXUxJvza-|5KJrp%nb|aI3kqe$i`+_&w@7;#* zE>~$E4ZoBW368+nEU=r#JFpkg{OC`~Hw|%69L6^rIdOZ)ayRM^W>$A;lD@0CU#FG^ zoX>waX!vaFH*>Mwjs91u^CBA*HD$m;a^OksK)AKE{{Gao$Dv-)a$3-!-~~V}!_UBO z4sG~+B5r&eTus}a!Go&naFf5k>y^NnB9Guxj| z6$DVW?LfO-U&o;&MQt^~FGLCo*8&_$BWo&^xqg??Ve8kUKRC8^ImDWhq&aD2?ZK+r zx`)lyz+Ejo-Hpa)xixN_bzJv-(nF)*uHXjPBb=}g43!%68LP40&{dlVP3Y>~4$^+K zGv^nD6UAQ6_w%7h8)C>-a2HnvSjuA*!3n%udiBA|@}J3?ou?_|71xRrR3m&k&hvxWGRHdOEH^WD{J)mwHNQ*B{L#6@QIDGA z)3!QyFC*!<6c{q%o4>^*!%?HrGnP-1%*;AONwTh{RH&ctL3%C_F*r6f;kfbpni{2b zLy0RJG=hyJ#ip32SEcnXPLplM4V_2Qx5 zpPESxZ&oa|=%c_U{&Bm02-k(ACg3hq?FmG$>UjmG?O%DyN>QPdn94xnRtefe@$pTW z-uP^~Vsq1LNkQ=y9L>gbb?lJFX~`pJ(-PMQzHURM`LFsO(rm-!EWhlZ>V?V-SXxdz zfNt0COz*)+q5LN`v!%`A+uh8_Xco`2&l}FyD4`==*fR7}5e`rPF<&qX^el{qUfkw6KUsE4 zvFC8&+ZcHmc^K0=Jsj*rnUvX^)$Q{N^=4{QO}x0qaIXV(HHArRL@fo%sqBtVmUYFy*mU|Lxz* z`)4KH{}RxYc{(#{Sg)%vKx}}Mg%(#A3&Fo{(yn%)4!y{gGY!#-{e{p7ei_lc3}#!i zNCkINWRc{XcV(Rd`ATvZ!-17PLhM?^yL=2GCVV-Go4aSPKr?Mj9vMuSrk)k%F;vp9 zYk)76u4?9E_78W2fur_~e)dupc}dEGi}HVpF0~182Kk}~Q6G$Rv*SyK1SuLP7))&f z4zypEbxeKwHT({8Xtd z%O`>Ei+Ul$h%I1M*F^Y&9$T`W)7~A}8aRRPfmr_tWuH0k%cflI1S}lfK{p6dk^{sc+Ph*EU*smDwD^zR7y$kxZ*ueQ9|?|N76SV=3=a@su4( zsUfnb?Kz*!OJt#_qz5WT)$?dxmKd6H-uh4XNEL02M}HjW?6?E|;id{+RuXa?z6Us81LP zt2|Q`D&GbE6JdN;0(*b=93S`WY>Tvz?()8AKHGCOrsL0gt6j!aZpJeL^8!iTu;F(p z@OOKVuU`CVd}Uji z5q<{&mrWO0rbS*^Aoiw5F5otTCMl#kMGkKIQz>Z!s{Q8&@n_82?Epdy+3LG$Oem_U zg}f{Ea(uZpId^C4_7*6qFY;-9sOXIPWyA}1GHk>K*7L;3MJMHZRxUvEYl6R>m;|p0F37b?_?)Z}$If=a*Q`3OS}Uze^t-NMgL7 zPc|Jbw;P2h^8ztp?aQztnDKSc!JU+&5bU8njg(U&e*u*nVLk6&I-W|errN_rqasVKuP|~)s5X?= z8?Bm+P8hzFWVfJCSB*KAe)kA9wEE>=g4c`9vuW*8OvbK{mJ)=^-wrp0aTAZUQJJ2!smgzn26QBg4r zAmeS17DjPJHfveseHJCT@(&o$uU5Oy_RNp6m`rwG%}K3*E%|)5AHR-Bom7=QHR~KG zDY9EJQeRGyq9gQ5Cc;mZNwC+;Q5esZ@(E*n^Wh?gN*>rCq5K4(ezdp^wWx+ol z7v;8>))>+PtRE)B7ys4u8zv6dYExWYKSzwH{UNZfKL)?U-$US~Su813BRu_mbBcr6 z7}c*&EnJuOcR#SqC$UJ2m9{LXLU7mB#G>kRW2K7w#Y0b=ljqRq2+md^{Q^@m(-Jc+ zfqnP2Gfmc#uU%Ubz6SQ)%JaMa;*2eh`7NVAo5^nZtxRz4aHFa#pk}`I&~ZTu^F;8x=^8x=h}b-PF#9c1b~CG0EI$h z#DVuMW6t7X9eO+Zer_t0Z+xhET)|z~=+?BSZFrQ`x}J&Yz~FY#WK5SW)vk51H9GSm zP?64Gq6OKIp8B!G&lm7y-_(BmBK=OLk5ep_Qf}+smqogA*W-vhwIP%6_o`g%nfVDV z)3pV==tfo9jtFj^l8~CZgikv;AiX(lThr<{=bNS_)$h}tD^061(4@T?0e?KA9I<}z zvqN>fszK#|qi(v@j4vFueto;52TdSXRyeK4`{Q4UCaT!o*{UiA1^aW$ef<~VU6Qrd zGLrx^M!s#%J6gq4LuC`LF2dG&-wSe5JMk*j!9KpHgt6spA9XMUuP@su%RT&qU9)!< z#3DVbiw+31Kl7&);VG9q~DyaK(boyC(lZW~d&gGswMNSBQj;4mBqXhep9=*&Qs@$>Xym|@kV2!>(r=F}kQv9{Y0zMt|_qgEJ0Ug@LJPN{de zz}Oro1tECK(QezUrr;FieZ(!dtg8`2IcdkNmdB;tTKAfDR79eaP)tR_c){jPdBH*N zSG-S%c#KJz5iC(#Al+pO|LSA5Z0>b~tU21o_!jz%zC&l!g;%GW-M-q0P<`1L>ewN{ zMn0-DLT)*YiN^PFv2dJ}1{!9RXi?FRCT#l!D(86&-YQ_ajUM@nIUh5A9Cm}*u3i7y zRnu;nG!?aNoV}3bFcRO?-|NZHPqT08UUtYxaKMEgI7hbGBOdyET2O!#!kjD$udV(t zCc%Bl2Z*-8gt#d{t;T5B5qqskPRf>$Vr{z9Vpa`%z%@Bq94`?jcpgUrdC=^ngewT4 zzpH*cF06VNi{`QBiT&kKvQPPmRyw;IU?O#vksmb7fzm?upF}AOuyHMLO#1ZA=K#@@ z(94l28S$s4wo!bH1{HeWT5AkUkYM>{p05~&8~+X%6O;s{9juP#iyT?z+fM9H#bKa; zfi}V2$D~uA>Upeor=85i0v>YpCFza>$^eTDfx?%!=6=_MIMH5A9SZ(chO%5#i*l}X ze`aAtOA36uE(DXp4x9m;mJee!da3^2KY2vx-pe0-w@Z8I&$bJX0@QvgKtg=a5kzwQ zk=C3#7f-@&-$hOm6Fs?31dB*lM-3gA{Me{sN(j*4px)KXBUT$z!rKt*c!x3<51IaN zycAHoH`QFnnq%r$CxQ4b+o7Y&r>Oe~`6E1TYS3V^MzfmIIJQhv*dV!Ss=ZN|M6<_yVqnKKX4Zs^w-6WPxZ%t=`+yimX-_o z?i(0oa(g&^oBH#15S$D?(I36fOpAOq!xnqRP)f1%fgA;nZ!6da7q`}&7GSB|*Wa~K z0Pn9j)V_IwIKS^?M&R^@iKusM4M&}HAv=`cm=msg$UeJThq6J-yiQw-nJ+mtd%|ha z$(_@t_I(6&-b+*iM2e;D#!)_>NL;#QfGo8jyew*(Ru*l*$*`Cf^);?2#=mW}GOv-3 zuT!GS9%#Bxbw7S}q4j5Opu28*p7;}|Z-@{) zh?;GU1wd@e<^)n*i@Rn{r7o6&C9yF)hs){)wG*Gq`Hwb@`O3!n*~?w1|LGUKhTmF3 z<>07?vuS_qUyfB@ys@9b;!YC3$3>i>6Y}gP3(FVB{a8lS$v!)Z;TZSN<}lJ-D@sMh zPx#+$DQS0=ti3PmbY8zzCl^~#4rDhd}0AIZF_(5Rx)HUL_eqU2<3Vr)$58(N9eS(Qh%g?~C0fEVr7#e0J zS)C)^QqK&N4e;q*9vSFm=Y@y%x z8=KI3*UgqMXgQvZ6>q?JpR{RKkuz^DCyiVUvbyr4QrTpy{)%qUs&j>HPnDk6b2e3< z*%(_#g4l$uV&A{D`EmGo!eL+EIP9pLo~F2HM9KZdJUSYg`lS?QV) zTGe~V$>&2mL@R4t55}I>=@L+HY->+9+n3s9Qcv=3G~v%0z4t4zM?)K@()YEr>;7Z`4Al!OuUMnk_p1OCarpjV*4o0tXubp0#plpy)#rv+Q2H4RwO<#*mGl zGegc#e$A%gMq!W30*SG&$DzUmdY(@M9S;U)%)W0ff-H$9S~zRUbf%JT06#~JtW~C- zYm~nGQp+veE4!;YD$>uGM&KxNkq1IJ*uQTxt$Yhh|Jtn}{0Q}@pz4rlYTDar`t8$C z$dZPFzG+M4twI}i=bkn(*yrP*-oKersrnVcPO&9b=JNW`iopa+&>qiu$l_T!35u)J zOdt|S)H+t)Q92~EXfpSq^9>P%d?@%p!`qstSyquhLo086327n*6ivTkNjN_~1p!8x z7;ZW*X)y{X`zVn>fpM(K`_xA4Yo-OS+n=n9EHg$gcu42ohh`x%17G^EX`g_?1G% zUXCy(7YLq$kFeyN#E+)2THd=+C|wBX4KHghO3Y3F7_ClT^r&9e9|h|or?TJbG(e}+ z_DT@e+=qa^NsLYk{JcyHHek?kyOd>IrY#MD*V&_Zu zH1)X_wHb5NFAKH!%_}|i>E-3B!($A$GB$?g@xKI!CvE2+AtoEJc0vBfeJ{fwdf}t4 zm}WcEt|CQ8sa2`cR;mgiLT`zCZbGIKlOAq-G5_`SMlUq-Vsk7eOteMCuD3k>vH>_e z3)(xYL&!=^^%8L?W$YT|{?mI89|>_iUhSlrl>d z0^>IM&YsBd?1^FQ3FSMO)amMiKfZyb9fTuKAx!m(k0TQTwu?eV#UpB(GAQ{N9Bs5y zmBWL33tFb4ouY(;*tqOuGM9&?ZhIImi*gq6@YhP7Z=RXsDX$a%h7aokars>TLjA+9 zU;lDe6{OyZ(_~Jx4OaAiTUY*;A*qyo<G%;4zYC*<*)D5!0(rk+q&26SmDfp4 z>71$^bsyvTDZ7}rdeupEWTk4!e`Wk#0Lo^wbqk<6DQ(wHPvS>TZ?k!@`cqq3&1oxP6EVN7y!^dR{pu6Io=B-aowLG9WpYWUn)r35;XX2Oe#?tE`6f>MHW z8{QgLr7r2<5sxuoAx|cn`s(M4T7}aBzKb#qJ#B`7h8MVtdbvAD;wRp&!~|c?Y^^K| zEUa0PK?H_J=CATfv8gIIEvu=8N%%-7nAHE2c>k}}W{Ah>WcXza%K4g4TgrbrGg>&% z+Wr2)7x!__HhTHXQJ1bGhnGnCL3GB`*asLXN8ei5=Y0~6lpkdoCvpR$F0xPh!?l`j zTsvpBqnb5wyt8@D6nAMOB4!XCoh!$~F~=Ceb7n0!RhdL%PeCp3CMNiQ=~5;y6{)lz z9CkUnK1)gtYYerX;`aq5`)&6)-@~|f;%LT2oyob5$~jKc^yB&xUdt;y&m>dcx0EwF zyja|KQlmCiJW)6iIqi`Ua3@8D zw`u>L|Bp@k-%0Af7x^N$!M=*@u2C8E^--eJ^_PO8!m|{*BATDP$qpSi2A)OJAwo}5 z6L<9xat29fhBQAY%Z&B94NWrz^&jr*@%>XHb$*ren})Ig>{rI9zvshJL!iOvu2)n% zc&I1f_uauXx{;v@AX)5Mi|;|`%k45ZcL{(9bTcqna-7T{^3<9pZYIpU9@T|M8Y`(3Gd>AAJ|^C~=$&DRkZUNp!|PgWIf?DcigC;8p9SS;U$_SV~-i zTgl&|na{0LhttKC(GgTGg2TLSPhBVCb8|l0?7`-=F5~cUKM~sUIjp8xx-_J+&9?7Z zk(Hs&QNcN98-({L;dDhZ$0Ox6m6R&|KxKTK+<7-lT z!L~hf`!V<_Zh9t=40CU7^?)9+hNnQCpM9(F`7`#CZlw#5I_HhZgF!|Y+y*cGPRtlh zSmE6aUtU{(?v;K-_R)Gr+Aj@jkNJu^H0ot}(KPMpzw1e|Um&C|Gh*@sA7EAErr$YP zBq~;8q4_KEfo^rOiL@N3<)`1spR38|9WQnw|5AVT6souSr<<0R*%w*0nd;?R9%+0> z>`7(t{W?VT9kwO*JYTh;&Wbq)Q6rijyfmx0-b8*F>3ifjt+AX&n?iG2rJM<4AO~S4 zE>-so#-L)JU2z-Vlnm@?kL6XbRhg$Ug%?_?*4w@uiH6URYOCf!Y6&$m8z2KCZA(AA zcc;#Vt)XHk6YV8@%dOBn*#phTUaFrUI+rz_nTFqU z&K!U7H%OK=V`#|;guSB z=B9?i!H?lw5lWx$xFrGS`3ej}ni}%G#G3Xdv8F*vSH;iz8CObFx%AZ8Y-Oe>MYYAm zl#7q%3RITQ3_c{%Zxs%mAQplzVZq4S@17R?k0-ml>|Er}Jn4w8Y^QFFws1{ZOFQ0^ z_#s8?LQ0z~l2j#ZWWR&QW)D6jxb`Cm?y^9imO;oQ%DqNig^x&Tz54iX4FoQX%;YWp zbiB?LcgtF#ry#v`7G7U7V;P$kt|}ZD14zxfZd3GN;Xkn~Si3VscIs58Ol;9Cpw;Tx zR+s!|L14|agho(ykwJ(Zchd6Ye{s%*|5t3@{~4L7Pn#M)*YN?rN;J0g=Y#hI?a`Y! zTUj<{4Y%3Ugw=N+;w$~hI_LBU3_&8u5uvR3NuSTcx?R8wwrv66;PIGxQ;`6d{Rc^| zI_pF2ar~CVV_2p~p=(g0o~G;Vcr=Hu3K!m&g*dNpn15k$1^)`V0!xC%Cex-Lb80nYZd+0$B_If=k#>VJ?5i7d)I>H z;&KiF#6irxS3l+OVPBao_@ZUA`lMxU7Ag?9fU;jNXRD}B{t&*Qt>znS=aThDi|EDs zR#JTNRJPN~J#`3Gq^j6gmlmDZLeMTd;wtKYcC`P$EBWFJd;2fQ41BV3@SgsmwtoEOZxUh+wf`LYWcvio7I!@! zhOeY*4aMwLj0Rx~MLoWv?}haV^F)Pej0}sk&;Fs&z9`Z@FWx=WdtG$DV+vhks8nQ7 zr8}UQEc#xIwWvgYU@0PKaJ&Lr{PFX&@kTqfRA5W7G7VH1ze(v~-pMGQtSX>~^IC70 zi8suaRdV1}eSi4_g5$4ex5)CGfU^`jr+vS1@7sREnSFqRNTOg*IO(2B<-CIz!jbh) z-*qU_i3BJlkQ)0A1M|m6z%8VP3MAc?sJ13dhvQz5_pOGtm;0rez+s)35Gl9pD{%a# zx6Y5bEJh{w#9f0ljTRmw({I(MeNsHhfDjvDUT)Rv9~0q+hOxY9bIF{7Yjt?KZUA2g z1!CQ6G2#VK!x{eLb;H`R8HhUl<^oqeCBYYdUzxKQSMc-eXx<-86?d->{jB13sdeS9 z7h9!~rDqO3)W1=nZx^c(V0sxvw5@rf8JZ@KKMTh1HX%L`nMtAikvYV7W0t;u*zi_) zcsAm@YMrafjqw1L^&lxFfOo!-{&qsxJyA!P#_F|$i$RwcQNXf4k5g*j%gR%7o4)U>y)Q4{HOw9}`1Y)sn?Ww2*HDEToPyBd#4VVH}M%SK8|~ zntx%@{N`9!Z$8hqav zn1>{l8ut;WecbHzFyeNLibAPSf|vjw0(H;65(1#8{=?Q65;eSYKjK!m;=&Wj1B!!O)4u#Rx{ZaMa(F5UzKd-jcqehz~KH7oYm+LFF=RSv_1cM(-@65e?i zCk)Oc*cazkdH%j{-?H~>;(Kn26RCcJnu5e}IGngy7OkKucGFULD_`_%MX@U$j&MDI zAim&Vc7Z(?uWh09wkZKGs24!%@((G zkW1cEJEO~mUjc8OpanPXz58G}b-^4xB((Idi4XOwgeeI!IIn)YhzH=epsR{rEH5$2 zNId@Bw_9i@9)Bpo#}xP;2Z=ZTHFLVyr)#_*&Ww-7^3zGOEwvbJ&I!v2ixs6W65xby zC@b=D=!{Y6C_r=g{$9vvlg?X&P#ZexPOKhl=H74(V@t%gyOtH3!6&al9mx|wJwaqC zoJVUB$+~KHJ9=bPH`24%*prtLRJb?f!o#SIrYzT;asr)=hXTHonx)SlGYa*M9?k_) zlPaXzpv|wkpoW4{^dAC}01Gh2^Ibsqb=HK+q@?%zA-_b8?1&+(n{Lv^CYM(Sep89d z{=a(g5m}%Q0OCcT(C(Qr^DYhxb;F8@7$xPD6sN3}5GnT)$l=0hI8`MEQ95`U`AlQVhTuRT1sjZVq#e=*W;FM5zb1Wq6mJ+%KCMO=NKG{V>Xkh-sb|R30^k*ZGRX;MM-oOF42D* z)Jlqxb9X-By39l)zSevMACwthct*4Qugb18n(eLY*VS^1*4373YiNlvXbmyd)WMJt za}q;wi>gFXIv}R1q9`h#TFu`F74e`?vT0{dVM}>Y$2M`W>&90CVXik03?cKwNX6hn0Z0;wD&FiI;c!gx_ zHiYj6)BB_$Q8$2)$yEa|DY6N=Cig_$=PP|n%Btt=_XU73!yO=${Pp0 zjJ2|BYCO%AH8(CshyffUw#4w9F}q<+VAzqRm3DNby%I{UbaU6pVW-E780C8tDdgDJ z!PX$7vzek12K{)CuC6Wy{^8F0&+F4Jvmr*V0L0yjZTnZVgnu?p_{ZGXkEy7|+9ab| z@;)y{+zIh~?VjV1Syae`HPGq;9v35Npf?%H<+R0?{$gao2`7(!5>l5&V`)63i#*hH z0DIEFj-72ok5qwAYeI38hGA*cHV6r(*Fu!55lCvrqDe(5aOCe3kZW32H6^-Cr6Rgr7V^L(T$?AS@f)?RHx4+QPdX@caAyH)u*^RQ}7TOiX=lzl0+!eq-J*<;s2=Lki`2T|W83`k<;kYxz4>k8Xe-wYN`$C;MEP zt03rnPq)GubpJXZN}YMK@g-GJe?_n6>0`}}@lux&t@R^zI1D=;uiBMDgZ>mFwL*4RH&+#q7e#~*flOrI4eCQSsphndJJY4MQ$M(littct0 zKf<0nU)NNr`yTT-obV^B{tB6ER6ls1?i;Zp;`FF8(cxPSX!4mpi3V>>}@DoSbpWbhcXadSBJ9!!3xP3{FT~#W`#MO0w_%4OD;|2N@>lv( zMjEz@dc(AuKTp52H$s=YCZ)`dDLrQkZEg_~tExjQn$1|KDl2ou@xYUo7IVPk z4yeyZi&wgJkd{jkF3D`;`W0uAzVauAF;~E2E-Ex?m|&XqBuZ8C^7UG{M!Qq<-1zV; zyj3FSIA^Lbu2owZ#B_zyxHH!>N1tRa|>liVu7yu@z3Mmb-|Y zm;*vg_oYJrF97rR8j=ymg@#NSVh0>6?!bAysRsI64nIt9**U&Sey5ouYp-?^Wn&gu zOkR=_+%GWTEk^5exTA*SspXX7^W9(-*Hz`+YbBzSU!i^D>HFnF^e${$$~CF9E)aG1^_zC82vl5X_Z&KsXx zjjQK(joqZfmm?L{z<@mD+De+r_nN9CRge{Q<5@gf7UZS$T-5q>nJdT%dPv~PWjQ??=fC-6gXjMyTK}i9U&5D5 zbb0D9INY4KaGvZ4W64yjpYSPmKrAc{KB_odjG}e2WNI7iM$|SrEe`unJL<%wh-AqQaBP57Fqb5~Lk)G&(wHN($9*iC1WzNYLhj!|P3&dWS<% zuCiHfawkVCIDE}9W6=>;$jlmoy|`5#%b^7|VP1L&DG71s0S`Vos^_mmBd615dc-F5 zAMC|Mq(6>$*|$bC4V(jS)V5xF<)*Fp!V~H(J0VrQFBtm1dG~f|y$;3KrCuwA2R##P*Z6qG&AfmbsS06-75A5`15@Vl2cq*`d!Uv1v3c(e*JJ16#d@y)ew~q|^x=b{C`Iq&uF7F{)K`(V zBQMRk(SO7+a_>76*=dUQ=9!%bpQoE_q9;kjUyFtfWD6rq-Xui!KIwOL&yd*9Gchra zo!MY?5vw3&`NhspFe2YR>+K{+GaxxL)SqF;o1dQ{Kojj-J`U?~a)t&g=VpgUczF=NZi%QD(+^$m1$iiKSgpV0cD;8gY20kfX59$T7G`YAmK*6Sr@XX@WI*5fh9@b|V_k*QK4~ z$Mcy7^GzEc2kS_MDZb7+lMU3OEP0Nxz~-zUkvg|Anc8p0TD6%1hwXmwDI){36xNG; z*mhcZJCG%(gRmE`LcE@3|D=otG|;pos|Aethpq#bAq6KgELsx98 z8aLarN|891_aZ^-Hly?oh&iYp;Vi#Jl5v(_>OtVV`XCaO5*%88H_D)&r@yO)+M~oN zgf_qd5OVFP9K;10{s~k^!*$wVO^@TOSYe=|+mx5oM?(SCCv|$RLCj&_K!&f9o)L~+ zs+LI*BdL?{JzCWo`~jq84k`0>scl+s)7bG<_lSt0wZ9Ij{9gNHBk#Hw*N;i>Z$ewH zu!U2{HJ(e*#&`TS9qj-b{S3ifwc={&|18>^K+{YVuYWKW-_mgI3X>Nq4Q+FQN| z1$baW>eiYDMuRXMKbmew>tQjd|3FyHEW@ zH}p27h0by@CXE%2oh&mw8T28T}dfE5ZTf)vfomtcXtj5K&y((uA2KjF8TsdH||=^GdS^!RMq3}o{Q z2f5dD*VL%e-RTu~YOgI-<4`1Ow9pyI=2oxP~LS9+$MFpYKQ*nYFN@y;u7~D%eT{h$Hh;oaz8C(r3GEX5TA~bu&aI;a{yO;PfT_4tNoDW=< zh&p8q4 z!BZ7Hz-rKE-NIlSm7dl;3m>F>;m|DQF}~xEEjvFSo-1}XG_`Y9wo|xfCAcI9s}RV? zd6Jx!cp|--R+UkZyb4FU+#z3;44Ix(5~YMx8;82p0Q{mX9t==Qk)$D=2 zi(jL;KTv!n(JvC-O)mNRj>V%BF;G9SWE$@qM!Z-YaRG=|>ThF*T>_tQ(U@%9C{So) zDjj01fkzUhZJ*Nx5G<9Q9$N2&F!jW^7%9B7J5+rcW?L#?dFh%5=~;O zPT5FT1qRt+4UBvWm9e7N-rY$kSaDvG?o0|tRdH`@%aw99)=uqem-^Q@^>t_nf9-C_ zwJF#K_YSvcWQjWvi^CGf%%V5~>7_@Iuio7<6o&gH$ITe5F(X}9Pfy(+mtj@0wZ+@R zDBTtj!nQHD48;ve*vKPcFSGca}BEEA!W( zzQb(sEl$Cep^VJ7AAuwda~jTl9?wkE~XRO*o@8LfQs zV#DZ5C>=x@Lh@V+=D_1@V6^gD9Ly67+3(@j>pPpvmlXep__k1v?Icm zbv${si5c<-+xLFgWAexBc4=xEJ&18`zpQ$yfO~ZKq%PhTcMkM@uUGu9Lo<|?wNkVi zCOs{?xX9I5|A^`-)JWbxn*{wU+wt!J#D7`m+0%QM`O-83k`_E0LtVt^2j?k@D0(VQ zmD?_pd3S6t;{&wVpO@?c`A2h(UBJa!AF~UPq+YX?`5oPfIse5WgZebrBk8%06z2v+ zZNsGN3U%p1Uom2$uhfD;I9l%S&6zGf5zdn2$Uu`0yF2S`QIS`bliD?(0q;QlH0$S9 z53B-lB%94N^x@XE@cEA}cQ`GQNTm!li(PV5cT zFK?D0y7F$4RjMuE+x9zon@(yTCx|W{S}b9$UHhFXC%tDjPo^ek)8>mLxDv@pwY_*AU)B!0H-BWgN!M#o(bj4JHGQD%*1f zXc|l&t*n4gt>(3~(|SqLKxPm6%VXrRUQiR^+kjkaG}a80NO;Z*F$3HsGneN~A4+zA zIZ4xAJb>kli- literal 0 HcmV?d00001 diff --git a/User/lwip_http - bak/Fs/index.html b/User/lwip_http - bak/Fs/index.html new file mode 100644 index 0000000..09576fd --- /dev/null +++ b/User/lwip_http - bak/Fs/index.html @@ -0,0 +1,240 @@ + + + + +STM32H7xx + +
                  +
                  +


                  +STM32H7xx Webserver Demo

                  +Based on the lwIP TCP/IP stack

                  +
                  +
                  +
                  + + + + + + + + +
                  +

                  Home +page

                  +
                  +

                   Led +control

                  +
                  +

                  ADC +status bar

                  +
                  +
                  +
                  + + + + + + +
                  + + + + + + + + + + + + +
                  + + + + + + + + +
                  +

                  STM32H7 +Series

                  +

                  The STM32H7xx devices are based on the high +performance ARM Cortex-M7 32-bit RISC core operating up to 400 MHz +frequency

                  +

                  Taking advantage +of an L1 cache, STM32H7 devices deliver the maximum  +theoretical performance of the Cortex-M7 core, regardless if code is +executed from embedded Flash or external memory: 2010 CoreMark /856 +DMIPS at 400 MHz Fcpu.
                  +

                  +

                  +
                  +
                  +
                  +The STM32H7 series unleashes the Cortex-M7 core: +
                    +
                  • AXI and multi-AHB bus matrixes for +interconnecting core, peripherals and memories
                  • +
                  +
                    +
                  • 16 Kbytes +16 Kbytes of I-cache and D-cache +
                  • +
                  +
                    +
                  • Up to 2 Mbytes of embedded dual-bank Flash +memory, with ECC and Read-While-Write capability
                  • +
                  +
                    +
                  • A high-speed master direct memory access (MDMA) +controller, two dual-port DMAs with FIFO and request router +capabilities for optimal peripheral management, and one additional DMA
                  • +
                  +
                    +
                  • Chrom-ART acceleration for efficient 2D image +copy and double-precision FPU are also part of the acceleration +features available in the device
                  • +
                  +
                    +
                  • Peripheral speed independent from CPU speed +(dual-clock support) allowing system clock changes without any impact +on peripheral operations
                  • +
                  +
                    +
                  • Even more peripherals, such as four serial +audio interfaces (SAI) with SPDIF output support, three full-duplex IS +interfaces, a SPDIF input interface supporting four inputs, two USB OTG +with dedicated power supply and Dual-mode Quad-SPI interface, two +FD-CAN controllers, a high-resolution timer, a TFT-LCD controller, a +JPEG codec, two SDIO interfaces and many other analog peripherals +including three fast 14-bit ADCs, two comparators and two operational +amplifiers.
                  • +
                  • 1 Mbyte of SRAM with a scattered architecture:
                  • +
                  +
                    +
                  • 192 Kbytes of TCM RAM (including 64 Kbytes of +ITCM RAM and 128 Kbytes of DTCM RAM for time-critical routines and +data), 512 Kbytes, 288 Kbytes and 64 Kbytes of user SRAM, and 4 Kbytes +of SRAM in backup domain to keep data in the lowest power modes
                  • +
                  +
                  + +
                  + + + + + + + + + + + + + + + + + + +
                  +

                   About this +demonstration

                  +
                  +

                   

                  +
                  +

                  +

                  This demonstration +presents HTTP webserver developed on the top +level of the lwIP TCP/IP stack, it provides the possibilty to control +LEDs toggling on the SM32H743I-EVAL board, also it allows to get +continuously the ADC converted value which is connected to the +potentiometer.

                  +

                  This demonstration +supports the following features:

                  +
                    +
                  • DHCP client (dynamic IP address +allocation)
                  • +
                  • Ethernet cable plug/unplug +management
                  • +
                  • Ethernet Zero-Copy interface
                  • +
                  +
                    +
                  +

                   

                  +
                  +

                   

                  +
                  +

                   About LwIP

                  +
                  +

                   

                  +
                  +

                  lwIP, +pronounced lightweight IP, is an open source TCP/IP stack developed by +Adam Dunkels at the Swedish Institute of Computer Science and is +maintained now by a world wide community of developers.
                  +
                  +lwIP main features:
                  +
                  +

                  +
                    +
                  • Protocols: IP, ICMP, UDP, TCP, IGMP, ARP, +PPPoS, PPPoE 
                  • +
                  • DHCP client, DNS client, AutoIP/APIPA +(Zeroconf), SNMP agent (private MIB support) 
                  • +
                  • APIs: specialized APIs for enhanced +performance, optional Berkeley-alike socket API 
                  • +
                  • Extended features: IP forwarding over +multiple network interfaces, TCP congestion control, RTT estimation and +fast recovery/fast retransmit 
                  • +
                  • Addon applications: HTTP server, MQTT +client, SNTP client, SMTP client, ping, NetBIOS nameserver 
                    +
                  • +
                  +

                  lwIP is licenced under a +BSD-style license

                  +


                  +For more informations you can refer to the website:  http://savannah.nongnu.org/projects/lwip/ +

                  +
                  +

                  +
                  +
                  +
                  +
                  + + + + + + +
                  +

                  +
                  +
                  +

                   

                  +
                  + + + + + + +
                  + +
                  +
                  +

                   

                  +
                  +
                  + \ No newline at end of file diff --git a/User/lwip_http - bak/altcp_proxyconnect.c b/User/lwip_http - bak/altcp_proxyconnect.c new file mode 100644 index 0000000..9a0b2ba --- /dev/null +++ b/User/lwip_http - bak/altcp_proxyconnect.c @@ -0,0 +1,584 @@ +/** + * @file + * Application layered TCP connection API that executes a proxy-connect. + * + * This file provides a starting layer that executes a proxy-connect e.g. to + * set up TLS connections through a http proxy. + */ + +/* + * Copyright (c) 2018 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ + +#include "lwip/apps/altcp_proxyconnect.h" + +#if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/altcp.h" +#include "lwip/priv/altcp_priv.h" + +#include "lwip/altcp_tcp.h" +#include "lwip/altcp_tls.h" + +#include "lwip/mem.h" +#include "lwip/init.h" + +#include + +/** This string is passed in the HTTP header as "User-Agent: " */ +#ifndef ALTCP_PROXYCONNECT_CLIENT_AGENT +#define ALTCP_PROXYCONNECT_CLIENT_AGENT "lwIP/" LWIP_VERSION_STRING " (http://savannah.nongnu.org/projects/lwip)" +#endif + +#define ALTCP_PROXYCONNECT_FLAGS_CONNECT_STARTED 0x01 +#define ALTCP_PROXYCONNECT_FLAGS_HANDSHAKE_DONE 0x02 + +typedef struct altcp_proxyconnect_state_s +{ + ip_addr_t outer_addr; + u16_t outer_port; + struct altcp_proxyconnect_config *conf; + u8_t flags; +} altcp_proxyconnect_state_t; + +/* Variable prototype, the actual declaration is at the end of this file + since it contains pointers to static functions declared here */ +extern const struct altcp_functions altcp_proxyconnect_functions; + +/* memory management functions: */ + +static altcp_proxyconnect_state_t * +altcp_proxyconnect_state_alloc(void) +{ + altcp_proxyconnect_state_t *ret = (altcp_proxyconnect_state_t *)mem_calloc(1, sizeof(altcp_proxyconnect_state_t)); + return ret; +} + +static void +altcp_proxyconnect_state_free(altcp_proxyconnect_state_t *state) +{ + LWIP_ASSERT("state != NULL", state != NULL); + mem_free(state); +} + +/* helper functions */ + +#define PROXY_CONNECT "CONNECT %s:%d HTTP/1.1\r\n" /* HOST, PORT */ \ + "User-Agent: %s\r\n" /* User-Agent */\ + "Proxy-Connection: keep-alive\r\n" \ + "Connection: keep-alive\r\n" \ + "\r\n" +#define PROXY_CONNECT_FORMAT(host, port) PROXY_CONNECT, host, port, ALTCP_PROXYCONNECT_CLIENT_AGENT + +/* Format the http proxy connect request via snprintf */ +static int +altcp_proxyconnect_format_request(char *buffer, size_t bufsize, const char *host, int port) +{ + return snprintf(buffer, bufsize, PROXY_CONNECT_FORMAT(host, port)); +} + +/* Create and send the http proxy connect request */ +static err_t +altcp_proxyconnect_send_request(struct altcp_pcb *conn) +{ + int len, len2; + mem_size_t alloc_len; + char *buffer, *host; + altcp_proxyconnect_state_t *state = (altcp_proxyconnect_state_t *)conn->state; + + if (!state) { + return ERR_VAL; + } + /* Use printf with zero length to get the required allocation size */ + len = altcp_proxyconnect_format_request(NULL, 0, "", state->outer_port); + if (len < 0) { + return ERR_VAL; + } + /* add allocation size for IP address strings */ +#if LWIP_IPV6 + len += 40; /* worst-case IPv6 address length */ +#else + len += 16; /* worst-case IPv4 address length */ +#endif + alloc_len = (mem_size_t)len; + if ((len < 0) || (int)alloc_len != len) { + /* overflow */ + return ERR_MEM; + } + /* Allocate a bufer for the request string */ + buffer = (char *)mem_malloc(alloc_len); + if (buffer == NULL) { + return ERR_MEM; + } + host = ipaddr_ntoa(&state->outer_addr); + len2 = altcp_proxyconnect_format_request(buffer, alloc_len, host, state->outer_port); + if ((len2 > 0) && (len2 <= len) && (len2 <= 0xFFFF)) { + err_t err = altcp_write(conn->inner_conn, buffer, (u16_t)len2, TCP_WRITE_FLAG_COPY); + if (err != ERR_OK) { + /* @todo: abort? */ + mem_free(buffer); + return err; + } + } + mem_free(buffer); + return ERR_OK; +} + +/* callback functions from inner/lower connection: */ + +/** Connected callback from lower connection (i.e. TCP). + * Not really implemented/tested yet... + */ +static err_t +altcp_proxyconnect_lower_connected(void *arg, struct altcp_pcb *inner_conn, err_t err) +{ + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + if (conn && conn->state) { + LWIP_ASSERT("pcb mismatch", conn->inner_conn == inner_conn); + LWIP_UNUSED_ARG(inner_conn); /* for LWIP_NOASSERT */ + /* upper connected is called when handshake is done */ + if (err != ERR_OK) { + if (conn->connected) { + if (conn->connected(conn->arg, conn, err) == ERR_ABRT) { + return ERR_ABRT; + } + return ERR_OK; + } + } + /* send proxy connect request here */ + return altcp_proxyconnect_send_request(conn); + } + return ERR_VAL; +} + +/** Recv callback from lower connection (i.e. TCP) + * This one mainly differs between connection setup (wait for proxy OK string) + * and application phase (data is passed on to the application). + */ +static err_t +altcp_proxyconnect_lower_recv(void *arg, struct altcp_pcb *inner_conn, struct pbuf *p, err_t err) +{ + altcp_proxyconnect_state_t *state; + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + + LWIP_ASSERT("no err expected", err == ERR_OK); + LWIP_UNUSED_ARG(err); + + if (!conn) { + /* no connection given as arg? should not happen, but prevent pbuf/conn leaks */ + if (p != NULL) { + pbuf_free(p); + } + altcp_close(inner_conn); + return ERR_CLSD; + } + state = (altcp_proxyconnect_state_t *)conn->state; + LWIP_ASSERT("pcb mismatch", conn->inner_conn == inner_conn); + if (!state) { + /* already closed */ + if (p != NULL) { + pbuf_free(p); + } + altcp_close(inner_conn); + return ERR_CLSD; + } + if (state->flags & ALTCP_PROXYCONNECT_FLAGS_HANDSHAKE_DONE) { + /* application phase, just pass this through */ + if (conn->recv) { + return conn->recv(conn->arg, conn, p, err); + } + pbuf_free(p); + return ERR_OK; + } else { + /* setup phase */ + /* handle NULL pbuf (inner connection closed) */ + if (p == NULL) { + if (altcp_close(conn) != ERR_OK) { + altcp_abort(conn); + return ERR_ABRT; + } + return ERR_OK; + } else { + /* @todo: parse setup phase rx data + for now, we just wait for the end of the header... */ + u16_t idx = pbuf_memfind(p, "\r\n\r\n", 4, 0); + altcp_recved(inner_conn, p->tot_len); + pbuf_free(p); + if (idx != 0xFFFF) { + state->flags |= ALTCP_PROXYCONNECT_FLAGS_HANDSHAKE_DONE; + if (conn->connected) { + return conn->connected(conn->arg, conn, ERR_OK); + } + } + return ERR_OK; + } + } +} + +/** Sent callback from lower connection (i.e. TCP) + * This only informs the upper layer to try to send more, not about + * the number of ACKed bytes. + */ +static err_t +altcp_proxyconnect_lower_sent(void *arg, struct altcp_pcb *inner_conn, u16_t len) +{ + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + LWIP_UNUSED_ARG(len); + if (conn) { + altcp_proxyconnect_state_t *state = (altcp_proxyconnect_state_t *)conn->state; + LWIP_ASSERT("pcb mismatch", conn->inner_conn == inner_conn); + LWIP_UNUSED_ARG(inner_conn); /* for LWIP_NOASSERT */ + if (!state || !(state->flags & ALTCP_PROXYCONNECT_FLAGS_HANDSHAKE_DONE)) { + /* @todo: do something here? */ + return ERR_OK; + } + /* pass this on to upper sent */ + if (conn->sent) { + return conn->sent(conn->arg, conn, len); + } + } + return ERR_OK; +} + +/** Poll callback from lower connection (i.e. TCP) + * Just pass this on to the application. + * @todo: retry sending? + */ +static err_t +altcp_proxyconnect_lower_poll(void *arg, struct altcp_pcb *inner_conn) +{ + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + if (conn) { + LWIP_ASSERT("pcb mismatch", conn->inner_conn == inner_conn); + LWIP_UNUSED_ARG(inner_conn); /* for LWIP_NOASSERT */ + if (conn->poll) { + return conn->poll(conn->arg, conn); + } + } + return ERR_OK; +} + +static void +altcp_proxyconnect_lower_err(void *arg, err_t err) +{ + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + if (conn) { + conn->inner_conn = NULL; /* already freed */ + if (conn->err) { + conn->err(conn->arg, err); + } + altcp_free(conn); + } +} + + +/* setup functions */ + +static void +altcp_proxyconnect_setup_callbacks(struct altcp_pcb *conn, struct altcp_pcb *inner_conn) +{ + altcp_arg(inner_conn, conn); + altcp_recv(inner_conn, altcp_proxyconnect_lower_recv); + altcp_sent(inner_conn, altcp_proxyconnect_lower_sent); + altcp_err(inner_conn, altcp_proxyconnect_lower_err); + /* tcp_poll is set when interval is set by application */ + /* listen is set totally different :-) */ +} + +static err_t +altcp_proxyconnect_setup(struct altcp_proxyconnect_config *config, struct altcp_pcb *conn, struct altcp_pcb *inner_conn) +{ + altcp_proxyconnect_state_t *state; + if (!config) { + return ERR_ARG; + } + LWIP_ASSERT("invalid inner_conn", conn != inner_conn); + + /* allocate proxyconnect context */ + state = altcp_proxyconnect_state_alloc(); + if (state == NULL) { + return ERR_MEM; + } + state->flags = 0; + state->conf = config; + altcp_proxyconnect_setup_callbacks(conn, inner_conn); + conn->inner_conn = inner_conn; + conn->fns = &altcp_proxyconnect_functions; + conn->state = state; + return ERR_OK; +} + +/** Allocate a new altcp layer connecting through a proxy. + * This function gets the inner pcb passed. + * + * @param config struct altcp_proxyconnect_config that contains the proxy settings + * @param inner_pcb pcb that makes the connection to the proxy (i.e. tcp pcb) + */ +struct altcp_pcb * +altcp_proxyconnect_new(struct altcp_proxyconnect_config *config, struct altcp_pcb *inner_pcb) +{ + struct altcp_pcb *ret; + if (inner_pcb == NULL) { + return NULL; + } + ret = altcp_alloc(); + if (ret != NULL) { + if (altcp_proxyconnect_setup(config, ret, inner_pcb) != ERR_OK) { + altcp_free(ret); + return NULL; + } + } + return ret; +} + +/** Allocate a new altcp layer connecting through a proxy. + * This function allocates the inner pcb as tcp pcb, resulting in a direct tcp + * connection to the proxy. + * + * @param config struct altcp_proxyconnect_config that contains the proxy settings + * @param ip_type IP type of the connection (@ref lwip_ip_addr_type) + */ +struct altcp_pcb * +altcp_proxyconnect_new_tcp(struct altcp_proxyconnect_config *config, u8_t ip_type) +{ + struct altcp_pcb *inner_pcb, *ret; + + /* inner pcb is tcp */ + inner_pcb = altcp_tcp_new_ip_type(ip_type); + if (inner_pcb == NULL) { + return NULL; + } + ret = altcp_proxyconnect_new(config, inner_pcb); + if (ret == NULL) { + altcp_close(inner_pcb); + } + return ret; +} + +/** Allocator function to allocate a proxy connect altcp pcb connecting directly + * via tcp to the proxy. + * + * The returned pcb is a chain: altcp_proxyconnect - altcp_tcp - tcp pcb + * + * This function is meant for use with @ref altcp_new. + * + * @param arg struct altcp_proxyconnect_config that contains the proxy settings + * @param ip_type IP type of the connection (@ref lwip_ip_addr_type) + */ +struct altcp_pcb * +altcp_proxyconnect_alloc(void *arg, u8_t ip_type) +{ + return altcp_proxyconnect_new_tcp((struct altcp_proxyconnect_config *)arg, ip_type); +} + + +#if LWIP_ALTCP_TLS + +/** Allocator function to allocate a TLS connection through a proxy. + * + * The returned pcb is a chain: altcp_tls - altcp_proxyconnect - altcp_tcp - tcp pcb + * + * This function is meant for use with @ref altcp_new. + * + * @param arg struct altcp_proxyconnect_tls_config that contains the proxy settings + * and tls settings + * @param ip_type IP type of the connection (@ref lwip_ip_addr_type) + */ +struct altcp_pcb * +altcp_proxyconnect_tls_alloc(void *arg, u8_t ip_type) +{ + struct altcp_proxyconnect_tls_config *cfg = (struct altcp_proxyconnect_tls_config *)arg; + struct altcp_pcb *proxy_pcb; + struct altcp_pcb *tls_pcb; + + proxy_pcb = altcp_proxyconnect_new_tcp(&cfg->proxy, ip_type); + tls_pcb = altcp_tls_wrap(cfg->tls_config, proxy_pcb); + + if (tls_pcb == NULL) { + altcp_close(proxy_pcb); + } + return tls_pcb; +} +#endif /* LWIP_ALTCP_TLS */ + +/* "virtual" functions */ +static void +altcp_proxyconnect_set_poll(struct altcp_pcb *conn, u8_t interval) +{ + if (conn != NULL) { + altcp_poll(conn->inner_conn, altcp_proxyconnect_lower_poll, interval); + } +} + +static void +altcp_proxyconnect_recved(struct altcp_pcb *conn, u16_t len) +{ + altcp_proxyconnect_state_t *state; + if (conn == NULL) { + return; + } + state = (altcp_proxyconnect_state_t *)conn->state; + if (state == NULL) { + return; + } + if (!(state->flags & ALTCP_PROXYCONNECT_FLAGS_HANDSHAKE_DONE)) { + return; + } + altcp_recved(conn->inner_conn, len); +} + +static err_t +altcp_proxyconnect_connect(struct altcp_pcb *conn, const ip_addr_t *ipaddr, u16_t port, altcp_connected_fn connected) +{ + altcp_proxyconnect_state_t *state; + + if ((conn == NULL) || (ipaddr == NULL)) { + return ERR_VAL; + } + state = (altcp_proxyconnect_state_t *)conn->state; + if (state == NULL) { + return ERR_VAL; + } + if (state->flags & ALTCP_PROXYCONNECT_FLAGS_CONNECT_STARTED) { + return ERR_VAL; + } + state->flags |= ALTCP_PROXYCONNECT_FLAGS_CONNECT_STARTED; + + conn->connected = connected; + /* connect to our proxy instead, but store the requested address and port */ + ip_addr_copy(state->outer_addr, *ipaddr); + state->outer_port = port; + + return altcp_connect(conn->inner_conn, &state->conf->proxy_addr, state->conf->proxy_port, altcp_proxyconnect_lower_connected); +} + +static struct altcp_pcb * +altcp_proxyconnect_listen(struct altcp_pcb *conn, u8_t backlog, err_t *err) +{ + LWIP_UNUSED_ARG(conn); + LWIP_UNUSED_ARG(backlog); + LWIP_UNUSED_ARG(err); + /* listen not supported! */ + return NULL; +} + +static void +altcp_proxyconnect_abort(struct altcp_pcb *conn) +{ + if (conn != NULL) { + if (conn->inner_conn != NULL) { + altcp_abort(conn->inner_conn); + } + altcp_free(conn); + } +} + +static err_t +altcp_proxyconnect_close(struct altcp_pcb *conn) +{ + if (conn == NULL) { + return ERR_VAL; + } + if (conn->inner_conn != NULL) { + err_t err = altcp_close(conn->inner_conn); + if (err != ERR_OK) { + /* closing inner conn failed, return the error */ + return err; + } + } + /* no inner conn or closing it succeeded, deallocate myself */ + altcp_free(conn); + return ERR_OK; +} + +static err_t +altcp_proxyconnect_write(struct altcp_pcb *conn, const void *dataptr, u16_t len, u8_t apiflags) +{ + altcp_proxyconnect_state_t *state; + + LWIP_UNUSED_ARG(apiflags); + + if (conn == NULL) { + return ERR_VAL; + } + + state = (altcp_proxyconnect_state_t *)conn->state; + if (state == NULL) { + /* @todo: which error? */ + return ERR_CLSD; + } + if (!(state->flags & ALTCP_PROXYCONNECT_FLAGS_HANDSHAKE_DONE)) { + /* @todo: which error? */ + return ERR_VAL; + } + return altcp_write(conn->inner_conn, dataptr, len, apiflags); +} + +static void +altcp_proxyconnect_dealloc(struct altcp_pcb *conn) +{ + /* clean up and free tls state */ + if (conn) { + altcp_proxyconnect_state_t *state = (altcp_proxyconnect_state_t *)conn->state; + if (state) { + altcp_proxyconnect_state_free(state); + conn->state = NULL; + } + } +} +const struct altcp_functions altcp_proxyconnect_functions = { + altcp_proxyconnect_set_poll, + altcp_proxyconnect_recved, + altcp_default_bind, + altcp_proxyconnect_connect, + altcp_proxyconnect_listen, + altcp_proxyconnect_abort, + altcp_proxyconnect_close, + altcp_default_shutdown, + altcp_proxyconnect_write, + altcp_default_output, + altcp_default_mss, + altcp_default_sndbuf, + altcp_default_sndqueuelen, + altcp_default_nagle_disable, + altcp_default_nagle_enable, + altcp_default_nagle_disabled, + altcp_default_setprio, + altcp_proxyconnect_dealloc, + altcp_default_get_tcp_addrinfo, + altcp_default_get_ip, + altcp_default_get_port +#ifdef LWIP_DEBUG + , altcp_default_dbg_get_tcp_state +#endif +}; + +#endif /* LWIP_ALTCP */ diff --git a/User/lwip_http - bak/fs.c b/User/lwip_http - bak/fs.c new file mode 100644 index 0000000..e0387f7 --- /dev/null +++ b/User/lwip_http - bak/fs.c @@ -0,0 +1,184 @@ +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#include "lwip/apps/httpd_opts.h" +#include "lwip/def.h" +#include "lwip/apps/fs.h" +#include "fsdata.h" +#include + + +#define FS_ROOT file__STM32H7xxLED_html +#define FS_NUMFILES 7 + +//#if HTTPD_USE_CUSTOM_FSDATA +//#include "fsdata_custom.c" +//#else /* HTTPD_USE_CUSTOM_FSDATA */ +//#include "fsdata.c" +//#endif /* HTTPD_USE_CUSTOM_FSDATA */ + +#include "fsdata_custom.c" + +/*-----------------------------------------------------------------------------------*/ + +#if LWIP_HTTPD_CUSTOM_FILES +int fs_open_custom(struct fs_file *file, const char *name); +void fs_close_custom(struct fs_file *file); +#if LWIP_HTTPD_FS_ASYNC_READ +u8_t fs_canread_custom(struct fs_file *file); +u8_t fs_wait_read_custom(struct fs_file *file, fs_wait_cb callback_fn, void *callback_arg); +int fs_read_async_custom(struct fs_file *file, char *buffer, int count, fs_wait_cb callback_fn, void *callback_arg); +#else /* LWIP_HTTPD_FS_ASYNC_READ */ +int fs_read_custom(struct fs_file *file, char *buffer, int count); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + +/*-----------------------------------------------------------------------------------*/ +err_t +fs_open(struct fs_file *file, const char *name) +{ + const struct fsdata_file *f; + + if ((file == NULL) || (name == NULL)) { + return ERR_ARG; + } + +#if LWIP_HTTPD_CUSTOM_FILES + if (fs_open_custom(file, name)) { + file->is_custom_file = 1; + return ERR_OK; + } + file->is_custom_file = 0; +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + + for (f = FS_ROOT; f != NULL; f = f->next) { + if (!strcmp(name, (const char *)f->name)) { + file->data = (const char *)f->data; + file->len = f->len; + file->index = f->len; + file->pextension = NULL; + file->flags = f->flags; +#if HTTPD_PRECALCULATED_CHECKSUM + file->chksum_count = f->chksum_count; + file->chksum = f->chksum; +#endif /* HTTPD_PRECALCULATED_CHECKSUM */ +#if LWIP_HTTPD_FILE_STATE + file->state = fs_state_init(file, name); +#endif /* #if LWIP_HTTPD_FILE_STATE */ + return ERR_OK; + } + } + /* file not found */ + return ERR_VAL; +} + +/*-----------------------------------------------------------------------------------*/ +void +fs_close(struct fs_file *file) +{ +#if LWIP_HTTPD_CUSTOM_FILES + if (file->is_custom_file) { + fs_close_custom(file); + } +#endif /* LWIP_HTTPD_CUSTOM_FILES */ +#if LWIP_HTTPD_FILE_STATE + fs_state_free(file, file->state); +#endif /* #if LWIP_HTTPD_FILE_STATE */ + LWIP_UNUSED_ARG(file); +} +/*-----------------------------------------------------------------------------------*/ +#if LWIP_HTTPD_DYNAMIC_FILE_READ +#if LWIP_HTTPD_FS_ASYNC_READ +int +fs_read_async(struct fs_file *file, char *buffer, int count, fs_wait_cb callback_fn, void *callback_arg) +#else /* LWIP_HTTPD_FS_ASYNC_READ */ +int +fs_read(struct fs_file *file, char *buffer, int count) +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +{ + int read; + if(file->index == file->len) { + return FS_READ_EOF; + } +#if LWIP_HTTPD_FS_ASYNC_READ + LWIP_UNUSED_ARG(callback_fn); + LWIP_UNUSED_ARG(callback_arg); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +#if LWIP_HTTPD_CUSTOM_FILES + if (file->is_custom_file) { +#if LWIP_HTTPD_FS_ASYNC_READ + return fs_read_async_custom(file, buffer, count, callback_fn, callback_arg); +#else /* LWIP_HTTPD_FS_ASYNC_READ */ + return fs_read_custom(file, buffer, count); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + } +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + + read = file->len - file->index; + if(read > count) { + read = count; + } + + MEMCPY(buffer, (file->data + file->index), read); + file->index += read; + + return(read); +} +#endif /* LWIP_HTTPD_DYNAMIC_FILE_READ */ +/*-----------------------------------------------------------------------------------*/ +#if LWIP_HTTPD_FS_ASYNC_READ +int +fs_is_file_ready(struct fs_file *file, fs_wait_cb callback_fn, void *callback_arg) +{ + if (file != NULL) { +#if LWIP_HTTPD_FS_ASYNC_READ +#if LWIP_HTTPD_CUSTOM_FILES + if (!fs_canread_custom(file)) { + if (fs_wait_read_custom(file, callback_fn, callback_arg)) { + return 0; + } + } +#else /* LWIP_HTTPD_CUSTOM_FILES */ + LWIP_UNUSED_ARG(callback_fn); + LWIP_UNUSED_ARG(callback_arg); +#endif /* LWIP_HTTPD_CUSTOM_FILES */ +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + } + return 1; +} +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +/*-----------------------------------------------------------------------------------*/ +int +fs_bytes_left(struct fs_file *file) +{ + return file->len - file->index; +} diff --git a/User/lwip_http - bak/fs_new.c b/User/lwip_http - bak/fs_new.c new file mode 100644 index 0000000..f15a480 --- /dev/null +++ b/User/lwip_http - bak/fs_new.c @@ -0,0 +1,174 @@ +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#include "lwip/apps/httpd_opts.h" +#include "lwip/def.h" +#include "lwip/apps/fs.h" +#include + + +#include HTTPD_FSDATA_FILE + +/*-----------------------------------------------------------------------------------*/ + +#if LWIP_HTTPD_CUSTOM_FILES +int fs_open_custom(struct fs_file *file, const char *name); +void fs_close_custom(struct fs_file *file); +#if LWIP_HTTPD_FS_ASYNC_READ +u8_t fs_canread_custom(struct fs_file *file); +u8_t fs_wait_read_custom(struct fs_file *file, fs_wait_cb callback_fn, void *callback_arg); +int fs_read_async_custom(struct fs_file *file, char *buffer, int count, fs_wait_cb callback_fn, void *callback_arg); +#else /* LWIP_HTTPD_FS_ASYNC_READ */ +int fs_read_custom(struct fs_file *file, char *buffer, int count); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + +/*-----------------------------------------------------------------------------------*/ +err_t +fs_open(struct fs_file *file, const char *name) +{ + const struct fsdata_file *f; + + if ((file == NULL) || (name == NULL)) { + return ERR_ARG; + } + +#if LWIP_HTTPD_CUSTOM_FILES + if (fs_open_custom(file, name)) { + file->is_custom_file = 1; + return ERR_OK; + } + file->is_custom_file = 0; +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + + for (f = FS_ROOT; f != NULL; f = f->next) { + if (!strcmp(name, (const char *)f->name)) { + file->data = (const char *)f->data; + file->len = f->len; + file->index = f->len; + file->pextension = NULL; + file->flags = f->flags; +#if HTTPD_PRECALCULATED_CHECKSUM + file->chksum_count = f->chksum_count; + file->chksum = f->chksum; +#endif /* HTTPD_PRECALCULATED_CHECKSUM */ +#if LWIP_HTTPD_FILE_STATE + file->state = fs_state_init(file, name); +#endif /* #if LWIP_HTTPD_FILE_STATE */ + return ERR_OK; + } + } + /* file not found */ + return ERR_VAL; +} + +/*-----------------------------------------------------------------------------------*/ +void +fs_close(struct fs_file *file) +{ +#if LWIP_HTTPD_CUSTOM_FILES + if (file->is_custom_file) { + fs_close_custom(file); + } +#endif /* LWIP_HTTPD_CUSTOM_FILES */ +#if LWIP_HTTPD_FILE_STATE + fs_state_free(file, file->state); +#endif /* #if LWIP_HTTPD_FILE_STATE */ + LWIP_UNUSED_ARG(file); +} +/*-----------------------------------------------------------------------------------*/ +#if LWIP_HTTPD_DYNAMIC_FILE_READ +#if LWIP_HTTPD_FS_ASYNC_READ +int +fs_read_async(struct fs_file *file, char *buffer, int count, fs_wait_cb callback_fn, void *callback_arg) +#else /* LWIP_HTTPD_FS_ASYNC_READ */ +int +fs_read(struct fs_file *file, char *buffer, int count) +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +{ + int read; + if (file->index == file->len) { + return FS_READ_EOF; + } +#if LWIP_HTTPD_FS_ASYNC_READ + LWIP_UNUSED_ARG(callback_fn); + LWIP_UNUSED_ARG(callback_arg); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +#if LWIP_HTTPD_CUSTOM_FILES + if (file->is_custom_file) { +#if LWIP_HTTPD_FS_ASYNC_READ + return fs_read_async_custom(file, buffer, count, callback_fn, callback_arg); +#else /* LWIP_HTTPD_FS_ASYNC_READ */ + return fs_read_custom(file, buffer, count); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + } +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + + read = file->len - file->index; + if (read > count) { + read = count; + } + + MEMCPY(buffer, (file->data + file->index), read); + file->index += read; + + return (read); +} +#endif /* LWIP_HTTPD_DYNAMIC_FILE_READ */ +/*-----------------------------------------------------------------------------------*/ +#if LWIP_HTTPD_FS_ASYNC_READ +int +fs_is_file_ready(struct fs_file *file, fs_wait_cb callback_fn, void *callback_arg) +{ + if (file != NULL) { +#if LWIP_HTTPD_FS_ASYNC_READ +#if LWIP_HTTPD_CUSTOM_FILES + if (!fs_canread_custom(file)) { + if (fs_wait_read_custom(file, callback_fn, callback_arg)) { + return 0; + } + } +#else /* LWIP_HTTPD_CUSTOM_FILES */ + LWIP_UNUSED_ARG(callback_fn); + LWIP_UNUSED_ARG(callback_arg); +#endif /* LWIP_HTTPD_CUSTOM_FILES */ +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + } + return 1; +} +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +/*-----------------------------------------------------------------------------------*/ +int +fs_bytes_left(struct fs_file *file) +{ + return file->len - file->index; +} diff --git a/User/lwip_http - bak/fsdata.c b/User/lwip_http - bak/fsdata.c new file mode 100644 index 0000000..6170ce6 --- /dev/null +++ b/User/lwip_http - bak/fsdata.c @@ -0,0 +1,298 @@ +#include "lwip/apps/fs.h" +#include "lwip/def.h" +#include "fsdata.h" + + +#define file_NULL (struct fsdata_file *) NULL + + +static const unsigned int dummy_align__img_sics_gif = 0; +static const unsigned char data__img_sics_gif[] = { +/* /img/sics.gif (14 chars) */ +0x2f,0x69,0x6d,0x67,0x2f,0x73,0x69,0x63,0x73,0x2e,0x67,0x69,0x66,0x00,0x00,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) +" (63 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, +0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, +0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, +0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, +/* "Content-type: image/gif + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x69,0x6d, +0x61,0x67,0x65,0x2f,0x67,0x69,0x66,0x0d,0x0a,0x0d,0x0a, +/* raw file data (724 bytes) */ +0x47,0x49,0x46,0x38,0x39,0x61,0x46,0x00,0x22,0x00,0xa5,0x00,0x00,0xd9,0x2b,0x39, +0x6a,0x6a,0x6a,0xbf,0xbf,0xbf,0x93,0x93,0x93,0x0f,0x0f,0x0f,0xb0,0xb0,0xb0,0xa6, +0xa6,0xa6,0x80,0x80,0x80,0x76,0x76,0x76,0x1e,0x1e,0x1e,0x9d,0x9d,0x9d,0x2e,0x2e, +0x2e,0x49,0x49,0x49,0x54,0x54,0x54,0x8a,0x8a,0x8a,0x60,0x60,0x60,0xc6,0xa6,0x99, +0xbd,0xb5,0xb2,0xc2,0xab,0xa1,0xd9,0x41,0x40,0xd5,0x67,0x55,0xc0,0xb0,0xaa,0xd5, +0x5e,0x4e,0xd6,0x50,0x45,0xcc,0x93,0x7d,0xc8,0xa1,0x90,0xce,0x8b,0x76,0xd2,0x7b, +0x65,0xd1,0x84,0x6d,0xc9,0x99,0x86,0x3a,0x3a,0x3a,0x00,0x00,0x00,0xb8,0xb8,0xb8, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2c,0x00,0x00, +0x00,0x00,0x46,0x00,0x22,0x00,0x00,0x06,0xfe,0x40,0x90,0x70,0x48,0x2c,0x1a,0x8f, +0xc8,0xa4,0x72,0xc9,0x6c,0x3a,0x9f,0xd0,0xa8,0x74,0x4a,0xad,0x5a,0xaf,0xd8,0xac, +0x76,0xa9,0x40,0x04,0xbe,0x83,0xe2,0x60,0x3c,0x50,0x20,0x0d,0x8e,0x6f,0x00,0x31, +0x28,0x1c,0x0d,0x07,0xb5,0xc3,0x60,0x75,0x24,0x3e,0xf8,0xfc,0x87,0x11,0x06,0xe9, +0x3d,0x46,0x07,0x0b,0x7a,0x7a,0x7c,0x43,0x06,0x1e,0x84,0x78,0x0b,0x07,0x6e,0x51, +0x01,0x8a,0x84,0x08,0x7e,0x79,0x80,0x87,0x89,0x91,0x7a,0x93,0x0a,0x04,0x99,0x78, +0x96,0x4f,0x03,0x9e,0x79,0x01,0x94,0x9f,0x43,0x9c,0xa3,0xa4,0x05,0x77,0xa3,0xa0, +0x4e,0x98,0x79,0x0b,0x1e,0x83,0xa4,0xa6,0x1f,0x96,0x05,0x9d,0xaa,0x78,0x01,0x07, +0x84,0x04,0x1e,0x1e,0xbb,0xb8,0x51,0x84,0x0e,0x43,0x05,0x07,0x77,0xa5,0x7f,0x42, +0xb1,0xb2,0x01,0x63,0x08,0x0d,0xbb,0x01,0x0c,0x7a,0x0d,0x44,0x0e,0xd8,0xaf,0x4c, +0x05,0x7a,0x04,0x47,0x07,0x07,0xb7,0x80,0xa2,0xe1,0x7d,0x44,0x05,0x01,0x04,0x01, +0xd0,0xea,0x87,0x93,0x4f,0xe0,0x9a,0x49,0xce,0xd8,0x79,0x04,0x66,0x20,0x15,0x10, +0x10,0x11,0x92,0x29,0x80,0xb6,0xc0,0x91,0x15,0x45,0x1e,0x90,0x19,0x71,0x46,0xa8, +0x5c,0x04,0x0e,0x00,0x22,0x4e,0xe8,0x40,0x24,0x9f,0x3e,0x04,0x06,0xa7,0x58,0xd4, +0x93,0xa0,0x1c,0x91,0x3f,0xe8,0xf0,0x88,0x03,0xb1,0x21,0xa2,0x49,0x00,0x19,0x86, +0xfc,0x52,0x44,0xe0,0x01,0x9d,0x29,0x21,0x15,0x25,0x50,0xf7,0x67,0x25,0x1e,0x06, +0xfd,0x4e,0x9a,0xb4,0x90,0xac,0x15,0xfa,0xcb,0x52,0x53,0x1e,0x8c,0xf2,0xf8,0x07, +0x92,0x2d,0x08,0x3a,0x4d,0x12,0x49,0x95,0x49,0xdb,0x14,0x04,0xc4,0x14,0x85,0x29, +0xaa,0xe7,0x01,0x08,0xa4,0x49,0x01,0x14,0x51,0xe0,0x53,0x91,0xd5,0x29,0x06,0x1a, +0x64,0x02,0xf4,0xc7,0x81,0x9e,0x05,0x20,0x22,0x64,0xa5,0x30,0xae,0xab,0x9e,0x97, +0x53,0xd8,0xb9,0xfd,0x50,0xef,0x93,0x02,0x42,0x74,0x34,0xe8,0x9c,0x20,0x21,0xc9, +0x01,0x68,0x78,0xe6,0x55,0x29,0x20,0x56,0x4f,0x4c,0x40,0x51,0x71,0x82,0xc0,0x70, +0x21,0x22,0x85,0xbe,0x4b,0x1c,0x44,0x05,0xea,0xa4,0x01,0xbf,0x22,0xb5,0xf0,0x1c, +0x06,0x51,0x38,0x8f,0xe0,0x22,0xec,0x18,0xac,0x39,0x22,0xd4,0xd6,0x93,0x44,0x01, +0x32,0x82,0xc8,0xfc,0x61,0xb3,0x01,0x45,0x0c,0x2e,0x83,0x30,0xd0,0x0e,0x17,0x24, +0x0f,0x70,0x85,0x94,0xee,0x05,0x05,0x53,0x4b,0x32,0x1b,0x3f,0x98,0xd3,0x1d,0x29, +0x81,0xb0,0xae,0x1e,0x8c,0x7e,0x68,0xe0,0x60,0x5a,0x54,0x8f,0xb0,0x78,0x69,0x73, +0x06,0xa2,0x00,0x6b,0x57,0xca,0x3d,0x11,0x50,0xbd,0x04,0x30,0x4b,0x3a,0xd4,0xab, +0x5f,0x1f,0x9b,0x3d,0x13,0x74,0x27,0x88,0x3c,0x25,0xe0,0x17,0xbe,0x7a,0x79,0x45, +0x0d,0x0c,0xb0,0x8b,0xda,0x90,0xca,0x80,0x06,0x5d,0x17,0x60,0x1c,0x22,0x4c,0xd8, +0x57,0x22,0x06,0x20,0x00,0x98,0x07,0x08,0xe4,0x56,0x80,0x80,0x1c,0xc5,0xb7,0xc5, +0x82,0x0c,0x36,0xe8,0xe0,0x83,0x10,0x46,0x28,0xe1,0x84,0x14,0x56,0x68,0xa1,0x10, +0x41,0x00,0x00,0x3b,}; + +static const unsigned int dummy_align__404_html = 1; +static const unsigned char data__404_html[] = { +/* /404.html (10 chars) */ +0x2f,0x34,0x30,0x34,0x2e,0x68,0x74,0x6d,0x6c,0x00,0x00,0x00, + +/* HTTP header */ +/* "HTTP/1.0 404 File not found +" (29 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x34,0x30,0x34,0x20,0x46,0x69,0x6c, +0x65,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x0d,0x0a, +/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) +" (63 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, +0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, +0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, +0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, +/* "Content-type: text/html + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, +0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x0d,0x0a, +/* raw file data (565 bytes) */ +0x3c,0x68,0x74,0x6d,0x6c,0x3e,0x0d,0x0a,0x3c,0x68,0x65,0x61,0x64,0x3e,0x3c,0x74, +0x69,0x74,0x6c,0x65,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c,0x69, +0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50, +0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x74,0x69,0x74,0x6c,0x65,0x3e,0x3c,0x2f, +0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x3c,0x62,0x6f,0x64,0x79,0x20,0x62,0x67,0x63, +0x6f,0x6c,0x6f,0x72,0x3d,0x22,0x77,0x68,0x69,0x74,0x65,0x22,0x20,0x74,0x65,0x78, +0x74,0x3d,0x22,0x62,0x6c,0x61,0x63,0x6b,0x22,0x3e,0x0d,0x0a,0x0d,0x0a,0x20,0x20, +0x20,0x20,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22, +0x31,0x30,0x30,0x25,0x22,0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74, +0x72,0x20,0x76,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22,0x3e,0x3c, +0x74,0x64,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x38,0x30,0x22,0x3e,0x09,0x20, +0x20,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68, +0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73, +0x65,0x2f,0x22,0x3e,0x3c,0x69,0x6d,0x67,0x20,0x73,0x72,0x63,0x3d,0x22,0x2f,0x69, +0x6d,0x67,0x2f,0x73,0x69,0x63,0x73,0x2e,0x67,0x69,0x66,0x22,0x0d,0x0a,0x09,0x20, +0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x30,0x22,0x20,0x61,0x6c,0x74,0x3d, +0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x20,0x74,0x69,0x74,0x6c, +0x65,0x3d,0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x3e,0x3c,0x2f, +0x61,0x3e,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x20,0x77,0x69, +0x64,0x74,0x68,0x3d,0x22,0x35,0x30,0x30,0x22,0x3e,0x09,0x20,0x20,0x0d,0x0a,0x09, +0x20,0x20,0x3c,0x68,0x31,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c, +0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49, +0x50,0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x68,0x31,0x3e,0x0d,0x0a,0x09,0x20, +0x20,0x3c,0x68,0x32,0x3e,0x34,0x30,0x34,0x20,0x2d,0x20,0x50,0x61,0x67,0x65,0x20, +0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x3c,0x2f,0x68,0x32,0x3e,0x0d,0x0a, +0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x53,0x6f,0x72, +0x72,0x79,0x2c,0x20,0x74,0x68,0x65,0x20,0x70,0x61,0x67,0x65,0x20,0x79,0x6f,0x75, +0x20,0x61,0x72,0x65,0x20,0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x69,0x6e,0x67,0x20, +0x77,0x61,0x73,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x20,0x6f,0x6e, +0x20,0x74,0x68,0x69,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x73,0x65,0x72,0x76, +0x65,0x72,0x2e,0x20,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09, +0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x2f,0x74,0x72, +0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65, +0x3e,0x0d,0x0a,0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x68,0x74, +0x6d,0x6c,0x3e,0x0d,0x0a,}; + +static const unsigned int dummy_align__index_html = 2; +static const unsigned char data__index_html[] = { +/* /index.html (12 chars) */ +0x2f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x68,0x74,0x6d,0x6c,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) +" (63 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, +0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, +0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, +0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, +/* "Content-type: text/html + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, +0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x0d,0x0a, +/* raw file data (1751 bytes) */ +0x3c,0x68,0x74,0x6d,0x6c,0x3e,0x0d,0x0a,0x3c,0x68,0x65,0x61,0x64,0x3e,0x3c,0x74, +0x69,0x74,0x6c,0x65,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c,0x69, +0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50, +0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x74,0x69,0x74,0x6c,0x65,0x3e,0x3c,0x2f, +0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x3c,0x62,0x6f,0x64,0x79,0x20,0x62,0x67,0x63, +0x6f,0x6c,0x6f,0x72,0x3d,0x22,0x77,0x68,0x69,0x74,0x65,0x22,0x20,0x74,0x65,0x78, +0x74,0x3d,0x22,0x62,0x6c,0x61,0x63,0x6b,0x22,0x3e,0x0d,0x0a,0x0d,0x0a,0x20,0x20, +0x20,0x20,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22, +0x31,0x30,0x30,0x25,0x22,0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74, +0x72,0x20,0x76,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22,0x3e,0x3c, +0x74,0x64,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x38,0x30,0x22,0x3e,0x09,0x20, +0x20,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68, +0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73, +0x65,0x2f,0x22,0x3e,0x3c,0x69,0x6d,0x67,0x20,0x73,0x72,0x63,0x3d,0x22,0x2f,0x69, +0x6d,0x67,0x2f,0x73,0x69,0x63,0x73,0x2e,0x67,0x69,0x66,0x22,0x0d,0x0a,0x09,0x20, +0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x30,0x22,0x20,0x61,0x6c,0x74,0x3d, +0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x20,0x74,0x69,0x74,0x6c, +0x65,0x3d,0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x3e,0x3c,0x2f, +0x61,0x3e,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x20,0x77,0x69, +0x64,0x74,0x68,0x3d,0x22,0x35,0x30,0x30,0x22,0x3e,0x09,0x20,0x20,0x0d,0x0a,0x09, +0x20,0x20,0x3c,0x68,0x31,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c, +0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49, +0x50,0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x68,0x31,0x3e,0x0d,0x0a,0x09,0x20, +0x20,0x3c,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x54,0x68,0x65,0x20,0x77, +0x65,0x62,0x20,0x70,0x61,0x67,0x65,0x20,0x79,0x6f,0x75,0x20,0x61,0x72,0x65,0x20, +0x77,0x61,0x74,0x63,0x68,0x69,0x6e,0x67,0x20,0x77,0x61,0x73,0x20,0x73,0x65,0x72, +0x76,0x65,0x64,0x20,0x62,0x79,0x20,0x61,0x20,0x73,0x69,0x6d,0x70,0x6c,0x65,0x20, +0x77,0x65,0x62,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x73,0x65,0x72,0x76,0x65,0x72, +0x20,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x20,0x6f,0x6e,0x20,0x74,0x6f,0x70,0x20, +0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x6c,0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67, +0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50,0x20,0x73,0x74,0x61,0x63,0x6b,0x20, +0x3c,0x61,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68, +0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73, +0x65,0x2f,0x7e,0x61,0x64,0x61,0x6d,0x2f,0x6c,0x77,0x69,0x70,0x2f,0x22,0x3e,0x6c, +0x77,0x49,0x50,0x3c,0x2f,0x61,0x3e,0x2e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x2f,0x70, +0x3e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20, +0x6c,0x77,0x49,0x50,0x20,0x69,0x73,0x20,0x61,0x6e,0x20,0x6f,0x70,0x65,0x6e,0x20, +0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74, +0x61,0x74,0x69,0x6f,0x6e,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x54,0x43,0x50, +0x2f,0x49,0x50,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x70,0x72,0x6f,0x74,0x6f,0x63, +0x6f,0x6c,0x20,0x73,0x75,0x69,0x74,0x65,0x20,0x74,0x68,0x61,0x74,0x20,0x77,0x61, +0x73,0x20,0x6f,0x72,0x69,0x67,0x69,0x6e,0x61,0x6c,0x6c,0x79,0x20,0x77,0x72,0x69, +0x74,0x74,0x65,0x6e,0x20,0x62,0x79,0x20,0x3c,0x61,0x0d,0x0a,0x09,0x20,0x20,0x20, +0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77, +0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73,0x65,0x2f,0x7e,0x61,0x64,0x61,0x6d,0x2f, +0x6c,0x77,0x69,0x70,0x2f,0x22,0x3e,0x41,0x64,0x61,0x6d,0x20,0x44,0x75,0x6e,0x6b, +0x65,0x6c,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x6f,0x66,0x20,0x74,0x68,0x65, +0x20,0x53,0x77,0x65,0x64,0x69,0x73,0x68,0x20,0x49,0x6e,0x73,0x74,0x69,0x74,0x75, +0x74,0x65,0x20,0x6f,0x66,0x20,0x43,0x6f,0x6d,0x70,0x75,0x74,0x65,0x72,0x20,0x53, +0x63,0x69,0x65,0x6e,0x63,0x65,0x3c,0x2f,0x61,0x3e,0x20,0x62,0x75,0x74,0x20,0x6e, +0x6f,0x77,0x20,0x69,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x62,0x65,0x69,0x6e, +0x67,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x6c,0x79,0x20,0x64,0x65,0x76,0x65,0x6c, +0x6f,0x70,0x65,0x64,0x20,0x62,0x79,0x20,0x61,0x20,0x74,0x65,0x61,0x6d,0x20,0x6f, +0x66,0x20,0x64,0x65,0x76,0x65,0x6c,0x6f,0x70,0x65,0x72,0x73,0x0d,0x0a,0x09,0x20, +0x20,0x20,0x20,0x64,0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x64,0x20,0x77, +0x6f,0x72,0x6c,0x64,0x2d,0x77,0x69,0x64,0x65,0x2e,0x20,0x53,0x69,0x6e,0x63,0x65, +0x20,0x69,0x74,0x27,0x73,0x20,0x72,0x65,0x6c,0x65,0x61,0x73,0x65,0x2c,0x20,0x6c, +0x77,0x49,0x50,0x20,0x68,0x61,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x73,0x70, +0x75,0x72,0x72,0x65,0x64,0x20,0x61,0x20,0x6c,0x6f,0x74,0x20,0x6f,0x66,0x20,0x69, +0x6e,0x74,0x65,0x72,0x65,0x73,0x74,0x20,0x61,0x6e,0x64,0x20,0x68,0x61,0x73,0x20, +0x62,0x65,0x65,0x6e,0x20,0x70,0x6f,0x72,0x74,0x65,0x64,0x20,0x74,0x6f,0x20,0x73, +0x65,0x76,0x65,0x72,0x61,0x6c,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x70,0x6c,0x61, +0x74,0x66,0x6f,0x72,0x6d,0x73,0x20,0x61,0x6e,0x64,0x20,0x6f,0x70,0x65,0x72,0x61, +0x74,0x69,0x6e,0x67,0x20,0x73,0x79,0x73,0x74,0x65,0x6d,0x73,0x2e,0x20,0x6c,0x77, +0x49,0x50,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x75,0x73,0x65,0x64,0x20,0x65, +0x69,0x74,0x68,0x65,0x72,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x77,0x69,0x74,0x68, +0x20,0x6f,0x72,0x20,0x77,0x69,0x74,0x68,0x6f,0x75,0x74,0x20,0x61,0x6e,0x20,0x75, +0x6e,0x64,0x65,0x72,0x6c,0x79,0x69,0x6e,0x67,0x20,0x4f,0x53,0x2e,0x0d,0x0a,0x09, +0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d,0x0a, +0x09,0x20,0x20,0x20,0x20,0x54,0x68,0x65,0x20,0x66,0x6f,0x63,0x75,0x73,0x20,0x6f, +0x66,0x20,0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x20,0x54,0x43,0x50,0x2f,0x49, +0x50,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e, +0x20,0x69,0x73,0x20,0x74,0x6f,0x20,0x72,0x65,0x64,0x75,0x63,0x65,0x0d,0x0a,0x09, +0x20,0x20,0x20,0x20,0x74,0x68,0x65,0x20,0x52,0x41,0x4d,0x20,0x75,0x73,0x61,0x67, +0x65,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,0x73,0x74,0x69,0x6c,0x6c,0x20,0x68,0x61, +0x76,0x69,0x6e,0x67,0x20,0x61,0x20,0x66,0x75,0x6c,0x6c,0x20,0x73,0x63,0x61,0x6c, +0x65,0x20,0x54,0x43,0x50,0x2e,0x20,0x54,0x68,0x69,0x73,0x0d,0x0a,0x09,0x20,0x20, +0x20,0x20,0x6d,0x61,0x6b,0x65,0x73,0x20,0x6c,0x77,0x49,0x50,0x20,0x73,0x75,0x69, +0x74,0x61,0x62,0x6c,0x65,0x20,0x66,0x6f,0x72,0x20,0x75,0x73,0x65,0x20,0x69,0x6e, +0x20,0x65,0x6d,0x62,0x65,0x64,0x64,0x65,0x64,0x20,0x73,0x79,0x73,0x74,0x65,0x6d, +0x73,0x20,0x77,0x69,0x74,0x68,0x20,0x74,0x65,0x6e,0x73,0x0d,0x0a,0x09,0x20,0x20, +0x20,0x20,0x6f,0x66,0x20,0x6b,0x69,0x6c,0x6f,0x62,0x79,0x74,0x65,0x73,0x20,0x6f, +0x66,0x20,0x66,0x72,0x65,0x65,0x20,0x52,0x41,0x4d,0x20,0x61,0x6e,0x64,0x20,0x72, +0x6f,0x6f,0x6d,0x20,0x66,0x6f,0x72,0x20,0x61,0x72,0x6f,0x75,0x6e,0x64,0x20,0x34, +0x30,0x20,0x6b,0x69,0x6c,0x6f,0x62,0x79,0x74,0x65,0x73,0x0d,0x0a,0x09,0x20,0x20, +0x20,0x20,0x6f,0x66,0x20,0x63,0x6f,0x64,0x65,0x20,0x52,0x4f,0x4d,0x2e,0x0d,0x0a, +0x09,0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d, +0x0a,0x09,0x20,0x20,0x20,0x20,0x4d,0x6f,0x72,0x65,0x20,0x69,0x6e,0x66,0x6f,0x72, +0x6d,0x61,0x74,0x69,0x6f,0x6e,0x20,0x61,0x62,0x6f,0x75,0x74,0x20,0x6c,0x77,0x49, +0x50,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x66,0x6f,0x75,0x6e,0x64,0x20,0x61, +0x74,0x20,0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x0d,0x0a,0x09,0x20,0x20,0x20, +0x20,0x68,0x6f,0x6d,0x65,0x70,0x61,0x67,0x65,0x20,0x61,0x74,0x20,0x3c,0x61,0x0d, +0x0a,0x09,0x20,0x20,0x20,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68,0x74,0x74,0x70, +0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67, +0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f, +0x6c,0x77,0x69,0x70,0x2f,0x22,0x3e,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61, +0x76,0x61,0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72, +0x67,0x2f,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x2f, +0x3c,0x2f,0x61,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x6f,0x72,0x20,0x61,0x74, +0x20,0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x20,0x77,0x69,0x6b,0x69,0x20,0x61, +0x74,0x20,0x3c,0x61,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x68,0x72,0x65,0x66,0x3d, +0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6c,0x77,0x69,0x70,0x2e,0x77,0x69,0x6b, +0x69,0x61,0x2e,0x63,0x6f,0x6d,0x2f,0x22,0x3e,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f, +0x6c,0x77,0x69,0x70,0x2e,0x77,0x69,0x6b,0x69,0x61,0x2e,0x63,0x6f,0x6d,0x2f,0x3c, +0x2f,0x61,0x3e,0x2e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09, +0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x2f,0x74,0x72, +0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65, +0x3e,0x0d,0x0a,0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x68,0x74, +0x6d,0x6c,0x3e,0x0d,0x0a,0x0d,0x0a,}; + + + +const struct fsdata_file file__img_sics_gif[] = { { +file_NULL, +data__img_sics_gif, +data__img_sics_gif + 16, +sizeof(data__img_sics_gif) - 16, +1, +}}; + +const struct fsdata_file file__404_html[] = { { +file__img_sics_gif, +data__404_html, +data__404_html + 12, +sizeof(data__404_html) - 12, +1, +}}; + +const struct fsdata_file file__index_html[] = { { +file__404_html, +data__index_html, +data__index_html + 12, +sizeof(data__index_html) - 12, +1, +}}; + +#define FS_ROOT file__index_html +#define FS_NUMFILES 3 + diff --git a/User/lwip_http - bak/fsdata.h b/User/lwip_http - bak/fsdata.h new file mode 100644 index 0000000..ad4bbf9 --- /dev/null +++ b/User/lwip_http - bak/fsdata.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_FSDATA_H +#define LWIP_FSDATA_H + +#include "lwip/apps/httpd_opts.h" +#include "lwip/apps/fs.h" + +//struct fsdata_file { +// const struct fsdata_file *next; +// const unsigned char *name; +// const unsigned char *data; +// int len; +// u8_t flags; +//#if HTTPD_PRECALCULATED_CHECKSUM +// u16_t chksum_count; +// const struct fsdata_chksum *chksum; +//#endif /* HTTPD_PRECALCULATED_CHECKSUM */ +//}; + +#endif /* LWIP_FSDATA_H */ diff --git a/User/lwip_http - bak/fsdata_custom.c b/User/lwip_http - bak/fsdata_custom.c new file mode 100644 index 0000000..1954484 --- /dev/null +++ b/User/lwip_http - bak/fsdata_custom.c @@ -0,0 +1,4599 @@ +/** + ****************************************************************************** + * @file LwIP/LwIP_HTTP_Server_Raw/Src/fsdata_costom.c + * @author MCD Application Team + * @brief This file provides the Webserver HTML files + ****************************************************************************** + * @attention + * + *

                  © Copyright (c) 2017 STMicroelectronics. + * All rights reserved.

                  + * + * This software component is licensed by ST under Ultimate Liberty license + * SLA0044, the "License"; You may not use this file except in compliance with + * the License. You may obtain a copy of the License at: + * www.st.com/SLA0044 + * + ****************************************************************************** + */ + +#include "lwip/apps/fs.h" +#include "lwip/def.h" +//#include "httpd/fsdata.h" + + +#define file_NULL (struct fsdata_file *) NULL + + +const unsigned int dummy_align__STM32H7xx_files_logo_jpg = 0; +const unsigned char data__STM32H7xx_files_logo_jpg[] = { +/* /STM32H7xx_files/logo.jpg (26 chars) */ +0x2f,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x5f,0x66,0x69,0x6c,0x65,0x73, +0x2f,0x6c,0x6f,0x67,0x6f,0x2e,0x6a,0x70,0x67,0x00,0x00,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) +" (63 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, +0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, +0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, +0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, +/* "Content-type: image/jpeg + +" (28 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x69,0x6d, +0x61,0x67,0x65,0x2f,0x6a,0x70,0x65,0x67,0x0d,0x0a,0x0d,0x0a, +/* raw file data (2554 bytes) */ +0xff,0xd8,0xff,0xe0,0x00,0x10,0x4a,0x46,0x49,0x46,0x00,0x01,0x01,0x01,0x00,0x48, +0x00,0x48,0x00,0x00,0xff,0xfe,0x00,0x3c,0x43,0x52,0x45,0x41,0x54,0x4f,0x52,0x3a, +0x20,0x67,0x64,0x2d,0x6a,0x70,0x65,0x67,0x20,0x76,0x31,0x2e,0x30,0x20,0x28,0x75, +0x73,0x69,0x6e,0x67,0x20,0x49,0x4a,0x47,0x20,0x4a,0x50,0x45,0x47,0x20,0x76,0x36, +0x32,0x29,0x2c,0x20,0x71,0x75,0x61,0x6c,0x69,0x74,0x79,0x20,0x3d,0x20,0x31,0x30, +0x30,0x0a,0xff,0xdb,0x00,0x43,0x00,0x06,0x04,0x05,0x06,0x05,0x04,0x06,0x06,0x05, +0x06,0x07,0x07,0x06,0x08,0x0a,0x10,0x0a,0x0a,0x09,0x09,0x0a,0x14,0x0e,0x0f,0x0c, +0x10,0x17,0x14,0x18,0x18,0x17,0x14,0x16,0x16,0x1a,0x1d,0x25,0x1f,0x1a,0x1b,0x23, +0x1c,0x16,0x16,0x20,0x2c,0x20,0x23,0x26,0x27,0x29,0x2a,0x29,0x19,0x1f,0x2d,0x30, +0x2d,0x28,0x30,0x25,0x28,0x29,0x28,0xff,0xdb,0x00,0x43,0x01,0x07,0x07,0x07,0x0a, +0x08,0x0a,0x13,0x0a,0x0a,0x13,0x28,0x1a,0x16,0x1a,0x28,0x28,0x28,0x28,0x28,0x28, +0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, +0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, +0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0xff,0xc0,0x00,0x11, +0x08,0x00,0x44,0x00,0x60,0x03,0x01,0x22,0x00,0x02,0x11,0x01,0x03,0x11,0x01,0xff, +0xc4,0x00,0x1c,0x00,0x00,0x02,0x02,0x03,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x07,0x06,0x08,0x02,0x03,0x04,0x05,0x01,0xff,0xc4,0x00, +0x3c,0x10,0x00,0x01,0x03,0x03,0x03,0x00,0x06,0x06,0x08,0x05,0x05,0x01,0x00,0x00, +0x00,0x00,0x01,0x02,0x03,0x04,0x00,0x05,0x11,0x06,0x12,0x21,0x07,0x13,0x31,0x41, +0x51,0x81,0x15,0x22,0x61,0x71,0x91,0xd1,0x14,0x32,0x42,0x52,0x55,0x92,0x93,0x94, +0x08,0x23,0x43,0x82,0xa1,0x24,0x33,0x72,0x73,0x83,0xf1,0xff,0xc4,0x00,0x1a,0x01, +0x00,0x02,0x03,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x04,0x01,0x02,0x03,0x05,0x06,0xff,0xc4,0x00,0x2b,0x11,0x00,0x01,0x03,0x02, +0x04,0x03,0x08,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x02,0x03, +0x04,0x11,0x12,0x13,0x21,0x31,0x05,0x41,0xf0,0x14,0x42,0x43,0x51,0x53,0x81,0xa1, +0xd1,0x52,0x61,0xe1,0xff,0xda,0x00,0x0c,0x03,0x01,0x00,0x02,0x11,0x03,0x11,0x00, +0x3f,0x00,0xb5,0x34,0x51,0x45,0x08,0x51,0x9d,0x77,0xac,0x21,0x69,0x1b,0x6a,0x1f, +0x92,0x92,0xf4,0xa7,0x89,0x4c,0x78,0xe9,0x38,0x2b,0x23,0xb4,0x93,0xdc,0x91,0x91, +0x93,0xed,0x14,0x9a,0x97,0xd2,0xae,0xa7,0x96,0xf9,0x5b,0x32,0x19,0x8a,0xde,0x78, +0x6d,0xa6,0x52,0x40,0xf3,0x56,0x4d,0x79,0x5d,0x2c,0xdf,0x7d,0x3b,0xae,0x25,0xa9, +0xb5,0xee,0x8d,0x13,0xfd,0x2b,0x38,0xec,0xc2,0x4f,0xac,0x7c,0xd4,0x4f,0x96,0x29, +0x8d,0xd1,0xa7,0x46,0x90,0x05,0xaa,0x3d,0xd3,0x51,0x47,0x12,0xe4,0xc8,0x48,0x71, +0xb8,0xce,0x72,0xdb,0x69,0x3d,0x9b,0x93,0xf6,0x89,0x1c,0xf3,0xc0,0xf0,0xae,0x8b, +0x19,0x1c,0x11,0x87,0xc8,0x2e,0x4a,0xe6,0x48,0xf9,0x6a,0x24,0x2c,0x8c,0xd8,0x05, +0x0c,0x6f,0xa4,0xad,0x4a,0x7e,0xb5,0xd9,0x23,0xff,0x00,0x26,0xfe,0x55,0xd4,0xd7, +0x48,0x9a,0x85,0x5d,0xb7,0x74,0xfe,0x9b,0x7f,0x2a,0x77,0xa3,0x4f,0xd9,0x90,0x90, +0x94,0x5a,0x2d,0xc9,0x48,0xec,0x02,0x32,0x00,0x1f,0xe2,0xbe,0xfa,0x06,0xcf,0xf8, +0x4d,0xbf,0xf6,0xc8,0xf9,0x55,0x7b,0x54,0x5e,0x98,0x53,0xd8,0xe6,0xf5,0x4f,0x5e, +0xe9,0x34,0xd6,0xbe,0xbe,0xab,0xb6,0xee,0x3f,0x23,0x7f,0x2a,0xe9,0x1a,0xe6,0xf2, +0x46,0x7d,0x30,0x3f,0x23,0x7f,0x2a,0x6e,0x7a,0x02,0xcf,0xf8,0x4d,0xbf,0xf6,0xc8, +0xf9,0x51,0xe8,0x1b,0x3f,0xe1,0x56,0xff,0x00,0xdb,0x23,0xe5,0x55,0x35,0x31,0xfe, +0x0a,0xc2,0x92,0x5f,0x50,0xa4,0xeb,0x9a,0xf6,0xf8,0x9e,0xcb,0xb2,0x7f,0x23,0x7f, +0x2a,0xe5,0x73,0xa4,0x4d,0x40,0x9e,0xcb,0xa2,0x3f,0x4d,0xbf,0x95,0x3b,0x7d,0x03, +0x68,0xfc,0x2a,0xdf,0xfb,0x74,0x7c,0xa8,0xf4,0x0d,0xa3,0xf0,0xa8,0x1f,0xb7,0x47, +0xca,0xa4,0x54,0xc4,0x3c,0x30,0xa0,0xd1,0xca,0x7c,0x43,0xd7,0xba,0x44,0xb9,0xd2, +0x56,0xa4,0x4f,0x65,0xc9,0x1f,0xa4,0x8f,0x95,0x4c,0x7a,0x28,0xd4,0xda,0x83,0x52, +0xde,0xa4,0x09,0xf3,0x12,0xe4,0x18,0xcd,0xee,0x58,0x0d,0xa4,0x65,0x4a,0xe1,0x23, +0x20,0x7b,0x09,0xf2,0xa6,0x2f,0xa0,0xad,0x1f,0x85,0x40,0xfd,0xba,0x3e,0x55,0xd5, +0x12,0x14,0x58,0x49,0x52,0x61,0xc6,0x62,0x3a,0x54,0x72,0x43,0x4d,0x84,0x67,0xdf, +0x8a,0xac,0x95,0x11,0xb9,0xa4,0x35,0x80,0x2b,0xc5,0x4b,0x23,0x1c,0x1c,0xe9,0x09, +0x0b,0xa2,0xa3,0xfa,0xfa,0xf6,0x34,0xfe,0x93,0xb8,0x4f,0x0a,0xda,0xea,0x5b,0x28, +0x6b,0xfe,0x67,0x81,0xf3,0xf2,0xa9,0x05,0x57,0x5f,0xe2,0x3f,0x57,0xf5,0x97,0xa8, +0xda,0x7a,0x32,0x82,0x9a,0x8a,0x90,0xec,0x8c,0x1f,0xea,0x28,0x64,0x0f,0x24,0xe0, +0xf9,0xd6,0x30,0x47,0x8d,0xe0,0x2d,0xea,0x65,0xcb,0x61,0x29,0x6d,0x11,0x7d,0x64, +0xa4,0x17,0x0f,0x0a,0x58,0xdc,0x4f,0xbe,0xae,0x74,0x65,0xb6,0xb8,0xcd,0x29,0x9c, +0x75,0x4a,0x40,0x28,0xc7,0x66,0x31,0xc5,0x51,0xf6,0x26,0xb6,0x7e,0xb6,0x53,0xef, +0xa7,0x8f,0x44,0xfd,0x28,0xb0,0xc3,0x4c,0x59,0xaf,0xef,0xa1,0x2c,0x8c,0x21,0x89, +0x4a,0x3f,0x53,0xc1,0x2b,0xf6,0x7b,0x7b,0xbd,0xdd,0x8f,0x55,0x44,0xe9,0x1a,0x08, +0xe4,0xb9,0xf4,0x93,0x32,0x37,0x10,0x4e,0xeb,0x8b,0x5f,0x5d,0xf5,0x9e,0x9f,0xd4, +0x72,0x5b,0x97,0x72,0x94,0xdc,0x57,0x9c,0x52,0xe3,0x38,0xd2,0xb0,0xda,0xd1,0x9e, +0x00,0xf0,0x20,0x60,0x11,0xff,0x00,0xda,0xf0,0x9b,0xd6,0xda,0x8c,0xf6,0xde,0x66, +0x7e,0xa1,0xab,0x1b,0x7c,0xb4,0x40,0xbf,0xdb,0x1c,0x85,0x71,0x65,0x2f,0xc7,0x70, +0x64,0x1e,0xf4,0x9e,0xe5,0x24,0xf7,0x1f,0x6d,0x57,0x5d,0x73,0xa3,0x66,0xe9,0x39, +0xbe,0xb9,0x2f,0xc0,0x70,0xff,0x00,0x29,0xf0,0x3b,0x7d,0x8a,0xf0,0x35,0x34,0xb2, +0xc6,0xf1,0x85,0xc0,0x5d,0x56,0xb2,0x19,0x23,0x38,0xda,0x4d,0x96,0xf6,0xf5,0x9e, +0xa0,0x3d,0xb7,0x79,0x9f,0xa8,0x6b,0x71,0xd6,0x77,0xe4,0xa0,0x9f,0x4a,0xcc,0x51, +0xee,0x01,0x64,0x92,0x7c,0x05,0x43,0x90,0xed,0x4e,0xba,0x27,0xb2,0x1b,0xd6,0xa8, +0x65,0xf7,0x51,0x98,0x90,0x48,0x7d,0x79,0xec,0x2a,0x1f,0x50,0x7c,0x70,0x7c,0xa9, +0xc9,0x04,0x4c,0x61,0x71,0x68,0xd1,0x23,0x11,0x95,0xef,0x0c,0x0e,0x3a,0xfe,0xd3, +0xda,0xc4,0xcc,0x98,0xf6,0x78,0x6d,0x4f,0x75,0x4e,0xcb,0x4b,0x43,0xad,0x5a,0x8e, +0x49,0x5f,0x69,0xe7,0xdf,0xc5,0x24,0xb5,0xa6,0xb8,0xb9,0xca,0xd4,0x93,0x7d,0x19, +0x70,0x91,0x1e,0x13,0x2e,0x16,0x5a,0x4b,0x2e,0x14,0x85,0x04,0xf0,0x55,0xc7,0x6e, +0x4e,0x70,0x7c,0x31,0x4d,0xbd,0x7f,0x7b,0x4d,0x83,0x4a,0x4f,0x9a,0x5c,0xd8,0xee, +0xc2,0xdb,0x47,0xbf,0x7a,0xb8,0x18,0xf7,0x76,0xf9,0x55,0x57,0x76,0xe6,0xda,0x46, +0x1b,0x4a,0x95,0x8f,0x2a,0x46,0x82,0x0c,0x64,0xc8,0xe1,0x74,0xff,0x00,0x13,0xa9, +0x11,0x06,0xc4,0xd3,0x64,0xce,0xd0,0xb7,0xdd,0x43,0x7b,0xd5,0x30,0x60,0x9b,0xb4, +0xc5,0x32,0x55,0xbd,0xdc,0xb8,0x4f,0xa8,0x9e,0x4f,0xcb,0xce,0x9f,0x74,0xa1,0xfe, +0x1f,0x6d,0x0e,0x7a,0x3e,0x75,0xfa,0x52,0x02,0x4c,0x95,0x7d,0x1e,0x38,0xc7,0x63, +0x69,0x3e,0xb2,0xbc,0xd5,0xc7,0xf6,0x53,0x7a,0x97,0xac,0x70,0x32,0x96,0xb4,0x6c, +0x9b,0xa0,0x69,0xc9,0x0e,0x71,0xbd,0xf5,0x5c,0x97,0x69,0xcd,0x5a,0xed,0x72,0xe7, +0xc8,0xcf,0x53,0x19,0xa5,0x3c,0xb0,0x3b,0x48,0x48,0xce,0x07,0xc2,0xa8,0xdd,0xee, +0x44,0xfb,0xbd,0xea,0x6d,0xca,0x5b,0x4e,0xa9,0xf9,0x4f,0x29,0xe5,0x9d,0xa7,0xb4, +0x9c,0xe0,0x7b,0x05,0x5e,0xfa,0x2b,0x38,0x66,0x11,0x5f,0x4b,0xad,0x2a,0x29,0xcc, +0xd6,0xd6,0xd6,0x54,0x25,0x0c,0x3e,0x3f,0xa2,0xe7,0xe5,0x35,0xbd,0x0d,0x3a,0x3b, +0x5a,0x5f,0xe5,0x35,0x7b,0xe8,0xa6,0x45,0x75,0xbb,0xbf,0x29,0x43,0xc3,0x01,0xef, +0x7c,0x7f,0x52,0x07,0xa0,0x2d,0x69,0x75,0x37,0x16,0xb4,0xd4,0xe6,0xde,0x95,0x09, +0x48,0x51,0x61,0xd2,0x09,0x54,0x7d,0xa0,0x9d,0xa4,0xfd,0xce,0x30,0x3c,0x09,0x03, +0xb3,0x80,0xcd,0xe9,0x7a,0x2b,0x52,0xba,0x3a,0xbd,0x17,0x47,0x2c,0xb2,0x5e,0x41, +0xef,0x0a,0x4f,0x3c,0x7f,0x91,0xe7,0x53,0x1a,0x49,0xf4,0xff,0x00,0xae,0xa2,0x35, +0x68,0x73,0x4d,0xdb,0x1e,0x4b,0xd2,0xdf,0x50,0xfa,0x52,0x9b,0x39,0x0d,0x20,0x1c, +0xed,0x27,0xef,0x12,0x07,0x1d,0xc3,0xdf,0x58,0xb5,0xc6,0x59,0x83,0x98,0x2c,0xb6, +0x73,0x04,0x14,0xe5,0x8f,0x75,0xfa,0xd9,0x21,0x43,0xaa,0xfb,0xc7,0xe3,0x56,0x8f, +0xa0,0xcb,0x29,0xb5,0xe8,0x58,0xf2,0x5e,0x46,0xd9,0x17,0x03,0xf4,0x93,0x91,0xce, +0xc3,0xf5,0x3f,0xc7,0x3f,0xdd,0x55,0xc3,0x41,0x58,0xdc,0xd4,0xba,0xae,0xdd,0x6b, +0x48,0x57,0x56,0xeb,0x80,0xba,0xa1,0xf6,0x5b,0x1c,0xa8,0xfc,0x01,0xf3,0xc5,0x5c, +0x3b,0xa4,0xd8,0xb6,0x3b,0x24,0x99,0x8e,0x80,0xdc,0x58,0x6c,0x15,0xed,0x4f,0x18, +0x4a,0x47,0x00,0x7c,0x30,0x29,0xba,0xf9,0x89,0x02,0x31,0xcd,0x23,0xc3,0x29,0x83, +0x5c,0x66,0x77,0x24,0x87,0xfe,0x21,0xb5,0x37,0xd2,0xef,0xcc,0xd8,0xa3,0xaf,0xf9, +0x30,0x92,0x16,0xfe,0x3b,0xdd,0x50,0xc8,0x1e,0x49,0xc7,0xe6,0x34,0xae,0xb2,0x42, +0x72,0xed,0x78,0x87,0x6f,0x60,0x12,0xe4,0x87,0x52,0xd8,0xf3,0x35,0xcf,0x74,0x9f, +0x2a,0xf5,0x79,0x95,0x31,0xd4,0xa9,0xc9,0x52,0xde,0x53,0x84,0x24,0x12,0x4a,0x94, +0x73,0x80,0x29,0xdb,0xd0,0x6f,0x47,0x33,0xe0,0x5c,0x93,0xa8,0x6f,0xec,0x2a,0x3a, +0x90,0x82,0x22,0x46,0x58,0xc2,0xf2,0x46,0x0a,0xd4,0x3b,0xb8,0xc8,0x00,0xf3,0xce, +0x78,0xc0,0xcb,0x19,0x8d,0xa6,0x84,0x0e,0xae,0x94,0x30,0xba,0xb2,0xa0,0xbb,0x91, +0x3f,0x09,0xcd,0x66,0xb7,0x31,0x68,0xb4,0xc4,0x81,0x15,0x21,0x2c,0xc7,0x6c,0x36, +0x9f,0x6e,0x3b,0xfc,0xfb,0x6b,0xb6,0x8a,0x2b,0x86,0x49,0x26,0xe5,0x7a,0x60,0x03, +0x45,0x82,0xd7,0xd7,0x35,0x85,0x1e,0xb5,0x18,0x4a,0xb6,0xab,0xd6,0x1c,0x1f,0x03, +0xed,0xac,0xb7,0xa7,0x7e,0xcd,0xc3,0x7e,0x33,0xb7,0x3c,0xe3,0xc6,0xa3,0x33,0x9f, +0x6d,0xa5,0xde,0x54,0xdb,0xc8,0x6d,0x48,0x92,0xc1,0x38,0xdb,0xc9,0xc2,0x33,0x90, +0x7c,0xfe,0x15,0xae,0x4c,0x85,0xc4,0x95,0x78,0x7e,0x34,0x82,0xb7,0x14,0xfb,0x2d, +0x95,0x12,0x83,0xd5,0x20,0x84,0xe4,0x8c,0x8e,0x31,0x92,0x39,0xe0,0x77,0xf7,0xd6, +0xc2,0x0b,0xed,0xd6,0xdf,0x69,0x63,0x53,0x87,0x71,0xd6,0xbf,0x4a,0x59,0x45,0x78, +0x10,0x2e,0x9f,0x45,0x44,0xe7,0x2e,0x32,0x47,0xd1,0x23,0x84,0x1e,0xb5,0xc5,0xa1, +0x4a,0x41,0x39,0xc8,0x25,0x03,0x1f,0x77,0x1d,0xfc,0xfb,0xab,0xc6,0xbb,0x5c,0x4c, +0x8d,0x41,0x75,0x62,0x6e,0xa3,0x72,0xc7,0x1e,0x13,0x2d,0xbb,0x18,0x21,0x4d,0x20, +0x3a,0x95,0x27,0x2a,0x79,0x45,0xc4,0x9d,0xc0,0x2b,0x29,0xc0,0xe0,0x6d,0x39,0xed, +0x15,0x43,0x11,0x06,0xcb,0x66,0x4a,0xd7,0x8b,0x85,0x38,0xae,0x43,0x6d,0x82,0x4e, +0x4c,0x28,0xd9,0xff,0x00,0xa9,0x3f,0x2a,0x5f,0xe8,0xdd,0x5a,0xf2,0xad,0xe8,0x91, +0x7f,0xba,0xb4,0x94,0x39,0x60,0x89,0x35,0x0e,0x3c,0x12,0xd0,0x5b,0x85,0x4f,0xf5, +0xab,0x03,0x8e,0xe0,0xd6,0x47,0x76,0x47,0x8f,0x3e,0x7d,0xb7,0x50,0xcc,0x9f,0xa6, +0xe5,0xcf,0xbb,0x6a,0x87,0x2d,0x33,0x21,0xc0,0x8e,0xf3,0x2d,0x80,0xd2,0x43,0x9b, +0xa3,0x36,0xe7,0x5c,0xa4,0xa9,0x24,0xac,0x29,0xc5,0x2d,0x38,0x4e,0x07,0xab,0x81, +0x85,0x64,0xd4,0xe5,0xb8,0x15,0x38,0x81,0x4d,0x46,0x22,0x46,0x8e,0xa2,0xa6,0x23, +0xb2,0xd2,0x88,0xc1,0x28,0x40,0x49,0xc7,0x95,0x6d,0x71,0x08,0x71,0x0a,0x43,0x89, +0x0a,0x42,0x86,0x0a,0x54,0x32,0x0d,0x29,0x23,0x5c,0xaf,0xf3,0x34,0xed,0xd2,0xee, +0x9d,0x41,0x31,0x99,0x11,0x9d,0x82,0xc3,0x2d,0xa5,0xa6,0x8b,0x60,0x3b,0x1a,0x2a, +0x9c,0x51,0x05,0x1c,0x92,0x5e,0x59,0x1c,0xf0,0x71,0xdd,0x90,0x7a,0xf5,0x15,0xe6, +0xf3,0x64,0xb8,0x3d,0x67,0x66,0x7c,0x99,0x11,0x4c,0x98,0xc1,0x53,0x1e,0x5b,0x48, +0x75,0x94,0x3a,0xdb,0xc7,0x66,0xf5,0x27,0x60,0xca,0xda,0x48,0x0a,0x50,0xfb,0x64, +0x0e,0x76,0xe0,0xca,0x3e,0x68,0xc4,0x3c,0x93,0x29,0x98,0x71,0x58,0x56,0xe6,0x23, +0x32,0xda,0xbc,0x50,0x80,0x0f,0xf8,0xad,0xab,0x71,0x08,0x52,0x12,0xb5,0xa5,0x2a, +0x59,0xda,0x90,0x4e,0x0a,0x8e,0x09,0xc0,0xf1,0xe0,0x13,0xe5,0x4a,0xdb,0x75,0xd2, +0xf7,0x72,0x9d,0x06,0xd9,0xe9,0x67,0xd8,0x8a,0xab,0xa2,0xa3,0x99,0x0d,0x38,0xcb, +0xcf,0x29,0x02,0x2b,0x8e,0x29,0xa2,0xe0,0x46,0xc2,0x42,0x92,0x9f,0x58,0x0c,0x80, +0x70,0x79,0x19,0xac,0xe4,0x37,0x3a,0x75,0xef,0x4f,0xc7,0x93,0x76,0x9a,0xa5,0xc0, +0xd4,0x0f,0xc4,0x4b,0xa9,0x0d,0x85,0x38,0x91,0x09,0xe7,0x12,0x55,0xea,0x63,0x70, +0x07,0x66,0x46,0x32,0x32,0x71,0x9e,0x41,0x96,0x79,0x94,0x62,0xf2,0x09,0xa5,0x58, +0xb8,0xe2,0x1b,0x00,0xb8,0xa4,0xa4,0x12,0x12,0x37,0x1c,0x64,0x93,0x80,0x29,0x47, +0x60,0xd5,0x17,0xe9,0x52,0x2d,0x12,0x9c,0x79,0x6a,0x99,0x32,0x57,0x55,0x22,0x02, +0xe4,0xb2,0x50,0x91,0xce,0xf6,0xd2,0xd2,0x53,0xd6,0x21,0x4d,0x80,0x79,0x27,0xec, +0x9d,0xdc,0x1e,0x09,0x37,0x03,0x3a,0xd7,0xa5,0x67,0x4a,0xd4,0xcb,0x7a,0xe1,0x36, +0xe7,0x08,0xbf,0x6d,0x3d,0x5e,0xc4,0xaf,0xad,0x49,0x53,0x69,0x40,0x4e,0xf4,0x16, +0xc8,0xc7,0x27,0x3c,0x10,0xac,0x93,0x46,0x51,0xbe,0xa8,0xc6,0x9b,0x0a,0x8c,0xc2, +0xb7,0x6e,0x61,0xa3,0xb8,0xe5,0x59,0x40,0xe4,0xfb,0x6b,0x24,0xb2,0xd2,0x4a,0x8a, +0x5a,0x6d,0x25,0x63,0xd6,0xc2,0x40,0xcf,0xbe,0x8a,0x2b,0x3b,0x95,0x6c,0x21,0x7c, +0x11,0xd9,0x0c,0x96,0x43,0x2d,0x86,0x8f,0xd8,0x09,0x1b,0x7e,0x15,0x8c,0x98,0x71, +0xa5,0x29,0xa5,0x49,0x8e,0xcb,0xca,0x68,0xee,0x6c,0xb8,0x80,0xa2,0x83,0xe2,0x33, +0xd8,0x68,0xa2,0x8b,0x94,0x58,0x2c,0x5d,0x81,0x0d,0xe4,0xb2,0x97,0xa2,0xc7,0x71, +0x2c,0x9d,0xcd,0x05,0x36,0x0e,0xc3,0xe2,0x9e,0x38,0xf2,0xaf,0x02,0xf5,0xa3,0x20, +0x5d,0x26,0xa9,0xf3,0x26,0x5c,0x50,0xe2,0x03,0x6e,0x34,0xc1,0x6f,0x6a,0x80,0x1b, +0x78,0xdc,0x82,0x5b,0x3b,0x78,0xcb,0x65,0x27,0x00,0x73,0xc0,0xa2,0x8a,0xbc,0x67, +0x55,0x0e,0xd9,0x48,0x18,0x87,0x19,0x88,0xe9,0x61,0xa6,0x1a,0x43,0x20,0x24,0x04, +0x04,0x8c,0x7a,0xa0,0x01,0xf0,0x00,0x0f,0x21,0x59,0xbb,0x1d,0x97,0x52,0xe2,0x5d, +0x65,0xb5,0xa5,0xd4,0xed,0x58,0x52,0x41,0x0a,0x1e,0x07,0xc4,0x72,0x68,0xa2,0xb3, +0x56,0x5f,0x19,0x8b,0x1d,0x96,0xda,0x6d,0x96,0x1a,0x6d,0xb6,0xbf,0xdb,0x4a,0x10, +0x00,0x47,0x77,0x03,0xbb,0xb4,0xd6,0x5d,0x4b,0x5b,0x82,0xba,0xa4,0x6e,0x0a,0xdf, +0x9d,0xa3,0x3b,0xb1,0x8c,0xfb,0xf1,0xc6,0x68,0xa2,0x84,0x2c,0x11,0x0e,0x32,0x25, +0x2e,0x4a,0x23,0xb2,0x99,0x2b,0x1b,0x56,0xe8,0x40,0x0b,0x50,0xf0,0x27,0xb4,0xd6, +0x22,0x04,0x31,0x25,0x72,0x04,0x48,0xe2,0x42,0xf0,0x54,0xef,0x56,0x37,0x2b,0x1d, +0x99,0x3d,0xa7,0x18,0xa2,0x8a,0x2e,0x85,0xff,0xd9,}; + +const unsigned int dummy_align__STM32H7xx_files_ST_gif = 1; +const unsigned char data__STM32H7xx_files_ST_gif[] = { +/* /STM32H7xx_files/ST.gif (24 chars) */ +0x2f,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x5f,0x66,0x69,0x6c,0x65,0x73, +0x2f,0x53,0x54,0x2e,0x67,0x69,0x66,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) +" (63 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, +0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, +0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, +0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, +/* "Content-type: image/gif + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x69,0x6d, +0x61,0x67,0x65,0x2f,0x67,0x69,0x66,0x0d,0x0a,0x0d,0x0a, +/* raw file data (4852 bytes) */ +0x47,0x49,0x46,0x38,0x39,0x61,0xfe,0x02,0x3a,0x00,0xf7,0x00,0x00,0x14,0x46,0x54, +0x6b,0xa2,0xb3,0x0c,0x72,0x94,0x54,0x73,0x8c,0xac,0xd3,0xdc,0x15,0x56,0x7c,0x33, +0x81,0xb4,0x9c,0xba,0xc4,0xc6,0xea,0xec,0x58,0x8d,0xac,0x3c,0x61,0x7f,0x17,0x63, +0x7c,0x47,0x82,0x98,0x61,0x8b,0x9c,0xa8,0xd8,0xec,0x59,0xa3,0xc4,0x99,0xbd,0xd4, +0x0a,0x69,0x94,0x24,0x56,0x64,0x3c,0x72,0x8c,0xd4,0xf6,0xf4,0x84,0x98,0xac,0x3c, +0x90,0xb4,0x38,0x79,0xa4,0xd3,0xd6,0xd5,0x57,0x99,0xc7,0x9c,0xa2,0xa4,0x30,0x64, +0x7c,0x88,0x8c,0x98,0x56,0x80,0x9c,0x99,0xc7,0xd9,0x10,0x49,0x64,0x64,0x96,0xac, +0x39,0x7b,0x94,0xe9,0xed,0xef,0xd0,0xdd,0xec,0x51,0x56,0x64,0xba,0xc6,0xcc,0x92, +0xb3,0xc4,0x94,0xae,0xb4,0x27,0x59,0x7c,0x3b,0x8e,0xc5,0xbd,0xc9,0xd4,0x3e,0x6e, +0x96,0x20,0x84,0xac,0xfc,0xf6,0xec,0x8c,0x96,0x9c,0x56,0x7f,0x94,0x39,0x87,0xb4, +0x40,0x6a,0x82,0x2e,0x6a,0x95,0x42,0x85,0xa4,0x2c,0x52,0x64,0xc4,0xde,0xe4,0xba, +0xbd,0xbe,0x14,0x6a,0x84,0xcf,0xdf,0xe4,0x24,0x62,0x6c,0x57,0x99,0xbc,0x35,0x73, +0x9c,0x34,0x6a,0x7c,0x12,0x50,0x6c,0xb1,0xd5,0xe4,0x15,0x5c,0x7c,0xc9,0xf2,0xfc, +0x0c,0x6c,0xa4,0xd8,0xe4,0xec,0x44,0x8a,0xa4,0x64,0xae,0xcc,0x97,0xa5,0xb4,0x3f, +0x8a,0xc4,0x66,0x6d,0x7d,0x08,0x73,0xa4,0xd7,0xf2,0xf4,0x0b,0x65,0x8c,0xc0,0xe2, +0xec,0x0b,0x6e,0x99,0x46,0x7d,0xa5,0x89,0x91,0xa4,0xa8,0xcd,0xe4,0xf6,0xf9,0xfc, +0x6f,0x94,0x9f,0x4c,0x97,0xbc,0x45,0x88,0xb8,0x16,0x5d,0x8c,0x7f,0xa3,0xb4,0x71, +0x92,0xac,0x7c,0xaa,0xc4,0x30,0x66,0x8c,0x81,0x86,0x9f,0x71,0x99,0xb1,0x3a,0x7b, +0x9c,0xea,0xf2,0xfc,0x49,0x96,0xc4,0x14,0x51,0x74,0x6e,0x74,0x84,0xac,0xc2,0xcc, +0xd8,0xed,0xf1,0x16,0x58,0x74,0x47,0x74,0x90,0x46,0x90,0xb9,0xd3,0xd9,0xe4,0xaa, +0xce,0xdc,0xac,0xb1,0xc4,0xb0,0xb1,0xb4,0xc4,0xce,0xe4,0x74,0x7e,0x84,0x40,0x6d, +0x8c,0x37,0x3f,0x51,0xa7,0xbb,0xc6,0x5d,0x92,0xac,0x39,0x7e,0xa4,0x8c,0x92,0x94, +0xb9,0xce,0xd9,0xe5,0xe6,0xed,0x64,0xaa,0xc7,0xe3,0xfe,0xfc,0x94,0x99,0xac,0x30, +0x64,0x84,0x5c,0x86,0x9c,0xaa,0xc9,0xd7,0x47,0x90,0xc6,0x9b,0x9a,0x9d,0xbc,0xd6, +0xe4,0x15,0x5d,0x84,0xa5,0xa8,0xb7,0x0e,0x73,0x9c,0x6d,0x8d,0xa0,0xb6,0xc2,0xd4, +0x48,0x4f,0x5c,0x44,0x62,0x6c,0x3c,0x66,0x8c,0x3c,0x5e,0x74,0x24,0x4e,0x5c,0x1c, +0x7b,0xa7,0x60,0xa3,0xbc,0xc1,0xd4,0xdb,0x5c,0x66,0x7c,0xc2,0xdb,0xec,0xa8,0xa8, +0xa8,0x24,0x5a,0x8c,0xb6,0xbc,0xcc,0x84,0xae,0xc4,0x7b,0xa7,0xbc,0x7a,0x84,0x94, +0x58,0x78,0x94,0x34,0x5a,0x6c,0x8c,0xb2,0xd4,0x30,0x5f,0x72,0x32,0x6b,0x8c,0xc4, +0xe6,0xfc,0x5c,0x64,0x74,0x4c,0x5e,0x6c,0xcc,0xce,0xcc,0x34,0x8a,0xac,0x54,0x86, +0x94,0xe4,0xe6,0xe4,0x48,0x76,0x9c,0x54,0x9e,0xbc,0x1c,0x7a,0x9c,0xb4,0xde,0xec, +0x9c,0xc2,0xd4,0x88,0x9e,0xac,0xd4,0xda,0xdc,0x5c,0x9e,0xc4,0x64,0x9e,0xb4,0xec, +0xf2,0xf4,0x29,0x5e,0x7c,0xfc,0xfe,0xf4,0x9c,0xaa,0xb4,0x75,0x7a,0x89,0xb4,0xb6, +0xb4,0x48,0x52,0x64,0x20,0x74,0x90,0x3d,0x82,0xb5,0x66,0xa3,0xc6,0x16,0x69,0x95, +0xe2,0xf7,0xfb,0x4a,0x7b,0x91,0xc5,0xc7,0xc7,0x34,0x83,0xab,0x6c,0x82,0x8c,0x4e, +0x6c,0x7e,0xdd,0xe0,0xe1,0x20,0x4f,0x67,0x58,0x7a,0x8a,0x3d,0x66,0x7f,0x33,0x6e, +0x98,0xbc,0xc2,0xc4,0x80,0xaa,0xb0,0x6d,0x9e,0xb3,0x3c,0x46,0x54,0x97,0x9e,0xa4, +0xc4,0xda,0xdc,0xb2,0xda,0xe4,0x18,0x6e,0x99,0xfc,0xfe,0xfc,0xa9,0xb6,0xc4,0xc9, +0xce,0xd5,0x6c,0xaa,0xbc,0xbd,0xc2,0xcc,0x84,0xb6,0xcc,0xe0,0xde,0xec,0x6c,0x9a, +0xbc,0x1c,0x76,0xa4,0x16,0x66,0x8c,0x46,0x7d,0x9c,0x29,0x58,0x74,0x23,0x74,0x9c, +0x5c,0x8e,0xb4,0x16,0x63,0x84,0x5f,0x8c,0xa4,0x1a,0x58,0x6c,0x39,0x73,0x94,0x0f, +0x4a,0x6c,0x5e,0x98,0xb4,0x54,0x5a,0x6c,0x92,0xb5,0xcc,0xbc,0xc6,0xdc,0xf7,0xf7, +0xf4,0x8a,0x97,0xa4,0x38,0x89,0xbc,0x3f,0x84,0xac,0x10,0x6b,0x8c,0x1f,0x5f,0x74, +0xd8,0xe5,0xf4,0x42,0x8b,0xac,0xc0,0xe5,0xf4,0xa9,0xb0,0xbc,0x79,0x80,0x8c,0x97, +0x9e,0xac,0xc0,0xda,0xe4,0xd9,0xf2,0xfc,0x67,0x9e,0xbc,0x97,0xa2,0xac,0x98,0xae, +0xbc,0x28,0x6a,0x84,0x5a,0x92,0xb4,0x37,0x7e,0xac,0x8d,0x92,0x9c,0x5c,0x86,0xa4, +0x94,0xc2,0xdc,0x7c,0x9e,0xb4,0x5c,0x9e,0xcc,0x29,0x5e,0x84,0x94,0xaa,0xbc,0x0f, +0x45,0x5c,0x1c,0x54,0x84,0x99,0xbc,0xcc,0xca,0xec,0xf4,0xa4,0xda,0xf4,0x5c,0xa6, +0xcc,0x0c,0x6a,0x9c,0xd2,0xf7,0xfc,0x3a,0x8f,0xbc,0x36,0x7a,0xac,0x21,0xf9,0x04, +0x00,0x00,0x00,0x00,0x00,0x2c,0x00,0x00,0x00,0x00,0xfe,0x02,0x3a,0x00,0x07,0x08, +0xff,0x00,0x89,0x09,0x1c,0x48,0xb0,0xa0,0xc1,0x83,0x08,0x13,0x2a,0x5c,0xc8,0xb0, +0xa1,0xc3,0x87,0x10,0x23,0x4a,0x9c,0x48,0xb1,0xa2,0xc5,0x8b,0x18,0x33,0x6a,0xdc, +0xc8,0xb1,0xa3,0xc7,0x8f,0x20,0x43,0x8a,0x4c,0x08,0x85,0xd8,0xb6,0x6d,0xa8,0x0a, +0xd2,0xa1,0x33,0xb1,0xa4,0xc0,0x92,0x2e,0x89,0xa5,0x24,0xc6,0x72,0x60,0x4d,0x81, +0x33,0x6d,0xc2,0x44,0x39,0xb2,0xa7,0xcf,0x9f,0x40,0x83,0x0a,0x1d,0x4a,0xb4,0xa8, +0xd1,0xa3,0x48,0x93,0x2a,0x5d,0x5a,0x11,0x0a,0x94,0x6d,0x30,0x11,0xe0,0xa8,0xb1, +0xe7,0x9c,0x8f,0x3d,0x58,0xb1,0x9e,0xcb,0x7a,0xee,0x9c,0xa2,0xaa,0x8a,0xbc,0x76, +0x55,0x34,0xe2,0xdc,0x88,0xb0,0x23,0xa6,0xd6,0x58,0xbb,0x76,0x89,0x5b,0x45,0x4b, +0x40,0x81,0x62,0x7b,0x0e,0x94,0xd8,0x3d,0x23,0xca,0x6c,0x63,0xca,0xb7,0xaf,0xdf, +0xbf,0x80,0x03,0x0b,0x1e,0x4c,0xb8,0xb0,0xe1,0x8c,0x25,0x63,0x95,0xc1,0xa7,0xa5, +0xc3,0x0b,0x67,0xf0,0xe0,0xcd,0x80,0x37,0x24,0x81,0xb8,0x04,0x09,0xc8,0xb8,0x69, +0xc7,0xf9,0x1a,0x08,0xcf,0xd7,0xae,0x95,0x0a,0xe0,0x8b,0x74,0x00,0x79,0x01,0xd2, +0x1d,0xf2,0x95,0x4e,0x4b,0x29,0x4f,0x5a,0x42,0x5f,0xd3,0xd1,0x2e,0x34,0x67,0x37, +0x6e,0xa2,0xe9,0x86,0x67,0xa5,0x8a,0x90,0xc3,0xc0,0x83,0x0b,0x1f,0x4e,0xbc,0xb8, +0xf1,0xe3,0xc8,0x33,0xee,0x2d,0x29,0x22,0xdb,0x9d,0x48,0xd5,0xb6,0x6c,0xb9,0xf0, +0xc6,0x9d,0x01,0x18,0xae,0x60,0x4c,0x21,0xb3,0x9d,0x4c,0x1e,0x29,0x5d,0x74,0xe8, +0xff,0xf0,0xe4,0xe9,0x90,0xf9,0x57,0x73,0xd2,0xab,0x7f,0x35,0x8f,0x7d,0x86,0x79, +0x19,0xba,0xe4,0xc9,0x40,0xa6,0x7e,0x9e,0x6e,0x64,0x60,0xe8,0xa7,0x45,0xeb,0xcd, +0x16,0x67,0x8e,0xa0,0x73,0x53,0x72,0x04,0x16,0x68,0xe0,0x81,0x08,0x26,0xa8,0xe0, +0x82,0x03,0xcd,0x84,0x40,0x3d,0xd0,0xed,0xb2,0xc3,0x05,0x14,0xba,0x43,0x8b,0x01, +0xd7,0x75,0xe3,0x8f,0x86,0x79,0x78,0xd7,0xc5,0x87,0x3a,0x48,0xa1,0xc3,0x03,0x0f, +0xbc,0xb2,0x8f,0x7a,0xea,0xb5,0x37,0xcf,0x8a,0x19,0xb4,0x28,0x5f,0x1e,0x30,0xe6, +0x91,0x42,0x0a,0xdd,0x74,0xb3,0xdf,0x1b,0x6f,0x4c,0x83,0xc7,0x80,0x0c,0xf6,0xe8, +0xe3,0x8f,0x40,0x06,0x29,0xe4,0x90,0x0c,0xb5,0x40,0x0c,0x14,0xf5,0x6c,0x50,0xcd, +0x05,0x13,0xfe,0x53,0x9d,0x3b,0x33,0x78,0x33,0x83,0x26,0xe2,0x78,0x23,0x8e,0x05, +0x58,0x4a,0xa1,0xa5,0x78,0xcb,0x64,0xb0,0x0c,0x29,0xaf,0xa4,0xf3,0xca,0x98,0x57, +0x8c,0x39,0xe6,0x03,0xa4,0xe8,0x90,0xa6,0x88,0x5a,0xd6,0x37,0xc5,0x9b,0xae,0x48, +0x39,0xc3,0x0c,0x0c,0x8c,0x61,0x05,0x02,0x31,0x11,0xa9,0xe7,0x9e,0x7c,0xf6,0xe9, +0xe7,0x9f,0x49,0x9d,0x43,0x48,0x27,0x3b,0xec,0xc2,0xe4,0x05,0x5b,0xec,0xd0,0xc9, +0x04,0x13,0xc8,0x32,0x86,0x2c,0x21,0xc8,0x22,0xa9,0x2c,0x2f,0x30,0xc0,0xc0,0x0b, +0x4d,0x74,0x70,0x47,0x07,0x91,0xdd,0x71,0x07,0x3c,0xd3,0x80,0xea,0x69,0x03,0x77, +0x6c,0x72,0xc7,0x0b,0xa7,0x3a,0xe6,0xcc,0x0b,0x98,0x76,0xb0,0xea,0xa4,0x8f,0xe6, +0xff,0xb2,0x0e,0xa0,0xb4,0xd6,0x6a,0xeb,0xad,0xb8,0xe6,0x4a,0xd0,0x1f,0x1b,0x48, +0xc8,0x64,0x35,0x63,0x4c,0xa0,0xa9,0x28,0xa9,0x14,0xd3,0x46,0x31,0xc6,0x22,0xab, +0x6c,0x31,0x07,0x20,0x9b,0x0d,0xb3,0xc5,0x3c,0xbb,0x6c,0xb2,0xc8,0x1e,0x6b,0x2d, +0xb4,0xc7,0xe2,0xd3,0x48,0x1b,0xdc,0xb6,0x71,0x40,0x1b,0x25,0x08,0xe1,0xd4,0x5e, +0xba,0x96,0x6b,0xee,0xb9,0xe8,0xa6,0x3b,0x18,0x1d,0x42,0x28,0xb0,0xc2,0x2e,0x12, +0x8e,0x11,0x43,0x2e,0x15,0xc4,0x11,0x0b,0x8f,0x09,0xe1,0xab,0x51,0x4d,0x4e,0xe5, +0xa9,0xee,0xbf,0x00,0x07,0x2c,0xf0,0xc0,0x15,0xd5,0x63,0x87,0x0c,0x12,0xee,0xb2, +0x46,0x2e,0x6d,0x88,0x10,0x8b,0x52,0x4e,0xbd,0x44,0xf0,0xc4,0x14,0x57,0x6c,0xb1, +0xba,0x61,0x44,0xf2,0x6e,0xa1,0x6b,0x0c,0xa0,0x82,0x29,0x47,0x1e,0xe4,0x2f,0x43, +0x39,0x89,0xec,0x90,0xbe,0x17,0xa7,0xac,0xf2,0xca,0x2c,0x2b,0x88,0xcf,0x00,0x6b, +0xc8,0x50,0xe8,0x0a,0xf2,0x1c,0x49,0xae,0x4b,0x11,0x7f,0x34,0x72,0xbf,0x39,0xb7, +0xec,0xf3,0xcf,0x40,0x07,0x5d,0x98,0x08,0x15,0xc4,0x8c,0xf0,0x2e,0x1d,0x84,0x33, +0x10,0xc8,0x47,0xf5,0x8c,0xca,0xd3,0x42,0x47,0x2d,0xf5,0xd4,0x54,0x7b,0xe4,0x12, +0x22,0x91,0x28,0xb0,0x0b,0xc2,0x2b,0xd4,0xf3,0xf0,0xc8,0x35,0x85,0xad,0xd2,0x42, +0x03,0xfa,0x1b,0x36,0x4b,0x2c,0xf5,0x8c,0x53,0xd5,0x6c,0xb7,0xed,0xf6,0xdb,0x6b, +0x0f,0x14,0x8b,0x09,0x63,0x60,0x21,0xf3,0x0a,0x2b,0xe0,0x61,0xb6,0x22,0x88,0x04, +0xff,0x73,0x0e,0x01,0x7f,0x0b,0x93,0xd5,0x1e,0x7e,0xfb,0xdd,0xd5,0x39,0x65,0x20, +0x82,0x48,0x19,0xe7,0xb0,0x95,0x0f,0x4e,0x2d,0xcc,0x84,0x43,0x1c,0x04,0x10,0x10, +0xc7,0x1e,0xc2,0x08,0x43,0x95,0x1c,0x31,0xa1,0x0c,0xf7,0xe7,0xa0,0x87,0x4e,0xb1, +0x4b,0x08,0x58,0x11,0x83,0xdd,0xc3,0xac,0x30,0x46,0x0d,0x71,0x13,0xa3,0x08,0x37, +0x0d,0x74,0x30,0x4d,0x07,0x20,0xe0,0x86,0x9b,0x15,0x6e,0x7c,0x26,0x9a,0x27,0xe9, +0xf4,0xee,0x8b,0x2f,0x8f,0x3c,0x12,0x40,0x29,0x55,0x04,0x13,0xb2,0x91,0x74,0x20, +0x50,0xc4,0x34,0x09,0x58,0x91,0x40,0x34,0x9e,0x81,0x50,0x41,0x23,0x5c,0xb4,0xcd, +0xc9,0x2a,0x7a,0xc0,0xb1,0x88,0x0d,0xd7,0xaf,0xe2,0xfd,0xf7,0x22,0xac,0x82,0x06, +0x27,0x02,0xcd,0xe2,0x3d,0x31,0x9c,0xe8,0xb1,0xca,0x46,0x18,0xe8,0x81,0x81,0x43, +0xdb,0x60,0xf0,0x7e,0x45,0xe9,0xaf,0x2f,0xfa,0xfd,0xf8,0x63,0x04,0x05,0x1d,0x50, +0xa8,0x30,0x80,0x1d,0x95,0x90,0x01,0xc2,0x22,0xb1,0x04,0x96,0xe4,0x04,0x02,0xba, +0x18,0x00,0xa3,0xde,0x40,0x9d,0x37,0xd0,0xa2,0x09,0x50,0xb2,0x12,0x96,0xfc,0xe1, +0x0f,0x29,0xf8,0xa3,0x0b,0x64,0x90,0x42,0x06,0xaf,0x11,0x05,0x04,0x98,0x04,0x15, +0x30,0xc1,0xc7,0x1d,0x2c,0xe3,0x0d,0x32,0x58,0x49,0x1c,0xb2,0x68,0x80,0x36,0x46, +0x26,0xb4,0xf4,0xe9,0x61,0x11,0xab,0x58,0x04,0x1c,0xda,0xa7,0x87,0x1a,0xc2,0xa1, +0x86,0x2e,0x5c,0xdf,0x36,0x6a,0xa8,0x07,0x62,0x84,0x2f,0x13,0xec,0x73,0x9f,0x43, +0xff,0xd2,0x87,0x06,0x8b,0xfc,0x50,0x21,0x25,0xcb,0x9f,0x12,0x97,0x28,0xb7,0x22, +0xc4,0x00,0x80,0x95,0xc0,0x42,0x25,0x18,0xb0,0x84,0x06,0x09,0x64,0x09,0x03,0x88, +0x41,0x74,0x2e,0xe0,0x0e,0x43,0x18,0xe0,0x42,0xb4,0xc8,0x0e,0x0c,0xba,0x61,0x84, +0x19,0xcd,0x28,0x0f,0x5d,0x48,0xc1,0x87,0xa6,0xa0,0x0e,0x97,0x2c,0x27,0x1f,0x5a, +0x88,0xd2,0x18,0xf7,0x43,0x27,0x2d,0x28,0xad,0x20,0x2c,0x5c,0x59,0xfb,0x16,0xc1, +0x13,0x0c,0xb8,0x04,0x0d,0x42,0x44,0x9f,0x0d,0x5b,0xc0,0x0b,0x1b,0x12,0xa3,0x05, +0x68,0x00,0x22,0x31,0x30,0x00,0x48,0x3d,0xd8,0x00,0x91,0xb3,0xc0,0xc0,0x2a,0x44, +0xd0,0x02,0xec,0xe9,0x01,0x0d,0x46,0x42,0x05,0x06,0x16,0xa1,0x07,0x0d,0xbc,0xaf, +0x7d,0xef,0xdb,0x46,0x26,0x34,0xf0,0xc2,0x5b,0x08,0x24,0x13,0x9c,0xf4,0x24,0x20, +0x61,0x28,0xbf,0x55,0x60,0xc0,0x7c,0x87,0xb4,0x24,0x26,0x89,0x91,0x89,0x55,0xcc, +0x82,0x94,0x68,0xd8,0xc6,0x11,0x17,0xd9,0x48,0x1b,0x2c,0x92,0x94,0xea,0x63,0xa2, +0x30,0xf3,0x07,0x85,0x25,0xbc,0x40,0x17,0x1b,0xb0,0x83,0x14,0xd7,0xd0,0x01,0x1f, +0xd4,0x64,0x26,0x74,0x88,0x43,0x24,0x62,0xb0,0x82,0x0b,0xfc,0xc3,0x3a,0x18,0xca, +0x8e,0x2b,0x6a,0x44,0xc6,0x32,0xc6,0x08,0x46,0x53,0xd8,0x01,0x22,0x6c,0x06,0x13, +0x3c,0xc8,0x82,0x0c,0x1a,0xa2,0x91,0x8d,0xe6,0x84,0x8f,0x9d,0x09,0x6d,0x14,0x37, +0xbc,0xe4,0x2c,0x44,0x30,0x10,0xec,0xcd,0xcf,0x85,0xea,0xe3,0x64,0x0d,0x05,0xb9, +0xff,0xbe,0x5b,0x74,0x32,0x13,0xb3,0x80,0x03,0x3e,0xf5,0xc0,0x09,0x4e,0xda,0xc0, +0x06,0x2f,0x24,0x86,0x3f,0x17,0xb1,0x49,0x82,0x82,0x92,0x96,0x97,0xcc,0xc4,0x0b, +0x45,0xf9,0x42,0x49,0x8a,0xaf,0x93,0xab,0x18,0x45,0xfb,0xe2,0x49,0x0c,0x83,0x22, +0x74,0x11,0xc4,0xc0,0x9e,0x06,0x2c,0x89,0x01,0x22,0x2a,0xf4,0x9f,0xb3,0x70,0xdf, +0x25,0x5f,0x09,0xd2,0x61,0xba,0x14,0x74,0x74,0x78,0xd9,0x29,0x14,0x00,0x40,0x19, +0x60,0x61,0x0c,0xed,0x94,0xd8,0x4b,0xe2,0xd0,0x80,0x01,0x2c,0x89,0x8b,0x4f,0x72, +0x87,0x37,0x0c,0x90,0x9d,0x37,0x19,0xc1,0x08,0x53,0x40,0xea,0x14,0x32,0xe5,0xc6, +0xc4,0x3c,0xc2,0x19,0x63,0xe4,0x66,0x37,0x68,0x31,0x19,0x02,0xe0,0x2b,0x8f,0x2b, +0x93,0xa8,0x0d,0x09,0x2a,0x10,0xec,0x8d,0x42,0x20,0xf5,0xd3,0x67,0x4a,0x7b,0x58, +0x3f,0x62,0x20,0xf4,0xab,0xc4,0x30,0x85,0x49,0x05,0xd9,0x52,0x4e,0x72,0x02,0xa1, +0x36,0x90,0xa4,0xfb,0x1e,0x4a,0xca,0x4c,0xa0,0x92,0xa0,0xa4,0x74,0x89,0x5a,0x83, +0xb9,0x48,0x3d,0x28,0x32,0x7d,0x6d,0x25,0x28,0xf6,0xc8,0x27,0xd1,0x92,0x06,0xf3, +0xac,0x02,0x11,0x41,0xfb,0x34,0x10,0x57,0x72,0xbd,0xf4,0xb1,0x6d,0x0b,0x83,0x15, +0x14,0x90,0x4c,0x05,0x60,0x61,0x10,0x83,0x58,0x43,0x05,0xc2,0xc1,0x23,0xa7,0x20, +0x22,0x0a,0x31,0xe8,0xc4,0x74,0x80,0xfa,0x86,0x28,0x79,0xc3,0x1b,0xfa,0xd1,0x8f, +0x3f,0xb6,0x33,0x83,0x2d,0x64,0xc3,0x24,0x21,0x2b,0xa6,0x64,0xc4,0x11,0xd5,0x6e, +0xff,0x18,0xc0,0x1d,0xce,0x00,0x01,0x3a,0xdc,0xf6,0x94,0x6d,0x70,0x42,0xab,0xf3, +0xb3,0xa7,0x40,0xe4,0xa0,0xbe,0xc5,0xde,0xe2,0x86,0x82,0x2c,0xe2,0x2a,0x04,0x3a, +0x90,0xb2,0x12,0x83,0xb8,0x45,0x0c,0x29,0x41,0x01,0x89,0x86,0xef,0xc9,0x4f,0x88, +0x35,0xf4,0x5e,0x75,0x45,0xb0,0xcf,0xe6,0xf2,0xf5,0xa1,0xcf,0xbd,0x64,0x57,0xa7, +0xcb,0x55,0x50,0x9a,0x74,0xb9,0xe4,0x7b,0x89,0x25,0x3b,0xe9,0x58,0xc8,0xba,0x57, +0x68,0x74,0xf0,0xc1,0x00,0x4e,0x61,0x07,0x9a,0x5a,0x76,0x10,0x0a,0x88,0xc4,0x6b, +0x09,0x82,0x33,0x50,0x58,0x61,0x0d,0x63,0xd8,0xc1,0x16,0x70,0xe4,0x40,0x6f,0xbc, +0x61,0x08,0xb4,0xa0,0x2d,0x0c,0xfc,0x91,0xe0,0x19,0xdc,0xc1,0x83,0x3d,0x0b,0x85, +0x33,0x66,0x00,0x03,0x71,0x84,0x51,0x3f,0xee,0x18,0x43,0x31,0x0e,0x02,0xb5,0xa0, +0x6d,0xb2,0xa4,0xb7,0x20,0x65,0x70,0xe1,0x80,0x56,0x22,0x42,0x01,0x03,0xb7,0x70, +0x21,0x3f,0x89,0x91,0x52,0x1b,0x9c,0x84,0x7b,0x7c,0xdd,0xa1,0x1e,0x5a,0xc0,0x5d, +0x3d,0x6c,0xa3,0xc5,0x27,0x91,0xdf,0x43,0x39,0x19,0xca,0x4c,0x88,0x80,0xc7,0xe8, +0xcb,0x04,0x11,0x73,0x1c,0x48,0x19,0xd3,0xb8,0x86,0xdb,0xc0,0x9e,0x1c,0xfa,0x6a, +0xd8,0xf5,0xe1,0x78,0x1b,0x71,0xc5,0x80,0x6f,0x49,0xb9,0xe4,0xf7,0x5a,0xf9,0x67, +0x74,0x88,0x45,0x05,0xec,0x60,0x87,0x53,0xd0,0x83,0xa6,0x83,0xd0,0x05,0x7e,0xff, +0x00,0x08,0x9a,0x18,0x04,0x0a,0xe1,0x58,0xc6,0x18,0x44,0xcb,0x40,0x6f,0xf0,0x87, +0xff,0x16,0xa7,0xa5,0xc5,0x18,0xfd,0x01,0x03,0x6f,0x00,0x28,0x16,0x39,0x83,0x42, +0x2c,0x40,0xc0,0x00,0x6f,0x68,0xe2,0xcf,0x61,0x74,0x45,0x27,0x74,0x71,0xc7,0xb6, +0xc1,0x93,0x87,0xea,0x73,0x89,0x70,0x57,0x0c,0xd6,0x7d,0x96,0x15,0x0a,0xfa,0xbc, +0xa1,0x73,0x21,0x1a,0x4f,0x20,0x42,0x7a,0xab,0xd7,0x7d,0x5f,0x88,0x11,0xcd,0x89, +0x4d,0x67,0x6f,0x15,0x50,0xc8,0xde,0x5c,0x03,0x49,0xe9,0x1a,0x02,0x71,0xb0,0x4c, +0x7e,0x74,0xa4,0x55,0x1a,0xcf,0xe8,0x5e,0xf9,0xd5,0x2c,0xc3,0x83,0x2d,0xc4,0x40, +0x0f,0x7a,0xd8,0xc1,0xd6,0x58,0xc8,0xf5,0x0a,0x14,0x00,0x8f,0x76,0x8a,0x6d,0x25, +0x74,0x08,0xc3,0x15,0x9a,0xb0,0x82,0x09,0x79,0x91,0x16,0x42,0x15,0xea,0x18,0x0d, +0x30,0x05,0x6f,0xc0,0x63,0x0f,0xfc,0xa5,0xc3,0x38,0xe6,0xa4,0x09,0x18,0xf0,0x07, +0x47,0xc3,0xa0,0x87,0x13,0x4a,0xd2,0xe1,0xaa,0x99,0x02,0x03,0x1a,0xad,0xb2,0x40, +0xd4,0x8a,0x33,0x4e,0x30,0xed,0x48,0x9c,0x58,0x32,0x14,0xcc,0xfd,0x12,0x70,0x63, +0xc0,0x14,0xeb,0x3e,0x37,0xfa,0xc2,0x3d,0x90,0x13,0x6b,0xf4,0x16,0x4e,0xe1,0x04, +0xce,0xdc,0x5d,0x65,0x7b,0xfb,0xd1,0x24,0x1a,0x35,0x05,0xb9,0x09,0xc2,0x09,0x7a, +0xa7,0x55,0xdf,0xe8,0xce,0x37,0xd3,0xfc,0x6d,0x8a,0x6d,0xdc,0x42,0xa3,0x68,0x85, +0xb5,0xc4,0x2d,0x46,0x07,0x53,0x44,0x01,0x17,0x3d,0xf0,0x42,0x01,0x9e,0xf1,0x03, +0x5c,0x57,0xe2,0xe3,0x6b,0x60,0x80,0x09,0x04,0x64,0x10,0x3a,0xe4,0x23,0x1b,0xad, +0xff,0xed,0xcf,0x3f,0x56,0x7e,0x01,0x08,0x62,0xd3,0x15,0x4d,0x78,0x44,0x18,0x54, +0x82,0x0f,0x0a,0xb3,0x80,0x05,0x86,0xf0,0xc3,0x30,0xfc,0xd0,0x0c,0x14,0x28,0x42, +0x26,0x49,0x9c,0xb8,0xd0,0x87,0x4e,0xf4,0x8e,0x20,0xc2,0x16,0x1f,0xb0,0x86,0xc6, +0xbd,0x20,0x06,0x31,0xfc,0x80,0x0f,0xcd,0xa0,0xc2,0x30,0x2a,0xb1,0x86,0x17,0x38, +0x22,0x09,0x08,0xc9,0x47,0x28,0xa6,0xb1,0xc5,0x7f,0x34,0xd0,0x81,0xae,0xb8,0x6d, +0x02,0xe2,0x90,0x27,0x3a,0xa0,0x23,0x01,0x3b,0xf8,0x04,0x12,0x0c,0x81,0x84,0x20, +0x30,0x21,0x02,0x11,0x98,0x81,0x01,0x3b,0x8c,0xd5,0xa2,0xdb,0xfd,0xee,0x78,0x27, +0x48,0x2c,0x7a,0x51,0x08,0x5c,0x7c,0xc0,0x0b,0x5e,0xc8,0x78,0xd3,0x0b,0xf0,0x74, +0x69,0x40,0x9d,0x1d,0x31,0x08,0x40,0xf5,0x9c,0x82,0x0a,0xa8,0x08,0x24,0x09,0x10, +0x60,0x40,0x08,0x28,0x84,0xa8,0x01,0xbf,0xc1,0x10,0x30,0x98,0xc1,0x1c,0x1e,0xd7, +0x39,0x3c,0x6c,0x61,0x18,0x41,0x40,0x82,0xe8,0x91,0xc0,0x04,0x26,0x7c,0xc3,0x0c, +0x0f,0x93,0x49,0xbd,0xeb,0x9e,0xf7,0xd6,0xbb,0xfe,0xbd,0x11,0xab,0x41,0x2e,0x00, +0xf0,0x01,0x5c,0x58,0xa3,0x07,0x62,0x60,0xba,0x18,0x0a,0x40,0x78,0x3e,0x14,0x80, +0x0f,0x3f,0x58,0xc0,0x29,0xa2,0x40,0x01,0x82,0xcc,0x04,0x0a,0x5c,0x58,0x46,0x35, +0xa0,0xc1,0x0c,0x68,0x38,0xff,0x13,0x86,0xf8,0x44,0x2b,0xde,0x10,0x0a,0x03,0x0a, +0x84,0x0e,0xfd,0x28,0x45,0x2b,0x82,0xe0,0xf6,0xd2,0x0b,0xc0,0xf4,0xd3,0x40,0x80, +0xff,0xe7,0x5e,0x4f,0xfe,0xf2,0x43,0xf6,0x66,0x31,0x95,0x80,0x3d,0x3e,0xf0,0x01, +0x7b,0xf4,0xe0,0xfd,0x82,0x6f,0xfa,0x0f,0xe6,0xff,0xf4,0x1f,0xe4,0x60,0x08,0xf9, +0x60,0xc9,0x5e,0x40,0xb8,0xbf,0x78,0xec,0xa0,0x19,0xb0,0x00,0x0b,0x11,0x50,0x7a, +0x4c,0xe0,0x07,0x32,0x20,0x0e,0xa0,0x50,0x6f,0x34,0x41,0x00,0x43,0x10,0x01,0xdc, +0xc7,0x0f,0xdf,0xf0,0x0d,0x02,0x10,0x01,0xad,0x60,0x02,0xf7,0x62,0x7e,0x18,0x98, +0x81,0x8f,0x95,0x12,0xfd,0x12,0x06,0x77,0xe0,0x7e,0xd6,0x10,0x82,0x18,0xd7,0x03, +0xd4,0x40,0x0d,0x4d,0x27,0x06,0xe0,0xe0,0x74,0x0b,0xb0,0x00,0x7c,0x00,0x0e,0xd4, +0x40,0x45,0x69,0x43,0x2e,0x26,0xe7,0x0c,0xd2,0xd0,0x0c,0x70,0x77,0x83,0x11,0x78, +0x0c,0x2b,0x01,0x5b,0xc4,0xd0,0x0f,0x01,0xd0,0x0a,0x11,0xc0,0x0f,0x42,0x28,0x81, +0xdf,0x30,0x0c,0x09,0x50,0x45,0xe3,0xa7,0x81,0x4a,0xb8,0x84,0x6e,0xe3,0x78,0x04, +0x20,0x09,0x7f,0x67,0x0f,0x4a,0x77,0x7b,0x23,0x18,0x78,0x80,0xb7,0x7b,0x3f,0xd0, +0x7b,0x3f,0x00,0x0e,0x0c,0x20,0x0c,0x65,0x17,0x06,0x20,0x00,0x75,0x02,0x08,0x77, +0xb0,0xf0,0x0d,0x37,0x60,0x06,0xfc,0x52,0x12,0x04,0x10,0x02,0x37,0x30,0x0c,0x42, +0x58,0x7a,0x11,0x08,0x0d,0xc9,0xc0,0x05,0x49,0xc8,0x84,0x76,0x78,0x87,0x41,0x03, +0x13,0xa2,0x80,0x0b,0x7e,0x37,0x85,0x53,0x08,0x78,0x1a,0xc7,0x7b,0x05,0x70,0x0f, +0xf7,0xc0,0x07,0x86,0x08,0x7c,0xe0,0xd0,0x00,0xe3,0x42,0x13,0x59,0x16,0x00,0x28, +0xff,0xa0,0x04,0x4a,0x10,0x01,0x90,0x28,0x0d,0xd2,0x20,0x0b,0x40,0x90,0x86,0xb1, +0xf0,0x08,0x37,0xa0,0x04,0x4c,0x00,0x0b,0xfc,0x00,0x77,0x4c,0x20,0x0d,0xde,0x70, +0x0e,0xa9,0xc7,0x7a,0x78,0x78,0x8a,0xa8,0x78,0x31,0x42,0x60,0x0b,0x7e,0xf7,0x77, +0x21,0xa8,0x74,0x80,0x78,0x85,0xbc,0x97,0x85,0x59,0x08,0x7c,0x0b,0x90,0x03,0x12, +0x20,0x02,0x4f,0x91,0x12,0x74,0x40,0x01,0xf2,0x40,0x0d,0x90,0xa8,0x04,0xdf,0xd0, +0x0c,0xd2,0x20,0x06,0x8f,0x90,0x86,0x50,0x50,0x06,0xce,0x10,0x89,0x70,0x07,0x89, +0x92,0xf8,0x0d,0xe9,0x90,0x0f,0xa6,0x98,0x8a,0xd4,0x58,0x8d,0x02,0x53,0x06,0x82, +0x80,0x09,0x94,0x80,0x4c,0x94,0x40,0x59,0x1b,0x90,0x4c,0xc9,0xc4,0x65,0xe2,0x68, +0x07,0xec,0x40,0x8e,0x1b,0xc0,0x03,0xba,0xc0,0x0d,0x0f,0xc3,0x13,0x3d,0xe8,0x0b, +0xcf,0x20,0x0d,0x93,0x28,0x0d,0x0b,0x40,0x0d,0x05,0x24,0x10,0xcb,0x01,0x01,0x3f, +0x70,0x83,0x90,0xf8,0x0d,0x90,0x58,0x09,0xd9,0x90,0x7a,0xf6,0x68,0x8d,0x02,0x39, +0x90,0x01,0x03,0x05,0x22,0x10,0x06,0x08,0x99,0x90,0x61,0x20,0x02,0x07,0xc9,0x90, +0x0d,0xf9,0x90,0x61,0x90,0x0f,0xf9,0x80,0x90,0x31,0x01,0x15,0xc1,0x76,0x07,0x4f, +0xd7,0x0c,0x4a,0xc0,0x07,0xf4,0x90,0x88,0x5f,0x73,0x24,0x06,0xd9,0x01,0x1a,0xc9, +0x0f,0x4a,0x40,0x89,0x90,0xd8,0x0c,0x21,0x30,0x0e,0x04,0xb9,0x92,0x2c,0xe9,0x36, +0x2d,0xb0,0x17,0x5c,0x70,0x0e,0x1b,0x20,0x06,0x87,0x08,0x7c,0x1b,0x80,0x07,0x71, +0xff,0x03,0x05,0x3e,0x60,0x07,0x7c,0x10,0x8c,0x54,0xb0,0x00,0xf2,0x28,0x06,0x51, +0xa0,0x36,0x2d,0x59,0x94,0x46,0x99,0x2b,0xdd,0xd6,0x10,0x6a,0xe3,0x14,0xf2,0xf0, +0x0c,0x4e,0x57,0x7f,0xcf,0x70,0x07,0xbf,0xc1,0x83,0xc4,0x50,0x01,0xa7,0x20,0x0d, +0x70,0x47,0x05,0xf3,0x27,0x06,0x12,0xc0,0x03,0xe3,0x30,0x8d,0x47,0x19,0x96,0x62, +0xf9,0x23,0x49,0xa9,0x94,0x7a,0x07,0x05,0x23,0xa0,0x00,0x84,0x57,0x8b,0x5e,0x60, +0x07,0xeb,0xf0,0x30,0x1d,0x86,0x0e,0xec,0x40,0x93,0x86,0x48,0x05,0xbe,0x47,0x0d, +0x39,0xd0,0x0b,0x00,0x39,0x96,0x7c,0xd9,0x97,0x0a,0x92,0x13,0x60,0xd9,0x10,0x4b, +0x30,0x0d,0xb8,0xb0,0x7b,0x82,0x58,0x00,0x63,0xe0,0x03,0x32,0x21,0x83,0xf8,0x00, +0x0e,0x0b,0x30,0x7f,0x7c,0xc0,0x08,0x05,0x80,0x02,0x94,0xd0,0x0b,0xc5,0x17,0x98, +0x7e,0x99,0x99,0x9a,0xe9,0x17,0x98,0xd9,0x10,0x37,0x01,0x05,0x08,0x10,0x05,0x26, +0x58,0x00,0x86,0xe9,0x05,0xf4,0xa0,0x05,0xd5,0xc3,0x8e,0xb1,0x70,0x07,0x4e,0x07, +0x0e,0x59,0x78,0x0f,0x8c,0x80,0x53,0x14,0x70,0x7c,0x9b,0x59,0x9b,0xb6,0x69,0x18, +0x65,0x79,0x11,0x50,0x60,0x0c,0xb5,0x20,0x09,0x94,0x00,0x0e,0x28,0x80,0x02,0xcf, +0x70,0x0a,0xcf,0x30,0x00,0x3b,0x52,0x13,0x7b,0x71,0x74,0x1b,0x70,0x0a,0xe0,0xb0, +0x01,0x28,0xe0,0x0c,0x93,0x60,0x09,0x3b,0x78,0x9b,0xd4,0x59,0x9d,0x7e,0xc1,0x8e, +0x41,0x57,0x11,0xdb,0x60,0x0c,0xc6,0x10,0x07,0x2a,0x10,0x07,0xe0,0x19,0x9e,0x42, +0xff,0x80,0x2f,0x49,0x80,0x08,0xe1,0x79,0x0e,0xe1,0xe0,0x2f,0x9d,0x69,0x9d,0xec, +0xd9,0x9e,0x1a,0x31,0x13,0xd9,0x09,0x12,0x58,0x95,0x27,0xee,0xe4,0x9e,0xf6,0x79, +0x9f,0x23,0xc1,0x42,0xeb,0x29,0x12,0x30,0x81,0x9f,0xfe,0xf9,0x9f,0x56,0xa3,0x80, +0xfb,0xb9,0x10,0x33,0xb1,0x7f,0x56,0xc4,0x5f,0x07,0xba,0x1c,0x0a,0x81,0x33,0x00, +0xda,0xa0,0x0e,0x1a,0x32,0x78,0xc4,0xa0,0x1c,0xa1,0x9f,0x04,0x71,0x12,0xf0,0x19, +0x11,0xfd,0xf9,0xa0,0x1a,0x8a,0x9f,0xfc,0xa3,0x80,0x2f,0x31,0xa0,0x0f,0x41,0x9f, +0x10,0xba,0x7a,0x20,0xf9,0x5c,0x0b,0xc1,0x1c,0x20,0xba,0xa1,0x2a,0xca,0x92,0x50, +0x80,0x08,0xe7,0x00,0x05,0xa6,0xb0,0x04,0xd5,0x13,0x0b,0x38,0x80,0x03,0xa6,0x28, +0xa2,0x22,0x13,0x13,0xfd,0x72,0x66,0x20,0xb9,0x33,0xb1,0xa0,0x07,0xac,0x27,0x02, +0xc5,0x40,0x4f,0x2b,0x5a,0xa4,0xd4,0x59,0x03,0x78,0xf0,0x30,0xa0,0x70,0x2f,0xc1, +0x80,0x07,0x49,0xb0,0x3f,0xfc,0x83,0x33,0x30,0xe1,0x14,0x72,0xc0,0x39,0x5c,0xb0, +0xa3,0xe4,0x64,0x90,0x72,0x00,0x6f,0xc8,0x67,0x0a,0x5b,0xaa,0xa5,0x38,0x23,0x02, +0x08,0xe7,0x43,0x50,0x20,0x04,0x5c,0x2a,0x04,0x81,0x90,0x9e,0x06,0x79,0x0b,0xf0, +0x36,0x10,0xb7,0x20,0x07,0xca,0xf0,0x05,0xe2,0x66,0xa4,0x74,0xea,0x97,0xc1,0xe6, +0x03,0xe8,0x10,0x06,0x66,0x90,0x04,0x61,0xd0,0x06,0xf8,0x20,0x7e,0x35,0x60,0x9e, +0x88,0x50,0x8a,0x4e,0x21,0x02,0x7d,0x70,0x43,0xdc,0xa0,0x07,0x72,0xc0,0x0b,0x2a, +0xff,0x70,0x24,0x18,0x60,0x03,0x22,0x80,0x06,0x89,0xfa,0x0e,0x8b,0x50,0x06,0x1c, +0xc0,0x0d,0xdc,0xa0,0x0e,0x7d,0x80,0xa9,0x7d,0x10,0x0b,0x5c,0x40,0x0e,0xc0,0xe0, +0x04,0xea,0x70,0x0b,0x22,0x10,0xaa,0xdc,0xe0,0x02,0x88,0x20,0x04,0x75,0xc0,0x06, +0xf5,0x70,0x0b,0xc8,0xe0,0x02,0xc0,0x80,0xaa,0xc4,0xc0,0x05,0x1a,0xf0,0x0e,0xdc, +0xc0,0x01,0x47,0x60,0x4a,0x75,0xba,0xab,0x7c,0x79,0xa7,0xb1,0x10,0x0b,0x10,0x60, +0x09,0x14,0x40,0x00,0x4f,0x40,0x01,0x49,0xe0,0x01,0x4b,0x80,0x00,0xe6,0xf9,0x99, +0x68,0xc0,0x01,0xc8,0x60,0x0c,0x7d,0xc0,0x06,0x69,0x00,0x0c,0x7d,0x60,0x12,0xc5, +0xc0,0x01,0xcd,0xca,0x0b,0xc6,0x00,0x0c,0xd8,0x80,0x0c,0xac,0x50,0x04,0x2a,0xc0, +0x01,0x97,0xd0,0x06,0x80,0x00,0x09,0x2a,0x70,0x06,0x4e,0x50,0x02,0xc6,0xa0,0x0e, +0xdc,0x30,0x02,0x81,0x50,0x04,0xc6,0x60,0x0e,0x4e,0xa0,0x0c,0xc8,0xf0,0x0b,0xc6, +0x50,0xae,0x6d,0x30,0x0a,0x8b,0xc0,0x01,0xfe,0xc4,0x0d,0xdc,0xc9,0x01,0xd8,0x30, +0xa7,0xbc,0x3a,0xb0,0x2d,0x69,0x72,0x49,0x4a,0x0c,0x0e,0x00,0x04,0xc4,0xe0,0x03, +0xe3,0x40,0x07,0xc2,0x10,0x0a,0x40,0x00,0x04,0xe3,0x70,0x02,0x17,0x68,0x12,0x5f, +0x50,0x02,0x02,0xc1,0x05,0x97,0x30,0xad,0xa9,0x70,0x24,0xd7,0xca,0x01,0xbc,0x50, +0x12,0x65,0x60,0xae,0x69,0x4a,0x0c,0x6d,0xe0,0x04,0x9c,0x53,0x0f,0x1c,0x50,0x0e, +0x59,0x70,0x06,0x7d,0x50,0x07,0xaa,0xd0,0x08,0x97,0xa0,0x8b,0x8a,0xf0,0x0e,0xc6, +0xff,0xc0,0x05,0xac,0x00,0x05,0xe6,0xa0,0x0a,0x7d,0xe0,0xb2,0x47,0x50,0x04,0x47, +0x80,0x03,0x34,0x81,0x08,0x47,0x30,0x95,0x04,0x7b,0xb4,0x2c,0x29,0x04,0x4f,0x70, +0x2f,0xf1,0x20,0x9d,0xa0,0xa0,0x0f,0xfd,0xe0,0x03,0xf1,0x20,0x0c,0x4f,0xe0,0x03, +0xc2,0xb0,0x12,0xe3,0xa2,0x0a,0x88,0xd0,0x2f,0x89,0x50,0x06,0x15,0x40,0x0e,0x47, +0x72,0x06,0x90,0xc0,0x01,0x80,0x50,0x12,0xca,0xe0,0x04,0x2a,0x40,0x02,0x25,0xd1, +0x08,0x75,0xc0,0x39,0x67,0x90,0x05,0x1c,0xa0,0x0a,0x75,0x50,0x04,0x75,0x60,0x0e, +0x69,0x70,0x04,0x57,0x2a,0x07,0x4e,0x60,0x0c,0xdb,0x10,0x08,0x50,0xe0,0x04,0x5f, +0x30,0xb7,0xe6,0xc0,0x0d,0x80,0xf0,0x05,0x77,0x24,0x04,0xaa,0x60,0xb4,0x48,0xbb, +0xb8,0xd5,0x48,0x07,0x23,0x80,0x07,0x5c,0x60,0x0a,0x4f,0xa0,0x0f,0x5c,0xe0,0x03, +0x0e,0x80,0x0e,0xe3,0xe0,0x01,0x40,0xd0,0x0f,0x08,0x50,0x40,0x61,0x50,0x0c,0x38, +0x10,0x0b,0xe6,0xf0,0x0e,0xb7,0x20,0x04,0x80,0xc0,0x06,0x23,0xf0,0xb2,0x79,0x51, +0x0e,0xef,0xc0,0xae,0x65,0x20,0x07,0x7d,0x70,0x09,0x25,0x10,0x08,0x57,0x8a,0x0c, +0x75,0xa0,0x8b,0x2f,0x2b,0xaf,0x6f,0x4a,0x0e,0xe6,0xa0,0x0c,0x47,0x40,0x4f,0x72, +0x90,0x05,0x28,0xa6,0xb6,0x8d,0x90,0x05,0xc6,0x20,0x07,0x6c,0x5b,0x06,0xe5,0x70, +0x06,0x9c,0xa0,0x0c,0xdc,0x5a,0x06,0x8c,0x1b,0xbd,0xd4,0xd8,0xa2,0x80,0x80,0x03, +0xa6,0xbb,0x07,0x42,0x10,0x07,0x4f,0x80,0x0e,0xb1,0xa0,0x08,0x97,0x83,0x07,0x61, +0xd1,0x40,0x07,0x38,0x90,0x0a,0x36,0x1a,0x06,0xdc,0xf0,0x0e,0x75,0x00,0x09,0x89, +0xab,0x0c,0xdc,0xe0,0x04,0xc0,0xc0,0xb3,0xc6,0x90,0x05,0x4e,0x50,0x07,0xe5,0x90, +0x08,0x99,0x00,0x09,0x4e,0x81,0x01,0xe4,0x00,0x6f,0xc8,0x80,0x06,0xc4,0x65,0xab, +0x36,0x2b,0x02,0xef,0x00,0x6f,0x3f,0x56,0x06,0x50,0xa0,0x0a,0x4e,0xd1,0x07,0x1c, +0x50,0x07,0x4e,0xe0,0x4b,0xb7,0x70,0xa9,0x7a,0xb0,0xb2,0x02,0x2b,0xbd,0x14,0xbc, +0x84,0x07,0x89,0x67,0x0b,0x19,0x0b,0x07,0xb9,0x3f,0x50,0x80,0x90,0x74,0x48,0x0c, +0xb1,0x10,0x06,0xa9,0xc7,0x05,0x71,0x60,0x0c,0x22,0x60,0xa6,0x3e,0xc4,0x9d,0x55, +0x8a,0x0c,0xef,0xd0,0x08,0x80,0xa0,0xc0,0x0f,0x57,0x12,0xa6,0xa0,0x8b,0x4f,0xa1, +0x6e,0x76,0xa5,0x6e,0xf8,0x76,0x24,0x72,0x00,0x15,0xf8,0xe6,0x14,0x65,0x90,0x09, +0x3d,0xec,0x14,0xb3,0x70,0xbc,0x9c,0x53,0xc1,0x46,0xbc,0x84,0x37,0x81,0x36,0xd7, +0xb7,0xc4,0x0c,0x91,0xa1,0x3d,0x1a,0x0e,0x3b,0xfb,0x05,0x90,0x80,0x0c,0x50,0xa1, +0x9e,0x1e,0xda,0x9f,0x38,0xea,0xa1,0x3a,0x75,0xc4,0x5c,0x3c,0x96,0x75,0xf7,0x14, +0xca,0x80,0x03,0x45,0x5c,0xa2,0x5a,0xfc,0x14,0x3c,0x2a,0xa0,0xea,0xa9,0xa3,0x7f, +0x12,0x10,0x00,0x3b,}; + +const unsigned int dummy_align__STM32H7xx_files_stm32_jpg = 2; +const unsigned char data__STM32H7xx_files_stm32_jpg[] = { +/* /STM32H7xx_files/stm32.jpg (27 chars) */ +0x2f,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x5f,0x66,0x69,0x6c,0x65,0x73, +0x2f,0x73,0x74,0x6d,0x33,0x32,0x2e,0x6a,0x70,0x67,0x00,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) +" (63 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, +0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, +0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, +0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, +/* "Content-type: image/jpeg + +" (28 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x69,0x6d, +0x61,0x67,0x65,0x2f,0x6a,0x70,0x65,0x67,0x0d,0x0a,0x0d,0x0a, +/* raw file data (40619 bytes) */ +0xff,0xd8,0xff,0xe0,0x00,0x10,0x4a,0x46,0x49,0x46,0x00,0x01,0x01,0x01,0x00,0x60, +0x00,0x60,0x00,0x00,0xff,0xdb,0x00,0x43,0x00,0x03,0x02,0x02,0x03,0x02,0x02,0x03, +0x03,0x03,0x03,0x04,0x03,0x03,0x04,0x05,0x08,0x05,0x05,0x04,0x04,0x05,0x0a,0x07, +0x07,0x06,0x08,0x0c,0x0a,0x0c,0x0c,0x0b,0x0a,0x0b,0x0b,0x0d,0x0e,0x12,0x10,0x0d, +0x0e,0x11,0x0e,0x0b,0x0b,0x10,0x16,0x10,0x11,0x13,0x14,0x15,0x15,0x15,0x0c,0x0f, +0x17,0x18,0x16,0x14,0x18,0x12,0x14,0x15,0x14,0xff,0xdb,0x00,0x43,0x01,0x03,0x04, +0x04,0x05,0x04,0x05,0x09,0x05,0x05,0x09,0x14,0x0d,0x0b,0x0d,0x14,0x14,0x14,0x14, +0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14, +0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14, +0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0xff,0xc0, +0x00,0x11,0x08,0x01,0x50,0x03,0x36,0x03,0x01,0x22,0x00,0x02,0x11,0x01,0x03,0x11, +0x01,0xff,0xc4,0x00,0x1f,0x00,0x00,0x01,0x05,0x01,0x01,0x01,0x01,0x01,0x01,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09, +0x0a,0x0b,0xff,0xc4,0x00,0xb5,0x10,0x00,0x02,0x01,0x03,0x03,0x02,0x04,0x03,0x05, +0x05,0x04,0x04,0x00,0x00,0x01,0x7d,0x01,0x02,0x03,0x00,0x04,0x11,0x05,0x12,0x21, +0x31,0x41,0x06,0x13,0x51,0x61,0x07,0x22,0x71,0x14,0x32,0x81,0x91,0xa1,0x08,0x23, +0x42,0xb1,0xc1,0x15,0x52,0xd1,0xf0,0x24,0x33,0x62,0x72,0x82,0x09,0x0a,0x16,0x17, +0x18,0x19,0x1a,0x25,0x26,0x27,0x28,0x29,0x2a,0x34,0x35,0x36,0x37,0x38,0x39,0x3a, +0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a, +0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a, +0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99, +0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7, +0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,0xd5, +0xd6,0xd7,0xd8,0xd9,0xda,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xf1, +0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xff,0xc4,0x00,0x1f,0x01,0x00,0x03, +0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01, +0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0xff,0xc4,0x00,0xb5,0x11,0x00, +0x02,0x01,0x02,0x04,0x04,0x03,0x04,0x07,0x05,0x04,0x04,0x00,0x01,0x02,0x77,0x00, +0x01,0x02,0x03,0x11,0x04,0x05,0x21,0x31,0x06,0x12,0x41,0x51,0x07,0x61,0x71,0x13, +0x22,0x32,0x81,0x08,0x14,0x42,0x91,0xa1,0xb1,0xc1,0x09,0x23,0x33,0x52,0xf0,0x15, +0x62,0x72,0xd1,0x0a,0x16,0x24,0x34,0xe1,0x25,0xf1,0x17,0x18,0x19,0x1a,0x26,0x27, +0x28,0x29,0x2a,0x35,0x36,0x37,0x38,0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49, +0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69, +0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x82,0x83,0x84,0x85,0x86,0x87,0x88, +0x89,0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6, +0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4, +0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xe2, +0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9, +0xfa,0xff,0xda,0x00,0x0c,0x03,0x01,0x00,0x02,0x11,0x03,0x11,0x00,0x3f,0x00,0xfb, +0x07,0xfe,0x16,0xef,0x8b,0x7f,0xe8,0x2d,0xff,0x00,0x92,0xd0,0xff,0x00,0xf1,0x14, +0xbf,0xf0,0xb7,0x3c,0x5b,0xff,0x00,0x41,0x6f,0xfc,0x96,0x87,0xff,0x00,0x88,0xae, +0x44,0x2d,0x3b,0x68,0xae,0x9b,0x2e,0xc6,0x57,0x3a,0xef,0xf8,0x5b,0x5e,0x2c,0xff, +0x00,0xa0,0xb7,0xfe,0x4b,0x43,0xff,0x00,0xc4,0x53,0x87,0xc5,0x9f,0x16,0x7f,0xd0, +0x57,0xff,0x00,0x25,0xa2,0xff,0x00,0xe2,0x2b,0x93,0x11,0x8a,0x78,0x4a,0x2c,0x85, +0x73,0xab,0x5f,0x8b,0x1e,0x2b,0x3f,0xf3,0x15,0xff,0x00,0xc9,0x68,0xbf,0xf8,0x8a, +0x78,0xf8,0xad,0xe2,0xaf,0xfa,0x0a,0x7f,0xe4,0xbc,0x5f,0xfc,0x4d,0x72,0x8a,0xbe, +0xd4,0xfc,0x7b,0x52,0xb2,0x15,0xd9,0xd5,0x8f,0x8a,0x9e,0x2a,0xff,0x00,0xa0,0xa7, +0xfe,0x4b,0xc5,0xff,0x00,0xc4,0xd3,0xbf,0xe1,0x69,0xf8,0xa7,0xfe,0x82,0x9f,0xf9, +0x2f,0x17,0xff,0x00,0x13,0x5c,0xa8,0x5a,0x72,0xad,0x1c,0xa8,0x7a,0x9d,0x4f,0xfc, +0x2d,0x2f,0x14,0xff,0x00,0xd0,0x53,0xff,0x00,0x25,0xe2,0xff,0x00,0xe2,0x69,0xc3, +0xe2,0x87,0x8a,0x3f,0xe8,0x27,0xff,0x00,0x92,0xf1,0x7f,0xf1,0x35,0xcb,0x62,0xa4, +0x55,0xcd,0x16,0x5d,0x87,0x76,0x75,0x03,0xe2,0x87,0x89,0xcf,0xfc,0xc4,0xff,0x00, +0xf2,0x5e,0x2f,0xfe,0x26,0x97,0xfe,0x16,0x77,0x89,0xff,0x00,0xe8,0x27,0xff,0x00, +0x92,0xf1,0x7f,0xf1,0x35,0xcd,0x2c,0x62,0x9d,0xb6,0x95,0x90,0x5d,0x9d,0x20,0xf8, +0x99,0xe2,0x73,0xff,0x00,0x31,0x3f,0xfc,0x97,0x8b,0xff,0x00,0x89,0xa7,0xff,0x00, +0xc2,0xcc,0xf1,0x37,0xfd,0x04,0xbf,0xf2,0x04,0x5f,0xfc,0x4d,0x73,0x41,0x2a,0x41, +0x1d,0x16,0x41,0x76,0x74,0x6b,0xf1,0x2b,0xc4,0xa7,0xfe,0x62,0x5f,0xf9,0x02,0x2f, +0xfe,0x26,0x9c,0x3e,0x24,0xf8,0x93,0xfe,0x82,0x5f,0xf9,0x02,0x3f,0xfe,0x26,0xb9, +0xc0,0x94,0xf5,0x8e,0x8b,0x20,0xbb,0x3a,0x25,0xf8,0x91,0xe2,0x4f,0xfa,0x08,0xff, +0x00,0xe4,0x08,0xff,0x00,0xf8,0x9a,0x5f,0xf8,0x58,0xde,0x24,0xff,0x00,0xa0,0x8f, +0xfe,0x40,0x8f,0xff,0x00,0x89,0xac,0x0f,0x2e,0x9c,0xb1,0x51,0x64,0x17,0x66,0xfa, +0xfc,0x44,0xf1,0x23,0x7f,0xcc,0x47,0xff,0x00,0x20,0x47,0xff,0x00,0xc4,0xd3,0xff, +0x00,0xe1,0x61,0xf8,0x8f,0xfe,0x82,0x3f,0xf9,0x02,0x3f,0xfe,0x26,0xb0,0x56,0x3f, +0x4a,0x77,0x95,0xed,0x45,0x90,0xae,0xcd,0xdf,0xf8,0x58,0x5e,0x21,0xff,0x00,0xa0, +0x87,0xfe,0x40,0x8f,0xff,0x00,0x89,0xa0,0x7c,0x42,0xf1,0x17,0xfd,0x04,0x38,0xff, +0x00,0xae,0x11,0xff,0x00,0xf1,0x35,0x89,0xe5,0x53,0x96,0x1c,0x0a,0x2c,0x85,0x76, +0x6d,0x8f,0x88,0x1e,0x21,0xff,0x00,0xa0,0x87,0xfe,0x40,0x8f,0xff,0x00,0x89,0xa7, +0x0f,0x1f,0x78,0x87,0xfe,0x82,0x1f,0xf9,0x06,0x3f,0xfe,0x26,0xb1,0x7c,0xba,0x72, +0xc7,0xf8,0xd5,0xf2,0xae,0xc2,0xbb,0x36,0xc7,0x8f,0xbc,0x43,0xff,0x00,0x41,0x0f, +0xfc,0x83,0x1f,0xff,0x00,0x13,0x4b,0xff,0x00,0x09,0xe7,0x88,0x3f,0xe8,0x21,0xff, +0x00,0x90,0x63,0xff,0x00,0xe2,0x6b,0x18,0x43,0xf8,0x53,0xd6,0x0f,0x5a,0x39,0x57, +0x60,0xbb,0xee,0x6b,0xff,0x00,0xc2,0x79,0xaf,0xff,0x00,0xd0,0x43,0xff,0x00,0x20, +0xc7,0xff,0x00,0xc4,0xd2,0xff,0x00,0xc2,0x77,0xaf,0xff,0x00,0xd0,0x43,0xff,0x00, +0x20,0xc7,0xff,0x00,0xc4,0xd6,0x57,0xd9,0xe8,0xf2,0x47,0xa5,0x3e,0x55,0xd8,0x39, +0x99,0xa9,0xff,0x00,0x09,0xe7,0x88,0x3f,0xe7,0xff,0x00,0xff,0x00,0x20,0xc7,0xff, +0x00,0xc4,0xd2,0xff,0x00,0xc2,0x79,0xaf,0xff,0x00,0xcf,0xff,0x00,0xfe,0x41,0x8f, +0xff,0x00,0x89,0xac,0xaf,0x24,0x7a,0x51,0xe4,0x8a,0x5c,0xab,0xb0,0x73,0x3e,0xe6, +0xaf,0xfc,0x27,0x5e,0x20,0xff,0x00,0x9f,0xff,0x00,0xfc,0x83,0x1f,0xff,0x00,0x13, +0x49,0xff,0x00,0x09,0xe7,0x88,0x3f,0xe7,0xff,0x00,0xff,0x00,0x20,0xc7,0xff,0x00, +0xc4,0xd6,0x57,0x92,0x29,0x7e,0xcf,0x47,0x2a,0xec,0x17,0x7d,0xcd,0x4f,0xf8,0x4f, +0x3c,0x41,0xff,0x00,0x41,0x0f,0xfc,0x83,0x1f,0xff,0x00,0x13,0x4d,0x3e,0x3d,0xf1, +0x07,0xfd,0x04,0x3f,0xf2,0x04,0x7f,0xfc,0x4d,0x65,0xf9,0x14,0x7d,0x9e,0x9f,0x2a, +0xec,0x17,0x7d,0xcd,0x23,0xe3,0xef,0x10,0xff,0x00,0xd0,0x43,0xff,0x00,0x20,0xc7, +0xff,0x00,0xc4,0xd3,0x5b,0xc7,0xde,0x22,0xed,0xa8,0xff,0x00,0xe4,0x08,0xff,0x00, +0xf8,0x9a,0xcd,0x36,0xf4,0xc3,0x0f,0xb5,0x1c,0xab,0xb0,0xae,0xfb,0x9a,0x4d,0xf1, +0x0b,0xc4,0x63,0xfe,0x62,0x1f,0xf9,0x02,0x3f,0xfe,0x26,0x98,0xdf,0x11,0x3c,0x49, +0xff,0x00,0x41,0x1c,0x7f,0xdb,0x08,0xff,0x00,0xf8,0x9a,0xcd,0x68,0x05,0x46,0xd0, +0x8a,0x7c,0xab,0xb0,0x5d,0x9a,0x2d,0xf1,0x1b,0xc4,0xc3,0xfe,0x62,0x5f,0xf9,0x02, +0x2f,0xfe,0x26,0xa3,0x6f,0x89,0x5e,0x26,0x5f,0xf9,0x89,0x63,0xfe,0xd8,0x45,0xff, +0x00,0xc4,0xd6,0x6b,0xdb,0xfb,0x55,0x77,0xb7,0xf6,0xa5,0xca,0xbb,0x05,0xdf,0x73, +0x59,0xbe,0x26,0x78,0xa3,0xfe,0x82,0x7f,0xf9,0x2f,0x17,0xff,0x00,0x13,0x51,0x37, +0xc4,0xff,0x00,0x14,0x8f,0xf9,0x8a,0x7f,0xe4,0xbc,0x5f,0xfc,0x4d,0x64,0x34,0x02, +0xab,0xb4,0x34,0x72,0xae,0xc1,0x76,0x6d,0xb7,0xc5,0x2f,0x15,0x8f,0xf9,0x8a,0x7f, +0xe4,0xbc,0x5f,0xfc,0x45,0x44,0xdf,0x15,0x7c,0x58,0x3f,0xe6,0x2b,0xff,0x00,0x92, +0xf1,0x7f,0xf1,0x15,0x86,0xd0,0xd4,0x0d,0x0d,0x1c,0xab,0xb0,0xf9,0x99,0xbc,0xdf, +0x16,0x3c,0x5c,0x3a,0x6a,0xdf,0xf9,0x2d,0x0f,0xff,0x00,0x11,0x51,0x1f,0x8b,0x9e, +0x2f,0xff,0x00,0xa0,0xb7,0xfe,0x4b,0x43,0xff,0x00,0xc4,0x56,0x11,0x86,0xa1,0x92, +0x11,0x47,0x2a,0xec,0x2e,0x66,0x74,0x07,0xe2,0xf7,0x8c,0x33,0xff,0x00,0x21,0x7f, +0xfc,0x96,0x87,0xff,0x00,0x88,0xa6,0x37,0xc6,0x0f,0x18,0xf6,0xd5,0xff,0x00,0xf2, +0x5a,0x1f,0xfe,0x22,0xb9,0xb6,0x86,0xa1,0x68,0x71,0xcd,0x2e,0x54,0x3e,0x66,0x74, +0xcd,0xf1,0x8b,0xc6,0x43,0xfe,0x63,0x1f,0xf9,0x2d,0x0f,0xff,0x00,0x11,0x4c,0x3f, +0x19,0xbc,0x65,0xff,0x00,0x41,0x8f,0xfc,0x95,0x87,0xff,0x00,0x88,0xae,0x5d,0xa2, +0xa8,0xda,0x11,0xe9,0x53,0xca,0x8a,0xbb,0x3a,0x96,0xf8,0xcf,0xe3,0x3f,0xfa,0x0c, +0xff,0x00,0xe4,0xac,0x3f,0xfc,0x45,0x46,0xdf,0x1a,0x3c,0x69,0x82,0x3f,0xb6,0xb0, +0x7d,0x7e,0xcb,0x07,0xff,0x00,0x11,0x5c,0xab,0x43,0x8a,0x89,0xa3,0xf6,0xa2,0xcb, +0xb0,0xae,0xcf,0x9f,0x7e,0x39,0x7e,0xd4,0x9f,0xb4,0x7f,0xc2,0x3f,0x10,0x61,0x7c, +0x7e,0xf7,0x3a,0x15,0xdb,0x13,0x67,0x76,0x74,0x5d,0x3f,0x8f,0xfa,0x66,0xff,0x00, +0xe8,0xfc,0x30,0xfd,0x47,0x35,0xe6,0x7f,0xf0,0xf0,0xdf,0xda,0x07,0xfe,0x87,0xff, +0x00,0xfc,0xa3,0x69,0xff,0x00,0xfc,0x8f,0x5f,0x57,0xf8,0xcb,0xc1,0xba,0x67,0x8e, +0xbc,0x3b,0x77,0xa2,0xea,0xd0,0x79,0xf6,0x77,0x0b,0x83,0xfd,0xe4,0x6e,0xce,0xa7, +0xb3,0x03,0xd2,0xbf,0x3d,0x3e,0x2a,0x7c,0x32,0xd4,0xfe,0x15,0x78,0xaa,0x6d,0x27, +0x50,0x53,0x24,0x27,0x2f,0x6b,0x74,0x06,0x12,0x78,0xf3,0xc3,0x0f,0x71,0xd0,0x8e, +0xc6,0xbe,0x87,0x07,0x2a,0x15,0x97,0x24,0xe0,0xb9,0x97,0x92,0xd4,0xf3,0xeb,0x7b, +0x48,0x3e,0x65,0x27,0x6f,0x53,0xd7,0x3f,0xe1,0xe1,0xbf,0xb4,0x0f,0xfd,0x0f,0xff, +0x00,0xf9,0x46,0xd3,0xff,0x00,0xf9,0x1e,0x8f,0xf8,0x78,0x6f,0xed,0x03,0xff,0x00, +0x43,0xff,0x00,0xfe,0x51,0xb4,0xff,0x00,0xfe,0x47,0xaf,0x9c,0xe8,0xaf,0x53,0xea, +0xd4,0x3f,0x91,0x7d,0xc8,0xe5,0xf6,0xb5,0x3f,0x99,0xfd,0xe7,0xd1,0x9f,0xf0,0xf0, +0xdf,0xda,0x07,0xfe,0x87,0xff,0x00,0xfc,0xa3,0x69,0xff,0x00,0xfc,0x8f,0x47,0xfc, +0x3c,0x37,0xf6,0x81,0xff,0x00,0xa1,0xff,0x00,0xff,0x00,0x28,0xda,0x7f,0xff,0x00, +0x23,0xd7,0xce,0x74,0x51,0xf5,0x6a,0x1f,0xc8,0xbe,0xe4,0x1e,0xd6,0xa7,0xf3,0x3f, +0xbc,0xfa,0x33,0xfe,0x1e,0x1b,0xfb,0x40,0xff,0x00,0xd0,0xff,0x00,0xff,0x00,0x94, +0x6d,0x3f,0xff,0x00,0x91,0xe8,0xff,0x00,0x87,0x86,0xfe,0xd0,0x3f,0xf4,0x3f,0xff, +0x00,0xe5,0x1b,0x4f,0xff,0x00,0xe4,0x7a,0xf9,0xce,0x8a,0x3e,0xad,0x43,0xf9,0x17, +0xdc,0x83,0xda,0xd4,0xfe,0x67,0xf7,0x9f,0x46,0x7f,0xc3,0xc3,0x7f,0x68,0x1f,0xfa, +0x1f,0xff,0x00,0xf2,0x8d,0xa7,0xff,0x00,0xf2,0x3d,0x1f,0xf0,0xf0,0xdf,0xda,0x07, +0xfe,0x87,0xff,0x00,0xfc,0xa3,0x69,0xff,0x00,0xfc,0x8f,0x5f,0x39,0xd1,0x47,0xd5, +0xa8,0x7f,0x22,0xfb,0x90,0x7b,0x5a,0x9f,0xcc,0xfe,0xf3,0xe8,0xcf,0xf8,0x78,0x6f, +0xed,0x03,0xff,0x00,0x43,0xff,0x00,0xfe,0x51,0xb4,0xff,0x00,0xfe,0x47,0xa3,0xfe, +0x1e,0x1b,0xfb,0x40,0xff,0x00,0xd0,0xff,0x00,0xff,0x00,0x94,0x6d,0x3f,0xff,0x00, +0x91,0xeb,0xe7,0x3a,0x28,0xfa,0xb5,0x0f,0xe4,0x5f,0x72,0x0f,0x6b,0x53,0xf9,0x9f, +0xde,0x7d,0x19,0xff,0x00,0x0f,0x0d,0xfd,0xa0,0x7f,0xe8,0x7f,0xff,0x00,0xca,0x36, +0x9f,0xff,0x00,0xc8,0xf4,0x7f,0xc3,0xc3,0x7f,0x68,0x1f,0xfa,0x1f,0xff,0x00,0xf2, +0x8d,0xa7,0xff,0x00,0xf2,0x3d,0x7c,0xe7,0x45,0x1f,0x56,0xa1,0xfc,0x8b,0xee,0x41, +0xed,0x6a,0x7f,0x33,0xfb,0xcf,0xa3,0x3f,0xe1,0xe1,0xbf,0xb4,0x0f,0xfd,0x0f,0xff, +0x00,0xf9,0x46,0xd3,0xff,0x00,0xf9,0x1e,0x8f,0xf8,0x78,0x6f,0xed,0x03,0xff,0x00, +0x43,0xff,0x00,0xfe,0x51,0xb4,0xff,0x00,0xfe,0x47,0xaf,0x9c,0xe8,0xa3,0xea,0xd4, +0x3f,0x91,0x7d,0xc8,0x3d,0xad,0x4f,0xe6,0x7f,0x79,0xf4,0x67,0xfc,0x3c,0x37,0xf6, +0x81,0xff,0x00,0xa1,0xff,0x00,0xff,0x00,0x28,0xda,0x7f,0xff,0x00,0x23,0xd1,0xff, +0x00,0x0f,0x0d,0xfd,0xa0,0x7f,0xe8,0x7f,0xff,0x00,0xca,0x36,0x9f,0xff,0x00,0xc8, +0xf5,0xf3,0x9d,0x14,0x7d,0x5a,0x87,0xf2,0x2f,0xb9,0x07,0xb5,0xa9,0xfc,0xcf,0xef, +0x3e,0x8c,0xff,0x00,0x87,0x86,0xfe,0xd0,0x3f,0xf4,0x3f,0xff,0x00,0xe5,0x1b,0x4f, +0xff,0x00,0xe4,0x7a,0x3f,0xe1,0xe1,0xbf,0xb4,0x0f,0xfd,0x0f,0xff,0x00,0xf9,0x46, +0xd3,0xff,0x00,0xf9,0x1e,0xbe,0x73,0xa2,0x8f,0xab,0x50,0xfe,0x45,0xf7,0x20,0xf6, +0xb5,0x3f,0x99,0xfd,0xe7,0xd1,0x9f,0xf0,0xf0,0xdf,0xda,0x07,0xfe,0x87,0xff,0x00, +0xfc,0xa3,0x69,0xff,0x00,0xfc,0x8f,0x47,0xfc,0x3c,0x37,0xf6,0x81,0xff,0x00,0xa1, +0xff,0x00,0xff,0x00,0x28,0xda,0x7f,0xff,0x00,0x23,0xd7,0xce,0x74,0x51,0xf5,0x6a, +0x1f,0xc8,0xbe,0xe4,0x1e,0xd6,0xa7,0xf3,0x3f,0xbc,0xfa,0x33,0xfe,0x1e,0x1b,0xfb, +0x40,0xff,0x00,0xd0,0xff,0x00,0xff,0x00,0x94,0x6d,0x3f,0xff,0x00,0x91,0xe8,0xff, +0x00,0x87,0x86,0xfe,0xd0,0x3f,0xf4,0x3f,0xff,0x00,0xe5,0x1b,0x4f,0xff,0x00,0xe4, +0x7a,0xf9,0xce,0x8a,0x3e,0xad,0x43,0xf9,0x17,0xdc,0x83,0xda,0xd4,0xfe,0x67,0xf7, +0x9f,0x46,0x7f,0xc3,0xc3,0x7f,0x68,0x1f,0xfa,0x1f,0xff,0x00,0xf2,0x8d,0xa7,0xff, +0x00,0xf2,0x3d,0x1f,0xf0,0xf0,0xdf,0xda,0x07,0xfe,0x87,0xff,0x00,0xfc,0xa3,0x69, +0xff,0x00,0xfc,0x8f,0x5f,0x39,0xd1,0x47,0xd5,0xa8,0x7f,0x22,0xfb,0x90,0x7b,0x5a, +0x9f,0xcc,0xfe,0xf3,0xe8,0xcf,0xf8,0x78,0x6f,0xed,0x03,0xff,0x00,0x43,0xff,0x00, +0xfe,0x51,0xb4,0xff,0x00,0xfe,0x47,0xa3,0xfe,0x1e,0x1b,0xfb,0x40,0xff,0x00,0xd0, +0xff,0x00,0xff,0x00,0x94,0x6d,0x3f,0xff,0x00,0x91,0xeb,0xe7,0x3a,0x28,0xfa,0xb5, +0x0f,0xe4,0x5f,0x72,0x0f,0x6b,0x53,0xf9,0x9f,0xde,0x7d,0x19,0xff,0x00,0x0f,0x0d, +0xfd,0xa0,0x7f,0xe8,0x7f,0xff,0x00,0xca,0x36,0x9f,0xff,0x00,0xc8,0xf4,0x7f,0xc3, +0xc3,0x7f,0x68,0x1f,0xfa,0x1f,0xff,0x00,0xf2,0x8d,0xa7,0xff,0x00,0xf2,0x3d,0x7c, +0xe7,0x45,0x1f,0x56,0xa1,0xfc,0x8b,0xee,0x41,0xed,0x6a,0x7f,0x33,0xfb,0xcf,0xa3, +0x3f,0xe1,0xe1,0xbf,0xb4,0x0f,0xfd,0x0f,0xff,0x00,0xf9,0x46,0xd3,0xff,0x00,0xf9, +0x1e,0x8f,0xf8,0x78,0x6f,0xed,0x03,0xff,0x00,0x43,0xff,0x00,0xfe,0x51,0xb4,0xff, +0x00,0xfe,0x47,0xaf,0x9c,0xe8,0xa3,0xea,0xd4,0x3f,0x91,0x7d,0xc8,0x3d,0xad,0x4f, +0xe6,0x7f,0x79,0xf4,0x67,0xfc,0x3c,0x37,0xf6,0x81,0xff,0x00,0xa1,0xff,0x00,0xff, +0x00,0x28,0xda,0x7f,0xff,0x00,0x23,0xd1,0xff,0x00,0x0f,0x0d,0xfd,0xa0,0x7f,0xe8, +0x7f,0xff,0x00,0xca,0x36,0x9f,0xff,0x00,0xc8,0xf5,0xf3,0x9d,0x14,0x7d,0x5a,0x87, +0xf2,0x2f,0xb9,0x07,0xb5,0xa9,0xfc,0xcf,0xef,0x3e,0x8c,0xff,0x00,0x87,0x86,0xfe, +0xd0,0x3f,0xf4,0x3f,0xff,0x00,0xe5,0x1b,0x4f,0xff,0x00,0xe4,0x7a,0x3f,0xe1,0xe1, +0xbf,0xb4,0x0f,0xfd,0x0f,0xff,0x00,0xf9,0x46,0xd3,0xff,0x00,0xf9,0x1e,0xbe,0x73, +0xa2,0x8f,0xab,0x50,0xfe,0x45,0xf7,0x20,0xf6,0xb5,0x3f,0x99,0xfd,0xe7,0xd1,0x9f, +0xf0,0xf0,0xdf,0xda,0x07,0xfe,0x87,0xff,0x00,0xfc,0xa3,0x69,0xff,0x00,0xfc,0x8f, +0x47,0xfc,0x3c,0x37,0xf6,0x81,0xff,0x00,0xa1,0xff,0x00,0xff,0x00,0x28,0xda,0x7f, +0xff,0x00,0x23,0xd7,0xce,0x74,0x51,0xf5,0x6a,0x1f,0xc8,0xbe,0xe4,0x1e,0xd6,0xa7, +0xf3,0x3f,0xbc,0xfa,0x33,0xfe,0x1e,0x1b,0xfb,0x40,0xff,0x00,0xd0,0xff,0x00,0xff, +0x00,0x94,0x6d,0x3f,0xff,0x00,0x91,0xe8,0xff,0x00,0x87,0x86,0xfe,0xd0,0x3f,0xf4, +0x3f,0xff,0x00,0xe5,0x1b,0x4f,0xff,0x00,0xe4,0x7a,0xf9,0xce,0x8a,0x3e,0xad,0x43, +0xf9,0x17,0xdc,0x83,0xda,0xd4,0xfe,0x67,0xf7,0x9f,0x46,0x7f,0xc3,0xc3,0x7f,0x68, +0x1f,0xfa,0x1f,0xff,0x00,0xf2,0x8d,0xa7,0xff,0x00,0xf2,0x3d,0x1f,0xf0,0xf0,0xdf, +0xda,0x07,0xfe,0x87,0xff,0x00,0xfc,0xa3,0x69,0xff,0x00,0xfc,0x8f,0x5f,0x39,0xd1, +0x47,0xd5,0xa8,0x7f,0x22,0xfb,0x90,0x7b,0x5a,0x9f,0xcc,0xfe,0xf3,0xe8,0xcf,0xf8, +0x78,0x6f,0xed,0x03,0xff,0x00,0x43,0xff,0x00,0xfe,0x51,0xb4,0xff,0x00,0xfe,0x47, +0xa3,0xfe,0x1e,0x1b,0xfb,0x40,0xff,0x00,0xd0,0xff,0x00,0xff,0x00,0x94,0x6d,0x3f, +0xff,0x00,0x91,0xeb,0xe7,0x3a,0x28,0xfa,0xb5,0x0f,0xe4,0x5f,0x72,0x0f,0x6b,0x53, +0xf9,0x9f,0xde,0x7d,0x19,0xff,0x00,0x0f,0x0d,0xfd,0xa0,0x7f,0xe8,0x7f,0xff,0x00, +0xca,0x36,0x9f,0xff,0x00,0xc8,0xf4,0x7f,0xc3,0xc3,0x7f,0x68,0x1f,0xfa,0x1f,0xff, +0x00,0xf2,0x8d,0xa7,0xff,0x00,0xf2,0x3d,0x7c,0xe7,0x45,0x1f,0x56,0xa1,0xfc,0x8b, +0xee,0x41,0xed,0x6a,0x7f,0x33,0xfb,0xcf,0xa3,0x3f,0xe1,0xe1,0xbf,0xb4,0x0f,0xfd, +0x0f,0xff,0x00,0xf9,0x46,0xd3,0xff,0x00,0xf9,0x1e,0x8f,0xf8,0x78,0x6f,0xed,0x03, +0xff,0x00,0x43,0xff,0x00,0xfe,0x51,0xb4,0xff,0x00,0xfe,0x47,0xaf,0x9c,0xe8,0xa3, +0xea,0xd4,0x3f,0x91,0x7d,0xc8,0x3d,0xad,0x4f,0xe6,0x7f,0x79,0xf4,0x67,0xfc,0x3c, +0x37,0xf6,0x81,0xff,0x00,0xa1,0xff,0x00,0xff,0x00,0x28,0xda,0x7f,0xff,0x00,0x23, +0xd1,0xff,0x00,0x0f,0x0d,0xfd,0xa0,0x7f,0xe8,0x7f,0xff,0x00,0xca,0x36,0x9f,0xff, +0x00,0xc8,0xf5,0xf3,0x9d,0x14,0x7d,0x5a,0x87,0xf2,0x2f,0xb9,0x07,0xb5,0xa9,0xfc, +0xcf,0xef,0x3e,0x8c,0xff,0x00,0x87,0x86,0xfe,0xd0,0x3f,0xf4,0x3f,0xff,0x00,0xe5, +0x1b,0x4f,0xff,0x00,0xe4,0x7a,0x2b,0xe7,0x3a,0x28,0xfa,0xb5,0x0f,0xe4,0x5f,0x72, +0x0f,0x6b,0x53,0xf9,0x9f,0xde,0x7e,0xba,0xaa,0x66,0xa5,0x58,0xc5,0x2a,0xe2,0xa4, +0x5a,0xf8,0xb3,0xda,0x1b,0xb6,0x9d,0xb6,0x9e,0x16,0x97,0x6d,0x00,0x22,0xad,0x3c, +0x2d,0x28,0x5a,0x78,0x5e,0x29,0x8e,0xc2,0x05,0xa7,0x2a,0xd3,0xd5,0x4d,0x48,0x12, +0x90,0xc6,0x2a,0x66,0xa4,0x58,0xe9,0xc1,0x69,0xea,0x87,0x8a,0x40,0x35,0x53,0x34, +0xe1,0x1d,0x4a,0xb1,0xd3,0xc4,0x7f,0x85,0x00,0x44,0x12,0xa4,0x11,0xf4,0xa9,0x16, +0x33,0xd2,0xa4,0x58,0xcd,0x02,0x22,0x58,0xea,0x51,0x1d,0x48,0xb1,0xd4,0xa2,0x33, +0x40,0x10,0xac,0x78,0xed,0x4f,0xdb,0x52,0xac,0x74,0xe5,0x8e,0x81,0x11,0x2a,0x7b, +0x53,0xbc,0xba,0x9d,0x63,0xa9,0x16,0x3e,0x29,0xa4,0x22,0xba,0xc7,0x4f,0x58,0xea, +0xc0,0x8e,0x9e,0x23,0xa7,0x60,0x2b,0x2c,0x35,0x2a,0xc5,0x8e,0xd5,0x3a,0xc7,0x53, +0x2c,0x27,0x15,0x48,0x46,0x75,0xc5,0xed,0xa5,0x8e,0xcf,0xb4,0xdc,0xc3,0x6d,0xbf, +0xee,0xf9,0xd2,0x2a,0x67,0xe9,0x93,0x52,0x2d,0xfd,0x81,0x60,0xa2,0xf2,0xd8,0xb1, +0xe8,0x3c,0xd5,0xc9,0xfd,0x6b,0xe2,0xcf,0xf8,0x28,0xef,0xc4,0x2f,0x0f,0x5d,0xf8, +0x56,0xcf,0xc1,0xb2,0x79,0x29,0xab,0x43,0x3a,0xde,0xc5,0x7f,0xf6,0x92,0xad,0x6e, +0xc0,0x11,0xb7,0x6a,0xf2,0x43,0x03,0xcf,0x4e,0x82,0xbf,0x33,0xee,0x3c,0x71,0xab, +0x35,0xd3,0x6e,0xd5,0xaf,0x25,0x08,0x4e,0xd9,0x12,0xe6,0x4f,0xcc,0x73,0x49,0xca, +0xcc,0xda,0x14,0xd4,0xa3,0x7b,0xea,0x7f,0x42,0x1e,0x48,0x55,0x53,0x8c,0x06,0xfb, +0xbe,0xff,0x00,0x4f,0x5a,0xe5,0xbc,0x79,0xf1,0x13,0xc3,0xbf,0x0d,0xb4,0xf8,0xaf, +0x3c,0x41,0xa8,0x47,0x64,0x93,0x48,0x22,0x8a,0x3c,0x6e,0x92,0x46,0x3d,0x02,0xa8, +0xe4,0xd7,0xe2,0x2c,0x3f,0x1b,0x3e,0x21,0x59,0x47,0xa5,0x44,0xde,0x2c,0xd7,0xee, +0x05,0xa7,0xcf,0x65,0x1c,0xb7,0x72,0x61,0x7b,0xfc,0xa3,0x3d,0x2b,0xd4,0x7e,0x15, +0x7c,0x55,0xf1,0x17,0x8e,0xbc,0x4f,0x75,0x1f,0x8d,0x75,0x4b,0xad,0x5b,0x56,0xb3, +0x2b,0x3d,0xbc,0x97,0xd2,0x17,0x75,0xcf,0x50,0x09,0xfc,0x2b,0x3a,0x95,0x39,0x22, +0xe4,0x95,0xcd,0xa8,0xe1,0xbd,0xa3,0x49,0xb3,0xf5,0x9b,0x46,0xf8,0x93,0xe1,0x7d, +0x7e,0x44,0x8e,0xcb,0x5a,0xb4,0x96,0x67,0xe1,0x21,0x69,0x02,0xbb,0x1c,0x67,0x01, +0x4f,0x35,0x87,0xf1,0x13,0xe3,0x67,0x87,0x7e,0x1e,0xc6,0xeb,0x2c,0x87,0x52,0xbe, +0x55,0xcf,0xd8,0xed,0x48,0x24,0x7b,0xb3,0x74,0x51,0x5f,0x0d,0xcd,0xaa,0x5a,0x4d, +0xa8,0x5b,0x6a,0x33,0x39,0x37,0x16,0xd9,0xd8,0x53,0x8c,0x13,0xdf,0xeb,0x5d,0x07, +0x86,0xbe,0x20,0xd9,0x5b,0xeb,0x10,0xf9,0xeb,0x1c,0xb1,0x3b,0x61,0xd6,0x51,0xbb, +0x77,0xd6,0xbc,0xc9,0x63,0xa7,0xcb,0x65,0x1d,0x4f,0x5a,0x39,0x65,0x35,0x2e,0x69, +0x4b,0x4e,0xc7,0xd4,0x5f,0x0c,0x7f,0x68,0xff,0x00,0x0e,0xf8,0xce,0x3b,0x85,0xd4, +0xaf,0xed,0x74,0xeb,0xa0,0xca,0x62,0x8d,0x15,0xb6,0x1d,0xc4,0x8d,0x9b,0x89,0xe5, +0xc1,0x03,0x3c,0x01,0xcd,0x7b,0x32,0xa0,0x65,0x56,0x19,0x2a,0xc3,0x22,0xbe,0x1f, +0xf1,0x8c,0x7a,0x4e,0x9f,0x2d,0xbe,0xab,0xa3,0xd8,0xc7,0x14,0x2c,0xde,0x61,0x48, +0x54,0x6d,0xdd,0xeb,0x8a,0xa9,0xe1,0xdf,0x8e,0x9e,0x21,0xd1,0xf5,0x28,0xa3,0xb1, +0xd5,0xef,0xae,0x67,0x6f,0xdd,0x43,0x1d,0xcb,0x79,0xbb,0x41,0x39,0xc0,0x07,0xde, +0x8a,0x58,0xd6,0x95,0xa6,0xae,0x15,0xf2,0xe8,0x49,0xde,0x93,0xb7,0x91,0xf7,0x62, +0xc3,0xd7,0x8a,0x3c,0x9f,0x6a,0xc5,0xf8,0x47,0x6b,0xe2,0x7d,0x5b,0xc3,0x26,0xf7, +0xc4,0xee,0xab,0x73,0x22,0xf9,0x91,0xa8,0x8c,0x2e,0x06,0x3b,0xe2,0xba,0xaf,0x20, +0xfa,0x57,0xa9,0x4e,0xa2,0xaa,0xb9,0xa2,0x78,0x15,0xa9,0x4a,0x8c,0xb9,0x64,0xcc, +0xdf,0x26,0x9a,0xd0,0x8f,0x4a,0xd1,0x36,0xe7,0x39,0xa4,0x68,0x2b,0x53,0x1b,0x99, +0x66,0x11,0xcf,0x14,0xc6,0x80,0x7f,0x91,0x5a,0x86,0x03,0x51,0x34,0x07,0xd2,0x80, +0xb9,0x96,0xd0,0x7b,0x54,0x2f,0x0f,0xb5,0x6b,0x34,0x07,0xbd,0x44,0xd0,0x7b,0x52, +0x28,0xc6,0x92,0xde,0xab,0xc9,0x0d,0x6d,0x3c,0x35,0x5e,0x4b,0x73,0x40,0x18,0xb2, +0x41,0x55,0xde,0x1c,0x56,0xd4,0x96,0xf9,0xed,0x55,0xe4,0xb7,0x3e,0x94,0xc0,0xc7, +0x68,0x6a,0x16,0x8e,0xb5,0x5e,0x03,0xe9,0x50,0xbc,0x26,0x81,0x19,0x6d,0x0d,0x44, +0xd0,0xd6,0x93,0x42,0x6a,0x27,0x88,0xd0,0x33,0x2d,0xa1,0x15,0x13,0x43,0xd7,0xd2, +0xb4,0xda,0x2a,0x89,0xe1,0xfc,0x69,0x58,0x0c,0xb9,0x23,0xf6,0xa8,0x4c,0x7e,0xb5, +0xa7,0x24,0x39,0xeb,0xd2,0xab,0xb4,0x26,0x90,0xcc,0xe6,0x8c,0x76,0xae,0x17,0xe2, +0xe7,0xc2,0xbd,0x3b,0xe2,0xbf,0x84,0xe7,0xd2,0xae,0xc2,0xc5,0x76,0x99,0x92,0xce, +0xf3,0x6e,0x5a,0x09,0x31,0xc1,0xff,0x00,0x74,0xf4,0x23,0xd2,0xbd,0x19,0xa3,0xc5, +0x42,0xd1,0xd3,0x8c,0x9c,0x24,0xa5,0x1d,0xd0,0xda,0x4d,0x59,0x9f,0x95,0xfe,0x26, +0xf0,0xde,0xa1,0xe0,0xfd,0x7a,0xf3,0x47,0xd5,0x6d,0xda,0xda,0xfe,0xd2,0x43,0x1c, +0x91,0x9f,0xd0,0x83,0xdc,0x11,0xc8,0x3e,0xf5,0x99,0x5f,0x77,0xfe,0xd3,0x7f,0x03, +0x47,0xc4,0x8f,0x0f,0x9d,0x67,0x4a,0x80,0x1f,0x12,0x69,0xf1,0x92,0xaa,0xb8,0x06, +0xe6,0x21,0xc9,0x8c,0xfa,0xb0,0xea,0xbf,0x97,0x7a,0xf8,0x45,0x94,0xa3,0x15,0x60, +0x55,0x81,0xc1,0x07,0xa8,0x35,0xf5,0xd8,0x6c,0x42,0xc4,0x43,0x9b,0xaf,0x53,0xc8, +0xab,0x4d,0xd3,0x95,0xba,0x09,0x45,0x14,0x57,0x59,0x88,0x51,0x45,0x14,0x00,0x51, +0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51, +0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51, +0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51, +0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51, +0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51, +0x45,0x14,0x00,0x51,0x45,0x14,0x01,0xfa,0xfc,0xab,0x8a,0x7a,0xad,0x0a,0xbe,0xb5, +0x20,0x5a,0xf8,0x33,0xde,0x11,0x56,0x9d,0xb6,0x9c,0x07,0x7c,0x53,0xc2,0xd0,0x50, +0x8a,0xb4,0xf5,0x5a,0x72,0x25,0x48,0x17,0xd2,0x90,0x08,0xab,0xda,0xa4,0x09,0x4e, +0x55,0xa9,0x04,0x74,0x00,0xc5,0x5a,0x99,0x23,0xe9,0x4a,0xa9,0xd8,0xd4,0xca,0xb4, +0x08,0x60,0x4a,0x72,0xa1,0xfc,0x2a,0x55,0x41,0x52,0x2a,0xd3,0x11,0x1a,0xc7,0x52, +0x04,0xe6,0x9e,0xab,0xda,0xa4,0x58,0xe8,0x10,0xc5,0x8e,0xa4,0x58,0xe9,0xeb,0x1d, +0x4a,0xa9,0x45,0x80,0x89,0x63,0x34,0xef,0x2e,0xa5,0x11,0xd4,0x8b,0x1d,0x30,0x22, +0x58,0xcd,0x48,0xb1,0xd4,0xab,0x1d,0x48,0xb1,0xd3,0x42,0x22,0x11,0x71,0x52,0x2c, +0x35,0x34,0x71,0xd4,0xab,0x18,0xa6,0x22,0x28,0xe1,0xe6,0x8b,0xc8,0xd9,0x2c,0xe5, +0x28,0xeb,0x13,0xed,0x3b,0x5d,0xba,0x03,0x57,0x12,0x1c,0x1a,0xa3,0xe2,0x4b,0x69, +0xe6,0xd0,0xaf,0x16,0xd5,0x55,0xe7,0xf2,0xd8,0xa2,0x49,0xf7,0x5c,0xe3,0xa1,0xfa, +0xd3,0x03,0xf1,0x1f,0xf6,0xd8,0xf1,0xb5,0xd7,0x88,0x3e,0x34,0xeb,0x70,0x5c,0x5b, +0xc7,0x6b,0x71,0x6d,0x2f,0x97,0x22,0xae,0x73,0xb8,0x0c,0x12,0x0f,0xa1,0xfd,0x2b, +0xe7,0x7d,0xdb,0x4e,0x6b,0xd4,0xff,0x00,0x69,0x9b,0xe3,0xa9,0x7c,0x62,0xd7,0xa7, +0xf3,0x64,0x9d,0x4c,0xb8,0x56,0x98,0x7e,0xf3,0x03,0x8c,0x31,0xee,0x47,0x4c,0xd7, +0x95,0x56,0x6f,0x73,0xb5,0x3b,0x25,0x63,0x5f,0xfb,0x77,0x51,0xfb,0x45,0xa6,0xa4, +0xef,0xe6,0xb5,0xb0,0x10,0xc4,0xcc,0x38,0x18,0x1c,0x0c,0x56,0x86,0x8b,0xe3,0x8d, +0x42,0xc7,0xc5,0xb1,0xeb,0x84,0xb4,0xb2,0xaf,0xfa,0xc5,0x53,0xc1,0x4c,0x72,0x2b, +0x9d,0x86,0xe0,0x24,0x32,0x44,0xe9,0xbd,0x5b,0x95,0xe7,0x1b,0x5b,0xd6,0xad,0xe9, +0x5a,0xc1,0xd3,0x63,0xb8,0x4f,0x29,0x65,0xf3,0x57,0x6f,0xce,0xa0,0x81,0x56,0xa3, +0x16,0xb9,0x1b,0xb2,0x34,0x8d,0x47,0x1b,0x45,0x3b,0x2d,0xfe,0x67,0xd0,0x9e,0x16, +0xf8,0xb5,0x17,0x8a,0x14,0xc4,0x14,0xc3,0x28,0x1c,0x82,0x6b,0xa0,0x8f,0x58,0x74, +0x98,0x30,0x6c,0xf3,0x5e,0x3b,0xf0,0xf6,0x6d,0x1b,0x49,0xd2,0x62,0xd4,0x2e,0xee, +0x52,0x09,0x1d,0x8a,0x95,0xc1,0x62,0x5b,0x3d,0x00,0x02,0xbd,0x7b,0x5b,0xf0,0xee, +0xa1,0xa1,0xe8,0x96,0x7a,0xb5,0xd4,0x69,0x0d,0x95,0xdc,0x86,0x28,0x72,0xc0,0x3b, +0x30,0x19,0xfb,0xbd,0x7a,0x1a,0xf0,0x2a,0xc6,0x31,0x9d,0x91,0xf4,0x14,0x65,0x2a, +0x90,0xbb,0x3d,0xbf,0xe0,0xaf,0x8c,0xbf,0xb6,0xb5,0x7b,0x7d,0x02,0xf4,0x89,0x92, +0xe7,0xe5,0x4d,0xdc,0xe0,0xd7,0xd6,0xdf,0x0e,0x7f,0x66,0xbd,0x17,0xc1,0xb7,0xd3, +0xf8,0xcb,0xc4,0xc6,0x34,0xb4,0xb2,0x3e,0x6d,0xba,0xbe,0x02,0x93,0x8e,0x3f,0x5a, +0xf8,0x87,0xf6,0x60,0xb1,0x8a,0xf3,0xe2,0x25,0xb6,0xab,0x7b,0x71,0x1c,0x16,0x1a, +0x77,0xef,0x64,0x79,0x1b,0x1c,0x0a,0xfa,0xf3,0xe2,0x8f,0xed,0x09,0xa3,0x7c,0x63, +0xfb,0x27,0x87,0xb4,0x2b,0xbd,0x9a,0x3d,0xa9,0xdb,0x2a,0xcd,0xfb,0xbf,0xb4,0x30, +0xe9,0x8c,0xf6,0xc8,0xac,0x6d,0x14,0xdc,0x98,0x4b,0x9e,0x56,0x8c,0x7a,0xee,0x7d, +0x35,0xe0,0xff,0x00,0x1b,0x58,0x78,0xd3,0x4c,0xbd,0x82,0xd7,0x62,0x5c,0x40,0x03, +0x18,0x57,0xaa,0xae,0x78,0xab,0x66,0x1a,0xf8,0x87,0xf6,0x79,0xf8,0xb7,0x77,0xf0, +0xb7,0xe2,0xc6,0xb1,0x1f,0x8b,0x44,0xf0,0xad,0xea,0x6c,0x3b,0xc6,0x73,0xd9,0x31, +0xed,0x8c,0x57,0xdc,0x56,0x97,0x96,0xba,0xa5,0xbc,0x77,0x36,0xb2,0x09,0x21,0x91, +0x43,0xa9,0x1c,0xf0,0x6b,0xd6,0xc2,0xd5,0x4d,0x72,0xbd,0xcf,0x03,0x1b,0x87,0x70, +0x97,0x34,0x76,0x22,0xf2,0x29,0xad,0x0d,0x5d,0x68,0x7d,0x29,0x3c,0x93,0x5e,0x81, +0xe5,0x14,0x1a,0x1a,0x63,0x43,0x57,0xcc,0x3e,0xd4,0xc6,0x88,0x50,0x06,0x73,0x43, +0xdb,0xbd,0x42,0xf6,0xfe,0x95,0xa8,0xd0,0xd4,0x4f,0x0d,0x00,0x64,0xbc,0x1d,0x6a, +0x07,0xb7,0xe3,0xad,0x6b,0xbd,0xbe,0x6a,0xbb,0xdb,0xd0,0x06,0x43,0xdb,0xd4,0x12, +0x41,0x5a,0xd2,0x42,0x06,0x4d,0x41,0x24,0x34,0x14,0x64,0xb5,0xbd,0x57,0x92,0xde, +0xb5,0xde,0x1f,0x4a,0x81,0xe0,0xa4,0x33,0x1e,0x4b,0x7a,0x81,0xe1,0xad,0x86,0x80, +0x1a,0xaf,0x25,0xb8,0xa0,0x0c,0x77,0x87,0x9a,0x86,0x48,0xeb,0x5a,0x4b,0x7a,0xab, +0x24,0x1d,0x4d,0x30,0x33,0x1a,0x1e,0x2a,0x17,0x8a,0xb4,0x5e,0x1c,0x54,0x0d,0x1d, +0x00,0x67,0x49,0x0d,0x57,0x68,0xab,0x4d,0xa3,0x15,0x5d,0xe1,0xa8,0x2c,0xce,0x64, +0x22,0xbe,0x31,0xfd,0xae,0xbe,0x08,0xff,0x00,0xc2,0x3f,0x7e,0xde,0x35,0xd1,0xa0, +0xdb,0xa7,0x5d,0xbe,0x35,0x08,0x50,0x60,0x43,0x29,0xe9,0x20,0x1e,0x8d,0xdf,0xdf, +0xeb,0x5f,0x6b,0xc9,0x1d,0x66,0xeb,0x3a,0x2d,0xa6,0xbb,0xa5,0xdd,0x69,0xd7,0xf0, +0x2d,0xcd,0x9d,0xd4,0x6d,0x0c,0xd1,0x38,0xc8,0x65,0x23,0x04,0x57,0x46,0x1e,0xb4, +0xb0,0xf5,0x14,0x91,0x9d,0x4a,0x7e,0xd2,0x36,0x67,0xe5,0x15,0x15,0xde,0x7c,0x69, +0xf8,0x59,0x77,0xf0,0x97,0xc6,0xf7,0x5a,0x4c,0xbb,0xa4,0xb0,0x93,0x33,0x58,0xdc, +0x37,0xfc,0xb5,0x84,0x9e,0x3f,0x11,0xd0,0xfd,0x2b,0x83,0xaf,0xb1,0x8c,0x94,0xe2, +0xa5,0x1d,0x99,0xe3,0x49,0x38,0xbb,0x30,0xa2,0x8a,0x2a,0x84,0x14,0x51,0x45,0x00, +0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00, +0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00, +0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00, +0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00, +0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00, +0x14,0x51,0x45,0x00,0x7e,0xc2,0x85,0xa7,0x85,0xe2,0x85,0x5a,0x91,0x57,0x15,0xf0, +0x67,0xd0,0x08,0xab,0x9a,0x95,0x56,0x95,0x56,0xa4,0x55,0xa0,0x04,0x55,0xa9,0x15, +0x69,0x55,0x6a,0x45,0x53,0xc5,0x20,0x04,0x5c,0xf6,0xa9,0x55,0x73,0x4e,0x55,0x1f, +0x4a,0x78,0x5e,0xc2,0x81,0x08,0xab,0x52,0xaa,0xd2,0xaa,0xf1,0x52,0xaa,0xd3,0xb1, +0x22,0x2a,0xd3,0xc2,0xd3,0x95,0x73,0x52,0xa4,0x74,0xd2,0x01,0x89,0x1d,0x4a,0x13, +0xa5,0x39,0x56,0xa5,0x0b,0xf9,0xd5,0x58,0x57,0x18,0xab,0x52,0xaa,0x53,0xd5,0x2a, +0x45,0x4a,0x41,0x72,0x30,0x94,0xf5,0x8e,0xa4,0x58,0xea,0x65,0x8e,0x90,0x11,0x2a, +0x7b,0x54,0x8b,0x1d,0x4c,0x91,0xd4,0x89,0x15,0x50,0x11,0xac,0x5e,0xd5,0x2a,0xc7, +0x52,0xa2,0x54,0xab,0x1d,0x02,0x18,0xb1,0x8c,0xd6,0x67,0x8b,0xbc,0xd8,0xfc,0x37, +0x7e,0xd0,0x16,0x8e,0x51,0x11,0xda,0xea,0x32,0x54,0xe3,0xae,0x2b,0x6d,0x52,0x9b, +0x79,0x6c,0x6e,0x2d,0x5d,0x11,0xb6,0xb9,0x18,0x52,0x79,0x00,0xfb,0xd0,0x86,0xcf, +0xe7,0xcf,0xf6,0x95,0xb8,0x9e,0xf3,0xe2,0xe6,0xbd,0x3d,0xd4,0x6b,0x15,0xd3,0x4e, +0xc2,0x65,0x51,0x80,0xcc,0x0f,0x2d,0x8f,0x7e,0xb5,0xe5,0x75,0xf7,0x1f,0xfc,0x14, +0x7b,0xe0,0xdd,0xf7,0x87,0x7c,0x6d,0x2f,0x88,0xe4,0xd2,0x85,0xac,0x57,0x2c,0x01, +0xba,0xb7,0x61,0xe5,0x4c,0xc7,0x3d,0xba,0x83,0x81,0xe9,0x5f,0x0f,0x37,0x14,0x9a, +0x3a,0x62,0xee,0xae,0x33,0xa5,0x4d,0xf6,0xc6,0xf3,0xcc,0xa5,0x55,0x89,0x1b,0x48, +0x23,0x8e,0x98,0xa8,0x8d,0x5a,0xd3,0x7e,0xcd,0xe7,0x37,0xda,0x72,0x17,0x1c,0x7d, +0x6a,0x56,0xe6,0xb4,0xee,0xe4,0xa2,0x9d,0x8d,0xbf,0x04,0xeb,0x5a,0x76,0x8d,0xa9, +0x09,0x6f,0xa1,0x7b,0x88,0xd4,0x07,0x55,0x3f,0x74,0x38,0x39,0x1c,0x57,0xa8,0x1f, +0x10,0x5c,0x78,0xdf,0x51,0x4b,0xeb,0xf9,0x5d,0x82,0x80,0x90,0x42,0xae,0x76,0x42, +0xbe,0x80,0x7e,0xa6,0xbc,0x63,0x49,0xb7,0xb7,0xb9,0xd4,0x92,0x39,0x43,0xf9,0x24, +0xf6,0x3f,0x37,0xf2,0xe6,0xbe,0x89,0xf8,0x43,0xfb,0x3b,0xeb,0xba,0x95,0xf7,0x9f, +0xaa,0x5e,0x1d,0x2b,0x49,0x73,0xfb,0x95,0x65,0xcc,0xee,0xa7,0xd1,0x7f,0x87,0xf1, +0xaf,0x37,0x13,0xc9,0x19,0x5d,0xbb,0x33,0xd9,0xc2,0x4a,0xa3,0xa7,0x65,0xb5,0xce, +0x9f,0xc1,0xfa,0x84,0x7e,0x1f,0x60,0x56,0xe8,0xe5,0x86,0x0a,0x03,0xfc,0xeb,0xd6, +0x7c,0x33,0xe3,0x7f,0x0b,0xdd,0x30,0x8b,0x56,0xb2,0x8e,0x43,0xd0,0x49,0x01,0xda, +0xea,0x7f,0x0a,0xdc,0xd2,0xbf,0x63,0xdf,0x0e,0xde,0x69,0x72,0x3c,0x5e,0x20,0xd4, +0xed,0x27,0x61,0xcd,0xd7,0xc9,0x32,0xc7,0xc7,0x56,0x8f,0x68,0x62,0x3f,0xdd,0xaf, +0x31,0xf1,0xa7,0xc2,0x2f,0x13,0x7c,0x1b,0xb8,0x17,0x57,0x3a,0x7d,0x8f,0x8b,0x74, +0x3c,0x87,0x8b,0x50,0xb1,0xdc,0xa2,0x54,0xf5,0x25,0x48,0xc7,0xe2,0x05,0x73,0xd3, +0xc3,0x7d,0x61,0x5e,0x32,0x46,0xd2,0xc4,0x2a,0x6e,0xd2,0x47,0xd5,0x1a,0x3e,0x83, +0xe1,0x3f,0x8a,0x16,0x1a,0x7c,0x16,0xba,0xca,0xb5,0xd5,0xb2,0xec,0x51,0x74,0x71, +0x20,0x5f,0x4c,0x9e,0xb5,0xf4,0xbf,0xc3,0x59,0x8f,0x83,0xaf,0xa1,0xf0,0xdd,0xf2, +0xb4,0x96,0xad,0x6e,0x1e,0xca,0xf0,0xfc,0xc1,0x97,0x18,0x65,0xcf,0xa8,0x35,0xf1, +0x2f,0xc0,0x8d,0x3f,0xe1,0xbf,0xc5,0xa8,0x76,0xd8,0x5d,0x5d,0x78,0x7f,0x5b,0x80, +0x7e,0xfa,0xc2,0x5b,0x96,0x59,0x17,0xfd,0xa5,0x27,0xef,0x0a,0xfb,0x1f,0xe1,0x7f, +0x85,0x75,0x2f,0x0d,0xda,0xdb,0xd9,0x4b,0xac,0xff,0x00,0x6c,0x69,0x6b,0xcc,0x6b, +0x75,0x86,0x91,0x71,0xe8,0xc2,0xaf,0xea,0x95,0xe8,0xbb,0xd8,0xe4,0xa9,0x89,0xa5, +0x51,0x38,0xb6,0x7a,0xf4,0x96,0xe6,0x36,0xda,0x45,0x33,0xcb,0xf6,0xad,0x5f,0x2b, +0xed,0x56,0xb1,0xc8,0x9f,0x39,0x51,0x83,0x8f,0x4a,0xac,0xd0,0xfa,0x8a,0xf5,0xe3, +0x2b,0xad,0x4f,0x9f,0x94,0x6c,0xca,0x26,0x31,0x4c,0x68,0x45,0x5d,0x68,0x69,0x86, +0x23,0xe9,0x57,0x73,0x3e,0x52,0x8b,0x47,0xe9,0x4c,0x68,0xfd,0xaa,0xf7,0x96,0x36, +0xd3,0x1a,0x13,0xe9,0x4c,0x56,0x33,0xcc,0x35,0x0b,0x43,0xed,0x5a,0x4d,0x17,0xb5, +0x42,0xf1,0x9a,0x04,0x66,0x3c,0x3e,0xd5,0x03,0x41,0xed,0x5a,0xad,0x1e,0x6a,0x17, +0x84,0xf7,0x14,0x01,0x93,0x24,0x18,0xea,0x2a,0x06,0x82,0xb5,0x9e,0x1f,0x6a,0x85, +0xe1,0x14,0x01,0x90,0xf0,0xd5,0x79,0x21,0xad,0x79,0x21,0xe3,0xa5,0x57,0x92,0x1f, +0x97,0x81,0x48,0xa3,0x26,0x48,0x39,0xe9,0x55,0xa5,0xb7,0xeb,0xc5,0x6a,0x3c,0x6d, +0xbb,0x81,0x51,0xc9,0x0f,0xad,0x00,0x62,0xc9,0x6f,0xed,0x55,0x64,0x87,0xda,0xb6, +0xa4,0x87,0xb5,0x55,0x92,0x0a,0x2e,0x33,0x1d,0xe1,0xf6,0xa8,0x24,0x8f,0xaf,0x15, +0xab,0x24,0x3e,0xd5,0x56,0x48,0x68,0x03,0x2e,0x48,0xbd,0xb1,0x50,0x34,0x35,0xa7, +0x24,0x7f,0x9d,0x44,0xd1,0x52,0x2a,0xe7,0x8f,0xfe,0xd0,0x5f,0x07,0xe1,0xf8,0xb5, +0xe0,0x79,0xed,0x22,0x45,0x5d,0x6a,0xcf,0x33,0xe9,0xf3,0x11,0xce,0xf0,0x39,0x8f, +0x3e,0x8c,0x38,0xfa,0xe0,0xf6,0xaf,0xce,0x2b,0xab,0x69,0xac,0xae,0x65,0xb7,0xb8, +0x8d,0xa1,0x9e,0x17,0x31,0xc9,0x1b,0x8c,0x32,0xb0,0x38,0x20,0xfb,0xe6,0xbf,0x5d, +0xde,0x2c,0x57,0xc4,0xdf,0xb6,0x87,0xc1,0xbf,0xec,0x2d,0x5a,0x3f,0x1c,0x69,0x70, +0x6d,0xb1,0xbf,0x7f,0x2f,0x51,0x55,0xe9,0x1c,0xff,0x00,0xc2,0xf8,0xf4,0x61,0xc1, +0xf7,0x1e,0xf5,0xed,0x65,0xf8,0x8e,0x57,0xec,0xa5,0xb3,0xd8,0xe2,0xc4,0x53,0xba, +0xe7,0x47,0xcb,0xb4,0x51,0x45,0x7d,0x01,0xe7,0x85,0x14,0x51,0x40,0x05,0x14,0x51, +0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51, +0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51, +0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51, +0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51, +0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51, +0x40,0x1f,0xb1,0xa9,0x1d,0x4a,0x16,0x95,0x56,0xa4,0xdb,0xc5,0x7c,0x19,0xf4,0x03, +0x55,0x6a,0x45,0x5a,0x15,0x4f,0x15,0x2a,0xa5,0x31,0x08,0xa9,0x53,0x2a,0xd0,0xab, +0x53,0x22,0x7a,0x8a,0x56,0x24,0x15,0x6a,0x45,0x4a,0x72,0xa5,0x3d,0x56,0x9d,0x80, +0x45,0x5a,0x95,0x23,0xcd,0x2a,0x47,0xeb,0x53,0xaa,0xe2,0x98,0x86,0x2c,0x75,0x2a, +0xa5,0x39,0x56,0xa4,0x45,0x35,0x42,0x11,0x53,0x8a,0x91,0x63,0xa7,0x05,0xa9,0x15, +0x68,0x10,0x8a,0x99,0xa9,0xa3,0x8b,0xd6,0x9c,0xb1,0xfb,0x54,0xcb,0x1d,0x00,0x46, +0xb1,0xd4,0xcb,0x1d,0x39,0x52,0xa5,0x58,0xe8,0x18,0xc5,0x4a,0x95,0x52,0x9e,0x23, +0xc5,0x48,0xa9,0x48,0x63,0x56,0x3a,0x91,0x53,0x14,0xf5,0x5a,0x91,0x52,0x90,0xc6, +0xaa,0xd4,0x8a,0xbe,0xd4,0xaa,0xbe,0xd5,0x2c,0x69,0xce,0x68,0x03,0xca,0xff,0x00, +0x68,0x0f,0x80,0x3a,0x07,0xc7,0xaf,0x04,0x5d,0xe8,0x9a,0xc5,0xbf,0xef,0xca,0x93, +0x6d,0x74,0xa3,0x2f,0x14,0x98,0x20,0x11,0xf9,0xd7,0xe2,0x27,0xed,0x11,0xfb,0x30, +0x78,0xdb,0xf6,0x79,0xd7,0x3c,0x8f,0x12,0x69,0xb2,0x47,0x61,0x3b,0x91,0x6d,0x7a, +0xa7,0x72,0x48,0xb9,0xe3,0x91,0xd0,0xe0,0x74,0xaf,0xe8,0x55,0x57,0x1e,0xf5,0xc9, +0x7c,0x46,0xf8,0x4b,0xe1,0x8f,0x8b,0x1a,0x1c,0x9a,0x5f,0x89,0xf4,0x98,0x35,0x4b, +0x47,0x04,0x6d,0x98,0x7d,0xdc,0x8c,0x64,0x7a,0x1a,0x57,0xee,0x54,0x65,0x63,0xf9, +0xb4,0xab,0x7a,0x3e,0x8b,0x7b,0xe2,0x0d,0x4a,0x0b,0x0d,0x3a,0xda,0x4b,0xbb,0xb9, +0x9b,0x6a,0x47,0x18,0xc9,0x3f,0xfd,0x6a,0xfd,0x16,0xfd,0xab,0xff,0x00,0xe0,0x99, +0xda,0x37,0x80,0xb4,0x73,0xaf,0xf8,0x3b,0x59,0x8e,0xd6,0x36,0x99,0x51,0xac,0x75, +0x07,0x20,0x10,0x4f,0xf0,0x1e,0xe4,0x0e,0x71,0x5e,0x79,0xe0,0x4f,0x86,0xfa,0x57, +0xc2,0xdd,0x2b,0xc9,0xd3,0x62,0xfb,0x4e,0xa7,0x22,0xe2,0xe3,0x50,0x91,0x7e,0x67, +0xf6,0x1e,0x83,0xda,0xb8,0xf1,0x18,0x88,0xd1,0xd1,0x6a,0xcf,0x4f,0x0d,0x86,0x78, +0x8f,0x7b,0x68,0x9c,0xef,0xc2,0x9f,0x83,0x9a,0x57,0xc3,0x1b,0x38,0xf5,0x2d,0x5d, +0x62,0xbf,0xf1,0x0b,0x0d,0xdb,0xbe,0xf2,0x5b,0xff,0x00,0xb2,0xa0,0xf5,0x3e,0xf5, +0xea,0x5a,0x3f,0x8b,0xe3,0x37,0x05,0xdd,0xd7,0x68,0xf5,0xae,0x2b,0xc4,0x10,0xdf, +0xdc,0x2b,0x15,0xc9,0xf5,0xaf,0x3e,0xd6,0xf5,0xdb,0xbd,0x2d,0x4c,0x23,0x72,0x8e, +0xec,0x2b,0xc8,0x49,0xd4,0x7c,0xd3,0x77,0x67,0xb5,0xa5,0x35,0xcb,0x05,0x64,0x7d, +0x3f,0xa7,0xfc,0x68,0x5d,0x36,0x6f,0xf4,0x79,0x4f,0x1c,0x75,0xac,0x8d,0x4b,0xe2, +0xa5,0xdd,0x8e,0xa1,0x35,0xd5,0x9a,0x9b,0x9d,0x3e,0xe7,0x26,0xf3,0x4f,0xc8,0x2a, +0xf9,0x18,0x66,0x4c,0xfd,0xd6,0xf5,0x1d,0x0d,0x7c,0xe5,0xa2,0xeb,0xdb,0xe4,0xf3, +0x5e,0x46,0x2b,0xdf,0x1c,0xd7,0x61,0xa7,0x78,0xdb,0x4c,0x55,0x11,0xb1,0x6d,0xc3, +0x8c,0x9e,0x2b,0x68,0xc5,0xd3,0x7c,0xd1,0x32,0x76,0xa8,0xb9,0x64,0x8a,0xbf,0x11, +0x34,0x79,0x7c,0x2d,0xaa,0x59,0xf8,0xc7,0xc2,0x17,0x6e,0x9a,0x5b,0xc9,0xe6,0x5b, +0xdc,0x43,0x90,0xd6,0xd2,0x67,0x98,0xdc,0x76,0xe7,0xb1,0xaf,0xac,0x7f,0x66,0xaf, +0xda,0xaa,0xe3,0xc7,0x91,0xc5,0x63,0xaa,0x5b,0x43,0xf6,0xb4,0x40,0x93,0xcd,0x0b, +0xf9,0x4c,0xad,0xd0,0x13,0xd8,0x83,0xfc,0xeb,0xe6,0xdd,0x3f,0x5c,0xd3,0x6c,0xee, +0x26,0x60,0x56,0xe3,0x49,0xbe,0xc2,0x5f,0xd8,0xb7,0x2a,0xe0,0xf1,0xbc,0x7a,0x30, +0xae,0x53,0xc5,0xde,0x13,0x9b,0xe0,0xef,0x88,0x53,0x58,0xd3,0x27,0x92,0xe3,0xc3, +0x5a,0x80,0xf2,0xe4,0xf2,0xc9,0xdd,0x10,0x3c,0x80,0x4f,0xb7,0x04,0x1f,0x6a,0xfa, +0x3c,0x2e,0x22,0x35,0x97,0x2c,0xd1,0xe4,0xd6,0xa5,0xc8,0xec,0xcf,0xd7,0xff,0x00, +0x87,0x7f,0x14,0x2c,0x2e,0xae,0x20,0x84,0x5f,0x8d,0xf2,0x67,0x09,0x70,0x3c,0xb7, +0x24,0x70,0x47,0x3f,0x2b,0xfe,0x04,0x1f,0x6a,0xf6,0x03,0x6b,0x1d,0xec,0x6b,0x34, +0x5d,0x58,0x67,0x8e,0x86,0xbf,0x1c,0x7e,0x13,0xfe,0xd4,0x17,0x5e,0x16,0xb2,0x8f, +0x4a,0xd6,0x22,0x8f,0x5b,0xb5,0x8c,0xe0,0xb4,0xc4,0x93,0x2a,0x93,0x90,0xc4,0xfa, +0x8a,0xfb,0x13,0xe1,0x1f,0xed,0x39,0x6d,0x75,0x24,0x6f,0xa4,0x6b,0x4b,0x1c,0x52, +0x75,0xd2,0x35,0x03,0x95,0x4f,0xf7,0x1f,0x3d,0x2b,0xa2,0x78,0x55,0x2d,0x69,0x33, +0x91,0xc4,0xfa,0xce,0xda,0xfa,0xd2,0xf9,0xe6,0x8e,0x19,0x95,0xa4,0x85,0xca,0x49, +0x1f,0x46,0x46,0xf4,0x22,0xa4,0x2a,0x3b,0x57,0x8f,0xfc,0x44,0xd6,0x34,0xaf,0x89, +0xde,0x11,0xba,0x9e,0xdf,0xed,0x1a,0x3f,0x88,0x61,0x84,0xb4,0x33,0x59,0xc9,0xcc, +0x98,0xe7,0x6a,0xb8,0x3c,0x9f,0x4c,0xf7,0xaa,0x1f,0x03,0xfe,0x2c,0x6b,0x77,0x9a, +0x24,0x1a,0x7f,0x8b,0xa3,0x6b,0xa9,0x90,0x11,0x06,0xb0,0x88,0x50,0x5c,0xc6,0x0e, +0x3e,0x75,0x3f,0x76,0x41,0xdc,0x56,0x1e,0xc6,0x56,0xbd,0xb5,0x46,0x4e,0x0e,0xd7, +0x47,0xb6,0x98,0xfd,0xaa,0x36,0x86,0xac,0x5b,0xcd,0x15,0xe4,0x2b,0x24,0x4e,0xb2, +0x46,0xc3,0x21,0x94,0xd2,0x98,0xeb,0x03,0x32,0x93,0x46,0x41,0xe4,0x53,0x1a,0x31, +0x8a,0xba,0xd1,0xfa,0x8a,0x89,0xa1,0xa7,0x71,0x58,0xa2,0xf0,0xf5,0xe2,0xa0,0x68, +0xc8,0xed,0x5a,0x0c,0xa3,0x27,0x22,0xa3,0x68,0xb8,0xaa,0x22,0xc6,0x7b,0x47,0x50, +0x34,0x35,0xa3,0x24,0x35,0x0b,0x47,0x8a,0x62,0x33,0x9a,0x1a,0x81,0xe1,0x1e,0x95, +0xa6,0xf1,0x03,0xda,0xa1,0x68,0x68,0x03,0x2e,0x48,0x6a,0xac,0x96,0xfd,0x7b,0xd6, +0xc4,0x90,0x8f,0x4a,0xab,0x24,0x14,0x80,0xc8,0x92,0x1f,0x6a,0xaf,0x24,0x35,0xaf, +0x24,0x23,0xd2,0xaa,0xc9,0x0f,0xb5,0x21,0xdc,0xc8,0x96,0x1f,0x6a,0xa7,0x25,0xb9, +0xc7,0x4c,0x56,0xd4,0x90,0x8f,0xc6,0xaa,0xcb,0x0f,0xb5,0x22,0x8c,0x59,0x21,0xa8, +0x1e,0x1f,0x41,0x5a,0xb2,0xc3,0x55,0x9e,0x2c,0x53,0x03,0x39,0xa3,0xac,0x2f,0x17, +0xf8,0x4e,0xc7,0xc6,0x9e,0x1b,0xd4,0x74,0x4d,0x4a,0x21,0x2d,0x95,0xf4,0x2d,0x0c, +0x80,0x8c,0xe3,0x23,0x86,0x1e,0xe0,0xe0,0x8f,0xa5,0x75,0x0d,0x0f,0xad,0x40,0xf1, +0x55,0x27,0x67,0x74,0x23,0xf2,0x5b,0xe2,0x17,0x82,0x6f,0xbe,0x1c,0xf8,0xcb,0x54, +0xf0,0xf6,0xa0,0x3f,0xd2,0x2c,0xa5,0x28,0x24,0xc6,0x04,0x88,0x79,0x47,0x1e,0xc5, +0x48,0x3f,0x8d,0x73,0xd5,0xf7,0x3f,0xed,0xb9,0xf0,0x8f,0xfe,0x12,0x1f,0x0b,0x41, +0xe3,0x3d,0x3e,0x16,0x6d,0x43,0x48,0x5f,0x2a,0xed,0x50,0x64,0xbd,0xb1,0x3f,0x78, +0xff,0x00,0xba,0xc7,0xf2,0x63,0x5f,0x0c,0x57,0xd6,0xe1,0xab,0x7b,0x7a,0x6a,0x5d, +0x7a,0x9e,0x55,0x48,0x72,0x4a,0xc1,0x45,0x2a,0xa9,0x6e,0x00,0x24,0xfb,0x55,0xa8, +0xb4,0x9b,0xb9,0x86,0x56,0x07,0xc7,0xa9,0x18,0x15,0xd6,0x6f,0x87,0xc1,0xe2,0x71, +0x6f,0x97,0x0f,0x4a,0x53,0x7e,0x49,0xbf,0xc8,0xa9,0x45,0x69,0xaf,0x87,0x6f,0x1b, +0x92,0x11,0x7e,0xac,0x29,0xdf,0xf0,0x8d,0xdd,0x7f,0x7a,0x3f,0xfb,0xea,0x9f,0x2b, +0x3d,0xe8,0xf0,0xa6,0x79,0x35,0x75,0x84,0x9f,0xdd,0x6f,0xcc,0xca,0xa2,0xb5,0x1b, +0xc3,0x77,0x63,0xa7,0x96,0xdf,0xf0,0x31,0x50,0x49,0xa3,0xde,0x46,0x09,0x30,0x31, +0x1e,0xab,0xcd,0x16,0x67,0x3d,0x7e,0x1d,0xce,0x30,0xea,0xf5,0x70,0x93,0x4b,0xfc, +0x2f,0xf4,0x29,0x51,0x4e,0x78,0xda,0x33,0x86,0x52,0xa7,0xdc,0x53,0x6a,0x4f,0x9f, +0x94,0x65,0x07,0xcb,0x25,0x66,0x14,0x51,0x45,0x04,0x85,0x14,0x51,0x40,0x05,0x14, +0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14, +0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14, +0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14, +0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x1f,0xb2, +0xe0,0x53,0xc2,0xd2,0xaa,0xd3,0xd5,0x4d,0x7c,0x19,0xef,0x5c,0x15,0x79,0xa9,0x55, +0x68,0x45,0xa9,0x94,0x55,0x08,0x15,0x7d,0xaa,0x65,0x5a,0x45,0x5f,0xca,0xa4,0x0b, +0x40,0x81,0x79,0xa9,0x91,0x7d,0xa8,0x48,0xea,0x65,0x5a,0x60,0x2a,0xad,0x48,0xab, +0xd2,0x85,0x5a,0x95,0x57,0xa5,0x31,0x02,0xa7,0x4a,0x95,0x54,0xfa,0x52,0xaa,0xe6, +0xa6,0x48,0xe8,0x10,0xc5,0x8c,0x9a,0x99,0x63,0xf6,0xa7,0x2a,0xd4,0xca,0x86,0x80, +0x1a,0xab,0xcd,0x4a,0xab,0x4a,0xb1,0x9d,0xd5,0x3a,0xc7,0x9a,0x04,0x31,0x52,0xa5, +0x58,0xcf,0xa5,0x3d,0x52,0x9e,0x17,0xa5,0x26,0x5a,0x1a,0x17,0xda,0xa5,0x55,0xa7, +0x2c,0x75,0x22,0xa5,0x21,0x8c,0x54,0xa9,0x55,0x33,0x4f,0x58,0xea,0x55,0x5e,0x94, +0x80,0x6a,0xc7,0xf8,0xd4,0x8a,0x95,0x4e,0xfb,0x57,0xd3,0xf4,0xa5,0x67,0xbd,0xd4, +0x2d,0x6c,0xd4,0x75,0x37,0x13,0xa2,0x63,0xf3,0x35,0xe4,0xfe,0x3c,0xfd,0xac,0x3c, +0x0b,0xe0,0xb8,0xa6,0x8e,0xde,0xf4,0xeb,0x97,0xe9,0xc0,0x86,0xc8,0x82,0x99,0xf7, +0x7e,0x98,0xfa,0x66,0xb3,0x94,0xe3,0x15,0x79,0x33,0x48,0x53,0x9d,0x47,0x68,0xab, +0x9e,0xca,0x48,0x8d,0x77,0x12,0x00,0x1c,0x92,0x7a,0x0a,0xf3,0x6f,0x1d,0x7e,0xd0, +0xde,0x0b,0xf0,0x0b,0xc9,0x05,0xde,0xa4,0xb7,0xd7,0xca,0x3f,0xe3,0xd2,0xc7,0x12, +0xb7,0xe2,0x73,0x81,0xf9,0xd7,0xc5,0xdf,0x15,0xbf,0x6a,0xdf,0x14,0x78,0xf0,0xcb, +0x0f,0xda,0xce,0x95,0xa5,0xb7,0x0b,0x65,0x68,0xc5,0x41,0x1f,0xed,0x37,0x56,0xaf, +0x27,0xb4,0xd6,0x25,0xbc,0x04,0x9e,0x43,0x1e,0xb5,0xc1,0x3c,0x53,0x7a,0x41,0x1e, +0xad,0x3c,0x02,0x5a,0xd5,0x7f,0x24,0x7b,0x47,0xc6,0xef,0x8c,0x17,0x5f,0x17,0xf5, +0xc8,0xae,0x0c,0x4d,0x63,0xa5,0x5a,0x8d,0xb6,0xf6,0x65,0xf7,0x10,0x4f,0x57,0x27, +0xd4,0xd7,0x95,0xde,0x34,0x56,0xca,0x58,0xed,0x15,0x5e,0x6d,0x65,0x2c,0xe1,0x22, +0x66,0xe0,0x74,0xaf,0x36,0xf1,0x97,0x8f,0x42,0xef,0x8a,0x16,0xc9,0xe9,0xc5,0x70, +0xb8,0xb9,0xc9,0xca,0x5b,0x9e,0xac,0x5a,0x84,0x54,0x20,0xb4,0x46,0xa7,0x89,0x7c, +0x71,0x6d,0x62,0x1d,0x40,0x07,0x8c,0x71,0x5e,0x45,0xaf,0x78,0x89,0xb5,0x07,0x70, +0x91,0x8e,0x7d,0xaa,0xa5,0xf5,0xf4,0xd7,0x93,0x64,0xe5,0x8b,0x54,0x0d,0x68,0xec, +0xad,0xd8,0xd6,0x96,0x51,0x27,0x7d,0xcc,0xdb,0x11,0x26,0x9b,0x75,0xe7,0xac,0xe2, +0x25,0x3c,0xb2,0xd6,0xc4,0x9a,0xd5,0x85,0xc3,0x7c,0xce,0x03,0x1e,0xea,0x2b,0x9a, +0xd4,0xad,0xfc,0xb7,0x23,0x73,0x31,0xef,0x59,0x6d,0x04,0x9b,0x8b,0x20,0xe2,0xb6, +0xb5,0xc9,0xd8,0xef,0x21,0xb8,0x18,0x1e,0x45,0xc8,0x7f,0xf6,0x49,0xaf,0x60,0xd1, +0xb5,0x58,0xfc,0x49,0xe0,0x13,0xa6,0xea,0x29,0xe6,0xa4,0x90,0x18,0xdb,0x77,0x62, +0x38,0x06,0xbe,0x71,0xd3,0xda,0x46,0xc0,0xe4,0x1c,0xf3,0x5e,0xcd,0xe0,0x1f,0x35, +0x7c,0x3a,0xe5,0xb3,0x82,0xcd,0xb7,0x3e,0x98,0x15,0xbd,0x1b,0xc6,0x67,0x26,0x21, +0x29,0x42,0xe7,0x96,0x5c,0xac,0xde,0x1b,0xd4,0xa4,0xb0,0x99,0x8e,0x11,0xbf,0x76, +0xde,0xab,0xed,0x5d,0x8f,0x84,0x3c,0x51,0x3d,0xa6,0xa1,0x6d,0xe5,0x4e,0xe9,0xb5, +0x87,0x43,0x81,0x5a,0x3e,0x3b,0xf0,0x88,0xd7,0x34,0xb5,0x9e,0x01,0xfe,0x95,0x00, +0xca,0x1e,0xec,0x3d,0x2b,0xcd,0xec,0xee,0x8e,0x9d,0x6e,0xd2,0x3e,0x51,0x91,0xb6, +0xe1,0xbb,0x1a,0xf7,0xa9,0xd4,0xe6,0x57,0x38,0x6d,0x73,0xf4,0xa7,0xc2,0x1e,0x22, +0xb9,0xb9,0xf8,0x7b,0x0d,0xdd,0xa3,0x48,0xe1,0x55,0x55,0xcf,0x39,0x0d,0x8e,0x2b, +0xd0,0x7c,0x2d,0xe3,0x0b,0x8f,0x0f,0xf8,0x5d,0x35,0x6d,0x66,0xe9,0xde,0xc1,0xe5, +0x58,0x8f,0x9e,0xdc,0x6f,0x3c,0x0c,0x13,0xde,0xbc,0x2b,0xf6,0x1d,0xf8,0x8b,0x65, +0xe3,0x3d,0x36,0x7d,0x0a,0xed,0xd7,0x39,0xda,0xd1,0x93,0xdb,0x18,0xcd,0x6f,0xfe, +0xdd,0xfa,0x94,0x9e,0x07,0xf8,0x73,0xa4,0x69,0x76,0x83,0xca,0xb7,0x9b,0x53,0x56, +0x40,0xbc,0x00,0x14,0x67,0x15,0xe9,0xca,0xa4,0x5a,0xb3,0x46,0x76,0xe8,0x7d,0x8f, +0xe1,0x5d,0x69,0xa0,0x82,0x3b,0x9b,0x39,0x7c,0xeb,0x76,0xfb,0xf1,0x93,0xfd,0x2b, +0xd1,0xec,0x6f,0x22,0xd4,0x2d,0xc4,0xb1,0x9e,0x3b,0x83,0xd4,0x57,0xc5,0x9f,0x04, +0xfe,0x31,0x37,0xf6,0xd7,0x83,0xb4,0xfb,0x83,0x98,0x75,0xbd,0x21,0x66,0xe4,0xff, +0x00,0x1a,0x92,0xa7,0xff,0x00,0x41,0x15,0xf5,0xae,0x91,0x37,0xd9,0x8a,0x4b,0x19, +0xcc,0x6e,0x01,0xfa,0x8a,0xf2,0xf1,0x14,0xf9,0x59,0x8c,0xa3,0x7d,0x4e,0x91,0x90, +0xfa,0x54,0x6d,0x1f,0x7a,0xb5,0x18,0x59,0x10,0x32,0xb7,0x07,0x91,0x4d,0x64,0xf6, +0xae,0x13,0x02,0x8b,0x47,0x51,0xba,0x1a,0xb7,0x24,0x79,0xa8,0xda,0x3e,0x69,0x81, +0x4c,0xad,0x46,0xd1,0xff,0x00,0x9c,0x55,0xb6,0x4e,0xb5,0x1b,0x21,0xfa,0xd5,0x5c, +0x97,0x12,0x93,0x47,0xe9,0x50,0xb4,0x78,0xea,0x2b,0x41,0x93,0x35,0x13,0x43,0x9e, +0x3a,0xd3,0x20,0xcf,0x78,0xbd,0x2a,0x09,0x23,0x39,0x35,0xa0,0xf1,0x1a,0x85,0xa3, +0xcd,0x30,0x33,0x24,0x87,0xda,0xab,0x49,0x0d,0x6b,0x49,0x17,0x15,0x5e,0x48,0xa9, +0x01,0x8d,0x24,0x35,0x56,0x48,0x4f,0x3c,0x56,0xc4,0xb0,0xf5,0xe2,0xaa,0x4b,0x0d, +0x22,0x93,0x32,0x24,0x8f,0xda,0xaa,0x4b,0x17,0xb5,0x6b,0x49,0x0d,0x57,0x92,0x1a, +0x06,0x64,0x49,0x1f,0x71,0x51,0x14,0x0d,0x49,0xe2,0x8d,0x7b,0x4c,0xf0,0x96,0x93, +0x71,0xa9,0xea,0xf7,0xb0,0xd8,0x58,0xc2,0x32,0xf3,0x4c,0xd8,0x1f,0x41,0xea,0x7d, +0x85,0x7c,0x69,0xf1,0x87,0xf6,0xb9,0xd4,0xfc,0x45,0x24,0xfa,0x6f,0x84,0x7c,0xcd, +0x27,0x4d,0xc9,0x56,0xbd,0x3c,0x4f,0x30,0xf5,0x1f,0xdc,0x1f,0xad,0x75,0xd0,0xc3, +0x54,0xc4,0x3b,0x41,0x69,0xdc,0xfa,0x4c,0x9b,0x87,0xf1,0xd9,0xe5,0x4e,0x5c,0x34, +0x6d,0x15,0xbc,0x9e,0xcb,0xfc,0xdf,0x92,0x3e,0x84,0xf8,0xa5,0xf1,0x63,0xc1,0x9e, +0x0a,0xd3,0x6e,0xec,0x75,0xeb,0xc8,0xee,0xe4,0x9e,0x26,0x89,0xf4,0xd8,0x31,0x24, +0x92,0x2b,0x02,0x08,0x20,0x7d,0xd0,0x47,0xae,0x2b,0xf3,0x82,0xf3,0xc3,0xda,0x62, +0xea,0x77,0x4f,0x69,0xe7,0x1b,0x13,0x2b,0x1b,0x78,0xe6,0x23,0x72,0xc7,0x93,0xb4, +0x31,0x1d,0x4e,0x31,0x9a,0xd1,0xb8,0xb9,0x96,0xee,0x67,0x9a,0x79,0x1a,0x59,0x5c, +0xee,0x67,0x72,0x49,0x27,0xd4,0x9a,0x8a,0xbe,0xa3,0x0d,0x84,0x8e,0x19,0x68,0xee, +0xd9,0xfb,0xa6,0x57,0xc0,0x99,0x56,0x05,0x29,0xe2,0x63,0xed,0xa6,0xba,0xcb,0x6f, +0x94,0x76,0xfb,0xee,0x32,0x1b,0x78,0xad,0xc6,0x22,0x8d,0x63,0xff,0x00,0x74,0x54, +0x99,0xcf,0x5a,0x4a,0x2b,0xb8,0xfd,0x0e,0x9d,0x3a,0x74,0x62,0xa1,0x4a,0x2a,0x29, +0x74,0x4a,0xc8,0x28,0xa2,0x8a,0x0d,0x02,0x8a,0x28,0xa0,0x04,0x91,0x16,0x65,0xc4, +0x8a,0xae,0x3f,0xda,0x19,0xac,0xfb,0x9d,0x02,0xd6,0x7c,0x94,0x06,0x16,0xff,0x00, +0x67,0x91,0xf9,0x56,0x8d,0x14,0x6f,0xb9,0xe4,0xe3,0xf2,0x9c,0x06,0x67,0x1e,0x5c, +0x65,0x18,0xcf,0xd5,0x6b,0xf2,0x7b,0xaf,0x93,0x39,0x6b,0xad,0x06,0xea,0x06,0x01, +0x10,0xce,0x09,0xc0,0xf2,0xc6,0x49,0x27,0xb6,0x2b,0xee,0x0f,0xd9,0x47,0xfe,0x09, +0xbf,0x77,0xe3,0x4b,0x3b,0x4f,0x14,0xfc,0x4e,0xfb,0x46,0x95,0xa4,0xca,0x04,0x96, +0xda,0x1c,0x79,0x8e,0xe2,0x75,0xea,0x1a,0x53,0xd6,0x35,0x3f,0xdd,0xea,0x7d,0xab, +0xd4,0x3f,0x61,0xbf,0xd8,0xee,0x3b,0x3b,0x7b,0x2f,0x88,0xbe,0x37,0xb1,0x0f,0x73, +0x20,0x13,0x69,0x1a,0x5d,0xc2,0xf1,0x1a,0xf5,0x13,0xc8,0xa7,0xb9,0xfe,0x10,0x7e, +0xbe,0x95,0xf7,0x7d,0x7c,0xbe,0x3f,0x30,0xe5,0x93,0xa5,0x41,0xfa,0xbf,0xf2,0x3f, +0x96,0xf8,0x83,0x2c,0xca,0xb0,0x79,0x84,0xa9,0x65,0xb2,0x72,0x8a,0xde,0xfa,0xa4, +0xfb,0x27,0xbb,0x4b,0xcf,0xef,0x67,0x03,0xe1,0xdf,0x80,0x5f,0x0d,0xfc,0x2b,0xa4, +0xc7,0xa6,0xe9,0xbe,0x07,0xd0,0xa1,0xb3,0x41,0x80,0xaf,0x61,0x1c,0x8d,0xf8,0xb3, +0x02,0x4f,0xe7,0x5f,0x09,0xff,0x00,0xc1,0x42,0x3f,0x63,0x1d,0x17,0xc1,0x9a,0x03, +0x7c,0x49,0xf0,0x1e,0x9a,0xba,0x6d,0x94,0x32,0x04,0xd6,0x34,0xcb,0x70,0x7c,0xa8, +0xc3,0x10,0x16,0x74,0x1f,0xc2,0x37,0x10,0x18,0x74,0xe4,0x11,0x5f,0xa5,0x55,0xcd, +0x7c,0x4a,0xf0,0xa4,0x1e,0x3a,0xf8,0x7b,0xe2,0x4f,0x0f,0x5c,0x44,0xb3,0x45,0xa9, +0x69,0xf3,0xdb,0x6d,0x65,0xdd,0xf3,0x32,0x10,0xa7,0x1e,0xa0,0xe0,0x8f,0x71,0x5e, +0x36,0x1f,0x13,0x52,0x8d,0x55,0x3b,0xfa,0x9f,0x3d,0x52,0x94,0x67,0x17,0x1b,0x1f, +0xcf,0xa5,0x15,0x35,0xf5,0xb1,0xb2,0xbd,0xb8,0xb7,0x27,0x26,0x19,0x1a,0x33,0xf8, +0x1c,0x54,0x35,0xf7,0x27,0x80,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51, +0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51, +0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51, +0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51, +0x45,0x00,0x7e,0xcf,0x2a,0xd4,0xca,0xa3,0xf1,0xa6,0x2a,0xfa,0xd4,0xaa,0xb5,0xf0, +0x87,0xba,0x3d,0x57,0x3e,0xd4,0xf0,0xb4,0x22,0xd4,0x8a,0x3d,0xa9,0x88,0x55,0x5e, +0xd5,0x34,0x6b,0xde,0x98,0xa3,0x35,0x3a,0xae,0x31,0x4c,0x07,0x2a,0xd4,0xaa,0x29, +0xaa,0xb5,0x32,0xad,0x31,0x0a,0x8b,0xd2,0xa6,0x51,0x48,0x8b,0x53,0xa2,0x7e,0x34, +0x08,0x11,0x7b,0xd4,0xea,0xbc,0xd0,0x8a,0x2a,0x65,0x5a,0x04,0x22,0xad,0x4a,0x8b, +0x42,0xaf,0xb5,0x4c,0xab,0x40,0x81,0x52,0xa5,0x55,0xa0,0x2d,0x48,0xab,0x9a,0x0a, +0x15,0x56,0xa4,0x55,0xa1,0x56,0xa6,0x55,0xa9,0x2c,0x6a,0xa5,0x4a,0x8b,0xdb,0xa1, +0xaa,0xfa,0x8e,0xa5,0x67,0xa2,0xd8,0xcd,0x79,0x7d,0x71,0x1d,0xa5,0xa4,0x2a,0x5e, +0x49,0xa6,0x60,0xaa,0xa0,0x77,0xc9,0xaf,0x8d,0xbe,0x38,0x7e,0xd8,0x57,0x9a,0xa4, +0xd7,0x3a,0x57,0x84,0x66,0x3a,0x76,0x9a,0xa4,0xa3,0x5f,0x8f,0xf5,0xd3,0x7b,0xaf, +0xf7,0x57,0xf5,0xac,0x2a,0x55,0x8d,0x35,0x79,0x1d,0x14,0x68,0x4e,0xb3,0xb4,0x4f, +0xa0,0xfe,0x2d,0x7e,0xd0,0x7e,0x18,0xf8,0x4f,0x6e,0xd1,0x4d,0x32,0xea,0x7a,0xc1, +0x1f,0xbb,0xd3,0xed,0xdc,0x16,0x1e,0xee,0x7f,0x84,0x7d,0x79,0xaf,0x94,0x3c,0x59, +0xfb,0x55,0x78,0xdb,0xc6,0x57,0x2c,0x90,0xdf,0x9d,0x1e,0xc5,0x8e,0x05,0xbd,0x8f, +0xca,0x71,0xee,0xdd,0x4d,0x78,0x4d,0xe6,0xb9,0x26,0xa5,0x72,0xf2,0xcd,0x23,0x4d, +0x24,0x8d,0xb9,0xa4,0x91,0xb2,0xcc,0x7d,0x49,0x3d,0x6a,0xca,0xea,0x49,0x69,0x6e, +0x1b,0x8f,0x7c,0x57,0x97,0x3a,0xf5,0x2a,0x79,0x23,0xdb,0xa5,0x85,0xa5,0x49,0x6b, +0xab,0x3a,0x5f,0x14,0x5d,0x6a,0x5a,0xc5,0xb9,0x9a,0x4b,0xc9,0xae,0xa5,0x63,0xcb, +0x4b,0x21,0x63,0xfa,0x9a,0xe4,0xbf,0xe1,0x1d,0xd4,0x2e,0x39,0x69,0x42,0xc6,0xa3, +0x3b,0x89,0xe5,0xaa,0x7b,0xab,0xa7,0xba,0xb7,0x32,0xac,0xcf,0x08,0x03,0x82,0xad, +0x58,0x3e,0x19,0xd7,0x2f,0x0d,0xec,0xab,0x35,0xdc,0x8d,0x02,0x9e,0x03,0x73,0x9a, +0xc9,0x45,0x9d,0x3c,0xcb,0xa1,0x66,0xfb,0xc3,0xb7,0x70,0x9d,0xd2,0x82,0x13,0xb5, +0x57,0x1a,0x8a,0xe8,0xf1,0x32,0xb6,0x33,0x5d,0xec,0x3a,0x6e,0xbf,0xe3,0xdb,0xeb, +0x7d,0x23,0xc3,0x5a,0x4d,0xc6,0xb1,0x7f,0x20,0x0a,0x16,0xd6,0x32,0xc1,0x7d,0xd8, +0xf4,0x51,0xee,0x6b,0xd8,0x7c,0x1f,0xff,0x00,0x04,0xe2,0xf1,0x37,0x88,0x1a,0x3b, +0x9f,0x18,0x78,0x8e,0xdb,0x47,0x46,0xe5,0xed,0x2c,0x53,0xcf,0x90,0x7b,0x6e,0xce, +0xd0,0x7f,0x3a,0xda,0x34,0xe4,0xf6,0x33,0x9d,0x48,0x43,0xe2,0x76,0x3e,0x30,0xd7, +0xfc,0x4d,0x35,0xf4,0x86,0x28,0x8b,0x11,0x9e,0x82,0xb3,0xb4,0x9f,0x00,0x6b,0xfe, +0x2c,0xba,0x58,0x34,0xdd,0x2a,0xf3,0x50,0xb9,0x94,0xe1,0x63,0xb6,0x81,0xa4,0x6e, +0x7d,0x80,0xaf,0xd6,0xff,0x00,0x87,0x7f,0xb1,0x0f,0xc2,0xaf,0x00,0xc4,0xac,0x74, +0x31,0xae,0xde,0x77,0xb9,0xd5,0x1b,0xcc,0x3f,0x80,0x18,0x02,0xbd,0xa3,0x43,0xf0, +0x8e,0x8b,0xe1,0x98,0x44,0x3a,0x46,0x95,0x67,0xa6,0xc6,0x3f,0x86,0xd6,0x05,0x8f, +0x3f,0x52,0x06,0x4d,0x74,0x2a,0x2f,0xa9,0xc5,0x2c,0x64,0x57,0xc2,0xae,0x7e,0x6e, +0x7c,0x0d,0xff,0x00,0x82,0x68,0xf8,0x87,0xc4,0x6b,0x0e,0xa1,0xe3,0x8b,0xaf,0xf8, +0x47,0x2c,0x9b,0x0d,0xf6,0x38,0xc0,0x7b,0xa7,0x1e,0x9e,0x89,0xf8,0xf3,0x53,0xfe, +0xd2,0x9f,0xb1,0xb6,0x8d,0xf0,0xab,0x52,0x12,0xe8,0x50,0x33,0x68,0x97,0x91,0x03, +0x0f,0x9c,0x4b,0xbc,0x12,0xa8,0xc3,0x06,0x6e,0xe0,0xf5,0xf6,0xaf,0xd3,0x35,0x8f, +0xd4,0xd7,0x13,0xf1,0x83,0xe1,0xdc,0x5f,0x12,0x3c,0x19,0x79,0xa6,0x64,0x25,0xe2, +0xa9,0x96,0xd6,0x46,0xfe,0x19,0x00,0xe3,0xf0,0x3d,0x2a,0xe5,0x4a,0x3c,0xba,0x23, +0x9e,0x38,0xa9,0xb9,0xa6,0xde,0x87,0xe1,0xa7,0x8c,0x7c,0x26,0xba,0x75,0xeb,0xdb, +0x4d,0x1f,0xd9,0xe7,0xc6,0xe5,0x07,0xee,0xb0,0xf5,0x53,0xde,0xb8,0xf7,0xd1,0xfc, +0x96,0x20,0xae,0x45,0x7d,0x5f,0xf1,0x1f,0xe1,0xd8,0x9b,0x58,0xb9,0xd2,0x75,0x5b, +0x2d,0x97,0xd6,0x92,0x32,0x1b,0x79,0x41,0x47,0x46,0xf6,0xae,0x0a,0xdb,0xe1,0xc6, +0x95,0x6b,0x71,0xb2,0x7b,0x62,0x0e,0x7e,0xec,0x8e,0x4e,0x3f,0x0a,0xe2,0x8c,0x5a, +0xd9,0x9e,0xbb,0xa9,0x16,0xb5,0x47,0x8d,0x68,0x5e,0x18,0x93,0x58,0xbf,0x48,0x2d, +0xd7,0xa9,0xf9,0x9b,0x1c,0x28,0xf5,0x35,0xec,0xd6,0x5a,0x4c,0x3a,0x7e,0x9f,0x05, +0xa2,0x7c,0xa1,0x46,0xde,0x7a,0xfd,0x6a,0xec,0x56,0x96,0x3a,0x7c,0xcf,0x6f,0x61, +0x0c,0x69,0x28,0x1c,0x7c,0xbb,0x57,0x8f,0xe7,0x49,0x6f,0x6d,0x1c,0x71,0xa4,0xb7, +0x73,0xef,0x90,0xb1,0xdd,0xb4,0x75,0x6f,0x40,0x2b,0xd0,0xa7,0x1e,0x55,0x77,0xb9, +0xe6,0xd5,0x93,0x93,0xb7,0x42,0x39,0xec,0xf7,0x43,0xe5,0xc4,0x9b,0x8f,0x4c,0x81, +0x9a,0xf2,0x0f,0x8a,0xde,0x03,0x92,0xd6,0x33,0x76,0xaf,0xe5,0x09,0x1b,0x73,0x0f, +0x46,0xf5,0xaf,0x70,0xbc,0xb9,0x5b,0x1b,0x33,0x20,0x4f,0x27,0x23,0xe5,0x40,0x7e, +0x63,0xfe,0x15,0xc5,0x7c,0x46,0x0b,0x79,0xe0,0xc5,0x24,0x16,0x96,0x49,0x48,0xe3, +0x92,0x78,0xcd,0x74,0xc6,0x4e,0x2e,0xe8,0xc4,0xa7,0xfb,0x11,0xfc,0x40,0x5f,0x02, +0xfc,0x6c,0xb3,0xb6,0xd4,0x10,0x2a,0xde,0x41,0x35,0xb4,0x6a,0x4f,0x0d,0x29,0x42, +0x63,0x20,0xff,0x00,0xbc,0x05,0x7d,0x1d,0xfb,0x65,0x78,0xc9,0x3e,0x25,0x7e,0xcd, +0x7a,0x16,0xb5,0x23,0xc7,0xfd,0xaf,0xa5,0xea,0xe9,0x0d,0xe4,0x28,0x41,0x31,0x92, +0x19,0x79,0xfc,0x47,0xe7,0x5f,0x21,0xf8,0x17,0x4f,0x87,0x52,0xb5,0xbc,0x8a,0xd6, +0x58,0xed,0xf5,0xfd,0x31,0x17,0x53,0xd3,0x65,0x72,0x04,0x86,0x58,0xc8,0x66,0x87, +0xfe,0x04,0xa0,0x90,0x3d,0x40,0xad,0xef,0x89,0x9a,0xbd,0xed,0xae,0x9b,0xe2,0x01, +0xe6,0x37,0xf6,0x57,0x89,0x22,0xb3,0xd5,0x21,0x8b,0x71,0x2a,0xae,0xe7,0x73,0x63, +0xfe,0x06,0x1c,0x57,0xb1,0x0b,0x4a,0x17,0x17,0x99,0xef,0x1f,0x07,0xfc,0x40,0xcb, +0xe3,0x8f,0x85,0x6b,0x23,0x91,0x14,0x3e,0x1b,0x92,0x65,0x66,0xe9,0x9f,0x32,0x5c, +0x9f,0xd2,0xbf,0x40,0xfe,0x0d,0xf8,0xaa,0x4f,0x10,0x78,0x37,0x46,0x92,0xe8,0xfe, +0xfd,0xe2,0x39,0xfc,0xf8,0xaf,0xcb,0x6d,0x36,0xf2,0xf2,0xcb,0xe1,0x0f,0x81,0xbc, +0x5d,0x6a,0x0b,0x1b,0x05,0xbc,0xd1,0x25,0x65,0xfe,0x10,0x58,0x48,0xa0,0xfe,0x12, +0x1a,0xfb,0x63,0xf6,0x4d,0xf8,0x91,0x17,0x89,0x7c,0x17,0xa6,0xaa,0xcb,0xba,0x6b, +0x66,0xf2,0x5c,0x67,0x90,0x7a,0xf4,0xfc,0x6b,0x59,0xc5,0x4e,0x0d,0x75,0x32,0x91, +0xf6,0x86,0x95,0x28,0x3f,0xbb,0x6e,0x06,0x32,0xb5,0x7d,0x97,0xd7,0x91,0x58,0xb6, +0xb2,0x6e,0x8e,0x19,0x14,0xe3,0x35,0xb9,0x1b,0x09,0x23,0x0d,0x8a,0xf0,0xe4,0x73, +0xc9,0x10,0xc9,0x1e,0x3e,0x95,0x13,0x2d,0x5c,0x61,0xf8,0x8e,0xf5,0x1b,0x47,0xe9, +0xc5,0x23,0x22,0x93,0x27,0xa5,0x46,0xc9,0x57,0x19,0x7a,0xf6,0x35,0x19,0x5e,0xa3, +0x1c,0x55,0x0c,0xa6,0xd1,0xd4,0x4c,0xb8,0xab,0x8d,0x1f,0x5a,0x89,0x90,0x50,0x05, +0x46,0x8f,0xbd,0x40,0xf1,0xf5,0xab,0xac,0xbb,0x6a,0x36,0x51,0xcd,0x55,0xc8,0x68, +0xa0,0xc9,0x50,0x49,0x1f,0x15,0x7e,0x48,0xfd,0xaa,0x07,0x8f,0x1d,0xa9,0x92,0x67, +0x49,0x1d,0x54,0x96,0x1d,0xbc,0xd6,0xa4,0x91,0xe2,0xab,0x48,0x83,0xd2,0x80,0x32, +0xa4,0x86,0xb8,0x7f,0x89,0xff,0x00,0x12,0x74,0x2f,0x85,0x7e,0x1d,0x97,0x57,0xd6, +0xee,0x84,0x6b,0x82,0x20,0xb7,0x53,0xfb,0xcb,0x87,0xc7,0x08,0x83,0xd7,0xdf,0xa0, +0xae,0x8f,0xe2,0x1f,0x8d,0xb4,0x9f,0x86,0xde,0x15,0xbe,0xf1,0x06,0xb3,0x3f,0x93, +0x65,0x6a,0x99,0xc7,0xf1,0x48,0xc7,0x85,0x45,0x1d,0xd8,0x9e,0x05,0x7e,0x60,0xfc, +0x60,0xf8,0xbd,0xac,0xfc,0x62,0xf1,0x64,0xda,0xb6,0xa9,0x21,0x8e,0xdd,0x49,0x4b, +0x3b,0x25,0x3f,0xbb,0xb6,0x8f,0x3c,0x28,0xf5,0x3d,0x32,0x7b,0x9f,0xc0,0x57,0xa3, +0x83,0xc2,0x3c,0x44,0xae,0xfe,0x14,0x7d,0xe7,0x0a,0xf0,0xcd,0x4c,0xfa,0xb7,0xb4, +0xab,0xee,0xd1,0x8e,0xef,0xbb,0xfe,0x55,0xfa,0xbe,0x88,0x9f,0xe2,0xf7,0xc6,0xad, +0x7b,0xe3,0x06,0xb6,0xd7,0x5a,0x8c,0xbf,0x67,0xb0,0x8d,0x8f,0xd9,0x74,0xf8,0x89, +0xf2,0xe1,0x5f,0xfd,0x99,0xbd,0x58,0xd7,0x9f,0x51,0x52,0xda,0xda,0xcb,0x7d,0x75, +0x0d,0xb4,0x11,0x99,0x67,0x99,0xd6,0x38,0xe3,0x5e,0xac,0xc4,0xe0,0x01,0xf5,0x26, +0xbe,0xb2,0x31,0x8d,0x38,0xf2,0xc5,0x59,0x23,0xfa,0x73,0x0f,0x86,0xa3,0x82,0xa3, +0x1a,0x14,0x22,0xa3,0x08,0xec,0x91,0x15,0x15,0xfa,0x15,0xf0,0x7f,0xfe,0x09,0xa3, +0xa4,0xff,0x00,0x63,0xda,0x6a,0x1f,0x10,0x75,0x8b,0xab,0x8b,0xf9,0x91,0x64,0x6d, +0x2f,0x4d,0x61,0x1c,0x51,0x64,0x67,0x6b,0x48,0x41,0x66,0x3f,0x4d,0xbf,0x8d,0x7a, +0xff,0x00,0xfc,0x3b,0xef,0xe0,0x9f,0x91,0xb3,0xfe,0x11,0xcb,0xbd,0xfb,0x71,0xe6, +0x7f,0x6a,0x5c,0xee,0xcf,0xaf,0xdf,0xc7,0xe9,0x5e,0x54,0xf3,0x5c,0x3c,0x25,0x65, +0x77,0xe8,0x7c,0x36,0x27,0x8e,0xb2,0x8c,0x3d,0x47,0x4e,0x2e,0x53,0xb7,0x58,0xad, +0x3f,0x16,0x8f,0xc9,0x6a,0x2b,0xf4,0xdf,0xc4,0xdf,0xf0,0x4c,0xdf,0x87,0x3a,0xa2, +0xbb,0x68,0xfa,0xbe,0xb7,0xa2,0xcb,0xfc,0x0b,0xe6,0xa4,0xf1,0x8f,0xa8,0x75,0xdc, +0x7f,0xef,0xaa,0xf0,0x8f,0x1f,0xff,0x00,0xc1,0x34,0x7c,0x7d,0xe1,0xf5,0x92,0x7f, +0x0c,0xea,0xfa,0x6f,0x8a,0x20,0x51,0x91,0x0b,0xe6,0xd2,0xe0,0xfb,0x00,0xc4,0xa1, +0xfc,0x5c,0x56,0xb4,0xf3,0x2c,0x35,0x4d,0x39,0xad,0xea,0x77,0x61,0x38,0xcb,0x26, +0xc5,0xbe,0x5f,0x6b,0xc8,0xff,0x00,0xbc,0xad,0xf8,0xed,0xf8,0x9f,0x1f,0xd1,0x5d, +0x1f,0x8d,0x3e,0x1c,0xf8,0xa3,0xe1,0xcd,0xff,0x00,0xd8,0xfc,0x4d,0xa0,0x5f,0xe8, +0x93,0xe7,0x0a,0x2f,0x20,0x64,0x57,0xff,0x00,0x71,0xbe,0xeb,0x0f,0x75,0x26,0xb9, +0xca,0xf4,0xa3,0x25,0x25,0x74,0xcf,0xb1,0xa7,0x52,0x15,0x62,0xa7,0x4d,0xa6,0x9f, +0x55,0xaa,0x0a,0x28,0xa2,0x99,0xa0,0x57,0xd6,0xdf,0xb0,0xaf,0xec,0xb7,0xff,0x00, +0x0b,0x53,0xc4,0x43,0xc6,0x7e,0x25,0xb4,0x2d,0xe1,0x4d,0x2e,0x51,0xf6,0x78,0x64, +0x1f,0x2d,0xf5,0xc0,0xe7,0x6e,0x3b,0xa2,0xf0,0x4f,0xa9,0xc0,0xf5,0xaf,0x0b,0xf8, +0x0f,0xf0,0x77,0x53,0xf8,0xe5,0xf1,0x23,0x4d,0xf0,0xc6,0x9d,0x98,0xe3,0x90,0xf9, +0xb7,0x97,0x5b,0x72,0xb6,0xf6,0xeb,0xf7,0xdc,0xfe,0x1c,0x0f,0x52,0x40,0xaf,0xd9, +0xbf,0x06,0xf8,0x47,0x4b,0xf0,0x17,0x85,0xf4,0xdf,0x0f,0xe8,0xb6,0xcb,0x69,0xa6, +0x69,0xf0,0xac,0x10,0x44,0xbe,0x83,0xb9,0xf5,0x24,0xe4,0x93,0xdc,0x93,0x5e,0x1e, +0x67,0x8c,0xf6,0x31,0xf6,0x50,0x7e,0xf3,0xfc,0x11,0xf9,0x97,0x1a,0x71,0x0b,0xcb, +0x68,0x7d,0x4b,0x0d,0x2f,0xde,0xcd,0x6a,0xff,0x00,0x96,0x3f,0xe6,0xfa,0x7c,0xdf, +0x63,0x61,0x54,0x22,0x85,0x50,0x15,0x40,0xc0,0x00,0x70,0x29,0x68,0xa2,0xbe,0x38, +0xfe,0x77,0x0a,0x64,0xb2,0x2c,0x31,0xbc,0x8e,0x76,0xa2,0x02,0xcc,0xde,0x80,0x53, +0xeb,0x85,0xf8,0xe9,0xe2,0xa8,0x7c,0x13,0xf0,0x77,0xc6,0x3a,0xd4,0xf2,0x79,0x4b, +0x6d,0xa6,0x4e,0x11,0x87,0x69,0x1d,0x4a,0x27,0xfe,0x3c,0xcb,0x55,0x18,0xb9,0x49, +0x45,0x75,0x35,0xa5,0x4a,0x75,0xaa,0x46,0x94,0x15,0xdc,0x9a,0x4b,0xd5,0x9f,0x83, +0x3e,0x22,0x71,0x27,0x88,0x35,0x36,0x5e,0x55,0xae,0xa5,0x23,0xfe,0xfb,0x35,0x9f, +0x57,0x75,0x6b,0x39,0x2d,0x6e,0xdc,0xb9,0xdc,0x24,0x25,0x83,0xfa,0xe6,0xa9,0x57, +0xe8,0x76,0xb6,0x87,0x83,0x8c,0xc2,0x57,0xc0,0xe2,0x27,0x86,0xc4,0xc7,0x96,0x71, +0x76,0x6b,0xfa,0xfc,0x02,0x8a,0x28,0xa0,0xe3,0x0a,0x28,0xa2,0x80,0x0a,0x28,0xa2, +0x80,0x0a,0x28,0xa2,0x80,0x0a,0xd0,0xd1,0xfc,0x3f,0xa8,0x6b,0xdf,0x6b,0xfb,0x05, +0xb1,0xb8,0xfb,0x2c,0x2d,0x71,0x36,0x19,0x57,0x64,0x63,0xab,0x72,0x46,0x7f,0x0a, +0xab,0x6f,0x0c,0x52,0xc7,0x39,0x92,0xe1,0x61,0x64,0x4d,0xc8,0xa5,0x49,0xf3,0x1b, +0x23,0xe5,0x18,0xe9,0xeb,0x93,0xe9,0x5a,0xba,0x36,0x9f,0xac,0xf8,0xb3,0x56,0xfb, +0x36,0x91,0x6a,0xef,0x73,0x24,0x42,0x17,0x8e,0xcd,0x7c,0xb5,0xd9,0x80,0x3e,0x7c, +0x71,0x83,0x8e,0x49,0xe0,0xd5,0xc6,0x37,0x69,0x5a,0xe7,0x3d,0x6a,0x8e,0x11,0x6d, +0x34,0xad,0xd5,0xec,0xbf,0x2f,0xcc,0xce,0x1a,0x7b,0xb4,0x76,0x8e,0x25,0x80,0xfd, +0xa5,0x8a,0xaa,0xf9,0x83,0x29,0x83,0x8c,0xbf,0xf7,0x47,0xd6,0x92,0xe3,0x4f,0x9e, +0xde,0x5b,0xa4,0xdb,0xe6,0x8b,0x66,0xdb,0x2c,0x90,0x9d,0xe8,0x39,0xc6,0x77,0x0e, +0x30,0x4f,0x43,0x5e,0x9d,0x0f,0xec,0xd9,0xe2,0xa9,0x21,0xde,0xd3,0xe9,0xd1,0x3e, +0x3f,0xd5,0xb4,0xcc,0x4f,0xe6,0x17,0x1f,0xad,0x71,0x9e,0x2a,0xf0,0x3f,0x88,0x3c, +0x08,0xcd,0x0e,0xa5,0x6f,0x25,0xbc,0x13,0x60,0x79,0xb1,0x3e,0xe8,0x65,0xc1,0xe0, +0x64,0x70,0x7e,0x86,0xb6,0x9e,0x1e,0xa5,0x35,0xcd,0x28,0xb4,0x8e,0x1a,0x19,0x96, +0x17,0x13,0x3f,0x67,0x46,0xb4,0x64,0xfb,0x7f,0x5e,0x47,0x37,0x45,0x5e,0x9a,0x21, +0xa8,0x47,0x35,0xd4,0x10,0x43,0x6b,0x0c,0x09,0x1a,0xbc,0x62,0x4e,0x49,0x3c,0x6e, +0x00,0x9c,0x92,0x48,0xc9,0xc7,0x4a,0xa3,0x5c,0xe7,0xa9,0x19,0x73,0x05,0x14,0x51, +0x48,0xa0,0xa2,0x8a,0x28,0x00,0xa2,0x8a,0x28,0x00,0xa2,0x8a,0x28,0x00,0xa2,0x8a, +0x28,0x00,0xa2,0x8a,0x28,0x00,0xa2,0x8a,0x28,0x00,0xa2,0x8a,0x28,0x03,0xf6,0x95, +0x57,0x8e,0x6a,0x45,0xfa,0x50,0xa0,0x54,0x8a,0xb9,0xed,0x5f,0x0a,0x7b,0xa3,0x92, +0xa4,0x03,0x34,0x8b,0x52,0x22,0xd0,0x21,0xd1,0xad,0x4c,0xab,0xd2,0x9a,0xa2,0xa5, +0x51,0x54,0x21,0xca,0xbc,0x8a,0x9a,0x35,0x3c,0x53,0x23,0x5c,0xd4,0xf1,0xaf,0x14, +0x08,0x7a,0x29,0xec,0x73,0x56,0x11,0x6a,0x38,0xd7,0x15,0x3c,0x6b,0x40,0x87,0xaa, +0xd1,0x3c,0xc9,0x6b,0x0c,0x93,0x4d,0x22,0xc5,0x0c,0x6a,0x5d,0xe4,0x73,0x80,0xaa, +0x39,0x24,0xfb,0x54,0x88,0xb4,0xdb,0xcb,0x08,0xb5,0x2b,0x49,0xed,0x2e,0x23,0x12, +0xdb,0x5c,0x46,0xd1,0x4a,0x87,0xa3,0x2b,0x02,0x08,0xfc,0xa8,0x11,0xc8,0xf8,0x6f, +0xe3,0x6f,0x80,0x7c,0x53,0x74,0xf6,0xda,0x5f,0x8b,0xf4,0x9b,0xcb,0x95,0x38,0x30, +0xac,0xe0,0x36,0x7d,0xb3,0xd6,0xbb,0x49,0x75,0x1b,0x3b,0x78,0x44,0xd2,0xdd,0xc1, +0x14,0x5f,0xdf,0x69,0x14,0x0f,0xcf,0x35,0xf1,0x17,0xc4,0x4f,0xf8,0x27,0x36,0xa1, +0xff,0x00,0x09,0x01,0xd4,0x3e,0x1f,0x78,0x96,0x3d,0x3e,0xdd,0xb2,0xc2,0xdf,0x50, +0x2c,0xaf,0x11,0x3d,0x83,0xaf,0x51,0xf5,0x15,0xe2,0x3f,0xb4,0x77,0xc3,0x7f,0x8b, +0x9f,0x05,0xf4,0x7d,0x22,0x4f,0x15,0xf8,0x82,0xdf,0x50,0xb0,0x9d,0xbc,0x9b,0x76, +0xb1,0xbb,0x66,0x21,0x94,0x77,0x43,0x83,0xd3,0xbd,0x72,0xfb,0x4a,0x91,0xf8,0x91, +0xeb,0xac,0x2d,0x0a,0x96,0xf6,0x73,0xf9,0x1f,0xaa,0x96,0xb7,0x10,0xde,0x46,0x1e, +0x09,0xe3,0x99,0x31,0xd6,0x27,0x0c,0x3f,0x4a,0xb2,0xab,0xf8,0x57,0xe3,0x07,0x80, +0xbf,0x69,0x3f,0x19,0x78,0x0e,0xe9,0x1a,0xcf,0x58,0xba,0x11,0x64,0x65,0x44,0xad, +0xd2,0xbf,0x40,0x3e,0x06,0xfe,0xd3,0x57,0xfe,0x3c,0xf0,0x4d,0xd5,0xee,0x23,0xd4, +0x6f,0x60,0x5c,0x88,0xe4,0x7d,0xac,0x0e,0x3b,0xe0,0x73,0x42,0xac,0xbe,0xd1,0x13, +0xc1,0xc9,0x7c,0x0e,0xe7,0xd4,0x6a,0x06,0xdc,0xe7,0x00,0x75,0xaf,0x29,0xf8,0x9f, +0xfb,0x4b,0x78,0x4f,0xe1,0xbc,0x72,0xdb,0xa5,0xd2,0xeb,0x3a,0xb2,0x83,0x8b,0x3b, +0x46,0x05,0x54,0xfa,0x3b,0xf4,0x5f,0xd4,0xd7,0xc8,0xbf,0x16,0xff,0x00,0x69,0xff, +0x00,0x1a,0xea,0x9a,0xa4,0xda,0x3d,0xce,0xa6,0xda,0x65,0xb3,0x92,0xbe,0x4d,0x80, +0xf2,0xc1,0x07,0x8e,0x4f,0x52,0x2b,0xc4,0xaf,0x2f,0xae,0x6e,0xe4,0x62,0x8c,0xcf, +0xcf,0x39,0x07,0x9f,0x7a,0xe7,0xa9,0x88,0x7b,0x41,0x1d,0x14,0xb0,0x4b,0x7a,0x8f, +0xe4,0x8f,0x57,0xf8,0xbd,0xfb,0x44,0x78,0x8f,0xe2,0x94,0xee,0x97,0xb7,0x5f,0x64, +0xb0,0x43,0x98,0xf4,0xfb,0x72,0x44,0x43,0xdc,0xff,0x00,0x78,0xfb,0x9a,0xf1,0x5b, +0xf9,0x25,0xbf,0xc9,0x05,0xb3,0xd4,0x71,0x57,0x23,0x57,0x59,0x36,0xc8,0x54,0xd5, +0x94,0x31,0x43,0x9d,0xc6,0xb8,0xec,0xdb,0xbc,0x9e,0xa7,0xa4,0xad,0x15,0xcb,0x15, +0x64,0x62,0x41,0x0d,0xd5,0xbf,0xfa,0xd0,0x76,0xe3,0x8a,0xab,0x71,0x7d,0x35,0xbe, +0x7c,0xc6,0x25,0x4f,0x45,0xf5,0xae,0xbe,0xc6,0xce,0xf7,0xc4,0xd7,0xcb,0x67,0xa4, +0xe9,0xb7,0x3a,0x9d,0xc3,0x7d,0xd8,0x6d,0x62,0x2e,0xc4,0xfe,0x02,0xbd,0xc3,0xe1, +0x7f,0xec,0x03,0xe3,0x3f,0x19,0x5d,0x45,0x7f,0xe2,0xe9,0x17,0xc3,0x1a,0x6b,0x7c, +0xc6,0x16,0xc4,0xb7,0x44,0x7a,0x05,0x07,0x0b,0xf8,0x9a,0xd2,0x31,0x72,0xd9,0x19, +0xca,0x51,0x86,0xb2,0x67,0xce,0x3a,0x4c,0xda,0x8e,0xbc,0xab,0x69,0x67,0x6b,0x3d, +0xdd,0xcc,0xa7,0x64,0x76,0xf6,0xe8,0x5d,0xd8,0xfa,0x00,0x2b,0xe9,0x6f,0x83,0xdf, +0xb0,0x3f,0x8c,0x7c,0x4a,0x96,0xd7,0xbe,0x2b,0xb8,0x5f,0x0b,0xe9,0xcc,0x44,0x86, +0xdc,0x81,0x25,0xdb,0x8f,0x4d,0xb9,0xc2,0x7e,0x3f,0x95,0x7d,0x9f,0xf0,0x97,0xf6, +0x7b,0xf0,0x67,0xc1,0xcb,0x54,0x4d,0x03,0x4a,0x43,0x7b,0x8c,0x3e,0xa3,0x74,0x03, +0xdc,0x37,0xaf,0xcd,0xd8,0x7b,0x0a,0xf4,0xdc,0x57,0x4c,0x68,0xff,0x00,0x31,0xc1, +0x53,0x16,0xf6,0xa6,0x73,0x9e,0x07,0xf0,0x06,0x85,0xf0,0xfb,0x47,0x87,0x4c,0xd0, +0x74,0xe8,0x6c,0x2d,0xd1,0x42,0x92,0x88,0x37,0xc9,0x81,0xd5,0x9b,0xa9,0x35,0xd3, +0x2c,0x61,0x45,0x0a,0xb8,0xed,0x4f,0xad,0xfd,0x0f,0x3d,0xb6,0xdd,0xd8,0x52,0x81, +0x4b,0xb7,0x14,0xb4,0x12,0x14,0x8c,0xa1,0xba,0xd2,0xed,0xcd,0x2a,0xae,0x05,0x02, +0x3e,0x61,0xfd,0xaf,0x3e,0x08,0xc5,0xe2,0x3d,0x30,0xf8,0xbb,0x4e,0xb6,0xcd,0xfd, +0x98,0xff,0x00,0x4b,0x11,0x8f,0x99,0xd0,0x74,0x7f,0x7c,0x7f,0x2a,0xf8,0xb6,0xfb, +0x49,0xfe,0xd8,0xb4,0x93,0x68,0xce,0xa1,0x07,0x29,0xff,0x00,0x4d,0x07,0xa6,0x7b, +0xd7,0xeb,0x6d,0xc5,0xbc,0x77,0x10,0xc9,0x1c,0x88,0xb2,0x47,0x22,0x95,0x64,0x61, +0x90,0xc0,0x8c,0x10,0x6b,0xf3,0xa7,0xf6,0x9c,0xf8,0x7b,0xa7,0x7c,0x31,0xf8,0x8f, +0x22,0xf8,0x7a,0xe5,0x65,0xb7,0xb8,0x4f,0xb4,0xc9,0xa7,0x7f,0x15,0xb6,0x79,0xc0, +0xf6,0xee,0x2b,0x9a,0xa4,0x79,0x5f,0x32,0x3d,0x3c,0x3d,0x4e,0x65,0xec,0xd9,0xf3, +0x33,0x58,0xcd,0x04,0xd2,0x19,0xa3,0x64,0x7d,0xd9,0x24,0x8e,0x45,0x6f,0x7d,0x8e, +0x3b,0xa8,0x96,0xf9,0x54,0xb3,0x42,0xa4,0xb2,0xa8,0xcf,0x38,0xe0,0x81,0x5b,0x77, +0xcd,0x6b,0xe2,0x28,0x0b,0x46,0xcb,0x15,0xd8,0x19,0x21,0xbb,0xfd,0x6b,0x9a,0x8e, +0xfc,0xf8,0x6e,0x59,0xde,0xf9,0xbc,0x8b,0x4d,0x84,0x48,0xf9,0xc8,0x5f,0x7a,0xa8, +0xca,0xfa,0xa3,0x59,0x46,0xda,0x32,0x8d,0xdd,0x94,0x76,0x91,0xc9,0xab,0x6b,0xac, +0x22,0xb1,0xb7,0x8c,0xb0,0x56,0xe3,0x27,0xb0,0xc7,0x7a,0xf9,0xcf,0xe2,0x57,0xc5, +0x69,0xfc,0x45,0x34,0xb6,0x56,0x8a,0xd6,0x76,0x71,0xc8,0x4a,0x88,0xc6,0x1d,0x87, +0xa9,0xf4,0xe2,0xba,0x5f,0x1c,0x78,0xce,0xe3,0xc5,0xcd,0x74,0x91,0xdc,0x4c,0xba, +0x6c,0x4f,0xfb,0xb8,0x5d,0xc9,0x66,0xff,0x00,0x68,0xd7,0x94,0x4f,0x6e,0xf1,0xac, +0xe7,0x62,0xef,0x2c,0x07,0x0d,0x9e,0x49,0xf5,0xaf,0x5e,0x95,0x3d,0x2e,0xce,0x56, +0xac,0x6b,0xfc,0x28,0xf1,0x32,0x78,0x3b,0xc7,0x9a,0x36,0xad,0x26,0x64,0xb5,0x6b, +0x85,0xf3,0x7c,0xc1,0xd5,0x73,0xcf,0xe8,0x4d,0x7b,0x3f,0xed,0x1b,0xa5,0xcb,0xa2, +0xe9,0x5e,0x1e,0xb3,0x2a,0xbf,0x64,0x82,0x5b,0xab,0x6b,0x67,0x53,0xf7,0xa0,0x32, +0xf9,0xd1,0x7e,0x4b,0x2f,0x1e,0xd5,0xe0,0x29,0x02,0x19,0xa6,0xb1,0x91,0x82,0xc9, +0xc3,0xc4,0xde,0x87,0x1c,0x8a,0xf7,0x9f,0x88,0xfa,0xb7,0xfc,0x25,0xbf,0xb3,0xef, +0xc3,0xed,0x45,0xc0,0x7b,0xeb,0x1b,0xbb,0xad,0x2e,0xe6,0x4c,0xfc,0xc4,0xaa,0x23, +0x21,0x6f,0xf8,0x01,0x03,0xe8,0x05,0x76,0x43,0x44,0xd0,0x23,0xd4,0x7f,0x67,0x5d, +0x5b,0x49,0xbf,0xf8,0x4b,0xa4,0xf8,0x3b,0x57,0x8d,0x26,0x5d,0x6f,0xc4,0xbb,0x62, +0x53,0xd5,0x71,0x12,0x0c,0x8f,0xcc,0x57,0xa1,0xfe,0xc6,0x70,0xdc,0xe9,0x5f,0x1f, +0xf5,0xaf,0x0b,0x21,0x65,0xb0,0xb2,0x37,0x37,0x2f,0x1b,0x7a,0x29,0xc2,0xfe,0x95, +0xf3,0xb7,0xec,0xb1,0x05,0xe7,0x88,0xbe,0x36,0x78,0x2b,0x4c,0x88,0x3c,0xb6,0xf6, +0x37,0xa2,0x7d,0x83,0xa0,0x6e,0x09,0x6f,0xc8,0x0a,0xfa,0xb7,0xf6,0x72,0xd4,0x21, +0xba,0xfd,0xb7,0x3e,0x22,0xc3,0x6c,0x8a,0x91,0x4b,0x15,0xcc,0x11,0x05,0x1d,0x94, +0x2f,0x3f,0x89,0xcd,0x6b,0x29,0x69,0xa1,0x12,0xea,0x7d,0xf7,0xe1,0x1b,0xe1,0xa9, +0xe9,0x71,0x1c,0x8f,0x31,0x57,0x24,0x57,0x49,0x63,0x78,0xb2,0x5d,0x5c,0x5a,0x83, +0xf3,0xc4,0x15,0xbf,0x02,0x2b,0xc7,0xbe,0x0c,0xf8,0xa2,0x3d,0x6b,0x5a,0xd5,0x6d, +0x51,0xf3,0xf6,0x76,0x29,0x8c,0xff,0x00,0x9f,0x4a,0xeb,0xac,0x75,0x95,0xb3,0xf8, +0xd9,0x71,0xa4,0x48,0xe5,0x7e,0xdb,0xa3,0xa5,0xc4,0x4a,0x7b,0xec,0x7d,0xad,0xfc, +0xc5,0x79,0xb5,0x69,0xf2,0xce,0x4b,0xe6,0x60,0xd1,0xe8,0x24,0x7a,0x52,0x63,0x77, +0xb1,0xa9,0x19,0x48,0xe2,0x99,0x81,0xde,0xb8,0xcc,0x88,0xd9,0x7b,0x1e,0x7d,0xea, +0x27,0x5d,0xbe,0xe2,0xac,0x1f,0x4a,0x6e,0xcc,0x77,0xc8,0xa6,0x49,0x55,0x97,0xbe, +0x6a,0x26,0x5d,0xdd,0xf3,0x57,0x1e,0x3c,0x8c,0x8a,0x85,0x97,0xf3,0xaa,0x11,0x51, +0x96,0xa1,0x78,0xea,0xe4,0x8b,0x9a,0x89,0x97,0xda,0x98,0xca,0x6c,0xb5,0x0c,0x89, +0xed,0x57,0x1d,0x6a,0x16,0x5a,0xab,0x90,0xd1,0x46,0x45,0xc1,0xe9,0x55,0x67,0xdb, +0x1a,0x3b,0x3b,0x04,0x45,0x04,0x96,0x63,0x80,0x00,0xef,0x5a,0x12,0x47,0x5f,0x2e, +0xfe,0xdc,0x9f,0x1a,0x0f,0x80,0xfc,0x0e,0x9e,0x14,0xd3,0x2e,0x0c,0x7a,0xde,0xba, +0xa4,0x4a,0xc8,0x7e,0x68,0x6d,0x7a,0x39,0xf6,0x2e,0x7e,0x51,0xed,0xbb,0xd2,0xb7, +0xa3,0x49,0xd6,0x9a,0x84,0x7a,0x9e,0x96,0x57,0x97,0xd5,0xcd,0x71,0x94,0xf0,0x74, +0x77,0x93,0xfb,0x97,0x57,0xf2,0x47,0xcb,0xff,0x00,0xb5,0x87,0xc7,0xa9,0x3e,0x2e, +0xf8,0xd1,0xf4,0xed,0x36,0x66,0xff,0x00,0x84,0x5f,0x49,0x91,0xa3,0xb5,0x55,0x6c, +0xad,0xc4,0x9d,0x1a,0x63,0x8f,0x5e,0x8b,0xed,0xcf,0xf1,0x11,0x5e,0x11,0x45,0x15, +0xf6,0xd4,0xe9,0xc6,0x94,0x14,0x23,0xb2,0x3f,0xaf,0xf0,0x18,0x1a,0x19,0x6e,0x1a, +0x18,0x4c,0x3a,0xb4,0x62,0xbf,0xe1,0xdb,0xf3,0x7b,0xb0,0xad,0x7f,0x07,0xea,0x51, +0xe8,0xbe,0x2e,0xd0,0xf5,0x09,0xb8,0x86,0xd2,0xfa,0x0b,0x87,0xff,0x00,0x75,0x24, +0x56,0x3f,0xa0,0xac,0x8a,0x2a,0xda,0xba,0xb1,0xdb,0x38,0xa9,0xc5,0xc5,0xf5,0x3f, +0x7b,0xac,0x2f,0x23,0xd4,0x6c,0x6d,0xee,0xe1,0x39,0x8a,0x78,0xd6,0x54,0x3f,0xec, +0xb0,0x04,0x7e,0x86,0xac,0x57,0xcf,0xbf,0xb0,0xff,0x00,0xc5,0x85,0xf8,0xa1,0xf0, +0x27,0x4a,0x8e,0x79,0x7c,0xcd,0x57,0x43,0xff,0x00,0x89,0x6d,0xd8,0x27,0x2c,0x76, +0x8f,0xdd,0xb1,0xfa,0xa6,0x3f,0x2a,0xfa,0x0a,0xbf,0x38,0xab,0x4d,0xd2,0xa8,0xe0, +0xfa,0x1f,0xc7,0x58,0xec,0x24,0xf0,0x38,0xaa,0x98,0x5a,0x9b,0xc1,0xb5,0xfd,0x7a, +0x85,0x14,0x51,0x59,0x1c,0x26,0x76,0xbd,0xe1,0xdd,0x2b,0xc5,0x3a,0x64,0xda,0x76, +0xb3,0xa6,0xda,0xea,0xb6,0x13,0x0d,0xb2,0x5b,0x5e,0x42,0xb2,0xc6,0xe3,0xd0,0xab, +0x02,0x0d,0x7c,0x8b,0xf1,0xab,0xfe,0x09,0xbb,0xe1,0x7f,0x15,0x09,0xf5,0x1f,0x00, +0x5e,0xff,0x00,0xc2,0x2b,0xa9,0x9c,0xb7,0xf6,0x7d,0xc1,0x69,0x6c,0x64,0x3e,0x83, +0xab,0xc5,0x93,0xe9,0xb8,0x0e,0xca,0x2b,0xec,0xba,0x2b,0xa2,0x8e,0x22,0xae,0x1d, +0xde,0x9c,0xac,0x7a,0xf9,0x7e,0x6d,0x8d,0xca,0xe7,0xcf,0x84,0xa8,0xe3,0xe5,0xd1, +0xfa,0xad,0x8f,0xc4,0x9f,0x1b,0x7c,0x0a,0xf1,0x9f,0xc3,0x5f,0x1a,0xd9,0x78,0x67, +0xc4,0xda,0x34,0xda,0x6d,0xe5,0xe4,0xeb,0x0d,0xb4,0xdf,0x7e,0x0b,0x8d,0xcc,0x14, +0x34,0x72,0x0e,0x18,0x72,0x38,0xea,0x33,0xc8,0x15,0xf6,0xb7,0xed,0x31,0xfb,0x04, +0xf8,0x72,0xdf,0xe1,0x8a,0xea,0xff,0x00,0x0f,0xec,0xa4,0xb4,0xf1,0x06,0x87,0x68, +0xbe,0x75,0xb2,0x16,0x61,0xa9,0xc6,0x8a,0x03,0x92,0xbc,0xe2,0x6e,0x0b,0x02,0xbf, +0x78,0xe4,0x11,0xc8,0x23,0xec,0x7f,0x15,0xf8,0x3f,0x46,0xf1,0xc6,0x92,0xda,0x6e, +0xbb,0xa7,0x43,0xa8,0xd9,0xef,0x59,0x55,0x26,0x1c,0xa4,0x8a,0x72,0xae,0x8c,0x39, +0x56,0x07,0x90,0xc0,0x82,0x2b,0x66,0xbd,0x2a,0x99,0xa5,0x59,0xb8,0x4a,0x3a,0x35, +0xbf,0x66,0x7d,0x96,0x33,0x8d,0xf1,0xb8,0x99,0x61,0xeb,0x53,0xf7,0x25,0x4e,0xfc, +0xc9,0x3f,0x76,0x57,0xb7,0x4f,0xbf,0x4d,0x6d,0xba,0x7d,0xbe,0x74,0xfd,0x89,0x3e, +0x00,0x47,0xf0,0x5f,0xe1,0x6c,0x1a,0x86,0xa1,0x6f,0xb3,0xc5,0x1a,0xfa,0x25,0xd5, +0xe1,0x75,0xf9,0xa0,0x8c,0x8c,0xc7,0x0f,0xb6,0x01,0xcb,0x0e,0x3e,0x63,0x83,0xf7, +0x45,0x7d,0x17,0x45,0x15,0xe5,0x55,0xa9,0x2a,0xd3,0x75,0x25,0xbb,0x3e,0x17,0x1d, +0x8d,0xab,0x98,0x62,0x67,0x8a,0xae,0xef,0x29,0x3b,0xff,0x00,0xc0,0xf4,0x4b,0x44, +0x14,0x51,0x45,0x64,0x70,0x05,0x7c,0x55,0xff,0x00,0x05,0x2d,0xf8,0xb0,0xba,0x27, +0x82,0x74,0x8f,0x02,0x5a,0x4b,0x8b,0xcd,0x5e,0x51,0x79,0x76,0x14,0xf2,0xb6,0xf1, +0x9c,0x28,0x3e,0xcc,0xff,0x00,0xfa,0x05,0x7d,0x6b,0xe3,0xef,0x1d,0x68,0xff,0x00, +0x0d,0x7c,0x25,0xa9,0x78,0x8f,0x5e,0xba,0x5b,0x4d,0x36,0xc6,0x23,0x23,0xb1,0x23, +0x2c,0x7b,0x22,0x8e,0xec,0xc7,0x80,0x3d,0xeb,0xf1,0x8b,0xe3,0x4f,0xc5,0x6d,0x4b, +0xe3,0x47,0xc4,0x7d,0x5f,0xc5,0x5a,0x96,0x51,0xae,0xe4,0xc4,0x16,0xf9,0xc8,0x82, +0x11,0xc2,0x46,0x3e,0x83,0xf5,0xcd,0x7b,0x79,0x5e,0x19,0xd5,0xab,0xed,0x1e,0xd1, +0xfc,0xcf,0xd2,0x78,0x1f,0x27,0x96,0x3b,0x1c,0xb1,0x93,0x5f,0xbb,0xa5,0xaf,0xac, +0xba,0x2f,0x96,0xff,0x00,0x77,0x73,0xcf,0xef,0xac,0xd6,0xfa,0xdd,0xa2,0x6e,0x0f, +0x55,0x6f,0x43,0x5c,0x7c,0xd0,0xb4,0x12,0x34,0x6e,0x30,0xca,0x70,0x45,0x76,0xf5, +0x89,0xe2,0x3b,0x1d,0xc8,0xb7,0x28,0x39,0x1f,0x2b,0xff,0x00,0x43,0x5f,0x5f,0x25, +0xd4,0xfa,0xbf,0x10,0xf8,0x7a,0x38,0xdc,0x27,0xf6,0xa5,0x08,0xfe,0xf2,0x92,0xf7, +0xbc,0xe3,0xfe,0x71,0xdf,0xd2,0xfd,0x91,0x81,0x45,0x14,0x56,0x47,0xf3,0x30,0x51, +0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x01,0x7b,0x53,0x59,0xed,0xfe, +0xcf,0x67,0x37,0x90,0x7c,0x94,0xdc,0xad,0x0e,0xd3,0x90,0xe0,0x37,0x2c,0x3a,0x9e, +0x7b,0xf4,0xe9,0x5f,0x5f,0x7c,0x22,0xf8,0x7a,0xbe,0x19,0xf0,0xfd,0x86,0x9d,0x67, +0x6a,0x65,0xd5,0xaf,0x02,0xb4,0xfb,0x46,0x5e,0x49,0x1b,0xf8,0x7e,0x83,0xa7,0xe1, +0x5f,0x20,0x5f,0x46,0x96,0xb7,0x91,0xcb,0x0d,0xb5,0xc5,0xbd,0xb3,0x05,0x92,0x25, +0xb9,0xea,0xc3,0x03,0x24,0x1c,0x00,0x41,0x39,0xe9,0x5f,0xa1,0x7f,0x0a,0xfc,0x59, +0xa3,0x47,0x6d,0x35,0xc5,0xcc,0x2a,0xe9,0xaa,0x59,0xaa,0xdb,0x5e,0xbb,0x30,0x58, +0x37,0x60,0x90,0xdb,0x48,0x60,0xac,0x0e,0xd2,0x54,0xe4,0x0f,0x6c,0xd7,0xb1,0x81, +0xf7,0x7d,0xa5,0x44,0xaf,0x25,0xb1,0xf0,0x3c,0x4a,0xe5,0x52,0x18,0x7a,0x12,0x97, +0x2c,0x24,0xdf,0x33,0xf3,0x56,0xb2,0xeb,0xbb,0xbf,0x95,0xfd,0x0e,0xae,0xcb,0xe1, +0xbf,0x87,0x9b,0xc3,0xf2,0xdc,0xcd,0xa8,0xdf,0x5c,0xdf,0x47,0xba,0x36,0x4b,0x35, +0x42,0x1d,0xc1,0x1b,0xda,0x14,0x3c,0xcb,0x1a,0x64,0xee,0x60,0x41,0xc8,0x38,0x1d, +0xeb,0xcd,0x3c,0x6f,0xe0,0x68,0xe7,0xd3,0xe4,0xd3,0xb5,0x38,0xe3,0xbd,0xd3,0x6f, +0x63,0x26,0x2b,0x98,0xbe,0x68,0xe5,0x5e,0xcc,0x87,0xb3,0x0f,0x4e,0xa0,0xf5,0xaf, +0x51,0xbe,0xf0,0x8d,0xe6,0xb9,0xad,0x2e,0xad,0x0c,0xb3,0x69,0xf6,0xfa,0x64,0x71, +0x99,0xad,0x6d,0xf2,0xcf,0x6d,0x18,0x07,0x67,0xd9,0x48,0xe2,0x44,0x6c,0x1d,0xa4, +0x73,0xd4,0xb7,0x73,0x59,0xff,0x00,0x10,0x3c,0x58,0x3f,0xb2,0xe5,0xd0,0x85,0x95, +0x94,0x17,0x33,0xdc,0x0b,0xbb,0xb5,0x82,0x25,0xff,0x00,0x47,0x60,0x38,0x4d,0xd8, +0xc9,0x93,0xfb,0xec,0x30,0x33,0xc0,0x1d,0x6b,0xb2,0x85,0x5a,0x92,0x9a,0x8d,0xf9, +0xef,0xba,0xed,0xfd,0x7f,0x5b,0xa3,0xe4,0xb1,0x58,0x7a,0x54,0xe9,0xba,0xaa,0x3e, +0xcd,0xc3,0xe1,0x6a,0xfe,0xf3,0xff,0x00,0x87,0xf9,0xab,0x3e,0xcd,0x1f,0x9c,0xf7, +0x36,0x10,0xf8,0x2f,0xc7,0x13,0x5a,0x6a,0x36,0x2b,0xaa,0xc1,0x63,0x72,0xd1,0xbd, +0xab,0xb9,0x41,0x32,0xf3,0xb7,0x90,0x38,0xce,0x41,0xac,0x4b,0xe8,0xcc,0x57,0x93, +0xa1,0x81,0xed,0x70,0xe7,0xf7,0x12,0x67,0x74,0x63,0x3c,0x29,0xcf,0x3c,0x57,0x53, +0xf1,0x5b,0x54,0x87,0x5a,0xf8,0x95,0xad,0xdc,0xc2,0xfb,0x61,0x37,0x02,0x20,0xe3, +0xfd,0x85,0x54,0x2d,0xf9,0xa9,0x35,0xcb,0xea,0x0c,0x5e,0xfa,0xe0,0x9b,0x93,0x78, +0x77,0x9f,0xf4,0x83,0x9f,0xde,0x73,0xf7,0xb9,0xe7,0x9f,0x7a,0xf0,0x6a,0x5a,0x32, +0x94,0x63,0xb2,0x67,0xeb,0xb8,0x59,0x4a,0xa5,0x3a,0x75,0x6a,0x7c,0x52,0x8a,0xbe, +0xfb,0xef,0xe9,0xd5,0xf9,0x90,0x57,0xb3,0x7c,0x15,0xfd,0x99,0x35,0xef,0x8a,0xe9, +0x6f,0xaa,0x5c,0xc8,0xba,0x3f,0x86,0xdd,0xb1,0xf6,0xc6,0xc3,0x49,0x30,0x07,0x04, +0x46,0x9d,0xf9,0xe3,0x27,0x8f,0xad,0x78,0xcd,0x7b,0xb7,0xec,0xc7,0xf1,0xf9,0xfe, +0x19,0xeb,0x4b,0xa1,0xeb,0x53,0xb3,0x78,0x62,0xfa,0x4c,0x6e,0x63,0x9f,0xb1,0xca, +0x7f,0xe5,0xa0,0xff,0x00,0x64,0xff,0x00,0x10,0xfc,0x6b,0xe4,0xb8,0x92,0x79,0xa5, +0x3c,0xb6,0xa5,0x4c,0xa2,0xde,0xd5,0x77,0x57,0x76,0xeb,0xcb,0xd3,0x9b,0xb5,0xef, +0xe9,0x73,0xd2,0xa7,0xcb,0xcd,0xef,0x6c,0x78,0xc7,0x88,0x34,0xb3,0xa1,0xeb,0xda, +0x96,0x9c,0x4b,0x13,0x69,0x73,0x24,0x19,0x6e,0xbf,0x2b,0x15,0xe7,0xf2,0xaa,0x15, +0xdf,0xfc,0x7e,0xd2,0xd3,0x49,0xf8,0xc9,0xe2,0xc8,0xa2,0x65,0x78,0x66,0xbd,0x6b, +0xa8,0xda,0x33,0x95,0x2b,0x28,0x12,0x82,0x3d,0xbe,0x7a,0xe7,0x3c,0x2b,0xe1,0x0b, +0xdf,0x16,0xdd,0x4c,0xb6,0xed,0x15,0xa5,0x95,0xaa,0x79,0x97,0x9a,0x8d,0xd3,0x14, +0xb7,0xb5,0x8f,0xfb,0xce,0xd8,0xef,0xd0,0x28,0xc9,0x63,0xc0,0x06,0xbd,0x9c,0x16, +0x21,0x62,0x70,0x94,0xb1,0x0f,0xed,0x46,0x2f,0xef,0x49,0x92,0xe3,0xef,0x59,0x18, +0x75,0x67,0x4e,0xd2,0xef,0xb5,0x89,0x3c,0xbd,0x3e,0xca,0xe6,0xfe,0x4c,0xe3,0x65, +0xac,0x2d,0x29,0xcf,0xd1,0x41,0xaf,0x4d,0xd0,0xb4,0xfb,0x0b,0x58,0x66,0x7f,0x0c, +0x68,0xf6,0xd7,0xf1,0x22,0x84,0x93,0xc5,0x1e,0x28,0x45,0x10,0x46,0xff,0x00,0xc4, +0x61,0x81,0xbe,0x41,0xe8,0x37,0x89,0x0f,0xb2,0x9a,0x75,0xef,0x8c,0xd1,0x61,0x5b, +0x6d,0x4b,0xe2,0x3e,0xb1,0x74,0x23,0x27,0x6c,0x1a,0x34,0x26,0x3b,0x74,0xff,0x00, +0x77,0x95,0x1f,0x90,0xaf,0x41,0x42,0xa4,0x95,0xd2,0xb2,0xf3,0x76,0x39,0x27,0x8a, +0xa1,0x09,0x38,0x5d,0xc9,0xad,0xd4,0x53,0x76,0xf5,0xb6,0xc7,0x99,0xea,0x7a,0x2e, +0xa3,0xa2,0x30,0x5d,0x4b,0x4e,0xbc,0xd3,0x9b,0x38,0xdb,0x79,0x6e,0xf0,0x9c,0xfa, +0x7c,0xc0,0x55,0x3a,0xf5,0x6b,0x1f,0x1a,0xc3,0x0a,0x49,0x0e,0x9b,0xf1,0x17,0x5f, +0xb1,0x32,0x8d,0xa5,0x35,0x28,0x9a,0x48,0x1c,0x7a,0x3e,0x19,0xb8,0xfc,0x0d,0x72, +0x1e,0x24,0xf0,0x4e,0xab,0xa7,0xc7,0x26,0xa9,0xba,0xdf,0x54,0xd3,0xe4,0x62,0xed, +0x7f,0xa7,0xb0,0x78,0x81,0x27,0x3f,0x30,0x1f,0x73,0xe8,0x40,0xaa,0xf6,0x73,0xb5, +0xde,0xbe,0x8e,0xe4,0xac,0x5d,0x19,0x35,0x16,0xdc,0x5b,0xfe,0x64,0xd7,0xdd,0x7d, +0xce,0x62,0x8a,0x28,0xac,0xce,0xb0,0xa2,0x8a,0x28,0x00,0xa2,0x8a,0x28,0x00,0xa2, +0x8a,0x28,0x03,0xf6,0xb2,0x35,0xa9,0x55,0x71,0x40,0x5d,0xbd,0x69,0x6b,0xe1,0x4f, +0x70,0x55,0x15,0x3a,0xaf,0x6a,0x8d,0x3a,0xd4,0xca,0x29,0xa0,0x63,0x95,0x6a,0x55, +0x5a,0x6a,0xd4,0x8a,0x38,0xa6,0x49,0x22,0x55,0x84,0x5f,0x4a,0x89,0x47,0x22,0xac, +0x47,0x41,0x24,0x88,0x2a,0x74,0x1c,0x54,0x49,0xc9,0xab,0x11,0x8e,0xdd,0x68,0x02, +0x48,0xfe,0x5e,0x4d,0x4b,0xe6,0x24,0x31,0x99,0x24,0x61,0x1a,0x0e,0xac,0xc7,0x00, +0x7e,0x35,0xf2,0x57,0xed,0x09,0xfb,0x6f,0xc9,0xf0,0xef,0xc5,0x57,0x7e,0x0f,0xf0, +0x7e,0x84,0xda,0xc6,0xbf,0x6e,0xfe,0x54,0xd2,0xcc,0x8c,0xca,0xb2,0x11,0xf7,0x51, +0x07,0x27,0x1c,0x73,0x5e,0x31,0x2f,0xc3,0x6f,0xda,0x87,0xf6,0x86,0xbe,0x4b,0xbd, +0x48,0xde,0x68,0x5a,0x65,0xd6,0x3f,0xe3,0xee,0xe8,0x5a,0xc2,0x89,0xff,0x00,0x5c, +0x41,0xdc,0x7f,0x2a,0xc9,0xd4,0x5b,0x45,0x5c,0xef,0x86,0x12,0x56,0x53,0xa8,0xd4, +0x53,0xee,0x7d,0x77,0xf1,0x8b,0xf6,0xad,0xf0,0x3f,0xc2,0x4d,0x2e,0x56,0x3a,0x94, +0x1a,0xce,0xae,0x41,0x11,0x58,0x59,0xc8,0x1c,0xee,0xec,0x5d,0x87,0x0a,0x3f,0x5a, +0xfc,0xbf,0xf8,0xdd,0xf1,0xbb,0x5c,0xf8,0xd1,0xe2,0x69,0xf5,0x4d,0x72,0xe5,0xa6, +0x6f,0xbb,0x0c,0x0a,0x4f,0x95,0x02,0x67,0xee,0xa0,0xed,0xef,0xeb,0x5f,0x49,0x78, +0xc3,0xf6,0x2f,0xf0,0x1f,0xc2,0xdf,0x04,0xea,0x77,0xff,0x00,0x10,0xbe,0x26,0xb2, +0x78,0x89,0x21,0x66,0xb7,0xb6,0xb3,0xdb,0x83,0x26,0x3e,0x51,0xe5,0x9c,0xbb,0x64, +0xfd,0x2b,0xe2,0x96,0xb5,0x60,0xc4,0xb3,0x2f,0xaf,0xe1,0x5c,0x95,0x25,0x27,0xf1, +0x1e,0xa6,0x1a,0x9d,0x28,0xa6,0xe9,0xea,0xfb,0x95,0xf6,0xec,0xef,0x81,0x5e,0xcb, +0xfb,0x36,0x7c,0x52,0x93,0xc0,0x7e,0x2f,0x58,0x84,0x8c,0x6d,0x6e,0xbe,0x49,0x23, +0x39,0xc1,0xcf,0xb5,0x78,0xff,0x00,0x95,0xf2,0xe4,0x0c,0x0a,0xee,0xbe,0x0e,0x68, +0x03,0x57,0xf1,0x85,0x9a,0xb7,0x0a,0xac,0x0e,0x71,0xc7,0x5a,0xc2,0x5b,0x1d,0x71, +0xf8,0xb5,0x3e,0x8c,0xf8,0xd9,0xe1,0x3f,0xed,0x38,0x7f,0xb7,0x91,0x23,0x96,0x4d, +0xde,0x64,0x2a,0x3e,0x5d,0x88,0x7e,0xf7,0xd4,0x8e,0xb5,0xe6,0x10,0xcd,0x72,0x2c, +0x52,0x29,0x5c,0xfc,0x83,0x05,0xdb,0xbf,0xbd,0x7a,0x17,0xc4,0xaf,0x16,0x1b,0x8b, +0xa8,0xb4,0x8b,0x59,0x94,0xdb,0x5a,0xfc,0x8e,0x7f,0xbc,0x78,0xc8,0x1e,0xc2,0xbc, +0xb3,0x55,0xba,0x49,0xa6,0x75,0x59,0x8c,0x17,0x3d,0x02,0xe7,0x28,0xe3,0xdc,0x57, +0x89,0x57,0x32,0x8c,0x1b,0xa7,0x08,0xdd,0xa3,0x7f,0x60,0xb9,0xb9,0xee,0x7a,0xf7, +0xc2,0x2f,0xd9,0xf7,0xc5,0x7f,0x19,0x6d,0xda,0xf7,0x40,0x86,0xd4,0x69,0x89,0x2f, +0x90,0xfa,0x8d,0xc4,0xea,0x11,0x58,0x75,0x1b,0x41,0x2c,0x48,0xfa,0x57,0xd5,0x1f, +0x0f,0x7f,0x60,0x7f,0x0a,0xe9,0x1e,0x4d,0xcf,0x8a,0x75,0x1b,0xaf,0x10,0x5d,0xa9, +0xcb,0x41,0x19,0xf2,0x60,0x1e,0xd8,0x1c,0x91,0x5f,0x9e,0xde,0x19,0xf1,0xe6,0xb9, +0xe1,0x2b,0x84,0x5d,0x0b,0x5a,0xbe,0xd1,0x25,0xb7,0x9b,0xcf,0x10,0xd9,0xdc,0x32, +0x47,0xe6,0x1c,0x65,0xb6,0x83,0x83,0x90,0x3b,0xd7,0xd8,0x3f,0x09,0x7f,0xe0,0xa3, +0x4f,0x6b,0xb2,0xcf,0xe2,0x1e,0x92,0x1e,0x10,0xaa,0x89,0xaa,0x69,0x68,0x4b,0xb3, +0x67,0x04,0xc9,0x19,0x38,0x03,0x1c,0xfc,0xb5,0xdb,0x85,0xc6,0xe1,0xea,0xbe,0x59, +0x69,0x2f,0x33,0xcf,0xc4,0x47,0x10,0xbe,0x0d,0xbc,0xb7,0x3e,0xd7,0xf0,0x9f,0x81, +0x34,0x0f,0x03,0xda,0x0b,0x6d,0x03,0x46,0xb2,0xd2,0x21,0x23,0x04,0x5a,0xc2,0xa8, +0x5b,0xea,0x47,0x27,0xf1,0xad,0xf5,0x5e,0xf5,0x81,0xe0,0xbf,0x1d,0xe8,0x1f,0x10, +0xb4,0x9f,0xed,0x2f,0x0d,0xea,0xd6,0xba,0xcd,0x88,0x6d,0x8d,0x35,0xa4,0x81,0xc2, +0xb6,0x33,0xb4,0xfa,0x1e,0x47,0x15,0xd0,0x83,0x5e,0xee,0x9d,0x0f,0x11,0xdd,0xbd, +0x45,0xe8,0x31,0x4e,0x55,0xcd,0x22,0xa9,0x35,0x20,0xe2,0x90,0x05,0x38,0x0a,0x45, +0x1d,0xe9,0xd4,0x84,0x14,0xa0,0x50,0x05,0x2d,0x00,0x14,0x51,0x45,0x03,0x11,0xd8, +0x2a,0x33,0x1e,0x80,0x12,0x6b,0xf2,0x87,0xe3,0xf7,0x8e,0x2e,0xbc,0x51,0xf1,0x6b, +0xc4,0x1a,0x9a,0xce,0xc0,0x2d,0xd3,0x84,0x65,0x3d,0x11,0x4e,0xd5,0x1f,0x90,0xaf, +0xd3,0xbf,0x88,0xde,0x20,0x1e,0x17,0xf0,0x1e,0xbf,0xaa,0x37,0x1f,0x65,0xb3,0x91, +0x87,0x3f,0xc4,0x57,0x03,0xf5,0x22,0xbf,0x25,0x35,0xff,0x00,0xde,0x5c,0x5c,0x3b, +0x73,0x2c,0x84,0xb3,0x1f,0xa9,0xaf,0x3b,0x17,0x2f,0x86,0x27,0xb9,0x96,0x42,0xee, +0x52,0x30,0xaf,0x3c,0x4b,0x67,0x0a,0xb6,0xa2,0x1f,0x67,0x94,0x41,0x91,0x14,0x1c, +0x1f,0x6c,0x0e,0x95,0xe2,0xdf,0x13,0xbe,0x25,0xdf,0xf8,0xb2,0xed,0xad,0xed,0xa3, +0x36,0x7a,0x6c,0x7c,0x84,0xfe,0x27,0xff,0x00,0x69,0x8f,0xf4,0xaf,0x59,0xb3,0xf0, +0xec,0x9a,0x8e,0xa6,0xb1,0xa4,0x7f,0x2b,0x9c,0x30,0x3d,0x08,0xf4,0x3e,0xb5,0xc7, +0x7e,0xd0,0x1e,0x05,0xd1,0x7c,0x03,0xe2,0xeb,0x4b,0x08,0xae,0x9a,0xdf,0x7d,0xaa, +0x5c,0xdd,0x45,0xd1,0x17,0x76,0x70,0x14,0xf7,0xe9,0x5d,0x78,0x5a,0x94,0xe4,0xd4, +0x5f,0xc4,0x6d,0x88,0xa3,0x28,0x5e,0x5d,0x0f,0x2b,0xf0,0xda,0xed,0xb3,0xbe,0x32, +0x83,0xb5,0x86,0x4b,0x3d,0x67,0xb5,0xb5,0xa6,0xa9,0x28,0x8e,0xde,0x40,0x85,0x0e, +0xed,0xb8,0xc0,0xcf,0xd6,0xab,0xdc,0xde,0x2e,0xa9,0x30,0xb4,0xb2,0x69,0x16,0xc7, +0x76,0x64,0x91,0xc9,0xcc,0x98,0xfe,0x95,0x96,0x63,0x6b,0xdb,0x67,0xbd,0x79,0xcd, +0x9d,0xaf,0x98,0x44,0x51,0xa0,0xe0,0xa8,0xe8,0x6b,0xda,0x8c,0xbb,0x1e,0x64,0xac, +0x5a,0xbc,0xd2,0x67,0x8f,0x56,0x89,0xa4,0x1b,0x4b,0x12,0x83,0x9f,0x41,0xc5,0x7a, +0x9f,0x89,0xec,0xe2,0xf0,0xdf,0x81,0xf4,0x8f,0x0d,0xc9,0x70,0xe6,0xfd,0xc1,0xd4, +0xa5,0x88,0xff,0x00,0x03,0xcb,0xb5,0x54,0x1f,0x72,0x8a,0xbf,0x9d,0x70,0xbf,0x0c, +0x91,0x7c,0x4d,0xf1,0x1b,0x42,0xb2,0xb8,0x95,0xa7,0xb2,0x8e,0x74,0xf3,0x37,0x77, +0x4c,0x8d,0xdf,0xa6,0x6b,0xda,0xff,0x00,0xe1,0x1d,0x83,0xfe,0x17,0xf4,0xcf,0xac, +0x48,0x97,0xd6,0xcb,0x27,0xdb,0x3c,0xb1,0xca,0x95,0x27,0xf7,0x48,0x7d,0x95,0x7a, +0x8f,0x6a,0xea,0xa6,0xb9,0xb5,0x33,0xbe,0x87,0xae,0x7e,0xcc,0x3e,0x1d,0xb2,0xf8, +0x07,0xe1,0xdb,0xbf,0x88,0x5e,0x23,0xc4,0x77,0xcd,0x6c,0xe6,0xda,0xdd,0xc7,0xcf, +0x82,0x3e,0xf6,0x3b,0x13,0xda,0xac,0x7e,0xc1,0xba,0xe5,0xd6,0xbb,0xfb,0x46,0x5e, +0xeb,0x17,0x2a,0x4c,0xfa,0x82,0x4f,0x3b,0x9f,0x76,0x39,0x02,0xbc,0xd3,0xe3,0x07, +0x8c,0x25,0xf1,0xce,0xad,0x67,0xa4,0x2d,0xc3,0x32,0xb6,0xdd,0xc8,0xbd,0x00,0xcf, +0x02,0xbe,0x94,0xfd,0x8c,0xfe,0x17,0xc7,0xe1,0xdf,0x89,0x56,0xda,0xb4,0x5b,0x8d, +0xbc,0x30,0x79,0x44,0xf6,0xdc,0x7d,0x6b,0x69,0xad,0x1d,0xb6,0x48,0x86,0xf4,0x3d, +0x43,0xf6,0x69,0xd7,0x24,0xd3,0xfe,0x23,0x6b,0x56,0xb7,0x0d,0x89,0xa6,0xba,0x90, +0xb0,0xf6,0xdc,0x71,0x5f,0x41,0xf8,0xaf,0x4b,0x6b,0x7f,0x8b,0xfe,0x03,0xd7,0xd3, +0x9f,0xf8,0xf8,0xd3,0x64,0xc0,0xfe,0x17,0x5d,0xe0,0xfe,0x6b,0x5f,0x33,0xf8,0xf1, +0x7f,0xe1,0x4c,0xfc,0x64,0x37,0x70,0xa3,0x0b,0x2b,0xc9,0x77,0x99,0x3b,0x2e,0xe6, +0x04,0xe6,0xbe,0xbd,0x4f,0x23,0x59,0xb1,0xd2,0x6f,0xd4,0x87,0xf2,0xdd,0x6e,0x63, +0x6f,0xc0,0xff,0x00,0x43,0x5c,0xb8,0x9b,0x73,0x46,0xa2,0xd9,0xa2,0x1e,0xe7,0x68, +0x7b,0x83,0x51,0xba,0xe2,0xa6,0x5f,0xde,0x2a,0xb7,0x72,0x33,0x49,0xec,0x6b,0xc5, +0x32,0x20,0xa6,0xd4,0xac,0x9d,0xe9,0x95,0x64,0x8c,0x65,0xe9,0x83,0x9a,0x8e,0x45, +0xdd,0xc8,0x15,0x36,0x36,0xf2,0x29,0x0a,0x9d,0xb9,0x1c,0x7a,0xd3,0x20,0xa8,0xcb, +0xd7,0xd6,0xa2,0x65,0xab,0x6c,0x85,0x86,0x45,0x40,0xcb,0xde,0xa9,0x08,0xaa,0xcb, +0xd6,0xa0,0x65,0xfc,0xea,0xdb,0x29,0x39,0xa8,0x5d,0x69,0x8c,0xcc,0xd5,0x2f,0xed, +0xb4,0x9d,0x3e,0xea,0xfa,0xee,0x41,0x0d,0xad,0xb4,0x4d,0x34,0xb2,0x37,0x45,0x55, +0x19,0x27,0xf2,0x15,0xf9,0x07,0xf1,0xbf,0xe2,0x44,0xff,0x00,0x15,0xfe,0x26,0x6b, +0x5e,0x21,0x95,0x98,0xc1,0x3c,0xc5,0x2d,0x50,0x92,0x7c,0xb8,0x17,0x84,0x51,0xe9, +0xc7,0x3f,0x52,0x6b,0xef,0xff,0x00,0xdb,0x9b,0xe2,0x3f,0xfc,0x21,0x1f,0x06,0xee, +0x74,0xcb,0x79,0x36,0xdf,0xeb,0x8e,0x2c,0xd4,0x03,0x82,0x21,0xc1,0x32,0x1f,0xc8, +0x01,0xff,0x00,0x02,0xaf,0xcc,0x6a,0xfa,0x5c,0xae,0x8d,0xa2,0xea,0xbf,0x43,0xf7, +0x7f,0x0e,0xb2,0xb5,0x4e,0x8d,0x5c,0xca,0x6b,0x59,0x7b,0xb1,0xf4,0x5b,0xfd,0xef, +0xf2,0x12,0x8a,0x28,0xaf,0x78,0xfd,0x98,0x28,0xa2,0x8a,0x00,0xf7,0x6f,0xd8,0xf7, +0xe3,0xe1,0xf8,0x13,0xf1,0x4e,0x09,0xef,0xa4,0x61,0xe1,0xbd,0x5b,0x6d,0xa6,0xa4, +0xb9,0xe2,0x35,0x27,0xe4,0x9b,0xfe,0x02,0x4f,0x3e,0xc4,0xd7,0xeb,0xdd,0xb5,0xc4, +0x57,0x96,0xf1,0x4f,0x04,0x8b,0x2c,0x32,0xa8,0x74,0x91,0x0e,0x43,0x29,0x19,0x04, +0x1f,0x4c,0x57,0xe0,0x75,0x7d,0xcb,0xfb,0x10,0xfe,0xd9,0x30,0x78,0x62,0xde,0xd7, +0xe1,0xf7,0x8e,0xaf,0xbc,0xad,0x35,0x48,0x8f,0x49,0xd5,0x66,0x3f,0x2c,0x19,0x3c, +0x41,0x21,0xec,0xbf,0xdd,0x3d,0x07,0x43,0xda,0xbe,0x7b,0x34,0xc1,0x3a,0x9f,0xbe, +0xa6,0xb5,0x5b,0x9f,0x92,0xf1,0xb7,0x0e,0x4f,0x19,0x1f,0xed,0x1c,0x24,0x6f,0x38, +0xaf,0x79,0x2d,0xda,0xee,0xbc,0xd7,0xe5,0xe8,0x7e,0x88,0xd1,0x4c,0x8e,0x44,0x9a, +0x35,0x92,0x37,0x59,0x23,0x61,0xb9,0x59,0x4e,0x41,0x07,0xb8,0x34,0xfa,0xf9,0x33, +0xf0,0x40,0xa2,0x8a,0x28,0x00,0xa2,0x8a,0x28,0x00,0xa2,0x8a,0x28,0x00,0xa2,0x8a, +0x28,0x03,0x82,0xf8,0xc9,0xf0,0x57,0xc3,0x7f,0x1d,0x3c,0x29,0xfd,0x83,0xe2,0x68, +0xee,0x5a,0xd9,0x1f,0xcd,0x86,0x5b,0x59,0xda,0x37,0x86,0x4c,0x60,0x38,0xfe,0x13, +0xf4,0x60,0x45,0x7e,0x64,0xfe,0xd1,0xdf,0xb1,0xaf,0x8a,0xfe,0x02,0xbc,0xba,0xa4, +0x04,0xf8,0x83,0xc2,0x5b,0xb0,0xba,0xa4,0x09,0x87,0x87,0x27,0x81,0x32,0x7f,0x09, +0xff,0x00,0x68,0x65,0x4f,0xa8,0xe9,0x5f,0xae,0x75,0x05,0xe5,0x95,0xbe,0xa5,0x69, +0x35,0xad,0xdc,0x11,0xdd,0x5a,0xcc,0x86,0x39,0x61,0x99,0x03,0xa3,0xa9,0x18,0x2a, +0xc0,0xf0,0x41,0xf4,0xaf,0x47,0x0b,0x8e,0xa9,0x85,0x76,0x5a,0xc7,0xb1,0xf5,0xd9, +0x1f,0x13,0x63,0x32,0x49,0x28,0xc1,0xf3,0x52,0xeb,0x17,0xfa,0x76,0x7f,0x87,0x74, +0x7e,0x08,0x53,0x65,0x8d,0x66,0x8d,0xe3,0x7e,0x55,0x86,0x0d,0x7d,0x3f,0xfb,0x6e, +0x7e,0xcc,0x31,0xfc,0x0f,0xf1,0x64,0x3a,0xe7,0x87,0xe1,0x65,0xf0,0x86,0xb1,0x23, +0x79,0x51,0x72,0x7e,0xc7,0x37,0x56,0x8b,0x3f,0xdd,0x3d,0x57,0x3d,0xb2,0x39,0xc5, +0x7c,0xc5,0x5f,0x6d,0x46,0xac,0x6b,0xc1,0x54,0x86,0xcc,0xfe,0x94,0xc1,0x63,0x30, +0xd9,0xbe,0x12,0x35,0xe9,0x7b,0xd0,0x9a,0xd9,0xfd,0xcd,0x3f,0xc9,0x9c,0x4d,0xc4, +0x2d,0x6f,0x33,0xc4,0xdd,0x54,0xe2,0xa3,0xad,0x7f,0x12,0x5b,0xf9,0x77,0x49,0x28, +0x1c,0x48,0xbc,0xfd,0x47,0xf9,0x15,0x91,0x49,0xe8,0xcf,0xe3,0x4c,0xf3,0x2e,0x79, +0x4e,0x65,0x5f,0x05,0xd2,0x12,0x76,0xf4,0x7a,0xaf,0xc1,0xa0,0xa2,0x8a,0x29,0x1e, +0x18,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x01,0xa7,0x7b,0xa9,0x5c,0x6b,0x1a,0x7c, +0x06,0xf6,0xff,0x00,0xcc,0x6b,0x18,0xd6,0xda,0xda,0xdd,0x93,0x9f,0x2f,0x9e,0x01, +0x03,0x18,0x1e,0xfc,0xf3,0x5e,0x95,0xf0,0x8f,0xe3,0x68,0xf0,0x8d,0xaa,0xe8,0xfa, +0xd2,0xc9,0x36,0x98,0xa7,0xf7,0x33,0xa0,0xdc,0xf0,0xe4,0xf2,0x08,0xee,0xbf,0xca, +0xbc,0x92,0x29,0x1a,0x19,0x52,0x44,0x38,0x74,0x60,0xca,0x71,0x9e,0x47,0x22,0xac, +0xcb,0x73,0x15,0xd4,0x37,0x32,0xdc,0x79,0xb2,0x6a,0x12,0x4a,0x1c,0x48,0x08,0x09, +0x83,0x9d,0xd9,0x18,0xeb,0x9c,0x63,0x1c,0x57,0x45,0x2a,0xd3,0xa5,0x3e,0x78,0xbd, +0x4f,0x33,0x17,0x80,0xa1,0x8c,0xa2,0xf0,0xf5,0x63,0x78,0xf9,0x69,0x67,0xdd,0x7e, +0x67,0xdb,0x7a,0x3f,0xed,0x11,0x61,0x61,0xa4,0xc5,0x0e,0x9f,0xe3,0x74,0xb4,0xb2, +0x42,0xcf,0x1c,0x4b,0x73,0xe5,0xec,0x24,0x73,0x85,0x3c,0x83,0x5e,0x63,0xf1,0x5b, +0xe3,0x13,0x59,0xf8,0x56,0x0b,0xaf,0x0e,0xee,0xbb,0x83,0x52,0x79,0x6d,0xc6,0xac, +0xb9,0xd9,0x14,0x8a,0x7e,0x74,0xe7,0x9f,0x33,0x04,0x30,0xcf,0x66,0x04,0x66,0xbe, +0x76,0xfe,0xcf,0xb6,0x6b,0xd5,0x85,0x75,0x18,0x3c,0xa3,0x16,0xf3,0x70,0xca,0xe1, +0x43,0x6d,0xce,0xce,0x99,0xce,0x78,0xce,0x31,0x9a,0xeb,0x3c,0x07,0xe2,0x0d,0x07, +0x4f,0xd3,0x5f,0x4a,0xd5,0xe6,0x98,0xd9,0xea,0x93,0xaa,0xde,0x2c,0xb0,0xef,0x86, +0xd0,0xaf,0x30,0xdc,0xae,0x0e,0xe2,0xc8,0xc4,0x86,0x18,0xe5,0x19,0x87,0x7a,0xeb, +0xa9,0x8e,0xa9,0xca,0xf9,0x22,0xa3,0x7d,0xed,0xbb,0x3e,0x7f,0x0f,0xc3,0xb8,0x4a, +0x75,0x23,0x2a,0xb3,0x9d,0x44,0xbe,0x14,0xf6,0x5d,0xaf,0xa6,0xda,0x79,0x79,0x9c, +0x95,0x9e,0xfb,0x58,0xff,0x00,0xb4,0x19,0x2d,0xee,0x63,0xde,0xd1,0x18,0xa6,0x6c, +0x92,0x4a,0x9e,0x4a,0xe7,0x3c,0x67,0x39,0xf5,0xaa,0x35,0xaf,0xe2,0xdd,0x16,0xf3, +0xc3,0xfe,0x24,0xbf,0xb0,0xbf,0x86,0x38,0x2e,0x63,0x94,0x92,0xb0,0x8c,0x44,0xca, +0xdf,0x32,0xb4,0x7e,0xa8,0xca,0x43,0x29,0xee,0x08,0xac,0x8a,0xf3,0x6e,0x9e,0xc7, +0xd8,0x28,0xb4,0xee,0xf7,0x0a,0x28,0xaf,0x68,0xf8,0x4b,0xf0,0x2d,0x3c,0x43,0x67, +0x16,0xb3,0xe2,0x01,0x22,0x59,0x49,0xf3,0x41,0x68,0xa7,0x6b,0x4a,0x3f,0xbc,0xc7, +0xb2,0x9e,0xc0,0x75,0xad,0xa8,0xd1,0x9d,0x79,0x72,0x41,0x1c,0x58,0xec,0x75,0x0c, +0xbe,0x97,0xb6,0xae,0xec,0xbf,0x17,0xe4,0x8f,0x2c,0xd2,0x74,0xfd,0x4b,0xc6,0x9a, +0xf6,0x9f,0xa6,0xc0,0xcd,0x77,0x7f,0x72,0xd1,0xda,0xc3,0xe6,0xbf,0x40,0x06,0x06, +0x58,0xf4,0x55,0x51,0xd4,0xf0,0x00,0xf4,0x15,0xe8,0x97,0x4d,0xa2,0xb6,0x9e,0xd1, +0xab,0x38,0xf0,0x1e,0x87,0x2e,0xc4,0x55,0xc2,0x4b,0xad,0x5e,0xe3,0xe6,0x90,0x91, +0xd8,0x9c,0xe3,0xfb,0x89,0x81,0xd4,0x9a,0xfa,0x13,0x4b,0xf0,0x7e,0x87,0xa2,0x81, +0xf6,0x1d,0x26,0xd2,0xd4,0x85,0x64,0xdd,0x1c,0x43,0x76,0xd6,0x05,0x58,0x67,0xae, +0x08,0x24,0x1f,0x50,0x4d,0x66,0x6b,0x9f,0x0c,0x7c,0x3d,0xaf,0x2e,0x9c,0x93,0xd8, +0xac,0x50,0xd8,0xcd,0xe7,0x45,0x0c,0x07,0x64,0x64,0x92,0x09,0x0c,0xa3,0x82,0x0e, +0x05,0x7a,0x91,0xca,0x65,0x06,0x9d,0xd3,0xb6,0xcb,0xa1,0xf1,0x35,0x38,0xbe,0x85, +0x55,0xec,0xd4,0x25,0x14,0xf7,0x7a,0x5e,0xde,0x5d,0x9b,0xda,0xfd,0x37,0x3c,0xb3, +0xc2,0xff,0x00,0x0c,0xf5,0x6f,0x8a,0x4b,0x06,0xab,0xe2,0x49,0x5b,0x4b,0xd0,0xd4, +0x7f,0xa1,0x69,0x76,0xa3,0x60,0x54,0xed,0xb5,0x7a,0x28,0xc7,0x7e,0xa6,0xbd,0x67, +0x4b,0xf8,0x6d,0xe1,0x7d,0x1a,0x14,0x8e,0xdb,0x43,0xb3,0x1b,0x46,0x37,0x4b,0x10, +0x91,0x8f,0xb9,0x2d,0x9a,0xef,0x74,0xbf,0x09,0xde,0xdf,0x5f,0x69,0x56,0x62,0x16, +0x8c,0x5f,0xed,0xf2,0xbc,0xa4,0xf3,0x18,0x46,0x4e,0x37,0xec,0x5e,0x71,0xf9,0x57, +0xb6,0x7c,0x3f,0xfd,0x96,0xf5,0x9b,0xeb,0xab,0xd9,0x75,0x88,0x61,0xb1,0xb0,0x91, +0x1a,0x3b,0x67,0xbc,0x5d,0xf3,0xaf,0x38,0xdf,0xe5,0x29,0xda,0x0e,0x33,0x8d,0xc7, +0x8c,0x83,0x83,0x5d,0x35,0x6b,0x60,0xb2,0xf8,0xf3,0x56,0x92,0xbf,0x9e,0xef,0xd3, +0xfc,0x91,0xe0,0x46,0x39,0xb6,0x75,0x53,0xd9,0xe1,0xe2,0xe3,0x05,0xd1,0x68,0x96, +0x97,0xd7,0xd7,0xbb,0xdd,0xb3,0xe5,0xfd,0x4b,0xe1,0xd7,0x87,0xb5,0x2b,0x60,0xd7, +0x7e,0x1f,0xb3,0x68,0x64,0x25,0x44,0x82,0xdc,0x26,0x4f,0xa0,0x60,0x07,0x3f,0x8d, +0x79,0x67,0x8a,0x3e,0x0f,0xea,0x5e,0x05,0x92,0x6d,0x63,0xc1,0x57,0x33,0x6d,0x50, +0x4d,0xc6,0x97,0x3f,0xce,0x24,0x4e,0xeb,0x83,0xf7,0xc6,0x33,0xc1,0xe7,0xd2,0xbf, +0x56,0xf4,0xdf,0x87,0x1e,0x04,0xf8,0x67,0xa5,0xe9,0xc9,0xa9,0xbc,0x37,0x52,0x5a, +0x06,0x5b,0x69,0x75,0x46,0x12,0x3f,0x27,0x71,0x08,0x9d,0x33,0x9f,0x41,0x9a,0xcc, +0xf8,0xa1,0xf0,0xef,0xc2,0xbf,0x12,0x7c,0x27,0x27,0x88,0xed,0x74,0x9b,0x8b,0xeb, +0xbb,0x48,0x24,0x68,0x62,0xd3,0xf1,0x6d,0x34,0xac,0x38,0x2a,0xc0,0xae,0x72,0xb8, +0xce,0x08,0xcf,0xe7,0x5e,0x0c,0xb3,0xcc,0x2d,0x7a,0x89,0x3a,0x4d,0x45,0xbb,0x29, +0x6d,0xaf,0x4f,0xe9,0xb3,0xea,0xa8,0xf0,0xfe,0x63,0x81,0xa5,0x29,0x47,0x10,0xa5, +0x24,0xae,0xe9,0xbb,0xb4,0xd7,0x5b,0xef,0xf2,0xb2,0x3f,0x11,0xbc,0x4d,0x7d,0xa7, +0xea,0x5a,0xa3,0x5c,0xe9,0xd6,0x0d,0xa6,0xc7,0x22,0x83,0x2d,0xb6,0xec,0xa2,0x49, +0xfc,0x5b,0x3d,0x17,0x3d,0x01,0xe9,0x59,0x55,0xee,0xbf,0xb4,0x87,0xc1,0x5d,0x5f, +0xc3,0x1a,0xfd,0xd6,0xbf,0x69,0xe1,0xfb,0xdb,0x1d,0x2a,0x63,0xba,0xe6,0x36,0x85, +0xb1,0x6d,0x27,0xa9,0xe3,0xa1,0x18,0x39,0xe9,0x9c,0xd7,0x85,0x52,0xa8,0xb9,0x66, +0xd3,0x67,0xd6,0xe0,0xaa,0xc6,0xbe,0x1a,0x15,0x20,0x9a,0x4d,0x75,0xbd,0xfb,0x5b, +0x5d,0x74,0x0a,0x28,0xa2,0xb2,0x3b,0x82,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x0f, +0xdb,0x69,0x14,0xee,0x3d,0xe9,0x98,0xe7,0x15,0x7a,0x48,0x6a,0xbe,0xc2,0x2b,0xe1, +0x8f,0x6e,0xe0,0xab,0xed,0xcd,0x4a,0x94,0xc5,0xa9,0x56,0x98,0x0e,0x51,0x52,0xa0, +0xa6,0x2f,0xa5,0x4a,0x8b,0x81,0x40,0x89,0x63,0x5e,0xf5,0x66,0x35,0xc5,0x43,0x1a, +0x9e,0x95,0x61,0x68,0x24,0x91,0x05,0x4c,0x95,0x1a,0x76,0xa9,0x54,0x50,0x07,0x9c, +0xfc,0x4e,0xf8,0x89,0xf0,0xe3,0xe0,0xa6,0xef,0x11,0xf8,0x99,0x74,0xfb,0x2d,0x52, +0xe0,0x7c,0x8f,0x15,0xaa,0xbd,0xe4,0xe4,0x71,0xc6,0x06,0x4f,0xd6,0xbe,0x41,0xf8, +0x91,0xfb,0x67,0x7c,0x45,0xf8,0xeb,0x75,0x26,0x87,0xf0,0xaf,0x42,0xd4,0x6c,0x6c, +0x18,0xed,0x79,0xad,0x23,0x69,0x6e,0xe4,0xe7,0xbb,0x0e,0x10,0x7b,0x7e,0xb5,0xf5, +0x67,0xc5,0x1f,0xd9,0x73,0xc1,0x7f,0x19,0x7c,0x63,0xa7,0xeb,0xfe,0x26,0x5b,0xd9, +0xe6,0xb4,0x84,0x40,0x6d,0xa2,0x9b,0x6c,0x52,0x28,0x24,0x8d,0xdc,0x64,0x75,0xed, +0x5f,0x3d,0xf8,0xd3,0xc4,0xdf,0x18,0xaf,0xbc,0x55,0xa9,0x7c,0x32,0xf8,0x47,0xe0, +0x98,0xbc,0x0f,0xa1,0xd9,0x48,0x60,0x6b,0xeb,0x58,0x3c,0xb7,0x64,0xe9,0xe6,0x34, +0xc7,0x80,0x0f,0x5c,0xf2,0x6b,0x9e,0x7c,0xd7,0xec,0x8f,0x5b,0x0e,0xa9,0xc9,0x26, +0xb5,0x92,0xde,0xfb,0x23,0xc0,0xb5,0xaf,0x85,0xda,0x67,0x81,0x2f,0xbe,0xdf,0xf1, +0xa7,0x5e,0xbb,0xb8,0xd7,0x24,0x5f,0x31,0x7c,0x37,0xa6,0xcf,0xe7,0x5f,0x3e,0x7a, +0x79,0xd2,0x9c,0xac,0x23,0xd8,0xf3,0x58,0x7a,0x0f,0xc0,0x6f,0x15,0xfc,0x74,0xd4, +0x6f,0xf5,0x2f,0x01,0xf8,0x2e,0x5d,0x37,0xc3,0x91,0x0f,0xdd,0xa3,0x4c,0x59,0x06, +0xd1,0xce,0x65,0x7f,0xbc,0xde,0xa0,0x57,0xd8,0x1f,0x0b,0xff,0x00,0xe0,0x9d,0xba, +0x75,0xbd,0xf2,0x6b,0x3f,0x11,0x35,0xc9,0xfc,0x43,0xaa,0xc8,0x7c,0xd9,0xad,0xe0, +0x73,0xe5,0xb3,0xf5,0xf9,0xa4,0x3c,0xb7,0xe9,0x5d,0x17,0xed,0x81,0xf1,0x9e,0x1f, +0x83,0x3e,0x05,0xd3,0xfe,0x1e,0x78,0x19,0x22,0xb2,0xf1,0x06,0xac,0xbf,0x67,0x8a, +0xda,0xc9,0x40,0x36,0x96,0xe7,0x8c,0x80,0x3a,0x33,0x12,0x00,0xfc,0x4d,0x63,0xc9, +0xa5,0xde,0x8b,0xf1,0x3a,0x95,0x7b,0xcd,0x46,0x9b,0xbb,0xfc,0x0f,0xcd,0x8b,0x1f, +0x02,0x6a,0xba,0xb7,0x88,0x97,0x45,0xb2,0xb5,0x96,0xea,0xff,0x00,0xce,0x36,0xe2, +0x08,0x54,0xb3,0x6f,0xce,0x08,0xc0,0xaf,0xd1,0x3f,0xd9,0x7b,0xf6,0x21,0x5f,0x06, +0xd9,0xc7,0xab,0xf8,0xc9,0x15,0xee,0xe6,0x4c,0xae,0x9c,0x8d,0x92,0xb9,0x1d,0x5d, +0x87,0x7f,0x61,0x5e,0x9b,0xfb,0x25,0xfe,0xce,0xfa,0x7f,0xc1,0xdf,0x02,0xd8,0x5d, +0xdf,0xd8,0xa3,0xf8,0xb2,0xfa,0x31,0x35,0xdd,0xcc,0xab,0xba,0x48,0x8b,0x73,0xe5, +0x82,0x7a,0x11,0x9e,0x7d,0xeb,0xe8,0x18,0xc6,0x17,0x9a,0x70,0xa5,0xd6,0x46,0x18, +0x8c,0x5b,0xbb,0x85,0x3f,0xbc,0xfc,0xe6,0xfd,0xa6,0x3f,0x67,0xff,0x00,0xf8,0x56, +0x3a,0xc7,0xda,0x20,0x9b,0xcc,0xd3,0x6f,0xdd,0xda,0xcc,0x91,0x96,0xe0,0x64,0xa1, +0x3e,0xa3,0xf5,0xaf,0x96,0xef,0xed,0xa7,0x8e,0xf9,0x8b,0x23,0xe0,0x74,0x66,0x1d, +0x2b,0xf5,0x6b,0xf6,0xaa,0xf8,0x6f,0x37,0xc4,0x2f,0x85,0xb7,0xa6,0xd1,0x77,0x5f, +0x69,0x81,0xee,0xa2,0x00,0x72,0xcb,0xb7,0xe7,0x03,0xdf,0x03,0x8f,0xa5,0x7e,0x61, +0xea,0x50,0xb4,0x72,0x4f,0x0b,0x2e,0x24,0x8c,0xe7,0x69,0xc9,0x38,0xe8,0x0f,0xe9, +0x5f,0x17,0x99,0x51,0x78,0x5a,0xfe,0xe2,0xf7,0x59,0xeb,0xe0,0xaa,0x7d,0x62,0x97, +0xbc,0xfd,0xe4,0x73,0xf2,0xfd,0x9e,0x7c,0x24,0x87,0x64,0xbd,0x9d,0x7a,0xd6,0x75, +0xe4,0x33,0xc7,0x1c,0xb1,0x79,0x9e,0x5b,0x30,0xf9,0x26,0x1c,0x8f,0xcb,0xd6,0x9f, +0xac,0x5b,0xb0,0x19,0xe4,0x66,0xab,0x47,0xa9,0xfe,0xec,0xc5,0x20,0xde,0x3f,0xda, +0xae,0x18,0xae,0xa8,0xea,0x7e,0x67,0x41,0xf0,0xff,0x00,0xe2,0x5f,0x8c,0x3e,0x17, +0x78,0x86,0x1b,0xef,0x0e,0xea,0x77,0x56,0xa6,0xd4,0x19,0xc4,0xb0,0xc9,0x84,0x62, +0x57,0x6b,0x6f,0x8f,0x3b,0x5b,0x83,0xdc,0x57,0xda,0x1f,0x01,0xff,0x00,0xe0,0xa5, +0x96,0xad,0x69,0x06,0x9f,0xf1,0x2e,0x06,0x77,0x2f,0xb5,0x75,0xcd,0x36,0x1c,0xa8, +0x5c,0x60,0x79,0xb1,0x8e,0x73,0x9e,0xe3,0xf2,0xaf,0x83,0x1a,0xed,0x23,0x53,0xd4, +0xa1,0xf6,0xcf,0xe7,0x50,0x49,0x74,0x91,0xda,0xa2,0x45,0x1c,0x4a,0x8b,0x92,0x0a, +0x28,0x04,0xe7,0xd7,0xd6,0xbd,0xbc,0x3e,0x36,0x70,0xd2,0xdf,0xe5,0xff,0x00,0x00, +0xf3,0xeb,0x61,0xe1,0x3d,0x59,0xfb,0xc9,0xe1,0x7f,0x14,0x69,0x3e,0x34,0xd0,0xed, +0xb5,0x8d,0x0f,0x50,0x87,0x54,0xd3,0x2e,0x46,0xe8,0xae,0xad,0xdc,0x32,0x30,0xff, +0x00,0x1f,0x6a,0xd7,0x55,0xaf,0xc5,0x7f,0xd9,0x9b,0xf6,0xa3,0xf1,0x0f,0xec,0xfb, +0xe2,0xc8,0xa5,0xb6,0x79,0x2f,0x7c,0x39,0x71,0x26,0x2f,0xf4,0x87,0x62,0x55,0x81, +0xea,0xf1,0xf6,0x57,0x1e,0xbd,0xeb,0xf6,0x4f,0xc2,0x7e,0x28,0xd3,0xbc,0x67,0xe1, +0xbd,0x37,0x5c,0xd2,0xa7,0xfb,0x46,0x9f,0xa8,0x40,0xb3,0xc1,0x26,0x31,0x95,0x61, +0xdf,0xdf,0xb7,0xe1,0x5f,0x49,0x4a,0xa2,0xa9,0x1b,0xa3,0xc5,0xab,0x49,0xd3,0x7e, +0x46,0xbd,0x14,0x53,0x96,0xb6,0x39,0xc1,0x7a,0x51,0x45,0x14,0x14,0x14,0x0c,0x96, +0xa2,0xa5,0x51,0x81,0x48,0xa4,0x79,0x0f,0xed,0x4b,0xa8,0x26,0x9f,0xf0,0x57,0x5f, +0x56,0x6d,0xad,0x71,0xb2,0x15,0xf7,0x25,0x81,0xc7,0xe9,0x5f,0x99,0x7a,0x84,0x6d, +0x35,0xc4,0xb8,0x1c,0xe6,0xbe,0xf6,0xfd,0xb8,0x75,0xa3,0x6f,0xe1,0x3d,0x17,0x4c, +0x57,0xc1,0xb8,0xb9,0x79,0x5d,0x7b,0xe1,0x46,0x33,0xf9,0x9a,0xf8,0x75,0xed,0x1a, +0x4b,0xad,0x88,0xbb,0x99,0x8f,0x02,0xbc,0x9c,0x56,0xb3,0x48,0xfa,0x4c,0xb6,0x3c, +0xb4,0x9b,0xee,0x68,0xfc,0x30,0xf0,0x8c,0xba,0xff,0x00,0x8a,0x2c,0x2c,0xfe,0x6d, +0xb2,0x4a,0xa1,0x82,0x75,0x23,0x3d,0x2b,0xd6,0xff,0x00,0xe0,0xa0,0x3f,0xb3,0xdf, +0x86,0x6d,0x3c,0x13,0xa2,0x78,0x9b,0xed,0xf6,0x36,0x3a,0xf4,0x36,0xe2,0xd7,0xec, +0x37,0x23,0xe6,0xbc,0x51,0x8c,0x6c,0x03,0xba,0xe4,0xe7,0xb7,0x35,0xe9,0x1f,0xb2, +0x1f,0xc1,0xb7,0x9b,0x52,0x5f,0x13,0x5e,0x47,0x9b,0x7b,0x7f,0xf5,0x5b,0x87,0x0c, +0xfe,0xdf,0x4a,0xf9,0xdb,0xfe,0x0a,0x23,0x27,0x8b,0x97,0xe3,0x1c,0xeb,0xae,0x48, +0xdf,0xd8,0x10,0xc5,0x9d,0x24,0xb2,0x6d,0x8d,0x62,0x60,0x37,0x6d,0x3d,0xce,0x47, +0x3f,0x85,0x76,0x60,0x69,0x7b,0xdc,0xec,0xc3,0x1d,0x5f,0x9a,0x4a,0x9c,0x5e,0xdb, +0x9f,0x03,0xf8,0xb0,0x59,0x69,0x73,0x5c,0x59,0x47,0x3c,0x71,0x28,0x6d,0x92,0x2d, +0xba,0x7c,0xc4,0xf7,0x00,0x9a,0xe2,0xf5,0xcd,0x48,0xc9,0x6f,0x05,0xb2,0x0d,0x91, +0x42,0x36,0x22,0x7b,0x0f,0x5a,0xdb,0xf1,0xd6,0xb9,0x15,0xde,0xa3,0x38,0x82,0x20, +0xa8,0xcd,0x92,0xe5,0x70,0x4d,0x62,0x69,0x3a,0x6c,0x9a,0xd4,0xb2,0xc9,0xb4,0x2c, +0x51,0xf0,0xc5,0x8d,0x7b,0xbe,0x47,0x95,0x27,0x7d,0x0e,0xeb,0xe0,0x7c,0xd0,0x68, +0x3e,0x20,0xb5,0xd4,0xae,0x54,0x30,0xf2,0xee,0x25,0xe7,0xb0,0x58,0x5c,0x03,0xff, +0x00,0x7d,0x11,0x5b,0x5a,0x0f,0x8d,0xd9,0xbc,0x41,0x7b,0xab,0x5c,0x4b,0xb6,0x36, +0xc1,0x66,0x63,0xd1,0x57,0xa0,0xae,0x37,0x50,0x90,0x78,0x7e,0x34,0xb7,0x82,0x4c, +0xcd,0x35,0xa8,0x8f,0x6a,0xff,0x00,0x08,0x66,0xc9,0x1f,0x88,0x03,0xf3,0xa7,0x78, +0x53,0x41,0xbd,0xf1,0x96,0xaf,0x6f,0xa6,0x59,0x42,0xd3,0x26,0xf0,0xbb,0x10,0x7f, +0xac,0x7f,0x4f,0xa5,0x75,0x43,0xdd,0x56,0x41,0xa2,0x56,0x3d,0x9b,0xe0,0xef,0x87, +0x75,0x0f,0x89,0x5f,0x10,0xa0,0x7b,0x68,0x98,0xf9,0xf3,0x6f,0x1b,0x7a,0x22,0x0e, +0x95,0xfa,0x05,0x6f,0xac,0x41,0xf0,0xde,0xf3,0xc3,0xde,0x19,0xd0,0xf3,0x35,0xcf, +0xda,0x52,0x4b,0xb9,0x31,0xc8,0x5c,0xfc,0xd9,0x35,0xe0,0x3e,0x1d,0xd6,0x3c,0x2b, +0xfb,0x2f,0xf8,0x16,0x48,0x6e,0x2e,0x04,0xde,0x2d,0xb8,0x84,0x6e,0x58,0xd7,0x3b, +0x58,0x8c,0x6d,0x53,0xd8,0x0a,0x5f,0x03,0xf8,0xbb,0x55,0xf1,0xc7,0x8d,0x34,0xcd, +0x65,0xee,0x19,0x34,0xf8,0x95,0x21,0x3b,0x06,0x72,0xd9,0xce,0x4d,0x76,0x45,0x25, +0xee,0xb2,0x19,0xf6,0x1f,0xed,0x17,0xa1,0x5a,0xea,0xd6,0xb6,0x97,0x73,0xa2,0xbd, +0xbc,0x92,0x2c,0x72,0xb7,0x70,0xa7,0xa3,0x03,0xf5,0xaf,0x4c,0xf0,0x0e,0xfb,0x3f, +0x01,0xe9,0xd6,0xf2,0x93,0x98,0x10,0x46,0xa4,0xf7,0x5c,0x71,0xfa,0x57,0x90,0x7c, +0x7d,0xd7,0x16,0x6f,0x84,0xf7,0x02,0x17,0xcd,0xca,0xc9,0x08,0x52,0x3a,0x93,0x9e, +0x95,0xeb,0x9e,0x08,0x76,0xbd,0xf0,0x1e,0x84,0xc3,0x86,0x65,0x89,0x5f,0xd8,0xf1, +0x9a,0xe0,0xa9,0xfc,0x25,0x17,0xd1,0x92,0xfa,0x1e,0xb1,0x6b,0xff,0x00,0x1e,0xf1, +0x7f,0xba,0x3f,0x95,0x48,0xcb,0xb8,0x50,0xab,0xb5,0x42,0x8e,0xdc,0x52,0xd7,0x8c, +0x62,0xc8,0xfa,0x7d,0x69,0x8c,0xa7,0x9c,0x54,0xac,0xbb,0xbe,0xb4,0xd3,0xce,0x45, +0x00,0x43,0xc5,0x26,0x76,0x9f,0x6a,0x73,0x2e,0xda,0x6d,0x58,0x86,0xb6,0x17,0xe6, +0xfe,0x1a,0x82,0x45,0x3c,0x9c,0x75,0xab,0x3d,0x46,0x0d,0x46,0xc3,0x2b,0x8e,0xe2, +0xa8,0x82,0xa1,0x18,0xa8,0x18,0x62,0xad,0x32,0xf7,0xa8,0x24,0xf9,0x4e,0x4f,0x4a, +0x62,0x3f,0x37,0xbf,0xe0,0xa1,0x9e,0x34,0x3a,0xd7,0xc5,0x2b,0x1d,0x0a,0x33,0xfb, +0x9d,0x26,0xd8,0x2b,0x0c,0xff,0x00,0xcb,0x47,0xf9,0x89,0xfc,0xb1,0x5f,0x28,0x57, +0xa6,0x7e,0xd1,0xde,0x20,0x6f,0x12,0xfc,0x66,0xf1,0x4d,0xe9,0x39,0x53,0x7d,0x2a, +0x2f,0xfb,0xaa,0xc5,0x47,0xe8,0x05,0x79,0x9d,0x7d,0xde,0x16,0x1e,0xce,0x8c,0x63, +0xe4,0x7f,0x5f,0x70,0xfe,0x15,0x60,0xf2,0xbc,0x3d,0x15,0xd2,0x2a,0xfe,0xaf,0x57, +0xf9,0x85,0x14,0x51,0x5d,0x27,0xd0,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x1e, +0xf5,0xf0,0x53,0xf6,0xd0,0xf8,0x87,0xf0,0x5e,0xd6,0x1d,0x36,0x0b,0xb8,0xf5,0xed, +0x06,0x2c,0x05,0xd3,0x75,0x3c,0xb7,0x96,0xbe,0x91,0xc8,0x3e,0x65,0x1e,0xdc,0x81, +0xd8,0x57,0xe9,0x77,0xec,0xef,0xf1,0x4b,0x5c,0xf8,0xcb,0xf0,0xe6,0xd7,0xc5,0x7a, +0xcf,0x87,0xa3,0xf0,0xe2,0x5e,0xb9,0x36,0x96,0xeb,0x39,0x94,0xcb,0x10,0xe3,0xcc, +0x39,0x51,0x80,0x4e,0x71,0xea,0x00,0x3d,0xeb,0xf2,0x27,0xe0,0xef,0xc3,0xf9,0x7e, +0x2a,0x7c,0x50,0xf0,0xd7,0x85,0x22,0x2c,0xa3,0x53,0xbc,0x58,0xa5,0x65,0x38,0x2b, +0x10,0xcb,0x4a,0xc3,0xdc,0x22,0xb1,0xfc,0x2b,0xf6,0xe7,0x49,0xd2,0xed,0xb4,0x4d, +0x2e,0xd3,0x4f,0xb2,0x85,0x2d,0xec,0xed,0x62,0x58,0x21,0x8a,0x31,0x85,0x44,0x50, +0x00,0x00,0x7a,0x60,0x57,0xca,0xe6,0xd1,0xa3,0x4d,0xa5,0x18,0xfb,0xcc,0xfc,0x33, +0x8f,0xa9,0xe5,0xf8,0x69,0x53,0x85,0x1a,0x49,0x56,0x9e,0xad,0xad,0x34,0xf4,0x5a, +0x5d,0xbe,0xbe,0x45,0xba,0x28,0xa2,0xbe,0x70,0xfc,0x74,0x28,0xa2,0x8a,0x00,0x28, +0xae,0x17,0xc3,0xbf,0x11,0xa3,0xf1,0xc4,0xfe,0x3a,0xd3,0x74,0x79,0x11,0x35,0x2f, +0x0e,0xdf,0x36,0x9e,0x09,0x1b,0xc1,0x7f,0x21,0x24,0x56,0x23,0xd3,0x73,0x32,0xff, +0x00,0xc0,0x0d,0x67,0xfc,0x0d,0xf8,0xe1,0xa4,0x7c,0x6b,0xf0,0xec,0xf7,0x16,0xab, +0xf6,0x1d,0x73,0x4e,0x94,0xda,0xea,0xda,0x4c,0x8d,0x99,0x2d,0x27,0x52,0x43,0x0f, +0x75,0x24,0x1c,0x37,0xb7,0xad,0x6a,0xe9,0x4d,0x27,0x2b,0x6d,0xfa,0x9d,0xd2,0xc1, +0x62,0x21,0x4e,0x55,0x1c,0x74,0x8d,0xaf,0xe5,0xcc,0xae,0xaf,0xe4,0xff,0x00,0xae, +0x87,0xa5,0x51,0x45,0x15,0x91,0xc2,0x14,0x51,0x45,0x00,0x78,0x57,0xed,0xb9,0xe1, +0xfb,0x4f,0x10,0x7e,0xcd,0x3e,0x2f,0xfb,0x52,0x6e,0x7b,0x28,0xe2,0xbc,0x81,0xb1, +0x92,0x92,0x2c,0x8a,0x01,0x1f,0x83,0x30,0xfc,0x6b,0xf1,0xfa,0xbf,0x54,0xff,0x00, +0xe0,0xa1,0x9f,0x13,0x2d,0x7c,0x1d,0xf0,0x2e,0xe3,0xc3,0xe2,0x55,0x3a,0x9f,0x89, +0x26,0x4b,0x68,0xe2,0xcf,0xcc,0x21,0x46,0x57,0x91,0xfe,0x9f,0x2a,0xaf,0xfc,0x0a, +0xbf,0x2b,0x2b,0xec,0xb2,0x88,0xc9,0x61,0xdb,0x7b,0x36,0x7f,0x44,0x78,0x7f,0x4e, +0xac,0x32,0xb9,0xca,0x7b,0x4a,0x6d,0xaf,0x4b,0x25,0xf9,0xa6,0x65,0xf8,0x8a,0x2f, +0x33,0x4f,0x0f,0xdd,0x1c,0x1f,0xc0,0xf1,0xfe,0x15,0xcc,0xd7,0x61,0xaa,0x27,0x99, +0xa7,0x5c,0x0f,0xf6,0x33,0xf9,0x73,0xfd,0x2b,0x8f,0xaf,0x5a,0x5b,0x9f,0x97,0x78, +0x99,0x86,0x54,0xb3,0x78,0x56,0x5f,0x6e,0x0a,0xfe,0xa9,0xb5,0xf9,0x58,0x28,0xa2, +0x8a,0x83,0xf2,0x30,0xa2,0x8a,0x28,0x00,0xa2,0x8a,0x28,0x00,0xa2,0x8a,0x28,0x00, +0xa2,0x8a,0x28,0x03,0xbc,0xd3,0xd8,0x7c,0x44,0xf0,0xa0,0xd2,0xe4,0x60,0xde,0x24, +0xd1,0x20,0x69,0x2c,0x24,0x66,0x3b,0xaf,0x2c,0xd4,0x16,0x7b,0x7f,0x77,0x8c,0x65, +0xd3,0xfd,0x9d,0xcb,0xd8,0x57,0x07,0x56,0x34,0xed,0x46,0xeb,0x47,0xd4,0x2d,0xaf, +0xac,0x6e,0x24,0xb4,0xbc,0xb6,0x91,0x65,0x86,0x78,0x58,0xab,0xc6,0xea,0x72,0x18, +0x11,0xd0,0x83,0x5f,0x54,0x7c,0x2f,0xfd,0x9b,0x3f,0xe1,0x6e,0xf8,0xaa,0xd3,0x56, +0x8f,0x43,0x99,0x6f,0x75,0x08,0xd6,0xe6,0x6d,0x17,0x85,0x82,0x09,0x89,0xfd,0xe4, +0x8c,0x47,0xdd,0x89,0x8e,0x18,0x29,0xe9,0xbb,0x6f,0x38,0x02,0xaa,0x95,0x29,0x49, +0xbb,0x69,0x1d,0xdb,0x7b,0x2f,0x53,0x8b,0x19,0x8d,0xa5,0x84,0x82,0x94,0xee,0xe4, +0xf4,0x49,0x6a,0xe4,0xfb,0x24,0x7c,0xe5,0xe0,0x7f,0x06,0xdf,0x78,0xb7,0x5c,0xb1, +0x86,0x2b,0x39,0xe5,0xb2,0x69,0xd5,0x67,0x9d,0x23,0x25,0x11,0x73,0xf3,0x64,0xf4, +0xe9,0x5f,0x67,0xc3,0x0a,0x5b,0xc4,0x91,0x44,0xa1,0x23,0x45,0x0a,0xaa,0x3b,0x01, +0xc0,0x15,0xf5,0xb7,0xc3,0xff,0x00,0xd8,0xdf,0xc3,0xba,0x16,0x9f,0x08,0xd7,0x67, +0x6b,0xd9,0x54,0x0f,0xf4,0x4b,0x2f,0xdc,0x5b,0xa7,0xb0,0xc7,0x27,0xeb,0xc5,0x7a, +0x44,0x7f,0x00,0xbe,0x1f,0x45,0x6f,0xe4,0x8f,0x0b,0xd9,0x95,0xc6,0x32,0xc5,0xd9, +0xbf,0xef,0xa2,0xd9,0xfd,0x6a,0xa9,0xe7,0x98,0x1c,0x0b,0x71,0x85,0xe6,0xdf,0x54, +0xac,0xbf,0x16,0x7c,0xc6,0x61,0x90,0x66,0xb9,0xe3,0x8d,0x4a,0xaa,0x34,0xa3,0x1d, +0xa2,0xdb,0x6f,0x5e,0xf6,0x56,0x3e,0x04,0xad,0xaf,0x05,0xe9,0x36,0x5a,0xf7,0x8b, +0x34,0x9d,0x3f,0x52,0xbb,0x5b,0x0b,0x0b,0x8b,0x94,0x8e,0x7b,0x86,0x60,0xa1,0x10, +0x9e,0x79,0x3d,0x3e,0xbe,0xf5,0xf4,0x6f,0x8b,0x3e,0x01,0xf8,0x07,0x56,0xf1,0x74, +0xde,0x18,0xd2,0x1e,0xff,0x00,0xc3,0xba,0xf9,0xb6,0xfb,0x5d,0xbe,0xf0,0xd2,0xda, +0xcc,0xbd,0xf6,0x96,0x24,0x9c,0x71,0x9e,0x78,0xaf,0x0e,0xf1,0x67,0xc3,0xbd,0x4b, +0xe1,0x4f,0x89,0xa0,0x87,0xc4,0x96,0x3f,0x68,0xb5,0x56,0xf3,0x22,0x78,0xb9,0x86, +0xec,0x02,0x0e,0xdd,0xc7,0xa0,0xf5,0x07,0x91,0xe9,0x5f,0x45,0x43,0x33,0xa1,0x8d, +0x8b,0x85,0x36,0xe3,0x36,0xae,0x93,0xd1,0xfa,0xae,0x8c,0xf8,0x2c,0x56,0x47,0x8a, +0xcb,0x2a,0x2a,0x95,0xe2,0xa7,0x4e,0x32,0xb3,0x69,0xde,0x3a,0x3d,0x53,0xea,0xbe, +0xef,0x43,0xed,0x0d,0x12,0xc3,0xc3,0x5e,0x07,0xf0,0x94,0x17,0xbe,0x1a,0xd2,0x85, +0xf5,0xa2,0xc6,0xa9,0x03,0x69,0xa8,0x25,0x96,0x65,0x27,0x1f,0x7c,0x9e,0x46,0x7a, +0x92,0x71,0x58,0x9a,0xae,0xbb,0xe3,0x0f,0x11,0x1d,0x52,0xda,0xc3,0xec,0xda,0x4c, +0xb6,0x70,0x2c,0xaf,0x61,0x6d,0x20,0x96,0xec,0xef,0xdd,0x85,0x69,0x70,0x52,0x36, +0xc2,0x93,0xb4,0x06,0x3d,0x39,0x19,0xcd,0x56,0xf8,0x07,0xf1,0x0a,0x5f,0x88,0x1e, +0x0f,0x4b,0x3b,0xcd,0x2b,0xec,0x2d,0x6b,0x6e,0xa8,0x65,0x8c,0x2a,0x45,0x32,0x92, +0xca,0x0c,0x68,0x39,0x00,0x6d,0xeb,0x8c,0x67,0x38,0xad,0xdb,0x79,0x2d,0x3e,0x1b, +0xc9,0x21,0xb8,0x87,0x4f,0xdd,0x79,0x26,0xe7,0x9a,0xdd,0x82,0x5d,0x4e,0xa0,0x9f, +0x9d,0x93,0xf8,0xca,0x83,0x93,0xb7,0xdc,0xe2,0xbf,0x31,0x9c,0x25,0x42,0xbd,0x4a, +0x75,0x63,0xcd,0x51,0x3e,0xba,0xdf,0xf4,0xdb,0xe7,0xaf,0x43,0xf7,0x1a,0x55,0x21, +0x8a,0xc3,0x52,0xab,0x46,0x5c,0xb4,0x9a,0xe8,0xb9,0x6d,0xa7,0xa5,0xf7,0xf9,0x69, +0xd4,0xc6,0xd0,0xfc,0x26,0x9a,0x5c,0xfa,0x76,0xaf,0x0d,0xc4,0x57,0xad,0x3a,0x0d, +0xb7,0x12,0x96,0x91,0xe5,0x72,0xbf,0x3a,0x34,0xad,0xb9,0xc7,0x23,0x2b,0x80,0x30, +0x41,0x53,0x5a,0x10,0x6a,0x11,0x78,0x1f,0x5a,0x82,0x79,0x4f,0xd9,0x34,0xed,0x45, +0xbc,0xbb,0x88,0x6e,0x2e,0x59,0xe4,0x49,0x33,0x85,0x9c,0x6e,0xf9,0xb6,0x9c,0x85, +0x63,0x8c,0x0f,0x90,0xf4,0xcd,0x53,0xba,0xd4,0x61,0xd4,0xf5,0x6d,0x48,0xe9,0xb0, +0xdc,0xc5,0x6d,0x03,0x87,0xb8,0x49,0x83,0x44,0x9f,0xbd,0x04,0x19,0xa2,0x65,0xe7, +0x6b,0x00,0x72,0xc3,0xa1,0xc3,0x7f,0x7a,0xb3,0xf4,0xdd,0x06,0x6b,0xeb,0x76,0xd2, +0x74,0xa4,0x8e,0x5b,0x5b,0x79,0x24,0x5b,0x9b,0xa0,0x43,0x3d,0xda,0xe4,0x0d,0x92, +0xb9,0xce,0x59,0x0e,0xe5,0x74,0xc8,0xdd,0x95,0x23,0x8e,0x2b,0x56,0x9c,0xee,0xeb, +0x3f,0x5f,0x4f,0xf3,0x5a,0x5b,0x4f,0xc0,0xcd,0x35,0x4e,0xca,0x84,0x75,0xbe,0x96, +0xef,0xb3,0xf9,0x3d,0x6f,0xaf,0xe2,0x72,0x7f,0x16,0x3e,0x17,0xa6,0x95,0xe2,0xab, +0xfd,0x7e,0xef,0x5a,0x92,0xea,0xcf,0x56,0x0d,0x12,0x69,0x97,0x31,0xbc,0xaa,0x32, +0x01,0x71,0xb8,0x92,0xa0,0x64,0x70,0xa4,0x74,0x27,0xd2,0xbf,0x3a,0xff,0x00,0x6a, +0x8f,0xd9,0xda,0x2f,0x01,0x4c,0x7c,0x55,0xe1,0xbb,0x7d,0x9a,0x05,0xc3,0xe2,0xea, +0xd5,0x79,0x16,0x92,0x13,0xc1,0x5f,0x44,0x3f,0xa1,0xf6,0x22,0xbf,0x5f,0xf4,0xff, +0x00,0x0b,0xb1,0xf0,0xd2,0x69,0x5a,0xb1,0x87,0x56,0x10,0x31,0x10,0xbd,0xc2,0x93, +0xb9,0x41,0xfd,0xde,0xff,0x00,0x52,0x06,0x01,0x3d,0xf1,0x5f,0x2f,0xf8,0xcf,0x45, +0xb3,0xf1,0x2d,0xa6,0xab,0xa3,0xea,0x16,0x70,0x8b,0x3b,0x95,0x92,0xda,0x68,0x23, +0x04,0xae,0x0e,0x41,0xc6,0x49,0xe7,0xd3,0xe8,0x2b,0x2a,0x78,0xc9,0xfb,0x44,0xdb, +0xbd,0xb4,0xf5,0x4b,0x63,0xb6,0x38,0x58,0x51,0x83,0xe4,0x8f,0x2f,0x33,0x6e,0xdb, +0xd9,0xbd,0xfb,0xf5,0xed,0xa1,0xf9,0x23,0x45,0x6e,0xf8,0xeb,0xc2,0x77,0x1e,0x05, +0xf1,0x8e,0xb1,0xa0,0x5d,0x1d,0xf2,0xe9,0xf7,0x2d,0x0e,0xf0,0x30,0x1d,0x41,0xf9, +0x5b,0xf1,0x52,0x0f,0xe3,0x58,0x55,0xf4,0xe9,0xa9,0x2b,0xa3,0x98,0x28,0xa2,0x8a, +0x60,0x14,0x51,0x45,0x00,0x7e,0xe7,0x4b,0x08,0xaa,0x92,0x47,0x8a,0xd6,0x68,0x7a, +0xe6,0xab,0x4b,0x1e,0x2b,0xe1,0xcf,0x60,0xcd,0xc6,0x0d,0x3d,0x69,0xf2,0x25,0x36, +0x82,0x87,0xaf,0x35,0x32,0x54,0x69,0xf9,0x54,0xab,0x40,0x89,0xe2,0xeb,0x53,0xa8, +0xa8,0x63,0xeb,0x53,0x2f,0x6a,0x04,0x4c,0xb5,0x32,0x0c,0xd4,0x49,0x53,0x47,0x40, +0x12,0x63,0x35,0x61,0x77,0x63,0x04,0xf1,0xe9,0x50,0x2d,0x58,0x5a,0x00,0x93,0x6b, +0x14,0x60,0xa7,0x0d,0x83,0x82,0x79,0xc1,0xaf,0x9e,0xfe,0x15,0x7e,0xc9,0x43,0xc3, +0xff,0x00,0x15,0xb5,0x3f,0x88,0xbe,0x36,0xd6,0x57,0xc5,0x3e,0x23,0x96,0x76,0x92, +0xcf,0xe5,0x22,0x38,0x06,0x78,0x62,0x0f,0x52,0x06,0x00,0x1d,0x05,0x7d,0x0a,0xbd, +0xc9,0xa9,0x63,0xeb,0x51,0x28,0xa7,0x6b,0x9d,0x14,0xea,0x4a,0x09,0xa8,0xf5,0x27, +0x8c,0x1d,0xc0,0xe7,0x35,0x3a,0x9e,0xc2,0xa1,0x5f,0xbc,0x28,0xb8,0x12,0xb5,0xbc, +0xc2,0x02,0x12,0x62,0x8c,0x11,0x9b,0xa0,0x6c,0x70,0x7f,0x3c,0x52,0xe8,0x41,0xca, +0x7c,0x4f,0xf8,0xbd,0xe1,0x8f,0x85,0x7a,0x3c,0xb7,0x3a,0xe5,0xea,0x2c,0xe6,0x32, +0x62,0xb2,0x8c,0x86,0x9a,0x63,0x8e,0x81,0x7d,0x3d,0xcd,0x7e,0x4e,0x7c,0x4a,0xf1, +0xa5,0xaf,0x88,0xbc,0x6d,0xa8,0x6a,0x76,0x96,0x8b,0xa5,0xc7,0x73,0x3c,0x93,0x2d, +0x9c,0x6d,0xb8,0x60,0xf3,0x8c,0xf7,0xfe,0x55,0xea,0xbf,0x14,0xbc,0x33,0xe2,0x5d, +0x6b,0xc6,0x9a,0xa4,0x5e,0x25,0xbe,0x7b,0x8d,0x50,0xdd,0x18,0x8d,0xad,0xb2,0xb4, +0x97,0x12,0x64,0xf1,0x81,0x8e,0x9d,0x3f,0x3a,0xe9,0x35,0x4f,0xd8,0x67,0x51,0xff, +0x00,0x85,0x25,0xe2,0x6f,0x15,0x5e,0x05,0xd1,0x75,0x9b,0x6b,0x16,0xba,0xb7,0xb3, +0x95,0x81,0x92,0x45,0x41,0x96,0x12,0xb1,0xe1,0x09,0x1d,0x00,0xe9,0xde,0xbe,0x5a, +0xb7,0xb4,0xcc,0x25,0xca,0xd5,0x92,0xfe,0xb5,0x3d,0xfc,0x3c,0x23,0x87,0xb5,0x9e, +0xb2,0x3e,0x4e,0xba,0xd7,0x22,0xb8,0x76,0x58,0xe3,0x13,0xa6,0x32,0xec,0x7a,0x03, +0xe8,0x2b,0x02,0x6d,0x4a,0xd5,0xb2,0x58,0xec,0x23,0xb7,0xa5,0x72,0x77,0x1e,0x25, +0xbd,0xd3,0xd8,0xa4,0x6e,0xd2,0x45,0x92,0xbb,0x36,0xf1,0xc5,0x66,0xdc,0x6b,0x8b, +0x21,0xdd,0x33,0x0b,0x76,0xeb,0xb4,0x01,0x93,0x51,0x4f,0x2d,0x94,0x6e,0x9e,0xc7, +0xd0,0xd5,0xc0,0xd6,0xe6,0xd2,0x4b,0xf4,0x3b,0x95,0xba,0x59,0x13,0x74,0x6f,0x95, +0xaa,0xf2,0xba,0xb7,0x2a,0x36,0xb5,0x71,0x36,0x3e,0x24,0x58,0x2e,0x98,0xf9,0x99, +0x88,0x8c,0x74,0xc1,0xad,0x53,0xe2,0x3b,0x73,0x32,0x85,0x6d,0xec,0x7b,0x0a,0xaf, +0xa9,0xce,0x32,0xb2,0x57,0x47,0x9e,0xe8,0xd4,0x5a,0x35,0xf7,0x1f,0x46,0xfe,0xc9, +0x7f,0x00,0x6e,0xbe,0x3b,0x7c,0x4e,0xb2,0xd3,0x5c,0x7f,0xc4,0x9a,0xcc,0x8b,0xad, +0x4a,0x52,0x76,0xe2,0x10,0x7e,0xe8,0x3f,0xde,0x63,0xc0,0xaf,0xd9,0xcd,0x2b,0x49, +0xb6,0xd1,0x74,0xdb,0x5b,0x0b,0x28,0x52,0xda,0xce,0xda,0x35,0x8a,0x18,0x63,0x18, +0x08,0xa0,0x60,0x01,0x5f,0x2a,0x7f,0xc1,0x37,0xfe,0x1a,0x58,0xf8,0x6f,0xe0,0x7a, +0x78,0xa1,0x1e,0x39,0xef,0xfc,0x43,0x21,0x91,0xa4,0x50,0x41,0x8e,0x34,0x3b,0x56, +0x33,0x91,0xd8,0x82,0x78,0xf5,0xaf,0xae,0x57,0xa0,0xaf,0x6b,0x0f,0x4f,0xd9,0xc3, +0x5d,0xcf,0x03,0x15,0x3e,0x69,0xf2,0xf4,0x40,0x06,0x28,0xa2,0x8a,0xea,0x38,0xc2, +0x8a,0x29,0xea,0xb4,0x86,0x27,0x0b,0xcd,0x52,0xd6,0xb5,0xeb,0x0f,0x0e,0xe9,0xb3, +0xea,0x1a,0x95,0xcc,0x76,0x56,0x50,0x2e,0xe9,0x26,0x95,0xb0,0xaa,0x2a,0xbf,0x8b, +0xe6,0xd5,0xad,0xfc,0x39,0xa8,0x49,0xa1,0x47,0x0c,0xba,0xc2,0xc2,0xc6,0xd6,0x3b, +0x83,0x84,0x69,0x31,0xc0,0x35,0xf9,0xdd,0xf1,0xaf,0xe2,0x67,0xc4,0x1f,0x10,0x6a, +0x97,0x1a,0x37,0x8d,0x27,0x36,0x8d,0x6a,0xe3,0xfe,0x25,0xf1,0xa8,0x45,0x53,0xd8, +0x90,0xbd,0x4d,0x61,0x56,0xa7,0xb3,0x57,0xb1,0xd9,0x87,0xc3,0xba,0xee,0xc9,0xd8, +0xe8,0xbf,0x69,0xcf,0x89,0x96,0x3f,0x12,0x3c,0x7e,0xef,0xa5,0x4f,0xf6,0x9d,0x36, +0xd2,0x15,0x82,0x29,0x39,0x01,0xcf,0x56,0x20,0x1f,0x7f,0xe5,0x5c,0x87,0xc2,0x6f, +0x00,0x5d,0x78,0xeb,0xc6,0x56,0x7a,0x74,0x08,0x70,0xef,0x99,0x1f,0xfb,0xab,0xdc, +0xd7,0x27,0xa0,0xe9,0x73,0x6b,0x17,0x1b,0x2d,0x54,0x4c,0xec,0x7e,0xe8,0x3c,0xf5, +0xaf,0xb9,0xff,0x00,0x65,0xdf,0x85,0xa9,0xe1,0x1d,0x2e,0x7d,0x56,0xec,0x03,0xa8, +0x5c,0x80,0x00,0xff,0x00,0x9e,0x6b,0x8e,0x95,0xe5,0xc2,0xf5,0xaa,0xdd,0x9f,0x41, +0x55,0xc7,0x09,0x42,0xd1,0x3d,0x8b,0xc2,0xfa,0x1d,0xa7,0x84,0xf4,0x2b,0x4d,0x32, +0xd1,0x02,0x41,0x02,0x04,0x1d,0xb2,0x47,0x53,0x5f,0x9a,0x3f,0xf0,0x54,0x2f,0x88, +0x1e,0x18,0xf1,0x57,0x8b,0x34,0xdd,0x27,0x49,0xb8,0x6b,0xbd,0x5b,0x4d,0x89,0xa2, +0xbc,0x96,0x27,0xcc,0x71,0x9c,0x82,0x10,0x76,0xcf,0x5c,0xe3,0xd6,0xbe,0xfc,0xfd, +0xa3,0xbc,0x47,0x07,0x84,0x7e,0x09,0xf8,0xc3,0x51,0x96,0xfb,0xfb,0x3d,0x93,0x4d, +0x99,0x22,0x98,0x30,0x0d,0xe6,0x32,0x90,0xa1,0x79,0x1c,0xe4,0xf6,0xaf,0xc1,0xdf, +0x14,0x5e,0x4d,0xab,0x6b,0x12,0xb4,0xf3,0xba,0x42,0xcc,0x77,0x4b,0xbb,0x2c,0x49, +0x3d,0x71,0x5e,0xf5,0x37,0x18,0x6a,0xcf,0x17,0x0f,0x84,0xaf,0x8a,0xbc,0xe9,0xc5, +0xbb,0x1c,0x36,0xa1,0xe6,0xb5,0xd3,0xed,0x8a,0x3d,0xdd,0x4e,0xf4,0xc7,0xe5,0x42, +0xce,0xf0,0xcc,0x59,0x21,0x61,0x03,0x95,0xf3,0x48,0x5c,0x28,0x35,0xd6,0x1f,0x05, +0x4d,0x79,0x2c,0x2b,0x0d,0xfc,0x72,0x41,0x23,0x00,0x64,0x71,0x80,0x07,0x73,0xf9, +0x57,0xd4,0x5f,0x0a,0x3e,0x19,0xf8,0x6b,0xc3,0xfa,0xb6,0x9a,0x4d,0xe4,0x77,0xfa, +0x0d,0xf2,0x36,0x1b,0x50,0x8f,0xca,0x13,0x44,0x14,0x83,0x80,0x72,0x18,0xee,0xea, +0x0e,0x08,0x15,0xe9,0xd0,0x7e,0xd9,0x5d,0x6c,0x4d,0x48,0x3a,0x6e,0xcf,0x73,0xe3, +0xdd,0x3f,0xc3,0xba,0x97,0xc4,0x7f,0x14,0x5d,0xc9,0x68,0x86,0x1b,0x6d,0xd8,0x33, +0x30,0xc2,0xc7,0x10,0xe0,0x7e,0x82,0xbd,0x6a,0x6d,0x3e,0xeb,0xc0,0xba,0x42,0x58, +0xf8,0x5e,0x23,0x0e,0xff,0x00,0x96,0x5b,0xd5,0x52,0xd7,0x52,0x28,0xc6,0x4a,0x01, +0xf7,0x54,0xfe,0x75,0xc2,0xf8,0xa3,0x56,0xbb,0xf0,0xd7,0x8e,0x7c,0x45,0xa4,0xf8, +0x42,0xec,0x49,0xa2,0xc7,0xa8,0x4d,0x15,0xaf,0x96,0x03,0x07,0x8c,0x39,0x0b,0x82, +0x7a,0xf1,0xc6,0x7d,0xab,0xaa,0xf0,0x8f,0xc4,0x0f,0x1f,0x78,0x2e,0xe2,0x29,0x2e, +0x2f,0x2e,0xf4,0xf8,0x1b,0x92,0x26,0x80,0x05,0x23,0xeb,0x8a,0xe9,0xa7,0x64,0x61, +0x66,0x8f,0xa7,0xf4,0x9f,0xf8,0x45,0xbf,0x69,0x8f,0x06,0x59,0xe8,0xfa,0xd4,0x37, +0x3a,0x17,0x8b,0x2d,0x61,0xc4,0x77,0x37,0x11,0xec,0xf3,0x88,0x18,0xce,0x7b,0xd7, +0x5f,0xfb,0x20,0xfc,0x23,0xf1,0x07,0x81,0x7c,0x69,0x7f,0xa2,0x6b,0x8f,0x05,0xe6, +0x8b,0x2d,0xbb,0xed,0x68,0xdf,0x78,0x0c,0x7b,0x91,0xd5,0x5b,0x81,0x5c,0x4f,0x82, +0x7f,0x68,0x6b,0xed,0x4a,0x18,0x52,0xf7,0xc3,0x2b,0xaa,0xcd,0xc1,0x17,0x70,0xcb, +0x10,0xdd,0xf5,0x3b,0xab,0xe9,0x6f,0x83,0xfe,0x2e,0xd2,0xb5,0xa9,0xb5,0x0d,0x44, +0xe8,0xd2,0xe8,0x97,0xf1,0x44,0x37,0x79,0xae,0xbb,0x64,0xcf,0xf7,0x48,0x3c,0xd7, +0x4c,0xac,0xd3,0x6b,0x72,0x0c,0x0f,0x88,0x16,0x5a,0xb4,0x56,0x7e,0x41,0xdf,0x77, +0x04,0x57,0x2b,0x30,0xdb,0xd0,0x32,0x92,0x30,0x6b,0xe9,0x2f,0x81,0xab,0x3d,0xc7, +0x87,0x60,0x86,0xe1,0xc3,0x11,0x22,0xb0,0xfe,0x75,0xf3,0x9e,0xb5,0xf1,0x03,0x4f, +0xd2,0x64,0xb9,0xb7,0xd5,0x25,0x52,0x27,0x7c,0x88,0x23,0x60,0x5f,0xaf,0x06,0xbe, +0x8f,0xf8,0x27,0xa8,0xdb,0xde,0x68,0xf6,0x2d,0x6a,0x19,0x51,0x8e,0x76,0xb7,0x5c, +0x56,0x58,0xab,0xfb,0x22,0x65,0xb1,0xec,0xf4,0x8d,0x4b,0x45,0x7c,0xe9,0x90,0xda, +0x63,0x0e,0x78,0xa7,0x9a,0x46,0xfb,0xb4,0x12,0x45,0x20,0xa8,0xfd,0x6a,0x6f,0x4a, +0x88,0xd5,0x21,0x8c,0xa6,0xbf,0x0d,0xf5,0xa7,0xb7,0x6a,0x6c,0x9d,0xb3,0x54,0x66, +0x57,0x90,0x60,0x9a,0xa7,0x7c,0xc5,0x6d,0x66,0x6f,0x44,0x63,0xfa,0x55,0xe9,0x7e, +0xf1,0x15,0x43,0x52,0x4d,0xf6,0x17,0x2b,0x92,0xb9,0x89,0xb9,0x5e,0xa3,0x83,0x56, +0x82,0x3b,0x9f,0x8a,0x3e,0x38,0xba,0x6b,0xef,0x16,0x6a,0x93,0xb7,0xde,0x92,0xe2, +0x46,0x3f,0x8b,0x13,0x58,0x35,0xaf,0xe2,0xc5,0xdb,0xaf,0xde,0xf7,0xfd,0xeb,0x75, +0xfa,0x9a,0xc8,0xaf,0xd0,0x63,0xf0,0xa3,0xfb,0x57,0x0c,0x92,0xa3,0x04,0xbb,0x2f, +0xc8,0x28,0xa2,0x8a,0xa3,0xa0,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0xfa,0xa7, +0xfe,0x09,0xbd,0xa1,0xc5,0xaa,0x7e,0xd0,0xd2,0x5d,0x4a,0x9b,0x86,0x9f,0xa4,0x5c, +0x4f,0x19,0xf4,0x90,0xbc,0x68,0x3f,0xf1,0xd6,0x6a,0xfd,0x4d,0xaf,0xca,0x1f,0xf8, +0x27,0xa7,0x8b,0xa0,0xf0,0xc7,0xed,0x19,0x65,0x6d,0x71,0x26,0xc4,0xd6,0x2c,0x27, +0xd3,0xd3,0x71,0xc2,0xf9,0x9f,0x2c,0x8b,0xf8,0xfe,0xe8,0x81,0xf5,0xf7,0xaf,0xd5, +0xea,0xf8,0xcc,0xda,0xff,0x00,0x58,0xd7,0xb2,0x3f,0x9c,0xb8,0xfa,0x33,0x59,0xba, +0x72,0xd9,0xc1,0x5b,0xf1,0xfd,0x42,0x8a,0x28,0xaf,0x14,0xfc,0xdc,0x2a,0x9e,0xb1, +0xa9,0xc3,0xa2,0xe9,0x37,0xba,0x85,0xcc,0x8b,0x15,0xbd,0xac,0x2f,0x34,0x8e,0xdd, +0x15,0x55,0x49,0x24,0xfe,0x55,0x72,0xbe,0x67,0xfd,0xbf,0x3e,0x2e,0x45,0xf0,0xe7, +0xe0,0x7d,0xe6,0x8d,0x6f,0x3e,0xcd,0x63,0xc4,0xd9,0xd3,0xe0,0x40,0x79,0x10,0xf1, +0xe7,0xbf,0xd3,0x61,0xdb,0x9f,0x57,0x5a,0xda,0x8d,0x37,0x5a,0xa4,0x69,0xae,0xa7, +0xa3,0x97,0x60,0xe7,0x98,0x62,0xe9,0x61,0x69,0xef,0x36,0x97,0xcb,0xab,0xf9,0x2d, +0x4f,0x00,0xfd,0x81,0x3e,0x35,0xcb,0xa9,0x7e,0xd0,0x1e,0x32,0xb0,0xbf,0x90,0xa2, +0x78,0xc5,0xe6,0xd4,0x23,0x46,0x3d,0x2e,0x15,0xda,0x40,0x33,0xfe,0xe3,0x38,0xc7, +0xb0,0xaf,0x31,0xf8,0xcd,0xe2,0xfd,0x7f,0xf6,0x6f,0xfd,0xae,0xbc,0x5b,0xaa,0x78, +0x56,0xe9,0xec,0x5f,0xed,0xc2,0xe8,0xc3,0x9f,0xdd,0x5c,0xc7,0x2a,0xac,0x8c,0x8e, +0xbd,0xd4,0xb3,0x35,0x78,0x57,0x81,0xfc,0x5d,0x7d,0xe0,0x1f,0x18,0x68,0xfe,0x22, +0xd3,0x5f,0xcb,0xbe,0xd3,0x6e,0xa3,0xb9,0x88,0xfa,0x95,0x20,0xe0,0xfb,0x1e,0x9f, +0x8d,0x7a,0x1f,0xed,0x55,0xf1,0x27,0x49,0xf8,0xb5,0xf1,0x7e,0xef,0xc5,0x1a,0x2b, +0xb3,0x59,0x5e,0xd9,0xdb,0x12,0x8e,0x08,0x68,0xe4,0x11,0x8d,0xe8,0x7d,0x76,0xb6, +0x46,0x7b,0xe2,0xbe,0xd3,0xea,0xdc,0xb8,0x97,0x2b,0x7b,0xb2,0x8d,0x9f,0xcb,0xfe, +0x01,0xfd,0x20,0xb2,0x75,0x4b,0x39,0x95,0x55,0x0b,0xd1,0xab,0x4f,0x96,0x4b,0xa5, +0xe2,0xd2,0x57,0xf5,0x8e,0xde,0x8c,0xfd,0x30,0xfd,0x9d,0xff,0x00,0x6a,0x4f,0x0a, +0xfe,0xd0,0x1a,0x34,0x62,0xce,0x65,0xd3,0x7c,0x49,0x14,0x79,0xbb,0xd1,0xe7,0x71, +0xbd,0x4f,0x76,0x8c,0xff,0x00,0x1a,0x7b,0x8e,0x47,0x7a,0xf6,0x7a,0xfc,0x14,0xd2, +0xb5,0x6b,0xdd,0x0b,0x50,0x82,0xff,0x00,0x4e,0xbb,0x9a,0xc6,0xf6,0x06,0x0f,0x15, +0xc5,0xbb,0x94,0x74,0x61,0xdc,0x11,0x5f,0x55,0xfc,0x37,0xff,0x00,0x82,0x90,0x7c, +0x41,0xf0,0x9d,0xac,0x36,0x7e,0x22,0xb3,0xb3,0xf1,0x5d,0xbc,0x60,0x2f,0x9f,0x36, +0x61,0xb9,0xc0,0xf5,0x75,0xe0,0x9f,0x72,0x09,0xaf,0x23,0x13,0x94,0xc9,0x3e,0x6a, +0x1a,0xae,0xc7,0xe7,0xf9,0xcf,0x00,0xd6,0x8d,0x47,0x57,0x2b,0x77,0x8b,0xfb,0x2d, +0xd9,0xaf,0x47,0xd5,0x7a,0xd9,0xfa,0x9f,0xa8,0x15,0xcb,0x7c,0x4a,0xf8,0x97,0xe1, +0xff,0x00,0x84,0xfe,0x13,0xbc,0xf1,0x17,0x88,0xef,0x92,0xca,0xc2,0xdd,0x72,0x06, +0x7e,0x79,0x5b,0xb2,0x22,0xff,0x00,0x13,0x1f,0x4a,0xf8,0x7f,0x5e,0xff,0x00,0x82, +0xa4,0x6a,0x33,0x58,0xb2,0xe8,0xbe,0x06,0xb6,0xb6,0xbb,0x3d,0x24,0xbe,0xbc,0x69, +0x50,0x7f,0xc0,0x54,0x2f,0xf3,0xaf,0x93,0x7e,0x2c,0x7c,0x6c,0xf1,0x87,0xc6,0xad, +0x68,0x6a,0x3e,0x2a,0xd5,0xa4,0xbe,0x31,0xe4,0x43,0x6c,0xbf,0x24,0x10,0x0f,0x44, +0x41,0xc0,0xfa,0xf5,0x35,0x8d,0x0c,0xa6,0xb4,0xe5,0xfb,0xdd,0x11,0xe6,0xe5,0x7c, +0x07,0x8f,0xc4,0x55,0x4f,0x1d,0xfb,0xb8,0x2d,0xf5,0x4d,0xbf,0x4b,0x5d,0x7c,0xdf, +0xdc,0x5f,0xfd,0xa0,0x3e,0x37,0x6a,0xdf,0x1e,0xbe,0x22,0x5e,0x78,0x8b,0x51,0xdd, +0x0d,0xa8,0xfd,0xcd,0x85,0x96,0xec,0xad,0xb4,0x00,0x9d,0xab,0xf5,0x39,0x24,0x9e, +0xe4,0x9a,0xf3,0x5a,0x28,0xaf,0xad,0x84,0x23,0x4e,0x2a,0x31,0x5a,0x23,0xf7,0xec, +0x3e,0x1e,0x96,0x16,0x94,0x68,0x51,0x8d,0xa3,0x15,0x64,0x88,0xae,0xc6,0xeb,0x59, +0xc7,0xac,0x6d,0xfc,0x8d,0x71,0x55,0xda,0xde,0x36,0xdb,0x39,0xcf,0xa4,0x6d,0xfc, +0x8d,0x71,0x54,0xa6,0x7f,0x3f,0x78,0xa5,0x6f,0xad,0x61,0x7b,0xf2,0xcb,0xf3,0x41, +0x45,0x14,0x56,0x67,0xe1,0xc1,0x45,0x15,0x35,0x95,0x9d,0xc6,0xa5,0x79,0x05,0xa5, +0xac,0x2f,0x71,0x75,0x3b,0xac,0x51,0x43,0x18,0xcb,0x3b,0xb1,0xc0,0x50,0x3d,0x49, +0x34,0x00,0x59,0xd9,0xdc,0x6a,0x37,0x70,0xda,0xda,0xc1,0x25,0xcd,0xcc,0xcc,0x12, +0x38,0x61,0x42,0xce,0xec,0x7a,0x00,0x07,0x24,0xd7,0x5f,0xff,0x00,0x0a,0xd5,0x34, +0xb8,0xe7,0x3e,0x23,0xf1,0x26,0x93,0xe1,0xeb,0x98,0x5b,0x69,0xd3,0x9d,0xa4,0xba, +0xbc,0x27,0xb8,0xf2,0xe1,0x56,0x54,0x23,0x1c,0xac,0x8e,0x87,0xda,0xad,0x6b,0x1a, +0xa4,0x7f,0x0d,0x6d,0xa7,0xd0,0x34,0x49,0x95,0xb5,0xf6,0x06,0x2d,0x5b,0x59,0x84, +0xfc,0xd1,0x9f,0xe2,0xb6,0x81,0x81,0xe1,0x57,0x18,0x67,0x18,0x2c,0x72,0x3a,0x0e, +0x78,0x0a,0xcf,0x59,0x6a,0xb4,0x45,0xe9,0x1d,0xf5,0x3a,0xe1,0xe1,0x8f,0x0a,0x4b, +0xf2,0xc7,0xe3,0x5d,0x8e,0x7f,0x8a,0xe3,0x48,0x95,0x13,0xf1,0x2a,0xec,0x7f,0x4a, +0x92,0xff,0x00,0xe1,0xb2,0x26,0x0e,0x95,0xe2,0xdf,0x0d,0x6b,0xaa,0x46,0xe3,0xe4, +0x5e,0xb5,0xab,0x2f,0xb1,0x17,0x49,0x17,0x3f,0xee,0xe6,0xb8,0xda,0x29,0xf2,0xbe, +0xe2,0xba,0xec,0x74,0xfa,0xa7,0xc3,0x1f,0x15,0xe8,0xfa,0x78,0xd4,0x2e,0x34,0x2b, +0xc6,0xd3,0x49,0xda,0x2f,0xad,0xd3,0xcf,0xb7,0x63,0xe8,0x25,0x4c,0xa9,0xfc,0xeb, +0x99,0x75,0x31,0xb9,0x47,0x05,0x1f,0xfb,0xac,0x30,0x6a,0xd6,0x97,0xab,0xdf,0xe8, +0x77,0x06,0x7d,0x36,0xfa,0xe7,0x4f,0x98,0x8c,0x19,0x2d,0x66,0x68,0x98,0x8f,0x42, +0x54,0x8a,0xe9,0x60,0xf8,0xad,0xaf,0x1b,0x73,0x6d,0xa8,0x9b,0x2d,0x7e,0xd4,0xff, +0x00,0xcb,0x2d,0x5a,0xce,0x39,0xc8,0x3e,0xa1,0xf0,0x18,0x1f,0x7c,0xd1,0xef,0xaf, +0x30,0xf7,0x4e,0x93,0xf6,0x79,0xf0,0x0f,0xfc,0x26,0x3e,0x2e,0x17,0x52,0xc0,0xd7, +0x16,0xf6,0x2c,0xa5,0x22,0x0b,0x9f,0x36,0x66,0x38,0x45,0xc7,0x7f,0x5c,0x7d,0x2b, +0xf6,0x77,0xe0,0xc7,0xc2,0xdb,0x4f,0x86,0x1e,0x13,0x82,0xdb,0x62,0xbe,0xab,0x70, +0xa2,0x4b,0xdb,0x8c,0x72,0xce,0x47,0xdd,0x07,0xfb,0xab,0xd0,0x7e,0x75,0xf0,0x2f, +0xec,0x13,0xa4,0xd9,0xf8,0x8f,0xc5,0x1e,0x1d,0xb9,0x87,0x4b,0xb6,0xd3,0x23,0x7b, +0xc9,0x6e,0xe4,0x86,0xd8,0xb9,0x46,0x31,0x29,0xda,0xdf,0x31,0x24,0x72,0x07,0x1d, +0x38,0xaf,0xd3,0x9a,0xf3,0xb3,0xaa,0xf2,0xa5,0x46,0x9e,0x16,0x3a,0x29,0x2e,0x67, +0xe7,0xd9,0x7c,0x8f,0x33,0x27,0xa2,0xb1,0x58,0xec,0x46,0x3a,0xa6,0xbc,0x8f,0xd9, +0xc7,0xca,0xcb,0xde,0x7e,0xad,0xbf,0xb8,0x2b,0xe3,0xdf,0x15,0x7c,0x59,0xbb,0xf0, +0x77,0xed,0x11,0xa8,0x6a,0x0f,0xac,0x5e,0x6a,0x1a,0x2d,0xb5,0xc9,0x8e,0x4b,0x6b, +0x79,0x49,0x42,0x9b,0x00,0x31,0x85,0xc8,0x5e,0x0f,0x1f,0x51,0x5e,0xd9,0xe3,0xaf, +0x82,0x37,0xbe,0x2a,0xbd,0x9f,0x51,0xb1,0xf1,0xae,0xb5,0xa6,0xea,0x2d,0x21,0x68, +0xc1,0x9b,0x74,0x11,0xa9,0xfe,0x00,0x8b,0xb7,0x03,0xdf,0x3f,0x9d,0x7c,0x6b,0xe3, +0x6f,0x0a,0xea,0x1e,0x0b,0xf1,0x3e,0xa1,0xa3,0xea,0x63,0x37,0x76,0xf2,0x61,0xa4, +0xce,0x7c,0xc0,0x79,0x0e,0x0f,0xb8,0x39,0xfc,0x6b,0xaf,0x87,0xf0,0x78,0x5a,0xb2, +0xa8,0x9d,0x45,0x26,0xe3,0x67,0x1b,0x5a,0xd7,0xdd,0xdd,0xfe,0x87,0x85,0xc5,0xd9, +0x8e,0x3b,0x0f,0x0a,0x4e,0x34,0x9c,0x14,0x67,0x75,0x2b,0xdd,0x3b,0x6c,0x9a,0x5f, +0x93,0x3e,0x92,0xf8,0x6f,0xe2,0x8d,0x5f,0xe3,0x4f,0xc6,0xa8,0x3c,0x55,0x15,0x94, +0xfa,0x7f,0x87,0xb4,0x7b,0x49,0x20,0x88,0x49,0xc8,0x2c,0xe3,0x04,0x6e,0xee,0x49, +0xe4,0xfa,0x05,0x15,0xed,0xbe,0x3c,0xf0,0x3e,0x9b,0xf1,0x0b,0xc3,0x77,0x5a,0x3e, +0xa5,0x10,0x68,0xe5,0x5c,0xc7,0x2e,0x3e,0x68,0x9c,0x74,0x75,0x3d,0x88,0xff,0x00, +0xeb,0x56,0x4f,0xc1,0x5d,0x6e,0xdb,0xc4,0x1f,0x0b,0xfc,0x3d,0x79,0x6d,0x02,0x5b, +0x2f,0xd9,0x84,0x52,0x47,0x1a,0x85,0x02,0x44,0xf9,0x1c,0xe0,0x7a,0x95,0x27,0xf1, +0xae,0xde,0xbe,0x6f,0x1d,0x88,0x92,0xc5,0x7e,0xea,0x3c,0x9e,0xcf,0xdd,0x4b,0xb5, +0x9f,0x7e,0xf7,0x3e,0xcb,0x2b,0xc1,0xc6,0x58,0x17,0xed,0xa7,0xed,0x7d,0xb7,0xbd, +0x26,0xd6,0x8f,0x99,0x2e,0x9d,0x15,0xac,0x8f,0x87,0x7c,0x25,0xad,0xf8,0x8b,0xe1, +0x8f,0x8f,0xf5,0x05,0xbb,0xd4,0x46,0x91,0x06,0x94,0x05,0x95,0xd0,0xf2,0x83,0xc6, +0xd1,0x79,0x83,0x6a,0x46,0xa4,0xe0,0x93,0x92,0xe3,0x9c,0xe3,0x71,0xf5,0xaf,0xb2, +0xf5,0x0b,0x38,0x35,0xdb,0x38,0xae,0xac,0xc5,0xa4,0xb7,0x20,0x2b,0x5b,0xdc,0xcd, +0x18,0x90,0x20,0x38,0x24,0x8e,0xe3,0x23,0xa7,0xe1,0x5f,0x27,0x7e,0xd7,0x1a,0x14, +0x76,0x3f,0x12,0xec,0xee,0xd5,0xc4,0x69,0xa8,0x59,0xab,0xc8,0xcc,0x0e,0xd5,0x65, +0x62,0x84,0xe0,0x7b,0x05,0xab,0x1f,0x0a,0x7f,0x68,0x6d,0x37,0xe1,0xdd,0xab,0xe8, +0xb0,0xe8,0x53,0x5e,0xda,0xc9,0x24,0x7b,0x2e,0x96,0x7d,0xb2,0xc8,0xfb,0x55,0x49, +0x60,0xd9,0xe3,0x23,0x80,0x31,0x81,0x81,0x5f,0x57,0x8e,0xc1,0xd4,0xcc,0xb0,0xd4, +0xb1,0xd8,0x75,0xef,0xdb,0x54,0x92,0x5e,0xba,0xfd,0xff,0x00,0x23,0xe1,0x32,0xbc, +0xca,0x96,0x4b,0x8c,0xaf,0x96,0x62,0xe5,0xfb,0xb5,0x2d,0x1b,0x6d,0xbe,0xad,0x59, +0x24,0xfa,0x5b,0xb6,0xbf,0x87,0xd1,0xba,0x17,0xc3,0x1d,0x2b,0x40,0x86,0x33,0x35, +0xc5,0xc5,0xf0,0x86,0x18,0xe2,0x3f,0x69,0x93,0x09,0x88,0x98,0xb2,0x31,0x03,0x80, +0x46,0x48,0xf4,0x3d,0xea,0x5d,0x6b,0xe2,0x16,0x91,0xa4,0x68,0xeb,0x73,0xa6,0xcf, +0x69,0xa8,0xb3,0x27,0x9b,0x1c,0x16,0xf3,0x0f,0x9e,0x31,0xf7,0x98,0x11,0x9e,0x80, +0x13,0xf8,0x57,0x97,0xf8,0xa3,0xe2,0x86,0xb9,0x7d,0xff,0x00,0x1e,0xf3,0x1b,0x5d, +0x3e,0xe9,0x44,0x8b,0x18,0x50,0x59,0x46,0x48,0x28,0x5b,0x1c,0xf2,0x0f,0xe7,0x5c, +0x5b,0x5d,0xa5,0x9e,0xa3,0x2c,0xfa,0x78,0x30,0xc4,0x4b,0x6c,0x56,0x40,0x30,0xad, +0x90,0x54,0x81,0xc6,0x30,0x71,0x5f,0x17,0x2e,0x7a,0xbe,0xf5,0x57,0x76,0x7e,0x95, +0x15,0x0a,0x2b,0x96,0x8c,0x6c,0xbf,0x13,0xba,0xf1,0x47,0xc5,0x2b,0xbf,0x10,0x2b, +0x5c,0xe9,0xd2,0xcb,0xa4,0xbd,0xb1,0x0a,0x91,0x89,0xb9,0x95,0x18,0x1d,0xc4,0x8e, +0x99,0x04,0x2e,0x31,0xcf,0x35,0xe7,0x4c,0xc5,0x98,0x92,0x72,0x49,0xc9,0x26,0x82, +0x72,0x49,0xa4,0xaa,0x51,0x51,0xd8,0x52,0x93,0x96,0xac,0xf8,0x2b,0xf6,0xd6,0xd0, +0xe2,0xd2,0xfe,0x31,0x25,0xdc,0x29,0xb7,0xfb,0x43,0x4f,0x8a,0x69,0x3d,0xdd,0x4b, +0x21,0x3f,0x92,0xaf,0xe5,0x5e,0x05,0x5f,0x43,0xfe,0xdc,0x3a,0x8c,0x77,0x5f,0x16, +0x6c,0x6d,0x51,0x83,0x35,0xae,0x99,0x18,0x7c,0x76,0x66,0x77,0x38,0x3f,0x86,0x3f, +0x3a,0xf9,0xe2,0xbe,0xaf,0x0d,0x7f,0x63,0x1b,0xf6,0x38,0x27,0xf1,0x30,0xa2,0x8a, +0x2b,0xa4,0x80,0xa2,0x8a,0x28,0x03,0xf7,0x76,0x59,0x06,0x0d,0x52,0x9a,0x5f,0x7a, +0x26,0x9b,0x3d,0xf8,0xaa,0x93,0x49,0x9e,0x86,0xbe,0x1c,0xf6,0x06,0x48,0xe5,0x9b, +0xaf,0x14,0x2d,0x46,0x09,0xcd,0x48,0xbd,0xa8,0x28,0x95,0x4d,0x4c,0x95,0x0a,0xd4, +0xcb,0x40,0x32,0xca,0x0e,0x95,0x32,0xd4,0x51,0x9a,0x95,0x68,0x25,0x13,0x25,0x4c, +0xbf,0x77,0xde,0xa0,0x5a,0x99,0x7a,0x1a,0x60,0x48,0xb5,0x65,0x6a,0xb2,0xd5,0x95, +0xa4,0x04,0xcb,0xfd,0x2a,0x48,0xfa,0x8a,0x8d,0x3b,0xd4,0x91,0xf5,0x14,0x99,0x68, +0xb3,0x1f,0xde,0xa9,0x63,0xfe,0xb5,0x0c,0x7d,0x45,0x4e,0x2a,0x4a,0x2a,0xa7,0x86, +0x74,0x83,0xad,0x1d,0x54,0xe9,0x96,0xa7,0x53,0xc0,0x1f,0x6c,0x31,0x03,0x26,0x3f, +0xde,0xae,0x43,0xf6,0x87,0xf0,0x86,0xa7,0xe3,0xbf,0x82,0x3e,0x33,0xd0,0x74,0x77, +0x54,0xd4,0x2f,0xf4,0xd9,0xa1,0x8c,0x36,0x7e,0x7e,0x39,0x5e,0x3b,0x91,0xc5,0x7a, +0x1c,0x67,0xaf,0xd2,0x9e,0x41,0xda,0x2b,0x3b,0x25,0xb1,0xad,0x3a,0x8e,0x12,0x8c, +0xfb,0x1f,0xce,0xd7,0x8d,0x11,0xbc,0x35,0xa9,0x4b,0x60,0xd6,0xcc,0xb7,0x30,0x92, +0xb2,0x2b,0x82,0x36,0x36,0x70,0x41,0x15,0xc3,0xce,0x66,0xb8,0x91,0x98,0xa1,0x04, +0xff,0x00,0xb3,0x8a,0xfb,0x6b,0xfe,0x0a,0x21,0xf0,0x0e,0xfb,0xe1,0xdf,0xc6,0x6b, +0xcd,0x76,0xde,0x16,0x8b,0xc3,0xde,0x20,0x63,0x77,0x04,0xf1,0xa6,0x55,0x65,0x3f, +0xeb,0x23,0x27,0xa0,0x20,0x9c,0xfd,0x0d,0x7c,0x8d,0x71,0x0d,0xbd,0xb9,0x5d,0xa5, +0xa6,0x7f,0x7e,0x95,0xce,0x92,0x8e,0x87,0xea,0x12,0xbe,0x3e,0x9c,0x6b,0x73,0xda, +0x2f,0xfa,0xf5,0x30,0x22,0xd3,0xe5,0x61,0xb9,0x8f,0x96,0x9f,0xde,0x6a,0xb1,0x6d, +0x2a,0xc2,0xc1,0x6d,0xd4,0xb3,0x74,0x2e,0x7a,0xfe,0x15,0x66,0xf1,0x0d,0xc6,0x15, +0x9c,0x22,0x8e,0xb4,0xdb,0x6b,0xa5,0x59,0x16,0x1b,0x54,0x01,0x89,0xc1,0x7f,0xeb, +0x5a,0x44,0xe4,0x9d,0x08,0x52,0x95,0xa2,0xfe,0x7d,0x5f,0xa2,0x3f,0x72,0xbf,0x61, +0xff,0x00,0x89,0x5e,0x0e,0xf1,0x17,0xc0,0xff,0x00,0x0b,0x78,0x67,0x42,0xf1,0x0d, +0xbe,0xa9,0xab,0xe8,0xfa,0x74,0x6b,0x7b,0x6a,0xaa,0x63,0x96,0x36,0x3c,0x9f,0x94, +0x8c,0x90,0x09,0xc6,0x47,0xa5,0x7d,0x22,0xbf,0x74,0x57,0xe3,0x3f,0xfc,0x13,0x5e, +0xe3,0x52,0x9f,0xf6,0xa4,0xd1,0x22,0xb1,0x92,0x41,0x1a,0x5a,0x5d,0x1b,0xb2,0xbf, +0x75,0xa3,0x11,0xf2,0x0f,0xe3,0x8a,0xfd,0x99,0x5f,0xba,0x28,0x3e,0x33,0x1f,0x45, +0x50,0xac,0xd2,0x77,0xbe,0xa1,0x45,0x14,0xaa,0x32,0xde,0xd4,0x1e,0x70,0xab,0x8e, +0x73,0x4f,0xdc,0x3d,0x6b,0xc2,0x7e,0x39,0x7e,0xd0,0xd2,0xfc,0x33,0xd7,0x93,0x48, +0xd3,0xf4,0xf8,0xee,0xae,0xbc,0xb1,0x2c,0x93,0x4e,0xc7,0x60,0x07,0xa0,0x00,0x77, +0xaf,0x20,0xff,0x00,0x86,0xd8,0xf1,0x45,0xbd,0xd2,0x06,0xd1,0x34,0xeb,0xb8,0x58, +0xe0,0x47,0x1b,0x32,0xb7,0x4f,0x5c,0xd7,0x97,0x57,0x32,0xc2,0xd1,0x9b,0xa7,0x39, +0xd9,0xaf,0x53,0xb6,0x9e,0x0e,0xbd,0x48,0xf3,0x46,0x3a,0x1f,0x42,0xfe,0xd0,0xdf, +0x19,0x2c,0xfe,0x0d,0x7c,0x3f,0xb9,0xd5,0x5a,0x48,0x9b,0x54,0x98,0x18,0xac,0x6d, +0xdc,0xe7,0x7c,0x84,0x75,0xc7,0xa0,0xea,0x6b,0xf3,0x43,0xc4,0xde,0x24,0xbc,0xf1, +0x46,0xad,0x73,0xa9,0x6a,0x17,0x2f,0x77,0x79,0x77,0x21,0x96,0x49,0x58,0xf2,0xcd, +0xdf,0xe9,0x5d,0xf7,0xc6,0x2f,0x19,0x6a,0xdf,0x1a,0x7c,0x54,0xfa,0x9e,0xb8,0xcd, +0x05,0xa4,0x4b,0xb2,0xde,0xc6,0xdc,0x8d,0x90,0x27,0xb9,0x3d,0x7d,0x49,0xef,0x5e, +0x75,0x26,0x87,0x71,0x1a,0xbb,0x09,0x14,0xe1,0x32,0x1b,0x61,0xc7,0x6e,0x06,0x33, +0xcd,0x70,0xd4,0xc7,0x51,0xc4,0x69,0x4e,0x69,0xaf,0x53,0xdf,0xc1,0xe1,0xd6,0x1e, +0x37,0x9f,0xc4,0xce,0x9f,0xe1,0x66,0x97,0x7d,0xaf,0x78,0xc3,0x4b,0xb1,0xb2,0x67, +0x56,0x79,0x54,0xbb,0x2f,0xf7,0x73,0xcd,0x7e,0x8d,0x6b,0x5e,0x2d,0xd0,0x7e,0x09, +0x7c,0x35,0x93,0x59,0xf1,0x05,0xe2,0xd9,0x59,0x5a,0x46,0x0b,0x12,0x72,0xf2,0x36, +0x38,0x45,0x1d,0xd8,0xfa,0x57,0xcd,0x1f,0xb2,0x27,0x85,0xbc,0x27,0xe1,0xd8,0x2e, +0xbc,0x4d,0xac,0xf8,0x9b,0x48,0x6b,0x88,0x22,0xf3,0x7c,0x96,0xbb,0x44,0x30,0x2f, +0x76,0x70,0xc4,0x10,0x05,0x7c,0xbf,0xfb,0x78,0x7e,0xd4,0x0d,0xf1,0x73,0xc6,0x8d, +0xa4,0x68,0x77,0x7b,0xfc,0x2d,0xa4,0x33,0x47,0x6c,0xf0,0x9d,0xcb,0x71,0x27,0xf1, +0x4b,0xc7,0x6e,0xc3,0xda,0xbd,0x0c,0x34,0x39,0x63,0xcd,0xd5,0x97,0xec,0x1e,0x63, +0x88,0x54,0x63,0xf0,0x47,0x76,0x72,0x1f,0xb5,0x87,0xed,0x6d,0xae,0x7c,0x78,0xf1, +0x24,0xd1,0x99,0x64,0xb1,0xf0,0xdd,0xbb,0x9f,0xb1,0x69,0xa1,0xb8,0x03,0xb3,0x3e, +0x3a,0xb7,0xf2,0xaf,0x98,0xaf,0x6f,0x88,0x56,0x90,0x9e,0x9d,0x3d,0xe8,0xbc,0xd4, +0x25,0x91,0x98,0xb6,0xd9,0x3f,0x43,0x58,0xd7,0x92,0x35,0xc4,0xeb,0x12,0x80,0x50, +0x72,0x70,0x6b,0xb9,0x1f,0x63,0x18,0xd3,0xc2,0x51,0xf6,0x74,0x97,0x92,0x36,0xa2, +0xf1,0x95,0xcd,0xbc,0x2a,0x63,0x82,0x15,0x94,0x10,0xc1,0xe4,0x05,0xf1,0x8f,0x40, +0x78,0xaa,0x3a,0xb7,0x8c,0x35,0x6f,0x12,0xcf,0x08,0xbf,0xd4,0xae,0x18,0xc4,0xa5, +0x22,0x1e,0x61,0x0a,0x80,0xf5,0x00,0x0e,0x95,0x9f,0x36,0x55,0x76,0x11,0x8a,0x9f, +0x41,0xd1,0xe7,0xd5,0x6f,0xc4,0x76,0xf6,0xed,0x78,0x57,0xe6,0x6b,0x75,0xfb,0xec, +0xa3,0xae,0xdf,0x53,0x5a,0xb9,0xca,0x4b,0x56,0x7c,0xf5,0x4c,0x0d,0x39,0x49,0x53, +0xa7,0x1d,0x7f,0x13,0x4b,0xc1,0x7a,0x3e,0xdf,0x12,0x59,0xda,0x4a,0x58,0xdb,0xdc, +0x3f,0x97,0xf2,0xb1,0x1c,0x91,0xc7,0x3e,0xb9,0xc5,0x7d,0x4f,0xe0,0xdf,0xed,0x7f, +0x05,0xda,0x44,0xb7,0x8c,0x7c,0x49,0xe1,0xf7,0xca,0xb5,0x9d,0xfc,0x6b,0x23,0x29, +0xe3,0x2a,0x19,0x87,0xf5,0xae,0x37,0xc3,0x3f,0x06,0x7f,0xb5,0x74,0x1b,0x2d,0x77, +0x46,0x90,0xdd,0x2c,0x3b,0x6e,0xe3,0x52,0x3e,0x72,0x23,0x60,0x64,0x8c,0x8f,0xef, +0xae,0x0f,0x1e,0x82,0xbe,0xa4,0xbf,0xf0,0x2c,0x50,0x69,0x7a,0x8e,0x9e,0xa5,0x65, +0xdb,0x7b,0x6f,0x3a,0x30,0x1d,0x63,0x91,0x03,0x0f,0xd0,0x8f,0xca,0xb4,0xc2,0xd6, +0x95,0xdf,0x2b,0x3c,0x1c,0xcb,0x07,0x53,0x03,0x57,0xd9,0xd4,0x5f,0xf0,0x57,0x73, +0xcc,0xa6,0xf0,0x87,0xc2,0xaf,0x15,0x5c,0x45,0x75,0xa2,0xda,0xc9,0xa5,0x6a,0x0a, +0x7f,0xd2,0x34,0xaf,0x30,0xc2,0xe3,0xd4,0xa8,0x27,0x0d,0xf4,0x07,0x35,0xde,0xe9, +0x3e,0x03,0xd2,0xb4,0x7b,0x32,0xf6,0x17,0xba,0xac,0x70,0xe3,0x21,0x99,0xd8,0xaa, +0xfb,0x15,0x3c,0x8f,0xc6,0xbc,0x5f,0xc5,0x1e,0x15,0x8b,0x51,0xd4,0x2e,0x1a,0x42, +0xd6,0xf3,0x42,0x76,0x24,0xa9,0xc3,0x02,0x4f,0x43,0xf8,0x73,0x5d,0x3f,0xc2,0x9f, +0x15,0x78,0xbf,0xe1,0xff,0x00,0x89,0x22,0x59,0x2f,0xd7,0x56,0xd1,0x01,0xc4,0xf1, +0xcd,0x1f,0x98,0x54,0x7e,0x3c,0xfd,0x47,0x23,0xda,0xbd,0xca,0x38,0x98,0xbd,0x1a, +0xd4,0xf2,0x5a,0xd2,0xe7,0x47,0xa4,0xf8,0x76,0xda,0xee,0xe2,0xfb,0x54,0xb8,0x99, +0xca,0xae,0x54,0x49,0x31,0x39,0xeb,0xc7,0x5e,0xf5,0xf6,0xf7,0xec,0xdf,0x32,0xde, +0x47,0x0d,0xba,0x29,0x51,0x6b,0x6e,0xb2,0x31,0x23,0x93,0xbb,0xee,0x8f,0xcb,0x9f, +0xc6,0xbe,0x47,0xf1,0xc6,0x8f,0x36,0xb5,0xe2,0x5f,0x0d,0x2d,0xbc,0xb0,0x41,0xa2, +0x6a,0x13,0x09,0xe1,0x9a,0xd4,0xfe,0xe2,0x7c,0x72,0xf1,0xe7,0xb4,0x83,0xfb,0xbd, +0xc7,0x4e,0x95,0xf7,0x47,0xc0,0xff,0x00,0x0e,0x2e,0x97,0x63,0xa9,0xdf,0x24,0x66, +0x24,0xba,0x98,0x24,0x2a,0x7f,0xb8,0xa0,0x0f,0xe7,0xfc,0xa9,0xe2,0xe7,0x1f,0x62, +0xec,0x61,0x23,0xd3,0xa8,0xa5,0xa4,0xaf,0x9e,0x32,0x1a,0xdd,0x68,0xa1,0xba,0xd1, +0x41,0x24,0x7e,0xb5,0x1b,0x7d,0xea,0x93,0xde,0xa3,0x63,0xb9,0xa9,0xa1,0x8c,0x6e, +0x29,0xad,0xd1,0x69,0xcd,0x4c,0x7c,0xf1,0x56,0x41,0x14,0x9f,0x78,0xf3,0x55,0x2e, +0x17,0xcc,0x86,0x45,0xfe,0xf2,0x91,0xfa,0x55,0xa9,0x3a,0x92,0x2a,0x0d,0xd8,0xe6, +0xa8,0x47,0xe2,0xbf,0xc4,0xfd,0x3c,0xe9,0x9e,0x36,0xd5,0xed,0x8a,0xed,0xf2,0x6e, +0xe6,0x8f,0x18,0xf4,0x91,0x85,0x72,0x95,0xed,0xff,0x00,0xb5,0xe7,0x85,0x9f,0xc3, +0x3f,0x1a,0xbc,0x4b,0x11,0x4d,0xa9,0x2d,0xd1,0xb9,0x42,0xbd,0x08,0x90,0x6e,0xcf, +0xe7,0x5e,0x21,0x5f,0x7d,0x46,0x5c,0xf4,0xe3,0x2f,0x23,0xfb,0x1f,0x29,0xae,0xb1, +0x38,0x1a,0x35,0x57,0x58,0xaf,0xc8,0x28,0xa2,0x8a,0xd8,0xf5,0x82,0x8a,0x28,0xa0, +0x02,0x8a,0x28,0xa0,0x0b,0x9a,0x3e,0xb1,0x79,0xe1,0xfd,0x5a,0xcf,0x53,0xd3,0xae, +0x1e,0xd2,0xfe,0xce,0x64,0xb8,0xb7,0x9e,0x3f,0xbd,0x1c,0x8a,0x41,0x56,0x1f,0x42, +0x05,0x7e,0xaf,0x7e,0xcc,0xff,0x00,0xb6,0x47,0x86,0x3e,0x36,0x68,0xb6,0x7a,0x76, +0xb1,0x79,0x6d,0xa0,0xf8,0xcd,0x14,0x47,0x35,0x84,0xf2,0x6c,0x8e,0xe5,0xba,0x6f, +0x81,0x98,0xfc,0xd9,0xfe,0xe6,0x77,0x0f,0x71,0xcd,0x7e,0x4a,0xd2,0xab,0x15,0x60, +0x41,0x20,0x8e,0x84,0x57,0x0e,0x2f,0x07,0x0c,0x5c,0x6d,0x2d,0x1a,0xd9,0x9f,0x2f, +0x9e,0xf0,0xfe,0x1b,0x3e,0xa4,0xa1,0x55,0xf2,0xce,0x3b,0x49,0x74,0xff,0x00,0x34, +0x7e,0xfa,0xd1,0x5f,0x89,0x7e,0x19,0xfd,0xa1,0x3e,0x25,0x78,0x3e,0xde,0x3b,0x7d, +0x23,0xc7,0x1a,0xe5,0x9d,0xb4,0x78,0xd9,0x6e,0x2f,0x5d,0xa2,0x5c,0x7a,0x21,0x25, +0x7f,0x4a,0xd9,0xd4,0xbf,0x6b,0x2f,0x8b,0xfa,0xa4,0x1e,0x4c,0xbf,0x10,0x35,0xa8, +0xd7,0xd6,0xde,0xe3,0xc9,0x6f,0xfb,0xe9,0x30,0x6b,0xc1,0x79,0x35,0x5b,0xe9,0x34, +0x7e,0x59,0x2f,0x0e,0xb1,0xaa,0x56,0x8d,0x78,0xb5,0xf3,0xfc,0xb5,0xfc,0xcf,0xd6, +0x1f,0x8b,0x1f,0x1a,0xfc,0x21,0xf0,0x5b,0x41,0x93,0x53,0xf1,0x46,0xad,0x0d,0x9f, +0xc8,0x5a,0x1b,0x35,0x60,0xd7,0x37,0x07,0xd2,0x38,0xf3,0x93,0xcf,0x19,0xe8,0x3b, +0x91,0x5f,0x91,0xff,0x00,0xb4,0x17,0xc7,0x4d,0x5f,0xe3,0xff,0x00,0xc4,0x1b,0x9f, +0x11,0x6a,0x4b,0xf6,0x5b,0x44,0x1e,0x45,0x86,0x9e,0xad,0xb9,0x6d,0x61,0x07,0x85, +0xcf,0x76,0x27,0x96,0x6e,0xe4,0xfa,0x00,0x07,0x9f,0xea,0xba,0xc5,0xfe,0xbb,0x7d, +0x25,0xe6,0xa5,0x7b,0x71,0x7f,0x77,0x21,0xcb,0xcf,0x73,0x2b,0x48,0xec,0x7d,0x49, +0x27,0x26,0xa9,0xd7,0xb1,0x83,0xc0,0x43,0x0b,0xef,0x5e,0xf2,0x3f,0x43,0xe1,0xee, +0x15,0xc3,0xe4,0x4d,0xd6,0x72,0xe7,0xaa,0xf4,0xbd,0xac,0x92,0xf2,0x5f,0xaf,0xe4, +0x14,0x51,0x45,0x7a,0x87,0xdc,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14, +0x51,0x40,0x15,0x35,0x69,0x3c,0xbd,0x36,0x73,0xfe,0xce,0x3f,0x33,0x8a,0xe4,0x2b, +0xba,0xc6,0x8d,0x70,0xe2,0xd3,0x5b,0xba,0xb9,0xb1,0xb7,0xb8,0x1b,0x63,0xbb,0xb6, +0x8c,0x49,0xe4,0xb8,0x23,0x0c,0xe9,0xd5,0x93,0x19,0x04,0x03,0x9e,0x41,0xed,0x8a, +0xc7,0xf1,0x17,0x80,0xb5,0x5f,0x0e,0xda,0xc7,0x7c,0x56,0x2d,0x47,0x47,0x99,0x8a, +0xc3,0xab,0x69,0xef,0xe7,0x5b,0x48,0x47,0x6d,0xc3,0x94,0x6f,0xf6,0x5c,0x2b,0x7b, +0x56,0x13,0x92,0xe6,0xb1,0xfc,0xbf,0xe2,0x56,0x27,0xdb,0xe7,0x11,0xa5,0x1f,0xf9, +0x77,0x04,0x9f,0xab,0x6e,0x5f,0x93,0x47,0x3b,0x45,0x25,0x2f,0xb7,0x7a,0x47,0xe4, +0xa1,0x5d,0xf6,0x9e,0x4f,0xc3,0x3f,0x0d,0xa6,0xa6,0xdf,0x27,0x8a,0xb5,0x88,0x0f, +0xd8,0x57,0x82,0xd6,0x36,0x6c,0x0a,0xb4,0xe7,0xd2,0x49,0x06,0x55,0x3a,0x15,0x5d, +0xcd,0xfc,0x4a,0x43,0x34,0x3f,0x0b,0x59,0xf8,0x46,0xce,0x1f,0x10,0x78,0xba,0x0c, +0xab,0x20,0x97,0x4e,0xd0,0x5c,0xed,0x9a,0xfc,0x9c,0xed,0x79,0x07,0x54,0x80,0x1e, +0x49,0x38,0x2f,0x8c,0x2f,0x52,0x47,0x27,0xaf,0x6b,0x97,0xbe,0x26,0xd6,0x2f,0x35, +0x4d,0x46,0x6f,0x3e,0xf6,0xea,0x43,0x24,0xae,0x14,0x28,0xcf,0x60,0xaa,0x00,0x0a, +0xa0,0x60,0x05,0x00,0x00,0x00,0x03,0x81,0x59,0xfc,0x6e,0xcb,0x62,0xfe,0x1d,0x7a, +0x99,0xfd,0x38,0xa5,0xa2,0x8a,0xd0,0x80,0xa2,0x8a,0x28,0x00,0xa2,0x8a,0x28,0x03, +0xee,0xff,0x00,0xf8,0x27,0x67,0x88,0xa2,0xb1,0xd6,0xfc,0x38,0xac,0x40,0x1f,0x6b, +0xb8,0xb3,0x6e,0x7a,0x17,0x5c,0xaf,0xea,0x45,0x7e,0xa0,0xd7,0xe1,0x8f,0xec,0xd3, +0xf1,0x05,0xfc,0x21,0xe2,0xf1,0x65,0xf6,0x96,0xb6,0xfb,0x54,0x89,0x2d,0xb4,0xa0, +0xfd,0xcb,0x84,0x39,0x53,0xed,0x9f,0xe8,0x2b,0xf6,0x3b,0xc0,0xfe,0x35,0x8b,0xe3, +0x17,0xc3,0x87,0x9f,0x4f,0xbe,0x6d,0x33,0x51,0x9a,0x13,0x6d,0x72,0xf0,0xe0,0xc9, +0x6b,0x31,0x18,0x24,0x0f,0xd4,0x7d,0x6b,0xcb,0xce,0xa8,0x3a,0xb0,0xa5,0x89,0x5b, +0x25,0xca,0xfc,0xad,0xb7,0xe0,0xcf,0x37,0x27,0xad,0xf5,0x4c,0x5e,0x27,0x05,0x2d, +0xe4,0xfd,0xa4,0x7c,0xd3,0x5a,0xa5,0xe8,0xd1,0xd2,0x68,0x5e,0x36,0xd0,0xfc,0x4b, +0xa9,0x6a,0x36,0x1a,0x6e,0xa3,0x0d,0xd5,0xe6,0x9f,0x27,0x95,0x73,0x0a,0x9f,0x99, +0x1b,0xfa,0x8e,0x0f,0x23,0xd2,0xbe,0x43,0xfd,0xab,0xa6,0x59,0x3e,0x2e,0x4e,0xa2, +0xdf,0xc9,0x31,0xd9,0xc2,0xac,0xff,0x00,0xf3,0xd4,0xe0,0x9d,0xdf,0x91,0x0b,0xff, +0x00,0x01,0xaf,0x5c,0xf1,0xb7,0xec,0xeb,0x1f,0x86,0xf4,0xfb,0x6d,0x77,0xc0,0x12, +0xdc,0xda,0x78,0x97,0x4d,0x6f,0x3b,0xf7,0x93,0x19,0x0d,0xe7,0x72,0x0e,0x4e,0x37, +0x1f,0xc8,0xe4,0x8a,0xf9,0xdf,0xc4,0x7a,0xd7,0x89,0xfe,0x30,0x7c,0x40,0x89,0xe4, +0xb3,0x2f,0xaf,0xc9,0xb2,0xdd,0x2d,0x60,0x52,0x9b,0x0a,0x0f,0x43,0xf7,0x79,0xc9, +0x39,0xe9,0xcd,0x7a,0x39,0x16,0x1a,0x84,0x31,0x0f,0x15,0x87,0xa9,0x78,0x28,0xb4, +0xef,0xa3,0x4f,0x4d,0xfc,0x9f,0x7f,0xf2,0x3e,0x6b,0x8a,0x71,0xb8,0xaa,0x98,0x48, +0xe0,0x71,0x74,0xad,0x52,0x52,0x4e,0x3c,0xba,0xc6,0x4b,0x5d,0x17,0x5e,0x65,0x74, +0x9a,0xeb,0xd3,0x46,0x7d,0x17,0xfb,0x31,0xfc,0x58,0xd1,0x75,0x5f,0x0c,0xe9,0xfe, +0x11,0x70,0x2c,0x35,0x7b,0x28,0xd8,0x24,0x6d,0x8d,0xb7,0x2b,0x92,0xc5,0x94,0xff, +0x00,0x7b,0x9e,0x47,0xe3,0x5e,0xf3,0x5f,0x3e,0x7c,0x27,0xfd,0x97,0x3f,0xe1,0x15, +0xd7,0x2c,0xb5,0xff,0x00,0x10,0x6a,0x7f,0x6b,0xbf,0xb7,0x61,0x34,0x76,0xb6,0xb9, +0x08,0x92,0x75,0xcb,0x31,0xe5,0xb1,0xf8,0x0a,0xf6,0xcf,0x16,0x78,0xa7,0x4f,0xf0, +0x5f,0x87,0xef,0x35,0x8d,0x4e,0x61,0x0d,0xa5,0xb2,0x6e,0x3e,0xac,0x7b,0x28,0x1d, +0xc9,0x3c,0x0a,0xf9,0xac,0xd6,0x38,0x6a,0xb8,0xc7,0xf5,0x26,0xe5,0xcd,0xf9,0xbe, +0xdd,0xcf,0xb4,0xc8,0xa5,0x8c,0xa1,0x97,0x25,0x99,0x45,0x41,0xc1,0x69,0xfe,0x14, +0xb7,0x7d,0x11,0xf2,0x8f,0xed,0x81,0xac,0x47,0x7d,0xf1,0x12,0xc2,0xc6,0x36,0xc9, +0xb1,0xb1,0x51,0x27,0xb3,0x3b,0x16,0xfe,0x58,0xaf,0x37,0xf8,0x7b,0xe1,0xf7,0xbe, +0xd4,0x56,0xfe,0x55,0xc5,0xb5,0xb9,0xca,0xe4,0x7d,0xe7,0xf6,0xfa,0x56,0xca,0xda, +0xcf,0xf1,0x3f,0xc4,0x9a,0x9f,0x89,0xb5,0x82,0xca,0x97,0x53,0x96,0x48,0x97,0x8c, +0x8e,0x81,0x73,0xe8,0x06,0x07,0xbd,0x76,0x56,0xf6,0xf1,0xda,0xc2,0x91,0x43,0x1a, +0xc5,0x12,0x0c,0x2a,0xa8,0xc0,0x15,0xf5,0x18,0xac,0x7c,0x70,0x18,0x38,0xe5,0xf4, +0xb5,0x9a,0x56,0x93,0xe8,0xbb,0xd8,0xf8,0x8c,0x0e,0x53,0x2c,0xd7,0x31,0x96,0x71, +0x88,0xd2,0x9b,0x95,0xe2,0xba,0xbb,0x7c,0x2d,0xf6,0x5a,0x27,0xe7,0xe8,0x4b,0xb8, +0xed,0x03,0x27,0x03,0xa0,0xcf,0x14,0x94,0x51,0x5f,0x1a,0x7e,0x94,0x15,0x1d,0xd5, +0xd4,0x56,0x56,0xd3,0x5c,0x4f,0x22,0xc5,0x04,0x28,0x64,0x92,0x46,0xe8,0xaa,0x06, +0x49,0x3f,0x85,0x49,0x5f,0x29,0x7e,0xd7,0x3f,0xb4,0x04,0x16,0xf6,0x17,0x3e,0x05, +0xf0,0xf5,0xc8,0x96,0xee,0x6f,0x93,0x53,0xba,0x85,0xb8,0x89,0x7f,0xe7,0x88,0x23, +0xf8,0x8f,0x7f,0x41,0xc5,0x6d,0x46,0x94,0xab,0x4d,0x46,0x24,0xca,0x5c,0xaa,0xec, +0xf9,0xa3,0xe2,0xd7,0x8d,0x3f,0xe1,0x61,0x7c,0x46,0xd7,0xb5,0xf5,0xdc,0x20,0xbb, +0xb9,0x3e,0x42,0xb7,0x51,0x12,0x80,0xa9,0xff,0x00,0x8e,0xa8,0xae,0x46,0x8a,0x2b, +0xea,0xe3,0x15,0x14,0xa2,0xba,0x1c,0x2f,0x57,0x70,0xa2,0x8a,0x29,0x80,0x51,0x45, +0x14,0x01,0xfb,0x85,0x2c,0xdd,0xb3,0x50,0xee,0xcd,0x21,0x39,0x34,0x83,0x8a,0xf8, +0x63,0xda,0x24,0x5a,0x91,0x6a,0x24,0xa9,0x16,0x98,0xc9,0x96,0xa6,0x5a,0x85,0x6a, +0x45,0xcd,0x04,0x96,0x63,0x6e,0x2a,0x74,0x3d,0x2a,0xba,0x54,0xcb,0x9e,0xb4,0xc4, +0x4e,0x0d,0x4c,0xb5,0x02,0xb7,0x4a,0x9a,0x3e,0xd9,0xa6,0x04,0xcb,0x56,0x10,0xe6, +0xa0,0x1d,0xaa,0x68,0xfa,0x54,0x81,0x3a,0xf4,0xa9,0x63,0xe3,0x15,0x12,0x7d,0xda, +0x95,0x7e,0xf0,0xa4,0xca,0x89,0x61,0x3b,0x54,0xeb,0xd4,0xd5,0x74,0xed,0x53,0xa9, +0xdd,0x9a,0x82,0xcb,0x31,0xf5,0x1f,0x4a,0x9d,0x7a,0x55,0x68,0xd8,0xf1,0x56,0x13, +0xd2,0x90,0xd1,0xe7,0x5f,0xb4,0x17,0xc1,0x9d,0x2b,0xe3,0xb7,0xc3,0x2d,0x53,0xc2, +0xda,0x94,0x63,0xce,0x96,0x33,0x25,0x95,0xce,0x39,0x82,0xe0,0x0f,0x91,0xc7,0xf2, +0x3e,0xc6,0xbf,0x08,0xbe,0x20,0x78,0x5e,0xf7,0xc0,0x7e,0x25,0xd5,0xf4,0x2d,0x4e, +0x2f,0x27,0x50,0xd3,0xae,0x64,0xb5,0x99,0x33,0xd1,0x95,0x88,0x3f,0x85,0x7f,0x44, +0x98,0xc9,0x19,0xaf,0xc3,0xff,0x00,0xdb,0xb3,0xc3,0x63,0x45,0xf8,0xe5,0xe3,0x09, +0x42,0x6d,0x69,0x35,0x49,0x4b,0x7b,0xee,0x3b,0x81,0xfc,0x8d,0x61,0x2d,0xd1,0xf6, +0x19,0x1d,0x69,0xf2,0xd4,0xa7,0x7d,0x12,0xbf,0xe8,0x7c,0xc5,0x71,0x29,0x90,0xe3, +0x39,0x35,0x67,0x4e,0x5f,0x20,0x34,0xa7,0xa8,0xe0,0x7d,0x6a,0xac,0x8b,0xb5,0xb2, +0x47,0x27,0xa0,0xad,0x18,0xfc,0xb8,0xe1,0x8d,0x64,0x6d,0xbf,0xc4,0x6a,0x8f,0x5a, +0x0b,0x9a,0x6e,0x4f,0xa1,0xea,0x7f,0xb3,0xbf,0xc5,0xcd,0x5b,0xe0,0x5f,0xc4,0xbd, +0x2b,0xc5,0xba,0x58,0xf3,0xa4,0xb5,0x72,0x26,0xb7,0x27,0x02,0x78,0x9b,0x87,0x8c, +0x9f,0x71,0x5f,0xb9,0x7f,0x06,0xfe,0x33,0x78,0x7f,0xe3,0x97,0x82,0x6c,0xfc,0x4d, +0xe1,0xb9,0xc4,0xb6,0x93,0x7c,0x92,0xc4,0xc7,0xe7,0x82,0x50,0x06,0xe8,0xd8,0x7a, +0x8c,0xfe,0x35,0xfc,0xf6,0xd9,0xc9,0x2d,0xe3,0x0d,0xb9,0x8e,0x0e,0xde,0xfe,0xf5, +0xf7,0xa7,0xfc,0x12,0xef,0xe3,0x00,0xf0,0x9f,0xc5,0x3b,0xdf,0x03,0xde,0xdd,0xb0, +0xd3,0xb5,0xe8,0x0c,0x96,0xd1,0xb1,0xf9,0x45,0xd2,0x60,0x8f,0xa1,0x2b,0x9f,0xca, +0x83,0xcd,0xcc,0xb0,0xaa,0xa5,0x2f,0x6d,0x15,0xaa,0xfc,0x51,0xfa,0xb5,0x52,0x2a, +0xf1,0x51,0xd4,0xa3,0xa5,0x26,0x7c,0x82,0x3e,0x51,0xfd,0xa9,0x7e,0x1f,0xea,0xf0, +0xea,0xb7,0xbe,0x25,0xb5,0xb6,0x96,0xf2,0xc1,0x91,0x5a,0x57,0x88,0x16,0x31,0x61, +0x71,0xc8,0xf4,0xe3,0xad,0x7c,0xa5,0x0c,0xc3,0x53,0x91,0xa4,0x72,0x63,0x5d,0xc7, +0x6b,0x2a,0xe1,0x97,0xeb,0x5f,0xaa,0xd7,0x56,0x90,0xde,0x5b,0xcb,0x04,0xf1,0xac, +0xb0,0xc8,0xa5,0x1d,0x18,0x64,0x30,0x23,0x04,0x1a,0xfc,0xeb,0xf8,0xa9,0xe0,0x9b, +0x6f,0x07,0xf8,0xbb,0x58,0xd3,0x2d,0x23,0x64,0x8e,0x09,0xd8,0x7c,0xc3,0x9c,0x1f, +0x98,0x7e,0x18,0x35,0xf0,0xb9,0xde,0x0a,0x14,0x7f,0x7d,0x1f,0xb4,0xf5,0x3e,0x9b, +0x2d,0xc4,0x4a,0x6f,0xd9,0xcb,0xa2,0x3c,0xef,0x51,0xd1,0x1e,0xfa,0xd6,0x68,0x2e, +0x9c,0xdc,0xd9,0x4e,0x86,0x39,0x3c,0xb0,0x51,0xf6,0xfe,0x15,0xcf,0x5c,0xf8,0x4e, +0xc7,0xc3,0xe9,0xf6,0x8b,0x19,0xe6,0x43,0x1a,0x9d,0x91,0xbc,0x84,0x8e,0x95,0x9f, +0xe3,0xcf,0x8d,0xd6,0x5e,0x09,0x94,0x5b,0x5b,0xc2,0x35,0x0b,0xa1,0xf7,0xd4,0x48, +0x15,0x13,0xea,0x6b,0xc6,0xf5,0xaf,0x8e,0xfe,0x23,0xf1,0x05,0xd1,0x58,0x62,0xb5, +0xb5,0x46,0xe1,0x56,0x38,0xf7,0x63,0xf1,0xaf,0x23,0x0b,0x96,0x63,0xaa,0x2b,0xc7, +0x48,0xbe,0xfd,0x7e,0x47,0xd5,0x43,0x05,0x52,0xb2,0xe6,0xb7,0xde,0x74,0x1e,0x36, +0xf1,0x52,0xe9,0xd0,0xc8,0x18,0xbb,0x4d,0x2a,0x90,0x15,0x0f,0x6e,0xf9,0xf6,0xaf, +0x16,0xbf,0x9b,0xcf,0x76,0x2b,0x19,0xeb,0xd4,0xd6,0x97,0x89,0xbc,0x45,0xac,0x5d, +0xc8,0x11,0xfc,0x93,0xb0,0x72,0xf9,0x04,0x9f,0x52,0x6b,0x97,0x92,0xfe,0xf5,0x49, +0x69,0x00,0x35,0xf7,0xb8,0x2c,0x2f,0xd5,0x69,0x28,0x75,0x3d,0x3a,0x14,0xe3,0x46, +0x1c,0xad,0x3f,0x37,0x60,0x92,0x50,0xcc,0x91,0x91,0xbb,0x9e,0x77,0x1e,0x83,0xda, +0xaa,0x5c,0x5a,0xf9,0x39,0x31,0x37,0xde,0xfe,0x16,0xe4,0xd5,0xb4,0x8f,0xcc,0x4d, +0xf2,0xab,0x06,0x6f,0x5a,0xab,0x71,0x03,0x79,0x72,0xcc,0xac,0xa6,0x28,0xc8,0x04, +0x16,0xe7,0x9f,0x41,0x5e,0x80,0xeb,0xf2,0x53,0x87,0x3c,0xca,0x5e,0x5e,0xd2,0x03, +0x7c,0xe7,0xb8,0xe8,0xd5,0xea,0x7f,0x0d,0x7c,0x2e,0xf0,0xb5,0xae,0xbb,0x6f,0x0b, +0x6b,0x3a,0x32,0xc8,0x16,0xe5,0xed,0x4e,0x2e,0x6c,0x5f,0xb1,0x2b,0xfc,0xbb,0x1e, +0x6b,0xcf,0xfc,0xeb,0x49,0x16,0xd6,0xe0,0xdb,0xb4,0xb0,0x28,0x11,0xdc,0xa8,0x38, +0x21,0xbf,0xbc,0xa7,0xb6,0x7f,0xa5,0x7d,0x0f,0xf0,0x17,0xc2,0x77,0xfa,0x25,0x9d, +0xcf,0x8a,0x34,0x33,0x1e,0xa3,0x65,0x11,0xd9,0x2c,0x6a,0xdc,0x5f,0xc0,0x7e,0xfc, +0x12,0xc7,0xfc,0x32,0x28,0xf9,0x81,0xf6,0xa9,0xa9,0x2e,0x58,0x86,0x02,0x8f,0x35, +0x7b,0xc3,0x5b,0x6b,0xe7,0xfd,0x7f,0x5a,0x1f,0x43,0x78,0x42,0x2b,0x4d,0x1e,0xc3, +0xed,0x36,0xad,0x1f,0x95,0x73,0xb6,0x73,0x2a,0x01,0xb1,0xd8,0xae,0x04,0xa0,0x76, +0xdc,0x38,0x22,0xbd,0x83,0x41,0xf0,0xd8,0xf1,0x27,0x84,0xb4,0xfd,0x6a,0xca,0x48, +0xee,0x56,0xe2,0xde,0x38,0xae,0x0c,0x67,0x26,0x29,0xa1,0x25,0x4a,0xe3,0xdd,0x76, +0x9a,0xf9,0xcb,0x56,0xd7,0xac,0xbc,0x37,0xe7,0xc5,0x1d,0xe2,0x8d,0x1e,0x75,0xf3, +0x6c,0xe4,0x6f,0xf9,0xe3,0x32,0xee,0x52,0x7f,0xdd,0x7c,0x66,0xa9,0xfe,0xc2,0xff, +0x00,0x1d,0xf5,0x1d,0x2f,0xc6,0xda,0xcf,0x87,0xf5,0xfb,0xa5,0x6f,0x09,0xdd,0x6e, +0x96,0x69,0x25,0x6e,0x2d,0xe4,0xce,0x04,0x8b,0xed,0x8e,0xbe,0xd5,0xcd,0x83,0x6e, +0x12,0x94,0x9e,0xc7,0xa1,0xc5,0x78,0x28,0xe3,0x30,0xd4,0xe5,0x4a,0x37,0xaa,0xb5, +0x56,0xea,0xba,0xaf,0xd5,0x1e,0x8b,0xe2,0x0f,0x03,0x05,0x87,0xcd,0x9e,0x22,0x93, +0x4e,0xef,0x39,0x1b,0x7b,0x93,0x85,0x1f,0x90,0x1f,0x9d,0x71,0x3a,0x4f,0xd9,0x6d, +0x5a,0xe2,0xda,0x4b,0x95,0x86,0xe1,0x90,0x90,0x5f,0xb9,0x26,0xbe,0xa9,0xf8,0xa2, +0xda,0x36,0x9b,0x6f,0x73,0xac,0x5c,0x5c,0xda,0xc3,0xa6,0x43,0x11,0x22,0xe2,0x49, +0x00,0x88,0x47,0xd0,0xbe,0x7b,0xe7,0xa0,0x1d,0xeb,0xf3,0xab,0xc5,0xff,0x00,0x16, +0xad,0x75,0x6f,0x1b,0x4d,0x61,0xe1,0x48,0x1a,0x6b,0x63,0x3e,0xd3,0xa8,0x5d,0xf7, +0xf5,0xda,0x83,0xa0,0xfa,0x9a,0xf7,0xe9,0x7c,0x6a,0xc7,0xe2,0xde,0xf3,0x4d,0x35, +0xb1,0xeb,0xda,0x87,0x8a,0x2e,0x3c,0x35,0xa5,0x9d,0x1d,0x67,0x5b,0x8b,0x43,0x73, +0x0d,0xe2,0xa9,0x39,0x30,0x4c,0xad,0xc3,0x2f,0xa6,0x46,0x41,0xf5,0xcd,0x7e,0xb2, +0x78,0x32,0x24,0x4f,0x0a,0xe9,0x2d,0x1a,0x85,0x59,0x2d,0xa3,0x93,0xe5,0xe9,0xf3, +0x28,0x3f,0xd6,0xbf,0x1c,0x74,0x9d,0x1c,0xf8,0xbb,0xc6,0xde,0x1d,0xd0,0xe3,0x94, +0xcd,0x71,0x7d,0x79,0x14,0x52,0x49,0x9e,0x08,0x24,0x64,0xfd,0x05,0x7e,0xcf,0x69, +0xba,0x7a,0x69,0x3a,0x5d,0xa5,0x94,0x47,0x31,0xdb,0x42,0xb0,0xa9,0xf6,0x50,0x00, +0xfe,0x55,0xa6,0x35,0xec,0x8c,0x64,0x58,0xa4,0xa2,0x91,0xab,0xcc,0x31,0x11,0xba, +0xd2,0x1a,0x5a,0x63,0x7d,0xec,0x50,0x21,0xad,0xc2,0xd4,0x66,0x9c,0xcd,0x4c,0xab, +0x42,0x7d,0xc4,0xa6,0xb7,0x2d,0x9f,0x4a,0x77,0xad,0x46,0xcd,0xb5,0x73,0xeb,0x4c, +0x82,0x16,0x62,0x73,0x50,0x3f,0xdd,0xa9,0x5b,0x85,0xa8,0x24,0x6a,0xa1,0x1f,0x0a, +0xff,0x00,0xc1,0x44,0xbc,0x0c,0x46,0xad,0xa1,0x78,0x92,0x18,0x80,0x4b,0xa8,0x1a, +0xce,0x67,0x1f,0xdf,0x52,0x59,0x33,0xf5,0x19,0xfc,0xab,0xe1,0xa3,0xc1,0xc5,0x7e, +0xbe,0x7e,0xd2,0x1f,0x0f,0x7f,0xe1,0x65,0x7c,0x24,0xd6,0xf4,0xc8,0xa2,0x12,0xdf, +0xc3,0x1f,0xda,0xec,0xfd,0x7c,0xe4,0x04,0x80,0x3e,0xa3,0x23,0xf1,0xaf,0xc9,0x2d, +0x6e,0xc5,0xec,0x6f,0xe5,0x47,0x52,0x87,0x71,0x05,0x48,0xe8,0x73,0xc8,0xfc,0xeb, +0xeb,0x72,0xca,0xbc,0xf4,0x79,0x3a,0xa3,0xfa,0x3f,0x80,0xb3,0x15,0x89,0xcb,0xfe, +0xab,0x27,0xef,0x53,0x76,0xf9,0x74,0xff,0x00,0x2f,0x91,0x9f,0x5e,0xd3,0xfb,0x2e, +0xfe,0xcd,0xf7,0x7f,0xb4,0x67,0x8c,0x2e,0xec,0x0e,0xa1,0xfd,0x8f,0xa3,0x69,0xd1, +0x09,0xef,0x6f,0x44,0x7b,0xdf,0x04,0xe1,0x51,0x07,0x4d,0xc7,0x9e,0xa7,0x80,0x09, +0xe7,0xa5,0x78,0xb5,0x7d,0x6b,0xff,0x00,0x04,0xfd,0xf8,0xe5,0xe1,0xbf,0x85,0xfe, +0x28,0xd7,0xf4,0x0f,0x15,0x5e,0x45,0xa5,0xe9,0xda,0xf4,0x71,0xf9,0x57,0xd7,0x07, +0x6c,0x4b,0x2a,0x64,0x04,0x76,0xfe,0x10,0x43,0x1f,0x98,0xf1,0x9c,0x57,0x66,0x2e, +0x55,0x21,0x46,0x52,0xa5,0xb9,0xf6,0x39,0xf5,0x6c,0x5e,0x1f,0x2d,0xad,0x57,0x02, +0xaf,0x51,0x2d,0x2c,0xae,0xf7,0xd5,0xa5,0xd6,0xca,0xec,0xed,0x2d,0x7f,0x62,0x3f, +0x84,0x1f,0x13,0x2d,0xf5,0xcd,0x2f,0xe1,0x9f,0xc4,0xad,0x42,0xff,0x00,0xc5,0x3a, +0x38,0x2b,0x71,0x05,0xf1,0x8e,0x58,0xb7,0x82,0x46,0x08,0x58,0xa3,0x3b,0x4b,0x0c, +0x6e,0x52,0xc0,0x7b,0xd7,0x9b,0xfc,0x12,0xfd,0x97,0xfe,0x1e,0x78,0xe3,0x46,0xb9, +0x8b,0xc6,0xbf,0x13,0x2d,0x3c,0x21,0xe2,0xa8,0x35,0x39,0x74,0xe3,0xa3,0x49,0x75, +0x6c,0x92,0x33,0x2b,0x05,0x52,0xab,0x23,0x06,0x3b,0x8f,0x4c,0x0e,0x7b,0x57,0xb6, +0xf8,0xbb,0xf6,0x32,0xf1,0x87,0x81,0x75,0x3d,0x53,0xc6,0x7f,0x02,0x7c,0x70,0xe8, +0x75,0x05,0x69,0x5a,0xc3,0xcd,0x55,0x91,0xd1,0x8e,0xfd,0x91,0x4c,0x32,0xae,0x33, +0xd0,0x30,0x5e,0xdc,0x9a,0xf8,0xa7,0xc3,0xf2,0x6a,0xd2,0xfc,0x6a,0xd1,0xdb,0x5e, +0xf3,0xce,0xb4,0x75,0xeb,0x7f,0xb6,0x7d,0xa4,0x62,0x4f,0x37,0xcf,0x5d,0xdb,0xbd, +0xf3,0x5e,0x75,0x19,0x4e,0xb4,0x25,0xc9,0x5a,0xeb,0xf1,0x5e,0xba,0x1f,0x21,0x96, +0xd6,0xc4,0x66,0x14,0x2b,0x7d,0x5b,0x30,0x72,0x8a,0x49,0xab,0xa5,0xed,0x22,0xd2, +0xd5,0x34,0xd2,0x56,0x6f,0x6f,0x4d,0x0f,0xaf,0xfc,0x55,0xfb,0x00,0xfc,0x27,0xf0, +0x2d,0xc5,0xbc,0x3e,0x25,0xf8,0xbe,0x3c,0x3f,0x2d,0xc2,0x97,0x8a,0x3d,0x52,0x6b, +0x5b,0x66,0x91,0x41,0xc1,0x2a,0x1d,0x86,0x46,0x7b,0xd6,0x07,0xc0,0x5f,0xd8,0x1f, +0xc3,0x9f,0x18,0x7e,0x1b,0x59,0x78,0xa2,0xe3,0xc5,0xba,0x8d,0x9b,0xdc,0xdc,0x5c, +0x44,0x23,0xb6,0x86,0x37,0x42,0xb1,0xca,0xc8,0xac,0x09,0xeb,0x90,0xa0,0xfe,0x35, +0x6b,0xfe,0x0a,0x91,0xff,0x00,0x23,0x87,0x82,0x3f,0xeb,0xc2,0x6f,0xfd,0x19,0x5e, +0xa3,0xfb,0x3d,0xf8,0xb9,0xbc,0x0b,0xfb,0x15,0xf8,0x4f,0x5c,0x57,0xf2,0xd6,0xd7, +0x56,0x89,0x64,0x6c,0xe3,0x11,0xbd,0xf8,0x8d,0xcf,0xfd,0xf2,0xed,0x5c,0xae,0xae, +0x23,0xea,0xd0,0xa8,0xaa,0x6b,0x27,0x6e,0x9e,0x67,0x85,0x2c,0x76,0x6f,0x1c,0x96, +0x86,0x32,0x18,0xa6,0xea,0x56,0x9a,0x8a,0xd2,0x3a,0x7c,0x4b,0x4d,0x3a,0xe9,0xf7, +0x1f,0x14,0xf8,0x2f,0xe0,0x2c,0x9e,0x26,0xfd,0xa4,0x07,0xc2,0xd9,0xef,0x24,0x80, +0x47,0xa9,0xdc,0x58,0xcf,0x78,0x88,0x0b,0x22,0x42,0x1c,0xb3,0xe3,0xa6,0x70,0x9f, +0x99,0xaf,0x58,0xfd,0xab,0x7f,0x62,0xfd,0x13,0xf6,0x79,0xf8,0x6f,0x67,0xe2,0x5d, +0x3b,0xc4,0x77,0xfa,0xbc,0xf3,0xea,0x71,0x58,0x18,0x2e,0xa1,0x44,0x50,0xad,0x1c, +0xae,0x5b,0x2b,0xce,0x7f,0x76,0x3f,0x3a,0xfa,0x23,0xc3,0xff,0x00,0x0f,0xed,0xfc, +0x31,0xfb,0x70,0x7c,0x42,0xf1,0xa4,0xf1,0x04,0xd1,0xec,0xbc,0x3a,0x9a,0xb0,0x93, +0xb6,0xe9,0x54,0x06,0x7f,0xfc,0x83,0x35,0x71,0x9f,0xb6,0x2e,0xb9,0x71,0xe2,0x6f, +0xd8,0x77,0xe1,0xa6,0xaf,0x76,0xc5,0xee,0x6f,0xae,0xb4,0xdb,0x99,0x58,0xf7,0x67, +0xb2,0x9d,0x89,0xfd,0x6b,0x5f,0xad,0xd5,0xa9,0x5e,0x9a,0x8b,0xf7,0x5d,0xaf,0xea, +0xd5,0xce,0xf5,0x9f,0x63,0x31,0x59,0x96,0x0d,0x51,0xa9,0x6a,0x72,0x54,0xd4,0x96, +0x9a,0xca,0x49,0xc9,0xf4,0xec,0x91,0xf3,0x1d,0xe7,0xc1,0x1f,0x05,0xf8,0x0e,0xdf, +0x4c,0xb4,0xf8,0x87,0xe3,0xbb,0xbd,0x0f,0xc4,0x97,0xf6,0xd1,0xdd,0xbe,0x95,0xa4, +0xe8,0xe6,0xfb,0xfb,0x3e,0x39,0x54,0x34,0x66,0xe1,0xcc,0xa9,0xf3,0x15,0x21,0x8a, +0x20,0x24,0x0e,0xfc,0x8a,0xe4,0xfc,0x75,0xf0,0x57,0x59,0xf0,0x7f,0xc4,0x6d,0x37, +0xc2,0x56,0x92,0xc3,0xaf,0x4d,0xac,0xad,0xb4,0xda,0x35,0xe5,0x96,0x44,0x7a,0x84, +0x37,0x18,0xf2,0x24,0x40,0xd8,0x23,0x76,0x71,0x83,0xd0,0x83,0xf5,0xab,0xbe,0x1b, +0xd0,0xaf,0xff,0x00,0x68,0x2f,0x17,0x6a,0x7a,0xa7,0x89,0xbc,0x7b,0xa0,0x68,0x7a, +0x93,0xb4,0x22,0x6b,0xef,0x12,0x5c,0xfd,0x9b,0xcf,0xca,0x94,0x1b,0x02,0xa6,0x0e, +0xd5,0x8d,0x41,0xe9,0x8c,0xaf,0xad,0x76,0x3f,0x1c,0xfc,0x69,0xad,0xfc,0x34,0xf8, +0xd1,0xe1,0x3f,0xec,0xfd,0x3a,0x6d,0x32,0x7f,0x04,0x69,0x16,0x3a,0x6e,0x93,0x2e, +0xa7,0x14,0x72,0x1b,0xa8,0xe2,0x0c,0xcb,0x75,0x85,0x66,0x42,0xae,0xf2,0x3b,0x2e, +0xd6,0x20,0x0c,0x73,0x91,0xc7,0xa6,0xa5,0x52,0x33,0xe4,0xe6,0xbb,0xb3,0xba,0xe9, +0xf2,0x3e,0xce,0x15,0xb1,0x54,0xf1,0x0a,0x87,0xb5,0xe7,0xa8,0xe3,0x27,0x28,0xb4, +0x94,0x53,0xb2,0xb7,0x2b,0xb2,0x76,0xbb,0xb6,0xed,0xdb,0x57,0xa9,0x5e,0x4f,0x81, +0x7f,0x0f,0x6d,0x7c,0x50,0x7c,0x17,0x77,0xf1,0x49,0xa2,0xf1,0x92,0xcd,0xf6,0x39, +0x24,0x5d,0x19,0x9b,0x49,0x8e,0xef,0x3b,0x4c,0x06,0xe3,0xcc,0xdf,0x80,0xff,0x00, +0x29,0x93,0xcb,0xda,0x3d,0x30,0x2b,0xc7,0x7c,0x59,0xe1,0x7d,0x43,0xc1,0x5e,0x26, +0xd5,0x34,0x0d,0x5a,0x1f,0xb3,0xea,0x5a,0x6d,0xcc,0x96,0xb7,0x11,0x83,0x90,0x1d, +0x18,0x83,0x83,0xdc,0x71,0x90,0x7b,0x82,0x2b,0xb5,0xf8,0x3d,0xf0,0xbf,0x57,0xf8, +0xcd,0xe3,0x87,0x99,0xe4,0xfb,0x1e,0x8f,0x6d,0x2f,0xdb,0xb5,0xbd,0x72,0xe0,0xec, +0x82,0xca,0x0d,0xc5,0xa4,0x91,0xdc,0xf0,0x18,0x80,0xd8,0x07,0xa9,0xaa,0x7f,0x1f, +0x3c,0x77,0x69,0xf1,0x33,0xe3,0x27,0x8b,0xbc,0x4f,0x60,0xa5,0x6c,0x35,0x0b,0xf7, +0x7b,0x7d,0xca,0x54,0xb4,0x4a,0x02,0x23,0x10,0x7a,0x12,0xaa,0x0e,0x3d,0xeb,0x4a, +0x6e,0x4a,0xa7,0x23,0x95,0xf4,0xd7,0xc9,0xff,0x00,0xc1,0x3a,0xf0,0xb3,0xad,0x0c, +0x5b,0xc3,0xca,0xab,0xa9,0x68,0xde,0x57,0x4b,0xdd,0x95,0xd5,0x96,0x89,0x7c,0x4a, +0xee,0xce,0xed,0x59,0x77,0x3d,0x43,0xf6,0x4f,0xfd,0x96,0xf4,0xaf,0xda,0x23,0x44, +0xf1,0x7d,0xf6,0xa3,0xad,0xde,0x69,0x0f,0xa2,0x18,0x44,0x6b,0x6b,0x12,0x38,0x93, +0x7a,0xc8,0x4e,0xed,0xdd,0x31,0xb0,0x74,0xf5,0xae,0x67,0xf6,0x61,0xf8,0x0d,0xa7, +0xfc,0x7a,0xf8,0x9d,0x79,0xe1,0x7d,0x43,0x54,0xb9,0xd2,0xed,0xe0,0xb6,0x96,0x71, +0x71,0x6c,0x8a,0xce,0x4a,0xb0,0x00,0x61,0xb8,0xef,0x5f,0x4c,0xff,0x00,0xc1,0x2f, +0x21,0x5b,0x8f,0x0d,0x7c,0x4d,0x89,0x9b,0x62,0xbc,0x96,0x6a,0x5b,0xd0,0x14,0x9c, +0x66,0xbd,0x27,0xf6,0x69,0xfd,0x98,0xfc,0x1d,0xf0,0x8f,0xe2,0x5d,0xde,0xbf,0xa1, +0x7c,0x43,0x83,0xc4,0xf7,0xd2,0xdb,0x49,0x13,0x58,0x46,0xb1,0x02,0xaa,0xcc,0x09, +0x6f,0x95,0xd8,0xf1,0xf4,0xaf,0x26,0xbe,0x32,0x54,0xa7,0x5a,0x0e,0x5a,0xab,0x5b, +0x4f,0x2f,0xeb,0x73,0xe0,0xf3,0x4e,0x22,0xab,0x81,0xc4,0xe6,0x38,0x79,0x55,0x69, +0xc5,0x47,0xd9,0xe9,0x7b,0x37,0x1b,0xbd,0x6d,0xa6,0xbd,0xcf,0x99,0xbc,0x0f,0xfb, +0x08,0x9f,0x88,0xde,0x38,0xf8,0x83,0xa2,0xe9,0xfe,0x30,0x5d,0x32,0xdf,0xc2,0xda, +0x92,0x58,0x2c,0x97,0x76,0x5e,0x6b,0xdc,0x06,0x42,0xdb,0x8e,0xd7,0x50,0xbd,0x3a, +0x57,0x72,0x9f,0xf0,0x4b,0x4d,0x45,0xcf,0x1f,0x11,0x6c,0xc8,0xef,0xb7,0x4b,0x63, +0xff,0x00,0xb5,0x6b,0xe6,0xcf,0xda,0xb1,0x4b,0x7e,0xd1,0xde,0x3e,0x00,0x6e,0x27, +0x53,0x60,0x00,0x1f,0xec,0xad,0x7d,0x43,0xa8,0x58,0xaf,0xec,0x77,0xfb,0x1b,0xa3, +0xdb,0xed,0xb7,0xf1,0xe7,0x8d,0x02,0xa4,0x97,0x1c,0x79,0x91,0x87,0x5c,0x90,0xa7, +0xfd,0x88,0xcf,0xe6,0xd5,0x75,0x67,0x89,0x8c,0x60,0xe1,0x53,0x59,0x5a,0xca,0xcb, +0xe7,0xa9,0xd3,0x8e,0xc4,0x67,0x14,0xe9,0x61,0xaa,0x61,0xf1,0x9e,0xf5,0x7e,0x45, +0x18,0x7b,0x38,0xbd,0xe2,0xb9,0x9b,0x97,0x65,0xab,0x7a,0x79,0x1f,0x09,0xeb,0x5a, +0x69,0xd1,0xf5,0x9b,0xfd,0x3c,0xc8,0x26,0x36,0x97,0x12,0x41,0xe6,0x01,0x80,0xdb, +0x18,0xae,0x71,0xef,0x8a,0xa5,0x4a,0xcc,0x59,0x89,0x62,0x49,0x27,0x24,0x9e,0xa6, +0x92,0xbd,0xd5,0xb6,0xa7,0xe9,0xf1,0xba,0x49,0x3d,0xc2,0x8a,0x2a,0x2b,0xab,0x85, +0xb5,0xb7,0x92,0x66,0xe8,0xa3,0x3f,0x53,0xd8,0x50,0x67,0x5a,0xb4,0x30,0xf4,0xe5, +0x5a,0xab,0xb4,0x62,0x9b,0x6f,0xb2,0x5a,0xb3,0x9d,0xf1,0x0d,0xc7,0x9d,0x7d,0xb0, +0x74,0x8c,0x6d,0xfc,0x7a,0x9f,0xf3,0xed,0x4b,0xe1,0xff,0x00,0x14,0x6a,0xfe,0x15, +0xbb,0xfb,0x4e,0x91,0xa8,0xcf,0x61,0x29,0xfb,0xde,0x53,0x7c,0x92,0x0f,0x47,0x43, +0xf2,0xb8,0xff,0x00,0x65,0x81,0x07,0xd2,0xb3,0x24,0x73,0x23,0xb3,0xb1,0xcb,0x31, +0xc9,0xa4,0xae,0x79,0x7b,0xdb,0x9f,0xc4,0x39,0xb6,0x61,0x3c,0xd3,0x1f,0x5b,0x1b, +0x2d,0xe7,0x26,0xfd,0x17,0x45,0xf2,0x56,0x47,0x59,0x27,0xc4,0x05,0xbe,0xb8,0x79, +0xf5,0x0f,0x0d,0x68,0x37,0xb3,0x49,0xcb,0xc8,0x2d,0x0c,0x05,0x8f,0xae,0x23,0x65, +0x51,0xf8,0x00,0x29,0xf6,0xbf,0x12,0xae,0x74,0x7b,0x83,0x71,0xa2,0xe8,0xda,0x36, +0x8b,0x75,0xb4,0xaa,0xdd,0x41,0x69,0xe6,0xcb,0x1e,0x7a,0x95,0x32,0x96,0x0a,0x7f, +0xda,0x03,0x23,0xb1,0x15,0xc8,0x51,0x51,0xc9,0x1e,0xc7,0x95,0xcc,0xc9,0xaf,0x6f, +0xae,0x75,0x2b,0xa9,0x6e,0xaf,0x2e,0x25,0xbb,0xb9,0x94,0xee,0x92,0x69,0xdc,0xbb, +0xb9,0xf5,0x2c,0x79,0x26,0xa1,0xa2,0x8a,0xb2,0x42,0x8a,0x28,0xa0,0x02,0x8a,0x28, +0xa0,0x02,0x8a,0x28,0xa0,0x05,0x57,0x68,0xd9,0x59,0x18,0xab,0x29,0xc8,0x65,0x38, +0x20,0xfa,0xd7,0xd8,0x3f,0xb3,0x2f,0xed,0x3d,0xad,0xf8,0x4e,0xdd,0xb5,0x19,0xee, +0xd6,0xc5,0xed,0xa5,0x8a,0xce,0x5b,0xab,0x82,0x05,0xbd,0xe9,0x6c,0x95,0x8d,0xc7, +0xf7,0xf0,0xa4,0xe4,0x74,0xe0,0xf1,0x9e,0x7e,0x48,0xd1,0xf4,0x9b,0xcd,0x7f,0x56, +0xb3,0xd3,0x34,0xf8,0x1a,0xea,0xfa,0xf2,0x55,0x82,0x08,0x50,0x72,0xee,0xc7,0x00, +0x7e,0x66,0xba,0x4f,0x88,0x1a,0xa5,0xac,0x06,0xcf,0xc3,0x3a,0x4c,0xfe,0x7e,0x8f, +0xa3,0x6e,0x43,0x32,0x9f,0x96,0xee,0xe9,0xbf,0xd7,0x4e,0x31,0xd4,0x12,0x02,0xaf, +0xfb,0x2a,0x3d,0x71,0x57,0x1a,0xae,0x0d,0xc2,0xd7,0x4f,0x74,0xf6,0x68,0xe0,0xc5, +0xe0,0x61,0x8c,0x8a,0x93,0x6e,0x32,0x8e,0xb1,0x92,0xd1,0xa7,0xe5,0xfa,0xae,0xa7, +0xec,0xc7,0x81,0xff,0x00,0x6a,0xaf,0x08,0xf8,0x96,0xd6,0x31,0xab,0x4a,0xda,0x0d, +0xe9,0x1c,0x89,0x81,0x78,0x5b,0xdd,0x5c,0x76,0xfa,0xe2,0xb5,0xee,0xe7,0xf8,0x79, +0xa8,0x78,0xcf,0x4c,0xf1,0x9d,0xb7,0x89,0xb4,0x9b,0x5b,0xfb,0x28,0xe4,0x8a,0x49, +0x21,0xba,0x87,0x6d,0xc2,0x38,0x23,0x0f,0xcf,0x51,0xce,0x0f,0x5e,0xd5,0xf8,0x8d, +0xe1,0xdf,0x89,0x1e,0x25,0xf0,0xac,0x7e,0x56,0x9d,0xab,0x4f,0x14,0x19,0xcf,0x92, +0xe7,0x7a,0x7e,0x47,0xa5,0x74,0xcb,0xfb,0x43,0xf8,0xc5,0x57,0x06,0x7b,0x36,0x6f, +0xef,0x1b,0x65,0xcd,0x72,0x7f,0x67,0xe0,0xf9,0x9c,0xe9,0x4a,0x50,0xbd,0xd3,0x5a, +0x35,0x67,0xba,0xd7,0xf5,0x39,0x25,0x57,0x37,0xe5,0x54,0xea,0xc6,0x9d,0x54,0x9a, +0x69,0xbb,0xc5,0xdd,0x6a,0x9d,0x92,0x6a,0xfe,0x87,0xec,0x6f,0x8b,0xbf,0x69,0xaf, +0x04,0x78,0x66,0xda,0x43,0x6b,0xa8,0x7f,0x6e,0x5d,0xa8,0xf9,0x60,0xb0,0x1b,0x94, +0x9f,0x79,0x0f,0xca,0x07,0xe7,0x5f,0x05,0xfe,0xd4,0x1f,0xb6,0x4d,0xcf,0x88,0xee, +0x24,0xb6,0x59,0xa3,0x96,0xe6,0x32,0x45,0xb6,0x9b,0x6e,0xdb,0xa1,0xb5,0x24,0x7d, +0xf9,0x0f,0xf1,0x37,0xb7,0xf2,0xaf,0x92,0x75,0xef,0x8b,0x3e,0x2b,0xf1,0x24,0x0d, +0x05,0xde,0xaf,0x32,0xc0,0xdf,0x7a,0x2b,0x70,0x22,0x53,0xf5,0xdb,0x5c,0x8f,0x5c, +0x93,0xc9,0xae,0x8c,0x3d,0x0c,0x2e,0x07,0xde,0xc3,0xc5,0xb9,0x7f,0x34,0xb7,0x5e, +0x8b,0x64,0x4d,0x5c,0x3e,0x3b,0x32,0x69,0x66,0x35,0x12,0xa7,0xfc,0x90,0xbd,0x9f, +0xf8,0x9b,0xd5,0xfa,0x6c,0x7d,0x35,0xf0,0x87,0xf6,0xce,0xd4,0x3c,0x37,0x0c,0x5a, +0x67,0x8c,0x2d,0x1b,0x55,0xb1,0x53,0x84,0xbe,0xb5,0x55,0x59,0xe2,0x5f,0x42,0xbc, +0x2b,0x81,0xf8,0x1a,0xfa,0x7b,0xc2,0x7f,0x1c,0x7c,0x0b,0xe3,0x50,0x83,0x4b,0xf1, +0x2d,0x8b,0xce,0xdd,0x2d,0xe7,0x93,0xc9,0x97,0xfe,0xf8,0x7c,0x1f,0xca,0xbf,0x31, +0xe9,0x08,0x0d,0xd4,0x66,0xb8,0x2b,0x60,0xe9,0xd5,0x6e,0x5b,0x36,0x7d,0x04,0x27, +0xc8,0x94,0x52,0xd1,0x1f,0xad,0x1f,0xdb,0x1a,0x7e,0x33,0xf6,0xfb,0x5c,0x7a,0xf9, +0xcb,0xfe,0x35,0xc7,0xf8,0xb7,0xe3,0x9f,0x81,0x3c,0x12,0xae,0x35,0x4f,0x12,0xd8, +0xac,0xeb,0xd6,0xda,0xde,0x4f,0x3a,0x5f,0xfb,0xe1,0x32,0x7f,0x3a,0xfc,0xca,0xf3, +0x1f,0x6e,0xdd,0xed,0x8f,0x4d,0xc7,0x14,0xc0,0x02,0xf0,0x06,0x05,0x73,0xc7,0x2e, +0x8d,0xfd,0xe9,0x17,0xed,0x7b,0x23,0xe9,0x9f,0x8c,0x1f,0xb6,0x66,0xa7,0xe2,0x6b, +0x79,0xf4,0xaf,0x07,0x41,0x2e,0x8b,0x61,0x26,0x51,0xf5,0x09,0x88,0xfb,0x4c,0x8b, +0xd3,0x0a,0x07,0x09,0xf9,0x93,0x5f,0x34,0x3b,0xb4,0x8c,0xcc,0xec,0x59,0x98,0xe4, +0xb3,0x1c,0x92,0x7d,0x4d,0x25,0x15,0xe9,0x53,0xa5,0x0a,0x4a,0xd0,0x46,0x52,0x93, +0x96,0xe1,0x45,0x14,0x56,0xa4,0x85,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x1f,0xb6, +0xea,0xd4,0xbc,0xb7,0x22,0xa3,0x5a,0x7a,0xb7,0x38,0xaf,0x86,0x3d,0xc2,0x51,0x52, +0x2d,0x45,0x52,0x06,0xe2,0x98,0x89,0x90,0xd4,0xcb,0x55,0xd3,0xb5,0x4e,0xb4,0x12, +0x58,0x8f,0xad,0x4e,0x33,0x55,0x95,0xbb,0xd4,0xc1,0xba,0x53,0x11,0x3a,0xd4,0xe9, +0xda,0xab,0x2b,0x54,0xcb,0xd2,0x9d,0xb4,0x02,0xca,0xf6,0xa9,0xe3,0xaa,0xa8,0x4d, +0x58,0x46,0xa5,0x60,0x2c,0xa7,0x7a,0x90,0x54,0x08,0xdf,0x95,0x4c,0x29,0x0e,0x25, +0x98,0xfe,0xf5,0x4d,0x19,0xf9,0xaa,0xba,0x0c,0x54,0xd1,0x9c,0x54,0x1a,0x16,0x52, +0xac,0xae,0x32,0x79,0xeb,0x55,0x57,0x9e,0x2a,0x74,0x6e,0x84,0xd4,0xb0,0x44,0xcb, +0x5f,0x95,0x5f,0xf0,0x54,0xcf,0x02,0x1d,0x17,0xe2,0x28,0xd6,0x23,0x8f,0xf7,0x1a, +0xac,0x11,0xdc,0x64,0x0f,0xe3,0x5f,0x91,0xbf,0xa7,0xe7,0x5f,0xaa,0xbe,0xb5,0xf2, +0xa7,0xfc,0x14,0x73,0xe1,0x4c,0xbf,0x11,0x3e,0x02,0xde,0x6a,0xb6,0x30,0x09,0xaf, +0xf4,0x02,0x6e,0x5b,0x00,0x6e,0x30,0x1c,0x07,0xc7,0xd0,0xe0,0xfe,0x15,0x94,0xf5, +0x3d,0xcc,0xa6,0xba,0xa3,0x89,0x49,0xed,0x24,0xd7,0xdf,0xb7,0xe3,0x63,0xf1,0x3c, +0x29,0x9a,0xe0,0x8e,0xd9,0xab,0xf2,0x5b,0x09,0x26,0x5d,0xc3,0x2a,0xa3,0xbf,0x4a, +0x86,0xce,0x3f,0xf4,0xc7,0x07,0xb5,0x3e,0xe2,0x36,0x9a,0xe9,0x90,0x12,0x13,0xd2, +0x93,0xdc,0xfb,0x1a,0x6b,0xdc,0xbd,0xaf,0x76,0x5d,0xb5,0xbb,0xde,0xdb,0x63,0x5f, +0x95,0x7f,0x8e,0xbd,0x4b,0xe0,0x27,0x8c,0x1b,0xc0,0xbf,0x17,0x3c,0x29,0xe2,0x08, +0xf9,0x97,0x4f,0xd4,0x21,0x98,0xb6,0x7a,0xae,0xec,0x30,0xfc,0x89,0xaf,0x2d,0x8f, +0x6c,0x4a,0xa8,0xa3,0x6a,0xfa,0x0a,0xd0,0xb5,0xb8,0xfb,0x3b,0x26,0x1b,0x6b,0x03, +0x91,0xb7,0xa8,0xa4,0x6b,0x51,0x73,0xc5,0xc6,0x47,0xf4,0x79,0x6b,0x22,0xcc,0x43, +0xa1,0xdc,0x8c,0xb9,0x07,0xd4,0x55,0x9a,0xf9,0x9b,0xf6,0x07,0xf8,0xe8,0x3e,0x33, +0x7c,0x17,0xb2,0x82,0xfa,0xe8,0xcf,0xe2,0x0d,0x0c,0x0b,0x2b,0xcf,0x31,0xb7,0x48, +0xea,0x3f,0xd5,0xc8,0x49,0xeb,0x91,0xdf,0xda,0xbe,0x99,0xa4,0x7e,0x73,0x52,0x9b, +0xa5,0x37,0x09,0x6e,0x84,0xaf,0x85,0xff,0x00,0xe0,0xa2,0x61,0xfc,0x1f,0x6b,0x67, +0xad,0xd8,0x2f,0x97,0x71,0xaa,0xc4,0xd6,0xf2,0x3a,0xf5,0xdc,0x83,0x39,0xfc,0x8e, +0x2b,0xed,0xdd,0x4b,0x55,0xb6,0xd2,0x6c,0xae,0x2e,0xee,0xe5,0x58,0x2d,0xad,0xd0, +0xc9,0x24,0xae,0x70,0x15,0x40,0xc9,0x35,0xf9,0x9f,0xfb,0x5e,0x7c,0x41,0x9f,0xe3, +0x04,0xd7,0x9a,0xb0,0x69,0x21,0xd0,0xb4,0xf5,0x30,0x69,0xd6,0xfc,0xfe,0xf0,0x93, +0x86,0x90,0x8a,0xf3,0xf1,0x92,0xa5,0x68,0xd3,0xa8,0xae,0xdb,0xd1,0x7a,0x1e,0xce, +0x4b,0x0e,0x6c,0x6d,0x36,0xfe,0x1b,0xeb,0xf3,0xd8,0xf8,0x3b,0xc4,0xde,0x46,0xa9, +0xaa,0x09,0x2e,0x4c,0xe6,0x46,0x50,0xc4,0xab,0xe0,0x62,0xad,0xc3,0x6f,0xe1,0xfb, +0x4b,0x0f,0x36,0xdc,0xde,0x43,0x2c,0x80,0xc6,0xbb,0xe4,0x0c,0x1b,0xd4,0xf4,0xe2, +0xa3,0xf1,0x35,0x8a,0x6e,0x69,0xd1,0x1e,0x45,0x57,0xc0,0xda,0x71,0xd3,0xad,0x60, +0x5e,0xea,0xd2,0xdc,0x48,0xa9,0xff,0x00,0x1e,0xb1,0xa8,0xda,0xa8,0x06,0x42,0xd7, +0x4c,0x57,0x32,0x47,0xeb,0x12,0xe5,0xa6,0xda,0xb1,0x52,0xf1,0x23,0x8e,0x56,0xfb, +0x3b,0x31,0x3f,0xdd,0xcf,0x4a,0x82,0x29,0x1a,0x39,0x07,0x9a,0x3e,0x6f,0xef,0x67, +0x35,0x23,0x22,0x0c,0xfc,0xc4,0x93,0xc9,0x6a,0xab,0x34,0x8d,0xd0,0x9c,0xfa,0x35, +0x6a,0x71,0xcb,0xdc,0xf7,0x99,0x3d,0xd5,0xe4,0x98,0x00,0x60,0x0c,0x71,0x8a,0xa0, +0x54,0xc8,0xbb,0xb6,0x96,0x19,0xc1,0x6c,0x74,0x3e,0xf4,0xd5,0xb8,0x92,0x59,0x3c, +0xbd,0x99,0x7e,0x81,0x7d,0x7e,0x95,0xd3,0xf8,0x16,0x1d,0x46,0x3d,0x51,0xee,0x2c, +0xac,0xe3,0xd4,0x44,0x43,0xfd,0x27,0x4d,0x99,0x73,0xe6,0xa7,0x70,0x54,0xff,0x00, +0x3e,0xa2,0x83,0xce,0x75,0x3e,0xb3,0x3e,0x55,0x7d,0x7c,0x89,0xbc,0x2d,0xe0,0xbd, +0x4a,0xea,0x19,0x1e,0x08,0x92,0xe6,0x2b,0x84,0x2a,0xa9,0x9c,0xa9,0x6e,0xa0,0x1f, +0x43,0xc5,0x7d,0x27,0xfb,0x28,0x31,0xf0,0xfe,0x8b,0x73,0xa5,0xde,0x42,0xd1,0x1d, +0x4e,0xf5,0xf6,0x2c,0x83,0x05,0x04,0x69,0xc9,0x3f,0x89,0xc7,0xe3,0x58,0x9e,0x1f, +0xf0,0x64,0x16,0x7e,0x0b,0x9f,0xc5,0x3e,0x0f,0x99,0xae,0x6c,0x96,0x50,0xd2,0xe9, +0xd7,0x23,0x32,0x5a,0x9f,0xe3,0x82,0x4e,0xe4,0x7a,0x1f,0x60,0x6a,0xce,0x9b,0xe2, +0xed,0x57,0x57,0xd5,0x12,0x0d,0x0e,0x28,0xff,0x00,0xb4,0x35,0x0b,0x66,0x5d,0x2e, +0xe2,0x61,0xc4,0x4c,0xe7,0x12,0xa4,0x98,0x1f,0x78,0x76,0x6f,0xa5,0x72,0x54,0x97, +0xb4,0x4e,0x28,0xfa,0xcc,0x1e,0x16,0x18,0x45,0x1a,0x9b,0xe8,0xf6,0xd7,0xee,0x39, +0xbf,0x1e,0xea,0xf0,0xf8,0xb3,0x4c,0xb2,0x4b,0x01,0x2d,0xc4,0x76,0xb3,0xcd,0x63, +0x12,0x2e,0x55,0x59,0x44,0x8c,0xcd,0x83,0xd3,0x0b,0x90,0x07,0xe3,0x4c,0x5f,0x0a, +0xc9,0xe1,0x1f,0x0e,0xbd,0xe4,0x57,0x4a,0x6f,0x5d,0x54,0xc8,0xa0,0xfc,0x92,0xc7, +0xfd,0xc5,0x23,0xa6,0x31,0x5e,0xd1,0xa2,0xfc,0x37,0xb9,0xf8,0x77,0xf0,0xbf,0x4e, +0xb3,0x0f,0x1d,0xe5,0xdd,0x94,0xce,0xf7,0xcb,0x22,0x71,0x2e,0xe3,0x97,0x23,0x3d, +0xb3,0xc0,0x35,0xe4,0x17,0x4b,0x27,0x88,0xe7,0xd4,0xac,0xf4,0xb8,0x26,0xbb,0xb4, +0xf3,0x63,0x58,0x61,0x8b,0x3f,0x23,0x33,0x60,0x8f,0x62,0x30,0x79,0xac,0xa3,0x3b, +0xbe,0x58,0xec,0x8f,0x56,0x34,0x79,0x69,0xfb,0x6a,0x9f,0x1c,0xba,0x76,0x76,0xe9, +0xfd,0x7e,0x65,0xdb,0xef,0x18,0x6b,0x5f,0x16,0xfe,0x1c,0x4f,0xe1,0x49,0xf5,0x56, +0xb0,0x9e,0x09,0x16,0xe2,0xd0,0x5c,0xb1,0x11,0xc9,0xb4,0x0f,0x92,0x42,0x3a,0x70, +0x41,0x04,0xf4,0xae,0x13,0xc3,0xdf,0x0f,0x2e,0xbc,0x17,0x28,0x3a,0x94,0xb0,0xca, +0x64,0x87,0xcf,0x8a,0x68,0x1f,0x29,0x20,0x27,0x1f,0x29,0x3d,0x7a,0x1a,0xf7,0x28, +0xfc,0x33,0x17,0x86,0xa1,0x9b,0x4e,0x8a,0x4f,0xb4,0xea,0xe2,0xd3,0x13,0xcc,0xe8, +0x07,0xde,0xe0,0x27,0x03,0xd0,0x0c,0xb7,0x52,0x00,0x15,0xe4,0xe7,0x50,0xd5,0xbc, +0x69,0xac,0x68,0x9e,0x15,0xd3,0x2c,0xe4,0xbb,0xbf,0x85,0xfe,0xc7,0x02,0xb2,0xfc, +0xee,0xcc,0xe4,0xf2,0x3b,0x02,0x4f,0x4f,0x41,0x5e,0xb6,0x06,0xa7,0xef,0x1f,0x2e, +0xc8,0xfc,0xcf,0x88,0x30,0x4a,0x85,0x15,0x5f,0x13,0x65,0x5a,0x5b,0xdb,0x6d,0xff, +0x00,0x3b,0x6e,0xfc,0x8f,0xaa,0xbf,0x60,0x5f,0x83,0x57,0x1f,0x10,0xbe,0x25,0x4d, +0xe3,0x19,0x87,0x93,0xa1,0x68,0x20,0x44,0x87,0x6e,0x7c,0xe9,0x8e,0x0e,0xd1,0xf4, +0x1d,0x6b,0xf4,0xf0,0x9c,0xd7,0x9a,0xfe,0xcf,0x7f,0x08,0xad,0x7e,0x0a,0xfc,0x29, +0xd1,0x7c,0x33,0x00,0x53,0x75,0x0c,0x7e,0x6d,0xec,0xcb,0xd6,0x5b,0x86,0xe5,0xdb, +0x3f,0x5e,0x07,0xd2,0xbd,0x26,0xb5,0xad,0x51,0xd4,0x95,0xfa,0x1f,0x99,0xce,0x57, +0x61,0x48,0xd4,0x13,0x4d,0xac,0x4c,0x80,0xb6,0x2a,0x33,0xc7,0x3d,0xe9,0x49,0xcf, +0x34,0xc9,0x1b,0x9a,0x00,0x6d,0x34,0xf5,0xa5,0x3f,0xaf,0x6a,0x69,0x62,0xbf,0x5a, +0xb2,0x44,0x7f,0x9b,0x81,0xc5,0x43,0x33,0x06,0xe3,0xb0,0xa7,0xb3,0xed,0x07,0xd4, +0xd5,0x77,0x6e,0xd5,0x44,0x0c,0x66,0xe2,0xab,0xb9,0xa7,0xc8,0xd5,0x5e,0x47,0xe6, +0xa8,0x63,0x24,0x6f,0xc6,0xbf,0x36,0x7f,0x6c,0xef,0x82,0xc7,0xc0,0x9e,0x3a,0x97, +0x54,0xb1,0x83,0x6e,0x8f,0xab,0xb3,0x5c,0x42,0x54,0x7c,0xb1,0xcb,0x92,0x5e,0x3f, +0xea,0x2b,0xf4,0x85,0xdb,0xf3,0xae,0x0b,0xe3,0x27,0xc3,0x5b,0x2f,0x8b,0x3e,0x07, +0xbe,0xd0,0xae,0xc2,0xac,0xcc,0x3c,0xdb,0x59,0xd8,0x64,0xc3,0x30,0x07,0x6b,0x0f, +0xcc,0x83,0xec,0x4d,0x77,0x61,0x2b,0xbc,0x3d,0x45,0x2e,0x9d,0x4f,0xa5,0xe1,0xdc, +0xe2,0x59,0x36,0x3e,0x35,0x9b,0xf7,0x1e,0x92,0xf4,0xef,0xf2,0x3f,0x1f,0xcf,0x1c, +0x1a,0xfa,0xc3,0xf6,0x17,0xf8,0x43,0xf0,0xeb,0xe3,0x34,0x7e,0x2f,0xd1,0xfc,0x59, +0x62,0x97,0xba,0xfc,0x29,0x1c,0xda,0x76,0xfb,0x99,0x22,0xdb,0x1e,0xd6,0x57,0x20, +0x2b,0x0d,0xd8,0x62,0x87,0xa1,0xaf,0x9e,0x7e,0x21,0x78,0x23,0x50,0xf0,0x3f,0x89, +0x2f,0xf4,0xbd,0x42,0x06,0x82,0xee,0xd6,0x53,0x1c,0xa9,0x8e,0xf9,0xe1,0x87,0xa8, +0x3d,0x73,0x58,0x1a,0x56,0xaf,0x7d,0xa0,0xdf,0xc5,0x7d,0xa6,0xde,0xdc,0x69,0xf7, +0xb1,0x1c,0xc7,0x71,0x6b,0x2b,0x47,0x22,0x7d,0x19,0x48,0x22,0xbe,0xb2,0xb4,0x5d, +0x7a,0x4d,0x53,0x95,0xaf,0xd4,0xfe,0x9d,0xc6,0x52,0x96,0x6d,0x80,0x71,0xc2,0x56, +0x70,0x72,0x49,0xa9,0x2e,0x9b,0x3e,0x9d,0x1f,0xe4,0x7e,0x8b,0xfe,0xc6,0x9f,0x01, +0x7e,0x29,0xfc,0x0f,0xf8,0x81,0xaf,0x9f,0x13,0x4d,0xfd,0x9b,0xe0,0x94,0x82,0x45, +0x10,0xb5,0xf2,0x49,0x04,0xef,0xbb,0xe4,0x91,0x10,0x31,0xd9,0xc7,0x25,0x88,0x1c, +0x70,0x6b,0xe4,0xff,0x00,0x8a,0x5e,0x26,0xd3,0x7c,0x63,0xfb,0x60,0xdd,0xea,0xfa, +0x43,0xac,0xda,0x7d,0xc7,0x89,0xad,0xbc,0xa9,0x93,0xa4,0x9b,0x65,0x8d,0x4b,0x0f, +0xa9,0x06,0xb8,0x3d,0x7b,0xe3,0x7f,0xc4,0x0f,0x14,0x69,0xe6,0xc3,0x55,0xf1,0x96, +0xb5,0x7b,0x64,0xcb,0xb5,0xa0,0x92,0xf1,0xf6,0x38,0xf4,0x60,0x0f,0xcc,0x3e,0xb5, +0xc6,0x41,0x34,0x96,0xb3,0x47,0x34,0x32,0x34,0x53,0x46,0xc1,0xd2,0x48,0xd8,0xab, +0x2b,0x03,0x90,0x41,0x1d,0x08,0x35,0xcd,0x47,0x0b,0x38,0xd4,0x95,0x5a,0x8d,0x5d, +0xab,0x68,0x79,0x18,0x0c,0x97,0x13,0x4f,0x15,0x5b,0x1d,0x8c,0x9c,0x5d,0x4a,0x91, +0xe5,0xf7,0x53,0x4b,0xd5,0xdd,0xdd,0xb3,0xed,0xef,0xf8,0x2a,0x47,0xfc,0x8e,0x1e, +0x08,0xff,0x00,0xaf,0x09,0xbf,0xf4,0x65,0x6b,0x59,0xe4,0x7f,0xc1,0x31,0x2e,0x08, +0xc8,0x21,0x89,0x04,0x76,0xff,0x00,0x4d,0x1c,0xd7,0xc3,0x9a,0xf7,0x8b,0x35,0xcf, +0x15,0x49,0x14,0x9a,0xde,0xb3,0xa8,0x6b,0x32,0x44,0x0a,0xc6,0xfa,0x85,0xd4,0x93, +0x94,0x04,0xe4,0x80,0x5c,0x9c,0x0c,0xfa,0x53,0x87,0x8b,0xf5,0xe5,0xd0,0x8e,0x88, +0x35,0xbd,0x48,0x68,0xc7,0xae,0x9b,0xf6,0xb9,0x3e,0xcd,0xd7,0x3f,0xea,0xf3,0xb7, +0xaf,0x3d,0x3a,0xd4,0xc7,0x07,0x25,0x46,0x9d,0x2b,0xfc,0x2e,0xe6,0x54,0xf8,0x76, +0xa4,0x32,0xfc,0x26,0x0f,0xda,0x2b,0xd1,0x9a,0x9b,0x76,0xde,0xcd,0xbb,0x7e,0x27, +0xe9,0xaf,0xc5,0x8f,0x89,0x16,0xb2,0x7e,0xc5,0xd7,0x7e,0x3d,0x8c,0x47,0x1e,0xb3, +0xaf,0xf8,0x72,0xd3,0x4c,0x69,0x07,0x56,0xf3,0x09,0x56,0x8f,0xf0,0x12,0x4c,0x7f, +0x3a,0xf2,0xdf,0xda,0x7b,0x6a,0xff,0x00,0xc1,0x3f,0xfe,0x0f,0x96,0x05,0x97,0x76, +0x91,0x90,0x0e,0x32,0x3e,0xc1,0x35,0x7c,0x35,0x37,0x8a,0xb5,0xbb,0x9d,0x12,0x2d, +0x1a,0x6d,0x63,0x50,0x97,0x47,0x89,0x83,0xc7,0xa7,0xbd,0xd4,0x8d,0x6e,0x8c,0x33, +0x82,0x23,0x27,0x68,0x3c,0x9e,0xdd,0xcd,0x3a,0xfb,0xc6,0x1a,0xf6,0xa9,0xa3,0xdb, +0xe9,0x37,0xba,0xde,0xa5,0x79,0xa5,0x5b,0x6d,0xf2,0x2c,0x6e,0x2e,0xe4,0x78,0x22, +0xda,0x0a,0xae,0xd8,0xc9,0xda,0xb8,0x04,0x81,0x81,0xc0,0x26,0xb3,0xa7,0x97,0xfb, +0x37,0x16,0x9e,0xd2,0xbf,0xcb,0xb1,0xc7,0x84,0xe1,0x47,0x84,0x9d,0x39,0x46,0xa2, +0xf7,0x6a,0xb9,0xed,0xf6,0x6d,0x65,0x1f,0x91,0xe9,0x7f,0x17,0x7f,0x67,0xdd,0x4f, +0xc3,0x3e,0x2c,0x80,0xf8,0x3b,0x4e,0xd4,0xbc,0x47,0xe1,0x0d,0x5a,0x18,0x6e,0xb4, +0x6d,0x52,0x08,0x8c,0xff,0x00,0x68,0x8e,0x44,0x53,0xb4,0x94,0x18,0x0e,0xac,0x4a, +0x95,0xc0,0x3c,0x7b,0xd7,0x71,0xf1,0x23,0xc0,0x57,0x5e,0x36,0xf1,0xaf,0xc1,0x3f, +0x85,0x2f,0x70,0xad,0xe2,0xab,0x3d,0x1e,0x0d,0x37,0x55,0x97,0x3b,0xda,0xcb,0xcc, +0x9a,0x49,0x44,0x2f,0xef,0x0c,0x4d,0x92,0xbd,0xba,0x57,0x84,0xe8,0x1f,0x12,0xbc, +0x5b,0xe1,0x5d,0x3e,0x4b,0x0d,0x17,0xc4,0xfa,0xc6,0x93,0x65,0x26,0x77,0x5b,0xd9, +0x5f,0x4b,0x0c,0x67,0x3d,0x4e,0xd5,0x60,0x33,0x59,0x36,0x7a,0xe6,0xa5,0xa6,0xea, +0xc3,0x54,0xb4,0xd4,0x2e,0xad,0x75,0x35,0x76,0x90,0x5e,0xc3,0x3b,0x24,0xc1,0x9b, +0x3b,0x9b,0x78,0x3b,0xb2,0x72,0x72,0x73,0xdc,0xd7,0x6f,0xb3,0xa8,0xed,0x79,0x6d, +0xb7,0xae,0xda,0x9f,0x47,0xf5,0x2c,0x64,0xb9,0x79,0xea,0x26,0xe9,0xa7,0xca,0xed, +0xab,0x6d,0x59,0x39,0x7a,0x5f,0x54,0xb7,0x7a,0xe9,0xb1,0xf4,0x2f,0xc6,0xa8,0x7c, +0x6d,0xaa,0x42,0xfe,0x02,0xf0,0x57,0x82,0xb5,0xcd,0x1b,0xe1,0xc6,0x93,0x39,0x8e, +0x0b,0x68,0x6c,0x65,0x0f,0xa9,0xc8,0x84,0x29,0xbb,0xb9,0x60,0x3f,0x78,0xee,0x57, +0x70,0x07,0x85,0x18,0xc0,0xe2,0xbe,0x78,0xd5,0xf4,0x7b,0xed,0x03,0x51,0x9a,0xc3, +0x52,0xb3,0x9a,0xc2,0xfa,0x1c,0x09,0x2d,0xee,0x23,0x29,0x22,0x64,0x02,0x32,0xa7, +0x91,0xc1,0x07,0xf1,0xae,0x93,0xfe,0x17,0x17,0x8f,0xff,0x00,0xe8,0x79,0xf1,0x2f, +0xfe,0x0e,0x2e,0x3f,0xf8,0xba,0xe6,0xf5,0x6d,0x62,0xff,0x00,0x5e,0xd4,0x26,0xbf, +0xd4,0xef,0xae,0x75,0x2b,0xe9,0xb0,0x64,0xba,0xbb,0x99,0xa5,0x95,0xf0,0x00,0x1b, +0x99,0x89,0x27,0x00,0x01,0xc9,0xe8,0x05,0x55,0x18,0x4e,0x9a,0xe5,0x76,0xb1,0xd3, +0x97,0xe1,0xab,0x61,0x23,0xec,0xa7,0xcb,0xcb,0xdd,0x5e,0xed,0xf7,0x6d,0xee,0xdf, +0x56,0x7d,0xe3,0xff,0x00,0x04,0xc7,0xff,0x00,0x91,0x43,0xe2,0x9f,0xd6,0xd3,0xff, +0x00,0x45,0xcf,0x5e,0x77,0xff,0x00,0x04,0xe8,0x1f,0xf1,0x91,0x5a,0xaf,0x1f,0xf3, +0x0f,0xb8,0xff,0x00,0xd0,0xc5,0x7c,0xbd,0xa1,0xf8,0xc3,0x5f,0xf0,0xbc,0x57,0x11, +0x68,0xda,0xe6,0xa5,0xa4,0x47,0x71,0x8f,0x39,0x2c,0x2f,0x24,0x80,0x4b,0x80,0x40, +0xdc,0x11,0x86,0xec,0x64,0xf5,0xf5,0x35,0x06,0x8b,0xe2,0x4d,0x5f,0xc3,0x77,0x8d, +0x79,0xa4,0x6a,0x97,0xba,0x55,0xdb,0x29,0x53,0x71,0x63,0x70,0xf0,0xc8,0x41,0xea, +0x0b,0x29,0x07,0x15,0xcb,0x3c,0x23,0x93,0xac,0xef,0xf1,0xdb,0xe5,0x64,0x78,0x78, +0x8c,0x82,0xa5,0x79,0x63,0xe4,0xaa,0x25,0xf5,0x85,0x14,0xb4,0xdb,0x95,0x5b,0x5e, +0xe7,0xd1,0xfe,0x20,0xf0,0x4a,0xfc,0x41,0xfd,0xbf,0x2f,0xb4,0x39,0x63,0x67,0xb6, +0x9b,0xc4,0x41,0xe7,0x0a,0x3a,0x46,0x81,0x5d,0x8f,0xd3,0x8a,0xea,0x3f,0xe0,0xa6, +0x9e,0x30,0x6d,0x43,0xe2,0x96,0x81,0xe1,0xb8,0xdb,0x6d,0xbe,0x95,0xa7,0x09,0x9a, +0x31,0xd3,0x7c,0xac,0x70,0x7f,0xef,0x95,0x02,0xbe,0x4b,0x87,0xc5,0x5a,0xd5,0xb6, +0xb6,0xda,0xcc,0x3a,0xc6,0xa1,0x16,0xb0,0xc4,0xb3,0x6a,0x09,0x74,0xeb,0x70,0x49, +0x18,0x24,0xc8,0x0e,0xec,0xe3,0xde,0xa1,0xd6,0x35,0xdd,0x4b,0xc4,0x57,0xcd,0x7b, +0xab,0x6a,0x37,0x7a,0xa5,0xe3,0x00,0xa6,0xe2,0xf6,0x76,0x9a,0x42,0x07,0x41,0xb9, +0x89,0x38,0x15,0x71,0xc3,0x35,0x56,0x13,0x6f,0x48,0xab,0x7c,0xce,0x9a,0x59,0x2c, +0xe3,0x8d,0xc3,0x62,0x67,0x34,0xe3,0x46,0x9f,0x2a,0x56,0xfb,0x56,0xb3,0x97,0xdc, +0x51,0xa2,0x8a,0x2b,0xd0,0x3e,0xa8,0x2b,0x9e,0xf1,0x15,0xf7,0x99,0x20,0xb6,0x43, +0xf2,0xa7,0x2d,0xf5,0xad,0x4d,0x53,0x50,0x1a,0x7d,0xb9,0x20,0xfe,0xf5,0xb8,0x41, +0xfd,0x6b,0x93,0x66,0x2c,0xc4,0x93,0x92,0x79,0x26,0xa2,0x4f,0xa1,0xf8,0x7f,0x88, +0xbc,0x45,0x1a,0x34,0x7f,0xb1,0xf0,0xd2,0xf7,0xa5,0xac,0xfc,0x97,0x48,0xfa,0xbd, +0xdf,0x97,0xa8,0x94,0x51,0x45,0x64,0x7f,0x3a,0x85,0x14,0x51,0x40,0x05,0x14,0x51, +0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x56,0xff,0x00,0x82,0x3c, +0x2e,0x3c,0x55,0xae,0x2d,0xbc,0xf2,0xbd,0xae,0x99,0x6f,0x1b,0x5d,0x6a,0x17,0x68, +0xa0,0x98,0x2d,0x90,0x65,0xd8,0x67,0x8d,0xdd,0x80,0xee,0xc4,0x52,0x6d,0x25,0x76, +0x34,0xae,0xec,0x8d,0x9d,0x0c,0x8f,0x03,0xf8,0x3a,0x6d,0x79,0xb6,0x7f,0x6c,0xeb, +0x0b,0x25,0x96,0x98,0xad,0x9d,0xf0,0x41,0xca,0xcf,0x70,0x3d,0x09,0xc9,0x89,0x4f, +0xbb,0xfa,0x71,0xc3,0xd6,0xe7,0x8c,0xbc,0x4e,0xfe,0x2c,0xd7,0xa5,0xbc,0x11,0xfd, +0x9a,0xce,0x34,0x5b,0x6b,0x2b,0x51,0xf7,0x6d,0xed,0xd0,0x6d,0x8e,0x31,0xf4,0x1d, +0x4f,0x72,0x49,0x3c,0x93,0x58,0x75,0x31,0x4f,0x77,0xbb,0x1c,0x9f,0x44,0x14,0x51, +0x45,0x59,0x21,0x45,0x14,0x50,0x03,0xed,0xc4,0x6d,0x71,0x10,0x94,0x95,0x88,0xba, +0x87,0x61,0xd4,0x2e,0x79,0x3f,0x95,0x7a,0xe7,0xc6,0x6f,0x01,0xf8,0x73,0xc3,0xfe, +0x16,0xd1,0x35,0x6f,0x0f,0x27,0xee,0xae,0x25,0xf2,0x9a,0x54,0x90,0xc8,0x92,0x29, +0x42,0x43,0x13,0x9e,0x0e,0x47,0xeb,0x5e,0x41,0x57,0xed,0xf5,0xdb,0xeb,0x6d,0x2e, +0x7d,0x35,0x2e,0x1c,0xd8,0x4e,0x43,0x3d,0xb3,0x1c,0xa6,0xe1,0xd1,0x80,0xec,0x7d, +0xc5,0x6f,0x4e,0xa4,0x63,0x19,0x46,0x51,0xbd,0xfa,0xf6,0x3c,0xdc,0x4e,0x1e,0xb5, +0x4a,0xd4,0xaa,0xd2,0xa8,0xd2,0x8b,0xd5,0x74,0x92,0x7d,0xfd,0x3a,0x14,0x28,0xa2, +0x8a,0xc0,0xf4,0x82,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02, +0x8a,0x28,0xa0,0x0f,0xdb,0x2a,0x55,0xeb,0x48,0x3d,0xe9,0x57,0xad,0x7c,0x29,0xee, +0x93,0x6e,0xf9,0x80,0xa7,0xa9,0xa8,0xf3,0x96,0x18,0xa9,0x16,0x99,0x2c,0x95,0x6a, +0xc2,0xfa,0x55,0x75,0xa9,0xd5,0x85,0x32,0x09,0x97,0x93,0xe9,0x53,0xaf,0x41,0x55, +0x94,0xf3,0x56,0x16,0x98,0x12,0xad,0x58,0x53,0xc5,0x56,0x5a,0x9e,0x31,0x54,0x04, +0xeb,0x53,0x2d,0x40,0xb5,0x3a,0xf4,0xf7,0xa3,0xa0,0x16,0x12,0xa7,0x5f,0x7a,0xad, +0x1b,0x54,0xea,0x78,0x1e,0xb5,0x00,0x4d,0x1b,0x73,0x53,0xa9,0xaa,0xcb,0xed,0x53, +0x2f,0x7a,0x86,0x6a,0x5a,0x8d,0xba,0x1a,0xb3,0x1f,0x39,0xaa,0x71,0xb6,0x2a,0x78, +0xc9,0xc8,0xa4,0xc4,0x5c,0x5c,0x70,0x7d,0x6b,0x2f,0xc5,0x1a,0x1c,0x5e,0x25,0xf0, +0xd6,0xaf,0xa5,0x4a,0xbb,0xd2,0xfa,0xd2,0x5b,0x76,0x04,0x67,0x3b,0x90,0x8f,0xeb, +0x5a,0x4b,0xe9,0x52,0x2e,0x47,0x3d,0xea,0x19,0xac,0x5b,0x4e,0xe8,0xfe,0x72,0xbc, +0x4b,0xe1,0xd9,0x7c,0x29,0xe3,0xed,0x5f,0x46,0xb8,0x4d,0xb3,0x58,0x5e,0xcd,0x6a, +0xea,0x7a,0xe5,0x1c,0xaf,0xf4,0xac,0xbb,0x8d,0xc9,0x70,0xca,0x8b,0xcb,0x1e,0xbd, +0x85,0x7d,0x35,0xff,0x00,0x05,0x02,0xf8,0x6b,0x27,0xc3,0xbf,0xda,0x9f,0x5c,0x98, +0x44,0x12,0xcb,0x5a,0x2b,0xa9,0x40,0x54,0x70,0x77,0x8c,0x37,0xfe,0x3c,0x0d,0x7c, +0xe1,0x79,0x09,0x8d,0x9d,0x40,0xcb,0xe7,0x22,0xb2,0x96,0xe7,0xe9,0xb8,0x5f,0xdf, +0x61,0x94,0xd7,0xaf,0xe0,0x55,0x88,0x96,0x90,0x92,0x72,0xab,0xc0,0xa9,0xd6,0x6c, +0xbe,0xd4,0xed,0xd5,0xaa,0xb2,0x8d,0x8a,0x14,0x70,0x31,0xcd,0x2c,0x72,0x0c,0x71, +0xd2,0x91,0xa4,0xa3,0x65,0x63,0xea,0x7f,0xd8,0x4f,0xf6,0x90,0xff,0x00,0x85,0x07, +0xf1,0x5e,0x13,0x7f,0xb5,0xbc,0x3b,0xac,0x85,0xb2,0xbf,0x67,0xc8,0x10,0xa9,0x60, +0x56,0x51,0xee,0xa7,0xf4,0x26,0xbf,0x6b,0x2c,0xee,0x92,0xf2,0xde,0x39,0xa3,0x74, +0x96,0x29,0x14,0x3a,0x49,0x19,0xca,0xb2,0x91,0x90,0x41,0xf4,0xc5,0x7f,0x37,0x36, +0xf7,0x22,0x3c,0x73,0x8c,0x73,0x5f,0xb5,0xdf,0xf0,0x4f,0x0f,0x8b,0xd2,0x7c,0x54, +0xfd,0x9e,0x74,0xe8,0xef,0xae,0x3c,0xfd,0x53,0x43,0x95,0xb4,0xe9,0x99,0x8f,0x25, +0x17,0x98,0xc9,0xff,0x00,0x80,0xf1,0xf8,0x53,0x3e,0x5f,0x36,0xc3,0xab,0x2a,0xcb, +0xd1,0x9e,0xd9,0xf1,0x4b,0xe1,0xfa,0xfc,0x4b,0xf0,0x8d,0xee,0x82,0xda,0x84,0xfa, +0x6a,0xdc,0xb2,0x96,0x9a,0xdf,0xa9,0x00,0xe7,0x69,0x1d,0xc1,0xef,0x5f,0x0c,0xfe, +0xd5,0xd6,0x7e,0x0e,0xf8,0x01,0xe0,0xdf,0xec,0x19,0xaf,0xe0,0xf1,0x17,0x88,0x6f, +0x10,0x84,0xb1,0x78,0xb0,0xd0,0x21,0x18,0xde,0xc4,0x1f,0x97,0xd8,0x77,0xaf,0xa5, +0x7f,0x6b,0xcf,0xda,0x72,0xcb,0xf6,0x7a,0xf0,0x5b,0x1b,0x59,0x22,0x9f,0xc5,0x1a, +0x80,0x29,0x61,0x6c,0xc7,0x3b,0x06,0x0e,0x65,0x61,0xe8,0x3b,0x7a,0x9a,0xfc,0x69, +0xf8,0x81,0xe3,0xed,0x57,0xc7,0x1e,0x20,0xbb,0xd5,0x75,0x7b,0xe9,0x75,0x0b,0xeb, +0xa7,0x32,0x4b,0x3c,0xce,0x59,0x98,0xff,0x00,0x87,0xb5,0x72,0x54,0xc3,0xd3,0xa9, +0x35,0x36,0xb5,0x5d,0x4e,0x9c,0x93,0x03,0x52,0xb4,0x95,0x59,0x3b,0x41,0x3f,0xbd, +0x99,0x7a,0xce,0xb0,0xf7,0xd3,0x13,0xc2,0x20,0xe8,0x8b,0xc0,0x15,0x81,0x75,0x32, +0xb8,0x60,0x40,0xc5,0x17,0x17,0x1d,0x79,0xe2,0xb3,0xe5,0x97,0x76,0x79,0xae,0x8b, +0x58,0xfd,0x0a,0x75,0x14,0x55,0x86,0xf9,0x85,0x49,0x4c,0xfc,0xbd,0x8f,0xf4,0xa6, +0x49,0xb9,0xb7,0x60,0x1d,0xa3,0xaf,0xb5,0x35,0x9b,0x83,0xdc,0xd7,0x45,0xe1,0xbb, +0x0f,0xed,0x8b,0x79,0xee,0x6d,0xd5,0x4d,0xdd,0x9a,0x17,0x96,0x16,0xfb,0xb3,0x47, +0x9e,0x7f,0x1a,0x0f,0x3f,0xf8,0xd2,0xf6,0x49,0xea,0x55,0xd0,0x7c,0x36,0x75,0xc4, +0x90,0xe4,0x84,0x46,0x55,0x69,0x17,0xef,0x42,0x49,0xf9,0x49,0x1d,0xd4,0x9e,0x33, +0xda,0xbd,0xb3,0xe1,0xbf,0x80,0xee,0x35,0x89,0xd6,0x0d,0x50,0x49,0xa5,0x6b,0xb6, +0x05,0x4d,0x9e,0xb9,0x6b,0xca,0xce,0xbf,0xdc,0x98,0x77,0xe9,0xd4,0xf3,0xcd,0x61, +0x7c,0x36,0xf0,0xd2,0xc1,0xab,0x2d,0xdd,0xbe,0x7c,0x97,0x1b,0x7c,0xb9,0x07,0xf0, +0x91,0xca,0x37,0xa8,0xf4,0x35,0xf4,0xcf,0x81,0xf4,0xa4,0x52,0xe7,0x60,0x1e,0x66, +0x33,0xc7,0xeb,0x5c,0xb5,0xea,0xf2,0xe8,0x8f,0xa6,0xca,0xf2,0xb8,0xc9,0x2a,0x93, +0xe9,0xfd,0x7f,0x5d,0x7f,0x23,0x63,0xc2,0x5e,0x18,0x4d,0x32,0xe6,0xe8,0xcb,0x6f, +0x1d,0xb5,0xc5,0xe4,0x5e,0x55,0xe0,0x88,0x62,0x3b,0x82,0x3a,0x31,0x5e,0x9b,0xbd, +0xfd,0xeb,0xcb,0x21,0xf0,0x13,0xe9,0xab,0xe2,0xab,0x1b,0x3e,0x2f,0xf4,0x7b,0xc1, +0x7f,0x66,0xc3,0xef,0x79,0x67,0xef,0x2f,0xe2,0x39,0xfc,0x2b,0xe8,0x58,0xed,0x7f, +0xe2,0x5a,0x64,0x75,0xcc,0x88,0x30,0x3f,0x0e,0x95,0xe4,0x7e,0x37,0xf1,0x3c,0x5e, +0x07,0xf1,0xc4,0x9a,0xdc,0x87,0x74,0x57,0x96,0xa6,0x39,0x61,0x03,0xef,0xb0,0xe3, +0x15,0xc3,0x19,0x3d,0xbb,0x9f,0x45,0x38,0xc6,0x5a,0xa5,0xa2,0xdc,0x9b,0x58,0xf8, +0x8c,0x35,0x5f,0x05,0x68,0xcb,0x74,0xde,0x5d,0xfd,0xec,0x9e,0x43,0x9c,0xe1,0x82, +0x8f,0xbc,0x4f,0xe0,0x2a,0xaf,0xec,0xfb,0xe1,0x26,0xf0,0xca,0xea,0x1f,0x6b,0xe6, +0xea,0xf2,0xea,0x49,0x43,0x76,0xf2,0xc1,0xc2,0xe7,0xd3,0x3c,0xd7,0x9c,0xda,0xc4, +0xde,0x22,0xf1,0x09,0xd7,0x75,0x21,0xb3,0x48,0xb1,0x6d,0xf1,0xdb,0x27,0xfc,0xbc, +0x4c,0x46,0x42,0x8f,0x61,0xc6,0x7e,0x95,0xee,0x7f,0x0d,0x96,0xed,0xac,0xe7,0xd4, +0xf5,0x1d,0xbf,0x69,0xba,0x6c,0x84,0xe8,0x23,0x5c,0x70,0xa2,0x94,0xd7,0x24,0x6c, +0xba,0x85,0x36,0xaa,0x5f,0x4d,0x23,0x7b,0x7c,0xcb,0x0b,0xe1,0xbb,0x48,0xfc,0x65, +0xa8,0x2d,0xd4,0x91,0xcf,0x73,0xaa,0x30,0x65,0xc7,0xf0,0x42,0x8a,0x30,0x9e,0xdc, +0xee,0x27,0xea,0x2b,0xea,0x3f,0xd9,0x8f,0xf6,0x4b,0xf0,0xaf,0xc3,0xdd,0x4e,0x6f, +0x1c,0xcd,0x62,0x26,0xd6,0xef,0x80,0x7b,0x55,0x95,0x41,0x5b,0x55,0xc6,0x09,0x51, +0xfd,0xe3,0xeb,0x5f,0x35,0xd8,0xf8,0x66,0xea,0xf7,0xe2,0x26,0x9f,0xab,0xb3,0xa9, +0xb3,0x86,0x16,0x89,0xd7,0x3f,0x37,0x27,0xb5,0x7e,0x90,0x68,0x31,0x88,0xf4,0x7b, +0x25,0x54,0xd8,0x16,0x14,0x01,0x7d,0x38,0xe9,0x5d,0xb8,0x3b,0xea,0xd3,0x3f,0x33, +0xe3,0x6a,0xce,0x9d,0x1a,0x54,0x6d,0xbb,0x6e,0xfe,0x9f,0xf0,0xe5,0xf5,0x18,0x51, +0x4b,0x45,0x36,0xbd,0x13,0xf2,0x00,0xa6,0x16,0xfc,0xa8,0x7e,0x6a,0x36,0x6d,0xb4, +0xec,0x20,0x66,0xa6,0x13,0x9a,0x3e,0xb4,0xcd,0xde,0xb5,0x42,0x1d,0xbb,0xb9,0xa8, +0xcb,0x65,0x89,0x27,0x8a,0x46,0x6c,0xfd,0x2a,0x39,0x1f,0xf4,0xa6,0x43,0x1a,0xcc, +0x4e,0x4d,0x42,0xc7,0x0a,0x4e,0x69,0x59,0x8f,0x5a,0x82,0x46,0xf7,0xaa,0x10,0xc9, +0x1b,0xde,0xab,0x49,0x27,0x53,0x4b,0x23,0x67,0x3c,0xd4,0x12,0x35,0x50,0x36,0x36, +0x47,0xaa,0xee,0xd8,0xa7,0x48,0xdd,0xf3,0x55,0x64,0x93,0x19,0xe6,0xa8,0xcc,0xf0, +0xaf,0xda,0x83,0xf6,0x7f,0x83,0xe2,0xb6,0x86,0x75,0x5d,0x2e,0x08,0xd3,0xc4,0x76, +0x68,0x70,0x42,0xf3,0x75,0x18,0x07,0xf7,0x67,0xd4,0xfa,0x57,0xe6,0xfe,0xbb,0xa1, +0xdc,0xe8,0x77,0xd3,0x5b,0xdc,0x43,0x24,0x32,0x46,0xe5,0x1e,0x39,0x14,0xab,0x23, +0x0e,0xa0,0x83,0xd0,0xd7,0xec,0x64,0x92,0x71,0xc9,0xaf,0x00,0xfd,0xa1,0x3f,0x66, +0xdd,0x3f,0xe2,0x94,0x12,0xea,0xba,0x52,0x43,0x65,0xe2,0x15,0x53,0xb8,0x91,0x84, +0xb9,0x00,0x70,0x1b,0x1d,0x0f,0xbd,0x7b,0x18,0x2c,0x6f,0xb1,0xfd,0xdd,0x4f,0x87, +0xf2,0x3f,0x53,0xe1,0x1e,0x2c,0x79,0x5b,0x58,0x3c,0x63,0xbd,0x27,0xb3,0xfe,0x5f, +0xf8,0x1f,0x97,0xa1,0xf9,0xbf,0x45,0x74,0x1e,0x2e,0xf0,0x5e,0xa7,0xe0,0xfd,0x56, +0xe2,0xc3,0x51,0xb4,0x96,0xd2,0xe6,0x16,0xda,0xf1,0x4a,0xb8,0x23,0xdf,0xdc,0x7b, +0xd7,0x3f,0x5f,0x4e,0x9a,0x92,0xba,0x3f,0xa2,0xa9,0x55,0x85,0x68,0x2a,0x94,0xdd, +0xd3,0x0a,0x28,0xa2,0x99,0xa8,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45, +0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x54,0x17,0x97,0x91,0xd8,0xc2, +0x64,0x90,0xff,0x00,0xba,0xbd,0xc9,0xa6,0x5f,0xea,0x31,0x69,0xf1,0xe5,0xfe,0x67, +0x3d,0x23,0x1d,0x4d,0x72,0xd7,0x97,0x92,0xdf,0x4c,0x64,0x91,0xb2,0x7b,0x0e,0xc3, +0xd8,0x54,0xca,0x56,0x3f,0x34,0xe2,0xce,0x32,0xa1,0x91,0xd3,0x78,0x6c,0x33,0x52, +0xc4,0x3e,0x9d,0x23,0xe7,0x2f,0x3e,0xcb,0xef,0xd0,0x4b,0xbb,0xa9,0x2f,0x27,0x69, +0x64,0x39,0x27,0xb7,0x61,0xed,0x50,0xd1,0x45,0x64,0x7f,0x2b,0x56,0xad,0x53,0x11, +0x52,0x55,0xab,0x4b,0x9a,0x52,0x77,0x6d,0xee,0xd8,0x51,0x45,0x14,0x8c,0x42,0x8a, +0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x2b,0x73,0xc1,0x7e,0x16,0x9b,0xc6,0x3e, +0x22,0xb6,0xd3,0x62,0x6f,0x2a,0x36,0xcb,0xcf,0x33,0x74,0x8a,0x25,0xe5,0x98,0xfd, +0x05,0x54,0x62,0xe4,0xd4,0x56,0xec,0xca,0xa5,0x48,0x51,0x83,0xa9,0x37,0x64,0xb5, +0x66,0x1d,0x15,0xef,0xbf,0x19,0x3f,0x67,0xfb,0x3f,0x0c,0xaf,0x83,0x2d,0xb4,0x59, +0x18,0xf8,0xab,0xc4,0x48,0x25,0x83,0xc3,0x31,0xc6,0x5e,0x44,0xb3,0xc0,0x11,0x5d, +0x4d,0x21,0x38,0x46,0x90,0xe4,0xec,0xc7,0x0a,0x33,0x9e,0xa2,0xbd,0x9f,0xe1,0x3f, +0xfc,0x13,0x9e,0x1f,0x10,0x69,0x71,0xde,0x78,0x8f,0x5c,0x93,0xcd,0x52,0x05,0xc4, +0x76,0xae,0xb1,0x43,0x0f,0xb6,0xe2,0x0b,0x3e,0x38,0x1c,0x63,0x93,0x5f,0x3d,0x99, +0x67,0x98,0x0c,0xae,0x51,0xa7,0x5a,0x77,0x94,0xaf,0x68,0xc5,0x36,0xdd,0xb7,0x76, +0xed,0xe6,0xec,0xbc,0xcd,0xa8,0xc6,0x75,0xa2,0xa5,0xca,0xd5,0xd5,0xec,0xf7,0x5e, +0xa7,0xc3,0x5d,0x39,0xae,0xeb,0xc4,0xdf,0xf1,0x44,0x78,0x56,0x0f,0x0c,0x26,0xd5, +0xd5,0xb5,0x01,0x1d,0xee,0xb0,0xea,0xf9,0x31,0xae,0x37,0x41,0x6a,0x7d,0x0a,0x82, +0x1d,0xc7,0xf7,0x99,0x41,0xfb,0x95,0xf6,0x9e,0xbd,0xff,0x00,0x04,0xe5,0xb4,0xf0, +0xbd,0xd8,0xd7,0x7c,0x2f,0x7e,0xda,0xe3,0x69,0xe1,0xae,0x23,0xb1,0xb8,0x95,0x64, +0x89,0xe4,0x50,0x4a,0x79,0x83,0x68,0x70,0xa1,0xb0,0x4f,0x07,0x20,0x62,0xbe,0x0d, +0xf1,0xae,0x93,0xad,0xe8,0xbe,0x2a,0xd4,0xed,0x7c,0x45,0x14,0xb1,0xeb,0x4b,0x3b, +0x35,0xd7,0x9c,0x39,0x67,0x27,0x25,0xbd,0xc1,0xce,0x41,0x1c,0x62,0x9e,0x5f,0x9c, +0x61,0x33,0x49,0xb8,0x51,0x6d,0x49,0x6b,0x66,0xac,0xfd,0x57,0x46,0xbc,0xd3,0x6a, +0xf6,0x36,0x95,0x39,0x52,0x5a,0xf5,0x31,0x68,0xa2,0x8a,0xf7,0x8c,0x02,0x8a,0x28, +0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28, +0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x0f,0xdb,0x20, +0x69,0x69,0x80,0xe2,0x9d,0x5f,0x0a,0x7b,0x83,0xea,0x54,0xed,0x50,0x54,0x91,0xf6, +0xa0,0x0b,0x0a,0x4d,0x4a,0xb5,0x02,0xb7,0x4a,0x95,0x69,0x92,0x4e,0xbd,0x73,0x53, +0x2b,0x1a,0x81,0x0d,0x4a,0xb9,0xaa,0x24,0xb3,0x1b,0x55,0x88,0xda,0xa9,0xc6,0x79, +0x35,0x62,0x33,0x54,0x05,0xa5,0x35,0x32,0xb5,0x57,0x56,0xa9,0x50,0xf3,0x40,0x16, +0x50,0xf5,0xa9,0x50,0xf4,0xaa,0xe9,0xed,0x53,0x29,0xa9,0x02,0xc2,0xd4,0xf1,0xb5, +0x56,0x46,0xa9,0x55,0xb3,0x52,0xca,0x45,0x95,0x35,0x62,0x36,0x22,0xa9,0xab,0x54, +0xca,0xdc,0x8a,0x82,0xcb,0xd1,0xb1,0xfc,0xaa,0x65,0x6c,0xd5,0x58,0xe4,0xc1,0x15, +0x3a,0x7e,0xbd,0xaa,0x47,0x16,0x7c,0x33,0xff,0x00,0x05,0x53,0xf8,0x4c,0x3c,0x45, +0xf0,0xdf,0x43,0xf1,0xcd,0xa5,0xbe,0xfb,0xdd,0x0a,0xe4,0x5b,0xdd,0x48,0xa3,0x9f, +0xb3,0xc8,0xc0,0x2e,0x7d,0x83,0x91,0xf9,0xd7,0xe6,0x0e,0xa5,0x6e,0x3e,0xd7,0x11, +0x51,0xf2,0xc8,0xa0,0xfe,0x62,0xbf,0xa0,0x9f,0x1d,0x78,0x3e,0xcb,0xe2,0x07,0x83, +0x75,0x9f,0x0d,0xea,0x48,0xb2,0xd9,0x6a,0x76,0xaf,0x6d,0x22,0xb0,0xc8,0xf9,0x87, +0x07,0xf0,0x38,0x3f,0x85,0x7e,0x15,0xfc,0x4c,0xf8,0x7f,0x7b,0xf0,0xef,0xc5,0xda, +0x97,0x87,0x2f,0x94,0xfd,0xab,0x49,0xbe,0x92,0xd5,0x89,0xfe,0x20,0x0f,0xc8,0xdf, +0x88,0xc1,0xae,0x7a,0x9a,0x59,0x9f,0x7f,0xc3,0xf8,0x85,0x3a,0x72,0xa2,0xf7,0x5f, +0x91,0xe5,0x77,0x51,0x98,0xd8,0xa1,0x1b,0x46,0x73,0x93,0xe9,0x55,0x9a,0x4d,0xbd, +0x2b,0x57,0x5a,0x84,0xb4,0xf2,0xc8,0x3a,0x2b,0x95,0x1f,0x85,0x63,0x33,0x2c,0x2a, +0x49,0xf9,0x98,0xd2,0x89,0xed,0x56,0x8f,0x2c,0x9a,0xd8,0x95,0x26,0x31,0xe0,0xb7, +0x1e,0x82,0xbe,0xca,0xff,0x00,0x82,0x7e,0xfc,0x73,0xb6,0xf8,0x37,0xa7,0x7c,0x56, +0xd6,0x2e,0xef,0xe1,0x56,0xb6,0xd0,0xd6,0x6b,0x4b,0x19,0xe5,0xda,0x27,0xb8,0x12, +0x00,0x80,0x2e,0x79,0x3c,0xf3,0x8e,0x71,0x5f,0x13,0xf9,0x8d,0x2c,0x98,0x1c,0xb1, +0xfd,0x29,0xed,0x7a,0x60,0x91,0x52,0x15,0x52,0x41,0xf9,0xdb,0xbe,0x3b,0xe2,0xac, +0xf3,0x6a,0xc6,0x15,0xa0,0xe3,0x3f,0x84,0xf5,0xdf,0x8a,0x5f,0x19,0x3c,0x45,0xf1, +0x67,0x5c,0x93,0x5b,0xf1,0x16,0xa5,0x2e,0xa1,0x7f,0x2e,0x72,0xd2,0x37,0xca,0x8b, +0x9e,0x11,0x47,0x65,0x1d,0x85,0x79,0xe4,0xd7,0x19,0xc9,0xcd,0x56,0xfb,0x47,0xcd, +0xd7,0x8a,0x86,0x49,0xb7,0x71,0x48,0xfa,0x58,0xca,0x14,0x61,0xcb,0x0d,0x12,0x1f, +0x2c,0xd9,0xa8,0x19,0xfb,0xd2,0x33,0x73,0x93,0x51,0x33,0x16,0x60,0x29,0x6a,0x70, +0x55,0xc4,0x76,0x07,0x7d,0xdd,0x38,0x39,0xae,0xe3,0xe1,0x24,0x26,0xe3,0x5d,0xba, +0x8f,0x20,0x87,0x80,0x86,0x1e,0xd5,0xc7,0x5b,0x5a,0x19,0x9b,0x68,0x19,0x35,0xe8, +0x7f,0x0a,0x74,0xa9,0x2d,0x7c,0x63,0x64,0x58,0x61,0x64,0x25,0x0f,0xd0,0xd2,0x97, +0xc2,0xd9,0xd3,0x96,0xd0,0x9c,0xf1,0x10,0xa9,0x2d,0xae,0x7b,0x77,0x82,0x34,0x53, +0xe7,0x2e,0xd4,0xe4,0xe0,0x11,0xeb,0x5f,0x42,0x78,0x67,0x4b,0x8e,0xc6,0x18,0xbc, +0xc1,0x8f,0x97,0x19,0xc5,0x72,0xfe,0x0d,0xf0,0x78,0xb3,0x8d,0x6e,0x66,0x01,0x23, +0x1c,0xe7,0xb9,0xad,0x7f,0x10,0x78,0xe3,0x42,0xd0,0x63,0x68,0xb5,0x0b,0xcf,0xb3, +0xb6,0xde,0x11,0x79,0x62,0x3d,0x85,0x78,0xb3,0x93,0x9c,0x8f,0xd4,0x94,0x63,0x46, +0x9f,0x22,0x7e,0xa6,0xdc,0xda,0xb1,0xb5,0xb8,0x9a,0x19,0x06,0xd8,0xdc,0x70,0x73, +0xc5,0x7c,0xbb,0xe3,0xeb,0xc9,0xbc,0x41,0xe2,0xbb,0x98,0xa5,0x6d,0xb6,0xf6,0x92, +0x14,0x69,0x3f,0x87,0xe8,0xbe,0xa6,0xb7,0xfc,0x63,0xf1,0x9a,0x4b,0xe8,0x9e,0xcf, +0x45,0x49,0x12,0x1c,0xe3,0xed,0x17,0x1c,0x39,0x1e,0xc0,0x74,0xae,0x3b,0x47,0xbb, +0x17,0xcc,0x7c,0xc0,0x48,0x43,0xce,0xde,0xa3,0x3d,0xeb,0x4a,0x70,0x92,0xf7,0x99, +0xcb,0x52,0xa4,0x1f,0xee,0xe1,0xf3,0x3a,0xef,0x0e,0xda,0xcb,0x7f,0x25,0xba,0x63, +0xf7,0x50,0xe1,0x63,0x4e,0xc0,0x7f,0x8d,0x7b,0xb6,0x86,0x42,0xd8,0xa4,0x61,0x40, +0x0a,0xbc,0xad,0x79,0xa7,0x83,0x74,0xd8,0x64,0x54,0x92,0x27,0xc8,0x07,0xd7,0x9f, +0xca,0xbd,0x26,0xd5,0x9e,0xdd,0x7e,0x60,0x33,0x9e,0x95,0x84,0xf5,0x67,0xa3,0x4e, +0x09,0x53,0xb2,0x3b,0x5f,0x02,0x58,0x3e,0xa5,0xe2,0x0d,0x3a,0xd1,0x78,0x37,0x17, +0x08,0xbc,0x76,0x04,0x8a,0xfb,0xe6,0x14,0x11,0x46,0xa8,0x38,0x0a,0x00,0xaf,0x8a, +0xfe,0x01,0x69,0xb2,0x6b,0x1f,0x11,0xb4,0xb0,0x23,0xc8,0x85,0x8c,0xcd,0xe8,0x02, +0x8a,0xfb,0x52,0xbd,0x4c,0x2a,0xb4,0x5b,0x3f,0x0e,0xe3,0x9a,0xdc,0xd8,0xba,0x74, +0xbb,0x2b,0xfd,0xef,0xfe,0x00,0xa6,0x91,0x8e,0x05,0x21,0x6c,0x53,0x0b,0x75,0x35, +0xdc,0x7e,0x68,0x0f,0xc7,0x4a,0x88,0xb7,0xad,0x05,0xbd,0x69,0x09,0x0d,0xec,0x2a, +0xec,0x48,0x87,0xf2,0x14,0xc6,0x3e,0xbd,0x29,0x59,0x89,0x19,0xe8,0x3d,0x2a,0x16, +0x93,0x77,0xb5,0x51,0x20,0xd2,0x6e,0xed,0x80,0x2a,0x16,0x7f,0xc2,0x89,0x24,0xc5, +0x41,0x24,0x94,0xc4,0x2c,0x92,0x55,0x69,0x24,0xe4,0xd2,0xc9,0x25,0x55,0x92,0x4a, +0x60,0x24,0x8f,0xb6,0xab,0xc8,0xf4,0x49,0x25,0x56,0x92,0x4c,0x8a,0xb3,0x30,0x92, +0x4c,0x77,0xaa,0x92,0xcb,0xd6,0x92,0x69,0xaa,0xa4,0xb3,0x75,0xa0,0x02,0x69,0xbd, +0xea,0x9c,0xd2,0x86,0xa4,0x96,0x6e,0x0d,0x54,0x92,0x4a,0x43,0x38,0xef,0x89,0x9f, +0x0a,0xbc,0x3d,0xf1,0x43,0x4e,0x36,0xfa,0xbd,0xa8,0xfb,0x42,0xa9,0x10,0xde,0x45, +0xc4,0x91,0x9f,0xaf,0x71,0xec,0x6b,0xe2,0x5f,0x8b,0x1f,0xb2,0xf7,0x89,0x7c,0x05, +0x24,0xd7,0x56,0xd0,0xff,0x00,0x6a,0xe9,0x80,0xe5,0x6e,0x6d,0x54,0x9c,0x0f,0xf6, +0x97,0xa8,0x3f,0xa5,0x7e,0x81,0x49,0x25,0x55,0x92,0x50,0xdc,0x63,0x22,0xbb,0x70, +0xf8,0xca,0xb8,0x7d,0xb5,0x5d,0x8f,0xaf,0xc9,0x38,0x9b,0x1d,0x92,0x3e,0x5a,0x52, +0xe6,0x87,0xf2,0xbd,0xbe,0x5d,0x8f,0xc9,0xc9,0xad,0xa4,0xb7,0x62,0xb2,0x29,0x52, +0x2a,0x2a,0xfd,0x15,0xf1,0xf7,0xec,0xf7,0xe0,0xef,0x1d,0x79,0x92,0xcd,0x61,0xfd, +0x9f,0x7a,0xfc,0xfd,0xa2,0xcf,0x0b,0x93,0xea,0x57,0xa1,0xaf,0x9e,0xbc,0x5d,0xfb, +0x18,0x6b,0xf6,0x2c,0xf2,0x68,0x57,0xf6,0xda,0x9c,0x7d,0x44,0x6e,0x7c,0xa7,0xfa, +0x73,0xc7,0xeb,0x5f,0x41,0x4b,0x31,0xa3,0x53,0xe2,0x7c,0xac,0xfd,0xbb,0x2d,0xe3, +0x9c,0xab,0x1c,0x94,0x6b,0xcb,0xd9,0x4b,0xfb,0xdb,0x7d,0xff,0x00,0xe6,0x7c,0xdf, +0x45,0x76,0x1e,0x21,0xf8,0x47,0xe2,0xff,0x00,0x0b,0xc8,0xe9,0xa8,0x68,0x37,0x91, +0xed,0x38,0x2d,0x1c,0x7e,0x62,0xfe,0x6b,0x91,0x5c,0x9c,0xd6,0xf2,0xdb,0xc8,0x52, +0x58,0xda,0x37,0x1d,0x55,0x86,0x0d,0x7a,0x51,0x94,0x67,0xac,0x5d,0xcf,0xbc,0xa3, +0x88,0xa3,0x88,0x8f,0x35,0x19,0xa9,0x2f,0x26,0x9f,0xe4,0x47,0x45,0x2d,0x25,0x51, +0xd0,0x14,0x51,0x43,0x7c,0xa3,0x2d,0xc0,0xf5,0x3c,0x50,0x0d,0xd9,0x5d,0x85,0x15, +0x56,0x6d,0x52,0xd2,0xdf,0xef,0x4e,0xa4,0xfa,0x27,0xcd,0xfc,0xab,0x36,0xe7,0xc4, +0xdd,0x45,0xbc,0x5f,0xf0,0x29,0x3f,0xc2,0x95,0xd2,0x3e,0x53,0x31,0xe2,0xac,0x9f, +0x2b,0x4f,0xdb,0xe2,0x22,0xdf,0x68,0xfb,0xcf,0xee,0x57,0xb7,0xce,0xc6,0xdb,0xba, +0xc6,0xa5,0x9d,0x82,0xa8,0xea,0xcc,0x70,0x2b,0x1b,0x50,0xf1,0x12,0xae,0x52,0xd4, +0x6e,0x3f,0xf3,0xd1,0x87,0x1f,0x80,0xac,0x5b,0x9b,0xd9,0xef,0x1b,0x32,0xc8,0xcf, +0xed,0xd8,0x7e,0x15,0x0d,0x43,0x97,0x63,0xf1,0x5c,0xf7,0xc4,0x7c,0x56,0x31,0x3a, +0x19,0x64,0x7d,0x94,0x1f,0xda,0x7f,0x1b,0xf4,0xe9,0x1f,0xc5,0xf9,0xa1,0xd2,0x48, +0xd3,0x39,0x77,0x62,0xcc,0x7a,0x93,0x4d,0xa2,0x8a,0xcc,0xfc,0x72,0x52,0x94,0xe4, +0xe5,0x27,0x76,0xc2,0x8a,0x28,0xa0,0x90,0xa2,0x8a,0x28,0x00,0xa2,0x8a,0x28,0x00, +0xa2,0x8a,0x28,0x00,0xaf,0xa1,0x3f,0x64,0x1f,0x0a,0xdb,0x78,0x87,0xc5,0xd6,0xd0, +0x5c,0xc4,0x25,0x5d,0x4b,0x56,0xb1,0xd2,0x8e,0x46,0x47,0x96,0xef,0xba,0x40,0x7d, +0x88,0x50,0x0f,0xb1,0x35,0xf3,0xdd,0x7b,0xd7,0xec,0x99,0xe3,0x08,0x3c,0x31,0xe2, +0xb4,0x9a,0x72,0x47,0xf6,0x6d,0xfd,0xa6,0xb0,0xbc,0x67,0xe5,0x85,0xf1,0x27,0x1f, +0xee,0xb6,0x7f,0x0a,0xd6,0x9d,0xfd,0xe5,0x1d,0xed,0x2b,0x7a,0xd9,0xd8,0xf3,0x73, +0x0b,0x7b,0x14,0xe5,0xf0,0xf3,0x42,0xfe,0x9c,0xea,0xff,0x00,0x86,0xfe,0x47,0xba, +0x7c,0x0f,0xbc,0xff,0x00,0x85,0xa1,0xf1,0xbf,0xe2,0x9f,0xc4,0x4b,0xd2,0xd2,0xdd, +0x36,0xa4,0x74,0xfb,0x18,0xdb,0x9f,0x22,0x00,0x48,0x45,0x5f,0x4c,0x22,0x22,0x81, +0xe8,0x2b,0xef,0x5f,0x87,0xfe,0x1d,0x5b,0x38,0xb4,0xeb,0x27,0x5f,0x9a,0x31,0xf6, +0xb9,0xc0,0xc1,0x04,0x8e,0x14,0x12,0x07,0xf7,0x89,0x38,0xc9,0xfb,0x82,0xbe,0x0d, +0xf8,0x41,0x73,0x6f,0xf0,0x27,0xf6,0x9e,0xf1,0xaf,0x81,0xb5,0x65,0x5f,0xec,0xad, +0x56,0xf5,0x75,0x8d,0x1e,0x7d,0xe0,0x2d,0xd4,0x2c,0x4c,0x91,0x6c,0x63,0xc3,0x6e, +0x47,0x1f,0x8a,0x11,0xda,0xbf,0x45,0xf4,0x5d,0x52,0xde,0xc6,0x6b,0x89,0x6e,0xdc, +0xa4,0x77,0x25,0x1e,0x0b,0xa2,0x09,0x89,0xe3,0xda,0x30,0x37,0xf2,0x01,0xce,0x78, +0x27,0xbd,0x7e,0x03,0x8a,0xc2,0x5f,0x88,0xeb,0xe2,0x31,0x0f,0x4b,0x43,0x96,0xfb, +0x72,0x72,0xfe,0x4e,0x49,0xaf,0x5b,0xf7,0x3e,0xb2,0x8e,0xce,0xfb,0x93,0x78,0x96, +0x38,0x56,0xf3,0x4f,0x74,0x89,0x16,0xe8,0x39,0x91,0xa6,0x03,0x0c,0x22,0x51,0xf3, +0x0f,0x70,0x72,0xab,0xcf,0x1f,0x35,0x7e,0x5c,0xff,0x00,0xc1,0x42,0x3c,0x2b,0xa6, +0x7d,0xbf,0x49,0xf1,0x25,0x84,0x22,0x09,0x4d,0xcc,0x96,0x0f,0x83,0x9f,0x31,0x30, +0x59,0x4f,0xe0,0x43,0x63,0xd9,0xbb,0xe2,0xbf,0x45,0x3e,0x21,0x78,0x81,0x21,0xb1, +0xbe,0xd4,0x63,0x3f,0x34,0x98,0xb6,0xb6,0x62,0x47,0x2a,0x33,0xf3,0x2f,0x7c,0x16, +0x2c,0x72,0x3a,0xed,0x1c,0xd7,0xe6,0x3f,0xed,0xbd,0xf1,0x0a,0xd7,0x54,0xd5,0x34, +0x8f,0x09,0xd9,0xc8,0xb3,0x49,0xa7,0xb3,0x5d,0x5e,0x32,0x9c,0xed,0x91,0x86,0x11, +0x3e,0xa0,0x64,0x9f,0xa8,0xa7,0x83,0xc4,0xd4,0xc4,0x71,0x3e,0x1a,0x96,0x15,0x7c, +0x3c,0xd2,0x93,0x5f,0xcb,0xcb,0xcb,0xaf,0x93,0x76,0xf9,0xf2,0xf6,0x44,0xe2,0x5a, +0xe4,0x77,0x3e,0x5b,0xa2,0x8a,0x2b,0xf7,0x83,0xc7,0x0a,0x28,0xa2,0x80,0x0a,0x28, +0xa2,0x80,0x0a,0x28,0xa2,0x80,0x0a,0x28,0xa2,0x80,0x0a,0x28,0xa2,0x80,0x0a,0x28, +0xa2,0x80,0x0a,0x28,0xa2,0x80,0x0a,0x28,0xa2,0x80,0x3f,0x6b,0xc5,0x28,0x34,0xd5, +0xf4,0xa7,0x57,0xc3,0x9e,0xd8,0xea,0x7c,0x6c,0x77,0x62,0xa3,0x5e,0x9c,0x53,0x96, +0xa4,0xa2,0xc5,0x4a,0xbd,0xaa,0xb8,0x6e,0x82,0xa5,0x56,0xaa,0x24,0xb0,0x95,0x2a, +0xb1,0xaa,0xea,0xc3,0xd2,0xa5,0x56,0xa1,0x12,0x58,0x5f,0xd2,0xa6,0x56,0x38,0xaa, +0xaa,0xd5,0x32,0x76,0xab,0x11,0x76,0x33,0x53,0x2b,0x62,0xaa,0x2b,0x54,0xca,0xc7, +0xd6,0x80,0x2d,0xab,0x54,0xca,0xdf,0x28,0xf4,0xaa,0x6a,0xd5,0x32,0xb7,0xbd,0x0c, +0x0b,0x91,0xb7,0x35,0x2a,0xb5,0x55,0x56,0xa9,0x95,0xea,0x40,0xb2,0xad,0xd2,0xa6, +0x56,0xaa,0xaa,0xd5,0x32,0x35,0x43,0x34,0x4c,0xb6,0xac,0x38,0xc5,0x58,0x8d,0xea, +0x9c,0x6d,0x8a,0x9d,0x1b,0xd2,0xa5,0x81,0x6f,0x3f,0x2f,0x1c,0x57,0xe7,0x9f,0xfc, +0x14,0xa3,0xe0,0xaa,0x5a,0xeb,0x1a,0x57,0xc4,0x4d,0x3e,0x00,0xb6,0xf7,0x85,0x6d, +0x35,0x1d,0x83,0xa4,0xab,0x92,0x92,0x1f,0xf7,0x87,0x1f,0x51,0x5f,0xa1,0x28,0xdf, +0x8f,0xb5,0x71,0x5f,0x1b,0x3e,0x1e,0xc1,0xf1,0x4b,0xe1,0x6f,0x88,0xbc,0x35,0x2c, +0x6b,0x23,0xde,0xda,0xb0,0x80,0x91,0xf7,0x66,0x5f,0x9a,0x32,0x3f,0xe0,0x40,0x56, +0x53,0x8f,0x32,0xb1,0xea,0x65,0xf8,0xa7,0x85,0xc4,0x46,0xa7,0x4e,0xbe,0x87,0xe0, +0x8e,0xa5,0x6e,0x16,0xc8,0xc8,0xdd,0x37,0x33,0x7e,0x66,0xb8,0xe9,0x91,0x9a,0x4c, +0x91,0x82,0x7a,0x57,0xa7,0xfc,0x40,0xf0,0xfd,0xce,0x87,0x34,0x9a,0x75,0xcc,0x6d, +0x0c,0xd6,0xf2,0xb4,0x52,0xa3,0x0c,0x15,0x2a,0x48,0x23,0xf3,0xae,0x0e,0x48,0x36, +0xc6,0x66,0x2b,0x8d,0xa7,0x02,0xb0,0x8b,0xd0,0xfd,0x32,0xbc,0x3d,0xb3,0x5e,0x48, +0xcb,0xb8,0x8c,0xc3,0x1e,0xc4,0x38,0x66,0xfb,0xed,0xdc,0x7b,0x55,0x48,0x10,0xc5, +0x74,0xad,0xfc,0x23,0xe5,0xdb,0x56,0x0c,0x9e,0x63,0x3b,0x13,0x94,0x4e,0xfe,0xb4, +0xc8,0x97,0xee,0xe7,0xa9,0x39,0xab,0x3c,0x69,0xda,0x52,0x52,0x8f,0x4d,0x8b,0x66, +0x41,0xe6,0xb2,0x9a,0x37,0xe7,0x91,0x4c,0x92,0x3c,0xcc,0x08,0xe8,0x78,0xa9,0xe3, +0x84,0xf3,0xdc,0x8e,0x28,0x3a,0xef,0x39,0xb6,0x88,0x82,0x33,0xf3,0xde,0xad,0x5a, +0xd9,0x34,0xf2,0x05,0x51,0x92,0x6a,0xed,0x86,0x93,0x2d,0xcb,0x8d,0xaa,0x49,0xf6, +0x15,0xea,0x7e,0x03,0xf8,0x6d,0x3d,0xfc,0xf1,0xaa,0xc0,0xd2,0xca,0xe4,0x04,0x45, +0x5c,0x92,0x49,0xf4,0xa9,0x72,0x49,0x5d,0x9e,0x8e,0x1b,0x06,0xea,0x4a,0xec,0xe6, +0xfc,0x2b,0xe0,0xd9,0x24,0x9a,0x26,0x78,0xf7,0x16,0xfe,0x1c,0x57,0xb8,0xf8,0x6b, +0xc3,0x7a,0x17,0x82,0x52,0x0d,0x57,0xc4,0x57,0x1e,0x4c,0xc0,0x79,0x90,0x59,0x44, +0x33,0x2c,0xb8,0xe7,0x81,0xd8,0x7b,0x9a,0xc1,0xd5,0xbc,0x41,0xa7,0xfc,0x3e,0xbc, +0xd4,0x74,0xab,0x68,0x7c,0xef,0x11,0x58,0x80,0xb3,0x89,0x53,0xe5,0xb6,0x24,0xe0, +0x8c,0x1e,0xac,0x3d,0x3a,0x0a,0xf3,0xc5,0xd4,0x2e,0x75,0x5d,0x7a,0xe6,0xe6,0xf2, +0x79,0x2e,0x2e,0x1e,0x26,0x25,0xdc,0xe4,0xff,0x00,0xfa,0xab,0x92,0x72,0x94,0xfc, +0x8f,0xb0,0xa0,0xe9,0xd1,0x82,0x54,0xf5,0x67,0xac,0x78,0xa7,0xf6,0x81,0xd5,0x75, +0xcd,0xd0,0x69,0x82,0x3d,0x22,0xd8,0x0d,0x89,0x81,0xba,0x4c,0x7d,0x7b,0x7e,0x15, +0xe7,0x3f,0x68,0xb8,0xbc,0xbe,0x7b,0x89,0xee,0x1e,0xe2,0x67,0xfb,0xd2,0xc8,0xdb, +0x89,0xfc,0x6b,0x18,0x63,0x71,0x1c,0x55,0xcb,0x57,0xf2,0xe3,0x38,0xe2,0xb2,0x51, +0x51,0xd8,0xe9,0xf6,0x92,0xa8,0xfd,0xe2,0xfd,0xc4,0x81,0xbe,0xef,0x1b,0x7d,0x3f, +0x9d,0x6b,0xf8,0x56,0xf1,0x56,0x69,0x15,0xf8,0xde,0x3e,0xf7,0xa1,0xed,0x5c,0xdb, +0x49,0xf9,0xd6,0x9e,0x8b,0x21,0x59,0x81,0x15,0x76,0xd0,0xd1,0x4b,0xde,0x4c,0xf6, +0xdf,0x0b,0xdf,0x79,0x30,0xc6,0x48,0x0a,0xdb,0x40,0xdc,0x9f,0xce,0xbb,0xfd,0x37, +0x56,0x0a,0xb9,0x79,0x04,0x8d,0xd9,0x4f,0x7a,0xf1,0x8d,0x0f,0x52,0x54,0x8c,0x02, +0x59,0x78,0xed,0xd2,0xbb,0xbf,0x0b,0xce,0x75,0x2b,0xe8,0x62,0x4e,0x70,0x79,0xae, +0x29,0x47,0xa9,0xed,0xd2,0xac,0x9d,0xa2,0x7d,0xb3,0xfb,0x23,0x68,0xad,0x73,0x36, +0xab,0xad,0x4a,0x39,0x54,0x58,0x13,0xd8,0x9e,0x4f,0xe9,0x5f,0x4a,0xfd,0x2b,0xcc, +0xbf,0x67,0xcf,0x0d,0x7f,0xc2,0x35,0xf0,0xda,0xc5,0x9d,0x76,0xcf,0x7a,0xc6,0xe5, +0xc6,0x3d,0x78,0x03,0xf2,0x1f,0xad,0x7a,0x43,0x39,0xaf,0x66,0x84,0x79,0x69,0xa4, +0x7f,0x37,0x71,0x16,0x29,0x63,0x33,0x4a,0xd5,0x23,0xb2,0x76,0x5f,0x2d,0x07,0xb3, +0x6d,0xa8,0xd9,0xbd,0xf8,0xa4,0xce,0x79,0x34,0xc2,0xd8,0xe2,0xba,0x52,0x3e,0x69, +0xb1,0x5b,0x8a,0x8d,0xe4,0xdb,0x9c,0xfe,0x94,0x92,0x49,0xe8,0x6a,0x07,0x7c,0x55, +0x19,0xdc,0x7b,0xc8,0x4f,0x53,0x50,0x33,0xd3,0x5a,0x5a,0x81,0xdf,0xaf,0x35,0x40, +0x3a,0x46,0xfc,0x6a,0xbc,0x92,0x75,0xa4,0x79,0x2a,0xbc,0xb2,0xd3,0xb1,0x2d,0x8b, +0x24,0xb5,0x56,0x49,0x29,0x64,0x92,0xaa,0xcd,0x27,0x7a,0x64,0x89,0x24,0x9d,0x6a, +0xac,0xd3,0x63,0x8a,0x49,0x26,0xec,0x0d,0x52,0x9a,0x6f,0x7a,0x62,0x16,0x69,0x7d, +0xf9,0xaa,0x72,0xcb,0xd6,0x89,0x24,0xaa,0xb2,0x49,0xef,0x48,0x61,0x24,0x9d,0xaa, +0xb4,0x93,0x62,0x89,0x24,0xf7,0xaa,0x92,0x49,0x40,0xc5,0x92,0x4a,0x83,0x75,0x36, +0x49,0x0f,0x6a,0x84,0xc9,0xdb,0x34,0x0c,0x7c,0x8d,0x51,0x33,0x7a,0x50,0xcd,0x51, +0x3b,0x52,0x1a,0x43,0x9c,0x86,0x04,0x11,0x91,0xe8,0x6b,0x27,0x52,0xf0,0xce,0x8d, +0xac,0x02,0x2f,0x74,0xab,0x2b,0xb1,0xd0,0xf9,0xd0,0x2b,0x7f,0x31,0x5a,0x5b,0xbd, +0x69,0xb9,0xa2,0xef,0xa1,0xa4,0x6a,0x4e,0x9b,0xbc,0x1d,0x9f,0x91,0xc7,0x5d,0x7c, +0x1c,0xf0,0x2d,0xd6,0xef,0x33,0xc2,0x7a,0x49,0x2d,0xd5,0x96,0xd9,0x54,0xfe,0x62, +0xaa,0x8f,0x81,0xfe,0x01,0x5e,0x9e,0x14,0xd3,0x7f,0x18,0xb3,0x5d,0xc9,0xa6,0xee, +0xad,0x55,0x5a,0x8b,0xed,0x3f,0xbc,0xef,0x59,0xa6,0x3a,0x2a,0xd1,0xaf,0x3f,0xfc, +0x0a,0x5f,0xe6,0x7e,0x78,0x7e,0xd7,0x9a,0x45,0x97,0x84,0x7e,0x2d,0x1d,0x3b,0x44, +0xb7,0x4d,0x32,0xc8,0x58,0xc2,0xe6,0xde,0xd7,0xe4,0x4d,0xc4,0x1c,0x9c,0x0e,0xf5, +0xe1,0xad,0x23,0xc8,0x72,0xcc,0xcc,0x7d,0xcd,0x7b,0xb7,0xed,0xae,0xe1,0xbe,0x3a, +0x5d,0x81,0xfc,0x36,0x16,0xc0,0xff,0x00,0xdf,0x35,0xe0,0xf5,0xf5,0xb8,0x76,0xdd, +0x18,0x36,0xfa,0x1e,0x06,0x2b,0x19,0x89,0xc4,0x4d,0xaa,0xb5,0x25,0x2f,0x56,0xdf, +0xe6,0x14,0x51,0x45,0x74,0x1e,0x78,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51, +0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x56, +0xaf,0x85,0xfc,0x49,0x77,0xe1,0x3d,0x7a,0xd3,0x54,0xb2,0x6c,0x4d,0x03,0x64,0xa9, +0x3c,0x3a,0xf7,0x53,0xec,0x45,0x65,0x51,0x54,0x9b,0x8b,0xba,0x33,0x9c,0x23,0x52, +0x2e,0x13,0x57,0x4f,0x46,0x7d,0xa5,0xa7,0xeb,0x1e,0x0b,0xfd,0xa1,0x3c,0x03,0xa5, +0x69,0x3a,0xf5,0xfc,0xda,0x3d,0xde,0x8e,0x31,0xa1,0xf8,0xa2,0xd1,0x0c,0x97,0x3a, +0x39,0x27,0x22,0xda,0xea,0x31,0xf3,0x3d,0xb8,0x6e,0x55,0xc7,0x29,0xf4,0xe6,0xa3, +0x7f,0xda,0xeb,0xe2,0x6f,0xec,0xcd,0xaf,0x27,0x85,0xb5,0x4d,0x57,0x46,0xf1,0xa2, +0x41,0x0a,0x4d,0x16,0xa1,0xa5,0xde,0x97,0x8e,0x68,0xdb,0x3b,0x4b,0x1c,0x63,0x77, +0x1c,0x82,0xa0,0xfa,0xd7,0xc7,0xda,0x3e,0xb5,0x7f,0xe1,0xfb,0xc5,0xbb,0xd3,0x6e, +0xe6,0xb2,0xb9,0x5e,0x3c,0xc8,0x58,0xa9,0xc7,0xa1,0xf5,0x14,0x9a,0xc6,0xb1,0x75, +0xaf,0x6a,0x77,0x1a,0x85,0xf4,0x9e,0x75,0xdd,0xc3,0x6e,0x92,0x4d,0xa1,0x77,0x1c, +0x01,0x9c,0x0f,0xa5,0x79,0x78,0xec,0xaf,0x03,0x98,0x35,0x2a,0xd0,0xd5,0x7c,0xac, +0xde,0xee,0x32,0x4d,0x4a,0x37,0xea,0x93,0xb1,0x96,0x17,0xeb,0x38,0x7f,0xdd,0xca, +0x5c,0xd1,0x5b,0x3f,0xb5,0xe8,0xfa,0x3f,0x5d,0x1f,0x7b,0xee,0x7d,0x27,0xf1,0x2b, +0xf6,0xff,0x00,0xf1,0xef,0x8f,0x2c,0xe7,0xb6,0xb4,0x8a,0x2d,0x24,0x4c,0x49,0xf3, +0x8c,0x86,0x69,0x23,0x24,0x63,0x29,0x90,0x15,0x4e,0x3b,0x81,0x5f,0x32,0x5d,0x5d, +0x4d,0x7b,0x73,0x2d,0xc5,0xc4,0xaf,0x3c,0xf2,0xb1,0x79,0x25,0x90,0xe5,0x9d,0x89, +0xc9,0x24,0xf7,0x35,0x1d,0x15,0x38,0x1c,0xaf,0x07,0x96,0xf3,0x7d,0x56,0x9f,0x2b, +0x96,0xef,0x56,0xdf,0xab,0x77,0x6f,0xef,0x3b,0x25,0x39,0x4f,0x59,0x30,0xa2,0x8a, +0x2b,0xd4,0x20,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28, +0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28, +0xa2,0x8a,0x00,0xfd,0xac,0x06,0x9d,0x9f,0x5a,0x88,0x53,0xd4,0xd7,0xc2,0x9e,0xe9, +0x20,0xa7,0x54,0x4a,0xd5,0x22,0xb5,0x31,0x12,0x66,0xa5,0x53,0x55,0xe9,0xea,0xd4, +0x80,0xb2,0x1a,0xa5,0x57,0xaa,0xca,0xd5,0x22,0xb7,0xbd,0x51,0x25,0x95,0x6a,0x99, +0x5b,0xde,0xaa,0x86,0xf7,0xa9,0x10,0xee,0xa7,0x71,0x17,0x23,0x6c,0x54,0xc8,0xfc, +0xd5,0x35,0x3d,0x05,0x4a,0xb2,0x15,0xa6,0x22,0xea,0xc9,0xc5,0x48,0xb2,0x62,0xa9, +0x07,0x35,0x32,0xc9,0x4c,0x0b,0xaa,0xfe,0xf5,0x32,0xc9,0xc9,0xaa,0x29,0x27,0xb5, +0x4d,0x1c,0x9b,0x69,0x01,0x7d,0x24,0xf4,0xe9,0x53,0xa3,0xf4,0xaa,0x31,0xc9,0x53, +0xa4,0x9d,0x2a,0x46,0x9d,0x8b,0xca,0xf5,0x34,0x72,0x7b,0xf1,0x54,0x95,0xea,0x54, +0x92,0xa2,0xc5,0x97,0xd6,0x4a,0x94,0x65,0xb1,0x83,0xf5,0xaa,0x71,0xbf,0x6a,0x99, +0x5f,0x0c,0x29,0x0c,0xfc,0xe8,0xff,0x00,0x82,0x8b,0x7e,0xcd,0xff,0x00,0xd9,0x17, +0x8f,0xe3,0xcd,0x16,0xdf,0x3a,0x75,0xfb,0x81,0x7c,0x91,0x82,0x7c,0x99,0xcf,0xf1, +0x9f,0x45,0x6f,0xe6,0x2b,0xf3,0xb7,0xc4,0x30,0x9b,0x5d,0x36,0x28,0x94,0x62,0x49, +0x64,0x23,0xdf,0x1e,0xb5,0xfd,0x0b,0x78,0xbb,0xc2,0xfa,0x67,0x8e,0xbc,0x37,0xa8, +0x68,0x5a,0xbc,0x0b,0x71,0xa7,0xdf,0x44,0x61,0x9a,0x33,0xe8,0x7b,0x8f,0x70,0x7a, +0x57,0xe2,0x97,0xed,0x31,0xfb,0x3e,0xea,0xdf,0x09,0x7e,0x21,0x5c,0x68,0xf7,0x71, +0xb3,0x41,0x0b,0xbb,0xdb,0x4d,0xb7,0x02,0x68,0x89,0xf9,0x5c,0x7e,0x1f,0xa8,0xae, +0x59,0x47,0x95,0xdc,0xfb,0xcc,0xa7,0x1d,0x2c,0x45,0x17,0x41,0xbf,0x79,0x2b,0x7a, +0xaf,0xf8,0x07,0xce,0xcd,0x67,0xfe,0x8b,0x80,0x71,0xce,0x69,0x52,0x00,0xac,0xbe, +0xb8,0xe9,0x5d,0x04,0x9a,0x0d,0xc7,0x96,0x50,0x46,0x73,0x9f,0x4a,0x9a,0xcb,0xc2, +0x77,0xb7,0x97,0x11,0xaa,0x40,0xcc,0x7e,0x9c,0x53,0xb9,0xec,0xac,0x3b,0x6d,0x72, +0xc7,0xb1,0x95,0x6d,0x66,0x65,0x9e,0x15,0x0b,0x9e,0x73,0x5d,0x4e,0x8d,0xe0,0xf9, +0x2e,0x65,0xc9,0x52,0x32,0x6b,0xa8,0xd1,0xfc,0x1f,0x1e,0x9f,0x22,0x86,0x1e,0x75, +0xd3,0x71,0x85,0x19,0xc5,0x7d,0x6b,0xfb,0x3a,0xfe,0xc7,0x1a,0xff,0x00,0xc4,0xd7, +0x83,0x53,0xd4,0x61,0x6d,0x1b,0x42,0xc8,0x26,0xe2,0x74,0x21,0xa5,0x19,0xe4,0x20, +0xef,0xf5,0xa8,0xe6,0xe9,0x13,0xd7,0x94,0x68,0x61,0x69,0xba,0x95,0xa4,0x92,0x3c, +0x43,0xe1,0x2f,0xc0,0xad,0x5b,0xc6,0xfa,0xd5,0xbe,0x9f,0xa5,0x69,0xf2,0xdd,0xdc, +0x48,0xc3,0x84,0x53,0x85,0x19,0xea,0x4f,0x61,0xef,0x5f,0xa7,0x1f,0xb3,0xdf,0xec, +0xa3,0xa2,0x7c,0x25,0xb4,0x83,0x50,0xd4,0x62,0x87,0x50,0xf1,0x06,0x01,0xde,0x46, +0x63,0x80,0xff,0x00,0xb2,0x0f,0x53,0xef,0x5e,0x99,0xf0,0xd3,0xe1,0x47,0x86,0xfe, +0x15,0xe8,0xcb,0xa7,0xe8,0x36,0x2b,0x07,0x18,0x92,0xe1,0xb9,0x96,0x53,0xea,0xc7, +0xfa,0x57,0x66,0x38,0xa7,0x18,0x6b,0x79,0x1f,0x0d,0x9a,0x67,0xd3,0xc4,0xc5,0xd0, +0xc2,0xfb,0xb0,0xfc,0x5f,0xf9,0x2f,0x2f,0xbc,0xfc,0x6d,0xfd,0xb8,0x3e,0x1d,0x1f, +0x04,0xfe,0xd6,0x7e,0x28,0x64,0x8b,0xcb,0xb3,0xd7,0xed,0x7e,0xdd,0x11,0xc7,0x05, +0x99,0x46,0xfc,0x7f,0xc0,0x81,0xaf,0x9d,0x74,0x59,0x9f,0xed,0x8f,0x28,0x52,0x47, +0x96,0xca,0xfe,0xd8,0xe2,0xbf,0x4f,0x7f,0xe0,0xa6,0x9f,0x08,0xa4,0xd7,0x3c,0x23, +0xa2,0x7c,0x40,0xb0,0x87,0x7d,0xce,0x84,0xd2,0x5b,0x5e,0x95,0x1c,0xfd,0x9e,0x40, +0x40,0x3f,0x83,0xe3,0xf3,0xaf,0xcb,0x9f,0xb4,0x35,0xae,0xa0,0xa5,0x59,0x84,0x6a, +0x11,0xe5,0xd8,0x39,0xf9,0x87,0x1f,0xaf,0x35,0x9c,0xe3,0xa9,0xf6,0x79,0x0e,0x25, +0x55,0xc1,0x45,0xdf,0x54,0xed,0xf9,0x17,0xbe,0xd7,0x1c,0x92,0x6c,0x74,0xce,0x4f, +0x07,0x38,0xab,0x3e,0x68,0x4c,0x01,0xd2,0xab,0xc7,0x71,0xe7,0x64,0x3e,0xd2,0x47, +0x20,0xe3,0x9a,0x49,0x89,0x52,0xc3,0xd0,0xd7,0x39,0xf5,0x9c,0xd6,0xd4,0xb3,0xe6, +0xe4,0xd6,0xa6,0x93,0x26,0x24,0x07,0x38,0xac,0x15,0x63,0xc5,0x6b,0x69,0xbc,0x63, +0x35,0x76,0x1f,0x3d,0xb5,0x3a,0xeb,0x5d,0x44,0xae,0xd5,0x07,0xbd,0x7d,0x1d,0xfb, +0x3d,0x78,0x2a,0x5f,0x14,0x6b,0x9a,0x75,0xa0,0x42,0x5a,0xe2,0x55,0x04,0xe3,0xa2, +0xf5,0x27,0xf2,0xaf,0x9c,0x3c,0x2f,0xa6,0xbe,0xa5,0xaa,0x43,0x18,0x52,0xc3,0x22, +0xbf,0x4a,0xbf,0x63,0x9f,0x87,0x3f,0xd9,0xfa,0x7c,0xbe,0x20,0xb8,0x8f,0x1b,0x07, +0x93,0x06,0x47,0x72,0x06,0xe2,0x3f,0x0e,0x2b,0x37,0x1e,0x79,0x28,0xa3,0x97,0x19, +0x98,0x7f,0x67,0xe0,0xeb,0x62,0xdb,0xd5,0x2b,0x47,0xd5,0xec,0x7d,0x37,0x67,0x6a, +0x96,0x36,0xb0,0xdb,0xc4,0x36,0xc5,0x0a,0x04,0x51,0xec,0x06,0x2a,0x56,0x6f,0x97, +0x27,0xf2,0xa4,0x66,0xed,0x51,0x34,0x9e,0xf9,0x35,0xeb,0x58,0xfe,0x79,0x94,0x9b, +0x77,0x63,0x8c,0x98,0xf6,0xa8,0xda,0x6e,0xbd,0xaa,0x36,0x7d,0xb5,0x0b,0x3f,0xa1, +0xaa,0xb1,0x03,0xe4,0x97,0x15,0x03,0xc9,0xef,0x4c,0x92,0x4c,0x77,0xa8,0x1a,0x4f, +0x7a,0x69,0x0b,0x61,0xd2,0x49,0xef,0x50,0xb4,0xbe,0xf4,0xc7,0x97,0xad,0x56,0x92, +0x5a,0xbb,0x11,0x71,0xf2,0x4f,0xda,0xab,0xc9,0x35,0x47,0x24,0xbc,0x55,0x59,0x26, +0xf7,0xa6,0x22,0x59,0x26,0xeb,0xcd,0x55,0x92,0x63,0xcf,0x35,0x1c,0xb3,0x1c,0xf5, +0xaa,0xd2,0xcc,0x57,0x3c,0xd2,0x01,0xd2,0xcb,0xb6,0xa9,0xcd,0x29,0xf5,0xa2,0x49, +0xbd,0x4d,0x55,0x92,0x4a,0x43,0x09,0x25,0x35,0x5a,0x49,0x7b,0xd1,0x24,0xb8,0xaa, +0x92,0xca,0x4f,0x7a,0x45,0x0e,0x92,0x4c,0xd5,0x79,0x24,0xa4,0x67,0xa8,0x99,0xa9, +0x80,0xd6,0x6e,0xb5,0x13,0x37,0xcd,0x43,0x35,0x47,0x4a,0xe5,0x24,0x3d,0x9b,0x8a, +0x8c,0x9a,0x0d,0x30,0xb5,0x22,0x87,0x16,0xa6,0x31,0xa6,0x93,0xcd,0x34,0xb5,0x32, +0x07,0x6e,0xa6,0xee,0xf5,0xa6,0x96,0xa3,0xad,0x50,0x8f,0xce,0xbf,0xdb,0x0e,0xf0, +0x5e,0x7c,0x7c,0xd6,0xf1,0xff,0x00,0x2c,0x60,0xb7,0x84,0xf3,0x9e,0x44,0x63,0xfc, +0x6b,0xc5,0xab,0xd2,0xbf,0x69,0x4b,0xef,0xed,0x0f,0x8e,0xde,0x32,0x90,0x1c,0xaa, +0xde,0xf9,0x6b,0xf4,0x54,0x51,0xfc,0xf3,0x5e,0x6b,0x5f,0x65,0x41,0x5a,0x94,0x57, +0x92,0x3c,0x7a,0x9f,0x1b,0x0a,0x28,0xa2,0xb6,0x20,0x28,0xa2,0x8a,0x00,0x28,0xa2, +0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2, +0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2, +0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2, +0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2, +0x8a,0x00,0xfd,0xa8,0xcd,0x3a,0xa2,0x0f,0xed,0x46,0xec,0xf7,0xaf,0x85,0x3d,0xd2, +0x65,0x61,0xe9,0x4e,0x56,0xa8,0xb3,0x4e,0x56,0xa0,0x44,0xe1,0xa9,0xd5,0x0e,0xea, +0x7e,0xef,0x7a,0x60,0x4a,0xad,0xe8,0x6a,0x45,0x7a,0x83,0x34,0xa0,0xe2,0x80,0x2d, +0x2b,0x71,0x52,0xab,0xe2,0xa9,0xac,0x9e,0xf5,0x32,0xb8,0xf5,0xa6,0x49,0x69,0x64, +0x26,0xa4,0x57,0xaa,0xaa,0xd5,0x22,0xb5,0x31,0x16,0xd6,0x4a,0x95,0x64,0xe9,0x54, +0xd5,0xaa,0x44,0x71,0xc5,0x01,0x62,0xfa,0xb6,0x7b,0xd4,0xaa,0xfe,0xf5,0x49,0x64, +0xa9,0x92,0x4f,0x7a,0x42,0x2e,0xa4,0x86,0xa6,0x59,0x3a,0x55,0x25,0x93,0xde,0xa6, +0x8e,0x4e,0x6a,0x80,0xbe,0x92,0x74,0xa9,0xd1,0xab,0x3d,0x64,0x3d,0xaa,0x78,0xe4, +0xfc,0x6a,0x40,0xbe,0xb2,0x54,0xca,0xd5,0x46,0x39,0x2a,0x65,0x93,0x1d,0xea,0x6c, +0x5a,0x65,0xe5,0x93,0xbf,0x7a,0xe0,0xfe,0x2e,0x7c,0x12,0xf0,0xbf,0xc6,0xcd,0x0c, +0x58,0x78,0x86,0xcf,0x74,0xf1,0x64,0xdb,0xde,0x45,0xc4,0xb0,0x9f,0x63,0xdc,0x7b, +0x1e,0x2b,0xb3,0x59,0x7d,0xea,0x74,0x9b,0xd6,0xa1,0xab,0xee,0x6d,0x4e,0xa4,0xe8, +0xcd,0x4e,0x9b,0xb3,0x47,0xc2,0x1e,0x29,0xff,0x00,0x82,0x6b,0xde,0xc3,0x23,0x4b, +0xe1,0xed,0x7e,0xce,0xed,0x73,0xf2,0xc3,0x79,0x19,0x88,0xe3,0xea,0x32,0x2b,0x93, +0xb1,0xff,0x00,0x82,0x7a,0xfc,0x48,0x9a,0xe8,0xc5,0x25,0xce,0x91,0x63,0x6f,0x9c, +0x79,0x9f,0x68,0x2d,0xc7,0xb0,0x02,0xbf,0x47,0xfc,0xde,0x38,0xa5,0x56,0x3c,0x76, +0xac,0xbd,0x94,0x4f,0xa0,0x87,0x10,0xe3,0xe1,0x1b,0x5d,0x3f,0x91,0xf3,0x2f,0xc1, +0x5f,0xd8,0x4b,0xc2,0xdf,0x0f,0x2e,0xa2,0xd4,0xfc,0x43,0x38,0xf1,0x2e,0xa9,0x1f, +0xcc,0x91,0xb2,0x6c,0xb7,0x43,0xeb,0xb4,0x9c,0xb7,0xe3,0x5f,0x52,0x5b,0xc5,0x1d, +0xb4,0x49,0x1c,0x28,0xb1,0x46,0xa3,0x6a,0xaa,0x0c,0x00,0x3d,0x00,0xa8,0x0f,0xcd, +0x8e,0x6a,0x58,0xd8,0x28,0xe9,0x55,0xca,0x96,0xc7,0x91,0x88,0xc6,0x57,0xc5,0xcb, +0x9a,0xb4,0xae,0x59,0x0d,0x4e,0x0c,0x3d,0x6a,0xb6,0xfe,0x7a,0xe2,0x9d,0xb8,0x7a, +0xd3,0xb1,0xcb,0x73,0x2b,0xc7,0x1e,0x17,0xb4,0xf1,0xa7,0x83,0xf5,0xad,0x0e,0xf6, +0x04,0xb9,0xb7,0xd4,0x2d,0x25,0xb7,0x68,0xdc,0x64,0x12,0xca,0x40,0x3f,0x81,0xc1, +0xaf,0xc1,0x3f,0x10,0x69,0xf2,0xf8,0x5b,0xc5,0x7a,0xed,0xac,0xc9,0x89,0xac,0x2e, +0xda,0xce,0x44,0x23,0xfb,0x84,0xa9,0xe3,0xf0,0xaf,0xe8,0x0d,0x5b,0x6f,0x4a,0xfc, +0x6a,0xfd,0xb5,0x7e,0x18,0x7f,0xc2,0x2b,0xfb,0x4d,0x78,0x92,0xd9,0x01,0xb7,0xb4, +0xd4,0xdb,0xed,0xf6,0xe4,0x8c,0x06,0x32,0x0d,0xcc,0x07,0xfc,0x08,0x9a,0xc2,0xa2, +0xb2,0xd4,0xfb,0x8e,0x17,0xae,0xe3,0x5e,0x54,0x57,0x5d,0x7f,0x4f,0xd4,0xf0,0x79, +0xa4,0x47,0x8d,0xa6,0x89,0x55,0x33,0xce,0x16,0x92,0xe4,0x7e,0xf8,0xfa,0x30,0x06, +0x96,0x5b,0x76,0xb7,0xf3,0x20,0x6f,0xee,0x1c,0x7e,0x14,0x48,0x0b,0x2c,0x4d,0xea, +0xa2,0xb9,0x4f,0xd5,0x35,0x12,0x25,0xf9,0x85,0x6e,0x69,0x50,0x99,0xa4,0x55,0x03, +0x35,0x91,0x6f,0x13,0x16,0x00,0x0e,0x7a,0x57,0xa5,0x7c,0x3c,0xf0,0xc3,0x6a,0x17, +0x0a,0x4a,0xf0,0x30,0x49,0xc5,0x39,0x3e,0x55,0x70,0x51,0x73,0x92,0x8a,0x3d,0x57, +0xe0,0x27,0xc3,0x6b,0x8f,0x10,0x6b,0x56,0x70,0xc5,0x11,0x79,0xe7,0x91,0x63,0x45, +0xdb,0xf9,0x9f,0xa0,0xaf,0xd4,0xdf,0x0a,0xf8,0x7e,0xdf,0xc2,0x7e,0x1e,0xb1,0xd2, +0xad,0x94,0x2c,0x76,0xf1,0x85,0x24,0x7f,0x13,0x77,0x3f,0x89,0xaf,0x9f,0xbf,0x64, +0x7f,0x86,0x0b,0xa3,0xe9,0x2d,0xe2,0x4b,0xa8,0x3c,0xb7,0x90,0x18,0x6d,0x14,0x8e, +0x8b,0x8f,0x99,0xff,0x00,0x1e,0x95,0xf4,0x7b,0x49,0xb7,0xad,0x6d,0x87,0x83,0xb7, +0x3b,0xdd,0x9f,0x97,0x71,0x66,0x62,0xab,0x57,0x58,0x1a,0x2f,0xdd,0xa7,0xbf,0x9c, +0xba,0xfd,0xdb,0x7d,0xe4,0x8f,0x26,0x7d,0xaa,0x06,0x93,0xb5,0x35,0xa6,0xcf,0x4a, +0x81,0xa4,0xae,0xe3,0xe0,0x09,0x19,0xea,0x16,0x90,0xd4,0x6f,0x25,0x41,0x24,0xc3, +0xd6,0x9d,0x84,0xe4,0x49,0x24,0x95,0x5a,0x49,0x8f,0xad,0x47,0x24,0xdf,0x95,0x56, +0x92,0x61,0xeb,0x54,0x41,0x24,0x93,0x55,0x69,0x26,0xf7,0xa8,0xe4,0x9b,0xde,0xaa, +0xc9,0x37,0xbd,0x00,0x4d,0x24,0xbe,0xf5,0x5a,0x49,0x3f,0x0a,0x86,0x49,0xb1,0xde, +0xab,0xc9,0x37,0x3d,0x68,0x02,0x59,0x26,0xaa,0xb2,0x49,0xd7,0x9a,0x64,0x93,0x55, +0x67,0x93,0x1c,0x52,0x18,0xe9,0x24,0xf7,0xaa,0xd2,0x4b,0xef,0x4d,0x92,0x4e,0xb5, +0x5a,0x47,0xcd,0x22,0xc5,0x79,0x3d,0xea,0xbc,0x92,0xfe,0x34,0x92,0x37,0x6a,0x85, +0x9a,0x98,0x87,0xb3,0x54,0x4c,0xd4,0x9b,0xa9,0xac,0xd5,0x2c,0xab,0x0d,0x66,0xa6, +0xee,0xa0,0xd2,0x50,0x50,0x85,0xa9,0xb4,0xe3,0x41,0xe9,0x41,0x2c,0x61,0xa6,0x7d, +0x29,0xcc,0x4f,0x6a,0x4a,0xa2,0x46,0x7d,0xdf,0x7a,0x72,0xfd,0xe1,0x4b,0xc5,0x47, +0x73,0x32,0xdb,0xdb,0x4d,0x2b,0x30,0x51,0x1a,0x33,0x12,0x7a,0x0c,0x0c,0xd3,0x11, +0xf9,0x5f,0xf1,0x66,0xf7,0xfb,0x47,0xe2,0x87,0x8b,0x2e,0x73,0x91,0x26,0xa7,0x3f, +0xe8,0xe4,0x7f,0x4a,0xe5,0x2a,0xde,0xb1,0xa8,0x1d,0x5b,0x57,0xbf,0xbe,0x6e,0xb7, +0x57,0x12,0x4e,0x7f,0xe0,0x4c,0x5b,0xfa,0xd5,0x4a,0xfb,0x68,0xae,0x58,0xa4,0x78, +0xcf,0x56,0x14,0x51,0x45,0x50,0x82,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a, +0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a, +0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a, +0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a, +0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x0f,0xda, +0x1d,0xd4,0x6e,0xa6,0x64,0xd0,0x1b,0xd6,0xbe,0x18,0xf6,0xc9,0x55,0xaa,0x55,0x6a, +0xae,0xbd,0x69,0xea,0xd8,0xa1,0x8c,0x9e,0x9f,0x51,0x2b,0x53,0x85,0x21,0x92,0xee, +0xa7,0x6e,0xa8,0xf8,0xa2,0x98,0x89,0x69,0xca,0xd5,0x10,0x6a,0x78,0x34,0x80,0xb0, +0xaf,0xd3,0xad,0x4a,0xad,0xde,0xaa,0xab,0x1f,0x5a,0x91,0x1b,0xdf,0x9a,0x62,0x2d, +0x2b,0xd3,0xd5,0xbd,0x3a,0xd5,0x65,0x6a,0x7a,0xbe,0x29,0x88,0xb8,0x8c,0x7b,0xd4, +0xa8,0xdc,0xf5,0xaa,0x4b,0x26,0x6a,0x68,0xde,0x82,0x4b,0xca,0xd8,0x04,0xe6,0xa5, +0x59,0x3d,0x45,0x51,0x59,0x2a,0x51,0x27,0x43,0x4c,0x0b,0xeb,0x25,0x4a,0xb2,0x0a, +0xa0,0x92,0x62,0xa6,0x59,0x29,0x01,0x7d,0x64,0xc5,0x4c,0xb3,0x7e,0x35,0x9e,0xb2, +0x54,0xab,0x25,0x00,0x68,0x2c,0x95,0x22,0xcd,0x8e,0xa6,0xa8,0xac,0xa6,0xa4,0x59, +0x3a,0x54,0x95,0x72,0xfa,0xcd,0xe9,0x53,0xac,0x95,0x9c,0xb2,0x54,0xcb,0x36,0x31, +0xcd,0x22,0xcb,0xc2,0x5f,0x7a,0x70,0x93,0xf1,0xaa,0x5e,0x75,0x28,0x9b,0x1c,0xd2, +0x11,0x7b,0xcc,0xa7,0xac,0xdd,0xba,0xd5,0x01,0x37,0x7c,0xd3,0xbc,0xd3,0xeb,0x45, +0x86,0x68,0x79,0x9f,0x2f,0xa5,0x7c,0x21,0xff,0x00,0x05,0x3a,0xf8,0x7a,0xd7,0x5a, +0x6f,0x84,0xfc,0x69,0x6a,0x98,0x92,0xda,0x56,0xb0,0x9e,0x45,0x1f,0x77,0x3f,0x34, +0x64,0x9f,0x73,0x91,0x5f,0x71,0x2c,0xd5,0xc9,0xfc,0x58,0xf8,0x77,0xa5,0xfc,0x5b, +0xf8,0x7b,0xac,0x78,0x57,0x56,0xff,0x00,0x8f,0x5d,0x42,0x1d,0x8b,0x20,0x19,0x31, +0x48,0x39,0x49,0x07,0xba,0xb0,0x06,0xa2,0x51,0xe6,0x56,0x3d,0x1c,0xbf,0x16,0xf0, +0x58,0x98,0x56,0x5b,0x27,0xaf,0xa7,0x53,0xf1,0x2b,0x56,0x88,0x49,0x22,0x4c,0xab, +0xb7,0x70,0xf9,0x87,0xa1,0xef,0x59,0xeb,0x1f,0xca,0x8a,0x7b,0x57,0xb4,0xfc,0x5c, +0xf8,0x25,0xad,0xfc,0x32,0xf1,0x14,0xfa,0x36,0xad,0x6d,0xb6,0x58,0xcf,0xc9,0x32, +0x0f,0xdd,0xcc,0xbd,0x9d,0x4f,0xa1,0xfd,0x2b,0xce,0xd7,0xc3,0x32,0x97,0x18,0x53, +0x9f,0xa5,0x79,0x89,0xdb,0x46,0x7e,0xf5,0x0a,0x91,0xad,0x05,0x56,0x9b,0xba,0x65, +0x3d,0x0f,0x4d,0x6b,0x8b,0x85,0xe3,0x3c,0xf1,0xc5,0x7d,0x5b,0xf0,0x17,0xe1,0x74, +0xde,0x22,0xd5,0xb4,0xed,0x36,0x18,0xc8,0x7b,0x86,0x06,0x46,0xc7,0xdd,0x41,0xcb, +0x31,0xfc,0x2b,0xc9,0xfe,0x1d,0x78,0x1d,0xe6,0xbb,0xb7,0x77,0x81,0xe5,0x9a,0x46, +0x0b,0x14,0x28,0xa4,0xb3,0xb7,0xa0,0x15,0xfa,0x47,0xf0,0x0f,0xe1,0x48,0xf8,0x7b, +0xa0,0x8b,0xad,0x42,0x25,0x1a,0xd5,0xda,0x03,0x22,0xff,0x00,0xcf,0x04,0xed,0x18, +0xf7,0xf5,0xa1,0x41,0xd6,0x95,0x96,0xc7,0x0e,0x65,0x9a,0x53,0xc9,0xf0,0x8e,0xab, +0x7f,0xbc,0x96,0x91,0x5e,0x7d,0xfd,0x11,0xea,0x9a,0x3e,0x9f,0x6f,0xa1,0xe9,0x76, +0xb6,0x16,0xa8,0x23,0xb7,0xb6,0x8d,0x62,0x45,0x1e,0x80,0x62,0xa7,0x69,0x2a,0x13, +0x2f,0xbd,0x44,0xf3,0x57,0xb0,0x91,0xf8,0x1c,0xa6,0xe4,0xdc,0xa4,0xee,0xd9,0x33, +0x4b,0x50,0xb4,0xd5,0x03,0x4f,0x50,0x49,0x35,0x51,0x93,0x77,0x26,0x92,0x63,0xd0, +0x1a,0xad,0x24,0xde,0xf5,0x0c,0x93,0xd5,0x59,0x2e,0x28,0x11,0x34,0xb3,0x7b,0xd5, +0x59,0x27,0xa8,0x24,0xb8,0xf7,0xaa,0xd2,0x4d,0xef,0x40,0x13,0xc9,0x36,0x2a,0xbc, +0x93,0xd4,0x32,0x4d,0xcf,0x5a,0x81,0xe5,0xa4,0x3b,0x12,0xbc,0xb5,0x03,0x48,0x4d, +0x46,0xcf,0x51,0x34,0xb4,0x8a,0xb0,0xf7,0x92,0xab,0xc9,0x25,0x35,0xe5,0xa8,0x1e, +0x4a,0x60,0x0e,0xf5,0x04,0x8d,0x48,0xf2,0x54,0x4c,0xd4,0x0c,0x56,0x6a,0x81,0x9a, +0x9c,0xed,0x51,0x31,0xa9,0x29,0x21,0x77,0x53,0x49,0xa4,0xcd,0x34,0xb5,0x16,0x01, +0x73,0x49,0x49,0x9a,0x4d,0xb9,0xef,0x4c,0x57,0x1d,0xba,0x86,0x6a,0x4a,0x6e,0x4d, +0x51,0x01,0x4c,0x66,0xf4,0xa1,0x89,0xed,0x48,0x38,0xa0,0x05,0x15,0xc9,0x7c,0x5b, +0xd5,0x0e,0x8b,0xf0,0xbf,0xc5,0x77,0xc0,0xed,0x68,0x74,0xcb,0x82,0xa7,0xd0,0x98, +0xc8,0x1f,0xa9,0xae,0xab,0x71,0xaf,0x1b,0xfd,0xae,0xb5,0xe1,0xa1,0xfc,0x09,0xd7, +0x13,0x38,0x93,0x50,0x92,0x1b,0x24,0xe7,0xfb,0xce,0x18,0xff,0x00,0xe3,0xa8,0xc3, +0xf1,0xad,0x69,0x2e,0x6a,0x91,0x8f,0x98,0xa5,0xa4,0x5b,0x3f,0x3a,0x05,0x2d,0x14, +0x57,0xd9,0x9e,0x30,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00, +0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00, +0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00, +0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00, +0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x01, +0xfb,0x39,0xba,0x96,0x99,0x45,0x7c,0x35,0x8f,0x72,0xe4,0x81,0xa9,0xea,0x6a,0x3a, +0x72,0x9e,0x28,0x11,0x28,0x62,0x29,0xe1,0xb1,0x50,0xee,0xa7,0x03,0xf9,0x50,0x3b, +0x93,0x6e,0x34,0xed,0xd8,0xeb,0x51,0x6f,0x07,0xda,0x9c,0x0d,0x21,0x92,0x83,0x4e, +0x0d,0x51,0x6e,0x1d,0xa9,0x43,0x50,0x22,0x60,0x69,0xca,0x6a,0x20,0xdc,0x53,0x95, +0xa9,0x88,0x9d,0x5f,0x8a,0x90,0x37,0x1e,0xf5,0x5c,0x35,0x2e,0xf3,0x40,0xcb,0x41, +0xa9,0xeb,0x21,0xcf,0xa5,0x55,0xdf,0xcf,0xad,0x48,0xaf,0x9a,0x09,0xb1,0x6d,0x64, +0xf5,0xe2,0xa5,0x12,0x7b,0xd5,0x1d,0xf5,0x22,0x49,0x8a,0x04,0x5e,0x59,0x39,0xf7, +0xa9,0x56,0x42,0x2a,0x8a,0xc8,0x33,0x8c,0x54,0xab,0x25,0x31,0x17,0xd5,0xf6,0xf7, +0xcd,0x4a,0xb2,0x55,0x05,0x98,0xed,0xc5,0x3d,0x66,0xf5,0xa0,0x0d,0x25,0x92,0x9e, +0xb2,0x7b,0xe2,0xa8,0x2c,0x9e,0xf5,0x2a,0xc9,0xef,0x40,0x17,0xc3,0x15,0xef,0x53, +0x2c,0xbc,0x56,0x72,0xcd,0xef,0x52,0x2c,0xd9,0xa0,0x0b,0xeb,0x2d,0x3b,0x7f,0xbd, +0x51,0x12,0xfb,0xd3,0xbc,0xee,0xf4,0xac,0x55,0xcb,0x9e,0x61,0xa7,0x2c,0xb5,0x48, +0x4d,0xf8,0x52,0xf9,0x9e,0xf4,0x58,0x2e,0x5f,0x12,0x9f,0x5a,0x5f,0x34,0xd5,0x0f, +0x34,0xfa,0x52,0xf9,0xb4,0x58,0x39,0x8c,0x4f,0x88,0x1f,0x0e,0x7c,0x3d,0xf1,0x37, +0x4a,0xfe,0xcf,0xd7,0xf4,0xf4,0xbb,0x89,0x79,0x8e,0x51,0xf2,0xcb,0x19,0xf5,0x56, +0xed,0x5e,0x29,0xff,0x00,0x0c,0x33,0xe0,0xc5,0xbe,0x13,0x2e,0xa7,0xa9,0x08,0x73, +0x9f,0x29,0x82,0x13,0x8f,0x4c,0xe2,0xbe,0x86,0xf3,0xa8,0xf3,0xaa,0x25,0x4e,0x12, +0xd5,0xa3,0xd2,0xc3,0xe6,0x98,0xcc,0x24,0x79,0x28,0x55,0x71,0x5d,0x8e,0x53,0xc0, +0xff,0x00,0x08,0x7c,0x29,0xf0,0xed,0x55,0xb4,0x8d,0x2e,0x31,0x72,0x00,0x06,0xea, +0x70,0x1e,0x5f,0xcc,0xf4,0xfc,0x31,0x5d,0x93,0x4b,0xb4,0xf1,0x55,0x4c,0x87,0xd6, +0xa3,0x69,0xaa,0xd2,0x51,0xd1,0x1c,0x35,0x6b,0x55,0xc4,0x4b,0x9e,0xac,0x9c,0x9f, +0x76,0x5a,0x69,0x8d,0x40,0xf3,0x1e,0xa6,0xab,0xbc,0xf5,0x5e,0x4b,0x8a,0x66,0x25, +0x99,0x26,0xaa,0xd2,0x4c,0x6a,0xb4,0x97,0x1d,0x6a,0xb4,0x97,0x14,0x01,0x62,0x49, +0xfd,0xf1,0x55,0x64,0x9f,0xde,0xab,0xc9,0x3e,0x7e,0x95,0x04,0x92,0xe6,0x81,0x93, +0x49,0x37,0xbd,0x40,0xd3,0x54,0x2c,0xf8,0xe6,0xa1,0x69,0xaa,0x4a,0x26,0x69,0x2a, +0x27,0x93,0x8e,0xb5,0x03,0x4b,0x51,0x34,0x99,0xa6,0x32,0x56,0x98,0xd4,0x6d,0x26, +0x6a,0x26,0x7a,0x63,0x49,0x40,0x0f,0x67,0xf7,0xa8,0x24,0x7f,0x7a,0x46,0x6a,0x89, +0x9a,0x90,0x03,0x35,0x46,0xcd,0x43,0x35,0x46,0x5a,0x90,0xc5,0x66,0xa8,0x98,0xd2, +0xb1,0xa6,0x33,0x52,0x18,0x6e,0xfc,0x29,0x37,0x0f,0xc6,0xa2,0x2c,0x73,0x4b,0xbb, +0xd2,0xa9,0x12,0xc7,0x93,0xeb,0x4b,0x9f,0x4a,0x8f,0xb5,0x1b,0x88,0xaa,0x24,0x93, +0x34,0x8c,0x69,0xbb,0xe9,0x39,0x38,0xa0,0x62,0xd3,0x37,0x64,0x9a,0x56,0xa6,0xf6, +0xa4,0xc6,0x85,0xaf,0x96,0xff,0x00,0x6f,0x5d,0x71,0x6d,0xfc,0x1f,0xe1,0x9d,0x24, +0x38,0xf3,0x2e,0x6f,0x5e,0xe1,0x93,0xbe,0xd4,0x4c,0x03,0xf9,0xb1,0xaf,0xa8,0xfa, +0x0a,0xf8,0x4b,0xf6,0xe6,0xd7,0x7f,0xb4,0x3e,0x2b,0x69,0xfa,0x70,0x7d,0xcb,0xa7, +0x69,0xca,0x0a,0xe7,0xa3,0x48,0xc5,0x8f,0xe3,0xc0,0xae,0xfc,0x0c,0x79,0xab,0xaf, +0x23,0x9e,0xbc,0xad,0x06,0x7c,0xe7,0x45,0x14,0x57,0xd5,0x1e,0x58,0x51,0x45,0x14, +0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14, +0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14, +0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14, +0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14, +0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x01,0xff,0xd9,}; + +const unsigned int dummy_align__404_html = 3; +const unsigned char data__404_html[] = { +/* /404.html (10 chars) */ +0x2f,0x34,0x30,0x34,0x2e,0x68,0x74,0x6d,0x6c,0x00,0x00,0x00, + +/* HTTP header */ +/* "HTTP/1.0 404 File not found +" (29 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x34,0x30,0x34,0x20,0x46,0x69,0x6c, +0x65,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x0d,0x0a, +/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) +" (63 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, +0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, +0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, +0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, +/* "Content-type: text/html + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, +0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x0d,0x0a, +/* raw file data (1184 bytes) */ +0x3c,0x21,0x44,0x4f,0x43,0x54,0x59,0x50,0x45,0x20,0x48,0x54,0x4d,0x4c,0x20,0x50, +0x55,0x42,0x4c,0x49,0x43,0x20,0x22,0x2d,0x2f,0x2f,0x57,0x33,0x43,0x2f,0x2f,0x44, +0x54,0x44,0x20,0x48,0x54,0x4d,0x4c,0x20,0x34,0x2e,0x30,0x31,0x20,0x54,0x72,0x61, +0x6e,0x73,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x2f,0x2f,0x45,0x4e,0x22,0x3e,0x0a, +0x3c,0x68,0x74,0x6d,0x6c,0x3e,0x3c,0x68,0x65,0x61,0x64,0x3e,0x3c,0x74,0x69,0x74, +0x6c,0x65,0x3e,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x3c,0x2f,0x74,0x69, +0x74,0x6c,0x65,0x3e,0x3c,0x2f,0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x3c,0x62,0x6f, +0x64,0x79,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a, +0x20,0x62,0x6c,0x61,0x63,0x6b,0x3b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75, +0x6e,0x64,0x2d,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77,0x68,0x69,0x74,0x65,0x3b, +0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x64,0x74,0x68, +0x3d,0x22,0x31,0x30,0x30,0x25,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x62,0x6f,0x64,0x79, +0x3e,0x0d,0x0a,0x3c,0x74,0x72,0x20,0x76,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74, +0x6f,0x70,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x77,0x69,0x64,0x74,0x68,0x3d, +0x22,0x38,0x30,0x22,0x3e,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x64,0x69,0x76,0x20, +0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x74,0x65,0x78,0x74,0x2d,0x61,0x6c,0x69,0x67, +0x6e,0x3a,0x20,0x63,0x65,0x6e,0x74,0x65,0x72,0x3b,0x22,0x3e,0x3c,0x69,0x6d,0x67, +0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x39, +0x36,0x70,0x78,0x3b,0x20,0x68,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x36,0x38,0x70, +0x78,0x3b,0x22,0x20,0x61,0x6c,0x74,0x3d,0x22,0x53,0x54,0x20,0x6c,0x6f,0x67,0x6f, +0x22,0x20,0x73,0x72,0x63,0x3d,0x22,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78, +0x5f,0x66,0x69,0x6c,0x65,0x73,0x2f,0x6c,0x6f,0x67,0x6f,0x2e,0x6a,0x70,0x67,0x22, +0x3e,0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a, +0x3c,0x74,0x64,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x35,0x30,0x30,0x22,0x3e, +0x0d,0x0a,0x3c,0x68,0x31,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x35, +0x31,0x2c,0x20,0x35,0x31,0x2c,0x20,0x32,0x35,0x35,0x29,0x3b,0x22,0x3e,0x3c,0x73, +0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x73,0x6d,0x61, +0x6c,0x6c,0x3e,0x3c,0x62,0x69,0x67,0x3e,0x3c,0x62,0x69,0x67,0x3e,0x3c,0x62,0x69, +0x67,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x77,0x65, +0x69,0x67,0x68,0x74,0x3a,0x20,0x62,0x6f,0x6c,0x64,0x3b,0x22,0x3e,0x3c,0x62,0x69, +0x67,0x3e,0x3c,0x73,0x74,0x72,0x6f,0x6e,0x67,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20, +0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x73,0x74,0x79,0x6c, +0x65,0x3a,0x20,0x69,0x74,0x61,0x6c,0x69,0x63,0x3b,0x22,0x3e,0x53,0x54,0x4d,0x33, +0x32,0x48,0x37,0x20,0x57,0x65,0x62,0x73,0x65,0x72,0x76,0x65,0x72,0x20,0x44,0x65, +0x6d,0x6f,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x73,0x74,0x72,0x6f,0x6e, +0x67,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x2f, +0x62,0x69,0x67,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x2f,0x73,0x6d,0x61,0x6c, +0x6c,0x3e,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f,0x73,0x6d,0x61,0x6c, +0x6c,0x3e,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20, +0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67, +0x62,0x28,0x35,0x31,0x2c,0x20,0x35,0x31,0x2c,0x20,0x32,0x35,0x35,0x29,0x3b,0x22, +0x3e,0x0d,0x0a,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c, +0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d, +0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x3c, +0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x62,0x69,0x67,0x3e,0x3c,0x62,0x69,0x67,0x3e, +0x3c,0x62,0x69,0x67,0x3e,0x3c,0x62,0x69,0x67,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d, +0x22,0x66,0x6f,0x6e,0x74,0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x62,0x6f, +0x6c,0x64,0x3b,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x35, +0x31,0x2c,0x20,0x35,0x31,0x2c,0x20,0x32,0x35,0x35,0x29,0x3b,0x22,0x3e,0x3c,0x62, +0x69,0x67,0x3e,0x3c,0x73,0x74,0x72,0x6f,0x6e,0x67,0x3e,0x3c,0x73,0x70,0x61,0x6e, +0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x73,0x74,0x79, +0x6c,0x65,0x3a,0x20,0x69,0x74,0x61,0x6c,0x69,0x63,0x3b,0x22,0x3e,0x3c,0x2f,0x73, +0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x73,0x74,0x72,0x6f,0x6e,0x67,0x3e,0x3c,0x2f,0x62, +0x69,0x67,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22, +0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x35,0x31,0x2c,0x20,0x35, +0x31,0x2c,0x20,0x32,0x35,0x35,0x29,0x3b,0x22,0x3e,0x3c,0x62,0x72,0x3e,0x0d,0x0a, +0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x2f,0x62, +0x69,0x67,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c, +0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c, +0x2f,0x68,0x31,0x3e,0x0d,0x0a,0x3c,0x68,0x32,0x3e,0x34,0x30,0x34,0x20,0x2d,0x20, +0x50,0x61,0x67,0x65,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x3c,0x2f, +0x68,0x32,0x3e,0x0d,0x0a,0x3c,0x70,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74, +0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79, +0x3a,0x20,0x54,0x69,0x6d,0x65,0x73,0x20,0x4e,0x65,0x77,0x20,0x52,0x6f,0x6d,0x61, +0x6e,0x2c,0x54,0x69,0x6d,0x65,0x73,0x2c,0x73,0x65,0x72,0x69,0x66,0x3b,0x22,0x3e, +0x20,0x53,0x6f,0x72,0x72,0x79,0x2c,0x0d,0x0a,0x74,0x68,0x65,0x20,0x70,0x61,0x67, +0x65,0x20,0x79,0x6f,0x75,0x20,0x61,0x72,0x65,0x20,0x72,0x65,0x71,0x75,0x65,0x73, +0x74,0x69,0x6e,0x67,0x20,0x77,0x61,0x73,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75, +0x6e,0x64,0x20,0x6f,0x6e,0x20,0x74,0x68,0x69,0x73,0x20,0x73,0x65,0x72,0x76,0x65, +0x72,0x2e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a, +0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x72,0x3e,0x0d,0x0a,0x3c,0x2f, +0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65,0x3e, +0x0d,0x0a,0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x3c,0x2f,0x68,0x74,0x6d,0x6c,0x3e, +}; + +const unsigned int dummy_align__index_html = 4; +const unsigned char data__index_html[] = { +/* /index.html (12 chars) */ +0x2f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x68,0x74,0x6d,0x6c,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) +" (63 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, +0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, +0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, +0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, +/* "Content-type: text/html + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, +0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x0d,0x0a, +/* raw file data (11530 bytes) */ +0x3c,0x21,0x44,0x4f,0x43,0x54,0x59,0x50,0x45,0x20,0x48,0x54,0x4d,0x4c,0x20,0x50, +0x55,0x42,0x4c,0x49,0x43,0x20,0x22,0x2d,0x2f,0x2f,0x57,0x33,0x43,0x2f,0x2f,0x44, +0x54,0x44,0x20,0x48,0x54,0x4d,0x4c,0x20,0x34,0x2e,0x30,0x31,0x20,0x54,0x72,0x61, +0x6e,0x73,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x2f,0x2f,0x45,0x4e,0x22,0x3e,0x0a, +0x3c,0x68,0x74,0x6d,0x6c,0x20,0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x76,0x3d,0x22,0x75, +0x72,0x6e,0x3a,0x73,0x63,0x68,0x65,0x6d,0x61,0x73,0x2d,0x6d,0x69,0x63,0x72,0x6f, +0x73,0x6f,0x66,0x74,0x2d,0x63,0x6f,0x6d,0x3a,0x76,0x6d,0x6c,0x22,0x20,0x78,0x6d, +0x6c,0x6e,0x73,0x3a,0x6f,0x3d,0x22,0x75,0x72,0x6e,0x3a,0x73,0x63,0x68,0x65,0x6d, +0x61,0x73,0x2d,0x6d,0x69,0x63,0x72,0x6f,0x73,0x6f,0x66,0x74,0x2d,0x63,0x6f,0x6d, +0x3a,0x6f,0x66,0x66,0x69,0x63,0x65,0x3a,0x6f,0x66,0x66,0x69,0x63,0x65,0x22,0x20, +0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x77,0x3d,0x22,0x75,0x72,0x6e,0x3a,0x73,0x63,0x68, +0x65,0x6d,0x61,0x73,0x2d,0x6d,0x69,0x63,0x72,0x6f,0x73,0x6f,0x66,0x74,0x2d,0x63, +0x6f,0x6d,0x3a,0x6f,0x66,0x66,0x69,0x63,0x65,0x3a,0x77,0x6f,0x72,0x64,0x22,0x20, +0x78,0x6d,0x6c,0x6e,0x73,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77, +0x77,0x2e,0x77,0x33,0x2e,0x6f,0x72,0x67,0x2f,0x54,0x52,0x2f,0x52,0x45,0x43,0x2d, +0x68,0x74,0x6d,0x6c,0x34,0x30,0x22,0x3e,0x3c,0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a, +0x3c,0x6d,0x65,0x74,0x61,0x20,0x68,0x74,0x74,0x70,0x2d,0x65,0x71,0x75,0x69,0x76, +0x3d,0x22,0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x54,0x79,0x70,0x65,0x22,0x20, +0x63,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x3d,0x22,0x74,0x65,0x78,0x74,0x2f,0x68,0x74, +0x6d,0x6c,0x3b,0x20,0x63,0x68,0x61,0x72,0x73,0x65,0x74,0x3d,0x69,0x73,0x6f,0x2d, +0x38,0x38,0x35,0x39,0x2d,0x31,0x22,0x3e,0x0d,0x0a,0x3c,0x6c,0x69,0x6e,0x6b,0x20, +0x72,0x65,0x6c,0x3d,0x22,0x46,0x69,0x6c,0x65,0x2d,0x4c,0x69,0x73,0x74,0x22,0x20, +0x68,0x72,0x65,0x66,0x3d,0x22,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x5f, +0x66,0x69,0x6c,0x65,0x73,0x2f,0x66,0x69,0x6c,0x65,0x6c,0x69,0x73,0x74,0x2e,0x78, +0x6d,0x6c,0x22,0x3e,0x0d,0x0a,0x3c,0x6c,0x69,0x6e,0x6b,0x20,0x72,0x65,0x6c,0x3d, +0x22,0x45,0x64,0x69,0x74,0x2d,0x54,0x69,0x6d,0x65,0x2d,0x44,0x61,0x74,0x61,0x22, +0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78, +0x5f,0x66,0x69,0x6c,0x65,0x73,0x2f,0x65,0x64,0x69,0x74,0x64,0x61,0x74,0x61,0x2e, +0x6d,0x73,0x6f,0x22,0x3e,0x3c,0x74,0x69,0x74,0x6c,0x65,0x3e,0x53,0x54,0x4d,0x33, +0x32,0x48,0x37,0x78,0x78,0x3c,0x2f,0x74,0x69,0x74,0x6c,0x65,0x3e,0x3c,0x2f,0x68, +0x65,0x61,0x64,0x3e,0x0d,0x0a,0x3c,0x62,0x6f,0x64,0x79,0x20,0x73,0x74,0x79,0x6c, +0x65,0x3d,0x22,0x22,0x20,0x6c,0x61,0x6e,0x67,0x3d,0x22,0x45,0x4e,0x2d,0x55,0x53, +0x22,0x20,0x6c,0x69,0x6e,0x6b,0x3d,0x22,0x62,0x6c,0x75,0x65,0x22,0x20,0x76,0x6c, +0x69,0x6e,0x6b,0x3d,0x22,0x62,0x6c,0x75,0x65,0x22,0x3e,0x0d,0x0a,0x3c,0x64,0x69, +0x76,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x53,0x65,0x63,0x74,0x69,0x6f,0x6e, +0x31,0x22,0x3e,0x0d,0x0a,0x3c,0x64,0x69,0x76,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d, +0x22,0x6d,0x61,0x72,0x67,0x69,0x6e,0x2d,0x6c,0x65,0x66,0x74,0x3a,0x20,0x33,0x30, +0x70,0x74,0x3b,0x22,0x3e,0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d, +0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x22,0x20,0x73,0x74,0x79,0x6c, +0x65,0x3d,0x22,0x74,0x65,0x78,0x74,0x2d,0x61,0x6c,0x69,0x67,0x6e,0x3a,0x20,0x63, +0x65,0x6e,0x74,0x65,0x72,0x3b,0x22,0x20,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x63, +0x65,0x6e,0x74,0x65,0x72,0x22,0x3e,0x3c,0x69,0x6d,0x67,0x20,0x61,0x6c,0x74,0x3d, +0x22,0x22,0x20,0x69,0x64,0x3d,0x22,0x5f,0x78,0x30,0x30,0x30,0x30,0x5f,0x69,0x31, +0x30,0x32,0x35,0x22,0x20,0x73,0x72,0x63,0x3d,0x22,0x53,0x54,0x4d,0x33,0x32,0x48, +0x37,0x78,0x78,0x5f,0x66,0x69,0x6c,0x65,0x73,0x2f,0x53,0x54,0x2e,0x67,0x69,0x66, +0x22,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x62,0x6f,0x72,0x64,0x65,0x72,0x3a, +0x20,0x30,0x70,0x78,0x20,0x73,0x6f,0x6c,0x69,0x64,0x20,0x3b,0x20,0x68,0x65,0x69, +0x67,0x68,0x74,0x3a,0x20,0x35,0x38,0x70,0x78,0x3b,0x20,0x77,0x69,0x64,0x74,0x68, +0x3a,0x20,0x37,0x36,0x36,0x70,0x78,0x3b,0x22,0x3e,0x3c,0x62,0x3e,0x3c,0x69,0x3e, +0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e, +0x74,0x2d,0x73,0x69,0x7a,0x65,0x3a,0x20,0x32,0x34,0x70,0x74,0x3b,0x22,0x3e,0x3c, +0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x73,0x74,0x72,0x6f,0x6e,0x67,0x3e,0x53,0x54,0x4d, +0x33,0x32,0x48,0x37,0x78,0x78,0x20,0x57,0x65,0x62,0x73,0x65,0x72,0x76,0x65,0x72, +0x20,0x44,0x65,0x6d,0x6f,0x3c,0x2f,0x73,0x74,0x72,0x6f,0x6e,0x67,0x3e,0x3c,0x2f, +0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x69,0x3e,0x3c,0x2f,0x62,0x3e,0x3c,0x73,0x70, +0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x73, +0x69,0x7a,0x65,0x3a,0x20,0x31,0x33,0x2e,0x35,0x70,0x74,0x3b,0x22,0x3e,0x20,0x3c, +0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x62,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73, +0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x73,0x69,0x7a,0x65,0x3a, +0x20,0x31,0x38,0x70,0x74,0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69, +0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x20,0x63,0x6f,0x6c, +0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x35,0x31,0x2c,0x20,0x35,0x31,0x2c,0x20, +0x32,0x35,0x35,0x29,0x3b,0x22,0x3e,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x42,0x61,0x73, +0x65,0x64,0x20,0x6f,0x6e,0x20,0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x20,0x54, +0x43,0x50,0x2f,0x49,0x50,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x3c,0x2f,0x73,0x70, +0x61,0x6e,0x3e,0x3c,0x2f,0x62,0x3e,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x64,0x69, +0x76,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d, +0x61,0x6c,0x22,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x74,0x65,0x78,0x74,0x2d, +0x61,0x6c,0x69,0x67,0x6e,0x3a,0x20,0x63,0x65,0x6e,0x74,0x65,0x72,0x3b,0x22,0x20, +0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x63,0x65,0x6e,0x74,0x65,0x72,0x22,0x3e,0x0d, +0x0a,0x3c,0x68,0x72,0x20,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x63,0x65,0x6e,0x74, +0x65,0x72,0x22,0x20,0x73,0x69,0x7a,0x65,0x3d,0x22,0x32,0x22,0x20,0x77,0x69,0x64, +0x74,0x68,0x3d,0x22,0x31,0x30,0x30,0x25,0x22,0x3e,0x3c,0x2f,0x64,0x69,0x76,0x3e, +0x0d,0x0a,0x3c,0x64,0x69,0x76,0x20,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x63,0x65, +0x6e,0x74,0x65,0x72,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x63, +0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x54, +0x61,0x62,0x6c,0x65,0x22,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x77,0x69,0x64, +0x74,0x68,0x3a,0x20,0x37,0x32,0x30,0x2e,0x37,0x35,0x70,0x74,0x3b,0x22,0x20,0x62, +0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x31,0x22,0x20,0x63,0x65,0x6c,0x6c,0x70,0x61, +0x64,0x64,0x69,0x6e,0x67,0x3d,0x22,0x30,0x22,0x20,0x77,0x69,0x64,0x74,0x68,0x3d, +0x22,0x39,0x36,0x31,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d, +0x0a,0x3c,0x74,0x72,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x22,0x3e,0x0d,0x0a, +0x3c,0x74,0x64,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x70,0x61,0x64,0x64,0x69, +0x6e,0x67,0x3a,0x20,0x31,0x2e,0x35,0x70,0x74,0x3b,0x20,0x62,0x61,0x63,0x6b,0x67, +0x72,0x6f,0x75,0x6e,0x64,0x3a,0x20,0x72,0x67,0x62,0x28,0x35,0x31,0x2c,0x20,0x35, +0x31,0x2c,0x20,0x32,0x35,0x35,0x29,0x20,0x6e,0x6f,0x6e,0x65,0x20,0x72,0x65,0x70, +0x65,0x61,0x74,0x20,0x73,0x63,0x72,0x6f,0x6c,0x6c,0x20,0x30,0x25,0x20,0x35,0x30, +0x25,0x3b,0x20,0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75, +0x6e,0x64,0x2d,0x63,0x6c,0x69,0x70,0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c, +0x3b,0x20,0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e, +0x64,0x2d,0x6f,0x72,0x69,0x67,0x69,0x6e,0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61, +0x6c,0x3b,0x20,0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75, +0x6e,0x64,0x2d,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x2d,0x70,0x6f,0x6c,0x69,0x63,0x79, +0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x3b,0x20,0x74,0x65,0x78,0x74,0x2d, +0x61,0x6c,0x69,0x67,0x6e,0x3a,0x20,0x63,0x65,0x6e,0x74,0x65,0x72,0x3b,0x22,0x3e, +0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e, +0x6f,0x72,0x6d,0x61,0x6c,0x22,0x3e,0x3c,0x62,0x3e,0x3c,0x69,0x3e,0x3c,0x73,0x70, +0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x73, +0x69,0x7a,0x65,0x3a,0x20,0x31,0x30,0x70,0x74,0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d, +0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b, +0x22,0x3e,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x2f,0x69,0x6e,0x64,0x65, +0x78,0x2e,0x68,0x74,0x6d,0x6c,0x22,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74, +0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77,0x68,0x69,0x74, +0x65,0x3b,0x22,0x3e,0x48,0x6f,0x6d,0x65,0x0d,0x0a,0x70,0x61,0x67,0x65,0x3c,0x2f, +0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x61,0x3e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e, +0x3c,0x2f,0x69,0x3e,0x3c,0x2f,0x62,0x3e,0x3c,0x62,0x3e,0x3c,0x69,0x3e,0x3c,0x73, +0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d, +0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b, +0x22,0x3e,0x3c,0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x73, +0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x69,0x3e,0x3c,0x2f,0x62,0x3e,0x3c,0x2f,0x70,0x3e, +0x0d,0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3a,0x20,0x31,0x2e,0x35, +0x70,0x74,0x3b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x3a,0x20, +0x72,0x67,0x62,0x28,0x35,0x31,0x2c,0x20,0x35,0x31,0x2c,0x20,0x32,0x35,0x35,0x29, +0x20,0x6e,0x6f,0x6e,0x65,0x20,0x72,0x65,0x70,0x65,0x61,0x74,0x20,0x73,0x63,0x72, +0x6f,0x6c,0x6c,0x20,0x30,0x25,0x20,0x35,0x30,0x25,0x3b,0x20,0x2d,0x6d,0x6f,0x7a, +0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x63,0x6c,0x69,0x70, +0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x3b,0x20,0x2d,0x6d,0x6f,0x7a,0x2d, +0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x6f,0x72,0x69,0x67,0x69, +0x6e,0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x3b,0x20,0x2d,0x6d,0x6f,0x7a, +0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x69,0x6e,0x6c,0x69, +0x6e,0x65,0x2d,0x70,0x6f,0x6c,0x69,0x63,0x79,0x3a,0x20,0x69,0x6e,0x69,0x74,0x69, +0x61,0x6c,0x3b,0x20,0x74,0x65,0x78,0x74,0x2d,0x61,0x6c,0x69,0x67,0x6e,0x3a,0x20, +0x63,0x65,0x6e,0x74,0x65,0x72,0x3b,0x22,0x3e,0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c, +0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x22,0x3e, +0x3c,0x62,0x3e,0x3c,0x69,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c, +0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x73,0x69,0x7a,0x65,0x3a,0x20,0x31,0x30, +0x70,0x74,0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a, +0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x3c,0x61,0x20,0x68,0x72, +0x65,0x66,0x3d,0x22,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x4c,0x45,0x44, +0x2e,0x68,0x74,0x6d,0x6c,0x22,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77,0x68,0x69,0x74,0x65, +0x3b,0x22,0x3e,0x26,0x6e,0x62,0x73,0x70,0x3b,0x4c,0x65,0x64,0x0d,0x0a,0x63,0x6f, +0x6e,0x74,0x72,0x6f,0x6c,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x61,0x3e, +0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x69,0x3e,0x3c,0x2f,0x62,0x3e,0x3c, +0x62,0x3e,0x3c,0x69,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65, +0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56, +0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x3c,0x6f,0x3a,0x70,0x3e,0x3c,0x2f, +0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x69,0x3e,0x3c, +0x2f,0x62,0x3e,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a, +0x3c,0x74,0x64,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x70,0x61,0x64,0x64,0x69, +0x6e,0x67,0x3a,0x20,0x31,0x2e,0x35,0x70,0x74,0x3b,0x20,0x62,0x61,0x63,0x6b,0x67, +0x72,0x6f,0x75,0x6e,0x64,0x3a,0x20,0x72,0x67,0x62,0x28,0x35,0x31,0x2c,0x20,0x35, +0x31,0x2c,0x20,0x32,0x35,0x35,0x29,0x20,0x6e,0x6f,0x6e,0x65,0x20,0x72,0x65,0x70, +0x65,0x61,0x74,0x20,0x73,0x63,0x72,0x6f,0x6c,0x6c,0x20,0x30,0x25,0x20,0x35,0x30, +0x25,0x3b,0x20,0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75, +0x6e,0x64,0x2d,0x63,0x6c,0x69,0x70,0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c, +0x3b,0x20,0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e, +0x64,0x2d,0x6f,0x72,0x69,0x67,0x69,0x6e,0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61, +0x6c,0x3b,0x20,0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75, +0x6e,0x64,0x2d,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x2d,0x70,0x6f,0x6c,0x69,0x63,0x79, +0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x3b,0x20,0x74,0x65,0x78,0x74,0x2d, +0x61,0x6c,0x69,0x67,0x6e,0x3a,0x20,0x63,0x65,0x6e,0x74,0x65,0x72,0x3b,0x22,0x3e, +0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e, +0x6f,0x72,0x6d,0x61,0x6c,0x22,0x3e,0x3c,0x62,0x3e,0x3c,0x69,0x3e,0x3c,0x73,0x70, +0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x73, +0x69,0x7a,0x65,0x3a,0x20,0x31,0x30,0x70,0x74,0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d, +0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b, +0x22,0x3e,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x53,0x54,0x4d,0x33,0x32, +0x48,0x37,0x78,0x78,0x41,0x44,0x43,0x2e,0x73,0x68,0x74,0x6d,0x6c,0x22,0x3e,0x3c, +0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f, +0x72,0x3a,0x20,0x77,0x68,0x69,0x74,0x65,0x3b,0x22,0x3e,0x41,0x44,0x43,0x0d,0x0a, +0x73,0x74,0x61,0x74,0x75,0x73,0x20,0x62,0x61,0x72,0x3c,0x2f,0x73,0x70,0x61,0x6e, +0x3e,0x3c,0x2f,0x61,0x3e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x69,0x3e, +0x3c,0x2f,0x62,0x3e,0x3c,0x62,0x3e,0x3c,0x69,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20, +0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69, +0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x3c,0x6f, +0x3a,0x70,0x3e,0x3c,0x2f,0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e, +0x3c,0x2f,0x69,0x3e,0x3c,0x2f,0x62,0x3e,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x2f, +0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x72,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x62, +0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65,0x3e,0x0d,0x0a, +0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0d,0x0a,0x3c,0x64,0x69,0x76,0x20,0x61,0x6c,0x69, +0x67,0x6e,0x3d,0x22,0x63,0x65,0x6e,0x74,0x65,0x72,0x22,0x3e,0x0d,0x0a,0x3c,0x74, +0x61,0x62,0x6c,0x65,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e, +0x6f,0x72,0x6d,0x61,0x6c,0x54,0x61,0x62,0x6c,0x65,0x22,0x20,0x73,0x74,0x79,0x6c, +0x65,0x3d,0x22,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x3a,0x20,0x77, +0x68,0x69,0x74,0x65,0x20,0x6e,0x6f,0x6e,0x65,0x20,0x72,0x65,0x70,0x65,0x61,0x74, +0x20,0x73,0x63,0x72,0x6f,0x6c,0x6c,0x20,0x30,0x25,0x20,0x35,0x30,0x25,0x3b,0x20, +0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d, +0x63,0x6c,0x69,0x70,0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x3b,0x20,0x2d, +0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x6f, +0x72,0x69,0x67,0x69,0x6e,0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x3b,0x20, +0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d, +0x69,0x6e,0x6c,0x69,0x6e,0x65,0x2d,0x70,0x6f,0x6c,0x69,0x63,0x79,0x3a,0x20,0x69, +0x6e,0x69,0x74,0x69,0x61,0x6c,0x3b,0x20,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x35, +0x37,0x34,0x2e,0x35,0x70,0x74,0x3b,0x22,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d, +0x22,0x30,0x22,0x20,0x63,0x65,0x6c,0x6c,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3d, +0x22,0x30,0x22,0x20,0x63,0x65,0x6c,0x6c,0x73,0x70,0x61,0x63,0x69,0x6e,0x67,0x3d, +0x22,0x30,0x22,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x37,0x36,0x36,0x22,0x3e, +0x0d,0x0a,0x3c,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x74,0x72,0x20,0x73, +0x74,0x79,0x6c,0x65,0x3d,0x22,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x73,0x74, +0x79,0x6c,0x65,0x3d,0x22,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3a,0x20,0x30,0x63, +0x6d,0x3b,0x22,0x20,0x76,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22, +0x3e,0x0d,0x0a,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d, +0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x54,0x61,0x62,0x6c,0x65,0x22, +0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x31, +0x30,0x30,0x25,0x3b,0x22,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x30,0x22, +0x20,0x63,0x65,0x6c,0x6c,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3d,0x22,0x30,0x22, +0x20,0x63,0x65,0x6c,0x6c,0x73,0x70,0x61,0x63,0x69,0x6e,0x67,0x3d,0x22,0x30,0x22, +0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x31,0x30,0x30,0x25,0x22,0x3e,0x0d,0x0a, +0x3c,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x74,0x72,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x73,0x74,0x79,0x6c, +0x65,0x3d,0x22,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3a,0x20,0x32,0x2e,0x32,0x35, +0x70,0x74,0x3b,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x73,0x74, +0x79,0x6c,0x65,0x3d,0x22,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x39,0x34,0x33,0x70, +0x78,0x3b,0x20,0x68,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x31,0x39,0x36,0x70,0x78, +0x3b,0x22,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x30,0x22,0x20,0x63,0x65, +0x6c,0x6c,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3d,0x22,0x33,0x22,0x20,0x63,0x65, +0x6c,0x6c,0x73,0x70,0x61,0x63,0x69,0x6e,0x67,0x3d,0x22,0x30,0x22,0x3e,0x0d,0x0a, +0x3c,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x74,0x72,0x3e,0x0d,0x0a,0x3c, +0x74,0x64,0x20,0x76,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22,0x20, +0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x37,0x32,0x25,0x22,0x3e,0x0d,0x0a,0x3c,0x68, +0x31,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63, +0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x35,0x31,0x2c,0x20,0x35,0x31, +0x2c,0x20,0x32,0x35,0x35,0x29,0x3b,0x22,0x3e,0x53,0x54,0x4d,0x33,0x32,0x48,0x37, +0x0d,0x0a,0x53,0x65,0x72,0x69,0x65,0x73,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c, +0x2f,0x68,0x31,0x3e,0x0d,0x0a,0x3c,0x70,0x3e,0x54,0x68,0x65,0x20,0x53,0x54,0x4d, +0x33,0x32,0x48,0x37,0x78,0x78,0x20,0x64,0x65,0x76,0x69,0x63,0x65,0x73,0x20,0x61, +0x72,0x65,0x20,0x62,0x61,0x73,0x65,0x64,0x20,0x6f,0x6e,0x20,0x74,0x68,0x65,0x20, +0x68,0x69,0x67,0x68,0x0d,0x0a,0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63, +0x65,0x20,0x41,0x52,0x4d,0xae,0x20,0x43,0x6f,0x72,0x74,0x65,0x78,0xae,0x2d,0x4d, +0x37,0x20,0x33,0x32,0x2d,0x62,0x69,0x74,0x20,0x52,0x49,0x53,0x43,0x20,0x63,0x6f, +0x72,0x65,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x69,0x6e,0x67,0x20,0x75,0x70,0x20, +0x74,0x6f,0x20,0x34,0x30,0x30,0x20,0x4d,0x48,0x7a,0x0d,0x0a,0x66,0x72,0x65,0x71, +0x75,0x65,0x6e,0x63,0x79,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c, +0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x22,0x3e, +0x54,0x61,0x6b,0x69,0x6e,0x67,0x26,0x6e,0x62,0x73,0x70,0x3b,0x61,0x64,0x76,0x61, +0x6e,0x74,0x61,0x67,0x65,0x0d,0x0a,0x6f,0x66,0x20,0x61,0x6e,0x20,0x4c,0x31,0x20, +0x63,0x61,0x63,0x68,0x65,0x2c,0x20,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x20,0x64, +0x65,0x76,0x69,0x63,0x65,0x73,0x20,0x64,0x65,0x6c,0x69,0x76,0x65,0x72,0x20,0x74, +0x68,0x65,0x20,0x6d,0x61,0x78,0x69,0x6d,0x75,0x6d,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x0d,0x0a,0x74,0x68,0x65,0x6f,0x72,0x65,0x74,0x69,0x63,0x61,0x6c,0x20,0x70,0x65, +0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65,0x20,0x6f,0x66,0x20,0x74,0x68,0x65, +0x20,0x43,0x6f,0x72,0x74,0x65,0x78,0x2d,0x4d,0x37,0x20,0x63,0x6f,0x72,0x65,0x2c, +0x20,0x72,0x65,0x67,0x61,0x72,0x64,0x6c,0x65,0x73,0x73,0x20,0x69,0x66,0x20,0x63, +0x6f,0x64,0x65,0x20,0x69,0x73,0x0d,0x0a,0x65,0x78,0x65,0x63,0x75,0x74,0x65,0x64, +0x20,0x66,0x72,0x6f,0x6d,0x20,0x65,0x6d,0x62,0x65,0x64,0x64,0x65,0x64,0x20,0x46, +0x6c,0x61,0x73,0x68,0x20,0x6f,0x72,0x20,0x65,0x78,0x74,0x65,0x72,0x6e,0x61,0x6c, +0x20,0x6d,0x65,0x6d,0x6f,0x72,0x79,0x3a,0x20,0x32,0x30,0x31,0x30,0x20,0x43,0x6f, +0x72,0x65,0x4d,0x61,0x72,0x6b,0x20,0x2f,0x38,0x35,0x36,0x0d,0x0a,0x44,0x4d,0x49, +0x50,0x53,0x20,0x61,0x74,0x20,0x34,0x30,0x30,0x20,0x4d,0x48,0x7a,0x20,0x46,0x63, +0x70,0x75,0x3c,0x62,0x69,0x67,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x33, +0x34,0x2c,0x20,0x33,0x34,0x2c,0x20,0x33,0x34,0x29,0x3b,0x20,0x66,0x6f,0x6e,0x74, +0x2d,0x73,0x69,0x7a,0x65,0x3a,0x20,0x31,0x34,0x70,0x78,0x3b,0x20,0x66,0x6f,0x6e, +0x74,0x2d,0x73,0x74,0x79,0x6c,0x65,0x3a,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b, +0x20,0x66,0x6f,0x6e,0x74,0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x6e,0x6f, +0x72,0x6d,0x61,0x6c,0x3b,0x20,0x6c,0x65,0x74,0x74,0x65,0x72,0x2d,0x73,0x70,0x61, +0x63,0x69,0x6e,0x67,0x3a,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x20,0x6f,0x72, +0x70,0x68,0x61,0x6e,0x73,0x3a,0x20,0x32,0x3b,0x20,0x74,0x65,0x78,0x74,0x2d,0x61, +0x6c,0x69,0x67,0x6e,0x3a,0x20,0x73,0x74,0x61,0x72,0x74,0x3b,0x20,0x74,0x65,0x78, +0x74,0x2d,0x69,0x6e,0x64,0x65,0x6e,0x74,0x3a,0x20,0x30,0x70,0x78,0x3b,0x20,0x74, +0x65,0x78,0x74,0x2d,0x74,0x72,0x61,0x6e,0x73,0x66,0x6f,0x72,0x6d,0x3a,0x20,0x6e, +0x6f,0x6e,0x65,0x3b,0x20,0x77,0x68,0x69,0x74,0x65,0x2d,0x73,0x70,0x61,0x63,0x65, +0x3a,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x20,0x77,0x69,0x64,0x6f,0x77,0x73, +0x3a,0x20,0x32,0x3b,0x20,0x77,0x6f,0x72,0x64,0x2d,0x73,0x70,0x61,0x63,0x69,0x6e, +0x67,0x3a,0x20,0x30,0x70,0x78,0x3b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75, +0x6e,0x64,0x2d,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x32,0x35, +0x35,0x2c,0x20,0x32,0x35,0x35,0x2c,0x20,0x32,0x35,0x35,0x29,0x3b,0x20,0x64,0x69, +0x73,0x70,0x6c,0x61,0x79,0x3a,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x21,0x20, +0x69,0x6d,0x70,0x6f,0x72,0x74,0x61,0x6e,0x74,0x3b,0x20,0x66,0x6c,0x6f,0x61,0x74, +0x3a,0x20,0x6e,0x6f,0x6e,0x65,0x3b,0x22,0x3e,0x2e,0x3c,0x2f,0x73,0x70,0x61,0x6e, +0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x73,0x69,0x7a,0x65,0x3a,0x20,0x31, +0x30,0x70,0x74,0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79, +0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x3c,0x62,0x72,0x3e, +0x0d,0x0a,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c, +0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x77,0x69,0x64,0x74,0x68,0x3d, +0x22,0x32,0x25,0x22,0x3e,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20, +0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x72,0x69,0x67,0x68,0x74,0x22,0x20,0x76,0x61, +0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22,0x20,0x77,0x69,0x64,0x74,0x68, +0x3d,0x22,0x32,0x36,0x25,0x22,0x3e,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x62,0x72, +0x3e,0x0d,0x0a,0x3c,0x69,0x6d,0x67,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x68, +0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x31,0x38,0x30,0x70,0x78,0x3b,0x20,0x77,0x69, +0x64,0x74,0x68,0x3a,0x20,0x34,0x30,0x30,0x70,0x78,0x3b,0x22,0x20,0x61,0x6c,0x74, +0x3d,0x22,0x22,0x20,0x73,0x72,0x63,0x3d,0x22,0x53,0x54,0x4d,0x33,0x32,0x48,0x37, +0x78,0x78,0x5f,0x66,0x69,0x6c,0x65,0x73,0x2f,0x73,0x74,0x6d,0x33,0x32,0x2e,0x6a, +0x70,0x67,0x22,0x3e,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x72,0x3e, +0x0d,0x0a,0x3c,0x2f,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x61, +0x62,0x6c,0x65,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74, +0x72,0x3e,0x0d,0x0a,0x3c,0x74,0x72,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x22, +0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x70,0x61, +0x64,0x64,0x69,0x6e,0x67,0x3a,0x20,0x32,0x2e,0x32,0x35,0x70,0x74,0x3b,0x22,0x3e, +0x0d,0x0a,0x54,0x68,0x65,0x20,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x20,0x73,0x65, +0x72,0x69,0x65,0x73,0x20,0x75,0x6e,0x6c,0x65,0x61,0x73,0x68,0x65,0x73,0x20,0x74, +0x68,0x65,0x20,0x43,0x6f,0x72,0x74,0x65,0x78,0x2d,0x4d,0x37,0x20,0x63,0x6f,0x72, +0x65,0x3a,0x0d,0x0a,0x3c,0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x6c,0x69,0x3e,0x41,0x58, +0x49,0x20,0x61,0x6e,0x64,0x20,0x6d,0x75,0x6c,0x74,0x69,0x2d,0x41,0x48,0x42,0x20, +0x62,0x75,0x73,0x20,0x6d,0x61,0x74,0x72,0x69,0x78,0x65,0x73,0x20,0x66,0x6f,0x72, +0x0d,0x0a,0x69,0x6e,0x74,0x65,0x72,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x69,0x6e, +0x67,0x20,0x63,0x6f,0x72,0x65,0x2c,0x20,0x70,0x65,0x72,0x69,0x70,0x68,0x65,0x72, +0x61,0x6c,0x73,0x20,0x61,0x6e,0x64,0x20,0x6d,0x65,0x6d,0x6f,0x72,0x69,0x65,0x73, +0x3c,0x2f,0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x2f,0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x75, +0x6c,0x3e,0x0d,0x0a,0x3c,0x6c,0x69,0x3e,0x31,0x36,0x20,0x4b,0x62,0x79,0x74,0x65, +0x73,0x20,0x2b,0x31,0x36,0x20,0x4b,0x62,0x79,0x74,0x65,0x73,0x20,0x6f,0x66,0x20, +0x49,0x2d,0x63,0x61,0x63,0x68,0x65,0x20,0x61,0x6e,0x64,0x20,0x44,0x2d,0x63,0x61, +0x63,0x68,0x65,0x0d,0x0a,0x3c,0x2f,0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x2f,0x75,0x6c, +0x3e,0x0d,0x0a,0x3c,0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x6c,0x69,0x3e,0x55,0x70,0x20, +0x74,0x6f,0x20,0x32,0x20,0x4d,0x62,0x79,0x74,0x65,0x73,0x20,0x6f,0x66,0x20,0x65, +0x6d,0x62,0x65,0x64,0x64,0x65,0x64,0x20,0x64,0x75,0x61,0x6c,0x2d,0x62,0x61,0x6e, +0x6b,0x20,0x46,0x6c,0x61,0x73,0x68,0x0d,0x0a,0x6d,0x65,0x6d,0x6f,0x72,0x79,0x2c, +0x20,0x77,0x69,0x74,0x68,0x20,0x45,0x43,0x43,0x20,0x61,0x6e,0x64,0x20,0x52,0x65, +0x61,0x64,0x2d,0x57,0x68,0x69,0x6c,0x65,0x2d,0x57,0x72,0x69,0x74,0x65,0x20,0x63, +0x61,0x70,0x61,0x62,0x69,0x6c,0x69,0x74,0x79,0x3c,0x2f,0x6c,0x69,0x3e,0x0d,0x0a, +0x3c,0x2f,0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x6c,0x69, +0x3e,0x41,0x20,0x68,0x69,0x67,0x68,0x2d,0x73,0x70,0x65,0x65,0x64,0x20,0x6d,0x61, +0x73,0x74,0x65,0x72,0x20,0x64,0x69,0x72,0x65,0x63,0x74,0x20,0x6d,0x65,0x6d,0x6f, +0x72,0x79,0x20,0x61,0x63,0x63,0x65,0x73,0x73,0x20,0x28,0x4d,0x44,0x4d,0x41,0x29, +0x0d,0x0a,0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x6c,0x65,0x72,0x2c,0x20,0x74,0x77, +0x6f,0x20,0x64,0x75,0x61,0x6c,0x2d,0x70,0x6f,0x72,0x74,0x20,0x44,0x4d,0x41,0x73, +0x20,0x77,0x69,0x74,0x68,0x20,0x46,0x49,0x46,0x4f,0x20,0x61,0x6e,0x64,0x20,0x72, +0x65,0x71,0x75,0x65,0x73,0x74,0x20,0x72,0x6f,0x75,0x74,0x65,0x72,0x0d,0x0a,0x63, +0x61,0x70,0x61,0x62,0x69,0x6c,0x69,0x74,0x69,0x65,0x73,0x20,0x66,0x6f,0x72,0x20, +0x6f,0x70,0x74,0x69,0x6d,0x61,0x6c,0x20,0x70,0x65,0x72,0x69,0x70,0x68,0x65,0x72, +0x61,0x6c,0x20,0x6d,0x61,0x6e,0x61,0x67,0x65,0x6d,0x65,0x6e,0x74,0x2c,0x20,0x61, +0x6e,0x64,0x20,0x6f,0x6e,0x65,0x20,0x61,0x64,0x64,0x69,0x74,0x69,0x6f,0x6e,0x61, +0x6c,0x20,0x44,0x4d,0x41,0x3c,0x2f,0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x2f,0x75,0x6c, +0x3e,0x0d,0x0a,0x3c,0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x6c,0x69,0x3e,0x43,0x68,0x72, +0x6f,0x6d,0x2d,0x41,0x52,0x54,0x20,0x61,0x63,0x63,0x65,0x6c,0x65,0x72,0x61,0x74, +0x69,0x6f,0x6e,0x20,0x66,0x6f,0x72,0x20,0x65,0x66,0x66,0x69,0x63,0x69,0x65,0x6e, +0x74,0x20,0x32,0x44,0x20,0x69,0x6d,0x61,0x67,0x65,0x0d,0x0a,0x63,0x6f,0x70,0x79, +0x20,0x61,0x6e,0x64,0x20,0x64,0x6f,0x75,0x62,0x6c,0x65,0x2d,0x70,0x72,0x65,0x63, +0x69,0x73,0x69,0x6f,0x6e,0x20,0x46,0x50,0x55,0x20,0x61,0x72,0x65,0x20,0x61,0x6c, +0x73,0x6f,0x20,0x70,0x61,0x72,0x74,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x61, +0x63,0x63,0x65,0x6c,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e,0x0d,0x0a,0x66,0x65,0x61, +0x74,0x75,0x72,0x65,0x73,0x20,0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,0x20, +0x69,0x6e,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x76,0x69,0x63,0x65,0x3c,0x2f,0x6c, +0x69,0x3e,0x0d,0x0a,0x3c,0x2f,0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x75,0x6c,0x3e,0x0d, +0x0a,0x3c,0x6c,0x69,0x3e,0x50,0x65,0x72,0x69,0x70,0x68,0x65,0x72,0x61,0x6c,0x20, +0x73,0x70,0x65,0x65,0x64,0x20,0x69,0x6e,0x64,0x65,0x70,0x65,0x6e,0x64,0x65,0x6e, +0x74,0x20,0x66,0x72,0x6f,0x6d,0x20,0x43,0x50,0x55,0x20,0x73,0x70,0x65,0x65,0x64, +0x0d,0x0a,0x28,0x64,0x75,0x61,0x6c,0x2d,0x63,0x6c,0x6f,0x63,0x6b,0x20,0x73,0x75, +0x70,0x70,0x6f,0x72,0x74,0x29,0x20,0x61,0x6c,0x6c,0x6f,0x77,0x69,0x6e,0x67,0x20, +0x73,0x79,0x73,0x74,0x65,0x6d,0x20,0x63,0x6c,0x6f,0x63,0x6b,0x20,0x63,0x68,0x61, +0x6e,0x67,0x65,0x73,0x20,0x77,0x69,0x74,0x68,0x6f,0x75,0x74,0x20,0x61,0x6e,0x79, +0x20,0x69,0x6d,0x70,0x61,0x63,0x74,0x0d,0x0a,0x6f,0x6e,0x20,0x70,0x65,0x72,0x69, +0x70,0x68,0x65,0x72,0x61,0x6c,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e, +0x73,0x3c,0x2f,0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x2f,0x75,0x6c,0x3e,0x0d,0x0a,0x3c, +0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x6c,0x69,0x3e,0x45,0x76,0x65,0x6e,0x20,0x6d,0x6f, +0x72,0x65,0x20,0x70,0x65,0x72,0x69,0x70,0x68,0x65,0x72,0x61,0x6c,0x73,0x2c,0x20, +0x73,0x75,0x63,0x68,0x20,0x61,0x73,0x20,0x66,0x6f,0x75,0x72,0x20,0x73,0x65,0x72, +0x69,0x61,0x6c,0x0d,0x0a,0x61,0x75,0x64,0x69,0x6f,0x20,0x69,0x6e,0x74,0x65,0x72, +0x66,0x61,0x63,0x65,0x73,0x20,0x28,0x53,0x41,0x49,0x29,0x20,0x77,0x69,0x74,0x68, +0x20,0x53,0x50,0x44,0x49,0x46,0x20,0x6f,0x75,0x74,0x70,0x75,0x74,0x20,0x73,0x75, +0x70,0x70,0x6f,0x72,0x74,0x2c,0x20,0x74,0x68,0x72,0x65,0x65,0x20,0x66,0x75,0x6c, +0x6c,0x2d,0x64,0x75,0x70,0x6c,0x65,0x78,0x20,0x49,0xb2,0x53,0x0d,0x0a,0x69,0x6e, +0x74,0x65,0x72,0x66,0x61,0x63,0x65,0x73,0x2c,0x20,0x61,0x20,0x53,0x50,0x44,0x49, +0x46,0x20,0x69,0x6e,0x70,0x75,0x74,0x20,0x69,0x6e,0x74,0x65,0x72,0x66,0x61,0x63, +0x65,0x20,0x73,0x75,0x70,0x70,0x6f,0x72,0x74,0x69,0x6e,0x67,0x20,0x66,0x6f,0x75, +0x72,0x20,0x69,0x6e,0x70,0x75,0x74,0x73,0x2c,0x20,0x74,0x77,0x6f,0x20,0x55,0x53, +0x42,0x20,0x4f,0x54,0x47,0x0d,0x0a,0x77,0x69,0x74,0x68,0x20,0x64,0x65,0x64,0x69, +0x63,0x61,0x74,0x65,0x64,0x20,0x70,0x6f,0x77,0x65,0x72,0x20,0x73,0x75,0x70,0x70, +0x6c,0x79,0x20,0x61,0x6e,0x64,0x20,0x44,0x75,0x61,0x6c,0x2d,0x6d,0x6f,0x64,0x65, +0x20,0x51,0x75,0x61,0x64,0x2d,0x53,0x50,0x49,0x20,0x69,0x6e,0x74,0x65,0x72,0x66, +0x61,0x63,0x65,0x2c,0x20,0x74,0x77,0x6f,0x0d,0x0a,0x46,0x44,0x2d,0x43,0x41,0x4e, +0x20,0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x6c,0x65,0x72,0x73,0x2c,0x20,0x61,0x20, +0x68,0x69,0x67,0x68,0x2d,0x72,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,0x6e,0x20, +0x74,0x69,0x6d,0x65,0x72,0x2c,0x20,0x61,0x20,0x54,0x46,0x54,0x2d,0x4c,0x43,0x44, +0x20,0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x6c,0x65,0x72,0x2c,0x20,0x61,0x0d,0x0a, +0x4a,0x50,0x45,0x47,0x20,0x63,0x6f,0x64,0x65,0x63,0x2c,0x20,0x74,0x77,0x6f,0x20, +0x53,0x44,0x49,0x4f,0x20,0x69,0x6e,0x74,0x65,0x72,0x66,0x61,0x63,0x65,0x73,0x20, +0x61,0x6e,0x64,0x20,0x6d,0x61,0x6e,0x79,0x20,0x6f,0x74,0x68,0x65,0x72,0x20,0x61, +0x6e,0x61,0x6c,0x6f,0x67,0x20,0x70,0x65,0x72,0x69,0x70,0x68,0x65,0x72,0x61,0x6c, +0x73,0x0d,0x0a,0x69,0x6e,0x63,0x6c,0x75,0x64,0x69,0x6e,0x67,0x20,0x74,0x68,0x72, +0x65,0x65,0x20,0x66,0x61,0x73,0x74,0x20,0x31,0x34,0x2d,0x62,0x69,0x74,0x20,0x41, +0x44,0x43,0x73,0x2c,0x20,0x74,0x77,0x6f,0x20,0x63,0x6f,0x6d,0x70,0x61,0x72,0x61, +0x74,0x6f,0x72,0x73,0x20,0x61,0x6e,0x64,0x20,0x74,0x77,0x6f,0x20,0x6f,0x70,0x65, +0x72,0x61,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x0d,0x0a,0x61,0x6d,0x70,0x6c,0x69,0x66, +0x69,0x65,0x72,0x73,0x2e,0x3c,0x2f,0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x6c,0x69,0x3e, +0x31,0x20,0x4d,0x62,0x79,0x74,0x65,0x20,0x6f,0x66,0x20,0x53,0x52,0x41,0x4d,0x20, +0x77,0x69,0x74,0x68,0x20,0x61,0x20,0x73,0x63,0x61,0x74,0x74,0x65,0x72,0x65,0x64, +0x20,0x61,0x72,0x63,0x68,0x69,0x74,0x65,0x63,0x74,0x75,0x72,0x65,0x3a,0x3c,0x2f, +0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x2f,0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x75,0x6c,0x3e, +0x0d,0x0a,0x3c,0x6c,0x69,0x3e,0x31,0x39,0x32,0x20,0x4b,0x62,0x79,0x74,0x65,0x73, +0x20,0x6f,0x66,0x20,0x54,0x43,0x4d,0x20,0x52,0x41,0x4d,0x20,0x28,0x69,0x6e,0x63, +0x6c,0x75,0x64,0x69,0x6e,0x67,0x20,0x36,0x34,0x20,0x4b,0x62,0x79,0x74,0x65,0x73, +0x20,0x6f,0x66,0x0d,0x0a,0x49,0x54,0x43,0x4d,0x20,0x52,0x41,0x4d,0x20,0x61,0x6e, +0x64,0x20,0x31,0x32,0x38,0x20,0x4b,0x62,0x79,0x74,0x65,0x73,0x20,0x6f,0x66,0x20, +0x44,0x54,0x43,0x4d,0x20,0x52,0x41,0x4d,0x20,0x66,0x6f,0x72,0x20,0x74,0x69,0x6d, +0x65,0x2d,0x63,0x72,0x69,0x74,0x69,0x63,0x61,0x6c,0x20,0x72,0x6f,0x75,0x74,0x69, +0x6e,0x65,0x73,0x20,0x61,0x6e,0x64,0x0d,0x0a,0x64,0x61,0x74,0x61,0x29,0x2c,0x20, +0x35,0x31,0x32,0x20,0x4b,0x62,0x79,0x74,0x65,0x73,0x2c,0x20,0x32,0x38,0x38,0x20, +0x4b,0x62,0x79,0x74,0x65,0x73,0x20,0x61,0x6e,0x64,0x20,0x36,0x34,0x20,0x4b,0x62, +0x79,0x74,0x65,0x73,0x20,0x6f,0x66,0x20,0x75,0x73,0x65,0x72,0x20,0x53,0x52,0x41, +0x4d,0x2c,0x20,0x61,0x6e,0x64,0x20,0x34,0x20,0x4b,0x62,0x79,0x74,0x65,0x73,0x0d, +0x0a,0x6f,0x66,0x20,0x53,0x52,0x41,0x4d,0x20,0x69,0x6e,0x20,0x62,0x61,0x63,0x6b, +0x75,0x70,0x20,0x64,0x6f,0x6d,0x61,0x69,0x6e,0x20,0x74,0x6f,0x20,0x6b,0x65,0x65, +0x70,0x20,0x64,0x61,0x74,0x61,0x20,0x69,0x6e,0x20,0x74,0x68,0x65,0x20,0x6c,0x6f, +0x77,0x65,0x73,0x74,0x20,0x70,0x6f,0x77,0x65,0x72,0x20,0x6d,0x6f,0x64,0x65,0x73, +0x3c,0x2f,0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x2f,0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x73, +0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d, +0x73,0x69,0x7a,0x65,0x3a,0x20,0x31,0x30,0x70,0x74,0x3b,0x20,0x66,0x6f,0x6e,0x74, +0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61, +0x3b,0x22,0x3e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x62,0x72,0x3e,0x0d,0x0a, +0x3c,0x64,0x69,0x76,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x6d,0x61,0x72,0x67, +0x69,0x6e,0x2d,0x6c,0x65,0x66,0x74,0x3a,0x20,0x34,0x30,0x70,0x78,0x3b,0x22,0x3e, +0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e, +0x74,0x2d,0x73,0x69,0x7a,0x65,0x3a,0x20,0x31,0x30,0x70,0x74,0x3b,0x20,0x66,0x6f, +0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61, +0x6e,0x61,0x3b,0x22,0x3e,0x3c,0x61,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66, +0x6f,0x6e,0x74,0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x62,0x6f,0x6c,0x64, +0x3b,0x22,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f, +0x77,0x77,0x77,0x2e,0x73,0x74,0x2e,0x63,0x6f,0x6d,0x2f,0x65,0x6e,0x2f,0x6d,0x69, +0x63,0x72,0x6f,0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x6c,0x65,0x72,0x73,0x2f,0x73, +0x74,0x6d,0x33,0x32,0x68,0x37,0x2d,0x73,0x65,0x72,0x69,0x65,0x73,0x2e,0x68,0x74, +0x6d,0x6c,0x22,0x20,0x74,0x61,0x72,0x67,0x65,0x74,0x3d,0x22,0x5f,0x62,0x6c,0x61, +0x6e,0x6b,0x22,0x3e,0x54,0x68,0x65,0x20,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78, +0x78,0x20,0x68,0x6f,0x6d,0x65,0x20,0x70,0x61,0x67,0x65,0x3c,0x2f,0x61,0x3e,0x3c, +0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x2f,0x73,0x70,0x61, +0x6e,0x3e,0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d, +0x0a,0x3c,0x2f,0x74,0x72,0x3e,0x0d,0x0a,0x3c,0x74,0x72,0x20,0x73,0x74,0x79,0x6c, +0x65,0x3d,0x22,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x73,0x74,0x79,0x6c,0x65, +0x3d,0x22,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3a,0x20,0x32,0x2e,0x32,0x35,0x70, +0x74,0x3b,0x22,0x20,0x76,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22, +0x3e,0x0d,0x0a,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d, +0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x54,0x61,0x62,0x6c,0x65,0x22, +0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x39, +0x34,0x34,0x70,0x78,0x3b,0x20,0x68,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x35,0x34, +0x36,0x70,0x78,0x3b,0x22,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x30,0x22, +0x20,0x63,0x65,0x6c,0x6c,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3d,0x22,0x30,0x22, +0x20,0x63,0x65,0x6c,0x6c,0x73,0x70,0x61,0x63,0x69,0x6e,0x67,0x3d,0x22,0x30,0x22, +0x3e,0x0d,0x0a,0x3c,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x74,0x72,0x20, +0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x73, +0x74,0x79,0x6c,0x65,0x3d,0x22,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3a,0x20,0x32, +0x2e,0x32,0x35,0x70,0x74,0x3b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e, +0x64,0x3a,0x20,0x72,0x67,0x62,0x28,0x35,0x31,0x2c,0x20,0x35,0x31,0x2c,0x20,0x32, +0x35,0x35,0x29,0x20,0x6e,0x6f,0x6e,0x65,0x20,0x72,0x65,0x70,0x65,0x61,0x74,0x20, +0x73,0x63,0x72,0x6f,0x6c,0x6c,0x20,0x30,0x25,0x20,0x35,0x30,0x25,0x3b,0x20,0x2d, +0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x63, +0x6c,0x69,0x70,0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x3b,0x20,0x2d,0x6d, +0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x6f,0x72, +0x69,0x67,0x69,0x6e,0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x3b,0x20,0x2d, +0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x69, +0x6e,0x6c,0x69,0x6e,0x65,0x2d,0x70,0x6f,0x6c,0x69,0x63,0x79,0x3a,0x20,0x69,0x6e, +0x69,0x74,0x69,0x61,0x6c,0x3b,0x20,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x35,0x30, +0x34,0x2e,0x32,0x70,0x74,0x3b,0x22,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x36, +0x37,0x32,0x22,0x3e,0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22, +0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x22,0x3e,0x3c,0x73,0x70,0x61,0x6e, +0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77, +0x68,0x69,0x74,0x65,0x3b,0x22,0x3e,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x2f,0x73, +0x70,0x61,0x6e,0x3e,0x3c,0x73,0x74,0x72,0x6f,0x6e,0x67,0x3e,0x3c,0x73,0x70,0x61, +0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61, +0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x20,0x63, +0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77,0x68,0x69,0x74,0x65,0x3b,0x22,0x3e,0x41,0x62, +0x6f,0x75,0x74,0x20,0x74,0x68,0x69,0x73,0x0d,0x0a,0x64,0x65,0x6d,0x6f,0x6e,0x73, +0x74,0x72,0x61,0x74,0x69,0x6f,0x6e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f, +0x73,0x74,0x72,0x6f,0x6e,0x67,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a, +0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a, +0x20,0x77,0x68,0x69,0x74,0x65,0x3b,0x22,0x3e,0x3c,0x6f,0x3a,0x70,0x3e,0x3c,0x2f, +0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x70,0x3e,0x0d, +0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x73,0x74,0x79,0x6c, +0x65,0x3d,0x22,0x62,0x6f,0x72,0x64,0x65,0x72,0x3a,0x20,0x6d,0x65,0x64,0x69,0x75, +0x6d,0x20,0x6e,0x6f,0x6e,0x65,0x20,0x3b,0x20,0x70,0x61,0x64,0x64,0x69,0x6e,0x67, +0x3a,0x20,0x30,0x63,0x6d,0x3b,0x22,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x34, +0x22,0x3e,0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73, +0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x22,0x3e,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c, +0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x72, +0x3e,0x0d,0x0a,0x3c,0x74,0x72,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x68,0x65, +0x69,0x67,0x68,0x74,0x3a,0x20,0x31,0x31,0x2e,0x32,0x35,0x70,0x74,0x3b,0x22,0x3e, +0x0d,0x0a,0x3c,0x74,0x64,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x70,0x61,0x64, +0x64,0x69,0x6e,0x67,0x3a,0x20,0x32,0x2e,0x32,0x35,0x70,0x74,0x3b,0x20,0x77,0x69, +0x64,0x74,0x68,0x3a,0x20,0x35,0x30,0x34,0x2e,0x32,0x70,0x74,0x3b,0x20,0x68,0x65, +0x69,0x67,0x68,0x74,0x3a,0x20,0x31,0x31,0x2e,0x32,0x35,0x70,0x74,0x3b,0x22,0x20, +0x76,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22,0x20,0x77,0x69,0x64, +0x74,0x68,0x3d,0x22,0x36,0x37,0x32,0x22,0x3e,0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c, +0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x22,0x3e, +0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22, +0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x22,0x3e,0x54,0x68,0x69,0x73,0x26, +0x6e,0x62,0x73,0x70,0x3b,0x64,0x65,0x6d,0x6f,0x6e,0x73,0x74,0x72,0x61,0x74,0x69, +0x6f,0x6e,0x0d,0x0a,0x70,0x72,0x65,0x73,0x65,0x6e,0x74,0x73,0x20,0x48,0x54,0x54, +0x50,0x20,0x77,0x65,0x62,0x73,0x65,0x72,0x76,0x65,0x72,0x26,0x6e,0x62,0x73,0x70, +0x3b,0x64,0x65,0x76,0x65,0x6c,0x6f,0x70,0x65,0x64,0x20,0x6f,0x6e,0x20,0x74,0x68, +0x65,0x20,0x74,0x6f,0x70,0x0d,0x0a,0x6c,0x65,0x76,0x65,0x6c,0x20,0x6f,0x66,0x20, +0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x20,0x54,0x43,0x50,0x2f,0x49,0x50,0x20, +0x73,0x74,0x61,0x63,0x6b,0x2c,0x20,0x69,0x74,0x20,0x70,0x72,0x6f,0x76,0x69,0x64, +0x65,0x73,0x20,0x74,0x68,0x65,0x20,0x70,0x6f,0x73,0x73,0x69,0x62,0x69,0x6c,0x74, +0x79,0x20,0x74,0x6f,0x20,0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x0d,0x0a,0x4c,0x45, +0x44,0x73,0x20,0x74,0x6f,0x67,0x67,0x6c,0x69,0x6e,0x67,0x20,0x6f,0x6e,0x20,0x74, +0x68,0x65,0x20,0x53,0x4d,0x33,0x32,0x48,0x37,0x34,0x33,0x49,0x2d,0x45,0x56,0x41, +0x4c,0x20,0x62,0x6f,0x61,0x72,0x64,0x2c,0x20,0x61,0x6c,0x73,0x6f,0x20,0x69,0x74, +0x20,0x61,0x6c,0x6c,0x6f,0x77,0x73,0x20,0x74,0x6f,0x20,0x67,0x65,0x74,0x0d,0x0a, +0x63,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x6f,0x75,0x73,0x6c,0x79,0x20,0x74,0x68,0x65, +0x20,0x41,0x44,0x43,0x20,0x63,0x6f,0x6e,0x76,0x65,0x72,0x74,0x65,0x64,0x20,0x76, +0x61,0x6c,0x75,0x65,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x69,0x73,0x20,0x63,0x6f, +0x6e,0x6e,0x65,0x63,0x74,0x65,0x64,0x20,0x74,0x6f,0x20,0x74,0x68,0x65,0x0d,0x0a, +0x70,0x6f,0x74,0x65,0x6e,0x74,0x69,0x6f,0x6d,0x65,0x74,0x65,0x72,0x2e,0x3c,0x2f, +0x70,0x3e,0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73, +0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x22,0x3e,0x54,0x68,0x69,0x73,0x20,0x64,0x65, +0x6d,0x6f,0x6e,0x73,0x74,0x72,0x61,0x74,0x69,0x6f,0x6e,0x0d,0x0a,0x73,0x75,0x70, +0x70,0x6f,0x72,0x74,0x73,0x26,0x6e,0x62,0x73,0x70,0x3b,0x74,0x68,0x65,0x20,0x66, +0x6f,0x6c,0x6c,0x6f,0x77,0x69,0x6e,0x67,0x20,0x66,0x65,0x61,0x74,0x75,0x72,0x65, +0x73,0x3a,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x6c, +0x69,0x3e,0x44,0x48,0x43,0x50,0x20,0x63,0x6c,0x69,0x65,0x6e,0x74,0x20,0x28,0x64, +0x79,0x6e,0x61,0x6d,0x69,0x63,0x20,0x49,0x50,0x20,0x61,0x64,0x64,0x72,0x65,0x73, +0x73,0x0d,0x0a,0x61,0x6c,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x29,0x3c,0x2f, +0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x6c,0x69,0x3e,0x45,0x74,0x68,0x65,0x72,0x6e,0x65, +0x74,0x20,0x63,0x61,0x62,0x6c,0x65,0x20,0x70,0x6c,0x75,0x67,0x2f,0x75,0x6e,0x70, +0x6c,0x75,0x67,0x0d,0x0a,0x6d,0x61,0x6e,0x61,0x67,0x65,0x6d,0x65,0x6e,0x74,0x3c, +0x2f,0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x6c,0x69,0x3e,0x45,0x74,0x68,0x65,0x72,0x6e, +0x65,0x74,0x20,0x5a,0x65,0x72,0x6f,0x2d,0x43,0x6f,0x70,0x79,0x20,0x69,0x6e,0x74, +0x65,0x72,0x66,0x61,0x63,0x65,0x3c,0x2f,0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x2f,0x75, +0x6c,0x3e,0x0d,0x0a,0x3c,0x75,0x6c,0x20,0x74,0x79,0x70,0x65,0x3d,0x22,0x64,0x69, +0x73,0x63,0x22,0x3e,0x0d,0x0a,0x3c,0x2f,0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x70,0x20, +0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c, +0x22,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x22,0x3e,0x3c,0x6f,0x3a,0x70,0x3e, +0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x2f,0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x70,0x3e, +0x0d,0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x62,0x6f,0x72,0x64,0x65,0x72,0x3a,0x20,0x6d,0x65,0x64,0x69, +0x75,0x6d,0x20,0x6e,0x6f,0x6e,0x65,0x20,0x3b,0x20,0x70,0x61,0x64,0x64,0x69,0x6e, +0x67,0x3a,0x20,0x30,0x63,0x6d,0x3b,0x22,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22, +0x34,0x22,0x3e,0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d, +0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x22,0x3e,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74, +0x72,0x3e,0x0d,0x0a,0x3c,0x74,0x72,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x22, +0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x70,0x61, +0x64,0x64,0x69,0x6e,0x67,0x3a,0x20,0x32,0x2e,0x32,0x35,0x70,0x74,0x3b,0x20,0x62, +0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x3a,0x20,0x72,0x67,0x62,0x28,0x35, +0x31,0x2c,0x20,0x35,0x31,0x2c,0x20,0x32,0x35,0x35,0x29,0x20,0x6e,0x6f,0x6e,0x65, +0x20,0x72,0x65,0x70,0x65,0x61,0x74,0x20,0x73,0x63,0x72,0x6f,0x6c,0x6c,0x20,0x30, +0x25,0x20,0x35,0x30,0x25,0x3b,0x20,0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b, +0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x63,0x6c,0x69,0x70,0x3a,0x20,0x69,0x6e,0x69, +0x74,0x69,0x61,0x6c,0x3b,0x20,0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67, +0x72,0x6f,0x75,0x6e,0x64,0x2d,0x6f,0x72,0x69,0x67,0x69,0x6e,0x3a,0x20,0x69,0x6e, +0x69,0x74,0x69,0x61,0x6c,0x3b,0x20,0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b, +0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x2d,0x70,0x6f, +0x6c,0x69,0x63,0x79,0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x3b,0x20,0x77, +0x69,0x64,0x74,0x68,0x3a,0x20,0x35,0x30,0x34,0x2e,0x32,0x70,0x74,0x3b,0x22,0x20, +0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x36,0x37,0x32,0x22,0x3e,0x0d,0x0a,0x3c,0x70, +0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61, +0x6c,0x22,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22, +0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77,0x68,0x69,0x74,0x65,0x3b,0x22,0x3e,0x26, +0x6e,0x62,0x73,0x70,0x3b,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x73,0x74,0x72, +0x6f,0x6e,0x67,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d, +0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65, +0x72,0x64,0x61,0x6e,0x61,0x3b,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77,0x68, +0x69,0x74,0x65,0x3b,0x22,0x3e,0x41,0x62,0x6f,0x75,0x74,0x20,0x4c,0x77,0x49,0x50, +0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x73,0x74,0x72,0x6f,0x6e,0x67,0x3e, +0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e, +0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e, +0x61,0x3b,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77,0x68,0x69,0x74,0x65,0x3b, +0x22,0x3e,0x3c,0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x73, +0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d, +0x0a,0x3c,0x74,0x64,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x62,0x6f,0x72,0x64, +0x65,0x72,0x3a,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,0x20,0x6e,0x6f,0x6e,0x65,0x20, +0x3b,0x20,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3a,0x20,0x30,0x63,0x6d,0x3b,0x22, +0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x34,0x22,0x3e,0x0d,0x0a,0x3c,0x70,0x20, +0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c, +0x22,0x3e,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x2f, +0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x72,0x3e,0x0d,0x0a,0x3c,0x74,0x72,0x20, +0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x63, +0x6f,0x6c,0x73,0x70,0x61,0x6e,0x3d,0x22,0x32,0x22,0x20,0x73,0x74,0x79,0x6c,0x65, +0x3d,0x22,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3a,0x20,0x32,0x2e,0x32,0x35,0x70, +0x74,0x3b,0x20,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x35,0x30,0x37,0x2e,0x34,0x70, +0x74,0x3b,0x20,0x76,0x65,0x72,0x74,0x69,0x63,0x61,0x6c,0x2d,0x61,0x6c,0x69,0x67, +0x6e,0x3a,0x20,0x6d,0x69,0x64,0x64,0x6c,0x65,0x3b,0x22,0x3e,0x0d,0x0a,0x3c,0x70, +0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61, +0x6c,0x22,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x6d,0x61,0x72,0x67,0x69,0x6e, +0x2d,0x62,0x6f,0x74,0x74,0x6f,0x6d,0x3a,0x20,0x31,0x32,0x70,0x74,0x3b,0x22,0x3e, +0x6c,0x77,0x49,0x50,0x2c,0x0d,0x0a,0x70,0x72,0x6f,0x6e,0x6f,0x75,0x6e,0x63,0x65, +0x64,0x20,0x6c,0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x49,0x50, +0x2c,0x20,0x69,0x73,0x20,0x61,0x6e,0x20,0x6f,0x70,0x65,0x6e,0x20,0x73,0x6f,0x75, +0x72,0x63,0x65,0x20,0x54,0x43,0x50,0x2f,0x49,0x50,0x20,0x73,0x74,0x61,0x63,0x6b, +0x20,0x64,0x65,0x76,0x65,0x6c,0x6f,0x70,0x65,0x64,0x20,0x62,0x79,0x0d,0x0a,0x41, +0x64,0x61,0x6d,0x20,0x44,0x75,0x6e,0x6b,0x65,0x6c,0x73,0x20,0x61,0x74,0x20,0x74, +0x68,0x65,0x20,0x53,0x77,0x65,0x64,0x69,0x73,0x68,0x20,0x49,0x6e,0x73,0x74,0x69, +0x74,0x75,0x74,0x65,0x20,0x6f,0x66,0x20,0x43,0x6f,0x6d,0x70,0x75,0x74,0x65,0x72, +0x20,0x53,0x63,0x69,0x65,0x6e,0x63,0x65,0x20,0x61,0x6e,0x64,0x20,0x69,0x73,0x0d, +0x0a,0x6d,0x61,0x69,0x6e,0x74,0x61,0x69,0x6e,0x65,0x64,0x20,0x6e,0x6f,0x77,0x20, +0x62,0x79,0x20,0x61,0x20,0x77,0x6f,0x72,0x6c,0x64,0x20,0x77,0x69,0x64,0x65,0x20, +0x63,0x6f,0x6d,0x6d,0x75,0x6e,0x69,0x74,0x79,0x20,0x6f,0x66,0x20,0x64,0x65,0x76, +0x65,0x6c,0x6f,0x70,0x65,0x72,0x73,0x2e,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x62, +0x72,0x3e,0x0d,0x0a,0x6c,0x77,0x49,0x50,0x20,0x6d,0x61,0x69,0x6e,0x20,0x66,0x65, +0x61,0x74,0x75,0x72,0x65,0x73,0x3a,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x62,0x72, +0x3e,0x0d,0x0a,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x75,0x6c,0x3e,0x0d,0x0a,0x3c, +0x6c,0x69,0x3e,0x50,0x72,0x6f,0x74,0x6f,0x63,0x6f,0x6c,0x73,0x3a,0x20,0x49,0x50, +0x2c,0x20,0x49,0x43,0x4d,0x50,0x2c,0x20,0x55,0x44,0x50,0x2c,0x20,0x54,0x43,0x50, +0x2c,0x20,0x49,0x47,0x4d,0x50,0x2c,0x20,0x41,0x52,0x50,0x2c,0x0d,0x0a,0x50,0x50, +0x50,0x6f,0x53,0x2c,0x20,0x50,0x50,0x50,0x6f,0x45,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x3c,0x2f,0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x6c,0x69,0x3e,0x44,0x48,0x43,0x50,0x20, +0x63,0x6c,0x69,0x65,0x6e,0x74,0x2c,0x20,0x44,0x4e,0x53,0x20,0x63,0x6c,0x69,0x65, +0x6e,0x74,0x2c,0x20,0x41,0x75,0x74,0x6f,0x49,0x50,0x2f,0x41,0x50,0x49,0x50,0x41, +0x0d,0x0a,0x28,0x5a,0x65,0x72,0x6f,0x63,0x6f,0x6e,0x66,0x29,0x2c,0x20,0x53,0x4e, +0x4d,0x50,0x20,0x61,0x67,0x65,0x6e,0x74,0x20,0x28,0x70,0x72,0x69,0x76,0x61,0x74, +0x65,0x20,0x4d,0x49,0x42,0x20,0x73,0x75,0x70,0x70,0x6f,0x72,0x74,0x29,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x3c,0x2f,0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x6c,0x69,0x3e,0x41, +0x50,0x49,0x73,0x3a,0x20,0x73,0x70,0x65,0x63,0x69,0x61,0x6c,0x69,0x7a,0x65,0x64, +0x20,0x41,0x50,0x49,0x73,0x20,0x66,0x6f,0x72,0x20,0x65,0x6e,0x68,0x61,0x6e,0x63, +0x65,0x64,0x0d,0x0a,0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65,0x2c, +0x20,0x6f,0x70,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x20,0x42,0x65,0x72,0x6b,0x65,0x6c, +0x65,0x79,0x2d,0x61,0x6c,0x69,0x6b,0x65,0x20,0x73,0x6f,0x63,0x6b,0x65,0x74,0x20, +0x41,0x50,0x49,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x2f,0x6c,0x69,0x3e,0x0d,0x0a, +0x3c,0x6c,0x69,0x3e,0x45,0x78,0x74,0x65,0x6e,0x64,0x65,0x64,0x20,0x66,0x65,0x61, +0x74,0x75,0x72,0x65,0x73,0x3a,0x20,0x49,0x50,0x20,0x66,0x6f,0x72,0x77,0x61,0x72, +0x64,0x69,0x6e,0x67,0x20,0x6f,0x76,0x65,0x72,0x0d,0x0a,0x6d,0x75,0x6c,0x74,0x69, +0x70,0x6c,0x65,0x20,0x6e,0x65,0x74,0x77,0x6f,0x72,0x6b,0x20,0x69,0x6e,0x74,0x65, +0x72,0x66,0x61,0x63,0x65,0x73,0x2c,0x20,0x54,0x43,0x50,0x20,0x63,0x6f,0x6e,0x67, +0x65,0x73,0x74,0x69,0x6f,0x6e,0x20,0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x2c,0x20, +0x52,0x54,0x54,0x20,0x65,0x73,0x74,0x69,0x6d,0x61,0x74,0x69,0x6f,0x6e,0x20,0x61, +0x6e,0x64,0x0d,0x0a,0x66,0x61,0x73,0x74,0x20,0x72,0x65,0x63,0x6f,0x76,0x65,0x72, +0x79,0x2f,0x66,0x61,0x73,0x74,0x20,0x72,0x65,0x74,0x72,0x61,0x6e,0x73,0x6d,0x69, +0x74,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x2f,0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x6c, +0x69,0x3e,0x41,0x64,0x64,0x6f,0x6e,0x20,0x61,0x70,0x70,0x6c,0x69,0x63,0x61,0x74, +0x69,0x6f,0x6e,0x73,0x3a,0x20,0x48,0x54,0x54,0x50,0x20,0x73,0x65,0x72,0x76,0x65, +0x72,0x2c,0x20,0x4d,0x51,0x54,0x54,0x0d,0x0a,0x63,0x6c,0x69,0x65,0x6e,0x74,0x2c, +0x20,0x53,0x4e,0x54,0x50,0x20,0x63,0x6c,0x69,0x65,0x6e,0x74,0x2c,0x20,0x53,0x4d, +0x54,0x50,0x20,0x63,0x6c,0x69,0x65,0x6e,0x74,0x2c,0x20,0x70,0x69,0x6e,0x67,0x2c, +0x20,0x4e,0x65,0x74,0x42,0x49,0x4f,0x53,0x20,0x6e,0x61,0x6d,0x65,0x73,0x65,0x72, +0x76,0x65,0x72,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c, +0x2f,0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x2f,0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x70,0x20, +0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c, +0x22,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x6d,0x61,0x72,0x67,0x69,0x6e,0x2d, +0x62,0x6f,0x74,0x74,0x6f,0x6d,0x3a,0x20,0x31,0x32,0x70,0x74,0x3b,0x22,0x3e,0x6c, +0x77,0x49,0x50,0x20,0x69,0x73,0x20,0x6c,0x69,0x63,0x65,0x6e,0x63,0x65,0x64,0x20, +0x75,0x6e,0x64,0x65,0x72,0x20,0x61,0x0d,0x0a,0x42,0x53,0x44,0x2d,0x73,0x74,0x79, +0x6c,0x65,0x20,0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x3c,0x2f,0x70,0x3e,0x0d,0x0a, +0x3c,0x70,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72, +0x6d,0x61,0x6c,0x22,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x6d,0x61,0x72,0x67, +0x69,0x6e,0x2d,0x62,0x6f,0x74,0x74,0x6f,0x6d,0x3a,0x20,0x31,0x32,0x70,0x74,0x3b, +0x22,0x3e,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x46,0x6f,0x72,0x20,0x6d,0x6f,0x72,0x65, +0x20,0x69,0x6e,0x66,0x6f,0x72,0x6d,0x61,0x74,0x69,0x6f,0x6e,0x73,0x20,0x79,0x6f, +0x75,0x20,0x63,0x61,0x6e,0x20,0x72,0x65,0x66,0x65,0x72,0x20,0x74,0x6f,0x20,0x74, +0x68,0x65,0x20,0x77,0x65,0x62,0x73,0x69,0x74,0x65,0x3a,0x20,0x26,0x6e,0x62,0x73, +0x70,0x3b,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a, +0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e, +0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c, +0x77,0x69,0x70,0x2f,0x22,0x3e,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76, +0x61,0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67, +0x2f,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x2f,0x3c, +0x2f,0x61,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22, +0x66,0x6f,0x6e,0x74,0x2d,0x73,0x69,0x7a,0x65,0x3a,0x20,0x31,0x30,0x70,0x74,0x3b, +0x20,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65, +0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d, +0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e,0x6e,0x61,0x68, +0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70,0x72,0x6f,0x6a, +0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x2f,0x22,0x3e,0x0d,0x0a,0x3c,0x2f, +0x61,0x3e,0x3c,0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x73, +0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d, +0x0a,0x3c,0x2f,0x74,0x72,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x62,0x6f,0x64,0x79,0x3e, +0x0d,0x0a,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65,0x3e,0x0d,0x0a,0x3c,0x70,0x20,0x63, +0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x22, +0x3e,0x3c,0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x70,0x3e, +0x0d,0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x72,0x3e,0x0d,0x0a, +0x3c,0x2f,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x61,0x62,0x6c, +0x65,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x72,0x3e, +0x0d,0x0a,0x3c,0x2f,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x61, +0x62,0x6c,0x65,0x3e,0x0d,0x0a,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c, +0x65,0x3d,0x22,0x64,0x69,0x73,0x70,0x6c,0x61,0x79,0x3a,0x20,0x6e,0x6f,0x6e,0x65, +0x3b,0x22,0x3e,0x3c,0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x6f,0x3a,0x70,0x3e,0x3c,0x2f, +0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0d,0x0a,0x3c,0x64,0x69, +0x76,0x20,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x63,0x65,0x6e,0x74,0x65,0x72,0x22, +0x3e,0x0d,0x0a,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d, +0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x54,0x61,0x62,0x6c,0x65,0x22, +0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75, +0x6e,0x64,0x3a,0x20,0x62,0x6c,0x61,0x63,0x6b,0x20,0x6e,0x6f,0x6e,0x65,0x20,0x72, +0x65,0x70,0x65,0x61,0x74,0x20,0x73,0x63,0x72,0x6f,0x6c,0x6c,0x20,0x30,0x25,0x20, +0x35,0x30,0x25,0x3b,0x20,0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72, +0x6f,0x75,0x6e,0x64,0x2d,0x63,0x6c,0x69,0x70,0x3a,0x20,0x69,0x6e,0x69,0x74,0x69, +0x61,0x6c,0x3b,0x20,0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f, +0x75,0x6e,0x64,0x2d,0x6f,0x72,0x69,0x67,0x69,0x6e,0x3a,0x20,0x69,0x6e,0x69,0x74, +0x69,0x61,0x6c,0x3b,0x20,0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72, +0x6f,0x75,0x6e,0x64,0x2d,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x2d,0x70,0x6f,0x6c,0x69, +0x63,0x79,0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x3b,0x20,0x77,0x69,0x64, +0x74,0x68,0x3a,0x20,0x35,0x37,0x34,0x2e,0x35,0x70,0x74,0x3b,0x22,0x20,0x62,0x6f, +0x72,0x64,0x65,0x72,0x3d,0x22,0x30,0x22,0x20,0x63,0x65,0x6c,0x6c,0x70,0x61,0x64, +0x64,0x69,0x6e,0x67,0x3d,0x22,0x30,0x22,0x20,0x63,0x65,0x6c,0x6c,0x73,0x70,0x61, +0x63,0x69,0x6e,0x67,0x3d,0x22,0x30,0x22,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22, +0x37,0x36,0x36,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a, +0x3c,0x74,0x72,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x22,0x3e,0x0d,0x0a,0x3c, +0x74,0x64,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x70,0x61,0x64,0x64,0x69,0x6e, +0x67,0x3a,0x20,0x30,0x63,0x6d,0x3b,0x20,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x31, +0x30,0x30,0x25,0x3b,0x22,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x31,0x30,0x30, +0x25,0x22,0x3e,0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d, +0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x22,0x3e,0x3c,0x69,0x6d,0x67,0x20,0x69, +0x64,0x3d,0x22,0x5f,0x78,0x30,0x30,0x30,0x30,0x5f,0x69,0x31,0x30,0x32,0x38,0x22, +0x20,0x73,0x72,0x63,0x3d,0x22,0x69,0x6e,0x63,0x68,0x74,0x6d,0x6c,0x2d,0x70,0x61, +0x67,0x65,0x73,0x2d,0x73,0x74,0x6d,0x33,0x32,0x5f,0x63,0x6f,0x6e,0x6e,0x65,0x63, +0x74,0x69,0x76,0x69,0x74,0x79,0x5f,0x66,0x69,0x6c,0x65,0x73,0x2f,0x70,0x69,0x78, +0x65,0x6c,0x2e,0x67,0x69,0x66,0x22,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22, +0x30,0x22,0x20,0x68,0x65,0x69,0x67,0x68,0x74,0x3d,0x22,0x31,0x22,0x20,0x77,0x69, +0x64,0x74,0x68,0x3d,0x22,0x31,0x22,0x3e,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x2f, +0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x72,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x62, +0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65,0x3e,0x0d,0x0a, +0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c,0x61,0x73,0x73, +0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x22,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x74,0x65,0x78,0x74,0x2d,0x61,0x6c,0x69,0x67,0x6e,0x3a,0x20, +0x63,0x65,0x6e,0x74,0x65,0x72,0x3b,0x22,0x20,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22, +0x63,0x65,0x6e,0x74,0x65,0x72,0x22,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74, +0x79,0x6c,0x65,0x3d,0x22,0x64,0x69,0x73,0x70,0x6c,0x61,0x79,0x3a,0x20,0x6e,0x6f, +0x6e,0x65,0x3b,0x22,0x3e,0x3c,0x6f,0x3a,0x70,0x3e,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x3c,0x2f,0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x70, +0x3e,0x0d,0x0a,0x3c,0x64,0x69,0x76,0x20,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x63, +0x65,0x6e,0x74,0x65,0x72,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20, +0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c, +0x54,0x61,0x62,0x6c,0x65,0x22,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x77,0x69, +0x64,0x74,0x68,0x3a,0x20,0x39,0x35,0x38,0x70,0x78,0x3b,0x20,0x68,0x65,0x69,0x67, +0x68,0x74,0x3a,0x20,0x35,0x38,0x70,0x78,0x3b,0x22,0x20,0x62,0x6f,0x72,0x64,0x65, +0x72,0x3d,0x22,0x30,0x22,0x20,0x63,0x65,0x6c,0x6c,0x70,0x61,0x64,0x64,0x69,0x6e, +0x67,0x3d,0x22,0x30,0x22,0x20,0x63,0x65,0x6c,0x6c,0x73,0x70,0x61,0x63,0x69,0x6e, +0x67,0x3d,0x22,0x30,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d, +0x0a,0x3c,0x74,0x72,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x22,0x3e,0x0d,0x0a, +0x3c,0x74,0x64,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x70,0x61,0x64,0x64,0x69, +0x6e,0x67,0x3a,0x20,0x30,0x63,0x6d,0x3b,0x20,0x77,0x69,0x64,0x74,0x68,0x3a,0x20, +0x31,0x30,0x30,0x25,0x3b,0x22,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x31,0x30, +0x30,0x25,0x22,0x3e,0x0d,0x0a,0x3c,0x64,0x69,0x76,0x20,0x69,0x64,0x3d,0x22,0x66, +0x6f,0x6f,0x74,0x65,0x72,0x22,0x3e,0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c,0x61,0x73, +0x73,0x3d,0x22,0x6c,0x65,0x67,0x61,0x6c,0x22,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d, +0x22,0x74,0x65,0x78,0x74,0x2d,0x61,0x6c,0x69,0x67,0x6e,0x3a,0x20,0x63,0x65,0x6e, +0x74,0x65,0x72,0x3b,0x22,0x20,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x63,0x65,0x6e, +0x74,0x65,0x72,0x22,0x3e,0x41,0x6c,0x6c,0x20,0x72,0x69,0x67,0x68,0x74,0x73,0x20, +0x72,0x65,0x73,0x65,0x72,0x76,0x65,0x64,0x20,0xa9,0x32,0x30,0x31,0x37,0x0d,0x0a, +0x53,0x54,0x4d,0x69,0x63,0x72,0x6f,0x65,0x6c,0x65,0x63,0x74,0x72,0x6f,0x6e,0x69, +0x63,0x73,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x2f, +0x64,0x69,0x76,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74, +0x72,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f, +0x74,0x61,0x62,0x6c,0x65,0x3e,0x0d,0x0a,0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0d,0x0a, +0x3c,0x70,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72, +0x6d,0x61,0x6c,0x22,0x3e,0x3c,0x6f,0x3a,0x70,0x3e,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x3c,0x2f,0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x2f,0x64,0x69, +0x76,0x3e,0x0d,0x0a,0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0d,0x0a,0x3c,0x2f,0x62,0x6f, +0x64,0x79,0x3e,0x3c,0x2f,0x68,0x74,0x6d,0x6c,0x3e,}; + +const unsigned int dummy_align__STM32H7xxADC_shtml = 5; +const unsigned char data__STM32H7xxADC_shtml[] = { +/* /STM32H7xxADC.shtml (20 chars) */ +0x2f,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x41,0x44,0x43,0x2e,0x73,0x68, +0x74,0x6d,0x6c,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) +" (63 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, +0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, +0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, +0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, +/* "Content-type: text/html +Expires: Fri, 10 Apr 2008 14:00:00 GMT +Pragma: no-cache + +" (85 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, +0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x45,0x78,0x70,0x69,0x72,0x65,0x73, +0x3a,0x20,0x46,0x72,0x69,0x2c,0x20,0x31,0x30,0x20,0x41,0x70,0x72,0x20,0x32,0x30, +0x30,0x38,0x20,0x31,0x34,0x3a,0x30,0x30,0x3a,0x30,0x30,0x20,0x47,0x4d,0x54,0x0d, +0x0a,0x50,0x72,0x61,0x67,0x6d,0x61,0x3a,0x20,0x6e,0x6f,0x2d,0x63,0x61,0x63,0x68, +0x65,0x0d,0x0a,0x0d,0x0a, +/* raw file data (4222 bytes) */ +0x3c,0x21,0x44,0x4f,0x43,0x54,0x59,0x50,0x45,0x20,0x48,0x54,0x4d,0x4c,0x20,0x50, +0x55,0x42,0x4c,0x49,0x43,0x20,0x22,0x2d,0x2f,0x2f,0x57,0x33,0x43,0x2f,0x2f,0x44, +0x54,0x44,0x20,0x48,0x54,0x4d,0x4c,0x20,0x34,0x2e,0x30,0x31,0x20,0x54,0x72,0x61, +0x6e,0x73,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x2f,0x2f,0x45,0x4e,0x22,0x20,0x22, +0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x77,0x33,0x63,0x2e,0x6f, +0x72,0x67,0x2f,0x54,0x52,0x2f,0x31,0x39,0x39,0x39,0x2f,0x52,0x45,0x43,0x2d,0x68, +0x74,0x6d,0x6c,0x34,0x30,0x31,0x2d,0x31,0x39,0x39,0x39,0x31,0x32,0x32,0x34,0x2f, +0x6c,0x6f,0x6f,0x73,0x65,0x2e,0x64,0x74,0x64,0x22,0x3e,0x0a,0x3c,0x68,0x74,0x6d, +0x6c,0x3e,0x3c,0x68,0x65,0x61,0x64,0x3e,0x3c,0x74,0x69,0x74,0x6c,0x65,0x3e,0x53, +0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x41,0x44,0x43,0x3c,0x2f,0x74,0x69,0x74, +0x6c,0x65,0x3e,0x0d,0x0a,0x0d,0x0a,0x3c,0x6d,0x65,0x74,0x61,0x20,0x68,0x74,0x74, +0x70,0x2d,0x65,0x71,0x75,0x69,0x76,0x3d,0x22,0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74, +0x2d,0x54,0x79,0x70,0x65,0x22,0x20,0x63,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x3d,0x22, +0x74,0x65,0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x3b,0x20,0x63,0x68,0x61,0x72,0x73, +0x65,0x74,0x3d,0x77,0x69,0x6e,0x64,0x6f,0x77,0x73,0x2d,0x31,0x32,0x35,0x32,0x22, +0x3e,0x0d,0x0a,0x3c,0x6d,0x65,0x74,0x61,0x20,0x68,0x74,0x74,0x70,0x2d,0x65,0x71, +0x75,0x69,0x76,0x3d,0x22,0x72,0x65,0x66,0x72,0x65,0x73,0x68,0x22,0x20,0x63,0x6f, +0x6e,0x74,0x65,0x6e,0x74,0x3d,0x22,0x31,0x22,0x3e,0x0d,0x0a,0x3c,0x6d,0x65,0x74, +0x61,0x20,0x63,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x3d,0x22,0x4d,0x53,0x48,0x54,0x4d, +0x4c,0x20,0x36,0x2e,0x30,0x30,0x2e,0x32,0x39,0x30,0x30,0x2e,0x33,0x36,0x39,0x38, +0x22,0x20,0x6e,0x61,0x6d,0x65,0x3d,0x22,0x47,0x45,0x4e,0x45,0x52,0x41,0x54,0x4f, +0x52,0x22,0x3e,0x0d,0x0a,0x3c,0x73,0x74,0x79,0x6c,0x65,0x3e,0x3c,0x2f,0x73,0x74, +0x79,0x6c,0x65,0x3e,0x3c,0x21,0x2d,0x2d,0x20,0x73,0x61,0x76,0x65,0x64,0x20,0x66, +0x72,0x6f,0x6d,0x20,0x75,0x72,0x6c,0x3d,0x28,0x30,0x30,0x33,0x38,0x29,0x68,0x74, +0x74,0x70,0x3a,0x2f,0x2f,0x31,0x39,0x32,0x2e,0x31,0x36,0x38,0x2e,0x30,0x2e,0x31, +0x30,0x2f,0x53,0x54,0x4d,0x33,0x32,0x46,0x31,0x30,0x37,0x41,0x44,0x43,0x2e,0x73, +0x68,0x74,0x6d,0x6c,0x20,0x2d,0x2d,0x3e,0x3c,0x2f,0x68,0x65,0x61,0x64,0x3e,0x0d, +0x0a,0x3c,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x68,0x34,0x3e,0x3c,0x73,0x6d, +0x61,0x6c,0x6c,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d, +0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b, +0x22,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x62,0x69,0x67,0x3e,0x3c,0x62, +0x69,0x67,0x3e,0x3c,0x62,0x69,0x67,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66, +0x6f,0x6e,0x74,0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x62,0x6f,0x6c,0x64, +0x3b,0x22,0x3e,0x3c,0x62,0x69,0x67,0x3e,0x3c,0x73,0x74,0x72,0x6f,0x6e,0x67,0x3e, +0x3c,0x65,0x6d,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d, +0x22,0x66,0x6f,0x6e,0x74,0x2d,0x73,0x74,0x79,0x6c,0x65,0x3a,0x20,0x69,0x74,0x61, +0x6c,0x69,0x63,0x3b,0x22,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c, +0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x35,0x31, +0x2c,0x20,0x35,0x31,0x2c,0x20,0x32,0x35,0x35,0x29,0x3b,0x22,0x3e,0x53,0x54,0x4d, +0x33,0x32,0x48,0x37,0x20,0x41,0x44,0x43,0x20,0x43,0x6f,0x6e,0x76,0x65,0x72,0x73, +0x69,0x6f,0x6e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x0d,0x0a,0x26,0x6e,0x62,0x73, +0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26, +0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62, +0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70, +0x3b,0x0d,0x0a,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26, +0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62, +0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70, +0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x0d,0x0a,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26, +0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62, +0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70, +0x3b,0x26,0x6e,0x62,0x73,0x70,0x3b,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x69,0x6d, +0x67,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x77,0x69,0x64,0x74,0x68,0x3a,0x20, +0x39,0x36,0x70,0x78,0x3b,0x20,0x68,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x36,0x38, +0x70,0x78,0x3b,0x22,0x20,0x61,0x6c,0x74,0x3d,0x22,0x53,0x54,0x20,0x6c,0x6f,0x67, +0x6f,0x22,0x20,0x73,0x72,0x63,0x3d,0x22,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78, +0x78,0x5f,0x66,0x69,0x6c,0x65,0x73,0x2f,0x6c,0x6f,0x67,0x6f,0x2e,0x6a,0x70,0x67, +0x22,0x3e,0x20,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x65,0x6d,0x3e,0x3c, +0x2f,0x73,0x74,0x72,0x6f,0x6e,0x67,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x2f, +0x62,0x69,0x67,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e, +0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e, +0x3c,0x2f,0x68,0x34,0x3e,0x0d,0x0a,0x3c,0x68,0x72,0x20,0x73,0x74,0x79,0x6c,0x65, +0x3d,0x22,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x31,0x30,0x30,0x25,0x3b,0x20,0x68, +0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x32,0x70,0x78,0x3b,0x22,0x3e,0x0d,0x0a,0x3c, +0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74, +0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x62,0x6f,0x6c,0x64,0x3b,0x22,0x3e, +0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a, +0x20,0x62,0x6f,0x6c,0x64,0x3b,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x61,0x62,0x6c,0x65, +0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x39, +0x36,0x31,0x70,0x78,0x3b,0x20,0x68,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x33,0x30, +0x70,0x78,0x3b,0x22,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x31,0x22,0x20, +0x63,0x65,0x6c,0x6c,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3d,0x22,0x32,0x22,0x20, +0x63,0x65,0x6c,0x6c,0x73,0x70,0x61,0x63,0x69,0x6e,0x67,0x3d,0x22,0x32,0x22,0x3e, +0x0d,0x0a,0x3c,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x74,0x72,0x3e,0x0d, +0x0a,0x3c,0x74,0x64,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74, +0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x62,0x6f,0x6c,0x64,0x3b,0x20,0x66, +0x6f,0x6e,0x74,0x2d,0x73,0x74,0x79,0x6c,0x65,0x3a,0x20,0x69,0x74,0x61,0x6c,0x69, +0x63,0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20, +0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f, +0x75,0x6e,0x64,0x2d,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x35, +0x31,0x2c,0x20,0x35,0x31,0x2c,0x20,0x32,0x35,0x35,0x29,0x3b,0x20,0x74,0x65,0x78, +0x74,0x2d,0x61,0x6c,0x69,0x67,0x6e,0x3a,0x20,0x63,0x65,0x6e,0x74,0x65,0x72,0x3b, +0x22,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x61,0x20,0x68,0x72,0x65,0x66, +0x3d,0x22,0x2f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x68,0x74,0x6d,0x6c,0x22,0x3e,0x3c, +0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f, +0x72,0x3a,0x20,0x77,0x68,0x69,0x74,0x65,0x3b,0x22,0x3e,0x48,0x6f,0x6d,0x65,0x0d, +0x0a,0x70,0x61,0x67,0x65,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x61,0x3e, +0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c, +0x74,0x64,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x77, +0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x62,0x6f,0x6c,0x64,0x3b,0x20,0x66,0x6f,0x6e, +0x74,0x2d,0x73,0x74,0x79,0x6c,0x65,0x3a,0x20,0x69,0x74,0x61,0x6c,0x69,0x63,0x3b, +0x20,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65, +0x72,0x64,0x61,0x6e,0x61,0x3b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e, +0x64,0x2d,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x35,0x31,0x2c, +0x20,0x35,0x31,0x2c,0x20,0x32,0x35,0x35,0x29,0x3b,0x20,0x74,0x65,0x78,0x74,0x2d, +0x61,0x6c,0x69,0x67,0x6e,0x3a,0x20,0x63,0x65,0x6e,0x74,0x65,0x72,0x3b,0x22,0x3e, +0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22, +0x2f,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x4c,0x45,0x44,0x2e,0x68,0x74, +0x6d,0x6c,0x22,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d, +0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77,0x68,0x69,0x74,0x65,0x3b,0x22,0x3e, +0x4c,0x65,0x64,0x0d,0x0a,0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x3c,0x2f,0x73,0x70, +0x61,0x6e,0x3e,0x3c,0x2f,0x61,0x3e,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c, +0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d, +0x22,0x66,0x6f,0x6e,0x74,0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x62,0x6f, +0x6c,0x64,0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x73,0x74,0x79,0x6c,0x65,0x3a,0x20, +0x69,0x74,0x61,0x6c,0x69,0x63,0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d, +0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x20,0x62,0x61, +0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20, +0x72,0x67,0x62,0x28,0x35,0x31,0x2c,0x20,0x35,0x31,0x2c,0x20,0x32,0x35,0x35,0x29, +0x3b,0x20,0x74,0x65,0x78,0x74,0x2d,0x61,0x6c,0x69,0x67,0x6e,0x3a,0x20,0x63,0x65, +0x6e,0x74,0x65,0x72,0x3b,0x22,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x61, +0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x2f,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78, +0x78,0x41,0x44,0x43,0x2e,0x73,0x68,0x74,0x6d,0x6c,0x22,0x3e,0x3c,0x73,0x70,0x61, +0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20, +0x77,0x68,0x69,0x74,0x65,0x3b,0x22,0x3e,0x41,0x44,0x43,0x0d,0x0a,0x73,0x74,0x61, +0x74,0x75,0x73,0x20,0x62,0x61,0x72,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f, +0x61,0x3e,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f,0x74,0x64,0x3e,0x0d, +0x0a,0x3c,0x2f,0x74,0x72,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x62,0x6f,0x64,0x79,0x3e, +0x0d,0x0a,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65,0x3e,0x0d,0x0a,0x3c,0x2f,0x73,0x70, +0x61,0x6e,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20, +0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69, +0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x3c,0x2f, +0x73,0x70,0x61,0x6e,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65, +0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56, +0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c, +0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x0d,0x0a, +0x3c,0x64,0x6c,0x3e,0x0d,0x0a,0x3c,0x64,0x74,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c, +0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d, +0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x54, +0x68,0x69,0x73,0x20,0x70,0x61,0x67,0x65,0x0d,0x0a,0x61,0x6c,0x6c,0x6f,0x77,0x73, +0x20,0x79,0x6f,0x75,0x0d,0x0a,0x74,0x6f,0x20,0x67,0x65,0x74,0x20,0x63,0x6f,0x6e, +0x74,0x69,0x6e,0x75,0x6f,0x75,0x73,0x6c,0x79,0x20,0x74,0x68,0x65,0x20,0x41,0x44, +0x43,0x20,0x31,0x20,0x43,0x68,0x61,0x6e,0x6e,0x65,0x6c,0x20,0x30,0x20,0x61,0x6e, +0x61,0x6c,0x6f,0x67,0x20,0x69,0x6e,0x70,0x75,0x74,0x20,0x63,0x6f,0x6e,0x76,0x65, +0x72,0x74,0x65,0x64,0x20,0x76,0x61,0x6c,0x75,0x65,0x2e,0x0d,0x0a,0x54,0x68,0x69, +0x73,0x20,0x41,0x44,0x43,0x20,0x43,0x68,0x61,0x6e,0x6e,0x65,0x6c,0x20,0x69,0x73, +0x20,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64,0x20,0x74,0x6f,0x20,0x74,0x68, +0x65,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f,0x64,0x74,0x3e,0x0d,0x0a, +0x3c,0x64,0x74,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x20,0x73,0x74,0x79,0x6c,0x65, +0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56, +0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x53,0x54,0x4d,0x33,0x32,0x48,0x37, +0x34,0x33,0x49,0x2d,0x45,0x56,0x41,0x4c,0x0d,0x0a,0x62,0x6f,0x61,0x72,0x64,0x27, +0x73,0x0d,0x0a,0x70,0x6f,0x74,0x65,0x6e,0x74,0x69,0x6f,0x6d,0x65,0x74,0x65,0x72, +0x2e,0x20,0x54,0x68,0x65,0x20,0x41,0x44,0x43,0x20,0x76,0x61,0x6c,0x75,0x65,0x20, +0x69,0x73,0x20,0x75,0x70,0x64,0x61,0x74,0x65,0x64,0x2c,0x20,0x61,0x75,0x74,0x6f, +0x6d,0x61,0x74,0x69,0x63,0x61,0x6c,0x6c,0x79,0x2c,0x20,0x65,0x61,0x63,0x68,0x20, +0x31,0x73,0x20,0x77,0x69,0x74,0x68,0x0d,0x0a,0x74,0x68,0x65,0x20,0x6c,0x61,0x73, +0x74,0x0d,0x0a,0x63,0x6f,0x6e,0x76,0x65,0x72,0x74,0x65,0x64,0x20,0x41,0x44,0x43, +0x20,0x31,0x20,0x43,0x68,0x61,0x6e,0x6e,0x65,0x6c,0x20,0x30,0x20,0x76,0x61,0x6c, +0x75,0x65,0x2e,0x20,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f,0x64,0x74, +0x3e,0x0d,0x0a,0x3c,0x64,0x74,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x20,0x73,0x74, +0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79, +0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x59,0x6f,0x75,0x20, +0x63,0x6f,0x75,0x6c,0x64,0x0d,0x0a,0x63,0x68,0x65,0x63,0x6b,0x20,0x74,0x68,0x69, +0x73,0x20,0x62,0x79,0x0d,0x0a,0x63,0x68,0x61,0x6e,0x67,0x69,0x6e,0x67,0x20,0x74, +0x68,0x65,0x20,0x70,0x6f,0x74,0x65,0x6e,0x74,0x69,0x6f,0x6d,0x65,0x74,0x65,0x72, +0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x61,0x6e,0x64,0x20,0x63,0x68, +0x65,0x63,0x6b,0x20,0x74,0x68,0x61,0x74,0x20,0x74,0x68,0x65,0x20,0x41,0x44,0x43, +0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x69,0x73,0x0d,0x0a,0x75,0x70,0x64,0x61,0x74, +0x65,0x64,0x2c,0x20,0x62,0x79,0x20,0x61,0x6e,0x0d,0x0a,0x61,0x75,0x74,0x6f,0x6d, +0x61,0x74,0x69,0x63,0x20,0x72,0x65,0x66,0x72,0x65,0x73,0x68,0x20,0x6f,0x66,0x20, +0x74,0x68,0x69,0x73,0x20,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f,0x64, +0x74,0x3e,0x0d,0x0a,0x3c,0x64,0x74,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x20,0x73, +0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c, +0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x70,0x61,0x67, +0x65,0x2c,0x0d,0x0a,0x77,0x69,0x74,0x68,0x20,0x74,0x68,0x65,0x20,0x6e,0x65,0x77, +0x20,0x63,0x6f,0x6e,0x76,0x65,0x72,0x74,0x65,0x64,0x20,0x76,0x61,0x6c,0x75,0x65, +0x2e,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f,0x64,0x74,0x3e,0x0d,0x0a, +0x3c,0x2f,0x64,0x6c,0x3e,0x0d,0x0a,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x73,0x70, +0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66, +0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22, +0x3e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74, +0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79, +0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x3c,0x2f,0x73,0x70, +0x61,0x6e,0x3e,0x0d,0x0a,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x62,0x6f,0x72,0x64, +0x65,0x72,0x3d,0x22,0x31,0x22,0x20,0x63,0x65,0x6c,0x6c,0x70,0x61,0x64,0x64,0x69, +0x6e,0x67,0x3d,0x22,0x35,0x22,0x20,0x63,0x65,0x6c,0x6c,0x73,0x70,0x61,0x63,0x69, +0x6e,0x67,0x3d,0x22,0x31,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x62,0x6f,0x64,0x79,0x3e, +0x0d,0x0a,0x3c,0x74,0x72,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x3e,0x3c,0x73,0x6d,0x61, +0x6c,0x6c,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22, +0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72, +0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x41,0x44,0x43,0x0d,0x0a,0x43,0x6f,0x6e,0x76, +0x65,0x72,0x74,0x65,0x64,0x20,0x56,0x61,0x6c,0x75,0x65,0x3c,0x2f,0x73,0x70,0x61, +0x6e,0x3e,0x20,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f,0x74,0x64,0x3e, +0x0d,0x0a,0x3c,0x74,0x64,0x3e,0x3c,0x21,0x2d,0x2d,0x23,0x74,0x2d,0x2d,0x3e,0x20, +0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a, +0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x6d,0x76,0x3c,0x2f,0x73, +0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x20,0x3c,0x2f,0x74, +0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x72,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x62,0x6f, +0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65,0x3e,0x0d,0x0a,0x3c, +0x68,0x33,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x77, +0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x22,0x3e, +0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x2f,0x68,0x33,0x3e,0x0d,0x0a,0x3c,0x66,0x6f, +0x6e,0x74,0x20,0x73,0x69,0x7a,0x65,0x3d,0x22,0x2d,0x31,0x22,0x3e,0x3c,0x73,0x70, +0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a, +0x20,0x62,0x6c,0x61,0x63,0x6b,0x3b,0x22,0x3e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e, +0x3c,0x2f,0x66,0x6f,0x6e,0x74,0x3e,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x66,0x6f, +0x6e,0x74,0x20,0x73,0x69,0x7a,0x65,0x3d,0x22,0x2d,0x31,0x22,0x3e,0x3c,0x73,0x70, +0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a, +0x20,0x62,0x6c,0x61,0x63,0x6b,0x3b,0x22,0x3e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e, +0x3c,0x2f,0x66,0x6f,0x6e,0x74,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a, +0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x3c,0x2f,0x73,0x70,0x61, +0x6e,0x3e,0x3c,0x61,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74, +0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61, +0x3b,0x22,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x2f,0x53,0x54,0x4d,0x33,0x32,0x46, +0x31,0x30,0x37,0x2e,0x68,0x74,0x6d,0x6c,0x22,0x3e,0x3c,0x62,0x69,0x67,0x3e,0x3c, +0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74, +0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x62,0x6f,0x6c,0x64,0x3b,0x22,0x3e, +0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x2f,0x61, +0x3e,0x3c,0x66,0x6f,0x6e,0x74,0x20,0x73,0x69,0x7a,0x65,0x3d,0x22,0x2d,0x31,0x22, +0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f, +0x6c,0x6f,0x72,0x3a,0x20,0x62,0x6c,0x61,0x63,0x6b,0x3b,0x22,0x3e,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x3c,0x62,0x72,0x3e, +0x0d,0x0a,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x66,0x6f,0x6e,0x74,0x3e, +0x3c,0x66,0x6f,0x6e,0x74,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x66,0x6f,0x6f, +0x74,0x6d,0x73,0x67,0x22,0x3e,0x26,0x6e,0x62,0x73,0x70,0x3b,0x0d,0x0a,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73, +0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x0d,0x0a,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20, +0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73, +0x70,0x3b,0x0d,0x0a,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70, +0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20, +0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x0d,0x0a,0x26, +0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62, +0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x63,0x6f,0x6d,0x6d,0x65, +0x6e,0x74,0x20,0x74,0x69,0x74,0x6c,0x65,0x3d,0x22,0x23,0x63,0x6f,0x6e,0x66,0x69, +0x67,0x20,0x74,0x69,0x6d,0x65,0x66,0x6d,0x74,0x3d,0x26,0x71,0x75,0x6f,0x74,0x3b, +0x25,0x59,0x26,0x71,0x75,0x6f,0x74,0x3b,0x20,0x22,0x20,0x78,0x6d,0x6c,0x6e,0x73, +0x3d,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x64,0x69,0x73,0x72,0x75,0x70,0x74, +0x69,0x76,0x65,0x2d,0x69,0x6e,0x6e,0x6f,0x76,0x61,0x74,0x69,0x6f,0x6e,0x73,0x2e, +0x63,0x6f,0x6d,0x2f,0x7a,0x6f,0x6f,0x2f,0x6e,0x76,0x75,0x22,0x3e,0x3c,0x21,0x2d, +0x2d,0x23,0x63,0x6f,0x6e,0x66,0x69,0x67,0x20,0x74,0x69,0x6d,0x65,0x66,0x6d,0x74, +0x3d,0x22,0x25,0x59,0x22,0x20,0x2d,0x2d,0x3e,0x3c,0x2f,0x63,0x6f,0x6d,0x6d,0x65, +0x6e,0x74,0x3e,0x3c,0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x20,0x74,0x69,0x74,0x6c, +0x65,0x3d,0x22,0x23,0x65,0x63,0x68,0x6f,0x20,0x76,0x61,0x72,0x3d,0x26,0x71,0x75, +0x6f,0x74,0x3b,0x44,0x41,0x54,0x45,0x5f,0x47,0x4d,0x54,0x26,0x71,0x75,0x6f,0x74, +0x3b,0x20,0x22,0x20,0x78,0x6d,0x6c,0x6e,0x73,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a, +0x2f,0x2f,0x64,0x69,0x73,0x72,0x75,0x70,0x74,0x69,0x76,0x65,0x2d,0x69,0x6e,0x6e, +0x6f,0x76,0x61,0x74,0x69,0x6f,0x6e,0x73,0x2e,0x63,0x6f,0x6d,0x2f,0x7a,0x6f,0x6f, +0x2f,0x6e,0x76,0x75,0x22,0x3e,0x3c,0x21,0x2d,0x2d,0x23,0x65,0x63,0x68,0x6f,0x20, +0x76,0x61,0x72,0x3d,0x22,0x44,0x41,0x54,0x45,0x5f,0x47,0x4d,0x54,0x22,0x20,0x2d, +0x2d,0x3e,0x3c,0x2f,0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x3e,0x0d,0x0a,0x3c,0x73, +0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72, +0x3a,0x20,0x73,0x69,0x6c,0x76,0x65,0x72,0x3b,0x22,0x3e,0x26,0x6e,0x62,0x73,0x70, +0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x0d,0x0a,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26, +0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x41,0x6c,0x6c,0x20, +0x72,0x69,0x67,0x68,0x74,0x73,0x0d,0x0a,0x72,0x65,0x73,0x65,0x72,0x76,0x65,0x64, +0x20,0xa9,0x20,0x32,0x30,0x31,0x37,0x20,0x53,0x54,0x4d,0x69,0x63,0x72,0x6f,0x65, +0x6c,0x65,0x63,0x74,0x72,0x6f,0x6e,0x69,0x63,0x73,0x3c,0x2f,0x73,0x70,0x61,0x6e, +0x3e,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x2f,0x66,0x6f,0x6e,0x74,0x3e,0x0d,0x0a, +0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x3c,0x2f,0x68,0x74,0x6d,0x6c,0x3e,}; + +const unsigned int dummy_align__STM32H7xxLED_html = 6; +const unsigned char data__STM32H7xxLED_html[] = { +/* /STM32H7xxLED.html (19 chars) */ +0x2f,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x4c,0x45,0x44,0x2e,0x68,0x74, +0x6d,0x6c,0x00,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) +" (63 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, +0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, +0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, +0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, +/* "Content-type: text/html + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, +0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x0d,0x0a, +/* raw file data (4416 bytes) */ +0x3c,0x21,0x44,0x4f,0x43,0x54,0x59,0x50,0x45,0x20,0x68,0x74,0x6d,0x6c,0x20,0x50, +0x55,0x42,0x4c,0x49,0x43,0x20,0x22,0x2d,0x2f,0x2f,0x57,0x33,0x43,0x2f,0x2f,0x44, +0x54,0x44,0x20,0x48,0x54,0x4d,0x4c,0x20,0x34,0x2e,0x30,0x31,0x2f,0x2f,0x45,0x4e, +0x22,0x20,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x77,0x33, +0x2e,0x6f,0x72,0x67,0x2f,0x54,0x52,0x2f,0x68,0x74,0x6d,0x6c,0x34,0x2f,0x73,0x74, +0x72,0x69,0x63,0x74,0x2e,0x64,0x74,0x64,0x22,0x3e,0x0a,0x3c,0x68,0x74,0x6d,0x6c, +0x3e,0x3c,0x68,0x65,0x61,0x64,0x3e,0x3c,0x74,0x69,0x74,0x6c,0x65,0x3e,0x53,0x54, +0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x4c,0x45,0x44,0x3c,0x2f,0x74,0x69,0x74,0x6c, +0x65,0x3e,0x0d,0x0a,0x0d,0x0a,0x3c,0x6d,0x65,0x74,0x61,0x20,0x68,0x74,0x74,0x70, +0x2d,0x65,0x71,0x75,0x69,0x76,0x3d,0x22,0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d, +0x54,0x79,0x70,0x65,0x22,0x20,0x63,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x3d,0x22,0x74, +0x65,0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x3b,0x20,0x63,0x68,0x61,0x72,0x73,0x65, +0x74,0x3d,0x77,0x69,0x6e,0x64,0x6f,0x77,0x73,0x2d,0x31,0x32,0x35,0x32,0x22,0x3e, +0x0d,0x0a,0x3c,0x6d,0x65,0x74,0x61,0x20,0x63,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x3d, +0x22,0x4d,0x53,0x48,0x54,0x4d,0x4c,0x20,0x36,0x2e,0x30,0x30,0x2e,0x32,0x38,0x30, +0x30,0x2e,0x31,0x35,0x36,0x31,0x22,0x20,0x6e,0x61,0x6d,0x65,0x3d,0x22,0x47,0x45, +0x4e,0x45,0x52,0x41,0x54,0x4f,0x52,0x22,0x3e,0x0d,0x0a,0x3c,0x73,0x74,0x79,0x6c, +0x65,0x20,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a, +0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61, +0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e, +0x3c,0x2f,0x73,0x74,0x79,0x6c,0x65,0x3e,0x3c,0x2f,0x68,0x65,0x61,0x64,0x3e,0x0d, +0x0a,0x3c,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x68,0x34,0x3e,0x3c,0x73,0x6d, +0x61,0x6c,0x6c,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d, +0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b, +0x22,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x62,0x69,0x67,0x3e,0x3c,0x62, +0x69,0x67,0x3e,0x3c,0x62,0x69,0x67,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66, +0x6f,0x6e,0x74,0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x62,0x6f,0x6c,0x64, +0x3b,0x22,0x3e,0x3c,0x62,0x69,0x67,0x3e,0x3c,0x73,0x74,0x72,0x6f,0x6e,0x67,0x20, +0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67, +0x62,0x28,0x35,0x31,0x2c,0x20,0x35,0x31,0x2c,0x20,0x32,0x35,0x35,0x29,0x3b,0x22, +0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f, +0x6e,0x74,0x2d,0x73,0x74,0x79,0x6c,0x65,0x3a,0x20,0x69,0x74,0x61,0x6c,0x69,0x63, +0x3b,0x22,0x3e,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x20,0x4c,0x45,0x44,0x73,0x20, +0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f, +0x73,0x74,0x72,0x6f,0x6e,0x67,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x35, +0x31,0x2c,0x20,0x35,0x31,0x2c,0x20,0x32,0x35,0x35,0x29,0x3b,0x22,0x3e,0x20,0x3c, +0x2f,0x73,0x70,0x61,0x6e,0x3e,0x26,0x6e,0x62,0x73,0x70,0x3b,0x0d,0x0a,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73, +0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26, +0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62, +0x73,0x70,0x3b,0x0d,0x0a,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73, +0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26, +0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62, +0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x0d,0x0a,0x26,0x6e,0x62,0x73, +0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26, +0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62, +0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70, +0x3b,0x0d,0x0a,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x69,0x6d,0x67,0x20,0x73,0x74, +0x79,0x6c,0x65,0x3d,0x22,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x39,0x36,0x70,0x78, +0x3b,0x20,0x68,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x36,0x38,0x70,0x78,0x3b,0x22, +0x20,0x61,0x6c,0x74,0x3d,0x22,0x53,0x54,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x20,0x73, +0x72,0x63,0x3d,0x22,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x5f,0x66,0x69, +0x6c,0x65,0x73,0x2f,0x6c,0x6f,0x67,0x6f,0x2e,0x6a,0x70,0x67,0x22,0x3e,0x3c,0x2f, +0x62,0x69,0x67,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e, +0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f, +0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f,0x68,0x34,0x3e,0x0d,0x0a,0x3c,0x68,0x72, +0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x31, +0x30,0x30,0x25,0x3b,0x20,0x68,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x32,0x70,0x78, +0x3b,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x73,0x74,0x79,0x6c, +0x65,0x3d,0x22,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x39,0x36,0x31,0x70,0x78,0x3b, +0x20,0x68,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x33,0x30,0x70,0x78,0x3b,0x22,0x20, +0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x31,0x22,0x20,0x63,0x65,0x6c,0x6c,0x70, +0x61,0x64,0x64,0x69,0x6e,0x67,0x3d,0x22,0x32,0x22,0x20,0x63,0x65,0x6c,0x6c,0x73, +0x70,0x61,0x63,0x69,0x6e,0x67,0x3d,0x22,0x32,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x62, +0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x74,0x72,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20, +0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69, +0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x20,0x66,0x6f,0x6e, +0x74,0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x62,0x6f,0x6c,0x64,0x3b,0x20, +0x66,0x6f,0x6e,0x74,0x2d,0x73,0x74,0x79,0x6c,0x65,0x3a,0x20,0x69,0x74,0x61,0x6c, +0x69,0x63,0x3b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x63, +0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x35,0x31,0x2c,0x20,0x35,0x31, +0x2c,0x20,0x32,0x35,0x35,0x29,0x3b,0x20,0x74,0x65,0x78,0x74,0x2d,0x61,0x6c,0x69, +0x67,0x6e,0x3a,0x20,0x63,0x65,0x6e,0x74,0x65,0x72,0x3b,0x22,0x3e,0x3c,0x73,0x6d, +0x61,0x6c,0x6c,0x3e,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x2f,0x69,0x6e, +0x64,0x65,0x78,0x2e,0x68,0x74,0x6d,0x6c,0x22,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20, +0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77,0x68, +0x69,0x74,0x65,0x3b,0x22,0x3e,0x48,0x6f,0x6d,0x65,0x0d,0x0a,0x70,0x61,0x67,0x65, +0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x61,0x3e,0x3c,0x2f,0x73,0x6d,0x61, +0x6c,0x6c,0x3e,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x73,0x74, +0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79, +0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d, +0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x62,0x6f,0x6c,0x64,0x3b,0x20,0x66,0x6f, +0x6e,0x74,0x2d,0x73,0x74,0x79,0x6c,0x65,0x3a,0x20,0x69,0x74,0x61,0x6c,0x69,0x63, +0x3b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x63,0x6f,0x6c, +0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x35,0x31,0x2c,0x20,0x35,0x31,0x2c,0x20, +0x32,0x35,0x35,0x29,0x3b,0x20,0x74,0x65,0x78,0x74,0x2d,0x61,0x6c,0x69,0x67,0x6e, +0x3a,0x20,0x63,0x65,0x6e,0x74,0x65,0x72,0x3b,0x22,0x3e,0x3c,0x73,0x6d,0x61,0x6c, +0x6c,0x3e,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x2f,0x53,0x54,0x4d,0x33, +0x32,0x48,0x37,0x78,0x78,0x4c,0x45,0x44,0x2e,0x68,0x74,0x6d,0x6c,0x22,0x3e,0x3c, +0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f, +0x72,0x3a,0x20,0x77,0x68,0x69,0x74,0x65,0x3b,0x22,0x3e,0x4c,0x65,0x64,0x0d,0x0a, +0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f, +0x61,0x3e,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f,0x74,0x64,0x3e,0x0d, +0x0a,0x3c,0x74,0x64,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74, +0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61, +0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x62, +0x6f,0x6c,0x64,0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x73,0x74,0x79,0x6c,0x65,0x3a, +0x20,0x69,0x74,0x61,0x6c,0x69,0x63,0x3b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f, +0x75,0x6e,0x64,0x2d,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x35, +0x31,0x2c,0x20,0x35,0x31,0x2c,0x20,0x32,0x35,0x35,0x29,0x3b,0x20,0x74,0x65,0x78, +0x74,0x2d,0x61,0x6c,0x69,0x67,0x6e,0x3a,0x20,0x63,0x65,0x6e,0x74,0x65,0x72,0x3b, +0x22,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x61,0x20,0x68,0x72,0x65,0x66, +0x3d,0x22,0x2f,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x41,0x44,0x43,0x2e, +0x73,0x68,0x74,0x6d,0x6c,0x22,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77,0x68,0x69,0x74,0x65, +0x3b,0x22,0x3e,0x41,0x44,0x43,0x0d,0x0a,0x73,0x74,0x61,0x74,0x75,0x73,0x20,0x62, +0x61,0x72,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x61,0x3e,0x3c,0x2f,0x73, +0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x72, +0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x74, +0x61,0x62,0x6c,0x65,0x3e,0x0d,0x0a,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x62,0x69, +0x67,0x3e,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x73, +0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65, +0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56, +0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x54,0x68,0x69,0x73,0x0d,0x0a,0x70, +0x61,0x67,0x65,0x0d,0x0a,0x61,0x6c,0x6c,0x6f,0x77,0x73,0x20,0x79,0x6f,0x75,0x20, +0x74,0x6f,0x20,0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x20,0x74,0x68,0x65,0x20,0x66, +0x6f,0x75,0x72,0x20,0x4c,0x45,0x44,0x73,0x3a,0x20,0x4c,0x45,0x44,0x31,0x2c,0x20, +0x4c,0x45,0x44,0x32,0x2c,0x20,0x4c,0x45,0x44,0x33,0x20,0x61,0x6e,0x64,0x20,0x4c, +0x45,0x44,0x34,0x20,0x6c,0x6f,0x63,0x61,0x74,0x65,0x64,0x0d,0x0a,0x69,0x6e,0x0d, +0x0a,0x74,0x68,0x65,0x26,0x6e,0x62,0x73,0x70,0x3b,0x53,0x54,0x4d,0x33,0x32,0x48, +0x37,0x34,0x33,0x49,0x2d,0x45,0x56,0x41,0x4c,0x20,0x62,0x6f,0x61,0x72,0x64,0x2e, +0x20,0x54,0x6f,0x20,0x70,0x75,0x74,0x20,0x6f,0x6e,0x2f,0x6f,0x66,0x66,0x3c,0x2f, +0x73,0x70,0x61,0x6e,0x3e,0x3c,0x62,0x72,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22, +0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72, +0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x0d,0x0a,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73, +0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c, +0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x61,0x20,0x4c, +0x45,0x44,0x20,0x79,0x6f,0x75,0x20,0x68,0x61,0x76,0x65,0x20,0x74,0x6f,0x0d,0x0a, +0x63,0x68,0x65,0x63,0x6b,0x2f,0x75,0x6e,0x63,0x68,0x65,0x63,0x6b,0x20,0x69,0x74, +0x73,0x20,0x63,0x6f,0x72,0x72,0x65,0x73,0x70,0x6f,0x6e,0x64,0x69,0x6e,0x67,0x20, +0x63,0x68,0x65,0x63,0x6b,0x62,0x6f,0x78,0x2e,0x20,0x54,0x68,0x65,0x6e,0x20,0x79, +0x6f,0x75,0x20,0x68,0x61,0x76,0x65,0x20,0x74,0x6f,0x20,0x63,0x6c,0x69,0x63,0x6b, +0x20,0x6f,0x6e,0x0d,0x0a,0x22,0x53,0x65,0x6e,0x64,0x22,0x20,0x62,0x75,0x74,0x74, +0x6f,0x6e,0x20,0x74,0x6f,0x20,0x73,0x75,0x62,0x6d,0x69,0x74,0x20,0x74,0x68,0x65, +0x20,0x6e,0x65,0x77,0x20,0x4c,0x45,0x44,0x73,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e, +0x3c,0x62,0x72,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d, +0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b, +0x22,0x3e,0x0d,0x0a,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d, +0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65, +0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x63,0x6f,0x6e,0x66,0x69,0x67,0x75,0x72, +0x61,0x74,0x69,0x6f,0x6e,0x2e,0x20,0x46,0x69,0x6e,0x61,0x6c,0x6c,0x79,0x0d,0x0a, +0x63,0x68,0x65,0x63,0x6b,0x20,0x69,0x6e,0x20,0x74,0x68,0x65,0x26,0x6e,0x62,0x73, +0x70,0x3b,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c, +0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74, +0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79, +0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x53,0x54,0x4d,0x33, +0x32,0x48,0x37,0x34,0x33,0x49,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x73, +0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x73,0x70,0x61, +0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61, +0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e, +0x2d,0x45,0x56,0x41,0x4c,0x20,0x62,0x6f,0x61,0x72,0x64,0x20,0x74,0x68,0x61,0x74, +0x20,0x79,0x6f,0x75,0x20,0x67,0x65,0x74,0x20,0x74,0x68,0x65,0x0d,0x0a,0x64,0x65, +0x73,0x69,0x72,0x65,0x64,0x0d,0x0a,0x4c,0x45,0x44,0x73,0x0d,0x0a,0x61,0x72,0x65, +0x20,0x70,0x75,0x74,0x74,0x65,0x64,0x20,0x6f,0x6e,0x2f,0x6f,0x66,0x66,0x2e,0x20, +0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x62,0x72,0x20,0x73,0x74,0x79,0x6c,0x65, +0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56, +0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x0d,0x0a,0x3c,0x2f,0x73,0x6d,0x61, +0x6c,0x6c,0x3e,0x0d,0x0a,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x62,0x72,0x3e,0x0d, +0x0a,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63, +0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77,0x68,0x69,0x74,0x65,0x3b,0x20,0x77,0x69,0x64, +0x74,0x68,0x3a,0x20,0x39,0x36,0x31,0x70,0x78,0x3b,0x20,0x68,0x65,0x69,0x67,0x68, +0x74,0x3a,0x20,0x33,0x38,0x70,0x78,0x3b,0x22,0x20,0x77,0x68,0x69,0x74,0x65,0x3d, +0x22,0x22,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3d,0x22,0x22,0x20,0x3b,0x3d,0x22,0x22, +0x20,0x31,0x30,0x30,0x3d,0x22,0x22,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22, +0x30,0x22,0x20,0x63,0x65,0x6c,0x6c,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3d,0x22, +0x33,0x22,0x20,0x63,0x65,0x6c,0x6c,0x73,0x70,0x61,0x63,0x69,0x6e,0x67,0x3d,0x22, +0x30,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x74, +0x72,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x74, +0x61,0x62,0x74,0x69,0x74,0x6c,0x65,0x22,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22, +0x68,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x31,0x35,0x70,0x78,0x3b,0x20,0x62,0x61, +0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20, +0x72,0x67,0x62,0x28,0x35,0x31,0x2c,0x20,0x35,0x31,0x2c,0x20,0x32,0x35,0x35,0x29, +0x3b,0x22,0x3e,0x3c,0x62,0x69,0x67,0x3e,0x3c,0x62,0x69,0x67,0x3e,0x3c,0x66,0x6f, +0x6e,0x74,0x20,0x73,0x69,0x7a,0x65,0x3d,0x22,0x2d,0x31,0x22,0x3e,0x3c,0x62,0x69, +0x67,0x3e,0x3c,0x62,0x69,0x67,0x3e,0x3c,0x73,0x74,0x72,0x6f,0x6e,0x67,0x3e,0x53, +0x54,0x4d,0x33,0x32,0x0d,0x0a,0x57,0x65,0x62,0x73,0x65,0x72,0x76,0x65,0x72,0x20, +0x4c,0x45,0x44,0x73,0x20,0x43,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x3c,0x2f,0x73,0x74, +0x72,0x6f,0x6e,0x67,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x2f,0x62,0x69,0x67, +0x3e,0x3c,0x2f,0x66,0x6f,0x6e,0x74,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x2f, +0x62,0x69,0x67,0x3e,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x72,0x3e, +0x0d,0x0a,0x3c,0x2f,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x61, +0x62,0x6c,0x65,0x3e,0x0d,0x0a,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x66,0x6f,0x72, +0x6d,0x20,0x6d,0x65,0x74,0x68,0x6f,0x64,0x3d,0x22,0x67,0x65,0x74,0x22,0x20,0x61, +0x63,0x74,0x69,0x6f,0x6e,0x3d,0x22,0x2f,0x6c,0x65,0x64,0x73,0x2e,0x63,0x67,0x69, +0x22,0x3e,0x3c,0x69,0x6e,0x70,0x75,0x74,0x20,0x76,0x61,0x6c,0x75,0x65,0x3d,0x22, +0x31,0x22,0x20,0x6e,0x61,0x6d,0x65,0x3d,0x22,0x6c,0x65,0x64,0x22,0x20,0x74,0x79, +0x70,0x65,0x3d,0x22,0x63,0x68,0x65,0x63,0x6b,0x62,0x6f,0x78,0x22,0x3e,0x4c,0x45, +0x44,0x31,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x69,0x6e,0x70,0x75,0x74,0x20,0x76, +0x61,0x6c,0x75,0x65,0x3d,0x22,0x32,0x22,0x20,0x6e,0x61,0x6d,0x65,0x3d,0x22,0x6c, +0x65,0x64,0x22,0x20,0x74,0x79,0x70,0x65,0x3d,0x22,0x63,0x68,0x65,0x63,0x6b,0x62, +0x6f,0x78,0x22,0x3e,0x4c,0x45,0x44,0x32,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x69, +0x6e,0x70,0x75,0x74,0x20,0x76,0x61,0x6c,0x75,0x65,0x3d,0x22,0x33,0x22,0x20,0x6e, +0x61,0x6d,0x65,0x3d,0x22,0x6c,0x65,0x64,0x22,0x20,0x74,0x79,0x70,0x65,0x3d,0x22, +0x63,0x68,0x65,0x63,0x6b,0x62,0x6f,0x78,0x22,0x3e,0x4c,0x45,0x44,0x33,0x3c,0x62, +0x72,0x3e,0x0d,0x0a,0x3c,0x69,0x6e,0x70,0x75,0x74,0x20,0x76,0x61,0x6c,0x75,0x65, +0x3d,0x22,0x34,0x22,0x20,0x6e,0x61,0x6d,0x65,0x3d,0x22,0x6c,0x65,0x64,0x22,0x20, +0x74,0x79,0x70,0x65,0x3d,0x22,0x63,0x68,0x65,0x63,0x6b,0x62,0x6f,0x78,0x22,0x3e, +0x4c,0x45,0x44,0x34,0x0d,0x0a,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x62,0x72,0x3e, +0x0d,0x0a,0x3c,0x69,0x6e,0x70,0x75,0x74,0x20,0x76,0x61,0x6c,0x75,0x65,0x3d,0x22, +0x53,0x65,0x6e,0x64,0x22,0x20,0x74,0x79,0x70,0x65,0x3d,0x22,0x73,0x75,0x62,0x6d, +0x69,0x74,0x22,0x3e,0x20,0x3c,0x2f,0x66,0x6f,0x72,0x6d,0x3e,0x0d,0x0a,0x3c,0x68, +0x33,0x3e,0x3c,0x66,0x6f,0x6e,0x74,0x20,0x73,0x69,0x7a,0x65,0x3d,0x22,0x2d,0x31, +0x22,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63, +0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x62,0x6c,0x61,0x63,0x6b,0x3b,0x22,0x3e,0x3c,0x2f, +0x73,0x70,0x61,0x6e,0x3e,0x0d,0x0a,0x3c,0x2f,0x66,0x6f,0x6e,0x74,0x3e,0x3c,0x2f, +0x68,0x33,0x3e,0x0d,0x0a,0x3c,0x68,0x33,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22, +0x66,0x6f,0x6e,0x74,0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x6e,0x6f,0x72, +0x6d,0x61,0x6c,0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79, +0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x3c,0x66,0x6f,0x6e, +0x74,0x20,0x73,0x69,0x7a,0x65,0x3d,0x22,0x2d,0x31,0x22,0x3e,0x3c,0x62,0x72,0x3e, +0x0d,0x0a,0x3c,0x2f,0x66,0x6f,0x6e,0x74,0x3e,0x3c,0x2f,0x68,0x33,0x3e,0x0d,0x0a, +0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e, +0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e, +0x61,0x3b,0x22,0x3e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x66,0x6f,0x6e,0x74, +0x20,0x73,0x69,0x7a,0x65,0x3d,0x22,0x2d,0x31,0x22,0x3e,0x3c,0x61,0x20,0x73,0x74, +0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79, +0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x20,0x68,0x72,0x65,0x66, +0x3d,0x22,0x2f,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x37,0x2e,0x68,0x74,0x6d, +0x6c,0x22,0x3e,0x3c,0x62,0x69,0x67,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74, +0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x77,0x65,0x69,0x67,0x68,0x74, +0x3a,0x20,0x62,0x6f,0x6c,0x64,0x3b,0x22,0x3e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e, +0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x2f,0x61,0x3e,0x3c,0x2f,0x66,0x6f,0x6e,0x74, +0x3e,0x0d,0x0a,0x3c,0x66,0x6f,0x6e,0x74,0x20,0x73,0x69,0x7a,0x65,0x3d,0x22,0x2d, +0x31,0x22,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22, +0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x62,0x6c,0x61,0x63,0x6b,0x3b,0x22,0x3e,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x3c,0x62, +0x72,0x3e,0x0d,0x0a,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x66,0x6f,0x6e, +0x74,0x3e,0x3c,0x66,0x6f,0x6e,0x74,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x66, +0x6f,0x6f,0x74,0x6d,0x73,0x67,0x22,0x3e,0x26,0x6e,0x62,0x73,0x70,0x3b,0x0d,0x0a, +0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73, +0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x0d,0x0a,0x26,0x6e,0x62,0x73,0x70, +0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20, +0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x0d,0x0a,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62, +0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70, +0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x0d, +0x0a,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26, +0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x63,0x6f,0x6d, +0x6d,0x65,0x6e,0x74,0x20,0x74,0x69,0x74,0x6c,0x65,0x3d,0x22,0x23,0x63,0x6f,0x6e, +0x66,0x69,0x67,0x20,0x74,0x69,0x6d,0x65,0x66,0x6d,0x74,0x3d,0x26,0x71,0x75,0x6f, +0x74,0x3b,0x25,0x59,0x26,0x71,0x75,0x6f,0x74,0x3b,0x20,0x22,0x20,0x78,0x6d,0x6c, +0x6e,0x73,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x64,0x69,0x73,0x72,0x75, +0x70,0x74,0x69,0x76,0x65,0x2d,0x69,0x6e,0x6e,0x6f,0x76,0x61,0x74,0x69,0x6f,0x6e, +0x73,0x2e,0x63,0x6f,0x6d,0x2f,0x7a,0x6f,0x6f,0x2f,0x6e,0x76,0x75,0x22,0x3e,0x3c, +0x21,0x2d,0x2d,0x23,0x63,0x6f,0x6e,0x66,0x69,0x67,0x20,0x74,0x69,0x6d,0x65,0x66, +0x6d,0x74,0x3d,0x22,0x25,0x59,0x22,0x20,0x2d,0x2d,0x3e,0x3c,0x2f,0x63,0x6f,0x6d, +0x6d,0x65,0x6e,0x74,0x3e,0x3c,0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x20,0x74,0x69, +0x74,0x6c,0x65,0x3d,0x22,0x23,0x65,0x63,0x68,0x6f,0x20,0x76,0x61,0x72,0x3d,0x26, +0x71,0x75,0x6f,0x74,0x3b,0x44,0x41,0x54,0x45,0x5f,0x47,0x4d,0x54,0x26,0x71,0x75, +0x6f,0x74,0x3b,0x20,0x22,0x20,0x78,0x6d,0x6c,0x6e,0x73,0x3d,0x22,0x68,0x74,0x74, +0x70,0x3a,0x2f,0x2f,0x64,0x69,0x73,0x72,0x75,0x70,0x74,0x69,0x76,0x65,0x2d,0x69, +0x6e,0x6e,0x6f,0x76,0x61,0x74,0x69,0x6f,0x6e,0x73,0x2e,0x63,0x6f,0x6d,0x2f,0x7a, +0x6f,0x6f,0x2f,0x6e,0x76,0x75,0x22,0x3e,0x3c,0x21,0x2d,0x2d,0x23,0x65,0x63,0x68, +0x6f,0x20,0x76,0x61,0x72,0x3d,0x22,0x44,0x41,0x54,0x45,0x5f,0x47,0x4d,0x54,0x22, +0x20,0x2d,0x2d,0x3e,0x3c,0x2f,0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x3e,0x0d,0x0a, +0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c, +0x6f,0x72,0x3a,0x20,0x73,0x69,0x6c,0x76,0x65,0x72,0x3b,0x22,0x3e,0x26,0x6e,0x62, +0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x0d,0x0a,0x26,0x6e,0x62,0x73, +0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x41,0x6c, +0x6c,0x20,0x72,0x69,0x67,0x68,0x74,0x73,0x0d,0x0a,0x72,0x65,0x73,0x65,0x72,0x76, +0x65,0x64,0x20,0xa9,0x20,0x32,0x30,0x31,0x37,0x20,0x53,0x54,0x4d,0x69,0x63,0x72, +0x6f,0x65,0x6c,0x65,0x63,0x74,0x72,0x6f,0x6e,0x69,0x63,0x73,0x3c,0x2f,0x73,0x70, +0x61,0x6e,0x3e,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x2f,0x66,0x6f,0x6e,0x74,0x3e, +0x0d,0x0a,0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x3c,0x2f,0x68,0x74,0x6d,0x6c,0x3e, +}; + + + +const struct fsdata_file file__STM32H7xx_files_logo_jpg[] = { { +file_NULL, +data__STM32H7xx_files_logo_jpg, +data__STM32H7xx_files_logo_jpg + 28, +sizeof(data__STM32H7xx_files_logo_jpg) - 28, +1, +}}; + +const struct fsdata_file file__STM32H7xx_files_ST_gif[] = { { +file__STM32H7xx_files_logo_jpg, +data__STM32H7xx_files_ST_gif, +data__STM32H7xx_files_ST_gif + 24, +sizeof(data__STM32H7xx_files_ST_gif) - 24, +1, +}}; + +const struct fsdata_file file__STM32H7xx_files_stm32_jpg[] = { { +file__STM32H7xx_files_ST_gif, +data__STM32H7xx_files_stm32_jpg, +data__STM32H7xx_files_stm32_jpg + 28, +sizeof(data__STM32H7xx_files_stm32_jpg) - 28, +1, +}}; + +const struct fsdata_file file__404_html[] = { { +file__STM32H7xx_files_stm32_jpg, +data__404_html, +data__404_html + 12, +sizeof(data__404_html) - 12, +1, +}}; + +const struct fsdata_file file__index_html[] = { { +file__404_html, +data__index_html, +data__index_html + 12, +sizeof(data__index_html) - 12, +1, +}}; + +const struct fsdata_file file__STM32H7xxADC_shtml[] = { { +file__index_html, +data__STM32H7xxADC_shtml, +data__STM32H7xxADC_shtml + 20, +sizeof(data__STM32H7xxADC_shtml) - 20, +1, +}}; + +const struct fsdata_file file__STM32H7xxLED_html[] = { { +file__STM32H7xxADC_shtml, +data__STM32H7xxLED_html, +data__STM32H7xxLED_html + 20, +sizeof(data__STM32H7xxLED_html) - 20, +1, +}}; + + + diff --git a/User/lwip_http - bak/fsdata_new.c b/User/lwip_http - bak/fsdata_new.c new file mode 100644 index 0000000..ab9da7e --- /dev/null +++ b/User/lwip_http - bak/fsdata_new.c @@ -0,0 +1,337 @@ +#include "lwip/apps/fs.h" +#include "lwip/def.h" + + +#define file_NULL (struct fsdata_file *) NULL + + +#ifndef FS_FILE_FLAGS_HEADER_INCLUDED +#define FS_FILE_FLAGS_HEADER_INCLUDED 1 +#endif +#ifndef FS_FILE_FLAGS_HEADER_PERSISTENT +#define FS_FILE_FLAGS_HEADER_PERSISTENT 0 +#endif +/* FSDATA_FILE_ALIGNMENT: 0=off, 1=by variable, 2=by include */ +#ifndef FSDATA_FILE_ALIGNMENT +#define FSDATA_FILE_ALIGNMENT 0 +#endif +#ifndef FSDATA_ALIGN_PRE +#define FSDATA_ALIGN_PRE +#endif +#ifndef FSDATA_ALIGN_POST +#define FSDATA_ALIGN_POST +#endif +#if FSDATA_FILE_ALIGNMENT==2 +#include "fsdata_alignment.h" +#endif +#if FSDATA_FILE_ALIGNMENT==1 +static const unsigned int dummy_align__img_sics_gif = 0; +#endif +static const unsigned char FSDATA_ALIGN_PRE data__img_sics_gif[] FSDATA_ALIGN_POST = { +/* /img/sics.gif (14 chars) */ +0x2f,0x69,0x6d,0x67,0x2f,0x73,0x69,0x63,0x73,0x2e,0x67,0x69,0x66,0x00,0x00,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/2.0.3d (http://savannah.nongnu.org/projects/lwip) +" (64 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x32,0x2e,0x30, +0x2e,0x33,0x64,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61, +0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f, +0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, + +/* "Content-Length: 724 +" (18+ bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x4c,0x65,0x6e,0x67,0x74,0x68,0x3a,0x20, +0x37,0x32,0x34,0x0d,0x0a, +/* "Content-Type: image/gif + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x54,0x79,0x70,0x65,0x3a,0x20,0x69,0x6d, +0x61,0x67,0x65,0x2f,0x67,0x69,0x66,0x0d,0x0a,0x0d,0x0a, +/* raw file data (724 bytes) */ +0x47,0x49,0x46,0x38,0x39,0x61,0x46,0x00,0x22,0x00,0xa5,0x00,0x00,0xd9,0x2b,0x39, +0x6a,0x6a,0x6a,0xbf,0xbf,0xbf,0x93,0x93,0x93,0x0f,0x0f,0x0f,0xb0,0xb0,0xb0,0xa6, +0xa6,0xa6,0x80,0x80,0x80,0x76,0x76,0x76,0x1e,0x1e,0x1e,0x9d,0x9d,0x9d,0x2e,0x2e, +0x2e,0x49,0x49,0x49,0x54,0x54,0x54,0x8a,0x8a,0x8a,0x60,0x60,0x60,0xc6,0xa6,0x99, +0xbd,0xb5,0xb2,0xc2,0xab,0xa1,0xd9,0x41,0x40,0xd5,0x67,0x55,0xc0,0xb0,0xaa,0xd5, +0x5e,0x4e,0xd6,0x50,0x45,0xcc,0x93,0x7d,0xc8,0xa1,0x90,0xce,0x8b,0x76,0xd2,0x7b, +0x65,0xd1,0x84,0x6d,0xc9,0x99,0x86,0x3a,0x3a,0x3a,0x00,0x00,0x00,0xb8,0xb8,0xb8, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2c,0x00,0x00, +0x00,0x00,0x46,0x00,0x22,0x00,0x00,0x06,0xfe,0x40,0x90,0x70,0x48,0x2c,0x1a,0x8f, +0xc8,0xa4,0x72,0xc9,0x6c,0x3a,0x9f,0xd0,0xa8,0x74,0x4a,0xad,0x5a,0xaf,0xd8,0xac, +0x76,0xa9,0x40,0x04,0xbe,0x83,0xe2,0x60,0x3c,0x50,0x20,0x0d,0x8e,0x6f,0x00,0x31, +0x28,0x1c,0x0d,0x07,0xb5,0xc3,0x60,0x75,0x24,0x3e,0xf8,0xfc,0x87,0x11,0x06,0xe9, +0x3d,0x46,0x07,0x0b,0x7a,0x7a,0x7c,0x43,0x06,0x1e,0x84,0x78,0x0b,0x07,0x6e,0x51, +0x01,0x8a,0x84,0x08,0x7e,0x79,0x80,0x87,0x89,0x91,0x7a,0x93,0x0a,0x04,0x99,0x78, +0x96,0x4f,0x03,0x9e,0x79,0x01,0x94,0x9f,0x43,0x9c,0xa3,0xa4,0x05,0x77,0xa3,0xa0, +0x4e,0x98,0x79,0x0b,0x1e,0x83,0xa4,0xa6,0x1f,0x96,0x05,0x9d,0xaa,0x78,0x01,0x07, +0x84,0x04,0x1e,0x1e,0xbb,0xb8,0x51,0x84,0x0e,0x43,0x05,0x07,0x77,0xa5,0x7f,0x42, +0xb1,0xb2,0x01,0x63,0x08,0x0d,0xbb,0x01,0x0c,0x7a,0x0d,0x44,0x0e,0xd8,0xaf,0x4c, +0x05,0x7a,0x04,0x47,0x07,0x07,0xb7,0x80,0xa2,0xe1,0x7d,0x44,0x05,0x01,0x04,0x01, +0xd0,0xea,0x87,0x93,0x4f,0xe0,0x9a,0x49,0xce,0xd8,0x79,0x04,0x66,0x20,0x15,0x10, +0x10,0x11,0x92,0x29,0x80,0xb6,0xc0,0x91,0x15,0x45,0x1e,0x90,0x19,0x71,0x46,0xa8, +0x5c,0x04,0x0e,0x00,0x22,0x4e,0xe8,0x40,0x24,0x9f,0x3e,0x04,0x06,0xa7,0x58,0xd4, +0x93,0xa0,0x1c,0x91,0x3f,0xe8,0xf0,0x88,0x03,0xb1,0x21,0xa2,0x49,0x00,0x19,0x86, +0xfc,0x52,0x44,0xe0,0x01,0x9d,0x29,0x21,0x15,0x25,0x50,0xf7,0x67,0x25,0x1e,0x06, +0xfd,0x4e,0x9a,0xb4,0x90,0xac,0x15,0xfa,0xcb,0x52,0x53,0x1e,0x8c,0xf2,0xf8,0x07, +0x92,0x2d,0x08,0x3a,0x4d,0x12,0x49,0x95,0x49,0xdb,0x14,0x04,0xc4,0x14,0x85,0x29, +0xaa,0xe7,0x01,0x08,0xa4,0x49,0x01,0x14,0x51,0xe0,0x53,0x91,0xd5,0x29,0x06,0x1a, +0x64,0x02,0xf4,0xc7,0x81,0x9e,0x05,0x20,0x22,0x64,0xa5,0x30,0xae,0xab,0x9e,0x97, +0x53,0xd8,0xb9,0xfd,0x50,0xef,0x93,0x02,0x42,0x74,0x34,0xe8,0x9c,0x20,0x21,0xc9, +0x01,0x68,0x78,0xe6,0x55,0x29,0x20,0x56,0x4f,0x4c,0x40,0x51,0x71,0x82,0xc0,0x70, +0x21,0x22,0x85,0xbe,0x4b,0x1c,0x44,0x05,0xea,0xa4,0x01,0xbf,0x22,0xb5,0xf0,0x1c, +0x06,0x51,0x38,0x8f,0xe0,0x22,0xec,0x18,0xac,0x39,0x22,0xd4,0xd6,0x93,0x44,0x01, +0x32,0x82,0xc8,0xfc,0x61,0xb3,0x01,0x45,0x0c,0x2e,0x83,0x30,0xd0,0x0e,0x17,0x24, +0x0f,0x70,0x85,0x94,0xee,0x05,0x05,0x53,0x4b,0x32,0x1b,0x3f,0x98,0xd3,0x1d,0x29, +0x81,0xb0,0xae,0x1e,0x8c,0x7e,0x68,0xe0,0x60,0x5a,0x54,0x8f,0xb0,0x78,0x69,0x73, +0x06,0xa2,0x00,0x6b,0x57,0xca,0x3d,0x11,0x50,0xbd,0x04,0x30,0x4b,0x3a,0xd4,0xab, +0x5f,0x1f,0x9b,0x3d,0x13,0x74,0x27,0x88,0x3c,0x25,0xe0,0x17,0xbe,0x7a,0x79,0x45, +0x0d,0x0c,0xb0,0x8b,0xda,0x90,0xca,0x80,0x06,0x5d,0x17,0x60,0x1c,0x22,0x4c,0xd8, +0x57,0x22,0x06,0x20,0x00,0x98,0x07,0x08,0xe4,0x56,0x80,0x80,0x1c,0xc5,0xb7,0xc5, +0x82,0x0c,0x36,0xe8,0xe0,0x83,0x10,0x46,0x28,0xe1,0x84,0x14,0x56,0x68,0xa1,0x10, +0x41,0x00,0x00,0x3b,}; + +#if FSDATA_FILE_ALIGNMENT==1 +static const unsigned int dummy_align__404_html = 1; +#endif +static const unsigned char FSDATA_ALIGN_PRE data__404_html[] FSDATA_ALIGN_POST = { +/* /404.html (10 chars) */ +0x2f,0x34,0x30,0x34,0x2e,0x68,0x74,0x6d,0x6c,0x00,0x00,0x00, + +/* HTTP header */ +/* "HTTP/1.0 404 File not found +" (29 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x34,0x30,0x34,0x20,0x46,0x69,0x6c, +0x65,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x0d,0x0a, +/* "Server: lwIP/2.0.3d (http://savannah.nongnu.org/projects/lwip) +" (64 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x32,0x2e,0x30, +0x2e,0x33,0x64,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61, +0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f, +0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, + +/* "Content-Length: 565 +" (18+ bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x4c,0x65,0x6e,0x67,0x74,0x68,0x3a,0x20, +0x35,0x36,0x35,0x0d,0x0a, +/* "Content-Type: text/html + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x54,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, +0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x0d,0x0a, +/* raw file data (565 bytes) */ +0x3c,0x68,0x74,0x6d,0x6c,0x3e,0x0d,0x0a,0x3c,0x68,0x65,0x61,0x64,0x3e,0x3c,0x74, +0x69,0x74,0x6c,0x65,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c,0x69, +0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50, +0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x74,0x69,0x74,0x6c,0x65,0x3e,0x3c,0x2f, +0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x3c,0x62,0x6f,0x64,0x79,0x20,0x62,0x67,0x63, +0x6f,0x6c,0x6f,0x72,0x3d,0x22,0x77,0x68,0x69,0x74,0x65,0x22,0x20,0x74,0x65,0x78, +0x74,0x3d,0x22,0x62,0x6c,0x61,0x63,0x6b,0x22,0x3e,0x0d,0x0a,0x0d,0x0a,0x20,0x20, +0x20,0x20,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22, +0x31,0x30,0x30,0x25,0x22,0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74, +0x72,0x20,0x76,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22,0x3e,0x3c, +0x74,0x64,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x38,0x30,0x22,0x3e,0x09,0x20, +0x20,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68, +0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73, +0x65,0x2f,0x22,0x3e,0x3c,0x69,0x6d,0x67,0x20,0x73,0x72,0x63,0x3d,0x22,0x2f,0x69, +0x6d,0x67,0x2f,0x73,0x69,0x63,0x73,0x2e,0x67,0x69,0x66,0x22,0x0d,0x0a,0x09,0x20, +0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x30,0x22,0x20,0x61,0x6c,0x74,0x3d, +0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x20,0x74,0x69,0x74,0x6c, +0x65,0x3d,0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x3e,0x3c,0x2f, +0x61,0x3e,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x20,0x77,0x69, +0x64,0x74,0x68,0x3d,0x22,0x35,0x30,0x30,0x22,0x3e,0x09,0x20,0x20,0x0d,0x0a,0x09, +0x20,0x20,0x3c,0x68,0x31,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c, +0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49, +0x50,0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x68,0x31,0x3e,0x0d,0x0a,0x09,0x20, +0x20,0x3c,0x68,0x32,0x3e,0x34,0x30,0x34,0x20,0x2d,0x20,0x50,0x61,0x67,0x65,0x20, +0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x3c,0x2f,0x68,0x32,0x3e,0x0d,0x0a, +0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x53,0x6f,0x72, +0x72,0x79,0x2c,0x20,0x74,0x68,0x65,0x20,0x70,0x61,0x67,0x65,0x20,0x79,0x6f,0x75, +0x20,0x61,0x72,0x65,0x20,0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x69,0x6e,0x67,0x20, +0x77,0x61,0x73,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x20,0x6f,0x6e, +0x20,0x74,0x68,0x69,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x73,0x65,0x72,0x76, +0x65,0x72,0x2e,0x20,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09, +0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x2f,0x74,0x72, +0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65, +0x3e,0x0d,0x0a,0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x68,0x74, +0x6d,0x6c,0x3e,0x0d,0x0a,}; + +#if FSDATA_FILE_ALIGNMENT==1 +static const unsigned int dummy_align__index_html = 2; +#endif +static const unsigned char FSDATA_ALIGN_PRE data__index_html[] FSDATA_ALIGN_POST = { +/* /index.html (12 chars) */ +0x2f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x68,0x74,0x6d,0x6c,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/2.0.3d (http://savannah.nongnu.org/projects/lwip) +" (64 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x32,0x2e,0x30, +0x2e,0x33,0x64,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61, +0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f, +0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, + +/* "Content-Length: 1751 +" (18+ bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x4c,0x65,0x6e,0x67,0x74,0x68,0x3a,0x20, +0x31,0x37,0x35,0x31,0x0d,0x0a, +/* "Content-Type: text/html + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x54,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, +0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x0d,0x0a, +/* raw file data (1751 bytes) */ +0x3c,0x68,0x74,0x6d,0x6c,0x3e,0x0d,0x0a,0x3c,0x68,0x65,0x61,0x64,0x3e,0x3c,0x74, +0x69,0x74,0x6c,0x65,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c,0x69, +0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50, +0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x74,0x69,0x74,0x6c,0x65,0x3e,0x3c,0x2f, +0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x3c,0x62,0x6f,0x64,0x79,0x20,0x62,0x67,0x63, +0x6f,0x6c,0x6f,0x72,0x3d,0x22,0x77,0x68,0x69,0x74,0x65,0x22,0x20,0x74,0x65,0x78, +0x74,0x3d,0x22,0x62,0x6c,0x61,0x63,0x6b,0x22,0x3e,0x0d,0x0a,0x0d,0x0a,0x20,0x20, +0x20,0x20,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22, +0x31,0x30,0x30,0x25,0x22,0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74, +0x72,0x20,0x76,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22,0x3e,0x3c, +0x74,0x64,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x38,0x30,0x22,0x3e,0x09,0x20, +0x20,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68, +0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73, +0x65,0x2f,0x22,0x3e,0x3c,0x69,0x6d,0x67,0x20,0x73,0x72,0x63,0x3d,0x22,0x2f,0x69, +0x6d,0x67,0x2f,0x73,0x69,0x63,0x73,0x2e,0x67,0x69,0x66,0x22,0x0d,0x0a,0x09,0x20, +0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x30,0x22,0x20,0x61,0x6c,0x74,0x3d, +0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x20,0x74,0x69,0x74,0x6c, +0x65,0x3d,0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x3e,0x3c,0x2f, +0x61,0x3e,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x20,0x77,0x69, +0x64,0x74,0x68,0x3d,0x22,0x35,0x30,0x30,0x22,0x3e,0x09,0x20,0x20,0x0d,0x0a,0x09, +0x20,0x20,0x3c,0x68,0x31,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c, +0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49, +0x50,0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x68,0x31,0x3e,0x0d,0x0a,0x09,0x20, +0x20,0x3c,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x54,0x68,0x65,0x20,0x77, +0x65,0x62,0x20,0x70,0x61,0x67,0x65,0x20,0x79,0x6f,0x75,0x20,0x61,0x72,0x65,0x20, +0x77,0x61,0x74,0x63,0x68,0x69,0x6e,0x67,0x20,0x77,0x61,0x73,0x20,0x73,0x65,0x72, +0x76,0x65,0x64,0x20,0x62,0x79,0x20,0x61,0x20,0x73,0x69,0x6d,0x70,0x6c,0x65,0x20, +0x77,0x65,0x62,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x73,0x65,0x72,0x76,0x65,0x72, +0x20,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x20,0x6f,0x6e,0x20,0x74,0x6f,0x70,0x20, +0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x6c,0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67, +0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50,0x20,0x73,0x74,0x61,0x63,0x6b,0x20, +0x3c,0x61,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68, +0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73, +0x65,0x2f,0x7e,0x61,0x64,0x61,0x6d,0x2f,0x6c,0x77,0x69,0x70,0x2f,0x22,0x3e,0x6c, +0x77,0x49,0x50,0x3c,0x2f,0x61,0x3e,0x2e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x2f,0x70, +0x3e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20, +0x6c,0x77,0x49,0x50,0x20,0x69,0x73,0x20,0x61,0x6e,0x20,0x6f,0x70,0x65,0x6e,0x20, +0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74, +0x61,0x74,0x69,0x6f,0x6e,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x54,0x43,0x50, +0x2f,0x49,0x50,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x70,0x72,0x6f,0x74,0x6f,0x63, +0x6f,0x6c,0x20,0x73,0x75,0x69,0x74,0x65,0x20,0x74,0x68,0x61,0x74,0x20,0x77,0x61, +0x73,0x20,0x6f,0x72,0x69,0x67,0x69,0x6e,0x61,0x6c,0x6c,0x79,0x20,0x77,0x72,0x69, +0x74,0x74,0x65,0x6e,0x20,0x62,0x79,0x20,0x3c,0x61,0x0d,0x0a,0x09,0x20,0x20,0x20, +0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77, +0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73,0x65,0x2f,0x7e,0x61,0x64,0x61,0x6d,0x2f, +0x6c,0x77,0x69,0x70,0x2f,0x22,0x3e,0x41,0x64,0x61,0x6d,0x20,0x44,0x75,0x6e,0x6b, +0x65,0x6c,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x6f,0x66,0x20,0x74,0x68,0x65, +0x20,0x53,0x77,0x65,0x64,0x69,0x73,0x68,0x20,0x49,0x6e,0x73,0x74,0x69,0x74,0x75, +0x74,0x65,0x20,0x6f,0x66,0x20,0x43,0x6f,0x6d,0x70,0x75,0x74,0x65,0x72,0x20,0x53, +0x63,0x69,0x65,0x6e,0x63,0x65,0x3c,0x2f,0x61,0x3e,0x20,0x62,0x75,0x74,0x20,0x6e, +0x6f,0x77,0x20,0x69,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x62,0x65,0x69,0x6e, +0x67,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x6c,0x79,0x20,0x64,0x65,0x76,0x65,0x6c, +0x6f,0x70,0x65,0x64,0x20,0x62,0x79,0x20,0x61,0x20,0x74,0x65,0x61,0x6d,0x20,0x6f, +0x66,0x20,0x64,0x65,0x76,0x65,0x6c,0x6f,0x70,0x65,0x72,0x73,0x0d,0x0a,0x09,0x20, +0x20,0x20,0x20,0x64,0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x64,0x20,0x77, +0x6f,0x72,0x6c,0x64,0x2d,0x77,0x69,0x64,0x65,0x2e,0x20,0x53,0x69,0x6e,0x63,0x65, +0x20,0x69,0x74,0x27,0x73,0x20,0x72,0x65,0x6c,0x65,0x61,0x73,0x65,0x2c,0x20,0x6c, +0x77,0x49,0x50,0x20,0x68,0x61,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x73,0x70, +0x75,0x72,0x72,0x65,0x64,0x20,0x61,0x20,0x6c,0x6f,0x74,0x20,0x6f,0x66,0x20,0x69, +0x6e,0x74,0x65,0x72,0x65,0x73,0x74,0x20,0x61,0x6e,0x64,0x20,0x68,0x61,0x73,0x20, +0x62,0x65,0x65,0x6e,0x20,0x70,0x6f,0x72,0x74,0x65,0x64,0x20,0x74,0x6f,0x20,0x73, +0x65,0x76,0x65,0x72,0x61,0x6c,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x70,0x6c,0x61, +0x74,0x66,0x6f,0x72,0x6d,0x73,0x20,0x61,0x6e,0x64,0x20,0x6f,0x70,0x65,0x72,0x61, +0x74,0x69,0x6e,0x67,0x20,0x73,0x79,0x73,0x74,0x65,0x6d,0x73,0x2e,0x20,0x6c,0x77, +0x49,0x50,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x75,0x73,0x65,0x64,0x20,0x65, +0x69,0x74,0x68,0x65,0x72,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x77,0x69,0x74,0x68, +0x20,0x6f,0x72,0x20,0x77,0x69,0x74,0x68,0x6f,0x75,0x74,0x20,0x61,0x6e,0x20,0x75, +0x6e,0x64,0x65,0x72,0x6c,0x79,0x69,0x6e,0x67,0x20,0x4f,0x53,0x2e,0x0d,0x0a,0x09, +0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d,0x0a, +0x09,0x20,0x20,0x20,0x20,0x54,0x68,0x65,0x20,0x66,0x6f,0x63,0x75,0x73,0x20,0x6f, +0x66,0x20,0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x20,0x54,0x43,0x50,0x2f,0x49, +0x50,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e, +0x20,0x69,0x73,0x20,0x74,0x6f,0x20,0x72,0x65,0x64,0x75,0x63,0x65,0x0d,0x0a,0x09, +0x20,0x20,0x20,0x20,0x74,0x68,0x65,0x20,0x52,0x41,0x4d,0x20,0x75,0x73,0x61,0x67, +0x65,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,0x73,0x74,0x69,0x6c,0x6c,0x20,0x68,0x61, +0x76,0x69,0x6e,0x67,0x20,0x61,0x20,0x66,0x75,0x6c,0x6c,0x20,0x73,0x63,0x61,0x6c, +0x65,0x20,0x54,0x43,0x50,0x2e,0x20,0x54,0x68,0x69,0x73,0x0d,0x0a,0x09,0x20,0x20, +0x20,0x20,0x6d,0x61,0x6b,0x65,0x73,0x20,0x6c,0x77,0x49,0x50,0x20,0x73,0x75,0x69, +0x74,0x61,0x62,0x6c,0x65,0x20,0x66,0x6f,0x72,0x20,0x75,0x73,0x65,0x20,0x69,0x6e, +0x20,0x65,0x6d,0x62,0x65,0x64,0x64,0x65,0x64,0x20,0x73,0x79,0x73,0x74,0x65,0x6d, +0x73,0x20,0x77,0x69,0x74,0x68,0x20,0x74,0x65,0x6e,0x73,0x0d,0x0a,0x09,0x20,0x20, +0x20,0x20,0x6f,0x66,0x20,0x6b,0x69,0x6c,0x6f,0x62,0x79,0x74,0x65,0x73,0x20,0x6f, +0x66,0x20,0x66,0x72,0x65,0x65,0x20,0x52,0x41,0x4d,0x20,0x61,0x6e,0x64,0x20,0x72, +0x6f,0x6f,0x6d,0x20,0x66,0x6f,0x72,0x20,0x61,0x72,0x6f,0x75,0x6e,0x64,0x20,0x34, +0x30,0x20,0x6b,0x69,0x6c,0x6f,0x62,0x79,0x74,0x65,0x73,0x0d,0x0a,0x09,0x20,0x20, +0x20,0x20,0x6f,0x66,0x20,0x63,0x6f,0x64,0x65,0x20,0x52,0x4f,0x4d,0x2e,0x0d,0x0a, +0x09,0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d, +0x0a,0x09,0x20,0x20,0x20,0x20,0x4d,0x6f,0x72,0x65,0x20,0x69,0x6e,0x66,0x6f,0x72, +0x6d,0x61,0x74,0x69,0x6f,0x6e,0x20,0x61,0x62,0x6f,0x75,0x74,0x20,0x6c,0x77,0x49, +0x50,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x66,0x6f,0x75,0x6e,0x64,0x20,0x61, +0x74,0x20,0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x0d,0x0a,0x09,0x20,0x20,0x20, +0x20,0x68,0x6f,0x6d,0x65,0x70,0x61,0x67,0x65,0x20,0x61,0x74,0x20,0x3c,0x61,0x0d, +0x0a,0x09,0x20,0x20,0x20,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68,0x74,0x74,0x70, +0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67, +0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f, +0x6c,0x77,0x69,0x70,0x2f,0x22,0x3e,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61, +0x76,0x61,0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72, +0x67,0x2f,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x2f, +0x3c,0x2f,0x61,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x6f,0x72,0x20,0x61,0x74, +0x20,0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x20,0x77,0x69,0x6b,0x69,0x20,0x61, +0x74,0x20,0x3c,0x61,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x68,0x72,0x65,0x66,0x3d, +0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6c,0x77,0x69,0x70,0x2e,0x77,0x69,0x6b, +0x69,0x61,0x2e,0x63,0x6f,0x6d,0x2f,0x22,0x3e,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f, +0x6c,0x77,0x69,0x70,0x2e,0x77,0x69,0x6b,0x69,0x61,0x2e,0x63,0x6f,0x6d,0x2f,0x3c, +0x2f,0x61,0x3e,0x2e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09, +0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x2f,0x74,0x72, +0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65, +0x3e,0x0d,0x0a,0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x68,0x74, +0x6d,0x6c,0x3e,0x0d,0x0a,0x0d,0x0a,}; + + + +const struct fsdata_file file__img_sics_gif[] = { { +file_NULL, +data__img_sics_gif, +data__img_sics_gif + 16, +sizeof(data__img_sics_gif) - 16, +FS_FILE_FLAGS_HEADER_INCLUDED | FS_FILE_FLAGS_HEADER_PERSISTENT, +}}; + +const struct fsdata_file file__404_html[] = { { +file__img_sics_gif, +data__404_html, +data__404_html + 12, +sizeof(data__404_html) - 12, +FS_FILE_FLAGS_HEADER_INCLUDED | FS_FILE_FLAGS_HEADER_PERSISTENT, +}}; + +const struct fsdata_file file__index_html[] = { { +file__404_html, +data__index_html, +data__index_html + 12, +sizeof(data__index_html) - 12, +FS_FILE_FLAGS_HEADER_INCLUDED | FS_FILE_FLAGS_HEADER_PERSISTENT, +}}; + +#define FS_ROOT file__index_html +#define FS_NUMFILES 3 + diff --git a/User/lwip_http - bak/fsdata_new.h b/User/lwip_http - bak/fsdata_new.h new file mode 100644 index 0000000..d31550d --- /dev/null +++ b/User/lwip_http - bak/fsdata_new.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_FSDATA_H +#define LWIP_FSDATA_H + +#include "lwip/apps/httpd_opts.h" +#include "lwip/apps/fs.h" + +/* THIS FILE IS DEPRECATED AND WILL BE REMOVED IN THE FUTURE */ +/* content was moved to fs.h to simplify #include structure */ + +#endif /* LWIP_FSDATA_H */ diff --git a/User/lwip_http - bak/http_cgi_ssi.h b/User/lwip_http - bak/http_cgi_ssi.h new file mode 100644 index 0000000..3877ae9 --- /dev/null +++ b/User/lwip_http - bak/http_cgi_ssi.h @@ -0,0 +1,43 @@ +/** + ****************************************************************************** + * @file LwIP/LwIP_HTTP_Server_Raw/Inc/http_cgi_ssi.h + * @author MCD Application Team + * @brief Header for http_cgi_ssi.c module + ****************************************************************************** + * @attention + * + *

                  © Copyright (c) 2017 STMicroelectronics. + * All rights reserved.

                  + * + * This software component is licensed by ST under Ultimate Liberty license + * SLA0044, the "License"; You may not use this file except in compliance with + * the License. You may obtain a copy of the License at: + * www.st.com/SLA0044 + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __HTTP_CGI_SSI_H +#define __HTTP_CGI_SSI_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ +/* Exported macro ------------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ +void http_server_init(void); + +#ifdef __cplusplus +} +#endif + +#endif /* __HTTP_CGI_SSI_H */ + + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ + diff --git a/User/lwip_http - bak/http_client.c b/User/lwip_http - bak/http_client.c new file mode 100644 index 0000000..82da60d --- /dev/null +++ b/User/lwip_http - bak/http_client.c @@ -0,0 +1,909 @@ +/** + * @file + * HTTP client + */ + +/* + * Copyright (c) 2018 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + */ + +/** + * @defgroup httpc HTTP client + * @ingroup apps + * @todo: + * - persistent connections + * - select outgoing http version + * - optionally follow redirect + * - check request uri for invalid characters? (e.g. encode spaces) + * - IPv6 support + */ + +#include "lwip/apps/http_client.h" + +#include "lwip/altcp_tcp.h" +#include "lwip/dns.h" +#include "lwip/debug.h" +#include "lwip/mem.h" +#include "lwip/altcp_tls.h" +#include "lwip/init.h" + +#include +#include +#include + +#if LWIP_TCP && LWIP_CALLBACK_API + +/** + * HTTPC_DEBUG: Enable debugging for HTTP client. + */ +#ifndef HTTPC_DEBUG +#define HTTPC_DEBUG LWIP_DBG_OFF +#endif + +/** Set this to 1 to keep server name and uri in request state */ +#ifndef HTTPC_DEBUG_REQUEST +#define HTTPC_DEBUG_REQUEST 0 +#endif + +/** This string is passed in the HTTP header as "User-Agent: " */ +#ifndef HTTPC_CLIENT_AGENT +#define HTTPC_CLIENT_AGENT "lwIP/" LWIP_VERSION_STRING " (http://savannah.nongnu.org/projects/lwip)" +#endif + +/* the various debug levels for this file */ +#define HTTPC_DEBUG_TRACE (HTTPC_DEBUG | LWIP_DBG_TRACE) +#define HTTPC_DEBUG_STATE (HTTPC_DEBUG | LWIP_DBG_STATE) +#define HTTPC_DEBUG_WARN (HTTPC_DEBUG | LWIP_DBG_LEVEL_WARNING) +#define HTTPC_DEBUG_WARN_STATE (HTTPC_DEBUG | LWIP_DBG_LEVEL_WARNING | LWIP_DBG_STATE) +#define HTTPC_DEBUG_SERIOUS (HTTPC_DEBUG | LWIP_DBG_LEVEL_SERIOUS) + +#define HTTPC_POLL_INTERVAL 1 +#define HTTPC_POLL_TIMEOUT 30 /* 15 seconds */ + +#define HTTPC_CONTENT_LEN_INVALID 0xFFFFFFFF + +/* GET request basic */ +#define HTTPC_REQ_11 "GET %s HTTP/1.1\r\n" /* URI */\ + "User-Agent: %s\r\n" /* User-Agent */ \ + "Accept: */*\r\n" \ + "Connection: Close\r\n" /* we don't support persistent connections, yet */ \ + "\r\n" +#define HTTPC_REQ_11_FORMAT(uri) HTTPC_REQ_11, uri, HTTPC_CLIENT_AGENT + +/* GET request with host */ +#define HTTPC_REQ_11_HOST "GET %s HTTP/1.1\r\n" /* URI */\ + "User-Agent: %s\r\n" /* User-Agent */ \ + "Accept: */*\r\n" \ + "Host: %s\r\n" /* server name */ \ + "Connection: Close\r\n" /* we don't support persistent connections, yet */ \ + "\r\n" +#define HTTPC_REQ_11_HOST_FORMAT(uri, srv_name) HTTPC_REQ_11_HOST, uri, HTTPC_CLIENT_AGENT, srv_name + +/* GET request with proxy */ +#define HTTPC_REQ_11_PROXY "GET http://%s%s HTTP/1.1\r\n" /* HOST, URI */\ + "User-Agent: %s\r\n" /* User-Agent */ \ + "Accept: */*\r\n" \ + "Host: %s\r\n" /* server name */ \ + "Connection: Close\r\n" /* we don't support persistent connections, yet */ \ + "\r\n" +#define HTTPC_REQ_11_PROXY_FORMAT(host, uri, srv_name) HTTPC_REQ_11_PROXY, host, uri, HTTPC_CLIENT_AGENT, srv_name + +/* GET request with proxy (non-default server port) */ +#define HTTPC_REQ_11_PROXY_PORT "GET http://%s:%d%s HTTP/1.1\r\n" /* HOST, host-port, URI */\ + "User-Agent: %s\r\n" /* User-Agent */ \ + "Accept: */*\r\n" \ + "Host: %s\r\n" /* server name */ \ + "Connection: Close\r\n" /* we don't support persistent connections, yet */ \ + "\r\n" +#define HTTPC_REQ_11_PROXY_PORT_FORMAT(host, host_port, uri, srv_name) HTTPC_REQ_11_PROXY_PORT, host, host_port, uri, HTTPC_CLIENT_AGENT, srv_name + +typedef enum ehttpc_parse_state { + HTTPC_PARSE_WAIT_FIRST_LINE = 0, + HTTPC_PARSE_WAIT_HEADERS, + HTTPC_PARSE_RX_DATA +} httpc_parse_state_t; + +typedef struct _httpc_state +{ + struct altcp_pcb* pcb; + ip_addr_t remote_addr; + u16_t remote_port; + int timeout_ticks; + struct pbuf *request; + struct pbuf *rx_hdrs; + u16_t rx_http_version; + u16_t rx_status; + altcp_recv_fn recv_fn; + const httpc_connection_t *conn_settings; + void* callback_arg; + u32_t rx_content_len; + u32_t hdr_content_len; + httpc_parse_state_t parse_state; +#if HTTPC_DEBUG_REQUEST + char* server_name; + char* uri; +#endif +} httpc_state_t; + +/** Free http client state and deallocate all resources within */ +static err_t +httpc_free_state(httpc_state_t* req) +{ + struct altcp_pcb* tpcb; + + if (req->request != NULL) { + pbuf_free(req->request); + req->request = NULL; + } + if (req->rx_hdrs != NULL) { + pbuf_free(req->rx_hdrs); + req->rx_hdrs = NULL; + } + + tpcb = req->pcb; + mem_free(req); + req = NULL; + + if (tpcb != NULL) { + err_t r; + altcp_arg(tpcb, NULL); + altcp_recv(tpcb, NULL); + altcp_err(tpcb, NULL); + altcp_poll(tpcb, NULL, 0); + altcp_sent(tpcb, NULL); + r = altcp_close(tpcb); + if (r != ERR_OK) { + altcp_abort(tpcb); + return ERR_ABRT; + } + } + return ERR_OK; +} + +/** Close the connection: call finished callback and free the state */ +static err_t +httpc_close(httpc_state_t* req, httpc_result_t result, u32_t server_response, err_t err) +{ + if (req != NULL) { + if (req->conn_settings != NULL) { + if (req->conn_settings->result_fn != NULL) { + req->conn_settings->result_fn(req->callback_arg, result, req->rx_content_len, server_response, err); + } + } + return httpc_free_state(req); + } + return ERR_OK; +} + +/** Parse http header response line 1 */ +static err_t +http_parse_response_status(struct pbuf *p, u16_t *http_version, u16_t *http_status, u16_t *http_status_str_offset) +{ + u16_t end1 = pbuf_memfind(p, "\r\n", 2, 0); + if (end1 != 0xFFFF) { + /* get parts of first line */ + u16_t space1, space2; + space1 = pbuf_memfind(p, " ", 1, 0); + if (space1 != 0xFFFF) { + if ((pbuf_memcmp(p, 0, "HTTP/", 5) == 0) && (pbuf_get_at(p, 6) == '.')) { + char status_num[10]; + size_t status_num_len; + /* parse http version */ + u16_t version = pbuf_get_at(p, 5) - '0'; + version <<= 8; + version |= pbuf_get_at(p, 7) - '0'; + *http_version = version; + + /* parse http status number */ + space2 = pbuf_memfind(p, " ", 1, space1 + 1); + if (space2 != 0xFFFF) { + *http_status_str_offset = space2 + 1; + status_num_len = space2 - space1 - 1; + } else { + status_num_len = end1 - space1 - 1; + } + memset(status_num, 0, sizeof(status_num)); + if (pbuf_copy_partial(p, status_num, (u16_t)status_num_len, space1 + 1) == status_num_len) { + int status = atoi(status_num); + if ((status > 0) && (status <= 0xFFFF)) { + *http_status = (u16_t)status; + return ERR_OK; + } + } + } + } + } + return ERR_VAL; +} + +/** Wait for all headers to be received, return its length and content-length (if available) */ +static err_t +http_wait_headers(struct pbuf *p, u32_t *content_length, u16_t *total_header_len) +{ + u16_t end1 = pbuf_memfind(p, "\r\n\r\n", 4, 0); + if (end1 < (0xFFFF - 2)) { + /* all headers received */ + /* check if we have a content length (@todo: case insensitive?) */ + u16_t content_len_hdr; + *content_length = HTTPC_CONTENT_LEN_INVALID; + *total_header_len = end1 + 4; + + content_len_hdr = pbuf_memfind(p, "Content-Length: ", 16, 0); + if (content_len_hdr != 0xFFFF) { + u16_t content_len_line_end = pbuf_memfind(p, "\r\n", 2, content_len_hdr); + if (content_len_line_end != 0xFFFF) { + char content_len_num[16]; + u16_t content_len_num_len = (u16_t)(content_len_line_end - content_len_hdr - 16); + memset(content_len_num, 0, sizeof(content_len_num)); + if (pbuf_copy_partial(p, content_len_num, content_len_num_len, content_len_hdr + 16) == content_len_num_len) { + int len = atoi(content_len_num); + if ((len >= 0) && ((u32_t)len < HTTPC_CONTENT_LEN_INVALID)) { + *content_length = (u32_t)len; + } + } + } + } + return ERR_OK; + } + return ERR_VAL; +} + +/** http client tcp recv callback */ +static err_t +httpc_tcp_recv(void *arg, struct altcp_pcb *pcb, struct pbuf *p, err_t r) +{ + httpc_state_t* req = (httpc_state_t*)arg; + LWIP_UNUSED_ARG(r); + + if (p == NULL) { + httpc_result_t result; + if (req->parse_state != HTTPC_PARSE_RX_DATA) { + /* did not get RX data yet */ + result = HTTPC_RESULT_ERR_CLOSED; + } else if ((req->hdr_content_len != HTTPC_CONTENT_LEN_INVALID) && + (req->hdr_content_len != req->rx_content_len)) { + /* header has been received with content length but not all data received */ + result = HTTPC_RESULT_ERR_CONTENT_LEN; + } else { + /* receiving data and either all data received or no content length header */ + result = HTTPC_RESULT_OK; + } + return httpc_close(req, result, req->rx_status, ERR_OK); + } + if (req->parse_state != HTTPC_PARSE_RX_DATA) { + if (req->rx_hdrs == NULL) { + req->rx_hdrs = p; + } else { + pbuf_cat(req->rx_hdrs, p); + } + if (req->parse_state == HTTPC_PARSE_WAIT_FIRST_LINE) { + u16_t status_str_off; + err_t err = http_parse_response_status(req->rx_hdrs, &req->rx_http_version, &req->rx_status, &status_str_off); + if (err == ERR_OK) { + /* don't care status string */ + req->parse_state = HTTPC_PARSE_WAIT_HEADERS; + } + } + if (req->parse_state == HTTPC_PARSE_WAIT_HEADERS) { + u16_t total_header_len; + err_t err = http_wait_headers(req->rx_hdrs, &req->hdr_content_len, &total_header_len); + if (err == ERR_OK) { + struct pbuf *q; + /* full header received, send window update for header bytes and call into client callback */ + altcp_recved(pcb, total_header_len); + if (req->conn_settings) { + if (req->conn_settings->headers_done_fn) { + err = req->conn_settings->headers_done_fn(req, req->callback_arg, req->rx_hdrs, total_header_len, req->hdr_content_len); + if (err != ERR_OK) { + return httpc_close(req, HTTPC_RESULT_LOCAL_ABORT, req->rx_status, err); + } + } + } + /* hide header bytes in pbuf */ + q = pbuf_free_header(req->rx_hdrs, total_header_len); + p = q; + req->rx_hdrs = NULL; + /* go on with data */ + req->parse_state = HTTPC_PARSE_RX_DATA; + } + } + } + if ((p != NULL) && (req->parse_state == HTTPC_PARSE_RX_DATA)) { + req->rx_content_len += p->tot_len; + if (req->recv_fn != NULL) { + /* directly return here: the connection migth already be aborted from the callback! */ + return req->recv_fn(req->callback_arg, pcb, p, r); + } else { + altcp_recved(pcb, p->tot_len); + pbuf_free(p); + } + } + return ERR_OK; +} + +/** http client tcp err callback */ +static void +httpc_tcp_err(void *arg, err_t err) +{ + httpc_state_t* req = (httpc_state_t*)arg; + if (req != NULL) { + /* pcb has already been deallocated */ + req->pcb = NULL; + httpc_close(req, HTTPC_RESULT_ERR_CLOSED, 0, err); + } +} + +/** http client tcp poll callback */ +static err_t +httpc_tcp_poll(void *arg, struct altcp_pcb *pcb) +{ + /* implement timeout */ + httpc_state_t* req = (httpc_state_t*)arg; + LWIP_UNUSED_ARG(pcb); + if (req != NULL) { + if (req->timeout_ticks) { + req->timeout_ticks--; + } + if (!req->timeout_ticks) { + return httpc_close(req, HTTPC_RESULT_ERR_TIMEOUT, 0, ERR_OK); + } + } + return ERR_OK; +} + +/** http client tcp sent callback */ +static err_t +httpc_tcp_sent(void *arg, struct altcp_pcb *pcb, u16_t len) +{ + /* nothing to do here for now */ + LWIP_UNUSED_ARG(arg); + LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(len); + return ERR_OK; +} + +/** http client tcp connected callback */ +static err_t +httpc_tcp_connected(void *arg, struct altcp_pcb *pcb, err_t err) +{ + err_t r; + httpc_state_t* req = (httpc_state_t*)arg; + LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(err); + + /* send request; last char is zero termination */ + r = altcp_write(req->pcb, req->request->payload, req->request->len - 1, TCP_WRITE_FLAG_COPY); + if (r != ERR_OK) { + /* could not write the single small request -> fail, don't retry */ + return httpc_close(req, HTTPC_RESULT_ERR_MEM, 0, r); + } + /* everything written, we can free the request */ + pbuf_free(req->request); + req->request = NULL; + + altcp_output(req->pcb); + return ERR_OK; +} + +/** Start the http request when the server IP addr is known */ +static err_t +httpc_get_internal_addr(httpc_state_t* req, const ip_addr_t *ipaddr) +{ + err_t err; + LWIP_ASSERT("req != NULL", req != NULL); + + if (&req->remote_addr != ipaddr) { + /* fill in remote addr if called externally */ + req->remote_addr = *ipaddr; + } + + err = altcp_connect(req->pcb, &req->remote_addr, req->remote_port, httpc_tcp_connected); + if (err == ERR_OK) { + return ERR_OK; + } + LWIP_DEBUGF(HTTPC_DEBUG_WARN_STATE, ("tcp_connect failed: %d\n", (int)err)); + return err; +} + +#if LWIP_DNS +/** DNS callback + * If ipaddr is non-NULL, resolving succeeded and the request can be sent, otherwise it failed. + */ +static void +httpc_dns_found(const char* hostname, const ip_addr_t *ipaddr, void *arg) +{ + httpc_state_t* req = (httpc_state_t*)arg; + err_t err; + httpc_result_t result; + + LWIP_UNUSED_ARG(hostname); + + if (ipaddr != NULL) { + err = httpc_get_internal_addr(req, ipaddr); + if (err == ERR_OK) { + return; + } + result = HTTPC_RESULT_ERR_CONNECT; + } else { + LWIP_DEBUGF(HTTPC_DEBUG_WARN_STATE, ("httpc_dns_found: failed to resolve hostname: %s\n", + hostname)); + result = HTTPC_RESULT_ERR_HOSTNAME; + err = ERR_ARG; + } + httpc_close(req, result, 0, err); +} +#endif /* LWIP_DNS */ + +/** Start the http request after converting 'server_name' to ip address (DNS or address string) */ +static err_t +httpc_get_internal_dns(httpc_state_t* req, const char* server_name) +{ + err_t err; + LWIP_ASSERT("req != NULL", req != NULL); + +#if LWIP_DNS + err = dns_gethostbyname(server_name, &req->remote_addr, httpc_dns_found, req); +#else + err = ipaddr_aton(server_name, &req->remote_addr) ? ERR_OK : ERR_ARG; +#endif + + if (err == ERR_OK) { + /* cached or IP-string */ + err = httpc_get_internal_addr(req, &req->remote_addr); + } else if (err == ERR_INPROGRESS) { + return ERR_OK; + } + return err; +} + +static int +httpc_create_request_string(const httpc_connection_t *settings, const char* server_name, int server_port, const char* uri, + int use_host, char *buffer, size_t buffer_size) +{ + if (settings->use_proxy) { + LWIP_ASSERT("server_name != NULL", server_name != NULL); + if (server_port != HTTP_DEFAULT_PORT) { + return snprintf(buffer, buffer_size, HTTPC_REQ_11_PROXY_PORT_FORMAT(server_name, server_port, uri, server_name)); + } else { + return snprintf(buffer, buffer_size, HTTPC_REQ_11_PROXY_FORMAT(server_name, uri, server_name)); + } + } else if (use_host) { + LWIP_ASSERT("server_name != NULL", server_name != NULL); + return snprintf(buffer, buffer_size, HTTPC_REQ_11_HOST_FORMAT(uri, server_name)); + } else { + return snprintf(buffer, buffer_size, HTTPC_REQ_11_FORMAT(uri)); + } +} + +/** Initialize the connection struct */ +static err_t +httpc_init_connection_common(httpc_state_t **connection, const httpc_connection_t *settings, const char* server_name, + u16_t server_port, const char* uri, altcp_recv_fn recv_fn, void* callback_arg, int use_host) +{ + size_t alloc_len; + mem_size_t mem_alloc_len; + int req_len, req_len2; + httpc_state_t *req; +#if HTTPC_DEBUG_REQUEST + size_t server_name_len, uri_len; +#endif + + LWIP_ASSERT("uri != NULL", uri != NULL); + + /* get request len */ + req_len = httpc_create_request_string(settings, server_name, server_port, uri, use_host, NULL, 0); + if ((req_len < 0) || (req_len > 0xFFFF)) { + return ERR_VAL; + } + /* alloc state and request in one block */ + alloc_len = sizeof(httpc_state_t); +#if HTTPC_DEBUG_REQUEST + server_name_len = server_name ? strlen(server_name) : 0; + uri_len = strlen(uri); + alloc_len += server_name_len + 1 + uri_len + 1; +#endif + mem_alloc_len = (mem_size_t)alloc_len; + if ((mem_alloc_len < alloc_len) || (req_len + 1 > 0xFFFF)) { + return ERR_VAL; + } + + req = (httpc_state_t*)mem_malloc((mem_size_t)alloc_len); + if(req == NULL) { + return ERR_MEM; + } + memset(req, 0, sizeof(httpc_state_t)); + req->timeout_ticks = HTTPC_POLL_TIMEOUT; + req->request = pbuf_alloc(PBUF_RAW, (u16_t)(req_len + 1), PBUF_RAM); + if (req->request == NULL) { + httpc_free_state(req); + return ERR_MEM; + } + if (req->request->next != NULL) { + /* need a pbuf in one piece */ + httpc_free_state(req); + return ERR_MEM; + } + req->hdr_content_len = HTTPC_CONTENT_LEN_INVALID; +#if HTTPC_DEBUG_REQUEST + req->server_name = (char*)(req + 1); + if (server_name) { + memcpy(req->server_name, server_name, server_name_len + 1); + } + req->uri = req->server_name + server_name_len + 1; + memcpy(req->uri, uri, uri_len + 1); +#endif + req->pcb = altcp_new(settings->altcp_allocator); + if(req->pcb == NULL) { + httpc_free_state(req); + return ERR_MEM; + } + req->remote_port = settings->use_proxy ? settings->proxy_port : server_port; + altcp_arg(req->pcb, req); + altcp_recv(req->pcb, httpc_tcp_recv); + altcp_err(req->pcb, httpc_tcp_err); + altcp_poll(req->pcb, httpc_tcp_poll, HTTPC_POLL_INTERVAL); + altcp_sent(req->pcb, httpc_tcp_sent); + + /* set up request buffer */ + req_len2 = httpc_create_request_string(settings, server_name, server_port, uri, use_host, + (char *)req->request->payload, req_len + 1); + if (req_len2 != req_len) { + httpc_free_state(req); + return ERR_VAL; + } + + req->recv_fn = recv_fn; + req->conn_settings = settings; + req->callback_arg = callback_arg; + + *connection = req; + return ERR_OK; +} + +/** + * Initialize the connection struct + */ +static err_t +httpc_init_connection(httpc_state_t **connection, const httpc_connection_t *settings, const char* server_name, + u16_t server_port, const char* uri, altcp_recv_fn recv_fn, void* callback_arg) +{ + return httpc_init_connection_common(connection, settings, server_name, server_port, uri, recv_fn, callback_arg, 1); +} + + +/** + * Initialize the connection struct (from IP address) + */ +static err_t +httpc_init_connection_addr(httpc_state_t **connection, const httpc_connection_t *settings, + const ip_addr_t* server_addr, u16_t server_port, const char* uri, + altcp_recv_fn recv_fn, void* callback_arg) +{ + char *server_addr_str = ipaddr_ntoa(server_addr); + if (server_addr_str == NULL) { + return ERR_VAL; + } + return httpc_init_connection_common(connection, settings, server_addr_str, server_port, uri, + recv_fn, callback_arg, 1); +} + +/** + * @ingroup httpc + * HTTP client API: get a file by passing server IP address + * + * @param server_addr IP address of the server to connect + * @param port tcp port of the server + * @param uri uri to get from the server, remember leading "/"! + * @param settings connection settings (callbacks, proxy, etc.) + * @param recv_fn the http body (not the headers) are passed to this callback + * @param callback_arg argument passed to all the callbacks + * @param connection retreives the connection handle (to match in callbacks) + * @return ERR_OK if starting the request succeeds (callback_fn will be called later) + * or an error code + */ +err_t +httpc_get_file(const ip_addr_t* server_addr, u16_t port, const char* uri, const httpc_connection_t *settings, + altcp_recv_fn recv_fn, void* callback_arg, httpc_state_t **connection) +{ + err_t err; + httpc_state_t* req; + + LWIP_ERROR("invalid parameters", (server_addr != NULL) && (uri != NULL) && (recv_fn != NULL), return ERR_ARG;); + + err = httpc_init_connection_addr(&req, settings, server_addr, port, + uri, recv_fn, callback_arg); + if (err != ERR_OK) { + return err; + } + + if (settings->use_proxy) { + err = httpc_get_internal_addr(req, &settings->proxy_addr); + } else { + err = httpc_get_internal_addr(req, server_addr); + } + if(err != ERR_OK) { + httpc_free_state(req); + return err; + } + + if (connection != NULL) { + *connection = req; + } + return ERR_OK; +} + +/** + * @ingroup httpc + * HTTP client API: get a file by passing server name as string (DNS name or IP address string) + * + * @param server_name server name as string (DNS name or IP address string) + * @param port tcp port of the server + * @param uri uri to get from the server, remember leading "/"! + * @param settings connection settings (callbacks, proxy, etc.) + * @param recv_fn the http body (not the headers) are passed to this callback + * @param callback_arg argument passed to all the callbacks + * @param connection retreives the connection handle (to match in callbacks) + * @return ERR_OK if starting the request succeeds (callback_fn will be called later) + * or an error code + */ +err_t +httpc_get_file_dns(const char* server_name, u16_t port, const char* uri, const httpc_connection_t *settings, + altcp_recv_fn recv_fn, void* callback_arg, httpc_state_t **connection) +{ + err_t err; + httpc_state_t* req; + + LWIP_ERROR("invalid parameters", (server_name != NULL) && (uri != NULL) && (recv_fn != NULL), return ERR_ARG;); + + err = httpc_init_connection(&req, settings, server_name, port, uri, recv_fn, callback_arg); + if (err != ERR_OK) { + return err; + } + + if (settings->use_proxy) { + err = httpc_get_internal_addr(req, &settings->proxy_addr); + } else { + err = httpc_get_internal_dns(req, server_name); + } + if(err != ERR_OK) { + httpc_free_state(req); + return err; + } + + if (connection != NULL) { + *connection = req; + } + return ERR_OK; +} + +#if LWIP_HTTPC_HAVE_FILE_IO +/* Implementation to disk via fopen/fwrite/fclose follows */ + +typedef struct _httpc_filestate +{ + const char* local_file_name; + FILE *file; + httpc_connection_t settings; + const httpc_connection_t *client_settings; + void *callback_arg; +} httpc_filestate_t; + +static void httpc_fs_result(void *arg, httpc_result_t httpc_result, u32_t rx_content_len, + u32_t srv_res, err_t err); + +/** Initalize http client state for download to file system */ +static err_t +httpc_fs_init(httpc_filestate_t **filestate_out, const char* local_file_name, + const httpc_connection_t *settings, void* callback_arg) +{ + httpc_filestate_t *filestate; + size_t file_len, alloc_len; + FILE *f; + + file_len = strlen(local_file_name); + alloc_len = sizeof(httpc_filestate_t) + file_len + 1; + + filestate = (httpc_filestate_t *)mem_malloc((mem_size_t)alloc_len); + if (filestate == NULL) { + return ERR_MEM; + } + memset(filestate, 0, sizeof(httpc_filestate_t)); + filestate->local_file_name = (const char *)(filestate + 1); + memcpy((char *)(filestate + 1), local_file_name, file_len + 1); + filestate->file = NULL; + filestate->client_settings = settings; + filestate->callback_arg = callback_arg; + /* copy client settings but override result callback */ + memcpy(&filestate->settings, settings, sizeof(httpc_connection_t)); + filestate->settings.result_fn = httpc_fs_result; + + f = fopen(local_file_name, "wb"); + if(f == NULL) { + /* could not open file */ + mem_free(filestate); + return ERR_VAL; + } + filestate->file = f; + *filestate_out = filestate; + return ERR_OK; +} + +/** Free http client state for download to file system */ +static void +httpc_fs_free(httpc_filestate_t *filestate) +{ + if (filestate != NULL) { + if (filestate->file != NULL) { + fclose(filestate->file); + filestate->file = NULL; + } + mem_free(filestate); + } +} + +/** Connection closed (success or error) */ +static void +httpc_fs_result(void *arg, httpc_result_t httpc_result, u32_t rx_content_len, + u32_t srv_res, err_t err) +{ + httpc_filestate_t *filestate = (httpc_filestate_t *)arg; + if (filestate != NULL) { + if (filestate->client_settings->result_fn != NULL) { + filestate->client_settings->result_fn(filestate->callback_arg, httpc_result, rx_content_len, + srv_res, err); + } + httpc_fs_free(filestate); + } +} + +/** tcp recv callback */ +static err_t +httpc_fs_tcp_recv(void *arg, struct altcp_pcb *pcb, struct pbuf *p, err_t err) +{ + httpc_filestate_t *filestate = (httpc_filestate_t*)arg; + struct pbuf* q; + LWIP_UNUSED_ARG(err); + + LWIP_ASSERT("p != NULL", p != NULL); + + for (q = p; q != NULL; q = q->next) { + fwrite(q->payload, 1, q->len, filestate->file); + } + altcp_recved(pcb, p->tot_len); + pbuf_free(p); + return ERR_OK; +} + +/** + * @ingroup httpc + * HTTP client API: get a file to disk by passing server IP address + * + * @param server_addr IP address of the server to connect + * @param port tcp port of the server + * @param uri uri to get from the server, remember leading "/"! + * @param settings connection settings (callbacks, proxy, etc.) + * @param callback_arg argument passed to all the callbacks + * @param connection retreives the connection handle (to match in callbacks) + * @return ERR_OK if starting the request succeeds (callback_fn will be called later) + * or an error code + */ +err_t +httpc_get_file_to_disk(const ip_addr_t* server_addr, u16_t port, const char* uri, const httpc_connection_t *settings, + void* callback_arg, const char* local_file_name, httpc_state_t **connection) +{ + err_t err; + httpc_state_t* req; + httpc_filestate_t *filestate; + + LWIP_ERROR("invalid parameters", (server_addr != NULL) && (uri != NULL) && (local_file_name != NULL), return ERR_ARG;); + + err = httpc_fs_init(&filestate, local_file_name, settings, callback_arg); + if (err != ERR_OK) { + return err; + } + + err = httpc_init_connection_addr(&req, &filestate->settings, server_addr, port, + uri, httpc_fs_tcp_recv, filestate); + if (err != ERR_OK) { + httpc_fs_free(filestate); + return err; + } + + if (settings->use_proxy) { + err = httpc_get_internal_addr(req, &settings->proxy_addr); + } else { + err = httpc_get_internal_addr(req, server_addr); + } + if(err != ERR_OK) { + httpc_fs_free(filestate); + httpc_free_state(req); + return err; + } + + if (connection != NULL) { + *connection = req; + } + return ERR_OK; +} + +/** + * @ingroup httpc + * HTTP client API: get a file to disk by passing server name as string (DNS name or IP address string) + * + * @param server_name server name as string (DNS name or IP address string) + * @param port tcp port of the server + * @param uri uri to get from the server, remember leading "/"! + * @param settings connection settings (callbacks, proxy, etc.) + * @param callback_arg argument passed to all the callbacks + * @param connection retreives the connection handle (to match in callbacks) + * @return ERR_OK if starting the request succeeds (callback_fn will be called later) + * or an error code + */ +err_t +httpc_get_file_dns_to_disk(const char* server_name, u16_t port, const char* uri, const httpc_connection_t *settings, + void* callback_arg, const char* local_file_name, httpc_state_t **connection) +{ + err_t err; + httpc_state_t* req; + httpc_filestate_t *filestate; + + LWIP_ERROR("invalid parameters", (server_name != NULL) && (uri != NULL) && (local_file_name != NULL), return ERR_ARG;); + + err = httpc_fs_init(&filestate, local_file_name, settings, callback_arg); + if (err != ERR_OK) { + return err; + } + + err = httpc_init_connection(&req, &filestate->settings, server_name, port, + uri, httpc_fs_tcp_recv, filestate); + if (err != ERR_OK) { + httpc_fs_free(filestate); + return err; + } + + if (settings->use_proxy) { + err = httpc_get_internal_addr(req, &settings->proxy_addr); + } else { + err = httpc_get_internal_dns(req, server_name); + } + if(err != ERR_OK) { + httpc_fs_free(filestate); + httpc_free_state(req); + return err; + } + + if (connection != NULL) { + *connection = req; + } + return ERR_OK; +} +#endif /* LWIP_HTTPC_HAVE_FILE_IO */ + +#endif /* LWIP_TCP && LWIP_CALLBACK_API */ diff --git a/User/lwip_http - bak/httpd.c b/User/lwip_http - bak/httpd.c new file mode 100644 index 0000000..ccc9ba7 --- /dev/null +++ b/User/lwip_http - bak/httpd.c @@ -0,0 +1,2746 @@ +/** + * @file + * LWIP HTTP server implementation + */ + +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * Simon Goldschmidt + * + */ + +/** + * @defgroup httpd HTTP server + * @ingroup apps + * + * This httpd supports for a + * rudimentary server-side-include facility which will replace tags of the form + * in any file whose extension is .shtml, .shtm or .ssi with + * strings provided by an include handler whose pointer is provided to the + * module via function http_set_ssi_handler(). + * Additionally, a simple common + * gateway interface (CGI) handling mechanism has been added to allow clients + * to hook functions to particular request URIs. + * + * To enable SSI support, define label LWIP_HTTPD_SSI in lwipopts.h. + * To enable CGI support, define label LWIP_HTTPD_CGI in lwipopts.h. + * + * By default, the server assumes that HTTP headers are already present in + * each file stored in the file system. By defining LWIP_HTTPD_DYNAMIC_HEADERS in + * lwipopts.h, this behavior can be changed such that the server inserts the + * headers automatically based on the extension of the file being served. If + * this mode is used, be careful to ensure that the file system image used + * does not already contain the header information. + * + * File system images without headers can be created using the makefsfile + * tool with the -h command line option. + * + * + * Notes about valid SSI tags + * -------------------------- + * + * The following assumptions are made about tags used in SSI markers: + * + * 1. No tag may contain '-' or whitespace characters within the tag name. + * 2. Whitespace is allowed between the tag leadin "". + * 3. The maximum tag name length is LWIP_HTTPD_MAX_TAG_NAME_LEN, currently 8 characters. + * + * Notes on CGI usage + * ------------------ + * + * The simple CGI support offered here works with GET method requests only + * and can handle up to 16 parameters encoded into the URI. The handler + * function may not write directly to the HTTP output but must return a + * filename that the HTTP server will send to the browser as a response to + * the incoming CGI request. + * + * + * + * The list of supported file types is quite short, so if makefsdata complains + * about an unknown extension, make sure to add it (and its doctype) to + * the 'g_psHTTPHeaders' list. + */ +#include "lwip/init.h" +#include "lwip/apps/httpd.h" +#include "lwip/debug.h" +#include "lwip/stats.h" +#include "lwip/apps/fs.h" +#include "httpd_structs.h" +#include "lwip/def.h" + +#include "lwip/altcp.h" +#include "lwip/altcp_tcp.h" +#if HTTPD_ENABLE_HTTPS +#include "lwip/altcp_tls.h" +#endif +#ifdef LWIP_HOOK_FILENAME +#include LWIP_HOOK_FILENAME +#endif +#if LWIP_HTTPD_TIMING +#include "lwip/sys.h" +#endif /* LWIP_HTTPD_TIMING */ + +#include /* memset */ +#include /* atoi */ +#include + +#if LWIP_TCP && LWIP_CALLBACK_API + +/** Minimum length for a valid HTTP/0.9 request: "GET /\r\n" -> 7 bytes */ +#define MIN_REQ_LEN 7 + +#define CRLF "\r\n" +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE +#define HTTP11_CONNECTIONKEEPALIVE "Connection: keep-alive" +#define HTTP11_CONNECTIONKEEPALIVE2 "Connection: Keep-Alive" +#endif + +#if LWIP_HTTPD_DYNAMIC_FILE_READ +#define HTTP_IS_DYNAMIC_FILE(hs) ((hs)->buf != NULL) +#else +#define HTTP_IS_DYNAMIC_FILE(hs) 0 +#endif + +/* This defines checks whether tcp_write has to copy data or not */ + +#ifndef HTTP_IS_DATA_VOLATILE +/** tcp_write does not have to copy data when sent from rom-file-system directly */ +#define HTTP_IS_DATA_VOLATILE(hs) (HTTP_IS_DYNAMIC_FILE(hs) ? TCP_WRITE_FLAG_COPY : 0) +#endif +/** Default: dynamic headers are sent from ROM (non-dynamic headers are handled like file data) */ +#ifndef HTTP_IS_HDR_VOLATILE +#define HTTP_IS_HDR_VOLATILE(hs, ptr) 0 +#endif + +/* Return values for http_send_*() */ +#define HTTP_DATA_TO_SEND_FREED 3 +#define HTTP_DATA_TO_SEND_BREAK 2 +#define HTTP_DATA_TO_SEND_CONTINUE 1 +#define HTTP_NO_DATA_TO_SEND 0 + +typedef struct { + const char *name; + u8_t shtml; +} default_filename; + +static const default_filename httpd_default_filenames[] = { + {"/index.shtml", 1 }, + {"/index.ssi", 1 }, + {"/index.shtm", 1 }, + {"/index.html", 0 }, + {"/index.htm", 0 } +}; + +#define NUM_DEFAULT_FILENAMES LWIP_ARRAYSIZE(httpd_default_filenames) + +#if LWIP_HTTPD_SUPPORT_REQUESTLIST +/** HTTP request is copied here from pbufs for simple parsing */ +static char httpd_req_buf[LWIP_HTTPD_MAX_REQ_LENGTH + 1]; +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + +#if LWIP_HTTPD_SUPPORT_POST +#if LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN > LWIP_HTTPD_MAX_REQUEST_URI_LEN +#define LWIP_HTTPD_URI_BUF_LEN LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN +#endif +#endif +#ifndef LWIP_HTTPD_URI_BUF_LEN +#define LWIP_HTTPD_URI_BUF_LEN LWIP_HTTPD_MAX_REQUEST_URI_LEN +#endif +#if LWIP_HTTPD_URI_BUF_LEN +/* Filename for response file to send when POST is finished or + * search for default files when a directory is requested. */ +static char http_uri_buf[LWIP_HTTPD_URI_BUF_LEN + 1]; +#endif + +#if LWIP_HTTPD_DYNAMIC_HEADERS +/* The number of individual strings that comprise the headers sent before each + * requested file. + */ +#define NUM_FILE_HDR_STRINGS 5 +#define HDR_STRINGS_IDX_HTTP_STATUS 0 /* e.g. "HTTP/1.0 200 OK\r\n" */ +#define HDR_STRINGS_IDX_SERVER_NAME 1 /* e.g. "Server: "HTTPD_SERVER_AGENT"\r\n" */ +#define HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE 2 /* e.g. "Content-Length: xy\r\n" and/or "Connection: keep-alive\r\n" */ +#define HDR_STRINGS_IDX_CONTENT_LEN_NR 3 /* the byte count, when content-length is used */ +#define HDR_STRINGS_IDX_CONTENT_TYPE 4 /* the content type (or default answer content type including default document) */ + +/* The dynamically generated Content-Length buffer needs space for CRLF + NULL */ +#define LWIP_HTTPD_MAX_CONTENT_LEN_OFFSET 3 +#ifndef LWIP_HTTPD_MAX_CONTENT_LEN_SIZE +/* The dynamically generated Content-Length buffer shall be able to work with + ~953 MB (9 digits) */ +#define LWIP_HTTPD_MAX_CONTENT_LEN_SIZE (9 + LWIP_HTTPD_MAX_CONTENT_LEN_OFFSET) +#endif +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ + +#if LWIP_HTTPD_SSI + +#define HTTPD_LAST_TAG_PART 0xFFFF + +enum tag_check_state { + TAG_NONE, /* Not processing an SSI tag */ + TAG_LEADIN, /* Tag lead in "" being processed */ + TAG_SENDING /* Sending tag replacement string */ +}; + +struct http_ssi_state { + const char *parsed; /* Pointer to the first unparsed byte in buf. */ +#if !LWIP_HTTPD_SSI_INCLUDE_TAG + const char *tag_started;/* Pointer to the first opening '<' of the tag. */ +#endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG */ + const char *tag_end; /* Pointer to char after the closing '>' of the tag. */ + u32_t parse_left; /* Number of unparsed bytes in buf. */ + u16_t tag_index; /* Counter used by tag parsing state machine */ + u16_t tag_insert_len; /* Length of insert in string tag_insert */ +#if LWIP_HTTPD_SSI_MULTIPART + u16_t tag_part; /* Counter passed to and changed by tag insertion function to insert multiple times */ +#endif /* LWIP_HTTPD_SSI_MULTIPART */ + u8_t tag_type; /* index into http_ssi_tag_desc array */ + u8_t tag_name_len; /* Length of the tag name in string tag_name */ + char tag_name[LWIP_HTTPD_MAX_TAG_NAME_LEN + 1]; /* Last tag name extracted */ + char tag_insert[LWIP_HTTPD_MAX_TAG_INSERT_LEN + 1]; /* Insert string for tag_name */ + enum tag_check_state tag_state; /* State of the tag processor */ +}; + +struct http_ssi_tag_description { + const char *lead_in; + const char *lead_out; +}; + +#endif /* LWIP_HTTPD_SSI */ + +struct http_state { +#if LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED + struct http_state *next; +#endif /* LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED */ + struct fs_file file_handle; + struct fs_file *handle; + const char *file; /* Pointer to first unsent byte in buf. */ + + struct altcp_pcb *pcb; +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + struct pbuf *req; +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + +#if LWIP_HTTPD_DYNAMIC_FILE_READ + char *buf; /* File read buffer. */ + int buf_len; /* Size of file read buffer, buf. */ +#endif /* LWIP_HTTPD_DYNAMIC_FILE_READ */ + u32_t left; /* Number of unsent bytes in buf. */ + u8_t retries; +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + u8_t keepalive; +#endif /* LWIP_HTTPD_SUPPORT_11_KEEPALIVE */ +#if LWIP_HTTPD_SSI + struct http_ssi_state *ssi; +#endif /* LWIP_HTTPD_SSI */ +#if LWIP_HTTPD_CGI + char *params[LWIP_HTTPD_MAX_CGI_PARAMETERS]; /* Params extracted from the request URI */ + char *param_vals[LWIP_HTTPD_MAX_CGI_PARAMETERS]; /* Values for each extracted param */ +#endif /* LWIP_HTTPD_CGI */ +#if LWIP_HTTPD_DYNAMIC_HEADERS + const char *hdrs[NUM_FILE_HDR_STRINGS]; /* HTTP headers to be sent. */ + char hdr_content_len[LWIP_HTTPD_MAX_CONTENT_LEN_SIZE]; + u16_t hdr_pos; /* The position of the first unsent header byte in the + current string */ + u16_t hdr_index; /* The index of the hdr string currently being sent. */ +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ +#if LWIP_HTTPD_TIMING + u32_t time_started; +#endif /* LWIP_HTTPD_TIMING */ +#if LWIP_HTTPD_SUPPORT_POST + u32_t post_content_len_left; +#if LWIP_HTTPD_POST_MANUAL_WND + u32_t unrecved_bytes; + u8_t no_auto_wnd; + u8_t post_finished; +#endif /* LWIP_HTTPD_POST_MANUAL_WND */ +#endif /* LWIP_HTTPD_SUPPORT_POST*/ +}; + +#if HTTPD_USE_MEM_POOL +LWIP_MEMPOOL_DECLARE(HTTPD_STATE, MEMP_NUM_PARALLEL_HTTPD_CONNS, sizeof(struct http_state), "HTTPD_STATE") +#if LWIP_HTTPD_SSI +LWIP_MEMPOOL_DECLARE(HTTPD_SSI_STATE, MEMP_NUM_PARALLEL_HTTPD_SSI_CONNS, sizeof(struct http_ssi_state), "HTTPD_SSI_STATE") +#define HTTP_FREE_SSI_STATE(x) LWIP_MEMPOOL_FREE(HTTPD_SSI_STATE, (x)) +#define HTTP_ALLOC_SSI_STATE() (struct http_ssi_state *)LWIP_MEMPOOL_ALLOC(HTTPD_SSI_STATE) +#endif /* LWIP_HTTPD_SSI */ +#define HTTP_ALLOC_HTTP_STATE() (struct http_state *)LWIP_MEMPOOL_ALLOC(HTTPD_STATE) +#define HTTP_FREE_HTTP_STATE(x) LWIP_MEMPOOL_FREE(HTTPD_STATE, (x)) +#else /* HTTPD_USE_MEM_POOL */ +#define HTTP_ALLOC_HTTP_STATE() (struct http_state *)mem_malloc(sizeof(struct http_state)) +#define HTTP_FREE_HTTP_STATE(x) mem_free(x) +#if LWIP_HTTPD_SSI +#define HTTP_ALLOC_SSI_STATE() (struct http_ssi_state *)mem_malloc(sizeof(struct http_ssi_state)) +#define HTTP_FREE_SSI_STATE(x) mem_free(x) +#endif /* LWIP_HTTPD_SSI */ +#endif /* HTTPD_USE_MEM_POOL */ + +static err_t http_close_conn(struct altcp_pcb *pcb, struct http_state *hs); +static err_t http_close_or_abort_conn(struct altcp_pcb *pcb, struct http_state *hs, u8_t abort_conn); +static err_t http_find_file(struct http_state *hs, const char *uri, int is_09); +static err_t http_init_file(struct http_state *hs, struct fs_file *file, int is_09, const char *uri, u8_t tag_check, char *params); +static err_t http_poll(void *arg, struct altcp_pcb *pcb); +static u8_t http_check_eof(struct altcp_pcb *pcb, struct http_state *hs); +#if LWIP_HTTPD_FS_ASYNC_READ +static void http_continue(void *connection); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + +#if LWIP_HTTPD_SSI +/* SSI insert handler function pointer. */ +static tSSIHandler httpd_ssi_handler; +#if !LWIP_HTTPD_SSI_RAW +static int httpd_num_tags; +static const char **httpd_tags; +#endif /* !LWIP_HTTPD_SSI_RAW */ + +/* Define the available tag lead-ins and corresponding lead-outs. + * ATTENTION: for the algorithm below using this array, it is essential + * that the lead in differs in the first character! */ +const struct http_ssi_tag_description http_ssi_tag_desc[] = { + {""}, + {"/*#", "*/"} +}; + +#endif /* LWIP_HTTPD_SSI */ + +#if LWIP_HTTPD_CGI +/* CGI handler information */ +static const tCGI *httpd_cgis; +static int httpd_num_cgis; +static int http_cgi_paramcount; +#define http_cgi_params hs->params +#define http_cgi_param_vals hs->param_vals +#elif LWIP_HTTPD_CGI_SSI +static char *http_cgi_params[LWIP_HTTPD_MAX_CGI_PARAMETERS]; /* Params extracted from the request URI */ +static char *http_cgi_param_vals[LWIP_HTTPD_MAX_CGI_PARAMETERS]; /* Values for each extracted param */ +#endif /* LWIP_HTTPD_CGI */ + +#if LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED +/** global list of active HTTP connections, use to kill the oldest when + running out of memory */ +static struct http_state *http_connections; + +static void +http_add_connection(struct http_state *hs) +{ + /* add the connection to the list */ + hs->next = http_connections; + http_connections = hs; +} + +static void +http_remove_connection(struct http_state *hs) +{ + /* take the connection off the list */ + if (http_connections) { + if (http_connections == hs) { + http_connections = hs->next; + } else { + struct http_state *last; + for (last = http_connections; last->next != NULL; last = last->next) { + if (last->next == hs) { + last->next = hs->next; + break; + } + } + } + } +} + +static void +http_kill_oldest_connection(u8_t ssi_required) +{ + struct http_state *hs = http_connections; + struct http_state *hs_free_next = NULL; + while (hs && hs->next) { +#if LWIP_HTTPD_SSI + if (ssi_required) { + if (hs->next->ssi != NULL) { + hs_free_next = hs; + } + } else +#else /* LWIP_HTTPD_SSI */ + LWIP_UNUSED_ARG(ssi_required); +#endif /* LWIP_HTTPD_SSI */ + { + hs_free_next = hs; + } + LWIP_ASSERT("broken list", hs != hs->next); + hs = hs->next; + } + if (hs_free_next != NULL) { + LWIP_ASSERT("hs_free_next->next != NULL", hs_free_next->next != NULL); + LWIP_ASSERT("hs_free_next->next->pcb != NULL", hs_free_next->next->pcb != NULL); + /* send RST when killing a connection because of memory shortage */ + http_close_or_abort_conn(hs_free_next->next->pcb, hs_free_next->next, 1); /* this also unlinks the http_state from the list */ + } +} +#else /* LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED */ + +#define http_add_connection(hs) +#define http_remove_connection(hs) + +#endif /* LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED */ + +#if LWIP_HTTPD_SSI +/** Allocate as struct http_ssi_state. */ +static struct http_ssi_state * +http_ssi_state_alloc(void) +{ + struct http_ssi_state *ret = HTTP_ALLOC_SSI_STATE(); +#if LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED + if (ret == NULL) { + http_kill_oldest_connection(1); + ret = HTTP_ALLOC_SSI_STATE(); + } +#endif /* LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED */ + if (ret != NULL) { + memset(ret, 0, sizeof(struct http_ssi_state)); + } + return ret; +} + +/** Free a struct http_ssi_state. */ +static void +http_ssi_state_free(struct http_ssi_state *ssi) +{ + if (ssi != NULL) { + HTTP_FREE_SSI_STATE(ssi); + } +} +#endif /* LWIP_HTTPD_SSI */ + +/** Initialize a struct http_state. + */ +static void +http_state_init(struct http_state *hs) +{ + /* Initialize the structure. */ + memset(hs, 0, sizeof(struct http_state)); +#if LWIP_HTTPD_DYNAMIC_HEADERS + /* Indicate that the headers are not yet valid */ + hs->hdr_index = NUM_FILE_HDR_STRINGS; +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ +} + +/** Allocate a struct http_state. */ +static struct http_state * +http_state_alloc(void) +{ + struct http_state *ret = HTTP_ALLOC_HTTP_STATE(); +#if LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED + if (ret == NULL) { + http_kill_oldest_connection(0); + ret = HTTP_ALLOC_HTTP_STATE(); + } +#endif /* LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED */ + if (ret != NULL) { + http_state_init(ret); + http_add_connection(ret); + } + return ret; +} + +/** Free a struct http_state. + * Also frees the file data if dynamic. + */ +static void +http_state_eof(struct http_state *hs) +{ + if (hs->handle) { +#if LWIP_HTTPD_TIMING + u32_t ms_needed = sys_now() - hs->time_started; + u32_t needed = LWIP_MAX(1, (ms_needed / 100)); + LWIP_DEBUGF(HTTPD_DEBUG_TIMING, ("httpd: needed %"U32_F" ms to send file of %d bytes -> %"U32_F" bytes/sec\n", + ms_needed, hs->handle->len, ((((u32_t)hs->handle->len) * 10) / needed))); +#endif /* LWIP_HTTPD_TIMING */ + fs_close(hs->handle); + hs->handle = NULL; + } +#if LWIP_HTTPD_DYNAMIC_FILE_READ + if (hs->buf != NULL) { + mem_free(hs->buf); + hs->buf = NULL; + } +#endif /* LWIP_HTTPD_DYNAMIC_FILE_READ */ +#if LWIP_HTTPD_SSI + if (hs->ssi) { + http_ssi_state_free(hs->ssi); + hs->ssi = NULL; + } +#endif /* LWIP_HTTPD_SSI */ +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + if (hs->req) { + pbuf_free(hs->req); + hs->req = NULL; + } +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ +} + +/** Free a struct http_state. + * Also frees the file data if dynamic. + */ +static void +http_state_free(struct http_state *hs) +{ + if (hs != NULL) { + http_state_eof(hs); + http_remove_connection(hs); + HTTP_FREE_HTTP_STATE(hs); + } +} + +/** Call tcp_write() in a loop trying smaller and smaller length + * + * @param pcb altcp_pcb to send + * @param ptr Data to send + * @param length Length of data to send (in/out: on return, contains the + * amount of data sent) + * @param apiflags directly passed to tcp_write + * @return the return value of tcp_write + */ +static err_t +http_write(struct altcp_pcb *pcb, const void *ptr, u16_t *length, u8_t apiflags) +{ + u16_t len, max_len; + err_t err; + LWIP_ASSERT("length != NULL", length != NULL); + len = *length; + if (len == 0) { + return ERR_OK; + } + /* We cannot send more data than space available in the send buffer. */ + max_len = altcp_sndbuf(pcb); + if (max_len < len) { + len = max_len; + } +#ifdef HTTPD_MAX_WRITE_LEN + /* Additional limitation: e.g. don't enqueue more than 2*mss at once */ + max_len = HTTPD_MAX_WRITE_LEN(pcb); + if (len > max_len) { + len = max_len; + } +#endif /* HTTPD_MAX_WRITE_LEN */ + do { + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Trying to send %d bytes\n", len)); + err = altcp_write(pcb, ptr, len, apiflags); + if (err == ERR_MEM) { + if ((altcp_sndbuf(pcb) == 0) || + (altcp_sndqueuelen(pcb) >= TCP_SND_QUEUELEN)) { + /* no need to try smaller sizes */ + len = 1; + } else { + len /= 2; + } + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, + ("Send failed, trying less (%d bytes)\n", len)); + } + } while ((err == ERR_MEM) && (len > 1)); + + if (err == ERR_OK) { + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Sent %d bytes\n", len)); + *length = len; + } else { + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Send failed with err %d (\"%s\")\n", err, lwip_strerr(err))); + *length = 0; + } + +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + /* ensure nagle is normally enabled (only disabled for persistent connections + when all data has been enqueued but the connection stays open for the next + request */ + altcp_nagle_enable(pcb); +#endif + + return err; +} + +/** + * The connection shall be actively closed (using RST to close from fault states). + * Reset the sent- and recv-callbacks. + * + * @param pcb the tcp pcb to reset callbacks + * @param hs connection state to free + */ +static err_t +http_close_or_abort_conn(struct altcp_pcb *pcb, struct http_state *hs, u8_t abort_conn) +{ + err_t err; + LWIP_DEBUGF(HTTPD_DEBUG, ("Closing connection %p\n", (void *)pcb)); + +#if LWIP_HTTPD_SUPPORT_POST + if (hs != NULL) { + if ((hs->post_content_len_left != 0) +#if LWIP_HTTPD_POST_MANUAL_WND + || ((hs->no_auto_wnd != 0) && (hs->unrecved_bytes != 0)) +#endif /* LWIP_HTTPD_POST_MANUAL_WND */ + ) { + /* make sure the post code knows that the connection is closed */ + http_uri_buf[0] = 0; + httpd_post_finished(hs, http_uri_buf, LWIP_HTTPD_URI_BUF_LEN); + } + } +#endif /* LWIP_HTTPD_SUPPORT_POST*/ + + + altcp_arg(pcb, NULL); + altcp_recv(pcb, NULL); + altcp_err(pcb, NULL); + altcp_poll(pcb, NULL, 0); + altcp_sent(pcb, NULL); + if (hs != NULL) { + http_state_free(hs); + } + + if (abort_conn) { + altcp_abort(pcb); + return ERR_OK; + } + err = altcp_close(pcb); + if (err != ERR_OK) { + LWIP_DEBUGF(HTTPD_DEBUG, ("Error %d closing %p\n", err, (void *)pcb)); + /* error closing, try again later in poll */ + altcp_poll(pcb, http_poll, HTTPD_POLL_INTERVAL); + } + return err; +} + +/** + * The connection shall be actively closed. + * Reset the sent- and recv-callbacks. + * + * @param pcb the tcp pcb to reset callbacks + * @param hs connection state to free + */ +static err_t +http_close_conn(struct altcp_pcb *pcb, struct http_state *hs) +{ + return http_close_or_abort_conn(pcb, hs, 0); +} + +/** End of file: either close the connection (Connection: close) or + * close the file (Connection: keep-alive) + */ +static void +http_eof(struct altcp_pcb *pcb, struct http_state *hs) +{ + /* HTTP/1.1 persistent connection? (Not supported for SSI) */ +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + if (hs->keepalive) { + http_remove_connection(hs); + + http_state_eof(hs); + http_state_init(hs); + /* restore state: */ + hs->pcb = pcb; + hs->keepalive = 1; + http_add_connection(hs); + /* ensure nagle doesn't interfere with sending all data as fast as possible: */ + altcp_nagle_disable(pcb); + } else +#endif /* LWIP_HTTPD_SUPPORT_11_KEEPALIVE */ + { + http_close_conn(pcb, hs); + } +} + +#if LWIP_HTTPD_CGI || LWIP_HTTPD_CGI_SSI +/** + * Extract URI parameters from the parameter-part of an URI in the form + * "test.cgi?x=y" @todo: better explanation! + * Pointers to the parameters are stored in hs->param_vals. + * + * @param hs http connection state + * @param params pointer to the NULL-terminated parameter string from the URI + * @return number of parameters extracted + */ +static int +extract_uri_parameters(struct http_state *hs, char *params) +{ + char *pair; + char *equals; + int loop; + + LWIP_UNUSED_ARG(hs); + + /* If we have no parameters at all, return immediately. */ + if (!params || (params[0] == '\0')) { + return (0); + } + + /* Get a pointer to our first parameter */ + pair = params; + + /* Parse up to LWIP_HTTPD_MAX_CGI_PARAMETERS from the passed string and ignore the + * remainder (if any) */ + for (loop = 0; (loop < LWIP_HTTPD_MAX_CGI_PARAMETERS) && pair; loop++) { + + /* Save the name of the parameter */ + http_cgi_params[loop] = pair; + + /* Remember the start of this name=value pair */ + equals = pair; + + /* Find the start of the next name=value pair and replace the delimiter + * with a 0 to terminate the previous pair string. */ + pair = strchr(pair, '&'); + if (pair) { + *pair = '\0'; + pair++; + } else { + /* We didn't find a new parameter so find the end of the URI and + * replace the space with a '\0' */ + pair = strchr(equals, ' '); + if (pair) { + *pair = '\0'; + } + + /* Revert to NULL so that we exit the loop as expected. */ + pair = NULL; + } + + /* Now find the '=' in the previous pair, replace it with '\0' and save + * the parameter value string. */ + equals = strchr(equals, '='); + if (equals) { + *equals = '\0'; + http_cgi_param_vals[loop] = equals + 1; + } else { + http_cgi_param_vals[loop] = NULL; + } + } + + return loop; +} +#endif /* LWIP_HTTPD_CGI || LWIP_HTTPD_CGI_SSI */ + +#if LWIP_HTTPD_SSI +/** + * Insert a tag (found in an shtml in the form of "" into the file. + * The tag's name is stored in ssi->tag_name (NULL-terminated), the replacement + * should be written to hs->tag_insert (up to a length of LWIP_HTTPD_MAX_TAG_INSERT_LEN). + * The amount of data written is stored to ssi->tag_insert_len. + * + * @todo: return tag_insert_len - maybe it can be removed from struct http_state? + * + * @param hs http connection state + */ +static void +get_tag_insert(struct http_state *hs) +{ +#if LWIP_HTTPD_SSI_RAW + const char *tag; +#else /* LWIP_HTTPD_SSI_RAW */ + int tag; +#endif /* LWIP_HTTPD_SSI_RAW */ + size_t len; + struct http_ssi_state *ssi; +#if LWIP_HTTPD_SSI_MULTIPART + u16_t current_tag_part; +#endif /* LWIP_HTTPD_SSI_MULTIPART */ + + LWIP_ASSERT("hs != NULL", hs != NULL); + ssi = hs->ssi; + LWIP_ASSERT("ssi != NULL", ssi != NULL); +#if LWIP_HTTPD_SSI_MULTIPART + current_tag_part = ssi->tag_part; + ssi->tag_part = HTTPD_LAST_TAG_PART; +#endif /* LWIP_HTTPD_SSI_MULTIPART */ +#if LWIP_HTTPD_SSI_RAW + tag = ssi->tag_name; +#endif + + if (httpd_ssi_handler +#if !LWIP_HTTPD_SSI_RAW + && httpd_tags && httpd_num_tags +#endif /* !LWIP_HTTPD_SSI_RAW */ + ) { + + /* Find this tag in the list we have been provided. */ +#if LWIP_HTTPD_SSI_RAW + { +#else /* LWIP_HTTPD_SSI_RAW */ + for (tag = 0; tag < httpd_num_tags; tag++) { + if (strcmp(ssi->tag_name, httpd_tags[tag]) == 0) +#endif /* LWIP_HTTPD_SSI_RAW */ + { + ssi->tag_insert_len = httpd_ssi_handler(tag, ssi->tag_insert, + LWIP_HTTPD_MAX_TAG_INSERT_LEN +#if LWIP_HTTPD_SSI_MULTIPART + , current_tag_part, &ssi->tag_part +#endif /* LWIP_HTTPD_SSI_MULTIPART */ +#if LWIP_HTTPD_FILE_STATE + , (hs->handle ? hs->handle->state : NULL) +#endif /* LWIP_HTTPD_FILE_STATE */ + ); +#if LWIP_HTTPD_SSI_RAW + if (ssi->tag_insert_len != HTTPD_SSI_TAG_UNKNOWN) +#endif /* LWIP_HTTPD_SSI_RAW */ + { + return; + } + } + } + } + + /* If we drop out, we were asked to serve a page which contains tags that + * we don't have a handler for. Merely echo back the tags with an error + * marker. */ +#define UNKNOWN_TAG1_TEXT "***UNKNOWN TAG " +#define UNKNOWN_TAG1_LEN 18 +#define UNKNOWN_TAG2_TEXT "***" +#define UNKNOWN_TAG2_LEN 7 + len = LWIP_MIN(sizeof(ssi->tag_name), LWIP_MIN(strlen(ssi->tag_name), + LWIP_HTTPD_MAX_TAG_INSERT_LEN - (UNKNOWN_TAG1_LEN + UNKNOWN_TAG2_LEN))); + MEMCPY(ssi->tag_insert, UNKNOWN_TAG1_TEXT, UNKNOWN_TAG1_LEN); + MEMCPY(&ssi->tag_insert[UNKNOWN_TAG1_LEN], ssi->tag_name, len); + MEMCPY(&ssi->tag_insert[UNKNOWN_TAG1_LEN + len], UNKNOWN_TAG2_TEXT, UNKNOWN_TAG2_LEN); + ssi->tag_insert[UNKNOWN_TAG1_LEN + len + UNKNOWN_TAG2_LEN] = 0; + + len = strlen(ssi->tag_insert); + LWIP_ASSERT("len <= 0xffff", len <= 0xffff); + ssi->tag_insert_len = (u16_t)len; +} +#endif /* LWIP_HTTPD_SSI */ + +#if LWIP_HTTPD_DYNAMIC_HEADERS +/** + * Generate the relevant HTTP headers for the given filename and write + * them into the supplied buffer. + */ +static void +get_http_headers(struct http_state *hs, const char *uri) +{ + size_t content_type; + char *tmp; + char *ext; + char *vars; + + /* In all cases, the second header we send is the server identification + so set it here. */ + hs->hdrs[HDR_STRINGS_IDX_SERVER_NAME] = g_psHTTPHeaderStrings[HTTP_HDR_SERVER]; + hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE] = NULL; + hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_NR] = NULL; + + /* Is this a normal file or the special case we use to send back the + default "404: Page not found" response? */ + if (uri == NULL) { + hs->hdrs[HDR_STRINGS_IDX_HTTP_STATUS] = g_psHTTPHeaderStrings[HTTP_HDR_NOT_FOUND]; +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + if (hs->keepalive) { + hs->hdrs[HDR_STRINGS_IDX_CONTENT_TYPE] = g_psHTTPHeaderStrings[DEFAULT_404_HTML_PERSISTENT]; + } else +#endif + { + hs->hdrs[HDR_STRINGS_IDX_CONTENT_TYPE] = g_psHTTPHeaderStrings[DEFAULT_404_HTML]; + } + + /* Set up to send the first header string. */ + hs->hdr_index = 0; + hs->hdr_pos = 0; + return; + } + /* We are dealing with a particular filename. Look for one other + special case. We assume that any filename with "404" in it must be + indicative of a 404 server error whereas all other files require + the 200 OK header. */ + if (strstr(uri, "404")) { + hs->hdrs[HDR_STRINGS_IDX_HTTP_STATUS] = g_psHTTPHeaderStrings[HTTP_HDR_NOT_FOUND]; + } else if (strstr(uri, "400")) { + hs->hdrs[HDR_STRINGS_IDX_HTTP_STATUS] = g_psHTTPHeaderStrings[HTTP_HDR_BAD_REQUEST]; + } else if (strstr(uri, "501")) { + hs->hdrs[HDR_STRINGS_IDX_HTTP_STATUS] = g_psHTTPHeaderStrings[HTTP_HDR_NOT_IMPL]; + } else { + hs->hdrs[HDR_STRINGS_IDX_HTTP_STATUS] = g_psHTTPHeaderStrings[HTTP_HDR_OK]; + } + + /* Determine if the URI has any variables and, if so, temporarily remove + them. */ + vars = strchr(uri, '?'); + if (vars) { + *vars = '\0'; + } + + /* Get a pointer to the file extension. We find this by looking for the + last occurrence of "." in the filename passed. */ + ext = NULL; + tmp = strchr(uri, '.'); + while (tmp) { + ext = tmp + 1; + tmp = strchr(ext, '.'); + } + if (ext != NULL) { + /* Now determine the content type and add the relevant header for that. */ + for (content_type = 0; content_type < NUM_HTTP_HEADERS; content_type++) { + /* Have we found a matching extension? */ + if (!lwip_stricmp(g_psHTTPHeaders[content_type].extension, ext)) { + break; + } + } + } else { + content_type = NUM_HTTP_HEADERS; + } + + /* Reinstate the parameter marker if there was one in the original URI. */ + if (vars) { + *vars = '?'; + } + +#if LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI + /* Does the URL passed have any file extension? If not, we assume it + is a special-case URL used for control state notification and we do + not send any HTTP headers with the response. */ + if (!ext) { + /* Force the header index to a value indicating that all headers + have already been sent. */ + hs->hdr_index = NUM_FILE_HDR_STRINGS; + return; + } +#endif /* LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI */ + /* Did we find a matching extension? */ + if (content_type < NUM_HTTP_HEADERS) { + /* yes, store it */ + hs->hdrs[HDR_STRINGS_IDX_CONTENT_TYPE] = g_psHTTPHeaders[content_type].content_type; + } else if (!ext) { + /* no, no extension found -> use binary transfer to prevent the browser adding '.txt' on save */ + hs->hdrs[HDR_STRINGS_IDX_CONTENT_TYPE] = HTTP_HDR_APP; + } else { + /* No - use the default, plain text file type. */ + hs->hdrs[HDR_STRINGS_IDX_CONTENT_TYPE] = HTTP_HDR_DEFAULT_TYPE; + } + /* Set up to send the first header string. */ + hs->hdr_index = 0; + hs->hdr_pos = 0; +} + +/* Add content-length header? */ +static void +get_http_content_length(struct http_state *hs) +{ + u8_t add_content_len = 0; + + LWIP_ASSERT("already been here?", hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE] == NULL); + + add_content_len = 0; +#if LWIP_HTTPD_SSI + if (hs->ssi == NULL) /* @todo: get maximum file length from SSI */ +#endif /* LWIP_HTTPD_SSI */ + { + if ((hs->handle != NULL) && (hs->handle->flags & FS_FILE_FLAGS_HEADER_PERSISTENT)) { + add_content_len = 1; + } + } + if (add_content_len) { + size_t len; + lwip_itoa(hs->hdr_content_len, (size_t)LWIP_HTTPD_MAX_CONTENT_LEN_SIZE, + hs->handle->len); + len = strlen(hs->hdr_content_len); + if (len <= LWIP_HTTPD_MAX_CONTENT_LEN_SIZE - LWIP_HTTPD_MAX_CONTENT_LEN_OFFSET) { + SMEMCPY(&hs->hdr_content_len[len], CRLF, 3); + hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_NR] = hs->hdr_content_len; + } else { + add_content_len = 0; + } + } +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + if (add_content_len) { + hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE] = g_psHTTPHeaderStrings[HTTP_HDR_KEEPALIVE_LEN]; + } else { + hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE] = g_psHTTPHeaderStrings[HTTP_HDR_CONN_CLOSE]; + hs->keepalive = 0; + } +#else /* LWIP_HTTPD_SUPPORT_11_KEEPALIVE */ + if (add_content_len) { + hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE] = g_psHTTPHeaderStrings[HTTP_HDR_CONTENT_LENGTH]; + } +#endif /* LWIP_HTTPD_SUPPORT_11_KEEPALIVE */ +} + +/** Sub-function of http_send(): send dynamic headers + * + * @returns: - HTTP_NO_DATA_TO_SEND: no new data has been enqueued + * - HTTP_DATA_TO_SEND_CONTINUE: continue with sending HTTP body + * - HTTP_DATA_TO_SEND_BREAK: data has been enqueued, headers pending, + * so don't send HTTP body yet + * - HTTP_DATA_TO_SEND_FREED: http_state and pcb are already freed + */ +static u8_t +http_send_headers(struct altcp_pcb *pcb, struct http_state *hs) +{ + err_t err; + u16_t len; + u8_t data_to_send = HTTP_NO_DATA_TO_SEND; + u16_t hdrlen, sendlen; + + if (hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE] == NULL) { + /* set up "content-length" and "connection:" headers */ + get_http_content_length(hs); + } + + /* How much data can we send? */ + len = altcp_sndbuf(pcb); + sendlen = len; + + while (len && (hs->hdr_index < NUM_FILE_HDR_STRINGS) && sendlen) { + const void *ptr; + u16_t old_sendlen; + u8_t apiflags; + /* How much do we have to send from the current header? */ + hdrlen = (u16_t)strlen(hs->hdrs[hs->hdr_index]); + + /* How much of this can we send? */ + sendlen = (len < (hdrlen - hs->hdr_pos)) ? len : (hdrlen - hs->hdr_pos); + + /* Send this amount of data or as much as we can given memory + * constraints. */ + ptr = (const void *)(hs->hdrs[hs->hdr_index] + hs->hdr_pos); + old_sendlen = sendlen; + apiflags = HTTP_IS_HDR_VOLATILE(hs, ptr); + if (hs->hdr_index == HDR_STRINGS_IDX_CONTENT_LEN_NR) { + /* content-length is always volatile */ + apiflags |= TCP_WRITE_FLAG_COPY; + } + if (hs->hdr_index < NUM_FILE_HDR_STRINGS - 1) { + apiflags |= TCP_WRITE_FLAG_MORE; + } + err = http_write(pcb, ptr, &sendlen, apiflags); + if ((err == ERR_OK) && (old_sendlen != sendlen)) { + /* Remember that we added some more data to be transmitted. */ + data_to_send = HTTP_DATA_TO_SEND_CONTINUE; + } else if (err != ERR_OK) { + /* special case: http_write does not try to send 1 byte */ + sendlen = 0; + } + + /* Fix up the header position for the next time round. */ + hs->hdr_pos += sendlen; + len -= sendlen; + + /* Have we finished sending this string? */ + if (hs->hdr_pos == hdrlen) { + /* Yes - move on to the next one */ + hs->hdr_index++; + /* skip headers that are NULL (not all headers are required) */ + while ((hs->hdr_index < NUM_FILE_HDR_STRINGS) && + (hs->hdrs[hs->hdr_index] == NULL)) { + hs->hdr_index++; + } + hs->hdr_pos = 0; + } + } + + if ((hs->hdr_index >= NUM_FILE_HDR_STRINGS) && (hs->file == NULL)) { + /* When we are at the end of the headers, check for data to send + * instead of waiting for ACK from remote side to continue + * (which would happen when sending files from async read). */ + if (http_check_eof(pcb, hs)) { + data_to_send = HTTP_DATA_TO_SEND_BREAK; + } else { + /* At this point, for non-keepalive connections, hs is deallocated an + pcb is closed. */ + return HTTP_DATA_TO_SEND_FREED; + } + } + /* If we get here and there are still header bytes to send, we send + * the header information we just wrote immediately. If there are no + * more headers to send, but we do have file data to send, drop through + * to try to send some file data too. */ + if ((hs->hdr_index < NUM_FILE_HDR_STRINGS) || !hs->file) { + LWIP_DEBUGF(HTTPD_DEBUG, ("tcp_output\n")); + return HTTP_DATA_TO_SEND_BREAK; + } + return data_to_send; +} +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ + +/** Sub-function of http_send(): end-of-file (or block) is reached, + * either close the file or read the next block (if supported). + * + * @returns: 0 if the file is finished or no data has been read + * 1 if the file is not finished and data has been read + */ +static u8_t +http_check_eof(struct altcp_pcb *pcb, struct http_state *hs) +{ + int bytes_left; +#if LWIP_HTTPD_DYNAMIC_FILE_READ + int count; +#ifdef HTTPD_MAX_WRITE_LEN + int max_write_len; +#endif /* HTTPD_MAX_WRITE_LEN */ +#endif /* LWIP_HTTPD_DYNAMIC_FILE_READ */ + + /* Do we have a valid file handle? */ + if (hs->handle == NULL) { + /* No - close the connection. */ + http_eof(pcb, hs); + return 0; + } + bytes_left = fs_bytes_left(hs->handle); + if (bytes_left <= 0) { + /* We reached the end of the file so this request is done. */ + LWIP_DEBUGF(HTTPD_DEBUG, ("End of file.\n")); + http_eof(pcb, hs); + return 0; + } +#if LWIP_HTTPD_DYNAMIC_FILE_READ + /* Do we already have a send buffer allocated? */ + if (hs->buf) { + /* Yes - get the length of the buffer */ + count = LWIP_MIN(hs->buf_len, bytes_left); + } else { + /* We don't have a send buffer so allocate one now */ + count = altcp_sndbuf(pcb); + if (bytes_left < count) { + count = bytes_left; + } +#ifdef HTTPD_MAX_WRITE_LEN + /* Additional limitation: e.g. don't enqueue more than 2*mss at once */ + max_write_len = HTTPD_MAX_WRITE_LEN(pcb); + if (count > max_write_len) { + count = max_write_len; + } +#endif /* HTTPD_MAX_WRITE_LEN */ + do { + hs->buf = (char *)mem_malloc((mem_size_t)count); + if (hs->buf != NULL) { + hs->buf_len = count; + break; + } + count = count / 2; + } while (count > 100); + + /* Did we get a send buffer? If not, return immediately. */ + if (hs->buf == NULL) { + LWIP_DEBUGF(HTTPD_DEBUG, ("No buff\n")); + return 0; + } + } + + /* Read a block of data from the file. */ + LWIP_DEBUGF(HTTPD_DEBUG, ("Trying to read %d bytes.\n", count)); + +#if LWIP_HTTPD_FS_ASYNC_READ + count = fs_read_async(hs->handle, hs->buf, count, http_continue, hs); +#else /* LWIP_HTTPD_FS_ASYNC_READ */ + count = fs_read(hs->handle, hs->buf, count); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + if (count < 0) { + if (count == FS_READ_DELAYED) { + /* Delayed read, wait for FS to unblock us */ + return 0; + } + /* We reached the end of the file so this request is done. + * @todo: close here for HTTP/1.1 when reading file fails */ + LWIP_DEBUGF(HTTPD_DEBUG, ("End of file.\n")); + http_eof(pcb, hs); + return 0; + } + + /* Set up to send the block of data we just read */ + LWIP_DEBUGF(HTTPD_DEBUG, ("Read %d bytes.\n", count)); + hs->left = count; + hs->file = hs->buf; +#if LWIP_HTTPD_SSI + if (hs->ssi) { + hs->ssi->parse_left = count; + hs->ssi->parsed = hs->buf; + } +#endif /* LWIP_HTTPD_SSI */ +#else /* LWIP_HTTPD_DYNAMIC_FILE_READ */ + LWIP_ASSERT("SSI and DYNAMIC_HEADERS turned off but eof not reached", 0); +#endif /* LWIP_HTTPD_SSI || LWIP_HTTPD_DYNAMIC_HEADERS */ + return 1; +} + +/** Sub-function of http_send(): This is the normal send-routine for non-ssi files + * + * @returns: - 1: data has been written (so call tcp_ouput) + * - 0: no data has been written (no need to call tcp_output) + */ +static u8_t +http_send_data_nonssi(struct altcp_pcb *pcb, struct http_state *hs) +{ + err_t err; + u16_t len; + u8_t data_to_send = 0; + + /* We are not processing an SHTML file so no tag checking is necessary. + * Just send the data as we received it from the file. */ + len = (u16_t)LWIP_MIN(hs->left, 0xffff); + + err = http_write(pcb, hs->file, &len, HTTP_IS_DATA_VOLATILE(hs)); + if (err == ERR_OK) { + data_to_send = 1; + hs->file += len; + hs->left -= len; + } + + return data_to_send; +} + +#if LWIP_HTTPD_SSI +/** Sub-function of http_send(): This is the send-routine for ssi files + * + * @returns: - 1: data has been written (so call tcp_ouput) + * - 0: no data has been written (no need to call tcp_output) + */ +static u8_t +http_send_data_ssi(struct altcp_pcb *pcb, struct http_state *hs) +{ + err_t err = ERR_OK; + u16_t len; + u8_t data_to_send = 0; + u8_t tag_type; + + struct http_ssi_state *ssi = hs->ssi; + LWIP_ASSERT("ssi != NULL", ssi != NULL); + /* We are processing an SHTML file so need to scan for tags and replace + * them with insert strings. We need to be careful here since a tag may + * straddle the boundary of two blocks read from the file and we may also + * have to split the insert string between two tcp_write operations. */ + + /* How much data could we send? */ + len = altcp_sndbuf(pcb); + + /* Do we have remaining data to send before parsing more? */ + if (ssi->parsed > hs->file) { + len = (u16_t)LWIP_MIN(ssi->parsed - hs->file, 0xffff); + + err = http_write(pcb, hs->file, &len, HTTP_IS_DATA_VOLATILE(hs)); + if (err == ERR_OK) { + data_to_send = 1; + hs->file += len; + hs->left -= len; + } + + /* If the send buffer is full, return now. */ + if (altcp_sndbuf(pcb) == 0) { + return data_to_send; + } + } + + LWIP_DEBUGF(HTTPD_DEBUG, ("State %d, %d left\n", ssi->tag_state, (int)ssi->parse_left)); + + /* We have sent all the data that was already parsed so continue parsing + * the buffer contents looking for SSI tags. */ + while (((ssi->tag_state == TAG_SENDING) || ssi->parse_left) && (err == ERR_OK)) { + if (len == 0) { + return data_to_send; + } + switch (ssi->tag_state) { + case TAG_NONE: + /* We are not currently processing an SSI tag so scan for the + * start of the lead-in marker. */ + for (tag_type = 0; tag_type < LWIP_ARRAYSIZE(http_ssi_tag_desc); tag_type++) { + if (*ssi->parsed == http_ssi_tag_desc[tag_type].lead_in[0]) { + /* We found what could be the lead-in for a new tag so change + * state appropriately. */ + ssi->tag_type = tag_type; + ssi->tag_state = TAG_LEADIN; + ssi->tag_index = 1; + #if !LWIP_HTTPD_SSI_INCLUDE_TAG + ssi->tag_started = ssi->parsed; + #endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG */ + break; + } + } + + /* Move on to the next character in the buffer */ + ssi->parse_left--; + ssi->parsed++; + break; + + case TAG_LEADIN: + /* We are processing the lead-in marker, looking for the start of + * the tag name. */ + + /* Have we reached the end of the leadin? */ + if (http_ssi_tag_desc[ssi->tag_type].lead_in[ssi->tag_index] == 0) { + ssi->tag_index = 0; + ssi->tag_state = TAG_FOUND; + } else { + /* Have we found the next character we expect for the tag leadin? */ + if (*ssi->parsed == http_ssi_tag_desc[ssi->tag_type].lead_in[ssi->tag_index]) { + /* Yes - move to the next one unless we have found the complete + * leadin, in which case we start looking for the tag itself */ + ssi->tag_index++; + } else { + /* We found an unexpected character so this is not a tag. Move + * back to idle state. */ + ssi->tag_state = TAG_NONE; + } + + /* Move on to the next character in the buffer */ + ssi->parse_left--; + ssi->parsed++; + } + break; + + case TAG_FOUND: + /* We are reading the tag name, looking for the start of the + * lead-out marker and removing any whitespace found. */ + + /* Remove leading whitespace between the tag leading and the first + * tag name character. */ + if ((ssi->tag_index == 0) && ((*ssi->parsed == ' ') || + (*ssi->parsed == '\t') || (*ssi->parsed == '\n') || + (*ssi->parsed == '\r'))) { + /* Move on to the next character in the buffer */ + ssi->parse_left--; + ssi->parsed++; + break; + } + + /* Have we found the end of the tag name? This is signalled by + * us finding the first leadout character or whitespace */ + if ((*ssi->parsed == http_ssi_tag_desc[ssi->tag_type].lead_out[0]) || + (*ssi->parsed == ' ') || (*ssi->parsed == '\t') || + (*ssi->parsed == '\n') || (*ssi->parsed == '\r')) { + + if (ssi->tag_index == 0) { + /* We read a zero length tag so ignore it. */ + ssi->tag_state = TAG_NONE; + } else { + /* We read a non-empty tag so go ahead and look for the + * leadout string. */ + ssi->tag_state = TAG_LEADOUT; + LWIP_ASSERT("ssi->tag_index <= 0xff", ssi->tag_index <= 0xff); + ssi->tag_name_len = (u8_t)ssi->tag_index; + ssi->tag_name[ssi->tag_index] = '\0'; + if (*ssi->parsed == http_ssi_tag_desc[ssi->tag_type].lead_out[0]) { + ssi->tag_index = 1; + } else { + ssi->tag_index = 0; + } + } + } else { + /* This character is part of the tag name so save it */ + if (ssi->tag_index < LWIP_HTTPD_MAX_TAG_NAME_LEN) { + ssi->tag_name[ssi->tag_index++] = *ssi->parsed; + } else { + /* The tag was too long so ignore it. */ + ssi->tag_state = TAG_NONE; + } + } + + /* Move on to the next character in the buffer */ + ssi->parse_left--; + ssi->parsed++; + + break; + + /* We are looking for the end of the lead-out marker. */ + case TAG_LEADOUT: + /* Remove leading whitespace between the tag leading and the first + * tag leadout character. */ + if ((ssi->tag_index == 0) && ((*ssi->parsed == ' ') || + (*ssi->parsed == '\t') || (*ssi->parsed == '\n') || + (*ssi->parsed == '\r'))) { + /* Move on to the next character in the buffer */ + ssi->parse_left--; + ssi->parsed++; + break; + } + + /* Have we found the next character we expect for the tag leadout? */ + if (*ssi->parsed == http_ssi_tag_desc[ssi->tag_type].lead_out[ssi->tag_index]) { + /* Yes - move to the next one unless we have found the complete + * leadout, in which case we need to call the client to process + * the tag. */ + + /* Move on to the next character in the buffer */ + ssi->parse_left--; + ssi->parsed++; + ssi->tag_index++; + + if (http_ssi_tag_desc[ssi->tag_type].lead_out[ssi->tag_index] == 0) { + /* Call the client to ask for the insert string for the + * tag we just found. */ +#if LWIP_HTTPD_SSI_MULTIPART + ssi->tag_part = 0; /* start with tag part 0 */ +#endif /* LWIP_HTTPD_SSI_MULTIPART */ + get_tag_insert(hs); + + /* Next time through, we are going to be sending data + * immediately, either the end of the block we start + * sending here or the insert string. */ + ssi->tag_index = 0; + ssi->tag_state = TAG_SENDING; + ssi->tag_end = ssi->parsed; +#if !LWIP_HTTPD_SSI_INCLUDE_TAG + ssi->parsed = ssi->tag_started; +#endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG*/ + + /* If there is any unsent data in the buffer prior to the + * tag, we need to send it now. */ + if (ssi->tag_end > hs->file) { + /* How much of the data can we send? */ +#if LWIP_HTTPD_SSI_INCLUDE_TAG + len = (u16_t)LWIP_MIN(ssi->tag_end - hs->file, 0xffff); +#else /* LWIP_HTTPD_SSI_INCLUDE_TAG*/ + /* we would include the tag in sending */ + len = (u16_t)LWIP_MIN(ssi->tag_started - hs->file, 0xffff); +#endif /* LWIP_HTTPD_SSI_INCLUDE_TAG*/ + + err = http_write(pcb, hs->file, &len, HTTP_IS_DATA_VOLATILE(hs)); + if (err == ERR_OK) { + data_to_send = 1; +#if !LWIP_HTTPD_SSI_INCLUDE_TAG + if (ssi->tag_started <= hs->file) { + /* pretend to have sent the tag, too */ + len += (u16_t)(ssi->tag_end - ssi->tag_started); + } +#endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG*/ + hs->file += len; + hs->left -= len; + } + } + } + } else { + /* We found an unexpected character so this is not a tag. Move + * back to idle state. */ + ssi->parse_left--; + ssi->parsed++; + ssi->tag_state = TAG_NONE; + } + break; + + /* + * We have found a valid tag and are in the process of sending + * data as a result of that discovery. We send either remaining data + * from the file prior to the insert point or the insert string itself. + */ + case TAG_SENDING: + /* Do we have any remaining file data to send from the buffer prior + * to the tag? */ + if (ssi->tag_end > hs->file) { + /* How much of the data can we send? */ +#if LWIP_HTTPD_SSI_INCLUDE_TAG + len = (u16_t)LWIP_MIN(ssi->tag_end - hs->file, 0xffff); +#else /* LWIP_HTTPD_SSI_INCLUDE_TAG*/ + LWIP_ASSERT("hs->started >= hs->file", ssi->tag_started >= hs->file); + /* we would include the tag in sending */ + len = (u16_t)LWIP_MIN(ssi->tag_started - hs->file, 0xffff); +#endif /* LWIP_HTTPD_SSI_INCLUDE_TAG*/ + if (len != 0) { + err = http_write(pcb, hs->file, &len, HTTP_IS_DATA_VOLATILE(hs)); + } else { + err = ERR_OK; + } + if (err == ERR_OK) { + data_to_send = 1; +#if !LWIP_HTTPD_SSI_INCLUDE_TAG + if (ssi->tag_started <= hs->file) { + /* pretend to have sent the tag, too */ + len += (u16_t)(ssi->tag_end - ssi->tag_started); + } +#endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG*/ + hs->file += len; + hs->left -= len; + } + } else { +#if LWIP_HTTPD_SSI_MULTIPART + if (ssi->tag_index >= ssi->tag_insert_len) { + /* Did the last SSIHandler have more to send? */ + if (ssi->tag_part != HTTPD_LAST_TAG_PART) { + /* If so, call it again */ + ssi->tag_index = 0; + get_tag_insert(hs); + } + } +#endif /* LWIP_HTTPD_SSI_MULTIPART */ + + /* Do we still have insert data left to send? */ + if (ssi->tag_index < ssi->tag_insert_len) { + /* We are sending the insert string itself. How much of the + * insert can we send? */ + len = (ssi->tag_insert_len - ssi->tag_index); + + /* Note that we set the copy flag here since we only have a + * single tag insert buffer per connection. If we don't do + * this, insert corruption can occur if more than one insert + * is processed before we call tcp_output. */ + err = http_write(pcb, &(ssi->tag_insert[ssi->tag_index]), &len, + HTTP_IS_TAG_VOLATILE(hs)); + if (err == ERR_OK) { + data_to_send = 1; + ssi->tag_index += len; + /* Don't return here: keep on sending data */ + } + } else { +#if LWIP_HTTPD_SSI_MULTIPART + if (ssi->tag_part == HTTPD_LAST_TAG_PART) +#endif /* LWIP_HTTPD_SSI_MULTIPART */ + { + /* We have sent all the insert data so go back to looking for + * a new tag. */ + LWIP_DEBUGF(HTTPD_DEBUG, ("Everything sent.\n")); + ssi->tag_index = 0; + ssi->tag_state = TAG_NONE; +#if !LWIP_HTTPD_SSI_INCLUDE_TAG + ssi->parsed = ssi->tag_end; +#endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG*/ + } + } + break; + default: + break; + } + } + } + + /* If we drop out of the end of the for loop, this implies we must have + * file data to send so send it now. In TAG_SENDING state, we've already + * handled this so skip the send if that's the case. */ + if ((ssi->tag_state != TAG_SENDING) && (ssi->parsed > hs->file)) { +#if LWIP_HTTPD_DYNAMIC_FILE_READ && !LWIP_HTTPD_SSI_INCLUDE_TAG + if ((ssi->tag_state != TAG_NONE) && (ssi->tag_started > ssi->tag_end)) { + /* If we found tag on the edge of the read buffer: just throw away the first part + (we have copied/saved everything required for parsing on later). */ + len = (u16_t)(ssi->tag_started - hs->file); + hs->left -= (ssi->parsed - ssi->tag_started); + ssi->parsed = ssi->tag_started; + ssi->tag_started = hs->buf; + } else +#endif /* LWIP_HTTPD_DYNAMIC_FILE_READ && !LWIP_HTTPD_SSI_INCLUDE_TAG */ + { + len = (u16_t)LWIP_MIN(ssi->parsed - hs->file, 0xffff); + } + + err = http_write(pcb, hs->file, &len, HTTP_IS_DATA_VOLATILE(hs)); + if (err == ERR_OK) { + data_to_send = 1; + hs->file += len; + hs->left -= len; + } + } + return data_to_send; +} +#endif /* LWIP_HTTPD_SSI */ + +/** + * Try to send more data on this pcb. + * + * @param pcb the pcb to send data + * @param hs connection state + */ +static u8_t +http_send(struct altcp_pcb *pcb, struct http_state *hs) +{ + u8_t data_to_send = HTTP_NO_DATA_TO_SEND; + + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_send: pcb=%p hs=%p left=%d\n", (void *)pcb, + (void *)hs, hs != NULL ? (int)hs->left : 0)); + +#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND + if (hs->unrecved_bytes != 0) { + return 0; + } +#endif /* LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND */ + + /* If we were passed a NULL state structure pointer, ignore the call. */ + if (hs == NULL) { + return 0; + } + +#if LWIP_HTTPD_FS_ASYNC_READ + /* Check if we are allowed to read from this file. + (e.g. SSI might want to delay sending until data is available) */ + if (!fs_is_file_ready(hs->handle, http_continue, hs)) { + return 0; + } +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + +#if LWIP_HTTPD_DYNAMIC_HEADERS + /* Do we have any more header data to send for this file? */ + if (hs->hdr_index < NUM_FILE_HDR_STRINGS) { + data_to_send = http_send_headers(pcb, hs); + if ((data_to_send == HTTP_DATA_TO_SEND_FREED) || + ((data_to_send != HTTP_DATA_TO_SEND_CONTINUE) && + (hs->hdr_index < NUM_FILE_HDR_STRINGS))) { + return data_to_send; + } + } +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ + + /* Have we run out of file data to send? If so, we need to read the next + * block from the file. */ + if (hs->left == 0) { + if (!http_check_eof(pcb, hs)) { + return 0; + } + } + +#if LWIP_HTTPD_SSI + if (hs->ssi) { + data_to_send = http_send_data_ssi(pcb, hs); + } else +#endif /* LWIP_HTTPD_SSI */ + { + data_to_send = http_send_data_nonssi(pcb, hs); + } + + if ((hs->left == 0) && (fs_bytes_left(hs->handle) <= 0)) { + /* We reached the end of the file so this request is done. + * This adds the FIN flag right into the last data segment. */ + LWIP_DEBUGF(HTTPD_DEBUG, ("End of file.\n")); + http_eof(pcb, hs); + return 0; + } + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("send_data end.\n")); + return data_to_send; +} + +#if LWIP_HTTPD_SUPPORT_EXTSTATUS +/** Initialize a http connection with a file to send for an error message + * + * @param hs http connection state + * @param error_nr HTTP error number + * @return ERR_OK if file was found and hs has been initialized correctly + * another err_t otherwise + */ +static err_t +http_find_error_file(struct http_state *hs, u16_t error_nr) +{ + const char *uri, *uri1, *uri2, *uri3; + + if (error_nr == 501) { + uri1 = "/501.html"; + uri2 = "/501.htm"; + uri3 = "/501.shtml"; + } else { + /* 400 (bad request is the default) */ + uri1 = "/400.html"; + uri2 = "/400.htm"; + uri3 = "/400.shtml"; + } + if (fs_open(&hs->file_handle, uri1) == ERR_OK) { + uri = uri1; + } else if (fs_open(&hs->file_handle, uri2) == ERR_OK) { + uri = uri2; + } else if (fs_open(&hs->file_handle, uri3) == ERR_OK) { + uri = uri3; + } else { + LWIP_DEBUGF(HTTPD_DEBUG, ("Error page for error %"U16_F" not found\n", + error_nr)); + return ERR_ARG; + } + return http_init_file(hs, &hs->file_handle, 0, uri, 0, NULL); +} +#else /* LWIP_HTTPD_SUPPORT_EXTSTATUS */ +#define http_find_error_file(hs, error_nr) ERR_ARG +#endif /* LWIP_HTTPD_SUPPORT_EXTSTATUS */ + +/** + * Get the file struct for a 404 error page. + * Tries some file names and returns NULL if none found. + * + * @param uri pointer that receives the actual file name URI + * @return file struct for the error page or NULL no matching file was found + */ +static struct fs_file * +http_get_404_file(struct http_state *hs, const char **uri) +{ + err_t err; + + *uri = "/404.html"; + err = fs_open(&hs->file_handle, *uri); + if (err != ERR_OK) { + /* 404.html doesn't exist. Try 404.htm instead. */ + *uri = "/404.htm"; + err = fs_open(&hs->file_handle, *uri); + if (err != ERR_OK) { + /* 404.htm doesn't exist either. Try 404.shtml instead. */ + *uri = "/404.shtml"; + err = fs_open(&hs->file_handle, *uri); + if (err != ERR_OK) { + /* 404.htm doesn't exist either. Indicate to the caller that it should + * send back a default 404 page. + */ + *uri = NULL; + return NULL; + } + } + } + + return &hs->file_handle; +} + +#if LWIP_HTTPD_SUPPORT_POST +static err_t +http_handle_post_finished(struct http_state *hs) +{ +#if LWIP_HTTPD_POST_MANUAL_WND + /* Prevent multiple calls to httpd_post_finished, since it might have already + been called before from httpd_post_data_recved(). */ + if (hs->post_finished) { + return ERR_OK; + } + hs->post_finished = 1; +#endif /* LWIP_HTTPD_POST_MANUAL_WND */ + /* application error or POST finished */ + /* NULL-terminate the buffer */ + http_uri_buf[0] = 0; + httpd_post_finished(hs, http_uri_buf, LWIP_HTTPD_URI_BUF_LEN); + return http_find_file(hs, http_uri_buf, 0); +} + +/** Pass received POST body data to the application and correctly handle + * returning a response document or closing the connection. + * ATTENTION: The application is responsible for the pbuf now, so don't free it! + * + * @param hs http connection state + * @param p pbuf to pass to the application + * @return ERR_OK if passed successfully, another err_t if the response file + * hasn't been found (after POST finished) + */ +static err_t +http_post_rxpbuf(struct http_state *hs, struct pbuf *p) +{ + err_t err; + + if (p != NULL) { + /* adjust remaining Content-Length */ + if (hs->post_content_len_left < p->tot_len) { + hs->post_content_len_left = 0; + } else { + hs->post_content_len_left -= p->tot_len; + } + } +#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND + /* prevent connection being closed if httpd_post_data_recved() is called nested */ + hs->unrecved_bytes++; +#endif + if (p != NULL) { + err = httpd_post_receive_data(hs, p); + } else { + err = ERR_OK; + } +#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND + hs->unrecved_bytes--; +#endif + if (err != ERR_OK) { + /* Ignore remaining content in case of application error */ + hs->post_content_len_left = 0; + } + if (hs->post_content_len_left == 0) { +#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND + if (hs->unrecved_bytes != 0) { + return ERR_OK; + } +#endif /* LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND */ + /* application error or POST finished */ + return http_handle_post_finished(hs); + } + + return ERR_OK; +} + +/** Handle a post request. Called from http_parse_request when method 'POST' + * is found. + * + * @param p The input pbuf (containing the POST header and body). + * @param hs The http connection state. + * @param data HTTP request (header and part of body) from input pbuf(s). + * @param data_len Size of 'data'. + * @param uri The HTTP URI parsed from input pbuf(s). + * @param uri_end Pointer to the end of 'uri' (here, the rest of the HTTP + * header starts). + * @return ERR_OK: POST correctly parsed and accepted by the application. + * ERR_INPROGRESS: POST not completely parsed (no error yet) + * another err_t: Error parsing POST or denied by the application + */ +static err_t +http_post_request(struct pbuf *inp, struct http_state *hs, + char *data, u16_t data_len, char *uri, char *uri_end) +{ + err_t err; + /* search for end-of-header (first double-CRLF) */ + char *crlfcrlf = lwip_strnstr(uri_end + 1, CRLF CRLF, data_len - (uri_end + 1 - data)); + + if (crlfcrlf != NULL) { + /* search for "Content-Length: " */ +#define HTTP_HDR_CONTENT_LEN "Content-Length: " +#define HTTP_HDR_CONTENT_LEN_LEN 16 +#define HTTP_HDR_CONTENT_LEN_DIGIT_MAX_LEN 10 + char *scontent_len = lwip_strnstr(uri_end + 1, HTTP_HDR_CONTENT_LEN, crlfcrlf - (uri_end + 1)); + if (scontent_len != NULL) { + char *scontent_len_end = lwip_strnstr(scontent_len + HTTP_HDR_CONTENT_LEN_LEN, CRLF, HTTP_HDR_CONTENT_LEN_DIGIT_MAX_LEN); + if (scontent_len_end != NULL) { + int content_len; + char *content_len_num = scontent_len + HTTP_HDR_CONTENT_LEN_LEN; + content_len = atoi(content_len_num); + if (content_len == 0) { + /* if atoi returns 0 on error, fix this */ + if ((content_len_num[0] != '0') || (content_len_num[1] != '\r')) { + content_len = -1; + } + } + if (content_len >= 0) { + /* adjust length of HTTP header passed to application */ + const char *hdr_start_after_uri = uri_end + 1; + u16_t hdr_len = (u16_t)LWIP_MIN(data_len, crlfcrlf + 4 - data); + u16_t hdr_data_len = (u16_t)LWIP_MIN(data_len, crlfcrlf + 4 - hdr_start_after_uri); + u8_t post_auto_wnd = 1; + http_uri_buf[0] = 0; + /* trim http header */ + *crlfcrlf = 0; + err = httpd_post_begin(hs, uri, hdr_start_after_uri, hdr_data_len, content_len, + http_uri_buf, LWIP_HTTPD_URI_BUF_LEN, &post_auto_wnd); + if (err == ERR_OK) { + /* try to pass in data of the first pbuf(s) */ + struct pbuf *q = inp; + u16_t start_offset = hdr_len; +#if LWIP_HTTPD_POST_MANUAL_WND + hs->no_auto_wnd = !post_auto_wnd; +#endif /* LWIP_HTTPD_POST_MANUAL_WND */ + /* set the Content-Length to be received for this POST */ + hs->post_content_len_left = (u32_t)content_len; + + /* get to the pbuf where the body starts */ + while ((q != NULL) && (q->len <= start_offset)) { + start_offset -= q->len; + q = q->next; + } + if (q != NULL) { + /* hide the remaining HTTP header */ + pbuf_remove_header(q, start_offset); +#if LWIP_HTTPD_POST_MANUAL_WND + if (!post_auto_wnd) { + /* already tcp_recved() this data... */ + hs->unrecved_bytes = q->tot_len; + } +#endif /* LWIP_HTTPD_POST_MANUAL_WND */ + pbuf_ref(q); + return http_post_rxpbuf(hs, q); + } else if (hs->post_content_len_left == 0) { + q = pbuf_alloc(PBUF_RAW, 0, PBUF_REF); + return http_post_rxpbuf(hs, q); + } else { + return ERR_OK; + } + } else { + /* return file passed from application */ + return http_find_file(hs, http_uri_buf, 0); + } + } else { + LWIP_DEBUGF(HTTPD_DEBUG, ("POST received invalid Content-Length: %s\n", + content_len_num)); + return ERR_ARG; + } + } + } + /* If we come here, headers are fully received (double-crlf), but Content-Length + was not included. Since this is currently the only supported method, we have + to fail in this case! */ + LWIP_DEBUGF(HTTPD_DEBUG, ("Error when parsing Content-Length\n")); + return ERR_ARG; + } + /* if we come here, the POST is incomplete */ +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + return ERR_INPROGRESS; +#else /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + return ERR_ARG; +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ +} + +#if LWIP_HTTPD_POST_MANUAL_WND +/** + * @ingroup httpd + * A POST implementation can call this function to update the TCP window. + * This can be used to throttle data reception (e.g. when received data is + * programmed to flash and data is received faster than programmed). + * + * @param connection A connection handle passed to httpd_post_begin for which + * httpd_post_finished has *NOT* been called yet! + * @param recved_len Length of data received (for window update) + */ +void httpd_post_data_recved(void *connection, u16_t recved_len) +{ + struct http_state *hs = (struct http_state *)connection; + if (hs != NULL) { + if (hs->no_auto_wnd) { + u16_t len = recved_len; + if (hs->unrecved_bytes >= recved_len) { + hs->unrecved_bytes -= recved_len; + } else { + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_LEVEL_WARNING, ("httpd_post_data_recved: recved_len too big\n")); + len = (u16_t)hs->unrecved_bytes; + hs->unrecved_bytes = 0; + } + if (hs->pcb != NULL) { + if (len != 0) { + altcp_recved(hs->pcb, len); + } + if ((hs->post_content_len_left == 0) && (hs->unrecved_bytes == 0)) { + /* finished handling POST */ + http_handle_post_finished(hs); + http_send(hs->pcb, hs); + } + } + } + } +} +#endif /* LWIP_HTTPD_POST_MANUAL_WND */ + +#endif /* LWIP_HTTPD_SUPPORT_POST */ + +#if LWIP_HTTPD_FS_ASYNC_READ +/** Try to send more data if file has been blocked before + * This is a callback function passed to fs_read_async(). + */ +static void +http_continue(void *connection) +{ + struct http_state *hs = (struct http_state *)connection; + LWIP_ASSERT_CORE_LOCKED(); + if (hs && (hs->pcb) && (hs->handle)) { + LWIP_ASSERT("hs->pcb != NULL", hs->pcb != NULL); + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("httpd_continue: try to send more data\n")); + if (http_send(hs->pcb, hs)) { + /* If we wrote anything to be sent, go ahead and send it now. */ + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("tcp_output\n")); + altcp_output(hs->pcb); + } + } +} +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + +/** + * When data has been received in the correct state, try to parse it + * as a HTTP request. + * + * @param inp the received pbuf + * @param hs the connection state + * @param pcb the altcp_pcb which received this packet + * @return ERR_OK if request was OK and hs has been initialized correctly + * ERR_INPROGRESS if request was OK so far but not fully received + * another err_t otherwise + */ +static err_t +http_parse_request(struct pbuf *inp, struct http_state *hs, struct altcp_pcb *pcb) +{ + char *data; + char *crlf; + u16_t data_len; + struct pbuf *p = inp; +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + u16_t clen; +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ +#if LWIP_HTTPD_SUPPORT_POST + err_t err; +#endif /* LWIP_HTTPD_SUPPORT_POST */ + + LWIP_UNUSED_ARG(pcb); /* only used for post */ + LWIP_ASSERT("p != NULL", p != NULL); + LWIP_ASSERT("hs != NULL", hs != NULL); + + if ((hs->handle != NULL) || (hs->file != NULL)) { + LWIP_DEBUGF(HTTPD_DEBUG, ("Received data while sending a file\n")); + /* already sending a file */ + /* @todo: abort? */ + return ERR_USE; + } + +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + + LWIP_DEBUGF(HTTPD_DEBUG, ("Received %"U16_F" bytes\n", p->tot_len)); + + /* first check allowed characters in this pbuf? */ + + /* enqueue the pbuf */ + if (hs->req == NULL) { + LWIP_DEBUGF(HTTPD_DEBUG, ("First pbuf\n")); + hs->req = p; + } else { + LWIP_DEBUGF(HTTPD_DEBUG, ("pbuf enqueued\n")); + pbuf_cat(hs->req, p); + } + /* increase pbuf ref counter as it is freed when we return but we want to + keep it on the req list */ + pbuf_ref(p); + + if (hs->req->next != NULL) { + data_len = LWIP_MIN(hs->req->tot_len, LWIP_HTTPD_MAX_REQ_LENGTH); + pbuf_copy_partial(hs->req, httpd_req_buf, data_len, 0); + data = httpd_req_buf; + } else +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + { + data = (char *)p->payload; + data_len = p->len; + if (p->len != p->tot_len) { + LWIP_DEBUGF(HTTPD_DEBUG, ("Warning: incomplete header due to chained pbufs\n")); + } + } + + /* received enough data for minimal request? */ + if (data_len >= MIN_REQ_LEN) { + /* wait for CRLF before parsing anything */ + crlf = lwip_strnstr(data, CRLF, data_len); + if (crlf != NULL) { +#if LWIP_HTTPD_SUPPORT_POST + int is_post = 0; +#endif /* LWIP_HTTPD_SUPPORT_POST */ + int is_09 = 0; + char *sp1, *sp2; + u16_t left_len, uri_len; + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("CRLF received, parsing request\n")); + /* parse method */ + if (!strncmp(data, "GET ", 4)) { + sp1 = data + 3; + /* received GET request */ + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Received GET request\"\n")); +#if LWIP_HTTPD_SUPPORT_POST + } else if (!strncmp(data, "POST ", 5)) { + /* store request type */ + is_post = 1; + sp1 = data + 4; + /* received GET request */ + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Received POST request\n")); +#endif /* LWIP_HTTPD_SUPPORT_POST */ + } else { + /* null-terminate the METHOD (pbuf is freed anyway wen returning) */ + data[4] = 0; + /* unsupported method! */ + LWIP_DEBUGF(HTTPD_DEBUG, ("Unsupported request method (not implemented): \"%s\"\n", + data)); + return http_find_error_file(hs, 501); + } + /* if we come here, method is OK, parse URI */ + left_len = (u16_t)(data_len - ((sp1 + 1) - data)); + sp2 = lwip_strnstr(sp1 + 1, " ", left_len); +#if LWIP_HTTPD_SUPPORT_V09 + if (sp2 == NULL) { + /* HTTP 0.9: respond with correct protocol version */ + sp2 = lwip_strnstr(sp1 + 1, CRLF, left_len); + is_09 = 1; +#if LWIP_HTTPD_SUPPORT_POST + if (is_post) { + /* HTTP/0.9 does not support POST */ + goto badrequest; + } +#endif /* LWIP_HTTPD_SUPPORT_POST */ + } +#endif /* LWIP_HTTPD_SUPPORT_V09 */ + uri_len = (u16_t)(sp2 - (sp1 + 1)); + if ((sp2 != 0) && (sp2 > sp1)) { + /* wait for CRLFCRLF (indicating end of HTTP headers) before parsing anything */ + if (lwip_strnstr(data, CRLF CRLF, data_len) != NULL) { + char *uri = sp1 + 1; +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + /* This is HTTP/1.0 compatible: for strict 1.1, a connection + would always be persistent unless "close" was specified. */ + if (!is_09 && (lwip_strnstr(data, HTTP11_CONNECTIONKEEPALIVE, data_len) || + lwip_strnstr(data, HTTP11_CONNECTIONKEEPALIVE2, data_len))) { + hs->keepalive = 1; + } else { + hs->keepalive = 0; + } +#endif /* LWIP_HTTPD_SUPPORT_11_KEEPALIVE */ + /* null-terminate the METHOD (pbuf is freed anyway wen returning) */ + *sp1 = 0; + uri[uri_len] = 0; + LWIP_DEBUGF(HTTPD_DEBUG, ("Received \"%s\" request for URI: \"%s\"\n", + data, uri)); +#if LWIP_HTTPD_SUPPORT_POST + if (is_post) { +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + struct pbuf *q = hs->req; +#else /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + struct pbuf *q = inp; +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + err = http_post_request(q, hs, data, data_len, uri, sp2); + if (err != ERR_OK) { + /* restore header for next try */ + *sp1 = ' '; + *sp2 = ' '; + uri[uri_len] = ' '; + } + if (err == ERR_ARG) { + goto badrequest; + } + return err; + } else +#endif /* LWIP_HTTPD_SUPPORT_POST */ + { + return http_find_file(hs, uri, is_09); + } + } + } else { + LWIP_DEBUGF(HTTPD_DEBUG, ("invalid URI\n")); + } + } + } + +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + clen = pbuf_clen(hs->req); + if ((hs->req->tot_len <= LWIP_HTTPD_REQ_BUFSIZE) && + (clen <= LWIP_HTTPD_REQ_QUEUELEN)) { + /* request not fully received (too short or CRLF is missing) */ + return ERR_INPROGRESS; + } else +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + { +#if LWIP_HTTPD_SUPPORT_POST +badrequest: +#endif /* LWIP_HTTPD_SUPPORT_POST */ + LWIP_DEBUGF(HTTPD_DEBUG, ("bad request\n")); + /* could not parse request */ + return http_find_error_file(hs, 400); + } +} + +#if LWIP_HTTPD_SSI && (LWIP_HTTPD_SSI_BY_FILE_EXTENSION == 1) +/* Check if SSI should be parsed for this file/URL + * (With LWIP_HTTPD_SSI_BY_FILE_EXTENSION == 2, this function can be + * overridden by an external implementation.) + * + * @return 1 for SSI, 0 for standard files + */ +static u8_t +http_uri_is_ssi(struct fs_file *file, const char *uri) +{ + size_t loop; + u8_t tag_check = 0; + if (file != NULL) { + /* See if we have been asked for an shtml file and, if so, + enable tag checking. */ + const char *ext = NULL, *sub; + char *param = (char *)strstr(uri, "?"); + if (param != NULL) { + /* separate uri from parameters for now, set back later */ + *param = 0; + } + sub = uri; + ext = uri; + for (sub = strstr(sub, "."); sub != NULL; sub = strstr(sub, ".")) { + ext = sub; + sub++; + } + for (loop = 0; loop < NUM_SHTML_EXTENSIONS; loop++) { + if (!lwip_stricmp(ext, g_pcSSIExtensions[loop])) { + tag_check = 1; + break; + } + } + if (param != NULL) { + *param = '?'; + } + } + return tag_check; +} +#endif /* LWIP_HTTPD_SSI */ + +/** Try to find the file specified by uri and, if found, initialize hs + * accordingly. + * + * @param hs the connection state + * @param uri the HTTP header URI + * @param is_09 1 if the request is HTTP/0.9 (no HTTP headers in response) + * @return ERR_OK if file was found and hs has been initialized correctly + * another err_t otherwise + */ +static err_t +http_find_file(struct http_state *hs, const char *uri, int is_09) +{ + size_t loop; + struct fs_file *file = NULL; + char *params = NULL; + err_t err; +#if LWIP_HTTPD_CGI + int i; +#endif /* LWIP_HTTPD_CGI */ +#if !LWIP_HTTPD_SSI + const +#endif /* !LWIP_HTTPD_SSI */ + /* By default, assume we will not be processing server-side-includes tags */ + u8_t tag_check = 0; + + /* Have we been asked for the default file (in root or a directory) ? */ +#if LWIP_HTTPD_MAX_REQUEST_URI_LEN + size_t uri_len = strlen(uri); + if ((uri_len > 0) && (uri[uri_len - 1] == '/') && + ((uri != http_uri_buf) || (uri_len == 1))) { + size_t copy_len = LWIP_MIN(sizeof(http_uri_buf) - 1, uri_len - 1); + if (copy_len > 0) { + MEMCPY(http_uri_buf, uri, copy_len); + http_uri_buf[copy_len] = 0; + } +#else /* LWIP_HTTPD_MAX_REQUEST_URI_LEN */ + if ((uri[0] == '/') && (uri[1] == 0)) { +#endif /* LWIP_HTTPD_MAX_REQUEST_URI_LEN */ + /* Try each of the configured default filenames until we find one + that exists. */ + for (loop = 0; loop < NUM_DEFAULT_FILENAMES; loop++) { + const char *file_name; +#if LWIP_HTTPD_MAX_REQUEST_URI_LEN + if (copy_len > 0) { + size_t len_left = sizeof(http_uri_buf) - copy_len - 1; + if (len_left > 0) { + size_t name_len = strlen(httpd_default_filenames[loop].name); + size_t name_copy_len = LWIP_MIN(len_left, name_len); + MEMCPY(&http_uri_buf[copy_len], httpd_default_filenames[loop].name, name_copy_len); + http_uri_buf[copy_len + name_copy_len] = 0; + } + file_name = http_uri_buf; + } else +#endif /* LWIP_HTTPD_MAX_REQUEST_URI_LEN */ + { + file_name = httpd_default_filenames[loop].name; + } + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Looking for %s...\n", file_name)); + err = fs_open(&hs->file_handle, file_name); + if (err == ERR_OK) { + uri = file_name; + file = &hs->file_handle; + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Opened.\n")); +#if LWIP_HTTPD_SSI + tag_check = httpd_default_filenames[loop].shtml; +#endif /* LWIP_HTTPD_SSI */ + break; + } + } + } + if (file == NULL) { + /* No - we've been asked for a specific file. */ + /* First, isolate the base URI (without any parameters) */ + params = (char *)strchr(uri, '?'); + if (params != NULL) { + /* URI contains parameters. NULL-terminate the base URI */ + *params = '\0'; + params++; + } + +#if LWIP_HTTPD_CGI + http_cgi_paramcount = -1; + /* Does the base URI we have isolated correspond to a CGI handler? */ + if (httpd_num_cgis && httpd_cgis) { + for (i = 0; i < httpd_num_cgis; i++) { + if (strcmp(uri, httpd_cgis[i].pcCGIName) == 0) { + /* + * We found a CGI that handles this URI so extract the + * parameters and call the handler. + */ + http_cgi_paramcount = extract_uri_parameters(hs, params); + uri = httpd_cgis[i].pfnCGIHandler(i, http_cgi_paramcount, hs->params, + hs->param_vals); + break; + } + } + } +#endif /* LWIP_HTTPD_CGI */ + + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Opening %s\n", uri)); + + err = fs_open(&hs->file_handle, uri); + if (err == ERR_OK) { + file = &hs->file_handle; + } else { + file = http_get_404_file(hs, &uri); + } +#if LWIP_HTTPD_SSI + if (file != NULL) { + if (file->flags & FS_FILE_FLAGS_SSI) { + tag_check = 1; + } else { +#if LWIP_HTTPD_SSI_BY_FILE_EXTENSION + tag_check = http_uri_is_ssi(file, uri); +#endif /* LWIP_HTTPD_SSI_BY_FILE_EXTENSION */ + } + } +#endif /* LWIP_HTTPD_SSI */ + } + if (file == NULL) { + /* None of the default filenames exist so send back a 404 page */ + file = http_get_404_file(hs, &uri); + } + return http_init_file(hs, file, is_09, uri, tag_check, params); +} + +/** Initialize a http connection with a file to send (if found). + * Called by http_find_file and http_find_error_file. + * + * @param hs http connection state + * @param file file structure to send (or NULL if not found) + * @param is_09 1 if the request is HTTP/0.9 (no HTTP headers in response) + * @param uri the HTTP header URI + * @param tag_check enable SSI tag checking + * @param params != NULL if URI has parameters (separated by '?') + * @return ERR_OK if file was found and hs has been initialized correctly + * another err_t otherwise + */ +static err_t +http_init_file(struct http_state *hs, struct fs_file *file, int is_09, const char *uri, + u8_t tag_check, char *params) +{ +#if !LWIP_HTTPD_SUPPORT_V09 + LWIP_UNUSED_ARG(is_09); +#endif + if (file != NULL) { + /* file opened, initialise struct http_state */ +#if !LWIP_HTTPD_DYNAMIC_FILE_READ + /* If dynamic read is disabled, file data must be in one piece and available now */ + LWIP_ASSERT("file->data != NULL", file->data != NULL); +#endif + +#if LWIP_HTTPD_SSI + if (tag_check) { + struct http_ssi_state *ssi = http_ssi_state_alloc(); + if (ssi != NULL) { + ssi->tag_index = 0; + ssi->tag_state = TAG_NONE; + ssi->parsed = file->data; + ssi->parse_left = file->len; + ssi->tag_end = file->data; + hs->ssi = ssi; + } + } +#else /* LWIP_HTTPD_SSI */ + LWIP_UNUSED_ARG(tag_check); +#endif /* LWIP_HTTPD_SSI */ + hs->handle = file; +#if LWIP_HTTPD_CGI_SSI + if (params != NULL) { + /* URI contains parameters, call generic CGI handler */ + int count; +#if LWIP_HTTPD_CGI + if (http_cgi_paramcount >= 0) { + count = http_cgi_paramcount; + } else +#endif + { + count = extract_uri_parameters(hs, params); + } + httpd_cgi_handler(file, uri, count, http_cgi_params, http_cgi_param_vals +#if defined(LWIP_HTTPD_FILE_STATE) && LWIP_HTTPD_FILE_STATE + , file->state +#endif /* LWIP_HTTPD_FILE_STATE */ + ); + } +#else /* LWIP_HTTPD_CGI_SSI */ + LWIP_UNUSED_ARG(params); +#endif /* LWIP_HTTPD_CGI_SSI */ + hs->file = file->data; + LWIP_ASSERT("File length must be positive!", (file->len >= 0)); +#if LWIP_HTTPD_CUSTOM_FILES + if (file->is_custom_file && (file->data == NULL)) { + /* custom file, need to read data first (via fs_read_custom) */ + hs->left = 0; + } else +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + { + hs->left = (u32_t)file->len; + } + hs->retries = 0; +#if LWIP_HTTPD_TIMING + hs->time_started = sys_now(); +#endif /* LWIP_HTTPD_TIMING */ +#if !LWIP_HTTPD_DYNAMIC_HEADERS + LWIP_ASSERT("HTTP headers not included in file system", + (hs->handle->flags & FS_FILE_FLAGS_HEADER_INCLUDED) != 0); +#endif /* !LWIP_HTTPD_DYNAMIC_HEADERS */ +#if LWIP_HTTPD_SUPPORT_V09 + if (is_09 && ((hs->handle->flags & FS_FILE_FLAGS_HEADER_INCLUDED) != 0)) { + /* HTTP/0.9 responses are sent without HTTP header, + search for the end of the header. */ + char *file_start = lwip_strnstr(hs->file, CRLF CRLF, hs->left); + if (file_start != NULL) { + int diff = file_start + 4 - hs->file; + hs->file += diff; + hs->left -= (u32_t)diff; + } + } +#endif /* LWIP_HTTPD_SUPPORT_V09*/ + } else { + hs->handle = NULL; + hs->file = NULL; + hs->left = 0; + hs->retries = 0; + } +#if LWIP_HTTPD_DYNAMIC_HEADERS + /* Determine the HTTP headers to send based on the file extension of + * the requested URI. */ + if ((hs->handle == NULL) || ((hs->handle->flags & FS_FILE_FLAGS_HEADER_INCLUDED) == 0)) { + get_http_headers(hs, uri); + } +#else /* LWIP_HTTPD_DYNAMIC_HEADERS */ + LWIP_UNUSED_ARG(uri); +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + if (hs->keepalive) { +#if LWIP_HTTPD_SSI + if (hs->ssi != NULL) { + hs->keepalive = 0; + } else +#endif /* LWIP_HTTPD_SSI */ + { + if ((hs->handle != NULL) && + ((hs->handle->flags & (FS_FILE_FLAGS_HEADER_INCLUDED | FS_FILE_FLAGS_HEADER_PERSISTENT)) == FS_FILE_FLAGS_HEADER_INCLUDED)) { + hs->keepalive = 0; + } + } + } +#endif /* LWIP_HTTPD_SUPPORT_11_KEEPALIVE */ + return ERR_OK; +} + +/** + * The pcb had an error and is already deallocated. + * The argument might still be valid (if != NULL). + */ +static void +http_err(void *arg, err_t err) +{ + struct http_state *hs = (struct http_state *)arg; + LWIP_UNUSED_ARG(err); + + LWIP_DEBUGF(HTTPD_DEBUG, ("http_err: %s", lwip_strerr(err))); + + if (hs != NULL) { + http_state_free(hs); + } +} + +/** + * Data has been sent and acknowledged by the remote host. + * This means that more data can be sent. + */ +static err_t +http_sent(void *arg, struct altcp_pcb *pcb, u16_t len) +{ + struct http_state *hs = (struct http_state *)arg; + + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_sent %p\n", (void *)pcb)); + + LWIP_UNUSED_ARG(len); + + if (hs == NULL) { + return ERR_OK; + } + + hs->retries = 0; + + http_send(pcb, hs); + + return ERR_OK; +} + +/** + * The poll function is called every 2nd second. + * If there has been no data sent (which resets the retries) in 8 seconds, close. + * If the last portion of a file has not been sent in 2 seconds, close. + * + * This could be increased, but we don't want to waste resources for bad connections. + */ +static err_t +http_poll(void *arg, struct altcp_pcb *pcb) +{ + struct http_state *hs = (struct http_state *)arg; + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_poll: pcb=%p hs=%p pcb_state=%s\n", + (void *)pcb, (void *)hs, tcp_debug_state_str(altcp_dbg_get_tcp_state(pcb)))); + + if (hs == NULL) { + err_t closed; + /* arg is null, close. */ + LWIP_DEBUGF(HTTPD_DEBUG, ("http_poll: arg is NULL, close\n")); + closed = http_close_conn(pcb, NULL); + LWIP_UNUSED_ARG(closed); +#if LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR + if (closed == ERR_MEM) { + altcp_abort(pcb); + return ERR_ABRT; + } +#endif /* LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR */ + return ERR_OK; + } else { + hs->retries++; + if (hs->retries == HTTPD_MAX_RETRIES) { + LWIP_DEBUGF(HTTPD_DEBUG, ("http_poll: too many retries, close\n")); + http_close_conn(pcb, hs); + return ERR_OK; + } + + /* If this connection has a file open, try to send some more data. If + * it has not yet received a GET request, don't do this since it will + * cause the connection to close immediately. */ + if (hs->handle) { + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_poll: try to send more data\n")); + if (http_send(pcb, hs)) { + /* If we wrote anything to be sent, go ahead and send it now. */ + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("tcp_output\n")); + altcp_output(pcb); + } + } + } + + return ERR_OK; +} + +/** + * Data has been received on this pcb. + * For HTTP 1.0, this should normally only happen once (if the request fits in one packet). + */ +static err_t +http_recv(void *arg, struct altcp_pcb *pcb, struct pbuf *p, err_t err) +{ + struct http_state *hs = (struct http_state *)arg; + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_recv: pcb=%p pbuf=%p err=%s\n", (void *)pcb, + (void *)p, lwip_strerr(err))); + + if ((err != ERR_OK) || (p == NULL) || (hs == NULL)) { + /* error or closed by other side? */ + if (p != NULL) { + /* Inform TCP that we have taken the data. */ + altcp_recved(pcb, p->tot_len); + pbuf_free(p); + } + if (hs == NULL) { + /* this should not happen, only to be robust */ + LWIP_DEBUGF(HTTPD_DEBUG, ("Error, http_recv: hs is NULL, close\n")); + } + http_close_conn(pcb, hs); + return ERR_OK; + } + +#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND + if (hs->no_auto_wnd) { + hs->unrecved_bytes += p->tot_len; + } else +#endif /* LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND */ + { + /* Inform TCP that we have taken the data. */ + altcp_recved(pcb, p->tot_len); + } + +#if LWIP_HTTPD_SUPPORT_POST + if (hs->post_content_len_left > 0) { + /* reset idle counter when POST data is received */ + hs->retries = 0; + /* this is data for a POST, pass the complete pbuf to the application */ + http_post_rxpbuf(hs, p); + /* pbuf is passed to the application, don't free it! */ + if (hs->post_content_len_left == 0) { + /* all data received, send response or close connection */ + http_send(pcb, hs); + } + return ERR_OK; + } else +#endif /* LWIP_HTTPD_SUPPORT_POST */ + { + if (hs->handle == NULL) { + err_t parsed = http_parse_request(p, hs, pcb); + LWIP_ASSERT("http_parse_request: unexpected return value", parsed == ERR_OK + || parsed == ERR_INPROGRESS || parsed == ERR_ARG || parsed == ERR_USE); +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + if (parsed != ERR_INPROGRESS) { + /* request fully parsed or error */ + if (hs->req != NULL) { + pbuf_free(hs->req); + hs->req = NULL; + } + } +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + pbuf_free(p); + if (parsed == ERR_OK) { +#if LWIP_HTTPD_SUPPORT_POST + if (hs->post_content_len_left == 0) +#endif /* LWIP_HTTPD_SUPPORT_POST */ + { + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_recv: data %p len %"S32_F"\n", (const void *)hs->file, hs->left)); + http_send(pcb, hs); + } + } else if (parsed == ERR_ARG) { + /* @todo: close on ERR_USE? */ + http_close_conn(pcb, hs); + } + } else { + LWIP_DEBUGF(HTTPD_DEBUG, ("http_recv: already sending data\n")); + /* already sending but still receiving data, we might want to RST here? */ + pbuf_free(p); + } + } + return ERR_OK; +} + +/** + * A new incoming connection has been accepted. + */ +static err_t +http_accept(void *arg, struct altcp_pcb *pcb, err_t err) +{ + struct http_state *hs; + LWIP_UNUSED_ARG(err); + LWIP_UNUSED_ARG(arg); + LWIP_DEBUGF(HTTPD_DEBUG, ("http_accept %p / %p\n", (void *)pcb, arg)); + + if ((err != ERR_OK) || (pcb == NULL)) { + return ERR_VAL; + } + + /* Set priority */ + altcp_setprio(pcb, HTTPD_TCP_PRIO); + + /* Allocate memory for the structure that holds the state of the + connection - initialized by that function. */ + hs = http_state_alloc(); + if (hs == NULL) { + LWIP_DEBUGF(HTTPD_DEBUG, ("http_accept: Out of memory, RST\n")); + return ERR_MEM; + } + hs->pcb = pcb; + + /* Tell TCP that this is the structure we wish to be passed for our + callbacks. */ + altcp_arg(pcb, hs); + + /* Set up the various callback functions */ + altcp_recv(pcb, http_recv); + altcp_err(pcb, http_err); + altcp_poll(pcb, http_poll, HTTPD_POLL_INTERVAL); + altcp_sent(pcb, http_sent); + + return ERR_OK; +} + +static void +httpd_init_pcb(struct altcp_pcb *pcb, u16_t port) +{ + err_t err; + + if (pcb) { + altcp_setprio(pcb, HTTPD_TCP_PRIO); + /* set SOF_REUSEADDR here to explicitly bind httpd to multiple interfaces */ + err = altcp_bind(pcb, IP_ANY_TYPE, port); + LWIP_UNUSED_ARG(err); /* in case of LWIP_NOASSERT */ + LWIP_ASSERT("httpd_init: tcp_bind failed", err == ERR_OK); + pcb = altcp_listen(pcb); + LWIP_ASSERT("httpd_init: tcp_listen failed", pcb != NULL); + altcp_accept(pcb, http_accept); + } +} + +/** + * @ingroup httpd + * Initialize the httpd: set up a listening PCB and bind it to the defined port + */ +void +httpd_init(void) +{ + struct altcp_pcb *pcb; + +#if HTTPD_USE_MEM_POOL + LWIP_MEMPOOL_INIT(HTTPD_STATE); +#if LWIP_HTTPD_SSI + LWIP_MEMPOOL_INIT(HTTPD_SSI_STATE); +#endif +#endif + LWIP_DEBUGF(HTTPD_DEBUG, ("httpd_init\n")); + + /* LWIP_ASSERT_CORE_LOCKED(); is checked by tcp_new() */ + + pcb = altcp_tcp_new_ip_type(IPADDR_TYPE_ANY); + LWIP_ASSERT("httpd_init: tcp_new failed", pcb != NULL); + httpd_init_pcb(pcb, HTTPD_SERVER_PORT); +} + +#if HTTPD_ENABLE_HTTPS +/** + * @ingroup httpd + * Initialize the httpd: set up a listening PCB and bind it to the defined port. + * Also set up TLS connection handling (HTTPS). + */ +void +httpd_inits(struct altcp_tls_config *conf) +{ +#if LWIP_ALTCP_TLS + struct altcp_pcb *pcb_tls = altcp_tls_new(conf, IPADDR_TYPE_ANY); + LWIP_ASSERT("httpd_init: altcp_tls_new failed", pcb_tls != NULL); + httpd_init_pcb(pcb_tls, HTTPD_SERVER_PORT_HTTPS); +#else /* LWIP_ALTCP_TLS */ + LWIP_UNUSED_ARG(conf); +#endif /* LWIP_ALTCP_TLS */ +} +#endif /* HTTPD_ENABLE_HTTPS */ + +#if LWIP_HTTPD_SSI +/** + * @ingroup httpd + * Set the SSI handler function. + * + * @param ssi_handler the SSI handler function + * @param tags an array of SSI tag strings to search for in SSI-enabled files + * @param num_tags number of tags in the 'tags' array + */ +void +http_set_ssi_handler(tSSIHandler ssi_handler, const char **tags, int num_tags) +{ + LWIP_DEBUGF(HTTPD_DEBUG, ("http_set_ssi_handler\n")); + + LWIP_ASSERT("no ssi_handler given", ssi_handler != NULL); + httpd_ssi_handler = ssi_handler; + +#if LWIP_HTTPD_SSI_RAW + LWIP_UNUSED_ARG(tags); + LWIP_UNUSED_ARG(num_tags); +#else /* LWIP_HTTPD_SSI_RAW */ + LWIP_ASSERT("no tags given", tags != NULL); + LWIP_ASSERT("invalid number of tags", num_tags > 0); + + httpd_tags = tags; + httpd_num_tags = num_tags; +#endif /* !LWIP_HTTPD_SSI_RAW */ +} +#endif /* LWIP_HTTPD_SSI */ + +#if LWIP_HTTPD_CGI +/** + * @ingroup httpd + * Set an array of CGI filenames/handler functions + * + * @param cgis an array of CGI filenames/handler functions + * @param num_handlers number of elements in the 'cgis' array + */ +void +http_set_cgi_handlers(const tCGI *cgis, int num_handlers) +{ + LWIP_ASSERT("no cgis given", cgis != NULL); + LWIP_ASSERT("invalid number of handlers", num_handlers > 0); + + httpd_cgis = cgis; + httpd_num_cgis = num_handlers; +} +#endif /* LWIP_HTTPD_CGI */ + +#endif /* LWIP_TCP && LWIP_CALLBACK_API */ diff --git a/User/lwip_http - bak/httpd_cgi_ssi.c b/User/lwip_http - bak/httpd_cgi_ssi.c new file mode 100644 index 0000000..8bd284e --- /dev/null +++ b/User/lwip_http - bak/httpd_cgi_ssi.c @@ -0,0 +1,146 @@ +/** + ****************************************************************************** + * @file LwIP/LwIP_HTTP_Server_Raw/Src/httpd_cg_ssi.c + * @author MCD Application Team + * @brief Webserver SSI and CGI handlers + ****************************************************************************** + * @attention + * + *

                  © Copyright (c) 2017 STMicroelectronics. + * All rights reserved.

                  + * + * This software component is licensed by ST under Ultimate Liberty license + * SLA0044, the "License"; You may not use this file except in compliance with + * the License. You may obtain a copy of the License at: + * www.st.com/SLA0044 + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "bsp.h" +#include "lwip/debug.h" +#include "lwip/tcp.h" +#include "lwip/apps/httpd.h" +#include "http_cgi_ssi.h" + + +#include +#include + +tSSIHandler ADC_Page_SSI_Handler; +uint32_t ADC_not_configured=1; + +/* we will use character "t" as tag for CGI */ +char const* TAGCHAR="t"; +char const** TAGS=&TAGCHAR; + +u16_t ADC_Handler(int iIndex, char *pcInsert, int iInsertLen); + +/* CGI handler for LED control */ +const char * LEDS_CGI_Handler(int iIndex, int iNumParams, char *pcParam[], char *pcValue[]); +void httpd_ssi_init(void); +void httpd_cgi_init(void); + +/* Html request for "/leds.cgi" will start LEDS_CGI_Handler */ +const tCGI LEDS_CGI={"/leds.cgi", LEDS_CGI_Handler}; + +/* Cgi call table, only one CGI used */ +tCGI CGI_TAB[1]; + +/** + * @brief ADC_Handler : SSI handler for ADC page + */ +u16_t ADC_Handler(int iIndex, char *pcInsert, int iInsertLen) +{ + /* We have only one SSI handler iIndex = 0 */ + if (iIndex ==0) + { + char Digit1=0, Digit2=0, Digit3=0, Digit4=0; + uint32_t ADCVal = 0; + + ADCVal = 1234; //BSP_POTENTIOMETER_GetLevel(); + + /* convert to Voltage, step = 0.8 mV */ + ADCVal = (uint32_t)(ADCVal * 0.8); + + /* get digits to display */ + + Digit1= ADCVal/1000; + Digit2= (ADCVal-(Digit1*1000))/100; + Digit3= (ADCVal-((Digit1*1000)+(Digit2*100)))/10; + Digit4= ADCVal -((Digit1*1000)+(Digit2*100)+ (Digit3*10)); + + /* prepare data to be inserted in html */ + *pcInsert = (char)(Digit1+0x30); + *(pcInsert + 1) = (char)(Digit2+0x30); + *(pcInsert + 2) = (char)(Digit3+0x30); + *(pcInsert + 3) = (char)(Digit4+0x30); + + /* 4 characters need to be inserted in html*/ + return 4; + } + return 0; +} + +/** + * @brief CGI handler for LEDs control + */ +const char * LEDS_CGI_Handler(int iIndex, int iNumParams, char *pcParam[], char *pcValue[]) +{ + uint32_t i=0; + + /* We have only one SSI handler iIndex = 0 */ + if (iIndex==0) + { + /* All LEDs off */ + bsp_LedOff(1); + bsp_LedOff(2); + bsp_LedOff(3); + bsp_LedOff(4); + + /* Check cgi parameter : application GET /leds.cgi?led=2&led=4 */ + for (i=0; i

                  404: The requested file cannot be found.

                  \r\n" +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + , "Connection: keep-alive\r\nContent-Length: 77\r\n\r\n

                  404: The requested file cannot be found.

                  \r\n" +#endif +}; + +/* Indexes into the g_psHTTPHeaderStrings array */ +#define HTTP_HDR_OK 0 /* 200 OK */ +#define HTTP_HDR_NOT_FOUND 1 /* 404 File not found */ +#define HTTP_HDR_BAD_REQUEST 2 /* 400 Bad request */ +#define HTTP_HDR_NOT_IMPL 3 /* 501 Not Implemented */ +#define HTTP_HDR_OK_11 4 /* 200 OK */ +#define HTTP_HDR_NOT_FOUND_11 5 /* 404 File not found */ +#define HTTP_HDR_BAD_REQUEST_11 6 /* 400 Bad request */ +#define HTTP_HDR_NOT_IMPL_11 7 /* 501 Not Implemented */ +#define HTTP_HDR_CONTENT_LENGTH 8 /* Content-Length: (HTTP 1.0)*/ +#define HTTP_HDR_CONN_CLOSE 9 /* Connection: Close (HTTP 1.1) */ +#define HTTP_HDR_CONN_KEEPALIVE 10 /* Connection: keep-alive (HTTP 1.1) */ +#define HTTP_HDR_KEEPALIVE_LEN 11 /* Connection: keep-alive + Content-Length: (HTTP 1.1)*/ +#define HTTP_HDR_SERVER 12 /* Server: HTTPD_SERVER_AGENT */ +#define DEFAULT_404_HTML 13 /* default 404 body */ +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE +#define DEFAULT_404_HTML_PERSISTENT 14 /* default 404 body, but including Connection: keep-alive */ +#endif + +#define HTTP_CONTENT_TYPE(contenttype) "Content-Type: "contenttype"\r\n\r\n" +#define HTTP_CONTENT_TYPE_ENCODING(contenttype, encoding) "Content-Type: "contenttype"\r\nContent-Encoding: "encoding"\r\n\r\n" + +#define HTTP_HDR_HTML HTTP_CONTENT_TYPE("text/html") +#define HTTP_HDR_SSI HTTP_CONTENT_TYPE("text/html\r\nExpires: Fri, 10 Apr 2008 14:00:00 GMT\r\nPragma: no-cache") +#define HTTP_HDR_GIF HTTP_CONTENT_TYPE("image/gif") +#define HTTP_HDR_PNG HTTP_CONTENT_TYPE("image/png") +#define HTTP_HDR_JPG HTTP_CONTENT_TYPE("image/jpeg") +#define HTTP_HDR_BMP HTTP_CONTENT_TYPE("image/bmp") +#define HTTP_HDR_ICO HTTP_CONTENT_TYPE("image/x-icon") +#define HTTP_HDR_APP HTTP_CONTENT_TYPE("application/octet-stream") +#define HTTP_HDR_JS HTTP_CONTENT_TYPE("application/javascript") +#define HTTP_HDR_RA HTTP_CONTENT_TYPE("application/javascript") +#define HTTP_HDR_CSS HTTP_CONTENT_TYPE("text/css") +#define HTTP_HDR_SWF HTTP_CONTENT_TYPE("application/x-shockwave-flash") +#define HTTP_HDR_XML HTTP_CONTENT_TYPE("text/xml") +#define HTTP_HDR_PDF HTTP_CONTENT_TYPE("application/pdf") +#define HTTP_HDR_JSON HTTP_CONTENT_TYPE("application/json") +#define HTTP_HDR_CSV HTTP_CONTENT_TYPE("text/csv") +#define HTTP_HDR_TSV HTTP_CONTENT_TYPE("text/tsv") +#define HTTP_HDR_SVG HTTP_CONTENT_TYPE("image/svg+xml") +#define HTTP_HDR_SVGZ HTTP_CONTENT_TYPE_ENCODING("image/svg+xml", "gzip") + +#define HTTP_HDR_DEFAULT_TYPE HTTP_CONTENT_TYPE("text/plain") + +/** A list of extension-to-HTTP header strings (see outdated RFC 1700 MEDIA TYPES + * and http://www.iana.org/assignments/media-types for registered content types + * and subtypes) */ +static const tHTTPHeader g_psHTTPHeaders[] = { + { "html", HTTP_HDR_HTML}, + { "htm", HTTP_HDR_HTML}, + { "shtml", HTTP_HDR_SSI}, + { "shtm", HTTP_HDR_SSI}, + { "ssi", HTTP_HDR_SSI}, + { "gif", HTTP_HDR_GIF}, + { "png", HTTP_HDR_PNG}, + { "jpg", HTTP_HDR_JPG}, + { "bmp", HTTP_HDR_BMP}, + { "ico", HTTP_HDR_ICO}, + { "class", HTTP_HDR_APP}, + { "cls", HTTP_HDR_APP}, + { "js", HTTP_HDR_JS}, + { "ram", HTTP_HDR_RA}, + { "css", HTTP_HDR_CSS}, + { "swf", HTTP_HDR_SWF}, + { "xml", HTTP_HDR_XML}, + { "xsl", HTTP_HDR_XML}, + { "pdf", HTTP_HDR_PDF}, + { "json", HTTP_HDR_JSON} +#ifdef HTTPD_ADDITIONAL_CONTENT_TYPES + /* If you need to add content types not listed here: + * #define HTTPD_ADDITIONAL_CONTENT_TYPES {"ct1", HTTP_CONTENT_TYPE("text/ct1")}, {"exe", HTTP_CONTENT_TYPE("application/exe")} + */ + , HTTPD_ADDITIONAL_CONTENT_TYPES +#endif +}; + +#define NUM_HTTP_HEADERS LWIP_ARRAYSIZE(g_psHTTPHeaders) + +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ + +#if LWIP_HTTPD_SSI +static const char *const g_pcSSIExtensions[] = { + ".shtml", ".shtm", ".ssi", ".xml", ".json" +}; +#define NUM_SHTML_EXTENSIONS LWIP_ARRAYSIZE(g_pcSSIExtensions) +#endif /* LWIP_HTTPD_SSI */ + +#endif /* LWIP_HTTPD_STRUCTS_H */ diff --git a/User/lwip_http - bak/lcd_log_conf.h b/User/lwip_http - bak/lcd_log_conf.h new file mode 100644 index 0000000..10480fa --- /dev/null +++ b/User/lwip_http - bak/lcd_log_conf.h @@ -0,0 +1,148 @@ +/** + ****************************************************************************** + * @file LwIP/LwIP_HTTP_Server_Raw/Inc/lcd_log_conf.h + * @author MCD Application Team + * @brief lcd_log configuration file. + ****************************************************************************** + * @attention + * + *

                  © Copyright (c) 2017 STMicroelectronics International N.V. + * All rights reserved.

                  + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted, provided that the following conditions are met: + * + * 1. Redistribution of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of STMicroelectronics nor the names of other + * contributors to this software may be used to endorse or promote products + * derived from this software without specific written permission. + * 4. This software, including modifications and/or derivative works of this + * software, must execute solely and exclusively on microcontroller or + * microprocessor devices manufactured by or for STMicroelectronics. + * 5. Redistribution and use of this software other than as permitted under + * this license is void and will automatically terminate your rights under + * this license. + * + * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY + * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT + * SHALL STMICROELECTRONICS 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ + +#ifndef __LCD_LOG_CONF_H__ +#define __LCD_LOG_CONF_H__ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32h743i_eval_lcd.h" +#include + + +/** @addtogroup LCD_LOG + * @{ + */ + +/** @defgroup LCD_LOG + * @brief This file is the + * @{ + */ + + +/** @defgroup LCD_LOG_CONF_Exported_Defines + * @{ + */ + +/* Comment the line below to disable the scroll back and forward features */ +#define LCD_SCROLL_ENABLED 1 + + +/* Define the Fonts */ +#define LCD_LOG_HEADER_FONT Font16 +#define LCD_LOG_FOOTER_FONT Font12 +#define LCD_LOG_TEXT_FONT Font12 + +/* Define the LCD LOG Color */ +#define LCD_LOG_BACKGROUND_COLOR LCD_COLOR_WHITE +#define LCD_LOG_TEXT_COLOR LCD_COLOR_DARKBLUE + +#define LCD_LOG_SOLID_BACKGROUND_COLOR LCD_COLOR_BLUE +#define LCD_LOG_SOLID_TEXT_COLOR LCD_COLOR_WHITE + +/* Define the cache depth */ +#define CACHE_SIZE 100 +#define YWINDOW_SIZE 14 + +#if (YWINDOW_SIZE > 14) + #error "Wrong YWINDOW SIZE" +#endif + +/* Redirect the printf to the LCD */ +#ifdef __GNUC__ +/* With GCC/RAISONANCE, small printf (option LD Linker->Libraries->Small printf + set to 'Yes') calls __io_putchar() */ +#define LCD_LOG_PUTCHAR int __io_putchar(int ch) +#else +#define LCD_LOG_PUTCHAR int fputc(int ch, FILE *f) +#endif /* __GNUC__ */ + +/** @defgroup LCD_LOG_CONF_Exported_TypesDefinitions + * @{ + */ + +/** + * @} + */ + + +/** @defgroup LCD_LOG_Exported_Macros + * @{ + */ + + +/** + * @} + */ + +/** @defgroup LCD_LOG_CONF_Exported_Variables + * @{ + */ + +/** + * @} + */ + +/** @defgroup LCD_LOG_CONF_Exported_FunctionsPrototype + * @{ + */ + +/** + * @} + */ + + +#endif //__LCD_LOG_CONF_H__ + +/** + * @} + */ + +/** + * @} + */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/User/lwip_http/altcp_proxyconnect.c b/User/lwip_http/altcp_proxyconnect.c new file mode 100644 index 0000000..9a0b2ba --- /dev/null +++ b/User/lwip_http/altcp_proxyconnect.c @@ -0,0 +1,584 @@ +/** + * @file + * Application layered TCP connection API that executes a proxy-connect. + * + * This file provides a starting layer that executes a proxy-connect e.g. to + * set up TLS connections through a http proxy. + */ + +/* + * Copyright (c) 2018 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ + +#include "lwip/apps/altcp_proxyconnect.h" + +#if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/altcp.h" +#include "lwip/priv/altcp_priv.h" + +#include "lwip/altcp_tcp.h" +#include "lwip/altcp_tls.h" + +#include "lwip/mem.h" +#include "lwip/init.h" + +#include + +/** This string is passed in the HTTP header as "User-Agent: " */ +#ifndef ALTCP_PROXYCONNECT_CLIENT_AGENT +#define ALTCP_PROXYCONNECT_CLIENT_AGENT "lwIP/" LWIP_VERSION_STRING " (http://savannah.nongnu.org/projects/lwip)" +#endif + +#define ALTCP_PROXYCONNECT_FLAGS_CONNECT_STARTED 0x01 +#define ALTCP_PROXYCONNECT_FLAGS_HANDSHAKE_DONE 0x02 + +typedef struct altcp_proxyconnect_state_s +{ + ip_addr_t outer_addr; + u16_t outer_port; + struct altcp_proxyconnect_config *conf; + u8_t flags; +} altcp_proxyconnect_state_t; + +/* Variable prototype, the actual declaration is at the end of this file + since it contains pointers to static functions declared here */ +extern const struct altcp_functions altcp_proxyconnect_functions; + +/* memory management functions: */ + +static altcp_proxyconnect_state_t * +altcp_proxyconnect_state_alloc(void) +{ + altcp_proxyconnect_state_t *ret = (altcp_proxyconnect_state_t *)mem_calloc(1, sizeof(altcp_proxyconnect_state_t)); + return ret; +} + +static void +altcp_proxyconnect_state_free(altcp_proxyconnect_state_t *state) +{ + LWIP_ASSERT("state != NULL", state != NULL); + mem_free(state); +} + +/* helper functions */ + +#define PROXY_CONNECT "CONNECT %s:%d HTTP/1.1\r\n" /* HOST, PORT */ \ + "User-Agent: %s\r\n" /* User-Agent */\ + "Proxy-Connection: keep-alive\r\n" \ + "Connection: keep-alive\r\n" \ + "\r\n" +#define PROXY_CONNECT_FORMAT(host, port) PROXY_CONNECT, host, port, ALTCP_PROXYCONNECT_CLIENT_AGENT + +/* Format the http proxy connect request via snprintf */ +static int +altcp_proxyconnect_format_request(char *buffer, size_t bufsize, const char *host, int port) +{ + return snprintf(buffer, bufsize, PROXY_CONNECT_FORMAT(host, port)); +} + +/* Create and send the http proxy connect request */ +static err_t +altcp_proxyconnect_send_request(struct altcp_pcb *conn) +{ + int len, len2; + mem_size_t alloc_len; + char *buffer, *host; + altcp_proxyconnect_state_t *state = (altcp_proxyconnect_state_t *)conn->state; + + if (!state) { + return ERR_VAL; + } + /* Use printf with zero length to get the required allocation size */ + len = altcp_proxyconnect_format_request(NULL, 0, "", state->outer_port); + if (len < 0) { + return ERR_VAL; + } + /* add allocation size for IP address strings */ +#if LWIP_IPV6 + len += 40; /* worst-case IPv6 address length */ +#else + len += 16; /* worst-case IPv4 address length */ +#endif + alloc_len = (mem_size_t)len; + if ((len < 0) || (int)alloc_len != len) { + /* overflow */ + return ERR_MEM; + } + /* Allocate a bufer for the request string */ + buffer = (char *)mem_malloc(alloc_len); + if (buffer == NULL) { + return ERR_MEM; + } + host = ipaddr_ntoa(&state->outer_addr); + len2 = altcp_proxyconnect_format_request(buffer, alloc_len, host, state->outer_port); + if ((len2 > 0) && (len2 <= len) && (len2 <= 0xFFFF)) { + err_t err = altcp_write(conn->inner_conn, buffer, (u16_t)len2, TCP_WRITE_FLAG_COPY); + if (err != ERR_OK) { + /* @todo: abort? */ + mem_free(buffer); + return err; + } + } + mem_free(buffer); + return ERR_OK; +} + +/* callback functions from inner/lower connection: */ + +/** Connected callback from lower connection (i.e. TCP). + * Not really implemented/tested yet... + */ +static err_t +altcp_proxyconnect_lower_connected(void *arg, struct altcp_pcb *inner_conn, err_t err) +{ + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + if (conn && conn->state) { + LWIP_ASSERT("pcb mismatch", conn->inner_conn == inner_conn); + LWIP_UNUSED_ARG(inner_conn); /* for LWIP_NOASSERT */ + /* upper connected is called when handshake is done */ + if (err != ERR_OK) { + if (conn->connected) { + if (conn->connected(conn->arg, conn, err) == ERR_ABRT) { + return ERR_ABRT; + } + return ERR_OK; + } + } + /* send proxy connect request here */ + return altcp_proxyconnect_send_request(conn); + } + return ERR_VAL; +} + +/** Recv callback from lower connection (i.e. TCP) + * This one mainly differs between connection setup (wait for proxy OK string) + * and application phase (data is passed on to the application). + */ +static err_t +altcp_proxyconnect_lower_recv(void *arg, struct altcp_pcb *inner_conn, struct pbuf *p, err_t err) +{ + altcp_proxyconnect_state_t *state; + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + + LWIP_ASSERT("no err expected", err == ERR_OK); + LWIP_UNUSED_ARG(err); + + if (!conn) { + /* no connection given as arg? should not happen, but prevent pbuf/conn leaks */ + if (p != NULL) { + pbuf_free(p); + } + altcp_close(inner_conn); + return ERR_CLSD; + } + state = (altcp_proxyconnect_state_t *)conn->state; + LWIP_ASSERT("pcb mismatch", conn->inner_conn == inner_conn); + if (!state) { + /* already closed */ + if (p != NULL) { + pbuf_free(p); + } + altcp_close(inner_conn); + return ERR_CLSD; + } + if (state->flags & ALTCP_PROXYCONNECT_FLAGS_HANDSHAKE_DONE) { + /* application phase, just pass this through */ + if (conn->recv) { + return conn->recv(conn->arg, conn, p, err); + } + pbuf_free(p); + return ERR_OK; + } else { + /* setup phase */ + /* handle NULL pbuf (inner connection closed) */ + if (p == NULL) { + if (altcp_close(conn) != ERR_OK) { + altcp_abort(conn); + return ERR_ABRT; + } + return ERR_OK; + } else { + /* @todo: parse setup phase rx data + for now, we just wait for the end of the header... */ + u16_t idx = pbuf_memfind(p, "\r\n\r\n", 4, 0); + altcp_recved(inner_conn, p->tot_len); + pbuf_free(p); + if (idx != 0xFFFF) { + state->flags |= ALTCP_PROXYCONNECT_FLAGS_HANDSHAKE_DONE; + if (conn->connected) { + return conn->connected(conn->arg, conn, ERR_OK); + } + } + return ERR_OK; + } + } +} + +/** Sent callback from lower connection (i.e. TCP) + * This only informs the upper layer to try to send more, not about + * the number of ACKed bytes. + */ +static err_t +altcp_proxyconnect_lower_sent(void *arg, struct altcp_pcb *inner_conn, u16_t len) +{ + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + LWIP_UNUSED_ARG(len); + if (conn) { + altcp_proxyconnect_state_t *state = (altcp_proxyconnect_state_t *)conn->state; + LWIP_ASSERT("pcb mismatch", conn->inner_conn == inner_conn); + LWIP_UNUSED_ARG(inner_conn); /* for LWIP_NOASSERT */ + if (!state || !(state->flags & ALTCP_PROXYCONNECT_FLAGS_HANDSHAKE_DONE)) { + /* @todo: do something here? */ + return ERR_OK; + } + /* pass this on to upper sent */ + if (conn->sent) { + return conn->sent(conn->arg, conn, len); + } + } + return ERR_OK; +} + +/** Poll callback from lower connection (i.e. TCP) + * Just pass this on to the application. + * @todo: retry sending? + */ +static err_t +altcp_proxyconnect_lower_poll(void *arg, struct altcp_pcb *inner_conn) +{ + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + if (conn) { + LWIP_ASSERT("pcb mismatch", conn->inner_conn == inner_conn); + LWIP_UNUSED_ARG(inner_conn); /* for LWIP_NOASSERT */ + if (conn->poll) { + return conn->poll(conn->arg, conn); + } + } + return ERR_OK; +} + +static void +altcp_proxyconnect_lower_err(void *arg, err_t err) +{ + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + if (conn) { + conn->inner_conn = NULL; /* already freed */ + if (conn->err) { + conn->err(conn->arg, err); + } + altcp_free(conn); + } +} + + +/* setup functions */ + +static void +altcp_proxyconnect_setup_callbacks(struct altcp_pcb *conn, struct altcp_pcb *inner_conn) +{ + altcp_arg(inner_conn, conn); + altcp_recv(inner_conn, altcp_proxyconnect_lower_recv); + altcp_sent(inner_conn, altcp_proxyconnect_lower_sent); + altcp_err(inner_conn, altcp_proxyconnect_lower_err); + /* tcp_poll is set when interval is set by application */ + /* listen is set totally different :-) */ +} + +static err_t +altcp_proxyconnect_setup(struct altcp_proxyconnect_config *config, struct altcp_pcb *conn, struct altcp_pcb *inner_conn) +{ + altcp_proxyconnect_state_t *state; + if (!config) { + return ERR_ARG; + } + LWIP_ASSERT("invalid inner_conn", conn != inner_conn); + + /* allocate proxyconnect context */ + state = altcp_proxyconnect_state_alloc(); + if (state == NULL) { + return ERR_MEM; + } + state->flags = 0; + state->conf = config; + altcp_proxyconnect_setup_callbacks(conn, inner_conn); + conn->inner_conn = inner_conn; + conn->fns = &altcp_proxyconnect_functions; + conn->state = state; + return ERR_OK; +} + +/** Allocate a new altcp layer connecting through a proxy. + * This function gets the inner pcb passed. + * + * @param config struct altcp_proxyconnect_config that contains the proxy settings + * @param inner_pcb pcb that makes the connection to the proxy (i.e. tcp pcb) + */ +struct altcp_pcb * +altcp_proxyconnect_new(struct altcp_proxyconnect_config *config, struct altcp_pcb *inner_pcb) +{ + struct altcp_pcb *ret; + if (inner_pcb == NULL) { + return NULL; + } + ret = altcp_alloc(); + if (ret != NULL) { + if (altcp_proxyconnect_setup(config, ret, inner_pcb) != ERR_OK) { + altcp_free(ret); + return NULL; + } + } + return ret; +} + +/** Allocate a new altcp layer connecting through a proxy. + * This function allocates the inner pcb as tcp pcb, resulting in a direct tcp + * connection to the proxy. + * + * @param config struct altcp_proxyconnect_config that contains the proxy settings + * @param ip_type IP type of the connection (@ref lwip_ip_addr_type) + */ +struct altcp_pcb * +altcp_proxyconnect_new_tcp(struct altcp_proxyconnect_config *config, u8_t ip_type) +{ + struct altcp_pcb *inner_pcb, *ret; + + /* inner pcb is tcp */ + inner_pcb = altcp_tcp_new_ip_type(ip_type); + if (inner_pcb == NULL) { + return NULL; + } + ret = altcp_proxyconnect_new(config, inner_pcb); + if (ret == NULL) { + altcp_close(inner_pcb); + } + return ret; +} + +/** Allocator function to allocate a proxy connect altcp pcb connecting directly + * via tcp to the proxy. + * + * The returned pcb is a chain: altcp_proxyconnect - altcp_tcp - tcp pcb + * + * This function is meant for use with @ref altcp_new. + * + * @param arg struct altcp_proxyconnect_config that contains the proxy settings + * @param ip_type IP type of the connection (@ref lwip_ip_addr_type) + */ +struct altcp_pcb * +altcp_proxyconnect_alloc(void *arg, u8_t ip_type) +{ + return altcp_proxyconnect_new_tcp((struct altcp_proxyconnect_config *)arg, ip_type); +} + + +#if LWIP_ALTCP_TLS + +/** Allocator function to allocate a TLS connection through a proxy. + * + * The returned pcb is a chain: altcp_tls - altcp_proxyconnect - altcp_tcp - tcp pcb + * + * This function is meant for use with @ref altcp_new. + * + * @param arg struct altcp_proxyconnect_tls_config that contains the proxy settings + * and tls settings + * @param ip_type IP type of the connection (@ref lwip_ip_addr_type) + */ +struct altcp_pcb * +altcp_proxyconnect_tls_alloc(void *arg, u8_t ip_type) +{ + struct altcp_proxyconnect_tls_config *cfg = (struct altcp_proxyconnect_tls_config *)arg; + struct altcp_pcb *proxy_pcb; + struct altcp_pcb *tls_pcb; + + proxy_pcb = altcp_proxyconnect_new_tcp(&cfg->proxy, ip_type); + tls_pcb = altcp_tls_wrap(cfg->tls_config, proxy_pcb); + + if (tls_pcb == NULL) { + altcp_close(proxy_pcb); + } + return tls_pcb; +} +#endif /* LWIP_ALTCP_TLS */ + +/* "virtual" functions */ +static void +altcp_proxyconnect_set_poll(struct altcp_pcb *conn, u8_t interval) +{ + if (conn != NULL) { + altcp_poll(conn->inner_conn, altcp_proxyconnect_lower_poll, interval); + } +} + +static void +altcp_proxyconnect_recved(struct altcp_pcb *conn, u16_t len) +{ + altcp_proxyconnect_state_t *state; + if (conn == NULL) { + return; + } + state = (altcp_proxyconnect_state_t *)conn->state; + if (state == NULL) { + return; + } + if (!(state->flags & ALTCP_PROXYCONNECT_FLAGS_HANDSHAKE_DONE)) { + return; + } + altcp_recved(conn->inner_conn, len); +} + +static err_t +altcp_proxyconnect_connect(struct altcp_pcb *conn, const ip_addr_t *ipaddr, u16_t port, altcp_connected_fn connected) +{ + altcp_proxyconnect_state_t *state; + + if ((conn == NULL) || (ipaddr == NULL)) { + return ERR_VAL; + } + state = (altcp_proxyconnect_state_t *)conn->state; + if (state == NULL) { + return ERR_VAL; + } + if (state->flags & ALTCP_PROXYCONNECT_FLAGS_CONNECT_STARTED) { + return ERR_VAL; + } + state->flags |= ALTCP_PROXYCONNECT_FLAGS_CONNECT_STARTED; + + conn->connected = connected; + /* connect to our proxy instead, but store the requested address and port */ + ip_addr_copy(state->outer_addr, *ipaddr); + state->outer_port = port; + + return altcp_connect(conn->inner_conn, &state->conf->proxy_addr, state->conf->proxy_port, altcp_proxyconnect_lower_connected); +} + +static struct altcp_pcb * +altcp_proxyconnect_listen(struct altcp_pcb *conn, u8_t backlog, err_t *err) +{ + LWIP_UNUSED_ARG(conn); + LWIP_UNUSED_ARG(backlog); + LWIP_UNUSED_ARG(err); + /* listen not supported! */ + return NULL; +} + +static void +altcp_proxyconnect_abort(struct altcp_pcb *conn) +{ + if (conn != NULL) { + if (conn->inner_conn != NULL) { + altcp_abort(conn->inner_conn); + } + altcp_free(conn); + } +} + +static err_t +altcp_proxyconnect_close(struct altcp_pcb *conn) +{ + if (conn == NULL) { + return ERR_VAL; + } + if (conn->inner_conn != NULL) { + err_t err = altcp_close(conn->inner_conn); + if (err != ERR_OK) { + /* closing inner conn failed, return the error */ + return err; + } + } + /* no inner conn or closing it succeeded, deallocate myself */ + altcp_free(conn); + return ERR_OK; +} + +static err_t +altcp_proxyconnect_write(struct altcp_pcb *conn, const void *dataptr, u16_t len, u8_t apiflags) +{ + altcp_proxyconnect_state_t *state; + + LWIP_UNUSED_ARG(apiflags); + + if (conn == NULL) { + return ERR_VAL; + } + + state = (altcp_proxyconnect_state_t *)conn->state; + if (state == NULL) { + /* @todo: which error? */ + return ERR_CLSD; + } + if (!(state->flags & ALTCP_PROXYCONNECT_FLAGS_HANDSHAKE_DONE)) { + /* @todo: which error? */ + return ERR_VAL; + } + return altcp_write(conn->inner_conn, dataptr, len, apiflags); +} + +static void +altcp_proxyconnect_dealloc(struct altcp_pcb *conn) +{ + /* clean up and free tls state */ + if (conn) { + altcp_proxyconnect_state_t *state = (altcp_proxyconnect_state_t *)conn->state; + if (state) { + altcp_proxyconnect_state_free(state); + conn->state = NULL; + } + } +} +const struct altcp_functions altcp_proxyconnect_functions = { + altcp_proxyconnect_set_poll, + altcp_proxyconnect_recved, + altcp_default_bind, + altcp_proxyconnect_connect, + altcp_proxyconnect_listen, + altcp_proxyconnect_abort, + altcp_proxyconnect_close, + altcp_default_shutdown, + altcp_proxyconnect_write, + altcp_default_output, + altcp_default_mss, + altcp_default_sndbuf, + altcp_default_sndqueuelen, + altcp_default_nagle_disable, + altcp_default_nagle_enable, + altcp_default_nagle_disabled, + altcp_default_setprio, + altcp_proxyconnect_dealloc, + altcp_default_get_tcp_addrinfo, + altcp_default_get_ip, + altcp_default_get_port +#ifdef LWIP_DEBUG + , altcp_default_dbg_get_tcp_state +#endif +}; + +#endif /* LWIP_ALTCP */ diff --git a/User/lwip_http/fs.c b/User/lwip_http/fs.c new file mode 100644 index 0000000..e0387f7 --- /dev/null +++ b/User/lwip_http/fs.c @@ -0,0 +1,184 @@ +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#include "lwip/apps/httpd_opts.h" +#include "lwip/def.h" +#include "lwip/apps/fs.h" +#include "fsdata.h" +#include + + +#define FS_ROOT file__STM32H7xxLED_html +#define FS_NUMFILES 7 + +//#if HTTPD_USE_CUSTOM_FSDATA +//#include "fsdata_custom.c" +//#else /* HTTPD_USE_CUSTOM_FSDATA */ +//#include "fsdata.c" +//#endif /* HTTPD_USE_CUSTOM_FSDATA */ + +#include "fsdata_custom.c" + +/*-----------------------------------------------------------------------------------*/ + +#if LWIP_HTTPD_CUSTOM_FILES +int fs_open_custom(struct fs_file *file, const char *name); +void fs_close_custom(struct fs_file *file); +#if LWIP_HTTPD_FS_ASYNC_READ +u8_t fs_canread_custom(struct fs_file *file); +u8_t fs_wait_read_custom(struct fs_file *file, fs_wait_cb callback_fn, void *callback_arg); +int fs_read_async_custom(struct fs_file *file, char *buffer, int count, fs_wait_cb callback_fn, void *callback_arg); +#else /* LWIP_HTTPD_FS_ASYNC_READ */ +int fs_read_custom(struct fs_file *file, char *buffer, int count); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + +/*-----------------------------------------------------------------------------------*/ +err_t +fs_open(struct fs_file *file, const char *name) +{ + const struct fsdata_file *f; + + if ((file == NULL) || (name == NULL)) { + return ERR_ARG; + } + +#if LWIP_HTTPD_CUSTOM_FILES + if (fs_open_custom(file, name)) { + file->is_custom_file = 1; + return ERR_OK; + } + file->is_custom_file = 0; +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + + for (f = FS_ROOT; f != NULL; f = f->next) { + if (!strcmp(name, (const char *)f->name)) { + file->data = (const char *)f->data; + file->len = f->len; + file->index = f->len; + file->pextension = NULL; + file->flags = f->flags; +#if HTTPD_PRECALCULATED_CHECKSUM + file->chksum_count = f->chksum_count; + file->chksum = f->chksum; +#endif /* HTTPD_PRECALCULATED_CHECKSUM */ +#if LWIP_HTTPD_FILE_STATE + file->state = fs_state_init(file, name); +#endif /* #if LWIP_HTTPD_FILE_STATE */ + return ERR_OK; + } + } + /* file not found */ + return ERR_VAL; +} + +/*-----------------------------------------------------------------------------------*/ +void +fs_close(struct fs_file *file) +{ +#if LWIP_HTTPD_CUSTOM_FILES + if (file->is_custom_file) { + fs_close_custom(file); + } +#endif /* LWIP_HTTPD_CUSTOM_FILES */ +#if LWIP_HTTPD_FILE_STATE + fs_state_free(file, file->state); +#endif /* #if LWIP_HTTPD_FILE_STATE */ + LWIP_UNUSED_ARG(file); +} +/*-----------------------------------------------------------------------------------*/ +#if LWIP_HTTPD_DYNAMIC_FILE_READ +#if LWIP_HTTPD_FS_ASYNC_READ +int +fs_read_async(struct fs_file *file, char *buffer, int count, fs_wait_cb callback_fn, void *callback_arg) +#else /* LWIP_HTTPD_FS_ASYNC_READ */ +int +fs_read(struct fs_file *file, char *buffer, int count) +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +{ + int read; + if(file->index == file->len) { + return FS_READ_EOF; + } +#if LWIP_HTTPD_FS_ASYNC_READ + LWIP_UNUSED_ARG(callback_fn); + LWIP_UNUSED_ARG(callback_arg); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +#if LWIP_HTTPD_CUSTOM_FILES + if (file->is_custom_file) { +#if LWIP_HTTPD_FS_ASYNC_READ + return fs_read_async_custom(file, buffer, count, callback_fn, callback_arg); +#else /* LWIP_HTTPD_FS_ASYNC_READ */ + return fs_read_custom(file, buffer, count); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + } +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + + read = file->len - file->index; + if(read > count) { + read = count; + } + + MEMCPY(buffer, (file->data + file->index), read); + file->index += read; + + return(read); +} +#endif /* LWIP_HTTPD_DYNAMIC_FILE_READ */ +/*-----------------------------------------------------------------------------------*/ +#if LWIP_HTTPD_FS_ASYNC_READ +int +fs_is_file_ready(struct fs_file *file, fs_wait_cb callback_fn, void *callback_arg) +{ + if (file != NULL) { +#if LWIP_HTTPD_FS_ASYNC_READ +#if LWIP_HTTPD_CUSTOM_FILES + if (!fs_canread_custom(file)) { + if (fs_wait_read_custom(file, callback_fn, callback_arg)) { + return 0; + } + } +#else /* LWIP_HTTPD_CUSTOM_FILES */ + LWIP_UNUSED_ARG(callback_fn); + LWIP_UNUSED_ARG(callback_arg); +#endif /* LWIP_HTTPD_CUSTOM_FILES */ +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + } + return 1; +} +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +/*-----------------------------------------------------------------------------------*/ +int +fs_bytes_left(struct fs_file *file) +{ + return file->len - file->index; +} diff --git a/User/lwip_http/fs_new.c b/User/lwip_http/fs_new.c new file mode 100644 index 0000000..f15a480 --- /dev/null +++ b/User/lwip_http/fs_new.c @@ -0,0 +1,174 @@ +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#include "lwip/apps/httpd_opts.h" +#include "lwip/def.h" +#include "lwip/apps/fs.h" +#include + + +#include HTTPD_FSDATA_FILE + +/*-----------------------------------------------------------------------------------*/ + +#if LWIP_HTTPD_CUSTOM_FILES +int fs_open_custom(struct fs_file *file, const char *name); +void fs_close_custom(struct fs_file *file); +#if LWIP_HTTPD_FS_ASYNC_READ +u8_t fs_canread_custom(struct fs_file *file); +u8_t fs_wait_read_custom(struct fs_file *file, fs_wait_cb callback_fn, void *callback_arg); +int fs_read_async_custom(struct fs_file *file, char *buffer, int count, fs_wait_cb callback_fn, void *callback_arg); +#else /* LWIP_HTTPD_FS_ASYNC_READ */ +int fs_read_custom(struct fs_file *file, char *buffer, int count); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + +/*-----------------------------------------------------------------------------------*/ +err_t +fs_open(struct fs_file *file, const char *name) +{ + const struct fsdata_file *f; + + if ((file == NULL) || (name == NULL)) { + return ERR_ARG; + } + +#if LWIP_HTTPD_CUSTOM_FILES + if (fs_open_custom(file, name)) { + file->is_custom_file = 1; + return ERR_OK; + } + file->is_custom_file = 0; +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + + for (f = FS_ROOT; f != NULL; f = f->next) { + if (!strcmp(name, (const char *)f->name)) { + file->data = (const char *)f->data; + file->len = f->len; + file->index = f->len; + file->pextension = NULL; + file->flags = f->flags; +#if HTTPD_PRECALCULATED_CHECKSUM + file->chksum_count = f->chksum_count; + file->chksum = f->chksum; +#endif /* HTTPD_PRECALCULATED_CHECKSUM */ +#if LWIP_HTTPD_FILE_STATE + file->state = fs_state_init(file, name); +#endif /* #if LWIP_HTTPD_FILE_STATE */ + return ERR_OK; + } + } + /* file not found */ + return ERR_VAL; +} + +/*-----------------------------------------------------------------------------------*/ +void +fs_close(struct fs_file *file) +{ +#if LWIP_HTTPD_CUSTOM_FILES + if (file->is_custom_file) { + fs_close_custom(file); + } +#endif /* LWIP_HTTPD_CUSTOM_FILES */ +#if LWIP_HTTPD_FILE_STATE + fs_state_free(file, file->state); +#endif /* #if LWIP_HTTPD_FILE_STATE */ + LWIP_UNUSED_ARG(file); +} +/*-----------------------------------------------------------------------------------*/ +#if LWIP_HTTPD_DYNAMIC_FILE_READ +#if LWIP_HTTPD_FS_ASYNC_READ +int +fs_read_async(struct fs_file *file, char *buffer, int count, fs_wait_cb callback_fn, void *callback_arg) +#else /* LWIP_HTTPD_FS_ASYNC_READ */ +int +fs_read(struct fs_file *file, char *buffer, int count) +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +{ + int read; + if (file->index == file->len) { + return FS_READ_EOF; + } +#if LWIP_HTTPD_FS_ASYNC_READ + LWIP_UNUSED_ARG(callback_fn); + LWIP_UNUSED_ARG(callback_arg); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +#if LWIP_HTTPD_CUSTOM_FILES + if (file->is_custom_file) { +#if LWIP_HTTPD_FS_ASYNC_READ + return fs_read_async_custom(file, buffer, count, callback_fn, callback_arg); +#else /* LWIP_HTTPD_FS_ASYNC_READ */ + return fs_read_custom(file, buffer, count); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + } +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + + read = file->len - file->index; + if (read > count) { + read = count; + } + + MEMCPY(buffer, (file->data + file->index), read); + file->index += read; + + return (read); +} +#endif /* LWIP_HTTPD_DYNAMIC_FILE_READ */ +/*-----------------------------------------------------------------------------------*/ +#if LWIP_HTTPD_FS_ASYNC_READ +int +fs_is_file_ready(struct fs_file *file, fs_wait_cb callback_fn, void *callback_arg) +{ + if (file != NULL) { +#if LWIP_HTTPD_FS_ASYNC_READ +#if LWIP_HTTPD_CUSTOM_FILES + if (!fs_canread_custom(file)) { + if (fs_wait_read_custom(file, callback_fn, callback_arg)) { + return 0; + } + } +#else /* LWIP_HTTPD_CUSTOM_FILES */ + LWIP_UNUSED_ARG(callback_fn); + LWIP_UNUSED_ARG(callback_arg); +#endif /* LWIP_HTTPD_CUSTOM_FILES */ +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + } + return 1; +} +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +/*-----------------------------------------------------------------------------------*/ +int +fs_bytes_left(struct fs_file *file) +{ + return file->len - file->index; +} diff --git a/User/lwip_http/fsdata.c b/User/lwip_http/fsdata.c new file mode 100644 index 0000000..6170ce6 --- /dev/null +++ b/User/lwip_http/fsdata.c @@ -0,0 +1,298 @@ +#include "lwip/apps/fs.h" +#include "lwip/def.h" +#include "fsdata.h" + + +#define file_NULL (struct fsdata_file *) NULL + + +static const unsigned int dummy_align__img_sics_gif = 0; +static const unsigned char data__img_sics_gif[] = { +/* /img/sics.gif (14 chars) */ +0x2f,0x69,0x6d,0x67,0x2f,0x73,0x69,0x63,0x73,0x2e,0x67,0x69,0x66,0x00,0x00,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) +" (63 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, +0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, +0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, +0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, +/* "Content-type: image/gif + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x69,0x6d, +0x61,0x67,0x65,0x2f,0x67,0x69,0x66,0x0d,0x0a,0x0d,0x0a, +/* raw file data (724 bytes) */ +0x47,0x49,0x46,0x38,0x39,0x61,0x46,0x00,0x22,0x00,0xa5,0x00,0x00,0xd9,0x2b,0x39, +0x6a,0x6a,0x6a,0xbf,0xbf,0xbf,0x93,0x93,0x93,0x0f,0x0f,0x0f,0xb0,0xb0,0xb0,0xa6, +0xa6,0xa6,0x80,0x80,0x80,0x76,0x76,0x76,0x1e,0x1e,0x1e,0x9d,0x9d,0x9d,0x2e,0x2e, +0x2e,0x49,0x49,0x49,0x54,0x54,0x54,0x8a,0x8a,0x8a,0x60,0x60,0x60,0xc6,0xa6,0x99, +0xbd,0xb5,0xb2,0xc2,0xab,0xa1,0xd9,0x41,0x40,0xd5,0x67,0x55,0xc0,0xb0,0xaa,0xd5, +0x5e,0x4e,0xd6,0x50,0x45,0xcc,0x93,0x7d,0xc8,0xa1,0x90,0xce,0x8b,0x76,0xd2,0x7b, +0x65,0xd1,0x84,0x6d,0xc9,0x99,0x86,0x3a,0x3a,0x3a,0x00,0x00,0x00,0xb8,0xb8,0xb8, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2c,0x00,0x00, +0x00,0x00,0x46,0x00,0x22,0x00,0x00,0x06,0xfe,0x40,0x90,0x70,0x48,0x2c,0x1a,0x8f, +0xc8,0xa4,0x72,0xc9,0x6c,0x3a,0x9f,0xd0,0xa8,0x74,0x4a,0xad,0x5a,0xaf,0xd8,0xac, +0x76,0xa9,0x40,0x04,0xbe,0x83,0xe2,0x60,0x3c,0x50,0x20,0x0d,0x8e,0x6f,0x00,0x31, +0x28,0x1c,0x0d,0x07,0xb5,0xc3,0x60,0x75,0x24,0x3e,0xf8,0xfc,0x87,0x11,0x06,0xe9, +0x3d,0x46,0x07,0x0b,0x7a,0x7a,0x7c,0x43,0x06,0x1e,0x84,0x78,0x0b,0x07,0x6e,0x51, +0x01,0x8a,0x84,0x08,0x7e,0x79,0x80,0x87,0x89,0x91,0x7a,0x93,0x0a,0x04,0x99,0x78, +0x96,0x4f,0x03,0x9e,0x79,0x01,0x94,0x9f,0x43,0x9c,0xa3,0xa4,0x05,0x77,0xa3,0xa0, +0x4e,0x98,0x79,0x0b,0x1e,0x83,0xa4,0xa6,0x1f,0x96,0x05,0x9d,0xaa,0x78,0x01,0x07, +0x84,0x04,0x1e,0x1e,0xbb,0xb8,0x51,0x84,0x0e,0x43,0x05,0x07,0x77,0xa5,0x7f,0x42, +0xb1,0xb2,0x01,0x63,0x08,0x0d,0xbb,0x01,0x0c,0x7a,0x0d,0x44,0x0e,0xd8,0xaf,0x4c, +0x05,0x7a,0x04,0x47,0x07,0x07,0xb7,0x80,0xa2,0xe1,0x7d,0x44,0x05,0x01,0x04,0x01, +0xd0,0xea,0x87,0x93,0x4f,0xe0,0x9a,0x49,0xce,0xd8,0x79,0x04,0x66,0x20,0x15,0x10, +0x10,0x11,0x92,0x29,0x80,0xb6,0xc0,0x91,0x15,0x45,0x1e,0x90,0x19,0x71,0x46,0xa8, +0x5c,0x04,0x0e,0x00,0x22,0x4e,0xe8,0x40,0x24,0x9f,0x3e,0x04,0x06,0xa7,0x58,0xd4, +0x93,0xa0,0x1c,0x91,0x3f,0xe8,0xf0,0x88,0x03,0xb1,0x21,0xa2,0x49,0x00,0x19,0x86, +0xfc,0x52,0x44,0xe0,0x01,0x9d,0x29,0x21,0x15,0x25,0x50,0xf7,0x67,0x25,0x1e,0x06, +0xfd,0x4e,0x9a,0xb4,0x90,0xac,0x15,0xfa,0xcb,0x52,0x53,0x1e,0x8c,0xf2,0xf8,0x07, +0x92,0x2d,0x08,0x3a,0x4d,0x12,0x49,0x95,0x49,0xdb,0x14,0x04,0xc4,0x14,0x85,0x29, +0xaa,0xe7,0x01,0x08,0xa4,0x49,0x01,0x14,0x51,0xe0,0x53,0x91,0xd5,0x29,0x06,0x1a, +0x64,0x02,0xf4,0xc7,0x81,0x9e,0x05,0x20,0x22,0x64,0xa5,0x30,0xae,0xab,0x9e,0x97, +0x53,0xd8,0xb9,0xfd,0x50,0xef,0x93,0x02,0x42,0x74,0x34,0xe8,0x9c,0x20,0x21,0xc9, +0x01,0x68,0x78,0xe6,0x55,0x29,0x20,0x56,0x4f,0x4c,0x40,0x51,0x71,0x82,0xc0,0x70, +0x21,0x22,0x85,0xbe,0x4b,0x1c,0x44,0x05,0xea,0xa4,0x01,0xbf,0x22,0xb5,0xf0,0x1c, +0x06,0x51,0x38,0x8f,0xe0,0x22,0xec,0x18,0xac,0x39,0x22,0xd4,0xd6,0x93,0x44,0x01, +0x32,0x82,0xc8,0xfc,0x61,0xb3,0x01,0x45,0x0c,0x2e,0x83,0x30,0xd0,0x0e,0x17,0x24, +0x0f,0x70,0x85,0x94,0xee,0x05,0x05,0x53,0x4b,0x32,0x1b,0x3f,0x98,0xd3,0x1d,0x29, +0x81,0xb0,0xae,0x1e,0x8c,0x7e,0x68,0xe0,0x60,0x5a,0x54,0x8f,0xb0,0x78,0x69,0x73, +0x06,0xa2,0x00,0x6b,0x57,0xca,0x3d,0x11,0x50,0xbd,0x04,0x30,0x4b,0x3a,0xd4,0xab, +0x5f,0x1f,0x9b,0x3d,0x13,0x74,0x27,0x88,0x3c,0x25,0xe0,0x17,0xbe,0x7a,0x79,0x45, +0x0d,0x0c,0xb0,0x8b,0xda,0x90,0xca,0x80,0x06,0x5d,0x17,0x60,0x1c,0x22,0x4c,0xd8, +0x57,0x22,0x06,0x20,0x00,0x98,0x07,0x08,0xe4,0x56,0x80,0x80,0x1c,0xc5,0xb7,0xc5, +0x82,0x0c,0x36,0xe8,0xe0,0x83,0x10,0x46,0x28,0xe1,0x84,0x14,0x56,0x68,0xa1,0x10, +0x41,0x00,0x00,0x3b,}; + +static const unsigned int dummy_align__404_html = 1; +static const unsigned char data__404_html[] = { +/* /404.html (10 chars) */ +0x2f,0x34,0x30,0x34,0x2e,0x68,0x74,0x6d,0x6c,0x00,0x00,0x00, + +/* HTTP header */ +/* "HTTP/1.0 404 File not found +" (29 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x34,0x30,0x34,0x20,0x46,0x69,0x6c, +0x65,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x0d,0x0a, +/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) +" (63 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, +0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, +0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, +0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, +/* "Content-type: text/html + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, +0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x0d,0x0a, +/* raw file data (565 bytes) */ +0x3c,0x68,0x74,0x6d,0x6c,0x3e,0x0d,0x0a,0x3c,0x68,0x65,0x61,0x64,0x3e,0x3c,0x74, +0x69,0x74,0x6c,0x65,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c,0x69, +0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50, +0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x74,0x69,0x74,0x6c,0x65,0x3e,0x3c,0x2f, +0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x3c,0x62,0x6f,0x64,0x79,0x20,0x62,0x67,0x63, +0x6f,0x6c,0x6f,0x72,0x3d,0x22,0x77,0x68,0x69,0x74,0x65,0x22,0x20,0x74,0x65,0x78, +0x74,0x3d,0x22,0x62,0x6c,0x61,0x63,0x6b,0x22,0x3e,0x0d,0x0a,0x0d,0x0a,0x20,0x20, +0x20,0x20,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22, +0x31,0x30,0x30,0x25,0x22,0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74, +0x72,0x20,0x76,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22,0x3e,0x3c, +0x74,0x64,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x38,0x30,0x22,0x3e,0x09,0x20, +0x20,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68, +0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73, +0x65,0x2f,0x22,0x3e,0x3c,0x69,0x6d,0x67,0x20,0x73,0x72,0x63,0x3d,0x22,0x2f,0x69, +0x6d,0x67,0x2f,0x73,0x69,0x63,0x73,0x2e,0x67,0x69,0x66,0x22,0x0d,0x0a,0x09,0x20, +0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x30,0x22,0x20,0x61,0x6c,0x74,0x3d, +0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x20,0x74,0x69,0x74,0x6c, +0x65,0x3d,0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x3e,0x3c,0x2f, +0x61,0x3e,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x20,0x77,0x69, +0x64,0x74,0x68,0x3d,0x22,0x35,0x30,0x30,0x22,0x3e,0x09,0x20,0x20,0x0d,0x0a,0x09, +0x20,0x20,0x3c,0x68,0x31,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c, +0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49, +0x50,0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x68,0x31,0x3e,0x0d,0x0a,0x09,0x20, +0x20,0x3c,0x68,0x32,0x3e,0x34,0x30,0x34,0x20,0x2d,0x20,0x50,0x61,0x67,0x65,0x20, +0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x3c,0x2f,0x68,0x32,0x3e,0x0d,0x0a, +0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x53,0x6f,0x72, +0x72,0x79,0x2c,0x20,0x74,0x68,0x65,0x20,0x70,0x61,0x67,0x65,0x20,0x79,0x6f,0x75, +0x20,0x61,0x72,0x65,0x20,0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x69,0x6e,0x67,0x20, +0x77,0x61,0x73,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x20,0x6f,0x6e, +0x20,0x74,0x68,0x69,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x73,0x65,0x72,0x76, +0x65,0x72,0x2e,0x20,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09, +0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x2f,0x74,0x72, +0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65, +0x3e,0x0d,0x0a,0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x68,0x74, +0x6d,0x6c,0x3e,0x0d,0x0a,}; + +static const unsigned int dummy_align__index_html = 2; +static const unsigned char data__index_html[] = { +/* /index.html (12 chars) */ +0x2f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x68,0x74,0x6d,0x6c,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) +" (63 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, +0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, +0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, +0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, +/* "Content-type: text/html + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, +0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x0d,0x0a, +/* raw file data (1751 bytes) */ +0x3c,0x68,0x74,0x6d,0x6c,0x3e,0x0d,0x0a,0x3c,0x68,0x65,0x61,0x64,0x3e,0x3c,0x74, +0x69,0x74,0x6c,0x65,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c,0x69, +0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50, +0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x74,0x69,0x74,0x6c,0x65,0x3e,0x3c,0x2f, +0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x3c,0x62,0x6f,0x64,0x79,0x20,0x62,0x67,0x63, +0x6f,0x6c,0x6f,0x72,0x3d,0x22,0x77,0x68,0x69,0x74,0x65,0x22,0x20,0x74,0x65,0x78, +0x74,0x3d,0x22,0x62,0x6c,0x61,0x63,0x6b,0x22,0x3e,0x0d,0x0a,0x0d,0x0a,0x20,0x20, +0x20,0x20,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22, +0x31,0x30,0x30,0x25,0x22,0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74, +0x72,0x20,0x76,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22,0x3e,0x3c, +0x74,0x64,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x38,0x30,0x22,0x3e,0x09,0x20, +0x20,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68, +0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73, +0x65,0x2f,0x22,0x3e,0x3c,0x69,0x6d,0x67,0x20,0x73,0x72,0x63,0x3d,0x22,0x2f,0x69, +0x6d,0x67,0x2f,0x73,0x69,0x63,0x73,0x2e,0x67,0x69,0x66,0x22,0x0d,0x0a,0x09,0x20, +0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x30,0x22,0x20,0x61,0x6c,0x74,0x3d, +0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x20,0x74,0x69,0x74,0x6c, +0x65,0x3d,0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x3e,0x3c,0x2f, +0x61,0x3e,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x20,0x77,0x69, +0x64,0x74,0x68,0x3d,0x22,0x35,0x30,0x30,0x22,0x3e,0x09,0x20,0x20,0x0d,0x0a,0x09, +0x20,0x20,0x3c,0x68,0x31,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c, +0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49, +0x50,0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x68,0x31,0x3e,0x0d,0x0a,0x09,0x20, +0x20,0x3c,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x54,0x68,0x65,0x20,0x77, +0x65,0x62,0x20,0x70,0x61,0x67,0x65,0x20,0x79,0x6f,0x75,0x20,0x61,0x72,0x65,0x20, +0x77,0x61,0x74,0x63,0x68,0x69,0x6e,0x67,0x20,0x77,0x61,0x73,0x20,0x73,0x65,0x72, +0x76,0x65,0x64,0x20,0x62,0x79,0x20,0x61,0x20,0x73,0x69,0x6d,0x70,0x6c,0x65,0x20, +0x77,0x65,0x62,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x73,0x65,0x72,0x76,0x65,0x72, +0x20,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x20,0x6f,0x6e,0x20,0x74,0x6f,0x70,0x20, +0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x6c,0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67, +0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50,0x20,0x73,0x74,0x61,0x63,0x6b,0x20, +0x3c,0x61,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68, +0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73, +0x65,0x2f,0x7e,0x61,0x64,0x61,0x6d,0x2f,0x6c,0x77,0x69,0x70,0x2f,0x22,0x3e,0x6c, +0x77,0x49,0x50,0x3c,0x2f,0x61,0x3e,0x2e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x2f,0x70, +0x3e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20, +0x6c,0x77,0x49,0x50,0x20,0x69,0x73,0x20,0x61,0x6e,0x20,0x6f,0x70,0x65,0x6e,0x20, +0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74, +0x61,0x74,0x69,0x6f,0x6e,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x54,0x43,0x50, +0x2f,0x49,0x50,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x70,0x72,0x6f,0x74,0x6f,0x63, +0x6f,0x6c,0x20,0x73,0x75,0x69,0x74,0x65,0x20,0x74,0x68,0x61,0x74,0x20,0x77,0x61, +0x73,0x20,0x6f,0x72,0x69,0x67,0x69,0x6e,0x61,0x6c,0x6c,0x79,0x20,0x77,0x72,0x69, +0x74,0x74,0x65,0x6e,0x20,0x62,0x79,0x20,0x3c,0x61,0x0d,0x0a,0x09,0x20,0x20,0x20, +0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77, +0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73,0x65,0x2f,0x7e,0x61,0x64,0x61,0x6d,0x2f, +0x6c,0x77,0x69,0x70,0x2f,0x22,0x3e,0x41,0x64,0x61,0x6d,0x20,0x44,0x75,0x6e,0x6b, +0x65,0x6c,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x6f,0x66,0x20,0x74,0x68,0x65, +0x20,0x53,0x77,0x65,0x64,0x69,0x73,0x68,0x20,0x49,0x6e,0x73,0x74,0x69,0x74,0x75, +0x74,0x65,0x20,0x6f,0x66,0x20,0x43,0x6f,0x6d,0x70,0x75,0x74,0x65,0x72,0x20,0x53, +0x63,0x69,0x65,0x6e,0x63,0x65,0x3c,0x2f,0x61,0x3e,0x20,0x62,0x75,0x74,0x20,0x6e, +0x6f,0x77,0x20,0x69,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x62,0x65,0x69,0x6e, +0x67,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x6c,0x79,0x20,0x64,0x65,0x76,0x65,0x6c, +0x6f,0x70,0x65,0x64,0x20,0x62,0x79,0x20,0x61,0x20,0x74,0x65,0x61,0x6d,0x20,0x6f, +0x66,0x20,0x64,0x65,0x76,0x65,0x6c,0x6f,0x70,0x65,0x72,0x73,0x0d,0x0a,0x09,0x20, +0x20,0x20,0x20,0x64,0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x64,0x20,0x77, +0x6f,0x72,0x6c,0x64,0x2d,0x77,0x69,0x64,0x65,0x2e,0x20,0x53,0x69,0x6e,0x63,0x65, +0x20,0x69,0x74,0x27,0x73,0x20,0x72,0x65,0x6c,0x65,0x61,0x73,0x65,0x2c,0x20,0x6c, +0x77,0x49,0x50,0x20,0x68,0x61,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x73,0x70, +0x75,0x72,0x72,0x65,0x64,0x20,0x61,0x20,0x6c,0x6f,0x74,0x20,0x6f,0x66,0x20,0x69, +0x6e,0x74,0x65,0x72,0x65,0x73,0x74,0x20,0x61,0x6e,0x64,0x20,0x68,0x61,0x73,0x20, +0x62,0x65,0x65,0x6e,0x20,0x70,0x6f,0x72,0x74,0x65,0x64,0x20,0x74,0x6f,0x20,0x73, +0x65,0x76,0x65,0x72,0x61,0x6c,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x70,0x6c,0x61, +0x74,0x66,0x6f,0x72,0x6d,0x73,0x20,0x61,0x6e,0x64,0x20,0x6f,0x70,0x65,0x72,0x61, +0x74,0x69,0x6e,0x67,0x20,0x73,0x79,0x73,0x74,0x65,0x6d,0x73,0x2e,0x20,0x6c,0x77, +0x49,0x50,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x75,0x73,0x65,0x64,0x20,0x65, +0x69,0x74,0x68,0x65,0x72,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x77,0x69,0x74,0x68, +0x20,0x6f,0x72,0x20,0x77,0x69,0x74,0x68,0x6f,0x75,0x74,0x20,0x61,0x6e,0x20,0x75, +0x6e,0x64,0x65,0x72,0x6c,0x79,0x69,0x6e,0x67,0x20,0x4f,0x53,0x2e,0x0d,0x0a,0x09, +0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d,0x0a, +0x09,0x20,0x20,0x20,0x20,0x54,0x68,0x65,0x20,0x66,0x6f,0x63,0x75,0x73,0x20,0x6f, +0x66,0x20,0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x20,0x54,0x43,0x50,0x2f,0x49, +0x50,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e, +0x20,0x69,0x73,0x20,0x74,0x6f,0x20,0x72,0x65,0x64,0x75,0x63,0x65,0x0d,0x0a,0x09, +0x20,0x20,0x20,0x20,0x74,0x68,0x65,0x20,0x52,0x41,0x4d,0x20,0x75,0x73,0x61,0x67, +0x65,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,0x73,0x74,0x69,0x6c,0x6c,0x20,0x68,0x61, +0x76,0x69,0x6e,0x67,0x20,0x61,0x20,0x66,0x75,0x6c,0x6c,0x20,0x73,0x63,0x61,0x6c, +0x65,0x20,0x54,0x43,0x50,0x2e,0x20,0x54,0x68,0x69,0x73,0x0d,0x0a,0x09,0x20,0x20, +0x20,0x20,0x6d,0x61,0x6b,0x65,0x73,0x20,0x6c,0x77,0x49,0x50,0x20,0x73,0x75,0x69, +0x74,0x61,0x62,0x6c,0x65,0x20,0x66,0x6f,0x72,0x20,0x75,0x73,0x65,0x20,0x69,0x6e, +0x20,0x65,0x6d,0x62,0x65,0x64,0x64,0x65,0x64,0x20,0x73,0x79,0x73,0x74,0x65,0x6d, +0x73,0x20,0x77,0x69,0x74,0x68,0x20,0x74,0x65,0x6e,0x73,0x0d,0x0a,0x09,0x20,0x20, +0x20,0x20,0x6f,0x66,0x20,0x6b,0x69,0x6c,0x6f,0x62,0x79,0x74,0x65,0x73,0x20,0x6f, +0x66,0x20,0x66,0x72,0x65,0x65,0x20,0x52,0x41,0x4d,0x20,0x61,0x6e,0x64,0x20,0x72, +0x6f,0x6f,0x6d,0x20,0x66,0x6f,0x72,0x20,0x61,0x72,0x6f,0x75,0x6e,0x64,0x20,0x34, +0x30,0x20,0x6b,0x69,0x6c,0x6f,0x62,0x79,0x74,0x65,0x73,0x0d,0x0a,0x09,0x20,0x20, +0x20,0x20,0x6f,0x66,0x20,0x63,0x6f,0x64,0x65,0x20,0x52,0x4f,0x4d,0x2e,0x0d,0x0a, +0x09,0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d, +0x0a,0x09,0x20,0x20,0x20,0x20,0x4d,0x6f,0x72,0x65,0x20,0x69,0x6e,0x66,0x6f,0x72, +0x6d,0x61,0x74,0x69,0x6f,0x6e,0x20,0x61,0x62,0x6f,0x75,0x74,0x20,0x6c,0x77,0x49, +0x50,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x66,0x6f,0x75,0x6e,0x64,0x20,0x61, +0x74,0x20,0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x0d,0x0a,0x09,0x20,0x20,0x20, +0x20,0x68,0x6f,0x6d,0x65,0x70,0x61,0x67,0x65,0x20,0x61,0x74,0x20,0x3c,0x61,0x0d, +0x0a,0x09,0x20,0x20,0x20,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68,0x74,0x74,0x70, +0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67, +0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f, +0x6c,0x77,0x69,0x70,0x2f,0x22,0x3e,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61, +0x76,0x61,0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72, +0x67,0x2f,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x2f, +0x3c,0x2f,0x61,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x6f,0x72,0x20,0x61,0x74, +0x20,0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x20,0x77,0x69,0x6b,0x69,0x20,0x61, +0x74,0x20,0x3c,0x61,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x68,0x72,0x65,0x66,0x3d, +0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6c,0x77,0x69,0x70,0x2e,0x77,0x69,0x6b, +0x69,0x61,0x2e,0x63,0x6f,0x6d,0x2f,0x22,0x3e,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f, +0x6c,0x77,0x69,0x70,0x2e,0x77,0x69,0x6b,0x69,0x61,0x2e,0x63,0x6f,0x6d,0x2f,0x3c, +0x2f,0x61,0x3e,0x2e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09, +0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x2f,0x74,0x72, +0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65, +0x3e,0x0d,0x0a,0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x68,0x74, +0x6d,0x6c,0x3e,0x0d,0x0a,0x0d,0x0a,}; + + + +const struct fsdata_file file__img_sics_gif[] = { { +file_NULL, +data__img_sics_gif, +data__img_sics_gif + 16, +sizeof(data__img_sics_gif) - 16, +1, +}}; + +const struct fsdata_file file__404_html[] = { { +file__img_sics_gif, +data__404_html, +data__404_html + 12, +sizeof(data__404_html) - 12, +1, +}}; + +const struct fsdata_file file__index_html[] = { { +file__404_html, +data__index_html, +data__index_html + 12, +sizeof(data__index_html) - 12, +1, +}}; + +#define FS_ROOT file__index_html +#define FS_NUMFILES 3 + diff --git a/User/lwip_http/fsdata.h b/User/lwip_http/fsdata.h new file mode 100644 index 0000000..ad4bbf9 --- /dev/null +++ b/User/lwip_http/fsdata.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_FSDATA_H +#define LWIP_FSDATA_H + +#include "lwip/apps/httpd_opts.h" +#include "lwip/apps/fs.h" + +//struct fsdata_file { +// const struct fsdata_file *next; +// const unsigned char *name; +// const unsigned char *data; +// int len; +// u8_t flags; +//#if HTTPD_PRECALCULATED_CHECKSUM +// u16_t chksum_count; +// const struct fsdata_chksum *chksum; +//#endif /* HTTPD_PRECALCULATED_CHECKSUM */ +//}; + +#endif /* LWIP_FSDATA_H */ diff --git a/User/lwip_http/fsdata_custom.c b/User/lwip_http/fsdata_custom.c index 106c348..d4041f3 100755 --- a/User/lwip_http/fsdata_custom.c +++ b/User/lwip_http/fsdata_custom.c @@ -6,53 +6,27 @@ ****************************************************************************** * @attention * - *

                  © Copyright (c) 2017 STMicroelectronics International N.V. + *

                  © Copyright (c) 2017 STMicroelectronics. * All rights reserved.

                  * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted, provided that the following conditions are met: - * - * 1. Redistribution of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of STMicroelectronics nor the names of other - * contributors to this software may be used to endorse or promote products - * derived from this software without specific written permission. - * 4. This software, including modifications and/or derivative works of this - * software, must execute solely and exclusively on microcontroller or - * microprocessor devices manufactured by or for STMicroelectronics. - * 5. Redistribution and use of this software other than as permitted under - * this license is void and will automatically terminate your rights under - * this license. - * - * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY - * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT - * SHALL STMICROELECTRONICS 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. + * This software component is licensed by ST under Ultimate Liberty license + * SLA0044, the "License"; You may not use this file except in compliance with + * the License. You may obtain a copy of the License at: + * www.st.com/SLA0044 * ****************************************************************************** */ #include "lwip/apps/fs.h" #include "lwip/def.h" -#include "httpd/fsdata.h" +//#include "httpd/fsdata.h" #define file_NULL (struct fsdata_file *) NULL -static const unsigned int dummy_align__STM32H7xx_files_logo_jpg = 0; -static const unsigned char data__STM32H7xx_files_logo_jpg[] = { +const unsigned int dummy_align__STM32H7xx_files_logo_jpg = 0; +const unsigned char data__STM32H7xx_files_logo_jpg[] = { /* /STM32H7xx_files/logo.jpg (26 chars) */ 0x2f,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x5f,0x66,0x69,0x6c,0x65,0x73, 0x2f,0x6c,0x6f,0x67,0x6f,0x2e,0x6a,0x70,0x67,0x00,0x00,0x00, @@ -235,8 +209,8 @@ static const unsigned char data__STM32H7xx_files_logo_jpg[] = { 0x22,0x04,0x31,0x25,0x72,0x04,0x48,0xe2,0x42,0xf0,0x54,0xef,0x56,0x37,0x2b,0x1d, 0x99,0x3d,0xa7,0x18,0xa2,0x8a,0x2e,0x85,0xff,0xd9,}; -static const unsigned int dummy_align__STM32H7xx_files_ST_gif = 1; -static const unsigned char data__STM32H7xx_files_ST_gif[] = { +const unsigned int dummy_align__STM32H7xx_files_ST_gif = 1; +const unsigned char data__STM32H7xx_files_ST_gif[] = { /* /STM32H7xx_files/ST.gif (24 chars) */ 0x2f,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x5f,0x66,0x69,0x6c,0x65,0x73, 0x2f,0x53,0x54,0x2e,0x67,0x69,0x66,0x00, @@ -563,8 +537,8 @@ static const unsigned char data__STM32H7xx_files_ST_gif[] = { 0xca,0x80,0x03,0x45,0x5c,0xa2,0x5a,0xfc,0x14,0x3c,0x2a,0xa0,0xea,0xa9,0xa3,0x7f, 0x12,0x10,0x00,0x3b,}; -static const unsigned int dummy_align__STM32H7xx_files_stm32_jpg = 2; -static const unsigned char data__STM32H7xx_files_stm32_jpg[] = { +const unsigned int dummy_align__STM32H7xx_files_stm32_jpg = 2; +const unsigned char data__STM32H7xx_files_stm32_jpg[] = { /* /STM32H7xx_files/stm32.jpg (27 chars) */ 0x2f,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x5f,0x66,0x69,0x6c,0x65,0x73, 0x2f,0x73,0x74,0x6d,0x33,0x32,0x2e,0x6a,0x70,0x67,0x00,0x00, @@ -3126,8 +3100,8 @@ static const unsigned char data__STM32H7xx_files_stm32_jpg[] = { 0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14, 0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x01,0xff,0xd9,}; -static const unsigned int dummy_align__404_html = 3; -static const unsigned char data__404_html[] = { +const unsigned int dummy_align__404_html = 3; +const unsigned char data__404_html[] = { /* /404.html (10 chars) */ 0x2f,0x34,0x30,0x34,0x2e,0x68,0x74,0x6d,0x6c,0x00,0x00,0x00, @@ -3224,8 +3198,8 @@ static const unsigned char data__404_html[] = { 0x0d,0x0a,0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x3c,0x2f,0x68,0x74,0x6d,0x6c,0x3e, }; -static const unsigned int dummy_align__index_html = 4; -static const unsigned char data__index_html[] = { +const unsigned int dummy_align__index_html = 4; +const unsigned char data__index_html[] = { /* /index.html (12 chars) */ 0x2f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x68,0x74,0x6d,0x6c,0x00, @@ -3968,8 +3942,8 @@ static const unsigned char data__index_html[] = { 0x76,0x3e,0x0d,0x0a,0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0d,0x0a,0x3c,0x2f,0x62,0x6f, 0x64,0x79,0x3e,0x3c,0x2f,0x68,0x74,0x6d,0x6c,0x3e,}; -static const unsigned int dummy_align__STM32H7xxADC_shtml = 5; -static const unsigned char data__STM32H7xxADC_shtml[] = { +const unsigned int dummy_align__STM32H7xxADC_shtml = 5; +const unsigned char data__STM32H7xxADC_shtml[] = { /* /STM32H7xxADC.shtml (20 chars) */ 0x2f,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x41,0x44,0x43,0x2e,0x73,0x68, 0x74,0x6d,0x6c,0x00, @@ -4262,8 +4236,8 @@ Pragma: no-cache 0x3e,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x2f,0x66,0x6f,0x6e,0x74,0x3e,0x0d,0x0a, 0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x3c,0x2f,0x68,0x74,0x6d,0x6c,0x3e,}; -static const unsigned int dummy_align__STM32H7xxLED_html = 6; -static const unsigned char data__STM32H7xxLED_html[] = { +const unsigned int dummy_align__STM32H7xxLED_html = 6; +const unsigned char data__STM32H7xxLED_html[] = { /* /STM32H7xxLED.html (19 chars) */ 0x2f,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x4c,0x45,0x44,0x2e,0x68,0x74, 0x6d,0x6c,0x00,0x00, @@ -4621,6 +4595,5 @@ sizeof(data__STM32H7xxLED_html) - 20, 1, }}; -#define FS_ROOT file__STM32H7xxLED_html -#define FS_NUMFILES 7 + diff --git a/User/lwip_http/fsdata_new.c b/User/lwip_http/fsdata_new.c new file mode 100644 index 0000000..ab9da7e --- /dev/null +++ b/User/lwip_http/fsdata_new.c @@ -0,0 +1,337 @@ +#include "lwip/apps/fs.h" +#include "lwip/def.h" + + +#define file_NULL (struct fsdata_file *) NULL + + +#ifndef FS_FILE_FLAGS_HEADER_INCLUDED +#define FS_FILE_FLAGS_HEADER_INCLUDED 1 +#endif +#ifndef FS_FILE_FLAGS_HEADER_PERSISTENT +#define FS_FILE_FLAGS_HEADER_PERSISTENT 0 +#endif +/* FSDATA_FILE_ALIGNMENT: 0=off, 1=by variable, 2=by include */ +#ifndef FSDATA_FILE_ALIGNMENT +#define FSDATA_FILE_ALIGNMENT 0 +#endif +#ifndef FSDATA_ALIGN_PRE +#define FSDATA_ALIGN_PRE +#endif +#ifndef FSDATA_ALIGN_POST +#define FSDATA_ALIGN_POST +#endif +#if FSDATA_FILE_ALIGNMENT==2 +#include "fsdata_alignment.h" +#endif +#if FSDATA_FILE_ALIGNMENT==1 +static const unsigned int dummy_align__img_sics_gif = 0; +#endif +static const unsigned char FSDATA_ALIGN_PRE data__img_sics_gif[] FSDATA_ALIGN_POST = { +/* /img/sics.gif (14 chars) */ +0x2f,0x69,0x6d,0x67,0x2f,0x73,0x69,0x63,0x73,0x2e,0x67,0x69,0x66,0x00,0x00,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/2.0.3d (http://savannah.nongnu.org/projects/lwip) +" (64 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x32,0x2e,0x30, +0x2e,0x33,0x64,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61, +0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f, +0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, + +/* "Content-Length: 724 +" (18+ bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x4c,0x65,0x6e,0x67,0x74,0x68,0x3a,0x20, +0x37,0x32,0x34,0x0d,0x0a, +/* "Content-Type: image/gif + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x54,0x79,0x70,0x65,0x3a,0x20,0x69,0x6d, +0x61,0x67,0x65,0x2f,0x67,0x69,0x66,0x0d,0x0a,0x0d,0x0a, +/* raw file data (724 bytes) */ +0x47,0x49,0x46,0x38,0x39,0x61,0x46,0x00,0x22,0x00,0xa5,0x00,0x00,0xd9,0x2b,0x39, +0x6a,0x6a,0x6a,0xbf,0xbf,0xbf,0x93,0x93,0x93,0x0f,0x0f,0x0f,0xb0,0xb0,0xb0,0xa6, +0xa6,0xa6,0x80,0x80,0x80,0x76,0x76,0x76,0x1e,0x1e,0x1e,0x9d,0x9d,0x9d,0x2e,0x2e, +0x2e,0x49,0x49,0x49,0x54,0x54,0x54,0x8a,0x8a,0x8a,0x60,0x60,0x60,0xc6,0xa6,0x99, +0xbd,0xb5,0xb2,0xc2,0xab,0xa1,0xd9,0x41,0x40,0xd5,0x67,0x55,0xc0,0xb0,0xaa,0xd5, +0x5e,0x4e,0xd6,0x50,0x45,0xcc,0x93,0x7d,0xc8,0xa1,0x90,0xce,0x8b,0x76,0xd2,0x7b, +0x65,0xd1,0x84,0x6d,0xc9,0x99,0x86,0x3a,0x3a,0x3a,0x00,0x00,0x00,0xb8,0xb8,0xb8, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2c,0x00,0x00, +0x00,0x00,0x46,0x00,0x22,0x00,0x00,0x06,0xfe,0x40,0x90,0x70,0x48,0x2c,0x1a,0x8f, +0xc8,0xa4,0x72,0xc9,0x6c,0x3a,0x9f,0xd0,0xa8,0x74,0x4a,0xad,0x5a,0xaf,0xd8,0xac, +0x76,0xa9,0x40,0x04,0xbe,0x83,0xe2,0x60,0x3c,0x50,0x20,0x0d,0x8e,0x6f,0x00,0x31, +0x28,0x1c,0x0d,0x07,0xb5,0xc3,0x60,0x75,0x24,0x3e,0xf8,0xfc,0x87,0x11,0x06,0xe9, +0x3d,0x46,0x07,0x0b,0x7a,0x7a,0x7c,0x43,0x06,0x1e,0x84,0x78,0x0b,0x07,0x6e,0x51, +0x01,0x8a,0x84,0x08,0x7e,0x79,0x80,0x87,0x89,0x91,0x7a,0x93,0x0a,0x04,0x99,0x78, +0x96,0x4f,0x03,0x9e,0x79,0x01,0x94,0x9f,0x43,0x9c,0xa3,0xa4,0x05,0x77,0xa3,0xa0, +0x4e,0x98,0x79,0x0b,0x1e,0x83,0xa4,0xa6,0x1f,0x96,0x05,0x9d,0xaa,0x78,0x01,0x07, +0x84,0x04,0x1e,0x1e,0xbb,0xb8,0x51,0x84,0x0e,0x43,0x05,0x07,0x77,0xa5,0x7f,0x42, +0xb1,0xb2,0x01,0x63,0x08,0x0d,0xbb,0x01,0x0c,0x7a,0x0d,0x44,0x0e,0xd8,0xaf,0x4c, +0x05,0x7a,0x04,0x47,0x07,0x07,0xb7,0x80,0xa2,0xe1,0x7d,0x44,0x05,0x01,0x04,0x01, +0xd0,0xea,0x87,0x93,0x4f,0xe0,0x9a,0x49,0xce,0xd8,0x79,0x04,0x66,0x20,0x15,0x10, +0x10,0x11,0x92,0x29,0x80,0xb6,0xc0,0x91,0x15,0x45,0x1e,0x90,0x19,0x71,0x46,0xa8, +0x5c,0x04,0x0e,0x00,0x22,0x4e,0xe8,0x40,0x24,0x9f,0x3e,0x04,0x06,0xa7,0x58,0xd4, +0x93,0xa0,0x1c,0x91,0x3f,0xe8,0xf0,0x88,0x03,0xb1,0x21,0xa2,0x49,0x00,0x19,0x86, +0xfc,0x52,0x44,0xe0,0x01,0x9d,0x29,0x21,0x15,0x25,0x50,0xf7,0x67,0x25,0x1e,0x06, +0xfd,0x4e,0x9a,0xb4,0x90,0xac,0x15,0xfa,0xcb,0x52,0x53,0x1e,0x8c,0xf2,0xf8,0x07, +0x92,0x2d,0x08,0x3a,0x4d,0x12,0x49,0x95,0x49,0xdb,0x14,0x04,0xc4,0x14,0x85,0x29, +0xaa,0xe7,0x01,0x08,0xa4,0x49,0x01,0x14,0x51,0xe0,0x53,0x91,0xd5,0x29,0x06,0x1a, +0x64,0x02,0xf4,0xc7,0x81,0x9e,0x05,0x20,0x22,0x64,0xa5,0x30,0xae,0xab,0x9e,0x97, +0x53,0xd8,0xb9,0xfd,0x50,0xef,0x93,0x02,0x42,0x74,0x34,0xe8,0x9c,0x20,0x21,0xc9, +0x01,0x68,0x78,0xe6,0x55,0x29,0x20,0x56,0x4f,0x4c,0x40,0x51,0x71,0x82,0xc0,0x70, +0x21,0x22,0x85,0xbe,0x4b,0x1c,0x44,0x05,0xea,0xa4,0x01,0xbf,0x22,0xb5,0xf0,0x1c, +0x06,0x51,0x38,0x8f,0xe0,0x22,0xec,0x18,0xac,0x39,0x22,0xd4,0xd6,0x93,0x44,0x01, +0x32,0x82,0xc8,0xfc,0x61,0xb3,0x01,0x45,0x0c,0x2e,0x83,0x30,0xd0,0x0e,0x17,0x24, +0x0f,0x70,0x85,0x94,0xee,0x05,0x05,0x53,0x4b,0x32,0x1b,0x3f,0x98,0xd3,0x1d,0x29, +0x81,0xb0,0xae,0x1e,0x8c,0x7e,0x68,0xe0,0x60,0x5a,0x54,0x8f,0xb0,0x78,0x69,0x73, +0x06,0xa2,0x00,0x6b,0x57,0xca,0x3d,0x11,0x50,0xbd,0x04,0x30,0x4b,0x3a,0xd4,0xab, +0x5f,0x1f,0x9b,0x3d,0x13,0x74,0x27,0x88,0x3c,0x25,0xe0,0x17,0xbe,0x7a,0x79,0x45, +0x0d,0x0c,0xb0,0x8b,0xda,0x90,0xca,0x80,0x06,0x5d,0x17,0x60,0x1c,0x22,0x4c,0xd8, +0x57,0x22,0x06,0x20,0x00,0x98,0x07,0x08,0xe4,0x56,0x80,0x80,0x1c,0xc5,0xb7,0xc5, +0x82,0x0c,0x36,0xe8,0xe0,0x83,0x10,0x46,0x28,0xe1,0x84,0x14,0x56,0x68,0xa1,0x10, +0x41,0x00,0x00,0x3b,}; + +#if FSDATA_FILE_ALIGNMENT==1 +static const unsigned int dummy_align__404_html = 1; +#endif +static const unsigned char FSDATA_ALIGN_PRE data__404_html[] FSDATA_ALIGN_POST = { +/* /404.html (10 chars) */ +0x2f,0x34,0x30,0x34,0x2e,0x68,0x74,0x6d,0x6c,0x00,0x00,0x00, + +/* HTTP header */ +/* "HTTP/1.0 404 File not found +" (29 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x34,0x30,0x34,0x20,0x46,0x69,0x6c, +0x65,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x0d,0x0a, +/* "Server: lwIP/2.0.3d (http://savannah.nongnu.org/projects/lwip) +" (64 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x32,0x2e,0x30, +0x2e,0x33,0x64,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61, +0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f, +0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, + +/* "Content-Length: 565 +" (18+ bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x4c,0x65,0x6e,0x67,0x74,0x68,0x3a,0x20, +0x35,0x36,0x35,0x0d,0x0a, +/* "Content-Type: text/html + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x54,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, +0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x0d,0x0a, +/* raw file data (565 bytes) */ +0x3c,0x68,0x74,0x6d,0x6c,0x3e,0x0d,0x0a,0x3c,0x68,0x65,0x61,0x64,0x3e,0x3c,0x74, +0x69,0x74,0x6c,0x65,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c,0x69, +0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50, +0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x74,0x69,0x74,0x6c,0x65,0x3e,0x3c,0x2f, +0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x3c,0x62,0x6f,0x64,0x79,0x20,0x62,0x67,0x63, +0x6f,0x6c,0x6f,0x72,0x3d,0x22,0x77,0x68,0x69,0x74,0x65,0x22,0x20,0x74,0x65,0x78, +0x74,0x3d,0x22,0x62,0x6c,0x61,0x63,0x6b,0x22,0x3e,0x0d,0x0a,0x0d,0x0a,0x20,0x20, +0x20,0x20,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22, +0x31,0x30,0x30,0x25,0x22,0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74, +0x72,0x20,0x76,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22,0x3e,0x3c, +0x74,0x64,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x38,0x30,0x22,0x3e,0x09,0x20, +0x20,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68, +0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73, +0x65,0x2f,0x22,0x3e,0x3c,0x69,0x6d,0x67,0x20,0x73,0x72,0x63,0x3d,0x22,0x2f,0x69, +0x6d,0x67,0x2f,0x73,0x69,0x63,0x73,0x2e,0x67,0x69,0x66,0x22,0x0d,0x0a,0x09,0x20, +0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x30,0x22,0x20,0x61,0x6c,0x74,0x3d, +0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x20,0x74,0x69,0x74,0x6c, +0x65,0x3d,0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x3e,0x3c,0x2f, +0x61,0x3e,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x20,0x77,0x69, +0x64,0x74,0x68,0x3d,0x22,0x35,0x30,0x30,0x22,0x3e,0x09,0x20,0x20,0x0d,0x0a,0x09, +0x20,0x20,0x3c,0x68,0x31,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c, +0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49, +0x50,0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x68,0x31,0x3e,0x0d,0x0a,0x09,0x20, +0x20,0x3c,0x68,0x32,0x3e,0x34,0x30,0x34,0x20,0x2d,0x20,0x50,0x61,0x67,0x65,0x20, +0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x3c,0x2f,0x68,0x32,0x3e,0x0d,0x0a, +0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x53,0x6f,0x72, +0x72,0x79,0x2c,0x20,0x74,0x68,0x65,0x20,0x70,0x61,0x67,0x65,0x20,0x79,0x6f,0x75, +0x20,0x61,0x72,0x65,0x20,0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x69,0x6e,0x67,0x20, +0x77,0x61,0x73,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x20,0x6f,0x6e, +0x20,0x74,0x68,0x69,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x73,0x65,0x72,0x76, +0x65,0x72,0x2e,0x20,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09, +0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x2f,0x74,0x72, +0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65, +0x3e,0x0d,0x0a,0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x68,0x74, +0x6d,0x6c,0x3e,0x0d,0x0a,}; + +#if FSDATA_FILE_ALIGNMENT==1 +static const unsigned int dummy_align__index_html = 2; +#endif +static const unsigned char FSDATA_ALIGN_PRE data__index_html[] FSDATA_ALIGN_POST = { +/* /index.html (12 chars) */ +0x2f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x68,0x74,0x6d,0x6c,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/2.0.3d (http://savannah.nongnu.org/projects/lwip) +" (64 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x32,0x2e,0x30, +0x2e,0x33,0x64,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61, +0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f, +0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, + +/* "Content-Length: 1751 +" (18+ bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x4c,0x65,0x6e,0x67,0x74,0x68,0x3a,0x20, +0x31,0x37,0x35,0x31,0x0d,0x0a, +/* "Content-Type: text/html + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x54,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, +0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x0d,0x0a, +/* raw file data (1751 bytes) */ +0x3c,0x68,0x74,0x6d,0x6c,0x3e,0x0d,0x0a,0x3c,0x68,0x65,0x61,0x64,0x3e,0x3c,0x74, +0x69,0x74,0x6c,0x65,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c,0x69, +0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50, +0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x74,0x69,0x74,0x6c,0x65,0x3e,0x3c,0x2f, +0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x3c,0x62,0x6f,0x64,0x79,0x20,0x62,0x67,0x63, +0x6f,0x6c,0x6f,0x72,0x3d,0x22,0x77,0x68,0x69,0x74,0x65,0x22,0x20,0x74,0x65,0x78, +0x74,0x3d,0x22,0x62,0x6c,0x61,0x63,0x6b,0x22,0x3e,0x0d,0x0a,0x0d,0x0a,0x20,0x20, +0x20,0x20,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22, +0x31,0x30,0x30,0x25,0x22,0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74, +0x72,0x20,0x76,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22,0x3e,0x3c, +0x74,0x64,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x38,0x30,0x22,0x3e,0x09,0x20, +0x20,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68, +0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73, +0x65,0x2f,0x22,0x3e,0x3c,0x69,0x6d,0x67,0x20,0x73,0x72,0x63,0x3d,0x22,0x2f,0x69, +0x6d,0x67,0x2f,0x73,0x69,0x63,0x73,0x2e,0x67,0x69,0x66,0x22,0x0d,0x0a,0x09,0x20, +0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x30,0x22,0x20,0x61,0x6c,0x74,0x3d, +0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x20,0x74,0x69,0x74,0x6c, +0x65,0x3d,0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x3e,0x3c,0x2f, +0x61,0x3e,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x20,0x77,0x69, +0x64,0x74,0x68,0x3d,0x22,0x35,0x30,0x30,0x22,0x3e,0x09,0x20,0x20,0x0d,0x0a,0x09, +0x20,0x20,0x3c,0x68,0x31,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c, +0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49, +0x50,0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x68,0x31,0x3e,0x0d,0x0a,0x09,0x20, +0x20,0x3c,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x54,0x68,0x65,0x20,0x77, +0x65,0x62,0x20,0x70,0x61,0x67,0x65,0x20,0x79,0x6f,0x75,0x20,0x61,0x72,0x65,0x20, +0x77,0x61,0x74,0x63,0x68,0x69,0x6e,0x67,0x20,0x77,0x61,0x73,0x20,0x73,0x65,0x72, +0x76,0x65,0x64,0x20,0x62,0x79,0x20,0x61,0x20,0x73,0x69,0x6d,0x70,0x6c,0x65,0x20, +0x77,0x65,0x62,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x73,0x65,0x72,0x76,0x65,0x72, +0x20,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x20,0x6f,0x6e,0x20,0x74,0x6f,0x70,0x20, +0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x6c,0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67, +0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50,0x20,0x73,0x74,0x61,0x63,0x6b,0x20, +0x3c,0x61,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68, +0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73, +0x65,0x2f,0x7e,0x61,0x64,0x61,0x6d,0x2f,0x6c,0x77,0x69,0x70,0x2f,0x22,0x3e,0x6c, +0x77,0x49,0x50,0x3c,0x2f,0x61,0x3e,0x2e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x2f,0x70, +0x3e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20, +0x6c,0x77,0x49,0x50,0x20,0x69,0x73,0x20,0x61,0x6e,0x20,0x6f,0x70,0x65,0x6e,0x20, +0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74, +0x61,0x74,0x69,0x6f,0x6e,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x54,0x43,0x50, +0x2f,0x49,0x50,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x70,0x72,0x6f,0x74,0x6f,0x63, +0x6f,0x6c,0x20,0x73,0x75,0x69,0x74,0x65,0x20,0x74,0x68,0x61,0x74,0x20,0x77,0x61, +0x73,0x20,0x6f,0x72,0x69,0x67,0x69,0x6e,0x61,0x6c,0x6c,0x79,0x20,0x77,0x72,0x69, +0x74,0x74,0x65,0x6e,0x20,0x62,0x79,0x20,0x3c,0x61,0x0d,0x0a,0x09,0x20,0x20,0x20, +0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77, +0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73,0x65,0x2f,0x7e,0x61,0x64,0x61,0x6d,0x2f, +0x6c,0x77,0x69,0x70,0x2f,0x22,0x3e,0x41,0x64,0x61,0x6d,0x20,0x44,0x75,0x6e,0x6b, +0x65,0x6c,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x6f,0x66,0x20,0x74,0x68,0x65, +0x20,0x53,0x77,0x65,0x64,0x69,0x73,0x68,0x20,0x49,0x6e,0x73,0x74,0x69,0x74,0x75, +0x74,0x65,0x20,0x6f,0x66,0x20,0x43,0x6f,0x6d,0x70,0x75,0x74,0x65,0x72,0x20,0x53, +0x63,0x69,0x65,0x6e,0x63,0x65,0x3c,0x2f,0x61,0x3e,0x20,0x62,0x75,0x74,0x20,0x6e, +0x6f,0x77,0x20,0x69,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x62,0x65,0x69,0x6e, +0x67,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x6c,0x79,0x20,0x64,0x65,0x76,0x65,0x6c, +0x6f,0x70,0x65,0x64,0x20,0x62,0x79,0x20,0x61,0x20,0x74,0x65,0x61,0x6d,0x20,0x6f, +0x66,0x20,0x64,0x65,0x76,0x65,0x6c,0x6f,0x70,0x65,0x72,0x73,0x0d,0x0a,0x09,0x20, +0x20,0x20,0x20,0x64,0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x64,0x20,0x77, +0x6f,0x72,0x6c,0x64,0x2d,0x77,0x69,0x64,0x65,0x2e,0x20,0x53,0x69,0x6e,0x63,0x65, +0x20,0x69,0x74,0x27,0x73,0x20,0x72,0x65,0x6c,0x65,0x61,0x73,0x65,0x2c,0x20,0x6c, +0x77,0x49,0x50,0x20,0x68,0x61,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x73,0x70, +0x75,0x72,0x72,0x65,0x64,0x20,0x61,0x20,0x6c,0x6f,0x74,0x20,0x6f,0x66,0x20,0x69, +0x6e,0x74,0x65,0x72,0x65,0x73,0x74,0x20,0x61,0x6e,0x64,0x20,0x68,0x61,0x73,0x20, +0x62,0x65,0x65,0x6e,0x20,0x70,0x6f,0x72,0x74,0x65,0x64,0x20,0x74,0x6f,0x20,0x73, +0x65,0x76,0x65,0x72,0x61,0x6c,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x70,0x6c,0x61, +0x74,0x66,0x6f,0x72,0x6d,0x73,0x20,0x61,0x6e,0x64,0x20,0x6f,0x70,0x65,0x72,0x61, +0x74,0x69,0x6e,0x67,0x20,0x73,0x79,0x73,0x74,0x65,0x6d,0x73,0x2e,0x20,0x6c,0x77, +0x49,0x50,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x75,0x73,0x65,0x64,0x20,0x65, +0x69,0x74,0x68,0x65,0x72,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x77,0x69,0x74,0x68, +0x20,0x6f,0x72,0x20,0x77,0x69,0x74,0x68,0x6f,0x75,0x74,0x20,0x61,0x6e,0x20,0x75, +0x6e,0x64,0x65,0x72,0x6c,0x79,0x69,0x6e,0x67,0x20,0x4f,0x53,0x2e,0x0d,0x0a,0x09, +0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d,0x0a, +0x09,0x20,0x20,0x20,0x20,0x54,0x68,0x65,0x20,0x66,0x6f,0x63,0x75,0x73,0x20,0x6f, +0x66,0x20,0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x20,0x54,0x43,0x50,0x2f,0x49, +0x50,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e, +0x20,0x69,0x73,0x20,0x74,0x6f,0x20,0x72,0x65,0x64,0x75,0x63,0x65,0x0d,0x0a,0x09, +0x20,0x20,0x20,0x20,0x74,0x68,0x65,0x20,0x52,0x41,0x4d,0x20,0x75,0x73,0x61,0x67, +0x65,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,0x73,0x74,0x69,0x6c,0x6c,0x20,0x68,0x61, +0x76,0x69,0x6e,0x67,0x20,0x61,0x20,0x66,0x75,0x6c,0x6c,0x20,0x73,0x63,0x61,0x6c, +0x65,0x20,0x54,0x43,0x50,0x2e,0x20,0x54,0x68,0x69,0x73,0x0d,0x0a,0x09,0x20,0x20, +0x20,0x20,0x6d,0x61,0x6b,0x65,0x73,0x20,0x6c,0x77,0x49,0x50,0x20,0x73,0x75,0x69, +0x74,0x61,0x62,0x6c,0x65,0x20,0x66,0x6f,0x72,0x20,0x75,0x73,0x65,0x20,0x69,0x6e, +0x20,0x65,0x6d,0x62,0x65,0x64,0x64,0x65,0x64,0x20,0x73,0x79,0x73,0x74,0x65,0x6d, +0x73,0x20,0x77,0x69,0x74,0x68,0x20,0x74,0x65,0x6e,0x73,0x0d,0x0a,0x09,0x20,0x20, +0x20,0x20,0x6f,0x66,0x20,0x6b,0x69,0x6c,0x6f,0x62,0x79,0x74,0x65,0x73,0x20,0x6f, +0x66,0x20,0x66,0x72,0x65,0x65,0x20,0x52,0x41,0x4d,0x20,0x61,0x6e,0x64,0x20,0x72, +0x6f,0x6f,0x6d,0x20,0x66,0x6f,0x72,0x20,0x61,0x72,0x6f,0x75,0x6e,0x64,0x20,0x34, +0x30,0x20,0x6b,0x69,0x6c,0x6f,0x62,0x79,0x74,0x65,0x73,0x0d,0x0a,0x09,0x20,0x20, +0x20,0x20,0x6f,0x66,0x20,0x63,0x6f,0x64,0x65,0x20,0x52,0x4f,0x4d,0x2e,0x0d,0x0a, +0x09,0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d, +0x0a,0x09,0x20,0x20,0x20,0x20,0x4d,0x6f,0x72,0x65,0x20,0x69,0x6e,0x66,0x6f,0x72, +0x6d,0x61,0x74,0x69,0x6f,0x6e,0x20,0x61,0x62,0x6f,0x75,0x74,0x20,0x6c,0x77,0x49, +0x50,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x66,0x6f,0x75,0x6e,0x64,0x20,0x61, +0x74,0x20,0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x0d,0x0a,0x09,0x20,0x20,0x20, +0x20,0x68,0x6f,0x6d,0x65,0x70,0x61,0x67,0x65,0x20,0x61,0x74,0x20,0x3c,0x61,0x0d, +0x0a,0x09,0x20,0x20,0x20,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68,0x74,0x74,0x70, +0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67, +0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f, +0x6c,0x77,0x69,0x70,0x2f,0x22,0x3e,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61, +0x76,0x61,0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72, +0x67,0x2f,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x2f, +0x3c,0x2f,0x61,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x6f,0x72,0x20,0x61,0x74, +0x20,0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x20,0x77,0x69,0x6b,0x69,0x20,0x61, +0x74,0x20,0x3c,0x61,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x68,0x72,0x65,0x66,0x3d, +0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6c,0x77,0x69,0x70,0x2e,0x77,0x69,0x6b, +0x69,0x61,0x2e,0x63,0x6f,0x6d,0x2f,0x22,0x3e,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f, +0x6c,0x77,0x69,0x70,0x2e,0x77,0x69,0x6b,0x69,0x61,0x2e,0x63,0x6f,0x6d,0x2f,0x3c, +0x2f,0x61,0x3e,0x2e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09, +0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x2f,0x74,0x72, +0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65, +0x3e,0x0d,0x0a,0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x68,0x74, +0x6d,0x6c,0x3e,0x0d,0x0a,0x0d,0x0a,}; + + + +const struct fsdata_file file__img_sics_gif[] = { { +file_NULL, +data__img_sics_gif, +data__img_sics_gif + 16, +sizeof(data__img_sics_gif) - 16, +FS_FILE_FLAGS_HEADER_INCLUDED | FS_FILE_FLAGS_HEADER_PERSISTENT, +}}; + +const struct fsdata_file file__404_html[] = { { +file__img_sics_gif, +data__404_html, +data__404_html + 12, +sizeof(data__404_html) - 12, +FS_FILE_FLAGS_HEADER_INCLUDED | FS_FILE_FLAGS_HEADER_PERSISTENT, +}}; + +const struct fsdata_file file__index_html[] = { { +file__404_html, +data__index_html, +data__index_html + 12, +sizeof(data__index_html) - 12, +FS_FILE_FLAGS_HEADER_INCLUDED | FS_FILE_FLAGS_HEADER_PERSISTENT, +}}; + +#define FS_ROOT file__index_html +#define FS_NUMFILES 3 + diff --git a/User/lwip_http/fsdata_new.h b/User/lwip_http/fsdata_new.h new file mode 100644 index 0000000..d31550d --- /dev/null +++ b/User/lwip_http/fsdata_new.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_FSDATA_H +#define LWIP_FSDATA_H + +#include "lwip/apps/httpd_opts.h" +#include "lwip/apps/fs.h" + +/* THIS FILE IS DEPRECATED AND WILL BE REMOVED IN THE FUTURE */ +/* content was moved to fs.h to simplify #include structure */ + +#endif /* LWIP_FSDATA_H */ diff --git a/User/lwip_http/http_cgi_ssi.h b/User/lwip_http/http_cgi_ssi.h index eca6efb..720c306 100755 --- a/User/lwip_http/http_cgi_ssi.h +++ b/User/lwip_http/http_cgi_ssi.h @@ -6,39 +6,13 @@ ****************************************************************************** * @attention * - *

                  © Copyright (c) 2017 STMicroelectronics International N.V. + *

                  © Copyright (c) 2017 STMicroelectronics. * All rights reserved.

                  * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted, provided that the following conditions are met: - * - * 1. Redistribution of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of STMicroelectronics nor the names of other - * contributors to this software may be used to endorse or promote products - * derived from this software without specific written permission. - * 4. This software, including modifications and/or derivative works of this - * software, must execute solely and exclusively on microcontroller or - * microprocessor devices manufactured by or for STMicroelectronics. - * 5. Redistribution and use of this software other than as permitted under - * this license is void and will automatically terminate your rights under - * this license. - * - * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY - * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT - * SHALL STMICROELECTRONICS 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. + * This software component is licensed by ST under Ultimate Liberty license + * SLA0044, the "License"; You may not use this file except in compliance with + * the License. You may obtain a copy of the License at: + * www.st.com/SLA0044 * ****************************************************************************** */ diff --git a/User/lwip_http/http_client.c b/User/lwip_http/http_client.c new file mode 100644 index 0000000..82da60d --- /dev/null +++ b/User/lwip_http/http_client.c @@ -0,0 +1,909 @@ +/** + * @file + * HTTP client + */ + +/* + * Copyright (c) 2018 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + */ + +/** + * @defgroup httpc HTTP client + * @ingroup apps + * @todo: + * - persistent connections + * - select outgoing http version + * - optionally follow redirect + * - check request uri for invalid characters? (e.g. encode spaces) + * - IPv6 support + */ + +#include "lwip/apps/http_client.h" + +#include "lwip/altcp_tcp.h" +#include "lwip/dns.h" +#include "lwip/debug.h" +#include "lwip/mem.h" +#include "lwip/altcp_tls.h" +#include "lwip/init.h" + +#include +#include +#include + +#if LWIP_TCP && LWIP_CALLBACK_API + +/** + * HTTPC_DEBUG: Enable debugging for HTTP client. + */ +#ifndef HTTPC_DEBUG +#define HTTPC_DEBUG LWIP_DBG_OFF +#endif + +/** Set this to 1 to keep server name and uri in request state */ +#ifndef HTTPC_DEBUG_REQUEST +#define HTTPC_DEBUG_REQUEST 0 +#endif + +/** This string is passed in the HTTP header as "User-Agent: " */ +#ifndef HTTPC_CLIENT_AGENT +#define HTTPC_CLIENT_AGENT "lwIP/" LWIP_VERSION_STRING " (http://savannah.nongnu.org/projects/lwip)" +#endif + +/* the various debug levels for this file */ +#define HTTPC_DEBUG_TRACE (HTTPC_DEBUG | LWIP_DBG_TRACE) +#define HTTPC_DEBUG_STATE (HTTPC_DEBUG | LWIP_DBG_STATE) +#define HTTPC_DEBUG_WARN (HTTPC_DEBUG | LWIP_DBG_LEVEL_WARNING) +#define HTTPC_DEBUG_WARN_STATE (HTTPC_DEBUG | LWIP_DBG_LEVEL_WARNING | LWIP_DBG_STATE) +#define HTTPC_DEBUG_SERIOUS (HTTPC_DEBUG | LWIP_DBG_LEVEL_SERIOUS) + +#define HTTPC_POLL_INTERVAL 1 +#define HTTPC_POLL_TIMEOUT 30 /* 15 seconds */ + +#define HTTPC_CONTENT_LEN_INVALID 0xFFFFFFFF + +/* GET request basic */ +#define HTTPC_REQ_11 "GET %s HTTP/1.1\r\n" /* URI */\ + "User-Agent: %s\r\n" /* User-Agent */ \ + "Accept: */*\r\n" \ + "Connection: Close\r\n" /* we don't support persistent connections, yet */ \ + "\r\n" +#define HTTPC_REQ_11_FORMAT(uri) HTTPC_REQ_11, uri, HTTPC_CLIENT_AGENT + +/* GET request with host */ +#define HTTPC_REQ_11_HOST "GET %s HTTP/1.1\r\n" /* URI */\ + "User-Agent: %s\r\n" /* User-Agent */ \ + "Accept: */*\r\n" \ + "Host: %s\r\n" /* server name */ \ + "Connection: Close\r\n" /* we don't support persistent connections, yet */ \ + "\r\n" +#define HTTPC_REQ_11_HOST_FORMAT(uri, srv_name) HTTPC_REQ_11_HOST, uri, HTTPC_CLIENT_AGENT, srv_name + +/* GET request with proxy */ +#define HTTPC_REQ_11_PROXY "GET http://%s%s HTTP/1.1\r\n" /* HOST, URI */\ + "User-Agent: %s\r\n" /* User-Agent */ \ + "Accept: */*\r\n" \ + "Host: %s\r\n" /* server name */ \ + "Connection: Close\r\n" /* we don't support persistent connections, yet */ \ + "\r\n" +#define HTTPC_REQ_11_PROXY_FORMAT(host, uri, srv_name) HTTPC_REQ_11_PROXY, host, uri, HTTPC_CLIENT_AGENT, srv_name + +/* GET request with proxy (non-default server port) */ +#define HTTPC_REQ_11_PROXY_PORT "GET http://%s:%d%s HTTP/1.1\r\n" /* HOST, host-port, URI */\ + "User-Agent: %s\r\n" /* User-Agent */ \ + "Accept: */*\r\n" \ + "Host: %s\r\n" /* server name */ \ + "Connection: Close\r\n" /* we don't support persistent connections, yet */ \ + "\r\n" +#define HTTPC_REQ_11_PROXY_PORT_FORMAT(host, host_port, uri, srv_name) HTTPC_REQ_11_PROXY_PORT, host, host_port, uri, HTTPC_CLIENT_AGENT, srv_name + +typedef enum ehttpc_parse_state { + HTTPC_PARSE_WAIT_FIRST_LINE = 0, + HTTPC_PARSE_WAIT_HEADERS, + HTTPC_PARSE_RX_DATA +} httpc_parse_state_t; + +typedef struct _httpc_state +{ + struct altcp_pcb* pcb; + ip_addr_t remote_addr; + u16_t remote_port; + int timeout_ticks; + struct pbuf *request; + struct pbuf *rx_hdrs; + u16_t rx_http_version; + u16_t rx_status; + altcp_recv_fn recv_fn; + const httpc_connection_t *conn_settings; + void* callback_arg; + u32_t rx_content_len; + u32_t hdr_content_len; + httpc_parse_state_t parse_state; +#if HTTPC_DEBUG_REQUEST + char* server_name; + char* uri; +#endif +} httpc_state_t; + +/** Free http client state and deallocate all resources within */ +static err_t +httpc_free_state(httpc_state_t* req) +{ + struct altcp_pcb* tpcb; + + if (req->request != NULL) { + pbuf_free(req->request); + req->request = NULL; + } + if (req->rx_hdrs != NULL) { + pbuf_free(req->rx_hdrs); + req->rx_hdrs = NULL; + } + + tpcb = req->pcb; + mem_free(req); + req = NULL; + + if (tpcb != NULL) { + err_t r; + altcp_arg(tpcb, NULL); + altcp_recv(tpcb, NULL); + altcp_err(tpcb, NULL); + altcp_poll(tpcb, NULL, 0); + altcp_sent(tpcb, NULL); + r = altcp_close(tpcb); + if (r != ERR_OK) { + altcp_abort(tpcb); + return ERR_ABRT; + } + } + return ERR_OK; +} + +/** Close the connection: call finished callback and free the state */ +static err_t +httpc_close(httpc_state_t* req, httpc_result_t result, u32_t server_response, err_t err) +{ + if (req != NULL) { + if (req->conn_settings != NULL) { + if (req->conn_settings->result_fn != NULL) { + req->conn_settings->result_fn(req->callback_arg, result, req->rx_content_len, server_response, err); + } + } + return httpc_free_state(req); + } + return ERR_OK; +} + +/** Parse http header response line 1 */ +static err_t +http_parse_response_status(struct pbuf *p, u16_t *http_version, u16_t *http_status, u16_t *http_status_str_offset) +{ + u16_t end1 = pbuf_memfind(p, "\r\n", 2, 0); + if (end1 != 0xFFFF) { + /* get parts of first line */ + u16_t space1, space2; + space1 = pbuf_memfind(p, " ", 1, 0); + if (space1 != 0xFFFF) { + if ((pbuf_memcmp(p, 0, "HTTP/", 5) == 0) && (pbuf_get_at(p, 6) == '.')) { + char status_num[10]; + size_t status_num_len; + /* parse http version */ + u16_t version = pbuf_get_at(p, 5) - '0'; + version <<= 8; + version |= pbuf_get_at(p, 7) - '0'; + *http_version = version; + + /* parse http status number */ + space2 = pbuf_memfind(p, " ", 1, space1 + 1); + if (space2 != 0xFFFF) { + *http_status_str_offset = space2 + 1; + status_num_len = space2 - space1 - 1; + } else { + status_num_len = end1 - space1 - 1; + } + memset(status_num, 0, sizeof(status_num)); + if (pbuf_copy_partial(p, status_num, (u16_t)status_num_len, space1 + 1) == status_num_len) { + int status = atoi(status_num); + if ((status > 0) && (status <= 0xFFFF)) { + *http_status = (u16_t)status; + return ERR_OK; + } + } + } + } + } + return ERR_VAL; +} + +/** Wait for all headers to be received, return its length and content-length (if available) */ +static err_t +http_wait_headers(struct pbuf *p, u32_t *content_length, u16_t *total_header_len) +{ + u16_t end1 = pbuf_memfind(p, "\r\n\r\n", 4, 0); + if (end1 < (0xFFFF - 2)) { + /* all headers received */ + /* check if we have a content length (@todo: case insensitive?) */ + u16_t content_len_hdr; + *content_length = HTTPC_CONTENT_LEN_INVALID; + *total_header_len = end1 + 4; + + content_len_hdr = pbuf_memfind(p, "Content-Length: ", 16, 0); + if (content_len_hdr != 0xFFFF) { + u16_t content_len_line_end = pbuf_memfind(p, "\r\n", 2, content_len_hdr); + if (content_len_line_end != 0xFFFF) { + char content_len_num[16]; + u16_t content_len_num_len = (u16_t)(content_len_line_end - content_len_hdr - 16); + memset(content_len_num, 0, sizeof(content_len_num)); + if (pbuf_copy_partial(p, content_len_num, content_len_num_len, content_len_hdr + 16) == content_len_num_len) { + int len = atoi(content_len_num); + if ((len >= 0) && ((u32_t)len < HTTPC_CONTENT_LEN_INVALID)) { + *content_length = (u32_t)len; + } + } + } + } + return ERR_OK; + } + return ERR_VAL; +} + +/** http client tcp recv callback */ +static err_t +httpc_tcp_recv(void *arg, struct altcp_pcb *pcb, struct pbuf *p, err_t r) +{ + httpc_state_t* req = (httpc_state_t*)arg; + LWIP_UNUSED_ARG(r); + + if (p == NULL) { + httpc_result_t result; + if (req->parse_state != HTTPC_PARSE_RX_DATA) { + /* did not get RX data yet */ + result = HTTPC_RESULT_ERR_CLOSED; + } else if ((req->hdr_content_len != HTTPC_CONTENT_LEN_INVALID) && + (req->hdr_content_len != req->rx_content_len)) { + /* header has been received with content length but not all data received */ + result = HTTPC_RESULT_ERR_CONTENT_LEN; + } else { + /* receiving data and either all data received or no content length header */ + result = HTTPC_RESULT_OK; + } + return httpc_close(req, result, req->rx_status, ERR_OK); + } + if (req->parse_state != HTTPC_PARSE_RX_DATA) { + if (req->rx_hdrs == NULL) { + req->rx_hdrs = p; + } else { + pbuf_cat(req->rx_hdrs, p); + } + if (req->parse_state == HTTPC_PARSE_WAIT_FIRST_LINE) { + u16_t status_str_off; + err_t err = http_parse_response_status(req->rx_hdrs, &req->rx_http_version, &req->rx_status, &status_str_off); + if (err == ERR_OK) { + /* don't care status string */ + req->parse_state = HTTPC_PARSE_WAIT_HEADERS; + } + } + if (req->parse_state == HTTPC_PARSE_WAIT_HEADERS) { + u16_t total_header_len; + err_t err = http_wait_headers(req->rx_hdrs, &req->hdr_content_len, &total_header_len); + if (err == ERR_OK) { + struct pbuf *q; + /* full header received, send window update for header bytes and call into client callback */ + altcp_recved(pcb, total_header_len); + if (req->conn_settings) { + if (req->conn_settings->headers_done_fn) { + err = req->conn_settings->headers_done_fn(req, req->callback_arg, req->rx_hdrs, total_header_len, req->hdr_content_len); + if (err != ERR_OK) { + return httpc_close(req, HTTPC_RESULT_LOCAL_ABORT, req->rx_status, err); + } + } + } + /* hide header bytes in pbuf */ + q = pbuf_free_header(req->rx_hdrs, total_header_len); + p = q; + req->rx_hdrs = NULL; + /* go on with data */ + req->parse_state = HTTPC_PARSE_RX_DATA; + } + } + } + if ((p != NULL) && (req->parse_state == HTTPC_PARSE_RX_DATA)) { + req->rx_content_len += p->tot_len; + if (req->recv_fn != NULL) { + /* directly return here: the connection migth already be aborted from the callback! */ + return req->recv_fn(req->callback_arg, pcb, p, r); + } else { + altcp_recved(pcb, p->tot_len); + pbuf_free(p); + } + } + return ERR_OK; +} + +/** http client tcp err callback */ +static void +httpc_tcp_err(void *arg, err_t err) +{ + httpc_state_t* req = (httpc_state_t*)arg; + if (req != NULL) { + /* pcb has already been deallocated */ + req->pcb = NULL; + httpc_close(req, HTTPC_RESULT_ERR_CLOSED, 0, err); + } +} + +/** http client tcp poll callback */ +static err_t +httpc_tcp_poll(void *arg, struct altcp_pcb *pcb) +{ + /* implement timeout */ + httpc_state_t* req = (httpc_state_t*)arg; + LWIP_UNUSED_ARG(pcb); + if (req != NULL) { + if (req->timeout_ticks) { + req->timeout_ticks--; + } + if (!req->timeout_ticks) { + return httpc_close(req, HTTPC_RESULT_ERR_TIMEOUT, 0, ERR_OK); + } + } + return ERR_OK; +} + +/** http client tcp sent callback */ +static err_t +httpc_tcp_sent(void *arg, struct altcp_pcb *pcb, u16_t len) +{ + /* nothing to do here for now */ + LWIP_UNUSED_ARG(arg); + LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(len); + return ERR_OK; +} + +/** http client tcp connected callback */ +static err_t +httpc_tcp_connected(void *arg, struct altcp_pcb *pcb, err_t err) +{ + err_t r; + httpc_state_t* req = (httpc_state_t*)arg; + LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(err); + + /* send request; last char is zero termination */ + r = altcp_write(req->pcb, req->request->payload, req->request->len - 1, TCP_WRITE_FLAG_COPY); + if (r != ERR_OK) { + /* could not write the single small request -> fail, don't retry */ + return httpc_close(req, HTTPC_RESULT_ERR_MEM, 0, r); + } + /* everything written, we can free the request */ + pbuf_free(req->request); + req->request = NULL; + + altcp_output(req->pcb); + return ERR_OK; +} + +/** Start the http request when the server IP addr is known */ +static err_t +httpc_get_internal_addr(httpc_state_t* req, const ip_addr_t *ipaddr) +{ + err_t err; + LWIP_ASSERT("req != NULL", req != NULL); + + if (&req->remote_addr != ipaddr) { + /* fill in remote addr if called externally */ + req->remote_addr = *ipaddr; + } + + err = altcp_connect(req->pcb, &req->remote_addr, req->remote_port, httpc_tcp_connected); + if (err == ERR_OK) { + return ERR_OK; + } + LWIP_DEBUGF(HTTPC_DEBUG_WARN_STATE, ("tcp_connect failed: %d\n", (int)err)); + return err; +} + +#if LWIP_DNS +/** DNS callback + * If ipaddr is non-NULL, resolving succeeded and the request can be sent, otherwise it failed. + */ +static void +httpc_dns_found(const char* hostname, const ip_addr_t *ipaddr, void *arg) +{ + httpc_state_t* req = (httpc_state_t*)arg; + err_t err; + httpc_result_t result; + + LWIP_UNUSED_ARG(hostname); + + if (ipaddr != NULL) { + err = httpc_get_internal_addr(req, ipaddr); + if (err == ERR_OK) { + return; + } + result = HTTPC_RESULT_ERR_CONNECT; + } else { + LWIP_DEBUGF(HTTPC_DEBUG_WARN_STATE, ("httpc_dns_found: failed to resolve hostname: %s\n", + hostname)); + result = HTTPC_RESULT_ERR_HOSTNAME; + err = ERR_ARG; + } + httpc_close(req, result, 0, err); +} +#endif /* LWIP_DNS */ + +/** Start the http request after converting 'server_name' to ip address (DNS or address string) */ +static err_t +httpc_get_internal_dns(httpc_state_t* req, const char* server_name) +{ + err_t err; + LWIP_ASSERT("req != NULL", req != NULL); + +#if LWIP_DNS + err = dns_gethostbyname(server_name, &req->remote_addr, httpc_dns_found, req); +#else + err = ipaddr_aton(server_name, &req->remote_addr) ? ERR_OK : ERR_ARG; +#endif + + if (err == ERR_OK) { + /* cached or IP-string */ + err = httpc_get_internal_addr(req, &req->remote_addr); + } else if (err == ERR_INPROGRESS) { + return ERR_OK; + } + return err; +} + +static int +httpc_create_request_string(const httpc_connection_t *settings, const char* server_name, int server_port, const char* uri, + int use_host, char *buffer, size_t buffer_size) +{ + if (settings->use_proxy) { + LWIP_ASSERT("server_name != NULL", server_name != NULL); + if (server_port != HTTP_DEFAULT_PORT) { + return snprintf(buffer, buffer_size, HTTPC_REQ_11_PROXY_PORT_FORMAT(server_name, server_port, uri, server_name)); + } else { + return snprintf(buffer, buffer_size, HTTPC_REQ_11_PROXY_FORMAT(server_name, uri, server_name)); + } + } else if (use_host) { + LWIP_ASSERT("server_name != NULL", server_name != NULL); + return snprintf(buffer, buffer_size, HTTPC_REQ_11_HOST_FORMAT(uri, server_name)); + } else { + return snprintf(buffer, buffer_size, HTTPC_REQ_11_FORMAT(uri)); + } +} + +/** Initialize the connection struct */ +static err_t +httpc_init_connection_common(httpc_state_t **connection, const httpc_connection_t *settings, const char* server_name, + u16_t server_port, const char* uri, altcp_recv_fn recv_fn, void* callback_arg, int use_host) +{ + size_t alloc_len; + mem_size_t mem_alloc_len; + int req_len, req_len2; + httpc_state_t *req; +#if HTTPC_DEBUG_REQUEST + size_t server_name_len, uri_len; +#endif + + LWIP_ASSERT("uri != NULL", uri != NULL); + + /* get request len */ + req_len = httpc_create_request_string(settings, server_name, server_port, uri, use_host, NULL, 0); + if ((req_len < 0) || (req_len > 0xFFFF)) { + return ERR_VAL; + } + /* alloc state and request in one block */ + alloc_len = sizeof(httpc_state_t); +#if HTTPC_DEBUG_REQUEST + server_name_len = server_name ? strlen(server_name) : 0; + uri_len = strlen(uri); + alloc_len += server_name_len + 1 + uri_len + 1; +#endif + mem_alloc_len = (mem_size_t)alloc_len; + if ((mem_alloc_len < alloc_len) || (req_len + 1 > 0xFFFF)) { + return ERR_VAL; + } + + req = (httpc_state_t*)mem_malloc((mem_size_t)alloc_len); + if(req == NULL) { + return ERR_MEM; + } + memset(req, 0, sizeof(httpc_state_t)); + req->timeout_ticks = HTTPC_POLL_TIMEOUT; + req->request = pbuf_alloc(PBUF_RAW, (u16_t)(req_len + 1), PBUF_RAM); + if (req->request == NULL) { + httpc_free_state(req); + return ERR_MEM; + } + if (req->request->next != NULL) { + /* need a pbuf in one piece */ + httpc_free_state(req); + return ERR_MEM; + } + req->hdr_content_len = HTTPC_CONTENT_LEN_INVALID; +#if HTTPC_DEBUG_REQUEST + req->server_name = (char*)(req + 1); + if (server_name) { + memcpy(req->server_name, server_name, server_name_len + 1); + } + req->uri = req->server_name + server_name_len + 1; + memcpy(req->uri, uri, uri_len + 1); +#endif + req->pcb = altcp_new(settings->altcp_allocator); + if(req->pcb == NULL) { + httpc_free_state(req); + return ERR_MEM; + } + req->remote_port = settings->use_proxy ? settings->proxy_port : server_port; + altcp_arg(req->pcb, req); + altcp_recv(req->pcb, httpc_tcp_recv); + altcp_err(req->pcb, httpc_tcp_err); + altcp_poll(req->pcb, httpc_tcp_poll, HTTPC_POLL_INTERVAL); + altcp_sent(req->pcb, httpc_tcp_sent); + + /* set up request buffer */ + req_len2 = httpc_create_request_string(settings, server_name, server_port, uri, use_host, + (char *)req->request->payload, req_len + 1); + if (req_len2 != req_len) { + httpc_free_state(req); + return ERR_VAL; + } + + req->recv_fn = recv_fn; + req->conn_settings = settings; + req->callback_arg = callback_arg; + + *connection = req; + return ERR_OK; +} + +/** + * Initialize the connection struct + */ +static err_t +httpc_init_connection(httpc_state_t **connection, const httpc_connection_t *settings, const char* server_name, + u16_t server_port, const char* uri, altcp_recv_fn recv_fn, void* callback_arg) +{ + return httpc_init_connection_common(connection, settings, server_name, server_port, uri, recv_fn, callback_arg, 1); +} + + +/** + * Initialize the connection struct (from IP address) + */ +static err_t +httpc_init_connection_addr(httpc_state_t **connection, const httpc_connection_t *settings, + const ip_addr_t* server_addr, u16_t server_port, const char* uri, + altcp_recv_fn recv_fn, void* callback_arg) +{ + char *server_addr_str = ipaddr_ntoa(server_addr); + if (server_addr_str == NULL) { + return ERR_VAL; + } + return httpc_init_connection_common(connection, settings, server_addr_str, server_port, uri, + recv_fn, callback_arg, 1); +} + +/** + * @ingroup httpc + * HTTP client API: get a file by passing server IP address + * + * @param server_addr IP address of the server to connect + * @param port tcp port of the server + * @param uri uri to get from the server, remember leading "/"! + * @param settings connection settings (callbacks, proxy, etc.) + * @param recv_fn the http body (not the headers) are passed to this callback + * @param callback_arg argument passed to all the callbacks + * @param connection retreives the connection handle (to match in callbacks) + * @return ERR_OK if starting the request succeeds (callback_fn will be called later) + * or an error code + */ +err_t +httpc_get_file(const ip_addr_t* server_addr, u16_t port, const char* uri, const httpc_connection_t *settings, + altcp_recv_fn recv_fn, void* callback_arg, httpc_state_t **connection) +{ + err_t err; + httpc_state_t* req; + + LWIP_ERROR("invalid parameters", (server_addr != NULL) && (uri != NULL) && (recv_fn != NULL), return ERR_ARG;); + + err = httpc_init_connection_addr(&req, settings, server_addr, port, + uri, recv_fn, callback_arg); + if (err != ERR_OK) { + return err; + } + + if (settings->use_proxy) { + err = httpc_get_internal_addr(req, &settings->proxy_addr); + } else { + err = httpc_get_internal_addr(req, server_addr); + } + if(err != ERR_OK) { + httpc_free_state(req); + return err; + } + + if (connection != NULL) { + *connection = req; + } + return ERR_OK; +} + +/** + * @ingroup httpc + * HTTP client API: get a file by passing server name as string (DNS name or IP address string) + * + * @param server_name server name as string (DNS name or IP address string) + * @param port tcp port of the server + * @param uri uri to get from the server, remember leading "/"! + * @param settings connection settings (callbacks, proxy, etc.) + * @param recv_fn the http body (not the headers) are passed to this callback + * @param callback_arg argument passed to all the callbacks + * @param connection retreives the connection handle (to match in callbacks) + * @return ERR_OK if starting the request succeeds (callback_fn will be called later) + * or an error code + */ +err_t +httpc_get_file_dns(const char* server_name, u16_t port, const char* uri, const httpc_connection_t *settings, + altcp_recv_fn recv_fn, void* callback_arg, httpc_state_t **connection) +{ + err_t err; + httpc_state_t* req; + + LWIP_ERROR("invalid parameters", (server_name != NULL) && (uri != NULL) && (recv_fn != NULL), return ERR_ARG;); + + err = httpc_init_connection(&req, settings, server_name, port, uri, recv_fn, callback_arg); + if (err != ERR_OK) { + return err; + } + + if (settings->use_proxy) { + err = httpc_get_internal_addr(req, &settings->proxy_addr); + } else { + err = httpc_get_internal_dns(req, server_name); + } + if(err != ERR_OK) { + httpc_free_state(req); + return err; + } + + if (connection != NULL) { + *connection = req; + } + return ERR_OK; +} + +#if LWIP_HTTPC_HAVE_FILE_IO +/* Implementation to disk via fopen/fwrite/fclose follows */ + +typedef struct _httpc_filestate +{ + const char* local_file_name; + FILE *file; + httpc_connection_t settings; + const httpc_connection_t *client_settings; + void *callback_arg; +} httpc_filestate_t; + +static void httpc_fs_result(void *arg, httpc_result_t httpc_result, u32_t rx_content_len, + u32_t srv_res, err_t err); + +/** Initalize http client state for download to file system */ +static err_t +httpc_fs_init(httpc_filestate_t **filestate_out, const char* local_file_name, + const httpc_connection_t *settings, void* callback_arg) +{ + httpc_filestate_t *filestate; + size_t file_len, alloc_len; + FILE *f; + + file_len = strlen(local_file_name); + alloc_len = sizeof(httpc_filestate_t) + file_len + 1; + + filestate = (httpc_filestate_t *)mem_malloc((mem_size_t)alloc_len); + if (filestate == NULL) { + return ERR_MEM; + } + memset(filestate, 0, sizeof(httpc_filestate_t)); + filestate->local_file_name = (const char *)(filestate + 1); + memcpy((char *)(filestate + 1), local_file_name, file_len + 1); + filestate->file = NULL; + filestate->client_settings = settings; + filestate->callback_arg = callback_arg; + /* copy client settings but override result callback */ + memcpy(&filestate->settings, settings, sizeof(httpc_connection_t)); + filestate->settings.result_fn = httpc_fs_result; + + f = fopen(local_file_name, "wb"); + if(f == NULL) { + /* could not open file */ + mem_free(filestate); + return ERR_VAL; + } + filestate->file = f; + *filestate_out = filestate; + return ERR_OK; +} + +/** Free http client state for download to file system */ +static void +httpc_fs_free(httpc_filestate_t *filestate) +{ + if (filestate != NULL) { + if (filestate->file != NULL) { + fclose(filestate->file); + filestate->file = NULL; + } + mem_free(filestate); + } +} + +/** Connection closed (success or error) */ +static void +httpc_fs_result(void *arg, httpc_result_t httpc_result, u32_t rx_content_len, + u32_t srv_res, err_t err) +{ + httpc_filestate_t *filestate = (httpc_filestate_t *)arg; + if (filestate != NULL) { + if (filestate->client_settings->result_fn != NULL) { + filestate->client_settings->result_fn(filestate->callback_arg, httpc_result, rx_content_len, + srv_res, err); + } + httpc_fs_free(filestate); + } +} + +/** tcp recv callback */ +static err_t +httpc_fs_tcp_recv(void *arg, struct altcp_pcb *pcb, struct pbuf *p, err_t err) +{ + httpc_filestate_t *filestate = (httpc_filestate_t*)arg; + struct pbuf* q; + LWIP_UNUSED_ARG(err); + + LWIP_ASSERT("p != NULL", p != NULL); + + for (q = p; q != NULL; q = q->next) { + fwrite(q->payload, 1, q->len, filestate->file); + } + altcp_recved(pcb, p->tot_len); + pbuf_free(p); + return ERR_OK; +} + +/** + * @ingroup httpc + * HTTP client API: get a file to disk by passing server IP address + * + * @param server_addr IP address of the server to connect + * @param port tcp port of the server + * @param uri uri to get from the server, remember leading "/"! + * @param settings connection settings (callbacks, proxy, etc.) + * @param callback_arg argument passed to all the callbacks + * @param connection retreives the connection handle (to match in callbacks) + * @return ERR_OK if starting the request succeeds (callback_fn will be called later) + * or an error code + */ +err_t +httpc_get_file_to_disk(const ip_addr_t* server_addr, u16_t port, const char* uri, const httpc_connection_t *settings, + void* callback_arg, const char* local_file_name, httpc_state_t **connection) +{ + err_t err; + httpc_state_t* req; + httpc_filestate_t *filestate; + + LWIP_ERROR("invalid parameters", (server_addr != NULL) && (uri != NULL) && (local_file_name != NULL), return ERR_ARG;); + + err = httpc_fs_init(&filestate, local_file_name, settings, callback_arg); + if (err != ERR_OK) { + return err; + } + + err = httpc_init_connection_addr(&req, &filestate->settings, server_addr, port, + uri, httpc_fs_tcp_recv, filestate); + if (err != ERR_OK) { + httpc_fs_free(filestate); + return err; + } + + if (settings->use_proxy) { + err = httpc_get_internal_addr(req, &settings->proxy_addr); + } else { + err = httpc_get_internal_addr(req, server_addr); + } + if(err != ERR_OK) { + httpc_fs_free(filestate); + httpc_free_state(req); + return err; + } + + if (connection != NULL) { + *connection = req; + } + return ERR_OK; +} + +/** + * @ingroup httpc + * HTTP client API: get a file to disk by passing server name as string (DNS name or IP address string) + * + * @param server_name server name as string (DNS name or IP address string) + * @param port tcp port of the server + * @param uri uri to get from the server, remember leading "/"! + * @param settings connection settings (callbacks, proxy, etc.) + * @param callback_arg argument passed to all the callbacks + * @param connection retreives the connection handle (to match in callbacks) + * @return ERR_OK if starting the request succeeds (callback_fn will be called later) + * or an error code + */ +err_t +httpc_get_file_dns_to_disk(const char* server_name, u16_t port, const char* uri, const httpc_connection_t *settings, + void* callback_arg, const char* local_file_name, httpc_state_t **connection) +{ + err_t err; + httpc_state_t* req; + httpc_filestate_t *filestate; + + LWIP_ERROR("invalid parameters", (server_name != NULL) && (uri != NULL) && (local_file_name != NULL), return ERR_ARG;); + + err = httpc_fs_init(&filestate, local_file_name, settings, callback_arg); + if (err != ERR_OK) { + return err; + } + + err = httpc_init_connection(&req, &filestate->settings, server_name, port, + uri, httpc_fs_tcp_recv, filestate); + if (err != ERR_OK) { + httpc_fs_free(filestate); + return err; + } + + if (settings->use_proxy) { + err = httpc_get_internal_addr(req, &settings->proxy_addr); + } else { + err = httpc_get_internal_dns(req, server_name); + } + if(err != ERR_OK) { + httpc_fs_free(filestate); + httpc_free_state(req); + return err; + } + + if (connection != NULL) { + *connection = req; + } + return ERR_OK; +} +#endif /* LWIP_HTTPC_HAVE_FILE_IO */ + +#endif /* LWIP_TCP && LWIP_CALLBACK_API */ diff --git a/User/lwip_http/httpd.c b/User/lwip_http/httpd.c new file mode 100644 index 0000000..ccc9ba7 --- /dev/null +++ b/User/lwip_http/httpd.c @@ -0,0 +1,2746 @@ +/** + * @file + * LWIP HTTP server implementation + */ + +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * Simon Goldschmidt + * + */ + +/** + * @defgroup httpd HTTP server + * @ingroup apps + * + * This httpd supports for a + * rudimentary server-side-include facility which will replace tags of the form + * in any file whose extension is .shtml, .shtm or .ssi with + * strings provided by an include handler whose pointer is provided to the + * module via function http_set_ssi_handler(). + * Additionally, a simple common + * gateway interface (CGI) handling mechanism has been added to allow clients + * to hook functions to particular request URIs. + * + * To enable SSI support, define label LWIP_HTTPD_SSI in lwipopts.h. + * To enable CGI support, define label LWIP_HTTPD_CGI in lwipopts.h. + * + * By default, the server assumes that HTTP headers are already present in + * each file stored in the file system. By defining LWIP_HTTPD_DYNAMIC_HEADERS in + * lwipopts.h, this behavior can be changed such that the server inserts the + * headers automatically based on the extension of the file being served. If + * this mode is used, be careful to ensure that the file system image used + * does not already contain the header information. + * + * File system images without headers can be created using the makefsfile + * tool with the -h command line option. + * + * + * Notes about valid SSI tags + * -------------------------- + * + * The following assumptions are made about tags used in SSI markers: + * + * 1. No tag may contain '-' or whitespace characters within the tag name. + * 2. Whitespace is allowed between the tag leadin "". + * 3. The maximum tag name length is LWIP_HTTPD_MAX_TAG_NAME_LEN, currently 8 characters. + * + * Notes on CGI usage + * ------------------ + * + * The simple CGI support offered here works with GET method requests only + * and can handle up to 16 parameters encoded into the URI. The handler + * function may not write directly to the HTTP output but must return a + * filename that the HTTP server will send to the browser as a response to + * the incoming CGI request. + * + * + * + * The list of supported file types is quite short, so if makefsdata complains + * about an unknown extension, make sure to add it (and its doctype) to + * the 'g_psHTTPHeaders' list. + */ +#include "lwip/init.h" +#include "lwip/apps/httpd.h" +#include "lwip/debug.h" +#include "lwip/stats.h" +#include "lwip/apps/fs.h" +#include "httpd_structs.h" +#include "lwip/def.h" + +#include "lwip/altcp.h" +#include "lwip/altcp_tcp.h" +#if HTTPD_ENABLE_HTTPS +#include "lwip/altcp_tls.h" +#endif +#ifdef LWIP_HOOK_FILENAME +#include LWIP_HOOK_FILENAME +#endif +#if LWIP_HTTPD_TIMING +#include "lwip/sys.h" +#endif /* LWIP_HTTPD_TIMING */ + +#include /* memset */ +#include /* atoi */ +#include + +#if LWIP_TCP && LWIP_CALLBACK_API + +/** Minimum length for a valid HTTP/0.9 request: "GET /\r\n" -> 7 bytes */ +#define MIN_REQ_LEN 7 + +#define CRLF "\r\n" +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE +#define HTTP11_CONNECTIONKEEPALIVE "Connection: keep-alive" +#define HTTP11_CONNECTIONKEEPALIVE2 "Connection: Keep-Alive" +#endif + +#if LWIP_HTTPD_DYNAMIC_FILE_READ +#define HTTP_IS_DYNAMIC_FILE(hs) ((hs)->buf != NULL) +#else +#define HTTP_IS_DYNAMIC_FILE(hs) 0 +#endif + +/* This defines checks whether tcp_write has to copy data or not */ + +#ifndef HTTP_IS_DATA_VOLATILE +/** tcp_write does not have to copy data when sent from rom-file-system directly */ +#define HTTP_IS_DATA_VOLATILE(hs) (HTTP_IS_DYNAMIC_FILE(hs) ? TCP_WRITE_FLAG_COPY : 0) +#endif +/** Default: dynamic headers are sent from ROM (non-dynamic headers are handled like file data) */ +#ifndef HTTP_IS_HDR_VOLATILE +#define HTTP_IS_HDR_VOLATILE(hs, ptr) 0 +#endif + +/* Return values for http_send_*() */ +#define HTTP_DATA_TO_SEND_FREED 3 +#define HTTP_DATA_TO_SEND_BREAK 2 +#define HTTP_DATA_TO_SEND_CONTINUE 1 +#define HTTP_NO_DATA_TO_SEND 0 + +typedef struct { + const char *name; + u8_t shtml; +} default_filename; + +static const default_filename httpd_default_filenames[] = { + {"/index.shtml", 1 }, + {"/index.ssi", 1 }, + {"/index.shtm", 1 }, + {"/index.html", 0 }, + {"/index.htm", 0 } +}; + +#define NUM_DEFAULT_FILENAMES LWIP_ARRAYSIZE(httpd_default_filenames) + +#if LWIP_HTTPD_SUPPORT_REQUESTLIST +/** HTTP request is copied here from pbufs for simple parsing */ +static char httpd_req_buf[LWIP_HTTPD_MAX_REQ_LENGTH + 1]; +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + +#if LWIP_HTTPD_SUPPORT_POST +#if LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN > LWIP_HTTPD_MAX_REQUEST_URI_LEN +#define LWIP_HTTPD_URI_BUF_LEN LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN +#endif +#endif +#ifndef LWIP_HTTPD_URI_BUF_LEN +#define LWIP_HTTPD_URI_BUF_LEN LWIP_HTTPD_MAX_REQUEST_URI_LEN +#endif +#if LWIP_HTTPD_URI_BUF_LEN +/* Filename for response file to send when POST is finished or + * search for default files when a directory is requested. */ +static char http_uri_buf[LWIP_HTTPD_URI_BUF_LEN + 1]; +#endif + +#if LWIP_HTTPD_DYNAMIC_HEADERS +/* The number of individual strings that comprise the headers sent before each + * requested file. + */ +#define NUM_FILE_HDR_STRINGS 5 +#define HDR_STRINGS_IDX_HTTP_STATUS 0 /* e.g. "HTTP/1.0 200 OK\r\n" */ +#define HDR_STRINGS_IDX_SERVER_NAME 1 /* e.g. "Server: "HTTPD_SERVER_AGENT"\r\n" */ +#define HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE 2 /* e.g. "Content-Length: xy\r\n" and/or "Connection: keep-alive\r\n" */ +#define HDR_STRINGS_IDX_CONTENT_LEN_NR 3 /* the byte count, when content-length is used */ +#define HDR_STRINGS_IDX_CONTENT_TYPE 4 /* the content type (or default answer content type including default document) */ + +/* The dynamically generated Content-Length buffer needs space for CRLF + NULL */ +#define LWIP_HTTPD_MAX_CONTENT_LEN_OFFSET 3 +#ifndef LWIP_HTTPD_MAX_CONTENT_LEN_SIZE +/* The dynamically generated Content-Length buffer shall be able to work with + ~953 MB (9 digits) */ +#define LWIP_HTTPD_MAX_CONTENT_LEN_SIZE (9 + LWIP_HTTPD_MAX_CONTENT_LEN_OFFSET) +#endif +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ + +#if LWIP_HTTPD_SSI + +#define HTTPD_LAST_TAG_PART 0xFFFF + +enum tag_check_state { + TAG_NONE, /* Not processing an SSI tag */ + TAG_LEADIN, /* Tag lead in "" being processed */ + TAG_SENDING /* Sending tag replacement string */ +}; + +struct http_ssi_state { + const char *parsed; /* Pointer to the first unparsed byte in buf. */ +#if !LWIP_HTTPD_SSI_INCLUDE_TAG + const char *tag_started;/* Pointer to the first opening '<' of the tag. */ +#endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG */ + const char *tag_end; /* Pointer to char after the closing '>' of the tag. */ + u32_t parse_left; /* Number of unparsed bytes in buf. */ + u16_t tag_index; /* Counter used by tag parsing state machine */ + u16_t tag_insert_len; /* Length of insert in string tag_insert */ +#if LWIP_HTTPD_SSI_MULTIPART + u16_t tag_part; /* Counter passed to and changed by tag insertion function to insert multiple times */ +#endif /* LWIP_HTTPD_SSI_MULTIPART */ + u8_t tag_type; /* index into http_ssi_tag_desc array */ + u8_t tag_name_len; /* Length of the tag name in string tag_name */ + char tag_name[LWIP_HTTPD_MAX_TAG_NAME_LEN + 1]; /* Last tag name extracted */ + char tag_insert[LWIP_HTTPD_MAX_TAG_INSERT_LEN + 1]; /* Insert string for tag_name */ + enum tag_check_state tag_state; /* State of the tag processor */ +}; + +struct http_ssi_tag_description { + const char *lead_in; + const char *lead_out; +}; + +#endif /* LWIP_HTTPD_SSI */ + +struct http_state { +#if LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED + struct http_state *next; +#endif /* LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED */ + struct fs_file file_handle; + struct fs_file *handle; + const char *file; /* Pointer to first unsent byte in buf. */ + + struct altcp_pcb *pcb; +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + struct pbuf *req; +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + +#if LWIP_HTTPD_DYNAMIC_FILE_READ + char *buf; /* File read buffer. */ + int buf_len; /* Size of file read buffer, buf. */ +#endif /* LWIP_HTTPD_DYNAMIC_FILE_READ */ + u32_t left; /* Number of unsent bytes in buf. */ + u8_t retries; +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + u8_t keepalive; +#endif /* LWIP_HTTPD_SUPPORT_11_KEEPALIVE */ +#if LWIP_HTTPD_SSI + struct http_ssi_state *ssi; +#endif /* LWIP_HTTPD_SSI */ +#if LWIP_HTTPD_CGI + char *params[LWIP_HTTPD_MAX_CGI_PARAMETERS]; /* Params extracted from the request URI */ + char *param_vals[LWIP_HTTPD_MAX_CGI_PARAMETERS]; /* Values for each extracted param */ +#endif /* LWIP_HTTPD_CGI */ +#if LWIP_HTTPD_DYNAMIC_HEADERS + const char *hdrs[NUM_FILE_HDR_STRINGS]; /* HTTP headers to be sent. */ + char hdr_content_len[LWIP_HTTPD_MAX_CONTENT_LEN_SIZE]; + u16_t hdr_pos; /* The position of the first unsent header byte in the + current string */ + u16_t hdr_index; /* The index of the hdr string currently being sent. */ +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ +#if LWIP_HTTPD_TIMING + u32_t time_started; +#endif /* LWIP_HTTPD_TIMING */ +#if LWIP_HTTPD_SUPPORT_POST + u32_t post_content_len_left; +#if LWIP_HTTPD_POST_MANUAL_WND + u32_t unrecved_bytes; + u8_t no_auto_wnd; + u8_t post_finished; +#endif /* LWIP_HTTPD_POST_MANUAL_WND */ +#endif /* LWIP_HTTPD_SUPPORT_POST*/ +}; + +#if HTTPD_USE_MEM_POOL +LWIP_MEMPOOL_DECLARE(HTTPD_STATE, MEMP_NUM_PARALLEL_HTTPD_CONNS, sizeof(struct http_state), "HTTPD_STATE") +#if LWIP_HTTPD_SSI +LWIP_MEMPOOL_DECLARE(HTTPD_SSI_STATE, MEMP_NUM_PARALLEL_HTTPD_SSI_CONNS, sizeof(struct http_ssi_state), "HTTPD_SSI_STATE") +#define HTTP_FREE_SSI_STATE(x) LWIP_MEMPOOL_FREE(HTTPD_SSI_STATE, (x)) +#define HTTP_ALLOC_SSI_STATE() (struct http_ssi_state *)LWIP_MEMPOOL_ALLOC(HTTPD_SSI_STATE) +#endif /* LWIP_HTTPD_SSI */ +#define HTTP_ALLOC_HTTP_STATE() (struct http_state *)LWIP_MEMPOOL_ALLOC(HTTPD_STATE) +#define HTTP_FREE_HTTP_STATE(x) LWIP_MEMPOOL_FREE(HTTPD_STATE, (x)) +#else /* HTTPD_USE_MEM_POOL */ +#define HTTP_ALLOC_HTTP_STATE() (struct http_state *)mem_malloc(sizeof(struct http_state)) +#define HTTP_FREE_HTTP_STATE(x) mem_free(x) +#if LWIP_HTTPD_SSI +#define HTTP_ALLOC_SSI_STATE() (struct http_ssi_state *)mem_malloc(sizeof(struct http_ssi_state)) +#define HTTP_FREE_SSI_STATE(x) mem_free(x) +#endif /* LWIP_HTTPD_SSI */ +#endif /* HTTPD_USE_MEM_POOL */ + +static err_t http_close_conn(struct altcp_pcb *pcb, struct http_state *hs); +static err_t http_close_or_abort_conn(struct altcp_pcb *pcb, struct http_state *hs, u8_t abort_conn); +static err_t http_find_file(struct http_state *hs, const char *uri, int is_09); +static err_t http_init_file(struct http_state *hs, struct fs_file *file, int is_09, const char *uri, u8_t tag_check, char *params); +static err_t http_poll(void *arg, struct altcp_pcb *pcb); +static u8_t http_check_eof(struct altcp_pcb *pcb, struct http_state *hs); +#if LWIP_HTTPD_FS_ASYNC_READ +static void http_continue(void *connection); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + +#if LWIP_HTTPD_SSI +/* SSI insert handler function pointer. */ +static tSSIHandler httpd_ssi_handler; +#if !LWIP_HTTPD_SSI_RAW +static int httpd_num_tags; +static const char **httpd_tags; +#endif /* !LWIP_HTTPD_SSI_RAW */ + +/* Define the available tag lead-ins and corresponding lead-outs. + * ATTENTION: for the algorithm below using this array, it is essential + * that the lead in differs in the first character! */ +const struct http_ssi_tag_description http_ssi_tag_desc[] = { + {""}, + {"/*#", "*/"} +}; + +#endif /* LWIP_HTTPD_SSI */ + +#if LWIP_HTTPD_CGI +/* CGI handler information */ +static const tCGI *httpd_cgis; +static int httpd_num_cgis; +static int http_cgi_paramcount; +#define http_cgi_params hs->params +#define http_cgi_param_vals hs->param_vals +#elif LWIP_HTTPD_CGI_SSI +static char *http_cgi_params[LWIP_HTTPD_MAX_CGI_PARAMETERS]; /* Params extracted from the request URI */ +static char *http_cgi_param_vals[LWIP_HTTPD_MAX_CGI_PARAMETERS]; /* Values for each extracted param */ +#endif /* LWIP_HTTPD_CGI */ + +#if LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED +/** global list of active HTTP connections, use to kill the oldest when + running out of memory */ +static struct http_state *http_connections; + +static void +http_add_connection(struct http_state *hs) +{ + /* add the connection to the list */ + hs->next = http_connections; + http_connections = hs; +} + +static void +http_remove_connection(struct http_state *hs) +{ + /* take the connection off the list */ + if (http_connections) { + if (http_connections == hs) { + http_connections = hs->next; + } else { + struct http_state *last; + for (last = http_connections; last->next != NULL; last = last->next) { + if (last->next == hs) { + last->next = hs->next; + break; + } + } + } + } +} + +static void +http_kill_oldest_connection(u8_t ssi_required) +{ + struct http_state *hs = http_connections; + struct http_state *hs_free_next = NULL; + while (hs && hs->next) { +#if LWIP_HTTPD_SSI + if (ssi_required) { + if (hs->next->ssi != NULL) { + hs_free_next = hs; + } + } else +#else /* LWIP_HTTPD_SSI */ + LWIP_UNUSED_ARG(ssi_required); +#endif /* LWIP_HTTPD_SSI */ + { + hs_free_next = hs; + } + LWIP_ASSERT("broken list", hs != hs->next); + hs = hs->next; + } + if (hs_free_next != NULL) { + LWIP_ASSERT("hs_free_next->next != NULL", hs_free_next->next != NULL); + LWIP_ASSERT("hs_free_next->next->pcb != NULL", hs_free_next->next->pcb != NULL); + /* send RST when killing a connection because of memory shortage */ + http_close_or_abort_conn(hs_free_next->next->pcb, hs_free_next->next, 1); /* this also unlinks the http_state from the list */ + } +} +#else /* LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED */ + +#define http_add_connection(hs) +#define http_remove_connection(hs) + +#endif /* LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED */ + +#if LWIP_HTTPD_SSI +/** Allocate as struct http_ssi_state. */ +static struct http_ssi_state * +http_ssi_state_alloc(void) +{ + struct http_ssi_state *ret = HTTP_ALLOC_SSI_STATE(); +#if LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED + if (ret == NULL) { + http_kill_oldest_connection(1); + ret = HTTP_ALLOC_SSI_STATE(); + } +#endif /* LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED */ + if (ret != NULL) { + memset(ret, 0, sizeof(struct http_ssi_state)); + } + return ret; +} + +/** Free a struct http_ssi_state. */ +static void +http_ssi_state_free(struct http_ssi_state *ssi) +{ + if (ssi != NULL) { + HTTP_FREE_SSI_STATE(ssi); + } +} +#endif /* LWIP_HTTPD_SSI */ + +/** Initialize a struct http_state. + */ +static void +http_state_init(struct http_state *hs) +{ + /* Initialize the structure. */ + memset(hs, 0, sizeof(struct http_state)); +#if LWIP_HTTPD_DYNAMIC_HEADERS + /* Indicate that the headers are not yet valid */ + hs->hdr_index = NUM_FILE_HDR_STRINGS; +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ +} + +/** Allocate a struct http_state. */ +static struct http_state * +http_state_alloc(void) +{ + struct http_state *ret = HTTP_ALLOC_HTTP_STATE(); +#if LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED + if (ret == NULL) { + http_kill_oldest_connection(0); + ret = HTTP_ALLOC_HTTP_STATE(); + } +#endif /* LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED */ + if (ret != NULL) { + http_state_init(ret); + http_add_connection(ret); + } + return ret; +} + +/** Free a struct http_state. + * Also frees the file data if dynamic. + */ +static void +http_state_eof(struct http_state *hs) +{ + if (hs->handle) { +#if LWIP_HTTPD_TIMING + u32_t ms_needed = sys_now() - hs->time_started; + u32_t needed = LWIP_MAX(1, (ms_needed / 100)); + LWIP_DEBUGF(HTTPD_DEBUG_TIMING, ("httpd: needed %"U32_F" ms to send file of %d bytes -> %"U32_F" bytes/sec\n", + ms_needed, hs->handle->len, ((((u32_t)hs->handle->len) * 10) / needed))); +#endif /* LWIP_HTTPD_TIMING */ + fs_close(hs->handle); + hs->handle = NULL; + } +#if LWIP_HTTPD_DYNAMIC_FILE_READ + if (hs->buf != NULL) { + mem_free(hs->buf); + hs->buf = NULL; + } +#endif /* LWIP_HTTPD_DYNAMIC_FILE_READ */ +#if LWIP_HTTPD_SSI + if (hs->ssi) { + http_ssi_state_free(hs->ssi); + hs->ssi = NULL; + } +#endif /* LWIP_HTTPD_SSI */ +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + if (hs->req) { + pbuf_free(hs->req); + hs->req = NULL; + } +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ +} + +/** Free a struct http_state. + * Also frees the file data if dynamic. + */ +static void +http_state_free(struct http_state *hs) +{ + if (hs != NULL) { + http_state_eof(hs); + http_remove_connection(hs); + HTTP_FREE_HTTP_STATE(hs); + } +} + +/** Call tcp_write() in a loop trying smaller and smaller length + * + * @param pcb altcp_pcb to send + * @param ptr Data to send + * @param length Length of data to send (in/out: on return, contains the + * amount of data sent) + * @param apiflags directly passed to tcp_write + * @return the return value of tcp_write + */ +static err_t +http_write(struct altcp_pcb *pcb, const void *ptr, u16_t *length, u8_t apiflags) +{ + u16_t len, max_len; + err_t err; + LWIP_ASSERT("length != NULL", length != NULL); + len = *length; + if (len == 0) { + return ERR_OK; + } + /* We cannot send more data than space available in the send buffer. */ + max_len = altcp_sndbuf(pcb); + if (max_len < len) { + len = max_len; + } +#ifdef HTTPD_MAX_WRITE_LEN + /* Additional limitation: e.g. don't enqueue more than 2*mss at once */ + max_len = HTTPD_MAX_WRITE_LEN(pcb); + if (len > max_len) { + len = max_len; + } +#endif /* HTTPD_MAX_WRITE_LEN */ + do { + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Trying to send %d bytes\n", len)); + err = altcp_write(pcb, ptr, len, apiflags); + if (err == ERR_MEM) { + if ((altcp_sndbuf(pcb) == 0) || + (altcp_sndqueuelen(pcb) >= TCP_SND_QUEUELEN)) { + /* no need to try smaller sizes */ + len = 1; + } else { + len /= 2; + } + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, + ("Send failed, trying less (%d bytes)\n", len)); + } + } while ((err == ERR_MEM) && (len > 1)); + + if (err == ERR_OK) { + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Sent %d bytes\n", len)); + *length = len; + } else { + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Send failed with err %d (\"%s\")\n", err, lwip_strerr(err))); + *length = 0; + } + +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + /* ensure nagle is normally enabled (only disabled for persistent connections + when all data has been enqueued but the connection stays open for the next + request */ + altcp_nagle_enable(pcb); +#endif + + return err; +} + +/** + * The connection shall be actively closed (using RST to close from fault states). + * Reset the sent- and recv-callbacks. + * + * @param pcb the tcp pcb to reset callbacks + * @param hs connection state to free + */ +static err_t +http_close_or_abort_conn(struct altcp_pcb *pcb, struct http_state *hs, u8_t abort_conn) +{ + err_t err; + LWIP_DEBUGF(HTTPD_DEBUG, ("Closing connection %p\n", (void *)pcb)); + +#if LWIP_HTTPD_SUPPORT_POST + if (hs != NULL) { + if ((hs->post_content_len_left != 0) +#if LWIP_HTTPD_POST_MANUAL_WND + || ((hs->no_auto_wnd != 0) && (hs->unrecved_bytes != 0)) +#endif /* LWIP_HTTPD_POST_MANUAL_WND */ + ) { + /* make sure the post code knows that the connection is closed */ + http_uri_buf[0] = 0; + httpd_post_finished(hs, http_uri_buf, LWIP_HTTPD_URI_BUF_LEN); + } + } +#endif /* LWIP_HTTPD_SUPPORT_POST*/ + + + altcp_arg(pcb, NULL); + altcp_recv(pcb, NULL); + altcp_err(pcb, NULL); + altcp_poll(pcb, NULL, 0); + altcp_sent(pcb, NULL); + if (hs != NULL) { + http_state_free(hs); + } + + if (abort_conn) { + altcp_abort(pcb); + return ERR_OK; + } + err = altcp_close(pcb); + if (err != ERR_OK) { + LWIP_DEBUGF(HTTPD_DEBUG, ("Error %d closing %p\n", err, (void *)pcb)); + /* error closing, try again later in poll */ + altcp_poll(pcb, http_poll, HTTPD_POLL_INTERVAL); + } + return err; +} + +/** + * The connection shall be actively closed. + * Reset the sent- and recv-callbacks. + * + * @param pcb the tcp pcb to reset callbacks + * @param hs connection state to free + */ +static err_t +http_close_conn(struct altcp_pcb *pcb, struct http_state *hs) +{ + return http_close_or_abort_conn(pcb, hs, 0); +} + +/** End of file: either close the connection (Connection: close) or + * close the file (Connection: keep-alive) + */ +static void +http_eof(struct altcp_pcb *pcb, struct http_state *hs) +{ + /* HTTP/1.1 persistent connection? (Not supported for SSI) */ +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + if (hs->keepalive) { + http_remove_connection(hs); + + http_state_eof(hs); + http_state_init(hs); + /* restore state: */ + hs->pcb = pcb; + hs->keepalive = 1; + http_add_connection(hs); + /* ensure nagle doesn't interfere with sending all data as fast as possible: */ + altcp_nagle_disable(pcb); + } else +#endif /* LWIP_HTTPD_SUPPORT_11_KEEPALIVE */ + { + http_close_conn(pcb, hs); + } +} + +#if LWIP_HTTPD_CGI || LWIP_HTTPD_CGI_SSI +/** + * Extract URI parameters from the parameter-part of an URI in the form + * "test.cgi?x=y" @todo: better explanation! + * Pointers to the parameters are stored in hs->param_vals. + * + * @param hs http connection state + * @param params pointer to the NULL-terminated parameter string from the URI + * @return number of parameters extracted + */ +static int +extract_uri_parameters(struct http_state *hs, char *params) +{ + char *pair; + char *equals; + int loop; + + LWIP_UNUSED_ARG(hs); + + /* If we have no parameters at all, return immediately. */ + if (!params || (params[0] == '\0')) { + return (0); + } + + /* Get a pointer to our first parameter */ + pair = params; + + /* Parse up to LWIP_HTTPD_MAX_CGI_PARAMETERS from the passed string and ignore the + * remainder (if any) */ + for (loop = 0; (loop < LWIP_HTTPD_MAX_CGI_PARAMETERS) && pair; loop++) { + + /* Save the name of the parameter */ + http_cgi_params[loop] = pair; + + /* Remember the start of this name=value pair */ + equals = pair; + + /* Find the start of the next name=value pair and replace the delimiter + * with a 0 to terminate the previous pair string. */ + pair = strchr(pair, '&'); + if (pair) { + *pair = '\0'; + pair++; + } else { + /* We didn't find a new parameter so find the end of the URI and + * replace the space with a '\0' */ + pair = strchr(equals, ' '); + if (pair) { + *pair = '\0'; + } + + /* Revert to NULL so that we exit the loop as expected. */ + pair = NULL; + } + + /* Now find the '=' in the previous pair, replace it with '\0' and save + * the parameter value string. */ + equals = strchr(equals, '='); + if (equals) { + *equals = '\0'; + http_cgi_param_vals[loop] = equals + 1; + } else { + http_cgi_param_vals[loop] = NULL; + } + } + + return loop; +} +#endif /* LWIP_HTTPD_CGI || LWIP_HTTPD_CGI_SSI */ + +#if LWIP_HTTPD_SSI +/** + * Insert a tag (found in an shtml in the form of "" into the file. + * The tag's name is stored in ssi->tag_name (NULL-terminated), the replacement + * should be written to hs->tag_insert (up to a length of LWIP_HTTPD_MAX_TAG_INSERT_LEN). + * The amount of data written is stored to ssi->tag_insert_len. + * + * @todo: return tag_insert_len - maybe it can be removed from struct http_state? + * + * @param hs http connection state + */ +static void +get_tag_insert(struct http_state *hs) +{ +#if LWIP_HTTPD_SSI_RAW + const char *tag; +#else /* LWIP_HTTPD_SSI_RAW */ + int tag; +#endif /* LWIP_HTTPD_SSI_RAW */ + size_t len; + struct http_ssi_state *ssi; +#if LWIP_HTTPD_SSI_MULTIPART + u16_t current_tag_part; +#endif /* LWIP_HTTPD_SSI_MULTIPART */ + + LWIP_ASSERT("hs != NULL", hs != NULL); + ssi = hs->ssi; + LWIP_ASSERT("ssi != NULL", ssi != NULL); +#if LWIP_HTTPD_SSI_MULTIPART + current_tag_part = ssi->tag_part; + ssi->tag_part = HTTPD_LAST_TAG_PART; +#endif /* LWIP_HTTPD_SSI_MULTIPART */ +#if LWIP_HTTPD_SSI_RAW + tag = ssi->tag_name; +#endif + + if (httpd_ssi_handler +#if !LWIP_HTTPD_SSI_RAW + && httpd_tags && httpd_num_tags +#endif /* !LWIP_HTTPD_SSI_RAW */ + ) { + + /* Find this tag in the list we have been provided. */ +#if LWIP_HTTPD_SSI_RAW + { +#else /* LWIP_HTTPD_SSI_RAW */ + for (tag = 0; tag < httpd_num_tags; tag++) { + if (strcmp(ssi->tag_name, httpd_tags[tag]) == 0) +#endif /* LWIP_HTTPD_SSI_RAW */ + { + ssi->tag_insert_len = httpd_ssi_handler(tag, ssi->tag_insert, + LWIP_HTTPD_MAX_TAG_INSERT_LEN +#if LWIP_HTTPD_SSI_MULTIPART + , current_tag_part, &ssi->tag_part +#endif /* LWIP_HTTPD_SSI_MULTIPART */ +#if LWIP_HTTPD_FILE_STATE + , (hs->handle ? hs->handle->state : NULL) +#endif /* LWIP_HTTPD_FILE_STATE */ + ); +#if LWIP_HTTPD_SSI_RAW + if (ssi->tag_insert_len != HTTPD_SSI_TAG_UNKNOWN) +#endif /* LWIP_HTTPD_SSI_RAW */ + { + return; + } + } + } + } + + /* If we drop out, we were asked to serve a page which contains tags that + * we don't have a handler for. Merely echo back the tags with an error + * marker. */ +#define UNKNOWN_TAG1_TEXT "***UNKNOWN TAG " +#define UNKNOWN_TAG1_LEN 18 +#define UNKNOWN_TAG2_TEXT "***" +#define UNKNOWN_TAG2_LEN 7 + len = LWIP_MIN(sizeof(ssi->tag_name), LWIP_MIN(strlen(ssi->tag_name), + LWIP_HTTPD_MAX_TAG_INSERT_LEN - (UNKNOWN_TAG1_LEN + UNKNOWN_TAG2_LEN))); + MEMCPY(ssi->tag_insert, UNKNOWN_TAG1_TEXT, UNKNOWN_TAG1_LEN); + MEMCPY(&ssi->tag_insert[UNKNOWN_TAG1_LEN], ssi->tag_name, len); + MEMCPY(&ssi->tag_insert[UNKNOWN_TAG1_LEN + len], UNKNOWN_TAG2_TEXT, UNKNOWN_TAG2_LEN); + ssi->tag_insert[UNKNOWN_TAG1_LEN + len + UNKNOWN_TAG2_LEN] = 0; + + len = strlen(ssi->tag_insert); + LWIP_ASSERT("len <= 0xffff", len <= 0xffff); + ssi->tag_insert_len = (u16_t)len; +} +#endif /* LWIP_HTTPD_SSI */ + +#if LWIP_HTTPD_DYNAMIC_HEADERS +/** + * Generate the relevant HTTP headers for the given filename and write + * them into the supplied buffer. + */ +static void +get_http_headers(struct http_state *hs, const char *uri) +{ + size_t content_type; + char *tmp; + char *ext; + char *vars; + + /* In all cases, the second header we send is the server identification + so set it here. */ + hs->hdrs[HDR_STRINGS_IDX_SERVER_NAME] = g_psHTTPHeaderStrings[HTTP_HDR_SERVER]; + hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE] = NULL; + hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_NR] = NULL; + + /* Is this a normal file or the special case we use to send back the + default "404: Page not found" response? */ + if (uri == NULL) { + hs->hdrs[HDR_STRINGS_IDX_HTTP_STATUS] = g_psHTTPHeaderStrings[HTTP_HDR_NOT_FOUND]; +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + if (hs->keepalive) { + hs->hdrs[HDR_STRINGS_IDX_CONTENT_TYPE] = g_psHTTPHeaderStrings[DEFAULT_404_HTML_PERSISTENT]; + } else +#endif + { + hs->hdrs[HDR_STRINGS_IDX_CONTENT_TYPE] = g_psHTTPHeaderStrings[DEFAULT_404_HTML]; + } + + /* Set up to send the first header string. */ + hs->hdr_index = 0; + hs->hdr_pos = 0; + return; + } + /* We are dealing with a particular filename. Look for one other + special case. We assume that any filename with "404" in it must be + indicative of a 404 server error whereas all other files require + the 200 OK header. */ + if (strstr(uri, "404")) { + hs->hdrs[HDR_STRINGS_IDX_HTTP_STATUS] = g_psHTTPHeaderStrings[HTTP_HDR_NOT_FOUND]; + } else if (strstr(uri, "400")) { + hs->hdrs[HDR_STRINGS_IDX_HTTP_STATUS] = g_psHTTPHeaderStrings[HTTP_HDR_BAD_REQUEST]; + } else if (strstr(uri, "501")) { + hs->hdrs[HDR_STRINGS_IDX_HTTP_STATUS] = g_psHTTPHeaderStrings[HTTP_HDR_NOT_IMPL]; + } else { + hs->hdrs[HDR_STRINGS_IDX_HTTP_STATUS] = g_psHTTPHeaderStrings[HTTP_HDR_OK]; + } + + /* Determine if the URI has any variables and, if so, temporarily remove + them. */ + vars = strchr(uri, '?'); + if (vars) { + *vars = '\0'; + } + + /* Get a pointer to the file extension. We find this by looking for the + last occurrence of "." in the filename passed. */ + ext = NULL; + tmp = strchr(uri, '.'); + while (tmp) { + ext = tmp + 1; + tmp = strchr(ext, '.'); + } + if (ext != NULL) { + /* Now determine the content type and add the relevant header for that. */ + for (content_type = 0; content_type < NUM_HTTP_HEADERS; content_type++) { + /* Have we found a matching extension? */ + if (!lwip_stricmp(g_psHTTPHeaders[content_type].extension, ext)) { + break; + } + } + } else { + content_type = NUM_HTTP_HEADERS; + } + + /* Reinstate the parameter marker if there was one in the original URI. */ + if (vars) { + *vars = '?'; + } + +#if LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI + /* Does the URL passed have any file extension? If not, we assume it + is a special-case URL used for control state notification and we do + not send any HTTP headers with the response. */ + if (!ext) { + /* Force the header index to a value indicating that all headers + have already been sent. */ + hs->hdr_index = NUM_FILE_HDR_STRINGS; + return; + } +#endif /* LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI */ + /* Did we find a matching extension? */ + if (content_type < NUM_HTTP_HEADERS) { + /* yes, store it */ + hs->hdrs[HDR_STRINGS_IDX_CONTENT_TYPE] = g_psHTTPHeaders[content_type].content_type; + } else if (!ext) { + /* no, no extension found -> use binary transfer to prevent the browser adding '.txt' on save */ + hs->hdrs[HDR_STRINGS_IDX_CONTENT_TYPE] = HTTP_HDR_APP; + } else { + /* No - use the default, plain text file type. */ + hs->hdrs[HDR_STRINGS_IDX_CONTENT_TYPE] = HTTP_HDR_DEFAULT_TYPE; + } + /* Set up to send the first header string. */ + hs->hdr_index = 0; + hs->hdr_pos = 0; +} + +/* Add content-length header? */ +static void +get_http_content_length(struct http_state *hs) +{ + u8_t add_content_len = 0; + + LWIP_ASSERT("already been here?", hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE] == NULL); + + add_content_len = 0; +#if LWIP_HTTPD_SSI + if (hs->ssi == NULL) /* @todo: get maximum file length from SSI */ +#endif /* LWIP_HTTPD_SSI */ + { + if ((hs->handle != NULL) && (hs->handle->flags & FS_FILE_FLAGS_HEADER_PERSISTENT)) { + add_content_len = 1; + } + } + if (add_content_len) { + size_t len; + lwip_itoa(hs->hdr_content_len, (size_t)LWIP_HTTPD_MAX_CONTENT_LEN_SIZE, + hs->handle->len); + len = strlen(hs->hdr_content_len); + if (len <= LWIP_HTTPD_MAX_CONTENT_LEN_SIZE - LWIP_HTTPD_MAX_CONTENT_LEN_OFFSET) { + SMEMCPY(&hs->hdr_content_len[len], CRLF, 3); + hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_NR] = hs->hdr_content_len; + } else { + add_content_len = 0; + } + } +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + if (add_content_len) { + hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE] = g_psHTTPHeaderStrings[HTTP_HDR_KEEPALIVE_LEN]; + } else { + hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE] = g_psHTTPHeaderStrings[HTTP_HDR_CONN_CLOSE]; + hs->keepalive = 0; + } +#else /* LWIP_HTTPD_SUPPORT_11_KEEPALIVE */ + if (add_content_len) { + hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE] = g_psHTTPHeaderStrings[HTTP_HDR_CONTENT_LENGTH]; + } +#endif /* LWIP_HTTPD_SUPPORT_11_KEEPALIVE */ +} + +/** Sub-function of http_send(): send dynamic headers + * + * @returns: - HTTP_NO_DATA_TO_SEND: no new data has been enqueued + * - HTTP_DATA_TO_SEND_CONTINUE: continue with sending HTTP body + * - HTTP_DATA_TO_SEND_BREAK: data has been enqueued, headers pending, + * so don't send HTTP body yet + * - HTTP_DATA_TO_SEND_FREED: http_state and pcb are already freed + */ +static u8_t +http_send_headers(struct altcp_pcb *pcb, struct http_state *hs) +{ + err_t err; + u16_t len; + u8_t data_to_send = HTTP_NO_DATA_TO_SEND; + u16_t hdrlen, sendlen; + + if (hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE] == NULL) { + /* set up "content-length" and "connection:" headers */ + get_http_content_length(hs); + } + + /* How much data can we send? */ + len = altcp_sndbuf(pcb); + sendlen = len; + + while (len && (hs->hdr_index < NUM_FILE_HDR_STRINGS) && sendlen) { + const void *ptr; + u16_t old_sendlen; + u8_t apiflags; + /* How much do we have to send from the current header? */ + hdrlen = (u16_t)strlen(hs->hdrs[hs->hdr_index]); + + /* How much of this can we send? */ + sendlen = (len < (hdrlen - hs->hdr_pos)) ? len : (hdrlen - hs->hdr_pos); + + /* Send this amount of data or as much as we can given memory + * constraints. */ + ptr = (const void *)(hs->hdrs[hs->hdr_index] + hs->hdr_pos); + old_sendlen = sendlen; + apiflags = HTTP_IS_HDR_VOLATILE(hs, ptr); + if (hs->hdr_index == HDR_STRINGS_IDX_CONTENT_LEN_NR) { + /* content-length is always volatile */ + apiflags |= TCP_WRITE_FLAG_COPY; + } + if (hs->hdr_index < NUM_FILE_HDR_STRINGS - 1) { + apiflags |= TCP_WRITE_FLAG_MORE; + } + err = http_write(pcb, ptr, &sendlen, apiflags); + if ((err == ERR_OK) && (old_sendlen != sendlen)) { + /* Remember that we added some more data to be transmitted. */ + data_to_send = HTTP_DATA_TO_SEND_CONTINUE; + } else if (err != ERR_OK) { + /* special case: http_write does not try to send 1 byte */ + sendlen = 0; + } + + /* Fix up the header position for the next time round. */ + hs->hdr_pos += sendlen; + len -= sendlen; + + /* Have we finished sending this string? */ + if (hs->hdr_pos == hdrlen) { + /* Yes - move on to the next one */ + hs->hdr_index++; + /* skip headers that are NULL (not all headers are required) */ + while ((hs->hdr_index < NUM_FILE_HDR_STRINGS) && + (hs->hdrs[hs->hdr_index] == NULL)) { + hs->hdr_index++; + } + hs->hdr_pos = 0; + } + } + + if ((hs->hdr_index >= NUM_FILE_HDR_STRINGS) && (hs->file == NULL)) { + /* When we are at the end of the headers, check for data to send + * instead of waiting for ACK from remote side to continue + * (which would happen when sending files from async read). */ + if (http_check_eof(pcb, hs)) { + data_to_send = HTTP_DATA_TO_SEND_BREAK; + } else { + /* At this point, for non-keepalive connections, hs is deallocated an + pcb is closed. */ + return HTTP_DATA_TO_SEND_FREED; + } + } + /* If we get here and there are still header bytes to send, we send + * the header information we just wrote immediately. If there are no + * more headers to send, but we do have file data to send, drop through + * to try to send some file data too. */ + if ((hs->hdr_index < NUM_FILE_HDR_STRINGS) || !hs->file) { + LWIP_DEBUGF(HTTPD_DEBUG, ("tcp_output\n")); + return HTTP_DATA_TO_SEND_BREAK; + } + return data_to_send; +} +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ + +/** Sub-function of http_send(): end-of-file (or block) is reached, + * either close the file or read the next block (if supported). + * + * @returns: 0 if the file is finished or no data has been read + * 1 if the file is not finished and data has been read + */ +static u8_t +http_check_eof(struct altcp_pcb *pcb, struct http_state *hs) +{ + int bytes_left; +#if LWIP_HTTPD_DYNAMIC_FILE_READ + int count; +#ifdef HTTPD_MAX_WRITE_LEN + int max_write_len; +#endif /* HTTPD_MAX_WRITE_LEN */ +#endif /* LWIP_HTTPD_DYNAMIC_FILE_READ */ + + /* Do we have a valid file handle? */ + if (hs->handle == NULL) { + /* No - close the connection. */ + http_eof(pcb, hs); + return 0; + } + bytes_left = fs_bytes_left(hs->handle); + if (bytes_left <= 0) { + /* We reached the end of the file so this request is done. */ + LWIP_DEBUGF(HTTPD_DEBUG, ("End of file.\n")); + http_eof(pcb, hs); + return 0; + } +#if LWIP_HTTPD_DYNAMIC_FILE_READ + /* Do we already have a send buffer allocated? */ + if (hs->buf) { + /* Yes - get the length of the buffer */ + count = LWIP_MIN(hs->buf_len, bytes_left); + } else { + /* We don't have a send buffer so allocate one now */ + count = altcp_sndbuf(pcb); + if (bytes_left < count) { + count = bytes_left; + } +#ifdef HTTPD_MAX_WRITE_LEN + /* Additional limitation: e.g. don't enqueue more than 2*mss at once */ + max_write_len = HTTPD_MAX_WRITE_LEN(pcb); + if (count > max_write_len) { + count = max_write_len; + } +#endif /* HTTPD_MAX_WRITE_LEN */ + do { + hs->buf = (char *)mem_malloc((mem_size_t)count); + if (hs->buf != NULL) { + hs->buf_len = count; + break; + } + count = count / 2; + } while (count > 100); + + /* Did we get a send buffer? If not, return immediately. */ + if (hs->buf == NULL) { + LWIP_DEBUGF(HTTPD_DEBUG, ("No buff\n")); + return 0; + } + } + + /* Read a block of data from the file. */ + LWIP_DEBUGF(HTTPD_DEBUG, ("Trying to read %d bytes.\n", count)); + +#if LWIP_HTTPD_FS_ASYNC_READ + count = fs_read_async(hs->handle, hs->buf, count, http_continue, hs); +#else /* LWIP_HTTPD_FS_ASYNC_READ */ + count = fs_read(hs->handle, hs->buf, count); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + if (count < 0) { + if (count == FS_READ_DELAYED) { + /* Delayed read, wait for FS to unblock us */ + return 0; + } + /* We reached the end of the file so this request is done. + * @todo: close here for HTTP/1.1 when reading file fails */ + LWIP_DEBUGF(HTTPD_DEBUG, ("End of file.\n")); + http_eof(pcb, hs); + return 0; + } + + /* Set up to send the block of data we just read */ + LWIP_DEBUGF(HTTPD_DEBUG, ("Read %d bytes.\n", count)); + hs->left = count; + hs->file = hs->buf; +#if LWIP_HTTPD_SSI + if (hs->ssi) { + hs->ssi->parse_left = count; + hs->ssi->parsed = hs->buf; + } +#endif /* LWIP_HTTPD_SSI */ +#else /* LWIP_HTTPD_DYNAMIC_FILE_READ */ + LWIP_ASSERT("SSI and DYNAMIC_HEADERS turned off but eof not reached", 0); +#endif /* LWIP_HTTPD_SSI || LWIP_HTTPD_DYNAMIC_HEADERS */ + return 1; +} + +/** Sub-function of http_send(): This is the normal send-routine for non-ssi files + * + * @returns: - 1: data has been written (so call tcp_ouput) + * - 0: no data has been written (no need to call tcp_output) + */ +static u8_t +http_send_data_nonssi(struct altcp_pcb *pcb, struct http_state *hs) +{ + err_t err; + u16_t len; + u8_t data_to_send = 0; + + /* We are not processing an SHTML file so no tag checking is necessary. + * Just send the data as we received it from the file. */ + len = (u16_t)LWIP_MIN(hs->left, 0xffff); + + err = http_write(pcb, hs->file, &len, HTTP_IS_DATA_VOLATILE(hs)); + if (err == ERR_OK) { + data_to_send = 1; + hs->file += len; + hs->left -= len; + } + + return data_to_send; +} + +#if LWIP_HTTPD_SSI +/** Sub-function of http_send(): This is the send-routine for ssi files + * + * @returns: - 1: data has been written (so call tcp_ouput) + * - 0: no data has been written (no need to call tcp_output) + */ +static u8_t +http_send_data_ssi(struct altcp_pcb *pcb, struct http_state *hs) +{ + err_t err = ERR_OK; + u16_t len; + u8_t data_to_send = 0; + u8_t tag_type; + + struct http_ssi_state *ssi = hs->ssi; + LWIP_ASSERT("ssi != NULL", ssi != NULL); + /* We are processing an SHTML file so need to scan for tags and replace + * them with insert strings. We need to be careful here since a tag may + * straddle the boundary of two blocks read from the file and we may also + * have to split the insert string between two tcp_write operations. */ + + /* How much data could we send? */ + len = altcp_sndbuf(pcb); + + /* Do we have remaining data to send before parsing more? */ + if (ssi->parsed > hs->file) { + len = (u16_t)LWIP_MIN(ssi->parsed - hs->file, 0xffff); + + err = http_write(pcb, hs->file, &len, HTTP_IS_DATA_VOLATILE(hs)); + if (err == ERR_OK) { + data_to_send = 1; + hs->file += len; + hs->left -= len; + } + + /* If the send buffer is full, return now. */ + if (altcp_sndbuf(pcb) == 0) { + return data_to_send; + } + } + + LWIP_DEBUGF(HTTPD_DEBUG, ("State %d, %d left\n", ssi->tag_state, (int)ssi->parse_left)); + + /* We have sent all the data that was already parsed so continue parsing + * the buffer contents looking for SSI tags. */ + while (((ssi->tag_state == TAG_SENDING) || ssi->parse_left) && (err == ERR_OK)) { + if (len == 0) { + return data_to_send; + } + switch (ssi->tag_state) { + case TAG_NONE: + /* We are not currently processing an SSI tag so scan for the + * start of the lead-in marker. */ + for (tag_type = 0; tag_type < LWIP_ARRAYSIZE(http_ssi_tag_desc); tag_type++) { + if (*ssi->parsed == http_ssi_tag_desc[tag_type].lead_in[0]) { + /* We found what could be the lead-in for a new tag so change + * state appropriately. */ + ssi->tag_type = tag_type; + ssi->tag_state = TAG_LEADIN; + ssi->tag_index = 1; + #if !LWIP_HTTPD_SSI_INCLUDE_TAG + ssi->tag_started = ssi->parsed; + #endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG */ + break; + } + } + + /* Move on to the next character in the buffer */ + ssi->parse_left--; + ssi->parsed++; + break; + + case TAG_LEADIN: + /* We are processing the lead-in marker, looking for the start of + * the tag name. */ + + /* Have we reached the end of the leadin? */ + if (http_ssi_tag_desc[ssi->tag_type].lead_in[ssi->tag_index] == 0) { + ssi->tag_index = 0; + ssi->tag_state = TAG_FOUND; + } else { + /* Have we found the next character we expect for the tag leadin? */ + if (*ssi->parsed == http_ssi_tag_desc[ssi->tag_type].lead_in[ssi->tag_index]) { + /* Yes - move to the next one unless we have found the complete + * leadin, in which case we start looking for the tag itself */ + ssi->tag_index++; + } else { + /* We found an unexpected character so this is not a tag. Move + * back to idle state. */ + ssi->tag_state = TAG_NONE; + } + + /* Move on to the next character in the buffer */ + ssi->parse_left--; + ssi->parsed++; + } + break; + + case TAG_FOUND: + /* We are reading the tag name, looking for the start of the + * lead-out marker and removing any whitespace found. */ + + /* Remove leading whitespace between the tag leading and the first + * tag name character. */ + if ((ssi->tag_index == 0) && ((*ssi->parsed == ' ') || + (*ssi->parsed == '\t') || (*ssi->parsed == '\n') || + (*ssi->parsed == '\r'))) { + /* Move on to the next character in the buffer */ + ssi->parse_left--; + ssi->parsed++; + break; + } + + /* Have we found the end of the tag name? This is signalled by + * us finding the first leadout character or whitespace */ + if ((*ssi->parsed == http_ssi_tag_desc[ssi->tag_type].lead_out[0]) || + (*ssi->parsed == ' ') || (*ssi->parsed == '\t') || + (*ssi->parsed == '\n') || (*ssi->parsed == '\r')) { + + if (ssi->tag_index == 0) { + /* We read a zero length tag so ignore it. */ + ssi->tag_state = TAG_NONE; + } else { + /* We read a non-empty tag so go ahead and look for the + * leadout string. */ + ssi->tag_state = TAG_LEADOUT; + LWIP_ASSERT("ssi->tag_index <= 0xff", ssi->tag_index <= 0xff); + ssi->tag_name_len = (u8_t)ssi->tag_index; + ssi->tag_name[ssi->tag_index] = '\0'; + if (*ssi->parsed == http_ssi_tag_desc[ssi->tag_type].lead_out[0]) { + ssi->tag_index = 1; + } else { + ssi->tag_index = 0; + } + } + } else { + /* This character is part of the tag name so save it */ + if (ssi->tag_index < LWIP_HTTPD_MAX_TAG_NAME_LEN) { + ssi->tag_name[ssi->tag_index++] = *ssi->parsed; + } else { + /* The tag was too long so ignore it. */ + ssi->tag_state = TAG_NONE; + } + } + + /* Move on to the next character in the buffer */ + ssi->parse_left--; + ssi->parsed++; + + break; + + /* We are looking for the end of the lead-out marker. */ + case TAG_LEADOUT: + /* Remove leading whitespace between the tag leading and the first + * tag leadout character. */ + if ((ssi->tag_index == 0) && ((*ssi->parsed == ' ') || + (*ssi->parsed == '\t') || (*ssi->parsed == '\n') || + (*ssi->parsed == '\r'))) { + /* Move on to the next character in the buffer */ + ssi->parse_left--; + ssi->parsed++; + break; + } + + /* Have we found the next character we expect for the tag leadout? */ + if (*ssi->parsed == http_ssi_tag_desc[ssi->tag_type].lead_out[ssi->tag_index]) { + /* Yes - move to the next one unless we have found the complete + * leadout, in which case we need to call the client to process + * the tag. */ + + /* Move on to the next character in the buffer */ + ssi->parse_left--; + ssi->parsed++; + ssi->tag_index++; + + if (http_ssi_tag_desc[ssi->tag_type].lead_out[ssi->tag_index] == 0) { + /* Call the client to ask for the insert string for the + * tag we just found. */ +#if LWIP_HTTPD_SSI_MULTIPART + ssi->tag_part = 0; /* start with tag part 0 */ +#endif /* LWIP_HTTPD_SSI_MULTIPART */ + get_tag_insert(hs); + + /* Next time through, we are going to be sending data + * immediately, either the end of the block we start + * sending here or the insert string. */ + ssi->tag_index = 0; + ssi->tag_state = TAG_SENDING; + ssi->tag_end = ssi->parsed; +#if !LWIP_HTTPD_SSI_INCLUDE_TAG + ssi->parsed = ssi->tag_started; +#endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG*/ + + /* If there is any unsent data in the buffer prior to the + * tag, we need to send it now. */ + if (ssi->tag_end > hs->file) { + /* How much of the data can we send? */ +#if LWIP_HTTPD_SSI_INCLUDE_TAG + len = (u16_t)LWIP_MIN(ssi->tag_end - hs->file, 0xffff); +#else /* LWIP_HTTPD_SSI_INCLUDE_TAG*/ + /* we would include the tag in sending */ + len = (u16_t)LWIP_MIN(ssi->tag_started - hs->file, 0xffff); +#endif /* LWIP_HTTPD_SSI_INCLUDE_TAG*/ + + err = http_write(pcb, hs->file, &len, HTTP_IS_DATA_VOLATILE(hs)); + if (err == ERR_OK) { + data_to_send = 1; +#if !LWIP_HTTPD_SSI_INCLUDE_TAG + if (ssi->tag_started <= hs->file) { + /* pretend to have sent the tag, too */ + len += (u16_t)(ssi->tag_end - ssi->tag_started); + } +#endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG*/ + hs->file += len; + hs->left -= len; + } + } + } + } else { + /* We found an unexpected character so this is not a tag. Move + * back to idle state. */ + ssi->parse_left--; + ssi->parsed++; + ssi->tag_state = TAG_NONE; + } + break; + + /* + * We have found a valid tag and are in the process of sending + * data as a result of that discovery. We send either remaining data + * from the file prior to the insert point or the insert string itself. + */ + case TAG_SENDING: + /* Do we have any remaining file data to send from the buffer prior + * to the tag? */ + if (ssi->tag_end > hs->file) { + /* How much of the data can we send? */ +#if LWIP_HTTPD_SSI_INCLUDE_TAG + len = (u16_t)LWIP_MIN(ssi->tag_end - hs->file, 0xffff); +#else /* LWIP_HTTPD_SSI_INCLUDE_TAG*/ + LWIP_ASSERT("hs->started >= hs->file", ssi->tag_started >= hs->file); + /* we would include the tag in sending */ + len = (u16_t)LWIP_MIN(ssi->tag_started - hs->file, 0xffff); +#endif /* LWIP_HTTPD_SSI_INCLUDE_TAG*/ + if (len != 0) { + err = http_write(pcb, hs->file, &len, HTTP_IS_DATA_VOLATILE(hs)); + } else { + err = ERR_OK; + } + if (err == ERR_OK) { + data_to_send = 1; +#if !LWIP_HTTPD_SSI_INCLUDE_TAG + if (ssi->tag_started <= hs->file) { + /* pretend to have sent the tag, too */ + len += (u16_t)(ssi->tag_end - ssi->tag_started); + } +#endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG*/ + hs->file += len; + hs->left -= len; + } + } else { +#if LWIP_HTTPD_SSI_MULTIPART + if (ssi->tag_index >= ssi->tag_insert_len) { + /* Did the last SSIHandler have more to send? */ + if (ssi->tag_part != HTTPD_LAST_TAG_PART) { + /* If so, call it again */ + ssi->tag_index = 0; + get_tag_insert(hs); + } + } +#endif /* LWIP_HTTPD_SSI_MULTIPART */ + + /* Do we still have insert data left to send? */ + if (ssi->tag_index < ssi->tag_insert_len) { + /* We are sending the insert string itself. How much of the + * insert can we send? */ + len = (ssi->tag_insert_len - ssi->tag_index); + + /* Note that we set the copy flag here since we only have a + * single tag insert buffer per connection. If we don't do + * this, insert corruption can occur if more than one insert + * is processed before we call tcp_output. */ + err = http_write(pcb, &(ssi->tag_insert[ssi->tag_index]), &len, + HTTP_IS_TAG_VOLATILE(hs)); + if (err == ERR_OK) { + data_to_send = 1; + ssi->tag_index += len; + /* Don't return here: keep on sending data */ + } + } else { +#if LWIP_HTTPD_SSI_MULTIPART + if (ssi->tag_part == HTTPD_LAST_TAG_PART) +#endif /* LWIP_HTTPD_SSI_MULTIPART */ + { + /* We have sent all the insert data so go back to looking for + * a new tag. */ + LWIP_DEBUGF(HTTPD_DEBUG, ("Everything sent.\n")); + ssi->tag_index = 0; + ssi->tag_state = TAG_NONE; +#if !LWIP_HTTPD_SSI_INCLUDE_TAG + ssi->parsed = ssi->tag_end; +#endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG*/ + } + } + break; + default: + break; + } + } + } + + /* If we drop out of the end of the for loop, this implies we must have + * file data to send so send it now. In TAG_SENDING state, we've already + * handled this so skip the send if that's the case. */ + if ((ssi->tag_state != TAG_SENDING) && (ssi->parsed > hs->file)) { +#if LWIP_HTTPD_DYNAMIC_FILE_READ && !LWIP_HTTPD_SSI_INCLUDE_TAG + if ((ssi->tag_state != TAG_NONE) && (ssi->tag_started > ssi->tag_end)) { + /* If we found tag on the edge of the read buffer: just throw away the first part + (we have copied/saved everything required for parsing on later). */ + len = (u16_t)(ssi->tag_started - hs->file); + hs->left -= (ssi->parsed - ssi->tag_started); + ssi->parsed = ssi->tag_started; + ssi->tag_started = hs->buf; + } else +#endif /* LWIP_HTTPD_DYNAMIC_FILE_READ && !LWIP_HTTPD_SSI_INCLUDE_TAG */ + { + len = (u16_t)LWIP_MIN(ssi->parsed - hs->file, 0xffff); + } + + err = http_write(pcb, hs->file, &len, HTTP_IS_DATA_VOLATILE(hs)); + if (err == ERR_OK) { + data_to_send = 1; + hs->file += len; + hs->left -= len; + } + } + return data_to_send; +} +#endif /* LWIP_HTTPD_SSI */ + +/** + * Try to send more data on this pcb. + * + * @param pcb the pcb to send data + * @param hs connection state + */ +static u8_t +http_send(struct altcp_pcb *pcb, struct http_state *hs) +{ + u8_t data_to_send = HTTP_NO_DATA_TO_SEND; + + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_send: pcb=%p hs=%p left=%d\n", (void *)pcb, + (void *)hs, hs != NULL ? (int)hs->left : 0)); + +#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND + if (hs->unrecved_bytes != 0) { + return 0; + } +#endif /* LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND */ + + /* If we were passed a NULL state structure pointer, ignore the call. */ + if (hs == NULL) { + return 0; + } + +#if LWIP_HTTPD_FS_ASYNC_READ + /* Check if we are allowed to read from this file. + (e.g. SSI might want to delay sending until data is available) */ + if (!fs_is_file_ready(hs->handle, http_continue, hs)) { + return 0; + } +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + +#if LWIP_HTTPD_DYNAMIC_HEADERS + /* Do we have any more header data to send for this file? */ + if (hs->hdr_index < NUM_FILE_HDR_STRINGS) { + data_to_send = http_send_headers(pcb, hs); + if ((data_to_send == HTTP_DATA_TO_SEND_FREED) || + ((data_to_send != HTTP_DATA_TO_SEND_CONTINUE) && + (hs->hdr_index < NUM_FILE_HDR_STRINGS))) { + return data_to_send; + } + } +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ + + /* Have we run out of file data to send? If so, we need to read the next + * block from the file. */ + if (hs->left == 0) { + if (!http_check_eof(pcb, hs)) { + return 0; + } + } + +#if LWIP_HTTPD_SSI + if (hs->ssi) { + data_to_send = http_send_data_ssi(pcb, hs); + } else +#endif /* LWIP_HTTPD_SSI */ + { + data_to_send = http_send_data_nonssi(pcb, hs); + } + + if ((hs->left == 0) && (fs_bytes_left(hs->handle) <= 0)) { + /* We reached the end of the file so this request is done. + * This adds the FIN flag right into the last data segment. */ + LWIP_DEBUGF(HTTPD_DEBUG, ("End of file.\n")); + http_eof(pcb, hs); + return 0; + } + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("send_data end.\n")); + return data_to_send; +} + +#if LWIP_HTTPD_SUPPORT_EXTSTATUS +/** Initialize a http connection with a file to send for an error message + * + * @param hs http connection state + * @param error_nr HTTP error number + * @return ERR_OK if file was found and hs has been initialized correctly + * another err_t otherwise + */ +static err_t +http_find_error_file(struct http_state *hs, u16_t error_nr) +{ + const char *uri, *uri1, *uri2, *uri3; + + if (error_nr == 501) { + uri1 = "/501.html"; + uri2 = "/501.htm"; + uri3 = "/501.shtml"; + } else { + /* 400 (bad request is the default) */ + uri1 = "/400.html"; + uri2 = "/400.htm"; + uri3 = "/400.shtml"; + } + if (fs_open(&hs->file_handle, uri1) == ERR_OK) { + uri = uri1; + } else if (fs_open(&hs->file_handle, uri2) == ERR_OK) { + uri = uri2; + } else if (fs_open(&hs->file_handle, uri3) == ERR_OK) { + uri = uri3; + } else { + LWIP_DEBUGF(HTTPD_DEBUG, ("Error page for error %"U16_F" not found\n", + error_nr)); + return ERR_ARG; + } + return http_init_file(hs, &hs->file_handle, 0, uri, 0, NULL); +} +#else /* LWIP_HTTPD_SUPPORT_EXTSTATUS */ +#define http_find_error_file(hs, error_nr) ERR_ARG +#endif /* LWIP_HTTPD_SUPPORT_EXTSTATUS */ + +/** + * Get the file struct for a 404 error page. + * Tries some file names and returns NULL if none found. + * + * @param uri pointer that receives the actual file name URI + * @return file struct for the error page or NULL no matching file was found + */ +static struct fs_file * +http_get_404_file(struct http_state *hs, const char **uri) +{ + err_t err; + + *uri = "/404.html"; + err = fs_open(&hs->file_handle, *uri); + if (err != ERR_OK) { + /* 404.html doesn't exist. Try 404.htm instead. */ + *uri = "/404.htm"; + err = fs_open(&hs->file_handle, *uri); + if (err != ERR_OK) { + /* 404.htm doesn't exist either. Try 404.shtml instead. */ + *uri = "/404.shtml"; + err = fs_open(&hs->file_handle, *uri); + if (err != ERR_OK) { + /* 404.htm doesn't exist either. Indicate to the caller that it should + * send back a default 404 page. + */ + *uri = NULL; + return NULL; + } + } + } + + return &hs->file_handle; +} + +#if LWIP_HTTPD_SUPPORT_POST +static err_t +http_handle_post_finished(struct http_state *hs) +{ +#if LWIP_HTTPD_POST_MANUAL_WND + /* Prevent multiple calls to httpd_post_finished, since it might have already + been called before from httpd_post_data_recved(). */ + if (hs->post_finished) { + return ERR_OK; + } + hs->post_finished = 1; +#endif /* LWIP_HTTPD_POST_MANUAL_WND */ + /* application error or POST finished */ + /* NULL-terminate the buffer */ + http_uri_buf[0] = 0; + httpd_post_finished(hs, http_uri_buf, LWIP_HTTPD_URI_BUF_LEN); + return http_find_file(hs, http_uri_buf, 0); +} + +/** Pass received POST body data to the application and correctly handle + * returning a response document or closing the connection. + * ATTENTION: The application is responsible for the pbuf now, so don't free it! + * + * @param hs http connection state + * @param p pbuf to pass to the application + * @return ERR_OK if passed successfully, another err_t if the response file + * hasn't been found (after POST finished) + */ +static err_t +http_post_rxpbuf(struct http_state *hs, struct pbuf *p) +{ + err_t err; + + if (p != NULL) { + /* adjust remaining Content-Length */ + if (hs->post_content_len_left < p->tot_len) { + hs->post_content_len_left = 0; + } else { + hs->post_content_len_left -= p->tot_len; + } + } +#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND + /* prevent connection being closed if httpd_post_data_recved() is called nested */ + hs->unrecved_bytes++; +#endif + if (p != NULL) { + err = httpd_post_receive_data(hs, p); + } else { + err = ERR_OK; + } +#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND + hs->unrecved_bytes--; +#endif + if (err != ERR_OK) { + /* Ignore remaining content in case of application error */ + hs->post_content_len_left = 0; + } + if (hs->post_content_len_left == 0) { +#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND + if (hs->unrecved_bytes != 0) { + return ERR_OK; + } +#endif /* LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND */ + /* application error or POST finished */ + return http_handle_post_finished(hs); + } + + return ERR_OK; +} + +/** Handle a post request. Called from http_parse_request when method 'POST' + * is found. + * + * @param p The input pbuf (containing the POST header and body). + * @param hs The http connection state. + * @param data HTTP request (header and part of body) from input pbuf(s). + * @param data_len Size of 'data'. + * @param uri The HTTP URI parsed from input pbuf(s). + * @param uri_end Pointer to the end of 'uri' (here, the rest of the HTTP + * header starts). + * @return ERR_OK: POST correctly parsed and accepted by the application. + * ERR_INPROGRESS: POST not completely parsed (no error yet) + * another err_t: Error parsing POST or denied by the application + */ +static err_t +http_post_request(struct pbuf *inp, struct http_state *hs, + char *data, u16_t data_len, char *uri, char *uri_end) +{ + err_t err; + /* search for end-of-header (first double-CRLF) */ + char *crlfcrlf = lwip_strnstr(uri_end + 1, CRLF CRLF, data_len - (uri_end + 1 - data)); + + if (crlfcrlf != NULL) { + /* search for "Content-Length: " */ +#define HTTP_HDR_CONTENT_LEN "Content-Length: " +#define HTTP_HDR_CONTENT_LEN_LEN 16 +#define HTTP_HDR_CONTENT_LEN_DIGIT_MAX_LEN 10 + char *scontent_len = lwip_strnstr(uri_end + 1, HTTP_HDR_CONTENT_LEN, crlfcrlf - (uri_end + 1)); + if (scontent_len != NULL) { + char *scontent_len_end = lwip_strnstr(scontent_len + HTTP_HDR_CONTENT_LEN_LEN, CRLF, HTTP_HDR_CONTENT_LEN_DIGIT_MAX_LEN); + if (scontent_len_end != NULL) { + int content_len; + char *content_len_num = scontent_len + HTTP_HDR_CONTENT_LEN_LEN; + content_len = atoi(content_len_num); + if (content_len == 0) { + /* if atoi returns 0 on error, fix this */ + if ((content_len_num[0] != '0') || (content_len_num[1] != '\r')) { + content_len = -1; + } + } + if (content_len >= 0) { + /* adjust length of HTTP header passed to application */ + const char *hdr_start_after_uri = uri_end + 1; + u16_t hdr_len = (u16_t)LWIP_MIN(data_len, crlfcrlf + 4 - data); + u16_t hdr_data_len = (u16_t)LWIP_MIN(data_len, crlfcrlf + 4 - hdr_start_after_uri); + u8_t post_auto_wnd = 1; + http_uri_buf[0] = 0; + /* trim http header */ + *crlfcrlf = 0; + err = httpd_post_begin(hs, uri, hdr_start_after_uri, hdr_data_len, content_len, + http_uri_buf, LWIP_HTTPD_URI_BUF_LEN, &post_auto_wnd); + if (err == ERR_OK) { + /* try to pass in data of the first pbuf(s) */ + struct pbuf *q = inp; + u16_t start_offset = hdr_len; +#if LWIP_HTTPD_POST_MANUAL_WND + hs->no_auto_wnd = !post_auto_wnd; +#endif /* LWIP_HTTPD_POST_MANUAL_WND */ + /* set the Content-Length to be received for this POST */ + hs->post_content_len_left = (u32_t)content_len; + + /* get to the pbuf where the body starts */ + while ((q != NULL) && (q->len <= start_offset)) { + start_offset -= q->len; + q = q->next; + } + if (q != NULL) { + /* hide the remaining HTTP header */ + pbuf_remove_header(q, start_offset); +#if LWIP_HTTPD_POST_MANUAL_WND + if (!post_auto_wnd) { + /* already tcp_recved() this data... */ + hs->unrecved_bytes = q->tot_len; + } +#endif /* LWIP_HTTPD_POST_MANUAL_WND */ + pbuf_ref(q); + return http_post_rxpbuf(hs, q); + } else if (hs->post_content_len_left == 0) { + q = pbuf_alloc(PBUF_RAW, 0, PBUF_REF); + return http_post_rxpbuf(hs, q); + } else { + return ERR_OK; + } + } else { + /* return file passed from application */ + return http_find_file(hs, http_uri_buf, 0); + } + } else { + LWIP_DEBUGF(HTTPD_DEBUG, ("POST received invalid Content-Length: %s\n", + content_len_num)); + return ERR_ARG; + } + } + } + /* If we come here, headers are fully received (double-crlf), but Content-Length + was not included. Since this is currently the only supported method, we have + to fail in this case! */ + LWIP_DEBUGF(HTTPD_DEBUG, ("Error when parsing Content-Length\n")); + return ERR_ARG; + } + /* if we come here, the POST is incomplete */ +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + return ERR_INPROGRESS; +#else /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + return ERR_ARG; +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ +} + +#if LWIP_HTTPD_POST_MANUAL_WND +/** + * @ingroup httpd + * A POST implementation can call this function to update the TCP window. + * This can be used to throttle data reception (e.g. when received data is + * programmed to flash and data is received faster than programmed). + * + * @param connection A connection handle passed to httpd_post_begin for which + * httpd_post_finished has *NOT* been called yet! + * @param recved_len Length of data received (for window update) + */ +void httpd_post_data_recved(void *connection, u16_t recved_len) +{ + struct http_state *hs = (struct http_state *)connection; + if (hs != NULL) { + if (hs->no_auto_wnd) { + u16_t len = recved_len; + if (hs->unrecved_bytes >= recved_len) { + hs->unrecved_bytes -= recved_len; + } else { + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_LEVEL_WARNING, ("httpd_post_data_recved: recved_len too big\n")); + len = (u16_t)hs->unrecved_bytes; + hs->unrecved_bytes = 0; + } + if (hs->pcb != NULL) { + if (len != 0) { + altcp_recved(hs->pcb, len); + } + if ((hs->post_content_len_left == 0) && (hs->unrecved_bytes == 0)) { + /* finished handling POST */ + http_handle_post_finished(hs); + http_send(hs->pcb, hs); + } + } + } + } +} +#endif /* LWIP_HTTPD_POST_MANUAL_WND */ + +#endif /* LWIP_HTTPD_SUPPORT_POST */ + +#if LWIP_HTTPD_FS_ASYNC_READ +/** Try to send more data if file has been blocked before + * This is a callback function passed to fs_read_async(). + */ +static void +http_continue(void *connection) +{ + struct http_state *hs = (struct http_state *)connection; + LWIP_ASSERT_CORE_LOCKED(); + if (hs && (hs->pcb) && (hs->handle)) { + LWIP_ASSERT("hs->pcb != NULL", hs->pcb != NULL); + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("httpd_continue: try to send more data\n")); + if (http_send(hs->pcb, hs)) { + /* If we wrote anything to be sent, go ahead and send it now. */ + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("tcp_output\n")); + altcp_output(hs->pcb); + } + } +} +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + +/** + * When data has been received in the correct state, try to parse it + * as a HTTP request. + * + * @param inp the received pbuf + * @param hs the connection state + * @param pcb the altcp_pcb which received this packet + * @return ERR_OK if request was OK and hs has been initialized correctly + * ERR_INPROGRESS if request was OK so far but not fully received + * another err_t otherwise + */ +static err_t +http_parse_request(struct pbuf *inp, struct http_state *hs, struct altcp_pcb *pcb) +{ + char *data; + char *crlf; + u16_t data_len; + struct pbuf *p = inp; +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + u16_t clen; +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ +#if LWIP_HTTPD_SUPPORT_POST + err_t err; +#endif /* LWIP_HTTPD_SUPPORT_POST */ + + LWIP_UNUSED_ARG(pcb); /* only used for post */ + LWIP_ASSERT("p != NULL", p != NULL); + LWIP_ASSERT("hs != NULL", hs != NULL); + + if ((hs->handle != NULL) || (hs->file != NULL)) { + LWIP_DEBUGF(HTTPD_DEBUG, ("Received data while sending a file\n")); + /* already sending a file */ + /* @todo: abort? */ + return ERR_USE; + } + +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + + LWIP_DEBUGF(HTTPD_DEBUG, ("Received %"U16_F" bytes\n", p->tot_len)); + + /* first check allowed characters in this pbuf? */ + + /* enqueue the pbuf */ + if (hs->req == NULL) { + LWIP_DEBUGF(HTTPD_DEBUG, ("First pbuf\n")); + hs->req = p; + } else { + LWIP_DEBUGF(HTTPD_DEBUG, ("pbuf enqueued\n")); + pbuf_cat(hs->req, p); + } + /* increase pbuf ref counter as it is freed when we return but we want to + keep it on the req list */ + pbuf_ref(p); + + if (hs->req->next != NULL) { + data_len = LWIP_MIN(hs->req->tot_len, LWIP_HTTPD_MAX_REQ_LENGTH); + pbuf_copy_partial(hs->req, httpd_req_buf, data_len, 0); + data = httpd_req_buf; + } else +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + { + data = (char *)p->payload; + data_len = p->len; + if (p->len != p->tot_len) { + LWIP_DEBUGF(HTTPD_DEBUG, ("Warning: incomplete header due to chained pbufs\n")); + } + } + + /* received enough data for minimal request? */ + if (data_len >= MIN_REQ_LEN) { + /* wait for CRLF before parsing anything */ + crlf = lwip_strnstr(data, CRLF, data_len); + if (crlf != NULL) { +#if LWIP_HTTPD_SUPPORT_POST + int is_post = 0; +#endif /* LWIP_HTTPD_SUPPORT_POST */ + int is_09 = 0; + char *sp1, *sp2; + u16_t left_len, uri_len; + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("CRLF received, parsing request\n")); + /* parse method */ + if (!strncmp(data, "GET ", 4)) { + sp1 = data + 3; + /* received GET request */ + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Received GET request\"\n")); +#if LWIP_HTTPD_SUPPORT_POST + } else if (!strncmp(data, "POST ", 5)) { + /* store request type */ + is_post = 1; + sp1 = data + 4; + /* received GET request */ + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Received POST request\n")); +#endif /* LWIP_HTTPD_SUPPORT_POST */ + } else { + /* null-terminate the METHOD (pbuf is freed anyway wen returning) */ + data[4] = 0; + /* unsupported method! */ + LWIP_DEBUGF(HTTPD_DEBUG, ("Unsupported request method (not implemented): \"%s\"\n", + data)); + return http_find_error_file(hs, 501); + } + /* if we come here, method is OK, parse URI */ + left_len = (u16_t)(data_len - ((sp1 + 1) - data)); + sp2 = lwip_strnstr(sp1 + 1, " ", left_len); +#if LWIP_HTTPD_SUPPORT_V09 + if (sp2 == NULL) { + /* HTTP 0.9: respond with correct protocol version */ + sp2 = lwip_strnstr(sp1 + 1, CRLF, left_len); + is_09 = 1; +#if LWIP_HTTPD_SUPPORT_POST + if (is_post) { + /* HTTP/0.9 does not support POST */ + goto badrequest; + } +#endif /* LWIP_HTTPD_SUPPORT_POST */ + } +#endif /* LWIP_HTTPD_SUPPORT_V09 */ + uri_len = (u16_t)(sp2 - (sp1 + 1)); + if ((sp2 != 0) && (sp2 > sp1)) { + /* wait for CRLFCRLF (indicating end of HTTP headers) before parsing anything */ + if (lwip_strnstr(data, CRLF CRLF, data_len) != NULL) { + char *uri = sp1 + 1; +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + /* This is HTTP/1.0 compatible: for strict 1.1, a connection + would always be persistent unless "close" was specified. */ + if (!is_09 && (lwip_strnstr(data, HTTP11_CONNECTIONKEEPALIVE, data_len) || + lwip_strnstr(data, HTTP11_CONNECTIONKEEPALIVE2, data_len))) { + hs->keepalive = 1; + } else { + hs->keepalive = 0; + } +#endif /* LWIP_HTTPD_SUPPORT_11_KEEPALIVE */ + /* null-terminate the METHOD (pbuf is freed anyway wen returning) */ + *sp1 = 0; + uri[uri_len] = 0; + LWIP_DEBUGF(HTTPD_DEBUG, ("Received \"%s\" request for URI: \"%s\"\n", + data, uri)); +#if LWIP_HTTPD_SUPPORT_POST + if (is_post) { +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + struct pbuf *q = hs->req; +#else /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + struct pbuf *q = inp; +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + err = http_post_request(q, hs, data, data_len, uri, sp2); + if (err != ERR_OK) { + /* restore header for next try */ + *sp1 = ' '; + *sp2 = ' '; + uri[uri_len] = ' '; + } + if (err == ERR_ARG) { + goto badrequest; + } + return err; + } else +#endif /* LWIP_HTTPD_SUPPORT_POST */ + { + return http_find_file(hs, uri, is_09); + } + } + } else { + LWIP_DEBUGF(HTTPD_DEBUG, ("invalid URI\n")); + } + } + } + +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + clen = pbuf_clen(hs->req); + if ((hs->req->tot_len <= LWIP_HTTPD_REQ_BUFSIZE) && + (clen <= LWIP_HTTPD_REQ_QUEUELEN)) { + /* request not fully received (too short or CRLF is missing) */ + return ERR_INPROGRESS; + } else +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + { +#if LWIP_HTTPD_SUPPORT_POST +badrequest: +#endif /* LWIP_HTTPD_SUPPORT_POST */ + LWIP_DEBUGF(HTTPD_DEBUG, ("bad request\n")); + /* could not parse request */ + return http_find_error_file(hs, 400); + } +} + +#if LWIP_HTTPD_SSI && (LWIP_HTTPD_SSI_BY_FILE_EXTENSION == 1) +/* Check if SSI should be parsed for this file/URL + * (With LWIP_HTTPD_SSI_BY_FILE_EXTENSION == 2, this function can be + * overridden by an external implementation.) + * + * @return 1 for SSI, 0 for standard files + */ +static u8_t +http_uri_is_ssi(struct fs_file *file, const char *uri) +{ + size_t loop; + u8_t tag_check = 0; + if (file != NULL) { + /* See if we have been asked for an shtml file and, if so, + enable tag checking. */ + const char *ext = NULL, *sub; + char *param = (char *)strstr(uri, "?"); + if (param != NULL) { + /* separate uri from parameters for now, set back later */ + *param = 0; + } + sub = uri; + ext = uri; + for (sub = strstr(sub, "."); sub != NULL; sub = strstr(sub, ".")) { + ext = sub; + sub++; + } + for (loop = 0; loop < NUM_SHTML_EXTENSIONS; loop++) { + if (!lwip_stricmp(ext, g_pcSSIExtensions[loop])) { + tag_check = 1; + break; + } + } + if (param != NULL) { + *param = '?'; + } + } + return tag_check; +} +#endif /* LWIP_HTTPD_SSI */ + +/** Try to find the file specified by uri and, if found, initialize hs + * accordingly. + * + * @param hs the connection state + * @param uri the HTTP header URI + * @param is_09 1 if the request is HTTP/0.9 (no HTTP headers in response) + * @return ERR_OK if file was found and hs has been initialized correctly + * another err_t otherwise + */ +static err_t +http_find_file(struct http_state *hs, const char *uri, int is_09) +{ + size_t loop; + struct fs_file *file = NULL; + char *params = NULL; + err_t err; +#if LWIP_HTTPD_CGI + int i; +#endif /* LWIP_HTTPD_CGI */ +#if !LWIP_HTTPD_SSI + const +#endif /* !LWIP_HTTPD_SSI */ + /* By default, assume we will not be processing server-side-includes tags */ + u8_t tag_check = 0; + + /* Have we been asked for the default file (in root or a directory) ? */ +#if LWIP_HTTPD_MAX_REQUEST_URI_LEN + size_t uri_len = strlen(uri); + if ((uri_len > 0) && (uri[uri_len - 1] == '/') && + ((uri != http_uri_buf) || (uri_len == 1))) { + size_t copy_len = LWIP_MIN(sizeof(http_uri_buf) - 1, uri_len - 1); + if (copy_len > 0) { + MEMCPY(http_uri_buf, uri, copy_len); + http_uri_buf[copy_len] = 0; + } +#else /* LWIP_HTTPD_MAX_REQUEST_URI_LEN */ + if ((uri[0] == '/') && (uri[1] == 0)) { +#endif /* LWIP_HTTPD_MAX_REQUEST_URI_LEN */ + /* Try each of the configured default filenames until we find one + that exists. */ + for (loop = 0; loop < NUM_DEFAULT_FILENAMES; loop++) { + const char *file_name; +#if LWIP_HTTPD_MAX_REQUEST_URI_LEN + if (copy_len > 0) { + size_t len_left = sizeof(http_uri_buf) - copy_len - 1; + if (len_left > 0) { + size_t name_len = strlen(httpd_default_filenames[loop].name); + size_t name_copy_len = LWIP_MIN(len_left, name_len); + MEMCPY(&http_uri_buf[copy_len], httpd_default_filenames[loop].name, name_copy_len); + http_uri_buf[copy_len + name_copy_len] = 0; + } + file_name = http_uri_buf; + } else +#endif /* LWIP_HTTPD_MAX_REQUEST_URI_LEN */ + { + file_name = httpd_default_filenames[loop].name; + } + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Looking for %s...\n", file_name)); + err = fs_open(&hs->file_handle, file_name); + if (err == ERR_OK) { + uri = file_name; + file = &hs->file_handle; + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Opened.\n")); +#if LWIP_HTTPD_SSI + tag_check = httpd_default_filenames[loop].shtml; +#endif /* LWIP_HTTPD_SSI */ + break; + } + } + } + if (file == NULL) { + /* No - we've been asked for a specific file. */ + /* First, isolate the base URI (without any parameters) */ + params = (char *)strchr(uri, '?'); + if (params != NULL) { + /* URI contains parameters. NULL-terminate the base URI */ + *params = '\0'; + params++; + } + +#if LWIP_HTTPD_CGI + http_cgi_paramcount = -1; + /* Does the base URI we have isolated correspond to a CGI handler? */ + if (httpd_num_cgis && httpd_cgis) { + for (i = 0; i < httpd_num_cgis; i++) { + if (strcmp(uri, httpd_cgis[i].pcCGIName) == 0) { + /* + * We found a CGI that handles this URI so extract the + * parameters and call the handler. + */ + http_cgi_paramcount = extract_uri_parameters(hs, params); + uri = httpd_cgis[i].pfnCGIHandler(i, http_cgi_paramcount, hs->params, + hs->param_vals); + break; + } + } + } +#endif /* LWIP_HTTPD_CGI */ + + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Opening %s\n", uri)); + + err = fs_open(&hs->file_handle, uri); + if (err == ERR_OK) { + file = &hs->file_handle; + } else { + file = http_get_404_file(hs, &uri); + } +#if LWIP_HTTPD_SSI + if (file != NULL) { + if (file->flags & FS_FILE_FLAGS_SSI) { + tag_check = 1; + } else { +#if LWIP_HTTPD_SSI_BY_FILE_EXTENSION + tag_check = http_uri_is_ssi(file, uri); +#endif /* LWIP_HTTPD_SSI_BY_FILE_EXTENSION */ + } + } +#endif /* LWIP_HTTPD_SSI */ + } + if (file == NULL) { + /* None of the default filenames exist so send back a 404 page */ + file = http_get_404_file(hs, &uri); + } + return http_init_file(hs, file, is_09, uri, tag_check, params); +} + +/** Initialize a http connection with a file to send (if found). + * Called by http_find_file and http_find_error_file. + * + * @param hs http connection state + * @param file file structure to send (or NULL if not found) + * @param is_09 1 if the request is HTTP/0.9 (no HTTP headers in response) + * @param uri the HTTP header URI + * @param tag_check enable SSI tag checking + * @param params != NULL if URI has parameters (separated by '?') + * @return ERR_OK if file was found and hs has been initialized correctly + * another err_t otherwise + */ +static err_t +http_init_file(struct http_state *hs, struct fs_file *file, int is_09, const char *uri, + u8_t tag_check, char *params) +{ +#if !LWIP_HTTPD_SUPPORT_V09 + LWIP_UNUSED_ARG(is_09); +#endif + if (file != NULL) { + /* file opened, initialise struct http_state */ +#if !LWIP_HTTPD_DYNAMIC_FILE_READ + /* If dynamic read is disabled, file data must be in one piece and available now */ + LWIP_ASSERT("file->data != NULL", file->data != NULL); +#endif + +#if LWIP_HTTPD_SSI + if (tag_check) { + struct http_ssi_state *ssi = http_ssi_state_alloc(); + if (ssi != NULL) { + ssi->tag_index = 0; + ssi->tag_state = TAG_NONE; + ssi->parsed = file->data; + ssi->parse_left = file->len; + ssi->tag_end = file->data; + hs->ssi = ssi; + } + } +#else /* LWIP_HTTPD_SSI */ + LWIP_UNUSED_ARG(tag_check); +#endif /* LWIP_HTTPD_SSI */ + hs->handle = file; +#if LWIP_HTTPD_CGI_SSI + if (params != NULL) { + /* URI contains parameters, call generic CGI handler */ + int count; +#if LWIP_HTTPD_CGI + if (http_cgi_paramcount >= 0) { + count = http_cgi_paramcount; + } else +#endif + { + count = extract_uri_parameters(hs, params); + } + httpd_cgi_handler(file, uri, count, http_cgi_params, http_cgi_param_vals +#if defined(LWIP_HTTPD_FILE_STATE) && LWIP_HTTPD_FILE_STATE + , file->state +#endif /* LWIP_HTTPD_FILE_STATE */ + ); + } +#else /* LWIP_HTTPD_CGI_SSI */ + LWIP_UNUSED_ARG(params); +#endif /* LWIP_HTTPD_CGI_SSI */ + hs->file = file->data; + LWIP_ASSERT("File length must be positive!", (file->len >= 0)); +#if LWIP_HTTPD_CUSTOM_FILES + if (file->is_custom_file && (file->data == NULL)) { + /* custom file, need to read data first (via fs_read_custom) */ + hs->left = 0; + } else +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + { + hs->left = (u32_t)file->len; + } + hs->retries = 0; +#if LWIP_HTTPD_TIMING + hs->time_started = sys_now(); +#endif /* LWIP_HTTPD_TIMING */ +#if !LWIP_HTTPD_DYNAMIC_HEADERS + LWIP_ASSERT("HTTP headers not included in file system", + (hs->handle->flags & FS_FILE_FLAGS_HEADER_INCLUDED) != 0); +#endif /* !LWIP_HTTPD_DYNAMIC_HEADERS */ +#if LWIP_HTTPD_SUPPORT_V09 + if (is_09 && ((hs->handle->flags & FS_FILE_FLAGS_HEADER_INCLUDED) != 0)) { + /* HTTP/0.9 responses are sent without HTTP header, + search for the end of the header. */ + char *file_start = lwip_strnstr(hs->file, CRLF CRLF, hs->left); + if (file_start != NULL) { + int diff = file_start + 4 - hs->file; + hs->file += diff; + hs->left -= (u32_t)diff; + } + } +#endif /* LWIP_HTTPD_SUPPORT_V09*/ + } else { + hs->handle = NULL; + hs->file = NULL; + hs->left = 0; + hs->retries = 0; + } +#if LWIP_HTTPD_DYNAMIC_HEADERS + /* Determine the HTTP headers to send based on the file extension of + * the requested URI. */ + if ((hs->handle == NULL) || ((hs->handle->flags & FS_FILE_FLAGS_HEADER_INCLUDED) == 0)) { + get_http_headers(hs, uri); + } +#else /* LWIP_HTTPD_DYNAMIC_HEADERS */ + LWIP_UNUSED_ARG(uri); +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + if (hs->keepalive) { +#if LWIP_HTTPD_SSI + if (hs->ssi != NULL) { + hs->keepalive = 0; + } else +#endif /* LWIP_HTTPD_SSI */ + { + if ((hs->handle != NULL) && + ((hs->handle->flags & (FS_FILE_FLAGS_HEADER_INCLUDED | FS_FILE_FLAGS_HEADER_PERSISTENT)) == FS_FILE_FLAGS_HEADER_INCLUDED)) { + hs->keepalive = 0; + } + } + } +#endif /* LWIP_HTTPD_SUPPORT_11_KEEPALIVE */ + return ERR_OK; +} + +/** + * The pcb had an error and is already deallocated. + * The argument might still be valid (if != NULL). + */ +static void +http_err(void *arg, err_t err) +{ + struct http_state *hs = (struct http_state *)arg; + LWIP_UNUSED_ARG(err); + + LWIP_DEBUGF(HTTPD_DEBUG, ("http_err: %s", lwip_strerr(err))); + + if (hs != NULL) { + http_state_free(hs); + } +} + +/** + * Data has been sent and acknowledged by the remote host. + * This means that more data can be sent. + */ +static err_t +http_sent(void *arg, struct altcp_pcb *pcb, u16_t len) +{ + struct http_state *hs = (struct http_state *)arg; + + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_sent %p\n", (void *)pcb)); + + LWIP_UNUSED_ARG(len); + + if (hs == NULL) { + return ERR_OK; + } + + hs->retries = 0; + + http_send(pcb, hs); + + return ERR_OK; +} + +/** + * The poll function is called every 2nd second. + * If there has been no data sent (which resets the retries) in 8 seconds, close. + * If the last portion of a file has not been sent in 2 seconds, close. + * + * This could be increased, but we don't want to waste resources for bad connections. + */ +static err_t +http_poll(void *arg, struct altcp_pcb *pcb) +{ + struct http_state *hs = (struct http_state *)arg; + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_poll: pcb=%p hs=%p pcb_state=%s\n", + (void *)pcb, (void *)hs, tcp_debug_state_str(altcp_dbg_get_tcp_state(pcb)))); + + if (hs == NULL) { + err_t closed; + /* arg is null, close. */ + LWIP_DEBUGF(HTTPD_DEBUG, ("http_poll: arg is NULL, close\n")); + closed = http_close_conn(pcb, NULL); + LWIP_UNUSED_ARG(closed); +#if LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR + if (closed == ERR_MEM) { + altcp_abort(pcb); + return ERR_ABRT; + } +#endif /* LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR */ + return ERR_OK; + } else { + hs->retries++; + if (hs->retries == HTTPD_MAX_RETRIES) { + LWIP_DEBUGF(HTTPD_DEBUG, ("http_poll: too many retries, close\n")); + http_close_conn(pcb, hs); + return ERR_OK; + } + + /* If this connection has a file open, try to send some more data. If + * it has not yet received a GET request, don't do this since it will + * cause the connection to close immediately. */ + if (hs->handle) { + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_poll: try to send more data\n")); + if (http_send(pcb, hs)) { + /* If we wrote anything to be sent, go ahead and send it now. */ + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("tcp_output\n")); + altcp_output(pcb); + } + } + } + + return ERR_OK; +} + +/** + * Data has been received on this pcb. + * For HTTP 1.0, this should normally only happen once (if the request fits in one packet). + */ +static err_t +http_recv(void *arg, struct altcp_pcb *pcb, struct pbuf *p, err_t err) +{ + struct http_state *hs = (struct http_state *)arg; + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_recv: pcb=%p pbuf=%p err=%s\n", (void *)pcb, + (void *)p, lwip_strerr(err))); + + if ((err != ERR_OK) || (p == NULL) || (hs == NULL)) { + /* error or closed by other side? */ + if (p != NULL) { + /* Inform TCP that we have taken the data. */ + altcp_recved(pcb, p->tot_len); + pbuf_free(p); + } + if (hs == NULL) { + /* this should not happen, only to be robust */ + LWIP_DEBUGF(HTTPD_DEBUG, ("Error, http_recv: hs is NULL, close\n")); + } + http_close_conn(pcb, hs); + return ERR_OK; + } + +#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND + if (hs->no_auto_wnd) { + hs->unrecved_bytes += p->tot_len; + } else +#endif /* LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND */ + { + /* Inform TCP that we have taken the data. */ + altcp_recved(pcb, p->tot_len); + } + +#if LWIP_HTTPD_SUPPORT_POST + if (hs->post_content_len_left > 0) { + /* reset idle counter when POST data is received */ + hs->retries = 0; + /* this is data for a POST, pass the complete pbuf to the application */ + http_post_rxpbuf(hs, p); + /* pbuf is passed to the application, don't free it! */ + if (hs->post_content_len_left == 0) { + /* all data received, send response or close connection */ + http_send(pcb, hs); + } + return ERR_OK; + } else +#endif /* LWIP_HTTPD_SUPPORT_POST */ + { + if (hs->handle == NULL) { + err_t parsed = http_parse_request(p, hs, pcb); + LWIP_ASSERT("http_parse_request: unexpected return value", parsed == ERR_OK + || parsed == ERR_INPROGRESS || parsed == ERR_ARG || parsed == ERR_USE); +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + if (parsed != ERR_INPROGRESS) { + /* request fully parsed or error */ + if (hs->req != NULL) { + pbuf_free(hs->req); + hs->req = NULL; + } + } +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + pbuf_free(p); + if (parsed == ERR_OK) { +#if LWIP_HTTPD_SUPPORT_POST + if (hs->post_content_len_left == 0) +#endif /* LWIP_HTTPD_SUPPORT_POST */ + { + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_recv: data %p len %"S32_F"\n", (const void *)hs->file, hs->left)); + http_send(pcb, hs); + } + } else if (parsed == ERR_ARG) { + /* @todo: close on ERR_USE? */ + http_close_conn(pcb, hs); + } + } else { + LWIP_DEBUGF(HTTPD_DEBUG, ("http_recv: already sending data\n")); + /* already sending but still receiving data, we might want to RST here? */ + pbuf_free(p); + } + } + return ERR_OK; +} + +/** + * A new incoming connection has been accepted. + */ +static err_t +http_accept(void *arg, struct altcp_pcb *pcb, err_t err) +{ + struct http_state *hs; + LWIP_UNUSED_ARG(err); + LWIP_UNUSED_ARG(arg); + LWIP_DEBUGF(HTTPD_DEBUG, ("http_accept %p / %p\n", (void *)pcb, arg)); + + if ((err != ERR_OK) || (pcb == NULL)) { + return ERR_VAL; + } + + /* Set priority */ + altcp_setprio(pcb, HTTPD_TCP_PRIO); + + /* Allocate memory for the structure that holds the state of the + connection - initialized by that function. */ + hs = http_state_alloc(); + if (hs == NULL) { + LWIP_DEBUGF(HTTPD_DEBUG, ("http_accept: Out of memory, RST\n")); + return ERR_MEM; + } + hs->pcb = pcb; + + /* Tell TCP that this is the structure we wish to be passed for our + callbacks. */ + altcp_arg(pcb, hs); + + /* Set up the various callback functions */ + altcp_recv(pcb, http_recv); + altcp_err(pcb, http_err); + altcp_poll(pcb, http_poll, HTTPD_POLL_INTERVAL); + altcp_sent(pcb, http_sent); + + return ERR_OK; +} + +static void +httpd_init_pcb(struct altcp_pcb *pcb, u16_t port) +{ + err_t err; + + if (pcb) { + altcp_setprio(pcb, HTTPD_TCP_PRIO); + /* set SOF_REUSEADDR here to explicitly bind httpd to multiple interfaces */ + err = altcp_bind(pcb, IP_ANY_TYPE, port); + LWIP_UNUSED_ARG(err); /* in case of LWIP_NOASSERT */ + LWIP_ASSERT("httpd_init: tcp_bind failed", err == ERR_OK); + pcb = altcp_listen(pcb); + LWIP_ASSERT("httpd_init: tcp_listen failed", pcb != NULL); + altcp_accept(pcb, http_accept); + } +} + +/** + * @ingroup httpd + * Initialize the httpd: set up a listening PCB and bind it to the defined port + */ +void +httpd_init(void) +{ + struct altcp_pcb *pcb; + +#if HTTPD_USE_MEM_POOL + LWIP_MEMPOOL_INIT(HTTPD_STATE); +#if LWIP_HTTPD_SSI + LWIP_MEMPOOL_INIT(HTTPD_SSI_STATE); +#endif +#endif + LWIP_DEBUGF(HTTPD_DEBUG, ("httpd_init\n")); + + /* LWIP_ASSERT_CORE_LOCKED(); is checked by tcp_new() */ + + pcb = altcp_tcp_new_ip_type(IPADDR_TYPE_ANY); + LWIP_ASSERT("httpd_init: tcp_new failed", pcb != NULL); + httpd_init_pcb(pcb, HTTPD_SERVER_PORT); +} + +#if HTTPD_ENABLE_HTTPS +/** + * @ingroup httpd + * Initialize the httpd: set up a listening PCB and bind it to the defined port. + * Also set up TLS connection handling (HTTPS). + */ +void +httpd_inits(struct altcp_tls_config *conf) +{ +#if LWIP_ALTCP_TLS + struct altcp_pcb *pcb_tls = altcp_tls_new(conf, IPADDR_TYPE_ANY); + LWIP_ASSERT("httpd_init: altcp_tls_new failed", pcb_tls != NULL); + httpd_init_pcb(pcb_tls, HTTPD_SERVER_PORT_HTTPS); +#else /* LWIP_ALTCP_TLS */ + LWIP_UNUSED_ARG(conf); +#endif /* LWIP_ALTCP_TLS */ +} +#endif /* HTTPD_ENABLE_HTTPS */ + +#if LWIP_HTTPD_SSI +/** + * @ingroup httpd + * Set the SSI handler function. + * + * @param ssi_handler the SSI handler function + * @param tags an array of SSI tag strings to search for in SSI-enabled files + * @param num_tags number of tags in the 'tags' array + */ +void +http_set_ssi_handler(tSSIHandler ssi_handler, const char **tags, int num_tags) +{ + LWIP_DEBUGF(HTTPD_DEBUG, ("http_set_ssi_handler\n")); + + LWIP_ASSERT("no ssi_handler given", ssi_handler != NULL); + httpd_ssi_handler = ssi_handler; + +#if LWIP_HTTPD_SSI_RAW + LWIP_UNUSED_ARG(tags); + LWIP_UNUSED_ARG(num_tags); +#else /* LWIP_HTTPD_SSI_RAW */ + LWIP_ASSERT("no tags given", tags != NULL); + LWIP_ASSERT("invalid number of tags", num_tags > 0); + + httpd_tags = tags; + httpd_num_tags = num_tags; +#endif /* !LWIP_HTTPD_SSI_RAW */ +} +#endif /* LWIP_HTTPD_SSI */ + +#if LWIP_HTTPD_CGI +/** + * @ingroup httpd + * Set an array of CGI filenames/handler functions + * + * @param cgis an array of CGI filenames/handler functions + * @param num_handlers number of elements in the 'cgis' array + */ +void +http_set_cgi_handlers(const tCGI *cgis, int num_handlers) +{ + LWIP_ASSERT("no cgis given", cgis != NULL); + LWIP_ASSERT("invalid number of handlers", num_handlers > 0); + + httpd_cgis = cgis; + httpd_num_cgis = num_handlers; +} +#endif /* LWIP_HTTPD_CGI */ + +#endif /* LWIP_TCP && LWIP_CALLBACK_API */ diff --git a/User/lwip_http/httpd_cgi_ssi.c b/User/lwip_http/httpd_cgi_ssi.c index 75c9146..115850e 100755 --- a/User/lwip_http/httpd_cgi_ssi.c +++ b/User/lwip_http/httpd_cgi_ssi.c @@ -6,39 +6,13 @@ ****************************************************************************** * @attention * - *

                  © Copyright (c) 2017 STMicroelectronics International N.V. + *

                  © Copyright (c) 2017 STMicroelectronics. * All rights reserved.

                  * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted, provided that the following conditions are met: - * - * 1. Redistribution of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of STMicroelectronics nor the names of other - * contributors to this software may be used to endorse or promote products - * derived from this software without specific written permission. - * 4. This software, including modifications and/or derivative works of this - * software, must execute solely and exclusively on microcontroller or - * microprocessor devices manufactured by or for STMicroelectronics. - * 5. Redistribution and use of this software other than as permitted under - * this license is void and will automatically terminate your rights under - * this license. - * - * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY - * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT - * SHALL STMICROELECTRONICS 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. + * This software component is licensed by ST under Ultimate Liberty license + * SLA0044, the "License"; You may not use this file except in compliance with + * the License. You may obtain a copy of the License at: + * www.st.com/SLA0044 * ****************************************************************************** */ diff --git a/User/lwip_http/httpd_structs.h b/User/lwip_http/httpd_structs.h new file mode 100644 index 0000000..56b97a3 --- /dev/null +++ b/User/lwip_http/httpd_structs.h @@ -0,0 +1,123 @@ +#ifndef LWIP_HTTPD_STRUCTS_H +#define LWIP_HTTPD_STRUCTS_H + +#include "lwip/apps/httpd.h" + +#if LWIP_HTTPD_DYNAMIC_HEADERS +/** This struct is used for a list of HTTP header strings for various + * filename extensions. */ +typedef struct { + const char *extension; + const char *content_type; +} tHTTPHeader; + +/** A list of strings used in HTTP headers (see RFC 1945 HTTP/1.0 and + * RFC 2616 HTTP/1.1 for header field definitions) */ +static const char *const g_psHTTPHeaderStrings[] = { + "HTTP/1.0 200 OK\r\n", + "HTTP/1.0 404 File not found\r\n", + "HTTP/1.0 400 Bad Request\r\n", + "HTTP/1.0 501 Not Implemented\r\n", + "HTTP/1.1 200 OK\r\n", + "HTTP/1.1 404 File not found\r\n", + "HTTP/1.1 400 Bad Request\r\n", + "HTTP/1.1 501 Not Implemented\r\n", + "Content-Length: ", + "Connection: Close\r\n", + "Connection: keep-alive\r\n", + "Connection: keep-alive\r\nContent-Length: ", + "Server: "HTTPD_SERVER_AGENT"\r\n", + "\r\n

                  404: The requested file cannot be found.

                  \r\n" +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + , "Connection: keep-alive\r\nContent-Length: 77\r\n\r\n

                  404: The requested file cannot be found.

                  \r\n" +#endif +}; + +/* Indexes into the g_psHTTPHeaderStrings array */ +#define HTTP_HDR_OK 0 /* 200 OK */ +#define HTTP_HDR_NOT_FOUND 1 /* 404 File not found */ +#define HTTP_HDR_BAD_REQUEST 2 /* 400 Bad request */ +#define HTTP_HDR_NOT_IMPL 3 /* 501 Not Implemented */ +#define HTTP_HDR_OK_11 4 /* 200 OK */ +#define HTTP_HDR_NOT_FOUND_11 5 /* 404 File not found */ +#define HTTP_HDR_BAD_REQUEST_11 6 /* 400 Bad request */ +#define HTTP_HDR_NOT_IMPL_11 7 /* 501 Not Implemented */ +#define HTTP_HDR_CONTENT_LENGTH 8 /* Content-Length: (HTTP 1.0)*/ +#define HTTP_HDR_CONN_CLOSE 9 /* Connection: Close (HTTP 1.1) */ +#define HTTP_HDR_CONN_KEEPALIVE 10 /* Connection: keep-alive (HTTP 1.1) */ +#define HTTP_HDR_KEEPALIVE_LEN 11 /* Connection: keep-alive + Content-Length: (HTTP 1.1)*/ +#define HTTP_HDR_SERVER 12 /* Server: HTTPD_SERVER_AGENT */ +#define DEFAULT_404_HTML 13 /* default 404 body */ +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE +#define DEFAULT_404_HTML_PERSISTENT 14 /* default 404 body, but including Connection: keep-alive */ +#endif + +#define HTTP_CONTENT_TYPE(contenttype) "Content-Type: "contenttype"\r\n\r\n" +#define HTTP_CONTENT_TYPE_ENCODING(contenttype, encoding) "Content-Type: "contenttype"\r\nContent-Encoding: "encoding"\r\n\r\n" + +#define HTTP_HDR_HTML HTTP_CONTENT_TYPE("text/html") +#define HTTP_HDR_SSI HTTP_CONTENT_TYPE("text/html\r\nExpires: Fri, 10 Apr 2008 14:00:00 GMT\r\nPragma: no-cache") +#define HTTP_HDR_GIF HTTP_CONTENT_TYPE("image/gif") +#define HTTP_HDR_PNG HTTP_CONTENT_TYPE("image/png") +#define HTTP_HDR_JPG HTTP_CONTENT_TYPE("image/jpeg") +#define HTTP_HDR_BMP HTTP_CONTENT_TYPE("image/bmp") +#define HTTP_HDR_ICO HTTP_CONTENT_TYPE("image/x-icon") +#define HTTP_HDR_APP HTTP_CONTENT_TYPE("application/octet-stream") +#define HTTP_HDR_JS HTTP_CONTENT_TYPE("application/javascript") +#define HTTP_HDR_RA HTTP_CONTENT_TYPE("application/javascript") +#define HTTP_HDR_CSS HTTP_CONTENT_TYPE("text/css") +#define HTTP_HDR_SWF HTTP_CONTENT_TYPE("application/x-shockwave-flash") +#define HTTP_HDR_XML HTTP_CONTENT_TYPE("text/xml") +#define HTTP_HDR_PDF HTTP_CONTENT_TYPE("application/pdf") +#define HTTP_HDR_JSON HTTP_CONTENT_TYPE("application/json") +#define HTTP_HDR_CSV HTTP_CONTENT_TYPE("text/csv") +#define HTTP_HDR_TSV HTTP_CONTENT_TYPE("text/tsv") +#define HTTP_HDR_SVG HTTP_CONTENT_TYPE("image/svg+xml") +#define HTTP_HDR_SVGZ HTTP_CONTENT_TYPE_ENCODING("image/svg+xml", "gzip") + +#define HTTP_HDR_DEFAULT_TYPE HTTP_CONTENT_TYPE("text/plain") + +/** A list of extension-to-HTTP header strings (see outdated RFC 1700 MEDIA TYPES + * and http://www.iana.org/assignments/media-types for registered content types + * and subtypes) */ +static const tHTTPHeader g_psHTTPHeaders[] = { + { "html", HTTP_HDR_HTML}, + { "htm", HTTP_HDR_HTML}, + { "shtml", HTTP_HDR_SSI}, + { "shtm", HTTP_HDR_SSI}, + { "ssi", HTTP_HDR_SSI}, + { "gif", HTTP_HDR_GIF}, + { "png", HTTP_HDR_PNG}, + { "jpg", HTTP_HDR_JPG}, + { "bmp", HTTP_HDR_BMP}, + { "ico", HTTP_HDR_ICO}, + { "class", HTTP_HDR_APP}, + { "cls", HTTP_HDR_APP}, + { "js", HTTP_HDR_JS}, + { "ram", HTTP_HDR_RA}, + { "css", HTTP_HDR_CSS}, + { "swf", HTTP_HDR_SWF}, + { "xml", HTTP_HDR_XML}, + { "xsl", HTTP_HDR_XML}, + { "pdf", HTTP_HDR_PDF}, + { "json", HTTP_HDR_JSON} +#ifdef HTTPD_ADDITIONAL_CONTENT_TYPES + /* If you need to add content types not listed here: + * #define HTTPD_ADDITIONAL_CONTENT_TYPES {"ct1", HTTP_CONTENT_TYPE("text/ct1")}, {"exe", HTTP_CONTENT_TYPE("application/exe")} + */ + , HTTPD_ADDITIONAL_CONTENT_TYPES +#endif +}; + +#define NUM_HTTP_HEADERS LWIP_ARRAYSIZE(g_psHTTPHeaders) + +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ + +#if LWIP_HTTPD_SSI +static const char *const g_pcSSIExtensions[] = { + ".shtml", ".shtm", ".ssi", ".xml", ".json" +}; +#define NUM_SHTML_EXTENSIONS LWIP_ARRAYSIZE(g_pcSSIExtensions) +#endif /* LWIP_HTTPD_SSI */ + +#endif /* LWIP_HTTPD_STRUCTS_H */ diff --git a/User/lwip_if/app_ethernet.c b/User/lwip_if/app_ethernet.c index 15577cc..3a94da4 100755 --- a/User/lwip_if/app_ethernet.c +++ b/User/lwip_if/app_ethernet.c @@ -1,44 +1,18 @@ /** ****************************************************************************** - * @file LwIP/LwIP_HTTP_Server_Raw/Src/app_ethernet.c + * @file LwIP/LwIP_HTTP_Server_Raw/Src/app_ethernet.c * @author MCD Application Team * @brief Ethernet specefic module ****************************************************************************** * @attention * - *

                  © Copyright (c) 2017 STMicroelectronics International N.V. + *

                  © Copyright (c) 2017 STMicroelectronics. * All rights reserved.

                  * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted, provided that the following conditions are met: - * - * 1. Redistribution of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of STMicroelectronics nor the names of other - * contributors to this software may be used to endorse or promote products - * derived from this software without specific written permission. - * 4. This software, including modifications and/or derivative works of this - * software, must execute solely and exclusively on microcontroller or - * microprocessor devices manufactured by or for STMicroelectronics. - * 5. Redistribution and use of this software other than as permitted under - * this license is void and will automatically terminate your rights under - * this license. - * - * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY - * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT - * SHALL STMICROELECTRONICS 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. + * This software component is licensed by ST under Ultimate Liberty license + * SLA0044, the "License"; You may not use this file except in compliance with + * the License. You may obtain a copy of the License at: + * www.st.com/SLA0044 * ****************************************************************************** */ @@ -152,7 +126,7 @@ void DHCP_Process(struct netif *netif) DHCP_state = DHCP_TIMEOUT; /* Stop DHCP */ - dhcp_stop(netif); + //dhcp_stop(netif); /* Static address used */ IP_ADDR4(&ipaddr, IP_ADDR0, IP_ADDR1, IP_ADDR2, IP_ADDR3); @@ -166,7 +140,7 @@ void DHCP_Process(struct netif *netif) case DHCP_LINK_DOWN: /* The network cable is not connected */ { /* Stop DHCP */ - dhcp_stop(netif); + //dhcp_stop(netif); DHCP_state = DHCP_OFF; } break; diff --git a/User/lwip_if/app_ethernet.h b/User/lwip_if/app_ethernet.h index f3c3eaa..80595c5 100755 --- a/User/lwip_if/app_ethernet.h +++ b/User/lwip_if/app_ethernet.h @@ -6,39 +6,13 @@ ****************************************************************************** * @attention * - *

                  © Copyright (c) 2017 STMicroelectronics International N.V. + *

                  © Copyright (c) 2017 STMicroelectronics. * All rights reserved.

                  * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted, provided that the following conditions are met: - * - * 1. Redistribution of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of STMicroelectronics nor the names of other - * contributors to this software may be used to endorse or promote products - * derived from this software without specific written permission. - * 4. This software, including modifications and/or derivative works of this - * software, must execute solely and exclusively on microcontroller or - * microprocessor devices manufactured by or for STMicroelectronics. - * 5. Redistribution and use of this software other than as permitted under - * this license is void and will automatically terminate your rights under - * this license. - * - * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY - * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT - * SHALL STMICROELECTRONICS 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. + * This software component is licensed by ST under Ultimate Liberty license + * SLA0044, the "License"; You may not use this file except in compliance with + * the License. You may obtain a copy of the License at: + * www.st.com/SLA0044 * ****************************************************************************** */ @@ -48,8 +22,7 @@ #define __APP_ETHERNET_H #ifdef __cplusplus -extern "C" -{ + extern "C" { #endif /* Includes ------------------------------------------------------------------*/ @@ -58,21 +31,21 @@ extern "C" /* Exported types ------------------------------------------------------------*/ /* Exported constants --------------------------------------------------------*/ /* DHCP process states */ -#define DHCP_OFF (uint8_t)0 -#define DHCP_START (uint8_t)1 -#define DHCP_WAIT_ADDRESS (uint8_t)2 -#define DHCP_ADDRESS_ASSIGNED (uint8_t)3 -#define DHCP_TIMEOUT (uint8_t)4 -#define DHCP_LINK_DOWN (uint8_t)5 - - /* Exported macro ------------------------------------------------------------*/ - /* Exported functions ------------------------------------------------------- */ - void ethernet_link_status_updated(struct netif *netif); - void Ethernet_Link_Periodic_Handle(struct netif *netif); +#define DHCP_OFF (uint8_t) 0 +#define DHCP_START (uint8_t) 1 +#define DHCP_WAIT_ADDRESS (uint8_t) 2 +#define DHCP_ADDRESS_ASSIGNED (uint8_t) 3 +#define DHCP_TIMEOUT (uint8_t) 4 +#define DHCP_LINK_DOWN (uint8_t) 5 + +/* Exported macro ------------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ +void ethernet_link_status_updated(struct netif *netif); +void Ethernet_Link_Periodic_Handle(struct netif *netif); #if LWIP_DHCP - void DHCP_Process(struct netif *netif); - void DHCP_Periodic_Handle(struct netif *netif); -#endif +void DHCP_Process(struct netif *netif); +void DHCP_Periodic_Handle(struct netif *netif); +#endif #ifdef __cplusplus } diff --git a/User/lwip_if/ethernetif.c b/User/lwip_if/ethernetif.c index 569e073..ed28b79 100755 --- a/User/lwip_if/ethernetif.c +++ b/User/lwip_if/ethernetif.c @@ -6,39 +6,13 @@ ****************************************************************************** * @attention * - *

                  © Copyright (c) 2017 STMicroelectronics International N.V. + *

                  © Copyright (c) 2017 STMicroelectronics. * All rights reserved.

                  * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted, provided that the following conditions are met: - * - * 1. Redistribution of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of STMicroelectronics nor the names of other - * contributors to this software may be used to endorse or promote products - * derived from this software without specific written permission. - * 4. This software, including modifications and/or derivative works of this - * software, must execute solely and exclusively on microcontroller or - * microprocessor devices manufactured by or for STMicroelectronics. - * 5. Redistribution and use of this software other than as permitted under - * this license is void and will automatically terminate your rights under - * this license. - * - * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY - * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT - * SHALL STMICROELECTRONICS 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. + * This software component is licensed by ST under Ultimate Liberty license + * SLA0044, the "License"; You may not use this file except in compliance with + * the License. You may obtain a copy of the License at: + * www.st.com/SLA0044 * ****************************************************************************** */ @@ -79,12 +53,14 @@ #define ETH_RX_BUFFER_SIZE (1536UL) +#define ETH_DMA_TRANSMIT_TIMEOUT (20U) + /* Private macro -------------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ /* @Note: This interface is implemented to operate in zero-copy mode only: - - Rx buffers are allocated statically and passed directly to the LwIP stack - they will return back to DMA after been processed by the stack. + - Rx buffers are allocated statically and passed directly to the LwIP stack, + they will return back to ETH DMA after been processed by the stack. - Tx Buffers will be allocated from LwIP stack memory heap, then passed to ETH HAL driver. @@ -97,27 +73,29 @@ 2.a. Rx Buffers number must be between ETH_RX_DESC_CNT and 2*ETH_RX_DESC_CNT 2.b. Rx Buffers must have the same size: ETH_RX_BUFFER_SIZE, this value must passed to ETH DMA in the init field (EthHandle.Init.RxBuffLen) + 2.c The RX Ruffers addresses and sizes must be properly defined to be aligned + to L1-CACHE line size (32 bytes). */ -#if defined(__ICCARM__) /*!< IAR Compiler */ +#if defined ( __ICCARM__ ) /*!< IAR Compiler */ -#pragma location = 0x30040000 -ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT]; /* Ethernet Rx DMA Descriptors */ -#pragma location = 0x30040060 -ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT]; /* Ethernet Tx DMA Descriptors */ -#pragma location = 0x30040200 +#pragma location=0x30040000 +ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT]; /* Ethernet Rx DMA Descriptors */ +#pragma location=0x30040060 +ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT]; /* Ethernet Tx DMA Descriptors */ +#pragma location=0x30040200 uint8_t Rx_Buff[ETH_RX_DESC_CNT][ETH_RX_BUFFER_SIZE]; /* Ethernet Receive Buffers */ -#elif defined(__CC_ARM) /* MDK ARM Compiler */ +#elif defined ( __CC_ARM ) /* MDK ARM Compiler */ -__attribute__((section(".RxDecripSection"))) ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT]; /* Ethernet Rx DMA Descriptors */ -__attribute__((section(".TxDecripSection"))) ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT]; /* Ethernet Tx DMA Descriptors */ +__attribute__((section(".RxDecripSection"))) ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT]; /* Ethernet Rx DMA Descriptors */ +__attribute__((section(".TxDecripSection"))) ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT]; /* Ethernet Tx DMA Descriptors */ __attribute__((section(".RxArraySection"))) uint8_t Rx_Buff[ETH_RX_DESC_CNT][ETH_RX_BUFFER_SIZE]; /* Ethernet Receive Buffer */ #elif defined(__GNUC__) /* GNU Compiler */ -ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT] __attribute__((section(".RxDecripSection"))); /* Ethernet Rx DMA Descriptors */ -ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT] __attribute__((section(".TxDecripSection"))); /* Ethernet Tx DMA Descriptors */ +ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT] __attribute__((section(".RxDecripSection"))); /* Ethernet Rx DMA Descriptors */ +ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT] __attribute__((section(".TxDecripSection"))); /* Ethernet Tx DMA Descriptors */ uint8_t Rx_Buff[ETH_RX_DESC_CNT][ETH_RX_BUFFER_SIZE] __attribute__((section(".RxArraySection"))); /* Ethernet Receive Buffers */ #endif @@ -138,7 +116,7 @@ u32_t sys_now(void); void pbuf_free_custom(struct pbuf *p); int32_t ETH_PHY_IO_Init(void); -int32_t ETH_PHY_IO_DeInit(void); +int32_t ETH_PHY_IO_DeInit (void); int32_t ETH_PHY_IO_ReadReg(uint32_t DevAddr, uint32_t RegAddr, uint32_t *pRegVal); int32_t ETH_PHY_IO_WriteReg(uint32_t DevAddr, uint32_t RegAddr, uint32_t RegVal); int32_t ETH_PHY_IO_GetTick(void); @@ -149,7 +127,7 @@ lan8742_IOCtx_t LAN8742_IOCtx = {ETH_PHY_IO_Init, ETH_PHY_IO_ReadReg, ETH_PHY_IO_GetTick}; -LWIP_MEMPOOL_DECLARE(RX_POOL, 4, sizeof(struct pbuf_custom), "Zero-copy RX PBUF pool"); +LWIP_MEMPOOL_DECLARE(RX_POOL, 10, sizeof(struct pbuf_custom), "Zero-copy RX PBUF pool"); /* Private functions ---------------------------------------------------------*/ /******************************************************************************* @@ -165,21 +143,21 @@ LWIP_MEMPOOL_DECLARE(RX_POOL, 4, sizeof(struct pbuf_custom), "Zero-copy RX PBUF static void low_level_init(struct netif *netif) { uint32_t idx = 0; - uint8_t macaddress[6] = {ETH_MAC_ADDR0, ETH_MAC_ADDR1, ETH_MAC_ADDR2, ETH_MAC_ADDR3, ETH_MAC_ADDR4, ETH_MAC_ADDR5}; - - EthHandle.Instance = ETH; + uint8_t macaddress[6]= {ETH_MAC_ADDR0, ETH_MAC_ADDR1, ETH_MAC_ADDR2, ETH_MAC_ADDR3, ETH_MAC_ADDR4, ETH_MAC_ADDR5}; + + EthHandle.Instance = ETH; EthHandle.Init.MACAddr = macaddress; EthHandle.Init.MediaInterface = HAL_ETH_RMII_MODE; EthHandle.Init.RxDesc = DMARxDscrTab; EthHandle.Init.TxDesc = DMATxDscrTab; EthHandle.Init.RxBuffLen = ETH_RX_BUFFER_SIZE; - + /* configure ethernet peripheral (GPIOs, clocks, MAC, DMA) */ HAL_ETH_Init(&EthHandle); - + /* set MAC hardware address length */ - netif->hwaddr_len = ETHARP_HWADDR_LEN; - + netif->hwaddr_len = ETH_HWADDR_LEN; + /* set MAC hardware address */ netif->hwaddr[0] = macaddress[0]; netif->hwaddr[1] = macaddress[1]; @@ -235,25 +213,22 @@ static void low_level_init(struct netif *netif) */ static err_t low_level_output(struct netif *netif, struct pbuf *p) { - uint32_t i = 0, framelen = 0; + uint32_t i=0; struct pbuf *q; err_t errval = ERR_OK; ETH_BufferTypeDef Txbuffer[ETH_TX_DESC_CNT]; - - memset(Txbuffer, 0, ETH_TX_DESC_CNT * sizeof(ETH_BufferTypeDef)); - - for (q = p; q != NULL; q = q->next) + + memset(Txbuffer, 0 , ETH_TX_DESC_CNT*sizeof(ETH_BufferTypeDef)); + + for(q = p; q != NULL; q = q->next) { - if (i >= ETH_TX_DESC_CNT) + if(i >= ETH_TX_DESC_CNT) return ERR_IF; Txbuffer[i].buffer = q->payload; Txbuffer[i].len = q->len; - framelen += q->len; - - //SCB_CleanDCache_by_Addr((uint32_t *)q->payload, q->len); - if (i > 0) + if(i>0) { Txbuffer[i - 1].next = &Txbuffer[i]; } @@ -266,11 +241,11 @@ static err_t low_level_output(struct netif *netif, struct pbuf *p) i++; } - TxConfig.Length = framelen; + TxConfig.Length = p->tot_len; TxConfig.TxBuffer = Txbuffer; - HAL_ETH_Transmit(&EthHandle, &TxConfig, 0); /* 2018-10-19 ,旧: HAL_ETH_Transmit(&EthHandle, &TxConfig, 0); */ - + HAL_ETH_Transmit(&EthHandle, &TxConfig, ETH_DMA_TRANSMIT_TIMEOUT); + return errval; } @@ -285,23 +260,35 @@ static err_t low_level_output(struct netif *netif, struct pbuf *p) static struct pbuf *low_level_input(struct netif *netif) { struct pbuf *p = NULL; - ETH_BufferTypeDef RxBuff; - uint32_t framelength = 0; - struct pbuf_custom *custom_pbuf; + ETH_BufferTypeDef RxBuff[ETH_RX_DESC_CNT]; + uint32_t framelength = 0, i = 0;; + struct pbuf_custom* custom_pbuf; + memset(RxBuff, 0 , ETH_RX_DESC_CNT*sizeof(ETH_BufferTypeDef)); + + for(i = 0; i < ETH_RX_DESC_CNT -1; i++) + { + RxBuff[i].next=&RxBuff[i+1]; + } + if (HAL_ETH_IsRxDataAvailable(&EthHandle)) { - HAL_ETH_GetRxDataBuffer(&EthHandle, &RxBuff); + HAL_ETH_GetRxDataBuffer(&EthHandle, RxBuff); HAL_ETH_GetRxDataLength(&EthHandle, &framelength); + + /* Build Rx descriptor to be ready for next data reception */ + HAL_ETH_BuildRxDescriptors(&EthHandle); /* Invalidate data cache for ETH Rx Buffers */ - SCB_InvalidateDCache_by_Addr((uint32_t *)Rx_Buff, (ETH_RX_DESC_CNT * ETH_RX_BUFFER_SIZE)); - - custom_pbuf = (struct pbuf_custom *)LWIP_MEMPOOL_ALLOC(RX_POOL); - custom_pbuf->custom_free_function = pbuf_free_custom; - - p = pbuf_alloced_custom(PBUF_RAW, framelength, PBUF_REF, custom_pbuf, RxBuff.buffer, ETH_RX_BUFFER_SIZE); - + SCB_InvalidateDCache_by_Addr((uint32_t *)RxBuff->buffer, framelength); + + custom_pbuf = (struct pbuf_custom*)LWIP_MEMPOOL_ALLOC(RX_POOL); + if(custom_pbuf != NULL) + { + custom_pbuf->custom_free_function = pbuf_free_custom; + p = pbuf_alloced_custom(PBUF_RAW, framelength, PBUF_REF, custom_pbuf, RxBuff->buffer, framelength); + } + return p; } else @@ -326,22 +313,19 @@ void ethernetif_input(struct netif *netif) /* move received packet into a new pbuf */ p = low_level_input(netif); - + /* no packet could be read, silently ignore this */ - if (p == NULL) - return; - + if (p == NULL) return; + /* entry point to the LwIP stack */ err = netif->input(p, netif); - + if (err != ERR_OK) { LWIP_DEBUGF(NETIF_DEBUG, ("ethernetif_input: IP input error\n")); pbuf_free(p); p = NULL; } - - HAL_ETH_BuildRxDescriptors(&EthHandle); } /** @@ -387,8 +371,7 @@ err_t ethernetif_init(struct netif *netif) */ void pbuf_free_custom(struct pbuf *p) { - struct pbuf_custom *custom_pbuf = (struct pbuf_custom *)p; - ; + struct pbuf_custom* custom_pbuf = (struct pbuf_custom*)p; LWIP_MEMPOOL_FREE(RX_POOL, custom_pbuf); } @@ -430,7 +413,6 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth) /* Enable GPIOs clocks */ __HAL_RCC_GPIOA_CLK_ENABLE(); - __HAL_RCC_GPIOB_CLK_ENABLE(); __HAL_RCC_GPIOC_CLK_ENABLE(); __HAL_RCC_GPIOG_CLK_ENABLE(); @@ -495,11 +477,11 @@ int32_t ETH_PHY_IO_DeInit(void) */ int32_t ETH_PHY_IO_ReadReg(uint32_t DevAddr, uint32_t RegAddr, uint32_t *pRegVal) { - if (HAL_ETH_ReadPHYRegister(&EthHandle, DevAddr, RegAddr, pRegVal) != HAL_OK) + if(HAL_ETH_ReadPHYRegister(&EthHandle, DevAddr, RegAddr, pRegVal) != HAL_OK) { return -1; } - + return 0; } @@ -512,11 +494,11 @@ int32_t ETH_PHY_IO_ReadReg(uint32_t DevAddr, uint32_t RegAddr, uint32_t *pRegVal */ int32_t ETH_PHY_IO_WriteReg(uint32_t DevAddr, uint32_t RegAddr, uint32_t RegVal) { - if (HAL_ETH_WritePHYRegister(&EthHandle, DevAddr, RegAddr, RegVal) != HAL_OK) + if(HAL_ETH_WritePHYRegister(&EthHandle, DevAddr, RegAddr, RegVal) != HAL_OK) { return -1; } - + return 0; } diff --git a/User/lwip_if/ethernetif.h b/User/lwip_if/ethernetif.h index b49d1b5..8e2cd78 100755 --- a/User/lwip_if/ethernetif.h +++ b/User/lwip_if/ethernetif.h @@ -6,39 +6,13 @@ ****************************************************************************** * @attention * - *

                  © Copyright (c) 2017 STMicroelectronics International N.V. + *

                  © Copyright (c) 2017 STMicroelectronics. * All rights reserved.

                  * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted, provided that the following conditions are met: - * - * 1. Redistribution of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of STMicroelectronics nor the names of other - * contributors to this software may be used to endorse or promote products - * derived from this software without specific written permission. - * 4. This software, including modifications and/or derivative works of this - * software, must execute solely and exclusively on microcontroller or - * microprocessor devices manufactured by or for STMicroelectronics. - * 5. Redistribution and use of this software other than as permitted under - * this license is void and will automatically terminate your rights under - * this license. - * - * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY - * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT - * SHALL STMICROELECTRONICS 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. + * This software component is licensed by ST under Ultimate Liberty license + * SLA0044, the "License"; You may not use this file except in compliance with + * the License. You may obtain a copy of the License at: + * www.st.com/SLA0044 * ****************************************************************************** */ diff --git a/User/lwip_if/lwip_http/Fs/404.html b/User/lwip_if/lwip_http/Fs/404.html new file mode 100644 index 0000000..226977c --- /dev/null +++ b/User/lwip_if/lwip_http/Fs/404.html @@ -0,0 +1,21 @@ + +STM32H7xx + + + + + + + + +

                  +
                  ST logo
                  +
                  +

                  STM32H7 Webserver Demo +
                  +

                  +

                  404 - Page not found

                  +

                  Sorry, +the page you are requesting was not found on this server.

                  +
                  + \ No newline at end of file diff --git a/User/lwip_if/lwip_http/Fs/STM32H7xxADC.shtml b/User/lwip_if/lwip_http/Fs/STM32H7xxADC.shtml new file mode 100644 index 0000000..005e731 --- /dev/null +++ b/User/lwip_if/lwip_http/Fs/STM32H7xxADC.shtml @@ -0,0 +1,70 @@ + +STM32H7xxADC + + + + + + +

                  STM32H7 ADC Conversion +                    +                    +                 ST logo

                  +
                  + + + + + + + + + +
                  Home +pageLed +controlADC +status bar
                  +

                  +
                  +
                  +
                  This page +allows you +to get continuously the ADC 1 Channel 0 analog input converted value. +This ADC Channel is connected to the
                  +
                  STM32H743I-EVAL +board's +potentiometer. The ADC value is updated, automatically, each 1s with +the last +converted ADC 1 Channel 0 value.
                  +
                  You could +check this by +changing the potentiometer position and check that the ADC value is +updated, by an +automatic refresh of this
                  +
                  page, +with the new converted value.
                  +
                  +
                  + + + + + + + + +
                  ADC +Converted Value mv
                  +


                  +

                  +
                  +_______________________________________________________________________________________________________________
                  +
                    +            +            +            +        +    +         All rights +reserved 2017 STMicroelectronics  + \ No newline at end of file diff --git a/User/lwip_if/lwip_http/Fs/STM32H7xxLED.html b/User/lwip_if/lwip_http/Fs/STM32H7xxLED.html new file mode 100644 index 0000000..5853c54 --- /dev/null +++ b/User/lwip_if/lwip_http/Fs/STM32H7xxLED.html @@ -0,0 +1,74 @@ + +STM32H7xxLED + + + + + +

                  STM32H7 LEDs control   +                    +                    +                    + ST logo

                  +
                  + + + + + + + + +
                  Home +pageLed +controlADC +status bar
                  +
                  +
                  +
                  This +page +allows you to control the four LEDs: LED1, LED2, LED3 and LED4 located +in +the STM32H743I-EVAL board. To put on/off
                  +a LED you have to +check/uncheck its corresponding checkbox. Then you have to click on +"Send" button to submit the new LEDs
                  +configuration. Finally +check in the 
                  STM32H743I-EVAL board that you get the +desired +LEDs +are putted on/off.
                  +
                  +
                  +
                  + + + + + + +
                  STM32 +Webserver LEDs Control
                  +
                  +
                  LED1
                  +LED2
                  +LED3
                  +LED4 +
                  +
                  +
                  +

                  +

                  +


                  +

                  + +_______________________________________________________________________________________________________________
                  +
                    +            +            +            +        +    +         All rights +reserved 2017 STMicroelectronics  + \ No newline at end of file diff --git a/User/lwip_if/lwip_http/Fs/STM32H7xx_files/ST.gif b/User/lwip_if/lwip_http/Fs/STM32H7xx_files/ST.gif new file mode 100644 index 0000000000000000000000000000000000000000..c639fa0144271f67e8f00d20f71a8588b4b0fa28 GIT binary patch literal 4852 zcmWlY`9sT%r3+KhiKR%CX6clgv&pcOyEGZno0h{ynH;@ItTwjt^;NOfbO~Dc*$KbGH1sraZT@# z{;pVugnDVCvTb6Ld$GnP`22#9Sg*vq;0$Tyz~t^yW&Wc+;?W$7U7;?K;=b?GqP!Xx zN&VV$WxX%^1M}OZC1uRe*i>=eE=Zc+K1lNk4ZT|99FsHt`CrxB$*sFW8{4|G?<#X{ z*IVw6U4N>RHDUR~);-zEEbjEmZkV)A;Cb`Y}<@ zdyU0`u)uu9>Qhq3W3jrNu-bl&J}MYR>1XlD<`VLMW(>etFE#pmMK>xR zP)tF(^!2*T>u+x$3xBIXcG+75eQ9>weblm|n9ZIY%?9@jfHnQK&GDme#+U zls5OJ7S{B=9^w@$LksICr>3p<#m@bimR8rFj!vt;U+=vwlp&P3Cf++#+GcR{%J9rD z-JN;7!`$d}*F)zWPUIH3RVyAfcZ=?KtKUtAT~nBzDKj`E_KcHSbA{$YDeqFfL5OI-xXhRv z=6ouL>KnE%uYN~RSoXbcMcdHK%yfEg+1fOPo2Z6%T)cR{aNy%KJEI2vI9(-IoP)%< zg*EVN&EVAB;X*}jNlo5uh1D@pP~zS@Jx4z z@)g}(lhb9dr+MYw;4$fonYneDiZ#(SOJ>o)|FHX?{`Uk9KM$l4Ougl@rX;+c4X;C9 z+>$~w_mz6rmb7LVIvgA7s4Z>JWVomM;V%r_53eM?D0ZkVgR@tp-LPnjW^a%VF(;gZj(=hf{iM0JJ`IEQ$#aO#TxX6t|;_Ws`ID;y6yohTVkK71ox(gG)u7W*q2 z{u}9V__EyE>`j4p|NXFs+O`6O;cdR(lDh?di>&tw$L6(~amj4psTViTug;81K4;XZ z>13717oG^^k5zd5^VHz*CE2O%k!XV>>ID3M z^{O>xop*5yimIr~jGnmX)RS&hZ?%6Bb2N)hd@H>B-Xy{=sT~5pkBwxqu+|z0c#j3r zzlCw0V)XuOFIevo<&d;&ILiDIhU;5=BkD=09JIbu_O&Z7Q0zR4DjSoOrv|-rYQ28j z+qne<#laY)y-wAq!r1TQpNf16+`TQ=Pc~~XdnQ$#XuXbA$#zRR%&P2GGGUmsMJVvX zWxYL#bLoX9j-t+nMYfYF){SnO7Nm&g9O)iCO-T5RIo5xP3WPgZ4B zMep^rZ!^0YW{+cBC*N&#`75lhW6|;D_3gvG-X=r$PqIvw;y?85YrJ~=%fqqq^@a=C zR`TW*x|ej^SLiEsNSTBWH@9x_|5)|qF@Uqv!utIoDWL9`I?om1skDr3{*N|kmGr={ z+Q#5bQzwd#gR(?xuSJ@b?#^kGlD`*J)J%2R*{1dY$2&M<#3@ss+naUHJ4QZselYp9 zhlSglhu2q%wJR2i9B3V0-^5+LY_H|t`gX)nZ;n&x8H5o2lCMNtb?|+&RP_8Q3gSHJa{r?EUvK-J4>A(HjXue*Q2m#8 zi`-4oG+O(jX1x0qQ~P3Y=94VNzjia8tCRG$rH1KAKB-rVcOna!TW}0@@^$?avCFPm zj!%EdSefaf%d*~y)~m}BGB`>{0ym50SeU@sXwIvD+G!IF*QSzR-5LHpV^))hwM0H0 zcD0v|)pmIrjwK|xzu{}+J;v{>{Q3Jw2pY4HQ^|xDUXdW0&1%tCHE3j`AyE2`Rp6v5 zA#mz+ug-m-TK^~|g-Y1iJ31J29$KH-)V|PeguIIDV_J6vTI0E_etJAu=O!0z`nn>; zxVboa1@HZuW0klAqLq4+r;6O?U!-6&<~U21J}J`8wR&Kt1fVN0d#RyZge8O$P^lY* zE7TNsLp8g;g90`Ni;SLHQTKW`rIgDkxptO|gHm4@&bV7Hx4Ol!`;Aj!mhzSeBNRwzE4i=g2^t&VoU26T9r3iI5WJSKNiA3f2M>c@q7V3bD8^ zbeS;K-Qs{eku=w`&amr}?XgX5tJ?6M+XoP4VOTwvjzrM7B^3oJ zlTUjtOpJt*F%Ree-XmP4cNao!_y!aFU&Gjy7Rhc4YJCzDv#;iMD@h)+Y@hTymv0(+ z{2KNFlgxxVO1KbfmxeI2nJ&63c)xT%;YDyGT_}tiw59_rBYrUWIcH$=unI!hrDX&} zrZ|C;0w<#;{C3s^ebvV{rAxC>h~|*f5ql$~+BVbnawVByLz}$FW_;^C>>I;%JHVK} zsbpU8!3=Kmk3<%)k(B*fh{IZ-JXKHCkwADd%!p-_yFxP zVMKQ5&ix&mKdtJjyTP?HRyE_|o`K3bbV^7dJr%b(#dK;48z=fti zj}3hL5M^?*6^ihAsF?|xJuFQ1z)bQ}wyToLlT?`ac>sUS5Ka8RZ8O~TgcYGpnK!7o z(Q5b`frRGJ_Vd>MCDpZHTzd}@ht0D~QU z^HtpbRGp`3TMkF)b2{GfP(I_v$dhuvcwyO2b_wk)`PQzW7j`k3<>Ys$=z~ zJNPp{drP^i=-t0{1tBo~pAAkwn_VS($EOYaKcJrt?L8Rt>$!#TYRp4IGaET1{(jyn{DVKZVwr@f#aMiLAh5w;=fx{!m`49meN?WHfH@P+cxyNl+JOY29 zSAR>?Cc_VFv_X~PKYfYOY_M3K-1dlpwV#8iPi4(ao7&_B zYt0DwPA{wS+Sc=qs)XAO;mBc$ z1*4b6wt&>jK9Bw>oO$`zpGP`3H?9D*2p+c-cYxn$NMuEAphHwQE^J-GLL_#hi9D|7 zYFQI_WbM3O@{din?`T96QAGJ|hR0EpG9x)a(&0q=sd1|q6d5PNaU{)gEOIo7gD^wqgyu}i$RtrgTAQqtXu{@5tuUPg8e4zpbXOncI zKwHEfrHYDB5p`fH+bZEb6C`jvMk*3~8$>5YqRi?Cyepw5S@ui*@)6Bfk^RA7q;W0jN4-{ z0_qHmOUB2lRlo>aZ?^$pH7`T^(hw3W@(TuuB}uN;;+6KCTY(6P|=IoM6Ary5%k$Yh`K9(dw=`xT3S-L_NVv0qURHEOjz!wZ`rX-oe!9Js< z32{i*D<-2n{^KIY0q#YZfPiaB_!1Fx<+~cMsB?nQ#APc-OUoEk^ zFlvN((aY%Sfmw5(s+?#X##{!70yFmUasOzU3zI36tjo#Xn7_Tq&MFe%d^L73mzb@` zAEa$&k{jePiCiE=jas!N=?6d|G0(@scnpNhQIT2~C(nPoi}{2jfS(K;nYTj?0IOV4}|}4j`BghvfyaJ zC1Vxgzr>_CMCT%!Hypvqif~pD}`3t%cvWRXpPZ~Sstm$l+jph)0NGE@Sgxoxg6cE zM_LP^%B@Pw^z?p59%4LnsFmSrERn6O0NbFlzTK!OEmI~~*#zNyk>wU0TfWp)%n_Zqq1gjD|fV zK?kd_KN#_=`Gu*RbpIvDIDz|+3>OKLY~}?PhJ2J6giZTN$>3m3Ve*iS5(ibq(MUWN z1y-Xc1SB(B^^h8w%0QonvEKxw4mA>ns+BOtSW6j#5ng=X(~UP{&sEgYNHjiy&H@5h z2p=_KGX#vz<{yC(9egkj#vTR0IKFNxjCk5bY6HLl2(00tZD2&M3JU=Q8v)jzgKU#g zhM33%4!Vs`@t1)eT2dS5b~uxm0VDn>$wQrp0cM3_oqYMxNFQI20-%*@)CddLOe3-Y z^oRht;E3*i4iedf$z|TE5?H+ILMS-82l=;;`hwwVv~)YwltbAqz{YWK)hc|hEF)b@ zX`6>JH2`K*MvPO}d2!HQ5XvzD@5Q`=j;Xh^Mh6I1{>Lbg$*8~8sQ(yXfEv{-*BvP# zrm9w^aj^O%$6Z=5-Vr z=EjL1XDlKC{U4+BgA#)4B>k>HA>H2OsSr6Ota;Df5ZfkA; literal 0 HcmV?d00001 diff --git a/User/lwip_if/lwip_http/Fs/STM32H7xx_files/logo.jpg b/User/lwip_if/lwip_http/Fs/STM32H7xx_files/logo.jpg new file mode 100644 index 0000000000000000000000000000000000000000..734a36b33ab245a83478bc1ce0768c0c153ecc08 GIT binary patch literal 2554 zcmb7VlA{PaPg~cw(N{NXh zC4_|$N(kf?Ig|oQR7zP@Szc9E9wq-RgpG@f3(5@@fI`=5;nG|J zYDQLxLYF-$*;9h(8zkGD+&pe1CaF?JJt#Q&)45xW4fvmEfaBZ`<~-LFVdu&093XDc ze-?j(Ibd)BX*ICXuHX%fm33m}6v^`)iwW?6&P5mq1{eTs8dk>KR;A&M(*EMNrE+o( zY9E+IY-%eaTXPq(vvaou9~VwH*A^T*qeau+Mv!YrhWmErk*-QhvAWH&^=;da1imV2 ze;gn-#>@~4P>-f+v031s_5ZNK!B%15zu!C!DYT zHt#zcJ+_UuaVxT(T|XqcZE7%jdmGxf4Uq8)n_}yG*jUwXV?Y%9zgesI;s)>RSin4T z%~n(G3_6hGZb|#=@zLL9<1O*$U`=YRP8WK}?z+1IjC)I%) zquC7Usa8yl#bDla-F!A}MsB)124^+@D7QHhV0dR zU(qC$V)(V|y6tPYpo0m?bL0mdn;?w&ecz?D#(dZ_nr4FHuqjePViWQmwd&;LNaHNG zlL%#gaF)Mw=9{>`R}Z##Uoo&hEUaTjp_3k`WqnMS`XKLhL1y`wp^AI7to*@y+!IBH z#d^^$UVu6*5PO?LyxTh`P)|Y$hVpbDwPCBHEA4UZ);qPCH^0jNGHB-bbf;1&UHSpR z!1}r3QFL_AVy5lQO)>7(X9u}xEq;r?9=f|8mX*&0ITr@yE!aOH{i!|u3v;Rr*hP52 zSO9akguzTddg~Kc*&rU%YS=d~kwWqQo*w8Wc~G_{^I3{)?;2d?vw5xe+4uc{EC98u z8=JPPsnIg>DW%`lu0<57%``7KIxMTu?}#j~yF+1wuU3>3URrIldF8}_Fx=3X z`5bm^Yah1G#EKL0GZnB&JYJ*kLRf%6J&bec53kAJI~Fm~uT?!tT8GiLJqw-0x-#PU zWO+#CnG~5X>U!u2iQOzeR#KaO%l~@IZ?EY`)=`Cxf#`zPyCoI=FZd`uhc1Qw6HZ$} z8>6qRMXU9G(Z%B@xd!SMw{M>Id?1fGTht#DQER2OtxuMt!EPst+CDIM(*T(s8U4P-IJCPDg&AbqiHRq1RVe$1Y6-W_tiR2N;H^BTAvUoU zrL?b;s(KL6uL%>IQHrE4ot}$0r4~1%9Vk&RK6}Gj%;bOtG*dPGg3ae8O{bSEPe>)# zco7m?ayxLYOM^=eZ6l7!MM~|#9D-|^p(k_Fn4eGSf7)eMjHBA#JM6h(=PrT{aglm+j_{f8qUETh34L9ox#dRCRz&JO5BO>- zX?9=pRYi0&4#EdpPxFm)yF09~E@6k}hK%2KKPf8QsoN zV1F{Ae_ZrY&3(S+Jk_q2itcO!$b?UanqTWsqL8!_{qEKB0NpRAciPhwe>AzW7Ucml zPI~i3GexpZgwWo=kdOjxHFng-O$^4Vcj)~&Ql(x_u6}DXKT5{uJlCFoF`%9mb0*Ym zmNJwd5vP&VA$Y2s4^MuLxWAg7p_X%PIs7wY;JYoxlK(C1R0^Yy;AkAduTpM&b3+A< zn?l}~Y#Xj57+o8c1xbZp`f}PZ((PjQ$SCxOfT|$6q=0g_h_pFECtpq>(s-z}UlG;6 zOun`ygn@C6`w-qdOwn$}kdrLTA`<@P9YvP zfHIaDxG-Gi_1F%}m*q8UuexuiDyvKPXY4B{Ok+x_u5P%{>SY>H!^+wgTn&jSUNdW* zLfVPu*vr@qY7Mew`lsjeh9>lUGKHH0#XNxC_z`M@=0zc0p6+XGO>dVPsTIRYlLnQm zYaV*&iYYv?0!!q$IZEtO7PF!bh1U1II`w^hVv1pAMbE7zo$;Z0I`ed&LphHzCLU^e z>ctnfJa*l0NG}&vL~*cNN1~a(SteZgyQzV~O@g;oD>yQX{!hySYlQjG>CZu> zoO7GLvuO>~s$yR4@mDBz#S9d689Q(zr`&-jAuv+3aaBtvbcaaK4SQVOKXYNow4OIb zI~%eAxBYM{kjn>)MpMd+3L^7<*n?C%bgqa4oirL8t|j4>n}EW3yuP?eQieZ?yj_g8 zx4q21+G3eKc{Dw3&5$-vh?M(Sx*!SB0_nV|_9e`WN4>kc!QDsJcN==zWMb`aXmKDs zN|)2)Z_LG7_12A)K+^|00z9ia*BlL3Pw&XIOcT1BS19(-d{{?@GtO=6DJ) z%0Fh#Ld4^Q(u*k7sA`jp@iD*cyPXNtT`H~8{YU!grx8EueI*zlT2_UCY$;Y0w|j5+o#n1vE8{YUnrsjU Ye&xol&5oUx;-zB!S`liRN(yW4pG>V~F8}}l literal 0 HcmV?d00001 diff --git a/User/lwip_if/lwip_http/Fs/STM32H7xx_files/stm32.jpg b/User/lwip_if/lwip_http/Fs/STM32H7xx_files/stm32.jpg new file mode 100644 index 0000000000000000000000000000000000000000..fe4b996141f30415a24d19bd0b9d67744d3b1519 GIT binary patch literal 40619 zcmeFZcT|&2w>KQA3L+qc4pF)kk=}`jbP%bbqZDZZ(pw-R(wl&wqV!%Py@T}LL+`yq zLJcjvxu5$z=RDte*0C0TB4T2a2M@_e9*{pECMKgI zBd4GQ0)h8QscEPvX&zDnDgPpJ2N&B05C0xM{yj<(ViL;#&)4lA0QucJuW?0i?=S;! z$nW5i-??oEfB=9y_*icLV)%bwcW|&g5)j_KM?{RRP)P>Bxr2*~gNOSU*Vx*A*#86Y z$nhUO=9eX)(0ohC>`W;T5SxCNX!sFtrBBc5OA0B zMQnO$%RLrBEhNy~WrT=|RcM(F^_OV>knF!E*r)$rlKs12{~^~5;6Cmh?BL;&1HgbQ zLJZYm1Z<1<77#al3qVmeBdev1ZUM4R*NGvwfY6ecyplF0Kc99&Bo5I=raZTRv}%m1 z+%2G8JES9(3N{S61+Zn@0#>-=$-})=c!FFD%_5k%!Nu|Q zkMb5Utc~qu1>1{l+e%0{c#8weEeeJb?laHQ9iTD^@o>jo2?-mzZodT_net)SzhS66 z!)^ipUT=WMJh>|2i%Ie$^p6$STL3@!`dh>;AT0M5(Atj@y}@ff!o#xXD$6CyNG0px zW{=`-&&8OVUEpAe{gPot$74QWzko69wST^zMn^oVmtaH3u4r7|y#=gc3p&XRt-rvE zl_v)CJO)d+i1g{NQcX+hcbC^MQ7o{2#aqB5Y-u061uVZs$6!8z|3U4y9$3XQVPF1B z$-p97-}Et-K*-+&(x5L;)Hiryw}29I?63%jt!pPT5b*?gIK+f9{ZqYMQjk{&<`d|G z0Lxq{w9cgqJ$_WuS})QS(|{c%S<>r35LTh8w}5+_q2MiS%P$sKJ=)XAp|vMS4aFgE z>JRL(TJVNrwTx}>s0+*GDE5KpKR=j&Om7`2X3OYKiT}v|o7Cnl;Gb&$)qLm{fRT;) zOL#b|kLFsqap7-QnGN_ghv}nRKJAjv{Wi zz?g&nq3!RBZ*c!TZGpkV2oe%3gBL#<7OA9+CF~Y2cu8*o? zW}d!tBV0L;6ubpIhW%}pIij7UG-u=3>23(ZFxOTEr`tFWJk^nT=QeN!fk^SN-<$?<2&r zVq7Q}9+r8Q(f7M#DAixwACX!CYXy_Nh5DaM0B0$zJ={#dF_-VKHg^5&Mp1YJhD0vT z5Mr>MTxZ&1Z!u;NbYDxIb##NIXU5L3_n9Yg;LV!jU~W0?XtT5o7gPX&0eTfUaJ<%L z<>0e-BY5a_+(zm=9NpOzLdXUD#=2DdEe>(K>#HPV#o?qq30_`qt{}a^YUx4&YeW}J zF=#KRecW3BcFtlnE3h|3_^&Ov_6`CZ>({-0Rtf%bvpJIbpSe=JmJ&S+xCNyDHG4T{ zV7CC4$w4>GQ#(+1(;Cx6?lHLGQV_#LfAt(Yzy7N8)d749h~2scgal)T!6(=+>+~8} zo%vi0hRYPoT~N;j&LA+>=cx*?wl6)1fslE0^>VhBbEr68dCJnZQ<-S)W^%l^5@-KZuH|0Tk z>DLhlvio*0!K`^5TRl{NA&eV-mDQ~DW(9P!l>R_0$19m+)h ztFHc~^Cs7fn8Mc>`SVBrGf@9CQ2%35{|{^auUHiKe{u@`bp`LT^*gv$vJBDXGxSx- zRVh^8901J4QoNjoUZzi?Tk&(b#>Ul^9)9WMdY7fY-D0~F68>CRTWFb4rF5(v76f?t zFpK;opGt5vOMd`|S${{9QK=M>A^4oE$ZKC?R;$QuJvxA#%U8RhF4-cVO6Exxb6uB) z{?4E16qejK+&scu9ns?wUD`YxKqUqDj{WTDp^CXShvtKeQ7-H4crD(WfHxUOQ>9x{ z<2^U_D?@0`!*)JW6SUq?OPTkRLOF?r4%k^-vEv`|YP%yj+@V*WngtJ}oC}4=9LM2o zcVA6E+|cNERqpMdp+sc*?!aC!Dd}oQ5?nRi0yGTQ8@y2zZOtSVXtZj7KebhT)rBy-53{)iJU|ah1|i`4Zo6r{=25^Z z#`dV6Ve2ipQg;S?1=6haXt~;$n?R^YpI528O@*0LU6ecvZ-I zW|od0mRLK@%Q5zO*UO6kAzTR8pGe3l0Um8BFT_{Jo}0H#hD)W|b)XgPSNx3H*w5P! z3SF5mV)G)O5=gGp!5>{h@?T{X)Mj`A^Hm~iE&CVQlZIndMnpEnvuwDv>3_Tz^(gJF4hPQ{3&>4eSB54kRy!C*oh&afA*F@}>hREDR-D4|~2Y;BZWY5u%9TGHC#@gr{V*wOGFf6Fbv?Sy5tkv6mA z#mHFXFV<|v;Td&<)C3GWav^=`#^+dZ++k)0Gb+arn>rjgN8T-S`oqiy#L zwpRHFdT5J^E2tsZc-#|t`Fp4Nn-5z4YbNlGZa@oRp780^`xotUKjGTlh3aDob@${c zAqJtE@|1x8rgG=K7qYyLI?=c*Uuq3!4)4=$E^NGgE`3P0XhtSuxzX3Pa%3M?!HlRNx$aOmDS=JBd6=q!rMr}*3;i2>xjm>fn7$GeEE-I z7D9(lv&j(=jL(?$2e4*eh_(H(7tG|&T0Fu+&WJ*q9A?htjfn1Po^{S$ihW6wI$X#@ z2D;1@RojhWIMulB=FwD!^11P9`sEld3UoGws+_w|A!R-;~Yb(HRYt|)_Fc4)V#xo{^3FR==|+-@{V*rYd_DBd<~8MCO- zcw%)7aT-hu(95K%r7shTQlyucV{d)4Sehve$yPmVpI zwBq_wFWtNZk8G~0^!39z35(lYSD#y&oLGDSd)G+aQay(5Ywr}QD3fuhYr=_-1{K-s*Bf2!iL74fECofpL>BM7 zm+W+%=HHKm%;|kgtjlij6e+v+I94v70ck(cIg z{fH@QadFqozK8MMt^{vRefGTVB$9U^8R2k$M6BD21rMUYRPp5Jc4b|$ie#Z;y&xu}Feog_C58rSH!b>B+u4FU*SXCCQf0hx>^_fyr9`N5$ z{9A)^gI0nJV@DGEVt1+VT>vi+2VTH#24fG5E^V9?Qt%76OSWF^If5$5N z3wD9liC|QVMT7xglNXteb9HHD=oB*I(3D0_SVuHWU5ok;Q$=f%&+G{3td?*)X#Mnl z@5pOHUR6t@$25N!JAiY@3maQYJ~5ACw4YtDkiq_h;*d(JQe;f6t3D9P=O8 z6rFLQX7IDq+o(8L%SeuD#@jXYh|0g`lrRuEh0`_?t=9UEPAxj6o!_&lH9FJI8QAwW#m?Ny-Kj^Kgb<{g`nV~ z6g{*i^@7u_Dw(-fm4m4*m!JJXZ}hg-gNbmjcPF5Nt1#mEXAyd3(Q?DecV>2AM02Cf z7K;xSY+a;GA0hTR-VRLm2y}Jn#n_mG=i&UQ+*UpcD18kzM8Yp7!c8h9;&tgsXuLTT=mr(RMD!QN?jOnZRXmI29d~s;;+kylhX?&H0g;T1w?fbDKd-AUqv8 ze^ilJ?8wxMyl(kMV>Of~jNfIRf}!`?``e-?cIZ8owr)yI|*C$Q)~HQ*_vWiJ|~GAA~W)WeP_jH-1~Z^-KpZ5 zfiWsY!S&`*E@NQa6t1sUYL>SsrT)99YOI zGp?s(gZosevGlc&a4st>`Q?Zf*Jcc6*o<%)UAg4F&n$0ZHzc@yOg@MdkCBNKyIeYh z4{{gU7L{04*F>eKQ1kcDM+*EFdvvwYY_h-uXRr0%Q@5Oz7;wevX@;xwbHI#x2f1yp(*coXETUW^Ev*1LjjfMGpbNw?R&NZN_&Ef zHE%FZrXqVFJqlm*TE=!OHhw9(OLReP_uF zzaZBRkG06f&j;F&h5yLUjF|XUdZp9H2v8_R^f8KSW$SOzbf_d~rLc4;ilQN$#(O-ERax-9Kf=5)sp9I+~jKR;=6TEg8< zwm8QP>^X(YOq|X(@~W}8MDKBTDHObjeE{+9Ff9Z92xF zBLW_IwU*({)nlcu<_XY1NJw1tIAESW>eK%OQ;5)XC>Ml3lu+>4nwu|$2j6v z+YCP*tsV8ulSzHlsKx`?T}nM=7XHRFvNn<3y*D(8#advLJWop=eKw0avcC60s+#qK zBA6S4t$BuP&$wqVWTI~!9o)>|Pk}*Dn^KjWxsM9tCTN_4q`5P^ba`zBW7{tWXD&xCHlk@0vVwY*K?({d%voHLkeKV2 z6GHH?1@gL-#eF((=-bZ~f(AYP-#6`Qq*B$+3qZIS9(&IuRytTjrhWbwa)RHXuZ=q& z$hd<&WasplI`tYW6<$4ytWHbO=<7RzTrqK5I>*)7gT!DB6*)?rC{_why z%kZ%DTxb0ZE>1ZtPR#9?8>JB zPB?|MtT;P;BURD%S8ndkm$!w7IMK(E`xiY~L`KcSe85*bsoc_A$Q*BB_s^;GPW`g(9d@m- zBJ5*(husC?{oinqpt2?H*3kki@&KhhGzNO->)OcYf7QJU^eeD3lsD_mB7Pp=ogeF$ zr?g{b_=c-kscv3dEA+^A4lrs>k4AQ30>2#AMLu(i1370SCFxjZ0kk@ z?|X#1C`E?FvG5v3>ZVAFc&R2Qdf{aE+xDN}?oU6?{l8znEC0F*^cGaoPFA!jOzBmM z@_Yzji1Q&jc4G7&ULZyi_uwyNRZsSUS4X=ZR0-Nm?DZP+=q%(sF+112W zHXX8{eNjC)N5uqN173<8Q)P>kwvQ}Ru@sKsIE>X-vGXvJ+Kl?NyX3yQMYds7)tS{f znFfRdF`2L+q}Qvz4>WbK;#p>XhxNoFsBbYZ4#TN>wmUx5)b{imr4$){)_GK+kQ)Yd zb}(mrP8jKIDi8Mxt0epo8|_z+eR?t(Z@C_!Lt?X6JT;N1$>G;OOV0k&eY0qVO{#37 zJ!w3s4LXR+w8Nc*D88;{apgZWaKQT+@o1&0vS;e>aSaWVd^hY&8UALZQvX_ci6Up` z$wt-}npsbCF@h%Nu^ELwYYfMx14|%bsKk2tr-5pj@4!a-PHXnZPhM;$8W%0lBeH(~ zh$e6LSSZ{#iTNz0DV>wNYhGDI%GP(~6NIw@3{atD(D=w;fI<{sEPh)#AKmC=l? zTCS%%&qr)P#2j2ta$A|0YirTIB=ea{%euNl;v~`B!%*H;;uuo2iLk@F?S+jaLbPj^tw&&Q^-pcR=M4Z#Yv6Wo zmSMSq$Ch8rvWaclC&{1U&|Qx!RQwJ1$et53g15aiMKTZp=}5)H@Qa>J23A}Jes^zt z{BG?QKo^Ha_ho^nC9$H@;i|O#j(0A@k5H5s29cS5uVTMk>NtRWDrpSJ1gZ&R)h*9T zC~zVaHS6fAS-taSWNZV}iWRUR`Y+w8SC#aSFUO6)J&ae}eqG_U!z~*xOd*#dG4^Q4 ztC8y-i@0zaiY_Q~;F%z6$V{O!iM=v4&{Qe^P86%Ko|1-?Ui$`~=6C_tn3)1q z>Pma;K`M@pz)~6HtVv0tyb|TBhD?li&fhuzJ*D3&aI7{3lHKtOg4&`&&T0|Y@~oFm zpP>UB>OFdmQX0=rL35yD_u)33c1c;=xl6U5A*ku~SH?mPz=o8*>%};k&**HFMN10N znB$)NZuh}j3VYbe6hCVmH_qKhe#43-+{d4e+h)vnJT+`L=_$DBy*5}}y5cMN8DH@y zjnvd89#|)N(-{~aSi2~5AdT>|FK%BK9-l3H*?a^}LfZY854;aa$ud%hnx$svxtNB+$Mq8l=WA%jNTJk7pgM=8px)a+%VWVw_Dy zKonY0x{{Zv(pq1wsp&yO*+Ajb(z3>yY7TZH60hSU-+IWEK$O*M#zOIcv4U)P|QyhF`A>P6rr8rFLamO z7qQbY9L{BBh{s&467d3FsaE(rKr34}jaR8Ki3o^27^myy=;rg-WvfKYrWagBXIp1X z4S4%GGiGOTnJVYJDM<6|fk!oo`AXbr~^b%7n97Et}z{u~w40qnD%H~g!V!IiGpY$t^0%VIK9M>Kw8 zOt167ytix@v))Nl&7F7XRj(#8E6MyX@OG#Vdfc7Fc{*ndH z+Hv}R@JAY)#!NY6bj0%aml6sI);XQv;0gQ~uoi*38y8=G2ahGBwZz{MN^%SMWP=WA zw||hn8UaTu^86$@6Z_+v%ajs^KGw#Jrj}MkAq%x0ZoL+?`4)>y`b)LpVO|@7|#yej&bhF1OzP zGe#{S>4-FZ0XJ?!&;!1HkKUD3;S~O%q1K3A@R0@w%ldPF3kZ_v>-XhV2r{k(S>Xyh4U#7>EFRqg8u0xXudKX!WZ3)%e5fi} zx^CdvJKH2{oU;6JwBFZ>n`V#E)EXgLl?~w&`unFh{M6cGRxWtK`rYqBFnDQSq@Ncb zh9x!bm;7A0vmts031coFe;nb=RkG=7fgxakloG2@Q~x*w5ney-^?RfyZd+^mRSqv3rHB1cDk%cKDfCU(U1_zfd$Rv0pUr8LY# zx+{w_b#yFs7?e7vps&vU-I1~N7oU@BdxMTwB<=#SXTb@a;Ce>_fl9w`ld<|$WscFb zl&iwE^!Hdu!jWsPJ!CyhG6@vC#&6Nlr}T>39W2c89N7vz5L%xzVOrBn2HpEPBM7yc z!YGho*q7J%3Nek(QKyAP^>!kf1G?QdX+5u%K|p_{n*zcZ#{4*IWk#Ju#)gTk*p))1 zz|oHaS-~~1uv@@GH@+Z$#&3{`gU|M#9#v~!^@ViZ4V+v|D~VYFMOCB*F94fR1m)m( zE4v?ED5b6-dB&*}eE&DsZ_tfJ*XAh8nX3H9(euixl5F7msu(HGQ)vO;)IX5Sz*ec3 zB^XM-O(Nug+GTY`;lW7sVLe9ovMDrm<-D`lca@-O(lD~w`gc^!v>Q6?XxZ%MN2C5^ zs;1V=OrM`SNd@^2>mL(htENTmOLtD$o67j3#Ev=)ST0>jgEK#6(or&J-rb7@0xy9` z80KDP)-Awd#tua09#I%^5o_tdr~Z~f)6&{rN%kFBy*bJUn~NcNxRe@Ojv?=BymH=v z*%==U!56!>O?8fqrP!=Ix1b^%(Pfd+im#q(SL+vpsbYHUxK9?_7m;dwa2~%tx7bMdB3){$rYXRrN_ugNdI(K!?M+4!lF@GT73-2xK9 z8<)^Ui?=$=L9c<&{{TKbvB_u>!*~)|mhtd6M0;f5^e=qW-VH);ujD}~ke;0qh$C-R zhn!dBA-0Sv92luSU7A{Dd3WJ#754&#ufVw^)$!Co8D?jWP+<{M-I8n;%$0B|#NA$; z*Kw|Pj+HI&aw8wIv%(SF-j(R=VSjo3*XCyxtCo-dUWP}m!Fl$J_E-3& zHCH^m&LXrBON&Am1sGAG(|xTj@wnx;mg?Qv%E$C9>onWD@!N)VBB@2_a=j~&Si3`4 z))&;#1JKIpk1|l_z-Z;A@lH`&!%bs^~mkSCV^7+ z&qE4Eqhuw+?RGX}7IE^kFG1{C(UOQ?`9!_4JH4dW%hCB3O0z{nnMJeh;;7` zLI&iOC@nKz*1Gtb2Tm>>2-iFXu7E2%+h7r?_$PkM8bI`?#n-=+8-99}*1voF)l)8T ztkLC4B^DjKTf|G0c;&|5eFk=vm6jFWsfCb_7#yE7%ujql~lIx42rV)yk9_WKjgdM@$Ccqv31f6=N z>ZP&V;4+&%x+_r@7$K>EuX8DRVuqOPZpQAmv8i5kJ4snH(t|lOR^@R`>K~6<2%|N$ zxZB};C5~(6kwZh`gsDE8`JukDjFi7sePY&PAn3-cmtHX|Uk|=jn_2#r`+joe@=|W@ z7T|T2gfhBdYwp1>M>s=RAO<4cI^$pY<&ryV_GTMWa*xVN1G7k`5zp(=@! zP24qR#M}KZgXaR+W@FTATm8WaeyPZBXTC`5mOdSITopOrNSRDG+&NMBz?3i1$s9xt z8^h;s(WW}faZMpa5(FWy6hqX8-L~HIj=YEq73~Qa|Cuj5#`9L5sAgZI_=Z%vYJN&9 zK((5(;vr>Zdfn*$09Oe&piY?MJGtx7(cnqe!w_1g$edvL_RF70GW+A)vtMZ6Tqr*}h8gX%j)l=R zDtdBZz$))QX9wI#S>9#>(o)i|toEjl1@#B;MrkuG{ia!?<(>SZCG!$5bjn|3mE{eI zEd>~P4%n}75-aopr)VG7-`FQbU!xrj7A_hh)ITd-bes9)^?w z#-s`D?TX1A=g4?2dnjJpnP zsr!QW>9hMXwoRGJxtc9M85P=FYoDhHT#Wdu@-dAsJ;9;PDUJQq)7HKa!VrF*8hTlM z&DLCg*tReK$9I>$zWC{e+I4#Y%VQ_>9o#K^54o4aEC`sjiIH+MS~UwT35jAiacZwO z*B*C%ct55el8)*8Ft=?6!mc@wt$vq@it^F>JZZ%w99Qp^;%|mFiFk3Vg-TVOiDvi( zra9ho>L$9ZK661luDhw0VQzaL9;*uMC&y>}$_EY`uzzBk{&2_de3^bZf7_WMh9ANT zQMT|ZGch&{JZ=Xz<8XI1-A89g+Z&EMXda(=Ji+GJrK;=}xhIsPr=7Eu*8OKQv)fgC z_xy^lJG?7xj|NpY-i&Oq`e<2rmgdtct^5dBsOb-#_GR+h;V@}hDFUfD_Iq~cDC>S} zvST-yKZY<#MTQ4`J1!vCOicIMS&K*t`!@5v_kHF4uzd)l9hG6>mk|Z|mTg_@SvpBc zJbAoCi;sXq!-tAyPcd_;bfh1zAEZ!@J-zR2_)i=nIV&5&GGNdbC<|%sQWM2e3+@H;qV>2st-xs$h(^|4agf_U$6uq+<#HK7CE`;F%xTm%_v{(TGR2tubLIaH#( zp#uKrSirHi;5aBuzNHv z&vSQ3Sk8Eq=gjO>QIM1wnZ79NTpcdNA%RAq3NiQUmtnwrryzhSHV(y||Ev1Uuf_Jg zrA%O9NBnlpgI?~vI_`{U<`Tw*UqwC_{ti*Sn?s-TR@X-^i(}eT>7hiZ)HXA^X)o*c z8KD`6^|f7+iba3osD4Tzmj^U1VmpG}z_aRo{wqAR%i?nQ4mK@wFRKDY5MtBhUPkpc zzcU;+u3^QI7^m55jl7#>4+cbo6;PdVGmiDSa(UB-2DY}vk>YxUU;cdJe%HwL zBio=xMMAjwonNA06sqRO+gk zl5Kq1{UR+gvWv9pPTvC=i@Q5EVJr%eAX;1b`@e)W(M>p@ANZ24X> zrgcW@BAqNOr7S$Y%+Y&YAEkFu5vv*<4yvn)?S5t*hKZUbYwc7Q-Ji%?6=VWW2YkIv zX~zrqnMSUMM!i5BiINPZ@n-ee@S-}t#9M%;>(F7*#N~X3BdM;FoH2B`;-Qe^v)&K# z9;aa|l8oKeoZ=vCvbLO=85`oVnGEeCHpg+6eHU{Sciymyab6s~i4Bma)Kffu_D}gf zcYL)C_Ax`&qF?%699U6K)=q^es1s{A@d# z8^~KUUR10TQ5Al{*g`);Db+`3dGJQITa0mcK+0*!W^-(9tWs>Xam>kro%?%}&AMrS zNIB`Nv{Sfd6EbR}w)koB{c_v0OH1b;#STY94m5<;(@HBZ-!o>pBC1^tZUJOc`rxwl z;h==C)Pi%w^_8F4ZUKsK#MGyH;;;6e3I1WUFAFk^ONzQUtlPhV8D*}O>ig(y*A>VN zv@P3VjDMWM_9=-0Uj8Je$)!q85HyP(CwWu&pNR#xD+`it10Y?10#KO{aqVE@DB z`9o_r3#lhVQV?yFkxqyqI-z*3_3EuC&ZE_vARXR|eBr*G`=*ymKjXbTQ%?d@7hKP4 zH&cC(c7_69Ey}ESYYbGfCEV?xTH#Gshuh;9Um)dB;LQ)=!|-jV0^{yFaPWNTS!bK_ zGeSItY!b!%IlhC5Q=Uu#`*y?IfF{{3(J<1oB=^I}k+((;sw*<3ZY&({>4exN-LR&T z0Qv%#eUX(gT6XLq&Jmt|Pt2sJ7@_TPTGjPq$LDEg#xoPuR}Eu7#b&)7k-sjXe{>~I z?Ll;HM9L3-qNvSE1){QrIg^wad}L^Au1Q>&Sdp&^bGz8{>lSs!*39=|xxc*vIKa<9 zu3OIw&Ri=OnxfZ=OlXCv=8Q0wlk^7FMh&4io< zH>ox%E!Y@ZO@LPqwhUXbID)b49E__6VI*&S82nIAI}f3K;OB{oI4eeiTh*WHNqnUn zERiMGH|Sm&}>7y>pdt zws#m{+IJ-a)r$Y)&!_)6(!sGwnMJ&1s1h4wOgLJ*Pjt}qzy=qB3QDRbDth4DW!P%O z=!~wEi9}B?gZIT?)v+vz>I;@!GA5z^=ZNUa4YC0j9<3+F*Ma!6&5b_P?Qkmkh`fpj zgRirO*U_*BuWqK+hH~9Hw89j}L{<=1U~8jV zZjIMND~8K(T{#=nxxCY4V9O^s)UHU@MAA?#Gl@(M5F*8$A$Gu3C>wpuf@j#8XSAcp zfhs;VJq=iDX50diRiy6ok?c&=4TL&G31=?*aG z3qM-CfvPjXywumm5oH2+yenJrb9hh;1_$d5@#w6LGG zZuA~VhJSylnYNU-Wj_;H&tzF-*f44xqZgJ%ulg`BRkp(?HEeGMxfpN~L(=nMs zDvY8Uo_W7KoAa}`EoQ7z3Os6D4<$@VuOh5B7Uzl7zkA^oC3oFGakG})+&`QZZ-fNzhCX}0L@)c^4 zNNvigG)j#_RX@<61?@AiI*Gx(d1nq9CfB$8Lr2u2UnU91i5jrHtu=ThOIRaxc_D~= z{!dHCUpNu&Cv*=I(gtIcdU6xEVsl_P4H^hGGMEt!R(m6cp*VRX?{A42SuBNzV{jVk zvhdJ>twz7=vhIb1a0Cdz?qLt6RvLNRW+m?U>j_QSw!+187}qw|A247*BCr$H1J0?M2%$6CA8mmaVXH~+iZR#ESwR{eE@N&LW9j{g1p*Q6** ziOrB@D`apfi?^nWf0w9U1bAK=B3&ll0qrnzP$;r*(FyLyd~LCKHr@14c-wb4Y5HaW z-1AGlo!3dQeO_lJvl#Z!=)zN(lR>HBM)3j|tGqR|s&@R;`<0a${^&!G6CZdB7Abqe zMDxFQtaoyK^NsE4paf^PfPQJGeAV*T<#_$e2|dWK_Y{K7E8XqEH0!h>KD+tR`Mnp+ znST5AGBDD%8WndIuJYuUO_XOQ@SGWM?_UWiSNgYr3R>O+i-i%IocD1mDJq*%*5aoH z!tj-Os^c~cYxD2sV6mqbU*mp9zU*BTsPND0m3wknk z$yrmCuiRlaP(GHm$+cGjH*}Sy{BbYN8%g$dk!8@|bHCs8t*T_NnR+dTXVmRRwKM4~ zHRsQOC(LDJrfsA7IRSzGiLNFB2{-|6eN)eLo$UtZP#s8EjC@<_!2wyYxOED z0FiV_p^Eem$p|=OWFJKYSDh+@7D}Jiz_0+(o{Cz@8 z%eZ^@Ge14R_lfPbB1j&q>Ptrni!}x5?jhJH&wWf6On%PXh)R{W-U9BQI)$qe6s{;6 zsSYDx>9!u3Z*=x6eK@=Pa~iEx(GJUgbd=Gva^>_2qN-%EF}1u&hi=XH78cEH^~|Xv z&GwHPvW{sKUWx9RI$uDlpx~Rt)1SMA)9#^fOMl1GNm@6U9K*#H*PqNh5RB@I3=A|8 zwtrKGKGutCPB|RAj$Kj^uX5L(#=fJEKVp;kZE~`HzI^>gb$K$RlKai1Kd9WslI`WE zId+Y-H-z9QZ|iUw(j8O$I0uUsh@iu3_0DhLLDpBhf#;oqEt{jwdMAq^On7MP?CqZX z22m|T0wY^@g@<4c=ex;*sj^A^SV-WowfP~GgClg`?PtVpy%MX9`54MUs7Q?KPl-#- z;N783)BEN9ygp$P>hkqZ9N-$;Y-5alrOx&=bf0^VbYzP1cTS#YZDG#K#zi$G4lRK9lP>wSNqsg;()hYh0#JP)%lJ$)zKAxD>z@YaSk7GEua&LdyvHQ}%8 zSLiV0>Qc@jIr@j&6|dG3GzM7ExVGlpNuV*&B#Vx{vWCi|ciq`Tknk6X_wQ-;y^C3F z9oIJNACUR_SDspTfTmqrV6;$+++7U2(ey^e=jRR?Ki_L{vPR8Wy6>AwqsQ78Y2XdI z`A`A0;?nm9()4MiH}<>wQq`8*8$w+lNsW)}Q=pT3F-8yad)O=E7Oq(SRKkO1tONL( z7E!sT^)-{MX8cgmoS{uK86WS_Uqvia$ND~`f1H5VZV0DSzB}lrCZcVzr1P0-1_UF6 zRdCY=R%-|)gWf5n} zWN|7JU3SSYJl|hfrxfA3{>g_t#cy|urjt79L-vFMO{7tM5V+xb<0c1ejs0N(J&CTF zM?d?=oaSfxV-uGw(`7PG;faU)xzQI9EK6?h7`adF&kE2^qV0S^)j1=cX0`zb8332Q z>P_55+?Z_tw>z&ZTr`NEvPN#&_K0nfZktj6(DX9ItehL{E*1Ehe`~l|b3M9AfwG2J zHYWQ_xUUIzF_e0z7(KgSXNc*WNG&q@O}qB4P%$5~*YRipJX1nblDFe;EsMndihx<9 z47FD<{o#WhPrV!jZTs(@&*l(℞12z&Xea2)lJy%1$h{B}hd*CGg~{bRQ65$TP+U zexhAdR*&F;bo(sYi1f3e&DY9qu`?O+3@QC%hJ?pkd~TSZxi2T1;L9XwEI4tYH?`&j~JYWUwY+Amugi~6+aJbuAduv$zJUkeOGL`gC?kv*W6If-Xfy)C-r`DHqrii`ejVC!mZpeW_c=@7?T2W>wGB(0ndDD^numyyK25MlNu zHJn9F)B+bW#XddC8;D!~pl)s}@jeMr)>FZwiR_5-ZBk6&@O!Yk1Rb`Kc~prg(Rp@s zz_$5Y-x&Ksz8|@fA!*cfgRF0%v1*k_%R7q^NLq>L>n~pZLe-zt288osu));3?|ML? zxW~C(+OmzPM7UFq!HY3=WIY+I2&R$kE;p|yo1rI-O@j_`Ck-RlBv}G7Qlpp)qxX~`f6SmR=$Xy)0&Jl@4oc2jm-U}Q&itnF*Ya< zkn3RgNVRi)I^&=pTt&Tsq5C8+^~=3bT7g8NjXQcJ?^8NW9*udiz-`#VvgA zWWNO}rol*yHJI544DiiSgEVlI3j>E-U;%9tj$v#h^&f9TFr6a*7hP`^)m9h2`%;L|UfeZM+9E0L5J(H9xLXT_6n9eGp}4y{B)A6+5c2JOdz}A1`&^uh zWaVyUWMs|x&gc2P&#QMih6z2foM9FtslPaU#7j8oDN~oy8s7)}$g=cx&S=;B;25oL zju|}Jn(g)*4b3@0S~iHK>`NvMK0^&j>U`03-6N3QKjm6G?z|4D(ZJStjz%8c?GRQt zwrCS$uNT6gYM5D8CUS0S(b}rm_$s^A1?%zOk>gc4ZD$)r4!R2`HR<6?Au2$&Dwg?# zu^sl3-H>h4T?j8aliFfQG3&Wd$jQMKP01y*yJphD-om@+pL|@p3gn*bOyYHA4!as$ zJdQUR6YcL`Y8o(kL?bqb$`N?lvph6UN0BC>{srMqr8Ccz6yf z!}_fk{l#E!ePEiULJb4{YK{nXj_dr7mgL+`kKcWaOM3R)=qSd5!TL~vyL8aH z6Q+35FjnEGv*+WPEl1jrpeNyX8&S&3;W2ctcbl9g?iVM&R&BCpUi25xi=>av`xcaR zv~jNLuyM-{-CTn`TJ@X)|BKzpp?J~g1C)rv)On6nq1EiVm$56cjQyJDtSks=u&-6k^wZA-=SS8AiEmFGghC5?+5qEmV19+5XJ9;6%~ZDq9a4ZP-5kY<2U6|7+yo=h(T`d zWMqM+P?i0Pl&s!f>#@QiDP?D;CDBO|Z7ah>$VGNf(F6NJj+BpF0BEL?UxKS~T6q(S zoPt?*q4QwjU9Af*!rJjg%E9q+h`o!hSVv;@BUwrMVM7cNniw3$Lar`7%yYm8aVq>6 z#jPlmF!0n)lE864%2uLm(U%X%*#ELVRBPFnb31K0$U^fsJR=b^5S&=IglrT1#UbCK z=4msm18iJ9U))A0Trn8DjOf%YQ8KSi+i7qt$h*3>pXwRIa;BNzcp*r;jLM`)>nKy= zH{IH#M9La^*?7LZk<&AM=0M>CFb(q6nin}#Y;Fp3;y2k)6%P63bY1%^#3qV7?tECU zamsq?!ck@S&r-MJgV1`_;J5IWhxFMWw;=>>omrhQzpC@)N05E536I!Vh~J*2YsryOEIp$JhSefw+ul7GUH`+9|iHv4)44iDee2tA!r)l>e5(ni$U z+vXv9SDVk+lpqm8WmP~L9OT=M$iz_x_AB5YE$SK&-j1Fz>ISl$B!bl59Pg<@eN2`Cd_A*^`S!H!9a#&vXb)V_jA9*91km6v~SAC(H!9E3Kw=)k7Qu(+Rj5S*#3OXia7%P_uECwcg7Z z^*mqb!0*8h&wWR==}O}Rwz@nwZx)W0$+=vo3B`maF?9E*B}nAUWnmJp{px#(I$C^5 z`1AVM^xv7S3H5X7PK zUg<83EQm(X+0Z@yZFLXK4Qm(2F&JZ<*Zh34SR{|J3NPbxwdG<&qz#4R=Yo7L5amX{ z5fE~%`A&<`2h>3O)AN5G;r}dq5*-n*_o}~hkqqn3)a;X!;g6mS$wOX-+Wfnm$$yHu z+akB7%dnD#s#(fU8#_9BW~76^*$e&^y?_GBYEhC@)yMw?TnF~b2zXTswLyFd!`2!3O9u%5?A^4Xd6B3iW z*>O?443{(LeIh?D8`*KgT=4CjM?+}*zTEwX%$3S|;55*QzCaiY9oi^TWSL8~9@1i_ z5uV+g!ZqajE9jZms5xq;6?>P{tW5MR@Cl|yJ02TS9SJzDygJi1t+~ zON|l;W%XI3{E)YL6R)bQtL23_ox>j%kaD(0_5X8?p6zPvo7ST{K~f)B1=h}^G@rohBNdJLrVrZ!Du!~2HxRE$wOcHsG2 zs^BkfbVqw+kEwUZ0_QD0Yp6&$jk=?jL7k1MT`($(e!K6Cj&s6qI(nb21qQV^I0EZVYSs2}j|19|S1(pp>^c89k%Z9`fZbkAn9ont>JoS&CHv4L>6$G<`9IDajUUl*m z54Y303_e@FkS@W4PdNUGnxY!gw>uL%spz-jzU56HMz2(4X5W=gLfoE`htZf;8wSd) zdOtMcd9yesl<)?!EAX{Mwl~!3`+6q@>mQuwS!NCTf!4%_hPr7ET`p)Cn-v)Gs5KVD zRk*lfcgg2KuM^`{XKrX*a?AR$;@~`5T@kt)w_ro&Q;?=~TTQ9>qVUeaSuJe(WmJ9} z=|w@E!{>}D{ZB@5R%r#$ZpTl~Z*6W2b_3DW3c4DXv^)t7;SH8K!G=N7@CcwpBjlLI zA+c^H0jUIvd~S@F?z$HdD_3{>o;PWIh%uX!oLi%(2{{j&1pezL$@z_cBlz!iQ-FKY zlGR-tI5uISmi`@{Ypz9q9@lIKLeDtdX&?pw7_NfI-zU9?^dB8vIlE?fxh5xFJFelp zkr>?0*NZE}^d4pi?_LE4=RQ`sN6|LsaPOu zRTbKz*-8K|X5H}j!gCGo_5{K9JgFb(z);@1eLYGr6Rm8-;~ja+H;+)B_M5+f7g7&G z)i9~+c+v>>ycta!cAPNKvF!FJ(ATVz6`zm@P{Y9RtWHp_gRpVsPV1xE+9p}{)@FNc z*k65tGelw_FZ44yw5QC@0mwa_+bX!B@VSls8Tnhezc&}6(NFWMH*c3Iwl<+ev0VmQ z%(wM?7aDEq7SPot@ZE2qxWg(-E32hXq|P#F;oWdZ%0XE*K}N}iBzxvY+L`GqMARL`wyOgmOA1YrolbNP^@p(Xo_&+vQb%mGtHHvG*rMcU?th>4^I;&LJm)fN|I@)U zIXs49yWXxyEt;IsljlpAS1RD@DP5|gKsP8|@mE_`RfND~e#t@HWnrP6V|ZwYQo>q( z9_eljDsv6-v>blp&&jj1#ybfFBwkP9PqEEp3} zO|H3o#Ajym4Lc4;)_(oEZbWBG$Ll6V=0iMc;!v%)%X}fVz8*`ge%gz&h=E0*RFa>g zxes7!33w~7lJh^$k`z*`gxavIDG{ikRiy;q<<&;g+1$A~vqnu(XbC*)X8AV00{-&vYV-aJ+kxY#EN z#a@_s0MDiOT5rdq)_0cYL5uHOOI)(m7o*%pl$VKaOU42{PXrF0=gwndyIGhULe*<0 z+5G#RHong_C<(q^SQTVW@EMRMO())m6on4trIrp1d^PJVR5`E&xokUmRtfR5!n3K1mU%H0Cj zsX&+4E6M+dBXJj-OrPWg?V?dpB z0}HM8SA7wt+Q*A}=yasIaYIOb*eY`ZOh=P+dYc0Cp4n}h_wobnetCGx;=S8_L#=iT zr^PM+30BtE@xGbB{5M@?hLHPjubI~TlDW|3E3MAVVF}%Vdor1$%jz}oz$@S&PkWCs z?P0-TKwS&xOzcno4C>O@P$)+kCUQMC_JXi!N-6$P5@GV#X>iZDZ?J<>?pk63>KDrO z0#SKEA|bjcQC`}eTla#;Y-yM-?u7(<42lg;PH_d!GEjMeC=ZUNyX*^1O8SP#ra!*_ zw&qV*0w9LjIf}0@m+bu6(X(9WXZPn%38?J5HBhyhN3neo{Q4Da6w^L6^k=GK&hvOt zKf$u`4xa_NF4R1bq8^1vdB1sE!^h~@T4ut2V^-T1I^Iaz$;|W5cVW@)?vw9yNRWNv zldvC^f)BnZshrF1SwN69@ws;U?)jtkg;iYXOf+ZYnSxh8C^El1#~7tza**E}0`O|k z8KVVo_iZGdwuzF;D>J53@@;c7i@eMn-W#7cUFx3=|9Mjur~kF*jVqXz->>z;$SW|J znwTdg>T}!kMznG_Punvd^WBNT+?ERB`0$2gI_9pJpAY#3M@6^ab^l0kQ|;#ra#PJM z*3p^MO-w1p@LbM}At!Kx980h3ZWXj5>}8kLUxE@4o0f!N1>BNUlsA~>v!hP1X!%b% zsMjZN3D9?t)HSjdK?<{Byp-TVE7Rp8 zmCbYn6`#_RVU?D`SIHXhl8L7V{}CD>OBR~aNlUilc+T;z&3omy=}$ifE0vm$4wci% zxeo{LxK(Z+hx%==}wJ7JR@7S}9k! z3_bZ?fNBc@3Xges>rV-s&u2x61qMo5O2>EmG1(#}GUXO{q&X_eq+%$eZUG~+(G<<1 zMe0^FLv?QwDtUs$#9ZX4J4Zg%$N$KB_%A_K#4Q9z{1Pwjt*`b#hP_s3B0E=J*myrg z=No(k?Xz+He(~#$6dLVH+R|W=mk$d}9!ZD^-J@&;{(`tK2;5w}VV&HxZir2RuQ*gV za(A>lPE~pE`{AfRp-FqFf3e0?FGBK6Xc+bHg}1}@P2X;0Jl0Ll#sz@0L2hl;*Vya3iV4y6ix8HMV!%x6=LggVC43nb?e zdbOEkEh=Y9QUH0}*eX3QjuZ-Nm^M{O*Z)CR>bSHG{pQ*Gdk=D^(6z$ej8-ahFLIz2 z@b>k7nWAcZI=s4Tan&P0@36`M)xXKCA12IIuUzR_ijL!IkPT2hw!|Art_)32sMduT zt$Upw2@ktW_3CulYuY39R@>KSSj6F7Bk=W4sR0O|PW6gPTSH&{CV?yW;lOB!CEr-! z6R2pS37QZ&Z(^!MLg{uYCV_9vx-l9CRC0whbFI(uH*1t)(p4Z~tY^@arnhedyj;4T z5klK;eFCRQ(e6FbxpvgRWd?^F%3f}O zn$SbXa;OiQef;N#ij(Cgc!hmd{evo?RNX1!2f{hbFfKDgcBgrYBmPJ2JV?QKHbJy& zpYn^gn+v1?U_&?Ap>yexnjn^qP9ARNwh5w6de*){h>rcor&y{kO4ONh^l{r%IbByC zD~mPpmkR>2WVo1t7exeIZhU*%xy$SF(8p*C;(2?JQ@*Na+AyGQ2)%emDygbhzzln? z-tGrnr8HSkGhSQ*rJhzW#rFamx&yS3vcV9psMRv12q{~2-|BEH+|?uxp*h& z5v<08k|UD7s|x}aYEoGZSimWl0Y26wYiN9s)RGsw@J$$POEb>7!fz_?q0I^fhkZTOlj zoYh2N)^Pk@7kU`*LqAaFPMK|?WkBLb3&Yf@>BP2jF2-x&2zjet|8t;RUsX_Yzt<9< z(tfZiw4zMf_*w_zR4K@o*mM*-2=8fCM)$;u)gZy7e9eF4vK^j3Sx=k7A)#*Q?dss$ zmR`-|D`ouCN5-FOQ?$zdiM{a$J2$NUH~BWU2)PY-e_+ivS(ulL$P{8&w##Z9mtzmC zVGP(yT*+ge1I#`0c^btn;F$U^G*U5+2(#P zIbdq@Q*97|$eUc2cWuu^3uk9mQ2oxgyKf-vzM^KkB7r6XWEI7R(LOb2*c$BU3?LG~ zfPHylCYPv(Un@xAeWr|}R3zR7N<3gZib}TNcId znPm-*)7_otu*Ze}4{>R?Ccj114MOg&OiHEB}n>EU`b{Hd9e{>`ZdL zH0SX*e4emXfo($?axHFCa|AHqwVz=_JziW~xUe##qJ7MGb?ogmWu{8g@qnlSP? zqo5hF&&1W+6RM94q^K>1v1$q;AQBUd(g@(0Pvg^)7paE}o&tM0)vHmfVglmdR)qMG3lF}UV4VivPvSIl4~O8)^s>Z_dmXw4COih;jp*JBSR(S+ESNc6|cl-gVUaK7r_ zcZ1&~^$y`XJeSgcaiWnZ+Rjk8R;#11PTF%vx0AJgh#(z1`BVU8aHLS`PhPkg#{jmh zZf#VYtL);PB^M#z#$7IS(ll>pe8SFBYz(VjSR_HnoQSbvt0~jiqi#WK`Ozb7e^M!c_Er#UJnjj8x{IT5;T83N zHOKB4UB{Eqo%An(f2K0Z@(c`wa^0nZ)~RQCYw%#M0}RquXD#AY+weHSb5L-z0z-T` zO5;#wNL;i{6R!5JgOG5+gUty6|LgYKG!fsKIe%NxUig;6x9 zD-9lA6Eu*jm!gsy74y}7=Mhnhm*FLPp(9>_p_}q4cOl+Xp(};D&`E5b*Q6OH;-lg) zQDl0&vw|tEVH4@e$i^lp-=!(n_Kte};RCJ*zelN(bifRONz}~KQ-+3<=31=X4_|#q zP}(VeqzVdA1-}lQ1yw(!xugXWo?P^$962ZIHHOrO!?wfNFtISXZbzl05)CEx0rTR6 z>m1}PKGDt^sx(`3vGk&;0VrRmL;0oXUxJvza-|5KJrp%nb|aI3kqe$i`+_&w@7;#* zE>~$E4ZoBW368+nEU=r#JFpkg{OC`~Hw|%69L6^rIdOZ)ayRM^W>$A;lD@0CU#FG^ zoX>waX!vaFH*>Mwjs91u^CBA*HD$m;a^OksK)AKE{{Gao$Dv-)a$3-!-~~V}!_UBO z4sG~+B5r&eTus}a!Go&naFf5k>y^NnB9Guxj| z6$DVW?LfO-U&o;&MQt^~FGLCo*8&_$BWo&^xqg??Ve8kUKRC8^ImDWhq&aD2?ZK+r zx`)lyz+Ejo-Hpa)xixN_bzJv-(nF)*uHXjPBb=}g43!%68LP40&{dlVP3Y>~4$^+K zGv^nD6UAQ6_w%7h8)C>-a2HnvSjuA*!3n%udiBA|@}J3?ou?_|71xRrR3m&k&hvxWGRHdOEH^WD{J)mwHNQ*B{L#6@QIDGA z)3!QyFC*!<6c{q%o4>^*!%?HrGnP-1%*;AONwTh{RH&ctL3%C_F*r6f;kfbpni{2b zLy0RJG=hyJ#ip32SEcnXPLplM4V_2Qx5 zpPESxZ&oa|=%c_U{&Bm02-k(ACg3hq?FmG$>UjmG?O%DyN>QPdn94xnRtefe@$pTW z-uP^~Vsq1LNkQ=y9L>gbb?lJFX~`pJ(-PMQzHURM`LFsO(rm-!EWhlZ>V?V-SXxdz zfNt0COz*)+q5LN`v!%`A+uh8_Xco`2&l}FyD4`==*fR7}5e`rPF<&qX^el{qUfkw6KUsE4 zvFC8&+ZcHmc^K0=Jsj*rnUvX^)$Q{N^=4{QO}x0qaIXV(HHArRL@fo%sqBtVmUYFy*mU|Lxz* z`)4KH{}RxYc{(#{Sg)%vKx}}Mg%(#A3&Fo{(yn%)4!y{gGY!#-{e{p7ei_lc3}#!i zNCkINWRc{XcV(Rd`ATvZ!-17PLhM?^yL=2GCVV-Go4aSPKr?Mj9vMuSrk)k%F;vp9 zYk)76u4?9E_78W2fur_~e)dupc}dEGi}HVpF0~182Kk}~Q6G$Rv*SyK1SuLP7))&f z4zypEbxeKwHT({8Xtd z%O`>Ei+Ul$h%I1M*F^Y&9$T`W)7~A}8aRRPfmr_tWuH0k%cflI1S}lfK{p6dk^{sc+Ph*EU*smDwD^zR7y$kxZ*ueQ9|?|N76SV=3=a@su4( zsUfnb?Kz*!OJt#_qz5WT)$?dxmKd6H-uh4XNEL02M}HjW?6?E|;id{+RuXa?z6Us81LP zt2|Q`D&GbE6JdN;0(*b=93S`WY>Tvz?()8AKHGCOrsL0gt6j!aZpJeL^8!iTu;F(p z@OOKVuU`CVd}Uji z5q<{&mrWO0rbS*^Aoiw5F5otTCMl#kMGkKIQz>Z!s{Q8&@n_82?Epdy+3LG$Oem_U zg}f{Ea(uZpId^C4_7*6qFY;-9sOXIPWyA}1GHk>K*7L;3MJMHZRxUvEYl6R>m;|p0F37b?_?)Z}$If=a*Q`3OS}Uze^t-NMgL7 zPc|Jbw;P2h^8ztp?aQztnDKSc!JU+&5bU8njg(U&e*u*nVLk6&I-W|errN_rqasVKuP|~)s5X?= z8?Bm+P8hzFWVfJCSB*KAe)kA9wEE>=g4c`9vuW*8OvbK{mJ)=^-wrp0aTAZUQJJ2!smgzn26QBg4r zAmeS17DjPJHfveseHJCT@(&o$uU5Oy_RNp6m`rwG%}K3*E%|)5AHR-Bom7=QHR~KG zDY9EJQeRGyq9gQ5Cc;mZNwC+;Q5esZ@(E*n^Wh?gN*>rCq5K4(ezdp^wWx+ol z7v;8>))>+PtRE)B7ys4u8zv6dYExWYKSzwH{UNZfKL)?U-$US~Su813BRu_mbBcr6 z7}c*&EnJuOcR#SqC$UJ2m9{LXLU7mB#G>kRW2K7w#Y0b=ljqRq2+md^{Q^@m(-Jc+ zfqnP2Gfmc#uU%Ubz6SQ)%JaMa;*2eh`7NVAo5^nZtxRz4aHFa#pk}`I&~ZTu^F;8x=^8x=h}b-PF#9c1b~CG0EI$h z#DVuMW6t7X9eO+Zer_t0Z+xhET)|z~=+?BSZFrQ`x}J&Yz~FY#WK5SW)vk51H9GSm zP?64Gq6OKIp8B!G&lm7y-_(BmBK=OLk5ep_Qf}+smqogA*W-vhwIP%6_o`g%nfVDV z)3pV==tfo9jtFj^l8~CZgikv;AiX(lThr<{=bNS_)$h}tD^061(4@T?0e?KA9I<}z zvqN>fszK#|qi(v@j4vFueto;52TdSXRyeK4`{Q4UCaT!o*{UiA1^aW$ef<~VU6Qrd zGLrx^M!s#%J6gq4LuC`LF2dG&-wSe5JMk*j!9KpHgt6spA9XMUuP@su%RT&qU9)!< z#3DVbiw+31Kl7&);VG9q~DyaK(boyC(lZW~d&gGswMNSBQj;4mBqXhep9=*&Qs@$>Xym|@kV2!>(r=F}kQv9{Y0zMt|_qgEJ0Ug@LJPN{de zz}Oro1tECK(QezUrr;FieZ(!dtg8`2IcdkNmdB;tTKAfDR79eaP)tR_c){jPdBH*N zSG-S%c#KJz5iC(#Al+pO|LSA5Z0>b~tU21o_!jz%zC&l!g;%GW-M-q0P<`1L>ewN{ zMn0-DLT)*YiN^PFv2dJ}1{!9RXi?FRCT#l!D(86&-YQ_ajUM@nIUh5A9Cm}*u3i7y zRnu;nG!?aNoV}3bFcRO?-|NZHPqT08UUtYxaKMEgI7hbGBOdyET2O!#!kjD$udV(t zCc%Bl2Z*-8gt#d{t;T5B5qqskPRf>$Vr{z9Vpa`%z%@Bq94`?jcpgUrdC=^ngewT4 zzpH*cF06VNi{`QBiT&kKvQPPmRyw;IU?O#vksmb7fzm?upF}AOuyHMLO#1ZA=K#@@ z(94l28S$s4wo!bH1{HeWT5AkUkYM>{p05~&8~+X%6O;s{9juP#iyT?z+fM9H#bKa; zfi}V2$D~uA>Upeor=85i0v>YpCFza>$^eTDfx?%!=6=_MIMH5A9SZ(chO%5#i*l}X ze`aAtOA36uE(DXp4x9m;mJee!da3^2KY2vx-pe0-w@Z8I&$bJX0@QvgKtg=a5kzwQ zk=C3#7f-@&-$hOm6Fs?31dB*lM-3gA{Me{sN(j*4px)KXBUT$z!rKt*c!x3<51IaN zycAHoH`QFnnq%r$CxQ4b+o7Y&r>Oe~`6E1TYS3V^MzfmIIJQhv*dV!Ss=ZN|M6<_yVqnKKX4Zs^w-6WPxZ%t=`+yimX-_o z?i(0oa(g&^oBH#15S$D?(I36fOpAOq!xnqRP)f1%fgA;nZ!6da7q`}&7GSB|*Wa~K z0Pn9j)V_IwIKS^?M&R^@iKusM4M&}HAv=`cm=msg$UeJThq6J-yiQw-nJ+mtd%|ha z$(_@t_I(6&-b+*iM2e;D#!)_>NL;#QfGo8jyew*(Ru*l*$*`Cf^);?2#=mW}GOv-3 zuT!GS9%#Bxbw7S}q4j5Opu28*p7;}|Z-@{) zh?;GU1wd@e<^)n*i@Rn{r7o6&C9yF)hs){)wG*Gq`Hwb@`O3!n*~?w1|LGUKhTmF3 z<>07?vuS_qUyfB@ys@9b;!YC3$3>i>6Y}gP3(FVB{a8lS$v!)Z;TZSN<}lJ-D@sMh zPx#+$DQS0=ti3PmbY8zzCl^~#4rDhd}0AIZF_(5Rx)HUL_eqU2<3Vr)$58(N9eS(Qh%g?~C0fEVr7#e0J zS)C)^QqK&N4e;q*9vSFm=Y@y%x z8=KI3*UgqMXgQvZ6>q?JpR{RKkuz^DCyiVUvbyr4QrTpy{)%qUs&j>HPnDk6b2e3< z*%(_#g4l$uV&A{D`EmGo!eL+EIP9pLo~F2HM9KZdJUSYg`lS?QV) zTGe~V$>&2mL@R4t55}I>=@L+HY->+9+n3s9Qcv=3G~v%0z4t4zM?)K@()YEr>;7Z`4Al!OuUMnk_p1OCarpjV*4o0tXubp0#plpy)#rv+Q2H4RwO<#*mGl zGegc#e$A%gMq!W30*SG&$DzUmdY(@M9S;U)%)W0ff-H$9S~zRUbf%JT06#~JtW~C- zYm~nGQp+veE4!;YD$>uGM&KxNkq1IJ*uQTxt$Yhh|Jtn}{0Q}@pz4rlYTDar`t8$C z$dZPFzG+M4twI}i=bkn(*yrP*-oKersrnVcPO&9b=JNW`iopa+&>qiu$l_T!35u)J zOdt|S)H+t)Q92~EXfpSq^9>P%d?@%p!`qstSyquhLo086327n*6ivTkNjN_~1p!8x z7;ZW*X)y{X`zVn>fpM(K`_xA4Yo-OS+n=n9EHg$gcu42ohh`x%17G^EX`g_?1G% zUXCy(7YLq$kFeyN#E+)2THd=+C|wBX4KHghO3Y3F7_ClT^r&9e9|h|or?TJbG(e}+ z_DT@e+=qa^NsLYk{JcyHHek?kyOd>IrY#MD*V&_Zu zH1)X_wHb5NFAKH!%_}|i>E-3B!($A$GB$?g@xKI!CvE2+AtoEJc0vBfeJ{fwdf}t4 zm}WcEt|CQ8sa2`cR;mgiLT`zCZbGIKlOAq-G5_`SMlUq-Vsk7eOteMCuD3k>vH>_e z3)(xYL&!=^^%8L?W$YT|{?mI89|>_iUhSlrl>d z0^>IM&YsBd?1^FQ3FSMO)amMiKfZyb9fTuKAx!m(k0TQTwu?eV#UpB(GAQ{N9Bs5y zmBWL33tFb4ouY(;*tqOuGM9&?ZhIImi*gq6@YhP7Z=RXsDX$a%h7aokars>TLjA+9 zU;lDe6{OyZ(_~Jx4OaAiTUY*;A*qyo<G%;4zYC*<*)D5!0(rk+q&26SmDfp4 z>71$^bsyvTDZ7}rdeupEWTk4!e`Wk#0Lo^wbqk<6DQ(wHPvS>TZ?k!@`cqq3&1oxP6EVN7y!^dR{pu6Io=B-aowLG9WpYWUn)r35;XX2Oe#?tE`6f>MHW z8{QgLr7r2<5sxuoAx|cn`s(M4T7}aBzKb#qJ#B`7h8MVtdbvAD;wRp&!~|c?Y^^K| zEUa0PK?H_J=CATfv8gIIEvu=8N%%-7nAHE2c>k}}W{Ah>WcXza%K4g4TgrbrGg>&% z+Wr2)7x!__HhTHXQJ1bGhnGnCL3GB`*asLXN8ei5=Y0~6lpkdoCvpR$F0xPh!?l`j zTsvpBqnb5wyt8@D6nAMOB4!XCoh!$~F~=Ceb7n0!RhdL%PeCp3CMNiQ=~5;y6{)lz z9CkUnK1)gtYYerX;`aq5`)&6)-@~|f;%LT2oyob5$~jKc^yB&xUdt;y&m>dcx0EwF zyja|KQlmCiJW)6iIqi`Ua3@8D zw`u>L|Bp@k-%0Af7x^N$!M=*@u2C8E^--eJ^_PO8!m|{*BATDP$qpSi2A)OJAwo}5 z6L<9xat29fhBQAY%Z&B94NWrz^&jr*@%>XHb$*ren})Ig>{rI9zvshJL!iOvu2)n% zc&I1f_uauXx{;v@AX)5Mi|;|`%k45ZcL{(9bTcqna-7T{^3<9pZYIpU9@T|M8Y`(3Gd>AAJ|^C~=$&DRkZUNp!|PgWIf?DcigC;8p9SS;U$_SV~-i zTgl&|na{0LhttKC(GgTGg2TLSPhBVCb8|l0?7`-=F5~cUKM~sUIjp8xx-_J+&9?7Z zk(Hs&QNcN98-({L;dDhZ$0Ox6m6R&|KxKTK+<7-lT z!L~hf`!V<_Zh9t=40CU7^?)9+hNnQCpM9(F`7`#CZlw#5I_HhZgF!|Y+y*cGPRtlh zSmE6aUtU{(?v;K-_R)Gr+Aj@jkNJu^H0ot}(KPMpzw1e|Um&C|Gh*@sA7EAErr$YP zBq~;8q4_KEfo^rOiL@N3<)`1spR38|9WQnw|5AVT6souSr<<0R*%w*0nd;?R9%+0> z>`7(t{W?VT9kwO*JYTh;&Wbq)Q6rijyfmx0-b8*F>3ifjt+AX&n?iG2rJM<4AO~S4 zE>-so#-L)JU2z-Vlnm@?kL6XbRhg$Ug%?_?*4w@uiH6URYOCf!Y6&$m8z2KCZA(AA zcc;#Vt)XHk6YV8@%dOBn*#phTUaFrUI+rz_nTFqU z&K!U7H%OK=V`#|;guSB z=B9?i!H?lw5lWx$xFrGS`3ej}ni}%G#G3Xdv8F*vSH;iz8CObFx%AZ8Y-Oe>MYYAm zl#7q%3RITQ3_c{%Zxs%mAQplzVZq4S@17R?k0-ml>|Er}Jn4w8Y^QFFws1{ZOFQ0^ z_#s8?LQ0z~l2j#ZWWR&QW)D6jxb`Cm?y^9imO;oQ%DqNig^x&Tz54iX4FoQX%;YWp zbiB?LcgtF#ry#v`7G7U7V;P$kt|}ZD14zxfZd3GN;Xkn~Si3VscIs58Ol;9Cpw;Tx zR+s!|L14|agho(ykwJ(Zchd6Ye{s%*|5t3@{~4L7Pn#M)*YN?rN;J0g=Y#hI?a`Y! zTUj<{4Y%3Ugw=N+;w$~hI_LBU3_&8u5uvR3NuSTcx?R8wwrv66;PIGxQ;`6d{Rc^| zI_pF2ar~CVV_2p~p=(g0o~G;Vcr=Hu3K!m&g*dNpn15k$1^)`V0!xC%Cex-Lb80nYZd+0$B_If=k#>VJ?5i7d)I>H z;&KiF#6irxS3l+OVPBao_@ZUA`lMxU7Ag?9fU;jNXRD}B{t&*Qt>znS=aThDi|EDs zR#JTNRJPN~J#`3Gq^j6gmlmDZLeMTd;wtKYcC`P$EBWFJd;2fQ41BV3@SgsmwtoEOZxUh+wf`LYWcvio7I!@! zhOeY*4aMwLj0Rx~MLoWv?}haV^F)Pej0}sk&;Fs&z9`Z@FWx=WdtG$DV+vhks8nQ7 zr8}UQEc#xIwWvgYU@0PKaJ&Lr{PFX&@kTqfRA5W7G7VH1ze(v~-pMGQtSX>~^IC70 zi8suaRdV1}eSi4_g5$4ex5)CGfU^`jr+vS1@7sREnSFqRNTOg*IO(2B<-CIz!jbh) z-*qU_i3BJlkQ)0A1M|m6z%8VP3MAc?sJ13dhvQz5_pOGtm;0rez+s)35Gl9pD{%a# zx6Y5bEJh{w#9f0ljTRmw({I(MeNsHhfDjvDUT)Rv9~0q+hOxY9bIF{7Yjt?KZUA2g z1!CQ6G2#VK!x{eLb;H`R8HhUl<^oqeCBYYdUzxKQSMc-eXx<-86?d->{jB13sdeS9 z7h9!~rDqO3)W1=nZx^c(V0sxvw5@rf8JZ@KKMTh1HX%L`nMtAikvYV7W0t;u*zi_) zcsAm@YMrafjqw1L^&lxFfOo!-{&qsxJyA!P#_F|$i$RwcQNXf4k5g*j%gR%7o4)U>y)Q4{HOw9}`1Y)sn?Ww2*HDEToPyBd#4VVH}M%SK8|~ zntx%@{N`9!Z$8hqav zn1>{l8ut;WecbHzFyeNLibAPSf|vjw0(H;65(1#8{=?Q65;eSYKjK!m;=&Wj1B!!O)4u#Rx{ZaMa(F5UzKd-jcqehz~KH7oYm+LFF=RSv_1cM(-@65e?i zCk)Oc*cazkdH%j{-?H~>;(Kn26RCcJnu5e}IGngy7OkKucGFULD_`_%MX@U$j&MDI zAim&Vc7Z(?uWh09wkZKGs24!%@((G zkW1cEJEO~mUjc8OpanPXz58G}b-^4xB((Idi4XOwgeeI!IIn)YhzH=epsR{rEH5$2 zNId@Bw_9i@9)Bpo#}xP;2Z=ZTHFLVyr)#_*&Ww-7^3zGOEwvbJ&I!v2ixs6W65xby zC@b=D=!{Y6C_r=g{$9vvlg?X&P#ZexPOKhl=H74(V@t%gyOtH3!6&al9mx|wJwaqC zoJVUB$+~KHJ9=bPH`24%*prtLRJb?f!o#SIrYzT;asr)=hXTHonx)SlGYa*M9?k_) zlPaXzpv|wkpoW4{^dAC}01Gh2^Ibsqb=HK+q@?%zA-_b8?1&+(n{Lv^CYM(Sep89d z{=a(g5m}%Q0OCcT(C(Qr^DYhxb;F8@7$xPD6sN3}5GnT)$l=0hI8`MEQ95`U`AlQVhTuRT1sjZVq#e=*W;FM5zb1Wq6mJ+%KCMO=NKG{V>Xkh-sb|R30^k*ZGRX;MM-oOF42D* z)Jlqxb9X-By39l)zSevMACwthct*4Qugb18n(eLY*VS^1*4373YiNlvXbmyd)WMJt za}q;wi>gFXIv}R1q9`h#TFu`F74e`?vT0{dVM}>Y$2M`W>&90CVXik03?cKwNX6hn0Z0;wD&FiI;c!gx_ zHiYj6)BB_$Q8$2)$yEa|DY6N=Cig_$=PP|n%Btt=_XU73!yO=${Pp0 zjJ2|BYCO%AH8(CshyffUw#4w9F}q<+VAzqRm3DNby%I{UbaU6pVW-E780C8tDdgDJ z!PX$7vzek12K{)CuC6Wy{^8F0&+F4Jvmr*V0L0yjZTnZVgnu?p_{ZGXkEy7|+9ab| z@;)y{+zIh~?VjV1Syae`HPGq;9v35Npf?%H<+R0?{$gao2`7(!5>l5&V`)63i#*hH z0DIEFj-72ok5qwAYeI38hGA*cHV6r(*Fu!55lCvrqDe(5aOCe3kZW32H6^-Cr6Rgr7V^L(T$?AS@f)?RHx4+QPdX@caAyH)u*^RQ}7TOiX=lzl0+!eq-J*<;s2=Lki`2T|W83`k<;kYxz4>k8Xe-wYN`$C;MEP zt03rnPq)GubpJXZN}YMK@g-GJe?_n6>0`}}@lux&t@R^zI1D=;uiBMDgZ>mFwL*4RH&+#q7e#~*flOrI4eCQSsphndJJY4MQ$M(littct0 zKf<0nU)NNr`yTT-obV^B{tB6ER6ls1?i;Zp;`FF8(cxPSX!4mpi3V>>}@DoSbpWbhcXadSBJ9!!3xP3{FT~#W`#MO0w_%4OD;|2N@>lv( zMjEz@dc(AuKTp52H$s=YCZ)`dDLrQkZEg_~tExjQn$1|KDl2ou@xYUo7IVPk z4yeyZi&wgJkd{jkF3D`;`W0uAzVauAF;~E2E-Ex?m|&XqBuZ8C^7UG{M!Qq<-1zV; zyj3FSIA^Lbu2owZ#B_zyxHH!>N1tRa|>liVu7yu@z3Mmb-|Y zm;*vg_oYJrF97rR8j=ymg@#NSVh0>6?!bAysRsI64nIt9**U&Sey5ouYp-?^Wn&gu zOkR=_+%GWTEk^5exTA*SspXX7^W9(-*Hz`+YbBzSU!i^D>HFnF^e${$$~CF9E)aG1^_zC82vl5X_Z&KsXx zjjQK(joqZfmm?L{z<@mD+De+r_nN9CRge{Q<5@gf7UZS$T-5q>nJdT%dPv~PWjQ??=fC-6gXjMyTK}i9U&5D5 zbb0D9INY4KaGvZ4W64yjpYSPmKrAc{KB_odjG}e2WNI7iM$|SrEe`unJL<%wh-AqQaBP57Fqb5~Lk)G&(wHN($9*iC1WzNYLhj!|P3&dWS<% zuCiHfawkVCIDE}9W6=>;$jlmoy|`5#%b^7|VP1L&DG71s0S`Vos^_mmBd615dc-F5 zAMC|Mq(6>$*|$bC4V(jS)V5xF<)*Fp!V~H(J0VrQFBtm1dG~f|y$;3KrCuwA2R##P*Z6qG&AfmbsS06-75A5`15@Vl2cq*`d!Uv1v3c(e*JJ16#d@y)ew~q|^x=b{C`Iq&uF7F{)K`(V zBQMRk(SO7+a_>76*=dUQ=9!%bpQoE_q9;kjUyFtfWD6rq-Xui!KIwOL&yd*9Gchra zo!MY?5vw3&`NhspFe2YR>+K{+GaxxL)SqF;o1dQ{Kojj-J`U?~a)t&g=VpgUczF=NZi%QD(+^$m1$iiKSgpV0cD;8gY20kfX59$T7G`YAmK*6Sr@XX@WI*5fh9@b|V_k*QK4~ z$Mcy7^GzEc2kS_MDZb7+lMU3OEP0Nxz~-zUkvg|Anc8p0TD6%1hwXmwDI){36xNG; z*mhcZJCG%(gRmE`LcE@3|D=otG|;pos|Aethpq#bAq6KgELsx98 z8aLarN|891_aZ^-Hly?oh&iYp;Vi#Jl5v(_>OtVV`XCaO5*%88H_D)&r@yO)+M~oN zgf_qd5OVFP9K;10{s~k^!*$wVO^@TOSYe=|+mx5oM?(SCCv|$RLCj&_K!&f9o)L~+ zs+LI*BdL?{JzCWo`~jq84k`0>scl+s)7bG<_lSt0wZ9Ij{9gNHBk#Hw*N;i>Z$ewH zu!U2{HJ(e*#&`TS9qj-b{S3ifwc={&|18>^K+{YVuYWKW-_mgI3X>Nq4Q+FQN| z1$baW>eiYDMuRXMKbmew>tQjd|3FyHEW@ zH}p27h0by@CXE%2oh&mw8T28T}dfE5ZTf)vfomtcXtj5K&y((uA2KjF8TsdH||=^GdS^!RMq3}o{Q z2f5dD*VL%e-RTu~YOgI-<4`1Ow9pyI=2oxP~LS9+$MFpYKQ*nYFN@y;u7~D%eT{h$Hh;oaz8C(r3GEX5TA~bu&aI;a{yO;PfT_4tNoDW=< zh&p8q4 z!BZ7Hz-rKE-NIlSm7dl;3m>F>;m|DQF}~xEEjvFSo-1}XG_`Y9wo|xfCAcI9s}RV? zd6Jx!cp|--R+UkZyb4FU+#z3;44Ix(5~YMx8;82p0Q{mX9t==Qk)$D=2 zi(jL;KTv!n(JvC-O)mNRj>V%BF;G9SWE$@qM!Z-YaRG=|>ThF*T>_tQ(U@%9C{So) zDjj01fkzUhZJ*Nx5G<9Q9$N2&F!jW^7%9B7J5+rcW?L#?dFh%5=~;O zPT5FT1qRt+4UBvWm9e7N-rY$kSaDvG?o0|tRdH`@%aw99)=uqem-^Q@^>t_nf9-C_ zwJF#K_YSvcWQjWvi^CGf%%V5~>7_@Iuio7<6o&gH$ITe5F(X}9Pfy(+mtj@0wZ+@R zDBTtj!nQHD48;ve*vKPcFSGca}BEEA!W( zzQb(sEl$Cep^VJ7AAuwda~jTl9?wkE~XRO*o@8LfQs zV#DZ5C>=x@Lh@V+=D_1@V6^gD9Ly67+3(@j>pPpvmlXep__k1v?Icm zbv${si5c<-+xLFgWAexBc4=xEJ&18`zpQ$yfO~ZKq%PhTcMkM@uUGu9Lo<|?wNkVi zCOs{?xX9I5|A^`-)JWbxn*{wU+wt!J#D7`m+0%QM`O-83k`_E0LtVt^2j?k@D0(VQ zmD?_pd3S6t;{&wVpO@?c`A2h(UBJa!AF~UPq+YX?`5oPfIse5WgZebrBk8%06z2v+ zZNsGN3U%p1Uom2$uhfD;I9l%S&6zGf5zdn2$Uu`0yF2S`QIS`bliD?(0q;QlH0$S9 z53B-lB%94N^x@XE@cEA}cQ`GQNTm!li(PV5cT zFK?D0y7F$4RjMuE+x9zon@(yTCx|W{S}b9$UHhFXC%tDjPo^ek)8>mLxDv@pwY_*AU)B!0H-BWgN!M#o(bj4JHGQD%*1f zXc|l&t*n4gt>(3~(|SqLKxPm6%VXrRUQiR^+kjkaG}a80NO;Z*F$3HsGneN~A4+zA zIZ4xAJb>kli- literal 0 HcmV?d00001 diff --git a/User/lwip_if/lwip_http/Fs/index.html b/User/lwip_if/lwip_http/Fs/index.html new file mode 100644 index 0000000..09576fd --- /dev/null +++ b/User/lwip_if/lwip_http/Fs/index.html @@ -0,0 +1,240 @@ + + + + +STM32H7xx + +
                  +
                  +


                  +STM32H7xx Webserver Demo

                  +Based on the lwIP TCP/IP stack

                  +
                  +
                  +
                  + + + + + + + + +
                  +

                  Home +page

                  +
                  +

                   Led +control

                  +
                  +

                  ADC +status bar

                  +
                  +
                  +
                  + + + + + + +
                  + + + + + + + + + + + + +
                  + + + + + + + + +
                  +

                  STM32H7 +Series

                  +

                  The STM32H7xx devices are based on the high +performance ARM Cortex-M7 32-bit RISC core operating up to 400 MHz +frequency

                  +

                  Taking advantage +of an L1 cache, STM32H7 devices deliver the maximum  +theoretical performance of the Cortex-M7 core, regardless if code is +executed from embedded Flash or external memory: 2010 CoreMark /856 +DMIPS at 400 MHz Fcpu.
                  +

                  +

                  +
                  +
                  +
                  +The STM32H7 series unleashes the Cortex-M7 core: +
                    +
                  • AXI and multi-AHB bus matrixes for +interconnecting core, peripherals and memories
                  • +
                  +
                    +
                  • 16 Kbytes +16 Kbytes of I-cache and D-cache +
                  • +
                  +
                    +
                  • Up to 2 Mbytes of embedded dual-bank Flash +memory, with ECC and Read-While-Write capability
                  • +
                  +
                    +
                  • A high-speed master direct memory access (MDMA) +controller, two dual-port DMAs with FIFO and request router +capabilities for optimal peripheral management, and one additional DMA
                  • +
                  +
                    +
                  • Chrom-ART acceleration for efficient 2D image +copy and double-precision FPU are also part of the acceleration +features available in the device
                  • +
                  +
                    +
                  • Peripheral speed independent from CPU speed +(dual-clock support) allowing system clock changes without any impact +on peripheral operations
                  • +
                  +
                    +
                  • Even more peripherals, such as four serial +audio interfaces (SAI) with SPDIF output support, three full-duplex IS +interfaces, a SPDIF input interface supporting four inputs, two USB OTG +with dedicated power supply and Dual-mode Quad-SPI interface, two +FD-CAN controllers, a high-resolution timer, a TFT-LCD controller, a +JPEG codec, two SDIO interfaces and many other analog peripherals +including three fast 14-bit ADCs, two comparators and two operational +amplifiers.
                  • +
                  • 1 Mbyte of SRAM with a scattered architecture:
                  • +
                  +
                    +
                  • 192 Kbytes of TCM RAM (including 64 Kbytes of +ITCM RAM and 128 Kbytes of DTCM RAM for time-critical routines and +data), 512 Kbytes, 288 Kbytes and 64 Kbytes of user SRAM, and 4 Kbytes +of SRAM in backup domain to keep data in the lowest power modes
                  • +
                  +
                  + +
                  + + + + + + + + + + + + + + + + + + +
                  +

                   About this +demonstration

                  +
                  +

                   

                  +
                  +

                  +

                  This demonstration +presents HTTP webserver developed on the top +level of the lwIP TCP/IP stack, it provides the possibilty to control +LEDs toggling on the SM32H743I-EVAL board, also it allows to get +continuously the ADC converted value which is connected to the +potentiometer.

                  +

                  This demonstration +supports the following features:

                  +
                    +
                  • DHCP client (dynamic IP address +allocation)
                  • +
                  • Ethernet cable plug/unplug +management
                  • +
                  • Ethernet Zero-Copy interface
                  • +
                  +
                    +
                  +

                   

                  +
                  +

                   

                  +
                  +

                   About LwIP

                  +
                  +

                   

                  +
                  +

                  lwIP, +pronounced lightweight IP, is an open source TCP/IP stack developed by +Adam Dunkels at the Swedish Institute of Computer Science and is +maintained now by a world wide community of developers.
                  +
                  +lwIP main features:
                  +
                  +

                  +
                    +
                  • Protocols: IP, ICMP, UDP, TCP, IGMP, ARP, +PPPoS, PPPoE 
                  • +
                  • DHCP client, DNS client, AutoIP/APIPA +(Zeroconf), SNMP agent (private MIB support) 
                  • +
                  • APIs: specialized APIs for enhanced +performance, optional Berkeley-alike socket API 
                  • +
                  • Extended features: IP forwarding over +multiple network interfaces, TCP congestion control, RTT estimation and +fast recovery/fast retransmit 
                  • +
                  • Addon applications: HTTP server, MQTT +client, SNTP client, SMTP client, ping, NetBIOS nameserver 
                    +
                  • +
                  +

                  lwIP is licenced under a +BSD-style license

                  +


                  +For more informations you can refer to the website:  http://savannah.nongnu.org/projects/lwip/ +

                  +
                  +

                  +
                  +
                  +
                  +
                  + + + + + + +
                  +

                  +
                  +
                  +

                   

                  +
                  + + + + + + +
                  + +
                  +
                  +

                   

                  +
                  +
                  + \ No newline at end of file diff --git a/User/lwip_if/lwip_http/altcp_proxyconnect.c b/User/lwip_if/lwip_http/altcp_proxyconnect.c new file mode 100644 index 0000000..9a0b2ba --- /dev/null +++ b/User/lwip_if/lwip_http/altcp_proxyconnect.c @@ -0,0 +1,584 @@ +/** + * @file + * Application layered TCP connection API that executes a proxy-connect. + * + * This file provides a starting layer that executes a proxy-connect e.g. to + * set up TLS connections through a http proxy. + */ + +/* + * Copyright (c) 2018 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ + +#include "lwip/apps/altcp_proxyconnect.h" + +#if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/altcp.h" +#include "lwip/priv/altcp_priv.h" + +#include "lwip/altcp_tcp.h" +#include "lwip/altcp_tls.h" + +#include "lwip/mem.h" +#include "lwip/init.h" + +#include + +/** This string is passed in the HTTP header as "User-Agent: " */ +#ifndef ALTCP_PROXYCONNECT_CLIENT_AGENT +#define ALTCP_PROXYCONNECT_CLIENT_AGENT "lwIP/" LWIP_VERSION_STRING " (http://savannah.nongnu.org/projects/lwip)" +#endif + +#define ALTCP_PROXYCONNECT_FLAGS_CONNECT_STARTED 0x01 +#define ALTCP_PROXYCONNECT_FLAGS_HANDSHAKE_DONE 0x02 + +typedef struct altcp_proxyconnect_state_s +{ + ip_addr_t outer_addr; + u16_t outer_port; + struct altcp_proxyconnect_config *conf; + u8_t flags; +} altcp_proxyconnect_state_t; + +/* Variable prototype, the actual declaration is at the end of this file + since it contains pointers to static functions declared here */ +extern const struct altcp_functions altcp_proxyconnect_functions; + +/* memory management functions: */ + +static altcp_proxyconnect_state_t * +altcp_proxyconnect_state_alloc(void) +{ + altcp_proxyconnect_state_t *ret = (altcp_proxyconnect_state_t *)mem_calloc(1, sizeof(altcp_proxyconnect_state_t)); + return ret; +} + +static void +altcp_proxyconnect_state_free(altcp_proxyconnect_state_t *state) +{ + LWIP_ASSERT("state != NULL", state != NULL); + mem_free(state); +} + +/* helper functions */ + +#define PROXY_CONNECT "CONNECT %s:%d HTTP/1.1\r\n" /* HOST, PORT */ \ + "User-Agent: %s\r\n" /* User-Agent */\ + "Proxy-Connection: keep-alive\r\n" \ + "Connection: keep-alive\r\n" \ + "\r\n" +#define PROXY_CONNECT_FORMAT(host, port) PROXY_CONNECT, host, port, ALTCP_PROXYCONNECT_CLIENT_AGENT + +/* Format the http proxy connect request via snprintf */ +static int +altcp_proxyconnect_format_request(char *buffer, size_t bufsize, const char *host, int port) +{ + return snprintf(buffer, bufsize, PROXY_CONNECT_FORMAT(host, port)); +} + +/* Create and send the http proxy connect request */ +static err_t +altcp_proxyconnect_send_request(struct altcp_pcb *conn) +{ + int len, len2; + mem_size_t alloc_len; + char *buffer, *host; + altcp_proxyconnect_state_t *state = (altcp_proxyconnect_state_t *)conn->state; + + if (!state) { + return ERR_VAL; + } + /* Use printf with zero length to get the required allocation size */ + len = altcp_proxyconnect_format_request(NULL, 0, "", state->outer_port); + if (len < 0) { + return ERR_VAL; + } + /* add allocation size for IP address strings */ +#if LWIP_IPV6 + len += 40; /* worst-case IPv6 address length */ +#else + len += 16; /* worst-case IPv4 address length */ +#endif + alloc_len = (mem_size_t)len; + if ((len < 0) || (int)alloc_len != len) { + /* overflow */ + return ERR_MEM; + } + /* Allocate a bufer for the request string */ + buffer = (char *)mem_malloc(alloc_len); + if (buffer == NULL) { + return ERR_MEM; + } + host = ipaddr_ntoa(&state->outer_addr); + len2 = altcp_proxyconnect_format_request(buffer, alloc_len, host, state->outer_port); + if ((len2 > 0) && (len2 <= len) && (len2 <= 0xFFFF)) { + err_t err = altcp_write(conn->inner_conn, buffer, (u16_t)len2, TCP_WRITE_FLAG_COPY); + if (err != ERR_OK) { + /* @todo: abort? */ + mem_free(buffer); + return err; + } + } + mem_free(buffer); + return ERR_OK; +} + +/* callback functions from inner/lower connection: */ + +/** Connected callback from lower connection (i.e. TCP). + * Not really implemented/tested yet... + */ +static err_t +altcp_proxyconnect_lower_connected(void *arg, struct altcp_pcb *inner_conn, err_t err) +{ + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + if (conn && conn->state) { + LWIP_ASSERT("pcb mismatch", conn->inner_conn == inner_conn); + LWIP_UNUSED_ARG(inner_conn); /* for LWIP_NOASSERT */ + /* upper connected is called when handshake is done */ + if (err != ERR_OK) { + if (conn->connected) { + if (conn->connected(conn->arg, conn, err) == ERR_ABRT) { + return ERR_ABRT; + } + return ERR_OK; + } + } + /* send proxy connect request here */ + return altcp_proxyconnect_send_request(conn); + } + return ERR_VAL; +} + +/** Recv callback from lower connection (i.e. TCP) + * This one mainly differs between connection setup (wait for proxy OK string) + * and application phase (data is passed on to the application). + */ +static err_t +altcp_proxyconnect_lower_recv(void *arg, struct altcp_pcb *inner_conn, struct pbuf *p, err_t err) +{ + altcp_proxyconnect_state_t *state; + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + + LWIP_ASSERT("no err expected", err == ERR_OK); + LWIP_UNUSED_ARG(err); + + if (!conn) { + /* no connection given as arg? should not happen, but prevent pbuf/conn leaks */ + if (p != NULL) { + pbuf_free(p); + } + altcp_close(inner_conn); + return ERR_CLSD; + } + state = (altcp_proxyconnect_state_t *)conn->state; + LWIP_ASSERT("pcb mismatch", conn->inner_conn == inner_conn); + if (!state) { + /* already closed */ + if (p != NULL) { + pbuf_free(p); + } + altcp_close(inner_conn); + return ERR_CLSD; + } + if (state->flags & ALTCP_PROXYCONNECT_FLAGS_HANDSHAKE_DONE) { + /* application phase, just pass this through */ + if (conn->recv) { + return conn->recv(conn->arg, conn, p, err); + } + pbuf_free(p); + return ERR_OK; + } else { + /* setup phase */ + /* handle NULL pbuf (inner connection closed) */ + if (p == NULL) { + if (altcp_close(conn) != ERR_OK) { + altcp_abort(conn); + return ERR_ABRT; + } + return ERR_OK; + } else { + /* @todo: parse setup phase rx data + for now, we just wait for the end of the header... */ + u16_t idx = pbuf_memfind(p, "\r\n\r\n", 4, 0); + altcp_recved(inner_conn, p->tot_len); + pbuf_free(p); + if (idx != 0xFFFF) { + state->flags |= ALTCP_PROXYCONNECT_FLAGS_HANDSHAKE_DONE; + if (conn->connected) { + return conn->connected(conn->arg, conn, ERR_OK); + } + } + return ERR_OK; + } + } +} + +/** Sent callback from lower connection (i.e. TCP) + * This only informs the upper layer to try to send more, not about + * the number of ACKed bytes. + */ +static err_t +altcp_proxyconnect_lower_sent(void *arg, struct altcp_pcb *inner_conn, u16_t len) +{ + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + LWIP_UNUSED_ARG(len); + if (conn) { + altcp_proxyconnect_state_t *state = (altcp_proxyconnect_state_t *)conn->state; + LWIP_ASSERT("pcb mismatch", conn->inner_conn == inner_conn); + LWIP_UNUSED_ARG(inner_conn); /* for LWIP_NOASSERT */ + if (!state || !(state->flags & ALTCP_PROXYCONNECT_FLAGS_HANDSHAKE_DONE)) { + /* @todo: do something here? */ + return ERR_OK; + } + /* pass this on to upper sent */ + if (conn->sent) { + return conn->sent(conn->arg, conn, len); + } + } + return ERR_OK; +} + +/** Poll callback from lower connection (i.e. TCP) + * Just pass this on to the application. + * @todo: retry sending? + */ +static err_t +altcp_proxyconnect_lower_poll(void *arg, struct altcp_pcb *inner_conn) +{ + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + if (conn) { + LWIP_ASSERT("pcb mismatch", conn->inner_conn == inner_conn); + LWIP_UNUSED_ARG(inner_conn); /* for LWIP_NOASSERT */ + if (conn->poll) { + return conn->poll(conn->arg, conn); + } + } + return ERR_OK; +} + +static void +altcp_proxyconnect_lower_err(void *arg, err_t err) +{ + struct altcp_pcb *conn = (struct altcp_pcb *)arg; + if (conn) { + conn->inner_conn = NULL; /* already freed */ + if (conn->err) { + conn->err(conn->arg, err); + } + altcp_free(conn); + } +} + + +/* setup functions */ + +static void +altcp_proxyconnect_setup_callbacks(struct altcp_pcb *conn, struct altcp_pcb *inner_conn) +{ + altcp_arg(inner_conn, conn); + altcp_recv(inner_conn, altcp_proxyconnect_lower_recv); + altcp_sent(inner_conn, altcp_proxyconnect_lower_sent); + altcp_err(inner_conn, altcp_proxyconnect_lower_err); + /* tcp_poll is set when interval is set by application */ + /* listen is set totally different :-) */ +} + +static err_t +altcp_proxyconnect_setup(struct altcp_proxyconnect_config *config, struct altcp_pcb *conn, struct altcp_pcb *inner_conn) +{ + altcp_proxyconnect_state_t *state; + if (!config) { + return ERR_ARG; + } + LWIP_ASSERT("invalid inner_conn", conn != inner_conn); + + /* allocate proxyconnect context */ + state = altcp_proxyconnect_state_alloc(); + if (state == NULL) { + return ERR_MEM; + } + state->flags = 0; + state->conf = config; + altcp_proxyconnect_setup_callbacks(conn, inner_conn); + conn->inner_conn = inner_conn; + conn->fns = &altcp_proxyconnect_functions; + conn->state = state; + return ERR_OK; +} + +/** Allocate a new altcp layer connecting through a proxy. + * This function gets the inner pcb passed. + * + * @param config struct altcp_proxyconnect_config that contains the proxy settings + * @param inner_pcb pcb that makes the connection to the proxy (i.e. tcp pcb) + */ +struct altcp_pcb * +altcp_proxyconnect_new(struct altcp_proxyconnect_config *config, struct altcp_pcb *inner_pcb) +{ + struct altcp_pcb *ret; + if (inner_pcb == NULL) { + return NULL; + } + ret = altcp_alloc(); + if (ret != NULL) { + if (altcp_proxyconnect_setup(config, ret, inner_pcb) != ERR_OK) { + altcp_free(ret); + return NULL; + } + } + return ret; +} + +/** Allocate a new altcp layer connecting through a proxy. + * This function allocates the inner pcb as tcp pcb, resulting in a direct tcp + * connection to the proxy. + * + * @param config struct altcp_proxyconnect_config that contains the proxy settings + * @param ip_type IP type of the connection (@ref lwip_ip_addr_type) + */ +struct altcp_pcb * +altcp_proxyconnect_new_tcp(struct altcp_proxyconnect_config *config, u8_t ip_type) +{ + struct altcp_pcb *inner_pcb, *ret; + + /* inner pcb is tcp */ + inner_pcb = altcp_tcp_new_ip_type(ip_type); + if (inner_pcb == NULL) { + return NULL; + } + ret = altcp_proxyconnect_new(config, inner_pcb); + if (ret == NULL) { + altcp_close(inner_pcb); + } + return ret; +} + +/** Allocator function to allocate a proxy connect altcp pcb connecting directly + * via tcp to the proxy. + * + * The returned pcb is a chain: altcp_proxyconnect - altcp_tcp - tcp pcb + * + * This function is meant for use with @ref altcp_new. + * + * @param arg struct altcp_proxyconnect_config that contains the proxy settings + * @param ip_type IP type of the connection (@ref lwip_ip_addr_type) + */ +struct altcp_pcb * +altcp_proxyconnect_alloc(void *arg, u8_t ip_type) +{ + return altcp_proxyconnect_new_tcp((struct altcp_proxyconnect_config *)arg, ip_type); +} + + +#if LWIP_ALTCP_TLS + +/** Allocator function to allocate a TLS connection through a proxy. + * + * The returned pcb is a chain: altcp_tls - altcp_proxyconnect - altcp_tcp - tcp pcb + * + * This function is meant for use with @ref altcp_new. + * + * @param arg struct altcp_proxyconnect_tls_config that contains the proxy settings + * and tls settings + * @param ip_type IP type of the connection (@ref lwip_ip_addr_type) + */ +struct altcp_pcb * +altcp_proxyconnect_tls_alloc(void *arg, u8_t ip_type) +{ + struct altcp_proxyconnect_tls_config *cfg = (struct altcp_proxyconnect_tls_config *)arg; + struct altcp_pcb *proxy_pcb; + struct altcp_pcb *tls_pcb; + + proxy_pcb = altcp_proxyconnect_new_tcp(&cfg->proxy, ip_type); + tls_pcb = altcp_tls_wrap(cfg->tls_config, proxy_pcb); + + if (tls_pcb == NULL) { + altcp_close(proxy_pcb); + } + return tls_pcb; +} +#endif /* LWIP_ALTCP_TLS */ + +/* "virtual" functions */ +static void +altcp_proxyconnect_set_poll(struct altcp_pcb *conn, u8_t interval) +{ + if (conn != NULL) { + altcp_poll(conn->inner_conn, altcp_proxyconnect_lower_poll, interval); + } +} + +static void +altcp_proxyconnect_recved(struct altcp_pcb *conn, u16_t len) +{ + altcp_proxyconnect_state_t *state; + if (conn == NULL) { + return; + } + state = (altcp_proxyconnect_state_t *)conn->state; + if (state == NULL) { + return; + } + if (!(state->flags & ALTCP_PROXYCONNECT_FLAGS_HANDSHAKE_DONE)) { + return; + } + altcp_recved(conn->inner_conn, len); +} + +static err_t +altcp_proxyconnect_connect(struct altcp_pcb *conn, const ip_addr_t *ipaddr, u16_t port, altcp_connected_fn connected) +{ + altcp_proxyconnect_state_t *state; + + if ((conn == NULL) || (ipaddr == NULL)) { + return ERR_VAL; + } + state = (altcp_proxyconnect_state_t *)conn->state; + if (state == NULL) { + return ERR_VAL; + } + if (state->flags & ALTCP_PROXYCONNECT_FLAGS_CONNECT_STARTED) { + return ERR_VAL; + } + state->flags |= ALTCP_PROXYCONNECT_FLAGS_CONNECT_STARTED; + + conn->connected = connected; + /* connect to our proxy instead, but store the requested address and port */ + ip_addr_copy(state->outer_addr, *ipaddr); + state->outer_port = port; + + return altcp_connect(conn->inner_conn, &state->conf->proxy_addr, state->conf->proxy_port, altcp_proxyconnect_lower_connected); +} + +static struct altcp_pcb * +altcp_proxyconnect_listen(struct altcp_pcb *conn, u8_t backlog, err_t *err) +{ + LWIP_UNUSED_ARG(conn); + LWIP_UNUSED_ARG(backlog); + LWIP_UNUSED_ARG(err); + /* listen not supported! */ + return NULL; +} + +static void +altcp_proxyconnect_abort(struct altcp_pcb *conn) +{ + if (conn != NULL) { + if (conn->inner_conn != NULL) { + altcp_abort(conn->inner_conn); + } + altcp_free(conn); + } +} + +static err_t +altcp_proxyconnect_close(struct altcp_pcb *conn) +{ + if (conn == NULL) { + return ERR_VAL; + } + if (conn->inner_conn != NULL) { + err_t err = altcp_close(conn->inner_conn); + if (err != ERR_OK) { + /* closing inner conn failed, return the error */ + return err; + } + } + /* no inner conn or closing it succeeded, deallocate myself */ + altcp_free(conn); + return ERR_OK; +} + +static err_t +altcp_proxyconnect_write(struct altcp_pcb *conn, const void *dataptr, u16_t len, u8_t apiflags) +{ + altcp_proxyconnect_state_t *state; + + LWIP_UNUSED_ARG(apiflags); + + if (conn == NULL) { + return ERR_VAL; + } + + state = (altcp_proxyconnect_state_t *)conn->state; + if (state == NULL) { + /* @todo: which error? */ + return ERR_CLSD; + } + if (!(state->flags & ALTCP_PROXYCONNECT_FLAGS_HANDSHAKE_DONE)) { + /* @todo: which error? */ + return ERR_VAL; + } + return altcp_write(conn->inner_conn, dataptr, len, apiflags); +} + +static void +altcp_proxyconnect_dealloc(struct altcp_pcb *conn) +{ + /* clean up and free tls state */ + if (conn) { + altcp_proxyconnect_state_t *state = (altcp_proxyconnect_state_t *)conn->state; + if (state) { + altcp_proxyconnect_state_free(state); + conn->state = NULL; + } + } +} +const struct altcp_functions altcp_proxyconnect_functions = { + altcp_proxyconnect_set_poll, + altcp_proxyconnect_recved, + altcp_default_bind, + altcp_proxyconnect_connect, + altcp_proxyconnect_listen, + altcp_proxyconnect_abort, + altcp_proxyconnect_close, + altcp_default_shutdown, + altcp_proxyconnect_write, + altcp_default_output, + altcp_default_mss, + altcp_default_sndbuf, + altcp_default_sndqueuelen, + altcp_default_nagle_disable, + altcp_default_nagle_enable, + altcp_default_nagle_disabled, + altcp_default_setprio, + altcp_proxyconnect_dealloc, + altcp_default_get_tcp_addrinfo, + altcp_default_get_ip, + altcp_default_get_port +#ifdef LWIP_DEBUG + , altcp_default_dbg_get_tcp_state +#endif +}; + +#endif /* LWIP_ALTCP */ diff --git a/User/lwip_if/lwip_http/fs.c b/User/lwip_if/lwip_http/fs.c new file mode 100644 index 0000000..e0387f7 --- /dev/null +++ b/User/lwip_if/lwip_http/fs.c @@ -0,0 +1,184 @@ +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#include "lwip/apps/httpd_opts.h" +#include "lwip/def.h" +#include "lwip/apps/fs.h" +#include "fsdata.h" +#include + + +#define FS_ROOT file__STM32H7xxLED_html +#define FS_NUMFILES 7 + +//#if HTTPD_USE_CUSTOM_FSDATA +//#include "fsdata_custom.c" +//#else /* HTTPD_USE_CUSTOM_FSDATA */ +//#include "fsdata.c" +//#endif /* HTTPD_USE_CUSTOM_FSDATA */ + +#include "fsdata_custom.c" + +/*-----------------------------------------------------------------------------------*/ + +#if LWIP_HTTPD_CUSTOM_FILES +int fs_open_custom(struct fs_file *file, const char *name); +void fs_close_custom(struct fs_file *file); +#if LWIP_HTTPD_FS_ASYNC_READ +u8_t fs_canread_custom(struct fs_file *file); +u8_t fs_wait_read_custom(struct fs_file *file, fs_wait_cb callback_fn, void *callback_arg); +int fs_read_async_custom(struct fs_file *file, char *buffer, int count, fs_wait_cb callback_fn, void *callback_arg); +#else /* LWIP_HTTPD_FS_ASYNC_READ */ +int fs_read_custom(struct fs_file *file, char *buffer, int count); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + +/*-----------------------------------------------------------------------------------*/ +err_t +fs_open(struct fs_file *file, const char *name) +{ + const struct fsdata_file *f; + + if ((file == NULL) || (name == NULL)) { + return ERR_ARG; + } + +#if LWIP_HTTPD_CUSTOM_FILES + if (fs_open_custom(file, name)) { + file->is_custom_file = 1; + return ERR_OK; + } + file->is_custom_file = 0; +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + + for (f = FS_ROOT; f != NULL; f = f->next) { + if (!strcmp(name, (const char *)f->name)) { + file->data = (const char *)f->data; + file->len = f->len; + file->index = f->len; + file->pextension = NULL; + file->flags = f->flags; +#if HTTPD_PRECALCULATED_CHECKSUM + file->chksum_count = f->chksum_count; + file->chksum = f->chksum; +#endif /* HTTPD_PRECALCULATED_CHECKSUM */ +#if LWIP_HTTPD_FILE_STATE + file->state = fs_state_init(file, name); +#endif /* #if LWIP_HTTPD_FILE_STATE */ + return ERR_OK; + } + } + /* file not found */ + return ERR_VAL; +} + +/*-----------------------------------------------------------------------------------*/ +void +fs_close(struct fs_file *file) +{ +#if LWIP_HTTPD_CUSTOM_FILES + if (file->is_custom_file) { + fs_close_custom(file); + } +#endif /* LWIP_HTTPD_CUSTOM_FILES */ +#if LWIP_HTTPD_FILE_STATE + fs_state_free(file, file->state); +#endif /* #if LWIP_HTTPD_FILE_STATE */ + LWIP_UNUSED_ARG(file); +} +/*-----------------------------------------------------------------------------------*/ +#if LWIP_HTTPD_DYNAMIC_FILE_READ +#if LWIP_HTTPD_FS_ASYNC_READ +int +fs_read_async(struct fs_file *file, char *buffer, int count, fs_wait_cb callback_fn, void *callback_arg) +#else /* LWIP_HTTPD_FS_ASYNC_READ */ +int +fs_read(struct fs_file *file, char *buffer, int count) +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +{ + int read; + if(file->index == file->len) { + return FS_READ_EOF; + } +#if LWIP_HTTPD_FS_ASYNC_READ + LWIP_UNUSED_ARG(callback_fn); + LWIP_UNUSED_ARG(callback_arg); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +#if LWIP_HTTPD_CUSTOM_FILES + if (file->is_custom_file) { +#if LWIP_HTTPD_FS_ASYNC_READ + return fs_read_async_custom(file, buffer, count, callback_fn, callback_arg); +#else /* LWIP_HTTPD_FS_ASYNC_READ */ + return fs_read_custom(file, buffer, count); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + } +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + + read = file->len - file->index; + if(read > count) { + read = count; + } + + MEMCPY(buffer, (file->data + file->index), read); + file->index += read; + + return(read); +} +#endif /* LWIP_HTTPD_DYNAMIC_FILE_READ */ +/*-----------------------------------------------------------------------------------*/ +#if LWIP_HTTPD_FS_ASYNC_READ +int +fs_is_file_ready(struct fs_file *file, fs_wait_cb callback_fn, void *callback_arg) +{ + if (file != NULL) { +#if LWIP_HTTPD_FS_ASYNC_READ +#if LWIP_HTTPD_CUSTOM_FILES + if (!fs_canread_custom(file)) { + if (fs_wait_read_custom(file, callback_fn, callback_arg)) { + return 0; + } + } +#else /* LWIP_HTTPD_CUSTOM_FILES */ + LWIP_UNUSED_ARG(callback_fn); + LWIP_UNUSED_ARG(callback_arg); +#endif /* LWIP_HTTPD_CUSTOM_FILES */ +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + } + return 1; +} +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +/*-----------------------------------------------------------------------------------*/ +int +fs_bytes_left(struct fs_file *file) +{ + return file->len - file->index; +} diff --git a/User/lwip_if/lwip_http/fs_new.c b/User/lwip_if/lwip_http/fs_new.c new file mode 100644 index 0000000..f15a480 --- /dev/null +++ b/User/lwip_if/lwip_http/fs_new.c @@ -0,0 +1,174 @@ +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#include "lwip/apps/httpd_opts.h" +#include "lwip/def.h" +#include "lwip/apps/fs.h" +#include + + +#include HTTPD_FSDATA_FILE + +/*-----------------------------------------------------------------------------------*/ + +#if LWIP_HTTPD_CUSTOM_FILES +int fs_open_custom(struct fs_file *file, const char *name); +void fs_close_custom(struct fs_file *file); +#if LWIP_HTTPD_FS_ASYNC_READ +u8_t fs_canread_custom(struct fs_file *file); +u8_t fs_wait_read_custom(struct fs_file *file, fs_wait_cb callback_fn, void *callback_arg); +int fs_read_async_custom(struct fs_file *file, char *buffer, int count, fs_wait_cb callback_fn, void *callback_arg); +#else /* LWIP_HTTPD_FS_ASYNC_READ */ +int fs_read_custom(struct fs_file *file, char *buffer, int count); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + +/*-----------------------------------------------------------------------------------*/ +err_t +fs_open(struct fs_file *file, const char *name) +{ + const struct fsdata_file *f; + + if ((file == NULL) || (name == NULL)) { + return ERR_ARG; + } + +#if LWIP_HTTPD_CUSTOM_FILES + if (fs_open_custom(file, name)) { + file->is_custom_file = 1; + return ERR_OK; + } + file->is_custom_file = 0; +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + + for (f = FS_ROOT; f != NULL; f = f->next) { + if (!strcmp(name, (const char *)f->name)) { + file->data = (const char *)f->data; + file->len = f->len; + file->index = f->len; + file->pextension = NULL; + file->flags = f->flags; +#if HTTPD_PRECALCULATED_CHECKSUM + file->chksum_count = f->chksum_count; + file->chksum = f->chksum; +#endif /* HTTPD_PRECALCULATED_CHECKSUM */ +#if LWIP_HTTPD_FILE_STATE + file->state = fs_state_init(file, name); +#endif /* #if LWIP_HTTPD_FILE_STATE */ + return ERR_OK; + } + } + /* file not found */ + return ERR_VAL; +} + +/*-----------------------------------------------------------------------------------*/ +void +fs_close(struct fs_file *file) +{ +#if LWIP_HTTPD_CUSTOM_FILES + if (file->is_custom_file) { + fs_close_custom(file); + } +#endif /* LWIP_HTTPD_CUSTOM_FILES */ +#if LWIP_HTTPD_FILE_STATE + fs_state_free(file, file->state); +#endif /* #if LWIP_HTTPD_FILE_STATE */ + LWIP_UNUSED_ARG(file); +} +/*-----------------------------------------------------------------------------------*/ +#if LWIP_HTTPD_DYNAMIC_FILE_READ +#if LWIP_HTTPD_FS_ASYNC_READ +int +fs_read_async(struct fs_file *file, char *buffer, int count, fs_wait_cb callback_fn, void *callback_arg) +#else /* LWIP_HTTPD_FS_ASYNC_READ */ +int +fs_read(struct fs_file *file, char *buffer, int count) +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +{ + int read; + if (file->index == file->len) { + return FS_READ_EOF; + } +#if LWIP_HTTPD_FS_ASYNC_READ + LWIP_UNUSED_ARG(callback_fn); + LWIP_UNUSED_ARG(callback_arg); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +#if LWIP_HTTPD_CUSTOM_FILES + if (file->is_custom_file) { +#if LWIP_HTTPD_FS_ASYNC_READ + return fs_read_async_custom(file, buffer, count, callback_fn, callback_arg); +#else /* LWIP_HTTPD_FS_ASYNC_READ */ + return fs_read_custom(file, buffer, count); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + } +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + + read = file->len - file->index; + if (read > count) { + read = count; + } + + MEMCPY(buffer, (file->data + file->index), read); + file->index += read; + + return (read); +} +#endif /* LWIP_HTTPD_DYNAMIC_FILE_READ */ +/*-----------------------------------------------------------------------------------*/ +#if LWIP_HTTPD_FS_ASYNC_READ +int +fs_is_file_ready(struct fs_file *file, fs_wait_cb callback_fn, void *callback_arg) +{ + if (file != NULL) { +#if LWIP_HTTPD_FS_ASYNC_READ +#if LWIP_HTTPD_CUSTOM_FILES + if (!fs_canread_custom(file)) { + if (fs_wait_read_custom(file, callback_fn, callback_arg)) { + return 0; + } + } +#else /* LWIP_HTTPD_CUSTOM_FILES */ + LWIP_UNUSED_ARG(callback_fn); + LWIP_UNUSED_ARG(callback_arg); +#endif /* LWIP_HTTPD_CUSTOM_FILES */ +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + } + return 1; +} +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +/*-----------------------------------------------------------------------------------*/ +int +fs_bytes_left(struct fs_file *file) +{ + return file->len - file->index; +} diff --git a/User/lwip_if/lwip_http/fsdata.c b/User/lwip_if/lwip_http/fsdata.c new file mode 100644 index 0000000..6170ce6 --- /dev/null +++ b/User/lwip_if/lwip_http/fsdata.c @@ -0,0 +1,298 @@ +#include "lwip/apps/fs.h" +#include "lwip/def.h" +#include "fsdata.h" + + +#define file_NULL (struct fsdata_file *) NULL + + +static const unsigned int dummy_align__img_sics_gif = 0; +static const unsigned char data__img_sics_gif[] = { +/* /img/sics.gif (14 chars) */ +0x2f,0x69,0x6d,0x67,0x2f,0x73,0x69,0x63,0x73,0x2e,0x67,0x69,0x66,0x00,0x00,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) +" (63 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, +0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, +0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, +0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, +/* "Content-type: image/gif + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x69,0x6d, +0x61,0x67,0x65,0x2f,0x67,0x69,0x66,0x0d,0x0a,0x0d,0x0a, +/* raw file data (724 bytes) */ +0x47,0x49,0x46,0x38,0x39,0x61,0x46,0x00,0x22,0x00,0xa5,0x00,0x00,0xd9,0x2b,0x39, +0x6a,0x6a,0x6a,0xbf,0xbf,0xbf,0x93,0x93,0x93,0x0f,0x0f,0x0f,0xb0,0xb0,0xb0,0xa6, +0xa6,0xa6,0x80,0x80,0x80,0x76,0x76,0x76,0x1e,0x1e,0x1e,0x9d,0x9d,0x9d,0x2e,0x2e, +0x2e,0x49,0x49,0x49,0x54,0x54,0x54,0x8a,0x8a,0x8a,0x60,0x60,0x60,0xc6,0xa6,0x99, +0xbd,0xb5,0xb2,0xc2,0xab,0xa1,0xd9,0x41,0x40,0xd5,0x67,0x55,0xc0,0xb0,0xaa,0xd5, +0x5e,0x4e,0xd6,0x50,0x45,0xcc,0x93,0x7d,0xc8,0xa1,0x90,0xce,0x8b,0x76,0xd2,0x7b, +0x65,0xd1,0x84,0x6d,0xc9,0x99,0x86,0x3a,0x3a,0x3a,0x00,0x00,0x00,0xb8,0xb8,0xb8, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2c,0x00,0x00, +0x00,0x00,0x46,0x00,0x22,0x00,0x00,0x06,0xfe,0x40,0x90,0x70,0x48,0x2c,0x1a,0x8f, +0xc8,0xa4,0x72,0xc9,0x6c,0x3a,0x9f,0xd0,0xa8,0x74,0x4a,0xad,0x5a,0xaf,0xd8,0xac, +0x76,0xa9,0x40,0x04,0xbe,0x83,0xe2,0x60,0x3c,0x50,0x20,0x0d,0x8e,0x6f,0x00,0x31, +0x28,0x1c,0x0d,0x07,0xb5,0xc3,0x60,0x75,0x24,0x3e,0xf8,0xfc,0x87,0x11,0x06,0xe9, +0x3d,0x46,0x07,0x0b,0x7a,0x7a,0x7c,0x43,0x06,0x1e,0x84,0x78,0x0b,0x07,0x6e,0x51, +0x01,0x8a,0x84,0x08,0x7e,0x79,0x80,0x87,0x89,0x91,0x7a,0x93,0x0a,0x04,0x99,0x78, +0x96,0x4f,0x03,0x9e,0x79,0x01,0x94,0x9f,0x43,0x9c,0xa3,0xa4,0x05,0x77,0xa3,0xa0, +0x4e,0x98,0x79,0x0b,0x1e,0x83,0xa4,0xa6,0x1f,0x96,0x05,0x9d,0xaa,0x78,0x01,0x07, +0x84,0x04,0x1e,0x1e,0xbb,0xb8,0x51,0x84,0x0e,0x43,0x05,0x07,0x77,0xa5,0x7f,0x42, +0xb1,0xb2,0x01,0x63,0x08,0x0d,0xbb,0x01,0x0c,0x7a,0x0d,0x44,0x0e,0xd8,0xaf,0x4c, +0x05,0x7a,0x04,0x47,0x07,0x07,0xb7,0x80,0xa2,0xe1,0x7d,0x44,0x05,0x01,0x04,0x01, +0xd0,0xea,0x87,0x93,0x4f,0xe0,0x9a,0x49,0xce,0xd8,0x79,0x04,0x66,0x20,0x15,0x10, +0x10,0x11,0x92,0x29,0x80,0xb6,0xc0,0x91,0x15,0x45,0x1e,0x90,0x19,0x71,0x46,0xa8, +0x5c,0x04,0x0e,0x00,0x22,0x4e,0xe8,0x40,0x24,0x9f,0x3e,0x04,0x06,0xa7,0x58,0xd4, +0x93,0xa0,0x1c,0x91,0x3f,0xe8,0xf0,0x88,0x03,0xb1,0x21,0xa2,0x49,0x00,0x19,0x86, +0xfc,0x52,0x44,0xe0,0x01,0x9d,0x29,0x21,0x15,0x25,0x50,0xf7,0x67,0x25,0x1e,0x06, +0xfd,0x4e,0x9a,0xb4,0x90,0xac,0x15,0xfa,0xcb,0x52,0x53,0x1e,0x8c,0xf2,0xf8,0x07, +0x92,0x2d,0x08,0x3a,0x4d,0x12,0x49,0x95,0x49,0xdb,0x14,0x04,0xc4,0x14,0x85,0x29, +0xaa,0xe7,0x01,0x08,0xa4,0x49,0x01,0x14,0x51,0xe0,0x53,0x91,0xd5,0x29,0x06,0x1a, +0x64,0x02,0xf4,0xc7,0x81,0x9e,0x05,0x20,0x22,0x64,0xa5,0x30,0xae,0xab,0x9e,0x97, +0x53,0xd8,0xb9,0xfd,0x50,0xef,0x93,0x02,0x42,0x74,0x34,0xe8,0x9c,0x20,0x21,0xc9, +0x01,0x68,0x78,0xe6,0x55,0x29,0x20,0x56,0x4f,0x4c,0x40,0x51,0x71,0x82,0xc0,0x70, +0x21,0x22,0x85,0xbe,0x4b,0x1c,0x44,0x05,0xea,0xa4,0x01,0xbf,0x22,0xb5,0xf0,0x1c, +0x06,0x51,0x38,0x8f,0xe0,0x22,0xec,0x18,0xac,0x39,0x22,0xd4,0xd6,0x93,0x44,0x01, +0x32,0x82,0xc8,0xfc,0x61,0xb3,0x01,0x45,0x0c,0x2e,0x83,0x30,0xd0,0x0e,0x17,0x24, +0x0f,0x70,0x85,0x94,0xee,0x05,0x05,0x53,0x4b,0x32,0x1b,0x3f,0x98,0xd3,0x1d,0x29, +0x81,0xb0,0xae,0x1e,0x8c,0x7e,0x68,0xe0,0x60,0x5a,0x54,0x8f,0xb0,0x78,0x69,0x73, +0x06,0xa2,0x00,0x6b,0x57,0xca,0x3d,0x11,0x50,0xbd,0x04,0x30,0x4b,0x3a,0xd4,0xab, +0x5f,0x1f,0x9b,0x3d,0x13,0x74,0x27,0x88,0x3c,0x25,0xe0,0x17,0xbe,0x7a,0x79,0x45, +0x0d,0x0c,0xb0,0x8b,0xda,0x90,0xca,0x80,0x06,0x5d,0x17,0x60,0x1c,0x22,0x4c,0xd8, +0x57,0x22,0x06,0x20,0x00,0x98,0x07,0x08,0xe4,0x56,0x80,0x80,0x1c,0xc5,0xb7,0xc5, +0x82,0x0c,0x36,0xe8,0xe0,0x83,0x10,0x46,0x28,0xe1,0x84,0x14,0x56,0x68,0xa1,0x10, +0x41,0x00,0x00,0x3b,}; + +static const unsigned int dummy_align__404_html = 1; +static const unsigned char data__404_html[] = { +/* /404.html (10 chars) */ +0x2f,0x34,0x30,0x34,0x2e,0x68,0x74,0x6d,0x6c,0x00,0x00,0x00, + +/* HTTP header */ +/* "HTTP/1.0 404 File not found +" (29 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x34,0x30,0x34,0x20,0x46,0x69,0x6c, +0x65,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x0d,0x0a, +/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) +" (63 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, +0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, +0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, +0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, +/* "Content-type: text/html + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, +0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x0d,0x0a, +/* raw file data (565 bytes) */ +0x3c,0x68,0x74,0x6d,0x6c,0x3e,0x0d,0x0a,0x3c,0x68,0x65,0x61,0x64,0x3e,0x3c,0x74, +0x69,0x74,0x6c,0x65,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c,0x69, +0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50, +0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x74,0x69,0x74,0x6c,0x65,0x3e,0x3c,0x2f, +0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x3c,0x62,0x6f,0x64,0x79,0x20,0x62,0x67,0x63, +0x6f,0x6c,0x6f,0x72,0x3d,0x22,0x77,0x68,0x69,0x74,0x65,0x22,0x20,0x74,0x65,0x78, +0x74,0x3d,0x22,0x62,0x6c,0x61,0x63,0x6b,0x22,0x3e,0x0d,0x0a,0x0d,0x0a,0x20,0x20, +0x20,0x20,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22, +0x31,0x30,0x30,0x25,0x22,0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74, +0x72,0x20,0x76,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22,0x3e,0x3c, +0x74,0x64,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x38,0x30,0x22,0x3e,0x09,0x20, +0x20,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68, +0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73, +0x65,0x2f,0x22,0x3e,0x3c,0x69,0x6d,0x67,0x20,0x73,0x72,0x63,0x3d,0x22,0x2f,0x69, +0x6d,0x67,0x2f,0x73,0x69,0x63,0x73,0x2e,0x67,0x69,0x66,0x22,0x0d,0x0a,0x09,0x20, +0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x30,0x22,0x20,0x61,0x6c,0x74,0x3d, +0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x20,0x74,0x69,0x74,0x6c, +0x65,0x3d,0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x3e,0x3c,0x2f, +0x61,0x3e,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x20,0x77,0x69, +0x64,0x74,0x68,0x3d,0x22,0x35,0x30,0x30,0x22,0x3e,0x09,0x20,0x20,0x0d,0x0a,0x09, +0x20,0x20,0x3c,0x68,0x31,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c, +0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49, +0x50,0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x68,0x31,0x3e,0x0d,0x0a,0x09,0x20, +0x20,0x3c,0x68,0x32,0x3e,0x34,0x30,0x34,0x20,0x2d,0x20,0x50,0x61,0x67,0x65,0x20, +0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x3c,0x2f,0x68,0x32,0x3e,0x0d,0x0a, +0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x53,0x6f,0x72, +0x72,0x79,0x2c,0x20,0x74,0x68,0x65,0x20,0x70,0x61,0x67,0x65,0x20,0x79,0x6f,0x75, +0x20,0x61,0x72,0x65,0x20,0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x69,0x6e,0x67,0x20, +0x77,0x61,0x73,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x20,0x6f,0x6e, +0x20,0x74,0x68,0x69,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x73,0x65,0x72,0x76, +0x65,0x72,0x2e,0x20,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09, +0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x2f,0x74,0x72, +0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65, +0x3e,0x0d,0x0a,0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x68,0x74, +0x6d,0x6c,0x3e,0x0d,0x0a,}; + +static const unsigned int dummy_align__index_html = 2; +static const unsigned char data__index_html[] = { +/* /index.html (12 chars) */ +0x2f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x68,0x74,0x6d,0x6c,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) +" (63 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, +0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, +0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, +0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, +/* "Content-type: text/html + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, +0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x0d,0x0a, +/* raw file data (1751 bytes) */ +0x3c,0x68,0x74,0x6d,0x6c,0x3e,0x0d,0x0a,0x3c,0x68,0x65,0x61,0x64,0x3e,0x3c,0x74, +0x69,0x74,0x6c,0x65,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c,0x69, +0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50, +0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x74,0x69,0x74,0x6c,0x65,0x3e,0x3c,0x2f, +0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x3c,0x62,0x6f,0x64,0x79,0x20,0x62,0x67,0x63, +0x6f,0x6c,0x6f,0x72,0x3d,0x22,0x77,0x68,0x69,0x74,0x65,0x22,0x20,0x74,0x65,0x78, +0x74,0x3d,0x22,0x62,0x6c,0x61,0x63,0x6b,0x22,0x3e,0x0d,0x0a,0x0d,0x0a,0x20,0x20, +0x20,0x20,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22, +0x31,0x30,0x30,0x25,0x22,0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74, +0x72,0x20,0x76,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22,0x3e,0x3c, +0x74,0x64,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x38,0x30,0x22,0x3e,0x09,0x20, +0x20,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68, +0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73, +0x65,0x2f,0x22,0x3e,0x3c,0x69,0x6d,0x67,0x20,0x73,0x72,0x63,0x3d,0x22,0x2f,0x69, +0x6d,0x67,0x2f,0x73,0x69,0x63,0x73,0x2e,0x67,0x69,0x66,0x22,0x0d,0x0a,0x09,0x20, +0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x30,0x22,0x20,0x61,0x6c,0x74,0x3d, +0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x20,0x74,0x69,0x74,0x6c, +0x65,0x3d,0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x3e,0x3c,0x2f, +0x61,0x3e,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x20,0x77,0x69, +0x64,0x74,0x68,0x3d,0x22,0x35,0x30,0x30,0x22,0x3e,0x09,0x20,0x20,0x0d,0x0a,0x09, +0x20,0x20,0x3c,0x68,0x31,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c, +0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49, +0x50,0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x68,0x31,0x3e,0x0d,0x0a,0x09,0x20, +0x20,0x3c,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x54,0x68,0x65,0x20,0x77, +0x65,0x62,0x20,0x70,0x61,0x67,0x65,0x20,0x79,0x6f,0x75,0x20,0x61,0x72,0x65,0x20, +0x77,0x61,0x74,0x63,0x68,0x69,0x6e,0x67,0x20,0x77,0x61,0x73,0x20,0x73,0x65,0x72, +0x76,0x65,0x64,0x20,0x62,0x79,0x20,0x61,0x20,0x73,0x69,0x6d,0x70,0x6c,0x65,0x20, +0x77,0x65,0x62,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x73,0x65,0x72,0x76,0x65,0x72, +0x20,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x20,0x6f,0x6e,0x20,0x74,0x6f,0x70,0x20, +0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x6c,0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67, +0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50,0x20,0x73,0x74,0x61,0x63,0x6b,0x20, +0x3c,0x61,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68, +0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73, +0x65,0x2f,0x7e,0x61,0x64,0x61,0x6d,0x2f,0x6c,0x77,0x69,0x70,0x2f,0x22,0x3e,0x6c, +0x77,0x49,0x50,0x3c,0x2f,0x61,0x3e,0x2e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x2f,0x70, +0x3e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20, +0x6c,0x77,0x49,0x50,0x20,0x69,0x73,0x20,0x61,0x6e,0x20,0x6f,0x70,0x65,0x6e,0x20, +0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74, +0x61,0x74,0x69,0x6f,0x6e,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x54,0x43,0x50, +0x2f,0x49,0x50,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x70,0x72,0x6f,0x74,0x6f,0x63, +0x6f,0x6c,0x20,0x73,0x75,0x69,0x74,0x65,0x20,0x74,0x68,0x61,0x74,0x20,0x77,0x61, +0x73,0x20,0x6f,0x72,0x69,0x67,0x69,0x6e,0x61,0x6c,0x6c,0x79,0x20,0x77,0x72,0x69, +0x74,0x74,0x65,0x6e,0x20,0x62,0x79,0x20,0x3c,0x61,0x0d,0x0a,0x09,0x20,0x20,0x20, +0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77, +0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73,0x65,0x2f,0x7e,0x61,0x64,0x61,0x6d,0x2f, +0x6c,0x77,0x69,0x70,0x2f,0x22,0x3e,0x41,0x64,0x61,0x6d,0x20,0x44,0x75,0x6e,0x6b, +0x65,0x6c,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x6f,0x66,0x20,0x74,0x68,0x65, +0x20,0x53,0x77,0x65,0x64,0x69,0x73,0x68,0x20,0x49,0x6e,0x73,0x74,0x69,0x74,0x75, +0x74,0x65,0x20,0x6f,0x66,0x20,0x43,0x6f,0x6d,0x70,0x75,0x74,0x65,0x72,0x20,0x53, +0x63,0x69,0x65,0x6e,0x63,0x65,0x3c,0x2f,0x61,0x3e,0x20,0x62,0x75,0x74,0x20,0x6e, +0x6f,0x77,0x20,0x69,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x62,0x65,0x69,0x6e, +0x67,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x6c,0x79,0x20,0x64,0x65,0x76,0x65,0x6c, +0x6f,0x70,0x65,0x64,0x20,0x62,0x79,0x20,0x61,0x20,0x74,0x65,0x61,0x6d,0x20,0x6f, +0x66,0x20,0x64,0x65,0x76,0x65,0x6c,0x6f,0x70,0x65,0x72,0x73,0x0d,0x0a,0x09,0x20, +0x20,0x20,0x20,0x64,0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x64,0x20,0x77, +0x6f,0x72,0x6c,0x64,0x2d,0x77,0x69,0x64,0x65,0x2e,0x20,0x53,0x69,0x6e,0x63,0x65, +0x20,0x69,0x74,0x27,0x73,0x20,0x72,0x65,0x6c,0x65,0x61,0x73,0x65,0x2c,0x20,0x6c, +0x77,0x49,0x50,0x20,0x68,0x61,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x73,0x70, +0x75,0x72,0x72,0x65,0x64,0x20,0x61,0x20,0x6c,0x6f,0x74,0x20,0x6f,0x66,0x20,0x69, +0x6e,0x74,0x65,0x72,0x65,0x73,0x74,0x20,0x61,0x6e,0x64,0x20,0x68,0x61,0x73,0x20, +0x62,0x65,0x65,0x6e,0x20,0x70,0x6f,0x72,0x74,0x65,0x64,0x20,0x74,0x6f,0x20,0x73, +0x65,0x76,0x65,0x72,0x61,0x6c,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x70,0x6c,0x61, +0x74,0x66,0x6f,0x72,0x6d,0x73,0x20,0x61,0x6e,0x64,0x20,0x6f,0x70,0x65,0x72,0x61, +0x74,0x69,0x6e,0x67,0x20,0x73,0x79,0x73,0x74,0x65,0x6d,0x73,0x2e,0x20,0x6c,0x77, +0x49,0x50,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x75,0x73,0x65,0x64,0x20,0x65, +0x69,0x74,0x68,0x65,0x72,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x77,0x69,0x74,0x68, +0x20,0x6f,0x72,0x20,0x77,0x69,0x74,0x68,0x6f,0x75,0x74,0x20,0x61,0x6e,0x20,0x75, +0x6e,0x64,0x65,0x72,0x6c,0x79,0x69,0x6e,0x67,0x20,0x4f,0x53,0x2e,0x0d,0x0a,0x09, +0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d,0x0a, +0x09,0x20,0x20,0x20,0x20,0x54,0x68,0x65,0x20,0x66,0x6f,0x63,0x75,0x73,0x20,0x6f, +0x66,0x20,0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x20,0x54,0x43,0x50,0x2f,0x49, +0x50,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e, +0x20,0x69,0x73,0x20,0x74,0x6f,0x20,0x72,0x65,0x64,0x75,0x63,0x65,0x0d,0x0a,0x09, +0x20,0x20,0x20,0x20,0x74,0x68,0x65,0x20,0x52,0x41,0x4d,0x20,0x75,0x73,0x61,0x67, +0x65,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,0x73,0x74,0x69,0x6c,0x6c,0x20,0x68,0x61, +0x76,0x69,0x6e,0x67,0x20,0x61,0x20,0x66,0x75,0x6c,0x6c,0x20,0x73,0x63,0x61,0x6c, +0x65,0x20,0x54,0x43,0x50,0x2e,0x20,0x54,0x68,0x69,0x73,0x0d,0x0a,0x09,0x20,0x20, +0x20,0x20,0x6d,0x61,0x6b,0x65,0x73,0x20,0x6c,0x77,0x49,0x50,0x20,0x73,0x75,0x69, +0x74,0x61,0x62,0x6c,0x65,0x20,0x66,0x6f,0x72,0x20,0x75,0x73,0x65,0x20,0x69,0x6e, +0x20,0x65,0x6d,0x62,0x65,0x64,0x64,0x65,0x64,0x20,0x73,0x79,0x73,0x74,0x65,0x6d, +0x73,0x20,0x77,0x69,0x74,0x68,0x20,0x74,0x65,0x6e,0x73,0x0d,0x0a,0x09,0x20,0x20, +0x20,0x20,0x6f,0x66,0x20,0x6b,0x69,0x6c,0x6f,0x62,0x79,0x74,0x65,0x73,0x20,0x6f, +0x66,0x20,0x66,0x72,0x65,0x65,0x20,0x52,0x41,0x4d,0x20,0x61,0x6e,0x64,0x20,0x72, +0x6f,0x6f,0x6d,0x20,0x66,0x6f,0x72,0x20,0x61,0x72,0x6f,0x75,0x6e,0x64,0x20,0x34, +0x30,0x20,0x6b,0x69,0x6c,0x6f,0x62,0x79,0x74,0x65,0x73,0x0d,0x0a,0x09,0x20,0x20, +0x20,0x20,0x6f,0x66,0x20,0x63,0x6f,0x64,0x65,0x20,0x52,0x4f,0x4d,0x2e,0x0d,0x0a, +0x09,0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d, +0x0a,0x09,0x20,0x20,0x20,0x20,0x4d,0x6f,0x72,0x65,0x20,0x69,0x6e,0x66,0x6f,0x72, +0x6d,0x61,0x74,0x69,0x6f,0x6e,0x20,0x61,0x62,0x6f,0x75,0x74,0x20,0x6c,0x77,0x49, +0x50,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x66,0x6f,0x75,0x6e,0x64,0x20,0x61, +0x74,0x20,0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x0d,0x0a,0x09,0x20,0x20,0x20, +0x20,0x68,0x6f,0x6d,0x65,0x70,0x61,0x67,0x65,0x20,0x61,0x74,0x20,0x3c,0x61,0x0d, +0x0a,0x09,0x20,0x20,0x20,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68,0x74,0x74,0x70, +0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67, +0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f, +0x6c,0x77,0x69,0x70,0x2f,0x22,0x3e,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61, +0x76,0x61,0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72, +0x67,0x2f,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x2f, +0x3c,0x2f,0x61,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x6f,0x72,0x20,0x61,0x74, +0x20,0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x20,0x77,0x69,0x6b,0x69,0x20,0x61, +0x74,0x20,0x3c,0x61,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x68,0x72,0x65,0x66,0x3d, +0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6c,0x77,0x69,0x70,0x2e,0x77,0x69,0x6b, +0x69,0x61,0x2e,0x63,0x6f,0x6d,0x2f,0x22,0x3e,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f, +0x6c,0x77,0x69,0x70,0x2e,0x77,0x69,0x6b,0x69,0x61,0x2e,0x63,0x6f,0x6d,0x2f,0x3c, +0x2f,0x61,0x3e,0x2e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09, +0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x2f,0x74,0x72, +0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65, +0x3e,0x0d,0x0a,0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x68,0x74, +0x6d,0x6c,0x3e,0x0d,0x0a,0x0d,0x0a,}; + + + +const struct fsdata_file file__img_sics_gif[] = { { +file_NULL, +data__img_sics_gif, +data__img_sics_gif + 16, +sizeof(data__img_sics_gif) - 16, +1, +}}; + +const struct fsdata_file file__404_html[] = { { +file__img_sics_gif, +data__404_html, +data__404_html + 12, +sizeof(data__404_html) - 12, +1, +}}; + +const struct fsdata_file file__index_html[] = { { +file__404_html, +data__index_html, +data__index_html + 12, +sizeof(data__index_html) - 12, +1, +}}; + +#define FS_ROOT file__index_html +#define FS_NUMFILES 3 + diff --git a/User/lwip_if/lwip_http/fsdata.h b/User/lwip_if/lwip_http/fsdata.h new file mode 100644 index 0000000..ad4bbf9 --- /dev/null +++ b/User/lwip_if/lwip_http/fsdata.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_FSDATA_H +#define LWIP_FSDATA_H + +#include "lwip/apps/httpd_opts.h" +#include "lwip/apps/fs.h" + +//struct fsdata_file { +// const struct fsdata_file *next; +// const unsigned char *name; +// const unsigned char *data; +// int len; +// u8_t flags; +//#if HTTPD_PRECALCULATED_CHECKSUM +// u16_t chksum_count; +// const struct fsdata_chksum *chksum; +//#endif /* HTTPD_PRECALCULATED_CHECKSUM */ +//}; + +#endif /* LWIP_FSDATA_H */ diff --git a/User/lwip_if/lwip_http/fsdata_custom.c b/User/lwip_if/lwip_http/fsdata_custom.c new file mode 100644 index 0000000..1954484 --- /dev/null +++ b/User/lwip_if/lwip_http/fsdata_custom.c @@ -0,0 +1,4599 @@ +/** + ****************************************************************************** + * @file LwIP/LwIP_HTTP_Server_Raw/Src/fsdata_costom.c + * @author MCD Application Team + * @brief This file provides the Webserver HTML files + ****************************************************************************** + * @attention + * + *

                  © Copyright (c) 2017 STMicroelectronics. + * All rights reserved.

                  + * + * This software component is licensed by ST under Ultimate Liberty license + * SLA0044, the "License"; You may not use this file except in compliance with + * the License. You may obtain a copy of the License at: + * www.st.com/SLA0044 + * + ****************************************************************************** + */ + +#include "lwip/apps/fs.h" +#include "lwip/def.h" +//#include "httpd/fsdata.h" + + +#define file_NULL (struct fsdata_file *) NULL + + +const unsigned int dummy_align__STM32H7xx_files_logo_jpg = 0; +const unsigned char data__STM32H7xx_files_logo_jpg[] = { +/* /STM32H7xx_files/logo.jpg (26 chars) */ +0x2f,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x5f,0x66,0x69,0x6c,0x65,0x73, +0x2f,0x6c,0x6f,0x67,0x6f,0x2e,0x6a,0x70,0x67,0x00,0x00,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) +" (63 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, +0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, +0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, +0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, +/* "Content-type: image/jpeg + +" (28 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x69,0x6d, +0x61,0x67,0x65,0x2f,0x6a,0x70,0x65,0x67,0x0d,0x0a,0x0d,0x0a, +/* raw file data (2554 bytes) */ +0xff,0xd8,0xff,0xe0,0x00,0x10,0x4a,0x46,0x49,0x46,0x00,0x01,0x01,0x01,0x00,0x48, +0x00,0x48,0x00,0x00,0xff,0xfe,0x00,0x3c,0x43,0x52,0x45,0x41,0x54,0x4f,0x52,0x3a, +0x20,0x67,0x64,0x2d,0x6a,0x70,0x65,0x67,0x20,0x76,0x31,0x2e,0x30,0x20,0x28,0x75, +0x73,0x69,0x6e,0x67,0x20,0x49,0x4a,0x47,0x20,0x4a,0x50,0x45,0x47,0x20,0x76,0x36, +0x32,0x29,0x2c,0x20,0x71,0x75,0x61,0x6c,0x69,0x74,0x79,0x20,0x3d,0x20,0x31,0x30, +0x30,0x0a,0xff,0xdb,0x00,0x43,0x00,0x06,0x04,0x05,0x06,0x05,0x04,0x06,0x06,0x05, +0x06,0x07,0x07,0x06,0x08,0x0a,0x10,0x0a,0x0a,0x09,0x09,0x0a,0x14,0x0e,0x0f,0x0c, +0x10,0x17,0x14,0x18,0x18,0x17,0x14,0x16,0x16,0x1a,0x1d,0x25,0x1f,0x1a,0x1b,0x23, +0x1c,0x16,0x16,0x20,0x2c,0x20,0x23,0x26,0x27,0x29,0x2a,0x29,0x19,0x1f,0x2d,0x30, +0x2d,0x28,0x30,0x25,0x28,0x29,0x28,0xff,0xdb,0x00,0x43,0x01,0x07,0x07,0x07,0x0a, +0x08,0x0a,0x13,0x0a,0x0a,0x13,0x28,0x1a,0x16,0x1a,0x28,0x28,0x28,0x28,0x28,0x28, +0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, +0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, +0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0xff,0xc0,0x00,0x11, +0x08,0x00,0x44,0x00,0x60,0x03,0x01,0x22,0x00,0x02,0x11,0x01,0x03,0x11,0x01,0xff, +0xc4,0x00,0x1c,0x00,0x00,0x02,0x02,0x03,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x07,0x06,0x08,0x02,0x03,0x04,0x05,0x01,0xff,0xc4,0x00, +0x3c,0x10,0x00,0x01,0x03,0x03,0x03,0x00,0x06,0x06,0x08,0x05,0x05,0x01,0x00,0x00, +0x00,0x00,0x01,0x02,0x03,0x04,0x00,0x05,0x11,0x06,0x12,0x21,0x07,0x13,0x31,0x41, +0x51,0x81,0x15,0x22,0x61,0x71,0x91,0xd1,0x14,0x32,0x42,0x52,0x55,0x92,0x93,0x94, +0x08,0x23,0x43,0x82,0xa1,0x24,0x33,0x72,0x73,0x83,0xf1,0xff,0xc4,0x00,0x1a,0x01, +0x00,0x02,0x03,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x04,0x01,0x02,0x03,0x05,0x06,0xff,0xc4,0x00,0x2b,0x11,0x00,0x01,0x03,0x02, +0x04,0x03,0x08,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x02,0x03, +0x04,0x11,0x12,0x13,0x21,0x31,0x05,0x41,0xf0,0x14,0x42,0x43,0x51,0x53,0x81,0xa1, +0xd1,0x52,0x61,0xe1,0xff,0xda,0x00,0x0c,0x03,0x01,0x00,0x02,0x11,0x03,0x11,0x00, +0x3f,0x00,0xb5,0x34,0x51,0x45,0x08,0x51,0x9d,0x77,0xac,0x21,0x69,0x1b,0x6a,0x1f, +0x92,0x92,0xf4,0xa7,0x89,0x4c,0x78,0xe9,0x38,0x2b,0x23,0xb4,0x93,0xdc,0x91,0x91, +0x93,0xed,0x14,0x9a,0x97,0xd2,0xae,0xa7,0x96,0xf9,0x5b,0x32,0x19,0x8a,0xde,0x78, +0x6d,0xa6,0x52,0x40,0xf3,0x56,0x4d,0x79,0x5d,0x2c,0xdf,0x7d,0x3b,0xae,0x25,0xa9, +0xb5,0xee,0x8d,0x13,0xfd,0x2b,0x38,0xec,0xc2,0x4f,0xac,0x7c,0xd4,0x4f,0x96,0x29, +0x8d,0xd1,0xa7,0x46,0x90,0x05,0xaa,0x3d,0xd3,0x51,0x47,0x12,0xe4,0xc8,0x48,0x71, +0xb8,0xce,0x72,0xdb,0x69,0x3d,0x9b,0x93,0xf6,0x89,0x1c,0xf3,0xc0,0xf0,0xae,0x8b, +0x19,0x1c,0x11,0x87,0xc8,0x2e,0x4a,0xe6,0x48,0xf9,0x6a,0x24,0x2c,0x8c,0xd8,0x05, +0x0c,0x6f,0xa4,0xad,0x4a,0x7e,0xb5,0xd9,0x23,0xff,0x00,0x26,0xfe,0x55,0xd4,0xd7, +0x48,0x9a,0x85,0x5d,0xb7,0x74,0xfe,0x9b,0x7f,0x2a,0x77,0xa3,0x4f,0xd9,0x90,0x90, +0x94,0x5a,0x2d,0xc9,0x48,0xec,0x02,0x32,0x00,0x1f,0xe2,0xbe,0xfa,0x06,0xcf,0xf8, +0x4d,0xbf,0xf6,0xc8,0xf9,0x55,0x7b,0x54,0x5e,0x98,0x53,0xd8,0xe6,0xf5,0x4f,0x5e, +0xe9,0x34,0xd6,0xbe,0xbe,0xab,0xb6,0xee,0x3f,0x23,0x7f,0x2a,0xe9,0x1a,0xe6,0xf2, +0x46,0x7d,0x30,0x3f,0x23,0x7f,0x2a,0x6e,0x7a,0x02,0xcf,0xf8,0x4d,0xbf,0xf6,0xc8, +0xf9,0x51,0xe8,0x1b,0x3f,0xe1,0x56,0xff,0x00,0xdb,0x23,0xe5,0x55,0x35,0x31,0xfe, +0x0a,0xc2,0x92,0x5f,0x50,0xa4,0xeb,0x9a,0xf6,0xf8,0x9e,0xcb,0xb2,0x7f,0x23,0x7f, +0x2a,0xe5,0x73,0xa4,0x4d,0x40,0x9e,0xcb,0xa2,0x3f,0x4d,0xbf,0x95,0x3b,0x7d,0x03, +0x68,0xfc,0x2a,0xdf,0xfb,0x74,0x7c,0xa8,0xf4,0x0d,0xa3,0xf0,0xa8,0x1f,0xb7,0x47, +0xca,0xa4,0x54,0xc4,0x3c,0x30,0xa0,0xd1,0xca,0x7c,0x43,0xd7,0xba,0x44,0xb9,0xd2, +0x56,0xa4,0x4f,0x65,0xc9,0x1f,0xa4,0x8f,0x95,0x4c,0x7a,0x28,0xd4,0xda,0x83,0x52, +0xde,0xa4,0x09,0xf3,0x12,0xe4,0x18,0xcd,0xee,0x58,0x0d,0xa4,0x65,0x4a,0xe1,0x23, +0x20,0x7b,0x09,0xf2,0xa6,0x2f,0xa0,0xad,0x1f,0x85,0x40,0xfd,0xba,0x3e,0x55,0xd5, +0x12,0x14,0x58,0x49,0x52,0x61,0xc6,0x62,0x3a,0x54,0x72,0x43,0x4d,0x84,0x67,0xdf, +0x8a,0xac,0x95,0x11,0xb9,0xa4,0x35,0x80,0x2b,0xc5,0x4b,0x23,0x1c,0x1c,0xe9,0x09, +0x0b,0xa2,0xa3,0xfa,0xfa,0xf6,0x34,0xfe,0x93,0xb8,0x4f,0x0a,0xda,0xea,0x5b,0x28, +0x6b,0xfe,0x67,0x81,0xf3,0xf2,0xa9,0x05,0x57,0x5f,0xe2,0x3f,0x57,0xf5,0x97,0xa8, +0xda,0x7a,0x32,0x82,0x9a,0x8a,0x90,0xec,0x8c,0x1f,0xea,0x28,0x64,0x0f,0x24,0xe0, +0xf9,0xd6,0x30,0x47,0x8d,0xe0,0x2d,0xea,0x65,0xcb,0x61,0x29,0x6d,0x11,0x7d,0x64, +0xa4,0x17,0x0f,0x0a,0x58,0xdc,0x4f,0xbe,0xae,0x74,0x65,0xb6,0xb8,0xcd,0x29,0x9c, +0x75,0x4a,0x40,0x28,0xc7,0x66,0x31,0xc5,0x51,0xf6,0x26,0xb6,0x7e,0xb6,0x53,0xef, +0xa7,0x8f,0x44,0xfd,0x28,0xb0,0xc3,0x4c,0x59,0xaf,0xef,0xa1,0x2c,0x8c,0x21,0x89, +0x4a,0x3f,0x53,0xc1,0x2b,0xf6,0x7b,0x7b,0xbd,0xdd,0x8f,0x55,0x44,0xe9,0x1a,0x08, +0xe4,0xb9,0xf4,0x93,0x32,0x37,0x10,0x4e,0xeb,0x8b,0x5f,0x5d,0xf5,0x9e,0x9f,0xd4, +0x72,0x5b,0x97,0x72,0x94,0xdc,0x57,0x9c,0x52,0xe3,0x38,0xd2,0xb0,0xda,0xd1,0x9e, +0x00,0xf0,0x20,0x60,0x11,0xff,0x00,0xda,0xf0,0x9b,0xd6,0xda,0x8c,0xf6,0xde,0x66, +0x7e,0xa1,0xab,0x1b,0x7c,0xb4,0x40,0xbf,0xdb,0x1c,0x85,0x71,0x65,0x2f,0xc7,0x70, +0x64,0x1e,0xf4,0x9e,0xe5,0x24,0xf7,0x1f,0x6d,0x57,0x5d,0x73,0xa3,0x66,0xe9,0x39, +0xbe,0xb9,0x2f,0xc0,0x70,0xff,0x00,0x29,0xf0,0x3b,0x7d,0x8a,0xf0,0x35,0x34,0xb2, +0xc6,0xf1,0x85,0xc0,0x5d,0x56,0xb2,0x19,0x23,0x38,0xda,0x4d,0x96,0xf6,0xf5,0x9e, +0xa0,0x3d,0xb7,0x79,0x9f,0xa8,0x6b,0x71,0xd6,0x77,0xe4,0xa0,0x9f,0x4a,0xcc,0x51, +0xee,0x01,0x64,0x92,0x7c,0x05,0x43,0x90,0xed,0x4e,0xba,0x27,0xb2,0x1b,0xd6,0xa8, +0x65,0xf7,0x51,0x98,0x90,0x48,0x7d,0x79,0xec,0x2a,0x1f,0x50,0x7c,0x70,0x7c,0xa9, +0xc9,0x04,0x4c,0x61,0x71,0x68,0xd1,0x23,0x11,0x95,0xef,0x0c,0x0e,0x3a,0xfe,0xd3, +0xda,0xc4,0xcc,0x98,0xf6,0x78,0x6d,0x4f,0x75,0x4e,0xcb,0x4b,0x43,0xad,0x5a,0x8e, +0x49,0x5f,0x69,0xe7,0xdf,0xc5,0x24,0xb5,0xa6,0xb8,0xb9,0xca,0xd4,0x93,0x7d,0x19, +0x70,0x91,0x1e,0x13,0x2e,0x16,0x5a,0x4b,0x2e,0x14,0x85,0x04,0xf0,0x55,0xc7,0x6e, +0x4e,0x70,0x7c,0x31,0x4d,0xbd,0x7f,0x7b,0x4d,0x83,0x4a,0x4f,0x9a,0x5c,0xd8,0xee, +0xc2,0xdb,0x47,0xbf,0x7a,0xb8,0x18,0xf7,0x76,0xf9,0x55,0x57,0x76,0xe6,0xda,0x46, +0x1b,0x4a,0x95,0x8f,0x2a,0x46,0x82,0x0c,0x64,0xc8,0xe1,0x74,0xff,0x00,0x13,0xa9, +0x11,0x06,0xc4,0xd3,0x64,0xce,0xd0,0xb7,0xdd,0x43,0x7b,0xd5,0x30,0x60,0x9b,0xb4, +0xc5,0x32,0x55,0xbd,0xdc,0xb8,0x4f,0xa8,0x9e,0x4f,0xcb,0xce,0x9f,0x74,0xa1,0xfe, +0x1f,0x6d,0x0e,0x7a,0x3e,0x75,0xfa,0x52,0x02,0x4c,0x95,0x7d,0x1e,0x38,0xc7,0x63, +0x69,0x3e,0xb2,0xbc,0xd5,0xc7,0xf6,0x53,0x7a,0x97,0xac,0x70,0x32,0x96,0xb4,0x6c, +0x9b,0xa0,0x69,0xc9,0x0e,0x71,0xbd,0xf5,0x5c,0x97,0x69,0xcd,0x5a,0xed,0x72,0xe7, +0xc8,0xcf,0x53,0x19,0xa5,0x3c,0xb0,0x3b,0x48,0x48,0xce,0x07,0xc2,0xa8,0xdd,0xee, +0x44,0xfb,0xbd,0xea,0x6d,0xca,0x5b,0x4e,0xa9,0xf9,0x4f,0x29,0xe5,0x9d,0xa7,0xb4, +0x9c,0xe0,0x7b,0x05,0x5e,0xfa,0x2b,0x38,0x66,0x11,0x5f,0x4b,0xad,0x2a,0x29,0xcc, +0xd6,0xd6,0xd6,0x54,0x25,0x0c,0x3e,0x3f,0xa2,0xe7,0xe5,0x35,0xbd,0x0d,0x3a,0x3b, +0x5a,0x5f,0xe5,0x35,0x7b,0xe8,0xa6,0x45,0x75,0xbb,0xbf,0x29,0x43,0xc3,0x01,0xef, +0x7c,0x7f,0x52,0x07,0xa0,0x2d,0x69,0x75,0x37,0x16,0xb4,0xd4,0xe6,0xde,0x95,0x09, +0x48,0x51,0x61,0xd2,0x09,0x54,0x7d,0xa0,0x9d,0xa4,0xfd,0xce,0x30,0x3c,0x09,0x03, +0xb3,0x80,0xcd,0xe9,0x7a,0x2b,0x52,0xba,0x3a,0xbd,0x17,0x47,0x2c,0xb2,0x5e,0x41, +0xef,0x0a,0x4f,0x3c,0x7f,0x91,0xe7,0x53,0x1a,0x49,0xf4,0xff,0x00,0xae,0xa2,0x35, +0x68,0x73,0x4d,0xdb,0x1e,0x4b,0xd2,0xdf,0x50,0xfa,0x52,0x9b,0x39,0x0d,0x20,0x1c, +0xed,0x27,0xef,0x12,0x07,0x1d,0xc3,0xdf,0x58,0xb5,0xc6,0x59,0x83,0x98,0x2c,0xb6, +0x73,0x04,0x14,0xe5,0x8f,0x75,0xfa,0xd9,0x21,0x43,0xaa,0xfb,0xc7,0xe3,0x56,0x8f, +0xa0,0xcb,0x29,0xb5,0xe8,0x58,0xf2,0x5e,0x46,0xd9,0x17,0x03,0xf4,0x93,0x91,0xce, +0xc3,0xf5,0x3f,0xc7,0x3f,0xdd,0x55,0xc3,0x41,0x58,0xdc,0xd4,0xba,0xae,0xdd,0x6b, +0x48,0x57,0x56,0xeb,0x80,0xba,0xa1,0xf6,0x5b,0x1c,0xa8,0xfc,0x01,0xf3,0xc5,0x5c, +0x3b,0xa4,0xd8,0xb6,0x3b,0x24,0x99,0x8e,0x80,0xdc,0x58,0x6c,0x15,0xed,0x4f,0x18, +0x4a,0x47,0x00,0x7c,0x30,0x29,0xba,0xf9,0x89,0x02,0x31,0xcd,0x23,0xc3,0x29,0x83, +0x5c,0x66,0x77,0x24,0x87,0xfe,0x21,0xb5,0x37,0xd2,0xef,0xcc,0xd8,0xa3,0xaf,0xf9, +0x30,0x92,0x16,0xfe,0x3b,0xdd,0x50,0xc8,0x1e,0x49,0xc7,0xe6,0x34,0xae,0xb2,0x42, +0x72,0xed,0x78,0x87,0x6f,0x60,0x12,0xe4,0x87,0x52,0xd8,0xf3,0x35,0xcf,0x74,0x9f, +0x2a,0xf5,0x79,0x95,0x31,0xd4,0xa9,0xc9,0x52,0xde,0x53,0x84,0x24,0x12,0x4a,0x94, +0x73,0x80,0x29,0xdb,0xd0,0x6f,0x47,0x33,0xe0,0x5c,0x93,0xa8,0x6f,0xec,0x2a,0x3a, +0x90,0x82,0x22,0x46,0x58,0xc2,0xf2,0x46,0x0a,0xd4,0x3b,0xb8,0xc8,0x00,0xf3,0xce, +0x78,0xc0,0xcb,0x19,0x8d,0xa6,0x84,0x0e,0xae,0x94,0x30,0xba,0xb2,0xa0,0xbb,0x91, +0x3f,0x09,0xcd,0x66,0xb7,0x31,0x68,0xb4,0xc4,0x81,0x15,0x21,0x2c,0xc7,0x6c,0x36, +0x9f,0x6e,0x3b,0xfc,0xfb,0x6b,0xb6,0x8a,0x2b,0x86,0x49,0x26,0xe5,0x7a,0x60,0x03, +0x45,0x82,0xd7,0xd7,0x35,0x85,0x1e,0xb5,0x18,0x4a,0xb6,0xab,0xd6,0x1c,0x1f,0x03, +0xed,0xac,0xb7,0xa7,0x7e,0xcd,0xc3,0x7e,0x33,0xb7,0x3c,0xe3,0xc6,0xa3,0x33,0x9f, +0x6d,0xa5,0xde,0x54,0xdb,0xc8,0x6d,0x48,0x92,0xc1,0x38,0xdb,0xc9,0xc2,0x33,0x90, +0x7c,0xfe,0x15,0xae,0x4c,0x85,0xc4,0x95,0x78,0x7e,0x34,0x82,0xb7,0x14,0xfb,0x2d, +0x95,0x12,0x83,0xd5,0x20,0x84,0xe4,0x8c,0x8e,0x31,0x92,0x39,0xe0,0x77,0xf7,0xd6, +0xc2,0x0b,0xed,0xd6,0xdf,0x69,0x63,0x53,0x87,0x71,0xd6,0xbf,0x4a,0x59,0x45,0x78, +0x10,0x2e,0x9f,0x45,0x44,0xe7,0x2e,0x32,0x47,0xd1,0x23,0x84,0x1e,0xb5,0xc5,0xa1, +0x4a,0x41,0x39,0xc8,0x25,0x03,0x1f,0x77,0x1d,0xfc,0xfb,0xab,0xc6,0xbb,0x5c,0x4c, +0x8d,0x41,0x75,0x62,0x6e,0xa3,0x72,0xc7,0x1e,0x13,0x2d,0xbb,0x18,0x21,0x4d,0x20, +0x3a,0x95,0x27,0x2a,0x79,0x45,0xc4,0x9d,0xc0,0x2b,0x29,0xc0,0xe0,0x6d,0x39,0xed, +0x15,0x43,0x11,0x06,0xcb,0x66,0x4a,0xd7,0x8b,0x85,0x38,0xae,0x43,0x6d,0x82,0x4e, +0x4c,0x28,0xd9,0xff,0x00,0xa9,0x3f,0x2a,0x5f,0xe8,0xdd,0x5a,0xf2,0xad,0xe8,0x91, +0x7f,0xba,0xb4,0x94,0x39,0x60,0x89,0x35,0x0e,0x3c,0x12,0xd0,0x5b,0x85,0x4f,0xf5, +0xab,0x03,0x8e,0xe0,0xd6,0x47,0x76,0x47,0x8f,0x3e,0x7d,0xb7,0x50,0xcc,0x9f,0xa6, +0xe5,0xcf,0xbb,0x6a,0x87,0x2d,0x33,0x21,0xc0,0x8e,0xf3,0x2d,0x80,0xd2,0x43,0x9b, +0xa3,0x36,0xe7,0x5c,0xa4,0xa9,0x24,0xac,0x29,0xc5,0x2d,0x38,0x4e,0x07,0xab,0x81, +0x85,0x64,0xd4,0xe5,0xb8,0x15,0x38,0x81,0x4d,0x46,0x22,0x46,0x8e,0xa2,0xa6,0x23, +0xb2,0xd2,0x88,0xc1,0x28,0x40,0x49,0xc7,0x95,0x6d,0x71,0x08,0x71,0x0a,0x43,0x89, +0x0a,0x42,0x86,0x0a,0x54,0x32,0x0d,0x29,0x23,0x5c,0xaf,0xf3,0x34,0xed,0xd2,0xee, +0x9d,0x41,0x31,0x99,0x11,0x9d,0x82,0xc3,0x2d,0xa5,0xa6,0x8b,0x60,0x3b,0x1a,0x2a, +0x9c,0x51,0x05,0x1c,0x92,0x5e,0x59,0x1c,0xf0,0x71,0xdd,0x90,0x7a,0xf5,0x15,0xe6, +0xf3,0x64,0xb8,0x3d,0x67,0x66,0x7c,0x99,0x11,0x4c,0x98,0xc1,0x53,0x1e,0x5b,0x48, +0x75,0x94,0x3a,0xdb,0xc7,0x66,0xf5,0x27,0x60,0xca,0xda,0x48,0x0a,0x50,0xfb,0x64, +0x0e,0x76,0xe0,0xca,0x3e,0x68,0xc4,0x3c,0x93,0x29,0x98,0x71,0x58,0x56,0xe6,0x23, +0x32,0xda,0xbc,0x50,0x80,0x0f,0xf8,0xad,0xab,0x71,0x08,0x52,0x12,0xb5,0xa5,0x2a, +0x59,0xda,0x90,0x4e,0x0a,0x8e,0x09,0xc0,0xf1,0xe0,0x13,0xe5,0x4a,0xdb,0x75,0xd2, +0xf7,0x72,0x9d,0x06,0xd9,0xe9,0x67,0xd8,0x8a,0xab,0xa2,0xa3,0x99,0x0d,0x38,0xcb, +0xcf,0x29,0x02,0x2b,0x8e,0x29,0xa2,0xe0,0x46,0xc2,0x42,0x92,0x9f,0x58,0x0c,0x80, +0x70,0x79,0x19,0xac,0xe4,0x37,0x3a,0x75,0xef,0x4f,0xc7,0x93,0x76,0x9a,0xa5,0xc0, +0xd4,0x0f,0xc4,0x4b,0xa9,0x0d,0x85,0x38,0x91,0x09,0xe7,0x12,0x55,0xea,0x63,0x70, +0x07,0x66,0x46,0x32,0x32,0x71,0x9e,0x41,0x96,0x79,0x94,0x62,0xf2,0x09,0xa5,0x58, +0xb8,0xe2,0x1b,0x00,0xb8,0xa4,0xa4,0x12,0x12,0x37,0x1c,0x64,0x93,0x80,0x29,0x47, +0x60,0xd5,0x17,0xe9,0x52,0x2d,0x12,0x9c,0x79,0x6a,0x99,0x32,0x57,0x55,0x22,0x02, +0xe4,0xb2,0x50,0x91,0xce,0xf6,0xd2,0xd2,0x53,0xd6,0x21,0x4d,0x80,0x79,0x27,0xec, +0x9d,0xdc,0x1e,0x09,0x37,0x03,0x3a,0xd7,0xa5,0x67,0x4a,0xd4,0xcb,0x7a,0xe1,0x36, +0xe7,0x08,0xbf,0x6d,0x3d,0x5e,0xc4,0xaf,0xad,0x49,0x53,0x69,0x40,0x4e,0xf4,0x16, +0xc8,0xc7,0x27,0x3c,0x10,0xac,0x93,0x46,0x51,0xbe,0xa8,0xc6,0x9b,0x0a,0x8c,0xc2, +0xb7,0x6e,0x61,0xa3,0xb8,0xe5,0x59,0x40,0xe4,0xfb,0x6b,0x24,0xb2,0xd2,0x4a,0x8a, +0x5a,0x6d,0x25,0x63,0xd6,0xc2,0x40,0xcf,0xbe,0x8a,0x2b,0x3b,0x95,0x6c,0x21,0x7c, +0x11,0xd9,0x0c,0x96,0x43,0x2d,0x86,0x8f,0xd8,0x09,0x1b,0x7e,0x15,0x8c,0x98,0x71, +0xa5,0x29,0xa5,0x49,0x8e,0xcb,0xca,0x68,0xee,0x6c,0xb8,0x80,0xa2,0x83,0xe2,0x33, +0xd8,0x68,0xa2,0x8b,0x94,0x58,0x2c,0x5d,0x81,0x0d,0xe4,0xb2,0x97,0xa2,0xc7,0x71, +0x2c,0x9d,0xcd,0x05,0x36,0x0e,0xc3,0xe2,0x9e,0x38,0xf2,0xaf,0x02,0xf5,0xa3,0x20, +0x5d,0x26,0xa9,0xf3,0x26,0x5c,0x50,0xe2,0x03,0x6e,0x34,0xc1,0x6f,0x6a,0x80,0x1b, +0x78,0xdc,0x82,0x5b,0x3b,0x78,0xcb,0x65,0x27,0x00,0x73,0xc0,0xa2,0x8a,0xbc,0x67, +0x55,0x0e,0xd9,0x48,0x18,0x87,0x19,0x88,0xe9,0x61,0xa6,0x1a,0x43,0x20,0x24,0x04, +0x04,0x8c,0x7a,0xa0,0x01,0xf0,0x00,0x0f,0x21,0x59,0xbb,0x1d,0x97,0x52,0xe2,0x5d, +0x65,0xb5,0xa5,0xd4,0xed,0x58,0x52,0x41,0x0a,0x1e,0x07,0xc4,0x72,0x68,0xa2,0xb3, +0x56,0x5f,0x19,0x8b,0x1d,0x96,0xda,0x6d,0x96,0x1a,0x6d,0xb6,0xbf,0xdb,0x4a,0x10, +0x00,0x47,0x77,0x03,0xbb,0xb4,0xd6,0x5d,0x4b,0x5b,0x82,0xba,0xa4,0x6e,0x0a,0xdf, +0x9d,0xa3,0x3b,0xb1,0x8c,0xfb,0xf1,0xc6,0x68,0xa2,0x84,0x2c,0x11,0x0e,0x32,0x25, +0x2e,0x4a,0x23,0xb2,0x99,0x2b,0x1b,0x56,0xe8,0x40,0x0b,0x50,0xf0,0x27,0xb4,0xd6, +0x22,0x04,0x31,0x25,0x72,0x04,0x48,0xe2,0x42,0xf0,0x54,0xef,0x56,0x37,0x2b,0x1d, +0x99,0x3d,0xa7,0x18,0xa2,0x8a,0x2e,0x85,0xff,0xd9,}; + +const unsigned int dummy_align__STM32H7xx_files_ST_gif = 1; +const unsigned char data__STM32H7xx_files_ST_gif[] = { +/* /STM32H7xx_files/ST.gif (24 chars) */ +0x2f,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x5f,0x66,0x69,0x6c,0x65,0x73, +0x2f,0x53,0x54,0x2e,0x67,0x69,0x66,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) +" (63 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, +0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, +0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, +0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, +/* "Content-type: image/gif + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x69,0x6d, +0x61,0x67,0x65,0x2f,0x67,0x69,0x66,0x0d,0x0a,0x0d,0x0a, +/* raw file data (4852 bytes) */ +0x47,0x49,0x46,0x38,0x39,0x61,0xfe,0x02,0x3a,0x00,0xf7,0x00,0x00,0x14,0x46,0x54, +0x6b,0xa2,0xb3,0x0c,0x72,0x94,0x54,0x73,0x8c,0xac,0xd3,0xdc,0x15,0x56,0x7c,0x33, +0x81,0xb4,0x9c,0xba,0xc4,0xc6,0xea,0xec,0x58,0x8d,0xac,0x3c,0x61,0x7f,0x17,0x63, +0x7c,0x47,0x82,0x98,0x61,0x8b,0x9c,0xa8,0xd8,0xec,0x59,0xa3,0xc4,0x99,0xbd,0xd4, +0x0a,0x69,0x94,0x24,0x56,0x64,0x3c,0x72,0x8c,0xd4,0xf6,0xf4,0x84,0x98,0xac,0x3c, +0x90,0xb4,0x38,0x79,0xa4,0xd3,0xd6,0xd5,0x57,0x99,0xc7,0x9c,0xa2,0xa4,0x30,0x64, +0x7c,0x88,0x8c,0x98,0x56,0x80,0x9c,0x99,0xc7,0xd9,0x10,0x49,0x64,0x64,0x96,0xac, +0x39,0x7b,0x94,0xe9,0xed,0xef,0xd0,0xdd,0xec,0x51,0x56,0x64,0xba,0xc6,0xcc,0x92, +0xb3,0xc4,0x94,0xae,0xb4,0x27,0x59,0x7c,0x3b,0x8e,0xc5,0xbd,0xc9,0xd4,0x3e,0x6e, +0x96,0x20,0x84,0xac,0xfc,0xf6,0xec,0x8c,0x96,0x9c,0x56,0x7f,0x94,0x39,0x87,0xb4, +0x40,0x6a,0x82,0x2e,0x6a,0x95,0x42,0x85,0xa4,0x2c,0x52,0x64,0xc4,0xde,0xe4,0xba, +0xbd,0xbe,0x14,0x6a,0x84,0xcf,0xdf,0xe4,0x24,0x62,0x6c,0x57,0x99,0xbc,0x35,0x73, +0x9c,0x34,0x6a,0x7c,0x12,0x50,0x6c,0xb1,0xd5,0xe4,0x15,0x5c,0x7c,0xc9,0xf2,0xfc, +0x0c,0x6c,0xa4,0xd8,0xe4,0xec,0x44,0x8a,0xa4,0x64,0xae,0xcc,0x97,0xa5,0xb4,0x3f, +0x8a,0xc4,0x66,0x6d,0x7d,0x08,0x73,0xa4,0xd7,0xf2,0xf4,0x0b,0x65,0x8c,0xc0,0xe2, +0xec,0x0b,0x6e,0x99,0x46,0x7d,0xa5,0x89,0x91,0xa4,0xa8,0xcd,0xe4,0xf6,0xf9,0xfc, +0x6f,0x94,0x9f,0x4c,0x97,0xbc,0x45,0x88,0xb8,0x16,0x5d,0x8c,0x7f,0xa3,0xb4,0x71, +0x92,0xac,0x7c,0xaa,0xc4,0x30,0x66,0x8c,0x81,0x86,0x9f,0x71,0x99,0xb1,0x3a,0x7b, +0x9c,0xea,0xf2,0xfc,0x49,0x96,0xc4,0x14,0x51,0x74,0x6e,0x74,0x84,0xac,0xc2,0xcc, +0xd8,0xed,0xf1,0x16,0x58,0x74,0x47,0x74,0x90,0x46,0x90,0xb9,0xd3,0xd9,0xe4,0xaa, +0xce,0xdc,0xac,0xb1,0xc4,0xb0,0xb1,0xb4,0xc4,0xce,0xe4,0x74,0x7e,0x84,0x40,0x6d, +0x8c,0x37,0x3f,0x51,0xa7,0xbb,0xc6,0x5d,0x92,0xac,0x39,0x7e,0xa4,0x8c,0x92,0x94, +0xb9,0xce,0xd9,0xe5,0xe6,0xed,0x64,0xaa,0xc7,0xe3,0xfe,0xfc,0x94,0x99,0xac,0x30, +0x64,0x84,0x5c,0x86,0x9c,0xaa,0xc9,0xd7,0x47,0x90,0xc6,0x9b,0x9a,0x9d,0xbc,0xd6, +0xe4,0x15,0x5d,0x84,0xa5,0xa8,0xb7,0x0e,0x73,0x9c,0x6d,0x8d,0xa0,0xb6,0xc2,0xd4, +0x48,0x4f,0x5c,0x44,0x62,0x6c,0x3c,0x66,0x8c,0x3c,0x5e,0x74,0x24,0x4e,0x5c,0x1c, +0x7b,0xa7,0x60,0xa3,0xbc,0xc1,0xd4,0xdb,0x5c,0x66,0x7c,0xc2,0xdb,0xec,0xa8,0xa8, +0xa8,0x24,0x5a,0x8c,0xb6,0xbc,0xcc,0x84,0xae,0xc4,0x7b,0xa7,0xbc,0x7a,0x84,0x94, +0x58,0x78,0x94,0x34,0x5a,0x6c,0x8c,0xb2,0xd4,0x30,0x5f,0x72,0x32,0x6b,0x8c,0xc4, +0xe6,0xfc,0x5c,0x64,0x74,0x4c,0x5e,0x6c,0xcc,0xce,0xcc,0x34,0x8a,0xac,0x54,0x86, +0x94,0xe4,0xe6,0xe4,0x48,0x76,0x9c,0x54,0x9e,0xbc,0x1c,0x7a,0x9c,0xb4,0xde,0xec, +0x9c,0xc2,0xd4,0x88,0x9e,0xac,0xd4,0xda,0xdc,0x5c,0x9e,0xc4,0x64,0x9e,0xb4,0xec, +0xf2,0xf4,0x29,0x5e,0x7c,0xfc,0xfe,0xf4,0x9c,0xaa,0xb4,0x75,0x7a,0x89,0xb4,0xb6, +0xb4,0x48,0x52,0x64,0x20,0x74,0x90,0x3d,0x82,0xb5,0x66,0xa3,0xc6,0x16,0x69,0x95, +0xe2,0xf7,0xfb,0x4a,0x7b,0x91,0xc5,0xc7,0xc7,0x34,0x83,0xab,0x6c,0x82,0x8c,0x4e, +0x6c,0x7e,0xdd,0xe0,0xe1,0x20,0x4f,0x67,0x58,0x7a,0x8a,0x3d,0x66,0x7f,0x33,0x6e, +0x98,0xbc,0xc2,0xc4,0x80,0xaa,0xb0,0x6d,0x9e,0xb3,0x3c,0x46,0x54,0x97,0x9e,0xa4, +0xc4,0xda,0xdc,0xb2,0xda,0xe4,0x18,0x6e,0x99,0xfc,0xfe,0xfc,0xa9,0xb6,0xc4,0xc9, +0xce,0xd5,0x6c,0xaa,0xbc,0xbd,0xc2,0xcc,0x84,0xb6,0xcc,0xe0,0xde,0xec,0x6c,0x9a, +0xbc,0x1c,0x76,0xa4,0x16,0x66,0x8c,0x46,0x7d,0x9c,0x29,0x58,0x74,0x23,0x74,0x9c, +0x5c,0x8e,0xb4,0x16,0x63,0x84,0x5f,0x8c,0xa4,0x1a,0x58,0x6c,0x39,0x73,0x94,0x0f, +0x4a,0x6c,0x5e,0x98,0xb4,0x54,0x5a,0x6c,0x92,0xb5,0xcc,0xbc,0xc6,0xdc,0xf7,0xf7, +0xf4,0x8a,0x97,0xa4,0x38,0x89,0xbc,0x3f,0x84,0xac,0x10,0x6b,0x8c,0x1f,0x5f,0x74, +0xd8,0xe5,0xf4,0x42,0x8b,0xac,0xc0,0xe5,0xf4,0xa9,0xb0,0xbc,0x79,0x80,0x8c,0x97, +0x9e,0xac,0xc0,0xda,0xe4,0xd9,0xf2,0xfc,0x67,0x9e,0xbc,0x97,0xa2,0xac,0x98,0xae, +0xbc,0x28,0x6a,0x84,0x5a,0x92,0xb4,0x37,0x7e,0xac,0x8d,0x92,0x9c,0x5c,0x86,0xa4, +0x94,0xc2,0xdc,0x7c,0x9e,0xb4,0x5c,0x9e,0xcc,0x29,0x5e,0x84,0x94,0xaa,0xbc,0x0f, +0x45,0x5c,0x1c,0x54,0x84,0x99,0xbc,0xcc,0xca,0xec,0xf4,0xa4,0xda,0xf4,0x5c,0xa6, +0xcc,0x0c,0x6a,0x9c,0xd2,0xf7,0xfc,0x3a,0x8f,0xbc,0x36,0x7a,0xac,0x21,0xf9,0x04, +0x00,0x00,0x00,0x00,0x00,0x2c,0x00,0x00,0x00,0x00,0xfe,0x02,0x3a,0x00,0x07,0x08, +0xff,0x00,0x89,0x09,0x1c,0x48,0xb0,0xa0,0xc1,0x83,0x08,0x13,0x2a,0x5c,0xc8,0xb0, +0xa1,0xc3,0x87,0x10,0x23,0x4a,0x9c,0x48,0xb1,0xa2,0xc5,0x8b,0x18,0x33,0x6a,0xdc, +0xc8,0xb1,0xa3,0xc7,0x8f,0x20,0x43,0x8a,0x4c,0x08,0x85,0xd8,0xb6,0x6d,0xa8,0x0a, +0xd2,0xa1,0x33,0xb1,0xa4,0xc0,0x92,0x2e,0x89,0xa5,0x24,0xc6,0x72,0x60,0x4d,0x81, +0x33,0x6d,0xc2,0x44,0x39,0xb2,0xa7,0xcf,0x9f,0x40,0x83,0x0a,0x1d,0x4a,0xb4,0xa8, +0xd1,0xa3,0x48,0x93,0x2a,0x5d,0x5a,0x11,0x0a,0x94,0x6d,0x30,0x11,0xe0,0xa8,0xb1, +0xe7,0x9c,0x8f,0x3d,0x58,0xb1,0x9e,0xcb,0x7a,0xee,0x9c,0xa2,0xaa,0x8a,0xbc,0x76, +0x55,0x34,0xe2,0xdc,0x88,0xb0,0x23,0xa6,0xd6,0x58,0xbb,0x76,0x89,0x5b,0x45,0x4b, +0x40,0x81,0x62,0x7b,0x0e,0x94,0xd8,0x3d,0x23,0xca,0x6c,0x63,0xca,0xb7,0xaf,0xdf, +0xbf,0x80,0x03,0x0b,0x1e,0x4c,0xb8,0xb0,0xe1,0x8c,0x25,0x63,0x95,0xc1,0xa7,0xa5, +0xc3,0x0b,0x67,0xf0,0xe0,0xcd,0x80,0x37,0x24,0x81,0xb8,0x04,0x09,0xc8,0xb8,0x69, +0xc7,0xf9,0x1a,0x08,0xcf,0xd7,0xae,0x95,0x0a,0xe0,0x8b,0x74,0x00,0x79,0x01,0xd2, +0x1d,0xf2,0x95,0x4e,0x4b,0x29,0x4f,0x5a,0x42,0x5f,0xd3,0xd1,0x2e,0x34,0x67,0x37, +0x6e,0xa2,0xe9,0x86,0x67,0xa5,0x8a,0x90,0xc3,0xc0,0x83,0x0b,0x1f,0x4e,0xbc,0xb8, +0xf1,0xe3,0xc8,0x33,0xee,0x2d,0x29,0x22,0xdb,0x9d,0x48,0xd5,0xb6,0x6c,0xb9,0xf0, +0xc6,0x9d,0x01,0x18,0xae,0x60,0x4c,0x21,0xb3,0x9d,0x4c,0x1e,0x29,0x5d,0x74,0xe8, +0xff,0xf0,0xe4,0xe9,0x90,0xf9,0x57,0x73,0xd2,0xab,0x7f,0x35,0x8f,0x7d,0x86,0x79, +0x19,0xba,0xe4,0xc9,0x40,0xa6,0x7e,0x9e,0x6e,0x64,0x60,0xe8,0xa7,0x45,0xeb,0xcd, +0x16,0x67,0x8e,0xa0,0x73,0x53,0x72,0x04,0x16,0x68,0xe0,0x81,0x08,0x26,0xa8,0xe0, +0x82,0x03,0xcd,0x84,0x40,0x3d,0xd0,0xed,0xb2,0xc3,0x05,0x14,0xba,0x43,0x8b,0x01, +0xd7,0x75,0xe3,0x8f,0x86,0x79,0x78,0xd7,0xc5,0x87,0x3a,0x48,0xa1,0xc3,0x03,0x0f, +0xbc,0xb2,0x8f,0x7a,0xea,0xb5,0x37,0xcf,0x8a,0x19,0xb4,0x28,0x5f,0x1e,0x30,0xe6, +0x91,0x42,0x0a,0xdd,0x74,0xb3,0xdf,0x1b,0x6f,0x4c,0x83,0xc7,0x80,0x0c,0xf6,0xe8, +0xe3,0x8f,0x40,0x06,0x29,0xe4,0x90,0x0c,0xb5,0x40,0x0c,0x14,0xf5,0x6c,0x50,0xcd, +0x05,0x13,0xfe,0x53,0x9d,0x3b,0x33,0x78,0x33,0x83,0x26,0xe2,0x78,0x23,0x8e,0x05, +0x58,0x4a,0xa1,0xa5,0x78,0xcb,0x64,0xb0,0x0c,0x29,0xaf,0xa4,0xf3,0xca,0x98,0x57, +0x8c,0x39,0xe6,0x03,0xa4,0xe8,0x90,0xa6,0x88,0x5a,0xd6,0x37,0xc5,0x9b,0xae,0x48, +0x39,0xc3,0x0c,0x0c,0x8c,0x61,0x05,0x02,0x31,0x11,0xa9,0xe7,0x9e,0x7c,0xf6,0xe9, +0xe7,0x9f,0x49,0x9d,0x43,0x48,0x27,0x3b,0xec,0xc2,0xe4,0x05,0x5b,0xec,0xd0,0xc9, +0x04,0x13,0xc8,0x32,0x86,0x2c,0x21,0xc8,0x22,0xa9,0x2c,0x2f,0x30,0xc0,0xc0,0x0b, +0x4d,0x74,0x70,0x47,0x07,0x91,0xdd,0x71,0x07,0x3c,0xd3,0x80,0xea,0x69,0x03,0x77, +0x6c,0x72,0xc7,0x0b,0xa7,0x3a,0xe6,0xcc,0x0b,0x98,0x76,0xb0,0xea,0xa4,0x8f,0xe6, +0xff,0xb2,0x0e,0xa0,0xb4,0xd6,0x6a,0xeb,0xad,0xb8,0xe6,0x4a,0xd0,0x1f,0x1b,0x48, +0xc8,0x64,0x35,0x63,0x4c,0xa0,0xa9,0x28,0xa9,0x14,0xd3,0x46,0x31,0xc6,0x22,0xab, +0x6c,0x31,0x07,0x20,0x9b,0x0d,0xb3,0xc5,0x3c,0xbb,0x6c,0xb2,0xc8,0x1e,0x6b,0x2d, +0xb4,0xc7,0xe2,0xd3,0x48,0x1b,0xdc,0xb6,0x71,0x40,0x1b,0x25,0x08,0xe1,0xd4,0x5e, +0xba,0x96,0x6b,0xee,0xb9,0xe8,0xa6,0x3b,0x18,0x1d,0x42,0x28,0xb0,0xc2,0x2e,0x12, +0x8e,0x11,0x43,0x2e,0x15,0xc4,0x11,0x0b,0x8f,0x09,0xe1,0xab,0x51,0x4d,0x4e,0xe5, +0xa9,0xee,0xbf,0x00,0x07,0x2c,0xf0,0xc0,0x15,0xd5,0x63,0x87,0x0c,0x12,0xee,0xb2, +0x46,0x2e,0x6d,0x88,0x10,0x8b,0x52,0x4e,0xbd,0x44,0xf0,0xc4,0x14,0x57,0x6c,0xb1, +0xba,0x61,0x44,0xf2,0x6e,0xa1,0x6b,0x0c,0xa0,0x82,0x29,0x47,0x1e,0xe4,0x2f,0x43, +0x39,0x89,0xec,0x90,0xbe,0x17,0xa7,0xac,0xf2,0xca,0x2c,0x2b,0x88,0xcf,0x00,0x6b, +0xc8,0x50,0xe8,0x0a,0xf2,0x1c,0x49,0xae,0x4b,0x11,0x7f,0x34,0x72,0xbf,0x39,0xb7, +0xec,0xf3,0xcf,0x40,0x07,0x5d,0x98,0x08,0x15,0xc4,0x8c,0xf0,0x2e,0x1d,0x84,0x33, +0x10,0xc8,0x47,0xf5,0x8c,0xca,0xd3,0x42,0x47,0x2d,0xf5,0xd4,0x54,0x7b,0xe4,0x12, +0x22,0x91,0x28,0xb0,0x0b,0xc2,0x2b,0xd4,0xf3,0xf0,0xc8,0x35,0x85,0xad,0xd2,0x42, +0x03,0xfa,0x1b,0x36,0x4b,0x2c,0xf5,0x8c,0x53,0xd5,0x6c,0xb7,0xed,0xf6,0xdb,0x6b, +0x0f,0x14,0x8b,0x09,0x63,0x60,0x21,0xf3,0x0a,0x2b,0xe0,0x61,0xb6,0x22,0x88,0x04, +0xff,0x73,0x0e,0x01,0x7f,0x0b,0x93,0xd5,0x1e,0x7e,0xfb,0xdd,0xd5,0x39,0x65,0x20, +0x82,0x48,0x19,0xe7,0xb0,0x95,0x0f,0x4e,0x2d,0xcc,0x84,0x43,0x1c,0x04,0x10,0x10, +0xc7,0x1e,0xc2,0x08,0x43,0x95,0x1c,0x31,0xa1,0x0c,0xf7,0xe7,0xa0,0x87,0x4e,0xb1, +0x4b,0x08,0x58,0x11,0x83,0xdd,0xc3,0xac,0x30,0x46,0x0d,0x71,0x13,0xa3,0x08,0x37, +0x0d,0x74,0x30,0x4d,0x07,0x20,0xe0,0x86,0x9b,0x15,0x6e,0x7c,0x26,0x9a,0x27,0xe9, +0xf4,0xee,0x8b,0x2f,0x8f,0x3c,0x12,0x40,0x29,0x55,0x04,0x13,0xb2,0x91,0x74,0x20, +0x50,0xc4,0x34,0x09,0x58,0x91,0x40,0x34,0x9e,0x81,0x50,0x41,0x23,0x5c,0xb4,0xcd, +0xc9,0x2a,0x7a,0xc0,0xb1,0x88,0x0d,0xd7,0xaf,0xe2,0xfd,0xf7,0x22,0xac,0x82,0x06, +0x27,0x02,0xcd,0xe2,0x3d,0x31,0x9c,0xe8,0xb1,0xca,0x46,0x18,0xe8,0x81,0x81,0x43, +0xdb,0x60,0xf0,0x7e,0x45,0xe9,0xaf,0x2f,0xfa,0xfd,0xf8,0x63,0x04,0x05,0x1d,0x50, +0xa8,0x30,0x80,0x1d,0x95,0x90,0x01,0xc2,0x22,0xb1,0x04,0x96,0xe4,0x04,0x02,0xba, +0x18,0x00,0xa3,0xde,0x40,0x9d,0x37,0xd0,0xa2,0x09,0x50,0xb2,0x12,0x96,0xfc,0xe1, +0x0f,0x29,0xf8,0xa3,0x0b,0x64,0x90,0x42,0x06,0xaf,0x11,0x05,0x04,0x98,0x04,0x15, +0x30,0xc1,0xc7,0x1d,0x2c,0xe3,0x0d,0x32,0x58,0x49,0x1c,0xb2,0x68,0x80,0x36,0x46, +0x26,0xb4,0xf4,0xe9,0x61,0x11,0xab,0x58,0x04,0x1c,0xda,0xa7,0x87,0x1a,0xc2,0xa1, +0x86,0x2e,0x5c,0xdf,0x36,0x6a,0xa8,0x07,0x62,0x84,0x2f,0x13,0xec,0x73,0x9f,0x43, +0xff,0xd2,0x87,0x06,0x8b,0xfc,0x50,0x21,0x25,0xcb,0x9f,0x12,0x97,0x28,0xb7,0x22, +0xc4,0x00,0x80,0x95,0xc0,0x42,0x25,0x18,0xb0,0x84,0x06,0x09,0x64,0x09,0x03,0x88, +0x41,0x74,0x2e,0xe0,0x0e,0x43,0x18,0xe0,0x42,0xb4,0xc8,0x0e,0x0c,0xba,0x61,0x84, +0x19,0xcd,0x28,0x0f,0x5d,0x48,0xc1,0x87,0xa6,0xa0,0x0e,0x97,0x2c,0x27,0x1f,0x5a, +0x88,0xd2,0x18,0xf7,0x43,0x27,0x2d,0x28,0xad,0x20,0x2c,0x5c,0x59,0xfb,0x16,0xc1, +0x13,0x0c,0xb8,0x04,0x0d,0x42,0x44,0x9f,0x0d,0x5b,0xc0,0x0b,0x1b,0x12,0xa3,0x05, +0x68,0x00,0x22,0x31,0x30,0x00,0x48,0x3d,0xd8,0x00,0x91,0xb3,0xc0,0xc0,0x2a,0x44, +0xd0,0x02,0xec,0xe9,0x01,0x0d,0x46,0x42,0x05,0x06,0x16,0xa1,0x07,0x0d,0xbc,0xaf, +0x7d,0xef,0xdb,0x46,0x26,0x34,0xf0,0xc2,0x5b,0x08,0x24,0x13,0x9c,0xf4,0x24,0x20, +0x61,0x28,0xbf,0x55,0x60,0xc0,0x7c,0x87,0xb4,0x24,0x26,0x89,0x91,0x89,0x55,0xcc, +0x82,0x94,0x68,0xd8,0xc6,0x11,0x17,0xd9,0x48,0x1b,0x2c,0x92,0x94,0xea,0x63,0xa2, +0x30,0xf3,0x07,0x85,0x25,0xbc,0x40,0x17,0x1b,0xb0,0x83,0x14,0xd7,0xd0,0x01,0x1f, +0xd4,0x64,0x26,0x74,0x88,0x43,0x24,0x62,0xb0,0x82,0x0b,0xfc,0xc3,0x3a,0x18,0xca, +0x8e,0x2b,0x6a,0x44,0xc6,0x32,0xc6,0x08,0x46,0x53,0xd8,0x01,0x22,0x6c,0x06,0x13, +0x3c,0xc8,0x82,0x0c,0x1a,0xa2,0x91,0x8d,0xe6,0x84,0x8f,0x9d,0x09,0x6d,0x14,0x37, +0xbc,0xe4,0x2c,0x44,0x30,0x10,0xec,0xcd,0xcf,0x85,0xea,0xe3,0x64,0x0d,0x05,0xb9, +0xff,0xbe,0x5b,0x74,0x32,0x13,0xb3,0x80,0x03,0x3e,0xf5,0xc0,0x09,0x4e,0xda,0xc0, +0x06,0x2f,0x24,0x86,0x3f,0x17,0xb1,0x49,0x82,0x82,0x92,0x96,0x97,0xcc,0xc4,0x0b, +0x45,0xf9,0x42,0x49,0x8a,0xaf,0x93,0xab,0x18,0x45,0xfb,0xe2,0x49,0x0c,0x83,0x22, +0x74,0x11,0xc4,0xc0,0x9e,0x06,0x2c,0x89,0x01,0x22,0x2a,0xf4,0x9f,0xb3,0x70,0xdf, +0x25,0x5f,0x09,0xd2,0x61,0xba,0x14,0x74,0x74,0x78,0xd9,0x29,0x14,0x00,0x40,0x19, +0x60,0x61,0x0c,0xed,0x94,0xd8,0x4b,0xe2,0xd0,0x80,0x01,0x2c,0x89,0x8b,0x4f,0x72, +0x87,0x37,0x0c,0x90,0x9d,0x37,0x19,0xc1,0x08,0x53,0x40,0xea,0x14,0x32,0xe5,0xc6, +0xc4,0x3c,0xc2,0x19,0x63,0xe4,0x66,0x37,0x68,0x31,0x19,0x02,0xe0,0x2b,0x8f,0x2b, +0x93,0xa8,0x0d,0x09,0x2a,0x10,0xec,0x8d,0x42,0x20,0xf5,0xd3,0x67,0x4a,0x7b,0x58, +0x3f,0x62,0x20,0xf4,0xab,0xc4,0x30,0x85,0x49,0x05,0xd9,0x52,0x4e,0x72,0x02,0xa1, +0x36,0x90,0xa4,0xfb,0x1e,0x4a,0xca,0x4c,0xa0,0x92,0xa0,0xa4,0x74,0x89,0x5a,0x83, +0xb9,0x48,0x3d,0x28,0x32,0x7d,0x6d,0x25,0x28,0xf6,0xc8,0x27,0xd1,0x92,0x06,0xf3, +0xac,0x02,0x11,0x41,0xfb,0x34,0x10,0x57,0x72,0xbd,0xf4,0xb1,0x6d,0x0b,0x83,0x15, +0x14,0x90,0x4c,0x05,0x60,0x61,0x10,0x83,0x58,0x43,0x05,0xc2,0xc1,0x23,0xa7,0x20, +0x22,0x0a,0x31,0xe8,0xc4,0x74,0x80,0xfa,0x86,0x28,0x79,0xc3,0x1b,0xfa,0xd1,0x8f, +0x3f,0xb6,0x33,0x83,0x2d,0x64,0xc3,0x24,0x21,0x2b,0xa6,0x64,0xc4,0x11,0xd5,0x6e, +0xff,0x18,0xc0,0x1d,0xce,0x00,0x01,0x3a,0xdc,0xf6,0x94,0x6d,0x70,0x42,0xab,0xf3, +0xb3,0xa7,0x40,0xe4,0xa0,0xbe,0xc5,0xde,0xe2,0x86,0x82,0x2c,0xe2,0x2a,0x04,0x3a, +0x90,0xb2,0x12,0x83,0xb8,0x45,0x0c,0x29,0x41,0x01,0x89,0x86,0xef,0xc9,0x4f,0x88, +0x35,0xf4,0x5e,0x75,0x45,0xb0,0xcf,0xe6,0xf2,0xf5,0xa1,0xcf,0xbd,0x64,0x57,0xa7, +0xcb,0x55,0x50,0x9a,0x74,0xb9,0xe4,0x7b,0x89,0x25,0x3b,0xe9,0x58,0xc8,0xba,0x57, +0x68,0x74,0xf0,0xc1,0x00,0x4e,0x61,0x07,0x9a,0x5a,0x76,0x10,0x0a,0x88,0xc4,0x6b, +0x09,0x82,0x33,0x50,0x58,0x61,0x0d,0x63,0xd8,0xc1,0x16,0x70,0xe4,0x40,0x6f,0xbc, +0x61,0x08,0xb4,0xa0,0x2d,0x0c,0xfc,0x91,0xe0,0x19,0xdc,0xc1,0x83,0x3d,0x0b,0x85, +0x33,0x66,0x00,0x03,0x71,0x84,0x51,0x3f,0xee,0x18,0x43,0x31,0x0e,0x02,0xb5,0xa0, +0x6d,0xb2,0xa4,0xb7,0x20,0x65,0x70,0xe1,0x80,0x56,0x22,0x42,0x01,0x03,0xb7,0x70, +0x21,0x3f,0x89,0x91,0x52,0x1b,0x9c,0x84,0x7b,0x7c,0xdd,0xa1,0x1e,0x5a,0xc0,0x5d, +0x3d,0x6c,0xa3,0xc5,0x27,0x91,0xdf,0x43,0x39,0x19,0xca,0x4c,0x88,0x80,0xc7,0xe8, +0xcb,0x04,0x11,0x73,0x1c,0x48,0x19,0xd3,0xb8,0x86,0xdb,0xc0,0x9e,0x1c,0xfa,0x6a, +0xd8,0xf5,0xe1,0x78,0x1b,0x71,0xc5,0x80,0x6f,0x49,0xb9,0xe4,0xf7,0x5a,0xf9,0x67, +0x74,0x88,0x45,0x05,0xec,0x60,0x87,0x53,0xd0,0x83,0xa6,0x83,0xd0,0x05,0x7e,0xff, +0x00,0x08,0x9a,0x18,0x04,0x0a,0xe1,0x58,0xc6,0x18,0x44,0xcb,0x40,0x6f,0xf0,0x87, +0xff,0x16,0xa7,0xa5,0xc5,0x18,0xfd,0x01,0x03,0x6f,0x00,0x28,0x16,0x39,0x83,0x42, +0x2c,0x40,0xc0,0x00,0x6f,0x68,0xe2,0xcf,0x61,0x74,0x45,0x27,0x74,0x71,0xc7,0xb6, +0xc1,0x93,0x87,0xea,0x73,0x89,0x70,0x57,0x0c,0xd6,0x7d,0x96,0x15,0x0a,0xfa,0xbc, +0xa1,0x73,0x21,0x1a,0x4f,0x20,0x42,0x7a,0xab,0xd7,0x7d,0x5f,0x88,0x11,0xcd,0x89, +0x4d,0x67,0x6f,0x15,0x50,0xc8,0xde,0x5c,0x03,0x49,0xe9,0x1a,0x02,0x71,0xb0,0x4c, +0x7e,0x74,0xa4,0x55,0x1a,0xcf,0xe8,0x5e,0xf9,0xd5,0x2c,0xc3,0x83,0x2d,0xc4,0x40, +0x0f,0x7a,0xd8,0xc1,0xd6,0x58,0xc8,0xf5,0x0a,0x14,0x00,0x8f,0x76,0x8a,0x6d,0x25, +0x74,0x08,0xc3,0x15,0x9a,0xb0,0x82,0x09,0x79,0x91,0x16,0x42,0x15,0xea,0x18,0x0d, +0x30,0x05,0x6f,0xc0,0x63,0x0f,0xfc,0xa5,0xc3,0x38,0xe6,0xa4,0x09,0x18,0xf0,0x07, +0x47,0xc3,0xa0,0x87,0x13,0x4a,0xd2,0xe1,0xaa,0x99,0x02,0x03,0x1a,0xad,0xb2,0x40, +0xd4,0x8a,0x33,0x4e,0x30,0xed,0x48,0x9c,0x58,0x32,0x14,0xcc,0xfd,0x12,0x70,0x63, +0xc0,0x14,0xeb,0x3e,0x37,0xfa,0xc2,0x3d,0x90,0x13,0x6b,0xf4,0x16,0x4e,0xe1,0x04, +0xce,0xdc,0x5d,0x65,0x7b,0xfb,0xd1,0x24,0x1a,0x35,0x05,0xb9,0x09,0xc2,0x09,0x7a, +0xa7,0x55,0xdf,0xe8,0xce,0x37,0xd3,0xfc,0x6d,0x8a,0x6d,0xdc,0x42,0xa3,0x68,0x85, +0xb5,0xc4,0x2d,0x46,0x07,0x53,0x44,0x01,0x17,0x3d,0xf0,0x42,0x01,0x9e,0xf1,0x03, +0x5c,0x57,0xe2,0xe3,0x6b,0x60,0x80,0x09,0x04,0x64,0x10,0x3a,0xe4,0x23,0x1b,0xad, +0xff,0xed,0xcf,0x3f,0x56,0x7e,0x01,0x08,0x62,0xd3,0x15,0x4d,0x78,0x44,0x18,0x54, +0x82,0x0f,0x0a,0xb3,0x80,0x05,0x86,0xf0,0xc3,0x30,0xfc,0xd0,0x0c,0x14,0x28,0x42, +0x26,0x49,0x9c,0xb8,0xd0,0x87,0x4e,0xf4,0x8e,0x20,0xc2,0x16,0x1f,0xb0,0x86,0xc6, +0xbd,0x20,0x06,0x31,0xfc,0x80,0x0f,0xcd,0xa0,0xc2,0x30,0x2a,0xb1,0x86,0x17,0x38, +0x22,0x09,0x08,0xc9,0x47,0x28,0xa6,0xb1,0xc5,0x7f,0x34,0xd0,0x81,0xae,0xb8,0x6d, +0x02,0xe2,0x90,0x27,0x3a,0xa0,0x23,0x01,0x3b,0xf8,0x04,0x12,0x0c,0x81,0x84,0x20, +0x30,0x21,0x02,0x11,0x98,0x81,0x01,0x3b,0x8c,0xd5,0xa2,0xdb,0xfd,0xee,0x78,0x27, +0x48,0x2c,0x7a,0x51,0x08,0x5c,0x7c,0xc0,0x0b,0x5e,0xc8,0x78,0xd3,0x0b,0xf0,0x74, +0x69,0x40,0x9d,0x1d,0x31,0x08,0x40,0xf5,0x9c,0x82,0x0a,0xa8,0x08,0x24,0x09,0x10, +0x60,0x40,0x08,0x28,0x84,0xa8,0x01,0xbf,0xc1,0x10,0x30,0x98,0xc1,0x1c,0x1e,0xd7, +0x39,0x3c,0x6c,0x61,0x18,0x41,0x40,0x82,0xe8,0x91,0xc0,0x04,0x26,0x7c,0xc3,0x0c, +0x0f,0x93,0x49,0xbd,0xeb,0x9e,0xf7,0xd6,0xbb,0xfe,0xbd,0x11,0xab,0x41,0x2e,0x00, +0xf0,0x01,0x5c,0x58,0xa3,0x07,0x62,0x60,0xba,0x18,0x0a,0x40,0x78,0x3e,0x14,0x80, +0x0f,0x3f,0x58,0xc0,0x29,0xa2,0x40,0x01,0x82,0xcc,0x04,0x0a,0x5c,0x58,0x46,0x35, +0xa0,0xc1,0x0c,0x68,0x38,0xff,0x13,0x86,0xf8,0x44,0x2b,0xde,0x10,0x0a,0x03,0x0a, +0x84,0x0e,0xfd,0x28,0x45,0x2b,0x82,0xe0,0xf6,0xd2,0x0b,0xc0,0xf4,0xd3,0x40,0x80, +0xff,0xe7,0x5e,0x4f,0xfe,0xf2,0x43,0xf6,0x66,0x31,0x95,0x80,0x3d,0x3e,0xf0,0x01, +0x7b,0xf4,0xe0,0xfd,0x82,0x6f,0xfa,0x0f,0xe6,0xff,0xf4,0x1f,0xe4,0x60,0x08,0xf9, +0x60,0xc9,0x5e,0x40,0xb8,0xbf,0x78,0xec,0xa0,0x19,0xb0,0x00,0x0b,0x11,0x50,0x7a, +0x4c,0xe0,0x07,0x32,0x20,0x0e,0xa0,0x50,0x6f,0x34,0x41,0x00,0x43,0x10,0x01,0xdc, +0xc7,0x0f,0xdf,0xf0,0x0d,0x02,0x10,0x01,0xad,0x60,0x02,0xf7,0x62,0x7e,0x18,0x98, +0x81,0x8f,0x95,0x12,0xfd,0x12,0x06,0x77,0xe0,0x7e,0xd6,0x10,0x82,0x18,0xd7,0x03, +0xd4,0x40,0x0d,0x4d,0x27,0x06,0xe0,0xe0,0x74,0x0b,0xb0,0x00,0x7c,0x00,0x0e,0xd4, +0x40,0x45,0x69,0x43,0x2e,0x26,0xe7,0x0c,0xd2,0xd0,0x0c,0x70,0x77,0x83,0x11,0x78, +0x0c,0x2b,0x01,0x5b,0xc4,0xd0,0x0f,0x01,0xd0,0x0a,0x11,0xc0,0x0f,0x42,0x28,0x81, +0xdf,0x30,0x0c,0x09,0x50,0x45,0xe3,0xa7,0x81,0x4a,0xb8,0x84,0x6e,0xe3,0x78,0x04, +0x20,0x09,0x7f,0x67,0x0f,0x4a,0x77,0x7b,0x23,0x18,0x78,0x80,0xb7,0x7b,0x3f,0xd0, +0x7b,0x3f,0x00,0x0e,0x0c,0x20,0x0c,0x65,0x17,0x06,0x20,0x00,0x75,0x02,0x08,0x77, +0xb0,0xf0,0x0d,0x37,0x60,0x06,0xfc,0x52,0x12,0x04,0x10,0x02,0x37,0x30,0x0c,0x42, +0x58,0x7a,0x11,0x08,0x0d,0xc9,0xc0,0x05,0x49,0xc8,0x84,0x76,0x78,0x87,0x41,0x03, +0x13,0xa2,0x80,0x0b,0x7e,0x37,0x85,0x53,0x08,0x78,0x1a,0xc7,0x7b,0x05,0x70,0x0f, +0xf7,0xc0,0x07,0x86,0x08,0x7c,0xe0,0xd0,0x00,0xe3,0x42,0x13,0x59,0x16,0x00,0x28, +0xff,0xa0,0x04,0x4a,0x10,0x01,0x90,0x28,0x0d,0xd2,0x20,0x0b,0x40,0x90,0x86,0xb1, +0xf0,0x08,0x37,0xa0,0x04,0x4c,0x00,0x0b,0xfc,0x00,0x77,0x4c,0x20,0x0d,0xde,0x70, +0x0e,0xa9,0xc7,0x7a,0x78,0x78,0x8a,0xa8,0x78,0x31,0x42,0x60,0x0b,0x7e,0xf7,0x77, +0x21,0xa8,0x74,0x80,0x78,0x85,0xbc,0x97,0x85,0x59,0x08,0x7c,0x0b,0x90,0x03,0x12, +0x20,0x02,0x4f,0x91,0x12,0x74,0x40,0x01,0xf2,0x40,0x0d,0x90,0xa8,0x04,0xdf,0xd0, +0x0c,0xd2,0x20,0x06,0x8f,0x90,0x86,0x50,0x50,0x06,0xce,0x10,0x89,0x70,0x07,0x89, +0x92,0xf8,0x0d,0xe9,0x90,0x0f,0xa6,0x98,0x8a,0xd4,0x58,0x8d,0x02,0x53,0x06,0x82, +0x80,0x09,0x94,0x80,0x4c,0x94,0x40,0x59,0x1b,0x90,0x4c,0xc9,0xc4,0x65,0xe2,0x68, +0x07,0xec,0x40,0x8e,0x1b,0xc0,0x03,0xba,0xc0,0x0d,0x0f,0xc3,0x13,0x3d,0xe8,0x0b, +0xcf,0x20,0x0d,0x93,0x28,0x0d,0x0b,0x40,0x0d,0x05,0x24,0x10,0xcb,0x01,0x01,0x3f, +0x70,0x83,0x90,0xf8,0x0d,0x90,0x58,0x09,0xd9,0x90,0x7a,0xf6,0x68,0x8d,0x02,0x39, +0x90,0x01,0x03,0x05,0x22,0x10,0x06,0x08,0x99,0x90,0x61,0x20,0x02,0x07,0xc9,0x90, +0x0d,0xf9,0x90,0x61,0x90,0x0f,0xf9,0x80,0x90,0x31,0x01,0x15,0xc1,0x76,0x07,0x4f, +0xd7,0x0c,0x4a,0xc0,0x07,0xf4,0x90,0x88,0x5f,0x73,0x24,0x06,0xd9,0x01,0x1a,0xc9, +0x0f,0x4a,0x40,0x89,0x90,0xd8,0x0c,0x21,0x30,0x0e,0x04,0xb9,0x92,0x2c,0xe9,0x36, +0x2d,0xb0,0x17,0x5c,0x70,0x0e,0x1b,0x20,0x06,0x87,0x08,0x7c,0x1b,0x80,0x07,0x71, +0xff,0x03,0x05,0x3e,0x60,0x07,0x7c,0x10,0x8c,0x54,0xb0,0x00,0xf2,0x28,0x06,0x51, +0xa0,0x36,0x2d,0x59,0x94,0x46,0x99,0x2b,0xdd,0xd6,0x10,0x6a,0xe3,0x14,0xf2,0xf0, +0x0c,0x4e,0x57,0x7f,0xcf,0x70,0x07,0xbf,0xc1,0x83,0xc4,0x50,0x01,0xa7,0x20,0x0d, +0x70,0x47,0x05,0xf3,0x27,0x06,0x12,0xc0,0x03,0xe3,0x30,0x8d,0x47,0x19,0x96,0x62, +0xf9,0x23,0x49,0xa9,0x94,0x7a,0x07,0x05,0x23,0xa0,0x00,0x84,0x57,0x8b,0x5e,0x60, +0x07,0xeb,0xf0,0x30,0x1d,0x86,0x0e,0xec,0x40,0x93,0x86,0x48,0x05,0xbe,0x47,0x0d, +0x39,0xd0,0x0b,0x00,0x39,0x96,0x7c,0xd9,0x97,0x0a,0x92,0x13,0x60,0xd9,0x10,0x4b, +0x30,0x0d,0xb8,0xb0,0x7b,0x82,0x58,0x00,0x63,0xe0,0x03,0x32,0x21,0x83,0xf8,0x00, +0x0e,0x0b,0x30,0x7f,0x7c,0xc0,0x08,0x05,0x80,0x02,0x94,0xd0,0x0b,0xc5,0x17,0x98, +0x7e,0x99,0x99,0x9a,0xe9,0x17,0x98,0xd9,0x10,0x37,0x01,0x05,0x08,0x10,0x05,0x26, +0x58,0x00,0x86,0xe9,0x05,0xf4,0xa0,0x05,0xd5,0xc3,0x8e,0xb1,0x70,0x07,0x4e,0x07, +0x0e,0x59,0x78,0x0f,0x8c,0x80,0x53,0x14,0x70,0x7c,0x9b,0x59,0x9b,0xb6,0x69,0x18, +0x65,0x79,0x11,0x50,0x60,0x0c,0xb5,0x20,0x09,0x94,0x00,0x0e,0x28,0x80,0x02,0xcf, +0x70,0x0a,0xcf,0x30,0x00,0x3b,0x52,0x13,0x7b,0x71,0x74,0x1b,0x70,0x0a,0xe0,0xb0, +0x01,0x28,0xe0,0x0c,0x93,0x60,0x09,0x3b,0x78,0x9b,0xd4,0x59,0x9d,0x7e,0xc1,0x8e, +0x41,0x57,0x11,0xdb,0x60,0x0c,0xc6,0x10,0x07,0x2a,0x10,0x07,0xe0,0x19,0x9e,0x42, +0xff,0x80,0x2f,0x49,0x80,0x08,0xe1,0x79,0x0e,0xe1,0xe0,0x2f,0x9d,0x69,0x9d,0xec, +0xd9,0x9e,0x1a,0x31,0x13,0xd9,0x09,0x12,0x58,0x95,0x27,0xee,0xe4,0x9e,0xf6,0x79, +0x9f,0x23,0xc1,0x42,0xeb,0x29,0x12,0x30,0x81,0x9f,0xfe,0xf9,0x9f,0x56,0xa3,0x80, +0xfb,0xb9,0x10,0x33,0xb1,0x7f,0x56,0xc4,0x5f,0x07,0xba,0x1c,0x0a,0x81,0x33,0x00, +0xda,0xa0,0x0e,0x1a,0x32,0x78,0xc4,0xa0,0x1c,0xa1,0x9f,0x04,0x71,0x12,0xf0,0x19, +0x11,0xfd,0xf9,0xa0,0x1a,0x8a,0x9f,0xfc,0xa3,0x80,0x2f,0x31,0xa0,0x0f,0x41,0x9f, +0x10,0xba,0x7a,0x20,0xf9,0x5c,0x0b,0xc1,0x1c,0x20,0xba,0xa1,0x2a,0xca,0x92,0x50, +0x80,0x08,0xe7,0x00,0x05,0xa6,0xb0,0x04,0xd5,0x13,0x0b,0x38,0x80,0x03,0xa6,0x28, +0xa2,0x22,0x13,0x13,0xfd,0x72,0x66,0x20,0xb9,0x33,0xb1,0xa0,0x07,0xac,0x27,0x02, +0xc5,0x40,0x4f,0x2b,0x5a,0xa4,0xd4,0x59,0x03,0x78,0xf0,0x30,0xa0,0x70,0x2f,0xc1, +0x80,0x07,0x49,0xb0,0x3f,0xfc,0x83,0x33,0x30,0xe1,0x14,0x72,0xc0,0x39,0x5c,0xb0, +0xa3,0xe4,0x64,0x90,0x72,0x00,0x6f,0xc8,0x67,0x0a,0x5b,0xaa,0xa5,0x38,0x23,0x02, +0x08,0xe7,0x43,0x50,0x20,0x04,0x5c,0x2a,0x04,0x81,0x90,0x9e,0x06,0x79,0x0b,0xf0, +0x36,0x10,0xb7,0x20,0x07,0xca,0xf0,0x05,0xe2,0x66,0xa4,0x74,0xea,0x97,0xc1,0xe6, +0x03,0xe8,0x10,0x06,0x66,0x90,0x04,0x61,0xd0,0x06,0xf8,0x20,0x7e,0x35,0x60,0x9e, +0x88,0x50,0x8a,0x4e,0x21,0x02,0x7d,0x70,0x43,0xdc,0xa0,0x07,0x72,0xc0,0x0b,0x2a, +0xff,0x70,0x24,0x18,0x60,0x03,0x22,0x80,0x06,0x89,0xfa,0x0e,0x8b,0x50,0x06,0x1c, +0xc0,0x0d,0xdc,0xa0,0x0e,0x7d,0x80,0xa9,0x7d,0x10,0x0b,0x5c,0x40,0x0e,0xc0,0xe0, +0x04,0xea,0x70,0x0b,0x22,0x10,0xaa,0xdc,0xe0,0x02,0x88,0x20,0x04,0x75,0xc0,0x06, +0xf5,0x70,0x0b,0xc8,0xe0,0x02,0xc0,0x80,0xaa,0xc4,0xc0,0x05,0x1a,0xf0,0x0e,0xdc, +0xc0,0x01,0x47,0x60,0x4a,0x75,0xba,0xab,0x7c,0x79,0xa7,0xb1,0x10,0x0b,0x10,0x60, +0x09,0x14,0x40,0x00,0x4f,0x40,0x01,0x49,0xe0,0x01,0x4b,0x80,0x00,0xe6,0xf9,0x99, +0x68,0xc0,0x01,0xc8,0x60,0x0c,0x7d,0xc0,0x06,0x69,0x00,0x0c,0x7d,0x60,0x12,0xc5, +0xc0,0x01,0xcd,0xca,0x0b,0xc6,0x00,0x0c,0xd8,0x80,0x0c,0xac,0x50,0x04,0x2a,0xc0, +0x01,0x97,0xd0,0x06,0x80,0x00,0x09,0x2a,0x70,0x06,0x4e,0x50,0x02,0xc6,0xa0,0x0e, +0xdc,0x30,0x02,0x81,0x50,0x04,0xc6,0x60,0x0e,0x4e,0xa0,0x0c,0xc8,0xf0,0x0b,0xc6, +0x50,0xae,0x6d,0x30,0x0a,0x8b,0xc0,0x01,0xfe,0xc4,0x0d,0xdc,0xc9,0x01,0xd8,0x30, +0xa7,0xbc,0x3a,0xb0,0x2d,0x69,0x72,0x49,0x4a,0x0c,0x0e,0x00,0x04,0xc4,0xe0,0x03, +0xe3,0x40,0x07,0xc2,0x10,0x0a,0x40,0x00,0x04,0xe3,0x70,0x02,0x17,0x68,0x12,0x5f, +0x50,0x02,0x02,0xc1,0x05,0x97,0x30,0xad,0xa9,0x70,0x24,0xd7,0xca,0x01,0xbc,0x50, +0x12,0x65,0x60,0xae,0x69,0x4a,0x0c,0x6d,0xe0,0x04,0x9c,0x53,0x0f,0x1c,0x50,0x0e, +0x59,0x70,0x06,0x7d,0x50,0x07,0xaa,0xd0,0x08,0x97,0xa0,0x8b,0x8a,0xf0,0x0e,0xc6, +0xff,0xc0,0x05,0xac,0x00,0x05,0xe6,0xa0,0x0a,0x7d,0xe0,0xb2,0x47,0x50,0x04,0x47, +0x80,0x03,0x34,0x81,0x08,0x47,0x30,0x95,0x04,0x7b,0xb4,0x2c,0x29,0x04,0x4f,0x70, +0x2f,0xf1,0x20,0x9d,0xa0,0xa0,0x0f,0xfd,0xe0,0x03,0xf1,0x20,0x0c,0x4f,0xe0,0x03, +0xc2,0xb0,0x12,0xe3,0xa2,0x0a,0x88,0xd0,0x2f,0x89,0x50,0x06,0x15,0x40,0x0e,0x47, +0x72,0x06,0x90,0xc0,0x01,0x80,0x50,0x12,0xca,0xe0,0x04,0x2a,0x40,0x02,0x25,0xd1, +0x08,0x75,0xc0,0x39,0x67,0x90,0x05,0x1c,0xa0,0x0a,0x75,0x50,0x04,0x75,0x60,0x0e, +0x69,0x70,0x04,0x57,0x2a,0x07,0x4e,0x60,0x0c,0xdb,0x10,0x08,0x50,0xe0,0x04,0x5f, +0x30,0xb7,0xe6,0xc0,0x0d,0x80,0xf0,0x05,0x77,0x24,0x04,0xaa,0x60,0xb4,0x48,0xbb, +0xb8,0xd5,0x48,0x07,0x23,0x80,0x07,0x5c,0x60,0x0a,0x4f,0xa0,0x0f,0x5c,0xe0,0x03, +0x0e,0x80,0x0e,0xe3,0xe0,0x01,0x40,0xd0,0x0f,0x08,0x50,0x40,0x61,0x50,0x0c,0x38, +0x10,0x0b,0xe6,0xf0,0x0e,0xb7,0x20,0x04,0x80,0xc0,0x06,0x23,0xf0,0xb2,0x79,0x51, +0x0e,0xef,0xc0,0xae,0x65,0x20,0x07,0x7d,0x70,0x09,0x25,0x10,0x08,0x57,0x8a,0x0c, +0x75,0xa0,0x8b,0x2f,0x2b,0xaf,0x6f,0x4a,0x0e,0xe6,0xa0,0x0c,0x47,0x40,0x4f,0x72, +0x90,0x05,0x28,0xa6,0xb6,0x8d,0x90,0x05,0xc6,0x20,0x07,0x6c,0x5b,0x06,0xe5,0x70, +0x06,0x9c,0xa0,0x0c,0xdc,0x5a,0x06,0x8c,0x1b,0xbd,0xd4,0xd8,0xa2,0x80,0x80,0x03, +0xa6,0xbb,0x07,0x42,0x10,0x07,0x4f,0x80,0x0e,0xb1,0xa0,0x08,0x97,0x83,0x07,0x61, +0xd1,0x40,0x07,0x38,0x90,0x0a,0x36,0x1a,0x06,0xdc,0xf0,0x0e,0x75,0x00,0x09,0x89, +0xab,0x0c,0xdc,0xe0,0x04,0xc0,0xc0,0xb3,0xc6,0x90,0x05,0x4e,0x50,0x07,0xe5,0x90, +0x08,0x99,0x00,0x09,0x4e,0x81,0x01,0xe4,0x00,0x6f,0xc8,0x80,0x06,0xc4,0x65,0xab, +0x36,0x2b,0x02,0xef,0x00,0x6f,0x3f,0x56,0x06,0x50,0xa0,0x0a,0x4e,0xd1,0x07,0x1c, +0x50,0x07,0x4e,0xe0,0x4b,0xb7,0x70,0xa9,0x7a,0xb0,0xb2,0x02,0x2b,0xbd,0x14,0xbc, +0x84,0x07,0x89,0x67,0x0b,0x19,0x0b,0x07,0xb9,0x3f,0x50,0x80,0x90,0x74,0x48,0x0c, +0xb1,0x10,0x06,0xa9,0xc7,0x05,0x71,0x60,0x0c,0x22,0x60,0xa6,0x3e,0xc4,0x9d,0x55, +0x8a,0x0c,0xef,0xd0,0x08,0x80,0xa0,0xc0,0x0f,0x57,0x12,0xa6,0xa0,0x8b,0x4f,0xa1, +0x6e,0x76,0xa5,0x6e,0xf8,0x76,0x24,0x72,0x00,0x15,0xf8,0xe6,0x14,0x65,0x90,0x09, +0x3d,0xec,0x14,0xb3,0x70,0xbc,0x9c,0x53,0xc1,0x46,0xbc,0x84,0x37,0x81,0x36,0xd7, +0xb7,0xc4,0x0c,0x91,0xa1,0x3d,0x1a,0x0e,0x3b,0xfb,0x05,0x90,0x80,0x0c,0x50,0xa1, +0x9e,0x1e,0xda,0x9f,0x38,0xea,0xa1,0x3a,0x75,0xc4,0x5c,0x3c,0x96,0x75,0xf7,0x14, +0xca,0x80,0x03,0x45,0x5c,0xa2,0x5a,0xfc,0x14,0x3c,0x2a,0xa0,0xea,0xa9,0xa3,0x7f, +0x12,0x10,0x00,0x3b,}; + +const unsigned int dummy_align__STM32H7xx_files_stm32_jpg = 2; +const unsigned char data__STM32H7xx_files_stm32_jpg[] = { +/* /STM32H7xx_files/stm32.jpg (27 chars) */ +0x2f,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x5f,0x66,0x69,0x6c,0x65,0x73, +0x2f,0x73,0x74,0x6d,0x33,0x32,0x2e,0x6a,0x70,0x67,0x00,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) +" (63 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, +0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, +0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, +0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, +/* "Content-type: image/jpeg + +" (28 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x69,0x6d, +0x61,0x67,0x65,0x2f,0x6a,0x70,0x65,0x67,0x0d,0x0a,0x0d,0x0a, +/* raw file data (40619 bytes) */ +0xff,0xd8,0xff,0xe0,0x00,0x10,0x4a,0x46,0x49,0x46,0x00,0x01,0x01,0x01,0x00,0x60, +0x00,0x60,0x00,0x00,0xff,0xdb,0x00,0x43,0x00,0x03,0x02,0x02,0x03,0x02,0x02,0x03, +0x03,0x03,0x03,0x04,0x03,0x03,0x04,0x05,0x08,0x05,0x05,0x04,0x04,0x05,0x0a,0x07, +0x07,0x06,0x08,0x0c,0x0a,0x0c,0x0c,0x0b,0x0a,0x0b,0x0b,0x0d,0x0e,0x12,0x10,0x0d, +0x0e,0x11,0x0e,0x0b,0x0b,0x10,0x16,0x10,0x11,0x13,0x14,0x15,0x15,0x15,0x0c,0x0f, +0x17,0x18,0x16,0x14,0x18,0x12,0x14,0x15,0x14,0xff,0xdb,0x00,0x43,0x01,0x03,0x04, +0x04,0x05,0x04,0x05,0x09,0x05,0x05,0x09,0x14,0x0d,0x0b,0x0d,0x14,0x14,0x14,0x14, +0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14, +0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14, +0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0xff,0xc0, +0x00,0x11,0x08,0x01,0x50,0x03,0x36,0x03,0x01,0x22,0x00,0x02,0x11,0x01,0x03,0x11, +0x01,0xff,0xc4,0x00,0x1f,0x00,0x00,0x01,0x05,0x01,0x01,0x01,0x01,0x01,0x01,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09, +0x0a,0x0b,0xff,0xc4,0x00,0xb5,0x10,0x00,0x02,0x01,0x03,0x03,0x02,0x04,0x03,0x05, +0x05,0x04,0x04,0x00,0x00,0x01,0x7d,0x01,0x02,0x03,0x00,0x04,0x11,0x05,0x12,0x21, +0x31,0x41,0x06,0x13,0x51,0x61,0x07,0x22,0x71,0x14,0x32,0x81,0x91,0xa1,0x08,0x23, +0x42,0xb1,0xc1,0x15,0x52,0xd1,0xf0,0x24,0x33,0x62,0x72,0x82,0x09,0x0a,0x16,0x17, +0x18,0x19,0x1a,0x25,0x26,0x27,0x28,0x29,0x2a,0x34,0x35,0x36,0x37,0x38,0x39,0x3a, +0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a, +0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a, +0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99, +0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7, +0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,0xd5, +0xd6,0xd7,0xd8,0xd9,0xda,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xf1, +0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xff,0xc4,0x00,0x1f,0x01,0x00,0x03, +0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01, +0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0xff,0xc4,0x00,0xb5,0x11,0x00, +0x02,0x01,0x02,0x04,0x04,0x03,0x04,0x07,0x05,0x04,0x04,0x00,0x01,0x02,0x77,0x00, +0x01,0x02,0x03,0x11,0x04,0x05,0x21,0x31,0x06,0x12,0x41,0x51,0x07,0x61,0x71,0x13, +0x22,0x32,0x81,0x08,0x14,0x42,0x91,0xa1,0xb1,0xc1,0x09,0x23,0x33,0x52,0xf0,0x15, +0x62,0x72,0xd1,0x0a,0x16,0x24,0x34,0xe1,0x25,0xf1,0x17,0x18,0x19,0x1a,0x26,0x27, +0x28,0x29,0x2a,0x35,0x36,0x37,0x38,0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49, +0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69, +0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x82,0x83,0x84,0x85,0x86,0x87,0x88, +0x89,0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6, +0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4, +0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xe2, +0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9, +0xfa,0xff,0xda,0x00,0x0c,0x03,0x01,0x00,0x02,0x11,0x03,0x11,0x00,0x3f,0x00,0xfb, +0x07,0xfe,0x16,0xef,0x8b,0x7f,0xe8,0x2d,0xff,0x00,0x92,0xd0,0xff,0x00,0xf1,0x14, +0xbf,0xf0,0xb7,0x3c,0x5b,0xff,0x00,0x41,0x6f,0xfc,0x96,0x87,0xff,0x00,0x88,0xae, +0x44,0x2d,0x3b,0x68,0xae,0x9b,0x2e,0xc6,0x57,0x3a,0xef,0xf8,0x5b,0x5e,0x2c,0xff, +0x00,0xa0,0xb7,0xfe,0x4b,0x43,0xff,0x00,0xc4,0x53,0x87,0xc5,0x9f,0x16,0x7f,0xd0, +0x57,0xff,0x00,0x25,0xa2,0xff,0x00,0xe2,0x2b,0x93,0x11,0x8a,0x78,0x4a,0x2c,0x85, +0x73,0xab,0x5f,0x8b,0x1e,0x2b,0x3f,0xf3,0x15,0xff,0x00,0xc9,0x68,0xbf,0xf8,0x8a, +0x78,0xf8,0xad,0xe2,0xaf,0xfa,0x0a,0x7f,0xe4,0xbc,0x5f,0xfc,0x4d,0x72,0x8a,0xbe, +0xd4,0xfc,0x7b,0x52,0xb2,0x15,0xd9,0xd5,0x8f,0x8a,0x9e,0x2a,0xff,0x00,0xa0,0xa7, +0xfe,0x4b,0xc5,0xff,0x00,0xc4,0xd3,0xbf,0xe1,0x69,0xf8,0xa7,0xfe,0x82,0x9f,0xf9, +0x2f,0x17,0xff,0x00,0x13,0x5c,0xa8,0x5a,0x72,0xad,0x1c,0xa8,0x7a,0x9d,0x4f,0xfc, +0x2d,0x2f,0x14,0xff,0x00,0xd0,0x53,0xff,0x00,0x25,0xe2,0xff,0x00,0xe2,0x69,0xc3, +0xe2,0x87,0x8a,0x3f,0xe8,0x27,0xff,0x00,0x92,0xf1,0x7f,0xf1,0x35,0xcb,0x62,0xa4, +0x55,0xcd,0x16,0x5d,0x87,0x76,0x75,0x03,0xe2,0x87,0x89,0xcf,0xfc,0xc4,0xff,0x00, +0xf2,0x5e,0x2f,0xfe,0x26,0x97,0xfe,0x16,0x77,0x89,0xff,0x00,0xe8,0x27,0xff,0x00, +0x92,0xf1,0x7f,0xf1,0x35,0xcd,0x2c,0x62,0x9d,0xb6,0x95,0x90,0x5d,0x9d,0x20,0xf8, +0x99,0xe2,0x73,0xff,0x00,0x31,0x3f,0xfc,0x97,0x8b,0xff,0x00,0x89,0xa7,0xff,0x00, +0xc2,0xcc,0xf1,0x37,0xfd,0x04,0xbf,0xf2,0x04,0x5f,0xfc,0x4d,0x73,0x41,0x2a,0x41, +0x1d,0x16,0x41,0x76,0x74,0x6b,0xf1,0x2b,0xc4,0xa7,0xfe,0x62,0x5f,0xf9,0x02,0x2f, +0xfe,0x26,0x9c,0x3e,0x24,0xf8,0x93,0xfe,0x82,0x5f,0xf9,0x02,0x3f,0xfe,0x26,0xb9, +0xc0,0x94,0xf5,0x8e,0x8b,0x20,0xbb,0x3a,0x25,0xf8,0x91,0xe2,0x4f,0xfa,0x08,0xff, +0x00,0xe4,0x08,0xff,0x00,0xf8,0x9a,0x5f,0xf8,0x58,0xde,0x24,0xff,0x00,0xa0,0x8f, +0xfe,0x40,0x8f,0xff,0x00,0x89,0xac,0x0f,0x2e,0x9c,0xb1,0x51,0x64,0x17,0x66,0xfa, +0xfc,0x44,0xf1,0x23,0x7f,0xcc,0x47,0xff,0x00,0x20,0x47,0xff,0x00,0xc4,0xd3,0xff, +0x00,0xe1,0x61,0xf8,0x8f,0xfe,0x82,0x3f,0xf9,0x02,0x3f,0xfe,0x26,0xb0,0x56,0x3f, +0x4a,0x77,0x95,0xed,0x45,0x90,0xae,0xcd,0xdf,0xf8,0x58,0x5e,0x21,0xff,0x00,0xa0, +0x87,0xfe,0x40,0x8f,0xff,0x00,0x89,0xa0,0x7c,0x42,0xf1,0x17,0xfd,0x04,0x38,0xff, +0x00,0xae,0x11,0xff,0x00,0xf1,0x35,0x89,0xe5,0x53,0x96,0x1c,0x0a,0x2c,0x85,0x76, +0x6d,0x8f,0x88,0x1e,0x21,0xff,0x00,0xa0,0x87,0xfe,0x40,0x8f,0xff,0x00,0x89,0xa7, +0x0f,0x1f,0x78,0x87,0xfe,0x82,0x1f,0xf9,0x06,0x3f,0xfe,0x26,0xb1,0x7c,0xba,0x72, +0xc7,0xf8,0xd5,0xf2,0xae,0xc2,0xbb,0x36,0xc7,0x8f,0xbc,0x43,0xff,0x00,0x41,0x0f, +0xfc,0x83,0x1f,0xff,0x00,0x13,0x4b,0xff,0x00,0x09,0xe7,0x88,0x3f,0xe8,0x21,0xff, +0x00,0x90,0x63,0xff,0x00,0xe2,0x6b,0x18,0x43,0xf8,0x53,0xd6,0x0f,0x5a,0x39,0x57, +0x60,0xbb,0xee,0x6b,0xff,0x00,0xc2,0x79,0xaf,0xff,0x00,0xd0,0x43,0xff,0x00,0x20, +0xc7,0xff,0x00,0xc4,0xd2,0xff,0x00,0xc2,0x77,0xaf,0xff,0x00,0xd0,0x43,0xff,0x00, +0x20,0xc7,0xff,0x00,0xc4,0xd6,0x57,0xd9,0xe8,0xf2,0x47,0xa5,0x3e,0x55,0xd8,0x39, +0x99,0xa9,0xff,0x00,0x09,0xe7,0x88,0x3f,0xe7,0xff,0x00,0xff,0x00,0x20,0xc7,0xff, +0x00,0xc4,0xd2,0xff,0x00,0xc2,0x79,0xaf,0xff,0x00,0xcf,0xff,0x00,0xfe,0x41,0x8f, +0xff,0x00,0x89,0xac,0xaf,0x24,0x7a,0x51,0xe4,0x8a,0x5c,0xab,0xb0,0x73,0x3e,0xe6, +0xaf,0xfc,0x27,0x5e,0x20,0xff,0x00,0x9f,0xff,0x00,0xfc,0x83,0x1f,0xff,0x00,0x13, +0x49,0xff,0x00,0x09,0xe7,0x88,0x3f,0xe7,0xff,0x00,0xff,0x00,0x20,0xc7,0xff,0x00, +0xc4,0xd6,0x57,0x92,0x29,0x7e,0xcf,0x47,0x2a,0xec,0x17,0x7d,0xcd,0x4f,0xf8,0x4f, +0x3c,0x41,0xff,0x00,0x41,0x0f,0xfc,0x83,0x1f,0xff,0x00,0x13,0x4d,0x3e,0x3d,0xf1, +0x07,0xfd,0x04,0x3f,0xf2,0x04,0x7f,0xfc,0x4d,0x65,0xf9,0x14,0x7d,0x9e,0x9f,0x2a, +0xec,0x17,0x7d,0xcd,0x23,0xe3,0xef,0x10,0xff,0x00,0xd0,0x43,0xff,0x00,0x20,0xc7, +0xff,0x00,0xc4,0xd3,0x5b,0xc7,0xde,0x22,0xed,0xa8,0xff,0x00,0xe4,0x08,0xff,0x00, +0xf8,0x9a,0xcd,0x36,0xf4,0xc3,0x0f,0xb5,0x1c,0xab,0xb0,0xae,0xfb,0x9a,0x4d,0xf1, +0x0b,0xc4,0x63,0xfe,0x62,0x1f,0xf9,0x02,0x3f,0xfe,0x26,0x98,0xdf,0x11,0x3c,0x49, +0xff,0x00,0x41,0x1c,0x7f,0xdb,0x08,0xff,0x00,0xf8,0x9a,0xcd,0x68,0x05,0x46,0xd0, +0x8a,0x7c,0xab,0xb0,0x5d,0x9a,0x2d,0xf1,0x1b,0xc4,0xc3,0xfe,0x62,0x5f,0xf9,0x02, +0x2f,0xfe,0x26,0xa3,0x6f,0x89,0x5e,0x26,0x5f,0xf9,0x89,0x63,0xfe,0xd8,0x45,0xff, +0x00,0xc4,0xd6,0x6b,0xdb,0xfb,0x55,0x77,0xb7,0xf6,0xa5,0xca,0xbb,0x05,0xdf,0x73, +0x59,0xbe,0x26,0x78,0xa3,0xfe,0x82,0x7f,0xf9,0x2f,0x17,0xff,0x00,0x13,0x51,0x37, +0xc4,0xff,0x00,0x14,0x8f,0xf9,0x8a,0x7f,0xe4,0xbc,0x5f,0xfc,0x4d,0x64,0x34,0x02, +0xab,0xb4,0x34,0x72,0xae,0xc1,0x76,0x6d,0xb7,0xc5,0x2f,0x15,0x8f,0xf9,0x8a,0x7f, +0xe4,0xbc,0x5f,0xfc,0x45,0x44,0xdf,0x15,0x7c,0x58,0x3f,0xe6,0x2b,0xff,0x00,0x92, +0xf1,0x7f,0xf1,0x15,0x86,0xd0,0xd4,0x0d,0x0d,0x1c,0xab,0xb0,0xf9,0x99,0xbc,0xdf, +0x16,0x3c,0x5c,0x3a,0x6a,0xdf,0xf9,0x2d,0x0f,0xff,0x00,0x11,0x51,0x1f,0x8b,0x9e, +0x2f,0xff,0x00,0xa0,0xb7,0xfe,0x4b,0x43,0xff,0x00,0xc4,0x56,0x11,0x86,0xa1,0x92, +0x11,0x47,0x2a,0xec,0x2e,0x66,0x74,0x07,0xe2,0xf7,0x8c,0x33,0xff,0x00,0x21,0x7f, +0xfc,0x96,0x87,0xff,0x00,0x88,0xa6,0x37,0xc6,0x0f,0x18,0xf6,0xd5,0xff,0x00,0xf2, +0x5a,0x1f,0xfe,0x22,0xb9,0xb6,0x86,0xa1,0x68,0x71,0xcd,0x2e,0x54,0x3e,0x66,0x74, +0xcd,0xf1,0x8b,0xc6,0x43,0xfe,0x63,0x1f,0xf9,0x2d,0x0f,0xff,0x00,0x11,0x4c,0x3f, +0x19,0xbc,0x65,0xff,0x00,0x41,0x8f,0xfc,0x95,0x87,0xff,0x00,0x88,0xae,0x5d,0xa2, +0xa8,0xda,0x11,0xe9,0x53,0xca,0x8a,0xbb,0x3a,0x96,0xf8,0xcf,0xe3,0x3f,0xfa,0x0c, +0xff,0x00,0xe4,0xac,0x3f,0xfc,0x45,0x46,0xdf,0x1a,0x3c,0x69,0x82,0x3f,0xb6,0xb0, +0x7d,0x7e,0xcb,0x07,0xff,0x00,0x11,0x5c,0xab,0x43,0x8a,0x89,0xa3,0xf6,0xa2,0xcb, +0xb0,0xae,0xcf,0x9f,0x7e,0x39,0x7e,0xd4,0x9f,0xb4,0x7f,0xc2,0x3f,0x10,0x61,0x7c, +0x7e,0xf7,0x3a,0x15,0xdb,0x13,0x67,0x76,0x74,0x5d,0x3f,0x8f,0xfa,0x66,0xff,0x00, +0xe8,0xfc,0x30,0xfd,0x47,0x35,0xe6,0x7f,0xf0,0xf0,0xdf,0xda,0x07,0xfe,0x87,0xff, +0x00,0xfc,0xa3,0x69,0xff,0x00,0xfc,0x8f,0x5f,0x57,0xf8,0xcb,0xc1,0xba,0x67,0x8e, +0xbc,0x3b,0x77,0xa2,0xea,0xd0,0x79,0xf6,0x77,0x0b,0x83,0xfd,0xe4,0x6e,0xce,0xa7, +0xb3,0x03,0xd2,0xbf,0x3d,0x3e,0x2a,0x7c,0x32,0xd4,0xfe,0x15,0x78,0xaa,0x6d,0x27, +0x50,0x53,0x24,0x27,0x2f,0x6b,0x74,0x06,0x12,0x78,0xf3,0xc3,0x0f,0x71,0xd0,0x8e, +0xc6,0xbe,0x87,0x07,0x2a,0x15,0x97,0x24,0xe0,0xb9,0x97,0x92,0xd4,0xf3,0xeb,0x7b, +0x48,0x3e,0x65,0x27,0x6f,0x53,0xd7,0x3f,0xe1,0xe1,0xbf,0xb4,0x0f,0xfd,0x0f,0xff, +0x00,0xf9,0x46,0xd3,0xff,0x00,0xf9,0x1e,0x8f,0xf8,0x78,0x6f,0xed,0x03,0xff,0x00, +0x43,0xff,0x00,0xfe,0x51,0xb4,0xff,0x00,0xfe,0x47,0xaf,0x9c,0xe8,0xaf,0x53,0xea, +0xd4,0x3f,0x91,0x7d,0xc8,0xe5,0xf6,0xb5,0x3f,0x99,0xfd,0xe7,0xd1,0x9f,0xf0,0xf0, +0xdf,0xda,0x07,0xfe,0x87,0xff,0x00,0xfc,0xa3,0x69,0xff,0x00,0xfc,0x8f,0x47,0xfc, +0x3c,0x37,0xf6,0x81,0xff,0x00,0xa1,0xff,0x00,0xff,0x00,0x28,0xda,0x7f,0xff,0x00, +0x23,0xd7,0xce,0x74,0x51,0xf5,0x6a,0x1f,0xc8,0xbe,0xe4,0x1e,0xd6,0xa7,0xf3,0x3f, +0xbc,0xfa,0x33,0xfe,0x1e,0x1b,0xfb,0x40,0xff,0x00,0xd0,0xff,0x00,0xff,0x00,0x94, +0x6d,0x3f,0xff,0x00,0x91,0xe8,0xff,0x00,0x87,0x86,0xfe,0xd0,0x3f,0xf4,0x3f,0xff, +0x00,0xe5,0x1b,0x4f,0xff,0x00,0xe4,0x7a,0xf9,0xce,0x8a,0x3e,0xad,0x43,0xf9,0x17, +0xdc,0x83,0xda,0xd4,0xfe,0x67,0xf7,0x9f,0x46,0x7f,0xc3,0xc3,0x7f,0x68,0x1f,0xfa, +0x1f,0xff,0x00,0xf2,0x8d,0xa7,0xff,0x00,0xf2,0x3d,0x1f,0xf0,0xf0,0xdf,0xda,0x07, +0xfe,0x87,0xff,0x00,0xfc,0xa3,0x69,0xff,0x00,0xfc,0x8f,0x5f,0x39,0xd1,0x47,0xd5, +0xa8,0x7f,0x22,0xfb,0x90,0x7b,0x5a,0x9f,0xcc,0xfe,0xf3,0xe8,0xcf,0xf8,0x78,0x6f, +0xed,0x03,0xff,0x00,0x43,0xff,0x00,0xfe,0x51,0xb4,0xff,0x00,0xfe,0x47,0xa3,0xfe, +0x1e,0x1b,0xfb,0x40,0xff,0x00,0xd0,0xff,0x00,0xff,0x00,0x94,0x6d,0x3f,0xff,0x00, +0x91,0xeb,0xe7,0x3a,0x28,0xfa,0xb5,0x0f,0xe4,0x5f,0x72,0x0f,0x6b,0x53,0xf9,0x9f, +0xde,0x7d,0x19,0xff,0x00,0x0f,0x0d,0xfd,0xa0,0x7f,0xe8,0x7f,0xff,0x00,0xca,0x36, +0x9f,0xff,0x00,0xc8,0xf4,0x7f,0xc3,0xc3,0x7f,0x68,0x1f,0xfa,0x1f,0xff,0x00,0xf2, +0x8d,0xa7,0xff,0x00,0xf2,0x3d,0x7c,0xe7,0x45,0x1f,0x56,0xa1,0xfc,0x8b,0xee,0x41, +0xed,0x6a,0x7f,0x33,0xfb,0xcf,0xa3,0x3f,0xe1,0xe1,0xbf,0xb4,0x0f,0xfd,0x0f,0xff, +0x00,0xf9,0x46,0xd3,0xff,0x00,0xf9,0x1e,0x8f,0xf8,0x78,0x6f,0xed,0x03,0xff,0x00, +0x43,0xff,0x00,0xfe,0x51,0xb4,0xff,0x00,0xfe,0x47,0xaf,0x9c,0xe8,0xa3,0xea,0xd4, +0x3f,0x91,0x7d,0xc8,0x3d,0xad,0x4f,0xe6,0x7f,0x79,0xf4,0x67,0xfc,0x3c,0x37,0xf6, +0x81,0xff,0x00,0xa1,0xff,0x00,0xff,0x00,0x28,0xda,0x7f,0xff,0x00,0x23,0xd1,0xff, +0x00,0x0f,0x0d,0xfd,0xa0,0x7f,0xe8,0x7f,0xff,0x00,0xca,0x36,0x9f,0xff,0x00,0xc8, +0xf5,0xf3,0x9d,0x14,0x7d,0x5a,0x87,0xf2,0x2f,0xb9,0x07,0xb5,0xa9,0xfc,0xcf,0xef, +0x3e,0x8c,0xff,0x00,0x87,0x86,0xfe,0xd0,0x3f,0xf4,0x3f,0xff,0x00,0xe5,0x1b,0x4f, +0xff,0x00,0xe4,0x7a,0x3f,0xe1,0xe1,0xbf,0xb4,0x0f,0xfd,0x0f,0xff,0x00,0xf9,0x46, +0xd3,0xff,0x00,0xf9,0x1e,0xbe,0x73,0xa2,0x8f,0xab,0x50,0xfe,0x45,0xf7,0x20,0xf6, +0xb5,0x3f,0x99,0xfd,0xe7,0xd1,0x9f,0xf0,0xf0,0xdf,0xda,0x07,0xfe,0x87,0xff,0x00, +0xfc,0xa3,0x69,0xff,0x00,0xfc,0x8f,0x47,0xfc,0x3c,0x37,0xf6,0x81,0xff,0x00,0xa1, +0xff,0x00,0xff,0x00,0x28,0xda,0x7f,0xff,0x00,0x23,0xd7,0xce,0x74,0x51,0xf5,0x6a, +0x1f,0xc8,0xbe,0xe4,0x1e,0xd6,0xa7,0xf3,0x3f,0xbc,0xfa,0x33,0xfe,0x1e,0x1b,0xfb, +0x40,0xff,0x00,0xd0,0xff,0x00,0xff,0x00,0x94,0x6d,0x3f,0xff,0x00,0x91,0xe8,0xff, +0x00,0x87,0x86,0xfe,0xd0,0x3f,0xf4,0x3f,0xff,0x00,0xe5,0x1b,0x4f,0xff,0x00,0xe4, +0x7a,0xf9,0xce,0x8a,0x3e,0xad,0x43,0xf9,0x17,0xdc,0x83,0xda,0xd4,0xfe,0x67,0xf7, +0x9f,0x46,0x7f,0xc3,0xc3,0x7f,0x68,0x1f,0xfa,0x1f,0xff,0x00,0xf2,0x8d,0xa7,0xff, +0x00,0xf2,0x3d,0x1f,0xf0,0xf0,0xdf,0xda,0x07,0xfe,0x87,0xff,0x00,0xfc,0xa3,0x69, +0xff,0x00,0xfc,0x8f,0x5f,0x39,0xd1,0x47,0xd5,0xa8,0x7f,0x22,0xfb,0x90,0x7b,0x5a, +0x9f,0xcc,0xfe,0xf3,0xe8,0xcf,0xf8,0x78,0x6f,0xed,0x03,0xff,0x00,0x43,0xff,0x00, +0xfe,0x51,0xb4,0xff,0x00,0xfe,0x47,0xa3,0xfe,0x1e,0x1b,0xfb,0x40,0xff,0x00,0xd0, +0xff,0x00,0xff,0x00,0x94,0x6d,0x3f,0xff,0x00,0x91,0xeb,0xe7,0x3a,0x28,0xfa,0xb5, +0x0f,0xe4,0x5f,0x72,0x0f,0x6b,0x53,0xf9,0x9f,0xde,0x7d,0x19,0xff,0x00,0x0f,0x0d, +0xfd,0xa0,0x7f,0xe8,0x7f,0xff,0x00,0xca,0x36,0x9f,0xff,0x00,0xc8,0xf4,0x7f,0xc3, +0xc3,0x7f,0x68,0x1f,0xfa,0x1f,0xff,0x00,0xf2,0x8d,0xa7,0xff,0x00,0xf2,0x3d,0x7c, +0xe7,0x45,0x1f,0x56,0xa1,0xfc,0x8b,0xee,0x41,0xed,0x6a,0x7f,0x33,0xfb,0xcf,0xa3, +0x3f,0xe1,0xe1,0xbf,0xb4,0x0f,0xfd,0x0f,0xff,0x00,0xf9,0x46,0xd3,0xff,0x00,0xf9, +0x1e,0x8f,0xf8,0x78,0x6f,0xed,0x03,0xff,0x00,0x43,0xff,0x00,0xfe,0x51,0xb4,0xff, +0x00,0xfe,0x47,0xaf,0x9c,0xe8,0xa3,0xea,0xd4,0x3f,0x91,0x7d,0xc8,0x3d,0xad,0x4f, +0xe6,0x7f,0x79,0xf4,0x67,0xfc,0x3c,0x37,0xf6,0x81,0xff,0x00,0xa1,0xff,0x00,0xff, +0x00,0x28,0xda,0x7f,0xff,0x00,0x23,0xd1,0xff,0x00,0x0f,0x0d,0xfd,0xa0,0x7f,0xe8, +0x7f,0xff,0x00,0xca,0x36,0x9f,0xff,0x00,0xc8,0xf5,0xf3,0x9d,0x14,0x7d,0x5a,0x87, +0xf2,0x2f,0xb9,0x07,0xb5,0xa9,0xfc,0xcf,0xef,0x3e,0x8c,0xff,0x00,0x87,0x86,0xfe, +0xd0,0x3f,0xf4,0x3f,0xff,0x00,0xe5,0x1b,0x4f,0xff,0x00,0xe4,0x7a,0x3f,0xe1,0xe1, +0xbf,0xb4,0x0f,0xfd,0x0f,0xff,0x00,0xf9,0x46,0xd3,0xff,0x00,0xf9,0x1e,0xbe,0x73, +0xa2,0x8f,0xab,0x50,0xfe,0x45,0xf7,0x20,0xf6,0xb5,0x3f,0x99,0xfd,0xe7,0xd1,0x9f, +0xf0,0xf0,0xdf,0xda,0x07,0xfe,0x87,0xff,0x00,0xfc,0xa3,0x69,0xff,0x00,0xfc,0x8f, +0x47,0xfc,0x3c,0x37,0xf6,0x81,0xff,0x00,0xa1,0xff,0x00,0xff,0x00,0x28,0xda,0x7f, +0xff,0x00,0x23,0xd7,0xce,0x74,0x51,0xf5,0x6a,0x1f,0xc8,0xbe,0xe4,0x1e,0xd6,0xa7, +0xf3,0x3f,0xbc,0xfa,0x33,0xfe,0x1e,0x1b,0xfb,0x40,0xff,0x00,0xd0,0xff,0x00,0xff, +0x00,0x94,0x6d,0x3f,0xff,0x00,0x91,0xe8,0xff,0x00,0x87,0x86,0xfe,0xd0,0x3f,0xf4, +0x3f,0xff,0x00,0xe5,0x1b,0x4f,0xff,0x00,0xe4,0x7a,0xf9,0xce,0x8a,0x3e,0xad,0x43, +0xf9,0x17,0xdc,0x83,0xda,0xd4,0xfe,0x67,0xf7,0x9f,0x46,0x7f,0xc3,0xc3,0x7f,0x68, +0x1f,0xfa,0x1f,0xff,0x00,0xf2,0x8d,0xa7,0xff,0x00,0xf2,0x3d,0x1f,0xf0,0xf0,0xdf, +0xda,0x07,0xfe,0x87,0xff,0x00,0xfc,0xa3,0x69,0xff,0x00,0xfc,0x8f,0x5f,0x39,0xd1, +0x47,0xd5,0xa8,0x7f,0x22,0xfb,0x90,0x7b,0x5a,0x9f,0xcc,0xfe,0xf3,0xe8,0xcf,0xf8, +0x78,0x6f,0xed,0x03,0xff,0x00,0x43,0xff,0x00,0xfe,0x51,0xb4,0xff,0x00,0xfe,0x47, +0xa3,0xfe,0x1e,0x1b,0xfb,0x40,0xff,0x00,0xd0,0xff,0x00,0xff,0x00,0x94,0x6d,0x3f, +0xff,0x00,0x91,0xeb,0xe7,0x3a,0x28,0xfa,0xb5,0x0f,0xe4,0x5f,0x72,0x0f,0x6b,0x53, +0xf9,0x9f,0xde,0x7d,0x19,0xff,0x00,0x0f,0x0d,0xfd,0xa0,0x7f,0xe8,0x7f,0xff,0x00, +0xca,0x36,0x9f,0xff,0x00,0xc8,0xf4,0x7f,0xc3,0xc3,0x7f,0x68,0x1f,0xfa,0x1f,0xff, +0x00,0xf2,0x8d,0xa7,0xff,0x00,0xf2,0x3d,0x7c,0xe7,0x45,0x1f,0x56,0xa1,0xfc,0x8b, +0xee,0x41,0xed,0x6a,0x7f,0x33,0xfb,0xcf,0xa3,0x3f,0xe1,0xe1,0xbf,0xb4,0x0f,0xfd, +0x0f,0xff,0x00,0xf9,0x46,0xd3,0xff,0x00,0xf9,0x1e,0x8f,0xf8,0x78,0x6f,0xed,0x03, +0xff,0x00,0x43,0xff,0x00,0xfe,0x51,0xb4,0xff,0x00,0xfe,0x47,0xaf,0x9c,0xe8,0xa3, +0xea,0xd4,0x3f,0x91,0x7d,0xc8,0x3d,0xad,0x4f,0xe6,0x7f,0x79,0xf4,0x67,0xfc,0x3c, +0x37,0xf6,0x81,0xff,0x00,0xa1,0xff,0x00,0xff,0x00,0x28,0xda,0x7f,0xff,0x00,0x23, +0xd1,0xff,0x00,0x0f,0x0d,0xfd,0xa0,0x7f,0xe8,0x7f,0xff,0x00,0xca,0x36,0x9f,0xff, +0x00,0xc8,0xf5,0xf3,0x9d,0x14,0x7d,0x5a,0x87,0xf2,0x2f,0xb9,0x07,0xb5,0xa9,0xfc, +0xcf,0xef,0x3e,0x8c,0xff,0x00,0x87,0x86,0xfe,0xd0,0x3f,0xf4,0x3f,0xff,0x00,0xe5, +0x1b,0x4f,0xff,0x00,0xe4,0x7a,0x2b,0xe7,0x3a,0x28,0xfa,0xb5,0x0f,0xe4,0x5f,0x72, +0x0f,0x6b,0x53,0xf9,0x9f,0xde,0x7e,0xba,0xaa,0x66,0xa5,0x58,0xc5,0x2a,0xe2,0xa4, +0x5a,0xf8,0xb3,0xda,0x1b,0xb6,0x9d,0xb6,0x9e,0x16,0x97,0x6d,0x00,0x22,0xad,0x3c, +0x2d,0x28,0x5a,0x78,0x5e,0x29,0x8e,0xc2,0x05,0xa7,0x2a,0xd3,0xd5,0x4d,0x48,0x12, +0x90,0xc6,0x2a,0x66,0xa4,0x58,0xe9,0xc1,0x69,0xea,0x87,0x8a,0x40,0x35,0x53,0x34, +0xe1,0x1d,0x4a,0xb1,0xd3,0xc4,0x7f,0x85,0x00,0x44,0x12,0xa4,0x11,0xf4,0xa9,0x16, +0x33,0xd2,0xa4,0x58,0xcd,0x02,0x22,0x58,0xea,0x51,0x1d,0x48,0xb1,0xd4,0xa2,0x33, +0x40,0x10,0xac,0x78,0xed,0x4f,0xdb,0x52,0xac,0x74,0xe5,0x8e,0x81,0x11,0x2a,0x7b, +0x53,0xbc,0xba,0x9d,0x63,0xa9,0x16,0x3e,0x29,0xa4,0x22,0xba,0xc7,0x4f,0x58,0xea, +0xc0,0x8e,0x9e,0x23,0xa7,0x60,0x2b,0x2c,0x35,0x2a,0xc5,0x8e,0xd5,0x3a,0xc7,0x53, +0x2c,0x27,0x15,0x48,0x46,0x75,0xc5,0xed,0xa5,0x8e,0xcf,0xb4,0xdc,0xc3,0x6d,0xbf, +0xee,0xf9,0xd2,0x2a,0x67,0xe9,0x93,0x52,0x2d,0xfd,0x81,0x60,0xa2,0xf2,0xd8,0xb1, +0xe8,0x3c,0xd5,0xc9,0xfd,0x6b,0xe2,0xcf,0xf8,0x28,0xef,0xc4,0x2f,0x0f,0x5d,0xf8, +0x56,0xcf,0xc1,0xb2,0x79,0x29,0xab,0x43,0x3a,0xde,0xc5,0x7f,0xf6,0x92,0xad,0x6e, +0xc0,0x11,0xb7,0x6a,0xf2,0x43,0x03,0xcf,0x4e,0x82,0xbf,0x33,0xee,0x3c,0x71,0xab, +0x35,0xd3,0x6e,0xd5,0xaf,0x25,0x08,0x4e,0xd9,0x12,0xe6,0x4f,0xcc,0x73,0x49,0xca, +0xcc,0xda,0x14,0xd4,0xa3,0x7b,0xea,0x7f,0x42,0x1e,0x48,0x55,0x53,0x8c,0x06,0xfb, +0xbe,0xff,0x00,0x4f,0x5a,0xe5,0xbc,0x79,0xf1,0x13,0xc3,0xbf,0x0d,0xb4,0xf8,0xaf, +0x3c,0x41,0xa8,0x47,0x64,0x93,0x48,0x22,0x8a,0x3c,0x6e,0x92,0x46,0x3d,0x02,0xa8, +0xe4,0xd7,0xe2,0x2c,0x3f,0x1b,0x3e,0x21,0x59,0x47,0xa5,0x44,0xde,0x2c,0xd7,0xee, +0x05,0xa7,0xcf,0x65,0x1c,0xb7,0x72,0x61,0x7b,0xfc,0xa3,0x3d,0x2b,0xd4,0x7e,0x15, +0x7c,0x55,0xf1,0x17,0x8e,0xbc,0x4f,0x75,0x1f,0x8d,0x75,0x4b,0xad,0x5b,0x56,0xb3, +0x2b,0x3d,0xbc,0x97,0xd2,0x17,0x75,0xcf,0x50,0x09,0xfc,0x2b,0x3a,0x95,0x39,0x22, +0xe4,0x95,0xcd,0xa8,0xe1,0xbd,0xa3,0x49,0xb3,0xf5,0x9b,0x46,0xf8,0x93,0xe1,0x7d, +0x7e,0x44,0x8e,0xcb,0x5a,0xb4,0x96,0x67,0xe1,0x21,0x69,0x02,0xbb,0x1c,0x67,0x01, +0x4f,0x35,0x87,0xf1,0x13,0xe3,0x67,0x87,0x7e,0x1e,0xc6,0xeb,0x2c,0x87,0x52,0xbe, +0x55,0xcf,0xd8,0xed,0x48,0x24,0x7b,0xb3,0x74,0x51,0x5f,0x0d,0xcd,0xaa,0x5a,0x4d, +0xa8,0x5b,0x6a,0x33,0x39,0x37,0x16,0xd9,0xd8,0x53,0x8c,0x13,0xdf,0xeb,0x5d,0x07, +0x86,0xbe,0x20,0xd9,0x5b,0xeb,0x10,0xf9,0xeb,0x1c,0xb1,0x3b,0x61,0xd6,0x51,0xbb, +0x77,0xd6,0xbc,0xc9,0x63,0xa7,0xcb,0x65,0x1d,0x4f,0x5a,0x39,0x65,0x35,0x2e,0x69, +0x4b,0x4e,0xc7,0xd4,0x5f,0x0c,0x7f,0x68,0xff,0x00,0x0e,0xf8,0xce,0x3b,0x85,0xd4, +0xaf,0xed,0x74,0xeb,0xa0,0xca,0x62,0x8d,0x15,0xb6,0x1d,0xc4,0x8d,0x9b,0x89,0xe5, +0xc1,0x03,0x3c,0x01,0xcd,0x7b,0x32,0xa0,0x65,0x56,0x19,0x2a,0xc3,0x22,0xbe,0x1f, +0xf1,0x8c,0x7a,0x4e,0x9f,0x2d,0xbe,0xab,0xa3,0xd8,0xc7,0x14,0x2c,0xde,0x61,0x48, +0x54,0x6d,0xdd,0xeb,0x8a,0xa9,0xe1,0xdf,0x8e,0x9e,0x21,0xd1,0xf5,0x28,0xa3,0xb1, +0xd5,0xef,0xae,0x67,0x6f,0xdd,0x43,0x1d,0xcb,0x79,0xbb,0x41,0x39,0xc0,0x07,0xde, +0x8a,0x58,0xd6,0x95,0xa6,0xae,0x15,0xf2,0xe8,0x49,0xde,0x93,0xb7,0x91,0xf7,0x62, +0xc3,0xd7,0x8a,0x3c,0x9f,0x6a,0xc5,0xf8,0x47,0x6b,0xe2,0x7d,0x5b,0xc3,0x26,0xf7, +0xc4,0xee,0xab,0x73,0x22,0xf9,0x91,0xa8,0x8c,0x2e,0x06,0x3b,0xe2,0xba,0xaf,0x20, +0xfa,0x57,0xa9,0x4e,0xa2,0xaa,0xb9,0xa2,0x78,0x15,0xa9,0x4a,0x8c,0xb9,0x64,0xcc, +0xdf,0x26,0x9a,0xd0,0x8f,0x4a,0xd1,0x36,0xe7,0x39,0xa4,0x68,0x2b,0x53,0x1b,0x99, +0x66,0x11,0xcf,0x14,0xc6,0x80,0x7f,0x91,0x5a,0x86,0x03,0x51,0x34,0x07,0xd2,0x80, +0xb9,0x96,0xd0,0x7b,0x54,0x2f,0x0f,0xb5,0x6b,0x34,0x07,0xbd,0x44,0xd0,0x7b,0x52, +0x28,0xc6,0x92,0xde,0xab,0xc9,0x0d,0x6d,0x3c,0x35,0x5e,0x4b,0x73,0x40,0x18,0xb2, +0x41,0x55,0xde,0x1c,0x56,0xd4,0x96,0xf9,0xed,0x55,0xe4,0xb7,0x3e,0x94,0xc0,0xc7, +0x68,0x6a,0x16,0x8e,0xb5,0x5e,0x03,0xe9,0x50,0xbc,0x26,0x81,0x19,0x6d,0x0d,0x44, +0xd0,0xd6,0x93,0x42,0x6a,0x27,0x88,0xd0,0x33,0x2d,0xa1,0x15,0x13,0x43,0xd7,0xd2, +0xb4,0xda,0x2a,0x89,0xe1,0xfc,0x69,0x58,0x0c,0xb9,0x23,0xf6,0xa8,0x4c,0x7e,0xb5, +0xa7,0x24,0x39,0xeb,0xd2,0xab,0xb4,0x26,0x90,0xcc,0xe6,0x8c,0x76,0xae,0x17,0xe2, +0xe7,0xc2,0xbd,0x3b,0xe2,0xbf,0x84,0xe7,0xd2,0xae,0xc2,0xc5,0x76,0x99,0x92,0xce, +0xf3,0x6e,0x5a,0x09,0x31,0xc1,0xff,0x00,0x74,0xf4,0x23,0xd2,0xbd,0x19,0xa3,0xc5, +0x42,0xd1,0xd3,0x8c,0x9c,0x24,0xa5,0x1d,0xd0,0xda,0x4d,0x59,0x9f,0x95,0xfe,0x26, +0xf0,0xde,0xa1,0xe0,0xfd,0x7a,0xf3,0x47,0xd5,0x6d,0xda,0xda,0xfe,0xd2,0x43,0x1c, +0x91,0x9f,0xd0,0x83,0xdc,0x11,0xc8,0x3e,0xf5,0x99,0x5f,0x77,0xfe,0xd3,0x7f,0x03, +0x47,0xc4,0x8f,0x0f,0x9d,0x67,0x4a,0x80,0x1f,0x12,0x69,0xf1,0x92,0xaa,0xb8,0x06, +0xe6,0x21,0xc9,0x8c,0xfa,0xb0,0xea,0xbf,0x97,0x7a,0xf8,0x45,0x94,0xa3,0x15,0x60, +0x55,0x81,0xc1,0x07,0xa8,0x35,0xf5,0xd8,0x6c,0x42,0xc4,0x43,0x9b,0xaf,0x53,0xc8, +0xab,0x4d,0xd3,0x95,0xba,0x09,0x45,0x14,0x57,0x59,0x88,0x51,0x45,0x14,0x00,0x51, +0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51, +0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51, +0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51, +0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51, +0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51, +0x45,0x14,0x00,0x51,0x45,0x14,0x01,0xfa,0xfc,0xab,0x8a,0x7a,0xad,0x0a,0xbe,0xb5, +0x20,0x5a,0xf8,0x33,0xde,0x11,0x56,0x9d,0xb6,0x9c,0x07,0x7c,0x53,0xc2,0xd0,0x50, +0x8a,0xb4,0xf5,0x5a,0x72,0x25,0x48,0x17,0xd2,0x90,0x08,0xab,0xda,0xa4,0x09,0x4e, +0x55,0xa9,0x04,0x74,0x00,0xc5,0x5a,0x99,0x23,0xe9,0x4a,0xa9,0xd8,0xd4,0xca,0xb4, +0x08,0x60,0x4a,0x72,0xa1,0xfc,0x2a,0x55,0x41,0x52,0x2a,0xd3,0x11,0x1a,0xc7,0x52, +0x04,0xe6,0x9e,0xab,0xda,0xa4,0x58,0xe8,0x10,0xc5,0x8e,0xa4,0x58,0xe9,0xeb,0x1d, +0x4a,0xa9,0x45,0x80,0x89,0x63,0x34,0xef,0x2e,0xa5,0x11,0xd4,0x8b,0x1d,0x30,0x22, +0x58,0xcd,0x48,0xb1,0xd4,0xab,0x1d,0x48,0xb1,0xd3,0x42,0x22,0x11,0x71,0x52,0x2c, +0x35,0x34,0x71,0xd4,0xab,0x18,0xa6,0x22,0x28,0xe1,0xe6,0x8b,0xc8,0xd9,0x2c,0xe5, +0x28,0xeb,0x13,0xed,0x3b,0x5d,0xba,0x03,0x57,0x12,0x1c,0x1a,0xa3,0xe2,0x4b,0x69, +0xe6,0xd0,0xaf,0x16,0xd5,0x55,0xe7,0xf2,0xd8,0xa2,0x49,0xf7,0x5c,0xe3,0xa1,0xfa, +0xd3,0x03,0xf1,0x1f,0xf6,0xd8,0xf1,0xb5,0xd7,0x88,0x3e,0x34,0xeb,0x70,0x5c,0x5b, +0xc7,0x6b,0x71,0x6d,0x2f,0x97,0x22,0xae,0x73,0xb8,0x0c,0x12,0x0f,0xa1,0xfd,0x2b, +0xe7,0x7d,0xdb,0x4e,0x6b,0xd4,0xff,0x00,0x69,0x9b,0xe3,0xa9,0x7c,0x62,0xd7,0xa7, +0xf3,0x64,0x9d,0x4c,0xb8,0x56,0x98,0x7e,0xf3,0x03,0x8c,0x31,0xee,0x47,0x4c,0xd7, +0x95,0x56,0x6f,0x73,0xb5,0x3b,0x25,0x63,0x5f,0xfb,0x77,0x51,0xfb,0x45,0xa6,0xa4, +0xef,0xe6,0xb5,0xb0,0x10,0xc4,0xcc,0x38,0x18,0x1c,0x0c,0x56,0x86,0x8b,0xe3,0x8d, +0x42,0xc7,0xc5,0xb1,0xeb,0x84,0xb4,0xb2,0xaf,0xfa,0xc5,0x53,0xc1,0x4c,0x72,0x2b, +0x9d,0x86,0xe0,0x24,0x32,0x44,0xe9,0xbd,0x5b,0x95,0xe7,0x1b,0x5b,0xd6,0xad,0xe9, +0x5a,0xc1,0xd3,0x63,0xb8,0x4f,0x29,0x65,0xf3,0x57,0x6f,0xce,0xa0,0x81,0x56,0xa3, +0x16,0xb9,0x1b,0xb2,0x34,0x8d,0x47,0x1b,0x45,0x3b,0x2d,0xfe,0x67,0xd0,0x9e,0x16, +0xf8,0xb5,0x17,0x8a,0x14,0xc4,0x14,0xc3,0x28,0x1c,0x82,0x6b,0xa0,0x8f,0x58,0x74, +0x98,0x30,0x6c,0xf3,0x5e,0x3b,0xf0,0xf6,0x6d,0x1b,0x49,0xd2,0x62,0xd4,0x2e,0xee, +0x52,0x09,0x1d,0x8a,0x95,0xc1,0x62,0x5b,0x3d,0x00,0x02,0xbd,0x7b,0x5b,0xf0,0xee, +0xa1,0xa1,0xe8,0x96,0x7a,0xb5,0xd4,0x69,0x0d,0x95,0xdc,0x86,0x28,0x72,0xc0,0x3b, +0x30,0x19,0xfb,0xbd,0x7a,0x1a,0xf0,0x2a,0xc6,0x31,0x9d,0x91,0xf4,0x14,0x65,0x2a, +0x90,0xbb,0x3d,0xbf,0xe0,0xaf,0x8c,0xbf,0xb6,0xb5,0x7b,0x7d,0x02,0xf4,0x89,0x92, +0xe7,0xe5,0x4d,0xdc,0xe0,0xd7,0xd6,0xdf,0x0e,0x7f,0x66,0xbd,0x17,0xc1,0xb7,0xd3, +0xf8,0xcb,0xc4,0xc6,0x34,0xb4,0xb2,0x3e,0x6d,0xba,0xbe,0x02,0x93,0x8e,0x3f,0x5a, +0xf8,0x87,0xf6,0x60,0xb1,0x8a,0xf3,0xe2,0x25,0xb6,0xab,0x7b,0x71,0x1c,0x16,0x1a, +0x77,0xef,0x64,0x79,0x1b,0x1c,0x0a,0xfa,0xf3,0xe2,0x8f,0xed,0x09,0xa3,0x7c,0x63, +0xfb,0x27,0x87,0xb4,0x2b,0xbd,0x9a,0x3d,0xa9,0xdb,0x2a,0xcd,0xfb,0xbf,0xb4,0x30, +0xe9,0x8c,0xf6,0xc8,0xac,0x6d,0x14,0xdc,0x98,0x4b,0x9e,0x56,0x8c,0x7a,0xee,0x7d, +0x35,0xe0,0xff,0x00,0x1b,0x58,0x78,0xd3,0x4c,0xbd,0x82,0xd7,0x62,0x5c,0x40,0x03, +0x18,0x57,0xaa,0xae,0x78,0xab,0x66,0x1a,0xf8,0x87,0xf6,0x79,0xf8,0xb7,0x77,0xf0, +0xb7,0xe2,0xc6,0xb1,0x1f,0x8b,0x44,0xf0,0xad,0xea,0x6c,0x3b,0xc6,0x73,0xd9,0x31, +0xed,0x8c,0x57,0xdc,0x56,0x97,0x96,0xba,0xa5,0xbc,0x77,0x36,0xb2,0x09,0x21,0x91, +0x43,0xa9,0x1c,0xf0,0x6b,0xd6,0xc2,0xd5,0x4d,0x72,0xbd,0xcf,0x03,0x1b,0x87,0x70, +0x97,0x34,0x76,0x22,0xf2,0x29,0xad,0x0d,0x5d,0x68,0x7d,0x29,0x3c,0x93,0x5e,0x81, +0xe5,0x14,0x1a,0x1a,0x63,0x43,0x57,0xcc,0x3e,0xd4,0xc6,0x88,0x50,0x06,0x73,0x43, +0xdb,0xbd,0x42,0xf6,0xfe,0x95,0xa8,0xd0,0xd4,0x4f,0x0d,0x00,0x64,0xbc,0x1d,0x6a, +0x07,0xb7,0xe3,0xad,0x6b,0xbd,0xbe,0x6a,0xbb,0xdb,0xd0,0x06,0x43,0xdb,0xd4,0x12, +0x41,0x5a,0xd2,0x42,0x06,0x4d,0x41,0x24,0x34,0x14,0x64,0xb5,0xbd,0x57,0x92,0xde, +0xb5,0xde,0x1f,0x4a,0x81,0xe0,0xa4,0x33,0x1e,0x4b,0x7a,0x81,0xe1,0xad,0x86,0x80, +0x1a,0xaf,0x25,0xb8,0xa0,0x0c,0x77,0x87,0x9a,0x86,0x48,0xeb,0x5a,0x4b,0x7a,0xab, +0x24,0x1d,0x4d,0x30,0x33,0x1a,0x1e,0x2a,0x17,0x8a,0xb4,0x5e,0x1c,0x54,0x0d,0x1d, +0x00,0x67,0x49,0x0d,0x57,0x68,0xab,0x4d,0xa3,0x15,0x5d,0xe1,0xa8,0x2c,0xce,0x64, +0x22,0xbe,0x31,0xfd,0xae,0xbe,0x08,0xff,0x00,0xc2,0x3f,0x7e,0xde,0x35,0xd1,0xa0, +0xdb,0xa7,0x5d,0xbe,0x35,0x08,0x50,0x60,0x43,0x29,0xe9,0x20,0x1e,0x8d,0xdf,0xdf, +0xeb,0x5f,0x6b,0xc9,0x1d,0x66,0xeb,0x3a,0x2d,0xa6,0xbb,0xa5,0xdd,0x69,0xd7,0xf0, +0x2d,0xcd,0x9d,0xd4,0x6d,0x0c,0xd1,0x38,0xc8,0x65,0x23,0x04,0x57,0x46,0x1e,0xb4, +0xb0,0xf5,0x14,0x91,0x9d,0x4a,0x7e,0xd2,0x36,0x67,0xe5,0x15,0x15,0xde,0x7c,0x69, +0xf8,0x59,0x77,0xf0,0x97,0xc6,0xf7,0x5a,0x4c,0xbb,0xa4,0xb0,0x93,0x33,0x58,0xdc, +0x37,0xfc,0xb5,0x84,0x9e,0x3f,0x11,0xd0,0xfd,0x2b,0x83,0xaf,0xb1,0x8c,0x94,0xe2, +0xa5,0x1d,0x99,0xe3,0x49,0x38,0xbb,0x30,0xa2,0x8a,0x2a,0x84,0x14,0x51,0x45,0x00, +0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00, +0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00, +0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00, +0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00, +0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00, +0x14,0x51,0x45,0x00,0x7e,0xc2,0x85,0xa7,0x85,0xe2,0x85,0x5a,0x91,0x57,0x15,0xf0, +0x67,0xd0,0x08,0xab,0x9a,0x95,0x56,0x95,0x56,0xa4,0x55,0xa0,0x04,0x55,0xa9,0x15, +0x69,0x55,0x6a,0x45,0x53,0xc5,0x20,0x04,0x5c,0xf6,0xa9,0x55,0x73,0x4e,0x55,0x1f, +0x4a,0x78,0x5e,0xc2,0x81,0x08,0xab,0x52,0xaa,0xd2,0xaa,0xf1,0x52,0xaa,0xd3,0xb1, +0x22,0x2a,0xd3,0xc2,0xd3,0x95,0x73,0x52,0xa4,0x74,0xd2,0x01,0x89,0x1d,0x4a,0x13, +0xa5,0x39,0x56,0xa5,0x0b,0xf9,0xd5,0x58,0x57,0x18,0xab,0x52,0xaa,0x53,0xd5,0x2a, +0x45,0x4a,0x41,0x72,0x30,0x94,0xf5,0x8e,0xa4,0x58,0xea,0x65,0x8e,0x90,0x11,0x2a, +0x7b,0x54,0x8b,0x1d,0x4c,0x91,0xd4,0x89,0x15,0x50,0x11,0xac,0x5e,0xd5,0x2a,0xc7, +0x52,0xa2,0x54,0xab,0x1d,0x02,0x18,0xb1,0x8c,0xd6,0x67,0x8b,0xbc,0xd8,0xfc,0x37, +0x7e,0xd0,0x16,0x8e,0x51,0x11,0xda,0xea,0x32,0x54,0xe3,0xae,0x2b,0x6d,0x52,0x9b, +0x79,0x6c,0x6e,0x2d,0x5d,0x11,0xb6,0xb9,0x18,0x52,0x79,0x00,0xfb,0xd0,0x86,0xcf, +0xe7,0xcf,0xf6,0x95,0xb8,0x9e,0xf3,0xe2,0xe6,0xbd,0x3d,0xd4,0x6b,0x15,0xd3,0x4e, +0xc2,0x65,0x51,0x80,0xcc,0x0f,0x2d,0x8f,0x7e,0xb5,0xe5,0x75,0xf7,0x1f,0xfc,0x14, +0x7b,0xe0,0xdd,0xf7,0x87,0x7c,0x6d,0x2f,0x88,0xe4,0xd2,0x85,0xac,0x57,0x2c,0x01, +0xba,0xb7,0x61,0xe5,0x4c,0xc7,0x3d,0xba,0x83,0x81,0xe9,0x5f,0x0f,0x37,0x14,0x9a, +0x3a,0x62,0xee,0xae,0x33,0xa5,0x4d,0xf6,0xc6,0xf3,0xcc,0xa5,0x55,0x89,0x1b,0x48, +0x23,0x8e,0x98,0xa8,0x8d,0x5a,0xd3,0x7e,0xcd,0xe7,0x37,0xda,0x72,0x17,0x1c,0x7d, +0x6a,0x56,0xe6,0xb4,0xee,0xe4,0xa2,0x9d,0x8d,0xbf,0x04,0xeb,0x5a,0x76,0x8d,0xa9, +0x09,0x6f,0xa1,0x7b,0x88,0xd4,0x07,0x55,0x3f,0x74,0x38,0x39,0x1c,0x57,0xa8,0x1f, +0x10,0x5c,0x78,0xdf,0x51,0x4b,0xeb,0xf9,0x5d,0x82,0x80,0x90,0x42,0xae,0x76,0x42, +0xbe,0x80,0x7e,0xa6,0xbc,0x63,0x49,0xb7,0xb7,0xb9,0xd4,0x92,0x39,0x43,0xf9,0x24, +0xf6,0x3f,0x37,0xf2,0xe6,0xbe,0x89,0xf8,0x43,0xfb,0x3b,0xeb,0xba,0x95,0xf7,0x9f, +0xaa,0x5e,0x1d,0x2b,0x49,0x73,0xfb,0x95,0x65,0xcc,0xee,0xa7,0xd1,0x7f,0x87,0xf1, +0xaf,0x37,0x13,0xc9,0x19,0x5d,0xbb,0x33,0xd9,0xc2,0x4a,0xa3,0xa7,0x65,0xb5,0xce, +0x9f,0xc1,0xfa,0x84,0x7e,0x1f,0x60,0x56,0xe8,0xe5,0x86,0x0a,0x03,0xfc,0xeb,0xd6, +0x7c,0x33,0xe3,0x7f,0x0b,0xdd,0x30,0x8b,0x56,0xb2,0x8e,0x43,0xd0,0x49,0x01,0xda, +0xea,0x7f,0x0a,0xdc,0xd2,0xbf,0x63,0xdf,0x0e,0xde,0x69,0x72,0x3c,0x5e,0x20,0xd4, +0xed,0x27,0x61,0xcd,0xd7,0xc9,0x32,0xc7,0xc7,0x56,0x8f,0x68,0x62,0x3f,0xdd,0xaf, +0x31,0xf1,0xa7,0xc2,0x2f,0x13,0x7c,0x1b,0xb8,0x17,0x57,0x3a,0x7d,0x8f,0x8b,0x74, +0x3c,0x87,0x8b,0x50,0xb1,0xdc,0xa2,0x54,0xf5,0x25,0x48,0xc7,0xe2,0x05,0x73,0xd3, +0xc3,0x7d,0x61,0x5e,0x32,0x46,0xd2,0xc4,0x2a,0x6e,0xd2,0x47,0xd5,0x1a,0x3e,0x83, +0xe1,0x3f,0x8a,0x16,0x1a,0x7c,0x16,0xba,0xca,0xb5,0xd5,0xb2,0xec,0x51,0x74,0x71, +0x20,0x5f,0x4c,0x9e,0xb5,0xf4,0xbf,0xc3,0x59,0x8f,0x83,0xaf,0xa1,0xf0,0xdd,0xf2, +0xb4,0x96,0xad,0x6e,0x1e,0xca,0xf0,0xfc,0xc1,0x97,0x18,0x65,0xcf,0xa8,0x35,0xf1, +0x2f,0xc0,0x8d,0x3f,0xe1,0xbf,0xc5,0xa8,0x76,0xd8,0x5d,0x5d,0x78,0x7f,0x5b,0x80, +0x7e,0xfa,0xc2,0x5b,0x96,0x59,0x17,0xfd,0xa5,0x27,0xef,0x0a,0xfb,0x1f,0xe1,0x7f, +0x85,0x75,0x2f,0x0d,0xda,0xdb,0xd9,0x4b,0xac,0xff,0x00,0x6c,0x69,0x6b,0xcc,0x6b, +0x75,0x86,0x91,0x71,0xe8,0xc2,0xaf,0xea,0x95,0xe8,0xbb,0xd8,0xe4,0xa9,0x89,0xa5, +0x51,0x38,0xb6,0x7a,0xf4,0x96,0xe6,0x36,0xda,0x45,0x33,0xcb,0xf6,0xad,0x5f,0x2b, +0xed,0x56,0xb1,0xc8,0x9f,0x39,0x51,0x83,0x8f,0x4a,0xac,0xd0,0xfa,0x8a,0xf5,0xe3, +0x2b,0xad,0x4f,0x9f,0x94,0x6c,0xca,0x26,0x31,0x4c,0x68,0x45,0x5d,0x68,0x69,0x86, +0x23,0xe9,0x57,0x73,0x3e,0x52,0x8b,0x47,0xe9,0x4c,0x68,0xfd,0xaa,0xf7,0x96,0x36, +0xd3,0x1a,0x13,0xe9,0x4c,0x56,0x33,0xcc,0x35,0x0b,0x43,0xed,0x5a,0x4d,0x17,0xb5, +0x42,0xf1,0x9a,0x04,0x66,0x3c,0x3e,0xd5,0x03,0x41,0xed,0x5a,0xad,0x1e,0x6a,0x17, +0x84,0xf7,0x14,0x01,0x93,0x24,0x18,0xea,0x2a,0x06,0x82,0xb5,0x9e,0x1f,0x6a,0x85, +0xe1,0x14,0x01,0x90,0xf0,0xd5,0x79,0x21,0xad,0x79,0x21,0xe3,0xa5,0x57,0x92,0x1f, +0x97,0x81,0x48,0xa3,0x26,0x48,0x39,0xe9,0x55,0xa5,0xb7,0xeb,0xc5,0x6a,0x3c,0x6d, +0xbb,0x81,0x51,0xc9,0x0f,0xad,0x00,0x62,0xc9,0x6f,0xed,0x55,0x64,0x87,0xda,0xb6, +0xa4,0x87,0xb5,0x55,0x92,0x0a,0x2e,0x33,0x1d,0xe1,0xf6,0xa8,0x24,0x8f,0xaf,0x15, +0xab,0x24,0x3e,0xd5,0x56,0x48,0x68,0x03,0x2e,0x48,0xbd,0xb1,0x50,0x34,0x35,0xa7, +0x24,0x7f,0x9d,0x44,0xd1,0x52,0x2a,0xe7,0x8f,0xfe,0xd0,0x5f,0x07,0xe1,0xf8,0xb5, +0xe0,0x79,0xed,0x22,0x45,0x5d,0x6a,0xcf,0x33,0xe9,0xf3,0x11,0xce,0xf0,0x39,0x8f, +0x3e,0x8c,0x38,0xfa,0xe0,0xf6,0xaf,0xce,0x2b,0xab,0x69,0xac,0xae,0x65,0xb7,0xb8, +0x8d,0xa1,0x9e,0x17,0x31,0xc9,0x1b,0x8c,0x32,0xb0,0x38,0x20,0xfb,0xe6,0xbf,0x5d, +0xde,0x2c,0x57,0xc4,0xdf,0xb6,0x87,0xc1,0xbf,0xec,0x2d,0x5a,0x3f,0x1c,0x69,0x70, +0x6d,0xb1,0xbf,0x7f,0x2f,0x51,0x55,0xe9,0x1c,0xff,0x00,0xc2,0xf8,0xf4,0x61,0xc1, +0xf7,0x1e,0xf5,0xed,0x65,0xf8,0x8e,0x57,0xec,0xa5,0xb3,0xd8,0xe2,0xc4,0x53,0xba, +0xe7,0x47,0xcb,0xb4,0x51,0x45,0x7d,0x01,0xe7,0x85,0x14,0x51,0x40,0x05,0x14,0x51, +0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51, +0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51, +0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51, +0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51, +0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51, +0x40,0x1f,0xb1,0xa9,0x1d,0x4a,0x16,0x95,0x56,0xa4,0xdb,0xc5,0x7c,0x19,0xf4,0x03, +0x55,0x6a,0x45,0x5a,0x15,0x4f,0x15,0x2a,0xa5,0x31,0x08,0xa9,0x53,0x2a,0xd0,0xab, +0x53,0x22,0x7a,0x8a,0x56,0x24,0x15,0x6a,0x45,0x4a,0x72,0xa5,0x3d,0x56,0x9d,0x80, +0x45,0x5a,0x95,0x23,0xcd,0x2a,0x47,0xeb,0x53,0xaa,0xe2,0x98,0x86,0x2c,0x75,0x2a, +0xa5,0x39,0x56,0xa4,0x45,0x35,0x42,0x11,0x53,0x8a,0x91,0x63,0xa7,0x05,0xa9,0x15, +0x68,0x10,0x8a,0x99,0xa9,0xa3,0x8b,0xd6,0x9c,0xb1,0xfb,0x54,0xcb,0x1d,0x00,0x46, +0xb1,0xd4,0xcb,0x1d,0x39,0x52,0xa5,0x58,0xe8,0x18,0xc5,0x4a,0x95,0x52,0x9e,0x23, +0xc5,0x48,0xa9,0x48,0x63,0x56,0x3a,0x91,0x53,0x14,0xf5,0x5a,0x91,0x52,0x90,0xc6, +0xaa,0xd4,0x8a,0xbe,0xd4,0xaa,0xbe,0xd5,0x2c,0x69,0xce,0x68,0x03,0xca,0xff,0x00, +0x68,0x0f,0x80,0x3a,0x07,0xc7,0xaf,0x04,0x5d,0xe8,0x9a,0xc5,0xbf,0xef,0xca,0x93, +0x6d,0x74,0xa3,0x2f,0x14,0x98,0x20,0x11,0xf9,0xd7,0xe2,0x27,0xed,0x11,0xfb,0x30, +0x78,0xdb,0xf6,0x79,0xd7,0x3c,0x8f,0x12,0x69,0xb2,0x47,0x61,0x3b,0x91,0x6d,0x7a, +0xa7,0x72,0x48,0xb9,0xe3,0x91,0xd0,0xe0,0x74,0xaf,0xe8,0x55,0x57,0x1e,0xf5,0xc9, +0x7c,0x46,0xf8,0x4b,0xe1,0x8f,0x8b,0x1a,0x1c,0x9a,0x5f,0x89,0xf4,0x98,0x35,0x4b, +0x47,0x04,0x6d,0x98,0x7d,0xdc,0x8c,0x64,0x7a,0x1a,0x57,0xee,0x54,0x65,0x63,0xf9, +0xb4,0xab,0x7a,0x3e,0x8b,0x7b,0xe2,0x0d,0x4a,0x0b,0x0d,0x3a,0xda,0x4b,0xbb,0xb9, +0x9b,0x6a,0x47,0x18,0xc9,0x3f,0xfd,0x6a,0xfd,0x16,0xfd,0xab,0xff,0x00,0xe0,0x99, +0xda,0x37,0x80,0xb4,0x73,0xaf,0xf8,0x3b,0x59,0x8e,0xd6,0x36,0x99,0x51,0xac,0x75, +0x07,0x20,0x10,0x4f,0xf0,0x1e,0xe4,0x0e,0x71,0x5e,0x79,0xe0,0x4f,0x86,0xfa,0x57, +0xc2,0xdd,0x2b,0xc9,0xd3,0x62,0xfb,0x4e,0xa7,0x22,0xe2,0xe3,0x50,0x91,0x7e,0x67, +0xf6,0x1e,0x83,0xda,0xb8,0xf1,0x18,0x88,0xd1,0xd1,0x6a,0xcf,0x4f,0x0d,0x86,0x78, +0x8f,0x7b,0x68,0x9c,0xef,0xc2,0x9f,0x83,0x9a,0x57,0xc3,0x1b,0x38,0xf5,0x2d,0x5d, +0x62,0xbf,0xf1,0x0b,0x0d,0xdb,0xbe,0xf2,0x5b,0xff,0x00,0xb2,0xa0,0xf5,0x3e,0xf5, +0xea,0x5a,0x3f,0x8b,0xe3,0x37,0x05,0xdd,0xd7,0x68,0xf5,0xae,0x2b,0xc4,0x10,0xdf, +0xdc,0x2b,0x15,0xc9,0xf5,0xaf,0x3e,0xd6,0xf5,0xdb,0xbd,0x2d,0x4c,0x23,0x72,0x8e, +0xec,0x2b,0xc8,0x49,0xd4,0x7c,0xd3,0x77,0x67,0xb5,0xa5,0x35,0xcb,0x05,0x64,0x7d, +0x3f,0xa7,0xfc,0x68,0x5d,0x36,0x6f,0xf4,0x79,0x4f,0x1c,0x75,0xac,0x8d,0x4b,0xe2, +0xa5,0xdd,0x8e,0xa1,0x35,0xd5,0x9a,0x9b,0x9d,0x3e,0xe7,0x26,0xf3,0x4f,0xc8,0x2a, +0xf9,0x18,0x66,0x4c,0xfd,0xd6,0xf5,0x1d,0x0d,0x7c,0xe5,0xa2,0xeb,0xdb,0xe4,0xf3, +0x5e,0x46,0x2b,0xdf,0x1c,0xd7,0x61,0xa7,0x78,0xdb,0x4c,0x55,0x11,0xb1,0x6d,0xc3, +0x8c,0x9e,0x2b,0x68,0xc5,0xd3,0x7c,0xd1,0x32,0x76,0xa8,0xb9,0x64,0x8a,0xbf,0x11, +0x34,0x79,0x7c,0x2d,0xaa,0x59,0xf8,0xc7,0xc2,0x17,0x6e,0x9a,0x5b,0xc9,0xe6,0x5b, +0xdc,0x43,0x90,0xd6,0xd2,0x67,0x98,0xdc,0x76,0xe7,0xb1,0xaf,0xac,0x7f,0x66,0xaf, +0xda,0xaa,0xe3,0xc7,0x91,0xc5,0x63,0xaa,0x5b,0x43,0xf6,0xb4,0x40,0x93,0xcd,0x0b, +0xf9,0x4c,0xad,0xd0,0x13,0xd8,0x83,0xfc,0xeb,0xe6,0xdd,0x3f,0x5c,0xd3,0x6c,0xee, +0x26,0x60,0x56,0xe3,0x49,0xbe,0xc2,0x5f,0xd8,0xb7,0x2a,0xe0,0xf1,0xbc,0x7a,0x30, +0xae,0x53,0xc5,0xde,0x13,0x9b,0xe0,0xef,0x88,0x53,0x58,0xd3,0x27,0x92,0xe3,0xc3, +0x5a,0x80,0xf2,0xe4,0xf2,0xc9,0xdd,0x10,0x3c,0x80,0x4f,0xb7,0x04,0x1f,0x6a,0xfa, +0x3c,0x2e,0x22,0x35,0x97,0x2c,0xd1,0xe4,0xd6,0xa5,0xc8,0xec,0xcf,0xd7,0xff,0x00, +0x87,0x7f,0x14,0x2c,0x2e,0xae,0x20,0x84,0x5f,0x8d,0xf2,0x67,0x09,0x70,0x3c,0xb7, +0x24,0x70,0x47,0x3f,0x2b,0xfe,0x04,0x1f,0x6a,0xf6,0x03,0x6b,0x1d,0xec,0x6b,0x34, +0x5d,0x58,0x67,0x8e,0x86,0xbf,0x1c,0x7e,0x13,0xfe,0xd4,0x17,0x5e,0x16,0xb2,0x8f, +0x4a,0xd6,0x22,0x8f,0x5b,0xb5,0x8c,0xe0,0xb4,0xc4,0x93,0x2a,0x93,0x90,0xc4,0xfa, +0x8a,0xfb,0x13,0xe1,0x1f,0xed,0x39,0x6d,0x75,0x24,0x6f,0xa4,0x6b,0x4b,0x1c,0x52, +0x75,0xd2,0x35,0x03,0x95,0x4f,0xf7,0x1f,0x3d,0x2b,0xa2,0x78,0x55,0x2d,0x69,0x33, +0x91,0xc4,0xfa,0xce,0xda,0xfa,0xd2,0xf9,0xe6,0x8e,0x19,0x95,0xa4,0x85,0xca,0x49, +0x1f,0x46,0x46,0xf4,0x22,0xa4,0x2a,0x3b,0x57,0x8f,0xfc,0x44,0xd6,0x34,0xaf,0x89, +0xde,0x11,0xba,0x9e,0xdf,0xed,0x1a,0x3f,0x88,0x61,0x84,0xb4,0x33,0x59,0xc9,0xcc, +0x98,0xe7,0x6a,0xb8,0x3c,0x9f,0x4c,0xf7,0xaa,0x1f,0x03,0xfe,0x2c,0x6b,0x77,0x9a, +0x24,0x1a,0x7f,0x8b,0xa3,0x6b,0xa9,0x90,0x11,0x06,0xb0,0x88,0x50,0x5c,0xc6,0x0e, +0x3e,0x75,0x3f,0x76,0x41,0xdc,0x56,0x1e,0xc6,0x56,0xbd,0xb5,0x46,0x4e,0x0e,0xd7, +0x47,0xb6,0x98,0xfd,0xaa,0x36,0x86,0xac,0x5b,0xcd,0x15,0xe4,0x2b,0x24,0x4e,0xb2, +0x46,0xc3,0x21,0x94,0xd2,0x98,0xeb,0x03,0x32,0x93,0x46,0x41,0xe4,0x53,0x1a,0x31, +0x8a,0xba,0xd1,0xfa,0x8a,0x89,0xa1,0xa7,0x71,0x58,0xa2,0xf0,0xf5,0xe2,0xa0,0x68, +0xc8,0xed,0x5a,0x0c,0xa3,0x27,0x22,0xa3,0x68,0xb8,0xaa,0x22,0xc6,0x7b,0x47,0x50, +0x34,0x35,0xa3,0x24,0x35,0x0b,0x47,0x8a,0x62,0x33,0x9a,0x1a,0x81,0xe1,0x1e,0x95, +0xa6,0xf1,0x03,0xda,0xa1,0x68,0x68,0x03,0x2e,0x48,0x6a,0xac,0x96,0xfd,0x7b,0xd6, +0xc4,0x90,0x8f,0x4a,0xab,0x24,0x14,0x80,0xc8,0x92,0x1f,0x6a,0xaf,0x24,0x35,0xaf, +0x24,0x23,0xd2,0xaa,0xc9,0x0f,0xb5,0x21,0xdc,0xc8,0x96,0x1f,0x6a,0xa7,0x25,0xb9, +0xc7,0x4c,0x56,0xd4,0x90,0x8f,0xc6,0xaa,0xcb,0x0f,0xb5,0x22,0x8c,0x59,0x21,0xa8, +0x1e,0x1f,0x41,0x5a,0xb2,0xc3,0x55,0x9e,0x2c,0x53,0x03,0x39,0xa3,0xac,0x2f,0x17, +0xf8,0x4e,0xc7,0xc6,0x9e,0x1b,0xd4,0x74,0x4d,0x4a,0x21,0x2d,0x95,0xf4,0x2d,0x0c, +0x80,0x8c,0xe3,0x23,0x86,0x1e,0xe0,0xe0,0x8f,0xa5,0x75,0x0d,0x0f,0xad,0x40,0xf1, +0x55,0x27,0x67,0x74,0x23,0xf2,0x5b,0xe2,0x17,0x82,0x6f,0xbe,0x1c,0xf8,0xcb,0x54, +0xf0,0xf6,0xa0,0x3f,0xd2,0x2c,0xa5,0x28,0x24,0xc6,0x04,0x88,0x79,0x47,0x1e,0xc5, +0x48,0x3f,0x8d,0x73,0xd5,0xf7,0x3f,0xed,0xb9,0xf0,0x8f,0xfe,0x12,0x1f,0x0b,0x41, +0xe3,0x3d,0x3e,0x16,0x6d,0x43,0x48,0x5f,0x2a,0xed,0x50,0x64,0xbd,0xb1,0x3f,0x78, +0xff,0x00,0xba,0xc7,0xf2,0x63,0x5f,0x0c,0x57,0xd6,0xe1,0xab,0x7b,0x7a,0x6a,0x5d, +0x7a,0x9e,0x55,0x48,0x72,0x4a,0xc1,0x45,0x2a,0xa9,0x6e,0x00,0x24,0xfb,0x55,0xa8, +0xb4,0x9b,0xb9,0x86,0x56,0x07,0xc7,0xa9,0x18,0x15,0xd6,0x6f,0x87,0xc1,0xe2,0x71, +0x6f,0x97,0x0f,0x4a,0x53,0x7e,0x49,0xbf,0xc8,0xa9,0x45,0x69,0xaf,0x87,0x6f,0x1b, +0x92,0x11,0x7e,0xac,0x29,0xdf,0xf0,0x8d,0xdd,0x7f,0x7a,0x3f,0xfb,0xea,0x9f,0x2b, +0x3d,0xe8,0xf0,0xa6,0x79,0x35,0x75,0x84,0x9f,0xdd,0x6f,0xcc,0xca,0xa2,0xb5,0x1b, +0xc3,0x77,0x63,0xa7,0x96,0xdf,0xf0,0x31,0x50,0x49,0xa3,0xde,0x46,0x09,0x30,0x31, +0x1e,0xab,0xcd,0x16,0x67,0x3d,0x7e,0x1d,0xce,0x30,0xea,0xf5,0x70,0x93,0x4b,0xfc, +0x2f,0xf4,0x29,0x51,0x4e,0x78,0xda,0x33,0x86,0x52,0xa7,0xdc,0x53,0x6a,0x4f,0x9f, +0x94,0x65,0x07,0xcb,0x25,0x66,0x14,0x51,0x45,0x04,0x85,0x14,0x51,0x40,0x05,0x14, +0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14, +0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14, +0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14, +0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x1f,0xb2, +0xe0,0x53,0xc2,0xd2,0xaa,0xd3,0xd5,0x4d,0x7c,0x19,0xef,0x5c,0x15,0x79,0xa9,0x55, +0x68,0x45,0xa9,0x94,0x55,0x08,0x15,0x7d,0xaa,0x65,0x5a,0x45,0x5f,0xca,0xa4,0x0b, +0x40,0x81,0x79,0xa9,0x91,0x7d,0xa8,0x48,0xea,0x65,0x5a,0x60,0x2a,0xad,0x48,0xab, +0xd2,0x85,0x5a,0x95,0x57,0xa5,0x31,0x02,0xa7,0x4a,0x95,0x54,0xfa,0x52,0xaa,0xe6, +0xa6,0x48,0xe8,0x10,0xc5,0x8c,0x9a,0x99,0x63,0xf6,0xa7,0x2a,0xd4,0xca,0x86,0x80, +0x1a,0xab,0xcd,0x4a,0xab,0x4a,0xb1,0x9d,0xd5,0x3a,0xc7,0x9a,0x04,0x31,0x52,0xa5, +0x58,0xcf,0xa5,0x3d,0x52,0x9e,0x17,0xa5,0x26,0x5a,0x1a,0x17,0xda,0xa5,0x55,0xa7, +0x2c,0x75,0x22,0xa5,0x21,0x8c,0x54,0xa9,0x55,0x33,0x4f,0x58,0xea,0x55,0x5e,0x94, +0x80,0x6a,0xc7,0xf8,0xd4,0x8a,0x95,0x4e,0xfb,0x57,0xd3,0xf4,0xa5,0x67,0xbd,0xd4, +0x2d,0x6c,0xd4,0x75,0x37,0x13,0xa2,0x63,0xf3,0x35,0xe4,0xfe,0x3c,0xfd,0xac,0x3c, +0x0b,0xe0,0xb8,0xa6,0x8e,0xde,0xf4,0xeb,0x97,0xe9,0xc0,0x86,0xc8,0x82,0x99,0xf7, +0x7e,0x98,0xfa,0x66,0xb3,0x94,0xe3,0x15,0x79,0x33,0x48,0x53,0x9d,0x47,0x68,0xab, +0x9e,0xca,0x48,0x8d,0x77,0x12,0x00,0x1c,0x92,0x7a,0x0a,0xf3,0x6f,0x1d,0x7e,0xd0, +0xde,0x0b,0xf0,0x0b,0xc9,0x05,0xde,0xa4,0xb7,0xd7,0xca,0x3f,0xe3,0xd2,0xc7,0x12, +0xb7,0xe2,0x73,0x81,0xf9,0xd7,0xc5,0xdf,0x15,0xbf,0x6a,0xdf,0x14,0x78,0xf0,0xcb, +0x0f,0xda,0xce,0x95,0xa5,0xb7,0x0b,0x65,0x68,0xc5,0x41,0x1f,0xed,0x37,0x56,0xaf, +0x27,0xb4,0xd6,0x25,0xbc,0x04,0x9e,0x43,0x1e,0xb5,0xc1,0x3c,0x53,0x7a,0x41,0x1e, +0xad,0x3c,0x02,0x5a,0xd5,0x7f,0x24,0x7b,0x47,0xc6,0xef,0x8c,0x17,0x5f,0x17,0xf5, +0xc8,0xae,0x0c,0x4d,0x63,0xa5,0x5a,0x8d,0xb6,0xf6,0x65,0xf7,0x10,0x4f,0x57,0x27, +0xd4,0xd7,0x95,0xde,0x34,0x56,0xca,0x58,0xed,0x15,0x5e,0x6d,0x65,0x2c,0xe1,0x22, +0x66,0xe0,0x74,0xaf,0x36,0xf1,0x97,0x8f,0x42,0xef,0x8a,0x16,0xc9,0xe9,0xc5,0x70, +0xb8,0xb9,0xc9,0xca,0x5b,0x9e,0xac,0x5a,0x84,0x54,0x20,0xb4,0x46,0xa7,0x89,0x7c, +0x71,0x6d,0x62,0x1d,0x40,0x07,0x8c,0x71,0x5e,0x45,0xaf,0x78,0x89,0xb5,0x07,0x70, +0x91,0x8e,0x7d,0xaa,0xa5,0xf5,0xf4,0xd7,0x93,0x64,0xe5,0x8b,0x54,0x0d,0x68,0xec, +0xad,0xd8,0xd6,0x96,0x51,0x27,0x7d,0xcc,0xdb,0x11,0x26,0x9b,0x75,0xe7,0xac,0xe2, +0x25,0x3c,0xb2,0xd6,0xc4,0x9a,0xd5,0x85,0xc3,0x7c,0xce,0x03,0x1e,0xea,0x2b,0x9a, +0xd4,0xad,0xfc,0xb7,0x23,0x73,0x31,0xef,0x59,0x6d,0x04,0x9b,0x8b,0x20,0xe2,0xb6, +0xb5,0xc9,0xd8,0xef,0x21,0xb8,0x18,0x1e,0x45,0xc8,0x7f,0xf6,0x49,0xaf,0x60,0xd1, +0xb5,0x58,0xfc,0x49,0xe0,0x13,0xa6,0xea,0x29,0xe6,0xa4,0x90,0x18,0xdb,0x77,0x62, +0x38,0x06,0xbe,0x71,0xd3,0xda,0x46,0xc0,0xe4,0x1c,0xf3,0x5e,0xcd,0xe0,0x1f,0x35, +0x7c,0x3a,0xe5,0xb3,0x82,0xcd,0xb7,0x3e,0x98,0x15,0xbd,0x1b,0xc6,0x67,0x26,0x21, +0x29,0x42,0xe7,0x96,0x5c,0xac,0xde,0x1b,0xd4,0xa4,0xb0,0x99,0x8e,0x11,0xbf,0x76, +0xde,0xab,0xed,0x5d,0x8f,0x84,0x3c,0x51,0x3d,0xa6,0xa1,0x6d,0xe5,0x4e,0xe9,0xb5, +0x87,0x43,0x81,0x5a,0x3e,0x3b,0xf0,0x88,0xd7,0x34,0xb5,0x9e,0x01,0xfe,0x95,0x00, +0xca,0x1e,0xec,0x3d,0x2b,0xcd,0xec,0xee,0x8e,0x9d,0x6e,0xd2,0x3e,0x51,0x91,0xb6, +0xe1,0xbb,0x1a,0xf7,0xa9,0xd4,0xe6,0x57,0x38,0x6d,0x73,0xf4,0xa7,0xc2,0x1e,0x22, +0xb9,0xb9,0xf8,0x7b,0x0d,0xdd,0xa3,0x48,0xe1,0x55,0x55,0xcf,0x39,0x0d,0x8e,0x2b, +0xd0,0x7c,0x2d,0xe3,0x0b,0x8f,0x0f,0xf8,0x5d,0x35,0x6d,0x66,0xe9,0xde,0xc1,0xe5, +0x58,0x8f,0x9e,0xdc,0x6f,0x3c,0x0c,0x13,0xde,0xbc,0x2b,0xf6,0x1d,0xf8,0x8b,0x65, +0xe3,0x3d,0x36,0x7d,0x0a,0xed,0xd7,0x39,0xda,0xd1,0x93,0xdb,0x18,0xcd,0x6f,0xfe, +0xdd,0xfa,0x94,0x9e,0x07,0xf8,0x73,0xa4,0x69,0x76,0x83,0xca,0xb7,0x9b,0x53,0x56, +0x40,0xbc,0x00,0x14,0x67,0x15,0xe9,0xca,0xa4,0x5a,0xb3,0x46,0x76,0xe8,0x7d,0x8f, +0xe1,0x5d,0x69,0xa0,0x82,0x3b,0x9b,0x39,0x7c,0xeb,0x76,0xfb,0xf1,0x93,0xfd,0x2b, +0xd1,0xec,0x6f,0x22,0xd4,0x2d,0xc4,0xb1,0x9e,0x3b,0x83,0xd4,0x57,0xc5,0x9f,0x04, +0xfe,0x31,0x37,0xf6,0xd7,0x83,0xb4,0xfb,0x83,0x98,0x75,0xbd,0x21,0x66,0xe4,0xff, +0x00,0x1a,0x92,0xa7,0xff,0x00,0x41,0x15,0xf5,0xae,0x91,0x37,0xd9,0x8a,0x4b,0x19, +0xcc,0x6e,0x01,0xfa,0x8a,0xf2,0xf1,0x14,0xf9,0x59,0x8c,0xa3,0x7d,0x4e,0x91,0x90, +0xfa,0x54,0x6d,0x1f,0x7a,0xb5,0x18,0x59,0x10,0x32,0xb7,0x07,0x91,0x4d,0x64,0xf6, +0xae,0x13,0x02,0x8b,0x47,0x51,0xba,0x1a,0xb7,0x24,0x79,0xa8,0xda,0x3e,0x69,0x81, +0x4c,0xad,0x46,0xd1,0xff,0x00,0x9c,0x55,0xb6,0x4e,0xb5,0x1b,0x21,0xfa,0xd5,0x5c, +0x97,0x12,0x93,0x47,0xe9,0x50,0xb4,0x78,0xea,0x2b,0x41,0x93,0x35,0x13,0x43,0x9e, +0x3a,0xd3,0x20,0xcf,0x78,0xbd,0x2a,0x09,0x23,0x39,0x35,0xa0,0xf1,0x1a,0x85,0xa3, +0xcd,0x30,0x33,0x24,0x87,0xda,0xab,0x49,0x0d,0x6b,0x49,0x17,0x15,0x5e,0x48,0xa9, +0x01,0x8d,0x24,0x35,0x56,0x48,0x4f,0x3c,0x56,0xc4,0xb0,0xf5,0xe2,0xaa,0x4b,0x0d, +0x22,0x93,0x32,0x24,0x8f,0xda,0xaa,0x4b,0x17,0xb5,0x6b,0x49,0x0d,0x57,0x92,0x1a, +0x06,0x64,0x49,0x1f,0x71,0x51,0x14,0x0d,0x49,0xe2,0x8d,0x7b,0x4c,0xf0,0x96,0x93, +0x71,0xa9,0xea,0xf7,0xb0,0xd8,0x58,0xc2,0x32,0xf3,0x4c,0xd8,0x1f,0x41,0xea,0x7d, +0x85,0x7c,0x69,0xf1,0x87,0xf6,0xb9,0xd4,0xfc,0x45,0x24,0xfa,0x6f,0x84,0x7c,0xcd, +0x27,0x4d,0xc9,0x56,0xbd,0x3c,0x4f,0x30,0xf5,0x1f,0xdc,0x1f,0xad,0x75,0xd0,0xc3, +0x54,0xc4,0x3b,0x41,0x69,0xdc,0xfa,0x4c,0x9b,0x87,0xf1,0xd9,0xe5,0x4e,0x5c,0x34, +0x6d,0x15,0xbc,0x9e,0xcb,0xfc,0xdf,0x92,0x3e,0x84,0xf8,0xa5,0xf1,0x63,0xc1,0x9e, +0x0a,0xd3,0x6e,0xec,0x75,0xeb,0xc8,0xee,0xe4,0x9e,0x26,0x89,0xf4,0xd8,0x31,0x24, +0x92,0x2b,0x02,0x08,0x20,0x7d,0xd0,0x47,0xae,0x2b,0xf3,0x82,0xf3,0xc3,0xda,0x62, +0xea,0x77,0x4f,0x69,0xe7,0x1b,0x13,0x2b,0x1b,0x78,0xe6,0x23,0x72,0xc7,0x93,0xb4, +0x31,0x1d,0x4e,0x31,0x9a,0xd1,0xb8,0xb9,0x96,0xee,0x67,0x9a,0x79,0x1a,0x59,0x5c, +0xee,0x67,0x72,0x49,0x27,0xd4,0x9a,0x8a,0xbe,0xa3,0x0d,0x84,0x8e,0x19,0x68,0xee, +0xd9,0xfb,0xa6,0x57,0xc0,0x99,0x56,0x05,0x29,0xe2,0x63,0xed,0xa6,0xba,0xcb,0x6f, +0x94,0x76,0xfb,0xee,0x32,0x1b,0x78,0xad,0xc6,0x22,0x8d,0x63,0xff,0x00,0x74,0x54, +0x99,0xcf,0x5a,0x4a,0x2b,0xb8,0xfd,0x0e,0x9d,0x3a,0x74,0x62,0xa1,0x4a,0x2a,0x29, +0x74,0x4a,0xc8,0x28,0xa2,0x8a,0x0d,0x02,0x8a,0x28,0xa0,0x04,0x91,0x16,0x65,0xc4, +0x8a,0xae,0x3f,0xda,0x19,0xac,0xfb,0x9d,0x02,0xd6,0x7c,0x94,0x06,0x16,0xff,0x00, +0x67,0x91,0xf9,0x56,0x8d,0x14,0x6f,0xb9,0xe4,0xe3,0xf2,0x9c,0x06,0x67,0x1e,0x5c, +0x65,0x18,0xcf,0xd5,0x6b,0xf2,0x7b,0xaf,0x93,0x39,0x6b,0xad,0x06,0xea,0x06,0x01, +0x10,0xce,0x09,0xc0,0xf2,0xc6,0x49,0x27,0xb6,0x2b,0xee,0x0f,0xd9,0x47,0xfe,0x09, +0xbf,0x77,0xe3,0x4b,0x3b,0x4f,0x14,0xfc,0x4e,0xfb,0x46,0x95,0xa4,0xca,0x04,0x96, +0xda,0x1c,0x79,0x8e,0xe2,0x75,0xea,0x1a,0x53,0xd6,0x35,0x3f,0xdd,0xea,0x7d,0xab, +0xd4,0x3f,0x61,0xbf,0xd8,0xee,0x3b,0x3b,0x7b,0x2f,0x88,0xbe,0x37,0xb1,0x0f,0x73, +0x20,0x13,0x69,0x1a,0x5d,0xc2,0xf1,0x1a,0xf5,0x13,0xc8,0xa7,0xb9,0xfe,0x10,0x7e, +0xbe,0x95,0xf7,0x7d,0x7c,0xbe,0x3f,0x30,0xe5,0x93,0xa5,0x41,0xfa,0xbf,0xf2,0x3f, +0x96,0xf8,0x83,0x2c,0xca,0xb0,0x79,0x84,0xa9,0x65,0xb2,0x72,0x8a,0xde,0xfa,0xa4, +0xfb,0x27,0xbb,0x4b,0xcf,0xef,0x67,0x03,0xe1,0xdf,0x80,0x5f,0x0d,0xfc,0x2b,0xa4, +0xc7,0xa6,0xe9,0xbe,0x07,0xd0,0xa1,0xb3,0x41,0x80,0xaf,0x61,0x1c,0x8d,0xf8,0xb3, +0x02,0x4f,0xe7,0x5f,0x09,0xff,0x00,0xc1,0x42,0x3f,0x63,0x1d,0x17,0xc1,0x9a,0x03, +0x7c,0x49,0xf0,0x1e,0x9a,0xba,0x6d,0x94,0x32,0x04,0xd6,0x34,0xcb,0x70,0x7c,0xa8, +0xc3,0x10,0x16,0x74,0x1f,0xc2,0x37,0x10,0x18,0x74,0xe4,0x11,0x5f,0xa5,0x55,0xcd, +0x7c,0x4a,0xf0,0xa4,0x1e,0x3a,0xf8,0x7b,0xe2,0x4f,0x0f,0x5c,0x44,0xb3,0x45,0xa9, +0x69,0xf3,0xdb,0x6d,0x65,0xdd,0xf3,0x32,0x10,0xa7,0x1e,0xa0,0xe0,0x8f,0x71,0x5e, +0x36,0x1f,0x13,0x52,0x8d,0x55,0x3b,0xfa,0x9f,0x3d,0x52,0x94,0x67,0x17,0x1b,0x1f, +0xcf,0xa5,0x15,0x35,0xf5,0xb1,0xb2,0xbd,0xb8,0xb7,0x27,0x26,0x19,0x1a,0x33,0xf8, +0x1c,0x54,0x35,0xf7,0x27,0x80,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51, +0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51, +0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51, +0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51,0x45,0x00,0x14,0x51, +0x45,0x00,0x7e,0xcf,0x2a,0xd4,0xca,0xa3,0xf1,0xa6,0x2a,0xfa,0xd4,0xaa,0xb5,0xf0, +0x87,0xba,0x3d,0x57,0x3e,0xd4,0xf0,0xb4,0x22,0xd4,0x8a,0x3d,0xa9,0x88,0x55,0x5e, +0xd5,0x34,0x6b,0xde,0x98,0xa3,0x35,0x3a,0xae,0x31,0x4c,0x07,0x2a,0xd4,0xaa,0x29, +0xaa,0xb5,0x32,0xad,0x31,0x0a,0x8b,0xd2,0xa6,0x51,0x48,0x8b,0x53,0xa2,0x7e,0x34, +0x08,0x11,0x7b,0xd4,0xea,0xbc,0xd0,0x8a,0x2a,0x65,0x5a,0x04,0x22,0xad,0x4a,0x8b, +0x42,0xaf,0xb5,0x4c,0xab,0x40,0x81,0x52,0xa5,0x55,0xa0,0x2d,0x48,0xab,0x9a,0x0a, +0x15,0x56,0xa4,0x55,0xa1,0x56,0xa6,0x55,0xa9,0x2c,0x6a,0xa5,0x4a,0x8b,0xdb,0xa1, +0xaa,0xfa,0x8e,0xa5,0x67,0xa2,0xd8,0xcd,0x79,0x7d,0x71,0x1d,0xa5,0xa4,0x2a,0x5e, +0x49,0xa6,0x60,0xaa,0xa0,0x77,0xc9,0xaf,0x8d,0xbe,0x38,0x7e,0xd8,0x57,0x9a,0xa4, +0xd7,0x3a,0x57,0x84,0x66,0x3a,0x76,0x9a,0xa4,0xa3,0x5f,0x8f,0xf5,0xd3,0x7b,0xaf, +0xf7,0x57,0xf5,0xac,0x2a,0x55,0x8d,0x35,0x79,0x1d,0x14,0x68,0x4e,0xb3,0xb4,0x4f, +0xa0,0xfe,0x2d,0x7e,0xd0,0x7e,0x18,0xf8,0x4f,0x6e,0xd1,0x4d,0x32,0xea,0x7a,0xc1, +0x1f,0xbb,0xd3,0xed,0xdc,0x16,0x1e,0xee,0x7f,0x84,0x7d,0x79,0xaf,0x94,0x3c,0x59, +0xfb,0x55,0x78,0xdb,0xc6,0x57,0x2c,0x90,0xdf,0x9d,0x1e,0xc5,0x8e,0x05,0xbd,0x8f, +0xca,0x71,0xee,0xdd,0x4d,0x78,0x4d,0xe6,0xb9,0x26,0xa5,0x72,0xf2,0xcd,0x23,0x4d, +0x24,0x8d,0xb9,0xa4,0x91,0xb2,0xcc,0x7d,0x49,0x3d,0x6a,0xca,0xea,0x49,0x69,0x6e, +0x1b,0x8f,0x7c,0x57,0x97,0x3a,0xf5,0x2a,0x79,0x23,0xdb,0xa5,0x85,0xa5,0x49,0x6b, +0xab,0x3a,0x5f,0x14,0x5d,0x6a,0x5a,0xc5,0xb9,0x9a,0x4b,0xc9,0xae,0xa5,0x63,0xcb, +0x4b,0x21,0x63,0xfa,0x9a,0xe4,0xbf,0xe1,0x1d,0xd4,0x2e,0x39,0x69,0x42,0xc6,0xa3, +0x3b,0x89,0xe5,0xaa,0x7b,0xab,0xa7,0xba,0xb7,0x32,0xac,0xcf,0x08,0x03,0x82,0xad, +0x58,0x3e,0x19,0xd7,0x2f,0x0d,0xec,0xab,0x35,0xdc,0x8d,0x02,0x9e,0x03,0x73,0x9a, +0xc9,0x45,0x9d,0x3c,0xcb,0xa1,0x66,0xfb,0xc3,0xb7,0x70,0x9d,0xd2,0x82,0x13,0xb5, +0x57,0x1a,0x8a,0xe8,0xf1,0x32,0xb6,0x33,0x5d,0xec,0x3a,0x6e,0xbf,0xe3,0xdb,0xeb, +0x7d,0x23,0xc3,0x5a,0x4d,0xc6,0xb1,0x7f,0x20,0x0a,0x16,0xd6,0x32,0xc1,0x7d,0xd8, +0xf4,0x51,0xee,0x6b,0xd8,0x7c,0x1f,0xff,0x00,0x04,0xe2,0xf1,0x37,0x88,0x1a,0x3b, +0x9f,0x18,0x78,0x8e,0xdb,0x47,0x46,0xe5,0xed,0x2c,0x53,0xcf,0x90,0x7b,0x6e,0xce, +0xd0,0x7f,0x3a,0xda,0x34,0xe4,0xf6,0x33,0x9d,0x48,0x43,0xe2,0x76,0x3e,0x30,0xd7, +0xfc,0x4d,0x35,0xf4,0x86,0x28,0x8b,0x11,0x9e,0x82,0xb3,0xb4,0x9f,0x00,0x6b,0xfe, +0x2c,0xba,0x58,0x34,0xdd,0x2a,0xf3,0x50,0xb9,0x94,0xe1,0x63,0xb6,0x81,0xa4,0x6e, +0x7d,0x80,0xaf,0xd6,0xff,0x00,0x87,0x7f,0xb1,0x0f,0xc2,0xaf,0x00,0xc4,0xac,0x74, +0x31,0xae,0xde,0x77,0xb9,0xd5,0x1b,0xcc,0x3f,0x80,0x18,0x02,0xbd,0xa3,0x43,0xf0, +0x8e,0x8b,0xe1,0x98,0x44,0x3a,0x46,0x95,0x67,0xa6,0xc6,0x3f,0x86,0xd6,0x05,0x8f, +0x3f,0x52,0x06,0x4d,0x74,0x2a,0x2f,0xa9,0xc5,0x2c,0x64,0x57,0xc2,0xae,0x7e,0x6e, +0x7c,0x0d,0xff,0x00,0x82,0x68,0xf8,0x87,0xc4,0x6b,0x0e,0xa1,0xe3,0x8b,0xaf,0xf8, +0x47,0x2c,0x9b,0x0d,0xf6,0x38,0xc0,0x7b,0xa7,0x1e,0x9e,0x89,0xf8,0xf3,0x53,0xfe, +0xd2,0x9f,0xb1,0xb6,0x8d,0xf0,0xab,0x52,0x12,0xe8,0x50,0x33,0x68,0x97,0x91,0x03, +0x0f,0x9c,0x4b,0xbc,0x12,0xa8,0xc3,0x06,0x6e,0xe0,0xf5,0xf6,0xaf,0xd3,0x35,0x8f, +0xd4,0xd7,0x13,0xf1,0x83,0xe1,0xdc,0x5f,0x12,0x3c,0x19,0x79,0xa6,0x64,0x25,0xe2, +0xa9,0x96,0xd6,0x46,0xfe,0x19,0x00,0xe3,0xf0,0x3d,0x2a,0xe5,0x4a,0x3c,0xba,0x23, +0x9e,0x38,0xa9,0xb9,0xa6,0xde,0x87,0xe1,0xa7,0x8c,0x7c,0x26,0xba,0x75,0xeb,0xdb, +0x4d,0x1f,0xd9,0xe7,0xc6,0xe5,0x07,0xee,0xb0,0xf5,0x53,0xde,0xb8,0xf7,0xd1,0xfc, +0x96,0x20,0xae,0x45,0x7d,0x5f,0xf1,0x1f,0xe1,0xd8,0x9b,0x58,0xb9,0xd2,0x75,0x5b, +0x2d,0x97,0xd6,0x92,0x32,0x1b,0x79,0x41,0x47,0x46,0xf6,0xae,0x0a,0xdb,0xe1,0xc6, +0x95,0x6b,0x71,0xb2,0x7b,0x62,0x0e,0x7e,0xec,0x8e,0x4e,0x3f,0x0a,0xe2,0x8c,0x5a, +0xd9,0x9e,0xbb,0xa9,0x16,0xb5,0x47,0x8d,0x68,0x5e,0x18,0x93,0x58,0xbf,0x48,0x2d, +0xd7,0xa9,0xf9,0x9b,0x1c,0x28,0xf5,0x35,0xec,0xd6,0x5a,0x4c,0x3a,0x7e,0x9f,0x05, +0xa2,0x7c,0xa1,0x46,0xde,0x7a,0xfd,0x6a,0xec,0x56,0x96,0x3a,0x7c,0xcf,0x6f,0x61, +0x0c,0x69,0x28,0x1c,0x7c,0xbb,0x57,0x8f,0xe7,0x49,0x6f,0x6d,0x1c,0x71,0xa4,0xb7, +0x73,0xef,0x90,0xb1,0xdd,0xb4,0x75,0x6f,0x40,0x2b,0xd0,0xa7,0x1e,0x55,0x77,0xb9, +0xe6,0xd5,0x93,0x93,0xb7,0x42,0x39,0xec,0xf7,0x43,0xe5,0xc4,0x9b,0x8f,0x4c,0x81, +0x9a,0xf2,0x0f,0x8a,0xde,0x03,0x92,0xd6,0x33,0x76,0xaf,0xe5,0x09,0x1b,0x73,0x0f, +0x46,0xf5,0xaf,0x70,0xbc,0xb9,0x5b,0x1b,0x33,0x20,0x4f,0x27,0x23,0xe5,0x40,0x7e, +0x63,0xfe,0x15,0xc5,0x7c,0x46,0x0b,0x79,0xe0,0xc5,0x24,0x16,0x96,0x49,0x48,0xe3, +0x92,0x78,0xcd,0x74,0xc6,0x4e,0x2e,0xe8,0xc4,0xa7,0xfb,0x11,0xfc,0x40,0x5f,0x02, +0xfc,0x6c,0xb3,0xb6,0xd4,0x10,0x2a,0xde,0x41,0x35,0xb4,0x6a,0x4f,0x0d,0x29,0x42, +0x63,0x20,0xff,0x00,0xbc,0x05,0x7d,0x1d,0xfb,0x65,0x78,0xc9,0x3e,0x25,0x7e,0xcd, +0x7a,0x16,0xb5,0x23,0xc7,0xfd,0xaf,0xa5,0xea,0xe9,0x0d,0xe4,0x28,0x41,0x31,0x92, +0x19,0x79,0xfc,0x47,0xe7,0x5f,0x21,0xf8,0x17,0x4f,0x87,0x52,0xb5,0xbc,0x8a,0xd6, +0x58,0xed,0xf5,0xfd,0x31,0x17,0x53,0xd3,0x65,0x72,0x04,0x86,0x58,0xc8,0x66,0x87, +0xfe,0x04,0xa0,0x90,0x3d,0x40,0xad,0xef,0x89,0x9a,0xbd,0xed,0xae,0x9b,0xe2,0x01, +0xe6,0x37,0xf6,0x57,0x89,0x22,0xb3,0xd5,0x21,0x8b,0x71,0x2a,0xae,0xe7,0x73,0x63, +0xfe,0x06,0x1c,0x57,0xb1,0x0b,0x4a,0x17,0x17,0x99,0xef,0x1f,0x07,0xfc,0x40,0xcb, +0xe3,0x8f,0x85,0x6b,0x23,0x91,0x14,0x3e,0x1b,0x92,0x65,0x66,0xe9,0x9f,0x32,0x5c, +0x9f,0xd2,0xbf,0x40,0xfe,0x0d,0xf8,0xaa,0x4f,0x10,0x78,0x37,0x46,0x92,0xe8,0xfe, +0xfd,0xe2,0x39,0xfc,0xf8,0xaf,0xcb,0x6d,0x36,0xf2,0xf2,0xcb,0xe1,0x0f,0x81,0xbc, +0x5d,0x6a,0x0b,0x1b,0x05,0xbc,0xd1,0x25,0x65,0xfe,0x10,0x58,0x48,0xa0,0xfe,0x12, +0x1a,0xfb,0x63,0xf6,0x4d,0xf8,0x91,0x17,0x89,0x7c,0x17,0xa6,0xaa,0xcb,0xba,0x6b, +0x66,0xf2,0x5c,0x67,0x90,0x7a,0xf4,0xfc,0x6b,0x59,0xc5,0x4e,0x0d,0x75,0x32,0x91, +0xf6,0x86,0x95,0x28,0x3f,0xbb,0x6e,0x06,0x32,0xb5,0x7d,0x97,0xd7,0x91,0x58,0xb6, +0xb2,0x6e,0x8e,0x19,0x14,0xe3,0x35,0xb9,0x1b,0x09,0x23,0x0d,0x8a,0xf0,0xe4,0x73, +0xc9,0x10,0xc9,0x1e,0x3e,0x95,0x13,0x2d,0x5c,0x61,0xf8,0x8e,0xf5,0x1b,0x47,0xe9, +0xc5,0x23,0x22,0x93,0x27,0xa5,0x46,0xc9,0x57,0x19,0x7a,0xf6,0x35,0x19,0x5e,0xa3, +0x1c,0x55,0x0c,0xa6,0xd1,0xd4,0x4c,0xb8,0xab,0x8d,0x1f,0x5a,0x89,0x90,0x50,0x05, +0x46,0x8f,0xbd,0x40,0xf1,0xf5,0xab,0xac,0xbb,0x6a,0x36,0x51,0xcd,0x55,0xc8,0x68, +0xa0,0xc9,0x50,0x49,0x1f,0x15,0x7e,0x48,0xfd,0xaa,0x07,0x8f,0x1d,0xa9,0x92,0x67, +0x49,0x1d,0x54,0x96,0x1d,0xbc,0xd6,0xa4,0x91,0xe2,0xab,0x48,0x83,0xd2,0x80,0x32, +0xa4,0x86,0xb8,0x7f,0x89,0xff,0x00,0x12,0x74,0x2f,0x85,0x7e,0x1d,0x97,0x57,0xd6, +0xee,0x84,0x6b,0x82,0x20,0xb7,0x53,0xfb,0xcb,0x87,0xc7,0x08,0x83,0xd7,0xdf,0xa0, +0xae,0x8f,0xe2,0x1f,0x8d,0xb4,0x9f,0x86,0xde,0x15,0xbe,0xf1,0x06,0xb3,0x3f,0x93, +0x65,0x6a,0x99,0xc7,0xf1,0x48,0xc7,0x85,0x45,0x1d,0xd8,0x9e,0x05,0x7e,0x60,0xfc, +0x60,0xf8,0xbd,0xac,0xfc,0x62,0xf1,0x64,0xda,0xb6,0xa9,0x21,0x8e,0xdd,0x49,0x4b, +0x3b,0x25,0x3f,0xbb,0xb6,0x8f,0x3c,0x28,0xf5,0x3d,0x32,0x7b,0x9f,0xc0,0x57,0xa3, +0x83,0xc2,0x3c,0x44,0xae,0xfe,0x14,0x7d,0xe7,0x0a,0xf0,0xcd,0x4c,0xfa,0xb7,0xb4, +0xab,0xee,0xd1,0x8e,0xef,0xbb,0xfe,0x55,0xfa,0xbe,0x88,0x9f,0xe2,0xf7,0xc6,0xad, +0x7b,0xe3,0x06,0xb6,0xd7,0x5a,0x8c,0xbf,0x67,0xb0,0x8d,0x8f,0xd9,0x74,0xf8,0x89, +0xf2,0xe1,0x5f,0xfd,0x99,0xbd,0x58,0xd7,0x9f,0x51,0x52,0xda,0xda,0xcb,0x7d,0x75, +0x0d,0xb4,0x11,0x99,0x67,0x99,0xd6,0x38,0xe3,0x5e,0xac,0xc4,0xe0,0x01,0xf5,0x26, +0xbe,0xb2,0x31,0x8d,0x38,0xf2,0xc5,0x59,0x23,0xfa,0x73,0x0f,0x86,0xa3,0x82,0xa3, +0x1a,0x14,0x22,0xa3,0x08,0xec,0x91,0x15,0x15,0xfa,0x15,0xf0,0x7f,0xfe,0x09,0xa3, +0xa4,0xff,0x00,0x63,0xda,0x6a,0x1f,0x10,0x75,0x8b,0xab,0x8b,0xf9,0x91,0x64,0x6d, +0x2f,0x4d,0x61,0x1c,0x51,0x64,0x67,0x6b,0x48,0x41,0x66,0x3f,0x4d,0xbf,0x8d,0x7a, +0xff,0x00,0xfc,0x3b,0xef,0xe0,0x9f,0x91,0xb3,0xfe,0x11,0xcb,0xbd,0xfb,0x71,0xe6, +0x7f,0x6a,0x5c,0xee,0xcf,0xaf,0xdf,0xc7,0xe9,0x5e,0x54,0xf3,0x5c,0x3c,0x25,0x65, +0x77,0xe8,0x7c,0x36,0x27,0x8e,0xb2,0x8c,0x3d,0x47,0x4e,0x2e,0x53,0xb7,0x58,0xad, +0x3f,0x16,0x8f,0xc9,0x6a,0x2b,0xf4,0xdf,0xc4,0xdf,0xf0,0x4c,0xdf,0x87,0x3a,0xa2, +0xbb,0x68,0xfa,0xbe,0xb7,0xa2,0xcb,0xfc,0x0b,0xe6,0xa4,0xf1,0x8f,0xa8,0x75,0xdc, +0x7f,0xef,0xaa,0xf0,0x8f,0x1f,0xff,0x00,0xc1,0x34,0x7c,0x7d,0xe1,0xf5,0x92,0x7f, +0x0c,0xea,0xfa,0x6f,0x8a,0x20,0x51,0x91,0x0b,0xe6,0xd2,0xe0,0xfb,0x00,0xc4,0xa1, +0xfc,0x5c,0x56,0xb4,0xf3,0x2c,0x35,0x4d,0x39,0xad,0xea,0x77,0x61,0x38,0xcb,0x26, +0xc5,0xbe,0x5f,0x6b,0xc8,0xff,0x00,0xbc,0xad,0xf8,0xed,0xf8,0x9f,0x1f,0xd1,0x5d, +0x1f,0x8d,0x3e,0x1c,0xf8,0xa3,0xe1,0xcd,0xff,0x00,0xd8,0xfc,0x4d,0xa0,0x5f,0xe8, +0x93,0xe7,0x0a,0x2f,0x20,0x64,0x57,0xff,0x00,0x71,0xbe,0xeb,0x0f,0x75,0x26,0xb9, +0xca,0xf4,0xa3,0x25,0x25,0x74,0xcf,0xb1,0xa7,0x52,0x15,0x62,0xa7,0x4d,0xa6,0x9f, +0x55,0xaa,0x0a,0x28,0xa2,0x99,0xa0,0x57,0xd6,0xdf,0xb0,0xaf,0xec,0xb7,0xff,0x00, +0x0b,0x53,0xc4,0x43,0xc6,0x7e,0x25,0xb4,0x2d,0xe1,0x4d,0x2e,0x51,0xf6,0x78,0x64, +0x1f,0x2d,0xf5,0xc0,0xe7,0x6e,0x3b,0xa2,0xf0,0x4f,0xa9,0xc0,0xf5,0xaf,0x0b,0xf8, +0x0f,0xf0,0x77,0x53,0xf8,0xe5,0xf1,0x23,0x4d,0xf0,0xc6,0x9d,0x98,0xe3,0x90,0xf9, +0xb7,0x97,0x5b,0x72,0xb6,0xf6,0xeb,0xf7,0xdc,0xfe,0x1c,0x0f,0x52,0x40,0xaf,0xd9, +0xbf,0x06,0xf8,0x47,0x4b,0xf0,0x17,0x85,0xf4,0xdf,0x0f,0xe8,0xb6,0xcb,0x69,0xa6, +0x69,0xf0,0xac,0x10,0x44,0xbe,0x83,0xb9,0xf5,0x24,0xe4,0x93,0xdc,0x93,0x5e,0x1e, +0x67,0x8c,0xf6,0x31,0xf6,0x50,0x7e,0xf3,0xfc,0x11,0xf9,0x97,0x1a,0x71,0x0b,0xcb, +0x68,0x7d,0x4b,0x0d,0x2f,0xde,0xcd,0x6a,0xff,0x00,0x96,0x3f,0xe6,0xfa,0x7c,0xdf, +0x63,0x61,0x54,0x22,0x85,0x50,0x15,0x40,0xc0,0x00,0x70,0x29,0x68,0xa2,0xbe,0x38, +0xfe,0x77,0x0a,0x64,0xb2,0x2c,0x31,0xbc,0x8e,0x76,0xa2,0x02,0xcc,0xde,0x80,0x53, +0xeb,0x85,0xf8,0xe9,0xe2,0xa8,0x7c,0x13,0xf0,0x77,0xc6,0x3a,0xd4,0xf2,0x79,0x4b, +0x6d,0xa6,0x4e,0x11,0x87,0x69,0x1d,0x4a,0x27,0xfe,0x3c,0xcb,0x55,0x18,0xb9,0x49, +0x45,0x75,0x35,0xa5,0x4a,0x75,0xaa,0x46,0x94,0x15,0xdc,0x9a,0x4b,0xd5,0x9f,0x83, +0x3e,0x22,0x71,0x27,0x88,0x35,0x36,0x5e,0x55,0xae,0xa5,0x23,0xfe,0xfb,0x35,0x9f, +0x57,0x75,0x6b,0x39,0x2d,0x6e,0xdc,0xb9,0xdc,0x24,0x25,0x83,0xfa,0xe6,0xa9,0x57, +0xe8,0x76,0xb6,0x87,0x83,0x8c,0xc2,0x57,0xc0,0xe2,0x27,0x86,0xc4,0xc7,0x96,0x71, +0x76,0x6b,0xfa,0xfc,0x02,0x8a,0x28,0xa0,0xe3,0x0a,0x28,0xa2,0x80,0x0a,0x28,0xa2, +0x80,0x0a,0x28,0xa2,0x80,0x0a,0xd0,0xd1,0xfc,0x3f,0xa8,0x6b,0xdf,0x6b,0xfb,0x05, +0xb1,0xb8,0xfb,0x2c,0x2d,0x71,0x36,0x19,0x57,0x64,0x63,0xab,0x72,0x46,0x7f,0x0a, +0xab,0x6f,0x0c,0x52,0xc7,0x39,0x92,0xe1,0x61,0x64,0x4d,0xc8,0xa5,0x49,0xf3,0x1b, +0x23,0xe5,0x18,0xe9,0xeb,0x93,0xe9,0x5a,0xba,0x36,0x9f,0xac,0xf8,0xb3,0x56,0xfb, +0x36,0x91,0x6a,0xef,0x73,0x24,0x42,0x17,0x8e,0xcd,0x7c,0xb5,0xd9,0x80,0x3e,0x7c, +0x71,0x83,0x8e,0x49,0xe0,0xd5,0xc6,0x37,0x69,0x5a,0xe7,0x3d,0x6a,0x8e,0x11,0x6d, +0x34,0xad,0xd5,0xec,0xbf,0x2f,0xcc,0xce,0x1a,0x7b,0xb4,0x76,0x8e,0x25,0x80,0xfd, +0xa5,0x8a,0xaa,0xf9,0x83,0x29,0x83,0x8c,0xbf,0xf7,0x47,0xd6,0x92,0xe3,0x4f,0x9e, +0xde,0x5b,0xa4,0xdb,0xe6,0x8b,0x66,0xdb,0x2c,0x90,0x9d,0xe8,0x39,0xc6,0x77,0x0e, +0x30,0x4f,0x43,0x5e,0x9d,0x0f,0xec,0xd9,0xe2,0xa9,0x21,0xde,0xd3,0xe9,0xd1,0x3e, +0x3f,0xd5,0xb4,0xcc,0x4f,0xe6,0x17,0x1f,0xad,0x71,0x9e,0x2a,0xf0,0x3f,0x88,0x3c, +0x08,0xcd,0x0e,0xa5,0x6f,0x25,0xbc,0x13,0x60,0x79,0xb1,0x3e,0xe8,0x65,0xc1,0xe0, +0x64,0x70,0x7e,0x86,0xb6,0x9e,0x1e,0xa5,0x35,0xcd,0x28,0xb4,0x8e,0x1a,0x19,0x96, +0x17,0x13,0x3f,0x67,0x46,0xb4,0x64,0xfb,0x7f,0x5e,0x47,0x37,0x45,0x5e,0x9a,0x21, +0xa8,0x47,0x35,0xd4,0x10,0x43,0x6b,0x0c,0x09,0x1a,0xbc,0x62,0x4e,0x49,0x3c,0x6e, +0x00,0x9c,0x92,0x48,0xc9,0xc7,0x4a,0xa3,0x5c,0xe7,0xa9,0x19,0x73,0x05,0x14,0x51, +0x48,0xa0,0xa2,0x8a,0x28,0x00,0xa2,0x8a,0x28,0x00,0xa2,0x8a,0x28,0x00,0xa2,0x8a, +0x28,0x00,0xa2,0x8a,0x28,0x00,0xa2,0x8a,0x28,0x00,0xa2,0x8a,0x28,0x03,0xf6,0x95, +0x57,0x8e,0x6a,0x45,0xfa,0x50,0xa0,0x54,0x8a,0xb9,0xed,0x5f,0x0a,0x7b,0xa3,0x92, +0xa4,0x03,0x34,0x8b,0x52,0x22,0xd0,0x21,0xd1,0xad,0x4c,0xab,0xd2,0x9a,0xa2,0xa5, +0x51,0x54,0x21,0xca,0xbc,0x8a,0x9a,0x35,0x3c,0x53,0x23,0x5c,0xd4,0xf1,0xaf,0x14, +0x08,0x7a,0x29,0xec,0x73,0x56,0x11,0x6a,0x38,0xd7,0x15,0x3c,0x6b,0x40,0x87,0xaa, +0xd1,0x3c,0xc9,0x6b,0x0c,0x93,0x4d,0x22,0xc5,0x0c,0x6a,0x5d,0xe4,0x73,0x80,0xaa, +0x39,0x24,0xfb,0x54,0x88,0xb4,0xdb,0xcb,0x08,0xb5,0x2b,0x49,0xed,0x2e,0x23,0x12, +0xdb,0x5c,0x46,0xd1,0x4a,0x87,0xa3,0x2b,0x02,0x08,0xfc,0xa8,0x11,0xc8,0xf8,0x6f, +0xe3,0x6f,0x80,0x7c,0x53,0x74,0xf6,0xda,0x5f,0x8b,0xf4,0x9b,0xcb,0x95,0x38,0x30, +0xac,0xe0,0x36,0x7d,0xb3,0xd6,0xbb,0x49,0x75,0x1b,0x3b,0x78,0x44,0xd2,0xdd,0xc1, +0x14,0x5f,0xdf,0x69,0x14,0x0f,0xcf,0x35,0xf1,0x17,0xc4,0x4f,0xf8,0x27,0x36,0xa1, +0xff,0x00,0x09,0x01,0xd4,0x3e,0x1f,0x78,0x96,0x3d,0x3e,0xdd,0xb2,0xc2,0xdf,0x50, +0x2c,0xaf,0x11,0x3d,0x83,0xaf,0x51,0xf5,0x15,0xe2,0x3f,0xb4,0x77,0xc3,0x7f,0x8b, +0x9f,0x05,0xf4,0x7d,0x22,0x4f,0x15,0xf8,0x82,0xdf,0x50,0xb0,0x9d,0xbc,0x9b,0x76, +0xb1,0xbb,0x66,0x21,0x94,0x77,0x43,0x83,0xd3,0xbd,0x72,0xfb,0x4a,0x91,0xf8,0x91, +0xeb,0xac,0x2d,0x0a,0x96,0xf6,0x73,0xf9,0x1f,0xaa,0x96,0xb7,0x10,0xde,0x46,0x1e, +0x09,0xe3,0x99,0x31,0xd6,0x27,0x0c,0x3f,0x4a,0xb2,0xab,0xf8,0x57,0xe3,0x07,0x80, +0xbf,0x69,0x3f,0x19,0x78,0x0e,0xe9,0x1a,0xcf,0x58,0xba,0x11,0x64,0x65,0x44,0xad, +0xd2,0xbf,0x40,0x3e,0x06,0xfe,0xd3,0x57,0xfe,0x3c,0xf0,0x4d,0xd5,0xee,0x23,0xd4, +0x6f,0x60,0x5c,0x88,0xe4,0x7d,0xac,0x0e,0x3b,0xe0,0x73,0x42,0xac,0xbe,0xd1,0x13, +0xc1,0xc9,0x7c,0x0e,0xe7,0xd4,0x6a,0x06,0xdc,0xe7,0x00,0x75,0xaf,0x29,0xf8,0x9f, +0xfb,0x4b,0x78,0x4f,0xe1,0xbc,0x72,0xdb,0xa5,0xd2,0xeb,0x3a,0xb2,0x83,0x8b,0x3b, +0x46,0x05,0x54,0xfa,0x3b,0xf4,0x5f,0xd4,0xd7,0xc8,0xbf,0x16,0xff,0x00,0x69,0xff, +0x00,0x1a,0xea,0x9a,0xa4,0xda,0x3d,0xce,0xa6,0xda,0x65,0xb3,0x92,0xbe,0x4d,0x80, +0xf2,0xc1,0x07,0x8e,0x4f,0x52,0x2b,0xc4,0xaf,0x2f,0xae,0x6e,0xe4,0x62,0x8c,0xcf, +0xcf,0x39,0x07,0x9f,0x7a,0xe7,0xa9,0x88,0x7b,0x41,0x1d,0x14,0xb0,0x4b,0x7a,0x8f, +0xe4,0x8f,0x57,0xf8,0xbd,0xfb,0x44,0x78,0x8f,0xe2,0x94,0xee,0x97,0xb7,0x5f,0x64, +0xb0,0x43,0x98,0xf4,0xfb,0x72,0x44,0x43,0xdc,0xff,0x00,0x78,0xfb,0x9a,0xf1,0x5b, +0xf9,0x25,0xbf,0xc9,0x05,0xb3,0xd4,0x71,0x57,0x23,0x57,0x59,0x36,0xc8,0x54,0xd5, +0x94,0x31,0x43,0x9d,0xc6,0xb8,0xec,0xdb,0xbc,0x9e,0xa7,0xa4,0xad,0x15,0xcb,0x15, +0x64,0x62,0x41,0x0d,0xd5,0xbf,0xfa,0xd0,0x76,0xe3,0x8a,0xab,0x71,0x7d,0x35,0xbe, +0x7c,0xc6,0x25,0x4f,0x45,0xf5,0xae,0xbe,0xc6,0xce,0xf7,0xc4,0xd7,0xcb,0x67,0xa4, +0xe9,0xb7,0x3a,0x9d,0xc3,0x7d,0xd8,0x6d,0x62,0x2e,0xc4,0xfe,0x02,0xbd,0xc3,0xe1, +0x7f,0xec,0x03,0xe3,0x3f,0x19,0x5d,0x45,0x7f,0xe2,0xe9,0x17,0xc3,0x1a,0x6b,0x7c, +0xc6,0x16,0xc4,0xb7,0x44,0x7a,0x05,0x07,0x0b,0xf8,0x9a,0xd2,0x31,0x72,0xd9,0x19, +0xca,0x51,0x86,0xb2,0x67,0xce,0x3a,0x4c,0xda,0x8e,0xbc,0xab,0x69,0x67,0x6b,0x3d, +0xdd,0xcc,0xa7,0x64,0x76,0xf6,0xe8,0x5d,0xd8,0xfa,0x00,0x2b,0xe9,0x6f,0x83,0xdf, +0xb0,0x3f,0x8c,0x7c,0x4a,0x96,0xd7,0xbe,0x2b,0xb8,0x5f,0x0b,0xe9,0xcc,0x44,0x86, +0xdc,0x81,0x25,0xdb,0x8f,0x4d,0xb9,0xc2,0x7e,0x3f,0x95,0x7d,0x9f,0xf0,0x97,0xf6, +0x7b,0xf0,0x67,0xc1,0xcb,0x54,0x4d,0x03,0x4a,0x43,0x7b,0x8c,0x3e,0xa3,0x74,0x03, +0xdc,0x37,0xaf,0xcd,0xd8,0x7b,0x0a,0xf4,0xdc,0x57,0x4c,0x68,0xff,0x00,0x31,0xc1, +0x53,0x16,0xf6,0xa6,0x73,0x9e,0x07,0xf0,0x06,0x85,0xf0,0xfb,0x47,0x87,0x4c,0xd0, +0x74,0xe8,0x6c,0x2d,0xd1,0x42,0x92,0x88,0x37,0xc9,0x81,0xd5,0x9b,0xa9,0x35,0xd3, +0x2c,0x61,0x45,0x0a,0xb8,0xed,0x4f,0xad,0xfd,0x0f,0x3d,0xb6,0xdd,0xd8,0x52,0x81, +0x4b,0xb7,0x14,0xb4,0x12,0x14,0x8c,0xa1,0xba,0xd2,0xed,0xcd,0x2a,0xae,0x05,0x02, +0x3e,0x61,0xfd,0xaf,0x3e,0x08,0xc5,0xe2,0x3d,0x30,0xf8,0xbb,0x4e,0xb6,0xcd,0xfd, +0x98,0xff,0x00,0x4b,0x11,0x8f,0x99,0xd0,0x74,0x7f,0x7c,0x7f,0x2a,0xf8,0xb6,0xfb, +0x49,0xfe,0xd8,0xb4,0x93,0x68,0xce,0xa1,0x07,0x29,0xff,0x00,0x4d,0x07,0xa6,0x7b, +0xd7,0xeb,0x6d,0xc5,0xbc,0x77,0x10,0xc9,0x1c,0x88,0xb2,0x47,0x22,0x95,0x64,0x61, +0x90,0xc0,0x8c,0x10,0x6b,0xf3,0xa7,0xf6,0x9c,0xf8,0x7b,0xa7,0x7c,0x31,0xf8,0x8f, +0x22,0xf8,0x7a,0xe5,0x65,0xb7,0xb8,0x4f,0xb4,0xc9,0xa7,0x7f,0x15,0xb6,0x79,0xc0, +0xf6,0xee,0x2b,0x9a,0xa4,0x79,0x5f,0x32,0x3d,0x3c,0x3d,0x4e,0x65,0xec,0xd9,0xf3, +0x33,0x58,0xcd,0x04,0xd2,0x19,0xa3,0x64,0x7d,0xd9,0x24,0x8e,0x45,0x6f,0x7d,0x8e, +0x3b,0xa8,0x96,0xf9,0x54,0xb3,0x42,0xa4,0xb2,0xa8,0xcf,0x38,0xe0,0x81,0x5b,0x77, +0xcd,0x6b,0xe2,0x28,0x0b,0x46,0xcb,0x15,0xd8,0x19,0x21,0xbb,0xfd,0x6b,0x9a,0x8e, +0xfc,0xf8,0x6e,0x59,0xde,0xf9,0xbc,0x8b,0x4d,0x84,0x48,0xf9,0xc8,0x5f,0x7a,0xa8, +0xca,0xfa,0xa3,0x59,0x46,0xda,0x32,0x8d,0xdd,0x94,0x76,0x91,0xc9,0xab,0x6b,0xac, +0x22,0xb1,0xb7,0x8c,0xb0,0x56,0xe3,0x27,0xb0,0xc7,0x7a,0xf9,0xcf,0xe2,0x57,0xc5, +0x69,0xfc,0x45,0x34,0xb6,0x56,0x8a,0xd6,0x76,0x71,0xc8,0x4a,0x88,0xc6,0x1d,0x87, +0xa9,0xf4,0xe2,0xba,0x5f,0x1c,0x78,0xce,0xe3,0xc5,0xcd,0x74,0x91,0xdc,0x4c,0xba, +0x6c,0x4f,0xfb,0xb8,0x5d,0xc9,0x66,0xff,0x00,0x68,0xd7,0x94,0x4f,0x6e,0xf1,0xac, +0xe7,0x62,0xef,0x2c,0x07,0x0d,0x9e,0x49,0xf5,0xaf,0x5e,0x95,0x3d,0x2e,0xce,0x56, +0xac,0x6b,0xfc,0x28,0xf1,0x32,0x78,0x3b,0xc7,0x9a,0x36,0xad,0x26,0x64,0xb5,0x6b, +0x85,0xf3,0x7c,0xc1,0xd5,0x73,0xcf,0xe8,0x4d,0x7b,0x3f,0xed,0x1b,0xa5,0xcb,0xa2, +0xe9,0x5e,0x1e,0xb3,0x2a,0xbf,0x64,0x82,0x5b,0xab,0x6b,0x67,0x53,0xf7,0xa0,0x32, +0xf9,0xd1,0x7e,0x4b,0x2f,0x1e,0xd5,0xe0,0x29,0x02,0x19,0xa6,0xb1,0x91,0x82,0xc9, +0xc3,0xc4,0xde,0x87,0x1c,0x8a,0xf7,0x9f,0x88,0xfa,0xb7,0xfc,0x25,0xbf,0xb3,0xef, +0xc3,0xed,0x45,0xc0,0x7b,0xeb,0x1b,0xbb,0xad,0x2e,0xe6,0x4c,0xfc,0xc4,0xaa,0x23, +0x21,0x6f,0xf8,0x01,0x03,0xe8,0x05,0x76,0x43,0x44,0xd0,0x23,0xd4,0x7f,0x67,0x5d, +0x5b,0x49,0xbf,0xf8,0x4b,0xa4,0xf8,0x3b,0x57,0x8d,0x26,0x5d,0x6f,0xc4,0xbb,0x62, +0x53,0xd5,0x71,0x12,0x0c,0x8f,0xcc,0x57,0xa1,0xfe,0xc6,0x70,0xdc,0xe9,0x5f,0x1f, +0xf5,0xaf,0x0b,0x21,0x65,0xb0,0xb2,0x37,0x37,0x2f,0x1b,0x7a,0x29,0xc2,0xfe,0x95, +0xf3,0xb7,0xec,0xb1,0x05,0xe7,0x88,0xbe,0x36,0x78,0x2b,0x4c,0x88,0x3c,0xb6,0xf6, +0x37,0xa2,0x7d,0x83,0xa0,0x6e,0x09,0x6f,0xc8,0x0a,0xfa,0xb7,0xf6,0x72,0xd4,0x21, +0xba,0xfd,0xb7,0x3e,0x22,0xc3,0x6c,0x8a,0x91,0x4b,0x15,0xcc,0x11,0x05,0x1d,0x94, +0x2f,0x3f,0x89,0xcd,0x6b,0x29,0x69,0xa1,0x12,0xea,0x7d,0xf7,0xe1,0x1b,0xe1,0xa9, +0xe9,0x71,0x1c,0x8f,0x31,0x57,0x24,0x57,0x49,0x63,0x78,0xb2,0x5d,0x5c,0x5a,0x83, +0xf3,0xc4,0x15,0xbf,0x02,0x2b,0xc7,0xbe,0x0c,0xf8,0xa2,0x3d,0x6b,0x5a,0xd5,0x6d, +0x51,0xf3,0xf6,0x76,0x29,0x8c,0xff,0x00,0x9f,0x4a,0xeb,0xac,0x75,0x95,0xb3,0xf8, +0xd9,0x71,0xa4,0x48,0xe5,0x7e,0xdb,0xa3,0xa5,0xc4,0x4a,0x7b,0xec,0x7d,0xad,0xfc, +0xc5,0x79,0xb5,0x69,0xf2,0xce,0x4b,0xe6,0x60,0xd1,0xe8,0x24,0x7a,0x52,0x63,0x77, +0xb1,0xa9,0x19,0x48,0xe2,0x99,0x81,0xde,0xb8,0xcc,0x88,0xd9,0x7b,0x1e,0x7d,0xea, +0x27,0x5d,0xbe,0xe2,0xac,0x1f,0x4a,0x6e,0xcc,0x77,0xc8,0xa6,0x49,0x55,0x97,0xbe, +0x6a,0x26,0x5d,0xdd,0xf3,0x57,0x1e,0x3c,0x8c,0x8a,0x85,0x97,0xf3,0xaa,0x11,0x51, +0x96,0xa1,0x78,0xea,0xe4,0x8b,0x9a,0x89,0x97,0xda,0x98,0xca,0x6c,0xb5,0x0c,0x89, +0xed,0x57,0x1d,0x6a,0x16,0x5a,0xab,0x90,0xd1,0x46,0x45,0xc1,0xe9,0x55,0x67,0xdb, +0x1a,0x3b,0x3b,0x04,0x45,0x04,0x96,0x63,0x80,0x00,0xef,0x5a,0x12,0x47,0x5f,0x2e, +0xfe,0xdc,0x9f,0x1a,0x0f,0x80,0xfc,0x0e,0x9e,0x14,0xd3,0x2e,0x0c,0x7a,0xde,0xba, +0xa4,0x4a,0xc8,0x7e,0x68,0x6d,0x7a,0x39,0xf6,0x2e,0x7e,0x51,0xed,0xbb,0xd2,0xb7, +0xa3,0x49,0xd6,0x9a,0x84,0x7a,0x9e,0x96,0x57,0x97,0xd5,0xcd,0x71,0x94,0xf0,0x74, +0x77,0x93,0xfb,0x97,0x57,0xf2,0x47,0xcb,0xff,0x00,0xb5,0x87,0xc7,0xa9,0x3e,0x2e, +0xf8,0xd1,0xf4,0xed,0x36,0x66,0xff,0x00,0x84,0x5f,0x49,0x91,0xa3,0xb5,0x55,0x6c, +0xad,0xc4,0x9d,0x1a,0x63,0x8f,0x5e,0x8b,0xed,0xcf,0xf1,0x11,0x5e,0x11,0x45,0x15, +0xf6,0xd4,0xe9,0xc6,0x94,0x14,0x23,0xb2,0x3f,0xaf,0xf0,0x18,0x1a,0x19,0x6e,0x1a, +0x18,0x4c,0x3a,0xb4,0x62,0xbf,0xe1,0xdb,0xf3,0x7b,0xb0,0xad,0x7f,0x07,0xea,0x51, +0xe8,0xbe,0x2e,0xd0,0xf5,0x09,0xb8,0x86,0xd2,0xfa,0x0b,0x87,0xff,0x00,0x75,0x24, +0x56,0x3f,0xa0,0xac,0x8a,0x2a,0xda,0xba,0xb1,0xdb,0x38,0xa9,0xc5,0xc5,0xf5,0x3f, +0x7b,0xac,0x2f,0x23,0xd4,0x6c,0x6d,0xee,0xe1,0x39,0x8a,0x78,0xd6,0x54,0x3f,0xec, +0xb0,0x04,0x7e,0x86,0xac,0x57,0xcf,0xbf,0xb0,0xff,0x00,0xc5,0x85,0xf8,0xa1,0xf0, +0x27,0x4a,0x8e,0x79,0x7c,0xcd,0x57,0x43,0xff,0x00,0x89,0x6d,0xd8,0x27,0x2c,0x76, +0x8f,0xdd,0xb1,0xfa,0xa6,0x3f,0x2a,0xfa,0x0a,0xbf,0x38,0xab,0x4d,0xd2,0xa8,0xe0, +0xfa,0x1f,0xc7,0x58,0xec,0x24,0xf0,0x38,0xaa,0x98,0x5a,0x9b,0xc1,0xb5,0xfd,0x7a, +0x85,0x14,0x51,0x59,0x1c,0x26,0x76,0xbd,0xe1,0xdd,0x2b,0xc5,0x3a,0x64,0xda,0x76, +0xb3,0xa6,0xda,0xea,0xb6,0x13,0x0d,0xb2,0x5b,0x5e,0x42,0xb2,0xc6,0xe3,0xd0,0xab, +0x02,0x0d,0x7c,0x8b,0xf1,0xab,0xfe,0x09,0xbb,0xe1,0x7f,0x15,0x09,0xf5,0x1f,0x00, +0x5e,0xff,0x00,0xc2,0x2b,0xa9,0x9c,0xb7,0xf6,0x7d,0xc1,0x69,0x6c,0x64,0x3e,0x83, +0xab,0xc5,0x93,0xe9,0xb8,0x0e,0xca,0x2b,0xec,0xba,0x2b,0xa2,0x8e,0x22,0xae,0x1d, +0xde,0x9c,0xac,0x7a,0xf9,0x7e,0x6d,0x8d,0xca,0xe7,0xcf,0x84,0xa8,0xe3,0xe5,0xd1, +0xfa,0xad,0x8f,0xc4,0x9f,0x1b,0x7c,0x0a,0xf1,0x9f,0xc3,0x5f,0x1a,0xd9,0x78,0x67, +0xc4,0xda,0x34,0xda,0x6d,0xe5,0xe4,0xeb,0x0d,0xb4,0xdf,0x7e,0x0b,0x8d,0xcc,0x14, +0x34,0x72,0x0e,0x18,0x72,0x38,0xea,0x33,0xc8,0x15,0xf6,0xb7,0xed,0x31,0xfb,0x04, +0xf8,0x72,0xdf,0xe1,0x8a,0xea,0xff,0x00,0x0f,0xec,0xa4,0xb4,0xf1,0x06,0x87,0x68, +0xbe,0x75,0xb2,0x16,0x61,0xa9,0xc6,0x8a,0x03,0x92,0xbc,0xe2,0x6e,0x0b,0x02,0xbf, +0x78,0xe4,0x11,0xc8,0x23,0xec,0x7f,0x15,0xf8,0x3f,0x46,0xf1,0xc6,0x92,0xda,0x6e, +0xbb,0xa7,0x43,0xa8,0xd9,0xef,0x59,0x55,0x26,0x1c,0xa4,0x8a,0x72,0xae,0x8c,0x39, +0x56,0x07,0x90,0xc0,0x82,0x2b,0x66,0xbd,0x2a,0x99,0xa5,0x59,0xb8,0x4a,0x3a,0x35, +0xbf,0x66,0x7d,0x96,0x33,0x8d,0xf1,0xb8,0x99,0x61,0xeb,0x53,0xf7,0x25,0x4e,0xfc, +0xc9,0x3f,0x76,0x57,0xb7,0x4f,0xbf,0x4d,0x6d,0xba,0x7d,0xbe,0x74,0xfd,0x89,0x3e, +0x00,0x47,0xf0,0x5f,0xe1,0x6c,0x1a,0x86,0xa1,0x6f,0xb3,0xc5,0x1a,0xfa,0x25,0xd5, +0xe1,0x75,0xf9,0xa0,0x8c,0x8c,0xc7,0x0f,0xb6,0x01,0xcb,0x0e,0x3e,0x63,0x83,0xf7, +0x45,0x7d,0x17,0x45,0x15,0xe5,0x55,0xa9,0x2a,0xd3,0x75,0x25,0xbb,0x3e,0x17,0x1d, +0x8d,0xab,0x98,0x62,0x67,0x8a,0xae,0xef,0x29,0x3b,0xff,0x00,0xc0,0xf4,0x4b,0x44, +0x14,0x51,0x45,0x64,0x70,0x05,0x7c,0x55,0xff,0x00,0x05,0x2d,0xf8,0xb0,0xba,0x27, +0x82,0x74,0x8f,0x02,0x5a,0x4b,0x8b,0xcd,0x5e,0x51,0x79,0x76,0x14,0xf2,0xb6,0xf1, +0x9c,0x28,0x3e,0xcc,0xff,0x00,0xfa,0x05,0x7d,0x6b,0xe3,0xef,0x1d,0x68,0xff,0x00, +0x0d,0x7c,0x25,0xa9,0x78,0x8f,0x5e,0xba,0x5b,0x4d,0x36,0xc6,0x23,0x23,0xb1,0x23, +0x2c,0x7b,0x22,0x8e,0xec,0xc7,0x80,0x3d,0xeb,0xf1,0x8b,0xe3,0x4f,0xc5,0x6d,0x4b, +0xe3,0x47,0xc4,0x7d,0x5f,0xc5,0x5a,0x96,0x51,0xae,0xe4,0xc4,0x16,0xf9,0xc8,0x82, +0x11,0xc2,0x46,0x3e,0x83,0xf5,0xcd,0x7b,0x79,0x5e,0x19,0xd5,0xab,0xed,0x1e,0xd1, +0xfc,0xcf,0xd2,0x78,0x1f,0x27,0x96,0x3b,0x1c,0xb1,0x93,0x5f,0xbb,0xa5,0xaf,0xac, +0xba,0x2f,0x96,0xff,0x00,0x77,0x73,0xcf,0xef,0xac,0xd6,0xfa,0xdd,0xa2,0x6e,0x0f, +0x55,0x6f,0x43,0x5c,0x7c,0xd0,0xb4,0x12,0x34,0x6e,0x30,0xca,0x70,0x45,0x76,0xf5, +0x89,0xe2,0x3b,0x1d,0xc8,0xb7,0x28,0x39,0x1f,0x2b,0xff,0x00,0x43,0x5f,0x5f,0x25, +0xd4,0xfa,0xbf,0x10,0xf8,0x7a,0x38,0xdc,0x27,0xf6,0xa5,0x08,0xfe,0xf2,0x92,0xf7, +0xbc,0xe3,0xfe,0x71,0xdf,0xd2,0xfd,0x91,0x81,0x45,0x14,0x56,0x47,0xf3,0x30,0x51, +0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x01,0x7b,0x53,0x59,0xed,0xfe, +0xcf,0x67,0x37,0x90,0x7c,0x94,0xdc,0xad,0x0e,0xd3,0x90,0xe0,0x37,0x2c,0x3a,0x9e, +0x7b,0xf4,0xe9,0x5f,0x5f,0x7c,0x22,0xf8,0x7a,0xbe,0x19,0xf0,0xfd,0x86,0x9d,0x67, +0x6a,0x65,0xd5,0xaf,0x02,0xb4,0xfb,0x46,0x5e,0x49,0x1b,0xf8,0x7e,0x83,0xa7,0xe1, +0x5f,0x20,0x5f,0x46,0x96,0xb7,0x91,0xcb,0x0d,0xb5,0xc5,0xbd,0xb3,0x05,0x92,0x25, +0xb9,0xea,0xc3,0x03,0x24,0x1c,0x00,0x41,0x39,0xe9,0x5f,0xa1,0x7f,0x0a,0xfc,0x59, +0xa3,0x47,0x6d,0x35,0xc5,0xcc,0x2a,0xe9,0xaa,0x59,0xaa,0xdb,0x5e,0xbb,0x30,0x58, +0x37,0x60,0x90,0xdb,0x48,0x60,0xac,0x0e,0xd2,0x54,0xe4,0x0f,0x6c,0xd7,0xb1,0x81, +0xf7,0x7d,0xa5,0x44,0xaf,0x25,0xb1,0xf0,0x3c,0x4a,0xe5,0x52,0x18,0x7a,0x12,0x97, +0x2c,0x24,0xdf,0x33,0xf3,0x56,0xb2,0xeb,0xbb,0xbf,0x95,0xfd,0x0e,0xae,0xcb,0xe1, +0xbf,0x87,0x9b,0xc3,0xf2,0xdc,0xcd,0xa8,0xdf,0x5c,0xdf,0x47,0xba,0x36,0x4b,0x35, +0x42,0x1d,0xc1,0x1b,0xda,0x14,0x3c,0xcb,0x1a,0x64,0xee,0x60,0x41,0xc8,0x38,0x1d, +0xeb,0xcd,0x3c,0x6f,0xe0,0x68,0xe7,0xd3,0xe4,0xd3,0xb5,0x38,0xe3,0xbd,0xd3,0x6f, +0x63,0x26,0x2b,0x98,0xbe,0x68,0xe5,0x5e,0xcc,0x87,0xb3,0x0f,0x4e,0xa0,0xf5,0xaf, +0x51,0xbe,0xf0,0x8d,0xe6,0xb9,0xad,0x2e,0xad,0x0c,0xb3,0x69,0xf6,0xfa,0x64,0x71, +0x99,0xad,0x6d,0xf2,0xcf,0x6d,0x18,0x07,0x67,0xd9,0x48,0xe2,0x44,0x6c,0x1d,0xa4, +0x73,0xd4,0xb7,0x73,0x59,0xff,0x00,0x10,0x3c,0x58,0x3f,0xb2,0xe5,0xd0,0x85,0x95, +0x94,0x17,0x33,0xdc,0x0b,0xbb,0xb5,0x82,0x25,0xff,0x00,0x47,0x60,0x38,0x4d,0xd8, +0xc9,0x93,0xfb,0xec,0x30,0x33,0xc0,0x1d,0x6b,0xb2,0x85,0x5a,0x92,0x9a,0x8d,0xf9, +0xef,0xba,0xed,0xfd,0x7f,0x5b,0xa3,0xe4,0xb1,0x58,0x7a,0x54,0xe9,0xba,0xaa,0x3e, +0xcd,0xc3,0xe1,0x6a,0xfe,0xf3,0xff,0x00,0x87,0xf9,0xab,0x3e,0xcd,0x1f,0x9c,0xf7, +0x36,0x10,0xf8,0x2f,0xc7,0x13,0x5a,0x6a,0x36,0x2b,0xaa,0xc1,0x63,0x72,0xd1,0xbd, +0xab,0xb9,0x41,0x32,0xf3,0xb7,0x90,0x38,0xce,0x41,0xac,0x4b,0xe8,0xcc,0x57,0x93, +0xa1,0x81,0xed,0x70,0xe7,0xf7,0x12,0x67,0x74,0x63,0x3c,0x29,0xcf,0x3c,0x57,0x53, +0xf1,0x5b,0x54,0x87,0x5a,0xf8,0x95,0xad,0xdc,0xc2,0xfb,0x61,0x37,0x02,0x20,0xe3, +0xfd,0x85,0x54,0x2d,0xf9,0xa9,0x35,0xcb,0xea,0x0c,0x5e,0xfa,0xe0,0x9b,0x93,0x78, +0x77,0x9f,0xf4,0x83,0x9f,0xde,0x73,0xf7,0xb9,0xe7,0x9f,0x7a,0xf0,0x6a,0x5a,0x32, +0x94,0x63,0xb2,0x67,0xeb,0xb8,0x59,0x4a,0xa5,0x3a,0x75,0x6a,0x7c,0x52,0x8a,0xbe, +0xfb,0xef,0xe9,0xd5,0xf9,0x90,0x57,0xb3,0x7c,0x15,0xfd,0x99,0x35,0xef,0x8a,0xe9, +0x6f,0xaa,0x5c,0xc8,0xba,0x3f,0x86,0xdd,0xb1,0xf6,0xc6,0xc3,0x49,0x30,0x07,0x04, +0x46,0x9d,0xf9,0xe3,0x27,0x8f,0xad,0x78,0xcd,0x7b,0xb7,0xec,0xc7,0xf1,0xf9,0xfe, +0x19,0xeb,0x4b,0xa1,0xeb,0x53,0xb3,0x78,0x62,0xfa,0x4c,0x6e,0x63,0x9f,0xb1,0xca, +0x7f,0xe5,0xa0,0xff,0x00,0x64,0xff,0x00,0x10,0xfc,0x6b,0xe4,0xb8,0x92,0x79,0xa5, +0x3c,0xb6,0xa5,0x4c,0xa2,0xde,0xd5,0x77,0x57,0x76,0xeb,0xcb,0xd3,0x9b,0xb5,0xef, +0xe9,0x73,0xd2,0xa7,0xcb,0xcd,0xef,0x6c,0x78,0xc7,0x88,0x34,0xb3,0xa1,0xeb,0xda, +0x96,0x9c,0x4b,0x13,0x69,0x73,0x24,0x19,0x6e,0xbf,0x2b,0x15,0xe7,0xf2,0xaa,0x15, +0xdf,0xfc,0x7e,0xd2,0xd3,0x49,0xf8,0xc9,0xe2,0xc8,0xa2,0x65,0x78,0x66,0xbd,0x6b, +0xa8,0xda,0x33,0x95,0x2b,0x28,0x12,0x82,0x3d,0xbe,0x7a,0xe7,0x3c,0x2b,0xe1,0x0b, +0xdf,0x16,0xdd,0x4c,0xb6,0xed,0x15,0xa5,0x95,0xaa,0x79,0x97,0x9a,0x8d,0xd3,0x14, +0xb7,0xb5,0x8f,0xfb,0xce,0xd8,0xef,0xd0,0x28,0xc9,0x63,0xc0,0x06,0xbd,0x9c,0x16, +0x21,0x62,0x70,0x94,0xb1,0x0f,0xed,0x46,0x2f,0xef,0x49,0x92,0xe3,0xef,0x59,0x18, +0x75,0x67,0x4e,0xd2,0xef,0xb5,0x89,0x3c,0xbd,0x3e,0xca,0xe6,0xfe,0x4c,0xe3,0x65, +0xac,0x2d,0x29,0xcf,0xd1,0x41,0xaf,0x4d,0xd0,0xb4,0xfb,0x0b,0x58,0x66,0x7f,0x0c, +0x68,0xf6,0xd7,0xf1,0x22,0x84,0x93,0xc5,0x1e,0x28,0x45,0x10,0x46,0xff,0x00,0xc4, +0x61,0x81,0xbe,0x41,0xe8,0x37,0x89,0x0f,0xb2,0x9a,0x75,0xef,0x8c,0xd1,0x61,0x5b, +0x6d,0x4b,0xe2,0x3e,0xb1,0x74,0x23,0x27,0x6c,0x1a,0x34,0x26,0x3b,0x74,0xff,0x00, +0x77,0x95,0x1f,0x90,0xaf,0x41,0x42,0xa4,0x95,0xd2,0xb2,0xf3,0x76,0x39,0x27,0x8a, +0xa1,0x09,0x38,0x5d,0xc9,0xad,0xd4,0x53,0x76,0xf5,0xb6,0xc7,0x99,0xea,0x7a,0x2e, +0xa3,0xa2,0x30,0x5d,0x4b,0x4e,0xbc,0xd3,0x9b,0x38,0xdb,0x79,0x6e,0xf0,0x9c,0xfa, +0x7c,0xc0,0x55,0x3a,0xf5,0x6b,0x1f,0x1a,0xc3,0x0a,0x49,0x0e,0x9b,0xf1,0x17,0x5f, +0xb1,0x32,0x8d,0xa5,0x35,0x28,0x9a,0x48,0x1c,0x7a,0x3e,0x19,0xb8,0xfc,0x0d,0x72, +0x1e,0x24,0xf0,0x4e,0xab,0xa7,0xc7,0x26,0xa9,0xba,0xdf,0x54,0xd3,0xe4,0x62,0xed, +0x7f,0xa7,0xb0,0x78,0x81,0x27,0x3f,0x30,0x1f,0x73,0xe8,0x40,0xaa,0xf6,0x73,0xb5, +0xde,0xbe,0x8e,0xe4,0xac,0x5d,0x19,0x35,0x16,0xdc,0x5b,0xfe,0x64,0xd7,0xdd,0x7d, +0xce,0x62,0x8a,0x28,0xac,0xce,0xb0,0xa2,0x8a,0x28,0x00,0xa2,0x8a,0x28,0x00,0xa2, +0x8a,0x28,0x03,0xf6,0xb2,0x35,0xa9,0x55,0x71,0x40,0x5d,0xbd,0x69,0x6b,0xe1,0x4f, +0x70,0x55,0x15,0x3a,0xaf,0x6a,0x8d,0x3a,0xd4,0xca,0x29,0xa0,0x63,0x95,0x6a,0x55, +0x5a,0x6a,0xd4,0x8a,0x38,0xa6,0x49,0x22,0x55,0x84,0x5f,0x4a,0x89,0x47,0x22,0xac, +0x47,0x41,0x24,0x88,0x2a,0x74,0x1c,0x54,0x49,0xc9,0xab,0x11,0x8e,0xdd,0x68,0x02, +0x48,0xfe,0x5e,0x4d,0x4b,0xe6,0x24,0x31,0x99,0x24,0x61,0x1a,0x0e,0xac,0xc7,0x00, +0x7e,0x35,0xf2,0x57,0xed,0x09,0xfb,0x6f,0xc9,0xf0,0xef,0xc5,0x57,0x7e,0x0f,0xf0, +0x7e,0x84,0xda,0xc6,0xbf,0x6e,0xfe,0x54,0xd2,0xcc,0x8c,0xca,0xb2,0x11,0xf7,0x51, +0x07,0x27,0x1c,0x73,0x5e,0x31,0x2f,0xc3,0x6f,0xda,0x87,0xf6,0x86,0xbe,0x4b,0xbd, +0x48,0xde,0x68,0x5a,0x65,0xd6,0x3f,0xe3,0xee,0xe8,0x5a,0xc2,0x89,0xff,0x00,0x5c, +0x41,0xdc,0x7f,0x2a,0xc9,0xd4,0x5b,0x45,0x5c,0xef,0x86,0x12,0x56,0x53,0xa8,0xd4, +0x53,0xee,0x7d,0x77,0xf1,0x8b,0xf6,0xad,0xf0,0x3f,0xc2,0x4d,0x2e,0x56,0x3a,0x94, +0x1a,0xce,0xae,0x41,0x11,0x58,0x59,0xc8,0x1c,0xee,0xec,0x5d,0x87,0x0a,0x3f,0x5a, +0xfc,0xbf,0xf8,0xdd,0xf1,0xbb,0x5c,0xf8,0xd1,0xe2,0x69,0xf5,0x4d,0x72,0xe5,0xa6, +0x6f,0xbb,0x0c,0x0a,0x4f,0x95,0x02,0x67,0xee,0xa0,0xed,0xef,0xeb,0x5f,0x49,0x78, +0xc3,0xf6,0x2f,0xf0,0x1f,0xc2,0xdf,0x04,0xea,0x77,0xff,0x00,0x10,0xbe,0x26,0xb2, +0x78,0x89,0x21,0x66,0xb7,0xb6,0xb3,0xdb,0x83,0x26,0x3e,0x51,0xe5,0x9c,0xbb,0x64, +0xfd,0x2b,0xe2,0x96,0xb5,0x60,0xc4,0xb3,0x2f,0xaf,0xe1,0x5c,0x95,0x25,0x27,0xf1, +0x1e,0xa6,0x1a,0x9d,0x28,0xa6,0xe9,0xea,0xfb,0x95,0xf6,0xec,0xef,0x81,0x5e,0xcb, +0xfb,0x36,0x7c,0x52,0x93,0xc0,0x7e,0x2f,0x58,0x84,0x8c,0x6d,0x6e,0xbe,0x49,0x23, +0x39,0xc1,0xcf,0xb5,0x78,0xff,0x00,0x95,0xf2,0xe4,0x0c,0x0a,0xee,0xbe,0x0e,0x68, +0x03,0x57,0xf1,0x85,0x9a,0xb7,0x0a,0xac,0x0e,0x71,0xc7,0x5a,0xc2,0x5b,0x1d,0x71, +0xf8,0xb5,0x3e,0x8c,0xf8,0xd9,0xe1,0x3f,0xed,0x38,0x7f,0xb7,0x91,0x23,0x96,0x4d, +0xde,0x64,0x2a,0x3e,0x5d,0x88,0x7e,0xf7,0xd4,0x8e,0xb5,0xe6,0x10,0xcd,0x72,0x2c, +0x52,0x29,0x5c,0xfc,0x83,0x05,0xdb,0xbf,0xbd,0x7a,0x17,0xc4,0xaf,0x16,0x1b,0x8b, +0xa8,0xb4,0x8b,0x59,0x94,0xdb,0x5a,0xfc,0x8e,0x7f,0xbc,0x78,0xc8,0x1e,0xc2,0xbc, +0xb3,0x55,0xba,0x49,0xa6,0x75,0x59,0x8c,0x17,0x3d,0x02,0xe7,0x28,0xe3,0xdc,0x57, +0x89,0x57,0x32,0x8c,0x1b,0xa7,0x08,0xdd,0xa3,0x7f,0x60,0xb9,0xb9,0xee,0x7a,0xf7, +0xc2,0x2f,0xd9,0xf7,0xc5,0x7f,0x19,0x6d,0xda,0xf7,0x40,0x86,0xd4,0x69,0x89,0x2f, +0x90,0xfa,0x8d,0xc4,0xea,0x11,0x58,0x75,0x1b,0x41,0x2c,0x48,0xfa,0x57,0xd5,0x1f, +0x0f,0x7f,0x60,0x7f,0x0a,0xe9,0x1e,0x4d,0xcf,0x8a,0x75,0x1b,0xaf,0x10,0x5d,0xa9, +0xcb,0x41,0x19,0xf2,0x60,0x1e,0xd8,0x1c,0x91,0x5f,0x9e,0xde,0x19,0xf1,0xe6,0xb9, +0xe1,0x2b,0x84,0x5d,0x0b,0x5a,0xbe,0xd1,0x25,0xb7,0x9b,0xcf,0x10,0xd9,0xdc,0x32, +0x47,0xe6,0x1c,0x65,0xb6,0x83,0x83,0x90,0x3b,0xd7,0xd8,0x3f,0x09,0x7f,0xe0,0xa3, +0x4f,0x6b,0xb2,0xcf,0xe2,0x1e,0x92,0x1e,0x10,0xaa,0x89,0xaa,0x69,0x68,0x4b,0xb3, +0x67,0x04,0xc9,0x19,0x38,0x03,0x1c,0xfc,0xb5,0xdb,0x85,0xc6,0xe1,0xea,0xbe,0x59, +0x69,0x2f,0x33,0xcf,0xc4,0x47,0x10,0xbe,0x0d,0xbc,0xb7,0x3e,0xd7,0xf0,0x9f,0x81, +0x34,0x0f,0x03,0xda,0x0b,0x6d,0x03,0x46,0xb2,0xd2,0x21,0x23,0x04,0x5a,0xc2,0xa8, +0x5b,0xea,0x47,0x27,0xf1,0xad,0xf5,0x5e,0xf5,0x81,0xe0,0xbf,0x1d,0xe8,0x1f,0x10, +0xb4,0x9f,0xed,0x2f,0x0d,0xea,0xd6,0xba,0xcd,0x88,0x6d,0x8d,0x35,0xa4,0x81,0xc2, +0xb6,0x33,0xb4,0xfa,0x1e,0x47,0x15,0xd0,0x83,0x5e,0xee,0x9d,0x0f,0x11,0xdd,0xbd, +0x45,0xe8,0x31,0x4e,0x55,0xcd,0x22,0xa9,0x35,0x20,0xe2,0x90,0x05,0x38,0x0a,0x45, +0x1d,0xe9,0xd4,0x84,0x14,0xa0,0x50,0x05,0x2d,0x00,0x14,0x51,0x45,0x03,0x11,0xd8, +0x2a,0x33,0x1e,0x80,0x12,0x6b,0xf2,0x87,0xe3,0xf7,0x8e,0x2e,0xbc,0x51,0xf1,0x6b, +0xc4,0x1a,0x9a,0xce,0xc0,0x2d,0xd3,0x84,0x65,0x3d,0x11,0x4e,0xd5,0x1f,0x90,0xaf, +0xd3,0xbf,0x88,0xde,0x20,0x1e,0x17,0xf0,0x1e,0xbf,0xaa,0x37,0x1f,0x65,0xb3,0x91, +0x87,0x3f,0xc4,0x57,0x03,0xf5,0x22,0xbf,0x25,0x35,0xff,0x00,0xde,0x5c,0x5c,0x3b, +0x73,0x2c,0x84,0xb3,0x1f,0xa9,0xaf,0x3b,0x17,0x2f,0x86,0x27,0xb9,0x96,0x42,0xee, +0x52,0x30,0xaf,0x3c,0x4b,0x67,0x0a,0xb6,0xa2,0x1f,0x67,0x94,0x41,0x91,0x14,0x1c, +0x1f,0x6c,0x0e,0x95,0xe2,0xdf,0x13,0xbe,0x25,0xdf,0xf8,0xb2,0xed,0xad,0xed,0xa3, +0x36,0x7a,0x6c,0x7c,0x84,0xfe,0x27,0xff,0x00,0x69,0x8f,0xf4,0xaf,0x59,0xb3,0xf0, +0xec,0x9a,0x8e,0xa6,0xb1,0xa4,0x7f,0x2b,0x9c,0x30,0x3d,0x08,0xf4,0x3e,0xb5,0xc7, +0x7e,0xd0,0x1e,0x05,0xd1,0x7c,0x03,0xe2,0xeb,0x4b,0x08,0xae,0x9a,0xdf,0x7d,0xaa, +0x5c,0xdd,0x45,0xd1,0x17,0x76,0x70,0x14,0xf7,0xe9,0x5d,0x78,0x5a,0x94,0xe4,0xd4, +0x5f,0xc4,0x6d,0x88,0xa3,0x28,0x5e,0x5d,0x0f,0x2b,0xf0,0xda,0xed,0xb3,0xbe,0x32, +0x83,0xb5,0x86,0x4b,0x3d,0x67,0xb5,0xb5,0xa6,0xa9,0x28,0x8e,0xde,0x40,0x85,0x0e, +0xed,0xb8,0xc0,0xcf,0xd6,0xab,0xdc,0xde,0x2e,0xa9,0x30,0xb4,0xb2,0x69,0x16,0xc7, +0x76,0x64,0x91,0xc9,0xcc,0x98,0xfe,0x95,0x96,0x63,0x6b,0xdb,0x67,0xbd,0x79,0xcd, +0x9d,0xaf,0x98,0x44,0x51,0xa0,0xe0,0xa8,0xe8,0x6b,0xda,0x8c,0xbb,0x1e,0x64,0xac, +0x5a,0xbc,0xd2,0x67,0x8f,0x56,0x89,0xa4,0x1b,0x4b,0x12,0x83,0x9f,0x41,0xc5,0x7a, +0x9f,0x89,0xec,0xe2,0xf0,0xdf,0x81,0xf4,0x8f,0x0d,0xc9,0x70,0xe6,0xfd,0xc1,0xd4, +0xa5,0x88,0xff,0x00,0x03,0xcb,0xb5,0x54,0x1f,0x72,0x8a,0xbf,0x9d,0x70,0xbf,0x0c, +0x91,0x7c,0x4d,0xf1,0x1b,0x42,0xb2,0xb8,0x95,0xa7,0xb2,0x8e,0x74,0xf3,0x37,0x77, +0x4c,0x8d,0xdf,0xa6,0x6b,0xda,0xff,0x00,0xe1,0x1d,0x83,0xfe,0x17,0xf4,0xcf,0xac, +0x48,0x97,0xd6,0xcb,0x27,0xdb,0x3c,0xb1,0xca,0x95,0x27,0xf7,0x48,0x7d,0x95,0x7a, +0x8f,0x6a,0xea,0xa6,0xb9,0xb5,0x33,0xbe,0x87,0xae,0x7e,0xcc,0x3e,0x1d,0xb2,0xf8, +0x07,0xe1,0xdb,0xbf,0x88,0x5e,0x23,0xc4,0x77,0xcd,0x6c,0xe6,0xda,0xdd,0xc7,0xcf, +0x82,0x3e,0xf6,0x3b,0x13,0xda,0xac,0x7e,0xc1,0xba,0xe5,0xd6,0xbb,0xfb,0x46,0x5e, +0xeb,0x17,0x2a,0x4c,0xfa,0x82,0x4f,0x3b,0x9f,0x76,0x39,0x02,0xbc,0xd3,0xe3,0x07, +0x8c,0x25,0xf1,0xce,0xad,0x67,0xa4,0x2d,0xc3,0x32,0xb6,0xdd,0xc8,0xbd,0x00,0xcf, +0x02,0xbe,0x94,0xfd,0x8c,0xfe,0x17,0xc7,0xe1,0xdf,0x89,0x56,0xda,0xb4,0x5b,0x8d, +0xbc,0x30,0x79,0x44,0xf6,0xdc,0x7d,0x6b,0x69,0xad,0x1d,0xb6,0x48,0x86,0xf4,0x3d, +0x43,0xf6,0x69,0xd7,0x24,0xd3,0xfe,0x23,0x6b,0x56,0xb7,0x0d,0x89,0xa6,0xba,0x90, +0xb0,0xf6,0xdc,0x71,0x5f,0x41,0xf8,0xaf,0x4b,0x6b,0x7f,0x8b,0xfe,0x03,0xd7,0xd3, +0x9f,0xf8,0xf8,0xd3,0x64,0xc0,0xfe,0x17,0x5d,0xe0,0xfe,0x6b,0x5f,0x33,0xf8,0xf1, +0x7f,0xe1,0x4c,0xfc,0x64,0x37,0x70,0xa3,0x0b,0x2b,0xc9,0x77,0x99,0x3b,0x2e,0xe6, +0x04,0xe6,0xbe,0xbd,0x4f,0x23,0x59,0xb1,0xd2,0x6f,0xd4,0x87,0xf2,0xdd,0x6e,0x63, +0x6f,0xc0,0xff,0x00,0x43,0x5c,0xb8,0x9b,0x73,0x46,0xa2,0xd9,0xa2,0x1e,0xe7,0x68, +0x7b,0x83,0x51,0xba,0xe2,0xa6,0x5f,0xde,0x2a,0xb7,0x72,0x33,0x49,0xec,0x6b,0xc5, +0x32,0x20,0xa6,0xd4,0xac,0x9d,0xe9,0x95,0x64,0x8c,0x65,0xe9,0x83,0x9a,0x8e,0x45, +0xdd,0xc8,0x15,0x36,0x36,0xf2,0x29,0x0a,0x9d,0xb9,0x1c,0x7a,0xd3,0x20,0xa8,0xcb, +0xd7,0xd6,0xa2,0x65,0xab,0x6c,0x85,0x86,0x45,0x40,0xcb,0xde,0xa9,0x08,0xaa,0xcb, +0xd6,0xa0,0x65,0xfc,0xea,0xdb,0x29,0x39,0xa8,0x5d,0x69,0x8c,0xcc,0xd5,0x2f,0xed, +0xb4,0x9d,0x3e,0xea,0xfa,0xee,0x41,0x0d,0xad,0xb4,0x4d,0x34,0xb2,0x37,0x45,0x55, +0x19,0x27,0xf2,0x15,0xf9,0x07,0xf1,0xbf,0xe2,0x44,0xff,0x00,0x15,0xfe,0x26,0x6b, +0x5e,0x21,0x95,0x98,0xc1,0x3c,0xc5,0x2d,0x50,0x92,0x7c,0xb8,0x17,0x84,0x51,0xe9, +0xc7,0x3f,0x52,0x6b,0xef,0xff,0x00,0xdb,0x9b,0xe2,0x3f,0xfc,0x21,0x1f,0x06,0xee, +0x74,0xcb,0x79,0x36,0xdf,0xeb,0x8e,0x2c,0xd4,0x03,0x82,0x21,0xc1,0x32,0x1f,0xc8, +0x01,0xff,0x00,0x02,0xaf,0xcc,0x6a,0xfa,0x5c,0xae,0x8d,0xa2,0xea,0xbf,0x43,0xf7, +0x7f,0x0e,0xb2,0xb5,0x4e,0x8d,0x5c,0xca,0x6b,0x59,0x7b,0xb1,0xf4,0x5b,0xfd,0xef, +0xf2,0x12,0x8a,0x28,0xaf,0x78,0xfd,0x98,0x28,0xa2,0x8a,0x00,0xf7,0x6f,0xd8,0xf7, +0xe3,0xe1,0xf8,0x13,0xf1,0x4e,0x09,0xef,0xa4,0x61,0xe1,0xbd,0x5b,0x6d,0xa6,0xa4, +0xb9,0xe2,0x35,0x27,0xe4,0x9b,0xfe,0x02,0x4f,0x3e,0xc4,0xd7,0xeb,0xdd,0xb5,0xc4, +0x57,0x96,0xf1,0x4f,0x04,0x8b,0x2c,0x32,0xa8,0x74,0x91,0x0e,0x43,0x29,0x19,0x04, +0x1f,0x4c,0x57,0xe0,0x75,0x7d,0xcb,0xfb,0x10,0xfe,0xd9,0x30,0x78,0x62,0xde,0xd7, +0xe1,0xf7,0x8e,0xaf,0xbc,0xad,0x35,0x48,0x8f,0x49,0xd5,0x66,0x3f,0x2c,0x19,0x3c, +0x41,0x21,0xec,0xbf,0xdd,0x3d,0x07,0x43,0xda,0xbe,0x7b,0x34,0xc1,0x3a,0x9f,0xbe, +0xa6,0xb5,0x5b,0x9f,0x92,0xf1,0xb7,0x0e,0x4f,0x19,0x1f,0xed,0x1c,0x24,0x6f,0x38, +0xaf,0x79,0x2d,0xda,0xee,0xbc,0xd7,0xe5,0xe8,0x7e,0x88,0xd1,0x4c,0x8e,0x44,0x9a, +0x35,0x92,0x37,0x59,0x23,0x61,0xb9,0x59,0x4e,0x41,0x07,0xb8,0x34,0xfa,0xf9,0x33, +0xf0,0x40,0xa2,0x8a,0x28,0x00,0xa2,0x8a,0x28,0x00,0xa2,0x8a,0x28,0x00,0xa2,0x8a, +0x28,0x03,0x82,0xf8,0xc9,0xf0,0x57,0xc3,0x7f,0x1d,0x3c,0x29,0xfd,0x83,0xe2,0x68, +0xee,0x5a,0xd9,0x1f,0xcd,0x86,0x5b,0x59,0xda,0x37,0x86,0x4c,0x60,0x38,0xfe,0x13, +0xf4,0x60,0x45,0x7e,0x64,0xfe,0xd1,0xdf,0xb1,0xaf,0x8a,0xfe,0x02,0xbc,0xba,0xa4, +0x04,0xf8,0x83,0xc2,0x5b,0xb0,0xba,0xa4,0x09,0x87,0x87,0x27,0x81,0x32,0x7f,0x09, +0xff,0x00,0x68,0x65,0x4f,0xa8,0xe9,0x5f,0xae,0x75,0x05,0xe5,0x95,0xbe,0xa5,0x69, +0x35,0xad,0xdc,0x11,0xdd,0x5a,0xcc,0x86,0x39,0x61,0x99,0x03,0xa3,0xa9,0x18,0x2a, +0xc0,0xf0,0x41,0xf4,0xaf,0x47,0x0b,0x8e,0xa9,0x85,0x76,0x5a,0xc7,0xb1,0xf5,0xd9, +0x1f,0x13,0x63,0x32,0x49,0x28,0xc1,0xf3,0x52,0xeb,0x17,0xfa,0x76,0x7f,0x87,0x74, +0x7e,0x08,0x53,0x65,0x8d,0x66,0x8d,0xe3,0x7e,0x55,0x86,0x0d,0x7d,0x3f,0xfb,0x6e, +0x7e,0xcc,0x31,0xfc,0x0f,0xf1,0x64,0x3a,0xe7,0x87,0xe1,0x65,0xf0,0x86,0xb1,0x23, +0x79,0x51,0x72,0x7e,0xc7,0x37,0x56,0x8b,0x3f,0xdd,0x3d,0x57,0x3d,0xb2,0x39,0xc5, +0x7c,0xc5,0x5f,0x6d,0x46,0xac,0x6b,0xc1,0x54,0x86,0xcc,0xfe,0x94,0xc1,0x63,0x30, +0xd9,0xbe,0x12,0x35,0xe9,0x7b,0xd0,0x9a,0xd9,0xfd,0xcd,0x3f,0xc9,0x9c,0x4d,0xc4, +0x2d,0x6f,0x33,0xc4,0xdd,0x54,0xe2,0xa3,0xad,0x7f,0x12,0x5b,0xf9,0x77,0x49,0x28, +0x1c,0x48,0xbc,0xfd,0x47,0xf9,0x15,0x91,0x49,0xe8,0xcf,0xe3,0x4c,0xf3,0x2e,0x79, +0x4e,0x65,0x5f,0x05,0xd2,0x12,0x76,0xf4,0x7a,0xaf,0xc1,0xa0,0xa2,0x8a,0x29,0x1e, +0x18,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x01,0xa7,0x7b,0xa9,0x5c,0x6b,0x1a,0x7c, +0x06,0xf6,0xff,0x00,0xcc,0x6b,0x18,0xd6,0xda,0xda,0xdd,0x93,0x9f,0x2f,0x9e,0x01, +0x03,0x18,0x1e,0xfc,0xf3,0x5e,0x95,0xf0,0x8f,0xe3,0x68,0xf0,0x8d,0xaa,0xe8,0xfa, +0xd2,0xc9,0x36,0x98,0xa7,0xf7,0x33,0xa0,0xdc,0xf0,0xe4,0xf2,0x08,0xee,0xbf,0xca, +0xbc,0x92,0x29,0x1a,0x19,0x52,0x44,0x38,0x74,0x60,0xca,0x71,0x9e,0x47,0x22,0xac, +0xcb,0x73,0x15,0xd4,0x37,0x32,0xdc,0x79,0xb2,0x6a,0x12,0x4a,0x1c,0x48,0x08,0x09, +0x83,0x9d,0xd9,0x18,0xeb,0x9c,0x63,0x1c,0x57,0x45,0x2a,0xd3,0xa5,0x3e,0x78,0xbd, +0x4f,0x33,0x17,0x80,0xa1,0x8c,0xa2,0xf0,0xf5,0x63,0x78,0xf9,0x69,0x67,0xdd,0x7e, +0x67,0xdb,0x7a,0x3f,0xed,0x11,0x61,0x61,0xa4,0xc5,0x0e,0x9f,0xe3,0x74,0xb4,0xb2, +0x42,0xcf,0x1c,0x4b,0x73,0xe5,0xec,0x24,0x73,0x85,0x3c,0x83,0x5e,0x63,0xf1,0x5b, +0xe3,0x13,0x59,0xf8,0x56,0x0b,0xaf,0x0e,0xee,0xbb,0x83,0x52,0x79,0x6d,0xc6,0xac, +0xb9,0xd9,0x14,0x8a,0x7e,0x74,0xe7,0x9f,0x33,0x04,0x30,0xcf,0x66,0x04,0x66,0xbe, +0x76,0xfe,0xcf,0xb6,0x6b,0xd5,0x85,0x75,0x18,0x3c,0xa3,0x16,0xf3,0x70,0xca,0xe1, +0x43,0x6d,0xce,0xce,0x99,0xce,0x78,0xce,0x31,0x9a,0xeb,0x3c,0x07,0xe2,0x0d,0x07, +0x4f,0xd3,0x5f,0x4a,0xd5,0xe6,0x98,0xd9,0xea,0x93,0xaa,0xde,0x2c,0xb0,0xef,0x86, +0xd0,0xaf,0x30,0xdc,0xae,0x0e,0xe2,0xc8,0xc4,0x86,0x18,0xe5,0x19,0x87,0x7a,0xeb, +0xa9,0x8e,0xa9,0xca,0xf9,0x22,0xa3,0x7d,0xed,0xbb,0x3e,0x7f,0x0f,0xc3,0xb8,0x4a, +0x75,0x23,0x2a,0xb3,0x9d,0x44,0xbe,0x14,0xf6,0x5d,0xaf,0xa6,0xda,0x79,0x79,0x9c, +0x95,0x9e,0xfb,0x58,0xff,0x00,0xb4,0x19,0x2d,0xee,0x63,0xde,0xd1,0x18,0xa6,0x6c, +0x92,0x4a,0x9e,0x4a,0xe7,0x3c,0x67,0x39,0xf5,0xaa,0x35,0xaf,0xe2,0xdd,0x16,0xf3, +0xc3,0xfe,0x24,0xbf,0xb0,0xbf,0x86,0x38,0x2e,0x63,0x94,0x92,0xb0,0x8c,0x44,0xca, +0xdf,0x32,0xb4,0x7e,0xa8,0xca,0x43,0x29,0xee,0x08,0xac,0x8a,0xf3,0x6e,0x9e,0xc7, +0xd8,0x28,0xb4,0xee,0xf7,0x0a,0x28,0xaf,0x68,0xf8,0x4b,0xf0,0x2d,0x3c,0x43,0x67, +0x16,0xb3,0xe2,0x01,0x22,0x59,0x49,0xf3,0x41,0x68,0xa7,0x6b,0x4a,0x3f,0xbc,0xc7, +0xb2,0x9e,0xc0,0x75,0xad,0xa8,0xd1,0x9d,0x79,0x72,0x41,0x1c,0x58,0xec,0x75,0x0c, +0xbe,0x97,0xb6,0xae,0xec,0xbf,0x17,0xe4,0x8f,0x2c,0xd2,0x74,0xfd,0x4b,0xc6,0x9a, +0xf6,0x9f,0xa6,0xc0,0xcd,0x77,0x7f,0x72,0xd1,0xda,0xc3,0xe6,0xbf,0x40,0x06,0x06, +0x58,0xf4,0x55,0x51,0xd4,0xf0,0x00,0xf4,0x15,0xe8,0x97,0x4d,0xa2,0xb6,0x9e,0xd1, +0xab,0x38,0xf0,0x1e,0x87,0x2e,0xc4,0x55,0xc2,0x4b,0xad,0x5e,0xe3,0xe6,0x90,0x91, +0xd8,0x9c,0xe3,0xfb,0x89,0x81,0xd4,0x9a,0xfa,0x13,0x4b,0xf0,0x7e,0x87,0xa2,0x81, +0xf6,0x1d,0x26,0xd2,0xd4,0x85,0x64,0xdd,0x1c,0x43,0x76,0xd6,0x05,0x58,0x67,0xae, +0x08,0x24,0x1f,0x50,0x4d,0x66,0x6b,0x9f,0x0c,0x7c,0x3d,0xaf,0x2e,0x9c,0x93,0xd8, +0xac,0x50,0xd8,0xcd,0xe7,0x45,0x0c,0x07,0x64,0x64,0x92,0x09,0x0c,0xa3,0x82,0x0e, +0x05,0x7a,0x91,0xca,0x65,0x06,0x9d,0xd3,0xb6,0xcb,0xa1,0xf1,0x35,0x38,0xbe,0x85, +0x55,0xec,0xd4,0x25,0x14,0xf7,0x7a,0x5e,0xde,0x5d,0x9b,0xda,0xfd,0x37,0x3c,0xb3, +0xc2,0xff,0x00,0x0c,0xf5,0x6f,0x8a,0x4b,0x06,0xab,0xe2,0x49,0x5b,0x4b,0xd0,0xd4, +0x7f,0xa1,0x69,0x76,0xa3,0x60,0x54,0xed,0xb5,0x7a,0x28,0xc7,0x7e,0xa6,0xbd,0x67, +0x4b,0xf8,0x6d,0xe1,0x7d,0x1a,0x14,0x8e,0xdb,0x43,0xb3,0x1b,0x46,0x37,0x4b,0x10, +0x91,0x8f,0xb9,0x2d,0x9a,0xef,0x74,0xbf,0x09,0xde,0xdf,0x5f,0x69,0x56,0x62,0x16, +0x8c,0x5f,0xed,0xf2,0xbc,0xa4,0xf3,0x18,0x46,0x4e,0x37,0xec,0x5e,0x71,0xf9,0x57, +0xb6,0x7c,0x3f,0xfd,0x96,0xf5,0x9b,0xeb,0xab,0xd9,0x75,0x88,0x61,0xb1,0xb0,0x91, +0x1a,0x3b,0x67,0xbc,0x5d,0xf3,0xaf,0x38,0xdf,0xe5,0x29,0xda,0x0e,0x33,0x8d,0xc7, +0x8c,0x83,0x83,0x5d,0x35,0x6b,0x60,0xb2,0xf8,0xf3,0x56,0x92,0xbf,0x9e,0xef,0xd3, +0xfc,0x91,0xe0,0x46,0x39,0xb6,0x75,0x53,0xd9,0xe1,0xe2,0xe3,0x05,0xd1,0x68,0x96, +0x97,0xd7,0xd7,0xbb,0xdd,0xb3,0xe5,0xfd,0x4b,0xe1,0xd7,0x87,0xb5,0x2b,0x60,0xd7, +0x7e,0x1f,0xb3,0x68,0x64,0x25,0x44,0x82,0xdc,0x26,0x4f,0xa0,0x60,0x07,0x3f,0x8d, +0x79,0x67,0x8a,0x3e,0x0f,0xea,0x5e,0x05,0x92,0x6d,0x63,0xc1,0x57,0x33,0x6d,0x50, +0x4d,0xc6,0x97,0x3f,0xce,0x24,0x4e,0xeb,0x83,0xf7,0xc6,0x33,0xc1,0xe7,0xd2,0xbf, +0x56,0xf4,0xdf,0x87,0x1e,0x04,0xf8,0x67,0xa5,0xe9,0xc9,0xa9,0xbc,0x37,0x52,0x5a, +0x06,0x5b,0x69,0x75,0x46,0x12,0x3f,0x27,0x71,0x08,0x9d,0x33,0x9f,0x41,0x9a,0xcc, +0xf8,0xa1,0xf0,0xef,0xc2,0xbf,0x12,0x7c,0x27,0x27,0x88,0xed,0x74,0x9b,0x8b,0xeb, +0xbb,0x48,0x24,0x68,0x62,0xd3,0xf1,0x6d,0x34,0xac,0x38,0x2a,0xc0,0xae,0x72,0xb8, +0xce,0x08,0xcf,0xe7,0x5e,0x0c,0xb3,0xcc,0x2d,0x7a,0x89,0x3a,0x4d,0x45,0xbb,0x29, +0x6d,0xaf,0x4f,0xe9,0xb3,0xea,0xa8,0xf0,0xfe,0x63,0x81,0xa5,0x29,0x47,0x10,0xa5, +0x24,0xae,0xe9,0xbb,0xb4,0xd7,0x5b,0xef,0xf2,0xb2,0x3f,0x11,0xbc,0x4d,0x7d,0xa7, +0xea,0x5a,0xa3,0x5c,0xe9,0xd6,0x0d,0xa6,0xc7,0x22,0x83,0x2d,0xb6,0xec,0xa2,0x49, +0xfc,0x5b,0x3d,0x17,0x3d,0x01,0xe9,0x59,0x55,0xee,0xbf,0xb4,0x87,0xc1,0x5d,0x5f, +0xc3,0x1a,0xfd,0xd6,0xbf,0x69,0xe1,0xfb,0xdb,0x1d,0x2a,0x63,0xba,0xe6,0x36,0x85, +0xb1,0x6d,0x27,0xa9,0xe3,0xa1,0x18,0x39,0xe9,0x9c,0xd7,0x85,0x52,0xa8,0xb9,0x66, +0xd3,0x67,0xd6,0xe0,0xaa,0xc6,0xbe,0x1a,0x15,0x20,0x9a,0x4d,0x75,0xbd,0xfb,0x5b, +0x5d,0x74,0x0a,0x28,0xa2,0xb2,0x3b,0x82,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x0f, +0xdb,0x69,0x14,0xee,0x3d,0xe9,0x98,0xe7,0x15,0x7a,0x48,0x6a,0xbe,0xc2,0x2b,0xe1, +0x8f,0x6e,0xe0,0xab,0xed,0xcd,0x4a,0x94,0xc5,0xa9,0x56,0x98,0x0e,0x51,0x52,0xa0, +0xa6,0x2f,0xa5,0x4a,0x8b,0x81,0x40,0x89,0x63,0x5e,0xf5,0x66,0x35,0xc5,0x43,0x1a, +0x9e,0x95,0x61,0x68,0x24,0x91,0x05,0x4c,0x95,0x1a,0x76,0xa9,0x54,0x50,0x07,0x9c, +0xfc,0x4e,0xf8,0x89,0xf0,0xe3,0xe0,0xa6,0xef,0x11,0xf8,0x99,0x74,0xfb,0x2d,0x52, +0xe0,0x7c,0x8f,0x15,0xaa,0xbd,0xe4,0xe4,0x71,0xc6,0x06,0x4f,0xd6,0xbe,0x41,0xf8, +0x91,0xfb,0x67,0x7c,0x45,0xf8,0xeb,0x75,0x26,0x87,0xf0,0xaf,0x42,0xd4,0x6c,0x6c, +0x18,0xed,0x79,0xad,0x23,0x69,0x6e,0xe4,0xe7,0xbb,0x0e,0x10,0x7b,0x7e,0xb5,0xf5, +0x67,0xc5,0x1f,0xd9,0x73,0xc1,0x7f,0x19,0x7c,0x63,0xa7,0xeb,0xfe,0x26,0x5b,0xd9, +0xe6,0xb4,0x84,0x40,0x6d,0xa2,0x9b,0x6c,0x52,0x28,0x24,0x8d,0xdc,0x64,0x75,0xed, +0x5f,0x3d,0xf8,0xd3,0xc4,0xdf,0x18,0xaf,0xbc,0x55,0xa9,0x7c,0x32,0xf8,0x47,0xe0, +0x98,0xbc,0x0f,0xa1,0xd9,0x48,0x60,0x6b,0xeb,0x58,0x3c,0xb7,0x64,0xe9,0xe6,0x34, +0xc7,0x80,0x0f,0x5c,0xf2,0x6b,0x9e,0x7c,0xd7,0xec,0x8f,0x5b,0x0e,0xa9,0xc9,0x26, +0xb5,0x92,0xde,0xfb,0x23,0xc0,0xb5,0xaf,0x85,0xda,0x67,0x81,0x2f,0xbe,0xdf,0xf1, +0xa7,0x5e,0xbb,0xb8,0xd7,0x24,0x5f,0x31,0x7c,0x37,0xa6,0xcf,0xe7,0x5f,0x3e,0x7a, +0x79,0xd2,0x9c,0xac,0x23,0xd8,0xf3,0x58,0x7a,0x0f,0xc0,0x6f,0x15,0xfc,0x74,0xd4, +0x6f,0xf5,0x2f,0x01,0xf8,0x2e,0x5d,0x37,0xc3,0x91,0x0f,0xdd,0xa3,0x4c,0x59,0x06, +0xd1,0xce,0x65,0x7f,0xbc,0xde,0xa0,0x57,0xd8,0x1f,0x0b,0xff,0x00,0xe0,0x9d,0xba, +0x75,0xbd,0xf2,0x6b,0x3f,0x11,0x35,0xc9,0xfc,0x43,0xaa,0xc8,0x7c,0xd9,0xad,0xe0, +0x73,0xe5,0xb3,0xf5,0xf9,0xa4,0x3c,0xb7,0xe9,0x5d,0x17,0xed,0x81,0xf1,0x9e,0x1f, +0x83,0x3e,0x05,0xd3,0xfe,0x1e,0x78,0x19,0x22,0xb2,0xf1,0x06,0xac,0xbf,0x67,0x8a, +0xda,0xc9,0x40,0x36,0x96,0xe7,0x8c,0x80,0x3a,0x33,0x12,0x00,0xfc,0x4d,0x63,0xc9, +0xa5,0xde,0x8b,0xf1,0x3a,0x95,0x7b,0xcd,0x46,0x9b,0xbb,0xfc,0x0f,0xcd,0x8b,0x1f, +0x02,0x6a,0xba,0xb7,0x88,0x97,0x45,0xb2,0xb5,0x96,0xea,0xff,0x00,0xce,0x36,0xe2, +0x08,0x54,0xb3,0x6f,0xce,0x08,0xc0,0xaf,0xd1,0x3f,0xd9,0x7b,0xf6,0x21,0x5f,0x06, +0xd9,0xc7,0xab,0xf8,0xc9,0x15,0xee,0xe6,0x4c,0xae,0x9c,0x8d,0x92,0xb9,0x1d,0x5d, +0x87,0x7f,0x61,0x5e,0x9b,0xfb,0x25,0xfe,0xce,0xfa,0x7f,0xc1,0xdf,0x02,0xd8,0x5d, +0xdf,0xd8,0xa3,0xf8,0xb2,0xfa,0x31,0x35,0xdd,0xcc,0xab,0xba,0x48,0x8b,0x73,0xe5, +0x82,0x7a,0x11,0x9e,0x7d,0xeb,0xe8,0x18,0xc6,0x17,0x9a,0x70,0xa5,0xd6,0x46,0x18, +0x8c,0x5b,0xbb,0x85,0x3f,0xbc,0xfc,0xe6,0xfd,0xa6,0x3f,0x67,0xff,0x00,0xf8,0x56, +0x3a,0xc7,0xda,0x20,0x9b,0xcc,0xd3,0x6f,0xdd,0xda,0xcc,0x91,0x96,0xe0,0x64,0xa1, +0x3e,0xa3,0xf5,0xaf,0x96,0xef,0xed,0xa7,0x8e,0xf9,0x8b,0x23,0xe0,0x74,0x66,0x1d, +0x2b,0xf5,0x6b,0xf6,0xaa,0xf8,0x6f,0x37,0xc4,0x2f,0x85,0xb7,0xa6,0xd1,0x77,0x5f, +0x69,0x81,0xee,0xa2,0x00,0x72,0xcb,0xb7,0xe7,0x03,0xdf,0x03,0x8f,0xa5,0x7e,0x61, +0xea,0x50,0xb4,0x72,0x4f,0x0b,0x2e,0x24,0x8c,0xe7,0x69,0xc9,0x38,0xe8,0x0f,0xe9, +0x5f,0x17,0x99,0x51,0x78,0x5a,0xfe,0xe2,0xf7,0x59,0xeb,0xe0,0xaa,0x7d,0x62,0x97, +0xbc,0xfd,0xe4,0x73,0xf2,0xfd,0x9e,0x7c,0x24,0x87,0x64,0xbd,0x9d,0x7a,0xd6,0x75, +0xe4,0x33,0xc7,0x1c,0xb1,0x79,0x9e,0x5b,0x30,0xf9,0x26,0x1c,0x8f,0xcb,0xd6,0x9f, +0xac,0x5b,0xb0,0x19,0xe4,0x66,0xab,0x47,0xa9,0xfe,0xec,0xc5,0x20,0xde,0x3f,0xda, +0xae,0x18,0xae,0xa8,0xea,0x7e,0x67,0x41,0xf0,0xff,0x00,0xe2,0x5f,0x8c,0x3e,0x17, +0x78,0x86,0x1b,0xef,0x0e,0xea,0x77,0x56,0xa6,0xd4,0x19,0xc4,0xb0,0xc9,0x84,0x62, +0x57,0x6b,0x6f,0x8f,0x3b,0x5b,0x83,0xdc,0x57,0xda,0x1f,0x01,0xff,0x00,0xe0,0xa5, +0x96,0xad,0x69,0x06,0x9f,0xf1,0x2e,0x06,0x77,0x2f,0xb5,0x75,0xcd,0x36,0x1c,0xa8, +0x5c,0x60,0x79,0xb1,0x8e,0x73,0x9e,0xe3,0xf2,0xaf,0x83,0x1a,0xed,0x23,0x53,0xd4, +0xa1,0xf6,0xcf,0xe7,0x50,0x49,0x74,0x91,0xda,0xa2,0x45,0x1c,0x4a,0x8b,0x92,0x0a, +0x28,0x04,0xe7,0xd7,0xd6,0xbd,0xbc,0x3e,0x36,0x70,0xd2,0xdf,0xe5,0xff,0x00,0x00, +0xf3,0xeb,0x61,0xe1,0x3d,0x59,0xfb,0xc9,0xe1,0x7f,0x14,0x69,0x3e,0x34,0xd0,0xed, +0xb5,0x8d,0x0f,0x50,0x87,0x54,0xd3,0x2e,0x46,0xe8,0xae,0xad,0xdc,0x32,0x30,0xff, +0x00,0x1f,0x6a,0xd7,0x55,0xaf,0xc5,0x7f,0xd9,0x9b,0xf6,0xa3,0xf1,0x0f,0xec,0xfb, +0xe2,0xc8,0xa5,0xb6,0x79,0x2f,0x7c,0x39,0x71,0x26,0x2f,0xf4,0x87,0x62,0x55,0x81, +0xea,0xf1,0xf6,0x57,0x1e,0xbd,0xeb,0xf6,0x4f,0xc2,0x7e,0x28,0xd3,0xbc,0x67,0xe1, +0xbd,0x37,0x5c,0xd2,0xa7,0xfb,0x46,0x9f,0xa8,0x40,0xb3,0xc1,0x26,0x31,0x95,0x61, +0xdf,0xdf,0xb7,0xe1,0x5f,0x49,0x4a,0xa2,0xa9,0x1b,0xa3,0xc5,0xab,0x49,0xd3,0x7e, +0x46,0xbd,0x14,0x53,0x96,0xb6,0x39,0xc1,0x7a,0x51,0x45,0x14,0x14,0x14,0x0c,0x96, +0xa2,0xa5,0x51,0x81,0x48,0xa4,0x79,0x0f,0xed,0x4b,0xa8,0x26,0x9f,0xf0,0x57,0x5f, +0x56,0x6d,0xad,0x71,0xb2,0x15,0xf7,0x25,0x81,0xc7,0xe9,0x5f,0x99,0x7a,0x84,0x6d, +0x35,0xc4,0xb8,0x1c,0xe6,0xbe,0xf6,0xfd,0xb8,0x75,0xa3,0x6f,0xe1,0x3d,0x17,0x4c, +0x57,0xc1,0xb8,0xb9,0x79,0x5d,0x7b,0xe1,0x46,0x33,0xf9,0x9a,0xf8,0x75,0xed,0x1a, +0x4b,0xad,0x88,0xbb,0x99,0x8f,0x02,0xbc,0x9c,0x56,0xb3,0x48,0xfa,0x4c,0xb6,0x3c, +0xb4,0x9b,0xee,0x68,0xfc,0x30,0xf0,0x8c,0xba,0xff,0x00,0x8a,0x2c,0x2c,0xfe,0x6d, +0xb2,0x4a,0xa1,0x82,0x75,0x23,0x3d,0x2b,0xd6,0xff,0x00,0xe0,0xa0,0x3f,0xb3,0xdf, +0x86,0x6d,0x3c,0x13,0xa2,0x78,0x9b,0xed,0xf6,0x36,0x3a,0xf4,0x36,0xe2,0xd7,0xec, +0x37,0x23,0xe6,0xbc,0x51,0x8c,0x6c,0x03,0xba,0xe4,0xe7,0xb7,0x35,0xe9,0x1f,0xb2, +0x1f,0xc1,0xb7,0x9b,0x52,0x5f,0x13,0x5e,0x47,0x9b,0x7b,0x7f,0xf5,0x5b,0x87,0x0c, +0xfe,0xdf,0x4a,0xf9,0xdb,0xfe,0x0a,0x23,0x27,0x8b,0x97,0xe3,0x1c,0xeb,0xae,0x48, +0xdf,0xd8,0x10,0xc5,0x9d,0x24,0xb2,0x6d,0x8d,0x62,0x60,0x37,0x6d,0x3d,0xce,0x47, +0x3f,0x85,0x76,0x60,0x69,0x7b,0xdc,0xec,0xc3,0x1d,0x5f,0x9a,0x4a,0x9c,0x5e,0xdb, +0x9f,0x03,0xf8,0xb0,0x59,0x69,0x73,0x5c,0x59,0x47,0x3c,0x71,0x28,0x6d,0x92,0x2d, +0xba,0x7c,0xc4,0xf7,0x00,0x9a,0xe2,0xf5,0xcd,0x48,0xc9,0x6f,0x05,0xb2,0x0d,0x91, +0x42,0x36,0x22,0x7b,0x0f,0x5a,0xdb,0xf1,0xd6,0xb9,0x15,0xde,0xa3,0x38,0x82,0x20, +0xa8,0xcd,0x92,0xe5,0x70,0x4d,0x62,0x69,0x3a,0x6c,0x9a,0xd4,0xb2,0xc9,0xb4,0x2c, +0x51,0xf0,0xc5,0x8d,0x7b,0xbe,0x47,0x95,0x27,0x7d,0x0e,0xeb,0xe0,0x7c,0xd0,0x68, +0x3e,0x20,0xb5,0xd4,0xae,0x54,0x30,0xf2,0xee,0x25,0xe7,0xb0,0x58,0x5c,0x03,0xff, +0x00,0x7d,0x11,0x5b,0x5a,0x0f,0x8d,0xd9,0xbc,0x41,0x7b,0xab,0x5c,0x4b,0xb6,0x36, +0xc1,0x66,0x63,0xd1,0x57,0xa0,0xae,0x37,0x50,0x90,0x78,0x7e,0x34,0xb7,0x82,0x4c, +0xcd,0x35,0xa8,0x8f,0x6a,0xff,0x00,0x08,0x66,0xc9,0x1f,0x88,0x03,0xf3,0xa7,0x78, +0x53,0x41,0xbd,0xf1,0x96,0xaf,0x6f,0xa6,0x59,0x42,0xd3,0x26,0xf0,0xbb,0x10,0x7f, +0xac,0x7f,0x4f,0xa5,0x75,0x43,0xdd,0x56,0x41,0xa2,0x56,0x3d,0x9b,0xe0,0xef,0x87, +0x75,0x0f,0x89,0x5f,0x10,0xa0,0x7b,0x68,0x98,0xf9,0xf3,0x6f,0x1b,0x7a,0x22,0x0e, +0x95,0xfa,0x05,0x6f,0xac,0x41,0xf0,0xde,0xf3,0xc3,0xde,0x19,0xd0,0xf3,0x35,0xcf, +0xda,0x52,0x4b,0xb9,0x31,0xc8,0x5c,0xfc,0xd9,0x35,0xe0,0x3e,0x1d,0xd6,0x3c,0x2b, +0xfb,0x2f,0xf8,0x16,0x48,0x6e,0x2e,0x04,0xde,0x2d,0xb8,0x84,0x6e,0x58,0xd7,0x3b, +0x58,0x8c,0x6d,0x53,0xd8,0x0a,0x5f,0x03,0xf8,0xbb,0x55,0xf1,0xc7,0x8d,0x34,0xcd, +0x65,0xee,0x19,0x34,0xf8,0x95,0x21,0x3b,0x06,0x72,0xd9,0xce,0x4d,0x76,0x45,0x25, +0xee,0xb2,0x19,0xf6,0x1f,0xed,0x17,0xa1,0x5a,0xea,0xd6,0xb6,0x97,0x73,0xa2,0xbd, +0xbc,0x92,0x2c,0x72,0xb7,0x70,0xa7,0xa3,0x03,0xf5,0xaf,0x4c,0xf0,0x0e,0xfb,0x3f, +0x01,0xe9,0xd6,0xf2,0x93,0x98,0x10,0x46,0xa4,0xf7,0x5c,0x71,0xfa,0x57,0x90,0x7c, +0x7d,0xd7,0x16,0x6f,0x84,0xf7,0x02,0x17,0xcd,0xca,0xc9,0x08,0x52,0x3a,0x93,0x9e, +0x95,0xeb,0x9e,0x08,0x76,0xbd,0xf0,0x1e,0x84,0xc3,0x86,0x65,0x89,0x5f,0xd8,0xf1, +0x9a,0xe0,0xa9,0xfc,0x25,0x17,0xd1,0x92,0xfa,0x1e,0xb1,0x6b,0xff,0x00,0x1e,0xf1, +0x7f,0xba,0x3f,0x95,0x48,0xcb,0xb8,0x50,0xab,0xb5,0x42,0x8e,0xdc,0x52,0xd7,0x8c, +0x62,0xc8,0xfa,0x7d,0x69,0x8c,0xa7,0x9c,0x54,0xac,0xbb,0xbe,0xb4,0xd3,0xce,0x45, +0x00,0x43,0xc5,0x26,0x76,0x9f,0x6a,0x73,0x2e,0xda,0x6d,0x58,0x86,0xb6,0x17,0xe6, +0xfe,0x1a,0x82,0x45,0x3c,0x9c,0x75,0xab,0x3d,0x46,0x0d,0x46,0xc3,0x2b,0x8e,0xe2, +0xa8,0x82,0xa1,0x18,0xa8,0x18,0x62,0xad,0x32,0xf7,0xa8,0x24,0xf9,0x4e,0x4f,0x4a, +0x62,0x3f,0x37,0xbf,0xe0,0xa1,0x9e,0x34,0x3a,0xd7,0xc5,0x2b,0x1d,0x0a,0x33,0xfb, +0x9d,0x26,0xd8,0x2b,0x0c,0xff,0x00,0xcb,0x47,0xf9,0x89,0xfc,0xb1,0x5f,0x28,0x57, +0xa6,0x7e,0xd1,0xde,0x20,0x6f,0x12,0xfc,0x66,0xf1,0x4d,0xe9,0x39,0x53,0x7d,0x2a, +0x2f,0xfb,0xaa,0xc5,0x47,0xe8,0x05,0x79,0x9d,0x7d,0xde,0x16,0x1e,0xce,0x8c,0x63, +0xe4,0x7f,0x5f,0x70,0xfe,0x15,0x60,0xf2,0xbc,0x3d,0x15,0xd2,0x2a,0xfe,0xaf,0x57, +0xf9,0x85,0x14,0x51,0x5d,0x27,0xd0,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x1e, +0xf5,0xf0,0x53,0xf6,0xd0,0xf8,0x87,0xf0,0x5e,0xd6,0x1d,0x36,0x0b,0xb8,0xf5,0xed, +0x06,0x2c,0x05,0xd3,0x75,0x3c,0xb7,0x96,0xbe,0x91,0xc8,0x3e,0x65,0x1e,0xdc,0x81, +0xd8,0x57,0xe9,0x77,0xec,0xef,0xf1,0x4b,0x5c,0xf8,0xcb,0xf0,0xe6,0xd7,0xc5,0x7a, +0xcf,0x87,0xa3,0xf0,0xe2,0x5e,0xb9,0x36,0x96,0xeb,0x39,0x94,0xcb,0x10,0xe3,0xcc, +0x39,0x51,0x80,0x4e,0x71,0xea,0x00,0x3d,0xeb,0xf2,0x27,0xe0,0xef,0xc3,0xf9,0x7e, +0x2a,0x7c,0x50,0xf0,0xd7,0x85,0x22,0x2c,0xa3,0x53,0xbc,0x58,0xa5,0x65,0x38,0x2b, +0x10,0xcb,0x4a,0xc3,0xdc,0x22,0xb1,0xfc,0x2b,0xf6,0xe7,0x49,0xd2,0xed,0xb4,0x4d, +0x2e,0xd3,0x4f,0xb2,0x85,0x2d,0xec,0xed,0x62,0x58,0x21,0x8a,0x31,0x85,0x44,0x50, +0x00,0x00,0x7a,0x60,0x57,0xca,0xe6,0xd1,0xa3,0x4d,0xa5,0x18,0xfb,0xcc,0xfc,0x33, +0x8f,0xa9,0xe5,0xf8,0x69,0x53,0x85,0x1a,0x49,0x56,0x9e,0xad,0xad,0x34,0xf4,0x5a, +0x5d,0xbe,0xbe,0x45,0xba,0x28,0xa2,0xbe,0x70,0xfc,0x74,0x28,0xa2,0x8a,0x00,0x28, +0xae,0x17,0xc3,0xbf,0x11,0xa3,0xf1,0xc4,0xfe,0x3a,0xd3,0x74,0x79,0x11,0x35,0x2f, +0x0e,0xdf,0x36,0x9e,0x09,0x1b,0xc1,0x7f,0x21,0x24,0x56,0x23,0xd3,0x73,0x32,0xff, +0x00,0xc0,0x0d,0x67,0xfc,0x0d,0xf8,0xe1,0xa4,0x7c,0x6b,0xf0,0xec,0xf7,0x16,0xab, +0xf6,0x1d,0x73,0x4e,0x94,0xda,0xea,0xda,0x4c,0x8d,0x99,0x2d,0x27,0x52,0x43,0x0f, +0x75,0x24,0x1c,0x37,0xb7,0xad,0x6a,0xe9,0x4d,0x27,0x2b,0x6d,0xfa,0x9d,0xd2,0xc1, +0x62,0x21,0x4e,0x55,0x1c,0x74,0x8d,0xaf,0xe5,0xcc,0xae,0xaf,0xe4,0xff,0x00,0xae, +0x87,0xa5,0x51,0x45,0x15,0x91,0xc2,0x14,0x51,0x45,0x00,0x78,0x57,0xed,0xb9,0xe1, +0xfb,0x4f,0x10,0x7e,0xcd,0x3e,0x2f,0xfb,0x52,0x6e,0x7b,0x28,0xe2,0xbc,0x81,0xb1, +0x92,0x92,0x2c,0x8a,0x01,0x1f,0x83,0x30,0xfc,0x6b,0xf1,0xfa,0xbf,0x54,0xff,0x00, +0xe0,0xa1,0x9f,0x13,0x2d,0x7c,0x1d,0xf0,0x2e,0xe3,0xc3,0xe2,0x55,0x3a,0x9f,0x89, +0x26,0x4b,0x68,0xe2,0xcf,0xcc,0x21,0x46,0x57,0x91,0xfe,0x9f,0x2a,0xaf,0xfc,0x0a, +0xbf,0x2b,0x2b,0xec,0xb2,0x88,0xc9,0x61,0xdb,0x7b,0x36,0x7f,0x44,0x78,0x7f,0x4e, +0xac,0x32,0xb9,0xca,0x7b,0x4a,0x6d,0xaf,0x4b,0x25,0xf9,0xa6,0x65,0xf8,0x8a,0x2f, +0x33,0x4f,0x0f,0xdd,0x1c,0x1f,0xc0,0xf1,0xfe,0x15,0xcc,0xd7,0x61,0xaa,0x27,0x99, +0xa7,0x5c,0x0f,0xf6,0x33,0xf9,0x73,0xfd,0x2b,0x8f,0xaf,0x5a,0x5b,0x9f,0x97,0x78, +0x99,0x86,0x54,0xb3,0x78,0x56,0x5f,0x6e,0x0a,0xfe,0xa9,0xb5,0xf9,0x58,0x28,0xa2, +0x8a,0x83,0xf2,0x30,0xa2,0x8a,0x28,0x00,0xa2,0x8a,0x28,0x00,0xa2,0x8a,0x28,0x00, +0xa2,0x8a,0x28,0x03,0xbc,0xd3,0xd8,0x7c,0x44,0xf0,0xa0,0xd2,0xe4,0x60,0xde,0x24, +0xd1,0x20,0x69,0x2c,0x24,0x66,0x3b,0xaf,0x2c,0xd4,0x16,0x7b,0x7f,0x77,0x8c,0x65, +0xd3,0xfd,0x9d,0xcb,0xd8,0x57,0x07,0x56,0x34,0xed,0x46,0xeb,0x47,0xd4,0x2d,0xaf, +0xac,0x6e,0x24,0xb4,0xbc,0xb6,0x91,0x65,0x86,0x78,0x58,0xab,0xc6,0xea,0x72,0x18, +0x11,0xd0,0x83,0x5f,0x54,0x7c,0x2f,0xfd,0x9b,0x3f,0xe1,0x6e,0xf8,0xaa,0xd3,0x56, +0x8f,0x43,0x99,0x6f,0x75,0x08,0xd6,0xe6,0x6d,0x17,0x85,0x82,0x09,0x89,0xfd,0xe4, +0x8c,0x47,0xdd,0x89,0x8e,0x18,0x29,0xe9,0xbb,0x6f,0x38,0x02,0xaa,0x95,0x29,0x49, +0xbb,0x69,0x1d,0xdb,0x7b,0x2f,0x53,0x8b,0x19,0x8d,0xa5,0x84,0x82,0x94,0xee,0xe4, +0xf4,0x49,0x6a,0xe4,0xfb,0x24,0x7c,0xe5,0xe0,0x7f,0x06,0xdf,0x78,0xb7,0x5c,0xb1, +0x86,0x2b,0x39,0xe5,0xb2,0x69,0xd5,0x67,0x9d,0x23,0x25,0x11,0x73,0xf3,0x64,0xf4, +0xe9,0x5f,0x67,0xc3,0x0a,0x5b,0xc4,0x91,0x44,0xa1,0x23,0x45,0x0a,0xaa,0x3b,0x01, +0xc0,0x15,0xf5,0xb7,0xc3,0xff,0x00,0xd8,0xdf,0xc3,0xba,0x16,0x9f,0x08,0xd7,0x67, +0x6b,0xd9,0x54,0x0f,0xf4,0x4b,0x2f,0xdc,0x5b,0xa7,0xb0,0xc7,0x27,0xeb,0xc5,0x7a, +0x44,0x7f,0x00,0xbe,0x1f,0x45,0x6f,0xe4,0x8f,0x0b,0xd9,0x95,0xc6,0x32,0xc5,0xd9, +0xbf,0xef,0xa2,0xd9,0xfd,0x6a,0xa9,0xe7,0x98,0x1c,0x0b,0x71,0x85,0xe6,0xdf,0x54, +0xac,0xbf,0x16,0x7c,0xc6,0x61,0x90,0x66,0xb9,0xe3,0x8d,0x4a,0xaa,0x34,0xa3,0x1d, +0xa2,0xdb,0x6f,0x5e,0xf6,0x56,0x3e,0x04,0xad,0xaf,0x05,0xe9,0x36,0x5a,0xf7,0x8b, +0x34,0x9d,0x3f,0x52,0xbb,0x5b,0x0b,0x0b,0x8b,0x94,0x8e,0x7b,0x86,0x60,0xa1,0x10, +0x9e,0x79,0x3d,0x3e,0xbe,0xf5,0xf4,0x6f,0x8b,0x3e,0x01,0xf8,0x07,0x56,0xf1,0x74, +0xde,0x18,0xd2,0x1e,0xff,0x00,0xc3,0xba,0xf9,0xb6,0xfb,0x5d,0xbe,0xf0,0xd2,0xda, +0xcc,0xbd,0xf6,0x96,0x24,0x9c,0x71,0x9e,0x78,0xaf,0x0e,0xf1,0x67,0xc3,0xbd,0x4b, +0xe1,0x4f,0x89,0xa0,0x87,0xc4,0x96,0x3f,0x68,0xb5,0x56,0xf3,0x22,0x78,0xb9,0x86, +0xec,0x02,0x0e,0xdd,0xc7,0xa0,0xf5,0x07,0x91,0xe9,0x5f,0x45,0x43,0x33,0xa1,0x8d, +0x8b,0x85,0x36,0xe3,0x36,0xae,0x93,0xd1,0xfa,0xae,0x8c,0xf8,0x2c,0x56,0x47,0x8a, +0xcb,0x2a,0x2a,0x95,0xe2,0xa7,0x4e,0x32,0xb3,0x69,0xde,0x3a,0x3d,0x53,0xea,0xbe, +0xef,0x43,0xed,0x0d,0x12,0xc3,0xc3,0x5e,0x07,0xf0,0x94,0x17,0xbe,0x1a,0xd2,0x85, +0xf5,0xa2,0xc6,0xa9,0x03,0x69,0xa8,0x25,0x96,0x65,0x27,0x1f,0x7c,0x9e,0x46,0x7a, +0x92,0x71,0x58,0x9a,0xae,0xbb,0xe3,0x0f,0x11,0x1d,0x52,0xda,0xc3,0xec,0xda,0x4c, +0xb6,0x70,0x2c,0xaf,0x61,0x6d,0x20,0x96,0xec,0xef,0xdd,0x85,0x69,0x70,0x52,0x36, +0xc2,0x93,0xb4,0x06,0x3d,0x39,0x19,0xcd,0x56,0xf8,0x07,0xf1,0x0a,0x5f,0x88,0x1e, +0x0f,0x4b,0x3b,0xcd,0x2b,0xec,0x2d,0x6b,0x6e,0xa8,0x65,0x8c,0x2a,0x45,0x32,0x92, +0xca,0x0c,0x68,0x39,0x00,0x6d,0xeb,0x8c,0x67,0x38,0xad,0xdb,0x79,0x2d,0x3e,0x1b, +0xc9,0x21,0xb8,0x87,0x4f,0xdd,0x79,0x26,0xe7,0x9a,0xdd,0x82,0x5d,0x4e,0xa0,0x9f, +0x9d,0x93,0xf8,0xca,0x83,0x93,0xb7,0xdc,0xe2,0xbf,0x31,0x9c,0x25,0x42,0xbd,0x4a, +0x75,0x63,0xcd,0x51,0x3e,0xba,0xdf,0xf4,0xdb,0xe7,0xaf,0x43,0xf7,0x1a,0x55,0x21, +0x8a,0xc3,0x52,0xab,0x46,0x5c,0xb4,0x9a,0xe8,0xb9,0x6d,0xa7,0xa5,0xf7,0xf9,0x69, +0xd4,0xc6,0xd0,0xfc,0x26,0x9a,0x5c,0xfa,0x76,0xaf,0x0d,0xc4,0x57,0xad,0x3a,0x0d, +0xb7,0x12,0x96,0x91,0xe5,0x72,0xbf,0x3a,0x34,0xad,0xb9,0xc7,0x23,0x2b,0x80,0x30, +0x41,0x53,0x5a,0x10,0x6a,0x11,0x78,0x1f,0x5a,0x82,0x79,0x4f,0xd9,0x34,0xed,0x45, +0xbc,0xbb,0x88,0x6e,0x2e,0x59,0xe4,0x49,0x33,0x85,0x9c,0x6e,0xf9,0xb6,0x9c,0x85, +0x63,0x8c,0x0f,0x90,0xf4,0xcd,0x53,0xba,0xd4,0x61,0xd4,0xf5,0x6d,0x48,0xe9,0xb0, +0xdc,0xc5,0x6d,0x03,0x87,0xb8,0x49,0x83,0x44,0x9f,0xbd,0x04,0x19,0xa2,0x65,0xe7, +0x6b,0x00,0x72,0xc3,0xa1,0xc3,0x7f,0x7a,0xb3,0xf4,0xdd,0x06,0x6b,0xeb,0x76,0xd2, +0x74,0xa4,0x8e,0x5b,0x5b,0x79,0x24,0x5b,0x9b,0xa0,0x43,0x3d,0xda,0xe4,0x0d,0x92, +0xb9,0xce,0x59,0x0e,0xe5,0x74,0xc8,0xdd,0x95,0x23,0x8e,0x2b,0x56,0x9c,0xee,0xeb, +0x3f,0x5f,0x4f,0xf3,0x5a,0x5b,0x4f,0xc0,0xcd,0x35,0x4e,0xca,0x84,0x75,0xbe,0x96, +0xef,0xb3,0xf9,0x3d,0x6f,0xaf,0xe2,0x72,0x7f,0x16,0x3e,0x17,0xa6,0x95,0xe2,0xab, +0xfd,0x7e,0xef,0x5a,0x92,0xea,0xcf,0x56,0x0d,0x12,0x69,0x97,0x31,0xbc,0xaa,0x32, +0x01,0x71,0xb8,0x92,0xa0,0x64,0x70,0xa4,0x74,0x27,0xd2,0xbf,0x3a,0xff,0x00,0x6a, +0x8f,0xd9,0xda,0x2f,0x01,0x4c,0x7c,0x55,0xe1,0xbb,0x7d,0x9a,0x05,0xc3,0xe2,0xea, +0xd5,0x79,0x16,0x92,0x13,0xc1,0x5f,0x44,0x3f,0xa1,0xf6,0x22,0xbf,0x5f,0xf4,0xff, +0x00,0x0b,0xb1,0xf0,0xd2,0x69,0x5a,0xb1,0x87,0x56,0x10,0x31,0x10,0xbd,0xc2,0x93, +0xb9,0x41,0xfd,0xde,0xff,0x00,0x52,0x06,0x01,0x3d,0xf1,0x5f,0x2f,0xf8,0xcf,0x45, +0xb3,0xf1,0x2d,0xa6,0xab,0xa3,0xea,0x16,0x70,0x8b,0x3b,0x95,0x92,0xda,0x68,0x23, +0x04,0xae,0x0e,0x41,0xc6,0x49,0xe7,0xd3,0xe8,0x2b,0x2a,0x78,0xc9,0xfb,0x44,0xdb, +0xbd,0xb4,0xf5,0x4b,0x63,0xb6,0x38,0x58,0x51,0x83,0xe4,0x8f,0x2f,0x33,0x6e,0xdb, +0xd9,0xbd,0xfb,0xf5,0xed,0xa1,0xf9,0x23,0x45,0x6e,0xf8,0xeb,0xc2,0x77,0x1e,0x05, +0xf1,0x8e,0xb1,0xa0,0x5d,0x1d,0xf2,0xe9,0xf7,0x2d,0x0e,0xf0,0x30,0x1d,0x41,0xf9, +0x5b,0xf1,0x52,0x0f,0xe3,0x58,0x55,0xf4,0xe9,0xa9,0x2b,0xa3,0x98,0x28,0xa2,0x8a, +0x60,0x14,0x51,0x45,0x00,0x7e,0xe7,0x4b,0x08,0xaa,0x92,0x47,0x8a,0xd6,0x68,0x7a, +0xe6,0xab,0x4b,0x1e,0x2b,0xe1,0xcf,0x60,0xcd,0xc6,0x0d,0x3d,0x69,0xf2,0x25,0x36, +0x82,0x87,0xaf,0x35,0x32,0x54,0x69,0xf9,0x54,0xab,0x40,0x89,0xe2,0xeb,0x53,0xa8, +0xa8,0x63,0xeb,0x53,0x2f,0x6a,0x04,0x4c,0xb5,0x32,0x0c,0xd4,0x49,0x53,0x47,0x40, +0x12,0x63,0x35,0x61,0x77,0x63,0x04,0xf1,0xe9,0x50,0x2d,0x58,0x5a,0x00,0x93,0x6b, +0x14,0x60,0xa7,0x0d,0x83,0x82,0x79,0xc1,0xaf,0x9e,0xfe,0x15,0x7e,0xc9,0x43,0xc3, +0xff,0x00,0x15,0xb5,0x3f,0x88,0xbe,0x36,0xd6,0x57,0xc5,0x3e,0x23,0x96,0x76,0x92, +0xcf,0xe5,0x22,0x38,0x06,0x78,0x62,0x0f,0x52,0x06,0x00,0x1d,0x05,0x7d,0x0a,0xbd, +0xc9,0xa9,0x63,0xeb,0x51,0x28,0xa7,0x6b,0x9d,0x14,0xea,0x4a,0x09,0xa8,0xf5,0x27, +0x8c,0x1d,0xc0,0xe7,0x35,0x3a,0x9e,0xc2,0xa1,0x5f,0xbc,0x28,0xb8,0x12,0xb5,0xbc, +0xc2,0x02,0x12,0x62,0x8c,0x11,0x9b,0xa0,0x6c,0x70,0x7f,0x3c,0x52,0xe8,0x41,0xca, +0x7c,0x4f,0xf8,0xbd,0xe1,0x8f,0x85,0x7a,0x3c,0xb7,0x3a,0xe5,0xea,0x2c,0xe6,0x32, +0x62,0xb2,0x8c,0x86,0x9a,0x63,0x8e,0x81,0x7d,0x3d,0xcd,0x7e,0x4e,0x7c,0x4a,0xf1, +0xa5,0xaf,0x88,0xbc,0x6d,0xa8,0x6a,0x76,0x96,0x8b,0xa5,0xc7,0x73,0x3c,0x93,0x2d, +0x9c,0x6d,0xb8,0x60,0xf3,0x8c,0xf7,0xfe,0x55,0xea,0xbf,0x14,0xbc,0x33,0xe2,0x5d, +0x6b,0xc6,0x9a,0xa4,0x5e,0x25,0xbe,0x7b,0x8d,0x50,0xdd,0x18,0x8d,0xad,0xb2,0xb4, +0x97,0x12,0x64,0xf1,0x81,0x8e,0x9d,0x3f,0x3a,0xe9,0x35,0x4f,0xd8,0x67,0x51,0xff, +0x00,0x85,0x25,0xe2,0x6f,0x15,0x5e,0x05,0xd1,0x75,0x9b,0x6b,0x16,0xba,0xb7,0xb3, +0x95,0x81,0x92,0x45,0x41,0x96,0x12,0xb1,0xe1,0x09,0x1d,0x00,0xe9,0xde,0xbe,0x5a, +0xb7,0xb4,0xcc,0x25,0xca,0xd5,0x92,0xfe,0xb5,0x3d,0xfc,0x3c,0x23,0x87,0xb5,0x9e, +0xb2,0x3e,0x4e,0xba,0xd7,0x22,0xb8,0x76,0x58,0xe3,0x13,0xa6,0x32,0xec,0x7a,0x03, +0xe8,0x2b,0x02,0x6d,0x4a,0xd5,0xb2,0x58,0xec,0x23,0xb7,0xa5,0x72,0x77,0x1e,0x25, +0xbd,0xd3,0xd8,0xa4,0x6e,0xd2,0x45,0x92,0xbb,0x36,0xf1,0xc5,0x66,0xdc,0x6b,0x8b, +0x21,0xdd,0x33,0x0b,0x76,0xeb,0xb4,0x01,0x93,0x51,0x4f,0x2d,0x94,0x6e,0x9e,0xc7, +0xd0,0xd5,0xc0,0xd6,0xe6,0xd2,0x4b,0xf4,0x3b,0x95,0xba,0x59,0x13,0x74,0x6f,0x95, +0xaa,0xf2,0xba,0xb7,0x2a,0x36,0xb5,0x71,0x36,0x3e,0x24,0x58,0x2e,0x98,0xf9,0x99, +0x88,0x8c,0x74,0xc1,0xad,0x53,0xe2,0x3b,0x73,0x32,0x85,0x6d,0xec,0x7b,0x0a,0xaf, +0xa9,0xce,0x32,0xb2,0x57,0x47,0x9e,0xe8,0xd4,0x5a,0x35,0xf7,0x1f,0x46,0xfe,0xc9, +0x7f,0x00,0x6e,0xbe,0x3b,0x7c,0x4e,0xb2,0xd3,0x5c,0x7f,0xc4,0x9a,0xcc,0x8b,0xad, +0x4a,0x52,0x76,0xe2,0x10,0x7e,0xe8,0x3f,0xde,0x63,0xc0,0xaf,0xd9,0xcd,0x2b,0x49, +0xb6,0xd1,0x74,0xdb,0x5b,0x0b,0x28,0x52,0xda,0xce,0xda,0x35,0x8a,0x18,0x63,0x18, +0x08,0xa0,0x60,0x01,0x5f,0x2a,0x7f,0xc1,0x37,0xfe,0x1a,0x58,0xf8,0x6f,0xe0,0x7a, +0x78,0xa1,0x1e,0x39,0xef,0xfc,0x43,0x21,0x91,0xa4,0x50,0x41,0x8e,0x34,0x3b,0x56, +0x33,0x91,0xd8,0x82,0x78,0xf5,0xaf,0xae,0x57,0xa0,0xaf,0x6b,0x0f,0x4f,0xd9,0xc3, +0x5d,0xcf,0x03,0x15,0x3e,0x69,0xf2,0xf4,0x40,0x06,0x28,0xa2,0x8a,0xea,0x38,0xc2, +0x8a,0x29,0xea,0xb4,0x86,0x27,0x0b,0xcd,0x52,0xd6,0xb5,0xeb,0x0f,0x0e,0xe9,0xb3, +0xea,0x1a,0x95,0xcc,0x76,0x56,0x50,0x2e,0xe9,0x26,0x95,0xb0,0xaa,0x2a,0xbf,0x8b, +0xe6,0xd5,0xad,0xfc,0x39,0xa8,0x49,0xa1,0x47,0x0c,0xba,0xc2,0xc2,0xc6,0xd6,0x3b, +0x83,0x84,0x69,0x31,0xc0,0x35,0xf9,0xdd,0xf1,0xaf,0xe2,0x67,0xc4,0x1f,0x10,0x6a, +0x97,0x1a,0x37,0x8d,0x27,0x36,0x8d,0x6a,0xe3,0xfe,0x25,0xf1,0xa8,0x45,0x53,0xd8, +0x90,0xbd,0x4d,0x61,0x56,0xa7,0xb3,0x57,0xb1,0xd9,0x87,0xc3,0xba,0xee,0xc9,0xd8, +0xe8,0xbf,0x69,0xcf,0x89,0x96,0x3f,0x12,0x3c,0x7e,0xef,0xa5,0x4f,0xf6,0x9d,0x36, +0xd2,0x15,0x82,0x29,0x39,0x01,0xcf,0x56,0x20,0x1f,0x7f,0xe5,0x5c,0x87,0xc2,0x6f, +0x00,0x5d,0x78,0xeb,0xc6,0x56,0x7a,0x74,0x08,0x70,0xef,0x99,0x1f,0xfb,0xab,0xdc, +0xd7,0x27,0xa0,0xe9,0x73,0x6b,0x17,0x1b,0x2d,0x54,0x4c,0xec,0x7e,0xe8,0x3c,0xf5, +0xaf,0xb9,0xff,0x00,0x65,0xdf,0x85,0xa9,0xe1,0x1d,0x2e,0x7d,0x56,0xec,0x03,0xa8, +0x5c,0x80,0x00,0xff,0x00,0x9e,0x6b,0x8e,0x95,0xe5,0xc2,0xf5,0xaa,0xdd,0x9f,0x41, +0x55,0xc7,0x09,0x42,0xd1,0x3d,0x8b,0xc2,0xfa,0x1d,0xa7,0x84,0xf4,0x2b,0x4d,0x32, +0xd1,0x02,0x41,0x02,0x04,0x1d,0xb2,0x47,0x53,0x5f,0x9a,0x3f,0xf0,0x54,0x2f,0x88, +0x1e,0x18,0xf1,0x57,0x8b,0x34,0xdd,0x27,0x49,0xb8,0x6b,0xbd,0x5b,0x4d,0x89,0xa2, +0xbc,0x96,0x27,0xcc,0x71,0x9c,0x82,0x10,0x76,0xcf,0x5c,0xe3,0xd6,0xbe,0xfc,0xfd, +0xa3,0xbc,0x47,0x07,0x84,0x7e,0x09,0xf8,0xc3,0x51,0x96,0xfb,0xfb,0x3d,0x93,0x4d, +0x99,0x22,0x98,0x30,0x0d,0xe6,0x32,0x90,0xa1,0x79,0x1c,0xe4,0xf6,0xaf,0xc1,0xdf, +0x14,0x5e,0x4d,0xab,0x6b,0x12,0xb4,0xf3,0xba,0x42,0xcc,0x77,0x4b,0xbb,0x2c,0x49, +0x3d,0x71,0x5e,0xf5,0x37,0x18,0x6a,0xcf,0x17,0x0f,0x84,0xaf,0x8a,0xbc,0xe9,0xc5, +0xbb,0x1c,0x36,0xa1,0xe6,0xb5,0xd3,0xed,0x8a,0x3d,0xdd,0x4e,0xf4,0xc7,0xe5,0x42, +0xce,0xf0,0xcc,0x59,0x21,0x61,0x03,0x95,0xf3,0x48,0x5c,0x28,0x35,0xd6,0x1f,0x05, +0x4d,0x79,0x2c,0x2b,0x0d,0xfc,0x72,0x41,0x23,0x00,0x64,0x71,0x80,0x07,0x73,0xf9, +0x57,0xd4,0x5f,0x0a,0x3e,0x19,0xf8,0x6b,0xc3,0xfa,0xb6,0x9a,0x4d,0xe4,0x77,0xfa, +0x0d,0xf2,0x36,0x1b,0x50,0x8f,0xca,0x13,0x44,0x14,0x83,0x80,0x72,0x18,0xee,0xea, +0x0e,0x08,0x15,0xe9,0xd0,0x7e,0xd9,0x5d,0x6c,0x4d,0x48,0x3a,0x6e,0xcf,0x73,0xe3, +0xdd,0x3f,0xc3,0xba,0x97,0xc4,0x7f,0x14,0x5d,0xc9,0x68,0x86,0x1b,0x6d,0xd8,0x33, +0x30,0xc2,0xc7,0x10,0xe0,0x7e,0x82,0xbd,0x6a,0x6d,0x3e,0xeb,0xc0,0xba,0x42,0x58, +0xf8,0x5e,0x23,0x0e,0xff,0x00,0x96,0x5b,0xd5,0x52,0xd7,0x52,0x28,0xc6,0x4a,0x01, +0xf7,0x54,0xfe,0x75,0xc2,0xf8,0xa3,0x56,0xbb,0xf0,0xd7,0x8e,0x7c,0x45,0xa4,0xf8, +0x42,0xec,0x49,0xa2,0xc7,0xa8,0x4d,0x15,0xaf,0x96,0x03,0x07,0x8c,0x39,0x0b,0x82, +0x7a,0xf1,0xc6,0x7d,0xab,0xaa,0xf0,0x8f,0xc4,0x0f,0x1f,0x78,0x2e,0xe2,0x29,0x2e, +0x2f,0x2e,0xf4,0xf8,0x1b,0x92,0x26,0x80,0x05,0x23,0xeb,0x8a,0xe9,0xa7,0x64,0x61, +0x66,0x8f,0xa7,0xf4,0x9f,0xf8,0x45,0xbf,0x69,0x8f,0x06,0x59,0xe8,0xfa,0xd4,0x37, +0x3a,0x17,0x8b,0x2d,0x61,0xc4,0x77,0x37,0x11,0xec,0xf3,0x88,0x18,0xce,0x7b,0xd7, +0x5f,0xfb,0x20,0xfc,0x23,0xf1,0x07,0x81,0x7c,0x69,0x7f,0xa2,0x6b,0x8f,0x05,0xe6, +0x8b,0x2d,0xbb,0xed,0x68,0xdf,0x78,0x0c,0x7b,0x91,0xd5,0x5b,0x81,0x5c,0x4f,0x82, +0x7f,0x68,0x6b,0xed,0x4a,0x18,0x52,0xf7,0xc3,0x2b,0xaa,0xcd,0xc1,0x17,0x70,0xcb, +0x10,0xdd,0xf5,0x3b,0xab,0xe9,0x6f,0x83,0xfe,0x2e,0xd2,0xb5,0xa9,0xb5,0x0d,0x44, +0xe8,0xd2,0xe8,0x97,0xf1,0x44,0x37,0x79,0xae,0xbb,0x64,0xcf,0xf7,0x48,0x3c,0xd7, +0x4c,0xac,0xd3,0x6b,0x72,0x0c,0x0f,0x88,0x16,0x5a,0xb4,0x56,0x7e,0x41,0xdf,0x77, +0x04,0x57,0x2b,0x30,0xdb,0xd0,0x32,0x92,0x30,0x6b,0xe9,0x2f,0x81,0xab,0x3d,0xc7, +0x87,0x60,0x86,0xe1,0xc3,0x11,0x22,0xb0,0xfe,0x75,0xf3,0x9e,0xb5,0xf1,0x03,0x4f, +0xd2,0x64,0xb9,0xb7,0xd5,0x25,0x52,0x27,0x7c,0x88,0x23,0x60,0x5f,0xaf,0x06,0xbe, +0x8f,0xf8,0x27,0xa8,0xdb,0xde,0x68,0xf6,0x2d,0x6a,0x19,0x51,0x8e,0x76,0xb7,0x5c, +0x56,0x58,0xab,0xfb,0x22,0x65,0xb1,0xec,0xf4,0x8d,0x4b,0x45,0x7c,0xe9,0x90,0xda, +0x63,0x0e,0x78,0xa7,0x9a,0x46,0xfb,0xb4,0x12,0x45,0x20,0xa8,0xfd,0x6a,0x6f,0x4a, +0x88,0xd5,0x21,0x8c,0xa6,0xbf,0x0d,0xf5,0xa7,0xb7,0x6a,0x6c,0x9d,0xb3,0x54,0x66, +0x57,0x90,0x60,0x9a,0xa7,0x7c,0xc5,0x6d,0x66,0x6f,0x44,0x63,0xfa,0x55,0xe9,0x7e, +0xf1,0x15,0x43,0x52,0x4d,0xf6,0x17,0x2b,0x92,0xb9,0x89,0xb9,0x5e,0xa3,0x83,0x56, +0x82,0x3b,0x9f,0x8a,0x3e,0x38,0xba,0x6b,0xef,0x16,0x6a,0x93,0xb7,0xde,0x92,0xe2, +0x46,0x3f,0x8b,0x13,0x58,0x35,0xaf,0xe2,0xc5,0xdb,0xaf,0xde,0xf7,0xfd,0xeb,0x75, +0xfa,0x9a,0xc8,0xaf,0xd0,0x63,0xf0,0xa3,0xfb,0x57,0x0c,0x92,0xa3,0x04,0xbb,0x2f, +0xc8,0x28,0xa2,0x8a,0xa3,0xa0,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0xfa,0xa7, +0xfe,0x09,0xbd,0xa1,0xc5,0xaa,0x7e,0xd0,0xd2,0x5d,0x4a,0x9b,0x86,0x9f,0xa4,0x5c, +0x4f,0x19,0xf4,0x90,0xbc,0x68,0x3f,0xf1,0xd6,0x6a,0xfd,0x4d,0xaf,0xca,0x1f,0xf8, +0x27,0xa7,0x8b,0xa0,0xf0,0xc7,0xed,0x19,0x65,0x6d,0x71,0x26,0xc4,0xd6,0x2c,0x27, +0xd3,0xd3,0x71,0xc2,0xf9,0x9f,0x2c,0x8b,0xf8,0xfe,0xe8,0x81,0xf5,0xf7,0xaf,0xd5, +0xea,0xf8,0xcc,0xda,0xff,0x00,0x58,0xd7,0xb2,0x3f,0x9c,0xb8,0xfa,0x33,0x59,0xba, +0x72,0xd9,0xc1,0x5b,0xf1,0xfd,0x42,0x8a,0x28,0xaf,0x14,0xfc,0xdc,0x2a,0x9e,0xb1, +0xa9,0xc3,0xa2,0xe9,0x37,0xba,0x85,0xcc,0x8b,0x15,0xbd,0xac,0x2f,0x34,0x8e,0xdd, +0x15,0x55,0x49,0x24,0xfe,0x55,0x72,0xbe,0x67,0xfd,0xbf,0x3e,0x2e,0x45,0xf0,0xe7, +0xe0,0x7d,0xe6,0x8d,0x6f,0x3e,0xcd,0x63,0xc4,0xd9,0xd3,0xe0,0x40,0x79,0x10,0xf1, +0xe7,0xbf,0xd3,0x61,0xdb,0x9f,0x57,0x5a,0xda,0x8d,0x37,0x5a,0xa4,0x69,0xae,0xa7, +0xa3,0x97,0x60,0xe7,0x98,0x62,0xe9,0x61,0x69,0xef,0x36,0x97,0xcb,0xab,0xf9,0x2d, +0x4f,0x00,0xfd,0x81,0x3e,0x35,0xcb,0xa9,0x7e,0xd0,0x1e,0x32,0xb0,0xbf,0x90,0xa2, +0x78,0xc5,0xe6,0xd4,0x23,0x46,0x3d,0x2e,0x15,0xda,0x40,0x33,0xfe,0xe3,0x38,0xc7, +0xb0,0xaf,0x31,0xf8,0xcd,0xe2,0xfd,0x7f,0xf6,0x6f,0xfd,0xae,0xbc,0x5b,0xaa,0x78, +0x56,0xe9,0xec,0x5f,0xed,0xc2,0xe8,0xc3,0x9f,0xdd,0x5c,0xc7,0x2a,0xac,0x8c,0x8e, +0xbd,0xd4,0xb3,0x35,0x78,0x57,0x81,0xfc,0x5d,0x7d,0xe0,0x1f,0x18,0x68,0xfe,0x22, +0xd3,0x5f,0xcb,0xbe,0xd3,0x6e,0xa3,0xb9,0x88,0xfa,0x95,0x20,0xe0,0xfb,0x1e,0x9f, +0x8d,0x7a,0x1f,0xed,0x55,0xf1,0x27,0x49,0xf8,0xb5,0xf1,0x7e,0xef,0xc5,0x1a,0x2b, +0xb3,0x59,0x5e,0xd9,0xdb,0x12,0x8e,0x08,0x68,0xe4,0x11,0x8d,0xe8,0x7d,0x76,0xb6, +0x46,0x7b,0xe2,0xbe,0xd3,0xea,0xdc,0xb8,0x97,0x2b,0x7b,0xb2,0x8d,0x9f,0xcb,0xfe, +0x01,0xfd,0x20,0xb2,0x75,0x4b,0x39,0x95,0x55,0x0b,0xd1,0xab,0x4f,0x96,0x4b,0xa5, +0xe2,0xd2,0x57,0xf5,0x8e,0xde,0x8c,0xfd,0x30,0xfd,0x9d,0xff,0x00,0x6a,0x4f,0x0a, +0xfe,0xd0,0x1a,0x34,0x62,0xce,0x65,0xd3,0x7c,0x49,0x14,0x79,0xbb,0xd1,0xe7,0x71, +0xbd,0x4f,0x76,0x8c,0xff,0x00,0x1a,0x7b,0x8e,0x47,0x7a,0xf6,0x7a,0xfc,0x14,0xd2, +0xb5,0x6b,0xdd,0x0b,0x50,0x82,0xff,0x00,0x4e,0xbb,0x9a,0xc6,0xf6,0x06,0x0f,0x15, +0xc5,0xbb,0x94,0x74,0x61,0xdc,0x11,0x5f,0x55,0xfc,0x37,0xff,0x00,0x82,0x90,0x7c, +0x41,0xf0,0x9d,0xac,0x36,0x7e,0x22,0xb3,0xb3,0xf1,0x5d,0xbc,0x60,0x2f,0x9f,0x36, +0x61,0xb9,0xc0,0xf5,0x75,0xe0,0x9f,0x72,0x09,0xaf,0x23,0x13,0x94,0xc9,0x3e,0x6a, +0x1a,0xae,0xc7,0xe7,0xf9,0xcf,0x00,0xd6,0x8d,0x47,0x57,0x2b,0x77,0x8b,0xfb,0x2d, +0xd9,0xaf,0x47,0xd5,0x7a,0xd9,0xfa,0x9f,0xa8,0x15,0xcb,0x7c,0x4a,0xf8,0x97,0xe1, +0xff,0x00,0x84,0xfe,0x13,0xbc,0xf1,0x17,0x88,0xef,0x92,0xca,0xc2,0xdd,0x72,0x06, +0x7e,0x79,0x5b,0xb2,0x22,0xff,0x00,0x13,0x1f,0x4a,0xf8,0x7f,0x5e,0xff,0x00,0x82, +0xa4,0x6a,0x33,0x58,0xb2,0xe8,0xbe,0x06,0xb6,0xb6,0xbb,0x3d,0x24,0xbe,0xbc,0x69, +0x50,0x7f,0xc0,0x54,0x2f,0xf3,0xaf,0x93,0x7e,0x2c,0x7c,0x6c,0xf1,0x87,0xc6,0xad, +0x68,0x6a,0x3e,0x2a,0xd5,0xa4,0xbe,0x31,0xe4,0x43,0x6c,0xbf,0x24,0x10,0x0f,0x44, +0x41,0xc0,0xfa,0xf5,0x35,0x8d,0x0c,0xa6,0xb4,0xe5,0xfb,0xdd,0x11,0xe6,0xe5,0x7c, +0x07,0x8f,0xc4,0x55,0x4f,0x1d,0xfb,0xb8,0x2d,0xf5,0x4d,0xbf,0x4b,0x5d,0x7c,0xdf, +0xdc,0x5f,0xfd,0xa0,0x3e,0x37,0x6a,0xdf,0x1e,0xbe,0x22,0x5e,0x78,0x8b,0x51,0xdd, +0x0d,0xa8,0xfd,0xcd,0x85,0x96,0xec,0xad,0xb4,0x00,0x9d,0xab,0xf5,0x39,0x24,0x9e, +0xe4,0x9a,0xf3,0x5a,0x28,0xaf,0xad,0x84,0x23,0x4e,0x2a,0x31,0x5a,0x23,0xf7,0xec, +0x3e,0x1e,0x96,0x16,0x94,0x68,0x51,0x8d,0xa3,0x15,0x64,0x88,0xae,0xc6,0xeb,0x59, +0xc7,0xac,0x6d,0xfc,0x8d,0x71,0x55,0xda,0xde,0x36,0xdb,0x39,0xcf,0xa4,0x6d,0xfc, +0x8d,0x71,0x54,0xa6,0x7f,0x3f,0x78,0xa5,0x6f,0xad,0x61,0x7b,0xf2,0xcb,0xf3,0x41, +0x45,0x14,0x56,0x67,0xe1,0xc1,0x45,0x15,0x35,0x95,0x9d,0xc6,0xa5,0x79,0x05,0xa5, +0xac,0x2f,0x71,0x75,0x3b,0xac,0x51,0x43,0x18,0xcb,0x3b,0xb1,0xc0,0x50,0x3d,0x49, +0x34,0x00,0x59,0xd9,0xdc,0x6a,0x37,0x70,0xda,0xda,0xc1,0x25,0xcd,0xcc,0xcc,0x12, +0x38,0x61,0x42,0xce,0xec,0x7a,0x00,0x07,0x24,0xd7,0x5f,0xff,0x00,0x0a,0xd5,0x34, +0xb8,0xe7,0x3e,0x23,0xf1,0x26,0x93,0xe1,0xeb,0x98,0x5b,0x69,0xd3,0x9d,0xa4,0xba, +0xbc,0x27,0xb8,0xf2,0xe1,0x56,0x54,0x23,0x1c,0xac,0x8e,0x87,0xda,0xad,0x6b,0x1a, +0xa4,0x7f,0x0d,0x6d,0xa7,0xd0,0x34,0x49,0x95,0xb5,0xf6,0x06,0x2d,0x5b,0x59,0x84, +0xfc,0xd1,0x9f,0xe2,0xb6,0x81,0x81,0xe1,0x57,0x18,0x67,0x18,0x2c,0x72,0x3a,0x0e, +0x78,0x0a,0xcf,0x59,0x6a,0xb4,0x45,0xe9,0x1d,0xf5,0x3a,0xe1,0xe1,0x8f,0x0a,0x4b, +0xf2,0xc7,0xe3,0x5d,0x8e,0x7f,0x8a,0xe3,0x48,0x95,0x13,0xf1,0x2a,0xec,0x7f,0x4a, +0x92,0xff,0x00,0xe1,0xb2,0x26,0x0e,0x95,0xe2,0xdf,0x0d,0x6b,0xaa,0x46,0xe3,0xe4, +0x5e,0xb5,0xab,0x2f,0xb1,0x17,0x49,0x17,0x3f,0xee,0xe6,0xb8,0xda,0x29,0xf2,0xbe, +0xe2,0xba,0xec,0x74,0xfa,0xa7,0xc3,0x1f,0x15,0xe8,0xfa,0x78,0xd4,0x2e,0x34,0x2b, +0xc6,0xd3,0x49,0xda,0x2f,0xad,0xd3,0xcf,0xb7,0x63,0xe8,0x25,0x4c,0xa9,0xfc,0xeb, +0x99,0x75,0x31,0xb9,0x47,0x05,0x1f,0xfb,0xac,0x30,0x6a,0xd6,0x97,0xab,0xdf,0xe8, +0x77,0x06,0x7d,0x36,0xfa,0xe7,0x4f,0x98,0x8c,0x19,0x2d,0x66,0x68,0x98,0x8f,0x42, +0x54,0x8a,0xe9,0x60,0xf8,0xad,0xaf,0x1b,0x73,0x6d,0xa8,0x9b,0x2d,0x7e,0xd4,0xff, +0x00,0xcb,0x2d,0x5a,0xce,0x39,0xc8,0x3e,0xa1,0xf0,0x18,0x1f,0x7c,0xd1,0xef,0xaf, +0x30,0xf7,0x4e,0x93,0xf6,0x79,0xf0,0x0f,0xfc,0x26,0x3e,0x2e,0x17,0x52,0xc0,0xd7, +0x16,0xf6,0x2c,0xa5,0x22,0x0b,0x9f,0x36,0x66,0x38,0x45,0xc7,0x7f,0x5c,0x7d,0x2b, +0xf6,0x77,0xe0,0xc7,0xc2,0xdb,0x4f,0x86,0x1e,0x13,0x82,0xdb,0x62,0xbe,0xab,0x70, +0xa2,0x4b,0xdb,0x8c,0x72,0xce,0x47,0xdd,0x07,0xfb,0xab,0xd0,0x7e,0x75,0xf0,0x2f, +0xec,0x13,0xa4,0xd9,0xf8,0x8f,0xc5,0x1e,0x1d,0xb9,0x87,0x4b,0xb6,0xd3,0x23,0x7b, +0xc9,0x6e,0xe4,0x86,0xd8,0xb9,0x46,0x31,0x29,0xda,0xdf,0x31,0x24,0x72,0x07,0x1d, +0x38,0xaf,0xd3,0x9a,0xf3,0xb3,0xaa,0xf2,0xa5,0x46,0x9e,0x16,0x3a,0x29,0x2e,0x67, +0xe7,0xd9,0x7c,0x8f,0x33,0x27,0xa2,0xb1,0x58,0xec,0x46,0x3a,0xa6,0xbc,0x8f,0xd9, +0xc7,0xca,0xcb,0xde,0x7e,0xad,0xbf,0xb8,0x2b,0xe3,0xdf,0x15,0x7c,0x59,0xbb,0xf0, +0x77,0xed,0x11,0xa8,0x6a,0x0f,0xac,0x5e,0x6a,0x1a,0x2d,0xb5,0xc9,0x8e,0x4b,0x6b, +0x79,0x49,0x42,0x9b,0x00,0x31,0x85,0xc8,0x5e,0x0f,0x1f,0x51,0x5e,0xd9,0xe3,0xaf, +0x82,0x37,0xbe,0x2a,0xbd,0x9f,0x51,0xb1,0xf1,0xae,0xb5,0xa6,0xea,0x2d,0x21,0x68, +0xc1,0x9b,0x74,0x11,0xa9,0xfe,0x00,0x8b,0xb7,0x03,0xdf,0x3f,0x9d,0x7c,0x6b,0xe3, +0x6f,0x0a,0xea,0x1e,0x0b,0xf1,0x3e,0xa1,0xa3,0xea,0x63,0x37,0x76,0xf2,0x61,0xa4, +0xce,0x7c,0xc0,0x79,0x0e,0x0f,0xb8,0x39,0xfc,0x6b,0xaf,0x87,0xf0,0x78,0x5a,0xb2, +0xa8,0x9d,0x45,0x26,0xe3,0x67,0x1b,0x5a,0xd7,0xdd,0xdd,0xfe,0x87,0x85,0xc5,0xd9, +0x8e,0x3b,0x0f,0x0a,0x4e,0x34,0x9c,0x14,0x67,0x75,0x2b,0xdd,0x3b,0x6c,0x9a,0x5f, +0x93,0x3e,0x92,0xf8,0x6f,0xe2,0x8d,0x5f,0xe3,0x4f,0xc6,0xa8,0x3c,0x55,0x15,0x94, +0xfa,0x7f,0x87,0xb4,0x7b,0x49,0x20,0x88,0x49,0xc8,0x2c,0xe3,0x04,0x6e,0xee,0x49, +0xe4,0xfa,0x05,0x15,0xed,0xbe,0x3c,0xf0,0x3e,0x9b,0xf1,0x0b,0xc3,0x77,0x5a,0x3e, +0xa5,0x10,0x68,0xe5,0x5c,0xc7,0x2e,0x3e,0x68,0x9c,0x74,0x75,0x3d,0x88,0xff,0x00, +0xeb,0x56,0x4f,0xc1,0x5d,0x6e,0xdb,0xc4,0x1f,0x0b,0xfc,0x3d,0x79,0x6d,0x02,0x5b, +0x2f,0xd9,0x84,0x52,0x47,0x1a,0x85,0x02,0x44,0xf9,0x1c,0xe0,0x7a,0x95,0x27,0xf1, +0xae,0xde,0xbe,0x6f,0x1d,0x88,0x92,0xc5,0x7e,0xea,0x3c,0x9e,0xcf,0xdd,0x4b,0xb5, +0x9f,0x7e,0xf7,0x3e,0xcb,0x2b,0xc1,0xc6,0x58,0x17,0xed,0xa7,0xed,0x7d,0xb7,0xbd, +0x26,0xd6,0x8f,0x99,0x2e,0x9d,0x15,0xac,0x8f,0x87,0x7c,0x25,0xad,0xf8,0x8b,0xe1, +0x8f,0x8f,0xf5,0x05,0xbb,0xd4,0x46,0x91,0x06,0x94,0x05,0x95,0xd0,0xf2,0x83,0xc6, +0xd1,0x79,0x83,0x6a,0x46,0xa4,0xe0,0x93,0x92,0xe3,0x9c,0xe3,0x71,0xf5,0xaf,0xb2, +0xf5,0x0b,0x38,0x35,0xdb,0x38,0xae,0xac,0xc5,0xa4,0xb7,0x20,0x2b,0x5b,0xdc,0xcd, +0x18,0x90,0x20,0x38,0x24,0x8e,0xe3,0x23,0xa7,0xe1,0x5f,0x27,0x7e,0xd7,0x1a,0x14, +0x76,0x3f,0x12,0xec,0xee,0xd5,0xc4,0x69,0xa8,0x59,0xab,0xc8,0xcc,0x0e,0xd5,0x65, +0x62,0x84,0xe0,0x7b,0x05,0xab,0x1f,0x0a,0x7f,0x68,0x6d,0x37,0xe1,0xdd,0xab,0xe8, +0xb0,0xe8,0x53,0x5e,0xda,0xc9,0x24,0x7b,0x2e,0x96,0x7d,0xb2,0xc8,0xfb,0x55,0x49, +0x60,0xd9,0xe3,0x23,0x80,0x31,0x81,0x81,0x5f,0x57,0x8e,0xc1,0xd4,0xcc,0xb0,0xd4, +0xb1,0xd8,0x75,0xef,0xdb,0x54,0x92,0x5e,0xba,0xfd,0xff,0x00,0x23,0xe1,0x32,0xbc, +0xca,0x96,0x4b,0x8c,0xaf,0x96,0x62,0xe5,0xfb,0xb5,0x2d,0x1b,0x6d,0xbe,0xad,0x59, +0x24,0xfa,0x5b,0xb6,0xbf,0x87,0xd1,0xba,0x17,0xc3,0x1d,0x2b,0x40,0x86,0x33,0x35, +0xc5,0xc5,0xf0,0x86,0x18,0xe2,0x3f,0x69,0x93,0x09,0x88,0x98,0xb2,0x31,0x03,0x80, +0x46,0x48,0xf4,0x3d,0xea,0x5d,0x6b,0xe2,0x16,0x91,0xa4,0x68,0xeb,0x73,0xa6,0xcf, +0x69,0xa8,0xb3,0x27,0x9b,0x1c,0x16,0xf3,0x0f,0x9e,0x31,0xf7,0x98,0x11,0x9e,0x80, +0x13,0xf8,0x57,0x97,0xf8,0xa3,0xe2,0x86,0xb9,0x7d,0xff,0x00,0x1e,0xf3,0x1b,0x5d, +0x3e,0xe9,0x44,0x8b,0x18,0x50,0x59,0x46,0x48,0x28,0x5b,0x1c,0xf2,0x0f,0xe7,0x5c, +0x5b,0x5d,0xa5,0x9e,0xa3,0x2c,0xfa,0x78,0x30,0xc4,0x4b,0x6c,0x56,0x40,0x30,0xad, +0x90,0x54,0x81,0xc6,0x30,0x71,0x5f,0x17,0x2e,0x7a,0xbe,0xf5,0x57,0x76,0x7e,0x95, +0x15,0x0a,0x2b,0x96,0x8c,0x6c,0xbf,0x13,0xba,0xf1,0x47,0xc5,0x2b,0xbf,0x10,0x2b, +0x5c,0xe9,0xd2,0xcb,0xa4,0xbd,0xb1,0x0a,0x91,0x89,0xb9,0x95,0x18,0x1d,0xc4,0x8e, +0x99,0x04,0x2e,0x31,0xcf,0x35,0xe7,0x4c,0xc5,0x98,0x92,0x72,0x49,0xc9,0x26,0x82, +0x72,0x49,0xa4,0xaa,0x51,0x51,0xd8,0x52,0x93,0x96,0xac,0xf8,0x2b,0xf6,0xd6,0xd0, +0xe2,0xd2,0xfe,0x31,0x25,0xdc,0x29,0xb7,0xfb,0x43,0x4f,0x8a,0x69,0x3d,0xdd,0x4b, +0x21,0x3f,0x92,0xaf,0xe5,0x5e,0x05,0x5f,0x43,0xfe,0xdc,0x3a,0x8c,0x77,0x5f,0x16, +0x6c,0x6d,0x51,0x83,0x35,0xae,0x99,0x18,0x7c,0x76,0x66,0x77,0x38,0x3f,0x86,0x3f, +0x3a,0xf9,0xe2,0xbe,0xaf,0x0d,0x7f,0x63,0x1b,0xf6,0x38,0x27,0xf1,0x30,0xa2,0x8a, +0x2b,0xa4,0x80,0xa2,0x8a,0x28,0x03,0xf7,0x76,0x59,0x06,0x0d,0x52,0x9a,0x5f,0x7a, +0x26,0x9b,0x3d,0xf8,0xaa,0x93,0x49,0x9e,0x86,0xbe,0x1c,0xf6,0x06,0x48,0xe5,0x9b, +0xaf,0x14,0x2d,0x46,0x09,0xcd,0x48,0xbd,0xa8,0x28,0x95,0x4d,0x4c,0x95,0x0a,0xd4, +0xcb,0x40,0x32,0xca,0x0e,0x95,0x32,0xd4,0x51,0x9a,0x95,0x68,0x25,0x13,0x25,0x4c, +0xbf,0x77,0xde,0xa0,0x5a,0x99,0x7a,0x1a,0x60,0x48,0xb5,0x65,0x6a,0xb2,0xd5,0x95, +0xa4,0x04,0xcb,0xfd,0x2a,0x48,0xfa,0x8a,0x8d,0x3b,0xd4,0x91,0xf5,0x14,0x99,0x68, +0xb3,0x1f,0xde,0xa9,0x63,0xfe,0xb5,0x0c,0x7d,0x45,0x4e,0x2a,0x4a,0x2a,0xa7,0x86, +0x74,0x83,0xad,0x1d,0x54,0xe9,0x96,0xa7,0x53,0xc0,0x1f,0x6c,0x31,0x03,0x26,0x3f, +0xde,0xae,0x43,0xf6,0x87,0xf0,0x86,0xa7,0xe3,0xbf,0x82,0x3e,0x33,0xd0,0x74,0x77, +0x54,0xd4,0x2f,0xf4,0xd9,0xa1,0x8c,0x36,0x7e,0x7e,0x39,0x5e,0x3b,0x91,0xc5,0x7a, +0x1c,0x67,0xaf,0xd2,0x9e,0x41,0xda,0x2b,0x3b,0x25,0xb1,0xad,0x3a,0x8e,0x12,0x8c, +0xfb,0x1f,0xce,0xd7,0x8d,0x11,0xbc,0x35,0xa9,0x4b,0x60,0xd6,0xcc,0xb7,0x30,0x92, +0xb2,0x2b,0x82,0x36,0x36,0x70,0x41,0x15,0xc3,0xce,0x66,0xb8,0x91,0x98,0xa1,0x04, +0xff,0x00,0xb3,0x8a,0xfb,0x6b,0xfe,0x0a,0x21,0xf0,0x0e,0xfb,0xe1,0xdf,0xc6,0x6b, +0xcd,0x76,0xde,0x16,0x8b,0xc3,0xde,0x20,0x63,0x77,0x04,0xf1,0xa6,0x55,0x65,0x3f, +0xeb,0x23,0x27,0xa0,0x20,0x9c,0xfd,0x0d,0x7c,0x8d,0x71,0x0d,0xbd,0xb9,0x5d,0xa5, +0xa6,0x7f,0x7e,0x95,0xce,0x92,0x8e,0x87,0xea,0x12,0xbe,0x3e,0x9c,0x6b,0x73,0xda, +0x2f,0xfa,0xf5,0x30,0x22,0xd3,0xe5,0x61,0xb9,0x8f,0x96,0x9f,0xde,0x6a,0xb1,0x6d, +0x2a,0xc2,0xc1,0x6d,0xd4,0xb3,0x74,0x2e,0x7a,0xfe,0x15,0x66,0xf1,0x0d,0xc6,0x15, +0x9c,0x22,0x8e,0xb4,0xdb,0x6b,0xa5,0x59,0x16,0x1b,0x54,0x01,0x89,0xc1,0x7f,0xeb, +0x5a,0x44,0xe4,0x9d,0x08,0x52,0x95,0xa2,0xfe,0x7d,0x5f,0xa2,0x3f,0x72,0xbf,0x61, +0xff,0x00,0x89,0x5e,0x0e,0xf1,0x17,0xc0,0xff,0x00,0x0b,0x78,0x67,0x42,0xf1,0x0d, +0xbe,0xa9,0xab,0xe8,0xfa,0x74,0x6b,0x7b,0x6a,0xaa,0x63,0x96,0x36,0x3c,0x9f,0x94, +0x8c,0x90,0x09,0xc6,0x47,0xa5,0x7d,0x22,0xbf,0x74,0x57,0xe3,0x3f,0xfc,0x13,0x5e, +0xe3,0x52,0x9f,0xf6,0xa4,0xd1,0x22,0xb1,0x92,0x41,0x1a,0x5a,0x5d,0x1b,0xb2,0xbf, +0x75,0xa3,0x11,0xf2,0x0f,0xe3,0x8a,0xfd,0x99,0x5f,0xba,0x28,0x3e,0x33,0x1f,0x45, +0x50,0xac,0xd2,0x77,0xbe,0xa1,0x45,0x14,0xaa,0x32,0xde,0xd4,0x1e,0x70,0xab,0x8e, +0x73,0x4f,0xdc,0x3d,0x6b,0xc2,0x7e,0x39,0x7e,0xd0,0xd2,0xfc,0x33,0xd7,0x93,0x48, +0xd3,0xf4,0xf8,0xee,0xae,0xbc,0xb1,0x2c,0x93,0x4e,0xc7,0x60,0x07,0xa0,0x00,0x77, +0xaf,0x20,0xff,0x00,0x86,0xd8,0xf1,0x45,0xbd,0xd2,0x06,0xd1,0x34,0xeb,0xb8,0x58, +0xe0,0x47,0x1b,0x32,0xb7,0x4f,0x5c,0xd7,0x97,0x57,0x32,0xc2,0xd1,0x9b,0xa7,0x39, +0xd9,0xaf,0x53,0xb6,0x9e,0x0e,0xbd,0x48,0xf3,0x46,0x3a,0x1f,0x42,0xfe,0xd0,0xdf, +0x19,0x2c,0xfe,0x0d,0x7c,0x3f,0xb9,0xd5,0x5a,0x48,0x9b,0x54,0x98,0x18,0xac,0x6d, +0xdc,0xe7,0x7c,0x84,0x75,0xc7,0xa0,0xea,0x6b,0xf3,0x43,0xc4,0xde,0x24,0xbc,0xf1, +0x46,0xad,0x73,0xa9,0x6a,0x17,0x2f,0x77,0x79,0x77,0x21,0x96,0x49,0x58,0xf2,0xcd, +0xdf,0xe9,0x5d,0xf7,0xc6,0x2f,0x19,0x6a,0xdf,0x1a,0x7c,0x54,0xfa,0x9e,0xb8,0xcd, +0x05,0xa4,0x4b,0xb2,0xde,0xc6,0xdc,0x8d,0x90,0x27,0xb9,0x3d,0x7d,0x49,0xef,0x5e, +0x75,0x26,0x87,0x71,0x1a,0xbb,0x09,0x14,0xe1,0x32,0x1b,0x61,0xc7,0x6e,0x06,0x33, +0xcd,0x70,0xd4,0xc7,0x51,0xc4,0x69,0x4e,0x69,0xaf,0x53,0xdf,0xc1,0xe1,0xd6,0x1e, +0x37,0x9f,0xc4,0xce,0x9f,0xe1,0x66,0x97,0x7d,0xaf,0x78,0xc3,0x4b,0xb1,0xb2,0x67, +0x56,0x79,0x54,0xbb,0x2f,0xf7,0x73,0xcd,0x7e,0x8d,0x6b,0x5e,0x2d,0xd0,0x7e,0x09, +0x7c,0x35,0x93,0x59,0xf1,0x05,0xe2,0xd9,0x59,0x5a,0x46,0x0b,0x12,0x72,0xf2,0x36, +0x38,0x45,0x1d,0xd8,0xfa,0x57,0xcd,0x1f,0xb2,0x27,0x85,0xbc,0x27,0xe1,0xd8,0x2e, +0xbc,0x4d,0xac,0xf8,0x9b,0x48,0x6b,0x88,0x22,0xf3,0x7c,0x96,0xbb,0x44,0x30,0x2f, +0x76,0x70,0xc4,0x10,0x05,0x7c,0xbf,0xfb,0x78,0x7e,0xd4,0x0d,0xf1,0x73,0xc6,0x8d, +0xa4,0x68,0x77,0x7b,0xfc,0x2d,0xa4,0x33,0x47,0x6c,0xf0,0x9d,0xcb,0x71,0x27,0xf1, +0x4b,0xc7,0x6e,0xc3,0xda,0xbd,0x0c,0x34,0x39,0x63,0xcd,0xd5,0x97,0xec,0x1e,0x63, +0x88,0x54,0x63,0xf0,0x47,0x76,0x72,0x1f,0xb5,0x87,0xed,0x6d,0xae,0x7c,0x78,0xf1, +0x24,0xd1,0x99,0x64,0xb1,0xf0,0xdd,0xbb,0x9f,0xb1,0x69,0xa1,0xb8,0x03,0xb3,0x3e, +0x3a,0xb7,0xf2,0xaf,0x98,0xaf,0x6f,0x88,0x56,0x90,0x9e,0x9d,0x3d,0xe8,0xbc,0xd4, +0x25,0x91,0x98,0xb6,0xd9,0x3f,0x43,0x58,0xd7,0x92,0x35,0xc4,0xeb,0x12,0x80,0x50, +0x72,0x70,0x6b,0xb9,0x1f,0x63,0x18,0xd3,0xc2,0x51,0xf6,0x74,0x97,0x92,0x36,0xa2, +0xf1,0x95,0xcd,0xbc,0x2a,0x63,0x82,0x15,0x94,0x10,0xc1,0xe4,0x05,0xf1,0x8f,0x40, +0x78,0xaa,0x3a,0xb7,0x8c,0x35,0x6f,0x12,0xcf,0x08,0xbf,0xd4,0xae,0x18,0xc4,0xa5, +0x22,0x1e,0x61,0x0a,0x80,0xf5,0x00,0x0e,0x95,0x9f,0x36,0x55,0x76,0x11,0x8a,0x9f, +0x41,0xd1,0xe7,0xd5,0x6f,0xc4,0x76,0xf6,0xed,0x78,0x57,0xe6,0x6b,0x75,0xfb,0xec, +0xa3,0xae,0xdf,0x53,0x5a,0xb9,0xca,0x4b,0x56,0x7c,0xf5,0x4c,0x0d,0x39,0x49,0x53, +0xa7,0x1d,0x7f,0x13,0x4b,0xc1,0x7a,0x3e,0xdf,0x12,0x59,0xda,0x4a,0x58,0xdb,0xdc, +0x3f,0x97,0xf2,0xb1,0x1c,0x91,0xc7,0x3e,0xb9,0xc5,0x7d,0x4f,0xe0,0xdf,0xed,0x7f, +0x05,0xda,0x44,0xb7,0x8c,0x7c,0x49,0xe1,0xf7,0xca,0xb5,0x9d,0xfc,0x6b,0x23,0x29, +0xe3,0x2a,0x19,0x87,0xf5,0xae,0x37,0xc3,0x3f,0x06,0x7f,0xb5,0x74,0x1b,0x2d,0x77, +0x46,0x90,0xdd,0x2c,0x3b,0x6e,0xe3,0x52,0x3e,0x72,0x23,0x60,0x64,0x8c,0x8f,0xef, +0xae,0x0f,0x1e,0x82,0xbe,0xa4,0xbf,0xf0,0x2c,0x50,0x69,0x7a,0x8e,0x9e,0xa5,0x65, +0xdb,0x7b,0x6f,0x3a,0x30,0x1d,0x63,0x91,0x03,0x0f,0xd0,0x8f,0xca,0xb4,0xc2,0xd6, +0x95,0xdf,0x2b,0x3c,0x1c,0xcb,0x07,0x53,0x03,0x57,0xd9,0xd4,0x5f,0xf0,0x57,0x73, +0xcc,0xa6,0xf0,0x87,0xc2,0xaf,0x15,0x5c,0x45,0x75,0xa2,0xda,0xc9,0xa5,0x6a,0x0a, +0x7f,0xd2,0x34,0xaf,0x30,0xc2,0xe3,0xd4,0xa8,0x27,0x0d,0xf4,0x07,0x35,0xde,0xe9, +0x3e,0x03,0xd2,0xb4,0x7b,0x32,0xf6,0x17,0xba,0xac,0x70,0xe3,0x21,0x99,0xd8,0xaa, +0xfb,0x15,0x3c,0x8f,0xc6,0xbc,0x5f,0xc5,0x1e,0x15,0x8b,0x51,0xd4,0x2e,0x1a,0x42, +0xd6,0xf3,0x42,0x76,0x24,0xa9,0xc3,0x02,0x4f,0x43,0xf8,0x73,0x5d,0x3f,0xc2,0x9f, +0x15,0x78,0xbf,0xe1,0xff,0x00,0x89,0x22,0x59,0x2f,0xd7,0x56,0xd1,0x01,0xc4,0xf1, +0xcd,0x1f,0x98,0x54,0x7e,0x3c,0xfd,0x47,0x23,0xda,0xbd,0xca,0x38,0x98,0xbd,0x1a, +0xd4,0xf2,0x5a,0xd2,0xe7,0x47,0xa4,0xf8,0x76,0xda,0xee,0xe2,0xfb,0x54,0xb8,0x99, +0xca,0xae,0x54,0x49,0x31,0x39,0xeb,0xc7,0x5e,0xf5,0xf6,0xf7,0xec,0xdf,0x32,0xde, +0x47,0x0d,0xba,0x29,0x51,0x6b,0x6e,0xb2,0x31,0x23,0x93,0xbb,0xee,0x8f,0xcb,0x9f, +0xc6,0xbe,0x47,0xf1,0xc6,0x8f,0x36,0xb5,0xe2,0x5f,0x0d,0x2d,0xbc,0xb0,0x41,0xa2, +0x6a,0x13,0x09,0xe1,0x9a,0xd4,0xfe,0xe2,0x7c,0x72,0xf1,0xe7,0xb4,0x83,0xfb,0xbd, +0xc7,0x4e,0x95,0xf7,0x47,0xc0,0xff,0x00,0x0e,0x2e,0x97,0x63,0xa9,0xdf,0x24,0x66, +0x24,0xba,0x98,0x24,0x2a,0x7f,0xb8,0xa0,0x0f,0xe7,0xfc,0xa9,0xe2,0xe7,0x1f,0x62, +0xec,0x61,0x23,0xd3,0xa8,0xa5,0xa4,0xaf,0x9e,0x32,0x1a,0xdd,0x68,0xa1,0xba,0xd1, +0x41,0x24,0x7e,0xb5,0x1b,0x7d,0xea,0x93,0xde,0xa3,0x63,0xb9,0xa9,0xa1,0x8c,0x6e, +0x29,0xad,0xd1,0x69,0xcd,0x4c,0x7c,0xf1,0x56,0x41,0x14,0x9f,0x78,0xf3,0x55,0x2e, +0x17,0xcc,0x86,0x45,0xfe,0xf2,0x91,0xfa,0x55,0xa9,0x3a,0x92,0x2a,0x0d,0xd8,0xe6, +0xa8,0x47,0xe2,0xbf,0xc4,0xfd,0x3c,0xe9,0x9e,0x36,0xd5,0xed,0x8a,0xed,0xf2,0x6e, +0xe6,0x8f,0x18,0xf4,0x91,0x85,0x72,0x95,0xed,0xff,0x00,0xb5,0xe7,0x85,0x9f,0xc3, +0x3f,0x1a,0xbc,0x4b,0x11,0x4d,0xa9,0x2d,0xd1,0xb9,0x42,0xbd,0x08,0x90,0x6e,0xcf, +0xe7,0x5e,0x21,0x5f,0x7d,0x46,0x5c,0xf4,0xe3,0x2f,0x23,0xfb,0x1f,0x29,0xae,0xb1, +0x38,0x1a,0x35,0x57,0x58,0xaf,0xc8,0x28,0xa2,0x8a,0xd8,0xf5,0x82,0x8a,0x28,0xa0, +0x02,0x8a,0x28,0xa0,0x0b,0x9a,0x3e,0xb1,0x79,0xe1,0xfd,0x5a,0xcf,0x53,0xd3,0xae, +0x1e,0xd2,0xfe,0xce,0x64,0xb8,0xb7,0x9e,0x3f,0xbd,0x1c,0x8a,0x41,0x56,0x1f,0x42, +0x05,0x7e,0xaf,0x7e,0xcc,0xff,0x00,0xb6,0x47,0x86,0x3e,0x36,0x68,0xb6,0x7a,0x76, +0xb1,0x79,0x6d,0xa0,0xf8,0xcd,0x14,0x47,0x35,0x84,0xf2,0x6c,0x8e,0xe5,0xba,0x6f, +0x81,0x98,0xfc,0xd9,0xfe,0xe6,0x77,0x0f,0x71,0xcd,0x7e,0x4a,0xd2,0xab,0x15,0x60, +0x41,0x20,0x8e,0x84,0x57,0x0e,0x2f,0x07,0x0c,0x5c,0x6d,0x2d,0x1a,0xd9,0x9f,0x2f, +0x9e,0xf0,0xfe,0x1b,0x3e,0xa4,0xa1,0x55,0xf2,0xce,0x3b,0x49,0x74,0xff,0x00,0x34, +0x7e,0xfa,0xd1,0x5f,0x89,0x7e,0x19,0xfd,0xa1,0x3e,0x25,0x78,0x3e,0xde,0x3b,0x7d, +0x23,0xc7,0x1a,0xe5,0x9d,0xb4,0x78,0xd9,0x6e,0x2f,0x5d,0xa2,0x5c,0x7a,0x21,0x25, +0x7f,0x4a,0xd9,0xd4,0xbf,0x6b,0x2f,0x8b,0xfa,0xa4,0x1e,0x4c,0xbf,0x10,0x35,0xa8, +0xd7,0xd6,0xde,0xe3,0xc9,0x6f,0xfb,0xe9,0x30,0x6b,0xc1,0x79,0x35,0x5b,0xe9,0x34, +0x7e,0x59,0x2f,0x0e,0xb1,0xaa,0x56,0x8d,0x78,0xb5,0xf3,0xfc,0xb5,0xfc,0xcf,0xd6, +0x1f,0x8b,0x1f,0x1a,0xfc,0x21,0xf0,0x5b,0x41,0x93,0x53,0xf1,0x46,0xad,0x0d,0x9f, +0xc8,0x5a,0x1b,0x35,0x60,0xd7,0x37,0x07,0xd2,0x38,0xf3,0x93,0xcf,0x19,0xe8,0x3b, +0x91,0x5f,0x91,0xff,0x00,0xb4,0x17,0xc7,0x4d,0x5f,0xe3,0xff,0x00,0xc4,0x1b,0x9f, +0x11,0x6a,0x4b,0xf6,0x5b,0x44,0x1e,0x45,0x86,0x9e,0xad,0xb9,0x6d,0x61,0x07,0x85, +0xcf,0x76,0x27,0x96,0x6e,0xe4,0xfa,0x00,0x07,0x9f,0xea,0xba,0xc5,0xfe,0xbb,0x7d, +0x25,0xe6,0xa5,0x7b,0x71,0x7f,0x77,0x21,0xcb,0xcf,0x73,0x2b,0x48,0xec,0x7d,0x49, +0x27,0x26,0xa9,0xd7,0xb1,0x83,0xc0,0x43,0x0b,0xef,0x5e,0xf2,0x3f,0x43,0xe1,0xee, +0x15,0xc3,0xe4,0x4d,0xd6,0x72,0xe7,0xaa,0xf4,0xbd,0xac,0x92,0xf2,0x5f,0xaf,0xe4, +0x14,0x51,0x45,0x7a,0x87,0xdc,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14, +0x51,0x40,0x15,0x35,0x69,0x3c,0xbd,0x36,0x73,0xfe,0xce,0x3f,0x33,0x8a,0xe4,0x2b, +0xba,0xc6,0x8d,0x70,0xe2,0xd3,0x5b,0xba,0xb9,0xb1,0xb7,0xb8,0x1b,0x63,0xbb,0xb6, +0x8c,0x49,0xe4,0xb8,0x23,0x0c,0xe9,0xd5,0x93,0x19,0x04,0x03,0x9e,0x41,0xed,0x8a, +0xc7,0xf1,0x17,0x80,0xb5,0x5f,0x0e,0xda,0xc7,0x7c,0x56,0x2d,0x47,0x47,0x99,0x8a, +0xc3,0xab,0x69,0xef,0xe7,0x5b,0x48,0x47,0x6d,0xc3,0x94,0x6f,0xf6,0x5c,0x2b,0x7b, +0x56,0x13,0x92,0xe6,0xb1,0xfc,0xbf,0xe2,0x56,0x27,0xdb,0xe7,0x11,0xa5,0x1f,0xf9, +0x77,0x04,0x9f,0xab,0x6e,0x5f,0x93,0x47,0x3b,0x45,0x25,0x2f,0xb7,0x7a,0x47,0xe4, +0xa1,0x5d,0xf6,0x9e,0x4f,0xc3,0x3f,0x0d,0xa6,0xa6,0xdf,0x27,0x8a,0xb5,0x88,0x0f, +0xd8,0x57,0x82,0xd6,0x36,0x6c,0x0a,0xb4,0xe7,0xd2,0x49,0x06,0x55,0x3a,0x15,0x5d, +0xcd,0xfc,0x4a,0x43,0x34,0x3f,0x0b,0x59,0xf8,0x46,0xce,0x1f,0x10,0x78,0xba,0x0c, +0xab,0x20,0x97,0x4e,0xd0,0x5c,0xed,0x9a,0xfc,0x9c,0xed,0x79,0x07,0x54,0x80,0x1e, +0x49,0x38,0x2f,0x8c,0x2f,0x52,0x47,0x27,0xaf,0x6b,0x97,0xbe,0x26,0xd6,0x2f,0x35, +0x4d,0x46,0x6f,0x3e,0xf6,0xea,0x43,0x24,0xae,0x14,0x28,0xcf,0x60,0xaa,0x00,0x0a, +0xa0,0x60,0x05,0x00,0x00,0x00,0x03,0x81,0x59,0xfc,0x6e,0xcb,0x62,0xfe,0x1d,0x7a, +0x99,0xfd,0x38,0xa5,0xa2,0x8a,0xd0,0x80,0xa2,0x8a,0x28,0x00,0xa2,0x8a,0x28,0x03, +0xee,0xff,0x00,0xf8,0x27,0x67,0x88,0xa2,0xb1,0xd6,0xfc,0x38,0xac,0x40,0x1f,0x6b, +0xb8,0xb3,0x6e,0x7a,0x17,0x5c,0xaf,0xea,0x45,0x7e,0xa0,0xd7,0xe1,0x8f,0xec,0xd3, +0xf1,0x05,0xfc,0x21,0xe2,0xf1,0x65,0xf6,0x96,0xb6,0xfb,0x54,0x89,0x2d,0xb4,0xa0, +0xfd,0xcb,0x84,0x39,0x53,0xed,0x9f,0xe8,0x2b,0xf6,0x3b,0xc0,0xfe,0x35,0x8b,0xe3, +0x17,0xc3,0x87,0x9f,0x4f,0xbe,0x6d,0x33,0x51,0x9a,0x13,0x6d,0x72,0xf0,0xe0,0xc9, +0x6b,0x31,0x18,0x24,0x0f,0xd4,0x7d,0x6b,0xcb,0xce,0xa8,0x3a,0xb0,0xa5,0x89,0x5b, +0x25,0xca,0xfc,0xad,0xb7,0xe0,0xcf,0x37,0x27,0xad,0xf5,0x4c,0x5e,0x27,0x05,0x2d, +0xe4,0xfd,0xa4,0x7c,0xd3,0x5a,0xa5,0xe8,0xd1,0xd2,0x68,0x5e,0x36,0xd0,0xfc,0x4b, +0xa9,0x6a,0x36,0x1a,0x6e,0xa3,0x0d,0xd5,0xe6,0x9f,0x27,0x95,0x73,0x0a,0x9f,0x99, +0x1b,0xfa,0x8e,0x0f,0x23,0xd2,0xbe,0x43,0xfd,0xab,0xa6,0x59,0x3e,0x2e,0x4e,0xa2, +0xdf,0xc9,0x31,0xd9,0xc2,0xac,0xff,0x00,0xf3,0xd4,0xe0,0x9d,0xdf,0x91,0x0b,0xff, +0x00,0x01,0xaf,0x5c,0xf1,0xb7,0xec,0xeb,0x1f,0x86,0xf4,0xfb,0x6d,0x77,0xc0,0x12, +0xdc,0xda,0x78,0x97,0x4d,0x6f,0x3b,0xf7,0x93,0x19,0x0d,0xe7,0x72,0x0e,0x4e,0x37, +0x1f,0xc8,0xe4,0x8a,0xf9,0xdf,0xc4,0x7a,0xd7,0x89,0xfe,0x30,0x7c,0x40,0x89,0xe4, +0xb3,0x2f,0xaf,0xc9,0xb2,0xdd,0x2d,0x60,0x52,0x9b,0x0a,0x0f,0x43,0xf7,0x79,0xc9, +0x39,0xe9,0xcd,0x7a,0x39,0x16,0x1a,0x84,0x31,0x0f,0x15,0x87,0xa9,0x78,0x28,0xb4, +0xef,0xa3,0x4f,0x4d,0xfc,0x9f,0x7f,0xf2,0x3e,0x6b,0x8a,0x71,0xb8,0xaa,0x98,0x48, +0xe0,0x71,0x74,0xad,0x52,0x52,0x4e,0x3c,0xba,0xc6,0x4b,0x5d,0x17,0x5e,0x65,0x74, +0x9a,0xeb,0xd3,0x46,0x7d,0x17,0xfb,0x31,0xfc,0x58,0xd1,0x75,0x5f,0x0c,0xe9,0xfe, +0x11,0x70,0x2c,0x35,0x7b,0x28,0xd8,0x24,0x6d,0x8d,0xb7,0x2b,0x92,0xc5,0x94,0xff, +0x00,0x7b,0x9e,0x47,0xe3,0x5e,0xf3,0x5f,0x3e,0x7c,0x27,0xfd,0x97,0x3f,0xe1,0x15, +0xd7,0x2c,0xb5,0xff,0x00,0x10,0x6a,0x7f,0x6b,0xbf,0xb7,0x61,0x34,0x76,0xb6,0xb9, +0x08,0x92,0x75,0xcb,0x31,0xe5,0xb1,0xf8,0x0a,0xf6,0xcf,0x16,0x78,0xa7,0x4f,0xf0, +0x5f,0x87,0xef,0x35,0x8d,0x4e,0x61,0x0d,0xa5,0xb2,0x6e,0x3e,0xac,0x7b,0x28,0x1d, +0xc9,0x3c,0x0a,0xf9,0xac,0xd6,0x38,0x6a,0xb8,0xc7,0xf5,0x26,0xe5,0xcd,0xf9,0xbe, +0xdd,0xcf,0xb4,0xc8,0xa5,0x8c,0xa1,0x97,0x25,0x99,0x45,0x41,0xc1,0x69,0xfe,0x14, +0xb7,0x7d,0x11,0xf2,0x8f,0xed,0x81,0xac,0x47,0x7d,0xf1,0x12,0xc2,0xc6,0x36,0xc9, +0xb1,0xb1,0x51,0x27,0xb3,0x3b,0x16,0xfe,0x58,0xaf,0x37,0xf8,0x7b,0xe1,0xf7,0xbe, +0xd4,0x56,0xfe,0x55,0xc5,0xb5,0xb9,0xca,0xe4,0x7d,0xe7,0xf6,0xfa,0x56,0xca,0xda, +0xcf,0xf1,0x3f,0xc4,0x9a,0x9f,0x89,0xb5,0x82,0xca,0x97,0x53,0x96,0x48,0x97,0x8c, +0x8e,0x81,0x73,0xe8,0x06,0x07,0xbd,0x76,0x56,0xf6,0xf1,0xda,0xc2,0x91,0x43,0x1a, +0xc5,0x12,0x0c,0x2a,0xa8,0xc0,0x15,0xf5,0x18,0xac,0x7c,0x70,0x18,0x38,0xe5,0xf4, +0xb5,0x9a,0x56,0x93,0xe8,0xbb,0xd8,0xf8,0x8c,0x0e,0x53,0x2c,0xd7,0x31,0x96,0x71, +0x88,0xd2,0x9b,0x95,0xe2,0xba,0xbb,0x7c,0x2d,0xf6,0x5a,0x27,0xe7,0xe8,0x4b,0xb8, +0xed,0x03,0x27,0x03,0xa0,0xcf,0x14,0x94,0x51,0x5f,0x1a,0x7e,0x94,0x15,0x1d,0xd5, +0xd4,0x56,0x56,0xd3,0x5c,0x4f,0x22,0xc5,0x04,0x28,0x64,0x92,0x46,0xe8,0xaa,0x06, +0x49,0x3f,0x85,0x49,0x5f,0x29,0x7e,0xd7,0x3f,0xb4,0x04,0x16,0xf6,0x17,0x3e,0x05, +0xf0,0xf5,0xc8,0x96,0xee,0x6f,0x93,0x53,0xba,0x85,0xb8,0x89,0x7f,0xe7,0x88,0x23, +0xf8,0x8f,0x7f,0x41,0xc5,0x6d,0x46,0x94,0xab,0x4d,0x46,0x24,0xca,0x5c,0xaa,0xec, +0xf9,0xa3,0xe2,0xd7,0x8d,0x3f,0xe1,0x61,0x7c,0x46,0xd7,0xb5,0xf5,0xdc,0x20,0xbb, +0xb9,0x3e,0x42,0xb7,0x51,0x12,0x80,0xa9,0xff,0x00,0x8e,0xa8,0xae,0x46,0x8a,0x2b, +0xea,0xe3,0x15,0x14,0xa2,0xba,0x1c,0x2f,0x57,0x70,0xa2,0x8a,0x29,0x80,0x51,0x45, +0x14,0x01,0xfb,0x85,0x2c,0xdd,0xb3,0x50,0xee,0xcd,0x21,0x39,0x34,0x83,0x8a,0xf8, +0x63,0xda,0x24,0x5a,0x91,0x6a,0x24,0xa9,0x16,0x98,0xc9,0x96,0xa6,0x5a,0x85,0x6a, +0x45,0xcd,0x04,0x96,0x63,0x6e,0x2a,0x74,0x3d,0x2a,0xba,0x54,0xcb,0x9e,0xb4,0xc4, +0x4e,0x0d,0x4c,0xb5,0x02,0xb7,0x4a,0x9a,0x3e,0xd9,0xa6,0x04,0xcb,0x56,0x10,0xe6, +0xa0,0x1d,0xaa,0x68,0xfa,0x54,0x81,0x3a,0xf4,0xa9,0x63,0xe3,0x15,0x12,0x7d,0xda, +0x95,0x7e,0xf0,0xa4,0xca,0x89,0x61,0x3b,0x54,0xeb,0xd4,0xd5,0x74,0xed,0x53,0xa9, +0xdd,0x9a,0x82,0xcb,0x31,0xf5,0x1f,0x4a,0x9d,0x7a,0x55,0x68,0xd8,0xf1,0x56,0x13, +0xd2,0x90,0xd1,0xe7,0x5f,0xb4,0x17,0xc1,0x9d,0x2b,0xe3,0xb7,0xc3,0x2d,0x53,0xc2, +0xda,0x94,0x63,0xce,0x96,0x33,0x25,0x95,0xce,0x39,0x82,0xe0,0x0f,0x91,0xc7,0xf2, +0x3e,0xc6,0xbf,0x08,0xbe,0x20,0x78,0x5e,0xf7,0xc0,0x7e,0x25,0xd5,0xf4,0x2d,0x4e, +0x2f,0x27,0x50,0xd3,0xae,0x64,0xb5,0x99,0x33,0xd1,0x95,0x88,0x3f,0x85,0x7f,0x44, +0x98,0xc9,0x19,0xaf,0xc3,0xff,0x00,0xdb,0xb3,0xc3,0x63,0x45,0xf8,0xe5,0xe3,0x09, +0x42,0x6d,0x69,0x35,0x49,0x4b,0x7b,0xee,0x3b,0x81,0xfc,0x8d,0x61,0x2d,0xd1,0xf6, +0x19,0x1d,0x69,0xf2,0xd4,0xa7,0x7d,0x12,0xbf,0xe8,0x7c,0xc5,0x71,0x29,0x90,0xe3, +0x39,0x35,0x67,0x4e,0x5f,0x20,0x34,0xa7,0xa8,0xe0,0x7d,0x6a,0xac,0x8b,0xb5,0xb2, +0x47,0x27,0xa0,0xad,0x18,0xfc,0xb8,0xe1,0x8d,0x64,0x6d,0xbf,0xc4,0x6a,0x8f,0x5a, +0x0b,0x9a,0x6e,0x4f,0xa1,0xea,0x7f,0xb3,0xbf,0xc5,0xcd,0x5b,0xe0,0x5f,0xc4,0xbd, +0x2b,0xc5,0xba,0x58,0xf3,0xa4,0xb5,0x72,0x26,0xb7,0x27,0x02,0x78,0x9b,0x87,0x8c, +0x9f,0x71,0x5f,0xb9,0x7f,0x06,0xfe,0x33,0x78,0x7f,0xe3,0x97,0x82,0x6c,0xfc,0x4d, +0xe1,0xb9,0xc4,0xb6,0x93,0x7c,0x92,0xc4,0xc7,0xe7,0x82,0x50,0x06,0xe8,0xd8,0x7a, +0x8c,0xfe,0x35,0xfc,0xf6,0xd9,0xc9,0x2d,0xe3,0x0d,0xb9,0x8e,0x0e,0xde,0xfe,0xf5, +0xf7,0xa7,0xfc,0x12,0xef,0xe3,0x00,0xf0,0x9f,0xc5,0x3b,0xdf,0x03,0xde,0xdd,0xb0, +0xd3,0xb5,0xe8,0x0c,0x96,0xd1,0xb1,0xf9,0x45,0xd2,0x60,0x8f,0xa1,0x2b,0x9f,0xca, +0x83,0xcd,0xcc,0xb0,0xaa,0xa5,0x2f,0x6d,0x15,0xaa,0xfc,0x51,0xfa,0xb5,0x52,0x2a, +0xf1,0x51,0xd4,0xa3,0xa5,0x26,0x7c,0x82,0x3e,0x51,0xfd,0xa9,0x7e,0x1f,0xea,0xf0, +0xea,0xb7,0xbe,0x25,0xb5,0xb6,0x96,0xf2,0xc1,0x91,0x5a,0x57,0x88,0x16,0x31,0x61, +0x71,0xc8,0xf4,0xe3,0xad,0x7c,0xa5,0x0c,0xc3,0x53,0x91,0xa4,0x72,0x63,0x5d,0xc7, +0x6b,0x2a,0xe1,0x97,0xeb,0x5f,0xaa,0xd7,0x56,0x90,0xde,0x5b,0xcb,0x04,0xf1,0xac, +0xb0,0xc8,0xa5,0x1d,0x18,0x64,0x30,0x23,0x04,0x1a,0xfc,0xeb,0xf8,0xa9,0xe0,0x9b, +0x6f,0x07,0xf8,0xbb,0x58,0xd3,0x2d,0x23,0x64,0x8e,0x09,0xd8,0x7c,0xc3,0x9c,0x1f, +0x98,0x7e,0x18,0x35,0xf0,0xb9,0xde,0x0a,0x14,0x7f,0x7d,0x1f,0xb4,0xf5,0x3e,0x9b, +0x2d,0xc4,0x4a,0x6f,0xd9,0xcb,0xa2,0x3c,0xef,0x51,0xd1,0x1e,0xfa,0xd6,0x68,0x2e, +0x9c,0xdc,0xd9,0x4e,0x86,0x39,0x3c,0xb0,0x51,0xf6,0xfe,0x15,0xcf,0x5c,0xf8,0x4e, +0xc7,0xc3,0xe9,0xf6,0x8b,0x19,0xe6,0x43,0x1a,0x9d,0x91,0xbc,0x84,0x8e,0x95,0x9f, +0xe3,0xcf,0x8d,0xd6,0x5e,0x09,0x94,0x5b,0x5b,0xc2,0x35,0x0b,0xa1,0xf7,0xd4,0x48, +0x15,0x13,0xea,0x6b,0xc6,0xf5,0xaf,0x8e,0xfe,0x23,0xf1,0x05,0xd1,0x58,0x62,0xb5, +0xb5,0x46,0xe1,0x56,0x38,0xf7,0x63,0xf1,0xaf,0x23,0x0b,0x96,0x63,0xaa,0x2b,0xc7, +0x48,0xbe,0xfd,0x7e,0x47,0xd5,0x43,0x05,0x52,0xb2,0xe6,0xb7,0xde,0x74,0x1e,0x36, +0xf1,0x52,0xe9,0xd0,0xc8,0x18,0xbb,0x4d,0x2a,0x90,0x15,0x0f,0x6e,0xf9,0xf6,0xaf, +0x16,0xbf,0x9b,0xcf,0x76,0x2b,0x19,0xeb,0xd4,0xd6,0x97,0x89,0xbc,0x45,0xac,0x5d, +0xc8,0x11,0xfc,0x93,0xb0,0x72,0xf9,0x04,0x9f,0x52,0x6b,0x97,0x92,0xfe,0xf5,0x49, +0x69,0x00,0x35,0xf7,0xb8,0x2c,0x2f,0xd5,0x69,0x28,0x75,0x3d,0x3a,0x14,0xe3,0x46, +0x1c,0xad,0x3f,0x37,0x60,0x92,0x50,0xcc,0x91,0x91,0xbb,0x9e,0x77,0x1e,0x83,0xda, +0xaa,0x5c,0x5a,0xf9,0x39,0x31,0x37,0xde,0xfe,0x16,0xe4,0xd5,0xb4,0x8f,0xcc,0x4d, +0xf2,0xab,0x06,0x6f,0x5a,0xab,0x71,0x03,0x79,0x72,0xcc,0xac,0xa6,0x28,0xc8,0x04, +0x16,0xe7,0x9f,0x41,0x5e,0x80,0xeb,0xf2,0x53,0x87,0x3c,0xca,0x5e,0x5e,0xd2,0x03, +0x7c,0xe7,0xb8,0xe8,0xd5,0xea,0x7f,0x0d,0x7c,0x2e,0xf0,0xb5,0xae,0xbb,0x6f,0x0b, +0x6b,0x3a,0x32,0xc8,0x16,0xe5,0xed,0x4e,0x2e,0x6c,0x5f,0xb1,0x2b,0xfc,0xbb,0x1e, +0x6b,0xcf,0xfc,0xeb,0x49,0x16,0xd6,0xe0,0xdb,0xb4,0xb0,0x28,0x11,0xdc,0xa8,0x38, +0x21,0xbf,0xbc,0xa7,0xb6,0x7f,0xa5,0x7d,0x0f,0xf0,0x17,0xc2,0x77,0xfa,0x25,0x9d, +0xcf,0x8a,0x34,0x33,0x1e,0xa3,0x65,0x11,0xd9,0x2c,0x6a,0xdc,0x5f,0xc0,0x7e,0xfc, +0x12,0xc7,0xfc,0x32,0x28,0xf9,0x81,0xf6,0xa9,0xa9,0x2e,0x58,0x86,0x02,0x8f,0x35, +0x7b,0xc3,0x5b,0x6b,0xe7,0xfd,0x7f,0x5a,0x1f,0x43,0x78,0x42,0x2b,0x4d,0x1e,0xc3, +0xed,0x36,0xad,0x1f,0x95,0x73,0xb6,0x73,0x2a,0x01,0xb1,0xd8,0xae,0x04,0xa0,0x76, +0xdc,0x38,0x22,0xbd,0x83,0x41,0xf0,0xd8,0xf1,0x27,0x84,0xb4,0xfd,0x6a,0xca,0x48, +0xee,0x56,0xe2,0xde,0x38,0xae,0x0c,0x67,0x26,0x29,0xa1,0x25,0x4a,0xe3,0xdd,0x76, +0x9a,0xf9,0xcb,0x56,0xd7,0xac,0xbc,0x37,0xe7,0xc5,0x1d,0xe2,0x8d,0x1e,0x75,0xf3, +0x6c,0xe4,0x6f,0xf9,0xe3,0x32,0xee,0x52,0x7f,0xdd,0x7c,0x66,0xa9,0xfe,0xc2,0xff, +0x00,0x1d,0xf5,0x1d,0x2f,0xc6,0xda,0xcf,0x87,0xf5,0xfb,0xa5,0x6f,0x09,0xdd,0x6e, +0x96,0x69,0x25,0x6e,0x2d,0xe4,0xce,0x04,0x8b,0xed,0x8e,0xbe,0xd5,0xcd,0x83,0x6e, +0x12,0x94,0x9e,0xc7,0xa1,0xc5,0x78,0x28,0xe3,0x30,0xd4,0xe5,0x4a,0x37,0xaa,0xb5, +0x56,0xea,0xba,0xaf,0xd5,0x1e,0x8b,0xe2,0x0f,0x03,0x05,0x87,0xcd,0x9e,0x22,0x93, +0x4e,0xef,0x39,0x1b,0x7b,0x93,0x85,0x1f,0x90,0x1f,0x9d,0x71,0x3a,0x4f,0xd9,0x6d, +0x5a,0xe2,0xda,0x4b,0x95,0x86,0xe1,0x90,0x90,0x5f,0xb9,0x26,0xbe,0xa9,0xf8,0xa2, +0xda,0x36,0x9b,0x6f,0x73,0xac,0x5c,0x5c,0xda,0xc3,0xa6,0x43,0x11,0x22,0xe2,0x49, +0x00,0x88,0x47,0xd0,0xbe,0x7b,0xe7,0xa0,0x1d,0xeb,0xf3,0xab,0xc5,0xff,0x00,0x16, +0xad,0x75,0x6f,0x1b,0x4d,0x61,0xe1,0x48,0x1a,0x6b,0x63,0x3e,0xd3,0xa8,0x5d,0xf7, +0xf5,0xda,0x83,0xa0,0xfa,0x9a,0xf7,0xe9,0x7c,0x6a,0xc7,0xe2,0xde,0xf3,0x4d,0x35, +0xb1,0xeb,0xda,0x87,0x8a,0x2e,0x3c,0x35,0xa5,0x9d,0x1d,0x67,0x5b,0x8b,0x43,0x73, +0x0d,0xe2,0xa9,0x39,0x30,0x4c,0xad,0xc3,0x2f,0xa6,0x46,0x41,0xf5,0xcd,0x7e,0xb2, +0x78,0x32,0x24,0x4f,0x0a,0xe9,0x2d,0x1a,0x85,0x59,0x2d,0xa3,0x93,0xe5,0xe9,0xf3, +0x28,0x3f,0xd6,0xbf,0x1c,0x74,0x9d,0x1c,0xf8,0xbb,0xc6,0xde,0x1d,0xd0,0xe3,0x94, +0xcd,0x71,0x7d,0x79,0x14,0x52,0x49,0x9e,0x08,0x24,0x64,0xfd,0x05,0x7e,0xcf,0x69, +0xba,0x7a,0x69,0x3a,0x5d,0xa5,0x94,0x47,0x31,0xdb,0x42,0xb0,0xa9,0xf6,0x50,0x00, +0xfe,0x55,0xa6,0x35,0xec,0x8c,0x64,0x58,0xa4,0xa2,0x91,0xab,0xcc,0x31,0x11,0xba, +0xd2,0x1a,0x5a,0x63,0x7d,0xec,0x50,0x21,0xad,0xc2,0xd4,0x66,0x9c,0xcd,0x4c,0xab, +0x42,0x7d,0xc4,0xa6,0xb7,0x2d,0x9f,0x4a,0x77,0xad,0x46,0xcd,0xb5,0x73,0xeb,0x4c, +0x82,0x16,0x62,0x73,0x50,0x3f,0xdd,0xa9,0x5b,0x85,0xa8,0x24,0x6a,0xa1,0x1f,0x0a, +0xff,0x00,0xc1,0x44,0xbc,0x0c,0x46,0xad,0xa1,0x78,0x92,0x18,0x80,0x4b,0xa8,0x1a, +0xce,0x67,0x1f,0xdf,0x52,0x59,0x33,0xf5,0x19,0xfc,0xab,0xe1,0xa3,0xc1,0xc5,0x7e, +0xbe,0x7e,0xd2,0x1f,0x0f,0x7f,0xe1,0x65,0x7c,0x24,0xd6,0xf4,0xc8,0xa2,0x12,0xdf, +0xc3,0x1f,0xda,0xec,0xfd,0x7c,0xe4,0x04,0x80,0x3e,0xa3,0x23,0xf1,0xaf,0xc9,0x2d, +0x6e,0xc5,0xec,0x6f,0xe5,0x47,0x52,0x87,0x71,0x05,0x48,0xe8,0x73,0xc8,0xfc,0xeb, +0xeb,0x72,0xca,0xbc,0xf4,0x79,0x3a,0xa3,0xfa,0x3f,0x80,0xb3,0x15,0x89,0xcb,0xfe, +0xab,0x27,0xef,0x53,0x76,0xf9,0x74,0xff,0x00,0x2f,0x91,0x9f,0x5e,0xd3,0xfb,0x2e, +0xfe,0xcd,0xf7,0x7f,0xb4,0x67,0x8c,0x2e,0xec,0x0e,0xa1,0xfd,0x8f,0xa3,0x69,0xd1, +0x09,0xef,0x6f,0x44,0x7b,0xdf,0x04,0xe1,0x51,0x07,0x4d,0xc7,0x9e,0xa7,0x80,0x09, +0xe7,0xa5,0x78,0xb5,0x7d,0x6b,0xff,0x00,0x04,0xfd,0xf8,0xe5,0xe1,0xbf,0x85,0xfe, +0x28,0xd7,0xf4,0x0f,0x15,0x5e,0x45,0xa5,0xe9,0xda,0xf4,0x71,0xf9,0x57,0xd7,0x07, +0x6c,0x4b,0x2a,0x64,0x04,0x76,0xfe,0x10,0x43,0x1f,0x98,0xf1,0x9c,0x57,0x66,0x2e, +0x55,0x21,0x46,0x52,0xa5,0xb9,0xf6,0x39,0xf5,0x6c,0x5e,0x1f,0x2d,0xad,0x57,0x02, +0xaf,0x51,0x2d,0x2c,0xae,0xf7,0xd5,0xa5,0xd6,0xca,0xec,0xed,0x2d,0x7f,0x62,0x3f, +0x84,0x1f,0x13,0x2d,0xf5,0xcd,0x2f,0xe1,0x9f,0xc4,0xad,0x42,0xff,0x00,0xc5,0x3a, +0x38,0x2b,0x71,0x05,0xf1,0x8e,0x58,0xb7,0x82,0x46,0x08,0x58,0xa3,0x3b,0x4b,0x0c, +0x6e,0x52,0xc0,0x7b,0xd7,0x9b,0xfc,0x12,0xfd,0x97,0xfe,0x1e,0x78,0xe3,0x46,0xb9, +0x8b,0xc6,0xbf,0x13,0x2d,0x3c,0x21,0xe2,0xa8,0x35,0x39,0x74,0xe3,0xa3,0x49,0x75, +0x6c,0x92,0x33,0x2b,0x05,0x52,0xab,0x23,0x06,0x3b,0x8f,0x4c,0x0e,0x7b,0x57,0xb6, +0xf8,0xbb,0xf6,0x32,0xf1,0x87,0x81,0x75,0x3d,0x53,0xc6,0x7f,0x02,0x7c,0x70,0xe8, +0x75,0x05,0x69,0x5a,0xc3,0xcd,0x55,0x91,0xd1,0x8e,0xfd,0x91,0x4c,0x32,0xae,0x33, +0xd0,0x30,0x5e,0xdc,0x9a,0xf8,0xa7,0xc3,0xf2,0x6a,0xd2,0xfc,0x6a,0xd1,0xdb,0x5e, +0xf3,0xce,0xb4,0x75,0xeb,0x7f,0xb6,0x7d,0xa4,0x62,0x4f,0x37,0xcf,0x5d,0xdb,0xbd, +0xf3,0x5e,0x75,0x19,0x4e,0xb4,0x25,0xc9,0x5a,0xeb,0xf1,0x5e,0xba,0x1f,0x21,0x96, +0xd6,0xc4,0x66,0x14,0x2b,0x7d,0x5b,0x30,0x72,0x8a,0x49,0xab,0xa5,0xed,0x22,0xd2, +0xd5,0x34,0xd2,0x56,0x6f,0x6f,0x4d,0x0f,0xaf,0xfc,0x55,0xfb,0x00,0xfc,0x27,0xf0, +0x2d,0xc5,0xbc,0x3e,0x25,0xf8,0xbe,0x3c,0x3f,0x2d,0xc2,0x97,0x8a,0x3d,0x52,0x6b, +0x5b,0x66,0x91,0x41,0xc1,0x2a,0x1d,0x86,0x46,0x7b,0xd6,0x07,0xc0,0x5f,0xd8,0x1f, +0xc3,0x9f,0x18,0x7e,0x1b,0x59,0x78,0xa2,0xe3,0xc5,0xba,0x8d,0x9b,0xdc,0xdc,0x5c, +0x44,0x23,0xb6,0x86,0x37,0x42,0xb1,0xca,0xc8,0xac,0x09,0xeb,0x90,0xa0,0xfe,0x35, +0x6b,0xfe,0x0a,0x91,0xff,0x00,0x23,0x87,0x82,0x3f,0xeb,0xc2,0x6f,0xfd,0x19,0x5e, +0xa3,0xfb,0x3d,0xf8,0xb9,0xbc,0x0b,0xfb,0x15,0xf8,0x4f,0x5c,0x57,0xf2,0xd6,0xd7, +0x56,0x89,0x64,0x6c,0xe3,0x11,0xbd,0xf8,0x8d,0xcf,0xfd,0xf2,0xed,0x5c,0xae,0xae, +0x23,0xea,0xd0,0xa8,0xaa,0x6b,0x27,0x6e,0x9e,0x67,0x85,0x2c,0x76,0x6f,0x1c,0x96, +0x86,0x32,0x18,0xa6,0xea,0x56,0x9a,0x8a,0xd2,0x3a,0x7c,0x4b,0x4d,0x3a,0xe9,0xf7, +0x1f,0x14,0xf8,0x2f,0xe0,0x2c,0x9e,0x26,0xfd,0xa4,0x07,0xc2,0xd9,0xef,0x24,0x80, +0x47,0xa9,0xdc,0x58,0xcf,0x78,0x88,0x0b,0x22,0x42,0x1c,0xb3,0xe3,0xa6,0x70,0x9f, +0x99,0xaf,0x58,0xfd,0xab,0x7f,0x62,0xfd,0x13,0xf6,0x79,0xf8,0x6f,0x67,0xe2,0x5d, +0x3b,0xc4,0x77,0xfa,0xbc,0xf3,0xea,0x71,0x58,0x18,0x2e,0xa1,0x44,0x50,0xad,0x1c, +0xae,0x5b,0x2b,0xce,0x7f,0x76,0x3f,0x3a,0xfa,0x23,0xc3,0xff,0x00,0x0f,0xed,0xfc, +0x31,0xfb,0x70,0x7c,0x42,0xf1,0xa4,0xf1,0x04,0xd1,0xec,0xbc,0x3a,0x9a,0xb0,0x93, +0xb6,0xe9,0x54,0x06,0x7f,0xfc,0x83,0x35,0x71,0x9f,0xb6,0x2e,0xb9,0x71,0xe2,0x6f, +0xd8,0x77,0xe1,0xa6,0xaf,0x76,0xc5,0xee,0x6f,0xae,0xb4,0xdb,0x99,0x58,0xf7,0x67, +0xb2,0x9d,0x89,0xfd,0x6b,0x5f,0xad,0xd5,0xa9,0x5e,0x9a,0x8b,0xf7,0x5d,0xaf,0xea, +0xd5,0xce,0xf5,0x9f,0x63,0x31,0x59,0x96,0x0d,0x51,0xa9,0x6a,0x72,0x54,0xd4,0x96, +0x9a,0xca,0x49,0xc9,0xf4,0xec,0x91,0xf3,0x1d,0xe7,0xc1,0x1f,0x05,0xf8,0x0e,0xdf, +0x4c,0xb4,0xf8,0x87,0xe3,0xbb,0xbd,0x0f,0xc4,0x97,0xf6,0xd1,0xdd,0xbe,0x95,0xa4, +0xe8,0xe6,0xfb,0xfb,0x3e,0x39,0x54,0x34,0x66,0xe1,0xcc,0xa9,0xf3,0x15,0x21,0x8a, +0x20,0x24,0x0e,0xfc,0x8a,0xe4,0xfc,0x75,0xf0,0x57,0x59,0xf0,0x7f,0xc4,0x6d,0x37, +0xc2,0x56,0x92,0xc3,0xaf,0x4d,0xac,0xad,0xb4,0xda,0x35,0xe5,0x96,0x44,0x7a,0x84, +0x37,0x18,0xf2,0x24,0x40,0xd8,0x23,0x76,0x71,0x83,0xd0,0x83,0xf5,0xab,0xbe,0x1b, +0xd0,0xaf,0xff,0x00,0x68,0x2f,0x17,0x6a,0x7a,0xa7,0x89,0xbc,0x7b,0xa0,0x68,0x7a, +0x93,0xb4,0x22,0x6b,0xef,0x12,0x5c,0xfd,0x9b,0xcf,0xca,0x94,0x1b,0x02,0xa6,0x0e, +0xd5,0x8d,0x41,0xe9,0x8c,0xaf,0xad,0x76,0x3f,0x1c,0xfc,0x69,0xad,0xfc,0x34,0xf8, +0xd1,0xe1,0x3f,0xec,0xfd,0x3a,0x6d,0x32,0x7f,0x04,0x69,0x16,0x3a,0x6e,0x93,0x2e, +0xa7,0x14,0x72,0x1b,0xa8,0xe2,0x0c,0xcb,0x75,0x85,0x66,0x42,0xae,0xf2,0x3b,0x2e, +0xd6,0x20,0x0c,0x73,0x91,0xc7,0xa6,0xa5,0x52,0x33,0xe4,0xe6,0xbb,0xb3,0xba,0xe9, +0xf2,0x3e,0xce,0x15,0xb1,0x54,0xf1,0x0a,0x87,0xb5,0xe7,0xa8,0xe3,0x27,0x28,0xb4, +0x94,0x53,0xb2,0xb7,0x2b,0xb2,0x76,0xbb,0xb6,0xed,0xdb,0x57,0xa9,0x5e,0x4f,0x81, +0x7f,0x0f,0x6d,0x7c,0x50,0x7c,0x17,0x77,0xf1,0x49,0xa2,0xf1,0x92,0xcd,0xf6,0x39, +0x24,0x5d,0x19,0x9b,0x49,0x8e,0xef,0x3b,0x4c,0x06,0xe3,0xcc,0xdf,0x80,0xff,0x00, +0x29,0x93,0xcb,0xda,0x3d,0x30,0x2b,0xc7,0x7c,0x59,0xe1,0x7d,0x43,0xc1,0x5e,0x26, +0xd5,0x34,0x0d,0x5a,0x1f,0xb3,0xea,0x5a,0x6d,0xcc,0x96,0xb7,0x11,0x83,0x90,0x1d, +0x18,0x83,0x83,0xdc,0x71,0x90,0x7b,0x82,0x2b,0xb5,0xf8,0x3d,0xf0,0xbf,0x57,0xf8, +0xcd,0xe3,0x87,0x99,0xe4,0xfb,0x1e,0x8f,0x6d,0x2f,0xdb,0xb5,0xbd,0x72,0xe0,0xec, +0x82,0xca,0x0d,0xc5,0xa4,0x91,0xdc,0xf0,0x18,0x80,0xd8,0x07,0xa9,0xaa,0x7f,0x1f, +0x3c,0x77,0x69,0xf1,0x33,0xe3,0x27,0x8b,0xbc,0x4f,0x60,0xa5,0x6c,0x35,0x0b,0xf7, +0x7b,0x7d,0xca,0x54,0xb4,0x4a,0x02,0x23,0x10,0x7a,0x12,0xaa,0x0e,0x3d,0xeb,0x4a, +0x6e,0x4a,0xa7,0x23,0x95,0xf4,0xd7,0xc9,0xff,0x00,0xc1,0x3a,0xf0,0xb3,0xad,0x0c, +0x5b,0xc3,0xca,0xab,0xa9,0x68,0xde,0x57,0x4b,0xdd,0x95,0xd5,0x96,0x89,0x7c,0x4a, +0xee,0xce,0xed,0x59,0x77,0x3d,0x43,0xf6,0x4f,0xfd,0x96,0xf4,0xaf,0xda,0x23,0x44, +0xf1,0x7d,0xf6,0xa3,0xad,0xde,0x69,0x0f,0xa2,0x18,0x44,0x6b,0x6b,0x12,0x38,0x93, +0x7a,0xc8,0x4e,0xed,0xdd,0x31,0xb0,0x74,0xf5,0xae,0x67,0xf6,0x61,0xf8,0x0d,0xa7, +0xfc,0x7a,0xf8,0x9d,0x79,0xe1,0x7d,0x43,0x54,0xb9,0xd2,0xed,0xe0,0xb6,0x96,0x71, +0x71,0x6c,0x8a,0xce,0x4a,0xb0,0x00,0x61,0xb8,0xef,0x5f,0x4c,0xff,0x00,0xc1,0x2f, +0x21,0x5b,0x8f,0x0d,0x7c,0x4d,0x89,0x9b,0x62,0xbc,0x96,0x6a,0x5b,0xd0,0x14,0x9c, +0x66,0xbd,0x27,0xf6,0x69,0xfd,0x98,0xfc,0x1d,0xf0,0x8f,0xe2,0x5d,0xde,0xbf,0xa1, +0x7c,0x43,0x83,0xc4,0xf7,0xd2,0xdb,0x49,0x13,0x58,0x46,0xb1,0x02,0xaa,0xcc,0x09, +0x6f,0x95,0xd8,0xf1,0xf4,0xaf,0x26,0xbe,0x32,0x54,0xa7,0x5a,0x0e,0x5a,0xab,0x5b, +0x4f,0x2f,0xeb,0x73,0xe0,0xf3,0x4e,0x22,0xab,0x81,0xc4,0xe6,0x38,0x79,0x55,0x69, +0xc5,0x47,0xd9,0xe9,0x7b,0x37,0x1b,0xbd,0x6d,0xa6,0xbd,0xcf,0x99,0xbc,0x0f,0xfb, +0x08,0x9f,0x88,0xde,0x38,0xf8,0x83,0xa2,0xe9,0xfe,0x30,0x5d,0x32,0xdf,0xc2,0xda, +0x92,0x58,0x2c,0x97,0x76,0x5e,0x6b,0xdc,0x06,0x42,0xdb,0x8e,0xd7,0x50,0xbd,0x3a, +0x57,0x72,0x9f,0xf0,0x4b,0x4d,0x45,0xcf,0x1f,0x11,0x6c,0xc8,0xef,0xb7,0x4b,0x63, +0xff,0x00,0xb5,0x6b,0xe6,0xcf,0xda,0xb1,0x4b,0x7e,0xd1,0xde,0x3e,0x00,0x6e,0x27, +0x53,0x60,0x00,0x1f,0xec,0xad,0x7d,0x43,0xa8,0x58,0xaf,0xec,0x77,0xfb,0x1b,0xa3, +0xdb,0xed,0xb7,0xf1,0xe7,0x8d,0x02,0xa4,0x97,0x1c,0x79,0x91,0x87,0x5c,0x90,0xa7, +0xfd,0x88,0xcf,0xe6,0xd5,0x75,0x67,0x89,0x8c,0x60,0xe1,0x53,0x59,0x5a,0xca,0xcb, +0xe7,0xa9,0xd3,0x8e,0xc4,0x67,0x14,0xe9,0x61,0xaa,0x61,0xf1,0x9e,0xf5,0x7e,0x45, +0x18,0x7b,0x38,0xbd,0xe2,0xb9,0x9b,0x97,0x65,0xab,0x7a,0x79,0x1f,0x09,0xeb,0x5a, +0x69,0xd1,0xf5,0x9b,0xfd,0x3c,0xc8,0x26,0x36,0x97,0x12,0x41,0xe6,0x01,0x80,0xdb, +0x18,0xae,0x71,0xef,0x8a,0xa5,0x4a,0xcc,0x59,0x89,0x62,0x49,0x27,0x24,0x9e,0xa6, +0x92,0xbd,0xd5,0xb6,0xa7,0xe9,0xf1,0xba,0x49,0x3d,0xc2,0x8a,0x2a,0x2b,0xab,0x85, +0xb5,0xb7,0x92,0x66,0xe8,0xa3,0x3f,0x53,0xd8,0x50,0x67,0x5a,0xb4,0x30,0xf4,0xe5, +0x5a,0xab,0xb4,0x62,0x9b,0x6f,0xb2,0x5a,0xb3,0x9d,0xf1,0x0d,0xc7,0x9d,0x7d,0xb0, +0x74,0x8c,0x6d,0xfc,0x7a,0x9f,0xf3,0xed,0x4b,0xe1,0xff,0x00,0x14,0x6a,0xfe,0x15, +0xbb,0xfb,0x4e,0x91,0xa8,0xcf,0x61,0x29,0xfb,0xde,0x53,0x7c,0x92,0x0f,0x47,0x43, +0xf2,0xb8,0xff,0x00,0x65,0x81,0x07,0xd2,0xb3,0x24,0x73,0x23,0xb3,0xb1,0xcb,0x31, +0xc9,0xa4,0xae,0x79,0x7b,0xdb,0x9f,0xc4,0x39,0xb6,0x61,0x3c,0xd3,0x1f,0x5b,0x1b, +0x2d,0xe7,0x26,0xfd,0x17,0x45,0xf2,0x56,0x47,0x59,0x27,0xc4,0x05,0xbe,0xb8,0x79, +0xf5,0x0f,0x0d,0x68,0x37,0xb3,0x49,0xcb,0xc8,0x2d,0x0c,0x05,0x8f,0xae,0x23,0x65, +0x51,0xf8,0x00,0x29,0xf6,0xbf,0x12,0xae,0x74,0x7b,0x83,0x71,0xa2,0xe8,0xda,0x36, +0x8b,0x75,0xb4,0xaa,0xdd,0x41,0x69,0xe6,0xcb,0x1e,0x7a,0x95,0x32,0x96,0x0a,0x7f, +0xda,0x03,0x23,0xb1,0x15,0xc8,0x51,0x51,0xc9,0x1e,0xc7,0x95,0xcc,0xc9,0xaf,0x6f, +0xae,0x75,0x2b,0xa9,0x6e,0xaf,0x2e,0x25,0xbb,0xb9,0x94,0xee,0x92,0x69,0xdc,0xbb, +0xb9,0xf5,0x2c,0x79,0x26,0xa1,0xa2,0x8a,0xb2,0x42,0x8a,0x28,0xa0,0x02,0x8a,0x28, +0xa0,0x02,0x8a,0x28,0xa0,0x05,0x57,0x68,0xd9,0x59,0x18,0xab,0x29,0xc8,0x65,0x38, +0x20,0xfa,0xd7,0xd8,0x3f,0xb3,0x2f,0xed,0x3d,0xad,0xf8,0x4e,0xdd,0xb5,0x19,0xee, +0xd6,0xc5,0xed,0xa5,0x8a,0xce,0x5b,0xab,0x82,0x05,0xbd,0xe9,0x6c,0x95,0x8d,0xc7, +0xf7,0xf0,0xa4,0xe4,0x74,0xe0,0xf1,0x9e,0x7e,0x48,0xd1,0xf4,0x9b,0xcd,0x7f,0x56, +0xb3,0xd3,0x34,0xf8,0x1a,0xea,0xfa,0xf2,0x55,0x82,0x08,0x50,0x72,0xee,0xc7,0x00, +0x7e,0x66,0xba,0x4f,0x88,0x1a,0xa5,0xac,0x06,0xcf,0xc3,0x3a,0x4c,0xfe,0x7e,0x8f, +0xa3,0x6e,0x43,0x32,0x9f,0x96,0xee,0xe9,0xbf,0xd7,0x4e,0x31,0xd4,0x12,0x02,0xaf, +0xfb,0x2a,0x3d,0x71,0x57,0x1a,0xae,0x0d,0xc2,0xd7,0x4f,0x74,0xf6,0x68,0xe0,0xc5, +0xe0,0x61,0x8c,0x8a,0x93,0x6e,0x32,0x8e,0xb1,0x92,0xd1,0xa7,0xe5,0xfa,0xae,0xa7, +0xec,0xc7,0x81,0xff,0x00,0x6a,0xaf,0x08,0xf8,0x96,0xd6,0x31,0xab,0x4a,0xda,0x0d, +0xe9,0x1c,0x89,0x81,0x78,0x5b,0xdd,0x5c,0x76,0xfa,0xe2,0xb5,0xee,0xe7,0xf8,0x79, +0xa8,0x78,0xcf,0x4c,0xf1,0x9d,0xb7,0x89,0xb4,0x9b,0x5b,0xfb,0x28,0xe4,0x8a,0x49, +0x21,0xba,0x87,0x6d,0xc2,0x38,0x23,0x0f,0xcf,0x51,0xce,0x0f,0x5e,0xd5,0xf8,0x8d, +0xe1,0xdf,0x89,0x1e,0x25,0xf0,0xac,0x7e,0x56,0x9d,0xab,0x4f,0x14,0x19,0xcf,0x92, +0xe7,0x7a,0x7e,0x47,0xa5,0x74,0xcb,0xfb,0x43,0xf8,0xc5,0x57,0x06,0x7b,0x36,0x6f, +0xef,0x1b,0x65,0xcd,0x72,0x7f,0x67,0xe0,0xf9,0x9c,0xe9,0x4a,0x50,0xbd,0xd3,0x5a, +0x35,0x67,0xba,0xd7,0xf5,0x39,0x25,0x57,0x37,0xe5,0x54,0xea,0xc6,0x9d,0x54,0x9a, +0x69,0xbb,0xc5,0xdd,0x6a,0x9d,0x92,0x6a,0xfe,0x87,0xec,0x6f,0x8b,0xbf,0x69,0xaf, +0x04,0x78,0x66,0xda,0x43,0x6b,0xa8,0x7f,0x6e,0x5d,0xa8,0xf9,0x60,0xb0,0x1b,0x94, +0x9f,0x79,0x0f,0xca,0x07,0xe7,0x5f,0x05,0xfe,0xd4,0x1f,0xb6,0x4d,0xcf,0x88,0xee, +0x24,0xb6,0x59,0xa3,0x96,0xe6,0x32,0x45,0xb6,0x9b,0x6e,0xdb,0xa1,0xb5,0x24,0x7d, +0xf9,0x0f,0xf1,0x37,0xb7,0xf2,0xaf,0x92,0x75,0xef,0x8b,0x3e,0x2b,0xf1,0x24,0x0d, +0x05,0xde,0xaf,0x32,0xc0,0xdf,0x7a,0x2b,0x70,0x22,0x53,0xf5,0xdb,0x5c,0x8f,0x5c, +0x93,0xc9,0xae,0x8c,0x3d,0x0c,0x2e,0x07,0xde,0xc3,0xc5,0xb9,0x7f,0x34,0xb7,0x5e, +0x8b,0x64,0x4d,0x5c,0x3e,0x3b,0x32,0x69,0x66,0x35,0x12,0xa7,0xfc,0x90,0xbd,0x9f, +0xf8,0x9b,0xd5,0xfa,0x6c,0x7d,0x35,0xf0,0x87,0xf6,0xce,0xd4,0x3c,0x37,0x0c,0x5a, +0x67,0x8c,0x2d,0x1b,0x55,0xb1,0x53,0x84,0xbe,0xb5,0x55,0x59,0xe2,0x5f,0x42,0xbc, +0x2b,0x81,0xf8,0x1a,0xfa,0x7b,0xc2,0x7f,0x1c,0x7c,0x0b,0xe3,0x50,0x83,0x4b,0xf1, +0x2d,0x8b,0xce,0xdd,0x2d,0xe7,0x93,0xc9,0x97,0xfe,0xf8,0x7c,0x1f,0xca,0xbf,0x31, +0xe9,0x08,0x0d,0xd4,0x66,0xb8,0x2b,0x60,0xe9,0xd5,0x6e,0x5b,0x36,0x7d,0x04,0x27, +0xc8,0x94,0x52,0xd1,0x1f,0xad,0x1f,0xdb,0x1a,0x7e,0x33,0xf6,0xfb,0x5c,0x7a,0xf9, +0xcb,0xfe,0x35,0xc7,0xf8,0xb7,0xe3,0x9f,0x81,0x3c,0x12,0xae,0x35,0x4f,0x12,0xd8, +0xac,0xeb,0xd6,0xda,0xde,0x4f,0x3a,0x5f,0xfb,0xe1,0x32,0x7f,0x3a,0xfc,0xca,0xf3, +0x1f,0x6e,0xdd,0xed,0x8f,0x4d,0xc7,0x14,0xc0,0x02,0xf0,0x06,0x05,0x73,0xc7,0x2e, +0x8d,0xfd,0xe9,0x17,0xed,0x7b,0x23,0xe9,0x9f,0x8c,0x1f,0xb6,0x66,0xa7,0xe2,0x6b, +0x79,0xf4,0xaf,0x07,0x41,0x2e,0x8b,0x61,0x26,0x51,0xf5,0x09,0x88,0xfb,0x4c,0x8b, +0xd3,0x0a,0x07,0x09,0xf9,0x93,0x5f,0x34,0x3b,0xb4,0x8c,0xcc,0xec,0x59,0x98,0xe4, +0xb3,0x1c,0x92,0x7d,0x4d,0x25,0x15,0xe9,0x53,0xa5,0x0a,0x4a,0xd0,0x46,0x52,0x93, +0x96,0xe1,0x45,0x14,0x56,0xa4,0x85,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x1f,0xb6, +0xea,0xd4,0xbc,0xb7,0x22,0xa3,0x5a,0x7a,0xb7,0x38,0xaf,0x86,0x3d,0xc2,0x51,0x52, +0x2d,0x45,0x52,0x06,0xe2,0x98,0x89,0x90,0xd4,0xcb,0x55,0xd3,0xb5,0x4e,0xb4,0x12, +0x58,0x8f,0xad,0x4e,0x33,0x55,0x95,0xbb,0xd4,0xc1,0xba,0x53,0x11,0x3a,0xd4,0xe9, +0xda,0xab,0x2b,0x54,0xcb,0xd2,0x9d,0xb4,0x02,0xca,0xf6,0xa9,0xe3,0xaa,0xa8,0x4d, +0x58,0x46,0xa5,0x60,0x2c,0xa7,0x7a,0x90,0x54,0x08,0xdf,0x95,0x4c,0x29,0x0e,0x25, +0x98,0xfe,0xf5,0x4d,0x19,0xf9,0xaa,0xba,0x0c,0x54,0xd1,0x9c,0x54,0x1a,0x16,0x52, +0xac,0xae,0x32,0x79,0xeb,0x55,0x57,0x9e,0x2a,0x74,0x6e,0x84,0xd4,0xb0,0x44,0xcb, +0x5f,0x95,0x5f,0xf0,0x54,0xcf,0x02,0x1d,0x17,0xe2,0x28,0xd6,0x23,0x8f,0xf7,0x1a, +0xac,0x11,0xdc,0x64,0x0f,0xe3,0x5f,0x91,0xbf,0xa7,0xe7,0x5f,0xaa,0xbe,0xb5,0xf2, +0xa7,0xfc,0x14,0x73,0xe1,0x4c,0xbf,0x11,0x3e,0x02,0xde,0x6a,0xb6,0x30,0x09,0xaf, +0xf4,0x02,0x6e,0x5b,0x00,0x6e,0x30,0x1c,0x07,0xc7,0xd0,0xe0,0xfe,0x15,0x94,0xf5, +0x3d,0xcc,0xa6,0xba,0xa3,0x89,0x49,0xed,0x24,0xd7,0xdf,0xb7,0xe3,0x63,0xf1,0x3c, +0x29,0x9a,0xe0,0x8e,0xd9,0xab,0xf2,0x5b,0x09,0x26,0x5d,0xc3,0x2a,0xa3,0xbf,0x4a, +0x86,0xce,0x3f,0xf4,0xc7,0x07,0xb5,0x3e,0xe2,0x36,0x9a,0xe9,0x90,0x12,0x13,0xd2, +0x93,0xdc,0xfb,0x1a,0x6b,0xdc,0xbd,0xaf,0x76,0x5d,0xb5,0xbb,0xde,0xdb,0x63,0x5f, +0x95,0x7f,0x8e,0xbd,0x4b,0xe0,0x27,0x8c,0x1b,0xc0,0xbf,0x17,0x3c,0x29,0xe2,0x08, +0xf9,0x97,0x4f,0xd4,0x21,0x98,0xb6,0x7a,0xae,0xec,0x30,0xfc,0x89,0xaf,0x2d,0x8f, +0x6c,0x4a,0xa8,0xa3,0x6a,0xfa,0x0a,0xd0,0xb5,0xb8,0xfb,0x3b,0x26,0x1b,0x6b,0x03, +0x91,0xb7,0xa8,0xa4,0x6b,0x51,0x73,0xc5,0xc6,0x47,0xf4,0x79,0x6b,0x22,0xcc,0x43, +0xa1,0xdc,0x8c,0xb9,0x07,0xd4,0x55,0x9a,0xf9,0x9b,0xf6,0x07,0xf8,0xe8,0x3e,0x33, +0x7c,0x17,0xb2,0x82,0xfa,0xe8,0xcf,0xe2,0x0d,0x0c,0x0b,0x2b,0xcf,0x31,0xb7,0x48, +0xea,0x3f,0xd5,0xc8,0x49,0xeb,0x91,0xdf,0xda,0xbe,0x99,0xa4,0x7e,0x73,0x52,0x9b, +0xa5,0x37,0x09,0x6e,0x84,0xaf,0x85,0xff,0x00,0xe0,0xa2,0x61,0xfc,0x1f,0x6b,0x67, +0xad,0xd8,0x2f,0x97,0x71,0xaa,0xc4,0xd6,0xf2,0x3a,0xf5,0xdc,0x83,0x39,0xfc,0x8e, +0x2b,0xed,0xdd,0x4b,0x55,0xb6,0xd2,0x6c,0xae,0x2e,0xee,0xe5,0x58,0x2d,0xad,0xd0, +0xc9,0x24,0xae,0x70,0x15,0x40,0xc9,0x35,0xf9,0x9f,0xfb,0x5e,0x7c,0x41,0x9f,0xe3, +0x04,0xd7,0x9a,0xb0,0x69,0x21,0xd0,0xb4,0xf5,0x30,0x69,0xd6,0xfc,0xfe,0xf0,0x93, +0x86,0x90,0x8a,0xf3,0xf1,0x92,0xa5,0x68,0xd3,0xa8,0xae,0xdb,0xd1,0x7a,0x1e,0xce, +0x4b,0x0e,0x6c,0x6d,0x36,0xfe,0x1b,0xeb,0xf3,0xd8,0xf8,0x3b,0xc4,0xde,0x46,0xa9, +0xaa,0x09,0x2e,0x4c,0xe6,0x46,0x50,0xc4,0xab,0xe0,0x62,0xad,0xc3,0x6f,0xe1,0xfb, +0x4b,0x0f,0x36,0xdc,0xde,0x43,0x2c,0x80,0xc6,0xbb,0xe4,0x0c,0x1b,0xd4,0xf4,0xe2, +0xa3,0xf1,0x35,0x8a,0x6e,0x69,0xd1,0x1e,0x45,0x57,0xc0,0xda,0x71,0xd3,0xad,0x60, +0x5e,0xea,0xd2,0xdc,0x48,0xa9,0xff,0x00,0x1e,0xb1,0xa8,0xda,0xa8,0x06,0x42,0xd7, +0x4c,0x57,0x32,0x47,0xeb,0x12,0xe5,0xa6,0xda,0xb1,0x52,0xf1,0x23,0x8e,0x56,0xfb, +0x3b,0x31,0x3f,0xdd,0xcf,0x4a,0x82,0x29,0x1a,0x39,0x07,0x9a,0x3e,0x6f,0xef,0x67, +0x35,0x23,0x22,0x0c,0xfc,0xc4,0x93,0xc9,0x6a,0xab,0x34,0x8d,0xd0,0x9c,0xfa,0x35, +0x6a,0x71,0xcb,0xdc,0xf7,0x99,0x3d,0xd5,0xe4,0x98,0x00,0x60,0x0c,0x71,0x8a,0xa0, +0x54,0xc8,0xbb,0xb6,0x96,0x19,0xc1,0x6c,0x74,0x3e,0xf4,0xd5,0xb8,0x92,0x59,0x3c, +0xbd,0x99,0x7e,0x81,0x7d,0x7e,0x95,0xd3,0xf8,0x16,0x1d,0x46,0x3d,0x51,0xee,0x2c, +0xac,0xe3,0xd4,0x44,0x43,0xfd,0x27,0x4d,0x99,0x73,0xe6,0xa7,0x70,0x54,0xff,0x00, +0x3e,0xa2,0x83,0xce,0x75,0x3e,0xb3,0x3e,0x55,0x7d,0x7c,0x89,0xbc,0x2d,0xe0,0xbd, +0x4a,0xea,0x19,0x1e,0x08,0x92,0xe6,0x2b,0x84,0x2a,0xa9,0x9c,0xa9,0x6e,0xa0,0x1f, +0x43,0xc5,0x7d,0x27,0xfb,0x28,0x31,0xf0,0xfe,0x8b,0x73,0xa5,0xde,0x42,0xd1,0x1d, +0x4e,0xf5,0xf6,0x2c,0x83,0x05,0x04,0x69,0xc9,0x3f,0x89,0xc7,0xe3,0x58,0x9e,0x1f, +0xf0,0x64,0x16,0x7e,0x0b,0x9f,0xc5,0x3e,0x0f,0x99,0xae,0x6c,0x96,0x50,0xd2,0xe9, +0xd7,0x23,0x32,0x5a,0x9f,0xe3,0x82,0x4e,0xe4,0x7a,0x1f,0x60,0x6a,0xce,0x9b,0xe2, +0xed,0x57,0x57,0xd5,0x12,0x0d,0x0e,0x28,0xff,0x00,0xb4,0x35,0x0b,0x66,0x5d,0x2e, +0xe2,0x61,0xc4,0x4c,0xe7,0x12,0xa4,0x98,0x1f,0x78,0x76,0x6f,0xa5,0x72,0x54,0x97, +0xb4,0x4e,0x28,0xfa,0xcc,0x1e,0x16,0x18,0x45,0x1a,0x9b,0xe8,0xf6,0xd7,0xee,0x39, +0xbf,0x1e,0xea,0xf0,0xf8,0xb3,0x4c,0xb2,0x4b,0x01,0x2d,0xc4,0x76,0xb3,0xcd,0x63, +0x12,0x2e,0x55,0x59,0x44,0x8c,0xcd,0x83,0xd3,0x0b,0x90,0x07,0xe3,0x4c,0x5f,0x0a, +0xc9,0xe1,0x1f,0x0e,0xbd,0xe4,0x57,0x4a,0x6f,0x5d,0x54,0xc8,0xa0,0xfc,0x92,0xc7, +0xfd,0xc5,0x23,0xa6,0x31,0x5e,0xd1,0xa2,0xfc,0x37,0xb9,0xf8,0x77,0xf0,0xbf,0x4e, +0xb3,0x0f,0x1d,0xe5,0xdd,0x94,0xce,0xf7,0xcb,0x22,0x71,0x2e,0xe3,0x97,0x23,0x3d, +0xb3,0xc0,0x35,0xe4,0x17,0x4b,0x27,0x88,0xe7,0xd4,0xac,0xf4,0xb8,0x26,0xbb,0xb4, +0xf3,0x63,0x58,0x61,0x8b,0x3f,0x23,0x33,0x60,0x8f,0x62,0x30,0x79,0xac,0xa3,0x3b, +0xbe,0x58,0xec,0x8f,0x56,0x34,0x79,0x69,0xfb,0x6a,0x9f,0x1c,0xba,0x76,0x76,0xe9, +0xfd,0x7e,0x65,0xdb,0xef,0x18,0x6b,0x5f,0x16,0xfe,0x1c,0x4f,0xe1,0x49,0xf5,0x56, +0xb0,0x9e,0x09,0x16,0xe2,0xd0,0x5c,0xb1,0x11,0xc9,0xb4,0x0f,0x92,0x42,0x3a,0x70, +0x41,0x04,0xf4,0xae,0x13,0xc3,0xdf,0x0f,0x2e,0xbc,0x17,0x28,0x3a,0x94,0xb0,0xca, +0x64,0x87,0xcf,0x8a,0x68,0x1f,0x29,0x20,0x27,0x1f,0x29,0x3d,0x7a,0x1a,0xf7,0x28, +0xfc,0x33,0x17,0x86,0xa1,0x9b,0x4e,0x8a,0x4f,0xb4,0xea,0xe2,0xd3,0x13,0xcc,0xe8, +0x07,0xde,0xe0,0x27,0x03,0xd0,0x0c,0xb7,0x52,0x00,0x15,0xe4,0xe7,0x50,0xd5,0xbc, +0x69,0xac,0x68,0x9e,0x15,0xd3,0x2c,0xe4,0xbb,0xbf,0x85,0xfe,0xc7,0x02,0xb2,0xfc, +0xee,0xcc,0xe4,0xf2,0x3b,0x02,0x4f,0x4f,0x41,0x5e,0xb6,0x06,0xa7,0xef,0x1f,0x2e, +0xc8,0xfc,0xcf,0x88,0x30,0x4a,0x85,0x15,0x5f,0x13,0x65,0x5a,0x5b,0xdb,0x6d,0xff, +0x00,0x3b,0x6e,0xfc,0x8f,0xaa,0xbf,0x60,0x5f,0x83,0x57,0x1f,0x10,0xbe,0x25,0x4d, +0xe3,0x19,0x87,0x93,0xa1,0x68,0x20,0x44,0x87,0x6e,0x7c,0xe9,0x8e,0x0e,0xd1,0xf4, +0x1d,0x6b,0xf4,0xf0,0x9c,0xd7,0x9a,0xfe,0xcf,0x7f,0x08,0xad,0x7e,0x0a,0xfc,0x29, +0xd1,0x7c,0x33,0x00,0x53,0x75,0x0c,0x7e,0x6d,0xec,0xcb,0xd6,0x5b,0x86,0xe5,0xdb, +0x3f,0x5e,0x07,0xd2,0xbd,0x26,0xb5,0xad,0x51,0xd4,0x95,0xfa,0x1f,0x99,0xce,0x57, +0x61,0x48,0xd4,0x13,0x4d,0xac,0x4c,0x80,0xb6,0x2a,0x33,0xc7,0x3d,0xe9,0x49,0xcf, +0x34,0xc9,0x1b,0x9a,0x00,0x6d,0x34,0xf5,0xa5,0x3f,0xaf,0x6a,0x69,0x62,0xbf,0x5a, +0xb2,0x44,0x7f,0x9b,0x81,0xc5,0x43,0x33,0x06,0xe3,0xb0,0xa7,0xb3,0xed,0x07,0xd4, +0xd5,0x77,0x6e,0xd5,0x44,0x0c,0x66,0xe2,0xab,0xb9,0xa7,0xc8,0xd5,0x5e,0x47,0xe6, +0xa8,0x63,0x24,0x6f,0xc6,0xbf,0x36,0x7f,0x6c,0xef,0x82,0xc7,0xc0,0x9e,0x3a,0x97, +0x54,0xb1,0x83,0x6e,0x8f,0xab,0xb3,0x5c,0x42,0x54,0x7c,0xb1,0xcb,0x92,0x5e,0x3f, +0xea,0x2b,0xf4,0x85,0xdb,0xf3,0xae,0x0b,0xe3,0x27,0xc3,0x5b,0x2f,0x8b,0x3e,0x07, +0xbe,0xd0,0xae,0xc2,0xac,0xcc,0x3c,0xdb,0x59,0xd8,0x64,0xc3,0x30,0x07,0x6b,0x0f, +0xcc,0x83,0xec,0x4d,0x77,0x61,0x2b,0xbc,0x3d,0x45,0x2e,0x9d,0x4f,0xa5,0xe1,0xdc, +0xe2,0x59,0x36,0x3e,0x35,0x9b,0xf7,0x1e,0x92,0xf4,0xef,0xf2,0x3f,0x1f,0xcf,0x1c, +0x1a,0xfa,0xc3,0xf6,0x17,0xf8,0x43,0xf0,0xeb,0xe3,0x34,0x7e,0x2f,0xd1,0xfc,0x59, +0x62,0x97,0xba,0xfc,0x29,0x1c,0xda,0x76,0xfb,0x99,0x22,0xdb,0x1e,0xd6,0x57,0x20, +0x2b,0x0d,0xd8,0x62,0x87,0xa1,0xaf,0x9e,0x7e,0x21,0x78,0x23,0x50,0xf0,0x3f,0x89, +0x2f,0xf4,0xbd,0x42,0x06,0x82,0xee,0xd6,0x53,0x1c,0xa9,0x8e,0xf9,0xe1,0x87,0xa8, +0x3d,0x73,0x58,0x1a,0x56,0xaf,0x7d,0xa0,0xdf,0xc5,0x7d,0xa6,0xde,0xdc,0x69,0xf7, +0xb1,0x1c,0xc7,0x71,0x6b,0x2b,0x47,0x22,0x7d,0x19,0x48,0x22,0xbe,0xb2,0xb4,0x5d, +0x7a,0x4d,0x53,0x95,0xaf,0xd4,0xfe,0x9d,0xc6,0x52,0x96,0x6d,0x80,0x71,0xc2,0x56, +0x70,0x72,0x49,0xa9,0x2e,0x9b,0x3e,0x9d,0x1f,0xe4,0x7e,0x8b,0xfe,0xc6,0x9f,0x01, +0x7e,0x29,0xfc,0x0f,0xf8,0x81,0xaf,0x9f,0x13,0x4d,0xfd,0x9b,0xe0,0x94,0x82,0x45, +0x10,0xb5,0xf2,0x49,0x04,0xef,0xbb,0xe4,0x91,0x10,0x31,0xd9,0xc7,0x25,0x88,0x1c, +0x70,0x6b,0xe4,0xff,0x00,0x8a,0x5e,0x26,0xd3,0x7c,0x63,0xfb,0x60,0xdd,0xea,0xfa, +0x43,0xac,0xda,0x7d,0xc7,0x89,0xad,0xbc,0xa9,0x93,0xa4,0x9b,0x65,0x8d,0x4b,0x0f, +0xa9,0x06,0xb8,0x3d,0x7b,0xe3,0x7f,0xc4,0x0f,0x14,0x69,0xe6,0xc3,0x55,0xf1,0x96, +0xb5,0x7b,0x64,0xcb,0xb5,0xa0,0x92,0xf1,0xf6,0x38,0xf4,0x60,0x0f,0xcc,0x3e,0xb5, +0xc6,0x41,0x34,0x96,0xb3,0x47,0x34,0x32,0x34,0x53,0x46,0xc1,0xd2,0x48,0xd8,0xab, +0x2b,0x03,0x90,0x41,0x1d,0x08,0x35,0xcd,0x47,0x0b,0x38,0xd4,0x95,0x5a,0x8d,0x5d, +0xab,0x68,0x79,0x18,0x0c,0x97,0x13,0x4f,0x15,0x5b,0x1d,0x8c,0x9c,0x5d,0x4a,0x91, +0xe5,0xf7,0x53,0x4b,0xd5,0xdd,0xdd,0xb3,0xed,0xef,0xf8,0x2a,0x47,0xfc,0x8e,0x1e, +0x08,0xff,0x00,0xaf,0x09,0xbf,0xf4,0x65,0x6b,0x59,0xe4,0x7f,0xc1,0x31,0x2e,0x08, +0xc8,0x21,0x89,0x04,0x76,0xff,0x00,0x4d,0x1c,0xd7,0xc3,0x9a,0xf7,0x8b,0x35,0xcf, +0x15,0x49,0x14,0x9a,0xde,0xb3,0xa8,0x6b,0x32,0x44,0x0a,0xc6,0xfa,0x85,0xd4,0x93, +0x94,0x04,0xe4,0x80,0x5c,0x9c,0x0c,0xfa,0x53,0x87,0x8b,0xf5,0xe5,0xd0,0x8e,0x88, +0x35,0xbd,0x48,0x68,0xc7,0xae,0x9b,0xf6,0xb9,0x3e,0xcd,0xd7,0x3f,0xea,0xf3,0xb7, +0xaf,0x3d,0x3a,0xd4,0xc7,0x07,0x25,0x46,0x9d,0x2b,0xfc,0x2e,0xe6,0x54,0xf8,0x76, +0xa4,0x32,0xfc,0x26,0x0f,0xda,0x2b,0xd1,0x9a,0x9b,0x76,0xde,0xcd,0xbb,0x7e,0x27, +0xe9,0xaf,0xc5,0x8f,0x89,0x16,0xb2,0x7e,0xc5,0xd7,0x7e,0x3d,0x8c,0x47,0x1e,0xb3, +0xaf,0xf8,0x72,0xd3,0x4c,0x69,0x07,0x56,0xf3,0x09,0x56,0x8f,0xf0,0x12,0x4c,0x7f, +0x3a,0xf2,0xdf,0xda,0x7b,0x6a,0xff,0x00,0xc1,0x3f,0xfe,0x0f,0x96,0x05,0x97,0x76, +0x91,0x90,0x0e,0x32,0x3e,0xc1,0x35,0x7c,0x35,0x37,0x8a,0xb5,0xbb,0x9d,0x12,0x2d, +0x1a,0x6d,0x63,0x50,0x97,0x47,0x89,0x83,0xc7,0xa7,0xbd,0xd4,0x8d,0x6e,0x8c,0x33, +0x82,0x23,0x27,0x68,0x3c,0x9e,0xdd,0xcd,0x3a,0xfb,0xc6,0x1a,0xf6,0xa9,0xa3,0xdb, +0xe9,0x37,0xba,0xde,0xa5,0x79,0xa5,0x5b,0x6d,0xf2,0x2c,0x6e,0x2e,0xe4,0x78,0x22, +0xda,0x0a,0xae,0xd8,0xc9,0xda,0xb8,0x04,0x81,0x81,0xc0,0x26,0xb3,0xa7,0x97,0xfb, +0x37,0x16,0x9e,0xd2,0xbf,0xcb,0xb1,0xc7,0x84,0xe1,0x47,0x84,0x9d,0x39,0x46,0xa2, +0xf7,0x6a,0xb9,0xed,0xf6,0x6d,0x65,0x1f,0x91,0xe9,0x7f,0x17,0x7f,0x67,0xdd,0x4f, +0xc3,0x3e,0x2c,0x80,0xf8,0x3b,0x4e,0xd4,0xbc,0x47,0xe1,0x0d,0x5a,0x18,0x6e,0xb4, +0x6d,0x52,0x08,0x8c,0xff,0x00,0x68,0x8e,0x44,0x53,0xb4,0x94,0x18,0x0e,0xac,0x4a, +0x95,0xc0,0x3c,0x7b,0xd7,0x71,0xf1,0x23,0xc0,0x57,0x5e,0x36,0xf1,0xaf,0xc1,0x3f, +0x85,0x2f,0x70,0xad,0xe2,0xab,0x3d,0x1e,0x0d,0x37,0x55,0x97,0x3b,0xda,0xcb,0xcc, +0x9a,0x49,0x44,0x2f,0xef,0x0c,0x4d,0x92,0xbd,0xba,0x57,0x84,0xe8,0x1f,0x12,0xbc, +0x5b,0xe1,0x5d,0x3e,0x4b,0x0d,0x17,0xc4,0xfa,0xc6,0x93,0x65,0x26,0x77,0x5b,0xd9, +0x5f,0x4b,0x0c,0x67,0x3d,0x4e,0xd5,0x60,0x33,0x59,0x36,0x7a,0xe6,0xa5,0xa6,0xea, +0xc3,0x54,0xb4,0xd4,0x2e,0xad,0x75,0x35,0x76,0x90,0x5e,0xc3,0x3b,0x24,0xc1,0x9b, +0x3b,0x9b,0x78,0x3b,0xb2,0x72,0x72,0x73,0xdc,0xd7,0x6f,0xb3,0xa8,0xed,0x79,0x6d, +0xb7,0xae,0xda,0x9f,0x47,0xf5,0x2c,0x64,0xb9,0x79,0xea,0x26,0xe9,0xa7,0xca,0xed, +0xab,0x6d,0x59,0x39,0x7a,0x5f,0x54,0xb7,0x7a,0xe9,0xb1,0xf4,0x2f,0xc6,0xa8,0x7c, +0x6d,0xaa,0x42,0xfe,0x02,0xf0,0x57,0x82,0xb5,0xcd,0x1b,0xe1,0xc6,0x93,0x39,0x8e, +0x0b,0x68,0x6c,0x65,0x0f,0xa9,0xc8,0x84,0x29,0xbb,0xb9,0x60,0x3f,0x78,0xee,0x57, +0x70,0x07,0x85,0x18,0xc0,0xe2,0xbe,0x78,0xd5,0xf4,0x7b,0xed,0x03,0x51,0x9a,0xc3, +0x52,0xb3,0x9a,0xc2,0xfa,0x1c,0x09,0x2d,0xee,0x23,0x29,0x22,0x64,0x02,0x32,0xa7, +0x91,0xc1,0x07,0xf1,0xae,0x93,0xfe,0x17,0x17,0x8f,0xff,0x00,0xe8,0x79,0xf1,0x2f, +0xfe,0x0e,0x2e,0x3f,0xf8,0xba,0xe6,0xf5,0x6d,0x62,0xff,0x00,0x5e,0xd4,0x26,0xbf, +0xd4,0xef,0xae,0x75,0x2b,0xe9,0xb0,0x64,0xba,0xbb,0x99,0xa5,0x95,0xf0,0x00,0x1b, +0x99,0x89,0x27,0x00,0x01,0xc9,0xe8,0x05,0x55,0x18,0x4e,0x9a,0xe5,0x76,0xb1,0xd3, +0x97,0xe1,0xab,0x61,0x23,0xec,0xa7,0xcb,0xcb,0xdd,0x5e,0xed,0xf7,0x6d,0xee,0xdf, +0x56,0x7d,0xe3,0xff,0x00,0x04,0xc7,0xff,0x00,0x91,0x43,0xe2,0x9f,0xd6,0xd3,0xff, +0x00,0x45,0xcf,0x5e,0x77,0xff,0x00,0x04,0xe8,0x1f,0xf1,0x91,0x5a,0xaf,0x1f,0xf3, +0x0f,0xb8,0xff,0x00,0xd0,0xc5,0x7c,0xbd,0xa1,0xf8,0xc3,0x5f,0xf0,0xbc,0x57,0x11, +0x68,0xda,0xe6,0xa5,0xa4,0x47,0x71,0x8f,0x39,0x2c,0x2f,0x24,0x80,0x4b,0x80,0x40, +0xdc,0x11,0x86,0xec,0x64,0xf5,0xf5,0x35,0x06,0x8b,0xe2,0x4d,0x5f,0xc3,0x77,0x8d, +0x79,0xa4,0x6a,0x97,0xba,0x55,0xdb,0x29,0x53,0x71,0x63,0x70,0xf0,0xc8,0x41,0xea, +0x0b,0x29,0x07,0x15,0xcb,0x3c,0x23,0x93,0xac,0xef,0xf1,0xdb,0xe5,0x64,0x78,0x78, +0x8c,0x82,0xa5,0x79,0x63,0xe4,0xaa,0x25,0xf5,0x85,0x14,0xb4,0xdb,0x95,0x5b,0x5e, +0xe7,0xd1,0xfe,0x20,0xf0,0x4a,0xfc,0x41,0xfd,0xbf,0x2f,0xb4,0x39,0x63,0x67,0xb6, +0x9b,0xc4,0x41,0xe7,0x0a,0x3a,0x46,0x81,0x5d,0x8f,0xd3,0x8a,0xea,0x3f,0xe0,0xa6, +0x9e,0x30,0x6d,0x43,0xe2,0x96,0x81,0xe1,0xb8,0xdb,0x6d,0xbe,0x95,0xa7,0x09,0x9a, +0x31,0xd3,0x7c,0xac,0x70,0x7f,0xef,0x95,0x02,0xbe,0x4b,0x87,0xc5,0x5a,0xd5,0xb6, +0xb6,0xda,0xcc,0x3a,0xc6,0xa1,0x16,0xb0,0xc4,0xb3,0x6a,0x09,0x74,0xeb,0x70,0x49, +0x18,0x24,0xc8,0x0e,0xec,0xe3,0xde,0xa1,0xd6,0x35,0xdd,0x4b,0xc4,0x57,0xcd,0x7b, +0xab,0x6a,0x37,0x7a,0xa5,0xe3,0x00,0xa6,0xe2,0xf6,0x76,0x9a,0x42,0x07,0x41,0xb9, +0x89,0x38,0x15,0x71,0xc3,0x35,0x56,0x13,0x6f,0x48,0xab,0x7c,0xce,0x9a,0x59,0x2c, +0xe3,0x8d,0xc3,0x62,0x67,0x34,0xe3,0x46,0x9f,0x2a,0x56,0xfb,0x56,0xb3,0x97,0xdc, +0x51,0xa2,0x8a,0x2b,0xd0,0x3e,0xa8,0x2b,0x9e,0xf1,0x15,0xf7,0x99,0x20,0xb6,0x43, +0xf2,0xa7,0x2d,0xf5,0xad,0x4d,0x53,0x50,0x1a,0x7d,0xb9,0x20,0xfe,0xf5,0xb8,0x41, +0xfd,0x6b,0x93,0x66,0x2c,0xc4,0x93,0x92,0x79,0x26,0xa2,0x4f,0xa1,0xf8,0x7f,0x88, +0xbc,0x45,0x1a,0x34,0x7f,0xb1,0xf0,0xd2,0xf7,0xa5,0xac,0xfc,0x97,0x48,0xfa,0xbd, +0xdf,0x97,0xa8,0x94,0x51,0x45,0x64,0x7f,0x3a,0x85,0x14,0x51,0x40,0x05,0x14,0x51, +0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x56,0xff,0x00,0x82,0x3c, +0x2e,0x3c,0x55,0xae,0x2d,0xbc,0xf2,0xbd,0xae,0x99,0x6f,0x1b,0x5d,0x6a,0x17,0x68, +0xa0,0x98,0x2d,0x90,0x65,0xd8,0x67,0x8d,0xdd,0x80,0xee,0xc4,0x52,0x6d,0x25,0x76, +0x34,0xae,0xec,0x8d,0x9d,0x0c,0x8f,0x03,0xf8,0x3a,0x6d,0x79,0xb6,0x7f,0x6c,0xeb, +0x0b,0x25,0x96,0x98,0xad,0x9d,0xf0,0x41,0xca,0xcf,0x70,0x3d,0x09,0xc9,0x89,0x4f, +0xbb,0xfa,0x71,0xc3,0xd6,0xe7,0x8c,0xbc,0x4e,0xfe,0x2c,0xd7,0xa5,0xbc,0x11,0xfd, +0x9a,0xce,0x34,0x5b,0x6b,0x2b,0x51,0xf7,0x6d,0xed,0xd0,0x6d,0x8e,0x31,0xf4,0x1d, +0x4f,0x72,0x49,0x3c,0x93,0x58,0x75,0x31,0x4f,0x77,0xbb,0x1c,0x9f,0x44,0x14,0x51, +0x45,0x59,0x21,0x45,0x14,0x50,0x03,0xed,0xc4,0x6d,0x71,0x10,0x94,0x95,0x88,0xba, +0x87,0x61,0xd4,0x2e,0x79,0x3f,0x95,0x7a,0xe7,0xc6,0x6f,0x01,0xf8,0x73,0xc3,0xfe, +0x16,0xd1,0x35,0x6f,0x0f,0x27,0xee,0xae,0x25,0xf2,0x9a,0x54,0x90,0xc8,0x92,0x29, +0x42,0x43,0x13,0x9e,0x0e,0x47,0xeb,0x5e,0x41,0x57,0xed,0xf5,0xdb,0xeb,0x6d,0x2e, +0x7d,0x35,0x2e,0x1c,0xd8,0x4e,0x43,0x3d,0xb3,0x1c,0xa6,0xe1,0xd1,0x80,0xec,0x7d, +0xc5,0x6f,0x4e,0xa4,0x63,0x19,0x46,0x51,0xbd,0xfa,0xf6,0x3c,0xdc,0x4e,0x1e,0xb5, +0x4a,0xd4,0xaa,0xd2,0xa8,0xd2,0x8b,0xd5,0x74,0x92,0x7d,0xfd,0x3a,0x14,0x28,0xa2, +0x8a,0xc0,0xf4,0x82,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02, +0x8a,0x28,0xa0,0x0f,0xdb,0x2a,0x55,0xeb,0x48,0x3d,0xe9,0x57,0xad,0x7c,0x29,0xee, +0x93,0x6e,0xf9,0x80,0xa7,0xa9,0xa8,0xf3,0x96,0x18,0xa9,0x16,0x99,0x2c,0x95,0x6a, +0xc2,0xfa,0x55,0x75,0xa9,0xd5,0x85,0x32,0x09,0x97,0x93,0xe9,0x53,0xaf,0x41,0x55, +0x94,0xf3,0x56,0x16,0x98,0x12,0xad,0x58,0x53,0xc5,0x56,0x5a,0x9e,0x31,0x54,0x04, +0xeb,0x53,0x2d,0x40,0xb5,0x3a,0xf4,0xf7,0xa3,0xa0,0x16,0x12,0xa7,0x5f,0x7a,0xad, +0x1b,0x54,0xea,0x78,0x1e,0xb5,0x00,0x4d,0x1b,0x73,0x53,0xa9,0xaa,0xcb,0xed,0x53, +0x2f,0x7a,0x86,0x6a,0x5a,0x8d,0xba,0x1a,0xb3,0x1f,0x39,0xaa,0x71,0xb6,0x2a,0x78, +0xc9,0xc8,0xa4,0xc4,0x5c,0x5c,0x70,0x7d,0x6b,0x2f,0xc5,0x1a,0x1c,0x5e,0x25,0xf0, +0xd6,0xaf,0xa5,0x4a,0xbb,0xd2,0xfa,0xd2,0x5b,0x76,0x04,0x67,0x3b,0x90,0x8f,0xeb, +0x5a,0x4b,0xe9,0x52,0x2e,0x47,0x3d,0xea,0x19,0xac,0x5b,0x4e,0xe8,0xfe,0x72,0xbc, +0x4b,0xe1,0xd9,0x7c,0x29,0xe3,0xed,0x5f,0x46,0xb8,0x4d,0xb3,0x58,0x5e,0xcd,0x6a, +0xea,0x7a,0xe5,0x1c,0xaf,0xf4,0xac,0xbb,0x8d,0xc9,0x70,0xca,0x8b,0xcb,0x1e,0xbd, +0x85,0x7d,0x35,0xff,0x00,0x05,0x02,0xf8,0x6b,0x27,0xc3,0xbf,0xda,0x9f,0x5c,0x98, +0x44,0x12,0xcb,0x5a,0x2b,0xa9,0x40,0x54,0x70,0x77,0x8c,0x37,0xfe,0x3c,0x0d,0x7c, +0xe1,0x79,0x09,0x8d,0x9d,0x40,0xcb,0xe7,0x22,0xb2,0x96,0xe7,0xe9,0xb8,0x5f,0xdf, +0x61,0x94,0xd7,0xaf,0xe0,0x55,0x88,0x96,0x90,0x92,0x72,0xab,0xc0,0xa9,0xd6,0x6c, +0xbe,0xd4,0xed,0xd5,0xaa,0xb2,0x8d,0x8a,0x14,0x70,0x31,0xcd,0x2c,0x72,0x0c,0x71, +0xd2,0x91,0xa4,0xa3,0x65,0x63,0xea,0x7f,0xd8,0x4f,0xf6,0x90,0xff,0x00,0x85,0x07, +0xf1,0x5e,0x13,0x7f,0xb5,0xbc,0x3b,0xac,0x85,0xb2,0xbf,0x67,0xc8,0x10,0xa9,0x60, +0x56,0x51,0xee,0xa7,0xf4,0x26,0xbf,0x6b,0x2c,0xee,0x92,0xf2,0xde,0x39,0xa3,0x74, +0x96,0x29,0x14,0x3a,0x49,0x19,0xca,0xb2,0x91,0x90,0x41,0xf4,0xc5,0x7f,0x37,0x36, +0xf7,0x22,0x3c,0x73,0x8c,0x73,0x5f,0xb5,0xdf,0xf0,0x4f,0x0f,0x8b,0xd2,0x7c,0x54, +0xfd,0x9e,0x74,0xe8,0xef,0xae,0x3c,0xfd,0x53,0x43,0x95,0xb4,0xe9,0x99,0x8f,0x25, +0x17,0x98,0xc9,0xff,0x00,0x80,0xf1,0xf8,0x53,0x3e,0x5f,0x36,0xc3,0xab,0x2a,0xcb, +0xd1,0x9e,0xd9,0xf1,0x4b,0xe1,0xfa,0xfc,0x4b,0xf0,0x8d,0xee,0x82,0xda,0x84,0xfa, +0x6a,0xdc,0xb2,0x96,0x9a,0xdf,0xa9,0x00,0xe7,0x69,0x1d,0xc1,0xef,0x5f,0x0c,0xfe, +0xd5,0xd6,0x7e,0x0e,0xf8,0x01,0xe0,0xdf,0xec,0x19,0xaf,0xe0,0xf1,0x17,0x88,0x6f, +0x10,0x84,0xb1,0x78,0xb0,0xd0,0x21,0x18,0xde,0xc4,0x1f,0x97,0xd8,0x77,0xaf,0xa5, +0x7f,0x6b,0xcf,0xda,0x72,0xcb,0xf6,0x7a,0xf0,0x5b,0x1b,0x59,0x22,0x9f,0xc5,0x1a, +0x80,0x29,0x61,0x6c,0xc7,0x3b,0x06,0x0e,0x65,0x61,0xe8,0x3b,0x7a,0x9a,0xfc,0x69, +0xf8,0x81,0xe3,0xed,0x57,0xc7,0x1e,0x20,0xbb,0xd5,0x75,0x7b,0xe9,0x75,0x0b,0xeb, +0xa7,0x32,0x4b,0x3c,0xce,0x59,0x98,0xff,0x00,0x87,0xb5,0x72,0x54,0xc3,0xd3,0xa9, +0x35,0x36,0xb5,0x5d,0x4e,0x9c,0x93,0x03,0x52,0xb4,0x95,0x59,0x3b,0x41,0x3f,0xbd, +0x99,0x7a,0xce,0xb0,0xf7,0xd3,0x13,0xc2,0x20,0xe8,0x8b,0xc0,0x15,0x81,0x75,0x32, +0xb8,0x60,0x40,0xc5,0x17,0x17,0x1d,0x79,0xe2,0xb3,0xe5,0x97,0x76,0x79,0xae,0x8b, +0x58,0xfd,0x0a,0x75,0x14,0x55,0x86,0xf9,0x85,0x49,0x4c,0xfc,0xbd,0x8f,0xf4,0xa6, +0x49,0xb9,0xb7,0x60,0x1d,0xa3,0xaf,0xb5,0x35,0x9b,0x83,0xdc,0xd7,0x45,0xe1,0xbb, +0x0f,0xed,0x8b,0x79,0xee,0x6d,0xd5,0x4d,0xdd,0x9a,0x17,0x96,0x16,0xfb,0xb3,0x47, +0x9e,0x7f,0x1a,0x0f,0x3f,0xf8,0xd2,0xf6,0x49,0xea,0x55,0xd0,0x7c,0x36,0x75,0xc4, +0x90,0xe4,0x84,0x46,0x55,0x69,0x17,0xef,0x42,0x49,0xf9,0x49,0x1d,0xd4,0x9e,0x33, +0xda,0xbd,0xb3,0xe1,0xbf,0x80,0xee,0x35,0x89,0xd6,0x0d,0x50,0x49,0xa5,0x6b,0xb6, +0x05,0x4d,0x9e,0xb9,0x6b,0xca,0xce,0xbf,0xdc,0x98,0x77,0xe9,0xd4,0xf3,0xcd,0x61, +0x7c,0x36,0xf0,0xd2,0xc1,0xab,0x2d,0xdd,0xbe,0x7c,0x97,0x1b,0x7c,0xb9,0x07,0xf0, +0x91,0xca,0x37,0xa8,0xf4,0x35,0xf4,0xcf,0x81,0xf4,0xa4,0x52,0xe7,0x60,0x1e,0x66, +0x33,0xc7,0xeb,0x5c,0xb5,0xea,0xf2,0xe8,0x8f,0xa6,0xca,0xf2,0xb8,0xc9,0x2a,0x93, +0xe9,0xfd,0x7f,0x5d,0x7f,0x23,0x63,0xc2,0x5e,0x18,0x4d,0x32,0xe6,0xe8,0xcb,0x6f, +0x1d,0xb5,0xc5,0xe4,0x5e,0x55,0xe0,0x88,0x62,0x3b,0x82,0x3a,0x31,0x5e,0x9b,0xbd, +0xfd,0xeb,0xcb,0x21,0xf0,0x13,0xe9,0xab,0xe2,0xab,0x1b,0x3e,0x2f,0xf4,0x7b,0xc1, +0x7f,0x66,0xc3,0xef,0x79,0x67,0xef,0x2f,0xe2,0x39,0xfc,0x2b,0xe8,0x58,0xed,0x7f, +0xe2,0x5a,0x64,0x75,0xcc,0x88,0x30,0x3f,0x0e,0x95,0xe4,0x7e,0x37,0xf1,0x3c,0x5e, +0x07,0xf1,0xc4,0x9a,0xdc,0x87,0x74,0x57,0x96,0xa6,0x39,0x61,0x03,0xef,0xb0,0xe3, +0x15,0xc3,0x19,0x3d,0xbb,0x9f,0x45,0x38,0xc6,0x5a,0xa5,0xa2,0xdc,0x9b,0x58,0xf8, +0x8c,0x35,0x5f,0x05,0x68,0xcb,0x74,0xde,0x5d,0xfd,0xec,0x9e,0x43,0x9c,0xe1,0x82, +0x8f,0xbc,0x4f,0xe0,0x2a,0xaf,0xec,0xfb,0xe1,0x26,0xf0,0xca,0xea,0x1f,0x6b,0xe6, +0xea,0xf2,0xea,0x49,0x43,0x76,0xf2,0xc1,0xc2,0xe7,0xd3,0x3c,0xd7,0x9c,0xda,0xc4, +0xde,0x22,0xf1,0x09,0xd7,0x75,0x21,0xb3,0x48,0xb1,0x6d,0xf1,0xdb,0x27,0xfc,0xbc, +0x4c,0x46,0x42,0x8f,0x61,0xc6,0x7e,0x95,0xee,0x7f,0x0d,0x96,0xed,0xac,0xe7,0xd4, +0xf5,0x1d,0xbf,0x69,0xba,0x6c,0x84,0xe8,0x23,0x5c,0x70,0xa2,0x94,0xd7,0x24,0x6c, +0xba,0x85,0x36,0xaa,0x5f,0x4d,0x23,0x7b,0x7c,0xcb,0x0b,0xe1,0xbb,0x48,0xfc,0x65, +0xa8,0x2d,0xd4,0x91,0xcf,0x73,0xaa,0x30,0x65,0xc7,0xf0,0x42,0x8a,0x30,0x9e,0xdc, +0xee,0x27,0xea,0x2b,0xea,0x3f,0xd9,0x8f,0xf6,0x4b,0xf0,0xaf,0xc3,0xdd,0x4e,0x6f, +0x1c,0xcd,0x62,0x26,0xd6,0xef,0x80,0x7b,0x55,0x95,0x41,0x5b,0x55,0xc6,0x09,0x51, +0xfd,0xe3,0xeb,0x5f,0x35,0xd8,0xf8,0x66,0xea,0xf7,0xe2,0x26,0x9f,0xab,0xb3,0xa9, +0xb3,0x86,0x16,0x89,0xd7,0x3f,0x37,0x27,0xb5,0x7e,0x90,0x68,0x31,0x88,0xf4,0x7b, +0x25,0x54,0xd8,0x16,0x14,0x01,0x7d,0x38,0xe9,0x5d,0xb8,0x3b,0xea,0xd3,0x3f,0x33, +0xe3,0x6a,0xce,0x9d,0x1a,0x54,0x6d,0xbb,0x6e,0xfe,0x9f,0xf0,0xe5,0xf5,0x18,0x51, +0x4b,0x45,0x36,0xbd,0x13,0xf2,0x00,0xa6,0x16,0xfc,0xa8,0x7e,0x6a,0x36,0x6d,0xb4, +0xec,0x20,0x66,0xa6,0x13,0x9a,0x3e,0xb4,0xcd,0xde,0xb5,0x42,0x1d,0xbb,0xb9,0xa8, +0xcb,0x65,0x89,0x27,0x8a,0x46,0x6c,0xfd,0x2a,0x39,0x1f,0xf4,0xa6,0x43,0x1a,0xcc, +0x4e,0x4d,0x42,0xc7,0x0a,0x4e,0x69,0x59,0x8f,0x5a,0x82,0x46,0xf7,0xaa,0x10,0xc9, +0x1b,0xde,0xab,0x49,0x27,0x53,0x4b,0x23,0x67,0x3c,0xd4,0x12,0x35,0x50,0x36,0x36, +0x47,0xaa,0xee,0xd8,0xa7,0x48,0xdd,0xf3,0x55,0x64,0x93,0x19,0xe6,0xa8,0xcc,0xf0, +0xaf,0xda,0x83,0xf6,0x7f,0x83,0xe2,0xb6,0x86,0x75,0x5d,0x2e,0x08,0xd3,0xc4,0x76, +0x68,0x70,0x42,0xf3,0x75,0x18,0x07,0xf7,0x67,0xd4,0xfa,0x57,0xe6,0xfe,0xbb,0xa1, +0xdc,0xe8,0x77,0xd3,0x5b,0xdc,0x43,0x24,0x32,0x46,0xe5,0x1e,0x39,0x14,0xab,0x23, +0x0e,0xa0,0x83,0xd0,0xd7,0xec,0x64,0x92,0x71,0xc9,0xaf,0x00,0xfd,0xa1,0x3f,0x66, +0xdd,0x3f,0xe2,0x94,0x12,0xea,0xba,0x52,0x43,0x65,0xe2,0x15,0x53,0xb8,0x91,0x84, +0xb9,0x00,0x70,0x1b,0x1d,0x0f,0xbd,0x7b,0x18,0x2c,0x6f,0xb1,0xfd,0xdd,0x4f,0x87, +0xf2,0x3f,0x53,0xe1,0x1e,0x2c,0x79,0x5b,0x58,0x3c,0x63,0xbd,0x27,0xb3,0xfe,0x5f, +0xf8,0x1f,0x97,0xa1,0xf9,0xbf,0x45,0x74,0x1e,0x2e,0xf0,0x5e,0xa7,0xe0,0xfd,0x56, +0xe2,0xc3,0x51,0xb4,0x96,0xd2,0xe6,0x16,0xda,0xf1,0x4a,0xb8,0x23,0xdf,0xdc,0x7b, +0xd7,0x3f,0x5f,0x4e,0x9a,0x92,0xba,0x3f,0xa2,0xa9,0x55,0x85,0x68,0x2a,0x94,0xdd, +0xd3,0x0a,0x28,0xa2,0x99,0xa8,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45, +0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x54,0x17,0x97,0x91,0xd8,0xc2, +0x64,0x90,0xff,0x00,0xba,0xbd,0xc9,0xa6,0x5f,0xea,0x31,0x69,0xf1,0xe5,0xfe,0x67, +0x3d,0x23,0x1d,0x4d,0x72,0xd7,0x97,0x92,0xdf,0x4c,0x64,0x91,0xb2,0x7b,0x0e,0xc3, +0xd8,0x54,0xca,0x56,0x3f,0x34,0xe2,0xce,0x32,0xa1,0x91,0xd3,0x78,0x6c,0x33,0x52, +0xc4,0x3e,0x9d,0x23,0xe7,0x2f,0x3e,0xcb,0xef,0xd0,0x4b,0xbb,0xa9,0x2f,0x27,0x69, +0x64,0x39,0x27,0xb7,0x61,0xed,0x50,0xd1,0x45,0x64,0x7f,0x2b,0x56,0xad,0x53,0x11, +0x52,0x55,0xab,0x4b,0x9a,0x52,0x77,0x6d,0xee,0xd8,0x51,0x45,0x14,0x8c,0x42,0x8a, +0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x2b,0x73,0xc1,0x7e,0x16,0x9b,0xc6,0x3e, +0x22,0xb6,0xd3,0x62,0x6f,0x2a,0x36,0xcb,0xcf,0x33,0x74,0x8a,0x25,0xe5,0x98,0xfd, +0x05,0x54,0x62,0xe4,0xd4,0x56,0xec,0xca,0xa5,0x48,0x51,0x83,0xa9,0x37,0x64,0xb5, +0x66,0x1d,0x15,0xef,0xbf,0x19,0x3f,0x67,0xfb,0x3f,0x0c,0xaf,0x83,0x2d,0xb4,0x59, +0x18,0xf8,0xab,0xc4,0x48,0x25,0x83,0xc3,0x31,0xc6,0x5e,0x44,0xb3,0xc0,0x11,0x5d, +0x4d,0x21,0x38,0x46,0x90,0xe4,0xec,0xc7,0x0a,0x33,0x9e,0xa2,0xbd,0x9f,0xe1,0x3f, +0xfc,0x13,0x9e,0x1f,0x10,0x69,0x71,0xde,0x78,0x8f,0x5c,0x93,0xcd,0x52,0x05,0xc4, +0x76,0xae,0xb1,0x43,0x0f,0xb6,0xe2,0x0b,0x3e,0x38,0x1c,0x63,0x93,0x5f,0x3d,0x99, +0x67,0x98,0x0c,0xae,0x51,0xa7,0x5a,0x77,0x94,0xaf,0x68,0xc5,0x36,0xdd,0xb7,0x76, +0xed,0xe6,0xec,0xbc,0xcd,0xa8,0xc6,0x75,0xa2,0xa5,0xca,0xd5,0xd5,0xec,0xf7,0x5e, +0xa7,0xc3,0x5d,0x39,0xae,0xeb,0xc4,0xdf,0xf1,0x44,0x78,0x56,0x0f,0x0c,0x26,0xd5, +0xd5,0xb5,0x01,0x1d,0xee,0xb0,0xea,0xf9,0x31,0xae,0x37,0x41,0x6a,0x7d,0x0a,0x82, +0x1d,0xc7,0xf7,0x99,0x41,0xfb,0x95,0xf6,0x9e,0xbd,0xff,0x00,0x04,0xe5,0xb4,0xf0, +0xbd,0xd8,0xd7,0x7c,0x2f,0x7e,0xda,0xe3,0x69,0xe1,0xae,0x23,0xb1,0xb8,0x95,0x64, +0x89,0xe4,0x50,0x4a,0x79,0x83,0x68,0x70,0xa1,0xb0,0x4f,0x07,0x20,0x62,0xbe,0x0d, +0xf1,0xae,0x93,0xad,0xe8,0xbe,0x2a,0xd4,0xed,0x7c,0x45,0x14,0xb1,0xeb,0x4b,0x3b, +0x35,0xd7,0x9c,0x39,0x67,0x27,0x25,0xbd,0xc1,0xce,0x41,0x1c,0x62,0x9e,0x5f,0x9c, +0x61,0x33,0x49,0xb8,0x51,0x6d,0x49,0x6b,0x66,0xac,0xfd,0x57,0x46,0xbc,0xd3,0x6a, +0xf6,0x36,0x95,0x39,0x52,0x5a,0xf5,0x31,0x68,0xa2,0x8a,0xf7,0x8c,0x02,0x8a,0x28, +0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28, +0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x0f,0xdb,0x20, +0x69,0x69,0x80,0xe2,0x9d,0x5f,0x0a,0x7b,0x83,0xea,0x54,0xed,0x50,0x54,0x91,0xf6, +0xa0,0x0b,0x0a,0x4d,0x4a,0xb5,0x02,0xb7,0x4a,0x95,0x69,0x92,0x4e,0xbd,0x73,0x53, +0x2b,0x1a,0x81,0x0d,0x4a,0xb9,0xaa,0x24,0xb3,0x1b,0x55,0x88,0xda,0xa9,0xc6,0x79, +0x35,0x62,0x33,0x54,0x05,0xa5,0x35,0x32,0xb5,0x57,0x56,0xa9,0x50,0xf3,0x40,0x16, +0x50,0xf5,0xa9,0x50,0xf4,0xaa,0xe9,0xed,0x53,0x29,0xa9,0x02,0xc2,0xd4,0xf1,0xb5, +0x56,0x46,0xa9,0x55,0xb3,0x52,0xca,0x45,0x95,0x35,0x62,0x36,0x22,0xa9,0xab,0x54, +0xca,0xdc,0x8a,0x82,0xcb,0xd1,0xb1,0xfc,0xaa,0x65,0x6c,0xd5,0x58,0xe4,0xc1,0x15, +0x3a,0x7e,0xbd,0xaa,0x47,0x16,0x7c,0x33,0xff,0x00,0x05,0x53,0xf8,0x4c,0x3c,0x45, +0xf0,0xdf,0x43,0xf1,0xcd,0xa5,0xbe,0xfb,0xdd,0x0a,0xe4,0x5b,0xdd,0x48,0xa3,0x9f, +0xb3,0xc8,0xc0,0x2e,0x7d,0x83,0x91,0xf9,0xd7,0xe6,0x0e,0xa5,0x6e,0x3e,0xd7,0x11, +0x51,0xf2,0xc8,0xa0,0xfe,0x62,0xbf,0xa0,0x9f,0x1d,0x78,0x3e,0xcb,0xe2,0x07,0x83, +0x75,0x9f,0x0d,0xea,0x48,0xb2,0xd9,0x6a,0x76,0xaf,0x6d,0x22,0xb0,0xc8,0xf9,0x87, +0x07,0xf0,0x38,0x3f,0x85,0x7e,0x15,0xfc,0x4c,0xf8,0x7f,0x7b,0xf0,0xef,0xc5,0xda, +0x97,0x87,0x2f,0x94,0xfd,0xab,0x49,0xbe,0x92,0xd5,0x89,0xfe,0x20,0x0f,0xc8,0xdf, +0x88,0xc1,0xae,0x7a,0x9a,0x59,0x9f,0x7f,0xc3,0xf8,0x85,0x3a,0x72,0xa2,0xf7,0x5f, +0x91,0xe5,0x77,0x51,0x98,0xd8,0xa1,0x1b,0x46,0x73,0x93,0xe9,0x55,0x9a,0x4d,0xbd, +0x2b,0x57,0x5a,0x84,0xb4,0xf2,0xc8,0x3a,0x2b,0x95,0x1f,0x85,0x63,0x33,0x2c,0x2a, +0x49,0xf9,0x98,0xd2,0x89,0xed,0x56,0x8f,0x2c,0x9a,0xd8,0x95,0x26,0x31,0xe0,0xb7, +0x1e,0x82,0xbe,0xca,0xff,0x00,0x82,0x7e,0xfc,0x73,0xb6,0xf8,0x37,0xa7,0x7c,0x56, +0xd6,0x2e,0xef,0xe1,0x56,0xb6,0xd0,0xd6,0x6b,0x4b,0x19,0xe5,0xda,0x27,0xb8,0x12, +0x00,0x80,0x2e,0x79,0x3c,0xf3,0x8e,0x71,0x5f,0x13,0xf9,0x8d,0x2c,0x98,0x1c,0xb1, +0xfd,0x29,0xed,0x7a,0x60,0x91,0x52,0x15,0x52,0x41,0xf9,0xdb,0xbe,0x3b,0xe2,0xac, +0xf3,0x6a,0xc6,0x15,0xa0,0xe3,0x3f,0x84,0xf5,0xdf,0x8a,0x5f,0x19,0x3c,0x45,0xf1, +0x67,0x5c,0x93,0x5b,0xf1,0x16,0xa5,0x2e,0xa1,0x7f,0x2e,0x72,0xd2,0x37,0xca,0x8b, +0x9e,0x11,0x47,0x65,0x1d,0x85,0x79,0xe4,0xd7,0x19,0xc9,0xcd,0x56,0xfb,0x47,0xcd, +0xd7,0x8a,0x86,0x49,0xb7,0x71,0x48,0xfa,0x58,0xca,0x14,0x61,0xcb,0x0d,0x12,0x1f, +0x2c,0xd9,0xa8,0x19,0xfb,0xd2,0x33,0x73,0x93,0x51,0x33,0x16,0x60,0x29,0x6a,0x70, +0x55,0xc4,0x76,0x07,0x7d,0xdd,0x38,0x39,0xae,0xe3,0xe1,0x24,0x26,0xe3,0x5d,0xba, +0x8f,0x20,0x87,0x80,0x86,0x1e,0xd5,0xc7,0x5b,0x5a,0x19,0x9b,0x68,0x19,0x35,0xe8, +0x7f,0x0a,0x74,0xa9,0x2d,0x7c,0x63,0x64,0x58,0x61,0x64,0x25,0x0f,0xd0,0xd2,0x97, +0xc2,0xd9,0xd3,0x96,0xd0,0x9c,0xf1,0x10,0xa9,0x2d,0xae,0x7b,0x77,0x82,0x34,0x53, +0xe7,0x2e,0xd4,0xe4,0xe0,0x11,0xeb,0x5f,0x42,0x78,0x67,0x4b,0x8e,0xc6,0x18,0xbc, +0xc1,0x8f,0x97,0x19,0xc5,0x72,0xfe,0x0d,0xf0,0x78,0xb3,0x8d,0x6e,0x66,0x01,0x23, +0x1c,0xe7,0xb9,0xad,0x7f,0x10,0x78,0xe3,0x42,0xd0,0x63,0x68,0xb5,0x0b,0xcf,0xb3, +0xb6,0xde,0x11,0x79,0x62,0x3d,0x85,0x78,0xb3,0x93,0x9c,0x8f,0xd4,0x94,0x63,0x46, +0x9f,0x22,0x7e,0xa6,0xdc,0xda,0xb1,0xb5,0xb8,0x9a,0x19,0x06,0xd8,0xdc,0x70,0x73, +0xc5,0x7c,0xbb,0xe3,0xeb,0xc9,0xbc,0x41,0xe2,0xbb,0x98,0xa5,0x6d,0xb6,0xf6,0x92, +0x14,0x69,0x3f,0x87,0xe8,0xbe,0xa6,0xb7,0xfc,0x63,0xf1,0x9a,0x4b,0xe8,0x9e,0xcf, +0x45,0x49,0x12,0x1c,0xe3,0xed,0x17,0x1c,0x39,0x1e,0xc0,0x74,0xae,0x3b,0x47,0xbb, +0x17,0xcc,0x7c,0xc0,0x48,0x43,0xce,0xde,0xa3,0x3d,0xeb,0x4a,0x70,0x92,0xf7,0x99, +0xcb,0x52,0xa4,0x1f,0xee,0xe1,0xf3,0x3a,0xef,0x0e,0xda,0xcb,0x7f,0x25,0xba,0x63, +0xf7,0x50,0xe1,0x63,0x4e,0xc0,0x7f,0x8d,0x7b,0xb6,0x86,0x42,0xd8,0xa4,0x61,0x40, +0x0a,0xbc,0xad,0x79,0xa7,0x83,0x74,0xd8,0x64,0x54,0x92,0x27,0xc8,0x07,0xd7,0x9f, +0xca,0xbd,0x26,0xd5,0x9e,0xdd,0x7e,0x60,0x33,0x9e,0x95,0x84,0xf5,0x67,0xa3,0x4e, +0x09,0x53,0xb2,0x3b,0x5f,0x02,0x58,0x3e,0xa5,0xe2,0x0d,0x3a,0xd1,0x78,0x37,0x17, +0x08,0xbc,0x76,0x04,0x8a,0xfb,0xe6,0x14,0x11,0x46,0xa8,0x38,0x0a,0x00,0xaf,0x8a, +0xfe,0x01,0x69,0xb2,0x6b,0x1f,0x11,0xb4,0xb0,0x23,0xc8,0x85,0x8c,0xcd,0xe8,0x02, +0x8a,0xfb,0x52,0xbd,0x4c,0x2a,0xb4,0x5b,0x3f,0x0e,0xe3,0x9a,0xdc,0xd8,0xba,0x74, +0xbb,0x2b,0xfd,0xef,0xfe,0x00,0xa6,0x91,0x8e,0x05,0x21,0x6c,0x53,0x0b,0x75,0x35, +0xdc,0x7e,0x68,0x0f,0xc7,0x4a,0x88,0xb7,0xad,0x05,0xbd,0x69,0x09,0x0d,0xec,0x2a, +0xec,0x48,0x87,0xf2,0x14,0xc6,0x3e,0xbd,0x29,0x59,0x89,0x19,0xe8,0x3d,0x2a,0x16, +0x93,0x77,0xb5,0x51,0x20,0xd2,0x6e,0xed,0x80,0x2a,0x16,0x7f,0xc2,0x89,0x24,0xc5, +0x41,0x24,0x94,0xc4,0x2c,0x92,0x55,0x69,0x24,0xe4,0xd2,0xc9,0x25,0x55,0x92,0x4a, +0x60,0x24,0x8f,0xb6,0xab,0xc8,0xf4,0x49,0x25,0x56,0x92,0x4c,0x8a,0xb3,0x30,0x92, +0x4c,0x77,0xaa,0x92,0xcb,0xd6,0x92,0x69,0xaa,0xa4,0xb3,0x75,0xa0,0x02,0x69,0xbd, +0xea,0x9c,0xd2,0x86,0xa4,0x96,0x6e,0x0d,0x54,0x92,0x4a,0x43,0x38,0xef,0x89,0x9f, +0x0a,0xbc,0x3d,0xf1,0x43,0x4e,0x36,0xfa,0xbd,0xa8,0xfb,0x42,0xa9,0x10,0xde,0x45, +0xc4,0x91,0x9f,0xaf,0x71,0xec,0x6b,0xe2,0x5f,0x8b,0x1f,0xb2,0xf7,0x89,0x7c,0x05, +0x24,0xd7,0x56,0xd0,0xff,0x00,0x6a,0xe9,0x80,0xe5,0x6e,0x6d,0x54,0x9c,0x0f,0xf6, +0x97,0xa8,0x3f,0xa5,0x7e,0x81,0x49,0x25,0x55,0x92,0x50,0xdc,0x63,0x22,0xbb,0x70, +0xf8,0xca,0xb8,0x7d,0xb5,0x5d,0x8f,0xaf,0xc9,0x38,0x9b,0x1d,0x92,0x3e,0x5a,0x52, +0xe6,0x87,0xf2,0xbd,0xbe,0x5d,0x8f,0xc9,0xc9,0xad,0xa4,0xb7,0x62,0xb2,0x29,0x52, +0x2a,0x2a,0xfd,0x15,0xf1,0xf7,0xec,0xf7,0xe0,0xef,0x1d,0x79,0x92,0xcd,0x61,0xfd, +0x9f,0x7a,0xfc,0xfd,0xa2,0xcf,0x0b,0x93,0xea,0x57,0xa1,0xaf,0x9e,0xbc,0x5d,0xfb, +0x18,0x6b,0xf6,0x2c,0xf2,0x68,0x57,0xf6,0xda,0x9c,0x7d,0x44,0x6e,0x7c,0xa7,0xfa, +0x73,0xc7,0xeb,0x5f,0x41,0x4b,0x31,0xa3,0x53,0xe2,0x7c,0xac,0xfd,0xbb,0x2d,0xe3, +0x9c,0xab,0x1c,0x94,0x6b,0xcb,0xd9,0x4b,0xfb,0xdb,0x7d,0xff,0x00,0xe6,0x7c,0xdf, +0x45,0x76,0x1e,0x21,0xf8,0x47,0xe2,0xff,0x00,0x0b,0xc8,0xe9,0xa8,0x68,0x37,0x91, +0xed,0x38,0x2d,0x1c,0x7e,0x62,0xfe,0x6b,0x91,0x5c,0x9c,0xd6,0xf2,0xdb,0xc8,0x52, +0x58,0xda,0x37,0x1d,0x55,0x86,0x0d,0x7a,0x51,0x94,0x67,0xac,0x5d,0xcf,0xbc,0xa3, +0x88,0xa3,0x88,0x8f,0x35,0x19,0xa9,0x2f,0x26,0x9f,0xe4,0x47,0x45,0x2d,0x25,0x51, +0xd0,0x14,0x51,0x43,0x7c,0xa3,0x2d,0xc0,0xf5,0x3c,0x50,0x0d,0xd9,0x5d,0x85,0x15, +0x56,0x6d,0x52,0xd2,0xdf,0xef,0x4e,0xa4,0xfa,0x27,0xcd,0xfc,0xab,0x36,0xe7,0xc4, +0xdd,0x45,0xbc,0x5f,0xf0,0x29,0x3f,0xc2,0x95,0xd2,0x3e,0x53,0x31,0xe2,0xac,0x9f, +0x2b,0x4f,0xdb,0xe2,0x22,0xdf,0x68,0xfb,0xcf,0xee,0x57,0xb7,0xce,0xc6,0xdb,0xba, +0xc6,0xa5,0x9d,0x82,0xa8,0xea,0xcc,0x70,0x2b,0x1b,0x50,0xf1,0x12,0xae,0x52,0xd4, +0x6e,0x3f,0xf3,0xd1,0x87,0x1f,0x80,0xac,0x5b,0x9b,0xd9,0xef,0x1b,0x32,0xc8,0xcf, +0xed,0xd8,0x7e,0x15,0x0d,0x43,0x97,0x63,0xf1,0x5c,0xf7,0xc4,0x7c,0x56,0x31,0x3a, +0x19,0x64,0x7d,0x94,0x1f,0xda,0x7f,0x1b,0xf4,0xe9,0x1f,0xc5,0xf9,0xa1,0xd2,0x48, +0xd3,0x39,0x77,0x62,0xcc,0x7a,0x93,0x4d,0xa2,0x8a,0xcc,0xfc,0x72,0x52,0x94,0xe4, +0xe5,0x27,0x76,0xc2,0x8a,0x28,0xa0,0x90,0xa2,0x8a,0x28,0x00,0xa2,0x8a,0x28,0x00, +0xa2,0x8a,0x28,0x00,0xaf,0xa1,0x3f,0x64,0x1f,0x0a,0xdb,0x78,0x87,0xc5,0xd6,0xd0, +0x5c,0xc4,0x25,0x5d,0x4b,0x56,0xb1,0xd2,0x8e,0x46,0x47,0x96,0xef,0xba,0x40,0x7d, +0x88,0x50,0x0f,0xb1,0x35,0xf3,0xdd,0x7b,0xd7,0xec,0x99,0xe3,0x08,0x3c,0x31,0xe2, +0xb4,0x9a,0x72,0x47,0xf6,0x6d,0xfd,0xa6,0xb0,0xbc,0x67,0xe5,0x85,0xf1,0x27,0x1f, +0xee,0xb6,0x7f,0x0a,0xd6,0x9d,0xfd,0xe5,0x1d,0xed,0x2b,0x7a,0xd9,0xd8,0xf3,0x73, +0x0b,0x7b,0x14,0xe5,0xf0,0xf3,0x42,0xfe,0x9c,0xea,0xff,0x00,0x86,0xfe,0x47,0xba, +0x7c,0x0f,0xbc,0xff,0x00,0x85,0xa1,0xf1,0xbf,0xe2,0x9f,0xc4,0x4b,0xd2,0xd2,0xdd, +0x36,0xa4,0x74,0xfb,0x18,0xdb,0x9f,0x22,0x00,0x48,0x45,0x5f,0x4c,0x22,0x22,0x81, +0xe8,0x2b,0xef,0x5f,0x87,0xfe,0x1d,0x5b,0x38,0xb4,0xeb,0x27,0x5f,0x9a,0x31,0xf6, +0xb9,0xc0,0xc1,0x04,0x8e,0x14,0x12,0x07,0xf7,0x89,0x38,0xc9,0xfb,0x82,0xbe,0x0d, +0xf8,0x41,0x73,0x6f,0xf0,0x27,0xf6,0x9e,0xf1,0xaf,0x81,0xb5,0x65,0x5f,0xec,0xad, +0x56,0xf5,0x75,0x8d,0x1e,0x7d,0xe0,0x2d,0xd4,0x2c,0x4c,0x91,0x6c,0x63,0xc3,0x6e, +0x47,0x1f,0x8a,0x11,0xda,0xbf,0x45,0xf4,0x5d,0x52,0xde,0xc6,0x6b,0x89,0x6e,0xdc, +0xa4,0x77,0x25,0x1e,0x0b,0xa2,0x09,0x89,0xe3,0xda,0x30,0x37,0xf2,0x01,0xce,0x78, +0x27,0xbd,0x7e,0x03,0x8a,0xc2,0x5f,0x88,0xeb,0xe2,0x31,0x0f,0x4b,0x43,0x96,0xfb, +0x72,0x72,0xfe,0x4e,0x49,0xaf,0x5b,0xf7,0x3e,0xb2,0x8e,0xce,0xfb,0x93,0x78,0x96, +0x38,0x56,0xf3,0x4f,0x74,0x89,0x16,0xe8,0x39,0x91,0xa6,0x03,0x0c,0x22,0x51,0xf3, +0x0f,0x70,0x72,0xab,0xcf,0x1f,0x35,0x7e,0x5c,0xff,0x00,0xc1,0x42,0x3c,0x2b,0xa6, +0x7d,0xbf,0x49,0xf1,0x25,0x84,0x22,0x09,0x4d,0xcc,0x96,0x0f,0x83,0x9f,0x31,0x30, +0x59,0x4f,0xe0,0x43,0x63,0xd9,0xbb,0xe2,0xbf,0x45,0x3e,0x21,0x78,0x81,0x21,0xb1, +0xbe,0xd4,0x63,0x3f,0x34,0x98,0xb6,0xb6,0x62,0x47,0x2a,0x33,0xf3,0x2f,0x7c,0x16, +0x2c,0x72,0x3a,0xed,0x1c,0xd7,0xe6,0x3f,0xed,0xbd,0xf1,0x0a,0xd7,0x54,0xd5,0x34, +0x8f,0x09,0xd9,0xc8,0xb3,0x49,0xa7,0xb3,0x5d,0x5e,0x32,0x9c,0xed,0x91,0x86,0x11, +0x3e,0xa0,0x64,0x9f,0xa8,0xa7,0x83,0xc4,0xd4,0xc4,0x71,0x3e,0x1a,0x96,0x15,0x7c, +0x3c,0xd2,0x93,0x5f,0xcb,0xcb,0xcb,0xaf,0x93,0x76,0xf9,0xf2,0xf6,0x44,0xe2,0x5a, +0xe4,0x77,0x3e,0x5b,0xa2,0x8a,0x2b,0xf7,0x83,0xc7,0x0a,0x28,0xa2,0x80,0x0a,0x28, +0xa2,0x80,0x0a,0x28,0xa2,0x80,0x0a,0x28,0xa2,0x80,0x0a,0x28,0xa2,0x80,0x0a,0x28, +0xa2,0x80,0x0a,0x28,0xa2,0x80,0x0a,0x28,0xa2,0x80,0x3f,0x6b,0xc5,0x28,0x34,0xd5, +0xf4,0xa7,0x57,0xc3,0x9e,0xd8,0xea,0x7c,0x6c,0x77,0x62,0xa3,0x5e,0x9c,0x53,0x96, +0xa4,0xa2,0xc5,0x4a,0xbd,0xaa,0xb8,0x6e,0x82,0xa5,0x56,0xaa,0x24,0xb0,0x95,0x2a, +0xb1,0xaa,0xea,0xc3,0xd2,0xa5,0x56,0xa1,0x12,0x58,0x5f,0xd2,0xa6,0x56,0x38,0xaa, +0xaa,0xd5,0x32,0x76,0xab,0x11,0x76,0x33,0x53,0x2b,0x62,0xaa,0x2b,0x54,0xca,0xc7, +0xd6,0x80,0x2d,0xab,0x54,0xca,0xdf,0x28,0xf4,0xaa,0x6a,0xd5,0x32,0xb7,0xbd,0x0c, +0x0b,0x91,0xb7,0x35,0x2a,0xb5,0x55,0x56,0xa9,0x95,0xea,0x40,0xb2,0xad,0xd2,0xa6, +0x56,0xaa,0xaa,0xd5,0x32,0x35,0x43,0x34,0x4c,0xb6,0xac,0x38,0xc5,0x58,0x8d,0xea, +0x9c,0x6d,0x8a,0x9d,0x1b,0xd2,0xa5,0x81,0x6f,0x3f,0x2f,0x1c,0x57,0xe7,0x9f,0xfc, +0x14,0xa3,0xe0,0xaa,0x5a,0xeb,0x1a,0x57,0xc4,0x4d,0x3e,0x00,0xb6,0xf7,0x85,0x6d, +0x35,0x1d,0x83,0xa4,0xab,0x92,0x92,0x1f,0xf7,0x87,0x1f,0x51,0x5f,0xa1,0x28,0xdf, +0x8f,0xb5,0x71,0x5f,0x1b,0x3e,0x1e,0xc1,0xf1,0x4b,0xe1,0x6f,0x88,0xbc,0x35,0x2c, +0x6b,0x23,0xde,0xda,0xb0,0x80,0x91,0xf7,0x66,0x5f,0x9a,0x32,0x3f,0xe0,0x40,0x56, +0x53,0x8f,0x32,0xb1,0xea,0x65,0xf8,0xa7,0x85,0xc4,0x46,0xa7,0x4e,0xbe,0x87,0xe0, +0x8e,0xa5,0x6e,0x16,0xc8,0xc8,0xdd,0x37,0x33,0x7e,0x66,0xb8,0xe9,0x91,0x9a,0x4c, +0x91,0x82,0x7a,0x57,0xa7,0xfc,0x40,0xf0,0xfd,0xce,0x87,0x34,0x9a,0x75,0xcc,0x6d, +0x0c,0xd6,0xf2,0xb4,0x52,0xa3,0x0c,0x15,0x2a,0x48,0x23,0xf3,0xae,0x0e,0x48,0x36, +0xc6,0x66,0x2b,0x8d,0xa7,0x02,0xb0,0x8b,0xd0,0xfd,0x32,0xbc,0x3d,0xb3,0x5e,0x48, +0xcb,0xb8,0x8c,0xc3,0x1e,0xc4,0x38,0x66,0xfb,0xed,0xdc,0x7b,0x55,0x48,0x10,0xc5, +0x74,0xad,0xfc,0x23,0xe5,0xdb,0x56,0x0c,0x9e,0x63,0x3b,0x13,0x94,0x4e,0xfe,0xb4, +0xc8,0x97,0xee,0xe7,0xa9,0x39,0xab,0x3c,0x69,0xda,0x52,0x52,0x8f,0x4d,0x8b,0x66, +0x41,0xe6,0xb2,0x9a,0x37,0xe7,0x91,0x4c,0x92,0x3c,0xcc,0x08,0xe8,0x78,0xa9,0xe3, +0x84,0xf3,0xdc,0x8e,0x28,0x3a,0xef,0x39,0xb6,0x88,0x82,0x33,0xf3,0xde,0xad,0x5a, +0xd9,0x34,0xf2,0x05,0x51,0x92,0x6a,0xed,0x86,0x93,0x2d,0xcb,0x8d,0xaa,0x49,0xf6, +0x15,0xea,0x7e,0x03,0xf8,0x6d,0x3d,0xfc,0xf1,0xaa,0xc0,0xd2,0xca,0xe4,0x04,0x45, +0x5c,0x92,0x49,0xf4,0xa9,0x72,0x49,0x5d,0x9e,0x8e,0x1b,0x06,0xea,0x4a,0xec,0xe6, +0xfc,0x2b,0xe0,0xd9,0x24,0x9a,0x26,0x78,0xf7,0x16,0xfe,0x1c,0x57,0xb8,0xf8,0x6b, +0xc3,0x7a,0x17,0x82,0x52,0x0d,0x57,0xc4,0x57,0x1e,0x4c,0xc0,0x79,0x90,0x59,0x44, +0x33,0x2c,0xb8,0xe7,0x81,0xd8,0x7b,0x9a,0xc1,0xd5,0xbc,0x41,0xa7,0xfc,0x3e,0xbc, +0xd4,0x74,0xab,0x68,0x7c,0xef,0x11,0x58,0x80,0xb3,0x89,0x53,0xe5,0xb6,0x24,0xe0, +0x8c,0x1e,0xac,0x3d,0x3a,0x0a,0xf3,0xc5,0xd4,0x2e,0x75,0x5d,0x7a,0xe6,0xe6,0xf2, +0x79,0x2e,0x2e,0x1e,0x26,0x25,0xdc,0xe4,0xff,0x00,0xfa,0xab,0x92,0x72,0x94,0xfc, +0x8f,0xb0,0xa0,0xe9,0xd1,0x82,0x54,0xf5,0x67,0xac,0x78,0xa7,0xf6,0x81,0xd5,0x75, +0xcd,0xd0,0x69,0x82,0x3d,0x22,0xd8,0x0d,0x89,0x81,0xba,0x4c,0x7d,0x7b,0x7e,0x15, +0xe7,0x3f,0x68,0xb8,0xbc,0xbe,0x7b,0x89,0xee,0x1e,0xe2,0x67,0xfb,0xd2,0xc8,0xdb, +0x89,0xfc,0x6b,0x18,0x63,0x71,0x1c,0x55,0xcb,0x57,0xf2,0xe3,0x38,0xe2,0xb2,0x51, +0x51,0xd8,0xe9,0xf6,0x92,0xa8,0xfd,0xe2,0xfd,0xc4,0x81,0xbe,0xef,0x1b,0x7d,0x3f, +0x9d,0x6b,0xf8,0x56,0xf1,0x56,0x69,0x15,0xf8,0xde,0x3e,0xf7,0xa1,0xed,0x5c,0xdb, +0x49,0xf9,0xd6,0x9e,0x8b,0x21,0x59,0x81,0x15,0x76,0xd0,0xd1,0x4b,0xde,0x4c,0xf6, +0xdf,0x0b,0xdf,0x79,0x30,0xc6,0x48,0x0a,0xdb,0x40,0xdc,0x9f,0xce,0xbb,0xfd,0x37, +0x56,0x0a,0xb9,0x79,0x04,0x8d,0xd9,0x4f,0x7a,0xf1,0x8d,0x0f,0x52,0x54,0x8c,0x02, +0x59,0x78,0xed,0xd2,0xbb,0xbf,0x0b,0xce,0x75,0x2b,0xe8,0x62,0x4e,0x70,0x79,0xae, +0x29,0x47,0xa9,0xed,0xd2,0xac,0x9d,0xa2,0x7d,0xb3,0xfb,0x23,0x68,0xad,0x73,0x36, +0xab,0xad,0x4a,0x39,0x54,0x58,0x13,0xd8,0x9e,0x4f,0xe9,0x5f,0x4a,0xfd,0x2b,0xcc, +0xbf,0x67,0xcf,0x0d,0x7f,0xc2,0x35,0xf0,0xda,0xc5,0x9d,0x76,0xcf,0x7a,0xc6,0xe5, +0xc6,0x3d,0x78,0x03,0xf2,0x1f,0xad,0x7a,0x43,0x39,0xaf,0x66,0x84,0x79,0x69,0xa4, +0x7f,0x37,0x71,0x16,0x29,0x63,0x33,0x4a,0xd5,0x23,0xb2,0x76,0x5f,0x2d,0x07,0xb3, +0x6d,0xa8,0xd9,0xbd,0xf8,0xa4,0xce,0x79,0x34,0xc2,0xd8,0xe2,0xba,0x52,0x3e,0x69, +0xb1,0x5b,0x8a,0x8d,0xe4,0xdb,0x9c,0xfe,0x94,0x92,0x49,0xe8,0x6a,0x07,0x7c,0x55, +0x19,0xdc,0x7b,0xc8,0x4f,0x53,0x50,0x33,0xd3,0x5a,0x5a,0x81,0xdf,0xaf,0x35,0x40, +0x3a,0x46,0xfc,0x6a,0xbc,0x92,0x75,0xa4,0x79,0x2a,0xbc,0xb2,0xd3,0xb1,0x2d,0x8b, +0x24,0xb5,0x56,0x49,0x29,0x64,0x92,0xaa,0xcd,0x27,0x7a,0x64,0x89,0x24,0x9d,0x6a, +0xac,0xd3,0x63,0x8a,0x49,0x26,0xec,0x0d,0x52,0x9a,0x6f,0x7a,0x62,0x16,0x69,0x7d, +0xf9,0xaa,0x72,0xcb,0xd6,0x89,0x24,0xaa,0xb2,0x49,0xef,0x48,0x61,0x24,0x9d,0xaa, +0xb4,0x93,0x62,0x89,0x24,0xf7,0xaa,0x92,0x49,0x40,0xc5,0x92,0x4a,0x83,0x75,0x36, +0x49,0x0f,0x6a,0x84,0xc9,0xdb,0x34,0x0c,0x7c,0x8d,0x51,0x33,0x7a,0x50,0xcd,0x51, +0x3b,0x52,0x1a,0x43,0x9c,0x86,0x04,0x11,0x91,0xe8,0x6b,0x27,0x52,0xf0,0xce,0x8d, +0xac,0x02,0x2f,0x74,0xab,0x2b,0xb1,0xd0,0xf9,0xd0,0x2b,0x7f,0x31,0x5a,0x5b,0xbd, +0x69,0xb9,0xa2,0xef,0xa1,0xa4,0x6a,0x4e,0x9b,0xbc,0x1d,0x9f,0x91,0xc7,0x5d,0x7c, +0x1c,0xf0,0x2d,0xd6,0xef,0x33,0xc2,0x7a,0x49,0x2d,0xd5,0x96,0xd9,0x54,0xfe,0x62, +0xaa,0x8f,0x81,0xfe,0x01,0x5e,0x9e,0x14,0xd3,0x7f,0x18,0xb3,0x5d,0xc9,0xa6,0xee, +0xad,0x55,0x5a,0x8b,0xed,0x3f,0xbc,0xef,0x59,0xa6,0x3a,0x2a,0xd1,0xaf,0x3f,0xfc, +0x0a,0x5f,0xe6,0x7e,0x78,0x7e,0xd7,0x9a,0x45,0x97,0x84,0x7e,0x2d,0x1d,0x3b,0x44, +0xb7,0x4d,0x32,0xc8,0x58,0xc2,0xe6,0xde,0xd7,0xe4,0x4d,0xc4,0x1c,0x9c,0x0e,0xf5, +0xe1,0xad,0x23,0xc8,0x72,0xcc,0xcc,0x7d,0xcd,0x7b,0xb7,0xed,0xae,0xe1,0xbe,0x3a, +0x5d,0x81,0xfc,0x36,0x16,0xc0,0xff,0x00,0xdf,0x35,0xe0,0xf5,0xf5,0xb8,0x76,0xdd, +0x18,0x36,0xfa,0x1e,0x06,0x2b,0x19,0x89,0xc4,0x4d,0xaa,0xb5,0x25,0x2f,0x56,0xdf, +0xe6,0x14,0x51,0x45,0x74,0x1e,0x78,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51, +0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x56, +0xaf,0x85,0xfc,0x49,0x77,0xe1,0x3d,0x7a,0xd3,0x54,0xb2,0x6c,0x4d,0x03,0x64,0xa9, +0x3c,0x3a,0xf7,0x53,0xec,0x45,0x65,0x51,0x54,0x9b,0x8b,0xba,0x33,0x9c,0x23,0x52, +0x2e,0x13,0x57,0x4f,0x46,0x7d,0xa5,0xa7,0xeb,0x1e,0x0b,0xfd,0xa1,0x3c,0x03,0xa5, +0x69,0x3a,0xf5,0xfc,0xda,0x3d,0xde,0x8e,0x31,0xa1,0xf8,0xa2,0xd1,0x0c,0x97,0x3a, +0x39,0x27,0x22,0xda,0xea,0x31,0xf3,0x3d,0xb8,0x6e,0x55,0xc7,0x29,0xf4,0xe6,0xa3, +0x7f,0xda,0xeb,0xe2,0x6f,0xec,0xcd,0xaf,0x27,0x85,0xb5,0x4d,0x57,0x46,0xf1,0xa2, +0x41,0x0a,0x4d,0x16,0xa1,0xa5,0xde,0x97,0x8e,0x68,0xdb,0x3b,0x4b,0x1c,0x63,0x77, +0x1c,0x82,0xa0,0xfa,0xd7,0xc7,0xda,0x3e,0xb5,0x7f,0xe1,0xfb,0xc5,0xbb,0xd3,0x6e, +0xe6,0xb2,0xb9,0x5e,0x3c,0xc8,0x58,0xa9,0xc7,0xa1,0xf5,0x14,0x9a,0xc6,0xb1,0x75, +0xaf,0x6a,0x77,0x1a,0x85,0xf4,0x9e,0x75,0xdd,0xc3,0x6e,0x92,0x4d,0xa1,0x77,0x1c, +0x01,0x9c,0x0f,0xa5,0x79,0x78,0xec,0xaf,0x03,0x98,0x35,0x2a,0xd0,0xd5,0x7c,0xac, +0xde,0xee,0x32,0x4d,0x4a,0x37,0xea,0x93,0xb1,0x96,0x17,0xeb,0x38,0x7f,0xdd,0xca, +0x5c,0xd1,0x5b,0x3f,0xb5,0xe8,0xfa,0x3f,0x5d,0x1f,0x7b,0xee,0x7d,0x27,0xf1,0x2b, +0xf6,0xff,0x00,0xf1,0xef,0x8f,0x2c,0xe7,0xb6,0xb4,0x8a,0x2d,0x24,0x4c,0x49,0xf3, +0x8c,0x86,0x69,0x23,0x24,0x63,0x29,0x90,0x15,0x4e,0x3b,0x81,0x5f,0x32,0x5d,0x5d, +0x4d,0x7b,0x73,0x2d,0xc5,0xc4,0xaf,0x3c,0xf2,0xb1,0x79,0x25,0x90,0xe5,0x9d,0x89, +0xc9,0x24,0xf7,0x35,0x1d,0x15,0x38,0x1c,0xaf,0x07,0x96,0xf3,0x7d,0x56,0x9f,0x2b, +0x96,0xef,0x56,0xdf,0xab,0x77,0x6f,0xef,0x3b,0x25,0x39,0x4f,0x59,0x30,0xa2,0x8a, +0x2b,0xd4,0x20,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28, +0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28, +0xa2,0x8a,0x00,0xfd,0xac,0x06,0x9d,0x9f,0x5a,0x88,0x53,0xd4,0xd7,0xc2,0x9e,0xe9, +0x20,0xa7,0x54,0x4a,0xd5,0x22,0xb5,0x31,0x12,0x66,0xa5,0x53,0x55,0xe9,0xea,0xd4, +0x80,0xb2,0x1a,0xa5,0x57,0xaa,0xca,0xd5,0x22,0xb7,0xbd,0x51,0x25,0x95,0x6a,0x99, +0x5b,0xde,0xaa,0x86,0xf7,0xa9,0x10,0xee,0xa7,0x71,0x17,0x23,0x6c,0x54,0xc8,0xfc, +0xd5,0x35,0x3d,0x05,0x4a,0xb2,0x15,0xa6,0x22,0xea,0xc9,0xc5,0x48,0xb2,0x62,0xa9, +0x07,0x35,0x32,0xc9,0x4c,0x0b,0xaa,0xfe,0xf5,0x32,0xc9,0xc9,0xaa,0x29,0x27,0xb5, +0x4d,0x1c,0x9b,0x69,0x01,0x7d,0x24,0xf4,0xe9,0x53,0xa3,0xf4,0xaa,0x31,0xc9,0x53, +0xa4,0x9d,0x2a,0x46,0x9d,0x8b,0xca,0xf5,0x34,0x72,0x7b,0xf1,0x54,0x95,0xea,0x54, +0x92,0xa2,0xc5,0x97,0xd6,0x4a,0x94,0x65,0xb1,0x83,0xf5,0xaa,0x71,0xbf,0x6a,0x99, +0x5f,0x0c,0x29,0x0c,0xfc,0xe8,0xff,0x00,0x82,0x8b,0x7e,0xcd,0xff,0x00,0xd9,0x17, +0x8f,0xe3,0xcd,0x16,0xdf,0x3a,0x75,0xfb,0x81,0x7c,0x91,0x82,0x7c,0x99,0xcf,0xf1, +0x9f,0x45,0x6f,0xe6,0x2b,0xf3,0xb7,0xc4,0x30,0x9b,0x5d,0x36,0x28,0x94,0x62,0x49, +0x64,0x23,0xdf,0x1e,0xb5,0xfd,0x0b,0x78,0xbb,0xc2,0xfa,0x67,0x8e,0xbc,0x37,0xa8, +0x68,0x5a,0xbc,0x0b,0x71,0xa7,0xdf,0x44,0x61,0x9a,0x33,0xe8,0x7b,0x8f,0x70,0x7a, +0x57,0xe2,0x97,0xed,0x31,0xfb,0x3e,0xea,0xdf,0x09,0x7e,0x21,0x5c,0x68,0xf7,0x71, +0xb3,0x41,0x0b,0xbb,0xdb,0x4d,0xb7,0x02,0x68,0x89,0xf9,0x5c,0x7e,0x1f,0xa8,0xae, +0x59,0x47,0x95,0xdc,0xfb,0xcc,0xa7,0x1d,0x2c,0x45,0x17,0x41,0xbf,0x79,0x2b,0x7a, +0xaf,0xf8,0x07,0xce,0xcd,0x67,0xfe,0x8b,0x80,0x71,0xce,0x69,0x52,0x00,0xac,0xbe, +0xb8,0xe9,0x5d,0x04,0x9a,0x0d,0xc7,0x96,0x50,0x46,0x73,0x9f,0x4a,0x9a,0xcb,0xc2, +0x77,0xb7,0x97,0x11,0xaa,0x40,0xcc,0x7e,0x9c,0x53,0xb9,0xec,0xac,0x3b,0x6d,0x72, +0xc7,0xb1,0x95,0x6d,0x66,0x65,0x9e,0x15,0x0b,0x9e,0x73,0x5d,0x4e,0x8d,0xe0,0xf9, +0x2e,0x65,0xc9,0x52,0x32,0x6b,0xa8,0xd1,0xfc,0x1f,0x1e,0x9f,0x22,0x86,0x1e,0x75, +0xd3,0x71,0x85,0x19,0xc5,0x7d,0x6b,0xfb,0x3a,0xfe,0xc7,0x1a,0xff,0x00,0xc4,0xd7, +0x83,0x53,0xd4,0x61,0x6d,0x1b,0x42,0xc8,0x26,0xe2,0x74,0x21,0xa5,0x19,0xe4,0x20, +0xef,0xf5,0xa8,0xe6,0xe9,0x13,0xd7,0x94,0x68,0x61,0x69,0xba,0x95,0xa4,0x92,0x3c, +0x43,0xe1,0x2f,0xc0,0xad,0x5b,0xc6,0xfa,0xd5,0xbe,0x9f,0xa5,0x69,0xf2,0xdd,0xdc, +0x48,0xc3,0x84,0x53,0x85,0x19,0xea,0x4f,0x61,0xef,0x5f,0xa7,0x1f,0xb3,0xdf,0xec, +0xa3,0xa2,0x7c,0x25,0xb4,0x83,0x50,0xd4,0x62,0x87,0x50,0xf1,0x06,0x01,0xde,0x46, +0x63,0x80,0xff,0x00,0xb2,0x0f,0x53,0xef,0x5e,0x99,0xf0,0xd3,0xe1,0x47,0x86,0xfe, +0x15,0xe8,0xcb,0xa7,0xe8,0x36,0x2b,0x07,0x18,0x92,0xe1,0xb9,0x96,0x53,0xea,0xc7, +0xfa,0x57,0x66,0x38,0xa7,0x18,0x6b,0x79,0x1f,0x0d,0x9a,0x67,0xd3,0xc4,0xc5,0xd0, +0xc2,0xfb,0xb0,0xfc,0x5f,0xf9,0x2f,0x2f,0xbc,0xfc,0x6d,0xfd,0xb8,0x3e,0x1d,0x1f, +0x04,0xfe,0xd6,0x7e,0x28,0x64,0x8b,0xcb,0xb3,0xd7,0xed,0x7e,0xdd,0x11,0xc7,0x05, +0x99,0x46,0xfc,0x7f,0xc0,0x81,0xaf,0x9d,0x74,0x59,0x9f,0xed,0x8f,0x28,0x52,0x47, +0x96,0xca,0xfe,0xd8,0xe2,0xbf,0x4f,0x7f,0xe0,0xa6,0x9f,0x08,0xa4,0xd7,0x3c,0x23, +0xa2,0x7c,0x40,0xb0,0x87,0x7d,0xce,0x84,0xd2,0x5b,0x5e,0x95,0x1c,0xfd,0x9e,0x40, +0x40,0x3f,0x83,0xe3,0xf3,0xaf,0xcb,0x9f,0xb4,0x35,0xae,0xa0,0xa5,0x59,0x84,0x6a, +0x11,0xe5,0xd8,0x39,0xf9,0x87,0x1f,0xaf,0x35,0x9c,0xe3,0xa9,0xf6,0x79,0x0e,0x25, +0x55,0xc1,0x45,0xdf,0x54,0xed,0xf9,0x17,0xbe,0xd7,0x1c,0x92,0x6c,0x74,0xce,0x4f, +0x07,0x38,0xab,0x3e,0x68,0x4c,0x01,0xd2,0xab,0xc7,0x71,0xe7,0x64,0x3e,0xd2,0x47, +0x20,0xe3,0x9a,0x49,0x89,0x52,0xc3,0xd0,0xd7,0x39,0xf5,0x9c,0xd6,0xd4,0xb3,0xe6, +0xe4,0xd6,0xa6,0x93,0x26,0x24,0x07,0x38,0xac,0x15,0x63,0xc5,0x6b,0x69,0xbc,0x63, +0x35,0x76,0x1f,0x3d,0xb5,0x3a,0xeb,0x5d,0x44,0xae,0xd5,0x07,0xbd,0x7d,0x1d,0xfb, +0x3d,0x78,0x2a,0x5f,0x14,0x6b,0x9a,0x75,0xa0,0x42,0x5a,0xe2,0x55,0x04,0xe3,0xa2, +0xf5,0x27,0xf2,0xaf,0x9c,0x3c,0x2f,0xa6,0xbe,0xa5,0xaa,0x43,0x18,0x52,0xc3,0x22, +0xbf,0x4a,0xbf,0x63,0x9f,0x87,0x3f,0xd9,0xfa,0x7c,0xbe,0x20,0xb8,0x8f,0x1b,0x07, +0x93,0x06,0x47,0x72,0x06,0xe2,0x3f,0x0e,0x2b,0x37,0x1e,0x79,0x28,0xa3,0x97,0x19, +0x98,0x7f,0x67,0xe0,0xeb,0x62,0xdb,0xd5,0x2b,0x47,0xd5,0xec,0x7d,0x37,0x67,0x6a, +0x96,0x36,0xb0,0xdb,0xc4,0x36,0xc5,0x0a,0x04,0x51,0xec,0x06,0x2a,0x56,0x6f,0x97, +0x27,0xf2,0xa4,0x66,0xed,0x51,0x34,0x9e,0xf9,0x35,0xeb,0x58,0xfe,0x79,0x94,0x9b, +0x77,0x63,0x8c,0x98,0xf6,0xa8,0xda,0x6e,0xbd,0xaa,0x36,0x7d,0xb5,0x0b,0x3f,0xa1, +0xaa,0xb1,0x03,0xe4,0x97,0x15,0x03,0xc9,0xef,0x4c,0x92,0x4c,0x77,0xa8,0x1a,0x4f, +0x7a,0x69,0x0b,0x61,0xd2,0x49,0xef,0x50,0xb4,0xbe,0xf4,0xc7,0x97,0xad,0x56,0x92, +0x5a,0xbb,0x11,0x71,0xf2,0x4f,0xda,0xab,0xc9,0x35,0x47,0x24,0xbc,0x55,0x59,0x26, +0xf7,0xa6,0x22,0x59,0x26,0xeb,0xcd,0x55,0x92,0x63,0xcf,0x35,0x1c,0xb3,0x1c,0xf5, +0xaa,0xd2,0xcc,0x57,0x3c,0xd2,0x01,0xd2,0xcb,0xb6,0xa9,0xcd,0x29,0xf5,0xa2,0x49, +0xbd,0x4d,0x55,0x92,0x4a,0x43,0x09,0x25,0x35,0x5a,0x49,0x7b,0xd1,0x24,0xb8,0xaa, +0x92,0xca,0x4f,0x7a,0x45,0x0e,0x92,0x4c,0xd5,0x79,0x24,0xa4,0x67,0xa8,0x99,0xa9, +0x80,0xd6,0x6e,0xb5,0x13,0x37,0xcd,0x43,0x35,0x47,0x4a,0xe5,0x24,0x3d,0x9b,0x8a, +0x8c,0x9a,0x0d,0x30,0xb5,0x22,0x87,0x16,0xa6,0x31,0xa6,0x93,0xcd,0x34,0xb5,0x32, +0x07,0x6e,0xa6,0xee,0xf5,0xa6,0x96,0xa3,0xad,0x50,0x8f,0xce,0xbf,0xdb,0x0e,0xf0, +0x5e,0x7c,0x7c,0xd6,0xf1,0xff,0x00,0x2c,0x60,0xb7,0x84,0xf3,0x9e,0x44,0x63,0xfc, +0x6b,0xc5,0xab,0xd2,0xbf,0x69,0x4b,0xef,0xed,0x0f,0x8e,0xde,0x32,0x90,0x1c,0xaa, +0xde,0xf9,0x6b,0xf4,0x54,0x51,0xfc,0xf3,0x5e,0x6b,0x5f,0x65,0x41,0x5a,0x94,0x57, +0x92,0x3c,0x7a,0x9f,0x1b,0x0a,0x28,0xa2,0xb6,0x20,0x28,0xa2,0x8a,0x00,0x28,0xa2, +0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2, +0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2, +0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2, +0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2, +0x8a,0x00,0xfd,0xa8,0xcd,0x3a,0xa2,0x0f,0xed,0x46,0xec,0xf7,0xaf,0x85,0x3d,0xd2, +0x65,0x61,0xe9,0x4e,0x56,0xa8,0xb3,0x4e,0x56,0xa0,0x44,0xe1,0xa9,0xd5,0x0e,0xea, +0x7e,0xef,0x7a,0x60,0x4a,0xad,0xe8,0x6a,0x45,0x7a,0x83,0x34,0xa0,0xe2,0x80,0x2d, +0x2b,0x71,0x52,0xab,0xe2,0xa9,0xac,0x9e,0xf5,0x32,0xb8,0xf5,0xa6,0x49,0x69,0x64, +0x26,0xa4,0x57,0xaa,0xaa,0xd5,0x22,0xb5,0x31,0x16,0xd6,0x4a,0x95,0x64,0xe9,0x54, +0xd5,0xaa,0x44,0x71,0xc5,0x01,0x62,0xfa,0xb6,0x7b,0xd4,0xaa,0xfe,0xf5,0x49,0x64, +0xa9,0x92,0x4f,0x7a,0x42,0x2e,0xa4,0x86,0xa6,0x59,0x3a,0x55,0x25,0x93,0xde,0xa6, +0x8e,0x4e,0x6a,0x80,0xbe,0x92,0x74,0xa9,0xd1,0xab,0x3d,0x64,0x3d,0xaa,0x78,0xe4, +0xfc,0x6a,0x40,0xbe,0xb2,0x54,0xca,0xd5,0x46,0x39,0x2a,0x65,0x93,0x1d,0xea,0x6c, +0x5a,0x65,0xe5,0x93,0xbf,0x7a,0xe0,0xfe,0x2e,0x7c,0x12,0xf0,0xbf,0xc6,0xcd,0x0c, +0x58,0x78,0x86,0xcf,0x74,0xf1,0x64,0xdb,0xde,0x45,0xc4,0xb0,0x9f,0x63,0xdc,0x7b, +0x1e,0x2b,0xb3,0x59,0x7d,0xea,0x74,0x9b,0xd6,0xa1,0xab,0xee,0x6d,0x4e,0xa4,0xe8, +0xcd,0x4e,0x9b,0xb3,0x47,0xc2,0x1e,0x29,0xff,0x00,0x82,0x6b,0xde,0xc3,0x23,0x4b, +0xe1,0xed,0x7e,0xce,0xed,0x73,0xf2,0xc3,0x79,0x19,0x88,0xe3,0xea,0x32,0x2b,0x93, +0xb1,0xff,0x00,0x82,0x7a,0xfc,0x48,0x9a,0xe8,0xc5,0x25,0xce,0x91,0x63,0x6f,0x9c, +0x79,0x9f,0x68,0x2d,0xc7,0xb0,0x02,0xbf,0x47,0xfc,0xde,0x38,0xa5,0x56,0x3c,0x76, +0xac,0xbd,0x94,0x4f,0xa0,0x87,0x10,0xe3,0xe1,0x1b,0x5d,0x3f,0x91,0xf3,0x2f,0xc1, +0x5f,0xd8,0x4b,0xc2,0xdf,0x0f,0x2e,0xa2,0xd4,0xfc,0x43,0x38,0xf1,0x2e,0xa9,0x1f, +0xcc,0x91,0xb2,0x6c,0xb7,0x43,0xeb,0xb4,0x9c,0xb7,0xe3,0x5f,0x52,0x5b,0xc5,0x1d, +0xb4,0x49,0x1c,0x28,0xb1,0x46,0xa3,0x6a,0xaa,0x0c,0x00,0x3d,0x00,0xa8,0x0f,0xcd, +0x8e,0x6a,0x58,0xd8,0x28,0xe9,0x55,0xca,0x96,0xc7,0x91,0x88,0xc6,0x57,0xc5,0xcb, +0x9a,0xb4,0xae,0x59,0x0d,0x4e,0x0c,0x3d,0x6a,0xb6,0xfe,0x7a,0xe2,0x9d,0xb8,0x7a, +0xd3,0xb1,0xcb,0x73,0x2b,0xc7,0x1e,0x17,0xb4,0xf1,0xa7,0x83,0xf5,0xad,0x0e,0xf6, +0x04,0xb9,0xb7,0xd4,0x2d,0x25,0xb7,0x68,0xdc,0x64,0x12,0xca,0x40,0x3f,0x81,0xc1, +0xaf,0xc1,0x3f,0x10,0x69,0xf2,0xf8,0x5b,0xc5,0x7a,0xed,0xac,0xc9,0x89,0xac,0x2e, +0xda,0xce,0x44,0x23,0xfb,0x84,0xa9,0xe3,0xf0,0xaf,0xe8,0x0d,0x5b,0x6f,0x4a,0xfc, +0x6a,0xfd,0xb5,0x7e,0x18,0x7f,0xc2,0x2b,0xfb,0x4d,0x78,0x92,0xd9,0x01,0xb7,0xb4, +0xd4,0xdb,0xed,0xf6,0xe4,0x8c,0x06,0x32,0x0d,0xcc,0x07,0xfc,0x08,0x9a,0xc2,0xa2, +0xb2,0xd4,0xfb,0x8e,0x17,0xae,0xe3,0x5e,0x54,0x57,0x5d,0x7f,0x4f,0xd4,0xf0,0x79, +0xa4,0x47,0x8d,0xa6,0x89,0x55,0x33,0xce,0x16,0x92,0xe4,0x7e,0xf8,0xfa,0x30,0x06, +0x96,0x5b,0x76,0xb7,0xf3,0x20,0x6f,0xee,0x1c,0x7e,0x14,0x48,0x0b,0x2c,0x4d,0xea, +0xa2,0xb9,0x4f,0xd5,0x35,0x12,0x25,0xf9,0x85,0x6e,0x69,0x50,0x99,0xa4,0x55,0x03, +0x35,0x91,0x6f,0x13,0x16,0x00,0x0e,0x7a,0x57,0xa5,0x7c,0x3c,0xf0,0xc3,0x6a,0x17, +0x0a,0x4a,0xf0,0x30,0x49,0xc5,0x39,0x3e,0x55,0x70,0x51,0x73,0x92,0x8a,0x3d,0x57, +0xe0,0x27,0xc3,0x6b,0x8f,0x10,0x6b,0x56,0x70,0xc5,0x11,0x79,0xe7,0x91,0x63,0x45, +0xdb,0xf9,0x9f,0xa0,0xaf,0xd4,0xdf,0x0a,0xf8,0x7e,0xdf,0xc2,0x7e,0x1e,0xb1,0xd2, +0xad,0x94,0x2c,0x76,0xf1,0x85,0x24,0x7f,0x13,0x77,0x3f,0x89,0xaf,0x9f,0xbf,0x64, +0x7f,0x86,0x0b,0xa3,0xe9,0x2d,0xe2,0x4b,0xa8,0x3c,0xb7,0x90,0x18,0x6d,0x14,0x8e, +0x8b,0x8f,0x99,0xff,0x00,0x1e,0x95,0xf4,0x7b,0x49,0xb7,0xad,0x6d,0x87,0x83,0xb7, +0x3b,0xdd,0x9f,0x97,0x71,0x66,0x62,0xab,0x57,0x58,0x1a,0x2f,0xdd,0xa7,0xbf,0x9c, +0xba,0xfd,0xdb,0x7d,0xe4,0x8f,0x26,0x7d,0xaa,0x06,0x93,0xb5,0x35,0xa6,0xcf,0x4a, +0x81,0xa4,0xae,0xe3,0xe0,0x09,0x19,0xea,0x16,0x90,0xd4,0x6f,0x25,0x41,0x24,0xc3, +0xd6,0x9d,0x84,0xe4,0x49,0x24,0x95,0x5a,0x49,0x8f,0xad,0x47,0x24,0xdf,0x95,0x56, +0x92,0x61,0xeb,0x54,0x41,0x24,0x93,0x55,0x69,0x26,0xf7,0xa8,0xe4,0x9b,0xde,0xaa, +0xc9,0x37,0xbd,0x00,0x4d,0x24,0xbe,0xf5,0x5a,0x49,0x3f,0x0a,0x86,0x49,0xb1,0xde, +0xab,0xc9,0x37,0x3d,0x68,0x02,0x59,0x26,0xaa,0xb2,0x49,0xd7,0x9a,0x64,0x93,0x55, +0x67,0x93,0x1c,0x52,0x18,0xe9,0x24,0xf7,0xaa,0xd2,0x4b,0xef,0x4d,0x92,0x4e,0xb5, +0x5a,0x47,0xcd,0x22,0xc5,0x79,0x3d,0xea,0xbc,0x92,0xfe,0x34,0x92,0x37,0x6a,0x85, +0x9a,0x98,0x87,0xb3,0x54,0x4c,0xd4,0x9b,0xa9,0xac,0xd5,0x2c,0xab,0x0d,0x66,0xa6, +0xee,0xa0,0xd2,0x50,0x50,0x85,0xa9,0xb4,0xe3,0x41,0xe9,0x41,0x2c,0x61,0xa6,0x7d, +0x29,0xcc,0x4f,0x6a,0x4a,0xa2,0x46,0x7d,0xdf,0x7a,0x72,0xfd,0xe1,0x4b,0xc5,0x47, +0x73,0x32,0xdb,0xdb,0x4d,0x2b,0x30,0x51,0x1a,0x33,0x12,0x7a,0x0c,0x0c,0xd3,0x11, +0xf9,0x5f,0xf1,0x66,0xf7,0xfb,0x47,0xe2,0x87,0x8b,0x2e,0x73,0x91,0x26,0xa7,0x3f, +0xe8,0xe4,0x7f,0x4a,0xe5,0x2a,0xde,0xb1,0xa8,0x1d,0x5b,0x57,0xbf,0xbe,0x6e,0xb7, +0x57,0x12,0x4e,0x7f,0xe0,0x4c,0x5b,0xfa,0xd5,0x4a,0xfb,0x68,0xae,0x58,0xa4,0x78, +0xcf,0x56,0x14,0x51,0x45,0x50,0x82,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a, +0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a, +0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a, +0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a, +0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x0f,0xda, +0x1d,0xd4,0x6e,0xa6,0x64,0xd0,0x1b,0xd6,0xbe,0x18,0xf6,0xc9,0x55,0xaa,0x55,0x6a, +0xae,0xbd,0x69,0xea,0xd8,0xa1,0x8c,0x9e,0x9f,0x51,0x2b,0x53,0x85,0x21,0x92,0xee, +0xa7,0x6e,0xa8,0xf8,0xa2,0x98,0x89,0x69,0xca,0xd5,0x10,0x6a,0x78,0x34,0x80,0xb0, +0xaf,0xd3,0xad,0x4a,0xad,0xde,0xaa,0xab,0x1f,0x5a,0x91,0x1b,0xdf,0x9a,0x62,0x2d, +0x2b,0xd3,0xd5,0xbd,0x3a,0xd5,0x65,0x6a,0x7a,0xbe,0x29,0x88,0xb8,0x8c,0x7b,0xd4, +0xa8,0xdc,0xf5,0xaa,0x4b,0x26,0x6a,0x68,0xde,0x82,0x4b,0xca,0xd8,0x04,0xe6,0xa5, +0x59,0x3d,0x45,0x51,0x59,0x2a,0x51,0x27,0x43,0x4c,0x0b,0xeb,0x25,0x4a,0xb2,0x0a, +0xa0,0x92,0x62,0xa6,0x59,0x29,0x01,0x7d,0x64,0xc5,0x4c,0xb3,0x7e,0x35,0x9e,0xb2, +0x54,0xab,0x25,0x00,0x68,0x2c,0x95,0x22,0xcd,0x8e,0xa6,0xa8,0xac,0xa6,0xa4,0x59, +0x3a,0x54,0x95,0x72,0xfa,0xcd,0xe9,0x53,0xac,0x95,0x9c,0xb2,0x54,0xcb,0x36,0x31, +0xcd,0x22,0xcb,0xc2,0x5f,0x7a,0x70,0x93,0xf1,0xaa,0x5e,0x75,0x28,0x9b,0x1c,0xd2, +0x11,0x7b,0xcc,0xa7,0xac,0xdd,0xba,0xd5,0x01,0x37,0x7c,0xd3,0xbc,0xd3,0xeb,0x45, +0x86,0x68,0x79,0x9f,0x2f,0xa5,0x7c,0x21,0xff,0x00,0x05,0x3a,0xf8,0x7a,0xd7,0x5a, +0x6f,0x84,0xfc,0x69,0x6a,0x98,0x92,0xda,0x56,0xb0,0x9e,0x45,0x1f,0x77,0x3f,0x34, +0x64,0x9f,0x73,0x91,0x5f,0x71,0x2c,0xd5,0xc9,0xfc,0x58,0xf8,0x77,0xa5,0xfc,0x5b, +0xf8,0x7b,0xac,0x78,0x57,0x56,0xff,0x00,0x8f,0x5d,0x42,0x1d,0x8b,0x20,0x19,0x31, +0x48,0x39,0x49,0x07,0xba,0xb0,0x06,0xa2,0x51,0xe6,0x56,0x3d,0x1c,0xbf,0x16,0xf0, +0x58,0x98,0x56,0x5b,0x27,0xaf,0xa7,0x53,0xf1,0x2b,0x56,0x88,0x49,0x22,0x4c,0xab, +0xb7,0x70,0xf9,0x87,0xa1,0xef,0x59,0xeb,0x1f,0xca,0x8a,0x7b,0x57,0xb4,0xfc,0x5c, +0xf8,0x25,0xad,0xfc,0x32,0xf1,0x14,0xfa,0x36,0xad,0x6d,0xb6,0x58,0xcf,0xc9,0x32, +0x0f,0xdd,0xcc,0xbd,0x9d,0x4f,0xa1,0xfd,0x2b,0xce,0xd7,0xc3,0x32,0x97,0x18,0x53, +0x9f,0xa5,0x79,0x89,0xdb,0x46,0x7e,0xf5,0x0a,0x91,0xad,0x05,0x56,0x9b,0xba,0x65, +0x3d,0x0f,0x4d,0x6b,0x8b,0x85,0xe3,0x3c,0xf1,0xc5,0x7d,0x5b,0xf0,0x17,0xe1,0x74, +0xde,0x22,0xd5,0xb4,0xed,0x36,0x18,0xc8,0x7b,0x86,0x06,0x46,0xc7,0xdd,0x41,0xcb, +0x31,0xfc,0x2b,0xc9,0xfe,0x1d,0x78,0x1d,0xe6,0xbb,0xb7,0x77,0x81,0xe5,0x9a,0x46, +0x0b,0x14,0x28,0xa4,0xb3,0xb7,0xa0,0x15,0xfa,0x47,0xf0,0x0f,0xe1,0x48,0xf8,0x7b, +0xa0,0x8b,0xad,0x42,0x25,0x1a,0xd5,0xda,0x03,0x22,0xff,0x00,0xcf,0x04,0xed,0x18, +0xf7,0xf5,0xa1,0x41,0xd6,0x95,0x96,0xc7,0x0e,0x65,0x9a,0x53,0xc9,0xf0,0x8e,0xab, +0x7f,0xbc,0x96,0x91,0x5e,0x7d,0xfd,0x11,0xea,0x9a,0x3e,0x9f,0x6f,0xa1,0xe9,0x76, +0xb6,0x16,0xa8,0x23,0xb7,0xb6,0x8d,0x62,0x45,0x1e,0x80,0x62,0xa7,0x69,0x2a,0x13, +0x2f,0xbd,0x44,0xf3,0x57,0xb0,0x91,0xf8,0x1c,0xa6,0xe4,0xdc,0xa4,0xee,0xd9,0x33, +0x4b,0x50,0xb4,0xd5,0x03,0x4f,0x50,0x49,0x35,0x51,0x93,0x77,0x26,0x92,0x63,0xd0, +0x1a,0xad,0x24,0xde,0xf5,0x0c,0x93,0xd5,0x59,0x2e,0x28,0x11,0x34,0xb3,0x7b,0xd5, +0x59,0x27,0xa8,0x24,0xb8,0xf7,0xaa,0xd2,0x4d,0xef,0x40,0x13,0xc9,0x36,0x2a,0xbc, +0x93,0xd4,0x32,0x4d,0xcf,0x5a,0x81,0xe5,0xa4,0x3b,0x12,0xbc,0xb5,0x03,0x48,0x4d, +0x46,0xcf,0x51,0x34,0xb4,0x8a,0xb0,0xf7,0x92,0xab,0xc9,0x25,0x35,0xe5,0xa8,0x1e, +0x4a,0x60,0x0e,0xf5,0x04,0x8d,0x48,0xf2,0x54,0x4c,0xd4,0x0c,0x56,0x6a,0x81,0x9a, +0x9c,0xed,0x51,0x31,0xa9,0x29,0x21,0x77,0x53,0x49,0xa4,0xcd,0x34,0xb5,0x16,0x01, +0x73,0x49,0x49,0x9a,0x4d,0xb9,0xef,0x4c,0x57,0x1d,0xba,0x86,0x6a,0x4a,0x6e,0x4d, +0x51,0x01,0x4c,0x66,0xf4,0xa1,0x89,0xed,0x48,0x38,0xa0,0x05,0x15,0xc9,0x7c,0x5b, +0xd5,0x0e,0x8b,0xf0,0xbf,0xc5,0x77,0xc0,0xed,0x68,0x74,0xcb,0x82,0xa7,0xd0,0x98, +0xc8,0x1f,0xa9,0xae,0xab,0x71,0xaf,0x1b,0xfd,0xae,0xb5,0xe1,0xa1,0xfc,0x09,0xd7, +0x13,0x38,0x93,0x50,0x92,0x1b,0x24,0xe7,0xfb,0xce,0x18,0xff,0x00,0xe3,0xa8,0xc3, +0xf1,0xad,0x69,0x2e,0x6a,0x91,0x8f,0x98,0xa5,0xa4,0x5b,0x3f,0x3a,0x05,0x2d,0x14, +0x57,0xd9,0x9e,0x30,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00, +0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00, +0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00, +0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00, +0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x01, +0xfb,0x39,0xba,0x96,0x99,0x45,0x7c,0x35,0x8f,0x72,0xe4,0x81,0xa9,0xea,0x6a,0x3a, +0x72,0x9e,0x28,0x11,0x28,0x62,0x29,0xe1,0xb1,0x50,0xee,0xa7,0x03,0xf9,0x50,0x3b, +0x93,0x6e,0x34,0xed,0xd8,0xeb,0x51,0x6f,0x07,0xda,0x9c,0x0d,0x21,0x92,0x83,0x4e, +0x0d,0x51,0x6e,0x1d,0xa9,0x43,0x50,0x22,0x60,0x69,0xca,0x6a,0x20,0xdc,0x53,0x95, +0xa9,0x88,0x9d,0x5f,0x8a,0x90,0x37,0x1e,0xf5,0x5c,0x35,0x2e,0xf3,0x40,0xcb,0x41, +0xa9,0xeb,0x21,0xcf,0xa5,0x55,0xdf,0xcf,0xad,0x48,0xaf,0x9a,0x09,0xb1,0x6d,0x64, +0xf5,0xe2,0xa5,0x12,0x7b,0xd5,0x1d,0xf5,0x22,0x49,0x8a,0x04,0x5e,0x59,0x39,0xf7, +0xa9,0x56,0x42,0x2a,0x8a,0xc8,0x33,0x8c,0x54,0xab,0x25,0x31,0x17,0xd5,0xf6,0xf7, +0xcd,0x4a,0xb2,0x55,0x05,0x98,0xed,0xc5,0x3d,0x66,0xf5,0xa0,0x0d,0x25,0x92,0x9e, +0xb2,0x7b,0xe2,0xa8,0x2c,0x9e,0xf5,0x2a,0xc9,0xef,0x40,0x17,0xc3,0x15,0xef,0x53, +0x2c,0xbc,0x56,0x72,0xcd,0xef,0x52,0x2c,0xd9,0xa0,0x0b,0xeb,0x2d,0x3b,0x7f,0xbd, +0x51,0x12,0xfb,0xd3,0xbc,0xee,0xf4,0xac,0x55,0xcb,0x9e,0x61,0xa7,0x2c,0xb5,0x48, +0x4d,0xf8,0x52,0xf9,0x9e,0xf4,0x58,0x2e,0x5f,0x12,0x9f,0x5a,0x5f,0x34,0xd5,0x0f, +0x34,0xfa,0x52,0xf9,0xb4,0x58,0x39,0x8c,0x4f,0x88,0x1f,0x0e,0x7c,0x3d,0xf1,0x37, +0x4a,0xfe,0xcf,0xd7,0xf4,0xf4,0xbb,0x89,0x79,0x8e,0x51,0xf2,0xcb,0x19,0xf5,0x56, +0xed,0x5e,0x29,0xff,0x00,0x0c,0x33,0xe0,0xc5,0xbe,0x13,0x2e,0xa7,0xa9,0x08,0x73, +0x9f,0x29,0x82,0x13,0x8f,0x4c,0xe2,0xbe,0x86,0xf3,0xa8,0xf3,0xaa,0x25,0x4e,0x12, +0xd5,0xa3,0xd2,0xc3,0xe6,0x98,0xcc,0x24,0x79,0x28,0x55,0x71,0x5d,0x8e,0x53,0xc0, +0xff,0x00,0x08,0x7c,0x29,0xf0,0xed,0x55,0xb4,0x8d,0x2e,0x31,0x72,0x00,0x06,0xea, +0x70,0x1e,0x5f,0xcc,0xf4,0xfc,0x31,0x5d,0x93,0x4b,0xb4,0xf1,0x55,0x4c,0x87,0xd6, +0xa3,0x69,0xaa,0xd2,0x51,0xd1,0x1c,0x35,0x6b,0x55,0xc4,0x4b,0x9e,0xac,0x9c,0x9f, +0x76,0x5a,0x69,0x8d,0x40,0xf3,0x1e,0xa6,0xab,0xbc,0xf5,0x5e,0x4b,0x8a,0x66,0x25, +0x99,0x26,0xaa,0xd2,0x4c,0x6a,0xb4,0x97,0x1d,0x6a,0xb4,0x97,0x14,0x01,0x62,0x49, +0xfd,0xf1,0x55,0x64,0x9f,0xde,0xab,0xc9,0x3e,0x7e,0x95,0x04,0x92,0xe6,0x81,0x93, +0x49,0x37,0xbd,0x40,0xd3,0x54,0x2c,0xf8,0xe6,0xa1,0x69,0xaa,0x4a,0x26,0x69,0x2a, +0x27,0x93,0x8e,0xb5,0x03,0x4b,0x51,0x34,0x99,0xa6,0x32,0x56,0x98,0xd4,0x6d,0x26, +0x6a,0x26,0x7a,0x63,0x49,0x40,0x0f,0x67,0xf7,0xa8,0x24,0x7f,0x7a,0x46,0x6a,0x89, +0x9a,0x90,0x03,0x35,0x46,0xcd,0x43,0x35,0x46,0x5a,0x90,0xc5,0x66,0xa8,0x98,0xd2, +0xb1,0xa6,0x33,0x52,0x18,0x6e,0xfc,0x29,0x37,0x0f,0xc6,0xa2,0x2c,0x73,0x4b,0xbb, +0xd2,0xa9,0x12,0xc7,0x93,0xeb,0x4b,0x9f,0x4a,0x8f,0xb5,0x1b,0x88,0xaa,0x24,0x93, +0x34,0x8c,0x69,0xbb,0xe9,0x39,0x38,0xa0,0x62,0xd3,0x37,0x64,0x9a,0x56,0xa6,0xf6, +0xa4,0xc6,0x85,0xaf,0x96,0xff,0x00,0x6f,0x5d,0x71,0x6d,0xfc,0x1f,0xe1,0x9d,0x24, +0x38,0xf3,0x2e,0x6f,0x5e,0xe1,0x93,0xbe,0xd4,0x4c,0x03,0xf9,0xb1,0xaf,0xa8,0xfa, +0x0a,0xf8,0x4b,0xf6,0xe6,0xd7,0x7f,0xb4,0x3e,0x2b,0x69,0xfa,0x70,0x7d,0xcb,0xa7, +0x69,0xca,0x0a,0xe7,0xa3,0x48,0xc5,0x8f,0xe3,0xc0,0xae,0xfc,0x0c,0x79,0xab,0xaf, +0x23,0x9e,0xbc,0xad,0x06,0x7c,0xe7,0x45,0x14,0x57,0xd5,0x1e,0x58,0x51,0x45,0x14, +0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14, +0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14, +0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14, +0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14, +0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x01,0xff,0xd9,}; + +const unsigned int dummy_align__404_html = 3; +const unsigned char data__404_html[] = { +/* /404.html (10 chars) */ +0x2f,0x34,0x30,0x34,0x2e,0x68,0x74,0x6d,0x6c,0x00,0x00,0x00, + +/* HTTP header */ +/* "HTTP/1.0 404 File not found +" (29 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x34,0x30,0x34,0x20,0x46,0x69,0x6c, +0x65,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x0d,0x0a, +/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) +" (63 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, +0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, +0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, +0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, +/* "Content-type: text/html + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, +0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x0d,0x0a, +/* raw file data (1184 bytes) */ +0x3c,0x21,0x44,0x4f,0x43,0x54,0x59,0x50,0x45,0x20,0x48,0x54,0x4d,0x4c,0x20,0x50, +0x55,0x42,0x4c,0x49,0x43,0x20,0x22,0x2d,0x2f,0x2f,0x57,0x33,0x43,0x2f,0x2f,0x44, +0x54,0x44,0x20,0x48,0x54,0x4d,0x4c,0x20,0x34,0x2e,0x30,0x31,0x20,0x54,0x72,0x61, +0x6e,0x73,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x2f,0x2f,0x45,0x4e,0x22,0x3e,0x0a, +0x3c,0x68,0x74,0x6d,0x6c,0x3e,0x3c,0x68,0x65,0x61,0x64,0x3e,0x3c,0x74,0x69,0x74, +0x6c,0x65,0x3e,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x3c,0x2f,0x74,0x69, +0x74,0x6c,0x65,0x3e,0x3c,0x2f,0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x3c,0x62,0x6f, +0x64,0x79,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a, +0x20,0x62,0x6c,0x61,0x63,0x6b,0x3b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75, +0x6e,0x64,0x2d,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77,0x68,0x69,0x74,0x65,0x3b, +0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x64,0x74,0x68, +0x3d,0x22,0x31,0x30,0x30,0x25,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x62,0x6f,0x64,0x79, +0x3e,0x0d,0x0a,0x3c,0x74,0x72,0x20,0x76,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74, +0x6f,0x70,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x77,0x69,0x64,0x74,0x68,0x3d, +0x22,0x38,0x30,0x22,0x3e,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x64,0x69,0x76,0x20, +0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x74,0x65,0x78,0x74,0x2d,0x61,0x6c,0x69,0x67, +0x6e,0x3a,0x20,0x63,0x65,0x6e,0x74,0x65,0x72,0x3b,0x22,0x3e,0x3c,0x69,0x6d,0x67, +0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x39, +0x36,0x70,0x78,0x3b,0x20,0x68,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x36,0x38,0x70, +0x78,0x3b,0x22,0x20,0x61,0x6c,0x74,0x3d,0x22,0x53,0x54,0x20,0x6c,0x6f,0x67,0x6f, +0x22,0x20,0x73,0x72,0x63,0x3d,0x22,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78, +0x5f,0x66,0x69,0x6c,0x65,0x73,0x2f,0x6c,0x6f,0x67,0x6f,0x2e,0x6a,0x70,0x67,0x22, +0x3e,0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a, +0x3c,0x74,0x64,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x35,0x30,0x30,0x22,0x3e, +0x0d,0x0a,0x3c,0x68,0x31,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x35, +0x31,0x2c,0x20,0x35,0x31,0x2c,0x20,0x32,0x35,0x35,0x29,0x3b,0x22,0x3e,0x3c,0x73, +0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x73,0x6d,0x61, +0x6c,0x6c,0x3e,0x3c,0x62,0x69,0x67,0x3e,0x3c,0x62,0x69,0x67,0x3e,0x3c,0x62,0x69, +0x67,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x77,0x65, +0x69,0x67,0x68,0x74,0x3a,0x20,0x62,0x6f,0x6c,0x64,0x3b,0x22,0x3e,0x3c,0x62,0x69, +0x67,0x3e,0x3c,0x73,0x74,0x72,0x6f,0x6e,0x67,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20, +0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x73,0x74,0x79,0x6c, +0x65,0x3a,0x20,0x69,0x74,0x61,0x6c,0x69,0x63,0x3b,0x22,0x3e,0x53,0x54,0x4d,0x33, +0x32,0x48,0x37,0x20,0x57,0x65,0x62,0x73,0x65,0x72,0x76,0x65,0x72,0x20,0x44,0x65, +0x6d,0x6f,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x73,0x74,0x72,0x6f,0x6e, +0x67,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x2f, +0x62,0x69,0x67,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x2f,0x73,0x6d,0x61,0x6c, +0x6c,0x3e,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f,0x73,0x6d,0x61,0x6c, +0x6c,0x3e,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20, +0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67, +0x62,0x28,0x35,0x31,0x2c,0x20,0x35,0x31,0x2c,0x20,0x32,0x35,0x35,0x29,0x3b,0x22, +0x3e,0x0d,0x0a,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c, +0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d, +0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x3c, +0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x62,0x69,0x67,0x3e,0x3c,0x62,0x69,0x67,0x3e, +0x3c,0x62,0x69,0x67,0x3e,0x3c,0x62,0x69,0x67,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d, +0x22,0x66,0x6f,0x6e,0x74,0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x62,0x6f, +0x6c,0x64,0x3b,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x35, +0x31,0x2c,0x20,0x35,0x31,0x2c,0x20,0x32,0x35,0x35,0x29,0x3b,0x22,0x3e,0x3c,0x62, +0x69,0x67,0x3e,0x3c,0x73,0x74,0x72,0x6f,0x6e,0x67,0x3e,0x3c,0x73,0x70,0x61,0x6e, +0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x73,0x74,0x79, +0x6c,0x65,0x3a,0x20,0x69,0x74,0x61,0x6c,0x69,0x63,0x3b,0x22,0x3e,0x3c,0x2f,0x73, +0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x73,0x74,0x72,0x6f,0x6e,0x67,0x3e,0x3c,0x2f,0x62, +0x69,0x67,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22, +0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x35,0x31,0x2c,0x20,0x35, +0x31,0x2c,0x20,0x32,0x35,0x35,0x29,0x3b,0x22,0x3e,0x3c,0x62,0x72,0x3e,0x0d,0x0a, +0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x2f,0x62, +0x69,0x67,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c, +0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c, +0x2f,0x68,0x31,0x3e,0x0d,0x0a,0x3c,0x68,0x32,0x3e,0x34,0x30,0x34,0x20,0x2d,0x20, +0x50,0x61,0x67,0x65,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x3c,0x2f, +0x68,0x32,0x3e,0x0d,0x0a,0x3c,0x70,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74, +0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79, +0x3a,0x20,0x54,0x69,0x6d,0x65,0x73,0x20,0x4e,0x65,0x77,0x20,0x52,0x6f,0x6d,0x61, +0x6e,0x2c,0x54,0x69,0x6d,0x65,0x73,0x2c,0x73,0x65,0x72,0x69,0x66,0x3b,0x22,0x3e, +0x20,0x53,0x6f,0x72,0x72,0x79,0x2c,0x0d,0x0a,0x74,0x68,0x65,0x20,0x70,0x61,0x67, +0x65,0x20,0x79,0x6f,0x75,0x20,0x61,0x72,0x65,0x20,0x72,0x65,0x71,0x75,0x65,0x73, +0x74,0x69,0x6e,0x67,0x20,0x77,0x61,0x73,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75, +0x6e,0x64,0x20,0x6f,0x6e,0x20,0x74,0x68,0x69,0x73,0x20,0x73,0x65,0x72,0x76,0x65, +0x72,0x2e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a, +0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x72,0x3e,0x0d,0x0a,0x3c,0x2f, +0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65,0x3e, +0x0d,0x0a,0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x3c,0x2f,0x68,0x74,0x6d,0x6c,0x3e, +}; + +const unsigned int dummy_align__index_html = 4; +const unsigned char data__index_html[] = { +/* /index.html (12 chars) */ +0x2f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x68,0x74,0x6d,0x6c,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) +" (63 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, +0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, +0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, +0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, +/* "Content-type: text/html + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, +0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x0d,0x0a, +/* raw file data (11530 bytes) */ +0x3c,0x21,0x44,0x4f,0x43,0x54,0x59,0x50,0x45,0x20,0x48,0x54,0x4d,0x4c,0x20,0x50, +0x55,0x42,0x4c,0x49,0x43,0x20,0x22,0x2d,0x2f,0x2f,0x57,0x33,0x43,0x2f,0x2f,0x44, +0x54,0x44,0x20,0x48,0x54,0x4d,0x4c,0x20,0x34,0x2e,0x30,0x31,0x20,0x54,0x72,0x61, +0x6e,0x73,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x2f,0x2f,0x45,0x4e,0x22,0x3e,0x0a, +0x3c,0x68,0x74,0x6d,0x6c,0x20,0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x76,0x3d,0x22,0x75, +0x72,0x6e,0x3a,0x73,0x63,0x68,0x65,0x6d,0x61,0x73,0x2d,0x6d,0x69,0x63,0x72,0x6f, +0x73,0x6f,0x66,0x74,0x2d,0x63,0x6f,0x6d,0x3a,0x76,0x6d,0x6c,0x22,0x20,0x78,0x6d, +0x6c,0x6e,0x73,0x3a,0x6f,0x3d,0x22,0x75,0x72,0x6e,0x3a,0x73,0x63,0x68,0x65,0x6d, +0x61,0x73,0x2d,0x6d,0x69,0x63,0x72,0x6f,0x73,0x6f,0x66,0x74,0x2d,0x63,0x6f,0x6d, +0x3a,0x6f,0x66,0x66,0x69,0x63,0x65,0x3a,0x6f,0x66,0x66,0x69,0x63,0x65,0x22,0x20, +0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x77,0x3d,0x22,0x75,0x72,0x6e,0x3a,0x73,0x63,0x68, +0x65,0x6d,0x61,0x73,0x2d,0x6d,0x69,0x63,0x72,0x6f,0x73,0x6f,0x66,0x74,0x2d,0x63, +0x6f,0x6d,0x3a,0x6f,0x66,0x66,0x69,0x63,0x65,0x3a,0x77,0x6f,0x72,0x64,0x22,0x20, +0x78,0x6d,0x6c,0x6e,0x73,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77, +0x77,0x2e,0x77,0x33,0x2e,0x6f,0x72,0x67,0x2f,0x54,0x52,0x2f,0x52,0x45,0x43,0x2d, +0x68,0x74,0x6d,0x6c,0x34,0x30,0x22,0x3e,0x3c,0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a, +0x3c,0x6d,0x65,0x74,0x61,0x20,0x68,0x74,0x74,0x70,0x2d,0x65,0x71,0x75,0x69,0x76, +0x3d,0x22,0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x54,0x79,0x70,0x65,0x22,0x20, +0x63,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x3d,0x22,0x74,0x65,0x78,0x74,0x2f,0x68,0x74, +0x6d,0x6c,0x3b,0x20,0x63,0x68,0x61,0x72,0x73,0x65,0x74,0x3d,0x69,0x73,0x6f,0x2d, +0x38,0x38,0x35,0x39,0x2d,0x31,0x22,0x3e,0x0d,0x0a,0x3c,0x6c,0x69,0x6e,0x6b,0x20, +0x72,0x65,0x6c,0x3d,0x22,0x46,0x69,0x6c,0x65,0x2d,0x4c,0x69,0x73,0x74,0x22,0x20, +0x68,0x72,0x65,0x66,0x3d,0x22,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x5f, +0x66,0x69,0x6c,0x65,0x73,0x2f,0x66,0x69,0x6c,0x65,0x6c,0x69,0x73,0x74,0x2e,0x78, +0x6d,0x6c,0x22,0x3e,0x0d,0x0a,0x3c,0x6c,0x69,0x6e,0x6b,0x20,0x72,0x65,0x6c,0x3d, +0x22,0x45,0x64,0x69,0x74,0x2d,0x54,0x69,0x6d,0x65,0x2d,0x44,0x61,0x74,0x61,0x22, +0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78, +0x5f,0x66,0x69,0x6c,0x65,0x73,0x2f,0x65,0x64,0x69,0x74,0x64,0x61,0x74,0x61,0x2e, +0x6d,0x73,0x6f,0x22,0x3e,0x3c,0x74,0x69,0x74,0x6c,0x65,0x3e,0x53,0x54,0x4d,0x33, +0x32,0x48,0x37,0x78,0x78,0x3c,0x2f,0x74,0x69,0x74,0x6c,0x65,0x3e,0x3c,0x2f,0x68, +0x65,0x61,0x64,0x3e,0x0d,0x0a,0x3c,0x62,0x6f,0x64,0x79,0x20,0x73,0x74,0x79,0x6c, +0x65,0x3d,0x22,0x22,0x20,0x6c,0x61,0x6e,0x67,0x3d,0x22,0x45,0x4e,0x2d,0x55,0x53, +0x22,0x20,0x6c,0x69,0x6e,0x6b,0x3d,0x22,0x62,0x6c,0x75,0x65,0x22,0x20,0x76,0x6c, +0x69,0x6e,0x6b,0x3d,0x22,0x62,0x6c,0x75,0x65,0x22,0x3e,0x0d,0x0a,0x3c,0x64,0x69, +0x76,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x53,0x65,0x63,0x74,0x69,0x6f,0x6e, +0x31,0x22,0x3e,0x0d,0x0a,0x3c,0x64,0x69,0x76,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d, +0x22,0x6d,0x61,0x72,0x67,0x69,0x6e,0x2d,0x6c,0x65,0x66,0x74,0x3a,0x20,0x33,0x30, +0x70,0x74,0x3b,0x22,0x3e,0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d, +0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x22,0x20,0x73,0x74,0x79,0x6c, +0x65,0x3d,0x22,0x74,0x65,0x78,0x74,0x2d,0x61,0x6c,0x69,0x67,0x6e,0x3a,0x20,0x63, +0x65,0x6e,0x74,0x65,0x72,0x3b,0x22,0x20,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x63, +0x65,0x6e,0x74,0x65,0x72,0x22,0x3e,0x3c,0x69,0x6d,0x67,0x20,0x61,0x6c,0x74,0x3d, +0x22,0x22,0x20,0x69,0x64,0x3d,0x22,0x5f,0x78,0x30,0x30,0x30,0x30,0x5f,0x69,0x31, +0x30,0x32,0x35,0x22,0x20,0x73,0x72,0x63,0x3d,0x22,0x53,0x54,0x4d,0x33,0x32,0x48, +0x37,0x78,0x78,0x5f,0x66,0x69,0x6c,0x65,0x73,0x2f,0x53,0x54,0x2e,0x67,0x69,0x66, +0x22,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x62,0x6f,0x72,0x64,0x65,0x72,0x3a, +0x20,0x30,0x70,0x78,0x20,0x73,0x6f,0x6c,0x69,0x64,0x20,0x3b,0x20,0x68,0x65,0x69, +0x67,0x68,0x74,0x3a,0x20,0x35,0x38,0x70,0x78,0x3b,0x20,0x77,0x69,0x64,0x74,0x68, +0x3a,0x20,0x37,0x36,0x36,0x70,0x78,0x3b,0x22,0x3e,0x3c,0x62,0x3e,0x3c,0x69,0x3e, +0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e, +0x74,0x2d,0x73,0x69,0x7a,0x65,0x3a,0x20,0x32,0x34,0x70,0x74,0x3b,0x22,0x3e,0x3c, +0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x73,0x74,0x72,0x6f,0x6e,0x67,0x3e,0x53,0x54,0x4d, +0x33,0x32,0x48,0x37,0x78,0x78,0x20,0x57,0x65,0x62,0x73,0x65,0x72,0x76,0x65,0x72, +0x20,0x44,0x65,0x6d,0x6f,0x3c,0x2f,0x73,0x74,0x72,0x6f,0x6e,0x67,0x3e,0x3c,0x2f, +0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x69,0x3e,0x3c,0x2f,0x62,0x3e,0x3c,0x73,0x70, +0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x73, +0x69,0x7a,0x65,0x3a,0x20,0x31,0x33,0x2e,0x35,0x70,0x74,0x3b,0x22,0x3e,0x20,0x3c, +0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x62,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73, +0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x73,0x69,0x7a,0x65,0x3a, +0x20,0x31,0x38,0x70,0x74,0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69, +0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x20,0x63,0x6f,0x6c, +0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x35,0x31,0x2c,0x20,0x35,0x31,0x2c,0x20, +0x32,0x35,0x35,0x29,0x3b,0x22,0x3e,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x42,0x61,0x73, +0x65,0x64,0x20,0x6f,0x6e,0x20,0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x20,0x54, +0x43,0x50,0x2f,0x49,0x50,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x3c,0x2f,0x73,0x70, +0x61,0x6e,0x3e,0x3c,0x2f,0x62,0x3e,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x64,0x69, +0x76,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d, +0x61,0x6c,0x22,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x74,0x65,0x78,0x74,0x2d, +0x61,0x6c,0x69,0x67,0x6e,0x3a,0x20,0x63,0x65,0x6e,0x74,0x65,0x72,0x3b,0x22,0x20, +0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x63,0x65,0x6e,0x74,0x65,0x72,0x22,0x3e,0x0d, +0x0a,0x3c,0x68,0x72,0x20,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x63,0x65,0x6e,0x74, +0x65,0x72,0x22,0x20,0x73,0x69,0x7a,0x65,0x3d,0x22,0x32,0x22,0x20,0x77,0x69,0x64, +0x74,0x68,0x3d,0x22,0x31,0x30,0x30,0x25,0x22,0x3e,0x3c,0x2f,0x64,0x69,0x76,0x3e, +0x0d,0x0a,0x3c,0x64,0x69,0x76,0x20,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x63,0x65, +0x6e,0x74,0x65,0x72,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x63, +0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x54, +0x61,0x62,0x6c,0x65,0x22,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x77,0x69,0x64, +0x74,0x68,0x3a,0x20,0x37,0x32,0x30,0x2e,0x37,0x35,0x70,0x74,0x3b,0x22,0x20,0x62, +0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x31,0x22,0x20,0x63,0x65,0x6c,0x6c,0x70,0x61, +0x64,0x64,0x69,0x6e,0x67,0x3d,0x22,0x30,0x22,0x20,0x77,0x69,0x64,0x74,0x68,0x3d, +0x22,0x39,0x36,0x31,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d, +0x0a,0x3c,0x74,0x72,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x22,0x3e,0x0d,0x0a, +0x3c,0x74,0x64,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x70,0x61,0x64,0x64,0x69, +0x6e,0x67,0x3a,0x20,0x31,0x2e,0x35,0x70,0x74,0x3b,0x20,0x62,0x61,0x63,0x6b,0x67, +0x72,0x6f,0x75,0x6e,0x64,0x3a,0x20,0x72,0x67,0x62,0x28,0x35,0x31,0x2c,0x20,0x35, +0x31,0x2c,0x20,0x32,0x35,0x35,0x29,0x20,0x6e,0x6f,0x6e,0x65,0x20,0x72,0x65,0x70, +0x65,0x61,0x74,0x20,0x73,0x63,0x72,0x6f,0x6c,0x6c,0x20,0x30,0x25,0x20,0x35,0x30, +0x25,0x3b,0x20,0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75, +0x6e,0x64,0x2d,0x63,0x6c,0x69,0x70,0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c, +0x3b,0x20,0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e, +0x64,0x2d,0x6f,0x72,0x69,0x67,0x69,0x6e,0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61, +0x6c,0x3b,0x20,0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75, +0x6e,0x64,0x2d,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x2d,0x70,0x6f,0x6c,0x69,0x63,0x79, +0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x3b,0x20,0x74,0x65,0x78,0x74,0x2d, +0x61,0x6c,0x69,0x67,0x6e,0x3a,0x20,0x63,0x65,0x6e,0x74,0x65,0x72,0x3b,0x22,0x3e, +0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e, +0x6f,0x72,0x6d,0x61,0x6c,0x22,0x3e,0x3c,0x62,0x3e,0x3c,0x69,0x3e,0x3c,0x73,0x70, +0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x73, +0x69,0x7a,0x65,0x3a,0x20,0x31,0x30,0x70,0x74,0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d, +0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b, +0x22,0x3e,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x2f,0x69,0x6e,0x64,0x65, +0x78,0x2e,0x68,0x74,0x6d,0x6c,0x22,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74, +0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77,0x68,0x69,0x74, +0x65,0x3b,0x22,0x3e,0x48,0x6f,0x6d,0x65,0x0d,0x0a,0x70,0x61,0x67,0x65,0x3c,0x2f, +0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x61,0x3e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e, +0x3c,0x2f,0x69,0x3e,0x3c,0x2f,0x62,0x3e,0x3c,0x62,0x3e,0x3c,0x69,0x3e,0x3c,0x73, +0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d, +0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b, +0x22,0x3e,0x3c,0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x73, +0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x69,0x3e,0x3c,0x2f,0x62,0x3e,0x3c,0x2f,0x70,0x3e, +0x0d,0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3a,0x20,0x31,0x2e,0x35, +0x70,0x74,0x3b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x3a,0x20, +0x72,0x67,0x62,0x28,0x35,0x31,0x2c,0x20,0x35,0x31,0x2c,0x20,0x32,0x35,0x35,0x29, +0x20,0x6e,0x6f,0x6e,0x65,0x20,0x72,0x65,0x70,0x65,0x61,0x74,0x20,0x73,0x63,0x72, +0x6f,0x6c,0x6c,0x20,0x30,0x25,0x20,0x35,0x30,0x25,0x3b,0x20,0x2d,0x6d,0x6f,0x7a, +0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x63,0x6c,0x69,0x70, +0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x3b,0x20,0x2d,0x6d,0x6f,0x7a,0x2d, +0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x6f,0x72,0x69,0x67,0x69, +0x6e,0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x3b,0x20,0x2d,0x6d,0x6f,0x7a, +0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x69,0x6e,0x6c,0x69, +0x6e,0x65,0x2d,0x70,0x6f,0x6c,0x69,0x63,0x79,0x3a,0x20,0x69,0x6e,0x69,0x74,0x69, +0x61,0x6c,0x3b,0x20,0x74,0x65,0x78,0x74,0x2d,0x61,0x6c,0x69,0x67,0x6e,0x3a,0x20, +0x63,0x65,0x6e,0x74,0x65,0x72,0x3b,0x22,0x3e,0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c, +0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x22,0x3e, +0x3c,0x62,0x3e,0x3c,0x69,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c, +0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x73,0x69,0x7a,0x65,0x3a,0x20,0x31,0x30, +0x70,0x74,0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a, +0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x3c,0x61,0x20,0x68,0x72, +0x65,0x66,0x3d,0x22,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x4c,0x45,0x44, +0x2e,0x68,0x74,0x6d,0x6c,0x22,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77,0x68,0x69,0x74,0x65, +0x3b,0x22,0x3e,0x26,0x6e,0x62,0x73,0x70,0x3b,0x4c,0x65,0x64,0x0d,0x0a,0x63,0x6f, +0x6e,0x74,0x72,0x6f,0x6c,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x61,0x3e, +0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x69,0x3e,0x3c,0x2f,0x62,0x3e,0x3c, +0x62,0x3e,0x3c,0x69,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65, +0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56, +0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x3c,0x6f,0x3a,0x70,0x3e,0x3c,0x2f, +0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x69,0x3e,0x3c, +0x2f,0x62,0x3e,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a, +0x3c,0x74,0x64,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x70,0x61,0x64,0x64,0x69, +0x6e,0x67,0x3a,0x20,0x31,0x2e,0x35,0x70,0x74,0x3b,0x20,0x62,0x61,0x63,0x6b,0x67, +0x72,0x6f,0x75,0x6e,0x64,0x3a,0x20,0x72,0x67,0x62,0x28,0x35,0x31,0x2c,0x20,0x35, +0x31,0x2c,0x20,0x32,0x35,0x35,0x29,0x20,0x6e,0x6f,0x6e,0x65,0x20,0x72,0x65,0x70, +0x65,0x61,0x74,0x20,0x73,0x63,0x72,0x6f,0x6c,0x6c,0x20,0x30,0x25,0x20,0x35,0x30, +0x25,0x3b,0x20,0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75, +0x6e,0x64,0x2d,0x63,0x6c,0x69,0x70,0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c, +0x3b,0x20,0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e, +0x64,0x2d,0x6f,0x72,0x69,0x67,0x69,0x6e,0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61, +0x6c,0x3b,0x20,0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75, +0x6e,0x64,0x2d,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x2d,0x70,0x6f,0x6c,0x69,0x63,0x79, +0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x3b,0x20,0x74,0x65,0x78,0x74,0x2d, +0x61,0x6c,0x69,0x67,0x6e,0x3a,0x20,0x63,0x65,0x6e,0x74,0x65,0x72,0x3b,0x22,0x3e, +0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e, +0x6f,0x72,0x6d,0x61,0x6c,0x22,0x3e,0x3c,0x62,0x3e,0x3c,0x69,0x3e,0x3c,0x73,0x70, +0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x73, +0x69,0x7a,0x65,0x3a,0x20,0x31,0x30,0x70,0x74,0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d, +0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b, +0x22,0x3e,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x53,0x54,0x4d,0x33,0x32, +0x48,0x37,0x78,0x78,0x41,0x44,0x43,0x2e,0x73,0x68,0x74,0x6d,0x6c,0x22,0x3e,0x3c, +0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f, +0x72,0x3a,0x20,0x77,0x68,0x69,0x74,0x65,0x3b,0x22,0x3e,0x41,0x44,0x43,0x0d,0x0a, +0x73,0x74,0x61,0x74,0x75,0x73,0x20,0x62,0x61,0x72,0x3c,0x2f,0x73,0x70,0x61,0x6e, +0x3e,0x3c,0x2f,0x61,0x3e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x69,0x3e, +0x3c,0x2f,0x62,0x3e,0x3c,0x62,0x3e,0x3c,0x69,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20, +0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69, +0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x3c,0x6f, +0x3a,0x70,0x3e,0x3c,0x2f,0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e, +0x3c,0x2f,0x69,0x3e,0x3c,0x2f,0x62,0x3e,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x2f, +0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x72,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x62, +0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65,0x3e,0x0d,0x0a, +0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0d,0x0a,0x3c,0x64,0x69,0x76,0x20,0x61,0x6c,0x69, +0x67,0x6e,0x3d,0x22,0x63,0x65,0x6e,0x74,0x65,0x72,0x22,0x3e,0x0d,0x0a,0x3c,0x74, +0x61,0x62,0x6c,0x65,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e, +0x6f,0x72,0x6d,0x61,0x6c,0x54,0x61,0x62,0x6c,0x65,0x22,0x20,0x73,0x74,0x79,0x6c, +0x65,0x3d,0x22,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x3a,0x20,0x77, +0x68,0x69,0x74,0x65,0x20,0x6e,0x6f,0x6e,0x65,0x20,0x72,0x65,0x70,0x65,0x61,0x74, +0x20,0x73,0x63,0x72,0x6f,0x6c,0x6c,0x20,0x30,0x25,0x20,0x35,0x30,0x25,0x3b,0x20, +0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d, +0x63,0x6c,0x69,0x70,0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x3b,0x20,0x2d, +0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x6f, +0x72,0x69,0x67,0x69,0x6e,0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x3b,0x20, +0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d, +0x69,0x6e,0x6c,0x69,0x6e,0x65,0x2d,0x70,0x6f,0x6c,0x69,0x63,0x79,0x3a,0x20,0x69, +0x6e,0x69,0x74,0x69,0x61,0x6c,0x3b,0x20,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x35, +0x37,0x34,0x2e,0x35,0x70,0x74,0x3b,0x22,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d, +0x22,0x30,0x22,0x20,0x63,0x65,0x6c,0x6c,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3d, +0x22,0x30,0x22,0x20,0x63,0x65,0x6c,0x6c,0x73,0x70,0x61,0x63,0x69,0x6e,0x67,0x3d, +0x22,0x30,0x22,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x37,0x36,0x36,0x22,0x3e, +0x0d,0x0a,0x3c,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x74,0x72,0x20,0x73, +0x74,0x79,0x6c,0x65,0x3d,0x22,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x73,0x74, +0x79,0x6c,0x65,0x3d,0x22,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3a,0x20,0x30,0x63, +0x6d,0x3b,0x22,0x20,0x76,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22, +0x3e,0x0d,0x0a,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d, +0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x54,0x61,0x62,0x6c,0x65,0x22, +0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x31, +0x30,0x30,0x25,0x3b,0x22,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x30,0x22, +0x20,0x63,0x65,0x6c,0x6c,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3d,0x22,0x30,0x22, +0x20,0x63,0x65,0x6c,0x6c,0x73,0x70,0x61,0x63,0x69,0x6e,0x67,0x3d,0x22,0x30,0x22, +0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x31,0x30,0x30,0x25,0x22,0x3e,0x0d,0x0a, +0x3c,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x74,0x72,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x73,0x74,0x79,0x6c, +0x65,0x3d,0x22,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3a,0x20,0x32,0x2e,0x32,0x35, +0x70,0x74,0x3b,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x73,0x74, +0x79,0x6c,0x65,0x3d,0x22,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x39,0x34,0x33,0x70, +0x78,0x3b,0x20,0x68,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x31,0x39,0x36,0x70,0x78, +0x3b,0x22,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x30,0x22,0x20,0x63,0x65, +0x6c,0x6c,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3d,0x22,0x33,0x22,0x20,0x63,0x65, +0x6c,0x6c,0x73,0x70,0x61,0x63,0x69,0x6e,0x67,0x3d,0x22,0x30,0x22,0x3e,0x0d,0x0a, +0x3c,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x74,0x72,0x3e,0x0d,0x0a,0x3c, +0x74,0x64,0x20,0x76,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22,0x20, +0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x37,0x32,0x25,0x22,0x3e,0x0d,0x0a,0x3c,0x68, +0x31,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63, +0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x35,0x31,0x2c,0x20,0x35,0x31, +0x2c,0x20,0x32,0x35,0x35,0x29,0x3b,0x22,0x3e,0x53,0x54,0x4d,0x33,0x32,0x48,0x37, +0x0d,0x0a,0x53,0x65,0x72,0x69,0x65,0x73,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c, +0x2f,0x68,0x31,0x3e,0x0d,0x0a,0x3c,0x70,0x3e,0x54,0x68,0x65,0x20,0x53,0x54,0x4d, +0x33,0x32,0x48,0x37,0x78,0x78,0x20,0x64,0x65,0x76,0x69,0x63,0x65,0x73,0x20,0x61, +0x72,0x65,0x20,0x62,0x61,0x73,0x65,0x64,0x20,0x6f,0x6e,0x20,0x74,0x68,0x65,0x20, +0x68,0x69,0x67,0x68,0x0d,0x0a,0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63, +0x65,0x20,0x41,0x52,0x4d,0xae,0x20,0x43,0x6f,0x72,0x74,0x65,0x78,0xae,0x2d,0x4d, +0x37,0x20,0x33,0x32,0x2d,0x62,0x69,0x74,0x20,0x52,0x49,0x53,0x43,0x20,0x63,0x6f, +0x72,0x65,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x69,0x6e,0x67,0x20,0x75,0x70,0x20, +0x74,0x6f,0x20,0x34,0x30,0x30,0x20,0x4d,0x48,0x7a,0x0d,0x0a,0x66,0x72,0x65,0x71, +0x75,0x65,0x6e,0x63,0x79,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c, +0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x22,0x3e, +0x54,0x61,0x6b,0x69,0x6e,0x67,0x26,0x6e,0x62,0x73,0x70,0x3b,0x61,0x64,0x76,0x61, +0x6e,0x74,0x61,0x67,0x65,0x0d,0x0a,0x6f,0x66,0x20,0x61,0x6e,0x20,0x4c,0x31,0x20, +0x63,0x61,0x63,0x68,0x65,0x2c,0x20,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x20,0x64, +0x65,0x76,0x69,0x63,0x65,0x73,0x20,0x64,0x65,0x6c,0x69,0x76,0x65,0x72,0x20,0x74, +0x68,0x65,0x20,0x6d,0x61,0x78,0x69,0x6d,0x75,0x6d,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x0d,0x0a,0x74,0x68,0x65,0x6f,0x72,0x65,0x74,0x69,0x63,0x61,0x6c,0x20,0x70,0x65, +0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65,0x20,0x6f,0x66,0x20,0x74,0x68,0x65, +0x20,0x43,0x6f,0x72,0x74,0x65,0x78,0x2d,0x4d,0x37,0x20,0x63,0x6f,0x72,0x65,0x2c, +0x20,0x72,0x65,0x67,0x61,0x72,0x64,0x6c,0x65,0x73,0x73,0x20,0x69,0x66,0x20,0x63, +0x6f,0x64,0x65,0x20,0x69,0x73,0x0d,0x0a,0x65,0x78,0x65,0x63,0x75,0x74,0x65,0x64, +0x20,0x66,0x72,0x6f,0x6d,0x20,0x65,0x6d,0x62,0x65,0x64,0x64,0x65,0x64,0x20,0x46, +0x6c,0x61,0x73,0x68,0x20,0x6f,0x72,0x20,0x65,0x78,0x74,0x65,0x72,0x6e,0x61,0x6c, +0x20,0x6d,0x65,0x6d,0x6f,0x72,0x79,0x3a,0x20,0x32,0x30,0x31,0x30,0x20,0x43,0x6f, +0x72,0x65,0x4d,0x61,0x72,0x6b,0x20,0x2f,0x38,0x35,0x36,0x0d,0x0a,0x44,0x4d,0x49, +0x50,0x53,0x20,0x61,0x74,0x20,0x34,0x30,0x30,0x20,0x4d,0x48,0x7a,0x20,0x46,0x63, +0x70,0x75,0x3c,0x62,0x69,0x67,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x33, +0x34,0x2c,0x20,0x33,0x34,0x2c,0x20,0x33,0x34,0x29,0x3b,0x20,0x66,0x6f,0x6e,0x74, +0x2d,0x73,0x69,0x7a,0x65,0x3a,0x20,0x31,0x34,0x70,0x78,0x3b,0x20,0x66,0x6f,0x6e, +0x74,0x2d,0x73,0x74,0x79,0x6c,0x65,0x3a,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b, +0x20,0x66,0x6f,0x6e,0x74,0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x6e,0x6f, +0x72,0x6d,0x61,0x6c,0x3b,0x20,0x6c,0x65,0x74,0x74,0x65,0x72,0x2d,0x73,0x70,0x61, +0x63,0x69,0x6e,0x67,0x3a,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x20,0x6f,0x72, +0x70,0x68,0x61,0x6e,0x73,0x3a,0x20,0x32,0x3b,0x20,0x74,0x65,0x78,0x74,0x2d,0x61, +0x6c,0x69,0x67,0x6e,0x3a,0x20,0x73,0x74,0x61,0x72,0x74,0x3b,0x20,0x74,0x65,0x78, +0x74,0x2d,0x69,0x6e,0x64,0x65,0x6e,0x74,0x3a,0x20,0x30,0x70,0x78,0x3b,0x20,0x74, +0x65,0x78,0x74,0x2d,0x74,0x72,0x61,0x6e,0x73,0x66,0x6f,0x72,0x6d,0x3a,0x20,0x6e, +0x6f,0x6e,0x65,0x3b,0x20,0x77,0x68,0x69,0x74,0x65,0x2d,0x73,0x70,0x61,0x63,0x65, +0x3a,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x20,0x77,0x69,0x64,0x6f,0x77,0x73, +0x3a,0x20,0x32,0x3b,0x20,0x77,0x6f,0x72,0x64,0x2d,0x73,0x70,0x61,0x63,0x69,0x6e, +0x67,0x3a,0x20,0x30,0x70,0x78,0x3b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75, +0x6e,0x64,0x2d,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x32,0x35, +0x35,0x2c,0x20,0x32,0x35,0x35,0x2c,0x20,0x32,0x35,0x35,0x29,0x3b,0x20,0x64,0x69, +0x73,0x70,0x6c,0x61,0x79,0x3a,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x21,0x20, +0x69,0x6d,0x70,0x6f,0x72,0x74,0x61,0x6e,0x74,0x3b,0x20,0x66,0x6c,0x6f,0x61,0x74, +0x3a,0x20,0x6e,0x6f,0x6e,0x65,0x3b,0x22,0x3e,0x2e,0x3c,0x2f,0x73,0x70,0x61,0x6e, +0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x73,0x69,0x7a,0x65,0x3a,0x20,0x31, +0x30,0x70,0x74,0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79, +0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x3c,0x62,0x72,0x3e, +0x0d,0x0a,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c, +0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x77,0x69,0x64,0x74,0x68,0x3d, +0x22,0x32,0x25,0x22,0x3e,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20, +0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x72,0x69,0x67,0x68,0x74,0x22,0x20,0x76,0x61, +0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22,0x20,0x77,0x69,0x64,0x74,0x68, +0x3d,0x22,0x32,0x36,0x25,0x22,0x3e,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x62,0x72, +0x3e,0x0d,0x0a,0x3c,0x69,0x6d,0x67,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x68, +0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x31,0x38,0x30,0x70,0x78,0x3b,0x20,0x77,0x69, +0x64,0x74,0x68,0x3a,0x20,0x34,0x30,0x30,0x70,0x78,0x3b,0x22,0x20,0x61,0x6c,0x74, +0x3d,0x22,0x22,0x20,0x73,0x72,0x63,0x3d,0x22,0x53,0x54,0x4d,0x33,0x32,0x48,0x37, +0x78,0x78,0x5f,0x66,0x69,0x6c,0x65,0x73,0x2f,0x73,0x74,0x6d,0x33,0x32,0x2e,0x6a, +0x70,0x67,0x22,0x3e,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x72,0x3e, +0x0d,0x0a,0x3c,0x2f,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x61, +0x62,0x6c,0x65,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74, +0x72,0x3e,0x0d,0x0a,0x3c,0x74,0x72,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x22, +0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x70,0x61, +0x64,0x64,0x69,0x6e,0x67,0x3a,0x20,0x32,0x2e,0x32,0x35,0x70,0x74,0x3b,0x22,0x3e, +0x0d,0x0a,0x54,0x68,0x65,0x20,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x20,0x73,0x65, +0x72,0x69,0x65,0x73,0x20,0x75,0x6e,0x6c,0x65,0x61,0x73,0x68,0x65,0x73,0x20,0x74, +0x68,0x65,0x20,0x43,0x6f,0x72,0x74,0x65,0x78,0x2d,0x4d,0x37,0x20,0x63,0x6f,0x72, +0x65,0x3a,0x0d,0x0a,0x3c,0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x6c,0x69,0x3e,0x41,0x58, +0x49,0x20,0x61,0x6e,0x64,0x20,0x6d,0x75,0x6c,0x74,0x69,0x2d,0x41,0x48,0x42,0x20, +0x62,0x75,0x73,0x20,0x6d,0x61,0x74,0x72,0x69,0x78,0x65,0x73,0x20,0x66,0x6f,0x72, +0x0d,0x0a,0x69,0x6e,0x74,0x65,0x72,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x69,0x6e, +0x67,0x20,0x63,0x6f,0x72,0x65,0x2c,0x20,0x70,0x65,0x72,0x69,0x70,0x68,0x65,0x72, +0x61,0x6c,0x73,0x20,0x61,0x6e,0x64,0x20,0x6d,0x65,0x6d,0x6f,0x72,0x69,0x65,0x73, +0x3c,0x2f,0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x2f,0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x75, +0x6c,0x3e,0x0d,0x0a,0x3c,0x6c,0x69,0x3e,0x31,0x36,0x20,0x4b,0x62,0x79,0x74,0x65, +0x73,0x20,0x2b,0x31,0x36,0x20,0x4b,0x62,0x79,0x74,0x65,0x73,0x20,0x6f,0x66,0x20, +0x49,0x2d,0x63,0x61,0x63,0x68,0x65,0x20,0x61,0x6e,0x64,0x20,0x44,0x2d,0x63,0x61, +0x63,0x68,0x65,0x0d,0x0a,0x3c,0x2f,0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x2f,0x75,0x6c, +0x3e,0x0d,0x0a,0x3c,0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x6c,0x69,0x3e,0x55,0x70,0x20, +0x74,0x6f,0x20,0x32,0x20,0x4d,0x62,0x79,0x74,0x65,0x73,0x20,0x6f,0x66,0x20,0x65, +0x6d,0x62,0x65,0x64,0x64,0x65,0x64,0x20,0x64,0x75,0x61,0x6c,0x2d,0x62,0x61,0x6e, +0x6b,0x20,0x46,0x6c,0x61,0x73,0x68,0x0d,0x0a,0x6d,0x65,0x6d,0x6f,0x72,0x79,0x2c, +0x20,0x77,0x69,0x74,0x68,0x20,0x45,0x43,0x43,0x20,0x61,0x6e,0x64,0x20,0x52,0x65, +0x61,0x64,0x2d,0x57,0x68,0x69,0x6c,0x65,0x2d,0x57,0x72,0x69,0x74,0x65,0x20,0x63, +0x61,0x70,0x61,0x62,0x69,0x6c,0x69,0x74,0x79,0x3c,0x2f,0x6c,0x69,0x3e,0x0d,0x0a, +0x3c,0x2f,0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x6c,0x69, +0x3e,0x41,0x20,0x68,0x69,0x67,0x68,0x2d,0x73,0x70,0x65,0x65,0x64,0x20,0x6d,0x61, +0x73,0x74,0x65,0x72,0x20,0x64,0x69,0x72,0x65,0x63,0x74,0x20,0x6d,0x65,0x6d,0x6f, +0x72,0x79,0x20,0x61,0x63,0x63,0x65,0x73,0x73,0x20,0x28,0x4d,0x44,0x4d,0x41,0x29, +0x0d,0x0a,0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x6c,0x65,0x72,0x2c,0x20,0x74,0x77, +0x6f,0x20,0x64,0x75,0x61,0x6c,0x2d,0x70,0x6f,0x72,0x74,0x20,0x44,0x4d,0x41,0x73, +0x20,0x77,0x69,0x74,0x68,0x20,0x46,0x49,0x46,0x4f,0x20,0x61,0x6e,0x64,0x20,0x72, +0x65,0x71,0x75,0x65,0x73,0x74,0x20,0x72,0x6f,0x75,0x74,0x65,0x72,0x0d,0x0a,0x63, +0x61,0x70,0x61,0x62,0x69,0x6c,0x69,0x74,0x69,0x65,0x73,0x20,0x66,0x6f,0x72,0x20, +0x6f,0x70,0x74,0x69,0x6d,0x61,0x6c,0x20,0x70,0x65,0x72,0x69,0x70,0x68,0x65,0x72, +0x61,0x6c,0x20,0x6d,0x61,0x6e,0x61,0x67,0x65,0x6d,0x65,0x6e,0x74,0x2c,0x20,0x61, +0x6e,0x64,0x20,0x6f,0x6e,0x65,0x20,0x61,0x64,0x64,0x69,0x74,0x69,0x6f,0x6e,0x61, +0x6c,0x20,0x44,0x4d,0x41,0x3c,0x2f,0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x2f,0x75,0x6c, +0x3e,0x0d,0x0a,0x3c,0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x6c,0x69,0x3e,0x43,0x68,0x72, +0x6f,0x6d,0x2d,0x41,0x52,0x54,0x20,0x61,0x63,0x63,0x65,0x6c,0x65,0x72,0x61,0x74, +0x69,0x6f,0x6e,0x20,0x66,0x6f,0x72,0x20,0x65,0x66,0x66,0x69,0x63,0x69,0x65,0x6e, +0x74,0x20,0x32,0x44,0x20,0x69,0x6d,0x61,0x67,0x65,0x0d,0x0a,0x63,0x6f,0x70,0x79, +0x20,0x61,0x6e,0x64,0x20,0x64,0x6f,0x75,0x62,0x6c,0x65,0x2d,0x70,0x72,0x65,0x63, +0x69,0x73,0x69,0x6f,0x6e,0x20,0x46,0x50,0x55,0x20,0x61,0x72,0x65,0x20,0x61,0x6c, +0x73,0x6f,0x20,0x70,0x61,0x72,0x74,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x61, +0x63,0x63,0x65,0x6c,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e,0x0d,0x0a,0x66,0x65,0x61, +0x74,0x75,0x72,0x65,0x73,0x20,0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,0x20, +0x69,0x6e,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x76,0x69,0x63,0x65,0x3c,0x2f,0x6c, +0x69,0x3e,0x0d,0x0a,0x3c,0x2f,0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x75,0x6c,0x3e,0x0d, +0x0a,0x3c,0x6c,0x69,0x3e,0x50,0x65,0x72,0x69,0x70,0x68,0x65,0x72,0x61,0x6c,0x20, +0x73,0x70,0x65,0x65,0x64,0x20,0x69,0x6e,0x64,0x65,0x70,0x65,0x6e,0x64,0x65,0x6e, +0x74,0x20,0x66,0x72,0x6f,0x6d,0x20,0x43,0x50,0x55,0x20,0x73,0x70,0x65,0x65,0x64, +0x0d,0x0a,0x28,0x64,0x75,0x61,0x6c,0x2d,0x63,0x6c,0x6f,0x63,0x6b,0x20,0x73,0x75, +0x70,0x70,0x6f,0x72,0x74,0x29,0x20,0x61,0x6c,0x6c,0x6f,0x77,0x69,0x6e,0x67,0x20, +0x73,0x79,0x73,0x74,0x65,0x6d,0x20,0x63,0x6c,0x6f,0x63,0x6b,0x20,0x63,0x68,0x61, +0x6e,0x67,0x65,0x73,0x20,0x77,0x69,0x74,0x68,0x6f,0x75,0x74,0x20,0x61,0x6e,0x79, +0x20,0x69,0x6d,0x70,0x61,0x63,0x74,0x0d,0x0a,0x6f,0x6e,0x20,0x70,0x65,0x72,0x69, +0x70,0x68,0x65,0x72,0x61,0x6c,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e, +0x73,0x3c,0x2f,0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x2f,0x75,0x6c,0x3e,0x0d,0x0a,0x3c, +0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x6c,0x69,0x3e,0x45,0x76,0x65,0x6e,0x20,0x6d,0x6f, +0x72,0x65,0x20,0x70,0x65,0x72,0x69,0x70,0x68,0x65,0x72,0x61,0x6c,0x73,0x2c,0x20, +0x73,0x75,0x63,0x68,0x20,0x61,0x73,0x20,0x66,0x6f,0x75,0x72,0x20,0x73,0x65,0x72, +0x69,0x61,0x6c,0x0d,0x0a,0x61,0x75,0x64,0x69,0x6f,0x20,0x69,0x6e,0x74,0x65,0x72, +0x66,0x61,0x63,0x65,0x73,0x20,0x28,0x53,0x41,0x49,0x29,0x20,0x77,0x69,0x74,0x68, +0x20,0x53,0x50,0x44,0x49,0x46,0x20,0x6f,0x75,0x74,0x70,0x75,0x74,0x20,0x73,0x75, +0x70,0x70,0x6f,0x72,0x74,0x2c,0x20,0x74,0x68,0x72,0x65,0x65,0x20,0x66,0x75,0x6c, +0x6c,0x2d,0x64,0x75,0x70,0x6c,0x65,0x78,0x20,0x49,0xb2,0x53,0x0d,0x0a,0x69,0x6e, +0x74,0x65,0x72,0x66,0x61,0x63,0x65,0x73,0x2c,0x20,0x61,0x20,0x53,0x50,0x44,0x49, +0x46,0x20,0x69,0x6e,0x70,0x75,0x74,0x20,0x69,0x6e,0x74,0x65,0x72,0x66,0x61,0x63, +0x65,0x20,0x73,0x75,0x70,0x70,0x6f,0x72,0x74,0x69,0x6e,0x67,0x20,0x66,0x6f,0x75, +0x72,0x20,0x69,0x6e,0x70,0x75,0x74,0x73,0x2c,0x20,0x74,0x77,0x6f,0x20,0x55,0x53, +0x42,0x20,0x4f,0x54,0x47,0x0d,0x0a,0x77,0x69,0x74,0x68,0x20,0x64,0x65,0x64,0x69, +0x63,0x61,0x74,0x65,0x64,0x20,0x70,0x6f,0x77,0x65,0x72,0x20,0x73,0x75,0x70,0x70, +0x6c,0x79,0x20,0x61,0x6e,0x64,0x20,0x44,0x75,0x61,0x6c,0x2d,0x6d,0x6f,0x64,0x65, +0x20,0x51,0x75,0x61,0x64,0x2d,0x53,0x50,0x49,0x20,0x69,0x6e,0x74,0x65,0x72,0x66, +0x61,0x63,0x65,0x2c,0x20,0x74,0x77,0x6f,0x0d,0x0a,0x46,0x44,0x2d,0x43,0x41,0x4e, +0x20,0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x6c,0x65,0x72,0x73,0x2c,0x20,0x61,0x20, +0x68,0x69,0x67,0x68,0x2d,0x72,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,0x6e,0x20, +0x74,0x69,0x6d,0x65,0x72,0x2c,0x20,0x61,0x20,0x54,0x46,0x54,0x2d,0x4c,0x43,0x44, +0x20,0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x6c,0x65,0x72,0x2c,0x20,0x61,0x0d,0x0a, +0x4a,0x50,0x45,0x47,0x20,0x63,0x6f,0x64,0x65,0x63,0x2c,0x20,0x74,0x77,0x6f,0x20, +0x53,0x44,0x49,0x4f,0x20,0x69,0x6e,0x74,0x65,0x72,0x66,0x61,0x63,0x65,0x73,0x20, +0x61,0x6e,0x64,0x20,0x6d,0x61,0x6e,0x79,0x20,0x6f,0x74,0x68,0x65,0x72,0x20,0x61, +0x6e,0x61,0x6c,0x6f,0x67,0x20,0x70,0x65,0x72,0x69,0x70,0x68,0x65,0x72,0x61,0x6c, +0x73,0x0d,0x0a,0x69,0x6e,0x63,0x6c,0x75,0x64,0x69,0x6e,0x67,0x20,0x74,0x68,0x72, +0x65,0x65,0x20,0x66,0x61,0x73,0x74,0x20,0x31,0x34,0x2d,0x62,0x69,0x74,0x20,0x41, +0x44,0x43,0x73,0x2c,0x20,0x74,0x77,0x6f,0x20,0x63,0x6f,0x6d,0x70,0x61,0x72,0x61, +0x74,0x6f,0x72,0x73,0x20,0x61,0x6e,0x64,0x20,0x74,0x77,0x6f,0x20,0x6f,0x70,0x65, +0x72,0x61,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x0d,0x0a,0x61,0x6d,0x70,0x6c,0x69,0x66, +0x69,0x65,0x72,0x73,0x2e,0x3c,0x2f,0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x6c,0x69,0x3e, +0x31,0x20,0x4d,0x62,0x79,0x74,0x65,0x20,0x6f,0x66,0x20,0x53,0x52,0x41,0x4d,0x20, +0x77,0x69,0x74,0x68,0x20,0x61,0x20,0x73,0x63,0x61,0x74,0x74,0x65,0x72,0x65,0x64, +0x20,0x61,0x72,0x63,0x68,0x69,0x74,0x65,0x63,0x74,0x75,0x72,0x65,0x3a,0x3c,0x2f, +0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x2f,0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x75,0x6c,0x3e, +0x0d,0x0a,0x3c,0x6c,0x69,0x3e,0x31,0x39,0x32,0x20,0x4b,0x62,0x79,0x74,0x65,0x73, +0x20,0x6f,0x66,0x20,0x54,0x43,0x4d,0x20,0x52,0x41,0x4d,0x20,0x28,0x69,0x6e,0x63, +0x6c,0x75,0x64,0x69,0x6e,0x67,0x20,0x36,0x34,0x20,0x4b,0x62,0x79,0x74,0x65,0x73, +0x20,0x6f,0x66,0x0d,0x0a,0x49,0x54,0x43,0x4d,0x20,0x52,0x41,0x4d,0x20,0x61,0x6e, +0x64,0x20,0x31,0x32,0x38,0x20,0x4b,0x62,0x79,0x74,0x65,0x73,0x20,0x6f,0x66,0x20, +0x44,0x54,0x43,0x4d,0x20,0x52,0x41,0x4d,0x20,0x66,0x6f,0x72,0x20,0x74,0x69,0x6d, +0x65,0x2d,0x63,0x72,0x69,0x74,0x69,0x63,0x61,0x6c,0x20,0x72,0x6f,0x75,0x74,0x69, +0x6e,0x65,0x73,0x20,0x61,0x6e,0x64,0x0d,0x0a,0x64,0x61,0x74,0x61,0x29,0x2c,0x20, +0x35,0x31,0x32,0x20,0x4b,0x62,0x79,0x74,0x65,0x73,0x2c,0x20,0x32,0x38,0x38,0x20, +0x4b,0x62,0x79,0x74,0x65,0x73,0x20,0x61,0x6e,0x64,0x20,0x36,0x34,0x20,0x4b,0x62, +0x79,0x74,0x65,0x73,0x20,0x6f,0x66,0x20,0x75,0x73,0x65,0x72,0x20,0x53,0x52,0x41, +0x4d,0x2c,0x20,0x61,0x6e,0x64,0x20,0x34,0x20,0x4b,0x62,0x79,0x74,0x65,0x73,0x0d, +0x0a,0x6f,0x66,0x20,0x53,0x52,0x41,0x4d,0x20,0x69,0x6e,0x20,0x62,0x61,0x63,0x6b, +0x75,0x70,0x20,0x64,0x6f,0x6d,0x61,0x69,0x6e,0x20,0x74,0x6f,0x20,0x6b,0x65,0x65, +0x70,0x20,0x64,0x61,0x74,0x61,0x20,0x69,0x6e,0x20,0x74,0x68,0x65,0x20,0x6c,0x6f, +0x77,0x65,0x73,0x74,0x20,0x70,0x6f,0x77,0x65,0x72,0x20,0x6d,0x6f,0x64,0x65,0x73, +0x3c,0x2f,0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x2f,0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x73, +0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d, +0x73,0x69,0x7a,0x65,0x3a,0x20,0x31,0x30,0x70,0x74,0x3b,0x20,0x66,0x6f,0x6e,0x74, +0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61, +0x3b,0x22,0x3e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x62,0x72,0x3e,0x0d,0x0a, +0x3c,0x64,0x69,0x76,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x6d,0x61,0x72,0x67, +0x69,0x6e,0x2d,0x6c,0x65,0x66,0x74,0x3a,0x20,0x34,0x30,0x70,0x78,0x3b,0x22,0x3e, +0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e, +0x74,0x2d,0x73,0x69,0x7a,0x65,0x3a,0x20,0x31,0x30,0x70,0x74,0x3b,0x20,0x66,0x6f, +0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61, +0x6e,0x61,0x3b,0x22,0x3e,0x3c,0x61,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66, +0x6f,0x6e,0x74,0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x62,0x6f,0x6c,0x64, +0x3b,0x22,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f, +0x77,0x77,0x77,0x2e,0x73,0x74,0x2e,0x63,0x6f,0x6d,0x2f,0x65,0x6e,0x2f,0x6d,0x69, +0x63,0x72,0x6f,0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x6c,0x65,0x72,0x73,0x2f,0x73, +0x74,0x6d,0x33,0x32,0x68,0x37,0x2d,0x73,0x65,0x72,0x69,0x65,0x73,0x2e,0x68,0x74, +0x6d,0x6c,0x22,0x20,0x74,0x61,0x72,0x67,0x65,0x74,0x3d,0x22,0x5f,0x62,0x6c,0x61, +0x6e,0x6b,0x22,0x3e,0x54,0x68,0x65,0x20,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78, +0x78,0x20,0x68,0x6f,0x6d,0x65,0x20,0x70,0x61,0x67,0x65,0x3c,0x2f,0x61,0x3e,0x3c, +0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x2f,0x73,0x70,0x61, +0x6e,0x3e,0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d, +0x0a,0x3c,0x2f,0x74,0x72,0x3e,0x0d,0x0a,0x3c,0x74,0x72,0x20,0x73,0x74,0x79,0x6c, +0x65,0x3d,0x22,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x73,0x74,0x79,0x6c,0x65, +0x3d,0x22,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3a,0x20,0x32,0x2e,0x32,0x35,0x70, +0x74,0x3b,0x22,0x20,0x76,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22, +0x3e,0x0d,0x0a,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d, +0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x54,0x61,0x62,0x6c,0x65,0x22, +0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x39, +0x34,0x34,0x70,0x78,0x3b,0x20,0x68,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x35,0x34, +0x36,0x70,0x78,0x3b,0x22,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x30,0x22, +0x20,0x63,0x65,0x6c,0x6c,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3d,0x22,0x30,0x22, +0x20,0x63,0x65,0x6c,0x6c,0x73,0x70,0x61,0x63,0x69,0x6e,0x67,0x3d,0x22,0x30,0x22, +0x3e,0x0d,0x0a,0x3c,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x74,0x72,0x20, +0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x73, +0x74,0x79,0x6c,0x65,0x3d,0x22,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3a,0x20,0x32, +0x2e,0x32,0x35,0x70,0x74,0x3b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e, +0x64,0x3a,0x20,0x72,0x67,0x62,0x28,0x35,0x31,0x2c,0x20,0x35,0x31,0x2c,0x20,0x32, +0x35,0x35,0x29,0x20,0x6e,0x6f,0x6e,0x65,0x20,0x72,0x65,0x70,0x65,0x61,0x74,0x20, +0x73,0x63,0x72,0x6f,0x6c,0x6c,0x20,0x30,0x25,0x20,0x35,0x30,0x25,0x3b,0x20,0x2d, +0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x63, +0x6c,0x69,0x70,0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x3b,0x20,0x2d,0x6d, +0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x6f,0x72, +0x69,0x67,0x69,0x6e,0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x3b,0x20,0x2d, +0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x69, +0x6e,0x6c,0x69,0x6e,0x65,0x2d,0x70,0x6f,0x6c,0x69,0x63,0x79,0x3a,0x20,0x69,0x6e, +0x69,0x74,0x69,0x61,0x6c,0x3b,0x20,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x35,0x30, +0x34,0x2e,0x32,0x70,0x74,0x3b,0x22,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x36, +0x37,0x32,0x22,0x3e,0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22, +0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x22,0x3e,0x3c,0x73,0x70,0x61,0x6e, +0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77, +0x68,0x69,0x74,0x65,0x3b,0x22,0x3e,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x2f,0x73, +0x70,0x61,0x6e,0x3e,0x3c,0x73,0x74,0x72,0x6f,0x6e,0x67,0x3e,0x3c,0x73,0x70,0x61, +0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61, +0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x20,0x63, +0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77,0x68,0x69,0x74,0x65,0x3b,0x22,0x3e,0x41,0x62, +0x6f,0x75,0x74,0x20,0x74,0x68,0x69,0x73,0x0d,0x0a,0x64,0x65,0x6d,0x6f,0x6e,0x73, +0x74,0x72,0x61,0x74,0x69,0x6f,0x6e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f, +0x73,0x74,0x72,0x6f,0x6e,0x67,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a, +0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a, +0x20,0x77,0x68,0x69,0x74,0x65,0x3b,0x22,0x3e,0x3c,0x6f,0x3a,0x70,0x3e,0x3c,0x2f, +0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x70,0x3e,0x0d, +0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x73,0x74,0x79,0x6c, +0x65,0x3d,0x22,0x62,0x6f,0x72,0x64,0x65,0x72,0x3a,0x20,0x6d,0x65,0x64,0x69,0x75, +0x6d,0x20,0x6e,0x6f,0x6e,0x65,0x20,0x3b,0x20,0x70,0x61,0x64,0x64,0x69,0x6e,0x67, +0x3a,0x20,0x30,0x63,0x6d,0x3b,0x22,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x34, +0x22,0x3e,0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73, +0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x22,0x3e,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c, +0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x72, +0x3e,0x0d,0x0a,0x3c,0x74,0x72,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x68,0x65, +0x69,0x67,0x68,0x74,0x3a,0x20,0x31,0x31,0x2e,0x32,0x35,0x70,0x74,0x3b,0x22,0x3e, +0x0d,0x0a,0x3c,0x74,0x64,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x70,0x61,0x64, +0x64,0x69,0x6e,0x67,0x3a,0x20,0x32,0x2e,0x32,0x35,0x70,0x74,0x3b,0x20,0x77,0x69, +0x64,0x74,0x68,0x3a,0x20,0x35,0x30,0x34,0x2e,0x32,0x70,0x74,0x3b,0x20,0x68,0x65, +0x69,0x67,0x68,0x74,0x3a,0x20,0x31,0x31,0x2e,0x32,0x35,0x70,0x74,0x3b,0x22,0x20, +0x76,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22,0x20,0x77,0x69,0x64, +0x74,0x68,0x3d,0x22,0x36,0x37,0x32,0x22,0x3e,0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c, +0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x22,0x3e, +0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22, +0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x22,0x3e,0x54,0x68,0x69,0x73,0x26, +0x6e,0x62,0x73,0x70,0x3b,0x64,0x65,0x6d,0x6f,0x6e,0x73,0x74,0x72,0x61,0x74,0x69, +0x6f,0x6e,0x0d,0x0a,0x70,0x72,0x65,0x73,0x65,0x6e,0x74,0x73,0x20,0x48,0x54,0x54, +0x50,0x20,0x77,0x65,0x62,0x73,0x65,0x72,0x76,0x65,0x72,0x26,0x6e,0x62,0x73,0x70, +0x3b,0x64,0x65,0x76,0x65,0x6c,0x6f,0x70,0x65,0x64,0x20,0x6f,0x6e,0x20,0x74,0x68, +0x65,0x20,0x74,0x6f,0x70,0x0d,0x0a,0x6c,0x65,0x76,0x65,0x6c,0x20,0x6f,0x66,0x20, +0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x20,0x54,0x43,0x50,0x2f,0x49,0x50,0x20, +0x73,0x74,0x61,0x63,0x6b,0x2c,0x20,0x69,0x74,0x20,0x70,0x72,0x6f,0x76,0x69,0x64, +0x65,0x73,0x20,0x74,0x68,0x65,0x20,0x70,0x6f,0x73,0x73,0x69,0x62,0x69,0x6c,0x74, +0x79,0x20,0x74,0x6f,0x20,0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x0d,0x0a,0x4c,0x45, +0x44,0x73,0x20,0x74,0x6f,0x67,0x67,0x6c,0x69,0x6e,0x67,0x20,0x6f,0x6e,0x20,0x74, +0x68,0x65,0x20,0x53,0x4d,0x33,0x32,0x48,0x37,0x34,0x33,0x49,0x2d,0x45,0x56,0x41, +0x4c,0x20,0x62,0x6f,0x61,0x72,0x64,0x2c,0x20,0x61,0x6c,0x73,0x6f,0x20,0x69,0x74, +0x20,0x61,0x6c,0x6c,0x6f,0x77,0x73,0x20,0x74,0x6f,0x20,0x67,0x65,0x74,0x0d,0x0a, +0x63,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x6f,0x75,0x73,0x6c,0x79,0x20,0x74,0x68,0x65, +0x20,0x41,0x44,0x43,0x20,0x63,0x6f,0x6e,0x76,0x65,0x72,0x74,0x65,0x64,0x20,0x76, +0x61,0x6c,0x75,0x65,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x69,0x73,0x20,0x63,0x6f, +0x6e,0x6e,0x65,0x63,0x74,0x65,0x64,0x20,0x74,0x6f,0x20,0x74,0x68,0x65,0x0d,0x0a, +0x70,0x6f,0x74,0x65,0x6e,0x74,0x69,0x6f,0x6d,0x65,0x74,0x65,0x72,0x2e,0x3c,0x2f, +0x70,0x3e,0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73, +0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x22,0x3e,0x54,0x68,0x69,0x73,0x20,0x64,0x65, +0x6d,0x6f,0x6e,0x73,0x74,0x72,0x61,0x74,0x69,0x6f,0x6e,0x0d,0x0a,0x73,0x75,0x70, +0x70,0x6f,0x72,0x74,0x73,0x26,0x6e,0x62,0x73,0x70,0x3b,0x74,0x68,0x65,0x20,0x66, +0x6f,0x6c,0x6c,0x6f,0x77,0x69,0x6e,0x67,0x20,0x66,0x65,0x61,0x74,0x75,0x72,0x65, +0x73,0x3a,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x6c, +0x69,0x3e,0x44,0x48,0x43,0x50,0x20,0x63,0x6c,0x69,0x65,0x6e,0x74,0x20,0x28,0x64, +0x79,0x6e,0x61,0x6d,0x69,0x63,0x20,0x49,0x50,0x20,0x61,0x64,0x64,0x72,0x65,0x73, +0x73,0x0d,0x0a,0x61,0x6c,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x29,0x3c,0x2f, +0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x6c,0x69,0x3e,0x45,0x74,0x68,0x65,0x72,0x6e,0x65, +0x74,0x20,0x63,0x61,0x62,0x6c,0x65,0x20,0x70,0x6c,0x75,0x67,0x2f,0x75,0x6e,0x70, +0x6c,0x75,0x67,0x0d,0x0a,0x6d,0x61,0x6e,0x61,0x67,0x65,0x6d,0x65,0x6e,0x74,0x3c, +0x2f,0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x6c,0x69,0x3e,0x45,0x74,0x68,0x65,0x72,0x6e, +0x65,0x74,0x20,0x5a,0x65,0x72,0x6f,0x2d,0x43,0x6f,0x70,0x79,0x20,0x69,0x6e,0x74, +0x65,0x72,0x66,0x61,0x63,0x65,0x3c,0x2f,0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x2f,0x75, +0x6c,0x3e,0x0d,0x0a,0x3c,0x75,0x6c,0x20,0x74,0x79,0x70,0x65,0x3d,0x22,0x64,0x69, +0x73,0x63,0x22,0x3e,0x0d,0x0a,0x3c,0x2f,0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x70,0x20, +0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c, +0x22,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x22,0x3e,0x3c,0x6f,0x3a,0x70,0x3e, +0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x2f,0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x70,0x3e, +0x0d,0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x62,0x6f,0x72,0x64,0x65,0x72,0x3a,0x20,0x6d,0x65,0x64,0x69, +0x75,0x6d,0x20,0x6e,0x6f,0x6e,0x65,0x20,0x3b,0x20,0x70,0x61,0x64,0x64,0x69,0x6e, +0x67,0x3a,0x20,0x30,0x63,0x6d,0x3b,0x22,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22, +0x34,0x22,0x3e,0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d, +0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x22,0x3e,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74, +0x72,0x3e,0x0d,0x0a,0x3c,0x74,0x72,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x22, +0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x70,0x61, +0x64,0x64,0x69,0x6e,0x67,0x3a,0x20,0x32,0x2e,0x32,0x35,0x70,0x74,0x3b,0x20,0x62, +0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x3a,0x20,0x72,0x67,0x62,0x28,0x35, +0x31,0x2c,0x20,0x35,0x31,0x2c,0x20,0x32,0x35,0x35,0x29,0x20,0x6e,0x6f,0x6e,0x65, +0x20,0x72,0x65,0x70,0x65,0x61,0x74,0x20,0x73,0x63,0x72,0x6f,0x6c,0x6c,0x20,0x30, +0x25,0x20,0x35,0x30,0x25,0x3b,0x20,0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b, +0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x63,0x6c,0x69,0x70,0x3a,0x20,0x69,0x6e,0x69, +0x74,0x69,0x61,0x6c,0x3b,0x20,0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67, +0x72,0x6f,0x75,0x6e,0x64,0x2d,0x6f,0x72,0x69,0x67,0x69,0x6e,0x3a,0x20,0x69,0x6e, +0x69,0x74,0x69,0x61,0x6c,0x3b,0x20,0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b, +0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x2d,0x70,0x6f, +0x6c,0x69,0x63,0x79,0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x3b,0x20,0x77, +0x69,0x64,0x74,0x68,0x3a,0x20,0x35,0x30,0x34,0x2e,0x32,0x70,0x74,0x3b,0x22,0x20, +0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x36,0x37,0x32,0x22,0x3e,0x0d,0x0a,0x3c,0x70, +0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61, +0x6c,0x22,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22, +0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77,0x68,0x69,0x74,0x65,0x3b,0x22,0x3e,0x26, +0x6e,0x62,0x73,0x70,0x3b,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x73,0x74,0x72, +0x6f,0x6e,0x67,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d, +0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65, +0x72,0x64,0x61,0x6e,0x61,0x3b,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77,0x68, +0x69,0x74,0x65,0x3b,0x22,0x3e,0x41,0x62,0x6f,0x75,0x74,0x20,0x4c,0x77,0x49,0x50, +0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x73,0x74,0x72,0x6f,0x6e,0x67,0x3e, +0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e, +0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e, +0x61,0x3b,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77,0x68,0x69,0x74,0x65,0x3b, +0x22,0x3e,0x3c,0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x73, +0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d, +0x0a,0x3c,0x74,0x64,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x62,0x6f,0x72,0x64, +0x65,0x72,0x3a,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,0x20,0x6e,0x6f,0x6e,0x65,0x20, +0x3b,0x20,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3a,0x20,0x30,0x63,0x6d,0x3b,0x22, +0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x34,0x22,0x3e,0x0d,0x0a,0x3c,0x70,0x20, +0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c, +0x22,0x3e,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x2f, +0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x72,0x3e,0x0d,0x0a,0x3c,0x74,0x72,0x20, +0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x63, +0x6f,0x6c,0x73,0x70,0x61,0x6e,0x3d,0x22,0x32,0x22,0x20,0x73,0x74,0x79,0x6c,0x65, +0x3d,0x22,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3a,0x20,0x32,0x2e,0x32,0x35,0x70, +0x74,0x3b,0x20,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x35,0x30,0x37,0x2e,0x34,0x70, +0x74,0x3b,0x20,0x76,0x65,0x72,0x74,0x69,0x63,0x61,0x6c,0x2d,0x61,0x6c,0x69,0x67, +0x6e,0x3a,0x20,0x6d,0x69,0x64,0x64,0x6c,0x65,0x3b,0x22,0x3e,0x0d,0x0a,0x3c,0x70, +0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61, +0x6c,0x22,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x6d,0x61,0x72,0x67,0x69,0x6e, +0x2d,0x62,0x6f,0x74,0x74,0x6f,0x6d,0x3a,0x20,0x31,0x32,0x70,0x74,0x3b,0x22,0x3e, +0x6c,0x77,0x49,0x50,0x2c,0x0d,0x0a,0x70,0x72,0x6f,0x6e,0x6f,0x75,0x6e,0x63,0x65, +0x64,0x20,0x6c,0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x49,0x50, +0x2c,0x20,0x69,0x73,0x20,0x61,0x6e,0x20,0x6f,0x70,0x65,0x6e,0x20,0x73,0x6f,0x75, +0x72,0x63,0x65,0x20,0x54,0x43,0x50,0x2f,0x49,0x50,0x20,0x73,0x74,0x61,0x63,0x6b, +0x20,0x64,0x65,0x76,0x65,0x6c,0x6f,0x70,0x65,0x64,0x20,0x62,0x79,0x0d,0x0a,0x41, +0x64,0x61,0x6d,0x20,0x44,0x75,0x6e,0x6b,0x65,0x6c,0x73,0x20,0x61,0x74,0x20,0x74, +0x68,0x65,0x20,0x53,0x77,0x65,0x64,0x69,0x73,0x68,0x20,0x49,0x6e,0x73,0x74,0x69, +0x74,0x75,0x74,0x65,0x20,0x6f,0x66,0x20,0x43,0x6f,0x6d,0x70,0x75,0x74,0x65,0x72, +0x20,0x53,0x63,0x69,0x65,0x6e,0x63,0x65,0x20,0x61,0x6e,0x64,0x20,0x69,0x73,0x0d, +0x0a,0x6d,0x61,0x69,0x6e,0x74,0x61,0x69,0x6e,0x65,0x64,0x20,0x6e,0x6f,0x77,0x20, +0x62,0x79,0x20,0x61,0x20,0x77,0x6f,0x72,0x6c,0x64,0x20,0x77,0x69,0x64,0x65,0x20, +0x63,0x6f,0x6d,0x6d,0x75,0x6e,0x69,0x74,0x79,0x20,0x6f,0x66,0x20,0x64,0x65,0x76, +0x65,0x6c,0x6f,0x70,0x65,0x72,0x73,0x2e,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x62, +0x72,0x3e,0x0d,0x0a,0x6c,0x77,0x49,0x50,0x20,0x6d,0x61,0x69,0x6e,0x20,0x66,0x65, +0x61,0x74,0x75,0x72,0x65,0x73,0x3a,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x62,0x72, +0x3e,0x0d,0x0a,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x75,0x6c,0x3e,0x0d,0x0a,0x3c, +0x6c,0x69,0x3e,0x50,0x72,0x6f,0x74,0x6f,0x63,0x6f,0x6c,0x73,0x3a,0x20,0x49,0x50, +0x2c,0x20,0x49,0x43,0x4d,0x50,0x2c,0x20,0x55,0x44,0x50,0x2c,0x20,0x54,0x43,0x50, +0x2c,0x20,0x49,0x47,0x4d,0x50,0x2c,0x20,0x41,0x52,0x50,0x2c,0x0d,0x0a,0x50,0x50, +0x50,0x6f,0x53,0x2c,0x20,0x50,0x50,0x50,0x6f,0x45,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x3c,0x2f,0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x6c,0x69,0x3e,0x44,0x48,0x43,0x50,0x20, +0x63,0x6c,0x69,0x65,0x6e,0x74,0x2c,0x20,0x44,0x4e,0x53,0x20,0x63,0x6c,0x69,0x65, +0x6e,0x74,0x2c,0x20,0x41,0x75,0x74,0x6f,0x49,0x50,0x2f,0x41,0x50,0x49,0x50,0x41, +0x0d,0x0a,0x28,0x5a,0x65,0x72,0x6f,0x63,0x6f,0x6e,0x66,0x29,0x2c,0x20,0x53,0x4e, +0x4d,0x50,0x20,0x61,0x67,0x65,0x6e,0x74,0x20,0x28,0x70,0x72,0x69,0x76,0x61,0x74, +0x65,0x20,0x4d,0x49,0x42,0x20,0x73,0x75,0x70,0x70,0x6f,0x72,0x74,0x29,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x3c,0x2f,0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x6c,0x69,0x3e,0x41, +0x50,0x49,0x73,0x3a,0x20,0x73,0x70,0x65,0x63,0x69,0x61,0x6c,0x69,0x7a,0x65,0x64, +0x20,0x41,0x50,0x49,0x73,0x20,0x66,0x6f,0x72,0x20,0x65,0x6e,0x68,0x61,0x6e,0x63, +0x65,0x64,0x0d,0x0a,0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65,0x2c, +0x20,0x6f,0x70,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x20,0x42,0x65,0x72,0x6b,0x65,0x6c, +0x65,0x79,0x2d,0x61,0x6c,0x69,0x6b,0x65,0x20,0x73,0x6f,0x63,0x6b,0x65,0x74,0x20, +0x41,0x50,0x49,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x2f,0x6c,0x69,0x3e,0x0d,0x0a, +0x3c,0x6c,0x69,0x3e,0x45,0x78,0x74,0x65,0x6e,0x64,0x65,0x64,0x20,0x66,0x65,0x61, +0x74,0x75,0x72,0x65,0x73,0x3a,0x20,0x49,0x50,0x20,0x66,0x6f,0x72,0x77,0x61,0x72, +0x64,0x69,0x6e,0x67,0x20,0x6f,0x76,0x65,0x72,0x0d,0x0a,0x6d,0x75,0x6c,0x74,0x69, +0x70,0x6c,0x65,0x20,0x6e,0x65,0x74,0x77,0x6f,0x72,0x6b,0x20,0x69,0x6e,0x74,0x65, +0x72,0x66,0x61,0x63,0x65,0x73,0x2c,0x20,0x54,0x43,0x50,0x20,0x63,0x6f,0x6e,0x67, +0x65,0x73,0x74,0x69,0x6f,0x6e,0x20,0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x2c,0x20, +0x52,0x54,0x54,0x20,0x65,0x73,0x74,0x69,0x6d,0x61,0x74,0x69,0x6f,0x6e,0x20,0x61, +0x6e,0x64,0x0d,0x0a,0x66,0x61,0x73,0x74,0x20,0x72,0x65,0x63,0x6f,0x76,0x65,0x72, +0x79,0x2f,0x66,0x61,0x73,0x74,0x20,0x72,0x65,0x74,0x72,0x61,0x6e,0x73,0x6d,0x69, +0x74,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x2f,0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x6c, +0x69,0x3e,0x41,0x64,0x64,0x6f,0x6e,0x20,0x61,0x70,0x70,0x6c,0x69,0x63,0x61,0x74, +0x69,0x6f,0x6e,0x73,0x3a,0x20,0x48,0x54,0x54,0x50,0x20,0x73,0x65,0x72,0x76,0x65, +0x72,0x2c,0x20,0x4d,0x51,0x54,0x54,0x0d,0x0a,0x63,0x6c,0x69,0x65,0x6e,0x74,0x2c, +0x20,0x53,0x4e,0x54,0x50,0x20,0x63,0x6c,0x69,0x65,0x6e,0x74,0x2c,0x20,0x53,0x4d, +0x54,0x50,0x20,0x63,0x6c,0x69,0x65,0x6e,0x74,0x2c,0x20,0x70,0x69,0x6e,0x67,0x2c, +0x20,0x4e,0x65,0x74,0x42,0x49,0x4f,0x53,0x20,0x6e,0x61,0x6d,0x65,0x73,0x65,0x72, +0x76,0x65,0x72,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c, +0x2f,0x6c,0x69,0x3e,0x0d,0x0a,0x3c,0x2f,0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x70,0x20, +0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c, +0x22,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x6d,0x61,0x72,0x67,0x69,0x6e,0x2d, +0x62,0x6f,0x74,0x74,0x6f,0x6d,0x3a,0x20,0x31,0x32,0x70,0x74,0x3b,0x22,0x3e,0x6c, +0x77,0x49,0x50,0x20,0x69,0x73,0x20,0x6c,0x69,0x63,0x65,0x6e,0x63,0x65,0x64,0x20, +0x75,0x6e,0x64,0x65,0x72,0x20,0x61,0x0d,0x0a,0x42,0x53,0x44,0x2d,0x73,0x74,0x79, +0x6c,0x65,0x20,0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x3c,0x2f,0x70,0x3e,0x0d,0x0a, +0x3c,0x70,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72, +0x6d,0x61,0x6c,0x22,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x6d,0x61,0x72,0x67, +0x69,0x6e,0x2d,0x62,0x6f,0x74,0x74,0x6f,0x6d,0x3a,0x20,0x31,0x32,0x70,0x74,0x3b, +0x22,0x3e,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x46,0x6f,0x72,0x20,0x6d,0x6f,0x72,0x65, +0x20,0x69,0x6e,0x66,0x6f,0x72,0x6d,0x61,0x74,0x69,0x6f,0x6e,0x73,0x20,0x79,0x6f, +0x75,0x20,0x63,0x61,0x6e,0x20,0x72,0x65,0x66,0x65,0x72,0x20,0x74,0x6f,0x20,0x74, +0x68,0x65,0x20,0x77,0x65,0x62,0x73,0x69,0x74,0x65,0x3a,0x20,0x26,0x6e,0x62,0x73, +0x70,0x3b,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a, +0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e, +0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c, +0x77,0x69,0x70,0x2f,0x22,0x3e,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76, +0x61,0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67, +0x2f,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x2f,0x3c, +0x2f,0x61,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22, +0x66,0x6f,0x6e,0x74,0x2d,0x73,0x69,0x7a,0x65,0x3a,0x20,0x31,0x30,0x70,0x74,0x3b, +0x20,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65, +0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d, +0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e,0x6e,0x61,0x68, +0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70,0x72,0x6f,0x6a, +0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x2f,0x22,0x3e,0x0d,0x0a,0x3c,0x2f, +0x61,0x3e,0x3c,0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x73, +0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d, +0x0a,0x3c,0x2f,0x74,0x72,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x62,0x6f,0x64,0x79,0x3e, +0x0d,0x0a,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65,0x3e,0x0d,0x0a,0x3c,0x70,0x20,0x63, +0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x22, +0x3e,0x3c,0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x70,0x3e, +0x0d,0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x72,0x3e,0x0d,0x0a, +0x3c,0x2f,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x61,0x62,0x6c, +0x65,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x72,0x3e, +0x0d,0x0a,0x3c,0x2f,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x61, +0x62,0x6c,0x65,0x3e,0x0d,0x0a,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c, +0x65,0x3d,0x22,0x64,0x69,0x73,0x70,0x6c,0x61,0x79,0x3a,0x20,0x6e,0x6f,0x6e,0x65, +0x3b,0x22,0x3e,0x3c,0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x6f,0x3a,0x70,0x3e,0x3c,0x2f, +0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0d,0x0a,0x3c,0x64,0x69, +0x76,0x20,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x63,0x65,0x6e,0x74,0x65,0x72,0x22, +0x3e,0x0d,0x0a,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d, +0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x54,0x61,0x62,0x6c,0x65,0x22, +0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75, +0x6e,0x64,0x3a,0x20,0x62,0x6c,0x61,0x63,0x6b,0x20,0x6e,0x6f,0x6e,0x65,0x20,0x72, +0x65,0x70,0x65,0x61,0x74,0x20,0x73,0x63,0x72,0x6f,0x6c,0x6c,0x20,0x30,0x25,0x20, +0x35,0x30,0x25,0x3b,0x20,0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72, +0x6f,0x75,0x6e,0x64,0x2d,0x63,0x6c,0x69,0x70,0x3a,0x20,0x69,0x6e,0x69,0x74,0x69, +0x61,0x6c,0x3b,0x20,0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f, +0x75,0x6e,0x64,0x2d,0x6f,0x72,0x69,0x67,0x69,0x6e,0x3a,0x20,0x69,0x6e,0x69,0x74, +0x69,0x61,0x6c,0x3b,0x20,0x2d,0x6d,0x6f,0x7a,0x2d,0x62,0x61,0x63,0x6b,0x67,0x72, +0x6f,0x75,0x6e,0x64,0x2d,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x2d,0x70,0x6f,0x6c,0x69, +0x63,0x79,0x3a,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x3b,0x20,0x77,0x69,0x64, +0x74,0x68,0x3a,0x20,0x35,0x37,0x34,0x2e,0x35,0x70,0x74,0x3b,0x22,0x20,0x62,0x6f, +0x72,0x64,0x65,0x72,0x3d,0x22,0x30,0x22,0x20,0x63,0x65,0x6c,0x6c,0x70,0x61,0x64, +0x64,0x69,0x6e,0x67,0x3d,0x22,0x30,0x22,0x20,0x63,0x65,0x6c,0x6c,0x73,0x70,0x61, +0x63,0x69,0x6e,0x67,0x3d,0x22,0x30,0x22,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22, +0x37,0x36,0x36,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a, +0x3c,0x74,0x72,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x22,0x3e,0x0d,0x0a,0x3c, +0x74,0x64,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x70,0x61,0x64,0x64,0x69,0x6e, +0x67,0x3a,0x20,0x30,0x63,0x6d,0x3b,0x20,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x31, +0x30,0x30,0x25,0x3b,0x22,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x31,0x30,0x30, +0x25,0x22,0x3e,0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d, +0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x22,0x3e,0x3c,0x69,0x6d,0x67,0x20,0x69, +0x64,0x3d,0x22,0x5f,0x78,0x30,0x30,0x30,0x30,0x5f,0x69,0x31,0x30,0x32,0x38,0x22, +0x20,0x73,0x72,0x63,0x3d,0x22,0x69,0x6e,0x63,0x68,0x74,0x6d,0x6c,0x2d,0x70,0x61, +0x67,0x65,0x73,0x2d,0x73,0x74,0x6d,0x33,0x32,0x5f,0x63,0x6f,0x6e,0x6e,0x65,0x63, +0x74,0x69,0x76,0x69,0x74,0x79,0x5f,0x66,0x69,0x6c,0x65,0x73,0x2f,0x70,0x69,0x78, +0x65,0x6c,0x2e,0x67,0x69,0x66,0x22,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22, +0x30,0x22,0x20,0x68,0x65,0x69,0x67,0x68,0x74,0x3d,0x22,0x31,0x22,0x20,0x77,0x69, +0x64,0x74,0x68,0x3d,0x22,0x31,0x22,0x3e,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x2f, +0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x72,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x62, +0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65,0x3e,0x0d,0x0a, +0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c,0x61,0x73,0x73, +0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x22,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x74,0x65,0x78,0x74,0x2d,0x61,0x6c,0x69,0x67,0x6e,0x3a,0x20, +0x63,0x65,0x6e,0x74,0x65,0x72,0x3b,0x22,0x20,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22, +0x63,0x65,0x6e,0x74,0x65,0x72,0x22,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74, +0x79,0x6c,0x65,0x3d,0x22,0x64,0x69,0x73,0x70,0x6c,0x61,0x79,0x3a,0x20,0x6e,0x6f, +0x6e,0x65,0x3b,0x22,0x3e,0x3c,0x6f,0x3a,0x70,0x3e,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x3c,0x2f,0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x70, +0x3e,0x0d,0x0a,0x3c,0x64,0x69,0x76,0x20,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x63, +0x65,0x6e,0x74,0x65,0x72,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20, +0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72,0x6d,0x61,0x6c, +0x54,0x61,0x62,0x6c,0x65,0x22,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x77,0x69, +0x64,0x74,0x68,0x3a,0x20,0x39,0x35,0x38,0x70,0x78,0x3b,0x20,0x68,0x65,0x69,0x67, +0x68,0x74,0x3a,0x20,0x35,0x38,0x70,0x78,0x3b,0x22,0x20,0x62,0x6f,0x72,0x64,0x65, +0x72,0x3d,0x22,0x30,0x22,0x20,0x63,0x65,0x6c,0x6c,0x70,0x61,0x64,0x64,0x69,0x6e, +0x67,0x3d,0x22,0x30,0x22,0x20,0x63,0x65,0x6c,0x6c,0x73,0x70,0x61,0x63,0x69,0x6e, +0x67,0x3d,0x22,0x30,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d, +0x0a,0x3c,0x74,0x72,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x22,0x3e,0x0d,0x0a, +0x3c,0x74,0x64,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x70,0x61,0x64,0x64,0x69, +0x6e,0x67,0x3a,0x20,0x30,0x63,0x6d,0x3b,0x20,0x77,0x69,0x64,0x74,0x68,0x3a,0x20, +0x31,0x30,0x30,0x25,0x3b,0x22,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x31,0x30, +0x30,0x25,0x22,0x3e,0x0d,0x0a,0x3c,0x64,0x69,0x76,0x20,0x69,0x64,0x3d,0x22,0x66, +0x6f,0x6f,0x74,0x65,0x72,0x22,0x3e,0x0d,0x0a,0x3c,0x70,0x20,0x63,0x6c,0x61,0x73, +0x73,0x3d,0x22,0x6c,0x65,0x67,0x61,0x6c,0x22,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d, +0x22,0x74,0x65,0x78,0x74,0x2d,0x61,0x6c,0x69,0x67,0x6e,0x3a,0x20,0x63,0x65,0x6e, +0x74,0x65,0x72,0x3b,0x22,0x20,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x63,0x65,0x6e, +0x74,0x65,0x72,0x22,0x3e,0x41,0x6c,0x6c,0x20,0x72,0x69,0x67,0x68,0x74,0x73,0x20, +0x72,0x65,0x73,0x65,0x72,0x76,0x65,0x64,0x20,0xa9,0x32,0x30,0x31,0x37,0x0d,0x0a, +0x53,0x54,0x4d,0x69,0x63,0x72,0x6f,0x65,0x6c,0x65,0x63,0x74,0x72,0x6f,0x6e,0x69, +0x63,0x73,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x2f, +0x64,0x69,0x76,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74, +0x72,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f, +0x74,0x61,0x62,0x6c,0x65,0x3e,0x0d,0x0a,0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0d,0x0a, +0x3c,0x70,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x4d,0x73,0x6f,0x4e,0x6f,0x72, +0x6d,0x61,0x6c,0x22,0x3e,0x3c,0x6f,0x3a,0x70,0x3e,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x3c,0x2f,0x6f,0x3a,0x70,0x3e,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x2f,0x64,0x69, +0x76,0x3e,0x0d,0x0a,0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0d,0x0a,0x3c,0x2f,0x62,0x6f, +0x64,0x79,0x3e,0x3c,0x2f,0x68,0x74,0x6d,0x6c,0x3e,}; + +const unsigned int dummy_align__STM32H7xxADC_shtml = 5; +const unsigned char data__STM32H7xxADC_shtml[] = { +/* /STM32H7xxADC.shtml (20 chars) */ +0x2f,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x41,0x44,0x43,0x2e,0x73,0x68, +0x74,0x6d,0x6c,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) +" (63 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, +0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, +0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, +0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, +/* "Content-type: text/html +Expires: Fri, 10 Apr 2008 14:00:00 GMT +Pragma: no-cache + +" (85 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, +0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x45,0x78,0x70,0x69,0x72,0x65,0x73, +0x3a,0x20,0x46,0x72,0x69,0x2c,0x20,0x31,0x30,0x20,0x41,0x70,0x72,0x20,0x32,0x30, +0x30,0x38,0x20,0x31,0x34,0x3a,0x30,0x30,0x3a,0x30,0x30,0x20,0x47,0x4d,0x54,0x0d, +0x0a,0x50,0x72,0x61,0x67,0x6d,0x61,0x3a,0x20,0x6e,0x6f,0x2d,0x63,0x61,0x63,0x68, +0x65,0x0d,0x0a,0x0d,0x0a, +/* raw file data (4222 bytes) */ +0x3c,0x21,0x44,0x4f,0x43,0x54,0x59,0x50,0x45,0x20,0x48,0x54,0x4d,0x4c,0x20,0x50, +0x55,0x42,0x4c,0x49,0x43,0x20,0x22,0x2d,0x2f,0x2f,0x57,0x33,0x43,0x2f,0x2f,0x44, +0x54,0x44,0x20,0x48,0x54,0x4d,0x4c,0x20,0x34,0x2e,0x30,0x31,0x20,0x54,0x72,0x61, +0x6e,0x73,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x2f,0x2f,0x45,0x4e,0x22,0x20,0x22, +0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x77,0x33,0x63,0x2e,0x6f, +0x72,0x67,0x2f,0x54,0x52,0x2f,0x31,0x39,0x39,0x39,0x2f,0x52,0x45,0x43,0x2d,0x68, +0x74,0x6d,0x6c,0x34,0x30,0x31,0x2d,0x31,0x39,0x39,0x39,0x31,0x32,0x32,0x34,0x2f, +0x6c,0x6f,0x6f,0x73,0x65,0x2e,0x64,0x74,0x64,0x22,0x3e,0x0a,0x3c,0x68,0x74,0x6d, +0x6c,0x3e,0x3c,0x68,0x65,0x61,0x64,0x3e,0x3c,0x74,0x69,0x74,0x6c,0x65,0x3e,0x53, +0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x41,0x44,0x43,0x3c,0x2f,0x74,0x69,0x74, +0x6c,0x65,0x3e,0x0d,0x0a,0x0d,0x0a,0x3c,0x6d,0x65,0x74,0x61,0x20,0x68,0x74,0x74, +0x70,0x2d,0x65,0x71,0x75,0x69,0x76,0x3d,0x22,0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74, +0x2d,0x54,0x79,0x70,0x65,0x22,0x20,0x63,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x3d,0x22, +0x74,0x65,0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x3b,0x20,0x63,0x68,0x61,0x72,0x73, +0x65,0x74,0x3d,0x77,0x69,0x6e,0x64,0x6f,0x77,0x73,0x2d,0x31,0x32,0x35,0x32,0x22, +0x3e,0x0d,0x0a,0x3c,0x6d,0x65,0x74,0x61,0x20,0x68,0x74,0x74,0x70,0x2d,0x65,0x71, +0x75,0x69,0x76,0x3d,0x22,0x72,0x65,0x66,0x72,0x65,0x73,0x68,0x22,0x20,0x63,0x6f, +0x6e,0x74,0x65,0x6e,0x74,0x3d,0x22,0x31,0x22,0x3e,0x0d,0x0a,0x3c,0x6d,0x65,0x74, +0x61,0x20,0x63,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x3d,0x22,0x4d,0x53,0x48,0x54,0x4d, +0x4c,0x20,0x36,0x2e,0x30,0x30,0x2e,0x32,0x39,0x30,0x30,0x2e,0x33,0x36,0x39,0x38, +0x22,0x20,0x6e,0x61,0x6d,0x65,0x3d,0x22,0x47,0x45,0x4e,0x45,0x52,0x41,0x54,0x4f, +0x52,0x22,0x3e,0x0d,0x0a,0x3c,0x73,0x74,0x79,0x6c,0x65,0x3e,0x3c,0x2f,0x73,0x74, +0x79,0x6c,0x65,0x3e,0x3c,0x21,0x2d,0x2d,0x20,0x73,0x61,0x76,0x65,0x64,0x20,0x66, +0x72,0x6f,0x6d,0x20,0x75,0x72,0x6c,0x3d,0x28,0x30,0x30,0x33,0x38,0x29,0x68,0x74, +0x74,0x70,0x3a,0x2f,0x2f,0x31,0x39,0x32,0x2e,0x31,0x36,0x38,0x2e,0x30,0x2e,0x31, +0x30,0x2f,0x53,0x54,0x4d,0x33,0x32,0x46,0x31,0x30,0x37,0x41,0x44,0x43,0x2e,0x73, +0x68,0x74,0x6d,0x6c,0x20,0x2d,0x2d,0x3e,0x3c,0x2f,0x68,0x65,0x61,0x64,0x3e,0x0d, +0x0a,0x3c,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x68,0x34,0x3e,0x3c,0x73,0x6d, +0x61,0x6c,0x6c,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d, +0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b, +0x22,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x62,0x69,0x67,0x3e,0x3c,0x62, +0x69,0x67,0x3e,0x3c,0x62,0x69,0x67,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66, +0x6f,0x6e,0x74,0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x62,0x6f,0x6c,0x64, +0x3b,0x22,0x3e,0x3c,0x62,0x69,0x67,0x3e,0x3c,0x73,0x74,0x72,0x6f,0x6e,0x67,0x3e, +0x3c,0x65,0x6d,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d, +0x22,0x66,0x6f,0x6e,0x74,0x2d,0x73,0x74,0x79,0x6c,0x65,0x3a,0x20,0x69,0x74,0x61, +0x6c,0x69,0x63,0x3b,0x22,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c, +0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x35,0x31, +0x2c,0x20,0x35,0x31,0x2c,0x20,0x32,0x35,0x35,0x29,0x3b,0x22,0x3e,0x53,0x54,0x4d, +0x33,0x32,0x48,0x37,0x20,0x41,0x44,0x43,0x20,0x43,0x6f,0x6e,0x76,0x65,0x72,0x73, +0x69,0x6f,0x6e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x0d,0x0a,0x26,0x6e,0x62,0x73, +0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26, +0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62, +0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70, +0x3b,0x0d,0x0a,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26, +0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62, +0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70, +0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x0d,0x0a,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26, +0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62, +0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70, +0x3b,0x26,0x6e,0x62,0x73,0x70,0x3b,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x69,0x6d, +0x67,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x77,0x69,0x64,0x74,0x68,0x3a,0x20, +0x39,0x36,0x70,0x78,0x3b,0x20,0x68,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x36,0x38, +0x70,0x78,0x3b,0x22,0x20,0x61,0x6c,0x74,0x3d,0x22,0x53,0x54,0x20,0x6c,0x6f,0x67, +0x6f,0x22,0x20,0x73,0x72,0x63,0x3d,0x22,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78, +0x78,0x5f,0x66,0x69,0x6c,0x65,0x73,0x2f,0x6c,0x6f,0x67,0x6f,0x2e,0x6a,0x70,0x67, +0x22,0x3e,0x20,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x65,0x6d,0x3e,0x3c, +0x2f,0x73,0x74,0x72,0x6f,0x6e,0x67,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x2f, +0x62,0x69,0x67,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e, +0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e, +0x3c,0x2f,0x68,0x34,0x3e,0x0d,0x0a,0x3c,0x68,0x72,0x20,0x73,0x74,0x79,0x6c,0x65, +0x3d,0x22,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x31,0x30,0x30,0x25,0x3b,0x20,0x68, +0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x32,0x70,0x78,0x3b,0x22,0x3e,0x0d,0x0a,0x3c, +0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74, +0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x62,0x6f,0x6c,0x64,0x3b,0x22,0x3e, +0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a, +0x20,0x62,0x6f,0x6c,0x64,0x3b,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x61,0x62,0x6c,0x65, +0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x39, +0x36,0x31,0x70,0x78,0x3b,0x20,0x68,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x33,0x30, +0x70,0x78,0x3b,0x22,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x31,0x22,0x20, +0x63,0x65,0x6c,0x6c,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3d,0x22,0x32,0x22,0x20, +0x63,0x65,0x6c,0x6c,0x73,0x70,0x61,0x63,0x69,0x6e,0x67,0x3d,0x22,0x32,0x22,0x3e, +0x0d,0x0a,0x3c,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x74,0x72,0x3e,0x0d, +0x0a,0x3c,0x74,0x64,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74, +0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x62,0x6f,0x6c,0x64,0x3b,0x20,0x66, +0x6f,0x6e,0x74,0x2d,0x73,0x74,0x79,0x6c,0x65,0x3a,0x20,0x69,0x74,0x61,0x6c,0x69, +0x63,0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20, +0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f, +0x75,0x6e,0x64,0x2d,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x35, +0x31,0x2c,0x20,0x35,0x31,0x2c,0x20,0x32,0x35,0x35,0x29,0x3b,0x20,0x74,0x65,0x78, +0x74,0x2d,0x61,0x6c,0x69,0x67,0x6e,0x3a,0x20,0x63,0x65,0x6e,0x74,0x65,0x72,0x3b, +0x22,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x61,0x20,0x68,0x72,0x65,0x66, +0x3d,0x22,0x2f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x68,0x74,0x6d,0x6c,0x22,0x3e,0x3c, +0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f, +0x72,0x3a,0x20,0x77,0x68,0x69,0x74,0x65,0x3b,0x22,0x3e,0x48,0x6f,0x6d,0x65,0x0d, +0x0a,0x70,0x61,0x67,0x65,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x61,0x3e, +0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c, +0x74,0x64,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x77, +0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x62,0x6f,0x6c,0x64,0x3b,0x20,0x66,0x6f,0x6e, +0x74,0x2d,0x73,0x74,0x79,0x6c,0x65,0x3a,0x20,0x69,0x74,0x61,0x6c,0x69,0x63,0x3b, +0x20,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65, +0x72,0x64,0x61,0x6e,0x61,0x3b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e, +0x64,0x2d,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x35,0x31,0x2c, +0x20,0x35,0x31,0x2c,0x20,0x32,0x35,0x35,0x29,0x3b,0x20,0x74,0x65,0x78,0x74,0x2d, +0x61,0x6c,0x69,0x67,0x6e,0x3a,0x20,0x63,0x65,0x6e,0x74,0x65,0x72,0x3b,0x22,0x3e, +0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22, +0x2f,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x4c,0x45,0x44,0x2e,0x68,0x74, +0x6d,0x6c,0x22,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d, +0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77,0x68,0x69,0x74,0x65,0x3b,0x22,0x3e, +0x4c,0x65,0x64,0x0d,0x0a,0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x3c,0x2f,0x73,0x70, +0x61,0x6e,0x3e,0x3c,0x2f,0x61,0x3e,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c, +0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d, +0x22,0x66,0x6f,0x6e,0x74,0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x62,0x6f, +0x6c,0x64,0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x73,0x74,0x79,0x6c,0x65,0x3a,0x20, +0x69,0x74,0x61,0x6c,0x69,0x63,0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d, +0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x20,0x62,0x61, +0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20, +0x72,0x67,0x62,0x28,0x35,0x31,0x2c,0x20,0x35,0x31,0x2c,0x20,0x32,0x35,0x35,0x29, +0x3b,0x20,0x74,0x65,0x78,0x74,0x2d,0x61,0x6c,0x69,0x67,0x6e,0x3a,0x20,0x63,0x65, +0x6e,0x74,0x65,0x72,0x3b,0x22,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x61, +0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x2f,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78, +0x78,0x41,0x44,0x43,0x2e,0x73,0x68,0x74,0x6d,0x6c,0x22,0x3e,0x3c,0x73,0x70,0x61, +0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20, +0x77,0x68,0x69,0x74,0x65,0x3b,0x22,0x3e,0x41,0x44,0x43,0x0d,0x0a,0x73,0x74,0x61, +0x74,0x75,0x73,0x20,0x62,0x61,0x72,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f, +0x61,0x3e,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f,0x74,0x64,0x3e,0x0d, +0x0a,0x3c,0x2f,0x74,0x72,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x62,0x6f,0x64,0x79,0x3e, +0x0d,0x0a,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65,0x3e,0x0d,0x0a,0x3c,0x2f,0x73,0x70, +0x61,0x6e,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20, +0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69, +0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x3c,0x2f, +0x73,0x70,0x61,0x6e,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65, +0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56, +0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c, +0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x0d,0x0a, +0x3c,0x64,0x6c,0x3e,0x0d,0x0a,0x3c,0x64,0x74,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c, +0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d, +0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x54, +0x68,0x69,0x73,0x20,0x70,0x61,0x67,0x65,0x0d,0x0a,0x61,0x6c,0x6c,0x6f,0x77,0x73, +0x20,0x79,0x6f,0x75,0x0d,0x0a,0x74,0x6f,0x20,0x67,0x65,0x74,0x20,0x63,0x6f,0x6e, +0x74,0x69,0x6e,0x75,0x6f,0x75,0x73,0x6c,0x79,0x20,0x74,0x68,0x65,0x20,0x41,0x44, +0x43,0x20,0x31,0x20,0x43,0x68,0x61,0x6e,0x6e,0x65,0x6c,0x20,0x30,0x20,0x61,0x6e, +0x61,0x6c,0x6f,0x67,0x20,0x69,0x6e,0x70,0x75,0x74,0x20,0x63,0x6f,0x6e,0x76,0x65, +0x72,0x74,0x65,0x64,0x20,0x76,0x61,0x6c,0x75,0x65,0x2e,0x0d,0x0a,0x54,0x68,0x69, +0x73,0x20,0x41,0x44,0x43,0x20,0x43,0x68,0x61,0x6e,0x6e,0x65,0x6c,0x20,0x69,0x73, +0x20,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64,0x20,0x74,0x6f,0x20,0x74,0x68, +0x65,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f,0x64,0x74,0x3e,0x0d,0x0a, +0x3c,0x64,0x74,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x20,0x73,0x74,0x79,0x6c,0x65, +0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56, +0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x53,0x54,0x4d,0x33,0x32,0x48,0x37, +0x34,0x33,0x49,0x2d,0x45,0x56,0x41,0x4c,0x0d,0x0a,0x62,0x6f,0x61,0x72,0x64,0x27, +0x73,0x0d,0x0a,0x70,0x6f,0x74,0x65,0x6e,0x74,0x69,0x6f,0x6d,0x65,0x74,0x65,0x72, +0x2e,0x20,0x54,0x68,0x65,0x20,0x41,0x44,0x43,0x20,0x76,0x61,0x6c,0x75,0x65,0x20, +0x69,0x73,0x20,0x75,0x70,0x64,0x61,0x74,0x65,0x64,0x2c,0x20,0x61,0x75,0x74,0x6f, +0x6d,0x61,0x74,0x69,0x63,0x61,0x6c,0x6c,0x79,0x2c,0x20,0x65,0x61,0x63,0x68,0x20, +0x31,0x73,0x20,0x77,0x69,0x74,0x68,0x0d,0x0a,0x74,0x68,0x65,0x20,0x6c,0x61,0x73, +0x74,0x0d,0x0a,0x63,0x6f,0x6e,0x76,0x65,0x72,0x74,0x65,0x64,0x20,0x41,0x44,0x43, +0x20,0x31,0x20,0x43,0x68,0x61,0x6e,0x6e,0x65,0x6c,0x20,0x30,0x20,0x76,0x61,0x6c, +0x75,0x65,0x2e,0x20,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f,0x64,0x74, +0x3e,0x0d,0x0a,0x3c,0x64,0x74,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x20,0x73,0x74, +0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79, +0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x59,0x6f,0x75,0x20, +0x63,0x6f,0x75,0x6c,0x64,0x0d,0x0a,0x63,0x68,0x65,0x63,0x6b,0x20,0x74,0x68,0x69, +0x73,0x20,0x62,0x79,0x0d,0x0a,0x63,0x68,0x61,0x6e,0x67,0x69,0x6e,0x67,0x20,0x74, +0x68,0x65,0x20,0x70,0x6f,0x74,0x65,0x6e,0x74,0x69,0x6f,0x6d,0x65,0x74,0x65,0x72, +0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x61,0x6e,0x64,0x20,0x63,0x68, +0x65,0x63,0x6b,0x20,0x74,0x68,0x61,0x74,0x20,0x74,0x68,0x65,0x20,0x41,0x44,0x43, +0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x69,0x73,0x0d,0x0a,0x75,0x70,0x64,0x61,0x74, +0x65,0x64,0x2c,0x20,0x62,0x79,0x20,0x61,0x6e,0x0d,0x0a,0x61,0x75,0x74,0x6f,0x6d, +0x61,0x74,0x69,0x63,0x20,0x72,0x65,0x66,0x72,0x65,0x73,0x68,0x20,0x6f,0x66,0x20, +0x74,0x68,0x69,0x73,0x20,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f,0x64, +0x74,0x3e,0x0d,0x0a,0x3c,0x64,0x74,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x20,0x73, +0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c, +0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x70,0x61,0x67, +0x65,0x2c,0x0d,0x0a,0x77,0x69,0x74,0x68,0x20,0x74,0x68,0x65,0x20,0x6e,0x65,0x77, +0x20,0x63,0x6f,0x6e,0x76,0x65,0x72,0x74,0x65,0x64,0x20,0x76,0x61,0x6c,0x75,0x65, +0x2e,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f,0x64,0x74,0x3e,0x0d,0x0a, +0x3c,0x2f,0x64,0x6c,0x3e,0x0d,0x0a,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x73,0x70, +0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66, +0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22, +0x3e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74, +0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79, +0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x3c,0x2f,0x73,0x70, +0x61,0x6e,0x3e,0x0d,0x0a,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x62,0x6f,0x72,0x64, +0x65,0x72,0x3d,0x22,0x31,0x22,0x20,0x63,0x65,0x6c,0x6c,0x70,0x61,0x64,0x64,0x69, +0x6e,0x67,0x3d,0x22,0x35,0x22,0x20,0x63,0x65,0x6c,0x6c,0x73,0x70,0x61,0x63,0x69, +0x6e,0x67,0x3d,0x22,0x31,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x62,0x6f,0x64,0x79,0x3e, +0x0d,0x0a,0x3c,0x74,0x72,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x3e,0x3c,0x73,0x6d,0x61, +0x6c,0x6c,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22, +0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72, +0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x41,0x44,0x43,0x0d,0x0a,0x43,0x6f,0x6e,0x76, +0x65,0x72,0x74,0x65,0x64,0x20,0x56,0x61,0x6c,0x75,0x65,0x3c,0x2f,0x73,0x70,0x61, +0x6e,0x3e,0x20,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f,0x74,0x64,0x3e, +0x0d,0x0a,0x3c,0x74,0x64,0x3e,0x3c,0x21,0x2d,0x2d,0x23,0x74,0x2d,0x2d,0x3e,0x20, +0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a, +0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x6d,0x76,0x3c,0x2f,0x73, +0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x20,0x3c,0x2f,0x74, +0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x72,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x62,0x6f, +0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65,0x3e,0x0d,0x0a,0x3c, +0x68,0x33,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x77, +0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x22,0x3e, +0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x2f,0x68,0x33,0x3e,0x0d,0x0a,0x3c,0x66,0x6f, +0x6e,0x74,0x20,0x73,0x69,0x7a,0x65,0x3d,0x22,0x2d,0x31,0x22,0x3e,0x3c,0x73,0x70, +0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a, +0x20,0x62,0x6c,0x61,0x63,0x6b,0x3b,0x22,0x3e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e, +0x3c,0x2f,0x66,0x6f,0x6e,0x74,0x3e,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x66,0x6f, +0x6e,0x74,0x20,0x73,0x69,0x7a,0x65,0x3d,0x22,0x2d,0x31,0x22,0x3e,0x3c,0x73,0x70, +0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a, +0x20,0x62,0x6c,0x61,0x63,0x6b,0x3b,0x22,0x3e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e, +0x3c,0x2f,0x66,0x6f,0x6e,0x74,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a, +0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x3c,0x2f,0x73,0x70,0x61, +0x6e,0x3e,0x3c,0x61,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74, +0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61, +0x3b,0x22,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x2f,0x53,0x54,0x4d,0x33,0x32,0x46, +0x31,0x30,0x37,0x2e,0x68,0x74,0x6d,0x6c,0x22,0x3e,0x3c,0x62,0x69,0x67,0x3e,0x3c, +0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74, +0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x62,0x6f,0x6c,0x64,0x3b,0x22,0x3e, +0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x2f,0x61, +0x3e,0x3c,0x66,0x6f,0x6e,0x74,0x20,0x73,0x69,0x7a,0x65,0x3d,0x22,0x2d,0x31,0x22, +0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f, +0x6c,0x6f,0x72,0x3a,0x20,0x62,0x6c,0x61,0x63,0x6b,0x3b,0x22,0x3e,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x3c,0x62,0x72,0x3e, +0x0d,0x0a,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x66,0x6f,0x6e,0x74,0x3e, +0x3c,0x66,0x6f,0x6e,0x74,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x66,0x6f,0x6f, +0x74,0x6d,0x73,0x67,0x22,0x3e,0x26,0x6e,0x62,0x73,0x70,0x3b,0x0d,0x0a,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73, +0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x0d,0x0a,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20, +0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73, +0x70,0x3b,0x0d,0x0a,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70, +0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20, +0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x0d,0x0a,0x26, +0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62, +0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x63,0x6f,0x6d,0x6d,0x65, +0x6e,0x74,0x20,0x74,0x69,0x74,0x6c,0x65,0x3d,0x22,0x23,0x63,0x6f,0x6e,0x66,0x69, +0x67,0x20,0x74,0x69,0x6d,0x65,0x66,0x6d,0x74,0x3d,0x26,0x71,0x75,0x6f,0x74,0x3b, +0x25,0x59,0x26,0x71,0x75,0x6f,0x74,0x3b,0x20,0x22,0x20,0x78,0x6d,0x6c,0x6e,0x73, +0x3d,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x64,0x69,0x73,0x72,0x75,0x70,0x74, +0x69,0x76,0x65,0x2d,0x69,0x6e,0x6e,0x6f,0x76,0x61,0x74,0x69,0x6f,0x6e,0x73,0x2e, +0x63,0x6f,0x6d,0x2f,0x7a,0x6f,0x6f,0x2f,0x6e,0x76,0x75,0x22,0x3e,0x3c,0x21,0x2d, +0x2d,0x23,0x63,0x6f,0x6e,0x66,0x69,0x67,0x20,0x74,0x69,0x6d,0x65,0x66,0x6d,0x74, +0x3d,0x22,0x25,0x59,0x22,0x20,0x2d,0x2d,0x3e,0x3c,0x2f,0x63,0x6f,0x6d,0x6d,0x65, +0x6e,0x74,0x3e,0x3c,0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x20,0x74,0x69,0x74,0x6c, +0x65,0x3d,0x22,0x23,0x65,0x63,0x68,0x6f,0x20,0x76,0x61,0x72,0x3d,0x26,0x71,0x75, +0x6f,0x74,0x3b,0x44,0x41,0x54,0x45,0x5f,0x47,0x4d,0x54,0x26,0x71,0x75,0x6f,0x74, +0x3b,0x20,0x22,0x20,0x78,0x6d,0x6c,0x6e,0x73,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a, +0x2f,0x2f,0x64,0x69,0x73,0x72,0x75,0x70,0x74,0x69,0x76,0x65,0x2d,0x69,0x6e,0x6e, +0x6f,0x76,0x61,0x74,0x69,0x6f,0x6e,0x73,0x2e,0x63,0x6f,0x6d,0x2f,0x7a,0x6f,0x6f, +0x2f,0x6e,0x76,0x75,0x22,0x3e,0x3c,0x21,0x2d,0x2d,0x23,0x65,0x63,0x68,0x6f,0x20, +0x76,0x61,0x72,0x3d,0x22,0x44,0x41,0x54,0x45,0x5f,0x47,0x4d,0x54,0x22,0x20,0x2d, +0x2d,0x3e,0x3c,0x2f,0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x3e,0x0d,0x0a,0x3c,0x73, +0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72, +0x3a,0x20,0x73,0x69,0x6c,0x76,0x65,0x72,0x3b,0x22,0x3e,0x26,0x6e,0x62,0x73,0x70, +0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x0d,0x0a,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26, +0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x41,0x6c,0x6c,0x20, +0x72,0x69,0x67,0x68,0x74,0x73,0x0d,0x0a,0x72,0x65,0x73,0x65,0x72,0x76,0x65,0x64, +0x20,0xa9,0x20,0x32,0x30,0x31,0x37,0x20,0x53,0x54,0x4d,0x69,0x63,0x72,0x6f,0x65, +0x6c,0x65,0x63,0x74,0x72,0x6f,0x6e,0x69,0x63,0x73,0x3c,0x2f,0x73,0x70,0x61,0x6e, +0x3e,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x2f,0x66,0x6f,0x6e,0x74,0x3e,0x0d,0x0a, +0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x3c,0x2f,0x68,0x74,0x6d,0x6c,0x3e,}; + +const unsigned int dummy_align__STM32H7xxLED_html = 6; +const unsigned char data__STM32H7xxLED_html[] = { +/* /STM32H7xxLED.html (19 chars) */ +0x2f,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x4c,0x45,0x44,0x2e,0x68,0x74, +0x6d,0x6c,0x00,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) +" (63 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, +0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, +0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, +0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, +/* "Content-type: text/html + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, +0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x0d,0x0a, +/* raw file data (4416 bytes) */ +0x3c,0x21,0x44,0x4f,0x43,0x54,0x59,0x50,0x45,0x20,0x68,0x74,0x6d,0x6c,0x20,0x50, +0x55,0x42,0x4c,0x49,0x43,0x20,0x22,0x2d,0x2f,0x2f,0x57,0x33,0x43,0x2f,0x2f,0x44, +0x54,0x44,0x20,0x48,0x54,0x4d,0x4c,0x20,0x34,0x2e,0x30,0x31,0x2f,0x2f,0x45,0x4e, +0x22,0x20,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x77,0x33, +0x2e,0x6f,0x72,0x67,0x2f,0x54,0x52,0x2f,0x68,0x74,0x6d,0x6c,0x34,0x2f,0x73,0x74, +0x72,0x69,0x63,0x74,0x2e,0x64,0x74,0x64,0x22,0x3e,0x0a,0x3c,0x68,0x74,0x6d,0x6c, +0x3e,0x3c,0x68,0x65,0x61,0x64,0x3e,0x3c,0x74,0x69,0x74,0x6c,0x65,0x3e,0x53,0x54, +0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x4c,0x45,0x44,0x3c,0x2f,0x74,0x69,0x74,0x6c, +0x65,0x3e,0x0d,0x0a,0x0d,0x0a,0x3c,0x6d,0x65,0x74,0x61,0x20,0x68,0x74,0x74,0x70, +0x2d,0x65,0x71,0x75,0x69,0x76,0x3d,0x22,0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d, +0x54,0x79,0x70,0x65,0x22,0x20,0x63,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x3d,0x22,0x74, +0x65,0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x3b,0x20,0x63,0x68,0x61,0x72,0x73,0x65, +0x74,0x3d,0x77,0x69,0x6e,0x64,0x6f,0x77,0x73,0x2d,0x31,0x32,0x35,0x32,0x22,0x3e, +0x0d,0x0a,0x3c,0x6d,0x65,0x74,0x61,0x20,0x63,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x3d, +0x22,0x4d,0x53,0x48,0x54,0x4d,0x4c,0x20,0x36,0x2e,0x30,0x30,0x2e,0x32,0x38,0x30, +0x30,0x2e,0x31,0x35,0x36,0x31,0x22,0x20,0x6e,0x61,0x6d,0x65,0x3d,0x22,0x47,0x45, +0x4e,0x45,0x52,0x41,0x54,0x4f,0x52,0x22,0x3e,0x0d,0x0a,0x3c,0x73,0x74,0x79,0x6c, +0x65,0x20,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a, +0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61, +0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e, +0x3c,0x2f,0x73,0x74,0x79,0x6c,0x65,0x3e,0x3c,0x2f,0x68,0x65,0x61,0x64,0x3e,0x0d, +0x0a,0x3c,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x68,0x34,0x3e,0x3c,0x73,0x6d, +0x61,0x6c,0x6c,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d, +0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b, +0x22,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x62,0x69,0x67,0x3e,0x3c,0x62, +0x69,0x67,0x3e,0x3c,0x62,0x69,0x67,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66, +0x6f,0x6e,0x74,0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x62,0x6f,0x6c,0x64, +0x3b,0x22,0x3e,0x3c,0x62,0x69,0x67,0x3e,0x3c,0x73,0x74,0x72,0x6f,0x6e,0x67,0x20, +0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67, +0x62,0x28,0x35,0x31,0x2c,0x20,0x35,0x31,0x2c,0x20,0x32,0x35,0x35,0x29,0x3b,0x22, +0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f, +0x6e,0x74,0x2d,0x73,0x74,0x79,0x6c,0x65,0x3a,0x20,0x69,0x74,0x61,0x6c,0x69,0x63, +0x3b,0x22,0x3e,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x20,0x4c,0x45,0x44,0x73,0x20, +0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f, +0x73,0x74,0x72,0x6f,0x6e,0x67,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x35, +0x31,0x2c,0x20,0x35,0x31,0x2c,0x20,0x32,0x35,0x35,0x29,0x3b,0x22,0x3e,0x20,0x3c, +0x2f,0x73,0x70,0x61,0x6e,0x3e,0x26,0x6e,0x62,0x73,0x70,0x3b,0x0d,0x0a,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73, +0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26, +0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62, +0x73,0x70,0x3b,0x0d,0x0a,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73, +0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26, +0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62, +0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x0d,0x0a,0x26,0x6e,0x62,0x73, +0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26, +0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62, +0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70, +0x3b,0x0d,0x0a,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x69,0x6d,0x67,0x20,0x73,0x74, +0x79,0x6c,0x65,0x3d,0x22,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x39,0x36,0x70,0x78, +0x3b,0x20,0x68,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x36,0x38,0x70,0x78,0x3b,0x22, +0x20,0x61,0x6c,0x74,0x3d,0x22,0x53,0x54,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x20,0x73, +0x72,0x63,0x3d,0x22,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x5f,0x66,0x69, +0x6c,0x65,0x73,0x2f,0x6c,0x6f,0x67,0x6f,0x2e,0x6a,0x70,0x67,0x22,0x3e,0x3c,0x2f, +0x62,0x69,0x67,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e, +0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f, +0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f,0x68,0x34,0x3e,0x0d,0x0a,0x3c,0x68,0x72, +0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x31, +0x30,0x30,0x25,0x3b,0x20,0x68,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x32,0x70,0x78, +0x3b,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x73,0x74,0x79,0x6c, +0x65,0x3d,0x22,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x39,0x36,0x31,0x70,0x78,0x3b, +0x20,0x68,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x33,0x30,0x70,0x78,0x3b,0x22,0x20, +0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x31,0x22,0x20,0x63,0x65,0x6c,0x6c,0x70, +0x61,0x64,0x64,0x69,0x6e,0x67,0x3d,0x22,0x32,0x22,0x20,0x63,0x65,0x6c,0x6c,0x73, +0x70,0x61,0x63,0x69,0x6e,0x67,0x3d,0x22,0x32,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x62, +0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x74,0x72,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20, +0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69, +0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x20,0x66,0x6f,0x6e, +0x74,0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x62,0x6f,0x6c,0x64,0x3b,0x20, +0x66,0x6f,0x6e,0x74,0x2d,0x73,0x74,0x79,0x6c,0x65,0x3a,0x20,0x69,0x74,0x61,0x6c, +0x69,0x63,0x3b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x63, +0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x35,0x31,0x2c,0x20,0x35,0x31, +0x2c,0x20,0x32,0x35,0x35,0x29,0x3b,0x20,0x74,0x65,0x78,0x74,0x2d,0x61,0x6c,0x69, +0x67,0x6e,0x3a,0x20,0x63,0x65,0x6e,0x74,0x65,0x72,0x3b,0x22,0x3e,0x3c,0x73,0x6d, +0x61,0x6c,0x6c,0x3e,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x2f,0x69,0x6e, +0x64,0x65,0x78,0x2e,0x68,0x74,0x6d,0x6c,0x22,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20, +0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77,0x68, +0x69,0x74,0x65,0x3b,0x22,0x3e,0x48,0x6f,0x6d,0x65,0x0d,0x0a,0x70,0x61,0x67,0x65, +0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x61,0x3e,0x3c,0x2f,0x73,0x6d,0x61, +0x6c,0x6c,0x3e,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x73,0x74, +0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79, +0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d, +0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x62,0x6f,0x6c,0x64,0x3b,0x20,0x66,0x6f, +0x6e,0x74,0x2d,0x73,0x74,0x79,0x6c,0x65,0x3a,0x20,0x69,0x74,0x61,0x6c,0x69,0x63, +0x3b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x63,0x6f,0x6c, +0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x35,0x31,0x2c,0x20,0x35,0x31,0x2c,0x20, +0x32,0x35,0x35,0x29,0x3b,0x20,0x74,0x65,0x78,0x74,0x2d,0x61,0x6c,0x69,0x67,0x6e, +0x3a,0x20,0x63,0x65,0x6e,0x74,0x65,0x72,0x3b,0x22,0x3e,0x3c,0x73,0x6d,0x61,0x6c, +0x6c,0x3e,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x2f,0x53,0x54,0x4d,0x33, +0x32,0x48,0x37,0x78,0x78,0x4c,0x45,0x44,0x2e,0x68,0x74,0x6d,0x6c,0x22,0x3e,0x3c, +0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f, +0x72,0x3a,0x20,0x77,0x68,0x69,0x74,0x65,0x3b,0x22,0x3e,0x4c,0x65,0x64,0x0d,0x0a, +0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f, +0x61,0x3e,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f,0x74,0x64,0x3e,0x0d, +0x0a,0x3c,0x74,0x64,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74, +0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61, +0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x62, +0x6f,0x6c,0x64,0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x73,0x74,0x79,0x6c,0x65,0x3a, +0x20,0x69,0x74,0x61,0x6c,0x69,0x63,0x3b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f, +0x75,0x6e,0x64,0x2d,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x35, +0x31,0x2c,0x20,0x35,0x31,0x2c,0x20,0x32,0x35,0x35,0x29,0x3b,0x20,0x74,0x65,0x78, +0x74,0x2d,0x61,0x6c,0x69,0x67,0x6e,0x3a,0x20,0x63,0x65,0x6e,0x74,0x65,0x72,0x3b, +0x22,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x61,0x20,0x68,0x72,0x65,0x66, +0x3d,0x22,0x2f,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x78,0x41,0x44,0x43,0x2e, +0x73,0x68,0x74,0x6d,0x6c,0x22,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77,0x68,0x69,0x74,0x65, +0x3b,0x22,0x3e,0x41,0x44,0x43,0x0d,0x0a,0x73,0x74,0x61,0x74,0x75,0x73,0x20,0x62, +0x61,0x72,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x61,0x3e,0x3c,0x2f,0x73, +0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x72, +0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x74, +0x61,0x62,0x6c,0x65,0x3e,0x0d,0x0a,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x62,0x69, +0x67,0x3e,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x73, +0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65, +0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56, +0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x54,0x68,0x69,0x73,0x0d,0x0a,0x70, +0x61,0x67,0x65,0x0d,0x0a,0x61,0x6c,0x6c,0x6f,0x77,0x73,0x20,0x79,0x6f,0x75,0x20, +0x74,0x6f,0x20,0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x20,0x74,0x68,0x65,0x20,0x66, +0x6f,0x75,0x72,0x20,0x4c,0x45,0x44,0x73,0x3a,0x20,0x4c,0x45,0x44,0x31,0x2c,0x20, +0x4c,0x45,0x44,0x32,0x2c,0x20,0x4c,0x45,0x44,0x33,0x20,0x61,0x6e,0x64,0x20,0x4c, +0x45,0x44,0x34,0x20,0x6c,0x6f,0x63,0x61,0x74,0x65,0x64,0x0d,0x0a,0x69,0x6e,0x0d, +0x0a,0x74,0x68,0x65,0x26,0x6e,0x62,0x73,0x70,0x3b,0x53,0x54,0x4d,0x33,0x32,0x48, +0x37,0x34,0x33,0x49,0x2d,0x45,0x56,0x41,0x4c,0x20,0x62,0x6f,0x61,0x72,0x64,0x2e, +0x20,0x54,0x6f,0x20,0x70,0x75,0x74,0x20,0x6f,0x6e,0x2f,0x6f,0x66,0x66,0x3c,0x2f, +0x73,0x70,0x61,0x6e,0x3e,0x3c,0x62,0x72,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22, +0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72, +0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x0d,0x0a,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73, +0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c, +0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x61,0x20,0x4c, +0x45,0x44,0x20,0x79,0x6f,0x75,0x20,0x68,0x61,0x76,0x65,0x20,0x74,0x6f,0x0d,0x0a, +0x63,0x68,0x65,0x63,0x6b,0x2f,0x75,0x6e,0x63,0x68,0x65,0x63,0x6b,0x20,0x69,0x74, +0x73,0x20,0x63,0x6f,0x72,0x72,0x65,0x73,0x70,0x6f,0x6e,0x64,0x69,0x6e,0x67,0x20, +0x63,0x68,0x65,0x63,0x6b,0x62,0x6f,0x78,0x2e,0x20,0x54,0x68,0x65,0x6e,0x20,0x79, +0x6f,0x75,0x20,0x68,0x61,0x76,0x65,0x20,0x74,0x6f,0x20,0x63,0x6c,0x69,0x63,0x6b, +0x20,0x6f,0x6e,0x0d,0x0a,0x22,0x53,0x65,0x6e,0x64,0x22,0x20,0x62,0x75,0x74,0x74, +0x6f,0x6e,0x20,0x74,0x6f,0x20,0x73,0x75,0x62,0x6d,0x69,0x74,0x20,0x74,0x68,0x65, +0x20,0x6e,0x65,0x77,0x20,0x4c,0x45,0x44,0x73,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e, +0x3c,0x62,0x72,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d, +0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b, +0x22,0x3e,0x0d,0x0a,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d, +0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65, +0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x63,0x6f,0x6e,0x66,0x69,0x67,0x75,0x72, +0x61,0x74,0x69,0x6f,0x6e,0x2e,0x20,0x46,0x69,0x6e,0x61,0x6c,0x6c,0x79,0x0d,0x0a, +0x63,0x68,0x65,0x63,0x6b,0x20,0x69,0x6e,0x20,0x74,0x68,0x65,0x26,0x6e,0x62,0x73, +0x70,0x3b,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x73,0x6d,0x61,0x6c,0x6c, +0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74, +0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79, +0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x53,0x54,0x4d,0x33, +0x32,0x48,0x37,0x34,0x33,0x49,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x73, +0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x73,0x6d,0x61,0x6c,0x6c,0x3e,0x3c,0x73,0x70,0x61, +0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61, +0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e, +0x2d,0x45,0x56,0x41,0x4c,0x20,0x62,0x6f,0x61,0x72,0x64,0x20,0x74,0x68,0x61,0x74, +0x20,0x79,0x6f,0x75,0x20,0x67,0x65,0x74,0x20,0x74,0x68,0x65,0x0d,0x0a,0x64,0x65, +0x73,0x69,0x72,0x65,0x64,0x0d,0x0a,0x4c,0x45,0x44,0x73,0x0d,0x0a,0x61,0x72,0x65, +0x20,0x70,0x75,0x74,0x74,0x65,0x64,0x20,0x6f,0x6e,0x2f,0x6f,0x66,0x66,0x2e,0x20, +0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x62,0x72,0x20,0x73,0x74,0x79,0x6c,0x65, +0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56, +0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x0d,0x0a,0x3c,0x2f,0x73,0x6d,0x61, +0x6c,0x6c,0x3e,0x0d,0x0a,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x62,0x72,0x3e,0x0d, +0x0a,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63, +0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77,0x68,0x69,0x74,0x65,0x3b,0x20,0x77,0x69,0x64, +0x74,0x68,0x3a,0x20,0x39,0x36,0x31,0x70,0x78,0x3b,0x20,0x68,0x65,0x69,0x67,0x68, +0x74,0x3a,0x20,0x33,0x38,0x70,0x78,0x3b,0x22,0x20,0x77,0x68,0x69,0x74,0x65,0x3d, +0x22,0x22,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3d,0x22,0x22,0x20,0x3b,0x3d,0x22,0x22, +0x20,0x31,0x30,0x30,0x3d,0x22,0x22,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22, +0x30,0x22,0x20,0x63,0x65,0x6c,0x6c,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3d,0x22, +0x33,0x22,0x20,0x63,0x65,0x6c,0x6c,0x73,0x70,0x61,0x63,0x69,0x6e,0x67,0x3d,0x22, +0x30,0x22,0x3e,0x0d,0x0a,0x3c,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x74, +0x72,0x3e,0x0d,0x0a,0x3c,0x74,0x64,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x74, +0x61,0x62,0x74,0x69,0x74,0x6c,0x65,0x22,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22, +0x68,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x31,0x35,0x70,0x78,0x3b,0x20,0x62,0x61, +0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20, +0x72,0x67,0x62,0x28,0x35,0x31,0x2c,0x20,0x35,0x31,0x2c,0x20,0x32,0x35,0x35,0x29, +0x3b,0x22,0x3e,0x3c,0x62,0x69,0x67,0x3e,0x3c,0x62,0x69,0x67,0x3e,0x3c,0x66,0x6f, +0x6e,0x74,0x20,0x73,0x69,0x7a,0x65,0x3d,0x22,0x2d,0x31,0x22,0x3e,0x3c,0x62,0x69, +0x67,0x3e,0x3c,0x62,0x69,0x67,0x3e,0x3c,0x73,0x74,0x72,0x6f,0x6e,0x67,0x3e,0x53, +0x54,0x4d,0x33,0x32,0x0d,0x0a,0x57,0x65,0x62,0x73,0x65,0x72,0x76,0x65,0x72,0x20, +0x4c,0x45,0x44,0x73,0x20,0x43,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x3c,0x2f,0x73,0x74, +0x72,0x6f,0x6e,0x67,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x2f,0x62,0x69,0x67, +0x3e,0x3c,0x2f,0x66,0x6f,0x6e,0x74,0x3e,0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x2f, +0x62,0x69,0x67,0x3e,0x3c,0x2f,0x74,0x64,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x72,0x3e, +0x0d,0x0a,0x3c,0x2f,0x74,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x74,0x61, +0x62,0x6c,0x65,0x3e,0x0d,0x0a,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x66,0x6f,0x72, +0x6d,0x20,0x6d,0x65,0x74,0x68,0x6f,0x64,0x3d,0x22,0x67,0x65,0x74,0x22,0x20,0x61, +0x63,0x74,0x69,0x6f,0x6e,0x3d,0x22,0x2f,0x6c,0x65,0x64,0x73,0x2e,0x63,0x67,0x69, +0x22,0x3e,0x3c,0x69,0x6e,0x70,0x75,0x74,0x20,0x76,0x61,0x6c,0x75,0x65,0x3d,0x22, +0x31,0x22,0x20,0x6e,0x61,0x6d,0x65,0x3d,0x22,0x6c,0x65,0x64,0x22,0x20,0x74,0x79, +0x70,0x65,0x3d,0x22,0x63,0x68,0x65,0x63,0x6b,0x62,0x6f,0x78,0x22,0x3e,0x4c,0x45, +0x44,0x31,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x69,0x6e,0x70,0x75,0x74,0x20,0x76, +0x61,0x6c,0x75,0x65,0x3d,0x22,0x32,0x22,0x20,0x6e,0x61,0x6d,0x65,0x3d,0x22,0x6c, +0x65,0x64,0x22,0x20,0x74,0x79,0x70,0x65,0x3d,0x22,0x63,0x68,0x65,0x63,0x6b,0x62, +0x6f,0x78,0x22,0x3e,0x4c,0x45,0x44,0x32,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x69, +0x6e,0x70,0x75,0x74,0x20,0x76,0x61,0x6c,0x75,0x65,0x3d,0x22,0x33,0x22,0x20,0x6e, +0x61,0x6d,0x65,0x3d,0x22,0x6c,0x65,0x64,0x22,0x20,0x74,0x79,0x70,0x65,0x3d,0x22, +0x63,0x68,0x65,0x63,0x6b,0x62,0x6f,0x78,0x22,0x3e,0x4c,0x45,0x44,0x33,0x3c,0x62, +0x72,0x3e,0x0d,0x0a,0x3c,0x69,0x6e,0x70,0x75,0x74,0x20,0x76,0x61,0x6c,0x75,0x65, +0x3d,0x22,0x34,0x22,0x20,0x6e,0x61,0x6d,0x65,0x3d,0x22,0x6c,0x65,0x64,0x22,0x20, +0x74,0x79,0x70,0x65,0x3d,0x22,0x63,0x68,0x65,0x63,0x6b,0x62,0x6f,0x78,0x22,0x3e, +0x4c,0x45,0x44,0x34,0x0d,0x0a,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x62,0x72,0x3e, +0x0d,0x0a,0x3c,0x69,0x6e,0x70,0x75,0x74,0x20,0x76,0x61,0x6c,0x75,0x65,0x3d,0x22, +0x53,0x65,0x6e,0x64,0x22,0x20,0x74,0x79,0x70,0x65,0x3d,0x22,0x73,0x75,0x62,0x6d, +0x69,0x74,0x22,0x3e,0x20,0x3c,0x2f,0x66,0x6f,0x72,0x6d,0x3e,0x0d,0x0a,0x3c,0x68, +0x33,0x3e,0x3c,0x66,0x6f,0x6e,0x74,0x20,0x73,0x69,0x7a,0x65,0x3d,0x22,0x2d,0x31, +0x22,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63, +0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x62,0x6c,0x61,0x63,0x6b,0x3b,0x22,0x3e,0x3c,0x2f, +0x73,0x70,0x61,0x6e,0x3e,0x0d,0x0a,0x3c,0x2f,0x66,0x6f,0x6e,0x74,0x3e,0x3c,0x2f, +0x68,0x33,0x3e,0x0d,0x0a,0x3c,0x68,0x33,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22, +0x66,0x6f,0x6e,0x74,0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x6e,0x6f,0x72, +0x6d,0x61,0x6c,0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79, +0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x3e,0x3c,0x66,0x6f,0x6e, +0x74,0x20,0x73,0x69,0x7a,0x65,0x3d,0x22,0x2d,0x31,0x22,0x3e,0x3c,0x62,0x72,0x3e, +0x0d,0x0a,0x3c,0x2f,0x66,0x6f,0x6e,0x74,0x3e,0x3c,0x2f,0x68,0x33,0x3e,0x0d,0x0a, +0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e, +0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e, +0x61,0x3b,0x22,0x3e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x66,0x6f,0x6e,0x74, +0x20,0x73,0x69,0x7a,0x65,0x3d,0x22,0x2d,0x31,0x22,0x3e,0x3c,0x61,0x20,0x73,0x74, +0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79, +0x3a,0x20,0x56,0x65,0x72,0x64,0x61,0x6e,0x61,0x3b,0x22,0x20,0x68,0x72,0x65,0x66, +0x3d,0x22,0x2f,0x53,0x54,0x4d,0x33,0x32,0x48,0x37,0x78,0x37,0x2e,0x68,0x74,0x6d, +0x6c,0x22,0x3e,0x3c,0x62,0x69,0x67,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74, +0x79,0x6c,0x65,0x3d,0x22,0x66,0x6f,0x6e,0x74,0x2d,0x77,0x65,0x69,0x67,0x68,0x74, +0x3a,0x20,0x62,0x6f,0x6c,0x64,0x3b,0x22,0x3e,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e, +0x3c,0x2f,0x62,0x69,0x67,0x3e,0x3c,0x2f,0x61,0x3e,0x3c,0x2f,0x66,0x6f,0x6e,0x74, +0x3e,0x0d,0x0a,0x3c,0x66,0x6f,0x6e,0x74,0x20,0x73,0x69,0x7a,0x65,0x3d,0x22,0x2d, +0x31,0x22,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22, +0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x62,0x6c,0x61,0x63,0x6b,0x3b,0x22,0x3e,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x3c,0x62, +0x72,0x3e,0x0d,0x0a,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x66,0x6f,0x6e, +0x74,0x3e,0x3c,0x66,0x6f,0x6e,0x74,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x66, +0x6f,0x6f,0x74,0x6d,0x73,0x67,0x22,0x3e,0x26,0x6e,0x62,0x73,0x70,0x3b,0x0d,0x0a, +0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73, +0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x0d,0x0a,0x26,0x6e,0x62,0x73,0x70, +0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20, +0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x0d,0x0a,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62, +0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70, +0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x0d, +0x0a,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26, +0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x63,0x6f,0x6d, +0x6d,0x65,0x6e,0x74,0x20,0x74,0x69,0x74,0x6c,0x65,0x3d,0x22,0x23,0x63,0x6f,0x6e, +0x66,0x69,0x67,0x20,0x74,0x69,0x6d,0x65,0x66,0x6d,0x74,0x3d,0x26,0x71,0x75,0x6f, +0x74,0x3b,0x25,0x59,0x26,0x71,0x75,0x6f,0x74,0x3b,0x20,0x22,0x20,0x78,0x6d,0x6c, +0x6e,0x73,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x64,0x69,0x73,0x72,0x75, +0x70,0x74,0x69,0x76,0x65,0x2d,0x69,0x6e,0x6e,0x6f,0x76,0x61,0x74,0x69,0x6f,0x6e, +0x73,0x2e,0x63,0x6f,0x6d,0x2f,0x7a,0x6f,0x6f,0x2f,0x6e,0x76,0x75,0x22,0x3e,0x3c, +0x21,0x2d,0x2d,0x23,0x63,0x6f,0x6e,0x66,0x69,0x67,0x20,0x74,0x69,0x6d,0x65,0x66, +0x6d,0x74,0x3d,0x22,0x25,0x59,0x22,0x20,0x2d,0x2d,0x3e,0x3c,0x2f,0x63,0x6f,0x6d, +0x6d,0x65,0x6e,0x74,0x3e,0x3c,0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x20,0x74,0x69, +0x74,0x6c,0x65,0x3d,0x22,0x23,0x65,0x63,0x68,0x6f,0x20,0x76,0x61,0x72,0x3d,0x26, +0x71,0x75,0x6f,0x74,0x3b,0x44,0x41,0x54,0x45,0x5f,0x47,0x4d,0x54,0x26,0x71,0x75, +0x6f,0x74,0x3b,0x20,0x22,0x20,0x78,0x6d,0x6c,0x6e,0x73,0x3d,0x22,0x68,0x74,0x74, +0x70,0x3a,0x2f,0x2f,0x64,0x69,0x73,0x72,0x75,0x70,0x74,0x69,0x76,0x65,0x2d,0x69, +0x6e,0x6e,0x6f,0x76,0x61,0x74,0x69,0x6f,0x6e,0x73,0x2e,0x63,0x6f,0x6d,0x2f,0x7a, +0x6f,0x6f,0x2f,0x6e,0x76,0x75,0x22,0x3e,0x3c,0x21,0x2d,0x2d,0x23,0x65,0x63,0x68, +0x6f,0x20,0x76,0x61,0x72,0x3d,0x22,0x44,0x41,0x54,0x45,0x5f,0x47,0x4d,0x54,0x22, +0x20,0x2d,0x2d,0x3e,0x3c,0x2f,0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x3e,0x0d,0x0a, +0x3c,0x73,0x70,0x61,0x6e,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x63,0x6f,0x6c, +0x6f,0x72,0x3a,0x20,0x73,0x69,0x6c,0x76,0x65,0x72,0x3b,0x22,0x3e,0x26,0x6e,0x62, +0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x0d,0x0a,0x26,0x6e,0x62,0x73, +0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b, +0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x20,0x26,0x6e,0x62,0x73,0x70,0x3b,0x41,0x6c, +0x6c,0x20,0x72,0x69,0x67,0x68,0x74,0x73,0x0d,0x0a,0x72,0x65,0x73,0x65,0x72,0x76, +0x65,0x64,0x20,0xa9,0x20,0x32,0x30,0x31,0x37,0x20,0x53,0x54,0x4d,0x69,0x63,0x72, +0x6f,0x65,0x6c,0x65,0x63,0x74,0x72,0x6f,0x6e,0x69,0x63,0x73,0x3c,0x2f,0x73,0x70, +0x61,0x6e,0x3e,0x26,0x6e,0x62,0x73,0x70,0x3b,0x3c,0x2f,0x66,0x6f,0x6e,0x74,0x3e, +0x0d,0x0a,0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x3c,0x2f,0x68,0x74,0x6d,0x6c,0x3e, +}; + + + +const struct fsdata_file file__STM32H7xx_files_logo_jpg[] = { { +file_NULL, +data__STM32H7xx_files_logo_jpg, +data__STM32H7xx_files_logo_jpg + 28, +sizeof(data__STM32H7xx_files_logo_jpg) - 28, +1, +}}; + +const struct fsdata_file file__STM32H7xx_files_ST_gif[] = { { +file__STM32H7xx_files_logo_jpg, +data__STM32H7xx_files_ST_gif, +data__STM32H7xx_files_ST_gif + 24, +sizeof(data__STM32H7xx_files_ST_gif) - 24, +1, +}}; + +const struct fsdata_file file__STM32H7xx_files_stm32_jpg[] = { { +file__STM32H7xx_files_ST_gif, +data__STM32H7xx_files_stm32_jpg, +data__STM32H7xx_files_stm32_jpg + 28, +sizeof(data__STM32H7xx_files_stm32_jpg) - 28, +1, +}}; + +const struct fsdata_file file__404_html[] = { { +file__STM32H7xx_files_stm32_jpg, +data__404_html, +data__404_html + 12, +sizeof(data__404_html) - 12, +1, +}}; + +const struct fsdata_file file__index_html[] = { { +file__404_html, +data__index_html, +data__index_html + 12, +sizeof(data__index_html) - 12, +1, +}}; + +const struct fsdata_file file__STM32H7xxADC_shtml[] = { { +file__index_html, +data__STM32H7xxADC_shtml, +data__STM32H7xxADC_shtml + 20, +sizeof(data__STM32H7xxADC_shtml) - 20, +1, +}}; + +const struct fsdata_file file__STM32H7xxLED_html[] = { { +file__STM32H7xxADC_shtml, +data__STM32H7xxLED_html, +data__STM32H7xxLED_html + 20, +sizeof(data__STM32H7xxLED_html) - 20, +1, +}}; + + + diff --git a/User/lwip_if/lwip_http/fsdata_new.c b/User/lwip_if/lwip_http/fsdata_new.c new file mode 100644 index 0000000..ab9da7e --- /dev/null +++ b/User/lwip_if/lwip_http/fsdata_new.c @@ -0,0 +1,337 @@ +#include "lwip/apps/fs.h" +#include "lwip/def.h" + + +#define file_NULL (struct fsdata_file *) NULL + + +#ifndef FS_FILE_FLAGS_HEADER_INCLUDED +#define FS_FILE_FLAGS_HEADER_INCLUDED 1 +#endif +#ifndef FS_FILE_FLAGS_HEADER_PERSISTENT +#define FS_FILE_FLAGS_HEADER_PERSISTENT 0 +#endif +/* FSDATA_FILE_ALIGNMENT: 0=off, 1=by variable, 2=by include */ +#ifndef FSDATA_FILE_ALIGNMENT +#define FSDATA_FILE_ALIGNMENT 0 +#endif +#ifndef FSDATA_ALIGN_PRE +#define FSDATA_ALIGN_PRE +#endif +#ifndef FSDATA_ALIGN_POST +#define FSDATA_ALIGN_POST +#endif +#if FSDATA_FILE_ALIGNMENT==2 +#include "fsdata_alignment.h" +#endif +#if FSDATA_FILE_ALIGNMENT==1 +static const unsigned int dummy_align__img_sics_gif = 0; +#endif +static const unsigned char FSDATA_ALIGN_PRE data__img_sics_gif[] FSDATA_ALIGN_POST = { +/* /img/sics.gif (14 chars) */ +0x2f,0x69,0x6d,0x67,0x2f,0x73,0x69,0x63,0x73,0x2e,0x67,0x69,0x66,0x00,0x00,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/2.0.3d (http://savannah.nongnu.org/projects/lwip) +" (64 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x32,0x2e,0x30, +0x2e,0x33,0x64,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61, +0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f, +0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, + +/* "Content-Length: 724 +" (18+ bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x4c,0x65,0x6e,0x67,0x74,0x68,0x3a,0x20, +0x37,0x32,0x34,0x0d,0x0a, +/* "Content-Type: image/gif + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x54,0x79,0x70,0x65,0x3a,0x20,0x69,0x6d, +0x61,0x67,0x65,0x2f,0x67,0x69,0x66,0x0d,0x0a,0x0d,0x0a, +/* raw file data (724 bytes) */ +0x47,0x49,0x46,0x38,0x39,0x61,0x46,0x00,0x22,0x00,0xa5,0x00,0x00,0xd9,0x2b,0x39, +0x6a,0x6a,0x6a,0xbf,0xbf,0xbf,0x93,0x93,0x93,0x0f,0x0f,0x0f,0xb0,0xb0,0xb0,0xa6, +0xa6,0xa6,0x80,0x80,0x80,0x76,0x76,0x76,0x1e,0x1e,0x1e,0x9d,0x9d,0x9d,0x2e,0x2e, +0x2e,0x49,0x49,0x49,0x54,0x54,0x54,0x8a,0x8a,0x8a,0x60,0x60,0x60,0xc6,0xa6,0x99, +0xbd,0xb5,0xb2,0xc2,0xab,0xa1,0xd9,0x41,0x40,0xd5,0x67,0x55,0xc0,0xb0,0xaa,0xd5, +0x5e,0x4e,0xd6,0x50,0x45,0xcc,0x93,0x7d,0xc8,0xa1,0x90,0xce,0x8b,0x76,0xd2,0x7b, +0x65,0xd1,0x84,0x6d,0xc9,0x99,0x86,0x3a,0x3a,0x3a,0x00,0x00,0x00,0xb8,0xb8,0xb8, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2c,0x00,0x00, +0x00,0x00,0x46,0x00,0x22,0x00,0x00,0x06,0xfe,0x40,0x90,0x70,0x48,0x2c,0x1a,0x8f, +0xc8,0xa4,0x72,0xc9,0x6c,0x3a,0x9f,0xd0,0xa8,0x74,0x4a,0xad,0x5a,0xaf,0xd8,0xac, +0x76,0xa9,0x40,0x04,0xbe,0x83,0xe2,0x60,0x3c,0x50,0x20,0x0d,0x8e,0x6f,0x00,0x31, +0x28,0x1c,0x0d,0x07,0xb5,0xc3,0x60,0x75,0x24,0x3e,0xf8,0xfc,0x87,0x11,0x06,0xe9, +0x3d,0x46,0x07,0x0b,0x7a,0x7a,0x7c,0x43,0x06,0x1e,0x84,0x78,0x0b,0x07,0x6e,0x51, +0x01,0x8a,0x84,0x08,0x7e,0x79,0x80,0x87,0x89,0x91,0x7a,0x93,0x0a,0x04,0x99,0x78, +0x96,0x4f,0x03,0x9e,0x79,0x01,0x94,0x9f,0x43,0x9c,0xa3,0xa4,0x05,0x77,0xa3,0xa0, +0x4e,0x98,0x79,0x0b,0x1e,0x83,0xa4,0xa6,0x1f,0x96,0x05,0x9d,0xaa,0x78,0x01,0x07, +0x84,0x04,0x1e,0x1e,0xbb,0xb8,0x51,0x84,0x0e,0x43,0x05,0x07,0x77,0xa5,0x7f,0x42, +0xb1,0xb2,0x01,0x63,0x08,0x0d,0xbb,0x01,0x0c,0x7a,0x0d,0x44,0x0e,0xd8,0xaf,0x4c, +0x05,0x7a,0x04,0x47,0x07,0x07,0xb7,0x80,0xa2,0xe1,0x7d,0x44,0x05,0x01,0x04,0x01, +0xd0,0xea,0x87,0x93,0x4f,0xe0,0x9a,0x49,0xce,0xd8,0x79,0x04,0x66,0x20,0x15,0x10, +0x10,0x11,0x92,0x29,0x80,0xb6,0xc0,0x91,0x15,0x45,0x1e,0x90,0x19,0x71,0x46,0xa8, +0x5c,0x04,0x0e,0x00,0x22,0x4e,0xe8,0x40,0x24,0x9f,0x3e,0x04,0x06,0xa7,0x58,0xd4, +0x93,0xa0,0x1c,0x91,0x3f,0xe8,0xf0,0x88,0x03,0xb1,0x21,0xa2,0x49,0x00,0x19,0x86, +0xfc,0x52,0x44,0xe0,0x01,0x9d,0x29,0x21,0x15,0x25,0x50,0xf7,0x67,0x25,0x1e,0x06, +0xfd,0x4e,0x9a,0xb4,0x90,0xac,0x15,0xfa,0xcb,0x52,0x53,0x1e,0x8c,0xf2,0xf8,0x07, +0x92,0x2d,0x08,0x3a,0x4d,0x12,0x49,0x95,0x49,0xdb,0x14,0x04,0xc4,0x14,0x85,0x29, +0xaa,0xe7,0x01,0x08,0xa4,0x49,0x01,0x14,0x51,0xe0,0x53,0x91,0xd5,0x29,0x06,0x1a, +0x64,0x02,0xf4,0xc7,0x81,0x9e,0x05,0x20,0x22,0x64,0xa5,0x30,0xae,0xab,0x9e,0x97, +0x53,0xd8,0xb9,0xfd,0x50,0xef,0x93,0x02,0x42,0x74,0x34,0xe8,0x9c,0x20,0x21,0xc9, +0x01,0x68,0x78,0xe6,0x55,0x29,0x20,0x56,0x4f,0x4c,0x40,0x51,0x71,0x82,0xc0,0x70, +0x21,0x22,0x85,0xbe,0x4b,0x1c,0x44,0x05,0xea,0xa4,0x01,0xbf,0x22,0xb5,0xf0,0x1c, +0x06,0x51,0x38,0x8f,0xe0,0x22,0xec,0x18,0xac,0x39,0x22,0xd4,0xd6,0x93,0x44,0x01, +0x32,0x82,0xc8,0xfc,0x61,0xb3,0x01,0x45,0x0c,0x2e,0x83,0x30,0xd0,0x0e,0x17,0x24, +0x0f,0x70,0x85,0x94,0xee,0x05,0x05,0x53,0x4b,0x32,0x1b,0x3f,0x98,0xd3,0x1d,0x29, +0x81,0xb0,0xae,0x1e,0x8c,0x7e,0x68,0xe0,0x60,0x5a,0x54,0x8f,0xb0,0x78,0x69,0x73, +0x06,0xa2,0x00,0x6b,0x57,0xca,0x3d,0x11,0x50,0xbd,0x04,0x30,0x4b,0x3a,0xd4,0xab, +0x5f,0x1f,0x9b,0x3d,0x13,0x74,0x27,0x88,0x3c,0x25,0xe0,0x17,0xbe,0x7a,0x79,0x45, +0x0d,0x0c,0xb0,0x8b,0xda,0x90,0xca,0x80,0x06,0x5d,0x17,0x60,0x1c,0x22,0x4c,0xd8, +0x57,0x22,0x06,0x20,0x00,0x98,0x07,0x08,0xe4,0x56,0x80,0x80,0x1c,0xc5,0xb7,0xc5, +0x82,0x0c,0x36,0xe8,0xe0,0x83,0x10,0x46,0x28,0xe1,0x84,0x14,0x56,0x68,0xa1,0x10, +0x41,0x00,0x00,0x3b,}; + +#if FSDATA_FILE_ALIGNMENT==1 +static const unsigned int dummy_align__404_html = 1; +#endif +static const unsigned char FSDATA_ALIGN_PRE data__404_html[] FSDATA_ALIGN_POST = { +/* /404.html (10 chars) */ +0x2f,0x34,0x30,0x34,0x2e,0x68,0x74,0x6d,0x6c,0x00,0x00,0x00, + +/* HTTP header */ +/* "HTTP/1.0 404 File not found +" (29 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x34,0x30,0x34,0x20,0x46,0x69,0x6c, +0x65,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x0d,0x0a, +/* "Server: lwIP/2.0.3d (http://savannah.nongnu.org/projects/lwip) +" (64 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x32,0x2e,0x30, +0x2e,0x33,0x64,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61, +0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f, +0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, + +/* "Content-Length: 565 +" (18+ bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x4c,0x65,0x6e,0x67,0x74,0x68,0x3a,0x20, +0x35,0x36,0x35,0x0d,0x0a, +/* "Content-Type: text/html + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x54,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, +0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x0d,0x0a, +/* raw file data (565 bytes) */ +0x3c,0x68,0x74,0x6d,0x6c,0x3e,0x0d,0x0a,0x3c,0x68,0x65,0x61,0x64,0x3e,0x3c,0x74, +0x69,0x74,0x6c,0x65,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c,0x69, +0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50, +0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x74,0x69,0x74,0x6c,0x65,0x3e,0x3c,0x2f, +0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x3c,0x62,0x6f,0x64,0x79,0x20,0x62,0x67,0x63, +0x6f,0x6c,0x6f,0x72,0x3d,0x22,0x77,0x68,0x69,0x74,0x65,0x22,0x20,0x74,0x65,0x78, +0x74,0x3d,0x22,0x62,0x6c,0x61,0x63,0x6b,0x22,0x3e,0x0d,0x0a,0x0d,0x0a,0x20,0x20, +0x20,0x20,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22, +0x31,0x30,0x30,0x25,0x22,0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74, +0x72,0x20,0x76,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22,0x3e,0x3c, +0x74,0x64,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x38,0x30,0x22,0x3e,0x09,0x20, +0x20,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68, +0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73, +0x65,0x2f,0x22,0x3e,0x3c,0x69,0x6d,0x67,0x20,0x73,0x72,0x63,0x3d,0x22,0x2f,0x69, +0x6d,0x67,0x2f,0x73,0x69,0x63,0x73,0x2e,0x67,0x69,0x66,0x22,0x0d,0x0a,0x09,0x20, +0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x30,0x22,0x20,0x61,0x6c,0x74,0x3d, +0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x20,0x74,0x69,0x74,0x6c, +0x65,0x3d,0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x3e,0x3c,0x2f, +0x61,0x3e,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x20,0x77,0x69, +0x64,0x74,0x68,0x3d,0x22,0x35,0x30,0x30,0x22,0x3e,0x09,0x20,0x20,0x0d,0x0a,0x09, +0x20,0x20,0x3c,0x68,0x31,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c, +0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49, +0x50,0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x68,0x31,0x3e,0x0d,0x0a,0x09,0x20, +0x20,0x3c,0x68,0x32,0x3e,0x34,0x30,0x34,0x20,0x2d,0x20,0x50,0x61,0x67,0x65,0x20, +0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x3c,0x2f,0x68,0x32,0x3e,0x0d,0x0a, +0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x53,0x6f,0x72, +0x72,0x79,0x2c,0x20,0x74,0x68,0x65,0x20,0x70,0x61,0x67,0x65,0x20,0x79,0x6f,0x75, +0x20,0x61,0x72,0x65,0x20,0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x69,0x6e,0x67,0x20, +0x77,0x61,0x73,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x20,0x6f,0x6e, +0x20,0x74,0x68,0x69,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x73,0x65,0x72,0x76, +0x65,0x72,0x2e,0x20,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09, +0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x2f,0x74,0x72, +0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65, +0x3e,0x0d,0x0a,0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x68,0x74, +0x6d,0x6c,0x3e,0x0d,0x0a,}; + +#if FSDATA_FILE_ALIGNMENT==1 +static const unsigned int dummy_align__index_html = 2; +#endif +static const unsigned char FSDATA_ALIGN_PRE data__index_html[] FSDATA_ALIGN_POST = { +/* /index.html (12 chars) */ +0x2f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x68,0x74,0x6d,0x6c,0x00, + +/* HTTP header */ +/* "HTTP/1.0 200 OK +" (17 bytes) */ +0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, +0x0a, +/* "Server: lwIP/2.0.3d (http://savannah.nongnu.org/projects/lwip) +" (64 bytes) */ +0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x32,0x2e,0x30, +0x2e,0x33,0x64,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61, +0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f, +0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, + +/* "Content-Length: 1751 +" (18+ bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x4c,0x65,0x6e,0x67,0x74,0x68,0x3a,0x20, +0x31,0x37,0x35,0x31,0x0d,0x0a, +/* "Content-Type: text/html + +" (27 bytes) */ +0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x54,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, +0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x0d,0x0a, +/* raw file data (1751 bytes) */ +0x3c,0x68,0x74,0x6d,0x6c,0x3e,0x0d,0x0a,0x3c,0x68,0x65,0x61,0x64,0x3e,0x3c,0x74, +0x69,0x74,0x6c,0x65,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c,0x69, +0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50, +0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x74,0x69,0x74,0x6c,0x65,0x3e,0x3c,0x2f, +0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x3c,0x62,0x6f,0x64,0x79,0x20,0x62,0x67,0x63, +0x6f,0x6c,0x6f,0x72,0x3d,0x22,0x77,0x68,0x69,0x74,0x65,0x22,0x20,0x74,0x65,0x78, +0x74,0x3d,0x22,0x62,0x6c,0x61,0x63,0x6b,0x22,0x3e,0x0d,0x0a,0x0d,0x0a,0x20,0x20, +0x20,0x20,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22, +0x31,0x30,0x30,0x25,0x22,0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74, +0x72,0x20,0x76,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22,0x3e,0x3c, +0x74,0x64,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x38,0x30,0x22,0x3e,0x09,0x20, +0x20,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68, +0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73, +0x65,0x2f,0x22,0x3e,0x3c,0x69,0x6d,0x67,0x20,0x73,0x72,0x63,0x3d,0x22,0x2f,0x69, +0x6d,0x67,0x2f,0x73,0x69,0x63,0x73,0x2e,0x67,0x69,0x66,0x22,0x0d,0x0a,0x09,0x20, +0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3d,0x22,0x30,0x22,0x20,0x61,0x6c,0x74,0x3d, +0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x20,0x74,0x69,0x74,0x6c, +0x65,0x3d,0x22,0x53,0x49,0x43,0x53,0x20,0x6c,0x6f,0x67,0x6f,0x22,0x3e,0x3c,0x2f, +0x61,0x3e,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x20,0x77,0x69, +0x64,0x74,0x68,0x3d,0x22,0x35,0x30,0x30,0x22,0x3e,0x09,0x20,0x20,0x0d,0x0a,0x09, +0x20,0x20,0x3c,0x68,0x31,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c, +0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49, +0x50,0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x68,0x31,0x3e,0x0d,0x0a,0x09,0x20, +0x20,0x3c,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x54,0x68,0x65,0x20,0x77, +0x65,0x62,0x20,0x70,0x61,0x67,0x65,0x20,0x79,0x6f,0x75,0x20,0x61,0x72,0x65,0x20, +0x77,0x61,0x74,0x63,0x68,0x69,0x6e,0x67,0x20,0x77,0x61,0x73,0x20,0x73,0x65,0x72, +0x76,0x65,0x64,0x20,0x62,0x79,0x20,0x61,0x20,0x73,0x69,0x6d,0x70,0x6c,0x65,0x20, +0x77,0x65,0x62,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x73,0x65,0x72,0x76,0x65,0x72, +0x20,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x20,0x6f,0x6e,0x20,0x74,0x6f,0x70,0x20, +0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x6c,0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67, +0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50,0x20,0x73,0x74,0x61,0x63,0x6b,0x20, +0x3c,0x61,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68, +0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73, +0x65,0x2f,0x7e,0x61,0x64,0x61,0x6d,0x2f,0x6c,0x77,0x69,0x70,0x2f,0x22,0x3e,0x6c, +0x77,0x49,0x50,0x3c,0x2f,0x61,0x3e,0x2e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x2f,0x70, +0x3e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20, +0x6c,0x77,0x49,0x50,0x20,0x69,0x73,0x20,0x61,0x6e,0x20,0x6f,0x70,0x65,0x6e,0x20, +0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74, +0x61,0x74,0x69,0x6f,0x6e,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x54,0x43,0x50, +0x2f,0x49,0x50,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x70,0x72,0x6f,0x74,0x6f,0x63, +0x6f,0x6c,0x20,0x73,0x75,0x69,0x74,0x65,0x20,0x74,0x68,0x61,0x74,0x20,0x77,0x61, +0x73,0x20,0x6f,0x72,0x69,0x67,0x69,0x6e,0x61,0x6c,0x6c,0x79,0x20,0x77,0x72,0x69, +0x74,0x74,0x65,0x6e,0x20,0x62,0x79,0x20,0x3c,0x61,0x0d,0x0a,0x09,0x20,0x20,0x20, +0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77, +0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73,0x65,0x2f,0x7e,0x61,0x64,0x61,0x6d,0x2f, +0x6c,0x77,0x69,0x70,0x2f,0x22,0x3e,0x41,0x64,0x61,0x6d,0x20,0x44,0x75,0x6e,0x6b, +0x65,0x6c,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x6f,0x66,0x20,0x74,0x68,0x65, +0x20,0x53,0x77,0x65,0x64,0x69,0x73,0x68,0x20,0x49,0x6e,0x73,0x74,0x69,0x74,0x75, +0x74,0x65,0x20,0x6f,0x66,0x20,0x43,0x6f,0x6d,0x70,0x75,0x74,0x65,0x72,0x20,0x53, +0x63,0x69,0x65,0x6e,0x63,0x65,0x3c,0x2f,0x61,0x3e,0x20,0x62,0x75,0x74,0x20,0x6e, +0x6f,0x77,0x20,0x69,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x62,0x65,0x69,0x6e, +0x67,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x6c,0x79,0x20,0x64,0x65,0x76,0x65,0x6c, +0x6f,0x70,0x65,0x64,0x20,0x62,0x79,0x20,0x61,0x20,0x74,0x65,0x61,0x6d,0x20,0x6f, +0x66,0x20,0x64,0x65,0x76,0x65,0x6c,0x6f,0x70,0x65,0x72,0x73,0x0d,0x0a,0x09,0x20, +0x20,0x20,0x20,0x64,0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x64,0x20,0x77, +0x6f,0x72,0x6c,0x64,0x2d,0x77,0x69,0x64,0x65,0x2e,0x20,0x53,0x69,0x6e,0x63,0x65, +0x20,0x69,0x74,0x27,0x73,0x20,0x72,0x65,0x6c,0x65,0x61,0x73,0x65,0x2c,0x20,0x6c, +0x77,0x49,0x50,0x20,0x68,0x61,0x73,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x73,0x70, +0x75,0x72,0x72,0x65,0x64,0x20,0x61,0x20,0x6c,0x6f,0x74,0x20,0x6f,0x66,0x20,0x69, +0x6e,0x74,0x65,0x72,0x65,0x73,0x74,0x20,0x61,0x6e,0x64,0x20,0x68,0x61,0x73,0x20, +0x62,0x65,0x65,0x6e,0x20,0x70,0x6f,0x72,0x74,0x65,0x64,0x20,0x74,0x6f,0x20,0x73, +0x65,0x76,0x65,0x72,0x61,0x6c,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x70,0x6c,0x61, +0x74,0x66,0x6f,0x72,0x6d,0x73,0x20,0x61,0x6e,0x64,0x20,0x6f,0x70,0x65,0x72,0x61, +0x74,0x69,0x6e,0x67,0x20,0x73,0x79,0x73,0x74,0x65,0x6d,0x73,0x2e,0x20,0x6c,0x77, +0x49,0x50,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x75,0x73,0x65,0x64,0x20,0x65, +0x69,0x74,0x68,0x65,0x72,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x77,0x69,0x74,0x68, +0x20,0x6f,0x72,0x20,0x77,0x69,0x74,0x68,0x6f,0x75,0x74,0x20,0x61,0x6e,0x20,0x75, +0x6e,0x64,0x65,0x72,0x6c,0x79,0x69,0x6e,0x67,0x20,0x4f,0x53,0x2e,0x0d,0x0a,0x09, +0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d,0x0a, +0x09,0x20,0x20,0x20,0x20,0x54,0x68,0x65,0x20,0x66,0x6f,0x63,0x75,0x73,0x20,0x6f, +0x66,0x20,0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x20,0x54,0x43,0x50,0x2f,0x49, +0x50,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e, +0x20,0x69,0x73,0x20,0x74,0x6f,0x20,0x72,0x65,0x64,0x75,0x63,0x65,0x0d,0x0a,0x09, +0x20,0x20,0x20,0x20,0x74,0x68,0x65,0x20,0x52,0x41,0x4d,0x20,0x75,0x73,0x61,0x67, +0x65,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,0x73,0x74,0x69,0x6c,0x6c,0x20,0x68,0x61, +0x76,0x69,0x6e,0x67,0x20,0x61,0x20,0x66,0x75,0x6c,0x6c,0x20,0x73,0x63,0x61,0x6c, +0x65,0x20,0x54,0x43,0x50,0x2e,0x20,0x54,0x68,0x69,0x73,0x0d,0x0a,0x09,0x20,0x20, +0x20,0x20,0x6d,0x61,0x6b,0x65,0x73,0x20,0x6c,0x77,0x49,0x50,0x20,0x73,0x75,0x69, +0x74,0x61,0x62,0x6c,0x65,0x20,0x66,0x6f,0x72,0x20,0x75,0x73,0x65,0x20,0x69,0x6e, +0x20,0x65,0x6d,0x62,0x65,0x64,0x64,0x65,0x64,0x20,0x73,0x79,0x73,0x74,0x65,0x6d, +0x73,0x20,0x77,0x69,0x74,0x68,0x20,0x74,0x65,0x6e,0x73,0x0d,0x0a,0x09,0x20,0x20, +0x20,0x20,0x6f,0x66,0x20,0x6b,0x69,0x6c,0x6f,0x62,0x79,0x74,0x65,0x73,0x20,0x6f, +0x66,0x20,0x66,0x72,0x65,0x65,0x20,0x52,0x41,0x4d,0x20,0x61,0x6e,0x64,0x20,0x72, +0x6f,0x6f,0x6d,0x20,0x66,0x6f,0x72,0x20,0x61,0x72,0x6f,0x75,0x6e,0x64,0x20,0x34, +0x30,0x20,0x6b,0x69,0x6c,0x6f,0x62,0x79,0x74,0x65,0x73,0x0d,0x0a,0x09,0x20,0x20, +0x20,0x20,0x6f,0x66,0x20,0x63,0x6f,0x64,0x65,0x20,0x52,0x4f,0x4d,0x2e,0x0d,0x0a, +0x09,0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x70,0x3e,0x0d, +0x0a,0x09,0x20,0x20,0x20,0x20,0x4d,0x6f,0x72,0x65,0x20,0x69,0x6e,0x66,0x6f,0x72, +0x6d,0x61,0x74,0x69,0x6f,0x6e,0x20,0x61,0x62,0x6f,0x75,0x74,0x20,0x6c,0x77,0x49, +0x50,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x66,0x6f,0x75,0x6e,0x64,0x20,0x61, +0x74,0x20,0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x0d,0x0a,0x09,0x20,0x20,0x20, +0x20,0x68,0x6f,0x6d,0x65,0x70,0x61,0x67,0x65,0x20,0x61,0x74,0x20,0x3c,0x61,0x0d, +0x0a,0x09,0x20,0x20,0x20,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68,0x74,0x74,0x70, +0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67, +0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f, +0x6c,0x77,0x69,0x70,0x2f,0x22,0x3e,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61, +0x76,0x61,0x6e,0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72, +0x67,0x2f,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x2f, +0x3c,0x2f,0x61,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x6f,0x72,0x20,0x61,0x74, +0x20,0x74,0x68,0x65,0x20,0x6c,0x77,0x49,0x50,0x20,0x77,0x69,0x6b,0x69,0x20,0x61, +0x74,0x20,0x3c,0x61,0x0d,0x0a,0x09,0x20,0x20,0x20,0x20,0x68,0x72,0x65,0x66,0x3d, +0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6c,0x77,0x69,0x70,0x2e,0x77,0x69,0x6b, +0x69,0x61,0x2e,0x63,0x6f,0x6d,0x2f,0x22,0x3e,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f, +0x6c,0x77,0x69,0x70,0x2e,0x77,0x69,0x6b,0x69,0x61,0x2e,0x63,0x6f,0x6d,0x2f,0x3c, +0x2f,0x61,0x3e,0x2e,0x0d,0x0a,0x09,0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x09, +0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x3e,0x0d,0x0a,0x09,0x20,0x20,0x26,0x6e, +0x62,0x73,0x70,0x3b,0x0d,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x2f,0x74,0x72, +0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65, +0x3e,0x0d,0x0a,0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x68,0x74, +0x6d,0x6c,0x3e,0x0d,0x0a,0x0d,0x0a,}; + + + +const struct fsdata_file file__img_sics_gif[] = { { +file_NULL, +data__img_sics_gif, +data__img_sics_gif + 16, +sizeof(data__img_sics_gif) - 16, +FS_FILE_FLAGS_HEADER_INCLUDED | FS_FILE_FLAGS_HEADER_PERSISTENT, +}}; + +const struct fsdata_file file__404_html[] = { { +file__img_sics_gif, +data__404_html, +data__404_html + 12, +sizeof(data__404_html) - 12, +FS_FILE_FLAGS_HEADER_INCLUDED | FS_FILE_FLAGS_HEADER_PERSISTENT, +}}; + +const struct fsdata_file file__index_html[] = { { +file__404_html, +data__index_html, +data__index_html + 12, +sizeof(data__index_html) - 12, +FS_FILE_FLAGS_HEADER_INCLUDED | FS_FILE_FLAGS_HEADER_PERSISTENT, +}}; + +#define FS_ROOT file__index_html +#define FS_NUMFILES 3 + diff --git a/User/lwip_if/lwip_http/fsdata_new.h b/User/lwip_if/lwip_http/fsdata_new.h new file mode 100644 index 0000000..d31550d --- /dev/null +++ b/User/lwip_if/lwip_http/fsdata_new.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_FSDATA_H +#define LWIP_FSDATA_H + +#include "lwip/apps/httpd_opts.h" +#include "lwip/apps/fs.h" + +/* THIS FILE IS DEPRECATED AND WILL BE REMOVED IN THE FUTURE */ +/* content was moved to fs.h to simplify #include structure */ + +#endif /* LWIP_FSDATA_H */ diff --git a/User/lwip_if/lwip_http/http_cgi_ssi.h b/User/lwip_if/lwip_http/http_cgi_ssi.h new file mode 100644 index 0000000..3877ae9 --- /dev/null +++ b/User/lwip_if/lwip_http/http_cgi_ssi.h @@ -0,0 +1,43 @@ +/** + ****************************************************************************** + * @file LwIP/LwIP_HTTP_Server_Raw/Inc/http_cgi_ssi.h + * @author MCD Application Team + * @brief Header for http_cgi_ssi.c module + ****************************************************************************** + * @attention + * + *

                  © Copyright (c) 2017 STMicroelectronics. + * All rights reserved.

                  + * + * This software component is licensed by ST under Ultimate Liberty license + * SLA0044, the "License"; You may not use this file except in compliance with + * the License. You may obtain a copy of the License at: + * www.st.com/SLA0044 + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __HTTP_CGI_SSI_H +#define __HTTP_CGI_SSI_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ +/* Exported macro ------------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ +void http_server_init(void); + +#ifdef __cplusplus +} +#endif + +#endif /* __HTTP_CGI_SSI_H */ + + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ + diff --git a/User/lwip_if/lwip_http/http_client.c b/User/lwip_if/lwip_http/http_client.c new file mode 100644 index 0000000..82da60d --- /dev/null +++ b/User/lwip_if/lwip_http/http_client.c @@ -0,0 +1,909 @@ +/** + * @file + * HTTP client + */ + +/* + * Copyright (c) 2018 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + */ + +/** + * @defgroup httpc HTTP client + * @ingroup apps + * @todo: + * - persistent connections + * - select outgoing http version + * - optionally follow redirect + * - check request uri for invalid characters? (e.g. encode spaces) + * - IPv6 support + */ + +#include "lwip/apps/http_client.h" + +#include "lwip/altcp_tcp.h" +#include "lwip/dns.h" +#include "lwip/debug.h" +#include "lwip/mem.h" +#include "lwip/altcp_tls.h" +#include "lwip/init.h" + +#include +#include +#include + +#if LWIP_TCP && LWIP_CALLBACK_API + +/** + * HTTPC_DEBUG: Enable debugging for HTTP client. + */ +#ifndef HTTPC_DEBUG +#define HTTPC_DEBUG LWIP_DBG_OFF +#endif + +/** Set this to 1 to keep server name and uri in request state */ +#ifndef HTTPC_DEBUG_REQUEST +#define HTTPC_DEBUG_REQUEST 0 +#endif + +/** This string is passed in the HTTP header as "User-Agent: " */ +#ifndef HTTPC_CLIENT_AGENT +#define HTTPC_CLIENT_AGENT "lwIP/" LWIP_VERSION_STRING " (http://savannah.nongnu.org/projects/lwip)" +#endif + +/* the various debug levels for this file */ +#define HTTPC_DEBUG_TRACE (HTTPC_DEBUG | LWIP_DBG_TRACE) +#define HTTPC_DEBUG_STATE (HTTPC_DEBUG | LWIP_DBG_STATE) +#define HTTPC_DEBUG_WARN (HTTPC_DEBUG | LWIP_DBG_LEVEL_WARNING) +#define HTTPC_DEBUG_WARN_STATE (HTTPC_DEBUG | LWIP_DBG_LEVEL_WARNING | LWIP_DBG_STATE) +#define HTTPC_DEBUG_SERIOUS (HTTPC_DEBUG | LWIP_DBG_LEVEL_SERIOUS) + +#define HTTPC_POLL_INTERVAL 1 +#define HTTPC_POLL_TIMEOUT 30 /* 15 seconds */ + +#define HTTPC_CONTENT_LEN_INVALID 0xFFFFFFFF + +/* GET request basic */ +#define HTTPC_REQ_11 "GET %s HTTP/1.1\r\n" /* URI */\ + "User-Agent: %s\r\n" /* User-Agent */ \ + "Accept: */*\r\n" \ + "Connection: Close\r\n" /* we don't support persistent connections, yet */ \ + "\r\n" +#define HTTPC_REQ_11_FORMAT(uri) HTTPC_REQ_11, uri, HTTPC_CLIENT_AGENT + +/* GET request with host */ +#define HTTPC_REQ_11_HOST "GET %s HTTP/1.1\r\n" /* URI */\ + "User-Agent: %s\r\n" /* User-Agent */ \ + "Accept: */*\r\n" \ + "Host: %s\r\n" /* server name */ \ + "Connection: Close\r\n" /* we don't support persistent connections, yet */ \ + "\r\n" +#define HTTPC_REQ_11_HOST_FORMAT(uri, srv_name) HTTPC_REQ_11_HOST, uri, HTTPC_CLIENT_AGENT, srv_name + +/* GET request with proxy */ +#define HTTPC_REQ_11_PROXY "GET http://%s%s HTTP/1.1\r\n" /* HOST, URI */\ + "User-Agent: %s\r\n" /* User-Agent */ \ + "Accept: */*\r\n" \ + "Host: %s\r\n" /* server name */ \ + "Connection: Close\r\n" /* we don't support persistent connections, yet */ \ + "\r\n" +#define HTTPC_REQ_11_PROXY_FORMAT(host, uri, srv_name) HTTPC_REQ_11_PROXY, host, uri, HTTPC_CLIENT_AGENT, srv_name + +/* GET request with proxy (non-default server port) */ +#define HTTPC_REQ_11_PROXY_PORT "GET http://%s:%d%s HTTP/1.1\r\n" /* HOST, host-port, URI */\ + "User-Agent: %s\r\n" /* User-Agent */ \ + "Accept: */*\r\n" \ + "Host: %s\r\n" /* server name */ \ + "Connection: Close\r\n" /* we don't support persistent connections, yet */ \ + "\r\n" +#define HTTPC_REQ_11_PROXY_PORT_FORMAT(host, host_port, uri, srv_name) HTTPC_REQ_11_PROXY_PORT, host, host_port, uri, HTTPC_CLIENT_AGENT, srv_name + +typedef enum ehttpc_parse_state { + HTTPC_PARSE_WAIT_FIRST_LINE = 0, + HTTPC_PARSE_WAIT_HEADERS, + HTTPC_PARSE_RX_DATA +} httpc_parse_state_t; + +typedef struct _httpc_state +{ + struct altcp_pcb* pcb; + ip_addr_t remote_addr; + u16_t remote_port; + int timeout_ticks; + struct pbuf *request; + struct pbuf *rx_hdrs; + u16_t rx_http_version; + u16_t rx_status; + altcp_recv_fn recv_fn; + const httpc_connection_t *conn_settings; + void* callback_arg; + u32_t rx_content_len; + u32_t hdr_content_len; + httpc_parse_state_t parse_state; +#if HTTPC_DEBUG_REQUEST + char* server_name; + char* uri; +#endif +} httpc_state_t; + +/** Free http client state and deallocate all resources within */ +static err_t +httpc_free_state(httpc_state_t* req) +{ + struct altcp_pcb* tpcb; + + if (req->request != NULL) { + pbuf_free(req->request); + req->request = NULL; + } + if (req->rx_hdrs != NULL) { + pbuf_free(req->rx_hdrs); + req->rx_hdrs = NULL; + } + + tpcb = req->pcb; + mem_free(req); + req = NULL; + + if (tpcb != NULL) { + err_t r; + altcp_arg(tpcb, NULL); + altcp_recv(tpcb, NULL); + altcp_err(tpcb, NULL); + altcp_poll(tpcb, NULL, 0); + altcp_sent(tpcb, NULL); + r = altcp_close(tpcb); + if (r != ERR_OK) { + altcp_abort(tpcb); + return ERR_ABRT; + } + } + return ERR_OK; +} + +/** Close the connection: call finished callback and free the state */ +static err_t +httpc_close(httpc_state_t* req, httpc_result_t result, u32_t server_response, err_t err) +{ + if (req != NULL) { + if (req->conn_settings != NULL) { + if (req->conn_settings->result_fn != NULL) { + req->conn_settings->result_fn(req->callback_arg, result, req->rx_content_len, server_response, err); + } + } + return httpc_free_state(req); + } + return ERR_OK; +} + +/** Parse http header response line 1 */ +static err_t +http_parse_response_status(struct pbuf *p, u16_t *http_version, u16_t *http_status, u16_t *http_status_str_offset) +{ + u16_t end1 = pbuf_memfind(p, "\r\n", 2, 0); + if (end1 != 0xFFFF) { + /* get parts of first line */ + u16_t space1, space2; + space1 = pbuf_memfind(p, " ", 1, 0); + if (space1 != 0xFFFF) { + if ((pbuf_memcmp(p, 0, "HTTP/", 5) == 0) && (pbuf_get_at(p, 6) == '.')) { + char status_num[10]; + size_t status_num_len; + /* parse http version */ + u16_t version = pbuf_get_at(p, 5) - '0'; + version <<= 8; + version |= pbuf_get_at(p, 7) - '0'; + *http_version = version; + + /* parse http status number */ + space2 = pbuf_memfind(p, " ", 1, space1 + 1); + if (space2 != 0xFFFF) { + *http_status_str_offset = space2 + 1; + status_num_len = space2 - space1 - 1; + } else { + status_num_len = end1 - space1 - 1; + } + memset(status_num, 0, sizeof(status_num)); + if (pbuf_copy_partial(p, status_num, (u16_t)status_num_len, space1 + 1) == status_num_len) { + int status = atoi(status_num); + if ((status > 0) && (status <= 0xFFFF)) { + *http_status = (u16_t)status; + return ERR_OK; + } + } + } + } + } + return ERR_VAL; +} + +/** Wait for all headers to be received, return its length and content-length (if available) */ +static err_t +http_wait_headers(struct pbuf *p, u32_t *content_length, u16_t *total_header_len) +{ + u16_t end1 = pbuf_memfind(p, "\r\n\r\n", 4, 0); + if (end1 < (0xFFFF - 2)) { + /* all headers received */ + /* check if we have a content length (@todo: case insensitive?) */ + u16_t content_len_hdr; + *content_length = HTTPC_CONTENT_LEN_INVALID; + *total_header_len = end1 + 4; + + content_len_hdr = pbuf_memfind(p, "Content-Length: ", 16, 0); + if (content_len_hdr != 0xFFFF) { + u16_t content_len_line_end = pbuf_memfind(p, "\r\n", 2, content_len_hdr); + if (content_len_line_end != 0xFFFF) { + char content_len_num[16]; + u16_t content_len_num_len = (u16_t)(content_len_line_end - content_len_hdr - 16); + memset(content_len_num, 0, sizeof(content_len_num)); + if (pbuf_copy_partial(p, content_len_num, content_len_num_len, content_len_hdr + 16) == content_len_num_len) { + int len = atoi(content_len_num); + if ((len >= 0) && ((u32_t)len < HTTPC_CONTENT_LEN_INVALID)) { + *content_length = (u32_t)len; + } + } + } + } + return ERR_OK; + } + return ERR_VAL; +} + +/** http client tcp recv callback */ +static err_t +httpc_tcp_recv(void *arg, struct altcp_pcb *pcb, struct pbuf *p, err_t r) +{ + httpc_state_t* req = (httpc_state_t*)arg; + LWIP_UNUSED_ARG(r); + + if (p == NULL) { + httpc_result_t result; + if (req->parse_state != HTTPC_PARSE_RX_DATA) { + /* did not get RX data yet */ + result = HTTPC_RESULT_ERR_CLOSED; + } else if ((req->hdr_content_len != HTTPC_CONTENT_LEN_INVALID) && + (req->hdr_content_len != req->rx_content_len)) { + /* header has been received with content length but not all data received */ + result = HTTPC_RESULT_ERR_CONTENT_LEN; + } else { + /* receiving data and either all data received or no content length header */ + result = HTTPC_RESULT_OK; + } + return httpc_close(req, result, req->rx_status, ERR_OK); + } + if (req->parse_state != HTTPC_PARSE_RX_DATA) { + if (req->rx_hdrs == NULL) { + req->rx_hdrs = p; + } else { + pbuf_cat(req->rx_hdrs, p); + } + if (req->parse_state == HTTPC_PARSE_WAIT_FIRST_LINE) { + u16_t status_str_off; + err_t err = http_parse_response_status(req->rx_hdrs, &req->rx_http_version, &req->rx_status, &status_str_off); + if (err == ERR_OK) { + /* don't care status string */ + req->parse_state = HTTPC_PARSE_WAIT_HEADERS; + } + } + if (req->parse_state == HTTPC_PARSE_WAIT_HEADERS) { + u16_t total_header_len; + err_t err = http_wait_headers(req->rx_hdrs, &req->hdr_content_len, &total_header_len); + if (err == ERR_OK) { + struct pbuf *q; + /* full header received, send window update for header bytes and call into client callback */ + altcp_recved(pcb, total_header_len); + if (req->conn_settings) { + if (req->conn_settings->headers_done_fn) { + err = req->conn_settings->headers_done_fn(req, req->callback_arg, req->rx_hdrs, total_header_len, req->hdr_content_len); + if (err != ERR_OK) { + return httpc_close(req, HTTPC_RESULT_LOCAL_ABORT, req->rx_status, err); + } + } + } + /* hide header bytes in pbuf */ + q = pbuf_free_header(req->rx_hdrs, total_header_len); + p = q; + req->rx_hdrs = NULL; + /* go on with data */ + req->parse_state = HTTPC_PARSE_RX_DATA; + } + } + } + if ((p != NULL) && (req->parse_state == HTTPC_PARSE_RX_DATA)) { + req->rx_content_len += p->tot_len; + if (req->recv_fn != NULL) { + /* directly return here: the connection migth already be aborted from the callback! */ + return req->recv_fn(req->callback_arg, pcb, p, r); + } else { + altcp_recved(pcb, p->tot_len); + pbuf_free(p); + } + } + return ERR_OK; +} + +/** http client tcp err callback */ +static void +httpc_tcp_err(void *arg, err_t err) +{ + httpc_state_t* req = (httpc_state_t*)arg; + if (req != NULL) { + /* pcb has already been deallocated */ + req->pcb = NULL; + httpc_close(req, HTTPC_RESULT_ERR_CLOSED, 0, err); + } +} + +/** http client tcp poll callback */ +static err_t +httpc_tcp_poll(void *arg, struct altcp_pcb *pcb) +{ + /* implement timeout */ + httpc_state_t* req = (httpc_state_t*)arg; + LWIP_UNUSED_ARG(pcb); + if (req != NULL) { + if (req->timeout_ticks) { + req->timeout_ticks--; + } + if (!req->timeout_ticks) { + return httpc_close(req, HTTPC_RESULT_ERR_TIMEOUT, 0, ERR_OK); + } + } + return ERR_OK; +} + +/** http client tcp sent callback */ +static err_t +httpc_tcp_sent(void *arg, struct altcp_pcb *pcb, u16_t len) +{ + /* nothing to do here for now */ + LWIP_UNUSED_ARG(arg); + LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(len); + return ERR_OK; +} + +/** http client tcp connected callback */ +static err_t +httpc_tcp_connected(void *arg, struct altcp_pcb *pcb, err_t err) +{ + err_t r; + httpc_state_t* req = (httpc_state_t*)arg; + LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(err); + + /* send request; last char is zero termination */ + r = altcp_write(req->pcb, req->request->payload, req->request->len - 1, TCP_WRITE_FLAG_COPY); + if (r != ERR_OK) { + /* could not write the single small request -> fail, don't retry */ + return httpc_close(req, HTTPC_RESULT_ERR_MEM, 0, r); + } + /* everything written, we can free the request */ + pbuf_free(req->request); + req->request = NULL; + + altcp_output(req->pcb); + return ERR_OK; +} + +/** Start the http request when the server IP addr is known */ +static err_t +httpc_get_internal_addr(httpc_state_t* req, const ip_addr_t *ipaddr) +{ + err_t err; + LWIP_ASSERT("req != NULL", req != NULL); + + if (&req->remote_addr != ipaddr) { + /* fill in remote addr if called externally */ + req->remote_addr = *ipaddr; + } + + err = altcp_connect(req->pcb, &req->remote_addr, req->remote_port, httpc_tcp_connected); + if (err == ERR_OK) { + return ERR_OK; + } + LWIP_DEBUGF(HTTPC_DEBUG_WARN_STATE, ("tcp_connect failed: %d\n", (int)err)); + return err; +} + +#if LWIP_DNS +/** DNS callback + * If ipaddr is non-NULL, resolving succeeded and the request can be sent, otherwise it failed. + */ +static void +httpc_dns_found(const char* hostname, const ip_addr_t *ipaddr, void *arg) +{ + httpc_state_t* req = (httpc_state_t*)arg; + err_t err; + httpc_result_t result; + + LWIP_UNUSED_ARG(hostname); + + if (ipaddr != NULL) { + err = httpc_get_internal_addr(req, ipaddr); + if (err == ERR_OK) { + return; + } + result = HTTPC_RESULT_ERR_CONNECT; + } else { + LWIP_DEBUGF(HTTPC_DEBUG_WARN_STATE, ("httpc_dns_found: failed to resolve hostname: %s\n", + hostname)); + result = HTTPC_RESULT_ERR_HOSTNAME; + err = ERR_ARG; + } + httpc_close(req, result, 0, err); +} +#endif /* LWIP_DNS */ + +/** Start the http request after converting 'server_name' to ip address (DNS or address string) */ +static err_t +httpc_get_internal_dns(httpc_state_t* req, const char* server_name) +{ + err_t err; + LWIP_ASSERT("req != NULL", req != NULL); + +#if LWIP_DNS + err = dns_gethostbyname(server_name, &req->remote_addr, httpc_dns_found, req); +#else + err = ipaddr_aton(server_name, &req->remote_addr) ? ERR_OK : ERR_ARG; +#endif + + if (err == ERR_OK) { + /* cached or IP-string */ + err = httpc_get_internal_addr(req, &req->remote_addr); + } else if (err == ERR_INPROGRESS) { + return ERR_OK; + } + return err; +} + +static int +httpc_create_request_string(const httpc_connection_t *settings, const char* server_name, int server_port, const char* uri, + int use_host, char *buffer, size_t buffer_size) +{ + if (settings->use_proxy) { + LWIP_ASSERT("server_name != NULL", server_name != NULL); + if (server_port != HTTP_DEFAULT_PORT) { + return snprintf(buffer, buffer_size, HTTPC_REQ_11_PROXY_PORT_FORMAT(server_name, server_port, uri, server_name)); + } else { + return snprintf(buffer, buffer_size, HTTPC_REQ_11_PROXY_FORMAT(server_name, uri, server_name)); + } + } else if (use_host) { + LWIP_ASSERT("server_name != NULL", server_name != NULL); + return snprintf(buffer, buffer_size, HTTPC_REQ_11_HOST_FORMAT(uri, server_name)); + } else { + return snprintf(buffer, buffer_size, HTTPC_REQ_11_FORMAT(uri)); + } +} + +/** Initialize the connection struct */ +static err_t +httpc_init_connection_common(httpc_state_t **connection, const httpc_connection_t *settings, const char* server_name, + u16_t server_port, const char* uri, altcp_recv_fn recv_fn, void* callback_arg, int use_host) +{ + size_t alloc_len; + mem_size_t mem_alloc_len; + int req_len, req_len2; + httpc_state_t *req; +#if HTTPC_DEBUG_REQUEST + size_t server_name_len, uri_len; +#endif + + LWIP_ASSERT("uri != NULL", uri != NULL); + + /* get request len */ + req_len = httpc_create_request_string(settings, server_name, server_port, uri, use_host, NULL, 0); + if ((req_len < 0) || (req_len > 0xFFFF)) { + return ERR_VAL; + } + /* alloc state and request in one block */ + alloc_len = sizeof(httpc_state_t); +#if HTTPC_DEBUG_REQUEST + server_name_len = server_name ? strlen(server_name) : 0; + uri_len = strlen(uri); + alloc_len += server_name_len + 1 + uri_len + 1; +#endif + mem_alloc_len = (mem_size_t)alloc_len; + if ((mem_alloc_len < alloc_len) || (req_len + 1 > 0xFFFF)) { + return ERR_VAL; + } + + req = (httpc_state_t*)mem_malloc((mem_size_t)alloc_len); + if(req == NULL) { + return ERR_MEM; + } + memset(req, 0, sizeof(httpc_state_t)); + req->timeout_ticks = HTTPC_POLL_TIMEOUT; + req->request = pbuf_alloc(PBUF_RAW, (u16_t)(req_len + 1), PBUF_RAM); + if (req->request == NULL) { + httpc_free_state(req); + return ERR_MEM; + } + if (req->request->next != NULL) { + /* need a pbuf in one piece */ + httpc_free_state(req); + return ERR_MEM; + } + req->hdr_content_len = HTTPC_CONTENT_LEN_INVALID; +#if HTTPC_DEBUG_REQUEST + req->server_name = (char*)(req + 1); + if (server_name) { + memcpy(req->server_name, server_name, server_name_len + 1); + } + req->uri = req->server_name + server_name_len + 1; + memcpy(req->uri, uri, uri_len + 1); +#endif + req->pcb = altcp_new(settings->altcp_allocator); + if(req->pcb == NULL) { + httpc_free_state(req); + return ERR_MEM; + } + req->remote_port = settings->use_proxy ? settings->proxy_port : server_port; + altcp_arg(req->pcb, req); + altcp_recv(req->pcb, httpc_tcp_recv); + altcp_err(req->pcb, httpc_tcp_err); + altcp_poll(req->pcb, httpc_tcp_poll, HTTPC_POLL_INTERVAL); + altcp_sent(req->pcb, httpc_tcp_sent); + + /* set up request buffer */ + req_len2 = httpc_create_request_string(settings, server_name, server_port, uri, use_host, + (char *)req->request->payload, req_len + 1); + if (req_len2 != req_len) { + httpc_free_state(req); + return ERR_VAL; + } + + req->recv_fn = recv_fn; + req->conn_settings = settings; + req->callback_arg = callback_arg; + + *connection = req; + return ERR_OK; +} + +/** + * Initialize the connection struct + */ +static err_t +httpc_init_connection(httpc_state_t **connection, const httpc_connection_t *settings, const char* server_name, + u16_t server_port, const char* uri, altcp_recv_fn recv_fn, void* callback_arg) +{ + return httpc_init_connection_common(connection, settings, server_name, server_port, uri, recv_fn, callback_arg, 1); +} + + +/** + * Initialize the connection struct (from IP address) + */ +static err_t +httpc_init_connection_addr(httpc_state_t **connection, const httpc_connection_t *settings, + const ip_addr_t* server_addr, u16_t server_port, const char* uri, + altcp_recv_fn recv_fn, void* callback_arg) +{ + char *server_addr_str = ipaddr_ntoa(server_addr); + if (server_addr_str == NULL) { + return ERR_VAL; + } + return httpc_init_connection_common(connection, settings, server_addr_str, server_port, uri, + recv_fn, callback_arg, 1); +} + +/** + * @ingroup httpc + * HTTP client API: get a file by passing server IP address + * + * @param server_addr IP address of the server to connect + * @param port tcp port of the server + * @param uri uri to get from the server, remember leading "/"! + * @param settings connection settings (callbacks, proxy, etc.) + * @param recv_fn the http body (not the headers) are passed to this callback + * @param callback_arg argument passed to all the callbacks + * @param connection retreives the connection handle (to match in callbacks) + * @return ERR_OK if starting the request succeeds (callback_fn will be called later) + * or an error code + */ +err_t +httpc_get_file(const ip_addr_t* server_addr, u16_t port, const char* uri, const httpc_connection_t *settings, + altcp_recv_fn recv_fn, void* callback_arg, httpc_state_t **connection) +{ + err_t err; + httpc_state_t* req; + + LWIP_ERROR("invalid parameters", (server_addr != NULL) && (uri != NULL) && (recv_fn != NULL), return ERR_ARG;); + + err = httpc_init_connection_addr(&req, settings, server_addr, port, + uri, recv_fn, callback_arg); + if (err != ERR_OK) { + return err; + } + + if (settings->use_proxy) { + err = httpc_get_internal_addr(req, &settings->proxy_addr); + } else { + err = httpc_get_internal_addr(req, server_addr); + } + if(err != ERR_OK) { + httpc_free_state(req); + return err; + } + + if (connection != NULL) { + *connection = req; + } + return ERR_OK; +} + +/** + * @ingroup httpc + * HTTP client API: get a file by passing server name as string (DNS name or IP address string) + * + * @param server_name server name as string (DNS name or IP address string) + * @param port tcp port of the server + * @param uri uri to get from the server, remember leading "/"! + * @param settings connection settings (callbacks, proxy, etc.) + * @param recv_fn the http body (not the headers) are passed to this callback + * @param callback_arg argument passed to all the callbacks + * @param connection retreives the connection handle (to match in callbacks) + * @return ERR_OK if starting the request succeeds (callback_fn will be called later) + * or an error code + */ +err_t +httpc_get_file_dns(const char* server_name, u16_t port, const char* uri, const httpc_connection_t *settings, + altcp_recv_fn recv_fn, void* callback_arg, httpc_state_t **connection) +{ + err_t err; + httpc_state_t* req; + + LWIP_ERROR("invalid parameters", (server_name != NULL) && (uri != NULL) && (recv_fn != NULL), return ERR_ARG;); + + err = httpc_init_connection(&req, settings, server_name, port, uri, recv_fn, callback_arg); + if (err != ERR_OK) { + return err; + } + + if (settings->use_proxy) { + err = httpc_get_internal_addr(req, &settings->proxy_addr); + } else { + err = httpc_get_internal_dns(req, server_name); + } + if(err != ERR_OK) { + httpc_free_state(req); + return err; + } + + if (connection != NULL) { + *connection = req; + } + return ERR_OK; +} + +#if LWIP_HTTPC_HAVE_FILE_IO +/* Implementation to disk via fopen/fwrite/fclose follows */ + +typedef struct _httpc_filestate +{ + const char* local_file_name; + FILE *file; + httpc_connection_t settings; + const httpc_connection_t *client_settings; + void *callback_arg; +} httpc_filestate_t; + +static void httpc_fs_result(void *arg, httpc_result_t httpc_result, u32_t rx_content_len, + u32_t srv_res, err_t err); + +/** Initalize http client state for download to file system */ +static err_t +httpc_fs_init(httpc_filestate_t **filestate_out, const char* local_file_name, + const httpc_connection_t *settings, void* callback_arg) +{ + httpc_filestate_t *filestate; + size_t file_len, alloc_len; + FILE *f; + + file_len = strlen(local_file_name); + alloc_len = sizeof(httpc_filestate_t) + file_len + 1; + + filestate = (httpc_filestate_t *)mem_malloc((mem_size_t)alloc_len); + if (filestate == NULL) { + return ERR_MEM; + } + memset(filestate, 0, sizeof(httpc_filestate_t)); + filestate->local_file_name = (const char *)(filestate + 1); + memcpy((char *)(filestate + 1), local_file_name, file_len + 1); + filestate->file = NULL; + filestate->client_settings = settings; + filestate->callback_arg = callback_arg; + /* copy client settings but override result callback */ + memcpy(&filestate->settings, settings, sizeof(httpc_connection_t)); + filestate->settings.result_fn = httpc_fs_result; + + f = fopen(local_file_name, "wb"); + if(f == NULL) { + /* could not open file */ + mem_free(filestate); + return ERR_VAL; + } + filestate->file = f; + *filestate_out = filestate; + return ERR_OK; +} + +/** Free http client state for download to file system */ +static void +httpc_fs_free(httpc_filestate_t *filestate) +{ + if (filestate != NULL) { + if (filestate->file != NULL) { + fclose(filestate->file); + filestate->file = NULL; + } + mem_free(filestate); + } +} + +/** Connection closed (success or error) */ +static void +httpc_fs_result(void *arg, httpc_result_t httpc_result, u32_t rx_content_len, + u32_t srv_res, err_t err) +{ + httpc_filestate_t *filestate = (httpc_filestate_t *)arg; + if (filestate != NULL) { + if (filestate->client_settings->result_fn != NULL) { + filestate->client_settings->result_fn(filestate->callback_arg, httpc_result, rx_content_len, + srv_res, err); + } + httpc_fs_free(filestate); + } +} + +/** tcp recv callback */ +static err_t +httpc_fs_tcp_recv(void *arg, struct altcp_pcb *pcb, struct pbuf *p, err_t err) +{ + httpc_filestate_t *filestate = (httpc_filestate_t*)arg; + struct pbuf* q; + LWIP_UNUSED_ARG(err); + + LWIP_ASSERT("p != NULL", p != NULL); + + for (q = p; q != NULL; q = q->next) { + fwrite(q->payload, 1, q->len, filestate->file); + } + altcp_recved(pcb, p->tot_len); + pbuf_free(p); + return ERR_OK; +} + +/** + * @ingroup httpc + * HTTP client API: get a file to disk by passing server IP address + * + * @param server_addr IP address of the server to connect + * @param port tcp port of the server + * @param uri uri to get from the server, remember leading "/"! + * @param settings connection settings (callbacks, proxy, etc.) + * @param callback_arg argument passed to all the callbacks + * @param connection retreives the connection handle (to match in callbacks) + * @return ERR_OK if starting the request succeeds (callback_fn will be called later) + * or an error code + */ +err_t +httpc_get_file_to_disk(const ip_addr_t* server_addr, u16_t port, const char* uri, const httpc_connection_t *settings, + void* callback_arg, const char* local_file_name, httpc_state_t **connection) +{ + err_t err; + httpc_state_t* req; + httpc_filestate_t *filestate; + + LWIP_ERROR("invalid parameters", (server_addr != NULL) && (uri != NULL) && (local_file_name != NULL), return ERR_ARG;); + + err = httpc_fs_init(&filestate, local_file_name, settings, callback_arg); + if (err != ERR_OK) { + return err; + } + + err = httpc_init_connection_addr(&req, &filestate->settings, server_addr, port, + uri, httpc_fs_tcp_recv, filestate); + if (err != ERR_OK) { + httpc_fs_free(filestate); + return err; + } + + if (settings->use_proxy) { + err = httpc_get_internal_addr(req, &settings->proxy_addr); + } else { + err = httpc_get_internal_addr(req, server_addr); + } + if(err != ERR_OK) { + httpc_fs_free(filestate); + httpc_free_state(req); + return err; + } + + if (connection != NULL) { + *connection = req; + } + return ERR_OK; +} + +/** + * @ingroup httpc + * HTTP client API: get a file to disk by passing server name as string (DNS name or IP address string) + * + * @param server_name server name as string (DNS name or IP address string) + * @param port tcp port of the server + * @param uri uri to get from the server, remember leading "/"! + * @param settings connection settings (callbacks, proxy, etc.) + * @param callback_arg argument passed to all the callbacks + * @param connection retreives the connection handle (to match in callbacks) + * @return ERR_OK if starting the request succeeds (callback_fn will be called later) + * or an error code + */ +err_t +httpc_get_file_dns_to_disk(const char* server_name, u16_t port, const char* uri, const httpc_connection_t *settings, + void* callback_arg, const char* local_file_name, httpc_state_t **connection) +{ + err_t err; + httpc_state_t* req; + httpc_filestate_t *filestate; + + LWIP_ERROR("invalid parameters", (server_name != NULL) && (uri != NULL) && (local_file_name != NULL), return ERR_ARG;); + + err = httpc_fs_init(&filestate, local_file_name, settings, callback_arg); + if (err != ERR_OK) { + return err; + } + + err = httpc_init_connection(&req, &filestate->settings, server_name, port, + uri, httpc_fs_tcp_recv, filestate); + if (err != ERR_OK) { + httpc_fs_free(filestate); + return err; + } + + if (settings->use_proxy) { + err = httpc_get_internal_addr(req, &settings->proxy_addr); + } else { + err = httpc_get_internal_dns(req, server_name); + } + if(err != ERR_OK) { + httpc_fs_free(filestate); + httpc_free_state(req); + return err; + } + + if (connection != NULL) { + *connection = req; + } + return ERR_OK; +} +#endif /* LWIP_HTTPC_HAVE_FILE_IO */ + +#endif /* LWIP_TCP && LWIP_CALLBACK_API */ diff --git a/User/lwip_if/lwip_http/httpd.c b/User/lwip_if/lwip_http/httpd.c new file mode 100644 index 0000000..ccc9ba7 --- /dev/null +++ b/User/lwip_if/lwip_http/httpd.c @@ -0,0 +1,2746 @@ +/** + * @file + * LWIP HTTP server implementation + */ + +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * Simon Goldschmidt + * + */ + +/** + * @defgroup httpd HTTP server + * @ingroup apps + * + * This httpd supports for a + * rudimentary server-side-include facility which will replace tags of the form + * in any file whose extension is .shtml, .shtm or .ssi with + * strings provided by an include handler whose pointer is provided to the + * module via function http_set_ssi_handler(). + * Additionally, a simple common + * gateway interface (CGI) handling mechanism has been added to allow clients + * to hook functions to particular request URIs. + * + * To enable SSI support, define label LWIP_HTTPD_SSI in lwipopts.h. + * To enable CGI support, define label LWIP_HTTPD_CGI in lwipopts.h. + * + * By default, the server assumes that HTTP headers are already present in + * each file stored in the file system. By defining LWIP_HTTPD_DYNAMIC_HEADERS in + * lwipopts.h, this behavior can be changed such that the server inserts the + * headers automatically based on the extension of the file being served. If + * this mode is used, be careful to ensure that the file system image used + * does not already contain the header information. + * + * File system images without headers can be created using the makefsfile + * tool with the -h command line option. + * + * + * Notes about valid SSI tags + * -------------------------- + * + * The following assumptions are made about tags used in SSI markers: + * + * 1. No tag may contain '-' or whitespace characters within the tag name. + * 2. Whitespace is allowed between the tag leadin "". + * 3. The maximum tag name length is LWIP_HTTPD_MAX_TAG_NAME_LEN, currently 8 characters. + * + * Notes on CGI usage + * ------------------ + * + * The simple CGI support offered here works with GET method requests only + * and can handle up to 16 parameters encoded into the URI. The handler + * function may not write directly to the HTTP output but must return a + * filename that the HTTP server will send to the browser as a response to + * the incoming CGI request. + * + * + * + * The list of supported file types is quite short, so if makefsdata complains + * about an unknown extension, make sure to add it (and its doctype) to + * the 'g_psHTTPHeaders' list. + */ +#include "lwip/init.h" +#include "lwip/apps/httpd.h" +#include "lwip/debug.h" +#include "lwip/stats.h" +#include "lwip/apps/fs.h" +#include "httpd_structs.h" +#include "lwip/def.h" + +#include "lwip/altcp.h" +#include "lwip/altcp_tcp.h" +#if HTTPD_ENABLE_HTTPS +#include "lwip/altcp_tls.h" +#endif +#ifdef LWIP_HOOK_FILENAME +#include LWIP_HOOK_FILENAME +#endif +#if LWIP_HTTPD_TIMING +#include "lwip/sys.h" +#endif /* LWIP_HTTPD_TIMING */ + +#include /* memset */ +#include /* atoi */ +#include + +#if LWIP_TCP && LWIP_CALLBACK_API + +/** Minimum length for a valid HTTP/0.9 request: "GET /\r\n" -> 7 bytes */ +#define MIN_REQ_LEN 7 + +#define CRLF "\r\n" +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE +#define HTTP11_CONNECTIONKEEPALIVE "Connection: keep-alive" +#define HTTP11_CONNECTIONKEEPALIVE2 "Connection: Keep-Alive" +#endif + +#if LWIP_HTTPD_DYNAMIC_FILE_READ +#define HTTP_IS_DYNAMIC_FILE(hs) ((hs)->buf != NULL) +#else +#define HTTP_IS_DYNAMIC_FILE(hs) 0 +#endif + +/* This defines checks whether tcp_write has to copy data or not */ + +#ifndef HTTP_IS_DATA_VOLATILE +/** tcp_write does not have to copy data when sent from rom-file-system directly */ +#define HTTP_IS_DATA_VOLATILE(hs) (HTTP_IS_DYNAMIC_FILE(hs) ? TCP_WRITE_FLAG_COPY : 0) +#endif +/** Default: dynamic headers are sent from ROM (non-dynamic headers are handled like file data) */ +#ifndef HTTP_IS_HDR_VOLATILE +#define HTTP_IS_HDR_VOLATILE(hs, ptr) 0 +#endif + +/* Return values for http_send_*() */ +#define HTTP_DATA_TO_SEND_FREED 3 +#define HTTP_DATA_TO_SEND_BREAK 2 +#define HTTP_DATA_TO_SEND_CONTINUE 1 +#define HTTP_NO_DATA_TO_SEND 0 + +typedef struct { + const char *name; + u8_t shtml; +} default_filename; + +static const default_filename httpd_default_filenames[] = { + {"/index.shtml", 1 }, + {"/index.ssi", 1 }, + {"/index.shtm", 1 }, + {"/index.html", 0 }, + {"/index.htm", 0 } +}; + +#define NUM_DEFAULT_FILENAMES LWIP_ARRAYSIZE(httpd_default_filenames) + +#if LWIP_HTTPD_SUPPORT_REQUESTLIST +/** HTTP request is copied here from pbufs for simple parsing */ +static char httpd_req_buf[LWIP_HTTPD_MAX_REQ_LENGTH + 1]; +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + +#if LWIP_HTTPD_SUPPORT_POST +#if LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN > LWIP_HTTPD_MAX_REQUEST_URI_LEN +#define LWIP_HTTPD_URI_BUF_LEN LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN +#endif +#endif +#ifndef LWIP_HTTPD_URI_BUF_LEN +#define LWIP_HTTPD_URI_BUF_LEN LWIP_HTTPD_MAX_REQUEST_URI_LEN +#endif +#if LWIP_HTTPD_URI_BUF_LEN +/* Filename for response file to send when POST is finished or + * search for default files when a directory is requested. */ +static char http_uri_buf[LWIP_HTTPD_URI_BUF_LEN + 1]; +#endif + +#if LWIP_HTTPD_DYNAMIC_HEADERS +/* The number of individual strings that comprise the headers sent before each + * requested file. + */ +#define NUM_FILE_HDR_STRINGS 5 +#define HDR_STRINGS_IDX_HTTP_STATUS 0 /* e.g. "HTTP/1.0 200 OK\r\n" */ +#define HDR_STRINGS_IDX_SERVER_NAME 1 /* e.g. "Server: "HTTPD_SERVER_AGENT"\r\n" */ +#define HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE 2 /* e.g. "Content-Length: xy\r\n" and/or "Connection: keep-alive\r\n" */ +#define HDR_STRINGS_IDX_CONTENT_LEN_NR 3 /* the byte count, when content-length is used */ +#define HDR_STRINGS_IDX_CONTENT_TYPE 4 /* the content type (or default answer content type including default document) */ + +/* The dynamically generated Content-Length buffer needs space for CRLF + NULL */ +#define LWIP_HTTPD_MAX_CONTENT_LEN_OFFSET 3 +#ifndef LWIP_HTTPD_MAX_CONTENT_LEN_SIZE +/* The dynamically generated Content-Length buffer shall be able to work with + ~953 MB (9 digits) */ +#define LWIP_HTTPD_MAX_CONTENT_LEN_SIZE (9 + LWIP_HTTPD_MAX_CONTENT_LEN_OFFSET) +#endif +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ + +#if LWIP_HTTPD_SSI + +#define HTTPD_LAST_TAG_PART 0xFFFF + +enum tag_check_state { + TAG_NONE, /* Not processing an SSI tag */ + TAG_LEADIN, /* Tag lead in "" being processed */ + TAG_SENDING /* Sending tag replacement string */ +}; + +struct http_ssi_state { + const char *parsed; /* Pointer to the first unparsed byte in buf. */ +#if !LWIP_HTTPD_SSI_INCLUDE_TAG + const char *tag_started;/* Pointer to the first opening '<' of the tag. */ +#endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG */ + const char *tag_end; /* Pointer to char after the closing '>' of the tag. */ + u32_t parse_left; /* Number of unparsed bytes in buf. */ + u16_t tag_index; /* Counter used by tag parsing state machine */ + u16_t tag_insert_len; /* Length of insert in string tag_insert */ +#if LWIP_HTTPD_SSI_MULTIPART + u16_t tag_part; /* Counter passed to and changed by tag insertion function to insert multiple times */ +#endif /* LWIP_HTTPD_SSI_MULTIPART */ + u8_t tag_type; /* index into http_ssi_tag_desc array */ + u8_t tag_name_len; /* Length of the tag name in string tag_name */ + char tag_name[LWIP_HTTPD_MAX_TAG_NAME_LEN + 1]; /* Last tag name extracted */ + char tag_insert[LWIP_HTTPD_MAX_TAG_INSERT_LEN + 1]; /* Insert string for tag_name */ + enum tag_check_state tag_state; /* State of the tag processor */ +}; + +struct http_ssi_tag_description { + const char *lead_in; + const char *lead_out; +}; + +#endif /* LWIP_HTTPD_SSI */ + +struct http_state { +#if LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED + struct http_state *next; +#endif /* LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED */ + struct fs_file file_handle; + struct fs_file *handle; + const char *file; /* Pointer to first unsent byte in buf. */ + + struct altcp_pcb *pcb; +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + struct pbuf *req; +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + +#if LWIP_HTTPD_DYNAMIC_FILE_READ + char *buf; /* File read buffer. */ + int buf_len; /* Size of file read buffer, buf. */ +#endif /* LWIP_HTTPD_DYNAMIC_FILE_READ */ + u32_t left; /* Number of unsent bytes in buf. */ + u8_t retries; +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + u8_t keepalive; +#endif /* LWIP_HTTPD_SUPPORT_11_KEEPALIVE */ +#if LWIP_HTTPD_SSI + struct http_ssi_state *ssi; +#endif /* LWIP_HTTPD_SSI */ +#if LWIP_HTTPD_CGI + char *params[LWIP_HTTPD_MAX_CGI_PARAMETERS]; /* Params extracted from the request URI */ + char *param_vals[LWIP_HTTPD_MAX_CGI_PARAMETERS]; /* Values for each extracted param */ +#endif /* LWIP_HTTPD_CGI */ +#if LWIP_HTTPD_DYNAMIC_HEADERS + const char *hdrs[NUM_FILE_HDR_STRINGS]; /* HTTP headers to be sent. */ + char hdr_content_len[LWIP_HTTPD_MAX_CONTENT_LEN_SIZE]; + u16_t hdr_pos; /* The position of the first unsent header byte in the + current string */ + u16_t hdr_index; /* The index of the hdr string currently being sent. */ +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ +#if LWIP_HTTPD_TIMING + u32_t time_started; +#endif /* LWIP_HTTPD_TIMING */ +#if LWIP_HTTPD_SUPPORT_POST + u32_t post_content_len_left; +#if LWIP_HTTPD_POST_MANUAL_WND + u32_t unrecved_bytes; + u8_t no_auto_wnd; + u8_t post_finished; +#endif /* LWIP_HTTPD_POST_MANUAL_WND */ +#endif /* LWIP_HTTPD_SUPPORT_POST*/ +}; + +#if HTTPD_USE_MEM_POOL +LWIP_MEMPOOL_DECLARE(HTTPD_STATE, MEMP_NUM_PARALLEL_HTTPD_CONNS, sizeof(struct http_state), "HTTPD_STATE") +#if LWIP_HTTPD_SSI +LWIP_MEMPOOL_DECLARE(HTTPD_SSI_STATE, MEMP_NUM_PARALLEL_HTTPD_SSI_CONNS, sizeof(struct http_ssi_state), "HTTPD_SSI_STATE") +#define HTTP_FREE_SSI_STATE(x) LWIP_MEMPOOL_FREE(HTTPD_SSI_STATE, (x)) +#define HTTP_ALLOC_SSI_STATE() (struct http_ssi_state *)LWIP_MEMPOOL_ALLOC(HTTPD_SSI_STATE) +#endif /* LWIP_HTTPD_SSI */ +#define HTTP_ALLOC_HTTP_STATE() (struct http_state *)LWIP_MEMPOOL_ALLOC(HTTPD_STATE) +#define HTTP_FREE_HTTP_STATE(x) LWIP_MEMPOOL_FREE(HTTPD_STATE, (x)) +#else /* HTTPD_USE_MEM_POOL */ +#define HTTP_ALLOC_HTTP_STATE() (struct http_state *)mem_malloc(sizeof(struct http_state)) +#define HTTP_FREE_HTTP_STATE(x) mem_free(x) +#if LWIP_HTTPD_SSI +#define HTTP_ALLOC_SSI_STATE() (struct http_ssi_state *)mem_malloc(sizeof(struct http_ssi_state)) +#define HTTP_FREE_SSI_STATE(x) mem_free(x) +#endif /* LWIP_HTTPD_SSI */ +#endif /* HTTPD_USE_MEM_POOL */ + +static err_t http_close_conn(struct altcp_pcb *pcb, struct http_state *hs); +static err_t http_close_or_abort_conn(struct altcp_pcb *pcb, struct http_state *hs, u8_t abort_conn); +static err_t http_find_file(struct http_state *hs, const char *uri, int is_09); +static err_t http_init_file(struct http_state *hs, struct fs_file *file, int is_09, const char *uri, u8_t tag_check, char *params); +static err_t http_poll(void *arg, struct altcp_pcb *pcb); +static u8_t http_check_eof(struct altcp_pcb *pcb, struct http_state *hs); +#if LWIP_HTTPD_FS_ASYNC_READ +static void http_continue(void *connection); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + +#if LWIP_HTTPD_SSI +/* SSI insert handler function pointer. */ +static tSSIHandler httpd_ssi_handler; +#if !LWIP_HTTPD_SSI_RAW +static int httpd_num_tags; +static const char **httpd_tags; +#endif /* !LWIP_HTTPD_SSI_RAW */ + +/* Define the available tag lead-ins and corresponding lead-outs. + * ATTENTION: for the algorithm below using this array, it is essential + * that the lead in differs in the first character! */ +const struct http_ssi_tag_description http_ssi_tag_desc[] = { + {""}, + {"/*#", "*/"} +}; + +#endif /* LWIP_HTTPD_SSI */ + +#if LWIP_HTTPD_CGI +/* CGI handler information */ +static const tCGI *httpd_cgis; +static int httpd_num_cgis; +static int http_cgi_paramcount; +#define http_cgi_params hs->params +#define http_cgi_param_vals hs->param_vals +#elif LWIP_HTTPD_CGI_SSI +static char *http_cgi_params[LWIP_HTTPD_MAX_CGI_PARAMETERS]; /* Params extracted from the request URI */ +static char *http_cgi_param_vals[LWIP_HTTPD_MAX_CGI_PARAMETERS]; /* Values for each extracted param */ +#endif /* LWIP_HTTPD_CGI */ + +#if LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED +/** global list of active HTTP connections, use to kill the oldest when + running out of memory */ +static struct http_state *http_connections; + +static void +http_add_connection(struct http_state *hs) +{ + /* add the connection to the list */ + hs->next = http_connections; + http_connections = hs; +} + +static void +http_remove_connection(struct http_state *hs) +{ + /* take the connection off the list */ + if (http_connections) { + if (http_connections == hs) { + http_connections = hs->next; + } else { + struct http_state *last; + for (last = http_connections; last->next != NULL; last = last->next) { + if (last->next == hs) { + last->next = hs->next; + break; + } + } + } + } +} + +static void +http_kill_oldest_connection(u8_t ssi_required) +{ + struct http_state *hs = http_connections; + struct http_state *hs_free_next = NULL; + while (hs && hs->next) { +#if LWIP_HTTPD_SSI + if (ssi_required) { + if (hs->next->ssi != NULL) { + hs_free_next = hs; + } + } else +#else /* LWIP_HTTPD_SSI */ + LWIP_UNUSED_ARG(ssi_required); +#endif /* LWIP_HTTPD_SSI */ + { + hs_free_next = hs; + } + LWIP_ASSERT("broken list", hs != hs->next); + hs = hs->next; + } + if (hs_free_next != NULL) { + LWIP_ASSERT("hs_free_next->next != NULL", hs_free_next->next != NULL); + LWIP_ASSERT("hs_free_next->next->pcb != NULL", hs_free_next->next->pcb != NULL); + /* send RST when killing a connection because of memory shortage */ + http_close_or_abort_conn(hs_free_next->next->pcb, hs_free_next->next, 1); /* this also unlinks the http_state from the list */ + } +} +#else /* LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED */ + +#define http_add_connection(hs) +#define http_remove_connection(hs) + +#endif /* LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED */ + +#if LWIP_HTTPD_SSI +/** Allocate as struct http_ssi_state. */ +static struct http_ssi_state * +http_ssi_state_alloc(void) +{ + struct http_ssi_state *ret = HTTP_ALLOC_SSI_STATE(); +#if LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED + if (ret == NULL) { + http_kill_oldest_connection(1); + ret = HTTP_ALLOC_SSI_STATE(); + } +#endif /* LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED */ + if (ret != NULL) { + memset(ret, 0, sizeof(struct http_ssi_state)); + } + return ret; +} + +/** Free a struct http_ssi_state. */ +static void +http_ssi_state_free(struct http_ssi_state *ssi) +{ + if (ssi != NULL) { + HTTP_FREE_SSI_STATE(ssi); + } +} +#endif /* LWIP_HTTPD_SSI */ + +/** Initialize a struct http_state. + */ +static void +http_state_init(struct http_state *hs) +{ + /* Initialize the structure. */ + memset(hs, 0, sizeof(struct http_state)); +#if LWIP_HTTPD_DYNAMIC_HEADERS + /* Indicate that the headers are not yet valid */ + hs->hdr_index = NUM_FILE_HDR_STRINGS; +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ +} + +/** Allocate a struct http_state. */ +static struct http_state * +http_state_alloc(void) +{ + struct http_state *ret = HTTP_ALLOC_HTTP_STATE(); +#if LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED + if (ret == NULL) { + http_kill_oldest_connection(0); + ret = HTTP_ALLOC_HTTP_STATE(); + } +#endif /* LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED */ + if (ret != NULL) { + http_state_init(ret); + http_add_connection(ret); + } + return ret; +} + +/** Free a struct http_state. + * Also frees the file data if dynamic. + */ +static void +http_state_eof(struct http_state *hs) +{ + if (hs->handle) { +#if LWIP_HTTPD_TIMING + u32_t ms_needed = sys_now() - hs->time_started; + u32_t needed = LWIP_MAX(1, (ms_needed / 100)); + LWIP_DEBUGF(HTTPD_DEBUG_TIMING, ("httpd: needed %"U32_F" ms to send file of %d bytes -> %"U32_F" bytes/sec\n", + ms_needed, hs->handle->len, ((((u32_t)hs->handle->len) * 10) / needed))); +#endif /* LWIP_HTTPD_TIMING */ + fs_close(hs->handle); + hs->handle = NULL; + } +#if LWIP_HTTPD_DYNAMIC_FILE_READ + if (hs->buf != NULL) { + mem_free(hs->buf); + hs->buf = NULL; + } +#endif /* LWIP_HTTPD_DYNAMIC_FILE_READ */ +#if LWIP_HTTPD_SSI + if (hs->ssi) { + http_ssi_state_free(hs->ssi); + hs->ssi = NULL; + } +#endif /* LWIP_HTTPD_SSI */ +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + if (hs->req) { + pbuf_free(hs->req); + hs->req = NULL; + } +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ +} + +/** Free a struct http_state. + * Also frees the file data if dynamic. + */ +static void +http_state_free(struct http_state *hs) +{ + if (hs != NULL) { + http_state_eof(hs); + http_remove_connection(hs); + HTTP_FREE_HTTP_STATE(hs); + } +} + +/** Call tcp_write() in a loop trying smaller and smaller length + * + * @param pcb altcp_pcb to send + * @param ptr Data to send + * @param length Length of data to send (in/out: on return, contains the + * amount of data sent) + * @param apiflags directly passed to tcp_write + * @return the return value of tcp_write + */ +static err_t +http_write(struct altcp_pcb *pcb, const void *ptr, u16_t *length, u8_t apiflags) +{ + u16_t len, max_len; + err_t err; + LWIP_ASSERT("length != NULL", length != NULL); + len = *length; + if (len == 0) { + return ERR_OK; + } + /* We cannot send more data than space available in the send buffer. */ + max_len = altcp_sndbuf(pcb); + if (max_len < len) { + len = max_len; + } +#ifdef HTTPD_MAX_WRITE_LEN + /* Additional limitation: e.g. don't enqueue more than 2*mss at once */ + max_len = HTTPD_MAX_WRITE_LEN(pcb); + if (len > max_len) { + len = max_len; + } +#endif /* HTTPD_MAX_WRITE_LEN */ + do { + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Trying to send %d bytes\n", len)); + err = altcp_write(pcb, ptr, len, apiflags); + if (err == ERR_MEM) { + if ((altcp_sndbuf(pcb) == 0) || + (altcp_sndqueuelen(pcb) >= TCP_SND_QUEUELEN)) { + /* no need to try smaller sizes */ + len = 1; + } else { + len /= 2; + } + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, + ("Send failed, trying less (%d bytes)\n", len)); + } + } while ((err == ERR_MEM) && (len > 1)); + + if (err == ERR_OK) { + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Sent %d bytes\n", len)); + *length = len; + } else { + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Send failed with err %d (\"%s\")\n", err, lwip_strerr(err))); + *length = 0; + } + +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + /* ensure nagle is normally enabled (only disabled for persistent connections + when all data has been enqueued but the connection stays open for the next + request */ + altcp_nagle_enable(pcb); +#endif + + return err; +} + +/** + * The connection shall be actively closed (using RST to close from fault states). + * Reset the sent- and recv-callbacks. + * + * @param pcb the tcp pcb to reset callbacks + * @param hs connection state to free + */ +static err_t +http_close_or_abort_conn(struct altcp_pcb *pcb, struct http_state *hs, u8_t abort_conn) +{ + err_t err; + LWIP_DEBUGF(HTTPD_DEBUG, ("Closing connection %p\n", (void *)pcb)); + +#if LWIP_HTTPD_SUPPORT_POST + if (hs != NULL) { + if ((hs->post_content_len_left != 0) +#if LWIP_HTTPD_POST_MANUAL_WND + || ((hs->no_auto_wnd != 0) && (hs->unrecved_bytes != 0)) +#endif /* LWIP_HTTPD_POST_MANUAL_WND */ + ) { + /* make sure the post code knows that the connection is closed */ + http_uri_buf[0] = 0; + httpd_post_finished(hs, http_uri_buf, LWIP_HTTPD_URI_BUF_LEN); + } + } +#endif /* LWIP_HTTPD_SUPPORT_POST*/ + + + altcp_arg(pcb, NULL); + altcp_recv(pcb, NULL); + altcp_err(pcb, NULL); + altcp_poll(pcb, NULL, 0); + altcp_sent(pcb, NULL); + if (hs != NULL) { + http_state_free(hs); + } + + if (abort_conn) { + altcp_abort(pcb); + return ERR_OK; + } + err = altcp_close(pcb); + if (err != ERR_OK) { + LWIP_DEBUGF(HTTPD_DEBUG, ("Error %d closing %p\n", err, (void *)pcb)); + /* error closing, try again later in poll */ + altcp_poll(pcb, http_poll, HTTPD_POLL_INTERVAL); + } + return err; +} + +/** + * The connection shall be actively closed. + * Reset the sent- and recv-callbacks. + * + * @param pcb the tcp pcb to reset callbacks + * @param hs connection state to free + */ +static err_t +http_close_conn(struct altcp_pcb *pcb, struct http_state *hs) +{ + return http_close_or_abort_conn(pcb, hs, 0); +} + +/** End of file: either close the connection (Connection: close) or + * close the file (Connection: keep-alive) + */ +static void +http_eof(struct altcp_pcb *pcb, struct http_state *hs) +{ + /* HTTP/1.1 persistent connection? (Not supported for SSI) */ +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + if (hs->keepalive) { + http_remove_connection(hs); + + http_state_eof(hs); + http_state_init(hs); + /* restore state: */ + hs->pcb = pcb; + hs->keepalive = 1; + http_add_connection(hs); + /* ensure nagle doesn't interfere with sending all data as fast as possible: */ + altcp_nagle_disable(pcb); + } else +#endif /* LWIP_HTTPD_SUPPORT_11_KEEPALIVE */ + { + http_close_conn(pcb, hs); + } +} + +#if LWIP_HTTPD_CGI || LWIP_HTTPD_CGI_SSI +/** + * Extract URI parameters from the parameter-part of an URI in the form + * "test.cgi?x=y" @todo: better explanation! + * Pointers to the parameters are stored in hs->param_vals. + * + * @param hs http connection state + * @param params pointer to the NULL-terminated parameter string from the URI + * @return number of parameters extracted + */ +static int +extract_uri_parameters(struct http_state *hs, char *params) +{ + char *pair; + char *equals; + int loop; + + LWIP_UNUSED_ARG(hs); + + /* If we have no parameters at all, return immediately. */ + if (!params || (params[0] == '\0')) { + return (0); + } + + /* Get a pointer to our first parameter */ + pair = params; + + /* Parse up to LWIP_HTTPD_MAX_CGI_PARAMETERS from the passed string and ignore the + * remainder (if any) */ + for (loop = 0; (loop < LWIP_HTTPD_MAX_CGI_PARAMETERS) && pair; loop++) { + + /* Save the name of the parameter */ + http_cgi_params[loop] = pair; + + /* Remember the start of this name=value pair */ + equals = pair; + + /* Find the start of the next name=value pair and replace the delimiter + * with a 0 to terminate the previous pair string. */ + pair = strchr(pair, '&'); + if (pair) { + *pair = '\0'; + pair++; + } else { + /* We didn't find a new parameter so find the end of the URI and + * replace the space with a '\0' */ + pair = strchr(equals, ' '); + if (pair) { + *pair = '\0'; + } + + /* Revert to NULL so that we exit the loop as expected. */ + pair = NULL; + } + + /* Now find the '=' in the previous pair, replace it with '\0' and save + * the parameter value string. */ + equals = strchr(equals, '='); + if (equals) { + *equals = '\0'; + http_cgi_param_vals[loop] = equals + 1; + } else { + http_cgi_param_vals[loop] = NULL; + } + } + + return loop; +} +#endif /* LWIP_HTTPD_CGI || LWIP_HTTPD_CGI_SSI */ + +#if LWIP_HTTPD_SSI +/** + * Insert a tag (found in an shtml in the form of "" into the file. + * The tag's name is stored in ssi->tag_name (NULL-terminated), the replacement + * should be written to hs->tag_insert (up to a length of LWIP_HTTPD_MAX_TAG_INSERT_LEN). + * The amount of data written is stored to ssi->tag_insert_len. + * + * @todo: return tag_insert_len - maybe it can be removed from struct http_state? + * + * @param hs http connection state + */ +static void +get_tag_insert(struct http_state *hs) +{ +#if LWIP_HTTPD_SSI_RAW + const char *tag; +#else /* LWIP_HTTPD_SSI_RAW */ + int tag; +#endif /* LWIP_HTTPD_SSI_RAW */ + size_t len; + struct http_ssi_state *ssi; +#if LWIP_HTTPD_SSI_MULTIPART + u16_t current_tag_part; +#endif /* LWIP_HTTPD_SSI_MULTIPART */ + + LWIP_ASSERT("hs != NULL", hs != NULL); + ssi = hs->ssi; + LWIP_ASSERT("ssi != NULL", ssi != NULL); +#if LWIP_HTTPD_SSI_MULTIPART + current_tag_part = ssi->tag_part; + ssi->tag_part = HTTPD_LAST_TAG_PART; +#endif /* LWIP_HTTPD_SSI_MULTIPART */ +#if LWIP_HTTPD_SSI_RAW + tag = ssi->tag_name; +#endif + + if (httpd_ssi_handler +#if !LWIP_HTTPD_SSI_RAW + && httpd_tags && httpd_num_tags +#endif /* !LWIP_HTTPD_SSI_RAW */ + ) { + + /* Find this tag in the list we have been provided. */ +#if LWIP_HTTPD_SSI_RAW + { +#else /* LWIP_HTTPD_SSI_RAW */ + for (tag = 0; tag < httpd_num_tags; tag++) { + if (strcmp(ssi->tag_name, httpd_tags[tag]) == 0) +#endif /* LWIP_HTTPD_SSI_RAW */ + { + ssi->tag_insert_len = httpd_ssi_handler(tag, ssi->tag_insert, + LWIP_HTTPD_MAX_TAG_INSERT_LEN +#if LWIP_HTTPD_SSI_MULTIPART + , current_tag_part, &ssi->tag_part +#endif /* LWIP_HTTPD_SSI_MULTIPART */ +#if LWIP_HTTPD_FILE_STATE + , (hs->handle ? hs->handle->state : NULL) +#endif /* LWIP_HTTPD_FILE_STATE */ + ); +#if LWIP_HTTPD_SSI_RAW + if (ssi->tag_insert_len != HTTPD_SSI_TAG_UNKNOWN) +#endif /* LWIP_HTTPD_SSI_RAW */ + { + return; + } + } + } + } + + /* If we drop out, we were asked to serve a page which contains tags that + * we don't have a handler for. Merely echo back the tags with an error + * marker. */ +#define UNKNOWN_TAG1_TEXT "***UNKNOWN TAG " +#define UNKNOWN_TAG1_LEN 18 +#define UNKNOWN_TAG2_TEXT "***" +#define UNKNOWN_TAG2_LEN 7 + len = LWIP_MIN(sizeof(ssi->tag_name), LWIP_MIN(strlen(ssi->tag_name), + LWIP_HTTPD_MAX_TAG_INSERT_LEN - (UNKNOWN_TAG1_LEN + UNKNOWN_TAG2_LEN))); + MEMCPY(ssi->tag_insert, UNKNOWN_TAG1_TEXT, UNKNOWN_TAG1_LEN); + MEMCPY(&ssi->tag_insert[UNKNOWN_TAG1_LEN], ssi->tag_name, len); + MEMCPY(&ssi->tag_insert[UNKNOWN_TAG1_LEN + len], UNKNOWN_TAG2_TEXT, UNKNOWN_TAG2_LEN); + ssi->tag_insert[UNKNOWN_TAG1_LEN + len + UNKNOWN_TAG2_LEN] = 0; + + len = strlen(ssi->tag_insert); + LWIP_ASSERT("len <= 0xffff", len <= 0xffff); + ssi->tag_insert_len = (u16_t)len; +} +#endif /* LWIP_HTTPD_SSI */ + +#if LWIP_HTTPD_DYNAMIC_HEADERS +/** + * Generate the relevant HTTP headers for the given filename and write + * them into the supplied buffer. + */ +static void +get_http_headers(struct http_state *hs, const char *uri) +{ + size_t content_type; + char *tmp; + char *ext; + char *vars; + + /* In all cases, the second header we send is the server identification + so set it here. */ + hs->hdrs[HDR_STRINGS_IDX_SERVER_NAME] = g_psHTTPHeaderStrings[HTTP_HDR_SERVER]; + hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE] = NULL; + hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_NR] = NULL; + + /* Is this a normal file or the special case we use to send back the + default "404: Page not found" response? */ + if (uri == NULL) { + hs->hdrs[HDR_STRINGS_IDX_HTTP_STATUS] = g_psHTTPHeaderStrings[HTTP_HDR_NOT_FOUND]; +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + if (hs->keepalive) { + hs->hdrs[HDR_STRINGS_IDX_CONTENT_TYPE] = g_psHTTPHeaderStrings[DEFAULT_404_HTML_PERSISTENT]; + } else +#endif + { + hs->hdrs[HDR_STRINGS_IDX_CONTENT_TYPE] = g_psHTTPHeaderStrings[DEFAULT_404_HTML]; + } + + /* Set up to send the first header string. */ + hs->hdr_index = 0; + hs->hdr_pos = 0; + return; + } + /* We are dealing with a particular filename. Look for one other + special case. We assume that any filename with "404" in it must be + indicative of a 404 server error whereas all other files require + the 200 OK header. */ + if (strstr(uri, "404")) { + hs->hdrs[HDR_STRINGS_IDX_HTTP_STATUS] = g_psHTTPHeaderStrings[HTTP_HDR_NOT_FOUND]; + } else if (strstr(uri, "400")) { + hs->hdrs[HDR_STRINGS_IDX_HTTP_STATUS] = g_psHTTPHeaderStrings[HTTP_HDR_BAD_REQUEST]; + } else if (strstr(uri, "501")) { + hs->hdrs[HDR_STRINGS_IDX_HTTP_STATUS] = g_psHTTPHeaderStrings[HTTP_HDR_NOT_IMPL]; + } else { + hs->hdrs[HDR_STRINGS_IDX_HTTP_STATUS] = g_psHTTPHeaderStrings[HTTP_HDR_OK]; + } + + /* Determine if the URI has any variables and, if so, temporarily remove + them. */ + vars = strchr(uri, '?'); + if (vars) { + *vars = '\0'; + } + + /* Get a pointer to the file extension. We find this by looking for the + last occurrence of "." in the filename passed. */ + ext = NULL; + tmp = strchr(uri, '.'); + while (tmp) { + ext = tmp + 1; + tmp = strchr(ext, '.'); + } + if (ext != NULL) { + /* Now determine the content type and add the relevant header for that. */ + for (content_type = 0; content_type < NUM_HTTP_HEADERS; content_type++) { + /* Have we found a matching extension? */ + if (!lwip_stricmp(g_psHTTPHeaders[content_type].extension, ext)) { + break; + } + } + } else { + content_type = NUM_HTTP_HEADERS; + } + + /* Reinstate the parameter marker if there was one in the original URI. */ + if (vars) { + *vars = '?'; + } + +#if LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI + /* Does the URL passed have any file extension? If not, we assume it + is a special-case URL used for control state notification and we do + not send any HTTP headers with the response. */ + if (!ext) { + /* Force the header index to a value indicating that all headers + have already been sent. */ + hs->hdr_index = NUM_FILE_HDR_STRINGS; + return; + } +#endif /* LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI */ + /* Did we find a matching extension? */ + if (content_type < NUM_HTTP_HEADERS) { + /* yes, store it */ + hs->hdrs[HDR_STRINGS_IDX_CONTENT_TYPE] = g_psHTTPHeaders[content_type].content_type; + } else if (!ext) { + /* no, no extension found -> use binary transfer to prevent the browser adding '.txt' on save */ + hs->hdrs[HDR_STRINGS_IDX_CONTENT_TYPE] = HTTP_HDR_APP; + } else { + /* No - use the default, plain text file type. */ + hs->hdrs[HDR_STRINGS_IDX_CONTENT_TYPE] = HTTP_HDR_DEFAULT_TYPE; + } + /* Set up to send the first header string. */ + hs->hdr_index = 0; + hs->hdr_pos = 0; +} + +/* Add content-length header? */ +static void +get_http_content_length(struct http_state *hs) +{ + u8_t add_content_len = 0; + + LWIP_ASSERT("already been here?", hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE] == NULL); + + add_content_len = 0; +#if LWIP_HTTPD_SSI + if (hs->ssi == NULL) /* @todo: get maximum file length from SSI */ +#endif /* LWIP_HTTPD_SSI */ + { + if ((hs->handle != NULL) && (hs->handle->flags & FS_FILE_FLAGS_HEADER_PERSISTENT)) { + add_content_len = 1; + } + } + if (add_content_len) { + size_t len; + lwip_itoa(hs->hdr_content_len, (size_t)LWIP_HTTPD_MAX_CONTENT_LEN_SIZE, + hs->handle->len); + len = strlen(hs->hdr_content_len); + if (len <= LWIP_HTTPD_MAX_CONTENT_LEN_SIZE - LWIP_HTTPD_MAX_CONTENT_LEN_OFFSET) { + SMEMCPY(&hs->hdr_content_len[len], CRLF, 3); + hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_NR] = hs->hdr_content_len; + } else { + add_content_len = 0; + } + } +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + if (add_content_len) { + hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE] = g_psHTTPHeaderStrings[HTTP_HDR_KEEPALIVE_LEN]; + } else { + hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE] = g_psHTTPHeaderStrings[HTTP_HDR_CONN_CLOSE]; + hs->keepalive = 0; + } +#else /* LWIP_HTTPD_SUPPORT_11_KEEPALIVE */ + if (add_content_len) { + hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE] = g_psHTTPHeaderStrings[HTTP_HDR_CONTENT_LENGTH]; + } +#endif /* LWIP_HTTPD_SUPPORT_11_KEEPALIVE */ +} + +/** Sub-function of http_send(): send dynamic headers + * + * @returns: - HTTP_NO_DATA_TO_SEND: no new data has been enqueued + * - HTTP_DATA_TO_SEND_CONTINUE: continue with sending HTTP body + * - HTTP_DATA_TO_SEND_BREAK: data has been enqueued, headers pending, + * so don't send HTTP body yet + * - HTTP_DATA_TO_SEND_FREED: http_state and pcb are already freed + */ +static u8_t +http_send_headers(struct altcp_pcb *pcb, struct http_state *hs) +{ + err_t err; + u16_t len; + u8_t data_to_send = HTTP_NO_DATA_TO_SEND; + u16_t hdrlen, sendlen; + + if (hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE] == NULL) { + /* set up "content-length" and "connection:" headers */ + get_http_content_length(hs); + } + + /* How much data can we send? */ + len = altcp_sndbuf(pcb); + sendlen = len; + + while (len && (hs->hdr_index < NUM_FILE_HDR_STRINGS) && sendlen) { + const void *ptr; + u16_t old_sendlen; + u8_t apiflags; + /* How much do we have to send from the current header? */ + hdrlen = (u16_t)strlen(hs->hdrs[hs->hdr_index]); + + /* How much of this can we send? */ + sendlen = (len < (hdrlen - hs->hdr_pos)) ? len : (hdrlen - hs->hdr_pos); + + /* Send this amount of data or as much as we can given memory + * constraints. */ + ptr = (const void *)(hs->hdrs[hs->hdr_index] + hs->hdr_pos); + old_sendlen = sendlen; + apiflags = HTTP_IS_HDR_VOLATILE(hs, ptr); + if (hs->hdr_index == HDR_STRINGS_IDX_CONTENT_LEN_NR) { + /* content-length is always volatile */ + apiflags |= TCP_WRITE_FLAG_COPY; + } + if (hs->hdr_index < NUM_FILE_HDR_STRINGS - 1) { + apiflags |= TCP_WRITE_FLAG_MORE; + } + err = http_write(pcb, ptr, &sendlen, apiflags); + if ((err == ERR_OK) && (old_sendlen != sendlen)) { + /* Remember that we added some more data to be transmitted. */ + data_to_send = HTTP_DATA_TO_SEND_CONTINUE; + } else if (err != ERR_OK) { + /* special case: http_write does not try to send 1 byte */ + sendlen = 0; + } + + /* Fix up the header position for the next time round. */ + hs->hdr_pos += sendlen; + len -= sendlen; + + /* Have we finished sending this string? */ + if (hs->hdr_pos == hdrlen) { + /* Yes - move on to the next one */ + hs->hdr_index++; + /* skip headers that are NULL (not all headers are required) */ + while ((hs->hdr_index < NUM_FILE_HDR_STRINGS) && + (hs->hdrs[hs->hdr_index] == NULL)) { + hs->hdr_index++; + } + hs->hdr_pos = 0; + } + } + + if ((hs->hdr_index >= NUM_FILE_HDR_STRINGS) && (hs->file == NULL)) { + /* When we are at the end of the headers, check for data to send + * instead of waiting for ACK from remote side to continue + * (which would happen when sending files from async read). */ + if (http_check_eof(pcb, hs)) { + data_to_send = HTTP_DATA_TO_SEND_BREAK; + } else { + /* At this point, for non-keepalive connections, hs is deallocated an + pcb is closed. */ + return HTTP_DATA_TO_SEND_FREED; + } + } + /* If we get here and there are still header bytes to send, we send + * the header information we just wrote immediately. If there are no + * more headers to send, but we do have file data to send, drop through + * to try to send some file data too. */ + if ((hs->hdr_index < NUM_FILE_HDR_STRINGS) || !hs->file) { + LWIP_DEBUGF(HTTPD_DEBUG, ("tcp_output\n")); + return HTTP_DATA_TO_SEND_BREAK; + } + return data_to_send; +} +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ + +/** Sub-function of http_send(): end-of-file (or block) is reached, + * either close the file or read the next block (if supported). + * + * @returns: 0 if the file is finished or no data has been read + * 1 if the file is not finished and data has been read + */ +static u8_t +http_check_eof(struct altcp_pcb *pcb, struct http_state *hs) +{ + int bytes_left; +#if LWIP_HTTPD_DYNAMIC_FILE_READ + int count; +#ifdef HTTPD_MAX_WRITE_LEN + int max_write_len; +#endif /* HTTPD_MAX_WRITE_LEN */ +#endif /* LWIP_HTTPD_DYNAMIC_FILE_READ */ + + /* Do we have a valid file handle? */ + if (hs->handle == NULL) { + /* No - close the connection. */ + http_eof(pcb, hs); + return 0; + } + bytes_left = fs_bytes_left(hs->handle); + if (bytes_left <= 0) { + /* We reached the end of the file so this request is done. */ + LWIP_DEBUGF(HTTPD_DEBUG, ("End of file.\n")); + http_eof(pcb, hs); + return 0; + } +#if LWIP_HTTPD_DYNAMIC_FILE_READ + /* Do we already have a send buffer allocated? */ + if (hs->buf) { + /* Yes - get the length of the buffer */ + count = LWIP_MIN(hs->buf_len, bytes_left); + } else { + /* We don't have a send buffer so allocate one now */ + count = altcp_sndbuf(pcb); + if (bytes_left < count) { + count = bytes_left; + } +#ifdef HTTPD_MAX_WRITE_LEN + /* Additional limitation: e.g. don't enqueue more than 2*mss at once */ + max_write_len = HTTPD_MAX_WRITE_LEN(pcb); + if (count > max_write_len) { + count = max_write_len; + } +#endif /* HTTPD_MAX_WRITE_LEN */ + do { + hs->buf = (char *)mem_malloc((mem_size_t)count); + if (hs->buf != NULL) { + hs->buf_len = count; + break; + } + count = count / 2; + } while (count > 100); + + /* Did we get a send buffer? If not, return immediately. */ + if (hs->buf == NULL) { + LWIP_DEBUGF(HTTPD_DEBUG, ("No buff\n")); + return 0; + } + } + + /* Read a block of data from the file. */ + LWIP_DEBUGF(HTTPD_DEBUG, ("Trying to read %d bytes.\n", count)); + +#if LWIP_HTTPD_FS_ASYNC_READ + count = fs_read_async(hs->handle, hs->buf, count, http_continue, hs); +#else /* LWIP_HTTPD_FS_ASYNC_READ */ + count = fs_read(hs->handle, hs->buf, count); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + if (count < 0) { + if (count == FS_READ_DELAYED) { + /* Delayed read, wait for FS to unblock us */ + return 0; + } + /* We reached the end of the file so this request is done. + * @todo: close here for HTTP/1.1 when reading file fails */ + LWIP_DEBUGF(HTTPD_DEBUG, ("End of file.\n")); + http_eof(pcb, hs); + return 0; + } + + /* Set up to send the block of data we just read */ + LWIP_DEBUGF(HTTPD_DEBUG, ("Read %d bytes.\n", count)); + hs->left = count; + hs->file = hs->buf; +#if LWIP_HTTPD_SSI + if (hs->ssi) { + hs->ssi->parse_left = count; + hs->ssi->parsed = hs->buf; + } +#endif /* LWIP_HTTPD_SSI */ +#else /* LWIP_HTTPD_DYNAMIC_FILE_READ */ + LWIP_ASSERT("SSI and DYNAMIC_HEADERS turned off but eof not reached", 0); +#endif /* LWIP_HTTPD_SSI || LWIP_HTTPD_DYNAMIC_HEADERS */ + return 1; +} + +/** Sub-function of http_send(): This is the normal send-routine for non-ssi files + * + * @returns: - 1: data has been written (so call tcp_ouput) + * - 0: no data has been written (no need to call tcp_output) + */ +static u8_t +http_send_data_nonssi(struct altcp_pcb *pcb, struct http_state *hs) +{ + err_t err; + u16_t len; + u8_t data_to_send = 0; + + /* We are not processing an SHTML file so no tag checking is necessary. + * Just send the data as we received it from the file. */ + len = (u16_t)LWIP_MIN(hs->left, 0xffff); + + err = http_write(pcb, hs->file, &len, HTTP_IS_DATA_VOLATILE(hs)); + if (err == ERR_OK) { + data_to_send = 1; + hs->file += len; + hs->left -= len; + } + + return data_to_send; +} + +#if LWIP_HTTPD_SSI +/** Sub-function of http_send(): This is the send-routine for ssi files + * + * @returns: - 1: data has been written (so call tcp_ouput) + * - 0: no data has been written (no need to call tcp_output) + */ +static u8_t +http_send_data_ssi(struct altcp_pcb *pcb, struct http_state *hs) +{ + err_t err = ERR_OK; + u16_t len; + u8_t data_to_send = 0; + u8_t tag_type; + + struct http_ssi_state *ssi = hs->ssi; + LWIP_ASSERT("ssi != NULL", ssi != NULL); + /* We are processing an SHTML file so need to scan for tags and replace + * them with insert strings. We need to be careful here since a tag may + * straddle the boundary of two blocks read from the file and we may also + * have to split the insert string between two tcp_write operations. */ + + /* How much data could we send? */ + len = altcp_sndbuf(pcb); + + /* Do we have remaining data to send before parsing more? */ + if (ssi->parsed > hs->file) { + len = (u16_t)LWIP_MIN(ssi->parsed - hs->file, 0xffff); + + err = http_write(pcb, hs->file, &len, HTTP_IS_DATA_VOLATILE(hs)); + if (err == ERR_OK) { + data_to_send = 1; + hs->file += len; + hs->left -= len; + } + + /* If the send buffer is full, return now. */ + if (altcp_sndbuf(pcb) == 0) { + return data_to_send; + } + } + + LWIP_DEBUGF(HTTPD_DEBUG, ("State %d, %d left\n", ssi->tag_state, (int)ssi->parse_left)); + + /* We have sent all the data that was already parsed so continue parsing + * the buffer contents looking for SSI tags. */ + while (((ssi->tag_state == TAG_SENDING) || ssi->parse_left) && (err == ERR_OK)) { + if (len == 0) { + return data_to_send; + } + switch (ssi->tag_state) { + case TAG_NONE: + /* We are not currently processing an SSI tag so scan for the + * start of the lead-in marker. */ + for (tag_type = 0; tag_type < LWIP_ARRAYSIZE(http_ssi_tag_desc); tag_type++) { + if (*ssi->parsed == http_ssi_tag_desc[tag_type].lead_in[0]) { + /* We found what could be the lead-in for a new tag so change + * state appropriately. */ + ssi->tag_type = tag_type; + ssi->tag_state = TAG_LEADIN; + ssi->tag_index = 1; + #if !LWIP_HTTPD_SSI_INCLUDE_TAG + ssi->tag_started = ssi->parsed; + #endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG */ + break; + } + } + + /* Move on to the next character in the buffer */ + ssi->parse_left--; + ssi->parsed++; + break; + + case TAG_LEADIN: + /* We are processing the lead-in marker, looking for the start of + * the tag name. */ + + /* Have we reached the end of the leadin? */ + if (http_ssi_tag_desc[ssi->tag_type].lead_in[ssi->tag_index] == 0) { + ssi->tag_index = 0; + ssi->tag_state = TAG_FOUND; + } else { + /* Have we found the next character we expect for the tag leadin? */ + if (*ssi->parsed == http_ssi_tag_desc[ssi->tag_type].lead_in[ssi->tag_index]) { + /* Yes - move to the next one unless we have found the complete + * leadin, in which case we start looking for the tag itself */ + ssi->tag_index++; + } else { + /* We found an unexpected character so this is not a tag. Move + * back to idle state. */ + ssi->tag_state = TAG_NONE; + } + + /* Move on to the next character in the buffer */ + ssi->parse_left--; + ssi->parsed++; + } + break; + + case TAG_FOUND: + /* We are reading the tag name, looking for the start of the + * lead-out marker and removing any whitespace found. */ + + /* Remove leading whitespace between the tag leading and the first + * tag name character. */ + if ((ssi->tag_index == 0) && ((*ssi->parsed == ' ') || + (*ssi->parsed == '\t') || (*ssi->parsed == '\n') || + (*ssi->parsed == '\r'))) { + /* Move on to the next character in the buffer */ + ssi->parse_left--; + ssi->parsed++; + break; + } + + /* Have we found the end of the tag name? This is signalled by + * us finding the first leadout character or whitespace */ + if ((*ssi->parsed == http_ssi_tag_desc[ssi->tag_type].lead_out[0]) || + (*ssi->parsed == ' ') || (*ssi->parsed == '\t') || + (*ssi->parsed == '\n') || (*ssi->parsed == '\r')) { + + if (ssi->tag_index == 0) { + /* We read a zero length tag so ignore it. */ + ssi->tag_state = TAG_NONE; + } else { + /* We read a non-empty tag so go ahead and look for the + * leadout string. */ + ssi->tag_state = TAG_LEADOUT; + LWIP_ASSERT("ssi->tag_index <= 0xff", ssi->tag_index <= 0xff); + ssi->tag_name_len = (u8_t)ssi->tag_index; + ssi->tag_name[ssi->tag_index] = '\0'; + if (*ssi->parsed == http_ssi_tag_desc[ssi->tag_type].lead_out[0]) { + ssi->tag_index = 1; + } else { + ssi->tag_index = 0; + } + } + } else { + /* This character is part of the tag name so save it */ + if (ssi->tag_index < LWIP_HTTPD_MAX_TAG_NAME_LEN) { + ssi->tag_name[ssi->tag_index++] = *ssi->parsed; + } else { + /* The tag was too long so ignore it. */ + ssi->tag_state = TAG_NONE; + } + } + + /* Move on to the next character in the buffer */ + ssi->parse_left--; + ssi->parsed++; + + break; + + /* We are looking for the end of the lead-out marker. */ + case TAG_LEADOUT: + /* Remove leading whitespace between the tag leading and the first + * tag leadout character. */ + if ((ssi->tag_index == 0) && ((*ssi->parsed == ' ') || + (*ssi->parsed == '\t') || (*ssi->parsed == '\n') || + (*ssi->parsed == '\r'))) { + /* Move on to the next character in the buffer */ + ssi->parse_left--; + ssi->parsed++; + break; + } + + /* Have we found the next character we expect for the tag leadout? */ + if (*ssi->parsed == http_ssi_tag_desc[ssi->tag_type].lead_out[ssi->tag_index]) { + /* Yes - move to the next one unless we have found the complete + * leadout, in which case we need to call the client to process + * the tag. */ + + /* Move on to the next character in the buffer */ + ssi->parse_left--; + ssi->parsed++; + ssi->tag_index++; + + if (http_ssi_tag_desc[ssi->tag_type].lead_out[ssi->tag_index] == 0) { + /* Call the client to ask for the insert string for the + * tag we just found. */ +#if LWIP_HTTPD_SSI_MULTIPART + ssi->tag_part = 0; /* start with tag part 0 */ +#endif /* LWIP_HTTPD_SSI_MULTIPART */ + get_tag_insert(hs); + + /* Next time through, we are going to be sending data + * immediately, either the end of the block we start + * sending here or the insert string. */ + ssi->tag_index = 0; + ssi->tag_state = TAG_SENDING; + ssi->tag_end = ssi->parsed; +#if !LWIP_HTTPD_SSI_INCLUDE_TAG + ssi->parsed = ssi->tag_started; +#endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG*/ + + /* If there is any unsent data in the buffer prior to the + * tag, we need to send it now. */ + if (ssi->tag_end > hs->file) { + /* How much of the data can we send? */ +#if LWIP_HTTPD_SSI_INCLUDE_TAG + len = (u16_t)LWIP_MIN(ssi->tag_end - hs->file, 0xffff); +#else /* LWIP_HTTPD_SSI_INCLUDE_TAG*/ + /* we would include the tag in sending */ + len = (u16_t)LWIP_MIN(ssi->tag_started - hs->file, 0xffff); +#endif /* LWIP_HTTPD_SSI_INCLUDE_TAG*/ + + err = http_write(pcb, hs->file, &len, HTTP_IS_DATA_VOLATILE(hs)); + if (err == ERR_OK) { + data_to_send = 1; +#if !LWIP_HTTPD_SSI_INCLUDE_TAG + if (ssi->tag_started <= hs->file) { + /* pretend to have sent the tag, too */ + len += (u16_t)(ssi->tag_end - ssi->tag_started); + } +#endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG*/ + hs->file += len; + hs->left -= len; + } + } + } + } else { + /* We found an unexpected character so this is not a tag. Move + * back to idle state. */ + ssi->parse_left--; + ssi->parsed++; + ssi->tag_state = TAG_NONE; + } + break; + + /* + * We have found a valid tag and are in the process of sending + * data as a result of that discovery. We send either remaining data + * from the file prior to the insert point or the insert string itself. + */ + case TAG_SENDING: + /* Do we have any remaining file data to send from the buffer prior + * to the tag? */ + if (ssi->tag_end > hs->file) { + /* How much of the data can we send? */ +#if LWIP_HTTPD_SSI_INCLUDE_TAG + len = (u16_t)LWIP_MIN(ssi->tag_end - hs->file, 0xffff); +#else /* LWIP_HTTPD_SSI_INCLUDE_TAG*/ + LWIP_ASSERT("hs->started >= hs->file", ssi->tag_started >= hs->file); + /* we would include the tag in sending */ + len = (u16_t)LWIP_MIN(ssi->tag_started - hs->file, 0xffff); +#endif /* LWIP_HTTPD_SSI_INCLUDE_TAG*/ + if (len != 0) { + err = http_write(pcb, hs->file, &len, HTTP_IS_DATA_VOLATILE(hs)); + } else { + err = ERR_OK; + } + if (err == ERR_OK) { + data_to_send = 1; +#if !LWIP_HTTPD_SSI_INCLUDE_TAG + if (ssi->tag_started <= hs->file) { + /* pretend to have sent the tag, too */ + len += (u16_t)(ssi->tag_end - ssi->tag_started); + } +#endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG*/ + hs->file += len; + hs->left -= len; + } + } else { +#if LWIP_HTTPD_SSI_MULTIPART + if (ssi->tag_index >= ssi->tag_insert_len) { + /* Did the last SSIHandler have more to send? */ + if (ssi->tag_part != HTTPD_LAST_TAG_PART) { + /* If so, call it again */ + ssi->tag_index = 0; + get_tag_insert(hs); + } + } +#endif /* LWIP_HTTPD_SSI_MULTIPART */ + + /* Do we still have insert data left to send? */ + if (ssi->tag_index < ssi->tag_insert_len) { + /* We are sending the insert string itself. How much of the + * insert can we send? */ + len = (ssi->tag_insert_len - ssi->tag_index); + + /* Note that we set the copy flag here since we only have a + * single tag insert buffer per connection. If we don't do + * this, insert corruption can occur if more than one insert + * is processed before we call tcp_output. */ + err = http_write(pcb, &(ssi->tag_insert[ssi->tag_index]), &len, + HTTP_IS_TAG_VOLATILE(hs)); + if (err == ERR_OK) { + data_to_send = 1; + ssi->tag_index += len; + /* Don't return here: keep on sending data */ + } + } else { +#if LWIP_HTTPD_SSI_MULTIPART + if (ssi->tag_part == HTTPD_LAST_TAG_PART) +#endif /* LWIP_HTTPD_SSI_MULTIPART */ + { + /* We have sent all the insert data so go back to looking for + * a new tag. */ + LWIP_DEBUGF(HTTPD_DEBUG, ("Everything sent.\n")); + ssi->tag_index = 0; + ssi->tag_state = TAG_NONE; +#if !LWIP_HTTPD_SSI_INCLUDE_TAG + ssi->parsed = ssi->tag_end; +#endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG*/ + } + } + break; + default: + break; + } + } + } + + /* If we drop out of the end of the for loop, this implies we must have + * file data to send so send it now. In TAG_SENDING state, we've already + * handled this so skip the send if that's the case. */ + if ((ssi->tag_state != TAG_SENDING) && (ssi->parsed > hs->file)) { +#if LWIP_HTTPD_DYNAMIC_FILE_READ && !LWIP_HTTPD_SSI_INCLUDE_TAG + if ((ssi->tag_state != TAG_NONE) && (ssi->tag_started > ssi->tag_end)) { + /* If we found tag on the edge of the read buffer: just throw away the first part + (we have copied/saved everything required for parsing on later). */ + len = (u16_t)(ssi->tag_started - hs->file); + hs->left -= (ssi->parsed - ssi->tag_started); + ssi->parsed = ssi->tag_started; + ssi->tag_started = hs->buf; + } else +#endif /* LWIP_HTTPD_DYNAMIC_FILE_READ && !LWIP_HTTPD_SSI_INCLUDE_TAG */ + { + len = (u16_t)LWIP_MIN(ssi->parsed - hs->file, 0xffff); + } + + err = http_write(pcb, hs->file, &len, HTTP_IS_DATA_VOLATILE(hs)); + if (err == ERR_OK) { + data_to_send = 1; + hs->file += len; + hs->left -= len; + } + } + return data_to_send; +} +#endif /* LWIP_HTTPD_SSI */ + +/** + * Try to send more data on this pcb. + * + * @param pcb the pcb to send data + * @param hs connection state + */ +static u8_t +http_send(struct altcp_pcb *pcb, struct http_state *hs) +{ + u8_t data_to_send = HTTP_NO_DATA_TO_SEND; + + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_send: pcb=%p hs=%p left=%d\n", (void *)pcb, + (void *)hs, hs != NULL ? (int)hs->left : 0)); + +#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND + if (hs->unrecved_bytes != 0) { + return 0; + } +#endif /* LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND */ + + /* If we were passed a NULL state structure pointer, ignore the call. */ + if (hs == NULL) { + return 0; + } + +#if LWIP_HTTPD_FS_ASYNC_READ + /* Check if we are allowed to read from this file. + (e.g. SSI might want to delay sending until data is available) */ + if (!fs_is_file_ready(hs->handle, http_continue, hs)) { + return 0; + } +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + +#if LWIP_HTTPD_DYNAMIC_HEADERS + /* Do we have any more header data to send for this file? */ + if (hs->hdr_index < NUM_FILE_HDR_STRINGS) { + data_to_send = http_send_headers(pcb, hs); + if ((data_to_send == HTTP_DATA_TO_SEND_FREED) || + ((data_to_send != HTTP_DATA_TO_SEND_CONTINUE) && + (hs->hdr_index < NUM_FILE_HDR_STRINGS))) { + return data_to_send; + } + } +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ + + /* Have we run out of file data to send? If so, we need to read the next + * block from the file. */ + if (hs->left == 0) { + if (!http_check_eof(pcb, hs)) { + return 0; + } + } + +#if LWIP_HTTPD_SSI + if (hs->ssi) { + data_to_send = http_send_data_ssi(pcb, hs); + } else +#endif /* LWIP_HTTPD_SSI */ + { + data_to_send = http_send_data_nonssi(pcb, hs); + } + + if ((hs->left == 0) && (fs_bytes_left(hs->handle) <= 0)) { + /* We reached the end of the file so this request is done. + * This adds the FIN flag right into the last data segment. */ + LWIP_DEBUGF(HTTPD_DEBUG, ("End of file.\n")); + http_eof(pcb, hs); + return 0; + } + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("send_data end.\n")); + return data_to_send; +} + +#if LWIP_HTTPD_SUPPORT_EXTSTATUS +/** Initialize a http connection with a file to send for an error message + * + * @param hs http connection state + * @param error_nr HTTP error number + * @return ERR_OK if file was found and hs has been initialized correctly + * another err_t otherwise + */ +static err_t +http_find_error_file(struct http_state *hs, u16_t error_nr) +{ + const char *uri, *uri1, *uri2, *uri3; + + if (error_nr == 501) { + uri1 = "/501.html"; + uri2 = "/501.htm"; + uri3 = "/501.shtml"; + } else { + /* 400 (bad request is the default) */ + uri1 = "/400.html"; + uri2 = "/400.htm"; + uri3 = "/400.shtml"; + } + if (fs_open(&hs->file_handle, uri1) == ERR_OK) { + uri = uri1; + } else if (fs_open(&hs->file_handle, uri2) == ERR_OK) { + uri = uri2; + } else if (fs_open(&hs->file_handle, uri3) == ERR_OK) { + uri = uri3; + } else { + LWIP_DEBUGF(HTTPD_DEBUG, ("Error page for error %"U16_F" not found\n", + error_nr)); + return ERR_ARG; + } + return http_init_file(hs, &hs->file_handle, 0, uri, 0, NULL); +} +#else /* LWIP_HTTPD_SUPPORT_EXTSTATUS */ +#define http_find_error_file(hs, error_nr) ERR_ARG +#endif /* LWIP_HTTPD_SUPPORT_EXTSTATUS */ + +/** + * Get the file struct for a 404 error page. + * Tries some file names and returns NULL if none found. + * + * @param uri pointer that receives the actual file name URI + * @return file struct for the error page or NULL no matching file was found + */ +static struct fs_file * +http_get_404_file(struct http_state *hs, const char **uri) +{ + err_t err; + + *uri = "/404.html"; + err = fs_open(&hs->file_handle, *uri); + if (err != ERR_OK) { + /* 404.html doesn't exist. Try 404.htm instead. */ + *uri = "/404.htm"; + err = fs_open(&hs->file_handle, *uri); + if (err != ERR_OK) { + /* 404.htm doesn't exist either. Try 404.shtml instead. */ + *uri = "/404.shtml"; + err = fs_open(&hs->file_handle, *uri); + if (err != ERR_OK) { + /* 404.htm doesn't exist either. Indicate to the caller that it should + * send back a default 404 page. + */ + *uri = NULL; + return NULL; + } + } + } + + return &hs->file_handle; +} + +#if LWIP_HTTPD_SUPPORT_POST +static err_t +http_handle_post_finished(struct http_state *hs) +{ +#if LWIP_HTTPD_POST_MANUAL_WND + /* Prevent multiple calls to httpd_post_finished, since it might have already + been called before from httpd_post_data_recved(). */ + if (hs->post_finished) { + return ERR_OK; + } + hs->post_finished = 1; +#endif /* LWIP_HTTPD_POST_MANUAL_WND */ + /* application error or POST finished */ + /* NULL-terminate the buffer */ + http_uri_buf[0] = 0; + httpd_post_finished(hs, http_uri_buf, LWIP_HTTPD_URI_BUF_LEN); + return http_find_file(hs, http_uri_buf, 0); +} + +/** Pass received POST body data to the application and correctly handle + * returning a response document or closing the connection. + * ATTENTION: The application is responsible for the pbuf now, so don't free it! + * + * @param hs http connection state + * @param p pbuf to pass to the application + * @return ERR_OK if passed successfully, another err_t if the response file + * hasn't been found (after POST finished) + */ +static err_t +http_post_rxpbuf(struct http_state *hs, struct pbuf *p) +{ + err_t err; + + if (p != NULL) { + /* adjust remaining Content-Length */ + if (hs->post_content_len_left < p->tot_len) { + hs->post_content_len_left = 0; + } else { + hs->post_content_len_left -= p->tot_len; + } + } +#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND + /* prevent connection being closed if httpd_post_data_recved() is called nested */ + hs->unrecved_bytes++; +#endif + if (p != NULL) { + err = httpd_post_receive_data(hs, p); + } else { + err = ERR_OK; + } +#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND + hs->unrecved_bytes--; +#endif + if (err != ERR_OK) { + /* Ignore remaining content in case of application error */ + hs->post_content_len_left = 0; + } + if (hs->post_content_len_left == 0) { +#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND + if (hs->unrecved_bytes != 0) { + return ERR_OK; + } +#endif /* LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND */ + /* application error or POST finished */ + return http_handle_post_finished(hs); + } + + return ERR_OK; +} + +/** Handle a post request. Called from http_parse_request when method 'POST' + * is found. + * + * @param p The input pbuf (containing the POST header and body). + * @param hs The http connection state. + * @param data HTTP request (header and part of body) from input pbuf(s). + * @param data_len Size of 'data'. + * @param uri The HTTP URI parsed from input pbuf(s). + * @param uri_end Pointer to the end of 'uri' (here, the rest of the HTTP + * header starts). + * @return ERR_OK: POST correctly parsed and accepted by the application. + * ERR_INPROGRESS: POST not completely parsed (no error yet) + * another err_t: Error parsing POST or denied by the application + */ +static err_t +http_post_request(struct pbuf *inp, struct http_state *hs, + char *data, u16_t data_len, char *uri, char *uri_end) +{ + err_t err; + /* search for end-of-header (first double-CRLF) */ + char *crlfcrlf = lwip_strnstr(uri_end + 1, CRLF CRLF, data_len - (uri_end + 1 - data)); + + if (crlfcrlf != NULL) { + /* search for "Content-Length: " */ +#define HTTP_HDR_CONTENT_LEN "Content-Length: " +#define HTTP_HDR_CONTENT_LEN_LEN 16 +#define HTTP_HDR_CONTENT_LEN_DIGIT_MAX_LEN 10 + char *scontent_len = lwip_strnstr(uri_end + 1, HTTP_HDR_CONTENT_LEN, crlfcrlf - (uri_end + 1)); + if (scontent_len != NULL) { + char *scontent_len_end = lwip_strnstr(scontent_len + HTTP_HDR_CONTENT_LEN_LEN, CRLF, HTTP_HDR_CONTENT_LEN_DIGIT_MAX_LEN); + if (scontent_len_end != NULL) { + int content_len; + char *content_len_num = scontent_len + HTTP_HDR_CONTENT_LEN_LEN; + content_len = atoi(content_len_num); + if (content_len == 0) { + /* if atoi returns 0 on error, fix this */ + if ((content_len_num[0] != '0') || (content_len_num[1] != '\r')) { + content_len = -1; + } + } + if (content_len >= 0) { + /* adjust length of HTTP header passed to application */ + const char *hdr_start_after_uri = uri_end + 1; + u16_t hdr_len = (u16_t)LWIP_MIN(data_len, crlfcrlf + 4 - data); + u16_t hdr_data_len = (u16_t)LWIP_MIN(data_len, crlfcrlf + 4 - hdr_start_after_uri); + u8_t post_auto_wnd = 1; + http_uri_buf[0] = 0; + /* trim http header */ + *crlfcrlf = 0; + err = httpd_post_begin(hs, uri, hdr_start_after_uri, hdr_data_len, content_len, + http_uri_buf, LWIP_HTTPD_URI_BUF_LEN, &post_auto_wnd); + if (err == ERR_OK) { + /* try to pass in data of the first pbuf(s) */ + struct pbuf *q = inp; + u16_t start_offset = hdr_len; +#if LWIP_HTTPD_POST_MANUAL_WND + hs->no_auto_wnd = !post_auto_wnd; +#endif /* LWIP_HTTPD_POST_MANUAL_WND */ + /* set the Content-Length to be received for this POST */ + hs->post_content_len_left = (u32_t)content_len; + + /* get to the pbuf where the body starts */ + while ((q != NULL) && (q->len <= start_offset)) { + start_offset -= q->len; + q = q->next; + } + if (q != NULL) { + /* hide the remaining HTTP header */ + pbuf_remove_header(q, start_offset); +#if LWIP_HTTPD_POST_MANUAL_WND + if (!post_auto_wnd) { + /* already tcp_recved() this data... */ + hs->unrecved_bytes = q->tot_len; + } +#endif /* LWIP_HTTPD_POST_MANUAL_WND */ + pbuf_ref(q); + return http_post_rxpbuf(hs, q); + } else if (hs->post_content_len_left == 0) { + q = pbuf_alloc(PBUF_RAW, 0, PBUF_REF); + return http_post_rxpbuf(hs, q); + } else { + return ERR_OK; + } + } else { + /* return file passed from application */ + return http_find_file(hs, http_uri_buf, 0); + } + } else { + LWIP_DEBUGF(HTTPD_DEBUG, ("POST received invalid Content-Length: %s\n", + content_len_num)); + return ERR_ARG; + } + } + } + /* If we come here, headers are fully received (double-crlf), but Content-Length + was not included. Since this is currently the only supported method, we have + to fail in this case! */ + LWIP_DEBUGF(HTTPD_DEBUG, ("Error when parsing Content-Length\n")); + return ERR_ARG; + } + /* if we come here, the POST is incomplete */ +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + return ERR_INPROGRESS; +#else /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + return ERR_ARG; +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ +} + +#if LWIP_HTTPD_POST_MANUAL_WND +/** + * @ingroup httpd + * A POST implementation can call this function to update the TCP window. + * This can be used to throttle data reception (e.g. when received data is + * programmed to flash and data is received faster than programmed). + * + * @param connection A connection handle passed to httpd_post_begin for which + * httpd_post_finished has *NOT* been called yet! + * @param recved_len Length of data received (for window update) + */ +void httpd_post_data_recved(void *connection, u16_t recved_len) +{ + struct http_state *hs = (struct http_state *)connection; + if (hs != NULL) { + if (hs->no_auto_wnd) { + u16_t len = recved_len; + if (hs->unrecved_bytes >= recved_len) { + hs->unrecved_bytes -= recved_len; + } else { + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_LEVEL_WARNING, ("httpd_post_data_recved: recved_len too big\n")); + len = (u16_t)hs->unrecved_bytes; + hs->unrecved_bytes = 0; + } + if (hs->pcb != NULL) { + if (len != 0) { + altcp_recved(hs->pcb, len); + } + if ((hs->post_content_len_left == 0) && (hs->unrecved_bytes == 0)) { + /* finished handling POST */ + http_handle_post_finished(hs); + http_send(hs->pcb, hs); + } + } + } + } +} +#endif /* LWIP_HTTPD_POST_MANUAL_WND */ + +#endif /* LWIP_HTTPD_SUPPORT_POST */ + +#if LWIP_HTTPD_FS_ASYNC_READ +/** Try to send more data if file has been blocked before + * This is a callback function passed to fs_read_async(). + */ +static void +http_continue(void *connection) +{ + struct http_state *hs = (struct http_state *)connection; + LWIP_ASSERT_CORE_LOCKED(); + if (hs && (hs->pcb) && (hs->handle)) { + LWIP_ASSERT("hs->pcb != NULL", hs->pcb != NULL); + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("httpd_continue: try to send more data\n")); + if (http_send(hs->pcb, hs)) { + /* If we wrote anything to be sent, go ahead and send it now. */ + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("tcp_output\n")); + altcp_output(hs->pcb); + } + } +} +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + +/** + * When data has been received in the correct state, try to parse it + * as a HTTP request. + * + * @param inp the received pbuf + * @param hs the connection state + * @param pcb the altcp_pcb which received this packet + * @return ERR_OK if request was OK and hs has been initialized correctly + * ERR_INPROGRESS if request was OK so far but not fully received + * another err_t otherwise + */ +static err_t +http_parse_request(struct pbuf *inp, struct http_state *hs, struct altcp_pcb *pcb) +{ + char *data; + char *crlf; + u16_t data_len; + struct pbuf *p = inp; +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + u16_t clen; +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ +#if LWIP_HTTPD_SUPPORT_POST + err_t err; +#endif /* LWIP_HTTPD_SUPPORT_POST */ + + LWIP_UNUSED_ARG(pcb); /* only used for post */ + LWIP_ASSERT("p != NULL", p != NULL); + LWIP_ASSERT("hs != NULL", hs != NULL); + + if ((hs->handle != NULL) || (hs->file != NULL)) { + LWIP_DEBUGF(HTTPD_DEBUG, ("Received data while sending a file\n")); + /* already sending a file */ + /* @todo: abort? */ + return ERR_USE; + } + +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + + LWIP_DEBUGF(HTTPD_DEBUG, ("Received %"U16_F" bytes\n", p->tot_len)); + + /* first check allowed characters in this pbuf? */ + + /* enqueue the pbuf */ + if (hs->req == NULL) { + LWIP_DEBUGF(HTTPD_DEBUG, ("First pbuf\n")); + hs->req = p; + } else { + LWIP_DEBUGF(HTTPD_DEBUG, ("pbuf enqueued\n")); + pbuf_cat(hs->req, p); + } + /* increase pbuf ref counter as it is freed when we return but we want to + keep it on the req list */ + pbuf_ref(p); + + if (hs->req->next != NULL) { + data_len = LWIP_MIN(hs->req->tot_len, LWIP_HTTPD_MAX_REQ_LENGTH); + pbuf_copy_partial(hs->req, httpd_req_buf, data_len, 0); + data = httpd_req_buf; + } else +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + { + data = (char *)p->payload; + data_len = p->len; + if (p->len != p->tot_len) { + LWIP_DEBUGF(HTTPD_DEBUG, ("Warning: incomplete header due to chained pbufs\n")); + } + } + + /* received enough data for minimal request? */ + if (data_len >= MIN_REQ_LEN) { + /* wait for CRLF before parsing anything */ + crlf = lwip_strnstr(data, CRLF, data_len); + if (crlf != NULL) { +#if LWIP_HTTPD_SUPPORT_POST + int is_post = 0; +#endif /* LWIP_HTTPD_SUPPORT_POST */ + int is_09 = 0; + char *sp1, *sp2; + u16_t left_len, uri_len; + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("CRLF received, parsing request\n")); + /* parse method */ + if (!strncmp(data, "GET ", 4)) { + sp1 = data + 3; + /* received GET request */ + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Received GET request\"\n")); +#if LWIP_HTTPD_SUPPORT_POST + } else if (!strncmp(data, "POST ", 5)) { + /* store request type */ + is_post = 1; + sp1 = data + 4; + /* received GET request */ + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Received POST request\n")); +#endif /* LWIP_HTTPD_SUPPORT_POST */ + } else { + /* null-terminate the METHOD (pbuf is freed anyway wen returning) */ + data[4] = 0; + /* unsupported method! */ + LWIP_DEBUGF(HTTPD_DEBUG, ("Unsupported request method (not implemented): \"%s\"\n", + data)); + return http_find_error_file(hs, 501); + } + /* if we come here, method is OK, parse URI */ + left_len = (u16_t)(data_len - ((sp1 + 1) - data)); + sp2 = lwip_strnstr(sp1 + 1, " ", left_len); +#if LWIP_HTTPD_SUPPORT_V09 + if (sp2 == NULL) { + /* HTTP 0.9: respond with correct protocol version */ + sp2 = lwip_strnstr(sp1 + 1, CRLF, left_len); + is_09 = 1; +#if LWIP_HTTPD_SUPPORT_POST + if (is_post) { + /* HTTP/0.9 does not support POST */ + goto badrequest; + } +#endif /* LWIP_HTTPD_SUPPORT_POST */ + } +#endif /* LWIP_HTTPD_SUPPORT_V09 */ + uri_len = (u16_t)(sp2 - (sp1 + 1)); + if ((sp2 != 0) && (sp2 > sp1)) { + /* wait for CRLFCRLF (indicating end of HTTP headers) before parsing anything */ + if (lwip_strnstr(data, CRLF CRLF, data_len) != NULL) { + char *uri = sp1 + 1; +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + /* This is HTTP/1.0 compatible: for strict 1.1, a connection + would always be persistent unless "close" was specified. */ + if (!is_09 && (lwip_strnstr(data, HTTP11_CONNECTIONKEEPALIVE, data_len) || + lwip_strnstr(data, HTTP11_CONNECTIONKEEPALIVE2, data_len))) { + hs->keepalive = 1; + } else { + hs->keepalive = 0; + } +#endif /* LWIP_HTTPD_SUPPORT_11_KEEPALIVE */ + /* null-terminate the METHOD (pbuf is freed anyway wen returning) */ + *sp1 = 0; + uri[uri_len] = 0; + LWIP_DEBUGF(HTTPD_DEBUG, ("Received \"%s\" request for URI: \"%s\"\n", + data, uri)); +#if LWIP_HTTPD_SUPPORT_POST + if (is_post) { +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + struct pbuf *q = hs->req; +#else /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + struct pbuf *q = inp; +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + err = http_post_request(q, hs, data, data_len, uri, sp2); + if (err != ERR_OK) { + /* restore header for next try */ + *sp1 = ' '; + *sp2 = ' '; + uri[uri_len] = ' '; + } + if (err == ERR_ARG) { + goto badrequest; + } + return err; + } else +#endif /* LWIP_HTTPD_SUPPORT_POST */ + { + return http_find_file(hs, uri, is_09); + } + } + } else { + LWIP_DEBUGF(HTTPD_DEBUG, ("invalid URI\n")); + } + } + } + +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + clen = pbuf_clen(hs->req); + if ((hs->req->tot_len <= LWIP_HTTPD_REQ_BUFSIZE) && + (clen <= LWIP_HTTPD_REQ_QUEUELEN)) { + /* request not fully received (too short or CRLF is missing) */ + return ERR_INPROGRESS; + } else +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + { +#if LWIP_HTTPD_SUPPORT_POST +badrequest: +#endif /* LWIP_HTTPD_SUPPORT_POST */ + LWIP_DEBUGF(HTTPD_DEBUG, ("bad request\n")); + /* could not parse request */ + return http_find_error_file(hs, 400); + } +} + +#if LWIP_HTTPD_SSI && (LWIP_HTTPD_SSI_BY_FILE_EXTENSION == 1) +/* Check if SSI should be parsed for this file/URL + * (With LWIP_HTTPD_SSI_BY_FILE_EXTENSION == 2, this function can be + * overridden by an external implementation.) + * + * @return 1 for SSI, 0 for standard files + */ +static u8_t +http_uri_is_ssi(struct fs_file *file, const char *uri) +{ + size_t loop; + u8_t tag_check = 0; + if (file != NULL) { + /* See if we have been asked for an shtml file and, if so, + enable tag checking. */ + const char *ext = NULL, *sub; + char *param = (char *)strstr(uri, "?"); + if (param != NULL) { + /* separate uri from parameters for now, set back later */ + *param = 0; + } + sub = uri; + ext = uri; + for (sub = strstr(sub, "."); sub != NULL; sub = strstr(sub, ".")) { + ext = sub; + sub++; + } + for (loop = 0; loop < NUM_SHTML_EXTENSIONS; loop++) { + if (!lwip_stricmp(ext, g_pcSSIExtensions[loop])) { + tag_check = 1; + break; + } + } + if (param != NULL) { + *param = '?'; + } + } + return tag_check; +} +#endif /* LWIP_HTTPD_SSI */ + +/** Try to find the file specified by uri and, if found, initialize hs + * accordingly. + * + * @param hs the connection state + * @param uri the HTTP header URI + * @param is_09 1 if the request is HTTP/0.9 (no HTTP headers in response) + * @return ERR_OK if file was found and hs has been initialized correctly + * another err_t otherwise + */ +static err_t +http_find_file(struct http_state *hs, const char *uri, int is_09) +{ + size_t loop; + struct fs_file *file = NULL; + char *params = NULL; + err_t err; +#if LWIP_HTTPD_CGI + int i; +#endif /* LWIP_HTTPD_CGI */ +#if !LWIP_HTTPD_SSI + const +#endif /* !LWIP_HTTPD_SSI */ + /* By default, assume we will not be processing server-side-includes tags */ + u8_t tag_check = 0; + + /* Have we been asked for the default file (in root or a directory) ? */ +#if LWIP_HTTPD_MAX_REQUEST_URI_LEN + size_t uri_len = strlen(uri); + if ((uri_len > 0) && (uri[uri_len - 1] == '/') && + ((uri != http_uri_buf) || (uri_len == 1))) { + size_t copy_len = LWIP_MIN(sizeof(http_uri_buf) - 1, uri_len - 1); + if (copy_len > 0) { + MEMCPY(http_uri_buf, uri, copy_len); + http_uri_buf[copy_len] = 0; + } +#else /* LWIP_HTTPD_MAX_REQUEST_URI_LEN */ + if ((uri[0] == '/') && (uri[1] == 0)) { +#endif /* LWIP_HTTPD_MAX_REQUEST_URI_LEN */ + /* Try each of the configured default filenames until we find one + that exists. */ + for (loop = 0; loop < NUM_DEFAULT_FILENAMES; loop++) { + const char *file_name; +#if LWIP_HTTPD_MAX_REQUEST_URI_LEN + if (copy_len > 0) { + size_t len_left = sizeof(http_uri_buf) - copy_len - 1; + if (len_left > 0) { + size_t name_len = strlen(httpd_default_filenames[loop].name); + size_t name_copy_len = LWIP_MIN(len_left, name_len); + MEMCPY(&http_uri_buf[copy_len], httpd_default_filenames[loop].name, name_copy_len); + http_uri_buf[copy_len + name_copy_len] = 0; + } + file_name = http_uri_buf; + } else +#endif /* LWIP_HTTPD_MAX_REQUEST_URI_LEN */ + { + file_name = httpd_default_filenames[loop].name; + } + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Looking for %s...\n", file_name)); + err = fs_open(&hs->file_handle, file_name); + if (err == ERR_OK) { + uri = file_name; + file = &hs->file_handle; + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Opened.\n")); +#if LWIP_HTTPD_SSI + tag_check = httpd_default_filenames[loop].shtml; +#endif /* LWIP_HTTPD_SSI */ + break; + } + } + } + if (file == NULL) { + /* No - we've been asked for a specific file. */ + /* First, isolate the base URI (without any parameters) */ + params = (char *)strchr(uri, '?'); + if (params != NULL) { + /* URI contains parameters. NULL-terminate the base URI */ + *params = '\0'; + params++; + } + +#if LWIP_HTTPD_CGI + http_cgi_paramcount = -1; + /* Does the base URI we have isolated correspond to a CGI handler? */ + if (httpd_num_cgis && httpd_cgis) { + for (i = 0; i < httpd_num_cgis; i++) { + if (strcmp(uri, httpd_cgis[i].pcCGIName) == 0) { + /* + * We found a CGI that handles this URI so extract the + * parameters and call the handler. + */ + http_cgi_paramcount = extract_uri_parameters(hs, params); + uri = httpd_cgis[i].pfnCGIHandler(i, http_cgi_paramcount, hs->params, + hs->param_vals); + break; + } + } + } +#endif /* LWIP_HTTPD_CGI */ + + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Opening %s\n", uri)); + + err = fs_open(&hs->file_handle, uri); + if (err == ERR_OK) { + file = &hs->file_handle; + } else { + file = http_get_404_file(hs, &uri); + } +#if LWIP_HTTPD_SSI + if (file != NULL) { + if (file->flags & FS_FILE_FLAGS_SSI) { + tag_check = 1; + } else { +#if LWIP_HTTPD_SSI_BY_FILE_EXTENSION + tag_check = http_uri_is_ssi(file, uri); +#endif /* LWIP_HTTPD_SSI_BY_FILE_EXTENSION */ + } + } +#endif /* LWIP_HTTPD_SSI */ + } + if (file == NULL) { + /* None of the default filenames exist so send back a 404 page */ + file = http_get_404_file(hs, &uri); + } + return http_init_file(hs, file, is_09, uri, tag_check, params); +} + +/** Initialize a http connection with a file to send (if found). + * Called by http_find_file and http_find_error_file. + * + * @param hs http connection state + * @param file file structure to send (or NULL if not found) + * @param is_09 1 if the request is HTTP/0.9 (no HTTP headers in response) + * @param uri the HTTP header URI + * @param tag_check enable SSI tag checking + * @param params != NULL if URI has parameters (separated by '?') + * @return ERR_OK if file was found and hs has been initialized correctly + * another err_t otherwise + */ +static err_t +http_init_file(struct http_state *hs, struct fs_file *file, int is_09, const char *uri, + u8_t tag_check, char *params) +{ +#if !LWIP_HTTPD_SUPPORT_V09 + LWIP_UNUSED_ARG(is_09); +#endif + if (file != NULL) { + /* file opened, initialise struct http_state */ +#if !LWIP_HTTPD_DYNAMIC_FILE_READ + /* If dynamic read is disabled, file data must be in one piece and available now */ + LWIP_ASSERT("file->data != NULL", file->data != NULL); +#endif + +#if LWIP_HTTPD_SSI + if (tag_check) { + struct http_ssi_state *ssi = http_ssi_state_alloc(); + if (ssi != NULL) { + ssi->tag_index = 0; + ssi->tag_state = TAG_NONE; + ssi->parsed = file->data; + ssi->parse_left = file->len; + ssi->tag_end = file->data; + hs->ssi = ssi; + } + } +#else /* LWIP_HTTPD_SSI */ + LWIP_UNUSED_ARG(tag_check); +#endif /* LWIP_HTTPD_SSI */ + hs->handle = file; +#if LWIP_HTTPD_CGI_SSI + if (params != NULL) { + /* URI contains parameters, call generic CGI handler */ + int count; +#if LWIP_HTTPD_CGI + if (http_cgi_paramcount >= 0) { + count = http_cgi_paramcount; + } else +#endif + { + count = extract_uri_parameters(hs, params); + } + httpd_cgi_handler(file, uri, count, http_cgi_params, http_cgi_param_vals +#if defined(LWIP_HTTPD_FILE_STATE) && LWIP_HTTPD_FILE_STATE + , file->state +#endif /* LWIP_HTTPD_FILE_STATE */ + ); + } +#else /* LWIP_HTTPD_CGI_SSI */ + LWIP_UNUSED_ARG(params); +#endif /* LWIP_HTTPD_CGI_SSI */ + hs->file = file->data; + LWIP_ASSERT("File length must be positive!", (file->len >= 0)); +#if LWIP_HTTPD_CUSTOM_FILES + if (file->is_custom_file && (file->data == NULL)) { + /* custom file, need to read data first (via fs_read_custom) */ + hs->left = 0; + } else +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + { + hs->left = (u32_t)file->len; + } + hs->retries = 0; +#if LWIP_HTTPD_TIMING + hs->time_started = sys_now(); +#endif /* LWIP_HTTPD_TIMING */ +#if !LWIP_HTTPD_DYNAMIC_HEADERS + LWIP_ASSERT("HTTP headers not included in file system", + (hs->handle->flags & FS_FILE_FLAGS_HEADER_INCLUDED) != 0); +#endif /* !LWIP_HTTPD_DYNAMIC_HEADERS */ +#if LWIP_HTTPD_SUPPORT_V09 + if (is_09 && ((hs->handle->flags & FS_FILE_FLAGS_HEADER_INCLUDED) != 0)) { + /* HTTP/0.9 responses are sent without HTTP header, + search for the end of the header. */ + char *file_start = lwip_strnstr(hs->file, CRLF CRLF, hs->left); + if (file_start != NULL) { + int diff = file_start + 4 - hs->file; + hs->file += diff; + hs->left -= (u32_t)diff; + } + } +#endif /* LWIP_HTTPD_SUPPORT_V09*/ + } else { + hs->handle = NULL; + hs->file = NULL; + hs->left = 0; + hs->retries = 0; + } +#if LWIP_HTTPD_DYNAMIC_HEADERS + /* Determine the HTTP headers to send based on the file extension of + * the requested URI. */ + if ((hs->handle == NULL) || ((hs->handle->flags & FS_FILE_FLAGS_HEADER_INCLUDED) == 0)) { + get_http_headers(hs, uri); + } +#else /* LWIP_HTTPD_DYNAMIC_HEADERS */ + LWIP_UNUSED_ARG(uri); +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + if (hs->keepalive) { +#if LWIP_HTTPD_SSI + if (hs->ssi != NULL) { + hs->keepalive = 0; + } else +#endif /* LWIP_HTTPD_SSI */ + { + if ((hs->handle != NULL) && + ((hs->handle->flags & (FS_FILE_FLAGS_HEADER_INCLUDED | FS_FILE_FLAGS_HEADER_PERSISTENT)) == FS_FILE_FLAGS_HEADER_INCLUDED)) { + hs->keepalive = 0; + } + } + } +#endif /* LWIP_HTTPD_SUPPORT_11_KEEPALIVE */ + return ERR_OK; +} + +/** + * The pcb had an error and is already deallocated. + * The argument might still be valid (if != NULL). + */ +static void +http_err(void *arg, err_t err) +{ + struct http_state *hs = (struct http_state *)arg; + LWIP_UNUSED_ARG(err); + + LWIP_DEBUGF(HTTPD_DEBUG, ("http_err: %s", lwip_strerr(err))); + + if (hs != NULL) { + http_state_free(hs); + } +} + +/** + * Data has been sent and acknowledged by the remote host. + * This means that more data can be sent. + */ +static err_t +http_sent(void *arg, struct altcp_pcb *pcb, u16_t len) +{ + struct http_state *hs = (struct http_state *)arg; + + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_sent %p\n", (void *)pcb)); + + LWIP_UNUSED_ARG(len); + + if (hs == NULL) { + return ERR_OK; + } + + hs->retries = 0; + + http_send(pcb, hs); + + return ERR_OK; +} + +/** + * The poll function is called every 2nd second. + * If there has been no data sent (which resets the retries) in 8 seconds, close. + * If the last portion of a file has not been sent in 2 seconds, close. + * + * This could be increased, but we don't want to waste resources for bad connections. + */ +static err_t +http_poll(void *arg, struct altcp_pcb *pcb) +{ + struct http_state *hs = (struct http_state *)arg; + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_poll: pcb=%p hs=%p pcb_state=%s\n", + (void *)pcb, (void *)hs, tcp_debug_state_str(altcp_dbg_get_tcp_state(pcb)))); + + if (hs == NULL) { + err_t closed; + /* arg is null, close. */ + LWIP_DEBUGF(HTTPD_DEBUG, ("http_poll: arg is NULL, close\n")); + closed = http_close_conn(pcb, NULL); + LWIP_UNUSED_ARG(closed); +#if LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR + if (closed == ERR_MEM) { + altcp_abort(pcb); + return ERR_ABRT; + } +#endif /* LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR */ + return ERR_OK; + } else { + hs->retries++; + if (hs->retries == HTTPD_MAX_RETRIES) { + LWIP_DEBUGF(HTTPD_DEBUG, ("http_poll: too many retries, close\n")); + http_close_conn(pcb, hs); + return ERR_OK; + } + + /* If this connection has a file open, try to send some more data. If + * it has not yet received a GET request, don't do this since it will + * cause the connection to close immediately. */ + if (hs->handle) { + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_poll: try to send more data\n")); + if (http_send(pcb, hs)) { + /* If we wrote anything to be sent, go ahead and send it now. */ + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("tcp_output\n")); + altcp_output(pcb); + } + } + } + + return ERR_OK; +} + +/** + * Data has been received on this pcb. + * For HTTP 1.0, this should normally only happen once (if the request fits in one packet). + */ +static err_t +http_recv(void *arg, struct altcp_pcb *pcb, struct pbuf *p, err_t err) +{ + struct http_state *hs = (struct http_state *)arg; + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_recv: pcb=%p pbuf=%p err=%s\n", (void *)pcb, + (void *)p, lwip_strerr(err))); + + if ((err != ERR_OK) || (p == NULL) || (hs == NULL)) { + /* error or closed by other side? */ + if (p != NULL) { + /* Inform TCP that we have taken the data. */ + altcp_recved(pcb, p->tot_len); + pbuf_free(p); + } + if (hs == NULL) { + /* this should not happen, only to be robust */ + LWIP_DEBUGF(HTTPD_DEBUG, ("Error, http_recv: hs is NULL, close\n")); + } + http_close_conn(pcb, hs); + return ERR_OK; + } + +#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND + if (hs->no_auto_wnd) { + hs->unrecved_bytes += p->tot_len; + } else +#endif /* LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND */ + { + /* Inform TCP that we have taken the data. */ + altcp_recved(pcb, p->tot_len); + } + +#if LWIP_HTTPD_SUPPORT_POST + if (hs->post_content_len_left > 0) { + /* reset idle counter when POST data is received */ + hs->retries = 0; + /* this is data for a POST, pass the complete pbuf to the application */ + http_post_rxpbuf(hs, p); + /* pbuf is passed to the application, don't free it! */ + if (hs->post_content_len_left == 0) { + /* all data received, send response or close connection */ + http_send(pcb, hs); + } + return ERR_OK; + } else +#endif /* LWIP_HTTPD_SUPPORT_POST */ + { + if (hs->handle == NULL) { + err_t parsed = http_parse_request(p, hs, pcb); + LWIP_ASSERT("http_parse_request: unexpected return value", parsed == ERR_OK + || parsed == ERR_INPROGRESS || parsed == ERR_ARG || parsed == ERR_USE); +#if LWIP_HTTPD_SUPPORT_REQUESTLIST + if (parsed != ERR_INPROGRESS) { + /* request fully parsed or error */ + if (hs->req != NULL) { + pbuf_free(hs->req); + hs->req = NULL; + } + } +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + pbuf_free(p); + if (parsed == ERR_OK) { +#if LWIP_HTTPD_SUPPORT_POST + if (hs->post_content_len_left == 0) +#endif /* LWIP_HTTPD_SUPPORT_POST */ + { + LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_recv: data %p len %"S32_F"\n", (const void *)hs->file, hs->left)); + http_send(pcb, hs); + } + } else if (parsed == ERR_ARG) { + /* @todo: close on ERR_USE? */ + http_close_conn(pcb, hs); + } + } else { + LWIP_DEBUGF(HTTPD_DEBUG, ("http_recv: already sending data\n")); + /* already sending but still receiving data, we might want to RST here? */ + pbuf_free(p); + } + } + return ERR_OK; +} + +/** + * A new incoming connection has been accepted. + */ +static err_t +http_accept(void *arg, struct altcp_pcb *pcb, err_t err) +{ + struct http_state *hs; + LWIP_UNUSED_ARG(err); + LWIP_UNUSED_ARG(arg); + LWIP_DEBUGF(HTTPD_DEBUG, ("http_accept %p / %p\n", (void *)pcb, arg)); + + if ((err != ERR_OK) || (pcb == NULL)) { + return ERR_VAL; + } + + /* Set priority */ + altcp_setprio(pcb, HTTPD_TCP_PRIO); + + /* Allocate memory for the structure that holds the state of the + connection - initialized by that function. */ + hs = http_state_alloc(); + if (hs == NULL) { + LWIP_DEBUGF(HTTPD_DEBUG, ("http_accept: Out of memory, RST\n")); + return ERR_MEM; + } + hs->pcb = pcb; + + /* Tell TCP that this is the structure we wish to be passed for our + callbacks. */ + altcp_arg(pcb, hs); + + /* Set up the various callback functions */ + altcp_recv(pcb, http_recv); + altcp_err(pcb, http_err); + altcp_poll(pcb, http_poll, HTTPD_POLL_INTERVAL); + altcp_sent(pcb, http_sent); + + return ERR_OK; +} + +static void +httpd_init_pcb(struct altcp_pcb *pcb, u16_t port) +{ + err_t err; + + if (pcb) { + altcp_setprio(pcb, HTTPD_TCP_PRIO); + /* set SOF_REUSEADDR here to explicitly bind httpd to multiple interfaces */ + err = altcp_bind(pcb, IP_ANY_TYPE, port); + LWIP_UNUSED_ARG(err); /* in case of LWIP_NOASSERT */ + LWIP_ASSERT("httpd_init: tcp_bind failed", err == ERR_OK); + pcb = altcp_listen(pcb); + LWIP_ASSERT("httpd_init: tcp_listen failed", pcb != NULL); + altcp_accept(pcb, http_accept); + } +} + +/** + * @ingroup httpd + * Initialize the httpd: set up a listening PCB and bind it to the defined port + */ +void +httpd_init(void) +{ + struct altcp_pcb *pcb; + +#if HTTPD_USE_MEM_POOL + LWIP_MEMPOOL_INIT(HTTPD_STATE); +#if LWIP_HTTPD_SSI + LWIP_MEMPOOL_INIT(HTTPD_SSI_STATE); +#endif +#endif + LWIP_DEBUGF(HTTPD_DEBUG, ("httpd_init\n")); + + /* LWIP_ASSERT_CORE_LOCKED(); is checked by tcp_new() */ + + pcb = altcp_tcp_new_ip_type(IPADDR_TYPE_ANY); + LWIP_ASSERT("httpd_init: tcp_new failed", pcb != NULL); + httpd_init_pcb(pcb, HTTPD_SERVER_PORT); +} + +#if HTTPD_ENABLE_HTTPS +/** + * @ingroup httpd + * Initialize the httpd: set up a listening PCB and bind it to the defined port. + * Also set up TLS connection handling (HTTPS). + */ +void +httpd_inits(struct altcp_tls_config *conf) +{ +#if LWIP_ALTCP_TLS + struct altcp_pcb *pcb_tls = altcp_tls_new(conf, IPADDR_TYPE_ANY); + LWIP_ASSERT("httpd_init: altcp_tls_new failed", pcb_tls != NULL); + httpd_init_pcb(pcb_tls, HTTPD_SERVER_PORT_HTTPS); +#else /* LWIP_ALTCP_TLS */ + LWIP_UNUSED_ARG(conf); +#endif /* LWIP_ALTCP_TLS */ +} +#endif /* HTTPD_ENABLE_HTTPS */ + +#if LWIP_HTTPD_SSI +/** + * @ingroup httpd + * Set the SSI handler function. + * + * @param ssi_handler the SSI handler function + * @param tags an array of SSI tag strings to search for in SSI-enabled files + * @param num_tags number of tags in the 'tags' array + */ +void +http_set_ssi_handler(tSSIHandler ssi_handler, const char **tags, int num_tags) +{ + LWIP_DEBUGF(HTTPD_DEBUG, ("http_set_ssi_handler\n")); + + LWIP_ASSERT("no ssi_handler given", ssi_handler != NULL); + httpd_ssi_handler = ssi_handler; + +#if LWIP_HTTPD_SSI_RAW + LWIP_UNUSED_ARG(tags); + LWIP_UNUSED_ARG(num_tags); +#else /* LWIP_HTTPD_SSI_RAW */ + LWIP_ASSERT("no tags given", tags != NULL); + LWIP_ASSERT("invalid number of tags", num_tags > 0); + + httpd_tags = tags; + httpd_num_tags = num_tags; +#endif /* !LWIP_HTTPD_SSI_RAW */ +} +#endif /* LWIP_HTTPD_SSI */ + +#if LWIP_HTTPD_CGI +/** + * @ingroup httpd + * Set an array of CGI filenames/handler functions + * + * @param cgis an array of CGI filenames/handler functions + * @param num_handlers number of elements in the 'cgis' array + */ +void +http_set_cgi_handlers(const tCGI *cgis, int num_handlers) +{ + LWIP_ASSERT("no cgis given", cgis != NULL); + LWIP_ASSERT("invalid number of handlers", num_handlers > 0); + + httpd_cgis = cgis; + httpd_num_cgis = num_handlers; +} +#endif /* LWIP_HTTPD_CGI */ + +#endif /* LWIP_TCP && LWIP_CALLBACK_API */ diff --git a/User/lwip_if/lwip_http/httpd_cgi_ssi.c b/User/lwip_if/lwip_http/httpd_cgi_ssi.c new file mode 100644 index 0000000..8bd284e --- /dev/null +++ b/User/lwip_if/lwip_http/httpd_cgi_ssi.c @@ -0,0 +1,146 @@ +/** + ****************************************************************************** + * @file LwIP/LwIP_HTTP_Server_Raw/Src/httpd_cg_ssi.c + * @author MCD Application Team + * @brief Webserver SSI and CGI handlers + ****************************************************************************** + * @attention + * + *

                  © Copyright (c) 2017 STMicroelectronics. + * All rights reserved.

                  + * + * This software component is licensed by ST under Ultimate Liberty license + * SLA0044, the "License"; You may not use this file except in compliance with + * the License. You may obtain a copy of the License at: + * www.st.com/SLA0044 + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "bsp.h" +#include "lwip/debug.h" +#include "lwip/tcp.h" +#include "lwip/apps/httpd.h" +#include "http_cgi_ssi.h" + + +#include +#include + +tSSIHandler ADC_Page_SSI_Handler; +uint32_t ADC_not_configured=1; + +/* we will use character "t" as tag for CGI */ +char const* TAGCHAR="t"; +char const** TAGS=&TAGCHAR; + +u16_t ADC_Handler(int iIndex, char *pcInsert, int iInsertLen); + +/* CGI handler for LED control */ +const char * LEDS_CGI_Handler(int iIndex, int iNumParams, char *pcParam[], char *pcValue[]); +void httpd_ssi_init(void); +void httpd_cgi_init(void); + +/* Html request for "/leds.cgi" will start LEDS_CGI_Handler */ +const tCGI LEDS_CGI={"/leds.cgi", LEDS_CGI_Handler}; + +/* Cgi call table, only one CGI used */ +tCGI CGI_TAB[1]; + +/** + * @brief ADC_Handler : SSI handler for ADC page + */ +u16_t ADC_Handler(int iIndex, char *pcInsert, int iInsertLen) +{ + /* We have only one SSI handler iIndex = 0 */ + if (iIndex ==0) + { + char Digit1=0, Digit2=0, Digit3=0, Digit4=0; + uint32_t ADCVal = 0; + + ADCVal = 1234; //BSP_POTENTIOMETER_GetLevel(); + + /* convert to Voltage, step = 0.8 mV */ + ADCVal = (uint32_t)(ADCVal * 0.8); + + /* get digits to display */ + + Digit1= ADCVal/1000; + Digit2= (ADCVal-(Digit1*1000))/100; + Digit3= (ADCVal-((Digit1*1000)+(Digit2*100)))/10; + Digit4= ADCVal -((Digit1*1000)+(Digit2*100)+ (Digit3*10)); + + /* prepare data to be inserted in html */ + *pcInsert = (char)(Digit1+0x30); + *(pcInsert + 1) = (char)(Digit2+0x30); + *(pcInsert + 2) = (char)(Digit3+0x30); + *(pcInsert + 3) = (char)(Digit4+0x30); + + /* 4 characters need to be inserted in html*/ + return 4; + } + return 0; +} + +/** + * @brief CGI handler for LEDs control + */ +const char * LEDS_CGI_Handler(int iIndex, int iNumParams, char *pcParam[], char *pcValue[]) +{ + uint32_t i=0; + + /* We have only one SSI handler iIndex = 0 */ + if (iIndex==0) + { + /* All LEDs off */ + bsp_LedOff(1); + bsp_LedOff(2); + bsp_LedOff(3); + bsp_LedOff(4); + + /* Check cgi parameter : application GET /leds.cgi?led=2&led=4 */ + for (i=0; i

                  404: The requested file cannot be found.

                  \r\n" +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE + , "Connection: keep-alive\r\nContent-Length: 77\r\n\r\n

                  404: The requested file cannot be found.

                  \r\n" +#endif +}; + +/* Indexes into the g_psHTTPHeaderStrings array */ +#define HTTP_HDR_OK 0 /* 200 OK */ +#define HTTP_HDR_NOT_FOUND 1 /* 404 File not found */ +#define HTTP_HDR_BAD_REQUEST 2 /* 400 Bad request */ +#define HTTP_HDR_NOT_IMPL 3 /* 501 Not Implemented */ +#define HTTP_HDR_OK_11 4 /* 200 OK */ +#define HTTP_HDR_NOT_FOUND_11 5 /* 404 File not found */ +#define HTTP_HDR_BAD_REQUEST_11 6 /* 400 Bad request */ +#define HTTP_HDR_NOT_IMPL_11 7 /* 501 Not Implemented */ +#define HTTP_HDR_CONTENT_LENGTH 8 /* Content-Length: (HTTP 1.0)*/ +#define HTTP_HDR_CONN_CLOSE 9 /* Connection: Close (HTTP 1.1) */ +#define HTTP_HDR_CONN_KEEPALIVE 10 /* Connection: keep-alive (HTTP 1.1) */ +#define HTTP_HDR_KEEPALIVE_LEN 11 /* Connection: keep-alive + Content-Length: (HTTP 1.1)*/ +#define HTTP_HDR_SERVER 12 /* Server: HTTPD_SERVER_AGENT */ +#define DEFAULT_404_HTML 13 /* default 404 body */ +#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE +#define DEFAULT_404_HTML_PERSISTENT 14 /* default 404 body, but including Connection: keep-alive */ +#endif + +#define HTTP_CONTENT_TYPE(contenttype) "Content-Type: "contenttype"\r\n\r\n" +#define HTTP_CONTENT_TYPE_ENCODING(contenttype, encoding) "Content-Type: "contenttype"\r\nContent-Encoding: "encoding"\r\n\r\n" + +#define HTTP_HDR_HTML HTTP_CONTENT_TYPE("text/html") +#define HTTP_HDR_SSI HTTP_CONTENT_TYPE("text/html\r\nExpires: Fri, 10 Apr 2008 14:00:00 GMT\r\nPragma: no-cache") +#define HTTP_HDR_GIF HTTP_CONTENT_TYPE("image/gif") +#define HTTP_HDR_PNG HTTP_CONTENT_TYPE("image/png") +#define HTTP_HDR_JPG HTTP_CONTENT_TYPE("image/jpeg") +#define HTTP_HDR_BMP HTTP_CONTENT_TYPE("image/bmp") +#define HTTP_HDR_ICO HTTP_CONTENT_TYPE("image/x-icon") +#define HTTP_HDR_APP HTTP_CONTENT_TYPE("application/octet-stream") +#define HTTP_HDR_JS HTTP_CONTENT_TYPE("application/javascript") +#define HTTP_HDR_RA HTTP_CONTENT_TYPE("application/javascript") +#define HTTP_HDR_CSS HTTP_CONTENT_TYPE("text/css") +#define HTTP_HDR_SWF HTTP_CONTENT_TYPE("application/x-shockwave-flash") +#define HTTP_HDR_XML HTTP_CONTENT_TYPE("text/xml") +#define HTTP_HDR_PDF HTTP_CONTENT_TYPE("application/pdf") +#define HTTP_HDR_JSON HTTP_CONTENT_TYPE("application/json") +#define HTTP_HDR_CSV HTTP_CONTENT_TYPE("text/csv") +#define HTTP_HDR_TSV HTTP_CONTENT_TYPE("text/tsv") +#define HTTP_HDR_SVG HTTP_CONTENT_TYPE("image/svg+xml") +#define HTTP_HDR_SVGZ HTTP_CONTENT_TYPE_ENCODING("image/svg+xml", "gzip") + +#define HTTP_HDR_DEFAULT_TYPE HTTP_CONTENT_TYPE("text/plain") + +/** A list of extension-to-HTTP header strings (see outdated RFC 1700 MEDIA TYPES + * and http://www.iana.org/assignments/media-types for registered content types + * and subtypes) */ +static const tHTTPHeader g_psHTTPHeaders[] = { + { "html", HTTP_HDR_HTML}, + { "htm", HTTP_HDR_HTML}, + { "shtml", HTTP_HDR_SSI}, + { "shtm", HTTP_HDR_SSI}, + { "ssi", HTTP_HDR_SSI}, + { "gif", HTTP_HDR_GIF}, + { "png", HTTP_HDR_PNG}, + { "jpg", HTTP_HDR_JPG}, + { "bmp", HTTP_HDR_BMP}, + { "ico", HTTP_HDR_ICO}, + { "class", HTTP_HDR_APP}, + { "cls", HTTP_HDR_APP}, + { "js", HTTP_HDR_JS}, + { "ram", HTTP_HDR_RA}, + { "css", HTTP_HDR_CSS}, + { "swf", HTTP_HDR_SWF}, + { "xml", HTTP_HDR_XML}, + { "xsl", HTTP_HDR_XML}, + { "pdf", HTTP_HDR_PDF}, + { "json", HTTP_HDR_JSON} +#ifdef HTTPD_ADDITIONAL_CONTENT_TYPES + /* If you need to add content types not listed here: + * #define HTTPD_ADDITIONAL_CONTENT_TYPES {"ct1", HTTP_CONTENT_TYPE("text/ct1")}, {"exe", HTTP_CONTENT_TYPE("application/exe")} + */ + , HTTPD_ADDITIONAL_CONTENT_TYPES +#endif +}; + +#define NUM_HTTP_HEADERS LWIP_ARRAYSIZE(g_psHTTPHeaders) + +#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ + +#if LWIP_HTTPD_SSI +static const char *const g_pcSSIExtensions[] = { + ".shtml", ".shtm", ".ssi", ".xml", ".json" +}; +#define NUM_SHTML_EXTENSIONS LWIP_ARRAYSIZE(g_pcSSIExtensions) +#endif /* LWIP_HTTPD_SSI */ + +#endif /* LWIP_HTTPD_STRUCTS_H */ diff --git a/User/lwip_if/lwip_http/lcd_log_conf.h b/User/lwip_if/lwip_http/lcd_log_conf.h new file mode 100644 index 0000000..10480fa --- /dev/null +++ b/User/lwip_if/lwip_http/lcd_log_conf.h @@ -0,0 +1,148 @@ +/** + ****************************************************************************** + * @file LwIP/LwIP_HTTP_Server_Raw/Inc/lcd_log_conf.h + * @author MCD Application Team + * @brief lcd_log configuration file. + ****************************************************************************** + * @attention + * + *

                  © Copyright (c) 2017 STMicroelectronics International N.V. + * All rights reserved.

                  + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted, provided that the following conditions are met: + * + * 1. Redistribution of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of STMicroelectronics nor the names of other + * contributors to this software may be used to endorse or promote products + * derived from this software without specific written permission. + * 4. This software, including modifications and/or derivative works of this + * software, must execute solely and exclusively on microcontroller or + * microprocessor devices manufactured by or for STMicroelectronics. + * 5. Redistribution and use of this software other than as permitted under + * this license is void and will automatically terminate your rights under + * this license. + * + * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY + * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT + * SHALL STMICROELECTRONICS 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ + +#ifndef __LCD_LOG_CONF_H__ +#define __LCD_LOG_CONF_H__ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32h743i_eval_lcd.h" +#include + + +/** @addtogroup LCD_LOG + * @{ + */ + +/** @defgroup LCD_LOG + * @brief This file is the + * @{ + */ + + +/** @defgroup LCD_LOG_CONF_Exported_Defines + * @{ + */ + +/* Comment the line below to disable the scroll back and forward features */ +#define LCD_SCROLL_ENABLED 1 + + +/* Define the Fonts */ +#define LCD_LOG_HEADER_FONT Font16 +#define LCD_LOG_FOOTER_FONT Font12 +#define LCD_LOG_TEXT_FONT Font12 + +/* Define the LCD LOG Color */ +#define LCD_LOG_BACKGROUND_COLOR LCD_COLOR_WHITE +#define LCD_LOG_TEXT_COLOR LCD_COLOR_DARKBLUE + +#define LCD_LOG_SOLID_BACKGROUND_COLOR LCD_COLOR_BLUE +#define LCD_LOG_SOLID_TEXT_COLOR LCD_COLOR_WHITE + +/* Define the cache depth */ +#define CACHE_SIZE 100 +#define YWINDOW_SIZE 14 + +#if (YWINDOW_SIZE > 14) + #error "Wrong YWINDOW SIZE" +#endif + +/* Redirect the printf to the LCD */ +#ifdef __GNUC__ +/* With GCC/RAISONANCE, small printf (option LD Linker->Libraries->Small printf + set to 'Yes') calls __io_putchar() */ +#define LCD_LOG_PUTCHAR int __io_putchar(int ch) +#else +#define LCD_LOG_PUTCHAR int fputc(int ch, FILE *f) +#endif /* __GNUC__ */ + +/** @defgroup LCD_LOG_CONF_Exported_TypesDefinitions + * @{ + */ + +/** + * @} + */ + + +/** @defgroup LCD_LOG_Exported_Macros + * @{ + */ + + +/** + * @} + */ + +/** @defgroup LCD_LOG_CONF_Exported_Variables + * @{ + */ + +/** + * @} + */ + +/** @defgroup LCD_LOG_CONF_Exported_FunctionsPrototype + * @{ + */ + +/** + * @} + */ + + +#endif //__LCD_LOG_CONF_H__ + +/** + * @} + */ + +/** + * @} + */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/User/lwip_if/lwipopts.h b/User/lwip_if/lwipopts.h index ca8b0cd..2fc8c97 100755 --- a/User/lwip_if/lwipopts.h +++ b/User/lwip_if/lwipopts.h @@ -1,47 +1,35 @@ /** - ****************************************************************************** - * @file LwIP/LwIP_HTTP_Server_Raw/Inc/lwipopts.h - * @author MCD Application Team - * @brief lwIP Options Configuration. - ****************************************************************************** - * @attention - * - *

                  © Copyright (c) 2017 STMicroelectronics International N.V. - * All rights reserved.

                  - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted, provided that the following conditions are met: - * - * 1. Redistribution of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of STMicroelectronics nor the names of other - * contributors to this software may be used to endorse or promote products - * derived from this software without specific written permission. - * 4. This software, including modifications and/or derivative works of this - * software, must execute solely and exclusively on microcontroller or - * microprocessor devices manufactured by or for STMicroelectronics. - * 5. Redistribution and use of this software other than as permitted under - * this license is void and will automatically terminate your rights under - * this license. - * - * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY - * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT - * SHALL STMICROELECTRONICS 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 (C) 2017, STMicroelectronics, all right reserved. + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + ****************************************************************************** + */ #ifndef __LWIPOPTS_H__ #define __LWIPOPTS_H__ @@ -91,100 +79,105 @@ * critical regions during buffer allocation, deallocation and memory * allocation and deallocation. */ -#define SYS_LIGHTWEIGHT_PROT 0 +#define SYS_LIGHTWEIGHT_PROT 0 /** * NO_SYS==1: Provides VERY minimal functionality. Otherwise, * use lwIP facilities. */ -#define NO_SYS 1 +#define NO_SYS 1 /* ---------- Memory options ---------- */ /* MEM_ALIGNMENT: should be set to the alignment of the CPU for which lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2 byte alignment -> define MEM_ALIGNMENT to 2. */ -#define MEM_ALIGNMENT 4 +#define MEM_ALIGNMENT 4 /* MEM_SIZE: the size of the heap memory. If the application will send a lot of data that needs to be copied, this should be set high. */ -#define MEM_SIZE (10 * 1024) +#define MEM_SIZE (10*1024) /* Relocate the LwIP RAM heap pointer */ -#define LWIP_RAM_HEAP_POINTER (0x30044000) +#define LWIP_RAM_HEAP_POINTER (0x30044000) /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application sends a lot of data out of ROM (or other static memory), this should be set high. */ -#define MEMP_NUM_PBUF 10 +#define MEMP_NUM_PBUF 10 /* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One per active UDP "connection". */ -#define MEMP_NUM_UDP_PCB 6 +#define MEMP_NUM_UDP_PCB 6 /* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP connections. */ -#define MEMP_NUM_TCP_PCB 10 +#define MEMP_NUM_TCP_PCB 10 /* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections. */ #define MEMP_NUM_TCP_PCB_LISTEN 6 /* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments. */ -#define MEMP_NUM_TCP_SEG 8 +#define MEMP_NUM_TCP_SEG 8 /* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active timeouts. */ -#define MEMP_NUM_SYS_TIMEOUT 10 +#define MEMP_NUM_SYS_TIMEOUT 10 /* ---------- Pbuf options ---------- */ /* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. @ note: used to allocate Tx pbufs only */ -#define PBUF_POOL_SIZE 4 +#define PBUF_POOL_SIZE 8 /* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool */ -#define PBUF_POOL_BUFSIZE 1528 +#define PBUF_POOL_BUFSIZE 1528 /* LWIP_SUPPORT_CUSTOM_PBUF == 1: to pass directly MAC Rx buffers to the stack no copy is needed */ -#define LWIP_SUPPORT_CUSTOM_PBUF 1 +#define LWIP_SUPPORT_CUSTOM_PBUF 1 /* ------------------------------------------------ ---------- Network Interfaces options ---------- ------------------------------------------------ */ -#define LWIP_NETIF_LINK_CALLBACK 1 +#define LWIP_NETIF_LINK_CALLBACK 1 /* ---------- TCP options ---------- */ -#define LWIP_TCP 1 -#define TCP_TTL 255 +#define LWIP_TCP 1 +#define TCP_TTL 255 /* Controls if TCP should queue segments that arrive out of order. Define to 0 if your device is low on memory. */ -#define TCP_QUEUE_OOSEQ 0 +#define TCP_QUEUE_OOSEQ 0 /* TCP Maximum segment size. */ -#define TCP_MSS (1500 - 40) /* TCP_MSS = (Ethernet MTU - IP header size - TCP header size) */ +#define TCP_MSS (1500 - 40) /* TCP_MSS = (Ethernet MTU - IP header size - TCP header size) */ /* TCP sender buffer space (bytes). */ -#define TCP_SND_BUF (4 * TCP_MSS) +#define TCP_SND_BUF (4*TCP_MSS) /* TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work. */ -#define TCP_SND_QUEUELEN (2 * TCP_SND_BUF / TCP_MSS) +#define TCP_SND_QUEUELEN (2* TCP_SND_BUF/TCP_MSS) /* TCP receive window. */ -#define TCP_WND (2 * TCP_MSS) +#define TCP_WND (2*TCP_MSS) + /* ---------- ICMP options ---------- */ -#define LWIP_ICMP 1 +#define LWIP_ICMP 1 /* ---------- DHCP options ---------- */ #define LWIP_DHCP 0 /* ---------- UDP options ---------- */ -#define LWIP_UDP 1 -#define UDP_TTL 255 +#define LWIP_UDP 1 +#define UDP_TTL 255 + /* ---------- Statistics options ---------- */ #define LWIP_STATS 0 +// 2020-12-22 armfly add +#define LWIP_ALTCP 1 + /* -------------------------------------- ---------- Checksum options ---------- @@ -196,38 +189,44 @@ The STM32H7xx allows computing and verifying the IP, UDP, TCP and ICMP checksums - To use this feature let the following define uncommented. - To disable it and process by CPU comment the the checksum. */ -#define CHECKSUM_BY_HARDWARE +#define CHECKSUM_BY_HARDWARE + #ifdef CHECKSUM_BY_HARDWARE -/* CHECKSUM_GEN_IP==0: Generate checksums by hardware for outgoing IP packets.*/ -#define CHECKSUM_GEN_IP 0 -/* CHECKSUM_GEN_UDP==0: Generate checksums by hardware for outgoing UDP packets.*/ -#define CHECKSUM_GEN_UDP 0 -/* CHECKSUM_GEN_TCP==0: Generate checksums by hardware for outgoing TCP packets.*/ -#define CHECKSUM_GEN_TCP 0 -/* CHECKSUM_CHECK_IP==0: Check checksums by hardware for incoming IP packets.*/ -#define CHECKSUM_CHECK_IP 0 -/* CHECKSUM_CHECK_UDP==0: Check checksums by hardware for incoming UDP packets.*/ -#define CHECKSUM_CHECK_UDP 0 -/* CHECKSUM_CHECK_TCP==0: Check checksums by hardware for incoming TCP packets.*/ -#define CHECKSUM_CHECK_TCP 0 -/* CHECKSUM_CHECK_ICMP==0: Check checksums by hardware for incoming ICMP packets.*/ -#define CHECKSUM_GEN_ICMP 0 + /* CHECKSUM_GEN_IP==0: Generate checksums by hardware for outgoing IP packets.*/ + #define CHECKSUM_GEN_IP 0 + /* CHECKSUM_GEN_UDP==0: Generate checksums by hardware for outgoing UDP packets.*/ + #define CHECKSUM_GEN_UDP 0 + /* CHECKSUM_GEN_TCP==0: Generate checksums by hardware for outgoing TCP packets.*/ + #define CHECKSUM_GEN_TCP 0 + /* CHECKSUM_CHECK_IP==0: Check checksums by hardware for incoming IP packets.*/ + #define CHECKSUM_CHECK_IP 0 + /* CHECKSUM_CHECK_UDP==0: Check checksums by hardware for incoming UDP packets.*/ + #define CHECKSUM_CHECK_UDP 0 + /* CHECKSUM_CHECK_TCP==0: Check checksums by hardware for incoming TCP packets.*/ + #define CHECKSUM_CHECK_TCP 0 + /* CHECKSUM_GEN_ICMP==1: Check checksums by hardware for outgoing ICMP packets.*/ + /* Hardware TCP/UDP checksum insertion not supported when packet is an IPv4 fragment*/ + #define CHECKSUM_GEN_ICMP 1 + /* CHECKSUM_CHECK_ICMP==0: Check checksums by hardware for incoming ICMP packets.*/ + #define CHECKSUM_CHECK_ICMP 0 #else -/* CHECKSUM_GEN_IP==1: Generate checksums in software for outgoing IP packets.*/ -#define CHECKSUM_GEN_IP 1 -/* CHECKSUM_GEN_UDP==1: Generate checksums in software for outgoing UDP packets.*/ -#define CHECKSUM_GEN_UDP 1 -/* CHECKSUM_GEN_TCP==1: Generate checksums in software for outgoing TCP packets.*/ -#define CHECKSUM_GEN_TCP 1 -/* CHECKSUM_CHECK_IP==1: Check checksums in software for incoming IP packets.*/ -#define CHECKSUM_CHECK_IP 1 -/* CHECKSUM_CHECK_UDP==1: Check checksums in software for incoming UDP packets.*/ -#define CHECKSUM_CHECK_UDP 1 -/* CHECKSUM_CHECK_TCP==1: Check checksums in software for incoming TCP packets.*/ -#define CHECKSUM_CHECK_TCP 1 -/* CHECKSUM_CHECK_ICMP==1: Check checksums by hardware for incoming ICMP packets.*/ -#define CHECKSUM_GEN_ICMP 1 + /* CHECKSUM_GEN_IP==1: Generate checksums in software for outgoing IP packets.*/ + #define CHECKSUM_GEN_IP 1 + /* CHECKSUM_GEN_UDP==1: Generate checksums in software for outgoing UDP packets.*/ + #define CHECKSUM_GEN_UDP 1 + /* CHECKSUM_GEN_TCP==1: Generate checksums in software for outgoing TCP packets.*/ + #define CHECKSUM_GEN_TCP 1 + /* CHECKSUM_CHECK_IP==1: Check checksums in software for incoming IP packets.*/ + #define CHECKSUM_CHECK_IP 1 + /* CHECKSUM_CHECK_UDP==1: Check checksums in software for incoming UDP packets.*/ + #define CHECKSUM_CHECK_UDP 1 + /* CHECKSUM_CHECK_TCP==1: Check checksums in software for incoming TCP packets.*/ + #define CHECKSUM_CHECK_TCP 1 + /* CHECKSUM_GEN_ICMP==1: Check checksums by hardware for outgoing ICMP packets.*/ + #define CHECKSUM_GEN_ICMP 1 + /* CHECKSUM_CHECK_ICMP==1: Check checksums by hardware for incoming ICMP packets.*/ + #define CHECKSUM_CHECK_ICMP 1 #endif /* @@ -238,7 +237,7 @@ The STM32H7xx allows computing and verifying the IP, UDP, TCP and ICMP checksums /** * LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c) */ -#define LWIP_NETCONN 0 +#define LWIP_NETCONN 0 /* ------------------------------------ @@ -248,7 +247,7 @@ The STM32H7xx allows computing and verifying the IP, UDP, TCP and ICMP checksums /** * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c) */ -#define LWIP_SOCKET 0 +#define LWIP_SOCKET 0 /* ------------------------------------ @@ -257,21 +256,16 @@ The STM32H7xx allows computing and verifying the IP, UDP, TCP and ICMP checksums */ /** Set this to 1 to support CGI */ -#define LWIP_HTTPD_CGI 1 +#define LWIP_HTTPD_CGI 1 /** Set this to 1 to support SSI (Server-Side-Includes) */ -#define LWIP_HTTPD_SSI 1 +#define LWIP_HTTPD_SSI 1 /** Set this to 1 to include "fsdata_custom.c" instead of "fsdata.c" for the * file system (to prevent changing the file included in CVS) */ -#define HTTPD_USE_CUSTOM_FSDATA 1 +//#define HTTPD_USE_CUSTOM_FSDATA 1 -/* - --------------------------------- - ---------- ASSERT options ---------- - --------------------------------- -*/ -#define LWIP_NOASSERT +//#define HTTPD_FSDATA_FILE 1 #endif /* __LWIPOPTS_H__ */ diff --git a/User/lwip_if/net_udp.c b/User/lwip_if/net_udp.c index 143881c..e86c36c 100755 --- a/User/lwip_if/net_udp.c +++ b/User/lwip_if/net_udp.c @@ -73,6 +73,7 @@ void udp_server_init(void) ********************************************************************************************************* */ //static void udp_server_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p_rx, struct ip_addr *addr, u16_t port) +extern void PCCommTimeout(void); static void udp_server_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p_rx, const ip_addr_t *addr, u16_t port) { // 2019-07-03 destAddr改为全局变量 @@ -105,6 +106,7 @@ static void udp_server_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p_rx, c //MODS_Analyze((uint8_t *)p_rx->payload + 6, p_rx->len - 6, &udp_tx_buf[6], &udp_tx_len); /* 分析MODBUS数据帧 */ if (g_tModS.TxCount > 0) { + memcpy(g_tModS.TxBuf, &g_tVar.MACaddr, 6); /* 本机MAC放到应答数据包前缀 */ g_tModS.TxCount += 6; } @@ -120,6 +122,12 @@ static void udp_server_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p_rx, c if (g_tModS.TxCount > 0) { + /* USB连接状态 = on */ + g_tVar.LinkState = LINK_RJ45_OK; + + /* 硬件定时器4通道(已经用完了),3秒无PC指令则显示失联 */ + bsp_StartHardTimer(4, 3000000, PCCommTimeout); + /* 准备应答数据 */ p_udp_tx->payload = (void *)g_tModS.TxBuf; p_udp_tx->len = g_tModS.TxCount; diff --git a/User/modbus/modbus_file.c b/User/modbus/modbus_file.c index a488667..ae8147c 100644 --- a/User/modbus/modbus_file.c +++ b/User/modbus/modbus_file.c @@ -49,6 +49,34 @@ enum #define H64_FILE_FUNC_END H64_CREATE_FOLDER +/* +********************************************************************************************************* +* 函 数 名: MODS_H64CheckEnd +* 功能说明: 预先判断帧是否结束 +* 形 参: 无 +* 返 回 值: 0表示无效, 1表示是完整帧 +********************************************************************************************************* +*/ +uint8_t MODS_H64CheckEnd(uint8_t *_buf, uint16_t _len) +{ + uint32_t len0; /* 本包数据长度 */ + + if (_len < 18) + { + return 0; + } + + if (_buf[1] == 0x64) + { + len0 = BEBufToUint32(_buf + 12); + if (len0 + 18 == _len) + { + return 1; + } + } + return 0; +} + /* ********************************************************************************************************* * 函 数 名: MODS_64H @@ -157,7 +185,10 @@ static void MODS64_Lua(void) if (offset_addr + package_len >= total_len) { - lua_do(s_lua_prog_buf); + /* 必须让通信应答后 再去执行 lua */ + //lua_do(s_lua_prog_buf); + //bsp_PutMsg(MSG_MODBUS_LUA_RUN, func); + g_tVar.LuaRunOnce = 1; /* 用全局变量实现简单些 */ } g_tModS.TxCount = 0; @@ -458,6 +489,9 @@ static void MODS64_WriteFile(void) static uint32_t s_HeaderLen; /* 头部长度 */ static uint32_t s_LastPackaOffsetAddr; /* 上一包的偏移地址, 用于重复帧识别 */ + static char s_NewMD5[16]; + char OldMD5[16]; + func = BEBufToUint16(&g_tModS.RxBuf[2]); total_len = BEBufToUint32(&g_tModS.RxBuf[4]); /* 文件总长度 */ offset_addr = BEBufToUint32(&g_tModS.RxBuf[8]); @@ -470,10 +504,8 @@ static void MODS64_WriteFile(void) { uint16_t NameLen; uint32_t NewFileSize; - char *NewMD5; uint16_t i; uint32_t OldFileSize; - char OldMD5[16]; uint32_t DataLen; s_HeaderLen = 0; /* 头部长度 */ @@ -481,7 +513,8 @@ static void MODS64_WriteFile(void) NewFileSize = BEBufToUint32(pData); pData += 4; s_HeaderLen += 4; - NewMD5 = (char *)pData; pData += 16; s_HeaderLen += 16; + memcpy(s_NewMD5, (char *)pData, 16); + pData += 16; s_HeaderLen += 16; NameLen = *pData; pData++; s_HeaderLen++; for (i = 0; i < NameLen; i++) @@ -495,7 +528,7 @@ static void MODS64_WriteFile(void) OldFileSize = GetFileMD5(s_FileName, OldMD5); /* 获得本地文件的长度和MD5 */ /* 文件长度和MD5码均相等,则不重复写入 */ - if (NewFileSize == OldFileSize && memcmp(OldMD5, NewMD5, 16) == 0) + if (NewFileSize == OldFileSize && memcmp(OldMD5, s_NewMD5, 16) == 0) { err = 1; /* 1表示文件相等,无需写入 */ } @@ -521,6 +554,15 @@ static void MODS64_WriteFile(void) s_FileOffset = s_FileRxLen; err = 0; /* 文件写入OK */ + + /* 校验完整性 */ + { + GetFileMD5(s_FileName, OldMD5); /* 获得本地文件的长度和MD5 */ + if (memcmp(OldMD5, s_NewMD5, 16) != 0) + { + err = 4; /* 文件写入失败,MD5错误, 立即终止 */ + } + } } else { @@ -570,15 +612,23 @@ static void MODS64_WriteFile(void) s_FileRxLen = len1; } - /* 文件数据传输完毕 */ - //if (s_FileOffset + s_FileRxLen >= total_len - s_HeaderLen) - if (s_FileRxLen >= total_len - s_HeaderLen) + /* 文件数据传输完毕。 s_FileName 是16K缓冲区已存储数据的长度,不是文件长度 */ + if (s_FileOffset + s_FileRxLen >= total_len - s_HeaderLen) { if (WriteFile(s_FileName, s_FileOffset, (char *)FsReadBuf, s_FileRxLen) == 0) { s_FileOffset += s_FileRxLen; err = 0; /* 文件写入OK */ + + /* 校验完整性 */ + { + GetFileMD5(s_FileName, OldMD5); /* 获得本地文件的长度和MD5 */ + if (memcmp(OldMD5, s_NewMD5, 16) != 0) + { + err = 4; /* 文件写入失败,MD5错误, 立即终止 */ + } + } } else { @@ -631,6 +681,7 @@ static void MODS64_MakeDir(void) // uint32_t package_len; /* 本包数据长度 */ uint8_t err = 0; char *pDir; + uint8_t re; func = BEBufToUint16(&g_tModS.RxBuf[2]); // total_len = BEBufToUint32(&g_tModS.RxBuf[4]); @@ -638,9 +689,18 @@ static void MODS64_MakeDir(void) // package_len = BEBufToUint32(&g_tModS.RxBuf[12]); pDir = (char *)&g_tModS.RxBuf[16]; - if (MakeDir(pDir) != 0) + re = MakeDir(pDir); + if (re == FR_EXIST) { - err = 3; /* 目录创建失败 */ + err = 1; /* 文件相同 */ + } + else if (re == FR_OK) + { + err = 0; /* 目录创建成功 */ + } + else + { + err = 3; /* 目录创建失败 */ } g_tModS.TxCount = 0; diff --git a/User/modbus/modbus_file.h b/User/modbus/modbus_file.h index 88cb4a4..b50c9a6 100644 --- a/User/modbus/modbus_file.h +++ b/User/modbus/modbus_file.h @@ -14,6 +14,6 @@ #ifndef __MODBUS_FILE_H_ #define __MODBUS_FILE_H_ - +uint8_t MODS_H64CheckEnd(uint8_t *_buf, uint16_t _len); #endif diff --git a/User/modbus/modbus_print.c b/User/modbus/modbus_print.c index 3559681..bc84d5c 100644 --- a/User/modbus/modbus_print.c +++ b/User/modbus/modbus_print.c @@ -16,7 +16,7 @@ #include "modbus_print.h" #include "net_udp.h" -#define PRINT_FIFO_SIZE 1024 +#define PRINT_FIFO_SIZE 8*1024 typedef struct { @@ -60,7 +60,9 @@ void MODH_Send61H(uint8_t _Ch, uint8_t *_TxBuf, uint16_t _TxLen) g_tModH.TxBuf[g_tModH.TxCount++] = g_tParam.Addr485; /* 本机地址 */ g_tModH.TxBuf[g_tModH.TxCount++] = 0x61; /* 功能码 */ g_tModH.TxBuf[g_tModH.TxCount++] = _Ch; - + g_tModH.TxBuf[g_tModH.TxCount++] = _TxLen >> 8; + g_tModH.TxBuf[g_tModH.TxCount++] = _TxLen; + for (i = 0; i < _TxLen; i++) { g_tModH.TxBuf[g_tModH.TxCount++] = _TxBuf[i]; @@ -137,7 +139,7 @@ void MODH_PrintBuf(uint8_t *_buf, uint16_t _len) } } - if (s_tPrintFiFo.Count >= 512) + if (s_tPrintFiFo.Count >= PRINT_FIFO_SIZE / 2) { stime = 100; /* 如果已经快满了,则尽快启动一次发送 */ } @@ -167,31 +169,93 @@ void MODH_PrintBuf(uint8_t *_buf, uint16_t _len) */ static void print_send(void) { - udp_tx_len = 0; - while (1) - { - if (s_tPrintFiFo.Read == s_tPrintFiFo.Write) - { - break; - } - - udp_tx_buf[udp_tx_len] = s_tPrintFiFo.TxBuf[s_tPrintFiFo.Read]; - if (++s_tPrintFiFo.Read >= PRINT_FIFO_SIZE) - { - s_tPrintFiFo.Read = 0; - } - s_tPrintFiFo.Count--; - - if (++udp_tx_len >= UDP_TX_SIZE) - { - break; - } - } + #if 1 + /* + H7-TOOL主动发送: + 01 ; 从机地址 ,为1 + 61 ; 功能码 + 00 ; 通道号,00表示print + 01 : 长度高字节 + 08 : 长度低字节 + xx xx xx xx ... : 数据体 + CC CC : CRC16 + */ + uint16_t crc; + uint16_t len; - udp_print_send(udp_tx_buf, udp_tx_len); + udp_tx_len = 0; + + udp_tx_buf[udp_tx_len++] = g_tParam.Addr485; /* 本机地址 */ + udp_tx_buf[udp_tx_len++] = 0x61; + udp_tx_buf[udp_tx_len++] = 0x00; + udp_tx_buf[udp_tx_len++] = 0; + udp_tx_buf[udp_tx_len++] = 0; + + len = 0; + while (1) + { + if (s_tPrintFiFo.Read == s_tPrintFiFo.Write) + { + break; + } + + udp_tx_buf[udp_tx_len] = s_tPrintFiFo.TxBuf[s_tPrintFiFo.Read]; + if (++s_tPrintFiFo.Read >= PRINT_FIFO_SIZE) + { + s_tPrintFiFo.Read = 0; + } + s_tPrintFiFo.Count--; + + len++; + if (++udp_tx_len >= UDP_TX_SIZE - 7) + { + break; + } + } + udp_tx_buf[3] = len >> 8; + udp_tx_buf[4] = len; + + crc = CRC16_Modbus(udp_tx_buf, udp_tx_len); + udp_tx_buf[udp_tx_len++] = crc >> 8; + udp_tx_buf[udp_tx_len++] = crc; + + + if (g_tVar.LinkState == LINK_RJ45_OK || g_tVar.LinkState == LINK_WIFI_OK) + { + udp_print_send(udp_tx_buf, udp_tx_len); + } + + if (g_tVar.LinkState == LINK_USB_OK) + { + USBCom_SendBufNow(0, udp_tx_buf, udp_tx_len); + } + #else + udp_tx_len = 0; + while (1) + { + if (s_tPrintFiFo.Read == s_tPrintFiFo.Write) + { + break; + } + + udp_tx_buf[udp_tx_len] = s_tPrintFiFo.TxBuf[s_tPrintFiFo.Read]; + if (++s_tPrintFiFo.Read >= PRINT_FIFO_SIZE) + { + s_tPrintFiFo.Read = 0; + } + s_tPrintFiFo.Count--; + + if (++udp_tx_len >= UDP_TX_SIZE) + { + break; + } + } + + udp_print_send(udp_tx_buf, udp_tx_len); + #endif } extern uint8_t USBCom_SendBuf(int _Port, uint8_t *_Buf, uint16_t _Len); -extern void lua_udp_SendBuf(uint8_t *_buf, uint16_t _len, uint16_t _port); +extern void udp_print_send(uint8_t *_buf, uint16_t _len); /***************************** 安富莱电子 www.armfly.com (END OF FILE) *********************************/ diff --git a/User/modbus/modbus_reg_addr.h b/User/modbus/modbus_reg_addr.h index 9fe9796..3fda694 100755 --- a/User/modbus/modbus_reg_addr.h +++ b/User/modbus/modbus_reg_addr.h @@ -388,7 +388,8 @@ AI : 示波器 CH1 均值, mV单位 #define JUMP_TO_BOOT 2 #define JUMP_TO_DAP 3 #define JUMP_TO_EMMC 4 - #define JUMP_TO_LINK 5 + #define JUMP_TO_LINK 5 + #define JUMP_TO_UPDATE_BOOT 6 /* 更新boot */ /* BOOT 程序用的寄存器 */ diff --git a/User/modbus/modbus_register.c b/User/modbus/modbus_register.c index 5de59d8..08bef00 100755 --- a/User/modbus/modbus_register.c +++ b/User/modbus/modbus_register.c @@ -1484,18 +1484,15 @@ uint8_t WriteRegValue_06H(uint16_t reg_addr, uint16_t reg_value) case REG03_RESET_TO_BOOT: if (reg_value == JUMP_TO_APP) /* 复位进入APP */ { - *(uint32_t *)0x20000000 = 0; - NVIC_SystemReset(); /* 复位CPU */ + g_tVar.ReqJump = JUMP_TO_APP; } else if (reg_value == JUMP_TO_BOOT) /* 复位进入BOOT 升级 */ { - - *(uint32_t *)0x20000000 = 0x5AA51234; - NVIC_SystemReset(); /* 复位CPU */ + g_tVar.ReqJump = JUMP_TO_BOOT; } else if (reg_value == JUMP_TO_DAP) /* 进入DAP */ { - JumpToDAPLink(); + g_tVar.ReqJump = JUMP_TO_DAP; } else if (reg_value == JUMP_TO_EMMC) /* 进入U盘模式 */ { @@ -1505,6 +1502,11 @@ uint8_t WriteRegValue_06H(uint16_t reg_addr, uint16_t reg_value) { g_MainStatus = MS_LINK_MODE; } + else if (reg_value == JUMP_TO_UPDATE_BOOT) /* 进入文件管理界面 */ + { + g_tVar.ReqWriteBoot = 1; + g_MainStatus = MS_FILE_MANAGE; + } break; /**************************** 时钟参数 *****************************/ @@ -1546,7 +1548,7 @@ uint8_t WriteRegValue_06H(uint16_t reg_addr, uint16_t reg_value) RTC_WriteClock(g_tRTC.Year, g_tRTC.Mon, g_tRTC.Day, g_tRTC.Hour, g_tRTC.Min, g_tRTC.Sec); break; - /**************** LUA (未完善)*********************/ + /**************** LUA (未用)*********************/ case REG03_LUA_CMD: if (reg_value == 1) { @@ -1557,15 +1559,6 @@ uint8_t WriteRegValue_06H(uint16_t reg_addr, uint16_t reg_value) { lua_do("init()"); } -// else if (reg_value == 3) -// { -// lua_66H_Write(0, "123", 3); -// } -// else if (reg_value == 4) -// { -// //luaL_dostring(g_Lua, "read()"); -// lua_67H_Read(0, s_lua_read_buf, 3); -// } break; case REG03_CALIB_KEY: /* 校准参数写入使能控制 */ @@ -2199,4 +2192,46 @@ uint8_t MODS_WriteRelay(uint16_t _reg, uint8_t _on) return 0; } +/* +********************************************************************************************************* +* 函 数 名: PC_CmdTask +* 功能说明: 处理PC控制指令,这些指令不能在USB中断中执行。放到 bsp_Idle() 中去执行 +* 形 参: 无 +* 返 回 值: 无 +********************************************************************************************************* +*/ +void PC_CmdTask(void) +{ + /* V1.44, 处理USB通信中的相关执行,这些指令在USB中断中不方便执行 */ + { + if (g_tVar.ReqJump > 0) + { + if (g_tVar.ReqJump == JUMP_TO_APP) /* 复位进入APP */ + { + /* 关闭USB延迟2秒 */ + usbd_UnInit(); + bsp_DelayUS(2000*1000); + + *(uint32_t *)0x20000000 = 0; + NVIC_SystemReset(); /* 复位CPU */ + } + else if (g_tVar.ReqJump == JUMP_TO_BOOT) /* 复位进入BOOT 升级 */ + { + /* 关闭USB延迟2秒 */ + usbd_UnInit(); + bsp_DelayUS(2000*1000); + + *(uint32_t *)0x20000000 = 0x5AA51234; + NVIC_SystemReset(); /* 复位CPU */ + } + else if (g_tVar.ReqJump == JUMP_TO_DAP) /* 进入DAP */ + { + JumpToDAPLink(); + } + + g_tVar.ReqJump = 0; + } + } +} + /***************************** 安富莱电子 www.armfly.com (END OF FILE) *********************************/ diff --git a/User/modbus/modbus_slave.c b/User/modbus/modbus_slave.c index 71339ca..ea22819 100755 --- a/User/modbus/modbus_slave.c +++ b/User/modbus/modbus_slave.c @@ -74,7 +74,7 @@ uint8_t MODS_Poll(uint8_t *_buf, uint16_t _len) crc1 = CRC16_Modbus(g_tModS.RxBuf, g_tModS.RxCount); if (crc1 != 0) { - MODS_SendAckErr(ERR_PACKAGE); /* 发送连包应答 */ + //MODS_SendAckErr(ERR_PACKAGE); /* 发送连包应答 */ goto err_ret; } } @@ -1005,7 +1005,7 @@ fail: /* ********************************************************************************************************* * 函 数 名: MODS_65H -* 功能说明: 执行临时脚本. 该功能已废弃,用64H替代了。 +* 功能说明: 执行临时脚本. 该功能已废弃,仅仅用于lua 快捷方式 * 形 参: 无 * 返 回 值: 无 ********************************************************************************************************* diff --git a/User/modbus/modbus_swd.c b/User/modbus/modbus_swd.c index 88bdbfa..d063d6a 100644 --- a/User/modbus/modbus_swd.c +++ b/User/modbus/modbus_swd.c @@ -33,8 +33,9 @@ /* 64H帧子功能码定义 */ enum { - H66_READ_MEM = 0, /* 读内存, */ - H66_WRITE_MEM = 1, /* 写内存 */ + H66_READ_MEM_INIT = 0, /* 读内存, */ + H66_READ_MEM = 1, /* 写内存 */ + H66_WRITE_MEM = 2, /* 写内存 */ }; static void MODS66_ReadMem(void); @@ -82,7 +83,7 @@ void MODS_66H(void) func = BEBufToUint16(&g_tModS.RxBuf[2]); - if (func == H66_READ_MEM) /* 下载lua程序 */ + if (func == H66_READ_MEM || func == H66_READ_MEM_INIT) { MODS66_ReadMem(); } @@ -117,6 +118,7 @@ err_ret: * 返 回 值: 无 ********************************************************************************************************* */ +extern void pg_init(void); static void MODS66_ReadMem(void) { /* @@ -124,8 +126,9 @@ static void MODS66_ReadMem(void) 01 ; 站号 66 ; 功能码 0000 ; 子功能, - - 0表示读内存 - - 1表示写内存 + - 0表示读内存(需要初始化pg_init()) + - 1表示读内存 (连续读,无需初始化) + - 2 写 0000 0000 : 偏移地址 4字节 0020 0000 : 数据长度 4字节 CCCC : CRC16 @@ -150,7 +153,12 @@ static void MODS66_ReadMem(void) func = BEBufToUint16(&g_tModS.RxBuf[2]); offset_addr = BEBufToUint32(&g_tModS.RxBuf[4]); package_len = BEBufToUint32(&g_tModS.RxBuf[8]); - + + if (func == H66_READ_MEM_INIT) + { + pg_init(); /* 第1包数据,初始化硬件 */ + } + { if (g_gMulSwd.MultiMode > 0) /* 多路模式 */ { @@ -275,8 +283,9 @@ static void MODS66_WriteMem(void) 01 ; 站号 66 ; 功能码 0001 ; 子功能, - - 0表示读内存 - - 1表示写内存 + - 0表示读内存(需要初始化pg_init()) + - 1表示读内存 (连续读,无需初始化) + - 2 写 0000 0000 : 偏移地址 4字节 0020 0000 : 数据长度 4字节 ... 数据 diff --git a/User/programmer/w25q_flash.c b/User/programmer/w25q_flash.c index bb2dfdf..d801492 100644 --- a/User/programmer/w25q_flash.c +++ b/User/programmer/w25q_flash.c @@ -955,7 +955,7 @@ static uint8_t W25Q_SendAndReadDataBlankDaul(uint8_t *_txbuf, uint32_t _txlen, u */ uint8_t W25Q_DetectIC(uint32_t *_id) { - uint8_t txbuf[1]; + uint8_t txbuf[5]; uint8_t rxbuf[3 * 4]; uint8_t i; @@ -1486,7 +1486,7 @@ uint8_t W25Q_FLASH_ProgramBuf(uint32_t _Addr, uint8_t *_Buff, uint32_t _Size) */ uint8_t W25Q_ReadBuf(uint32_t _Addr, uint8_t *_Buf, uint16_t _Len) { - uint8_t txbuf[5]; + uint8_t txbuf[6]; if (g_tW25Q.Capacity > 16 * 1024 * 1024) { diff --git a/User/st_usb/usb_if.c b/User/st_usb/usb_if.c index e92e69c..6832018 100644 --- a/User/st_usb/usb_if.c +++ b/User/st_usb/usb_if.c @@ -140,14 +140,14 @@ void usbd_CloseCDC(void) extern void bsp_DelayMS(uint32_t n); void usbd_OpenMassStorage(void) { - { - if (USBD_Device.dev_config != 0) - { - USBD_Stop(&USBD_Device); - USBD_DeInit(&USBD_Device); - bsp_DelayMS(1000); - } - } +// { +// if (USBD_Device.dev_config != 0) +// { +// USBD_Stop(&USBD_Device); +// USBD_DeInit(&USBD_Device); +// bsp_DelayMS(1000); +// } +// } /* Init Device Library */ USBD_Init(&USBD_Device, &MSC_Desc, 0); @@ -174,9 +174,9 @@ void usbd_OpenMassStorage(void) */ void usbd_CloseMassStorage(void) { - USBD_Init(&USBD_Device, &MSC_Desc, 0); - /* Add Supported Class */ - USBD_RegisterClass(&USBD_Device, USBD_MSC_CLASS); +// USBD_Init(&USBD_Device, &MSC_Desc, 0); +// /* Add Supported Class */ +// USBD_RegisterClass(&USBD_Device, USBD_MSC_CLASS); USBD_Stop(&USBD_Device); diff --git a/User/st_usb/usbd_mass_storage/usbd_mass_desc.c b/User/st_usb/usbd_mass_storage/usbd_mass_desc.c index 4150981..7bf6357 100644 --- a/User/st_usb/usbd_mass_storage/usbd_mass_desc.c +++ b/User/st_usb/usbd_mass_storage/usbd_mass_desc.c @@ -49,11 +49,11 @@ #include "usbd_mass_desc.h" #include "usbd_conf.h" -#define printf_ok printf -//#define printf_ok(...) +//#define printf_ok printf +#define printf_ok(...) -#define printf_err printf -//#define printf_err(...) +//#define printf_err printf +#define printf_err(...) /* Private typedef ----------------------------------------------------------- */ /* Private define ------------------------------------------------------------ */ diff --git a/User/st_usb/usbd_mass_storage/usbd_storage.c b/User/st_usb/usbd_mass_storage/usbd_storage.c index fc0181a..03f9bb5 100644 --- a/User/st_usb/usbd_mass_storage/usbd_storage.c +++ b/User/st_usb/usbd_mass_storage/usbd_storage.c @@ -129,6 +129,7 @@ int8_t STORAGE_Init(uint8_t lun) { case LUN_SD: BSP_MMC_Init(); + BSP_MMC_GetCardInfo(&g_emmcInfo); ret = 0; break; diff --git a/User/st_usb/usbd_virtual_com/usbd_cdc_interface.c b/User/st_usb/usbd_virtual_com/usbd_cdc_interface.c index 26d0879..dc3397a 100644 --- a/User/st_usb/usbd_virtual_com/usbd_cdc_interface.c +++ b/User/st_usb/usbd_virtual_com/usbd_cdc_interface.c @@ -16,9 +16,11 @@ */ #include "bsp.h" +#include "nvic_prio_cfg.h" #include "usbd_user.h" #include "modbus_slave.h" #include "status_usb_uart.h" /* 用来虚拟串口收发数据计数 */ +#include "param.h" uint8_t g_ModbusRxBuf[RX_BUF_SIZE]; uint16_t g_ModbusRxLen = 0; @@ -128,11 +130,11 @@ static int8_t CDC_Itf_Init(void) /* ##-4- Start the TIM Base generation in interrupt mode #################### */ /* Start Channel1 */ - if (HAL_TIM_Base_Start_IT(&TimHandle) != HAL_OK) - { - /* Starting Error */ - ERROR_HANDLER(); - } +// if (HAL_TIM_Base_Start_IT(&TimHandle) != HAL_OK) +// { +// /* Starting Error */ +// ERROR_HANDLER(); +// } /* ##-5- Set Application Buffers ############################################ */ USBD_CDC_SetTxBuffer(&USBD_Device, UserTxBuffer, 0); @@ -361,6 +363,8 @@ void Uart4TxCpltCallback(void) ********************************************************************************************************* */ void RS485_SendBefor(void); +extern uint8_t MODS_H64CheckEnd(uint8_t *_buf, uint16_t _len); +extern void PCCommTimeout(void); static int8_t CDC_Itf_Receive(uint8_t * Buf, uint32_t *Len) { SCB_CleanDCache_by_Addr((uint32_t *)Buf, *Len); @@ -368,6 +372,7 @@ static int8_t CDC_Itf_Receive(uint8_t * Buf, uint32_t *Len) if (s_NowCom == COM_USB1) /* PC通信 */ { uint32_t len; + uint8_t fEnd; len = *Len; @@ -387,13 +392,32 @@ static int8_t CDC_Itf_Receive(uint8_t * Buf, uint32_t *Len) } /* 判断长度不是太好的方案. 如果大于512字节 */ + fEnd = 0; if (len != 512) { + fEnd = 1; + } + else + { + if (MODS_H64CheckEnd(g_ModbusRxBuf, g_ModbusRxLen)) + { + fEnd = 1; + } + } + + if (fEnd == 1) + { MODS_Poll(g_ModbusRxBuf, g_ModbusRxLen); g_ModbusRxLen = 0; if (g_tModS.TxCount > 0) { + /* USB连接状态 = on */ + g_tVar.LinkState = LINK_USB_OK; + + /* 硬件定时器4通道(已经用完了),3秒无PC指令则显示失联 */ + bsp_StartHardTimer(4, 3000000, PCCommTimeout); + USBCom_SendBufNow(0, g_tModS.TxBuf, g_tModS.TxCount); } } @@ -541,7 +565,7 @@ static void TIM_Config(void) /* 2020-11-27 V1.36 移动到后面,在前面从DAP跳转时会死机 */ /* ## Configure the NVIC for TIMx ######################################## */ /* Set Interrupt Group Priority */ - HAL_NVIC_SetPriority(TIMx_IRQn, 6, 0); + HAL_NVIC_SetPriority(TIMx_IRQn, CDC_TIMx_IRQ_PRIO, 0); /* Enable the TIMx global Interrupt */ HAL_NVIC_EnableIRQ(TIMx_IRQn); @@ -565,13 +589,60 @@ uint8_t USBCom_SendBufNow(int _Port, uint8_t *_Buf, uint16_t _Len) comSendBuf(COM_RS485, buf, strlen(buf)); } #endif + uint16_t i; + uint8_t re; + uint32_t len; - memcpy(UserTxBuffer, _Buf, _Len); - USBD_CDC_SetTxBuffer(&USBD_Device, UserTxBuffer, _Len); - if (USBD_CDC_TransmitPacket(&USBD_Device) == USBD_OK) + len = sizeof(UserTxBuffer); + for (i = 0; i < _Len / len; i++) { - return 0; + memcpy(UserTxBuffer, _Buf, len); + USBD_CDC_SetTxBuffer(&USBD_Device, UserTxBuffer, len); + + while (1) + { + re = USBD_CDC_TransmitPacket(&USBD_Device); + if (re == USBD_OK) + { + break; + } + else if (re == USBD_BUSY) + { + continue; + } + else if (re == USBD_FAIL) + { + break; + } + } + + _Buf += len; } + + len = _Len % len; + if (len > 0) + { + memcpy(UserTxBuffer, _Buf, len); + USBD_CDC_SetTxBuffer(&USBD_Device, UserTxBuffer, len); + + while (1) + { + re = USBD_CDC_TransmitPacket(&USBD_Device); + if (re == USBD_OK) + { + break; + } + else if (re == USBD_BUSY) + { + continue; + } + else if (re == USBD_FAIL) + { + break; + } + } + } + return 1; } diff --git a/User/st_usb/usbd_virtual_com/usbd_conf.c b/User/st_usb/usbd_virtual_com/usbd_conf.c index bb40414..ee384e6 100644 --- a/User/st_usb/usbd_virtual_com/usbd_conf.c +++ b/User/st_usb/usbd_virtual_com/usbd_conf.c @@ -45,6 +45,12 @@ /* Includes ------------------------------------------------------------------ */ #include "usb_if.h" +#include "nvic_prio_cfg.h" + +#include "param.h" + +//#define print_ok printf +#define print_ok(...) /* Private typedef ----------------------------------------------------------- */ /* Private define ------------------------------------------------------------ */ @@ -164,7 +170,7 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef * hpcd) __HAL_RCC_USB1_OTG_HS_CLK_ENABLE(); /* Set USBHS Interrupt to the lowest priority */ - HAL_NVIC_SetPriority(OTG_HS_IRQn, 1, 0); + HAL_NVIC_SetPriority(OTG_HS_IRQn, OTG_HS_IRQ_PRIG, 0); /* Enable USBHS Interrupt */ HAL_NVIC_EnableIRQ(OTG_HS_IRQn); @@ -202,6 +208,7 @@ void HAL_PCD_MspDeInit(PCD_HandleTypeDef * hpcd) */ void HAL_PCD_SetupStageCallback(PCD_HandleTypeDef * hpcd) { + print_ok("HAL_PCD_SetupStageCallback()\r\n"); USBD_LL_SetupStage(hpcd->pData, (uint8_t *) hpcd->Setup); } @@ -213,6 +220,7 @@ void HAL_PCD_SetupStageCallback(PCD_HandleTypeDef * hpcd) */ void HAL_PCD_DataOutStageCallback(PCD_HandleTypeDef * hpcd, uint8_t epnum) { + print_ok("HAL_PCD_DataOutStageCallback()\r\n"); USBD_LL_DataOutStage(hpcd->pData, epnum, hpcd->OUT_ep[epnum].xfer_buff); } @@ -224,6 +232,7 @@ void HAL_PCD_DataOutStageCallback(PCD_HandleTypeDef * hpcd, uint8_t epnum) */ void HAL_PCD_DataInStageCallback(PCD_HandleTypeDef * hpcd, uint8_t epnum) { + print_ok("HAL_PCD_DataInStageCallback()\r\n"); USBD_LL_DataInStage(hpcd->pData, epnum, hpcd->IN_ep[epnum].xfer_buff); } @@ -234,6 +243,7 @@ void HAL_PCD_DataInStageCallback(PCD_HandleTypeDef * hpcd, uint8_t epnum) */ void HAL_PCD_SOFCallback(PCD_HandleTypeDef * hpcd) { + print_ok("HAL_PCD_SOFCallback()\r\n"); USBD_LL_SOF(hpcd->pData); } @@ -243,9 +253,10 @@ void HAL_PCD_SOFCallback(PCD_HandleTypeDef * hpcd) * @retval None */ void HAL_PCD_ResetCallback(PCD_HandleTypeDef * hpcd) -{ +{ USBD_SpeedTypeDef speed = USBD_SPEED_FULL; + print_ok("HAL_PCD_ResetCallback()\r\n"); /* Set USB Current Speed */ switch (hpcd->Init.speed) { @@ -275,6 +286,9 @@ void HAL_PCD_ResetCallback(PCD_HandleTypeDef * hpcd) */ void HAL_PCD_SuspendCallback(PCD_HandleTypeDef * hpcd) { + print_ok("HAL_PCD_SuspendCallback()\r\n"); + //g_tVar.UsbEmmcRemoved = 1; + USBD_LL_Suspend(hpcd->pData); } @@ -285,6 +299,7 @@ void HAL_PCD_SuspendCallback(PCD_HandleTypeDef * hpcd) */ void HAL_PCD_ResumeCallback(PCD_HandleTypeDef * hpcd) { + print_ok("HAL_PCD_ResumeCallback()\r\n"); USBD_LL_Resume(hpcd->pData); } @@ -296,6 +311,7 @@ void HAL_PCD_ResumeCallback(PCD_HandleTypeDef * hpcd) */ void HAL_PCD_ISOOUTIncompleteCallback(PCD_HandleTypeDef * hpcd, uint8_t epnum) { + print_ok("HAL_PCD_ISOOUTIncompleteCallback()\r\n"); USBD_LL_IsoOUTIncomplete(hpcd->pData, epnum); } @@ -307,6 +323,7 @@ void HAL_PCD_ISOOUTIncompleteCallback(PCD_HandleTypeDef * hpcd, uint8_t epnum) */ void HAL_PCD_ISOINIncompleteCallback(PCD_HandleTypeDef * hpcd, uint8_t epnum) { + print_ok("HAL_PCD_ISOINIncompleteCallback()\r\n"); USBD_LL_IsoINIncomplete(hpcd->pData, epnum); } @@ -317,6 +334,7 @@ void HAL_PCD_ISOINIncompleteCallback(PCD_HandleTypeDef * hpcd, uint8_t epnum) */ void HAL_PCD_ConnectCallback(PCD_HandleTypeDef * hpcd) { + print_ok("HAL_PCD_ConnectCallback()\r\n"); USBD_LL_DevConnected(hpcd->pData); } @@ -327,7 +345,8 @@ void HAL_PCD_ConnectCallback(PCD_HandleTypeDef * hpcd) */ void HAL_PCD_DisconnectCallback(PCD_HandleTypeDef * hpcd) { - USBD_LL_DevDisconnected(hpcd->pData); + print_ok("HAL_PCD_DisconnectCallback()\r\n"); + USBD_LL_DevDisconnected(hpcd->pData); }